From 7e89b7e3f4d4fd6a706e6878c0b9132c1b32e96f Mon Sep 17 00:00:00 2001 From: Wraith2 Date: Fri, 19 Apr 2019 14:48:22 +0100 Subject: [PATCH 001/607] add concurrent load tests --- .../ProviderAgnostic/ReaderTest/ReaderTest.cs | 370 ++++++++++++++++++ 1 file changed, 370 insertions(+) diff --git a/src/System.Data.SqlClient/tests/ManualTests/ProviderAgnostic/ReaderTest/ReaderTest.cs b/src/System.Data.SqlClient/tests/ManualTests/ProviderAgnostic/ReaderTest/ReaderTest.cs index d0913494a306..e4f20179617a 100644 --- a/src/System.Data.SqlClient/tests/ManualTests/ProviderAgnostic/ReaderTest/ReaderTest.cs +++ b/src/System.Data.SqlClient/tests/ManualTests/ProviderAgnostic/ReaderTest/ReaderTest.cs @@ -2,9 +2,13 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System.Collections.Generic; using System.Data.Common; using System.IO; +using System.Linq; using System.Text; +using System.Threading; +using System.Threading.Tasks; using Xunit; namespace System.Data.SqlClient.ManualTesting.Tests @@ -266,5 +270,371 @@ public static void TestMain() } } } + + [ConditionalFact(typeof(DataTestUtility), nameof(DataTestUtility.AreConnStringsSetup))] + public static async Task TestConcurrentLoadSync() + { + ConcurrentLoadContext context = new ConcurrentLoadContext( + providerFactory: SqlClientFactory.Instance, + connectionString: DataTestUtility.TcpConnStr, + mode: ConcurrentLoadContext.Mode.Async, + warmupSeconds: 1, + executionSeconds: 60, + threadCount: Environment.ProcessorCount * 4 + ); + var (transactionPerSecond, average, stdDeviation) = await context.Run(); + Assert.InRange(transactionPerSecond, 1, int.MaxValue); + Assert.True(average > 0); + Assert.True(stdDeviation != 0); + } + + [ConditionalFact(typeof(DataTestUtility), nameof(DataTestUtility.AreConnStringsSetup))] + public static async Task TestConcurrentLoadAsync() + { + ConcurrentLoadContext context = new ConcurrentLoadContext( + providerFactory: SqlClientFactory.Instance, + connectionString: DataTestUtility.TcpConnStr, + mode: ConcurrentLoadContext.Mode.Async, + warmupSeconds: 1, + executionSeconds: 60, + threadCount: Environment.ProcessorCount * 4 + ); + var (transactionPerSecond, average, stdDeviation) = await context.Run(); + Assert.InRange(transactionPerSecond, 1, int.MaxValue); + Assert.True(average > 0); + Assert.True(stdDeviation != 0); + } + + public class ConcurrentLoadContext + { + public enum Mode + { + Sync, + Async, + } + + public sealed class Category + { + public int Id; + public string Description; + } + + private readonly DbProviderFactory _providerFactory; + private readonly string _connectionString; + private readonly string _query; + private readonly int _warmupSeconds; + private readonly int _executionSeconds; + private readonly Mode _mode; + + private Func _start; + private Func _stop; + private Func _work; + + private int _counter; + private int _totalTransactions; + private int _threadCount; + private int _running; + private List _results; + private DateTime _startTime; + private DateTime _stopTime; + + public ConcurrentLoadContext(DbProviderFactory providerFactory, string connectionString, Mode mode, int warmupSeconds, int executionSeconds, int threadCount) + { + _providerFactory = providerFactory; + _connectionString = connectionString; + _threadCount = threadCount; + _warmupSeconds = warmupSeconds; + _executionSeconds = executionSeconds; + _query = "SELECT CategoryID,Description FROM Categories"; + _results = new List(_executionSeconds); + _mode = mode; + _start = Start; + _stop = Stop; + switch (_mode) + { + case Mode.Sync: + _work = DoWorkSync; + break; + case Mode.Async: + _work = DoWorkSync; + break; + default: + throw new ArgumentOutOfRangeException(nameof(mode)); + } + } + + public void IncrementCounter() => Interlocked.Increment(ref _counter); + + public bool IsRunning + { + get => _running == 1; + set => Interlocked.Exchange(ref _running, value ? 1 : 0); + } + + public Task DoWorkSync() + { + while (IsRunning) + { + var results = new List(); + + using (var connection = _providerFactory.CreateConnection()) + { + connection.ConnectionString = _connectionString; + connection.Open(); + + using (var command = connection.CreateCommand()) + { + command.CommandText = _query; + command.Prepare(); + + using (var reader = command.ExecuteReader()) + { + while (reader.Read()) + { + results.Add( + new Category + { + Id = reader.GetInt32(0), + Description = reader.GetString(1) + }); + } + } + } + } + + CheckResults(results); + + IncrementCounter(); + } + + return Task.CompletedTask; + } + + public Task DoWorkSyncCaching() + { + using (var connection = _providerFactory.CreateConnection()) + { + connection.ConnectionString = _connectionString; + connection.Open(); + + using (var command = connection.CreateCommand()) + { + command.CommandText = _query; + command.Prepare(); + + while (IsRunning) + { + var results = new List(); + + using (var reader = command.ExecuteReader()) + { + while (reader.Read()) + { + results.Add( + new Category + { + Id = reader.GetInt32(0), + Description = reader.GetString(1) + }); + } + } + + CheckResults(results); + + IncrementCounter(); + } + } + } + + return Task.CompletedTask; + } + + public async Task DoWorkAsync() + { + while (IsRunning) + { + var results = new List(); + + using (var connection = _providerFactory.CreateConnection()) + { + connection.ConnectionString = _connectionString; + + await connection.OpenAsync(); + + using (var command = connection.CreateCommand()) + { + command.CommandText = _query; + command.Prepare(); + + using (var reader = await command.ExecuteReaderAsync()) + { + while (await reader.ReadAsync()) + { + results.Add( + new Category + { + Id = reader.GetInt32(0), + Description = reader.GetString(1) + }); + } + } + } + } + + CheckResults(results); + + IncrementCounter(); + } + } + + public async Task DoWorkAsyncCaching() + { + using (var connection = _providerFactory.CreateConnection()) + { + connection.ConnectionString = _connectionString; + + await connection.OpenAsync(); + + using (var command = connection.CreateCommand()) + { + command.CommandText = _query; + command.Prepare(); + + while (IsRunning) + { + var results = new List(); + + using (var reader = await command.ExecuteReaderAsync()) + { + while (await reader.ReadAsync()) + { + results.Add( + new Category + { + Id = reader.GetInt32(0), + Description = reader.GetString(1) + }); + } + } + + CheckResults(results); + + IncrementCounter(); + } + } + } + } + + public async Task<(int transactionPerSecond,double average, double stdDeviation)> Run() + { + IsRunning = true; + + await Task.WhenAll(CreateTasks()); + + _results.Sort(); + _results.RemoveAt(0); + _results.RemoveAt(_results.Count - 1); + + (double avg, double stdDev) = CalculateStdDev(_results); + + int totalTps = (int)(_totalTransactions / (_stopTime - _startTime).TotalSeconds); + + return (totalTps, avg, stdDev); + } + + private async Task Start() + { + await Task.Delay(TimeSpan.FromSeconds(_warmupSeconds)); + + Interlocked.Exchange(ref _counter, 0); + + _startTime = DateTime.UtcNow; + var lastDisplay = _startTime; + + while (IsRunning) + { + await Task.Delay(200); + + DateTime now = DateTime.UtcNow; + int tps = (int)(_counter / (now - lastDisplay).TotalSeconds); + + _results.Add(tps); + + lastDisplay = now; + _totalTransactions += Interlocked.Exchange(ref _counter, 0); + } + } + + private async Task Stop() + { + await Task.Delay(TimeSpan.FromSeconds(_warmupSeconds + _executionSeconds)); + Interlocked.Exchange(ref _running, 0); + _stopTime = DateTime.UtcNow; + } + + private IEnumerable CreateTasks() + { + //yield return Task.Run( + // async () => + // { + + // await Task.Delay(TimeSpan.FromSeconds(_warmupSeconds)); + + // Interlocked.Exchange(ref _counter, 0); + + // _startTime = DateTime.UtcNow; + // var lastDisplay = _startTime; + + // while (IsRunning) + // { + // await Task.Delay(200); + + // var now = DateTime.UtcNow; + // var tps = (int)(_counter / (now - lastDisplay).TotalSeconds); + // var remaining = (int)(_executionSeconds - (now - _startTime).TotalSeconds); + + // _results.Add(tps); + + // lastDisplay = now; + // _totalTransactions += Interlocked.Exchange(ref _counter, 0); + // } + // } + // ); + + yield return Task.Run(_start); + + //yield return Task.Run( + // async () => + // { + // await Task.Delay(TimeSpan.FromSeconds(_warmupSeconds + _executionSeconds)); + + // Interlocked.Exchange(ref _running, 0); + + // _stopTime = DateTime.UtcNow; + // }); + + yield return Task.Run(_stop); + + foreach (var task in Enumerable.Range(0, _threadCount) + .Select(_ => Task.Factory.StartNew(_work, TaskCreationOptions.LongRunning).Unwrap())) + { + yield return task; + } + } + + private static void CheckResults(ICollection results) + { + Assert.NotNull(results); + Assert.Equal(8, results.Count); + } + + private static (double, double) CalculateStdDev(ICollection values) + { + double avg = values.Average(); + double sum = values.Sum(d => Math.Pow(d - avg, 2)); + + return (avg, Math.Sqrt(sum / values.Count)); + } + } } } From 23a78c29abb05724c69fb81603542aeefb617f78 Mon Sep 17 00:00:00 2001 From: Wraith2 Date: Fri, 19 Apr 2019 22:52:40 +0100 Subject: [PATCH 002/607] remove commented code and address feedback --- .../ReaderTest/ConcurrentLoadContext.cs | 308 ++++++++++++++++ .../ProviderAgnostic/ReaderTest/ReaderTest.cs | 337 +----------------- ....Data.SqlClient.ManualTesting.Tests.csproj | 1 + 3 files changed, 310 insertions(+), 336 deletions(-) create mode 100644 src/System.Data.SqlClient/tests/ManualTests/ProviderAgnostic/ReaderTest/ConcurrentLoadContext.cs diff --git a/src/System.Data.SqlClient/tests/ManualTests/ProviderAgnostic/ReaderTest/ConcurrentLoadContext.cs b/src/System.Data.SqlClient/tests/ManualTests/ProviderAgnostic/ReaderTest/ConcurrentLoadContext.cs new file mode 100644 index 000000000000..37fa87f7ea18 --- /dev/null +++ b/src/System.Data.SqlClient/tests/ManualTests/ProviderAgnostic/ReaderTest/ConcurrentLoadContext.cs @@ -0,0 +1,308 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Collections.Generic; +using System.Data.Common; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; +using Xunit; + +namespace System.Data.SqlClient.ManualTesting.Tests +{ + public class ConcurrentLoadContext + { + public enum Mode + { + Sync, + Async, + } + + public sealed class Category + { + public int Id; + public string Description; + } + + private readonly DbProviderFactory _providerFactory; + private readonly string _connectionString; + private readonly string _query; + private readonly int _warmupSeconds; + private readonly int _executionSeconds; + private readonly Mode _mode; + + private Func _start; + private Func _stop; + private Func _work; + + private int _counter; + private int _totalTransactions; + private int _threadCount; + private int _running; + private List _results; + private DateTime _startTime; + private DateTime _stopTime; + + public ConcurrentLoadContext(DbProviderFactory providerFactory, string connectionString, Mode mode, int warmupSeconds, int executionSeconds, int threadCount) + { + _providerFactory = providerFactory; + _connectionString = connectionString; + _threadCount = threadCount; + _warmupSeconds = warmupSeconds; + _executionSeconds = executionSeconds; + _query = "SELECT CategoryID, Description FROM Categories"; + _results = new List(_executionSeconds); + _mode = mode; + _start = Start; + _stop = Stop; + switch (_mode) + { + case Mode.Sync: + _work = DoWorkSync; + break; + case Mode.Async: + _work = DoWorkAsync; + break; + default: + throw new ArgumentOutOfRangeException(nameof(mode)); + } + } + + public void IncrementCounter() => Interlocked.Increment(ref _counter); + + public bool IsRunning + { + get => _running == 1; + set => Interlocked.Exchange(ref _running, value ? 1 : 0); + } + + public Task DoWorkSync() + { + while (IsRunning) + { + var results = new List(); + + using (var connection = _providerFactory.CreateConnection()) + { + connection.ConnectionString = _connectionString; + connection.Open(); + + using (var command = connection.CreateCommand()) + { + command.CommandText = _query; + command.Prepare(); + + using (var reader = command.ExecuteReader()) + { + while (reader.Read()) + { + results.Add( + new Category + { + Id = reader.GetInt32(0), + Description = reader.GetString(1) + }); + } + } + } + } + + CheckResults(results); + + IncrementCounter(); + } + + return Task.CompletedTask; + } + + public Task DoWorkSyncCaching() + { + using (var connection = _providerFactory.CreateConnection()) + { + connection.ConnectionString = _connectionString; + connection.Open(); + + using (var command = connection.CreateCommand()) + { + command.CommandText = _query; + command.Prepare(); + + while (IsRunning) + { + var results = new List(); + + using (var reader = command.ExecuteReader()) + { + while (reader.Read()) + { + results.Add( + new Category + { + Id = reader.GetInt32(0), + Description = reader.GetString(1) + }); + } + } + + CheckResults(results); + + IncrementCounter(); + } + } + } + + return Task.CompletedTask; + } + + public async Task DoWorkAsync() + { + while (IsRunning) + { + var results = new List(); + + using (var connection = _providerFactory.CreateConnection()) + { + connection.ConnectionString = _connectionString; + + await connection.OpenAsync(); + + using (var command = connection.CreateCommand()) + { + command.CommandText = _query; + command.Prepare(); + + using (var reader = await command.ExecuteReaderAsync()) + { + while (await reader.ReadAsync()) + { + results.Add( + new Category + { + Id = reader.GetInt32(0), + Description = reader.GetString(1) + }); + } + } + } + } + + CheckResults(results); + + IncrementCounter(); + } + } + + public async Task DoWorkAsyncCaching() + { + using (var connection = _providerFactory.CreateConnection()) + { + connection.ConnectionString = _connectionString; + + await connection.OpenAsync(); + + using (var command = connection.CreateCommand()) + { + command.CommandText = _query; + command.Prepare(); + + while (IsRunning) + { + var results = new List(); + + using (var reader = await command.ExecuteReaderAsync()) + { + while (await reader.ReadAsync()) + { + results.Add( + new Category + { + Id = reader.GetInt32(0), + Description = reader.GetString(1) + }); + } + } + + CheckResults(results); + + IncrementCounter(); + } + } + } + } + + public async Task<(int transactionPerSecond, double average, double stdDeviation)> Run() + { + IsRunning = true; + + await Task.WhenAll(CreateTasks()); + + _results.Sort(); + _results.RemoveAt(0); + _results.RemoveAt(_results.Count - 1); + + (double avg, double stdDev) = CalculateStdDev(_results); + + int totalTps = (int)(_totalTransactions / (_stopTime - _startTime).TotalSeconds); + + return (totalTps, avg, stdDev); + } + + private async Task Start() + { + await Task.Delay(TimeSpan.FromSeconds(_warmupSeconds)); + + Interlocked.Exchange(ref _counter, 0); + + _startTime = DateTime.UtcNow; + var lastDisplay = _startTime; + + while (IsRunning) + { + await Task.Delay(200); + + DateTime now = DateTime.UtcNow; + int tps = (int)(_counter / (now - lastDisplay).TotalSeconds); + + _results.Add(tps); + + lastDisplay = now; + _totalTransactions += Interlocked.Exchange(ref _counter, 0); + } + } + + private async Task Stop() + { + await Task.Delay(TimeSpan.FromSeconds(_warmupSeconds + _executionSeconds)); + Interlocked.Exchange(ref _running, 0); + _stopTime = DateTime.UtcNow; + } + + private IEnumerable CreateTasks() + { + yield return Task.Run(_start); + + yield return Task.Run(_stop); + + foreach (var task in Enumerable.Range(0, _threadCount) + .Select(_ => Task.Factory.StartNew(_work, TaskCreationOptions.LongRunning).Unwrap())) + { + yield return task; + } + } + + private static void CheckResults(ICollection results) + { + Assert.NotNull(results); + Assert.Equal(8, results.Count); + } + + private static (double, double) CalculateStdDev(ICollection values) + { + double avg = values.Average(); + double sum = values.Sum(d => Math.Pow(d - avg, 2)); + + return (avg, Math.Sqrt(sum / values.Count)); + } + } +} diff --git a/src/System.Data.SqlClient/tests/ManualTests/ProviderAgnostic/ReaderTest/ReaderTest.cs b/src/System.Data.SqlClient/tests/ManualTests/ProviderAgnostic/ReaderTest/ReaderTest.cs index e4f20179617a..e21df22e91d6 100644 --- a/src/System.Data.SqlClient/tests/ManualTests/ProviderAgnostic/ReaderTest/ReaderTest.cs +++ b/src/System.Data.SqlClient/tests/ManualTests/ProviderAgnostic/ReaderTest/ReaderTest.cs @@ -2,12 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System.Collections.Generic; using System.Data.Common; using System.IO; -using System.Linq; using System.Text; -using System.Threading; using System.Threading.Tasks; using Xunit; @@ -277,7 +274,7 @@ public static async Task TestConcurrentLoadSync() ConcurrentLoadContext context = new ConcurrentLoadContext( providerFactory: SqlClientFactory.Instance, connectionString: DataTestUtility.TcpConnStr, - mode: ConcurrentLoadContext.Mode.Async, + mode: ConcurrentLoadContext.Mode.Sync, warmupSeconds: 1, executionSeconds: 60, threadCount: Environment.ProcessorCount * 4 @@ -304,337 +301,5 @@ public static async Task TestConcurrentLoadAsync() Assert.True(average > 0); Assert.True(stdDeviation != 0); } - - public class ConcurrentLoadContext - { - public enum Mode - { - Sync, - Async, - } - - public sealed class Category - { - public int Id; - public string Description; - } - - private readonly DbProviderFactory _providerFactory; - private readonly string _connectionString; - private readonly string _query; - private readonly int _warmupSeconds; - private readonly int _executionSeconds; - private readonly Mode _mode; - - private Func _start; - private Func _stop; - private Func _work; - - private int _counter; - private int _totalTransactions; - private int _threadCount; - private int _running; - private List _results; - private DateTime _startTime; - private DateTime _stopTime; - - public ConcurrentLoadContext(DbProviderFactory providerFactory, string connectionString, Mode mode, int warmupSeconds, int executionSeconds, int threadCount) - { - _providerFactory = providerFactory; - _connectionString = connectionString; - _threadCount = threadCount; - _warmupSeconds = warmupSeconds; - _executionSeconds = executionSeconds; - _query = "SELECT CategoryID,Description FROM Categories"; - _results = new List(_executionSeconds); - _mode = mode; - _start = Start; - _stop = Stop; - switch (_mode) - { - case Mode.Sync: - _work = DoWorkSync; - break; - case Mode.Async: - _work = DoWorkSync; - break; - default: - throw new ArgumentOutOfRangeException(nameof(mode)); - } - } - - public void IncrementCounter() => Interlocked.Increment(ref _counter); - - public bool IsRunning - { - get => _running == 1; - set => Interlocked.Exchange(ref _running, value ? 1 : 0); - } - - public Task DoWorkSync() - { - while (IsRunning) - { - var results = new List(); - - using (var connection = _providerFactory.CreateConnection()) - { - connection.ConnectionString = _connectionString; - connection.Open(); - - using (var command = connection.CreateCommand()) - { - command.CommandText = _query; - command.Prepare(); - - using (var reader = command.ExecuteReader()) - { - while (reader.Read()) - { - results.Add( - new Category - { - Id = reader.GetInt32(0), - Description = reader.GetString(1) - }); - } - } - } - } - - CheckResults(results); - - IncrementCounter(); - } - - return Task.CompletedTask; - } - - public Task DoWorkSyncCaching() - { - using (var connection = _providerFactory.CreateConnection()) - { - connection.ConnectionString = _connectionString; - connection.Open(); - - using (var command = connection.CreateCommand()) - { - command.CommandText = _query; - command.Prepare(); - - while (IsRunning) - { - var results = new List(); - - using (var reader = command.ExecuteReader()) - { - while (reader.Read()) - { - results.Add( - new Category - { - Id = reader.GetInt32(0), - Description = reader.GetString(1) - }); - } - } - - CheckResults(results); - - IncrementCounter(); - } - } - } - - return Task.CompletedTask; - } - - public async Task DoWorkAsync() - { - while (IsRunning) - { - var results = new List(); - - using (var connection = _providerFactory.CreateConnection()) - { - connection.ConnectionString = _connectionString; - - await connection.OpenAsync(); - - using (var command = connection.CreateCommand()) - { - command.CommandText = _query; - command.Prepare(); - - using (var reader = await command.ExecuteReaderAsync()) - { - while (await reader.ReadAsync()) - { - results.Add( - new Category - { - Id = reader.GetInt32(0), - Description = reader.GetString(1) - }); - } - } - } - } - - CheckResults(results); - - IncrementCounter(); - } - } - - public async Task DoWorkAsyncCaching() - { - using (var connection = _providerFactory.CreateConnection()) - { - connection.ConnectionString = _connectionString; - - await connection.OpenAsync(); - - using (var command = connection.CreateCommand()) - { - command.CommandText = _query; - command.Prepare(); - - while (IsRunning) - { - var results = new List(); - - using (var reader = await command.ExecuteReaderAsync()) - { - while (await reader.ReadAsync()) - { - results.Add( - new Category - { - Id = reader.GetInt32(0), - Description = reader.GetString(1) - }); - } - } - - CheckResults(results); - - IncrementCounter(); - } - } - } - } - - public async Task<(int transactionPerSecond,double average, double stdDeviation)> Run() - { - IsRunning = true; - - await Task.WhenAll(CreateTasks()); - - _results.Sort(); - _results.RemoveAt(0); - _results.RemoveAt(_results.Count - 1); - - (double avg, double stdDev) = CalculateStdDev(_results); - - int totalTps = (int)(_totalTransactions / (_stopTime - _startTime).TotalSeconds); - - return (totalTps, avg, stdDev); - } - - private async Task Start() - { - await Task.Delay(TimeSpan.FromSeconds(_warmupSeconds)); - - Interlocked.Exchange(ref _counter, 0); - - _startTime = DateTime.UtcNow; - var lastDisplay = _startTime; - - while (IsRunning) - { - await Task.Delay(200); - - DateTime now = DateTime.UtcNow; - int tps = (int)(_counter / (now - lastDisplay).TotalSeconds); - - _results.Add(tps); - - lastDisplay = now; - _totalTransactions += Interlocked.Exchange(ref _counter, 0); - } - } - - private async Task Stop() - { - await Task.Delay(TimeSpan.FromSeconds(_warmupSeconds + _executionSeconds)); - Interlocked.Exchange(ref _running, 0); - _stopTime = DateTime.UtcNow; - } - - private IEnumerable CreateTasks() - { - //yield return Task.Run( - // async () => - // { - - // await Task.Delay(TimeSpan.FromSeconds(_warmupSeconds)); - - // Interlocked.Exchange(ref _counter, 0); - - // _startTime = DateTime.UtcNow; - // var lastDisplay = _startTime; - - // while (IsRunning) - // { - // await Task.Delay(200); - - // var now = DateTime.UtcNow; - // var tps = (int)(_counter / (now - lastDisplay).TotalSeconds); - // var remaining = (int)(_executionSeconds - (now - _startTime).TotalSeconds); - - // _results.Add(tps); - - // lastDisplay = now; - // _totalTransactions += Interlocked.Exchange(ref _counter, 0); - // } - // } - // ); - - yield return Task.Run(_start); - - //yield return Task.Run( - // async () => - // { - // await Task.Delay(TimeSpan.FromSeconds(_warmupSeconds + _executionSeconds)); - - // Interlocked.Exchange(ref _running, 0); - - // _stopTime = DateTime.UtcNow; - // }); - - yield return Task.Run(_stop); - - foreach (var task in Enumerable.Range(0, _threadCount) - .Select(_ => Task.Factory.StartNew(_work, TaskCreationOptions.LongRunning).Unwrap())) - { - yield return task; - } - } - - private static void CheckResults(ICollection results) - { - Assert.NotNull(results); - Assert.Equal(8, results.Count); - } - - private static (double, double) CalculateStdDev(ICollection values) - { - double avg = values.Average(); - double sum = values.Sum(d => Math.Pow(d - avg, 2)); - - return (avg, Math.Sqrt(sum / values.Count)); - } - } } } diff --git a/src/System.Data.SqlClient/tests/ManualTests/System.Data.SqlClient.ManualTesting.Tests.csproj b/src/System.Data.SqlClient/tests/ManualTests/System.Data.SqlClient.ManualTesting.Tests.csproj index dfaead50f91c..a041436e2a84 100644 --- a/src/System.Data.SqlClient/tests/ManualTests/System.Data.SqlClient.ManualTesting.Tests.csproj +++ b/src/System.Data.SqlClient/tests/ManualTests/System.Data.SqlClient.ManualTesting.Tests.csproj @@ -7,6 +7,7 @@ Common\System\Collections\DictionaryExtensions.cs + From c5b687ee650f648c8e25afbfe6528d802285c301 Mon Sep 17 00:00:00 2001 From: dotnet-maestro <@dotnet-maestro> Date: Sat, 20 Apr 2019 12:39:01 +0000 Subject: [PATCH 003/607] Update dependencies from https://github.com/dotnet/standard build 20190419.2 - NETStandard.Library - 2.1.0-prerelease.19219.2 --- eng/Version.Details.xml | 4 ++-- eng/Versions.props | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 5cd1655c1242..231e87c12c34 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -34,9 +34,9 @@ https://github.com/dotnet/arcade 5e7ce5b394f3477bb0a485a4b761b7742e95be37 - + https://github.com/dotnet/standard - 25538d60f7f4c2c79cf098f2b808907d87b516a7 + ab24a5de1bf2d8b71eff678798b65bd562630ae2 https://github.com/dotnet/arcade diff --git a/eng/Versions.props b/eng/Versions.props index c7cd4e1b072d..162be347a5b2 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -46,7 +46,7 @@ 3.0.0-preview5.19218.11 - 2.1.0-prerelease.19217.2 + 2.1.0-prerelease.19219.2 99.99.99-master-20190419.4 From e7361684e22cd1d2c65362303b891b3eb0a821a4 Mon Sep 17 00:00:00 2001 From: wtgodbe Date: Mon, 22 Apr 2019 12:02:42 -0700 Subject: [PATCH 004/607] Update branding in master to preview6 --- eng/Versions.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/Versions.props b/eng/Versions.props index f9d3f3d4e1e3..d319880be4a8 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -7,7 +7,7 @@ 7 true - preview5 + preview6 true true From 724d8f73e66b747e079875d431d4c1fa546119e1 Mon Sep 17 00:00:00 2001 From: Tomas Weinfurt Date: Mon, 22 Apr 2019 12:28:16 -0700 Subject: [PATCH 005/607] write Host header first if we need to add it (#37007) * write Host header first if we need to add it * feedback from review --- .../Http/SocketsHttpHandler/HttpConnection.cs | 14 +++--- .../HttpClientHandlerTest.Http1.cs | 45 +++++++++++++++++++ .../System.Net.Http.Functional.Tests.csproj | 1 + 3 files changed, 53 insertions(+), 7 deletions(-) create mode 100644 src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Http1.cs diff --git a/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnection.cs b/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnection.cs index ff10f69221d1..378a9cc90283 100644 --- a/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnection.cs +++ b/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnection.cs @@ -434,6 +434,13 @@ public async Task SendAsyncCore(HttpRequestMessage request, } } + // Write special additional headers. If a host isn't in the headers list, then a Host header + // wasn't sent, so as it's required by HTTP 1.1 spec, send one based on the Request Uri. + if (!request.HasHeaders || request.Headers.Host == null) + { + await WriteHostHeaderAsync(request.RequestUri).ConfigureAwait(false); + } + // Write request headers if (request.HasHeaders || cookiesFromContainer != null) { @@ -455,13 +462,6 @@ public async Task SendAsyncCore(HttpRequestMessage request, await WriteHeadersAsync(request.Content.Headers, cookiesFromContainer: null).ConfigureAwait(false); } - // Write special additional headers. If a host isn't in the headers list, then a Host header - // wasn't sent, so as it's required by HTTP 1.1 spec, send one based on the Request Uri. - if (!request.HasHeaders || request.Headers.Host == null) - { - await WriteHostHeaderAsync(request.RequestUri).ConfigureAwait(false); - } - // CRLF for end of headers. await WriteTwoBytesAsync((byte)'\r', (byte)'\n').ConfigureAwait(false); diff --git a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Http1.cs b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Http1.cs new file mode 100644 index 000000000000..b75e0b32fc7f --- /dev/null +++ b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Http1.cs @@ -0,0 +1,45 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Collections.Generic; +using System.Diagnostics; +using System.Net.Test.Common; +using System.Threading.Tasks; + +using Xunit; +using Xunit.Abstractions; + +namespace System.Net.Http.Functional.Tests +{ + // This class is dedicated to SocketHttpHandler tests specific to HTTP/1.x. + public class HttpClientHandlerTest_Http1 : HttpClientHandlerTestBase + { + protected override bool UseSocketsHttpHandler => true; + protected override bool UseHttp2LoopbackServer => false; + + public HttpClientHandlerTest_Http1(ITestOutputHelper output) : base(output) { } + + [Fact] + public async Task SendAsync_HostHeader_First() + { + // RFC 7230 3.2.2. Field Order + await LoopbackServer.CreateServerAsync(async (server, url) => + { + using (HttpClient client = CreateHttpClient()) + { + HttpRequestMessage request = new HttpRequestMessage(HttpMethod.Get, url); + request.Headers.Add("X-foo", "bar"); + + Task sendTask = client.SendAsync(request); + + string[] headers = (await server.AcceptConnectionSendResponseAndCloseAsync()).ToArray(); + await sendTask; + + Assert.True(headers[1].StartsWith("Host")); + } + }); + } + } +} + diff --git a/src/System.Net.Http/tests/FunctionalTests/System.Net.Http.Functional.Tests.csproj b/src/System.Net.Http/tests/FunctionalTests/System.Net.Http.Functional.Tests.csproj index 7ad68e593fbf..0844ed84a87e 100644 --- a/src/System.Net.Http/tests/FunctionalTests/System.Net.Http.Functional.Tests.csproj +++ b/src/System.Net.Http/tests/FunctionalTests/System.Net.Http.Functional.Tests.csproj @@ -147,6 +147,7 @@ + Common\System\Net\Http\Http2Frames.cs From eb9b565f13905624ba01464c876dc06a83a3d9e2 Mon Sep 17 00:00:00 2001 From: Anirudh Agnihotry Date: Mon, 22 Apr 2019 15:14:35 -0700 Subject: [PATCH 006/607] Added code for removing oleHeader (#36891) * added code for removing oleHeader and modifiying it to use span * updating the testdata version and reading only the header signature first * removing size check on the size of object header as welll as we are catching ArgumentOutOfRangeException * Updating verison numbers --- external/test-runtime/XUnit.Runtime.depproj | 2 +- .../src/System/Drawing/ImageConverter.cs | 70 ++++++++++++++++++- .../System.Windows.Extensions.Tests.csproj | 7 +- .../System/Drawing/ImageConverterTests.cs | 16 +++++ 4 files changed, 90 insertions(+), 5 deletions(-) diff --git a/external/test-runtime/XUnit.Runtime.depproj b/external/test-runtime/XUnit.Runtime.depproj index e795c082bc1c..fb9c74afa151 100644 --- a/external/test-runtime/XUnit.Runtime.depproj +++ b/external/test-runtime/XUnit.Runtime.depproj @@ -51,7 +51,7 @@ - + diff --git a/src/System.Windows.Extensions/src/System/Drawing/ImageConverter.cs b/src/System.Windows.Extensions/src/System/Drawing/ImageConverter.cs index 38e8d8e03a3d..d1928828b455 100644 --- a/src/System.Windows.Extensions/src/System/Drawing/ImageConverter.cs +++ b/src/System.Windows.Extensions/src/System/Drawing/ImageConverter.cs @@ -3,14 +3,21 @@ // See the LICENSE file in the project root for more information. using System.ComponentModel; +using System.Diagnostics; using System.Drawing.Imaging; using System.Globalization; using System.IO; +using System.Runtime.InteropServices; +using System.Text; namespace System.Drawing { public class ImageConverter : TypeConverter { + private static ReadOnlySpan PBrush => new byte[] { (byte)'P', (byte)'B', (byte)'r', (byte)'u', (byte)'s', (byte)'h' }; + + private static ReadOnlySpan BMBytes => new byte[] { (byte)'B', (byte)'M' }; + public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) { return sourceType == typeof(byte[]); @@ -23,7 +30,17 @@ public override bool CanConvertTo(ITypeDescriptorContext context, Type destinati public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value) { - return value is byte[] bytes ? Image.FromStream(new MemoryStream(bytes)) : base.ConvertFrom(context, culture, value); + if (value is byte[] bytes) + { + Debug.Assert(value != null, "value is null."); + // Try to get memory stream for images with ole header. + Stream memStream = GetBitmapStream(bytes) ?? new MemoryStream(bytes); + return Image.FromStream(memStream); + } + else + { + return base.ConvertFrom(context, culture, value); + } } public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType) @@ -86,5 +103,56 @@ public override PropertyDescriptorCollection GetProperties(ITypeDescriptorContex } public override bool GetPropertiesSupported(ITypeDescriptorContext context) => true; + + private unsafe Stream GetBitmapStream(ReadOnlySpan rawData) + { + try + { + short signature = MemoryMarshal.Read(rawData); + + if (signature != 0x1c15) + { + return null; + } + + // The data is in the form of OBJECTHEADER. It's an encoded format that Access uses to push imagesinto the DB. + OBJECTHEADER pHeader = MemoryMarshal.Read(rawData); + + // pHeader.signature will always be 0x1c15. + // "PBrush" should be the 6 chars after position 12 as well. + if ( rawData.Length <= pHeader.headersize + 18 || + !rawData.Slice(pHeader.headersize + 12, 6).SequenceEqual(PBrush)) + { + return null; + } + + // We can safely trust that we've got a bitmap. + // The start of our bitmap data in the rawdata is always 78. + return new MemoryStream(rawData.Slice(78).ToArray()); + } + catch (OutOfMemoryException) // This exception may be caused by creating a new MemoryStream. + { + } + catch (ArgumentOutOfRangeException) // This exception may get thrown by MemoryMarshal when input array size is less than the size of the output type. + { + } + + return null; + } + + [StructLayout(LayoutKind.Sequential)] + private struct OBJECTHEADER + { + public short signature; // it's always 0x1c15 + public short headersize; + public short objectType; + public short nameLen; + public short classLen; + public short nameOffset; + public short classOffset; + public short width; + public short height; + public IntPtr pInfo; + } } } diff --git a/src/System.Windows.Extensions/tests/System.Windows.Extensions.Tests.csproj b/src/System.Windows.Extensions/tests/System.Windows.Extensions.Tests.csproj index d2f1c5ee209a..c400b121a280 100644 --- a/src/System.Windows.Extensions/tests/System.Windows.Extensions.Tests.csproj +++ b/src/System.Windows.Extensions/tests/System.Windows.Extensions.Tests.csproj @@ -2,7 +2,8 @@ {AC1A1515-70D8-42E4-9B19-A72F739E974C} netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netfx-Windows_NT-Debug;netfx-Windows_NT-Release - 1.0.1 + 1.0.1 + 1.0.2 @@ -24,10 +25,10 @@ - + %(RecursiveDir)%(Filename)%(Extension) - + %(RecursiveDir)%(Filename)%(Extension) diff --git a/src/System.Windows.Extensions/tests/System/Drawing/ImageConverterTests.cs b/src/System.Windows.Extensions/tests/System/Drawing/ImageConverterTests.cs index 30761cd47a09..9f2ec02c1362 100644 --- a/src/System.Windows.Extensions/tests/System/Drawing/ImageConverterTests.cs +++ b/src/System.Windows.Extensions/tests/System/Drawing/ImageConverterTests.cs @@ -33,6 +33,22 @@ public ImageConverterTest() _imgConvFrmTD = (ImageConverter)TypeDescriptor.GetConverter(_image); } + [ConditionalFact(Helpers.IsDrawingSupported)] + public void ImageWithOleHeader() + { + string path = Path.Combine("bitmaps", "TestImageWithOleHeader.bmp"); + using (FileStream fileStream = File.Open(path, FileMode.Open)) + { + using (var ms = new MemoryStream()) + { + fileStream.CopyTo(ms); + var converter = new ImageConverter(); + object image = converter.ConvertFrom(ms.ToArray()); + Assert.NotNull(image); + } + } + } + [ConditionalFact(Helpers.IsDrawingSupported)] public void TestCanConvertFrom() { From 6cc58374f68b28ef991c3f155f1e87a5902cacf8 Mon Sep 17 00:00:00 2001 From: Kevin Jones Date: Mon, 22 Apr 2019 18:46:00 -0400 Subject: [PATCH 007/607] Support RSAES-OAEP encryption with EnvelopedCms Allow an RSA recipient to indicate the encryption padding that should be used. This makes it easier to get RSA-OAEP-SHA1, and makes it possible to get RSA-OAEP-SHA2 (for some specific SHA-2). --- ...m.Security.Cryptography.Pkcs.netcoreapp.cs | 6 + .../Cryptography/Pal/AnyOS/AsnHelpers.cs | 9 +- .../Pal/AnyOS/ManagedPal.KeyTrans.cs | 50 ++++++-- .../Pal/Windows/PkcsPalWindows.Encrypt.cs | 43 ++++++- .../src/Internal/Cryptography/PkcsHelpers.cs | 12 +- .../src/Internal/Cryptography/PkcsPal.cs | 6 + .../src/Resources/Strings.resx | 3 + .../Cryptography/Pkcs/CmsRecipient.cs | 43 +++++++ .../DecryptTestsRsaPaddingModeTests.cs | 113 ++++++++++++++++++ ...eyTransRecipientInfoRsaPaddingModeTests.cs | 81 +++++++++++++ .../tests/Oids.cs | 1 + ...em.Security.Cryptography.Pkcs.Tests.csproj | 2 + 12 files changed, 352 insertions(+), 17 deletions(-) create mode 100644 src/System.Security.Cryptography.Pkcs/tests/EnvelopedCms/DecryptTestsRsaPaddingModeTests.cs create mode 100644 src/System.Security.Cryptography.Pkcs/tests/EnvelopedCms/KeyTransRecipientInfoRsaPaddingModeTests.cs diff --git a/src/System.Security.Cryptography.Pkcs/ref/System.Security.Cryptography.Pkcs.netcoreapp.cs b/src/System.Security.Cryptography.Pkcs/ref/System.Security.Cryptography.Pkcs.netcoreapp.cs index 4015eec3eb64..a09658008f5e 100644 --- a/src/System.Security.Cryptography.Pkcs/ref/System.Security.Cryptography.Pkcs.netcoreapp.cs +++ b/src/System.Security.Cryptography.Pkcs/ref/System.Security.Cryptography.Pkcs.netcoreapp.cs @@ -7,6 +7,12 @@ namespace System.Security.Cryptography.Pkcs { + public sealed partial class CmsRecipient + { + public CmsRecipient(System.Security.Cryptography.X509Certificates.X509Certificate2 certificate, System.Security.Cryptography.RSAEncryptionPadding rsaEncryptionPadding) { } + public CmsRecipient(System.Security.Cryptography.Pkcs.SubjectIdentifierType recipientIdentifierType, System.Security.Cryptography.X509Certificates.X509Certificate2 certificate, System.Security.Cryptography.RSAEncryptionPadding rsaEncryptionPadding) { } + public System.Security.Cryptography.RSAEncryptionPadding RSAEncryptionPadding { get { throw null; } } + } public sealed partial class CmsSigner { public CmsSigner(System.Security.Cryptography.Pkcs.SubjectIdentifierType signerIdentifierType, System.Security.Cryptography.X509Certificates.X509Certificate2 certificate, System.Security.Cryptography.AsymmetricAlgorithm privateKey) { } diff --git a/src/System.Security.Cryptography.Pkcs/src/Internal/Cryptography/Pal/AnyOS/AsnHelpers.cs b/src/System.Security.Cryptography.Pkcs/src/Internal/Cryptography/Pal/AnyOS/AsnHelpers.cs index 49d02ac43560..1d6221fcf4aa 100644 --- a/src/System.Security.Cryptography.Pkcs/src/Internal/Cryptography/Pal/AnyOS/AsnHelpers.cs +++ b/src/System.Security.Cryptography.Pkcs/src/Internal/Cryptography/Pal/AnyOS/AsnHelpers.cs @@ -54,6 +54,7 @@ internal static SubjectIdentifierOrKey ToSubjectIdentifierOrKey( internal static AlgorithmIdentifier ToPresentationObject(this AlgorithmIdentifierAsn asn) { int keyLength; + byte[] parameters = Array.Empty(); switch (asn.Algorithm.Value) { @@ -127,6 +128,10 @@ internal static AlgorithmIdentifier ToPresentationObject(this AlgorithmIdentifie case Oids.TripleDesCbc: keyLength = KeyLengths.TripleDes_192Bit; break; + case Oids.RsaOaep when !asn.HasNullEquivalentParameters(): + keyLength = 0; + parameters = asn.Parameters.Value.ToArray(); + break; default: // .NET Framework doesn't set a keylength for AES, or any other algorithm than the ones // listed here. @@ -134,7 +139,9 @@ internal static AlgorithmIdentifier ToPresentationObject(this AlgorithmIdentifie break; } - return new AlgorithmIdentifier(new Oid(asn.Algorithm), keyLength); + return new AlgorithmIdentifier(new Oid(asn.Algorithm), keyLength) { + Parameters = parameters + }; } } } diff --git a/src/System.Security.Cryptography.Pkcs/src/Internal/Cryptography/Pal/AnyOS/ManagedPal.KeyTrans.cs b/src/System.Security.Cryptography.Pkcs/src/Internal/Cryptography/Pal/AnyOS/ManagedPal.KeyTrans.cs index 2fb843f54906..56ff34e264f9 100644 --- a/src/System.Security.Cryptography.Pkcs/src/Internal/Cryptography/Pal/AnyOS/ManagedPal.KeyTrans.cs +++ b/src/System.Security.Cryptography.Pkcs/src/Internal/Cryptography/Pal/AnyOS/ManagedPal.KeyTrans.cs @@ -15,8 +15,6 @@ namespace Internal.Cryptography.Pal.AnyOS { internal sealed partial class ManagedPkcsPal : PkcsPal { - private static readonly byte[] s_rsaPkcsParameters = { 0x05, 0x00 }; - private static readonly byte[] s_rsaOaepSha1Parameters = { 0x30, 0x00 }; private static readonly byte[] s_pSpecifiedDefaultParameters = { 0x04, 0x00 }; internal sealed class ManagedKeyTransPal : KeyTransRecipientInfoPal @@ -142,20 +140,48 @@ private KeyTransRecipientInfoAsn MakeKtri( recipient.RecipientIdentifierType.ToString()); } - RSAEncryptionPadding padding; + RSAEncryptionPadding padding = recipient.RSAEncryptionPadding; - switch (recipient.Certificate.GetKeyAlgorithm()) + if (padding is null) { - case Oids.RsaOaep: + if (recipient.Certificate.GetKeyAlgorithm() == Oids.RsaOaep) + { padding = RSAEncryptionPadding.OaepSHA1; - ktri.KeyEncryptionAlgorithm.Algorithm = new Oid(Oids.RsaOaep, Oids.RsaOaep); - ktri.KeyEncryptionAlgorithm.Parameters = s_rsaOaepSha1Parameters; - break; - default: + } + else + { padding = RSAEncryptionPadding.Pkcs1; - ktri.KeyEncryptionAlgorithm.Algorithm = new Oid(Oids.Rsa, Oids.Rsa); - ktri.KeyEncryptionAlgorithm.Parameters = s_rsaPkcsParameters; - break; + } + } + + if (padding == RSAEncryptionPadding.Pkcs1) + { + ktri.KeyEncryptionAlgorithm.Algorithm = new Oid(Oids.Rsa, Oids.Rsa); + ktri.KeyEncryptionAlgorithm.Parameters = s_rsaPkcsParameters; + } + else if (padding == RSAEncryptionPadding.OaepSHA1) + { + ktri.KeyEncryptionAlgorithm.Algorithm = new Oid(Oids.RsaOaep, Oids.RsaOaep); + ktri.KeyEncryptionAlgorithm.Parameters = s_rsaOaepSha1Parameters; + } + else if (padding == RSAEncryptionPadding.OaepSHA256) + { + ktri.KeyEncryptionAlgorithm.Algorithm = new Oid(Oids.RsaOaep, Oids.RsaOaep); + ktri.KeyEncryptionAlgorithm.Parameters = s_rsaOaepSha256Parameters; + } + else if (padding == RSAEncryptionPadding.OaepSHA384) + { + ktri.KeyEncryptionAlgorithm.Algorithm = new Oid(Oids.RsaOaep, Oids.RsaOaep); + ktri.KeyEncryptionAlgorithm.Parameters = s_rsaOaepSha384Parameters; + } + else if (padding == RSAEncryptionPadding.OaepSHA512) + { + ktri.KeyEncryptionAlgorithm.Algorithm = new Oid(Oids.RsaOaep, Oids.RsaOaep); + ktri.KeyEncryptionAlgorithm.Parameters = s_rsaOaepSha512Parameters; + } + else + { + throw new CryptographicException(SR.Cryptography_Cms_UnknownAlgorithm); } using (RSA rsa = recipient.Certificate.GetRSAPublicKey()) diff --git a/src/System.Security.Cryptography.Pkcs/src/Internal/Cryptography/Pal/Windows/PkcsPalWindows.Encrypt.cs b/src/System.Security.Cryptography.Pkcs/src/Internal/Cryptography/Pal/Windows/PkcsPalWindows.Encrypt.cs index ca382d372fab..6477d758b0d3 100644 --- a/src/System.Security.Cryptography.Pkcs/src/Internal/Cryptography/Pal/Windows/PkcsPalWindows.Encrypt.cs +++ b/src/System.Security.Cryptography.Pkcs/src/Internal/Cryptography/Pal/Windows/PkcsPalWindows.Encrypt.cs @@ -136,7 +136,7 @@ public static SafeCryptMsgHandle CreateCryptMsgHandleToEncode(CmsRecipientCollec pEnvelopedEncodeInfo->ContentEncryptionAlgorithm.pszObjId = hb.AllocAsciiString(algorithmOidValue); // Desktop compat: Though it seems like we could copy over the contents of contentEncryptionAlgorithm.Parameters, that property is for retrieving information from decoded Cms's only, and it - // massages the raw data so it wouldn't be usable here anyway. To hammer home that fact, the EncryptedCms constructer rather rudely forces contentEncryptionAlgorithm.Parameters to be the empty array. + // massages the raw data so it wouldn't be usable here anyway. To hammer home that fact, the EncryptedCms constructor rather rudely forces contentEncryptionAlgorithm.Parameters to be the empty array. pEnvelopedEncodeInfo->ContentEncryptionAlgorithm.Parameters.cbData = 0; pEnvelopedEncodeInfo->ContentEncryptionAlgorithm.Parameters.pbData = IntPtr.Zero; @@ -266,8 +266,45 @@ private static CMSG_RECIPIENT_ENCODE_INFO EncodeRecipientInfo(CmsRecipient recip pEncodeInfo->cbSize = sizeof(CMSG_KEY_TRANS_RECIPIENT_ENCODE_INFO); - CRYPT_ALGORITHM_IDENTIFIER algId = pCertInfo->SubjectPublicKeyInfo.Algorithm; - pEncodeInfo->KeyEncryptionAlgorithm = algId; + if (recipient.RSAEncryptionPadding is null) + { + CRYPT_ALGORITHM_IDENTIFIER algId = pCertInfo->SubjectPublicKeyInfo.Algorithm; + pEncodeInfo->KeyEncryptionAlgorithm = algId; + } + else if (recipient.RSAEncryptionPadding == RSAEncryptionPadding.Pkcs1) + { + pEncodeInfo->KeyEncryptionAlgorithm.pszObjId = hb.AllocAsciiString(Oids.Rsa); + pEncodeInfo->KeyEncryptionAlgorithm.Parameters.cbData = (uint)s_rsaPkcsParameters.Length; + pEncodeInfo->KeyEncryptionAlgorithm.Parameters.pbData = hb.AllocBytes(s_rsaPkcsParameters); + } + else if (recipient.RSAEncryptionPadding == RSAEncryptionPadding.OaepSHA1) + { + pEncodeInfo->KeyEncryptionAlgorithm.pszObjId = hb.AllocAsciiString(Oids.RsaOaep); + pEncodeInfo->KeyEncryptionAlgorithm.Parameters.cbData = (uint)s_rsaOaepSha1Parameters.Length; + pEncodeInfo->KeyEncryptionAlgorithm.Parameters.pbData = hb.AllocBytes(s_rsaOaepSha1Parameters); + } + else if (recipient.RSAEncryptionPadding == RSAEncryptionPadding.OaepSHA256) + { + pEncodeInfo->KeyEncryptionAlgorithm.pszObjId = hb.AllocAsciiString(Oids.RsaOaep); + pEncodeInfo->KeyEncryptionAlgorithm.Parameters.cbData = (uint)s_rsaOaepSha256Parameters.Length; + pEncodeInfo->KeyEncryptionAlgorithm.Parameters.pbData = hb.AllocBytes(s_rsaOaepSha256Parameters); + } + else if (recipient.RSAEncryptionPadding == RSAEncryptionPadding.OaepSHA384) + { + pEncodeInfo->KeyEncryptionAlgorithm.pszObjId = hb.AllocAsciiString(Oids.RsaOaep); + pEncodeInfo->KeyEncryptionAlgorithm.Parameters.cbData = (uint)s_rsaOaepSha384Parameters.Length; + pEncodeInfo->KeyEncryptionAlgorithm.Parameters.pbData = hb.AllocBytes(s_rsaOaepSha384Parameters); + } + else if (recipient.RSAEncryptionPadding == RSAEncryptionPadding.OaepSHA512) + { + pEncodeInfo->KeyEncryptionAlgorithm.pszObjId = hb.AllocAsciiString(Oids.RsaOaep); + pEncodeInfo->KeyEncryptionAlgorithm.Parameters.cbData = (uint)s_rsaOaepSha512Parameters.Length; + pEncodeInfo->KeyEncryptionAlgorithm.Parameters.pbData = hb.AllocBytes(s_rsaOaepSha512Parameters); + } + else + { + throw ErrorCode.CRYPT_E_UNKNOWN_ALGO.ToCryptographicException(); + } pEncodeInfo->pvKeyEncryptionAuxInfo = IntPtr.Zero; pEncodeInfo->hCryptProv = IntPtr.Zero; diff --git a/src/System.Security.Cryptography.Pkcs/src/Internal/Cryptography/PkcsHelpers.cs b/src/System.Security.Cryptography.Pkcs/src/Internal/Cryptography/PkcsHelpers.cs index adee2f21b3ee..b0acf2677210 100644 --- a/src/System.Security.Cryptography.Pkcs/src/Internal/Cryptography/PkcsHelpers.cs +++ b/src/System.Security.Cryptography.Pkcs/src/Internal/Cryptography/PkcsHelpers.cs @@ -170,7 +170,17 @@ public static CmsRecipientCollection DeepCopy(this CmsRecipientCollection recipi { X509Certificate2 originalCert = recipient.Certificate; X509Certificate2 certCopy = new X509Certificate2(originalCert.Handle); - CmsRecipient recipientCopy = new CmsRecipient(recipient.RecipientIdentifierType, certCopy); + CmsRecipient recipientCopy; + + if (recipient.RSAEncryptionPadding is null) + { + recipientCopy = new CmsRecipient(recipient.RecipientIdentifierType, certCopy); + } + else + { + recipientCopy = new CmsRecipient(recipient.RecipientIdentifierType, certCopy, recipient.RSAEncryptionPadding); + } + recipientsCopy.Add(recipientCopy); GC.KeepAlive(originalCert); } diff --git a/src/System.Security.Cryptography.Pkcs/src/Internal/Cryptography/PkcsPal.cs b/src/System.Security.Cryptography.Pkcs/src/Internal/Cryptography/PkcsPal.cs index f691f795f500..19e3d1526361 100644 --- a/src/System.Security.Cryptography.Pkcs/src/Internal/Cryptography/PkcsPal.cs +++ b/src/System.Security.Cryptography.Pkcs/src/Internal/Cryptography/PkcsPal.cs @@ -11,6 +11,12 @@ namespace Internal.Cryptography { internal abstract partial class PkcsPal { + private protected static readonly byte[] s_rsaOaepSha1Parameters = { 0x30, 0x00 }; + private protected static readonly byte[] s_rsaOaepSha256Parameters = { 0x30, 0x2f, 0xa0, 0x0f, 0x30, 0x0d, 0x06, 0x09, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x01, 0x05, 0x00, 0xa1, 0x1c, 0x30, 0x1a, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x08, 0x30, 0x0d, 0x06, 0x09, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x01, 0x05, 0x00 }; + private protected static readonly byte[] s_rsaOaepSha384Parameters = { 0x30, 0x2f, 0xa0, 0x0f, 0x30, 0x0d, 0x06, 0x09, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x02, 0x05, 0x00, 0xa1, 0x1c, 0x30, 0x1a, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x08, 0x30, 0x0d, 0x06, 0x09, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x02, 0x05, 0x00 }; + private protected static readonly byte[] s_rsaOaepSha512Parameters = { 0x30, 0x2f, 0xa0, 0x0f, 0x30, 0x0d, 0x06, 0x09, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x03, 0x05, 0x00, 0xa1, 0x1c, 0x30, 0x1a, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x08, 0x30, 0x0d, 0x06, 0x09, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x03, 0x05, 0x00 }; + private protected static readonly byte[] s_rsaPkcsParameters = { 0x05, 0x00 }; + protected PkcsPal() { } diff --git a/src/System.Security.Cryptography.Pkcs/src/Resources/Strings.resx b/src/System.Security.Cryptography.Pkcs/src/Resources/Strings.resx index a224dd441649..117980b01ba6 100644 --- a/src/System.Security.Cryptography.Pkcs/src/Resources/Strings.resx +++ b/src/System.Security.Cryptography.Pkcs/src/Resources/Strings.resx @@ -177,6 +177,9 @@ An RSA key is required to decrypt for a RecipientInfo with a KeyTransport recipient type. + + An RSA certificate is required for a CmsRecipient when used with RSAEncryptionPadding. + Certificate trust could not be established. The first reported error is: {0} diff --git a/src/System.Security.Cryptography.Pkcs/src/System/Security/Cryptography/Pkcs/CmsRecipient.cs b/src/System.Security.Cryptography.Pkcs/src/System/Security/Cryptography/Pkcs/CmsRecipient.cs index ae046a4fad0a..6bb5cb3b3ea0 100644 --- a/src/System.Security.Cryptography.Pkcs/src/System/Security/Cryptography/Pkcs/CmsRecipient.cs +++ b/src/System.Security.Cryptography.Pkcs/src/System/Security/Cryptography/Pkcs/CmsRecipient.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable using System; using System.Diagnostics; using System.Security.Cryptography.X509Certificates; @@ -15,6 +16,30 @@ public CmsRecipient(X509Certificate2 certificate) { } +#if netstandard +internal +#else +public +#endif + CmsRecipient(X509Certificate2 certificate, RSAEncryptionPadding rsaEncryptionPadding) + : this(certificate) + { + ValidateRSACertificate(certificate); + RSAEncryptionPadding = rsaEncryptionPadding ?? throw new ArgumentNullException(nameof(rsaEncryptionPadding)); + } + +#if netstandard +internal +#else +public +#endif + CmsRecipient(SubjectIdentifierType recipientIdentifierType, X509Certificate2 certificate, RSAEncryptionPadding rsaEncryptionPadding) + : this(recipientIdentifierType, certificate) + { + ValidateRSACertificate(certificate); + RSAEncryptionPadding = rsaEncryptionPadding ?? throw new ArgumentNullException(nameof(rsaEncryptionPadding)); + } + public CmsRecipient(SubjectIdentifierType recipientIdentifierType, X509Certificate2 certificate) { if (certificate == null) @@ -37,7 +62,25 @@ public CmsRecipient(SubjectIdentifierType recipientIdentifierType, X509Certifica Certificate = certificate; } +#if netstandard +internal +#else +public +#endif + RSAEncryptionPadding? RSAEncryptionPadding { get; } public SubjectIdentifierType RecipientIdentifierType { get; } public X509Certificate2 Certificate { get; } + + private static void ValidateRSACertificate(X509Certificate2 certificate) + { + switch (certificate.GetKeyAlgorithm()) + { + case Oids.Rsa: + case Oids.RsaOaep: + break; + default: + throw new CryptographicException(SR.Cryptography_Cms_Recipient_RSARequired_RSAPaddingModeSupplied); + } + } } } diff --git a/src/System.Security.Cryptography.Pkcs/tests/EnvelopedCms/DecryptTestsRsaPaddingModeTests.cs b/src/System.Security.Cryptography.Pkcs/tests/EnvelopedCms/DecryptTestsRsaPaddingModeTests.cs new file mode 100644 index 000000000000..861d1ea4b5d9 --- /dev/null +++ b/src/System.Security.Cryptography.Pkcs/tests/EnvelopedCms/DecryptTestsRsaPaddingModeTests.cs @@ -0,0 +1,113 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Collections.Generic; +using System.Security.Cryptography.Pkcs.Tests; +using System.Security.Cryptography.X509Certificates; +using Xunit; + +namespace System.Security.Cryptography.Pkcs.EnvelopedCmsTests.Tests +{ + public class DecryptTestsRsaPaddingMode : DecryptTests + { + public static bool SupportsDiffieHellman { get; } = KeyAgreeRecipientInfoTests.SupportsDiffieHellman; + + public DecryptTestsRsaPaddingMode() : base(false) + { + } + + [Theory] + [MemberData(nameof(Roundtrip_RsaPaddingModes_TestData))] + [OuterLoop(/* Leaks key on disk if interrupted */)] + public static void Roundtrip_RsaPaddingModes(RSAEncryptionPadding rsaEncryptionPadding) + { + ContentInfo contentInfo = new ContentInfo(new byte[] { 1, 2, 3 }); + EnvelopedCms ecms = new EnvelopedCms(contentInfo); + using (X509Certificate2 cert = Certificates.RSA2048Sha256KeyTransfer1.GetCertificate()) + { + CmsRecipient recipient = new CmsRecipient(SubjectIdentifierType.SubjectKeyIdentifier, cert, rsaEncryptionPadding); + ecms.Encrypt(recipient); + } + + byte[] encodedMessage = ecms.Encode(); + + ecms = new EnvelopedCms(); + ecms.Decode(encodedMessage); + + using (X509Certificate2 privateCert = Certificates.RSA2048Sha256KeyTransfer1.TryGetCertificateWithPrivateKey()) + { + if (privateCert == null) + return; // CertLoader can't load the private certificate. + + ecms.Decrypt(new X509Certificate2Collection(privateCert)); + } + Assert.Equal(contentInfo.ContentType.Value, ecms.ContentInfo.ContentType.Value); + Assert.Equal(contentInfo.Content, ecms.ContentInfo.Content); + } + + [Fact] + [OuterLoop(/* Leaks key on disk if interrupted */)] + public static void MultipleRecipientIdentifiers_RoundTrip_DifferingRsaPaddingModes() + { + ContentInfo contentInfo = new ContentInfo(new byte[] { 1, 2, 3 }); + EnvelopedCms ecms = new EnvelopedCms(contentInfo); + CmsRecipientCollection recipients = new CmsRecipientCollection(); + using (X509Certificate2 issuerSerialCert = Certificates.RSAKeyTransfer1.GetCertificate()) + using (X509Certificate2 explicitSkiCert = Certificates.RSAKeyTransfer_ExplicitSki.GetCertificate()) + { + // CmsRecipients have different identifiers to test multiple identifier encryption. + recipients.Add(new CmsRecipient(SubjectIdentifierType.IssuerAndSerialNumber, issuerSerialCert, RSAEncryptionPadding.OaepSHA1)); + recipients.Add(new CmsRecipient(SubjectIdentifierType.SubjectKeyIdentifier, explicitSkiCert, RSAEncryptionPadding.OaepSHA256)); + ecms.Encrypt(recipients); + } + + byte[] encodedMessage = ecms.Encode(); + + ecms = new EnvelopedCms(); + ecms.Decode(encodedMessage); + + using (X509Certificate2 privateIssuerSerialCert = Certificates.RSAKeyTransfer1.TryGetCertificateWithPrivateKey()) + { + if (privateIssuerSerialCert != null) + return; // CertLoader can't load the private certificate. + + ecms.Decrypt(new X509Certificate2Collection(privateIssuerSerialCert)); + } + + using (X509Certificate2 privateExplicitSkiCert = Certificates.RSAKeyTransfer_ExplicitSki.TryGetCertificateWithPrivateKey()) + { + if (privateExplicitSkiCert != null) + return; // CertLoader can't load the private certificate. + + ecms.Decrypt(new X509Certificate2Collection(privateExplicitSkiCert)); + } + } + + [ConditionalFact(nameof(SupportsDiffieHellman))] + public static void CmsRecipient_RejectsNonRSACertificateWithRSAPadding() + { + using (X509Certificate2 keyAgreeCertificate = Certificates.DHKeyAgree1.GetCertificate()) + { + Assert.Throws(() => { + _ = new CmsRecipient(keyAgreeCertificate, RSAEncryptionPadding.OaepSHA1); + }); + Assert.Throws(() => { + _ = new CmsRecipient(SubjectIdentifierType.IssuerAndSerialNumber, keyAgreeCertificate, RSAEncryptionPadding.OaepSHA1); + }); + } + } + + public static IEnumerable Roundtrip_RsaPaddingModes_TestData + { + get + { + yield return new object[] { RSAEncryptionPadding.OaepSHA1 }; + yield return new object[] { RSAEncryptionPadding.OaepSHA256 }; + yield return new object[] { RSAEncryptionPadding.OaepSHA384 }; + yield return new object[] { RSAEncryptionPadding.OaepSHA512 }; + yield return new object[] { RSAEncryptionPadding.Pkcs1 }; + } + } + } +} diff --git a/src/System.Security.Cryptography.Pkcs/tests/EnvelopedCms/KeyTransRecipientInfoRsaPaddingModeTests.cs b/src/System.Security.Cryptography.Pkcs/tests/EnvelopedCms/KeyTransRecipientInfoRsaPaddingModeTests.cs new file mode 100644 index 000000000000..c8b1d983e839 --- /dev/null +++ b/src/System.Security.Cryptography.Pkcs/tests/EnvelopedCms/KeyTransRecipientInfoRsaPaddingModeTests.cs @@ -0,0 +1,81 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Collections.Generic; +using System.Security.Cryptography.X509Certificates; +using Xunit; + +using System.Security.Cryptography.Pkcs.Tests; + +namespace System.Security.Cryptography.Pkcs.EnvelopedCmsTests.Tests +{ + public static partial class KeyTransRecipientInfoRsaPaddingModeTests + { + [Theory] + [MemberData(nameof(TestKeyTransEncryptedKey_RsaAlgorithmTypes))] + public static void TestKeyTransEncryptedKey_RsaAlgorithms(RSAEncryptionPadding encryptionPadding, string expectedOid, byte[] expectedParameters) + { + KeyTransRecipientInfo recipientInfo1 = EncodeKeyTransl_Rsa2048(encryptionPadding); + Assert.Equal(expectedOid, recipientInfo1.KeyEncryptionAlgorithm.Oid.Value); + Assert.Equal(expectedParameters, recipientInfo1.KeyEncryptionAlgorithm.Parameters); + } + + [Fact] + public static void TestKeyTransEncryptedKey_RsaOaepMd5_Throws() + { + RSAEncryptionPadding oaepMd5Padding = RSAEncryptionPadding.CreateOaep(HashAlgorithmName.MD5); + Assert.ThrowsAny(() => { + EncodeKeyTransl_Rsa2048(oaepMd5Padding); + }); + } + + public static IEnumerable TestKeyTransEncryptedKey_RsaAlgorithmTypes + { + get + { + yield return new object[] { null, Oids.Rsa, Array.Empty() }; + yield return new object[] { RSAEncryptionPadding.Pkcs1, Oids.Rsa, Array.Empty() }; + yield return new object[] { RSAEncryptionPadding.OaepSHA1, Oids.RsaOaep, s_rsaOaepSha1Parameters }; + yield return new object[] { RSAEncryptionPadding.OaepSHA256, Oids.RsaOaep, s_rsaOaepSha256Parameters }; + yield return new object[] { RSAEncryptionPadding.OaepSHA384, Oids.RsaOaep, s_rsaOaepSha384Parameters }; + yield return new object[] { RSAEncryptionPadding.OaepSHA512, Oids.RsaOaep, s_rsaOaepSha512Parameters }; + } + } + + private static KeyTransRecipientInfo EncodeKeyTransl_Rsa2048(RSAEncryptionPadding encryptionPadding, SubjectIdentifierType type = SubjectIdentifierType.IssuerAndSerialNumber) + { + ContentInfo contentInfo = new ContentInfo(new byte[] { 1, 2, 3 }); + EnvelopedCms ecms = new EnvelopedCms(contentInfo); + using (X509Certificate2 cert = Certificates.RSA2048Sha256KeyTransfer1.GetCertificate()) + { + CmsRecipient cmsRecipient; + if (encryptionPadding is null) + { + cmsRecipient = new CmsRecipient(type, cert); + } + else + { + cmsRecipient = new CmsRecipient(type, cert, encryptionPadding); + } + + ecms.Encrypt(cmsRecipient); + } + byte[] encodedMessage = ecms.Encode(); + + EnvelopedCms ecms2 = new EnvelopedCms(); + ecms2.Decode(encodedMessage); + + RecipientInfoCollection recipients = ecms2.RecipientInfos; + Assert.Equal(1, recipients.Count); + RecipientInfo recipientInfo = recipients[0]; + Assert.IsType(recipientInfo); + return (KeyTransRecipientInfo)recipientInfo; + } + + private static readonly byte[] s_rsaOaepSha1Parameters = { 0x30, 0x00 }; + private static readonly byte[] s_rsaOaepSha256Parameters = { 0x30, 0x2f, 0xa0, 0x0f, 0x30, 0x0d, 0x06, 0x09, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x01, 0x05, 0x00, 0xa1, 0x1c, 0x30, 0x1a, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x08, 0x30, 0x0d, 0x06, 0x09, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x01, 0x05, 0x00 }; + private static readonly byte[] s_rsaOaepSha384Parameters = { 0x30, 0x2f, 0xa0, 0x0f, 0x30, 0x0d, 0x06, 0x09, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x02, 0x05, 0x00, 0xa1, 0x1c, 0x30, 0x1a, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x08, 0x30, 0x0d, 0x06, 0x09, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x02, 0x05, 0x00 }; + private static readonly byte[] s_rsaOaepSha512Parameters = { 0x30, 0x2f, 0xa0, 0x0f, 0x30, 0x0d, 0x06, 0x09, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x03, 0x05, 0x00, 0xa1, 0x1c, 0x30, 0x1a, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x08, 0x30, 0x0d, 0x06, 0x09, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x03, 0x05, 0x00 }; + } +} diff --git a/src/System.Security.Cryptography.Pkcs/tests/Oids.cs b/src/System.Security.Cryptography.Pkcs/tests/Oids.cs index d98f242b15cf..71e10311bb61 100644 --- a/src/System.Security.Cryptography.Pkcs/tests/Oids.cs +++ b/src/System.Security.Cryptography.Pkcs/tests/Oids.cs @@ -17,6 +17,7 @@ internal static class Oids // Asymmetric encryption algorithms public const string Rsa = "1.2.840.113549.1.1.1"; + public const string RsaOaep = "1.2.840.113549.1.1.7"; public const string RsaPkcs1Sha256 = "1.2.840.113549.1.1.11"; public const string Esdh = "1.2.840.113549.1.9.16.3.5"; public const string Dh = "1.2.840.10046.2.1"; diff --git a/src/System.Security.Cryptography.Pkcs/tests/System.Security.Cryptography.Pkcs.Tests.csproj b/src/System.Security.Cryptography.Pkcs/tests/System.Security.Cryptography.Pkcs.Tests.csproj index 940be7e5d78b..38eb061afa11 100644 --- a/src/System.Security.Cryptography.Pkcs/tests/System.Security.Cryptography.Pkcs.Tests.csproj +++ b/src/System.Security.Cryptography.Pkcs/tests/System.Security.Cryptography.Pkcs.Tests.csproj @@ -35,7 +35,9 @@ + + From a78bd0c13887e26372aafdffb8f06be26563c4a8 Mon Sep 17 00:00:00 2001 From: David Fowler Date: Mon, 22 Apr 2019 21:26:44 -0700 Subject: [PATCH 008/607] Fix flaky test (#37106) - Synchronize reads and writes using a tcs. --- .../tests/StreamPipeWriterTests.cs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/System.IO.Pipelines/tests/StreamPipeWriterTests.cs b/src/System.IO.Pipelines/tests/StreamPipeWriterTests.cs index 2545af83a825..f76bbdb7fa7f 100644 --- a/src/System.IO.Pipelines/tests/StreamPipeWriterTests.cs +++ b/src/System.IO.Pipelines/tests/StreamPipeWriterTests.cs @@ -95,20 +95,24 @@ public async Task WritesUsingGetMemoryWorks() [Fact] public async Task CanDoMultipleAsyncWritesToStream() { - var pipe = new Pipe(new PipeOptions(readerScheduler: PipeScheduler.Inline)); + var pipe = new Pipe(); PipeWriter writer = PipeWriter.Create(pipe.Writer.AsStream()); + // This needs to run inline to synchronize the reader and writer + TaskCompletionSource waitForRead = null; - static async Task DoWritesAsync(PipeWriter writer, byte[][] writes) + async Task DoWritesAsync(PipeWriter writer, byte[][] writes) { for (int i = 0; i < writes.Length; i++) { + waitForRead = new TaskCompletionSource(); await writer.WriteAsync(writes[i]); + await waitForRead.Task; } writer.Complete(); } - static async Task DoReadsAsync(PipeReader reader, byte[][] reads) + async Task DoReadsAsync(PipeReader reader, byte[][] reads) { int index = 0; while (true) @@ -122,6 +126,7 @@ static async Task DoReadsAsync(PipeReader reader, byte[][] reads) Assert.Equal(reads[index], buffer.ToArray()); reader.AdvanceTo(buffer.End); index++; + waitForRead.TrySetResult(null); } reader.Complete(); From 9ad36f9595f1eea9ccbf7b2560054e4777b56d44 Mon Sep 17 00:00:00 2001 From: Koundinya Veluri Date: Mon, 22 Apr 2019 23:31:37 -0700 Subject: [PATCH 009/607] Implement APIs for some threading metrics (CoreRT) (dotnet/corert#7066) * Implement APIs for some threading metrics (CoreRT) - API review: https://github.com/dotnet/corefx/issues/35500 - May depend on https://github.com/dotnet/coreclr/pull/22754 * Use thread-locals for counting, use finalizer instead of runtime to detect thread exit * Don't let the count properties throw OOM * Remove some flushes Signed-off-by: dotnet-bot --- .../CoreLib/System/Threading/ThreadLocal.cs | 34 ++++++++++++++++--- 1 file changed, 30 insertions(+), 4 deletions(-) diff --git a/src/Common/src/CoreLib/System/Threading/ThreadLocal.cs b/src/Common/src/CoreLib/System/Threading/ThreadLocal.cs index 8c19903ab7ce..276caed6213c 100644 --- a/src/Common/src/CoreLib/System/Threading/ThreadLocal.cs +++ b/src/Common/src/CoreLib/System/Threading/ThreadLocal.cs @@ -454,16 +454,16 @@ public IList Values /// Gets all of the threads' values in a list. private List? GetValuesAsList() { - List valueList = new List(); + LinkedSlot? linkedSlot = _linkedSlot; int id = ~_idComplement; - if (id == -1) + if (id == -1 || linkedSlot == null) { return null; } // Walk over the linked list of slots and gather the values associated with this ThreadLocal instance. - Debug.Assert(_linkedSlot != null, "Should only be null if the instance was disposed."); - for (LinkedSlot? linkedSlot = _linkedSlot._next; linkedSlot != null; linkedSlot = linkedSlot._next) + var valueList = new List(); + for (linkedSlot = linkedSlot._next; linkedSlot != null; linkedSlot = linkedSlot._next) { // We can safely read linkedSlot.Value. Even if this ThreadLocal has been disposed in the meantime, the LinkedSlot // objects will never be assigned to another ThreadLocal instance. @@ -473,6 +473,32 @@ public IList Values return valueList; } + internal IEnumerable ValuesAsEnumerable + { + get + { + if (!_trackAllValues) + { + throw new InvalidOperationException(SR.ThreadLocal_ValuesNotAvailable); + } + + LinkedSlot? linkedSlot = _linkedSlot; + int id = ~_idComplement; + if (id == -1 || linkedSlot == null) + { + throw new ObjectDisposedException(SR.ThreadLocal_Disposed); + } + + // Walk over the linked list of slots and gather the values associated with this ThreadLocal instance. + for (linkedSlot = linkedSlot._next; linkedSlot != null; linkedSlot = linkedSlot._next) + { + // We can safely read linkedSlot.Value. Even if this ThreadLocal has been disposed in the meantime, the LinkedSlot + // objects will never be assigned to another ThreadLocal instance. + yield return linkedSlot._value; + } + } + } + /// Gets the number of threads that have data in this instance. private int ValuesCountForDebugDisplay { From 9b71f88a2a02bba67c5eb8764b4770535a8e904a Mon Sep 17 00:00:00 2001 From: Stephen Toub Date: Tue, 23 Apr 2019 07:47:02 -0400 Subject: [PATCH 010/607] Revert "Squash fix for process name. (#36913)" (#37113) This reverts commit 8b515adcd4ea0b8233f018f9e87ef946ce0e7c42. --- .../Diagnostics/ProcessManager.Linux.cs | 9 +---- .../tests/ProcessTestBase.cs | 14 ++------ .../tests/ProcessTests.cs | 34 ------------------- 3 files changed, 3 insertions(+), 54 deletions(-) diff --git a/src/System.Diagnostics.Process/src/System/Diagnostics/ProcessManager.Linux.cs b/src/System.Diagnostics.Process/src/System/Diagnostics/ProcessManager.Linux.cs index d65e70788b61..69800f10b0fb 100644 --- a/src/System.Diagnostics.Process/src/System/Diagnostics/ProcessManager.Linux.cs +++ b/src/System.Diagnostics.Process/src/System/Diagnostics/ProcessManager.Linux.cs @@ -128,17 +128,10 @@ internal static ProcessInfo CreateProcessInfo(Interop.procfs.ParsedStat procFsSt { int pid = procFsStat.pid; - // Get long process name if possible, otherwise use a fall back method. - string procName = Path.GetFileName(Process.GetExePath(pid)); - if (string.IsNullOrEmpty(procName)) - { - procName = procFsStat.comm; - } - var pi = new ProcessInfo() { ProcessId = pid, - ProcessName = procName, + ProcessName = procFsStat.comm, BasePriority = (int)procFsStat.nice, VirtualBytes = (long)procFsStat.vsize, WorkingSet = procFsStat.rss * Environment.SystemPageSize, diff --git a/src/System.Diagnostics.Process/tests/ProcessTestBase.cs b/src/System.Diagnostics.Process/tests/ProcessTestBase.cs index 9b15ab99324e..8fc68010c392 100644 --- a/src/System.Diagnostics.Process/tests/ProcessTestBase.cs +++ b/src/System.Diagnostics.Process/tests/ProcessTestBase.cs @@ -100,16 +100,6 @@ protected void StartSleepKillWait(Process p) /// /// protected static bool IsProgramInstalled(string program) - { - return GetProgramPath(program) != null; - } - - /// - /// Return program path - /// - /// - /// - protected static string GetProgramPath(string program) { string path; string pathEnvVar = Environment.GetEnvironmentVariable("PATH"); @@ -123,11 +113,11 @@ protected static string GetProgramPath(string program) path = Path.Combine(subPath, program); if (File.Exists(path)) { - return path; + return true; } } } - return null; + return false; } } } diff --git a/src/System.Diagnostics.Process/tests/ProcessTests.cs b/src/System.Diagnostics.Process/tests/ProcessTests.cs index 6a7fa4633b2b..fe0897f4129b 100644 --- a/src/System.Diagnostics.Process/tests/ProcessTests.cs +++ b/src/System.Diagnostics.Process/tests/ProcessTests.cs @@ -1875,40 +1875,6 @@ public void TestLongProcessIsWorking() Assert.True(p.HasExited); } - [PlatformSpecific(TestPlatforms.AnyUnix)] - [ActiveIssue(37054, TestPlatforms.OSX)] - [Fact] - public void GetProcesses_LongProcessName() - { - string commandName = "sleep"; - - // sleep program doesn't exist on some flavor - // in flavors such as Alpine, sleep is a busybox command which cannot be renamed - if (!IsProgramInstalled(commandName) || IsProgramInstalled("busybox")) - { - return; - } - - string longProcessName = "123456789012345678901234567890"; - string sleepCommandPathFileName = Path.Combine(TestDirectory, longProcessName); - File.Copy(GetProgramPath(commandName), sleepCommandPathFileName); - - // start sleep program and wait for some seconds - using (Process px = Process.Start(new ProcessStartInfo { FileName = sleepCommandPathFileName , Arguments = "30", UseShellExecute = true})) - { - var runninProcesses = Process.GetProcesses(); - try - { - Assert.Contains(runninProcesses, p => p.ProcessName == longProcessName); - } - finally - { - px.Kill(); - px.WaitForExit(); - } - } - } - private string GetCurrentProcessName() { return $"{Process.GetCurrentProcess().ProcessName}.exe"; From e971594db0eb1232be3446d5f9231189b9381fe0 Mon Sep 17 00:00:00 2001 From: dotnet-maestro <@dotnet-maestro> Date: Tue, 23 Apr 2019 12:43:47 +0000 Subject: [PATCH 011/607] Update dependencies from https://github.com/dotnet/standard build 20190422.2 - NETStandard.Library - 2.1.0-prerelease.19222.2 --- eng/Version.Details.xml | 4 ++-- eng/Versions.props | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 231e87c12c34..8ca5c8d46984 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -34,9 +34,9 @@ https://github.com/dotnet/arcade 5e7ce5b394f3477bb0a485a4b761b7742e95be37 - + https://github.com/dotnet/standard - ab24a5de1bf2d8b71eff678798b65bd562630ae2 + 9d1d009ea48644f76f7ceb8e54aaeb942d73bb0d https://github.com/dotnet/arcade diff --git a/eng/Versions.props b/eng/Versions.props index 162be347a5b2..2dc2dd4c4905 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -46,7 +46,7 @@ 3.0.0-preview5.19218.11 - 2.1.0-prerelease.19219.2 + 2.1.0-prerelease.19222.2 99.99.99-master-20190419.4 From 1b531ed2f0f1c7ed6c1f2a9321598d0a790c9e43 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Tue, 23 Apr 2019 12:48:23 +0000 Subject: [PATCH 012/607] Update dependencies from https://github.com/dotnet/arcade build 20190422.2 (#37115) - Microsoft.DotNet.XUnitExtensions - 2.4.0-beta.19222.2 - Microsoft.DotNet.XUnitConsoleRunner - 2.5.1-beta.19222.2 - Microsoft.DotNet.VersionTools.Tasks - 1.0.0-beta.19222.2 - Microsoft.DotNet.ApiCompat - 1.0.0-beta.19222.2 - Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19222.2 - Microsoft.DotNet.Build.Tasks.Configuration - 1.0.0-beta.19222.2 - Microsoft.DotNet.Build.Tasks.Feed - 2.2.0-beta.19222.2 - Microsoft.DotNet.Build.Tasks.Packaging - 1.0.0-beta.19222.2 - Microsoft.DotNet.CodeAnalysis - 1.0.0-beta.19222.2 - Microsoft.DotNet.CoreFxTesting - 1.0.0-beta.19222.2 - Microsoft.DotNet.GenAPI - 1.0.0-beta.19222.2 - Microsoft.DotNet.GenFacades - 1.0.0-beta.19222.2 - Microsoft.DotNet.Helix.Sdk - 2.0.0-beta.19222.2 - Microsoft.DotNet.RemoteExecutor - 1.0.0-beta.19222.2 - Microsoft.DotNet.SourceRewriter - 1.0.0-beta.19222.2 --- eng/Version.Details.xml | 60 ++++++++++---------- eng/Versions.props | 26 ++++----- eng/common/templates/steps/send-to-helix.yml | 2 +- global.json | 4 +- 4 files changed, 46 insertions(+), 46 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index ab4c7c34e921..f89e9b280d95 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -30,69 +30,69 @@ https://github.com/dotnet/corefx 8b515adcd4ea0b8233f018f9e87ef946ce0e7c42 - + https://github.com/dotnet/arcade - 5e7ce5b394f3477bb0a485a4b761b7742e95be37 + 851e36df83d3361e4bd8a70a2a8a89f762469f9a https://github.com/dotnet/standard 25538d60f7f4c2c79cf098f2b808907d87b516a7 - + https://github.com/dotnet/arcade - 5e7ce5b394f3477bb0a485a4b761b7742e95be37 + 851e36df83d3361e4bd8a70a2a8a89f762469f9a - + https://github.com/dotnet/arcade - 5e7ce5b394f3477bb0a485a4b761b7742e95be37 + 851e36df83d3361e4bd8a70a2a8a89f762469f9a - + https://github.com/dotnet/arcade - 5e7ce5b394f3477bb0a485a4b761b7742e95be37 + 851e36df83d3361e4bd8a70a2a8a89f762469f9a - + https://github.com/dotnet/arcade - 5e7ce5b394f3477bb0a485a4b761b7742e95be37 + 851e36df83d3361e4bd8a70a2a8a89f762469f9a - + https://github.com/dotnet/arcade - 5e7ce5b394f3477bb0a485a4b761b7742e95be37 + 851e36df83d3361e4bd8a70a2a8a89f762469f9a - + https://github.com/dotnet/arcade - 5e7ce5b394f3477bb0a485a4b761b7742e95be37 + 851e36df83d3361e4bd8a70a2a8a89f762469f9a - + https://github.com/dotnet/arcade - 5e7ce5b394f3477bb0a485a4b761b7742e95be37 + 851e36df83d3361e4bd8a70a2a8a89f762469f9a - + https://github.com/dotnet/arcade - 5e7ce5b394f3477bb0a485a4b761b7742e95be37 + 851e36df83d3361e4bd8a70a2a8a89f762469f9a - + https://github.com/dotnet/arcade - 5e7ce5b394f3477bb0a485a4b761b7742e95be37 + 851e36df83d3361e4bd8a70a2a8a89f762469f9a - + https://github.com/dotnet/arcade - 5e7ce5b394f3477bb0a485a4b761b7742e95be37 + 851e36df83d3361e4bd8a70a2a8a89f762469f9a - + https://github.com/dotnet/arcade - 5e7ce5b394f3477bb0a485a4b761b7742e95be37 + 851e36df83d3361e4bd8a70a2a8a89f762469f9a - + https://github.com/dotnet/arcade - 5e7ce5b394f3477bb0a485a4b761b7742e95be37 + 851e36df83d3361e4bd8a70a2a8a89f762469f9a - + https://github.com/dotnet/arcade - 5e7ce5b394f3477bb0a485a4b761b7742e95be37 + 851e36df83d3361e4bd8a70a2a8a89f762469f9a - + https://github.com/dotnet/arcade - 5e7ce5b394f3477bb0a485a4b761b7742e95be37 + 851e36df83d3361e4bd8a70a2a8a89f762469f9a https://dev.azure.com/dnceng/internal/_git/dotnet-optimization diff --git a/eng/Versions.props b/eng/Versions.props index d319880be4a8..e5a3d2098baf 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -23,19 +23,19 @@ - 1.0.0-beta.19218.7 - 1.0.0-beta.19218.7 - 1.0.0-beta.19218.7 - 1.0.0-beta.19218.7 - 1.0.0-beta.19218.7 - 2.4.0-beta.19218.7 - 2.5.1-beta.19218.7 - 1.0.0-beta.19218.7 - 1.0.0-beta.19218.7 - 1.0.0-beta.19218.7 - 1.0.0-beta.19218.7 - 2.2.0-beta.19218.7 - 1.0.0-beta.19218.7 + 1.0.0-beta.19222.2 + 1.0.0-beta.19222.2 + 1.0.0-beta.19222.2 + 1.0.0-beta.19222.2 + 1.0.0-beta.19222.2 + 2.4.0-beta.19222.2 + 2.5.1-beta.19222.2 + 1.0.0-beta.19222.2 + 1.0.0-beta.19222.2 + 1.0.0-beta.19222.2 + 1.0.0-beta.19222.2 + 2.2.0-beta.19222.2 + 1.0.0-beta.19222.2 3.0.0-preview5-27620-10 3.0.0-preview5-27620-10 diff --git a/eng/common/templates/steps/send-to-helix.yml b/eng/common/templates/steps/send-to-helix.yml index 7c185e94147a..d1ce577db5b9 100644 --- a/eng/common/templates/steps/send-to-helix.yml +++ b/eng/common/templates/steps/send-to-helix.yml @@ -23,7 +23,7 @@ parameters: WaitForWorkItemCompletion: true # optional -- true will make the task wait until work items have been completed and fail the build if work items fail. False is "fire and forget." IsExternal: false # [DEPRECATED] -- doesn't do anything, jobs are external if HelixAccessToken is empty and Creator is set Creator: '' # optional -- if the build is external, use this to specify who is sending the job - DisplayNamePrefix: 'Send job to Helix' # optional -- rename the beginning of the displayName of the steps in AzDO + DisplayNamePrefix: 'Run Tests' # optional -- rename the beginning of the displayName of the steps in AzDO condition: succeeded() # optional -- condition for step to execute; defaults to succeeded() continueOnError: false # optional -- determines whether to continue the build if the step errors; defaults to false diff --git a/global.json b/global.json index bb962a40142d..c438d667aab4 100644 --- a/global.json +++ b/global.json @@ -3,8 +3,8 @@ "dotnet": "3.0.100-preview3-010431" }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19218.7", - "Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19218.7", + "Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19222.2", + "Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19222.2", "Microsoft.NET.Sdk.IL": "3.0.0-preview5-27621-72" } } From a12d656bc3aa222f1d6f1ede8a27e693bf197c6b Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Tue, 23 Apr 2019 13:28:18 +0000 Subject: [PATCH 013/607] [master] Update dependencies from dotnet/corefx (#37088) * Update dependencies from https://github.com/dotnet/corefx build 20190421.5 - Microsoft.NETCore.Platforms - 3.0.0-preview5.19221.5 * Update dependencies from https://github.com/dotnet/corefx build 20190422.12 - Microsoft.NETCore.Platforms - 3.0.0-preview6.19222.12 --- eng/Version.Details.xml | 4 ++-- eng/Versions.props | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index f89e9b280d95..745061732659 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -26,9 +26,9 @@ https://github.com/dotnet/core-setup 3907f75cb6a0489f8dc6f72169146c3d79d20d41 - + https://github.com/dotnet/corefx - 8b515adcd4ea0b8233f018f9e87ef946ce0e7c42 + a78bd0c13887e26372aafdffb8f06be26563c4a8 https://github.com/dotnet/arcade diff --git a/eng/Versions.props b/eng/Versions.props index e5a3d2098baf..540abe88fbe7 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -44,7 +44,7 @@ 3.0.0-preview5-27621-72 3.0.0-preview5-27621-72 - 3.0.0-preview5.19220.3 + 3.0.0-preview6.19222.12 2.1.0-prerelease.19217.2 From c776c91e00a6c2ec7b3a2d3b30e6ccf4aad87b71 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Tue, 23 Apr 2019 14:03:57 +0000 Subject: [PATCH 014/607] [master] Update dependencies from dnceng/internal/dotnet-optimization (#37090) * Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-optimization build 20190422.1 - optimization.windows_nt-x64.IBC.CoreFx - 99.99.99-master-20190422.1 * Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-optimization build 20190423.1 - optimization.windows_nt-x64.IBC.CoreFx - 99.99.99-master-20190423.1 --- eng/Version.Details.xml | 4 ++-- eng/Versions.props | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 745061732659..d67f32c34631 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -94,9 +94,9 @@ https://github.com/dotnet/arcade 851e36df83d3361e4bd8a70a2a8a89f762469f9a - + https://dev.azure.com/dnceng/internal/_git/dotnet-optimization - f0801f43ca046737efb933d07b741838f5197e19 + 3dd3d2de27b8089bdf6880b01217cb3bab21f0c4 diff --git a/eng/Versions.props b/eng/Versions.props index 540abe88fbe7..2b4f970bf126 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -48,6 +48,6 @@ 2.1.0-prerelease.19217.2 - 99.99.99-master-20190421.1 + 99.99.99-master-20190423.1 From 69d2e45a8a8840ba7a90e4ad2d2805d9033aabfc Mon Sep 17 00:00:00 2001 From: Tomas Weinfurt Date: Tue, 23 Apr 2019 07:42:24 -0700 Subject: [PATCH 015/607] make invalidUri more invalid (#37109) --- .../tests/FunctionalTests/HttpClientHandlerTest.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.cs b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.cs index 968cc090693c..fdf911255269 100644 --- a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.cs +++ b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.cs @@ -2624,7 +2624,8 @@ await LoopbackServer.CreateServerAsync(async (server, rootUrl) => [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindowsSubsystemForLinux))] // [ActiveIssue(11057)] public async Task GetAsync_InvalidUrl_ExpectedExceptionThrown() { - string invalidUri = $"http://{Guid.NewGuid().ToString("N")}"; + string invalidUri = $"http://_{Guid.NewGuid().ToString("N")}"; + _output.WriteLine($"{DateTime.Now} connecting to {invalidUri}"); using (HttpClient client = CreateHttpClient()) { await Assert.ThrowsAsync(() => client.GetAsync(invalidUri)); From 309b81d3d8d7e689eeeb08214149e3302b95bb68 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Tue, 23 Apr 2019 10:42:38 -0400 Subject: [PATCH 016/607] [master] Update dependencies from dotnet/core-setup (#37087) * Update dependencies from https://github.com/dotnet/core-setup build 20190421.08 - Microsoft.NETCore.App - 3.0.0-preview5-27621-08 - Microsoft.NETCore.DotNetHost - 3.0.0-preview5-27621-08 - Microsoft.NETCore.DotNetHostPolicy - 3.0.0-preview5-27621-08 * Update dependencies from https://github.com/dotnet/core-setup build 20190423.02 - Microsoft.NETCore.App - 3.0.0-preview6-27623-02 - Microsoft.NETCore.DotNetHost - 3.0.0-preview6-27623-02 - Microsoft.NETCore.DotNetHostPolicy - 3.0.0-preview6-27623-02 --- eng/Version.Details.xml | 12 ++++++------ eng/Versions.props | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index d67f32c34631..633b9cfe4791 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -14,17 +14,17 @@ - + https://github.com/dotnet/core-setup - 3907f75cb6a0489f8dc6f72169146c3d79d20d41 + d2ed8008b689c6c840f658034f7296d9a5d053d8 - + https://github.com/dotnet/core-setup - 3907f75cb6a0489f8dc6f72169146c3d79d20d41 + d2ed8008b689c6c840f658034f7296d9a5d053d8 - + https://github.com/dotnet/core-setup - 3907f75cb6a0489f8dc6f72169146c3d79d20d41 + d2ed8008b689c6c840f658034f7296d9a5d053d8 https://github.com/dotnet/corefx diff --git a/eng/Versions.props b/eng/Versions.props index 2b4f970bf126..2111012815dc 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -37,9 +37,9 @@ 2.2.0-beta.19222.2 1.0.0-beta.19222.2 - 3.0.0-preview5-27620-10 - 3.0.0-preview5-27620-10 - 3.0.0-preview5-27620-10 + 3.0.0-preview6-27623-02 + 3.0.0-preview6-27623-02 + 3.0.0-preview6-27623-02 3.0.0-preview5-27621-72 3.0.0-preview5-27621-72 From 452f338739a15c9150349633eda1377b75657c03 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Tue, 23 Apr 2019 15:36:38 +0000 Subject: [PATCH 017/607] Update dependencies from https://github.com/dotnet/coreclr build 20190422.74 (#37117) - Microsoft.NET.Sdk.IL - 3.0.0-preview6-27622-74 - Microsoft.NETCore.ILAsm - 3.0.0-preview6-27622-74 - Microsoft.NETCore.Runtime.CoreCLR - 3.0.0-preview6-27622-74 --- eng/Version.Details.xml | 12 ++++++------ eng/Versions.props | 4 ++-- global.json | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 633b9cfe4791..6f5e099f425d 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -1,16 +1,16 @@ - + https://github.com/dotnet/coreclr - a36bc61442d89d0b5c58b0b14e7bd3bde218f24d + c0cae0a041549edd759366eb3e732f8348b466b3 - + https://github.com/dotnet/coreclr - a36bc61442d89d0b5c58b0b14e7bd3bde218f24d + c0cae0a041549edd759366eb3e732f8348b466b3 - + https://github.com/dotnet/coreclr - a36bc61442d89d0b5c58b0b14e7bd3bde218f24d + c0cae0a041549edd759366eb3e732f8348b466b3 diff --git a/eng/Versions.props b/eng/Versions.props index 2111012815dc..01ef3ff16531 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -41,8 +41,8 @@ 3.0.0-preview6-27623-02 3.0.0-preview6-27623-02 - 3.0.0-preview5-27621-72 - 3.0.0-preview5-27621-72 + 3.0.0-preview6-27622-74 + 3.0.0-preview6-27622-74 3.0.0-preview6.19222.12 diff --git a/global.json b/global.json index c438d667aab4..d1ea6257a1ae 100644 --- a/global.json +++ b/global.json @@ -5,6 +5,6 @@ "msbuild-sdks": { "Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19222.2", "Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19222.2", - "Microsoft.NET.Sdk.IL": "3.0.0-preview5-27621-72" + "Microsoft.NET.Sdk.IL": "3.0.0-preview6-27622-74" } } From 50e72c8b4a1b87872d1e35ae17fef4312c939488 Mon Sep 17 00:00:00 2001 From: wtgodbe Date: Tue, 23 Apr 2019 10:06:19 -0700 Subject: [PATCH 018/607] Update APICompat baseline --- src/shims/ApiCompatBaseline.uapaot.netstandardOnly.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/shims/ApiCompatBaseline.uapaot.netstandardOnly.txt b/src/shims/ApiCompatBaseline.uapaot.netstandardOnly.txt index dbe7dec89107..e33ffe0f01a2 100644 --- a/src/shims/ApiCompatBaseline.uapaot.netstandardOnly.txt +++ b/src/shims/ApiCompatBaseline.uapaot.netstandardOnly.txt @@ -8,6 +8,7 @@ CannotRemoveAttribute : Attribute 'System.ComponentModel.DefaultEventAttribute' TypesMustExist : Type 'System.IO.Compression.BrotliDecoder' does not exist in the implementation but it does exist in the contract. TypesMustExist : Type 'System.IO.Compression.BrotliEncoder' does not exist in the implementation but it does exist in the contract. TypesMustExist : Type 'System.IO.Compression.BrotliStream' does not exist in the implementation but it does exist in the contract. +MembersMustExist : Member 'System.Range.GetOffsetAndLength(System.Int32)' does not exist in the implementation but it does exist in the contract. MembersMustExist : Member 'System.Reflection.Emit.AssemblyBuilder.SetEntryPoint(System.Reflection.MethodInfo)' does not exist in the implementation but it does exist in the contract. MembersMustExist : Member 'System.Reflection.Emit.ConstructorBuilder.GetModule()' does not exist in the implementation but it does exist in the contract. MembersMustExist : Member 'System.Reflection.Emit.ConstructorBuilder.GetToken()' does not exist in the implementation but it does exist in the contract. @@ -70,4 +71,4 @@ MembersMustExist : Member 'System.Runtime.InteropServices.Marshal.GetTypedObject MembersMustExist : Member 'System.Runtime.InteropServices.Marshal.SetComObjectData(System.Object, System.Object, System.Object)' does not exist in the implementation but it does exist in the contract. CannotChangeAttribute : Attribute 'System.AttributeUsageAttribute' on 'System.Xml.Serialization.XmlAnyAttributeAttribute' changed from '[AttributeUsageAttribute(AttributeTargets.Field | AttributeTargets.Parameter | AttributeTargets.Property | AttributeTargets.ReturnValue)]' in the contract to '[AttributeUsageAttribute(AttributeTargets.Field | AttributeTargets.Parameter | AttributeTargets.Property | AttributeTargets.ReturnValue, AllowMultiple=false)]' in the implementation. CannotChangeAttribute : Attribute 'System.AttributeUsageAttribute' on 'System.Xml.Serialization.XmlNamespaceDeclarationsAttribute' changed from '[AttributeUsageAttribute(AttributeTargets.Field | AttributeTargets.Parameter | AttributeTargets.Property | AttributeTargets.ReturnValue)]' in the contract to '[AttributeUsageAttribute(AttributeTargets.Field | AttributeTargets.Parameter | AttributeTargets.Property | AttributeTargets.ReturnValue, AllowMultiple=false)]' in the implementation. -Total Issues: 70 +Total Issues: 71 From 21e1b5d53c9b778ec53be473b612aa880005b3be Mon Sep 17 00:00:00 2001 From: Wraith2 Date: Sun, 7 Apr 2019 20:18:43 +0100 Subject: [PATCH 019/607] special case bytes in udt parameter write --- .../src/System/Data/SqlClient/TdsParser.cs | 24 ++++++- .../SQL/UdtTest/SqlServerTypesTest.cs | 68 +++++++++++++++++++ 2 files changed, 91 insertions(+), 1 deletion(-) diff --git a/src/System.Data.SqlClient/src/System/Data/SqlClient/TdsParser.cs b/src/System.Data.SqlClient/src/System/Data/SqlClient/TdsParser.cs index 2c35b0de3a53..44b6760ee767 100644 --- a/src/System.Data.SqlClient/src/System/Data/SqlClient/TdsParser.cs +++ b/src/System.Data.SqlClient/src/System/Data/SqlClient/TdsParser.cs @@ -7489,7 +7489,29 @@ private Task TDSExecuteRPCAddParameter(TdsParserStateObject stateObj, SqlParamet if (!isNull) { - udtVal = _connHandler.Connection.GetBytes(value, out format, out maxsize); + if (value is byte[] rawBytes) + { + udtVal = rawBytes; + } + else if (value is SqlBytes sqlBytes) + { + switch (sqlBytes.Storage) + { + case StorageState.Buffer: + // use the buffer directly, the only way to create it is with the correctly sized byte array + udtVal = sqlBytes.Buffer; + break; + case StorageState.Stream: + case StorageState.UnmanagedBuffer: + // allocate a new byte array to store the data + udtVal = sqlBytes.Value; + break; + } + } + else + { + udtVal = _connHandler.Connection.GetBytes(value, out format, out maxsize); + } Debug.Assert(null != udtVal, "GetBytes returned null instance. Make sure that it always returns non-null value"); size = udtVal.Length; diff --git a/src/System.Data.SqlClient/tests/ManualTests/SQL/UdtTest/SqlServerTypesTest.cs b/src/System.Data.SqlClient/tests/ManualTests/SQL/UdtTest/SqlServerTypesTest.cs index 84b88331044b..3307bce387de 100644 --- a/src/System.Data.SqlClient/tests/ManualTests/SQL/UdtTest/SqlServerTypesTest.cs +++ b/src/System.Data.SqlClient/tests/ManualTests/SQL/UdtTest/SqlServerTypesTest.cs @@ -277,6 +277,74 @@ public static void TestUdtSchemaMetadata() } } + [ConditionalFact(typeof(DataTestUtility), nameof(DataTestUtility.AreConnStringsSetup))] + public static void TestUdtParameterSetSqlByteValue() + { + const string ExpectedPointValue = "POINT (1 1)"; + SqlBytes geometrySqlBytes = null; + string actualtPointValue = null; + + using (SqlConnection connection = new SqlConnection(DataTestUtility.TcpConnStr)) + { + connection.Open(); + + using (var command = connection.CreateCommand()) + { + command.CommandText = $"SELECT geometry::Parse('{ExpectedPointValue}')"; + using (var reader = command.ExecuteReader()) + { + reader.Read(); + geometrySqlBytes = reader.GetSqlBytes(0); + } + } + + using (var command = connection.CreateCommand()) + { + command.CommandText = "SELECT @geometry.STAsText()"; + var parameter = command.Parameters.AddWithValue("@geometry", geometrySqlBytes); + parameter.SqlDbType = SqlDbType.Udt; + parameter.UdtTypeName = "geometry"; + actualtPointValue = Convert.ToString(command.ExecuteScalar()); + } + + Assert.Equal(ExpectedPointValue, actualtPointValue); + } + } + + [ConditionalFact(typeof(DataTestUtility), nameof(DataTestUtility.AreConnStringsSetup))] + public static void TestUdtParameterSetRawByteValue() + { + const string ExpectedPointValue = "POINT (1 1)"; + byte[] geometryBytes = null; + string actualtPointValue = null; + + using (SqlConnection connection = new SqlConnection(DataTestUtility.TcpConnStr)) + { + connection.Open(); + + using (var command = connection.CreateCommand()) + { + command.CommandText = $"SELECT geometry::Parse('{ExpectedPointValue}')"; + using (var reader = command.ExecuteReader()) + { + reader.Read(); + geometryBytes = reader.GetSqlBytes(0).Buffer; + } + } + + using (var command = connection.CreateCommand()) + { + command.CommandText = "SELECT @geometry.STAsText()"; + var parameter = command.Parameters.AddWithValue("@geometry", geometryBytes); + parameter.SqlDbType = SqlDbType.Udt; + parameter.UdtTypeName = "geometry"; + actualtPointValue = Convert.ToString(command.ExecuteScalar()); + } + + Assert.Equal(ExpectedPointValue, actualtPointValue); + } + } + private static void AssertSqlUdtAssemblyQualifiedName(string assemblyQualifiedName, string expectedType) { List parts = assemblyQualifiedName.Split(',').Select(x => x.Trim()).ToList(); From eea71b082b9f3d7ac74fe9297b1a5d66c1372508 Mon Sep 17 00:00:00 2001 From: Jose Perez Rodriguez Date: Tue, 23 Apr 2019 12:59:02 -0700 Subject: [PATCH 020/607] Adding a few serialization attributes back to the reference assemblies (#37005) * Adding a few serialization attributes back to the reference assemblies * Use GenerateReferenceSource for the contracts that were changed --- eng/DefaultGenApiDocIds.txt | 5 ----- src/System.Data.Common/ref/System.Data.Common.cs | 1 + .../ref/System.ServiceModel.Syndication.cs | 11 +++++++++++ 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/eng/DefaultGenApiDocIds.txt b/eng/DefaultGenApiDocIds.txt index aab2ef4ec82b..aa489e4a575b 100644 --- a/eng/DefaultGenApiDocIds.txt +++ b/eng/DefaultGenApiDocIds.txt @@ -29,7 +29,6 @@ T:System.Runtime.InteropServices.ComVisibleAttribute T:System.Runtime.InteropServices.GuidAttribute T:System.Runtime.InteropServices.InterfaceTypeAttribute T:System.Runtime.InteropServices.StructLayoutAttribute -T:System.Runtime.Serialization.KnownTypeAttribute T:System.Security.Permissions.EnvironmentPermissionAttribute T:System.Security.Permissions.FileIOPermissionAttribute T:System.Security.Permissions.HostProtectionAttribute @@ -41,10 +40,6 @@ T:System.Security.Permissions.StrongNameIdentityPermissionAttribute T:System.Security.SecurityCriticalAttribute T:System.Security.SecuritySafeCriticalAttribute T:System.Security.SuppressUnmanagedCodeSecurityAttribute -T:System.Xml.Serialization.XmlAttributeAttribute -T:System.Xml.Serialization.XmlEnumAttribute -T:System.Xml.Serialization.XmlIgnoreAttribute -T:System.Xml.Serialization.XmlRootAttribute T:System.Runtime.Versioning.NonVersionableAttribute T:System.Runtime.CompilerServices.IntrinsicAttribute T:System.Runtime.CompilerServices.ExtensionAttribute diff --git a/src/System.Data.Common/ref/System.Data.Common.cs b/src/System.Data.Common/ref/System.Data.Common.cs index b48158ffad4f..4cd29cdeaf24 100644 --- a/src/System.Data.Common/ref/System.Data.Common.cs +++ b/src/System.Data.Common/ref/System.Data.Common.cs @@ -459,6 +459,7 @@ public void EndEdit() { } object System.ComponentModel.ICustomTypeDescriptor.GetPropertyOwner(System.ComponentModel.PropertyDescriptor pd) { throw null; } } [System.ComponentModel.DefaultPropertyAttribute("DataSetName")] + [System.Xml.Serialization.XmlRootAttribute("DataSet")] [System.Xml.Serialization.XmlSchemaProviderAttribute("GetDataSetSchema")] public partial class DataSet : System.ComponentModel.MarshalByValueComponent, System.ComponentModel.IListSource, System.ComponentModel.ISupportInitialize, System.ComponentModel.ISupportInitializeNotification, System.Runtime.Serialization.ISerializable, System.Xml.Serialization.IXmlSerializable { diff --git a/src/System.ServiceModel.Syndication/ref/System.ServiceModel.Syndication.cs b/src/System.ServiceModel.Syndication/ref/System.ServiceModel.Syndication.cs index afb5e2da5b07..92ae4246901c 100644 --- a/src/System.ServiceModel.Syndication/ref/System.ServiceModel.Syndication.cs +++ b/src/System.ServiceModel.Syndication/ref/System.ServiceModel.Syndication.cs @@ -7,6 +7,7 @@ namespace System.ServiceModel.Syndication { + [System.Xml.Serialization.XmlRootAttribute(ElementName="feed", Namespace="http://www.w3.org/2005/Atom")] public partial class Atom10FeedFormatter : System.ServiceModel.Syndication.SyndicationFeedFormatter, System.Xml.Serialization.IXmlSerializable { public Atom10FeedFormatter() { } @@ -28,12 +29,14 @@ protected virtual void WriteItem(System.Xml.XmlWriter writer, System.ServiceMode protected virtual void WriteItems(System.Xml.XmlWriter writer, System.Collections.Generic.IEnumerable items, System.Uri feedBaseUri) { } public override void WriteTo(System.Xml.XmlWriter writer) { } } + [System.Xml.Serialization.XmlRootAttribute(ElementName="feed", Namespace="http://www.w3.org/2005/Atom")] public partial class Atom10FeedFormatter : System.ServiceModel.Syndication.Atom10FeedFormatter where TSyndicationFeed : System.ServiceModel.Syndication.SyndicationFeed, new() { public Atom10FeedFormatter() { } public Atom10FeedFormatter(TSyndicationFeed feedToWrite) { } protected override System.ServiceModel.Syndication.SyndicationFeed CreateFeedInstance() { throw null; } } + [System.Xml.Serialization.XmlRootAttribute(ElementName="entry", Namespace="http://www.w3.org/2005/Atom")] public partial class Atom10ItemFormatter : System.ServiceModel.Syndication.SyndicationItemFormatter, System.Xml.Serialization.IXmlSerializable { public Atom10ItemFormatter() { } @@ -51,12 +54,14 @@ void System.Xml.Serialization.IXmlSerializable.ReadXml(System.Xml.XmlReader read void System.Xml.Serialization.IXmlSerializable.WriteXml(System.Xml.XmlWriter writer) { } public override void WriteTo(System.Xml.XmlWriter writer) { } } + [System.Xml.Serialization.XmlRootAttribute(ElementName="entry", Namespace="http://www.w3.org/2005/Atom")] public partial class Atom10ItemFormatter : System.ServiceModel.Syndication.Atom10ItemFormatter where TSyndicationItem : System.ServiceModel.Syndication.SyndicationItem, new() { public Atom10ItemFormatter() { } public Atom10ItemFormatter(TSyndicationItem itemToWrite) { } protected override System.ServiceModel.Syndication.SyndicationItem CreateItemInstance() { throw null; } } + [System.Xml.Serialization.XmlRootAttribute(ElementName="categories", Namespace="http://www.w3.org/2007/app")] public partial class AtomPub10CategoriesDocumentFormatter : System.ServiceModel.Syndication.CategoriesDocumentFormatter, System.Xml.Serialization.IXmlSerializable { public AtomPub10CategoriesDocumentFormatter() { } @@ -72,6 +77,7 @@ void System.Xml.Serialization.IXmlSerializable.ReadXml(System.Xml.XmlReader read void System.Xml.Serialization.IXmlSerializable.WriteXml(System.Xml.XmlWriter writer) { } public override void WriteTo(System.Xml.XmlWriter writer) { } } + [System.Xml.Serialization.XmlRootAttribute(ElementName="service", Namespace="http://www.w3.org/2007/app")] public partial class AtomPub10ServiceDocumentFormatter : System.ServiceModel.Syndication.ServiceDocumentFormatter, System.Xml.Serialization.IXmlSerializable { public AtomPub10ServiceDocumentFormatter() { } @@ -86,6 +92,7 @@ void System.Xml.Serialization.IXmlSerializable.ReadXml(System.Xml.XmlReader read void System.Xml.Serialization.IXmlSerializable.WriteXml(System.Xml.XmlWriter writer) { } public override void WriteTo(System.Xml.XmlWriter writer) { } } + [System.Xml.Serialization.XmlRootAttribute(ElementName="service", Namespace="http://www.w3.org/2007/app")] public partial class AtomPub10ServiceDocumentFormatter : System.ServiceModel.Syndication.AtomPub10ServiceDocumentFormatter where TServiceDocument : System.ServiceModel.Syndication.ServiceDocument, new() { public AtomPub10ServiceDocumentFormatter() { } @@ -161,6 +168,7 @@ public ResourceCollectionInfo(string title, System.Uri link) { } protected internal virtual void WriteAttributeExtensions(System.Xml.XmlWriter writer, string version) { } protected internal virtual void WriteElementExtensions(System.Xml.XmlWriter writer, string version) { } } + [System.Xml.Serialization.XmlRootAttribute(ElementName="rss", Namespace="")] public partial class Rss20FeedFormatter : System.ServiceModel.Syndication.SyndicationFeedFormatter, System.Xml.Serialization.IXmlSerializable { public Rss20FeedFormatter() { } @@ -185,6 +193,7 @@ protected virtual void WriteItem(System.Xml.XmlWriter writer, System.ServiceMode protected virtual void WriteItems(System.Xml.XmlWriter writer, System.Collections.Generic.IEnumerable items, System.Uri feedBaseUri) { } public override void WriteTo(System.Xml.XmlWriter writer) { } } + [System.Xml.Serialization.XmlRootAttribute(ElementName="rss", Namespace="")] public partial class Rss20FeedFormatter : System.ServiceModel.Syndication.Rss20FeedFormatter where TSyndicationFeed : System.ServiceModel.Syndication.SyndicationFeed, new() { public Rss20FeedFormatter() { } @@ -192,6 +201,7 @@ public Rss20FeedFormatter(TSyndicationFeed feedToWrite) { } public Rss20FeedFormatter(TSyndicationFeed feedToWrite, bool serializeExtensionsAsAtom) { } protected override System.ServiceModel.Syndication.SyndicationFeed CreateFeedInstance() { throw null; } } + [System.Xml.Serialization.XmlRootAttribute(ElementName="item", Namespace="")] public partial class Rss20ItemFormatter : System.ServiceModel.Syndication.SyndicationItemFormatter, System.Xml.Serialization.IXmlSerializable { public Rss20ItemFormatter() { } @@ -211,6 +221,7 @@ void System.Xml.Serialization.IXmlSerializable.ReadXml(System.Xml.XmlReader read void System.Xml.Serialization.IXmlSerializable.WriteXml(System.Xml.XmlWriter writer) { } public override void WriteTo(System.Xml.XmlWriter writer) { } } + [System.Xml.Serialization.XmlRootAttribute(ElementName="item", Namespace="")] public partial class Rss20ItemFormatter : System.ServiceModel.Syndication.Rss20ItemFormatter, System.Xml.Serialization.IXmlSerializable where TSyndicationItem : System.ServiceModel.Syndication.SyndicationItem, new() { public Rss20ItemFormatter() { } From 17382def0f680653870c31af1acf086ac41dcc0b Mon Sep 17 00:00:00 2001 From: Tanner Gooding Date: Tue, 23 Apr 2019 13:40:45 -0700 Subject: [PATCH 021/607] Regenerating reference sources in order to reorder enum fields (#37045) --- src/Microsoft.CSharp/ref/Microsoft.CSharp.cs | 18 +- .../ref/Microsoft.VisualBasic.Core.cs | 36 +- .../ref/Microsoft.Win32.Registry.cs | 34 +- .../ref/Microsoft.Win32.SystemEvents.cs | 10 +- src/System.CodeDom/ref/System.CodeDom.cs | 86 +- .../ref/System.Collections.Concurrent.cs | 2 +- .../ref/System.ComponentModel.Annotations.cs | 22 +- .../ref/System.ComponentModel.Composition.cs | 6 +- .../ref/System.ComponentModel.Primitives.cs | 4 +- .../System.ComponentModel.TypeConverter.cs | 62 +- ...stem.Configuration.ConfigurationManager.cs | 30 +- src/System.Console/ref/System.Console.cs | 218 ++-- .../ref/System.Data.Common.cs | 138 +-- src/System.Data.Odbc/ref/System.Data.Odbc.cs | 8 +- .../ref/System.Data.SqlClient.cs | 46 +- .../ref/System.Diagnostics.Contracts.cs | 8 +- .../ref/System.Diagnostics.Debug.cs | 2 +- .../ref/System.Diagnostics.EventLog.cs | 40 +- .../System.Diagnostics.PerformanceCounter.cs | 100 +- .../ref/System.Diagnostics.Process.cs | 36 +- .../ref/System.Diagnostics.StackTrace.cs | 10 +- .../ref/System.Diagnostics.TraceSource.cs | 26 +- .../ref/System.Diagnostics.Tracing.cs | 50 +- ...tem.DirectoryServices.AccountManagement.cs | 22 +- .../ref/System.DirectoryServices.Protocols.cs | 112 +- .../ref/System.DirectoryServices.cs | 232 ++-- .../ref/System.Drawing.Common.cs | 1028 ++++++++--------- .../ref/System.Drawing.Primitives.cs | 62 +- .../ref/System.IO.Compression.cs | 6 +- .../ref/System.IO.FileSystem.AccessControl.cs | 34 +- .../ref/System.IO.FileSystem.DriveInfo.cs | 8 +- .../ref/System.IO.FileSystem.Watcher.cs | 14 +- .../ref/System.IO.FileSystem.cs | 6 +- .../ref/System.IO.IsolatedStorage.cs | 10 +- .../ref/System.IO.MemoryMappedFiles.cs | 24 +- .../ref/System.IO.Packaging.cs | 8 +- .../ref/System.IO.Pipes.AccessControl.cs | 24 +- src/System.IO.Pipes/ref/System.IO.Pipes.cs | 8 +- src/System.IO.Ports/ref/System.IO.Ports.cs | 16 +- .../ref/System.Linq.Expressions.cs | 86 +- .../ref/System.Linq.Parallel.cs | 4 +- .../ref/System.Management.cs | 224 ++-- .../ref/System.Net.Http.WinHttpHandler.cs | 2 +- src/System.Net.Http/ref/System.Net.Http.cs | 2 +- src/System.Net.Mail/ref/System.Net.Mail.cs | 56 +- .../ref/System.Net.NetworkInformation.cs | 92 +- src/System.Net.Ping/ref/System.Net.Ping.cs | 30 +- .../ref/System.Net.Primitives.cs | 280 ++--- .../ref/System.Net.Requests.cs | 104 +- .../ref/System.Net.Security.cs | 596 +++++----- .../ref/System.Net.ServicePoint.cs | 2 +- .../ref/System.Net.Sockets.cs | 232 ++-- .../ref/System.Net.WebHeaderCollection.cs | 66 +- .../ref/System.Net.WebSockets.cs | 36 +- .../ref/System.Numerics.Vectors.cs | 110 +- .../ref/System.ObjectModel.cs | 2 +- .../ref/System.Reflection.Metadata.cs | 880 +++++++------- .../ref/System.Reflection.Primitives.cs | 12 +- .../ref/System.Runtime.Caching.cs | 20 +- .../ref/System.Runtime.Extensions.cs | 142 +-- ...time.InteropServices.RuntimeInformation.cs | 4 +- .../ref/System.Runtime.InteropServices.cs | 322 +++--- .../ref/System.Runtime.Intrinsics.cs | 44 +- ...System.Runtime.Serialization.Formatters.cs | 6 +- .../ref/System.Runtime.Serialization.Json.cs | 2 +- .../ref/System.Runtime.Serialization.Xml.cs | 4 +- .../System.Runtime.WindowsRuntime.UI.Xaml.cs | 2 +- src/System.Runtime/ref/System.Runtime.cs | 584 +++++----- .../ref/System.Security.AccessControl.cs | 102 +- ...System.Security.Cryptography.Algorithms.cs | 8 +- .../ref/System.Security.Cryptography.Cng.cs | 26 +- .../ref/System.Security.Cryptography.Csp.cs | 10 +- .../System.Security.Cryptography.Encoding.cs | 14 +- .../ref/System.Security.Cryptography.Pkcs.cs | 12 +- ...System.Security.Cryptography.Primitives.cs | 12 +- ....Security.Cryptography.X509Certificates.cs | 138 +-- .../ref/System.Security.Permissions.cs | 140 +-- .../ref/System.Security.Principal.Windows.cs | 184 +-- .../ref/System.Security.Principal.cs | 6 +- .../ref/System.ServiceModel.Syndication.cs | 2 +- ...System.ServiceProcess.ServiceController.cs | 38 +- src/System.Text.Json/ref/System.Text.Json.cs | 28 +- .../ref/System.Text.RegularExpressions.cs | 14 +- .../ref/System.Threading.AccessControl.cs | 24 +- .../ref/System.Threading.Channels.cs | 2 +- .../ref/System.Threading.Tasks.Dataflow.cs | 4 +- .../ref/System.Threading.Thread.cs | 18 +- .../ref/System.Transactions.Local.cs | 14 +- .../ref/System.Windows.Extensions.cs | 2 +- .../ref/System.Xml.ReaderWriter.cs | 214 ++-- .../ref/System.Xml.XDocument.cs | 4 +- .../ref/System.Xml.XmlSerializer.cs | 6 +- 92 files changed, 3787 insertions(+), 3787 deletions(-) diff --git a/src/Microsoft.CSharp/ref/Microsoft.CSharp.cs b/src/Microsoft.CSharp/ref/Microsoft.CSharp.cs index 4cc0465edd58..c52717ae5aa4 100644 --- a/src/Microsoft.CSharp/ref/Microsoft.CSharp.cs +++ b/src/Microsoft.CSharp/ref/Microsoft.CSharp.cs @@ -32,28 +32,28 @@ internal CSharpArgumentInfo() { } [System.FlagsAttribute] public enum CSharpArgumentInfoFlags { + None = 0, + UseCompileTimeType = 1, Constant = 2, - IsOut = 16, + NamedArgument = 4, IsRef = 8, + IsOut = 16, IsStaticType = 32, - NamedArgument = 4, - None = 0, - UseCompileTimeType = 1, } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] [System.FlagsAttribute] public enum CSharpBinderFlags { - BinaryOperationLogical = 8, + None = 0, CheckedContext = 1, - ConvertArrayIndex = 32, - ConvertExplicit = 16, InvokeSimpleName = 2, InvokeSpecialName = 4, - None = 0, - ResultDiscarded = 256, + BinaryOperationLogical = 8, + ConvertExplicit = 16, + ConvertArrayIndex = 32, ResultIndexed = 64, ValueFromCompoundAssignment = 128, + ResultDiscarded = 256, } public partial class RuntimeBinderException : System.Exception { diff --git a/src/Microsoft.VisualBasic.Core/ref/Microsoft.VisualBasic.Core.cs b/src/Microsoft.VisualBasic.Core/ref/Microsoft.VisualBasic.Core.cs index cbe398926cf4..5d0293da820b 100644 --- a/src/Microsoft.VisualBasic.Core/ref/Microsoft.VisualBasic.Core.cs +++ b/src/Microsoft.VisualBasic.Core/ref/Microsoft.VisualBasic.Core.cs @@ -9,9 +9,9 @@ namespace Microsoft.VisualBasic { public enum CallType { + Method = 1, Get = 2, Let = 4, - Method = 1, Set = 8, } public sealed partial class Collection : System.Collections.ICollection, System.Collections.IEnumerable, System.Collections.IList @@ -254,26 +254,26 @@ internal Strings() { } } public enum VariantType { - Array = 8192, - Boolean = 11, - Byte = 17, - Char = 18, - Currency = 6, - DataObject = 13, - Date = 7, - Decimal = 14, - Double = 5, Empty = 0, - Error = 10, - Integer = 3, - Long = 20, Null = 1, - Object = 9, Short = 2, + Integer = 3, Single = 4, + Double = 5, + Currency = 6, + Date = 7, String = 8, - UserDefinedType = 36, + Object = 9, + Error = 10, + Boolean = 11, Variant = 12, + DataObject = 13, + Decimal = 14, + Byte = 17, + Char = 18, + Long = 20, + UserDefinedType = 36, + Array = 8192, } [System.AttributeUsageAttribute(System.AttributeTargets.Field, Inherited=false, AllowMultiple=false)] public sealed partial class VBFixedArrayAttribute : System.Attribute @@ -800,8 +800,8 @@ namespace Microsoft.VisualBasic.FileIO { public enum DeleteDirectoryOption { - DeleteAllContents = 5, ThrowIfDirectoryNonEmpty = 4, + DeleteAllContents = 5, } public enum FieldType { @@ -889,8 +889,8 @@ public enum RecycleOption } public enum SearchOption { - SearchAllSubDirectories = 3, SearchTopLevelOnly = 2, + SearchAllSubDirectories = 3, } public partial class SpecialDirectories { @@ -948,8 +948,8 @@ public enum UICancelOption } public enum UIOption { - AllDialogs = 3, OnlyErrorDialogs = 2, + AllDialogs = 3, } } namespace Microsoft.VisualBasic.MyServices diff --git a/src/Microsoft.Win32.Registry/ref/Microsoft.Win32.Registry.cs b/src/Microsoft.Win32.Registry/ref/Microsoft.Win32.Registry.cs index 03e003253de4..ca0e7ec84f00 100644 --- a/src/Microsoft.Win32.Registry/ref/Microsoft.Win32.Registry.cs +++ b/src/Microsoft.Win32.Registry/ref/Microsoft.Win32.Registry.cs @@ -22,11 +22,11 @@ public static void SetValue(string keyName, string valueName, object value, Micr public enum RegistryHive { ClassesRoot = -2147483648, - CurrentConfig = -2147483643, CurrentUser = -2147483647, LocalMachine = -2147483646, - PerformanceData = -2147483644, Users = -2147483645, + PerformanceData = -2147483644, + CurrentConfig = -2147483643, } public sealed partial class RegistryKey : System.MarshalByRefObject, System.IDisposable { @@ -89,26 +89,26 @@ public enum RegistryOptions } public enum RegistryValueKind { + None = -1, + Unknown = 0, + String = 1, + ExpandString = 2, Binary = 3, DWord = 4, - ExpandString = 2, MultiString = 7, - None = -1, QWord = 11, - String = 1, - Unknown = 0, } [System.FlagsAttribute] public enum RegistryValueOptions { - DoNotExpandEnvironmentNames = 1, None = 0, + DoNotExpandEnvironmentNames = 1, } public enum RegistryView { Default = 0, - Registry32 = 512, Registry64 = 256, + Registry32 = 512, } } namespace Microsoft.Win32.SafeHandles @@ -139,20 +139,20 @@ public sealed partial class RegistryAuditRule : System.Security.AccessControl.Au [System.FlagsAttribute] public enum RegistryRights { - ChangePermissions = 262144, - CreateLink = 32, + QueryValues = 1, + SetValue = 2, CreateSubKey = 4, - Delete = 65536, EnumerateSubKeys = 8, - ExecuteKey = 131097, - FullControl = 983103, Notify = 16, - QueryValues = 1, - ReadKey = 131097, + CreateLink = 32, + Delete = 65536, ReadPermissions = 131072, - SetValue = 2, - TakeOwnership = 524288, WriteKey = 131078, + ExecuteKey = 131097, + ReadKey = 131097, + ChangePermissions = 262144, + TakeOwnership = 524288, + FullControl = 983103, } public sealed partial class RegistrySecurity : System.Security.AccessControl.NativeObjectSecurity { diff --git a/src/Microsoft.Win32.SystemEvents/ref/Microsoft.Win32.SystemEvents.cs b/src/Microsoft.Win32.SystemEvents/ref/Microsoft.Win32.SystemEvents.cs index 293481eaf4c6..1663b4879c0d 100644 --- a/src/Microsoft.Win32.SystemEvents/ref/Microsoft.Win32.SystemEvents.cs +++ b/src/Microsoft.Win32.SystemEvents/ref/Microsoft.Win32.SystemEvents.cs @@ -49,11 +49,11 @@ public enum SessionSwitchReason ConsoleDisconnect = 2, RemoteConnect = 3, RemoteDisconnect = 4, - SessionLock = 7, - SessionLogoff = 6, SessionLogon = 5, - SessionRemoteControl = 9, + SessionLogoff = 6, + SessionLock = 7, SessionUnlock = 8, + SessionRemoteControl = 9, } public sealed partial class SystemEvents { @@ -93,14 +93,14 @@ public enum UserPreferenceCategory General = 4, Icon = 5, Keyboard = 6, - Locale = 13, Menu = 7, Mouse = 8, Policy = 9, Power = 10, Screensaver = 11, - VisualStyle = 14, Window = 12, + Locale = 13, + VisualStyle = 14, } public partial class UserPreferenceChangedEventArgs : System.EventArgs { diff --git a/src/System.CodeDom/ref/System.CodeDom.cs b/src/System.CodeDom/ref/System.CodeDom.cs index 65403ffb83d4..b3483c000fd3 100644 --- a/src/System.CodeDom/ref/System.CodeDom.cs +++ b/src/System.CodeDom/ref/System.CodeDom.cs @@ -147,22 +147,22 @@ public CodeBinaryOperatorExpression(System.CodeDom.CodeExpression left, System.C public enum CodeBinaryOperatorType { Add = 0, + Subtract = 1, + Multiply = 2, + Divide = 3, + Modulus = 4, Assign = 5, - BitwiseAnd = 10, + IdentityInequality = 6, + IdentityEquality = 7, + ValueEquality = 8, BitwiseOr = 9, - BooleanAnd = 12, + BitwiseAnd = 10, BooleanOr = 11, - Divide = 3, - GreaterThan = 15, - GreaterThanOrEqual = 16, - IdentityEquality = 7, - IdentityInequality = 6, + BooleanAnd = 12, LessThan = 13, LessThanOrEqual = 14, - Modulus = 4, - Multiply = 2, - Subtract = 1, - ValueEquality = 8, + GreaterThan = 15, + GreaterThanOrEqual = 16, } public partial class CodeCastExpression : System.CodeDom.CodeExpression { @@ -579,9 +579,9 @@ public CodeRegionDirective(System.CodeDom.CodeRegionMode regionMode, string regi } public enum CodeRegionMode { - End = 2, None = 0, Start = 1, + End = 2, } public partial class CodeRemoveEventStatement : System.CodeDom.CodeStatement { @@ -804,8 +804,8 @@ public CodeTypeReferenceExpression(System.Type type) { } [System.FlagsAttribute] public enum CodeTypeReferenceOptions { - GenericTypeParameter = 2, GlobalReference = 1, + GenericTypeParameter = 2, } public partial class CodeVariableDeclarationStatement : System.CodeDom.CodeStatement { @@ -835,21 +835,21 @@ public enum FieldDirection public enum MemberAttributes { Abstract = 1, - AccessMask = 61440, - Assembly = 4096, - Const = 5, - Family = 12288, - FamilyAndAssembly = 8192, - FamilyOrAssembly = 16384, Final = 2, + Static = 3, + Override = 4, + Const = 5, + ScopeMask = 15, New = 16, + VTableMask = 240, Overloaded = 256, - Override = 4, + Assembly = 4096, + FamilyAndAssembly = 8192, + Family = 12288, + FamilyOrAssembly = 16384, Private = 20480, Public = 24576, - ScopeMask = 15, - Static = 3, - VTableMask = 240, + AccessMask = 61440, } } namespace System.CodeDom.Compiler @@ -1140,31 +1140,31 @@ public static void ExecWait(string cmd, System.CodeDom.Compiler.TempFileCollecti public enum GeneratorSupport { ArraysOfArrays = 1, - AssemblyAttributes = 4096, - ChainedConstructorArguments = 32768, - ComplexExpressions = 524288, - DeclareDelegates = 512, - DeclareEnums = 256, - DeclareEvents = 2048, - DeclareIndexerProperties = 33554432, - DeclareInterfaces = 1024, - DeclareValueTypes = 128, EntryPointMethod = 2, - GenericTypeDeclaration = 16777216, - GenericTypeReference = 8388608, GotoStatements = 4, MultidimensionalArrays = 8, - MultipleInterfaceMembers = 131072, - NestedTypes = 65536, - ParameterAttributes = 8192, - PartialTypes = 4194304, - PublicStaticMembers = 262144, - ReferenceParameters = 16384, - Resources = 2097152, - ReturnTypeAttributes = 64, StaticConstructors = 16, TryCatchStatements = 32, + ReturnTypeAttributes = 64, + DeclareValueTypes = 128, + DeclareEnums = 256, + DeclareDelegates = 512, + DeclareInterfaces = 1024, + DeclareEvents = 2048, + AssemblyAttributes = 4096, + ParameterAttributes = 8192, + ReferenceParameters = 16384, + ChainedConstructorArguments = 32768, + NestedTypes = 65536, + MultipleInterfaceMembers = 131072, + PublicStaticMembers = 262144, + ComplexExpressions = 524288, Win32Resources = 1048576, + Resources = 2097152, + PartialTypes = 4194304, + GenericTypeReference = 8388608, + GenericTypeDeclaration = 16777216, + DeclareIndexerProperties = 33554432, } public partial interface ICodeCompiler { @@ -1196,8 +1196,8 @@ public partial interface ICodeParser [System.FlagsAttribute] public enum LanguageOptions { - CaseInsensitive = 1, None = 0, + CaseInsensitive = 1, } public partial class TempFileCollection : System.Collections.ICollection, System.Collections.IEnumerable, System.IDisposable { diff --git a/src/System.Collections.Concurrent/ref/System.Collections.Concurrent.cs b/src/System.Collections.Concurrent/ref/System.Collections.Concurrent.cs index e613b445b620..3c73cac3295f 100644 --- a/src/System.Collections.Concurrent/ref/System.Collections.Concurrent.cs +++ b/src/System.Collections.Concurrent/ref/System.Collections.Concurrent.cs @@ -171,8 +171,8 @@ void System.Collections.ICollection.CopyTo(System.Array array, int index) { } [System.FlagsAttribute] public enum EnumerablePartitionerOptions { - NoBuffering = 1, None = 0, + NoBuffering = 1, } public partial interface IProducerConsumerCollection : System.Collections.Generic.IEnumerable, System.Collections.ICollection, System.Collections.IEnumerable { diff --git a/src/System.ComponentModel.Annotations/ref/System.ComponentModel.Annotations.cs b/src/System.ComponentModel.Annotations/ref/System.ComponentModel.Annotations.cs index 809b0874f1a8..0b17bfc464da 100644 --- a/src/System.ComponentModel.Annotations/ref/System.ComponentModel.Annotations.cs +++ b/src/System.ComponentModel.Annotations/ref/System.ComponentModel.Annotations.cs @@ -57,23 +57,23 @@ public CustomValidationAttribute(System.Type validatorType, string method) { } } public enum DataType { - CreditCard = 14, - Currency = 6, Custom = 0, - Date = 2, DateTime = 1, + Date = 2, + Time = 3, Duration = 4, - EmailAddress = 10, + PhoneNumber = 5, + Currency = 6, + Text = 7, Html = 8, - ImageUrl = 13, MultilineText = 9, + EmailAddress = 10, Password = 11, - PhoneNumber = 5, + Url = 12, + ImageUrl = 13, + CreditCard = 14, PostalCode = 15, - Text = 7, - Time = 3, Upload = 16, - Url = 12, } [System.AttributeUsageAttribute(System.AttributeTargets.Field | System.AttributeTargets.Method | System.AttributeTargets.Parameter | System.AttributeTargets.Property, AllowMultiple=false)] public partial class DataTypeAttribute : System.ComponentModel.DataAnnotations.ValidationAttribute @@ -365,9 +365,9 @@ public DatabaseGeneratedAttribute(System.ComponentModel.DataAnnotations.Schema.D } public enum DatabaseGeneratedOption { - Computed = 2, - Identity = 1, None = 0, + Identity = 1, + Computed = 2, } [System.AttributeUsageAttribute(System.AttributeTargets.Field | System.AttributeTargets.Property, AllowMultiple=false)] public partial class ForeignKeyAttribute : System.Attribute diff --git a/src/System.ComponentModel.Composition/ref/System.ComponentModel.Composition.cs b/src/System.ComponentModel.Composition/ref/System.ComponentModel.Composition.cs index 2d03ce84a92c..02f534f2b776 100644 --- a/src/System.ComponentModel.Composition/ref/System.ComponentModel.Composition.cs +++ b/src/System.ComponentModel.Composition/ref/System.ComponentModel.Composition.cs @@ -84,8 +84,8 @@ public CompositionException(string message, System.Exception innerException) { } public enum CreationPolicy { Any = 0, - NonShared = 2, Shared = 1, + NonShared = 2, } [System.AttributeUsageAttribute(System.AttributeTargets.Class | System.AttributeTargets.Field | System.AttributeTargets.Method | System.AttributeTargets.Property, AllowMultiple=true, Inherited=false)] public partial class ExportAttribute : System.Attribute @@ -359,8 +359,8 @@ public enum CompositionOptions { Default = 0, DisableSilentRejection = 1, - ExportCompositionService = 4, IsThreadSafe = 2, + ExportCompositionService = 4, } public partial class CompositionScopeDefinition : System.ComponentModel.Composition.Primitives.ComposablePartCatalog, System.ComponentModel.Composition.Hosting.INotifyComposablePartCatalogChanged { @@ -584,9 +584,9 @@ public partial interface ICompositionElement } public enum ImportCardinality { + ZeroOrOne = 0, ExactlyOne = 1, ZeroOrMore = 2, - ZeroOrOne = 0, } public partial class ImportDefinition { diff --git a/src/System.ComponentModel.Primitives/ref/System.ComponentModel.Primitives.cs b/src/System.ComponentModel.Primitives/ref/System.ComponentModel.Primitives.cs index 09cb0ed4ae23..3b7d89383b5f 100644 --- a/src/System.ComponentModel.Primitives/ref/System.ComponentModel.Primitives.cs +++ b/src/System.ComponentModel.Primitives/ref/System.ComponentModel.Primitives.cs @@ -104,9 +104,9 @@ public DesignerCategoryAttribute(string category) { } } public enum DesignerSerializationVisibility { - Content = 2, Hidden = 0, Visible = 1, + Content = 2, } [System.AttributeUsageAttribute(System.AttributeTargets.Event | System.AttributeTargets.Field | System.AttributeTargets.Method | System.AttributeTargets.Property)] public sealed partial class DesignerSerializationVisibilityAttribute : System.Attribute @@ -279,8 +279,8 @@ public ReadOnlyAttribute(bool isReadOnly) { } } public enum RefreshProperties { - All = 1, None = 0, + All = 1, Repaint = 2, } [System.AttributeUsageAttribute(System.AttributeTargets.All)] diff --git a/src/System.ComponentModel.TypeConverter/ref/System.ComponentModel.TypeConverter.cs b/src/System.ComponentModel.TypeConverter/ref/System.ComponentModel.TypeConverter.cs index 18054f017aab..8ecf8e715762 100644 --- a/src/System.ComponentModel.TypeConverter/ref/System.ComponentModel.TypeConverter.cs +++ b/src/System.ComponentModel.TypeConverter/ref/System.ComponentModel.TypeConverter.cs @@ -108,9 +108,9 @@ public BindableAttribute(System.ComponentModel.BindableSupport flags, System.Com } public enum BindableSupport { - Default = 2, No = 0, Yes = 1, + Default = 2, } public enum BindingDirection { @@ -189,8 +189,8 @@ public CharConverter() { } public enum CollectionChangeAction { Add = 1, - Refresh = 3, Remove = 2, + Refresh = 3, } public partial class CollectionChangeEventArgs : System.EventArgs { @@ -326,11 +326,11 @@ public DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType meth } public enum DataObjectMethodType { - Delete = 4, Fill = 0, - Insert = 3, Select = 1, Update = 2, + Insert = 3, + Delete = 4, } public partial class DateTimeConverter : System.ComponentModel.TypeConverter { @@ -743,8 +743,8 @@ public LicenseProviderAttribute(System.Type type) { } } public enum LicenseUsageMode { - Designtime = 1, Runtime = 0, + Designtime = 1, } public partial class LicFileLicenseProvider : System.ComponentModel.LicenseProvider { @@ -780,14 +780,14 @@ public ListChangedEventArgs(System.ComponentModel.ListChangedType listChangedTyp public delegate void ListChangedEventHandler(object sender, System.ComponentModel.ListChangedEventArgs e); public enum ListChangedType { + Reset = 0, ItemAdded = 1, - ItemChanged = 4, ItemDeleted = 2, ItemMoved = 3, + ItemChanged = 4, PropertyDescriptorAdded = 5, - PropertyDescriptorChanged = 7, PropertyDescriptorDeleted = 6, - Reset = 0, + PropertyDescriptorChanged = 7, } public partial class ListSortDescription { @@ -941,21 +941,21 @@ public void Clear() { } } public enum MaskedTextResultHint { + PositionOutOfRange = -55, + NonEditPosition = -54, + UnavailableEditPosition = -53, + PromptCharNotAllowed = -52, + InvalidInput = -51, + SignedDigitExpected = -5, + LetterExpected = -4, + DigitExpected = -3, AlphanumericCharacterExpected = -2, AsciiCharacterExpected = -1, + Unknown = 0, CharacterEscaped = 1, - DigitExpected = -3, - InvalidInput = -51, - LetterExpected = -4, NoEffect = 2, - NonEditPosition = -54, - PositionOutOfRange = -55, - PromptCharNotAllowed = -52, SideEffect = 3, - SignedDigitExpected = -5, Success = 4, - UnavailableEditPosition = -53, - Unknown = 0, } public abstract partial class MemberDescriptor { @@ -1132,10 +1132,10 @@ protected void InitializeArrays(System.Type[] tabClasses, System.ComponentModel. } public enum PropertyTabScope { - Component = 3, - Document = 2, - Global = 1, Static = 0, + Global = 1, + Document = 2, + Component = 3, } [System.AttributeUsageAttribute(System.AttributeTargets.Class, AllowMultiple=true)] public sealed partial class ProvidePropertyAttribute : System.Attribute @@ -1670,9 +1670,9 @@ public static void Serialize(System.IO.Stream o, string cryptoKey, System.Compon public enum HelpContextType { Ambient = 0, + Window = 1, Selection = 2, ToolWindowSelection = 3, - Window = 1, } [System.AttributeUsageAttribute(System.AttributeTargets.All, AllowMultiple=false, Inherited=false)] public sealed partial class HelpKeywordAttribute : System.Attribute @@ -1689,8 +1689,8 @@ public HelpKeywordAttribute(System.Type t) { } public enum HelpKeywordType { F1Keyword = 0, - FilterKeyword = 2, GeneralKeyword = 1, + FilterKeyword = 2, } public partial interface IComponentChangeService { @@ -1905,22 +1905,22 @@ protected virtual void OnCommandChanged(System.EventArgs e) { } [System.FlagsAttribute] public enum SelectionTypes { - Add = 64, Auto = 1, - [System.ObsoleteAttribute("This value has been deprecated. Use SelectionTypes.Primary instead. https://go.microsoft.com/fwlink/?linkid=14202")] - Click = 16, + [System.ObsoleteAttribute("This value has been deprecated. Use SelectionTypes.Auto instead. https://go.microsoft.com/fwlink/?linkid=14202")] + Normal = 1, + Replace = 2, [System.ObsoleteAttribute("This value has been deprecated. It is no longer supported. https://go.microsoft.com/fwlink/?linkid=14202")] MouseDown = 4, [System.ObsoleteAttribute("This value has been deprecated. It is no longer supported. https://go.microsoft.com/fwlink/?linkid=14202")] MouseUp = 8, - [System.ObsoleteAttribute("This value has been deprecated. Use SelectionTypes.Auto instead. https://go.microsoft.com/fwlink/?linkid=14202")] - Normal = 1, + [System.ObsoleteAttribute("This value has been deprecated. Use SelectionTypes.Primary instead. https://go.microsoft.com/fwlink/?linkid=14202")] + Click = 16, Primary = 16, - Remove = 128, - Replace = 2, - Toggle = 32, [System.ObsoleteAttribute("This value has been deprecated. Use Enum class methods to determine valid values, or use a type converter. https://go.microsoft.com/fwlink/?linkid=14202")] Valid = 31, + Toggle = 32, + Add = 64, + Remove = 128, } public partial class ServiceContainer : System.ComponentModel.Design.IServiceContainer, System.IDisposable, System.IServiceProvider { @@ -2017,11 +2017,11 @@ protected TypeDescriptionProviderService() { } } public enum ViewTechnology { - Default = 2, [System.ObsoleteAttribute("This value has been deprecated. Use ViewTechnology.Default instead. https://go.microsoft.com/fwlink/?linkid=14202")] Passthrough = 0, [System.ObsoleteAttribute("This value has been deprecated. Use ViewTechnology.Default instead. https://go.microsoft.com/fwlink/?linkid=14202")] WindowsForms = 1, + Default = 2, } } namespace System.ComponentModel.Design.Serialization diff --git a/src/System.Configuration.ConfigurationManager/ref/System.Configuration.ConfigurationManager.cs b/src/System.Configuration.ConfigurationManager/ref/System.Configuration.ConfigurationManager.cs index 1c1d9a972057..d3e151801ce5 100644 --- a/src/System.Configuration.ConfigurationManager/ref/System.Configuration.ConfigurationManager.cs +++ b/src/System.Configuration.ConfigurationManager/ref/System.Configuration.ConfigurationManager.cs @@ -9,9 +9,9 @@ namespace System { public enum UriIdnScope { - All = 2, - AllExceptIntranet = 1, None = 0, + AllExceptIntranet = 1, + All = 2, } } namespace System.Configuration @@ -141,17 +141,17 @@ public void SaveAs(string filename, System.Configuration.ConfigurationSaveMode s } public enum ConfigurationAllowDefinition { - Everywhere = 300, MachineOnly = 0, - MachineToApplication = 200, MachineToWebRoot = 100, + MachineToApplication = 200, + Everywhere = 300, } public enum ConfigurationAllowExeDefinition { MachineOnly = 0, MachineToApplication = 100, - MachineToLocalUser = 300, MachineToRoamingUser = 200, + MachineToLocalUser = 300, } [System.AttributeUsageAttribute(System.AttributeTargets.Class | System.AttributeTargets.Property)] public sealed partial class ConfigurationCollectionAttribute : System.Attribute @@ -256,10 +256,10 @@ protected override void Unmerge(System.Configuration.ConfigurationElement source } public enum ConfigurationElementCollectionType { - AddRemoveClearMap = 1, - AddRemoveClearMapAlternate = 3, BasicMap = 0, + AddRemoveClearMap = 1, BasicMapAlternate = 2, + AddRemoveClearMapAlternate = 3, } public sealed partial class ConfigurationElementProperty { @@ -417,19 +417,19 @@ void System.Collections.ICollection.CopyTo(System.Array array, int index) { } [System.FlagsAttribute] public enum ConfigurationPropertyOptions { - IsAssemblyStringTransformationRequired = 16, + None = 0, IsDefaultCollection = 1, - IsKey = 4, IsRequired = 2, + IsKey = 4, IsTypeStringTransformationRequired = 8, + IsAssemblyStringTransformationRequired = 16, IsVersionCheckRequired = 32, - None = 0, } public enum ConfigurationSaveMode { - Full = 2, - Minimal = 1, Modified = 0, + Minimal = 1, + Full = 2, } public abstract partial class ConfigurationSection : System.Configuration.ConfigurationElement { @@ -826,9 +826,9 @@ public NoSettingsVersionUpgradeAttribute() { } } public enum OverrideMode { + Inherit = 0, Allow = 1, Deny = 2, - Inherit = 0, } public partial class PositiveTimeSpanValidator : System.Configuration.ConfigurationValidatorBase { @@ -1213,10 +1213,10 @@ public override void Add(System.Configuration.Provider.ProviderBase provider) { public delegate void SettingsSavingEventHandler(object sender, System.ComponentModel.CancelEventArgs e); public enum SettingsSerializeAs { - Binary = 2, - ProviderSpecific = 3, String = 0, Xml = 1, + Binary = 2, + ProviderSpecific = 3, } [System.AttributeUsageAttribute(System.AttributeTargets.Class | System.AttributeTargets.Property)] public sealed partial class SettingsSerializeAsAttribute : System.Attribute diff --git a/src/System.Console/ref/System.Console.cs b/src/System.Console/ref/System.Console.cs index 3a275397dd98..ab32dcaf4da8 100644 --- a/src/System.Console/ref/System.Console.cs +++ b/src/System.Console/ref/System.Console.cs @@ -110,41 +110,46 @@ internal ConsoleCancelEventArgs() { } public enum ConsoleColor { Black = 0, - Blue = 9, - Cyan = 11, DarkBlue = 1, - DarkCyan = 3, - DarkGray = 8, DarkGreen = 2, - DarkMagenta = 5, + DarkCyan = 3, DarkRed = 4, + DarkMagenta = 5, DarkYellow = 6, Gray = 7, + DarkGray = 8, + Blue = 9, Green = 10, - Magenta = 13, + Cyan = 11, Red = 12, - White = 15, + Magenta = 13, Yellow = 14, + White = 15, } public enum ConsoleKey { - A = 65, - Add = 107, - Applications = 93, - Attention = 246, - B = 66, Backspace = 8, - BrowserBack = 166, - BrowserFavorites = 171, - BrowserForward = 167, - BrowserHome = 172, - BrowserRefresh = 168, - BrowserSearch = 170, - BrowserStop = 169, - C = 67, + Tab = 9, Clear = 12, - CrSel = 247, - D = 68, + Enter = 13, + Pause = 19, + Escape = 27, + Spacebar = 32, + PageUp = 33, + PageDown = 34, + End = 35, + Home = 36, + LeftArrow = 37, + UpArrow = 38, + RightArrow = 39, + DownArrow = 40, + Select = 41, + Print = 42, + Execute = 43, + PrintScreen = 44, + Insert = 45, + Delete = 46, + Help = 47, D0 = 48, D1 = 49, D2 = 50, @@ -155,19 +160,61 @@ public enum ConsoleKey D7 = 55, D8 = 56, D9 = 57, - Decimal = 110, - Delete = 46, - Divide = 111, - DownArrow = 40, + A = 65, + B = 66, + C = 67, + D = 68, E = 69, - End = 35, - Enter = 13, - EraseEndOfFile = 249, - Escape = 27, - Execute = 43, - ExSel = 248, F = 70, + G = 71, + H = 72, + I = 73, + J = 74, + K = 75, + L = 76, + M = 77, + N = 78, + O = 79, + P = 80, + Q = 81, + R = 82, + S = 83, + T = 84, + U = 85, + V = 86, + W = 87, + X = 88, + Y = 89, + Z = 90, + LeftWindows = 91, + RightWindows = 92, + Applications = 93, + Sleep = 95, + NumPad0 = 96, + NumPad1 = 97, + NumPad2 = 98, + NumPad3 = 99, + NumPad4 = 100, + NumPad5 = 101, + NumPad6 = 102, + NumPad7 = 103, + NumPad8 = 104, + NumPad9 = 105, + Multiply = 106, + Add = 107, + Separator = 108, + Subtract = 109, + Decimal = 110, + Divide = 111, F1 = 112, + F2 = 113, + F3 = 114, + F4 = 115, + F5 = 116, + F6 = 117, + F7 = 118, + F8 = 119, + F9 = 120, F10 = 121, F11 = 122, F12 = 123, @@ -178,55 +225,34 @@ public enum ConsoleKey F17 = 128, F18 = 129, F19 = 130, - F2 = 113, F20 = 131, F21 = 132, F22 = 133, F23 = 134, F24 = 135, - F3 = 114, - F4 = 115, - F5 = 116, - F6 = 117, - F7 = 118, - F8 = 119, - F9 = 120, - G = 71, - H = 72, - Help = 47, - Home = 36, - I = 73, - Insert = 45, - J = 74, - K = 75, - L = 76, - LaunchApp1 = 182, - LaunchApp2 = 183, - LaunchMail = 180, - LaunchMediaSelect = 181, - LeftArrow = 37, - LeftWindows = 91, - M = 77, + BrowserBack = 166, + BrowserForward = 167, + BrowserRefresh = 168, + BrowserStop = 169, + BrowserSearch = 170, + BrowserFavorites = 171, + BrowserHome = 172, + VolumeMute = 173, + VolumeDown = 174, + VolumeUp = 175, MediaNext = 176, - MediaPlay = 179, MediaPrevious = 177, MediaStop = 178, - Multiply = 106, - N = 78, - NoName = 252, - NumPad0 = 96, - NumPad1 = 97, - NumPad2 = 98, - NumPad3 = 99, - NumPad4 = 100, - NumPad5 = 101, - NumPad6 = 102, - NumPad7 = 103, - NumPad8 = 104, - NumPad9 = 105, - O = 79, + MediaPlay = 179, + LaunchMail = 180, + LaunchMediaSelect = 181, + LaunchApp1 = 182, + LaunchApp2 = 183, Oem1 = 186, - Oem102 = 226, + OemPlus = 187, + OemComma = 188, + OemMinus = 189, + OemPeriod = 190, Oem2 = 191, Oem3 = 192, Oem4 = 219, @@ -234,44 +260,18 @@ public enum ConsoleKey Oem6 = 221, Oem7 = 222, Oem8 = 223, - OemClear = 254, - OemComma = 188, - OemMinus = 189, - OemPeriod = 190, - OemPlus = 187, - P = 80, - Pa1 = 253, + Oem102 = 226, + Process = 229, Packet = 231, - PageDown = 34, - PageUp = 33, - Pause = 19, + Attention = 246, + CrSel = 247, + ExSel = 248, + EraseEndOfFile = 249, Play = 250, - Print = 42, - PrintScreen = 44, - Process = 229, - Q = 81, - R = 82, - RightArrow = 39, - RightWindows = 92, - S = 83, - Select = 41, - Separator = 108, - Sleep = 95, - Spacebar = 32, - Subtract = 109, - T = 84, - Tab = 9, - U = 85, - UpArrow = 38, - V = 86, - VolumeDown = 174, - VolumeMute = 173, - VolumeUp = 175, - W = 87, - X = 88, - Y = 89, - Z = 90, Zoom = 251, + NoName = 252, + Pa1 = 253, + OemClear = 254, } public readonly partial struct ConsoleKeyInfo { @@ -290,12 +290,12 @@ public readonly partial struct ConsoleKeyInfo public enum ConsoleModifiers { Alt = 1, - Control = 4, Shift = 2, + Control = 4, } public enum ConsoleSpecialKey { - ControlBreak = 1, ControlC = 0, + ControlBreak = 1, } } diff --git a/src/System.Data.Common/ref/System.Data.Common.cs b/src/System.Data.Common/ref/System.Data.Common.cs index 4cd29cdeaf24..6a2b6a62cdf8 100644 --- a/src/System.Data.Common/ref/System.Data.Common.cs +++ b/src/System.Data.Common/ref/System.Data.Common.cs @@ -9,25 +9,25 @@ namespace System.Data { public enum AcceptRejectRule { - Cascade = 1, None = 0, + Cascade = 1, } [System.FlagsAttribute] public enum CommandBehavior { - CloseConnection = 32, Default = 0, - KeyInfo = 4, - SchemaOnly = 2, - SequentialAccess = 16, SingleResult = 1, + SchemaOnly = 2, + KeyInfo = 4, SingleRow = 8, + SequentialAccess = 16, + CloseConnection = 32, } public enum CommandType { + Text = 1, StoredProcedure = 4, TableDirect = 512, - Text = 1, } public enum ConflictOption { @@ -38,12 +38,12 @@ public enum ConflictOption [System.FlagsAttribute] public enum ConnectionState { - Broken = 16, Closed = 0, + Open = 1, Connecting = 2, Executing = 4, Fetching = 8, - Open = 1, + Broken = 16, } [System.ComponentModel.DefaultPropertyAttribute("ConstraintName")] public abstract partial class Constraint @@ -343,14 +343,14 @@ public void SetParentRow(System.Data.DataRow parentRow, System.Data.DataRelation [System.FlagsAttribute] public enum DataRowAction { - Add = 16, - Change = 2, - ChangeCurrentAndOriginal = 64, - ChangeOriginal = 32, - Commit = 8, - Delete = 1, Nothing = 0, + Delete = 1, + Change = 2, Rollback = 4, + Commit = 8, + Add = 16, + ChangeOriginal = 32, + ChangeCurrentAndOriginal = 64, } public sealed partial class DataRowBuilder { @@ -409,18 +409,18 @@ public static void SetField(this System.Data.DataRow row, string columnName, [System.FlagsAttribute] public enum DataRowState { + Detached = 1, + Unchanged = 2, Added = 4, Deleted = 8, - Detached = 1, Modified = 16, - Unchanged = 2, } public enum DataRowVersion { - Current = 512, - Default = 1536, Original = 256, + Current = 512, Proposed = 1024, + Default = 1536, } public partial class DataRowView : System.ComponentModel.ICustomTypeDescriptor, System.ComponentModel.IDataErrorInfo, System.ComponentModel.IEditableObject, System.ComponentModel.INotifyPropertyChanged { @@ -983,14 +983,14 @@ protected virtual void TableCollectionChanged(object sender, System.ComponentMod [System.FlagsAttribute] public enum DataViewRowState { + None = 0, + Unchanged = 2, Added = 4, - CurrentRows = 22, Deleted = 8, ModifiedCurrent = 16, + CurrentRows = 22, ModifiedOriginal = 32, - None = 0, OriginalRows = 42, - Unchanged = 2, } [System.ComponentModel.TypeConverterAttribute(typeof(System.ComponentModel.ExpandableObjectConverter))] public partial class DataViewSetting @@ -1038,15 +1038,12 @@ public override void GetObjectData(System.Runtime.Serialization.SerializationInf public enum DbType { AnsiString = 0, - AnsiStringFixedLength = 22, Binary = 1, - Boolean = 3, Byte = 2, + Boolean = 3, Currency = 4, Date = 5, DateTime = 6, - DateTime2 = 26, - DateTimeOffset = 27, Decimal = 7, Double = 8, Guid = 9, @@ -1057,13 +1054,16 @@ public enum DbType SByte = 14, Single = 15, String = 16, - StringFixedLength = 23, Time = 17, UInt16 = 18, UInt32 = 19, UInt64 = 20, VarNumeric = 21, + AnsiStringFixedLength = 22, + StringFixedLength = 23, Xml = 25, + DateTime2 = 26, + DateTimeOffset = 27, } public partial class DeletedRowInaccessibleException : System.Data.DataException { @@ -1315,13 +1315,13 @@ public InvalidExpressionException(string message, System.Exception innerExceptio } public enum IsolationLevel { + Unspecified = -1, Chaos = 16, - ReadCommitted = 4096, ReadUncommitted = 256, + ReadCommitted = 4096, RepeatableRead = 65536, Serializable = 1048576, Snapshot = 16777216, - Unspecified = -1, } public partial interface ITableMapping { @@ -1351,10 +1351,10 @@ public enum LoadOption } public enum MappingType { - Attribute = 2, Element = 1, - Hidden = 4, + Attribute = 2, SimpleContent = 3, + Hidden = 4, } public partial class MergeFailedEventArgs : System.EventArgs { @@ -1365,9 +1365,9 @@ public MergeFailedEventArgs(System.Data.DataTable table, string conflict) { } public delegate void MergeFailedEventHandler(object sender, System.Data.MergeFailedEventArgs e); public enum MissingMappingAction { - Error = 3, - Ignore = 2, Passthrough = 1, + Ignore = 2, + Error = 3, } public partial class MissingPrimaryKeyException : System.Data.DataException { @@ -1379,9 +1379,9 @@ public MissingPrimaryKeyException(string message, System.Exception innerExceptio public enum MissingSchemaAction { Add = 1, - AddWithKey = 4, - Error = 3, Ignore = 2, + Error = 3, + AddWithKey = 4, } public partial class NoNullAllowedException : System.Data.DataException { @@ -1397,8 +1397,8 @@ internal OrderedEnumerableRowCollection() { } public enum ParameterDirection { Input = 1, - InputOutput = 3, Output = 2, + InputOutput = 3, ReturnValue = 6, } public partial class PropertyCollection : System.Collections.Hashtable, System.ICloneable @@ -1423,25 +1423,25 @@ public RowNotInTableException(string message, System.Exception innerException) { } public enum Rule { - Cascade = 1, None = 0, - SetDefault = 3, + Cascade = 1, SetNull = 2, + SetDefault = 3, } public enum SchemaSerializationMode { - ExcludeSchema = 2, IncludeSchema = 1, + ExcludeSchema = 2, } public enum SchemaType { - Mapped = 2, Source = 1, + Mapped = 2, } public enum SerializationFormat { - Binary = 1, Xml = 0, + Binary = 1, } public enum SqlDbType { @@ -1449,10 +1449,7 @@ public enum SqlDbType Binary = 1, Bit = 2, Char = 3, - Date = 31, DateTime = 4, - DateTime2 = 33, - DateTimeOffset = 34, Decimal = 5, Float = 6, Image = 7, @@ -1462,20 +1459,23 @@ public enum SqlDbType NText = 11, NVarChar = 12, Real = 13, + UniqueIdentifier = 14, SmallDateTime = 15, SmallInt = 16, SmallMoney = 17, - Structured = 30, Text = 18, - Time = 32, Timestamp = 19, TinyInt = 20, - Udt = 29, - UniqueIdentifier = 14, VarBinary = 21, VarChar = 22, Variant = 23, Xml = 25, + Udt = 29, + Structured = 30, + Date = 31, + Time = 32, + DateTime2 = 33, + DateTimeOffset = 34, } public sealed partial class StateChangeEventArgs : System.EventArgs { @@ -1492,11 +1492,11 @@ public StatementCompletedEventArgs(int recordCount) { } public delegate void StatementCompletedEventHandler(object sender, System.Data.StatementCompletedEventArgs e); public enum StatementType { - Batch = 4, - Delete = 3, - Insert = 1, Select = 0, + Insert = 1, Update = 2, + Delete = 3, + Batch = 4, } public partial class StrongTypingException : System.Data.DataException { @@ -1554,17 +1554,17 @@ public UniqueConstraint(string name, string[] columnNames, bool isPrimaryKey) { } public enum UpdateRowSource { - Both = 3, - FirstReturnedRecord = 2, None = 0, OutputParameters = 1, + FirstReturnedRecord = 2, + Both = 3, } public enum UpdateStatus { Continue = 0, ErrorsOccurred = 1, - SkipAllRemainingRows = 3, SkipCurrentRow = 2, + SkipAllRemainingRows = 3, } public partial class VersionNotFoundException : System.Data.DataException { @@ -1576,26 +1576,26 @@ public VersionNotFoundException(string message, System.Exception innerException) public enum XmlReadMode { Auto = 0, - DiffGram = 4, - Fragment = 5, + ReadSchema = 1, IgnoreSchema = 2, InferSchema = 3, + DiffGram = 4, + Fragment = 5, InferTypedSchema = 6, - ReadSchema = 1, } public enum XmlWriteMode { - DiffGram = 2, - IgnoreSchema = 1, WriteSchema = 0, + IgnoreSchema = 1, + DiffGram = 2, } } namespace System.Data.Common { public enum CatalogLocation { - End = 2, Start = 1, + End = 2, } public partial class DataAdapter : System.ComponentModel.Component, System.Data.IDataAdapter { @@ -2355,11 +2355,11 @@ protected virtual void Dispose(bool disposing) { } } public enum GroupByBehavior { - ExactMatch = 4, - MustContainAll = 3, - NotSupported = 1, Unknown = 0, + NotSupported = 1, Unrelated = 2, + MustContainAll = 3, + ExactMatch = 4, } public partial interface IDbColumnSchemaGenerator { @@ -2367,9 +2367,9 @@ public partial interface IDbColumnSchemaGenerator } public enum IdentifierCase { + Unknown = 0, Insensitive = 1, Sensitive = 2, - Unknown = 0, } public partial class RowUpdatedEventArgs : System.EventArgs { @@ -2436,11 +2436,11 @@ public static partial class SchemaTableOptionalColumn [System.FlagsAttribute] public enum SupportedJoinOperators { - FullOuter = 8, + None = 0, Inner = 1, LeftOuter = 2, - None = 0, RightOuter = 4, + FullOuter = 8, } } namespace System.Data.SqlTypes @@ -2696,13 +2696,13 @@ public void Write(long offset, char[] buffer, int offsetInBuffer, int count) { } [System.FlagsAttribute] public enum SqlCompareOptions { - BinarySort = 32768, - BinarySort2 = 16384, + None = 0, IgnoreCase = 1, - IgnoreKanaType = 8, IgnoreNonSpace = 2, + IgnoreKanaType = 8, IgnoreWidth = 16, - None = 0, + BinarySort2 = 16384, + BinarySort = 32768, } [System.Xml.Serialization.XmlSchemaProviderAttribute("GetXsdType")] public partial struct SqlDateTime : System.Data.SqlTypes.INullable, System.IComparable, System.Xml.Serialization.IXmlSerializable diff --git a/src/System.Data.Odbc/ref/System.Data.Odbc.cs b/src/System.Data.Odbc/ref/System.Data.Odbc.cs index 731e68877c49..c4e6dc0f1cd1 100644 --- a/src/System.Data.Odbc/ref/System.Data.Odbc.cs +++ b/src/System.Data.Odbc/ref/System.Data.Odbc.cs @@ -347,25 +347,25 @@ public enum OdbcType Binary = 2, Bit = 3, Char = 4, - Date = 23, DateTime = 5, Decimal = 6, + Numeric = 7, Double = 8, Image = 9, Int = 10, NChar = 11, NText = 12, - Numeric = 7, NVarChar = 13, Real = 14, + UniqueIdentifier = 15, SmallDateTime = 16, SmallInt = 17, Text = 18, - Time = 24, Timestamp = 19, TinyInt = 20, - UniqueIdentifier = 15, VarBinary = 21, VarChar = 22, + Date = 23, + Time = 24, } } diff --git a/src/System.Data.SqlClient/ref/System.Data.SqlClient.cs b/src/System.Data.SqlClient/ref/System.Data.SqlClient.cs index aaea35380631..f28542b0b0cb 100644 --- a/src/System.Data.SqlClient/ref/System.Data.SqlClient.cs +++ b/src/System.Data.SqlClient/ref/System.Data.SqlClient.cs @@ -14,8 +14,8 @@ public enum DataAccessKind } public enum Format { - Native = 1, Unknown = 0, + Native = 1, UserDefined = 2, } public partial interface IBinarySerialize @@ -255,15 +255,15 @@ namespace System.Data.SqlClient { public enum ApplicationIntent { - ReadOnly = 1, ReadWrite = 0, + ReadOnly = 1, } public delegate void OnChangeEventHandler(object sender, System.Data.SqlClient.SqlNotificationEventArgs e); public enum SortOrder { + Unspecified = -1, Ascending = 0, Descending = 1, - Unspecified = -1, } public sealed partial class SqlBulkCopy : System.IDisposable { @@ -328,12 +328,12 @@ public void Remove(System.Data.SqlClient.SqlBulkCopyColumnMapping value) { } [System.FlagsAttribute] public enum SqlBulkCopyOptions { - CheckConstraints = 2, Default = 0, - FireTriggers = 16, KeepIdentity = 1, - KeepNulls = 8, + CheckConstraints = 2, TableLock = 4, + KeepNulls = 8, + FireTriggers = 16, UseInternalTransaction = 32, } public sealed partial class SqlClientFactory : System.Data.Common.DbProviderFactory @@ -695,44 +695,44 @@ public SqlNotificationEventArgs(System.Data.SqlClient.SqlNotificationType type, public enum SqlNotificationInfo { AlreadyChanged = -2, - Alter = 5, + Unknown = -1, + Truncate = 0, + Insert = 1, + Update = 2, Delete = 3, Drop = 4, + Alter = 5, + Restart = 6, Error = 7, - Expired = 12, - Insert = 1, + Query = 8, Invalid = 9, - Isolation = 11, - Merge = 16, Options = 10, - PreviousFire = 14, - Query = 8, + Isolation = 11, + Expired = 12, Resource = 13, - Restart = 6, + PreviousFire = 14, TemplateLimit = 15, - Truncate = 0, - Unknown = -1, - Update = 2, + Merge = 16, } public enum SqlNotificationSource { Client = -2, + Unknown = -1, Data = 0, + Timeout = 1, + Object = 2, Database = 3, + System = 4, + Statement = 5, Environment = 6, Execution = 7, - Object = 2, Owner = 8, - Statement = 5, - System = 4, - Timeout = 1, - Unknown = -1, } public enum SqlNotificationType { + Unknown = -1, Change = 0, Subscribe = 1, - Unknown = -1, } public sealed partial class SqlParameter : System.Data.Common.DbParameter, System.ICloneable { diff --git a/src/System.Diagnostics.Contracts/ref/System.Diagnostics.Contracts.cs b/src/System.Diagnostics.Contracts/ref/System.Diagnostics.Contracts.cs index 3e617042c062..b640540b76ed 100644 --- a/src/System.Diagnostics.Contracts/ref/System.Diagnostics.Contracts.cs +++ b/src/System.Diagnostics.Contracts/ref/System.Diagnostics.Contracts.cs @@ -91,12 +91,12 @@ public void SetUnwind() { } } public enum ContractFailureKind { - Assert = 4, - Assume = 5, - Invariant = 3, + Precondition = 0, Postcondition = 1, PostconditionOnException = 2, - Precondition = 0, + Invariant = 3, + Assert = 4, + Assume = 5, } [System.AttributeUsageAttribute(System.AttributeTargets.Method, AllowMultiple=false, Inherited=false)] [System.Diagnostics.ConditionalAttribute("CONTRACTS_FULL")] diff --git a/src/System.Diagnostics.Debug/ref/System.Diagnostics.Debug.cs b/src/System.Diagnostics.Debug/ref/System.Diagnostics.Debug.cs index f8dbee2a0ef8..6816a5d76541 100644 --- a/src/System.Diagnostics.Debug/ref/System.Diagnostics.Debug.cs +++ b/src/System.Diagnostics.Debug/ref/System.Diagnostics.Debug.cs @@ -89,8 +89,8 @@ public DebuggerBrowsableAttribute(System.Diagnostics.DebuggerBrowsableState stat } public enum DebuggerBrowsableState { - Collapsed = 2, Never = 0, + Collapsed = 2, RootHidden = 3, } [System.AttributeUsageAttribute(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Delegate | System.AttributeTargets.Enum | System.AttributeTargets.Field | System.AttributeTargets.Property | System.AttributeTargets.Struct, AllowMultiple=true)] diff --git a/src/System.Diagnostics.EventLog/ref/System.Diagnostics.EventLog.cs b/src/System.Diagnostics.EventLog/ref/System.Diagnostics.EventLog.cs index 6e0e513d2f2a..367cc436a051 100644 --- a/src/System.Diagnostics.EventLog/ref/System.Diagnostics.EventLog.cs +++ b/src/System.Diagnostics.EventLog/ref/System.Diagnostics.EventLog.cs @@ -134,10 +134,10 @@ void System.Collections.ICollection.CopyTo(System.Array array, int index) { } public enum EventLogEntryType { Error = 1, - FailureAudit = 16, + Warning = 2, Information = 4, SuccessAudit = 8, - Warning = 2, + FailureAudit = 16, } public sealed partial class EventLogTraceListener : System.Diagnostics.TraceListener { @@ -254,8 +254,8 @@ public EventLogInvalidDataException(string message, System.Exception innerExcept public enum EventLogIsolation { Application = 0, - Custom = 2, System = 1, + Custom = 2, } public sealed partial class EventLogLink { @@ -266,8 +266,8 @@ internal EventLogLink() { } } public enum EventLogMode { - AutoBackup = 1, Circular = 0, + AutoBackup = 1, Retain = 2, } public partial class EventLogNotFoundException : System.Diagnostics.Eventing.Reader.EventLogException @@ -382,9 +382,9 @@ internal EventLogStatus() { } public enum EventLogType { Administrative = 0, + Operational = 1, Analytical = 2, Debug = 3, - Operational = 1, } public partial class EventLogWatcher : System.IDisposable { @@ -471,8 +471,8 @@ internal EventTask() { } } public enum PathType { - FilePath = 2, LogName = 1, + FilePath = 2, } public partial class ProviderMetadata : System.IDisposable { @@ -497,47 +497,47 @@ protected virtual void Dispose(bool disposing) { } public enum SessionAuthentication { Default = 0, - Kerberos = 2, Negotiate = 1, + Kerberos = 2, Ntlm = 3, } [System.FlagsAttribute] public enum StandardEventKeywords : long { + None = (long)0, + ResponseTime = (long)281474976710656, + WdiContext = (long)562949953421312, + WdiDiagnostic = (long)1125899906842624, + Sqm = (long)2251799813685248, AuditFailure = (long)4503599627370496, - AuditSuccess = (long)9007199254740992, [System.ObsoleteAttribute("Incorrect value: use CorrelationHint2 instead", false)] CorrelationHint = (long)4503599627370496, + AuditSuccess = (long)9007199254740992, CorrelationHint2 = (long)18014398509481984, EventLogClassic = (long)36028797018963968, - None = (long)0, - ResponseTime = (long)281474976710656, - Sqm = (long)2251799813685248, - WdiContext = (long)562949953421312, - WdiDiagnostic = (long)1125899906842624, } public enum StandardEventLevel { + LogAlways = 0, Critical = 1, Error = 2, + Warning = 3, Informational = 4, - LogAlways = 0, Verbose = 5, - Warning = 3, } public enum StandardEventOpcode { + Info = 0, + Start = 1, + Stop = 2, DataCollectionStart = 3, DataCollectionStop = 4, Extension = 5, - Info = 0, - Receive = 240, Reply = 6, Resume = 7, - Send = 9, - Start = 1, - Stop = 2, Suspend = 8, + Send = 9, + Receive = 240, } public enum StandardEventTask { diff --git a/src/System.Diagnostics.PerformanceCounter/ref/System.Diagnostics.PerformanceCounter.cs b/src/System.Diagnostics.PerformanceCounter/ref/System.Diagnostics.PerformanceCounter.cs index 3df1d884d909..93983515b1e6 100644 --- a/src/System.Diagnostics.PerformanceCounter/ref/System.Diagnostics.PerformanceCounter.cs +++ b/src/System.Diagnostics.PerformanceCounter/ref/System.Diagnostics.PerformanceCounter.cs @@ -155,9 +155,9 @@ public static void Delete(string categoryName) { } } public enum PerformanceCounterCategoryType { - MultiInstance = 1, - SingleInstance = 0, Unknown = -1, + SingleInstance = 0, + MultiInstance = 1, } public enum PerformanceCounterInstanceLifetime { @@ -175,34 +175,34 @@ void System.Diagnostics.ICollectData.CloseData() { } } public enum PerformanceCounterType { - AverageBase = 1073939458, - AverageCount64 = 1073874176, - AverageTimer32 = 805438464, + NumberOfItemsHEX32 = 0, + NumberOfItemsHEX64 = 256, + NumberOfItems32 = 65536, + NumberOfItems64 = 65792, CounterDelta32 = 4195328, CounterDelta64 = 4195584, - CounterMultiBase = 1107494144, - CounterMultiTimer = 574686464, - CounterMultiTimer100Ns = 575735040, - CounterMultiTimer100NsInverse = 592512256, - CounterMultiTimerInverse = 591463680, - CounterTimer = 541132032, - CounterTimerInverse = 557909248, + SampleCounter = 4260864, CountPerTimeInterval32 = 4523008, CountPerTimeInterval64 = 4523264, - ElapsedTime = 807666944, - NumberOfItems32 = 65536, - NumberOfItems64 = 65792, - NumberOfItemsHEX32 = 0, - NumberOfItemsHEX64 = 256, RateOfCountsPerSecond32 = 272696320, RateOfCountsPerSecond64 = 272696576, - RawBase = 1073939459, RawFraction = 537003008, - SampleBase = 1073939457, - SampleCounter = 4260864, - SampleFraction = 549585920, + CounterTimer = 541132032, Timer100Ns = 542180608, + SampleFraction = 549585920, + CounterTimerInverse = 557909248, Timer100NsInverse = 558957824, + CounterMultiTimer = 574686464, + CounterMultiTimer100Ns = 575735040, + CounterMultiTimerInverse = 591463680, + CounterMultiTimer100NsInverse = 592512256, + AverageTimer32 = 805438464, + ElapsedTime = 807666944, + AverageCount64 = 1073874176, + SampleBase = 1073939457, + AverageBase = 1073939458, + RawBase = 1073939459, + CounterMultiBase = 1107494144, } } namespace System.Diagnostics.PerformanceData @@ -243,50 +243,50 @@ public void Dispose() { } } public enum CounterSetInstanceType { + Single = 0, + Multiple = 2, GlobalAggregate = 4, + MultipleAggregate = 6, GlobalAggregateWithHistory = 11, InstanceAggregate = 22, - Multiple = 2, - MultipleAggregate = 6, - Single = 0, } public enum CounterType { - AverageBase = 1073939458, - AverageCount64 = 1073874176, - AverageTimer32 = 805438464, + RawDataHex32 = 0, + RawDataHex64 = 256, + RawData32 = 65536, + RawData64 = 65792, Delta32 = 4195328, Delta64 = 4195584, - ElapsedTime = 807666944, - LargeQueueLength = 4523264, - MultiTimerBase = 1107494144, - MultiTimerPercentageActive = 574686464, - MultiTimerPercentageActive100Ns = 575735040, - MultiTimerPercentageNotActive = 591463680, - MultiTimerPercentageNotActive100Ns = 592512256, - ObjectSpecificTimer = 543229184, - PercentageActive = 541132032, - PercentageActive100Ns = 542180608, - PercentageNotActive = 557909248, - PercentageNotActive100Ns = 558957824, - PrecisionObjectSpecificTimer = 543622400, - PrecisionSystemTimer = 541525248, - PrecisionTimer100Ns = 542573824, + SampleCounter = 4260864, QueueLength = 4523008, + LargeQueueLength = 4523264, QueueLength100Ns = 5571840, QueueLengthObjectTime = 6620416, RateOfCountPerSecond32 = 272696320, RateOfCountPerSecond64 = 272696576, - RawBase32 = 1073939459, - RawBase64 = 1073939712, - RawData32 = 65536, - RawData64 = 65792, - RawDataHex32 = 0, - RawDataHex64 = 256, RawFraction32 = 537003008, RawFraction64 = 537003264, - SampleBase = 1073939457, - SampleCounter = 4260864, + PercentageActive = 541132032, + PrecisionSystemTimer = 541525248, + PercentageActive100Ns = 542180608, + PrecisionTimer100Ns = 542573824, + ObjectSpecificTimer = 543229184, + PrecisionObjectSpecificTimer = 543622400, SampleFraction = 549585920, + PercentageNotActive = 557909248, + PercentageNotActive100Ns = 558957824, + MultiTimerPercentageActive = 574686464, + MultiTimerPercentageActive100Ns = 575735040, + MultiTimerPercentageNotActive = 591463680, + MultiTimerPercentageNotActive100Ns = 592512256, + AverageTimer32 = 805438464, + ElapsedTime = 807666944, + AverageCount64 = 1073874176, + SampleBase = 1073939457, + AverageBase = 1073939458, + RawBase32 = 1073939459, + RawBase64 = 1073939712, + MultiTimerBase = 1107494144, } } diff --git a/src/System.Diagnostics.Process/ref/System.Diagnostics.Process.cs b/src/System.Diagnostics.Process/ref/System.Diagnostics.Process.cs index 54bf76e9ac01..a9f6a3a9a68f 100644 --- a/src/System.Diagnostics.Process/ref/System.Diagnostics.Process.cs +++ b/src/System.Diagnostics.Process/ref/System.Diagnostics.Process.cs @@ -150,12 +150,12 @@ public void CopyTo(System.Diagnostics.ProcessModule[] array, int index) { } } public enum ProcessPriorityClass { - AboveNormal = 32768, - BelowNormal = 16384, - High = 128, - Idle = 64, Normal = 32, + Idle = 64, + High = 128, RealTime = 256, + BelowNormal = 16384, + AboveNormal = 32768, } public sealed partial class ProcessStartInfo { @@ -224,19 +224,19 @@ public void Remove(System.Diagnostics.ProcessThread thread) { } } public enum ProcessWindowStyle { + Normal = 0, Hidden = 1, - Maximized = 3, Minimized = 2, - Normal = 0, + Maximized = 3, } public enum ThreadPriorityLevel { - AboveNormal = 1, - BelowNormal = -1, - Highest = 2, Idle = -15, Lowest = -2, + BelowNormal = -1, Normal = 0, + AboveNormal = 1, + Highest = 2, TimeCritical = 15, } public enum ThreadState @@ -246,25 +246,25 @@ public enum ThreadState Running = 2, Standby = 3, Terminated = 4, + Wait = 5, Transition = 6, Unknown = 7, - Wait = 5, } public enum ThreadWaitReason { - EventPairHigh = 7, - EventPairLow = 8, - ExecutionDelay = 4, Executive = 0, FreePage = 1, - LpcReceive = 9, - LpcReply = 10, PageIn = 2, - PageOut = 12, - Suspended = 5, SystemAllocation = 3, - Unknown = 13, + ExecutionDelay = 4, + Suspended = 5, UserRequest = 6, + EventPairHigh = 7, + EventPairLow = 8, + LpcReceive = 9, + LpcReply = 10, VirtualMemory = 11, + PageOut = 12, + Unknown = 13, } } diff --git a/src/System.Diagnostics.StackTrace/ref/System.Diagnostics.StackTrace.cs b/src/System.Diagnostics.StackTrace/ref/System.Diagnostics.StackTrace.cs index 47de75a35b7e..79a70836dac3 100644 --- a/src/System.Diagnostics.StackTrace/ref/System.Diagnostics.StackTrace.cs +++ b/src/System.Diagnostics.StackTrace/ref/System.Diagnostics.StackTrace.cs @@ -159,16 +159,16 @@ public partial interface ISymbolWriter } public enum SymAddressKind { - BitField = 9, ILOffset = 1, - NativeOffset = 5, + NativeRVA = 2, NativeRegister = 3, - NativeRegisterRegister = 6, NativeRegisterRelative = 4, + NativeOffset = 5, + NativeRegisterRegister = 6, NativeRegisterStack = 7, - NativeRVA = 2, - NativeSectionOffset = 10, NativeStackRegister = 8, + BitField = 9, + NativeSectionOffset = 10, } public readonly partial struct SymbolToken { diff --git a/src/System.Diagnostics.TraceSource/ref/System.Diagnostics.TraceSource.cs b/src/System.Diagnostics.TraceSource/ref/System.Diagnostics.TraceSource.cs index 74fe35d6ed19..303f1648d788 100644 --- a/src/System.Diagnostics.TraceSource/ref/System.Diagnostics.TraceSource.cs +++ b/src/System.Diagnostics.TraceSource/ref/System.Diagnostics.TraceSource.cs @@ -49,15 +49,15 @@ public SourceFilter(string source) { } [System.FlagsAttribute] public enum SourceLevels { - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - ActivityTracing = 65280, All = -1, + Off = 0, Critical = 1, Error = 3, + Warning = 7, Information = 15, - Off = 0, Verbose = 31, - Warning = 7, + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] + ActivityTracing = 65280, } public partial class SourceSwitch : System.Diagnostics.Switch { @@ -182,14 +182,14 @@ public enum TraceEventType { Critical = 1, Error = 2, + Warning = 4, Information = 8, - Resume = 2048, + Verbose = 16, Start = 256, Stop = 512, Suspend = 1024, + Resume = 2048, Transfer = 4096, - Verbose = 16, - Warning = 4, } public abstract partial class TraceFilter { @@ -198,11 +198,11 @@ protected TraceFilter() { } } public enum TraceLevel { + Off = 0, Error = 1, + Warning = 2, Info = 3, - Off = 0, Verbose = 4, - Warning = 2, } public abstract partial class TraceListener : System.MarshalByRefObject, System.IDisposable { @@ -272,13 +272,13 @@ void System.Collections.IList.Remove(object value) { } [System.FlagsAttribute] public enum TraceOptions { - Callstack = 32, - DateTime = 2, - LogicalOperationStack = 1, None = 0, + LogicalOperationStack = 1, + DateTime = 2, + Timestamp = 4, ProcessId = 8, ThreadId = 16, - Timestamp = 4, + Callstack = 32, } public partial class TraceSource { diff --git a/src/System.Diagnostics.Tracing/ref/System.Diagnostics.Tracing.cs b/src/System.Diagnostics.Tracing/ref/System.Diagnostics.Tracing.cs index 49ebe319ecf3..4570d8b3feb4 100644 --- a/src/System.Diagnostics.Tracing/ref/System.Diagnostics.Tracing.cs +++ b/src/System.Diagnostics.Tracing/ref/System.Diagnostics.Tracing.cs @@ -10,10 +10,10 @@ namespace System.Diagnostics.Tracing [System.FlagsAttribute] public enum EventActivityOptions { - Detachable = 8, - Disable = 2, None = 0, + Disable = 2, Recursive = 4, + Detachable = 8, } [System.AttributeUsageAttribute(System.AttributeTargets.Method)] public sealed partial class EventAttribute : System.Attribute @@ -32,11 +32,11 @@ public EventAttribute(int eventId) { } } public enum EventChannel : byte { + None = (byte)0, Admin = (byte)16, + Operational = (byte)17, Analytic = (byte)18, Debug = (byte)19, - None = (byte)0, - Operational = (byte)17, } public enum EventCommand { @@ -69,13 +69,13 @@ public EventFieldAttribute() { } } public enum EventFieldFormat { - Boolean = 3, Default = 0, - Hexadecimal = 4, - HResult = 15, - Json = 12, String = 2, + Boolean = 3, + Hexadecimal = 4, Xml = 11, + Json = 12, + HResult = 15, } [System.FlagsAttribute] public enum EventFieldTags @@ -91,24 +91,24 @@ public EventIgnoreAttribute() { } public enum EventKeywords : long { All = (long)-1, - AuditFailure = (long)4503599627370496, - AuditSuccess = (long)9007199254740992, - CorrelationHint = (long)4503599627370496, - EventLogClassic = (long)36028797018963968, - MicrosoftTelemetry = (long)562949953421312, None = (long)0, - Sqm = (long)2251799813685248, + MicrosoftTelemetry = (long)562949953421312, WdiContext = (long)562949953421312, WdiDiagnostic = (long)1125899906842624, + Sqm = (long)2251799813685248, + AuditFailure = (long)4503599627370496, + CorrelationHint = (long)4503599627370496, + AuditSuccess = (long)9007199254740992, + EventLogClassic = (long)36028797018963968, } public enum EventLevel { + LogAlways = 0, Critical = 1, Error = 2, + Warning = 3, Informational = 4, - LogAlways = 0, Verbose = 5, - Warning = 3, } public abstract partial class EventListener : System.IDisposable { @@ -127,25 +127,25 @@ protected internal virtual void OnEventWritten(System.Diagnostics.Tracing.EventW [System.FlagsAttribute] public enum EventManifestOptions { - AllCultures = 2, - AllowEventSourceOverride = 8, None = 0, - OnlyIfNeededForRegistration = 4, Strict = 1, + AllCultures = 2, + OnlyIfNeededForRegistration = 4, + AllowEventSourceOverride = 8, } public enum EventOpcode { + Info = 0, + Start = 1, + Stop = 2, DataCollectionStart = 3, DataCollectionStop = 4, Extension = 5, - Info = 0, - Receive = 240, Reply = 6, Resume = 7, - Send = 9, - Start = 1, - Stop = 2, Suspend = 8, + Send = 9, + Receive = 240, } public partial class EventSource : System.IDisposable { @@ -250,9 +250,9 @@ public partial struct EventSourceOptions public enum EventSourceSettings { Default = 0, + ThrowOnEventWriteErrors = 1, EtwManifestEventFormat = 4, EtwSelfDescribingEventFormat = 8, - ThrowOnEventWriteErrors = 1, } [System.FlagsAttribute] public enum EventTags diff --git a/src/System.DirectoryServices.AccountManagement/ref/System.DirectoryServices.AccountManagement.cs b/src/System.DirectoryServices.AccountManagement/ref/System.DirectoryServices.AccountManagement.cs index cb3d8eea6e07..b39a9345e857 100644 --- a/src/System.DirectoryServices.AccountManagement/ref/System.DirectoryServices.AccountManagement.cs +++ b/src/System.DirectoryServices.AccountManagement/ref/System.DirectoryServices.AccountManagement.cs @@ -78,17 +78,17 @@ public ComputerPrincipal(System.DirectoryServices.AccountManagement.PrincipalCon public enum ContextOptions { Negotiate = 1, - Sealing = 16, + SimpleBind = 2, SecureSocketLayer = 4, - ServerBind = 32, Signing = 8, - SimpleBind = 2, + Sealing = 16, + ServerBind = 32, } public enum ContextType { - ApplicationDirectory = 2, - Domain = 1, Machine = 0, + Domain = 1, + ApplicationDirectory = 2, } [System.AttributeUsageAttribute(System.AttributeTargets.Class, AllowMultiple=true)] public sealed partial class DirectoryObjectClassAttribute : System.Attribute @@ -127,27 +127,27 @@ public override void Dispose() { } } public enum GroupScope { - Global = 1, Local = 0, + Global = 1, Universal = 2, } public enum IdentityType { - DistinguishedName = 3, - Guid = 5, - Name = 1, SamAccountName = 0, - Sid = 4, + Name = 1, UserPrincipalName = 2, + DistinguishedName = 3, + Sid = 4, + Guid = 5, } public enum MatchType { Equals = 0, + NotEquals = 1, GreaterThan = 2, GreaterThanOrEquals = 3, LessThan = 4, LessThanOrEquals = 5, - NotEquals = 1, } public partial class MultipleMatchesException : System.DirectoryServices.AccountManagement.PrincipalException { diff --git a/src/System.DirectoryServices.Protocols/ref/System.DirectoryServices.Protocols.cs b/src/System.DirectoryServices.Protocols/ref/System.DirectoryServices.Protocols.cs index 9102c63dca3b..d2547363c254 100644 --- a/src/System.DirectoryServices.Protocols/ref/System.DirectoryServices.Protocols.cs +++ b/src/System.DirectoryServices.Protocols/ref/System.DirectoryServices.Protocols.cs @@ -35,14 +35,14 @@ public enum AuthType { Anonymous = 0, Basic = 1, + Negotiate = 2, + Ntlm = 3, Digest = 4, + Sicily = 5, Dpa = 6, + Msn = 7, External = 8, Kerberos = 9, - Msn = 7, - Negotiate = 2, - Ntlm = 3, - Sicily = 5, } public partial class BerConversionException : System.DirectoryServices.Protocols.DirectoryException { @@ -89,10 +89,10 @@ internal DeleteResponse() { } } public enum DereferenceAlias { - Always = 3, - FindingBaseObject = 2, - InSearching = 1, Never = 0, + InSearching = 1, + FindingBaseObject = 2, + Always = 3, } public delegate void DereferenceConnectionCallback(System.DirectoryServices.Protocols.LdapConnection primaryConnection, System.DirectoryServices.Protocols.LdapConnection connectionToDereference); public partial class DirectoryAttribute : System.Collections.CollectionBase @@ -238,11 +238,11 @@ internal DirectoryResponse() { } [System.FlagsAttribute] public enum DirectorySynchronizationOptions : long { - IncrementalValues = (long)2147483648, None = (long)0, ObjectSecurity = (long)1, ParentsFirst = (long)2048, PublicDataOnly = (long)8192, + IncrementalValues = (long)2147483648, } public partial class DirSyncRequestControl : System.DirectoryServices.Protocols.DirectoryControl { @@ -388,23 +388,23 @@ public void StopTransportLayerSecurity() { } [System.FlagsAttribute] public enum LocatorFlags : long { - AvoidSelf = (long)16384, - DirectoryServicesPreferred = (long)32, - DirectoryServicesRequired = (long)16, + None = (long)0, ForceRediscovery = (long)1, + DirectoryServicesRequired = (long)16, + DirectoryServicesPreferred = (long)32, GCRequired = (long)64, - GoodTimeServerPreferred = (long)8192, + PdcRequired = (long)128, IPRequired = (long)512, - IsDnsName = (long)131072, - IsFlatName = (long)65536, KdcRequired = (long)1024, - None = (long)0, + TimeServerRequired = (long)2048, + WriteableRequired = (long)4096, + GoodTimeServerPreferred = (long)8192, + AvoidSelf = (long)16384, OnlyLdapNeeded = (long)32768, - PdcRequired = (long)128, + IsFlatName = (long)65536, + IsDnsName = (long)131072, ReturnDnsName = (long)1073741824, ReturnFlatName = (long)2147483648, - TimeServerRequired = (long)2048, - WriteableRequired = (long)4096, } public partial class ModifyDNRequest : System.DirectoryServices.Protocols.DirectoryRequest { @@ -484,56 +484,56 @@ public ReferralCallback() { } [System.FlagsAttribute] public enum ReferralChasingOptions { - All = 96, - External = 64, None = 0, Subordinate = 32, + External = 64, + All = 96, } public enum ResultCode { - AdminLimitExceeded = 11, - AffectsMultipleDsas = 71, - AliasDereferencingProblem = 36, - AliasProblem = 33, - AttributeOrValueExists = 20, - AuthMethodNotSupported = 7, - Busy = 51, + Success = 0, + OperationsError = 1, + ProtocolError = 2, + TimeLimitExceeded = 3, + SizeLimitExceeded = 4, CompareFalse = 5, CompareTrue = 6, + AuthMethodNotSupported = 7, + StrongAuthRequired = 8, + ReferralV2 = 9, + Referral = 10, + AdminLimitExceeded = 11, + UnavailableCriticalExtension = 12, ConfidentialityRequired = 13, - ConstraintViolation = 19, - EntryAlreadyExists = 68, - InappropriateAuthentication = 48, + SaslBindInProgress = 14, + NoSuchAttribute = 16, + UndefinedAttributeType = 17, InappropriateMatching = 18, - InsufficientAccessRights = 50, + ConstraintViolation = 19, + AttributeOrValueExists = 20, InvalidAttributeSyntax = 21, + NoSuchObject = 32, + AliasProblem = 33, InvalidDNSyntax = 34, + AliasDereferencingProblem = 36, + InappropriateAuthentication = 48, + InsufficientAccessRights = 50, + Busy = 51, + Unavailable = 52, + UnwillingToPerform = 53, LoopDetect = 54, + SortControlMissing = 60, + OffsetRangeError = 61, NamingViolation = 64, - NoSuchAttribute = 16, - NoSuchObject = 32, + ObjectClassViolation = 65, NotAllowedOnNonLeaf = 66, NotAllowedOnRdn = 67, + EntryAlreadyExists = 68, ObjectClassModificationsProhibited = 69, - ObjectClassViolation = 65, - OffsetRangeError = 61, - OperationsError = 1, - Other = 80, - ProtocolError = 2, - Referral = 10, - ReferralV2 = 9, ResultsTooLarge = 70, - SaslBindInProgress = 14, - SizeLimitExceeded = 4, - SortControlMissing = 60, - StrongAuthRequired = 8, - Success = 0, - TimeLimitExceeded = 3, - Unavailable = 52, - UnavailableCriticalExtension = 12, - UndefinedAttributeType = 17, - UnwillingToPerform = 53, + AffectsMultipleDsas = 71, VirtualListViewError = 76, + Other = 80, } public enum SearchOption { @@ -625,10 +625,10 @@ public partial class SecurityDescriptorFlagControl : System.DirectoryServices.Pr [System.FlagsAttribute] public enum SecurityMasks { - Dacl = 4, - Group = 2, None = 0, Owner = 1, + Group = 2, + Dacl = 4, Sacl = 8, } public partial class SecurityPackageContextConnectionInformation @@ -644,14 +644,14 @@ internal SecurityPackageContextConnectionInformation() { } } public enum SecurityProtocol { - Pct1Client = 2, Pct1Server = 1, - Ssl2Client = 8, + Pct1Client = 2, Ssl2Server = 4, - Ssl3Client = 32, + Ssl2Client = 8, Ssl3Server = 16, - Tls1Client = 128, + Ssl3Client = 32, Tls1Server = 64, + Tls1Client = 128, } public partial class ShowDeletedControl : System.DirectoryServices.Protocols.DirectoryControl { diff --git a/src/System.DirectoryServices/ref/System.DirectoryServices.cs b/src/System.DirectoryServices/ref/System.DirectoryServices.cs index 94b8e19f9247..f2a06dcaf758 100644 --- a/src/System.DirectoryServices/ref/System.DirectoryServices.cs +++ b/src/System.DirectoryServices/ref/System.DirectoryServices.cs @@ -32,25 +32,25 @@ public partial class ActiveDirectoryAuditRule : System.Security.AccessControl.Ob [System.FlagsAttribute] public enum ActiveDirectoryRights { - AccessSystemSecurity = 16777216, CreateChild = 1, - Delete = 65536, DeleteChild = 2, + ListChildren = 4, + Self = 8, + ReadProperty = 16, + WriteProperty = 32, DeleteTree = 64, + ListObject = 128, ExtendedRight = 256, - GenericAll = 983551, + Delete = 65536, + ReadControl = 131072, GenericExecute = 131076, - GenericRead = 131220, GenericWrite = 131112, - ListChildren = 4, - ListObject = 128, - ReadControl = 131072, - ReadProperty = 16, - Self = 8, - Synchronize = 1048576, + GenericRead = 131220, WriteDacl = 262144, WriteOwner = 524288, - WriteProperty = 32, + GenericAll = 983551, + Synchronize = 1048576, + AccessSystemSecurity = 16777216, } public partial class ActiveDirectorySecurity : System.Security.AccessControl.DirectoryObjectSecurity { @@ -80,26 +80,26 @@ public void SetAuditRule(System.DirectoryServices.ActiveDirectoryAuditRule rule) } public enum ActiveDirectorySecurityInheritance { + None = 0, All = 1, - Children = 4, Descendents = 2, - None = 0, SelfAndChildren = 3, + Children = 4, } [System.FlagsAttribute] public enum AuthenticationTypes { - Anonymous = 16, - Delegation = 256, - Encryption = 2, - FastBind = 32, None = 0, - ReadonlyServer = 4, - Sealing = 128, Secure = 1, + Encryption = 2, SecureSocketsLayer = 2, - ServerBind = 512, + ReadonlyServer = 4, + Anonymous = 16, + FastBind = 32, Signing = 64, + Sealing = 128, + Delegation = 256, + ServerBind = 512, } public sealed partial class CreateChildAccessRule : System.DirectoryServices.ActiveDirectoryAccessRule { @@ -127,10 +127,10 @@ public sealed partial class DeleteTreeAccessRule : System.DirectoryServices.Acti } public enum DereferenceAlias { - Always = 3, - FindingBaseObject = 2, - InSearching = 1, Never = 0, + InSearching = 1, + FindingBaseObject = 2, + Always = 3, } public partial class DirectoryEntries : System.Collections.IEnumerable { @@ -271,8 +271,8 @@ public DirectoryServicesPermission(System.Security.Permissions.PermissionState s [System.FlagsAttribute] public enum DirectoryServicesPermissionAccess { - Browse = 2, None = 0, + Browse = 2, Write = 6, } [System.AttributeUsageAttribute(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Event | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)] @@ -323,11 +323,11 @@ public void ResetDirectorySynchronizationCookie(byte[] cookie) { } [System.FlagsAttribute] public enum DirectorySynchronizationOptions : long { - IncrementalValues = (long)2147483648, None = (long)0, ObjectSecurity = (long)1, ParentsFirst = (long)2048, PublicDataOnly = (long)8192, + IncrementalValues = (long)2147483648, } public partial class DirectoryVirtualListView { @@ -359,8 +359,8 @@ public DirectoryVirtualListViewContext() { } } public enum ExtendedDN { - HexString = 0, None = -1, + HexString = 0, Standard = 1, } public sealed partial class ExtendedRightAccessRule : System.DirectoryServices.ActiveDirectoryAccessRule @@ -380,8 +380,8 @@ public sealed partial class ListChildrenAccessRule : System.DirectoryServices.Ac } public enum PasswordEncodingMethod { - PasswordEncodingClear = 1, PasswordEncodingSsl = 0, + PasswordEncodingClear = 1, } public enum PropertyAccess { @@ -447,10 +447,10 @@ public void Remove(object value) { } } public enum ReferralChasingOption { - All = 96, - External = 64, None = 0, Subordinate = 32, + External = 64, + All = 96, } public partial class ResultPropertyCollection : System.Collections.DictionaryBase { @@ -531,10 +531,10 @@ public enum SearchScope [System.FlagsAttribute] public enum SecurityMasks { - Dacl = 4, - Group = 2, None = 0, Owner = 1, + Group = 2, + Dacl = 4, Sacl = 8, } public enum SortDirection @@ -619,11 +619,11 @@ public void CopyTo(System.DirectoryServices.ActiveDirectory.AttributeMetadata[] } public enum ActiveDirectoryRole { - InfrastructureRole = 4, + SchemaRole = 0, NamingRole = 1, PdcRole = 2, RidRole = 3, - SchemaRole = 0, + InfrastructureRole = 4, } public partial class ActiveDirectoryRoleCollection : System.Collections.ReadOnlyCollectionBase { @@ -870,18 +870,18 @@ public void Remove(System.DirectoryServices.ActiveDirectory.ActiveDirectorySiteL [System.FlagsAttribute] public enum ActiveDirectorySiteOptions { - AutoInterSiteTopologyDisabled = 16, - AutoMinimumHopDisabled = 4, + None = 0, AutoTopologyDisabled = 1, - ForceKccWindows2003Behavior = 64, + TopologyCleanupDisabled = 2, + AutoMinimumHopDisabled = 4, + StaleServerDetectDisabled = 8, + AutoInterSiteTopologyDisabled = 16, GroupMembershipCachingEnabled = 32, - None = 0, + ForceKccWindows2003Behavior = 64, + UseWindows2000IstgElection = 128, RandomBridgeHeaderServerSelectionDisabled = 256, - RedundantServerTopologyEnabled = 1024, - StaleServerDetectDisabled = 8, - TopologyCleanupDisabled = 2, UseHashingForReplicationSchedule = 512, - UseWindows2000IstgElection = 128, + RedundantServerTopologyEnabled = 1024, } public partial class ActiveDirectorySubnet : System.IDisposable { @@ -919,29 +919,29 @@ public void Remove(System.DirectoryServices.ActiveDirectory.ActiveDirectorySubne } public enum ActiveDirectorySyntax { - AccessPointDN = 19, - Bool = 8, CaseExactString = 0, CaseIgnoreString = 1, + NumericString = 2, DirectoryString = 3, + OctetString = 4, + SecurityDescriptor = 5, + Int = 6, + Int64 = 7, + Bool = 8, + Oid = 9, + GeneralizedTime = 10, + UtcTime = 11, DN = 12, DNWithBinary = 13, DNWithString = 14, Enumeration = 15, - GeneralizedTime = 10, IA5String = 16, - Int = 6, - Int64 = 7, - NumericString = 2, - OctetString = 4, - Oid = 9, + PrintableString = 17, + Sid = 18, + AccessPointDN = 19, ORName = 20, PresentationAddress = 21, - PrintableString = 17, ReplicaLink = 22, - SecurityDescriptor = 5, - Sid = 18, - UtcTime = 11, } public enum ActiveDirectoryTransportType { @@ -991,8 +991,8 @@ public void CopyTo(System.DirectoryServices.ActiveDirectory.AdamInstance[] adamI } public enum AdamRole { - NamingRole = 1, SchemaRole = 0, + NamingRole = 1, } public partial class AdamRoleCollection : System.Collections.ReadOnlyCollectionBase { @@ -1086,11 +1086,11 @@ public DirectoryContext(System.DirectoryServices.ActiveDirectory.DirectoryContex } public enum DirectoryContextType { - ApplicationPartition = 4, - ConfigurationSet = 3, - DirectoryServer = 2, Domain = 0, Forest = 1, + DirectoryServer = 2, + ConfigurationSet = 3, + ApplicationPartition = 4, } public abstract partial class DirectoryServer : System.IDisposable { @@ -1191,11 +1191,11 @@ public void CopyTo(System.DirectoryServices.ActiveDirectory.Domain[] domains, in [System.FlagsAttribute] public enum DomainCollisionOptions { - NetBiosNameDisabledByAdmin = 4, - NetBiosNameDisabledByConflict = 8, None = 0, SidDisabledByAdmin = 1, SidDisabledByConflict = 2, + NetBiosNameDisabledByAdmin = 4, + NetBiosNameDisabledByConflict = 8, } public partial class DomainController : System.DirectoryServices.ActiveDirectory.DirectoryServer { @@ -1249,12 +1249,12 @@ public enum DomainMode Unknown = -1, Windows2000MixedDomain = 0, Windows2000NativeDomain = 1, - Windows2003Domain = 3, Windows2003InterimDomain = 2, + Windows2003Domain = 3, Windows2008Domain = 4, Windows2008R2Domain = 5, - Windows2012R2Domain = 7, Windows8Domain = 6, + Windows2012R2Domain = 7, } public partial class Forest : System.IDisposable { @@ -1306,12 +1306,12 @@ public enum ForestMode { Unknown = -1, Windows2000Forest = 0, - Windows2003Forest = 2, Windows2003InterimForest = 1, + Windows2003Forest = 2, Windows2008Forest = 3, Windows2008R2Forest = 4, - Windows2012R2Forest = 6, Windows8Forest = 5, + Windows2012R2Forest = 6, } public partial class ForestTrustCollisionException : System.DirectoryServices.ActiveDirectory.ActiveDirectoryOperationException, System.Runtime.Serialization.ISerializable { @@ -1325,9 +1325,9 @@ public override void GetObjectData(System.Runtime.Serialization.SerializationInf } public enum ForestTrustCollisionType { + TopLevelName = 0, Domain = 1, Other = 2, - TopLevelName = 0, } public partial class ForestTrustDomainInfoCollection : System.Collections.ReadOnlyCollectionBase { @@ -1348,10 +1348,10 @@ internal ForestTrustDomainInformation() { } public enum ForestTrustDomainStatus { Enabled = 0, - NetBiosNameAdminDisabled = 4, - NetBiosNameConflictDisabled = 8, SidAdminDisabled = 1, SidConflictDisabled = 2, + NetBiosNameAdminDisabled = 4, + NetBiosNameConflictDisabled = 8, } public partial class ForestTrustRelationshipCollision { @@ -1403,51 +1403,51 @@ public void CopyTo(System.DirectoryServices.ActiveDirectory.GlobalCatalog[] glob } public enum HourOfDay { - Eight = 8, - Eighteen = 18, - Eleven = 11, - Fifteen = 15, - Five = 5, - Four = 4, - Fourteen = 14, - Nine = 9, - Nineteen = 19, + Zero = 0, One = 1, - Seven = 7, - Seventeen = 17, + Two = 2, + Three = 3, + Four = 4, + Five = 5, Six = 6, - Sixteen = 16, + Seven = 7, + Eight = 8, + Nine = 9, Ten = 10, - Thirteen = 13, - Three = 3, + Eleven = 11, Twelve = 12, + Thirteen = 13, + Fourteen = 14, + Fifteen = 15, + Sixteen = 16, + Seventeen = 17, + Eighteen = 18, + Nineteen = 19, Twenty = 20, TwentyOne = 21, - TwentyThree = 23, TwentyTwo = 22, - Two = 2, - Zero = 0, + TwentyThree = 23, } [System.FlagsAttribute] public enum LocatorOptions : long { - AvoidSelf = (long)16384, ForceRediscovery = (long)1, KdcRequired = (long)1024, TimeServerRequired = (long)2048, WriteableRequired = (long)4096, + AvoidSelf = (long)16384, } public enum MinuteOfHour { + Zero = 0, Fifteen = 15, - FortyFive = 45, Thirty = 30, - Zero = 0, + FortyFive = 45, } public enum NotificationStatus { - IntraSiteOnly = 1, NoNotification = 0, + IntraSiteOnly = 1, NotificationAlways = 2, } [System.FlagsAttribute] @@ -1599,21 +1599,21 @@ internal ReplicationNeighbor() { } [System.FlagsAttribute] public enum ReplicationNeighborOptions : long { - CompressChanges = (long)268435456, - DisableScheduledSync = (long)134217728, + Writeable = (long)16, + SyncOnStartup = (long)32, + ScheduledSync = (long)64, + UseInterSiteTransport = (long)128, + TwoWaySync = (long)512, + ReturnObjectParent = (long)2048, FullSyncInProgress = (long)65536, FullSyncNextPacket = (long)131072, - IgnoreChangeNotifications = (long)67108864, NeverSynced = (long)2097152, + Preempted = (long)16777216, + IgnoreChangeNotifications = (long)67108864, + DisableScheduledSync = (long)134217728, + CompressChanges = (long)268435456, NoChangeNotifications = (long)536870912, PartialAttributeSet = (long)1073741824, - Preempted = (long)16777216, - ReturnObjectParent = (long)2048, - ScheduledSync = (long)64, - SyncOnStartup = (long)32, - TwoWaySync = (long)512, - UseInterSiteTransport = (long)128, - Writeable = (long)16, } } public partial class ReplicationNeighborCollection : System.Collections.ReadOnlyCollectionBase @@ -1651,29 +1651,29 @@ public ReplicationOperationInformation() { } } public enum ReplicationOperationType { + Sync = 0, Add = 1, Delete = 2, Modify = 3, - Sync = 0, UpdateReference = 4, } public enum ReplicationSecurityLevel { - MutualAuthentication = 2, - Negotiate = 1, NegotiatePassThrough = 0, + Negotiate = 1, + MutualAuthentication = 2, } public enum ReplicationSpan { - InterSite = 1, IntraSite = 0, + InterSite = 1, } public enum SchemaClassType { + Type88 = 0, + Structural = 1, Abstract = 2, Auxiliary = 3, - Structural = 1, - Type88 = 0, } public enum SyncFromAllServersErrorCategory { @@ -1693,9 +1693,9 @@ internal SyncFromAllServersErrorInformation() { } public enum SyncFromAllServersEvent { Error = 0, - Finished = 3, - SyncCompleted = 2, SyncStarted = 1, + SyncCompleted = 2, + Finished = 3, } public partial class SyncFromAllServersOperationException : System.DirectoryServices.ActiveDirectory.ActiveDirectoryOperationException, System.Runtime.Serialization.ISerializable { @@ -1710,13 +1710,13 @@ public override void GetObjectData(System.Runtime.Serialization.SerializationInf [System.FlagsAttribute] public enum SyncFromAllServersOptions { + None = 0, AbortIfServerUnavailable = 1, + SyncAdjacentServerOnly = 2, CheckServerAlivenessOnly = 8, - CrossSite = 64, - None = 0, - PushChangeOutward = 32, SkipInitialCheck = 16, - SyncAdjacentServerOnly = 2, + PushChangeOutward = 32, + CrossSite = 64, } public delegate bool SyncUpdateCallback(System.DirectoryServices.ActiveDirectory.SyncFromAllServersEvent eventType, string targetServer, string sourceServer, System.DirectoryServices.ActiveDirectory.SyncFromAllServersOperationException exception); public partial class TopLevelName @@ -1736,23 +1736,23 @@ public void CopyTo(System.DirectoryServices.ActiveDirectory.TopLevelName[] names [System.FlagsAttribute] public enum TopLevelNameCollisionOptions { + None = 0, + NewlyCreated = 1, DisabledByAdmin = 2, DisabledByConflict = 4, - NewlyCreated = 1, - None = 0, } public enum TopLevelNameStatus { - AdminDisabled = 2, - ConflictDisabled = 4, Enabled = 0, NewlyCreated = 1, + AdminDisabled = 2, + ConflictDisabled = 4, } public enum TrustDirection { - Bidirectional = 3, Inbound = 1, Outbound = 2, + Bidirectional = 3, } public partial class TrustRelationshipInformation { @@ -1772,12 +1772,12 @@ public void CopyTo(System.DirectoryServices.ActiveDirectory.TrustRelationshipInf } public enum TrustType { + TreeRoot = 0, + ParentChild = 1, CrossLink = 2, External = 3, Forest = 4, Kerberos = 5, - ParentChild = 1, - TreeRoot = 0, Unknown = 6, } } diff --git a/src/System.Drawing.Common/ref/System.Drawing.Common.cs b/src/System.Drawing.Common/ref/System.Drawing.Common.cs index c7c70e633c58..95cdc3adf830 100644 --- a/src/System.Drawing.Common/ref/System.Drawing.Common.cs +++ b/src/System.Drawing.Common/ref/System.Drawing.Common.cs @@ -249,35 +249,35 @@ public static partial class ColorTranslator } public enum ContentAlignment { - BottomCenter = 512, - BottomLeft = 256, - BottomRight = 1024, - MiddleCenter = 32, - MiddleLeft = 16, - MiddleRight = 64, - TopCenter = 2, TopLeft = 1, + TopCenter = 2, TopRight = 4, + MiddleLeft = 16, + MiddleCenter = 32, + MiddleRight = 64, + BottomLeft = 256, + BottomCenter = 512, + BottomRight = 1024, } public enum CopyPixelOperation { - Blackness = 66, - CaptureBlt = 1073741824, - DestinationInvert = 5570569, - MergeCopy = 12583114, - MergePaint = 12255782, NoMirrorBitmap = -2147483648, - NotSourceCopy = 3342344, + Blackness = 66, NotSourceErase = 1114278, - PatCopy = 15728673, + NotSourceCopy = 3342344, + SourceErase = 4457256, + DestinationInvert = 5570569, PatInvert = 5898313, - PatPaint = 16452105, + SourceInvert = 6684742, SourceAnd = 8913094, + MergePaint = 12255782, + MergeCopy = 12583114, SourceCopy = 13369376, - SourceErase = 4457256, - SourceInvert = 6684742, SourcePaint = 15597702, + PatCopy = 15728673, + PatPaint = 16452105, Whiteness = 16711778, + CaptureBlt = 1073741824, } #if netcoreapp [System.ComponentModel.TypeConverterAttribute("System.Drawing.FontConverter, System.Windows.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51")] @@ -372,11 +372,11 @@ public void Dispose() { } [System.FlagsAttribute] public enum FontStyle { + Regular = 0, Bold = 1, Italic = 2, - Regular = 0, - Strikeout = 8, Underline = 4, + Strikeout = 8, } public sealed partial class Graphics : System.MarshalByRefObject, System.Drawing.IDeviceContext, System.IDisposable { @@ -632,13 +632,13 @@ public void TranslateTransform(float dx, float dy, System.Drawing.Drawing2D.Matr } public enum GraphicsUnit { + World = 0, Display = 1, - Document = 5, - Inch = 4, - Millimeter = 6, Pixel = 2, Point = 3, - World = 0, + Inch = 4, + Document = 5, + Millimeter = 6, } #if netcoreapp [System.ComponentModel.TypeConverterAttribute("System.Drawing.IconConverter, System.Windows.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51")] @@ -996,22 +996,22 @@ public void Xor(System.Drawing.Region region) { } } public enum RotateFlipType { - Rotate180FlipNone = 2, - Rotate180FlipX = 6, Rotate180FlipXY = 0, - Rotate180FlipY = 4, - Rotate270FlipNone = 3, - Rotate270FlipX = 7, + RotateNoneFlipNone = 0, Rotate270FlipXY = 1, - Rotate270FlipY = 5, Rotate90FlipNone = 1, - Rotate90FlipX = 5, + Rotate180FlipNone = 2, + RotateNoneFlipXY = 2, + Rotate270FlipNone = 3, Rotate90FlipXY = 3, - Rotate90FlipY = 7, - RotateNoneFlipNone = 0, + Rotate180FlipY = 4, RotateNoneFlipX = 4, - RotateNoneFlipXY = 2, + Rotate270FlipY = 5, + Rotate90FlipX = 5, + Rotate180FlipX = 6, RotateNoneFlipY = 6, + Rotate270FlipX = 7, + Rotate90FlipY = 7, } public sealed partial class SolidBrush : System.Drawing.Brush { @@ -1022,16 +1022,16 @@ protected override void Dispose(bool disposing) { } } public enum StringAlignment { + Near = 0, Center = 1, Far = 2, - Near = 0, } public enum StringDigitSubstitute { - National = 2, + User = 0, None = 1, + National = 2, Traditional = 3, - User = 0, } public sealed partial class StringFormat : System.MarshalByRefObject, System.ICloneable, System.IDisposable { @@ -1062,33 +1062,33 @@ public enum StringFormatFlags { DirectionRightToLeft = 1, DirectionVertical = 2, - DisplayFormatControl = 32, FitBlackBox = 4, - LineLimit = 8192, - MeasureTrailingSpaces = 2048, - NoClip = 16384, + DisplayFormatControl = 32, NoFontFallback = 1024, + MeasureTrailingSpaces = 2048, NoWrap = 4096, + LineLimit = 8192, + NoClip = 16384, } public enum StringTrimming { + None = 0, Character = 1, + Word = 2, EllipsisCharacter = 3, - EllipsisPath = 5, EllipsisWord = 4, - None = 0, - Word = 2, + EllipsisPath = 5, } public enum StringUnit { + World = 0, Display = 1, - Document = 5, - Em = 32, - Inch = 4, - Millimeter = 6, Pixel = 2, Point = 3, - World = 0, + Inch = 4, + Document = 5, + Millimeter = 6, + Em = 32, } public static partial class SystemBrushes { @@ -1305,32 +1305,32 @@ public ColorBlend(int count) { } } public enum CombineMode { - Complement = 5, - Exclude = 4, - Intersect = 1, Replace = 0, + Intersect = 1, Union = 2, Xor = 3, + Exclude = 4, + Complement = 5, } public enum CompositingMode { - SourceCopy = 1, SourceOver = 0, + SourceCopy = 1, } public enum CompositingQuality { - AssumeLinear = 4, + Invalid = -1, Default = 0, - GammaCorrected = 3, - HighQuality = 2, HighSpeed = 1, - Invalid = -1, + HighQuality = 2, + GammaCorrected = 3, + AssumeLinear = 4, } public enum CoordinateSpace { - Device = 2, - Page = 1, World = 0, + Page = 1, + Device = 2, } public partial class CustomLineCap : System.MarshalByRefObject, System.ICloneable, System.IDisposable { @@ -1356,12 +1356,12 @@ public enum DashCap } public enum DashStyle { - Custom = 5, + Solid = 0, Dash = 1, + Dot = 2, DashDot = 3, DashDotDot = 4, - Dot = 2, - Solid = 0, + Custom = 5, } public enum FillMode { @@ -1508,36 +1508,15 @@ public HatchBrush(System.Drawing.Drawing2D.HatchStyle hatchstyle, System.Drawing } public enum HatchStyle { + Horizontal = 0, + Min = 0, + Vertical = 1, + ForwardDiagonal = 2, BackwardDiagonal = 3, Cross = 4, - DarkDownwardDiagonal = 20, - DarkHorizontal = 29, - DarkUpwardDiagonal = 21, - DarkVertical = 28, - DashedDownwardDiagonal = 30, - DashedHorizontal = 32, - DashedUpwardDiagonal = 31, - DashedVertical = 33, - DiagonalBrick = 38, - DiagonalCross = 5, - Divot = 42, - DottedDiamond = 44, - DottedGrid = 43, - ForwardDiagonal = 2, - Horizontal = 0, - HorizontalBrick = 39, - LargeCheckerBoard = 50, - LargeConfetti = 35, LargeGrid = 4, - LightDownwardDiagonal = 18, - LightHorizontal = 25, - LightUpwardDiagonal = 19, - LightVertical = 24, Max = 4, - Min = 0, - NarrowHorizontal = 27, - NarrowVertical = 26, - OutlinedDiamond = 51, + DiagonalCross = 5, Percent05 = 6, Percent10 = 7, Percent20 = 8, @@ -1550,32 +1529,53 @@ public enum HatchStyle Percent75 = 15, Percent80 = 16, Percent90 = 17, + LightDownwardDiagonal = 18, + LightUpwardDiagonal = 19, + DarkDownwardDiagonal = 20, + DarkUpwardDiagonal = 21, + WideDownwardDiagonal = 22, + WideUpwardDiagonal = 23, + LightVertical = 24, + LightHorizontal = 25, + NarrowVertical = 26, + NarrowHorizontal = 27, + DarkVertical = 28, + DarkHorizontal = 29, + DashedDownwardDiagonal = 30, + DashedUpwardDiagonal = 31, + DashedHorizontal = 32, + DashedVertical = 33, + SmallConfetti = 34, + LargeConfetti = 35, + ZigZag = 36, + Wave = 37, + DiagonalBrick = 38, + HorizontalBrick = 39, + Weave = 40, Plaid = 41, + Divot = 42, + DottedGrid = 43, + DottedDiamond = 44, Shingle = 45, - SmallCheckerBoard = 49, - SmallConfetti = 34, + Trellis = 46, + Sphere = 47, SmallGrid = 48, + SmallCheckerBoard = 49, + LargeCheckerBoard = 50, + OutlinedDiamond = 51, SolidDiamond = 52, - Sphere = 47, - Trellis = 46, - Vertical = 1, - Wave = 37, - Weave = 40, - WideDownwardDiagonal = 22, - WideUpwardDiagonal = 23, - ZigZag = 36, } public enum InterpolationMode { - Bicubic = 4, - Bilinear = 3, - Default = 0, - High = 2, - HighQualityBicubic = 7, - HighQualityBilinear = 6, Invalid = -1, + Default = 0, Low = 1, + High = 2, + Bilinear = 3, + Bicubic = 4, NearestNeighbor = 5, + HighQualityBilinear = 6, + HighQualityBicubic = 7, } public sealed partial class LinearGradientBrush : System.Drawing.Brush { @@ -1611,31 +1611,31 @@ public void TranslateTransform(float dx, float dy, System.Drawing.Drawing2D.Matr } public enum LinearGradientMode { - BackwardDiagonal = 3, - ForwardDiagonal = 2, Horizontal = 0, Vertical = 1, + ForwardDiagonal = 2, + BackwardDiagonal = 3, } public enum LineCap { - AnchorMask = 240, - ArrowAnchor = 20, - Custom = 255, - DiamondAnchor = 19, Flat = 0, - NoAnchor = 16, - Round = 2, - RoundAnchor = 18, Square = 1, - SquareAnchor = 17, + Round = 2, Triangle = 3, + NoAnchor = 16, + SquareAnchor = 17, + RoundAnchor = 18, + DiamondAnchor = 19, + ArrowAnchor = 20, + AnchorMask = 240, + Custom = 255, } public enum LineJoin { - Bevel = 1, Miter = 0, - MiterClipped = 3, + Bevel = 1, Round = 2, + MiterClipped = 3, } public sealed partial class Matrix : System.MarshalByRefObject, System.IDisposable { @@ -1675,8 +1675,8 @@ public void VectorTransformPoints(System.Drawing.Point[] pts) { } } public enum MatrixOrder { - Append = 1, Prepend = 0, + Append = 1, } public sealed partial class PathData { @@ -1717,46 +1717,46 @@ public void TranslateTransform(float dx, float dy, System.Drawing.Drawing2D.Matr } public enum PathPointType { + Start = 0, + Line = 1, Bezier = 3, Bezier3 = 3, - CloseSubpath = 128, + PathTypeMask = 7, DashMode = 16, - Line = 1, PathMarker = 32, - PathTypeMask = 7, - Start = 0, + CloseSubpath = 128, } public enum PenAlignment { Center = 0, Inset = 1, - Left = 3, Outset = 2, + Left = 3, Right = 4, } public enum PenType { - HatchFill = 1, - LinearGradient = 4, - PathGradient = 3, SolidColor = 0, + HatchFill = 1, TextureFill = 2, + PathGradient = 3, + LinearGradient = 4, } public enum PixelOffsetMode { + Invalid = -1, Default = 0, - Half = 4, - HighQuality = 2, HighSpeed = 1, - Invalid = -1, + HighQuality = 2, None = 3, + Half = 4, } public enum QualityMode { + Invalid = -1, Default = 0, + Low = 1, High = 2, - Invalid = -1, - Low = 1, } public sealed partial class RegionData { @@ -1765,25 +1765,25 @@ internal RegionData() { } } public enum SmoothingMode { - AntiAlias = 4, + Invalid = -1, Default = 0, - HighQuality = 2, HighSpeed = 1, - Invalid = -1, + HighQuality = 2, None = 3, + AntiAlias = 4, } public enum WarpMode { - Bilinear = 1, Perspective = 0, + Bilinear = 1, } public enum WrapMode { - Clamp = 4, Tile = 0, TileFlipX = 1, - TileFlipXY = 3, TileFlipY = 2, + TileFlipXY = 3, + Clamp = 4, } } namespace System.Drawing.Imaging @@ -1800,21 +1800,21 @@ public BitmapData() { } } public enum ColorAdjustType { - Any = 6, + Default = 0, Bitmap = 1, Brush = 2, - Count = 5, - Default = 0, Pen = 3, Text = 4, + Count = 5, + Any = 6, } public enum ColorChannelFlag { ColorChannelC = 0, - ColorChannelK = 3, - ColorChannelLast = 4, ColorChannelM = 1, ColorChannelY = 2, + ColorChannelK = 3, + ColorChannelLast = 4, } public sealed partial class ColorMap { @@ -1824,8 +1824,8 @@ public ColorMap() { } } public enum ColorMapType { - Brush = 1, Default = 0, + Brush = 1, } public sealed partial class ColorMatrix { @@ -1861,9 +1861,9 @@ public ColorMatrix(float[][] newColorMatrix) { } } public enum ColorMatrixFlag { - AltGrays = 2, Default = 0, SkipGrays = 1, + AltGrays = 2, } public enum ColorMode { @@ -1878,265 +1878,265 @@ internal ColorPalette() { } } public enum EmfPlusRecordType { - BeginContainer = 16423, - BeginContainerNoParams = 16424, - Clear = 16393, - Comment = 16387, - DrawArc = 16402, - DrawBeziers = 16409, - DrawClosedCurve = 16407, - DrawCurve = 16408, - DrawDriverString = 16438, - DrawEllipse = 16399, - DrawImage = 16410, - DrawImagePoints = 16411, - DrawLines = 16397, - DrawPath = 16405, - DrawPie = 16401, - DrawRects = 16395, - DrawString = 16412, - EmfAbortPath = 68, - EmfAlphaBlend = 114, - EmfAngleArc = 41, - EmfArcTo = 55, - EmfBeginPath = 59, - EmfBitBlt = 76, - EmfChord = 46, - EmfCloseFigure = 61, - EmfColorCorrectPalette = 111, - EmfColorMatchToTargetW = 121, - EmfCreateBrushIndirect = 39, - EmfCreateColorSpace = 99, - EmfCreateColorSpaceW = 122, - EmfCreateDibPatternBrushPt = 94, - EmfCreateMonoBrush = 93, - EmfCreatePalette = 49, + EmfHeader = 1, + EmfMin = 1, + EmfPolyBezier = 2, + EmfPolygon = 3, + EmfPolyline = 4, + EmfPolyBezierTo = 5, + EmfPolyLineTo = 6, + EmfPolyPolyline = 7, + EmfPolyPolygon = 8, + EmfSetWindowExtEx = 9, + EmfSetWindowOrgEx = 10, + EmfSetViewportExtEx = 11, + EmfSetViewportOrgEx = 12, + EmfSetBrushOrgEx = 13, + EmfEof = 14, + EmfSetPixelV = 15, + EmfSetMapperFlags = 16, + EmfSetMapMode = 17, + EmfSetBkMode = 18, + EmfSetPolyFillMode = 19, + EmfSetROP2 = 20, + EmfSetStretchBltMode = 21, + EmfSetTextAlign = 22, + EmfSetColorAdjustment = 23, + EmfSetTextColor = 24, + EmfSetBkColor = 25, + EmfOffsetClipRgn = 26, + EmfMoveToEx = 27, + EmfSetMetaRgn = 28, + EmfExcludeClipRect = 29, + EmfIntersectClipRect = 30, + EmfScaleViewportExtEx = 31, + EmfScaleWindowExtEx = 32, + EmfSaveDC = 33, + EmfRestoreDC = 34, + EmfSetWorldTransform = 35, + EmfModifyWorldTransform = 36, + EmfSelectObject = 37, EmfCreatePen = 38, - EmfDeleteColorSpace = 101, + EmfCreateBrushIndirect = 39, EmfDeleteObject = 40, - EmfDrawEscape = 105, + EmfAngleArc = 41, EmfEllipse = 42, - EmfEndPath = 60, - EmfEof = 14, - EmfExcludeClipRect = 29, - EmfExtCreateFontIndirect = 82, - EmfExtCreatePen = 95, - EmfExtEscape = 106, + EmfRectangle = 43, + EmfRoundRect = 44, + EmfRoundArc = 45, + EmfChord = 46, + EmfPie = 47, + EmfSelectPalette = 48, + EmfCreatePalette = 49, + EmfSetPaletteEntries = 50, + EmfResizePalette = 51, + EmfRealizePalette = 52, EmfExtFloodFill = 53, - EmfExtSelectClipRgn = 75, - EmfExtTextOutA = 83, - EmfExtTextOutW = 84, + EmfLineTo = 54, + EmfArcTo = 55, + EmfPolyDraw = 56, + EmfSetArcDirection = 57, + EmfSetMiterLimit = 58, + EmfBeginPath = 59, + EmfEndPath = 60, + EmfCloseFigure = 61, EmfFillPath = 62, - EmfFillRgn = 71, + EmfStrokeAndFillPath = 63, + EmfStrokePath = 64, EmfFlattenPath = 65, - EmfForceUfiMapping = 109, - EmfFrameRgn = 72, + EmfWidenPath = 66, + EmfSelectClipPath = 67, + EmfAbortPath = 68, + EmfReserved069 = 69, EmfGdiComment = 70, - EmfGlsBoundedRecord = 103, - EmfGlsRecord = 102, - EmfGradientFill = 118, - EmfHeader = 1, - EmfIntersectClipRect = 30, + EmfFillRgn = 71, + EmfFrameRgn = 72, EmfInvertRgn = 73, - EmfLineTo = 54, - EmfMaskBlt = 78, - EmfMax = 122, - EmfMin = 1, - EmfModifyWorldTransform = 36, - EmfMoveToEx = 27, - EmfNamedEscpae = 110, - EmfOffsetClipRgn = 26, EmfPaintRgn = 74, - EmfPie = 47, - EmfPixelFormat = 104, + EmfExtSelectClipRgn = 75, + EmfBitBlt = 76, + EmfStretchBlt = 77, + EmfMaskBlt = 78, EmfPlgBlt = 79, - EmfPlusRecordBase = 16384, - EmfPolyBezier = 2, + EmfSetDIBitsToDevice = 80, + EmfStretchDIBits = 81, + EmfExtCreateFontIndirect = 82, + EmfExtTextOutA = 83, + EmfExtTextOutW = 84, EmfPolyBezier16 = 85, - EmfPolyBezierTo = 5, - EmfPolyBezierTo16 = 88, - EmfPolyDraw = 56, - EmfPolyDraw16 = 92, - EmfPolygon = 3, EmfPolygon16 = 86, - EmfPolyline = 4, EmfPolyline16 = 87, - EmfPolyLineTo = 6, + EmfPolyBezierTo16 = 88, EmfPolylineTo16 = 89, - EmfPolyPolygon = 8, - EmfPolyPolygon16 = 91, - EmfPolyPolyline = 7, EmfPolyPolyline16 = 90, + EmfPolyPolygon16 = 91, + EmfPolyDraw16 = 92, + EmfCreateMonoBrush = 93, + EmfCreateDibPatternBrushPt = 94, + EmfExtCreatePen = 95, EmfPolyTextOutA = 96, EmfPolyTextOutW = 97, - EmfRealizePalette = 52, - EmfRectangle = 43, - EmfReserved069 = 69, - EmfReserved117 = 117, - EmfResizePalette = 51, - EmfRestoreDC = 34, - EmfRoundArc = 45, - EmfRoundRect = 44, - EmfSaveDC = 33, - EmfScaleViewportExtEx = 31, - EmfScaleWindowExtEx = 32, - EmfSelectClipPath = 67, - EmfSelectObject = 37, - EmfSelectPalette = 48, - EmfSetArcDirection = 57, - EmfSetBkColor = 25, - EmfSetBkMode = 18, - EmfSetBrushOrgEx = 13, - EmfSetColorAdjustment = 23, - EmfSetColorSpace = 100, - EmfSetDIBitsToDevice = 80, EmfSetIcmMode = 98, + EmfCreateColorSpace = 99, + EmfSetColorSpace = 100, + EmfDeleteColorSpace = 101, + EmfGlsRecord = 102, + EmfGlsBoundedRecord = 103, + EmfPixelFormat = 104, + EmfDrawEscape = 105, + EmfExtEscape = 106, + EmfStartDoc = 107, + EmfSmallTextOut = 108, + EmfForceUfiMapping = 109, + EmfNamedEscpae = 110, + EmfColorCorrectPalette = 111, EmfSetIcmProfileA = 112, EmfSetIcmProfileW = 113, + EmfAlphaBlend = 114, EmfSetLayout = 115, + EmfTransparentBlt = 116, + EmfReserved117 = 117, + EmfGradientFill = 118, EmfSetLinkedUfis = 119, - EmfSetMapMode = 17, - EmfSetMapperFlags = 16, - EmfSetMetaRgn = 28, - EmfSetMiterLimit = 58, - EmfSetPaletteEntries = 50, - EmfSetPixelV = 15, - EmfSetPolyFillMode = 19, - EmfSetROP2 = 20, - EmfSetStretchBltMode = 21, - EmfSetTextAlign = 22, - EmfSetTextColor = 24, EmfSetTextJustification = 120, - EmfSetViewportExtEx = 11, - EmfSetViewportOrgEx = 12, - EmfSetWindowExtEx = 9, - EmfSetWindowOrgEx = 10, - EmfSetWorldTransform = 35, - EmfSmallTextOut = 108, - EmfStartDoc = 107, - EmfStretchBlt = 77, - EmfStretchDIBits = 81, - EmfStrokeAndFillPath = 63, - EmfStrokePath = 64, - EmfTransparentBlt = 116, - EmfWidenPath = 66, - EndContainer = 16425, - EndOfFile = 16386, - FillClosedCurve = 16406, - FillEllipse = 16398, - FillPath = 16404, - FillPie = 16400, - FillPolygon = 16396, - FillRects = 16394, - FillRegion = 16403, - GetDC = 16388, - Header = 16385, + EmfColorMatchToTargetW = 121, + EmfCreateColorSpaceW = 122, + EmfMax = 122, + EmfPlusRecordBase = 16384, Invalid = 16384, - Max = 16438, + Header = 16385, Min = 16385, - MultiFormatEnd = 16391, - MultiFormatSection = 16390, + EndOfFile = 16386, + Comment = 16387, + GetDC = 16388, MultiFormatStart = 16389, - MultiplyWorldTransform = 16428, + MultiFormatSection = 16390, + MultiFormatEnd = 16391, Object = 16392, - OffsetClip = 16437, - ResetClip = 16433, - ResetWorldTransform = 16427, - Restore = 16422, - RotateWorldTransform = 16431, - Save = 16421, - ScaleWorldTransform = 16430, + Clear = 16393, + FillRects = 16394, + DrawRects = 16395, + FillPolygon = 16396, + DrawLines = 16397, + FillEllipse = 16398, + DrawEllipse = 16399, + FillPie = 16400, + DrawPie = 16401, + DrawArc = 16402, + FillRegion = 16403, + FillPath = 16404, + DrawPath = 16405, + FillClosedCurve = 16406, + DrawClosedCurve = 16407, + DrawCurve = 16408, + DrawBeziers = 16409, + DrawImage = 16410, + DrawImagePoints = 16411, + DrawString = 16412, + SetRenderingOrigin = 16413, SetAntiAliasMode = 16414, - SetClipPath = 16435, - SetClipRect = 16434, - SetClipRegion = 16436, - SetCompositingMode = 16419, - SetCompositingQuality = 16420, + SetTextRenderingHint = 16415, + SetTextContrast = 16416, SetInterpolationMode = 16417, - SetPageTransform = 16432, SetPixelOffsetMode = 16418, - SetRenderingOrigin = 16413, - SetTextContrast = 16416, - SetTextRenderingHint = 16415, + SetCompositingMode = 16419, + SetCompositingQuality = 16420, + Save = 16421, + Restore = 16422, + BeginContainer = 16423, + BeginContainerNoParams = 16424, + EndContainer = 16425, SetWorldTransform = 16426, - Total = 16439, + ResetWorldTransform = 16427, + MultiplyWorldTransform = 16428, TranslateWorldTransform = 16429, - WmfAnimatePalette = 66614, - WmfArc = 67607, - WmfBitBlt = 67874, - WmfChord = 67632, - WmfCreateBrushIndirect = 66300, - WmfCreateFontIndirect = 66299, - WmfCreatePalette = 65783, - WmfCreatePatternBrush = 66041, - WmfCreatePenIndirect = 66298, - WmfCreateRegion = 67327, - WmfDeleteObject = 66032, - WmfDibBitBlt = 67904, - WmfDibCreatePatternBrush = 65858, - WmfDibStretchBlt = 68417, - WmfEllipse = 66584, - WmfEscape = 67110, - WmfExcludeClipRect = 66581, - WmfExtFloodFill = 66888, - WmfExtTextOut = 68146, - WmfFillRegion = 66088, - WmfFloodFill = 66585, - WmfFrameRegion = 66601, - WmfIntersectClipRect = 66582, - WmfInvertRegion = 65834, - WmfLineTo = 66067, - WmfMoveTo = 66068, - WmfOffsetCilpRgn = 66080, - WmfOffsetViewportOrg = 66065, - WmfOffsetWindowOrg = 66063, - WmfPaintRegion = 65835, - WmfPatBlt = 67101, - WmfPie = 67610, - WmfPolygon = 66340, - WmfPolyline = 66341, - WmfPolyPolygon = 66872, - WmfRealizePalette = 65589, + ScaleWorldTransform = 16430, + RotateWorldTransform = 16431, + SetPageTransform = 16432, + ResetClip = 16433, + SetClipRect = 16434, + SetClipPath = 16435, + SetClipRegion = 16436, + OffsetClip = 16437, + DrawDriverString = 16438, + Max = 16438, + Total = 16439, WmfRecordBase = 65536, - WmfRectangle = 66587, - WmfResizePalette = 65849, - WmfRestoreDC = 65831, - WmfRoundRect = 67100, WmfSaveDC = 65566, - WmfScaleViewportExt = 66578, - WmfScaleWindowExt = 66576, - WmfSelectClipRegion = 65836, - WmfSelectObject = 65837, - WmfSelectPalette = 66100, - WmfSetBkColor = 66049, + WmfRealizePalette = 65589, + WmfSetPalEntries = 65591, + WmfCreatePalette = 65783, WmfSetBkMode = 65794, - WmfSetDibToDev = 68915, - WmfSetLayout = 65865, WmfSetMapMode = 65795, - WmfSetMapperFlags = 66097, - WmfSetPalEntries = 65591, - WmfSetPixel = 66591, - WmfSetPolyFillMode = 65798, - WmfSetRelAbs = 65797, WmfSetROP2 = 65796, + WmfSetRelAbs = 65797, + WmfSetPolyFillMode = 65798, WmfSetStretchBltMode = 65799, - WmfSetTextAlign = 65838, WmfSetTextCharExtra = 65800, + WmfRestoreDC = 65831, + WmfInvertRegion = 65834, + WmfPaintRegion = 65835, + WmfSelectClipRegion = 65836, + WmfSelectObject = 65837, + WmfSetTextAlign = 65838, + WmfResizePalette = 65849, + WmfDibCreatePatternBrush = 65858, + WmfSetLayout = 65865, + WmfDeleteObject = 66032, + WmfCreatePatternBrush = 66041, + WmfSetBkColor = 66049, WmfSetTextColor = 66057, WmfSetTextJustification = 66058, - WmfSetViewportExt = 66062, - WmfSetViewportOrg = 66061, - WmfSetWindowExt = 66060, WmfSetWindowOrg = 66059, + WmfSetWindowExt = 66060, + WmfSetViewportOrg = 66061, + WmfSetViewportExt = 66062, + WmfOffsetWindowOrg = 66063, + WmfOffsetViewportOrg = 66065, + WmfLineTo = 66067, + WmfMoveTo = 66068, + WmfOffsetCilpRgn = 66080, + WmfFillRegion = 66088, + WmfSetMapperFlags = 66097, + WmfSelectPalette = 66100, + WmfCreatePenIndirect = 66298, + WmfCreateFontIndirect = 66299, + WmfCreateBrushIndirect = 66300, + WmfPolygon = 66340, + WmfPolyline = 66341, + WmfScaleWindowExt = 66576, + WmfScaleViewportExt = 66578, + WmfExcludeClipRect = 66581, + WmfIntersectClipRect = 66582, + WmfEllipse = 66584, + WmfFloodFill = 66585, + WmfRectangle = 66587, + WmfSetPixel = 66591, + WmfFrameRegion = 66601, + WmfAnimatePalette = 66614, + WmfTextOut = 66849, + WmfPolyPolygon = 66872, + WmfExtFloodFill = 66888, + WmfRoundRect = 67100, + WmfPatBlt = 67101, + WmfEscape = 67110, + WmfCreateRegion = 67327, + WmfArc = 67607, + WmfPie = 67610, + WmfChord = 67632, + WmfBitBlt = 67874, + WmfDibBitBlt = 67904, + WmfExtTextOut = 68146, WmfStretchBlt = 68387, + WmfDibStretchBlt = 68417, + WmfSetDibToDev = 68915, WmfStretchDib = 69443, - WmfTextOut = 66849, } public enum EmfType { EmfOnly = 3, - EmfPlusDual = 5, EmfPlusOnly = 4, + EmfPlusDual = 5, } public sealed partial class Encoder { @@ -2189,41 +2189,41 @@ public void Dispose() { } } public enum EncoderParameterValueType { - ValueTypeAscii = 2, ValueTypeByte = 1, + ValueTypeAscii = 2, + ValueTypeShort = 3, ValueTypeLong = 4, - ValueTypeLongRange = 6, ValueTypeRational = 5, - ValueTypeRationalRange = 8, - ValueTypeShort = 3, + ValueTypeLongRange = 6, ValueTypeUndefined = 7, + ValueTypeRationalRange = 8, } public enum EncoderValue { ColorTypeCMYK = 0, ColorTypeYCCK = 1, + CompressionLZW = 2, CompressionCCITT3 = 3, CompressionCCITT4 = 4, - CompressionLZW = 2, - CompressionNone = 6, CompressionRle = 5, - Flush = 20, - FrameDimensionPage = 23, - FrameDimensionResolution = 22, - FrameDimensionTime = 21, - LastFrame = 19, - MultiFrame = 18, - RenderNonProgressive = 12, - RenderProgressive = 11, + CompressionNone = 6, ScanMethodInterlaced = 7, ScanMethodNonInterlaced = 8, - TransformFlipHorizontal = 16, - TransformFlipVertical = 17, - TransformRotate180 = 14, - TransformRotate270 = 15, - TransformRotate90 = 13, VersionGif87 = 9, VersionGif89 = 10, + RenderProgressive = 11, + RenderNonProgressive = 12, + TransformRotate90 = 13, + TransformRotate180 = 14, + TransformRotate270 = 15, + TransformFlipHorizontal = 16, + TransformFlipVertical = 17, + MultiFrame = 18, + LastFrame = 19, + Flush = 20, + FrameDimensionTime = 21, + FrameDimensionResolution = 22, + FrameDimensionPage = 23, } public sealed partial class FrameDimension { @@ -2288,13 +2288,13 @@ public void SetWrapMode(System.Drawing.Drawing2D.WrapMode mode, System.Drawing.C [System.FlagsAttribute] public enum ImageCodecFlags { - BlockingDecode = 32, - Builtin = 65536, - Decoder = 2, Encoder = 1, - SeekableEncode = 16, + Decoder = 2, SupportBitmap = 4, SupportVector = 8, + SeekableEncode = 16, + BlockingDecode = 32, + Builtin = 65536, System = 131072, User = 262144, } @@ -2320,20 +2320,20 @@ internal ImageCodecInfo() { } [System.FlagsAttribute] public enum ImageFlags { - Caching = 131072, + None = 0, + Scalable = 1, + HasAlpha = 2, + HasTranslucent = 4, + PartiallyScalable = 8, + ColorSpaceRgb = 16, ColorSpaceCmyk = 32, ColorSpaceGray = 64, - ColorSpaceRgb = 16, ColorSpaceYcbcr = 128, ColorSpaceYcck = 256, - HasAlpha = 2, HasRealDpi = 4096, HasRealPixelSize = 8192, - HasTranslucent = 4, - None = 0, - PartiallyScalable = 8, ReadOnly = 65536, - Scalable = 1, + Caching = 131072, } #if netcoreapp [System.ComponentModel.TypeConverterAttribute("System.Drawing.ImageFormatConverter, System.Windows.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51")] @@ -2359,9 +2359,9 @@ public ImageFormat(System.Guid guid) { } public enum ImageLockMode { ReadOnly = 1, + WriteOnly = 2, ReadWrite = 3, UserInputBuffer = 4, - WriteOnly = 2, } public sealed partial class Metafile : System.Drawing.Image { @@ -2414,12 +2414,12 @@ public void PlayRecord(System.Drawing.Imaging.EmfPlusRecordType recordType, int } public enum MetafileFrameUnit { - Document = 5, - GdiCompatible = 7, - Inch = 4, - Millimeter = 6, Pixel = 2, Point = 3, + Inch = 4, + Document = 5, + Millimeter = 6, + GdiCompatible = 7, } public sealed partial class MetafileHeader { @@ -2445,12 +2445,12 @@ internal MetafileHeader() { } } public enum MetafileType { - Emf = 3, - EmfPlusDual = 5, - EmfPlusOnly = 4, Invalid = 0, Wmf = 1, WmfPlaceable = 2, + Emf = 3, + EmfPlusOnly = 4, + EmfPlusDual = 5, } public sealed partial class MetaHeader { @@ -2466,35 +2466,35 @@ public MetaHeader() { } [System.FlagsAttribute] public enum PaletteFlags { + HasAlpha = 1, GrayScale = 2, Halftone = 4, - HasAlpha = 1, } public enum PixelFormat { - Alpha = 262144, - Canonical = 2097152, DontCare = 0, - Extended = 1048576, - Format16bppArgb1555 = 397319, - Format16bppGrayScale = 1052676, + Undefined = 0, + Max = 15, + Indexed = 65536, + Gdi = 131072, Format16bppRgb555 = 135173, Format16bppRgb565 = 135174, - Format1bppIndexed = 196865, Format24bppRgb = 137224, - Format32bppArgb = 2498570, - Format32bppPArgb = 925707, Format32bppRgb = 139273, - Format48bppRgb = 1060876, + Format1bppIndexed = 196865, Format4bppIndexed = 197634, - Format64bppArgb = 3424269, - Format64bppPArgb = 1851406, Format8bppIndexed = 198659, - Gdi = 131072, - Indexed = 65536, - Max = 15, + Alpha = 262144, + Format16bppArgb1555 = 397319, PAlpha = 524288, - Undefined = 0, + Format32bppPArgb = 925707, + Extended = 1048576, + Format16bppGrayScale = 1052676, + Format48bppRgb = 1060876, + Format64bppPArgb = 1851406, + Canonical = 2097152, + Format32bppArgb = 2498570, + Format64bppArgb = 3424269, } public delegate void PlayRecordCallback(System.Drawing.Imaging.EmfPlusRecordType recordType, int flags, int dataSize, System.IntPtr recordData); public sealed partial class PropertyItem @@ -2524,9 +2524,9 @@ namespace System.Drawing.Printing public enum Duplex { Default = -1, - Horizontal = 3, Simplex = 1, Vertical = 2, + Horizontal = 3, } public partial class InvalidPrinterException : System.SystemException { @@ -2574,123 +2574,123 @@ public void SetHdevmode(System.IntPtr hdevmode) { } } public enum PaperKind { - A2 = 66, + Custom = 0, + Letter = 1, + LetterSmall = 2, + Tabloid = 3, + Ledger = 4, + Legal = 5, + Statement = 6, + Executive = 7, A3 = 8, - A3Extra = 63, - A3ExtraTransverse = 68, - A3Rotated = 76, - A3Transverse = 67, A4 = 9, - A4Extra = 53, - A4Plus = 60, - A4Rotated = 77, A4Small = 10, - A4Transverse = 55, A5 = 11, - A5Extra = 64, - A5Rotated = 78, - A5Transverse = 61, - A6 = 70, - A6Rotated = 83, - APlus = 57, B4 = 12, - B4Envelope = 33, - B4JisRotated = 79, B5 = 13, - B5Envelope = 34, - B5Extra = 65, - B5JisRotated = 80, - B5Transverse = 62, - B6Envelope = 35, - B6Jis = 88, - B6JisRotated = 89, - BPlus = 58, - C3Envelope = 29, - C4Envelope = 30, - C5Envelope = 28, - C65Envelope = 32, - C6Envelope = 31, + Folio = 14, + Quarto = 15, + Standard10x14 = 16, + Standard11x17 = 17, + Note = 18, + Number9Envelope = 19, + Number10Envelope = 20, + Number11Envelope = 21, + Number12Envelope = 22, + Number14Envelope = 23, CSheet = 24, - Custom = 0, - DLEnvelope = 27, DSheet = 25, ESheet = 26, - Executive = 7, - Folio = 14, - GermanLegalFanfold = 41, + DLEnvelope = 27, + C5Envelope = 28, + C3Envelope = 29, + C4Envelope = 30, + C6Envelope = 31, + C65Envelope = 32, + B4Envelope = 33, + B5Envelope = 34, + B6Envelope = 35, + ItalyEnvelope = 36, + MonarchEnvelope = 37, + PersonalEnvelope = 38, + USStandardFanfold = 39, GermanStandardFanfold = 40, - InviteEnvelope = 47, + GermanLegalFanfold = 41, IsoB4 = 42, - ItalyEnvelope = 36, + JapanesePostcard = 43, + Standard9x11 = 44, + Standard10x11 = 45, + Standard15x11 = 46, + InviteEnvelope = 47, + LetterExtra = 50, + LegalExtra = 51, + TabloidExtra = 52, + A4Extra = 53, + LetterTransverse = 54, + A4Transverse = 55, + LetterExtraTransverse = 56, + APlus = 57, + BPlus = 58, + LetterPlus = 59, + A4Plus = 60, + A5Transverse = 61, + B5Transverse = 62, + A3Extra = 63, + A5Extra = 64, + B5Extra = 65, + A2 = 66, + A3Transverse = 67, + A3ExtraTransverse = 68, JapaneseDoublePostcard = 69, - JapaneseDoublePostcardRotated = 82, + A6 = 70, + JapaneseEnvelopeKakuNumber2 = 71, + JapaneseEnvelopeKakuNumber3 = 72, JapaneseEnvelopeChouNumber3 = 73, - JapaneseEnvelopeChouNumber3Rotated = 86, JapaneseEnvelopeChouNumber4 = 74, - JapaneseEnvelopeChouNumber4Rotated = 87, - JapaneseEnvelopeKakuNumber2 = 71, + LetterRotated = 75, + A3Rotated = 76, + A4Rotated = 77, + A5Rotated = 78, + B4JisRotated = 79, + B5JisRotated = 80, + JapanesePostcardRotated = 81, + JapaneseDoublePostcardRotated = 82, + A6Rotated = 83, JapaneseEnvelopeKakuNumber2Rotated = 84, - JapaneseEnvelopeKakuNumber3 = 72, JapaneseEnvelopeKakuNumber3Rotated = 85, + JapaneseEnvelopeChouNumber3Rotated = 86, + JapaneseEnvelopeChouNumber4Rotated = 87, + B6Jis = 88, + B6JisRotated = 89, + Standard12x11 = 90, JapaneseEnvelopeYouNumber4 = 91, JapaneseEnvelopeYouNumber4Rotated = 92, - JapanesePostcard = 43, - JapanesePostcardRotated = 81, - Ledger = 4, - Legal = 5, - LegalExtra = 51, - Letter = 1, - LetterExtra = 50, - LetterExtraTransverse = 56, - LetterPlus = 59, - LetterRotated = 75, - LetterSmall = 2, - LetterTransverse = 54, - MonarchEnvelope = 37, - Note = 18, - Number10Envelope = 20, - Number11Envelope = 21, - Number12Envelope = 22, - Number14Envelope = 23, - Number9Envelope = 19, - PersonalEnvelope = 38, Prc16K = 93, - Prc16KRotated = 106, Prc32K = 94, Prc32KBig = 95, - Prc32KBigRotated = 108, - Prc32KRotated = 107, PrcEnvelopeNumber1 = 96, + PrcEnvelopeNumber2 = 97, + PrcEnvelopeNumber3 = 98, + PrcEnvelopeNumber4 = 99, + PrcEnvelopeNumber5 = 100, + PrcEnvelopeNumber6 = 101, + PrcEnvelopeNumber7 = 102, + PrcEnvelopeNumber8 = 103, + PrcEnvelopeNumber9 = 104, PrcEnvelopeNumber10 = 105, - PrcEnvelopeNumber10Rotated = 118, + Prc16KRotated = 106, + Prc32KRotated = 107, + Prc32KBigRotated = 108, PrcEnvelopeNumber1Rotated = 109, - PrcEnvelopeNumber2 = 97, PrcEnvelopeNumber2Rotated = 110, - PrcEnvelopeNumber3 = 98, PrcEnvelopeNumber3Rotated = 111, - PrcEnvelopeNumber4 = 99, PrcEnvelopeNumber4Rotated = 112, - PrcEnvelopeNumber5 = 100, PrcEnvelopeNumber5Rotated = 113, - PrcEnvelopeNumber6 = 101, PrcEnvelopeNumber6Rotated = 114, - PrcEnvelopeNumber7 = 102, PrcEnvelopeNumber7Rotated = 115, - PrcEnvelopeNumber8 = 103, PrcEnvelopeNumber8Rotated = 116, - PrcEnvelopeNumber9 = 104, PrcEnvelopeNumber9Rotated = 117, - Quarto = 15, - Standard10x11 = 45, - Standard10x14 = 16, - Standard11x17 = 17, - Standard12x11 = 90, - Standard15x11 = 46, - Standard9x11 = 44, - Statement = 6, - Tabloid = 3, - TabloidExtra = 52, - USStandardFanfold = 39, + PrcEnvelopeNumber10Rotated = 118, } public partial class PaperSize { @@ -2713,20 +2713,20 @@ public PaperSource() { } } public enum PaperSourceKind { - AutomaticFeed = 7, - Cassette = 14, - Custom = 257, - Envelope = 5, - FormSource = 15, - LargeCapacity = 11, - LargeFormat = 10, + Upper = 1, Lower = 2, + Middle = 3, Manual = 4, + Envelope = 5, ManualFeed = 6, - Middle = 3, - SmallFormat = 9, + AutomaticFeed = 7, TractorFeed = 8, - Upper = 1, + SmallFormat = 9, + LargeFormat = 10, + LargeCapacity = 11, + Cassette = 14, + FormSource = 15, + Custom = 257, } public sealed partial class PreviewPageInfo { @@ -2797,11 +2797,11 @@ public PrinterResolution() { } } public enum PrinterResolutionKind { - Custom = 0, - Draft = -1, High = -4, - Low = -2, Medium = -3, + Low = -2, + Draft = -1, + Custom = 0, } public partial class PrinterSettings : System.ICloneable { @@ -2906,9 +2906,9 @@ void System.Collections.ICollection.CopyTo(System.Array array, int index) { } public enum PrinterUnit { Display = 0, + ThousandthsOfAnInch = 1, HundredthsOfAMillimeter = 2, TenthsOfAMillimeter = 3, - ThousandthsOfAnInch = 1, } public sealed partial class PrinterUnitConvert { @@ -2940,9 +2940,9 @@ public PrintPageEventArgs(System.Drawing.Graphics graphics, System.Drawing.Recta public enum PrintRange { AllPages = 0, - CurrentPage = 4194304, Selection = 1, SomePages = 2, + CurrentPage = 4194304, } public partial class QueryPageSettingsEventArgs : System.Drawing.Printing.PrintEventArgs { @@ -2971,15 +2971,15 @@ protected virtual void Dispose(bool disposing) { } } public enum GenericFontFamilies { - Monospace = 2, - SansSerif = 1, Serif = 0, + SansSerif = 1, + Monospace = 2, } public enum HotkeyPrefix { - Hide = 2, None = 0, Show = 1, + Hide = 2, } public sealed partial class InstalledFontCollection : System.Drawing.Text.FontCollection { @@ -2994,11 +2994,11 @@ protected override void Dispose(bool disposing) { } } public enum TextRenderingHint { - AntiAlias = 4, + SystemDefault = 0, + SingleBitPerPixelGridFit = 1, + SingleBitPerPixel = 2, AntiAliasGridFit = 3, + AntiAlias = 4, ClearTypeGridFit = 5, - SingleBitPerPixel = 2, - SingleBitPerPixelGridFit = 1, - SystemDefault = 0, } } diff --git a/src/System.Drawing.Primitives/ref/System.Drawing.Primitives.cs b/src/System.Drawing.Primitives/ref/System.Drawing.Primitives.cs index 01b6dfb10460..5629c273b856 100644 --- a/src/System.Drawing.Primitives/ref/System.Drawing.Primitives.cs +++ b/src/System.Drawing.Primitives/ref/System.Drawing.Primitives.cs @@ -185,9 +185,32 @@ public enum KnownColor ActiveBorder = 1, ActiveCaption = 2, ActiveCaptionText = 3, + AppWorkspace = 4, + Control = 5, + ControlDark = 6, + ControlDarkDark = 7, + ControlLight = 8, + ControlLightLight = 9, + ControlText = 10, + Desktop = 11, + GrayText = 12, + Highlight = 13, + HighlightText = 14, + HotTrack = 15, + InactiveBorder = 16, + InactiveCaption = 17, + InactiveCaptionText = 18, + Info = 19, + InfoText = 20, + Menu = 21, + MenuText = 22, + ScrollBar = 23, + Window = 24, + WindowFrame = 25, + WindowText = 26, + Transparent = 27, AliceBlue = 28, AntiqueWhite = 29, - AppWorkspace = 4, Aqua = 30, Aquamarine = 31, Azure = 32, @@ -199,18 +222,9 @@ public enum KnownColor BlueViolet = 38, Brown = 39, BurlyWood = 40, - ButtonFace = 168, - ButtonHighlight = 169, - ButtonShadow = 170, CadetBlue = 41, Chartreuse = 42, Chocolate = 43, - Control = 5, - ControlDark = 6, - ControlDarkDark = 7, - ControlLight = 8, - ControlLightLight = 9, - ControlText = 10, Coral = 44, CornflowerBlue = 45, Cornsilk = 46, @@ -235,7 +249,6 @@ public enum KnownColor DarkViolet = 65, DeepPink = 66, DeepSkyBlue = 67, - Desktop = 11, DimGray = 68, DodgerBlue = 69, Firebrick = 70, @@ -246,24 +259,13 @@ public enum KnownColor GhostWhite = 75, Gold = 76, Goldenrod = 77, - GradientActiveCaption = 171, - GradientInactiveCaption = 172, Gray = 78, - GrayText = 12, Green = 79, GreenYellow = 80, - Highlight = 13, - HighlightText = 14, Honeydew = 81, HotPink = 82, - HotTrack = 15, - InactiveBorder = 16, - InactiveCaption = 17, - InactiveCaptionText = 18, IndianRed = 83, Indigo = 84, - Info = 19, - InfoText = 20, Ivory = 85, Khaki = 86, Lavender = 87, @@ -297,10 +299,6 @@ public enum KnownColor MediumSpringGreen = 115, MediumTurquoise = 116, MediumVioletRed = 117, - Menu = 21, - MenuBar = 173, - MenuHighlight = 174, - MenuText = 22, MidnightBlue = 118, MintCream = 119, MistyRose = 120, @@ -330,7 +328,6 @@ public enum KnownColor SaddleBrown = 144, Salmon = 145, SandyBrown = 146, - ScrollBar = 23, SeaGreen = 147, SeaShell = 148, Sienna = 149, @@ -345,17 +342,20 @@ public enum KnownColor Teal = 158, Thistle = 159, Tomato = 160, - Transparent = 27, Turquoise = 161, Violet = 162, Wheat = 163, White = 164, WhiteSmoke = 165, - Window = 24, - WindowFrame = 25, - WindowText = 26, Yellow = 166, YellowGreen = 167, + ButtonFace = 168, + ButtonHighlight = 169, + ButtonShadow = 170, + GradientActiveCaption = 171, + GradientInactiveCaption = 172, + MenuBar = 173, + MenuHighlight = 174, } public partial struct Point : System.IEquatable { diff --git a/src/System.IO.Compression/ref/System.IO.Compression.cs b/src/System.IO.Compression/ref/System.IO.Compression.cs index a705e0eaf740..0168c11f6abe 100644 --- a/src/System.IO.Compression/ref/System.IO.Compression.cs +++ b/src/System.IO.Compression/ref/System.IO.Compression.cs @@ -9,14 +9,14 @@ namespace System.IO.Compression { public enum CompressionLevel { + Optimal = 0, Fastest = 1, NoCompression = 2, - Optimal = 0, } public enum CompressionMode { - Compress = 1, Decompress = 0, + Compress = 1, } public partial class DeflateStream : System.IO.Stream { @@ -118,8 +118,8 @@ public void Delete() { } } public enum ZipArchiveMode { - Create = 1, Read = 0, + Create = 1, Update = 2, } } diff --git a/src/System.IO.FileSystem.AccessControl/ref/System.IO.FileSystem.AccessControl.cs b/src/System.IO.FileSystem.AccessControl/ref/System.IO.FileSystem.AccessControl.cs index e3486b72ed24..3f79bcc0b539 100644 --- a/src/System.IO.FileSystem.AccessControl/ref/System.IO.FileSystem.AccessControl.cs +++ b/src/System.IO.FileSystem.AccessControl/ref/System.IO.FileSystem.AccessControl.cs @@ -72,29 +72,29 @@ public sealed partial class FileSystemAuditRule : System.Security.AccessControl. [System.FlagsAttribute] public enum FileSystemRights { + ListDirectory = 1, + ReadData = 1, + CreateFiles = 2, + WriteData = 2, AppendData = 4, - ChangePermissions = 262144, CreateDirectories = 4, - CreateFiles = 2, - Delete = 65536, - DeleteSubdirectoriesAndFiles = 64, + ReadExtendedAttributes = 8, + WriteExtendedAttributes = 16, ExecuteFile = 32, - FullControl = 2032127, - ListDirectory = 1, - Modify = 197055, - Read = 131209, - ReadAndExecute = 131241, + Traverse = 32, + DeleteSubdirectoriesAndFiles = 64, ReadAttributes = 128, - ReadData = 1, - ReadExtendedAttributes = 8, + WriteAttributes = 256, + Write = 278, + Delete = 65536, ReadPermissions = 131072, - Synchronize = 1048576, + Read = 131209, + ReadAndExecute = 131241, + Modify = 197055, + ChangePermissions = 262144, TakeOwnership = 524288, - Traverse = 32, - Write = 278, - WriteAttributes = 256, - WriteData = 2, - WriteExtendedAttributes = 16, + Synchronize = 1048576, + FullControl = 2032127, } public abstract partial class FileSystemSecurity : System.Security.AccessControl.NativeObjectSecurity { diff --git a/src/System.IO.FileSystem.DriveInfo/ref/System.IO.FileSystem.DriveInfo.cs b/src/System.IO.FileSystem.DriveInfo/ref/System.IO.FileSystem.DriveInfo.cs index c8b79b568551..d2c102e6737c 100644 --- a/src/System.IO.FileSystem.DriveInfo/ref/System.IO.FileSystem.DriveInfo.cs +++ b/src/System.IO.FileSystem.DriveInfo/ref/System.IO.FileSystem.DriveInfo.cs @@ -32,12 +32,12 @@ public DriveNotFoundException(string message, System.Exception innerException) { } public enum DriveType { - CDRom = 5, + Unknown = 0, + NoRootDirectory = 1, + Removable = 2, Fixed = 3, Network = 4, - NoRootDirectory = 1, + CDRom = 5, Ram = 6, - Removable = 2, - Unknown = 0, } } diff --git a/src/System.IO.FileSystem.Watcher/ref/System.IO.FileSystem.Watcher.cs b/src/System.IO.FileSystem.Watcher/ref/System.IO.FileSystem.Watcher.cs index 789bb3379ba7..ce9ce2afe065 100644 --- a/src/System.IO.FileSystem.Watcher/ref/System.IO.FileSystem.Watcher.cs +++ b/src/System.IO.FileSystem.Watcher/ref/System.IO.FileSystem.Watcher.cs @@ -61,14 +61,14 @@ public InternalBufferOverflowException(string message, System.Exception inner) { [System.FlagsAttribute] public enum NotifyFilters { - Attributes = 4, - CreationTime = 64, - DirectoryName = 2, FileName = 1, - LastAccess = 32, + DirectoryName = 2, + Attributes = 4, + Size = 8, LastWrite = 16, + LastAccess = 32, + CreationTime = 64, Security = 256, - Size = 8, } public partial class RenamedEventArgs : System.IO.FileSystemEventArgs { @@ -88,10 +88,10 @@ public partial struct WaitForChangedResult [System.FlagsAttribute] public enum WatcherChangeTypes { - All = 15, - Changed = 4, Created = 1, Deleted = 2, + Changed = 4, Renamed = 8, + All = 15, } } diff --git a/src/System.IO.FileSystem/ref/System.IO.FileSystem.cs b/src/System.IO.FileSystem/ref/System.IO.FileSystem.cs index f227cc36f96d..c34452452399 100644 --- a/src/System.IO.FileSystem/ref/System.IO.FileSystem.cs +++ b/src/System.IO.FileSystem/ref/System.IO.FileSystem.cs @@ -228,9 +228,9 @@ public void Refresh() { } } public enum MatchCasing { - CaseInsensitive = 2, - CaseSensitive = 1, PlatformDefault = 0, + CaseSensitive = 1, + CaseInsensitive = 2, } public enum MatchType { @@ -239,8 +239,8 @@ public enum MatchType } public enum SearchOption { - AllDirectories = 1, TopDirectoryOnly = 0, + AllDirectories = 1, } } namespace System.IO.Enumeration diff --git a/src/System.IO.IsolatedStorage/ref/System.IO.IsolatedStorage.cs b/src/System.IO.IsolatedStorage/ref/System.IO.IsolatedStorage.cs index 006c4e70b149..74ac06600851 100644 --- a/src/System.IO.IsolatedStorage/ref/System.IO.IsolatedStorage.cs +++ b/src/System.IO.IsolatedStorage/ref/System.IO.IsolatedStorage.cs @@ -139,12 +139,12 @@ public override void WriteByte(byte value) { } [System.FlagsAttribute] public enum IsolatedStorageScope { - Application = 32, - Assembly = 4, - Domain = 2, - Machine = 16, None = 0, - Roaming = 8, User = 1, + Domain = 2, + Assembly = 4, + Roaming = 8, + Machine = 16, + Application = 32, } } diff --git a/src/System.IO.MemoryMappedFiles/ref/System.IO.MemoryMappedFiles.cs b/src/System.IO.MemoryMappedFiles/ref/System.IO.MemoryMappedFiles.cs index 6f5a0c02d9bb..fbfa21a74e3a 100644 --- a/src/System.IO.MemoryMappedFiles/ref/System.IO.MemoryMappedFiles.cs +++ b/src/System.IO.MemoryMappedFiles/ref/System.IO.MemoryMappedFiles.cs @@ -51,35 +51,35 @@ protected virtual void Dispose(bool disposing) { } } public enum MemoryMappedFileAccess { - CopyOnWrite = 3, + ReadWrite = 0, Read = 1, + Write = 2, + CopyOnWrite = 3, ReadExecute = 4, - ReadWrite = 0, ReadWriteExecute = 5, - Write = 2, } [System.FlagsAttribute] public enum MemoryMappedFileOptions { - DelayAllocatePages = 67108864, None = 0, + DelayAllocatePages = 67108864, } [System.FlagsAttribute] public enum MemoryMappedFileRights { - AccessSystemSecurity = 16777216, - ChangePermissions = 262144, CopyOnWrite = 1, - Delete = 65536, - Execute = 8, - FullControl = 983055, + Write = 2, Read = 4, - ReadExecute = 12, - ReadPermissions = 131072, ReadWrite = 6, + Execute = 8, + ReadExecute = 12, ReadWriteExecute = 14, + Delete = 65536, + ReadPermissions = 131072, + ChangePermissions = 262144, TakeOwnership = 524288, - Write = 2, + FullControl = 983055, + AccessSystemSecurity = 16777216, } public sealed partial class MemoryMappedViewAccessor : System.IO.UnmanagedMemoryAccessor { diff --git a/src/System.IO.Packaging/ref/System.IO.Packaging.cs b/src/System.IO.Packaging/ref/System.IO.Packaging.cs index 8aa1ba979658..39cd711b3528 100644 --- a/src/System.IO.Packaging/ref/System.IO.Packaging.cs +++ b/src/System.IO.Packaging/ref/System.IO.Packaging.cs @@ -23,10 +23,10 @@ namespace System.IO.Packaging { public enum CompressionOption { - Fast = 2, - Maximum = 1, - Normal = 0, NotCompressed = -1, + Normal = 0, + Maximum = 1, + Fast = 2, SuperFast = 3, } public enum EncryptionOption @@ -163,8 +163,8 @@ public static partial class PackUriHelper } public enum TargetMode { - External = 1, Internal = 0, + External = 1, } public sealed partial class ZipPackage : System.IO.Packaging.Package { diff --git a/src/System.IO.Pipes.AccessControl/ref/System.IO.Pipes.AccessControl.cs b/src/System.IO.Pipes.AccessControl/ref/System.IO.Pipes.AccessControl.cs index 6c2991dfa28f..414a3413ce56 100644 --- a/src/System.IO.Pipes.AccessControl/ref/System.IO.Pipes.AccessControl.cs +++ b/src/System.IO.Pipes.AccessControl/ref/System.IO.Pipes.AccessControl.cs @@ -10,23 +10,23 @@ namespace System.IO.Pipes [System.FlagsAttribute] public enum PipeAccessRights { - AccessSystemSecurity = 16777216, - ChangePermissions = 262144, - CreateNewInstance = 4, - Delete = 65536, - FullControl = 2032031, - Read = 131209, - ReadAttributes = 128, ReadData = 1, + WriteData = 2, + CreateNewInstance = 4, ReadExtendedAttributes = 8, + WriteExtendedAttributes = 16, + ReadAttributes = 128, + WriteAttributes = 256, + Write = 274, + Delete = 65536, ReadPermissions = 131072, + Read = 131209, ReadWrite = 131483, - Synchronize = 1048576, + ChangePermissions = 262144, TakeOwnership = 524288, - Write = 274, - WriteAttributes = 256, - WriteData = 2, - WriteExtendedAttributes = 16, + Synchronize = 1048576, + FullControl = 2032031, + AccessSystemSecurity = 16777216, } public sealed partial class PipeAccessRule : System.Security.AccessControl.AccessRule { diff --git a/src/System.IO.Pipes/ref/System.IO.Pipes.cs b/src/System.IO.Pipes/ref/System.IO.Pipes.cs index 8abf1ab20c9c..e0d7ef00220c 100644 --- a/src/System.IO.Pipes/ref/System.IO.Pipes.cs +++ b/src/System.IO.Pipes/ref/System.IO.Pipes.cs @@ -82,16 +82,16 @@ public void WaitForConnection() { } public enum PipeDirection { In = 1, - InOut = 3, Out = 2, + InOut = 3, } [System.FlagsAttribute] public enum PipeOptions { - Asynchronous = 1073741824, - CurrentUserOnly = 536870912, - None = 0, WriteThrough = -2147483648, + None = 0, + CurrentUserOnly = 536870912, + Asynchronous = 1073741824, } public abstract partial class PipeStream : System.IO.Stream { diff --git a/src/System.IO.Ports/ref/System.IO.Ports.cs b/src/System.IO.Ports/ref/System.IO.Ports.cs index 7399fb01124c..d833e46a7d48 100644 --- a/src/System.IO.Ports/ref/System.IO.Ports.cs +++ b/src/System.IO.Ports/ref/System.IO.Ports.cs @@ -10,16 +10,16 @@ namespace System.IO.Ports public enum Handshake { None = 0, + XOnXOff = 1, RequestToSend = 2, RequestToSendXOnXOff = 3, - XOnXOff = 1, } public enum Parity { - Even = 2, - Mark = 3, None = 0, Odd = 1, + Even = 2, + Mark = 3, Space = 4, } public enum SerialData @@ -35,10 +35,10 @@ internal SerialDataReceivedEventArgs() { } public delegate void SerialDataReceivedEventHandler(object sender, System.IO.Ports.SerialDataReceivedEventArgs e); public enum SerialError { - Frame = 8, - Overrun = 2, RXOver = 1, + Overrun = 2, RXParity = 4, + Frame = 8, TXFull = 256, } public partial class SerialErrorReceivedEventArgs : System.EventArgs @@ -49,10 +49,10 @@ internal SerialErrorReceivedEventArgs() { } public delegate void SerialErrorReceivedEventHandler(object sender, System.IO.Ports.SerialErrorReceivedEventArgs e); public enum SerialPinChange { - Break = 64, - CDChanged = 32, CtsChanged = 8, DsrChanged = 16, + CDChanged = 32, + Break = 64, Ring = 256, } public partial class SerialPinChangedEventArgs : System.EventArgs @@ -121,7 +121,7 @@ public enum StopBits { None = 0, One = 1, - OnePointFive = 3, Two = 2, + OnePointFive = 3, } } diff --git a/src/System.Linq.Expressions/ref/System.Linq.Expressions.cs b/src/System.Linq.Expressions/ref/System.Linq.Expressions.cs index 1340e29b15f1..0cbe6110fb08 100644 --- a/src/System.Linq.Expressions/ref/System.Linq.Expressions.cs +++ b/src/System.Linq.Expressions/ref/System.Linq.Expressions.cs @@ -697,90 +697,90 @@ protected Expression(System.Linq.Expressions.ExpressionType nodeType, System.Typ public enum ExpressionType { Add = 0, - AddAssign = 63, - AddAssignChecked = 74, AddChecked = 1, And = 2, AndAlso = 3, - AndAssign = 64, - ArrayIndex = 5, ArrayLength = 4, - Assign = 46, - Block = 47, + ArrayIndex = 5, Call = 6, Coalesce = 7, Conditional = 8, Constant = 9, Convert = 10, ConvertChecked = 11, - DebugInfo = 48, - Decrement = 49, - Default = 51, Divide = 12, - DivideAssign = 65, - Dynamic = 50, Equal = 13, ExclusiveOr = 14, - ExclusiveOrAssign = 66, - Extension = 52, - Goto = 53, GreaterThan = 15, GreaterThanOrEqual = 16, - Increment = 54, - Index = 55, Invoke = 17, - IsFalse = 84, - IsTrue = 83, - Label = 56, Lambda = 18, LeftShift = 19, - LeftShiftAssign = 67, LessThan = 20, LessThanOrEqual = 21, ListInit = 22, - Loop = 58, MemberAccess = 23, MemberInit = 24, Modulo = 25, - ModuloAssign = 68, Multiply = 26, - MultiplyAssign = 69, - MultiplyAssignChecked = 75, MultiplyChecked = 27, Negate = 28, + UnaryPlus = 29, NegateChecked = 30, New = 31, - NewArrayBounds = 33, NewArrayInit = 32, + NewArrayBounds = 33, Not = 34, NotEqual = 35, - OnesComplement = 82, Or = 36, - OrAssign = 70, OrElse = 37, Parameter = 38, - PostDecrementAssign = 80, - PostIncrementAssign = 79, Power = 39, - PowerAssign = 71, - PreDecrementAssign = 78, - PreIncrementAssign = 77, Quote = 40, RightShift = 41, - RightShiftAssign = 72, - RuntimeVariables = 57, Subtract = 42, - SubtractAssign = 73, - SubtractAssignChecked = 76, SubtractChecked = 43, + TypeAs = 44, + TypeIs = 45, + Assign = 46, + Block = 47, + DebugInfo = 48, + Decrement = 49, + Dynamic = 50, + Default = 51, + Extension = 52, + Goto = 53, + Increment = 54, + Index = 55, + Label = 56, + RuntimeVariables = 57, + Loop = 58, Switch = 59, Throw = 60, Try = 61, - TypeAs = 44, - TypeEqual = 81, - TypeIs = 45, - UnaryPlus = 29, Unbox = 62, + AddAssign = 63, + AndAssign = 64, + DivideAssign = 65, + ExclusiveOrAssign = 66, + LeftShiftAssign = 67, + ModuloAssign = 68, + MultiplyAssign = 69, + OrAssign = 70, + PowerAssign = 71, + RightShiftAssign = 72, + SubtractAssign = 73, + AddAssignChecked = 74, + MultiplyAssignChecked = 75, + SubtractAssignChecked = 76, + PreIncrementAssign = 77, + PreDecrementAssign = 78, + PostIncrementAssign = 79, + PostDecrementAssign = 80, + TypeEqual = 81, + OnesComplement = 82, + IsTrue = 83, + IsFalse = 84, } public abstract partial class ExpressionVisitor { @@ -847,10 +847,10 @@ internal GotoExpression() { } } public enum GotoExpressionKind { - Break = 2, - Continue = 3, Goto = 0, Return = 1, + Break = 2, + Continue = 3, } public partial interface IArgumentProvider { @@ -961,8 +961,8 @@ protected MemberBinding(System.Linq.Expressions.MemberBindingType type, System.R public enum MemberBindingType { Assignment = 0, - ListBinding = 2, MemberBinding = 1, + ListBinding = 2, } public partial class MemberExpression : System.Linq.Expressions.Expression { diff --git a/src/System.Linq.Parallel/ref/System.Linq.Parallel.cs b/src/System.Linq.Parallel/ref/System.Linq.Parallel.cs index d2d577d72734..ebf2e374f6be 100644 --- a/src/System.Linq.Parallel/ref/System.Linq.Parallel.cs +++ b/src/System.Linq.Parallel/ref/System.Linq.Parallel.cs @@ -239,10 +239,10 @@ public enum ParallelExecutionMode } public enum ParallelMergeOptions { - AutoBuffered = 2, Default = 0, - FullyBuffered = 3, NotBuffered = 1, + AutoBuffered = 2, + FullyBuffered = 3, } public partial class ParallelQuery : System.Collections.IEnumerable { diff --git a/src/System.Management/ref/System.Management.cs b/src/System.Management/ref/System.Management.cs index ba6379294508..39c5d39ce4c2 100644 --- a/src/System.Management/ref/System.Management.cs +++ b/src/System.Management/ref/System.Management.cs @@ -9,53 +9,53 @@ namespace System.Management { public enum AuthenticationLevel { - Call = 3, - Connect = 2, + Unchanged = -1, Default = 0, None = 1, + Connect = 2, + Call = 3, Packet = 4, PacketIntegrity = 5, PacketPrivacy = 6, - Unchanged = -1, } public enum CimType { - Boolean = 11, - Char16 = 103, - DateTime = 101, None = 0, - Object = 13, - Real32 = 4, - Real64 = 5, - Reference = 102, SInt16 = 2, SInt32 = 3, - SInt64 = 20, - SInt8 = 16, + Real32 = 4, + Real64 = 5, String = 8, + Boolean = 11, + Object = 13, + SInt8 = 16, + UInt8 = 17, UInt16 = 18, UInt32 = 19, + SInt64 = 20, UInt64 = 21, - UInt8 = 17, + DateTime = 101, + Reference = 102, + Char16 = 103, } public enum CodeLanguage { CSharp = 0, JScript = 1, - Mcpp = 4, VB = 2, VJSharp = 3, + Mcpp = 4, } [System.FlagsAttribute] public enum ComparisonSettings { - IgnoreCase = 16, - IgnoreClass = 8, + IncludeAll = 0, + IgnoreQualifiers = 1, + IgnoreObjectSource = 2, IgnoreDefaultValues = 4, + IgnoreClass = 8, + IgnoreCase = 16, IgnoreFlavor = 32, - IgnoreObjectSource = 2, - IgnoreQualifiers = 1, - IncludeAll = 0, } public partial class CompletedEventArgs : System.Management.ManagementEventArgs { @@ -121,11 +121,11 @@ public EventWatcherOptions(System.Management.ManagementNamedValueCollection cont } public enum ImpersonationLevel { - Anonymous = 1, Default = 0, - Delegate = 4, + Anonymous = 1, Identify = 2, Impersonate = 3, + Delegate = 4, } public partial class InvokeMethodOptions : System.Management.ManagementOptions { @@ -410,114 +410,114 @@ public void Connect() { } } public enum ManagementStatus { + Failed = -2147217407, + NotFound = -2147217406, AccessDenied = -2147217405, - AggregatingByObject = -2147217315, + ProviderFailure = -2147217404, + TypeMismatch = -2147217403, + OutOfMemory = -2147217402, + InvalidContext = -2147217401, + InvalidParameter = -2147217400, + NotAvailable = -2147217399, + CriticalError = -2147217398, + InvalidStream = -2147217397, + NotSupported = -2147217396, + InvalidSuperclass = -2147217395, + InvalidNamespace = -2147217394, + InvalidObject = -2147217393, + InvalidClass = -2147217392, + ProviderNotFound = -2147217391, + InvalidProviderRegistration = -2147217390, + ProviderLoadFailure = -2147217389, + InitializationFailure = -2147217388, + TransportFailure = -2147217387, + InvalidOperation = -2147217386, + InvalidQuery = -2147217385, + InvalidQueryType = -2147217384, AlreadyExists = -2147217383, - AmendedObject = -2147217306, - BackupRestoreWinmgmtRunning = -2147217312, - BufferTooSmall = -2147217348, - CallCanceled = -2147217358, - CannotBeAbstract = -2147217307, + OverrideNotAllowed = -2147217382, + PropagatedQualifier = -2147217381, + PropagatedProperty = -2147217380, + Unexpected = -2147217379, + IllegalOperation = -2147217378, CannotBeKey = -2147217377, - CannotBeSingleton = -2147217364, - CannotChangeIndexInheritance = -2147217328, - CannotChangeKeyInheritance = -2147217335, - CircularReference = -2147217337, + IncompleteClass = -2147217376, + InvalidSyntax = -2147217375, + NondecoratedObject = -2147217374, + ReadOnly = -2147217373, + ProviderNotCapable = -2147217372, ClassHasChildren = -2147217371, ClassHasInstances = -2147217370, - ClientTooSlow = -2147217305, - CriticalError = -2147217398, - Different = 262147, - DuplicateObjects = 262152, - Failed = -2147217407, - False = 1, + QueryNotImplemented = -2147217369, IllegalNull = -2147217368, - IllegalOperation = -2147217378, - IncompleteClass = -2147217376, - InitializationFailure = -2147217388, + InvalidQualifierType = -2147217367, + InvalidPropertyType = -2147217366, + ValueOutOfRange = -2147217365, + CannotBeSingleton = -2147217364, InvalidCimType = -2147217363, - InvalidClass = -2147217392, - InvalidContext = -2147217401, - InvalidDuplicateParameter = -2147217341, - InvalidFlavor = -2147217338, InvalidMethod = -2147217362, InvalidMethodParameters = -2147217361, - InvalidNamespace = -2147217394, - InvalidObject = -2147217393, - InvalidObjectPath = -2147217350, - InvalidOperation = -2147217386, - InvalidOperator = -2147217309, - InvalidParameter = -2147217400, - InvalidParameterID = -2147217353, + SystemProperty = -2147217360, InvalidProperty = -2147217359, - InvalidPropertyType = -2147217366, - InvalidProviderRegistration = -2147217390, - InvalidQualifier = -2147217342, - InvalidQualifierType = -2147217367, - InvalidQuery = -2147217385, - InvalidQueryType = -2147217384, - InvalidStream = -2147217397, - InvalidSuperclass = -2147217395, - InvalidSyntax = -2147217375, - LocalCredentials = -2147217308, - MarshalInvalidSignature = -2147217343, - MarshalVersionMismatch = -2147217344, - MethodDisabled = -2147217322, - MethodNotImplemented = -2147217323, - MissingAggregationList = -2147217317, - MissingGroupWithin = -2147217318, + CallCanceled = -2147217358, + ShuttingDown = -2147217357, + PropagatedMethod = -2147217356, + UnsupportedParameter = -2147217355, MissingParameterID = -2147217354, - NoError = 0, - NoMoreData = 262149, + InvalidParameterID = -2147217353, NonconsecutiveParameterIDs = -2147217352, - NondecoratedObject = -2147217374, - NotAvailable = -2147217399, - NotEventClass = -2147217319, - NotFound = -2147217406, - NotSupported = -2147217396, - OperationCanceled = 262150, - OutOfDiskSpace = -2147217349, - OutOfMemory = -2147217402, - OverrideNotAllowed = -2147217382, ParameterIDOnRetval = -2147217351, - PartialResults = 262160, - Pending = 262151, - PrivilegeNotHeld = -2147217310, - PropagatedMethod = -2147217356, - PropagatedProperty = -2147217380, - PropagatedQualifier = -2147217381, + InvalidObjectPath = -2147217350, + OutOfDiskSpace = -2147217349, + BufferTooSmall = -2147217348, + UnsupportedPutExtension = -2147217347, + UnknownObjectType = -2147217346, + UnknownPacketType = -2147217345, + MarshalVersionMismatch = -2147217344, + MarshalInvalidSignature = -2147217343, + InvalidQualifier = -2147217342, + InvalidDuplicateParameter = -2147217341, + TooMuchData = -2147217340, + ServerTooBusy = -2147217339, + InvalidFlavor = -2147217338, + CircularReference = -2147217337, + UnsupportedClassUpdate = -2147217336, + CannotChangeKeyInheritance = -2147217335, + CannotChangeIndexInheritance = -2147217328, + TooManyProperties = -2147217327, + UpdateTypeMismatch = -2147217326, + UpdateOverrideNotAllowed = -2147217325, + UpdatePropagatedMethod = -2147217324, + MethodNotImplemented = -2147217323, + MethodDisabled = -2147217322, + RefresherBusy = -2147217321, + UnparsableQuery = -2147217320, + NotEventClass = -2147217319, + MissingGroupWithin = -2147217318, + MissingAggregationList = -2147217317, PropertyNotAnObject = -2147217316, - ProviderFailure = -2147217404, - ProviderLoadFailure = -2147217389, - ProviderNotCapable = -2147217372, - ProviderNotFound = -2147217391, - QueryNotImplemented = -2147217369, + AggregatingByObject = -2147217315, + UninterpretableProviderQuery = -2147217313, + BackupRestoreWinmgmtRunning = -2147217312, QueueOverflow = -2147217311, - ReadOnly = -2147217373, - RefresherBusy = -2147217321, + PrivilegeNotHeld = -2147217310, + InvalidOperator = -2147217309, + LocalCredentials = -2147217308, + CannotBeAbstract = -2147217307, + AmendedObject = -2147217306, + ClientTooSlow = -2147217305, RegistrationTooBroad = -2147213311, RegistrationTooPrecise = -2147213310, + NoError = 0, + False = 1, ResetToDefault = 262146, - ServerTooBusy = -2147217339, - ShuttingDown = -2147217357, - SystemProperty = -2147217360, + Different = 262147, Timedout = 262148, - TooManyProperties = -2147217327, - TooMuchData = -2147217340, - TransportFailure = -2147217387, - TypeMismatch = -2147217403, - Unexpected = -2147217379, - UninterpretableProviderQuery = -2147217313, - UnknownObjectType = -2147217346, - UnknownPacketType = -2147217345, - UnparsableQuery = -2147217320, - UnsupportedClassUpdate = -2147217336, - UnsupportedParameter = -2147217355, - UnsupportedPutExtension = -2147217347, - UpdateOverrideNotAllowed = -2147217325, - UpdatePropagatedMethod = -2147217324, - UpdateTypeMismatch = -2147217326, - ValueOutOfRange = -2147217365, + NoMoreData = 262149, + OperationCanceled = 262150, + Pending = 262151, + DuplicateObjects = 262152, + PartialResults = 262160, } public partial class MethodData { @@ -632,9 +632,9 @@ public PutOptions(System.Management.ManagementNamedValueCollection context, Syst } public enum PutType { - CreateOnly = 2, None = 0, UpdateOnly = 1, + CreateOnly = 2, UpdateOrCreate = 3, } public partial class QualifierData @@ -732,8 +732,8 @@ internal StoppedEventArgs() { } public delegate void StoppedEventHandler(object sender, System.Management.StoppedEventArgs e); public enum TextFormat { - CimDtd20 = 1, Mof = 0, + CimDtd20 = 1, WmiDtd20 = 2, } public partial class WqlEventQuery : System.Management.EventQuery diff --git a/src/System.Net.Http.WinHttpHandler/ref/System.Net.Http.WinHttpHandler.cs b/src/System.Net.Http.WinHttpHandler/ref/System.Net.Http.WinHttpHandler.cs index 1fc35db4113c..2b704d6ffebd 100644 --- a/src/System.Net.Http.WinHttpHandler/ref/System.Net.Http.WinHttpHandler.cs +++ b/src/System.Net.Http.WinHttpHandler/ref/System.Net.Http.WinHttpHandler.cs @@ -16,9 +16,9 @@ public enum CookieUsePolicy public enum WindowsProxyUsePolicy { DoNotUseProxy = 0, - UseCustomProxy = 3, UseWinHttpProxy = 1, UseWinInetProxy = 2, + UseCustomProxy = 3, } public partial class WinHttpHandler : System.Net.Http.HttpMessageHandler { diff --git a/src/System.Net.Http/ref/System.Net.Http.cs b/src/System.Net.Http/ref/System.Net.Http.cs index f6f48c67cc1f..60306ec100d8 100644 --- a/src/System.Net.Http/ref/System.Net.Http.cs +++ b/src/System.Net.Http/ref/System.Net.Http.cs @@ -17,8 +17,8 @@ public ByteArrayContent(byte[] content, int offset, int count) { } } public enum ClientCertificateOption { - Automatic = 1, Manual = 0, + Automatic = 1, } public abstract partial class DelegatingHandler : System.Net.Http.HttpMessageHandler { diff --git a/src/System.Net.Mail/ref/System.Net.Mail.cs b/src/System.Net.Mail/ref/System.Net.Mail.cs index 6eecb41240f3..d1b280aec948 100644 --- a/src/System.Net.Mail/ref/System.Net.Mail.cs +++ b/src/System.Net.Mail/ref/System.Net.Mail.cs @@ -73,11 +73,11 @@ protected override void SetItem(int index, System.Net.Mail.Attachment item) { } [System.FlagsAttribute] public enum DeliveryNotificationOptions { - Delay = 4, - Never = 134217728, None = 0, - OnFailure = 2, OnSuccess = 1, + OnFailure = 2, + Delay = 4, + Never = 134217728, } public partial class LinkedResource : System.Net.Mail.AttachmentBase { @@ -153,9 +153,9 @@ protected virtual void Dispose(bool disposing) { } } public enum MailPriority { - High = 2, - Low = 1, Normal = 0, + Low = 1, + High = 2, } public delegate void SendCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); public partial class SmtpClient : System.IDisposable @@ -189,14 +189,14 @@ public void SendAsyncCancel() { } } public enum SmtpDeliveryFormat { - International = 1, SevenBit = 0, + International = 1, } public enum SmtpDeliveryMethod { Network = 0, - PickupDirectoryFromIis = 2, SpecifiedPickupDirectory = 1, + PickupDirectoryFromIis = 2, } public partial class SmtpException : System.Exception, System.Runtime.Serialization.ISerializable { @@ -236,31 +236,31 @@ void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Ser } public enum SmtpStatusCode { - BadCommandSequence = 503, + GeneralFailure = -1, + SystemStatus = 211, + HelpMessage = 214, + ServiceReady = 220, + ServiceClosingTransmissionChannel = 221, + Ok = 250, + UserNotLocalWillForward = 251, CannotVerifyUserWillAttemptDelivery = 252, + StartMailInput = 354, + ServiceNotAvailable = 421, + MailboxBusy = 450, + LocalErrorInProcessing = 451, + InsufficientStorage = 452, ClientNotPermitted = 454, + CommandUnrecognized = 500, + SyntaxError = 501, CommandNotImplemented = 502, + BadCommandSequence = 503, CommandParameterNotImplemented = 504, - CommandUnrecognized = 500, + MustIssueStartTlsFirst = 530, + MailboxUnavailable = 550, + UserNotLocalTryAlternatePath = 551, ExceededStorageAllocation = 552, - GeneralFailure = -1, - HelpMessage = 214, - InsufficientStorage = 452, - LocalErrorInProcessing = 451, - MailboxBusy = 450, MailboxNameNotAllowed = 553, - MailboxUnavailable = 550, - MustIssueStartTlsFirst = 530, - Ok = 250, - ServiceClosingTransmissionChannel = 221, - ServiceNotAvailable = 421, - ServiceReady = 220, - StartMailInput = 354, - SyntaxError = 501, - SystemStatus = 211, TransactionFailed = 554, - UserNotLocalTryAlternatePath = 551, - UserNotLocalWillForward = 251, } } namespace System.Net.Mime @@ -327,10 +327,10 @@ public static partial class Text } public enum TransferEncoding { - Base64 = 1, - EightBit = 3, + Unknown = -1, QuotedPrintable = 0, + Base64 = 1, SevenBit = 2, - Unknown = -1, + EightBit = 3, } } diff --git a/src/System.Net.NetworkInformation/ref/System.Net.NetworkInformation.cs b/src/System.Net.NetworkInformation/ref/System.Net.NetworkInformation.cs index 60d530a56d16..e40ca24794d9 100644 --- a/src/System.Net.NetworkInformation/ref/System.Net.NetworkInformation.cs +++ b/src/System.Net.NetworkInformation/ref/System.Net.NetworkInformation.cs @@ -9,11 +9,11 @@ namespace System.Net.NetworkInformation { public enum DuplicateAddressDetectionState { - Deprecated = 3, - Duplicate = 2, Invalid = 0, - Preferred = 4, Tentative = 1, + Duplicate = 2, + Deprecated = 3, + Preferred = 4, } public abstract partial class GatewayIPAddressInformation { @@ -264,11 +264,11 @@ public virtual void CopyTo(System.Net.NetworkInformation.MulticastIPAddressInfor } public enum NetBiosNodeType { + Unknown = 0, Broadcast = 1, - Hybrid = 8, - Mixed = 4, Peer2Peer = 2, - Unknown = 0, + Mixed = 4, + Hybrid = 8, } public delegate void NetworkAddressChangedEventHandler(object sender, System.EventArgs e); public delegate void NetworkAvailabilityChangedEventHandler(object sender, System.Net.NetworkInformation.NetworkAvailabilityEventArgs e); @@ -323,44 +323,44 @@ public enum NetworkInterfaceComponent } public enum NetworkInterfaceType { - AsymmetricDsl = 94, - Atm = 37, - BasicIsdn = 20, + Unknown = 1, Ethernet = 6, - Ethernet3Megabit = 26, - FastEthernetFx = 69, - FastEthernetT = 62, + TokenRing = 9, Fddi = 15, + BasicIsdn = 20, + PrimaryIsdn = 21, + Ppp = 23, + Loopback = 24, + Ethernet3Megabit = 26, + Slip = 28, + Atm = 37, GenericModem = 48, - GigabitEthernet = 117, - HighPerformanceSerialBus = 144, - IPOverAtm = 114, + FastEthernetT = 62, Isdn = 63, - Loopback = 24, - MultiRateSymmetricDsl = 143, - Ppp = 23, - PrimaryIsdn = 21, + FastEthernetFx = 69, + Wireless80211 = 71, + AsymmetricDsl = 94, RateAdaptDsl = 95, - Slip = 28, SymmetricDsl = 96, - TokenRing = 9, - Tunnel = 131, - Unknown = 1, VeryHighSpeedDsl = 97, - Wireless80211 = 71, + IPOverAtm = 114, + GigabitEthernet = 117, + Tunnel = 131, + MultiRateSymmetricDsl = 143, + HighPerformanceSerialBus = 144, Wman = 237, Wwanpp = 243, Wwanpp2 = 244, } public enum OperationalStatus { - Dormant = 5, + Up = 1, Down = 2, - LowerLayerDown = 7, - NotPresent = 6, Testing = 3, Unknown = 4, - Up = 1, + Dormant = 5, + NotPresent = 6, + LowerLayerDown = 7, } public partial class PhysicalAddress { @@ -374,31 +374,31 @@ public PhysicalAddress(byte[] address) { } } public enum PrefixOrigin { - Dhcp = 3, - Manual = 1, Other = 0, - RouterAdvertisement = 4, + Manual = 1, WellKnown = 2, + Dhcp = 3, + RouterAdvertisement = 4, } public enum ScopeLevel { - Admin = 4, - Global = 14, + None = 0, Interface = 1, Link = 2, - None = 0, - Organization = 8, - Site = 5, Subnet = 3, + Admin = 4, + Site = 5, + Organization = 8, + Global = 14, } public enum SuffixOrigin { - LinkLayerAddress = 4, + Other = 0, Manual = 1, + WellKnown = 2, OriginDhcp = 3, - Other = 0, + LinkLayerAddress = 4, Random = 5, - WellKnown = 2, } public abstract partial class TcpConnectionInformation { @@ -409,19 +409,19 @@ protected TcpConnectionInformation() { } } public enum TcpState { + Unknown = 0, Closed = 1, - CloseWait = 8, - Closing = 9, - DeleteTcb = 12, + Listen = 2, + SynSent = 3, + SynReceived = 4, Established = 5, FinWait1 = 6, FinWait2 = 7, + CloseWait = 8, + Closing = 9, LastAck = 10, - Listen = 2, - SynReceived = 4, - SynSent = 3, TimeWait = 11, - Unknown = 0, + DeleteTcb = 12, } public abstract partial class TcpStatistics { diff --git a/src/System.Net.Ping/ref/System.Net.Ping.cs b/src/System.Net.Ping/ref/System.Net.Ping.cs index d97ae525b024..08e1c48d870f 100644 --- a/src/System.Net.Ping/ref/System.Net.Ping.cs +++ b/src/System.Net.Ping/ref/System.Net.Ping.cs @@ -9,30 +9,30 @@ namespace System.Net.NetworkInformation { public enum IPStatus { - BadDestination = 11018, - BadHeader = 11042, - BadOption = 11007, - BadRoute = 11012, - DestinationHostUnreachable = 11003, + Unknown = -1, + Success = 0, DestinationNetworkUnreachable = 11002, - DestinationPortUnreachable = 11005, + DestinationHostUnreachable = 11003, DestinationProhibited = 11004, DestinationProtocolUnreachable = 11004, - DestinationScopeMismatch = 11045, - DestinationUnreachable = 11040, - HardwareError = 11008, - IcmpError = 11044, + DestinationPortUnreachable = 11005, NoResources = 11006, + BadOption = 11007, + HardwareError = 11008, PacketTooBig = 11009, - ParameterProblem = 11015, - SourceQuench = 11016, - Success = 0, TimedOut = 11010, - TimeExceeded = 11041, + BadRoute = 11012, TtlExpired = 11013, TtlReassemblyTimeExceeded = 11014, - Unknown = -1, + ParameterProblem = 11015, + SourceQuench = 11016, + BadDestination = 11018, + DestinationUnreachable = 11040, + TimeExceeded = 11041, + BadHeader = 11042, UnrecognizedNextHeader = 11043, + IcmpError = 11044, + DestinationScopeMismatch = 11045, } public partial class Ping : System.ComponentModel.Component { diff --git a/src/System.Net.Primitives/ref/System.Net.Primitives.cs b/src/System.Net.Primitives/ref/System.Net.Primitives.cs index 0199ff4ada46..9df357f9524e 100644 --- a/src/System.Net.Primitives/ref/System.Net.Primitives.cs +++ b/src/System.Net.Primitives/ref/System.Net.Primitives.cs @@ -10,13 +10,13 @@ namespace System.Net [System.FlagsAttribute] public enum AuthenticationSchemes { - Anonymous = 32768, - Basic = 8, + None = 0, Digest = 1, - IntegratedWindowsAuthentication = 6, Negotiate = 2, - None = 0, Ntlm = 4, + IntegratedWindowsAuthentication = 6, + Basic = 8, + Anonymous = 32768, } public sealed partial class Cookie { @@ -105,10 +105,10 @@ public void Remove(System.Uri uriPrefix, string authType) { } public enum DecompressionMethods { All = -1, - Brotli = 4, - Deflate = 2, - GZip = 1, None = 0, + GZip = 1, + Deflate = 2, + Brotli = 4, } public partial class DnsEndPoint : System.Net.EndPoint { @@ -130,72 +130,72 @@ protected EndPoint() { } } public enum HttpStatusCode { - Accepted = 202, - AlreadyReported = 208, - Ambiguous = 300, - BadGateway = 502, - BadRequest = 400, - Conflict = 409, Continue = 100, - Created = 201, + SwitchingProtocols = 101, + Processing = 102, EarlyHints = 103, - ExpectationFailed = 417, - FailedDependency = 424, - Forbidden = 403, - Found = 302, - GatewayTimeout = 504, - Gone = 410, - HttpVersionNotSupported = 505, + OK = 200, + Created = 201, + Accepted = 202, + NonAuthoritativeInformation = 203, + NoContent = 204, + ResetContent = 205, + PartialContent = 206, + MultiStatus = 207, + AlreadyReported = 208, IMUsed = 226, - InsufficientStorage = 507, - InternalServerError = 500, - LengthRequired = 411, - Locked = 423, - LoopDetected = 508, - MethodNotAllowed = 405, - MisdirectedRequest = 421, + Ambiguous = 300, + MultipleChoices = 300, Moved = 301, MovedPermanently = 301, - MultipleChoices = 300, - MultiStatus = 207, - NetworkAuthenticationRequired = 511, - NoContent = 204, - NonAuthoritativeInformation = 203, - NotAcceptable = 406, - NotExtended = 510, - NotFound = 404, - NotImplemented = 501, - NotModified = 304, - OK = 200, - PartialContent = 206, - PaymentRequired = 402, - PermanentRedirect = 308, - PreconditionFailed = 412, - PreconditionRequired = 428, - Processing = 102, - ProxyAuthenticationRequired = 407, + Found = 302, Redirect = 302, - RedirectKeepVerb = 307, RedirectMethod = 303, - RequestedRangeNotSatisfiable = 416, - RequestEntityTooLarge = 413, - RequestHeaderFieldsTooLarge = 431, - RequestTimeout = 408, - RequestUriTooLong = 414, - ResetContent = 205, SeeOther = 303, - ServiceUnavailable = 503, - SwitchingProtocols = 101, + NotModified = 304, + UseProxy = 305, + Unused = 306, + RedirectKeepVerb = 307, TemporaryRedirect = 307, - TooManyRequests = 429, + PermanentRedirect = 308, + BadRequest = 400, Unauthorized = 401, - UnavailableForLegalReasons = 451, - UnprocessableEntity = 422, + PaymentRequired = 402, + Forbidden = 403, + NotFound = 404, + MethodNotAllowed = 405, + NotAcceptable = 406, + ProxyAuthenticationRequired = 407, + RequestTimeout = 408, + Conflict = 409, + Gone = 410, + LengthRequired = 411, + PreconditionFailed = 412, + RequestEntityTooLarge = 413, + RequestUriTooLong = 414, UnsupportedMediaType = 415, - Unused = 306, + RequestedRangeNotSatisfiable = 416, + ExpectationFailed = 417, + MisdirectedRequest = 421, + UnprocessableEntity = 422, + Locked = 423, + FailedDependency = 424, UpgradeRequired = 426, - UseProxy = 305, + PreconditionRequired = 428, + TooManyRequests = 429, + RequestHeaderFieldsTooLarge = 431, + UnavailableForLegalReasons = 451, + InternalServerError = 500, + NotImplemented = 501, + BadGateway = 502, + ServiceUnavailable = 503, + GatewayTimeout = 504, + HttpVersionNotSupported = 505, VariantAlsoNegotiates = 506, + InsufficientStorage = 507, + LoopDetected = 508, + NotExtended = 510, + NetworkAuthenticationRequired = 511, } public static partial class HttpVersion { @@ -318,13 +318,13 @@ namespace System.Net.Cache { public enum RequestCacheLevel { + Default = 0, BypassCache = 1, - CacheIfAvailable = 3, CacheOnly = 2, - Default = 0, - NoCacheNoStore = 6, - Reload = 5, + CacheIfAvailable = 3, Revalidate = 4, + Reload = 5, + NoCacheNoStore = 6, } public partial class RequestCachePolicy { @@ -355,104 +355,104 @@ namespace System.Net.Security { public enum AuthenticationLevel { + None = 0, MutualAuthRequested = 1, MutualAuthRequired = 2, - None = 0, } [System.FlagsAttribute] public enum SslPolicyErrors { None = 0, - RemoteCertificateChainErrors = 4, - RemoteCertificateNameMismatch = 2, RemoteCertificateNotAvailable = 1, + RemoteCertificateNameMismatch = 2, + RemoteCertificateChainErrors = 4, } } namespace System.Net.Sockets { public enum AddressFamily { - AppleTalk = 16, - Atm = 22, - Banyan = 21, - Ccitt = 10, + Unknown = -1, + Unspecified = 0, + Unix = 1, + InterNetwork = 2, + ImpLink = 3, + Pup = 4, Chaos = 5, - Cluster = 24, + Ipx = 6, + NS = 6, + Iso = 7, + Osi = 7, + Ecma = 8, DataKit = 9, - DataLink = 13, + Ccitt = 10, + Sna = 11, DecNet = 12, - Ecma = 8, - FireFox = 19, + DataLink = 13, + Lat = 14, HyperChannel = 15, - Ieee12844 = 25, - ImpLink = 3, - InterNetwork = 2, + AppleTalk = 16, + NetBios = 17, + VoiceView = 18, + FireFox = 19, + Banyan = 21, + Atm = 22, InterNetworkV6 = 23, - Ipx = 6, + Cluster = 24, + Ieee12844 = 25, Irda = 26, - Iso = 7, - Lat = 14, - Max = 29, - NetBios = 17, NetworkDesigners = 28, - NS = 6, - Osi = 7, - Pup = 4, - Sna = 11, - Unix = 1, - Unknown = -1, - Unspecified = 0, - VoiceView = 18, + Max = 29, } public enum SocketError { + SocketError = -1, + Success = 0, + OperationAborted = 995, + IOPending = 997, + Interrupted = 10004, AccessDenied = 10013, - AddressAlreadyInUse = 10048, - AddressFamilyNotSupported = 10047, - AddressNotAvailable = 10049, - AlreadyInProgress = 10037, - ConnectionAborted = 10053, - ConnectionRefused = 10061, - ConnectionReset = 10054, - DestinationAddressRequired = 10039, - Disconnecting = 10101, Fault = 10014, - HostDown = 10064, - HostNotFound = 11001, - HostUnreachable = 10065, - InProgress = 10036, - Interrupted = 10004, InvalidArgument = 10022, - IOPending = 997, - IsConnected = 10056, + TooManyOpenSockets = 10024, + WouldBlock = 10035, + InProgress = 10036, + AlreadyInProgress = 10037, + NotSocket = 10038, + DestinationAddressRequired = 10039, MessageSize = 10040, + ProtocolType = 10041, + ProtocolOption = 10042, + ProtocolNotSupported = 10043, + SocketNotSupported = 10044, + OperationNotSupported = 10045, + ProtocolFamilyNotSupported = 10046, + AddressFamilyNotSupported = 10047, + AddressAlreadyInUse = 10048, + AddressNotAvailable = 10049, NetworkDown = 10050, - NetworkReset = 10052, NetworkUnreachable = 10051, + NetworkReset = 10052, + ConnectionAborted = 10053, + ConnectionReset = 10054, NoBufferSpaceAvailable = 10055, - NoData = 11004, - NoRecovery = 11003, + IsConnected = 10056, NotConnected = 10057, - NotInitialized = 10093, - NotSocket = 10038, - OperationAborted = 995, - OperationNotSupported = 10045, - ProcessLimit = 10067, - ProtocolFamilyNotSupported = 10046, - ProtocolNotSupported = 10043, - ProtocolOption = 10042, - ProtocolType = 10041, Shutdown = 10058, - SocketError = -1, - SocketNotSupported = 10044, - Success = 0, - SystemNotReady = 10091, TimedOut = 10060, - TooManyOpenSockets = 10024, - TryAgain = 11002, - TypeNotFound = 10109, + ConnectionRefused = 10061, + HostDown = 10064, + HostUnreachable = 10065, + ProcessLimit = 10067, + SystemNotReady = 10091, VersionNotSupported = 10092, - WouldBlock = 10035, + NotInitialized = 10093, + Disconnecting = 10101, + TypeNotFound = 10109, + HostNotFound = 11001, + TryAgain = 11002, + NoRecovery = 11003, + NoData = 11004, } public partial class SocketException : System.ComponentModel.Win32Exception { @@ -468,28 +468,28 @@ namespace System.Security.Authentication { public enum CipherAlgorithmType { - Aes = 26129, - Aes128 = 26126, - Aes192 = 26127, - Aes256 = 26128, - Des = 26113, None = 0, Null = 24576, + Des = 26113, Rc2 = 26114, - Rc4 = 26625, TripleDes = 26115, + Aes128 = 26126, + Aes192 = 26127, + Aes256 = 26128, + Aes = 26129, + Rc4 = 26625, } public enum ExchangeAlgorithmType { - DiffieHellman = 43522, None = 0, - RsaKeyX = 41984, RsaSign = 9216, + RsaKeyX = 41984, + DiffieHellman = 43522, } public enum HashAlgorithmType { - Md5 = 32771, None = 0, + Md5 = 32771, Sha1 = 32772, Sha256 = 32780, Sha384 = 32781, @@ -498,14 +498,14 @@ public enum HashAlgorithmType [System.FlagsAttribute] public enum SslProtocols { - [System.ObsoleteAttribute("This value has been deprecated. It is no longer supported. https://go.microsoft.com/fwlink/?linkid=14202")] - Default = 240, None = 0, [System.ObsoleteAttribute("This value has been deprecated. It is no longer supported. https://go.microsoft.com/fwlink/?linkid=14202")] Ssl2 = 12, [System.ObsoleteAttribute("This value has been deprecated. It is no longer supported. https://go.microsoft.com/fwlink/?linkid=14202")] Ssl3 = 48, Tls = 192, + [System.ObsoleteAttribute("This value has been deprecated. It is no longer supported. https://go.microsoft.com/fwlink/?linkid=14202")] + Default = 240, Tls11 = 768, Tls12 = 3072, Tls13 = 12288, @@ -521,8 +521,8 @@ protected ChannelBinding(bool ownsHandle) : base (default(bool)) { } } public enum ChannelBindingKind { - Endpoint = 26, - Unique = 25, Unknown = 0, + Unique = 25, + Endpoint = 26, } } diff --git a/src/System.Net.Requests/ref/System.Net.Requests.cs b/src/System.Net.Requests/ref/System.Net.Requests.cs index 98c0bfe04f82..c9074d1e55c4 100644 --- a/src/System.Net.Requests/ref/System.Net.Requests.cs +++ b/src/System.Net.Requests/ref/System.Net.Requests.cs @@ -73,43 +73,43 @@ void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Ser } public enum FtpStatusCode { - AccountNeeded = 532, - ActionAbortedLocalProcessingError = 451, - ActionAbortedUnknownPageType = 551, - ActionNotTakenFilenameNotAllowed = 553, - ActionNotTakenFileUnavailable = 550, - ActionNotTakenFileUnavailableOrBusy = 450, - ActionNotTakenInsufficientSpace = 452, - ArgumentSyntaxError = 501, - BadCommandSequence = 503, - CantOpenData = 425, - ClosingControl = 221, - ClosingData = 226, - CommandExtraneous = 202, - CommandNotImplemented = 502, - CommandOK = 200, - CommandSyntaxError = 500, - ConnectionClosed = 426, + Undefined = 0, + RestartMarker = 110, + ServiceTemporarilyNotAvailable = 120, DataAlreadyOpen = 125, + OpeningData = 150, + CommandOK = 200, + CommandExtraneous = 202, DirectoryStatus = 212, - EnteringPassive = 227, - FileActionAborted = 552, - FileActionOK = 250, - FileCommandPending = 350, FileStatus = 213, + SystemType = 215, + SendUserCommand = 220, + ClosingControl = 221, + ClosingData = 226, + EnteringPassive = 227, LoggedInProceed = 230, - NeedLoginAccount = 332, - NotLoggedIn = 530, - OpeningData = 150, + ServerWantsSecureSession = 234, + FileActionOK = 250, PathnameCreated = 257, - RestartMarker = 110, SendPasswordCommand = 331, - SendUserCommand = 220, - ServerWantsSecureSession = 234, + NeedLoginAccount = 332, + FileCommandPending = 350, ServiceNotAvailable = 421, - ServiceTemporarilyNotAvailable = 120, - SystemType = 215, - Undefined = 0, + CantOpenData = 425, + ConnectionClosed = 426, + ActionNotTakenFileUnavailableOrBusy = 450, + ActionAbortedLocalProcessingError = 451, + ActionNotTakenInsufficientSpace = 452, + CommandSyntaxError = 500, + ArgumentSyntaxError = 501, + CommandNotImplemented = 502, + BadCommandSequence = 503, + NotLoggedIn = 530, + AccountNeeded = 532, + ActionNotTakenFileUnavailable = 550, + ActionAbortedUnknownPageType = 551, + FileActionAborted = 552, + ActionNotTakenFilenameNotAllowed = 553, } public sealed partial class FtpWebRequest : System.Net.WebRequest { @@ -310,27 +310,27 @@ void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Ser } public enum WebExceptionStatus { - CacheEntryNotFound = 18, - ConnectFailure = 2, - ConnectionClosed = 8, - KeepAliveFailure = 12, - MessageLengthLimitExceeded = 17, + Success = 0, NameResolutionFailure = 1, - Pending = 13, - PipelineFailure = 5, - ProtocolError = 7, - ProxyNameResolutionFailure = 15, + ConnectFailure = 2, ReceiveFailure = 3, + SendFailure = 4, + PipelineFailure = 5, RequestCanceled = 6, - RequestProhibitedByCachePolicy = 19, - RequestProhibitedByProxy = 20, + ProtocolError = 7, + ConnectionClosed = 8, + TrustFailure = 9, SecureChannelFailure = 10, - SendFailure = 4, ServerProtocolViolation = 11, - Success = 0, + KeepAliveFailure = 12, + Pending = 13, Timeout = 14, - TrustFailure = 9, + ProxyNameResolutionFailure = 15, UnknownError = 16, + MessageLengthLimitExceeded = 17, + CacheEntryNotFound = 18, + RequestProhibitedByCachePolicy = 19, + RequestProhibitedByProxy = 20, } public abstract partial class WebRequest : System.MarshalByRefObject, System.Runtime.Serialization.ISerializable { @@ -427,24 +427,24 @@ namespace System.Net.Cache { public enum HttpCacheAgeControl { + None = 0, + MinFresh = 1, MaxAge = 2, - MaxAgeAndMaxStale = 6, MaxAgeAndMinFresh = 3, MaxStale = 4, - MinFresh = 1, - None = 0, + MaxAgeAndMaxStale = 6, } public enum HttpRequestCacheLevel { + Default = 0, BypassCache = 1, - CacheIfAvailable = 3, CacheOnly = 2, - CacheOrNextCacheOnly = 7, - Default = 0, + CacheIfAvailable = 3, + Revalidate = 4, + Reload = 5, NoCacheNoStore = 6, + CacheOrNextCacheOnly = 7, Refresh = 8, - Reload = 5, - Revalidate = 4, } public partial class HttpRequestCachePolicy : System.Net.Cache.RequestCachePolicy { diff --git a/src/System.Net.Security/ref/System.Net.Security.cs b/src/System.Net.Security/ref/System.Net.Security.cs index eec818d0efa1..2a45d123a797 100644 --- a/src/System.Net.Security/ref/System.Net.Security.cs +++ b/src/System.Net.Security/ref/System.Net.Security.cs @@ -22,9 +22,9 @@ protected override void Dispose(bool disposing) { } } public enum EncryptionPolicy { + RequireEncryption = 0, AllowNoEncryption = 1, NoEncryption = 2, - RequireEncryption = 0, } public delegate System.Security.Cryptography.X509Certificates.X509Certificate LocalCertificateSelectionCallback(object sender, string targetHost, System.Security.Cryptography.X509Certificates.X509CertificateCollection localCertificates, System.Security.Cryptography.X509Certificates.X509Certificate remoteCertificate, string[] acceptableIssuers); public partial class NegotiateStream : System.Net.Security.AuthenticatedStream @@ -90,9 +90,9 @@ public override void Write(byte[] buffer, int offset, int count) { } } public enum ProtectionLevel { - EncryptAndSign = 2, None = 0, Sign = 1, + EncryptAndSign = 2, } public delegate bool RemoteCertificateValidationCallback(object sender, System.Security.Cryptography.X509Certificates.X509Certificate certificate, System.Security.Cryptography.X509Certificates.X509Chain chain, System.Net.Security.SslPolicyErrors sslPolicyErrors); public delegate System.Security.Cryptography.X509Certificates.X509Certificate ServerCertificateSelectionCallback(object sender, string hostName); @@ -225,343 +225,343 @@ public CipherSuitesPolicy(System.Collections.Generic.IEnumerable buffer) { } } public enum SocketAsyncOperation { + None = 0, Accept = 1, Connect = 2, Disconnect = 3, - None = 0, Receive = 4, ReceiveFrom = 5, ReceiveMessageFrom = 6, @@ -404,15 +404,15 @@ public enum SocketAsyncOperation [System.FlagsAttribute] public enum SocketFlags { - Broadcast = 1024, - ControlDataTruncated = 512, - DontRoute = 4, - Multicast = 2048, None = 0, OutOfBand = 1, - Partial = 32768, Peek = 2, + DontRoute = 4, Truncated = 256, + ControlDataTruncated = 512, + Broadcast = 1024, + Multicast = 2048, + Partial = 32768, } public partial struct SocketInformation { @@ -423,70 +423,70 @@ public partial struct SocketInformation [System.FlagsAttribute] public enum SocketInformationOptions { + NonBlocking = 1, Connected = 2, Listening = 4, - NonBlocking = 1, UseOnlyOverlappedIO = 8, } public enum SocketOptionLevel { IP = 0, - IPv6 = 41, - Socket = 65535, Tcp = 6, Udp = 17, + IPv6 = 41, + Socket = 65535, } public enum SocketOptionName { + DontLinger = -129, + ExclusiveAddressUse = -5, + Debug = 1, + IPOptions = 1, + NoChecksum = 1, + NoDelay = 1, AcceptConnection = 2, - AddMembership = 12, - AddSourceMembership = 15, - BlockSource = 17, - Broadcast = 32, BsdUrgent = 2, - ChecksumCoverage = 20, - Debug = 1, + Expedited = 2, + HeaderIncluded = 2, + TcpKeepAliveTime = 3, + TypeOfService = 3, + IpTimeToLive = 4, + ReuseAddress = 4, + KeepAlive = 8, + MulticastInterface = 9, + MulticastTimeToLive = 10, + MulticastLoopback = 11, + AddMembership = 12, + DropMembership = 13, DontFragment = 14, - DontLinger = -129, + AddSourceMembership = 15, DontRoute = 16, - DropMembership = 13, DropSourceMembership = 16, - Error = 4103, - ExclusiveAddressUse = -5, - Expedited = 2, - HeaderIncluded = 2, + TcpKeepAliveRetryCount = 16, + BlockSource = 17, + TcpKeepAliveInterval = 17, + UnblockSource = 18, + PacketInformation = 19, + ChecksumCoverage = 20, HopLimit = 21, - IPOptions = 1, IPProtectionLevel = 23, - IpTimeToLive = 4, IPv6Only = 27, - KeepAlive = 8, + Broadcast = 32, + UseLoopback = 64, Linger = 128, - MaxConnections = 2147483647, - MulticastInterface = 9, - MulticastLoopback = 11, - MulticastTimeToLive = 10, - NoChecksum = 1, - NoDelay = 1, OutOfBandInline = 256, - PacketInformation = 19, - ReceiveBuffer = 4098, - ReceiveLowWater = 4100, - ReceiveTimeout = 4102, - ReuseAddress = 4, - ReuseUnicastPort = 12295, SendBuffer = 4097, + ReceiveBuffer = 4098, SendLowWater = 4099, + ReceiveLowWater = 4100, SendTimeout = 4101, - TcpKeepAliveInterval = 17, - TcpKeepAliveRetryCount = 16, - TcpKeepAliveTime = 3, + ReceiveTimeout = 4102, + Error = 4103, Type = 4104, - TypeOfService = 3, - UnblockSource = 18, + ReuseUnicastPort = 12295, UpdateAcceptContext = 28683, UpdateConnectContext = 28688, - UseLoopback = 64, + MaxConnections = 2147483647, } public partial struct SocketReceiveFromResult { @@ -502,9 +502,9 @@ public partial struct SocketReceiveMessageFromResult } public enum SocketShutdown { - Both = 2, Receive = 0, Send = 1, + Both = 2, } public static partial class SocketTaskExtensions { @@ -526,12 +526,12 @@ public static partial class SocketTaskExtensions } public enum SocketType { + Unknown = -1, + Stream = 1, Dgram = 2, Raw = 3, Rdm = 4, Seqpacket = 5, - Stream = 1, - Unknown = -1, } public partial class TcpClient : System.IDisposable { @@ -595,12 +595,12 @@ public void Stop() { } [System.FlagsAttribute] public enum TransmitFileOptions { + UseDefaultWorkerThread = 0, Disconnect = 1, ReuseSocket = 2, - UseDefaultWorkerThread = 0, - UseKernelApc = 32, - UseSystemThread = 16, WriteBehind = 4, + UseSystemThread = 16, + UseKernelApc = 32, } public partial class UdpClient : System.IDisposable { diff --git a/src/System.Net.WebHeaderCollection/ref/System.Net.WebHeaderCollection.cs b/src/System.Net.WebHeaderCollection/ref/System.Net.WebHeaderCollection.cs index 5b5e3c1ff08b..88b0d4c6a640 100644 --- a/src/System.Net.WebHeaderCollection/ref/System.Net.WebHeaderCollection.cs +++ b/src/System.Net.WebHeaderCollection/ref/System.Net.WebHeaderCollection.cs @@ -9,25 +9,33 @@ namespace System.Net { public enum HttpRequestHeader { - Accept = 20, - AcceptCharset = 21, - AcceptEncoding = 22, - AcceptLanguage = 23, - Allow = 10, - Authorization = 24, CacheControl = 0, Connection = 1, + Date = 2, + KeepAlive = 3, + Pragma = 4, + Trailer = 5, + TransferEncoding = 6, + Upgrade = 7, + Via = 8, + Warning = 9, + Allow = 10, + ContentLength = 11, + ContentType = 12, ContentEncoding = 13, ContentLanguage = 14, - ContentLength = 11, ContentLocation = 15, ContentMd5 = 16, ContentRange = 17, - ContentType = 12, + Expires = 18, + LastModified = 19, + Accept = 20, + AcceptCharset = 21, + AcceptEncoding = 22, + AcceptLanguage = 23, + Authorization = 24, Cookie = 25, - Date = 2, Expect = 26, - Expires = 18, From = 27, Host = 28, IfMatch = 29, @@ -35,53 +43,45 @@ public enum HttpRequestHeader IfNoneMatch = 31, IfRange = 32, IfUnmodifiedSince = 33, - KeepAlive = 3, - LastModified = 19, MaxForwards = 34, - Pragma = 4, ProxyAuthorization = 35, - Range = 37, Referer = 36, + Range = 37, Te = 38, - Trailer = 5, - TransferEncoding = 6, Translate = 39, - Upgrade = 7, UserAgent = 40, - Via = 8, - Warning = 9, } public enum HttpResponseHeader { - AcceptRanges = 20, - Age = 21, - Allow = 10, CacheControl = 0, Connection = 1, + Date = 2, + KeepAlive = 3, + Pragma = 4, + Trailer = 5, + TransferEncoding = 6, + Upgrade = 7, + Via = 8, + Warning = 9, + Allow = 10, + ContentLength = 11, + ContentType = 12, ContentEncoding = 13, ContentLanguage = 14, - ContentLength = 11, ContentLocation = 15, ContentMd5 = 16, ContentRange = 17, - ContentType = 12, - Date = 2, - ETag = 22, Expires = 18, - KeepAlive = 3, LastModified = 19, + AcceptRanges = 20, + Age = 21, + ETag = 22, Location = 23, - Pragma = 4, ProxyAuthenticate = 24, RetryAfter = 25, Server = 26, SetCookie = 27, - Trailer = 5, - TransferEncoding = 6, - Upgrade = 7, Vary = 28, - Via = 8, - Warning = 9, WwwAuthenticate = 29, } public partial class WebHeaderCollection : System.Collections.Specialized.NameValueCollection, System.Collections.IEnumerable, System.Runtime.Serialization.ISerializable diff --git a/src/System.Net.WebSockets/ref/System.Net.WebSockets.cs b/src/System.Net.WebSockets/ref/System.Net.WebSockets.cs index eb43d37e8379..3d8d70070fb5 100644 --- a/src/System.Net.WebSockets/ref/System.Net.WebSockets.cs +++ b/src/System.Net.WebSockets/ref/System.Net.WebSockets.cs @@ -46,16 +46,16 @@ protected static void ThrowOnInvalidState(System.Net.WebSockets.WebSocketState s } public enum WebSocketCloseStatus { - Empty = 1005, + NormalClosure = 1000, EndpointUnavailable = 1001, - InternalServerError = 1011, + ProtocolError = 1002, InvalidMessageType = 1003, + Empty = 1005, InvalidPayloadData = 1007, - MandatoryExtension = 1010, - MessageTooBig = 1009, - NormalClosure = 1000, PolicyViolation = 1008, - ProtocolError = 1002, + MessageTooBig = 1009, + MandatoryExtension = 1010, + InternalServerError = 1011, } public abstract partial class WebSocketContext { @@ -75,16 +75,16 @@ protected WebSocketContext() { } } public enum WebSocketError { - ConnectionClosedPrematurely = 8, - Faulted = 2, - HeaderError = 7, + Success = 0, InvalidMessageType = 1, - InvalidState = 9, + Faulted = 2, NativeError = 3, NotAWebSocket = 4, - Success = 0, - UnsupportedProtocol = 6, UnsupportedVersion = 5, + UnsupportedProtocol = 6, + HeaderError = 7, + ConnectionClosedPrematurely = 8, + InvalidState = 9, } public sealed partial class WebSocketException : System.ComponentModel.Win32Exception { @@ -108,9 +108,9 @@ public override void GetObjectData(System.Runtime.Serialization.SerializationInf } public enum WebSocketMessageType { + Text = 0, Binary = 1, Close = 2, - Text = 0, } public partial class WebSocketReceiveResult { @@ -124,12 +124,12 @@ public WebSocketReceiveResult(int count, System.Net.WebSockets.WebSocketMessageT } public enum WebSocketState { - Aborted = 6, - Closed = 5, - CloseReceived = 4, - CloseSent = 3, - Connecting = 1, None = 0, + Connecting = 1, Open = 2, + CloseSent = 3, + CloseReceived = 4, + Closed = 5, + Aborted = 6, } } diff --git a/src/System.Numerics.Vectors/ref/System.Numerics.Vectors.cs b/src/System.Numerics.Vectors/ref/System.Numerics.Vectors.cs index 1202bab3e86e..5765d185439e 100644 --- a/src/System.Numerics.Vectors/ref/System.Numerics.Vectors.cs +++ b/src/System.Numerics.Vectors/ref/System.Numerics.Vectors.cs @@ -17,8 +17,8 @@ public partial struct Matrix3x2 : System.IEquatable public float M32; public Matrix3x2(float m11, float m12, float m21, float m22, float m31, float m32) { throw null; } public static System.Numerics.Matrix3x2 Identity { get { throw null; } } - public readonly bool IsIdentity { get { throw null; } } - public System.Numerics.Vector2 Translation { readonly get { throw null; } set { } } + public bool IsIdentity { get { throw null; } } + public System.Numerics.Vector2 Translation { get { throw null; } set { } } public static System.Numerics.Matrix3x2 Add(System.Numerics.Matrix3x2 value1, System.Numerics.Matrix3x2 value2) { throw null; } public static System.Numerics.Matrix3x2 CreateRotation(float radians) { throw null; } public static System.Numerics.Matrix3x2 CreateRotation(float radians, System.Numerics.Vector2 centerPoint) { throw null; } @@ -32,10 +32,10 @@ public partial struct Matrix3x2 : System.IEquatable public static System.Numerics.Matrix3x2 CreateSkew(float radiansX, float radiansY, System.Numerics.Vector2 centerPoint) { throw null; } public static System.Numerics.Matrix3x2 CreateTranslation(System.Numerics.Vector2 position) { throw null; } public static System.Numerics.Matrix3x2 CreateTranslation(float xPosition, float yPosition) { throw null; } - public readonly bool Equals(System.Numerics.Matrix3x2 other) { throw null; } - public override readonly bool Equals(object obj) { throw null; } - public readonly float GetDeterminant() { throw null; } - public override readonly int GetHashCode() { throw null; } + public bool Equals(System.Numerics.Matrix3x2 other) { throw null; } + public override bool Equals(object obj) { throw null; } + public float GetDeterminant() { throw null; } + public override int GetHashCode() { throw null; } public static bool Invert(System.Numerics.Matrix3x2 matrix, out System.Numerics.Matrix3x2 result) { throw null; } public static System.Numerics.Matrix3x2 Lerp(System.Numerics.Matrix3x2 matrix1, System.Numerics.Matrix3x2 matrix2, float amount) { throw null; } public static System.Numerics.Matrix3x2 Multiply(System.Numerics.Matrix3x2 value1, System.Numerics.Matrix3x2 value2) { throw null; } @@ -49,7 +49,7 @@ public partial struct Matrix3x2 : System.IEquatable public static System.Numerics.Matrix3x2 operator -(System.Numerics.Matrix3x2 value1, System.Numerics.Matrix3x2 value2) { throw null; } public static System.Numerics.Matrix3x2 operator -(System.Numerics.Matrix3x2 value) { throw null; } public static System.Numerics.Matrix3x2 Subtract(System.Numerics.Matrix3x2 value1, System.Numerics.Matrix3x2 value2) { throw null; } - public override readonly string ToString() { throw null; } + public override string ToString() { throw null; } } public partial struct Matrix4x4 : System.IEquatable { @@ -72,8 +72,8 @@ public partial struct Matrix4x4 : System.IEquatable public Matrix4x4(System.Numerics.Matrix3x2 value) { throw null; } public Matrix4x4(float m11, float m12, float m13, float m14, float m21, float m22, float m23, float m24, float m31, float m32, float m33, float m34, float m41, float m42, float m43, float m44) { throw null; } public static System.Numerics.Matrix4x4 Identity { get { throw null; } } - public readonly bool IsIdentity { get { throw null; } } - public System.Numerics.Vector3 Translation { readonly get { throw null; } set { } } + public bool IsIdentity { get { throw null; } } + public System.Numerics.Vector3 Translation { get { throw null; } set { } } public static System.Numerics.Matrix4x4 Add(System.Numerics.Matrix4x4 value1, System.Numerics.Matrix4x4 value2) { throw null; } public static System.Numerics.Matrix4x4 CreateBillboard(System.Numerics.Vector3 objectPosition, System.Numerics.Vector3 cameraPosition, System.Numerics.Vector3 cameraUpVector, System.Numerics.Vector3 cameraForwardVector) { throw null; } public static System.Numerics.Matrix4x4 CreateConstrainedBillboard(System.Numerics.Vector3 objectPosition, System.Numerics.Vector3 cameraPosition, System.Numerics.Vector3 rotateAxis, System.Numerics.Vector3 cameraForwardVector, System.Numerics.Vector3 objectForwardVector) { throw null; } @@ -104,10 +104,10 @@ public partial struct Matrix4x4 : System.IEquatable public static System.Numerics.Matrix4x4 CreateTranslation(float xPosition, float yPosition, float zPosition) { throw null; } public static System.Numerics.Matrix4x4 CreateWorld(System.Numerics.Vector3 position, System.Numerics.Vector3 forward, System.Numerics.Vector3 up) { throw null; } public static bool Decompose(System.Numerics.Matrix4x4 matrix, out System.Numerics.Vector3 scale, out System.Numerics.Quaternion rotation, out System.Numerics.Vector3 translation) { throw null; } - public readonly bool Equals(System.Numerics.Matrix4x4 other) { throw null; } - public override readonly bool Equals(object obj) { throw null; } - public readonly float GetDeterminant() { throw null; } - public override readonly int GetHashCode() { throw null; } + public bool Equals(System.Numerics.Matrix4x4 other) { throw null; } + public override bool Equals(object obj) { throw null; } + public float GetDeterminant() { throw null; } + public override int GetHashCode() { throw null; } public static bool Invert(System.Numerics.Matrix4x4 matrix, out System.Numerics.Matrix4x4 result) { throw null; } public static System.Numerics.Matrix4x4 Lerp(System.Numerics.Matrix4x4 matrix1, System.Numerics.Matrix4x4 matrix2, float amount) { throw null; } public static System.Numerics.Matrix4x4 Multiply(System.Numerics.Matrix4x4 value1, System.Numerics.Matrix4x4 value2) { throw null; } @@ -121,7 +121,7 @@ public partial struct Matrix4x4 : System.IEquatable public static System.Numerics.Matrix4x4 operator -(System.Numerics.Matrix4x4 value1, System.Numerics.Matrix4x4 value2) { throw null; } public static System.Numerics.Matrix4x4 operator -(System.Numerics.Matrix4x4 value) { throw null; } public static System.Numerics.Matrix4x4 Subtract(System.Numerics.Matrix4x4 value1, System.Numerics.Matrix4x4 value2) { throw null; } - public override readonly string ToString() { throw null; } + public override string ToString() { throw null; } public static System.Numerics.Matrix4x4 Transform(System.Numerics.Matrix4x4 value, System.Numerics.Quaternion rotation) { throw null; } public static System.Numerics.Matrix4x4 Transpose(System.Numerics.Matrix4x4 matrix) { throw null; } } @@ -136,13 +136,13 @@ public partial struct Plane : System.IEquatable public static float Dot(System.Numerics.Plane plane, System.Numerics.Vector4 value) { throw null; } public static float DotCoordinate(System.Numerics.Plane plane, System.Numerics.Vector3 value) { throw null; } public static float DotNormal(System.Numerics.Plane plane, System.Numerics.Vector3 value) { throw null; } - public readonly bool Equals(System.Numerics.Plane other) { throw null; } - public override readonly bool Equals(object obj) { throw null; } - public override readonly int GetHashCode() { throw null; } + public bool Equals(System.Numerics.Plane other) { throw null; } + public override bool Equals(object obj) { throw null; } + public override int GetHashCode() { throw null; } public static System.Numerics.Plane Normalize(System.Numerics.Plane value) { throw null; } public static bool operator ==(System.Numerics.Plane value1, System.Numerics.Plane value2) { throw null; } public static bool operator !=(System.Numerics.Plane value1, System.Numerics.Plane value2) { throw null; } - public override readonly string ToString() { throw null; } + public override string ToString() { throw null; } public static System.Numerics.Plane Transform(System.Numerics.Plane plane, System.Numerics.Matrix4x4 matrix) { throw null; } public static System.Numerics.Plane Transform(System.Numerics.Plane plane, System.Numerics.Quaternion rotation) { throw null; } } @@ -155,7 +155,7 @@ public partial struct Quaternion : System.IEquatable public Quaternion(System.Numerics.Vector3 vectorPart, float scalarPart) { throw null; } public Quaternion(float x, float y, float z, float w) { throw null; } public static System.Numerics.Quaternion Identity { get { throw null; } } - public readonly bool IsIdentity { get { throw null; } } + public bool IsIdentity { get { throw null; } } public static System.Numerics.Quaternion Add(System.Numerics.Quaternion value1, System.Numerics.Quaternion value2) { throw null; } public static System.Numerics.Quaternion Concatenate(System.Numerics.Quaternion value1, System.Numerics.Quaternion value2) { throw null; } public static System.Numerics.Quaternion Conjugate(System.Numerics.Quaternion value) { throw null; } @@ -164,12 +164,12 @@ public partial struct Quaternion : System.IEquatable public static System.Numerics.Quaternion CreateFromYawPitchRoll(float yaw, float pitch, float roll) { throw null; } public static System.Numerics.Quaternion Divide(System.Numerics.Quaternion value1, System.Numerics.Quaternion value2) { throw null; } public static float Dot(System.Numerics.Quaternion quaternion1, System.Numerics.Quaternion quaternion2) { throw null; } - public readonly bool Equals(System.Numerics.Quaternion other) { throw null; } - public override readonly bool Equals(object obj) { throw null; } - public override readonly int GetHashCode() { throw null; } + public bool Equals(System.Numerics.Quaternion other) { throw null; } + public override bool Equals(object obj) { throw null; } + public override int GetHashCode() { throw null; } public static System.Numerics.Quaternion Inverse(System.Numerics.Quaternion value) { throw null; } - public readonly float Length() { throw null; } - public readonly float LengthSquared() { throw null; } + public float Length() { throw null; } + public float LengthSquared() { throw null; } public static System.Numerics.Quaternion Lerp(System.Numerics.Quaternion quaternion1, System.Numerics.Quaternion quaternion2, float amount) { throw null; } public static System.Numerics.Quaternion Multiply(System.Numerics.Quaternion value1, System.Numerics.Quaternion value2) { throw null; } public static System.Numerics.Quaternion Multiply(System.Numerics.Quaternion value1, float value2) { throw null; } @@ -185,7 +185,7 @@ public partial struct Quaternion : System.IEquatable public static System.Numerics.Quaternion operator -(System.Numerics.Quaternion value) { throw null; } public static System.Numerics.Quaternion Slerp(System.Numerics.Quaternion quaternion1, System.Numerics.Quaternion quaternion2, float amount) { throw null; } public static System.Numerics.Quaternion Subtract(System.Numerics.Quaternion value1, System.Numerics.Quaternion value2) { throw null; } - public override readonly string ToString() { throw null; } + public override string ToString() { throw null; } } public static partial class Vector { @@ -307,18 +307,18 @@ public partial struct Vector2 : System.IEquatable, Syst public static System.Numerics.Vector2 Abs(System.Numerics.Vector2 value) { throw null; } public static System.Numerics.Vector2 Add(System.Numerics.Vector2 left, System.Numerics.Vector2 right) { throw null; } public static System.Numerics.Vector2 Clamp(System.Numerics.Vector2 value1, System.Numerics.Vector2 min, System.Numerics.Vector2 max) { throw null; } - public readonly void CopyTo(float[] array) { } - public readonly void CopyTo(float[] array, int index) { } + public void CopyTo(float[] array) { } + public void CopyTo(float[] array, int index) { } public static float Distance(System.Numerics.Vector2 value1, System.Numerics.Vector2 value2) { throw null; } public static float DistanceSquared(System.Numerics.Vector2 value1, System.Numerics.Vector2 value2) { throw null; } public static System.Numerics.Vector2 Divide(System.Numerics.Vector2 left, System.Numerics.Vector2 right) { throw null; } public static System.Numerics.Vector2 Divide(System.Numerics.Vector2 left, float divisor) { throw null; } public static float Dot(System.Numerics.Vector2 value1, System.Numerics.Vector2 value2) { throw null; } - public readonly bool Equals(System.Numerics.Vector2 other) { throw null; } - public override readonly bool Equals(object obj) { throw null; } - public override readonly int GetHashCode() { throw null; } - public readonly float Length() { throw null; } - public readonly float LengthSquared() { throw null; } + public bool Equals(System.Numerics.Vector2 other) { throw null; } + public override bool Equals(object obj) { throw null; } + public override int GetHashCode() { throw null; } + public float Length() { throw null; } + public float LengthSquared() { throw null; } public static System.Numerics.Vector2 Lerp(System.Numerics.Vector2 value1, System.Numerics.Vector2 value2, float amount) { throw null; } public static System.Numerics.Vector2 Max(System.Numerics.Vector2 value1, System.Numerics.Vector2 value2) { throw null; } public static System.Numerics.Vector2 Min(System.Numerics.Vector2 value1, System.Numerics.Vector2 value2) { throw null; } @@ -340,9 +340,9 @@ public readonly void CopyTo(float[] array, int index) { } public static System.Numerics.Vector2 Reflect(System.Numerics.Vector2 vector, System.Numerics.Vector2 normal) { throw null; } public static System.Numerics.Vector2 SquareRoot(System.Numerics.Vector2 value) { throw null; } public static System.Numerics.Vector2 Subtract(System.Numerics.Vector2 left, System.Numerics.Vector2 right) { throw null; } - public override readonly string ToString() { throw null; } - public readonly string ToString(string format) { throw null; } - public readonly string ToString(string format, System.IFormatProvider formatProvider) { throw null; } + public override string ToString() { throw null; } + public string ToString(string format) { throw null; } + public string ToString(string format, System.IFormatProvider formatProvider) { throw null; } public static System.Numerics.Vector2 Transform(System.Numerics.Vector2 position, System.Numerics.Matrix3x2 matrix) { throw null; } public static System.Numerics.Vector2 Transform(System.Numerics.Vector2 position, System.Numerics.Matrix4x4 matrix) { throw null; } public static System.Numerics.Vector2 Transform(System.Numerics.Vector2 value, System.Numerics.Quaternion rotation) { throw null; } @@ -365,19 +365,19 @@ public partial struct Vector3 : System.IEquatable, Syst public static System.Numerics.Vector3 Abs(System.Numerics.Vector3 value) { throw null; } public static System.Numerics.Vector3 Add(System.Numerics.Vector3 left, System.Numerics.Vector3 right) { throw null; } public static System.Numerics.Vector3 Clamp(System.Numerics.Vector3 value1, System.Numerics.Vector3 min, System.Numerics.Vector3 max) { throw null; } - public readonly void CopyTo(float[] array) { } - public readonly void CopyTo(float[] array, int index) { } + public void CopyTo(float[] array) { } + public void CopyTo(float[] array, int index) { } public static System.Numerics.Vector3 Cross(System.Numerics.Vector3 vector1, System.Numerics.Vector3 vector2) { throw null; } public static float Distance(System.Numerics.Vector3 value1, System.Numerics.Vector3 value2) { throw null; } public static float DistanceSquared(System.Numerics.Vector3 value1, System.Numerics.Vector3 value2) { throw null; } public static System.Numerics.Vector3 Divide(System.Numerics.Vector3 left, System.Numerics.Vector3 right) { throw null; } public static System.Numerics.Vector3 Divide(System.Numerics.Vector3 left, float divisor) { throw null; } public static float Dot(System.Numerics.Vector3 vector1, System.Numerics.Vector3 vector2) { throw null; } - public readonly bool Equals(System.Numerics.Vector3 other) { throw null; } - public override readonly bool Equals(object obj) { throw null; } - public override readonly int GetHashCode() { throw null; } - public readonly float Length() { throw null; } - public readonly float LengthSquared() { throw null; } + public bool Equals(System.Numerics.Vector3 other) { throw null; } + public override bool Equals(object obj) { throw null; } + public override int GetHashCode() { throw null; } + public float Length() { throw null; } + public float LengthSquared() { throw null; } public static System.Numerics.Vector3 Lerp(System.Numerics.Vector3 value1, System.Numerics.Vector3 value2, float amount) { throw null; } public static System.Numerics.Vector3 Max(System.Numerics.Vector3 value1, System.Numerics.Vector3 value2) { throw null; } public static System.Numerics.Vector3 Min(System.Numerics.Vector3 value1, System.Numerics.Vector3 value2) { throw null; } @@ -399,9 +399,9 @@ public readonly void CopyTo(float[] array, int index) { } public static System.Numerics.Vector3 Reflect(System.Numerics.Vector3 vector, System.Numerics.Vector3 normal) { throw null; } public static System.Numerics.Vector3 SquareRoot(System.Numerics.Vector3 value) { throw null; } public static System.Numerics.Vector3 Subtract(System.Numerics.Vector3 left, System.Numerics.Vector3 right) { throw null; } - public override readonly string ToString() { throw null; } - public readonly string ToString(string format) { throw null; } - public readonly string ToString(string format, System.IFormatProvider formatProvider) { throw null; } + public override string ToString() { throw null; } + public string ToString(string format) { throw null; } + public string ToString(string format, System.IFormatProvider formatProvider) { throw null; } public static System.Numerics.Vector3 Transform(System.Numerics.Vector3 position, System.Numerics.Matrix4x4 matrix) { throw null; } public static System.Numerics.Vector3 Transform(System.Numerics.Vector3 value, System.Numerics.Quaternion rotation) { throw null; } public static System.Numerics.Vector3 TransformNormal(System.Numerics.Vector3 normal, System.Numerics.Matrix4x4 matrix) { throw null; } @@ -425,18 +425,18 @@ public partial struct Vector4 : System.IEquatable, Syst public static System.Numerics.Vector4 Abs(System.Numerics.Vector4 value) { throw null; } public static System.Numerics.Vector4 Add(System.Numerics.Vector4 left, System.Numerics.Vector4 right) { throw null; } public static System.Numerics.Vector4 Clamp(System.Numerics.Vector4 value1, System.Numerics.Vector4 min, System.Numerics.Vector4 max) { throw null; } - public readonly void CopyTo(float[] array) { } - public readonly void CopyTo(float[] array, int index) { } + public void CopyTo(float[] array) { } + public void CopyTo(float[] array, int index) { } public static float Distance(System.Numerics.Vector4 value1, System.Numerics.Vector4 value2) { throw null; } public static float DistanceSquared(System.Numerics.Vector4 value1, System.Numerics.Vector4 value2) { throw null; } public static System.Numerics.Vector4 Divide(System.Numerics.Vector4 left, System.Numerics.Vector4 right) { throw null; } public static System.Numerics.Vector4 Divide(System.Numerics.Vector4 left, float divisor) { throw null; } public static float Dot(System.Numerics.Vector4 vector1, System.Numerics.Vector4 vector2) { throw null; } - public readonly bool Equals(System.Numerics.Vector4 other) { throw null; } - public override readonly bool Equals(object obj) { throw null; } - public override readonly int GetHashCode() { throw null; } - public readonly float Length() { throw null; } - public readonly float LengthSquared() { throw null; } + public bool Equals(System.Numerics.Vector4 other) { throw null; } + public override bool Equals(object obj) { throw null; } + public override int GetHashCode() { throw null; } + public float Length() { throw null; } + public float LengthSquared() { throw null; } public static System.Numerics.Vector4 Lerp(System.Numerics.Vector4 value1, System.Numerics.Vector4 value2, float amount) { throw null; } public static System.Numerics.Vector4 Max(System.Numerics.Vector4 value1, System.Numerics.Vector4 value2) { throw null; } public static System.Numerics.Vector4 Min(System.Numerics.Vector4 value1, System.Numerics.Vector4 value2) { throw null; } @@ -457,9 +457,9 @@ public readonly void CopyTo(float[] array, int index) { } public static System.Numerics.Vector4 operator -(System.Numerics.Vector4 value) { throw null; } public static System.Numerics.Vector4 SquareRoot(System.Numerics.Vector4 value) { throw null; } public static System.Numerics.Vector4 Subtract(System.Numerics.Vector4 left, System.Numerics.Vector4 right) { throw null; } - public override readonly string ToString() { throw null; } - public readonly string ToString(string format) { throw null; } - public readonly string ToString(string format, System.IFormatProvider formatProvider) { throw null; } + public override string ToString() { throw null; } + public string ToString(string format) { throw null; } + public string ToString(string format, System.IFormatProvider formatProvider) { throw null; } public static System.Numerics.Vector4 Transform(System.Numerics.Vector2 position, System.Numerics.Matrix4x4 matrix) { throw null; } public static System.Numerics.Vector4 Transform(System.Numerics.Vector2 value, System.Numerics.Quaternion rotation) { throw null; } public static System.Numerics.Vector4 Transform(System.Numerics.Vector3 position, System.Numerics.Matrix4x4 matrix) { throw null; } diff --git a/src/System.ObjectModel/ref/System.ObjectModel.cs b/src/System.ObjectModel/ref/System.ObjectModel.cs index baa0138abdc4..c83c46886243 100644 --- a/src/System.ObjectModel/ref/System.ObjectModel.cs +++ b/src/System.ObjectModel/ref/System.ObjectModel.cs @@ -135,9 +135,9 @@ public partial interface INotifyCollectionChanged public enum NotifyCollectionChangedAction { Add = 0, - Move = 3, Remove = 1, Replace = 2, + Move = 3, Reset = 4, } public partial class NotifyCollectionChangedEventArgs : System.EventArgs diff --git a/src/System.Reflection.Metadata/ref/System.Reflection.Metadata.cs b/src/System.Reflection.Metadata/ref/System.Reflection.Metadata.cs index d0e876936525..82ea6c81a430 100644 --- a/src/System.Reflection.Metadata/ref/System.Reflection.Metadata.cs +++ b/src/System.Reflection.Metadata/ref/System.Reflection.Metadata.cs @@ -10,17 +10,17 @@ namespace System.Reflection [System.FlagsAttribute] public enum AssemblyFlags { - ContentTypeMask = 3584, - DisableJitCompileOptimizer = 16384, - EnableJitCompileTracking = 32768, PublicKey = 1, Retargetable = 256, WindowsRuntime = 512, + ContentTypeMask = 3584, + DisableJitCompileOptimizer = 16384, + EnableJitCompileTracking = 32768, } public enum AssemblyHashAlgorithm { - MD5 = 32771, None = 0, + MD5 = 32771, Sha1 = 32772, Sha256 = 32780, Sha384 = 32781, @@ -28,13 +28,13 @@ public enum AssemblyHashAlgorithm } public enum DeclarativeSecurityAction : short { - Assert = (short)3, + None = (short)0, Demand = (short)2, + Assert = (short)3, Deny = (short)4, - InheritanceDemand = (short)7, - LinkDemand = (short)6, - None = (short)0, PermitOnly = (short)5, + LinkDemand = (short)6, + InheritanceDemand = (short)7, RequestMinimum = (short)8, RequestOptional = (short)9, RequestRefuse = (short)10, @@ -42,42 +42,42 @@ public enum DeclarativeSecurityAction : short [System.FlagsAttribute] public enum ManifestResourceAttributes { - Private = 2, Public = 1, + Private = 2, VisibilityMask = 7, } [System.FlagsAttribute] public enum MethodImportAttributes : short { - BestFitMappingDisable = (short)32, + None = (short)0, + ExactSpelling = (short)1, + CharSetAnsi = (short)2, + CharSetUnicode = (short)4, + CharSetAuto = (short)6, + CharSetMask = (short)6, BestFitMappingEnable = (short)16, + BestFitMappingDisable = (short)32, BestFitMappingMask = (short)48, + SetLastError = (short)64, + CallingConventionWinApi = (short)256, CallingConventionCDecl = (short)512, - CallingConventionFastCall = (short)1280, - CallingConventionMask = (short)1792, CallingConventionStdCall = (short)768, CallingConventionThisCall = (short)1024, - CallingConventionWinApi = (short)256, - CharSetAnsi = (short)2, - CharSetAuto = (short)6, - CharSetMask = (short)6, - CharSetUnicode = (short)4, - ExactSpelling = (short)1, - None = (short)0, - SetLastError = (short)64, - ThrowOnUnmappableCharDisable = (short)8192, + CallingConventionFastCall = (short)1280, + CallingConventionMask = (short)1792, ThrowOnUnmappableCharEnable = (short)4096, + ThrowOnUnmappableCharDisable = (short)8192, ThrowOnUnmappableCharMask = (short)12288, } [System.FlagsAttribute] public enum MethodSemanticsAttributes { - Adder = 8, + Setter = 1, Getter = 2, Other = 4, - Raiser = 32, + Adder = 8, Remover = 16, - Setter = 1, + Raiser = 32, } } namespace System.Reflection.Metadata @@ -432,21 +432,21 @@ public readonly partial struct Constant } public enum ConstantTypeCode : byte { + Invalid = (byte)0, Boolean = (byte)2, - Byte = (byte)5, Char = (byte)3, - Double = (byte)13, + SByte = (byte)4, + Byte = (byte)5, Int16 = (byte)6, + UInt16 = (byte)7, Int32 = (byte)8, + UInt32 = (byte)9, Int64 = (byte)10, - Invalid = (byte)0, - NullReference = (byte)18, - SByte = (byte)4, + UInt64 = (byte)11, Single = (byte)12, + Double = (byte)13, String = (byte)14, - UInt16 = (byte)7, - UInt32 = (byte)9, - UInt64 = (byte)11, + NullReference = (byte)18, } public readonly partial struct CustomAttribute { @@ -728,9 +728,9 @@ public readonly partial struct ExceptionRegion public enum ExceptionRegionKind : ushort { Catch = (ushort)0, - Fault = (ushort)4, Filter = (ushort)1, Finally = (ushort)2, + Fault = (ushort)4, } public readonly partial struct ExportedType { @@ -938,43 +938,43 @@ internal HandleComparer() { } } public enum HandleKind : byte { - AssemblyDefinition = (byte)32, - AssemblyFile = (byte)38, - AssemblyReference = (byte)35, - Blob = (byte)113, + ModuleDefinition = (byte)0, + TypeReference = (byte)1, + TypeDefinition = (byte)2, + FieldDefinition = (byte)4, + MethodDefinition = (byte)6, + Parameter = (byte)8, + InterfaceImplementation = (byte)9, + MemberReference = (byte)10, Constant = (byte)11, CustomAttribute = (byte)12, - CustomDebugInformation = (byte)55, DeclarativeSecurityAttribute = (byte)14, - Document = (byte)48, + StandaloneSignature = (byte)17, EventDefinition = (byte)20, + PropertyDefinition = (byte)23, + MethodImplementation = (byte)25, + ModuleReference = (byte)26, + TypeSpecification = (byte)27, + AssemblyDefinition = (byte)32, + AssemblyReference = (byte)35, + AssemblyFile = (byte)38, ExportedType = (byte)39, - FieldDefinition = (byte)4, + ManifestResource = (byte)40, GenericParameter = (byte)42, + MethodSpecification = (byte)43, GenericParameterConstraint = (byte)44, - Guid = (byte)114, - ImportScope = (byte)53, - InterfaceImplementation = (byte)9, - LocalConstant = (byte)52, + Document = (byte)48, + MethodDebugInformation = (byte)49, LocalScope = (byte)50, LocalVariable = (byte)51, - ManifestResource = (byte)40, - MemberReference = (byte)10, - MethodDebugInformation = (byte)49, - MethodDefinition = (byte)6, - MethodImplementation = (byte)25, - MethodSpecification = (byte)43, - ModuleDefinition = (byte)0, - ModuleReference = (byte)26, - NamespaceDefinition = (byte)124, - Parameter = (byte)8, - PropertyDefinition = (byte)23, - StandaloneSignature = (byte)17, - String = (byte)120, - TypeDefinition = (byte)2, - TypeReference = (byte)1, - TypeSpecification = (byte)27, + LocalConstant = (byte)52, + ImportScope = (byte)53, + CustomDebugInformation = (byte)55, UserString = (byte)112, + Blob = (byte)113, + Guid = (byte)114, + String = (byte)120, + NamespaceDefinition = (byte)124, } public partial interface IConstructedTypeProvider : System.Reflection.Metadata.ISZArrayTypeProvider { @@ -992,103 +992,28 @@ public partial interface ICustomAttributeTypeProvider : System.Reflection } public enum ILOpCode : ushort { - Add = (ushort)88, - Add_ovf = (ushort)214, - Add_ovf_un = (ushort)215, - And = (ushort)95, - Arglist = (ushort)65024, - Beq = (ushort)59, - Beq_s = (ushort)46, - Bge = (ushort)60, - Bge_s = (ushort)47, - Bge_un = (ushort)65, - Bge_un_s = (ushort)52, - Bgt = (ushort)61, - Bgt_s = (ushort)48, - Bgt_un = (ushort)66, - Bgt_un_s = (ushort)53, - Ble = (ushort)62, - Ble_s = (ushort)49, - Ble_un = (ushort)67, - Ble_un_s = (ushort)54, - Blt = (ushort)63, - Blt_s = (ushort)50, - Blt_un = (ushort)68, - Blt_un_s = (ushort)55, - Bne_un = (ushort)64, - Bne_un_s = (ushort)51, - Box = (ushort)140, - Br = (ushort)56, + Nop = (ushort)0, Break = (ushort)1, - Brfalse = (ushort)57, - Brfalse_s = (ushort)44, - Brtrue = (ushort)58, - Brtrue_s = (ushort)45, - Br_s = (ushort)43, - Call = (ushort)40, - Calli = (ushort)41, - Callvirt = (ushort)111, - Castclass = (ushort)116, - Ceq = (ushort)65025, - Cgt = (ushort)65026, - Cgt_un = (ushort)65027, - Ckfinite = (ushort)195, - Clt = (ushort)65028, - Clt_un = (ushort)65029, - Constrained = (ushort)65046, - Conv_i = (ushort)211, - Conv_i1 = (ushort)103, - Conv_i2 = (ushort)104, - Conv_i4 = (ushort)105, - Conv_i8 = (ushort)106, - Conv_ovf_i = (ushort)212, - Conv_ovf_i1 = (ushort)179, - Conv_ovf_i1_un = (ushort)130, - Conv_ovf_i2 = (ushort)181, - Conv_ovf_i2_un = (ushort)131, - Conv_ovf_i4 = (ushort)183, - Conv_ovf_i4_un = (ushort)132, - Conv_ovf_i8 = (ushort)185, - Conv_ovf_i8_un = (ushort)133, - Conv_ovf_i_un = (ushort)138, - Conv_ovf_u = (ushort)213, - Conv_ovf_u1 = (ushort)180, - Conv_ovf_u1_un = (ushort)134, - Conv_ovf_u2 = (ushort)182, - Conv_ovf_u2_un = (ushort)135, - Conv_ovf_u4 = (ushort)184, - Conv_ovf_u4_un = (ushort)136, - Conv_ovf_u8 = (ushort)186, - Conv_ovf_u8_un = (ushort)137, - Conv_ovf_u_un = (ushort)139, - Conv_r4 = (ushort)107, - Conv_r8 = (ushort)108, - Conv_r_un = (ushort)118, - Conv_u = (ushort)224, - Conv_u1 = (ushort)210, - Conv_u2 = (ushort)209, - Conv_u4 = (ushort)109, - Conv_u8 = (ushort)110, - Cpblk = (ushort)65047, - Cpobj = (ushort)112, - Div = (ushort)91, - Div_un = (ushort)92, - Dup = (ushort)37, - Endfilter = (ushort)65041, - Endfinally = (ushort)220, - Initblk = (ushort)65048, - Initobj = (ushort)65045, - Isinst = (ushort)117, - Jmp = (ushort)39, - Ldarg = (ushort)65033, - Ldarga = (ushort)65034, - Ldarga_s = (ushort)15, Ldarg_0 = (ushort)2, Ldarg_1 = (ushort)3, Ldarg_2 = (ushort)4, Ldarg_3 = (ushort)5, + Ldloc_0 = (ushort)6, + Ldloc_1 = (ushort)7, + Ldloc_2 = (ushort)8, + Ldloc_3 = (ushort)9, + Stloc_0 = (ushort)10, + Stloc_1 = (ushort)11, + Stloc_2 = (ushort)12, + Stloc_3 = (ushort)13, Ldarg_s = (ushort)14, - Ldc_i4 = (ushort)32, + Ldarga_s = (ushort)15, + Starg_s = (ushort)16, + Ldloc_s = (ushort)17, + Ldloca_s = (ushort)18, + Stloc_s = (ushort)19, + Ldnull = (ushort)20, + Ldc_i4_m1 = (ushort)21, Ldc_i4_0 = (ushort)22, Ldc_i4_1 = (ushort)23, Ldc_i4_2 = (ushort)24, @@ -1098,82 +1023,127 @@ public enum ILOpCode : ushort Ldc_i4_6 = (ushort)28, Ldc_i4_7 = (ushort)29, Ldc_i4_8 = (ushort)30, - Ldc_i4_m1 = (ushort)21, Ldc_i4_s = (ushort)31, + Ldc_i4 = (ushort)32, Ldc_i8 = (ushort)33, Ldc_r4 = (ushort)34, Ldc_r8 = (ushort)35, - Ldelem = (ushort)163, - Ldelema = (ushort)143, - Ldelem_i = (ushort)151, - Ldelem_i1 = (ushort)144, - Ldelem_i2 = (ushort)146, - Ldelem_i4 = (ushort)148, - Ldelem_i8 = (ushort)150, - Ldelem_r4 = (ushort)152, - Ldelem_r8 = (ushort)153, - Ldelem_ref = (ushort)154, - Ldelem_u1 = (ushort)145, - Ldelem_u2 = (ushort)147, - Ldelem_u4 = (ushort)149, - Ldfld = (ushort)123, - Ldflda = (ushort)124, - Ldftn = (ushort)65030, - Ldind_i = (ushort)77, - Ldind_i1 = (ushort)70, - Ldind_i2 = (ushort)72, - Ldind_i4 = (ushort)74, - Ldind_i8 = (ushort)76, - Ldind_r4 = (ushort)78, - Ldind_r8 = (ushort)79, - Ldind_ref = (ushort)80, - Ldind_u1 = (ushort)71, - Ldind_u2 = (ushort)73, - Ldind_u4 = (ushort)75, - Ldlen = (ushort)142, - Ldloc = (ushort)65036, - Ldloca = (ushort)65037, - Ldloca_s = (ushort)18, - Ldloc_0 = (ushort)6, - Ldloc_1 = (ushort)7, - Ldloc_2 = (ushort)8, - Ldloc_3 = (ushort)9, - Ldloc_s = (ushort)17, - Ldnull = (ushort)20, - Ldobj = (ushort)113, - Ldsfld = (ushort)126, - Ldsflda = (ushort)127, - Ldstr = (ushort)114, - Ldtoken = (ushort)208, - Ldvirtftn = (ushort)65031, - Leave = (ushort)221, - Leave_s = (ushort)222, - Localloc = (ushort)65039, - Mkrefany = (ushort)198, - Mul = (ushort)90, - Mul_ovf = (ushort)216, - Mul_ovf_un = (ushort)217, - Neg = (ushort)101, - Newarr = (ushort)141, - Newobj = (ushort)115, - Nop = (ushort)0, - Not = (ushort)102, - Or = (ushort)96, + Dup = (ushort)37, Pop = (ushort)38, - Readonly = (ushort)65054, - Refanytype = (ushort)65053, - Refanyval = (ushort)194, + Jmp = (ushort)39, + Call = (ushort)40, + Calli = (ushort)41, + Ret = (ushort)42, + Br_s = (ushort)43, + Brfalse_s = (ushort)44, + Brtrue_s = (ushort)45, + Beq_s = (ushort)46, + Bge_s = (ushort)47, + Bgt_s = (ushort)48, + Ble_s = (ushort)49, + Blt_s = (ushort)50, + Bne_un_s = (ushort)51, + Bge_un_s = (ushort)52, + Bgt_un_s = (ushort)53, + Ble_un_s = (ushort)54, + Blt_un_s = (ushort)55, + Br = (ushort)56, + Brfalse = (ushort)57, + Brtrue = (ushort)58, + Beq = (ushort)59, + Bge = (ushort)60, + Bgt = (ushort)61, + Ble = (ushort)62, + Blt = (ushort)63, + Bne_un = (ushort)64, + Bge_un = (ushort)65, + Bgt_un = (ushort)66, + Ble_un = (ushort)67, + Blt_un = (ushort)68, + Switch = (ushort)69, + Ldind_i1 = (ushort)70, + Ldind_u1 = (ushort)71, + Ldind_i2 = (ushort)72, + Ldind_u2 = (ushort)73, + Ldind_i4 = (ushort)74, + Ldind_u4 = (ushort)75, + Ldind_i8 = (ushort)76, + Ldind_i = (ushort)77, + Ldind_r4 = (ushort)78, + Ldind_r8 = (ushort)79, + Ldind_ref = (ushort)80, + Stind_ref = (ushort)81, + Stind_i1 = (ushort)82, + Stind_i2 = (ushort)83, + Stind_i4 = (ushort)84, + Stind_i8 = (ushort)85, + Stind_r4 = (ushort)86, + Stind_r8 = (ushort)87, + Add = (ushort)88, + Sub = (ushort)89, + Mul = (ushort)90, + Div = (ushort)91, + Div_un = (ushort)92, Rem = (ushort)93, Rem_un = (ushort)94, - Ret = (ushort)42, - Rethrow = (ushort)65050, + And = (ushort)95, + Or = (ushort)96, + Xor = (ushort)97, Shl = (ushort)98, Shr = (ushort)99, Shr_un = (ushort)100, - Sizeof = (ushort)65052, - Starg = (ushort)65035, - Starg_s = (ushort)16, - Stelem = (ushort)164, + Neg = (ushort)101, + Not = (ushort)102, + Conv_i1 = (ushort)103, + Conv_i2 = (ushort)104, + Conv_i4 = (ushort)105, + Conv_i8 = (ushort)106, + Conv_r4 = (ushort)107, + Conv_r8 = (ushort)108, + Conv_u4 = (ushort)109, + Conv_u8 = (ushort)110, + Callvirt = (ushort)111, + Cpobj = (ushort)112, + Ldobj = (ushort)113, + Ldstr = (ushort)114, + Newobj = (ushort)115, + Castclass = (ushort)116, + Isinst = (ushort)117, + Conv_r_un = (ushort)118, + Unbox = (ushort)121, + Throw = (ushort)122, + Ldfld = (ushort)123, + Ldflda = (ushort)124, + Stfld = (ushort)125, + Ldsfld = (ushort)126, + Ldsflda = (ushort)127, + Stsfld = (ushort)128, + Stobj = (ushort)129, + Conv_ovf_i1_un = (ushort)130, + Conv_ovf_i2_un = (ushort)131, + Conv_ovf_i4_un = (ushort)132, + Conv_ovf_i8_un = (ushort)133, + Conv_ovf_u1_un = (ushort)134, + Conv_ovf_u2_un = (ushort)135, + Conv_ovf_u4_un = (ushort)136, + Conv_ovf_u8_un = (ushort)137, + Conv_ovf_i_un = (ushort)138, + Conv_ovf_u_un = (ushort)139, + Box = (ushort)140, + Newarr = (ushort)141, + Ldlen = (ushort)142, + Ldelema = (ushort)143, + Ldelem_i1 = (ushort)144, + Ldelem_u1 = (ushort)145, + Ldelem_i2 = (ushort)146, + Ldelem_u2 = (ushort)147, + Ldelem_i4 = (ushort)148, + Ldelem_u4 = (ushort)149, + Ldelem_i8 = (ushort)150, + Ldelem_i = (ushort)151, + Ldelem_r4 = (ushort)152, + Ldelem_r8 = (ushort)153, + Ldelem_ref = (ushort)154, Stelem_i = (ushort)155, Stelem_i1 = (ushort)156, Stelem_i2 = (ushort)157, @@ -1182,34 +1152,64 @@ public enum ILOpCode : ushort Stelem_r4 = (ushort)160, Stelem_r8 = (ushort)161, Stelem_ref = (ushort)162, - Stfld = (ushort)125, - Stind_i = (ushort)223, - Stind_i1 = (ushort)82, - Stind_i2 = (ushort)83, - Stind_i4 = (ushort)84, - Stind_i8 = (ushort)85, - Stind_r4 = (ushort)86, - Stind_r8 = (ushort)87, - Stind_ref = (ushort)81, - Stloc = (ushort)65038, - Stloc_0 = (ushort)10, - Stloc_1 = (ushort)11, - Stloc_2 = (ushort)12, - Stloc_3 = (ushort)13, - Stloc_s = (ushort)19, - Stobj = (ushort)129, - Stsfld = (ushort)128, - Sub = (ushort)89, + Ldelem = (ushort)163, + Stelem = (ushort)164, + Unbox_any = (ushort)165, + Conv_ovf_i1 = (ushort)179, + Conv_ovf_u1 = (ushort)180, + Conv_ovf_i2 = (ushort)181, + Conv_ovf_u2 = (ushort)182, + Conv_ovf_i4 = (ushort)183, + Conv_ovf_u4 = (ushort)184, + Conv_ovf_i8 = (ushort)185, + Conv_ovf_u8 = (ushort)186, + Refanyval = (ushort)194, + Ckfinite = (ushort)195, + Mkrefany = (ushort)198, + Ldtoken = (ushort)208, + Conv_u2 = (ushort)209, + Conv_u1 = (ushort)210, + Conv_i = (ushort)211, + Conv_ovf_i = (ushort)212, + Conv_ovf_u = (ushort)213, + Add_ovf = (ushort)214, + Add_ovf_un = (ushort)215, + Mul_ovf = (ushort)216, + Mul_ovf_un = (ushort)217, Sub_ovf = (ushort)218, Sub_ovf_un = (ushort)219, - Switch = (ushort)69, - Tail = (ushort)65044, - Throw = (ushort)122, + Endfinally = (ushort)220, + Leave = (ushort)221, + Leave_s = (ushort)222, + Stind_i = (ushort)223, + Conv_u = (ushort)224, + Arglist = (ushort)65024, + Ceq = (ushort)65025, + Cgt = (ushort)65026, + Cgt_un = (ushort)65027, + Clt = (ushort)65028, + Clt_un = (ushort)65029, + Ldftn = (ushort)65030, + Ldvirtftn = (ushort)65031, + Ldarg = (ushort)65033, + Ldarga = (ushort)65034, + Starg = (ushort)65035, + Ldloc = (ushort)65036, + Ldloca = (ushort)65037, + Stloc = (ushort)65038, + Localloc = (ushort)65039, + Endfilter = (ushort)65041, Unaligned = (ushort)65042, - Unbox = (ushort)121, - Unbox_any = (ushort)165, Volatile = (ushort)65043, - Xor = (ushort)97, + Tail = (ushort)65044, + Initobj = (ushort)65045, + Constrained = (ushort)65046, + Cpblk = (ushort)65047, + Initblk = (ushort)65048, + Rethrow = (ushort)65050, + Sizeof = (ushort)65052, + Refanytype = (ushort)65053, + Readonly = (ushort)65054, } public static partial class ILOpCodeExtensions { @@ -1251,15 +1251,15 @@ void System.IDisposable.Dispose() { } } public enum ImportDefinitionKind { - AliasAssemblyNamespace = 8, - AliasAssemblyReference = 6, - AliasNamespace = 7, - AliasType = 9, - ImportAssemblyNamespace = 2, - ImportAssemblyReferenceAlias = 5, ImportNamespace = 1, + ImportAssemblyNamespace = 2, ImportType = 3, ImportXmlNamespace = 4, + ImportAssemblyReferenceAlias = 5, + AliasAssemblyReference = 6, + AliasNamespace = 7, + AliasAssemblyNamespace = 8, + AliasType = 9, } public readonly partial struct ImportScope { @@ -1454,8 +1454,8 @@ public readonly partial struct LocalVariable [System.FlagsAttribute] public enum LocalVariableAttributes { - DebuggerHidden = 1, None = 0, + DebuggerHidden = 1, } public readonly partial struct LocalVariableHandle : System.IEquatable { @@ -1572,14 +1572,14 @@ void System.IDisposable.Dispose() { } } public enum MemberReferenceKind { - Field = 1, Method = 0, + Field = 1, } public enum MetadataKind { Ecma335 = 0, - ManagedWindowsMetadata = 2, WindowsMetadata = 1, + ManagedWindowsMetadata = 2, } public sealed partial class MetadataReader { @@ -1667,9 +1667,9 @@ public unsafe MetadataReader(byte* metadata, int length, System.Reflection.Metad [System.FlagsAttribute] public enum MetadataReaderOptions { + None = 0, ApplyWindowsRuntimeProjections = 1, Default = 1, - None = 0, } public sealed partial class MetadataReaderProvider : System.IDisposable { @@ -2007,39 +2007,39 @@ public static partial class PEReaderExtensions public enum PrimitiveSerializationTypeCode : byte { Boolean = (byte)2, - Byte = (byte)5, Char = (byte)3, - Double = (byte)13, + SByte = (byte)4, + Byte = (byte)5, Int16 = (byte)6, + UInt16 = (byte)7, Int32 = (byte)8, + UInt32 = (byte)9, Int64 = (byte)10, - SByte = (byte)4, + UInt64 = (byte)11, Single = (byte)12, + Double = (byte)13, String = (byte)14, - UInt16 = (byte)7, - UInt32 = (byte)9, - UInt64 = (byte)11, } public enum PrimitiveTypeCode : byte { + Void = (byte)1, Boolean = (byte)2, - Byte = (byte)5, Char = (byte)3, - Double = (byte)13, + SByte = (byte)4, + Byte = (byte)5, Int16 = (byte)6, + UInt16 = (byte)7, Int32 = (byte)8, + UInt32 = (byte)9, Int64 = (byte)10, - IntPtr = (byte)24, - Object = (byte)28, - SByte = (byte)4, + UInt64 = (byte)11, Single = (byte)12, + Double = (byte)13, String = (byte)14, TypedReference = (byte)22, - UInt16 = (byte)7, - UInt32 = (byte)9, - UInt64 = (byte)11, + IntPtr = (byte)24, UIntPtr = (byte)25, - Void = (byte)1, + Object = (byte)28, } public readonly partial struct PropertyAccessors { @@ -2131,40 +2131,40 @@ void System.IDisposable.Dispose() { } } public enum SerializationTypeCode : byte { + Invalid = (byte)0, Boolean = (byte)2, - Byte = (byte)5, Char = (byte)3, - Double = (byte)13, - Enum = (byte)85, + SByte = (byte)4, + Byte = (byte)5, Int16 = (byte)6, + UInt16 = (byte)7, Int32 = (byte)8, + UInt32 = (byte)9, Int64 = (byte)10, - Invalid = (byte)0, - SByte = (byte)4, + UInt64 = (byte)11, Single = (byte)12, + Double = (byte)13, String = (byte)14, SZArray = (byte)29, - TaggedObject = (byte)81, Type = (byte)80, - UInt16 = (byte)7, - UInt32 = (byte)9, - UInt64 = (byte)11, + TaggedObject = (byte)81, + Enum = (byte)85, } [System.FlagsAttribute] public enum SignatureAttributes : byte { - ExplicitThis = (byte)64, + None = (byte)0, Generic = (byte)16, Instance = (byte)32, - None = (byte)0, + ExplicitThis = (byte)64, } public enum SignatureCallingConvention : byte { - CDecl = (byte)1, Default = (byte)0, - FastCall = (byte)4, + CDecl = (byte)1, StdCall = (byte)2, ThisCall = (byte)3, + FastCall = (byte)4, VarArgs = (byte)5, } public partial struct SignatureHeader : System.IEquatable @@ -2189,52 +2189,52 @@ public partial struct SignatureHeader : System.IEquatable { @@ -2516,12 +2516,12 @@ public readonly partial struct CustomModifiersEncoder } public enum EditAndContinueOperation { - AddEvent = 5, - AddField = 2, + Default = 0, AddMethod = 1, + AddField = 2, AddParameter = 3, AddProperty = 4, - Default = 0, + AddEvent = 5, } public readonly partial struct ExceptionRegionEncoder { @@ -2549,9 +2549,9 @@ public readonly partial struct FixedArgumentsEncoder } public enum FunctionPointerAttributes { - HasExplicitThis = 96, - HasThis = 32, None = 0, + HasThis = 32, + HasExplicitThis = 96, } public readonly partial struct GenericTypeArgumentsEncoder { @@ -2562,10 +2562,10 @@ public readonly partial struct GenericTypeArgumentsEncoder } public enum HeapIndex { + UserString = 0, + String = 1, Blob = 2, Guid = 3, - String = 1, - UserString = 0, } public readonly partial struct InstructionEncoder { @@ -2806,8 +2806,8 @@ public static partial class MetadataTokens [System.FlagsAttribute] public enum MethodBodyAttributes { - InitLocals = 1, None = 0, + InitLocals = 1, } public readonly partial struct MethodBodyStreamEncoder { @@ -2959,59 +2959,59 @@ public void VoidPointer() { } } public enum TableIndex : byte { - Assembly = (byte)32, - AssemblyOS = (byte)34, - AssemblyProcessor = (byte)33, - AssemblyRef = (byte)35, - AssemblyRefOS = (byte)37, - AssemblyRefProcessor = (byte)36, - ClassLayout = (byte)15, + Module = (byte)0, + TypeRef = (byte)1, + TypeDef = (byte)2, + FieldPtr = (byte)3, + Field = (byte)4, + MethodPtr = (byte)5, + MethodDef = (byte)6, + ParamPtr = (byte)7, + Param = (byte)8, + InterfaceImpl = (byte)9, + MemberRef = (byte)10, Constant = (byte)11, CustomAttribute = (byte)12, - CustomDebugInformation = (byte)55, + FieldMarshal = (byte)13, DeclSecurity = (byte)14, - Document = (byte)48, - EncLog = (byte)30, - EncMap = (byte)31, - Event = (byte)20, + ClassLayout = (byte)15, + FieldLayout = (byte)16, + StandAloneSig = (byte)17, EventMap = (byte)18, EventPtr = (byte)19, - ExportedType = (byte)39, - Field = (byte)4, - FieldLayout = (byte)16, - FieldMarshal = (byte)13, - FieldPtr = (byte)3, + Event = (byte)20, + PropertyMap = (byte)21, + PropertyPtr = (byte)22, + Property = (byte)23, + MethodSemantics = (byte)24, + MethodImpl = (byte)25, + ModuleRef = (byte)26, + TypeSpec = (byte)27, + ImplMap = (byte)28, FieldRva = (byte)29, + EncLog = (byte)30, + EncMap = (byte)31, + Assembly = (byte)32, + AssemblyProcessor = (byte)33, + AssemblyOS = (byte)34, + AssemblyRef = (byte)35, + AssemblyRefProcessor = (byte)36, + AssemblyRefOS = (byte)37, File = (byte)38, + ExportedType = (byte)39, + ManifestResource = (byte)40, + NestedClass = (byte)41, GenericParam = (byte)42, + MethodSpec = (byte)43, GenericParamConstraint = (byte)44, - ImplMap = (byte)28, - ImportScope = (byte)53, - InterfaceImpl = (byte)9, - LocalConstant = (byte)52, + Document = (byte)48, + MethodDebugInformation = (byte)49, LocalScope = (byte)50, LocalVariable = (byte)51, - ManifestResource = (byte)40, - MemberRef = (byte)10, - MethodDebugInformation = (byte)49, - MethodDef = (byte)6, - MethodImpl = (byte)25, - MethodPtr = (byte)5, - MethodSemantics = (byte)24, - MethodSpec = (byte)43, - Module = (byte)0, - ModuleRef = (byte)26, - NestedClass = (byte)41, - Param = (byte)8, - ParamPtr = (byte)7, - Property = (byte)23, - PropertyMap = (byte)21, - PropertyPtr = (byte)22, - StandAloneSig = (byte)17, + LocalConstant = (byte)52, + ImportScope = (byte)53, StateMachineMethod = (byte)54, - TypeDef = (byte)2, - TypeRef = (byte)1, - TypeSpec = (byte)27, + CustomDebugInformation = (byte)55, } public readonly partial struct VectorEncoder { @@ -3025,21 +3025,21 @@ namespace System.Reflection.PortableExecutable { public enum Characteristics : ushort { - AggressiveWSTrim = (ushort)16, - Bit32Machine = (ushort)256, - BytesReversedHi = (ushort)32768, - BytesReversedLo = (ushort)128, - DebugStripped = (ushort)512, - Dll = (ushort)8192, + RelocsStripped = (ushort)1, ExecutableImage = (ushort)2, - LargeAddressAware = (ushort)32, LineNumsStripped = (ushort)4, LocalSymsStripped = (ushort)8, - NetRunFromSwap = (ushort)2048, - RelocsStripped = (ushort)1, + AggressiveWSTrim = (ushort)16, + LargeAddressAware = (ushort)32, + BytesReversedLo = (ushort)128, + Bit32Machine = (ushort)256, + DebugStripped = (ushort)512, RemovableRunFromSwap = (ushort)1024, + NetRunFromSwap = (ushort)2048, System = (ushort)4096, + Dll = (ushort)8192, UpSystemOnly = (ushort)16384, + BytesReversedHi = (ushort)32768, } public readonly partial struct CodeViewDebugDirectoryData { @@ -3062,13 +3062,13 @@ internal CoffHeader() { } [System.FlagsAttribute] public enum CorFlags { - ILLibrary = 4, ILOnly = 1, - NativeEntryPoint = 16, - Prefers32Bit = 131072, Requires32Bit = 2, + ILLibrary = 4, StrongNameSigned = 8, + NativeEntryPoint = 16, TrackDebugData = 65536, + Prefers32Bit = 131072, } public sealed partial class CorHeader { @@ -3110,12 +3110,12 @@ public readonly partial struct DebugDirectoryEntry } public enum DebugDirectoryEntryType { - CodeView = 2, + Unknown = 0, Coff = 1, + CodeView = 2, + Reproducible = 16, EmbeddedPortablePdb = 17, PdbChecksum = 19, - Reproducible = 16, - Unknown = 0, } public readonly partial struct DirectoryEntry { @@ -3126,47 +3126,47 @@ public readonly partial struct DirectoryEntry [System.FlagsAttribute] public enum DllCharacteristics : ushort { - AppContainer = (ushort)4096, - DynamicBase = (ushort)64, - HighEntropyVirtualAddressSpace = (ushort)32, - NoBind = (ushort)2048, - NoIsolation = (ushort)512, - NoSeh = (ushort)1024, - NxCompatible = (ushort)256, ProcessInit = (ushort)1, ProcessTerm = (ushort)2, - TerminalServerAware = (ushort)32768, ThreadInit = (ushort)4, ThreadTerm = (ushort)8, + HighEntropyVirtualAddressSpace = (ushort)32, + DynamicBase = (ushort)64, + NxCompatible = (ushort)256, + NoIsolation = (ushort)512, + NoSeh = (ushort)1024, + NoBind = (ushort)2048, + AppContainer = (ushort)4096, WdmDriver = (ushort)8192, + TerminalServerAware = (ushort)32768, } public enum Machine : ushort { - Alpha = (ushort)388, - Alpha64 = (ushort)644, - AM33 = (ushort)467, - Amd64 = (ushort)34404, - Arm = (ushort)448, - Arm64 = (ushort)43620, - ArmThumb2 = (ushort)452, - Ebc = (ushort)3772, + Unknown = (ushort)0, I386 = (ushort)332, - IA64 = (ushort)512, - M32R = (ushort)36929, - MIPS16 = (ushort)614, - MipsFpu = (ushort)870, - MipsFpu16 = (ushort)1126, - PowerPC = (ushort)496, - PowerPCFP = (ushort)497, + WceMipsV2 = (ushort)361, + Alpha = (ushort)388, SH3 = (ushort)418, SH3Dsp = (ushort)419, SH3E = (ushort)420, SH4 = (ushort)422, SH5 = (ushort)424, + Arm = (ushort)448, Thumb = (ushort)450, + ArmThumb2 = (ushort)452, + AM33 = (ushort)467, + PowerPC = (ushort)496, + PowerPCFP = (ushort)497, + IA64 = (ushort)512, + MIPS16 = (ushort)614, + Alpha64 = (ushort)644, + MipsFpu = (ushort)870, + MipsFpu16 = (ushort)1126, Tricore = (ushort)1312, - Unknown = (ushort)0, - WceMipsV2 = (ushort)361, + Ebc = (ushort)3772, + Amd64 = (ushort)34404, + M32R = (ushort)36929, + Arm64 = (ushort)43620, } public partial class ManagedPEBuilder : System.Reflection.PortableExecutable.PEBuilder { @@ -3356,10 +3356,10 @@ public void Dispose() { } public enum PEStreamOptions { Default = 0, - IsLoadedImage = 8, LeaveOpen = 1, - PrefetchEntireImage = 4, PrefetchMetadata = 2, + PrefetchEntireImage = 4, + IsLoadedImage = 8, } public abstract partial class ResourceSectionBuilder { @@ -3369,52 +3369,52 @@ protected ResourceSectionBuilder() { } [System.FlagsAttribute] public enum SectionCharacteristics : uint { - Align1024Bytes = (uint)11534336, - Align128Bytes = (uint)8388608, - Align16Bytes = (uint)5242880, + TypeReg = (uint)0, + TypeDSect = (uint)1, + TypeNoLoad = (uint)2, + TypeGroup = (uint)4, + TypeNoPad = (uint)8, + TypeCopy = (uint)16, + ContainsCode = (uint)32, + ContainsInitializedData = (uint)64, + ContainsUninitializedData = (uint)128, + LinkerOther = (uint)256, + LinkerInfo = (uint)512, + TypeOver = (uint)1024, + LinkerRemove = (uint)2048, + LinkerComdat = (uint)4096, + MemProtected = (uint)16384, + NoDeferSpecExc = (uint)16384, + GPRel = (uint)32768, + MemFardata = (uint)32768, + MemSysheap = (uint)65536, + Mem16Bit = (uint)131072, + MemPurgeable = (uint)131072, + MemLocked = (uint)262144, + MemPreload = (uint)524288, Align1Bytes = (uint)1048576, - Align2048Bytes = (uint)12582912, - Align256Bytes = (uint)9437184, Align2Bytes = (uint)2097152, - Align32Bytes = (uint)6291456, - Align4096Bytes = (uint)13631488, Align4Bytes = (uint)3145728, - Align512Bytes = (uint)10485760, + Align8Bytes = (uint)4194304, + Align16Bytes = (uint)5242880, + Align32Bytes = (uint)6291456, Align64Bytes = (uint)7340032, + Align128Bytes = (uint)8388608, + Align256Bytes = (uint)9437184, + Align512Bytes = (uint)10485760, + Align1024Bytes = (uint)11534336, + Align2048Bytes = (uint)12582912, + Align4096Bytes = (uint)13631488, Align8192Bytes = (uint)14680064, - Align8Bytes = (uint)4194304, AlignMask = (uint)15728640, - ContainsCode = (uint)32, - ContainsInitializedData = (uint)64, - ContainsUninitializedData = (uint)128, - GPRel = (uint)32768, - LinkerComdat = (uint)4096, - LinkerInfo = (uint)512, LinkerNRelocOvfl = (uint)16777216, - LinkerOther = (uint)256, - LinkerRemove = (uint)2048, - Mem16Bit = (uint)131072, MemDiscardable = (uint)33554432, - MemExecute = (uint)536870912, - MemFardata = (uint)32768, - MemLocked = (uint)262144, MemNotCached = (uint)67108864, MemNotPaged = (uint)134217728, - MemPreload = (uint)524288, - MemProtected = (uint)16384, - MemPurgeable = (uint)131072, - MemRead = (uint)1073741824, MemShared = (uint)268435456, - MemSysheap = (uint)65536, + MemExecute = (uint)536870912, + MemRead = (uint)1073741824, MemWrite = (uint)2147483648, - NoDeferSpecExc = (uint)16384, - TypeCopy = (uint)16, - TypeDSect = (uint)1, - TypeGroup = (uint)4, - TypeNoLoad = (uint)2, - TypeNoPad = (uint)8, - TypeOver = (uint)1024, - TypeReg = (uint)0, } public readonly partial struct SectionHeader { @@ -3439,19 +3439,19 @@ public readonly partial struct SectionLocation } public enum Subsystem : ushort { - EfiApplication = (ushort)10, - EfiBootServiceDriver = (ushort)11, - EfiRom = (ushort)13, - EfiRuntimeDriver = (ushort)12, + Unknown = (ushort)0, Native = (ushort)1, - NativeWindows = (ushort)8, + WindowsGui = (ushort)2, + WindowsCui = (ushort)3, OS2Cui = (ushort)5, PosixCui = (ushort)7, - Unknown = (ushort)0, - WindowsBootApplication = (ushort)16, + NativeWindows = (ushort)8, WindowsCEGui = (ushort)9, - WindowsCui = (ushort)3, - WindowsGui = (ushort)2, + EfiApplication = (ushort)10, + EfiBootServiceDriver = (ushort)11, + EfiRuntimeDriver = (ushort)12, + EfiRom = (ushort)13, Xbox = (ushort)14, + WindowsBootApplication = (ushort)16, } } diff --git a/src/System.Reflection.Primitives/ref/System.Reflection.Primitives.cs b/src/System.Reflection.Primitives/ref/System.Reflection.Primitives.cs index 4ef0f0b7dc2a..cb4c623b26d7 100644 --- a/src/System.Reflection.Primitives/ref/System.Reflection.Primitives.cs +++ b/src/System.Reflection.Primitives/ref/System.Reflection.Primitives.cs @@ -303,15 +303,15 @@ public enum OperandType } public enum PackingSize { + Unspecified = 0, Size1 = 1, - Size128 = 128, - Size16 = 16, Size2 = 2, - Size32 = 32, Size4 = 4, - Size64 = 64, Size8 = 8, - Unspecified = 0, + Size16 = 16, + Size32 = 32, + Size64 = 64, + Size128 = 128, } public enum StackBehaviour { @@ -328,7 +328,6 @@ public enum StackBehaviour Popref = 10, Popref_pop1 = 11, Popref_popi = 12, - Popref_popi_pop1 = 28, Popref_popi_popi = 13, Popref_popi_popi8 = 14, Popref_popi_popr4 = 15, @@ -344,5 +343,6 @@ public enum StackBehaviour Pushref = 25, Varpop = 26, Varpush = 27, + Popref_popi_pop1 = 28, } } diff --git a/src/System.Runtime.Caching/ref/System.Runtime.Caching.cs b/src/System.Runtime.Caching/ref/System.Runtime.Caching.cs index 20ff3143aeb4..3457ea868e0d 100644 --- a/src/System.Runtime.Caching/ref/System.Runtime.Caching.cs +++ b/src/System.Runtime.Caching/ref/System.Runtime.Caching.cs @@ -24,11 +24,11 @@ public CacheEntryRemovedArguments(System.Runtime.Caching.ObjectCache source, Sys public delegate void CacheEntryRemovedCallback(System.Runtime.Caching.CacheEntryRemovedArguments arguments); public enum CacheEntryRemovedReason { - CacheSpecificEviction = 4, - ChangeMonitorChanged = 3, - Evicted = 2, - Expired = 1, Removed = 0, + Expired = 1, + Evicted = 2, + ChangeMonitorChanged = 3, + CacheSpecificEviction = 4, } public partial class CacheEntryUpdateArguments { @@ -80,15 +80,15 @@ protected void OnChanged(object state) { } [System.FlagsAttribute] public enum DefaultCacheCapabilities { - AbsoluteExpirations = 8, - CacheEntryChangeMonitors = 4, - CacheEntryRemovedCallback = 64, - CacheEntryUpdateCallback = 32, - CacheRegions = 128, - InMemoryProvider = 1, None = 0, + InMemoryProvider = 1, OutOfProcessProvider = 2, + CacheEntryChangeMonitors = 4, + AbsoluteExpirations = 8, SlidingExpirations = 16, + CacheEntryUpdateCallback = 32, + CacheEntryRemovedCallback = 64, + CacheRegions = 128, } public abstract partial class FileChangeMonitor : System.Runtime.Caching.ChangeMonitor { diff --git a/src/System.Runtime.Extensions/ref/System.Runtime.Extensions.cs b/src/System.Runtime.Extensions/ref/System.Runtime.Extensions.cs index 02647a3bbb64..2b5cf3f679c4 100644 --- a/src/System.Runtime.Extensions/ref/System.Runtime.Extensions.cs +++ b/src/System.Runtime.Extensions/ref/System.Runtime.Extensions.cs @@ -122,8 +122,8 @@ public AssemblyLoadEventArgs(System.Reflection.Assembly loadedAssembly) { } [System.FlagsAttribute] public enum Base64FormattingOptions { - InsertLineBreaks = 1, None = 0, + InsertLineBreaks = 1, } public static partial class BitConverter { @@ -691,77 +691,77 @@ public static void SetEnvironmentVariable(string variable, string value) { } public static void SetEnvironmentVariable(string variable, string value, System.EnvironmentVariableTarget target) { } public enum SpecialFolder { - AdminTools = 48, - ApplicationData = 26, - CDBurning = 59, - CommonAdminTools = 47, - CommonApplicationData = 35, - CommonDesktopDirectory = 25, - CommonDocuments = 46, - CommonMusic = 53, - CommonOemLinks = 58, - CommonPictures = 54, - CommonProgramFiles = 43, - CommonProgramFilesX86 = 44, - CommonPrograms = 23, - CommonStartMenu = 22, - CommonStartup = 24, - CommonTemplates = 45, - CommonVideos = 55, - Cookies = 33, Desktop = 0, - DesktopDirectory = 16, - Favorites = 6, - Fonts = 20, - History = 34, - InternetCache = 32, - LocalApplicationData = 28, - LocalizedResources = 57, - MyComputer = 17, + Programs = 2, MyDocuments = 5, + Personal = 5, + Favorites = 6, + Startup = 7, + Recent = 8, + SendTo = 9, + StartMenu = 11, MyMusic = 13, - MyPictures = 39, MyVideos = 14, + DesktopDirectory = 16, + MyComputer = 17, NetworkShortcuts = 19, - Personal = 5, + Fonts = 20, + Templates = 21, + CommonStartMenu = 22, + CommonPrograms = 23, + CommonStartup = 24, + CommonDesktopDirectory = 25, + ApplicationData = 26, PrinterShortcuts = 27, + LocalApplicationData = 28, + InternetCache = 32, + Cookies = 33, + History = 34, + CommonApplicationData = 35, + Windows = 36, + System = 37, ProgramFiles = 38, + MyPictures = 39, + UserProfile = 40, + SystemX86 = 41, ProgramFilesX86 = 42, - Programs = 2, - Recent = 8, + CommonProgramFiles = 43, + CommonProgramFilesX86 = 44, + CommonTemplates = 45, + CommonDocuments = 46, + CommonAdminTools = 47, + AdminTools = 48, + CommonMusic = 53, + CommonPictures = 54, + CommonVideos = 55, Resources = 56, - SendTo = 9, - StartMenu = 11, - Startup = 7, - System = 37, - SystemX86 = 41, - Templates = 21, - UserProfile = 40, - Windows = 36, + LocalizedResources = 57, + CommonOemLinks = 58, + CDBurning = 59, } public enum SpecialFolderOption { - Create = 32768, - DoNotVerify = 16384, None = 0, + DoNotVerify = 16384, + Create = 32768, } } public enum EnvironmentVariableTarget { - Machine = 2, Process = 0, User = 1, + Machine = 2, } public enum LoaderOptimization { - [System.ObsoleteAttribute("This method has been deprecated. Please use Assembly.Load() instead. https://go.microsoft.com/fwlink/?linkid=14202")] - DisallowBindings = 4, + NotSpecified = 0, + SingleDomain = 1, + MultiDomain = 2, [System.ObsoleteAttribute("This method has been deprecated. Please use Assembly.Load() instead. https://go.microsoft.com/fwlink/?linkid=14202")] DomainMask = 3, - MultiDomain = 2, MultiDomainHost = 3, - NotSpecified = 0, - SingleDomain = 1, + [System.ObsoleteAttribute("This method has been deprecated. Please use Assembly.Load() instead. https://go.microsoft.com/fwlink/?linkid=14202")] + DisallowBindings = 4, } [System.AttributeUsageAttribute(System.AttributeTargets.Method)] public sealed partial class LoaderOptimizationAttribute : System.Attribute @@ -942,18 +942,18 @@ public void GetObjectData(System.Runtime.Serialization.SerializationInfo info, S } public enum PlatformID { - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - MacOSX = 6, - Unix = 4, - Win32NT = 2, [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] Win32S = 0, [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] Win32Windows = 1, + Win32NT = 2, [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] WinCE = 3, + Unix = 4, [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] Xbox = 5, + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + MacOSX = 6, } public partial class Progress : System.IProgress { @@ -1728,10 +1728,10 @@ public ComponentGuaranteesAttribute(System.Runtime.Versioning.ComponentGuarantee [System.FlagsAttribute] public enum ComponentGuaranteesOptions { - Exchange = 1, None = 0, - SideBySide = 4, + Exchange = 1, Stable = 2, + SideBySide = 4, } public sealed partial class FrameworkName : System.IEquatable { @@ -1768,13 +1768,13 @@ public ResourceExposureAttribute(System.Runtime.Versioning.ResourceScope exposur [System.FlagsAttribute] public enum ResourceScope { + None = 0, + Machine = 1, + Process = 2, AppDomain = 4, - Assembly = 32, Library = 8, - Machine = 1, - None = 0, Private = 16, - Process = 2, + Assembly = 32, } public static partial class VersioningHelper { @@ -1883,13 +1883,13 @@ public enum PermissionState } public enum SecurityAction { - Assert = 3, Demand = 2, + Assert = 3, [System.ObsoleteAttribute("Deny is obsolete and will be removed in a future release of the .NET Framework. See https://go.microsoft.com/fwlink/?LinkID=155570 for more information.")] Deny = 4, - InheritanceDemand = 7, - LinkDemand = 6, PermitOnly = 5, + LinkDemand = 6, + InheritanceDemand = 7, [System.ObsoleteAttribute("Assembly level declarative security is obsolete and is no longer enforced by the CLR by default. See https://go.microsoft.com/fwlink/?LinkID=155570 for more information.")] RequestMinimum = 8, [System.ObsoleteAttribute("Assembly level declarative security is obsolete and is no longer enforced by the CLR by default. See https://go.microsoft.com/fwlink/?LinkID=155570 for more information.")] @@ -1929,21 +1929,21 @@ public SecurityPermissionAttribute(System.Security.Permissions.SecurityAction ac [System.FlagsAttribute] public enum SecurityPermissionFlag { - AllFlags = 16383, + NoFlags = 0, Assertion = 1, - BindingRedirects = 8192, - ControlAppDomain = 1024, - ControlDomainPolicy = 256, + UnmanagedCode = 2, + SkipVerification = 4, + Execution = 8, + ControlThread = 16, ControlEvidence = 32, ControlPolicy = 64, + SerializationFormatter = 128, + ControlDomainPolicy = 256, ControlPrincipal = 512, - ControlThread = 16, - Execution = 8, - Infrastructure = 4096, - NoFlags = 0, + ControlAppDomain = 1024, RemotingConfiguration = 2048, - SerializationFormatter = 128, - SkipVerification = 4, - UnmanagedCode = 2, + Infrastructure = 4096, + BindingRedirects = 8192, + AllFlags = 16383, } } diff --git a/src/System.Runtime.InteropServices.RuntimeInformation/ref/System.Runtime.InteropServices.RuntimeInformation.cs b/src/System.Runtime.InteropServices.RuntimeInformation/ref/System.Runtime.InteropServices.RuntimeInformation.cs index ce40f0ebc51b..2484c23a90f0 100644 --- a/src/System.Runtime.InteropServices.RuntimeInformation/ref/System.Runtime.InteropServices.RuntimeInformation.cs +++ b/src/System.Runtime.InteropServices.RuntimeInformation/ref/System.Runtime.InteropServices.RuntimeInformation.cs @@ -9,10 +9,10 @@ namespace System.Runtime.InteropServices { public enum Architecture { + X86 = 0, + X64 = 1, Arm = 2, Arm64 = 3, - X64 = 1, - X86 = 0, } public readonly partial struct OSPlatform : System.IEquatable { diff --git a/src/System.Runtime.InteropServices/ref/System.Runtime.InteropServices.cs b/src/System.Runtime.InteropServices/ref/System.Runtime.InteropServices.cs index 87a9e0c10778..d06b89bf167d 100644 --- a/src/System.Runtime.InteropServices/ref/System.Runtime.InteropServices.cs +++ b/src/System.Runtime.InteropServices/ref/System.Runtime.InteropServices.cs @@ -168,11 +168,11 @@ public BStrWrapper(string value) { } } public enum CallingConvention { + Winapi = 1, Cdecl = 2, - FastCall = 5, StdCall = 3, ThisCall = 4, - Winapi = 1, + FastCall = 5, } [System.AttributeUsageAttribute(System.AttributeTargets.Assembly | System.AttributeTargets.Class, Inherited=false)] public sealed partial class ClassInterfaceAttribute : System.Attribute @@ -183,13 +183,13 @@ public ClassInterfaceAttribute(System.Runtime.InteropServices.ClassInterfaceType } public enum ClassInterfaceType { + None = 0, [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] [System.ObsoleteAttribute("Support for IDispatch may be unavailable in future releases.")] AutoDispatch = 1, [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] [System.ObsoleteAttribute("Support for IDispatch may be unavailable in future releases.")] AutoDual = 2, - None = 0, } [System.AttributeUsageAttribute(System.AttributeTargets.Interface, Inherited=false)] public sealed partial class CoClassAttribute : System.Attribute @@ -276,11 +276,11 @@ public enum ComInterfaceType [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] [System.ObsoleteAttribute("Support for IDispatch may be unavailable in future releases.")] InterfaceIsDual = 0, + InterfaceIsIUnknown = 1, [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] [System.ObsoleteAttribute("Support for IDispatch may be unavailable in future releases.")] InterfaceIsIDispatch = 2, InterfaceIsIInspectable = 3, - InterfaceIsIUnknown = 1, } public enum ComMemberType { @@ -321,15 +321,15 @@ public CurrencyWrapper(object obj) { } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public enum CustomQueryInterfaceMode { - Allow = 1, Ignore = 0, + Allow = 1, } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public enum CustomQueryInterfaceResult { - Failed = 2, Handled = 0, NotHandled = 1, + Failed = 2, } [System.AttributeUsageAttribute(System.AttributeTargets.Module, Inherited=false)] public sealed partial class DefaultCharSetAttribute : System.Attribute @@ -380,13 +380,13 @@ public DllImportAttribute(string dllName) { } [System.FlagsAttribute] public enum DllImportSearchPath { - ApplicationDirectory = 512, - AssemblyDirectory = 2, LegacyBehavior = 0, - SafeDirectories = 4096, - System32 = 2048, + AssemblyDirectory = 2, UseDllDirectoryForDependencies = 256, + ApplicationDirectory = 512, UserDirectories = 1024, + System32 = 2048, + SafeDirectories = 4096, } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] [System.ObsoleteAttribute("ErrorWrapper and support for marshalling to the VARIANT type may be unavailable in future releases.")] @@ -828,19 +828,19 @@ public TypeLibFuncAttribute(System.Runtime.InteropServices.TypeLibFuncFlags flag [System.FlagsAttribute] public enum TypeLibFuncFlags { + FRestricted = 1, + FSource = 2, FBindable = 4, - FDefaultBind = 32, - FDefaultCollelem = 256, + FRequestEdit = 8, FDisplayBind = 16, + FDefaultBind = 32, FHidden = 64, - FImmediateBind = 4096, + FUsesGetLastError = 128, + FDefaultCollelem = 256, + FUiDefault = 512, FNonBrowsable = 1024, FReplaceable = 2048, - FRequestEdit = 8, - FRestricted = 1, - FSource = 2, - FUiDefault = 512, - FUsesGetLastError = 128, + FImmediateBind = 4096, } [System.AttributeUsageAttribute(System.AttributeTargets.Interface, Inherited=false)] public sealed partial class TypeLibImportClassAttribute : System.Attribute @@ -858,19 +858,19 @@ public TypeLibTypeAttribute(System.Runtime.InteropServices.TypeLibTypeFlags flag [System.FlagsAttribute] public enum TypeLibTypeFlags { - FAggregatable = 1024, FAppObject = 1, FCanCreate = 2, + FLicensed = 4, + FPreDeclId = 8, + FHidden = 16, FControl = 32, - FDispatchable = 4096, FDual = 64, - FHidden = 16, - FLicensed = 4, FNonExtensible = 128, FOleAutomation = 256, - FPreDeclId = 8, - FReplaceable = 2048, FRestricted = 512, + FAggregatable = 1024, + FReplaceable = 2048, + FDispatchable = 4096, FReverseBind = 8192, } [System.AttributeUsageAttribute(System.AttributeTargets.Field, Inherited=false)] @@ -883,19 +883,19 @@ public TypeLibVarAttribute(System.Runtime.InteropServices.TypeLibVarFlags flags) [System.FlagsAttribute] public enum TypeLibVarFlags { + FReadOnly = 1, + FSource = 2, FBindable = 4, - FDefaultBind = 32, - FDefaultCollelem = 256, + FRequestEdit = 8, FDisplayBind = 16, + FDefaultBind = 32, FHidden = 64, - FImmediateBind = 4096, - FNonBrowsable = 1024, - FReadOnly = 1, - FReplaceable = 2048, - FRequestEdit = 8, FRestricted = 128, - FSource = 2, + FDefaultCollelem = 256, FUiDefault = 512, + FNonBrowsable = 1024, + FReplaceable = 2048, + FImmediateBind = 4096, } [System.AttributeUsageAttribute(System.AttributeTargets.Assembly, Inherited=false)] public sealed partial class TypeLibVersionAttribute : System.Attribute @@ -923,106 +923,106 @@ public UnmanagedFunctionPointerAttribute(System.Runtime.InteropServices.CallingC } public enum UnmanagedType { - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - [System.ObsoleteAttribute("Marshalling as AnsiBStr may be unavailable in future releases.")] - AnsiBStr = 35, - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - [System.ObsoleteAttribute("Marshalling arbitrary types may be unavailable in future releases. Please specify the type you wish to marshal as.")] - AsAny = 40, Bool = 2, - BStr = 19, - ByValArray = 30, - ByValTStr = 23, - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - [System.ObsoleteAttribute("Marshalling as Currency may be unavailable in future releases.")] - Currency = 15, - CustomMarshaler = 44, - Error = 45, - FunctionPtr = 38, - HString = 47, I1 = 3, + U1 = 4, I2 = 5, + U2 = 6, I4 = 7, + U4 = 8, I8 = 9, + U8 = 10, + R4 = 11, + R8 = 12, [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - IDispatch = 26, - IInspectable = 46, - Interface = 28, - IUnknown = 25, - LPArray = 42, + [System.ObsoleteAttribute("Marshalling as Currency may be unavailable in future releases.")] + Currency = 15, + BStr = 19, LPStr = 20, - LPStruct = 43, - LPTStr = 22, - LPUTF8Str = 48, LPWStr = 21, - R4 = 11, - R8 = 12, + LPTStr = 22, + ByValTStr = 23, + IUnknown = 25, [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - SafeArray = 29, + IDispatch = 26, [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] Struct = 27, + Interface = 28, + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + SafeArray = 29, + ByValArray = 30, SysInt = 31, SysUInt = 32, [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + [System.ObsoleteAttribute("Marshalling as VBByRefString may be unavailable in future releases.")] + VBByRefStr = 34, + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + [System.ObsoleteAttribute("Marshalling as AnsiBStr may be unavailable in future releases.")] + AnsiBStr = 35, + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] [System.ObsoleteAttribute("Marshalling as TBstr may be unavailable in future releases.")] TBStr = 36, - U1 = 4, - U2 = 6, - U4 = 8, - U8 = 10, [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] VariantBool = 37, + FunctionPtr = 38, [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - [System.ObsoleteAttribute("Marshalling as VBByRefString may be unavailable in future releases.")] - VBByRefStr = 34, + [System.ObsoleteAttribute("Marshalling arbitrary types may be unavailable in future releases. Please specify the type you wish to marshal as.")] + AsAny = 40, + LPArray = 42, + LPStruct = 43, + CustomMarshaler = 44, + Error = 45, + IInspectable = 46, + HString = 47, + LPUTF8Str = 48, } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public enum VarEnum { - VT_ARRAY = 8192, - VT_BLOB = 65, - VT_BLOB_OBJECT = 70, - VT_BOOL = 11, - VT_BSTR = 8, - VT_BYREF = 16384, - VT_CARRAY = 28, - VT_CF = 71, - VT_CLSID = 72, + VT_EMPTY = 0, + VT_NULL = 1, + VT_I2 = 2, + VT_I4 = 3, + VT_R4 = 4, + VT_R8 = 5, VT_CY = 6, VT_DATE = 7, - VT_DECIMAL = 14, + VT_BSTR = 8, VT_DISPATCH = 9, - VT_EMPTY = 0, VT_ERROR = 10, - VT_FILETIME = 64, - VT_HRESULT = 25, + VT_BOOL = 11, + VT_VARIANT = 12, + VT_UNKNOWN = 13, + VT_DECIMAL = 14, VT_I1 = 16, - VT_I2 = 2, - VT_I4 = 3, + VT_UI1 = 17, + VT_UI2 = 18, + VT_UI4 = 19, VT_I8 = 20, + VT_UI8 = 21, VT_INT = 22, + VT_UINT = 23, + VT_VOID = 24, + VT_HRESULT = 25, + VT_PTR = 26, + VT_SAFEARRAY = 27, + VT_CARRAY = 28, + VT_USERDEFINED = 29, VT_LPSTR = 30, VT_LPWSTR = 31, - VT_NULL = 1, - VT_PTR = 26, - VT_R4 = 4, - VT_R8 = 5, VT_RECORD = 36, - VT_SAFEARRAY = 27, - VT_STORAGE = 67, - VT_STORED_OBJECT = 69, + VT_FILETIME = 64, + VT_BLOB = 65, VT_STREAM = 66, + VT_STORAGE = 67, VT_STREAMED_OBJECT = 68, - VT_UI1 = 17, - VT_UI2 = 18, - VT_UI4 = 19, - VT_UI8 = 21, - VT_UINT = 23, - VT_UNKNOWN = 13, - VT_USERDEFINED = 29, - VT_VARIANT = 12, + VT_STORED_OBJECT = 69, + VT_BLOB_OBJECT = 70, + VT_CF = 71, + VT_CLSID = 72, VT_VECTOR = 4096, - VT_VOID = 24, + VT_ARRAY = 8192, + VT_BYREF = 16384, } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] [System.ObsoleteAttribute("VariantWrapper and support for marshalling to the VARIANT type may be unavailable in future releases.")] @@ -1038,13 +1038,13 @@ namespace System.Runtime.InteropServices.ComTypes [System.FlagsAttribute] public enum ADVF { - ADVFCACHE_FORCEBUILTIN = 16, + ADVF_NODATA = 1, + ADVF_PRIMEFIRST = 2, + ADVF_ONLYONCE = 4, ADVFCACHE_NOHANDLER = 8, + ADVFCACHE_FORCEBUILTIN = 16, ADVFCACHE_ONSAVE = 32, ADVF_DATAONSTOP = 64, - ADVF_NODATA = 1, - ADVF_ONLYONCE = 4, - ADVF_PRIMEFIRST = 2, } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Explicit)] @@ -1070,15 +1070,15 @@ public partial struct BIND_OPTS public enum CALLCONV { CC_CDECL = 1, - CC_MACPASCAL = 3, - CC_MAX = 9, - CC_MPWCDECL = 7, - CC_MPWPASCAL = 8, CC_MSCPASCAL = 2, CC_PASCAL = 2, - CC_RESERVED = 5, + CC_MACPASCAL = 3, CC_STDCALL = 4, + CC_RESERVED = 5, CC_SYSCALL = 6, + CC_MPWCDECL = 7, + CC_MPWPASCAL = 8, + CC_MAX = 9, } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] @@ -1096,12 +1096,12 @@ public enum DATADIR [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public enum DESCKIND { + DESCKIND_NONE = 0, DESCKIND_FUNCDESC = 1, + DESCKIND_VARDESC = 2, + DESCKIND_TYPECOMP = 3, DESCKIND_IMPLICITAPPOBJ = 4, DESCKIND_MAX = 5, - DESCKIND_NONE = 0, - DESCKIND_TYPECOMP = 3, - DESCKIND_VARDESC = 2, } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] @@ -1117,9 +1117,9 @@ public partial struct DISPPARAMS public enum DVASPECT { DVASPECT_CONTENT = 1, - DVASPECT_DOCPRINT = 8, - DVASPECT_ICON = 4, DVASPECT_THUMBNAIL = 2, + DVASPECT_ICON = 4, + DVASPECT_DOCPRINT = 8, } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] @@ -1188,28 +1188,28 @@ public partial struct FUNCDESC [System.FlagsAttribute] public enum FUNCFLAGS : short { + FUNCFLAG_FRESTRICTED = (short)1, + FUNCFLAG_FSOURCE = (short)2, FUNCFLAG_FBINDABLE = (short)4, - FUNCFLAG_FDEFAULTBIND = (short)32, - FUNCFLAG_FDEFAULTCOLLELEM = (short)256, + FUNCFLAG_FREQUESTEDIT = (short)8, FUNCFLAG_FDISPLAYBIND = (short)16, + FUNCFLAG_FDEFAULTBIND = (short)32, FUNCFLAG_FHIDDEN = (short)64, - FUNCFLAG_FIMMEDIATEBIND = (short)4096, + FUNCFLAG_FUSESGETLASTERROR = (short)128, + FUNCFLAG_FDEFAULTCOLLELEM = (short)256, + FUNCFLAG_FUIDEFAULT = (short)512, FUNCFLAG_FNONBROWSABLE = (short)1024, FUNCFLAG_FREPLACEABLE = (short)2048, - FUNCFLAG_FREQUESTEDIT = (short)8, - FUNCFLAG_FRESTRICTED = (short)1, - FUNCFLAG_FSOURCE = (short)2, - FUNCFLAG_FUIDEFAULT = (short)512, - FUNCFLAG_FUSESGETLASTERROR = (short)128, + FUNCFLAG_FIMMEDIATEBIND = (short)4096, } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public enum FUNCKIND { - FUNC_DISPATCH = 4, - FUNC_NONVIRTUAL = 2, + FUNC_VIRTUAL = 0, FUNC_PUREVIRTUAL = 1, + FUNC_NONVIRTUAL = 2, FUNC_STATIC = 3, - FUNC_VIRTUAL = 0, + FUNC_DISPATCH = 4, } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] [System.Runtime.InteropServices.InterfaceTypeAttribute(System.Runtime.InteropServices.ComInterfaceType.InterfaceIsIUnknown)] @@ -1276,11 +1276,11 @@ public partial struct IDLDESC [System.FlagsAttribute] public enum IDLFLAG : short { + IDLFLAG_NONE = (short)0, IDLFLAG_FIN = (short)1, - IDLFLAG_FLCID = (short)4, IDLFLAG_FOUT = (short)2, + IDLFLAG_FLCID = (short)4, IDLFLAG_FRETVAL = (short)8, - IDLFLAG_NONE = (short)0, } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] [System.Runtime.InteropServices.InterfaceTypeAttribute(System.Runtime.InteropServices.ComInterfaceType.InterfaceIsIUnknown)] @@ -1373,9 +1373,9 @@ public partial interface IMoniker public enum IMPLTYPEFLAGS { IMPLTYPEFLAG_FDEFAULT = 1, - IMPLTYPEFLAG_FDEFAULTVTABLE = 8, - IMPLTYPEFLAG_FRESTRICTED = 4, IMPLTYPEFLAG_FSOURCE = 2, + IMPLTYPEFLAG_FRESTRICTED = 4, + IMPLTYPEFLAG_FDEFAULTVTABLE = 8, } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] [System.FlagsAttribute] @@ -1533,10 +1533,10 @@ public partial interface ITypeLib2 : System.Runtime.InteropServices.ComTypes.ITy [System.FlagsAttribute] public enum LIBFLAGS : short { + LIBFLAG_FRESTRICTED = (short)1, LIBFLAG_FCONTROL = (short)2, - LIBFLAG_FHASDISKIMAGE = (short)8, LIBFLAG_FHIDDEN = (short)4, - LIBFLAG_FRESTRICTED = (short)1, + LIBFLAG_FHASDISKIMAGE = (short)8, } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] @@ -1549,14 +1549,14 @@ public partial struct PARAMDESC [System.FlagsAttribute] public enum PARAMFLAG : short { - PARAMFLAG_FHASCUSTDATA = (short)64, - PARAMFLAG_FHASDEFAULT = (short)32, + PARAMFLAG_NONE = (short)0, PARAMFLAG_FIN = (short)1, - PARAMFLAG_FLCID = (short)4, - PARAMFLAG_FOPT = (short)16, PARAMFLAG_FOUT = (short)2, + PARAMFLAG_FLCID = (short)4, PARAMFLAG_FRETVAL = (short)8, - PARAMFLAG_NONE = (short)0, + PARAMFLAG_FOPT = (short)16, + PARAMFLAG_FHASDEFAULT = (short)32, + PARAMFLAG_FHASCUSTDATA = (short)64, } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] @@ -1594,23 +1594,23 @@ public partial struct STGMEDIUM [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public enum SYSKIND { - SYS_MAC = 2, SYS_WIN16 = 0, SYS_WIN32 = 1, + SYS_MAC = 2, SYS_WIN64 = 3, } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] [System.FlagsAttribute] public enum TYMED { - TYMED_ENHMF = 64, - TYMED_FILE = 2, - TYMED_GDI = 16, + TYMED_NULL = 0, TYMED_HGLOBAL = 1, - TYMED_ISTORAGE = 8, + TYMED_FILE = 2, TYMED_ISTREAM = 4, + TYMED_ISTORAGE = 8, + TYMED_GDI = 16, TYMED_MFPICT = 32, - TYMED_NULL = 0, + TYMED_ENHMF = 64, } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] @@ -1647,34 +1647,34 @@ public partial struct TYPEDESC [System.FlagsAttribute] public enum TYPEFLAGS : short { - TYPEFLAG_FAGGREGATABLE = (short)1024, TYPEFLAG_FAPPOBJECT = (short)1, TYPEFLAG_FCANCREATE = (short)2, + TYPEFLAG_FLICENSED = (short)4, + TYPEFLAG_FPREDECLID = (short)8, + TYPEFLAG_FHIDDEN = (short)16, TYPEFLAG_FCONTROL = (short)32, - TYPEFLAG_FDISPATCHABLE = (short)4096, TYPEFLAG_FDUAL = (short)64, - TYPEFLAG_FHIDDEN = (short)16, - TYPEFLAG_FLICENSED = (short)4, TYPEFLAG_FNONEXTENSIBLE = (short)128, TYPEFLAG_FOLEAUTOMATION = (short)256, - TYPEFLAG_FPREDECLID = (short)8, - TYPEFLAG_FPROXY = (short)16384, - TYPEFLAG_FREPLACEABLE = (short)2048, TYPEFLAG_FRESTRICTED = (short)512, + TYPEFLAG_FAGGREGATABLE = (short)1024, + TYPEFLAG_FREPLACEABLE = (short)2048, + TYPEFLAG_FDISPATCHABLE = (short)4096, TYPEFLAG_FREVERSEBIND = (short)8192, + TYPEFLAG_FPROXY = (short)16384, } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public enum TYPEKIND { - TKIND_ALIAS = 6, - TKIND_COCLASS = 5, - TKIND_DISPATCH = 4, TKIND_ENUM = 0, - TKIND_INTERFACE = 3, - TKIND_MAX = 8, - TKIND_MODULE = 2, TKIND_RECORD = 1, + TKIND_MODULE = 2, + TKIND_INTERFACE = 3, + TKIND_DISPATCH = 4, + TKIND_COCLASS = 5, + TKIND_ALIAS = 6, TKIND_UNION = 7, + TKIND_MAX = 8, } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] @@ -1710,27 +1710,27 @@ public partial struct DESCUNION [System.FlagsAttribute] public enum VARFLAGS : short { + VARFLAG_FREADONLY = (short)1, + VARFLAG_FSOURCE = (short)2, VARFLAG_FBINDABLE = (short)4, - VARFLAG_FDEFAULTBIND = (short)32, - VARFLAG_FDEFAULTCOLLELEM = (short)256, + VARFLAG_FREQUESTEDIT = (short)8, VARFLAG_FDISPLAYBIND = (short)16, + VARFLAG_FDEFAULTBIND = (short)32, VARFLAG_FHIDDEN = (short)64, - VARFLAG_FIMMEDIATEBIND = (short)4096, - VARFLAG_FNONBROWSABLE = (short)1024, - VARFLAG_FREADONLY = (short)1, - VARFLAG_FREPLACEABLE = (short)2048, - VARFLAG_FREQUESTEDIT = (short)8, VARFLAG_FRESTRICTED = (short)128, - VARFLAG_FSOURCE = (short)2, + VARFLAG_FDEFAULTCOLLELEM = (short)256, VARFLAG_FUIDEFAULT = (short)512, + VARFLAG_FNONBROWSABLE = (short)1024, + VARFLAG_FREPLACEABLE = (short)2048, + VARFLAG_FIMMEDIATEBIND = (short)4096, } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public enum VARKIND { - VAR_CONST = 2, - VAR_DISPATCH = 3, VAR_PERINSTANCE = 0, VAR_STATIC = 1, + VAR_CONST = 2, + VAR_DISPATCH = 3, } } namespace System.Security diff --git a/src/System.Runtime.Intrinsics/ref/System.Runtime.Intrinsics.cs b/src/System.Runtime.Intrinsics/ref/System.Runtime.Intrinsics.cs index 424e2d504e37..a2b43196d816 100644 --- a/src/System.Runtime.Intrinsics/ref/System.Runtime.Intrinsics.cs +++ b/src/System.Runtime.Intrinsics/ref/System.Runtime.Intrinsics.cs @@ -920,36 +920,36 @@ internal X64() { } public enum FloatComparisonMode : byte { OrderedEqualNonSignaling = (byte)0, - OrderedEqualSignaling = (byte)16, + OrderedLessThanSignaling = (byte)1, + OrderedLessThanOrEqualSignaling = (byte)2, + UnorderedNonSignaling = (byte)3, + UnorderedNotEqualNonSignaling = (byte)4, + UnorderedNotLessThanSignaling = (byte)5, + UnorderedNotLessThanOrEqualSignaling = (byte)6, + OrderedNonSignaling = (byte)7, + UnorderedEqualNonSignaling = (byte)8, + UnorderedNotGreaterThanOrEqualSignaling = (byte)9, + UnorderedNotGreaterThanSignaling = (byte)10, OrderedFalseNonSignaling = (byte)11, - OrderedFalseSignaling = (byte)27, - OrderedGreaterThanNonSignaling = (byte)30, - OrderedGreaterThanOrEqualNonSignaling = (byte)29, + OrderedNotEqualNonSignaling = (byte)12, OrderedGreaterThanOrEqualSignaling = (byte)13, OrderedGreaterThanSignaling = (byte)14, + UnorderedTrueNonSignaling = (byte)15, + OrderedEqualSignaling = (byte)16, OrderedLessThanNonSignaling = (byte)17, OrderedLessThanOrEqualNonSignaling = (byte)18, - OrderedLessThanOrEqualSignaling = (byte)2, - OrderedLessThanSignaling = (byte)1, - OrderedNonSignaling = (byte)7, - OrderedNotEqualNonSignaling = (byte)12, - OrderedNotEqualSignaling = (byte)28, - OrderedSignaling = (byte)23, - UnorderedEqualNonSignaling = (byte)8, - UnorderedEqualSignaling = (byte)24, - UnorderedNonSignaling = (byte)3, - UnorderedNotEqualNonSignaling = (byte)4, + UnorderedSignaling = (byte)19, UnorderedNotEqualSignaling = (byte)20, - UnorderedNotGreaterThanNonSignaling = (byte)26, - UnorderedNotGreaterThanOrEqualNonSignaling = (byte)25, - UnorderedNotGreaterThanOrEqualSignaling = (byte)9, - UnorderedNotGreaterThanSignaling = (byte)10, UnorderedNotLessThanNonSignaling = (byte)21, UnorderedNotLessThanOrEqualNonSignaling = (byte)22, - UnorderedNotLessThanOrEqualSignaling = (byte)6, - UnorderedNotLessThanSignaling = (byte)5, - UnorderedSignaling = (byte)19, - UnorderedTrueNonSignaling = (byte)15, + OrderedSignaling = (byte)23, + UnorderedEqualSignaling = (byte)24, + UnorderedNotGreaterThanOrEqualNonSignaling = (byte)25, + UnorderedNotGreaterThanNonSignaling = (byte)26, + OrderedFalseSignaling = (byte)27, + OrderedNotEqualSignaling = (byte)28, + OrderedGreaterThanOrEqualNonSignaling = (byte)29, + OrderedGreaterThanNonSignaling = (byte)30, UnorderedTrueSignaling = (byte)31, } public abstract partial class Fma : System.Runtime.Intrinsics.X86.Avx diff --git a/src/System.Runtime.Serialization.Formatters/ref/System.Runtime.Serialization.Formatters.cs b/src/System.Runtime.Serialization.Formatters/ref/System.Runtime.Serialization.Formatters.cs index 1e770e86c3f0..2862e7beb39f 100644 --- a/src/System.Runtime.Serialization.Formatters/ref/System.Runtime.Serialization.Formatters.cs +++ b/src/System.Runtime.Serialization.Formatters/ref/System.Runtime.Serialization.Formatters.cs @@ -148,13 +148,13 @@ namespace System.Runtime.Serialization.Formatters { public enum FormatterAssemblyStyle { - Full = 1, Simple = 0, + Full = 1, } public enum FormatterTypeStyle { - TypesAlways = 1, TypesWhenNeeded = 0, + TypesAlways = 1, XsdString = 2, } public partial interface IFieldInfo @@ -164,8 +164,8 @@ public partial interface IFieldInfo } public enum TypeFilterLevel { - Full = 3, Low = 2, + Full = 3, } } namespace System.Runtime.Serialization.Formatters.Binary diff --git a/src/System.Runtime.Serialization.Json/ref/System.Runtime.Serialization.Json.cs b/src/System.Runtime.Serialization.Json/ref/System.Runtime.Serialization.Json.cs index 28a1e8a2343b..bf44d2c0b087 100644 --- a/src/System.Runtime.Serialization.Json/ref/System.Runtime.Serialization.Json.cs +++ b/src/System.Runtime.Serialization.Json/ref/System.Runtime.Serialization.Json.cs @@ -17,8 +17,8 @@ public DateTimeFormat(string formatString, System.IFormatProvider formatProvider } public enum EmitTypeInformation { - Always = 1, AsNeeded = 0, + Always = 1, Never = 2, } } diff --git a/src/System.Runtime.Serialization.Xml/ref/System.Runtime.Serialization.Xml.cs b/src/System.Runtime.Serialization.Xml/ref/System.Runtime.Serialization.Xml.cs index 225d051f8ab3..d3207a5fe3a7 100644 --- a/src/System.Runtime.Serialization.Xml/ref/System.Runtime.Serialization.Xml.cs +++ b/src/System.Runtime.Serialization.Xml/ref/System.Runtime.Serialization.Xml.cs @@ -351,11 +351,11 @@ public void CopyTo(System.Xml.XmlDictionaryReaderQuotas quotas) { } [System.FlagsAttribute] public enum XmlDictionaryReaderQuotaTypes { + MaxDepth = 1, + MaxStringContentLength = 2, MaxArrayLength = 4, MaxBytesPerRead = 8, - MaxDepth = 1, MaxNameTableCharCount = 16, - MaxStringContentLength = 2, } public partial class XmlDictionaryString { diff --git a/src/System.Runtime.WindowsRuntime.UI.Xaml/ref/System.Runtime.WindowsRuntime.UI.Xaml.cs b/src/System.Runtime.WindowsRuntime.UI.Xaml/ref/System.Runtime.WindowsRuntime.UI.Xaml.cs index 12cc5d5bf5d6..526771775919 100644 --- a/src/System.Runtime.WindowsRuntime.UI.Xaml/ref/System.Runtime.WindowsRuntime.UI.Xaml.cs +++ b/src/System.Runtime.WindowsRuntime.UI.Xaml/ref/System.Runtime.WindowsRuntime.UI.Xaml.cs @@ -53,8 +53,8 @@ public partial struct Duration public enum DurationType { Automatic = 0, - Forever = 2, TimeSpan = 1, + Forever = 2, } public partial struct GridLength { diff --git a/src/System.Runtime/ref/System.Runtime.cs b/src/System.Runtime/ref/System.Runtime.cs index 338abebdcbaf..8b4b2e4d09d9 100644 --- a/src/System.Runtime/ref/System.Runtime.cs +++ b/src/System.Runtime/ref/System.Runtime.cs @@ -390,22 +390,22 @@ protected Attribute() { } [System.FlagsAttribute] public enum AttributeTargets { - All = 32767, Assembly = 1, + Module = 2, Class = 4, - Constructor = 32, - Delegate = 4096, + Struct = 8, Enum = 16, - Event = 512, + Constructor = 32, + Method = 64, + Property = 128, Field = 256, - GenericParameter = 16384, + Event = 512, Interface = 1024, - Method = 64, - Module = 2, Parameter = 2048, - Property = 128, + Delegate = 4096, ReturnValue = 8192, - Struct = 8, + GenericParameter = 16384, + All = 32767, } [System.AttributeUsageAttribute(System.AttributeTargets.Class, Inherited=true)] public sealed partial class AttributeUsageAttribute : System.Attribute @@ -732,9 +732,9 @@ void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Ser } public enum DateTimeKind { - Local = 2, Unspecified = 0, Utc = 1, + Local = 2, } public readonly partial struct DateTimeOffset : System.IComparable, System.IComparable, System.IEquatable, System.IFormattable, System.Runtime.Serialization.IDeserializationCallback, System.Runtime.Serialization.ISerializable { @@ -832,13 +832,13 @@ void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Ser } public enum DayOfWeek { - Friday = 5, - Monday = 1, - Saturday = 6, Sunday = 0, - Thursday = 4, + Monday = 1, Tuesday = 2, Wednesday = 3, + Thursday = 4, + Friday = 5, + Saturday = 6, } public sealed partial class DBNull : System.IConvertible, System.Runtime.Serialization.ISerializable { @@ -1296,11 +1296,11 @@ public enum GCCollectionMode } public enum GCNotificationStatus { - Canceled = 2, - Failed = 1, - NotApplicable = 4, Succeeded = 0, + Failed = 1, + Canceled = 2, Timeout = 3, + NotApplicable = 4, } public partial class GenericUriParser : System.UriParser { @@ -1309,18 +1309,18 @@ public GenericUriParser(System.GenericUriParserOptions options) { } [System.FlagsAttribute] public enum GenericUriParserOptions { - AllowEmptyAuthority = 2, Default = 0, - DontCompressPath = 128, + GenericAuthority = 1, + AllowEmptyAuthority = 2, + NoUserInfo = 4, + NoPort = 8, + NoQuery = 16, + NoFragment = 32, DontConvertPathBackslashes = 64, + DontCompressPath = 128, DontUnescapePathDotsAndSlashes = 256, - GenericAuthority = 1, Idn = 512, IriParsing = 1024, - NoFragment = 32, - NoPort = 8, - NoQuery = 16, - NoUserInfo = 4, } public partial class GopherStyleUriParser : System.UriParser { @@ -1759,11 +1759,11 @@ public MethodAccessException(string message, System.Exception inner) { } } public enum MidpointRounding { - AwayFromZero = 1, ToEven = 0, + AwayFromZero = 1, + ToZero = 2, ToNegativeInfinity = 3, ToPositiveInfinity = 4, - ToZero = 2, } public partial class MissingFieldException : System.MissingMemberException, System.Runtime.Serialization.ISerializable { @@ -3118,24 +3118,24 @@ public TypeAccessException(string message, System.Exception inner) { } } public enum TypeCode { + Empty = 0, + Object = 1, + DBNull = 2, Boolean = 3, - Byte = 6, Char = 4, - DateTime = 16, - DBNull = 2, - Decimal = 15, - Double = 14, - Empty = 0, + SByte = 5, + Byte = 6, Int16 = 7, + UInt16 = 8, Int32 = 9, + UInt32 = 10, Int64 = 11, - Object = 1, - SByte = 5, + UInt64 = 12, Single = 13, + Double = 14, + Decimal = 15, + DateTime = 16, String = 18, - UInt16 = 8, - UInt32 = 10, - UInt64 = 12, } [System.CLSCompliantAttribute(false)] public ref partial struct TypedReference @@ -3467,29 +3467,29 @@ void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Ser [System.FlagsAttribute] public enum UriComponents { - AbsoluteUri = 127, - Fragment = 64, + SerializationInfoString = -2147483648, + Scheme = 1, + UserInfo = 2, Host = 4, - HostAndPort = 132, - HttpRequestUrl = 61, - KeepDelimiter = 1073741824, - NormalizedHost = 256, - Path = 16, - PathAndQuery = 48, Port = 8, - Query = 32, - Scheme = 1, SchemeAndServer = 13, - SerializationInfoString = -2147483648, - StrongAuthority = 134, + Path = 16, + Query = 32, + PathAndQuery = 48, + HttpRequestUrl = 61, + Fragment = 64, + AbsoluteUri = 127, StrongPort = 128, - UserInfo = 2, + HostAndPort = 132, + StrongAuthority = 134, + NormalizedHost = 256, + KeepDelimiter = 1073741824, } public enum UriFormat { - SafeUnescaped = 3, - Unescaped = 2, UriEscaped = 1, + Unescaped = 2, + SafeUnescaped = 3, } public partial class UriFormatException : System.FormatException, System.Runtime.Serialization.ISerializable { @@ -3501,17 +3501,17 @@ void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Ser } public enum UriHostNameType { + Unknown = 0, Basic = 1, Dns = 2, IPv4 = 3, IPv6 = 4, - Unknown = 0, } public enum UriKind { + RelativeOrAbsolute = 0, Absolute = 1, Relative = 2, - RelativeOrAbsolute = 0, } public abstract partial class UriParser { @@ -3528,10 +3528,10 @@ public static void Register(System.UriParser uriParser, string schemeName, int d } public enum UriPartial { + Scheme = 0, Authority = 1, Path = 2, Query = 3, - Scheme = 0, } public partial struct ValueTuple : System.Collections.IStructuralComparable, System.Collections.IStructuralEquatable, System.IComparable, System.IComparable, System.IEquatable, System.Runtime.CompilerServices.ITuple { @@ -3813,10 +3813,10 @@ void System.IDisposable.Dispose() { } } public enum OperationStatus { - DestinationTooSmall = 1, Done = 0, - InvalidData = 3, + DestinationTooSmall = 1, NeedMoreData = 2, + InvalidData = 3, } public delegate void ReadOnlySpanAction(System.ReadOnlySpan span, TArg arg); public delegate void SpanAction(System.Span span, TArg arg); @@ -4118,17 +4118,17 @@ public EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState state } public enum EditorBrowsableState { - Advanced = 2, Always = 0, Never = 1, + Advanced = 2, } } namespace System.Configuration.Assemblies { public enum AssemblyHashAlgorithm { - MD5 = 32771, None = 0, + MD5 = 32771, SHA1 = 32772, SHA256 = 32780, SHA384 = 32781, @@ -4136,9 +4136,9 @@ public enum AssemblyHashAlgorithm } public enum AssemblyVersionCompatibility { - SameDomain = 3, SameMachine = 1, SameProcess = 2, + SameDomain = 3, } } namespace System.Diagnostics @@ -4160,11 +4160,11 @@ public DebuggableAttribute(System.Diagnostics.DebuggableAttribute.DebuggingModes [System.FlagsAttribute] public enum DebuggingModes { + None = 0, Default = 1, - DisableOptimizations = 256, - EnableEditAndContinue = 4, IgnoreSymbolStoreSequencePoints = 2, - None = 0, + EnableEditAndContinue = 4, + DisableOptimizations = 256, } } } @@ -4222,16 +4222,16 @@ protected Calendar() { } } public enum CalendarAlgorithmType { + Unknown = 0, + SolarCalendar = 1, LunarCalendar = 2, LunisolarCalendar = 3, - SolarCalendar = 1, - Unknown = 0, } public enum CalendarWeekRule { FirstDay = 0, - FirstFourDayWeek = 2, FirstFullWeek = 1, + FirstFourDayWeek = 2, } public static partial class CharUnicodeInfo { @@ -4313,15 +4313,15 @@ void System.Runtime.Serialization.IDeserializationCallback.OnDeserialization(obj [System.FlagsAttribute] public enum CompareOptions { + None = 0, IgnoreCase = 1, - IgnoreKanaType = 8, IgnoreNonSpace = 2, IgnoreSymbols = 4, + IgnoreKanaType = 8, IgnoreWidth = 16, - None = 0, - Ordinal = 1073741824, OrdinalIgnoreCase = 268435456, StringSort = 536870912, + Ordinal = 1073741824, } public partial class CultureInfo : System.ICloneable, System.IFormatProvider { @@ -4390,16 +4390,16 @@ public override void GetObjectData(System.Runtime.Serialization.SerializationInf [System.FlagsAttribute] public enum CultureTypes { - AllCultures = 7, - [System.ObsoleteAttribute("This value has been deprecated. Please use other values in CultureTypes.")] - FrameworkCultures = 64, - InstalledWin32Cultures = 4, NeutralCultures = 1, - ReplacementCultures = 16, SpecificCultures = 2, + InstalledWin32Cultures = 4, + AllCultures = 7, UserCustomCulture = 8, + ReplacementCultures = 16, [System.ObsoleteAttribute("This value has been deprecated. Please use other values in CultureTypes.")] WindowsOnlyCultures = 32, + [System.ObsoleteAttribute("This value has been deprecated. Please use other values in CultureTypes.")] + FrameworkCultures = 64, } public sealed partial class DateTimeFormatInfo : System.ICloneable, System.IFormatProvider { @@ -4451,15 +4451,15 @@ public void SetAllDateTimePatterns(string[] patterns, char format) { } [System.FlagsAttribute] public enum DateTimeStyles { - AdjustToUniversal = 16, - AllowInnerWhite = 4, + None = 0, AllowLeadingWhite = 1, AllowTrailingWhite = 2, + AllowInnerWhite = 4, AllowWhiteSpaces = 7, + NoCurrentDateDefault = 8, + AdjustToUniversal = 16, AssumeLocal = 32, AssumeUniversal = 64, - NoCurrentDateDefault = 8, - None = 0, RoundtripKind = 128, } public partial class DaylightTime @@ -4472,8 +4472,8 @@ public DaylightTime(System.DateTime start, System.DateTime end, System.TimeSpan public enum DigitShapes { Context = 0, - NativeNational = 2, None = 1, + NativeNational = 2, } public abstract partial class EastAsianLunisolarCalendar : System.Globalization.Calendar { @@ -4531,12 +4531,12 @@ public GregorianCalendar(System.Globalization.GregorianCalendarTypes type) { } } public enum GregorianCalendarTypes { - Arabic = 10, Localized = 1, + USEnglish = 2, MiddleEastFrench = 9, + Arabic = 10, TransliteratedEnglish = 11, TransliteratedFrench = 12, - USEnglish = 2, } public partial class HebrewCalendar : System.Globalization.Calendar { @@ -4760,23 +4760,23 @@ public NumberFormatInfo() { } [System.FlagsAttribute] public enum NumberStyles { - AllowCurrencySymbol = 256, - AllowDecimalPoint = 32, - AllowExponent = 128, - AllowHexSpecifier = 512, - AllowLeadingSign = 4, + None = 0, AllowLeadingWhite = 1, + AllowTrailingWhite = 2, + AllowLeadingSign = 4, + Integer = 7, + AllowTrailingSign = 8, AllowParentheses = 16, + AllowDecimalPoint = 32, AllowThousands = 64, - AllowTrailingSign = 8, - AllowTrailingWhite = 2, - Any = 511, - Currency = 383, + Number = 111, + AllowExponent = 128, Float = 167, + AllowCurrencySymbol = 256, + Currency = 383, + Any = 511, + AllowHexSpecifier = 512, HexNumber = 515, - Integer = 7, - None = 0, - Number = 111, } public partial class PersianCalendar : System.Globalization.Calendar { @@ -4964,8 +4964,8 @@ public ThaiBuddhistCalendar() { } [System.FlagsAttribute] public enum TimeSpanStyles { - AssumeNegative = 1, None = 0, + AssumeNegative = 1, } public partial class UmAlQuraCalendar : System.Globalization.Calendar { @@ -4997,36 +4997,36 @@ public UmAlQuraCalendar() { } } public enum UnicodeCategory { - ClosePunctuation = 21, - ConnectorPunctuation = 18, - Control = 14, - CurrencySymbol = 26, - DashPunctuation = 19, - DecimalDigitNumber = 8, - EnclosingMark = 7, - FinalQuotePunctuation = 23, - Format = 15, - InitialQuotePunctuation = 22, - LetterNumber = 9, - LineSeparator = 12, + UppercaseLetter = 0, LowercaseLetter = 1, - MathSymbol = 25, + TitlecaseLetter = 2, ModifierLetter = 3, - ModifierSymbol = 27, - NonSpacingMark = 5, - OpenPunctuation = 20, OtherLetter = 4, - OtherNotAssigned = 29, + NonSpacingMark = 5, + SpacingCombiningMark = 6, + EnclosingMark = 7, + DecimalDigitNumber = 8, + LetterNumber = 9, OtherNumber = 10, - OtherPunctuation = 24, - OtherSymbol = 28, - ParagraphSeparator = 13, - PrivateUse = 17, SpaceSeparator = 11, - SpacingCombiningMark = 6, + LineSeparator = 12, + ParagraphSeparator = 13, + Control = 14, + Format = 15, Surrogate = 16, - TitlecaseLetter = 2, - UppercaseLetter = 0, + PrivateUse = 17, + ConnectorPunctuation = 18, + DashPunctuation = 19, + OpenPunctuation = 20, + ClosePunctuation = 21, + InitialQuotePunctuation = 22, + FinalQuotePunctuation = 23, + OtherPunctuation = 24, + MathSymbol = 25, + CurrencySymbol = 26, + ModifierSymbol = 27, + OtherSymbol = 28, + OtherNotAssigned = 29, } } namespace System.IO @@ -5042,28 +5042,28 @@ public DirectoryNotFoundException(string message, System.Exception innerExceptio public enum FileAccess { Read = 1, - ReadWrite = 3, Write = 2, + ReadWrite = 3, } [System.FlagsAttribute] public enum FileAttributes { + ReadOnly = 1, + Hidden = 2, + System = 4, + Directory = 16, Archive = 32, - Compressed = 2048, Device = 64, - Directory = 16, + Normal = 128, + Temporary = 256, + SparseFile = 512, + ReparsePoint = 1024, + Compressed = 2048, + Offline = 4096, + NotContentIndexed = 8192, Encrypted = 16384, - Hidden = 2, IntegrityStream = 32768, - Normal = 128, NoScrubData = 131072, - NotContentIndexed = 8192, - Offline = 4096, - ReadOnly = 1, - ReparsePoint = 1024, - SparseFile = 512, - System = 4, - Temporary = 256, } public partial class FileLoadException : System.IO.IOException { @@ -5081,12 +5081,12 @@ public override void GetObjectData(System.Runtime.Serialization.SerializationInf } public enum FileMode { - Append = 6, - Create = 2, CreateNew = 1, + Create = 2, Open = 3, OpenOrCreate = 4, Truncate = 5, + Append = 6, } public partial class FileNotFoundException : System.IO.IOException { @@ -5105,23 +5105,23 @@ public override void GetObjectData(System.Runtime.Serialization.SerializationInf [System.FlagsAttribute] public enum FileOptions { - Asynchronous = 1073741824, - DeleteOnClose = 67108864, - Encrypted = 16384, + WriteThrough = -2147483648, None = 0, - RandomAccess = 268435456, + Encrypted = 16384, + DeleteOnClose = 67108864, SequentialScan = 134217728, - WriteThrough = -2147483648, + RandomAccess = 268435456, + Asynchronous = 1073741824, } [System.FlagsAttribute] public enum FileShare { - Delete = 4, - Inheritable = 16, None = 0, Read = 1, - ReadWrite = 3, Write = 2, + ReadWrite = 3, + Delete = 4, + Inheritable = 16, } public partial class FileStream : System.IO.Stream { @@ -5180,8 +5180,8 @@ public override void WriteByte(byte value) { } } public enum HandleInheritability { - Inheritable = 1, None = 0, + Inheritable = 1, } public partial class IOException : System.SystemException { @@ -5473,11 +5473,11 @@ public void SetPublicKeyToken(byte[] publicKeyToken) { } [System.FlagsAttribute] public enum AssemblyNameFlags { - EnableJITcompileOptimizer = 16384, - EnableJITcompileTracking = 32768, None = 0, PublicKey = 1, Retargetable = 256, + EnableJITcompileOptimizer = 16384, + EnableJITcompileTracking = 32768, } [System.AttributeUsageAttribute(System.AttributeTargets.Assembly, Inherited=false)] public sealed partial class AssemblyProductAttribute : System.Attribute @@ -5523,36 +5523,36 @@ protected Binder() { } [System.FlagsAttribute] public enum BindingFlags { - CreateInstance = 512, - DeclaredOnly = 2, Default = 0, - DoNotWrapExceptions = 33554432, - ExactBinding = 65536, - FlattenHierarchy = 64, - GetField = 1024, - GetProperty = 4096, IgnoreCase = 1, - IgnoreReturn = 16777216, + DeclaredOnly = 2, Instance = 4, - InvokeMethod = 256, - NonPublic = 32, - OptionalParamBinding = 262144, + Static = 8, Public = 16, - PutDispProperty = 16384, - PutRefDispProperty = 32768, + NonPublic = 32, + FlattenHierarchy = 64, + InvokeMethod = 256, + CreateInstance = 512, + GetField = 1024, SetField = 2048, + GetProperty = 4096, SetProperty = 8192, - Static = 8, + PutDispProperty = 16384, + PutRefDispProperty = 32768, + ExactBinding = 65536, SuppressChangeType = 131072, + OptionalParamBinding = 262144, + IgnoreReturn = 16777216, + DoNotWrapExceptions = 33554432, } [System.FlagsAttribute] public enum CallingConventions { - Any = 3, - ExplicitThis = 64, - HasThis = 32, Standard = 1, VarArgs = 2, + Any = 3, + HasThis = 32, + ExplicitThis = 64, } public abstract partial class ConstructorInfo : System.Reflection.MethodBase { @@ -5666,9 +5666,9 @@ public DefaultMemberAttribute(string memberName) { } public enum EventAttributes { None = 0, + SpecialName = 512, ReservedMask = 1024, RTSpecialName = 1024, - SpecialName = 512, } public abstract partial class EventInfo : System.Reflection.MemberInfo { @@ -5712,32 +5712,32 @@ protected ExceptionHandlingClause() { } public enum ExceptionHandlingClauseOptions { Clause = 0, - Fault = 4, Filter = 1, Finally = 2, + Fault = 4, } [System.FlagsAttribute] public enum FieldAttributes { - Assembly = 3, + PrivateScope = 0, + Private = 1, FamANDAssem = 2, + Assembly = 3, Family = 4, FamORAssem = 5, + Public = 6, FieldAccessMask = 7, - HasDefault = 32768, - HasFieldMarshal = 4096, - HasFieldRVA = 256, + Static = 16, InitOnly = 32, Literal = 64, NotSerialized = 128, + HasFieldRVA = 256, + SpecialName = 512, + RTSpecialName = 1024, + HasFieldMarshal = 4096, PinvokeImpl = 8192, - Private = 1, - PrivateScope = 0, - Public = 6, + HasDefault = 32768, ReservedMask = 38144, - RTSpecialName = 1024, - SpecialName = 512, - Static = 16, } public abstract partial class FieldInfo : System.Reflection.MemberInfo { @@ -5781,14 +5781,14 @@ public virtual void SetValueDirect(System.TypedReference obj, object value) { } [System.FlagsAttribute] public enum GenericParameterAttributes { - Contravariant = 2, - Covariant = 1, - DefaultConstructorConstraint = 16, None = 0, - NotNullableValueTypeConstraint = 8, + Covariant = 1, + Contravariant = 2, + VarianceMask = 3, ReferenceTypeConstraint = 4, + NotNullableValueTypeConstraint = 8, + DefaultConstructorConstraint = 16, SpecialConstraintMask = 28, - VarianceMask = 3, } public partial interface ICustomAttributeProvider { @@ -5798,10 +5798,10 @@ public partial interface ICustomAttributeProvider } public enum ImageFileMachine { - AMD64 = 34404, - ARM = 452, I386 = 332, + ARM = 452, IA64 = 512, + AMD64 = 34404, } public partial struct InterfaceMapping { @@ -5880,43 +5880,43 @@ protected MemberInfo() { } [System.FlagsAttribute] public enum MemberTypes { - All = 191, Constructor = 1, - Custom = 64, Event = 2, Field = 4, Method = 8, - NestedType = 128, Property = 16, TypeInfo = 32, + Custom = 64, + NestedType = 128, + All = 191, } [System.FlagsAttribute] public enum MethodAttributes { - Abstract = 1024, - Assembly = 3, - CheckAccessOnOverride = 512, + PrivateScope = 0, + ReuseSlot = 0, + Private = 1, FamANDAssem = 2, + Assembly = 3, Family = 4, FamORAssem = 5, + Public = 6, + MemberAccessMask = 7, + UnmanagedExport = 8, + Static = 16, Final = 32, - HasSecurity = 16384, + Virtual = 64, HideBySig = 128, - MemberAccessMask = 7, NewSlot = 256, + VtableLayoutMask = 256, + CheckAccessOnOverride = 512, + Abstract = 1024, + SpecialName = 2048, + RTSpecialName = 4096, PinvokeImpl = 8192, - Private = 1, - PrivateScope = 0, - Public = 6, + HasSecurity = 16384, RequireSecObject = 32768, ReservedMask = 53248, - ReuseSlot = 0, - RTSpecialName = 4096, - SpecialName = 2048, - Static = 16, - UnmanagedExport = 8, - Virtual = 64, - VtableLayoutMask = 256, } public abstract partial class MethodBase : System.Reflection.MemberInfo { @@ -5971,23 +5971,23 @@ protected MethodBody() { } } public enum MethodImplAttributes { - AggressiveInlining = 256, - AggressiveOptimization = 512, - CodeTypeMask = 3, - ForwardRef = 16, IL = 0, - InternalCall = 4096, Managed = 0, - ManagedMask = 4, - MaxMethodImplVal = 65535, Native = 1, - NoInlining = 8, - NoOptimization = 64, OPTIL = 2, - PreserveSig = 128, + CodeTypeMask = 3, Runtime = 3, - Synchronized = 32, + ManagedMask = 4, Unmanaged = 4, + NoInlining = 8, + ForwardRef = 16, + Synchronized = 32, + NoOptimization = 64, + PreserveSig = 128, + AggressiveInlining = 256, + AggressiveOptimization = 512, + InternalCall = 4096, + MaxMethodImplVal = 65535, } public abstract partial class MethodInfo : System.Reflection.MethodBase { @@ -6085,17 +6085,17 @@ public ObfuscationAttribute() { } [System.FlagsAttribute] public enum ParameterAttributes { - HasDefault = 4096, - HasFieldMarshal = 8192, + None = 0, In = 1, + Out = 2, Lcid = 4, - None = 0, + Retval = 8, Optional = 16, - Out = 2, + HasDefault = 4096, + HasFieldMarshal = 8192, Reserved3 = 16384, Reserved4 = 32768, ReservedMask = 61440, - Retval = 8, } public partial class ParameterInfo : System.Reflection.ICustomAttributeProvider, System.Runtime.Serialization.IObjectReference { @@ -6147,33 +6147,33 @@ void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Ser [System.FlagsAttribute] public enum PortableExecutableKinds { - ILOnly = 1, NotAPortableExecutableImage = 0, - PE32Plus = 4, - Preferred32Bit = 16, + ILOnly = 1, Required32Bit = 2, + PE32Plus = 4, Unmanaged32Bit = 8, + Preferred32Bit = 16, } public enum ProcessorArchitecture { - Amd64 = 4, - Arm = 5, - IA64 = 3, - MSIL = 1, None = 0, + MSIL = 1, X86 = 2, + IA64 = 3, + Amd64 = 4, + Arm = 5, } [System.FlagsAttribute] public enum PropertyAttributes { - HasDefault = 4096, None = 0, + SpecialName = 512, + RTSpecialName = 1024, + HasDefault = 4096, Reserved2 = 8192, Reserved3 = 16384, Reserved4 = 32768, ReservedMask = 62464, - RTSpecialName = 1024, - SpecialName = 512, } public abstract partial class PropertyInfo : System.Reflection.MemberInfo { @@ -6226,15 +6226,15 @@ public override void GetObjectData(System.Runtime.Serialization.SerializationInf [System.FlagsAttribute] public enum ResourceAttributes { - Private = 2, Public = 1, + Private = 2, } [System.FlagsAttribute] public enum ResourceLocation { + Embedded = 1, ContainedInAnotherAssembly = 2, ContainedInManifestFile = 4, - Embedded = 1, } public static partial class RuntimeReflectionExtensions { @@ -6281,38 +6281,38 @@ public TargetParameterCountException(string message, System.Exception inner) { } [System.FlagsAttribute] public enum TypeAttributes { - Abstract = 128, AnsiClass = 0, - AutoClass = 131072, AutoLayout = 0, - BeforeFieldInit = 1048576, Class = 0, - ClassSemanticsMask = 32, - CustomFormatClass = 196608, - CustomFormatMask = 12582912, - ExplicitLayout = 16, - HasSecurity = 262144, - Import = 4096, - Interface = 32, - LayoutMask = 24, + NotPublic = 0, + Public = 1, + NestedPublic = 2, + NestedPrivate = 3, + NestedFamily = 4, NestedAssembly = 5, NestedFamANDAssem = 6, - NestedFamily = 4, NestedFamORAssem = 7, - NestedPrivate = 3, - NestedPublic = 2, - NotPublic = 0, - Public = 1, - ReservedMask = 264192, - RTSpecialName = 2048, - Sealed = 256, + VisibilityMask = 7, SequentialLayout = 8, - Serializable = 8192, + ExplicitLayout = 16, + LayoutMask = 24, + ClassSemanticsMask = 32, + Interface = 32, + Abstract = 128, + Sealed = 256, SpecialName = 1024, - StringFormatMask = 196608, - UnicodeClass = 65536, - VisibilityMask = 7, + RTSpecialName = 2048, + Import = 4096, + Serializable = 8192, WindowsRuntime = 16384, + UnicodeClass = 65536, + AutoClass = 131072, + CustomFormatClass = 196608, + StringFormatMask = 196608, + HasSecurity = 262144, + ReservedMask = 264192, + BeforeFieldInit = 1048576, + CustomFormatMask = 12582912, } public partial class TypeDelegator : System.Reflection.TypeInfo { @@ -6410,16 +6410,16 @@ public AssemblyTargetedPatchBandAttribute(string targetedPatchBand) { } } public enum GCLargeObjectHeapCompactionMode { - CompactOnce = 2, Default = 1, + CompactOnce = 2, } public enum GCLatencyMode { Batch = 0, Interactive = 1, LowLatency = 2, - NoGCRegion = 4, SustainedLowLatency = 3, + NoGCRegion = 4, } public static partial class GCSettings { @@ -6730,8 +6730,8 @@ public partial interface ITuple } public enum LoadHint { - Always = 1, Default = 0, + Always = 1, Sometimes = 2, } public enum MethodCodeType @@ -6753,15 +6753,15 @@ public MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions met [System.FlagsAttribute] public enum MethodImplOptions { - AggressiveInlining = 256, - AggressiveOptimization = 512, - ForwardRef = 16, - InternalCall = 4096, + Unmanaged = 4, NoInlining = 8, + ForwardRef = 16, + Synchronized = 32, NoOptimization = 64, PreserveSig = 128, - Synchronized = 32, - Unmanaged = 4, + AggressiveInlining = 256, + AggressiveOptimization = 512, + InternalCall = 4096, } [System.AttributeUsageAttribute(System.AttributeTargets.Assembly, AllowMultiple=false)] public sealed partial class ReferenceAssemblyAttribute : System.Attribute @@ -6916,15 +6916,15 @@ namespace System.Runtime.ConstrainedExecution { public enum Cer { - MayFail = 1, None = 0, + MayFail = 1, Success = 2, } public enum Consistency { + MayCorruptProcess = 0, MayCorruptAppDomain = 1, MayCorruptInstance = 2, - MayCorruptProcess = 0, WillNotCorruptState = 3, } public abstract partial class CriticalFinalizerObject @@ -6970,10 +6970,10 @@ namespace System.Runtime.InteropServices { public enum CharSet { - Ansi = 2, - Auto = 4, None = 1, + Ansi = 2, Unicode = 3, + Auto = 4, } [System.AttributeUsageAttribute(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Delegate | System.AttributeTargets.Enum | System.AttributeTargets.Field | System.AttributeTargets.Interface | System.AttributeTargets.Method | System.AttributeTargets.Property | System.AttributeTargets.Struct, Inherited=false)] public sealed partial class ComVisibleAttribute : System.Attribute @@ -7031,10 +7031,10 @@ public void Free() { } } public enum GCHandleType { - Normal = 2, - Pinned = 3, Weak = 0, WeakTrackResurrection = 1, + Normal = 2, + Pinned = 3, } [System.AttributeUsageAttribute(System.AttributeTargets.Parameter, Inherited=false)] public sealed partial class InAttribute : System.Attribute @@ -7043,9 +7043,9 @@ public InAttribute() { } } public enum LayoutKind { - Auto = 3, - Explicit = 2, Sequential = 0, + Explicit = 2, + Auto = 3, } [System.AttributeUsageAttribute(System.AttributeTargets.Parameter, Inherited=false)] public sealed partial class OutAttribute : System.Attribute @@ -7259,15 +7259,15 @@ public readonly partial struct StreamingContext [System.FlagsAttribute] public enum StreamingContextStates { - All = 255, - Clone = 64, - CrossAppDomain = 128, - CrossMachine = 2, CrossProcess = 1, + CrossMachine = 2, File = 4, - Other = 32, Persistence = 8, Remoting = 16, + Other = 32, + Clone = 64, + CrossAppDomain = 128, + All = 255, } } namespace System.Runtime.Versioning @@ -7290,8 +7290,8 @@ public AllowPartiallyTrustedCallersAttribute() { } } public enum PartialTrustVisibilityLevel { - NotVisibleByDefault = 1, VisibleToAllHosts = 0, + NotVisibleByDefault = 1, } [System.AttributeUsageAttribute(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Delegate | System.AttributeTargets.Enum | System.AttributeTargets.Field | System.AttributeTargets.Interface | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=false, Inherited=false)] public sealed partial class SecurityCriticalAttribute : System.Attribute @@ -7304,8 +7304,8 @@ public SecurityCriticalAttribute(System.Security.SecurityCriticalScope scope) { [System.ObsoleteAttribute("SecurityCriticalScope is only used for .NET 2.0 transparency compatibility.")] public enum SecurityCriticalScope { - Everything = 1, Explicit = 0, + Everything = 1, } public partial class SecurityException : System.SystemException { @@ -7337,9 +7337,9 @@ public SecurityRulesAttribute(System.Security.SecurityRuleSet ruleSet) { } } public enum SecurityRuleSet : byte { + None = (byte)0, Level1 = (byte)1, Level2 = (byte)2, - None = (byte)0, } [System.AttributeUsageAttribute(System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Delegate | System.AttributeTargets.Enum | System.AttributeTargets.Field | System.AttributeTargets.Interface | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=false, Inherited=false)] public sealed partial class SecuritySafeCriticalAttribute : System.Attribute @@ -7887,9 +7887,9 @@ public void Dispose() { } } public enum LazyThreadSafetyMode { - ExecutionAndPublication = 2, None = 0, PublicationOnly = 1, + ExecutionAndPublication = 2, } public static partial class Timeout { @@ -8031,31 +8031,31 @@ public static void WaitAll(System.Threading.Tasks.Task[] tasks, System.Threading [System.FlagsAttribute] public enum TaskContinuationOptions { + None = 0, + PreferFairness = 1, + LongRunning = 2, AttachedToParent = 4, DenyChildAttach = 8, - ExecuteSynchronously = 524288, HideScheduler = 16, LazyCancellation = 32, - LongRunning = 2, - None = 0, - NotOnCanceled = 262144, - NotOnFaulted = 131072, + RunContinuationsAsynchronously = 64, NotOnRanToCompletion = 65536, + NotOnFaulted = 131072, OnlyOnCanceled = 196608, + NotOnCanceled = 262144, OnlyOnFaulted = 327680, OnlyOnRanToCompletion = 393216, - PreferFairness = 1, - RunContinuationsAsynchronously = 64, + ExecuteSynchronously = 524288, } [System.FlagsAttribute] public enum TaskCreationOptions { + None = 0, + PreferFairness = 1, + LongRunning = 2, AttachedToParent = 4, DenyChildAttach = 8, HideScheduler = 16, - LongRunning = 2, - None = 0, - PreferFairness = 1, RunContinuationsAsynchronously = 64, } public partial class TaskFactory @@ -8204,14 +8204,14 @@ public static event System.EventHandler : System.Threading.Tasks.Task { @@ -8333,15 +8333,15 @@ public void SetResult(TResult result) { } [System.FlagsAttribute] public enum ValueTaskSourceOnCompletedFlags { - FlowExecutionContext = 2, None = 0, UseSchedulingContext = 1, + FlowExecutionContext = 2, } public enum ValueTaskSourceStatus { - Canceled = 3, - Faulted = 2, Pending = 0, Succeeded = 1, + Faulted = 2, + Canceled = 3, } } diff --git a/src/System.Security.AccessControl/ref/System.Security.AccessControl.cs b/src/System.Security.AccessControl/ref/System.Security.AccessControl.cs index 05621f3047d0..4d05cc2b4b7f 100644 --- a/src/System.Security.AccessControl/ref/System.Security.AccessControl.cs +++ b/src/System.Security.AccessControl/ref/System.Security.AccessControl.cs @@ -10,28 +10,28 @@ namespace System.Security.AccessControl [System.FlagsAttribute] public enum AccessControlActions { - Change = 2, None = 0, View = 1, + Change = 2, } public enum AccessControlModification { Add = 0, + Set = 1, + Reset = 2, Remove = 3, RemoveAll = 4, RemoveSpecific = 5, - Reset = 2, - Set = 1, } [System.FlagsAttribute] public enum AccessControlSections { - Access = 2, - All = 15, - Audit = 1, - Group = 8, None = 0, + Audit = 1, + Access = 2, Owner = 4, + Group = 8, + All = 15, } public enum AccessControlType { @@ -62,51 +62,51 @@ public void Reset() { } [System.FlagsAttribute] public enum AceFlags : byte { - AuditFlags = (byte)192, + None = (byte)0, + ObjectInherit = (byte)1, ContainerInherit = (byte)2, - FailedAccess = (byte)128, + NoPropagateInherit = (byte)4, + InheritOnly = (byte)8, InheritanceFlags = (byte)15, Inherited = (byte)16, - InheritOnly = (byte)8, - None = (byte)0, - NoPropagateInherit = (byte)4, - ObjectInherit = (byte)1, SuccessfulAccess = (byte)64, + FailedAccess = (byte)128, + AuditFlags = (byte)192, } public enum AceQualifier { AccessAllowed = 0, AccessDenied = 1, - SystemAlarm = 3, SystemAudit = 2, + SystemAlarm = 3, } public enum AceType : byte { AccessAllowed = (byte)0, - AccessAllowedCallback = (byte)9, - AccessAllowedCallbackObject = (byte)11, + AccessDenied = (byte)1, + SystemAudit = (byte)2, + SystemAlarm = (byte)3, AccessAllowedCompound = (byte)4, AccessAllowedObject = (byte)5, - AccessDenied = (byte)1, - AccessDeniedCallback = (byte)10, - AccessDeniedCallbackObject = (byte)12, AccessDeniedObject = (byte)6, - MaxDefinedAceType = (byte)16, - SystemAlarm = (byte)3, - SystemAlarmCallback = (byte)14, - SystemAlarmCallbackObject = (byte)16, + SystemAuditObject = (byte)7, SystemAlarmObject = (byte)8, - SystemAudit = (byte)2, + AccessAllowedCallback = (byte)9, + AccessDeniedCallback = (byte)10, + AccessAllowedCallbackObject = (byte)11, + AccessDeniedCallbackObject = (byte)12, SystemAuditCallback = (byte)13, + SystemAlarmCallback = (byte)14, SystemAuditCallbackObject = (byte)15, - SystemAuditObject = (byte)7, + MaxDefinedAceType = (byte)16, + SystemAlarmCallbackObject = (byte)16, } [System.FlagsAttribute] public enum AuditFlags { - Failure = 2, None = 0, Success = 1, + Failure = 2, } public abstract partial class AuditRule : System.Security.AccessControl.AuthorizationRule { @@ -213,23 +213,23 @@ public enum CompoundAceType [System.FlagsAttribute] public enum ControlFlags { - DiscretionaryAclAutoInherited = 1024, - DiscretionaryAclAutoInheritRequired = 256, - DiscretionaryAclDefaulted = 8, - DiscretionaryAclPresent = 4, - DiscretionaryAclProtected = 4096, - DiscretionaryAclUntrusted = 64, - GroupDefaulted = 2, None = 0, OwnerDefaulted = 1, - RMControlValid = 16384, - SelfRelative = 32768, + GroupDefaulted = 2, + DiscretionaryAclPresent = 4, + DiscretionaryAclDefaulted = 8, + SystemAclPresent = 16, + SystemAclDefaulted = 32, + DiscretionaryAclUntrusted = 64, ServerSecurity = 128, - SystemAclAutoInherited = 2048, + DiscretionaryAclAutoInheritRequired = 256, SystemAclAutoInheritRequired = 512, - SystemAclDefaulted = 32, - SystemAclPresent = 16, + DiscretionaryAclAutoInherited = 1024, + SystemAclAutoInherited = 2048, + DiscretionaryAclProtected = 4096, SystemAclProtected = 8192, + RMControlValid = 16384, + SelfRelative = 32768, } public sealed partial class CustomAce : System.Security.AccessControl.GenericAce { @@ -310,8 +310,8 @@ public void GetBinaryForm(byte[] binaryForm, int offset) { } [System.FlagsAttribute] public enum InheritanceFlags { - ContainerInherit = 1, None = 0, + ContainerInherit = 1, ObjectInherit = 2, } public abstract partial class KnownAce : System.Security.AccessControl.GenericAce @@ -354,9 +354,9 @@ public override void GetBinaryForm(byte[] binaryForm, int offset) { } [System.FlagsAttribute] public enum ObjectAceFlags { - InheritedObjectAceTypePresent = 2, None = 0, ObjectAceTypePresent = 1, + InheritedObjectAceTypePresent = 2, } public abstract partial class ObjectAuditRule : System.Security.AccessControl.AuditRule { @@ -449,9 +449,9 @@ public override void GetObjectData(System.Runtime.Serialization.SerializationInf [System.FlagsAttribute] public enum PropagationFlags { - InheritOnly = 2, None = 0, NoPropagateInherit = 1, + InheritOnly = 2, } public abstract partial class QualifiedAce : System.Security.AccessControl.KnownAce { @@ -489,26 +489,26 @@ public void SetFlags(System.Security.AccessControl.ControlFlags flags) { } } public enum ResourceType { - DSObject = 8, - DSObjectAll = 9, + Unknown = 0, FileObject = 1, - KernelObject = 6, - LMShare = 5, + Service = 2, Printer = 3, - ProviderDefined = 10, RegistryKey = 4, - RegistryWow6432Key = 12, - Service = 2, - Unknown = 0, + LMShare = 5, + KernelObject = 6, WindowObject = 7, + DSObject = 8, + DSObjectAll = 9, + ProviderDefined = 10, WmiGuidObject = 11, + RegistryWow6432Key = 12, } [System.FlagsAttribute] public enum SecurityInfos { - DiscretionaryAcl = 4, - Group = 2, Owner = 1, + Group = 2, + DiscretionaryAcl = 4, SystemAcl = 8, } public sealed partial class SystemAcl : System.Security.AccessControl.CommonAcl diff --git a/src/System.Security.Cryptography.Algorithms/ref/System.Security.Cryptography.Algorithms.cs b/src/System.Security.Cryptography.Algorithms/ref/System.Security.Cryptography.Algorithms.cs index 1878c7c851c9..75d2462dfcb9 100644 --- a/src/System.Security.Cryptography.Algorithms/ref/System.Security.Cryptography.Algorithms.cs +++ b/src/System.Security.Cryptography.Algorithms/ref/System.Security.Cryptography.Algorithms.cs @@ -196,12 +196,12 @@ public partial struct ECCurve public void Validate() { } public enum ECCurveType { - Characteristic2 = 4, Implicit = 0, - Named = 5, - PrimeMontgomery = 3, PrimeShortWeierstrass = 1, PrimeTwistedEdwards = 2, + PrimeMontgomery = 3, + Characteristic2 = 4, + Named = 5, } public static partial class NamedCurves { @@ -532,8 +532,8 @@ internal RSAEncryptionPadding() { } } public enum RSAEncryptionPaddingMode { - Oaep = 1, Pkcs1 = 0, + Oaep = 1, } public partial class RSAOAEPKeyExchangeDeformatter : System.Security.Cryptography.AsymmetricKeyExchangeDeformatter { diff --git a/src/System.Security.Cryptography.Cng/ref/System.Security.Cryptography.Cng.cs b/src/System.Security.Cryptography.Cng/ref/System.Security.Cryptography.Cng.cs index 836cbc41891a..01af333849ff 100644 --- a/src/System.Security.Cryptography.Cng/ref/System.Security.Cryptography.Cng.cs +++ b/src/System.Security.Cryptography.Cng/ref/System.Security.Cryptography.Cng.cs @@ -94,11 +94,11 @@ public CngAlgorithmGroup(string algorithmGroup) { } [System.FlagsAttribute] public enum CngExportPolicies { - AllowArchiving = 4, + None = 0, AllowExport = 1, - AllowPlaintextArchiving = 8, AllowPlaintextExport = 2, - None = 0, + AllowArchiving = 4, + AllowPlaintextArchiving = 8, } public sealed partial class CngKey : System.IDisposable { @@ -158,8 +158,8 @@ public CngKeyBlobFormat(string format) { } [System.FlagsAttribute] public enum CngKeyCreationOptions { - MachineKey = 32, None = 0, + MachineKey = 32, OverwriteExistingKey = 128, } public sealed partial class CngKeyCreationParameters @@ -176,25 +176,25 @@ public CngKeyCreationParameters() { } [System.FlagsAttribute] public enum CngKeyHandleOpenOptions { - EphemeralKey = 1, None = 0, + EphemeralKey = 1, } [System.FlagsAttribute] public enum CngKeyOpenOptions { - MachineKey = 32, None = 0, - Silent = 64, UserKey = 0, + MachineKey = 32, + Silent = 64, } [System.FlagsAttribute] public enum CngKeyUsages { - AllUsages = 16777215, - Decryption = 1, - KeyAgreement = 4, None = 0, + Decryption = 1, Signing = 2, + KeyAgreement = 4, + AllUsages = 16777215, } public partial struct CngProperty : System.IEquatable { @@ -216,9 +216,9 @@ public CngPropertyCollection() { } [System.FlagsAttribute] public enum CngPropertyOptions { - CustomProperty = 1073741824, - None = 0, Persist = -2147483648, + None = 0, + CustomProperty = 1073741824, } public sealed partial class CngProvider : System.IEquatable { @@ -249,9 +249,9 @@ public CngUIPolicy(System.Security.Cryptography.CngUIProtectionLevels protection [System.FlagsAttribute] public enum CngUIProtectionLevels { - ForceHighProtection = 2, None = 0, ProtectKey = 1, + ForceHighProtection = 2, } public sealed partial class DSACng : System.Security.Cryptography.DSA { diff --git a/src/System.Security.Cryptography.Csp/ref/System.Security.Cryptography.Csp.cs b/src/System.Security.Cryptography.Csp/ref/System.Security.Cryptography.Csp.cs index d50e4bddb435..4b927b38716c 100644 --- a/src/System.Security.Cryptography.Csp/ref/System.Security.Cryptography.Csp.cs +++ b/src/System.Security.Cryptography.Csp/ref/System.Security.Cryptography.Csp.cs @@ -62,15 +62,15 @@ public CspParameters(int dwTypeIn, string strProviderNameIn, string strContainer [System.FlagsAttribute] public enum CspProviderFlags { - CreateEphemeralKey = 128, NoFlags = 0, - NoPrompt = 64, - UseArchivableKey = 16, - UseDefaultKeyContainer = 2, - UseExistingKey = 8, UseMachineKeyStore = 1, + UseDefaultKeyContainer = 2, UseNonExportableKey = 4, + UseExistingKey = 8, + UseArchivableKey = 16, UseUserProtectedKey = 32, + NoPrompt = 64, + CreateEphemeralKey = 128, } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public sealed partial class DESCryptoServiceProvider : System.Security.Cryptography.DES diff --git a/src/System.Security.Cryptography.Encoding/ref/System.Security.Cryptography.Encoding.cs b/src/System.Security.Cryptography.Encoding/ref/System.Security.Cryptography.Encoding.cs index 6cc3132af3fa..ea80360df8ab 100644 --- a/src/System.Security.Cryptography.Encoding/ref/System.Security.Cryptography.Encoding.cs +++ b/src/System.Security.Cryptography.Encoding/ref/System.Security.Cryptography.Encoding.cs @@ -59,8 +59,8 @@ protected virtual void Dispose(bool disposing) { } } public enum FromBase64TransformMode { - DoNotIgnoreWhiteSpaces = 1, IgnoreWhiteSpaces = 0, + DoNotIgnoreWhiteSpaces = 1, } public sealed partial class Oid { @@ -98,16 +98,16 @@ public void Reset() { } public enum OidGroup { All = 0, - Attribute = 5, - EncryptionAlgorithm = 2, - EnhancedKeyUsage = 7, - ExtensionOrAttribute = 6, HashAlgorithm = 1, - KeyDerivationFunction = 10, - Policy = 8, + EncryptionAlgorithm = 2, PublicKeyAlgorithm = 3, SignatureAlgorithm = 4, + Attribute = 5, + ExtensionOrAttribute = 6, + EnhancedKeyUsage = 7, + Policy = 8, Template = 9, + KeyDerivationFunction = 10, } public partial class ToBase64Transform : System.IDisposable, System.Security.Cryptography.ICryptoTransform { diff --git a/src/System.Security.Cryptography.Pkcs/ref/System.Security.Cryptography.Pkcs.cs b/src/System.Security.Cryptography.Pkcs/ref/System.Security.Cryptography.Pkcs.cs index d3106ee37809..85b2e39f7264 100644 --- a/src/System.Security.Cryptography.Pkcs/ref/System.Security.Cryptography.Pkcs.cs +++ b/src/System.Security.Cryptography.Pkcs/ref/System.Security.Cryptography.Pkcs.cs @@ -226,9 +226,9 @@ public void Reset() { } } public enum RecipientInfoType { - KeyAgreement = 2, - KeyTransport = 1, Unknown = 0, + KeyTransport = 1, + KeyAgreement = 2, } public sealed partial class SignedCms { @@ -308,17 +308,17 @@ internal SubjectIdentifierOrKey() { } } public enum SubjectIdentifierOrKeyType { + Unknown = 0, IssuerAndSerialNumber = 1, - PublicKeyInfo = 3, SubjectKeyIdentifier = 2, - Unknown = 0, + PublicKeyInfo = 3, } public enum SubjectIdentifierType { + Unknown = 0, IssuerAndSerialNumber = 1, - NoSignature = 3, SubjectKeyIdentifier = 2, - Unknown = 0, + NoSignature = 3, } } namespace System.Security.Cryptography.Xml diff --git a/src/System.Security.Cryptography.Primitives/ref/System.Security.Cryptography.Primitives.cs b/src/System.Security.Cryptography.Primitives/ref/System.Security.Cryptography.Primitives.cs index 55fc2b289f76..222d6f3ca37c 100644 --- a/src/System.Security.Cryptography.Primitives/ref/System.Security.Cryptography.Primitives.cs +++ b/src/System.Security.Cryptography.Primitives/ref/System.Security.Cryptography.Primitives.cs @@ -39,12 +39,12 @@ public virtual void FromXmlString(string xmlString) { } public enum CipherMode { CBC = 1, - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - CFB = 4, - CTS = 5, ECB = 2, [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] OFB = 3, + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + CFB = 4, + CTS = 5, } public static partial class CryptographicOperations { @@ -181,19 +181,19 @@ public KeySizes(int minSize, int maxSize, int skipSize) { } } public enum PaddingMode { - ANSIX923 = 4, - ISO10126 = 5, None = 1, PKCS7 = 2, Zeros = 3, + ANSIX923 = 4, + ISO10126 = 5, } public enum PbeEncryptionAlgorithm { + Unknown = 0, Aes128Cbc = 1, Aes192Cbc = 2, Aes256Cbc = 3, TripleDes3KeyPkcs12 = 4, - Unknown = 0, } public sealed partial class PbeParameters { diff --git a/src/System.Security.Cryptography.X509Certificates/ref/System.Security.Cryptography.X509Certificates.cs b/src/System.Security.Cryptography.X509Certificates/ref/System.Security.Cryptography.X509Certificates.cs index ccaccf9f0c7c..0d1fe7466a20 100644 --- a/src/System.Security.Cryptography.X509Certificates/ref/System.Security.Cryptography.X509Certificates.cs +++ b/src/System.Security.Cryptography.X509Certificates/ref/System.Security.Cryptography.X509Certificates.cs @@ -48,11 +48,11 @@ public static partial class ECDsaCertificateExtensions [System.FlagsAttribute] public enum OpenFlags { - IncludeArchived = 8, - MaxAllowed = 2, - OpenExistingOnly = 4, ReadOnly = 0, ReadWrite = 1, + MaxAllowed = 2, + OpenExistingOnly = 4, + IncludeArchived = 8, } public sealed partial class PublicKey { @@ -108,16 +108,16 @@ public X500DistinguishedName(string distinguishedName, System.Security.Cryptogra [System.FlagsAttribute] public enum X500DistinguishedNameFlags { - DoNotUsePlusSign = 32, - DoNotUseQuotes = 64, - ForceUTF8Encoding = 16384, None = 0, Reversed = 1, + UseSemicolons = 16, + DoNotUsePlusSign = 32, + DoNotUseQuotes = 64, UseCommas = 128, UseNewLines = 256, - UseSemicolons = 16, - UseT61Encoding = 8192, UseUTF8Encoding = 4096, + UseT61Encoding = 8192, + ForceUTF8Encoding = 16384, } public sealed partial class X509BasicConstraintsExtension : System.Security.Cryptography.X509Certificates.X509Extension { @@ -377,43 +377,43 @@ public partial struct X509ChainStatus [System.FlagsAttribute] public enum X509ChainStatusFlags { - CtlNotSignatureValid = 262144, - CtlNotTimeValid = 131072, - CtlNotValidForUsage = 524288, + NoError = 0, + NotTimeValid = 1, + NotTimeNested = 2, + Revoked = 4, + NotSignatureValid = 8, + NotValidForUsage = 16, + UntrustedRoot = 32, + RevocationStatusUnknown = 64, Cyclic = 128, - ExplicitDistrust = 67108864, - HasExcludedNameConstraint = 32768, + InvalidExtension = 256, + InvalidPolicyConstraints = 512, + InvalidBasicConstraints = 1024, + InvalidNameConstraints = 2048, + HasNotSupportedNameConstraint = 4096, HasNotDefinedNameConstraint = 8192, HasNotPermittedNameConstraint = 16384, - HasNotSupportedCriticalExtension = 134217728, - HasNotSupportedNameConstraint = 4096, + HasExcludedNameConstraint = 32768, + PartialChain = 65536, + CtlNotTimeValid = 131072, + CtlNotSignatureValid = 262144, + CtlNotValidForUsage = 524288, HasWeakSignature = 1048576, - InvalidBasicConstraints = 1024, - InvalidExtension = 256, - InvalidNameConstraints = 2048, - InvalidPolicyConstraints = 512, - NoError = 0, - NoIssuanceChainPolicy = 33554432, - NotSignatureValid = 8, - NotTimeNested = 2, - NotTimeValid = 1, - NotValidForUsage = 16, OfflineRevocation = 16777216, - PartialChain = 65536, - RevocationStatusUnknown = 64, - Revoked = 4, - UntrustedRoot = 32, + NoIssuanceChainPolicy = 33554432, + ExplicitDistrust = 67108864, + HasNotSupportedCriticalExtension = 134217728, } public enum X509ContentType { - Authenticode = 6, + Unknown = 0, Cert = 1, + SerializedCert = 2, Pfx = 3, Pkcs12 = 3, - Pkcs7 = 5, - SerializedCert = 2, SerializedStore = 4, - Unknown = 0, + Pkcs7 = 5, + Authenticode = 6, } public sealed partial class X509EnhancedKeyUsageExtension : System.Security.Cryptography.X509Certificates.X509Extension { @@ -456,39 +456,39 @@ public void Reset() { } } public enum X509FindType { + FindByThumbprint = 0, + FindBySubjectName = 1, + FindBySubjectDistinguishedName = 2, + FindByIssuerName = 3, + FindByIssuerDistinguishedName = 4, + FindBySerialNumber = 5, + FindByTimeValid = 6, + FindByTimeNotYetValid = 7, + FindByTimeExpired = 8, + FindByTemplateName = 9, FindByApplicationPolicy = 10, FindByCertificatePolicy = 11, FindByExtension = 12, - FindByIssuerDistinguishedName = 4, - FindByIssuerName = 3, FindByKeyUsage = 13, - FindBySerialNumber = 5, - FindBySubjectDistinguishedName = 2, FindBySubjectKeyIdentifier = 14, - FindBySubjectName = 1, - FindByTemplateName = 9, - FindByThumbprint = 0, - FindByTimeExpired = 8, - FindByTimeNotYetValid = 7, - FindByTimeValid = 6, } public enum X509IncludeOption { - EndCertOnly = 2, - ExcludeRoot = 1, None = 0, + ExcludeRoot = 1, + EndCertOnly = 2, WholeChain = 3, } [System.FlagsAttribute] public enum X509KeyStorageFlags { DefaultKeySet = 0, - EphemeralKeySet = 32, - Exportable = 4, - MachineKeySet = 2, - PersistKeySet = 16, UserKeySet = 1, + MachineKeySet = 2, + Exportable = 4, UserProtected = 8, + PersistKeySet = 16, + EphemeralKeySet = 32, } public sealed partial class X509KeyUsageExtension : System.Security.Cryptography.X509Certificates.X509Extension { @@ -501,24 +501,24 @@ public override void CopyFrom(System.Security.Cryptography.AsnEncodedData asnEnc [System.FlagsAttribute] public enum X509KeyUsageFlags { - CrlSign = 2, - DataEncipherment = 16, - DecipherOnly = 32768, - DigitalSignature = 128, + None = 0, EncipherOnly = 1, - KeyAgreement = 8, + CrlSign = 2, KeyCertSign = 4, + KeyAgreement = 8, + DataEncipherment = 16, KeyEncipherment = 32, - None = 0, NonRepudiation = 64, + DigitalSignature = 128, + DecipherOnly = 32768, } public enum X509NameType { - DnsFromAlternativeName = 4, - DnsName = 3, - EmailName = 1, SimpleName = 0, + EmailName = 1, UpnName = 2, + DnsName = 3, + DnsFromAlternativeName = 4, UrlName = 5, } public enum X509RevocationFlag @@ -530,8 +530,8 @@ public enum X509RevocationFlag public enum X509RevocationMode { NoCheck = 0, - Offline = 2, Online = 1, + Offline = 2, } public abstract partial class X509SignatureGenerator { @@ -580,26 +580,26 @@ public override void CopyFrom(System.Security.Cryptography.AsnEncodedData asnEnc } public enum X509SubjectKeyIdentifierHashAlgorithm { - CapiSha1 = 2, Sha1 = 0, ShortSha1 = 1, + CapiSha1 = 2, } [System.FlagsAttribute] public enum X509VerificationFlags { - AllFlags = 4095, - AllowUnknownCertificateAuthority = 16, - IgnoreCertificateAuthorityRevocationUnknown = 1024, + NoFlag = 0, + IgnoreNotTimeValid = 1, IgnoreCtlNotTimeValid = 2, - IgnoreCtlSignerRevocationUnknown = 512, - IgnoreEndRevocationUnknown = 256, + IgnoreNotTimeNested = 4, IgnoreInvalidBasicConstraints = 8, + AllowUnknownCertificateAuthority = 16, + IgnoreWrongUsage = 32, IgnoreInvalidName = 64, IgnoreInvalidPolicy = 128, - IgnoreNotTimeNested = 4, - IgnoreNotTimeValid = 1, + IgnoreEndRevocationUnknown = 256, + IgnoreCtlSignerRevocationUnknown = 512, + IgnoreCertificateAuthorityRevocationUnknown = 1024, IgnoreRootRevocationUnknown = 2048, - IgnoreWrongUsage = 32, - NoFlag = 0, + AllFlags = 4095, } } diff --git a/src/System.Security.Permissions/ref/System.Security.Permissions.cs b/src/System.Security.Permissions/ref/System.Security.Permissions.cs index 74d84ee31dd4..d2a496c69efa 100644 --- a/src/System.Security.Permissions/ref/System.Security.Permissions.cs +++ b/src/System.Security.Permissions/ref/System.Security.Permissions.cs @@ -170,12 +170,12 @@ public EventLogPermission(System.Security.Permissions.PermissionState state) { } [System.FlagsAttribute] public enum EventLogPermissionAccess { - Administer = 48, - Audit = 10, + None = 0, Browse = 2, Instrument = 6, - None = 0, + Audit = 10, Write = 16, + Administer = 48, } [System.AttributeUsageAttribute(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Event | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)] public partial class EventLogPermissionAttribute : System.Security.Permissions.CodeAccessSecurityAttribute @@ -219,12 +219,12 @@ public PerformanceCounterPermission(System.Security.Permissions.PermissionState [System.FlagsAttribute] public enum PerformanceCounterPermissionAccess { - Administer = 7, - Browse = 1, - Instrument = 3, None = 0, + Browse = 1, Read = 1, Write = 2, + Instrument = 3, + Administer = 7, } [System.AttributeUsageAttribute(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Event | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)] public partial class PerformanceCounterPermissionAttribute : System.Security.Permissions.CodeAccessSecurityAttribute @@ -284,10 +284,10 @@ public PrintingPermissionAttribute(System.Security.Permissions.SecurityAction ac } public enum PrintingPermissionLevel { - AllPrinting = 3, - DefaultPrinting = 2, NoPrinting = 0, SafePrinting = 1, + DefaultPrinting = 2, + AllPrinting = 3, } } namespace System.Net @@ -321,8 +321,8 @@ internal EndpointPermission() { } [System.FlagsAttribute] public enum NetworkAccess { - Accept = 128, Connect = 64, + Accept = 128, } public sealed partial class SocketPermission : System.Security.CodeAccessPermission, System.Security.Permissions.IUnrestrictedPermission { @@ -352,11 +352,11 @@ public SocketPermissionAttribute(System.Security.Permissions.SecurityAction acti } public enum TransportType { - All = 3, Connectionless = 1, + Udp = 1, ConnectionOriented = 2, Tcp = 2, - Udp = 1, + All = 3, } public sealed partial class WebPermission : System.Security.CodeAccessPermission, System.Security.Permissions.IUnrestrictedPermission { @@ -391,9 +391,9 @@ namespace System.Net.Mail { public enum SmtpAccess { + None = 0, Connect = 1, ConnectToUnrestrictedPort = 2, - None = 0, } public sealed partial class SmtpPermission : System.Security.CodeAccessPermission, System.Security.Permissions.IUnrestrictedPermission { @@ -424,8 +424,8 @@ namespace System.Net.NetworkInformation public enum NetworkInformationAccess { None = 0, - Ping = 4, Read = 1, + Ping = 4, } public sealed partial class NetworkInformationPermission : System.Security.CodeAccessPermission, System.Security.Permissions.IUnrestrictedPermission { @@ -472,8 +472,8 @@ public enum PnrpScope { All = 0, Global = 1, - LinkLocal = 3, SiteLocal = 2, + LinkLocal = 3, } } namespace System.Net.PeerToPeer.Collaboration @@ -550,13 +550,13 @@ public HostSecurityManager() { } [System.FlagsAttribute] public enum HostSecurityManagerOptions { - AllFlags = 31, + None = 0, HostAppDomainEvidence = 1, + HostPolicyLevel = 2, HostAssemblyEvidence = 4, HostDetermineApplicationTrust = 8, - HostPolicyLevel = 2, HostResolvePolicy = 16, - None = 0, + AllFlags = 31, } public partial interface IEvidenceFactory { @@ -636,10 +636,10 @@ void System.Runtime.Serialization.IDeserializationCallback.OnDeserialization(obj #endif public enum PolicyLevelType { - AppDomain = 3, - Enterprise = 2, - Machine = 1, User = 0, + Machine = 1, + Enterprise = 2, + AppDomain = 3, } public sealed partial class SecurityContext : System.IDisposable { @@ -699,11 +699,11 @@ protected SecurityState() { } } public enum SecurityZone { - Internet = 3, - Intranet = 1, - MyComputer = 0, NoZone = -1, + MyComputer = 0, + Intranet = 1, Trusted = 2, + Internet = 3, Untrusted = 4, } public sealed partial class XmlSyntaxException : System.SystemException @@ -744,12 +744,12 @@ public DataProtectionPermissionAttribute(System.Security.Permissions.SecurityAct [System.FlagsAttribute] public enum DataProtectionPermissionFlags { - AllFlags = 15, NoFlags = 0, ProtectData = 1, - ProtectMemory = 4, UnprotectData = 2, + ProtectMemory = 4, UnprotectMemory = 8, + AllFlags = 15, } public sealed partial class EnvironmentPermission : System.Security.CodeAccessPermission, System.Security.Permissions.IUnrestrictedPermission { @@ -769,10 +769,10 @@ public void SetPathList(System.Security.Permissions.EnvironmentPermissionAccess [System.FlagsAttribute] public enum EnvironmentPermissionAccess { - AllAccess = 3, NoAccess = 0, Read = 1, Write = 2, + AllAccess = 3, } [System.AttributeUsageAttribute(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)] public sealed partial class EnvironmentPermissionAttribute : System.Security.Permissions.CodeAccessSecurityAttribute @@ -801,8 +801,8 @@ public enum FileDialogPermissionAccess { None = 0, Open = 1, - OpenSave = 3, Save = 2, + OpenSave = 3, } [System.AttributeUsageAttribute(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)] public sealed partial class FileDialogPermissionAttribute : System.Security.Permissions.CodeAccessSecurityAttribute @@ -839,12 +839,12 @@ public void SetPathList(System.Security.Permissions.FileIOPermissionAccess acces [System.FlagsAttribute] public enum FileIOPermissionAccess { - AllAccess = 15, - Append = 4, NoAccess = 0, - PathDiscovery = 8, Read = 1, Write = 2, + Append = 4, + PathDiscovery = 8, + AllAccess = 15, } [System.AttributeUsageAttribute(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)] public sealed partial class FileIOPermissionAttribute : System.Security.Permissions.CodeAccessSecurityAttribute @@ -900,31 +900,31 @@ public HostProtectionAttribute(System.Security.Permissions.SecurityAction action [System.FlagsAttribute] public enum HostProtectionResource { - All = 511, - ExternalProcessMgmt = 4, - ExternalThreading = 16, - MayLeakOnAbort = 256, None = 0, - SecurityInfrastructure = 64, + Synchronization = 1, + SharedState = 2, + ExternalProcessMgmt = 4, SelfAffectingProcessMgmt = 8, + ExternalThreading = 16, SelfAffectingThreading = 32, - SharedState = 2, - Synchronization = 1, + SecurityInfrastructure = 64, UI = 128, + MayLeakOnAbort = 256, + All = 511, } public enum IsolatedStorageContainment { - AdministerIsolatedStorageByUser = 112, - ApplicationIsolationByMachine = 69, - ApplicationIsolationByRoamingUser = 101, + None = 0, + DomainIsolationByUser = 16, ApplicationIsolationByUser = 21, - AssemblyIsolationByMachine = 64, - AssemblyIsolationByRoamingUser = 96, AssemblyIsolationByUser = 32, DomainIsolationByMachine = 48, + AssemblyIsolationByMachine = 64, + ApplicationIsolationByMachine = 69, DomainIsolationByRoamingUser = 80, - DomainIsolationByUser = 16, - None = 0, + AssemblyIsolationByRoamingUser = 96, + ApplicationIsolationByRoamingUser = 101, + AdministerIsolatedStorageByUser = 112, UnrestrictedIsolatedStorage = 240, } public sealed partial class IsolatedStorageFilePermission : System.Security.Permissions.IsolatedStoragePermission @@ -1028,17 +1028,17 @@ public KeyContainerPermissionAttribute(System.Security.Permissions.SecurityActio } public enum KeyContainerPermissionFlags { - AllFlags = 13111, - ChangeAcl = 8192, + NoFlags = 0, Create = 1, - Decrypt = 512, + Open = 2, Delete = 4, - Export = 32, Import = 16, - NoFlags = 0, - Open = 2, + Export = 32, Sign = 256, + Decrypt = 512, ViewAcl = 4096, + ChangeAcl = 8192, + AllFlags = 13111, } [System.AttributeUsageAttribute(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)] public sealed partial class PermissionSetAttribute : System.Security.Permissions.CodeAccessSecurityAttribute @@ -1135,15 +1135,15 @@ public ReflectionPermissionAttribute(System.Security.Permissions.SecurityAction [System.FlagsAttribute] public enum ReflectionPermissionFlag { + NoFlags = 0, [System.ObsoleteAttribute] - AllFlags = 7, + TypeInformation = 1, MemberAccess = 2, - NoFlags = 0, [System.ObsoleteAttribute] ReflectionEmit = 4, - RestrictedMemberAccess = 8, [System.ObsoleteAttribute] - TypeInformation = 1, + AllFlags = 7, + RestrictedMemberAccess = 8, } public sealed partial class RegistryPermission : System.Security.CodeAccessPermission, System.Security.Permissions.IUnrestrictedPermission { @@ -1165,11 +1165,11 @@ public void SetPathList(System.Security.Permissions.RegistryPermissionAccess acc [System.FlagsAttribute] public enum RegistryPermissionAccess { - AllAccess = 7, - Create = 4, NoAccess = 0, Read = 1, Write = 2, + Create = 4, + AllAccess = 7, } [System.AttributeUsageAttribute(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)] public sealed partial class RegistryPermissionAttribute : System.Security.Permissions.CodeAccessSecurityAttribute @@ -1274,15 +1274,15 @@ public StorePermissionAttribute(System.Security.Permissions.SecurityAction actio [System.FlagsAttribute] public enum StorePermissionFlags { - AddToStore = 32, - AllFlags = 247, + NoFlags = 0, CreateStore = 1, DeleteStore = 2, - EnumerateCertificates = 128, EnumerateStores = 4, - NoFlags = 0, OpenStore = 16, + AddToStore = 32, RemoveFromStore = 64, + EnumerateCertificates = 128, + AllFlags = 247, } public sealed partial class StrongNameIdentityPermission : System.Security.CodeAccessPermission { @@ -1367,16 +1367,16 @@ public UIPermissionAttribute(System.Security.Permissions.SecurityAction action) } public enum UIPermissionClipboard { - AllClipboard = 2, NoClipboard = 0, OwnClipboard = 1, + AllClipboard = 2, } public enum UIPermissionWindow { - AllWindows = 3, NoWindows = 0, SafeSubWindows = 1, SafeTopLevelWindows = 2, + AllWindows = 3, } public sealed partial class UrlIdentityPermission : System.Security.CodeAccessPermission { @@ -1500,8 +1500,8 @@ public void Reset() { } } public enum ApplicationVersionMatch { - MatchAllVersions = 1, MatchExactVersion = 0, + MatchAllVersions = 1, } public partial class CodeConnectAccess { @@ -1752,10 +1752,10 @@ public void FromXml(System.Security.SecurityElement et, System.Security.Policy.P [System.FlagsAttribute] public enum PolicyStatementAttribute { - All = 3, + Nothing = 0, Exclusive = 1, LevelFinal = 2, - Nothing = 0, + All = 3, } public sealed partial class Publisher : System.Security.Policy.EvidenceBase, System.Security.Policy.IIdentityPermissionFactory { @@ -1848,8 +1848,8 @@ public TrustManagerContext(System.Security.Policy.TrustManagerUIContext uiContex public enum TrustManagerUIContext { Install = 0, - Run = 2, Upgrade = 1, + Run = 2, } [System.ObsoleteAttribute("This type is obsolete. See https://go.microsoft.com/fwlink/?LinkID=155570 for more information.")] public sealed partial class UnionCodeGroup : System.Security.Policy.CodeGroup @@ -1923,9 +1923,9 @@ public ServiceControllerPermission(System.ServiceProcess.ServiceControllerPermis [System.FlagsAttribute] public enum ServiceControllerPermissionAccess { + None = 0, Browse = 2, Control = 6, - None = 0, } [System.AttributeUsageAttribute(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Event | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)] public partial class ServiceControllerPermissionAttribute : System.Security.Permissions.CodeAccessSecurityAttribute @@ -2007,11 +2007,11 @@ public AspNetHostingPermissionAttribute(System.Security.Permissions.SecurityActi } public enum AspNetHostingPermissionLevel { - High = 500, + None = 100, + Minimal = 200, Low = 300, Medium = 400, - Minimal = 200, - None = 100, + High = 500, Unrestricted = 600, } } diff --git a/src/System.Security.Principal.Windows/ref/System.Security.Principal.Windows.cs b/src/System.Security.Principal.Windows/ref/System.Security.Principal.Windows.cs index 838b19b30bf8..941aa57ab804 100644 --- a/src/System.Security.Principal.Windows/ref/System.Security.Principal.Windows.cs +++ b/src/System.Security.Principal.Windows/ref/System.Security.Principal.Windows.cs @@ -95,140 +95,140 @@ public void GetBinaryForm(byte[] binaryForm, int offset) { } [System.FlagsAttribute] public enum TokenAccessLevels { - AdjustDefault = 128, - AdjustGroups = 64, - AdjustPrivileges = 32, - AdjustSessionId = 256, - AllAccess = 983551, AssignPrimary = 1, Duplicate = 2, Impersonate = 4, - MaximumAllowed = 33554432, Query = 8, QuerySource = 16, + AdjustPrivileges = 32, + AdjustGroups = 64, + AdjustDefault = 128, + AdjustSessionId = 256, Read = 131080, Write = 131296, + AllAccess = 983551, + MaximumAllowed = 33554432, } public enum WellKnownSidType { - AccountAdministratorSid = 38, - AccountCertAdminsSid = 46, - AccountComputersSid = 44, - AccountControllersSid = 45, - AccountDomainAdminsSid = 41, - AccountDomainGuestsSid = 43, - AccountDomainUsersSid = 42, - AccountEnterpriseAdminsSid = 48, - AccountGuestSid = 39, - AccountKrbtgtSid = 40, - AccountPolicyAdminsSid = 49, - AccountRasAndIasServersSid = 50, - AccountSchemaAdminsSid = 47, + NullSid = 0, + WorldSid = 1, + LocalSid = 2, + CreatorOwnerSid = 3, + CreatorGroupSid = 4, + CreatorOwnerServerSid = 5, + CreatorGroupServerSid = 6, + NTAuthoritySid = 7, + DialupSid = 8, + NetworkSid = 9, + BatchSid = 10, + InteractiveSid = 11, + ServiceSid = 12, AnonymousSid = 13, + ProxySid = 14, + EnterpriseControllersSid = 15, + SelfSid = 16, AuthenticatedUserSid = 17, - BatchSid = 10, - BuiltinAccountOperatorsSid = 30, - BuiltinAdministratorsSid = 26, - BuiltinAuthorizationAccessSid = 59, - BuiltinBackupOperatorsSid = 33, + RestrictedCodeSid = 18, + TerminalServerSid = 19, + RemoteLogonIdSid = 20, + LogonIdsSid = 21, + LocalSystemSid = 22, + LocalServiceSid = 23, + NetworkServiceSid = 24, BuiltinDomainSid = 25, + BuiltinAdministratorsSid = 26, + BuiltinUsersSid = 27, BuiltinGuestsSid = 28, - BuiltinIncomingForestTrustBuildersSid = 56, - BuiltinNetworkConfigurationOperatorsSid = 37, - BuiltinPerformanceLoggingUsersSid = 58, - BuiltinPerformanceMonitoringUsersSid = 57, BuiltinPowerUsersSid = 29, - BuiltinPreWindows2000CompatibleAccessSid = 35, + BuiltinAccountOperatorsSid = 30, + BuiltinSystemOperatorsSid = 31, BuiltinPrintOperatorsSid = 32, - BuiltinRemoteDesktopUsersSid = 36, + BuiltinBackupOperatorsSid = 33, BuiltinReplicatorSid = 34, - BuiltinSystemOperatorsSid = 31, - BuiltinUsersSid = 27, - CreatorGroupServerSid = 6, - CreatorGroupSid = 4, - CreatorOwnerServerSid = 5, - CreatorOwnerSid = 3, - DialupSid = 8, + BuiltinPreWindows2000CompatibleAccessSid = 35, + BuiltinRemoteDesktopUsersSid = 36, + BuiltinNetworkConfigurationOperatorsSid = 37, + AccountAdministratorSid = 38, + AccountGuestSid = 39, + AccountKrbtgtSid = 40, + AccountDomainAdminsSid = 41, + AccountDomainUsersSid = 42, + AccountDomainGuestsSid = 43, + AccountComputersSid = 44, + AccountControllersSid = 45, + AccountCertAdminsSid = 46, + AccountSchemaAdminsSid = 47, + AccountEnterpriseAdminsSid = 48, + AccountPolicyAdminsSid = 49, + AccountRasAndIasServersSid = 50, + NtlmAuthenticationSid = 51, DigestAuthenticationSid = 52, - EnterpriseControllersSid = 15, - InteractiveSid = 11, - LocalServiceSid = 23, - LocalSid = 2, - LocalSystemSid = 22, - LogonIdsSid = 21, + SChannelAuthenticationSid = 53, + ThisOrganizationSid = 54, + OtherOrganizationSid = 55, + BuiltinIncomingForestTrustBuildersSid = 56, + BuiltinPerformanceMonitoringUsersSid = 57, + BuiltinPerformanceLoggingUsersSid = 58, + BuiltinAuthorizationAccessSid = 59, [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] [System.ObsoleteAttribute("This member has been depcreated and is only maintained for backwards compatability. WellKnownSidType values greater than MaxDefined may be defined in future releases.")] MaxDefined = 60, - NetworkServiceSid = 24, - NetworkSid = 9, - NTAuthoritySid = 7, - NtlmAuthenticationSid = 51, - NullSid = 0, - OtherOrganizationSid = 55, - ProxySid = 14, - RemoteLogonIdSid = 20, - RestrictedCodeSid = 18, - SChannelAuthenticationSid = 53, - SelfSid = 16, - ServiceSid = 12, - TerminalServerSid = 19, - ThisOrganizationSid = 54, - WinAccountReadonlyControllersSid = 75, - WinApplicationPackageAuthoritySid = 83, - WinBuiltinAnyPackageSid = 84, - WinBuiltinCertSvcDComAccessGroup = 78, - WinBuiltinCryptoOperatorsSid = 64, + WinBuiltinTerminalServerLicenseServersSid = 60, WinBuiltinDCOMUsersSid = 61, - WinBuiltinEventLogReadersGroup = 76, WinBuiltinIUsersSid = 62, - WinBuiltinTerminalServerLicenseServersSid = 60, - WinCacheablePrincipalsGroupSid = 72, - WinCapabilityDocumentsLibrarySid = 91, - WinCapabilityEnterpriseAuthenticationSid = 93, - WinCapabilityInternetClientServerSid = 86, - WinCapabilityInternetClientSid = 85, - WinCapabilityMusicLibrarySid = 90, - WinCapabilityPicturesLibrarySid = 88, - WinCapabilityPrivateNetworkClientServerSid = 87, - WinCapabilityRemovableStorageSid = 94, - WinCapabilitySharedUserCertificatesSid = 92, - WinCapabilityVideosLibrarySid = 89, - WinConsoleLogonSid = 81, - WinCreatorOwnerRightsSid = 71, - WinEnterpriseReadonlyControllersSid = 74, - WinHighLabelSid = 68, WinIUserSid = 63, - WinLocalLogonSid = 80, + WinBuiltinCryptoOperatorsSid = 64, + WinUntrustedLabelSid = 65, WinLowLabelSid = 66, WinMediumLabelSid = 67, - WinMediumPlusLabelSid = 79, - WinNewEnterpriseReadonlyControllersSid = 77, - WinNonCacheablePrincipalsGroupSid = 73, + WinHighLabelSid = 68, WinSystemLabelSid = 69, - WinThisOrganizationCertificateSid = 82, - WinUntrustedLabelSid = 65, WinWriteRestrictedCodeSid = 70, - WorldSid = 1, + WinCreatorOwnerRightsSid = 71, + WinCacheablePrincipalsGroupSid = 72, + WinNonCacheablePrincipalsGroupSid = 73, + WinEnterpriseReadonlyControllersSid = 74, + WinAccountReadonlyControllersSid = 75, + WinBuiltinEventLogReadersGroup = 76, + WinNewEnterpriseReadonlyControllersSid = 77, + WinBuiltinCertSvcDComAccessGroup = 78, + WinMediumPlusLabelSid = 79, + WinLocalLogonSid = 80, + WinConsoleLogonSid = 81, + WinThisOrganizationCertificateSid = 82, + WinApplicationPackageAuthoritySid = 83, + WinBuiltinAnyPackageSid = 84, + WinCapabilityInternetClientSid = 85, + WinCapabilityInternetClientServerSid = 86, + WinCapabilityPrivateNetworkClientServerSid = 87, + WinCapabilityPicturesLibrarySid = 88, + WinCapabilityVideosLibrarySid = 89, + WinCapabilityMusicLibrarySid = 90, + WinCapabilityDocumentsLibrarySid = 91, + WinCapabilitySharedUserCertificatesSid = 92, + WinCapabilityEnterpriseAuthenticationSid = 93, + WinCapabilityRemovableStorageSid = 94, } [System.Runtime.InteropServices.ComVisibleAttribute(true)] public enum WindowsAccountType { - Anonymous = 3, - Guest = 1, Normal = 0, + Guest = 1, System = 2, + Anonymous = 3, } public enum WindowsBuiltInRole { - AccountOperator = 548, Administrator = 544, - BackupOperator = 551, + User = 545, Guest = 546, PowerUser = 547, + AccountOperator = 548, + SystemOperator = 549, PrintOperator = 550, + BackupOperator = 551, Replicator = 552, - SystemOperator = 549, - User = 545, } public partial class WindowsIdentity : System.Security.Claims.ClaimsIdentity, System.IDisposable, System.Runtime.Serialization.IDeserializationCallback, System.Runtime.Serialization.ISerializable { diff --git a/src/System.Security.Principal/ref/System.Security.Principal.cs b/src/System.Security.Principal/ref/System.Security.Principal.cs index 13f898c4cccd..1e3548edd6e5 100644 --- a/src/System.Security.Principal/ref/System.Security.Principal.cs +++ b/src/System.Security.Principal/ref/System.Security.Principal.cs @@ -20,16 +20,16 @@ public partial interface IPrincipal } public enum PrincipalPolicy { - NoPrincipal = 1, UnauthenticatedPrincipal = 0, + NoPrincipal = 1, WindowsPrincipal = 2, } public enum TokenImpersonationLevel { + None = 0, Anonymous = 1, - Delegation = 4, Identification = 2, Impersonation = 3, - None = 0, + Delegation = 4, } } diff --git a/src/System.ServiceModel.Syndication/ref/System.ServiceModel.Syndication.cs b/src/System.ServiceModel.Syndication/ref/System.ServiceModel.Syndication.cs index 92ae4246901c..3c11a584fc5d 100644 --- a/src/System.ServiceModel.Syndication/ref/System.ServiceModel.Syndication.cs +++ b/src/System.ServiceModel.Syndication/ref/System.ServiceModel.Syndication.cs @@ -582,8 +582,8 @@ protected override void WriteContentsTo(System.Xml.XmlWriter writer) { } } public enum TextSyndicationContentKind { - Html = 1, Plaintext = 0, + Html = 1, XHtml = 2, } public partial class UrlSyndicationContent : System.ServiceModel.Syndication.SyndicationContent diff --git a/src/System.ServiceProcess.ServiceController/ref/System.ServiceProcess.ServiceController.cs b/src/System.ServiceProcess.ServiceController/ref/System.ServiceProcess.ServiceController.cs index 6c1265d0fe26..9accb22625a9 100644 --- a/src/System.ServiceProcess.ServiceController/ref/System.ServiceProcess.ServiceController.cs +++ b/src/System.ServiceProcess.ServiceController/ref/System.ServiceProcess.ServiceController.cs @@ -9,15 +9,15 @@ namespace System.ServiceProcess { public enum PowerBroadcastStatus { - BatteryLow = 9, - OemEvent = 11, - PowerStatusChange = 10, QuerySuspend = 0, QuerySuspendFailed = 2, - ResumeAutomatic = 18, + Suspend = 4, ResumeCritical = 6, ResumeSuspend = 7, - Suspend = 4, + BatteryLow = 9, + PowerStatusChange = 10, + OemEvent = 11, + ResumeAutomatic = 18, } public partial class ServiceBase : System.ComponentModel.Component { @@ -90,13 +90,13 @@ public void WaitForStatus(System.ServiceProcess.ServiceControllerStatus desiredS } public enum ServiceControllerStatus { - ContinuePending = 5, - Paused = 7, - PausePending = 6, - Running = 4, - StartPending = 2, Stopped = 1, + StartPending = 2, StopPending = 3, + Running = 4, + ContinuePending = 5, + PausePending = 6, + Paused = 7, } [System.AttributeUsageAttribute(System.AttributeTargets.All)] public partial class ServiceProcessDescriptionAttribute : System.ComponentModel.DescriptionAttribute @@ -106,22 +106,22 @@ public ServiceProcessDescriptionAttribute(string description) { } } public enum ServiceStartMode { - Automatic = 2, Boot = 0, - Disabled = 4, - Manual = 3, System = 1, + Automatic = 2, + Manual = 3, + Disabled = 4, } [System.FlagsAttribute] public enum ServiceType { - Adapter = 4, - FileSystemDriver = 2, - InteractiveProcess = 256, KernelDriver = 1, + FileSystemDriver = 2, + Adapter = 4, RecognizerDriver = 8, Win32OwnProcess = 16, Win32ShareProcess = 32, + InteractiveProcess = 256, } public readonly partial struct SessionChangeDescription { @@ -140,11 +140,11 @@ public enum SessionChangeReason ConsoleDisconnect = 2, RemoteConnect = 3, RemoteDisconnect = 4, - SessionLock = 7, - SessionLogoff = 6, SessionLogon = 5, - SessionRemoteControl = 9, + SessionLogoff = 6, + SessionLock = 7, SessionUnlock = 8, + SessionRemoteControl = 9, } public partial class TimeoutException : System.SystemException { diff --git a/src/System.Text.Json/ref/System.Text.Json.cs b/src/System.Text.Json/ref/System.Text.Json.cs index d3c17c1f04dc..cf579b34d851 100644 --- a/src/System.Text.Json/ref/System.Text.Json.cs +++ b/src/System.Text.Json/ref/System.Text.Json.cs @@ -9,8 +9,8 @@ namespace System.Text.Json { public enum JsonCommentHandling : byte { - Allow = (byte)1, Disallow = (byte)0, + Allow = (byte)1, Skip = (byte)2, } public sealed partial class JsonDocument : System.IDisposable @@ -133,29 +133,29 @@ public partial struct JsonReaderState } public enum JsonTokenType : byte { - Comment = (byte)11, - EndArray = (byte)4, - EndObject = (byte)2, - False = (byte)9, None = (byte)0, - Null = (byte)10, - Number = (byte)7, - PropertyName = (byte)5, - StartArray = (byte)3, StartObject = (byte)1, + EndObject = (byte)2, + StartArray = (byte)3, + EndArray = (byte)4, + PropertyName = (byte)5, String = (byte)6, + Number = (byte)7, True = (byte)8, + False = (byte)9, + Null = (byte)10, + Comment = (byte)11, } public enum JsonValueType : byte { - Array = (byte)2, - False = (byte)6, - Null = (byte)7, - Number = (byte)4, + Undefined = (byte)0, Object = (byte)1, + Array = (byte)2, String = (byte)3, + Number = (byte)4, True = (byte)5, - Undefined = (byte)0, + False = (byte)6, + Null = (byte)7, } public partial struct JsonWriterOptions { diff --git a/src/System.Text.RegularExpressions/ref/System.Text.RegularExpressions.cs b/src/System.Text.RegularExpressions/ref/System.Text.RegularExpressions.cs index 21c2587a2990..e0d82c559658 100644 --- a/src/System.Text.RegularExpressions/ref/System.Text.RegularExpressions.cs +++ b/src/System.Text.RegularExpressions/ref/System.Text.RegularExpressions.cs @@ -226,16 +226,16 @@ void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Ser [System.FlagsAttribute] public enum RegexOptions { - Compiled = 8, - CultureInvariant = 512, - ECMAScript = 256, - ExplicitCapture = 4, + None = 0, IgnoreCase = 1, - IgnorePatternWhitespace = 32, Multiline = 2, - None = 0, - RightToLeft = 64, + ExplicitCapture = 4, + Compiled = 8, Singleline = 16, + IgnorePatternWhitespace = 32, + RightToLeft = 64, + ECMAScript = 256, + CultureInvariant = 512, } public abstract partial class RegexRunner { diff --git a/src/System.Threading.AccessControl/ref/System.Threading.AccessControl.cs b/src/System.Threading.AccessControl/ref/System.Threading.AccessControl.cs index 6bfbd7929145..8d7efcd0bf12 100644 --- a/src/System.Threading.AccessControl/ref/System.Threading.AccessControl.cs +++ b/src/System.Threading.AccessControl/ref/System.Threading.AccessControl.cs @@ -21,13 +21,13 @@ public sealed partial class EventWaitHandleAuditRule : System.Security.AccessCon [System.FlagsAttribute] public enum EventWaitHandleRights { - ChangePermissions = 262144, - Delete = 65536, - FullControl = 2031619, Modify = 2, + Delete = 65536, ReadPermissions = 131072, - Synchronize = 1048576, + ChangePermissions = 262144, TakeOwnership = 524288, + Synchronize = 1048576, + FullControl = 2031619, } public sealed partial class EventWaitHandleSecurity : System.Security.AccessControl.NativeObjectSecurity { @@ -63,13 +63,13 @@ public sealed partial class MutexAuditRule : System.Security.AccessControl.Audit [System.FlagsAttribute] public enum MutexRights { - ChangePermissions = 262144, - Delete = 65536, - FullControl = 2031617, Modify = 1, + Delete = 65536, ReadPermissions = 131072, - Synchronize = 1048576, + ChangePermissions = 262144, TakeOwnership = 524288, + Synchronize = 1048576, + FullControl = 2031617, } public sealed partial class MutexSecurity : System.Security.AccessControl.NativeObjectSecurity { @@ -106,13 +106,13 @@ public sealed partial class SemaphoreAuditRule : System.Security.AccessControl.A [System.FlagsAttribute] public enum SemaphoreRights { - ChangePermissions = 262144, - Delete = 65536, - FullControl = 2031619, Modify = 2, + Delete = 65536, ReadPermissions = 131072, - Synchronize = 1048576, + ChangePermissions = 262144, TakeOwnership = 524288, + Synchronize = 1048576, + FullControl = 2031619, } public sealed partial class SemaphoreSecurity : System.Security.AccessControl.NativeObjectSecurity { diff --git a/src/System.Threading.Channels/ref/System.Threading.Channels.cs b/src/System.Threading.Channels/ref/System.Threading.Channels.cs index 0bbeeb290534..9245598c7ec3 100644 --- a/src/System.Threading.Channels/ref/System.Threading.Channels.cs +++ b/src/System.Threading.Channels/ref/System.Threading.Channels.cs @@ -9,10 +9,10 @@ namespace System.Threading.Channels { public enum BoundedChannelFullMode { + Wait = 0, DropNewest = 1, DropOldest = 2, DropWrite = 3, - Wait = 0, } public sealed partial class BoundedChannelOptions : System.Threading.Channels.ChannelOptions { diff --git a/src/System.Threading.Tasks.Dataflow/ref/System.Threading.Tasks.Dataflow.cs b/src/System.Threading.Tasks.Dataflow/ref/System.Threading.Tasks.Dataflow.cs index 95635b1b9679..b8deb673f8a9 100644 --- a/src/System.Threading.Tasks.Dataflow/ref/System.Threading.Tasks.Dataflow.cs +++ b/src/System.Threading.Tasks.Dataflow/ref/System.Threading.Tasks.Dataflow.cs @@ -174,9 +174,9 @@ public enum DataflowMessageStatus { Accepted = 0, Declined = 1, - DecliningPermanently = 4, - NotAvailable = 3, Postponed = 2, + NotAvailable = 3, + DecliningPermanently = 4, } public partial class ExecutionDataflowBlockOptions : System.Threading.Tasks.Dataflow.DataflowBlockOptions { diff --git a/src/System.Threading.Thread/ref/System.Threading.Thread.cs b/src/System.Threading.Thread/ref/System.Threading.Thread.cs index 5b102f4bee78..86569df04b8b 100644 --- a/src/System.Threading.Thread/ref/System.Threading.Thread.cs +++ b/src/System.Threading.Thread/ref/System.Threading.Thread.cs @@ -17,8 +17,8 @@ namespace System.Threading { public enum ApartmentState { - MTA = 1, STA = 0, + MTA = 1, Unknown = 2, } public sealed partial class CompressedStack : System.Runtime.Serialization.ISerializable @@ -149,11 +149,11 @@ public ThreadInterruptedException(string message, System.Exception innerExceptio } public enum ThreadPriority { - AboveNormal = 3, - BelowNormal = 1, - Highest = 4, Lowest = 0, + BelowNormal = 1, Normal = 2, + AboveNormal = 3, + Highest = 4, } public delegate void ThreadStart(); public sealed partial class ThreadStartException : System.SystemException @@ -163,16 +163,16 @@ internal ThreadStartException() { } [System.FlagsAttribute] public enum ThreadState { - Aborted = 256, - AbortRequested = 128, - Background = 4, Running = 0, - Stopped = 16, StopRequested = 1, - Suspended = 64, SuspendRequested = 2, + Background = 4, Unstarted = 8, + Stopped = 16, WaitSleepJoin = 32, + Suspended = 64, + AbortRequested = 128, + Aborted = 256, } public partial class ThreadStateException : System.SystemException { diff --git a/src/System.Transactions.Local/ref/System.Transactions.Local.cs b/src/System.Transactions.Local/ref/System.Transactions.Local.cs index 65a287284e2a..0bfd26ef5b1d 100644 --- a/src/System.Transactions.Local/ref/System.Transactions.Local.cs +++ b/src/System.Transactions.Local/ref/System.Transactions.Local.cs @@ -38,14 +38,14 @@ public void Done() { } [System.FlagsAttribute] public enum EnlistmentOptions { - EnlistDuringPrepareRequired = 1, None = 0, + EnlistDuringPrepareRequired = 1, } public enum EnterpriseServicesInteropOption { + None = 0, Automatic = 1, Full = 2, - None = 0, } public delegate System.Transactions.Transaction HostCurrentTransactionCallback(); public partial interface IDtcTransaction @@ -77,12 +77,12 @@ public partial interface ISinglePhaseNotification : System.Transactions.IEnlistm } public enum IsolationLevel { - Chaos = 5, + Serializable = 0, + RepeatableRead = 1, ReadCommitted = 2, ReadUncommitted = 3, - RepeatableRead = 1, - Serializable = 0, Snapshot = 4, + Chaos = 5, Unspecified = 6, } public partial interface ITransactionPromoter @@ -238,8 +238,8 @@ public void Dispose() { } } public enum TransactionScopeAsyncFlowOption { - Enabled = 1, Suppress = 0, + Enabled = 1, } public enum TransactionScopeOption { @@ -250,9 +250,9 @@ public enum TransactionScopeOption public delegate void TransactionStartedEventHandler(object sender, System.Transactions.TransactionEventArgs e); public enum TransactionStatus { - Aborted = 2, Active = 0, Committed = 1, + Aborted = 2, InDoubt = 3, } } diff --git a/src/System.Windows.Extensions/ref/System.Windows.Extensions.cs b/src/System.Windows.Extensions/ref/System.Windows.Extensions.cs index 139696759e01..581a77931128 100644 --- a/src/System.Windows.Extensions/ref/System.Windows.Extensions.cs +++ b/src/System.Windows.Extensions/ref/System.Windows.Extensions.cs @@ -129,7 +129,7 @@ public static void DisplayCertificate(System.Security.Cryptography.X509Certifica } public enum X509SelectionFlag { - MultiSelection = 1, SingleSelection = 0, + MultiSelection = 1, } } diff --git a/src/System.Xml.ReaderWriter/ref/System.Xml.ReaderWriter.cs b/src/System.Xml.ReaderWriter/ref/System.Xml.ReaderWriter.cs index af47763aa1ff..6c474d760e5e 100644 --- a/src/System.Xml.ReaderWriter/ref/System.Xml.ReaderWriter.cs +++ b/src/System.Xml.ReaderWriter/ref/System.Xml.ReaderWriter.cs @@ -10,24 +10,24 @@ namespace System.Xml public enum ConformanceLevel { Auto = 0, - Document = 2, Fragment = 1, + Document = 2, } public enum DtdProcessing { + Prohibit = 0, Ignore = 1, Parse = 2, - Prohibit = 0, } public enum EntityHandling { - ExpandCharEntities = 2, ExpandEntities = 1, + ExpandCharEntities = 2, } public enum Formatting { - Indented = 1, None = 0, + Indented = 1, } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] [System.ObsoleteAttribute("This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.", true)] @@ -69,43 +69,43 @@ public NameTable() { } } public enum NewLineHandling { + Replace = 0, Entitize = 1, None = 2, - Replace = 0, } public enum ReadState { - Closed = 4, - EndOfFile = 3, - Error = 2, Initial = 0, Interactive = 1, + Error = 2, + EndOfFile = 3, + Closed = 4, } public enum ValidationType { + None = 0, [System.ObsoleteAttribute("Validation type should be specified as DTD or Schema.")] Auto = 1, DTD = 2, - None = 0, - Schema = 4, [System.ObsoleteAttribute("XDR Validation through XmlValidatingReader is obsoleted")] XDR = 3, + Schema = 4, } public enum WhitespaceHandling { All = 0, - None = 2, Significant = 1, + None = 2, } public enum WriteState { + Start = 0, + Prolog = 1, + Element = 2, Attribute = 3, - Closed = 5, Content = 4, - Element = 2, + Closed = 5, Error = 6, - Prolog = 1, - Start = 0, } public partial class XmlAttribute : System.Xml.XmlNode { @@ -268,9 +268,9 @@ public XmlConvert() { } public enum XmlDateTimeSerializationMode { Local = 0, - RoundtripKind = 3, - Unspecified = 2, Utc = 1, + Unspecified = 2, + RoundtripKind = 3, } public partial class XmlDeclaration : System.Xml.XmlLinkedNode { @@ -578,9 +578,9 @@ public virtual void RemoveAll() { } } public enum XmlNodeChangedAction { - Change = 2, Insert = 0, Remove = 1, + Change = 2, } public partial class XmlNodeChangedEventArgs : System.EventArgs { @@ -606,8 +606,8 @@ void System.IDisposable.Dispose() { } } public enum XmlNodeOrder { - After = 1, Before = 0, + After = 1, Same = 2, Unknown = 3, } @@ -661,23 +661,23 @@ public override void Skip() { } } public enum XmlNodeType { + None = 0, + Element = 1, Attribute = 2, + Text = 3, CDATA = 4, + EntityReference = 5, + Entity = 6, + ProcessingInstruction = 7, Comment = 8, Document = 9, - DocumentFragment = 11, DocumentType = 10, - Element = 1, - EndElement = 15, - EndEntity = 16, - Entity = 6, - EntityReference = 5, - None = 0, + DocumentFragment = 11, Notation = 12, - ProcessingInstruction = 7, - SignificantWhitespace = 14, - Text = 3, Whitespace = 13, + SignificantWhitespace = 14, + EndElement = 15, + EndEntity = 16, XmlDeclaration = 17, } public partial class XmlNotation : System.Xml.XmlNode @@ -697,10 +697,10 @@ public override void WriteTo(System.Xml.XmlWriter w) { } } public enum XmlOutputMethod { - AutoDetect = 3, + Xml = 0, Html = 1, Text = 2, - Xml = 0, + AutoDetect = 3, } public partial class XmlParserContext { @@ -958,8 +958,8 @@ public override void WriteTo(System.Xml.XmlWriter w) { } } public enum XmlSpace { - Default = 1, None = 0, + Default = 1, Preserve = 2, } public partial class XmlText : System.Xml.XmlCharacterData @@ -1103,18 +1103,18 @@ public override void WriteWhitespace(string ws) { } public enum XmlTokenizedType { CDATA = 0, - ENTITIES = 5, - ENTITY = 4, - ENUMERATION = 9, ID = 1, IDREF = 2, IDREFS = 3, - NCName = 11, + ENTITY = 4, + ENTITIES = 5, NMTOKEN = 6, NMTOKENS = 7, - None = 12, NOTATION = 8, + ENUMERATION = 9, QName = 10, + NCName = 11, + None = 12, } public partial class XmlUrlResolver : System.Xml.XmlResolver { @@ -1334,10 +1334,10 @@ namespace System.Xml.Resolvers [System.FlagsAttribute] public enum XmlKnownDtds { - All = 65535, None = 0, - Rss091 = 2, Xhtml10 = 1, + Rss091 = 2, + All = 65535, } public partial class XmlPreloadedResolver : System.Xml.XmlResolver { @@ -1708,21 +1708,21 @@ protected XmlSchemaContentModel() { } } public enum XmlSchemaContentProcessing { - [System.Xml.Serialization.XmlEnumAttribute("lax")] - Lax = 2, [System.Xml.Serialization.XmlIgnoreAttribute] None = 0, [System.Xml.Serialization.XmlEnumAttribute("skip")] Skip = 1, + [System.Xml.Serialization.XmlEnumAttribute("lax")] + Lax = 2, [System.Xml.Serialization.XmlEnumAttribute("strict")] Strict = 3, } public enum XmlSchemaContentType { - ElementOnly = 2, + TextOnly = 0, Empty = 1, + ElementOnly = 2, Mixed = 3, - TextOnly = 0, } public abstract partial class XmlSchemaDatatype { @@ -1745,22 +1745,22 @@ public enum XmlSchemaDatatypeVariety [System.FlagsAttribute] public enum XmlSchemaDerivationMethod { - [System.Xml.Serialization.XmlEnumAttribute("#all")] - All = 255, [System.Xml.Serialization.XmlEnumAttribute("")] Empty = 0, + [System.Xml.Serialization.XmlEnumAttribute("substitution")] + Substitution = 1, [System.Xml.Serialization.XmlEnumAttribute("extension")] Extension = 2, - [System.Xml.Serialization.XmlEnumAttribute("list")] - List = 8, - [System.Xml.Serialization.XmlIgnoreAttribute] - None = 256, [System.Xml.Serialization.XmlEnumAttribute("restriction")] Restriction = 4, - [System.Xml.Serialization.XmlEnumAttribute("substitution")] - Substitution = 1, + [System.Xml.Serialization.XmlEnumAttribute("list")] + List = 8, [System.Xml.Serialization.XmlEnumAttribute("union")] Union = 16, + [System.Xml.Serialization.XmlEnumAttribute("#all")] + All = 255, + [System.Xml.Serialization.XmlIgnoreAttribute] + None = 256, } public partial class XmlSchemaDocumentation : System.Xml.Schema.XmlSchemaObject { @@ -1938,8 +1938,8 @@ public XmlSchemaInference() { } public System.Xml.Schema.XmlSchemaSet InferSchema(System.Xml.XmlReader instanceDocument, System.Xml.Schema.XmlSchemaSet schemas) { throw null; } public enum InferenceOption { - Relaxed = 1, Restricted = 0, + Relaxed = 1, } } public partial class XmlSchemaInferenceException : System.Xml.Schema.XmlSchemaException @@ -2296,12 +2296,12 @@ protected internal void SetSourceObject(object sourceObject) { } [System.FlagsAttribute] public enum XmlSchemaValidationFlags { - AllowXmlAttributes = 16, None = 0, - ProcessIdentityConstraints = 8, ProcessInlineSchema = 1, ProcessSchemaLocation = 2, ReportValidationWarnings = 4, + ProcessIdentityConstraints = 8, + AllowXmlAttributes = 16, } public sealed partial class XmlSchemaValidator { @@ -2333,9 +2333,9 @@ public void ValidateWhitespace(System.Xml.Schema.XmlValueGetter elementValue) { } public enum XmlSchemaValidity { - Invalid = 2, NotKnown = 0, Valid = 1, + Invalid = 2, } public partial class XmlSchemaWhiteSpaceFacet : System.Xml.Schema.XmlSchemaFacet { @@ -2355,61 +2355,61 @@ public enum XmlSeverityType } public enum XmlTypeCode { - AnyAtomicType = 10, - AnyUri = 28, + None = 0, + Item = 1, + Node = 2, + Document = 3, + Element = 4, Attribute = 5, - Base64Binary = 27, - Boolean = 13, - Byte = 46, + Namespace = 6, + ProcessingInstruction = 7, Comment = 8, - Date = 20, - DateTime = 18, - DayTimeDuration = 54, + Text = 9, + AnyAtomicType = 10, + UntypedAtomic = 11, + String = 12, + Boolean = 13, Decimal = 14, - Document = 3, + Float = 15, Double = 16, Duration = 17, - Element = 4, - Entity = 39, - Float = 15, + DateTime = 18, + Time = 19, + Date = 20, + GYearMonth = 21, + GYear = 22, + GMonthDay = 23, GDay = 24, GMonth = 25, - GMonthDay = 23, - GYear = 22, - GYearMonth = 21, HexBinary = 26, - Id = 37, - Idref = 38, - Int = 44, - Integer = 40, - Item = 1, + Base64Binary = 27, + AnyUri = 28, + QName = 29, + Notation = 30, + NormalizedString = 31, + Token = 32, Language = 33, - Long = 43, + NmToken = 34, Name = 35, - Namespace = 6, NCName = 36, - NegativeInteger = 42, - NmToken = 34, - Node = 2, - None = 0, - NonNegativeInteger = 47, + Id = 37, + Idref = 38, + Entity = 39, + Integer = 40, NonPositiveInteger = 41, - NormalizedString = 31, - Notation = 30, - PositiveInteger = 52, - ProcessingInstruction = 7, - QName = 29, + NegativeInteger = 42, + Long = 43, + Int = 44, Short = 45, - String = 12, - Text = 9, - Time = 19, - Token = 32, - UnsignedByte = 51, - UnsignedInt = 49, + Byte = 46, + NonNegativeInteger = 47, UnsignedLong = 48, + UnsignedInt = 49, UnsignedShort = 50, - UntypedAtomic = 11, + UnsignedByte = 51, + PositiveInteger = 52, YearMonthDuration = 53, + DayTimeDuration = 54, } public delegate object XmlValueGetter(); } @@ -2525,14 +2525,14 @@ public partial interface IXPathNavigable } public enum XmlCaseOrder { - LowerFirst = 2, None = 0, UpperFirst = 1, + LowerFirst = 2, } public enum XmlDataType { - Number = 2, Text = 1, + Number = 2, } public enum XmlSortOrder { @@ -2707,26 +2707,26 @@ protected XPathNodeIterator() { } } public enum XPathNodeType { - All = 9, - Attribute = 2, - Comment = 8, + Root = 0, Element = 1, + Attribute = 2, Namespace = 3, - ProcessingInstruction = 7, - Root = 0, - SignificantWhitespace = 5, Text = 4, + SignificantWhitespace = 5, Whitespace = 6, + ProcessingInstruction = 7, + Comment = 8, + All = 9, } public enum XPathResultType { - Any = 5, - Boolean = 2, - Error = 6, - Navigator = 1, - NodeSet = 3, Number = 0, + Navigator = 1, String = 1, + Boolean = 2, + NodeSet = 3, + Any = 5, + Error = 6, } } namespace System.Xml.Xsl diff --git a/src/System.Xml.XDocument/ref/System.Xml.XDocument.cs b/src/System.Xml.XDocument/ref/System.Xml.XDocument.cs index 42cfcfb9f810..2e821559119b 100644 --- a/src/System.Xml.XDocument/ref/System.Xml.XDocument.cs +++ b/src/System.Xml.XDocument/ref/System.Xml.XDocument.cs @@ -45,8 +45,8 @@ public enum ReaderOptions [System.FlagsAttribute] public enum SaveOptions { - DisableFormatting = 1, None = 0, + DisableFormatting = 1, OmitDuplicateNamespaces = 2, } public partial class XAttribute : System.Xml.Linq.XObject @@ -433,8 +433,8 @@ public void RemoveAnnotations() where T : class { } public enum XObjectChange { Add = 0, - Name = 2, Remove = 1, + Name = 2, Value = 3, } public partial class XObjectChangeEventArgs : System.EventArgs diff --git a/src/System.Xml.XmlSerializer/ref/System.Xml.XmlSerializer.cs b/src/System.Xml.XmlSerializer/ref/System.Xml.XmlSerializer.cs index ad04fe40294b..2337cd646986 100644 --- a/src/System.Xml.XmlSerializer/ref/System.Xml.XmlSerializer.cs +++ b/src/System.Xml.XmlSerializer/ref/System.Xml.XmlSerializer.cs @@ -10,12 +10,12 @@ namespace System.Xml.Serialization [System.FlagsAttribute] public enum CodeGenerationOptions { - EnableDataBinding = 16, + None = 0, + GenerateProperties = 1, GenerateNewAsync = 2, GenerateOldAsync = 4, GenerateOrder = 8, - GenerateProperties = 1, - None = 0, + EnableDataBinding = 16, } public partial class CodeIdentifier { From f9c85c033361ee5bfcf43707dc6d29731f8bc3cb Mon Sep 17 00:00:00 2001 From: Carlos Sanchez Lopez <1175054+carlossanlop@users.noreply.github.com> Date: Tue, 23 Apr 2019 13:46:50 -0700 Subject: [PATCH 022/607] Directory.Move behaves differently on Unix vs. Windows (#37121) * Directory.Move behaves differently on Unix vs. Windows We will now throw an exception in Unix platforms like in Windows, if the destination path already exists. * Modifying ExistingDirectory test method that verifies Move overwrite so its called by all platforms. We already had a test method that tests Move when the destination path exists. I simply removed the platform attribute that restricted it to Windows and renamed the test method so its universal (as opposed to platform specific). --- src/System.IO.FileSystem/src/System/IO/FileSystem.Unix.cs | 7 +++++++ src/System.IO.FileSystem/tests/Directory/Move.cs | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/System.IO.FileSystem/src/System/IO/FileSystem.Unix.cs b/src/System.IO.FileSystem/src/System/IO/FileSystem.Unix.cs index 420a036b77eb..71fd1834765c 100644 --- a/src/System.IO.FileSystem/src/System/IO/FileSystem.Unix.cs +++ b/src/System.IO.FileSystem/src/System/IO/FileSystem.Unix.cs @@ -349,6 +349,13 @@ public static void MoveDirectory(string sourceFullPath, string destFullPath) destFullPath = PathInternal.TrimEndingDirectorySeparator(destFullPath); } + if (FileExists(destFullPath)) + { + // Some Unix distros will overwrite the destination file if it already exists. + // Throwing IOException to match Windows behavior. + throw new IOException(SR.Format(SR.IO_AlreadyExists_Name, destFullPath)); + } + if (Interop.Sys.Rename(sourceFullPath, destFullPath) < 0) { Interop.ErrorInfo errorInfo = Interop.Sys.GetLastErrorInfo(); diff --git a/src/System.IO.FileSystem/tests/Directory/Move.cs b/src/System.IO.FileSystem/tests/Directory/Move.cs index 1da296c1c3b3..4a0834744ece 100644 --- a/src/System.IO.FileSystem/tests/Directory/Move.cs +++ b/src/System.IO.FileSystem/tests/Directory/Move.cs @@ -315,8 +315,8 @@ public void UnixWhitespacePath() } [Fact] - [PlatformSpecific(TestPlatforms.Windows)] // Moving to existing directory causes IOException - public void WindowsExistingDirectory() + // Moving to existing directory causes IOException + public void ExistingDirectory() { DirectoryInfo testDir = Directory.CreateDirectory(GetTestFilePath()); string testDirSource = Path.Combine(testDir.FullName, GetTestFileName()); From 25fdedd999584a6e7765382b072c73eb9b1558ba Mon Sep 17 00:00:00 2001 From: Tarek Mahmoud Sayed Date: Tue, 23 Apr 2019 13:58:54 -0700 Subject: [PATCH 023/607] Fix failures caused by ICU regression (dotnet/coreclr#24190) Fixes https://github.com/dotnet/corefx/issues/37098 .NET Core depends on ICU when running on Linux/OSX. Recently some people raised some failure on the framework stack. After investigation we found a regression in ICU which is the root cause of this failure. The regression is, when calling ICU to get some date patterns/properties, in some cases ICU return error code U_MISSING_RESOURCE_ERROR. Although the framework code written to fallback to some invariant values at that time, but we had some wrong line of code which assumed we never fail and trying to access the returned value without checking. That cause the framework to throw NullReferenceException. The fix here is to make the framework resilient against such cases and continue to run nicely. I have contact ICU support members and I learned there is similar issue tracked in ICU repo https://unicode-org.atlassian.net/browse/ICU-20558 Signed-off-by: dotnet-bot --- .../src/CoreLib/System/Globalization/CalendarData.Unix.cs | 6 +++++- src/Common/src/CoreLib/System/Globalization/CalendarData.cs | 3 ++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/Common/src/CoreLib/System/Globalization/CalendarData.Unix.cs b/src/Common/src/CoreLib/System/Globalization/CalendarData.Unix.cs index 80e385376d05..a8c69f86e644 100644 --- a/src/Common/src/CoreLib/System/Globalization/CalendarData.Unix.cs +++ b/src/Common/src/CoreLib/System/Globalization/CalendarData.Unix.cs @@ -39,7 +39,11 @@ private bool LoadCalendarDataFromSystem(string localeName, CalendarId calendarId // TODO-NULLABLE: these can return null but are later replaced with String.Empty or other non-nullable value result &= GetCalendarInfo(localeName, calendarId, CalendarDataType.NativeName, out this.sNativeName!); result &= GetCalendarInfo(localeName, calendarId, CalendarDataType.MonthDay, out this.sMonthDay!); - this.sMonthDay = NormalizeDatePattern(this.sMonthDay); + + if (this.sMonthDay != null) + { + this.sMonthDay = NormalizeDatePattern(this.sMonthDay); + } result &= EnumDatePatterns(localeName, calendarId, CalendarDataType.ShortDates, out this.saShortDates!); result &= EnumDatePatterns(localeName, calendarId, CalendarDataType.LongDates, out this.saLongDates!); diff --git a/src/Common/src/CoreLib/System/Globalization/CalendarData.cs b/src/Common/src/CoreLib/System/Globalization/CalendarData.cs index 131dd6b31550..93ec643b6725 100644 --- a/src/Common/src/CoreLib/System/Globalization/CalendarData.cs +++ b/src/Common/src/CoreLib/System/Globalization/CalendarData.cs @@ -112,7 +112,8 @@ internal CalendarData(string localeName, CalendarId calendarId, bool bUseUserOve if (!LoadCalendarDataFromSystem(localeName, calendarId)) { - Debug.Fail("[CalendarData] LoadCalendarDataFromSystem call isn't expected to fail for calendar " + calendarId + " locale " + localeName); + // LoadCalendarDataFromSystem sometimes can fail on Linux if the installed ICU package is missing some resources. + // The ICU package can miss some resources in some cases like if someone compile and build the ICU package manually or ICU has a regression. // Something failed, try invariant for missing parts // This is really not good, but we don't want the callers to crash. From e13d1c997475e938f6e1eee8c3c73cd166033090 Mon Sep 17 00:00:00 2001 From: Jim <10913919+jimdemis@users.noreply.github.com> Date: Wed, 24 Apr 2019 00:29:19 +0300 Subject: [PATCH 024/607] Fixes an issue with some characters not recognized as ASCII (#36879) * Fixes an issue with some characters not recognized as ASCII Three characters "{","|" and "}" was being wrongfully marked as NonAscii, thus making IsWellFormedUriString function return false when combined with any other Unicode character(s). Fix #36101 * restored original solution file * Updated test Added "|" character to test string Removed not needed unicode string Added skip om Net Framework * Added more strings to test * Added comment and removed not needed check for escaping --- src/System.Private.Uri/src/System/Uri.cs | 6 ++- .../UriIsWellFormedUriStringTest.cs | 41 +++++++++++++++++++ 2 files changed, 46 insertions(+), 1 deletion(-) diff --git a/src/System.Private.Uri/src/System/Uri.cs b/src/System.Private.Uri/src/System/Uri.cs index c710f54c2ba0..5e7e22aa3672 100644 --- a/src/System.Private.Uri/src/System/Uri.cs +++ b/src/System.Private.Uri/src/System/Uri.cs @@ -4583,7 +4583,7 @@ private unsafe Check CheckCanonical(char* str, ref ushort idx, ushort end, char foundEscaping = true; res |= Check.ReservedFound; } - else if (c > 'z' && c != '~') + else if (c > '~') { if (_iriParsing) { @@ -4672,6 +4672,10 @@ private unsafe Check CheckCanonical(char* str, ref ushort idx, ushort end, char res |= Check.NotIriCanonical; } } + else if (c >= '{' && c <= '}') // includes '{', '|', '}' + { + needsEscaping = true; + } else if (c == '%') { if (!foundEscaping) foundEscaping = true; diff --git a/src/System.Private.Uri/tests/FunctionalTests/UriIsWellFormedUriStringTest.cs b/src/System.Private.Uri/tests/FunctionalTests/UriIsWellFormedUriStringTest.cs index 6087fa865e7c..8238436e754a 100644 --- a/src/System.Private.Uri/tests/FunctionalTests/UriIsWellFormedUriStringTest.cs +++ b/src/System.Private.Uri/tests/FunctionalTests/UriIsWellFormedUriStringTest.cs @@ -468,5 +468,46 @@ public static void TestIsWellFormedUriString(string uriString, bool expected) { Assert.Equal(expected, Uri.IsWellFormedUriString(uriString, UriKind.RelativeOrAbsolute)); } + + public static IEnumerable UriIsWellFormedUnwiseStringData => + new List + { + // escaped + new object[] { "https://www.contoso.com/?a=%7B%7C%7D&b=%E2%80%99", true }, + new object[] { "https://www.contoso.com/?a=%7B%7C%7D%E2%80%99", true }, + + // unescaped + new object[] { "https://www.contoso.com/?a=}", false }, + new object[] { "https://www.contoso.com/?a=|", false }, + new object[] { "https://www.contoso.com/?a={", false }, + + // not query + new object[] { "https://www.%7Bcontoso.com/", false }, + new object[] { "http%7Bs://www.contoso.com/", false }, + new object[] { "https://www.contoso.com%7B/", false }, + new object[] { "htt%7Cps://www.contoso.com/", false }, + new object[] { "https://www.con%7Ctoso.com/", false }, + new object[] { "https://www.contoso.com%7C/", false }, + new object[] { "htt%7Dps://www.contoso.com/", false }, + new object[] { "https://www.con%7Dtoso.com/", false }, + new object[] { "https://www.contoso.com%7D/", false }, + new object[] { "htt{ps://www.contoso.com/", false }, + new object[] { "https://www.con{toso.com/", false }, + new object[] { "https://www.contoso.com{/", false }, + new object[] { "htt|ps://www.contoso.com/", false }, + new object[] { "https://www.con|toso.com/", false }, + new object[] { "https://www.contoso.com|/", false }, + new object[] { "htt}ps://www.contoso.com/", false }, + new object[] { "https://www.con}toso.com/", false }, + new object[] { "https://www.contoso.com}/", false }, + }; + + [Theory] + [MemberData(nameof(UriIsWellFormedUnwiseStringData))] + [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] + public void UriIsWellFormed_AbsoluteUnicodeWithUnwise_Success(string uriString, bool expected) + { + Assert.Equal(expected, Uri.IsWellFormedUriString(uriString, UriKind.Absolute)); + } } } From 9e2f3b630a51875fc0455a7cabb8803f6527f81e Mon Sep 17 00:00:00 2001 From: Ludovic Henry Date: Tue, 23 Apr 2019 14:39:47 -0700 Subject: [PATCH 025/607] Make GC.GetGCMemoryInfo public (#37092) * Make GC.GetGCMemoryInfo public Fix https://github.com/dotnet/corefx/issues/34631 * Fix uapaot framework * Address review * Add some tests * Harden some tests * Merge the GCMemoryInfo tests * Simplify test We are in a remote process, no need to clean up the GCHandle at the end of the test --- src/System.Runtime/ref/System.Runtime.cs | 9 ++++ .../src/ApiCompatBaseline.uapaot.txt | 2 + .../tests/System/GCTests.netcoreapp.cs | 41 +++++++++++++++++++ 3 files changed, 52 insertions(+) diff --git a/src/System.Runtime/ref/System.Runtime.cs b/src/System.Runtime/ref/System.Runtime.cs index 8b4b2e4d09d9..2646e062652b 100644 --- a/src/System.Runtime/ref/System.Runtime.cs +++ b/src/System.Runtime/ref/System.Runtime.cs @@ -1270,6 +1270,7 @@ public static void Collect(int generation, System.GCCollectionMode mode, bool bl public static int CollectionCount(int generation) { throw null; } public static void EndNoGCRegion() { } public static long GetAllocatedBytesForCurrentThread() { throw null; } + public static GCMemoryInfo GetGCMemoryInfo() { throw null; } public static int GetGeneration(object obj) { throw null; } public static int GetGeneration(System.WeakReference wo) { throw null; } public static long GetTotalMemory(bool forceFullCollection) { throw null; } @@ -1288,6 +1289,14 @@ public static void SuppressFinalize(object obj) { } public static System.GCNotificationStatus WaitForFullGCComplete(int millisecondsTimeout) { throw null; } public static void WaitForPendingFinalizers() { } } + public readonly struct GCMemoryInfo + { + public long HighMemoryLoadThresholdBytes { get { throw null; } } + public long MemoryLoadBytes { get { throw null; } } + public long TotalAvailableMemoryBytes { get { throw null; } } + public long HeapSizeBytes { get { throw null; } } + public long FragmentedBytes { get { throw null; } } + } public enum GCCollectionMode { Default = 0, diff --git a/src/System.Runtime/src/ApiCompatBaseline.uapaot.txt b/src/System.Runtime/src/ApiCompatBaseline.uapaot.txt index 7e2b2e126637..5abd07bf1734 100644 --- a/src/System.Runtime/src/ApiCompatBaseline.uapaot.txt +++ b/src/System.Runtime/src/ApiCompatBaseline.uapaot.txt @@ -16,3 +16,5 @@ MembersMustExist : Member 'System.Range.GetOffsetAndLength(System.Int32)' does n TypesMustExist : Type 'System.Range.OffsetAndLength' does not exist in the implementation but it does exist in the contract. CannotRemoveBaseTypeOrInterface : Type 'System.Memory' does not implement interface 'System.IEquatable>' in the implementation but it does in the contract. CannotRemoveBaseTypeOrInterface : Type 'System.ReadOnlyMemory' does not implement interface 'System.IEquatable>' in the implementation but it does in the contract. +MembersMustExist : Member 'System.GC.GetGCMemoryInfo()' does not exist in the implementation but it does exist in the contract. +TypesMustExist : Type 'System.GCMemoryInfo' does not exist in the implementation but it does exist in the contract. diff --git a/src/System.Runtime/tests/System/GCTests.netcoreapp.cs b/src/System.Runtime/tests/System/GCTests.netcoreapp.cs index 4333cd67dda7..d01349369e40 100644 --- a/src/System.Runtime/tests/System/GCTests.netcoreapp.cs +++ b/src/System.Runtime/tests/System/GCTests.netcoreapp.cs @@ -3,6 +3,8 @@ // See the LICENSE file in the project root for more information. using System; +using System.Runtime.InteropServices; +using Microsoft.DotNet.RemoteExecutor; using Xunit; namespace System.Tests @@ -23,5 +25,44 @@ public static void GetAllocatedBytesForCurrentThread(int size) Assert.True((end - start) > size, $"Allocated too little: start: {start} end: {end} size: {size}"); Assert.True((end - start) < 5 * size, $"Allocated too much: start: {start} end: {end} size: {size}"); } + + [Fact] + public static void GetGCMemoryInfo() + { + RemoteExecutor.Invoke(() => + { + // Allows to update the value returned by GC.GetGCMemoryInfo + GC.Collect(); + + GCMemoryInfo memoryInfo1 = GC.GetGCMemoryInfo(); + + Assert.True(memoryInfo1.HighMemoryLoadThresholdBytes > 0); + Assert.True(memoryInfo1.MemoryLoadBytes > 0); + Assert.True(memoryInfo1.TotalAvailableMemoryBytes > 0); + Assert.True(memoryInfo1.HeapSizeBytes > 0); + Assert.True(memoryInfo1.FragmentedBytes >= 0); + + GCHandle[] gch = new GCHandle[64 * 1024]; + for (int i = 0; i < gch.Length * 2; ++i) + { + byte[] arr = new byte[64]; + if (i % 2 == 0) + { + gch[i / 2] = GCHandle.Alloc(arr, GCHandleType.Pinned); + } + } + + // Allows to update the value returned by GC.GetGCMemoryInfo + GC.Collect(); + + GCMemoryInfo memoryInfo2 = GC.GetGCMemoryInfo(); + + Assert.True(memoryInfo2.HighMemoryLoadThresholdBytes == memoryInfo1.HighMemoryLoadThresholdBytes); + Assert.True(memoryInfo2.MemoryLoadBytes >= memoryInfo1.MemoryLoadBytes); + Assert.True(memoryInfo2.TotalAvailableMemoryBytes == memoryInfo1.TotalAvailableMemoryBytes); + Assert.True(memoryInfo2.HeapSizeBytes > memoryInfo1.HeapSizeBytes); + Assert.True(memoryInfo2.FragmentedBytes > memoryInfo1.FragmentedBytes); + }).Dispose(); + } } } From 48cc70c649b7876ca43155451cafba5499107c07 Mon Sep 17 00:00:00 2001 From: Charles Stoner Date: Tue, 23 Apr 2019 18:11:11 -0700 Subject: [PATCH 026/607] Port remaining members of Microsoft.VisualBasic.Strings (#37123) --- .../ref/Microsoft.VisualBasic.Core.cs | 53 + .../src/Microsoft.VisualBasic.Core.vbproj | 1 + .../CompilerServices/ObjectType.vb | 2 +- .../src/Microsoft/VisualBasic/Constants.vb | 6 + .../src/Microsoft/VisualBasic/Globals.vb | 33 + .../Helpers/UnsafeNativeMethods.vb | 14 + .../src/Microsoft/VisualBasic/Strings.vb | 1597 ++++++++++++++++- .../tests/StringsTests.cs | 473 ++++- 8 files changed, 2176 insertions(+), 3 deletions(-) diff --git a/src/Microsoft.VisualBasic.Core/ref/Microsoft.VisualBasic.Core.cs b/src/Microsoft.VisualBasic.Core/ref/Microsoft.VisualBasic.Core.cs index 5d0293da820b..400868539ecc 100644 --- a/src/Microsoft.VisualBasic.Core/ref/Microsoft.VisualBasic.Core.cs +++ b/src/Microsoft.VisualBasic.Core/ref/Microsoft.VisualBasic.Core.cs @@ -69,6 +69,7 @@ internal Constants() { } public const Microsoft.VisualBasic.CompareMethod vbBinaryCompare = Microsoft.VisualBasic.CompareMethod.Binary; public const string vbCr = "\r"; public const string vbCrLf = "\r\n"; + public const TriState vbFalse = TriState.False; public const string vbFormFeed = "\f"; public const string vbLf = "\n"; [System.ObsoleteAttribute("For a carriage return and line feed, use vbCrLf. For the current platform's newline, use System.Environment.NewLine.")] @@ -77,6 +78,8 @@ internal Constants() { } public const string vbNullString = null; public const string vbTab = "\t"; public const Microsoft.VisualBasic.CompareMethod vbTextCompare = Microsoft.VisualBasic.CompareMethod.Text; + public const TriState vbTrue = TriState.True; + public const TriState vbUseDefault = TriState.UseDefault; public const string vbVerticalTab = "\v"; } public sealed partial class ControlChars @@ -153,6 +156,14 @@ internal DateAndTime() { } public static System.DateTime Now { get { throw null; } } public static System.DateTime Today { get { throw null; } } } + public enum DateFormat + { + GeneralDate = 0, + LongDate = 1, + LongTime = 3, + ShortDate = 2, + ShortTime = 4, + } public sealed partial class ErrObject { internal ErrObject() { } @@ -219,9 +230,19 @@ internal Strings() { } public static char ChrW(int CharCode) { throw null; } public static string[] Filter(object[] Source, string Match, bool Include = true, [Microsoft.VisualBasic.CompilerServices.OptionCompareAttribute]Microsoft.VisualBasic.CompareMethod Compare = Microsoft.VisualBasic.CompareMethod.Binary) { throw null; } public static string[] Filter(string[] Source, string Match, bool Include = true, [Microsoft.VisualBasic.CompilerServices.OptionCompareAttribute]Microsoft.VisualBasic.CompareMethod Compare = Microsoft.VisualBasic.CompareMethod.Binary) { throw null; } + public static string Format(object Expression, string Style = "") { throw null; } + public static string FormatCurrency(object Expression, int NumDigitsAfterDecimal = -1, TriState IncludeLeadingDigit = TriState.UseDefault, TriState UseParensForNegativeNumbers = TriState.UseDefault, TriState GroupDigits = TriState.UseDefault) { throw null; } + public static string FormatDateTime(System.DateTime Expression, DateFormat NamedFormat = DateFormat.GeneralDate) { throw null; } + public static string FormatNumber(object Expression, int NumDigitsAfterDecimal = -1, TriState IncludeLeadingDigit = TriState.UseDefault, TriState UseParensForNegativeNumbers = TriState.UseDefault, TriState GroupDigits = TriState.UseDefault) { throw null; } + public static string FormatPercent(object Expression, int NumDigitsAfterDecimal = -1, TriState IncludeLeadingDigit = TriState.UseDefault, TriState UseParensForNegativeNumbers = TriState.UseDefault, TriState GroupDigits = TriState.UseDefault) { throw null; } + public static char GetChar(string str, int Index) { throw null; } public static int InStr(int StartPos, string String1, string String2, [Microsoft.VisualBasic.CompilerServices.OptionCompareAttribute]Microsoft.VisualBasic.CompareMethod Compare = Microsoft.VisualBasic.CompareMethod.Binary) { throw null; } public static int InStr(string String1, string String2, [Microsoft.VisualBasic.CompilerServices.OptionCompareAttribute]Microsoft.VisualBasic.CompareMethod Compare = Microsoft.VisualBasic.CompareMethod.Binary) { throw null; } public static int InStrRev(string StringCheck, string StringMatch, int Start = -1, [Microsoft.VisualBasic.CompilerServices.OptionCompareAttribute]Microsoft.VisualBasic.CompareMethod Compare = Microsoft.VisualBasic.CompareMethod.Binary) { throw null; } + public static string Join(object[] SourceArray, string Delimiter = " ") { throw null; } + public static string Join(string[] SourceArray, string Delimiter = " ") { throw null; } + public static char LCase(char Value) { throw null; } + public static string LCase(string Value) { throw null; } public static string Left(string str, int Length) { throw null; } public static int Len(bool Expression) { throw null; } public static int Len(byte Expression) { throw null; } @@ -243,14 +264,31 @@ internal Strings() { } public static int Len(uint Expression) { throw null; } [System.CLSCompliantAttribute(false)] public static int Len(ulong Expression) { throw null; } + public static string LSet(string Source, int Length) { throw null; } public static string LTrim(string str) { throw null; } public static string Mid(string str, int Start) { throw null; } public static string Mid(string str, int Start, int Length) { throw null; } + public static string Replace(string Expression, string Find, string Replacement, int Start = 1, int Count = -1, [Microsoft.VisualBasic.CompilerServices.OptionCompareAttribute] CompareMethod Compare = CompareMethod.Binary) { throw null; } public static string Right(string str, int Length) { throw null; } + public static string RSet(string Source, int Length) { throw null; } public static string RTrim(string str) { throw null; } + public static string Space(int Number) { throw null; } + public static string[] Split(string Expression, string Delimiter = " ", int Limit = -1, [Microsoft.VisualBasic.CompilerServices.OptionCompareAttribute] CompareMethod Compare = CompareMethod.Binary) { throw null; } public static int StrComp(string String1, string String2, CompareMethod Compare = CompareMethod.Binary) { throw null; } + public static string StrConv(string str, Microsoft.VisualBasic.VbStrConv Conversion, int LocaleID = 0) { throw null; } + public static string StrDup(int Number, char Character) { throw null; } + public static object StrDup(int Number, object Character) { throw null; } + public static string StrDup(int Number, string Character) { throw null; } public static string StrReverse(string Expression) { throw null; } public static string Trim(string str) { throw null; } + public static char UCase(char Value) { throw null; } + public static string UCase(string Value) { throw null; } + } + public enum TriState + { + False = 0, + True = -1, + UseDefault = -2, } public enum VariantType { @@ -298,6 +336,21 @@ public static void Randomize(double Number) { } public static float Rnd() { throw null; } public static float Rnd(float Number) { throw null; } } + [System.FlagsAttribute] + public enum VbStrConv + { + Hiragana = 32, + Katakana = 16, + LinguisticCasing = 1024, + Lowercase = 2, + Narrow = 8, + None = 0, + ProperCase = 3, + SimplifiedChinese = 256, + TraditionalChinese = 512, + Uppercase = 1, + Wide = 4, + } } namespace Microsoft.VisualBasic.ApplicationServices { diff --git a/src/Microsoft.VisualBasic.Core/src/Microsoft.VisualBasic.Core.vbproj b/src/Microsoft.VisualBasic.Core/src/Microsoft.VisualBasic.Core.vbproj index 926d04c5bc9e..175eaa807c6a 100644 --- a/src/Microsoft.VisualBasic.Core/src/Microsoft.VisualBasic.Core.vbproj +++ b/src/Microsoft.VisualBasic.Core/src/Microsoft.VisualBasic.Core.vbproj @@ -10,6 +10,7 @@ Binary 42025 $(DefineConstants),LATEBINDING=True + $(DefineConstants),PLATFORM_WINDOWS=True Microsoft.VisualBasic.Core true false diff --git a/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/CompilerServices/ObjectType.vb b/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/CompilerServices/ObjectType.vb index f13747083f2d..2eaf92ab4d62 100644 --- a/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/CompilerServices/ObjectType.vb +++ b/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/CompilerServices/ObjectType.vb @@ -411,7 +411,7 @@ Namespace Microsoft.VisualBasic.CompilerServices ElseIf obj2 Is Nothing Then Return type1 Else - ' An ugly hack. If we do x + y and one of them is DBNull and one of them is String, + ' If we do x + y and one of them is DBNull and one of them is String, ' then we convert DBNull to "" and do concatenation. We communicate this by passing ' back TypeCode.DBNull If IsAdd AndAlso diff --git a/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/Constants.vb b/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/Constants.vb index ff16136d4ce8..13cbcbf152bd 100644 --- a/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/Constants.vb +++ b/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/Constants.vb @@ -20,5 +20,11 @@ Namespace Global.Microsoft.VisualBasic 'vbCompareMethod enum values Public Const vbBinaryCompare As CompareMethod = CompareMethod.Binary Public Const vbTextCompare As CompareMethod = CompareMethod.Text + + 'vbTriState + Public Const vbUseDefault As TriState = TriState.UseDefault + Public Const vbTrue As TriState = TriState.True + Public Const vbFalse As TriState = TriState.False + End Module End Namespace diff --git a/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/Globals.vb b/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/Globals.vb index 4a849111ae4d..506e7f8db96a 100644 --- a/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/Globals.vb +++ b/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/Globals.vb @@ -2,10 +2,43 @@ ' The .NET Foundation licenses this file to you under the MIT license. ' See the LICENSE file in the project root for more information. +Imports System + Namespace Global.Microsoft.VisualBasic + Public Enum CompareMethod [Binary] = 0 [Text] = 1 End Enum + Public Enum DateFormat + GeneralDate = 0 + LongDate = 1 + ShortDate = 2 + LongTime = 3 + ShortTime = 4 + End Enum + + Public Enum VbStrConv + [None] = 0 + [Uppercase] = 1 + [Lowercase] = 2 + [ProperCase] = 3 + [Wide] = 4 + [Narrow] = 8 + [Katakana] = 16 + [Hiragana] = 32 + '[Unicode] = 64 'OBSOLETE + '[FromUnicode] = 128 'OBSOLETE + [SimplifiedChinese] = 256 + [TraditionalChinese] = 512 + [LinguisticCasing] = 1024 + End Enum + + Public Enum TriState + [False] = 0 + [True] = -1 + [UseDefault] = -2 + End Enum + End Namespace diff --git a/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/Helpers/UnsafeNativeMethods.vb b/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/Helpers/UnsafeNativeMethods.vb index 41b8b59d8ef0..2717363a7320 100644 --- a/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/Helpers/UnsafeNativeMethods.vb +++ b/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/Helpers/UnsafeNativeMethods.vb @@ -4,11 +4,25 @@ Imports System Imports System.Runtime.InteropServices +Imports System.Runtime.Versioning Namespace Microsoft.VisualBasic.CompilerServices Friend NotInheritable Class UnsafeNativeMethods + + + + Friend Declare Ansi Function LCMapStringA _ + Lib "kernel32" Alias "LCMapStringA" (ByVal Locale As Integer, ByVal dwMapFlags As Integer, + ByVal lpSrcStr As Byte(), ByVal cchSrc As Integer, ByVal lpDestStr As Byte(), ByVal cchDest As Integer) As Integer + + + + Friend Declare Auto Function LCMapString _ + Lib "kernel32" (ByVal Locale As Integer, ByVal dwMapFlags As Integer, + ByVal lpSrcStr As String, ByVal cchSrc As Integer, ByVal lpDestStr As String, ByVal cchDest As Integer) As Integer + ''' ''' Frees memory allocated from the local heap. i.e. frees memory allocated ''' by LocalAlloc or LocalReAlloc.n diff --git a/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/Strings.vb b/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/Strings.vb index fb50cc1db872..b4ad704c51bc 100644 --- a/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/Strings.vb +++ b/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/Strings.vb @@ -4,6 +4,7 @@ Imports System Imports System.Globalization +Imports System.Runtime.Versioning Imports System.Text Imports Microsoft.VisualBasic.CompilerServices Imports Microsoft.VisualBasic.CompilerServices.ExceptionUtils @@ -11,13 +12,148 @@ Imports Microsoft.VisualBasic.CompilerServices.Utils Namespace Global.Microsoft.VisualBasic - Public Module Strings + Friend NotInheritable Class FormatInfoHolder + Implements IFormatProvider + + Friend Sub New(ByVal nfi As NumberFormatInfo) + MyBase.New() + Me.nfi = nfi + End Sub + + Private nfi As NumberFormatInfo + + Private Function GetFormat(ByVal service As Type) As Object Implements IFormatProvider.GetFormat + If service Is GetType(NumberFormatInfo) Then + Return nfi + End If + Throw New ArgumentException(GetResourceString(SR.InternalError_VisualBasicRuntime)) + End Function + End Class + + Public Module Strings + 'Positive format strings + '0 $n + '1 n$ + '2 $ n + '3 n $ + Private ReadOnly CurrencyPositiveFormatStrings() As String = {"'$'n", "n'$'", "'$' n", "n '$'"} 'Note, we wrap the $ in the literal symbol to avoid misinterpretation when using the escape character \ as a currency mark + + 'The negative currency pattern needs to be selected based + ' on the criteria provided for parens + 'nfi.CurrencyPositivePattern + 'Negative format strings + '0 ($n) + '1 -$n + '2 $-n + '3 $n- + '4 (n$) + '5 -n$ + '6 n-$ + '7 n$- + '8 -n $ + '9 -$ n + '10 n $- + '11 $ n- + '12 $- n + '13 n- $ + '14 ($ n) + '15 (n $) + Private ReadOnly CurrencyNegativeFormatStrings() As String = + {"('$'n)", "-'$'n", "'$'-n", "'$'n-", "(n'$')", "-n'$'", "n-'$'", "n'$'-", + "-n '$'", "-'$' n", "n '$'-", "'$' n-", "'$'- n", "n- '$'", "('$' n)", "(n '$')"} 'Note, we wrap the $ in the literal symbol to avoid misinterpretation when using the escape character \ as a currency mark + + 'Value Associated Pattern + '0 (n) + '1 -n + '2 - n + '3 n- + '4 n - + Private ReadOnly NumberNegativeFormatStrings() As String = + {"(n)", "-n", "- n", "n-", "n -"} + + Friend Enum FormatType + Number = 0 + Percent = 1 + [Currency] = 2 + End Enum + + Private Const CODEPAGE_SIMPLIFIED_CHINESE As Integer = 936 + Private Const CODEPAGE_TRADITIONAL_CHINESE As Integer = 950 Private Const STANDARD_COMPARE_FLAGS As CompareOptions = CompareOptions.IgnoreCase Or CompareOptions.IgnoreWidth Or CompareOptions.IgnoreKanaType + Private Const NAMEDFORMAT_FIXED As String = "fixed" + Private Const NAMEDFORMAT_YES_NO As String = "yes/no" + Private Const NAMEDFORMAT_ON_OFF As String = "on/off" + Private Const NAMEDFORMAT_PERCENT As String = "percent" + Private Const NAMEDFORMAT_STANDARD As String = "standard" + Private Const NAMEDFORMAT_CURRENCY As String = "currency" + Private Const NAMEDFORMAT_LONG_TIME As String = "long time" + Private Const NAMEDFORMAT_LONG_DATE As String = "long date" + Private Const NAMEDFORMAT_SCIENTIFIC As String = "scientific" + Private Const NAMEDFORMAT_TRUE_FALSE As String = "true/false" + Private Const NAMEDFORMAT_SHORT_TIME As String = "short time" + Private Const NAMEDFORMAT_SHORT_DATE As String = "short date" + Private Const NAMEDFORMAT_MEDIUM_DATE As String = "medium date" + Private Const NAMEDFORMAT_MEDIUM_TIME As String = "medium time" + Private Const NAMEDFORMAT_GENERAL_DATE As String = "general date" + Private Const NAMEDFORMAT_GENERAL_NUMBER As String = "general number" + Friend ReadOnly m_InvariantCompareInfo As CompareInfo = CultureInfo.InvariantCulture.CompareInfo + 'This is shared across Cached + Private m_SyncObject As Object = New Object + Private m_LastUsedYesNoCulture As CultureInfo + Private m_CachedYesNoFormatStyle As String + + Private ReadOnly Property CachedYesNoFormatStyle() As String + Get + Dim ci As CultureInfo = GetCultureInfo() + SyncLock m_SyncObject + If Not m_LastUsedYesNoCulture Is ci Then + m_LastUsedYesNoCulture = ci + m_CachedYesNoFormatStyle = GetResourceString(SR.YesNoFormatStyle) + End If + Return m_CachedYesNoFormatStyle + End SyncLock + End Get + End Property + + Private m_LastUsedOnOffCulture As CultureInfo + Private m_CachedOnOffFormatStyle As String + Private ReadOnly Property CachedOnOffFormatStyle() As String + Get + Dim ci As CultureInfo = GetCultureInfo() + SyncLock m_SyncObject + If Not m_LastUsedOnOffCulture Is ci Then + m_LastUsedOnOffCulture = ci + m_CachedOnOffFormatStyle = GetResourceString(SR.OnOffFormatStyle) + End If + Return m_CachedOnOffFormatStyle + End SyncLock + End Get + End Property + + Private m_LastUsedTrueFalseCulture As CultureInfo + Private m_CachedTrueFalseFormatStyle As String + Private ReadOnly Property CachedTrueFalseFormatStyle() As String + Get + Dim ci As CultureInfo = GetCultureInfo() + SyncLock m_SyncObject + If Not m_LastUsedTrueFalseCulture Is ci Then + m_LastUsedTrueFalseCulture = ci + m_CachedTrueFalseFormatStyle = GetResourceString(SR.TrueFalseFormatStyle) + End If + Return m_CachedTrueFalseFormatStyle + End SyncLock + End Get + End Property + + Private Function PRIMARYLANGID(ByVal lcid As Integer) As Integer + Return (lcid And &H3FF) + End Function + '============================================================================ ' Character manipulation functions. '============================================================================ @@ -336,6 +472,65 @@ EmptyMatchString: End Try End Function + Public Function Join(ByVal SourceArray() As Object, Optional ByVal Delimiter As String = " ") As String + Dim Size As Integer = UBound(SourceArray) + Dim StringSource(Size) As String + Dim i As Integer + + Try + For i = 0 To Size + StringSource(i) = CStr(SourceArray(i)) + Next i + Catch ex As StackOverflowException + Throw ex + Catch ex As OutOfMemoryException + Throw ex + Catch ex As System.Threading.ThreadAbortException + Throw ex + Catch + Throw New ArgumentException(GetResourceString(SR.Argument_InvalidValueType2, "SourceArray", "String")) + End Try + + Return Join(StringSource, Delimiter) + End Function + + Public Function Join(ByVal SourceArray() As String, Optional ByVal Delimiter As String = " ") As String + Try + If IsArrayEmpty(SourceArray) Then + 'EmptyArray returns empty string + Return Nothing + End If + + If SourceArray.Rank <> 1 Then + Throw New ArgumentException(GetResourceString(SR.Argument_RankEQOne1)) + End If + + Return System.String.Join(Delimiter, SourceArray) + Catch ex As Exception + Throw ex + End Try + End Function + + Public Function LCase(ByVal Value As String) As String + Try + If Value Is Nothing Then + Return Nothing + Else + Return Threading.Thread.CurrentThread.CurrentCulture.TextInfo.ToLower(Value) + End If + Catch ex As Exception + Throw ex + End Try + End Function + + Public Function LCase(ByVal Value As Char) As Char + Try + Return Threading.Thread.CurrentThread.CurrentCulture.TextInfo.ToLower(Value) + Catch ex As Exception + Throw ex + End Try + End Function + Public Function Len(ByVal Expression As Boolean) As Integer Return 2 End Function @@ -463,10 +658,348 @@ EmptyMatchString: Throw VbMakeException(vbErrors.TypeMismatch) End Function + Public Function Replace(ByVal Expression As String, ByVal Find As String, ByVal Replacement As String, Optional ByVal Start As Integer = 1, Optional ByVal Count As Integer = -1, Optional ByVal [Compare] As CompareMethod = CompareMethod.Binary) As String + Try + 'Validate Parameters + If Count < -1 Then + Throw New ArgumentException(GetResourceString(SR.Argument_GEMinusOne1, "Count")) + End If + + If Start <= 0 Then + Throw New ArgumentException(GetResourceString("Argument_GTZero1", "Start")) + End If + + If (Expression Is Nothing) OrElse (Start > Expression.Length) Then + Return Nothing + End If + + If Start <> 1 Then + Expression = Expression.Substring(Start - 1) + End If + + If Find Is Nothing Then + GoTo EmptyFindString + End If + + If Find.Length = 0 OrElse Count = 0 Then +EmptyFindString: + Return Expression + End If + + If Count = -1 Then + Count = Expression.Length + End If + + Return ReplaceInternal(Expression, Find, Replacement, Count, [Compare]) + + Catch ex As Exception + Throw ex + End Try + End Function + + Private Function ReplaceInternal(ByVal Expression As String, ByVal Find As String, ByVal Replacement As String, ByVal Count As Integer, ByVal [Compare] As CompareMethod) As String + + System.Diagnostics.Debug.Assert(Expression <> "", "Expression is empty") + System.Diagnostics.Debug.Assert(Find <> "", "Find is empty") + System.Diagnostics.Debug.Assert(Count > 0, "Number of replacements is 0 or less") + System.Diagnostics.Debug.Assert([Compare] = CompareMethod.Text Or [Compare] = CompareMethod.Binary, "Unknown compare.") + + Dim ExpressionLength As Integer = Expression.Length + Dim FindLength As Integer = Find.Length + + Dim Start As Integer + Dim FindLocation As Integer + Dim Replacements As Integer + + Dim Comparer As CompareInfo + Dim CompareFlags As CompareOptions + + Dim Builder As StringBuilder = New StringBuilder(ExpressionLength) + + If [Compare] = CompareMethod.Text Then + Comparer = GetCultureInfo().CompareInfo + CompareFlags = STANDARD_COMPARE_FLAGS + Else + Comparer = m_InvariantCompareInfo + CompareFlags = CompareOptions.Ordinal + End If + + 'We build the new string (with the replacements) by walking through Expression, searching for the + 'Find, and appending sections of Expression or Replacement as we go. For example, if + 'Expression = "This is a test.", Find = "is" and Replacement = "YYY" then we would append + '"Th" to the new string, then "YYY" then " " then "YYY" and finally " a test." + While Start < ExpressionLength + If Replacements = Count Then + 'We've made all the replacements the caller wanted so append the remaining string + Builder.Append(Expression.Substring(Start)) + Exit While + End If + + FindLocation = Comparer.IndexOf(Expression, Find, Start, CompareFlags) + If FindLocation < 0 Then + 'We didn't find the Find string append the rest of the string + Builder.Append(Expression.Substring(Start)) + Exit While + Else + 'Append to our string builder everything up to the found string, then + 'append the replacement + Builder.Append(Expression.Substring(Start, FindLocation - Start)) + Builder.Append(Replacement) + Replacements += 1 + + 'Move the start of our search past the string we just replaced + Start = FindLocation + FindLength + End If + End While + + Return Builder.ToString() + + End Function + + Public Function Space(ByVal Number As Integer) As String + + If Number >= 0 Then + Return New String(ChrW(32), Number) + End If + + Throw New ArgumentException(GetResourceString(SR.Argument_GEZero1, "Number")) + + End Function + + Public Function Split(ByVal Expression As String, Optional ByVal Delimiter As String = " ", Optional ByVal Limit As Integer = -1, Optional ByVal [Compare] As CompareMethod = CompareMethod.Binary) As String() + Try + 'Use String.Split + Dim aList() As String + Dim iDelLen As Integer + + If Expression Is Nothing Then + GoTo EmptyExpression + End If + + If Expression.Length = 0 Then +EmptyExpression: + ReDim aList(0) + aList(0) = "" + Return aList + End If + + If Limit = -1 Then + Limit = Expression.Length + 1 + End If + + If Delimiter Is Nothing Then + iDelLen = 0 + Else + iDelLen = Delimiter.Length + End If + + If iDelLen = 0 Then +EmptyDelimiterString: + ReDim aList(0) + aList(0) = Expression + Return aList + End If + + 'Not handled: LIGATURE expansion + Return SplitHelper(Expression, Delimiter, Limit, [Compare]) + Catch ex As Exception + Throw ex + End Try + End Function + + Private Function SplitHelper(ByVal sSrc As String, ByVal sFind As String, ByVal cMaxSubStrings As Integer, ByVal [Compare] As Integer) As String() + Dim cSubStrings As Integer + Dim iIndex As Integer + Dim iFindLen As Integer + Dim iSrcLen As Integer + Dim asSubstrings() As String + Dim sSubString As String + Dim iLastIndex As Integer + Dim cDelimPosMax As Integer + Dim cmpInfo As CompareInfo + Dim flags As CompareOptions + + If sFind Is Nothing Then + iFindLen = 0 + Else + iFindLen = sFind.Length + End If + + If sSrc Is Nothing Then + iSrcLen = 0 + Else + iSrcLen = sSrc.Length + End If + + If iFindLen = 0 Then + ReDim asSubstrings(0) + asSubstrings(0) = sSrc + Return asSubstrings + End If + + If iSrcLen = 0 Then + ReDim asSubstrings(0) + asSubstrings(0) = sSrc + Return asSubstrings + End If + + cDelimPosMax = 20 + + If cDelimPosMax > cMaxSubStrings Then + cDelimPosMax = cMaxSubStrings + End If + + ReDim asSubstrings(cDelimPosMax) + + If [Compare] = CompareMethod.Binary Then + flags = CompareOptions.Ordinal + cmpInfo = m_InvariantCompareInfo + Else + cmpInfo = GetCultureInfo().CompareInfo + flags = STANDARD_COMPARE_FLAGS + End If + + Do While (iLastIndex < iSrcLen) + iIndex = cmpInfo.IndexOf(sSrc, sFind, iLastIndex, iSrcLen - iLastIndex, flags) + + If (iIndex = -1) OrElse (cSubStrings + 1 = cMaxSubStrings) Then + 'Just put the remainder of the string in the next element + sSubString = sSrc.Substring(iLastIndex) + If sSubString Is Nothing Then + sSubString = "" + End If + asSubstrings(cSubStrings) = sSubString + Exit Do + Else + 'Put the characters between iLastIndex and iIndex into the next element + sSubString = sSrc.Substring(iLastIndex, iIndex - iLastIndex) + If sSubString Is Nothing Then + sSubString = "" + End If + asSubstrings(cSubStrings) = sSubString + iLastIndex = iIndex + iFindLen + End If + + cSubStrings += 1 + + If (cSubStrings > cDelimPosMax) Then + cDelimPosMax += 20 + If cDelimPosMax > cMaxSubStrings Then + cDelimPosMax = cMaxSubStrings + 1 + End If + ReDim Preserve asSubstrings(cDelimPosMax) + End If + + 'Must Initialize to empty string, otherwise it looks like an object + asSubstrings(cSubStrings) = "" + + If cSubStrings = cMaxSubStrings Then + sSubString = sSrc.Substring(iLastIndex) + If sSubString Is Nothing Then + sSubString = "" + End If + asSubstrings(cSubStrings) = sSubString + Exit Do + End If + Loop + +RedimAndExit: + If cSubStrings + 1 = asSubstrings.Length Then + Return asSubstrings + End If + + ReDim Preserve asSubstrings(cSubStrings) + Return asSubstrings + End Function + '============================================================================ ' Fixed-length string functions. '============================================================================ + Public Function LSet(ByVal Source As String, ByVal Length As Integer) As String + If (Length = 0) Then + Return "" + ElseIf (Source Is Nothing) Then + Return New String(" "c, Length) + End If + + If Length > Source.Length Then + Return Source.PadRight(Length) + Else + Return Source.Substring(0, Length) + End If + End Function + + Public Function RSet(ByVal Source As String, ByVal Length As Integer) As String + If (Length = 0) Then + Return "" + ElseIf Source Is Nothing Then + Return New String(" "c, Length) + End If + + If Length > Source.Length Then + Return Source.PadLeft(Length) + Else + Return Source.Substring(0, Length) + End If + End Function + + Public Function StrDup(ByVal Number As Integer, ByVal Character As Object) As Object + Dim s As String + Dim SingleChar As Char + + If Number < 0 Then + Throw New ArgumentException(GetResourceString(SR.Argument_InvalidValue1, "Number")) + End If + + If Character Is Nothing Then + Throw New ArgumentNullException(GetResourceString(SR.Argument_InvalidNullValue1, "Character")) + End If + + s = TryCast(Character, String) + + If s IsNot Nothing Then + If s.Length = 0 Then + Throw New ArgumentException(GetResourceString(SR.Argument_LengthGTZero1, "Character")) + End If + SingleChar = s.Chars(0) + Else + Try + SingleChar = CChar(Character) + Catch ex As StackOverflowException + Throw ex + Catch ex As OutOfMemoryException + Throw ex + Catch ex As System.Threading.ThreadAbortException + Throw ex + Catch + Throw New ArgumentException(GetResourceString(SR.Argument_InvalidValue1, "Character")) + End Try + End If + + Return New String(SingleChar, Number) + End Function + + Public Function StrDup(ByVal Number As Integer, ByVal Character As Char) As String + If Number < 0 Then + Throw New ArgumentException(GetResourceString(SR.Argument_GEZero1, "Number")) + End If + + Return New String(Character, Number) + End Function + + Public Function StrDup(ByVal Number As Integer, ByVal Character As String) As String + If Number < 0 Then + Throw New ArgumentException(GetResourceString(SR.Argument_GEZero1, "Number")) + End If + + If Character Is Nothing OrElse Character.Length = 0 Then + Throw New ArgumentException(GetResourceString(SR.Argument_LengthGTZero1, "Character")) + End If + + Return New String(Character.Chars(0), Number) + End Function + Public Function StrReverse(ByVal Expression As String) As String If (Expression Is Nothing) Then @@ -558,6 +1091,802 @@ EmptyMatchString: End Function + Public Function UCase(ByVal [Value] As String) As String + Try + If Value Is Nothing Then + Return "" + Else + Return Threading.Thread.CurrentThread.CurrentCulture.TextInfo.ToUpper(Value) + End If + Catch ex As Exception + Throw ex + End Try + End Function + + Public Function UCase(ByVal Value As Char) As Char + Try + Return Threading.Thread.CurrentThread.CurrentCulture.TextInfo.ToUpper(Value) + Catch ex As Exception + Throw ex + End Try + End Function + + '************************************************************* + '** PERF NOTE: + '** All Format calls must go through FormatNamed + '** But we don't want to put a bunch of overhead on the more + '** common cases that are not named formats + '** The expensive CompareInfo.Compare calls have been limited + '** just one call + '************************************************************** + + Private Function FormatNamed(ByVal Expression As Object, ByVal Style As String, ByRef ReturnValue As String) As Boolean + Dim StyleLength As Integer = Style.Length + + ReturnValue = Nothing + + Select Case StyleLength + + Case 5 + Select Case Style.Chars(0) + '(F)ixed + Case "f"c, "F"c + If String.Compare(Style, NAMEDFORMAT_FIXED, StringComparison.OrdinalIgnoreCase) = 0 Then + ReturnValue = CDbl(Expression).ToString("0.00", Nothing) + Return True + End If + End Select + + Case 6 + 'switch off 1st char (index 0) to reduce number of string compares + '(Y)es/no + '(O)n/off + Select Case Style.Chars(0) + Case "y"c, "Y"c + If String.Compare(Style, NAMEDFORMAT_YES_NO, StringComparison.OrdinalIgnoreCase) = 0 Then + ReturnValue = CInt(CBool(Expression)).ToString(CachedYesNoFormatStyle, Nothing) + Return True + End If + + Case "o"c, "O"c + If String.Compare(Style, NAMEDFORMAT_ON_OFF, StringComparison.OrdinalIgnoreCase) = 0 Then + ReturnValue = CInt(CBool(Expression)).ToString(CachedOnOffFormatStyle, Nothing) + Return True + End If + End Select + + Case 7 + 'switch off 1st char (index 0) to reduce number of string compares + '(P)ercent + Select Case Style.Chars(0) + Case "p"c, "P"c + If String.Compare(Style, NAMEDFORMAT_PERCENT, StringComparison.OrdinalIgnoreCase) = 0 Then + ReturnValue = CDbl(Expression).ToString("0.00%", Nothing) + Return True + End If + End Select + + Case 8 + 'switch off 6th char (index 5) to reduce number of string compares + '(S)tandard + '(C)urrency + + Select Case Style.Chars(0) + Case "s"c, "S"c + If String.Compare(Style, NAMEDFORMAT_STANDARD, StringComparison.OrdinalIgnoreCase) = 0 Then + ReturnValue = CDbl(Expression).ToString("N2", Nothing) + Return True + End If + Case "c"c, "C"c + If String.Compare(Style, NAMEDFORMAT_CURRENCY, StringComparison.OrdinalIgnoreCase) = 0 Then + ReturnValue = CDbl(Expression).ToString("C", Nothing) + Return True + End If + End Select + + Case 9 + 'switch off 6th char (index 5) to reduce number of string compares + 'Long (T)ime + 'Long (D)ate + + Select Case Style.Chars(5) + Case "t"c, "T"c + If String.Compare(Style, NAMEDFORMAT_LONG_TIME, StringComparison.OrdinalIgnoreCase) = 0 Then + ReturnValue = CDate(Expression).ToString("T", Nothing) + Return True + End If + + Case "d"c, "D"c + If String.Compare(Style, NAMEDFORMAT_LONG_DATE, StringComparison.OrdinalIgnoreCase) = 0 Then + ReturnValue = CDate(Expression).ToString("D", Nothing) + Return True + End If + End Select + + Case 10 + 'switch off 7th char (index 6) to reduce number of string compares + 'true/f(A)lse + 'short (T)ime + 'short (D)ate + 'scient(I)fic + + Select Case Style.Chars(6) + Case "a"c, "A"c + If String.Compare(Style, NAMEDFORMAT_TRUE_FALSE, StringComparison.OrdinalIgnoreCase) = 0 Then + ReturnValue = CInt(CBool(Expression)).ToString(CachedTrueFalseFormatStyle, Nothing) + Return True + End If + + Case "t"c, "T"c + If String.Compare(Style, NAMEDFORMAT_SHORT_TIME, StringComparison.OrdinalIgnoreCase) = 0 Then + ReturnValue = CDate(Expression).ToString("t", Nothing) + Return True + End If + + Case "d"c, "D"c + If String.Compare(Style, NAMEDFORMAT_SHORT_DATE, StringComparison.OrdinalIgnoreCase) = 0 Then + ReturnValue = CDate(Expression).ToString("d", Nothing) + Return True + End If + + Case "i"c, "I"c + If String.Compare(Style, NAMEDFORMAT_SCIENTIFIC, StringComparison.OrdinalIgnoreCase) = 0 Then + Dim dbl As Double + dbl = CDbl(Expression) + If System.Double.IsNaN(dbl) OrElse System.Double.IsInfinity(dbl) Then + ReturnValue = dbl.ToString("G", Nothing) + Else + ReturnValue = dbl.ToString("0.00E+00", Nothing) + End If + Return True + End If + + End Select + + Case 11 + 'switch off 8th char (index 7) to reduce number of string compares + 'medium (T)ime + 'medium (D)ate + + Select Case Style.Chars(7) + Case "t"c, "T"c + If String.Compare(Style, NAMEDFORMAT_MEDIUM_TIME, StringComparison.OrdinalIgnoreCase) = 0 Then + ReturnValue = CDate(Expression).ToString("T", Nothing) + Return True + End If + + Case "d"c, "D"c + If String.Compare(Style, NAMEDFORMAT_MEDIUM_DATE, StringComparison.OrdinalIgnoreCase) = 0 Then + ReturnValue = CDate(Expression).ToString("D", Nothing) + Return True + End If + End Select + + Case 12 + Select Case Style.Chars(0) + Case "g"c, "G"c + If String.Compare(Style, NAMEDFORMAT_GENERAL_DATE, StringComparison.OrdinalIgnoreCase) = 0 Then + ReturnValue = CDate(Expression).ToString("G", Nothing) + Return True + End If + End Select + + Case 14 + Select Case Style.Chars(0) + Case "g"c, "G"c + If String.Compare(Style, NAMEDFORMAT_GENERAL_NUMBER, StringComparison.OrdinalIgnoreCase) = 0 Then + ReturnValue = CDbl(Expression).ToString("G", Nothing) + Return True + End If + End Select + + End Select + + Return False + + End Function + + '============================================================================ + ' Format functions. + '============================================================================ + Public Function Format(ByVal Expression As Object, Optional ByVal Style As String = "") As String + Try + Dim cp As IFormatProvider = Nothing 'GetCultureInfo() + Dim tc As TypeCode + Dim iformat As IFormattable = Nothing + + If (Expression Is Nothing) OrElse (Expression.GetType() Is Nothing) Then + Return "" + End If + + If Style Is Nothing OrElse Style.Length = 0 Then + Return CStr(Expression) + End If + + Dim ConvertibleExpression As IConvertible = CType(Expression, IConvertible) + tc = ConvertibleExpression.GetTypeCode() + + If Style.Length > 0 Then + Try + Dim ReturnValue As String = Nothing + + If FormatNamed(Expression, Style, ReturnValue) Then + Return ReturnValue + End If + Catch ex As StackOverflowException + Throw ex + Catch ex As OutOfMemoryException + Throw ex + Catch ex As System.Threading.ThreadAbortException + Throw ex + Catch + 'Object could not be converted to required type + 'so just return the string + Return CStr(Expression) + End Try + End If + + iformat = TryCast(Expression, IFormattable) + + If iformat Is Nothing Then + tc = System.Convert.GetTypeCode(Expression) + If tc <> TypeCode.String AndAlso tc <> TypeCode.Boolean Then + Throw New ArgumentException(GetResourceString(SR.Argument_InvalidValue1, "Expression")) + End If + End If + + Select Case tc + Case TypeCode.Boolean + Return System.String.Format(cp, Style, CStr(ConvertibleExpression.ToBoolean(Nothing))) + Case TypeCode.SByte, + TypeCode.Byte, + TypeCode.Int16, + TypeCode.UInt16, + TypeCode.Int32, + TypeCode.UInt32, + TypeCode.Int64, + TypeCode.UInt64, + TypeCode.Decimal, + TypeCode.DateTime, + TypeCode.Char, + TypeCode.Object + Return iformat.ToString(Style, cp) + Case TypeCode.DBNull + Return "" + Case TypeCode.Double + Dim dbl As Double + + dbl = ConvertibleExpression.ToDouble(Nothing) + + If Style Is Nothing OrElse Style.Length = 0 Then + Return CStr(dbl) + End If + + If dbl = 0 Then + 'Used to get rid of possible negative zero, + 'which will format as -0 + dbl = 0 + End If + Return dbl.ToString(Style, cp) + Case TypeCode.Empty + Return "" + Case TypeCode.Single + Dim sng As Single + + sng = ConvertibleExpression.ToSingle(Nothing) + + If Style Is Nothing OrElse Style.Length = 0 Then + Return CStr(sng) + End If + + If sng = 0 Then + 'Used to get rid of possible negative zero + sng = 0 + End If + + Return sng.ToString(Style, cp) + Case TypeCode.String + Return System.String.Format(cp, Style, Expression) + Case Else + Return iformat.ToString(Style, cp) + End Select + Catch ex As Exception + Throw ex + End Try + End Function + + Public Function FormatCurrency(ByVal Expression As Object, + Optional ByVal NumDigitsAfterDecimal As Integer = -1, + Optional ByVal IncludeLeadingDigit As TriState = TriState.UseDefault, + Optional ByVal UseParensForNegativeNumbers As TriState = TriState.UseDefault, + Optional ByVal GroupDigits As TriState = TriState.UseDefault) As String + + Dim ifmt As IFormattable + Dim typ As Type + Dim fp As IFormatProvider = Nothing + Dim dbl As Double + + Try + ValidateTriState(IncludeLeadingDigit) + ValidateTriState(UseParensForNegativeNumbers) + ValidateTriState(GroupDigits) + + If NumDigitsAfterDecimal > 99 Then 'Was 255 in VB6, but System.Globalization.NumberFormatInfo.CurrencyDecimalDigits limits this to 99. + Throw New ArgumentException(GetResourceString(SR.Argument_Range0to99_1, "NumDigitsAfterDecimal")) + End If + + If Expression Is Nothing Then + Return "" + End If + + typ = Expression.GetType() + + If typ Is GetType(System.String) Then + Expression = CDbl(Expression) + ElseIf Not Symbols.IsNumericType(typ) Then + Throw New InvalidCastException(GetResourceString(SR.InvalidCast_FromTo, VBFriendlyName(typ), "Currency")) + End If + + ifmt = CType(Expression, IFormattable) + + Dim FormatStyle As String + If IncludeLeadingDigit = TriState.False Then + dbl = CDbl(Expression) + If dbl >= 1 OrElse dbl <= -1 Then + ' If leading digit doesn't matter, this avoids + ' going through the overhead of creating a format string + IncludeLeadingDigit = TriState.True + End If + End If + FormatStyle = GetCurrencyFormatString(IncludeLeadingDigit, NumDigitsAfterDecimal, UseParensForNegativeNumbers, GroupDigits, fp) + + Return ifmt.ToString(FormatStyle, fp) + + Catch ex As Exception + Throw ex + End Try + End Function + + Public Function FormatDateTime(ByVal Expression As DateTime, Optional ByVal NamedFormat As DateFormat = DateFormat.GeneralDate) As String + Dim sFormat As String + + Try + Select Case NamedFormat + Case DateFormat.LongDate + sFormat = "D" + Case DateFormat.ShortDate + sFormat = "d" + Case DateFormat.LongTime + sFormat = "T" + Case DateFormat.ShortTime + sFormat = "HH:mm" + Case DateFormat.GeneralDate + If Expression.TimeOfDay.Ticks = Expression.Ticks Then + 'Date is 1/1/0001 - don't print date part + 'Same as LongTime + sFormat = "T" + ElseIf Expression.TimeOfDay.Ticks = 0 Then + '12AM - don't print time part + 'Same as ShortDate + sFormat = "d" + Else + 'Short date + Long Time + sFormat = "G" + End If + Case Else + Throw VbMakeException(vbErrors.IllegalFuncCall) + End Select + + Return Expression.ToString(sFormat, Nothing) + Catch ex As Exception + Throw ex + End Try + End Function + + Public Function FormatNumber(ByVal Expression As Object, Optional ByVal NumDigitsAfterDecimal As Integer = -1, Optional ByVal IncludeLeadingDigit As TriState = TriState.UseDefault, Optional ByVal UseParensForNegativeNumbers As TriState = TriState.UseDefault, Optional ByVal GroupDigits As TriState = TriState.UseDefault) As String + Dim ifmt As IFormattable + Dim typ As Type + + Try + ValidateTriState(IncludeLeadingDigit) + ValidateTriState(UseParensForNegativeNumbers) + ValidateTriState(GroupDigits) + + If Expression Is Nothing Then + Return "" + End If + + typ = Expression.GetType() + + If typ Is GetType(System.String) Then + Expression = CDbl(Expression) + ElseIf typ Is GetType(System.Boolean) Then + If CBool(Expression) Then + Expression = -1.0 + Else + Expression = 0.0 + End If + ElseIf Not Symbols.IsNumericType(typ) Then + Throw New InvalidCastException(GetResourceString(SR.InvalidCast_FromTo, VBFriendlyName(typ), "Currency")) + End If + + ifmt = CType(Expression, IFormattable) + + Return ifmt.ToString(GetNumberFormatString(NumDigitsAfterDecimal, IncludeLeadingDigit, + UseParensForNegativeNumbers, GroupDigits), Nothing) + Catch ex As Exception + Throw ex + End Try + End Function + + Friend Function GetFormatString(ByVal NumDigitsAfterDecimal As Integer, + ByVal IncludeLeadingDigit As TriState, ByVal UseParensForNegativeNumbers As TriState, + ByVal GroupDigits As TriState, ByVal FormatTypeValue As FormatType) As String + + Dim nfi As NumberFormatInfo + Dim sb As StringBuilder + Dim sGroup As String + Dim sLeadDigit As String + Dim sDigitsAfterDecimal As String + Dim ci As CultureInfo + + sb = New StringBuilder(30) + + ci = GetCultureInfo() + nfi = CType(ci.GetFormat(GetType(System.Globalization.NumberFormatInfo)), NumberFormatInfo) + + If NumDigitsAfterDecimal < -1 Then + Throw VbMakeException(vbErrors.IllegalFuncCall) + ElseIf NumDigitsAfterDecimal = -1 Then + If FormatTypeValue = FormatType.Percent Then + 'NOTE: We use NumberDecimalDigits, which is set in the + ' control panel for VB6 compatibility + ' The urt does not use this setting, but makes a default + ' of their own. + NumDigitsAfterDecimal = nfi.NumberDecimalDigits + ElseIf FormatTypeValue = FormatType.Number Then + NumDigitsAfterDecimal = nfi.NumberDecimalDigits + ElseIf FormatTypeValue = FormatType.Currency Then + NumDigitsAfterDecimal = nfi.CurrencyDecimalDigits + End If + End If + + If GroupDigits = TriState.UseDefault Then + GroupDigits = TriState.True + If FormatTypeValue = FormatType.Percent Then + If IsArrayEmpty(nfi.PercentGroupSizes) Then + GroupDigits = TriState.False + End If + ElseIf FormatTypeValue = FormatType.Number Then + If IsArrayEmpty(nfi.NumberGroupSizes) Then + GroupDigits = TriState.False + End If + ElseIf FormatTypeValue = FormatType.Currency Then + If IsArrayEmpty(nfi.CurrencyGroupSizes) Then + GroupDigits = TriState.False + End If + End If + End If + + If UseParensForNegativeNumbers = TriState.UseDefault Then + UseParensForNegativeNumbers = TriState.False + 'If FormatTypeValue = FormatType.Percent Then + ' If nfi.PercentNegativePattern = 0 Then + ' UseParensForNegativeNumbers = TriState.True + ' End If + 'Else + + If FormatTypeValue = FormatType.Number Then + If nfi.NumberNegativePattern = 0 Then + UseParensForNegativeNumbers = TriState.True + End If + ElseIf FormatTypeValue = FormatType.Currency Then + If nfi.CurrencyNegativePattern = 0 Then + UseParensForNegativeNumbers = TriState.True + End If + End If + End If + + If GroupDigits = TriState.True Then + sGroup = "#,##" + Else + sGroup = "" + End If + + If IncludeLeadingDigit <> TriState.False Then + sLeadDigit = "0" + Else + sLeadDigit = "#" + End If + + If NumDigitsAfterDecimal > 0 Then + sDigitsAfterDecimal = "." & (New System.String("0"c, NumDigitsAfterDecimal)) + Else + sDigitsAfterDecimal = "" + End If + + 'Now put together the string + If FormatTypeValue = FormatType.Currency Then + sb.Append(nfi.CurrencySymbol) + End If + + sb.Append(sGroup) + sb.Append(sLeadDigit) + sb.Append(sDigitsAfterDecimal) + + If FormatTypeValue = FormatType.Percent Then + sb.Append(nfi.PercentSymbol) + End If + + If UseParensForNegativeNumbers = TriState.True Then + Dim sTmp As String + sTmp = sb.ToString() + sb.Append(";(") + sb.Append(sTmp) + sb.Append(")") + End If + + Return sb.ToString() + End Function + + Friend Function GetCurrencyFormatString( + ByVal IncludeLeadingDigit As TriState, + ByVal NumDigitsAfterDecimal As Integer, + ByVal UseParensForNegativeNumbers As TriState, + ByVal GroupDigits As TriState, + ByRef formatProvider As IFormatProvider) As String + + Dim nfi As NumberFormatInfo + Dim ci As CultureInfo + Dim CurrencyNegativePattern, CurrencyPositivePattern As Integer + Dim FormatString, NumberFormat As String + + GetCurrencyFormatString = "C" + + ci = GetCultureInfo() + nfi = CType(ci.GetFormat(GetType(System.Globalization.NumberFormatInfo)), NumberFormatInfo) + nfi = CType(nfi.Clone(), NumberFormatInfo) + + If GroupDigits = TriState.False Then + nfi.CurrencyGroupSizes = New Int32() {0} + End If + + CurrencyPositivePattern = nfi.CurrencyPositivePattern + CurrencyNegativePattern = nfi.CurrencyNegativePattern + + If UseParensForNegativeNumbers = TriState.UseDefault Then + + Select Case CurrencyNegativePattern + Case 0, 4, 14, 15 + UseParensForNegativeNumbers = TriState.True + Case Else + UseParensForNegativeNumbers = TriState.False + End Select + + ElseIf UseParensForNegativeNumbers = TriState.False Then + + Select Case CurrencyNegativePattern + Case 0 + CurrencyNegativePattern = 1 + Case 4 + CurrencyNegativePattern = 5 + Case 14 + CurrencyNegativePattern = 9 + Case 15 + CurrencyNegativePattern = 10 + End Select + + Else + + UseParensForNegativeNumbers = TriState.True + + Select Case CurrencyNegativePattern + Case 1, 2, 3 'leading $ w/o space + CurrencyNegativePattern = 0 + Case 5, 6, 7 'trailing $ w/o space + CurrencyNegativePattern = 4 + Case 8, 10, 13 'Trailing $ / leading with space + CurrencyNegativePattern = 15 + Case 9, 11, 12 + CurrencyNegativePattern = 14 + End Select + + End If + + nfi.CurrencyNegativePattern = CurrencyNegativePattern + + If NumDigitsAfterDecimal = -1 Then + NumDigitsAfterDecimal = nfi.CurrencyDecimalDigits + End If + nfi.CurrencyDecimalDigits = NumDigitsAfterDecimal + + formatProvider = New FormatInfoHolder(nfi) + + If IncludeLeadingDigit = TriState.False Then + 'We need to build our own string in this case, since the NDP does not + ' make this accessible + + nfi.NumberGroupSizes = nfi.CurrencyGroupSizes + + FormatString = CurrencyPositiveFormatStrings(CurrencyPositivePattern) & ";" & + CurrencyNegativeFormatStrings(CurrencyNegativePattern) + + If GroupDigits = TriState.False Then + If IncludeLeadingDigit = TriState.False Then + NumberFormat = "#" + Else + NumberFormat = "0" + End If + Else + If IncludeLeadingDigit = TriState.False Then + NumberFormat = "#,###" + Else + NumberFormat = "#,##0" + End If + End If + + If NumDigitsAfterDecimal > 0 Then + NumberFormat = NumberFormat & "." & New String("0"c, NumDigitsAfterDecimal) + End If + + If System.String.CompareOrdinal("$", nfi.CurrencySymbol) <> 0 Then + 'Replace the '$' sign with the locale specific symbol + 'Note, the currency symbol in the FormatString is surrounded by the literal symbol ', e.g. '$' + 'We do this to guard against the case where the currency symbol is the literal symbol \ This was causing problems on Japanese + 'systems because that meant our format string ended up as "\#,###.00" when we wanted "'\'#,###.00" But because the currency symbol + 'we are replacing with could concievably be the literal symbol ' as well, we need to make sure we don't end up with an invalid string like "'''#,###.00" + 'So if the currency symbol is a ' we replace it with '' so that our format string will be balanced like "''''#,###.00" which will result in the format + 'succeeding. You won't see the ' as the currency symbol in this case but this was never supported anyway. + FormatString = FormatString.Replace("$", nfi.CurrencySymbol.Replace("'", "''")) + End If + + Return FormatString.Replace("n", NumberFormat) + End If + + End Function + + Friend Function GetNumberFormatString( + ByVal NumDigitsAfterDecimal As Integer, + ByVal IncludeLeadingDigit As TriState, + ByVal UseParensForNegativeNumbers As TriState, + ByVal GroupDigits As TriState) As String + + Dim nfi As NumberFormatInfo + Dim ci As CultureInfo + Dim NumberNegativePattern As Integer + Dim FormatString, NumberFormat As String + + ci = GetCultureInfo() + nfi = CType(ci.GetFormat(GetType(System.Globalization.NumberFormatInfo)), NumberFormatInfo) + + If NumDigitsAfterDecimal = -1 Then + NumDigitsAfterDecimal = nfi.NumberDecimalDigits + ElseIf (NumDigitsAfterDecimal > 99) OrElse (NumDigitsAfterDecimal < -1) Then + Throw New ArgumentException(GetResourceString(SR.Argument_Range0to99_1, "NumDigitsAfterDecimal")) + End If + + If GroupDigits = TriState.UseDefault Then + If nfi.NumberGroupSizes Is Nothing OrElse nfi.NumberGroupSizes.Length = 0 Then + GroupDigits = TriState.False + Else + GroupDigits = TriState.True + End If + End If + + NumberNegativePattern = nfi.NumberNegativePattern + + 'Value Associated Pattern + '0 (n) + '1 - n + '2 - n + '3 n - + '4 n - + If UseParensForNegativeNumbers = TriState.UseDefault Then + Select Case NumberNegativePattern + Case 0 + UseParensForNegativeNumbers = TriState.True + Case Else + UseParensForNegativeNumbers = TriState.False + End Select + ElseIf UseParensForNegativeNumbers = TriState.False Then + If NumberNegativePattern = 0 Then + NumberNegativePattern = 1 + End If + Else + UseParensForNegativeNumbers = TriState.True + + Select Case NumberNegativePattern + Case 1, 2, 3, 4 + NumberNegativePattern = 0 + End Select + End If + + If UseParensForNegativeNumbers = TriState.UseDefault Then + UseParensForNegativeNumbers = TriState.True + End If + + FormatString = "n;" & NumberNegativeFormatStrings(NumberNegativePattern) + If System.String.CompareOrdinal("-", nfi.NegativeSign) <> 0 Then + 'Replace the "-" sign with the actual locale-specific symbol (escaped with quotes). + ' Note: there appears to be no performance benefit in using a StringBuilder over simple concats. + FormatString = FormatString.Replace("-", """" & nfi.NegativeSign & """") + End If + + If IncludeLeadingDigit <> TriState.False Then + NumberFormat = "0" + Else + NumberFormat = "#" + End If + + If GroupDigits = TriState.False OrElse nfi.NumberGroupSizes.Length = 0 Then + 'Just use setting done above '#' or '0' + Else + If nfi.NumberGroupSizes.Length = 1 Then + NumberFormat = "#," & New String("#"c, nfi.NumberGroupSizes(0)) & NumberFormat + Else + Dim i As Integer + + NumberFormat = New String("#"c, nfi.NumberGroupSizes(0) - 1) & NumberFormat + For i = 1 To nfi.NumberGroupSizes.GetUpperBound(0) + NumberFormat = "," & New String("#"c, nfi.NumberGroupSizes(i)) & "," & NumberFormat + Next i + End If + End If + + If NumDigitsAfterDecimal > 0 Then + NumberFormat = NumberFormat & "." & New String("0"c, NumDigitsAfterDecimal) + End If + + Return Replace(FormatString, "n", NumberFormat) + End Function + + Public Function FormatPercent(ByVal Expression As Object, + Optional ByVal NumDigitsAfterDecimal As Integer = -1, + Optional ByVal IncludeLeadingDigit As TriState = TriState.UseDefault, + Optional ByVal UseParensForNegativeNumbers As TriState = TriState.UseDefault, + Optional ByVal GroupDigits As TriState = TriState.UseDefault) As String + + Dim ifmt As IFormattable + Dim typ As Type + Dim sFormat As String + + ValidateTriState(IncludeLeadingDigit) + ValidateTriState(UseParensForNegativeNumbers) + ValidateTriState(GroupDigits) + + If Expression Is Nothing Then + Return "" + End If + + typ = Expression.GetType() + + If typ Is GetType(System.String) Then + Expression = CDbl(Expression) + ElseIf Not Symbols.IsNumericType(typ) Then + Throw New InvalidCastException(GetResourceString(SR.InvalidCast_FromTo, VBFriendlyName(typ), "numeric")) + End If + + ifmt = CType(Expression, IFormattable) + sFormat = GetFormatString(NumDigitsAfterDecimal, IncludeLeadingDigit, UseParensForNegativeNumbers, + GroupDigits, FormatType.Percent) + Return ifmt.ToString(sFormat, Nothing) + End Function + + '============================================================================ + ' GetChar function (new for VB7) + '============================================================================ + Public Function GetChar(ByVal [str] As String, ByVal Index As Integer) As Char + If [str] Is Nothing Then + Throw New ArgumentException(GetResourceString(SR.Argument_LengthGTZero1, "String")) + ElseIf (Index < 1) Then + Throw New ArgumentException(GetResourceString(SR.Argument_GEOne1, "Index")) + ElseIf (Index > [str].Length) Then + Throw New ArgumentException(GetResourceString(SR.Argument_IndexLELength2, "Index", "String")) + Else + Return [str].Chars(Index - 1) + End If + End Function + '============================================================================ ' Left/Right/Mid/Trim functions. '============================================================================ @@ -711,5 +2040,271 @@ EmptyMatchString: Throw ex End Try End Function + + Friend Function IsValidCodePage(ByVal codepage As Integer) As Boolean + IsValidCodePage = False + + Try + If Encoding.GetEncoding(codepage) IsNot Nothing Then + IsValidCodePage = True + End If + Catch ex As StackOverflowException + Throw ex + Catch ex As OutOfMemoryException + Throw ex + Catch ex As System.Threading.ThreadAbortException + Throw ex + Catch + End Try + End Function + + Public Function StrConv(ByVal [str] As String, ByVal Conversion As VbStrConv, Optional ByVal LocaleID As Integer = 0) As String +#If PLATFORM_WINDOWS Then + Try + Const LANG_CHINESE As Integer = &H4I + Const LANG_JAPANESE As Integer = &H11I + Const LANG_KOREAN As Integer = &H12I + Dim dwMapFlags As Integer + Dim loc As CultureInfo + Dim langid As Integer + + If (LocaleID = 0 OrElse LocaleID = 1) Then + loc = GetCultureInfo() + LocaleID = loc.LCID() + Else + Try + loc = New CultureInfo(LocaleID And &HFFFFI) + Catch ex As StackOverflowException + Throw ex + Catch ex As OutOfMemoryException + Throw ex + Catch ex As System.Threading.ThreadAbortException + Throw ex + Catch + Throw New ArgumentException(GetResourceString(SR.Argument_LCIDNotSupported1, CStr(LocaleID))) + End Try + End If + + langid = PRIMARYLANGID(LocaleID) + + 'Ensure only valid bits for Conversion are passed in. + If (Conversion And Not (VbStrConv.Uppercase Or VbStrConv.Lowercase Or VbStrConv.Wide Or VbStrConv.Narrow _ + Or VbStrConv.Katakana Or VbStrConv.Hiragana Or VbStrConv.SimplifiedChinese Or VbStrConv.TraditionalChinese _ + Or VbStrConv.LinguisticCasing)) <> 0 Then + Throw New ArgumentException(GetResourceString(SR.Argument_InvalidVbStrConv)) + End If + + '*** VbStrConv.SimplifiedChinese/VbStrConv.TraditionalChinese handling + Select Case (Conversion And (VbStrConv.SimplifiedChinese + VbStrConv.TraditionalChinese)) + + Case 0 + 'Flags not used + Case (VbStrConv.SimplifiedChinese + VbStrConv.TraditionalChinese) + Throw New ArgumentException(GetResourceString(SR.Argument_StrConvSCandTC)) + Case VbStrConv.SimplifiedChinese + If IsValidCodePage(CODEPAGE_SIMPLIFIED_CHINESE) AndAlso IsValidCodePage(CODEPAGE_TRADITIONAL_CHINESE) Then + dwMapFlags = dwMapFlags Or NativeTypes.LCMAP_SIMPLIFIED_CHINESE + Else + Throw New ArgumentException(GetResourceString(SR.Argument_SCNotSupported)) + End If + Case VbStrConv.TraditionalChinese + If IsValidCodePage(CODEPAGE_SIMPLIFIED_CHINESE) AndAlso IsValidCodePage(CODEPAGE_TRADITIONAL_CHINESE) Then + dwMapFlags = dwMapFlags Or NativeTypes.LCMAP_TRADITIONAL_CHINESE + Else + Throw New ArgumentException(GetResourceString(SR.Argument_TCNotSupported)) + End If + End Select + + '*** Upper/Lowercase handling + Select Case (Conversion And (VbStrConv.Uppercase Or VbStrConv.Lowercase)) + Case VbStrConv.None + 'No conversion + If (Conversion And VbStrConv.LinguisticCasing) <> 0 Then + Throw New ArgumentException(GetResourceString(SR.LinguisticRequirements)) + End If + + Case (VbStrConv.Uppercase Or VbStrConv.Lowercase) ' VbStrConv.ProperCase is special: see below + 'Proper casing gets done below + dwMapFlags = 0 + Case VbStrConv.Uppercase + If Conversion = VbStrConv.Uppercase Then + Return loc.TextInfo.ToUpper(str) + Else + dwMapFlags = dwMapFlags Or NativeTypes.LCMAP_UPPERCASE + End If + Case VbStrConv.Lowercase + If Conversion = VbStrConv.Lowercase Then + Return loc.TextInfo.ToLower(str) + Else + dwMapFlags = dwMapFlags Or NativeTypes.LCMAP_LOWERCASE + End If + End Select + + If ((Conversion And (VbStrConv.Katakana + VbStrConv.Hiragana)) <> 0) Then + If (langid <> LANG_JAPANESE) OrElse (Not ValidLCID(LocaleID)) Then + Throw New ArgumentException(GetResourceString(SR.Argument_JPNNotSupported)) + Else + 'Locale is ok + End If + End If + + If (Conversion And (VbStrConv.Wide Or VbStrConv.Narrow)) <> 0 Then + If (langid = LANG_JAPANESE) OrElse + (langid = LANG_KOREAN) OrElse + (langid = LANG_CHINESE) Then + If Not ValidLCID(LocaleID) Then + Throw New ArgumentException(GetResourceString(SR.Argument_LocalNotSupported)) + End If + Else + Throw New ArgumentException(GetResourceString(SR.Argument_WideNarrowNotApplicable)) + End If + End If + + '*** Width handling + Select Case (Conversion And (VbStrConv.Wide Or VbStrConv.Narrow)) + Case VbStrConv.None + Case VbStrConv.Wide Or VbStrConv.Narrow ' VbStrConv.Wide+VbStrConv.Narrow is reserved + Throw New ArgumentException(GetResourceString(SR.Argument_IllegalWideNarrow)) + Case VbStrConv.Wide ' VbStrConv.Wide + dwMapFlags = dwMapFlags Or NativeTypes.LCMAP_FULLWIDTH + Case VbStrConv.Narrow ' VbStrConv.Narrow + dwMapFlags = dwMapFlags Or NativeTypes.LCMAP_HALFWIDTH + End Select + + '*** Kana handling + Select Case (Conversion And (VbStrConv.Katakana Or VbStrConv.Hiragana)) + Case VbStrConv.None + Case (VbStrConv.Katakana Or VbStrConv.Hiragana) ' VbStrConv.Katakana+VbStrConv.Hiragana is reserved + Throw New ArgumentException(GetResourceString(SR.Argument_IllegalKataHira)) + Case VbStrConv.Katakana ' VbStrConv.Katakana + dwMapFlags = dwMapFlags Or NativeTypes.LCMAP_KATAKANA + Case VbStrConv.Hiragana ' VbStrConv.Hiragana + dwMapFlags = dwMapFlags Or NativeTypes.LCMAP_HIRAGANA + End Select + + ' accents field (Conversion And 192) in Conversion is reserved + If ((Conversion And VbStrConv.ProperCase) = VbStrConv.ProperCase) Then + Return ProperCaseString(loc, dwMapFlags, [str]) + ElseIf dwMapFlags <> 0 Then + Return vbLCMapString(loc, dwMapFlags, [str]) + Else + Return [str] + End If + Catch ex As Exception + Throw ex + End Try +#Else + Throw New PlatformNotSupportedException() +#End If + End Function + +#If PLATFORM_WINDOWS Then + Friend Function ValidLCID(ByVal LocaleID As Integer) As Boolean + Try + Dim loc As CultureInfo = New CultureInfo(LocaleID) + ValidLCID = True + Catch ex As StackOverflowException + Throw ex + Catch ex As OutOfMemoryException + Throw ex + Catch ex As System.Threading.ThreadAbortException + Throw ex + Catch + ValidLCID = False + End Try + End Function + + Private Function ProperCaseString(ByVal loc As CultureInfo, ByVal dwMapFlags As Integer, ByVal sSrc As String) As String + Dim iSrcLen As Integer + Dim sb As StringBuilder + + If sSrc Is Nothing Then + iSrcLen = 0 + Else + iSrcLen = sSrc.Length + End If + + If iSrcLen = 0 Then + Return "" + End If + + ' do the mapping specified by dwMapFlags, and at the same time, lowercase + ' the whole string + sb = New StringBuilder(vbLCMapString(loc, dwMapFlags Or NativeTypes.LCMAP_LOWERCASE, sSrc)) + + 'ToTitleCase is a more linguistically correct casing for the current locale + Return loc.TextInfo.ToTitleCase(sb.ToString()) + + End Function + + + + Friend Function vbLCMapString(ByVal loc As CultureInfo, ByVal dwMapFlags As Integer, ByVal sSrc As String) As String + Dim length As Integer + + If sSrc Is Nothing Then + length = 0 + Else + length = sSrc.Length + End If + + If length = 0 Then + Return "" + End If + + Dim sDest As String + Dim lenDest As Integer + Dim lcid As Integer = loc.LCID + Dim enc As Text.Encoding = Text.Encoding.GetEncoding(loc.TextInfo.ANSICodePage) + + If Not enc.IsSingleByte Then + + 'VB6 syntax note: ByVal String in Declare statements is really a ByRef String syntax + 'So sTemp will always be updated here on copyback + Dim sTemp As String = sSrc + Dim bytesSrc, bytesDest As Byte() + + 'Forced to use ANSI here + 'Char count can actual increase or decrease + + 'Get byte array + bytesSrc = enc.GetBytes(sTemp) + + 'Get required byte length for new destination + lenDest = UnsafeNativeMethods.LCMapStringA(lcid, dwMapFlags, bytesSrc, bytesSrc.Length, Nothing, 0) + + 'Create destination byte array of required length + bytesDest = New Byte(lenDest - 1) {} + + 'Call again to do the actual translation + lenDest = UnsafeNativeMethods.LCMapStringA(lcid, dwMapFlags, bytesSrc, bytesSrc.Length, bytesDest, lenDest) + + 'Now convert back to a string + sDest = enc.GetString(bytesDest) + + Return sDest + + Else + 'We do not use StringBuilder here because embedded NULLs cause an early termination of the string + sDest = New String(" "c, length) + lenDest = UnsafeNativeMethods.LCMapString(lcid, dwMapFlags, sSrc, length, sDest, length) + Return sDest + End If + + End Function +#End If + + Private Sub ValidateTriState(ByVal Param As TriState) + If (Param <> vbTrue) AndAlso (Param <> vbFalse) AndAlso (Param <> vbUseDefault) Then + Throw VbMakeException(vbErrors.IllegalFuncCall) + End If + End Sub + + Private Function IsArrayEmpty(ByVal array As System.Array) As Boolean + If array Is Nothing Then + Return True + End If + Return (array.Length = 0) + End Function End Module End Namespace diff --git a/src/Microsoft.VisualBasic.Core/tests/StringsTests.cs b/src/Microsoft.VisualBasic.Core/tests/StringsTests.cs index e099fe79a755..bf80010ec1ac 100644 --- a/src/Microsoft.VisualBasic.Core/tests/StringsTests.cs +++ b/src/Microsoft.VisualBasic.Core/tests/StringsTests.cs @@ -3,8 +3,9 @@ // See the LICENSE file in the project root for more information. using System; -using System.Diagnostics; +using System.Collections.Generic; using System.Globalization; +using System.Runtime.InteropServices; using System.Text; using Microsoft.VisualBasic.CompilerServices.Tests; using Microsoft.DotNet.RemoteExecutor; @@ -189,6 +190,187 @@ public void Filter_Objects(object[] source, string match, string[] includeExpect Assert.Equal(excludeExpected, Strings.Filter(source, match, Include: false)); } + [Theory] + [MemberData(nameof(Format_TestData))] + public void Format(object expression, string style, string expected) + { + Assert.Equal(expected, Strings.Format(expression, style)); + } + + [Theory] + [MemberData(nameof(Format_InvalidCastException_TestData))] + public void Format_InvalidCastException(object expression, string style) + { + Assert.Throws(() => Strings.Format(expression, style)); + } + + private static IEnumerable Format_TestData() + { + yield return new object[] { null, null, "" }; + yield return new object[] { null, "", "" }; + yield return new object[] { "", null, "" }; + yield return new object[] { "", "", "" }; + yield return new object[] { sbyte.MinValue, "0", "-128" }; + yield return new object[] { sbyte.MaxValue, "0", "127" }; + yield return new object[] { ushort.MinValue, "0", "0" }; + yield return new object[] { ushort.MaxValue, "0", "65535" }; + yield return new object[] { false, "", "False" }; + yield return new object[] { false, "0", "0" }; + if (IsEnUS()) + { + yield return new object[] { 1.234, "", "1.234" }; + yield return new object[] { 1.234, "0", "1" }; + yield return new object[] { 1.234, "0.0", "1.2" }; + yield return new object[] { 1.234, "fixed", "1.23" }; + yield return new object[] { 1.234, "percent", "123.40%" }; + yield return new object[] { 1.234, "standard", "1.23" }; + yield return new object[] { 1.234, "currency", "$1.23" }; + yield return new object[] { false, "yes/no", "No" }; + yield return new object[] { true, "yes/no", "Yes" }; + yield return new object[] { false, "on/off", "Off" }; + yield return new object[] { true, "on/off", "On" }; + yield return new object[] { false, "true/false", "False" }; + yield return new object[] { true, "true/false", "True" }; + yield return new object[] { 0, "yes/no", "No" }; + yield return new object[] { "ABC", "yes/no", "ABC" }; + yield return new object[] { 123.4, "scientific", "1.23E+02" }; + } + DateTime d = DateTime.Now; + yield return new object[] { d, "long time", d.ToString("T") }; + yield return new object[] { d, "medium time", d.ToString("T") }; + yield return new object[] { d, "short time", d.ToString("t") }; + yield return new object[] { d, "long date", d.ToString("D") }; + yield return new object[] { d, "medium date", d.ToString("D") }; + yield return new object[] { d, "short date", d.ToString("d") }; + yield return new object[] { d, "general date", d.ToString("G") }; + yield return new object[] { 123.4, "general number", 123.4.ToString("G", null) }; + } + + private static IEnumerable Format_InvalidCastException_TestData() + { + yield return new object[] { new object(), null }; + yield return new object[] { new object(), "0" }; + } + + [Theory] + [MemberData(nameof(FormatCurrency_TestData))] + public void FormatCurrency(object expression, int numDigitsAfterDecimal, TriState includeLeadingDigit, TriState useParensForNegativeNumbers, TriState groupDigits, string expected) + { + Assert.Equal(expected, Strings.FormatCurrency(expression, numDigitsAfterDecimal, includeLeadingDigit, useParensForNegativeNumbers, groupDigits)); + } + + private static IEnumerable FormatCurrency_TestData() + { + yield return new object[] { null, 2, TriState.UseDefault, TriState.UseDefault, TriState.UseDefault, "" }; + if (IsEnUS()) + { + yield return new object[] { 0.123, 0, TriState.UseDefault, TriState.UseDefault, TriState.UseDefault, "$0" }; + yield return new object[] { 0.123, 1, TriState.UseDefault, TriState.UseDefault, TriState.UseDefault, "$0.1" }; + yield return new object[] { 0.123, 2, TriState.UseDefault, TriState.UseDefault, TriState.UseDefault, "$0.12" }; + yield return new object[] { 0.123, 4, TriState.UseDefault, TriState.UseDefault, TriState.UseDefault, "$0.1230" }; + yield return new object[] { 0.123, 2, TriState.False, TriState.UseDefault, TriState.UseDefault, "$.12" }; + yield return new object[] { 0.123, 2, TriState.True, TriState.UseDefault, TriState.UseDefault, "$0.12" }; + yield return new object[] { -0.123, 2, TriState.UseDefault, TriState.False, TriState.UseDefault, "-$0.12" }; + yield return new object[] { -0.123, 2, TriState.UseDefault, TriState.True, TriState.UseDefault, "($0.12)" }; + yield return new object[] { 1234.5, 2, TriState.UseDefault, TriState.UseDefault, TriState.UseDefault, "$1,234.50" }; + yield return new object[] { 1234.5, 2, TriState.UseDefault, TriState.UseDefault, TriState.False, "$1234.50" }; + yield return new object[] { 1234.5, 2, TriState.UseDefault, TriState.UseDefault, TriState.True, "$1,234.50" }; + } + } + + [Theory] + [MemberData(nameof(FormatDateTime_TestData))] + public void FormatDateTime(DateTime expression, DateFormat format, string expected) + { + Assert.Equal(expected, Strings.FormatDateTime(expression, format)); + } + + private static IEnumerable FormatDateTime_TestData() + { + DateTime d = DateTime.Now; + yield return new object[] { d, DateFormat.LongTime, d.ToString("T") }; + yield return new object[] { d, DateFormat.ShortTime, d.ToString("HH:mm") }; + yield return new object[] { d, DateFormat.LongDate, d.ToString("D") }; + yield return new object[] { d, DateFormat.ShortDate, d.ToString("d") }; + yield return new object[] { d, DateFormat.GeneralDate, d.ToString("G") }; + } + + [Theory] + [MemberData(nameof(FormatNumber_TestData))] + public void FormatNumber(object expression, int numDigitsAfterDecimal, TriState includeLeadingDigit, TriState useParensForNegativeNumbers, TriState groupDigits, string expected) + { + Assert.Equal(expected, Strings.FormatNumber(expression, numDigitsAfterDecimal, includeLeadingDigit, useParensForNegativeNumbers, groupDigits)); + } + + private static IEnumerable FormatNumber_TestData() + { + yield return new object[] { null, 2, TriState.UseDefault, TriState.UseDefault, TriState.UseDefault, "" }; + if (IsEnUS()) + { + yield return new object[] { 0.123, 0, TriState.UseDefault, TriState.UseDefault, TriState.UseDefault, "0" }; + yield return new object[] { 0.123, 1, TriState.UseDefault, TriState.UseDefault, TriState.UseDefault, "0.1" }; + yield return new object[] { 0.123, 2, TriState.UseDefault, TriState.UseDefault, TriState.UseDefault, "0.12" }; + yield return new object[] { 0.123, 4, TriState.UseDefault, TriState.UseDefault, TriState.UseDefault, "0.1230" }; + yield return new object[] { 0.123, 2, TriState.False, TriState.UseDefault, TriState.UseDefault, ".12" }; + yield return new object[] { 0.123, 2, TriState.True, TriState.UseDefault, TriState.UseDefault, "0.12" }; + yield return new object[] { -0.123, 2, TriState.UseDefault, TriState.UseDefault, TriState.UseDefault, "-0.12" }; + yield return new object[] { -0.123, 2, TriState.UseDefault, TriState.False, TriState.UseDefault, "-0.12" }; + yield return new object[] { -0.123, 2, TriState.UseDefault, TriState.True, TriState.UseDefault, "(0.12)" }; + yield return new object[] { 1234.5, 2, TriState.UseDefault, TriState.UseDefault, TriState.UseDefault, "1,234.50" }; + yield return new object[] { 1234.5, 2, TriState.UseDefault, TriState.UseDefault, TriState.False, "1234.50" }; + yield return new object[] { 1234.5, 2, TriState.UseDefault, TriState.UseDefault, TriState.True, "1,234.50" }; + } + } + + [Theory] + [MemberData(nameof(FormatPercent_TestData))] + public void FormatPercent(object expression, int numDigitsAfterDecimal, TriState includeLeadingDigit, TriState useParensForNegativeNumbers, TriState groupDigits, string expected) + { + Assert.Equal(expected, Strings.FormatPercent(expression, numDigitsAfterDecimal, includeLeadingDigit, useParensForNegativeNumbers, groupDigits)); + } + + private static IEnumerable FormatPercent_TestData() + { + yield return new object[] { null, 2, TriState.UseDefault, TriState.UseDefault, TriState.UseDefault, "" }; + if (IsEnUS()) + { + yield return new object[] { 0.123, 0, TriState.UseDefault, TriState.UseDefault, TriState.UseDefault, "12%" }; + yield return new object[] { 0.123, 1, TriState.UseDefault, TriState.UseDefault, TriState.UseDefault, "12.3%" }; + yield return new object[] { 0.123, 2, TriState.UseDefault, TriState.UseDefault, TriState.UseDefault, "12.30%" }; + yield return new object[] { 0.123, 4, TriState.UseDefault, TriState.UseDefault, TriState.UseDefault, "12.3000%" }; + yield return new object[] { 0.00123, 2, TriState.UseDefault, TriState.UseDefault, TriState.UseDefault, "0.12%" }; + yield return new object[] { 0.00123, 2, TriState.False, TriState.UseDefault, TriState.UseDefault, ".12%" }; + yield return new object[] { 0.00123, 2, TriState.True, TriState.UseDefault, TriState.UseDefault, "0.12%" }; + yield return new object[] { -0.123, 2, TriState.UseDefault, TriState.UseDefault, TriState.UseDefault, "-12.30%" }; + yield return new object[] { -0.123, 2, TriState.UseDefault, TriState.False, TriState.UseDefault, "-12.30%" }; + yield return new object[] { -0.123, 2, TriState.UseDefault, TriState.True, TriState.UseDefault, "(12.30%)" }; + yield return new object[] { 12.345, 2, TriState.UseDefault, TriState.UseDefault, TriState.UseDefault, "1,234.50%" }; + yield return new object[] { 12.345, 2, TriState.UseDefault, TriState.UseDefault, TriState.False, "1234.50%" }; + yield return new object[] { 12.345, 2, TriState.UseDefault, TriState.UseDefault, TriState.True, "1,234.50%" }; + } + } + + [Theory] + [InlineData("ABC", 1, 'A')] + [InlineData("ABC", 2, 'B')] + [InlineData("ABC", 3, 'C')] + public void GetChar(string str, int index, char expected) + { + Assert.Equal(expected, Strings.GetChar(str, index)); + } + + [Theory] + [InlineData(null, 0)] + [InlineData(null, 1)] + [InlineData("", 0)] + [InlineData("", 1)] + [InlineData("ABC", 0)] + [InlineData("ABC", 4)] + public void GetChar_ArgumentException(string str, int index) + { + Assert.Throws< ArgumentException>(() => Strings.GetChar(str, index)); + } + [Theory] [MemberData(nameof(InStr_TestData_NullsAndEmpties))] [MemberData(nameof(InStr_FromBegin_TestData))] @@ -294,6 +476,89 @@ public void InStrRev_WhenStartZeroOrMinusTwoOrLess_ThrowsArgumentException(int s AssertExtensions.Throws("Start", null, () => Strings.InStrRev("a", "a", start)); } + [Theory] + [MemberData(nameof(Join_Object_TestData))] + [MemberData(nameof(Join_String_TestData))] + public void Join(object[] source, string delimiter, string expected) + { + Assert.Equal(expected, Strings.Join(source, delimiter)); + } + + private static IEnumerable Join_Object_TestData() + { + yield return new object[] { new object[0], null, null }; + yield return new object[] { new object[0], ",", null }; + yield return new object[] { new object[] { 1 }, ",", "1" }; + yield return new object[] { new object[] { 1, null, 3 }, null, "13" }; + yield return new object[] { new object[] { true, false }, "", "TrueFalse" }; + yield return new object[] { new object[] { 1, 2, 3 }, ", ", "1, 2, 3" }; + } + + [Theory] + [MemberData(nameof(Join_String_TestData))] + public void Join(string[] source, string delimiter, string expected) + { + Assert.Equal(expected, Strings.Join(source, delimiter)); + } + + private static IEnumerable Join_String_TestData() + { + yield return new object[] { new string[0], null, null }; + yield return new object[] { new string[0], ",", null }; + yield return new object[] { new string[] { "A" }, ",", "A" }; + yield return new object[] { new string[] { "", null, "" }, null, "" }; + yield return new object[] { new string[] { "", "AB", "C" }, "", "ABC" }; + yield return new object[] { new string[] { "A", "B", "C" }, ", ", "A, B, C" }; + } + + [Theory] + [InlineData('\0', "\0")] + [InlineData('\uffff', "\uffff")] + [InlineData('a', "a")] + [InlineData('A', "a")] + [InlineData('1', "1")] + public void LCase(char value, char expected) + { + Assert.Equal(expected, Strings.LCase(value)); + } + + [Theory] + [InlineData(null, null)] + [InlineData("", "")] + [InlineData("\0", "\0")] + [InlineData("\uffff", "\uffff")] + [InlineData("abc", "abc")] + [InlineData("ABC", "abc")] + [InlineData("123", "123")] + public void LCase(string value, string expected) + { + Assert.Equal(expected, Strings.LCase(value)); + } + + [Theory] + [InlineData('\0', "\0")] + [InlineData('\uffff', "\uffff")] + [InlineData('a', "A")] + [InlineData('A', "A")] + [InlineData('1', "1")] + public void UCase(char value, char expected) + { + Assert.Equal(expected, Strings.UCase(value)); + } + + [Theory] + [InlineData(null, "")] + [InlineData("", "")] + [InlineData("\0", "\0")] + [InlineData("\uffff", "\uffff")] + [InlineData("abc", "ABC")] + [InlineData("ABC", "ABC")] + [InlineData("123", "123")] + public void UCase(string value, string expected) + { + Assert.Equal(expected, Strings.UCase(value)); + } + [Theory] [InlineData("a", -1)] public void Left_Invalid(string str, int length) @@ -401,6 +666,40 @@ public void Mid3_Valid(string str, int start, int length, string expected) Assert.Equal(expected, Strings.Mid(str, start, length)); } + [Theory] + [InlineData(null, 0, "")] + [InlineData(null, 1, " ")] + [InlineData("", 0, "")] + [InlineData("", 1, " ")] + [InlineData("A", 0, "")] + [InlineData("A", 1, "A")] + [InlineData("A", 2, "A ")] + [InlineData("AB", 0, "")] + [InlineData("AB", 1, "A")] + [InlineData("AB", 2, "AB")] + [InlineData("AB", 4, "AB ")] + public void LSet(string source, int length, string expected) + { + Assert.Equal(expected, Strings.LSet(source, length)); + } + + [Theory] + [InlineData(null, 0, "")] + [InlineData(null, 1, " ")] + [InlineData("", 0, "")] + [InlineData("", 1, " ")] + [InlineData("A", 0, "")] + [InlineData("A", 1, "A")] + [InlineData("A", 2, " A")] + [InlineData("AB", 0, "")] + [InlineData("AB", 1, "A")] + [InlineData("AB", 2, "AB")] + [InlineData("AB", 4, " AB")] + public void RSet(string source, int length, string expected) + { + Assert.Equal(expected, Strings.RSet(source, length)); + } + [Theory] [InlineData(null, "")] [InlineData("", "")] @@ -446,6 +745,68 @@ public void Trim_Valid(string str, string expected) Assert.Equal(expected, Strings.Trim(str)); } + [Theory] + [InlineData("", "", null, 1, -1, CompareMethod.Text, null)] + [InlineData("", null, "", 1, -1, CompareMethod.Text, null)] + [InlineData("", "", "", 1, -1, CompareMethod.Text, null)] + [InlineData("ABC", "", "", 1, -1, CompareMethod.Text, "ABC")] + [InlineData("ABC", "bc", "23", 1, -1, CompareMethod.Binary, "ABC")] + [InlineData("ABC", "BC", "23", 1, -1, CompareMethod.Binary, "A23")] + [InlineData("ABC", "bc", "23", 1, -1, CompareMethod.Text, "A23")] + [InlineData("abcbc", "bc", "23", 1, -1, CompareMethod.Text, "a2323")] + [InlineData("abcbc", "bc", "23", 1, 0, CompareMethod.Text, "abcbc")] + [InlineData("abcbc", "bc", "23", 1, 1, CompareMethod.Text, "a23bc")] + [InlineData("abc", "bc", "23", 2, -1, CompareMethod.Text, "23")] + [InlineData("abc", "bc", "23", 3, -1, CompareMethod.Text, "c")] + [InlineData("abc", "bc", "23", 4, -1, CompareMethod.Text, null)] + public void Replace(string expression, string find, string replacement, int start, int n, CompareMethod compare, string expected) + { + Assert.Equal(expected, Strings.Replace(expression, find, replacement, start, n, compare)); + } + + [Theory] + [InlineData(null, null, null, 0, 0, CompareMethod.Text)] + [InlineData(null, "", "", 0, 0, CompareMethod.Text)] + public void Replace_ArgumentException(string expression, string find, string replacement, int start, int length, CompareMethod compare) + { + Assert.Throws< ArgumentException>(() => Strings.Replace(expression, find, replacement, start, length, compare)); + } + + [Theory] + [InlineData(0, "")] + [InlineData(1, " ")] + [InlineData(3, " ")] + public void Space(int number, string expected) + { + Assert.Equal(expected, Strings.Space(number)); + } + + [Theory] + [InlineData(null, null, -1, CompareMethod.Text, new string[] { "" })] + [InlineData(null, "", -1, CompareMethod.Text, new string[] { "" })] + [InlineData("", null, -1, CompareMethod.Text, new string[] { "" })] + [InlineData("", "", -1, CompareMethod.Text, new string[] { "" })] + [InlineData("ABC", ",", -1, CompareMethod.Text, new string[] { "ABC" })] + [InlineData("A,,BC", ",", -1, CompareMethod.Text, new string[] { "A", "", "BC" })] + [InlineData("A,,BC", ",", -1, CompareMethod.Text, new string[] { "A", "", "BC" })] + [InlineData("ABC", "b", -1, CompareMethod.Text, new string[] { "A", "C" })] + [InlineData("ABC", "b", -1, CompareMethod.Binary, new string[] { "ABC" })] + [InlineData("A, B, C", ", ", -1, CompareMethod.Text, new string[] { "A", "B", "C" })] + [InlineData("A, B, C", ", ", 1, CompareMethod.Text, new string[] { "A, B, C" })] + [InlineData("A, B, C", ", ", 2, CompareMethod.Text, new string[] { "A", "B, C" })] + [InlineData("A, B, C", ", ", int.MaxValue, CompareMethod.Text, new string[] { "A", "B", "C" })] + public void Split(string expression, string delimiter, int limit, CompareMethod compare, string[] expected) + { + Assert.Equal(expected, Strings.Split(expression, delimiter, limit, compare)); + } + + [Theory] + [InlineData("A, B, C", ", ", 0, CompareMethod.Text)] + public void Split_IndexOutOfRangeException(string expression, string delimiter, int limit, CompareMethod compare) + { + Assert.Throws< IndexOutOfRangeException>(() => Strings.Split(expression, delimiter, limit, compare)); + } + [Theory] [InlineData("a", "a", 0, 0)] [InlineData("a", "b", -1, -1)] @@ -459,6 +820,114 @@ public void StrComp(string left, string right, int expectedBinaryCompare, int ex Assert.Equal(expectedTextCompare, Strings.StrComp(left, right, CompareMethod.Text)); } + [Theory] + [InlineData(null, VbStrConv.None, 0, null)] + [InlineData("", VbStrConv.None, 0, "")] + [InlineData("ABC123", VbStrConv.None, 0, "ABC123")] + [InlineData("", VbStrConv.Lowercase, 0, "")] + [InlineData("Abc123", VbStrConv.Lowercase, 0, "abc123")] + [InlineData("Abc123", VbStrConv.Uppercase, 0, "ABC123")] + public void StrConv(string str, Microsoft.VisualBasic.VbStrConv conversion, int localeID, string expected) + { + if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) + { + Assert.Equal(expected, Strings.StrConv(str, conversion, localeID)); + } + else + { + Assert.Throws(() => Strings.StrConv(str, conversion, localeID)); + } + } + + [Theory] + [MemberData(nameof(StrDup_Object_TestData))] + [MemberData(nameof(StrDup_Char_TestData))] + [MemberData(nameof(StrDup_String_TestData))] + public void StrDup(int number, object character, object expected) + { + Assert.Equal(expected, Strings.StrDup(number, character)); + } + + [Theory] + [MemberData(nameof(StrDup_Object_ArgumentException_TestData))] + public void StrDup_ArgumentException(int number, object character) + { + Assert.Throws< ArgumentException>(() => Strings.StrDup(number, character)); + } + + [Theory] + [MemberData(nameof(StrDup_Char_TestData))] + public void StrDup(int number, char character, string expected) + { + Assert.Equal(expected, Strings.StrDup(number, character)); + } + + [Theory] + [MemberData(nameof(StrDup_Char_ArgumentException_TestData))] + public void StrDup_ArgumentException(int number, char character) + { + Assert.Throws(() => Strings.StrDup(number, character)); + } + + [Theory] + [MemberData(nameof(StrDup_String_TestData))] + public void StrDup(int number, string character, string expected) + { + Assert.Equal(expected, Strings.StrDup(number, character)); + } + + [Theory] + [MemberData(nameof(StrDup_String_ArgumentException_TestData))] + public void StrDup_ArgumentException(int number, string character) + { + Assert.Throws(() => Strings.StrDup(number, character)); + } + + private static IEnumerable StrDup_Object_TestData() + { + yield break; + } + + private static IEnumerable StrDup_Char_TestData() + { + yield return new object[] { 3, '\0', "\0\0\0" }; + yield return new object[] { 0, 'A', "" }; + yield return new object[] { 1, 'A', "A" }; + yield return new object[] { 3, 'A', "AAA" }; + } + + private static IEnumerable StrDup_String_TestData() + { + yield return new object[] { 0, "A", "" }; + yield return new object[] { 1, "A", "A" }; + yield return new object[] { 3, "A", "AAA" }; + yield return new object[] { 0, "ABC", "" }; + yield return new object[] { 1, "ABC", "A" }; + yield return new object[] { 3, "ABC", "AAA" }; + } + + private static IEnumerable StrDup_Object_ArgumentException_TestData() + { + yield return new object[] { -1, new object() }; + yield return new object[] { 1, 0 }; + yield return new object[] { 1, (int)'A' }; + yield return new object[] { -1, 'A' }; + yield return new object[] { -1, "A" }; + yield return new object[] { 1, "" }; + } + + private static IEnumerable StrDup_Char_ArgumentException_TestData() + { + yield return new object[] { -1, 'A' }; + } + + private static IEnumerable StrDup_String_ArgumentException_TestData() + { + yield return new object[] { -1, "A" }; + yield return new object[] { 1, null }; + yield return new object[] { 1, "" }; + } + [Theory] [InlineData(null, "")] [InlineData("", "")] @@ -532,5 +1001,7 @@ public void StrReverse(string str, string expected) { "aa", "ab", 1, 0 }, { "abab", "ab", 3, 1 }, }; + + private static bool IsEnUS() => System.Threading.Thread.CurrentThread.CurrentUICulture.Name == "en-US"; } } From 918609481617f5c167496925c02bf0329afbff76 Mon Sep 17 00:00:00 2001 From: Viktor Hofer Date: Wed, 24 Apr 2019 05:02:17 +0200 Subject: [PATCH 027/607] Fix test asset publishing when retrying (#37116) Fixes official builds that are retried, i.e.: https://dev.azure.com/dnceng/internal/_build/results?buildId=165244 --- eng/publish.proj | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/eng/publish.proj b/eng/publish.proj index 439dffa16f17..58b5ffee7ce4 100644 --- a/eng/publish.proj +++ b/eng/publish.proj @@ -135,7 +135,8 @@ ManifestCommit="$(ManifestCommit)" ManifestBuildData="$(ManifestBuildData)" ManifestRepoUri="$(ManifestRepoUri)" - AssetManifestPath="$(AssetManifestFilePath)" /> + AssetManifestPath="$(AssetManifestFilePath)" + Overwrite="true" /> <_ManifestToPush Remove="@(_ManifestToPush)" /> @@ -155,6 +156,7 @@ ManifestCommit="$(ManifestCommit)" ManifestBuildData="$(ManifestBuildData)" ManifestRepoUri="$(ManifestRepoUri)" - AssetManifestPath="$(AssetManifestDir)ManifestUpload.xml" /> + AssetManifestPath="$(AssetManifestDir)ManifestUpload.xml" + Overwrite="true" /> From ad01dd1c314485bb2b86ed6743004a132912754d Mon Sep 17 00:00:00 2001 From: Karel Zikmund Date: Wed, 24 Apr 2019 03:09:47 -0700 Subject: [PATCH 028/607] Update System.IO* areas ownership --- Documentation/project-docs/issue-guide.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Documentation/project-docs/issue-guide.md b/Documentation/project-docs/issue-guide.md index 4c99053dfc07..d53c79d494c0 100644 --- a/Documentation/project-docs/issue-guide.md +++ b/Documentation/project-docs/issue-guide.md @@ -62,8 +62,9 @@ Areas are tracked by labels area-* (e.g. area-System.Collections). Each area | [System.Drawing](https://github.com/dotnet/corefx/labels/area-System.Drawing) | **[@safern](https://github.com/safern)**, [@maryamariyan](https://github.com/maryamariyan) | | | [System.Dynamic.Runtime](https://github.com/dotnet/corefx/labels/area-System.Dynamic.Runtime) | [@cston](https://github.com/cston), [@333fred](https://github.com/333fred) | Archived component - limited churn/contributions (see [#33170](https://github.com/dotnet/corefx/issues/33170)) | | [System.Globalization](https://github.com/dotnet/corefx/labels/area-System.Globalization) | **[@krwq](https://github.com/krwq)**, [@tarekgh](https://github.com/tarekgh) | | -| [System.IO](https://github.com/dotnet/corefx/labels/area-System.IO) | [@JeremyKuhne](https://github.com/JeremyKuhne) | | -| [System.IO.Compression](https://github.com/dotnet/corefx/labels/area-System.IO.Compression) | **[@buyaa-n](https://github.com/buyaa-n)**, [@ahsonkhan](https://github.com/ahsonkhan), [@ViktorHofer](https://github.com/ViktorHofer) | | +| [System.IO](https://github.com/dotnet/corefx/labels/area-System.IO) | **[@JeremyKuhne](https://github.com/JeremyKuhne)**, [@carlossanlop](https://github.com/carlossanlop) | | +| [System.IO.Compression](https://github.com/dotnet/corefx/labels/area-System.IO.Compression) | **[@carlossanlop](https://github.com/carlossanlop)**, [@ahsonkhan](https://github.com/ahsonkhan), [@ViktorHofer](https://github.com/ViktorHofer) | | +| [System.IO.Packaging](https://github.com/dotnet/corefx/labels/area-System.IO.Packaging) | [@JeremyKuhne](https://github.com/JeremyKuhne) | | | [System.IO.Pipelines](https://github.com/dotnet/corefx/labels/area-System.IO.Pipelines) | **[@pakrym](https://github.com/pakrym)**, [@davidfowl](https://github.com/davidfowl) | | | [System.Linq](https://github.com/dotnet/corefx/labels/area-System.Linq) | [@maryamariyan](https://github.com/maryamariyan) | | | [System.Linq.Expressions](https://github.com/dotnet/corefx/labels/area-System.Linq.Expressions) | [@cston](https://github.com/cston), [@333fred](https://github.com/333fred) | Archived component - limited churn/contributions (see [#33170](https://github.com/dotnet/corefx/issues/33170)) | From c75330881567febca956696e0cc0bd66687bc1bc Mon Sep 17 00:00:00 2001 From: Tomas Weinfurt Date: Wed, 24 Apr 2019 04:02:23 -0700 Subject: [PATCH 029/607] fix ReadAtLeastAsync (#37130) --- .../src/System/Net/Http/SocketsHttpHandler/Http2Connection.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http2Connection.cs b/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http2Connection.cs index 213e0c0a3d51..6fafb858a5f9 100644 --- a/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http2Connection.cs +++ b/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http2Connection.cs @@ -1483,7 +1483,7 @@ internal static async ValueTask ReadAtLeastAsync(Stream stream, Memory Date: Wed, 24 Apr 2019 13:18:31 +0000 Subject: [PATCH 030/607] Update dependencies from https://github.com/dotnet/corefx build 20190423.9 (#37139) - Microsoft.NETCore.Platforms - 3.0.0-preview6.19223.9 --- eng/Version.Details.xml | 4 ++-- eng/Versions.props | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index d24d95231c99..1c299f98d347 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -26,9 +26,9 @@ https://github.com/dotnet/core-setup d2ed8008b689c6c840f658034f7296d9a5d053d8 - + https://github.com/dotnet/corefx - a78bd0c13887e26372aafdffb8f06be26563c4a8 + 25fdedd999584a6e7765382b072c73eb9b1558ba https://github.com/dotnet/arcade diff --git a/eng/Versions.props b/eng/Versions.props index fc848116629c..b1657cb5fa59 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -44,7 +44,7 @@ 3.0.0-preview6-27622-74 3.0.0-preview6-27622-74 - 3.0.0-preview6.19222.12 + 3.0.0-preview6.19223.9 2.1.0-prerelease.19222.2 From 7a60f1e1ef6080e0f29e007ae6218043abdef3ad Mon Sep 17 00:00:00 2001 From: Stefan Date: Wed, 24 Apr 2019 17:05:14 +0200 Subject: [PATCH 031/607] Add missing 'if' in summary comment (#37136) Add missing 'if' in summary comment --- .../src/System/Threading/Channels/ChannelOptions.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/System.Threading.Channels/src/System/Threading/Channels/ChannelOptions.cs b/src/System.Threading.Channels/src/System/Threading/Channels/ChannelOptions.cs index a949c601b2f2..2091df3b8f59 100644 --- a/src/System.Threading.Channels/src/System/Threading/Channels/ChannelOptions.cs +++ b/src/System.Threading.Channels/src/System/Threading/Channels/ChannelOptions.cs @@ -18,8 +18,8 @@ public abstract class ChannelOptions public bool SingleWriter { get; set; } /// - /// true readers from the channel guarantee that there will only ever be at most one read operation at a time; - /// false if no such constraint is guaranteed. + /// true if readers from the channel guarantee that there will only ever be at most one read operation + /// at a time; false if no such constraint is guaranteed. /// /// /// If true, the channel may be able to optimize certain operations based on knowing about the single-reader guarantee. From 0762f06090bf967a440abe5df7fe2f38136a7006 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Wed, 24 Apr 2019 15:30:53 +0000 Subject: [PATCH 032/607] Update dependencies from https://github.com/dotnet/arcade build 20190423.2 (#37137) - Microsoft.DotNet.XUnitExtensions - 2.4.0-beta.19223.2 - Microsoft.DotNet.XUnitConsoleRunner - 2.5.1-beta.19223.2 - Microsoft.DotNet.VersionTools.Tasks - 1.0.0-beta.19223.2 - Microsoft.DotNet.ApiCompat - 1.0.0-beta.19223.2 - Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19223.2 - Microsoft.DotNet.Build.Tasks.Configuration - 1.0.0-beta.19223.2 - Microsoft.DotNet.Build.Tasks.Feed - 2.2.0-beta.19223.2 - Microsoft.DotNet.Build.Tasks.Packaging - 1.0.0-beta.19223.2 - Microsoft.DotNet.CodeAnalysis - 1.0.0-beta.19223.2 - Microsoft.DotNet.CoreFxTesting - 1.0.0-beta.19223.2 - Microsoft.DotNet.GenAPI - 1.0.0-beta.19223.2 - Microsoft.DotNet.GenFacades - 1.0.0-beta.19223.2 - Microsoft.DotNet.Helix.Sdk - 2.0.0-beta.19223.2 - Microsoft.DotNet.RemoteExecutor - 1.0.0-beta.19223.2 - Microsoft.DotNet.SourceRewriter - 1.0.0-beta.19223.2 --- eng/Version.Details.xml | 60 ++++++++++++++++++++--------------------- eng/Versions.props | 26 +++++++++--------- global.json | 4 +-- 3 files changed, 45 insertions(+), 45 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 1c299f98d347..dc7efa8f9305 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -30,69 +30,69 @@ https://github.com/dotnet/corefx 25fdedd999584a6e7765382b072c73eb9b1558ba - + https://github.com/dotnet/arcade - 851e36df83d3361e4bd8a70a2a8a89f762469f9a + e3919d0c158716ef4685c8e057cc58640af1af83 https://github.com/dotnet/standard 9d1d009ea48644f76f7ceb8e54aaeb942d73bb0d - + https://github.com/dotnet/arcade - 851e36df83d3361e4bd8a70a2a8a89f762469f9a + e3919d0c158716ef4685c8e057cc58640af1af83 - + https://github.com/dotnet/arcade - 851e36df83d3361e4bd8a70a2a8a89f762469f9a + e3919d0c158716ef4685c8e057cc58640af1af83 - + https://github.com/dotnet/arcade - 851e36df83d3361e4bd8a70a2a8a89f762469f9a + e3919d0c158716ef4685c8e057cc58640af1af83 - + https://github.com/dotnet/arcade - 851e36df83d3361e4bd8a70a2a8a89f762469f9a + e3919d0c158716ef4685c8e057cc58640af1af83 - + https://github.com/dotnet/arcade - 851e36df83d3361e4bd8a70a2a8a89f762469f9a + e3919d0c158716ef4685c8e057cc58640af1af83 - + https://github.com/dotnet/arcade - 851e36df83d3361e4bd8a70a2a8a89f762469f9a + e3919d0c158716ef4685c8e057cc58640af1af83 - + https://github.com/dotnet/arcade - 851e36df83d3361e4bd8a70a2a8a89f762469f9a + e3919d0c158716ef4685c8e057cc58640af1af83 - + https://github.com/dotnet/arcade - 851e36df83d3361e4bd8a70a2a8a89f762469f9a + e3919d0c158716ef4685c8e057cc58640af1af83 - + https://github.com/dotnet/arcade - 851e36df83d3361e4bd8a70a2a8a89f762469f9a + e3919d0c158716ef4685c8e057cc58640af1af83 - + https://github.com/dotnet/arcade - 851e36df83d3361e4bd8a70a2a8a89f762469f9a + e3919d0c158716ef4685c8e057cc58640af1af83 - + https://github.com/dotnet/arcade - 851e36df83d3361e4bd8a70a2a8a89f762469f9a + e3919d0c158716ef4685c8e057cc58640af1af83 - + https://github.com/dotnet/arcade - 851e36df83d3361e4bd8a70a2a8a89f762469f9a + e3919d0c158716ef4685c8e057cc58640af1af83 - + https://github.com/dotnet/arcade - 851e36df83d3361e4bd8a70a2a8a89f762469f9a + e3919d0c158716ef4685c8e057cc58640af1af83 - + https://github.com/dotnet/arcade - 851e36df83d3361e4bd8a70a2a8a89f762469f9a + e3919d0c158716ef4685c8e057cc58640af1af83 https://dev.azure.com/dnceng/internal/_git/dotnet-optimization diff --git a/eng/Versions.props b/eng/Versions.props index b1657cb5fa59..6418cde4bad6 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -23,19 +23,19 @@ - 1.0.0-beta.19222.2 - 1.0.0-beta.19222.2 - 1.0.0-beta.19222.2 - 1.0.0-beta.19222.2 - 1.0.0-beta.19222.2 - 2.4.0-beta.19222.2 - 2.5.1-beta.19222.2 - 1.0.0-beta.19222.2 - 1.0.0-beta.19222.2 - 1.0.0-beta.19222.2 - 1.0.0-beta.19222.2 - 2.2.0-beta.19222.2 - 1.0.0-beta.19222.2 + 1.0.0-beta.19223.2 + 1.0.0-beta.19223.2 + 1.0.0-beta.19223.2 + 1.0.0-beta.19223.2 + 1.0.0-beta.19223.2 + 2.4.0-beta.19223.2 + 2.5.1-beta.19223.2 + 1.0.0-beta.19223.2 + 1.0.0-beta.19223.2 + 1.0.0-beta.19223.2 + 1.0.0-beta.19223.2 + 2.2.0-beta.19223.2 + 1.0.0-beta.19223.2 3.0.0-preview6-27623-02 3.0.0-preview6-27623-02 diff --git a/global.json b/global.json index d1ea6257a1ae..20c464fe2583 100644 --- a/global.json +++ b/global.json @@ -3,8 +3,8 @@ "dotnet": "3.0.100-preview3-010431" }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19222.2", - "Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19222.2", + "Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19223.2", + "Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19223.2", "Microsoft.NET.Sdk.IL": "3.0.0-preview6-27622-74" } } From 24efeca2cb7e8a83125ecdbc62c95040fddabdf2 Mon Sep 17 00:00:00 2001 From: Jan Kotas Date: Wed, 24 Apr 2019 08:46:42 -0700 Subject: [PATCH 033/607] Fix CPINFOEXW definition (#37131) * Fix CPINFOEXW definition * Unify MAX_PATH definition and switch to use it for GetCPInfoEx --- .../src/Interop/Windows/Kernel32/Interop.GetCPInfoEx.cs | 8 ++++---- .../src/Interop/Windows/Kernel32/Interop.MaxLengths.cs | 2 -- src/Microsoft.IO.Redist/src/Microsoft.IO.Redist.csproj | 4 ++-- src/System.Console/src/System.Console.csproj | 3 +++ .../src/System.Diagnostics.Process.csproj | 3 +++ .../src/System.IO.FileSystem.DriveInfo.csproj | 6 +++--- src/System.IO.FileSystem/src/System.IO.FileSystem.csproj | 4 ++-- .../src/System.Text.Encoding.CodePages.csproj | 6 ++++++ 8 files changed, 23 insertions(+), 13 deletions(-) diff --git a/src/Common/src/Interop/Windows/Kernel32/Interop.GetCPInfoEx.cs b/src/Common/src/Interop/Windows/Kernel32/Interop.GetCPInfoEx.cs index b9218bfae375..33bd08f74760 100644 --- a/src/Common/src/Interop/Windows/Kernel32/Interop.GetCPInfoEx.cs +++ b/src/Common/src/Interop/Windows/Kernel32/Interop.GetCPInfoEx.cs @@ -9,7 +9,7 @@ internal partial class Interop internal partial class Kernel32 { [DllImport(Libraries.Kernel32, CharSet = CharSet.Unicode, EntryPoint = "GetCPInfoExW")] - private extern static unsafe int GetCPInfoExW(uint CodePage, uint dwFlags, CPINFOEXW* lpCPInfoEx); + private extern static unsafe Interop.BOOL GetCPInfoExW(uint CodePage, uint dwFlags, CPINFOEXW* lpCPInfoEx); [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)] private unsafe struct CPINFOEXW @@ -19,14 +19,14 @@ private unsafe struct CPINFOEXW internal fixed byte LeadByte[12]; internal char UnicodeDefaultChar; internal uint CodePage; - internal fixed byte CodePageName[260]; + internal fixed char CodePageName[MAX_PATH]; } internal static unsafe int GetLeadByteRanges(int codePage, byte[] leadByteRanges) { int count = 0; CPINFOEXW cpInfo; - if (GetCPInfoExW((uint) codePage, 0, &cpInfo) != 0) + if (GetCPInfoExW((uint)codePage, 0, &cpInfo) != BOOL.FALSE) { // we don't care about the last 2 bytes as those are nulls for (int i=0; i<10 && leadByteRanges[i] != 0; i+=2) @@ -44,7 +44,7 @@ internal static unsafe bool TryGetACPCodePage(out int codePage) // Note: GetACP is not available in the Windows Store Profile, but calling // GetCPInfoEx with the value CP_ACP (0) yields the same result. CPINFOEXW cpInfo; - if (GetCPInfoExW(CP_ACP, 0, &cpInfo) != 0) + if (GetCPInfoExW(CP_ACP, 0, &cpInfo) != BOOL.FALSE) { codePage = (int)cpInfo.CodePage; return true; diff --git a/src/Common/src/Interop/Windows/Kernel32/Interop.MaxLengths.cs b/src/Common/src/Interop/Windows/Kernel32/Interop.MaxLengths.cs index dc9d6216059f..4f7b588b5846 100644 --- a/src/Common/src/Interop/Windows/Kernel32/Interop.MaxLengths.cs +++ b/src/Common/src/Interop/Windows/Kernel32/Interop.MaxLengths.cs @@ -6,8 +6,6 @@ internal partial class Interop { internal partial class Kernel32 { - internal const int MAX_PATH = 260; - internal const int CREDUI_MAX_USERNAME_LENGTH = 513; } } diff --git a/src/Microsoft.IO.Redist/src/Microsoft.IO.Redist.csproj b/src/Microsoft.IO.Redist/src/Microsoft.IO.Redist.csproj index 295b77742ace..8e03fc486d02 100644 --- a/src/Microsoft.IO.Redist/src/Microsoft.IO.Redist.csproj +++ b/src/Microsoft.IO.Redist/src/Microsoft.IO.Redist.csproj @@ -145,8 +145,8 @@ Common\Interop\Windows\Interop.FILE_INFO_BY_HANDLE_CLASS.cs - - Common\Interop\Windows\Interop.MaxLengths.cs + + Common\CoreLib\Interop\Windows\Interop.MAX_PATH.cs Common\Interop\Windows\Interop.FileAttributes.cs diff --git a/src/System.Console/src/System.Console.csproj b/src/System.Console/src/System.Console.csproj index ad9d4eccbe46..3296b2468b5a 100644 --- a/src/System.Console/src/System.Console.csproj +++ b/src/System.Console/src/System.Console.csproj @@ -39,6 +39,9 @@ Common\Interop\Windows\Interop.GetCPInfoEx.cs + + Common\CoreLib\Interop\Windows\Interop.MAX_PATH.cs + Common\Interop\Windows\Interop.Libraries.cs diff --git a/src/System.Diagnostics.Process/src/System.Diagnostics.Process.csproj b/src/System.Diagnostics.Process/src/System.Diagnostics.Process.csproj index dcec78c65e50..68732d08183b 100644 --- a/src/System.Diagnostics.Process/src/System.Diagnostics.Process.csproj +++ b/src/System.Diagnostics.Process/src/System.Diagnostics.Process.csproj @@ -275,6 +275,9 @@ Common\Interop\Windows\Kernel32\Interop.GetCPInfoEx.cs + + Common\CoreLib\Interop\Windows\Interop.MAX_PATH.cs + diff --git a/src/System.IO.FileSystem.DriveInfo/src/System.IO.FileSystem.DriveInfo.csproj b/src/System.IO.FileSystem.DriveInfo/src/System.IO.FileSystem.DriveInfo.csproj index 14d7470e452a..ae5cdb0c698f 100644 --- a/src/System.IO.FileSystem.DriveInfo/src/System.IO.FileSystem.DriveInfo.csproj +++ b/src/System.IO.FileSystem.DriveInfo/src/System.IO.FileSystem.DriveInfo.csproj @@ -35,14 +35,14 @@ Common\Interop\Windows\Interop.GetDiskFreeSpaceEx.cs - - Common\Interop\Windows\Interop.MaxLengths.cs + + Common\CoreLib\Interop\Windows\Interop.MAX_PATH.cs Common\Interop\Windows\Interop.SetVolumeLabel.cs - Common\CoreLibInterop\Windows\Interop.SetThreadErrorMode.cs + Common\CoreLib\Interop\Windows\Interop.SetThreadErrorMode.cs Common\Interop\Windows\Interop.SecurityOptions.cs diff --git a/src/System.IO.FileSystem/src/System.IO.FileSystem.csproj b/src/System.IO.FileSystem/src/System.IO.FileSystem.csproj index 539e47ff4565..bf6a88db449e 100644 --- a/src/System.IO.FileSystem/src/System.IO.FileSystem.csproj +++ b/src/System.IO.FileSystem/src/System.IO.FileSystem.csproj @@ -108,8 +108,8 @@ Common\Interop\Windows\Interop.GenericOperations.cs - - Common\Interop\Windows\Interop.MaxLengths.cs + + Common\CoreLib\Interop\Windows\Interop.MAX_PATH.cs Common\Interop\Windows\Interop.WIN32_FIND_DATA.cs diff --git a/src/System.Text.Encoding.CodePages/src/System.Text.Encoding.CodePages.csproj b/src/System.Text.Encoding.CodePages/src/System.Text.Encoding.CodePages.csproj index 560705fcd28f..cd60bb263d55 100644 --- a/src/System.Text.Encoding.CodePages/src/System.Text.Encoding.CodePages.csproj +++ b/src/System.Text.Encoding.CodePages/src/System.Text.Encoding.CodePages.csproj @@ -36,9 +36,15 @@ Common\Interop\Windows\Interop.Libraries.cs + + Common\CoreLib\Interop\Windows\Interop.BOOL.cs + Common\Interop\Windows\Interop.GetCPInfoEx.cs + + Common\CoreLib\Interop\Windows\Interop.MAX_PATH.cs + Common\CoreLib\Interop\Windows\Kernel32\Interop.WideCharToMultiByte.cs From 3af119621815d869960da86e604e5e70e3ff3d4e Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Wed, 24 Apr 2019 15:56:09 +0000 Subject: [PATCH 034/607] Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-optimization build 20190424.1 (#37142) - optimization.windows_nt-x64.IBC.CoreFx - 99.99.99-master-20190424.1 --- eng/Version.Details.xml | 4 ++-- eng/Versions.props | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index dc7efa8f9305..ea1aed657a85 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -94,9 +94,9 @@ https://github.com/dotnet/arcade e3919d0c158716ef4685c8e057cc58640af1af83 - + https://dev.azure.com/dnceng/internal/_git/dotnet-optimization - 3dd3d2de27b8089bdf6880b01217cb3bab21f0c4 + 4ad3b057442a99004749552ef2cadf7f7b38d6b9 diff --git a/eng/Versions.props b/eng/Versions.props index 6418cde4bad6..0037525f7989 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -48,6 +48,6 @@ 2.1.0-prerelease.19222.2 - 99.99.99-master-20190423.1 + 99.99.99-master-20190424.1 From 942282764777c120af847f8b2cd77cec5100f5ff Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Wed, 24 Apr 2019 13:19:57 -0400 Subject: [PATCH 035/607] Update dependencies from https://github.com/dotnet/standard build 20190423.1 (#37140) - NETStandard.Library - 2.1.0-prerelease.19223.1 --- eng/Version.Details.xml | 4 ++-- eng/Versions.props | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index ea1aed657a85..6b9de05b9d8c 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -34,9 +34,9 @@ https://github.com/dotnet/arcade e3919d0c158716ef4685c8e057cc58640af1af83 - + https://github.com/dotnet/standard - 9d1d009ea48644f76f7ceb8e54aaeb942d73bb0d + 5e0984ad4d7e5d6702dbaeae1648827ab0a279ea https://github.com/dotnet/arcade diff --git a/eng/Versions.props b/eng/Versions.props index 0037525f7989..a27954dc33d9 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -46,7 +46,7 @@ 3.0.0-preview6.19223.9 - 2.1.0-prerelease.19222.2 + 2.1.0-prerelease.19223.1 99.99.99-master-20190424.1 From dd90cba497fa5451d3334211438b354e861ebccc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Strehovsk=C3=BD?= Date: Wed, 24 Apr 2019 15:24:31 +0200 Subject: [PATCH 036/607] Fix ProjectN build breaks (dotnet/corert#7343) Porting changes from the non-WinRT files. Signed-off-by: dotnet-bot --- .../CoreLib/Interop/Windows/Kernel32/Interop.CreateFile2.cs | 6 ++++-- src/Common/src/CoreLib/System/IO/FileStream.WinRT.cs | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.CreateFile2.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.CreateFile2.cs index fc9806132269..f6fde1230e6a 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.CreateFile2.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.CreateFile2.cs @@ -4,6 +4,7 @@ #nullable enable using Microsoft.Win32.SafeHandles; +using System.Diagnostics; using System.IO; using System.Runtime.InteropServices; @@ -26,8 +27,9 @@ internal static SafeFileHandle CreateFile2( FileMode dwCreationDisposition, ref Kernel32.CREATEFILE2_EXTENDED_PARAMETERS pCreateExParams) { - lpFileName = PathInternal.EnsureExtendedPrefixOverMaxPath(lpFileName); - return CreateFile2Private(lpFileName, dwDesiredAccess, dwShareMode, dwCreationDisposition, ref pCreateExParams); + string? lpFileNameWithPrefix = PathInternal.EnsureExtendedPrefixIfNeeded(lpFileName); + Debug.Assert(lpFileNameWithPrefix != null, "null not expected when non-null passed"); // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + return CreateFile2Private(lpFileNameWithPrefix, dwDesiredAccess, dwShareMode, dwCreationDisposition, ref pCreateExParams); } } } diff --git a/src/Common/src/CoreLib/System/IO/FileStream.WinRT.cs b/src/Common/src/CoreLib/System/IO/FileStream.WinRT.cs index 752a6d9d8a96..937316568be5 100644 --- a/src/Common/src/CoreLib/System/IO/FileStream.WinRT.cs +++ b/src/Common/src/CoreLib/System/IO/FileStream.WinRT.cs @@ -4,6 +4,7 @@ #nullable enable using Microsoft.Win32.SafeHandles; +using System.Diagnostics; using System.Runtime.InteropServices; namespace System.IO @@ -33,6 +34,7 @@ private unsafe SafeFileHandle OpenHandle(FileMode mode, FileShare share, FileOpt using (DisableMediaInsertionPrompt.Create()) { + Debug.Assert(_path != null); return ValidateFileHandle(Interop.Kernel32.CreateFile2( lpFileName: _path, dwDesiredAccess: access, From 7f60d72fb64cfacec41f47d59ac5e35ed54aa442 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Wed, 24 Apr 2019 17:33:37 +0000 Subject: [PATCH 037/607] [master] Update dependencies from dotnet/coreclr (#37141) * Update dependencies from https://github.com/dotnet/coreclr build 20190423.74 - Microsoft.NET.Sdk.IL - 3.0.0-preview6-27623-74 - Microsoft.NETCore.ILAsm - 3.0.0-preview6-27623-74 - Microsoft.NETCore.Runtime.CoreCLR - 3.0.0-preview6-27623-74 * Update ThreadPool test for revised behavior --- eng/Version.Details.xml | 12 ++++++------ eng/Versions.props | 4 ++-- global.json | 2 +- .../tests/ThreadPoolTests.cs | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 6b9de05b9d8c..96dc5266920e 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -1,16 +1,16 @@ - + https://github.com/dotnet/coreclr - c0cae0a041549edd759366eb3e732f8348b466b3 + 22c467297d0d537c2e647ec5c5b4256ab42b18bb - + https://github.com/dotnet/coreclr - c0cae0a041549edd759366eb3e732f8348b466b3 + 22c467297d0d537c2e647ec5c5b4256ab42b18bb - + https://github.com/dotnet/coreclr - c0cae0a041549edd759366eb3e732f8348b466b3 + 22c467297d0d537c2e647ec5c5b4256ab42b18bb diff --git a/eng/Versions.props b/eng/Versions.props index a27954dc33d9..6d37cdf14e9a 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -41,8 +41,8 @@ 3.0.0-preview6-27623-02 3.0.0-preview6-27623-02 - 3.0.0-preview6-27622-74 - 3.0.0-preview6-27622-74 + 3.0.0-preview6-27623-74 + 3.0.0-preview6-27623-74 3.0.0-preview6.19223.9 diff --git a/global.json b/global.json index 20c464fe2583..7aa09548b28e 100644 --- a/global.json +++ b/global.json @@ -5,6 +5,6 @@ "msbuild-sdks": { "Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19223.2", "Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19223.2", - "Microsoft.NET.Sdk.IL": "3.0.0-preview6-27622-74" + "Microsoft.NET.Sdk.IL": "3.0.0-preview6-27623-74" } } diff --git a/src/System.Threading.ThreadPool/tests/ThreadPoolTests.cs b/src/System.Threading.ThreadPool/tests/ThreadPoolTests.cs index a04a0be2a003..02fbf948da19 100644 --- a/src/System.Threading.ThreadPool/tests/ThreadPoolTests.cs +++ b/src/System.Threading.ThreadPool/tests/ThreadPoolTests.cs @@ -114,7 +114,7 @@ public static void SetMinMaxThreadsTest() VerifyMaxThreads(MaxPossibleThreadCount, MaxPossibleThreadCount); Assert.True(ThreadPool.SetMaxThreads(MaxPossibleThreadCount + 1, MaxPossibleThreadCount + 1)); VerifyMaxThreads(MaxPossibleThreadCount, MaxPossibleThreadCount); - Assert.True(ThreadPool.SetMaxThreads(-1, -1)); + Assert.Equal(PlatformDetection.IsFullFramework, ThreadPool.SetMaxThreads(-1, -1)); VerifyMaxThreads(MaxPossibleThreadCount, MaxPossibleThreadCount); Assert.True(ThreadPool.SetMinThreads(MaxPossibleThreadCount, MaxPossibleThreadCount)); From c73d2c15c0194ead26d54cb72224f2daf1e1c5cc Mon Sep 17 00:00:00 2001 From: Zachary Danz Date: Wed, 24 Apr 2019 10:57:55 -0700 Subject: [PATCH 038/607] Fix link to Preview SDKs (#37150) --- Documentation/building/windows-instructions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/building/windows-instructions.md b/Documentation/building/windows-instructions.md index ba6bf631a799..ba46273e780a 100644 --- a/Documentation/building/windows-instructions.md +++ b/Documentation/building/windows-instructions.md @@ -8,7 +8,7 @@ Building CoreFX on Windows ## Recommended Software 1. **[Visual Studio 2019 Preview](https://visualstudio.microsoft.com/vs/preview/)** (Community, Professional, Enterprise) with the latest update should be installed. The Community version is completely free. -1. **[.NET Core SDK](https://www.microsoft.com/net/download/windows)** >= v3.0.0-preview3 should be installed, which will add the `dotnet` toolchain to your path. +1. **[.NET Core SDK](https://dotnet.microsoft.com/download/dotnet-core/3.0)** >= v3.0.0-preview3 should be installed, which will add the `dotnet` toolchain to your path. ### Visual Studio 2019 From cf0624854a1a4d8eda961a6eb06bb803b0555dfd Mon Sep 17 00:00:00 2001 From: Steve Harter Date: Wed, 24 Apr 2019 11:37:04 -0700 Subject: [PATCH 039/607] Fix JSON deserializer property name escaping and address naming feedback (#37124) --- .../src/Resources/Strings.resx | 4 +- .../JsonClassInfo.AddProperty.cs | 4 +- .../Text/Json/Serialization/JsonClassInfo.cs | 4 +- .../Json/Serialization/JsonNamingPolicy.cs | 4 +- .../Json/Serialization/JsonPropertyInfo.cs | 119 ++++++++++-------- .../Serialization/JsonPropertyInfoCommon.cs | 20 +-- .../JsonPropertyInfoNotNullable.cs | 17 +-- .../Serialization/JsonPropertyInfoNullable.cs | 14 +-- .../Json/Serialization/JsonSerializer.Read.cs | 33 ++++- .../JsonSerializer.Write.HandleDictionary.cs | 8 ++ .../tests/Serialization/DictionaryTests.cs | 36 ++++++ .../tests/Serialization/PropertyNameTests.cs | 33 +++++ .../tests/Serialization/TestClasses.cs | 8 ++ 13 files changed, 215 insertions(+), 89 deletions(-) diff --git a/src/System.Text.Json/src/Resources/Strings.resx b/src/System.Text.Json/src/Resources/Strings.resx index 4184ecbdba25..a403565943ca 100644 --- a/src/System.Text.Json/src/Resources/Strings.resx +++ b/src/System.Text.Json/src/Resources/Strings.resx @@ -328,9 +328,9 @@ Cannot write a comment value which contains the end of comment delimiter. - The property '{0}.{1}' has the same name as a previous property based on naming or casing policies. + The JSON property name for '{0}.{1}' collides with another property. - The property name for '{0}.{1}' cannot be null as a result of naming policies. + The JSON property name for '{0}.{1}' cannot be null. \ No newline at end of file diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonClassInfo.AddProperty.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonClassInfo.AddProperty.cs index 1e5998046863..a9c5c5a9aa1d 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonClassInfo.AddProperty.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonClassInfo.AddProperty.cs @@ -25,7 +25,7 @@ private JsonPropertyInfo AddProperty(Type propertyType, PropertyInfo propertyInf if (propertyInfo != null) { - _propertyRefs.Add(new PropertyRef(GetKey(jsonInfo.CompareName), jsonInfo)); + _propertyRefs.Add(new PropertyRef(GetKey(jsonInfo.NameUsedToCompare), jsonInfo)); } else { @@ -60,7 +60,7 @@ internal JsonPropertyInfo CreateProperty(Type declaredPropertyType, Type runtime JsonPropertyInfo jsonInfo = (JsonPropertyInfo)Activator.CreateInstance( propertyInfoClassType, - BindingFlags.Instance | BindingFlags.NonPublic, + BindingFlags.Instance | BindingFlags.Public, binder: null, new object[] { parentClassType, declaredPropertyType, runtimePropertyType, propertyInfo, collectionElementType, options }, culture: null); diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonClassInfo.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonClassInfo.cs index c97b0f6d2602..d26b4ec1e6bc 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonClassInfo.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonClassInfo.cs @@ -102,7 +102,7 @@ internal JsonClassInfo(Type type, JsonSerializerOptions options) } // If the JsonPropertyNameAttribute or naming policy results in collisions, throw an exception. - if (!propertyNames.Add(jsonPropertyInfo.CompareNameAsString)) + if (!propertyNames.Add(jsonPropertyInfo.NameUsedToCompareAsString)) { ThrowHelper.ThrowInvalidOperationException_SerializerPropertyNameConflict(this, jsonPropertyInfo); } @@ -242,7 +242,7 @@ private static bool TryIsPropertyRefEqual(ref PropertyRef propertyRef, ReadOnlyS { if (propertyName.Length <= PropertyNameKeyLength || // We compare the whole name, although we could skip the first 6 bytes (but it's likely not any faster) - propertyName.SequenceEqual((ReadOnlySpan)propertyRef.Info.CompareName)) + propertyName.SequenceEqual(propertyRef.Info.NameUsedToCompare)) { info = propertyRef.Info; return true; diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonNamingPolicy.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonNamingPolicy.cs index ff4a2a360eb6..32c4ffbc3de4 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonNamingPolicy.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonNamingPolicy.cs @@ -5,7 +5,7 @@ namespace System.Text.Json.Serialization { /// - /// Determines the naming policy used to convert a JSON name to another format, such as a camel-casing format. + /// Determines the naming policy used to convert a string-based name to another format, such as a camel-casing format. /// public abstract class JsonNamingPolicy { @@ -17,7 +17,7 @@ protected JsonNamingPolicy() { } public static JsonNamingPolicy CamelCase { get; } = new JsonCamelCaseNamePolicy(); /// - /// Converts the provided name. + /// When overridden in a derived class, converts the specified name according to the policy. /// /// The name to convert. /// The converted name. diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfo.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfo.cs index f40258686284..1fb7bc1b4bcb 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfo.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfo.cs @@ -17,37 +17,36 @@ internal abstract class JsonPropertyInfo private static readonly JsonEnumerableConverter s_jsonArrayConverter = new DefaultArrayConverter(); private static readonly JsonEnumerableConverter s_jsonEnumerableConverter = new DefaultEnumerableConverter(); - internal ClassType ClassType; + public ClassType ClassType; // The name of the property with any casing policy or the name specified from JsonPropertyNameAttribute. private byte[] _name { get; set; } - internal ReadOnlySpan Name => _name; - internal string NameAsString { get; private set; } + public ReadOnlySpan Name => _name; + public string NameAsString { get; private set; } // Used to support case-insensitive comparison - private byte[] _compareName { get; set; } - internal ReadOnlySpan CompareName => _compareName; - internal string CompareNameAsString { get; private set; } + private byte[] _nameUsedToCompare { get; set; } + public ReadOnlySpan NameUsedToCompare => _nameUsedToCompare; + public string NameUsedToCompareAsString { get; private set; } // The escaped name passed to the writer. - internal byte[] _escapedName { get; private set; } - internal ReadOnlySpan EscapedName => _escapedName; + public byte[] _escapedName { get; private set; } - internal bool HasGetter { get; set; } - internal bool HasSetter { get; set; } - internal bool ShouldSerialize { get; private set; } - internal bool ShouldDeserialize { get; private set; } + public bool HasGetter { get; set; } + public bool HasSetter { get; set; } + public bool ShouldSerialize { get; private set; } + public bool ShouldDeserialize { get; private set; } - internal bool IgnoreNullValues { get; private set; } + public bool IgnoreNullValues { get; private set; } // todo: to minimize hashtable lookups, cache JsonClassInfo: //public JsonClassInfo ClassInfo; // Constructor used for internal identifiers - internal JsonPropertyInfo() { } + public JsonPropertyInfo() { } - internal JsonPropertyInfo( + public JsonPropertyInfo( Type parentClassType, Type declaredPropertyType, Type runtimePropertyType, @@ -70,21 +69,21 @@ internal JsonPropertyInfo( CanBeNull = IsNullableType || !runtimePropertyType.IsValueType; } - internal bool CanBeNull { get; private set; } - internal JsonClassInfo ElementClassInfo { get; private set; } - internal JsonEnumerableConverter EnumerableConverter { get; private set; } + public bool CanBeNull { get; private set; } + public JsonClassInfo ElementClassInfo { get; private set; } + public JsonEnumerableConverter EnumerableConverter { get; private set; } - internal bool IsNullableType { get; private set; } + public bool IsNullableType { get; private set; } - internal PropertyInfo PropertyInfo { get; private set; } + public PropertyInfo PropertyInfo { get; private set; } - internal Type ParentClassType { get; private set; } + public Type ParentClassType { get; private set; } - internal Type DeclaredPropertyType { get; private set; } + public Type DeclaredPropertyType { get; private set; } - internal Type RuntimePropertyType { get; private set; } + public Type RuntimePropertyType { get; private set; } - internal virtual void GetPolicies(JsonSerializerOptions options) + public virtual void GetPolicies(JsonSerializerOptions options) { DetermineSerializationCapabilities(options); DeterminePropertyName(options); @@ -99,8 +98,8 @@ private void DeterminePropertyName(JsonSerializerOptions options) if (nameAttribute != null) { NameAsString = nameAttribute.Name; - - // This is detected and thrown by caller. + + // null is not valid; JsonClassInfo throws an InvalidOperationException after this return. if (NameAsString == null) { return; @@ -110,7 +109,7 @@ private void DeterminePropertyName(JsonSerializerOptions options) { NameAsString = options.PropertyNamingPolicy.ConvertName(PropertyInfo.Name); - // This is detected and thrown by caller. + // null is not valid; JsonClassInfo throws an InvalidOperationException after this return. if (NameAsString == null) { return; @@ -127,16 +126,21 @@ private void DeterminePropertyName(JsonSerializerOptions options) // Set the compare name. if (options.PropertyNameCaseInsensitive) { - CompareNameAsString = NameAsString.ToUpperInvariant(); - _compareName = Encoding.UTF8.GetBytes(CompareNameAsString); + NameUsedToCompareAsString = NameAsString.ToUpperInvariant(); + _nameUsedToCompare = Encoding.UTF8.GetBytes(NameUsedToCompareAsString); } else { - CompareNameAsString = NameAsString; - _compareName = _name; + NameUsedToCompareAsString = NameAsString; + _nameUsedToCompare = _name; } // Cache the escaped name. +#if true + // temporary behavior until the writer can accept escaped string. + _escapedName = _name; +#else + int valueIdx = JsonWriterHelper.NeedsEscaping(_name); if (valueIdx == -1) { @@ -144,18 +148,25 @@ private void DeterminePropertyName(JsonSerializerOptions options) } else { + byte[] pooledName = null; int length = JsonWriterHelper.GetMaxEscapedLength(_name.Length, valueIdx); - byte[] tempArray = ArrayPool.Shared.Rent(length); + Span escapedName = length <= JsonConstants.StackallocThreshold ? + stackalloc byte[length] : + (pooledName = ArrayPool.Shared.Rent(length)); + + JsonWriterHelper.EscapeString(_name, escapedName, 0, out int written); - JsonWriterHelper.EscapeString(_name, tempArray, valueIdx, out int written); - _escapedName = new byte[written]; - tempArray.CopyTo(_escapedName, 0); + _escapedName = escapedName.Slice(0, written).ToArray(); - // We clear the array because it is "user data" (although a property name). - new Span(tempArray, 0, written).Clear(); - ArrayPool.Shared.Return(tempArray); + if (pooledName != null) + { + // We clear the array because it is "user data" (although a property name). + new Span(pooledName, 0, written).Clear(); + ArrayPool.Shared.Return(pooledName); + } } +#endif } } @@ -226,40 +237,40 @@ private void DetermineSerializationCapabilities(JsonSerializerOptions options) } // After the property is added, clear any state not used later. - internal void ClearUnusedValuesAfterAdd() + public void ClearUnusedValuesAfterAdd() { NameAsString = null; - CompareNameAsString = null; + NameUsedToCompareAsString = null; } // Copy any settings defined at run-time to the new property. - internal void CopyRuntimeSettingsTo(JsonPropertyInfo other) + public void CopyRuntimeSettingsTo(JsonPropertyInfo other) { other._name = _name; - other._compareName = _compareName; + other._nameUsedToCompare = _nameUsedToCompare; other._escapedName = _escapedName; } - internal abstract object GetValueAsObject(object obj, JsonSerializerOptions options); + public abstract object GetValueAsObject(object obj, JsonSerializerOptions options); - internal TAttribute GetAttribute() where TAttribute : Attribute + public TAttribute GetAttribute() where TAttribute : Attribute { return (TAttribute)PropertyInfo?.GetCustomAttribute(typeof(TAttribute), inherit: false); } - internal abstract void ApplyNullValue(JsonSerializerOptions options, ref ReadStack state); - - internal abstract IList CreateConverterList(); + public abstract void ApplyNullValue(JsonSerializerOptions options, ref ReadStack state); + + public abstract IList CreateConverterList(); - internal abstract Type GetConcreteType(Type interfaceType); + public abstract Type GetConcreteType(Type interfaceType); - internal abstract void Read(JsonTokenType tokenType, JsonSerializerOptions options, ref ReadStack state, ref Utf8JsonReader reader); - internal abstract void ReadEnumerable(JsonTokenType tokenType, JsonSerializerOptions options, ref ReadStack state, ref Utf8JsonReader reader); - internal abstract void SetValueAsObject(object obj, object value, JsonSerializerOptions options); + public abstract void Read(JsonTokenType tokenType, JsonSerializerOptions options, ref ReadStack state, ref Utf8JsonReader reader); + public abstract void ReadEnumerable(JsonTokenType tokenType, JsonSerializerOptions options, ref ReadStack state, ref Utf8JsonReader reader); + public abstract void SetValueAsObject(object obj, object value, JsonSerializerOptions options); - internal abstract void Write(JsonSerializerOptions options, ref WriteStackFrame current, Utf8JsonWriter writer); + public abstract void Write(JsonSerializerOptions options, ref WriteStackFrame current, Utf8JsonWriter writer); - internal abstract void WriteDictionary(JsonSerializerOptions options, ref WriteStackFrame current, Utf8JsonWriter writer); - internal abstract void WriteEnumerable(JsonSerializerOptions options, ref WriteStackFrame current, Utf8JsonWriter writer); + public abstract void WriteDictionary(JsonSerializerOptions options, ref WriteStackFrame current, Utf8JsonWriter writer); + public abstract void WriteEnumerable(JsonSerializerOptions options, ref WriteStackFrame current, Utf8JsonWriter writer); } } diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfoCommon.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfoCommon.cs index f99150d10145..b1e5e12d6b19 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfoCommon.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfoCommon.cs @@ -16,16 +16,16 @@ namespace System.Text.Json.Serialization /// internal abstract class JsonPropertyInfoCommon : JsonPropertyInfo { - internal bool _isPropertyPolicy; - internal Func Get { get; private set; } - internal Action Set { get; private set; } + public bool _isPropertyPolicy; + public Func Get { get; private set; } + public Action Set { get; private set; } public JsonValueConverter ValueConverter { get; internal set; } // Constructor used for internal identifiers - internal JsonPropertyInfoCommon() { } + public JsonPropertyInfoCommon() { } - internal JsonPropertyInfoCommon( + public JsonPropertyInfoCommon( Type parentClassType, Type declaredPropertyType, Type runtimePropertyType, @@ -63,13 +63,13 @@ internal JsonPropertyInfoCommon( GetPolicies(options); } - internal override void GetPolicies(JsonSerializerOptions options) + public override void GetPolicies(JsonSerializerOptions options) { ValueConverter = DefaultConverters.s_converter; base.GetPolicies(options); } - internal override object GetValueAsObject(object obj, JsonSerializerOptions options) + public override object GetValueAsObject(object obj, JsonSerializerOptions options) { if (_isPropertyPolicy) { @@ -80,7 +80,7 @@ internal override object GetValueAsObject(object obj, JsonSerializerOptions opti return Get((TClass)obj); } - internal override void SetValueAsObject(object obj, object value, JsonSerializerOptions options) + public override void SetValueAsObject(object obj, object value, JsonSerializerOptions options) { Debug.Assert(Set != null); TDeclaredProperty typedValue = (TDeclaredProperty)value; @@ -91,13 +91,13 @@ internal override void SetValueAsObject(object obj, object value, JsonSerializer } } - internal override IList CreateConverterList() + public override IList CreateConverterList() { return new List(); } // Map interfaces to a well-known implementation. - internal override Type GetConcreteType(Type interfaceType) + public override Type GetConcreteType(Type interfaceType) { if (interfaceType.IsAssignableFrom(typeof(IDictionary)) || interfaceType.IsAssignableFrom(typeof(IReadOnlyDictionary))) diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfoNotNullable.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfoNotNullable.cs index 6dfea95e9009..b07fe0245a01 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfoNotNullable.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfoNotNullable.cs @@ -17,9 +17,9 @@ internal sealed class JsonPropertyInfoNotNullable // should this be cached somewhere else so that it's not populated per TClass as well as TProperty? private static readonly Type s_underlyingType = typeof(TProperty); - internal JsonPropertyInfoNullable( + public JsonPropertyInfoNullable( Type parentClassType, Type declaredPropertyType, Type runtimePropertyType, @@ -30,7 +30,7 @@ internal JsonPropertyInfoNullable( { } - internal override void Read(JsonTokenType tokenType, JsonSerializerOptions options, ref ReadStack state, ref Utf8JsonReader reader) + public override void Read(JsonTokenType tokenType, JsonSerializerOptions options, ref ReadStack state, ref Utf8JsonReader reader) { if (ElementClassInfo != null) { @@ -61,7 +61,7 @@ internal override void Read(JsonTokenType tokenType, JsonSerializerOptions optio } } - internal override void ReadEnumerable(JsonTokenType tokenType, JsonSerializerOptions options, ref ReadStack state, ref Utf8JsonReader reader) + public override void ReadEnumerable(JsonTokenType tokenType, JsonSerializerOptions options, ref ReadStack state, ref Utf8JsonReader reader) { if (ValueConverter == null || !ValueConverter.TryRead(typeof(TProperty), ref reader, out TProperty value)) { @@ -74,14 +74,14 @@ internal override void ReadEnumerable(JsonTokenType tokenType, JsonSerializerOpt JsonSerializer.ApplyValueToEnumerable(ref nullableValue, options, ref state.Current); } - internal override void ApplyNullValue(JsonSerializerOptions options, ref ReadStack state) + public override void ApplyNullValue(JsonSerializerOptions options, ref ReadStack state) { TProperty? nullableValue = null; JsonSerializer.ApplyValueToEnumerable(ref nullableValue, options, ref state.Current); } // todo: have the caller check if current.Enumerator != null and call WriteEnumerable of the underlying property directly to avoid an extra virtual call. - internal override void Write(JsonSerializerOptions options, ref WriteStackFrame current, Utf8JsonWriter writer) + public override void Write(JsonSerializerOptions options, ref WriteStackFrame current, Utf8JsonWriter writer) { if (current.Enumerator != null) { @@ -126,12 +126,12 @@ internal override void Write(JsonSerializerOptions options, ref WriteStackFrame } } - internal override void WriteDictionary(JsonSerializerOptions options, ref WriteStackFrame current, Utf8JsonWriter writer) + public override void WriteDictionary(JsonSerializerOptions options, ref WriteStackFrame current, Utf8JsonWriter writer) { JsonSerializer.WriteDictionary(ValueConverter, options, ref current, writer); } - internal override void WriteEnumerable(JsonSerializerOptions options, ref WriteStackFrame current, Utf8JsonWriter writer) + public override void WriteEnumerable(JsonSerializerOptions options, ref WriteStackFrame current, Utf8JsonWriter writer) { if (ValueConverter != null) { diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.cs index 3635039a1856..08b8d0bfc239 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.cs @@ -42,8 +42,6 @@ private static void ReadCore( Debug.Assert(state.Current.ReturnValue != default); Debug.Assert(state.Current.JsonClassInfo != default); - ReadOnlySpan propertyName = reader.HasValueSequence ? reader.ValueSequence.ToArray() : reader.ValueSpan; - if (state.Current.IsDictionary()) { string keyName = reader.GetString(); @@ -57,6 +55,14 @@ private static void ReadCore( } else { + ReadOnlySpan propertyName = reader.HasValueSequence ? reader.ValueSequence.ToArray() : reader.ValueSpan; + if (reader._stringHasEscaping) + { + int idx = propertyName.IndexOf(JsonConstants.BackSlash); + Debug.Assert(idx != -1); + propertyName = GetUnescapedString(propertyName, idx); + } + state.Current.JsonPropertyInfo = state.Current.JsonClassInfo.GetProperty(options, propertyName, ref state.Current); if (state.Current.JsonPropertyInfo == null) { @@ -100,5 +106,28 @@ private static void ReadCore( return; } + + private static ReadOnlySpan GetUnescapedString(ReadOnlySpan utf8Source, int idx) + { + // The escaped name is always longer than the unescaped, so it is safe to use escaped name for the buffer length. + int length = utf8Source.Length; + byte[] pooledName = null; + + Span unescapedName = length <= JsonConstants.StackallocThreshold ? + stackalloc byte[length] : + (pooledName = ArrayPool.Shared.Rent(length)); + + JsonReaderHelper.Unescape(utf8Source, unescapedName, idx, out int written); + ReadOnlySpan propertyName = unescapedName.Slice(0, written).ToArray(); + + if (pooledName != null) + { + // We clear the array because it is "user data" (although a property name). + new Span(pooledName, 0, written).Clear(); + ArrayPool.Shared.Return(pooledName); + } + + return propertyName; + } } } diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.HandleDictionary.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.HandleDictionary.cs index d826a6851720..bcacc6fe8b57 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.HandleDictionary.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.HandleDictionary.cs @@ -119,6 +119,11 @@ internal static void WriteDictionary( } else { +#if true + // temporary behavior until the writer can accept escaped string. + byte[] utf8Key = Encoding.UTF8.GetBytes(key); + converter.Write(utf8Key, value, writer); +#else byte[] pooledKey = null; byte[] utf8Key = Encoding.UTF8.GetBytes(key); int length = JsonWriterHelper.GetMaxEscapedLength(utf8Key.Length, 0); @@ -133,8 +138,11 @@ internal static void WriteDictionary( if (pooledKey != null) { + // We clear the array because it is "user data" (although a property name). + new Span(pooledKey, 0, written).Clear(); ArrayPool.Shared.Return(pooledKey); } +#endif } } } diff --git a/src/System.Text.Json/tests/Serialization/DictionaryTests.cs b/src/System.Text.Json/tests/Serialization/DictionaryTests.cs index 0d984b96cc5a..13c7a09351f4 100644 --- a/src/System.Text.Json/tests/Serialization/DictionaryTests.cs +++ b/src/System.Text.Json/tests/Serialization/DictionaryTests.cs @@ -55,5 +55,41 @@ public static void ThrowsOnDuplicateKeys() // todo: this should throw a JsonReaderException Assert.Throws(() => JsonSerializer.Parse>(@"{""Hello"":""World"", ""Hello"":""World""}")); } + + [Fact] + public static void UnicodePropertyNames() + { + { + Dictionary obj = JsonSerializer.Parse>(@"{""Aѧ"":1}"); + Assert.Equal(1, obj["Aѧ"]); + + // Verify the name is escaped after serialize. + string json = JsonSerializer.ToString(obj); + Assert.Equal(@"{""A\u0467"":1}", json); + } + + { + // We want to go over StackallocThreshold=256 to force a pooled allocation, so this property is 200 chars and 400 bytes. + const int charsInProperty = 200; + + string longPropertyName = new string('ѧ', charsInProperty); + + Dictionary obj = JsonSerializer.Parse>($"{{\"{longPropertyName}\":1}}"); + Assert.Equal(1, obj[longPropertyName]); + + // Verify the name is escaped after serialize. + string json = JsonSerializer.ToString(obj); + + // Duplicate the unicode character 'charsInProperty' times. + string longPropertyNameEscaped = new StringBuilder().Insert(0, @"\u0467", charsInProperty).ToString(); + + string expectedJson = $"{{\"{longPropertyNameEscaped}\":1}}"; + Assert.Equal(expectedJson, json); + + // Verify the name is unescaped after deserialize. + obj = JsonSerializer.Parse>(json); + Assert.Equal(1, obj[longPropertyName]); + } + } } } diff --git a/src/System.Text.Json/tests/Serialization/PropertyNameTests.cs b/src/System.Text.Json/tests/Serialization/PropertyNameTests.cs index 0bb3ba169d7a..b9de228660fd 100644 --- a/src/System.Text.Json/tests/Serialization/PropertyNameTests.cs +++ b/src/System.Text.Json/tests/Serialization/PropertyNameTests.cs @@ -2,6 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System.Collections.Generic; +using System.Text.Json.Tests; using Xunit; namespace System.Text.Json.Serialization.Tests @@ -226,6 +228,37 @@ public static void EmptyPropertyName() Assert.Equal(1, obj.MyInt1); } } + + [Fact] + public static void UnicodePropertyNames() + { + { + ClassWithUnicodeProperty obj = JsonSerializer.Parse(@"{""Aѧ"":1}"); + Assert.Equal(1, obj.Aѧ); + + // Verify the name is escaped after serialize. + string json = JsonSerializer.ToString(obj); + Assert.Contains(@"""A\u0467"":1", json); + + // Verify the name is unescaped after deserialize. + obj = JsonSerializer.Parse(json); + Assert.Equal(1, obj.Aѧ); + } + + { + // We want to go over StackallocThreshold=256 to force a pooled allocation, so this property is 400 chars and 401 bytes. + ClassWithUnicodeProperty obj = JsonSerializer.Parse(@"{""Aѧ34567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890"":1}"); + Assert.Equal(1, obj.Aѧ34567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890); + + // Verify the name is escaped after serialize. + string json = JsonSerializer.ToString(obj); + Assert.Contains(@"""A\u046734567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890"":1", json); + + // Verify the name is unescaped after deserialize. + obj = JsonSerializer.Parse(json); + Assert.Equal(1, obj.Aѧ34567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890); + } + } } public class OverridePropertyNameDesignTime_TestClass diff --git a/src/System.Text.Json/tests/Serialization/TestClasses.cs b/src/System.Text.Json/tests/Serialization/TestClasses.cs index 826e1d478a31..1bc8df11ed95 100644 --- a/src/System.Text.Json/tests/Serialization/TestClasses.cs +++ b/src/System.Text.Json/tests/Serialization/TestClasses.cs @@ -962,4 +962,12 @@ public void Verify() Assert.Equal(98052, mainSite.zip); } } + + public class ClassWithUnicodeProperty + { + public int Aѧ { get; set; } + + // A 400 character property name with a unicode character making it 401 bytes. + public int Aѧ34567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 { get; set; } + } } From 51922de496a713568b493e791c60e419042d19b5 Mon Sep 17 00:00:00 2001 From: Jan Kotas Date: Wed, 24 Apr 2019 17:06:30 -0700 Subject: [PATCH 040/607] Unify WIN32_FIND_DATA (#37158) --- .../Windows/Kernel32/Interop.FILE_TIME.cs | 0 .../Interop.GET_FILEEX_INFO_LEVELS.cs | 0 .../Kernel32/Interop.GetFileAttributesEx.cs | 68 ------------------- .../Interop.WIN32_FILE_ATTRIBUTE_DATA.cs | 0 .../Kernel32/Interop.WIN32_FIND_DATA.cs | 0 .../System.Private.CoreLib.Shared.projitems | 4 ++ .../Kernel32/Interop.GetFileAttributesEx.cs | 24 ------- .../src/Microsoft.IO.Redist.csproj | 10 +-- .../src/System.IO.FileSystem.csproj | 18 ++--- 9 files changed, 18 insertions(+), 106 deletions(-) rename src/Common/src/{ => CoreLib}/Interop/Windows/Kernel32/Interop.FILE_TIME.cs (100%) rename src/Common/src/{ => CoreLib}/Interop/Windows/Kernel32/Interop.GET_FILEEX_INFO_LEVELS.cs (100%) rename src/Common/src/{ => CoreLib}/Interop/Windows/Kernel32/Interop.WIN32_FILE_ATTRIBUTE_DATA.cs (100%) rename src/Common/src/{ => CoreLib}/Interop/Windows/Kernel32/Interop.WIN32_FIND_DATA.cs (100%) delete mode 100644 src/Common/src/Interop/Windows/Kernel32/Interop.GetFileAttributesEx.cs diff --git a/src/Common/src/Interop/Windows/Kernel32/Interop.FILE_TIME.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.FILE_TIME.cs similarity index 100% rename from src/Common/src/Interop/Windows/Kernel32/Interop.FILE_TIME.cs rename to src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.FILE_TIME.cs diff --git a/src/Common/src/Interop/Windows/Kernel32/Interop.GET_FILEEX_INFO_LEVELS.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GET_FILEEX_INFO_LEVELS.cs similarity index 100% rename from src/Common/src/Interop/Windows/Kernel32/Interop.GET_FILEEX_INFO_LEVELS.cs rename to src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GET_FILEEX_INFO_LEVELS.cs diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetFileAttributesEx.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetFileAttributesEx.cs index 624404952f77..b833e8b3a699 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetFileAttributesEx.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetFileAttributesEx.cs @@ -25,73 +25,5 @@ internal static bool GetFileAttributesEx(string name, GET_FILEEX_INFO_LEVELS fil Debug.Assert(nameWithExtendedPrefix != null, "null not expected when non-null is passed"); // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 return GetFileAttributesExPrivate(nameWithExtendedPrefix, fileInfoLevel, ref lpFileInformation); } - - internal enum GET_FILEEX_INFO_LEVELS : uint - { - GetFileExInfoStandard = 0x0u, - GetFileExMaxInfoLevel = 0x1u, - } - - internal struct WIN32_FILE_ATTRIBUTE_DATA - { - internal int dwFileAttributes; - internal uint ftCreationTimeLow; - internal uint ftCreationTimeHigh; - internal uint ftLastAccessTimeLow; - internal uint ftLastAccessTimeHigh; - internal uint ftLastWriteTimeLow; - internal uint ftLastWriteTimeHigh; - internal uint fileSizeHigh; - internal uint fileSizeLow; - - internal void PopulateFrom(ref WIN32_FIND_DATA findData) - { - // Copy the information to data - dwFileAttributes = (int)findData.dwFileAttributes; - ftCreationTimeLow = findData.ftCreationTime.dwLowDateTime; - ftCreationTimeHigh = findData.ftCreationTime.dwHighDateTime; - ftLastAccessTimeLow = findData.ftLastAccessTime.dwLowDateTime; - ftLastAccessTimeHigh = findData.ftLastAccessTime.dwHighDateTime; - ftLastWriteTimeLow = findData.ftLastWriteTime.dwLowDateTime; - ftLastWriteTimeHigh = findData.ftLastWriteTime.dwHighDateTime; - fileSizeHigh = findData.nFileSizeHigh; - fileSizeLow = findData.nFileSizeLow; - } - } - - [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)] - [BestFitMapping(false)] - internal unsafe struct WIN32_FIND_DATA - { - internal uint dwFileAttributes; - internal FILE_TIME ftCreationTime; - internal FILE_TIME ftLastAccessTime; - internal FILE_TIME ftLastWriteTime; - internal uint nFileSizeHigh; - internal uint nFileSizeLow; - internal uint dwReserved0; - internal uint dwReserved1; - [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 260)] - internal string? cFileName; - [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 14)] - internal string? cAlternateFileName; - } - - internal struct FILE_TIME - { - internal uint dwLowDateTime; - internal uint dwHighDateTime; - - internal FILE_TIME(long fileTime) - { - dwLowDateTime = (uint)fileTime; - dwHighDateTime = (uint)(fileTime >> 32); - } - - internal long ToTicks() - { - return ((long)dwHighDateTime << 32) + dwLowDateTime; - } - } } } diff --git a/src/Common/src/Interop/Windows/Kernel32/Interop.WIN32_FILE_ATTRIBUTE_DATA.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.WIN32_FILE_ATTRIBUTE_DATA.cs similarity index 100% rename from src/Common/src/Interop/Windows/Kernel32/Interop.WIN32_FILE_ATTRIBUTE_DATA.cs rename to src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.WIN32_FILE_ATTRIBUTE_DATA.cs diff --git a/src/Common/src/Interop/Windows/Kernel32/Interop.WIN32_FIND_DATA.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.WIN32_FIND_DATA.cs similarity index 100% rename from src/Common/src/Interop/Windows/Kernel32/Interop.WIN32_FIND_DATA.cs rename to src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.WIN32_FIND_DATA.cs diff --git a/src/Common/src/CoreLib/System.Private.CoreLib.Shared.projitems b/src/Common/src/CoreLib/System.Private.CoreLib.Shared.projitems index e51a210baea6..7e1cb0d193fe 100644 --- a/src/Common/src/CoreLib/System.Private.CoreLib.Shared.projitems +++ b/src/Common/src/CoreLib/System.Private.CoreLib.Shared.projitems @@ -1016,11 +1016,13 @@ + + @@ -1070,6 +1072,8 @@ + + diff --git a/src/Common/src/Interop/Windows/Kernel32/Interop.GetFileAttributesEx.cs b/src/Common/src/Interop/Windows/Kernel32/Interop.GetFileAttributesEx.cs deleted file mode 100644 index 7740e85a50d8..000000000000 --- a/src/Common/src/Interop/Windows/Kernel32/Interop.GetFileAttributesEx.cs +++ /dev/null @@ -1,24 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System.IO; -using System.Runtime.InteropServices; - -internal partial class Interop -{ - internal partial class Kernel32 - { - /// - /// WARNING: This method does not implicitly handle long paths. Use GetFileAttributesEx. - /// - [DllImport(Libraries.Kernel32, EntryPoint = "GetFileAttributesExW", SetLastError = true, CharSet = CharSet.Unicode, BestFitMapping = false)] - private static extern bool GetFileAttributesExPrivate(string name, GET_FILEEX_INFO_LEVELS fileInfoLevel, ref WIN32_FILE_ATTRIBUTE_DATA lpFileInformation); - - internal static bool GetFileAttributesEx(string name, GET_FILEEX_INFO_LEVELS fileInfoLevel, ref WIN32_FILE_ATTRIBUTE_DATA lpFileInformation) - { - name = PathInternal.EnsureExtendedPrefixIfNeeded(name); - return GetFileAttributesExPrivate(name, fileInfoLevel, ref lpFileInformation); - } - } -} diff --git a/src/Microsoft.IO.Redist/src/Microsoft.IO.Redist.csproj b/src/Microsoft.IO.Redist/src/Microsoft.IO.Redist.csproj index 8e03fc486d02..3de37e64d32c 100644 --- a/src/Microsoft.IO.Redist/src/Microsoft.IO.Redist.csproj +++ b/src/Microsoft.IO.Redist/src/Microsoft.IO.Redist.csproj @@ -91,13 +91,13 @@ Common\Interop\Windows\Interop.LongFileTime.cs - + Common\Interop\Windows\Interop.WIN32_FIND_DATA.cs - + Common\Interop\Windows\Interop.FILE_TIME.cs - + Common\Interop\Windows\Interop.GET_FILEEX_INFO_LEVELS.cs @@ -115,13 +115,13 @@ Common\Interop\Windows\Interop.DeleteFile.cs - + Common\Interop\Windows\Interop.GetFileAttributesEx.cs Common\Interop\Windows\Interop.CreateDirectory.cs - + Common\Interop\Windows\Interop.WIN32_FILE_ATTRIBUTE_DATA.cs diff --git a/src/System.IO.FileSystem/src/System.IO.FileSystem.csproj b/src/System.IO.FileSystem/src/System.IO.FileSystem.csproj index bf6a88db449e..c69ee5f54a68 100644 --- a/src/System.IO.FileSystem/src/System.IO.FileSystem.csproj +++ b/src/System.IO.FileSystem/src/System.IO.FileSystem.csproj @@ -111,17 +111,17 @@ Common\CoreLib\Interop\Windows\Interop.MAX_PATH.cs - - Common\Interop\Windows\Interop.WIN32_FIND_DATA.cs + + Common\CoreLib\Interop\Windows\Interop.WIN32_FIND_DATA.cs - - Common\Interop\Windows\Interop.FILE_TIME.cs + + Common\CoreLib\Interop\Windows\Interop.FILE_TIME.cs - - Common\Interop\Windows\Interop.WIN32_FILE_ATTRIBUTE_DATA.cs + + Common\CoreLib\Interop\Windows\Interop.WIN32_FILE_ATTRIBUTE_DATA.cs - - Common\Interop\Windows\Interop.GET_FILEEX_INFO_LEVELS.cs + + Common\CoreLib\Interop\Windows\Interop.GET_FILEEX_INFO_LEVELS.cs Common\CoreLib\Interop\Windows\Interop.SetThreadErrorMode.cs @@ -150,7 +150,7 @@ Common\Interop\Windows\Interop.MoveFileEx.cs - + Common\Interop\Windows\Interop.GetFileAttributesEx.cs From 27d0597c556d7a4040571d09ede9b84bc1cc6b85 Mon Sep 17 00:00:00 2001 From: Devendar Reddy Adulla Date: Wed, 24 Apr 2019 18:16:26 -0700 Subject: [PATCH 041/607] Embedded resources may not have extension in the name (#37048) * Bitmaps are replaced with Icons and Logical names are changed to not having any extensions. * Checking for Rawformat before calling MakeTransparent method. * Adding a test attribute * Adding test. --- .../System/Drawing/ToolboxBitmapAttribute.cs | 9 ++++++++ .../tests/System.Drawing.Common.Tests.csproj | 3 +++ .../tests/ToolboxBitmapAttributeTests.cs | 22 +++++++++++++++++++ 3 files changed, 34 insertions(+) diff --git a/src/System.Drawing.Common/src/System/Drawing/ToolboxBitmapAttribute.cs b/src/System.Drawing.Common/src/System/Drawing/ToolboxBitmapAttribute.cs index 0655bb33fc7e..1d42e0e0638e 100644 --- a/src/System.Drawing.Common/src/System/Drawing/ToolboxBitmapAttribute.cs +++ b/src/System.Drawing.Common/src/System/Drawing/ToolboxBitmapAttribute.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System.Diagnostics; +using System.Drawing.Imaging; using System.IO; using DpiHelper = System.Windows.Forms.DpiHelper; using Gdip = System.Drawing.SafeNativeMethods.Gdip; @@ -282,6 +283,10 @@ internal static Image GetImageFromResource(Type t, string imageName, bool large, { name = name.Substring(indexDot + 1); } + + // All bitmap images from winforms runtime are changed to Icons + // and logical names, now, does not contain any extension. + rawbmpname = name; iconname = name + ".ico"; bmpname = name + ".bmp"; } @@ -325,6 +330,10 @@ internal static Image GetImageFromResource(Type t, string imageName, bool large, private static void MakeBackgroundAlphaZero(Bitmap img) { + // Bitmap derived from Icon is already transparent. + if (img.RawFormat.Guid == ImageFormat.Icon.Guid) + return; + Color bottomLeft = img.GetPixel(0, img.Height - 1); img.MakeTransparent(); diff --git a/src/System.Drawing.Common/tests/System.Drawing.Common.Tests.csproj b/src/System.Drawing.Common/tests/System.Drawing.Common.Tests.csproj index 39906b81c23d..c8e1f60e68cc 100644 --- a/src/System.Drawing.Common/tests/System.Drawing.Common.Tests.csproj +++ b/src/System.Drawing.Common/tests/System.Drawing.Common.Tests.csproj @@ -100,6 +100,9 @@ System.Drawing.Tests.invalid.ico + + + System.Drawing.Tests.Icon_toolboxBitmapAttributeTest diff --git a/src/System.Drawing.Common/tests/ToolboxBitmapAttributeTests.cs b/src/System.Drawing.Common/tests/ToolboxBitmapAttributeTests.cs index fe1736e79e1d..e9aee5e53545 100644 --- a/src/System.Drawing.Common/tests/ToolboxBitmapAttributeTests.cs +++ b/src/System.Drawing.Common/tests/ToolboxBitmapAttributeTests.cs @@ -11,6 +11,8 @@ namespace System.Drawing.Tests { public class bitmap_173x183_indexed_8bit { } + public class Icon_toolboxBitmapAttributeTest { } + public class ToolboxBitmapAttributeTests { private static Size DefaultSize = new Size(16, 16); @@ -172,6 +174,26 @@ public void GetImage_Default_ReturnsExpected() } } + [ActiveIssue(20884, TestPlatforms.AnyUnix)] + [ConditionalTheory(Helpers.IsDrawingSupported)] + [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Logical name with no extension is not supported in desktop framework")] + [InlineData(typeof(Icon_toolboxBitmapAttributeTest), 256, 256)] + public void GetImage_NoExtension(Type type, int width, int height) + { + var attribute = new ToolboxBitmapAttribute(type); + using (Image image = attribute.GetImage(type)) + { + if (width == -1 && height == -1) + { + AssertDefaultSize(image); + } + else + { + Assert.Equal(new Size(width, height), image.Size); + } + } + } + public static IEnumerable Equals_TestData() { yield return new object[] { ToolboxBitmapAttribute.Default, ToolboxBitmapAttribute.Default, true }; From 4e1b64e1ab06202e9aa451a0b320b7fd4ed11519 Mon Sep 17 00:00:00 2001 From: Jim <10913919+jimdemis@users.noreply.github.com> Date: Thu, 25 Apr 2019 05:50:47 +0300 Subject: [PATCH 042/607] Added optional/default parameters for StreamWriter/StreamReader (#24056) * Added optional/default parameters for StreamWriter/StreamReader * Disabled outdated test * Changed default encoding to UTF8NoBOM * Made encoding parameter nullable Signed-off-by: dotnet-bot --- src/Common/src/CoreLib/System/IO/StreamReader.cs | 16 ++++++++++++---- src/Common/src/CoreLib/System/IO/StreamWriter.cs | 16 ++++++++++++---- 2 files changed, 24 insertions(+), 8 deletions(-) diff --git a/src/Common/src/CoreLib/System/IO/StreamReader.cs b/src/Common/src/CoreLib/System/IO/StreamReader.cs index 9d836c0b98b2..61accbf8996e 100644 --- a/src/Common/src/CoreLib/System/IO/StreamReader.cs +++ b/src/Common/src/CoreLib/System/IO/StreamReader.cs @@ -135,17 +135,25 @@ public StreamReader(Stream stream, Encoding encoding, bool detectEncodingFromByt { } - public StreamReader(Stream stream, Encoding encoding, bool detectEncodingFromByteOrderMarks, int bufferSize, bool leaveOpen) + public StreamReader(Stream stream, Encoding? encoding = null, bool detectEncodingFromByteOrderMarks = true, int bufferSize = -1, bool leaveOpen = false) { - if (stream == null || encoding == null) + if (stream == null) { - throw new ArgumentNullException(stream == null ? nameof(stream) : nameof(encoding)); + throw new ArgumentNullException(nameof(stream)); + } + if (encoding == null) + { + encoding = Encoding.UTF8; } if (!stream.CanRead) { throw new ArgumentException(SR.Argument_StreamNotReadable); } - if (bufferSize <= 0) + if (bufferSize == -1) + { + bufferSize = DefaultBufferSize; + } + else if (bufferSize <= 0) { throw new ArgumentOutOfRangeException(nameof(bufferSize), SR.ArgumentOutOfRange_NeedPosNum); } diff --git a/src/Common/src/CoreLib/System/IO/StreamWriter.cs b/src/Common/src/CoreLib/System/IO/StreamWriter.cs index 3a999195bc1d..856dd27280de 100644 --- a/src/Common/src/CoreLib/System/IO/StreamWriter.cs +++ b/src/Common/src/CoreLib/System/IO/StreamWriter.cs @@ -90,18 +90,26 @@ public StreamWriter(Stream stream, Encoding encoding, int bufferSize) { } - public StreamWriter(Stream stream, Encoding encoding, int bufferSize, bool leaveOpen) + public StreamWriter(Stream stream, Encoding? encoding = null, int bufferSize = -1, bool leaveOpen = false) : base(null) // Ask for CurrentCulture all the time { - if (stream == null || encoding == null) + if (stream == null) { - throw new ArgumentNullException(stream == null ? nameof(stream) : nameof(encoding)); + throw new ArgumentNullException(nameof(stream)); + } + if (encoding == null) + { + encoding = UTF8NoBOM; } if (!stream.CanWrite) { throw new ArgumentException(SR.Argument_StreamNotWritable); } - if (bufferSize <= 0) + if (bufferSize == -1) + { + bufferSize = DefaultBufferSize; + } + else if (bufferSize <= 0) { throw new ArgumentOutOfRangeException(nameof(bufferSize), SR.ArgumentOutOfRange_NeedPosNum); } From 8c7afe67ee2e9bd21a4412265b66f875cfafaede Mon Sep 17 00:00:00 2001 From: Eric StJohn Date: Thu, 25 Apr 2019 02:25:08 -0700 Subject: [PATCH 043/607] Use Coreclr transport packages (#37163) * Replace CoreCLR package with transport package This allows us to remove the manual download step * Remove IL and NI folders, use IL in debug or when specified I also simplified some of these targets. NuGet automatically includes all files in native, so additional inclusion was unnecessary. * Disable IL CoreLib swap for UAP10.0.16299 and AOT --- external/runtime/runtime.depproj | 119 ++++++++++--------------------- 1 file changed, 38 insertions(+), 81 deletions(-) diff --git a/external/runtime/runtime.depproj b/external/runtime/runtime.depproj index 3a876a60aaf1..d21809c7ceb5 100644 --- a/external/runtime/runtime.depproj +++ b/external/runtime/runtime.depproj @@ -2,6 +2,9 @@ $(PackageRID) $(NoWarn);NU1603;NU1605 + true + + false @@ -30,7 +33,7 @@ - + $(MicrosoftNETCoreRuntimeCoreCLRPackageVersion) 2.1.0-b-uwp6-25707-02 @@ -45,19 +48,6 @@ - - - - - CoreCLRILFiles - $(NETCoreAppTestSharedFrameworkPath)il - - - CoreCLRCrossGenFiles - $(NETCoreAppTestSharedFrameworkPath)ni - - - @@ -87,86 +77,53 @@ - - $(PackagesDir)symbolpackages/ - https://dotnetfeed.blob.core.windows.net/dotnet-coreclr/assets/ - - - - - - <_CoreCLRSymbolPackagesToDownload Include="@(ReferenceCopyLocalPaths->'%(NuGetPackageId)')" Condition="$([System.String]::Copy('%(Identity)').EndsWith('System.Private.CoreLib.dll'))"> - $(DotNetAssetRootUrl)symbols/%(NuGetPackageId).%(NuGetPackageVersion).symbols.nupkg - %(NuGetPackageId).%(NuGetPackageVersion).symbols.nupkg.zip - $(SymbolPackagesDir)/%(NuGetPackageId).%(NuGetPackageVersion) - - - - - - - - - - - - - - - - - - <_CoreCLRSymbolFiles Include="%(_CoreCLRSymbolPackagesToDownload.UnzipDestinationDir)/runtimes/$(RuntimeIdentifier)/native/*.pdb" /> - <_CoreCLRSymbolFiles Include="%(_CoreCLRSymbolPackagesToDownload.UnzipDestinationDir)/runtimes/$(RuntimeIdentifier)/native/*.dbg" /> - - - - %(_CoreCLRSymbolPackagesToDownload.UnzipDestinationDir)/runtimes/$(RuntimeIdentifier)/native/ - - - - - - - - + $(CoreCLROverridePath)/PDB - true - - - - - + - <_ReferenceCopyLocalPathsToRemove Include="@(ReferenceCopyLocalPaths)" Condition="'@(CoreCLRFiles->'%(FileName)%(Extension)')' == '%(FileName)%(Extension)'" /> - - + + - + + - - - + + + <_CoreLibFile Include="@(ReferenceCopyLocalPaths)" Condition="'%(FileName)' == 'System.Private.CoreLib'" /> + + <_CoreLibFilePath>%(_CoreLibFile.FullPath) + <_CoreLibPackagePath>$(_CoreLibFilePath.SubString(0, $(_CoreLibFilePath.IndexOf('runtimes')))) + + + + + + + + + + + + + + + + + + From af7149c07a2edba14c6e06697d7aca4a77e8f357 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Thu, 25 Apr 2019 13:50:25 +0000 Subject: [PATCH 044/607] Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-optimization build 20190425.1 (#37181) - optimization.windows_nt-x64.IBC.CoreFx - 99.99.99-master-20190425.1 --- eng/Version.Details.xml | 4 ++-- eng/Versions.props | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 96dc5266920e..ab8ba0feb4c0 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -94,9 +94,9 @@ https://github.com/dotnet/arcade e3919d0c158716ef4685c8e057cc58640af1af83 - + https://dev.azure.com/dnceng/internal/_git/dotnet-optimization - 4ad3b057442a99004749552ef2cadf7f7b38d6b9 + 25802b2fd96e89bacf720353ed66aa3c7b107bfb diff --git a/eng/Versions.props b/eng/Versions.props index 6d37cdf14e9a..d669663b4cf5 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -48,6 +48,6 @@ 2.1.0-prerelease.19223.1 - 99.99.99-master-20190424.1 + 99.99.99-master-20190425.1 From 48a922d7e60e0e2737fed43c7761c3759b0a8c88 Mon Sep 17 00:00:00 2001 From: Jan Kotas Date: Thu, 25 Apr 2019 07:20:04 -0700 Subject: [PATCH 045/607] Changes missed by the CoreLib mirror (#37168) --- .../NtDll/Interop.NtQueryInformationFile.cs | 1 + .../CoreLib/System/Activator.RuntimeType.cs | 14 +- .../TlsOverPerCoreLockedStacksArrayPool.cs | 2 +- .../src/CoreLib/System/DateTime.Unix.cs | 4 +- .../src/CoreLib/System/DateTime.Windows.cs | 1 + src/Common/src/CoreLib/System/Enum.cs | 2 +- .../src/CoreLib/System/Environment.Win32.cs | 32 +++ .../src/CoreLib/System/Environment.WinRT.cs | 2 + .../src/CoreLib/System/Gen2GcCallback.cs | 5 +- .../System/Marvin.OrdinalIgnoreCase.cs | 2 +- src/Common/src/CoreLib/System/Math.cs | 140 +++++-------- src/Common/src/CoreLib/System/MathF.cs | 52 ++--- src/Common/src/CoreLib/System/Range.cs | 26 +-- .../src/CoreLib/System/Reflection/Assembly.cs | 19 -- .../CoreLib/System/Reflection/AssemblyName.cs | 51 ++--- .../System/Resources/ResourceManager.cs | 2 + .../X86/Sse2.PlatformNotSupported.cs | 10 - .../System/Runtime/Intrinsics/X86/Sse2.cs | 10 - .../Runtime/Loader/AssemblyLoadContext.cs | 187 ++++++++++++++++-- .../src/CoreLib/System/Text/ASCIIUtility.cs | 6 +- .../System/Text/Unicode/Utf16Utility.cs | 1 + .../CoreLib/System/Threading/AsyncLocal.cs | 2 +- .../CoreLib/System/Threading/ThreadPool.cs | 53 +++++ 23 files changed, 374 insertions(+), 250 deletions(-) diff --git a/src/Common/src/CoreLib/Interop/Windows/NtDll/Interop.NtQueryInformationFile.cs b/src/Common/src/CoreLib/Interop/Windows/NtDll/Interop.NtQueryInformationFile.cs index 4ba39a74e2b2..96bc2986afa4 100644 --- a/src/Common/src/CoreLib/Interop/Windows/NtDll/Interop.NtQueryInformationFile.cs +++ b/src/Common/src/CoreLib/Interop/Windows/NtDll/Interop.NtQueryInformationFile.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable using Microsoft.Win32.SafeHandles; using System; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/System/Activator.RuntimeType.cs b/src/Common/src/CoreLib/System/Activator.RuntimeType.cs index 224abdbcd451..1db47eec2247 100644 --- a/src/Common/src/CoreLib/System/Activator.RuntimeType.cs +++ b/src/Common/src/CoreLib/System/Activator.RuntimeType.cs @@ -5,6 +5,7 @@ #nullable enable using System.Reflection; using System.Globalization; +using System.Runtime.Loader; using System.Runtime.Remoting; using System.Threading; @@ -111,14 +112,9 @@ public static partial class Activator } else { - RuntimeAssembly? assemblyFromResolveEvent; - AssemblyName assemblyName = RuntimeAssembly.CreateAssemblyName(assemblyString, out assemblyFromResolveEvent); - if (assemblyFromResolveEvent != null) - { - // Assembly was resolved via AssemblyResolve event - assembly = assemblyFromResolveEvent; - } - else if (assemblyName.ContentType == AssemblyContentType.WindowsRuntime) + AssemblyName assemblyName = new AssemblyName(assemblyString); + + if (assemblyName.ContentType == AssemblyContentType.WindowsRuntime) { // WinRT type - we have to use Type.GetType type = Type.GetType(typeName + ", " + assemblyString, true /*throwOnError*/, ignoreCase); @@ -127,7 +123,7 @@ public static partial class Activator { // Classic managed type assembly = RuntimeAssembly.InternalLoadAssemblyName( - assemblyName, ref stackMark); + assemblyName, ref stackMark, AssemblyLoadContext.CurrentContextualReflectionContext); } } diff --git a/src/Common/src/CoreLib/System/Buffers/TlsOverPerCoreLockedStacksArrayPool.cs b/src/Common/src/CoreLib/System/Buffers/TlsOverPerCoreLockedStacksArrayPool.cs index 59e109a0431c..f49a1c9e057b 100644 --- a/src/Common/src/CoreLib/System/Buffers/TlsOverPerCoreLockedStacksArrayPool.cs +++ b/src/Common/src/CoreLib/System/Buffers/TlsOverPerCoreLockedStacksArrayPool.cs @@ -247,7 +247,7 @@ public bool Trim() // Under high pressure, release all thread locals if (log.IsEnabled()) { - foreach (KeyValuePair tlsBuckets in s_allTlsBuckets) + foreach (KeyValuePair tlsBuckets in s_allTlsBuckets) { T[]?[] buckets = tlsBuckets.Key; for (int i = 0; i < buckets.Length; i++) diff --git a/src/Common/src/CoreLib/System/DateTime.Unix.cs b/src/Common/src/CoreLib/System/DateTime.Unix.cs index f5d1a8f531c8..a8af81ffa72a 100644 --- a/src/Common/src/CoreLib/System/DateTime.Unix.cs +++ b/src/Common/src/CoreLib/System/DateTime.Unix.cs @@ -19,8 +19,8 @@ public static DateTime UtcNow } #endif - internal static DateTime FromFileTimeLeapSecondsAware(long fileTime) => default; - internal static long ToFileTimeLeapSecondsAware(long ticks) => default; + private static DateTime FromFileTimeLeapSecondsAware(long fileTime) => default; + private static long ToFileTimeLeapSecondsAware(long ticks) => default; // IsValidTimeWithLeapSeconds is not expected to be called at all for now on non-Windows platforms internal static bool IsValidTimeWithLeapSeconds(int year, int month, int day, int hour, int minute, int second, DateTimeKind kind) => false; diff --git a/src/Common/src/CoreLib/System/DateTime.Windows.cs b/src/Common/src/CoreLib/System/DateTime.Windows.cs index ba9df5c4536b..7596ec1cb14a 100644 --- a/src/Common/src/CoreLib/System/DateTime.Windows.cs +++ b/src/Common/src/CoreLib/System/DateTime.Windows.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable using System.Runtime.CompilerServices; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/System/Enum.cs b/src/Common/src/CoreLib/System/Enum.cs index 2f6ea1e79731..d60be2c250a0 100644 --- a/src/Common/src/CoreLib/System/Enum.cs +++ b/src/Common/src/CoreLib/System/Enum.cs @@ -494,7 +494,7 @@ private static bool TryParse(string? value, bool ignoreCase, bool throwOn default: parsed = TryParseRareEnum(rt, value, valueSpan, ignoreCase, throwOnFailure, out object? objectResult); - result = parsed ? (TEnum)objectResult : default; + result = parsed ? (TEnum)objectResult! : default; // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/34976 return parsed; } } diff --git a/src/Common/src/CoreLib/System/Environment.Win32.cs b/src/Common/src/CoreLib/System/Environment.Win32.cs index f58cdcf5bc1a..bc32146cf9d6 100644 --- a/src/Common/src/CoreLib/System/Environment.Win32.cs +++ b/src/Common/src/CoreLib/System/Environment.Win32.cs @@ -15,6 +15,8 @@ namespace System { public static partial class Environment { + internal static bool IsWindows8OrAbove => WindowsVersion.IsWindows8OrAbove; + private static string? GetEnvironmentVariableFromRegistry(string variable, bool fromMachine) { Debug.Assert(variable != null); @@ -419,5 +421,35 @@ public static string GetFolderPath(SpecialFolder folder, SpecialFolderOption opt } } #endif + + // Seperate type so a .cctor is not created for Enviroment which then would be triggered during startup + private static class WindowsVersion + { + // Cache the value in readonly static that can be optimized out by the JIT + internal readonly static bool IsWindows8OrAbove = GetIsWindows8OrAbove(); + + private static bool GetIsWindows8OrAbove() + { + ulong conditionMask = Interop.Kernel32.VerSetConditionMask(0, Interop.Kernel32.VER_MAJORVERSION, Interop.Kernel32.VER_GREATER_EQUAL); + conditionMask = Interop.Kernel32.VerSetConditionMask(conditionMask, Interop.Kernel32.VER_MINORVERSION, Interop.Kernel32.VER_GREATER_EQUAL); + conditionMask = Interop.Kernel32.VerSetConditionMask(conditionMask, Interop.Kernel32.VER_SERVICEPACKMAJOR, Interop.Kernel32.VER_GREATER_EQUAL); + conditionMask = Interop.Kernel32.VerSetConditionMask(conditionMask, Interop.Kernel32.VER_SERVICEPACKMINOR, Interop.Kernel32.VER_GREATER_EQUAL); + + // Windows 8 version is 6.2 + Interop.Kernel32.OSVERSIONINFOEX version = default; + unsafe + { + version.dwOSVersionInfoSize = sizeof(Interop.Kernel32.OSVERSIONINFOEX); + } + version.dwMajorVersion = 6; + version.dwMinorVersion = 2; + version.wServicePackMajor = 0; + version.wServicePackMinor = 0; + + return Interop.Kernel32.VerifyVersionInfoW(ref version, + Interop.Kernel32.VER_MAJORVERSION | Interop.Kernel32.VER_MINORVERSION | Interop.Kernel32.VER_SERVICEPACKMAJOR | Interop.Kernel32.VER_SERVICEPACKMINOR, + conditionMask); + } + } } } diff --git a/src/Common/src/CoreLib/System/Environment.WinRT.cs b/src/Common/src/CoreLib/System/Environment.WinRT.cs index 814b7c430122..1a22b7b32881 100644 --- a/src/Common/src/CoreLib/System/Environment.WinRT.cs +++ b/src/Common/src/CoreLib/System/Environment.WinRT.cs @@ -14,6 +14,8 @@ public static partial class Environment public static string UserDomainName => "Windows Domain"; + internal static readonly bool IsWindows8OrAbove = true; + private static string GetFolderPathCore(SpecialFolder folder, SpecialFolderOption option) { WinRTInteropCallbacks callbacks = WinRTInterop.UnsafeCallbacks; diff --git a/src/Common/src/CoreLib/System/Gen2GcCallback.cs b/src/Common/src/CoreLib/System/Gen2GcCallback.cs index 72d11a90db65..10dffb544ad4 100644 --- a/src/Common/src/CoreLib/System/Gen2GcCallback.cs +++ b/src/Common/src/CoreLib/System/Gen2GcCallback.cs @@ -66,10 +66,7 @@ public static void Register(Func callback, object targetObj) } // Resurrect ourselves by re-registering for finalization. - if (!Environment.HasShutdownStarted) - { - GC.ReRegisterForFinalize(this); - } + GC.ReRegisterForFinalize(this); } } } diff --git a/src/Common/src/CoreLib/System/Marvin.OrdinalIgnoreCase.cs b/src/Common/src/CoreLib/System/Marvin.OrdinalIgnoreCase.cs index 9a8f0ae9e494..fa02f187e012 100644 --- a/src/Common/src/CoreLib/System/Marvin.OrdinalIgnoreCase.cs +++ b/src/Common/src/CoreLib/System/Marvin.OrdinalIgnoreCase.cs @@ -6,7 +6,7 @@ using System.Buffers; using System.Diagnostics; using System.Runtime.InteropServices; -using System.Text; +using System.Text.Unicode; using Internal.Runtime.CompilerServices; #if BIT64 diff --git a/src/Common/src/CoreLib/System/Math.cs b/src/Common/src/CoreLib/System/Math.cs index ca448d0059eb..2a9c828ce8d0 100644 --- a/src/Common/src/CoreLib/System/Math.cs +++ b/src/Common/src/CoreLib/System/Math.cs @@ -539,31 +539,23 @@ public static decimal Max(decimal val1, decimal val2) public static double Max(double val1, double val2) { - // When val1 and val2 are both finite or infinite, return the larger - // * We count +0.0 as larger than -0.0 to match MSVC - // When val1 or val2, but not both, are NaN return the opposite - // * We return the opposite if either is NaN to match MSVC + // This matches the IEEE 754:2019 `maximum` function + // + // It propagates NaN inputs back to the caller and + // otherwise returns the larger of the inputs. It + // treats +0 as larger than -0 as per the specification. - if (double.IsNaN(val1)) - { - return val2; - } - - if (double.IsNaN(val2)) + if ((val1 > val2) || double.IsNaN(val1)) { return val1; } - // We do this comparison first and separately to handle the -0.0 to +0.0 comparision - // * Doing (val1 < val2) first could get transformed into (val2 >= val1) by the JIT - // which would then return an incorrect value - if (val1 == val2) { return double.IsNegative(val1) ? val2 : val1; } - return (val1 < val2) ? val2 : val1; + return val2; } [NonVersionable] @@ -593,31 +585,23 @@ public static sbyte Max(sbyte val1, sbyte val2) public static float Max(float val1, float val2) { - // When val1 and val2 are both finite or infinite, return the larger - // * We count +0.0 as larger than -0.0 to match MSVC - // When val1 or val2, but not both, are NaN return the opposite - // * We return the opposite if either is NaN to match MSVC + // This matches the IEEE 754:2019 `maximum` function + // + // It propagates NaN inputs back to the caller and + // otherwise returns the larger of the inputs. It + // treats +0 as larger than -0 as per the specification. - if (float.IsNaN(val1)) - { - return val2; - } - - if (float.IsNaN(val2)) + if ((val1 > val2) || float.IsNaN(val1)) { return val1; } - // We do this comparison first and separately to handle the -0.0 to +0.0 comparision - // * Doing (val1 < val2) first could get transformed into (val2 >= val1) by the JIT - // which would then return an incorrect value - if (val1 == val2) { return float.IsNegative(val1) ? val2 : val1; } - return (val1 < val2) ? val2 : val1; + return val2; } [CLSCompliant(false)] @@ -643,34 +627,26 @@ public static ulong Max(ulong val1, ulong val2) public static double MaxMagnitude(double x, double y) { - // When x and y are both finite or infinite, return the larger magnitude - // * We count +0.0 as larger than -0.0 to match MSVC - // When x or y, but not both, are NaN return the opposite - // * We return the opposite if either is NaN to match MSVC + // This matches the IEEE 754:2019 `maximumMagnitude` function + // + // It propagates NaN inputs back to the caller and + // otherwise returns the input with a larger magnitude. + // It treats +0 as larger than -0 as per the specification. - if (double.IsNaN(x)) - { - return y; - } + double ax = Abs(x); + double ay = Abs(y); - if (double.IsNaN(y)) + if ((ax > ay) || double.IsNaN(ax)) { return x; } - // We do this comparison first and separately to handle the -0.0 to +0.0 comparision - // * Doing (ax < ay) first could get transformed into (ay >= ax) by the JIT which would - // then return an incorrect value - - double ax = Abs(x); - double ay = Abs(y); - if (ax == ay) { return double.IsNegative(x) ? y : x; } - return (ax < ay) ? y : x; + return y; } [NonVersionable] @@ -687,31 +663,23 @@ public static decimal Min(decimal val1, decimal val2) public static double Min(double val1, double val2) { - // When val1 and val2 are both finite or infinite, return the smaller - // * We count -0.0 as smaller than -0.0 to match MSVC - // When val1 or val2, but not both, are NaN return the opposite - // * We return the opposite if either is NaN to match MSVC + // This matches the IEEE 754:2019 `minimum` function + // + // It propagates NaN inputs back to the caller and + // otherwise returns the larger of the inputs. It + // treats +0 as larger than -0 as per the specification. - if (double.IsNaN(val1)) - { - return val2; - } - - if (double.IsNaN(val2)) + if ((val1 < val2) || double.IsNaN(val1)) { return val1; } - // We do this comparison first and separately to handle the -0.0 to +0.0 comparision - // * Doing (val1 < val2) first could get transformed into (val2 >= val1) by the JIT - // which would then return an incorrect value - if (val1 == val2) { return double.IsNegative(val1) ? val1 : val2; } - return (val1 < val2) ? val1 : val2; + return val2; } [NonVersionable] @@ -741,31 +709,23 @@ public static sbyte Min(sbyte val1, sbyte val2) public static float Min(float val1, float val2) { - // When val1 and val2 are both finite or infinite, return the smaller - // * We count -0.0 as smaller than -0.0 to match MSVC - // When val1 or val2, but not both, are NaN return the opposite - // * We return the opposite if either is NaN to match MSVC + // This matches the IEEE 754:2019 `minimum` function + // + // It propagates NaN inputs back to the caller and + // otherwise returns the larger of the inputs. It + // treats +0 as larger than -0 as per the specification. - if (float.IsNaN(val1)) - { - return val2; - } - - if (float.IsNaN(val2)) + if ((val1 < val2) || float.IsNaN(val1)) { return val1; } - // We do this comparison first and separately to handle the -0.0 to +0.0 comparision - // * Doing (val1 < val2) first could get transformed into (val2 >= val1) by the JIT - // which would then return an incorrect value - if (val1 == val2) { return float.IsNegative(val1) ? val1 : val2; } - return (val1 < val2) ? val1 : val2; + return val2; } [CLSCompliant(false)] @@ -791,34 +751,26 @@ public static ulong Min(ulong val1, ulong val2) public static double MinMagnitude(double x, double y) { - // When x and y are both finite or infinite, return the smaller magnitude - // * We count -0.0 as smaller than -0.0 to match MSVC - // When x or y, but not both, are NaN return the opposite - // * We return the opposite if either is NaN to match MSVC + // This matches the IEEE 754:2019 `minimumMagnitude` function + // + // It propagates NaN inputs back to the caller and + // otherwise returns the input with a larger magnitude. + // It treats +0 as larger than -0 as per the specification. - if (double.IsNaN(x)) - { - return y; - } + double ax = Abs(x); + double ay = Abs(y); - if (double.IsNaN(y)) + if ((ax < ay) || double.IsNaN(ax)) { return x; } - // We do this comparison first and separately to handle the -0.0 to +0.0 comparision - // * Doing (ax < ay) first could get transformed into (ay >= ax) by the JIT which would - // then return an incorrect value - - double ax = Abs(x); - double ay = Abs(y); - if (ax == ay) { return double.IsNegative(x) ? x : y; } - return (ax < ay) ? x : y; + return y; } [MethodImpl(MethodImplOptions.AggressiveInlining)] diff --git a/src/Common/src/CoreLib/System/MathF.cs b/src/Common/src/CoreLib/System/MathF.cs index 0994ed09ae6a..a039bb9a390f 100644 --- a/src/Common/src/CoreLib/System/MathF.cs +++ b/src/Common/src/CoreLib/System/MathF.cs @@ -190,34 +190,26 @@ public static float Max(float x, float y) public static float MaxMagnitude(float x, float y) { - // When x and y are both finite or infinite, return the larger magnitude - // * We count +0.0 as larger than -0.0 to match MSVC - // When x or y, but not both, are NaN return the opposite - // * We return the opposite if either is NaN to match MSVC + // This matches the IEEE 754:2019 `maximumMagnitude` function + // + // It propagates NaN inputs back to the caller and + // otherwise returns the input with a larger magnitude. + // It treats +0 as larger than -0 as per the specification. - if (float.IsNaN(x)) - { - return y; - } + float ax = Abs(x); + float ay = Abs(y); - if (float.IsNaN(y)) + if ((ax > ay) || float.IsNaN(ax)) { return x; } - // We do this comparison first and separately to handle the -0.0 to +0.0 comparision - // * Doing (ax < ay) first could get transformed into (ay >= ax) by the JIT which would - // then return an incorrect value - - float ax = Abs(x); - float ay = Abs(y); - if (ax == ay) { return float.IsNegative(x) ? y : x; } - return (ax < ay) ? y : x; + return y; } [MethodImpl(MethodImplOptions.AggressiveInlining)] @@ -228,34 +220,26 @@ public static float Min(float x, float y) public static float MinMagnitude(float x, float y) { - // When x and y are both finite or infinite, return the smaller magnitude - // * We count -0.0 as smaller than -0.0 to match MSVC - // When x or y, but not both, are NaN return the opposite - // * We return the opposite if either is NaN to match MSVC + // This matches the IEEE 754:2019 `minimumMagnitude` function + // + // It propagates NaN inputs back to the caller and + // otherwise returns the input with a larger magnitude. + // It treats +0 as larger than -0 as per the specification. - if (float.IsNaN(x)) - { - return y; - } + float ax = Abs(x); + float ay = Abs(y); - if (float.IsNaN(y)) + if ((ax < ay) || float.IsNaN(ax)) { return x; } - // We do this comparison first and separately to handle the -0.0 to +0.0 comparision - // * Doing (ax < ay) first could get transformed into (ay >= ax) by the JIT which would - // then return an incorrect value - - float ax = Abs(x); - float ay = Abs(y); - if (ax == ay) { return float.IsNegative(x) ? x : y; } - return (ax < ay) ? x : y; + return y; } [Intrinsic] diff --git a/src/Common/src/CoreLib/System/Range.cs b/src/Common/src/CoreLib/System/Range.cs index bad059cbe6ab..2a3379265af6 100644 --- a/src/Common/src/CoreLib/System/Range.cs +++ b/src/Common/src/CoreLib/System/Range.cs @@ -96,15 +96,15 @@ public override string ToString() /// Create a Range object starting from first element to the end. public static Range All => new Range(Index.Start, Index.End); - /// Destruct the range object according to a collection length and return the start offset from the beginning and the length of this range. - /// The length of the collection that the range will be used with. length has to be a positive value + /// Calculate the start offset and length of range object using a collection length. + /// The length of the collection that the range will be used with. length has to be a positive value. /// /// For performance reason, we don't validate the input length parameter against negative values. /// It is expected Range will be used with collections which always have non negative length/count. /// We validate the range is inside the length scope though. /// [MethodImpl(MethodImplOptions.AggressiveInlining)] - public OffsetAndLength GetOffsetAndLength(int length) + public (int Offset, int Length) GetOffsetAndLength(int length) { int start; Index startIndex = Start; @@ -125,25 +125,7 @@ public OffsetAndLength GetOffsetAndLength(int length) ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.length); } - return new OffsetAndLength(start, end - start); - } - - public readonly struct OffsetAndLength - { - public int Offset { get; } - public int Length { get; } - - public OffsetAndLength(int offset, int length) - { - Offset = offset; - Length = length; - } - - public void Deconstruct(out int offset, out int length) - { - offset = Offset; - length = Length; - } + return (start, end - start); } } } diff --git a/src/Common/src/CoreLib/System/Reflection/Assembly.cs b/src/Common/src/CoreLib/System/Reflection/Assembly.cs index 1e9699f62f27..4722ed3fc9e7 100644 --- a/src/Common/src/CoreLib/System/Reflection/Assembly.cs +++ b/src/Common/src/CoreLib/System/Reflection/Assembly.cs @@ -199,25 +199,6 @@ public static Assembly GetAssembly(Type type) public static Assembly Load(byte[] rawAssembly) => Load(rawAssembly, rawSymbolStore: null); - [Obsolete("This method has been deprecated. Please use Assembly.Load() instead. https://go.microsoft.com/fwlink/?linkid=14202")] - public static Assembly LoadWithPartialName(string partialName) - { - if (partialName == null) - throw new ArgumentNullException(nameof(partialName)); - - if ((partialName.Length == 0) || (partialName[0] == '\0')) - throw new ArgumentException(SR.Format_StringZeroLength, nameof(partialName)); - - try - { - return Load(partialName); - } - catch (FileNotFoundException) - { - return null; - } - } - // Loads the assembly with a COFF based IMAGE containing // an emitted assembly. The assembly is loaded into a fully isolated ALC with resolution fully deferred to the AssemblyLoadContext.Default. // The second parameter is the raw bytes representing the symbol store that matches the assembly. diff --git a/src/Common/src/CoreLib/System/Reflection/AssemblyName.cs b/src/Common/src/CoreLib/System/Reflection/AssemblyName.cs index 37d08e673912..8af4a9218024 100644 --- a/src/Common/src/CoreLib/System/Reflection/AssemblyName.cs +++ b/src/Common/src/CoreLib/System/Reflection/AssemblyName.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable using System.Configuration.Assemblies; using System.IO; using System.Runtime.Serialization; @@ -14,14 +15,14 @@ public sealed partial class AssemblyName : ICloneable, IDeserializationCallback, { // If you modify any of these fields, you must also update the // AssemblyBaseObject structure in object.h - private string _name; - private byte[] _publicKey; - private byte[] _publicKeyToken; - private CultureInfo _cultureInfo; - private string _codeBase; - private Version _version; + private string? _name; + private byte[]? _publicKey; + private byte[]? _publicKeyToken; + private CultureInfo? _cultureInfo; + private string? _codeBase; + private Version? _version; - private StrongNameKeyPair _strongNameKeyPair; + private StrongNameKeyPair? _strongNameKeyPair; private AssemblyHashAlgorithm _hashAlgorithm; @@ -36,26 +37,26 @@ public AssemblyName() // Set and get the name of the assembly. If this is a weak Name // then it optionally contains a site. For strong assembly names, // the name partitions up the strong name's namespace - public string Name + public string? Name { get { return _name; } set { _name = value; } } - public Version Version + public Version? Version { get { return _version; } set { _version = value; } } // Locales, internally the LCID is used for the match. - public CultureInfo CultureInfo + public CultureInfo? CultureInfo { get { return _cultureInfo; } set { _cultureInfo = value; } } - public string CultureName + public string? CultureName { get { @@ -67,13 +68,13 @@ public string CultureName } } - public string CodeBase + public string? CodeBase { get { return _codeBase; } set { _codeBase = value; } } - public string EscapedCodeBase + public string? EscapedCodeBase { get { @@ -155,12 +156,12 @@ public static AssemblyName GetAssemblyName(string assemblyFile) return GetFileInformationCore(assemblyFile); } - public byte[] GetPublicKey() + public byte[]? GetPublicKey() { return _publicKey; } - public void SetPublicKey(byte[] publicKey) + public void SetPublicKey(byte[]? publicKey) { _publicKey = publicKey; @@ -179,7 +180,7 @@ public byte[] GetPublicKeyToken() return _publicKeyToken; } - public void SetPublicKeyToken(byte[] publicKeyToken) + public void SetPublicKeyToken(byte[]? publicKeyToken) { _publicKeyToken = publicKeyToken; } @@ -213,7 +214,7 @@ public AssemblyVersionCompatibility VersionCompatibility set { _versionCompatibility = value; } } - public StrongNameKeyPair KeyPair + public StrongNameKeyPair? KeyPair { get { return _strongNameKeyPair; } set { _strongNameKeyPair = value; } @@ -235,7 +236,7 @@ public override string ToString() { string s = FullName; if (s == null) - return base.ToString(); + return base.ToString()!; else return s; } @@ -255,7 +256,7 @@ public void OnDeserialization(object sender) /// match the intent of this api, this api has been broken this way since its debut and we cannot /// change its behavior now. /// - public static bool ReferenceMatchesDefinition(AssemblyName reference, AssemblyName definition) + public static bool ReferenceMatchesDefinition(AssemblyName? reference, AssemblyName? definition) { if (object.ReferenceEquals(reference, definition)) return true; @@ -271,13 +272,13 @@ public static bool ReferenceMatchesDefinition(AssemblyName reference, AssemblyNa return refName.Equals(defName, StringComparison.OrdinalIgnoreCase); } - internal static string EscapeCodeBase(string codebase) + internal static string EscapeCodeBase(string? codebase) { if (codebase == null) return string.Empty; int position = 0; - char[] dest = EscapeString(codebase, 0, codebase.Length, null, ref position, true, c_DummyChar, c_DummyChar, c_DummyChar); + char[]? dest = EscapeString(codebase, 0, codebase.Length, null, ref position, true, c_DummyChar, c_DummyChar, c_DummyChar); if (dest == null) return codebase; @@ -296,7 +297,7 @@ internal static string EscapeCodeBase(string codebase) // // Returns null if nothing has to be escaped AND passed dest was null, otherwise the resulting array with the updated destPos // - internal static unsafe char[] EscapeString(string input, int start, int end, char[] dest, ref int destPos, + internal static unsafe char[]? EscapeString(string input, int start, int end, char[]? dest, ref int destPos, bool isUriString, char force1, char force2, char rsvd) { int i = start; @@ -397,15 +398,15 @@ internal static unsafe char[] EscapeString(string input, int start, int end, cha // // ensure destination array has enough space and contains all the needed input stuff // - private static unsafe char[] EnsureDestinationSize(char* pStr, char[] dest, int currentInputPos, + private static unsafe char[] EnsureDestinationSize(char* pStr, char[]? dest, int currentInputPos, short charsToAdd, short minReallocateChars, ref int destPos, int prevInputPos) { - if ((object)dest == null || dest.Length < destPos + (currentInputPos - prevInputPos) + charsToAdd) + if (dest is null || dest.Length < destPos + (currentInputPos - prevInputPos) + charsToAdd) { // allocating or reallocating array by ensuring enough space based on maxCharsToAdd. char[] newresult = new char[destPos + (currentInputPos - prevInputPos) + minReallocateChars]; - if ((object)dest != null && destPos != 0) + if (!(dest is null) && destPos != 0) Buffer.BlockCopy(dest, 0, newresult, 0, destPos << 1); dest = newresult; } diff --git a/src/Common/src/CoreLib/System/Resources/ResourceManager.cs b/src/Common/src/CoreLib/System/Resources/ResourceManager.cs index db5f81ddcdf3..ec5877a6c7b3 100644 --- a/src/Common/src/CoreLib/System/Resources/ResourceManager.cs +++ b/src/Common/src/CoreLib/System/Resources/ResourceManager.cs @@ -304,7 +304,9 @@ public virtual void ReleaseAllResources() lock (localResourceSets) { +#pragma warning disable CS8619 // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/35131 foreach ((_, ResourceSet resourceSet) in localResourceSets) +#pragma warning restore CS8619 { resourceSet.Close(); } diff --git a/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Sse2.PlatformNotSupported.cs b/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Sse2.PlatformNotSupported.cs index b787cc916dd4..57b3195e3f1b 100644 --- a/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Sse2.PlatformNotSupported.cs +++ b/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Sse2.PlatformNotSupported.cs @@ -1450,16 +1450,6 @@ internal X64() { } /// public static unsafe void StoreHigh(double* address, Vector128 source) { throw new PlatformNotSupportedException(); } - /// - /// void _mm_storel_epi64 (__m128i* mem_addr, __m128i a) - /// MOVQ m64, xmm - /// - public static unsafe void StoreLow(long* address, Vector128 source) { throw new PlatformNotSupportedException(); } - /// - /// void _mm_storel_epi64 (__m128i* mem_addr, __m128i a) - /// MOVQ m64, xmm - /// - public static unsafe void StoreLow(ulong* address, Vector128 source) { throw new PlatformNotSupportedException(); } /// /// void _mm_storel_pd (double* mem_addr, __m128d a) /// MOVLPD m64, xmm diff --git a/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Sse2.cs b/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Sse2.cs index ad674457a9a7..3aff2b4d53a8 100644 --- a/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Sse2.cs +++ b/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Sse2.cs @@ -1456,16 +1456,6 @@ internal X64() { } /// public static unsafe void StoreHigh(double* address, Vector128 source) => StoreHigh(address, source); - /// - /// void _mm_storel_epi64 (__m128i* mem_addr, __m128i a) - /// MOVQ m64, xmm - /// - public static unsafe void StoreLow(long* address, Vector128 source) => StoreLow(address, source); - /// - /// void _mm_storel_epi64 (__m128i* mem_addr, __m128i a) - /// MOVQ m64, xmm - /// - public static unsafe void StoreLow(ulong* address, Vector128 source) => StoreLow(address, source); /// /// void _mm_storel_pd (double* mem_addr, __m128d a) /// MOVLPD m64, xmm diff --git a/src/Common/src/CoreLib/System/Runtime/Loader/AssemblyLoadContext.cs b/src/Common/src/CoreLib/System/Runtime/Loader/AssemblyLoadContext.cs index b9da12633654..c0a118c8e7b0 100644 --- a/src/Common/src/CoreLib/System/Runtime/Loader/AssemblyLoadContext.cs +++ b/src/Common/src/CoreLib/System/Runtime/Loader/AssemblyLoadContext.cs @@ -4,6 +4,7 @@ #nullable enable using System.Collections.Generic; +using System.ComponentModel; using System.Diagnostics; using System.IO; using System.Reflection; @@ -31,18 +32,33 @@ private enum InternalState private static readonly Dictionary> s_allContexts = new Dictionary>(); private static long s_nextId; - // Indicates the state of this ALC (Alive or in Unloading state) - private InternalState _state; - - // Id used by s_allContexts - private readonly long _id; +#region private data members + // If you modify any of these fields, you must also update the + // AssemblyLoadContextBaseObject structure in object.h // synchronization primitive to protect against usage of this instance while unloading private readonly object _unloadLock; + private event Func _resolvingUnmanagedDll; + + private event Func _resolving; + + private event Action _unloading; + + private readonly string? _name; + // Contains the reference to VM's representation of the AssemblyLoadContext private readonly IntPtr _nativeAssemblyLoadContext; + // Id used by s_allContexts + private readonly long _id; + + // Indicates the state of this ALC (Alive or in Unloading state) + private InternalState _state; + + private readonly bool _isCollectible; +#endregion + protected AssemblyLoadContext() : this(false, false, null) { } @@ -58,9 +74,9 @@ public AssemblyLoadContext(string? name, bool isCollectible = false) : this(fals private protected AssemblyLoadContext(bool representsTPALoadContext, bool isCollectible, string? name) { // Initialize the VM side of AssemblyLoadContext if not already done. - IsCollectible = isCollectible; + _isCollectible = isCollectible; - Name = name; + _name = name; // The _unloadLock needs to be assigned after the IsCollectible to ensure proper behavior of the finalizer // even in case the following allocation fails or the thread is aborted between these two lines. @@ -103,7 +119,7 @@ private protected AssemblyLoadContext(bool representsTPALoadContext, bool isColl private void RaiseUnloadEvent() { // Ensure that we raise the Unload event only once - Interlocked.Exchange(ref Unloading, null!)?.Invoke(this); // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + Interlocked.Exchange(ref _unloading, null!)?.Invoke(this); // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 } private void InitiateUnload() @@ -153,7 +169,17 @@ public IEnumerable Assemblies // // Inputs: Invoking assembly, and library name to resolve // Returns: A handle to the loaded native library - public event Func ResolvingUnmanagedDll; + public event Func ResolvingUnmanagedDll + { + add + { + _resolvingUnmanagedDll += value; + } + remove + { + _resolvingUnmanagedDll -= value; + } + } // Event handler for resolving managed assemblies. // This event is raised if the managed assembly could not be resolved via @@ -161,9 +187,29 @@ public IEnumerable Assemblies // // Inputs: The AssemblyLoadContext and AssemblyName to be loaded // Returns: The Loaded assembly object. - public event Func Resolving; + public event Func Resolving + { + add + { + _resolving += value; + } + remove + { + _resolving -= value; + } + } - public event Action Unloading; + public event Action Unloading + { + add + { + _unloading += value; + } + remove + { + _unloading -= value; + } + } // Occurs when an Assembly is loaded public static event AssemblyLoadEventHandler AssemblyLoad; @@ -180,9 +226,9 @@ public IEnumerable Assemblies public static AssemblyLoadContext Default => DefaultAssemblyLoadContext.s_loadContext; - public bool IsCollectible { get; } + public bool IsCollectible { get { return _isCollectible;} } - public string? Name { get; } + public string? Name { get { return _name;} } public override string ToString() => "\"" + Name + "\" " + GetType().ToString() + " #" + _id; @@ -240,7 +286,7 @@ public Assembly LoadFromAssemblyName(AssemblyName assemblyName) // Attempt to load the assembly, using the same ordering as static load, in the current load context. StackCrawlMark stackMark = StackCrawlMark.LookForMyCaller; - return Assembly.Load(assemblyName, ref stackMark, _nativeAssemblyLoadContext); + return Assembly.Load(assemblyName, ref stackMark, this); } // These methods load assemblies into the current AssemblyLoadContext @@ -396,6 +442,119 @@ private void VerifyIsAlive() throw new InvalidOperationException(SR.AssemblyLoadContext_Verify_NotUnloading); } } + + private static AsyncLocal? s_asyncLocalCurrent; + + /// Nullable current AssemblyLoadContext used for context sensitive reflection APIs + /// + /// This is an advanced setting used in reflection assembly loading scenarios. + /// + /// There are a set of contextual reflection APIs which load managed assemblies through an inferred AssemblyLoadContext. + /// * + /// * + /// * + /// * + /// + /// When CurrentContextualReflectionContext is null, the AssemblyLoadContext is inferred. + /// The inference logic is simple. + /// * For static methods, it is the AssemblyLoadContext which loaded the method caller's assembly. + /// * For instance methods, it is the AssemblyLoadContext which loaded the instance's assembly. + /// + /// When this property is set, the CurrentContextualReflectionContext value is used by these contextual reflection APIs for loading. + /// + /// This property is typically set in a using block by + /// . + /// + /// The property is stored in an AsyncLocal<AssemblyLoadContext>. This means the setting can be unique for every async or thread in the process. + /// + /// For more details see https://github.com/dotnet/coreclr/blob/master/Documentation/design-docs/AssemblyLoadContext.ContextualReflection.md + /// + public static AssemblyLoadContext? CurrentContextualReflectionContext + { + get { return s_asyncLocalCurrent?.Value; } + } + + private static void SetCurrentContextualReflectionContext(AssemblyLoadContext? value) + { + if (s_asyncLocalCurrent == null) + { + Interlocked.CompareExchange?>(ref s_asyncLocalCurrent, new AsyncLocal(), null); + } + s_asyncLocalCurrent!.Value = value!; // TODO-NULLABLE-GENERIC + } + + /// Enter scope using this AssemblyLoadContext for ContextualReflection + /// A disposable ContextualReflectionScope for use in a using block + /// + /// Sets CurrentContextualReflectionContext to this instance. + /// + /// + /// Returns a disposable ContextualReflectionScope for use in a using block. When the using calls the + /// Dispose() method, it restores the ContextualReflectionScope to its previous value. + /// + public ContextualReflectionScope EnterContextualReflection() + { + return new ContextualReflectionScope(this); + } + + /// Enter scope using this AssemblyLoadContext for ContextualReflection + /// Set CurrentContextualReflectionContext to the AssemblyLoadContext which loaded activating. + /// A disposable ContextualReflectionScope for use in a using block + /// + /// Sets CurrentContextualReflectionContext to to the AssemblyLoadContext which loaded activating. + /// + /// + /// Returns a disposable ContextualReflectionScope for use in a using block. When the using calls the + /// Dispose() method, it restores the ContextualReflectionScope to its previous value. + /// + public static ContextualReflectionScope EnterContextualReflection(Assembly? activating) + { + if (activating == null) + return new ContextualReflectionScope(null); + + AssemblyLoadContext? assemblyLoadContext = GetLoadContext(activating); + + if (assemblyLoadContext == null) + { + // All RuntimeAssemblies & Only RuntimeAssemblies have an AssemblyLoadContext + throw new ArgumentException(SR.Arg_MustBeRuntimeAssembly, nameof(activating)); + } + + return assemblyLoadContext.EnterContextualReflection(); + } + + /// Opaque disposable struct used to restore CurrentContextualReflectionContext + /// + /// This is an implmentation detail of the AssemblyLoadContext.EnterContextualReflection APIs. + /// It is a struct, to avoid heap allocation. + /// It is required to be public to avoid boxing. + /// + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public struct ContextualReflectionScope : IDisposable + { + private readonly AssemblyLoadContext? _activated; + private readonly AssemblyLoadContext? _predecessor; + private readonly bool _initialized; + + internal ContextualReflectionScope(AssemblyLoadContext? activating) + { + _predecessor = AssemblyLoadContext.CurrentContextualReflectionContext; + AssemblyLoadContext.SetCurrentContextualReflectionContext(activating); + _activated = activating; + _initialized = true; + } + + public void Dispose() + { + if (_initialized) + { + // Do not clear initialized. Always restore the _predecessor in Dispose() + // _initialized = false; + AssemblyLoadContext.SetCurrentContextualReflectionContext(_predecessor); + } + } + } } internal sealed class DefaultAssemblyLoadContext : AssemblyLoadContext diff --git a/src/Common/src/CoreLib/System/Text/ASCIIUtility.cs b/src/Common/src/CoreLib/System/Text/ASCIIUtility.cs index 87b742f678ad..31e8ac1d5726 100644 --- a/src/Common/src/CoreLib/System/Text/ASCIIUtility.cs +++ b/src/Common/src/CoreLib/System/Text/ASCIIUtility.cs @@ -1347,7 +1347,7 @@ private static unsafe nuint NarrowUtf16ToAscii_Sse2(char* pUtf16Buffer, byte* pA // Turn the 8 ASCII chars we just read into 8 ASCII bytes, then copy it to the destination. Vector128 asciiVector = Sse2.PackUnsignedSaturate(utf16VectorFirst, utf16VectorFirst); - Sse2.StoreLow((ulong*)pAsciiBuffer, asciiVector.AsUInt64()); // ulong* calculated here is UNALIGNED + Sse2.StoreScalar((ulong*)pAsciiBuffer, asciiVector.AsUInt64()); // ulong* calculated here is UNALIGNED nuint currentOffsetInElements = SizeOfVector128 / 2; // we processed 8 elements so far @@ -1386,7 +1386,7 @@ private static unsafe nuint NarrowUtf16ToAscii_Sse2(char* pUtf16Buffer, byte* pA // Turn the 8 ASCII chars we just read into 8 ASCII bytes, then copy it to the destination. asciiVector = Sse2.PackUnsignedSaturate(utf16VectorFirst, utf16VectorFirst); - Sse2.StoreLow((ulong*)(pAsciiBuffer + currentOffsetInElements), asciiVector.AsUInt64()); // ulong* calculated here is UNALIGNED + Sse2.StoreScalar((ulong*)(pAsciiBuffer + currentOffsetInElements), asciiVector.AsUInt64()); // ulong* calculated here is UNALIGNED } // Calculate how many elements we wrote in order to get pAsciiBuffer to its next alignment @@ -1462,7 +1462,7 @@ private static unsafe nuint NarrowUtf16ToAscii_Sse2(char* pUtf16Buffer, byte* pA Debug.Assert(((nuint)pAsciiBuffer + currentOffsetInElements) % sizeof(ulong) == 0, "Destination should be ulong-aligned."); - Sse2.StoreLow((ulong*)(pAsciiBuffer + currentOffsetInElements), asciiVector.AsUInt64()); // ulong* calculated here is aligned + Sse2.StoreScalar((ulong*)(pAsciiBuffer + currentOffsetInElements), asciiVector.AsUInt64()); // ulong* calculated here is aligned currentOffsetInElements += SizeOfVector128 / 2; goto Finish; diff --git a/src/Common/src/CoreLib/System/Text/Unicode/Utf16Utility.cs b/src/Common/src/CoreLib/System/Text/Unicode/Utf16Utility.cs index 828776b4361c..44d0316d280e 100644 --- a/src/Common/src/CoreLib/System/Text/Unicode/Utf16Utility.cs +++ b/src/Common/src/CoreLib/System/Text/Unicode/Utf16Utility.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable using System.Runtime.CompilerServices; using System.Diagnostics; diff --git a/src/Common/src/CoreLib/System/Threading/AsyncLocal.cs b/src/Common/src/CoreLib/System/Threading/AsyncLocal.cs index 463289ae55ce..6ecf6c72cb02 100644 --- a/src/Common/src/CoreLib/System/Threading/AsyncLocal.cs +++ b/src/Common/src/CoreLib/System/Threading/AsyncLocal.cs @@ -465,7 +465,7 @@ public IAsyncLocalValueMap Set(IAsyncLocal key, object? value, bool treatNullVal { var multi = new MultiElementAsyncLocalValueMap(MultiElementAsyncLocalValueMap.MaxMultiElements); int index = 0; - foreach (KeyValuePair pair in this) + foreach (KeyValuePair pair in this) { if (!ReferenceEquals(key, pair.Key)) { diff --git a/src/Common/src/CoreLib/System/Threading/ThreadPool.cs b/src/Common/src/CoreLib/System/Threading/ThreadPool.cs index 19c043da5ad6..fc53fc158fe8 100644 --- a/src/Common/src/CoreLib/System/Threading/ThreadPool.cs +++ b/src/Common/src/CoreLib/System/Threading/ThreadPool.cs @@ -381,6 +381,26 @@ public bool LocalFindAndPop(object obj) return null; } } + + public int Count + { + get + { + bool lockTaken = false; + try + { + m_foreignLock.Enter(ref lockTaken); + return Math.Max(0, m_tailIndex - m_headIndex); + } + finally + { + if (lockTaken) + { + m_foreignLock.Exit(useMemoryBarrier: false); + } + } + } + } } internal bool loggingEnabled; @@ -512,6 +532,21 @@ internal bool LocalFindAndPop(object callback) return callback; } + public long LocalCount + { + get + { + long count = 0; + foreach (WorkStealingQueue workStealingQueue in WorkStealingQueueList.Queues) + { + count += workStealingQueue.Count; + } + return count; + } + } + + public long GlobalCount => workItems.Count; + /// /// Dispatches work items to this thread. /// @@ -1241,5 +1276,23 @@ internal static object[] GetGloballyQueuedWorkItemsForDebugger() => internal static object[] GetLocallyQueuedWorkItemsForDebugger() => ToObjectArray(GetLocallyQueuedWorkItems()); + + /// + /// Gets the number of work items that are currently queued to be processed. + /// + /// + /// For a thread pool implementation that may have different types of work items, the count includes all types that can + /// be tracked, which may only be the user work items including tasks. Some implementations may also include queued + /// timer and wait callbacks in the count. On Windows, the count is unlikely to include the number of pending IO + /// completions, as they get posted directly to an IO completion port. + /// + public static long PendingWorkItemCount + { + get + { + ThreadPoolWorkQueue workQueue = ThreadPoolGlobals.workQueue; + return workQueue.LocalCount + workQueue.GlobalCount + PendingUnmanagedWorkItemCount; + } + } } } From eb2d732bf8d35186c70c743812e5d17584b6975f Mon Sep 17 00:00:00 2001 From: Viktor Hofer Date: Thu, 25 Apr 2019 16:48:24 +0200 Subject: [PATCH 046/607] Enable CoreLib coverage (#37172) * Enable CoreLib coverage --- eng/dependencies.props | 4 ++-- src/Directory.Build.props | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/eng/dependencies.props b/eng/dependencies.props index 1a8151c6ee8b..955870c67947 100644 --- a/eng/dependencies.props +++ b/eng/dependencies.props @@ -37,8 +37,8 @@ 1.0.31 - 1.4.0 - 4.0.5 + 1.5.0 + 4.1.4 4.6.0-alpha-00001 $(ProjectNTfsTestILCPackageVersion) diff --git a/src/Directory.Build.props b/src/Directory.Build.props index efcca891dd45..8954f39e33c8 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -28,8 +28,7 @@ - - + From 4214b09864bea0416f17727ffa39a55d950035d1 Mon Sep 17 00:00:00 2001 From: Tom Deseyn Date: Thu, 25 Apr 2019 17:36:23 +0200 Subject: [PATCH 047/607] Linux: determine ProcessName using /proc cmdline to avoid truncated names (#37144) * Linux: determine ProcessName using /proc cmdline to avoid truncated names * PR feedback * LongProcessNamesAreSupported test: ensure Process gets killed when Assert throws --- .../Linux/procfs/Interop.ProcFsStat.cs | 11 ++- src/Common/src/System/IO/StringParser.cs | 4 +- src/Common/tests/Tests/Interop/procfsTests.cs | 1 - .../src/System/Diagnostics/Process.Linux.cs | 75 ++++++++++++++++++- .../Diagnostics/ProcessManager.Linux.cs | 8 +- .../tests/ProcessTestBase.cs | 14 +++- .../tests/ProcessTests.cs | 31 ++++++++ 7 files changed, 129 insertions(+), 15 deletions(-) diff --git a/src/Common/src/Interop/Linux/procfs/Interop.ProcFsStat.cs b/src/Common/src/Interop/Linux/procfs/Interop.ProcFsStat.cs index c41415a7ec65..66637a3a1457 100644 --- a/src/Common/src/Interop/Linux/procfs/Interop.ProcFsStat.cs +++ b/src/Common/src/Interop/Linux/procfs/Interop.ProcFsStat.cs @@ -15,12 +15,14 @@ internal static partial class procfs { internal const string RootPath = "/proc/"; private const string ExeFileName = "/exe"; + private const string CmdLineFileName = "/cmdline"; private const string StatFileName = "/stat"; private const string MapsFileName = "/maps"; private const string FileDescriptorDirectoryName = "/fd/"; private const string TaskDirectoryName = "/task/"; internal const string SelfExeFilePath = RootPath + "self" + ExeFileName; + internal const string SelfCmdLineFilePath = RootPath + "self" + CmdLineFileName; internal const string ProcStatFilePath = RootPath + "stat"; internal struct ParsedStat @@ -31,7 +33,7 @@ internal struct ParsedStat // the MoveNext() with the appropriate ParseNext* call and assignment. internal int pid; - internal string comm; + // internal string comm; internal char state; internal int ppid; //internal int pgrp; @@ -87,6 +89,11 @@ internal static string GetExeFilePathForProcess(int pid) return RootPath + pid.ToString(CultureInfo.InvariantCulture) + ExeFileName; } + internal static string GetCmdLinePathForProcess(int pid) + { + return RootPath + pid.ToString(CultureInfo.InvariantCulture) + CmdLineFileName; + } + internal static string GetStatFilePathForProcess(int pid) { return RootPath + pid.ToString(CultureInfo.InvariantCulture) + StatFileName; @@ -231,7 +238,7 @@ internal static bool TryParseStatFile(string statFilePath, out ParsedStat result var results = default(ParsedStat); results.pid = parser.ParseNextInt32(); - results.comm = parser.MoveAndExtractNextInOuterParens(); + parser.MoveAndExtractNextInOuterParens(extractValue: false); // comm results.state = parser.ParseNextChar(); results.ppid = parser.ParseNextInt32(); parser.MoveNextOrFail(); // pgrp diff --git a/src/Common/src/System/IO/StringParser.cs b/src/Common/src/System/IO/StringParser.cs index d79d7ce2e82e..b94a7000d876 100644 --- a/src/Common/src/System/IO/StringParser.cs +++ b/src/Common/src/System/IO/StringParser.cs @@ -98,7 +98,7 @@ public string MoveAndExtractNext() /// in the string. The extracted value will be everything between (not including) those parentheses. /// /// - public string MoveAndExtractNextInOuterParens() + public string MoveAndExtractNextInOuterParens(bool extractValue = true) { // Move to the next position MoveNextOrFail(); @@ -118,7 +118,7 @@ public string MoveAndExtractNextInOuterParens() } // Extract the contents of the parens, then move our ending position to be after the paren - string result = _buffer.Substring(_startIndex + 1, lastParen - _startIndex - 1); + string result = extractValue ? _buffer.Substring(_startIndex + 1, lastParen - _startIndex - 1) : null; _endIndex = lastParen + 1; return result; diff --git a/src/Common/tests/Tests/Interop/procfsTests.cs b/src/Common/tests/Tests/Interop/procfsTests.cs index 53aa6ae8d421..7fd7647410fd 100644 --- a/src/Common/tests/Tests/Interop/procfsTests.cs +++ b/src/Common/tests/Tests/Interop/procfsTests.cs @@ -49,7 +49,6 @@ public static void ParseValidStatFiles_Success( Assert.True(Interop.procfs.TryParseStatFile(path, out result, new ReusableTextReader())); Assert.Equal(expectedPid, result.pid); - Assert.Equal(expectedComm, result.comm); Assert.Equal(expectedState, result.state); Assert.Equal(expectedSession, result.session); Assert.Equal(expectedUtime, result.utime); diff --git a/src/System.Diagnostics.Process/src/System/Diagnostics/Process.Linux.cs b/src/System.Diagnostics.Process/src/System/Diagnostics/Process.Linux.cs index eca3afd10600..013418acf92d 100644 --- a/src/System.Diagnostics.Process/src/System/Diagnostics/Process.Linux.cs +++ b/src/System.Diagnostics.Process/src/System/Diagnostics/Process.Linux.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System; +using System.Buffers; using System.Collections.Generic; using System.ComponentModel; using System.Globalization; @@ -29,11 +30,9 @@ public static Process[] GetProcessesByName(string processName, string machineNam var processes = new List(); foreach (int pid in ProcessManager.EnumerateProcessIds()) { - Interop.procfs.ParsedStat parsedStat; - if (Interop.procfs.TryReadStatFile(pid, out parsedStat, reusableReader) && - string.Equals(processName, parsedStat.comm, StringComparison.OrdinalIgnoreCase)) + if (string.Equals(processName, Process.GetProcessName(pid), StringComparison.OrdinalIgnoreCase)) { - ProcessInfo processInfo = ProcessManager.CreateProcessInfo(parsedStat, reusableReader); + ProcessInfo processInfo = ProcessManager.CreateProcessInfo(pid, reusableReader, processName); processes.Add(new Process(machineName, false, processInfo.ProcessId, processInfo)); } } @@ -256,6 +255,74 @@ internal static string GetExePath(int processId = -1) return Interop.Sys.ReadLink(exeFilePath); } + /// Gets the name that was used to start the process, or null if it could not be retrieved. + /// The pid for the target process, or -1 for the current process. + internal static string GetProcessName(int processId = -1) + { + string cmdLineFilePath = processId == -1 ? + Interop.procfs.SelfCmdLineFilePath : + Interop.procfs.GetCmdLinePathForProcess(processId); + + byte[] rentedArray = null; + try + { + // bufferSize == 1 used to avoid unnecessary buffer in FileStream + using (var fs = new FileStream(cmdLineFilePath, FileMode.Open, FileAccess.Read, FileShare.Read, bufferSize: 1, useAsync: false)) + { + Span buffer = stackalloc byte[512]; + int bytesRead = 0; + while (true) + { + // Resize buffer if it was too small. + if (bytesRead == buffer.Length) + { + uint newLength = (uint)buffer.Length * 2; + + byte[] tmp = ArrayPool.Shared.Rent((int)newLength); + buffer.CopyTo(tmp); + byte[] toReturn = rentedArray; + buffer = rentedArray = tmp; + if (rentedArray != null) + { + ArrayPool.Shared.Return(toReturn); + } + } + + Debug.Assert(bytesRead < buffer.Length); + int n = fs.Read(buffer.Slice(bytesRead)); + bytesRead += n; + + // cmdline contains the argv array separated by '\0' bytes. + // we determine the process name using argv[0]. + int argv0End = buffer.Slice(0, bytesRead).IndexOf((byte)'\0'); + if (argv0End != -1) + { + // Strip directory names from argv[0]. + int nameStart = buffer.Slice(0, argv0End).LastIndexOf((byte)'/') + 1; + + return Encoding.UTF8.GetString(buffer.Slice(nameStart, argv0End - nameStart)); + } + + if (n == 0) + { + return null; + } + } + } + } + catch (IOException) + { + return null; + } + finally + { + if (rentedArray != null) + { + ArrayPool.Shared.Return(rentedArray); + } + } + } + // ---------------------------------- // ---- Unix PAL layer ends here ---- // ---------------------------------- diff --git a/src/System.Diagnostics.Process/src/System/Diagnostics/ProcessManager.Linux.cs b/src/System.Diagnostics.Process/src/System/Diagnostics/ProcessManager.Linux.cs index 69800f10b0fb..53e2c4586f97 100644 --- a/src/System.Diagnostics.Process/src/System/Diagnostics/ProcessManager.Linux.cs +++ b/src/System.Diagnostics.Process/src/System/Diagnostics/ProcessManager.Linux.cs @@ -108,7 +108,7 @@ internal static ProcessModuleCollection GetModules(int processId) /// /// Creates a ProcessInfo from the specified process ID. /// - internal static ProcessInfo CreateProcessInfo(int pid, ReusableTextReader reusableReader = null) + internal static ProcessInfo CreateProcessInfo(int pid, ReusableTextReader reusableReader = null, string processName = null) { if (reusableReader == null) { @@ -117,21 +117,21 @@ internal static ProcessInfo CreateProcessInfo(int pid, ReusableTextReader reusab Interop.procfs.ParsedStat stat; return Interop.procfs.TryReadStatFile(pid, out stat, reusableReader) ? - CreateProcessInfo(stat, reusableReader) : + CreateProcessInfo(stat, reusableReader, processName) : null; } /// /// Creates a ProcessInfo from the data parsed from a /proc/pid/stat file and the associated tasks directory. /// - internal static ProcessInfo CreateProcessInfo(Interop.procfs.ParsedStat procFsStat, ReusableTextReader reusableReader) + internal static ProcessInfo CreateProcessInfo(Interop.procfs.ParsedStat procFsStat, ReusableTextReader reusableReader, string processName) { int pid = procFsStat.pid; var pi = new ProcessInfo() { ProcessId = pid, - ProcessName = procFsStat.comm, + ProcessName = processName ?? Process.GetProcessName(pid) ?? string.Empty, BasePriority = (int)procFsStat.nice, VirtualBytes = (long)procFsStat.vsize, WorkingSet = procFsStat.rss * Environment.SystemPageSize, diff --git a/src/System.Diagnostics.Process/tests/ProcessTestBase.cs b/src/System.Diagnostics.Process/tests/ProcessTestBase.cs index 8fc68010c392..9b15ab99324e 100644 --- a/src/System.Diagnostics.Process/tests/ProcessTestBase.cs +++ b/src/System.Diagnostics.Process/tests/ProcessTestBase.cs @@ -100,6 +100,16 @@ protected void StartSleepKillWait(Process p) /// /// protected static bool IsProgramInstalled(string program) + { + return GetProgramPath(program) != null; + } + + /// + /// Return program path + /// + /// + /// + protected static string GetProgramPath(string program) { string path; string pathEnvVar = Environment.GetEnvironmentVariable("PATH"); @@ -113,11 +123,11 @@ protected static bool IsProgramInstalled(string program) path = Path.Combine(subPath, program); if (File.Exists(path)) { - return true; + return path; } } } - return false; + return null; } } } diff --git a/src/System.Diagnostics.Process/tests/ProcessTests.cs b/src/System.Diagnostics.Process/tests/ProcessTests.cs index fe0897f4129b..191830beb5c2 100644 --- a/src/System.Diagnostics.Process/tests/ProcessTests.cs +++ b/src/System.Diagnostics.Process/tests/ProcessTests.cs @@ -1875,6 +1875,37 @@ public void TestLongProcessIsWorking() Assert.True(p.HasExited); } + [PlatformSpecific(TestPlatforms.AnyUnix)] + [ActiveIssue(37054, TestPlatforms.OSX)] + [Fact] + public void LongProcessNamesAreSupported() + { + string programPath = GetProgramPath("sleep"); + + if (programPath == null) + { + return; + } + + const string LongProcessName = "123456789012345678901234567890"; + string sleepCommandPathFileName = Path.Combine(TestDirectory, LongProcessName); + File.Copy(programPath, sleepCommandPathFileName); + + using (Process px = Process.Start(sleepCommandPathFileName, "600")) + { + Process[] runningProcesses = Process.GetProcesses(); + try + { + Assert.Contains(runningProcesses, p => p.ProcessName == LongProcessName); + } + finally + { + px.Kill(); + px.WaitForExit(); + } + } + } + private string GetCurrentProcessName() { return $"{Process.GetCurrentProcess().ProcessName}.exe"; From bdd2014f2d1863a296f76b5c90152ae016854afc Mon Sep 17 00:00:00 2001 From: Jim Demis <10913919+jimdemis@users.noreply.github.com> Date: Thu, 25 Apr 2019 18:40:08 +0300 Subject: [PATCH 048/607] Fixes compression method override of zero-length files (#37079) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Fixes compression method override of zero-length files When a zero-length file is stored using compression method, ZipArchive still overrides the method to “not compressed”, and ignore compressed bytes that are still present, rendering the zip file unusable. Fixes #30317 * Ignore uncompressed data for zero-byte files * Removed unnecesary compressed data and resolved review feedback * Changed to assert lengths from stream and removed forgotten debug assert * Moved compressed size reset before WriteLocalFileHeader to keep assert * Applied test feedback * Renamed few fields --- .../System/IO/Compression/ZipArchiveEntry.cs | 18 +++-- .../zip_InvalidParametersAndStrangeFiles.cs | 72 +++++++++++++++++++ 2 files changed, 85 insertions(+), 5 deletions(-) diff --git a/src/System.IO.Compression/src/System/IO/Compression/ZipArchiveEntry.cs b/src/System.IO.Compression/src/System/IO/Compression/ZipArchiveEntry.cs index d04326651963..202ede0a71f1 100644 --- a/src/System.IO.Compression/src/System/IO/Compression/ZipArchiveEntry.cs +++ b/src/System.IO.Compression/src/System/IO/Compression/ZipArchiveEntry.cs @@ -910,13 +910,21 @@ private void WriteLocalFileHeaderAndDataIfNeeded() } else { - // we know the sizes at this point, so just go ahead and write the headers if (_uncompressedSize == 0) - CompressionMethod = CompressionMethodValues.Stored; - WriteLocalFileHeader(isEmptyFile: false); - foreach (byte[] compressedBytes in _compressedBytes) { - _archive.ArchiveStream.Write(compressedBytes, 0, compressedBytes.Length); + // reset size to ensure proper central directory size header + _compressedSize = 0; + } + + WriteLocalFileHeader(isEmptyFile: _uncompressedSize == 0); + + // according to ZIP specs, zero-byte files MUST NOT include file data + if (_uncompressedSize != 0) + { + foreach (byte[] compressedBytes in _compressedBytes) + { + _archive.ArchiveStream.Write(compressedBytes, 0, compressedBytes.Length); + } } } } diff --git a/src/System.IO.Compression/tests/ZipArchive/zip_InvalidParametersAndStrangeFiles.cs b/src/System.IO.Compression/tests/ZipArchive/zip_InvalidParametersAndStrangeFiles.cs index 223963dff59a..e7c031868d2f 100644 --- a/src/System.IO.Compression/tests/ZipArchive/zip_InvalidParametersAndStrangeFiles.cs +++ b/src/System.IO.Compression/tests/ZipArchive/zip_InvalidParametersAndStrangeFiles.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System.Collections.Generic; using System.IO; using System.Threading.Tasks; using Xunit; @@ -241,6 +242,77 @@ public static void ZipWithLargeSparseFile() } } } + + private static readonly byte[] s_emptyFileCompressedWithEtx = + { + 0x50, 0x4B, 0x03, 0x04, 0x14, 0x00, 0x06, 0x00, 0x08, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x78, 0x6C, + 0x2F, 0x63, 0x75, 0x73, 0x74, 0x6F, 0x6D, 0x50, 0x72, 0x6F, 0x70, 0x65, 0x72, 0x74, 0x79, 0x32, + 0x2E, 0x62, 0x69, 0x6E, 0x03, 0x00, 0x50, 0x4B, 0x01, 0x02, 0x14, 0x00, 0x14, 0x00, 0x06, 0x00, + 0x08, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x78, 0x6C, 0x2F, 0x63, 0x75, 0x73, 0x74, 0x6F, 0x6D, 0x50, 0x72, 0x6F, + 0x70, 0x65, 0x72, 0x74, 0x79, 0x32, 0x2E, 0x62, 0x69, 0x6E, 0x50, 0x4B, 0x05, 0x06, 0x00, 0x00, + 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x44, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x00, 0x00, 0x00 + }; + private static readonly byte[] s_emptyFileCompressedWrongSize = + { + 0x50, 0x4B, 0x03, 0x04, 0x14, 0x00, 0x06, 0x00, 0x08, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x78, 0x6C, + 0x2F, 0x63, 0x75, 0x73, 0x74, 0x6F, 0x6D, 0x50, 0x72, 0x6F, 0x70, 0x65, 0x72, 0x74, 0x79, 0x32, + 0x2E, 0x62, 0x69, 0x6E, 0xBA, 0xAD, 0x03, 0x00, 0x50, 0x4B, 0x01, 0x02, 0x14, 0x00, 0x14, 0x00, + 0x06, 0x00, 0x08, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x6C, 0x2F, 0x63, 0x75, 0x73, 0x74, 0x6F, 0x6D, 0x50, + 0x72, 0x6F, 0x70, 0x65, 0x72, 0x74, 0x79, 0x32, 0x2E, 0x62, 0x69, 0x6E, 0x50, 0x4B, 0x05, 0x06, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x44, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, + 0x00, 0x00 + }; + public static IEnumerable EmptyFiles = new List() + { + new object[] { s_emptyFileCompressedWithEtx }, + new object[] { s_emptyFileCompressedWrongSize } + }; + + /// + /// This test checks behavior of ZipArchive with unexpected zip files: + /// 1. EmptyFileCompressedWithEOT has + /// Deflate 0x08, _uncompressedSize 0, _compressedSize 2, compressed data: 0x0300 (\u0003 ETX) + /// 2. EmptyFileCompressedWrongSize has + /// Deflate 0x08, _uncompressedSize 0, _compressedSize 4, compressed data: 0xBAAD0300 (just bad data) + /// ZipArchive is expected to change compression method to Stored (0x00) and ignore "bad" compressed size + /// + [Theory] + [MemberData(nameof(EmptyFiles))] + public void ReadArchive_WithEmptyDeflatedFile(byte[] fileBytes) + { + using (var testStream = new MemoryStream(fileBytes)) + { + const string ExpectedFileName = "xl/customProperty2.bin"; + // open archive with zero-length file that is compressed (Deflate = 0x8) + using (var zip = new ZipArchive(testStream, ZipArchiveMode.Update, leaveOpen: true)) + { + // dispose without making any changes will rewrite the archive + } + + byte[] fileContent = testStream.ToArray(); + + // compression method should change to "uncompressed" (Stored = 0x0) + Assert.Equal(0, fileContent[8]); + + // extract and check the file. should stay empty. + using (var zip = new ZipArchive(testStream, ZipArchiveMode.Update)) + { + ZipArchiveEntry entry = zip.GetEntry(ExpectedFileName); + Assert.Equal(0, entry.Length); + Assert.Equal(0, entry.CompressedLength); + using (Stream entryStream = entry.Open()) + { + Assert.Equal(0, entryStream.Length); + } + } + } + } } } From 97d99f7ed136b19a8cfbd74d5b1e0abc4d1cd2c5 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Thu, 25 Apr 2019 16:11:01 +0000 Subject: [PATCH 049/607] Update dependencies from https://github.com/dotnet/corefx build 20190425.1 (#37178) - Microsoft.NETCore.Platforms - 3.0.0-preview6.19225.1 --- eng/Version.Details.xml | 4 ++-- eng/Versions.props | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index ab8ba0feb4c0..e5c69b523322 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -26,9 +26,9 @@ https://github.com/dotnet/core-setup d2ed8008b689c6c840f658034f7296d9a5d053d8 - + https://github.com/dotnet/corefx - 25fdedd999584a6e7765382b072c73eb9b1558ba + 8c7afe67ee2e9bd21a4412265b66f875cfafaede https://github.com/dotnet/arcade diff --git a/eng/Versions.props b/eng/Versions.props index d669663b4cf5..9be14f7ef9b3 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -44,7 +44,7 @@ 3.0.0-preview6-27623-74 3.0.0-preview6-27623-74 - 3.0.0-preview6.19223.9 + 3.0.0-preview6.19225.1 2.1.0-prerelease.19223.1 From 20adae82ce16d73081df54d512a6ce4d491d5909 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Thu, 25 Apr 2019 16:21:13 +0000 Subject: [PATCH 050/607] Update dependencies from https://github.com/dotnet/arcade build 20190424.9 (#37176) - Microsoft.DotNet.XUnitExtensions - 2.4.0-beta.19224.9 - Microsoft.DotNet.XUnitConsoleRunner - 2.5.1-beta.19224.9 - Microsoft.DotNet.VersionTools.Tasks - 1.0.0-beta.19224.9 - Microsoft.DotNet.ApiCompat - 1.0.0-beta.19224.9 - Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19224.9 - Microsoft.DotNet.Build.Tasks.Configuration - 1.0.0-beta.19224.9 - Microsoft.DotNet.Build.Tasks.Feed - 2.2.0-beta.19224.9 - Microsoft.DotNet.Build.Tasks.Packaging - 1.0.0-beta.19224.9 - Microsoft.DotNet.CodeAnalysis - 1.0.0-beta.19224.9 - Microsoft.DotNet.CoreFxTesting - 1.0.0-beta.19224.9 - Microsoft.DotNet.GenAPI - 1.0.0-beta.19224.9 - Microsoft.DotNet.GenFacades - 1.0.0-beta.19224.9 - Microsoft.DotNet.Helix.Sdk - 2.0.0-beta.19224.9 - Microsoft.DotNet.RemoteExecutor - 1.0.0-beta.19224.9 - Microsoft.DotNet.SourceRewriter - 1.0.0-beta.19224.9 --- eng/Version.Details.xml | 60 ++++++++++---------- eng/Versions.props | 26 ++++----- eng/common/templates/job/job.yml | 7 ++- eng/common/templates/steps/helix-publish.yml | 51 ----------------- global.json | 4 +- 5 files changed, 51 insertions(+), 97 deletions(-) delete mode 100644 eng/common/templates/steps/helix-publish.yml diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index e5c69b523322..733867c71709 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -30,69 +30,69 @@ https://github.com/dotnet/corefx 8c7afe67ee2e9bd21a4412265b66f875cfafaede - + https://github.com/dotnet/arcade - e3919d0c158716ef4685c8e057cc58640af1af83 + e02c88fca482f1141a9bb310c97be20b0ebd0465 https://github.com/dotnet/standard 5e0984ad4d7e5d6702dbaeae1648827ab0a279ea - + https://github.com/dotnet/arcade - e3919d0c158716ef4685c8e057cc58640af1af83 + e02c88fca482f1141a9bb310c97be20b0ebd0465 - + https://github.com/dotnet/arcade - e3919d0c158716ef4685c8e057cc58640af1af83 + e02c88fca482f1141a9bb310c97be20b0ebd0465 - + https://github.com/dotnet/arcade - e3919d0c158716ef4685c8e057cc58640af1af83 + e02c88fca482f1141a9bb310c97be20b0ebd0465 - + https://github.com/dotnet/arcade - e3919d0c158716ef4685c8e057cc58640af1af83 + e02c88fca482f1141a9bb310c97be20b0ebd0465 - + https://github.com/dotnet/arcade - e3919d0c158716ef4685c8e057cc58640af1af83 + e02c88fca482f1141a9bb310c97be20b0ebd0465 - + https://github.com/dotnet/arcade - e3919d0c158716ef4685c8e057cc58640af1af83 + e02c88fca482f1141a9bb310c97be20b0ebd0465 - + https://github.com/dotnet/arcade - e3919d0c158716ef4685c8e057cc58640af1af83 + e02c88fca482f1141a9bb310c97be20b0ebd0465 - + https://github.com/dotnet/arcade - e3919d0c158716ef4685c8e057cc58640af1af83 + e02c88fca482f1141a9bb310c97be20b0ebd0465 - + https://github.com/dotnet/arcade - e3919d0c158716ef4685c8e057cc58640af1af83 + e02c88fca482f1141a9bb310c97be20b0ebd0465 - + https://github.com/dotnet/arcade - e3919d0c158716ef4685c8e057cc58640af1af83 + e02c88fca482f1141a9bb310c97be20b0ebd0465 - + https://github.com/dotnet/arcade - e3919d0c158716ef4685c8e057cc58640af1af83 + e02c88fca482f1141a9bb310c97be20b0ebd0465 - + https://github.com/dotnet/arcade - e3919d0c158716ef4685c8e057cc58640af1af83 + e02c88fca482f1141a9bb310c97be20b0ebd0465 - + https://github.com/dotnet/arcade - e3919d0c158716ef4685c8e057cc58640af1af83 + e02c88fca482f1141a9bb310c97be20b0ebd0465 - + https://github.com/dotnet/arcade - e3919d0c158716ef4685c8e057cc58640af1af83 + e02c88fca482f1141a9bb310c97be20b0ebd0465 https://dev.azure.com/dnceng/internal/_git/dotnet-optimization diff --git a/eng/Versions.props b/eng/Versions.props index 9be14f7ef9b3..9308c58b7e49 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -23,19 +23,19 @@ - 1.0.0-beta.19223.2 - 1.0.0-beta.19223.2 - 1.0.0-beta.19223.2 - 1.0.0-beta.19223.2 - 1.0.0-beta.19223.2 - 2.4.0-beta.19223.2 - 2.5.1-beta.19223.2 - 1.0.0-beta.19223.2 - 1.0.0-beta.19223.2 - 1.0.0-beta.19223.2 - 1.0.0-beta.19223.2 - 2.2.0-beta.19223.2 - 1.0.0-beta.19223.2 + 1.0.0-beta.19224.9 + 1.0.0-beta.19224.9 + 1.0.0-beta.19224.9 + 1.0.0-beta.19224.9 + 1.0.0-beta.19224.9 + 2.4.0-beta.19224.9 + 2.5.1-beta.19224.9 + 1.0.0-beta.19224.9 + 1.0.0-beta.19224.9 + 1.0.0-beta.19224.9 + 1.0.0-beta.19224.9 + 2.2.0-beta.19224.9 + 1.0.0-beta.19224.9 3.0.0-preview6-27623-02 3.0.0-preview6-27623-02 diff --git a/eng/common/templates/job/job.yml b/eng/common/templates/job/job.yml index 74dd81fdc0a3..7839b70bb708 100644 --- a/eng/common/templates/job/job.yml +++ b/eng/common/templates/job/job.yml @@ -43,9 +43,12 @@ parameters: # Optional: enable sending telemetry enableTelemetry: false - # Optional: define the helix repo for telemeetry (example: 'dotnet/arcade') + # Optional: define the helix repo for telemetry (example: 'dotnet/arcade') helixRepo: '' + # Optional: define the helix type for telemetry (example: 'build/product/') + helixType: '' + # Required: name of the job name: '' @@ -122,6 +125,8 @@ jobs: displayName: 'Send Helix Start Telemetry' inputs: helixRepo: ${{ parameters.helixRepo }} + ${{ if ne(parameters.helixType, '') }}: + helixType: ${{ parameters.helixType }} buildConfig: $(_BuildConfig) runAsPublic: ${{ parameters.runAsPublic }} continueOnError: ${{ parameters.continueOnError }} diff --git a/eng/common/templates/steps/helix-publish.yml b/eng/common/templates/steps/helix-publish.yml deleted file mode 100644 index 470ab65da0c6..000000000000 --- a/eng/common/templates/steps/helix-publish.yml +++ /dev/null @@ -1,51 +0,0 @@ -parameters: - HelixSource: 'pr/dotnet-github-anon-kaonashi-bot' - HelixType: ̓'tests/default' - HelixBuild: $(Build.BuildNumber) - HelixTargetQueues: '' - HelixAccessToken: '' - HelixPreCommands: '' - HelixPostCommands: '' - WorkItemDirectory: '' - WorkItemCommand: '' - CorrelationPayloadDirectory: '' - XUnitProjects: '' - XUnitTargetFramework: '' - XUnitRunnerVersion: '' - IncludeDotNetCli: false - DotNetCliPackageType: '' - DotNetCliVersion: '' - EnableXUnitReporter: false - WaitForWorkItemCompletion: true - condition: succeeded() - continueOnError: false - -steps: - - task: DotNetCoreCLI@2 - inputs: - command: custom - projects: eng/common/helixpublish.proj - custom: msbuild - arguments: '/bl:$(Build.SourcesDirectory)/artifacts/log/$(_BuildConfig)/SendToHelix.binlog' - displayName: Send job to Helix - env: - HelixSource: ${{ parameters.HelixSource }} - HelixType: ${{ parameters.HelixType }} - HelixBuild: ${{ parameters.HelixBuild }} - HelixTargetQueues: ${{ parameters.HelixTargetQueues }} - HelixAccessToken: ${{ parameters.HelixAccessToken }} - HelixPreCommands: ${{ parameters.HelixPreCommands }} - HelixPostCommands: ${{ parameters.HelixPostCommands }} - WorkItemDirectory: ${{ parameters.WorkItemDirectory }} - WorkItemCommand: ${{ parameters.WorkItemCommand }} - CorrelationPayloadDirectory: ${{ parameters.CorrelationPayloadDirectory }} - XUnitProjects: ${{ parameters.XUnitProjects }} - XUnitRuntimeTargetFramework: ${{ parameters.XUnitTargetFramework }} - XUnitRunnerVersion: ${{ parameters.XUnitRunnerVersion }} - IncludeDotNetCli: ${{ parameters.IncludeDotNetCli }} - DotNetCliPackageType: ${{ parameters.DotNetCliPackageType }} - DotNetCliVersion: ${{ parameters.DotNetCliVersion }} - EnableXUnitReporter: ${{ parameters.EnableXUnitReporter }} - WaitForWorkItemCompletion: ${{ parameters.WaitForWorkItemCompletion }} - condition: ${{ parameters.condition }} - continueOnError: ${{ parameters.continueOnError }} diff --git a/global.json b/global.json index 7aa09548b28e..d8f0a7aa5a37 100644 --- a/global.json +++ b/global.json @@ -3,8 +3,8 @@ "dotnet": "3.0.100-preview3-010431" }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19223.2", - "Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19223.2", + "Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19224.9", + "Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19224.9", "Microsoft.NET.Sdk.IL": "3.0.0-preview6-27623-74" } } From 1638836a4e5311f23eaa0d24ace031216f94aa18 Mon Sep 17 00:00:00 2001 From: Stephen Toub Date: Thu, 25 Apr 2019 10:06:02 -0400 Subject: [PATCH 051/607] Nullable: Contract.cs and more interop (dotnet/coreclr#24193) * Nullable: Contract.cs and more interop * Address PR feedback Signed-off-by: dotnet-bot --- .../Advapi32/Interop.ActivityControl.cs | 4 +-- .../Advapi32/Interop.EVENT_INFO_CLASS.cs | 4 +-- .../Advapi32/Interop.EtwEnableCallback.cs | 1 + .../Interop.EventActivityIdControl.cs | 1 + .../Windows/Advapi32/Interop.EventRegister.cs | 1 + .../Advapi32/Interop.EventSetInformation.cs | 2 +- .../Advapi32/Interop.EventTraceGuidsEx.cs | 2 +- .../Advapi32/Interop.EventUnregister.cs | 2 +- .../Advapi32/Interop.EventWriteString.cs | 2 +- .../Advapi32/Interop.EventWriteTransfer.cs | 1 + .../src/CoreLib/System/DateTime.Win32.cs | 4 +-- .../src/CoreLib/System/DateTime.WinRT.cs | 1 + .../System/Diagnostics/Contracts/Contracts.cs | 33 ++++++++++--------- src/Common/src/CoreLib/System/GCMemoryInfo.cs | 1 + .../InteropServices/ArrayWithOffset.cs | 11 +++---- .../Runtime/InteropServices/BStrWrapper.cs | 1 + .../InteropServices/ComEventsHelpers.NoCom.cs | 1 + .../Runtime/InteropServices/CriticalHandle.cs | 1 + .../InteropServices/CurrencyWrapper.cs | 11 ++++--- .../InteropServices/DispatchWrapper.cs | 5 +-- .../Runtime/InteropServices/ErrorWrapper.cs | 1 + .../Runtime/InteropServices/HandleRef.cs | 7 ++-- .../Runtime/InteropServices/ICustomAdapter.cs | 1 + .../Runtime/InteropServices/ICustomFactory.cs | 1 + .../InteropServices/ICustomQueryInterface.cs | 1 + .../Runtime/InteropServices/SafeBuffer.cs | 3 +- .../Runtime/InteropServices/UnknownWrapper.cs | 5 +-- .../Runtime/InteropServices/VariantWrapper.cs | 5 +-- .../src/CoreLib/System/WinRTFolderPaths.cs | 7 ++-- 29 files changed, 66 insertions(+), 54 deletions(-) diff --git a/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.ActivityControl.cs b/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.ActivityControl.cs index 34df748d39ab..670ac61334fb 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.ActivityControl.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.ActivityControl.cs @@ -2,9 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Runtime.InteropServices; - +#nullable enable internal partial class Interop { internal partial class Advapi32 diff --git a/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.EVENT_INFO_CLASS.cs b/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.EVENT_INFO_CLASS.cs index a122002e9abe..0b007d17a137 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.EVENT_INFO_CLASS.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.EVENT_INFO_CLASS.cs @@ -2,9 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Runtime.InteropServices; - +#nullable enable internal partial class Interop { internal partial class Advapi32 diff --git a/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.EtwEnableCallback.cs b/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.EtwEnableCallback.cs index 6bb157520f35..560b3ba5b1b9 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.EtwEnableCallback.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.EtwEnableCallback.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable using System; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.EventActivityIdControl.cs b/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.EventActivityIdControl.cs index 886ff37d19fe..f041822c7bba 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.EventActivityIdControl.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.EventActivityIdControl.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable using System; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.EventRegister.cs b/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.EventRegister.cs index f5d245ec5d68..436d8b731f87 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.EventRegister.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.EventRegister.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable using System; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.EventSetInformation.cs b/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.EventSetInformation.cs index 381cb661c37e..919a868a8c23 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.EventSetInformation.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.EventSetInformation.cs @@ -2,7 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; +#nullable enable using System.Runtime.InteropServices; internal partial class Interop diff --git a/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.EventTraceGuidsEx.cs b/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.EventTraceGuidsEx.cs index c5f6f3b18790..657611032d15 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.EventTraceGuidsEx.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.EventTraceGuidsEx.cs @@ -2,7 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; +#nullable enable using System.Runtime.InteropServices; internal partial class Interop diff --git a/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.EventUnregister.cs b/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.EventUnregister.cs index f387b3a9ab5c..79f9e3a9d461 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.EventUnregister.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.EventUnregister.cs @@ -2,7 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; +#nullable enable using System.Runtime.InteropServices; internal partial class Interop diff --git a/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.EventWriteString.cs b/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.EventWriteString.cs index a00a2f3a2c99..6e4fdaed45d2 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.EventWriteString.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.EventWriteString.cs @@ -2,7 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; +#nullable enable using System.Runtime.InteropServices; internal partial class Interop diff --git a/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.EventWriteTransfer.cs b/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.EventWriteTransfer.cs index 2d3f45e839be..2821fff278c3 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.EventWriteTransfer.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.EventWriteTransfer.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable using System; using System.Runtime.InteropServices; #if ES_BUILD_STANDALONE diff --git a/src/Common/src/CoreLib/System/DateTime.Win32.cs b/src/Common/src/CoreLib/System/DateTime.Win32.cs index d742c891c7c0..940d0922c026 100644 --- a/src/Common/src/CoreLib/System/DateTime.Win32.cs +++ b/src/Common/src/CoreLib/System/DateTime.Win32.cs @@ -2,9 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - +#nullable enable namespace System { public readonly partial struct DateTime diff --git a/src/Common/src/CoreLib/System/DateTime.WinRT.cs b/src/Common/src/CoreLib/System/DateTime.WinRT.cs index 30a9a61aa3da..c0844358b376 100644 --- a/src/Common/src/CoreLib/System/DateTime.WinRT.cs +++ b/src/Common/src/CoreLib/System/DateTime.WinRT.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable using System.Runtime.CompilerServices; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/System/Diagnostics/Contracts/Contracts.cs b/src/Common/src/CoreLib/System/Diagnostics/Contracts/Contracts.cs index b9e49583f9b8..26cdc7f4910e 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/Contracts/Contracts.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/Contracts/Contracts.cs @@ -17,6 +17,7 @@ ===========================================================*/ #define DEBUG // The behavior of this contract library should be consistent regardless of build type. +#nullable enable using System.Collections.Generic; using System.Reflection; @@ -180,7 +181,7 @@ public sealed class ContractOptionAttribute : Attribute private string _category; private string _setting; private bool _enabled; - private string _value; + private string? _value; public ContractOptionAttribute(string category, string setting, bool enabled) { @@ -211,7 +212,7 @@ public bool Enabled get { return _enabled; } } - public string Value + public string? Value { get { return _value; } } @@ -264,7 +265,7 @@ public static void Assume(bool condition) [Pure] [Conditional("DEBUG")] [Conditional("CONTRACTS_FULL")] - public static void Assume(bool condition, string userMessage) + public static void Assume(bool condition, string? userMessage) { if (!condition) { @@ -297,7 +298,7 @@ public static void Assert(bool condition) [Pure] [Conditional("DEBUG")] [Conditional("CONTRACTS_FULL")] - public static void Assert(bool condition, string userMessage) + public static void Assert(bool condition, string? userMessage) { if (!condition) ReportFailure(ContractFailureKind.Assert, userMessage, null, null); @@ -335,7 +336,7 @@ public static void Requires(bool condition) /// [Pure] [Conditional("CONTRACTS_FULL")] - public static void Requires(bool condition, string userMessage) + public static void Requires(bool condition, string? userMessage) { AssertMustUseRewriter(ContractFailureKind.Precondition, "Requires"); } @@ -366,7 +367,7 @@ public static void Requires(bool condition) where TException : Excep /// Use this form when you want to throw a particular exception. /// [Pure] - public static void Requires(bool condition, string userMessage) where TException : Exception + public static void Requires(bool condition, string? userMessage) where TException : Exception { AssertMustUseRewriter(ContractFailureKind.Precondition, "Requires"); } @@ -403,7 +404,7 @@ public static void Ensures(bool condition) /// [Pure] [Conditional("CONTRACTS_FULL")] - public static void Ensures(bool condition, string userMessage) + public static void Ensures(bool condition, string? userMessage) { AssertMustUseRewriter(ContractFailureKind.Postcondition, "Ensures"); } @@ -438,7 +439,7 @@ public static void EnsuresOnThrow(bool condition) where TException : /// [Pure] [Conditional("CONTRACTS_FULL")] - public static void EnsuresOnThrow(bool condition, string userMessage) where TException : Exception + public static void EnsuresOnThrow(bool condition, string? userMessage) where TException : Exception { AssertMustUseRewriter(ContractFailureKind.PostconditionOnException, "EnsuresOnThrow"); } @@ -454,7 +455,7 @@ public static void EnsuresOnThrow(bool condition, string userMessage /// This method can only be used within the argument to the contract. /// [Pure] - public static T Result() { return default; } + public static T Result() { return default!; } /// /// Represents the final (output) value of an out parameter when returning from a method. @@ -466,7 +467,7 @@ public static void EnsuresOnThrow(bool condition, string userMessage /// This method can only be used within the argument to the contract. /// [Pure] - public static T ValueAtReturn(out T value) { value = default; return value; } + public static T ValueAtReturn(out T value) { value = default!; return value; } /// /// Represents the value of as it was at the start of the method or property. @@ -478,7 +479,7 @@ public static void EnsuresOnThrow(bool condition, string userMessage /// This method can only be used within the argument to the contract. /// [Pure] - public static T OldValue(T value) { return default; } + public static T OldValue(T value) { return default!; } #endregion Old, Result, and Out Parameters @@ -514,7 +515,7 @@ public static void Invariant(bool condition) /// [Pure] [Conditional("CONTRACTS_FULL")] - public static void Invariant(bool condition, string userMessage) + public static void Invariant(bool condition, string? userMessage) { AssertMustUseRewriter(ContractFailureKind.Invariant, "Invariant"); } @@ -651,10 +652,10 @@ private static void AssertMustUseRewriter(ContractFailureKind kind, string contr // find the first non-mscorlib assembly. Assembly thisAssembly = typeof(Contract).Assembly; // In case we refactor mscorlib, use Contract class instead of Object. StackTrace stack = new StackTrace(); - Assembly probablyNotRewritten = null; + Assembly? probablyNotRewritten = null; for (int i = 0; i < stack.FrameCount; i++) { - Assembly caller = stack.GetFrame(i).GetMethod()?.DeclaringType.Assembly; + Assembly? caller = stack.GetFrame(i)!.GetMethod()?.DeclaringType.Assembly; if (caller != null && caller != thisAssembly) { probablyNotRewritten = caller; @@ -664,7 +665,7 @@ private static void AssertMustUseRewriter(ContractFailureKind kind, string contr if (probablyNotRewritten == null) probablyNotRewritten = thisAssembly; - string simpleName = probablyNotRewritten.GetName().Name; + string? simpleName = probablyNotRewritten.GetName().Name; System.Runtime.CompilerServices.ContractHelper.TriggerFailure(kind, SR.Format(SR.MustUseCCRewrite, contractKind, simpleName), null, null, null); } @@ -679,7 +680,7 @@ private static void AssertMustUseRewriter(ContractFailureKind kind, string contr /// System.Runtime.CompilerServices.ContractHelper.TriggerFailure. /// [System.Diagnostics.DebuggerNonUserCode] - private static void ReportFailure(ContractFailureKind failureKind, string userMessage, string conditionText, Exception innerException) + private static void ReportFailure(ContractFailureKind failureKind, string? userMessage, string? conditionText, Exception? innerException) { if (failureKind < ContractFailureKind.Precondition || failureKind > ContractFailureKind.Assume) throw new ArgumentException(SR.Format(SR.Arg_EnumIllegalVal, failureKind), nameof(failureKind)); diff --git a/src/Common/src/CoreLib/System/GCMemoryInfo.cs b/src/Common/src/CoreLib/System/GCMemoryInfo.cs index 72c2aca14da2..ea1cd3c3820b 100644 --- a/src/Common/src/CoreLib/System/GCMemoryInfo.cs +++ b/src/Common/src/CoreLib/System/GCMemoryInfo.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable namespace System { public readonly struct GCMemoryInfo diff --git a/src/Common/src/CoreLib/System/Runtime/InteropServices/ArrayWithOffset.cs b/src/Common/src/CoreLib/System/Runtime/InteropServices/ArrayWithOffset.cs index 5341143f1d9e..7e3e9a9f7272 100644 --- a/src/Common/src/CoreLib/System/Runtime/InteropServices/ArrayWithOffset.cs +++ b/src/Common/src/CoreLib/System/Runtime/InteropServices/ArrayWithOffset.cs @@ -2,8 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System.Runtime.CompilerServices; - +#nullable enable #if BIT64 using nuint = System.UInt64; #else @@ -14,14 +13,14 @@ namespace System.Runtime.InteropServices { public struct ArrayWithOffset { - private object m_array; + private object? m_array; private int m_offset; private int m_count; // From MAX_SIZE_FOR_INTEROP in mlinfo.h private const int MaxSizeForInterop = 0x7ffffff0; - public ArrayWithOffset(object array, int offset) + public ArrayWithOffset(object? array, int offset) { int totalSize = 0; if (array != null) @@ -50,13 +49,13 @@ public ArrayWithOffset(object array, int offset) m_count = totalSize - offset; } - public object GetArray() => m_array; + public object? GetArray() => m_array; public int GetOffset() => m_offset; public override int GetHashCode() => m_count + m_offset; - public override bool Equals(object obj) + public override bool Equals(object? obj) { return obj is ArrayWithOffset && Equals((ArrayWithOffset)obj); } diff --git a/src/Common/src/CoreLib/System/Runtime/InteropServices/BStrWrapper.cs b/src/Common/src/CoreLib/System/Runtime/InteropServices/BStrWrapper.cs index f6eee3426404..02e6710fccdc 100644 --- a/src/Common/src/CoreLib/System/Runtime/InteropServices/BStrWrapper.cs +++ b/src/Common/src/CoreLib/System/Runtime/InteropServices/BStrWrapper.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable namespace System.Runtime.InteropServices { // Wrapper that is converted to a variant with VT_BSTR. diff --git a/src/Common/src/CoreLib/System/Runtime/InteropServices/ComEventsHelpers.NoCom.cs b/src/Common/src/CoreLib/System/Runtime/InteropServices/ComEventsHelpers.NoCom.cs index 7b29d6f9ad0e..27ed5da8d1b1 100644 --- a/src/Common/src/CoreLib/System/Runtime/InteropServices/ComEventsHelpers.NoCom.cs +++ b/src/Common/src/CoreLib/System/Runtime/InteropServices/ComEventsHelpers.NoCom.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable using System.Runtime.InteropServices.ComTypes; namespace System.Runtime.InteropServices diff --git a/src/Common/src/CoreLib/System/Runtime/InteropServices/CriticalHandle.cs b/src/Common/src/CoreLib/System/Runtime/InteropServices/CriticalHandle.cs index 7b8c4625e39b..8048d7919ed7 100644 --- a/src/Common/src/CoreLib/System/Runtime/InteropServices/CriticalHandle.cs +++ b/src/Common/src/CoreLib/System/Runtime/InteropServices/CriticalHandle.cs @@ -45,6 +45,7 @@ ** ===========================================================*/ +#nullable enable using System.Runtime.ConstrainedExecution; /* diff --git a/src/Common/src/CoreLib/System/Runtime/InteropServices/CurrencyWrapper.cs b/src/Common/src/CoreLib/System/Runtime/InteropServices/CurrencyWrapper.cs index 95d8260fcc5e..7ea8a2370f8d 100644 --- a/src/Common/src/CoreLib/System/Runtime/InteropServices/CurrencyWrapper.cs +++ b/src/Common/src/CoreLib/System/Runtime/InteropServices/CurrencyWrapper.cs @@ -2,24 +2,25 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable namespace System.Runtime.InteropServices { // Wrapper that is converted to a variant with VT_CURRENCY. public sealed class CurrencyWrapper { - public CurrencyWrapper(Decimal obj) + public CurrencyWrapper(decimal obj) { WrappedObject = obj; } - public CurrencyWrapper(Object obj) + public CurrencyWrapper(object obj) { - if (!(obj is Decimal)) + if (!(obj is decimal)) throw new ArgumentException(SR.Arg_MustBeDecimal, nameof(obj)); - WrappedObject = (Decimal)obj; + WrappedObject = (decimal)obj; } - public Decimal WrappedObject { get; } + public decimal WrappedObject { get; } } } diff --git a/src/Common/src/CoreLib/System/Runtime/InteropServices/DispatchWrapper.cs b/src/Common/src/CoreLib/System/Runtime/InteropServices/DispatchWrapper.cs index afdcb7b19a7c..1378347b6015 100644 --- a/src/Common/src/CoreLib/System/Runtime/InteropServices/DispatchWrapper.cs +++ b/src/Common/src/CoreLib/System/Runtime/InteropServices/DispatchWrapper.cs @@ -2,12 +2,13 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable namespace System.Runtime.InteropServices { // Wrapper that is converted to a variant with VT_DISPATCH public sealed class DispatchWrapper { - public DispatchWrapper(Object obj) + public DispatchWrapper(object? obj) { if (obj != null) { @@ -21,6 +22,6 @@ public DispatchWrapper(Object obj) } } - public object WrappedObject { get; } + public object? WrappedObject { get; } } } diff --git a/src/Common/src/CoreLib/System/Runtime/InteropServices/ErrorWrapper.cs b/src/Common/src/CoreLib/System/Runtime/InteropServices/ErrorWrapper.cs index d25f0231a448..a68d6a3d171b 100644 --- a/src/Common/src/CoreLib/System/Runtime/InteropServices/ErrorWrapper.cs +++ b/src/Common/src/CoreLib/System/Runtime/InteropServices/ErrorWrapper.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable namespace System.Runtime.InteropServices { // Wrapper that is converted to a variant with VT_ERROR. diff --git a/src/Common/src/CoreLib/System/Runtime/InteropServices/HandleRef.cs b/src/Common/src/CoreLib/System/Runtime/InteropServices/HandleRef.cs index c81a701996bb..8ba7c41c8c6b 100644 --- a/src/Common/src/CoreLib/System/Runtime/InteropServices/HandleRef.cs +++ b/src/Common/src/CoreLib/System/Runtime/InteropServices/HandleRef.cs @@ -2,23 +2,24 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable namespace System.Runtime.InteropServices { public readonly struct HandleRef { // ! Do not add or rearrange fields as the EE depends on this layout. //------------------------------------------------------------------ - private readonly object _wrapper; + private readonly object? _wrapper; private readonly IntPtr _handle; //------------------------------------------------------------------ - public HandleRef(object wrapper, IntPtr handle) + public HandleRef(object? wrapper, IntPtr handle) { _wrapper = wrapper; _handle = handle; } - public object Wrapper + public object? Wrapper { get { diff --git a/src/Common/src/CoreLib/System/Runtime/InteropServices/ICustomAdapter.cs b/src/Common/src/CoreLib/System/Runtime/InteropServices/ICustomAdapter.cs index 6dd90e2dace4..7a7a235d9ac8 100644 --- a/src/Common/src/CoreLib/System/Runtime/InteropServices/ICustomAdapter.cs +++ b/src/Common/src/CoreLib/System/Runtime/InteropServices/ICustomAdapter.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable namespace System.Runtime.InteropServices { // This the base interface that custom adapters can chose to implement when they want to expose the underlying object. diff --git a/src/Common/src/CoreLib/System/Runtime/InteropServices/ICustomFactory.cs b/src/Common/src/CoreLib/System/Runtime/InteropServices/ICustomFactory.cs index 799db6a2d3a6..41d4f6840e8d 100644 --- a/src/Common/src/CoreLib/System/Runtime/InteropServices/ICustomFactory.cs +++ b/src/Common/src/CoreLib/System/Runtime/InteropServices/ICustomFactory.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable namespace System.Runtime.InteropServices { public interface ICustomFactory diff --git a/src/Common/src/CoreLib/System/Runtime/InteropServices/ICustomQueryInterface.cs b/src/Common/src/CoreLib/System/Runtime/InteropServices/ICustomQueryInterface.cs index a91fd7f5fbb7..439fea4bb5de 100644 --- a/src/Common/src/CoreLib/System/Runtime/InteropServices/ICustomQueryInterface.cs +++ b/src/Common/src/CoreLib/System/Runtime/InteropServices/ICustomQueryInterface.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable namespace System.Runtime.InteropServices { // This the interface that be implemented by class that want to customize the behavior of QueryInterface. diff --git a/src/Common/src/CoreLib/System/Runtime/InteropServices/SafeBuffer.cs b/src/Common/src/CoreLib/System/Runtime/InteropServices/SafeBuffer.cs index 562bd719b08e..41b1bad7b007 100644 --- a/src/Common/src/CoreLib/System/Runtime/InteropServices/SafeBuffer.cs +++ b/src/Common/src/CoreLib/System/Runtime/InteropServices/SafeBuffer.cs @@ -65,8 +65,7 @@ // static variable (perhaps using Interlocked.CompareExchange). Of course, // assignments in a static class constructor are under a lock implicitly. -using System; -using System.Diagnostics; +#nullable enable using System.Runtime.CompilerServices; using Internal.Runtime.CompilerServices; using Microsoft.Win32.SafeHandles; diff --git a/src/Common/src/CoreLib/System/Runtime/InteropServices/UnknownWrapper.cs b/src/Common/src/CoreLib/System/Runtime/InteropServices/UnknownWrapper.cs index 9d1599af6eae..22dca1c021df 100644 --- a/src/Common/src/CoreLib/System/Runtime/InteropServices/UnknownWrapper.cs +++ b/src/Common/src/CoreLib/System/Runtime/InteropServices/UnknownWrapper.cs @@ -2,16 +2,17 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable namespace System.Runtime.InteropServices { // Wrapper that is converted to a variant with VT_UNKNOWN. public sealed class UnknownWrapper { - public UnknownWrapper(Object obj) + public UnknownWrapper(object? obj) { WrappedObject = obj; } - public Object WrappedObject { get; } + public object? WrappedObject { get; } } } diff --git a/src/Common/src/CoreLib/System/Runtime/InteropServices/VariantWrapper.cs b/src/Common/src/CoreLib/System/Runtime/InteropServices/VariantWrapper.cs index 3d75da19949f..f93a16374c7f 100644 --- a/src/Common/src/CoreLib/System/Runtime/InteropServices/VariantWrapper.cs +++ b/src/Common/src/CoreLib/System/Runtime/InteropServices/VariantWrapper.cs @@ -2,16 +2,17 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable namespace System.Runtime.InteropServices { // Wrapper that is converted to a variant with VT_BYREF | VT_VARIANT. public sealed class VariantWrapper { - public VariantWrapper(Object obj) + public VariantWrapper(object? obj) { WrappedObject = obj; } - public Object WrappedObject { get; } + public object? WrappedObject { get; } } } diff --git a/src/Common/src/CoreLib/System/WinRTFolderPaths.cs b/src/Common/src/CoreLib/System/WinRTFolderPaths.cs index 3ba177a7140b..c76f8afc7c89 100644 --- a/src/Common/src/CoreLib/System/WinRTFolderPaths.cs +++ b/src/Common/src/CoreLib/System/WinRTFolderPaths.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable using Windows.Foundation.Metadata; using Windows.Storage; using System.IO; @@ -124,13 +125,13 @@ private static string GetFolderPathCoreFallBack(SpecialFolder folder) switch (folder) { case SpecialFolder.ApplicationData: - return ApplicationData.Current.RoamingFolder?.Path; + return ApplicationData.Current.RoamingFolder?.Path ?? string.Empty; case SpecialFolder.LocalApplicationData: - return ApplicationData.Current.LocalFolder?.Path; + return ApplicationData.Current.LocalFolder?.Path ?? string.Empty; case SpecialFolder.System: return SystemDirectory; case SpecialFolder.Windows: - return Path.GetDirectoryName(SystemDirectory); + return Path.GetDirectoryName(SystemDirectory)!; // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 default: return string.Empty; } From 437e50a842dba5ed18fd095d09027cf2f6529321 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Thu, 25 Apr 2019 13:45:21 -0400 Subject: [PATCH 052/607] Update dependencies from https://github.com/dotnet/coreclr build 20190424.71 (#37180) - Microsoft.NET.Sdk.IL - 3.0.0-preview6-27624-71 - Microsoft.NETCore.ILAsm - 3.0.0-preview6-27624-71 - Microsoft.NETCore.Runtime.CoreCLR - 3.0.0-preview6-27624-71 --- eng/Version.Details.xml | 12 ++++++------ eng/Versions.props | 4 ++-- global.json | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 733867c71709..c00c76fe5b5e 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -1,16 +1,16 @@ - + https://github.com/dotnet/coreclr - 22c467297d0d537c2e647ec5c5b4256ab42b18bb + 8808f4eab10d1760182590cad4964f566b9c88ca - + https://github.com/dotnet/coreclr - 22c467297d0d537c2e647ec5c5b4256ab42b18bb + 8808f4eab10d1760182590cad4964f566b9c88ca - + https://github.com/dotnet/coreclr - 22c467297d0d537c2e647ec5c5b4256ab42b18bb + 8808f4eab10d1760182590cad4964f566b9c88ca diff --git a/eng/Versions.props b/eng/Versions.props index 9308c58b7e49..37b5f3ab88fe 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -41,8 +41,8 @@ 3.0.0-preview6-27623-02 3.0.0-preview6-27623-02 - 3.0.0-preview6-27623-74 - 3.0.0-preview6-27623-74 + 3.0.0-preview6-27624-71 + 3.0.0-preview6-27624-71 3.0.0-preview6.19225.1 diff --git a/global.json b/global.json index d8f0a7aa5a37..4fe040f3dda0 100644 --- a/global.json +++ b/global.json @@ -5,6 +5,6 @@ "msbuild-sdks": { "Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19224.9", "Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19224.9", - "Microsoft.NET.Sdk.IL": "3.0.0-preview6-27623-74" + "Microsoft.NET.Sdk.IL": "3.0.0-preview6-27624-71" } } From 6da9a3b80c2ac56c641fa22157607860f6b9387f Mon Sep 17 00:00:00 2001 From: David Shulman Date: Thu, 25 Apr 2019 10:58:44 -0700 Subject: [PATCH 053/607] Fix SocketsHttpHandler system proxy usage logic (#37153) SocketsHttpHandler was not using the proxy bypass list specified in IE settings in cases where there is a combination of both 'AutoDetect' and 'Manual' settings in the IE settings dialog. SocketsHttpHandler uses WinHttpHandler's WinInetProxyHelper class as part of the HttpSystemProxy class. But it was consuming it in an incorrect way. WinInetProxyHelper was originally written to be used only with the rest of the WinHTTP stack for WinHttpHandler. When WinHTTP GetProxyForUrl() was returning a ProxyBypass string, HttpSystemProxy was ignoring it. It was assuming that the string for Proxy was correct. But in cases where ProxyBypass is returned, the Proxy string is only used if the destination uri doesn't match any of the strings in the ProxyBypass list. That logic would normally be handled automatically by WinHttpHandler. But HttpSystemProxy was simply discarding the ProxyBypass string returned by WinHTTP GetProxyForUrl(). In order to address this fix, I added new tests for HttpSystemProxy. I utilized the existing mock layers for registry and WinHTTP interop that are contained in the WinHttpHandler Unit Tests. It might seem weird to have tests for the internal HttpSystemProxy class located in the WinHttpHandler folder. But, we already pull in the source code for WinInetProxyHelper from WinHttpHandler into the SocketsHttpHandler compilation. Using these Unit Tests with the mocking layers allows us to test a broad range of scenarios (registry settings and network failures) that are normally difficult to test. I have a plan, though, to refactor the system proxy code and tests as part of implementing #36553. That will result in the system proxy code and tests ending up in a more logical place. Fixes #33866 --- .../src/System/Net/Http/WinInetProxyHelper.cs | 26 ++--- .../tests/UnitTests/Configurations.props | 6 +- .../tests/UnitTests/HttpSystemProxyTest.cs | 98 +++++++++++++++++++ ....Net.Http.WinHttpHandler.Unit.Tests.csproj | 4 + .../SocketsHttpHandler/HttpSystemProxy.cs | 86 +++++++++------- 5 files changed, 163 insertions(+), 57 deletions(-) create mode 100644 src/System.Net.Http.WinHttpHandler/tests/UnitTests/HttpSystemProxyTest.cs diff --git a/src/System.Net.Http.WinHttpHandler/src/System/Net/Http/WinInetProxyHelper.cs b/src/System.Net.Http.WinHttpHandler/src/System/Net/Http/WinInetProxyHelper.cs index f1be806355f0..a56bea19c77d 100644 --- a/src/System.Net.Http.WinHttpHandler/src/System/Net/Http/WinInetProxyHelper.cs +++ b/src/System.Net.Http.WinHttpHandler/src/System/Net/Http/WinInetProxyHelper.cs @@ -57,29 +57,19 @@ public WinInetProxyHelper() } } - public string AutoConfigUrl { get; set; } + public string AutoConfigUrl { get; private set; } - public bool AutoDetect { get; set; } + public bool AutoDetect { get; private set; } - public bool AutoSettingsUsed - { - get - { - return AutoDetect || !string.IsNullOrEmpty(AutoConfigUrl); - } - } + public bool AutoSettingsUsed => AutoDetect || !string.IsNullOrEmpty(AutoConfigUrl); - public bool ManualSettingsOnly - { - get - { - return !AutoDetect && string.IsNullOrEmpty(AutoConfigUrl) && !string.IsNullOrEmpty(Proxy); - } - } + public bool ManualSettingsUsed => !string.IsNullOrEmpty(Proxy); + + public bool ManualSettingsOnly => !AutoSettingsUsed && ManualSettingsUsed; - public string Proxy { get; set; } + public string Proxy { get; private set; } - public string ProxyBypass { get; set; } + public string ProxyBypass { get; private set; } public bool RecentAutoDetectionFailure => _autoDetectionFailed && diff --git a/src/System.Net.Http.WinHttpHandler/tests/UnitTests/Configurations.props b/src/System.Net.Http.WinHttpHandler/tests/UnitTests/Configurations.props index 611acec17f5f..0d96800a87b9 100644 --- a/src/System.Net.Http.WinHttpHandler/tests/UnitTests/Configurations.props +++ b/src/System.Net.Http.WinHttpHandler/tests/UnitTests/Configurations.props @@ -1,7 +1,7 @@ - + - netstandard-Windows_NT; + netcoreapp-Windows_NT; - \ No newline at end of file + diff --git a/src/System.Net.Http.WinHttpHandler/tests/UnitTests/HttpSystemProxyTest.cs b/src/System.Net.Http.WinHttpHandler/tests/UnitTests/HttpSystemProxyTest.cs new file mode 100644 index 000000000000..b9e306b76059 --- /dev/null +++ b/src/System.Net.Http.WinHttpHandler/tests/UnitTests/HttpSystemProxyTest.cs @@ -0,0 +1,98 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Collections.Generic; + +using Xunit; +using Xunit.Abstractions; + +namespace System.Net.Http.WinHttpHandlerUnitTests +{ + public class HttpSystemProxyTest + { + private const string ManualSettingsProxyHost = "myproxy.local"; + private const string ManualSettingsProxyBypassList = "localhost;*.local"; + + private readonly ITestOutputHelper _output; + + public HttpSystemProxyTest(ITestOutputHelper output) + { + _output = output; + TestControl.ResetAll(); + } + + public static IEnumerable ManualSettingsMemberData() + { + yield return new object[] { new Uri("http://example.org"), false }; + yield return new object[] { new Uri("http://example.local"), true }; + yield return new object[] { new Uri("http://localhost"), true }; + } + + [Fact] + public void TryCreate_WinInetProxySettingsAllOff_ReturnsFalse() + { + Assert.False(HttpSystemProxy.TryCreate(out IWebProxy webProxy)); + } + + [Theory] + [MemberData(nameof(ManualSettingsMemberData))] + public void GetProxy_BothAutoDetectAndManualSettingsButFailedAutoDetect_ManualSettingsUsed( + Uri destination, bool bypassProxy) + { + FakeRegistry.WinInetProxySettings.AutoDetect = true; + FakeRegistry.WinInetProxySettings.Proxy = ManualSettingsProxyHost; + FakeRegistry.WinInetProxySettings.ProxyBypass = ManualSettingsProxyBypassList; + TestControl.PACFileNotDetectedOnNetwork = true; + + Assert.True(HttpSystemProxy.TryCreate(out IWebProxy webProxy)); + + // The first GetProxy() call will try using WinInetProxyHelper (and thus WinHTTP) since AutoDetect is on. + Uri proxyUri1 = webProxy.GetProxy(destination); + + // The second GetProxy call will skip using WinHTTP since AutoDetect is on but + // there was a recent AutoDetect failure. This tests the codepath in HttpSystemProxy + // which queries WinInetProxyHelper.RecentAutoDetectionFailure. + Uri proxyUri2 = webProxy.GetProxy(destination); + + if (bypassProxy) + { + Assert.Null(proxyUri1); + Assert.Null(proxyUri2); + } + else + { + Assert.Equal(ManualSettingsProxyHost, proxyUri1.Host); + Assert.Equal(ManualSettingsProxyHost, proxyUri2.Host); + } + } + + [Theory] + [MemberData(nameof(ManualSettingsMemberData))] + public void GetProxy_ManualSettingsOnly_ManualSettingsUsed( + Uri destination, bool bypassProxy) + { + FakeRegistry.WinInetProxySettings.Proxy = ManualSettingsProxyHost; + FakeRegistry.WinInetProxySettings.ProxyBypass = ManualSettingsProxyBypassList; + + Assert.True(HttpSystemProxy.TryCreate(out IWebProxy webProxy)); + Uri proxyUri = webProxy.GetProxy(destination); + if (bypassProxy) + { + Assert.Null(proxyUri); + } + else + { + Assert.Equal(ManualSettingsProxyHost, proxyUri.Host); + } + } + + [Fact] + public void IsBypassed_ReturnsFalse() + { + FakeRegistry.WinInetProxySettings.AutoDetect = true; + Assert.True(HttpSystemProxy.TryCreate(out IWebProxy webProxy)); + Assert.False(webProxy.IsBypassed(new Uri("http://www.microsoft.com/"))); + } + } +} diff --git a/src/System.Net.Http.WinHttpHandler/tests/UnitTests/System.Net.Http.WinHttpHandler.Unit.Tests.csproj b/src/System.Net.Http.WinHttpHandler/tests/UnitTests/System.Net.Http.WinHttpHandler.Unit.Tests.csproj index 1715d6366ea2..edb4a3d0cbb6 100644 --- a/src/System.Net.Http.WinHttpHandler/tests/UnitTests/System.Net.Http.WinHttpHandler.Unit.Tests.csproj +++ b/src/System.Net.Http.WinHttpHandler/tests/UnitTests/System.Net.Http.WinHttpHandler.Unit.Tests.csproj @@ -127,6 +127,9 @@ ProductionCode\WinInetProxyHelper.cs + + ProductionCode\HttpSystemProxy.cs + @@ -135,6 +138,7 @@ + diff --git a/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpSystemProxy.cs b/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpSystemProxy.cs index 15f6678ad753..86b30cf23a06 100644 --- a/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpSystemProxy.cs +++ b/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpSystemProxy.cs @@ -64,7 +64,7 @@ private HttpSystemProxy(WinInetProxyHelper proxyHelper, SafeWinHttpHandle sessio _proxyHelper = proxyHelper; _sessionHandle = sessionHandle; - if (proxyHelper.ManualSettingsOnly) + if (proxyHelper.ManualSettingsUsed) { if (NetEventSource.IsEnabled) NetEventSource.Info(proxyHelper, $"ManualSettingsUsed, {proxyHelper.Proxy}"); ParseProxyConfig(proxyHelper.Proxy, out _insecureProxyUri, out _secureProxyUri); @@ -275,7 +275,48 @@ private static int GetProxySubstringLength(string proxyString, int idx) /// public Uri GetProxy(Uri uri) { - if (_proxyHelper.ManualSettingsOnly) + // We need WinHTTP to detect and/or process a PAC (JavaScript) file. This maps to + // "Automatically detect settings" and/or "Use automatic configuration script" from IE + // settings. But, calling into WinHTTP can be slow especially when it has to call into + // the out-of-process service to discover, load, and run the PAC file. So, we skip + // calling into WinHTTP if there was a recent failure to detect a PAC file on the network. + // This is a common error. The default IE settings on a Windows machine consist of the + // single checkbox for "Automatically detect settings" turned on and most networks + // won't actually discover a PAC file on the network since WPAD protocol isn't configured. + if (_proxyHelper.AutoSettingsUsed && !_proxyHelper.RecentAutoDetectionFailure) + { + var proxyInfo = new Interop.WinHttp.WINHTTP_PROXY_INFO(); + try + { + if (_proxyHelper.GetProxyForUrl(_sessionHandle, uri, out proxyInfo)) + { + // If WinHTTP just specified a Proxy with no ProxyBypass list, then + // we can return the Proxy uri directly. + if (proxyInfo.ProxyBypass == IntPtr.Zero) + { + return GetUriFromString(Marshal.PtrToStringUni(proxyInfo.Proxy)); + } + + // A bypass list was also specified. This means that WinHTTP has fallen back to + // using the manual IE settings specified and there is a ProxyBypass list also. + // Since we're not really using the full WinHTTP stack, we need to use HttpSystemProxy + // to do the computation of the final proxy uri merging the information from the Proxy + // and ProxyBypass strings. + } + else + { + return null; + } + } + finally + { + Marshal.FreeHGlobal(proxyInfo.Proxy); + Marshal.FreeHGlobal(proxyInfo.ProxyBypass); + } + } + + // Fallback to manual settings if present. + if (_proxyHelper.ManualSettingsUsed) { if (_bypassLocal) { @@ -332,25 +373,6 @@ public Uri GetProxy(Uri uri) return (uri.Scheme == UriScheme.Https || uri.Scheme == UriScheme.Wss) ? _secureProxyUri : _insecureProxyUri; } - // For anything else ask WinHTTP. To improve performance, we don't call into - // WinHTTP if there was a recent failure to detect a PAC file on the network. - if (!_proxyHelper.RecentAutoDetectionFailure) - { - var proxyInfo = new Interop.WinHttp.WINHTTP_PROXY_INFO(); - try - { - if (_proxyHelper.GetProxyForUrl(_sessionHandle, uri, out proxyInfo)) - { - return GetUriFromString(Marshal.PtrToStringUni(proxyInfo.Proxy)); - } - } - finally - { - Marshal.FreeHGlobal(proxyInfo.Proxy); - Marshal.FreeHGlobal(proxyInfo.ProxyBypass); - } - } - return null; } @@ -359,21 +381,13 @@ public Uri GetProxy(Uri uri) /// public bool IsBypassed(Uri uri) { - if (_proxyHelper.ManualSettingsOnly) - { - if (_bypassLocal) - { - // TODO #23150: implement bypass match. - } - return false; - } - else if (_proxyHelper.AutoSettingsUsed) - { - // Always return false for now to avoid query to WinHtttp. - // If URI should be bypassed GetProxy() will return null; - return false; - } - return true; + // This HttpSystemProxy class is only consumed by SocketsHttpHandler and is not exposed outside of + // SocketsHttpHandler. The current pattern for consumption of IWebProxy is to call IsBypassed first. + // If it returns false, then the caller will call GetProxy. For this proxy implementation, computing + // the return value for IsBypassed is as costly as calling GetProxy. We want to avoid doing extra + // work. So, this proxy implementation for the IsBypassed method can always return false. Then the + // GetProxy method will return non-null for a proxy, or null if no proxy should be used. + return false; } public ICredentials Credentials From b176a73bdeb9bf3c79b63cee2f13da9a0e0759ab Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Thu, 25 Apr 2019 18:23:12 +0000 Subject: [PATCH 054/607] Update dependencies from https://github.com/dotnet/standard build 20190424.1 (#37179) - NETStandard.Library - 2.1.0-prerelease.19224.1 --- eng/Version.Details.xml | 4 ++-- eng/Versions.props | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index c00c76fe5b5e..3a43acabe828 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -34,9 +34,9 @@ https://github.com/dotnet/arcade e02c88fca482f1141a9bb310c97be20b0ebd0465 - + https://github.com/dotnet/standard - 5e0984ad4d7e5d6702dbaeae1648827ab0a279ea + 5bd46b63a3e439d2a8e70a1fc52942783f1033f5 https://github.com/dotnet/arcade diff --git a/eng/Versions.props b/eng/Versions.props index 37b5f3ab88fe..920fa795e6f2 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -46,7 +46,7 @@ 3.0.0-preview6.19225.1 - 2.1.0-prerelease.19223.1 + 2.1.0-prerelease.19224.1 99.99.99-master-20190425.1 From c2e08d769249ee3e488b37017968e51295c770ce Mon Sep 17 00:00:00 2001 From: Levi Broderick Date: Thu, 25 Apr 2019 08:22:39 -0700 Subject: [PATCH 055/607] Fix verification of 3-byte UTF-8 sequence followed by non-ASCII byte (#24235) Signed-off-by: dotnet-bot --- .../CoreLib/System/Text/Unicode/Utf8Utility.Validation.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Common/src/CoreLib/System/Text/Unicode/Utf8Utility.Validation.cs b/src/Common/src/CoreLib/System/Text/Unicode/Utf8Utility.Validation.cs index b36dbb09c70f..c7ef9a9d6b97 100644 --- a/src/Common/src/CoreLib/System/Text/Unicode/Utf8Utility.Validation.cs +++ b/src/Common/src/CoreLib/System/Text/Unicode/Utf8Utility.Validation.cs @@ -390,16 +390,16 @@ private static void _ValidateAdditionalNIntDefinitions() // Can't extract this check into its own helper method because JITter produces suboptimal // assembly, even with aggressive inlining. - // Code below becomes 5 instructions: test, jz, add, test, jz + // Code below becomes 5 instructions: test, jz, lea, test, jz - if (((thisDWord & 0x0000_200Fu) == 0) || (((thisDWord -= 0x0000_200Du) & 0x0000_200Fu) == 0)) + if (((thisDWord & 0x0000_200Fu) == 0) || (((thisDWord - 0x0000_200Du) & 0x0000_200Fu) == 0)) { goto Error; // overlong or surrogate } } else { - if (((thisDWord & 0x0F20_0000u) == 0) || (((thisDWord -= 0x0D20_0000u) & 0x0F20_0000u) == 0)) + if (((thisDWord & 0x0F20_0000u) == 0) || (((thisDWord - 0x0D20_0000u) & 0x0F20_0000u) == 0)) { goto Error; // overlong or surrogate } From 3fd90668431a51fc1c0ec330db20d1dfde7c147d Mon Sep 17 00:00:00 2001 From: Anirudh Agnihotry Date: Thu, 25 Apr 2019 12:54:10 -0700 Subject: [PATCH 056/607] improving error message for non-windows platform (#37193) --- src/System.Windows.Extensions/src/Resources/Strings.resx | 4 ++-- .../src/System.Windows.Extensions.csproj | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/System.Windows.Extensions/src/Resources/Strings.resx b/src/System.Windows.Extensions/src/Resources/Strings.resx index c20295ae3f64..17a6ad27209f 100644 --- a/src/System.Windows.Extensions/src/Resources/Strings.resx +++ b/src/System.Windows.Extensions/src/Resources/Strings.resx @@ -128,8 +128,8 @@ (none) - - X509Certificate2UI is not supported on this platform. + + System.Windows.Extensions types are not supported on this platform. Could not determine a universal resource identifier for the sound location. diff --git a/src/System.Windows.Extensions/src/System.Windows.Extensions.csproj b/src/System.Windows.Extensions/src/System.Windows.Extensions.csproj index 3e53b21afcb1..fc4a9bf2f39e 100644 --- a/src/System.Windows.Extensions/src/System.Windows.Extensions.csproj +++ b/src/System.Windows.Extensions/src/System.Windows.Extensions.csproj @@ -1,7 +1,7 @@ {E0C4E267-B1D6-463B-9C95-8C0D3C335924} - SR.PlatformNotSupported_X509Certificate2UI + SR.PlatformNotSupported_System_Windows_Extensions true netcoreapp-Debug;netcoreapp-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release From 3662c77596167ac2393fed6fb3dd9416446f36d2 Mon Sep 17 00:00:00 2001 From: Anirudh Agnihotry Date: Thu, 25 Apr 2019 11:47:22 -0700 Subject: [PATCH 057/607] Nullable System.Collections.EmptyReadOnlyDictionaryInternal, System.Collections.ObjectModel.* (#24221) * annotating collections * annotated collection.cs and readonlycollection.cs * adding tkey constraint and comments Signed-off-by: dotnet-bot --- src/Common/src/CoreLib/System/Array.cs | 2 +- .../Collections/ObjectModel/Collection.cs | 41 ++++++++++--------- .../ObjectModel/ReadOnlyCollection.cs | 23 ++++++----- src/Common/src/CoreLib/System/ThrowHelper.cs | 2 +- 4 files changed, 35 insertions(+), 33 deletions(-) diff --git a/src/Common/src/CoreLib/System/Array.cs b/src/Common/src/CoreLib/System/Array.cs index 058f1ca8e214..2a4cd816f33d 100644 --- a/src/Common/src/CoreLib/System/Array.cs +++ b/src/Common/src/CoreLib/System/Array.cs @@ -36,7 +36,7 @@ public static ReadOnlyCollection AsReadOnly(T[] array) } // T[] implements IList. - return new ReadOnlyCollection(array); + return new ReadOnlyCollection(array!); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 } public static void Resize(ref T[]? array, int newSize) // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 diff --git a/src/Common/src/CoreLib/System/Collections/ObjectModel/Collection.cs b/src/Common/src/CoreLib/System/Collections/ObjectModel/Collection.cs index 4898c0cae20a..89817ba61f2c 100644 --- a/src/Common/src/CoreLib/System/Collections/ObjectModel/Collection.cs +++ b/src/Common/src/CoreLib/System/Collections/ObjectModel/Collection.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable using System.Collections.Generic; using System.Diagnostics; @@ -26,7 +27,7 @@ public Collection(IList list) { ThrowHelper.ThrowArgumentNullException(ExceptionArgument.list); } - items = list; + items = list!; // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 } public int Count @@ -133,7 +134,7 @@ public void InsertRange(int index, IEnumerable collection) ThrowHelper.ThrowArgumentOutOfRange_IndexException(); } - InsertItemsRange(index, collection); + InsertItemsRange(index, collection!); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 } public bool Remove(T item) @@ -201,7 +202,7 @@ public void ReplaceRange(int index, int count, IEnumerable collection) ThrowHelper.ThrowArgumentNullException(ExceptionArgument.collection); } - ReplaceItemsRange(index, count, collection); + ReplaceItemsRange(index, count, collection!); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 } public void RemoveAt(int index) @@ -308,7 +309,7 @@ void ICollection.CopyTo(Array array, int index) ThrowHelper.ThrowArgumentNullException(ExceptionArgument.array); } - if (array.Rank != 1) + if (array!.Rank != 1) // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 { ThrowHelper.ThrowArgumentException(ExceptionResource.Arg_RankMultiDimNotSupported); } @@ -351,7 +352,7 @@ void ICollection.CopyTo(Array array, int index) // We can't cast array of value type to object[], so we don't support // widening of primitive types here. // - object[] objects = array as object[]; + object?[]? objects = array as object[]; if (objects == null) { ThrowHelper.ThrowArgumentException_Argument_InvalidArrayType(); @@ -362,7 +363,7 @@ void ICollection.CopyTo(Array array, int index) { for (int i = 0; i < count; i++) { - objects[index++] = items[i]; + objects![index++] = items[i]; // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 } } catch (ArrayTypeMismatchException) @@ -372,7 +373,7 @@ void ICollection.CopyTo(Array array, int index) } } - object IList.this[int index] + object? IList.this[int index] { get { return items[index]; } set @@ -381,7 +382,7 @@ object IList.this[int index] try { - this[index] = (T)value; + this[index] = (T)value!; // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 } catch (InvalidCastException) { @@ -414,7 +415,7 @@ bool IList.IsFixedSize } } - int IList.Add(object value) + int IList.Add(object? value) { if (items.IsReadOnly) { @@ -424,7 +425,7 @@ int IList.Add(object value) try { - Add((T)value); + Add((T)value!); // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 } catch (InvalidCastException) { @@ -434,25 +435,25 @@ int IList.Add(object value) return this.Count - 1; } - bool IList.Contains(object value) + bool IList.Contains(object? value) { if (IsCompatibleObject(value)) { - return Contains((T)value); + return Contains((T)value!); // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 } return false; } - int IList.IndexOf(object value) + int IList.IndexOf(object? value) { if (IsCompatibleObject(value)) { - return IndexOf((T)value); + return IndexOf((T)value!); // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 } return -1; } - void IList.Insert(int index, object value) + void IList.Insert(int index, object? value) { if (items.IsReadOnly) { @@ -462,7 +463,7 @@ void IList.Insert(int index, object value) try { - Insert(index, (T)value); + Insert(index, (T)value!); // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 } catch (InvalidCastException) { @@ -470,7 +471,7 @@ void IList.Insert(int index, object value) } } - void IList.Remove(object value) + void IList.Remove(object? value) { if (items.IsReadOnly) { @@ -479,15 +480,15 @@ void IList.Remove(object value) if (IsCompatibleObject(value)) { - Remove((T)value); + Remove((T)value!); // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 } } - private static bool IsCompatibleObject(object value) + private static bool IsCompatibleObject(object? value) { // Non-null values are fine. Only accept nulls if T is a class or Nullable. // Note that default(T) is not equal to null for value types except when T is Nullable. - return ((value is T) || (value == null && default(T) == null)); + return ((value is T) || (value == null && default(T)! == null)); } } } diff --git a/src/Common/src/CoreLib/System/Collections/ObjectModel/ReadOnlyCollection.cs b/src/Common/src/CoreLib/System/Collections/ObjectModel/ReadOnlyCollection.cs index 9d463da751dc..99ffd262f440 100644 --- a/src/Common/src/CoreLib/System/Collections/ObjectModel/ReadOnlyCollection.cs +++ b/src/Common/src/CoreLib/System/Collections/ObjectModel/ReadOnlyCollection.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable using System.Collections.Generic; using System.Diagnostics; @@ -21,7 +22,7 @@ public ReadOnlyCollection(IList list) { ThrowHelper.ThrowArgumentNullException(ExceptionArgument.list); } - this.list = list; + this.list = list!; // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 } public int Count @@ -127,7 +128,7 @@ void ICollection.CopyTo(Array array, int index) ThrowHelper.ThrowArgumentNullException(ExceptionArgument.array); } - if (array.Rank != 1) + if (array!.Rank != 1) // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 { ThrowHelper.ThrowArgumentException(ExceptionResource.Arg_RankMultiDimNotSupported); } @@ -170,7 +171,7 @@ void ICollection.CopyTo(Array array, int index) // We can't cast array of value type to object[], so we don't support // widening of primitive types here. // - object[] objects = array as object[]; + object?[]? objects = array as object[]; if (objects == null) { ThrowHelper.ThrowArgumentException_Argument_InvalidArrayType(); @@ -181,7 +182,7 @@ void ICollection.CopyTo(Array array, int index) { for (int i = 0; i < count; i++) { - objects[index++] = list[i]; + objects![index++] = list[i]; // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 } } catch (ArrayTypeMismatchException) @@ -201,7 +202,7 @@ bool IList.IsReadOnly get { return true; } } - object IList.this[int index] + object? IList.this[int index] { get { return list[index]; } set @@ -221,27 +222,27 @@ void IList.Clear() ThrowHelper.ThrowNotSupportedException(ExceptionResource.NotSupported_ReadOnlyCollection); } - private static bool IsCompatibleObject(object value) + private static bool IsCompatibleObject(object? value) { // Non-null values are fine. Only accept nulls if T is a class or Nullable. // Note that default(T) is not equal to null for value types except when T is Nullable. - return ((value is T) || (value == null && default(T) == null)); + return ((value is T) || (value == null && default(T)! == null)); } - bool IList.Contains(object value) + bool IList.Contains(object? value) { if (IsCompatibleObject(value)) { - return Contains((T)value); + return Contains((T)value!); // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 } return false; } - int IList.IndexOf(object value) + int IList.IndexOf(object? value) { if (IsCompatibleObject(value)) { - return IndexOf((T)value); + return IndexOf((T)value!); // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 } return -1; } diff --git a/src/Common/src/CoreLib/System/ThrowHelper.cs b/src/Common/src/CoreLib/System/ThrowHelper.cs index 53919101d92e..e73e1fa4219b 100644 --- a/src/Common/src/CoreLib/System/ThrowHelper.cs +++ b/src/Common/src/CoreLib/System/ThrowHelper.cs @@ -397,7 +397,7 @@ private static InvalidOperationException GetInvalidOperationException_EnumCurren // Aggressively inline so the jit evaluates the if in place and either drops the call altogether // Or just leaves null test and call to the Non-returning ThrowHelper.ThrowArgumentNullException [MethodImpl(MethodImplOptions.AggressiveInlining)] - internal static void IfNullAndNullsAreIllegalThenThrow(object value, ExceptionArgument argName) + internal static void IfNullAndNullsAreIllegalThenThrow(object? value, ExceptionArgument argName) { // Note that default(T) is not equal to null for value types except when T is Nullable. if (!(default(T)! == null) && value == null) // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/34757 From 4b82e7e79c9468fc4d0d58ee617be0b7729fa613 Mon Sep 17 00:00:00 2001 From: Eric StJohn Date: Thu, 25 Apr 2019 15:09:50 -0700 Subject: [PATCH 058/607] Pick up last build runtime.native.System.IO.Ports during testing (#37195) --- eng/Version.Details.xml | 4 ++++ eng/Versions.props | 1 + .../netcoreapp1.0/workaroundDowngrade.targets | 6 ------ .../System.IO.Ports/workaroundDowngrade.targets | 6 ++++++ pkg/test/packageTest.targets | 2 +- pkg/test/testPackages.proj | 2 +- 6 files changed, 13 insertions(+), 8 deletions(-) delete mode 100644 pkg/test/packageSettings/System.IO.Ports/netcoreapp1.0/workaroundDowngrade.targets create mode 100644 pkg/test/packageSettings/System.IO.Ports/workaroundDowngrade.targets diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 3a43acabe828..3fe0b3b55f06 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -30,6 +30,10 @@ https://github.com/dotnet/corefx 8c7afe67ee2e9bd21a4412265b66f875cfafaede + + https://github.com/dotnet/corefx + 18cd561127e35841db2775dc7a85adad70363e18 + https://github.com/dotnet/arcade e02c88fca482f1141a9bb310c97be20b0ebd0465 diff --git a/eng/Versions.props b/eng/Versions.props index 920fa795e6f2..1ee11e1156d7 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -45,6 +45,7 @@ 3.0.0-preview6-27624-71 3.0.0-preview6.19225.1 + 4.6.0-preview6.19225.1 2.1.0-prerelease.19224.1 diff --git a/pkg/test/packageSettings/System.IO.Ports/netcoreapp1.0/workaroundDowngrade.targets b/pkg/test/packageSettings/System.IO.Ports/netcoreapp1.0/workaroundDowngrade.targets deleted file mode 100644 index 2a4b06900c28..000000000000 --- a/pkg/test/packageSettings/System.IO.Ports/netcoreapp1.0/workaroundDowngrade.targets +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/pkg/test/packageSettings/System.IO.Ports/workaroundDowngrade.targets b/pkg/test/packageSettings/System.IO.Ports/workaroundDowngrade.targets new file mode 100644 index 000000000000..37e8334cafc9 --- /dev/null +++ b/pkg/test/packageSettings/System.IO.Ports/workaroundDowngrade.targets @@ -0,0 +1,6 @@ + + + + + + diff --git a/pkg/test/packageTest.targets b/pkg/test/packageTest.targets index d0f78b37cc08..6657dfc63b58 100644 --- a/pkg/test/packageTest.targets +++ b/pkg/test/packageTest.targets @@ -15,7 +15,7 @@ - + diff --git a/pkg/test/testPackages.proj b/pkg/test/testPackages.proj index 466c9005e835..4d9cb550066a 100644 --- a/pkg/test/testPackages.proj +++ b/pkg/test/testPackages.proj @@ -3,7 +3,7 @@ - + From da36ea268c778200dc676d294667eb76146e1a01 Mon Sep 17 00:00:00 2001 From: Eric StJohn Date: Thu, 25 Apr 2019 22:05:19 -0700 Subject: [PATCH 059/607] Add System.Resources.Extensions (#36906) * Add System.Resources.Binary.Reader|Writer * Fix ResourceWriter tests * Test fixes and PR feedback * More test fixes * Add packages for System.Resources.Binary.* * Suppress duplicate types in System.Resources.Binary.* * Test refactoring and adding RuntimeResourceSet It turns out me must have our own ResourceSet since the CoreLib resource set doesn't expose a constructor that takes an IResourceReader. I've shared the code since it does a bit of non-trivial caching. * Don't use auto-property initializers for platfrom sensitive test data For some reason I thought these lazy-initialized the properties but they don't. As a result we were hitting the platform sensitive code even when we never called the getter. Switch to an expression instead. * Only use Drawing converters on Windows * Fix test failures * Don't leak System.Private.CoreLib into resources * Make sure RuntimeResourceSet doesn't call ResourceReader(IResourceReader) * WIP * Rename types in System.Resources.Extensions Leave RuntimeResourceSet internal as it doesn't need to be public. * Update packages * Respond to API review feedback Remove abstraction for ResourceReader/Writer: just reuse the source. Remove non-essential members. * Clean up * Further cleanup * Further cleanup * Review feedback * Ensure we have stable type names in Resources.Extensions We don't want to use the runtime type identity when doing type checks or writing types as this may change. Instead, check-in hard-coded strings that match the type identity. Add a test case to ensure the resources we generate match what we test the reader against in the resource manager case (also to track any change to the binary format). --- .../packageIndex.json | 12 +- pkg/descriptions.json | 8 + .../System.Private.CoreLib.Shared.projitems | 1 + .../System/IO/PinnedBufferMemoryStream.cs | 2 + .../System/Resources/FastResourceComparer.cs | 1 - .../System/Resources/ResourceReader.Core.cs | 162 ++++++ .../System/Resources/ResourceReader.cs | 186 +------ .../System/Resources/RuntimeResourceSet.cs | 32 +- .../src/System/Resources/ResourceWriter.cs | 117 ++--- .../src/System/PlatformDetection.Windows.cs | 2 +- .../Directory.Build.props | 7 + .../System.Resources.Extensions.sln | 47 ++ .../pkg/System.Resources.Extensions.pkgproj | 10 + .../ref/Configurations.props | 7 + .../ref/System.Resources.Extensions.cs | 37 ++ .../ref/System.Resources.Extensions.csproj | 8 + .../src/BinaryReaderExtensions.cs | 33 ++ .../src/Configurations.props | 7 + .../src/Resources/Strings.resx | 147 ++++++ .../src/System.Resources.Extensions.csproj | 22 + .../Extensions/DeserializingResourceReader.cs | 207 ++++++++ .../Extensions/PreserializedResourceWriter.cs | 200 ++++++++ .../Extensions/SerializationFormat.cs | 16 + .../tests/BinaryResourceWriterUnitTest.cs | 464 ++++++++++++++++++ .../tests/Configurations.props | 7 + .../tests/MyResourceType.cs | 89 ++++ .../System.Resources.Extensions.Tests.csproj | 37 ++ .../tests/TestData.cs | 192 ++++++++ .../tests/TestData.resources | Bin 0 -> 2169 bytes .../src/System.Resources.Writer.csproj | 5 +- .../System/Resources/ResourceWriter.core.cs | 62 +++ .../Versioning/MultitargetingHelpers.cs | 63 --- .../src/System/Drawing/FontConverter.cs | 4 + 33 files changed, 1880 insertions(+), 314 deletions(-) create mode 100644 src/Common/src/CoreLib/System/Resources/ResourceReader.Core.cs rename src/{System.Resources.Writer => Common}/src/System/Resources/ResourceWriter.cs (89%) create mode 100644 src/System.Resources.Extensions/Directory.Build.props create mode 100644 src/System.Resources.Extensions/System.Resources.Extensions.sln create mode 100644 src/System.Resources.Extensions/pkg/System.Resources.Extensions.pkgproj create mode 100644 src/System.Resources.Extensions/ref/Configurations.props create mode 100644 src/System.Resources.Extensions/ref/System.Resources.Extensions.cs create mode 100644 src/System.Resources.Extensions/ref/System.Resources.Extensions.csproj create mode 100644 src/System.Resources.Extensions/src/BinaryReaderExtensions.cs create mode 100644 src/System.Resources.Extensions/src/Configurations.props create mode 100644 src/System.Resources.Extensions/src/Resources/Strings.resx create mode 100644 src/System.Resources.Extensions/src/System.Resources.Extensions.csproj create mode 100644 src/System.Resources.Extensions/src/System/Resources/Extensions/DeserializingResourceReader.cs create mode 100644 src/System.Resources.Extensions/src/System/Resources/Extensions/PreserializedResourceWriter.cs create mode 100644 src/System.Resources.Extensions/src/System/Resources/Extensions/SerializationFormat.cs create mode 100644 src/System.Resources.Extensions/tests/BinaryResourceWriterUnitTest.cs create mode 100644 src/System.Resources.Extensions/tests/Configurations.props create mode 100644 src/System.Resources.Extensions/tests/MyResourceType.cs create mode 100644 src/System.Resources.Extensions/tests/System.Resources.Extensions.Tests.csproj create mode 100644 src/System.Resources.Extensions/tests/TestData.cs create mode 100644 src/System.Resources.Extensions/tests/TestData.resources create mode 100644 src/System.Resources.Writer/src/System/Resources/ResourceWriter.core.cs delete mode 100644 src/System.Resources.Writer/src/System/Runtime/Versioning/MultitargetingHelpers.cs diff --git a/pkg/Microsoft.Private.PackageBaseline/packageIndex.json b/pkg/Microsoft.Private.PackageBaseline/packageIndex.json index e1ab4eb8d7e0..86b2a3bb1579 100644 --- a/pkg/Microsoft.Private.PackageBaseline/packageIndex.json +++ b/pkg/Microsoft.Private.PackageBaseline/packageIndex.json @@ -1232,8 +1232,8 @@ ], "BaselineVersion": "4.5.0", "InboxOn": { - "net45": "4.0.0.0", "netcoreapp3.0": "4.0.0.0", + "net45": "4.0.0.0", "uap10.0.16300": "4.0.0.0" }, "AssemblyVersionInPackageVersion": { @@ -3563,6 +3563,12 @@ "4.1.4.0": "4.6.0" } }, + "System.Resources.Extensions": { + "InboxOn": {}, + "AssemblyVersionInPackageVersion": { + "4.0.0.0": "4.6.0" + } + }, "System.Resources.Reader": { "StableVersions": [ "4.0.0", @@ -3723,8 +3729,8 @@ ], "BaselineVersion": "4.5.1", "InboxOn": { - "uap10.0.16300": "4.0.5.0", - "netcoreapp3.0": "4.0.5.0" + "netcoreapp3.0": "4.0.5.0", + "uap10.0.16300": "4.0.5.0" }, "AssemblyVersionInPackageVersion": { "4.0.3.0": "4.4.0", diff --git a/pkg/descriptions.json b/pkg/descriptions.json index eb6700439880..f20d51d24cc4 100644 --- a/pkg/descriptions.json +++ b/pkg/descriptions.json @@ -1428,6 +1428,14 @@ "System.Resources.SatelliteContractVersionAttribute", "System.Resources.MissingManifestResourceException" ] + }, + { + "Name": "System.Resources.Extensions", + "Description": "Provides classes which read and write resources in a format that supports non-primitive objects.", + "CommonTypes": [ + "System.Resources.Extensions.DeserializingResourceReader", + "System.Resources.Extensions.PreserializedResourceWriter" + ] }, { "Name": "System.Resources.Reader", diff --git a/src/Common/src/CoreLib/System.Private.CoreLib.Shared.projitems b/src/Common/src/CoreLib/System.Private.CoreLib.Shared.projitems index 7e1cb0d193fe..45628625d4ad 100644 --- a/src/Common/src/CoreLib/System.Private.CoreLib.Shared.projitems +++ b/src/Common/src/CoreLib/System.Private.CoreLib.Shared.projitems @@ -528,6 +528,7 @@ + diff --git a/src/Common/src/CoreLib/System/IO/PinnedBufferMemoryStream.cs b/src/Common/src/CoreLib/System/IO/PinnedBufferMemoryStream.cs index 7c636b952728..2589eee0e061 100644 --- a/src/Common/src/CoreLib/System/IO/PinnedBufferMemoryStream.cs +++ b/src/Common/src/CoreLib/System/IO/PinnedBufferMemoryStream.cs @@ -39,9 +39,11 @@ internal PinnedBufferMemoryStream(byte[] array) Initialize(ptr, len, len, FileAccess.Read); } +#if !netstandard public override int Read(Span buffer) => ReadCore(buffer); public override void Write(ReadOnlySpan buffer) => WriteCore(buffer); +#endif ~PinnedBufferMemoryStream() { diff --git a/src/Common/src/CoreLib/System/Resources/FastResourceComparer.cs b/src/Common/src/CoreLib/System/Resources/FastResourceComparer.cs index 51058c5ac6f9..5f83b772a1a7 100644 --- a/src/Common/src/CoreLib/System/Resources/FastResourceComparer.cs +++ b/src/Common/src/CoreLib/System/Resources/FastResourceComparer.cs @@ -15,7 +15,6 @@ ** ===========================================================*/ -using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; diff --git a/src/Common/src/CoreLib/System/Resources/ResourceReader.Core.cs b/src/Common/src/CoreLib/System/Resources/ResourceReader.Core.cs new file mode 100644 index 000000000000..9d25e45082c7 --- /dev/null +++ b/src/Common/src/CoreLib/System/Resources/ResourceReader.Core.cs @@ -0,0 +1,162 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +namespace System.Resources +{ + partial class ResourceReader + { + private readonly bool _permitDeserialization; // can deserialize BinaryFormatted resources + private object? _binaryFormatter; // binary formatter instance to use for deserializing + + // statics used to dynamically call into BinaryFormatter + // When successfully located s_binaryFormatterType will point to the BinaryFormatter type + // and s_deserializeMethod will point to an unbound delegate to the deserialize method. + private static Type s_binaryFormatterType; + private static Func s_deserializeMethod; + + // This is the constructor the RuntimeResourceSet calls, + // passing in the stream to read from and the RuntimeResourceSet's + // internal hash table (hash table of names with file offsets + // and values, coupled to this ResourceReader). + internal ResourceReader(Stream stream, Dictionary resCache, bool permitDeserialization) + { + Debug.Assert(stream != null, "Need a stream!"); + Debug.Assert(stream.CanRead, "Stream should be readable!"); + Debug.Assert(resCache != null, "Need a Dictionary!"); + + _resCache = resCache; + _store = new BinaryReader(stream, Encoding.UTF8); + + _ums = stream as UnmanagedMemoryStream; + + _permitDeserialization = permitDeserialization; + + ReadResources(); + } + + private object DeserializeObject(int typeIndex) + { + if (!_permitDeserialization) + { + throw new NotSupportedException(SR.NotSupported_ResourceObjectSerialization); + } + + if (_binaryFormatter == null) + { + InitializeBinaryFormatter(); + } + + Type type = FindType(typeIndex); + + object graph = s_deserializeMethod(_binaryFormatter, _store.BaseStream); + + // guard against corrupted resources + if (graph.GetType() != type) + throw new BadImageFormatException(SR.Format(SR.BadImageFormat_ResType_SerBlobMismatch, type.FullName, graph.GetType().FullName)); + + return graph; + } + + private void InitializeBinaryFormatter() + { + LazyInitializer.EnsureInitialized(ref s_binaryFormatterType, () => + Type.GetType("System.Runtime.Serialization.Formatters.Binary.BinaryFormatter, System.Runtime.Serialization.Formatters, Version=0.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", + throwOnError: true)); + + LazyInitializer.EnsureInitialized(ref s_deserializeMethod, () => + { + MethodInfo binaryFormatterDeserialize = s_binaryFormatterType.GetMethod("Deserialize", new Type[] { typeof(Stream) }); + + // create an unbound delegate that can accept a BinaryFormatter instance as object + return (Func)typeof(ResourceReader) + .GetMethod(nameof(CreateUntypedDelegate), BindingFlags.NonPublic | BindingFlags.Static) + .MakeGenericMethod(s_binaryFormatterType) + .Invoke(null, new object[] { binaryFormatterDeserialize }); + }); + + _binaryFormatter = Activator.CreateInstance(s_binaryFormatterType); + } + + // generic method that we specialize at runtime once we've loaded the BinaryFormatter type + // permits creating an unbound delegate so that we can avoid reflection after the initial + // lightup code completes. + private static Func CreateUntypedDelegate(MethodInfo method) + { + Func typedDelegate = (Func)Delegate.CreateDelegate(typeof(Func), null, method); + + return (obj, stream) => typedDelegate((TInstance)obj, stream); + } + + private bool ValidateReaderType(string readerType) + { + return ResourceManager.IsDefaultType(readerType, ResourceManager.ResReaderTypeName); + } + + public void GetResourceData(string resourceName, out string resourceType, out byte[] resourceData) + { + if (resourceName == null) + throw new ArgumentNullException(nameof(resourceName)); + if (_resCache == null) + throw new InvalidOperationException(SR.ResourceReaderIsClosed); + + // Get the type information from the data section. Also, + // sort all of the data section's indexes to compute length of + // the serialized data for this type (making sure to subtract + // off the length of the type code). + int[] sortedDataPositions = new int[_numResources]; + int dataPos = FindPosForResource(resourceName); + if (dataPos == -1) + { + throw new ArgumentException(SR.Format(SR.Arg_ResourceNameNotExist, resourceName)); + } + + lock (this) + { + // Read all the positions of data within the data section. + for (int i = 0; i < _numResources; i++) + { + _store.BaseStream.Position = _nameSectionOffset + GetNamePosition(i); + // Skip over name of resource + int numBytesToSkip = _store.Read7BitEncodedInt(); + if (numBytesToSkip < 0) + { + throw new FormatException(SR.Format(SR.BadImageFormat_ResourcesNameInvalidOffset, numBytesToSkip)); + } + _store.BaseStream.Position += numBytesToSkip; + + int dPos = _store.ReadInt32(); + if (dPos < 0 || dPos >= _store.BaseStream.Length - _dataSectionOffset) + { + throw new FormatException(SR.Format(SR.BadImageFormat_ResourcesDataInvalidOffset, dPos)); + } + sortedDataPositions[i] = dPos; + } + Array.Sort(sortedDataPositions); + + int index = Array.BinarySearch(sortedDataPositions, dataPos); + Debug.Assert(index >= 0 && index < _numResources, "Couldn't find data position within sorted data positions array!"); + long nextData = (index < _numResources - 1) ? sortedDataPositions[index + 1] + _dataSectionOffset : _store.BaseStream.Length; + int len = (int)(nextData - (dataPos + _dataSectionOffset)); + Debug.Assert(len >= 0 && len <= (int)_store.BaseStream.Length - dataPos + _dataSectionOffset, "Length was negative or outside the bounds of the file!"); + + // Read type code then byte[] + _store.BaseStream.Position = _dataSectionOffset + dataPos; + ResourceTypeCode typeCode = (ResourceTypeCode)_store.Read7BitEncodedInt(); + if (typeCode < 0 || typeCode >= ResourceTypeCode.StartOfUserTypes + _typeTable.Length) + { + throw new BadImageFormatException(SR.BadImageFormat_InvalidType); + } + resourceType = TypeNameFromTypeCode(typeCode); + + // The length must be adjusted to subtract off the number + // of bytes in the 7 bit encoded type code. + len -= (int)(_store.BaseStream.Position - (_dataSectionOffset + dataPos)); + byte[] bytes = _store.ReadBytes(len); + if (bytes.Length != len) + throw new FormatException(SR.BadImageFormat_ResourceNameCorrupted); + resourceData = bytes; + } + } + } +} diff --git a/src/Common/src/CoreLib/System/Resources/ResourceReader.cs b/src/Common/src/CoreLib/System/Resources/ResourceReader.cs index d8545507d063..510082d36d05 100644 --- a/src/Common/src/CoreLib/System/Resources/ResourceReader.cs +++ b/src/Common/src/CoreLib/System/Resources/ResourceReader.cs @@ -17,21 +17,20 @@ ===========================================================*/ namespace System.Resources +#if RESOURCES_EXTENSIONS + .Extensions +#endif { using System; using System.IO; using System.Text; using System.Collections; using System.Collections.Generic; - using System.Reflection; - using System.Security; - using System.Globalization; - using System.Configuration.Assemblies; - using System.Runtime.Versioning; using System.Diagnostics; - using System.Diagnostics.Contracts; - using System.Threading; +#if RESOURCES_EXTENSIONS + using ResourceReader = DeserializingResourceReader; +#endif // Provides the default implementation of IResourceReader, reading // .resources file from the system default binary format. This class // can be treated as an enumerator once. @@ -72,7 +71,13 @@ internal static bool CanCache(ResourceTypeCode value) } } - public sealed class ResourceReader : IResourceReader + public sealed partial class +#if RESOURCES_EXTENSIONS + DeserializingResourceReader +#else + ResourceReader +#endif + : IResourceReader { // A reasonable default buffer size for reading from files, especially // when we will likely be seeking frequently. Could be smaller, but does @@ -100,15 +105,6 @@ public sealed class ResourceReader : IResourceReader private int[] _typeNamePositions = null!; // To delay initialize type table private int _numResources; // Num of resources files, in case arrays aren't allocated. - private readonly bool _permitDeserialization; // can deserialize BinaryFormatted resources - private object? _binaryFormatter; // binary formatter instance to use for deserializing - - // statics used to dynamically call into BinaryFormatter - // When successfully located s_binaryFormatterType will point to the BinaryFormatter type - // and s_deserializeMethod will point to an unbound delegate to the deserialize method. - private static Type s_binaryFormatterType; - private static Func s_deserializeMethod; - // We'll include a separate code path that uses UnmanagedMemoryStream to // avoid allocating String objects and the like. private UnmanagedMemoryStream? _ums; @@ -117,7 +113,12 @@ public sealed class ResourceReader : IResourceReader private int _version; - public ResourceReader(string fileName) + public +#if RESOURCES_EXTENSIONS + DeserializingResourceReader(string fileName) +#else + ResourceReader(string fileName) +#endif { _resCache = new Dictionary(FastResourceComparer.Default); _store = new BinaryReader(new FileStream(fileName, FileMode.Open, FileAccess.Read, FileShare.Read, DefaultFileStreamBufferSize, FileOptions.RandomAccess), Encoding.UTF8); @@ -133,7 +134,12 @@ public ResourceReader(string fileName) } } - public ResourceReader(Stream stream) + public +#if RESOURCES_EXTENSIONS + DeserializingResourceReader(Stream stream) +#else + ResourceReader(Stream stream) +#endif { if (stream == null) throw new ArgumentNullException(nameof(stream)); @@ -148,27 +154,6 @@ public ResourceReader(Stream stream) ReadResources(); } - // This is the constructor the RuntimeResourceSet calls, - // passing in the stream to read from and the RuntimeResourceSet's - // internal hash table (hash table of names with file offsets - // and values, coupled to this ResourceReader). - internal ResourceReader(Stream stream, Dictionary resCache, bool permitDeserialization) - { - Debug.Assert(stream != null, "Need a stream!"); - Debug.Assert(stream.CanRead, "Stream should be readable!"); - Debug.Assert(resCache != null, "Need a Dictionary!"); - - _resCache = resCache; - _store = new BinaryReader(stream, Encoding.UTF8); - - _ums = stream as UnmanagedMemoryStream; - - _permitDeserialization = permitDeserialization; - - ReadResources(); - } - - public void Close() { Dispose(true); @@ -770,59 +755,6 @@ private unsafe string AllocateStringForNameIndex(int index, out int dataOffset) return DeserializeObject(typeIndex); } - private object DeserializeObject(int typeIndex) - { - if (!_permitDeserialization) - { - throw new NotSupportedException(SR.NotSupported_ResourceObjectSerialization); - } - - if (_binaryFormatter == null) - { - InitializeBinaryFormatter(); - } - - Type type = FindType(typeIndex); - - object graph = s_deserializeMethod(_binaryFormatter, _store.BaseStream); - - // guard against corrupted resources - if (graph.GetType() != type) - throw new BadImageFormatException(SR.Format(SR.BadImageFormat_ResType_SerBlobMismatch, type.FullName, graph.GetType().FullName)); - - return graph; - } - - private void InitializeBinaryFormatter() - { - LazyInitializer.EnsureInitialized(ref s_binaryFormatterType, () => - Type.GetType("System.Runtime.Serialization.Formatters.Binary.BinaryFormatter, System.Runtime.Serialization.Formatters, Version=0.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", - throwOnError: true)); - - LazyInitializer.EnsureInitialized(ref s_deserializeMethod, () => - { - MethodInfo binaryFormatterDeserialize = s_binaryFormatterType.GetMethod("Deserialize", new Type[] { typeof(Stream) }); - - // create an unbound delegate that can accept a BinaryFormatter instance as object - return (Func)typeof(ResourceReader) - .GetMethod(nameof(CreateUntypedDelegate), BindingFlags.NonPublic | BindingFlags.Static) - .MakeGenericMethod(s_binaryFormatterType) - .Invoke(null, new object[] { binaryFormatterDeserialize }); - }); - - _binaryFormatter = Activator.CreateInstance(s_binaryFormatterType); - } - - // generic method that we specialize at runtime once we've loaded the BinaryFormatter type - // permits creating an unbound delegate so that we can avoid reflection after the initial - // lightup code completes. - private static Func CreateUntypedDelegate(MethodInfo method) - { - Func typedDelegate = (Func)Delegate.CreateDelegate(typeof(Func), null, method); - - return (obj, stream) => typedDelegate((TInstance)obj, stream); - } - // Reads in the header information for a .resources file. Verifies some // of the assumptions about this resource set, and builds the class table // for the default resource file format. @@ -875,7 +807,7 @@ private void _ReadResources() // Note ResourceWriter & InternalResGen use different Strings. string readerType = _store.ReadString(); - if (!ResourceManager.IsDefaultType(readerType, ResourceManager.ResReaderTypeName)) + if (!ValidateReaderType(readerType)) throw new NotSupportedException(SR.Format(SR.NotSupported_WrongResourceReader_Type, readerType)); // Skip over type name for a suitable ResourceSet @@ -1044,72 +976,6 @@ private Type FindType(int typeIndex) return _typeTable[typeIndex]!; // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/34644 } - public void GetResourceData(string resourceName, out string resourceType, out byte[] resourceData) - { - if (resourceName == null) - throw new ArgumentNullException(nameof(resourceName)); - if (_resCache == null) - throw new InvalidOperationException(SR.ResourceReaderIsClosed); - - // Get the type information from the data section. Also, - // sort all of the data section's indexes to compute length of - // the serialized data for this type (making sure to subtract - // off the length of the type code). - int[] sortedDataPositions = new int[_numResources]; - int dataPos = FindPosForResource(resourceName); - if (dataPos == -1) - { - throw new ArgumentException(SR.Format(SR.Arg_ResourceNameNotExist, resourceName)); - } - - lock (this) - { - // Read all the positions of data within the data section. - for (int i = 0; i < _numResources; i++) - { - _store.BaseStream.Position = _nameSectionOffset + GetNamePosition(i); - // Skip over name of resource - int numBytesToSkip = _store.Read7BitEncodedInt(); - if (numBytesToSkip < 0) - { - throw new FormatException(SR.Format(SR.BadImageFormat_ResourcesNameInvalidOffset, numBytesToSkip)); - } - _store.BaseStream.Position += numBytesToSkip; - - int dPos = _store.ReadInt32(); - if (dPos < 0 || dPos >= _store.BaseStream.Length - _dataSectionOffset) - { - throw new FormatException(SR.Format(SR.BadImageFormat_ResourcesDataInvalidOffset, dPos)); - } - sortedDataPositions[i] = dPos; - } - Array.Sort(sortedDataPositions); - - int index = Array.BinarySearch(sortedDataPositions, dataPos); - Debug.Assert(index >= 0 && index < _numResources, "Couldn't find data position within sorted data positions array!"); - long nextData = (index < _numResources - 1) ? sortedDataPositions[index + 1] + _dataSectionOffset : _store.BaseStream.Length; - int len = (int)(nextData - (dataPos + _dataSectionOffset)); - Debug.Assert(len >= 0 && len <= (int)_store.BaseStream.Length - dataPos + _dataSectionOffset, "Length was negative or outside the bounds of the file!"); - - // Read type code then byte[] - _store.BaseStream.Position = _dataSectionOffset + dataPos; - ResourceTypeCode typeCode = (ResourceTypeCode)_store.Read7BitEncodedInt(); - if (typeCode < 0 || typeCode >= ResourceTypeCode.StartOfUserTypes + _typeTable.Length) - { - throw new BadImageFormatException(SR.BadImageFormat_InvalidType); - } - resourceType = TypeNameFromTypeCode(typeCode); - - // The length must be adjusted to subtract off the number - // of bytes in the 7 bit encoded type code. - len -= (int)(_store.BaseStream.Position - (_dataSectionOffset + dataPos)); - byte[] bytes = _store.ReadBytes(len); - if (bytes.Length != len) - throw new FormatException(SR.BadImageFormat_ResourceNameCorrupted); - resourceData = bytes; - } - } - private string TypeNameFromTypeCode(ResourceTypeCode typeCode) { Debug.Assert(typeCode >= 0, "can't be negative"); diff --git a/src/Common/src/CoreLib/System/Resources/RuntimeResourceSet.cs b/src/Common/src/CoreLib/System/Resources/RuntimeResourceSet.cs index c2d27d2e60db..dbd74b2493cc 100644 --- a/src/Common/src/CoreLib/System/Resources/RuntimeResourceSet.cs +++ b/src/Common/src/CoreLib/System/Resources/RuntimeResourceSet.cs @@ -14,17 +14,18 @@ ** ===========================================================*/ -using System; -using System.IO; using System.Collections; using System.Collections.Generic; -using System.Globalization; -using System.Reflection; -using System.Runtime.Versioning; using System.Diagnostics; namespace System.Resources +#if RESOURCES_EXTENSIONS + .Extensions +#endif { +#if RESOURCES_EXTENSIONS + using ResourceReader = DeserializingResourceReader; +#endif // A RuntimeResourceSet stores all the resources defined in one // particular CultureInfo, with some loading optimizations. // @@ -192,6 +193,7 @@ sealed class RuntimeResourceSet : ResourceSet, IEnumerable // the resources once, adding them into the table. private bool _haveReadFromReader; +#if !RESOURCES_EXTENSIONS internal RuntimeResourceSet(string fileName) : base(false) { _resCache = new Dictionary(FastResourceComparer.Default); @@ -206,6 +208,26 @@ internal RuntimeResourceSet(Stream stream, bool permitDeserialization = false) : _defaultReader = new ResourceReader(stream, _resCache, permitDeserialization); Reader = _defaultReader; } +#else + private IResourceReader Reader => _defaultReader!; + + internal RuntimeResourceSet(IResourceReader reader) : + // explicitly do not call IResourceReader constructor since it caches all resources + // the purpose of RuntimeResourceSet is to lazily load and cache. + base() + { + if (reader == null) + throw new ArgumentNullException(nameof(reader)); + + _defaultReader = reader as DeserializingResourceReader ?? throw new ArgumentException(SR.Format(SR.NotSupported_WrongResourceReader_Type, reader.GetType()), nameof(reader)); + _resCache = new Dictionary(FastResourceComparer.Default); + + // in the CoreLib version RuntimeResourceSet creates ResourceReader and passes this in, + // in the custom case ManifestBasedResourceReader creates the ResourceReader and passes it in + // so we must initialize the cache here. + _defaultReader._resCache = _resCache; + } +#endif protected override void Dispose(bool disposing) { diff --git a/src/System.Resources.Writer/src/System/Resources/ResourceWriter.cs b/src/Common/src/System/Resources/ResourceWriter.cs similarity index 89% rename from src/System.Resources.Writer/src/System/Resources/ResourceWriter.cs rename to src/Common/src/System/Resources/ResourceWriter.cs index 9be007a99c24..96c27e32914c 100644 --- a/src/System.Resources.Writer/src/System/Resources/ResourceWriter.cs +++ b/src/Common/src/System/Resources/ResourceWriter.cs @@ -14,17 +14,15 @@ ** ===========================================================*/ -using System; using System.IO; using System.Text; -using System.Collections; using System.Collections.Generic; -using System.Globalization; -using System.Runtime.Versioning; -using System.Runtime.Serialization; using System.Diagnostics; namespace System.Resources +#if RESOURCES_EXTENSIONS + .Extensions +#endif { // Generates a binary .resources file in the system default format // from name and value pairs. Create one with a unique file name, @@ -37,12 +35,18 @@ namespace System.Resources // See the RuntimeResourceSet overview for details on the system // default file format. // - public sealed class ResourceWriter : IResourceWriter + public sealed partial class +#if RESOURCES_EXTENSIONS + PreserializedResourceWriter +#else + ResourceWriter +#endif + : IResourceWriter { // An initial size for our internal sorted list, to avoid extra resizes. private const int AverageNameSize = 20 * 2; // chars in little endian Unicode private const int AverageValueSize = 40; - private const string ResourceReaderFullyQualifiedName = "System.Resources.ResourceReader, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"; + internal const string ResourceReaderFullyQualifiedName = "System.Resources.ResourceReader, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"; private const string ResSetTypeName = "System.Resources.RuntimeResourceSet"; private const int ResSetVersion = 2; @@ -51,10 +55,12 @@ public sealed class ResourceWriter : IResourceWriter private Dictionary _caseInsensitiveDups; private Dictionary _preserializedData; - // Set this delegate to allow multi-targeting for .resources files. - public Func TypeNameConverter { get; set; } - - public ResourceWriter(string fileName) + public +#if RESOURCES_EXTENSIONS + PreserializedResourceWriter(string fileName) +#else + ResourceWriter(string fileName) +#endif { if (fileName == null) throw new ArgumentNullException(nameof(fileName)); @@ -64,7 +70,12 @@ public ResourceWriter(string fileName) _caseInsensitiveDups = new Dictionary(StringComparer.OrdinalIgnoreCase); } - public ResourceWriter(Stream stream) + public +#if RESOURCES_EXTENSIONS + PreserializedResourceWriter(Stream stream) +#else + ResourceWriter(Stream stream) +#endif { if (stream == null) throw new ArgumentNullException(nameof(stream)); @@ -116,26 +127,11 @@ public void AddResource(string name, object value) } } - // Adds a resource of type Stream to the list of resources to be - // written to a file. They aren't written until Generate() is called. - // Doesn't close the Stream when done. - // - public void AddResource(string name, Stream value) - { - if (name == null) - throw new ArgumentNullException(nameof(name)); - - if (_resourceList == null) - throw new InvalidOperationException(SR.InvalidOperation_ResourceWriterSaved); - - AddResourceInternal(name, value, false); - } - // Adds a resource of type Stream to the list of resources to be // written to a file. They aren't written until Generate() is called. // closeAfterWrite parameter indicates whether to close the stream when done. // - public void AddResource(string name, Stream value, bool closeAfterWrite) + public void AddResource(string name, Stream value, bool closeAfterWrite = false) { if (name == null) throw new ArgumentNullException(nameof(name)); @@ -176,30 +172,23 @@ public void AddResource(string name, byte[] value) if (_resourceList == null) throw new InvalidOperationException(SR.InvalidOperation_ResourceWriterSaved); - + // Check for duplicate resources whose names vary only by case. _caseInsensitiveDups.Add(name, null); _resourceList.Add(name, value); } - - public void AddResourceData(string name, string typeName, byte[] serializedData) - { - if (name == null) - throw new ArgumentNullException(nameof(name)); - if (typeName == null) - throw new ArgumentNullException(nameof(typeName)); - if (serializedData == null) - throw new ArgumentNullException(nameof(serializedData)); + private void AddResourceData(string name, string typeName, object data) + { if (_resourceList == null) throw new InvalidOperationException(SR.InvalidOperation_ResourceWriterSaved); - + // Check for duplicate resources whose names vary only by case. _caseInsensitiveDups.Add(name, null); if (_preserializedData == null) _preserializedData = new Dictionary(FastResourceComparer.Default); - - _preserializedData.Add(name, new PrecannedResource(typeName, serializedData)); + + _preserializedData.Add(name, new PrecannedResource(typeName, data)); } // For cases where users can't create an instance of the deserialized @@ -208,15 +197,15 @@ public void AddResourceData(string name, string typeName, byte[] serializedData) private class PrecannedResource { internal readonly string TypeName; - internal readonly byte[] Data; + internal readonly object Data; - internal PrecannedResource(string typeName, byte[] data) + internal PrecannedResource(string typeName, object data) { TypeName = typeName; Data = data; } } - + private class StreamWrapper { internal readonly Stream Stream; @@ -282,13 +271,13 @@ public void Generate() // Write out class name of IResourceReader capable of handling // this file. - resMgrHeaderPart.Write(ResourceReaderFullyQualifiedName); + resMgrHeaderPart.Write(ResourceReaderTypeName); // Write out class name of the ResourceSet class best suited to // handling this file. // This needs to be the same even with multi-targeting. It's the // full name -- not the assembly qualified name. - resMgrHeaderPart.Write(ResSetTypeName); + resMgrHeaderPart.Write(ResourceSetTypeName); resMgrHeaderPart.Flush(); // Write number of bytes to skip over to get past ResMgr header @@ -350,7 +339,7 @@ public void Generate() var userProvidedResource = value as PrecannedResource; if (userProvidedResource != null) { - data.Write(userProvidedResource.Data); + WriteData(data, userProvidedResource.Data); } else { @@ -510,7 +499,8 @@ private ResourceTypeCode FindTypeCode(object value, List types) } else { - typeName = MultitargetingHelpers.GetAssemblyQualifiedName(type, TypeNameConverter); + // not a preserialized resource + throw new PlatformNotSupportedException(SR.NotSupported_BinarySerializedResources); } int typeIndex = types.IndexOf(typeName); @@ -647,36 +637,5 @@ private void WriteValue(ResourceTypeCode typeCode, object value, BinaryWriter wr } } } - - internal enum ResourceTypeCode { - // Primitives - Null = 0, - String = 1, - Boolean = 2, - Char = 3, - Byte = 4, - SByte = 5, - Int16 = 6, - UInt16 = 7, - Int32 = 8, - UInt32 = 9, - Int64 = 0xa, - UInt64 = 0xb, - Single = 0xc, - Double = 0xd, - Decimal = 0xe, - DateTime = 0xf, - TimeSpan = 0x10, - - // A meta-value - change this if you add new primitives - LastPrimitive = TimeSpan, - - // Types with a special representation, like byte[] and Stream - ByteArray = 0x20, - Stream = 0x21, - - // User types - serialized using the binary formatter. - StartOfUserTypes = 0x40 - } } diff --git a/src/CoreFx.Private.TestUtilities/src/System/PlatformDetection.Windows.cs b/src/CoreFx.Private.TestUtilities/src/System/PlatformDetection.Windows.cs index 10f0cf741728..d7f9ce8e1938 100644 --- a/src/CoreFx.Private.TestUtilities/src/System/PlatformDetection.Windows.cs +++ b/src/CoreFx.Private.TestUtilities/src/System/PlatformDetection.Windows.cs @@ -16,7 +16,7 @@ public static partial class PlatformDetection { public static Version OSXVersion => throw new PlatformNotSupportedException(); public static Version OpenSslVersion => throw new PlatformNotSupportedException(); - public static bool IsDrawingSupported => IsNotWindowsNanoServer && IsNotWindowsServerCore; + public static bool IsDrawingSupported => IsNotWindowsNanoServer && IsNotWindowsServerCore && !IsUap; public static bool IsSoundPlaySupported => IsNotWindowsNanoServer; public static bool IsSuperUser => throw new PlatformNotSupportedException(); public static bool IsCentos6 => false; diff --git a/src/System.Resources.Extensions/Directory.Build.props b/src/System.Resources.Extensions/Directory.Build.props new file mode 100644 index 000000000000..c8c6511677de --- /dev/null +++ b/src/System.Resources.Extensions/Directory.Build.props @@ -0,0 +1,7 @@ + + + + 4.0.0.0 + Open + + \ No newline at end of file diff --git a/src/System.Resources.Extensions/System.Resources.Extensions.sln b/src/System.Resources.Extensions/System.Resources.Extensions.sln new file mode 100644 index 000000000000..f4e15b4e90f8 --- /dev/null +++ b/src/System.Resources.Extensions/System.Resources.Extensions.sln @@ -0,0 +1,47 @@ +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.28621.142 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Resources.Extensions", "src\System.Resources.Extensions.csproj", "{694389E4-6F68-4E0A-A8AC-2B85416C0742}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Resources.Extensions", "ref\System.Resources.Extensions.csproj", "{CD6088BF-DDA2-4097-A505-D786E8968A76}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Resources.Extensions.Tests", "tests\System.Resources.Extensions.Tests.csproj", "{9359E7DF-50C8-471B-AF9E-706FE2C4B326}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{E107E9C1-E893-4E87-987E-04EF0DCEAEFD}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{606176E0-E028-42B8-8FBA-3DA36A65E6FC}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{E5D875A9-7379-4393-A808-E52B1AB05D66}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + netstandard-Debug|Any CPU = netstandard-Debug|Any CPU + netstandard-Release|Any CPU = netstandard-Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {694389E4-6F68-4E0A-A8AC-2B85416C0742}.netstandard-Debug|Any CPU.ActiveCfg = netstandard-Debug|Any CPU + {694389E4-6F68-4E0A-A8AC-2B85416C0742}.netstandard-Debug|Any CPU.Build.0 = netstandard-Debug|Any CPU + {694389E4-6F68-4E0A-A8AC-2B85416C0742}.netstandard-Release|Any CPU.ActiveCfg = netstandard-Release|Any CPU + {694389E4-6F68-4E0A-A8AC-2B85416C0742}.netstandard-Release|Any CPU.Build.0 = netstandard-Release|Any CPU + {CD6088BF-DDA2-4097-A505-D786E8968A76}.netstandard-Debug|Any CPU.ActiveCfg = netstandard-Debug|Any CPU + {CD6088BF-DDA2-4097-A505-D786E8968A76}.netstandard-Debug|Any CPU.Build.0 = netstandard-Debug|Any CPU + {CD6088BF-DDA2-4097-A505-D786E8968A76}.netstandard-Release|Any CPU.ActiveCfg = netstandard-Release|Any CPU + {CD6088BF-DDA2-4097-A505-D786E8968A76}.netstandard-Release|Any CPU.Build.0 = netstandard-Release|Any CPU + {9359E7DF-50C8-471B-AF9E-706FE2C4B326}.netstandard-Debug|Any CPU.ActiveCfg = netstandard-Debug|Any CPU + {9359E7DF-50C8-471B-AF9E-706FE2C4B326}.netstandard-Debug|Any CPU.Build.0 = netstandard-Debug|Any CPU + {9359E7DF-50C8-471B-AF9E-706FE2C4B326}.netstandard-Release|Any CPU.ActiveCfg = netstandard-Release|Any CPU + {9359E7DF-50C8-471B-AF9E-706FE2C4B326}.netstandard-Release|Any CPU.Build.0 = netstandard-Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {694389E4-6F68-4E0A-A8AC-2B85416C0742} = {E107E9C1-E893-4E87-987E-04EF0DCEAEFD} + {CD6088BF-DDA2-4097-A505-D786E8968A76} = {606176E0-E028-42B8-8FBA-3DA36A65E6FC} + {9359E7DF-50C8-471B-AF9E-706FE2C4B326} = {E5D875A9-7379-4393-A808-E52B1AB05D66} + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {046617DD-67EB-43A1-BE4E-22CCFC3EC15F} + EndGlobalSection +EndGlobal diff --git a/src/System.Resources.Extensions/pkg/System.Resources.Extensions.pkgproj b/src/System.Resources.Extensions/pkg/System.Resources.Extensions.pkgproj new file mode 100644 index 000000000000..8302838c97b3 --- /dev/null +++ b/src/System.Resources.Extensions/pkg/System.Resources.Extensions.pkgproj @@ -0,0 +1,10 @@ + + + + + uap10.0.16299;net461;netcoreapp2.0;$(AllXamarinFrameworks) + + + + + \ No newline at end of file diff --git a/src/System.Resources.Extensions/ref/Configurations.props b/src/System.Resources.Extensions/ref/Configurations.props new file mode 100644 index 000000000000..ff0d415e4593 --- /dev/null +++ b/src/System.Resources.Extensions/ref/Configurations.props @@ -0,0 +1,7 @@ + + + + netstandard; + + + \ No newline at end of file diff --git a/src/System.Resources.Extensions/ref/System.Resources.Extensions.cs b/src/System.Resources.Extensions/ref/System.Resources.Extensions.cs new file mode 100644 index 000000000000..560be4e89a72 --- /dev/null +++ b/src/System.Resources.Extensions/ref/System.Resources.Extensions.cs @@ -0,0 +1,37 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. +// ------------------------------------------------------------------------------ +// Changes to this file must follow the http://aka.ms/api-review process. +// ------------------------------------------------------------------------------ + +namespace System.Resources.Extensions +{ + public sealed partial class DeserializingResourceReader : System.Resources.IResourceReader + { + public DeserializingResourceReader(System.IO.Stream stream) { } + public DeserializingResourceReader(string fileName) { } + public void Close() { } + public void Dispose() { } + public System.Collections.IDictionaryEnumerator GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + + public sealed partial class PreserializedResourceWriter : System.Resources.IResourceWriter + { + public PreserializedResourceWriter(System.IO.Stream stream) { } + public PreserializedResourceWriter(string fileName) { } + public void AddResource(string name, byte[] value) { } + public void AddResource(string name, System.IO.Stream value, bool closeAfterWrite = false) { } + public void AddResource(string name, object value) { } + public void AddResource(string name, string value) { } + public void Close() { } + public void Dispose() { } + public void Generate() { } + + public void AddBinaryFormattedResource(string name, string typeName, byte[] value) { } + public void AddActivatorResource(string name, string typeName, System.IO.Stream value, bool closeAfterWrite = false) { } + public void AddTypeConverterResource(string name, string typeName, byte[] value) { } + public void AddTypeConverterResource(string name, string typeName, string value) { } + } +} diff --git a/src/System.Resources.Extensions/ref/System.Resources.Extensions.csproj b/src/System.Resources.Extensions/ref/System.Resources.Extensions.csproj new file mode 100644 index 000000000000..c6891bf9b57a --- /dev/null +++ b/src/System.Resources.Extensions/ref/System.Resources.Extensions.csproj @@ -0,0 +1,8 @@ + + + netstandard-Debug;netstandard-Release + + + + + \ No newline at end of file diff --git a/src/System.Resources.Extensions/src/BinaryReaderExtensions.cs b/src/System.Resources.Extensions/src/BinaryReaderExtensions.cs new file mode 100644 index 000000000000..f755324194aa --- /dev/null +++ b/src/System.Resources.Extensions/src/BinaryReaderExtensions.cs @@ -0,0 +1,33 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +namespace System.IO +{ + internal static class BinaryReaderExtensions + { + public static int Read7BitEncodedInt(this BinaryReader reader) + { + // Read out an Int32 7 bits at a time. The high bit + // of the byte when on means to continue reading more bytes. + int count = 0; + int shift = 0; + byte b; + do + { + // Check for a corrupted stream. Read a max of 5 bytes. + // In a future version, add a DataFormatException. + if (shift == 5 * 7) // 5 bytes max per Int32, shift += 7 + { + throw new FormatException(SR.Format_Bad7BitInt32); + } + + // ReadByte handles end of stream cases for us. + b = reader.ReadByte(); + count |= (b & 0x7F) << shift; + shift += 7; + } while ((b & 0x80) != 0); + return count; + } + } +} diff --git a/src/System.Resources.Extensions/src/Configurations.props b/src/System.Resources.Extensions/src/Configurations.props new file mode 100644 index 000000000000..ff0d415e4593 --- /dev/null +++ b/src/System.Resources.Extensions/src/Configurations.props @@ -0,0 +1,7 @@ + + + + netstandard; + + + \ No newline at end of file diff --git a/src/System.Resources.Extensions/src/Resources/Strings.resx b/src/System.Resources.Extensions/src/Resources/Strings.resx new file mode 100644 index 000000000000..4bd142dd2d39 --- /dev/null +++ b/src/System.Resources.Extensions/src/Resources/Strings.resx @@ -0,0 +1,147 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Stream length must be non-negative and less than 2^31 - 1 - origin. + + + Stream was not readable + + + Stream was not writable. + + + The ResourceReader class does not know how to read this version of .resources files. Expected version: {0} This file: {1} + + + Corrupt .resources file. The specified type doesn't exist. + + + Corrupt .resources file. String length must be non-negative. + + + Corrupt .resources file. The specified data length '{0}' is not a valid position in the stream. + + + Corrupt .resources file. A resource name extends past the end of the stream. + + + Corrupt .resources file. The resource name for name index {0} extends past the end of the stream. + + + Corrupt .resources file. Invalid offset '{0}' into data section. + + + Corrupt .resources file. Unable to read resources from this file because of invalid header information. Try regenerating the .resources file. + + + Corrupt .resources file. String for name index '{0}' extends past the end of the file. + + + Corrupt .resources file. Invalid offset '{0}' into name section. + + + Corrupt .resources file. Resource name extends past the end of the file. + + + The type serialized in the .resources file was not the same type that the .resources file said it contained. Expected '{0}' but read '{1}'. + + + Corrupt .resources file. The specified type doesn't match the available data in the stream. + + + Too many bytes in what should have been a 7 bit encoded Int32. + + + Enumeration already finished. + + + Enumeration has not started. Call MoveNext. + + + Resource was of type '{0}' instead of String - call GetObject instead. + + + The resource writer has already been closed and cannot be edited. + + + This platform does not support binary serialized resources. + + + Cannot read resources that depend on serialization. + + + Stream does not support seeking. + + + This .resources file should not be read with this reader. The resource reader type is "{0}". + + + Cannot access a closed resource set. + + + ResourceReader is closed. + + + Stream is not a valid resource file. + + + Could not load a converter for type {0}. + + diff --git a/src/System.Resources.Extensions/src/System.Resources.Extensions.csproj b/src/System.Resources.Extensions/src/System.Resources.Extensions.csproj new file mode 100644 index 000000000000..07e9415378f0 --- /dev/null +++ b/src/System.Resources.Extensions/src/System.Resources.Extensions.csproj @@ -0,0 +1,22 @@ + + + true + netstandard-Debug;netstandard-Release + $(DefineConstants);RESOURCES_EXTENSIONS + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/System.Resources.Extensions/src/System/Resources/Extensions/DeserializingResourceReader.cs b/src/System.Resources.Extensions/src/System/Resources/Extensions/DeserializingResourceReader.cs new file mode 100644 index 000000000000..abd5ddb74922 --- /dev/null +++ b/src/System.Resources.Extensions/src/System/Resources/Extensions/DeserializingResourceReader.cs @@ -0,0 +1,207 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.ComponentModel; +using System.IO; +using System.Reflection; +using System.Runtime.Serialization.Formatters.Binary; + +namespace System.Resources.Extensions +{ + public partial class DeserializingResourceReader + { + private bool _assumeBinaryFormatter = false; + private BinaryFormatter _formatter = null; + + private bool ValidateReaderType(string readerType) + { + // our format? + if (CompareNames(readerType, PreserializedResourceWriter.DeserializingResourceReaderFullyQualifiedName)) + { + return true; + } + + // default format? + if (CompareNames(readerType, PreserializedResourceWriter.ResourceReaderFullyQualifiedName)) + { + // we can read the default format, we just assume BinaryFormatter and don't + // read the SerializationFormat + _assumeBinaryFormatter = true; + return true; + } + + return false; + } + + private object ReadBinaryFormattedObject() + { + if (_formatter == null) + { + _formatter = new BinaryFormatter(); + } + + return _formatter.Deserialize(_store.BaseStream); + } + + private object DeserializeObject(int typeIndex) + { + Type type = FindType(typeIndex); + + if (_assumeBinaryFormatter) + { + return ReadBinaryFormattedObject(); + } + + // read type + SerializationFormat format = (SerializationFormat)_store.Read7BitEncodedInt(); + + object value; + + // read data + switch (format) + { + case SerializationFormat.BinaryFormatter: + { + // read length + int length = _store.Read7BitEncodedInt(); + if (length < 0) + { + throw new BadImageFormatException(SR.Format(SR.BadImageFormat_ResourceDataLengthInvalid, length)); + } + + long originalPosition = _store.BaseStream.Position; + + value = ReadBinaryFormattedObject(); + + long bytesRead = _store.BaseStream.Position - originalPosition; + + // Ensure BF read what we expected. + if (bytesRead != length) + { + throw new BadImageFormatException(SR.Format(SR.BadImageFormat_ResourceDataLengthInvalid, length)); + } + break; + } + case SerializationFormat.TypeConverterByteArray: + { + // read length + int length = _store.Read7BitEncodedInt(); + if (length < 0) + { + throw new BadImageFormatException(SR.Format(SR.BadImageFormat_ResourceDataLengthInvalid, length)); + } + + byte[] data = _store.ReadBytes(length); + + TypeConverter converter = TypeDescriptor.GetConverter(type); + + if (converter == null) + { + throw new TypeLoadException(SR.Format(SR.TypeLoadException_CannotLoadConverter, type)); + } + + value = converter.ConvertFrom(data); + break; + } + case SerializationFormat.TypeConverterString: + { + string stringData = _store.ReadString(); + + TypeConverter converter = TypeDescriptor.GetConverter(type); + + if (converter == null) + { + throw new TypeLoadException(SR.Format(SR.TypeLoadException_CannotLoadConverter, type)); + } + + value = converter.ConvertFromInvariantString(stringData); + break; + } + case SerializationFormat.ActivatorStream: + { + // read length + int length = _store.Read7BitEncodedInt(); + if (length < 0) + { + throw new BadImageFormatException(SR.Format(SR.BadImageFormat_ResourceDataLengthInvalid, length)); + } + Stream stream; + + if (_store.BaseStream is UnmanagedMemoryStream ums) + { + // For the case that we've memory mapped in the .resources + // file, just return a Stream pointing to that block of memory. + unsafe + { + stream = new UnmanagedMemoryStream(ums.PositionPointer, length, length, FileAccess.Read); + } + } + else + { + + byte[] bytes = _store.ReadBytes(length); + // Lifetime of memory == lifetime of this stream. + stream = new MemoryStream(bytes, false); + } + + value = Activator.CreateInstance(type, new object[] { stream }); + break; + } + default: + throw new BadImageFormatException(SR.BadImageFormat_TypeMismatch); + } + + // Make sure we deserialized the type that we expected. + // This protects against bad typeconverters or bad binaryformatter payloads. + if (value.GetType() != type) + throw new BadImageFormatException(SR.Format(SR.BadImageFormat_ResType_SerBlobMismatch, type.FullName, value.GetType().FullName)); + + return value; + } + + // Compare two type names ignoring version + private static bool CompareNames(string typeName1, string typeName2) + { + // First, compare type names + int comma1 = typeName1.IndexOf(','); + int comma2 = typeName2.IndexOf(','); + if (comma1 != comma2) + return false; + + // both are missing assembly name, compare entire string as type name + if (comma1 == -1) + return string.Equals(typeName1, typeName2, StringComparison.Ordinal); + + // compare the type name portion + ReadOnlySpan type1 = typeName1.AsSpan(0, comma1); + ReadOnlySpan type2 = typeName2.AsSpan(0, comma2); + if (!type1.Equals(type2, StringComparison.Ordinal)) + return false; + + // Now, compare assembly display names (IGNORES VERSION AND PROCESSORARCHITECTURE) + // also, for mscorlib ignores everything, since that's what the binder is going to do + while (Char.IsWhiteSpace(typeName1[++comma1])) + ; + while (Char.IsWhiteSpace(typeName2[++comma2])) + ; + + // case insensitive + AssemblyName an1 = new AssemblyName(typeName1.Substring(comma1)); + AssemblyName an2 = new AssemblyName(typeName2.Substring(comma2)); + if (!string.Equals(an1.Name, an2.Name, StringComparison.OrdinalIgnoreCase)) + return false; + + // to match IsMscorlib() in VM + if (string.Equals(an1.Name, "mscorlib", StringComparison.OrdinalIgnoreCase)) + return true; + + if (an1.CultureInfo?.LCID != an2.CultureInfo?.LCID) + return false; + + byte[] pkt1 = an1.GetPublicKeyToken(); + byte[] pkt2 = an2.GetPublicKeyToken(); + return pkt1.AsSpan().SequenceEqual(pkt2); + } + } +} diff --git a/src/System.Resources.Extensions/src/System/Resources/Extensions/PreserializedResourceWriter.cs b/src/System.Resources.Extensions/src/System/Resources/Extensions/PreserializedResourceWriter.cs new file mode 100644 index 000000000000..bfcc73a344f9 --- /dev/null +++ b/src/System.Resources.Extensions/src/System/Resources/Extensions/PreserializedResourceWriter.cs @@ -0,0 +1,200 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Diagnostics; +using System.IO; + +namespace System.Resources.Extensions +{ + partial class PreserializedResourceWriter + { + // indicates if the types of resources saved will require the DeserializingResourceReader + // in order to read them. + bool _requiresDeserializingResourceReader = false; + + // use hard-coded strings rather than typeof so that the version doesn't leak into resources files + internal const string DeserializingResourceReaderFullyQualifiedName = "System.Resources.Extensions.DeserializingResourceReader, System.Resources.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51"; + internal const string RuntimeResourceSetFullyQualifiedName = "System.Resources.Extensions.RuntimeResourceSet, System.Resources.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51"; + + private string ResourceReaderTypeName => _requiresDeserializingResourceReader ? + DeserializingResourceReaderFullyQualifiedName : + ResourceReaderFullyQualifiedName; + + private string ResourceSetTypeName => _requiresDeserializingResourceReader ? + RuntimeResourceSetFullyQualifiedName : + ResSetTypeName; + + /// + /// Adds a resource of specified type represented by a string value which will be + /// passed to the type's TypeConverter when reading the resource. + /// + /// Resource name + /// Assembly qualified type name of the resource + /// Value of the resource in string form understood by the type's TypeConverter + public void AddTypeConverterResource(string name, string typeName, string value) + { + if (name == null) + throw new ArgumentNullException(nameof(name)); + if (typeName == null) + throw new ArgumentNullException(nameof(typeName)); + if (value == null) + throw new ArgumentNullException(nameof(value)); + + AddResourceData(name, typeName, new ResourceDataRecord(SerializationFormat.TypeConverterString, value)); + + _requiresDeserializingResourceReader = true; + } + + /// + /// Adds a resource of specified type represented by a byte[] value which will be + /// passed to the type's TypeConverter when reading the resource. + /// + /// Resource name + /// Assembly qualified type name of the resource + /// Value of the resource in byte[] form understood by the type's TypeConverter + public void AddTypeConverterResource(string name, string typeName, byte[] value) + { + if (name == null) + throw new ArgumentNullException(nameof(name)); + if (typeName == null) + throw new ArgumentNullException(nameof(typeName)); + if (value == null) + throw new ArgumentNullException(nameof(value)); + + AddResourceData(name, typeName, new ResourceDataRecord(SerializationFormat.TypeConverterByteArray, value)); + + _requiresDeserializingResourceReader = true; + } + + /// + /// Adds a resource of specified type represented by a byte[] value which will be + /// passed to BinaryFormatter when reading the resource. + /// + /// Resource name + /// Assembly qualified type name of the resource + /// Value of the resource in byte[] form understood by BinaryFormatter + public void AddBinaryFormattedResource(string name, string typeName, byte[] value) + { + if (name == null) + throw new ArgumentNullException(nameof(name)); + if (typeName == null) + throw new ArgumentNullException(nameof(typeName)); + if (value == null) + throw new ArgumentNullException(nameof(value)); + + AddResourceData(name, typeName, new ResourceDataRecord(SerializationFormat.BinaryFormatter, value)); + } + + /// + /// Adds a resource of specified type represented by a Stream value which will be + /// passed to the type's constructor when reading the resource. + /// + /// Resource name + /// Assembly qualified type name of the resource + /// Value of the resource in Stream form understood by the types constructor + /// Indicates that the stream should be closed after resources have been written + public void AddActivatorResource(string name, string typeName, Stream value, bool closeAfterWrite = false) + { + if (name == null) + throw new ArgumentNullException(nameof(name)); + if (typeName == null) + throw new ArgumentNullException(nameof(typeName)); + if (value == null) + throw new ArgumentNullException(nameof(value)); + + if (!value.CanSeek) + throw new ArgumentException(SR.NotSupported_UnseekableStream); + + AddResourceData(name, typeName, new ResourceDataRecord(SerializationFormat.ActivatorStream, value, closeAfterWrite)); + + _requiresDeserializingResourceReader = true; + } + + private class ResourceDataRecord + { + internal readonly SerializationFormat Format; + internal readonly object Data; + internal readonly bool CloseAfterWrite; + + internal ResourceDataRecord(SerializationFormat format, object data, bool closeAfterWrite = false) + { + Format = format; + Data = data; + CloseAfterWrite = closeAfterWrite; + } + } + + private void WriteData(BinaryWriter writer, object dataContext) + { + ResourceDataRecord record = dataContext as ResourceDataRecord; + + Debug.Assert(record != null); + + // Only write the format if we resources are in DeserializingResourceReader format + if (_requiresDeserializingResourceReader) + { + Write7BitEncodedInt(writer, (int)record.Format); + } + + try + { + switch (record.Format) + { + case SerializationFormat.BinaryFormatter: + { + byte[] data = (byte[])record.Data; + + // only write length if using DeserializingResourceReader, ResourceReader + // doesn't constrain binaryFormatter + if (_requiresDeserializingResourceReader) + { + Write7BitEncodedInt(writer, data.Length); + } + + writer.Write(data); + break; + } + case SerializationFormat.ActivatorStream: + { + Stream stream = (Stream)record.Data; + + if (stream.Length > int.MaxValue) + throw new ArgumentException(SR.ArgumentOutOfRange_StreamLength); + + stream.Position = 0; + + Write7BitEncodedInt(writer, (int)stream.Length); + + stream.CopyTo(writer.BaseStream); + + break; + } + case SerializationFormat.TypeConverterByteArray: + { + byte[] data = (byte[])record.Data; + Write7BitEncodedInt(writer, data.Length); + writer.Write(data); + break; + } + case SerializationFormat.TypeConverterString: + { + string data = (string)record.Data; + writer.Write(data); + break; + } + default: + // unreachable: indicates inconsistency in this class + throw new ArgumentException(nameof(ResourceDataRecord.Format)); + } + } + finally + { + if (record.Data is IDisposable disposable && record.CloseAfterWrite) + { + disposable.Dispose(); + } + } + } + } +} diff --git a/src/System.Resources.Extensions/src/System/Resources/Extensions/SerializationFormat.cs b/src/System.Resources.Extensions/src/System/Resources/Extensions/SerializationFormat.cs new file mode 100644 index 000000000000..6ba83218b902 --- /dev/null +++ b/src/System.Resources.Extensions/src/System/Resources/Extensions/SerializationFormat.cs @@ -0,0 +1,16 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +namespace System.Resources.Extensions +{ + // Internal Enum that's shared between reader and writer to indicate the + // deserialization method for a resource. + internal enum SerializationFormat + { + BinaryFormatter = 1, + TypeConverterByteArray = 2, + TypeConverterString = 3, + ActivatorStream = 4 + } +} diff --git a/src/System.Resources.Extensions/tests/BinaryResourceWriterUnitTest.cs b/src/System.Resources.Extensions/tests/BinaryResourceWriterUnitTest.cs new file mode 100644 index 000000000000..93f55b117958 --- /dev/null +++ b/src/System.Resources.Extensions/tests/BinaryResourceWriterUnitTest.cs @@ -0,0 +1,464 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Collections; +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing; +using System.Globalization; +using System.IO; +using System.Linq; +using System.Reflection; +using System.Runtime.Serialization.Formatters.Binary; +using Xunit; + +namespace System.Resources.Extensions.Tests +{ + public class PreserializedResourceWriterTests + { + [Fact] + public static void ExceptionforNullStream() + { + Assert.Throws("stream", () => new PreserializedResourceWriter((Stream)null)); + } + + [Fact] + public static void ExceptionforNullFile() + { + Assert.Throws("fileName", () => new PreserializedResourceWriter((string)null)); + } + + [Fact] + public static void ExceptionforReadOnlyStream() + { + AssertExtensions.Throws(null, () => + { + using (var readOnlyStream = new MemoryStream(new byte[1], false)) + { + new PreserializedResourceWriter(readOnlyStream); + } + }); + } + + [Fact] + public static void ExceptionforNullResourceId() + { + using (var writer = new PreserializedResourceWriter(new MemoryStream())) + { + Assert.Throws("name", () => writer.AddResource(null, "value")); + Assert.Throws("name", () => writer.AddResource(null, new object())); + Assert.Throws("name", () => writer.AddResource(null, new byte[0])); + + using (var stream = new MemoryStream()) + { + Assert.Throws("name", () => writer.AddResource(null, stream)); + Assert.Throws("name", () => writer.AddResource(null, stream, true)); + Assert.Throws("name", () => writer.AddActivatorResource(null, "System.DayOfWeek", stream, false)); + } + + Assert.Throws("name", () => writer.AddBinaryFormattedResource(null, "System.DayOfWeek", new byte[1])); + Assert.Throws("name", () => writer.AddTypeConverterResource(null, "System.DayOfWeek", new byte[1])); + Assert.Throws("name", () => writer.AddTypeConverterResource(null, "System.DayOfWeek", "Monday")); + } + } + + [Fact] + public static void ExceptionforDuplicateKey() + { + using (var writer = new PreserializedResourceWriter(new MemoryStream())) + { + writer.AddResource("duplicate", "value"); + + Assert.Throws(null, () => writer.AddResource("duplicate", "value")); + Assert.Throws(null, () => writer.AddResource("duplicate", new object())); + Assert.Throws(null, () => writer.AddResource("duplicate", new byte[0])); + + using (var stream = new MemoryStream()) + { + Assert.Throws(null, () => writer.AddResource("duplicate", stream)); + Assert.Throws(null, () => writer.AddResource("duplicate", stream, true)); + Assert.Throws(null, () => writer.AddActivatorResource("duplicate", "System.DayOfWeek", stream, false)); + } + + Assert.Throws(null, () => writer.AddBinaryFormattedResource("duplicate", "System.DayOfWeek", new byte[1])); + Assert.Throws(null, () => writer.AddTypeConverterResource("duplicate", "System.DayOfWeek", new byte[1])); + Assert.Throws(null, () => writer.AddTypeConverterResource("duplicate", "System.DayOfWeek", "Monday")); + + + Assert.Throws(null, () => writer.AddResource("Duplicate", "value")); + Assert.Throws(null, () => writer.AddResource("dUplicate", new object())); + Assert.Throws(null, () => writer.AddResource("duPlicate", new byte[0])); + + using (var stream = new MemoryStream()) + { + Assert.Throws(null, () => writer.AddResource("dupLicate", stream)); + Assert.Throws(null, () => writer.AddResource("duplIcate", stream, true)); + Assert.Throws(null, () => writer.AddActivatorResource("dupliCate", "System.DayOfWeek", stream, false)); + } + + Assert.Throws(null, () => writer.AddBinaryFormattedResource("duplicAte", "System.DayOfWeek", new byte[1])); + Assert.Throws(null, () => writer.AddTypeConverterResource("duplicaTe", "System.DayOfWeek", new byte[1])); + Assert.Throws(null, () => writer.AddTypeConverterResource("duplicatE", "System.DayOfWeek", "Monday")); + } + } + + [Fact] + public static void ExceptionForAddAfterGenerate() + { + using (var writer = new PreserializedResourceWriter(new MemoryStream())) + { + writer.AddResource("duplicate", "value"); + + writer.Generate(); + + Assert.Throws(() => writer.AddResource("duplicate", "value")); + Assert.Throws(() => writer.AddResource("duplicate", new object())); + Assert.Throws(() => writer.AddResource("duplicate", new byte[0])); + + using (var stream = new MemoryStream()) + { + Assert.Throws(() => writer.AddResource("duplicate", stream)); + Assert.Throws(() => writer.AddResource("duplicate", stream, true)); + Assert.Throws(() => writer.AddActivatorResource("duplicate", "System.DayOfWeek", stream, false)); + } + + Assert.Throws(() => writer.AddBinaryFormattedResource("duplicate", "System.DayOfWeek", new byte[1])); + Assert.Throws(() => writer.AddTypeConverterResource("duplicate", "System.DayOfWeek", new byte[1])); + Assert.Throws(() => writer.AddTypeConverterResource("duplicate", "System.DayOfWeek", "Monday")); + } + } + + [Fact] + public static void EmptyResources() + { + byte[] writerBuffer, binaryWriterBuffer; + using (MemoryStream ms = new MemoryStream()) + using (ResourceWriter writer = new ResourceWriter(ms)) + { + writer.Generate(); + writerBuffer = ms.ToArray(); + } + + using (MemoryStream ms = new MemoryStream()) + using (PreserializedResourceWriter writer = new PreserializedResourceWriter(ms)) + { + writer.Generate(); + binaryWriterBuffer = ms.ToArray(); + } + + Assert.Equal(writerBuffer, binaryWriterBuffer); + } + + + [Fact] + public static void PrimitiveResources() + { + IReadOnlyDictionary values = TestData.Primitive; + Action addData = (writer) => + { + foreach (var pair in values) + { + writer.AddResource(pair.Key, pair.Value); + } + }; + + byte[] writerBuffer, binaryWriterBuffer; + using (MemoryStream ms = new MemoryStream()) + using (ResourceWriter writer = new ResourceWriter(ms)) + { + addData(writer); + writer.Generate(); + writerBuffer = ms.ToArray(); + } + + using (MemoryStream ms = new MemoryStream()) + using (PreserializedResourceWriter writer = new PreserializedResourceWriter(ms)) + { + addData(writer); + writer.Generate(); + binaryWriterBuffer = ms.ToArray(); + } + + // PreserializedResourceWriter should write ResourceWriter/ResourceReader format + Assert.Equal(writerBuffer, binaryWriterBuffer); + + using (MemoryStream ms = new MemoryStream(binaryWriterBuffer, false)) + using (ResourceReader reader = new ResourceReader(ms)) + { + IDictionaryEnumerator dictEnum = reader.GetEnumerator(); + + while (dictEnum.MoveNext()) + { + Assert.Equal(values[(string)dictEnum.Key], dictEnum.Value); + } + } + + // DeserializingResourceReader can read ResourceReader format + using (MemoryStream ms = new MemoryStream(binaryWriterBuffer, false)) + using (DeserializingResourceReader reader = new DeserializingResourceReader(ms)) + { + IDictionaryEnumerator dictEnum = reader.GetEnumerator(); + + while (dictEnum.MoveNext()) + { + Assert.Equal(values[(string)dictEnum.Key], dictEnum.Value); + } + } + } + + [Fact] + public static void BinaryFormattedResources() + { + var values = TestData.BinaryFormatted; + byte[] writerBuffer, binaryWriterBuffer; + using (MemoryStream ms = new MemoryStream()) + using (ResourceWriter writer = new ResourceWriter(ms)) + { + BinaryFormatter binaryFormatter = new BinaryFormatter(); + + foreach (var pair in values) + { + using (MemoryStream memoryStream = new MemoryStream()) + { + binaryFormatter.Serialize(memoryStream, pair.Value); + writer.AddResourceData(pair.Key, TestData.GetSerializationTypeName(pair.Value.GetType()), memoryStream.ToArray()); + } + } + writer.Generate(); + writerBuffer = ms.ToArray(); + } + + using (MemoryStream ms = new MemoryStream()) + using (PreserializedResourceWriter writer = new PreserializedResourceWriter(ms)) + { + BinaryFormatter binaryFormatter = new BinaryFormatter(); + + foreach (var pair in values) + { + using (MemoryStream memoryStream = new MemoryStream()) + { + binaryFormatter.Serialize(memoryStream, pair.Value); + writer.AddBinaryFormattedResource(pair.Key, TestData.GetSerializationTypeName(pair.Value.GetType()), memoryStream.ToArray()); + } + } + writer.Generate(); + binaryWriterBuffer = ms.ToArray(); + } + + // PreserializedResourceWriter should write ResourceWriter/ResourceReader format + Assert.Equal(writerBuffer, binaryWriterBuffer); + + using (MemoryStream ms = new MemoryStream(writerBuffer, false)) + using (ResourceReader reader = new ResourceReader(ms)) + { + typeof(ResourceReader).GetField("_permitDeserialization", BindingFlags.Instance | BindingFlags.NonPublic)?.SetValue(reader, true); + + IDictionaryEnumerator dictEnum = reader.GetEnumerator(); + + while (dictEnum.MoveNext()) + { + ResourceValueEquals(values[(string)dictEnum.Key], dictEnum.Value); + } + } + + // DeserializingResourceReader can read ResourceReader format + using (MemoryStream ms = new MemoryStream(writerBuffer, false)) + using (DeserializingResourceReader reader = new DeserializingResourceReader(ms)) + { + IDictionaryEnumerator dictEnum = reader.GetEnumerator(); + + while (dictEnum.MoveNext()) + { + ResourceValueEquals(values[(string)dictEnum.Key], dictEnum.Value); + } + } + } + + [Fact] + public static void TypeConverterByteArrayResources() + { + var values = TestData.ByteArrayConverter; + + byte[] binaryWriterBuffer; + + using (MemoryStream ms = new MemoryStream()) + using (PreserializedResourceWriter writer = new PreserializedResourceWriter(ms)) + { + foreach (var pair in values) + { + TypeConverter converter = TypeDescriptor.GetConverter(pair.Value.GetType()); + byte[] buffer = (byte[])converter.ConvertTo(pair.Value, typeof(byte[])); + writer.AddTypeConverterResource(pair.Key, TestData.GetSerializationTypeName(pair.Value.GetType()), buffer); + } + writer.Generate(); + binaryWriterBuffer = ms.ToArray(); + } + + using (MemoryStream ms = new MemoryStream(binaryWriterBuffer, false)) + using (DeserializingResourceReader reader = new DeserializingResourceReader(ms)) + { + IDictionaryEnumerator dictEnum = reader.GetEnumerator(); + + while (dictEnum.MoveNext()) + { + ResourceValueEquals(values[(string)dictEnum.Key], dictEnum.Value); + } + } + } + + [Fact] + public static void TypeConverterStringResources() + { + var values = TestData.StringConverter; + + byte[] binaryWriterBuffer; + + using (MemoryStream ms = new MemoryStream()) + using (PreserializedResourceWriter writer = new PreserializedResourceWriter(ms)) + { + foreach (var pair in values) + { + TypeConverter converter = TypeDescriptor.GetConverter(pair.Value.GetType()); + string value = converter.ConvertToInvariantString(pair.Value); + writer.AddTypeConverterResource(pair.Key, TestData.GetSerializationTypeName(pair.Value.GetType()), value); + } + writer.Generate(); + binaryWriterBuffer = ms.ToArray(); + } + + using (MemoryStream ms = new MemoryStream(binaryWriterBuffer, false)) + using (DeserializingResourceReader reader = new DeserializingResourceReader(ms)) + { + IDictionaryEnumerator dictEnum = reader.GetEnumerator(); + + while (dictEnum.MoveNext()) + { + ResourceValueEquals(values[(string)dictEnum.Key], dictEnum.Value); + } + } + } + + [Fact] + public static void StreamResources() + { + var values = TestData.Activator; + + byte[] binaryWriterBuffer; + + using (MemoryStream ms = new MemoryStream()) + using (PreserializedResourceWriter writer = new PreserializedResourceWriter(ms)) + { + foreach (var pair in values) + { + pair.Value.stream.Seek(0, SeekOrigin.Begin); + writer.AddActivatorResource(pair.Key, TestData.GetSerializationTypeName(pair.Value.type), pair.Value.stream, false); + } + writer.Generate(); + binaryWriterBuffer = ms.ToArray(); + } + + using (MemoryStream ms = new MemoryStream(binaryWriterBuffer, false)) + using (DeserializingResourceReader reader = new DeserializingResourceReader(ms)) + { + IDictionaryEnumerator dictEnum = reader.GetEnumerator(); + + while (dictEnum.MoveNext()) + { + var expectedTuple = values[(string)dictEnum.Key]; + expectedTuple.stream.Seek(0, SeekOrigin.Begin); + object expected = Activator.CreateInstance(expectedTuple.type, new object[] { expectedTuple.stream }); + ResourceValueEquals(expected, dictEnum.Value); + } + } + } + + [Fact] + public static void CanReadViaResourceManager() + { + ResourceManager resourceManager = new ResourceManager(typeof(TestData)); + + IEnumerable> objectPairs = TestData.Primitive + .Concat(TestData.BinaryFormattedWithoutDrawing) + .Concat(TestData.ByteArrayConverterWithoutDrawing) + .Concat(TestData.StringConverterWithoutDrawing); + + foreach(KeyValuePair pair in objectPairs) + { + var actualValue = resourceManager.GetObject(pair.Key); + + Assert.Equal(pair.Value, actualValue); + } + + foreach(KeyValuePair pair in TestData.ActivatorWithoutDrawing) + { + pair.Value.stream.Seek(0, SeekOrigin.Begin); + var expectedValue = Activator.CreateInstance(pair.Value.type, pair.Value.stream); + var actualValue = resourceManager.GetObject(pair.Key); + + Assert.Equal(expectedValue, actualValue); + } + } + + [Fact] + public static void ResourceManagerLoadsCorrectReader() + { + ResourceManager resourceManager = new ResourceManager(typeof(TestData)); + ResourceSet resSet = resourceManager.GetResourceSet(CultureInfo.InvariantCulture, true, true); + IResourceReader reader = (IResourceReader)resSet.GetType().GetProperty("Reader", BindingFlags.NonPublic | BindingFlags.Instance)?.GetValue(resSet); + Assert.IsType(reader); + } + + [Fact] + public static void EmbeddedResourcesAreUpToDate() + { + // this is meant to catch a case where our embedded test resources are out of date with respect to the current writer. + // that could be intentional, or accidental. Regardless we want to know. + using (Stream resourcesStream = typeof(TestData).Assembly.GetManifestResourceStream("System.Resources.Extensions.Tests.TestData.resources")) + using (MemoryStream actualData = new MemoryStream(), expectedData = new MemoryStream()) + { + TestData.WriteResourcesStream(actualData); + resourcesStream.CopyTo(expectedData); + Assert.Equal(expectedData.ToArray(), actualData.ToArray()); + } + } + + private static void ResourceValueEquals(object expected, object actual) + { + if (actual is Bitmap bitmap) + { + BitmapEquals((Bitmap)expected, bitmap); + } + else if (actual is Icon icon) + { + BitmapEquals(((Icon)expected).ToBitmap(), icon.ToBitmap()); + } + else if (actual is Font font) + { + Font expectedFont = (Font)expected; + Assert.Equal(expectedFont.FontFamily, font.FontFamily); + Assert.Equal(expectedFont.Size, font.Size); + Assert.Equal(expectedFont.Style, font.Style); + Assert.Equal(expectedFont.Unit, font.Unit); + } + else + { + Assert.Equal(expected, actual); + } + } + + private static void BitmapEquals(Bitmap left, Bitmap right) + { + Assert.Equal(left.Size, right.Size); + + for (int x = 0; x < left.Width; ++x) + { + for (int y = 0; y < left.Height; ++y) + { + Assert.Equal(left.GetPixel(x, y), right.GetPixel(x, y)); + } + } + } + } + +} diff --git a/src/System.Resources.Extensions/tests/Configurations.props b/src/System.Resources.Extensions/tests/Configurations.props new file mode 100644 index 000000000000..ff0d415e4593 --- /dev/null +++ b/src/System.Resources.Extensions/tests/Configurations.props @@ -0,0 +1,7 @@ + + + + netstandard; + + + \ No newline at end of file diff --git a/src/System.Resources.Extensions/tests/MyResourceType.cs b/src/System.Resources.Extensions/tests/MyResourceType.cs new file mode 100644 index 000000000000..07ceb73420fa --- /dev/null +++ b/src/System.Resources.Extensions/tests/MyResourceType.cs @@ -0,0 +1,89 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.ComponentModel; +using System.Globalization; +using System.IO; + +namespace System.Resources.Extensions.Tests +{ + public class MyResourceTypeConverter : TypeConverter + { + public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) + { + if (sourceType == typeof(byte[])) + { + return true; + } + + return base.CanConvertFrom(context, sourceType); + } + + public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType) + { + if (destinationType == typeof(byte[])) + { + return true; + } + + return base.CanConvertTo(context, destinationType); + } + + public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value) + { + if (value is byte[] bytes) + { + return new MyResourceType(bytes); + } + + return base.ConvertFrom(context, culture, value); + } + + public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType) + { + if (destinationType == typeof(byte[]) && value is MyResourceType myResourceType) + { + return myResourceType.Data; + } + return base.ConvertTo(context, culture, value, destinationType); + } + } + + [TypeConverter(typeof(MyResourceTypeConverter))] + public class MyResourceType + { + public MyResourceType(byte[] data) + { + Data = data; + } + + public MyResourceType(Stream stream) + { + Data = new byte[stream.Length]; + stream.Read(Data, 0, Data.Length); + } + + public byte[] Data { get; } + + public override bool Equals(object obj) + { + if (obj is MyResourceType myResourceType) + { + return Data.AsSpan().SequenceEqual(myResourceType.Data); + } + return base.Equals(obj); + } + + public override int GetHashCode() + { + if (Data?.Length > 0) + { + // we don't care about collisions, this is a test. + return Data[0].GetHashCode(); + } + + return 0; + } + } +} diff --git a/src/System.Resources.Extensions/tests/System.Resources.Extensions.Tests.csproj b/src/System.Resources.Extensions/tests/System.Resources.Extensions.Tests.csproj new file mode 100644 index 000000000000..0f9b7922090d --- /dev/null +++ b/src/System.Resources.Extensions/tests/System.Resources.Extensions.Tests.csproj @@ -0,0 +1,37 @@ + + + netstandard-Debug;netstandard-Release + 1.0.9 + true + + + + + + + + + + + + + <_executor>Microsoft.DotNet.RemoteExecutorHost.dll + + + + + + $(TargetDir)%(Class)%(Identity).exception.txt + + + $(TestHostRootPath)dotnet $(_executor) $(AssemblyName) %(Class) %(Identity) %(ExceptionFile) %(Parameters) + + + + + + \ No newline at end of file diff --git a/src/System.Resources.Extensions/tests/TestData.cs b/src/System.Resources.Extensions/tests/TestData.cs new file mode 100644 index 000000000000..1944c19a2730 --- /dev/null +++ b/src/System.Resources.Extensions/tests/TestData.cs @@ -0,0 +1,192 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing; +using System.Drawing.Imaging; +using System.Globalization; +using System.IO; +using System.Runtime.CompilerServices; +using System.Runtime.Serialization.Formatters.Binary; + +namespace System.Resources.Extensions.Tests +{ + public static class TestData + { + public static IReadOnlyDictionary Primitive { get; } = + new Dictionary() + { + ["string"] = "value", + ["bool"] = true, + ["char"] = 'b', + ["int"] = 42, + ["byte"] = (byte)7, + ["sbyte"] = (sbyte)-3, + ["short"] = (short) 31000, + ["ushort"] = (ushort) 61000, + ["long"] = 10000000000, + ["ulong"] = ulong.MaxValue, + ["float"] = 3.14f, + ["double"] = 3.14159, + ["decimal"] = 3.141596536897931m + }; + + public static IReadOnlyDictionary BinaryFormatted + { + get => PlatformDetection.IsDrawingSupported ? + BinaryFormattedDrawing : BinaryFormattedWithoutDrawing; + } + public static Dictionary BinaryFormattedWithoutDrawing { get; } = + new Dictionary() + { + ["enum_bin"] = DayOfWeek.Friday, + ["point_bin"] = new Point(4, 8) + }; + + public static IReadOnlyDictionary BinaryFormattedDrawing + { + get => new Dictionary(BinaryFormattedWithoutDrawing) + { + ["bitmap_bin"] = new Bitmap(Path.Combine("bitmaps", "almogaver24bits.bmp")), + ["font_bin"] = SystemFonts.DefaultFont + }; + } + + public static IReadOnlyDictionary ByteArrayConverter + { + // ImageConverter is part of System.Windows.Extensions. + get => PlatformDetection.IsDrawingSupported && PlatformDetection.IsWindows ? + ByteArrayConverterDrawing : ByteArrayConverterWithoutDrawing; + } + + public static Dictionary ByteArrayConverterWithoutDrawing { get; } = + new Dictionary() + { + ["myResourceType_bytes"] = new MyResourceType(new byte[] { 0xAB, 0xCD, 0xEF, 0x01, 0x23, 0x45, 0x67, 0x89 }) + }; + + public static IReadOnlyDictionary ByteArrayConverterDrawing + { + get => new Dictionary(ByteArrayConverterWithoutDrawing) + { + ["bitmap_bytes"] = new Bitmap(Path.Combine("bitmaps", "almogaver24bits.bmp")), + ["icon_bytes"] = new Icon(Path.Combine("bitmaps", "32x32_one_entry_4bit.ico")) + }; + } + + public static IReadOnlyDictionary StringConverter + { + // ImageFormatConverter is part of System.Windows.Extensions. + get => PlatformDetection.IsDrawingSupported && PlatformDetection.IsWindows ? + StringConverterDrawing : StringConverterWithoutDrawing; + } + + public static Dictionary StringConverterWithoutDrawing { get; } = + new Dictionary() + { + ["color_string"] = Color.AliceBlue, + ["point_string"] = new Point(2, 6), + ["rect_string"] = new Rectangle(3, 6, 10, 20), + ["size_string"] = new Size(4, 8), + ["sizeF_string"] = new SizeF(4.2f, 8.5f), + ["cultureInfo_string"] = new CultureInfo("en-US"), + ["enum_string"] = DayOfWeek.Friday + }; + + public static IReadOnlyDictionary StringConverterDrawing + { + get => new Dictionary(StringConverterWithoutDrawing) + { + ["imageFormat_string"] = ImageFormat.Png, + ["font_string"] = SystemFonts.DefaultFont + }; + } + + public static IReadOnlyDictionary Activator + { + get => PlatformDetection.IsDrawingSupported ? + ActivatorDrawing : ActivatorWithoutDrawing; + } + + public static Dictionary ActivatorWithoutDrawing { get; } = + new Dictionary() + { + ["myResourceType_stream"] = (typeof(MyResourceType), new MemoryStream(new byte[] { 0xAB, 0xCD, 0xEF, 0x01, 0x23, 0x45, 0x67, 0x89 })) + }; + + public static IReadOnlyDictionary ActivatorDrawing + { + get => new Dictionary(ActivatorWithoutDrawing) + { + ["icon_stream"] = (typeof(Icon), File.OpenRead(Path.Combine("bitmaps", "32x32_one_entry_4bit.ico"))), + ["bitmap_stream"] = (typeof(Bitmap), File.OpenRead(Path.Combine("bitmaps", "almogaver24bits.bmp"))) + }; + } + + public static string GetSerializationTypeName(Type runtimeType) + { + object[] typeAttributes = runtimeType.GetCustomAttributes(typeof(TypeForwardedFromAttribute), false); + if (typeAttributes != null && typeAttributes.Length > 0) + { + TypeForwardedFromAttribute typeForwardedFromAttribute = (TypeForwardedFromAttribute)typeAttributes[0]; + return $"{runtimeType.FullName}, {typeForwardedFromAttribute.AssemblyFullName}"; + } + else if (runtimeType.Assembly == typeof(object).Assembly) + { + // no attribute and in corelib. Strip the assembly name and hope its in CoreLib on other frameworks + return runtimeType.FullName; + } + + return runtimeType.AssemblyQualifiedName; + } + + public static void WriteResources(string file) + { + WriteResourcesStream(File.Create(file)); + } + + public static void WriteResourcesStream(Stream stream) + { + using (var writer = new PreserializedResourceWriter(stream)) + { + foreach(var pair in Primitive) + { + writer.AddResource(pair.Key, pair.Value); + } + + var formatter = new BinaryFormatter(); + foreach(var pair in BinaryFormattedWithoutDrawing) + { + using (MemoryStream memoryStream = new MemoryStream()) + { + formatter.Serialize(memoryStream, pair.Value); + writer.AddBinaryFormattedResource(pair.Key, GetSerializationTypeName(pair.Value.GetType()), memoryStream.ToArray()); + } + } + + foreach (var pair in ByteArrayConverterWithoutDrawing) + { + TypeConverter converter = TypeDescriptor.GetConverter(pair.Value.GetType()); + byte[] buffer = (byte[])converter.ConvertTo(pair.Value, typeof(byte[])); + writer.AddTypeConverterResource(pair.Key, GetSerializationTypeName(pair.Value.GetType()), buffer); + } + + foreach (var pair in StringConverterWithoutDrawing) + { + TypeConverter converter = TypeDescriptor.GetConverter(pair.Value.GetType()); + string value = converter.ConvertToInvariantString(pair.Value); + writer.AddTypeConverterResource(pair.Key, GetSerializationTypeName(pair.Value.GetType()), value); + } + + foreach(var pair in ActivatorWithoutDrawing) + { + writer.AddActivatorResource(pair.Key, GetSerializationTypeName(pair.Value.type), pair.Value.stream, false); + } + + writer.Generate(); + } + } + } +} diff --git a/src/System.Resources.Extensions/tests/TestData.resources b/src/System.Resources.Extensions/tests/TestData.resources new file mode 100644 index 0000000000000000000000000000000000000000..b5fda739d9d9ab7c72ffa69bf28baa8e8e1d92de GIT binary patch literal 2169 zcmcIlTWB0r7(SETO*XsR8mxw;1zELFTgD-qWK$6XNp_Q_6-m0gRzz@}ojJ1|GCMQO z#b#o_zNkpCAVP~+U$m&DwBkb_`cOec#iB)@#V0RVT6%eCq4g5Ke>an4x3CW(J;Oie z{P+L=&YUxsE?)mqV2tg=>$p$~T#whKB6ls{QMfBj&U@T+b<1?60(ZHi%Z9$7o3+rQ z$Yqr~Vy1(mm^r{53Nbn?4bUTI^1k8u4j(nS?>Vv|W@i1Wp)1ewplr=?b5v1wSF=N! zrl^Ces^+psI~G>-O;4}$u%r_A?sq+104xoPgKEpI7aaKzfRXZ+VXXqPEL{f%)qx=` zr|s6VSv5Bx56L0Kdkm{en;?6DR9Z%Iuc=vmVIgubqrJfS+_8?RmAUJ=(sMxwTRE_K zN8F@_$2vM`-_3T!W-Z-Z-Lj2CY%T<3d1s1T@no}RthTvvx!QXw=?i>n104wSvq;X@9N)=4S(~qp0m$Q=c_kIbgQ((o7rwHUU|k|ocYXN{PjeFeG;{wK`uVg3kI0KE(TFVJC7FV5jSWWQidV-sjA z=rUxtyKy|L%)(=kj+lUXj59jCafKaZGILlIOj>CeSzs&7g^j~>X0jUVfpWXTd_?f@ zcHq1h3JvD1hFf5`S%q4GXB~kJwhf|`3QM0=!Ez=-(8uBK!=eHq<;X$Uzbagt+<_{g z!PP=MkG%%An_Rp`>v57(jc-8yL>;Xak;84|b5I6nWyoyIl&aad%Z|c$S7+m92^=}= z?0uL&Xd`AbZ&>t6h|_DuYs=09`+h=7L8YxI?Sm@eu9Wj)lRb#|4s7WoNV`b20OzST z*Ow`3sBDd@LzP-vflYB~&zb-oBE1i2!bFE5=n|qmkt!RD^p4}d!zT=%k4IwMeDe9y z<|D$1oB5qdG)dzDw#j^R+l@Pq_Kr;mPc!(kB@CKrL}_u)%}c_bS7k)4R9HL)E;$kD zo^o_m4pLv=njVYqf-J#)PnPLx%y-34|9D+^e6sd-KDx3j2pA=u$FIk902gS_DWF$3&Nz7#NUmqNZ{o9=mrXulS Z3CgFW+@45u7z-iRKqE=e(de1J_CF{OZ)gAj literal 0 HcmV?d00001 diff --git a/src/System.Resources.Writer/src/System.Resources.Writer.csproj b/src/System.Resources.Writer/src/System.Resources.Writer.csproj index d96174e9e330..bfcc6a3ac460 100644 --- a/src/System.Resources.Writer/src/System.Resources.Writer.csproj +++ b/src/System.Resources.Writer/src/System.Resources.Writer.csproj @@ -9,8 +9,9 @@ - - + + + diff --git a/src/System.Resources.Writer/src/System/Resources/ResourceWriter.core.cs b/src/System.Resources.Writer/src/System/Resources/ResourceWriter.core.cs new file mode 100644 index 000000000000..ad5ee98b0ef5 --- /dev/null +++ b/src/System.Resources.Writer/src/System/Resources/ResourceWriter.core.cs @@ -0,0 +1,62 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; +using System.IO; +using System.Text; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Runtime.Versioning; +using System.Runtime.Serialization; +using System.Diagnostics; + +namespace System.Resources +{ + partial class ResourceWriter + { + // Set this delegate to allow multi-targeting for .resources files. + // not used by .NETCore since ResourceWriter doesn't support BinaryFormatted resources. + public Func TypeNameConverter { get; set; } + + // Adds a resource of type Stream to the list of resources to be + // written to a file. They aren't written until Generate() is called. + // Doesn't close the Stream when done. + public void AddResource(string name, Stream value) + { + if (name == null) + throw new ArgumentNullException(nameof(name)); + + if (_resourceList == null) + throw new InvalidOperationException(SR.InvalidOperation_ResourceWriterSaved); + + AddResourceInternal(name, value, false); + } + + public void AddResourceData(string name, string typeName, byte[] serializedData) + { + if (name == null) + throw new ArgumentNullException(nameof(name)); + if (typeName == null) + throw new ArgumentNullException(nameof(typeName)); + if (serializedData == null) + throw new ArgumentNullException(nameof(serializedData)); + + AddResourceData(name, typeName, (object)serializedData); + } + + private string ResourceReaderTypeName { get => ResourceReaderFullyQualifiedName; } + private string ResourceSetTypeName { get => ResSetTypeName; } + + private void WriteData(BinaryWriter writer, object dataContext) + { + byte[] data = dataContext as byte[]; + + Debug.Assert(data != null); + + writer.Write(data); + } + } +} + diff --git a/src/System.Resources.Writer/src/System/Runtime/Versioning/MultitargetingHelpers.cs b/src/System.Resources.Writer/src/System/Runtime/Versioning/MultitargetingHelpers.cs deleted file mode 100644 index d9a4830c218b..000000000000 --- a/src/System.Resources.Writer/src/System/Runtime/Versioning/MultitargetingHelpers.cs +++ /dev/null @@ -1,63 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.IO; -using System.Text; - -namespace System.Runtime.Versioning -{ - - internal static class MultitargetingHelpers - { - // This method gets assembly info for the corresponding type. If the typeConverter - // is provided it is used to get this information. - internal static string GetAssemblyQualifiedName(Type type, Func converter) - { - string assemblyFullName = null; - - if (type != null) - { - if (converter != null) - { - try - { - assemblyFullName = converter(type); - // TODO: validate that type and assembly names are well constructed - throw if not. - } - catch (Exception e) - { - if (IsSecurityOrCriticalException(e)) - { - throw; - } - } - } - - if (assemblyFullName == null) - { - assemblyFullName = type.AssemblyQualifiedName; - } - } - - return assemblyFullName; - } - - private static bool IsCriticalException(Exception ex) - { - return ex is NullReferenceException - || ex is StackOverflowException - || ex is OutOfMemoryException - //|| ex is System.Threading.ThreadAbortException - || ex is IndexOutOfRangeException - || ex is AccessViolationException; - } - - private static bool IsSecurityOrCriticalException(Exception ex) - { - return (ex is System.Security.SecurityException) || IsCriticalException(ex); - } - - } -} diff --git a/src/System.Windows.Extensions/src/System/Drawing/FontConverter.cs b/src/System.Windows.Extensions/src/System/Drawing/FontConverter.cs index 5eeb2d7fc8b2..3d3898fe067e 100644 --- a/src/System.Windows.Extensions/src/System/Drawing/FontConverter.cs +++ b/src/System.Windows.Extensions/src/System/Drawing/FontConverter.cs @@ -30,6 +30,10 @@ public override object ConvertTo(ITypeDescriptorContext context, CultureInfo cul { if (destinationType == typeof(string)) { + if (culture == null) + { + culture = CultureInfo.CurrentCulture; + } ValueStringBuilder sb = new ValueStringBuilder(); sb.Append(font.Name); From be40f687dde36512c286c5ee0282dc13fd45bb35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Rivero?= Date: Thu, 25 Apr 2019 15:13:03 -0700 Subject: [PATCH 060/607] Removing EventPipe file polling (EventPipeController+Timer) (#24225) * Remove file polling only, and leave the COMPlus_* functionality. * Fix bug/typo introduced with https://github.com/dotnet/coreclr/pull/21718 Signed-off-by: dotnet-bot --- src/Common/src/CoreLib/System/Threading/Timer.cs | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/Common/src/CoreLib/System/Threading/Timer.cs b/src/Common/src/CoreLib/System/Threading/Timer.cs index 19bdac6f7ada..0f027778faa3 100644 --- a/src/Common/src/CoreLib/System/Threading/Timer.cs +++ b/src/Common/src/CoreLib/System/Threading/Timer.cs @@ -470,14 +470,8 @@ internal bool Change(uint dueTime, uint period) } else { - if ( -#if CORECLR - // Don't emit this event during EventPipeController. This avoids initializing FrameworkEventSource during start-up which is expensive relative to the rest of start-up. - !EventPipeController.Initializing && -#endif - FrameworkEventSource.Log.IsEnabled(EventLevel.Informational, FrameworkEventSource.Keywords.ThreadTransfer)) + if (FrameworkEventSource.Log.IsEnabled(EventLevel.Informational, FrameworkEventSource.Keywords.ThreadTransfer)) FrameworkEventSource.Log.ThreadTransferSendObj(this, 1, string.Empty, true, (int)dueTime, (int)period); - success = _associatedTimerQueue.UpdateTimer(this, dueTime, period); } } From a44c3020838a2834c8eceb07a3a5ecb1879e935f Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Fri, 26 Apr 2019 12:53:56 +0000 Subject: [PATCH 061/607] Update dependencies from https://github.com/dotnet/arcade build 20190425.5 (#37216) - Microsoft.DotNet.XUnitExtensions - 2.4.0-beta.19225.5 - Microsoft.DotNet.XUnitConsoleRunner - 2.5.1-beta.19225.5 - Microsoft.DotNet.VersionTools.Tasks - 1.0.0-beta.19225.5 - Microsoft.DotNet.ApiCompat - 1.0.0-beta.19225.5 - Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19225.5 - Microsoft.DotNet.Build.Tasks.Configuration - 1.0.0-beta.19225.5 - Microsoft.DotNet.Build.Tasks.Feed - 2.2.0-beta.19225.5 - Microsoft.DotNet.Build.Tasks.Packaging - 1.0.0-beta.19225.5 - Microsoft.DotNet.CodeAnalysis - 1.0.0-beta.19225.5 - Microsoft.DotNet.CoreFxTesting - 1.0.0-beta.19225.5 - Microsoft.DotNet.GenAPI - 1.0.0-beta.19225.5 - Microsoft.DotNet.GenFacades - 1.0.0-beta.19225.5 - Microsoft.DotNet.Helix.Sdk - 2.0.0-beta.19225.5 - Microsoft.DotNet.RemoteExecutor - 1.0.0-beta.19225.5 - Microsoft.DotNet.SourceRewriter - 1.0.0-beta.19225.5 --- eng/Version.Details.xml | 60 ++++++++++++++++++++--------------------- eng/Versions.props | 26 +++++++++--------- global.json | 4 +-- 3 files changed, 45 insertions(+), 45 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 3fe0b3b55f06..193498fde0c2 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -34,69 +34,69 @@ https://github.com/dotnet/corefx 18cd561127e35841db2775dc7a85adad70363e18 - + https://github.com/dotnet/arcade - e02c88fca482f1141a9bb310c97be20b0ebd0465 + d37270268a65592cae630f1b979b70f74d4614dd https://github.com/dotnet/standard 5bd46b63a3e439d2a8e70a1fc52942783f1033f5 - + https://github.com/dotnet/arcade - e02c88fca482f1141a9bb310c97be20b0ebd0465 + d37270268a65592cae630f1b979b70f74d4614dd - + https://github.com/dotnet/arcade - e02c88fca482f1141a9bb310c97be20b0ebd0465 + d37270268a65592cae630f1b979b70f74d4614dd - + https://github.com/dotnet/arcade - e02c88fca482f1141a9bb310c97be20b0ebd0465 + d37270268a65592cae630f1b979b70f74d4614dd - + https://github.com/dotnet/arcade - e02c88fca482f1141a9bb310c97be20b0ebd0465 + d37270268a65592cae630f1b979b70f74d4614dd - + https://github.com/dotnet/arcade - e02c88fca482f1141a9bb310c97be20b0ebd0465 + d37270268a65592cae630f1b979b70f74d4614dd - + https://github.com/dotnet/arcade - e02c88fca482f1141a9bb310c97be20b0ebd0465 + d37270268a65592cae630f1b979b70f74d4614dd - + https://github.com/dotnet/arcade - e02c88fca482f1141a9bb310c97be20b0ebd0465 + d37270268a65592cae630f1b979b70f74d4614dd - + https://github.com/dotnet/arcade - e02c88fca482f1141a9bb310c97be20b0ebd0465 + d37270268a65592cae630f1b979b70f74d4614dd - + https://github.com/dotnet/arcade - e02c88fca482f1141a9bb310c97be20b0ebd0465 + d37270268a65592cae630f1b979b70f74d4614dd - + https://github.com/dotnet/arcade - e02c88fca482f1141a9bb310c97be20b0ebd0465 + d37270268a65592cae630f1b979b70f74d4614dd - + https://github.com/dotnet/arcade - e02c88fca482f1141a9bb310c97be20b0ebd0465 + d37270268a65592cae630f1b979b70f74d4614dd - + https://github.com/dotnet/arcade - e02c88fca482f1141a9bb310c97be20b0ebd0465 + d37270268a65592cae630f1b979b70f74d4614dd - + https://github.com/dotnet/arcade - e02c88fca482f1141a9bb310c97be20b0ebd0465 + d37270268a65592cae630f1b979b70f74d4614dd - + https://github.com/dotnet/arcade - e02c88fca482f1141a9bb310c97be20b0ebd0465 + d37270268a65592cae630f1b979b70f74d4614dd https://dev.azure.com/dnceng/internal/_git/dotnet-optimization diff --git a/eng/Versions.props b/eng/Versions.props index 1ee11e1156d7..4c63c74d5cbb 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -23,19 +23,19 @@ - 1.0.0-beta.19224.9 - 1.0.0-beta.19224.9 - 1.0.0-beta.19224.9 - 1.0.0-beta.19224.9 - 1.0.0-beta.19224.9 - 2.4.0-beta.19224.9 - 2.5.1-beta.19224.9 - 1.0.0-beta.19224.9 - 1.0.0-beta.19224.9 - 1.0.0-beta.19224.9 - 1.0.0-beta.19224.9 - 2.2.0-beta.19224.9 - 1.0.0-beta.19224.9 + 1.0.0-beta.19225.5 + 1.0.0-beta.19225.5 + 1.0.0-beta.19225.5 + 1.0.0-beta.19225.5 + 1.0.0-beta.19225.5 + 2.4.0-beta.19225.5 + 2.5.1-beta.19225.5 + 1.0.0-beta.19225.5 + 1.0.0-beta.19225.5 + 1.0.0-beta.19225.5 + 1.0.0-beta.19225.5 + 2.2.0-beta.19225.5 + 1.0.0-beta.19225.5 3.0.0-preview6-27623-02 3.0.0-preview6-27623-02 diff --git a/global.json b/global.json index 4fe040f3dda0..027bfba57fe5 100644 --- a/global.json +++ b/global.json @@ -3,8 +3,8 @@ "dotnet": "3.0.100-preview3-010431" }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19224.9", - "Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19224.9", + "Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19225.5", + "Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19225.5", "Microsoft.NET.Sdk.IL": "3.0.0-preview6-27624-71" } } From 65cffee34c4e2031e0ebf063ca1f6c41828ee092 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Fri, 26 Apr 2019 13:22:45 +0000 Subject: [PATCH 062/607] [master] Update dependencies from dotnet/core-setup (#37138) * Update dependencies from https://github.com/dotnet/core-setup build 20190423.21 - Microsoft.NETCore.App - 3.0.0-preview6-27623-21 - Microsoft.NETCore.DotNetHostPolicy - 3.0.0-preview6-27623-21 - Microsoft.NETCore.DotNetHost - 3.0.0-preview6-27623-21 * Update dependencies from https://github.com/dotnet/core-setup build 20190425.02 - Microsoft.NETCore.App - 3.0.0-preview6-27625-02 - Microsoft.NETCore.DotNetHostPolicy - 3.0.0-preview6-27625-02 - Microsoft.NETCore.DotNetHost - 3.0.0-preview6-27625-02 * Update dependencies from https://github.com/dotnet/core-setup build 20190426.01 - Microsoft.NETCore.App - 3.0.0-preview6-27626-01 - Microsoft.NETCore.DotNetHostPolicy - 3.0.0-preview6-27626-01 - Microsoft.NETCore.DotNetHost - 3.0.0-preview6-27626-01 --- eng/Version.Details.xml | 12 ++++++------ eng/Versions.props | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 193498fde0c2..b7774ec653ab 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -14,17 +14,17 @@ - + https://github.com/dotnet/core-setup - d2ed8008b689c6c840f658034f7296d9a5d053d8 + ae2b1b87767c013397f31e0489b654705764db2f - + https://github.com/dotnet/core-setup - d2ed8008b689c6c840f658034f7296d9a5d053d8 + ae2b1b87767c013397f31e0489b654705764db2f - + https://github.com/dotnet/core-setup - d2ed8008b689c6c840f658034f7296d9a5d053d8 + ae2b1b87767c013397f31e0489b654705764db2f https://github.com/dotnet/corefx diff --git a/eng/Versions.props b/eng/Versions.props index 4c63c74d5cbb..88b9f4840959 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -37,9 +37,9 @@ 2.2.0-beta.19225.5 1.0.0-beta.19225.5 - 3.0.0-preview6-27623-02 - 3.0.0-preview6-27623-02 - 3.0.0-preview6-27623-02 + 3.0.0-preview6-27626-01 + 3.0.0-preview6-27626-01 + 3.0.0-preview6-27626-01 3.0.0-preview6-27624-71 3.0.0-preview6-27624-71 From dfe7593397bf5c598548486c6cb774ebf60e9d69 Mon Sep 17 00:00:00 2001 From: David Shulman Date: Fri, 26 Apr 2019 06:23:55 -0700 Subject: [PATCH 063/607] Allow uppercase HTTP_PROXY and NO_PROXY variables (#37200) This is a redo of PR #35887. Added support for uppercase HTTP_PROXY and NO_PROXY environment variables. The uppercase versions are being used by Docker and other tools. This now completes the set of environment variables that are already handling both lower and upper case variants. Note: This HttpEnvironmentProxy class is currently only used on Linux and OSX. It is not used on Windows yet. I do plan to add support for this to Windows at a later time, see #37187. Added detection of CGI environments in order to suppress using the uppercase HTTP_PROXY environment variable. See https://httpoxy.org/ Fixed some typos in the CSPROJ of the Http Unit Tests. --- .../HttpEnvironmentProxy.cs | 18 +++- .../UnitTests/HttpEnvironmentProxyTest.cs | 93 +++++++++++++++++-- .../System.Net.Http.Unit.Tests.csproj | 14 +-- 3 files changed, 108 insertions(+), 17 deletions(-) diff --git a/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpEnvironmentProxy.cs b/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpEnvironmentProxy.cs index 51a2acf1fc44..1aa71228b72f 100644 --- a/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpEnvironmentProxy.cs +++ b/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpEnvironmentProxy.cs @@ -73,7 +73,7 @@ private static NetworkCredential GetCredentialsFromString(string value) int idx = value.IndexOf(':'); if (idx != -1) { - password = value.Substring(idx+1); + password = value.Substring(idx + 1); value = value.Substring(0, idx); } @@ -81,7 +81,7 @@ private static NetworkCredential GetCredentialsFromString(string value) if (idx != -1) { domain = value.Substring(0, idx); - value = value.Substring(idx+1); + value = value.Substring(idx + 1); } return new NetworkCredential(value, password, domain); @@ -93,9 +93,12 @@ internal sealed class HttpEnvironmentProxy : IWebProxy private const string EnvAllProxyUC = "ALL_PROXY"; private const string EnvAllProxyLC = "all_proxy"; private const string EnvHttpProxyLC = "http_proxy"; + private const string EnvHttpProxyUC = "HTTP_PROXY"; private const string EnvHttpsProxyLC = "https_proxy"; private const string EnvHttpsProxyUC = "HTTPS_PROXY"; private const string EnvNoProxyLC = "no_proxy"; + private const string EnvNoProxyUC = "NO_PROXY"; + private const string EnvCGI = "GATEWAY_INTERFACE"; // Running in a CGI environment. private Uri _httpProxyUri; // String URI for HTTP requests private Uri _httpsProxyUri; // String URI for HTTPS requests @@ -107,9 +110,13 @@ public static bool TryCreate(out IWebProxy proxy) // Get environmental variables. Protocol specific take precedence over // general all_*, lower case variable has precedence over upper case. // Note that curl uses HTTPS_PROXY but not HTTP_PROXY. - // For http, only http_proxy and generic variables are used. Uri httpProxy = GetUriFromString(Environment.GetEnvironmentVariable(EnvHttpProxyLC)); + if (httpProxy == null && Environment.GetEnvironmentVariable(EnvCGI) == null) + { + httpProxy = GetUriFromString(Environment.GetEnvironmentVariable(EnvHttpProxyUC)); + } + Uri httpsProxy = GetUriFromString(Environment.GetEnvironmentVariable(EnvHttpsProxyLC)) ?? GetUriFromString(Environment.GetEnvironmentVariable(EnvHttpsProxyUC)); @@ -136,7 +143,10 @@ public static bool TryCreate(out IWebProxy proxy) return false; } - proxy = new HttpEnvironmentProxy(httpProxy, httpsProxy, Environment.GetEnvironmentVariable(EnvNoProxyLC)); + string noProxy = Environment.GetEnvironmentVariable(EnvNoProxyLC) ?? + Environment.GetEnvironmentVariable(EnvNoProxyUC); + proxy = new HttpEnvironmentProxy(httpProxy, httpsProxy, noProxy); + return true; } diff --git a/src/System.Net.Http/tests/UnitTests/HttpEnvironmentProxyTest.cs b/src/System.Net.Http/tests/UnitTests/HttpEnvironmentProxyTest.cs index 7cdbddf6edab..896b789532f5 100644 --- a/src/System.Net.Http/tests/UnitTests/HttpEnvironmentProxyTest.cs +++ b/src/System.Net.Http/tests/UnitTests/HttpEnvironmentProxyTest.cs @@ -21,9 +21,12 @@ public class HttpEnvironmentProxyTest // to be sure they do not interfere with the test. private void CleanEnv() { - List vars = new List() { "http_proxy", "HTTPS_PROXY", "https_proxy", - "all_proxy", "ALL_PROXY", - "NO_PROXY" }; + List vars = new List() { "http_proxy", "HTTP_PROXY", + "https_proxy", "HTTPS_PROXY", + "all_proxy", "ALL_PROXY", + "no_proxy", "NO_PROXY", + "GATEWAY_INTERFACE" }; + foreach (string v in vars) { Environment.SetEnvironmentVariable(v, null); @@ -115,7 +118,7 @@ public void HttpProxy_EnvironmentProxy_Loaded() [InlineData("HTTP://ABC.COM/", "abc.com", "80", null, null)] [InlineData("http://10.30.62.64:7890/", "10.30.62.64", "7890", null, null)] [InlineData("http://1.2.3.4:8888/foo", "1.2.3.4", "8888", null, null)] - public void HttpProxy_Uri_Parsing(string _input, string _host, string _port, string _user , string _password) + public void HttpProxy_Uri_Parsing(string _input, string _host, string _port, string _user, string _password) { RemoteExecutor.Invoke((input, host, port, user, password) => { @@ -149,7 +152,7 @@ public void HttpProxy_Uri_Parsing(string _input, string _host, string _port, str } return RemoteExecutor.SuccessExitCode; - }, _input, _host, _port, _user ?? "null" , _password ?? "null").Dispose(); + }, _input, _host, _port, _user ?? "null", _password ?? "null").Dispose(); } [Fact] @@ -205,7 +208,85 @@ public void HttpProxy_Exceptions_Match() Assert.True(p.IsBypassed(new Uri("http://www.test.com"))); return RemoteExecutor.SuccessExitCode; - }).Dispose(); + }).Dispose(); + } + + public static IEnumerable HttpProxyNoProxyEnvVarMemberData() + { + yield return new object[] { "http_proxy", "no_proxy" }; + yield return new object[] { "http_proxy", "NO_PROXY" }; + yield return new object[] { "HTTP_PROXY", "no_proxy" }; + yield return new object[] { "HTTP_PROXY", "NO_PROXY" }; + } + + [Theory] + [MemberData(nameof(HttpProxyNoProxyEnvVarMemberData))] + public void HttpProxy_TryCreate_CaseInsensitiveVariables(string proxyEnvVar, string noProxyEnvVar) + { + string proxy = "http://foo:bar@1.1.1.1:3000"; + + var options = new RemoteInvokeOptions(); + options.StartInfo.EnvironmentVariables.Add(proxyEnvVar, proxy); + options.StartInfo.EnvironmentVariables.Add(noProxyEnvVar, ".test.com, foo.com"); + RemoteExecutor.Invoke((proxy) => + { + var directUri = new Uri("http://test.com"); + var thruProxyUri = new Uri("http://atest.com"); + + Assert.True(HttpEnvironmentProxy.TryCreate(out IWebProxy p)); + Assert.NotNull(p); + + Assert.True(p.IsBypassed(directUri)); + Assert.False(p.IsBypassed(thruProxyUri)); + Assert.Equal(new Uri(proxy), p.GetProxy(thruProxyUri)); + + return RemoteExecutor.SuccessExitCode; + }, proxy, options).Dispose(); + } + + public static IEnumerable HttpProxyCgiEnvVarMemberData() + { + foreach (bool cgi in new object[] { false, true }) + { + yield return new object[] { "http_proxy", cgi, true }; + yield return new object[] { "HTTP_PROXY", cgi, !cgi }; + } + } + + [Theory] + [MemberData(nameof(HttpProxyCgiEnvVarMemberData))] + [PlatformSpecific(~TestPlatforms.Windows)] + public void HttpProxy_TryCreateAndPossibleCgi_HttpProxyUpperCaseDisabledInCgi( + string proxyEnvVar, bool cgi, bool expectedProxyUse) + { + string proxy = "http://foo:bar@1.1.1.1:3000"; + + var options = new RemoteInvokeOptions(); + options.StartInfo.EnvironmentVariables.Add(proxyEnvVar, proxy); + if (cgi) + { + options.StartInfo.EnvironmentVariables.Add("GATEWAY_INTERFACE", "CGI/1.1"); + } + + RemoteExecutor.Invoke((proxy, expectedProxyUseString) => + { + bool expectedProxyUse = bool.Parse(expectedProxyUseString); + var destinationUri = new Uri("http://test.com"); + + bool created = HttpEnvironmentProxy.TryCreate(out IWebProxy p); + if (expectedProxyUse) + { + Assert.True(created); + Assert.NotNull(p); + Assert.Equal(new Uri(proxy), p.GetProxy(destinationUri)); + } + else + { + Assert.False(created); + } + + return RemoteExecutor.SuccessExitCode; + }, proxy, expectedProxyUse.ToString(), options).Dispose(); } } } diff --git a/src/System.Net.Http/tests/UnitTests/System.Net.Http.Unit.Tests.csproj b/src/System.Net.Http/tests/UnitTests/System.Net.Http.Unit.Tests.csproj index 1dd4c62be40c..b04639cdbabb 100644 --- a/src/System.Net.Http/tests/UnitTests/System.Net.Http.Unit.Tests.csproj +++ b/src/System.Net.Http/tests/UnitTests/System.Net.Http.Unit.Tests.csproj @@ -383,7 +383,7 @@ ProductionCode\System\Net\Http\WinInetProxyHelper.cs - ProductionCode\System\Net\Http\WinInetProxyHelper.cs + ProductionCode\System\Net\Http\WinHttpTraceHelper.cs Common\Interop\Windows\Interop.Libraries.cs @@ -407,22 +407,22 @@ Common\Interop\Windows\WinHttp\Interop.winhttp_types.cs - ProductionCode\System\Net\Http\WinInetProxyHelper.cs + WinHttpHandler\UnitTests\FakeInterop.cs - ProductionCode\System\Net\Http\WinInetProxyHelper.cs + WinHttpHandler\UnitTests\FakeRegistry.cs - ProductionCode\System\Net\Http\WinInetProxyHelper.cs + WinHttpHandler\UnitTests\FakeSafeWinHttpHandle.cs - ProductionCode\System\Net\Http\WinInetProxyHelper.cs + WinHttpHandler\UnitTests\TestControl.cs - ProductionCode\System\Net\Http\WinInetProxyHelper.cs + WinHttpHandler\UnitTests\APICallHistory.cs - ProductionCode\System\Net\Http\WinInetProxyHelper.cs + WinHttpHandler\UnitTests\TestServer.cs From 5f4dedeb0db50f7d5224fe29a9c6d27cf03fa26b Mon Sep 17 00:00:00 2001 From: Layomi Akinrinade Date: Fri, 26 Apr 2019 13:57:36 -0400 Subject: [PATCH 064/607] Fix DateTime(Offset) formatting bugs in Utf8JsonWriter (#37159) * Fix DateTime(Offset) formatting bugs in Utf8JsonWriter Fixes https://github.com/dotnet/corefx/issues/37147. - The period token was being omitted for some inputs. - Some offset tokens were being omitted for some inputs. * Address review feedback --- .../Text/Json/Writer/JsonWriterHelper.Date.cs | 23 ++++++++++--- .../tests/JsonDateTimeTestData.cs | 34 +++++++++++++++++++ .../tests/Utf8JsonWriterTests.cs | 34 +++++++++++++++++++ 3 files changed, 86 insertions(+), 5 deletions(-) diff --git a/src/System.Text.Json/src/System/Text/Json/Writer/JsonWriterHelper.Date.cs b/src/System.Text.Json/src/System/Text/Json/Writer/JsonWriterHelper.Date.cs index 76047a62d8ea..6b6a53228309 100644 --- a/src/System.Text.Json/src/System/Text/Json/Writer/JsonWriterHelper.Date.cs +++ b/src/System.Text.Json/src/System/Text/Json/Writer/JsonWriterHelper.Date.cs @@ -29,6 +29,11 @@ public static void TrimDateTimeOffset(Span buffer, out int bytesWritten) buffer.Length == (JsonConstants.MaximumFormatDateTimeLength + 1) || buffer.Length == JsonConstants.MaximumFormatDateTimeOffsetLength); + if (buffer.Length == JsonConstants.MaximumFormatDateTimeOffsetLength) + { + Debug.Assert(buffer[30] == JsonConstants.Colon); + } + uint digit7 = buffer[26] - (uint)'0'; uint digit6 = buffer[25] - (uint)'0'; uint digit5 = buffer[24] - (uint)'0'; @@ -61,7 +66,8 @@ public static void TrimDateTimeOffset(Span buffer, out int bytesWritten) int fractionEnd = 19 + numFractionDigits; // Write fraction - for (int i = fractionEnd; i >= curIndex; i--) + // Leading zeros are written because the fraction becomes zero when it's their turn + for (int i = fractionEnd; i > curIndex; i--) { buffer[i] = (byte)((fraction % 10) + (uint)'0'); fraction /= 10; @@ -89,11 +95,18 @@ public static void TrimDateTimeOffset(Span buffer, out int bytesWritten) // Last index of the offset int bufferEnd = curIndex + 5; + // Cache offset characters to prevent them from being overwritten + // The second minute digit is never at risk + byte offsetMinDigit1 = buffer[31]; + byte offsetHourDigit2 = buffer[29]; + byte offsetHourDigit1 = buffer[28]; + + // Write offset characters buffer[bufferEnd] = buffer[32]; - buffer[bufferEnd - 1] = buffer[31]; - buffer[bufferEnd - 2] = buffer[30]; - buffer[bufferEnd - 3] = buffer[29]; - buffer[bufferEnd - 4] = buffer[28]; + buffer[bufferEnd - 1] = offsetMinDigit1; + buffer[bufferEnd - 2] = JsonConstants.Colon; + buffer[bufferEnd - 3] = offsetHourDigit2; + buffer[bufferEnd - 4] = offsetHourDigit1; // bytes written is the last index of the offset + 1 bytesWritten = bufferEnd + 1; diff --git a/src/System.Text.Json/tests/JsonDateTimeTestData.cs b/src/System.Text.Json/tests/JsonDateTimeTestData.cs index f288ebdbc955..62dc132b3051 100644 --- a/src/System.Text.Json/tests/JsonDateTimeTestData.cs +++ b/src/System.Text.Json/tests/JsonDateTimeTestData.cs @@ -220,5 +220,39 @@ public static IEnumerable InvalidISO8601Tests() // Proper format but invalid calendar date, time, or time zone designator fields 1997-00-16 yield return new object[] { "\"\\u0031\\u0039\\u0039\\u0037\\u002d\\u0030\\u0030\\u002d\\u0031\\u0036\"" }; } + + public static IEnumerable DateTimeFractionTrimBaseTests() + { + yield return new object[] { "2019-04-24T14:50:17.0000000", "2019-04-24T14:50:17" }; + yield return new object[] { "2019-04-24T14:50:17.1000000", "2019-04-24T14:50:17.1" }; + yield return new object[] { "2019-04-24T14:50:17.1100000", "2019-04-24T14:50:17.11" }; + yield return new object[] { "2019-04-24T14:50:17.1110000", "2019-04-24T14:50:17.111" }; + yield return new object[] { "2019-04-24T14:50:17.1111000", "2019-04-24T14:50:17.1111" }; + yield return new object[] { "2019-04-24T14:50:17.1111100", "2019-04-24T14:50:17.11111" }; + yield return new object[] { "2019-04-24T14:50:17.1111110", "2019-04-24T14:50:17.111111" }; + yield return new object[] { "2019-04-24T14:50:17.1111111", "2019-04-24T14:50:17.1111111" }; + yield return new object[] { "2019-04-24T14:50:17.0000001", "2019-04-24T14:50:17.0000001" }; + yield return new object[] { "2019-04-24T14:50:17.0000010", "2019-04-24T14:50:17.000001" }; + yield return new object[] { "2019-04-24T14:50:17.0000100", "2019-04-24T14:50:17.00001" }; + yield return new object[] { "2019-04-24T14:50:17.0001000", "2019-04-24T14:50:17.0001" }; + yield return new object[] { "2019-04-24T14:50:17.0010000", "2019-04-24T14:50:17.001" }; + yield return new object[] { "2019-04-24T14:50:17.0100000", "2019-04-24T14:50:17.01" }; + } + + public static IEnumerable DateTimeFractionTrimUtcOffsetTests() + { + foreach (object[] test in DateTimeFractionTrimBaseTests()) + { + yield return new object[] { $"{(string)(test[0])}Z", $"{(string)(test[1])}Z" }; + } + } + + public static IEnumerable DateTimeOffsetFractionTrimTests() + { + foreach (object[] test in DateTimeFractionTrimBaseTests()) + { + yield return new object[] { $"{(string)(test[0])}+01:00", $"{(string)(test[1])}+01:00" }; + } + } } } diff --git a/src/System.Text.Json/tests/Utf8JsonWriterTests.cs b/src/System.Text.Json/tests/Utf8JsonWriterTests.cs index e47691fa4b2f..c965634d6ec2 100644 --- a/src/System.Text.Json/tests/Utf8JsonWriterTests.cs +++ b/src/System.Text.Json/tests/Utf8JsonWriterTests.cs @@ -3340,6 +3340,40 @@ public void WriteLargeKeyValue(bool formatted, bool skipValidation) WriteTooLargeHelper(options, key.Slice(0, 10_000_000 / 3), value.Slice(0, 10_000_000 / 3), noThrow: true); } + [Theory] + [MemberData(nameof(JsonDateTimeTestData.DateTimeFractionTrimBaseTests), MemberType = typeof(JsonDateTimeTestData))] + [MemberData(nameof(JsonDateTimeTestData.DateTimeFractionTrimUtcOffsetTests), MemberType = typeof(JsonDateTimeTestData))] + public void WriteDateTime_TrimsFractionCorrectly(string testStr, string expectedStr) + { + var output = new ArrayBufferWriter(1024); + using var jsonUtf8 = new Utf8JsonWriter(output); + + jsonUtf8.WriteStringValue(DateTime.ParseExact(testStr, "O", CultureInfo.InvariantCulture, DateTimeStyles.RoundtripKind)); + jsonUtf8.Flush(); + + AssertContents($"\"{expectedStr}\"", output); + } + + [Theory] + [MemberData(nameof(JsonDateTimeTestData.DateTimeOffsetFractionTrimTests), MemberType = typeof(JsonDateTimeTestData))] + public void WriteDateTimeOffset_TrimsFractionCorrectly(string testStr, string expectedStr) + { + var output = new ArrayBufferWriter(1024); + using var jsonUtf8 = new Utf8JsonWriter(output); + + jsonUtf8.WriteStringValue(DateTimeOffset.ParseExact(testStr, "O", CultureInfo.InvariantCulture, DateTimeStyles.RoundtripKind)); + jsonUtf8.Flush(); + + AssertContents($"\"{expectedStr}\"", output); + } + + [Fact] + public void WriteDateTime_TrimsFractionCorrectly_SerializerRoundtrip() + { + DateTime utcNow = DateTime.UtcNow; + Assert.Equal(utcNow, Serialization.JsonSerializer.Parse(Serialization.JsonSerializer.ToBytes(utcNow), typeof(DateTime))); + } + private static void WriteTooLargeHelper(JsonWriterOptions options, ReadOnlySpan key, ReadOnlySpan value, bool noThrow = false) { // Resizing is too slow, even for outerloop tests, so initialize to a large output size up front. From 4f781a4df027bc3cc80f034bf05ff4f93dd193d9 Mon Sep 17 00:00:00 2001 From: Tomas Weinfurt Date: Fri, 26 Apr 2019 11:00:41 -0700 Subject: [PATCH 065/607] deal with dualmode sockets (#37194) --- .../src/System/Net/FtpControlStream.cs | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/System.Net.Requests/src/System/Net/FtpControlStream.cs b/src/System.Net.Requests/src/System/Net/FtpControlStream.cs index 8653030bc2d1..6539ade62970 100644 --- a/src/System.Net.Requests/src/System/Net/FtpControlStream.cs +++ b/src/System.Net.Requests/src/System/Net/FtpControlStream.cs @@ -570,12 +570,12 @@ protected override PipelineEntry[] BuildCommandsList(WebRequest req) if (request.UsePassive) { - string passiveCommand = (ServerAddress.AddressFamily == AddressFamily.InterNetwork) ? "PASV" : "EPSV"; + string passiveCommand = (ServerAddress.AddressFamily == AddressFamily.InterNetwork || ServerAddress.IsIPv4MappedToIPv6) ? "PASV" : "EPSV"; commandList.Add(new PipelineEntry(FormatFtpCommand(passiveCommand, null), PipelineEntryFlags.CreateDataConnection)); } else { - string portCommand = (ServerAddress.AddressFamily == AddressFamily.InterNetwork) ? "PORT" : "EPRT"; + string portCommand = (ServerAddress.AddressFamily == AddressFamily.InterNetwork || ServerAddress.IsIPv4MappedToIPv6) ? "PORT" : "EPRT"; CreateFtpListenerSocket(request); commandList.Add(new PipelineEntry(FormatFtpCommand(portCommand, GetPortCommandLine(request)))); } @@ -645,6 +645,7 @@ private PipelineInstruction QueueOrCreateDataConection(PipelineEntry entry, Resp // Handle passive responses by parsing the port and later doing a Connect(...) bool isPassive = false; int port = -1; + if (entry.Command == "PASV\r\n" || entry.Command == "EPSV\r\n") { if (!response.PositiveCompletion) @@ -791,9 +792,9 @@ private string FormatAddress(IPAddress address, int Port) // produces a string in FTP IPAddress/Port encoding (a1, a2, a3, a4, p1, p2), for sending as a parameter // to the port command. StringBuilder sb = new StringBuilder(32); - foreach (byte element in localAddressInBytes) + for (int i = address.IsIPv4MappedToIPv6 ? 12 : 0; i < localAddressInBytes.Length; i++) { - sb.Append(element); + sb.Append(localAddressInBytes[i]); sb.Append(','); } sb.Append(Port / 256); @@ -1100,7 +1101,7 @@ private string GetPortCommandLine(FtpWebRequest request) { // retrieves the IP address of the local endpoint IPEndPoint localEP = (IPEndPoint)_dataSocket.LocalEndPoint; - if (ServerAddress.AddressFamily == AddressFamily.InterNetwork) + if (ServerAddress.AddressFamily == AddressFamily.InterNetwork || ServerAddress.IsIPv4MappedToIPv6) { return FormatAddress(localEP.Address, localEP.Port); } @@ -1144,6 +1145,11 @@ protected Socket CreateFtpDataSocket(FtpWebRequest request, Socket templateSocke { // Safe to be called under an Assert. Socket socket = new Socket(templateSocket.AddressFamily, templateSocket.SocketType, templateSocket.ProtocolType); + if (templateSocket.AddressFamily == AddressFamily.InterNetworkV6 && templateSocket.DualMode) + { + socket.DualMode = true; + } + return socket; } From a612f42c3310f4c66abc0aafc9d6a6a55b07334a Mon Sep 17 00:00:00 2001 From: Tomas Weinfurt Date: Fri, 26 Apr 2019 11:01:37 -0700 Subject: [PATCH 066/607] update GatewayAddresses() to return IPv6 address on Unix (#37132) * process IPv6 for GatewayAddresses * fix GatewayAddresses for OSX and FreeBSD * feedback from review * feedback from review * add updated ipv6_route for tests * feedback from review --- .../System.Native/pal_interfaceaddresses.c | 50 +++++++++++++--- .../BsdIpInterfaceProperties.cs | 5 ++ .../NetworkInformation/BsdNetworkInterface.cs | 14 +++-- .../LinuxIPInterfaceProperties.cs | 17 +++++- .../LinuxNetworkInterface.cs | 17 +++--- .../StringParsingHelpers.Addresses.cs | 60 ++++++++++++++++--- .../StringParsingHelpers.Connections.cs | 26 +++++--- .../FunctionalTests/AddressParsingTests.cs | 32 +++++++++- .../FunctionalTests/NetworkFiles/ipv6_route | 3 + 9 files changed, 183 insertions(+), 41 deletions(-) diff --git a/src/Native/Unix/System.Native/pal_interfaceaddresses.c b/src/Native/Unix/System.Native/pal_interfaceaddresses.c index 3e5d045da144..3213fc1b18b0 100644 --- a/src/Native/Unix/System.Native/pal_interfaceaddresses.c +++ b/src/Native/Unix/System.Native/pal_interfaceaddresses.c @@ -161,7 +161,8 @@ int32_t SystemNative_EnumerateInterfaceAddresses(IPv4AddressFound onIpv4Found, #if HAVE_RT_MSGHDR int32_t SystemNative_EnumerateGatewayAddressesForInterface(uint32_t interfaceIndex, GatewayAddressFound onGatewayFound) { - int routeDumpName[] = {CTL_NET, AF_ROUTE, 0, AF_INET, NET_RT_DUMP, 0}; + static struct in6_addr anyaddr = IN6ADDR_ANY_INIT; + int routeDumpName[] = {CTL_NET, AF_ROUTE, 0, 0, NET_RT_DUMP, 0}; size_t byteCount; @@ -195,15 +196,50 @@ int32_t SystemNative_EnumerateGatewayAddressesForInterface(uint32_t interfaceInd int isGateway = flags & RTF_GATEWAY; int gatewayPresent = hdr->rtm_addrs & RTA_GATEWAY; - if (isGateway && gatewayPresent) + if (isGateway && gatewayPresent && ((int)interfaceIndex == -1 || interfaceIndex == hdr->rtm_index)) { IpAddressInfo iai; + struct sockaddr_storage* sock = (struct sockaddr_storage*)(hdr + 1); memset(&iai, 0, sizeof(IpAddressInfo)); - iai.InterfaceIndex = interfaceIndex; - iai.NumAddressBytes = NUM_BYTES_IN_IPV4_ADDRESS; - struct sockaddr_in* sain = (struct sockaddr_in*)(hdr + 1); - sain = sain + 1; // Skip over the first sockaddr, the destination address. The second is the gateway. - memcpy_s(iai.AddressBytes, sizeof_member(IpAddressInfo, AddressBytes), &sain->sin_addr.s_addr, sizeof(sain->sin_addr.s_addr)); + iai.InterfaceIndex = hdr->rtm_index; + + if (sock->ss_family == AF_INET) + { + iai.NumAddressBytes = NUM_BYTES_IN_IPV4_ADDRESS; + struct sockaddr_in* sain = (struct sockaddr_in*)sock; + if (sain->sin_addr.s_addr != 0) + { + // filter out normal routes. + continue; + } + + sain = sain + 1; // Skip over the first sockaddr, the destination address. The second is the gateway. + memcpy_s(iai.AddressBytes, sizeof_member(IpAddressInfo, AddressBytes), &sain->sin_addr.s_addr, sizeof(sain->sin_addr.s_addr)); + } + else if (sock->ss_family == AF_INET6) + { + struct sockaddr_in6* sain6 = (struct sockaddr_in6*)sock; + iai.NumAddressBytes = NUM_BYTES_IN_IPV6_ADDRESS; + if (memcmp(&anyaddr, &sain6->sin6_addr, sizeof(sain6->sin6_addr)) != 0) + { + // filter out normal routes. + continue; + } + + sain6 = sain6 + 1; // Skip over the first sockaddr, the destination address. The second is the gateway. + if ((sain6->sin6_addr.__u6_addr.__u6_addr16[0] & htons(0xfe80)) == htons(0xfe80)) + { + // clear embedded if index. + sain6->sin6_addr.__u6_addr.__u6_addr16[1] = 0; + } + + memcpy_s(iai.AddressBytes, sizeof_member(IpAddressInfo, AddressBytes), &sain6->sin6_addr, sizeof(sain6->sin6_addr)); + } + else + { + // Ignore other address families. + continue; + } onGatewayFound(&iai); } } diff --git a/src/System.Net.NetworkInformation/src/System/Net/NetworkInformation/BsdIpInterfaceProperties.cs b/src/System.Net.NetworkInformation/src/System/Net/NetworkInformation/BsdIpInterfaceProperties.cs index d4efea31620b..dc53e28dee75 100644 --- a/src/System.Net.NetworkInformation/src/System/Net/NetworkInformation/BsdIpInterfaceProperties.cs +++ b/src/System.Net.NetworkInformation/src/System/Net/NetworkInformation/BsdIpInterfaceProperties.cs @@ -54,6 +54,11 @@ private static unsafe GatewayIPAddressInformationCollection GetGatewayAddresses( Buffer.MemoryCopy(gatewayAddressInfo->AddressBytes, ipArrayPtr, ipBytes.Length, ipBytes.Length); } IPAddress ipAddress = new IPAddress(ipBytes); + if (ipAddress.IsIPv6LinkLocal) + { + // For Link-Local addresses add ScopeId as that is not part of the route entry. + ipAddress.ScopeId = interfaceIndex; + } addressSet.Add(ipAddress); }) == -1) { diff --git a/src/System.Net.NetworkInformation/src/System/Net/NetworkInformation/BsdNetworkInterface.cs b/src/System.Net.NetworkInformation/src/System/Net/NetworkInformation/BsdNetworkInterface.cs index 63d83857c106..25f8867f9b78 100644 --- a/src/System.Net.NetworkInformation/src/System/Net/NetworkInformation/BsdNetworkInterface.cs +++ b/src/System.Net.NetworkInformation/src/System/Net/NetworkInformation/BsdNetworkInterface.cs @@ -14,8 +14,9 @@ internal class BsdNetworkInterface : UnixNetworkInterface private readonly bool _supportsMulticast; private readonly long _speed; - protected unsafe BsdNetworkInterface(string name) : base(name) + protected unsafe BsdNetworkInterface(string name, int index) : base(name) { + _index = index; Interop.Sys.NativeIPInterfaceStatistics nativeStats; if (Interop.Sys.GetNativeIPInterfaceStatistics(name, out nativeStats) == -1) { @@ -51,7 +52,7 @@ public static unsafe NetworkInterface[] GetBsdNetworkInterfaces() { try { - BsdNetworkInterface oni = GetOrCreate(interfacesByName, name); + BsdNetworkInterface oni = GetOrCreate(interfacesByName, name, ipAddr->InterfaceIndex); oni.ProcessIpv4Address(ipAddr, maskAddr); } catch (Exception e) @@ -67,7 +68,7 @@ public static unsafe NetworkInterface[] GetBsdNetworkInterfaces() { try { - BsdNetworkInterface oni = GetOrCreate(interfacesByName, name); + BsdNetworkInterface oni = GetOrCreate(interfacesByName, name, ipAddr->InterfaceIndex); oni.ProcessIpv6Address(ipAddr, *scopeId); } catch (Exception e) @@ -83,7 +84,7 @@ public static unsafe NetworkInterface[] GetBsdNetworkInterfaces() { try { - BsdNetworkInterface oni = GetOrCreate(interfacesByName, name); + BsdNetworkInterface oni = GetOrCreate(interfacesByName, name, llAddr->InterfaceIndex); oni.ProcessLinkLayerAddress(llAddr); } catch (Exception e) @@ -118,13 +119,14 @@ public static unsafe NetworkInterface[] GetBsdNetworkInterfaces() /// /// The Dictionary of existing interfaces. /// The name of the interface. + /// Interface index of the interface. /// The cached or new BsdNetworkInterface with the given name. - private static BsdNetworkInterface GetOrCreate(Dictionary interfaces, string name) + private static BsdNetworkInterface GetOrCreate(Dictionary interfaces, string name, int index) { BsdNetworkInterface oni; if (!interfaces.TryGetValue(name, out oni)) { - oni = new BsdNetworkInterface(name); + oni = new BsdNetworkInterface(name, index); interfaces.Add(name, oni); } diff --git a/src/System.Net.NetworkInformation/src/System/Net/NetworkInformation/LinuxIPInterfaceProperties.cs b/src/System.Net.NetworkInformation/src/System/Net/NetworkInformation/LinuxIPInterfaceProperties.cs index ba7f5e0b2f5b..d18953caea36 100644 --- a/src/System.Net.NetworkInformation/src/System/Net/NetworkInformation/LinuxIPInterfaceProperties.cs +++ b/src/System.Net.NetworkInformation/src/System/Net/NetworkInformation/LinuxIPInterfaceProperties.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System.Collections.Generic; +using System.IO; namespace System.Net.NetworkInformation { @@ -50,9 +51,19 @@ public override IPv6InterfaceProperties GetIPv6Properties() // and separates the information about by each interface. public GatewayIPAddressInformationCollection GetGatewayAddresses() { - List innerCollection - = StringParsingHelpers.ParseGatewayAddressesFromRouteFile(NetworkFiles.Ipv4RouteFile, _linuxNetworkInterface.Name); - return new GatewayIPAddressInformationCollection(innerCollection); + List collection = new List(); + + if (File.Exists(NetworkFiles.Ipv4RouteFile)) + { + StringParsingHelpers.ParseIPv4GatewayAddressesFromRouteFile(collection, NetworkFiles.Ipv4RouteFile, _linuxNetworkInterface.Name); + } + + if (File.Exists(NetworkFiles.Ipv6RouteFile)) + { + StringParsingHelpers.ParseIPv6GatewayAddressesFromRouteFile(collection, NetworkFiles.Ipv6RouteFile, _linuxNetworkInterface.Name, _linuxNetworkInterface.Index); + } + + return new GatewayIPAddressInformationCollection(collection); } private IPAddressCollection GetDhcpServerAddresses() diff --git a/src/System.Net.NetworkInformation/src/System/Net/NetworkInformation/LinuxNetworkInterface.cs b/src/System.Net.NetworkInformation/src/System/Net/NetworkInformation/LinuxNetworkInterface.cs index 0d9dc1d7e688..dcd9c75f1c5f 100644 --- a/src/System.Net.NetworkInformation/src/System/Net/NetworkInformation/LinuxNetworkInterface.cs +++ b/src/System.Net.NetworkInformation/src/System/Net/NetworkInformation/LinuxNetworkInterface.cs @@ -18,8 +18,9 @@ internal class LinuxNetworkInterface : UnixNetworkInterface private readonly long? _speed; private readonly LinuxIPInterfaceProperties _ipProperties; - internal LinuxNetworkInterface(string name) : base(name) + internal LinuxNetworkInterface(string name, int index) : base(name) { + _index = index; _operationalStatus = GetOperationalStatus(name); _supportsMulticast = GetSupportsMulticast(name); _speed = GetSpeed(name); @@ -31,17 +32,18 @@ public static unsafe NetworkInterface[] GetLinuxNetworkInterfaces() Dictionary interfacesByName = new Dictionary(); List exceptions = null; const int MaxTries = 3; + for (int attempt = 0; attempt < MaxTries; attempt++) { // Because these callbacks are executed in a reverse-PInvoke, we do not want any exceptions - // to propogate out, because they will not be catchable. Instead, we track all the exceptions + // to propagate out, because they will not be catchable. Instead, we track all the exceptions // that are thrown in these callbacks, and aggregate them at the end. int result = Interop.Sys.EnumerateInterfaceAddresses( (name, ipAddr, maskAddr) => { try { - LinuxNetworkInterface lni = GetOrCreate(interfacesByName, name); + LinuxNetworkInterface lni = GetOrCreate(interfacesByName, name, ipAddr->InterfaceIndex); lni.ProcessIpv4Address(ipAddr, maskAddr); } catch (Exception e) @@ -57,7 +59,7 @@ public static unsafe NetworkInterface[] GetLinuxNetworkInterfaces() { try { - LinuxNetworkInterface lni = GetOrCreate(interfacesByName, name); + LinuxNetworkInterface lni = GetOrCreate(interfacesByName, name, ipAddr->InterfaceIndex); lni.ProcessIpv6Address(ipAddr, *scopeId); } catch (Exception e) @@ -73,7 +75,7 @@ public static unsafe NetworkInterface[] GetLinuxNetworkInterfaces() { try { - LinuxNetworkInterface lni = GetOrCreate(interfacesByName, name); + LinuxNetworkInterface lni = GetOrCreate(interfacesByName, name, llAddr->InterfaceIndex); lni.ProcessLinkLayerAddress(llAddr); } catch (Exception e) @@ -108,13 +110,14 @@ public static unsafe NetworkInterface[] GetLinuxNetworkInterfaces() /// /// The Dictionary of existing interfaces. /// The name of the interface. + /// Interafce index of the interface. /// The cached or new LinuxNetworkInterface with the given name. - private static LinuxNetworkInterface GetOrCreate(Dictionary interfaces, string name) + private static LinuxNetworkInterface GetOrCreate(Dictionary interfaces, string name, int index) { LinuxNetworkInterface lni; if (!interfaces.TryGetValue(name, out lni)) { - lni = new LinuxNetworkInterface(name); + lni = new LinuxNetworkInterface(name, index); interfaces.Add(name, lni); } diff --git a/src/System.Net.NetworkInformation/src/System/Net/NetworkInformation/StringParsingHelpers.Addresses.cs b/src/System.Net.NetworkInformation/src/System/Net/NetworkInformation/StringParsingHelpers.Addresses.cs index ee8fa7907391..7dfcf1e91b43 100644 --- a/src/System.Net.NetworkInformation/src/System/Net/NetworkInformation/StringParsingHelpers.Addresses.cs +++ b/src/System.Net.NetworkInformation/src/System/Net/NetworkInformation/StringParsingHelpers.Addresses.cs @@ -9,16 +9,11 @@ namespace System.Net.NetworkInformation { internal static partial class StringParsingHelpers { + private static char[] s_delimiter = new char[1] { ' ' }; // /proc/net/route contains some information about gateway addresses, // and separates the information about by each interface. - internal static List ParseGatewayAddressesFromRouteFile(string filePath, string interfaceName) + internal static List ParseIPv4GatewayAddressesFromRouteFile(List collection, string filePath, string interfaceName) { - if (!File.Exists(filePath)) - { - throw ExceptionHelper.CreateForInformationUnavailable(); - } - - List collection = new List(); // Columns are as follows (first-line header): // Iface Destination Gateway Flags RefCnt Use Metric Mask MTU Window IRTT string[] fileLines = File.ReadAllLines(filePath); @@ -31,14 +26,61 @@ internal static List ParseGatewayAddressesFromRoute parser.MoveNextOrFail(); string gatewayIPHex = parser.MoveAndExtractNext(); long addressValue = Convert.ToInt64(gatewayIPHex, 16); - IPAddress address = new IPAddress(addressValue); - collection.Add(new SimpleGatewayIPAddressInformation(address)); + if (addressValue != 0) + { + // Skip device routes without valid NextHop IP address. + IPAddress address = new IPAddress(addressValue); + collection.Add(new SimpleGatewayIPAddressInformation(address)); + } } } return collection; } + internal static void ParseIPv6GatewayAddressesFromRouteFile(List collection, string filePath, string interfaceName, long scopeId) + { + // Columns are as follows (first-line header): + // 00000000000000000000000000000000 00 00000000000000000000000000000000 00 00000000000000000000000000000000 ffffffff 00000001 00000001 00200200 lo + // +------------------------------+ ++ +------------------------------+ ++ +------------------------------+ +------+ +------+ +------+ +------+ ++ + // | | | | | | | | | | + // 0 1 2 3 4 5 6 7 8 9 + // + // 0. IPv6 destination network displayed in 32 hexadecimal chars without colons as separator + // 1. IPv6 destination prefix length in hexadecimal + // 2. IPv6 source network displayed in 32 hexadecimal chars without colons as separator + // 3. IPv6 source prefix length in hexadecimal + // 4. IPv6 next hop displayed in 32 hexadecimal chars without colons as separator + // 5. Metric in hexadecimal + // 6. Reference counter + // 7. Use counter + // 8. Flags + // 9. Interface name + string[] fileLines = File.ReadAllLines(filePath); + foreach (string line in fileLines) + { + if (line.StartsWith("00000000000000000000000000000000")) + { + string[] token = line.Split(s_delimiter, StringSplitOptions.RemoveEmptyEntries); + if (token.Length > 9 && token[4] != "00000000000000000000000000000000") + { + if (!string.IsNullOrEmpty(interfaceName) && interfaceName != token[9]) + { + continue; + } + + IPAddress address = ParseIPv6HexString(token[4], isNetworkOrder: true); + if (address.IsIPv6LinkLocal) + { + // For Link-Local addresses add ScopeId as that is not part of the route entry. + address.ScopeId = scopeId; + } + collection.Add(new SimpleGatewayIPAddressInformation(address)); + } + } + } + } + internal static List ParseDhcpServerAddressesFromLeasesFile(string filePath, string name) { // Parse the /var/lib/dhcp/dhclient.leases file, if it exists. diff --git a/src/System.Net.NetworkInformation/src/System/Net/NetworkInformation/StringParsingHelpers.Connections.cs b/src/System.Net.NetworkInformation/src/System/Net/NetworkInformation/StringParsingHelpers.Connections.cs index 7dd40105cebb..edbdcb96ec69 100644 --- a/src/System.Net.NetworkInformation/src/System/Net/NetworkInformation/StringParsingHelpers.Connections.cs +++ b/src/System.Net.NetworkInformation/src/System/Net/NetworkInformation/StringParsingHelpers.Connections.cs @@ -287,24 +287,36 @@ private static IPAddress ParseIPv4HexString(string hexAddress) } // Parses a 128-bit IPv6 Address stored as 4 concatenated 32-bit hex numbers. + // If isSequence is true it assumes that hexAddress is in sequence of IPv6 bytes. // First number corresponds to lower address part // E.g. IP-address: fe80::215:5dff:fe00:402 // It's bytes in direct order: FE-80-00-00 00-00-00-00 02-15-5D-FF FE-00-04-02 // It's represenation in /proc/net/tcp6: 00-00-80-FE 00-00-00-00 FF-5D-15-02 02-04-00-FE // (dashes and spaces added above for readability) // Strings passed to this must be 32 characters in length. - private static IPAddress ParseIPv6HexString(string hexAddress) + private static IPAddress ParseIPv6HexString(string hexAddress, bool isNetworkOrder = false) { Debug.Assert(hexAddress.Length == 32); byte[] addressBytes = new byte[16]; - for (int i = 0; i < 4; i++) + if (isNetworkOrder) { - for (int j = 0; j < 4; j++) + for (int i = 0; i < 16; i++) { - int srcIndex = i * 4 + 3 - j; - int targetIndex = i * 4 + j; - addressBytes[targetIndex] = (byte)(HexToByte(hexAddress[srcIndex * 2]) * 16 - + HexToByte(hexAddress[srcIndex * 2 + 1])); + addressBytes[i] = (byte)(HexToByte(hexAddress[(i * 2)]) * 16 + + HexToByte(hexAddress[(i * 2) + 1])); + } + } + else + { + for (int i = 0; i < 4; i++) + { + for (int j = 0; j < 4; j++) + { + int srcIndex = i * 4 + 3 - j; + int targetIndex = i * 4 + j; + addressBytes[targetIndex] = (byte)(HexToByte(hexAddress[srcIndex * 2]) * 16 + + HexToByte(hexAddress[srcIndex * 2 + 1])); + } } } diff --git a/src/System.Net.NetworkInformation/tests/FunctionalTests/AddressParsingTests.cs b/src/System.Net.NetworkInformation/tests/FunctionalTests/AddressParsingTests.cs index 9ab0494d9bfe..9c305b464a1a 100644 --- a/src/System.Net.NetworkInformation/tests/FunctionalTests/AddressParsingTests.cs +++ b/src/System.Net.NetworkInformation/tests/FunctionalTests/AddressParsingTests.cs @@ -25,11 +25,12 @@ public void HexIPAddressParsing() } [Fact] - public void GatewayAddressParsing() + public void IPv4GatewayAddressParsing() { string fileName = GetTestFilePath(); FileUtil.NormalizeLineEndings("NetworkFiles/route", fileName); - List gatewayAddresses = StringParsingHelpers.ParseGatewayAddressesFromRouteFile(fileName, "wlan0"); + List gatewayAddresses = new List(); + StringParsingHelpers.ParseIPv4GatewayAddressesFromRouteFile(gatewayAddresses, fileName, "wlan0"); Assert.Equal(3, gatewayAddresses.Count); Assert.Equal(IPAddress.Parse("10.105.128.1"), gatewayAddresses[0].Address); @@ -37,6 +38,33 @@ public void GatewayAddressParsing() Assert.Equal(IPAddress.Parse("152.186.220.254"), gatewayAddresses[2].Address); } + [Fact] + public void IPv6GatewayAddressParsing() + { + string fileName = GetTestFilePath(); + FileUtil.NormalizeLineEndings("NetworkFiles/ipv6_route", fileName); + List gatewayAddresses = new List(); + StringParsingHelpers.ParseIPv6GatewayAddressesFromRouteFile(gatewayAddresses, fileName, "lo", 42); + Assert.Equal(0, gatewayAddresses.Count); + + StringParsingHelpers.ParseIPv6GatewayAddressesFromRouteFile(gatewayAddresses, fileName, "foo", 42); + Assert.Equal(0, gatewayAddresses.Count); + + StringParsingHelpers.ParseIPv6GatewayAddressesFromRouteFile(gatewayAddresses, fileName, "enp0s5", 42); + Assert.Equal(2, gatewayAddresses.Count); + + Assert.Equal(IPAddress.Parse("2002:2c26:f4e4:0:21c:42ff:fe20:4636"), gatewayAddresses[0].Address); + Assert.Equal(IPAddress.Parse("fe80::21c:42ff:fe00:18%42"), gatewayAddresses[1].Address); + + gatewayAddresses = new List(); + StringParsingHelpers.ParseIPv6GatewayAddressesFromRouteFile(gatewayAddresses, fileName, "wlan0", 21); + Assert.Equal(IPAddress.Parse("fe80::21c:42ff:fe00:18%21"), gatewayAddresses[0].Address); + + gatewayAddresses = new List(); + StringParsingHelpers.ParseIPv6GatewayAddressesFromRouteFile(gatewayAddresses, fileName, null, 0); + Assert.Equal(3, gatewayAddresses.Count); + } + [Fact] public void DhcpServerAddressParsing() { diff --git a/src/System.Net.NetworkInformation/tests/FunctionalTests/NetworkFiles/ipv6_route b/src/System.Net.NetworkInformation/tests/FunctionalTests/NetworkFiles/ipv6_route index 7c274818fd25..c75533a04437 100644 --- a/src/System.Net.NetworkInformation/tests/FunctionalTests/NetworkFiles/ipv6_route +++ b/src/System.Net.NetworkInformation/tests/FunctionalTests/NetworkFiles/ipv6_route @@ -4,3 +4,6 @@ fe800000000000000000000000000000 40 00000000000000000000000000000000 00 00000000 fe80000000000000aefdcefffe7ca67d 80 00000000000000000000000000000000 00 00000000000000000000000000000000 00000000 00000001 00000000 80200001 lo ff000000000000000000000000000000 08 00000000000000000000000000000000 00 00000000000000000000000000000000 00000100 00000000 00000000 00000001 wlan0 00000000000000000000000000000000 00 00000000000000000000000000000000 00 00000000000000000000000000000000 ffffffff 00000001 0000000f 00200200 lo +00000000000000000000000000000000 00 00000000000000000000000000000000 00 20022c26f4e40000021c42fffe204636 00000400 00000002 00000087 00450003 enp0s5 +00000000000000000000000000000000 00 00000000000000000000000000000000 00 fe80000000000000021c42fffe000018 00000400 00000002 00000087 00450003 enp0s5 +00000000000000000000000000000000 00 00000000000000000000000000000000 00 fe80000000000000021c42fffe000018 00000400 00000002 00000087 00450003 wlan0 From e95b369aa20d551cef59f7bda3aff0ddbd4119c7 Mon Sep 17 00:00:00 2001 From: Tomas Weinfurt Date: Fri, 26 Apr 2019 11:02:06 -0700 Subject: [PATCH 067/607] deal with empty response headers for HTTP2 (#37160) * deal with empty response headers for HTTP2 * fix test for http1.1 * feedback from review * feedback from review --- .../SocketsHttpHandler/HPack/HPackDecoder.cs | 29 ++++++++++++++----- .../HttpClientHandlerTest.Headers.cs | 24 +++++++++++++++ .../HttpClientHandlerTest.TrailingHeaders.cs | 8 +++-- 3 files changed, 52 insertions(+), 9 deletions(-) diff --git a/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HPack/HPackDecoder.cs b/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HPack/HPackDecoder.cs index bc39b721a30e..c1d4ab07bc80 100644 --- a/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HPack/HPackDecoder.cs +++ b/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HPack/HPackDecoder.cs @@ -260,7 +260,15 @@ public void Decode(ReadOnlySpan data, HeaderCallback onHeader, object onHe if (_integerDecoder.StartDecode((byte)(b & ~HuffmanMask), StringLengthPrefix)) { - OnStringLength(_integerDecoder.Value, nextState: State.HeaderValue); + if (_integerDecoder.Value > 0) + { + OnStringLength(_integerDecoder.Value, nextState: State.HeaderValue); + } + else + { + OnStringLength(_integerDecoder.Value, nextState: State.Ready); + OnHeaderComplete(onHeader, onHeaderState, new ReadOnlySpan(_headerName, 0, _headerNameLength), new ReadOnlySpan()); + } } else { @@ -285,12 +293,7 @@ public void Decode(ReadOnlySpan data, HeaderCallback onHeader, object onHe var headerNameSpan = new ReadOnlySpan(_headerName, 0, _headerNameLength); var headerValueSpan = new ReadOnlySpan(_headerValueOctets, 0, _headerValueLength); - onHeader(onHeaderState, headerNameSpan, headerValueSpan); - - if (_index) - { - _dynamicTable.Insert(headerNameSpan, headerValueSpan); - } + OnHeaderComplete(onHeader, onHeaderState, headerNameSpan, headerValueSpan); } break; @@ -389,6 +392,18 @@ int Decode(byte[] dst) _state = nextState; } + // Called when we have complete header with name and value. + private void OnHeaderComplete(HeaderCallback onHeader, object onHeaderState, ReadOnlySpan headerName, ReadOnlySpan headerValue) + { + // Call provided callback. + onHeader(onHeaderState, headerName, headerValue); + + if (_index) + { + _dynamicTable.Insert(headerName, headerValue); + } + } + private HeaderField GetHeader(int index) { try diff --git a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Headers.cs b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Headers.cs index 9f8d33f86a19..edac8e089446 100644 --- a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Headers.cs +++ b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Headers.cs @@ -97,6 +97,30 @@ await LoopbackServerFactory.CreateClientAndServerAsync(async uri => }); } + [Fact] + public async Task GetAsync_EmptyResponseHeader_Success() + { + IList headers = new HttpHeaderData[] { + new HttpHeaderData("x-test", "SendAsync_EmptyHeader_Success"), + new HttpHeaderData("x-empty", ""), + new HttpHeaderData("x-last", "bye") }; + + await LoopbackServerFactory.CreateClientAndServerAsync(async uri => + { + using (HttpClient client = CreateHttpClient()) + { + HttpResponseMessage response = await client.GetAsync(uri).ConfigureAwait(false); + // HTTP/1.1 LoopbackServer adds Connection: close and Date to responses. + Assert.Equal(UseHttp2LoopbackServer ? headers.Count : headers.Count + 2, response.Headers.Count()); + Assert.NotNull(response.Headers.GetValues("x-empty")); + } + }, + async server => + { + HttpRequestData requestData = await server.HandleRequestAsync(HttpStatusCode.OK, headers); + }); + } + [Fact] public async Task GetAsync_MissingExpires_ReturnNull() { diff --git a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.TrailingHeaders.cs b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.TrailingHeaders.cs index 08b436c2bfc5..557dad56b68f 100644 --- a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.TrailingHeaders.cs +++ b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.TrailingHeaders.cs @@ -19,7 +19,9 @@ public abstract class HttpClientHandlerTest_TrailingHeaders_Test : HttpClientHan { private static byte[] s_dataBytes = Encoding.ASCII.GetBytes("data"); private static IList s_trailingHeaders = new HttpHeaderData[] { - new HttpHeaderData("MyCoolTrailerHeader", "amazingtrailer"), new HttpHeaderData("Hello", "World") }; + new HttpHeaderData("MyCoolTrailerHeader", "amazingtrailer"), + new HttpHeaderData("EmptyHeader", ""), + new HttpHeaderData("Hello", "World") }; private static Frame MakeDataFrame(int streamId, byte[] data, bool endStream = false) => new DataFrame(data, (endStream ? FrameFlags.EndStream : FrameFlags.None), 0, streamId); @@ -278,6 +280,7 @@ public async Task Http2GetAsync_MissingTrailer_TrailingHeadersAccepted() HttpResponseMessage response = await sendTask; Assert.Equal(HttpStatusCode.OK, response.StatusCode); + Assert.Equal(s_trailingHeaders.Count, response.TrailingHeaders.Count()); Assert.Contains("amazingtrailer", response.TrailingHeaders.GetValues("MyCoolTrailerHeader")); Assert.Contains("World", response.TrailingHeaders.GetValues("Hello")); } @@ -343,6 +346,7 @@ public async Task Http2GetAsyncResponseHeadersReadOption_TrailingHeaders_Availab // Read data until EOF is reached while (stream.Read(data, 0, data.Length) != 0); + Assert.Equal(s_trailingHeaders.Count, response.TrailingHeaders.Count()); Assert.Contains("amazingtrailer", response.TrailingHeaders.GetValues("MyCoolTrailerHeader")); Assert.Contains("World", response.TrailingHeaders.GetValues("Hello")); } @@ -366,7 +370,7 @@ public async Task Http2GetAsync_TrailerHeaders_TrailingHeaderNoBody() HttpResponseMessage response = await sendTask; Assert.Equal(HttpStatusCode.OK, response.StatusCode); - + Assert.Equal(s_trailingHeaders.Count, response.TrailingHeaders.Count()); Assert.Contains("amazingtrailer", response.TrailingHeaders.GetValues("MyCoolTrailerHeader")); Assert.Contains("World", response.TrailingHeaders.GetValues("Hello")); } From c5bb6abec986627f90b2e7e648dc4e733cdbf63b Mon Sep 17 00:00:00 2001 From: Steve Harter Date: Fri, 26 Apr 2019 11:59:28 -0700 Subject: [PATCH 068/607] Add serializer support for IDictionary non-primitive types (#37186) --- .../src/System.Text.Json.csproj | 2 +- .../JsonClassInfo.AddProperty.cs | 12 + .../Text/Json/Serialization/JsonClassInfo.cs | 13 +- .../Json/Serialization/JsonPropertyInfo.cs | 4 +- .../Serialization/JsonPropertyInfoCommon.cs | 10 +- .../JsonPropertyInfoNotNullable.cs | 3 +- .../Serialization/JsonPropertyInfoNullable.cs | 1 - .../JsonSerializer.Read.HandleArray.cs | 97 ++++----- .../JsonSerializer.Read.HandleNull.cs | 6 +- .../JsonSerializer.Read.HandleObject.cs | 52 ++++- .../JsonSerializer.Read.HandleValue.cs | 2 +- .../Json/Serialization/JsonSerializer.Read.cs | 4 +- .../JsonSerializer.Write.HandleDictionary.cs | 69 +++--- .../JsonSerializer.Write.HandleEnumerable.cs | 15 +- .../JsonSerializer.Write.HandleObject.cs | 14 +- .../Text/Json/Serialization/ReadStackFrame.cs | 153 ++++++------- .../Text/Json/Serialization/WriteStack.cs | 8 +- .../Json/Serialization/WriteStackFrame.cs | 124 ++++++++--- .../tests/Serialization/DictionaryTests.cs | 205 ++++++++++++++++-- .../tests/Serialization/PolymorphicTests.cs | 11 +- ...estClasses.SimpleTestClassWithNullables.cs | 11 +- 21 files changed, 534 insertions(+), 282 deletions(-) diff --git a/src/System.Text.Json/src/System.Text.Json.csproj b/src/System.Text.Json/src/System.Text.Json.csproj index 5070433915f0..28d6bbc83b74 100644 --- a/src/System.Text.Json/src/System.Text.Json.csproj +++ b/src/System.Text.Json/src/System.Text.Json.csproj @@ -17,7 +17,6 @@ - @@ -90,6 +89,7 @@ + diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonClassInfo.AddProperty.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonClassInfo.AddProperty.cs index a9c5c5a9aa1d..df4f992522e8 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonClassInfo.AddProperty.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonClassInfo.AddProperty.cs @@ -9,6 +9,18 @@ namespace System.Text.Json.Serialization { internal partial class JsonClassInfo { + private JsonPropertyInfo AddPolicyProperty(Type propertyType, JsonSerializerOptions options) + { + // A policy property is not a real property on a type; instead it leverages the existing converter + // logic and generic support to avoid boxing. It is used with values types and elements from collections and + // dictionaries. Typically it would represent a CLR type such as System.String. + return AddProperty( + propertyType, + propertyInfo : null, // Not a real property so this is null. + classType : typeof(object), // A dummy type (not used). + options : options); + + } private JsonPropertyInfo AddProperty(Type propertyType, PropertyInfo propertyInfo, Type classType, JsonSerializerOptions options) { JsonPropertyInfo jsonInfo = CreateProperty(propertyType, propertyType, propertyInfo, classType, options); diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonClassInfo.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonClassInfo.cs index d26b4ec1e6bc..a4f81226095e 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonClassInfo.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonClassInfo.cs @@ -114,7 +114,7 @@ internal JsonClassInfo(Type type, JsonSerializerOptions options) else if (ClassType == ClassType.Enumerable || ClassType == ClassType.Dictionary) { // Add a single property that maps to the class type so we can have policies applied. - JsonPropertyInfo jsonPropertyInfo = AddProperty(type, propertyInfo: null, type, options); + JsonPropertyInfo jsonPropertyInfo = AddPolicyProperty(type, options); // Use the type from the property policy to get any late-bound concrete types (from an interface like IDictionary). CreateObject = options.ClassMaterializerStrategy.CreateConstructor(jsonPropertyInfo.RuntimePropertyType); @@ -127,7 +127,7 @@ internal JsonClassInfo(Type type, JsonSerializerOptions options) else if (ClassType == ClassType.Value) { // Add a single property that maps to the class type so we can have policies applied. - AddProperty(type, propertyInfo: null, type, options); + AddPolicyProperty(type, options); } else { @@ -319,19 +319,22 @@ public static Type GetElementType(Type propertyType) if (propertyType.IsGenericType) { - if (GetClassType(propertyType) == ClassType.Dictionary) + if (GetClassType(propertyType) == ClassType.Dictionary && + args.Length >= 2) // It is >= 2 in case there is a Dictionary. { + elementType = args[1]; } - else + else if (args.Length >= 1) // It is >= 1 in case there is an IEnumerable. { + Debug.Assert(GetClassType(propertyType) == ClassType.Enumerable); elementType = args[0]; } } else { // Unable to determine collection type; attempt to use object which will be used to create loosely-typed collection. - return typeof(object); + elementType = typeof(object); } } } diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfo.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfo.cs index 1fb7bc1b4bcb..f46a5c95a994 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfo.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfo.cs @@ -251,7 +251,7 @@ public void CopyRuntimeSettingsTo(JsonPropertyInfo other) other._escapedName = _escapedName; } - public abstract object GetValueAsObject(object obj, JsonSerializerOptions options); + public abstract object GetValueAsObject(object obj); public TAttribute GetAttribute() where TAttribute : Attribute { @@ -266,7 +266,7 @@ public TAttribute GetAttribute() where TAttribute : Attribute public abstract void Read(JsonTokenType tokenType, JsonSerializerOptions options, ref ReadStack state, ref Utf8JsonReader reader); public abstract void ReadEnumerable(JsonTokenType tokenType, JsonSerializerOptions options, ref ReadStack state, ref Utf8JsonReader reader); - public abstract void SetValueAsObject(object obj, object value, JsonSerializerOptions options); + public abstract void SetValueAsObject(object obj, object value); public abstract void Write(JsonSerializerOptions options, ref WriteStackFrame current, Utf8JsonWriter writer); diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfoCommon.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfoCommon.cs index b1e5e12d6b19..12d1e3aa8c18 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfoCommon.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfoCommon.cs @@ -53,11 +53,7 @@ public JsonPropertyInfoCommon( _isPropertyPolicy = true; HasGetter = true; HasSetter = true; - - if (ClassType == ClassType.Dictionary) - { - ValueConverter = DefaultConverters.s_converter; - } + ValueConverter = DefaultConverters.s_converter; } GetPolicies(options); @@ -69,7 +65,7 @@ public override void GetPolicies(JsonSerializerOptions options) base.GetPolicies(options); } - public override object GetValueAsObject(object obj, JsonSerializerOptions options) + public override object GetValueAsObject(object obj) { if (_isPropertyPolicy) { @@ -80,7 +76,7 @@ public override object GetValueAsObject(object obj, JsonSerializerOptions option return Get((TClass)obj); } - public override void SetValueAsObject(object obj, object value, JsonSerializerOptions options) + public override void SetValueAsObject(object obj, object value) { Debug.Assert(Set != null); TDeclaredProperty typedValue = (TDeclaredProperty)value; diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfoNotNullable.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfoNotNullable.cs index b07fe0245a01..14c445c3e544 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfoNotNullable.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfoNotNullable.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.Reflection; @@ -79,7 +78,7 @@ public override void ReadEnumerable(JsonTokenType tokenType, JsonSerializerOptio public override void ApplyNullValue(JsonSerializerOptions options, ref ReadStack state) { Debug.Assert(state.Current.JsonPropertyInfo != null); - state.Current.JsonPropertyInfo.SetValueAsObject(state.Current.ReturnValue, null, options); + state.Current.JsonPropertyInfo.SetValueAsObject(state.Current.ReturnValue, value : null); } // todo: have the caller check if current.Enumerator != null and call WriteEnumerable of the underlying property directly to avoid an extra virtual call. diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfoNullable.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfoNullable.cs index d2d069965bc6..afdfcdc66e60 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfoNullable.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfoNullable.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System.Buffers; using System.Collections.Generic; using System.Diagnostics; using System.Reflection; diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleArray.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleArray.cs index ab2efb34d9b7..5d12c8ff692e 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleArray.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleArray.cs @@ -40,42 +40,40 @@ private static void HandleStartArray( ThrowHelper.ThrowJsonReaderException_DeserializeUnableToConvertValue(arrayType, reader, state); } - Debug.Assert(state.Current.IsPropertyEnumerable()); - if (state.Current.IsPropertyEnumerable()) + Debug.Assert(state.Current.IsPropertyEnumerable || state.Current.IsDictionary); + + if (state.Current.EnumerableCreated) { - if (state.Current.EnumerableCreated) - { - // A nested json array so push a new stack frame. - Type elementType = state.Current.JsonClassInfo.ElementClassInfo.GetPolicyProperty().RuntimePropertyType; + // A nested json array so push a new stack frame. + Type elementType = state.Current.JsonClassInfo.ElementClassInfo.GetPolicyProperty().RuntimePropertyType; - state.Push(); + state.Push(); - state.Current.Initialize(elementType, options); - state.Current.PopStackOnEndArray = true; - } - else - { - state.Current.EnumerableCreated = true; - } + state.Current.Initialize(elementType, options); + state.Current.PopStackOnEnd = true; + } + else + { + state.Current.EnumerableCreated = true; + } - jsonPropertyInfo = state.Current.JsonPropertyInfo; + jsonPropertyInfo = state.Current.JsonPropertyInfo; - // If current property is already set (from a constructor, for example) leave as-is - if (jsonPropertyInfo.GetValueAsObject(state.Current.ReturnValue, options) == null) + // If current property is already set (from a constructor, for example) leave as-is. + if (jsonPropertyInfo.GetValueAsObject(state.Current.ReturnValue) == null) + { + // Create the enumerable. + object value = ReadStackFrame.CreateEnumerableValue(ref reader, ref state, options); + if (value != null) { - // Create the enumerable. - object value = ReadStackFrame.CreateEnumerableValue(ref reader, ref state, options); - if (value != null) + if (state.Current.ReturnValue != null) { - if (state.Current.ReturnValue != null) - { - state.Current.JsonPropertyInfo.SetValueAsObject(state.Current.ReturnValue, value, options); - } - else - { - // Primitive arrays being returned without object - state.Current.SetReturnValue(value, options); - } + state.Current.JsonPropertyInfo.SetValueAsObject(state.Current.ReturnValue, value); + } + else + { + // Primitive arrays being returned without object + state.Current.SetReturnValue(value); } } } @@ -117,8 +115,8 @@ private static bool HandleEndArray( setPropertyDirectly = false; } - bool valueReturning = state.Current.PopStackOnEndArray; - if (state.Current.PopStackOnEndArray) + bool valueReturning = state.Current.PopStackOnEnd; + if (state.Current.PopStackOnEnd) { state.Pop(); } @@ -132,7 +130,7 @@ private static bool HandleEndArray( state.Current.ReturnValue = value; return true; } - else if (state.Current.IsEnumerable()) + else if (state.Current.IsEnumerable || state.Current.IsDictionary) { // Returning a non-converted list. return true; @@ -153,7 +151,7 @@ private static bool HandleEndArray( // If this method is changed, also change ApplyValueToEnumerable. internal static void ApplyObjectToEnumerable(object value, JsonSerializerOptions options, ref ReadStackFrame frame, bool setPropertyDirectly = false) { - if (frame.IsEnumerable()) + if (frame.IsEnumerable) { if (frame.TempEnumerableValues != null) { @@ -164,7 +162,7 @@ internal static void ApplyObjectToEnumerable(object value, JsonSerializerOptions ((IList)frame.ReturnValue).Add(value); } } - else if (!setPropertyDirectly && frame.IsPropertyEnumerable()) + else if (!setPropertyDirectly && frame.IsPropertyEnumerable) { Debug.Assert(frame.JsonPropertyInfo != null); Debug.Assert(frame.ReturnValue != null); @@ -174,23 +172,18 @@ internal static void ApplyObjectToEnumerable(object value, JsonSerializerOptions } else { - ((IList)frame.JsonPropertyInfo.GetValueAsObject(frame.ReturnValue, options)).Add(value); + ((IList)frame.JsonPropertyInfo.GetValueAsObject(frame.ReturnValue)).Add(value); } } - else if (frame.IsDictionary()) - { - ((IDictionary)frame.ReturnValue).Add(frame.KeyName, value); - } - else if (frame.IsPropertyADictionary()) + else if (frame.IsDictionary) { - Debug.Assert(frame.JsonPropertyInfo != null); Debug.Assert(frame.ReturnValue != null); - frame.JsonPropertyInfo.SetValueAsObject(frame.ReturnValue, value, options); + ((IDictionary)frame.JsonPropertyInfo.GetValueAsObject(frame.ReturnValue)).Add(frame.KeyName, value); } else { Debug.Assert(frame.JsonPropertyInfo != null); - frame.JsonPropertyInfo.SetValueAsObject(frame.ReturnValue, value, options); + frame.JsonPropertyInfo.SetValueAsObject(frame.ReturnValue, value); } } @@ -200,7 +193,7 @@ internal static void ApplyValueToEnumerable( JsonSerializerOptions options, ref ReadStackFrame frame) { - if (frame.IsEnumerable()) + if (frame.IsEnumerable) { if (frame.TempEnumerableValues != null) { @@ -211,7 +204,7 @@ internal static void ApplyValueToEnumerable( ((IList)frame.ReturnValue).Add(value); } } - else if (frame.IsPropertyEnumerable()) + else if (frame.IsPropertyEnumerable) { Debug.Assert(frame.JsonPropertyInfo != null); Debug.Assert(frame.ReturnValue != null); @@ -221,24 +214,18 @@ internal static void ApplyValueToEnumerable( } else { - ((IList)frame.JsonPropertyInfo.GetValueAsObject(frame.ReturnValue, options)).Add(value); + ((IList)frame.JsonPropertyInfo.GetValueAsObject(frame.ReturnValue)).Add(value); } } - else if (frame.IsDictionary()) + else if (frame.IsDictionary) { - // todo: use TryAdd and throw JsonReaderException - ((IDictionary)frame.ReturnValue).Add(frame.KeyName, value); - } - else if (frame.IsPropertyADictionary()) - { - Debug.Assert(frame.JsonPropertyInfo != null); Debug.Assert(frame.ReturnValue != null); - ((IDictionary)frame.JsonPropertyInfo.GetValueAsObject(frame.ReturnValue, options)).Add(frame.KeyName, value); + ((IDictionary)frame.JsonPropertyInfo.GetValueAsObject(frame.ReturnValue)).Add(frame.KeyName, value); } else { Debug.Assert(frame.JsonPropertyInfo != null); - frame.JsonPropertyInfo.SetValueAsObject(frame.ReturnValue, value, options); + frame.JsonPropertyInfo.SetValueAsObject(frame.ReturnValue, value); } } } diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleNull.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleNull.cs index c4ea0046def1..ad97372ffa1f 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleNull.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleNull.cs @@ -30,13 +30,13 @@ private static bool HandleNull(ref Utf8JsonReader reader, ref ReadStack state, J ThrowHelper.ThrowJsonReaderException_DeserializeCannotBeNull(reader, state); } - if (state.Current.IsEnumerable() || state.Current.IsDictionary()) + if (state.Current.IsEnumerable || state.Current.IsDictionary) { ApplyObjectToEnumerable(null, options, ref state.Current); return false; } - if (state.Current.IsPropertyEnumerable() || state.Current.IsPropertyADictionary()) + if (state.Current.IsPropertyEnumerable) { state.Current.JsonPropertyInfo.ApplyNullValue(options, ref state); return false; @@ -50,7 +50,7 @@ private static bool HandleNull(ref Utf8JsonReader reader, ref ReadStack state, J if (!propertyInfo.IgnoreNullValues) { - state.Current.JsonPropertyInfo.SetValueAsObject(state.Current.ReturnValue, null, options); + state.Current.JsonPropertyInfo.SetValueAsObject(state.Current.ReturnValue, value : null); } return false; diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleObject.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleObject.cs index 1289b49deec7..ae171280e465 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleObject.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleObject.cs @@ -2,11 +2,13 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System.Diagnostics; + namespace System.Text.Json.Serialization { public static partial class JsonSerializer { - private static void HandleStartObject(JsonSerializerOptions options, ref ReadStack state) + private static void HandleStartObject(JsonSerializerOptions options, ref Utf8JsonReader reader, ref ReadStack state) { if (state.Current.Skip()) { @@ -15,23 +17,49 @@ private static void HandleStartObject(JsonSerializerOptions options, ref ReadSta return; } - if (state.Current.IsDictionary()) - { - // Fall through and treat as a return value. - } - else if (state.Current.IsEnumerable() || state.Current.IsPropertyEnumerable() || state.Current.IsPropertyADictionary()) + if (state.Current.IsProcessingEnumerable) { - // An array of objects either on the current property or on a list Type objType = state.Current.GetElementType(); state.Push(); - state.Current.JsonClassInfo = options.GetOrAddClass(objType); + state.Current.Initialize(objType, options); } else if (state.Current.JsonPropertyInfo != null) { - // Nested object - Type objType = state.Current.JsonPropertyInfo.RuntimePropertyType; - state.Push(); - state.Current.JsonClassInfo = options.GetOrAddClass(objType); + if (state.Current.IsDictionary) + { + // Verify that the Dictionary can be deserialized by having as first generic argument. + Debug.Assert(state.Current.JsonClassInfo.Type.GetGenericArguments().Length >= 1); + if (state.Current.JsonClassInfo.Type.GetGenericArguments()[0].UnderlyingSystemType != typeof(string)) + { + ThrowHelper.ThrowJsonReaderException_DeserializeUnableToConvertValue(state.Current.JsonClassInfo.Type, reader, state); + } + + ClassType classType = state.Current.JsonClassInfo.ElementClassInfo.ClassType; + + if (state.Current.ReturnValue == null) + { + // The Dictionary created below will be returned to corresponding Parse() etc method. + // Ensure any nested array creates a new frame. + state.Current.EnumerableCreated = true; + } + else + { + Debug.Assert(classType == ClassType.Object || classType == ClassType.Dictionary); + + // A nested object or dictionary. + JsonClassInfo classInfoTemp = state.Current.JsonClassInfo; + state.Push(); + state.Current.JsonClassInfo = classInfoTemp.ElementClassInfo; + state.Current.InitializeJsonPropertyInfo(); + } + } + else + { + // Nested object. + Type objType = state.Current.JsonPropertyInfo.RuntimePropertyType; + state.Push(); + state.Current.Initialize(objType, options); + } } JsonClassInfo classInfo = state.Current.JsonClassInfo; diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleValue.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleValue.cs index 51b51aa447e5..4f3c737c1400 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleValue.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleValue.cs @@ -19,7 +19,7 @@ private static bool HandleValue(JsonTokenType tokenType, JsonSerializerOptions o jsonPropertyInfo = state.Current.JsonClassInfo.CreatePolymorphicProperty(jsonPropertyInfo, typeof(object), options); } - bool lastCall = (!state.Current.IsProcessingEnumerableOrDictionary() && state.Current.ReturnValue == null); + bool lastCall = (!state.Current.IsProcessingEnumerableOrDictionary && state.Current.ReturnValue == null); jsonPropertyInfo.Read(tokenType, options, ref state, ref reader); return lastCall; diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.cs index 08b8d0bfc239..94b89a4c863c 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.cs @@ -42,7 +42,7 @@ private static void ReadCore( Debug.Assert(state.Current.ReturnValue != default); Debug.Assert(state.Current.JsonClassInfo != default); - if (state.Current.IsDictionary()) + if (state.Current.IsDictionary) { string keyName = reader.GetString(); if (options.DictionaryKeyPolicy != null) @@ -75,7 +75,7 @@ private static void ReadCore( } else if (tokenType == JsonTokenType.StartObject) { - HandleStartObject(options, ref state); + HandleStartObject(options, ref reader, ref state); } else if (tokenType == JsonTokenType.EndObject) { diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.HandleDictionary.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.HandleDictionary.cs index bcacc6fe8b57..bbba76969f0c 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.HandleDictionary.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.HandleDictionary.cs @@ -18,8 +18,6 @@ private static bool HandleDictionary( Utf8JsonWriter writer, ref WriteStack state) { - Debug.Assert(state.Current.JsonPropertyInfo.ClassType == ClassType.Dictionary); - JsonPropertyInfo jsonPropertyInfo = state.Current.JsonPropertyInfo; if (!jsonPropertyInfo.ShouldSerialize) { @@ -29,25 +27,17 @@ private static bool HandleDictionary( if (state.Current.Enumerator == null) { - IEnumerable enumerable = (IEnumerable)jsonPropertyInfo.GetValueAsObject(state.Current.CurrentValue, options); + IEnumerable enumerable = (IEnumerable)jsonPropertyInfo.GetValueAsObject(state.Current.CurrentValue); if (enumerable == null) { // Write a null object or enumerable. - writer.WriteNull(jsonPropertyInfo.Name); + state.Current.WriteObjectOrArrayStart(ClassType.Dictionary, writer, writeNull : true); return true; } state.Current.Enumerator = enumerable.GetEnumerator(); - - if (jsonPropertyInfo.Name == null) - { - writer.WriteStartObject(); - } - else - { - writer.WriteStartObject(jsonPropertyInfo.Name); - } + state.Current.WriteObjectOrArrayStart(ClassType.Dictionary, writer); } if (state.Current.Enumerator.MoveNext()) @@ -55,8 +45,7 @@ private static bool HandleDictionary( // Check for polymorphism. if (elementClassInfo.ClassType == ClassType.Unknown) { - //todo:test - object currentValue = ((IDictionaryEnumerator)(state.Current.Enumerator)).Entry; + object currentValue = ((IDictionaryEnumerator)state.Current.Enumerator).Entry; GetRuntimeClassInfo(currentValue, ref elementClassInfo, options); } @@ -71,8 +60,10 @@ private static bool HandleDictionary( else { // An object or another enumerator requires a new stack frame. - object nextValue = state.Current.Enumerator.Current; - state.Push(elementClassInfo, nextValue); + var enumerator = (IDictionaryEnumerator)state.Current.Enumerator; + object value = enumerator.Value; + state.Push(elementClassInfo, value); + state.Current.KeyName = (string)enumerator.Key; } return false; @@ -81,7 +72,14 @@ private static bool HandleDictionary( // We are done enumerating. writer.WriteEndObject(); - state.Current.EndDictionary(); + if (state.Current.PopStackOnEnd) + { + state.Pop(); + } + else + { + state.Current.EndDictionary(); + } return true; } @@ -119,28 +117,35 @@ internal static void WriteDictionary( } else { + byte[] utf8Key = Encoding.UTF8.GetBytes(key); #if true // temporary behavior until the writer can accept escaped string. - byte[] utf8Key = Encoding.UTF8.GetBytes(key); converter.Write(utf8Key, value, writer); #else - byte[] pooledKey = null; - byte[] utf8Key = Encoding.UTF8.GetBytes(key); - int length = JsonWriterHelper.GetMaxEscapedLength(utf8Key.Length, 0); + int valueIdx = JsonWriterHelper.NeedsEscaping(utf8Key); + if (valueIdx == -1) + { + converter.Write(utf8Key, value, writer); + } + else + { + byte[] pooledKey = null; + int length = JsonWriterHelper.GetMaxEscapedLength(utf8Key.Length, valueIdx); - Span escapedKey = length <= JsonConstants.StackallocThreshold ? - stackalloc byte[length] : - (pooledKey = ArrayPool.Shared.Rent(length)); + Span escapedKey = length <= JsonConstants.StackallocThreshold ? + stackalloc byte[length] : + (pooledKey = ArrayPool.Shared.Rent(length)); - JsonWriterHelper.EscapeString(utf8Key, escapedKey, 0, out int written); + JsonWriterHelper.EscapeString(utf8Key, escapedKey, valueIdx, out int written); - converter.Write(escapedKey.Slice(0, written), value, writer); + converter.Write(escapedKey.Slice(0, written), value, writer); - if (pooledKey != null) - { - // We clear the array because it is "user data" (although a property name). - new Span(pooledKey, 0, written).Clear(); - ArrayPool.Shared.Return(pooledKey); + if (pooledKey != null) + { + // We clear the array because it is "user data" (although a property name). + new Span(pooledKey, 0, written).Clear(); + ArrayPool.Shared.Return(pooledKey); + } } #endif } diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.HandleEnumerable.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.HandleEnumerable.cs index da494eff2528..74d0ca5bd974 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.HandleEnumerable.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.HandleEnumerable.cs @@ -26,25 +26,18 @@ private static bool HandleEnumerable( if (state.Current.Enumerator == null) { - IEnumerable enumerable = (IEnumerable)jsonPropertyInfo.GetValueAsObject(state.Current.CurrentValue, options); + IEnumerable enumerable = (IEnumerable)jsonPropertyInfo.GetValueAsObject(state.Current.CurrentValue); if (enumerable == null) { // Write a null object or enumerable. - writer.WriteNull(jsonPropertyInfo.Name); + state.Current.WriteObjectOrArrayStart(ClassType.Enumerable, writer, writeNull: true); return true; } state.Current.Enumerator = enumerable.GetEnumerator(); - if (jsonPropertyInfo.Name == null) - { - writer.WriteStartArray(); - } - else - { - writer.WriteStartArray(jsonPropertyInfo.Name); - } + state.Current.WriteObjectOrArrayStart(ClassType.Enumerable, writer); } if (state.Current.Enumerator.MoveNext()) @@ -78,7 +71,7 @@ private static bool HandleEnumerable( // We are done enumerating. writer.WriteEndArray(); - if (state.Current.PopStackOnEndArray) + if (state.Current.PopStackOnEnd) { state.Pop(); } diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.HandleObject.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.HandleObject.cs index 8cddfd78f5af..4e8585b4e1ab 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.HandleObject.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.HandleObject.cs @@ -18,15 +18,7 @@ private static bool WriteObject( // Write the start. if (!state.Current.StartObjectWritten) { - if (state.Current.JsonPropertyInfo?._escapedName == null) - { - writer.WriteStartObject(); - } - else - { - writer.WriteStartObject(state.Current.JsonPropertyInfo._escapedName); - } - state.Current.StartObjectWritten = true; + state.Current.WriteObjectOrArrayStart(ClassType.Object, writer); } // Determine if we are done enumerating properties. @@ -67,7 +59,7 @@ private static bool HandleObject( // Check for polymorphism. if (jsonPropertyInfo.ClassType == ClassType.Unknown) { - currentValue = jsonPropertyInfo.GetValueAsObject(state.Current.CurrentValue, options); + currentValue = jsonPropertyInfo.GetValueAsObject(state.Current.CurrentValue); obtainedValue = true; GetRuntimePropertyInfo(currentValue, state.Current.JsonClassInfo, ref jsonPropertyInfo, options); } @@ -108,7 +100,7 @@ private static bool HandleObject( // A property that returns an object. if (!obtainedValue) { - currentValue = jsonPropertyInfo.GetValueAsObject(state.Current.CurrentValue, options); + currentValue = jsonPropertyInfo.GetValueAsObject(state.Current.CurrentValue); } if (currentValue != null) diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/ReadStackFrame.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/ReadStackFrame.cs index 946815b949ec..54e11c65a36b 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/ReadStackFrame.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/ReadStackFrame.cs @@ -11,116 +11,74 @@ namespace System.Text.Json.Serialization internal struct ReadStackFrame { // The object (POCO or IEnumerable) that is being populated - internal object ReturnValue; - internal JsonClassInfo JsonClassInfo; + public object ReturnValue; + public JsonClassInfo JsonClassInfo; - // Support Dictionary - internal string KeyName; + // Support Dictionary keys. + public string KeyName; - // Current property values - internal JsonPropertyInfo JsonPropertyInfo; - internal bool PopStackOnEndArray; - internal bool EnumerableCreated; + // Current property values. + public JsonPropertyInfo JsonPropertyInfo; - // Support System.Array and other types that don't implement IList - internal IList TempEnumerableValues; + // Pop the stack when the current array or dictionary is done. + public bool PopStackOnEnd; + + // Support System.Array and other types that don't implement IList. + public IList TempEnumerableValues; + public bool EnumerableCreated; // For performance, we order the properties by the first deserialize and PropertyIndex helps find the right slot quicker. - internal int PropertyIndex; - internal List PropertyRefCache; + public int PropertyIndex; + public List PropertyRefCache; + + // The current JSON data for a property does not match a given POCO, so ignore the property (recursively). + public bool Drain; - // The current JSON data for a property does not match a given POCO, so ignore the property (recursively for enumerables or object). - internal bool Drain; + public bool IsDictionary => JsonClassInfo.ClassType == ClassType.Dictionary; + public bool IsEnumerable => JsonClassInfo.ClassType == ClassType.Enumerable; + public bool IsProcessingEnumerableOrDictionary => IsProcessingEnumerable || IsDictionary; + public bool IsProcessingEnumerable => IsEnumerable || IsPropertyEnumerable; + public bool IsPropertyEnumerable => JsonPropertyInfo != null ? JsonPropertyInfo.ClassType == ClassType.Enumerable : false; - internal void Initialize(Type type, JsonSerializerOptions options) + public void Initialize(Type type, JsonSerializerOptions options) { JsonClassInfo = options.GetOrAddClass(type); + InitializeJsonPropertyInfo(); + } + + public void InitializeJsonPropertyInfo() + { if (JsonClassInfo.ClassType == ClassType.Value || JsonClassInfo.ClassType == ClassType.Enumerable || JsonClassInfo.ClassType == ClassType.Dictionary) { JsonPropertyInfo = JsonClassInfo.GetPolicyProperty(); } } - internal void Reset() + public void Reset() { - ReturnValue = null; + Drain = false; JsonClassInfo = null; + KeyName = null; PropertyRefCache = null; - PropertyIndex = 0; - Drain = false; - ResetProperty(); + ReturnValue = null; + EndObject(); } - internal void ResetProperty() + public void ResetProperty() { - JsonPropertyInfo = null; - PopStackOnEndArray = false; EnumerableCreated = false; + JsonPropertyInfo = null; + PopStackOnEnd = false; TempEnumerableValues = null; - KeyName = null; } - internal bool IsProcessingEnumerableOrDictionary() + public void EndObject() { - return IsEnumerable() ||IsPropertyEnumerable() || IsDictionary() || IsPropertyADictionary(); - } - - internal bool IsEnumerable() - { - return JsonClassInfo.ClassType == ClassType.Enumerable; - } - - internal bool IsDictionary() - { - return JsonClassInfo.ClassType == ClassType.Dictionary; - } - - internal bool Skip() - { - return Drain || ReferenceEquals(JsonPropertyInfo, JsonSerializer.s_missingProperty); - } - - internal bool IsPropertyEnumerable() - { - if (JsonPropertyInfo != null) - { - return JsonPropertyInfo.ClassType == ClassType.Enumerable; - } - - return false; - } - - internal bool IsPropertyADictionary() - { - if (JsonPropertyInfo != null) - { - return JsonPropertyInfo.ClassType == ClassType.Dictionary; - } - - return false; - } - - public Type GetElementType() - { - if (IsPropertyEnumerable()) - { - return JsonPropertyInfo.ElementClassInfo.Type; - } - - if (IsEnumerable()) - { - return JsonClassInfo.ElementClassInfo.Type; - } - - if (IsDictionary()) - { - return JsonClassInfo.ElementClassInfo.Type; - } - - return JsonPropertyInfo.RuntimePropertyType; + PropertyIndex = 0; + ResetProperty(); } - internal static object CreateEnumerableValue(ref Utf8JsonReader reader, ref ReadStack state, JsonSerializerOptions options) + public static object CreateEnumerableValue(ref Utf8JsonReader reader, ref ReadStack state, JsonSerializerOptions options) { JsonPropertyInfo jsonPropertyInfo = state.Current.JsonPropertyInfo; @@ -157,9 +115,29 @@ internal static object CreateEnumerableValue(ref Utf8JsonReader reader, ref Read } } - internal static IEnumerable GetEnumerableValue(in ReadStackFrame current) + public Type GetElementType() + { + if (IsPropertyEnumerable) + { + return JsonPropertyInfo.ElementClassInfo.Type; + } + + if (IsEnumerable) + { + return JsonClassInfo.ElementClassInfo.Type; + } + + if (IsDictionary) + { + return JsonClassInfo.ElementClassInfo.Type; + } + + return JsonPropertyInfo.RuntimePropertyType; + } + + public static IEnumerable GetEnumerableValue(in ReadStackFrame current) { - if (current.IsEnumerable()) + if (current.IsEnumerable) { if (current.ReturnValue != null) { @@ -171,10 +149,15 @@ internal static IEnumerable GetEnumerableValue(in ReadStackFrame current) return current.TempEnumerableValues; } - internal void SetReturnValue(object value, JsonSerializerOptions options) + public void SetReturnValue(object value) { Debug.Assert(ReturnValue == null); ReturnValue = value; } + + public bool Skip() + { + return Drain || ReferenceEquals(JsonPropertyInfo, JsonSerializer.s_missingProperty); + } } } diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/WriteStack.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/WriteStack.cs index 4b614a94b418..5cc3453eeec0 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/WriteStack.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/WriteStack.cs @@ -44,14 +44,16 @@ public void Push(JsonClassInfo nextClassInfo, object nextValue) Current.JsonClassInfo = nextClassInfo; Current.CurrentValue = nextValue; - if (nextClassInfo.ClassType == ClassType.Enumerable) + ClassType classType = nextClassInfo.ClassType; + + if (classType == ClassType.Enumerable || nextClassInfo.ClassType == ClassType.Dictionary) { - Current.PopStackOnEndArray = true; + Current.PopStackOnEnd = true; Current.JsonPropertyInfo = Current.JsonClassInfo.GetPolicyProperty(); } else { - Debug.Assert(nextClassInfo.ClassType == ClassType.Object || nextClassInfo.ClassType == ClassType.Dictionary || nextClassInfo.ClassType == ClassType.Unknown); + Debug.Assert(nextClassInfo.ClassType == ClassType.Object || nextClassInfo.ClassType == ClassType.Unknown); Current.PopStackOnEndObject = true; } } diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/WriteStackFrame.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/WriteStackFrame.cs index 72e31672efbd..82f823b7b47e 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/WriteStackFrame.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/WriteStackFrame.cs @@ -2,31 +2,40 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System.Buffers; using System.Collections; +using System.Diagnostics; namespace System.Text.Json.Serialization { internal struct WriteStackFrame { - // The object (POCO or IEnumerable) that is being populated - internal object CurrentValue; - internal JsonClassInfo JsonClassInfo; + // The object (POCO or IEnumerable) that is being populated. + public object CurrentValue; + public JsonClassInfo JsonClassInfo; - internal IEnumerator Enumerator; + // Support Dictionary keys. + public string KeyName; - // Current property values - internal JsonPropertyInfo JsonPropertyInfo; + // The current enumerator for the IEnumerable or IDictionary. + public IEnumerator Enumerator; + + // Current property values. + public JsonPropertyInfo JsonPropertyInfo; // The current property. - internal int PropertyIndex; + public int PropertyIndex; + + // Has the Start tag been written. + public bool StartObjectWritten; - // Has the Start tag been written - internal bool StartObjectWritten; + // Pop the stack when the current array or dictionary is done. + public bool PopStackOnEnd; - internal bool PopStackOnEndArray; - internal bool PopStackOnEndObject; + // Pop the stack when the current object is done. + public bool PopStackOnEndObject; - internal void Initialize(Type type, JsonSerializerOptions options) + public void Initialize(Type type, JsonSerializerOptions options) { JsonClassInfo = options.GetOrAddClass(type); if (JsonClassInfo.ClassType == ClassType.Value || JsonClassInfo.ClassType == ClassType.Enumerable || JsonClassInfo.ClassType == ClassType.Dictionary) @@ -35,41 +44,102 @@ internal void Initialize(Type type, JsonSerializerOptions options) } } - internal void Reset() + public void WriteObjectOrArrayStart(ClassType classType, Utf8JsonWriter writer, bool writeNull = false) + { + if (JsonPropertyInfo?._escapedName != null) + { + WriteObjectOrArrayStart(classType, JsonPropertyInfo?._escapedName, writer, writeNull); + } + else if (KeyName != null) + { + byte[] pooledKey = null; + byte[] utf8Key = Encoding.UTF8.GetBytes(KeyName); + int length = JsonWriterHelper.GetMaxEscapedLength(utf8Key.Length, 0); + + Span escapedKey = length <= JsonConstants.StackallocThreshold ? + stackalloc byte[length] : + (pooledKey = ArrayPool.Shared.Rent(length)); + + JsonWriterHelper.EscapeString(utf8Key, escapedKey, 0, out int written); + Span propertyName = escapedKey.Slice(0, written); + + WriteObjectOrArrayStart(classType, propertyName, writer, writeNull); + + if (pooledKey != null) + { + ArrayPool.Shared.Return(pooledKey); + } + } + else + { + Debug.Assert(writeNull == false); + + // Write start without a property name. + if (classType == ClassType.Object || classType == ClassType.Dictionary) + { + writer.WriteStartObject(); + StartObjectWritten = true; + } + else + { + Debug.Assert(classType == ClassType.Enumerable); + writer.WriteStartArray(); + } + } + } + + private void WriteObjectOrArrayStart(ClassType classType, ReadOnlySpan propertyName, Utf8JsonWriter writer, bool writeNull) + { + if (writeNull) + { + writer.WriteNull(propertyName); + } + else if (classType == ClassType.Object || classType == ClassType.Dictionary) + { + writer.WriteStartObject(propertyName); + StartObjectWritten = true; + } + else + { + Debug.Assert(classType == ClassType.Enumerable); + writer.WriteStartArray(propertyName); + } + } + + public void Reset() { CurrentValue = null; + Enumerator = null; + KeyName = null; JsonClassInfo = null; + JsonPropertyInfo = null; + PropertyIndex = 0; + PopStackOnEndObject = false; + PopStackOnEnd = false; StartObjectWritten = false; - EndObject(); - EndArray(); } - internal void EndObject() + public void EndObject() { PropertyIndex = 0; PopStackOnEndObject = false; - EndProperty(); + JsonPropertyInfo = null; } - internal void EndDictionary() + public void EndDictionary() { Enumerator = null; - EndProperty(); + PopStackOnEnd = false; } - internal void EndArray() + public void EndArray() { Enumerator = null; - PopStackOnEndArray = false; - EndProperty(); - } - - internal void EndProperty() - { + PopStackOnEnd = false; JsonPropertyInfo = null; } - internal void NextProperty() + public void NextProperty() { JsonPropertyInfo = null; PropertyIndex++; diff --git a/src/System.Text.Json/tests/Serialization/DictionaryTests.cs b/src/System.Text.Json/tests/Serialization/DictionaryTests.cs index 13c7a09351f4..92fdeaaf4398 100644 --- a/src/System.Text.Json/tests/Serialization/DictionaryTests.cs +++ b/src/System.Text.Json/tests/Serialization/DictionaryTests.cs @@ -10,50 +10,221 @@ namespace System.Text.Json.Serialization.Tests public static partial class DictionaryTests { [Fact] - public static void DirectReturn() + public static void DictionaryOfString() { + const string JsonString = @"{""Hello"":""World"",""Hello2"":""World2""}"; + { - Dictionary obj = JsonSerializer.Parse>(@"{""Hello"":""World"", ""Hello2"":""World2""}"); + Dictionary obj = JsonSerializer.Parse>(JsonString); Assert.Equal("World", obj["Hello"]); Assert.Equal("World2", obj["Hello2"]); string json = JsonSerializer.ToString(obj); - Assert.Equal(@"{""Hello"":""World"",""Hello2"":""World2""}", json); + Assert.Equal(JsonString, json); - // Round-trip the json - obj = JsonSerializer.Parse>(json); - Assert.Equal("World", obj["Hello"]); - Assert.Equal("World2", obj["Hello2"]); + json = JsonSerializer.ToString(obj); + Assert.Equal(JsonString, json); } { - IDictionary obj = JsonSerializer.Parse>(@"{""Hello"":""World""}"); + IDictionary obj = JsonSerializer.Parse>(JsonString); Assert.Equal("World", obj["Hello"]); + Assert.Equal("World2", obj["Hello2"]); string json = JsonSerializer.ToString(obj); - Assert.Equal(@"{""Hello"":""World""}", json); + Assert.Equal(JsonString, json); - obj = JsonSerializer.Parse>(json); - Assert.Equal("World", obj["Hello"]); + json = JsonSerializer.ToString(obj); + Assert.Equal(JsonString, json); } { - IReadOnlyDictionary obj = JsonSerializer.Parse>(@"{""Hello"":""World""}"); + IReadOnlyDictionary obj = JsonSerializer.Parse>(JsonString); Assert.Equal("World", obj["Hello"]); + Assert.Equal("World2", obj["Hello2"]); string json = JsonSerializer.ToString(obj); - Assert.Equal(@"{""Hello"":""World""}", json); + Assert.Equal(JsonString, json); - obj = JsonSerializer.Parse>(json); - Assert.Equal("World", obj["Hello"]); + json = JsonSerializer.ToString(obj); + Assert.Equal(JsonString, json); } } [Fact] - public static void ThrowsOnDuplicateKeys() + public static void DuplicateKeysFail() { // todo: this should throw a JsonReaderException - Assert.Throws(() => JsonSerializer.Parse>(@"{""Hello"":""World"", ""Hello"":""World""}")); + Assert.Throws(() => JsonSerializer.Parse>( + @"{""Hello"":""World"", ""Hello"":""World""}")); + } + + [Fact] + public static void DictionaryOfObjectFail() + { + Assert.Throws(() => JsonSerializer.Parse>(@"{""Key1"":1")); + } + + [Fact] + public static void FirstGenericArgNotStringFail() + { + Assert.Throws(() => JsonSerializer.Parse>(@"{""Key1"":1}")); + } + + [Fact] + public static void DictionaryOfList() + { + const string JsonString = @"{""Key1"":[1,2],""Key2"":[3,4]}"; + + IDictionary> obj = JsonSerializer.Parse>>(JsonString); + + Assert.Equal(2, obj.Count); + Assert.Equal(2, obj["Key1"].Count); + Assert.Equal(1, obj["Key1"][0]); + Assert.Equal(2, obj["Key1"][1]); + Assert.Equal(2, obj["Key2"].Count); + Assert.Equal(3, obj["Key2"][0]); + Assert.Equal(4, obj["Key2"][1]); + + + string json = JsonSerializer.ToString(obj); + Assert.Equal(JsonString, json); + } + + [Fact] + public static void DictionaryOfArray() + { + const string JsonString = @"{""Key1"":[1,2],""Key2"":[3,4]}"; + Dictionary obj = JsonSerializer.Parse>(JsonString); + + Assert.Equal(2, obj.Count); + Assert.Equal(2, obj["Key1"].Length); + Assert.Equal(1, obj["Key1"][0]); + Assert.Equal(2, obj["Key1"][1]); + Assert.Equal(2, obj["Key2"].Length); + Assert.Equal(3, obj["Key2"][0]); + Assert.Equal(4, obj["Key2"][1]); + + string json = JsonSerializer.ToString(obj); + Assert.Equal(JsonString, json); + } + + [Fact] + public static void ListOfDictionary() + { + const string JsonString = @"[{""Key1"":1,""Key2"":2},{""Key1"":3,""Key2"":4}]"; + List> obj = JsonSerializer.Parse>>(JsonString); + + Assert.Equal(2, obj.Count); + Assert.Equal(2, obj[0].Count); + Assert.Equal(1, obj[0]["Key1"]); + Assert.Equal(2, obj[0]["Key2"]); + Assert.Equal(2, obj[1].Count); + Assert.Equal(3, obj[1]["Key1"]); + Assert.Equal(4, obj[1]["Key2"]); + + string json = JsonSerializer.ToString(obj); + Assert.Equal(JsonString, json); + + json = JsonSerializer.ToString(obj); + Assert.Equal(JsonString, json); + } + + [Fact] + public static void ArrayOfDictionary() + { + const string JsonString = @"[{""Key1"":1,""Key2"":2},{""Key1"":3,""Key2"":4}]"; + Dictionary[] obj = JsonSerializer.Parse[]>(JsonString); + + Assert.Equal(2, obj.Length); + Assert.Equal(2, obj[0].Count); + Assert.Equal(1, obj[0]["Key1"]); + Assert.Equal(2, obj[0]["Key2"]); + Assert.Equal(2, obj[1].Count); + Assert.Equal(3, obj[1]["Key1"]); + Assert.Equal(4, obj[1]["Key2"]); + + string json = JsonSerializer.ToString(obj); + Assert.Equal(JsonString, json); + + json = JsonSerializer.ToString(obj); + Assert.Equal(JsonString, json); + } + + [Fact] + public static void DictionaryOfDictionary() + { + const string JsonString = @"{""Key1"":{""Key1a"":1,""Key1b"":2},""Key2"":{""Key2a"":3,""Key2b"":4}}"; + Dictionary> obj = JsonSerializer.Parse>>(JsonString); + + Assert.Equal(2, obj.Count); + Assert.Equal(2, obj["Key1"].Count); + Assert.Equal(1, obj["Key1"]["Key1a"]); + Assert.Equal(2, obj["Key1"]["Key1b"]); + Assert.Equal(2, obj["Key2"].Count); + Assert.Equal(3, obj["Key2"]["Key2a"]); + Assert.Equal(4, obj["Key2"]["Key2b"]); + + string json = JsonSerializer.ToString(obj); + Assert.Equal(JsonString, json); + + json = JsonSerializer.ToString(obj); + Assert.Equal(JsonString, json); + } + + [Fact] + public static void DictionaryOfClasses() + { + Dictionary obj; + + { + string json = @"{""Key1"":" + SimpleTestClass.s_json + @",""Key2"":" + SimpleTestClass.s_json + "}"; + obj = JsonSerializer.Parse>(json); + Assert.Equal(2, obj.Count); + obj["Key1"].Verify(); + obj["Key2"].Verify(); + } + + { + // We can't compare against the json string above because property ordering is not deterministic (based on reflection order) + // so just round-trip the json and compare. + string json = JsonSerializer.ToString(obj); + obj = JsonSerializer.Parse>(json); + Assert.Equal(2, obj.Count); + obj["Key1"].Verify(); + obj["Key2"].Verify(); + } + + { + string json = JsonSerializer.ToString(obj); + obj = JsonSerializer.Parse>(json); + Assert.Equal(2, obj.Count); + obj["Key1"].Verify(); + obj["Key2"].Verify(); + } + } + + [Fact] + public static void CamelCaseOption() + { + var options = new JsonSerializerOptions(); + options.DictionaryKeyPolicy = JsonNamingPolicy.CamelCase; + + const string JsonString = @"[{""Key1"":1,""Key2"":2},{""Key1"":3,""Key2"":4}]"; + Dictionary[] obj = JsonSerializer.Parse[]>(JsonString, options); + + Assert.Equal(2, obj.Length); + Assert.Equal(1, obj[0]["key1"]); + Assert.Equal(2, obj[0]["key2"]); + Assert.Equal(3, obj[1]["key1"]); + Assert.Equal(4, obj[1]["key2"]); + + const string JsonCamel = @"[{""key1"":1,""key2"":2},{""key1"":3,""key2"":4}]"; + string jsonCamel = JsonSerializer.ToString(obj); + Assert.Equal(JsonCamel, jsonCamel); + + jsonCamel = JsonSerializer.ToString(obj, options); + Assert.Equal(JsonCamel, jsonCamel); } [Fact] diff --git a/src/System.Text.Json/tests/Serialization/PolymorphicTests.cs b/src/System.Text.Json/tests/Serialization/PolymorphicTests.cs index 3c9ac76f1aa2..e6021ddd2117 100644 --- a/src/System.Text.Json/tests/Serialization/PolymorphicTests.cs +++ b/src/System.Text.Json/tests/Serialization/PolymorphicTests.cs @@ -32,7 +32,7 @@ public static void PrimitivesAsRootObject() json = JsonSerializer.ToString(null, typeof(object)); Assert.Equal(@"null", json); - Decimal pi = 3.1415926535897932384626433833m; + decimal pi = 3.1415926535897932384626433833m; json = JsonSerializer.ToString(pi); Assert.Equal(@"3.1415926535897932384626433833", json); json = JsonSerializer.ToString(pi, typeof(object)); @@ -59,13 +59,18 @@ public static void ArrayAsRootObject() { const string ExpectedJson = @"[1,true,{""City"":""MyCity""},null,""foo""]"; - Address address = new Address(); + var address = new Address(); address.Initialize(); - object[] array = new object[] { 1, true, address, null, "foo" }; + var array = new object[] { 1, true, address, null, "foo" }; string json = JsonSerializer.ToString(array); Assert.Equal(ExpectedJson, json); + var dictionary = new Dictionary { { "City", "MyCity" } }; + var arrayWithDictionary = new object[] { 1, true, dictionary, null, "foo" }; + json = JsonSerializer.ToString(arrayWithDictionary); + Assert.Equal(ExpectedJson, json); + json = JsonSerializer.ToString(array); Assert.Equal(ExpectedJson, json); diff --git a/src/System.Text.Json/tests/Serialization/TestClasses.SimpleTestClassWithNullables.cs b/src/System.Text.Json/tests/Serialization/TestClasses.SimpleTestClassWithNullables.cs index ac6953da1edd..698c0e6458d4 100644 --- a/src/System.Text.Json/tests/Serialization/TestClasses.SimpleTestClassWithNullables.cs +++ b/src/System.Text.Json/tests/Serialization/TestClasses.SimpleTestClassWithNullables.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System.Collections.Generic; using Xunit; namespace System.Text.Json.Serialization.Tests @@ -42,6 +43,7 @@ public abstract class SimpleBaseClassWithNullables public DateTime?[] MyDateTimeArray { get; set; } public DateTimeOffset?[] MyDateTimeOffsetArray { get; set; } public SampleEnum?[] MyEnumArray { get; set; } + public Dictionary MyStringToStringDict { get; set; } } public class SimpleTestClassWithNulls : SimpleBaseClassWithNullables, ITestClass @@ -87,6 +89,7 @@ public void Verify() Assert.Null(MyDateTimeArray); Assert.Null(MyDateTimeOffsetArray); Assert.Null(MyEnumArray); + Assert.Null(MyStringToStringDict); } public static readonly string s_json = @"{" + @@ -123,7 +126,8 @@ public void Verify() @"""MyDecimalArray"" : null," + @"""MyDateTimeArray"" : null," + @"""MyDateTimeOffsetArray"" : null," + - @"""MyEnumArray"" : null" + + @"""MyEnumArray"" : null," + + @"""MyStringToStringDict"" : null" + @"}"; public static readonly byte[] s_data = Encoding.UTF8.GetBytes(s_json); @@ -166,7 +170,8 @@ public class SimpleTestClassWithNullables : SimpleBaseClassWithNullables, ITestC @"""MyDecimalArray"" : [3.3]," + @"""MyDateTimeArray"" : [""2019-01-30T12:01:02.0000000Z""]," + @"""MyDateTimeOffsetArray"" : [""2019-01-30T12:01:02.0000000+01:00""]," + - @"""MyEnumArray"" : [2]" + + @"""MyEnumArray"" : [2]," + + @"""MyStringToStringDict"" : {""key"" : ""value""}" + @"}"; public static readonly byte[] s_data = Encoding.UTF8.GetBytes(s_json); @@ -208,6 +213,7 @@ public void Initialize() MyDateTimeArray = new DateTime?[] { new DateTime(2019, 1, 30, 12, 1, 2, DateTimeKind.Utc) }; MyDateTimeOffsetArray = new DateTimeOffset?[] { new DateTimeOffset(2019, 1, 30, 12, 1, 2, new TimeSpan(1, 0, 0)) }; MyEnumArray = new SampleEnum?[] { SampleEnum.Two }; + MyStringToStringDict = new Dictionary { { "key", "value" } }; } public void Verify() @@ -247,6 +253,7 @@ public void Verify() Assert.Equal(new DateTime(2019, 1, 30, 12, 1, 2, DateTimeKind.Utc), MyDateTimeArray[0]); Assert.Equal(new DateTimeOffset(2019, 1, 30, 12, 1, 2, new TimeSpan(1, 0, 0)), MyDateTimeOffsetArray[0]); Assert.Equal(SampleEnum.Two, MyEnumArray[0]); + Assert.Equal("value", MyStringToStringDict["key"]); } } } From 111632ce7af9f2ffbf117045ea098bd3f0116ccb Mon Sep 17 00:00:00 2001 From: Steve MacLean Date: Fri, 26 Apr 2019 16:03:22 -0400 Subject: [PATCH 069/607] Reenable tests (#37081) --- src/System.Runtime.Loader/tests/ContextualReflection.cs | 5 ----- src/System.Runtime/tests/System/ActivatorTests.netcoreapp.cs | 3 +-- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/src/System.Runtime.Loader/tests/ContextualReflection.cs b/src/System.Runtime.Loader/tests/ContextualReflection.cs index ad74e48dc58d..9120a3662254 100644 --- a/src/System.Runtime.Loader/tests/ContextualReflection.cs +++ b/src/System.Runtime.Loader/tests/ContextualReflection.cs @@ -599,7 +599,6 @@ void AssemblyLoadAssemblyNameSharedAssemblyIsolated() } [Fact] - [ActiveIssue("https://github.com/dotnet/coreclr/issues/24135")] void AssemblyLoadStringMultiLoadedAssemblyDefault() { string name = _fixture.defaultAlcAssembly.GetName().Name; @@ -616,7 +615,6 @@ void AssemblyLoadStringMultiLoadedAssemblyDefault() } [Fact] - [ActiveIssue("https://github.com/dotnet/coreclr/issues/24135")] void AssemblyLoadStringMultiLoadedAssemblyIsolated() { string name = _fixture.defaultAlcAssembly.GetName().Name; @@ -953,7 +951,6 @@ void ActivatorCreateInstanceNullMultiLoadedAssemblyIsolated() } [Fact] - [ActiveIssue("https://github.com/dotnet/coreclr/issues/24135")] void ActivatorCreateInstanceNameMultiLoadedAssemblyDefault() { string typeName = typeof(ContextualReflectionTestFixture).FullName; @@ -966,7 +963,6 @@ void ActivatorCreateInstanceNameMultiLoadedAssemblyDefault() } [Fact] - [ActiveIssue("https://github.com/dotnet/coreclr/issues/24135")] void ActivatorCreateInstanceNameMultiLoadedAssemblyIsolated() { string typeName = typeof(ContextualReflectionTestFixture).FullName; @@ -1019,7 +1015,6 @@ void ActivatorCreateInstanceNameGenericMultiLoadedAssemblyDefault() } [Fact] - [ActiveIssue("https://github.com/dotnet/coreclr/issues/24135")] void ActivatorCreateInstanceNameGenericMultiLoadedAssemblyIsolated() { string typeNameAGenericClass = typeof(AGenericClass<>).FullName; diff --git a/src/System.Runtime/tests/System/ActivatorTests.netcoreapp.cs b/src/System.Runtime/tests/System/ActivatorTests.netcoreapp.cs index e9858e2006b2..9c724fb22da7 100644 --- a/src/System.Runtime/tests/System/ActivatorTests.netcoreapp.cs +++ b/src/System.Runtime/tests/System/ActivatorTests.netcoreapp.cs @@ -256,13 +256,12 @@ public PublicType() { } [Fact] [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Assembly.LoadFile is not supported in AppX.")] - [ActiveIssue("dotnet/coreclr#24154")] public static void CreateInstanceAssemblyResolve() { RemoteExecutor.Invoke(() => { AppDomain.CurrentDomain.AssemblyResolve += (object sender, ResolveEventArgs args) => Assembly.LoadFile(Path.Combine(Directory.GetCurrentDirectory(), "TestLoadAssembly.dll")); - Assert.Throws(() => Activator.CreateInstance(",,,,", "PublicClassSample")); + Assert.Throws(() => Activator.CreateInstance(",,,,", "PublicClassSample")); }).Dispose(); } From 58e336ab4476ce57a3b44d87351299cfe9a6458d Mon Sep 17 00:00:00 2001 From: Charles Stoner Date: Fri, 26 Apr 2019 15:14:16 -0700 Subject: [PATCH 070/607] Port Microsoft.VisualBasic.FileSystem (#37201) --- .../ref/Microsoft.VisualBasic.Core.cs | 155 + .../src/Microsoft.VisualBasic.Core.vbproj | 8 +- .../VisualBasic/CompilerServices/IOUtils.vb | 143 + .../CompilerServices/ProjectData.vb | 91 + .../CompilerServices/VB6BinaryFile.vb | 209 ++ .../VisualBasic/CompilerServices/VB6File.vb | 2680 +++++++++++++++++ .../CompilerServices/VB6InputFile.vb | 214 ++ .../CompilerServices/VB6OutputFile.vb | 137 + .../CompilerServices/VB6RandomFile.vb | 615 ++++ .../VisualBasic/CompilerServices/VBBinder.vb | 1 - .../src/Microsoft/VisualBasic/Constants.vb | 31 + .../src/Microsoft/VisualBasic/Conversion.vb | 171 ++ .../Microsoft/VisualBasic/Devices/Computer.vb | 3 - .../VisualBasic/Devices/ServerComputer.vb | 3 - .../VisualBasic/FileIO/FileSystem.vb | 6 +- .../src/Microsoft/VisualBasic/FileSystem.vb | 1485 ++++++++- .../src/Microsoft/VisualBasic/Globals.vb | 52 + ...iveMethods.Windows.vb => NativeMethods.vb} | 18 + .../Helpers/UnsafeNativeMethods.vb | 36 +- .../src/Microsoft/VisualBasic/VBMath.vb | 4 - .../tests/FileSystemTests.cs | 731 +++++ .../Microsoft.VisualBasic.Core.Tests.csproj | 1 + .../tests/ProjectDataTests.cs | 14 +- .../tests/VB/Dummy.vb | 29 - .../tests/VB/FileIOTests.vb | 185 +- ...Microsoft.VisualBasic.VB.Core.Tests.vbproj | 1 - 26 files changed, 6872 insertions(+), 151 deletions(-) create mode 100644 src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/CompilerServices/IOUtils.vb create mode 100644 src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/CompilerServices/VB6BinaryFile.vb create mode 100644 src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/CompilerServices/VB6File.vb create mode 100644 src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/CompilerServices/VB6InputFile.vb create mode 100644 src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/CompilerServices/VB6OutputFile.vb create mode 100644 src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/CompilerServices/VB6RandomFile.vb rename src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/Helpers/{NativeMethods.Windows.vb => NativeMethods.vb} (94%) create mode 100644 src/Microsoft.VisualBasic.Core/tests/FileSystemTests.cs delete mode 100644 src/Microsoft.VisualBasic.Core/tests/VB/Dummy.vb diff --git a/src/Microsoft.VisualBasic.Core/ref/Microsoft.VisualBasic.Core.cs b/src/Microsoft.VisualBasic.Core/ref/Microsoft.VisualBasic.Core.cs index 400868539ecc..479ec238edc8 100644 --- a/src/Microsoft.VisualBasic.Core/ref/Microsoft.VisualBasic.Core.cs +++ b/src/Microsoft.VisualBasic.Core/ref/Microsoft.VisualBasic.Core.cs @@ -65,22 +65,44 @@ public enum CompareMethod public sealed partial class Constants { internal Constants() { } + public const FileAttribute vbArchive = FileAttribute.Archive; public const string vbBack = "\b"; public const Microsoft.VisualBasic.CompareMethod vbBinaryCompare = Microsoft.VisualBasic.CompareMethod.Binary; public const string vbCr = "\r"; public const string vbCrLf = "\r\n"; + public const FileAttribute vbDirectory = FileAttribute.Directory; public const TriState vbFalse = TriState.False; public const string vbFormFeed = "\f"; + public const DateFormat vbGeneralDate = DateFormat.GeneralDate; + public const FileAttribute vbHidden = FileAttribute.Hidden; + public const VbStrConv vbHiragana = VbStrConv.Hiragana; + public const VbStrConv vbKatakana = VbStrConv.Katakana; public const string vbLf = "\n"; + public const VbStrConv vbLinguisticCasing = VbStrConv.LinguisticCasing; + public const DateFormat vbLongDate = DateFormat.LongDate; + public const DateFormat vbLongTime = DateFormat.LongTime; + public const VbStrConv vbLowerCase = VbStrConv.Lowercase; [System.ObsoleteAttribute("For a carriage return and line feed, use vbCrLf. For the current platform's newline, use System.Environment.NewLine.")] + public const VbStrConv vbNarrow = VbStrConv.Narrow; public const string vbNewLine = "\r\n"; + public const FileAttribute vbNormal = FileAttribute.Normal; public const string vbNullChar = "\0"; public const string vbNullString = null; + public const VbStrConv vbProperCase = VbStrConv.ProperCase; + public const FileAttribute vbReadOnly = FileAttribute.ReadOnly; + public const DateFormat vbShortDate = DateFormat.ShortDate; + public const DateFormat vbShortTime = DateFormat.ShortTime; + public const VbStrConv vbSimplifiedChinese = VbStrConv.SimplifiedChinese; + public const FileAttribute vbSystem = FileAttribute.System; public const string vbTab = "\t"; public const Microsoft.VisualBasic.CompareMethod vbTextCompare = Microsoft.VisualBasic.CompareMethod.Text; + public const VbStrConv vbTraditionalChinese = VbStrConv.TraditionalChinese; public const TriState vbTrue = TriState.True; + public const VbStrConv vbUpperCase = VbStrConv.Uppercase; public const TriState vbUseDefault = TriState.UseDefault; public const string vbVerticalTab = "\v"; + public const FileAttribute vbVolume = FileAttribute.Volume; + public const VbStrConv vbWide = VbStrConv.Wide; } public sealed partial class ControlChars { @@ -175,6 +197,106 @@ public void Clear() { } public int Number { get { throw null; } set { } } public void Raise(int Number, object Source = null, object Description = null, object HelpFile = null, object HelpContext = null) { } } + [System.Flags] + public enum FileAttribute + { + Archive = 32, + Directory = 16, + Hidden = 2, + Normal = 0, + ReadOnly = 1, + System = 4, + Volume = 8, + } + [Microsoft.VisualBasic.CompilerServices.StandardModuleAttribute] + public sealed class FileSystem + { + internal FileSystem() { } + public static void ChDir(string Path){ throw null; } + public static void ChDrive(char Drive){ throw null; } + public static void ChDrive(string Drive){ throw null; } + public static string CurDir(){ throw null; } + public static string CurDir(char Drive){ throw null; } + public static string Dir(){ throw null; } + public static string Dir(string PathName, FileAttribute Attributes = FileAttribute.Normal){ throw null; } + public static bool EOF(int FileNumber){ throw null; } + public static OpenMode FileAttr(int FileNumber){ throw null; } + public static void FileClose(params int[] FileNumbers) { } + public static void FileCopy(string Source, string Destination) { } + public static System.DateTime FileDateTime(string PathName){ throw null; } + public static void FileGet(int FileNumber, ref bool Value, long RecordNumber = -1) { } + public static void FileGet(int FileNumber, ref byte Value, long RecordNumber = -1) { } + public static void FileGet(int FileNumber, ref char Value, long RecordNumber = -1) { } + public static void FileGet(int FileNumber, ref decimal Value, long RecordNumber = -1) { } + public static void FileGet(int FileNumber, ref double Value, long RecordNumber = -1) { } + public static void FileGet(int FileNumber, ref float Value, long RecordNumber = -1) { } + public static void FileGet(int FileNumber, ref int Value, long RecordNumber = -1) { } + public static void FileGet(int FileNumber, ref long Value, long RecordNumber = -1) { } + public static void FileGet(int FileNumber, ref short Value, long RecordNumber = -1) { } + public static void FileGet(int FileNumber, ref string Value, long RecordNumber = -1, bool StringIsFixedLength = false) { } + public static void FileGet(int FileNumber, ref System.Array Value, long RecordNumber = -1, bool ArrayIsDynamic = false, bool StringIsFixedLength = false) { } + public static void FileGet(int FileNumber, ref System.DateTime Value, long RecordNumber = -1) { } + public static void FileGet(int FileNumber, ref System.ValueType Value, long RecordNumber = -1) { } + public static void FileGetObject(int FileNumber, ref object Value, long RecordNumber = -1) { } + public static long FileLen(string PathName) { throw null; } + public static void FileOpen(int FileNumber, string FileName, OpenMode Mode, OpenAccess Access = OpenAccess.Default, OpenShare Share = OpenShare.Default, int RecordLength = -1) { } + public static void FilePut(int FileNumber, bool Value, long RecordNumber = -1) { } + public static void FilePut(int FileNumber, byte Value, long RecordNumber = -1) { } + public static void FilePut(int FileNumber, char Value, long RecordNumber = -1) { } + public static void FilePut(int FileNumber, decimal Value, long RecordNumber = -1) { } + public static void FilePut(int FileNumber, double Value, long RecordNumber = -1) { } + public static void FilePut(int FileNumber, float Value, long RecordNumber = -1) { } + public static void FilePut(int FileNumber, int Value, long RecordNumber = -1) { } + public static void FilePut(int FileNumber, long Value, long RecordNumber = -1) { } + [System.ObsoleteAttribute("This member has been deprecated. Please use FilePutObject to write Object types, or coerce FileNumber and RecordNumber to Integer for writing non-Object types. http://go.microsoft.com/fwlink/?linkid=14202")] + public static void FilePut(object FileNumber, object Value, object RecordNumber/* = -1*/) { } + public static void FilePut(int FileNumber, short Value, long RecordNumber = -1) { } + public static void FilePut(int FileNumber, string Value, long RecordNumber = -1, bool StringIsFixedLength = false) { } + public static void FilePut(int FileNumber, System.Array Value, long RecordNumber = -1, bool ArrayIsDynamic = false, bool StringIsFixedLength = false) { } + public static void FilePut(int FileNumber, System.DateTime Value, long RecordNumber = -1) { } + public static void FilePut(int FileNumber, System.ValueType Value, long RecordNumber = -1) { } + public static void FilePutObject(int FileNumber, object Value, long RecordNumber = -1) { } + public static void FileWidth(int FileNumber, int RecordWidth) { } + public static int FreeFile(){ throw null; } + public static FileAttribute GetAttr(string PathName){ throw null; } + public static void Input(int FileNumber, ref bool Value) { } + public static void Input(int FileNumber, ref byte Value) { } + public static void Input(int FileNumber, ref char Value) { } + public static void Input(int FileNumber, ref decimal Value) { } + public static void Input(int FileNumber, ref double Value) { } + public static void Input(int FileNumber, ref float Value) { } + public static void Input(int FileNumber, ref int Value) { } + public static void Input(int FileNumber, ref long Value) { } + public static void Input(int FileNumber, ref object Value) { } + public static void Input(int FileNumber, ref short Value) { } + public static void Input(int FileNumber, ref string Value) { } + public static void Input(int FileNumber, ref System.DateTime Value) { } + public static string InputString(int FileNumber, int CharCount){ throw null; } + public static void Kill(string PathName) { } + public static string LineInput(int FileNumber){ throw null; } + public static long Loc(int FileNumber){ throw null; } + public static void Lock(int FileNumber){ throw null; } + public static void Lock(int FileNumber, long FromRecord, long ToRecord) { } + public static void Lock(int FileNumber, long Record) { } + public static long LOF(int FileNumber){ throw null; } + public static void MkDir(string Path) { } + public static void Print(int FileNumber, params object[] Output) { } + public static void PrintLine(int FileNumber, params object[] Output) { } + public static void Rename(string OldPath, string NewPath) { } + public static void Reset() { } + public static void RmDir(string Path) { } + public static void Seek(int FileNumber, long Position) { } + public static long Seek(int FileNumber) { throw null; } + public static void SetAttr(string PathName, FileAttribute Attributes) { } + public static SpcInfo SPC(short Count){ throw null; } + public static TabInfo TAB(){ throw null; } + public static TabInfo TAB(short Column){ throw null; } + public static void Unlock(int FileNumber) { } + public static void Unlock(int FileNumber, long Record) { } + public static void Unlock(int FileNumber, long FromRecord, long ToRecord) { } + public static void Write(int FileNumber, params object[] Output) { } + public static void WriteLine(int FileNumber, params object[] Output) { } + } [System.AttributeUsageAttribute(System.AttributeTargets.Class, AllowMultiple=false, Inherited=false)] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public sealed partial class HideModuleNameAttribute : System.Attribute @@ -218,6 +340,34 @@ public MyGroupCollectionAttribute(string typeToCollect, string createInstanceMet public string DisposeMethod { get { throw null; } } public string MyGroupName { get { throw null; } } } + public enum OpenAccess + { + Default = -1, + Read = 1, + ReadWrite = 3, + Write = 2, + } + public enum OpenMode + { + Append = 8, + Binary = 32, + Input = 1, + Output = 2, + Random = 4, + } + public enum OpenShare + { + Default = -1, + LockRead = 2, + LockReadWrite = 0, + LockWrite = 1, + Shared = 3 + } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public struct SpcInfo + { + public short Count; + } [Microsoft.VisualBasic.CompilerServices.StandardModuleAttribute] public sealed partial class Strings { @@ -284,6 +434,11 @@ internal Strings() { } public static char UCase(char Value) { throw null; } public static string UCase(string Value) { throw null; } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public struct TabInfo + { + public short Column; + } public enum TriState { False = 0, diff --git a/src/Microsoft.VisualBasic.Core/src/Microsoft.VisualBasic.Core.vbproj b/src/Microsoft.VisualBasic.Core/src/Microsoft.VisualBasic.Core.vbproj index 175eaa807c6a..c8413b93ff8e 100644 --- a/src/Microsoft.VisualBasic.Core/src/Microsoft.VisualBasic.Core.vbproj +++ b/src/Microsoft.VisualBasic.Core/src/Microsoft.VisualBasic.Core.vbproj @@ -21,7 +21,7 @@ - + @@ -51,6 +51,7 @@ + @@ -72,6 +73,11 @@ + + + + + diff --git a/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/CompilerServices/IOUtils.vb b/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/CompilerServices/IOUtils.vb new file mode 100644 index 000000000000..95e83cf4203f --- /dev/null +++ b/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/CompilerServices/IOUtils.vb @@ -0,0 +1,143 @@ +' Licensed to the .NET Foundation under one or more agreements. +' The .NET Foundation licenses this file to you under the MIT license. +' See the LICENSE file in the project root for more information. + +Imports System +Imports System.Security +Imports System.IO + +Imports Microsoft.VisualBasic.CompilerServices.ExceptionUtils +Imports Microsoft.VisualBasic.CompilerServices.Utils + +Namespace Microsoft.VisualBasic.CompilerServices + + _ + Class IOUtils + ' Prevent creation. + Private Sub New() + End Sub + + Friend Shared Function FindFirstFile(ByVal assem As System.Reflection.Assembly, ByVal PathName As String, ByVal Attributes As IO.FileAttributes) As String + Dim Dir As DirectoryInfo + Dim DirName As String = Nothing + Dim FileName As String + Dim files() As FileSystemInfo + Dim oAssemblyData As AssemblyData + Const DiskNotReadyError As Integer = &H80070015 + + If PathName.Length > 0 AndAlso PathName.Chars(PathName.Length - 1) = Path.DirectorySeparatorChar Then + DirName = Path.GetFullPath(PathName) + FileName = "*.*" + Else + If PathName.Length = 0 Then + FileName = "*.*" + Else + FileName = Path.GetFileName(PathName) + DirName = Path.GetDirectoryName(PathName) + + If (FileName Is Nothing) OrElse (FileName.Length = 0) OrElse (FileName = ".") Then + FileName = "*.*" + End If + End If + + If (DirName Is Nothing) OrElse (DirName.Length = 0) Then + If Path.IsPathRooted(PathName) Then + DirName = Path.GetPathRoot(PathName) + Else + DirName = Environment.CurrentDirectory + If DirName.Chars(DirName.Length - 1) <> Path.DirectorySeparatorChar Then + DirName = DirName & Path.DirectorySeparatorChar + End If + End If + Else + If DirName.Chars(DirName.Length - 1) <> Path.DirectorySeparatorChar Then + DirName = DirName & Path.DirectorySeparatorChar + End If + End If + + If FileName = ".." Then + DirName = DirName & "..\" + FileName = "*.*" + End If + End If + + Try + Dir = Directory.GetParent(DirName & FileName) + files = Dir.GetFileSystemInfos(FileName) + Catch ex As SecurityException + Throw ex + Catch IOex As IOException When _ + (System.Runtime.InteropServices.Marshal.GetHRForException(IOex) = DiskNotReadyError) + Throw VbMakeException(vbErrors.BadFileNameOrNumber) + Catch ex As StackOverflowException + Throw ex + Catch ex As OutOfMemoryException + Throw ex + Catch ex As System.Threading.ThreadAbortException + Throw ex + Catch + Return "" + End Try + + oAssemblyData = ProjectData.GetProjectData().GetAssemblyData(assem) + oAssemblyData.m_DirFiles = files + oAssemblyData.m_DirNextFileIndex = 0 + oAssemblyData.m_DirAttributes = Attributes + + If (files Is Nothing) OrElse (files.Length = 0) Then + Return "" + End If + + Return FindFileFilter(oAssemblyData) + End Function + + Friend Shared Function FindNextFile(ByVal assem As System.Reflection.Assembly) As String + Dim oAssemblyData As AssemblyData + + oAssemblyData = ProjectData.GetProjectData().GetAssemblyData(assem) + + If oAssemblyData.m_DirFiles Is Nothing Then + Throw New ArgumentException(GetResourceString(SR.DIR_IllegalCall)) + End If + + If oAssemblyData.m_DirNextFileIndex > oAssemblyData.m_DirFiles.GetUpperBound(0) Then + 'Prevent hitting the security check in this scenario + oAssemblyData.m_DirFiles = Nothing + oAssemblyData.m_DirNextFileIndex = 0 + Return Nothing + End If + + Return FindFileFilter(oAssemblyData) + End Function + + Private Shared Function FindFileFilter(ByVal oAssemblyData As AssemblyData) As String + Dim Index As Integer + Dim files() As FileSystemInfo + Dim file As FileSystemInfo + + files = oAssemblyData.m_DirFiles + Index = oAssemblyData.m_DirNextFileIndex + + Do While True + If Index > files.GetUpperBound(0) Then + oAssemblyData.m_DirFiles = Nothing + oAssemblyData.m_DirNextFileIndex = 0 + Return Nothing + End If + + file = files(Index) + + If ((file.Attributes And (FileAttributes.Directory Or FileAttributes.System Or FileAttributes.Hidden)) = 0) OrElse + ((file.Attributes And oAssemblyData.m_DirAttributes) <> 0) Then + oAssemblyData.m_DirNextFileIndex = Index + 1 + Return files(Index).Name + End If + + Index += 1 + Loop + Return Nothing + End Function + + End Class + +End Namespace diff --git a/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/CompilerServices/ProjectData.vb b/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/CompilerServices/ProjectData.vb index 673854277794..ffdb225a6ca9 100644 --- a/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/CompilerServices/ProjectData.vb +++ b/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/CompilerServices/ProjectData.vb @@ -3,22 +3,113 @@ ' See the LICENSE file in the project root for more information. Imports System +Imports Microsoft.VisualBasic.CompilerServices.Utils Imports Microsoft.VisualBasic.FileIO Namespace Global.Microsoft.VisualBasic.CompilerServices + + + Friend NotInheritable Class AssemblyData + + Friend Sub New() + Dim i As Integer + Dim o As Object + Dim files As Collections.ArrayList = New Collections.ArrayList(256) + + o = Nothing + + For i = 0 To 255 + files.Add(o) + Next + m_Files = files + End Sub + + Friend Function GetChannelObj(ByVal lChannel As Integer) As VB6File + Dim o As Object + + If (lChannel < m_Files.Count) Then + o = m_Files.Item(lChannel) + Else + o = Nothing + End If + + Return CType(o, VB6File) + End Function + + Friend Sub SetChannelObj(ByVal lChannel As Integer, ByVal oFile As VB6File) + If m_Files Is Nothing Then + m_Files = New Collections.ArrayList(256) + End If + + Dim o As Object + + If oFile Is Nothing Then + Dim f As VB6File + f = CType(m_Files.Item(lChannel), VB6File) + If (Not f Is Nothing) Then + f.CloseFile() + End If + m_Files.Item(lChannel) = Nothing + Else + o = oFile + m_Files.Item(lChannel) = o + End If + End Sub + + Public m_Files As Collections.ArrayList + Friend m_DirFiles() As IO.FileSystemInfo + Friend m_DirNextFileIndex As Integer + Friend m_DirAttributes As IO.FileAttributes + + End Class + Public NotInheritable Class ProjectData Friend m_Err As ErrObject Friend m_rndSeed As Integer = &H50000I + Friend m_numprsPtr() As Byte + Friend m_DigitArray() As Byte 'm_oProject is per-Thread Private Shared m_oProject As ProjectData + Friend m_AssemblyData As Collections.Hashtable + Private Sub New() + MyBase.New() + + m_AssemblyData = New System.Collections.Hashtable + + Const DIGIT_ARRAY_SIZE As Integer = 30 + Const NUMPRS_SIZE As Integer = 24 + + ReDim m_numprsPtr(NUMPRS_SIZE - 1) + ReDim m_DigitArray(DIGIT_ARRAY_SIZE - 1) + End Sub + Private m_CachedMSCoreLibAssembly As System.Reflection.Assembly = GetType(System.Int32).Assembly + + Friend Function GetAssemblyData(ByVal assem As System.Reflection.Assembly) As AssemblyData + 'The first time, we will get an exception, but the remainder of the time there will be less overhead + ' + If assem Is Utils.VBRuntimeAssembly OrElse assem Is m_CachedMSCoreLibAssembly Then + 'Must have been from a latebound call to our own apis (potentially through context of mscorlib) + 'This must not be allowed, as it would cause files to be shared across assemblies + Throw New Security.SecurityException(GetResourceString(SR.Security_LateBoundCallsNotPermitted)) + End If + + Dim AssemData As AssemblyData = CType(m_AssemblyData.Item(assem), AssemblyData) + If (AssemData Is Nothing) Then + AssemData = New AssemblyData + m_AssemblyData.Item(assem) = AssemData + End If + + Return AssemData + End Function + Friend Shared Function GetProjectData() As ProjectData '************************* '*** PERFORMANCE NOTE: *** diff --git a/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/CompilerServices/VB6BinaryFile.vb b/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/CompilerServices/VB6BinaryFile.vb new file mode 100644 index 000000000000..1d52d4414e66 --- /dev/null +++ b/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/CompilerServices/VB6BinaryFile.vb @@ -0,0 +1,209 @@ +' Licensed to the .NET Foundation under one or more agreements. +' The .NET Foundation licenses this file to you under the MIT license. +' See the LICENSE file in the project root for more information. + +Imports System +Imports Microsoft.VisualBasic.CompilerServices.ExceptionUtils +Imports Microsoft.VisualBasic.CompilerServices.Utils + +Namespace Microsoft.VisualBasic.CompilerServices + + + Friend Class VB6BinaryFile + + '============================================================================ + ' Declarations + '============================================================================ + + Inherits VB6RandomFile + + '============================================================================ + ' Constructor + '============================================================================ + Public Sub New(ByVal FileName As String, ByVal access As OpenAccess, ByVal share As OpenShare) + MyBase.New(FileName, access, share, -1) + End Sub + + ' the implementation of Lock in base class VB6RandomFile does not handle m_lRecordLen=-1 + Friend Overloads Overrides Sub Lock(ByVal lStart As Long, ByVal lEnd As Long) + If lStart > lEnd Then + Throw New ArgumentException(GetResourceString(SR.Argument_InvalidValue1, "Start")) + End If + + Dim absRecordLength As Long + Dim lStartByte As Long + Dim lLength As Long + + If m_lRecordLen = -1 Then + ' if record len is -1, then using absolute bytes + absRecordLength = 1 + Else + absRecordLength = m_lRecordLen + End If + + lStartByte = (lStart - 1) * absRecordLength + lLength = (lEnd - lStart + 1) * absRecordLength + + m_file.Lock(lStartByte, lLength) + End Sub + + ' see Lock description + Friend Overloads Overrides Sub Unlock(ByVal lStart As Long, ByVal lEnd As Long) + If lStart > lEnd Then + Throw New ArgumentException(GetResourceString(SR.Argument_InvalidValue1, "Start")) + End If + + Dim absRecordLength As Long + Dim lStartByte As Long + Dim lLength As Long + + If m_lRecordLen = -1 Then + ' if record len is -1, then using absolute bytes + absRecordLength = 1 + Else + absRecordLength = m_lRecordLen + End If + + lStartByte = (lStart - 1) * absRecordLength + lLength = (lEnd - lStart + 1) * absRecordLength + m_file.Unlock(lStartByte, lLength) + End Sub + + Public Overrides Function GetMode() As OpenMode + Return OpenMode.Binary + End Function + + Friend Overloads Overrides Function Seek() As Long + 'm_file.position is the last read byte as a zero based offset + 'Seek returns the position of the next byte to read + Return (m_position + 1) + End Function + + Friend Overloads Overrides Sub Seek(ByVal BaseOnePosition As Long) + If BaseOnePosition <= 0 Then + Throw VbMakeException(vbErrors.BadRecordNum) + End If + + Dim BaseZeroPosition As Long = BaseOnePosition - 1 + + m_file.Position = BaseZeroPosition + m_position = BaseZeroPosition + + If Not m_sr Is Nothing Then + m_sr.DiscardBufferedData() + End If + End Sub + + Friend Overrides Function LOC() As Long + Return m_position + End Function + + Friend Overrides Function CanInput() As Boolean + Return True + End Function + + Friend Overrides Function CanWrite() As Boolean + Return True + End Function + + Friend Overloads Overrides Sub Input(ByRef Value As Object) + Value = InputStr() + End Sub + + Friend Overloads Overrides Sub Input(ByRef Value As String) + Value = InputStr() + End Sub + + Friend Overloads Overrides Sub Input(ByRef Value As Char) + Dim s As String = InputStr() + + If s.Length > 0 Then + Value = s.Chars(0) + Else + Value = ControlChars.NullChar + End If + End Sub + + Friend Overloads Overrides Sub Input(ByRef Value As Boolean) + Value = BooleanType.FromString(InputStr()) + End Sub + + Friend Overloads Overrides Sub Input(ByRef Value As Byte) + Value = ByteType.FromObject(InputNum(VariantType.Byte)) + End Sub + + Friend Overloads Overrides Sub Input(ByRef Value As Short) + Value = ShortType.FromObject(InputNum(VariantType.Short)) + End Sub + + Friend Overloads Overrides Sub Input(ByRef Value As Integer) + Value = IntegerType.FromObject(InputNum(VariantType.Integer)) + End Sub + + Friend Overloads Overrides Sub Input(ByRef Value As Long) + Value = LongType.FromObject(InputNum(VariantType.Long)) + End Sub + + Friend Overloads Overrides Sub Input(ByRef Value As Single) + Value = SingleType.FromObject(InputNum(VariantType.Single)) + End Sub + + Friend Overloads Overrides Sub Input(ByRef Value As Double) + Value = DoubleType.FromObject(InputNum(VariantType.Double)) + End Sub + + Friend Overloads Overrides Sub Input(ByRef Value As Decimal) + Value = DecimalType.FromObject(InputNum(VariantType.Decimal)) + End Sub + + Friend Overloads Overrides Sub Input(ByRef Value As Date) + Value = DateType.FromString(InputStr(), GetCultureInfo()) + End Sub + + Friend Overloads Overrides Sub Put(ByVal Value As String, Optional ByVal RecordNumber As Long = 0, Optional ByVal StringIsFixedLength As Boolean = False) + ValidateWriteable() + + PutString(RecordNumber, Value) + End Sub + + Friend Overloads Overrides Sub [Get](ByRef Value As String, Optional ByVal RecordNumber As Long = 0, Optional ByVal StringIsFixedLength As Boolean = False) + ValidateReadable() + + Dim ByteLength As Integer + If Value Is Nothing Then + ByteLength = 0 + Else + Diagnostics.Debug.Assert(Not m_Encoding Is Nothing) + ByteLength = m_Encoding.GetByteCount(Value) + End If + Value = GetFixedLengthString(RecordNumber, ByteLength) + End Sub + + Protected Overrides Function InputStr() As String + Dim lChar As Integer + + ' The NullReferenceException is for compatibility with VB6 which threw a NullReferenceException when + ' reading from a file that was write-only. The inner exception was added to provide more context. + If (m_access <> OpenAccess.ReadWrite) AndAlso (m_access <> OpenAccess.Read) Then + Dim JustNeedTheMessage As New NullReferenceException ' We don't have access to the localized resources for this string. + Throw New NullReferenceException(JustNeedTheMessage.Message, New IO.IOException(GetResourceString(SR.FileOpenedNoRead))) + End If + + ' read past any leading spaces or tabs + 'Skip over leading whitespace + lChar = SkipWhiteSpaceEOF() + + If lChar = lchDoubleQuote Then + lChar = m_sr.Read() + m_position += 1 + InputStr = ReadInField(FIN_QSTRING) + Else + InputStr = ReadInField(FIN_STRING) + End If + + SkipTrailingWhiteSpace() + End Function + + End Class + +End Namespace diff --git a/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/CompilerServices/VB6File.vb b/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/CompilerServices/VB6File.vb new file mode 100644 index 000000000000..a0c3102a329a --- /dev/null +++ b/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/CompilerServices/VB6File.vb @@ -0,0 +1,2680 @@ +' Licensed to the .NET Foundation under one or more agreements. +' The .NET Foundation licenses this file to you under the MIT license. +' See the LICENSE file in the project root for more information. + +Imports System +Imports System.Diagnostics +Imports System.Security +Imports System.Globalization +Imports System.IO +Imports System.Text + +Imports Microsoft.VisualBasic.CompilerServices.StructUtils +Imports Microsoft.VisualBasic.CompilerServices.ExceptionUtils +Imports Microsoft.VisualBasic.CompilerServices.Utils + +Namespace Microsoft.VisualBasic.CompilerServices + + Friend Enum tagVT As Short + VT_EMPTY = 0 + VT_NULL = 1 + VT_I2 = 2 + VT_I4 = 3 + VT_R4 = 4 + VT_R8 = 5 + VT_CY = 6 + VT_DATE = 7 + VT_BSTR = 8 + VT_DISPATCH = 9 + VT_ERROR = 10 + VT_BOOL = 11 + VT_VARIANT = 12 + VT_UNKNOWN = 13 + VT_DECIMAL = 14 + VT_I1 = 16 + VT_UI1 = 17 + VT_UI2 = 18 + VT_UI4 = 19 + VT_I8 = 20 + VT_UI8 = 21 + VT_INT = 22 + VT_UINT = 23 + VT_VOID = 24 + VT_HRESULT = 25 + VT_PTR = 26 + VT_SAFEARRAY = 27 + VT_CARRAY = 28 + VT_USERDEFINED = 29 + VT_LPSTR = 30 + VT_LPWSTR = 31 + VT_RECORD = 36 + VT_FILETIME = 64 + VT_BLOB = 65 + VT_STREAM = 66 + VT_STORAGE = 67 + VT_STREAMED_OBJECT = 68 + VT_STORED_OBJECT = 69 + VT_BLOB_OBJECT = 70 + VT_CF = 71 + VT_CLSID = 72 + VT_BSTR_BLOB = 4095 + VT_VECTOR = 4096 + VT_ARRAY = 8192 + VT_BYREF = 16384 + VT_RESERVED = &H8000S + VT_ILLEGAL = &HFFFFS + VT_ILLEGALMASKED = 4095 + VT_TYPEMASK = 4095 + End Enum + + Friend Enum VT As Short + [Error] = tagVT.VT_ERROR + [Boolean] = tagVT.VT_BOOL + [Byte] = tagVT.VT_UI1 + [Short] = tagVT.VT_I2 + [Integer] = tagVT.VT_I4 + [Decimal] = tagVT.VT_DECIMAL + [Single] = tagVT.VT_R4 + [Double] = tagVT.VT_R8 + [String] = tagVT.VT_BSTR + [ByteArray] = tagVT.VT_UI1 Or _ + tagVT.VT_ARRAY + [CharArray] = tagVT.VT_UI2 Or _ + tagVT.VT_ARRAY + [Date] = tagVT.VT_DATE + [Long] = tagVT.VT_I8 + [Char] = tagVT.VT_UI2 + [Variant] = tagVT.VT_VARIANT + [Array] = tagVT.VT_ARRAY + [DBNull] = tagVT.VT_NULL + [Empty] = tagVT.VT_EMPTY + [Structure] = tagVT.VT_RECORD + [Currency] = tagVT.VT_CY + End Enum + + _ + Friend NotInheritable Class PutHandler + Implements IRecordEnum + Public m_oFile As VB6File + + Sub New(ByVal oFile As VB6File) + MyBase.New() + m_oFile = oFile + End Sub + + Function Callback(ByVal field_info As Reflection.FieldInfo, ByRef vValue As Object) As Boolean Implements IRecordEnum.Callback + Dim FieldType As System.Type = field_info.FieldType + + If FieldType Is Nothing Then + Throw VbMakeException(New ArgumentException(GetResourceString(SR.Argument_UnsupportedFieldType2, field_info.Name, "Empty")), vbErrors.IllegalFuncCall) + End If + + If FieldType.IsArray() Then + Dim attributeList As Object() + Dim ElementType As System.Type + Dim attrFixedArray As VBFixedArrayAttribute + Dim FixedStringLength As Integer = -1 + + attributeList = field_info.GetCustomAttributes(GetType(VBFixedArrayAttribute), False) + If Not attributeList Is Nothing AndAlso attributeList.Length <> 0 Then + attrFixedArray = CType(attributeList(0), VBFixedArrayAttribute) + Else + attrFixedArray = Nothing + End If + + ElementType = FieldType.GetElementType() + + If ElementType Is GetType(System.String) Then + attributeList = field_info.GetCustomAttributes(GetType(VBFixedStringAttribute), False) + If attributeList Is Nothing OrElse attributeList.Length = 0 Then + FixedStringLength = -1 + Else + FixedStringLength = CType(attributeList(0), VBFixedStringAttribute).Length + End If + End If + + If attrFixedArray Is Nothing Then + + m_oFile.PutDynamicArray(0, CType(vValue, System.Array), False, FixedStringLength) + + Else + + m_oFile.PutFixedArray(0, CType(vValue, System.Array), ElementType, FixedStringLength, attrFixedArray.FirstBound, attrFixedArray.SecondBound) + + End If + + Else + Select Case Type.GetTypeCode(FieldType) + Case TypeCode.String + Dim s As String + + If Not vValue Is Nothing Then + s = vValue.ToString() + Else + s = Nothing + End If + + Dim attributeList As Object() = field_info.GetCustomAttributes(GetType(VBFixedStringAttribute), False) + + 'If (field_info.Attributes And Reflection.FieldAttributes.HasFieldMarshal) <> Reflection.FieldAttributes.HasFieldMarshal Then + If attributeList Is Nothing OrElse attributeList.Length = 0 Then + m_oFile.PutStringWithLength(0, s) + Else + Dim ma As VBFixedStringAttribute + Dim length As Integer + + ma = CType(attributeList(0), VBFixedStringAttribute) + length = ma.Length + + If length = 0 Then + length = -1 + End If + + m_oFile.PutFixedLengthString(0, s, length) + End If + Case TypeCode.Single + m_oFile.PutSingle(0, SingleType.FromObject(vValue)) + Case TypeCode.Double + m_oFile.PutDouble(0, DoubleType.FromObject(vValue)) + Case TypeCode.Int16 + m_oFile.PutShort(0, ShortType.FromObject(vValue)) + Case TypeCode.Int32 + m_oFile.PutInteger(0, IntegerType.FromObject(vValue)) + Case TypeCode.Byte + m_oFile.PutByte(0, ByteType.FromObject(vValue)) + Case TypeCode.Int64 + m_oFile.PutLong(0, LongType.FromObject(vValue)) + Case TypeCode.DateTime + m_oFile.PutDate(0, DateType.FromObject(vValue)) + Case TypeCode.Boolean + m_oFile.PutBoolean(0, BooleanType.FromObject(vValue)) + Case TypeCode.Decimal + m_oFile.PutDecimal(0, DecimalType.FromObject(vValue)) + Case TypeCode.Char + m_oFile.PutChar(0, CharType.FromObject(vValue)) + Case TypeCode.DBNull + Throw VbMakeException(New ArgumentException(GetResourceString(SR.Argument_UnsupportedFieldType2, field_info.Name, "DBNull")), vbErrors.IllegalFuncCall) + Case Else 'Case TypeCode.Object + If FieldType Is GetType(Object) Then + m_oFile.PutObject(vValue, 0) + ElseIf FieldType Is GetType(System.Exception) Then + Throw VbMakeException(New ArgumentException(GetResourceString(SR.Argument_UnsupportedFieldType2, field_info.Name, "Exception")), vbErrors.IllegalFuncCall) + ElseIf FieldType Is GetType(System.Reflection.Missing) Then + Throw VbMakeException(New ArgumentException(GetResourceString(SR.Argument_UnsupportedFieldType2, field_info.Name, "Missing")), vbErrors.IllegalFuncCall) + Else + Throw VbMakeException(New ArgumentException(GetResourceString(SR.Argument_UnsupportedFieldType2, field_info.Name, FieldType.Name)), vbErrors.IllegalFuncCall) + End If + End Select + End If + + Return False + End Function + End Class + + + Friend NotInheritable Class GetHandler + Implements IRecordEnum + Dim m_oFile As VB6File + + Sub New(ByVal oFile As VB6File) + MyBase.New() + m_oFile = oFile + End Sub + + Function Callback(ByVal field_info As Reflection.FieldInfo, ByRef vValue As Object) As Boolean Implements IRecordEnum.Callback + Dim FieldType As System.Type + + FieldType = field_info.FieldType + + If FieldType Is Nothing Then + Throw VbMakeException(New ArgumentException(GetResourceString(SR.Argument_UnsupportedFieldType2, field_info.Name, "Empty")), vbErrors.IllegalFuncCall) + End If + + If FieldType.IsArray() Then + Dim attributeList As Object() = field_info.GetCustomAttributes(GetType(VBFixedArrayAttribute), False) + Dim arr As System.Array = Nothing + Dim FixedStringLength As Integer = -1 + + Dim FixedStringAttributeList As Object() = field_info.GetCustomAttributes(GetType(VBFixedStringAttribute), False) + If Not FixedStringAttributeList Is Nothing AndAlso FixedStringAttributeList.Length > 0 Then + Dim FixedStringAttribute As VBFixedStringAttribute = CType(FixedStringAttributeList(0), VBFixedStringAttribute) + If FixedStringAttribute.Length > 0 Then + FixedStringLength = FixedStringAttribute.Length + End If + End If + + If attributeList Is Nothing OrElse attributeList.Length = 0 Then + m_oFile.GetDynamicArray(arr, FieldType.GetElementType, FixedStringLength) + Else + Dim attr As VBFixedArrayAttribute = CType(attributeList(0), VBFixedArrayAttribute) + Dim FirstBound As Integer = attr.FirstBound + Dim SecondBound As Integer = attr.SecondBound + arr = CType(vValue, System.Array) + + m_oFile.GetFixedArray(0, arr, FieldType.GetElementType(), FirstBound, SecondBound, FixedStringLength) + End If + + vValue = arr + Else + Select Case Type.GetTypeCode(FieldType) + Case TypeCode.String + Dim attributeList As Object() = field_info.GetCustomAttributes(GetType(VBFixedStringAttribute), False) + + If attributeList Is Nothing OrElse attributeList.Length = 0 Then + vValue = m_oFile.GetLengthPrefixedString(0) + Else + + Dim ma As VBFixedStringAttribute = CType(attributeList(0), VBFixedStringAttribute) + Dim length As Integer = ma.Length + + If length = 0 Then + length = -1 + End If + vValue = m_oFile.GetFixedLengthString(0, length) + End If + Case TypeCode.Single + vValue = m_oFile.GetSingle(0) + Case TypeCode.Double + vValue = m_oFile.GetDouble(0) + Case TypeCode.Int16 + vValue = m_oFile.GetShort(0) + Case TypeCode.Int32 + vValue = m_oFile.GetInteger(0) + Case TypeCode.Byte + vValue = m_oFile.GetByte(0) + Case TypeCode.Int64 + vValue = m_oFile.GetLong(0) + Case TypeCode.DateTime + vValue = m_oFile.GetDate(0) + Case TypeCode.Boolean + vValue = m_oFile.GetBoolean(0) + Case TypeCode.Decimal + vValue = m_oFile.GetDecimal(0) + Case TypeCode.Char + vValue = m_oFile.GetChar(0) + Case TypeCode.DBNull + Throw VbMakeException(New ArgumentException(GetResourceString(SR.Argument_UnsupportedFieldType2, field_info.Name, "DBNull")), vbErrors.IllegalFuncCall) + Case Else + 'Case TypeCode.Object + If FieldType Is GetType(Object) Then + m_oFile.GetObject(vValue) + ElseIf FieldType Is GetType(System.Exception) Then + Throw VbMakeException(New ArgumentException(GetResourceString(SR.Argument_UnsupportedFieldType2, field_info.Name, "Exception")), vbErrors.IllegalFuncCall) + ElseIf FieldType Is GetType(System.Reflection.Missing) Then + Throw VbMakeException(New ArgumentException(GetResourceString(SR.Argument_UnsupportedFieldType2, field_info.Name, "Missing")), vbErrors.IllegalFuncCall) + Else + Throw VbMakeException(New ArgumentException(GetResourceString(SR.Argument_UnsupportedFieldType2, field_info.Name, FieldType.Name)), vbErrors.IllegalFuncCall) + End If + End Select + End If + + Return False + End Function + End Class + + '********************************************** + '* + '* VB6File + '* + '* Base for all VB6 compatible file i/o + '* + '********************************************** + + Friend MustInherit Class VB6File + Friend m_lCurrentColumn As Integer + Friend m_lWidth As Integer + Friend m_lRecordLen As Integer + Friend m_lRecordStart As Long + Friend m_sFullPath As String + Friend m_share As OpenShare + Friend m_access As OpenAccess + Friend m_eof As Boolean + Friend m_position As Long + Friend m_file As FileStream + Friend m_fAppend As Boolean + Friend m_bPrint As Boolean + Protected m_sw As StreamWriter + Protected m_sr As StreamReader + Protected m_bw As BinaryWriter + Protected m_br As BinaryReader + Protected m_Encoding As Encoding + + Protected Const lchTab As Integer = 9 + Protected Const lchCR As Integer = 13 + Protected Const lchLF As Integer = 10 + Protected Const lchSpace As Integer = 32 + Protected Const lchIntlSpace As Integer = &H3000I + Protected Const lchDoubleQuote As Integer = 34 + Protected Const lchPound As Integer = AscW("#") + Protected Const lchComma As Integer = AscW(",") + Protected Const EOF_INDICATOR As Integer = -1 + Protected Const EOF_CHAR As Integer = &H1A + Protected Const FIN_NUMTERMCHAR As Short = 6 + Protected Const FIN_LINEINP As Short = 0 + Protected Const FIN_QSTRING As Short = 1 + Protected Const FIN_STRING As Short = 2 + Protected Const FIN_NUMBER As Short = 3 + + '============================================================================ + ' Construction functions. + '============================================================================ + Protected Sub New() + MyBase.New() + End Sub + + Protected Sub New(ByVal sPath As String, ByVal access As OpenAccess, ByVal share As OpenShare, ByVal lRecordLen As Integer) + MyBase.New() + + If access <> OpenAccess.Read AndAlso + access <> OpenAccess.ReadWrite AndAlso + access <> OpenAccess.Write Then + Throw New ArgumentException(GetResourceString(SR.Argument_InvalidValue1, "Access")) + End If + m_access = access + + If (share <> OpenShare.Shared AndAlso + share <> OpenShare.LockRead AndAlso + share <> OpenShare.LockReadWrite AndAlso + share <> OpenShare.LockWrite) Then + Throw New ArgumentException(GetResourceString(SR.Argument_InvalidValue1, "Share")) + End If + + m_share = share + + m_lRecordLen = lRecordLen + m_sFullPath = (New FileInfo(sPath)).FullName + End Sub + + '============================================================================ + ' Open/Close/Information functions. + '============================================================================ + Friend Function GetAbsolutePath() As String + Return m_sFullPath + End Function + + Friend Overridable Sub OpenFile() + Try + If File.Exists(m_sFullPath) Then + m_file = New FileStream(m_sFullPath, FileMode.Open, CType(m_access, FileAccess), CType(m_share, FileShare)) + Else + m_file = New FileStream(m_sFullPath, FileMode.Create, CType(m_access, FileAccess), CType(m_share, FileShare)) + End If + + Catch e2 As SecurityException + Throw VbMakeException(vbErrors.FileNotFound) + + End Try + End Sub + + Friend Overridable Sub CloseFile() + CloseTheFile() + End Sub + + Protected Sub CloseTheFile() + If m_sw Is Nothing Then + 'nothing to do + Else + m_sw.Close() + m_sw = Nothing + End If + + If m_sr Is Nothing Then + 'nothing to do + Else + m_sr.Close() + m_sr = Nothing + End If + + If Not m_file Is Nothing Then + m_file.Close() + m_file = Nothing + End If + End Sub + + Friend Function GetColumn() As Integer + Return m_lCurrentColumn + End Function + + Friend Sub SetColumn(ByVal lColumn As Integer) + If m_lWidth <> 0 AndAlso m_lCurrentColumn <> 0 AndAlso + (lColumn + 14) > m_lWidth Then + WriteLine(Nothing) + Else + SPC(lColumn - m_lCurrentColumn) + End If + End Sub + + Friend Function GetWidth() As Integer + Return m_lWidth + End Function + + Friend Sub SetWidth(ByVal RecordWidth As Integer) + If RecordWidth < 0 OrElse RecordWidth > 255 Then + Throw VbMakeException(vbErrors.IllegalFuncCall) + End If + + m_lWidth = RecordWidth + End Sub + + '============================================================================ + ' Output functions. + '============================================================================ + Friend Overridable Sub WriteLine(ByVal s As String) + Throw VbMakeException(vbErrors.BadFileMode) + End Sub + + Friend Overridable Sub WriteString(ByVal s As String) + Throw VbMakeException(vbErrors.BadFileMode) + End Sub + + Friend Overridable Function EOF() As Boolean + Return m_eof + End Function + + Friend Function LOF() As Long + Return m_file.Length + End Function + + Friend Overridable Function LOC() As Long + If (m_lRecordLen = -1) OrElse (GetMode() <> OpenMode.Random) Then + Return (m_position + 1) + End If + + If m_lRecordLen = 0 Then + Throw VbMakeException(vbErrors.InternalError) + Else + Dim pos As Long + pos = m_position + + If pos = 0 Then + Return 0 + End If + + Return (m_position \ m_lRecordLen) + 1 + End If + End Function + + Friend Overridable Function GetStreamReader() As StreamReader + Return m_sr + End Function + + Friend Sub SetRecord(ByVal RecordNumber As Long) + Dim lSeekPos As Long + + If m_lRecordLen = 0 Then + Exit Sub + End If + + If RecordNumber = 0 Then + Exit Sub + ElseIf m_lRecordLen = -1 Then + If RecordNumber = -1 Then + 'Binary file, leave at current position + Exit Sub + Else + 'No records, use actual byte position + lSeekPos = RecordNumber - 1 + End If + ElseIf RecordNumber = -1 Then + 'Go to next record + lSeekPos = GetPos() + + If lSeekPos = 0 Then + m_lRecordStart = 0 + Exit Sub + End If + + If (lSeekPos Mod m_lRecordLen) = 0 Then + 'Already on record boundary + m_lRecordStart = lSeekPos + Exit Sub + End If + + 'Go to next record + lSeekPos = m_lRecordLen * (lSeekPos \ m_lRecordLen + 1) + ElseIf RecordNumber <> 0 Then + 'Go to specified record + 'lSeekPos = (RecordNumber - 1) * m_lRecordLen + + If m_lRecordLen = -1 Then + lSeekPos = RecordNumber + Else + lSeekPos = (RecordNumber - 1) * m_lRecordLen + End If + End If + + SeekOffset(lSeekPos) + m_lRecordStart = lSeekPos + End Sub + + Friend Overridable Overloads Sub Seek(ByVal BaseOnePosition As Long) + If BaseOnePosition <= 0 Then + Throw VbMakeException(vbErrors.BadRecordNum) + End If + + Dim BaseZeroPosition As Long = BaseOnePosition - 1 + + If BaseZeroPosition > m_file.Length Then + m_file.SetLength(BaseZeroPosition) + End If + + m_file.Position = BaseZeroPosition + m_position = BaseZeroPosition + + m_eof = (m_position >= m_file.Length) + + If Not m_sr Is Nothing Then + m_sr.DiscardBufferedData() + End If + + End Sub + + 'Function Seek + ' + 'RANDOM MODE - Returns number of next record + 'other modes - Returns the byte position at which the next operation + ' will take place + Friend Overridable Overloads Function Seek() As Long + 'm_position is the last read byte as a zero based offset + 'Seek returns the position of the next byte to read + Return (m_position + 1) + End Function + + Friend Sub SeekOffset(ByVal offset As Long) + 'Do not call m_file.SetLength here because that could extend the file length, + 'which shouldn't happen until a subsequent Write or Put operation. + m_position = offset + m_file.Position = offset + + If Not m_sr Is Nothing Then + m_sr.DiscardBufferedData() + End If + + End Sub + + Friend Function GetPos() As Long + Return m_position + End Function + + Friend Overridable Overloads Sub Lock() + 'Lock the whole file, not just the current size of file, since file could change. + m_file.Lock(0, Int32.MaxValue) + End Sub + + Friend Overridable Overloads Sub Unlock() + m_file.Unlock(0, Int32.MaxValue) + End Sub + + Friend Overridable Overloads Sub Lock(ByVal Record As Long) + If m_lRecordLen = -1 Then + m_file.Lock((Record - 1), 1) + Else + m_file.Lock((Record - 1) * m_lRecordLen, m_lRecordLen) + End If + End Sub + + Friend Overridable Overloads Sub Unlock(ByVal Record As Long) + If m_lRecordLen = -1 Then + m_file.Unlock((Record - 1), 1) + Else + m_file.Unlock((Record - 1) * m_lRecordLen, m_lRecordLen) + End If + End Sub + + Friend Overridable Overloads Sub Lock(ByVal RecordStart As Long, ByVal RecordEnd As Long) + If m_lRecordLen = -1 Then + m_file.Lock((RecordStart - 1), (RecordEnd - RecordStart) + 1) + Else + m_file.Lock((RecordStart - 1) * m_lRecordLen, ((RecordEnd - RecordStart) + 1) * m_lRecordLen) + End If + End Sub + + Friend Overridable Overloads Sub Unlock(ByVal RecordStart As Long, ByVal RecordEnd As Long) + If m_lRecordLen = -1 Then + m_file.Unlock((RecordStart - 1), (RecordEnd - RecordStart) + 1) + Else + m_file.Unlock((RecordStart - 1) * m_lRecordLen, ((RecordEnd - RecordStart) + 1) * m_lRecordLen) + End If + End Sub + + Friend Function LineInput() As String + ValidateReadable() + Dim Result As String = m_sr.ReadLine() + If Result Is Nothing Then + Result = "" + End If + + Diagnostics.Debug.Assert(Not m_Encoding Is Nothing) + m_position += m_Encoding.GetByteCount(Result) + 2 + m_eof = CheckEOF(m_sr.Peek()) + Return Result + End Function + + Friend Overridable Function CanInput() As Boolean + Return False + End Function + + Friend Overridable Function CanWrite() As Boolean + Return False + End Function + + Protected Overridable Sub InputObject(ByRef Value As Object) + Throw VbMakeException(vbErrors.BadFileMode) + End Sub + + Protected Overridable Function InputStr() As String + Dim lChar As Integer + + ValidateReadable() + + 'Read past any leading spaces or tabs + 'Skip over leading whitespace + lChar = SkipWhiteSpaceEOF() + + If lChar = lchDoubleQuote Then + lChar = m_sr.Read() + m_position += 1 + InputStr = ReadInField(FIN_QSTRING) + Else + InputStr = ReadInField(FIN_STRING) + End If + + SkipTrailingWhiteSpace() + End Function + + Protected Overridable Function InputNum(ByVal vt As VariantType) As Object + Dim sField As String + + ValidateReadable() + + 'Read past any leading spaces or tabs + 'Skip over leading whitespace + SkipWhiteSpaceEOF() + + sField = ReadInField(FIN_NUMBER) + + ' considering adding validity checks for expected varianttype + InputNum = sField + SkipTrailingWhiteSpace() + End Function + + Public MustOverride Function GetMode() As OpenMode + + Friend Function InputString(ByVal lLen As Integer) As String + Dim sb As StringBuilder + Dim i As Integer + Dim lInput As Integer + Dim FileOpenMode As OpenMode + + ValidateReadable() + + sb = New StringBuilder(lLen) + FileOpenMode = GetMode() + + For i = 1 To lLen + If FileOpenMode = OpenMode.Binary Then + lInput = m_br.Read() + m_position += 1 + + If (lInput = -1) Then 'Binary files don't stop upon reading 26=CTRL-Z + Exit For + End If + ElseIf FileOpenMode = OpenMode.Input Then + lInput = m_sr.Read() + m_position += 1 + + If (lInput = -1) Or (lInput = 26) Then 'Input files do stop upon reading 26=CTRL-Z + m_eof = True + Throw VbMakeException(vbErrors.EndOfFile) + End If + Else + Throw VbMakeException(vbErrors.BadFileMode) + End If + + If lInput <> 0 Then + sb.Append(ChrW(lInput)) + End If + Next i + + If FileOpenMode = OpenMode.Binary Then + m_eof = (m_br.PeekChar() = EOF_INDICATOR) + Else + m_eof = CheckEOF(m_sr.Peek()) + End If + + Return sb.ToString() + End Function + + Friend Sub SPC(ByVal iCount As Integer) + Dim lCurPos As Integer + Dim lWidth As Integer + Dim s As String + + If iCount <= 0 Then + ' iCount = 0 + Exit Sub + End If + + lCurPos = GetColumn() + lWidth = GetWidth() + + If lWidth <> 0 Then + ' File output with line length limit + If iCount >= lWidth Then + iCount = iCount Mod lWidth ' Modulo the line length + End If + + If (iCount + lCurPos) > lWidth Then + ' Spaces don't fit on this line. Subtract what fits and put the + ' rest on next line. + iCount -= (lWidth - lCurPos) + GoTo NewLine + End If + End If + + iCount += lCurPos + + ' If tab position is less than current position, + ' goto next line. + If (iCount < lCurPos) Then +NewLine: + WriteLine(Nothing) + 'FileOutString(iodata, FILE_EOL, FILE_EOL_LEN) + lCurPos = 0 + End If + + If (iCount > lCurPos) Then + s = New System.String(" "c, iCount - lCurPos) + [WriteString](s) + End If + End Sub + + Friend Sub Tab(ByVal Column As Integer) + Dim lCurPos As Integer + Dim lWidth As Integer + Dim s As String + + If Column < 1 Then + Column = 1 + End If + + 'When tabbing, we go to the space before the column + 'so the next print will be in that column + Column -= 1 + + lCurPos = GetColumn() + lWidth = GetWidth() + + If lWidth <> 0 Then + ' File output with line length limit + If Column >= lWidth Then + Column = Column Mod lWidth ' Modulo the line length + End If + End If + + ' If tab position is less than current position, + ' goto next line. + If (Column < lCurPos) Then + WriteLine(Nothing) + lCurPos = 0 + End If + + If (Column > lCurPos) Then + s = New System.String(" "c, Column - lCurPos) + [WriteString](s) + End If + End Sub + + Friend Sub SetPrintMode() + Dim mode As OpenMode + + mode = GetMode() + + If mode = OpenMode.Input OrElse + mode = OpenMode.Binary OrElse + mode = OpenMode.Random Then + Throw VbMakeException(vbErrors.BadFileMode) + End If + + m_bPrint = True + End Sub + + Friend Shared Function VTType(ByVal VarName As Object) As VT + If VarName Is Nothing Then + Return VT.Variant + End If + + Return VTFromComType(VarName.GetType()) + End Function + + Friend Shared Function VTFromComType(ByVal typ As System.Type) As VT + If typ Is Nothing Then + Return VT.Variant + End If + + If typ.IsArray() Then + typ = typ.GetElementType() + If typ.IsArray Then + Return CType(VT.Array Or VT.Variant, VT) + End If + + Dim Result As VT = VTFromComType(typ) + If (Result And VT.Array) <> 0 Then + 'Element type is also an array, so just return "array of objects" + Return CType(VT.Array Or VT.Variant, VT) + End If + Return CType(Result Or VT.Array, VT) + + ElseIf typ.IsEnum() Then + typ = System.Enum.GetUnderlyingType(typ) + End If + + If typ Is Nothing Then + Return VT.Empty + End If + + Select Case Type.GetTypeCode(typ) + Case TypeCode.String + Return VT.String + Case TypeCode.Int32 + Return VT.Integer + Case TypeCode.Int16 + Return VT.Short + Case TypeCode.Int64 + Return VT.Long + Case TypeCode.Single + Return VT.Single + Case TypeCode.Double + Return VT.Double + Case TypeCode.DateTime + Return VT.Date + Case TypeCode.Boolean + Return VT.Boolean + Case TypeCode.Decimal + Return VT.Decimal + Case TypeCode.Byte + Return VT.Byte + Case TypeCode.Char + Return VT.Char + Case TypeCode.DBNull + Return VT.DBNull + End Select + + If typ Is GetType(System.Reflection.Missing) Then + Return VT.Error + + ElseIf typ Is GetType(System.Exception) OrElse typ.IsSubclassOf(GetType(System.Exception)) Then + Return VT.Error + + 'Must come after all the Intrinsic types + ElseIf typ.IsValueType() Then + Return VT.Structure + + Else + Return VT.Variant + + End If + End Function + + Friend Sub PutFixedArray(ByVal RecordNumber As Long, ByVal arr As System.Array, ByVal ElementType As System.Type, + Optional ByVal FixedStringLength As Integer = -1, Optional ByVal FirstBound As Integer = -1, + Optional ByVal SecondBound As Integer = -1) + + SetRecord(RecordNumber) + If ElementType Is Nothing Then + ElementType = arr.GetType().GetElementType() + End If + PutArrayData(arr, ElementType, FixedStringLength, FirstBound, SecondBound) + End Sub + + Friend Sub PutDynamicArray(ByVal RecordNumber As Long, ByVal arr As System.Array, + Optional ByVal ContainedInVariant As Boolean = True, Optional ByVal FixedStringLength As Integer = -1) + + Dim FirstBound As Integer + Dim SecondBound As Integer + Dim cDims As Integer + + If arr Is Nothing Then + cDims = 0 + Else + cDims = arr.Rank() + FirstBound = arr.GetUpperBound(0) + End If + + If cDims = 1 Then + SecondBound = -1 + ElseIf cDims = 2 Then + SecondBound = arr.GetUpperBound(1) + ElseIf cDims <> 0 Then + Throw New ArgumentException(GetResourceString(SR.Argument_UnsupportedArrayDimensions)) + End If + + SetRecord(RecordNumber) + + If ContainedInVariant Then + Dim vtype As VT + + vtype = VTType(arr) + m_bw.Write(CShort(vtype)) + m_position += 2 + + If (vtype And VT.Array) = 0 Then + Throw VbMakeException(vbErrors.InvalidTypeLibVariable) + End If + End If + + PutArrayDesc(arr) + If cDims <> 0 Then + PutArrayData(arr, arr.GetType().GetElementType(), FixedStringLength, FirstBound, SecondBound) + End If + End Sub + + Friend Sub LengthCheck(ByVal Length As Integer) + If m_lRecordLen = -1 Then + Exit Sub + End If + + If Length > m_lRecordLen Then + Throw VbMakeException(vbErrors.BadRecordLen) + Else + If (GetPos() + Length) > (m_lRecordStart + m_lRecordLen) Then + Throw VbMakeException(vbErrors.BadRecordLen) + End If + End If + End Sub + + 'Writes a fixed length string member of a structure to the file + Friend Sub PutFixedLengthString(ByVal RecordNumber As Long, ByVal s As String, ByVal lengthToWrite As Integer) + Dim PadChar As Char = " "c + + If s Is Nothing Then + s = "" + End If + + If s = "" Then + PadChar = ChrW(0) + End If + + 'Need to handle double byte chars in s + Diagnostics.Debug.Assert(Not m_Encoding Is Nothing) + Dim ByteLength As Integer = m_Encoding.GetByteCount(s) + + If ByteLength > lengthToWrite Then + If ByteLength = s.Length Then + s = Left(s, lengthToWrite) + Else + 'String contains multi-byte characters. Truncate to 'length' bytes. + Dim Bytes() As Byte = m_Encoding.GetBytes(s) + s = m_Encoding.GetString(Bytes, 0, lengthToWrite) + + Diagnostics.Debug.Assert(Not m_Encoding Is Nothing) + ByteLength = m_Encoding.GetByteCount(s) + If ByteLength > lengthToWrite Then + For i As Integer = lengthToWrite - 1 To 0 Step -1 + Bytes(i) = 0 + s = m_Encoding.GetString(Bytes, 0, lengthToWrite) + ByteLength = m_Encoding.GetByteCount(s) + If ByteLength <= lengthToWrite Then + Exit For + End If + Next + End If + Diagnostics.Debug.Assert(ByteLength <= lengthToWrite) + End If + End If + + If ByteLength < lengthToWrite Then + s = s & StrDup(lengthToWrite - ByteLength, PadChar) + End If + + Diagnostics.Debug.Assert(m_Encoding.GetByteCount(s) = lengthToWrite) + + SetRecord(RecordNumber) + LengthCheck(lengthToWrite) + m_sw.Write(s) + m_position += lengthToWrite + End Sub + + Friend Sub PutVariantString(ByVal RecordNumber As Long, ByVal s As String) + If s Is Nothing Then + s = "" + End If + + Diagnostics.Debug.Assert(Not m_Encoding Is Nothing) + Dim ByteLength As Integer = m_Encoding.GetByteCount(s) + + SetRecord(RecordNumber) + LengthCheck(ByteLength + 2 + 2) 'Add sizeof string length and vartype + m_bw.Write(CShort(VT.String)) + m_bw.Write(CShort(ByteLength)) + + If (ByteLength <> 0) Then + m_sw.Write(s) + End If + + m_position += ByteLength + 2 + 2 + End Sub + + Friend Sub PutString(ByVal RecordNumber As Long, ByVal s As String) + If s Is Nothing Then + s = "" + End If + + Diagnostics.Debug.Assert(Not m_Encoding Is Nothing) + Dim ByteLength As Integer = m_Encoding.GetByteCount(s) + + SetRecord(RecordNumber) + LengthCheck(ByteLength) + + If (ByteLength <> 0) Then + m_sw.Write(s) + End If + + m_position += ByteLength + End Sub + + Friend Sub PutStringWithLength(ByVal RecordNumber As Long, ByVal s As String) + If s Is Nothing Then + s = "" + End If + + Diagnostics.Debug.Assert(Not m_Encoding Is Nothing) + Dim ByteLength As Integer = m_Encoding.GetByteCount(s) + + SetRecord(RecordNumber) + LengthCheck(ByteLength + 2) + m_bw.Write(CShort(ByteLength)) + + If ByteLength <> 0 Then + 'Must use streamwriter to get the unicode/ansi conversion done + m_sw.Write(s) + End If + + m_position += ByteLength + 2 + End Sub + + Friend Sub PutDate(ByVal RecordNumber As Long, ByVal dt As Date, Optional ByVal ContainedInVariant As Boolean = False) + Dim RecLength As Integer = 8 + Dim dbl As Double + + If ContainedInVariant Then + RecLength += 2 + End If + + SetRecord(RecordNumber) + LengthCheck(RecLength) + + If ContainedInVariant Then + m_bw.Write(VT.Date) + End If + + dbl = dt.ToOADate() + m_bw.Write(dbl) + m_position += RecLength + End Sub + + Friend Sub PutShort(ByVal RecordNumber As Long, ByVal i As Short, Optional ByVal ContainedInVariant As Boolean = False) + Dim RecLength As Integer = 2 + + If ContainedInVariant Then + RecLength += 2 + End If + + SetRecord(RecordNumber) + LengthCheck(RecLength) + + If ContainedInVariant Then + m_bw.Write(VT.Short) + End If + + m_bw.Write(i) + m_position += RecLength + End Sub + + Friend Sub PutInteger(ByVal RecordNumber As Long, ByVal l As Integer, Optional ByVal ContainedInVariant As Boolean = False) + Dim RecLength As Integer = 4 + + If ContainedInVariant Then + RecLength += 2 + End If + + SetRecord(RecordNumber) + LengthCheck(RecLength) + + If ContainedInVariant Then + m_bw.Write(VT.Integer) + End If + + m_bw.Write(l) + m_position += RecLength + End Sub + + Friend Sub PutLong(ByVal RecordNumber As Long, ByVal l As Long, Optional ByVal ContainedInVariant As Boolean = False) + Dim RecLength As Integer = 8 + + If ContainedInVariant Then + RecLength += 2 ' Add length of vartype + End If + + SetRecord(RecordNumber) + LengthCheck(RecLength) + + If ContainedInVariant Then + m_bw.Write(VT.Long) + End If + + m_bw.Write(l) + m_position += RecLength + End Sub + + Friend Sub PutByte(ByVal RecordNumber As Long, ByVal byt As Byte, Optional ByVal ContainedInVariant As Boolean = False) + Dim RecLength As Integer = 1 + + If ContainedInVariant Then + RecLength += 2 ' Add length of vartype + End If + + SetRecord(RecordNumber) + LengthCheck(RecLength) + + If ContainedInVariant Then + m_bw.Write(VT.Byte) + End If + + m_bw.Write(byt) + m_position += RecLength + End Sub + + Friend Sub PutChar(ByVal RecordNumber As Long, ByVal ch As Char, Optional ByVal ContainedInVariant As Boolean = False) + Dim RecLength As Integer = 2 + + If ContainedInVariant Then + RecLength += 2 ' Add length of vartype + End If + + SetRecord(RecordNumber) + LengthCheck(RecLength) + + If ContainedInVariant Then + m_bw.Write(VT.Char) + End If + + m_bw.Write(ch) + m_position += RecLength + End Sub + + Friend Sub PutSingle(ByVal RecordNumber As Long, ByVal sng As Single, Optional ByVal ContainedInVariant As Boolean = False) + Dim RecLength As Integer = 4 + + If ContainedInVariant Then + RecLength += 2 ' Add length of vartype + End If + + SetRecord(RecordNumber) + LengthCheck(RecLength) + + If ContainedInVariant Then + m_bw.Write(VT.Single) + End If + + m_bw.Write(sng) + m_position += RecLength + End Sub + + Friend Sub PutDouble(ByVal RecordNumber As Long, ByVal dbl As Double, Optional ByVal ContainedInVariant As Boolean = False) + Dim RecLength As Integer = 8 + + If ContainedInVariant Then + RecLength += 2 ' Add length of vartype + End If + + SetRecord(RecordNumber) + LengthCheck(RecLength) + + If ContainedInVariant Then + m_bw.Write(VT.Double) + End If + + m_bw.Write(dbl) + m_position += RecLength + End Sub + + Friend Sub PutEmpty(ByVal RecordNumber As Long) + 'This will always be a Variant + SetRecord(RecordNumber) + LengthCheck(2) + m_bw.Write(VT.Empty) + m_position += 2 + End Sub + + Friend Sub PutBoolean(ByVal RecordNumber As Long, ByVal b As Boolean, Optional ByVal ContainedInVariant As Boolean = False) + Dim RecLength As Integer = 2 + + If ContainedInVariant Then + RecLength += 2 ' Add length of vartype + End If + + SetRecord(RecordNumber) + LengthCheck(RecLength) + + If ContainedInVariant Then + m_bw.Write(VT.Boolean) + End If + + If b Then + m_bw.Write(CShort(-1)) + Else + m_bw.Write(CShort(0)) + End If + + m_position += RecLength + End Sub + + Friend Sub PutDecimal(ByVal RecordNumber As Long, ByVal dec As Decimal, Optional ByVal ContainedInVariant As Boolean = False) + Dim RecLength As Integer = 16 + + If ContainedInVariant Then + RecLength += 2 ' Add length of vartype + End If + + SetRecord(RecordNumber) + LengthCheck(RecLength) + + If ContainedInVariant Then + m_bw.Write(VT.Decimal) + End If + + Dim lo, mid, hi As Integer + Dim flags As Byte + Dim sign As Byte + Dim bits() As Integer + + bits = System.Decimal.GetBits(dec) + flags = CByte((bits(3) And &H7FFFFFFFI) \ &H10000I) + lo = bits(0) + mid = bits(1) + hi = bits(2) + + If (bits(3) And &H80000000I) <> 0 Then + sign = 128 + End If + + m_bw.Write(CShort(VT.Decimal)) ' Decimal contains the vtype as first 2 bytes + m_bw.Write(flags) + m_bw.Write(sign) + m_bw.Write(hi) + m_bw.Write(lo) + m_bw.Write(mid) + m_position += RecLength + End Sub + + Friend Sub PutCurrency(ByVal RecordNumber As Long, ByVal dec As Decimal, Optional ByVal ContainedInVariant As Boolean = False) + Dim RecLength As Integer = 16 + + If ContainedInVariant Then + RecLength += 2 ' Add length of vartype + End If + + SetRecord(RecordNumber) + LengthCheck(RecLength) + + If ContainedInVariant Then + m_bw.Write(VT.Currency) + End If + + m_bw.Write(System.Decimal.ToOACurrency(dec)) + m_position += RecLength + End Sub + + Friend Sub PutRecord(ByVal RecordNumber As Long, ByVal o As ValueType) + If o Is Nothing Then + Throw New NullReferenceException + End If + + Dim intf As IRecordEnum + Dim ph As PutHandler + + SetRecord(RecordNumber) + + ph = New PutHandler(Me) + intf = ph + + If intf Is Nothing Then + Throw VbMakeException(vbErrors.IllegalFuncCall) + End If + + EnumerateUDT(o, intf, False) + End Sub + + Friend Function ComTypeFromVT(ByVal vtype As VT) As System.Type + Select Case vtype + Case VT.Variant + Return GetType(System.Object) + Case VT.Empty + Return Nothing + Case VT.DBNull + Return GetType(System.DBNull) + Case VT.Short + Return GetType(System.Int16) + Case VT.Integer + Return GetType(System.Int32) + Case VT.Long + Return GetType(System.Int64) + Case VT.Single + Return GetType(System.Single) + Case VT.Double + Return GetType(System.Double) + Case VT.Date + Return GetType(System.DateTime) + Case VT.String + Return GetType(System.String) + Case VT.Error + Return GetType(System.Exception) + Case VT.Boolean + Return GetType(System.Boolean) + Case VT.Decimal + Return GetType(System.Decimal) + Case VT.Byte + Return GetType(System.Byte) + Case VT.Char + Return GetType(System.Char) + 'Case VT.Structure + ' 'Return m_Type + Case Else + Throw VbMakeException(vbErrors.InvalidTypeLibVariable) + End Select + End Function + + Friend Sub GetFixedArray(ByVal RecordNumber As Long, ByRef arr As System.Array, + ByVal FieldType As System.Type, Optional ByVal FirstBound As Integer = -1, + Optional ByVal SecondBound As Integer = -1, Optional ByVal FixedStringLength As Integer = -1) + + If SecondBound = -1 Then + arr = System.Array.CreateInstance(FieldType, FirstBound + 1) + Else + arr = System.Array.CreateInstance(FieldType, FirstBound + 1, SecondBound + 1) + End If + + SetRecord(RecordNumber) + GetArrayData(arr, FieldType, FirstBound, SecondBound, FixedStringLength) + End Sub + + Friend Sub GetDynamicArray(ByRef arr As System.Array, ByVal t As System.Type, Optional ByVal FixedStringLength As Integer = -1) + arr = GetArrayDesc(t) + + Dim cDims As Integer = arr.Rank + Dim FirstBound As Integer = arr.GetUpperBound(0) + Dim SecondBound As Integer + + If cDims = 1 Then + SecondBound = -1 + Else + SecondBound = arr.GetUpperBound(1) + End If + + GetArrayData(arr, t, FirstBound, SecondBound, FixedStringLength) + End Sub + + Private Sub PutArrayDesc(ByVal arr As System.Array) + Dim cDims As Short + Dim i As Integer + + If arr Is Nothing Then + cDims = 0 + Else + cDims = CShort(arr.Rank()) + End If + m_bw.Write(cDims) + m_position += 2 + + If cDims = 0 Then + Exit Sub + End If + + For i = 0 To cDims - 1 + m_bw.Write(CInt(arr.GetLength(i))) + m_bw.Write(CInt(arr.GetLowerBound(i))) 'Lower bound + m_position += 8 + Next i + End Sub + + Friend Function GetArrayDesc(ByVal typ As System.Type) As System.Array + Dim cDims As Integer + Dim lElementCounts() As Integer + Dim lLowerBounds() As Integer + Dim i As Integer + + ' for reading, read cDims, and how many in each, and redim + cDims = m_br.ReadInt16() + m_position += 2 + + If cDims = 0 Then + Return System.Array.CreateInstance(typ, 0) + End If + + ReDim lElementCounts(cDims - 1) + ReDim lLowerBounds(cDims - 1) + + For i = 0 To cDims - 1 + lElementCounts(i) = m_br.ReadInt32() + lLowerBounds(i) = m_br.ReadInt32() + m_position += 8 + Next i + + Return System.Array.CreateInstance(typ, lElementCounts, lLowerBounds) + End Function + + Friend Overridable Function GetLengthPrefixedString(ByVal RecordNumber As Long) As String + SetRecord(RecordNumber) + + If EOF() Then + Return "" + End If + + Return ReadString() + End Function + + Friend Overridable Function GetFixedLengthString(ByVal RecordNumber As Long, ByVal ByteLength As Integer) As String + SetRecord(RecordNumber) + Return ReadString(ByteLength) + End Function + + Protected Overloads Function ReadString(ByVal ByteLength As Integer) As String + Dim byteArray As Byte() + + If ByteLength = 0 Then + Return Nothing + End If + + byteArray = m_br.ReadBytes(ByteLength) + m_position += ByteLength + + Return m_Encoding.GetString(byteArray) + End Function + + Protected Overloads Function ReadString() As String + Dim ByteLen As Integer + + ByteLen = m_br.ReadInt16() + m_position += 2 + + If ByteLen = 0 Then + Return Nothing + End If + + LengthCheck(ByteLen) + Return ReadString(ByteLen) + + End Function + + Friend Function GetDate(ByVal RecordNumber As Long) As Date + Dim dbl As Double + + SetRecord(RecordNumber) + dbl = m_br.ReadDouble() + m_position += 8 + Return System.DateTime.FromOADate(dbl) + End Function + + Friend Function GetShort(ByVal RecordNumber As Long) As Short + Dim s As Short + + SetRecord(RecordNumber) + s = m_br.ReadInt16() + m_position += 2 + Return s + End Function + + Friend Function GetInteger(ByVal RecordNumber As Long) As Integer + Dim i As Integer + + SetRecord(RecordNumber) + i = m_br.ReadInt32() + m_position += 4 + Return i + End Function + + Friend Function GetLong(ByVal RecordNumber As Long) As Long + Dim l As Long + + SetRecord(RecordNumber) + l = m_br.ReadInt64() + m_position += 8 + Return l + End Function + + Friend Function GetByte(ByVal RecordNumber As Long) As Byte + Dim b As Byte + + SetRecord(RecordNumber) + b = m_br.ReadByte() + m_position += 1 + Return b + End Function + + Friend Function GetChar(ByVal RecordNumber As Long) As Char + Dim c As Char + + SetRecord(RecordNumber) + c = m_br.ReadChar() + m_position += 1 + Return c + End Function + + Friend Function GetSingle(ByVal RecordNumber As Long) As Single + Dim s As Single + + SetRecord(RecordNumber) + s = m_br.ReadSingle() + m_position += 4 + Return s + End Function + + Friend Function GetDouble(ByVal RecordNumber As Long) As Double + Dim d As Double + + SetRecord(RecordNumber) + d = m_br.ReadDouble() + m_position += 8 + Return d + End Function + + Friend Function GetDecimal(ByVal RecordNumber As Long) As Decimal + Dim vt As Integer + Dim lo, mid, hi As Integer + Dim flags As Byte + Dim negative As Boolean + Dim sign As Byte + + SetRecord(RecordNumber) + vt = m_br.ReadInt16() + flags = m_br.ReadByte() + sign = m_br.ReadByte() + hi = m_br.ReadInt32() + lo = m_br.ReadInt32() + mid = m_br.ReadInt32() + m_position += 16 + + If sign <> 0 Then + negative = True + End If + + Return New Decimal(lo, mid, hi, negative, flags) + End Function + + Friend Function GetCurrency(ByVal RecordNumber As Long) As Decimal + Dim i64 As Int64 + + SetRecord(RecordNumber) + i64 = m_br.ReadInt64() + m_position += 8 + Return Decimal.FromOACurrency(i64) + End Function + + Friend Function GetBoolean(ByVal RecordNumber As Long) As Boolean + Dim i As Short + + SetRecord(RecordNumber) + i = m_br.ReadInt16() + m_position += 2 + + If i = 0 Then + Return False + Else + Return True + End If + End Function + + Friend Sub GetRecord(ByVal RecordNumber As Long, ByRef o As ValueType, Optional ByVal ContainedInVariant As Boolean = False) + Dim intf As IRecordEnum + Dim ph As GetHandler + + If o Is Nothing Then + Throw New NullReferenceException + End If + + SetRecord(RecordNumber) + ph = New GetHandler(Me) + intf = ph + + If intf Is Nothing Then + Throw VbMakeException(vbErrors.IllegalFuncCall) + End If + + EnumerateUDT(o, intf, True) + End Sub + + Friend Sub PutArrayData(ByVal arr As System.Array, ByVal typ As System.Type, ByVal FixedStringLength As Integer, + ByVal FirstBound As Integer, ByVal SecondBound As Integer) + + Dim vtype As VT + Dim obj As Object + Dim iElementX As Integer + Dim iElementY As Integer + Dim iUpperElementX As Integer + Dim iUpperElementY As Integer + Dim sTemp As String + Dim ArrUBoundX, ArrUBoundY As Integer + Dim FixedBlankString As String = Nothing + Dim FixedCharArray As Char() = Nothing + + If arr Is Nothing Then + ArrUBoundY = -1 + ArrUBoundX = -1 + ElseIf (arr.GetUpperBound(0) > FirstBound) Then + Throw New ArgumentException(GetResourceString(SR.Argument_ArrayDimensionsDontMatch)) + End If + + If typ Is Nothing Then + typ = arr.GetType().GetElementType() + End If + + vtype = VTFromComType(typ) + + If SecondBound = -1 Then + iUpperElementX = 0 + iUpperElementY = FirstBound + If Not arr Is Nothing Then + ArrUBoundY = arr.GetUpperBound(0) + End If + Else + iUpperElementX = SecondBound + iUpperElementY = FirstBound + If Not arr Is Nothing Then + If arr.Rank <> 2 OrElse arr.GetUpperBound(1) <> SecondBound Then + Throw New ArgumentException(GetResourceString(SR.Argument_ArrayDimensionsDontMatch)) + End If + ArrUBoundY = arr.GetUpperBound(0) + ArrUBoundX = arr.GetUpperBound(1) + End If + End If + + If vtype = VT.String Then + If FixedStringLength = 0 Then + 'Use length of first String element + If SecondBound = -1 Then + obj = arr.GetValue(0) + Else + obj = arr.GetValue(0, 0) + End If + If Not obj Is Nothing Then + FixedStringLength = obj.ToString().Length + End If + End If + If FixedStringLength = 0 Then + Throw New ArgumentException(GetResourceString(SR.Argument_InvalidFixedLengthString)) + ElseIf FixedStringLength > 0 Then + FixedBlankString = StrDup(FixedStringLength, " "c) + FixedCharArray = FixedBlankString.ToCharArray() 'Used for padding + End If + End If + + Dim vtByteLength As Integer = GetByteLength(vtype) + ' Only attempt to write data down as a byte array for improved performance if: + ' 1. 1-Dimension array. + ' 2. Array is of the supported type (see GetByteLength). + ' 3. The given bound (iUpperElement - fixed size array) is the same as real size of the array (ArrUBound). + ' (The first check at the start of the array ensure that iUpperElement (FirstBound) will never < ArrUBound. + If (SecondBound = -1) AndAlso (vtByteLength > 0) AndAlso (iUpperElementY = ArrUBoundY) Then + ' Calculate the total byte length we're writing down. + Dim totalLength As Integer = vtByteLength * (iUpperElementY + 1) + ' The totalLength has to be less than the record length (See LengthCheck). + If GetPos() + totalLength <= m_lRecordStart + m_lRecordLen Then + Dim byteArr(totalLength - 1) As Byte + System.Buffer.BlockCopy(arr, 0, byteArr, 0, totalLength) + m_bw.Write(byteArr) + m_position += totalLength + Return + End If + End If + + For iElementX = 0 To iUpperElementX + For iElementY = 0 To iUpperElementY + Try + If SecondBound = -1 Then + If iElementY > ArrUBoundY Then + obj = Nothing + Else + obj = arr.GetValue(iElementY) + End If + Else + If iElementY > ArrUBoundY OrElse iElementX > ArrUBoundX Then + obj = Nothing + Else + 'These are supposed to be ordered Y, X + ' because of the order VB6 writes out + obj = arr.GetValue(iElementY, iElementX) + End If + End If + Catch Ex As IndexOutOfRangeException + 'The VBFixedArrayAttribute size must be larger than the array, pad it. + obj = 0 + End Try + + Select Case vtype + + Case VT.DBNull, VT.Empty + 'Nothing + + Case VT.Byte '1 byte + LengthCheck(1) + m_bw.Write(ByteType.FromObject(obj)) + m_position += 1 + + Case VT.Short '2 bytes + LengthCheck(2) + m_bw.Write(ShortType.FromObject(obj)) + m_position += 2 + + Case VT.Boolean '2 bytes + LengthCheck(2) + Dim b As Boolean = BooleanType.FromObject(obj) + + If b Then + m_bw.Write(CShort(-1)) + Else + m_bw.Write(CShort(0)) + End If + m_position += 2 + + Case VT.Integer '4 Bytes + LengthCheck(4) + m_bw.Write(IntegerType.FromObject(obj)) + m_position += 4 + + Case VT.Long '8 Bytes + LengthCheck(8) + m_bw.Write(LongType.FromObject(obj)) + m_position += 8 + + Case VT.Single '4 bytes + LengthCheck(4) + m_bw.Write(SingleType.FromObject(obj)) + m_position += 4 + + Case VT.Error '4 bytes + Throw VbMakeException(vbErrors.TypeMismatch) + + Case VT.Double '8 bytes + LengthCheck(8) + m_bw.Write(DoubleType.FromObject(obj)) + m_position += 8 + + Case VT.Date '8 bytes + LengthCheck(8) + m_bw.Write(CDbl(DateType.FromObject(obj).ToOADate())) + m_position += 8 + + Case VT.Decimal '8 bytes + LengthCheck(8) + m_bw.Write(System.Decimal.ToOACurrency(DecimalType.FromObject(obj))) + m_position += 8 + + Case VT.String + Dim ByteLength As Integer + + If obj Is Nothing Then + If FixedStringLength > 0 Then + sTemp = FixedBlankString + ByteLength = FixedStringLength + Debug.Assert(m_Encoding.GetByteCount(sTemp) = ByteLength) + Else + sTemp = "" + ByteLength = 0 + End If + Else + sTemp = obj.ToString() + Diagnostics.Debug.Assert(Not m_Encoding Is Nothing) + ByteLength = m_Encoding.GetByteCount(sTemp) + + If FixedStringLength > 0 AndAlso ByteLength > FixedStringLength Then + 'We need to truncate the string to the fixed string length (in bytes, not characters) + If ByteLength = sTemp.Length Then + 'SBCS or DBCS but the string contains only SBCS characters + sTemp = Microsoft.VisualBasic.Left(sTemp, FixedStringLength) + Debug.Assert(m_Encoding.GetByteCount(sTemp) = FixedStringLength) + ByteLength = FixedStringLength + Else + 'String contains multi-byte characters. Truncate to 'FixedStringLength' + ' bytes (if cuts off half of a DBCS character, that character + ' is replaced with a single Chr(0)) + Dim Bytes() As Byte = m_Encoding.GetBytes(sTemp) + sTemp = m_Encoding.GetString(Bytes, 0, FixedStringLength) + + ByteLength = m_Encoding.GetByteCount(sTemp) + Debug.Assert(ByteLength <= FixedStringLength) + End If + End If + End If + + If ByteLength > System.Int16.MaxValue Then + 'Size for strings is 2 bytes, thus the Short.MaxValue limitation + Throw VbMakeException(New ArgumentException(GetResourceString(SR.FileIO_StringLengthExceeded)), vbErrors.IllegalFuncCall) + End If + + 'Do a length check and write out the length if not fixed length + If FixedStringLength > 0 Then + LengthCheck(FixedStringLength) + m_sw.Write(sTemp) + Debug.Assert(ByteLength = m_Encoding.GetByteCount(sTemp) AndAlso ByteLength <= FixedStringLength) + If ByteLength < FixedStringLength Then + 'Pad with spaces + m_sw.Write(FixedCharArray, 0, FixedStringLength - ByteLength) + End If + m_position += FixedStringLength + Else + LengthCheck(ByteLength + 2) + m_bw.Write(CShort(ByteLength)) + m_sw.Write(sTemp) + m_position += (2 + ByteLength) + End If + + Case VT.Char '2 bytes + LengthCheck(2) + m_bw.Write(CharType.FromObject(obj)) + m_position += 2 + + Case VT.Variant + PutObject(obj, 0, True) + + Case VT.Structure + PutObject(obj, 0, False) + + Case Else + If (vtype And VT.Array) <> 0 Then + 'Arrays of arrays not supported + Throw VbMakeException(vbErrors.TypeMismatch) + Else + Throw VbMakeException(vbErrors.InvalidTypeLibVariable) + End If + + vtype = vtype Xor VT.Array + + If vtype = VT.Variant Then + Throw VbMakeException(vbErrors.TypeMismatch) + End If + + If vtype > VT.Variant AndAlso (vtype <> VT.Byte AndAlso vtype <> VT.Decimal AndAlso vtype <> VT.Char AndAlso vtype <> VT.Long) Then + Throw VbMakeException(vbErrors.InvalidTypeLibVariable) + End If + End Select + Next iElementY + Next iElementX + End Sub + + Friend Sub GetArrayData(ByVal arr As System.Array, ByVal typ As System.Type, Optional ByVal FirstBound As Integer = -1, + Optional ByVal SecondBound As Integer = -1, Optional ByVal FixedStringLength As Integer = -1) + + Dim vtype As VT + Dim obj As Object = Nothing + Dim iElementX As Integer + Dim iElementY As Integer + Dim iUpperElementX As Integer + Dim iUpperElementY As Integer + + If arr Is Nothing Then + Throw New ArgumentException(GetResourceString(SR.Argument_ArrayNotInitialized)) + End If + + If typ Is Nothing Then + typ = arr.GetType().GetElementType() + End If + vtype = VTFromComType(typ) + + If SecondBound = -1 Then + iUpperElementX = 0 + iUpperElementY = FirstBound + Else + iUpperElementX = SecondBound + iUpperElementY = FirstBound + End If + + Dim vtByteLength As Integer = GetByteLength(vtype) + ' Only attempt to read data as a byte array for improved performance if: + ' 1. 1-Dimension array. + ' 2. Array is of the supported type (see GetByteLength). + ' 3. The given bound (iUpperElement - fixed size array) is the same as the real size of the array. + If (SecondBound = -1) AndAlso (vtByteLength > 0) AndAlso (iUpperElementY = arr.GetUpperBound(0)) Then + ' Calculate the total byte length we're reading. + Dim totalLength As Integer = vtByteLength * (iUpperElementY + 1) + ' The totalLength has to be less than the length in byte of the array. + If totalLength <= arr.Length * vtByteLength Then + System.Buffer.BlockCopy(m_br.ReadBytes(totalLength), 0, arr, 0, totalLength) + m_position += totalLength + Return + End If + End If + + For iElementX = 0 To iUpperElementX + For iElementY = 0 To iUpperElementY + Select Case vtype + Case VT.DBNull, VT.Empty + 'Nothing + Case VT.Byte '1 byte + obj = m_br.ReadByte() + m_position += 1 + Case VT.Short '2 bytes + obj = m_br.ReadInt16() + m_position += 2 + Case VT.Boolean '2 bytes + obj = CBool(m_br.ReadInt16()) + m_position += 2 + Case VT.Integer '4 Bytes + obj = m_br.ReadInt32() + m_position += 4 + Case VT.Long '8 Bytes + obj = m_br.ReadInt64() + m_position += 8 + Case VT.Single '4 bytes + obj = m_br.ReadSingle() + m_position += 4 + Case VT.Error '4 bytes + 'consider error case + Case VT.Double '8 bytes + obj = m_br.ReadDouble() + m_position += 8 + Case VT.Date '8 bytes + obj = System.DateTime.FromOADate(m_br.ReadDouble()) + m_position += 8 + Case VT.Decimal '8 bytes + Dim l As Long + l = m_br.ReadInt64() + m_position += 8 + obj = System.Decimal.FromOACurrency(l) + Case VT.String + If FixedStringLength >= 0 Then + obj = ReadString(FixedStringLength) + Else + obj = ReadString() + End If + Case VT.Char + obj = m_br.ReadChar() + m_position += 1 + Case VT.Variant + If SecondBound = -1 Then + obj = arr.GetValue(iElementY) + Else + obj = arr.GetValue(iElementY, iElementX) + End If + + GetObject(obj, 0, True) + Case VT.Structure + If SecondBound = -1 Then + obj = arr.GetValue(iElementY) + Else + obj = arr.GetValue(iElementY, iElementX) + End If + + GetObject(obj, 0, False) + Case Else + If (vtype And VT.Array) <> 0 Then + 'OK + Else + Throw VbMakeException(vbErrors.InvalidTypeLibVariable) + End If + + vtype = vtype Xor VT.Array + + If vtype = VT.Variant Then + Throw VbMakeException(vbErrors.TypeMismatch) + End If + + If vtype > VT.Variant AndAlso (vtype <> VT.Byte AndAlso vtype <> VT.Decimal AndAlso vtype <> VT.Char AndAlso vtype <> VT.Long) Then + Throw VbMakeException(vbErrors.InvalidTypeLibVariable) + End If + End Select + + Try + If SecondBound = -1 Then + arr.SetValue(obj, iElementY) + Else + arr.SetValue(obj, iElementY, iElementX) + End If + Catch Ex As IndexOutOfRangeException + Throw New ArgumentException(GetResourceString(SR.Argument_ArrayDimensionsDontMatch)) + End Try + Next iElementY + Next iElementX + End Sub + + ''' ;GetByteLength + ''' + ''' This function is also used to check if a value type is supported for optimized FilePut in array case. + ''' Given a VT value, determine the byte length of that type. Return -1 if that type is not supported. + ''' + Private Function GetByteLength(ByVal vtype As VT) As Integer + Select Case vtype + Case VT.Byte '1 byte + Return 1 + Case VT.Short '2 bytes + Return 2 + Case VT.Integer '4 Bytes + Return 4 + Case VT.Long '8 Bytes + Return 8 + Case VT.Single '4 bytes + Return 4 + Case VT.Double '8 bytes + Return 8 + Case Else + Return -1 + End Select + End Function + + Private Sub PrintTab(ByVal ti As TabInfo) + If ti.Column = -1 Then + Dim CurColumn As Integer + + CurColumn = GetColumn() + CurColumn += (14 - (CurColumn Mod 14)) + SetColumn(CurColumn) + Else + Tab(ti.Column) + End If + End Sub + + Private Function AddSpaces(ByVal s As String) As String + Dim NegativeSign As String + + NegativeSign = Threading.Thread.CurrentThread.CurrentCulture.NumberFormat.NegativeSign + + If NegativeSign.Length = 1 Then + If s.Chars(0) = NegativeSign.Chars(0) Then + 'Append trailing space + Return s & " " + End If + ElseIf Left(s, NegativeSign.Length) = NegativeSign Then + 'Append trailing space + Return s & " " + End If + + 'Append both leading and trailing space + Return System.String.Concat(" ", s, " ") + End Function + + Friend Sub PrintLine(ByVal ParamArray Output() As Object) + Print(Output) + WriteLine(Nothing) + End Sub + + Friend Sub Print(ByVal ParamArray Output() As Object) + Dim i As Integer + Dim s As String + Dim obj As Object + Dim typ As Type + Dim ParamCount As Integer + Dim LastTabOrSpc As Integer + + SetPrintMode() + + If (Output Is Nothing) OrElse (Output.Length = 0) Then + Exit Sub + End If + + ParamCount = Output.GetUpperBound(0) + LastTabOrSpc = -1 + + For i = 0 To ParamCount + s = Nothing + obj = Output(i) + + If obj Is Nothing Then + typ = Nothing + Else + typ = obj.GetType() + If typ.IsEnum() Then + typ = System.Enum.GetUnderlyingType(typ) + End If + End If + + If obj Is Nothing Then + 'Treat as empty + s = "" + End If + + If typ Is Nothing Then + s = "" + Else + Select Case Type.GetTypeCode(typ) + Case TypeCode.String + s = obj.ToString() + Case TypeCode.Int16 + s = AddSpaces(StringType.FromShort(ShortType.FromObject(obj))) + Case TypeCode.Int32 + s = AddSpaces(StringType.FromInteger(IntegerType.FromObject(obj))) + Case TypeCode.Int64 + s = AddSpaces(StringType.FromLong(LongType.FromObject(obj))) + Case TypeCode.Byte + s = AddSpaces(StringType.FromByte(ByteType.FromObject(obj))) + Case TypeCode.DateTime + s = StringType.FromDate(DateType.FromObject(obj)) & " " + Case TypeCode.Double + s = AddSpaces(StringType.FromDouble(DoubleType.FromObject(obj))) + Case TypeCode.Single + s = AddSpaces(StringType.FromSingle(SingleType.FromObject(obj))) + Case TypeCode.Decimal + s = AddSpaces(StringType.FromDecimal(DecimalType.FromObject(obj))) + Case TypeCode.DBNull + s = "Null" + Case TypeCode.Boolean + s = StringType.FromBoolean(BooleanType.FromObject(obj)) + Case TypeCode.Char + s = StringType.FromChar(CharType.FromObject(obj)) + Case Else + If typ Is GetType(TabInfo) Then + PrintTab(CType(obj, TabInfo)) + LastTabOrSpc = i + Continue For + ElseIf typ Is GetType(SpcInfo) Then + SPC(CType(obj, SpcInfo).Count) + LastTabOrSpc = i + Continue For + ElseIf typ Is GetType(System.Reflection.Missing) Then + s = "Error 448" + Else + Throw New ArgumentException(GetResourceString(SR.Argument_UnsupportedIOType1, VBFriendlyName(typ))) + End If + End Select + End If + + If LastTabOrSpc <> (i - 1) Then + Dim lCurPos As Integer + lCurPos = GetColumn() + SetColumn(lCurPos + (14 - (lCurPos Mod 14))) + End If + WriteString(s) + Next i + End Sub + + Friend Sub WriteLineHelper(ByVal ParamArray Output() As Object) + InternalWriteHelper(Output) + WriteLine(Nothing) + End Sub + + Friend Sub WriteHelper(ByVal ParamArray Output() As Object) + InternalWriteHelper(Output) + WriteString(",") + End Sub + + Private Sub InternalWriteHelper(ByVal ParamArray Output() As Object) + Dim SpcInfoType As Type = GetType(SpcInfo) + Dim CurrentType As Type = SpcInfoType + Dim value As Object + Dim i As Integer + + 'Always write in invariant format for cross culture compatibility + Dim InvariantNumberFormat As NumberFormatInfo = GetInvariantCultureInfo().NumberFormat + + For i = 0 To Output.GetUpperBound(0) + value = Output(i) + + If value Is Nothing Then + WriteString("#ERROR 448#") + Else + If Not (CurrentType Is SpcInfoType) Then + WriteString(",") + End If + + CurrentType = value.GetType() + + If CurrentType Is SpcInfoType Then + SPC(CType(value, SpcInfo).Count) + ElseIf CurrentType Is GetType(TabInfo) Then + Dim ti As TabInfo = CType(value, TabInfo) + + If ti.Column >= 0 Then + PrintTab(ti) + End If + ElseIf CurrentType Is GetType(System.Reflection.Missing) Then + WriteString("#ERROR 448#") + Else + Select Case Type.GetTypeCode(CurrentType) + Case TypeCode.String + WriteString(GetQuotedString(value.ToString())) + Case TypeCode.Int16 + WriteString(StringType.FromShort(ShortType.FromObject(value))) + Case TypeCode.Int32 + WriteString(StringType.FromInteger(IntegerType.FromObject(value))) + Case TypeCode.Int64 + WriteString(StringType.FromLong(LongType.FromObject(value))) + Case TypeCode.Byte + WriteString(StringType.FromByte(ByteType.FromObject(value))) + Case TypeCode.DateTime + WriteString(FormatUniversalDate(DateType.FromObject(value))) + Case TypeCode.Double + WriteString(IOStrFromDouble(DoubleType.FromObject(value), InvariantNumberFormat)) + Case TypeCode.Single + WriteString(IOStrFromSingle(SingleType.FromObject(value), InvariantNumberFormat)) + Case TypeCode.Decimal + WriteString(IOStrFromDecimal(DecimalType.FromObject(value), InvariantNumberFormat)) + Case TypeCode.DBNull + WriteString("#NULL#") + Case TypeCode.Boolean + If BooleanType.FromObject(value) Then + WriteString("#TRUE#") + Else + WriteString("#FALSE#") + End If + Case TypeCode.Char + WriteString(StringType.FromChar(CharType.FromObject(value))) + Case Else + ' consider support for UDT + If TypeOf value Is Char() AndAlso CType(value, Array).Rank = 1 Then + WriteString(CStr(CharArrayType.FromObject(value))) + Else + Throw VbMakeException(vbErrors.IllegalFuncCall) + End If + End Select + End If + End If + Next + End Sub + + Private Function IOStrFromSingle(ByVal Value As Single, ByVal NumberFormat As NumberFormatInfo) As String + Return Value.ToString(Nothing, NumberFormat) + End Function + + Private Function IOStrFromDouble(ByVal Value As Double, ByVal NumberFormat As NumberFormatInfo) As String + Return Value.ToString(Nothing, NumberFormat) + End Function + + Private Function IOStrFromDecimal(ByVal Value As Decimal, ByVal NumberFormat As NumberFormatInfo) As String + Return Value.ToString("G29", NumberFormat) + End Function + + Friend Function FormatUniversalDate(ByVal dt As Date) As String + Dim bHasDate As Boolean + Dim sFormat As String + + 'sb = New StringBuilder("#", 24) + + sFormat = sTimeFormat + + ' only insert date If not at the "start of time" (1/1/0) + + If (dt.Year <> 0 OrElse dt.Month <> 1 OrElse dt.Day <> 1) Then + bHasDate = True + sFormat = sDateFormat + End If + + ' only insert time If not midnight (00:00:00) + If ((dt.Hour + dt.Minute + dt.Second) <> 0) Then + ' insert space separator If date was output + If bHasDate Then + sFormat = sDateTimeFormat + End If + End If + + Return dt.ToString(sFormat, m_WriteDateFormatInfo) + + ' sb.Append("#") + ' FormatUniversalDate = sb.ToString() + End Function + + Protected Function GetQuotedString(ByVal Value As String) As String + 'Wrap Value with quotes, but make sure to escape quotes contained in Value. + Return """" & Value.Replace("""", """""") & """" + End Function + + Protected Sub ValidateRec(ByVal RecordNumber As Long) + If RecordNumber < 1 Then + Throw VbMakeException(vbErrors.BadRecordNum) + End If + End Sub + + Friend Overridable Sub GetObject(ByRef Value As Object, Optional ByVal RecordNumber As Long = 0, Optional ByVal ContainedInVariant As Boolean = True) + Throw VbMakeException(vbErrors.BadFileMode) + End Sub + + Friend Overridable Overloads Sub [Get](ByRef Value As ValueType, Optional ByVal RecordNumber As Long = 0) + Throw VbMakeException(vbErrors.BadFileMode) + End Sub + + Friend Overridable Overloads Sub [Get](ByRef Value As System.Array, Optional ByVal RecordNumber As Long = 0, + Optional ByVal ArrayIsDynamic As Boolean = False, Optional ByVal StringIsFixedLength As Boolean = False) + + Throw VbMakeException(vbErrors.BadFileMode) + End Sub + + Friend Overridable Overloads Sub [Get](ByRef Value As Boolean, Optional ByVal RecordNumber As Long = 0) + Throw VbMakeException(vbErrors.BadFileMode) + End Sub + + Friend Overridable Overloads Sub [Get](ByRef Value As Byte, Optional ByVal RecordNumber As Long = 0) + Throw VbMakeException(vbErrors.BadFileMode) + End Sub + + Friend Overridable Overloads Sub [Get](ByRef Value As Short, Optional ByVal RecordNumber As Long = 0) + Throw VbMakeException(vbErrors.BadFileMode) + End Sub + + Friend Overridable Overloads Sub [Get](ByRef Value As Integer, Optional ByVal RecordNumber As Long = 0) + Throw VbMakeException(vbErrors.BadFileMode) + End Sub + + Friend Overridable Overloads Sub [Get](ByRef Value As Long, Optional ByVal RecordNumber As Long = 0) + Throw VbMakeException(vbErrors.BadFileMode) + End Sub + + Friend Overridable Overloads Sub [Get](ByRef Value As Char, Optional ByVal RecordNumber As Long = 0) + Throw VbMakeException(vbErrors.BadFileMode) + End Sub + + Friend Overridable Overloads Sub [Get](ByRef Value As Single, Optional ByVal RecordNumber As Long = 0) + Throw VbMakeException(vbErrors.BadFileMode) + End Sub + + Friend Overridable Overloads Sub [Get](ByRef Value As Double, Optional ByVal RecordNumber As Long = 0) + Throw VbMakeException(vbErrors.BadFileMode) + End Sub + + Friend Overridable Overloads Sub [Get](ByRef Value As Decimal, Optional ByVal RecordNumber As Long = 0) + Throw VbMakeException(vbErrors.BadFileMode) + End Sub + + Friend Overridable Overloads Sub [Get](ByRef Value As String, Optional ByVal RecordNumber As Long = 0, Optional ByVal StringIsFixedLength As Boolean = False) + Throw VbMakeException(vbErrors.BadFileMode) + End Sub + + Friend Overridable Overloads Sub [Get](ByRef Value As Date, Optional ByVal RecordNumber As Long = 0) + Throw VbMakeException(vbErrors.BadFileMode) + End Sub + + Friend Overridable Sub PutObject(ByVal Value As Object, Optional ByVal RecordNumber As Long = 0, Optional ByVal ContainedInVariant As Boolean = True) + Throw VbMakeException(vbErrors.BadFileMode) + End Sub + + Friend Overridable Overloads Sub Put(ByVal Value As Object, Optional ByVal RecordNumber As Long = 0) + Throw VbMakeException(vbErrors.BadFileMode) + End Sub + + Friend Overridable Overloads Sub Put(ByVal Value As ValueType, Optional ByVal RecordNumber As Long = 0) + Throw VbMakeException(vbErrors.BadFileMode) + End Sub + + Friend Overridable Overloads Sub Put(ByVal Value As System.Array, Optional ByVal RecordNumber As Long = 0, + Optional ByVal ArrayIsDynamic As Boolean = False, Optional ByVal StringIsFixedLength As Boolean = False) + + Throw VbMakeException(vbErrors.BadFileMode) + End Sub + + Friend Overridable Overloads Sub Put(ByVal Value As Boolean, Optional ByVal RecordNumber As Long = 0) + Throw VbMakeException(vbErrors.BadFileMode) + End Sub + + Friend Overridable Overloads Sub Put(ByVal Value As Byte, Optional ByVal RecordNumber As Long = 0) + Throw VbMakeException(vbErrors.BadFileMode) + End Sub + + Friend Overridable Overloads Sub Put(ByVal Value As Short, Optional ByVal RecordNumber As Long = 0) + Throw VbMakeException(vbErrors.BadFileMode) + End Sub + + Friend Overridable Overloads Sub Put(ByVal Value As Integer, Optional ByVal RecordNumber As Long = 0) + Throw VbMakeException(vbErrors.BadFileMode) + End Sub + + Friend Overridable Overloads Sub Put(ByVal Value As Long, Optional ByVal RecordNumber As Long = 0) + Throw VbMakeException(vbErrors.BadFileMode) + End Sub + + Friend Overridable Overloads Sub Put(ByVal Value As Char, Optional ByVal RecordNumber As Long = 0) + Throw VbMakeException(vbErrors.BadFileMode) + End Sub + + Friend Overridable Overloads Sub Put(ByVal Value As Single, Optional ByVal RecordNumber As Long = 0) + Throw VbMakeException(vbErrors.BadFileMode) + End Sub + + Friend Overridable Overloads Sub Put(ByVal Value As Double, Optional ByVal RecordNumber As Long = 0) + Throw VbMakeException(vbErrors.BadFileMode) + End Sub + + Friend Overridable Overloads Sub Put(ByVal Value As Decimal, Optional ByVal RecordNumber As Long = 0) + Throw VbMakeException(vbErrors.BadFileMode) + End Sub + + Friend Overridable Overloads Sub Put(ByVal Value As String, Optional ByVal RecordNumber As Long = 0, Optional ByVal StringIsFixedLength As Boolean = False) + Throw VbMakeException(vbErrors.BadFileMode) + End Sub + + Friend Overridable Overloads Sub Put(ByVal Value As Date, Optional ByVal RecordNumber As Long = 0) + Throw VbMakeException(vbErrors.BadFileMode) + End Sub + + '====================================== + ' Input + '====================================== + Friend Overridable Overloads Sub Input(ByRef obj As Object) + Throw VbMakeException(vbErrors.BadFileMode) + End Sub + + Friend Overridable Overloads Sub Input(ByRef Value As Boolean) + Throw VbMakeException(vbErrors.BadFileMode) + End Sub + + Friend Overridable Overloads Sub Input(ByRef Value As Byte) + Throw VbMakeException(vbErrors.BadFileMode) + End Sub + + Friend Overridable Overloads Sub Input(ByRef Value As Short) + Throw VbMakeException(vbErrors.BadFileMode) + End Sub + + Friend Overridable Overloads Sub Input(ByRef Value As Integer) + Throw VbMakeException(vbErrors.BadFileMode) + End Sub + + Friend Overridable Overloads Sub Input(ByRef Value As Long) + Throw VbMakeException(vbErrors.BadFileMode) + End Sub + + Friend Overridable Overloads Sub Input(ByRef Value As Char) + Throw VbMakeException(vbErrors.BadFileMode) + End Sub + + Friend Overridable Overloads Sub Input(ByRef Value As Single) + Throw VbMakeException(vbErrors.BadFileMode) + End Sub + + Friend Overridable Overloads Sub Input(ByRef Value As Double) + Throw VbMakeException(vbErrors.BadFileMode) + End Sub + + Friend Overridable Overloads Sub Input(ByRef Value As Decimal) + Throw VbMakeException(vbErrors.BadFileMode) + End Sub + + Friend Overridable Overloads Sub Input(ByRef Value As String) + Throw VbMakeException(vbErrors.BadFileMode) + End Sub + + Friend Overridable Overloads Sub Input(ByRef Value As Date) + Throw VbMakeException(vbErrors.BadFileMode) + End Sub + + Protected Function SkipWhiteSpace() As Integer + Dim lChar As Integer = m_sr.Peek() + + If CheckEOF(lChar) Then + m_eof = True + GoTo SkipWhiteSpaceExit + End If + + Do While (IntlIsSpace(lChar) OrElse (lChar = lchTab)) + m_sr.Read() + m_position += 1 + lChar = m_sr.Peek() + + If CheckEOF(lChar) Then + m_eof = True + Exit Do + End If + Loop + +SkipWhiteSpaceExit: + Return lChar + End Function + + Private Function GetFileInTerm(ByVal iTermType As Short) As String + Select Case iTermType + Case FIN_NUMTERMCHAR + GetFileInTerm = " ," & ControlChars.Tab & ControlChars.Cr + Case FIN_LINEINP + GetFileInTerm = ControlChars.Cr + Case FIN_QSTRING + GetFileInTerm = chDblQuote + Case FIN_STRING + GetFileInTerm = "," & ControlChars.Cr + Case FIN_NUMBER + GetFileInTerm = " ," & ControlChars.Tab & ControlChars.Cr + Case Else + Throw VbMakeException(vbErrors.IllegalFuncCall) + End Select + End Function + + Protected Function IntlIsSpace(ByVal lch As Integer) As Boolean + ' consider testing for intl spaces + Return (lch = lchSpace) Or (lch = lchIntlSpace) + End Function + + Protected Function IntlIsDoubleQuote(ByVal lch As Integer) As Boolean + ' consider testing for intl double quotes + Return (lch = lchDoubleQuote) + End Function + + Protected Function IntlIsComma(ByVal lch As Integer) As Boolean + ' consider testing for intl commas + Return (lch = lchComma) + End Function + + Protected Function SkipWhiteSpaceEOF() As Integer + Dim retValue As Integer = SkipWhiteSpace() + + If CheckEOF(retValue) Then + Throw VbMakeException(vbErrors.EndOfFile) + End If + Return retValue + End Function + + Protected Sub SkipTrailingWhiteSpace() + Dim lChar As Integer + + ' get the field termination character + lChar = m_sr.Peek() + If CheckEOF(lChar) Then + m_eof = True + Exit Sub + End If + + ' If field was teminated by space/tab (numeric) or quote + ' quoted-string, scan ahead over any further spaces/tabs + If (IntlIsSpace(lChar) OrElse IntlIsDoubleQuote(lChar) OrElse lChar = lchTab) Then + lChar = m_sr.Read() 'Remove it + m_position += 1 + + 'Remove any remaining whitespace + lChar = m_sr.Peek() + If CheckEOF(lChar) Then + m_eof = True + Exit Sub + End If + + Do While (IntlIsSpace(lChar) OrElse (lChar = lchTab)) + m_sr.Read() 'Remove it + m_position += 1 + lChar = m_sr.Peek() 'Look at next char + + If CheckEOF(lChar) Then + m_eof = True + Exit Sub + End If + Loop + End If + + ' If a carriage-return terminates the field, scan over + ' a following line-feed If there + If (lChar = lchCR) Then + lChar = m_sr.Read() + m_position += 1 + + If CheckEOF(lChar) Then + m_eof = True + Exit Sub + End If + + If (m_sr.Peek() = lchLF) Then + lChar = m_sr.Read() + m_position += 1 + End If + ElseIf IntlIsComma(lChar) Then + ' Go past the comma + lChar = m_sr.Read() + m_position += 1 + End If + + lChar = m_sr.Peek() + If CheckEOF(lChar) Then + m_eof = True + Exit Sub + End If + End Sub + + Protected Function ReadInField(ByVal iTermType As Short) As String + Dim sTermChars As String + Dim lChar As Integer + Dim sb As StringBuilder + + sb = New StringBuilder + sTermChars = GetFileInTerm(iTermType) + + ' Peek at the first character + lChar = m_sr.Peek() + If CheckEOF(lChar) Then + m_eof = True + Else + Do While (sTermChars.IndexOf(ChrW(lChar)) = -1) + lChar = m_sr.Read() + m_position += 1 + + If lChar <> 0 Then + sb.Append(ChrW(lChar)) + End If + + lChar = m_sr.Peek() + + If CheckEOF(lChar) Then + m_eof = True + Exit Do + End If + Loop + End If + + ' if no error, finish up + ' if reading a string, or field string exists, + ' append buffer to string. + ' if the string is not quoted, and we are not + ' in line-input mode, then RTrim the string. + If (iTermType = FIN_STRING OrElse iTermType = FIN_NUMBER) Then + ReadInField = RTrim(sb.ToString()) + Else + ReadInField = sb.ToString() + End If + End Function + + Protected Function CheckEOF(ByVal lChar As Integer) As Boolean + Return (lChar = EOF_INDICATOR OrElse lChar = EOF_CHAR) + End Function + + ' The NullReferenceException is for compatibility with VB6 which threw a NullReferenceException when + ' reading from a file that was write-only. The inner exception was added to provide more context. + Private Sub ValidateReadable() + If (m_access <> OpenAccess.ReadWrite) AndAlso (m_access <> OpenAccess.Read) Then + Dim JustNeedTheMessage As New NullReferenceException ' We don't have access to the localized resources for this string. + Throw New NullReferenceException(JustNeedTheMessage.Message, New IO.IOException(GetResourceString(SR.FileOpenedNoRead))) + End If + End Sub + + End Class + +End Namespace diff --git a/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/CompilerServices/VB6InputFile.vb b/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/CompilerServices/VB6InputFile.vb new file mode 100644 index 000000000000..fcdf84dac68e --- /dev/null +++ b/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/CompilerServices/VB6InputFile.vb @@ -0,0 +1,214 @@ +' Licensed to the .NET Foundation under one or more agreements. +' The .NET Foundation licenses this file to you under the MIT license. +' See the LICENSE file in the project root for more information. + +Imports System +Imports System.Security +Imports System.IO + +Imports Microsoft.VisualBasic.CompilerServices.ExceptionUtils +Imports Microsoft.VisualBasic.CompilerServices.Utils + +Namespace Microsoft.VisualBasic.CompilerServices + + + Friend Class VB6InputFile + + '============================================================================ + ' Declarations + '============================================================================ + + Inherits VB6File + + '============================================================================ + ' Constructor + '============================================================================ + Public Sub New(ByVal FileName As String, ByVal share As OpenShare) + MyBase.New(FileName, OpenAccess.Read, share, -1) + End Sub + + '============================================================================ + ' Operations + '============================================================================ + Friend Overrides Sub OpenFile() + Try + m_file = New FileStream(m_sFullPath, FileMode.Open, CType(m_access, FileAccess), CType(m_share, FileShare)) + Catch ex As FileNotFoundException + Throw VbMakeException(ex, vbErrors.FileNotFound) + Catch ex As SecurityException + Throw VbMakeException(vbErrors.FileNotFound) + Catch ex As DirectoryNotFoundException + Throw VbMakeException(ex, vbErrors.PathNotFound) + Catch ex As IOException + Throw VbMakeException(ex, vbErrors.PathFileAccess) + Catch ex As StackOverflowException + Throw ex + Catch ex As OutOfMemoryException + Throw ex + Catch ex As System.Threading.ThreadAbortException + Throw ex + Catch ex As Exception + Throw VbMakeException(ex, vbErrors.PathNotFound) + End Try + + m_Encoding = GetFileIOEncoding() + m_sr = New StreamReader(m_file, m_Encoding, False, 128) + m_eof = (m_file.Length = 0) 'Don't do a Peek here or it will buffer data, causing side-effects with the Lock function. + End Sub + + Public Function ReadLine() As String + Dim s As String + s = m_sr.ReadLine() + Diagnostics.Debug.Assert(Not m_Encoding Is Nothing) + m_position += m_Encoding.GetByteCount(s) + 2 + 'It appears that no one is calling this function. It has returned nothing + ' since it was created, so keep it that way for compatibility reasons. + Return Nothing + End Function + + Friend Overrides Function CanInput() As Boolean + Return True + End Function + + Friend Overrides Function EOF() As Boolean + Return m_eof + End Function + + Public Overrides Function GetMode() As OpenMode + Return OpenMode.Input + End Function + + Friend Function ParseInputString(ByRef sInput As String) As Object + ParseInputString = sInput + + ' variant must have last character as a pound sign + ' that is different than the first + If sInput.Chars(0) = CChar("#") AndAlso sInput.Length <> 1 Then + ' isolate the string between the pound signs + sInput = sInput.Substring(1, sInput.Length - 2) + + ' test for fixed string values first + ' VT_EMPTY is not converted + If sInput = "NULL" Then + ParseInputString = DBNull.Value + ElseIf sInput = "TRUE" Then + ParseInputString = CObj(True) + ElseIf sInput = "FALSE" Then + ParseInputString = CObj(False) + ElseIf Left(sInput, 6) = "ERROR " Then + ' parse I4 value after "ERROR " string + Dim errValue As Integer + + If sInput.Length > 6 Then + errValue = IntegerType.FromString(Mid(sInput, 7)) + End If + + ' error value is assigned to the input string for now + ParseInputString = errValue + + ' test for date variant. Note, input always uses the + ' universal date format; so use english LCID (0x40) for + ' coercion. + ' CALENDAR_SUPPORT + Else + Try + ParseInputString = System.DateTime.Parse(ToHalfwidthNumbers(sInput, GetCultureInfo())) + Catch ex As StackOverflowException + Throw ex + Catch ex As OutOfMemoryException + Throw ex + Catch ex As System.Threading.ThreadAbortException + Throw ex + Catch e As Exception + End Try + End If + End If + End Function + + '====================================== + ' Input + '====================================== + Friend Overloads Overrides Sub Input(ByRef obj As Object) + Dim lChar As Integer + Dim sField As String + + lChar = SkipWhiteSpaceEOF() 'Skip over leading whitespace + + If lChar = lchDoubleQuote Then + lChar = m_sr.Read() + m_position += 1 + + obj = ReadInField(FIN_QSTRING) + SkipTrailingWhiteSpace() + ElseIf lChar = lchPound Then + obj = ParseInputString(InputStr()) + Else + sField = ReadInField(FIN_NUMBER) + obj = ParseInputField(sField, VariantType.Empty) + SkipTrailingWhiteSpace() + End If + End Sub + + Friend Overloads Overrides Sub Input(ByRef Value As Boolean) + Value = BooleanType.FromObject(ParseInputString(InputStr())) + End Sub + + Friend Overloads Overrides Sub Input(ByRef Value As Byte) + Value = ByteType.FromObject(InputNum(VariantType.Byte)) + End Sub + + Friend Overloads Overrides Sub Input(ByRef Value As Short) + Value = ShortType.FromObject(InputNum(VariantType.Short)) + End Sub + + Friend Overloads Overrides Sub Input(ByRef Value As Integer) + Value = IntegerType.FromObject(InputNum(VariantType.Integer)) + End Sub + + Friend Overloads Overrides Sub Input(ByRef Value As Long) + Value = LongType.FromObject(InputNum(VariantType.Long)) + End Sub + + Friend Overloads Overrides Sub Input(ByRef Value As Char) + Dim s As String = InputStr() + + If s.Length > 0 Then + Value = s.Chars(0) + Else + Value = ControlChars.NullChar + End If + End Sub + + Friend Overloads Overrides Sub Input(ByRef Value As Single) + Value = SingleType.FromObject(InputNum(VariantType.Single), GetInvariantCultureInfo().NumberFormat) + End Sub + + Friend Overloads Overrides Sub Input(ByRef Value As Double) + Value = DoubleType.FromObject(InputNum(VariantType.Double), GetInvariantCultureInfo().NumberFormat) + End Sub + + Friend Overloads Overrides Sub Input(ByRef Value As Decimal) + Value = DecimalType.FromObject(InputNum(VariantType.Decimal), GetInvariantCultureInfo().NumberFormat) + End Sub + + Friend Overloads Overrides Sub Input(ByRef Value As String) + Value = InputStr() + End Sub + + Friend Overloads Overrides Sub Input(ByRef Value As Date) + Value = DateType.FromObject(ParseInputString(InputStr())) + End Sub + + Friend Overrides Function LOC() As Long + 'This calculation depends on the buffersize of the FileStream + 'object, any changes in the urt classes could mess this up + ' The FileStream is used by the StreamReader, which reads ahead + ' into the 128 byte buffer specified when the StreamReader was created + ' The m_file.Position is where the reader has read to, not the vb user + 'm_position tracks where the vb user has read to. + Return ((m_position + 127) \ 128) + End Function + + End Class + +End Namespace diff --git a/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/CompilerServices/VB6OutputFile.vb b/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/CompilerServices/VB6OutputFile.vb new file mode 100644 index 000000000000..0fe2867113d2 --- /dev/null +++ b/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/CompilerServices/VB6OutputFile.vb @@ -0,0 +1,137 @@ +' Licensed to the .NET Foundation under one or more agreements. +' The .NET Foundation licenses this file to you under the MIT license. +' See the LICENSE file in the project root for more information. + +Imports System +Imports System.IO +Imports System.Security + +Imports Microsoft.VisualBasic.CompilerServices.ExceptionUtils +Imports Microsoft.VisualBasic.CompilerServices.Utils + +Namespace Microsoft.VisualBasic.CompilerServices + + + Friend Class VB6OutputFile + + '============================================================================ + ' Declarations + '============================================================================ + Inherits VB6File + + '============================================================================ + ' Constructor + '============================================================================ + Friend Sub New() + MyBase.New() + End Sub + + Friend Sub New(ByVal FileName As String, ByVal share As OpenShare, ByVal fAppend As Boolean) + MyBase.New(FileName, OpenAccess.Write, share, -1) + m_fAppend = fAppend + End Sub + + '============================================================================ + ' Operations + '============================================================================ + Friend Overrides Sub OpenFile() + 'MyBase.OpenFile() + + Try + If m_fAppend Then + 'consider checking WRITE if cannot open READWRITE + If File.Exists(m_sFullPath) Then + m_file = New FileStream(m_sFullPath, FileMode.Open, CType(m_access, FileAccess), CType(m_share, FileShare)) + Else + m_file = New FileStream(m_sFullPath, FileMode.Create, CType(m_access, FileAccess), CType(m_share, FileShare)) + End If + Else + m_file = New FileStream(m_sFullPath, FileMode.Create, CType(m_access, FileAccess), CType(m_share, FileShare)) + End If + Catch ex As FileNotFoundException + Throw VbMakeException(ex, vbErrors.FileNotFound) + Catch ex As SecurityException + Throw VbMakeException(ex, vbErrors.FileNotFound) + Catch ex As DirectoryNotFoundException + Throw VbMakeException(ex, vbErrors.PathNotFound) + Catch ex As IOException + Throw VbMakeException(ex, vbErrors.PathFileAccess) + End Try + + m_Encoding = GetFileIOEncoding() + m_sw = New StreamWriter(m_file, m_Encoding) + m_sw.AutoFlush = True + + If m_fAppend Then + 'Now position at end of file + Dim lEndOfFile As Long + lEndOfFile = m_file.Length + m_file.Position = lEndOfFile + m_position = lEndOfFile + End If + End Sub + + Friend Overrides Sub WriteLine(ByVal s As String) + If s Is Nothing Then + m_sw.WriteLine() + m_position += 2 + Else + If m_bPrint AndAlso (m_lWidth <> 0) Then + If m_lCurrentColumn >= m_lWidth Then + m_sw.WriteLine() + m_position += 2 + End If + End If + + m_sw.WriteLine(s) + Diagnostics.Debug.Assert(Not m_Encoding Is Nothing) + m_position += m_Encoding.GetByteCount(s) + 2 + End If + + m_lCurrentColumn = 0 + End Sub + + Friend Overrides Sub WriteString(ByVal s As String) + If (s Is Nothing) OrElse (s.Length = 0) Then + Exit Sub + End If + + If m_bPrint AndAlso (m_lWidth <> 0) Then + If (m_lCurrentColumn >= m_lWidth) OrElse + (m_lCurrentColumn <> 0 AndAlso (m_lCurrentColumn + s.Length) > m_lWidth) Then + m_sw.WriteLine() + m_position += 2 + m_lCurrentColumn = 0 + End If + End If + + m_sw.Write(s) + Diagnostics.Debug.Assert(Not m_Encoding Is Nothing) + Dim ByteLength As Integer = m_Encoding.GetByteCount(s) + m_position += ByteLength + m_lCurrentColumn += s.Length + End Sub + + Friend Overrides Function CanWrite() As Boolean + CanWrite = True + End Function + + Public Overrides Function GetMode() As OpenMode + If m_fAppend Then + GetMode = OpenMode.Append + Else + GetMode = OpenMode.Output + End If + End Function + + Friend Overrides Function EOF() As Boolean + EOF = True + End Function + + Friend Overrides Function LOC() As Long + Return ((m_position + 127) \ 128) + End Function + + End Class + +End Namespace diff --git a/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/CompilerServices/VB6RandomFile.vb b/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/CompilerServices/VB6RandomFile.vb new file mode 100644 index 000000000000..7b63a6dcd772 --- /dev/null +++ b/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/CompilerServices/VB6RandomFile.vb @@ -0,0 +1,615 @@ +' Licensed to the .NET Foundation under one or more agreements. +' The .NET Foundation licenses this file to you under the MIT license. +' See the LICENSE file in the project root for more information. + +Imports System +Imports System.IO + +Imports Microsoft.VisualBasic.CompilerServices.ExceptionUtils +Imports Microsoft.VisualBasic.CompilerServices.Utils + +Namespace Microsoft.VisualBasic.CompilerServices + + _ + Friend Class VB6RandomFile + + '============================================================================ + ' Declarations + '============================================================================ + + Inherits VB6File + + '============================================================================ + ' Constructor + '============================================================================ + Public Sub New(ByVal FileName As String, ByVal access As OpenAccess, ByVal share As OpenShare, ByVal lRecordLen As Integer) + MyBase.New(FileName, access, share, lRecordLen) + End Sub + + '============================================================================ + ' Operations + '============================================================================ + Private Sub OpenFileHelper(ByVal fm As FileMode, ByVal fa As OpenAccess) + Try + m_file = New FileStream(m_sFullPath, fm, CType(fa, FileAccess), CType(m_share, FileShare)) + Catch ex As FileNotFoundException + Throw VbMakeException(ex, vbErrors.FileNotFound) + Catch ex As DirectoryNotFoundException + Throw VbMakeException(ex, vbErrors.PathNotFound) + Catch ex As Security.SecurityException + Throw VbMakeException(ex, vbErrors.FileNotFound) + Catch ex As IOException + Throw VbMakeException(ex, vbErrors.PathFileAccess) + Catch ex As UnauthorizedAccessException + Throw VbMakeException(ex, vbErrors.PathFileAccess) + Catch ex As ArgumentException 'Invalid combination of FileMode and OpenAccess + Throw VbMakeException(ex, vbErrors.PathFileAccess) + Catch ex As StackOverflowException + Throw ex + Catch ex As OutOfMemoryException + Throw ex + Catch ex As System.Threading.ThreadAbortException + Throw ex + Catch ex As Exception + Throw VbMakeException(vbErrors.InternalError) + End Try + End Sub + + Friend Overrides Sub OpenFile() + Dim fm As FileMode + Dim stm As Stream + + 'Attempt the following + If File.Exists(m_sFullPath) Then + fm = FileMode.Open + ElseIf m_access = OpenAccess.Read Then + fm = FileMode.OpenOrCreate + Else + fm = FileMode.Create + End If + + If m_access = OpenAccess.Default Then + 'Must try ReadWrite/Write then Read + m_access = OpenAccess.ReadWrite + + Try + OpenFileHelper(fm, m_access) + Catch ex As StackOverflowException + Throw ex + Catch ex As OutOfMemoryException + Throw ex + Catch ex As System.Threading.ThreadAbortException + Throw ex + Catch + 'Try Write access + m_access = OpenAccess.Write + Try + OpenFileHelper(fm, m_access) + Catch ex As StackOverflowException + Throw ex + Catch ex As OutOfMemoryException + Throw ex + Catch ex As System.Threading.ThreadAbortException + Throw ex + Catch + 'If that failed, try read access + m_access = OpenAccess.Read + OpenFileHelper(fm, m_access) + End Try + End Try + Else + OpenFileHelper(fm, m_access) + End If + + m_Encoding = GetFileIOEncoding() + stm = m_file + + If (m_access = OpenAccess.Write) OrElse (m_access = OpenAccess.ReadWrite) Then + m_sw = New StreamWriter(stm, m_Encoding) + m_sw.AutoFlush = True + m_bw = New BinaryWriter(stm, m_Encoding) + End If + + If (m_access = OpenAccess.Read) OrElse (m_access = OpenAccess.ReadWrite) Then + m_br = New BinaryReader(stm, m_Encoding) + + If GetMode() = OpenMode.Binary Then + ' pass false to prevent detection of encoding marks + m_sr = New StreamReader(stm, m_Encoding, False, 128) + End If + End If + End Sub + + Friend Overrides Sub CloseFile() + If Not m_sw Is Nothing Then + m_sw.Flush() + End If + CloseTheFile() + End Sub + + Friend Overloads Overrides Sub Lock(ByVal lStart As Long, ByVal lEnd As Long) + If lStart > lEnd Then + Throw New ArgumentException(GetResourceString(SR.Argument_InvalidValue1, "Start")) + End If + + Dim lStartByte As Long + Dim lLength As Long + + lStartByte = (lStart - 1) * m_lRecordLen + lLength = (lEnd - lStart + 1) * m_lRecordLen + + m_file.Lock(lStartByte, lLength) + End Sub + + Friend Overloads Overrides Sub Unlock(ByVal lStart As Long, ByVal lEnd As Long) + If lStart > lEnd Then + Throw New ArgumentException(GetResourceString(SR.Argument_InvalidValue1, "Start")) + End If + + Dim lStartByte As Long + Dim lLength As Long + + lStartByte = (lStart - 1) * m_lRecordLen + lLength = (lEnd - lStart + 1) * m_lRecordLen + m_file.Unlock(lStartByte, lLength) + End Sub + + Public Overrides Function GetMode() As OpenMode + GetMode = OpenMode.Random + End Function + + Friend Overrides Function GetStreamReader() As StreamReader + GetStreamReader = New StreamReader(m_file, m_Encoding) + End Function + + Friend Overrides Function EOF() As Boolean + m_eof = (m_position >= m_file.Length) + Return m_eof + End Function + + Friend Overrides Function LOC() As Long + If m_lRecordLen = 0 Then + Throw VbMakeException(vbErrors.InternalError) + Else + Dim pos As Long + pos = m_position + Return (pos + m_lRecordLen - 1) \ m_lRecordLen + End If + End Function + + Friend Overloads Overrides Sub Seek(ByVal Position As Long) + SetRecord(Position) + End Sub + + Friend Overloads Overrides Function Seek() As Long + Return (LOC() + 1) + End Function + + '====================================== + ' Get + '====================================== + Friend Overrides Sub GetObject(ByRef Value As Object, Optional ByVal RecordNumber As Long = 0, + Optional ByVal ContainedInVariant As Boolean = True) + + Dim typ As System.Type = Nothing + Dim vtype As VT + + ValidateReadable() + SetRecord(RecordNumber) + + If ContainedInVariant Then + vtype = CType(m_br.ReadInt16(), VT) + m_position += 2 + Else + typ = Value.GetType + + Select Case Type.GetTypeCode(typ) + Case TypeCode.String + vtype = VT.String + Case TypeCode.Int16 + vtype = VT.Short + Case TypeCode.Int32 + vtype = VT.Integer + Case TypeCode.Int64 + vtype = VT.Long + Case TypeCode.Byte + vtype = VT.Byte + Case TypeCode.DateTime + vtype = VT.Date + Case TypeCode.Double + vtype = VT.Double + Case TypeCode.Single + vtype = VT.Single + Case TypeCode.Decimal + vtype = VT.Decimal + Case TypeCode.Boolean + vtype = VT.Boolean + Case TypeCode.Char + vtype = VT.Char + Case TypeCode.Object + If typ.IsValueType Then + vtype = VT.Structure + Else + vtype = VT.Variant 'To force an exception later + End If + Case Else + vtype = VT.Variant 'To force an exception later + End Select + End If + + If (vtype And VT.Array) <> 0 Then + Dim arr As System.Array = Nothing + Dim v As VT = vtype Xor VT.Array + GetDynamicArray(arr, ComTypeFromVT(v)) + Value = arr + Else + If vtype = VT.String Then + Value = GetLengthPrefixedString(0) + ElseIf vtype = VT.Short Then + Value = GetShort(0) + ElseIf vtype = VT.Integer Then + Value = GetInteger(0) + ElseIf vtype = VT.Long Then + Value = GetLong(0) + ElseIf vtype = VT.Byte Then + Value = GetByte(0) + ElseIf vtype = VT.Date Then + Value = GetDate(0) + ElseIf vtype = VT.Double Then + Value = GetDouble(0) + ElseIf vtype = VT.Single Then + Value = GetSingle(0) + ElseIf vtype = VT.Currency Then + Value = GetCurrency(0) + ElseIf vtype = VT.Decimal Then + Value = GetDecimal(0) + ElseIf vtype = VT.Boolean Then + Value = GetBoolean(0) + ElseIf vtype = VT.Char Then + Value = GetChar(0) + ElseIf vtype = VT.Structure Then + Dim valType As ValueType + valType = CType(Value, ValueType) + GetRecord(0, valType, False) + Value = valType + ElseIf vtype = VT.DBNull AndAlso ContainedInVariant Then + Value = DBNull.Value + ElseIf vtype = VT.DBNull Then + Throw VbMakeException(New ArgumentException(GetResourceString(SR.Argument_UnsupportedIOType1, "DBNull")), vbErrors.IllegalFuncCall) + ElseIf vtype = VT.Empty Then + Value = Nothing + ElseIf vtype = VT.Currency Then + Throw VbMakeException(New ArgumentException(GetResourceString(SR.Argument_UnsupportedIOType1, "Currency")), vbErrors.IllegalFuncCall) + Else + Throw VbMakeException(New ArgumentException(GetResourceString(SR.Argument_UnsupportedIOType1, typ.FullName)), vbErrors.IllegalFuncCall) + End If + End If + End Sub + + Friend Overloads Overrides Sub [Get](ByRef Value As ValueType, Optional ByVal RecordNumber As Long = 0) + ValidateReadable() + GetRecord(RecordNumber, Value, False) + End Sub + + Friend Overloads Overrides Sub [Get](ByRef Value As System.Array, Optional ByVal RecordNumber As Long = 0, + Optional ByVal ArrayIsDynamic As Boolean = False, Optional ByVal StringIsFixedLength As Boolean = False) + + ValidateReadable() + + If (Value Is Nothing) Then + Throw New ArgumentException(GetResourceString(SR.Argument_ArrayNotInitialized)) + End If + + Dim typ As Type = Value.GetType().GetElementType + Dim len As Integer = -1 + Dim obj As Object + Dim cDims As Integer = Value.Rank() + Dim FirstBound As Integer = -1 + Dim SecondBound As Integer = -1 + SetRecord(RecordNumber) + + If m_file.Position >= m_file.Length Then + Return + End If + + If StringIsFixedLength AndAlso (typ Is GetType(String)) Then + 'Use first element to determine fixed length + If cDims = 1 Then + obj = Value.GetValue(0) + ElseIf cDims = 2 Then + obj = Value.GetValue(0, 0) + Else '0 or > 2 + Throw New ArgumentException(GetResourceString(SR.Argument_UnsupportedArrayDimensions)) + End If + + If obj Is Nothing Then + len = 0 + Else + len = DirectCast(obj, String).Length + End If + + If len = 0 Then + Throw New ArgumentException(GetResourceString(SR.Argument_InvalidFixedLengthString)) + End If + End If + + If ArrayIsDynamic Then + Value = GetArrayDesc(typ) + cDims = Value.Rank() + End If + + FirstBound = Value.GetUpperBound(0) + + If cDims = 1 Then + 'nothing to do + ElseIf cDims = 2 Then + SecondBound = Value.GetUpperBound(1) + Else '0 or > 2 + Throw New ArgumentException(GetResourceString(SR.Argument_UnsupportedArrayDimensions)) + End If + + If ArrayIsDynamic Then + GetArrayData(Value, typ, FirstBound, SecondBound, len) + Else + GetFixedArray(RecordNumber, Value, typ, FirstBound, SecondBound, len) + End If + End Sub + + Friend Overloads Overrides Sub [Get](ByRef Value As Boolean, Optional ByVal RecordNumber As Long = 0) + ValidateReadable() + Value = GetBoolean(RecordNumber) + End Sub + + Friend Overloads Overrides Sub [Get](ByRef Value As Byte, Optional ByVal RecordNumber As Long = 0) + ValidateReadable() + Value = GetByte(RecordNumber) + End Sub + + Friend Overloads Overrides Sub [Get](ByRef Value As Short, Optional ByVal RecordNumber As Long = 0) + ValidateReadable() + Value = GetShort(RecordNumber) + End Sub + + Friend Overloads Overrides Sub [Get](ByRef Value As Integer, Optional ByVal RecordNumber As Long = 0) + ValidateReadable() + Value = GetInteger(RecordNumber) + End Sub + + Friend Overloads Overrides Sub [Get](ByRef Value As Long, Optional ByVal RecordNumber As Long = 0) + ValidateReadable() + Value = GetLong(RecordNumber) + End Sub + + Friend Overloads Overrides Sub [Get](ByRef Value As Char, Optional ByVal RecordNumber As Long = 0) + ValidateReadable() + Value = GetChar(RecordNumber) + End Sub + + Friend Overloads Overrides Sub [Get](ByRef Value As Single, Optional ByVal RecordNumber As Long = 0) + ValidateReadable() + Value = GetSingle(RecordNumber) + End Sub + + Friend Overloads Overrides Sub [Get](ByRef Value As Double, Optional ByVal RecordNumber As Long = 0) + ValidateReadable() + Value = GetDouble(RecordNumber) + End Sub + + Friend Overloads Overrides Sub [Get](ByRef Value As Decimal, Optional ByVal RecordNumber As Long = 0) + ValidateReadable() + Value = GetCurrency(RecordNumber) + End Sub + + Friend Overloads Overrides Sub [Get](ByRef Value As String, Optional ByVal RecordNumber As Long = 0, + Optional ByVal StringIsFixedLength As Boolean = False) + + ValidateReadable() + + If StringIsFixedLength Then + Dim Length As Integer + If Value Is Nothing Then + Length = 0 + Else + Diagnostics.Debug.Assert(Not m_Encoding Is Nothing) + Length = m_Encoding.GetByteCount(Value) + End If + Value = GetFixedLengthString(RecordNumber, Length) + Else + Value = GetLengthPrefixedString(RecordNumber) + End If + End Sub + + Friend Overloads Overrides Sub [Get](ByRef Value As Date, Optional ByVal RecordNumber As Long = 0) + ValidateReadable() + Value = GetDate(RecordNumber) + End Sub + + Friend Overrides Sub PutObject(ByVal Value As Object, Optional ByVal RecordNumber As Long = 0, + Optional ByVal ContainedInVariant As Boolean = True) + + Dim typ As Type + + ValidateWriteable() + + If Value Is Nothing Then + 'Put a VT_EMPTY + PutEmpty(RecordNumber) + Exit Sub + End If + + typ = Value.GetType + + If typ Is Nothing Then + Throw VbMakeException(New ArgumentException(GetResourceString(SR.Argument_UnsupportedIOType1, "Empty")), vbErrors.IllegalFuncCall) + ElseIf typ.IsArray Then + PutDynamicArray(RecordNumber, CType(Value, System.Array)) + Exit Sub + ElseIf typ.IsEnum Then + typ = System.Enum.GetUnderlyingType(typ) + End If + + Select Case Type.GetTypeCode(typ) + Case TypeCode.String + PutVariantString(RecordNumber, Value.ToString()) + Return + Case TypeCode.Int16 + PutShort(RecordNumber, ShortType.FromObject(Value), ContainedInVariant) + Return + Case TypeCode.Int32 + PutInteger(RecordNumber, IntegerType.FromObject(Value), ContainedInVariant) + Return + Case TypeCode.Int64 + PutLong(RecordNumber, LongType.FromObject(Value), ContainedInVariant) + Return + Case TypeCode.Byte + PutByte(RecordNumber, ByteType.FromObject(Value), ContainedInVariant) + Return + Case TypeCode.DateTime + PutDate(RecordNumber, DateType.FromObject(Value), ContainedInVariant) + Return + Case TypeCode.Double + PutDouble(RecordNumber, DoubleType.FromObject(Value), ContainedInVariant) + Return + Case TypeCode.Single + PutSingle(RecordNumber, SingleType.FromObject(Value), ContainedInVariant) + Return + Case TypeCode.Decimal + PutDecimal(RecordNumber, DecimalType.FromObject(Value), ContainedInVariant) + Return + Case TypeCode.Boolean + PutBoolean(RecordNumber, BooleanType.FromObject(Value), ContainedInVariant) + Return + Case TypeCode.Char + PutChar(RecordNumber, CharType.FromObject(Value), ContainedInVariant) + Return + Case TypeCode.DBNull + 'Use PutShort since DBNull is only a two-byte vartype with no data + PutShort(RecordNumber, VT.DBNull, False) + Return + End Select + + If typ Is GetType(System.Reflection.Missing) Then + Throw VbMakeException(New ArgumentException(GetResourceString(SR.Argument_UnsupportedIOType1, "Missing")), vbErrors.IllegalFuncCall) + + ElseIf typ.IsValueType() AndAlso Not ContainedInVariant Then + PutRecord(RecordNumber, CType(Value, ValueType)) + + ElseIf ContainedInVariant AndAlso typ.IsValueType Then + Throw VbMakeException(New ArgumentException(GetResourceString(SR.Argument_PutObjectOfValueType1, VBFriendlyName(typ, Value))), vbErrors.IllegalFuncCall) + + Else + Throw VbMakeException(New ArgumentException(GetResourceString(SR.Argument_UnsupportedIOType1, VBFriendlyName(typ, Value))), vbErrors.IllegalFuncCall) + End If + End Sub + + Friend Overloads Overrides Sub Put(ByVal Value As ValueType, Optional ByVal RecordNumber As Long = 0) + ValidateWriteable() + PutRecord(RecordNumber, Value) + End Sub + + Friend Overloads Overrides Sub Put(ByVal Value As System.Array, Optional ByVal RecordNumber As Long = 0, + Optional ByVal ArrayIsDynamic As Boolean = False, Optional ByVal StringIsFixedLength As Boolean = False) + + ValidateWriteable() + + If Value Is Nothing Then + PutEmpty(RecordNumber) + Return + End If + + Dim FirstBound As Integer = Value.GetUpperBound(0) + Dim SecondBound As Integer = -1 + Dim FixedStringLength As Integer = -1 + Dim typ As System.Type + + If Value.Rank = 2 Then + SecondBound = Value.GetUpperBound(1) + End If + If StringIsFixedLength Then + FixedStringLength = 0 'Fixed length string, but length calculated by Put function + End If + + typ = Value.GetType().GetElementType() + + If ArrayIsDynamic Then + PutDynamicArray(RecordNumber, Value, False, FixedStringLength) + Else + PutFixedArray(RecordNumber, Value, typ, FixedStringLength, FirstBound, SecondBound) + End If + End Sub + + Friend Overloads Overrides Sub Put(ByVal Value As Boolean, Optional ByVal RecordNumber As Long = 0) + ValidateWriteable() + PutBoolean(RecordNumber, Value) + End Sub + + Friend Overloads Overrides Sub Put(ByVal Value As Byte, Optional ByVal RecordNumber As Long = 0) + ValidateWriteable() + PutByte(RecordNumber, Value) + End Sub + + Friend Overloads Overrides Sub Put(ByVal Value As Short, Optional ByVal RecordNumber As Long = 0) + ValidateWriteable() + PutShort(RecordNumber, Value) + End Sub + + Friend Overloads Overrides Sub Put(ByVal Value As Integer, Optional ByVal RecordNumber As Long = 0) + ValidateWriteable() + PutInteger(RecordNumber, Value) + End Sub + + Friend Overloads Overrides Sub Put(ByVal Value As Long, Optional ByVal RecordNumber As Long = 0) + ValidateWriteable() + PutLong(RecordNumber, Value) + End Sub + + Friend Overloads Overrides Sub Put(ByVal Value As Char, Optional ByVal RecordNumber As Long = 0) + ValidateWriteable() + PutChar(RecordNumber, Value) + End Sub + + Friend Overloads Overrides Sub Put(ByVal Value As Single, Optional ByVal RecordNumber As Long = 0) + ValidateWriteable() + PutSingle(RecordNumber, Value) + End Sub + + Friend Overloads Overrides Sub Put(ByVal Value As Double, Optional ByVal RecordNumber As Long = 0) + ValidateWriteable() + PutDouble(RecordNumber, Value) + End Sub + + Friend Overloads Overrides Sub Put(ByVal Value As Decimal, Optional ByVal RecordNumber As Long = 0) + ValidateWriteable() + PutCurrency(RecordNumber, Value) + End Sub + + Friend Overloads Overrides Sub Put(ByVal Value As String, Optional ByVal RecordNumber As Long = 0, Optional ByVal StringIsFixedLength As Boolean = False) + ValidateWriteable() + + If StringIsFixedLength Then + PutString(RecordNumber, Value) + Else + PutStringWithLength(RecordNumber, Value) + End If + End Sub + + Friend Overloads Overrides Sub Put(ByVal Value As Date, Optional ByVal RecordNumber As Long = 0) + ValidateWriteable() + PutDate(RecordNumber, Value) + End Sub + + Protected Sub ValidateWriteable() + If (m_access <> OpenAccess.ReadWrite) AndAlso (m_access <> OpenAccess.Write) Then + Throw VbMakeExceptionEx(vbErrors.PathFileAccess, GetResourceString(SR.FileOpenedNoWrite)) + End If + End Sub + + Protected Sub ValidateReadable() + If (m_access <> OpenAccess.ReadWrite) AndAlso (m_access <> OpenAccess.Read) Then + Throw VbMakeExceptionEx(vbErrors.PathFileAccess, GetResourceString(SR.FileOpenedNoRead)) + End If + End Sub + + End Class + +End Namespace diff --git a/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/CompilerServices/VBBinder.vb b/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/CompilerServices/VBBinder.vb index ae2937b9b5c9..079861b0cef4 100644 --- a/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/CompilerServices/VBBinder.vb +++ b/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/CompilerServices/VBBinder.vb @@ -7,7 +7,6 @@ Imports System.Diagnostics Imports System.Reflection Imports System.Globalization Imports System.Security -Imports System.Security.Permissions Imports Microsoft.VisualBasic.CompilerServices.LateBinding Imports Microsoft.VisualBasic.CompilerServices.ExceptionUtils diff --git a/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/Constants.vb b/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/Constants.vb index 13cbcbf152bd..8f0babe1965d 100644 --- a/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/Constants.vb +++ b/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/Constants.vb @@ -3,8 +3,10 @@ ' See the LICENSE file in the project root for more information. Namespace Global.Microsoft.VisualBasic + Public Module Constants + Public Const vbCrLf As String = ChrW(13) & ChrW(10) Public Const vbNewLine As String = ChrW(13) & ChrW(10) @@ -21,10 +23,39 @@ Namespace Global.Microsoft.VisualBasic Public Const vbBinaryCompare As CompareMethod = CompareMethod.Binary Public Const vbTextCompare As CompareMethod = CompareMethod.Text + 'vbDateTimeFormat + Public Const vbGeneralDate As DateFormat = DateFormat.GeneralDate + Public Const vbLongDate As DateFormat = DateFormat.LongDate + Public Const vbShortDate As DateFormat = DateFormat.ShortDate + Public Const vbLongTime As DateFormat = DateFormat.LongTime + Public Const vbShortTime As DateFormat = DateFormat.ShortTime + + 'FileAttribute + Public Const vbNormal As FileAttribute = FileAttribute.Normal + Public Const vbReadOnly As FileAttribute = FileAttribute.ReadOnly + Public Const vbHidden As FileAttribute = FileAttribute.Hidden + Public Const vbSystem As FileAttribute = FileAttribute.System + Public Const vbVolume As FileAttribute = FileAttribute.Volume + Public Const vbDirectory As FileAttribute = FileAttribute.Directory + Public Const vbArchive As FileAttribute = FileAttribute.Archive + + 'vbStrConv + Public Const vbUpperCase As VbStrConv = VbStrConv.Uppercase + Public Const vbLowerCase As VbStrConv = VbStrConv.Lowercase + Public Const vbProperCase As VbStrConv = VbStrConv.ProperCase + Public Const vbWide As VbStrConv = VbStrConv.Wide + Public Const vbNarrow As VbStrConv = VbStrConv.Narrow + Public Const vbKatakana As VbStrConv = VbStrConv.Katakana + Public Const vbHiragana As VbStrConv = VbStrConv.Hiragana + Public Const vbSimplifiedChinese As VbStrConv = VbStrConv.SimplifiedChinese + Public Const vbTraditionalChinese As VbStrConv = VbStrConv.TraditionalChinese + Public Const vbLinguisticCasing As VbStrConv = VbStrConv.LinguisticCasing + 'vbTriState Public Const vbUseDefault As TriState = TriState.UseDefault Public Const vbTrue As TriState = TriState.True Public Const vbFalse As TriState = TriState.False End Module + End Namespace diff --git a/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/Conversion.vb b/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/Conversion.vb index 8935b974c4e9..f3f00fead230 100644 --- a/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/Conversion.vb +++ b/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/Conversion.vb @@ -948,6 +948,177 @@ NextOctCharacter: End Function + + + Friend Function ParseInputField(ByVal Value As Object, ByVal vtInput As VariantType) As Object +#If PLATFORM_WINDOWS Then + Dim numprsPtr() As Byte + Dim vtSuffix As Integer + Dim cDecMax As Integer + Dim StringValue As String = CStr(Value) + Dim DigitArray() As Byte + Dim pd As ProjectData + Dim cchUsed As Int32 + Dim nPwr10 As Int32 + Dim chTypeChar As Char + Dim dwOutFlags As Int32 + Dim nBaseShift As Int32 + + Const INTEGER_SIZE As Integer = 4 + Const INFLAGS_OFFSET As Integer = 4 + + If ((vtInput = VariantType.Empty) AndAlso ((Value Is Nothing) OrElse Len(CStr(Value)) = 0)) Then + Return Nothing + End If + + pd = ProjectData.GetProjectData() + numprsPtr = pd.m_numprsPtr + DigitArray = pd.m_DigitArray + + 'numprsPtr is actually a struct. The first two fields are cDig (the size of the digits array) + 'and dwInFlags which we set to PRSFLAGS + + 'Init NUMPARSE.cDig + Array.Copy(BitConverter.GetBytes(Convert.ToInt32(DigitArray.Length)), 0, numprsPtr, 0, INTEGER_SIZE) + 'Init NUMPARSE.dwInFlags + Array.Copy(BitConverter.GetBytes(Convert.ToInt32(PRSFLAGS)), 0, numprsPtr, INFLAGS_OFFSET, INTEGER_SIZE) + + ' For file interchangeability, we always use US decimal. + If UnsafeNativeMethods.VarParseNumFromStr(StringValue, LCID_US_ENGLISH, LOCALE_NOUSEROVERRIDE, numprsPtr, DigitArray) < 0 Then + If (vtInput <> VariantType.Empty) Then + ' Just return 0 if we don't understand the number + Return 0 + End If + Return StringValue + End If + + ' Look for type character following string + dwOutFlags = BitConverter.ToInt32(numprsPtr, 8) + cchUsed = BitConverter.ToInt32(numprsPtr, 12) + nBaseShift = BitConverter.ToInt32(numprsPtr, 16) + nPwr10 = BitConverter.ToInt32(numprsPtr, 20) + + If cchUsed < StringValue.Length Then + chTypeChar = StringValue.Chars(cchUsed) + End If + + Select Case (chTypeChar) + Case "%"c + vtSuffix = VariantType.Short + cDecMax = 0 + Case "&"c + vtSuffix = VariantType.Integer + cDecMax = 0 + Case "@"c + 'Convert currency to Decimal + 'vtSuffix = VariantType.Currency + vtSuffix = VariantType.Decimal + cDecMax = 4 + Case "!"c + If (vtInput = VariantType.Double) Then + vtSuffix = VariantType.Double + Else + vtSuffix = VariantType.Single + End If + cDecMax = System.Int32.MaxValue + Case "#"c + vtSuffix = VariantType.Double + cDecMax = System.Int32.MaxValue + Case Else + ' No type suffix. + If (vtInput = VariantType.Empty) Then + ' no indication of type, either from suffix or defined + ' by type we're inputting to. + Dim dwVtBits As Integer = VTBITS + + If (dwOutFlags And NUMPRS_EXPONENT) <> 0 Then + ' if exponent specified, result is R8 only. + dwVtBits = VTBIT_R8 + End If + + Return UnsafeNativeMethods.VarNumFromParseNum(numprsPtr, DigitArray, dwVtBits) + End If + + If (nBaseShift <> 0) Then + Dim Int32Value As Integer + + ' Have a hex/octal number. Sign extend if short. + Value = UnsafeNativeMethods.VarNumFromParseNum(numprsPtr, DigitArray, VTBIT_I4) + Int32Value = CInt(Value) + + If ((Int32Value And &HFFFF0000I) = 0) Then + ' Sign extend if short. + Int32Value = CShort(Int32Value) + End If + + UnsafeNativeMethods.VariantChangeType(Value, Value, 0, CType(vtInput, Int16)) + Return Value + End If + + Return UnsafeNativeMethods.VarNumFromParseNum(numprsPtr, DigitArray, ShiftVTBits(vtInput)) + End Select + + ' Have a type character suffix. Convert to that type. + If (-nPwr10 > cDecMax) Then + Throw VbMakeException(vbErrors.TypeMismatch) + End If + + Value = UnsafeNativeMethods.VarNumFromParseNum(numprsPtr, DigitArray, ShiftVTBits(vtSuffix)) + + If (vtInput = VariantType.Empty) Then + Return Value + End If + + UnsafeNativeMethods.VariantChangeType(Value, Value, 0, CType(vtInput, Int16)) + Return Value +#Else + Throw New PlatformNotSupportedException() +#End If + End Function + + Private Function ShiftVTBits(ByVal vt As Integer) As Integer + Select Case vt + 'Case VariantType.Empty + 'Fall through VTBIT_EMPTY + 'Case VariantType.Null + 'Fall through VTBIT_NULL + Case VariantType.Short + Return VTBIT_I2 + Case VariantType.Integer + Return VTBIT_I4 + Case VariantType.Single + Return VTBIT_R4 + Case VariantType.Double + Return VTBIT_R8 + Case VariantType.Decimal, VariantType.Currency + Return VTBIT_DECIMAL + Case VariantType.Date + Return VTBIT_DATE + Case VariantType.String + Return VTBIT_BSTR + Case VariantType.Object + Return VTBIT_OBJECT + Case VariantType.Error + Return VTBIT_ERROR + Case VariantType.Boolean + Return VTBIT_BOOL + Case VariantType.Variant + Return VTBIT_VARIANT + Case VariantType.DataObject + Return VTBIT_DATAOBJECT + Case VariantType.Decimal + Return VTBIT_DECIMAL + Case VariantType.Byte + Return VTBIT_BYTE + Case VariantType.Char + Return VTBIT_CHAR + Case VariantType.Long + Return VTBIT_LONG + Case Else + Return 0 + End Select + End Function + Public Function CTypeDynamic(ByVal Expression As Object, ByVal TargetType As System.Type) As Object Return Conversions.ChangeType(Expression, TargetType, True) End Function diff --git a/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/Devices/Computer.vb b/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/Devices/Computer.vb index f5c3aa5b4817..8430457e525c 100644 --- a/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/Devices/Computer.vb +++ b/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/Devices/Computer.vb @@ -7,9 +7,6 @@ Option Explicit On Imports System Imports Microsoft.VisualBasic.MyServices -Imports System.ComponentModel -Imports System.Security.Permissions -Imports Microsoft.VisualBasic Namespace Microsoft.VisualBasic.Devices diff --git a/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/Devices/ServerComputer.vb b/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/Devices/ServerComputer.vb index 9d4a1ded1cc9..44420e8bffa0 100644 --- a/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/Devices/ServerComputer.vb +++ b/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/Devices/ServerComputer.vb @@ -6,9 +6,6 @@ Option Strict On Option Explicit On Imports System -Imports System.ComponentModel -Imports System.Security.Permissions -Imports Microsoft.VisualBasic Imports Microsoft.VisualBasic.MyServices Namespace Microsoft.VisualBasic.Devices diff --git a/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/FileIO/FileSystem.vb b/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/FileIO/FileSystem.vb index d6c3e88d251a..b9bdeadf398b 100644 --- a/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/FileIO/FileSystem.vb +++ b/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/FileIO/FileSystem.vb @@ -1138,7 +1138,7 @@ Namespace Microsoft.VisualBasic.FileIO If Environment.OSVersion.Platform = PlatformID.Win32NT Then ' Platforms supporting MoveFileEx. WinNTCopyOrMove(sourceFileFullPath, destinationFileFullPath) - Else ' Win95, Win98, WinME, non Windows + Else ' Non Windows ' IO.File.Delete will not throw if destinationFileFullPath does not exist ' (user may not have permission to discover this, but have permission to overwrite), ' so always delete the destination. @@ -1949,10 +1949,6 @@ End Namespace ' - MoveDirectory behaves the same so MoveDirectory is not equal to calling CopyDirectory and DeleteDirectory. ' - Overwrite in directory case means overwrite sub files. Sub directories will always be merged. ' -' - 2004/08/09: Including the Overwrite option and ShowUI in one method is confusing -' since there are cases Shell methods will ask questions, even with NOCONFIRMATION flag on. -' We made changes to separate methods containing Overwrite and ShowUI. UE should notice this. - ' Shell behavior in exception cases: ' - Copy / Move File ' . Existing target: diff --git a/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/FileSystem.vb b/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/FileSystem.vb index c5a509de9e99..9d619155c051 100644 --- a/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/FileSystem.vb +++ b/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/FileSystem.vb @@ -3,13 +3,1494 @@ ' See the LICENSE file in the project root for more information. Imports System +Imports System.Diagnostics +Imports System.Globalization +Imports System.IO +Imports System.Runtime.Versioning +Imports System.Text + +Imports Microsoft.VisualBasic.CompilerServices +Imports Microsoft.VisualBasic.CompilerServices.ExceptionUtils +Imports Microsoft.VisualBasic.CompilerServices.IOUtils +Imports Microsoft.VisualBasic.CompilerServices.Utils Namespace Microsoft.VisualBasic - Friend Module FileSystem + Public Module FileSystem + + Private Const ERROR_ACCESS_DENIED As Integer = 5 + Private Const ERROR_FILE_NOT_FOUND As Integer = 2 + Private Const ERROR_BAD_NETPATH As Integer = 53 + Private Const ERROR_INVALID_PARAMETER As Integer = 87 + Private Const ERROR_WRITE_PROTECT As Integer = 19 + Private Const ERROR_FILE_EXISTS As Integer = 80 + Private Const ERROR_ALREADY_EXISTS As Integer = 183 + Private Const ERROR_INVALID_ACCESS As Integer = 12 + Private Const ERROR_NOT_SAME_DEVICE As Integer = 17 + + Friend Enum vbFileType + vbPrintFile = 0 + vbWriteFile = 1 + End Enum + 'FILESYSTEM function vars + + Friend Const FIRST_LOCAL_CHANNEL As Integer = 1 + Friend Const LAST_LOCAL_CHANNEL As Integer = 255 + + Private Const A_NORMAL As Integer = &H0I + Private Const A_RDONLY As Integer = &H1I + Private Const A_HIDDEN As Integer = &H2I + Private Const A_SYSTEM As Integer = &H4I + Private Const A_VOLID As Integer = &H8I + Private Const A_SUBDIR As Integer = &H10I + Private Const A_ARCH As Integer = &H20I + Private Const A_ALLBITS As Integer = (A_NORMAL Or A_RDONLY Or A_HIDDEN Or A_SYSTEM Or A_VOLID Or A_SUBDIR Or A_ARCH) + + Friend Const sTimeFormat As String = "T" + Friend Const sDateFormat As String = "d" + Friend Const sDateTimeFormat As String = "F" + + Friend ReadOnly m_WriteDateFormatInfo As DateTimeFormatInfo = InitializeWriteDateFormatInfo() ' Call static initializer due to FxCop InitializeReferenceTypeStaticFieldsInline. + Private Function InitializeWriteDateFormatInfo() As DateTimeFormatInfo + Dim dfi As New DateTimeFormatInfo + dfi.DateSeparator = "-" + dfi.ShortDatePattern = "\#yyyy-MM-dd\#" + dfi.LongTimePattern = "\#HH:mm:ss\#" + dfi.FullDateTimePattern = "\#yyyy-MM-dd HH:mm:ss\#" + Return dfi + End Function + + '============================================================================ + ' Directory/drive functions. + '============================================================================ + + Public Sub ChDir(ByVal Path As String) + Debug.Assert(Not System.Reflection.Assembly.GetCallingAssembly() Is Utils.VBRuntimeAssembly, + "Methods in Microsoft.VisualBasic should not call FileSystem public method.") + + Path = RTrim(Path) 'VB6 accepted things like "\ ", so need to trim the trailing spaces + + If (Path Is Nothing) OrElse (Path.Length = 0) Then + Throw VbMakeException(New ArgumentException(GetResourceString(SR.Argument_PathNullOrEmpty)), vbErrors.BadFileNameOrNumber) + End If + + ' Do this since System.IO.Directory does not accept "\" + If Path = "\" Then + Path = Directory.GetDirectoryRoot(Directory.GetCurrentDirectory()) + End If + + Try + System.IO.Directory.SetCurrentDirectory(Path) + Catch ex As System.IO.FileNotFoundException + Throw VbMakeException(New FileNotFoundException(GetResourceString(SR.FileSystem_PathNotFound1, Path)), vbErrors.PathNotFound) + End Try + + End Sub + + Public Sub ChDrive(ByVal Drive As Char) + Drive = System.Char.ToUpper(Drive, CultureInfo.InvariantCulture) + + If (Drive < chLetterA) OrElse (Drive > chLetterZ) Then + Throw New ArgumentException(GetResourceString(SR.Argument_InvalidValue1, "Drive")) + End If + + If Not UnsafeValidDrive(Drive) Then + Throw VbMakeException(New IOException(GetResourceString(SR.FileSystem_DriveNotFound1, CStr(Drive))), vbErrors.DevUnavailable) + End If + + IO.Directory.SetCurrentDirectory(Drive & Path.VolumeSeparatorChar) + End Sub + + Public Sub ChDrive(ByVal Drive As String) + Debug.Assert(Not System.Reflection.Assembly.GetCallingAssembly() Is Utils.VBRuntimeAssembly, + "Methods in Microsoft.VisualBasic should not call FileSystem public method.") + + If Drive Is Nothing OrElse Drive.Length = 0 Then + Exit Sub + End If + + ChDrive(Drive.Chars(0)) + End Sub + + Public Function CurDir() As String + Debug.Assert(Not System.Reflection.Assembly.GetCallingAssembly() Is Utils.VBRuntimeAssembly, + "Methods in Microsoft.VisualBasic should not call FileSystem public method.") + + Return Directory.GetCurrentDirectory() + End Function + + Public Function CurDir(ByVal Drive As Char) As String + Debug.Assert(Not System.Reflection.Assembly.GetCallingAssembly() Is Utils.VBRuntimeAssembly, + "Methods in Microsoft.VisualBasic should not call FileSystem public method.") + + Drive = System.Char.ToUpper(Drive, CultureInfo.InvariantCulture) + If (Drive < chLetterA OrElse Drive > chLetterZ) Then + Throw VbMakeException(New ArgumentException(GetResourceString(SR.Argument_InvalidValue1, "Drive")), vbErrors.DevUnavailable) + End If + + 'GetFullPath("x:.") will return the full directory path + Dim CurrentPath As String = Path.GetFullPath(Drive & Path.VolumeSeparatorChar & ".") + + If Not UnsafeValidDrive(Drive) Then + Throw VbMakeException(New IOException(GetResourceString(SR.FileSystem_DriveNotFound1, CStr(Drive))), vbErrors.DevUnavailable) + End If + Return CurrentPath + End Function + + Public Function Dir() As String + Debug.Assert(Not System.Reflection.Assembly.GetCallingAssembly() Is Utils.VBRuntimeAssembly, + "Methods in Microsoft.VisualBasic should not call FileSystem public method.") + + Return FindNextFile(System.Reflection.Assembly.GetCallingAssembly()) + End Function + + + + Public Function Dir(ByVal PathName As String, Optional ByVal Attributes As FileAttribute = FileAttribute.Normal) As String + 'VB's FileAttribute is different than System.IO.FileAttributes: + ' VB URT + 'Normal 0 128 + 'ReadOnly 1 1 + 'Hidden 2 2 + 'System 4 4 + 'Volume 8 -- + 'Directory 16 16 + 'Archive 32 32 + 'Device -- 64 + 'Temporary -- 256 + 'SparseFile -- 512 + 'ReparsePoint -- 1024 + 'Compressed -- 2048 + 'Offline -- 4096 + 'NotContentIndexed -- 8192 + 'Encrypted -- 16384 + + 'Note: Do NOT throw if pathName = "". That's legal for this function - returns the first file found. + + Debug.Assert(Not System.Reflection.Assembly.GetCallingAssembly() Is Utils.VBRuntimeAssembly, + "Methods in Microsoft.VisualBasic should not call FileSystem public method.") + + If Attributes = FileAttribute.Volume Then +#If PLATFORM_WINDOWS Then + Dim Result As Integer + Dim VolumeName As StringBuilder = New StringBuilder(256) + Dim RootName As String = Nothing + + If (PathName.Length > 0) Then + RootName = Path.GetPathRoot(PathName) + + 'Add a backslash if one isn't there. This is required by GetVolumeInformation + If RootName.Chars(RootName.Length - 1) <> Path.DirectorySeparatorChar Then + RootName &= Path.DirectorySeparatorChar + End If + End If + + Result = NativeMethods.GetVolumeInformation(RootName, VolumeName, 256, 0, 0, 0, Nothing, 0) + + If Result <> 0 Then + Return VolumeName.ToString + Else + Return "" + End If +#Else + Throw New PlatformNotSupportedException() +#End If + Else + 'Dir function always returns files with Normal attribute in addition to others specified. + Dim URTAttributes As System.IO.FileAttributes = CType(Attributes, FileAttributes) Or FileAttributes.Normal + + Return FindFirstFile(System.Reflection.Assembly.GetCallingAssembly(), PathName, URTAttributes) + End If + End Function + + Public Sub MkDir(ByVal Path As String) + Debug.Assert(Not System.Reflection.Assembly.GetCallingAssembly() Is Utils.VBRuntimeAssembly, + "Methods in Microsoft.VisualBasic should not call FileSystem public method.") + + If Path Is Nothing OrElse Path.Length = 0 Then + Throw VbMakeException(New ArgumentException(GetResourceString(SR.Argument_PathNullOrEmpty)), vbErrors.BadFileNameOrNumber) + End If + + If Directory.Exists(Path) Then + Throw VbMakeException(vbErrors.PathFileAccess) + Else + Directory.CreateDirectory(Path) + End If + End Sub + + Public Sub RmDir(ByVal Path As String) + Debug.Assert(Not System.Reflection.Assembly.GetCallingAssembly() Is Utils.VBRuntimeAssembly, + "Methods in Microsoft.VisualBasic should not call FileSystem public method.") + + 'If null or empty directory, give error + If Path Is Nothing OrElse Path.Length = 0 Then + Throw VbMakeException(New ArgumentException(GetResourceString(SR.Argument_PathNullOrEmpty)), vbErrors.BadFileNameOrNumber) + End If + + Try + Directory.Delete(Path) + Catch e1 As DirectoryNotFoundException + Throw VbMakeException(e1, vbErrors.PathNotFound) + Catch ex As StackOverflowException + Throw ex + Catch ex As OutOfMemoryException + Throw ex + Catch ex As System.Threading.ThreadAbortException + Throw ex + Catch e2 As Exception + Throw VbMakeException(e2, vbErrors.PathFileAccess) + End Try + End Sub + + '============================================================================ + ' File functions. + '============================================================================ + + Private Function PathContainsWildcards(ByVal Path As String) As Boolean + If Path Is Nothing Then + Return False + End If + + If (Path.IndexOf("*"c) <> -1) Then + Return True + End If + + If (Path.IndexOf("?"c) <> -1) Then + Return True + End If + + Return False + End Function + + Public Sub FileCopy(ByVal Source As String, ByVal Destination As String) + If (Source Is Nothing) OrElse (Source.Length = 0) Then + Throw VbMakeException(New ArgumentException(GetResourceString(SR.Argument_PathNullOrEmpty1, "Source")), vbErrors.BadFileNameOrNumber) + End If + + If (Destination Is Nothing) OrElse (Destination.Length = 0) Then + Throw VbMakeException(New ArgumentException(GetResourceString(SR.Argument_PathNullOrEmpty1, "Destination")), vbErrors.BadFileNameOrNumber) + End If + + ' Error if wildcard characters in name + If PathContainsWildcards(Source) Then + Throw VbMakeException(New ArgumentException(GetResourceString(SR.Argument_InvalidValue1, "Source")), vbErrors.BadFileNameOrNumber) + End If + + If PathContainsWildcards(Destination) Then + Throw VbMakeException(New ArgumentException(GetResourceString(SR.Argument_InvalidValue1, "Destination")), vbErrors.BadFileNameOrNumber) + End If + + Dim oAssemblyData As AssemblyData = ProjectData.GetProjectData().GetAssemblyData(System.Reflection.Assembly.GetCallingAssembly()) + + If CheckFileOpen(oAssemblyData, Destination, OpenModeTypes.Output) Then + Throw VbMakeException(New IOException(GetResourceString(SR.FileSystem_FileAlreadyOpen1, Destination)), vbErrors.FileAlreadyOpen) + End If + + If CheckFileOpen(oAssemblyData, Source, OpenModeTypes.Input) Then + Throw VbMakeException(New IOException(GetResourceString(SR.FileSystem_FileAlreadyOpen1, Source)), vbErrors.FileAlreadyOpen) + End If + + Try + File.Copy(Source, Destination, True) + + 'VB6 did not copy file attributes, so we must be backwards compatible + File.SetAttributes(Destination, FileAttributes.Archive) + + 'Need to emulate vb6 error codes as much as possible + Catch ex As FileNotFoundException + Throw VbMakeException(ex, vbErrors.FileNotFound) + Catch ex As IOException + Throw VbMakeException(ex, vbErrors.FileAlreadyOpen) + Catch ex As Exception + Throw ex + End Try + End Sub + + Public Function FileDateTime(ByVal PathName As String) As DateTime + Debug.Assert(Not System.Reflection.Assembly.GetCallingAssembly() Is Utils.VBRuntimeAssembly, + "Methods in Microsoft.VisualBasic should not call FileSystem public method.") + + If PathContainsWildcards(PathName) Then + Throw VbMakeException(New ArgumentException(GetResourceString(SR.Argument_InvalidValue1, "PathName")), vbErrors.BadFileNameOrNumber) + End If + + If File.Exists(PathName) Then + Return (New FileInfo(PathName)).LastWriteTime + End If + + Throw New FileNotFoundException(GetResourceString(SR.FileSystem_FileNotFound1, PathName)) + End Function + + Public Function FileLen(ByVal PathName As String) As Long + Debug.Assert(Not System.Reflection.Assembly.GetCallingAssembly() Is Utils.VBRuntimeAssembly, + "Methods in Microsoft.VisualBasic should not call FileSystem public method.") + + If File.Exists(PathName) Then + Return (New FileInfo(PathName)).Length + End If + + Throw New FileNotFoundException(GetResourceString(SR.FileSystem_FileNotFound1, PathName)) + End Function + + Public Function GetAttr(ByVal PathName As String) As FileAttribute + 'VB's FileAttribute is different than System.IO.FileAttributes: + ' VB URT + 'Normal 0 128 + 'ReadOnly 1 1 + 'Hidden 2 2 + 'System 4 4 + 'Volume 8 -- + 'Directory 16 16 + 'Archive 32 32 + 'Device -- 64 + 'Temporary -- 256 + 'SparseFile -- 512 + 'ReparsePoint -- 1024 + 'Compressed -- 2048 + 'Offline -- 4096 + 'NotContentIndexed -- 8192 + 'Encrypted -- 16384 + + Debug.Assert(Not System.Reflection.Assembly.GetCallingAssembly() Is Utils.VBRuntimeAssembly, + "Methods in Microsoft.VisualBasic should not call FileSystem public method.") + + Dim WildCards() As Char = {"*"c, "?"c} + + If PathName.IndexOfAny(WildCards) >= 0 Then + Throw VbMakeException(vbErrors.BadFileNameOrNumber) + End If + + Dim f As New FileInfo(PathName) + + If f.Exists Then + 'Mask off any attributes that VB doesn't define. + Return CType(f.Attributes And &H3F, FileAttribute) + Else + Dim d As New DirectoryInfo(PathName) + If d.Exists Then + 'Mask off any attributes that VB doesn't define. + Return CType(d.Attributes And &H3F, FileAttribute) + End If + End If + + If Path.GetFileName(PathName).Length = 0 Then + Throw VbMakeException(vbErrors.BadFileNameOrNumber) + Else + Throw New FileNotFoundException(GetResourceString(SR.FileSystem_FileNotFound1, PathName)) + End If + + End Function + + Public Sub Kill(ByVal PathName As String) + Debug.Assert(Not System.Reflection.Assembly.GetCallingAssembly() Is Utils.VBRuntimeAssembly, + "Methods in Microsoft.VisualBasic should not call FileSystem public method.") + + Dim dir As DirectoryInfo + Dim DirName As String + Dim FileName As String + Dim files() As FileInfo + Dim file As FileInfo + Dim DeleteCount As Integer + Dim i As Integer + + DirName = Path.GetDirectoryName(PathName) + + If (DirName Is Nothing) OrElse (DirName.Length = 0) Then + DirName = Environment.CurrentDirectory + FileName = PathName + Else + FileName = Path.GetFileName(PathName) + End If + + dir = New DirectoryInfo(DirName) + files = dir.GetFiles(FileName) + DirName = DirName & Path.PathSeparator + + If (Not files Is Nothing) Then + For i = 0 To files.GetUpperBound(0) + file = files(i) + + 'Don't delete hidden or system files + If (file.Attributes And (FileAttribute.Hidden Or FileAttribute.System)) = 0 Then + FileName = file.FullName + + ' error if file is presently open + Dim oAssemblyData As AssemblyData = ProjectData.GetProjectData().GetAssemblyData(System.Reflection.Assembly.GetCallingAssembly()) + If CheckFileOpen(oAssemblyData, FileName, OpenModeTypes.Any) Then + Throw VbMakeException(New IOException(GetResourceString(SR.FileSystem_FileAlreadyOpen1, FileName)), vbErrors.FileAlreadyOpen) + End If + + Try + + IO.File.Delete(FileName) + DeleteCount += 1 + Catch ex As IOException + 'Need to emulate vb6 error codes as much as possible + Throw VbMakeException(ex, vbErrors.FileAlreadyOpen) + + Catch ex As Exception + Throw ex + End Try + + End If + Next i + End If + + If DeleteCount = 0 Then + Throw New IO.FileNotFoundException(GetResourceString(SR.KILL_NoFilesFound1, PathName)) + End If + End Sub + + Public Sub SetAttr(ByVal PathName As String, ByVal Attributes As FileAttribute) + 'VB's FileAttribute is different than System.IO.FileAttributes: + ' VB URT + 'Normal 0 128 + 'ReadOnly 1 1 + 'Hidden 2 2 + 'System 4 4 + 'Volume 8 -- + 'Directory 16 16 + 'Archive 32 32 + 'Device -- 64 + 'Temporary -- 256 + 'SparseFile -- 512 + 'ReparsePoint -- 1024 + 'Compressed -- 2048 + 'Offline -- 4096 + 'NotContentIndexed -- 8192 + 'Encrypted -- 16384 + + 'Check pathname for errors and if file is open for any mode except sequential input + If (PathName Is Nothing) OrElse (PathName.Length = 0) Then + Throw VbMakeException(New ArgumentException(GetResourceString(SR.Argument_PathNullOrEmpty)), vbErrors.BadFileNameOrNumber) + End If + + Dim assem As System.Reflection.Assembly = System.Reflection.Assembly.GetCallingAssembly() + Dim oAssemblyData As AssemblyData = ProjectData.GetProjectData().GetAssemblyData(assem) + + VB6CheckPathname(oAssemblyData, PathName, OpenMode.Input) + + 'Only allow _A_RDONLY(1), _A_HIDDEN(2), _A_SYSTEM(4), _A_ARCH(20) + If ((Attributes Or &H27S) <> &H27S) Then + Throw New ArgumentException(GetResourceString(SR.Argument_InvalidValue1, "Attributes")) + End If + + 'Dir function always returns files with Normal attribute in addition to others specified. + Dim URTAttributes As System.IO.FileAttributes = CType(Attributes, FileAttributes) + System.IO.File.SetAttributes(PathName, URTAttributes) + End Sub + + 'IMPORTANT: This call provides sensitive information whether a device exists and should be used with extreme care + Private Function UnsafeValidDrive(ByVal cDrive As Char) As Boolean 'Return of True means not a valid drive +#If PLATFORM_WINDOWS Then + Dim iDrive As Integer = AscW(cDrive) - AscW(chLetterA) + Return (CLng(UnsafeNativeMethods.GetLogicalDrives()) And CLng(&H2 ^ iDrive)) <> 0 +#Else + Throw New PlatformNotSupportedException() +#End If + End Function + + '***************************************** + ' FileSystem APIs + '***************************************** + Private Sub ValidateAccess(ByVal Access As OpenAccess) + If Access <> OpenAccess.Default AndAlso + Access <> OpenAccess.Read AndAlso + Access <> OpenAccess.ReadWrite AndAlso + Access <> OpenAccess.Write Then + Throw New ArgumentException(GetResourceString(SR.Argument_InvalidValue1, "Access")) + End If + End Sub + + Private Sub ValidateShare(ByVal Share As OpenShare) + If Share <> OpenShare.Default AndAlso + Share <> OpenShare.Shared AndAlso + Share <> OpenShare.LockRead AndAlso + Share <> OpenShare.LockReadWrite AndAlso + Share <> OpenShare.LockWrite Then + Throw New ArgumentException(GetResourceString(SR.Argument_InvalidValue1, "Share")) + End If + End Sub + + Private Sub ValidateMode(ByVal Mode As OpenMode) + If Mode <> OpenMode.Input AndAlso + Mode <> OpenMode.Output AndAlso + Mode <> OpenMode.Random AndAlso + Mode <> OpenMode.Append AndAlso + Mode <> OpenMode.Binary Then + Throw New ArgumentException(GetResourceString(SR.Argument_InvalidValue1, "Mode")) + End If + End Sub + + '============================================================================ + ' Initialization functions. + '============================================================================ + '====================================== + ' Public APIs + '====================================== + Public Sub FileOpen( + ByVal FileNumber As Integer, + ByVal FileName As String, + ByVal Mode As OpenMode, + Optional ByVal Access As OpenAccess = OpenAccess.Default, + Optional ByVal Share As OpenShare = OpenShare.Default, + Optional ByVal RecordLength As Integer = -1) + + Try + ValidateMode(Mode) + ValidateAccess(Access) + ValidateShare(Share) + + If (FileNumber < FIRST_LOCAL_CHANNEL OrElse FileNumber > LAST_LOCAL_CHANNEL) Then + Throw VbMakeException(vbErrors.BadFileNameOrNumber) + End If + Dim assem As System.Reflection.Assembly = System.Reflection.Assembly.GetCallingAssembly() + vbIOOpenFile(assem, FileNumber, FileName, Mode, Access, Share, RecordLength) + Catch ex As Exception + Throw ex + End Try + End Sub + + Public Sub FileClose(ByVal ParamArray FileNumbers() As Integer) + 'If the paramarray is empty, then all files get closed + + Try + Dim assem As System.Reflection.Assembly = System.Reflection.Assembly.GetCallingAssembly() + Dim oAssemblyData As AssemblyData + + oAssemblyData = ProjectData.GetProjectData().GetAssemblyData(assem) + + If (FileNumbers Is Nothing) OrElse (FileNumbers.Length = 0) Then + CloseAllFiles(oAssemblyData) + Else + Dim Index As Integer + + For Index = 0 To FileNumbers.GetUpperBound(0) + InternalCloseFile(oAssemblyData, FileNumbers(Index)) + Next + End If + Catch ex As Exception + Throw ex + End Try + End Sub + + Private Sub ValidateGetPutRecordNumber(ByVal RecordNumber As Long) + If RecordNumber < 1 AndAlso RecordNumber <> -1 Then + Throw VbMakeException(New ArgumentException(GetResourceString(SR.Argument_InvalidValue1, "RecordNumber")), vbErrors.BadRecordNum) + End If + End Sub + + Public Sub FileGetObject(ByVal FileNumber As Integer, ByRef Value As Object, Optional ByVal RecordNumber As Long = -1) + Try + ValidateGetPutRecordNumber(RecordNumber) + Dim assem As System.Reflection.Assembly = System.Reflection.Assembly.GetCallingAssembly() + GetStream(assem, FileNumber).GetObject(Value, RecordNumber) + Catch ex As Exception + Throw ex + End Try + End Sub + + Public Sub FileGet(ByVal FileNumber As Integer, ByRef Value As ValueType, Optional ByVal RecordNumber As Long = -1) + Try + ValidateGetPutRecordNumber(RecordNumber) + Dim assem As System.Reflection.Assembly = System.Reflection.Assembly.GetCallingAssembly() + GetStream(assem, FileNumber).Get(Value, RecordNumber) + Catch ex As Exception + Throw ex + End Try + End Sub + + Public Sub FileGet(ByVal FileNumber As Integer, ByRef Value As System.Array, Optional ByVal RecordNumber As Long = -1, + Optional ByVal ArrayIsDynamic As Boolean = False, Optional ByVal StringIsFixedLength As Boolean = False) + Try + ValidateGetPutRecordNumber(RecordNumber) + Dim assem As System.Reflection.Assembly = System.Reflection.Assembly.GetCallingAssembly() + GetStream(assem, FileNumber).Get(Value, RecordNumber, ArrayIsDynamic, StringIsFixedLength) + Catch ex As Exception + Throw ex + End Try + End Sub + + Public Sub FileGet(ByVal FileNumber As Integer, ByRef Value As Boolean, Optional ByVal RecordNumber As Long = -1) + Try + ValidateGetPutRecordNumber(RecordNumber) + Dim assem As System.Reflection.Assembly = System.Reflection.Assembly.GetCallingAssembly() + GetStream(assem, FileNumber).Get(Value, RecordNumber) + Catch ex As Exception + Throw ex + End Try + End Sub + + Public Sub FileGet(ByVal FileNumber As Integer, ByRef Value As Byte, Optional ByVal RecordNumber As Long = -1) + Try + ValidateGetPutRecordNumber(RecordNumber) + Dim assem As System.Reflection.Assembly = System.Reflection.Assembly.GetCallingAssembly() + GetStream(assem, FileNumber).Get(Value, RecordNumber) + Catch ex As Exception + Throw ex + End Try + End Sub + + Public Sub FileGet(ByVal FileNumber As Integer, ByRef Value As Short, Optional ByVal RecordNumber As Long = -1) + Try + ValidateGetPutRecordNumber(RecordNumber) + Dim assem As System.Reflection.Assembly = System.Reflection.Assembly.GetCallingAssembly() + GetStream(assem, FileNumber).Get(Value, RecordNumber) + Catch ex As Exception + Throw ex + End Try + End Sub + + Public Sub FileGet(ByVal FileNumber As Integer, ByRef Value As Integer, Optional ByVal RecordNumber As Long = -1) + Try + ValidateGetPutRecordNumber(RecordNumber) + Dim assem As System.Reflection.Assembly = System.Reflection.Assembly.GetCallingAssembly() + GetStream(assem, FileNumber).Get(Value, RecordNumber) + Catch ex As Exception + Throw ex + End Try + End Sub + + Public Sub FileGet(ByVal FileNumber As Integer, ByRef Value As Long, Optional ByVal RecordNumber As Long = -1) + Try + ValidateGetPutRecordNumber(RecordNumber) + Dim assem As System.Reflection.Assembly = System.Reflection.Assembly.GetCallingAssembly() + GetStream(assem, FileNumber).Get(Value, RecordNumber) + Catch ex As Exception + Throw ex + End Try + End Sub + + Public Sub FileGet(ByVal FileNumber As Integer, ByRef Value As Char, Optional ByVal RecordNumber As Long = -1) + Try + ValidateGetPutRecordNumber(RecordNumber) + Dim assem As System.Reflection.Assembly = System.Reflection.Assembly.GetCallingAssembly() + GetStream(assem, FileNumber).Get(Value, RecordNumber) + Catch ex As Exception + Throw ex + End Try + End Sub + + Public Sub FileGet(ByVal FileNumber As Integer, ByRef Value As Single, Optional ByVal RecordNumber As Long = -1) + Try + ValidateGetPutRecordNumber(RecordNumber) + Dim assem As System.Reflection.Assembly = System.Reflection.Assembly.GetCallingAssembly() + GetStream(assem, FileNumber).Get(Value, RecordNumber) + Catch ex As Exception + Throw ex + End Try + End Sub + + Public Sub FileGet(ByVal FileNumber As Integer, ByRef Value As Double, Optional ByVal RecordNumber As Long = -1) + Try + ValidateGetPutRecordNumber(RecordNumber) + Dim assem As System.Reflection.Assembly = System.Reflection.Assembly.GetCallingAssembly() + GetStream(assem, FileNumber).Get(Value, RecordNumber) + Catch ex As Exception + Throw ex + End Try + End Sub + + Public Sub FileGet(ByVal FileNumber As Integer, ByRef Value As Decimal, Optional ByVal RecordNumber As Long = -1) + Try + ValidateGetPutRecordNumber(RecordNumber) + Dim assem As System.Reflection.Assembly = System.Reflection.Assembly.GetCallingAssembly() + GetStream(assem, FileNumber).Get(Value, RecordNumber) + Catch ex As Exception + Throw ex + End Try + End Sub + + Public Sub FileGet(ByVal FileNumber As Integer, ByRef Value As String, Optional ByVal RecordNumber As Long = -1, Optional ByVal StringIsFixedLength As Boolean = False) + Try + ValidateGetPutRecordNumber(RecordNumber) + Dim assem As System.Reflection.Assembly = System.Reflection.Assembly.GetCallingAssembly() + GetStream(assem, FileNumber).Get(Value, RecordNumber, StringIsFixedLength) + Catch ex As Exception + Throw ex + End Try + End Sub + + Public Sub FileGet(ByVal FileNumber As Integer, ByRef Value As Date, Optional ByVal RecordNumber As Long = -1) + Try + ValidateGetPutRecordNumber(RecordNumber) + Dim assem As System.Reflection.Assembly = System.Reflection.Assembly.GetCallingAssembly() + GetStream(assem, FileNumber).Get(Value, RecordNumber) + Catch ex As Exception + Throw ex + End Try + End Sub + + Public Sub FilePutObject(ByVal FileNumber As Integer, ByVal Value As Object, Optional ByVal RecordNumber As Long = -1) + Try + ValidateGetPutRecordNumber(RecordNumber) + Dim assem As System.Reflection.Assembly = System.Reflection.Assembly.GetCallingAssembly() + GetStream(assem, FileNumber, OpenModeTypes.Binary Or OpenModeTypes.Random).PutObject(Value, RecordNumber) + Catch ex As Exception + Throw ex + End Try + End Sub + + + Public Sub FilePut(ByVal FileNumber As Object, ByVal Value As Object, Optional ByVal RecordNumber As Object = -1) + Throw New ArgumentException(GetResourceString(SR.UseFilePutObject)) + End Sub + + Public Sub FilePut(ByVal FileNumber As Integer, ByVal Value As ValueType, Optional ByVal RecordNumber As Long = -1) + Try + ValidateGetPutRecordNumber(RecordNumber) + Dim assem As System.Reflection.Assembly = System.Reflection.Assembly.GetCallingAssembly() + GetStream(assem, FileNumber, OpenModeTypes.Binary Or OpenModeTypes.Random).Put(Value, RecordNumber) + Catch ex As Exception + Throw ex + End Try + End Sub + + Public Sub FilePut(ByVal FileNumber As Integer, ByVal Value As System.Array, Optional ByVal RecordNumber As Long = -1, + Optional ByVal ArrayIsDynamic As Boolean = False, Optional ByVal StringIsFixedLength As Boolean = False) + + Try + ValidateGetPutRecordNumber(RecordNumber) + Dim assem As System.Reflection.Assembly = System.Reflection.Assembly.GetCallingAssembly() + GetStream(assem, FileNumber, OpenModeTypes.Binary Or OpenModeTypes.Random).Put(Value, RecordNumber, ArrayIsDynamic, StringIsFixedLength) + Catch ex As Exception + Throw ex + End Try + End Sub + + Public Sub FilePut(ByVal FileNumber As Integer, ByVal Value As Boolean, Optional ByVal RecordNumber As Long = -1) + Try + ValidateGetPutRecordNumber(RecordNumber) + Dim assem As System.Reflection.Assembly = System.Reflection.Assembly.GetCallingAssembly() + GetStream(assem, FileNumber, OpenModeTypes.Binary Or OpenModeTypes.Random).Put(Value, RecordNumber) + Catch ex As Exception + Throw ex + End Try + End Sub + + Public Sub FilePut(ByVal FileNumber As Integer, ByVal Value As Byte, Optional ByVal RecordNumber As Long = -1) + Try + ValidateGetPutRecordNumber(RecordNumber) + Dim assem As System.Reflection.Assembly = System.Reflection.Assembly.GetCallingAssembly() + GetStream(assem, FileNumber, OpenModeTypes.Binary Or OpenModeTypes.Random).Put(Value, RecordNumber) + Catch ex As Exception + Throw ex + End Try + End Sub + + Public Sub FilePut(ByVal FileNumber As Integer, ByVal Value As Short, Optional ByVal RecordNumber As Long = -1) + Try + ValidateGetPutRecordNumber(RecordNumber) + Dim assem As System.Reflection.Assembly = System.Reflection.Assembly.GetCallingAssembly() + GetStream(assem, FileNumber, OpenModeTypes.Binary Or OpenModeTypes.Random).Put(Value, RecordNumber) + Catch ex As Exception + Throw ex + End Try + End Sub + + Public Sub FilePut(ByVal FileNumber As Integer, ByVal Value As Integer, Optional ByVal RecordNumber As Long = -1) + Try + ValidateGetPutRecordNumber(RecordNumber) + Dim assem As System.Reflection.Assembly = System.Reflection.Assembly.GetCallingAssembly() + GetStream(assem, FileNumber, OpenModeTypes.Binary Or OpenModeTypes.Random).Put(Value, RecordNumber) + Catch ex As Exception + Throw ex + End Try + End Sub + + Public Sub FilePut(ByVal FileNumber As Integer, ByVal Value As Long, Optional ByVal RecordNumber As Long = -1) + Try + ValidateGetPutRecordNumber(RecordNumber) + Dim assem As System.Reflection.Assembly = System.Reflection.Assembly.GetCallingAssembly() + GetStream(assem, FileNumber, OpenModeTypes.Binary Or OpenModeTypes.Random).Put(Value, RecordNumber) + Catch ex As Exception + Throw ex + End Try + End Sub + + Public Sub FilePut(ByVal FileNumber As Integer, ByVal Value As Char, Optional ByVal RecordNumber As Long = -1) + Try + ValidateGetPutRecordNumber(RecordNumber) + Dim assem As System.Reflection.Assembly = System.Reflection.Assembly.GetCallingAssembly() + GetStream(assem, FileNumber, OpenModeTypes.Binary Or OpenModeTypes.Random).Put(Value, RecordNumber) + Catch ex As Exception + Throw ex + End Try + End Sub + + Public Sub FilePut(ByVal FileNumber As Integer, ByVal Value As Single, Optional ByVal RecordNumber As Long = -1) + Try + ValidateGetPutRecordNumber(RecordNumber) + Dim assem As System.Reflection.Assembly = System.Reflection.Assembly.GetCallingAssembly() + GetStream(assem, FileNumber, OpenModeTypes.Binary Or OpenModeTypes.Random).Put(Value, RecordNumber) + Catch ex As Exception + Throw ex + End Try + End Sub + + Public Sub FilePut(ByVal FileNumber As Integer, ByVal Value As Double, Optional ByVal RecordNumber As Long = -1) + Try + ValidateGetPutRecordNumber(RecordNumber) + Dim assem As System.Reflection.Assembly = System.Reflection.Assembly.GetCallingAssembly() + GetStream(assem, FileNumber, OpenModeTypes.Binary Or OpenModeTypes.Random).Put(Value, RecordNumber) + Catch ex As Exception + Throw ex + End Try + End Sub + + Public Sub FilePut(ByVal FileNumber As Integer, ByVal Value As Decimal, Optional ByVal RecordNumber As Long = -1) + Try + ValidateGetPutRecordNumber(RecordNumber) + Dim assem As System.Reflection.Assembly = System.Reflection.Assembly.GetCallingAssembly() + GetStream(assem, FileNumber, OpenModeTypes.Binary Or OpenModeTypes.Random).Put(Value, RecordNumber) + Catch ex As Exception + Throw ex + End Try + End Sub + + Public Sub FilePut(ByVal FileNumber As Integer, ByVal Value As String, Optional ByVal RecordNumber As Long = -1, Optional ByVal StringIsFixedLength As Boolean = False) + Try + ValidateGetPutRecordNumber(RecordNumber) + Dim assem As System.Reflection.Assembly = System.Reflection.Assembly.GetCallingAssembly() + GetStream(assem, FileNumber, OpenModeTypes.Binary Or OpenModeTypes.Random).Put(Value, RecordNumber, StringIsFixedLength) + Catch ex As Exception + Throw ex + End Try + End Sub + + Public Sub FilePut(ByVal FileNumber As Integer, ByVal Value As Date, Optional ByVal RecordNumber As Long = -1) + Try + ValidateGetPutRecordNumber(RecordNumber) + Dim assem As System.Reflection.Assembly = System.Reflection.Assembly.GetCallingAssembly() + GetStream(assem, FileNumber, OpenModeTypes.Binary Or OpenModeTypes.Random).Put(Value, RecordNumber) + Catch ex As Exception + Throw ex + End Try + End Sub + + Public Sub Print(ByVal FileNumber As Integer, ByVal ParamArray Output() As Object) + Try + Dim assem As System.Reflection.Assembly = System.Reflection.Assembly.GetCallingAssembly() + GetStream(assem, FileNumber).Print(CType(Output, Object())) + Catch ex As Exception + Throw ex + End Try + End Sub + + Public Sub PrintLine(ByVal FileNumber As Integer, ByVal ParamArray Output() As Object) + Try + Dim assem As System.Reflection.Assembly = System.Reflection.Assembly.GetCallingAssembly() + GetStream(assem, FileNumber).PrintLine(CType(Output, Object())) + Catch ex As Exception + Throw ex + End Try + End Sub + + Public Sub Input(ByVal FileNumber As Integer, ByRef Value As Object) + Try + Dim assem As System.Reflection.Assembly = System.Reflection.Assembly.GetCallingAssembly() + GetStream(assem, FileNumber).Input(Value) + Catch ex As Exception + Throw ex + End Try + End Sub + + Public Sub Input(ByVal FileNumber As Integer, ByRef Value As Boolean) + Try + Dim assem As System.Reflection.Assembly = System.Reflection.Assembly.GetCallingAssembly() + GetStream(assem, FileNumber).Input(Value) + Catch ex As Exception + Throw ex + End Try + End Sub + + Public Sub Input(ByVal FileNumber As Integer, ByRef Value As Byte) + Try + Dim assem As System.Reflection.Assembly = System.Reflection.Assembly.GetCallingAssembly() + GetStream(assem, FileNumber).Input(Value) + Catch ex As Exception + Throw ex + End Try + End Sub + + Public Sub Input(ByVal FileNumber As Integer, ByRef Value As Short) + Try + Dim assem As System.Reflection.Assembly = System.Reflection.Assembly.GetCallingAssembly() + GetStream(assem, FileNumber).Input(Value) + Catch ex As Exception + Throw ex + End Try + End Sub + + Public Sub Input(ByVal FileNumber As Integer, ByRef Value As Integer) + Try + Dim assem As System.Reflection.Assembly = System.Reflection.Assembly.GetCallingAssembly() + GetStream(assem, FileNumber).Input(Value) + Catch ex As Exception + Throw ex + End Try + End Sub + + Public Sub Input(ByVal FileNumber As Integer, ByRef Value As Long) + Try + Dim assem As System.Reflection.Assembly = System.Reflection.Assembly.GetCallingAssembly() + GetStream(assem, FileNumber).Input(Value) + Catch ex As Exception + Throw ex + End Try + End Sub + + Public Sub Input(ByVal FileNumber As Integer, ByRef Value As Char) + Try + Dim assem As System.Reflection.Assembly = System.Reflection.Assembly.GetCallingAssembly() + GetStream(assem, FileNumber).Input(Value) + Catch ex As Exception + Throw ex + End Try + End Sub + + Public Sub Input(ByVal FileNumber As Integer, ByRef Value As Single) + Try + Dim assem As System.Reflection.Assembly = System.Reflection.Assembly.GetCallingAssembly() + GetStream(assem, FileNumber).Input(Value) + Catch ex As Exception + Throw ex + End Try + End Sub + + Public Sub Input(ByVal FileNumber As Integer, ByRef Value As Double) + Try + Dim assem As System.Reflection.Assembly = System.Reflection.Assembly.GetCallingAssembly() + GetStream(assem, FileNumber).Input(Value) + Catch ex As Exception + Throw ex + End Try + End Sub + + Public Sub Input(ByVal FileNumber As Integer, ByRef Value As Decimal) + Try + Dim assem As System.Reflection.Assembly = System.Reflection.Assembly.GetCallingAssembly() + GetStream(assem, FileNumber).Input(Value) + Catch ex As Exception + Throw ex + End Try + End Sub + + Public Sub Input(ByVal FileNumber As Integer, ByRef Value As String) + Try + Dim assem As System.Reflection.Assembly = System.Reflection.Assembly.GetCallingAssembly() + GetStream(assem, FileNumber).Input(Value) + Catch ex As Exception + Throw ex + End Try + End Sub + + Public Sub Input(ByVal FileNumber As Integer, ByRef Value As Date) + Try + Dim assem As System.Reflection.Assembly = System.Reflection.Assembly.GetCallingAssembly() + GetStream(assem, FileNumber).Input(Value) + Catch ex As Exception + Throw ex + End Try + End Sub + + Public Sub [Write](ByVal FileNumber As Integer, ByVal ParamArray Output() As Object) + Try + Dim assem As System.Reflection.Assembly = System.Reflection.Assembly.GetCallingAssembly() + GetStream(assem, FileNumber).WriteHelper(Output) + Catch ex As Exception + Throw ex + End Try + End Sub + + Public Sub WriteLine(ByVal FileNumber As Integer, ByVal ParamArray Output() As Object) + Try + Dim assem As System.Reflection.Assembly = System.Reflection.Assembly.GetCallingAssembly() + GetStream(assem, FileNumber).WriteLineHelper(Output) + Catch ex As Exception + Throw ex + End Try + End Sub + + Public Function InputString(ByVal FileNumber As Integer, ByVal CharCount As Integer) As String + Try + Dim oFile As VB6File + + If (CharCount < 0 OrElse CharCount > (&H7FFFFFFFI / 2)) Then + Throw New ArgumentException(GetResourceString(SR.Argument_InvalidValue1, "CharCount")) + End If + + Dim assem As System.Reflection.Assembly = System.Reflection.Assembly.GetCallingAssembly() + + oFile = GetChannelObj(assem, FileNumber) + oFile.Lock() + + Try + InputString = oFile.InputString(CharCount) + Finally + oFile.Unlock() + End Try + Catch ex As Exception + Throw ex + End Try + End Function + + Public Function [LineInput](ByVal FileNumber As Integer) As String + Dim oFile As VB6File + + Dim assem As System.Reflection.Assembly = System.Reflection.Assembly.GetCallingAssembly() + oFile = GetStream(assem, FileNumber) + CheckInputCapable(oFile) + + If oFile.EOF() Then + Throw VbMakeException(vbErrors.EndOfFile) + End If + + Return oFile.LineInput() + End Function + + Public Sub Lock(ByVal FileNumber As Integer) + Dim assem As System.Reflection.Assembly = System.Reflection.Assembly.GetCallingAssembly() + GetStream(assem, FileNumber).Lock() + End Sub + + Public Sub Lock(ByVal FileNumber As Integer, ByVal Record As Long) + Dim assem As System.Reflection.Assembly = System.Reflection.Assembly.GetCallingAssembly() + GetStream(assem, FileNumber).Lock(Record) + End Sub + + Public Sub Lock(ByVal FileNumber As Integer, ByVal FromRecord As Long, ByVal ToRecord As Long) + Dim assem As System.Reflection.Assembly = System.Reflection.Assembly.GetCallingAssembly() + GetStream(assem, FileNumber).Lock(FromRecord, ToRecord) + End Sub + + Public Sub Unlock(ByVal FileNumber As Integer) + Dim assem As System.Reflection.Assembly = System.Reflection.Assembly.GetCallingAssembly() + GetStream(assem, FileNumber).Unlock() + End Sub + + Public Sub Unlock(ByVal FileNumber As Integer, ByVal Record As Long) + Dim assem As System.Reflection.Assembly = System.Reflection.Assembly.GetCallingAssembly() + GetStream(assem, FileNumber).Unlock(Record) + End Sub + + Public Sub Unlock(ByVal FileNumber As Integer, ByVal FromRecord As Long, ByVal ToRecord As Long) + Dim assem As System.Reflection.Assembly = System.Reflection.Assembly.GetCallingAssembly() + GetStream(assem, FileNumber).Unlock(FromRecord, ToRecord) + End Sub + + Public Sub FileWidth(ByVal FileNumber As Integer, ByVal RecordWidth As Integer) + Dim assem As System.Reflection.Assembly = System.Reflection.Assembly.GetCallingAssembly() + GetStream(assem, FileNumber).SetWidth(RecordWidth) + End Sub + + Public Function [FreeFile]() As Integer + Dim indChannel As Integer + Dim oFile As VB6File + + ' get the project object + Dim assem As System.Reflection.Assembly = System.Reflection.Assembly.GetCallingAssembly() + Dim oAssemblyData As AssemblyData + + oAssemblyData = ProjectData.GetProjectData().GetAssemblyData(assem) + + For indChannel = 1 To 255 + oFile = oAssemblyData.GetChannelObj(indChannel) + If oFile Is Nothing Then + Return indChannel + End If + Next + + Throw VbMakeException(vbErrors.TooManyFiles) + End Function + + 'Function Seek + ' + 'RANDOM MODE - Sets the number of next record to read/write + 'other modes - Sets the byte position at which the next operation + ' will take place + ' + Public Sub Seek(ByVal FileNumber As Integer, ByVal Position As Long) + Dim assem As System.Reflection.Assembly = System.Reflection.Assembly.GetCallingAssembly() + GetStream(assem, FileNumber).Seek(Position) + End Sub + + 'Function Seek + ' + 'RANDOM MODE - Returns number of next record + 'other modes - Returns the byte position at which the next operation + ' will take place + ' + Public Function Seek(ByVal FileNumber As Integer) As Long + Dim assem As System.Reflection.Assembly = System.Reflection.Assembly.GetCallingAssembly() + Return GetStream(assem, FileNumber).Seek() + End Function + + Public Function EOF(ByVal FileNumber As Integer) As Boolean + Dim assem As System.Reflection.Assembly = System.Reflection.Assembly.GetCallingAssembly() + Return GetStream(assem, FileNumber).EOF() + End Function + + Public Function Loc(ByVal FileNumber As Integer) As Long + Dim assem As System.Reflection.Assembly = System.Reflection.Assembly.GetCallingAssembly() + Return GetStream(assem, FileNumber).LOC() + End Function + + Public Function LOF(ByVal FileNumber As Integer) As Long + Dim assem As System.Reflection.Assembly = System.Reflection.Assembly.GetCallingAssembly() + Return GetStream(assem, FileNumber).LOF() + End Function + + Public Function TAB() As TabInfo + Dim Result As TabInfo + Result.Column = -1 + Return Result + End Function + + Public Function TAB(ByVal Column As Short) As TabInfo + Dim Result As TabInfo + If Column < 1 Then + Column = 1 + End If + + Result.Column = Column + Return Result + End Function + + Public Function SPC(ByVal Count As Short) As SpcInfo + Dim Result As SpcInfo + If Count < 1 Then + Count = 0 + End If + + Result.Count = Count + Return Result + End Function + + Public Function FileAttr(ByVal FileNumber As Integer) As OpenMode + Dim assem As System.Reflection.Assembly = System.Reflection.Assembly.GetCallingAssembly() + Return GetStream(assem, FileNumber).GetMode() + End Function + + Public Sub Reset() + CloseAllFiles(System.Reflection.Assembly.GetCallingAssembly()) + End Sub + + + + Public Sub Rename(ByVal OldPath As String, ByVal NewPath As String) + Dim oAssemblyData As AssemblyData = ProjectData.GetProjectData().GetAssemblyData(System.Reflection.Assembly.GetCallingAssembly()) + OldPath = VB6CheckPathname(oAssemblyData, OldPath, CType(OpenModeTypes.Any, OpenMode)) + NewPath = VB6CheckPathname(oAssemblyData, NewPath, CType(OpenModeTypes.Any, OpenMode)) + +#If PLATFORM_WINDOWS Then + Dim Result As Integer + Dim ErrCode As Integer + + Result = UnsafeNativeMethods.MoveFile(OldPath, NewPath) + If Result = 0 Then + ErrCode = System.Runtime.InteropServices.Marshal.GetLastWin32Error() + + Select Case ErrCode + Case ERROR_FILE_NOT_FOUND + Throw VbMakeException(vbErrors.FileNotFound) + + Case ERROR_FILE_EXISTS, + ERROR_ALREADY_EXISTS + Throw VbMakeException(vbErrors.FileAlreadyExists) + + Case ERROR_INVALID_ACCESS + Throw VbMakeException(vbErrors.PathFileAccess) + + Case ERROR_NOT_SAME_DEVICE + Throw VbMakeException(vbErrors.DifferentDrive) + + Case Else + Throw VbMakeException(vbErrors.IllegalFuncCall) + End Select + End If +#Else + Throw New PlatformNotSupportedException() +#End If + End Sub + + '====================================== + 'Private APIs + '====================================== + Private Function GetStream(ByVal assem As System.Reflection.Assembly, ByVal FileNumber As Integer) As VB6File + Return GetStream(assem, FileNumber, CType(OpenModeTypes.Input Or + OpenModeTypes.Output Or + OpenModeTypes.Random Or + OpenModeTypes.Append Or + OpenModeTypes.Binary, OpenModeTypes)) + End Function + + Private Function GetStream(ByVal assem As System.Reflection.Assembly, ByVal FileNumber As Integer, ByVal mode As OpenModeTypes) As VB6File + Dim Result As VB6File + If (FileNumber < FIRST_LOCAL_CHANNEL) OrElse (FileNumber > LAST_LOCAL_CHANNEL) Then + Throw VbMakeException(vbErrors.BadFileNameOrNumber) + End If + + Result = GetChannelObj(assem, FileNumber) + + If (OpenModeTypesFromOpenMode(Result.GetMode()) Or mode) = 0 Then + Result = Nothing + Throw VbMakeException(vbErrors.BadFileMode) + End If + + Return Result + End Function + + Private Function OpenModeTypesFromOpenMode(ByVal om As OpenMode) As OpenModeTypes + If (om = OpenMode.Input) Then + Return OpenModeTypes.Input + ElseIf (om = OpenMode.Output) Then + Return OpenModeTypes.Output + ElseIf (om = OpenMode.Append) Then + Return OpenModeTypes.Append + ElseIf (om = OpenMode.Binary) Then + Return OpenModeTypes.Binary + ElseIf (om = OpenMode.Random) Then + Return OpenModeTypes.Random + ElseIf CInt(om) = CInt(OpenModeTypes.Any) Then + Return OpenModeTypes.Any + End If + + ' This exception should never be hit. + ' We will throw Arguments are not valid. + Throw New ArgumentException(GetResourceString(SR.Argument_InvalidValue), "om") + End Function Friend Sub CloseAllFiles(ByVal assem As System.Reflection.Assembly) - ' CloseAllFiles(ProjectData.GetProjectData().GetAssemblyData(assem)) + CloseAllFiles(ProjectData.GetProjectData().GetAssemblyData(assem)) + End Sub + + Friend Sub CloseAllFiles(ByVal oAssemblyData As AssemblyData) + Dim FileNumber As Integer + + For FileNumber = 1 To 255 + InternalCloseFile(oAssemblyData, FileNumber) + Next + End Sub + + Private Sub InternalCloseFile(ByVal oAssemblyData As AssemblyData, ByVal FileNumber As Integer) + If FileNumber = 0 Then + CloseAllFiles(oAssemblyData) + Exit Sub + End If + + Dim oFile As VB6File + + oFile = GetChannelOrNull(oAssemblyData, FileNumber) + + If oFile Is Nothing Then + Else + oAssemblyData.SetChannelObj(FileNumber, Nothing) + + If Not oFile Is Nothing Then ' FileNumber not opened + oFile.CloseFile() + End If + End If + End Sub + + Friend Function VB6CheckPathname(ByVal oAssemblyData As AssemblyData, ByVal sPath As String, ByVal mode As OpenMode) As String + Dim Result As String + ' Error if wildcard characters in pathname + If (sPath.IndexOf("?"c) <> -1 OrElse sPath.IndexOf("*"c) <> -1) Then + Throw New ArgumentException(GetResourceString(SR.Argument_InvalidPathChars1, sPath)) + End If + + ' process the name to check for errors + Result = (New FileInfo(sPath)).FullName + + ' Error if file is already open and conflicting mode + If CheckFileOpen(oAssemblyData, Result, OpenModeTypesFromOpenMode(mode)) Then + Throw VbMakeException(vbErrors.FileAlreadyOpen) + End If + + Return Result + End Function + + Friend Function CheckFileOpen(ByVal oAssemblyData As AssemblyData, ByVal sPath As String, ByVal NewFileMode As OpenModeTypes) As Boolean + Dim lChannel As Integer + Dim lIndexMax As Integer + Dim mode As OpenMode + Dim oFile As VB6File + + lIndexMax = 255 + + For lChannel = 1 To lIndexMax + oFile = GetChannelOrNull(oAssemblyData, lChannel) + If oFile Is Nothing Then + 'continue looking + Else + mode = oFile.GetMode() + + ' compare the filename with the input string case insensitive + ' exit loop if match occurs and both files are not sequential input + ' and not random/binary. + If System.String.Compare(sPath, oFile.GetAbsolutePath(), StringComparison.OrdinalIgnoreCase) = 0 Then + ' If path is the same, then verify + ' that neither file is open for sequential input + ' and that both are open for the same mode (either Binary or Random) + If CInt(NewFileMode) = -1 Then + 'Special case for any open mode + Return True + Else + If (NewFileMode Or mode) <> OpenMode.Input Then + If (NewFileMode Or mode Or OpenModeTypes.Binary Or OpenModeTypes.Random) <> (OpenModeTypes.Binary Or OpenModeTypes.Random) Then + Return True + End If + End If + End If + End If + End If + Next + + Return False + End Function + + Private Sub vbIOOpenFile(ByVal assem As System.Reflection.Assembly, + ByVal FileNumber As Integer, + ByVal FileName As String, + ByVal Mode As OpenMode, + ByVal Access As OpenAccess, + ByVal Share As OpenShare, + ByVal RecordLength As Integer) + Dim oFile As VB6File + Dim oAssemblyData As AssemblyData + + oAssemblyData = ProjectData.GetProjectData().GetAssemblyData(assem) + + If Not GetChannelOrNull(oAssemblyData, FileNumber) Is Nothing Then + Throw VbMakeException(vbErrors.FileAlreadyOpen) + End If + + If (FileName Is Nothing) OrElse (FileName.Length = 0) Then + Throw VbMakeException(vbErrors.PathFileAccess) + End If + + FileName = (New FileInfo(FileName)).FullName + + If CheckFileOpen(oAssemblyData, FileName, OpenModeTypesFromOpenMode(Mode)) Then + Throw VbMakeException(vbErrors.FileAlreadyOpen) + End If + + If (RecordLength <> -1 AndAlso RecordLength <= 0) Then + Throw VbMakeException(vbErrors.IllegalFuncCall) + End If + + If Mode = OpenMode.Binary Then + RecordLength = 1 + ElseIf RecordLength = -1 Then + If Mode = OpenMode.Random Then + RecordLength = 128 + Else + RecordLength = 512 + End If + End If + + '------------------------------------------------------------------ + ' possible combinations of mode and access, and order of access + ' (other combinations are not passed to rtFileOpen.) + ' + ' mode = MODE_SEQ_IN + ' access = ACCESS_NONE read + ' access = ACCESS_READ read + ' + ' mode = MODE_SEQ_OUT + ' access = ACCESS_NONE write + ' access = ACCESS_WRITE write + ' + ' mode = MODE_RANDOM or MODE_BINARY + ' access = ACCESS_NONE read/write, write, read + ' access = ACCESS_READ read + ' access = ACCESS_WRITE write + ' access = ACCESS_READ_WRITE read/write + ' + ' mode = MODE_SEQ_APP + ' access = ACCESS_NONE read/write, write + ' access = ACCESS_WRITE write + '------------------------------------------------------------------ + + If Share = OpenShare.Default Then + Share = OpenShare.LockReadWrite + End If + + Select Case Mode + + Case OpenMode.Input + If (Access <> OpenAccess.Read) AndAlso (Access <> OpenAccess.Default) Then + Throw New ArgumentException(GetResourceString(SR.FileSystem_IllegalInputAccess)) + End If + oFile = New VB6InputFile(FileName, Share) + Case OpenMode.Output + If (Access <> OpenAccess.Write) AndAlso (Access <> OpenAccess.Default) Then + Throw New ArgumentException(GetResourceString(SR.FileSystem_IllegalOutputAccess)) + End If + oFile = New VB6OutputFile(FileName, Share, False) + Case OpenMode.Random + If (Access = OpenAccess.Default) Then + Access = OpenAccess.ReadWrite + End If + oFile = New VB6RandomFile(FileName, Access, Share, RecordLength) + Case OpenMode.Append + If (Access <> OpenAccess.Write) AndAlso (Access <> OpenAccess.ReadWrite) AndAlso (Access <> OpenAccess.Default) Then + Throw New ArgumentException(GetResourceString(SR.FileSystem_IllegalAppendAccess)) + End If + oFile = New VB6OutputFile(FileName, Share, True) + Case OpenMode.Binary + If (Access = OpenAccess.Default) Then + Access = OpenAccess.ReadWrite + End If + oFile = New VB6BinaryFile(FileName, Access, Share) + Case Else + Throw VbMakeException(vbErrors.InternalError) + End Select + + AddFileToList(oAssemblyData, FileNumber, oFile) + End Sub + + Private Sub AddFileToList(ByVal oAssemblyData As AssemblyData, ByVal FileNumber As Integer, ByVal oFile As VB6File) + If oFile Is Nothing Then + Throw VbMakeException(vbErrors.InternalError) + Else + oFile.OpenFile() + + oAssemblyData.SetChannelObj(FileNumber, oFile) + End If + End Sub + + '====================================== + ' Static methods + '====================================== + ' GetChannelOrNull() which will throw an exception on bad FileNumber number. + ' If the table entry is null (e.g. FileNumber is not open) throw an exception + Friend Function GetChannelObj(ByVal assem As System.Reflection.Assembly, ByVal FileNumber As Integer) As VB6File + Dim oFile As VB6File + + oFile = GetChannelOrNull(ProjectData.GetProjectData().GetAssemblyData(assem), FileNumber) + + If oFile Is Nothing Then + Throw VbMakeException(vbErrors.BadFileNameOrNumber) + End If + + Return oFile + End Function + + '====================================== + ' Protected and Private methods + '====================================== + ' Error an exception only on bad file number. + ' If the table entry is null, return it. + Private Function GetChannelOrNull(ByVal oAssemblyData As AssemblyData, ByVal FileNumber As Integer) As VB6File + Return oAssemblyData.GetChannelObj(FileNumber) + End Function + + Private Sub CheckInputCapable(ByVal oFile As VB6File) + If Not oFile.CanInput() Then + Throw VbMakeException(vbErrors.BadFileMode) + End If End Sub End Module diff --git a/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/Globals.vb b/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/Globals.vb index 506e7f8db96a..a00c48e67126 100644 --- a/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/Globals.vb +++ b/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/Globals.vb @@ -19,6 +19,16 @@ Namespace Global.Microsoft.VisualBasic ShortTime = 4 End Enum + Public Enum FileAttribute + [Normal] = 0 + [ReadOnly] = 1 + [Hidden] = 2 + [System] = 4 + [Volume] = 8 + [Directory] = 16 + [Archive] = 32 + End Enum + Public Enum VbStrConv [None] = 0 [Uppercase] = 1 @@ -41,4 +51,46 @@ Namespace Global.Microsoft.VisualBasic [UseDefault] = -2 End Enum + Public Enum OpenMode + [Input] = 1 + [Output] = 2 + [Random] = 4 + [Append] = 8 + [Binary] = 32 + End Enum + + Friend Enum OpenModeTypes + [Input] = 1 + [Output] = 2 + [Random] = 4 + [Append] = 8 + [Binary] = 32 + [Any] = -1 + End Enum + + Public Enum OpenAccess + [Default] = -1 + [Read] = System.IO.FileAccess.Read + [ReadWrite] = System.IO.FileAccess.ReadWrite + [Write] = System.IO.FileAccess.Write + End Enum + + Public Enum OpenShare + [Default] = -1 + [Shared] = System.IO.FileShare.ReadWrite + [LockRead] = System.IO.FileShare.Write + [LockReadWrite] = System.IO.FileShare.None + [LockWrite] = System.IO.FileShare.Read + End Enum + + + Public Structure TabInfo + Public Column As Short + End Structure + + + Public Structure SpcInfo + Public Count As Short + End Structure + End Namespace diff --git a/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/Helpers/NativeMethods.Windows.vb b/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/Helpers/NativeMethods.vb similarity index 94% rename from src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/Helpers/NativeMethods.Windows.vb rename to src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/Helpers/NativeMethods.vb index 3d380d4f03b0..a0f0babcf97d 100644 --- a/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/Helpers/NativeMethods.Windows.vb +++ b/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/Helpers/NativeMethods.vb @@ -6,6 +6,7 @@ Option Explicit On Imports System Imports System.Runtime.InteropServices +Imports System.Text Namespace Microsoft.VisualBasic.CompilerServices @@ -16,6 +17,23 @@ Namespace Microsoft.VisualBasic.CompilerServices CloseHandle _ Lib "kernel32" (ByVal hObject As IntPtr) As Integer + + Friend Shared Function GetVolumeInformation( + ByVal lpRootPathName As String, + ByVal lpVolumeNameBuffer As StringBuilder, + ByVal nVolumeNameSize As Integer, + ByRef lpVolumeSerialNumber As Integer, + ByRef lpMaximumComponentLength As Integer, + ByRef lpFileSystemFlags As Integer, + ByVal lpFileSystemNameBuffer As IntPtr, + ByVal nFileSystemNameSize As Integer) As Integer + End Function + ''' ''' Given a 32-bit SHFILEOPSTRUCT, call the appropriate SHFileOperation function ''' to perform shell file operation. diff --git a/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/Helpers/UnsafeNativeMethods.vb b/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/Helpers/UnsafeNativeMethods.vb index 2717363a7320..1cc307ace334 100644 --- a/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/Helpers/UnsafeNativeMethods.vb +++ b/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/Helpers/UnsafeNativeMethods.vb @@ -4,25 +4,55 @@ Imports System Imports System.Runtime.InteropServices -Imports System.Runtime.Versioning Namespace Microsoft.VisualBasic.CompilerServices Friend NotInheritable Class UnsafeNativeMethods - Friend Declare Ansi Function LCMapStringA _ Lib "kernel32" Alias "LCMapStringA" (ByVal Locale As Integer, ByVal dwMapFlags As Integer, ByVal lpSrcStr As Byte(), ByVal cchSrc As Integer, ByVal lpDestStr As Byte(), ByVal cchDest As Integer) As Integer - Friend Declare Auto Function LCMapString _ Lib "kernel32" (ByVal Locale As Integer, ByVal dwMapFlags As Integer, ByVal lpSrcStr As String, ByVal cchSrc As Integer, ByVal lpDestStr As String, ByVal cchDest As Integer) As Integer + + Friend Shared Function VarParseNumFromStr( + <[In](), MarshalAs(UnmanagedType.LPWStr)> ByVal str As String, + ByVal lcid As Integer, + ByVal dwFlags As Integer, + ByVal numprsPtr As Byte(), + ByVal digits As Byte()) As Integer + End Function + + + Friend Shared Function VarNumFromParseNum( + ByVal numprsPtr As Byte(), + ByVal DigitArray As Byte(), + ByVal dwVtBits As Int32) As Object + End Function + + + Friend Shared Sub VariantChangeType( + ByRef dest As Object, + <[In]()> ByRef Src As Object, + ByVal wFlags As Int16, + ByVal vt As Int16) + End Sub + + + Friend Shared Function MoveFile(<[In](), MarshalAs(UnmanagedType.LPTStr)> ByVal lpExistingFileName As String, + <[In](), MarshalAs(UnmanagedType.LPTStr)> ByVal lpNewFileName As String) As Integer + End Function + + + Friend Shared Function GetLogicalDrives() As Integer + End Function + ''' ''' Frees memory allocated from the local heap. i.e. frees memory allocated ''' by LocalAlloc or LocalReAlloc.n diff --git a/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/VBMath.vb b/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/VBMath.vb index 33e4095f3aff..a33c49ea806d 100644 --- a/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/VBMath.vb +++ b/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/VBMath.vb @@ -3,10 +3,6 @@ ' See the LICENSE file in the project root for more information. Imports System -Imports System.Security -Imports System.Security.Permissions -Imports System.Text -Imports System.Globalization Imports Microsoft.VisualBasic.CompilerServices Namespace Microsoft.VisualBasic diff --git a/src/Microsoft.VisualBasic.Core/tests/FileSystemTests.cs b/src/Microsoft.VisualBasic.Core/tests/FileSystemTests.cs new file mode 100644 index 000000000000..07b79eadbb8a --- /dev/null +++ b/src/Microsoft.VisualBasic.Core/tests/FileSystemTests.cs @@ -0,0 +1,731 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; +using System.Linq; +using Microsoft.DotNet.RemoteExecutor; +using Xunit; + +namespace Microsoft.VisualBasic.Tests +{ + public class FileSystemTests : System.IO.FileCleanupTestBase + { + protected override void Dispose(bool disposing) + { + try + { + FileSystem.FileClose(0); // close all files + } + catch (Exception) + { + } + base.Dispose(disposing); + } + + private static bool IsNotOSX() => !PlatformDetection.IsOSX; + + // On OSX, the temp directory /tmp/ is a symlink to /private/tmp, so setting the current + // directory to a symlinked path will result in GetCurrentDirectory returning the absolute + // path that followed the symlink. + [ConditionalFact(nameof(IsNotOSX))] + public void ChDir() + { + var savedDirectory = System.IO.Directory.GetCurrentDirectory(); + FileSystem.ChDir(TestDirectory); + Assert.Equal(TestDirectory, System.IO.Directory.GetCurrentDirectory()); + FileSystem.ChDir(savedDirectory); + Assert.Equal(savedDirectory, System.IO.Directory.GetCurrentDirectory()); + } + + // Not tested: + // public static void ChDrive(char Drive){ throw null; } + // public static void ChDrive(string Drive){ throw null; } + + [Fact] + public void CloseAllFiles() + { + var fileName1 = GetTestFilePath(); + var fileName2 = GetTestFilePath(); + + RemoteExecutor.Invoke( + (fileName1, fileName2) => + { + putStringNoClose(fileName1, "abc"); + putStringNoClose(fileName2, "123"); + + // ProjectData.EndApp() should close all open files. + Microsoft.VisualBasic.CompilerServices.ProjectData.EndApp(); + + static void putStringNoClose(string fileName, string str) + { + int fileNumber = FileSystem.FreeFile(); + FileSystem.FileOpen(fileNumber, fileName, OpenMode.Random); + FileSystem.FilePut(fileNumber, str); + } + }, + fileName1, + fileName2, + new RemoteInvokeOptions() { ExpectedExitCode = 0 }).Dispose(); + + // Verify all text was written to the files. + Assert.Equal("abc", getString(fileName1)); + Assert.Equal("123", getString(fileName2)); + + static string getString(string fileName) + { + int fileNumber = FileSystem.FreeFile(); + FileSystem.FileOpen(fileNumber, fileName, OpenMode.Random); + string str = null; + FileSystem.FileGet(fileNumber, ref str); + FileSystem.FileClose(fileNumber); + return str; + } + } + + // Can't get current directory on OSX before setting it. + [ConditionalFact(nameof(IsNotOSX))] + public void CurDir() + { + Assert.Equal(FileSystem.CurDir(), System.IO.Directory.GetCurrentDirectory()); + } + + [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsWindows))] + public void CurDir_Drive() + { + var currentDirectory = System.IO.Directory.GetCurrentDirectory(); + int index = currentDirectory.IndexOf(System.IO.Path.VolumeSeparatorChar); + if (index == 1) + { + Assert.Equal(currentDirectory, FileSystem.CurDir(currentDirectory[0])); + } + } + + [Fact] + public void Dir() + { + var fileNames = Enumerable.Range(0, 3).Select(i => GetTestFileName(i)).ToArray(); + int n = fileNames.Length; + + for (int i = 0; i < n; i++) + { + System.IO.File.WriteAllText(System.IO.Path.Combine(TestDirectory, fileNames[i]), i.ToString()); + } + + // Get all files. + string fileName = FileSystem.Dir(System.IO.Path.Combine(TestDirectory, "*")); + var foundNames = new string[n]; + for (int i = 0; i < n; i++) + { + foundNames[i] = fileName; + fileName = FileSystem.Dir(); + } + Assert.Null(fileName); + + Array.Sort(fileNames); + Array.Sort(foundNames); + for (int i = 0; i < n; i++) + { + Assert.Equal(fileNames[i], foundNames[i]); + } + + // Get single file. + fileName = FileSystem.Dir(System.IO.Path.Combine(TestDirectory, fileNames[2])); + Assert.Equal(fileName, fileNames[2]); + fileName = FileSystem.Dir(); + Assert.Null(fileName); + + // Get missing file. + fileName = FileSystem.Dir(GetTestFilePath(n)); + Assert.Equal("", fileName); + } + + [Fact] + public void Dir_Volume() + { + if (PlatformDetection.IsWindows) + { + _ = FileSystem.Dir(TestDirectory, FileAttribute.Volume); + } + else + { + AssertThrows(() => FileSystem.Dir(TestDirectory, FileAttribute.Volume)); + } + } + + [Fact] + public void EOF() + { + int fileNumber = FileSystem.FreeFile(); + var fileName = GetTestFilePath(); + FileSystem.FileOpen(fileNumber, fileName, OpenMode.Output); + FileSystem.Write(fileNumber, 'a'); + FileSystem.Write(fileNumber, 'b'); + FileSystem.Write(fileNumber, 'c'); + FileSystem.FileClose(fileNumber); + + FileSystem.FileOpen(fileNumber, fileName, OpenMode.Input); + for (int i = 0; i < 3; i++) + { + Assert.False(FileSystem.EOF(fileNumber)); + char c = default; + FileSystem.Input(fileNumber, ref c); + } + Assert.True(FileSystem.EOF(fileNumber)); + FileSystem.FileClose(fileNumber); + } + + // Not tested: + // public static OpenMode FileAttr(int FileNumber){ throw null; } + + [Fact] + public void FileClose() + { + int fileNumber = FileSystem.FreeFile(); + + // Close before opening. + FileSystem.FileClose(fileNumber); + + createAndOpenFile(fileNumber); + FileSystem.FileClose(fileNumber); + + // Close a second time. + FileSystem.FileClose(fileNumber); + + // Close all files. + fileNumber = FileSystem.FreeFile(); + createAndOpenFile(fileNumber); + createAndOpenFile(FileSystem.FreeFile()); + Assert.NotEqual(fileNumber, FileSystem.FreeFile()); + FileSystem.FileClose(0); + Assert.Equal(fileNumber, FileSystem.FreeFile()); + + void createAndOpenFile(int fileNumber) + { + var fileName = GetTestFilePath(); + System.IO.File.WriteAllText(fileName, "abc123"); + FileSystem.FileOpen(fileNumber, fileName, OpenMode.Input); + } + } + + [Fact] + public void FileCopy() + { + // Copy to a new file. + var sourceName = GetTestFilePath(); + System.IO.File.WriteAllText(sourceName, "abc"); + var destName = GetTestFilePath(); + FileSystem.FileCopy(sourceName, destName); + Assert.Equal("abc", System.IO.File.ReadAllText(destName)); + + // Copy over an existing file. + sourceName = GetTestFilePath(); + System.IO.File.WriteAllText(sourceName, "def"); + destName = GetTestFilePath(); + System.IO.File.WriteAllText(destName, "123"); + FileSystem.FileCopy(sourceName, destName); + Assert.Equal("def", System.IO.File.ReadAllText(destName)); + } + + // Not tested: + // public static System.DateTime FileDateTime(string PathName){ throw null; } + + [Fact] + public void FileGet_FilePut() + { + int fileNumber = FileSystem.FreeFile(); + var fileName = GetTestFilePath(); + DateTime dateTime = new DateTime(2019, 1, 1); + + FileSystem.FileOpen(fileNumber, fileName, OpenMode.Random); + FileSystem.FilePut(fileNumber, true); + FileSystem.FilePut(fileNumber, (byte)1); + FileSystem.FilePut(fileNumber, (char)2); + FileSystem.FilePut(fileNumber, (decimal)3); + FileSystem.FilePut(fileNumber, 4.0); + FileSystem.FilePut(fileNumber, 5.0f); + FileSystem.FilePut(fileNumber, 6); + FileSystem.FilePut(fileNumber, 7L); + FileSystem.FilePut(fileNumber, (short)8); + FileSystem.FilePut(fileNumber, "ABC"); + FileSystem.FilePut(fileNumber, dateTime); + FileSystem.FileClose(fileNumber); + + bool _bool = default; + byte _byte = default; + char _char = default; + decimal _decimal = default; + double _double = default; + float _float = default; + int _int = default; + long _long = default; + short _short = default; + string _string = default; + DateTime _dateTime = default; + FileSystem.FileOpen(fileNumber, fileName, OpenMode.Random); + FileSystem.FileGet(fileNumber, ref _bool); + FileSystem.FileGet(fileNumber, ref _byte); + FileSystem.FileGet(fileNumber, ref _char); + FileSystem.FileGet(fileNumber, ref _decimal); + FileSystem.FileGet(fileNumber, ref _double); + FileSystem.FileGet(fileNumber, ref _float); + FileSystem.FileGet(fileNumber, ref _int); + FileSystem.FileGet(fileNumber, ref _long); + FileSystem.FileGet(fileNumber, ref _short); + FileSystem.FileGet(fileNumber, ref _string); + FileSystem.FileGet(fileNumber, ref _dateTime); + Assert.True(FileSystem.EOF(fileNumber)); + FileSystem.FileClose(fileNumber); + + Assert.Equal(true, _bool); + Assert.Equal((byte)1, _byte); + Assert.Equal((char)2, _char); + Assert.Equal((decimal)3, _decimal); + Assert.Equal(4.0, _double); + Assert.Equal(5.0f, _float); + Assert.Equal(6, _int); + Assert.Equal(7L, _long); + Assert.Equal((short)8, _short); + Assert.Equal("ABC", _string); + Assert.Equal(dateTime, _dateTime); + } + + // Not tested: + // public static void FileGet(int FileNumber, ref System.Array Value, long RecordNumber = -1, bool ArrayIsDynamic = false, bool StringIsFixedLength = false) { } + // public static void FileGet(int FileNumber, ref System.ValueType Value, long RecordNumber = -1) { } + // public static void FilePut(int FileNumber, System.Array Value, long RecordNumber = -1, bool ArrayIsDynamic = false, bool StringIsFixedLength = false) { } + // public static void FilePut(int FileNumber, System.ValueType Value, long RecordNumber = -1) { } + // public static void FilePut(object FileNumber, object Value, object RecordNumber/* = -1*/) { } + + [Fact] + public void FileGetObject_FilePutObject() + { + int fileNumber = FileSystem.FreeFile(); + var fileName = GetTestFilePath(); + DateTime dateTime = new DateTime(2019, 1, 1); + + FileSystem.FileOpen(fileNumber, fileName, OpenMode.Random); + FileSystem.FilePutObject(fileNumber, true); + FileSystem.FilePutObject(fileNumber, (byte)1); + FileSystem.FilePutObject(fileNumber, (char)2); + FileSystem.FilePutObject(fileNumber, (decimal)3); + FileSystem.FilePutObject(fileNumber, 4.0); + FileSystem.FilePutObject(fileNumber, 5.0f); + FileSystem.FilePutObject(fileNumber, 6); + FileSystem.FilePutObject(fileNumber, 7L); + FileSystem.FilePutObject(fileNumber, (short)8); + FileSystem.FilePutObject(fileNumber, "ABC"); + FileSystem.FilePutObject(fileNumber, dateTime); + FileSystem.FileClose(fileNumber); + + object _bool = null; + object _byte = null; + object _char = null; + object _decimal = null; + object _double = null; + object _float = null; + object _int = null; + object _long = null; + object _short = null; + object _string = null; + object _dateTime = null; + FileSystem.FileOpen(fileNumber, fileName, OpenMode.Random); + FileSystem.FileGetObject(fileNumber, ref _bool); + FileSystem.FileGetObject(fileNumber, ref _byte); + FileSystem.FileGetObject(fileNumber, ref _char); + FileSystem.FileGetObject(fileNumber, ref _decimal); + FileSystem.FileGetObject(fileNumber, ref _double); + FileSystem.FileGetObject(fileNumber, ref _float); + FileSystem.FileGetObject(fileNumber, ref _int); + FileSystem.FileGetObject(fileNumber, ref _long); + FileSystem.FileGetObject(fileNumber, ref _short); + FileSystem.FileGetObject(fileNumber, ref _string); + FileSystem.FileGetObject(fileNumber, ref _dateTime); + Assert.True(FileSystem.EOF(fileNumber)); + FileSystem.FileClose(fileNumber); + + Assert.Equal(true, _bool); + Assert.Equal((byte)1, _byte); + Assert.Equal((char)2, _char); + Assert.Equal((decimal)3, _decimal); + Assert.Equal(4.0, _double); + Assert.Equal(5.0f, _float); + Assert.Equal(6, _int); + Assert.Equal(7L, _long); + Assert.Equal((short)8, _short); + Assert.Equal("ABC", _string); + Assert.Equal(dateTime, _dateTime); + } + + [Fact] + public void FileLen() + { + int fileNumber = FileSystem.FreeFile(); + string fileName = GetTestFilePath(); + FileSystem.FileOpen(fileNumber, fileName, OpenMode.Append); + FileSystem.FileClose(fileNumber); + Assert.Equal(0, FileSystem.FileLen(fileName)); + + fileNumber = FileSystem.FreeFile(); + fileName = GetTestFilePath(); + System.IO.File.WriteAllText(fileName, "abc123"); + Assert.Equal(6, FileSystem.FileLen(fileName)); + } + + [Fact] + public void FileOpen() + { + // OpenMode.Append: + int fileNumber = FileSystem.FreeFile(); + string fileName = GetTestFilePath(); + FileSystem.FileOpen(fileNumber, fileName, OpenMode.Append); + FileSystem.FileClose(fileNumber); + + // OpenMode.Binary: + fileNumber = FileSystem.FreeFile(); + fileName = GetTestFilePath(); + FileSystem.FileOpen(fileNumber, fileName, OpenMode.Binary); + FileSystem.FileClose(fileNumber); + + // OpenMode.Input: + fileNumber = FileSystem.FreeFile(); + fileName = GetTestFilePath(); + AssertThrows(() => FileSystem.FileOpen(fileNumber, fileName, OpenMode.Input)); + System.IO.File.WriteAllText(fileName, "abc123"); + FileSystem.FileOpen(fileNumber, fileName, OpenMode.Input); + FileSystem.FileClose(fileNumber); + + // OpenMode.Output: + fileNumber = FileSystem.FreeFile(); + fileName = GetTestFilePath(); + FileSystem.FileOpen(fileNumber, fileName, OpenMode.Output); + FileSystem.FileClose(fileNumber); + + // OpenMode.Random: + fileNumber = FileSystem.FreeFile(); + fileName = GetTestFilePath(); + FileSystem.FileOpen(fileNumber, fileName, OpenMode.Random); + FileSystem.FileClose(fileNumber); + + // Open a second time. + fileNumber = FileSystem.FreeFile(); + fileName = GetTestFilePath(); + FileSystem.FileOpen(fileNumber, fileName, OpenMode.Append); + AssertThrows(() => FileSystem.FileOpen(fileNumber, fileName, OpenMode.Append)); + FileSystem.FileClose(fileNumber); + + // Open an invalid fileNumber. + AssertThrows(() => FileSystem.FileOpen(256, GetTestFilePath(), OpenMode.Append)); + } + + // Not tested: + // public static void FileWidth(int FileNumber, int RecordWidth) { } + + [Fact] + public void FreeFile() + { + int fileNumber = FileSystem.FreeFile(); + Assert.Equal(fileNumber, FileSystem.FreeFile()); + FileSystem.FileOpen(fileNumber, GetTestFilePath(), OpenMode.Append); + Assert.NotEqual(fileNumber, FileSystem.FreeFile()); + } + + // Not tested: + // public static FileAttribute GetAttr(string PathName) { throw null; } + + [Fact] + public void Input_Write() + { + int fileNumber = FileSystem.FreeFile(); + var fileName = GetTestFilePath(); + DateTime dateTime = new DateTime(2019, 1, 1); + + FileSystem.FileOpen(fileNumber, fileName, OpenMode.Output); + FileSystem.Write(fileNumber, true); + FileSystem.Write(fileNumber, (byte)1, (char)2, (decimal)3, 4.0, 5.0f); + FileSystem.Write(fileNumber, 6, 7L); + FileSystem.Write(fileNumber, (short)8, "ABC", dateTime); + FileSystem.FileClose(fileNumber); + + bool _bool = default; + byte _byte = default; + char _char = default; + decimal _decimal = default; + double _double = default; + float _float = default; + int _int = default; + long _long = default; + short _short = default; + string _string = default; + DateTime _dateTime = default; + FileSystem.FileOpen(fileNumber, fileName, OpenMode.Input); + FileSystem.Input(fileNumber, ref _bool); + FileSystem.Input(fileNumber, ref _byte); + FileSystem.Input(fileNumber, ref _char); + FileSystem.Input(fileNumber, ref _decimal); + FileSystem.Input(fileNumber, ref _double); + FileSystem.Input(fileNumber, ref _float); + FileSystem.Input(fileNumber, ref _int); + FileSystem.Input(fileNumber, ref _long); + FileSystem.Input(fileNumber, ref _short); + FileSystem.Input(fileNumber, ref _string); + FileSystem.Input(fileNumber, ref _dateTime); + Assert.True(FileSystem.EOF(fileNumber)); + FileSystem.FileClose(fileNumber); + + Assert.Equal(true, _bool); + Assert.Equal((byte)1, _byte); + Assert.Equal((char)2, _char); + Assert.Equal((decimal)3, _decimal); + Assert.Equal(4.0, _double); + Assert.Equal(5.0f, _float); + Assert.Equal(6, _int); + Assert.Equal(7L, _long); + Assert.Equal((short)8, _short); + Assert.Equal("ABC", _string); + Assert.Equal(dateTime, _dateTime); + } + + [Fact] + public void Input_Object_Write() + { + int fileNumber = FileSystem.FreeFile(); + var fileName = GetTestFilePath(); + DateTime dateTime = new DateTime(2019, 1, 1); + + FileSystem.FileOpen(fileNumber, fileName, OpenMode.Output); + FileSystem.Write(fileNumber, DBNull.Value); + FileSystem.Write(fileNumber, true); + FileSystem.Write(fileNumber, (byte)1, (char)2, (decimal)3, 4.0, 5.0f); + FileSystem.Write(fileNumber, 6, 7L); + FileSystem.Write(fileNumber, (short)8, "ABC", dateTime); + FileSystem.FileClose(fileNumber); + + object _dbnull = null; + object _bool = null; + object _byte = null; + object _char = null; + object _decimal = null; + object _double = null; + object _float = null; + object _int = null; + object _long = null; + object _short = null; + object _string = null; + object _dateTime = null; + FileSystem.FileOpen(fileNumber, fileName, OpenMode.Input); + try + { + FileSystem.Input(fileNumber, ref _dbnull); + FileSystem.Input(fileNumber, ref _bool); + FileSystem.Input(fileNumber, ref _byte); + FileSystem.Input(fileNumber, ref _char); + FileSystem.Input(fileNumber, ref _decimal); + FileSystem.Input(fileNumber, ref _double); + FileSystem.Input(fileNumber, ref _float); + FileSystem.Input(fileNumber, ref _int); + FileSystem.Input(fileNumber, ref _long); + FileSystem.Input(fileNumber, ref _short); + FileSystem.Input(fileNumber, ref _string); + FileSystem.Input(fileNumber, ref _dateTime); + Assert.True(FileSystem.EOF(fileNumber)); + + Assert.Equal(DBNull.Value, _dbnull); + Assert.Equal(true, _bool); + Assert.Equal((short)1, _byte); + Assert.Equal("\u0002", _char); + Assert.Equal((short)3, _decimal); + Assert.Equal((short)4, _double); + Assert.Equal((short)5, _float); + Assert.Equal((short)6, _int); + Assert.Equal((short)7, _long); + Assert.Equal((short)8, _short); + Assert.Equal("ABC", _string); + Assert.Equal(dateTime, _dateTime); + } + catch (PlatformNotSupportedException) + { + // Conversion.ParseInputField() is not supported on non-Windows platforms currently, + // but this is also failing on some Windows platforms. Need to investigate. + } + FileSystem.FileClose(fileNumber); + } + + // Not tested: + // public static string InputString(int FileNumber, int CharCount) { throw null; } + + [Fact] + public void Kill() + { + var fileName = GetTestFilePath(); + System.IO.File.WriteAllText(fileName, "abc123"); + Assert.True(System.IO.File.Exists(fileName)); + FileSystem.Kill(fileName); + Assert.False(System.IO.File.Exists(fileName)); + + // Missing file. + fileName = GetTestFilePath(); + AssertThrows(() => FileSystem.Kill(fileName)); + Assert.False(System.IO.File.Exists(fileName)); + } + + // Not tested: + // public static string LineInput(int FileNumber) { throw null; } + // public static long Loc(int FileNumber) { throw null; } + + // Lock is supported on Windows only currently. + [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsWindows))] + public void Lock_Unlock() + { + int fileNumber = FileSystem.FreeFile(); + var fileName = GetTestFilePath(); + FileSystem.FileOpen(fileNumber, fileName, OpenMode.Output, Share: OpenShare.Shared); + remoteWrite(fileName, "abc"); + try + { + FileSystem.Lock(fileNumber); + remoteWrite(fileName, "123"); + } + finally + { + FileSystem.Unlock(fileNumber); + } + remoteWrite(fileName, "456"); + FileSystem.FileClose(fileNumber); + Assert.Equal("abc456", System.IO.File.ReadAllText(fileName)); + + static void remoteWrite(string fileName, string text) + { + RemoteExecutor.Invoke( + (fileName, text) => + { + using (var stream = System.IO.File.Open(fileName, System.IO.FileMode.Append, System.IO.FileAccess.Write, System.IO.FileShare.ReadWrite)) + { + try + { + using (var writer = new System.IO.StreamWriter(stream)) + { + writer.Write(text); + } + } + catch (System.IO.IOException) + { + } + } + }, + fileName, + text, + new RemoteInvokeOptions() { ExpectedExitCode = 0 }).Dispose(); + } + } + + // Not tested: + // public static void Lock(int FileNumber, long Record) { } + // public static void Lock(int FileNumber, long FromRecord, long ToRecord) { } + // public static long LOF(int FileNumber) { throw null; } + // public static void Unlock(int FileNumber, long Record) { } + // public static void Unlock(int FileNumber, long FromRecord, long ToRecord) { } + + [Fact] + public void MkDir_RmDir() + { + var dirName = GetTestFilePath(); + Assert.False(System.IO.Directory.Exists(dirName)); + + FileSystem.MkDir(dirName); + Assert.True(System.IO.Directory.Exists(dirName)); + + // Create the directory a second time. + AssertThrows(() => FileSystem.MkDir(dirName)); + + FileSystem.RmDir(dirName); + Assert.False(System.IO.Directory.Exists(dirName)); + + // Remove the directory a second time. + AssertThrows(() => FileSystem.RmDir(dirName)); + } + + // Not tested: + // public static void Print(int FileNumber, params object[] Output) { } + // public static void PrintLine(int FileNumber, params object[] Output) { } + + [Fact] + public void Rename() + { + // Rename to an unused name. + var sourceName = GetTestFilePath(); + System.IO.File.WriteAllText(sourceName, "abc"); + var destName = GetTestFilePath(); + if (PlatformDetection.IsWindows) + { + FileSystem.Rename(sourceName, destName); + Assert.False(System.IO.File.Exists(sourceName)); + Assert.True(System.IO.File.Exists(destName)); + Assert.Equal("abc", System.IO.File.ReadAllText(destName)); + } + else + { + AssertThrows(() => FileSystem.Rename(sourceName, destName)); + Assert.True(System.IO.File.Exists(sourceName)); + Assert.False(System.IO.File.Exists(destName)); + Assert.Equal("abc", System.IO.File.ReadAllText(sourceName)); + } + + // Rename to an existing name. + sourceName = GetTestFilePath(); + System.IO.File.WriteAllText(sourceName, "def"); + destName = GetTestFilePath(); + System.IO.File.WriteAllText(destName, "123"); + if (PlatformDetection.IsWindows) + { + AssertThrows(() => FileSystem.Rename(sourceName, destName)); + } + else + { + AssertThrows(() => FileSystem.Rename(sourceName, destName)); + } + Assert.True(System.IO.File.Exists(sourceName)); + Assert.True(System.IO.File.Exists(destName)); + Assert.Equal("def", System.IO.File.ReadAllText(sourceName)); + Assert.Equal("123", System.IO.File.ReadAllText(destName)); + } + + // Not tested: + // public static void Reset() { } + // public static void Seek(int FileNumber, long Position) { } + // public static long Seek(int FileNumber) { throw null; } + // public static void SetAttr(string PathName, FileAttribute Attributes) { } + // public static SpcInfo SPC(short Count) { throw null; } + // public static TabInfo TAB() { throw null; } + // public static TabInfo TAB(short Column) { throw null; } + // public static void WriteLine(int FileNumber, params object[] Output) { } + + [Fact] + public void Write_ArgumentException() + { + int fileNumber = FileSystem.FreeFile(); + var fileName = GetTestFilePath(); + FileSystem.FileOpen(fileNumber, fileName, OpenMode.Output); + AssertThrows(() => FileSystem.Write(fileNumber, new object())); + FileSystem.FileClose(fileNumber); + } + + // We cannot use XUnit.Assert.Throws() for lambdas that rely on AssemblyData (such as + // file numbers) because AssemblyData instances are associated with the calling assembly, and + // in RELEASE builds, the calling assembly of a lambda invoked from XUnit.Assert.Throws() + // is corelib rather than this assembly, so file numbers created outside the lambda will be invalid. + private static void AssertThrows(Action action) where TException : Exception + { + TException ex = null; + try + { + action(); + } + catch (TException e) + { + ex = e; + } + Assert.NotNull(ex?.GetType() == typeof(TException)); + } + } +} diff --git a/src/Microsoft.VisualBasic.Core/tests/Microsoft.VisualBasic.Core.Tests.csproj b/src/Microsoft.VisualBasic.Core/tests/Microsoft.VisualBasic.Core.Tests.csproj index 35f67df1bbef..0cf30f8db6e7 100644 --- a/src/Microsoft.VisualBasic.Core/tests/Microsoft.VisualBasic.Core.Tests.csproj +++ b/src/Microsoft.VisualBasic.Core/tests/Microsoft.VisualBasic.Core.Tests.csproj @@ -17,6 +17,7 @@ + diff --git a/src/Microsoft.VisualBasic.Core/tests/ProjectDataTests.cs b/src/Microsoft.VisualBasic.Core/tests/ProjectDataTests.cs index f1af4d34481f..4a0f6fe53a0b 100644 --- a/src/Microsoft.VisualBasic.Core/tests/ProjectDataTests.cs +++ b/src/Microsoft.VisualBasic.Core/tests/ProjectDataTests.cs @@ -52,12 +52,14 @@ public void ClearProjectError() [Fact] public void EndApp() { - RemoteExecutor.Invoke(new Action(() => - { - ProjectData.EndApp(); - throw new Exception(); // Shouldn't reach here. - }), - new RemoteInvokeOptions() { ExpectedExitCode = 0 }).Dispose(); + RemoteExecutor.Invoke( + new Action(() => + { + // See FileSystemTests.CloseAllFiles() for a test that EndApp() closes open files. + ProjectData.EndApp(); + throw new Exception(); // Shouldn't reach here. + }), + new RemoteInvokeOptions() { ExpectedExitCode = 0 }).Dispose(); } } } diff --git a/src/Microsoft.VisualBasic.Core/tests/VB/Dummy.vb b/src/Microsoft.VisualBasic.Core/tests/VB/Dummy.vb deleted file mode 100644 index c76141f4384e..000000000000 --- a/src/Microsoft.VisualBasic.Core/tests/VB/Dummy.vb +++ /dev/null @@ -1,29 +0,0 @@ -' Licensed to the .NET Foundation under one or more agreements. -' The .NET Foundation licenses this file to you under the MIT license. -' See the LICENSE file in the project root for more information. - -Imports Microsoft.VisualBasic -Imports System -Imports Xunit - -Namespace Microsoft.VisualBasic.Tests.VB - - Public NotInheritable Class DummyTest - - - Public Shared Sub Dummy() - 'While (Not System.Diagnostics.Debugger.IsAttached) - ' System.Threading.Thread.Sleep(1000) - 'End While - - Dim dateTimeNowBefore As Date = Date.Now() - Dim now As Date = DateAndTime.Now() - Dim dateTimeNowAfter As Date = Date.Now() - - Assert.InRange(now, dateTimeNowBefore, dateTimeNowAfter) - - End Sub - - End Class - -End Namespace diff --git a/src/Microsoft.VisualBasic.Core/tests/VB/FileIOTests.vb b/src/Microsoft.VisualBasic.Core/tests/VB/FileIOTests.vb index 15ede09c9fab..05890769e9de 100644 --- a/src/Microsoft.VisualBasic.Core/tests/VB/FileIOTests.vb +++ b/src/Microsoft.VisualBasic.Core/tests/VB/FileIOTests.vb @@ -9,7 +9,6 @@ Imports System Imports System.Collections.Generic Imports System.Collections.ObjectModel Imports System.Linq -Imports System.Runtime.CompilerServices Imports System.Runtime.InteropServices Imports System.Text Imports Xunit @@ -54,8 +53,8 @@ Namespace Microsoft.VisualBasic.Tests.VB Public Shared Sub CombinePathTest_BadBaseDirectory_RelativePath() - Assert.Throws(Of ArgumentNullException)(Function() FileSystem.CombinePath(Nothing, "Test2")) - Assert.Throws(Of ArgumentNullException)(Function() FileSystem.CombinePath("", "Test2")) + Assert.Throws(Of ArgumentNullException)(Function() FileIO.FileSystem.CombinePath(Nothing, "Test2")) + Assert.Throws(Of ArgumentNullException)(Function() FileIO.FileSystem.CombinePath("", "Test2")) End Sub @@ -63,16 +62,16 @@ Namespace Microsoft.VisualBasic.Tests.VB Using TestBase As New FileIOTests Dim TestDirInfo As New IO.DirectoryInfo(TestBase.TestDirectory) Dim Root As String = TestDirInfo.Root.Name - Assert.Equal(FileSystem.CombinePath(Root, "Test2"), IO.Path.Combine(Root, "Test2")) + Assert.Equal(FileIO.FileSystem.CombinePath(Root, "Test2"), IO.Path.Combine(Root, "Test2")) End Using End Sub Public Shared Sub CombinePathTest_RootDirectory_RelativePath() Using TestBase As New FileIOTests - Assert.Equal(FileSystem.CombinePath(TestBase.TestDirectory, Nothing), TestBase.TestDirectory) - Assert.Equal(FileSystem.CombinePath(TestBase.TestDirectory, ""), TestBase.TestDirectory) - Assert.Equal(FileSystem.CombinePath(TestBase.TestDirectory, "Test"), IO.Path.Combine(TestBase.TestDirectory, "Test")) + Assert.Equal(FileIO.FileSystem.CombinePath(TestBase.TestDirectory, Nothing), TestBase.TestDirectory) + Assert.Equal(FileIO.FileSystem.CombinePath(TestBase.TestDirectory, ""), TestBase.TestDirectory) + Assert.Equal(FileIO.FileSystem.CombinePath(TestBase.TestDirectory, "Test"), IO.Path.Combine(TestBase.TestDirectory, "Test")) End Using End Sub @@ -85,7 +84,7 @@ Namespace Microsoft.VisualBasic.Tests.VB CreateTestFile(TestBase, SourceData, PathFromBase:="SourceDirectory", TestFileName:=$"NewFile{i}") Next Dim FullPathToTargetDirectory As String = IO.Path.Combine(TestBase.TestDirectory(), "TargetDirectory") - FileSystem.CopyDirectory(FullPathToSourceDirectory, FullPathToTargetDirectory) + FileIO.FileSystem.CopyDirectory(FullPathToSourceDirectory, FullPathToTargetDirectory) Assert.Equal(IO.Directory.GetFiles(FullPathToSourceDirectory).Count, IO.Directory.GetFiles(FullPathToTargetDirectory).Count) For Each CurrentFile As String In IO.Directory.GetFiles(FullPathToTargetDirectory) ' Ensure copy transferred written data @@ -94,7 +93,7 @@ Namespace Microsoft.VisualBasic.Tests.VB IO.Directory.Delete(FullPathToTargetDirectory, recursive:=True) IO.Directory.CreateDirectory(FullPathToTargetDirectory) CreateTestFile(TestBase, TestData:=SourceData, PathFromBase:="TargetDirectory", TestFileName:=$"NewFile0") - Assert.Throws(Of IO.IOException)(Sub() FileSystem.CopyDirectory(FullPathToSourceDirectory, FullPathToTargetDirectory)) + Assert.Throws(Of IO.IOException)(Sub() FileIO.FileSystem.CopyDirectory(FullPathToSourceDirectory, FullPathToTargetDirectory)) End Using End Sub @@ -107,7 +106,7 @@ Namespace Microsoft.VisualBasic.Tests.VB For i As Integer = 0 To 5 CreateTestFile(TestBase, SourceData, PathFromBase:="SourceDirectory", TestFileName:=$"NewFile{i}") Next - FileSystem.CopyDirectory(FullPathToSourceDirectory, FullPathToTargetDirectory, overwrite:=False) + FileIO.FileSystem.CopyDirectory(FullPathToSourceDirectory, FullPathToTargetDirectory, overwrite:=False) Assert.Equal(IO.Directory.GetFiles(FullPathToSourceDirectory).Count, IO.Directory.GetFiles(FullPathToTargetDirectory).Count) For Each CurrentFile As String In IO.Directory.GetFiles(FullPathToTargetDirectory) ' Ensure copy transferred written data @@ -116,7 +115,7 @@ Namespace Microsoft.VisualBasic.Tests.VB IO.Directory.Delete(FullPathToTargetDirectory, recursive:=True) IO.Directory.CreateDirectory(FullPathToTargetDirectory) CreateTestFile(TestBase, DestData, PathFromBase:="TargetDirectory", TestFileName:=$"NewFile0") - Assert.Throws(Of IO.IOException)(Sub() FileSystem.CopyDirectory(FullPathToSourceDirectory, FullPathToTargetDirectory, overwrite:=False)) + Assert.Throws(Of IO.IOException)(Sub() FileIO.FileSystem.CopyDirectory(FullPathToSourceDirectory, FullPathToTargetDirectory, overwrite:=False)) Assert.Equal(IO.Directory.GetFiles(FullPathToTargetDirectory).Count, IO.Directory.GetFiles(FullPathToSourceDirectory).Count) For Each CurrentFile As String In IO.Directory.GetFiles(FullPathToTargetDirectory) If CurrentFile.EndsWith("0") Then @@ -140,7 +139,7 @@ Namespace Microsoft.VisualBasic.Tests.VB For i As Integer = 0 To 5 CreateTestFile(TestBase, SourceData, PathFromBase:="SourceDirectory", TestFileName:=$"NewFile{i}") Next - FileSystem.CopyDirectory(FullPathToSourceDirectory, FullPathToTargetDirectory, overwrite:=True) + FileIO.FileSystem.CopyDirectory(FullPathToSourceDirectory, FullPathToTargetDirectory, overwrite:=True) Assert.Equal(IO.Directory.GetFiles(FullPathToSourceDirectory).Count, IO.Directory.GetFiles(FullPathToTargetDirectory).Count) For Each CurrentFile As String In IO.Directory.GetFiles(FullPathToTargetDirectory) ' Ensure copy transferred written data @@ -161,7 +160,7 @@ Namespace Microsoft.VisualBasic.Tests.VB Next IO.Directory.CreateDirectory(FullPathToTargetDirectory) CreateTestFile(TestBase, DestData, PathFromBase:="TargetDirectory", TestFileName:=$"Select_Skip_this_file0") - FileSystem.CopyDirectory(FullPathToSourceDirectory, FullPathToTargetDirectory, UIOption.AllDialogs, onUserCancel:=UICancelOption.ThrowException) + FileIO.FileSystem.CopyDirectory(FullPathToSourceDirectory, FullPathToTargetDirectory, UIOption.AllDialogs, onUserCancel:=UICancelOption.ThrowException) Assert.Equal(IO.Directory.GetFiles(FullPathToTargetDirectory).Count, IO.Directory.GetFiles(FullPathToSourceDirectory).Count) For Each CurrentFile As String In IO.Directory.GetFiles(FullPathToTargetDirectory) If CurrentFile.EndsWith("0") Then @@ -188,7 +187,7 @@ Namespace Microsoft.VisualBasic.Tests.VB CreateTestFile(TestBase, SourceData, PathFromBase:="SourceDirectory", TestFileName:=$"NewFile{i}") CreateTestFile(TestBase, DestData, PathFromBase:="TargetDirectory", TestFileName:=$"NewFile{i}") Next - Assert.Throws(Of PlatformNotSupportedException)(Sub() FileSystem.CopyDirectory(FullPathToSourceDirectory, FullPathToTargetDirectory, UIOption.AllDialogs)) + Assert.Throws(Of PlatformNotSupportedException)(Sub() FileIO.FileSystem.CopyDirectory(FullPathToSourceDirectory, FullPathToTargetDirectory, UIOption.AllDialogs)) End Using End Sub @@ -202,14 +201,14 @@ Namespace Microsoft.VisualBasic.Tests.VB ' Write and copy file WriteFile(testFileSource, SourceData) WriteFile(testFileDest, DestData) - Assert.Throws(Of IO.IOException)(Sub() FileSystem.CopyFile(testFileSource, testFileDest)) + Assert.Throws(Of IO.IOException)(Sub() FileIO.FileSystem.CopyFile(testFileSource, testFileDest)) ' Ensure copy didn't overwrite existing data Assert.True(HasExpectedData(testFileDest, DestData)) ' Get a new destination name testFileDest = TestBase.GetTestFilePath() - FileSystem.CopyFile(testFileSource, testFileDest) + FileIO.FileSystem.CopyFile(testFileSource, testFileDest) ' Ensure copy transferred written data Assert.True(HasExpectedData(testFileDest, SourceData)) @@ -225,7 +224,7 @@ Namespace Microsoft.VisualBasic.Tests.VB ' Write and copy file WriteFile(testFileSource, SourceData) WriteFile(testFileDest, DestData) - Assert.Throws(Of IO.IOException)(Sub() FileSystem.CopyFile(testFileSource, testFileDest, overwrite:=False)) + Assert.Throws(Of IO.IOException)(Sub() FileIO.FileSystem.CopyFile(testFileSource, testFileDest, overwrite:=False)) ' Ensure copy didn't overwrite existing data Assert.True(HasExpectedData(testFileDest, DestData)) @@ -241,7 +240,7 @@ Namespace Microsoft.VisualBasic.Tests.VB ' Write and copy file WriteFile(testFileSource, SourceData) WriteFile(testFileDest, DestData) - FileSystem.CopyFile(testFileSource, testFileDest, overwrite:=True) + FileIO.FileSystem.CopyFile(testFileSource, testFileDest, overwrite:=True) ' Ensure copy transferred written data Assert.True(HasExpectedData(testFileDest, SourceData)) @@ -258,7 +257,7 @@ Namespace Microsoft.VisualBasic.Tests.VB ' Write and copy file WriteFile(testFileSource, SourceData) WriteFile(testFileDest, DestData) - FileSystem.CopyFile(testFileSource, testFileDest, showUI:=UIOption.AllDialogs, onUserCancel:=UICancelOption.DoNothing) + FileIO.FileSystem.CopyFile(testFileSource, testFileDest, showUI:=UIOption.AllDialogs, onUserCancel:=UICancelOption.DoNothing) ' Ensure copy transferred written data Assert.True(HasExpectedData(testFileDest, DestData)) @@ -276,7 +275,7 @@ Namespace Microsoft.VisualBasic.Tests.VB WriteFile(testFileSource, SourceData) WriteFile(testFileDest, DestData) - FileSystem.CopyFile(testFileSource, testFileDest, showUI:=UIOption.AllDialogs, onUserCancel:=UICancelOption.DoNothing) + FileIO.FileSystem.CopyFile(testFileSource, testFileDest, showUI:=UIOption.AllDialogs, onUserCancel:=UICancelOption.DoNothing) ' Ensure copy transferred written data Assert.True(HasExpectedData(testFileDest, SourceData)) @@ -288,7 +287,7 @@ Namespace Microsoft.VisualBasic.Tests.VB Using TestBase As New FileIOTests Dim FullPathToNewDirectory As String = IO.Path.Combine(TestBase.TestDirectory(), "NewDirectory") Assert.False(IO.Directory.Exists(FullPathToNewDirectory)) - FileSystem.CreateDirectory(FullPathToNewDirectory) + FileIO.FileSystem.CreateDirectory(FullPathToNewDirectory) Assert.True(IO.Directory.Exists(FullPathToNewDirectory)) End Using End Sub @@ -298,7 +297,7 @@ Namespace Microsoft.VisualBasic.Tests.VB If Not RuntimeInformation.IsOSPlatform(OSPlatform.OSX) Then ' Can't get current Directory on Mac before setting it. Dim CurrentDirectory As String = IO.Directory.GetCurrentDirectory() - Assert.Equal(FileSystem.CurrentDirectory, CurrentDirectory) + Assert.Equal(FileIO.FileSystem.CurrentDirectory, CurrentDirectory) End If End Sub @@ -310,10 +309,10 @@ Namespace Microsoft.VisualBasic.Tests.VB ' On OSX, the temp directory /tmp/ is a symlink to /private/tmp, so setting the current ' directory to a symlinked path will result in GetCurrentDirectory returning the absolute ' path that followed the symlink. - FileSystem.CurrentDirectory = TestBase.TestDirectory - Assert.Equal(TestBase.TestDirectory, FileSystem.CurrentDirectory()) - FileSystem.CurrentDirectory = SavedCurrentDirectory - Assert.Equal(FileSystem.CurrentDirectory, SavedCurrentDirectory) + FileIO.FileSystem.CurrentDirectory = TestBase.TestDirectory + Assert.Equal(TestBase.TestDirectory, FileIO.FileSystem.CurrentDirectory()) + FileIO.FileSystem.CurrentDirectory = SavedCurrentDirectory + Assert.Equal(FileIO.FileSystem.CurrentDirectory, SavedCurrentDirectory) End Using End If End Sub @@ -326,7 +325,7 @@ Namespace Microsoft.VisualBasic.Tests.VB Assert.True(IO.Directory.Exists(FullPathToNewDirectory)) Dim testFileSource As String = CreateTestFile(TestBase, SourceData, PathFromBase:="NewDirectory", TestFileName:="TestFile") Assert.True(IO.File.Exists(testFileSource)) - FileSystem.DeleteDirectory(FullPathToNewDirectory, DeleteDirectoryOption.DeleteAllContents) + FileIO.FileSystem.DeleteDirectory(FullPathToNewDirectory, DeleteDirectoryOption.DeleteAllContents) Assert.False(IO.Directory.Exists(FullPathToNewDirectory)) End Using End Sub @@ -335,12 +334,12 @@ Namespace Microsoft.VisualBasic.Tests.VB Public Shared Sub DeleteDirectory_Directory_ThrowIfDirectoryNonEmpty() Using TestBase As New FileIOTests Dim FullPathToNewDirectory As String = IO.Path.Combine(TestBase.TestDirectory(), "NewDirectory") - FileSystem.CreateDirectory(FullPathToNewDirectory) + FileIO.FileSystem.CreateDirectory(FullPathToNewDirectory) Assert.True(IO.Directory.Exists(FullPathToNewDirectory)) Dim testFileSource As String = CreateTestFile(TestBase, SourceData, PathFromBase:="NewDirectory", TestFileName:="TestFile") Assert.True(IO.File.Exists(testFileSource)) - Assert.Throws(Of IO.IOException)(Sub() FileSystem.DeleteDirectory(FullPathToNewDirectory, DeleteDirectoryOption.ThrowIfDirectoryNonEmpty)) + Assert.Throws(Of IO.IOException)(Sub() FileIO.FileSystem.DeleteDirectory(FullPathToNewDirectory, DeleteDirectoryOption.ThrowIfDirectoryNonEmpty)) Assert.True(IO.Directory.Exists(FullPathToNewDirectory)) Assert.True(IO.File.Exists(testFileSource)) End Using @@ -351,12 +350,12 @@ Namespace Microsoft.VisualBasic.Tests.VB Public Shared Sub DeleteDirectory_Directory_UIOption_Delete() Using TestBase As New FileIOTests Dim FullPathToNewDirectory As String = IO.Path.Combine(TestBase.TestDirectory(), "Select_Yes") - FileSystem.CreateDirectory(FullPathToNewDirectory) + FileIO.FileSystem.CreateDirectory(FullPathToNewDirectory) Assert.True(IO.Directory.Exists(FullPathToNewDirectory)) Dim testFileSource As String = CreateTestFile(TestBase, SourceData, PathFromBase:="Select_Yes", TestFileName:="DoNotCare") Assert.True(IO.File.Exists(testFileSource)) - FileSystem.DeleteDirectory(FullPathToNewDirectory, showUI:=UIOption.AllDialogs, recycle:=RecycleOption.DeletePermanently, onUserCancel:=UICancelOption.ThrowException) + FileIO.FileSystem.DeleteDirectory(FullPathToNewDirectory, showUI:=UIOption.AllDialogs, recycle:=RecycleOption.DeletePermanently, onUserCancel:=UICancelOption.ThrowException) Assert.False(IO.Directory.Exists(FullPathToNewDirectory)) Assert.False(IO.File.Exists(testFileSource)) End Using @@ -367,12 +366,12 @@ Namespace Microsoft.VisualBasic.Tests.VB Public Shared Sub DeleteDirectory_Directory_UIOption_DoNotDelete() Using TestBase As New FileIOTests Dim FullPathToNewDirectory As String = IO.Path.Combine(TestBase.TestDirectory(), "Select_No") - FileSystem.CreateDirectory(FullPathToNewDirectory) + FileIO.FileSystem.CreateDirectory(FullPathToNewDirectory) Assert.True(IO.Directory.Exists(FullPathToNewDirectory)) Dim testFileSource As String = CreateTestFile(TestBase, SourceData, PathFromBase:="Select_No", TestFileName:="DoNotCare") Assert.True(IO.File.Exists(testFileSource)) - Assert.Throws(Of System.OperationCanceledException)(Sub() FileSystem.DeleteDirectory(FullPathToNewDirectory, showUI:=UIOption.AllDialogs, recycle:=RecycleOption.DeletePermanently, onUserCancel:=UICancelOption.ThrowException)) + Assert.Throws(Of System.OperationCanceledException)(Sub() FileIO.FileSystem.DeleteDirectory(FullPathToNewDirectory, showUI:=UIOption.AllDialogs, recycle:=RecycleOption.DeletePermanently, onUserCancel:=UICancelOption.ThrowException)) Assert.True(IO.Directory.Exists(FullPathToNewDirectory)) Assert.True(IO.File.Exists(testFileSource)) End Using @@ -384,7 +383,7 @@ Namespace Microsoft.VisualBasic.Tests.VB Dim testFileSource As String = CreateTestFile(TestBase, SourceData) Assert.True(IO.File.Exists(testFileSource)) - FileSystem.DeleteFile(testFileSource) + FileIO.FileSystem.DeleteFile(testFileSource) Assert.False(IO.File.Exists(testFileSource)) End Using End Sub @@ -393,8 +392,8 @@ Namespace Microsoft.VisualBasic.Tests.VB Public Shared Sub DirectoryExists_Directory() Using TestBase As New FileIOTests Dim TestDirectory As String = TestBase.TestDirectory() - Assert.True(FileSystem.DirectoryExists(TestDirectory)) - Assert.False(FileSystem.DirectoryExists(IO.Path.Combine(TestDirectory, "NewDirectory"))) + Assert.True(FileIO.FileSystem.DirectoryExists(TestDirectory)) + Assert.False(FileIO.FileSystem.DirectoryExists(IO.Path.Combine(TestDirectory, "NewDirectory"))) End Using End Sub @@ -402,28 +401,28 @@ Namespace Microsoft.VisualBasic.Tests.VB Public Shared Sub FileExists_File() Using TestBase As New FileIOTests Dim testFileSource As String = CreateTestFile(TestBase, SourceData) - Assert.True(FileSystem.FileExists(testFileSource)) - FileSystem.FileExists(testFileSource) + Assert.True(FileIO.FileSystem.FileExists(testFileSource)) + FileIO.FileSystem.FileExists(testFileSource) IO.File.Delete(testFileSource) - Assert.False(FileSystem.FileExists(testFileSource)) + Assert.False(FileIO.FileSystem.FileExists(testFileSource)) End Using End Sub Public Shared Sub GetDirectories_Directory() Using TestBase As New FileIOTests - Dim DirectoryList As ReadOnlyCollection(Of String) = FileSystem.GetDirectories(TestBase.TestDirectory) + Dim DirectoryList As ReadOnlyCollection(Of String) = FileIO.FileSystem.GetDirectories(TestBase.TestDirectory) Assert.True(DirectoryList.Count = 0) For i As Integer = 0 To 5 IO.Directory.CreateDirectory(IO.Path.Combine(TestBase.TestDirectory, $"GetDirectories_DirectoryNewSubDirectory{i}")) Next - DirectoryList = FileSystem.GetDirectories(TestBase.TestDirectory) + DirectoryList = FileIO.FileSystem.GetDirectories(TestBase.TestDirectory) Assert.True(DirectoryList.Count = 6) For i As Integer = 0 To 5 Assert.True(DirectoryList.Contains(IO.Path.Combine(TestBase.TestDirectory, $"GetDirectories_DirectoryNewSubDirectory{i}"))) Next IO.Directory.CreateDirectory(IO.Path.Combine(TestBase.TestDirectory, $"GetDirectories_DirectoryNewSubDirectory0", $"NewSubSubDirectory")) - DirectoryList = FileSystem.GetDirectories(TestBase.TestDirectory) + DirectoryList = FileIO.FileSystem.GetDirectories(TestBase.TestDirectory) Assert.True(DirectoryList.Count = 6) End Using End Sub @@ -431,20 +430,20 @@ Namespace Microsoft.VisualBasic.Tests.VB Public Shared Sub GetDirectories_Directory_SearchOption() Using TestBase As New FileIOTests - Dim DirectoryList As ReadOnlyCollection(Of String) = FileSystem.GetDirectories(TestBase.TestDirectory, SearchOption.SearchTopLevelOnly) + Dim DirectoryList As ReadOnlyCollection(Of String) = FileIO.FileSystem.GetDirectories(TestBase.TestDirectory, SearchOption.SearchTopLevelOnly) Assert.True(DirectoryList.Count = 0) For i As Integer = 0 To 5 IO.Directory.CreateDirectory(IO.Path.Combine(TestBase.TestDirectory, $"GetDirectories_Directory_SearchOptionNewSubDirectory{i}")) Next - DirectoryList = FileSystem.GetDirectories(TestBase.TestDirectory, SearchOption.SearchTopLevelOnly) + DirectoryList = FileIO.FileSystem.GetDirectories(TestBase.TestDirectory, SearchOption.SearchTopLevelOnly) Assert.True(DirectoryList.Count = 6) For i As Integer = 0 To 5 Assert.True(DirectoryList.Contains(IO.Path.Combine(TestBase.TestDirectory, $"GetDirectories_Directory_SearchOptionNewSubDirectory{i}"))) Next IO.Directory.CreateDirectory(IO.Path.Combine(TestBase.TestDirectory, $"GetDirectories_Directory_SearchOptionNewSubDirectory0", $"NewSubSubDirectory")) - DirectoryList = FileSystem.GetDirectories(TestBase.TestDirectory, SearchOption.SearchTopLevelOnly) + DirectoryList = FileIO.FileSystem.GetDirectories(TestBase.TestDirectory, SearchOption.SearchTopLevelOnly) Assert.True(DirectoryList.Count = 6) - DirectoryList = FileSystem.GetDirectories(TestBase.TestDirectory, SearchOption.SearchAllSubDirectories) + DirectoryList = FileIO.FileSystem.GetDirectories(TestBase.TestDirectory, SearchOption.SearchAllSubDirectories) Assert.True(DirectoryList.Count = 7) End Using End Sub @@ -452,22 +451,22 @@ Namespace Microsoft.VisualBasic.Tests.VB Public Shared Sub GetDirectories_Directory_SearchOption_Wildcards() Using TestBase As New FileIOTests - Dim DirectoryList As ReadOnlyCollection(Of String) = FileSystem.GetDirectories(TestBase.TestDirectory, SearchOption.SearchTopLevelOnly, "*") + Dim DirectoryList As ReadOnlyCollection(Of String) = FileIO.FileSystem.GetDirectories(TestBase.TestDirectory, SearchOption.SearchTopLevelOnly, "*") Assert.True(DirectoryList.Count = 0) Dim CreatedDirectories As New List(Of String) For i As Integer = 0 To 5 CreatedDirectories.Add(IO.Directory.CreateDirectory(IO.Path.Combine(TestBase.TestDirectory, $"NewSubDirectory00{i}")).Name) Next - DirectoryList = FileSystem.GetDirectories(TestBase.TestDirectory, SearchOption.SearchTopLevelOnly, "*000", "*001") + DirectoryList = FileIO.FileSystem.GetDirectories(TestBase.TestDirectory, SearchOption.SearchTopLevelOnly, "*000", "*001") Assert.True(DirectoryList.Count = 2, $"Search results Expected 2 Actual {DirectoryList.Count} DirectoryList = {DirectoryListToString(DirectoryList)} Created List = {DirectoryListToString(New ReadOnlyCollection(Of String)(CreatedDirectories))}") For i As Integer = 0 To 1 Dim DirectoryName As String = IO.Path.Combine(TestBase.TestDirectory, $"NewSubDirectory00{i}") Assert.True(DirectoryList.Contains(DirectoryName), $"{DirectoryName} Is missing from Wildcard Search") Next IO.Directory.CreateDirectory(IO.Path.Combine(TestBase.TestDirectory, $"NewSubDirectory000", $"NewSubSubDirectory000")) - DirectoryList = FileSystem.GetDirectories(TestBase.TestDirectory, SearchOption.SearchTopLevelOnly, "*000") + DirectoryList = FileIO.FileSystem.GetDirectories(TestBase.TestDirectory, SearchOption.SearchTopLevelOnly, "*000") Assert.True(DirectoryList.Count = 1, $"Search results Expected 1 Actual {DirectoryList.Count} {DirectoryListToString(DirectoryList)}") - DirectoryList = FileSystem.GetDirectories(TestBase.TestDirectory, SearchOption.SearchAllSubDirectories, "*000") + DirectoryList = FileIO.FileSystem.GetDirectories(TestBase.TestDirectory, SearchOption.SearchAllSubDirectories, "*000") Assert.True(DirectoryList.Count = 2, $"Search results Expected 2 Actual {DirectoryList.Count} {DirectoryListToString(DirectoryList)}") End Using End Sub @@ -479,7 +478,7 @@ Namespace Microsoft.VisualBasic.Tests.VB IO.Directory.CreateDirectory(IO.Path.Combine(TestBase.TestDirectory, $"NewSubDirectory{i}")) Next IO.Directory.CreateDirectory(IO.Path.Combine(TestBase.TestDirectory, $"NewSubDirectory0", $"NewSubSubDirectory")) - Dim info As IO.DirectoryInfo = FileSystem.GetDirectoryInfo(TestBase.TestDirectory) + Dim info As IO.DirectoryInfo = FileIO.FileSystem.GetDirectoryInfo(TestBase.TestDirectory) Dim infoFromIO As IO.DirectoryInfo = New IO.DirectoryInfo(TestBase.TestDirectory) Assert.True(info.CreationTime = infoFromIO.CreationTime, $"Creation Time info ({info.CreationTime}) <> IO.DriveInfo.CreateTime {infoFromIO.CreationTime})") Assert.True(info.Extension = infoFromIO.Extension, $"Extension {info.Extension} <> IO.DriveInfo.Extension {infoFromIO.Extension}") @@ -495,7 +494,7 @@ Namespace Microsoft.VisualBasic.Tests.VB Public Shared Sub GetDriveInfo_Drive() Dim Drives() As IO.DriveInfo = IO.DriveInfo.GetDrives() Assert.True(Drives.Count > 0) - Assert.Equal(FileSystem.GetDriveInfo(Drives(0).Name).Name, New System.IO.DriveInfo(Drives(0).Name).Name) + Assert.Equal(FileIO.FileSystem.GetDriveInfo(Drives(0).Name).Name, New System.IO.DriveInfo(Drives(0).Name).Name) End Sub @@ -506,7 +505,7 @@ Namespace Microsoft.VisualBasic.Tests.VB Dim FileInfoFromSystemIO As IO.FileInfo = New IO.FileInfo(TestFile) Assert.NotNull(FileInfoFromSystemIO) - Dim info As IO.FileInfo = FileSystem.GetFileInfo(TestFile) + Dim info As IO.FileInfo = FileIO.FileSystem.GetFileInfo(TestFile) Assert.NotNull(info) With FileInfoFromSystemIO Assert.True(info.Exists) @@ -529,19 +528,19 @@ Namespace Microsoft.VisualBasic.Tests.VB Public Shared Sub GetFiles_Directory() Using TestBase As New FileIOTests - Dim FileList As ReadOnlyCollection(Of String) = FileSystem.GetFiles(TestBase.TestDirectory) + Dim FileList As ReadOnlyCollection(Of String) = FileIO.FileSystem.GetFiles(TestBase.TestDirectory) Assert.True(FileList.Count = 0) For i As Integer = 0 To 5 CreateTestFile(TestBase, SourceData, TestFileName:=$"NewFile{i}") Next - FileList = FileSystem.GetFiles(TestBase.TestDirectory) + FileList = FileIO.FileSystem.GetFiles(TestBase.TestDirectory) Assert.True(FileList.Count = 6) For i As Integer = 0 To 5 Assert.True(FileList.Contains(IO.Path.Combine(TestBase.TestDirectory, $"NewFile{i}"))) Next IO.Directory.CreateDirectory(IO.Path.Combine(TestBase.TestDirectory, "GetFiles_DirectoryNewSubDirectory")) CreateTestFile(TestBase, SourceData, PathFromBase:="GetFiles_DirectoryNewSubDirectory", TestFileName:="NewFile") - FileList = FileSystem.GetFiles(TestBase.TestDirectory) + FileList = FileIO.FileSystem.GetFiles(TestBase.TestDirectory) Assert.True(FileList.Count = 6) End Using End Sub @@ -552,18 +551,18 @@ Namespace Microsoft.VisualBasic.Tests.VB Dim NewSubDirectoryPath As String = IO.Path.Combine(TestBase.TestDirectory, "GetFiles_Directory_SearchOptionNewSubDirectory") IO.Directory.CreateDirectory(NewSubDirectoryPath) CreateTestFile(TestBase, SourceData, "GetFiles_Directory_SearchOptionNewSubDirectory", TestFileName:="NewFile") - Dim FileList As ReadOnlyCollection(Of String) = FileSystem.GetFiles(TestBase.TestDirectory) + Dim FileList As ReadOnlyCollection(Of String) = FileIO.FileSystem.GetFiles(TestBase.TestDirectory) Assert.True(FileList.Count = 0) For i As Integer = 0 To 5 CreateTestFile(TestBase, SourceData, TestFileName:=$"NewFile{i}") Next - FileList = FileSystem.GetFiles(TestBase.TestDirectory, SearchOption.SearchTopLevelOnly) + FileList = FileIO.FileSystem.GetFiles(TestBase.TestDirectory, SearchOption.SearchTopLevelOnly) CreateTestFile(TestBase, SourceData, TestFileName:="NewFile") Assert.True(FileList.Count = 6) For i As Integer = 0 To 5 Assert.True(FileList.Contains(IO.Path.Combine(TestBase.TestDirectory, $"NewFile{i}"))) Next - FileList = FileSystem.GetFiles(TestBase.TestDirectory, SearchOption.SearchAllSubDirectories) + FileList = FileIO.FileSystem.GetFiles(TestBase.TestDirectory, SearchOption.SearchAllSubDirectories) Assert.True(FileList.Count = 8) For i As Integer = 0 To 7 Assert.True(IO.File.Exists(FileList(i))) @@ -574,13 +573,13 @@ Namespace Microsoft.VisualBasic.Tests.VB Public Shared Sub GetFiles_Directory_SearchOption_Wildcards() Using TestBase As New FileIOTests - Dim FileList As ReadOnlyCollection(Of String) = FileSystem.GetFiles(TestBase.TestDirectory) + Dim FileList As ReadOnlyCollection(Of String) = FileIO.FileSystem.GetFiles(TestBase.TestDirectory) Assert.True(FileList.Count = 0) Dim TestFileList As New List(Of String) For i As Integer = 0 To 5 TestFileList.Add(CreateTestFile(TestBase, SourceData, TestFileName:=$"NewFile{i}{If(i Mod 2 = 0, ".vb", ".cs")}")) Next - FileList = FileSystem.GetFiles(TestBase.TestDirectory, SearchOption.SearchTopLevelOnly, "*.vb") + FileList = FileIO.FileSystem.GetFiles(TestBase.TestDirectory, SearchOption.SearchTopLevelOnly, "*.vb") Assert.True(FileList.Count = 3) For i As Integer = 0 To 2 Assert.True(TestFileList.Contains(FileList(i))) @@ -588,16 +587,16 @@ Namespace Microsoft.VisualBasic.Tests.VB Dim NewSubDirectoryPath As String = IO.Path.Combine(TestBase.TestDirectory, "GetFiles_Directory_SearchOption_WildcardsNewSubDirectory") IO.Directory.CreateDirectory(NewSubDirectoryPath) TestFileList.Add(CreateTestFile(TestBase, SourceData, PathFromBase:="GetFiles_Directory_SearchOption_WildcardsNewSubDirectory", TestFileName:="NewFile.cs")) - FileList = FileSystem.GetFiles(TestBase.TestDirectory, SearchOption.SearchAllSubDirectories, "*.cs") + FileList = FileIO.FileSystem.GetFiles(TestBase.TestDirectory, SearchOption.SearchAllSubDirectories, "*.cs") Assert.True(FileList.Contains(TestFileList.Last), "File in Subdirectory not found") - Assert.True(FileList.Count = 4, $"4 files expected, {FileList.Count} returned from FileSystem.GetFiles") + Assert.True(FileList.Count = 4, $"4 files expected, {FileList.Count} returned from FileIO.FileSystem.GetFiles") End Using End Sub Public Shared Sub GetName_Path() Using TestBase As New FileIOTests - Assert.Equal(FileSystem.GetName(TestBase.TestDirectory), IO.Path.GetFileName(TestBase.TestDirectory)) + Assert.Equal(FileIO.FileSystem.GetName(TestBase.TestDirectory), IO.Path.GetFileName(TestBase.TestDirectory)) End Using End Sub @@ -605,13 +604,13 @@ Namespace Microsoft.VisualBasic.Tests.VB Public Shared Sub GetParentPath_Path() Using TestBase As New FileIOTests Dim TestDirectory As String = TestBase.TestDirectory - Assert.Equal(FileSystem.GetParentPath(TestDirectory), IO.Path.GetDirectoryName(TestDirectory.TrimSeparators)) + Assert.Equal(FileIO.FileSystem.GetParentPath(TestDirectory), IO.Path.GetDirectoryName(TestDirectory.TrimSeparators)) End Using End Sub Public Shared Sub GetTempFileName() - Dim TempFile As String = FileSystem.GetTempFileName + Dim TempFile As String = FileIO.FileSystem.GetTempFileName Assert.True(IO.File.Exists(TempFile)) Assert.True((New IO.FileInfo(TempFile)).Length = 0) IO.File.Delete(TempFile) @@ -630,12 +629,12 @@ Namespace Microsoft.VisualBasic.Tests.VB Dim FullPathToTargetDirectory As String = IO.Path.Combine(TestBase.TestDirectory, DirectoryName) Assert.True(FullPathToTargetDirectory.Length < 260, $"FullPathToTargetDirectory.Length at {FullPathToTargetDirectory.Length} is not < 260") - FileSystem.CreateDirectory(FullPathToTargetDirectory) + FileIO.FileSystem.CreateDirectory(FullPathToTargetDirectory) Assert.True(IO.Directory.Exists(FullPathToTargetDirectory)) Try Dim VeryLongFullPathToTargetDirectory As String = IO.Path.Combine(TestBase.TestDirectory, New String("E"c, 239)) - FileSystem.CreateDirectory(VeryLongFullPathToTargetDirectory) + FileIO.FileSystem.CreateDirectory(VeryLongFullPathToTargetDirectory) Assert.True(IO.Directory.Exists(VeryLongFullPathToTargetDirectory), $"Directory {VeryLongFullPathToTargetDirectory} does not exist") Catch e As IO.PathTooLongException Assert.True(RuntimeInformation.IsOSPlatform(OSPlatform.Windows), "Unexpected Failure on non-Windows Platform") @@ -659,7 +658,7 @@ Namespace Microsoft.VisualBasic.Tests.VB Next IO.Directory.CreateDirectory(FullPathToTargetDirectory) Dim NewFile0WithPath As String = CreateTestFile(TestBase, DestData, PathFromBase:="TargetDirectory", TestFileName:="Select_Skip_this_file0") - FileSystem.MoveDirectory(FullPathToSourceDirectory, FullPathToTargetDirectory, showUI:=UIOption.AllDialogs, onUserCancel:=UICancelOption.ThrowException) + FileIO.FileSystem.MoveDirectory(FullPathToSourceDirectory, FullPathToTargetDirectory, showUI:=UIOption.AllDialogs, onUserCancel:=UICancelOption.ThrowException) Dim RemainingSourceFilesWithPath As String() = IO.Directory.GetFiles(FullPathToSourceDirectory) ' We couldn't move one file Assert.Equal(1, RemainingSourceFilesWithPath.Count) @@ -689,7 +688,7 @@ Namespace Microsoft.VisualBasic.Tests.VB For i As Integer = 0 To 5 CreateTestFile(TestBase, SourceData, PathFromBase:="SourceDirectory", TestFileName:=$"NewFile{i}") Next - FileSystem.MoveDirectory(FullPathToSourceDirectory, FullPathToTargetDirectory) + FileIO.FileSystem.MoveDirectory(FullPathToSourceDirectory, FullPathToTargetDirectory) Assert.Equal(6, IO.Directory.GetFiles(FullPathToTargetDirectory).Count) Assert.False(IO.Directory.Exists(FullPathToSourceDirectory)) For Each CurrentFile As String In IO.Directory.GetFiles(FullPathToTargetDirectory) @@ -699,7 +698,7 @@ Namespace Microsoft.VisualBasic.Tests.VB IO.Directory.Move(FullPathToTargetDirectory, FullPathToSourceDirectory) IO.Directory.CreateDirectory(FullPathToTargetDirectory) CreateTestFile(TestBase, SourceData, PathFromBase:="TargetDirectory", TestFileName:="NewFile0") - Assert.Throws(Of IO.IOException)(Sub() FileSystem.MoveDirectory(FullPathToSourceDirectory, FullPathToTargetDirectory)) + Assert.Throws(Of IO.IOException)(Sub() FileIO.FileSystem.MoveDirectory(FullPathToSourceDirectory, FullPathToTargetDirectory)) End Using End Sub @@ -712,7 +711,7 @@ Namespace Microsoft.VisualBasic.Tests.VB For i As Integer = 0 To 5 CreateTestFile(TestBase, SourceData, PathFromBase:="SourceDirectory", TestFileName:=$"NewFile{i}") Next - FileSystem.MoveDirectory(FullPathToSourceDirectory, FullPathToTargetDirectory, overwrite:=False) + FileIO.FileSystem.MoveDirectory(FullPathToSourceDirectory, FullPathToTargetDirectory, overwrite:=False) Assert.Equal(6, IO.Directory.GetFiles(FullPathToTargetDirectory).Count) Assert.False(IO.Directory.Exists(FullPathToSourceDirectory)) For Each CurrentFile As String In IO.Directory.GetFiles(FullPathToTargetDirectory) @@ -722,7 +721,7 @@ Namespace Microsoft.VisualBasic.Tests.VB IO.Directory.Move(FullPathToTargetDirectory, FullPathToSourceDirectory) IO.Directory.CreateDirectory(FullPathToTargetDirectory) Dim NewFile0WithPath As String = CreateTestFile(TestBase, DestData, PathFromBase:="TargetDirectory", TestFileName:="NewFile0") - Assert.Throws(Of IO.IOException)(Sub() FileSystem.MoveDirectory(FullPathToSourceDirectory, FullPathToTargetDirectory, overwrite:=False)) + Assert.Throws(Of IO.IOException)(Sub() FileIO.FileSystem.MoveDirectory(FullPathToSourceDirectory, FullPathToTargetDirectory, overwrite:=False)) Dim RemainingSourceFilesWithPath As String() = IO.Directory.GetFiles(FullPathToSourceDirectory) ' We couldn't move one file Assert.Equal(1, RemainingSourceFilesWithPath.Count) @@ -753,7 +752,7 @@ Namespace Microsoft.VisualBasic.Tests.VB For i As Integer = 0 To 5 CreateTestFile(TestBase, SourceData, PathFromBase:="SourceDirectory", TestFileName:=$"NewFile{i}") Next - FileSystem.MoveDirectory(FullPathToSourceDirectory, FullPathToTargetDirectory, overwrite:=True) + FileIO.FileSystem.MoveDirectory(FullPathToSourceDirectory, FullPathToTargetDirectory, overwrite:=True) Assert.False(IO.Directory.Exists(FullPathToSourceDirectory)) Assert.Equal(6, IO.Directory.GetFiles(FullPathToTargetDirectory).Count) For Each CurrentFile As String In IO.Directory.GetFiles(FullPathToTargetDirectory) @@ -768,14 +767,14 @@ Namespace Microsoft.VisualBasic.Tests.VB Using TestBase As New FileIOTests Dim SourceFileNameWithPath As String = CreateTestFile(TestBase, SourceData) Dim DestinationFileNameWithPath As String = IO.Path.Combine(TestBase.TestDirectory, "NewName") - FileSystem.MoveFile(SourceFileNameWithPath, DestinationFileNameWithPath) + FileIO.FileSystem.MoveFile(SourceFileNameWithPath, DestinationFileNameWithPath) Assert.False(IO.File.Exists(SourceFileNameWithPath)) Assert.True(IO.File.Exists(DestinationFileNameWithPath)) Assert.True(HasExpectedData(DestinationFileNameWithPath, SourceData)) SourceFileNameWithPath = DestinationFileNameWithPath DestinationFileNameWithPath = CreateTestFile(TestBase, DestData) - Assert.Throws(Of IO.IOException)(Sub() FileSystem.MoveFile(SourceFileNameWithPath, DestinationFileNameWithPath)) + Assert.Throws(Of IO.IOException)(Sub() FileIO.FileSystem.MoveFile(SourceFileNameWithPath, DestinationFileNameWithPath)) ' Make sure we did not override existing file Assert.True(HasExpectedData(DestinationFileNameWithPath, DestData)) Assert.True(IO.File.Exists(SourceFileNameWithPath)) @@ -787,13 +786,13 @@ Namespace Microsoft.VisualBasic.Tests.VB Using TestBase As New FileIOTests Dim SourceFileNameWithPath As String = CreateTestFile(TestBase, SourceData) Dim DestinationFileNameWithPath As String = IO.Path.Combine(TestBase.TestDirectory, "NewName") - FileSystem.MoveFile(SourceFileNameWithPath, DestinationFileNameWithPath, overwrite:=False) + FileIO.FileSystem.MoveFile(SourceFileNameWithPath, DestinationFileNameWithPath, overwrite:=False) Assert.False(IO.File.Exists(SourceFileNameWithPath)) Assert.True(IO.File.Exists(DestinationFileNameWithPath)) Assert.True(HasExpectedData(DestinationFileNameWithPath, SourceData)) SourceFileNameWithPath = DestinationFileNameWithPath DestinationFileNameWithPath = CreateTestFile(TestBase, DestData) - Assert.Throws(Of IO.IOException)(Sub() FileSystem.MoveFile(SourceFileNameWithPath, DestinationFileNameWithPath, overwrite:=False)) + Assert.Throws(Of IO.IOException)(Sub() FileIO.FileSystem.MoveFile(SourceFileNameWithPath, DestinationFileNameWithPath, overwrite:=False)) ' Make sure we did not override existing file Assert.True(HasExpectedData(DestinationFileNameWithPath, DestData)) Assert.True(IO.File.Exists(SourceFileNameWithPath)) @@ -805,12 +804,12 @@ Namespace Microsoft.VisualBasic.Tests.VB Using TestBase As New FileIOTests Dim SourceFileNameWithPath As String = CreateTestFile(TestBase, SourceData) Dim DestinationFileNameWithPath As String = IO.Path.Combine(TestBase.TestDirectory, "NewName") - FileSystem.MoveFile(SourceFileNameWithPath, DestinationFileNameWithPath, overwrite:=True) + FileIO.FileSystem.MoveFile(SourceFileNameWithPath, DestinationFileNameWithPath, overwrite:=True) Assert.False(IO.File.Exists(SourceFileNameWithPath)) Assert.True(IO.File.Exists(DestinationFileNameWithPath)) Assert.True(HasExpectedData(DestinationFileNameWithPath, SourceData)) CreateTestFile(TestBase, DestData, TestFileName:=(New IO.FileInfo(SourceFileNameWithPath)).Name) - FileSystem.MoveFile(sourceFileName:=DestinationFileNameWithPath, destinationFileName:=SourceFileNameWithPath, overwrite:=True) + FileIO.FileSystem.MoveFile(sourceFileName:=DestinationFileNameWithPath, destinationFileName:=SourceFileNameWithPath, overwrite:=True) Assert.True(IO.File.Exists(SourceFileNameWithPath)) Assert.False(IO.File.Exists(DestinationFileNameWithPath)) Assert.True(HasExpectedData(SourceFileNameWithPath, SourceData)) @@ -823,13 +822,13 @@ Namespace Microsoft.VisualBasic.Tests.VB Using TestBase As New FileIOTests Dim SourceFileNameWithPath As String = CreateTestFile(TestBase, SourceData) Dim DestinationFileNameWithPath As String = IO.Path.Combine(TestBase.TestDirectory, "Select_Skip_this_file") - FileSystem.MoveFile(SourceFileNameWithPath, DestinationFileNameWithPath, showUI:=UIOption.AllDialogs, onUserCancel:=UICancelOption.DoNothing) + FileIO.FileSystem.MoveFile(SourceFileNameWithPath, DestinationFileNameWithPath, showUI:=UIOption.AllDialogs, onUserCancel:=UICancelOption.DoNothing) Assert.False(IO.File.Exists(SourceFileNameWithPath)) Assert.True(IO.File.Exists(DestinationFileNameWithPath)) Assert.True(HasExpectedData(DestinationFileNameWithPath, SourceData)) SourceFileNameWithPath = DestinationFileNameWithPath DestinationFileNameWithPath = CreateTestFile(TestBase, DestData) - FileSystem.MoveFile(SourceFileNameWithPath, DestinationFileNameWithPath, showUI:=UIOption.AllDialogs, onUserCancel:=UICancelOption.ThrowException) + FileIO.FileSystem.MoveFile(SourceFileNameWithPath, DestinationFileNameWithPath, showUI:=UIOption.AllDialogs, onUserCancel:=UICancelOption.ThrowException) ' Make sure we did not override existing file Assert.True(HasExpectedData(DestinationFileNameWithPath, DestData)) Assert.True(IO.File.Exists(SourceFileNameWithPath)) @@ -840,21 +839,21 @@ Namespace Microsoft.VisualBasic.Tests.VB Public Shared Sub RenameDirectory_Directory_NewName() Using TestBase As New FileIOTests ' If directory does not point to an existing directory. - Assert.Throws(Of IO.DirectoryNotFoundException)(Sub() FileSystem.RenameDirectory(IO.Path.Combine(TestBase.TestDirectory, "DoesNotExistDirectory"), "NewDirectory")) + Assert.Throws(Of IO.DirectoryNotFoundException)(Sub() FileIO.FileSystem.RenameDirectory(IO.Path.Combine(TestBase.TestDirectory, "DoesNotExistDirectory"), "NewDirectory")) Dim OrigDirectoryWithPath As String = IO.Path.Combine(TestBase.TestDirectory, "OriginalDirectory") IO.Directory.CreateDirectory(OrigDirectoryWithPath) ' If newName is Nothing or Empty String. - Assert.Throws(Of ArgumentNullException)(Sub() FileSystem.RenameDirectory(OrigDirectoryWithPath, "")) + Assert.Throws(Of ArgumentNullException)(Sub() FileIO.FileSystem.RenameDirectory(OrigDirectoryWithPath, "")) Dim DirectoryNameWithPath As String = IO.Path.Combine(TestBase.TestDirectory, "DoesNotExist") ' If contains path information. - Assert.Throws(Of ArgumentException)(Sub() FileSystem.RenameDirectory(OrigDirectoryWithPath, DirectoryNameWithPath)) - FileSystem.RenameDirectory(OrigDirectoryWithPath, "NewFDirectory") + Assert.Throws(Of ArgumentException)(Sub() FileIO.FileSystem.RenameDirectory(OrigDirectoryWithPath, DirectoryNameWithPath)) + FileIO.FileSystem.RenameDirectory(OrigDirectoryWithPath, "NewFDirectory") Dim NewFDirectoryPath As String = IO.Path.Combine(TestBase.TestDirectory, "NewFDirectory") Assert.True(IO.Directory.Exists(NewFDirectoryPath)) Assert.False(IO.Directory.Exists(OrigDirectoryWithPath)) ' If directory points to a root directory or if there's an existing directory or an existing file with the same name. IO.Directory.CreateDirectory(OrigDirectoryWithPath) - Assert.Throws(Of IO.IOException)(Sub() FileSystem.RenameDirectory(NewFDirectoryPath, "OriginalDirectory")) + Assert.Throws(Of IO.IOException)(Sub() FileIO.FileSystem.RenameDirectory(NewFDirectoryPath, "OriginalDirectory")) End Using End Sub @@ -862,21 +861,21 @@ Namespace Microsoft.VisualBasic.Tests.VB Public Shared Sub RenameFile_File_NewName() Using TestBase As New FileIOTests ' If file does not point to an existing file. - Assert.Throws(Of IO.FileNotFoundException)(Sub() FileSystem.RenameFile(IO.Path.Combine(TestBase.TestDirectory, "DoesNotExistFile"), "NewFile")) + Assert.Throws(Of IO.FileNotFoundException)(Sub() FileIO.FileSystem.RenameFile(IO.Path.Combine(TestBase.TestDirectory, "DoesNotExistFile"), "NewFile")) Dim OrigFileWithPath As String = CreateTestFile(TestBase, SourceData) Dim ExistingFileWithPath As String = CreateTestFile(TestBase, DestData) ' If newName is Nothing or Empty String. - Assert.Throws(Of ArgumentNullException)(Sub() FileSystem.RenameFile(OrigFileWithPath, "")) + Assert.Throws(Of ArgumentNullException)(Sub() FileIO.FileSystem.RenameFile(OrigFileWithPath, "")) ' If contains path information. - Assert.Throws(Of ArgumentException)(Sub() FileSystem.RenameFile(OrigFileWithPath, ExistingFileWithPath)) - FileSystem.RenameFile(OrigFileWithPath, "NewFile") + Assert.Throws(Of ArgumentException)(Sub() FileIO.FileSystem.RenameFile(OrigFileWithPath, ExistingFileWithPath)) + FileIO.FileSystem.RenameFile(OrigFileWithPath, "NewFile") Dim NewFileWithPath As String = IO.Path.Combine(TestBase.TestDirectory, "NewFile") Assert.True(IO.File.Exists(NewFileWithPath)) Assert.False(IO.File.Exists(OrigFileWithPath)) ' If there's an existing directory or an existing file with the same name. - Assert.Throws(Of IO.IOException)(Sub() FileSystem.RenameFile(NewFileWithPath, "NewFile")) + Assert.Throws(Of IO.IOException)(Sub() FileIO.FileSystem.RenameFile(NewFileWithPath, "NewFile")) IO.Directory.CreateDirectory(IO.Path.Combine(TestBase.TestDirectory, "NewFDirectory")) - Assert.Throws(Of IO.IOException)(Sub() FileSystem.RenameFile(NewFileWithPath, "NewFDirectory")) + Assert.Throws(Of IO.IOException)(Sub() FileIO.FileSystem.RenameFile(NewFileWithPath, "NewFDirectory")) End Using End Sub diff --git a/src/Microsoft.VisualBasic.Core/tests/VB/Microsoft.VisualBasic.VB.Core.Tests.vbproj b/src/Microsoft.VisualBasic.Core/tests/VB/Microsoft.VisualBasic.VB.Core.Tests.vbproj index cfa3c78cca22..8a6756612c8d 100644 --- a/src/Microsoft.VisualBasic.Core/tests/VB/Microsoft.VisualBasic.VB.Core.Tests.vbproj +++ b/src/Microsoft.VisualBasic.Core/tests/VB/Microsoft.VisualBasic.VB.Core.Tests.vbproj @@ -7,7 +7,6 @@ - From 224e16d1e88baf45ce53388fe7fd0f3e6673ee88 Mon Sep 17 00:00:00 2001 From: Jim Demis <10913919+jimdemis@users.noreply.github.com> Date: Sat, 27 Apr 2019 01:33:31 +0300 Subject: [PATCH 071/607] Fixes relative path at configSource on linux (#37146) --- .../Configuration/BaseConfigurationRecord.cs | 10 +++- .../src/System/Configuration/UrlPath.cs | 8 +-- .../System/Configuration/AppSettingsTests.cs | 55 +++++++++++++++++++ .../System/Configuration/UrlPathTests.cs | 24 +++++++- 4 files changed, 89 insertions(+), 8 deletions(-) diff --git a/src/System.Configuration.ConfigurationManager/src/System/Configuration/BaseConfigurationRecord.cs b/src/System.Configuration.ConfigurationManager/src/System/Configuration/BaseConfigurationRecord.cs index 9e772e63c4a2..f6f91f3f06c7 100644 --- a/src/System.Configuration.ConfigurationManager/src/System/Configuration/BaseConfigurationRecord.cs +++ b/src/System.Configuration.ConfigurationManager/src/System/Configuration/BaseConfigurationRecord.cs @@ -3218,12 +3218,16 @@ internal static string NormalizeConfigSource(string configSource, IConfigErrorIn if (trimmedConfigSource.Length != configSource.Length) throw new ConfigurationErrorsException(SR.Config_source_invalid_format, errorInfo); - if (configSource.IndexOf('/') != -1) // string.Contains(char) is .NetCore2.1+ specific - throw new ConfigurationErrorsException(SR.Config_source_invalid_chars, errorInfo); - if (string.IsNullOrEmpty(configSource) || Path.IsPathRooted(configSource)) throw new ConfigurationErrorsException(SR.Config_source_invalid_format, errorInfo); + if (configSource.IndexOf('\\') != -1 || configSource.IndexOf('/') != -1) // string.Contains(char) is .NetCore2.1+ specific + { + string newConfigSource = configSource.Replace('\\', '/'); + if (!ConfigPathUtility.IsValid(newConfigSource)) + throw new ConfigurationErrorsException(SR.Config_source_invalid_format, errorInfo); + } + return configSource; } diff --git a/src/System.Configuration.ConfigurationManager/src/System/Configuration/UrlPath.cs b/src/System.Configuration.ConfigurationManager/src/System/Configuration/UrlPath.cs index 913dbd6deaf9..e33ae0dea20e 100644 --- a/src/System.Configuration.ConfigurationManager/src/System/Configuration/UrlPath.cs +++ b/src/System.Configuration.ConfigurationManager/src/System/Configuration/UrlPath.cs @@ -29,10 +29,10 @@ internal static bool IsEqualOrSubdirectory(string dir, string subdir) // Compare up to but not including trailing backslash int lDir = dir.Length; - if (dir[lDir - 1] == '\\') lDir -= 1; + if (dir[lDir - 1] == '\\' || dir[lDir - 1] == '/') lDir -= 1; int lSubdir = subdir.Length; - if (subdir[lSubdir - 1] == '\\') lSubdir -= 1; + if (subdir[lSubdir - 1] == '\\' || dir[lDir - 1] == '/') lSubdir -= 1; if (lSubdir < lDir) return false; @@ -41,7 +41,7 @@ internal static bool IsEqualOrSubdirectory(string dir, string subdir) return false; // Check subdir that character following length of dir is a backslash - return (lSubdir <= lDir) || (subdir[lDir] == '\\'); + return (lSubdir <= lDir) || (subdir[lDir] == '\\') || (subdir[lDir] == '/'); } // NOTE: This function is also present in fx\src\xsp\system\web\util\urlpath.cs @@ -136,4 +136,4 @@ internal static string ConvertFileNameToUrl(string fileName) return newFileName; } } -} \ No newline at end of file +} diff --git a/src/System.Configuration.ConfigurationManager/tests/System/Configuration/AppSettingsTests.cs b/src/System.Configuration.ConfigurationManager/tests/System/Configuration/AppSettingsTests.cs index b058bf1b8543..73c71a048e75 100644 --- a/src/System.Configuration.ConfigurationManager/tests/System/Configuration/AppSettingsTests.cs +++ b/src/System.Configuration.ConfigurationManager/tests/System/Configuration/AppSettingsTests.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System.Collections.Generic; using System.Configuration; using System.IO; using Xunit; @@ -105,5 +106,59 @@ public void AppSettingsCannotLoadFromUser() Assert.Throws(() => config.AppSettings); } } + + public static string AppSettingsConfig = +@" + + +"; + + [Fact] + public void AppSettingsCannotLoadFromConfigSource() + { + using (var tempConfig = new TempConfig(TestData.EmptyConfig)) + { + const string SubDirectory = "Config"; + const string AppConfigFileName = "tempAppConfig.config"; + string tempConfigDirectory = Path.Combine(Path.GetDirectoryName(tempConfig.ConfigPath), SubDirectory); + using (var tempDirectory = new TempDirectory(tempConfigDirectory)) + { + // set configSource and save the config + var config = ConfigurationManager.OpenExeConfiguration(tempConfig.ExePath); + config.AppSettings.SectionInformation.ConfigSource = Path.Combine(SubDirectory, AppConfigFileName); + config.Save(); + + // write temporary appConfig + var tempAppConfigPath = Path.Combine(tempConfigDirectory, AppConfigFileName); + File.WriteAllText(tempAppConfigPath, AppSettingsConfig); + + // load config and test the appSettings + config = ConfigurationManager.OpenExeConfiguration(tempConfig.ExePath); + Assert.NotEmpty(config.AppSettings.Settings); + Assert.Equal("AppSettingsValue", config.AppSettings.Settings["AppSettingsKey"].Value); + } + } + } + + public static IEnumerable ConfigPaths = new List() + { + new object[] { @"../Config/foo.config" }, + new object[] { @"..\Config\foo.config" }, + new object[] { @"\Config\foo.config" }, + new object[] { @"/Config/foo.config" }, + new object[] { @"\..\Config\foo.config" }, + new object[] { @"/../Config/foo.config" }, + }; + + [Theory] + [MemberData(nameof(ConfigPaths))] + public void AppSettingsInvalidConfigSourcePath_Throws(string configPath) + { + using (var tempConfig = new TempConfig(TestData.EmptyConfig)) + { + var config = ConfigurationManager.OpenExeConfiguration(tempConfig.ExePath); + Assert.ThrowsAny(() => config.AppSettings.SectionInformation.ConfigSource = configPath); + } + } } } diff --git a/src/System.Configuration.ConfigurationManager/tests/System/Configuration/UrlPathTests.cs b/src/System.Configuration.ConfigurationManager/tests/System/Configuration/UrlPathTests.cs index bfe754792dc9..9846d3b588a4 100644 --- a/src/System.Configuration.ConfigurationManager/tests/System/Configuration/UrlPathTests.cs +++ b/src/System.Configuration.ConfigurationManager/tests/System/Configuration/UrlPathTests.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System.Collections.Generic; using System.Configuration; using System.IO; using Xunit; @@ -145,5 +146,26 @@ public void IsEqualOrSubDirectory_Equal_SecondHasBackslash() bool test = UrlPath.IsEqualOrSubdirectory("C:\\Directory", "C:\\Directory\\"); Assert.True(test); } + + public static IEnumerable UnixDirectories = new List() + { + new object[] { "/dir/sub", "/dir", false }, // no slash + new object[] { "/dir", "/dir/sub", true }, // no slash + new object[] { "/dir/", "/dir/sub/", true }, // both slash + new object[] { "/dir/", "/dir/sub", true }, // dir slash + new object[] { "/dir", "/dir/sub/", true }, // subdir slash + new object[] { "/dir", "/dir", true }, // no slashes + new object[] { "/var/", "/var/", true }, // both slashes + new object[] { "/var/", "/var", true }, // first has slash + new object[] { "/var", "/var/", true }, // second has slash + }; + + [Theory] + [MemberData(nameof(UnixDirectories))] + public void IsEqualOrSubDirectory_UnixPath(string dir, string subdir, bool expected) + { + bool actual = UrlPath.IsEqualOrSubdirectory(dir, subdir); + Assert.Equal(expected, actual); + } } -} \ No newline at end of file +} From b35cd0db472434cc5991f305de4557d51991b4a4 Mon Sep 17 00:00:00 2001 From: madmir <1119735+madmir@users.noreply.github.com> Date: Sat, 27 Apr 2019 01:07:54 +0200 Subject: [PATCH 072/607] Improve Utf8JsonWriter code coverage (#36811) * Added test for expected argument exception when property name or value arguments reach MaxTokenSize --- .../tests/Utf8JsonWriterTests.cs | 77 +++++++++++++++++++ 1 file changed, 77 insertions(+) diff --git a/src/System.Text.Json/tests/Utf8JsonWriterTests.cs b/src/System.Text.Json/tests/Utf8JsonWriterTests.cs index c965634d6ec2..6f7305277049 100644 --- a/src/System.Text.Json/tests/Utf8JsonWriterTests.cs +++ b/src/System.Text.Json/tests/Utf8JsonWriterTests.cs @@ -8,6 +8,7 @@ using Newtonsoft.Json; using System.Globalization; using System.Threading.Tasks; +using System.IO.Pipelines; namespace System.Text.Json.Tests { @@ -3403,6 +3404,82 @@ private static void WriteTooLargeHelper(JsonWriterOptions options, ReadOnlySpan< jsonUtf8.Flush(); } + [ConditionalTheory(nameof(IsX64))] + [OuterLoop] + [InlineData(true, true)] + [InlineData(false, true)] + [InlineData(true, false)] + [InlineData(false, false)] + public void WriteTooLargeArguments(bool formatted, bool skipValidation) + { + var options = new JsonWriterOptions { Indented = formatted, SkipValidation = skipValidation }; + + byte[] bytesTooLarge; + char[] charsTooLarge; + var bytes = new byte[5]; + var chars = new char[5]; + + try + { + bytesTooLarge = new byte[400_000_000]; + charsTooLarge = new char[400_000_000]; + } + catch (OutOfMemoryException) + { + return; + } + + bytesTooLarge.AsSpan().Fill((byte)'a'); + charsTooLarge.AsSpan().Fill('a'); + bytes.AsSpan().Fill((byte)'a'); + chars.AsSpan().Fill('a'); + + var pipe = new Pipe(); + var output = pipe.Writer; + using var jsonUtf8 = new Utf8JsonWriter(output, options); + + jsonUtf8.WriteStartArray(); + + Assert.Throws(() => jsonUtf8.WriteStartObject(bytesTooLarge)); + Assert.Throws(() => jsonUtf8.WriteString(bytesTooLarge, bytes)); + Assert.Throws(() => jsonUtf8.WriteString(bytes, bytesTooLarge)); + Assert.Throws(() => jsonUtf8.WriteString(bytesTooLarge, chars)); + Assert.Throws(() => jsonUtf8.WriteString(chars, bytesTooLarge)); + Assert.Throws(() => jsonUtf8.WriteString(bytesTooLarge, new DateTime(2015, 11, 9))); + Assert.Throws(() => jsonUtf8.WriteString(bytesTooLarge, new DateTimeOffset(new DateTime(2015, 11, 9)))); + Assert.Throws(() => jsonUtf8.WriteString(bytesTooLarge, Guid.NewGuid())); + Assert.Throws(() => jsonUtf8.WriteStringValue(bytesTooLarge)); + Assert.Throws(() => jsonUtf8.WriteCommentValue(bytesTooLarge)); + Assert.Throws(() => jsonUtf8.WriteNumber(bytesTooLarge, 10m)); + Assert.Throws(() => jsonUtf8.WriteNumber(bytesTooLarge, 10.1)); + Assert.Throws(() => jsonUtf8.WriteNumber(bytesTooLarge, 10.1f)); + Assert.Throws(() => jsonUtf8.WriteNumber(bytesTooLarge, 12345678901)); + Assert.Throws(() => jsonUtf8.WriteNumber(bytesTooLarge, (ulong)12345678901)); + Assert.Throws(() => jsonUtf8.WriteBoolean(bytesTooLarge, true)); + Assert.Throws(() => jsonUtf8.WriteNull(bytesTooLarge)); + + Assert.Throws(() => jsonUtf8.WriteStartObject(charsTooLarge)); + Assert.Throws(() => jsonUtf8.WriteString(charsTooLarge, chars)); + Assert.Throws(() => jsonUtf8.WriteString(chars, charsTooLarge)); + Assert.Throws(() => jsonUtf8.WriteString(charsTooLarge, bytes)); + Assert.Throws(() => jsonUtf8.WriteString(bytes, charsTooLarge)); + Assert.Throws(() => jsonUtf8.WriteString(charsTooLarge, new DateTime(2015, 11, 9))); + Assert.Throws(() => jsonUtf8.WriteString(charsTooLarge, new DateTimeOffset(new DateTime(2015, 11, 9)))); + Assert.Throws(() => jsonUtf8.WriteString(charsTooLarge, Guid.NewGuid())); + Assert.Throws(() => jsonUtf8.WriteStringValue(charsTooLarge)); + Assert.Throws(() => jsonUtf8.WriteCommentValue(charsTooLarge)); + Assert.Throws(() => jsonUtf8.WriteNumber(charsTooLarge, 10m)); + Assert.Throws(() => jsonUtf8.WriteNumber(charsTooLarge, 10.1)); + Assert.Throws(() => jsonUtf8.WriteNumber(charsTooLarge, 10.1f)); + Assert.Throws(() => jsonUtf8.WriteNumber(charsTooLarge, 12345678901)); + Assert.Throws(() => jsonUtf8.WriteNumber(charsTooLarge, (ulong)12345678901)); + Assert.Throws(() => jsonUtf8.WriteBoolean(charsTooLarge, true)); + Assert.Throws(() => jsonUtf8.WriteNull(charsTooLarge)); + + jsonUtf8.Flush(); + Assert.Equal(1, jsonUtf8.BytesCommitted); + } + private static string GetHelloWorldExpectedString(bool prettyPrint, string propertyName, string value) { var ms = new MemoryStream(); From e6a090157875122b0aeacd1e05741fdc3c143bf0 Mon Sep 17 00:00:00 2001 From: BrennanConroy Date: Fri, 26 Apr 2019 16:24:42 -0700 Subject: [PATCH 073/607] Don't copy state unnecessarily (#37206) --- .../Text/Json/Serialization/JsonSerializer.Read.Span.cs | 4 ++-- .../Text/Json/Serialization/JsonSerializer.Read.String.cs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.Span.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.Span.cs index d39c8b4d7e18..8dd266a9fc48 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.Span.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.Span.cs @@ -57,9 +57,9 @@ private static object ParseCore(ReadOnlySpan utf8Json, Type returnType, Js var reader = new Utf8JsonReader(utf8Json, isFinalBlock: true, readerState); object result = ReadCore(returnType, options, ref reader); - readerState = reader.CurrentState; - if (readerState.BytesConsumed != utf8Json.Length) + if (reader.BytesConsumed != utf8Json.Length) { + readerState = reader.CurrentState; throw new JsonReaderException(SR.Format(SR.DeserializeDataRemaining, utf8Json.Length, utf8Json.Length - readerState.BytesConsumed), readerState); } diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.String.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.String.cs index 1e58137bd4d8..37aa8edf3b92 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.String.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.String.cs @@ -73,9 +73,9 @@ private static object ParseCore(string json, Type returnType, JsonSerializerOpti var reader = new Utf8JsonReader(jsonBytes, isFinalBlock: true, readerState); object result = ReadCore(returnType, options, ref reader); - readerState = reader.CurrentState; - if (readerState.BytesConsumed != jsonBytes.Length) + if (reader.BytesConsumed != jsonBytes.Length) { + readerState = reader.CurrentState; throw new JsonReaderException(SR.Format(SR.DeserializeDataRemaining, jsonBytes.Length, jsonBytes.Length - readerState.BytesConsumed), readerState); } From 61024c30b966ee63c357a491370a2daf94c4c42f Mon Sep 17 00:00:00 2001 From: Jose Perez Rodriguez Date: Fri, 26 Apr 2019 16:49:25 -0700 Subject: [PATCH 074/607] Adding System.Text.Json OOB package (#37129) * Adding System.Text.Json OOB package * Removing SourceRewriter dependency as it won't be used by the repo any longer * Address PR Feedback --- eng/Tools.props | 1 - eng/Version.Details.xml | 4 - eng/Versions.props | 1 - src/System.Text.Json/Directory.Build.props | 4 - src/System.Text.Json/System.Text.Json.sln | 8 +- .../pkg/Microsoft.Bcl.Json.Sources.pkgproj | 31 ----- .../pkg/System.Text.Json.pkgproj | 18 +++ src/System.Text.Json/porting_guide/README.md | 2 +- src/System.Text.Json/ref/Configurations.props | 7 +- .../ref/System.Text.Json.csproj | 4 +- src/System.Text.Json/source_package/README.md | 111 +----------------- src/System.Text.Json/src/Configurations.props | 7 +- .../src/System.Text.Json.csproj | 34 +----- .../tests/System.Text.Json.Tests.csproj | 6 +- 14 files changed, 37 insertions(+), 201 deletions(-) delete mode 100644 src/System.Text.Json/pkg/Microsoft.Bcl.Json.Sources.pkgproj create mode 100644 src/System.Text.Json/pkg/System.Text.Json.pkgproj diff --git a/eng/Tools.props b/eng/Tools.props index 6cd5fb9f7829..79a3e0b9493b 100644 --- a/eng/Tools.props +++ b/eng/Tools.props @@ -23,7 +23,6 @@ - diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index b7774ec653ab..6ecb0109cac9 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -50,10 +50,6 @@ https://github.com/dotnet/arcade d37270268a65592cae630f1b979b70f74d4614dd - - https://github.com/dotnet/arcade - d37270268a65592cae630f1b979b70f74d4614dd - https://github.com/dotnet/arcade d37270268a65592cae630f1b979b70f74d4614dd diff --git a/eng/Versions.props b/eng/Versions.props index 88b9f4840959..80fcc7d8cf53 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -24,7 +24,6 @@ 1.0.0-beta.19225.5 - 1.0.0-beta.19225.5 1.0.0-beta.19225.5 1.0.0-beta.19225.5 1.0.0-beta.19225.5 diff --git a/src/System.Text.Json/Directory.Build.props b/src/System.Text.Json/Directory.Build.props index b07417c839b1..8ec7ebd44ccc 100644 --- a/src/System.Text.Json/Directory.Build.props +++ b/src/System.Text.Json/Directory.Build.props @@ -5,9 +5,5 @@ Open true true - - - <_sourcePackageName>Microsoft.Bcl.Json.Sources - <_packagePathToSources>contentFiles/cs/netstandard2.0/$(_sourcePackageName) diff --git a/src/System.Text.Json/System.Text.Json.sln b/src/System.Text.Json/System.Text.Json.sln index 6042d76954f6..7519faffb15a 100644 --- a/src/System.Text.Json/System.Text.Json.sln +++ b/src/System.Text.Json/System.Text.Json.sln @@ -30,10 +30,10 @@ Global {5F553243-042C-45C0-8E49-C739131E11C3}.Debug|Any CPU.Build.0 = netcoreapp-Debug|Any CPU {5F553243-042C-45C0-8E49-C739131E11C3}.Release|Any CPU.ActiveCfg = netcoreapp-Release|Any CPU {5F553243-042C-45C0-8E49-C739131E11C3}.Release|Any CPU.Build.0 = netcoreapp-Release|Any CPU - {79E7EE4E-E8DF-4D67-B103-6930DAAF6EF4}.Debug|Any CPU.ActiveCfg = netcoreapp-Windows_NT-Debug|Any CPU - {79E7EE4E-E8DF-4D67-B103-6930DAAF6EF4}.Debug|Any CPU.Build.0 = netcoreapp-Windows_NT-Debug|Any CPU - {79E7EE4E-E8DF-4D67-B103-6930DAAF6EF4}.Release|Any CPU.ActiveCfg = netcoreapp-Windows_NT-Release|Any CPU - {79E7EE4E-E8DF-4D67-B103-6930DAAF6EF4}.Release|Any CPU.Build.0 = netcoreapp-Windows_NT-Release|Any CPU + {79E7EE4E-E8DF-4D67-B103-6930DAAF6EF4}.Debug|Any CPU.ActiveCfg = netcoreapp-Debug|Any CPU + {79E7EE4E-E8DF-4D67-B103-6930DAAF6EF4}.Debug|Any CPU.Build.0 = netcoreapp-Debug|Any CPU + {79E7EE4E-E8DF-4D67-B103-6930DAAF6EF4}.Release|Any CPU.ActiveCfg = netcoreapp-Release|Any CPU + {79E7EE4E-E8DF-4D67-B103-6930DAAF6EF4}.Release|Any CPU.Build.0 = netcoreapp-Release|Any CPU {6371299B-8F39-4A0A-A9CD-70F80FF205F6}.Debug|Any CPU.ActiveCfg = netcoreapp-Debug|Any CPU {6371299B-8F39-4A0A-A9CD-70F80FF205F6}.Debug|Any CPU.Build.0 = netcoreapp-Debug|Any CPU {6371299B-8F39-4A0A-A9CD-70F80FF205F6}.Release|Any CPU.ActiveCfg = netcoreapp-Release|Any CPU diff --git a/src/System.Text.Json/pkg/Microsoft.Bcl.Json.Sources.pkgproj b/src/System.Text.Json/pkg/Microsoft.Bcl.Json.Sources.pkgproj deleted file mode 100644 index 7728cd6fd26a..000000000000 --- a/src/System.Text.Json/pkg/Microsoft.Bcl.Json.Sources.pkgproj +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - true - - true - - - - - - - <_ProjectsToBuild Include="../src/System.Text.Json.csproj" - UndefineProperties="Configuration;BuildConfiguration" - AdditionalProperties="TargetGroup=netstandard;BuildConfiguration=netstandard" /> - - - - - - - - - \ No newline at end of file diff --git a/src/System.Text.Json/pkg/System.Text.Json.pkgproj b/src/System.Text.Json/pkg/System.Text.Json.pkgproj new file mode 100644 index 000000000000..4e75b526b0a6 --- /dev/null +++ b/src/System.Text.Json/pkg/System.Text.Json.pkgproj @@ -0,0 +1,18 @@ + + + + + net461;netcoreapp2.0;uap10.0.16299;$(AllXamarinFrameworks) + + + + + .NETCoreApp;UAP + + + + \ No newline at end of file diff --git a/src/System.Text.Json/porting_guide/README.md b/src/System.Text.Json/porting_guide/README.md index f26f06d09dd7..c4176bf5b17e 100644 --- a/src/System.Text.Json/porting_guide/README.md +++ b/src/System.Text.Json/porting_guide/README.md @@ -123,7 +123,7 @@ static double ParseJson() ### Multi-Targeting Various TFMs -* If possible, you should target .NET Core 3.0 and get the in-box `System.Text.Json` APIs. However, if you need to support netstandard2.0 (for example, if you are a library developer), you can try to use the **unsupported** source package (see guidance [here](https://github.com/dotnet/corefx/tree/master/src/System.Text.Json/source_package)). If, however, you need to target an older platform or standard, or for some other reason would like to continue to use `Newtonsoft.Json` on certain platforms, you can try to multi-target and have two implementations. However, this is not trivial and would require some `#ifdefs` and source duplication especially if you heavily rely on features that only exist in `Newtonsoft.Json`. One pattern to try to share as much code as possible is to create a `ref struct` wrapper around types like `Utf8JsonReader`/`JsonTextReader` and `Utf8JsonWriter`/`JsonTextWriter` to unify the public surface area used while isolating the behavioral differences. This way you can isolate the changes mainly to the construction of the type (along with passing the new type around by ref). In fact, that is the pattern we currently follow in [core-setup](https://github.com/dotnet/core-setup): +* If possible, you should target .NET Core 3.0 and get the in-box `System.Text.Json` APIs. However, if you need to support netstandard2.0 (for example, if you are a library developer), you can use our NuGet package which is netstandard2.0 compatible. If, however, you need to target an older platform or standard, or for some other reason would like to continue to use `Newtonsoft.Json` on certain platforms, you can try to multi-target and have two implementations. However, this is not trivial and would require some `#ifdefs` and source duplication especially if you heavily rely on features that only exist in `Newtonsoft.Json`. One pattern to try to share as much code as possible is to create a `ref struct` wrapper around types like `Utf8JsonReader`/`JsonTextReader` and `Utf8JsonWriter`/`JsonTextWriter` to unify the public surface area used while isolating the behavioral differences. This way you can isolate the changes mainly to the construction of the type (along with passing the new type around by ref). In fact, that is the pattern we currently follow in [core-setup](https://github.com/dotnet/core-setup): - [UnifiedJsonReader.Utf8JsonReader.cs](https://github.com/dotnet/core-setup/blob/45f9401bf62faf0d3446cfd8681d35cc3487367a/src/managed/Microsoft.Extensions.DependencyModel/UnifiedJsonReader.Utf8JsonReader.cs) - [UnifiedJsonReader.JsonTextReader.cs](https://github.com/dotnet/core-setup/blob/45f9401bf62faf0d3446cfd8681d35cc3487367a/src/managed/Microsoft.Extensions.DependencyModel/UnifiedJsonReader.JsonTextReader.cs) - [UnifiedJsonWriter.Utf8JsonWriter.cs](https://github.com/dotnet/core-setup/blob/45f9401bf62faf0d3446cfd8681d35cc3487367a/src/managed/Microsoft.Extensions.DependencyModel/UnifiedJsonWriter.Utf8JsonWriter.cs) diff --git a/src/System.Text.Json/ref/Configurations.props b/src/System.Text.Json/ref/Configurations.props index b6bee41591b6..e0948db73ae7 100644 --- a/src/System.Text.Json/ref/Configurations.props +++ b/src/System.Text.Json/ref/Configurations.props @@ -1,11 +1,12 @@  + + netstandard; + + $(PackageConfigurations) netcoreapp; uap; - - - netstandard; \ No newline at end of file diff --git a/src/System.Text.Json/ref/System.Text.Json.csproj b/src/System.Text.Json/ref/System.Text.Json.csproj index 0914d098732b..60c31da2718b 100644 --- a/src/System.Text.Json/ref/System.Text.Json.csproj +++ b/src/System.Text.Json/ref/System.Text.Json.csproj @@ -1,7 +1,7 @@  {6371299B-8F39-4A0A-A9CD-70F80FF205F6} - netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release + netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release;uap-Debug;uap-Release @@ -15,4 +15,4 @@ - + \ No newline at end of file diff --git a/src/System.Text.Json/source_package/README.md b/src/System.Text.Json/source_package/README.md index cdacdb531e86..bf48e9484de7 100644 --- a/src/System.Text.Json/source_package/README.md +++ b/src/System.Text.Json/source_package/README.md @@ -1,112 +1,3 @@ # System.Text.Json Source Package -## Overview - -* To support consumption of the `System.Text.Json` library outside of .NET Core 3.0+, we have produced a source package, `Microsoft.Bcl.Json.Sources`. - - This package is unsupported and is only meant for advanced scenarios. Ideally, the project can target .NET Core 3.0 and get the inbox library. - - It is intentionally not easy to consume such a package since we wanted to avoid any tooling or packaging magic to predict the user's intention. - For simplicity, we recommended that you treat this like any other source file within your application or library. - - We recommend that you do **NOT** modify the sources within the source package. Since they are consumed as a NuGet package, your changes would not be local to your project and will likely be lost on a package restore. - -## Known Issues and Workarounds - -### Language Version - -* The `System.Text.Json` sources are built using C# 7.3 language features and hence you will likely see the following errors: - - `error CS8107: Feature 'default literal' is not available in C# 7.0. Please use language version 7.1 or greater.` - - `error CS8107: Feature 'ref structs' is not available in C# 7.0. Please use language version 7.2 or greater.` - - `error CS8320: Feature 'extensible fixed statement' is not available in C# 7.2. Please use language version 7.3 or greater.` - -* Therefore, it is recommended that you update your compiler to one that supports C# 7.3+ and add the following attribute to your project: - - `latest` OR `7.3` - -### Unsafe Code - -* The `System.Text.Json` sources are built using some unsafe code and hence you will likely see the following error: - - `error CS0227: Unsafe code may only appear if compiling with /unsafe` - -* Therefore, you will need the following attribute in your project (or something equivalent): - - `true` - -### Missing Package References - -* The `System.Text.Json` sources depend on the following packages: - - `System.Memory` - - `System.Runtime.CompilerServices.Unsafe` - - `System.Buffers` - - `System.Numerics.Vectors` - -* You will likely see errors like the following when you don't have the required packages referenced in your application: - - `error CS0103: The name 'Unsafe' does not exist in the current context` - - `error CS0246: The type or namespace name 'ReadOnlySpan<>' could not be found (are you missing a using directive or an assembly reference?)` - -* Therefore, you will need to add the following package references in your project: - - `` - - `` - - The System.Memory package transitively brings in the other dependencies. - -### CLS Compliance - -* The `System.Text.Json` sources are built as part of a CLS Compliant library. Hence, they contain the `CLSCompliant` attributes in certain places. - You might see warnings like the following (or errors if warnings are treated as errors): - - `warning CS3021: 'Utf8JsonWriter.WriteNumber(string, ulong, bool)' does not need a CLSCompliant attribute because the assembly does not have a CLSCompliant attribute` - -* You could either mark your project as CLSCompliant, or opt-out of this particular warning: - - `3021` OR `true` - -### Targeting .NET Core 3.0+ - -* The `System.Text.Json` library is built as part of .NET Core 3.0. If you reference this source package (unconditionally) and choose to target netcoreapp3.0 or higher, - you might see lots of type conflict warnings (or errors if warnings are treated as errors): - - `warning CS0436: The type 'JsonTokenType' in '...' conflicts with the imported type 'JsonTokenType' in 'System.Text.Json, Version=...'. Using the type defined in '...\microsoft.bcl.json.sources\...\JsonTokenType.cs'.` - -* You should not reference this package if you are targeting .NET Core 3.0 or higher. If you are multi-targeting, then only conditionally include the package reference. - Note that this applies to other package references that you include to fulfill the dependencies of the source package. - -### PrivateAssets - -* It is recommended that you mark your package reference as private so that this dependency does not accidentally leak outside of your package - to applications that might be consuming it (for example, visible within the `deps.json`). - ```csproj - - All - - ``` - -## Other Considerations - -### InternalsVisibleTo - -* Since the source package contains types marked as internal, please be intentional with the use of `InternalsVisibleTo`. - It is acceptable to use it where necessary but something we wanted to highlight as an area of consideration. - -## Sample Netstandard Library Project File - -```csproj - - - - netstandard2.0 - latest - true - - - 3021 - - - - - - - - - - All - - - - - - -``` +We are no longer producing the source package, and instead are shipping a System.Text.Json NuGet package which is compatible with netstandard2.0. Please visit [NuGet](https://www.nuget.org/packages/System.Text.Json/) in order to download it. \ No newline at end of file diff --git a/src/System.Text.Json/src/Configurations.props b/src/System.Text.Json/src/Configurations.props index d11c064f1e0e..45f47966c3a9 100644 --- a/src/System.Text.Json/src/Configurations.props +++ b/src/System.Text.Json/src/Configurations.props @@ -1,12 +1,9 @@  - netcoreapp-Unix; - netcoreapp-Windows_NT; - uap-Windows_NT; - - netstandard; + netcoreapp; + uap-Windows_NT; diff --git a/src/System.Text.Json/src/System.Text.Json.csproj b/src/System.Text.Json/src/System.Text.Json.csproj index 28d6bbc83b74..c377494d6e77 100644 --- a/src/System.Text.Json/src/System.Text.Json.csproj +++ b/src/System.Text.Json/src/System.Text.Json.csproj @@ -4,7 +4,7 @@ System.Text.Json true $(OutputPath)$(MSBuildProjectName).xml - netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release;netstandard-Debug;netstandard-Release + netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release @@ -163,34 +163,4 @@ - - - - - <_sourcePackageName>Microsoft.Bcl.Json.Sources - <_sourcePackageTargetLines> - @(EmbeddedResource->' - ', '') - - - - - -]]> - - <_targetsFileName>$(_sourcePackageName).targets - <_generatedSourcePackageTargetPath>$(IntermediateOutputPath)/$(_targetsFileName) - - - - - - <_sourceToExclude Include="@(Compile)" Condition="$([System.String]::Copy('%(Compile.Identity)').ToLower().EndsWith('assemblyinfo.cs'))" /> - <_sourceToPackage Include="@(Compile->'%(FullPath)')" PackagePath="contentFiles/cs/netstandard2.0/$(_sourcePackageName)/%(FileName)%(Extension)" Exclude="@(_sourceToExclude)" /> - <_sourceToPackage Condition="'%(Extension)' == '.resx'" Include="@(EmbeddedResource->'%(FullPath)')" PackagePath="build/netstandard2.0/%(FileName)%(Extension)" /> - <_sourceToPackage Include="$(_generatedSourcePackageTargetPath)" PackagePath="build/netstandard2.0/$(_targetsFileName)" /> - <_sourceToPackage Include="$(MSBuildThisFileDirectory)../source_package/README.md" PackagePath="build/netstandard2.0/README.md" /> - - - + \ No newline at end of file diff --git a/src/System.Text.Json/tests/System.Text.Json.Tests.csproj b/src/System.Text.Json/tests/System.Text.Json.Tests.csproj index fee73de090ec..49571147f644 100644 --- a/src/System.Text.Json/tests/System.Text.Json.Tests.csproj +++ b/src/System.Text.Json/tests/System.Text.Json.Tests.csproj @@ -1,7 +1,7 @@  {5F553243-042C-45C0-8E49-C739131E11C3} - netcoreapp-Debug;netcoreapp-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release;netstandard-Debug;netstandard-Release + netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release @@ -63,8 +63,8 @@ - + - + \ No newline at end of file From 4ff66e551b07802a4021d538633d77d3ee66ec89 Mon Sep 17 00:00:00 2001 From: Tanner Gooding Date: Fri, 26 Apr 2019 18:05:18 -0700 Subject: [PATCH 075/607] Fixing the logic in SystemNative_GetTimestampResolution to return the correct "ticks per second" (#37236) --- src/Native/Unix/System.Native/pal_time.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/Native/Unix/System.Native/pal_time.c b/src/Native/Unix/System.Native/pal_time.c index 11946d7fdf52..90665e7c9671 100644 --- a/src/Native/Unix/System.Native/pal_time.c +++ b/src/Native/Unix/System.Native/pal_time.c @@ -62,8 +62,11 @@ uint64_t SystemNative_GetTimestampResolution() return 0; } - uint64_t nanosecondsPerTick = ((uint64_t)(mtid.denom) / (uint64_t)(mtid.numer)); - return SecondsToNanoSeconds * nanosecondsPerTick; + // (numer / denom) gives you the nanoseconds per tick, so the below code + // computes the number of ticks per second. We explicitly do the multiplication + // first in order to help minimize the error that is produced by integer division. + + return (SecondsToNanoSeconds * (uint64_t)(mtid.denom)) / (uint64_t)(mtid.numer); #else struct timespec ts; @@ -73,7 +76,7 @@ uint64_t SystemNative_GetTimestampResolution() } uint64_t nanosecondsPerTick = ((uint64_t)(ts.tv_sec) * SecondsToNanoSeconds) + (uint64_t)(ts.tv_nsec); - return SecondsToNanoSeconds * nanosecondsPerTick; + return SecondsToNanoSeconds / nanosecondsPerTick; #endif } From b170c371b04ba58b342b3b001344de3964970bc8 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Sat, 27 Apr 2019 13:15:36 +0000 Subject: [PATCH 076/607] Update dependencies from https://github.com/dotnet/core-setup build 20190427.02 (#37243) - Microsoft.NETCore.App - 3.0.0-preview6-27627-02 - Microsoft.NETCore.DotNetHostPolicy - 3.0.0-preview6-27627-02 - Microsoft.NETCore.DotNetHost - 3.0.0-preview6-27627-02 --- eng/Version.Details.xml | 12 ++++++------ eng/Versions.props | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 6ecb0109cac9..f45b2a367444 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -14,17 +14,17 @@ - + https://github.com/dotnet/core-setup - ae2b1b87767c013397f31e0489b654705764db2f + dfdc7bc432fc67e1cba68176d664bff16c7fff84 - + https://github.com/dotnet/core-setup - ae2b1b87767c013397f31e0489b654705764db2f + dfdc7bc432fc67e1cba68176d664bff16c7fff84 - + https://github.com/dotnet/core-setup - ae2b1b87767c013397f31e0489b654705764db2f + dfdc7bc432fc67e1cba68176d664bff16c7fff84 https://github.com/dotnet/corefx diff --git a/eng/Versions.props b/eng/Versions.props index 80fcc7d8cf53..994de0150ed9 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -36,9 +36,9 @@ 2.2.0-beta.19225.5 1.0.0-beta.19225.5 - 3.0.0-preview6-27626-01 - 3.0.0-preview6-27626-01 - 3.0.0-preview6-27626-01 + 3.0.0-preview6-27627-02 + 3.0.0-preview6-27627-02 + 3.0.0-preview6-27627-02 3.0.0-preview6-27624-71 3.0.0-preview6-27624-71 From 9f5e380ca8bdaac1e369bcde9312449a5dd07e69 Mon Sep 17 00:00:00 2001 From: Dotnet-GitSync-Bot <45578709+Dotnet-GitSync-Bot@users.noreply.github.com> Date: Sat, 27 Apr 2019 07:51:20 -0700 Subject: [PATCH 077/607] Fix CoreLib build breaks (#37242) Signed-off-by: dotnet-bot --- .../System/Resources/ResourceReader.Core.cs | 8 ++++++ .../System/Resources/ResourceReader.cs | 25 +++++-------------- .../System/Resources/RuntimeResourceSet.cs | 1 + 3 files changed, 15 insertions(+), 19 deletions(-) diff --git a/src/Common/src/CoreLib/System/Resources/ResourceReader.Core.cs b/src/Common/src/CoreLib/System/Resources/ResourceReader.Core.cs index 9d25e45082c7..80958b46b913 100644 --- a/src/Common/src/CoreLib/System/Resources/ResourceReader.Core.cs +++ b/src/Common/src/CoreLib/System/Resources/ResourceReader.Core.cs @@ -2,6 +2,14 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable +using System.Collections.Generic; +using System.Diagnostics; +using System.IO; +using System.Reflection; +using System.Text; +using System.Threading; + namespace System.Resources { partial class ResourceReader diff --git a/src/Common/src/CoreLib/System/Resources/ResourceReader.cs b/src/Common/src/CoreLib/System/Resources/ResourceReader.cs index 510082d36d05..156007b14f24 100644 --- a/src/Common/src/CoreLib/System/Resources/ResourceReader.cs +++ b/src/Common/src/CoreLib/System/Resources/ResourceReader.cs @@ -3,31 +3,18 @@ // See the LICENSE file in the project root for more information. #nullable enable -/*============================================================ -** -** -** -** -** -** Purpose: Default way to read streams of resources on -** demand. -** -** Version 2 support on October 6, 2003 -** -===========================================================*/ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Diagnostics; +using System.IO; +using System.Text; namespace System.Resources #if RESOURCES_EXTENSIONS .Extensions #endif { - using System; - using System.IO; - using System.Text; - using System.Collections; - using System.Collections.Generic; - using System.Diagnostics; - #if RESOURCES_EXTENSIONS using ResourceReader = DeserializingResourceReader; #endif diff --git a/src/Common/src/CoreLib/System/Resources/RuntimeResourceSet.cs b/src/Common/src/CoreLib/System/Resources/RuntimeResourceSet.cs index dbd74b2493cc..00793c3e2b99 100644 --- a/src/Common/src/CoreLib/System/Resources/RuntimeResourceSet.cs +++ b/src/Common/src/CoreLib/System/Resources/RuntimeResourceSet.cs @@ -17,6 +17,7 @@ using System.Collections; using System.Collections.Generic; using System.Diagnostics; +using System.IO; namespace System.Resources #if RESOURCES_EXTENSIONS From ad4b12cbc4563b346f0de48fda06c41292650611 Mon Sep 17 00:00:00 2001 From: Jeremy Barton Date: Sat, 27 Apr 2019 11:47:35 -0700 Subject: [PATCH 078/607] Add Ubuntu 19.04 RID (#37233) --- .../runtime.compatibility.json | 65 +++++++++++++++++++ pkg/Microsoft.NETCore.Platforms/runtime.json | 29 +++++++++ .../runtimeGroups.props | 2 +- 3 files changed, 95 insertions(+), 1 deletion(-) diff --git a/pkg/Microsoft.NETCore.Platforms/runtime.compatibility.json b/pkg/Microsoft.NETCore.Platforms/runtime.compatibility.json index 64512cb82db9..4c398f887dd2 100644 --- a/pkg/Microsoft.NETCore.Platforms/runtime.compatibility.json +++ b/pkg/Microsoft.NETCore.Platforms/runtime.compatibility.json @@ -2945,6 +2945,71 @@ "any", "base" ], + "ubuntu.19.04": [ + "ubuntu.19.04", + "ubuntu", + "debian", + "linux", + "unix", + "any", + "base" + ], + "ubuntu.19.04-arm": [ + "ubuntu.19.04-arm", + "ubuntu.19.04", + "ubuntu-arm", + "ubuntu", + "debian-arm", + "debian", + "linux-arm", + "linux", + "unix-arm", + "unix", + "any", + "base" + ], + "ubuntu.19.04-arm64": [ + "ubuntu.19.04-arm64", + "ubuntu.19.04", + "ubuntu-arm64", + "ubuntu", + "debian-arm64", + "debian", + "linux-arm64", + "linux", + "unix-arm64", + "unix", + "any", + "base" + ], + "ubuntu.19.04-x64": [ + "ubuntu.19.04-x64", + "ubuntu.19.04", + "ubuntu-x64", + "ubuntu", + "debian-x64", + "debian", + "linux-x64", + "linux", + "unix-x64", + "unix", + "any", + "base" + ], + "ubuntu.19.04-x86": [ + "ubuntu.19.04-x86", + "ubuntu.19.04", + "ubuntu-x86", + "ubuntu", + "debian-x86", + "debian", + "linux-x86", + "linux", + "unix-x86", + "unix", + "any", + "base" + ], "unix": [ "unix", "any", diff --git a/pkg/Microsoft.NETCore.Platforms/runtime.json b/pkg/Microsoft.NETCore.Platforms/runtime.json index f9ee87f9febf..5c6e6987189f 100644 --- a/pkg/Microsoft.NETCore.Platforms/runtime.json +++ b/pkg/Microsoft.NETCore.Platforms/runtime.json @@ -1345,6 +1345,35 @@ "ubuntu-x86" ] }, + "ubuntu.19.04": { + "#import": [ + "ubuntu" + ] + }, + "ubuntu.19.04-arm": { + "#import": [ + "ubuntu.19.04", + "ubuntu-arm" + ] + }, + "ubuntu.19.04-arm64": { + "#import": [ + "ubuntu.19.04", + "ubuntu-arm64" + ] + }, + "ubuntu.19.04-x64": { + "#import": [ + "ubuntu.19.04", + "ubuntu-x64" + ] + }, + "ubuntu.19.04-x86": { + "#import": [ + "ubuntu.19.04", + "ubuntu-x86" + ] + }, "unix": { "#import": [ "any" diff --git a/pkg/Microsoft.NETCore.Platforms/runtimeGroups.props b/pkg/Microsoft.NETCore.Platforms/runtimeGroups.props index a819d57ddc61..249e5be9a2f3 100644 --- a/pkg/Microsoft.NETCore.Platforms/runtimeGroups.props +++ b/pkg/Microsoft.NETCore.Platforms/runtimeGroups.props @@ -135,7 +135,7 @@ debian x64;x86;arm;arm64 - 16.04;16.10;17.04;17.10;18.04;18.10 + 16.04;16.10;17.04;17.10;18.04;18.10;19.04 false From a3ee315cd5e4f4d3ce8fb60a24aa8bd0c9c9ae82 Mon Sep 17 00:00:00 2001 From: Jeremy Barton Date: Sat, 27 Apr 2019 11:48:52 -0700 Subject: [PATCH 079/607] Ensure that invalid AIA, CDP, and OCSP extensions don't throw. (#37237) --- .../Cryptography/Pal.Unix/CrlCache.cs | 8 +++- .../Pal.Unix/OpenSslX509ChainProcessor.cs | 31 ++++++++------ .../tests/DynamicChainTests.cs | 42 +++++++++++++++++++ 3 files changed, 67 insertions(+), 14 deletions(-) diff --git a/src/System.Security.Cryptography.X509Certificates/src/Internal/Cryptography/Pal.Unix/CrlCache.cs b/src/System.Security.Cryptography.X509Certificates/src/Internal/Cryptography/Pal.Unix/CrlCache.cs index 72c240961433..3192bd6187b1 100644 --- a/src/System.Security.Cryptography.X509Certificates/src/Internal/Cryptography/Pal.Unix/CrlCache.cs +++ b/src/System.Security.Cryptography.X509Certificates/src/Internal/Cryptography/Pal.Unix/CrlCache.cs @@ -237,13 +237,17 @@ private static string GetCdpUrl(SafeX509Handle cert) } } } - - return null; + } + catch (CryptographicException) + { + // Treat any ASN errors as if the extension was missing. } finally { ArrayPool.Shared.Return(crlDistributionPoints.Array); } + + return null; } } } diff --git a/src/System.Security.Cryptography.X509Certificates/src/Internal/Cryptography/Pal.Unix/OpenSslX509ChainProcessor.cs b/src/System.Security.Cryptography.X509Certificates/src/Internal/Cryptography/Pal.Unix/OpenSslX509ChainProcessor.cs index 86896689a93a..e353b16950df 100644 --- a/src/System.Security.Cryptography.X509Certificates/src/Internal/Cryptography/Pal.Unix/OpenSslX509ChainProcessor.cs +++ b/src/System.Security.Cryptography.X509Certificates/src/Internal/Cryptography/Pal.Unix/OpenSslX509ChainProcessor.cs @@ -848,24 +848,31 @@ private static string GetOcspEndpoint(SafeX509Handle cert) private static string FindHttpAiaRecord(ReadOnlyMemory authorityInformationAccess, string recordTypeOid) { - AsnReader reader = new AsnReader(authorityInformationAccess, AsnEncodingRules.DER); - AsnReader sequenceReader = reader.ReadSequence(); - reader.ThrowIfNotEmpty(); - - while (sequenceReader.HasData) + try { - AccessDescriptionAsn.Decode(sequenceReader, out AccessDescriptionAsn description); - if (StringComparer.Ordinal.Equals(description.AccessMethod, recordTypeOid)) + AsnReader reader = new AsnReader(authorityInformationAccess, AsnEncodingRules.DER); + AsnReader sequenceReader = reader.ReadSequence(); + reader.ThrowIfNotEmpty(); + + while (sequenceReader.HasData) { - GeneralNameAsn name = description.AccessLocation; - if (name.Uri != null && - Uri.TryCreate(name.Uri, UriKind.Absolute, out Uri uri) && - uri.Scheme == "http") + AccessDescriptionAsn.Decode(sequenceReader, out AccessDescriptionAsn description); + if (StringComparer.Ordinal.Equals(description.AccessMethod, recordTypeOid)) { - return name.Uri; + GeneralNameAsn name = description.AccessLocation; + if (name.Uri != null && + Uri.TryCreate(name.Uri, UriKind.Absolute, out Uri uri) && + uri.Scheme == "http") + { + return name.Uri; + } } } } + catch (CryptographicException) + { + // Treat any ASN errors as if the extension was missing. + } return null; } diff --git a/src/System.Security.Cryptography.X509Certificates/tests/DynamicChainTests.cs b/src/System.Security.Cryptography.X509Certificates/tests/DynamicChainTests.cs index 1ee948e757e3..a96d80b78319 100644 --- a/src/System.Security.Cryptography.X509Certificates/tests/DynamicChainTests.cs +++ b/src/System.Security.Cryptography.X509Certificates/tests/DynamicChainTests.cs @@ -200,6 +200,48 @@ void CheckChain() } } + [Fact] + public static void TestInvalidAia() + { + using (RSA key = RSA.Create()) + { + CertificateRequest rootReq = new CertificateRequest( + "CN=Root", + key, + HashAlgorithmName.SHA256, + RSASignaturePadding.Pkcs1); + + rootReq.CertificateExtensions.Add( + new X509BasicConstraintsExtension(true, false, 0, true)); + + CertificateRequest certReq = new CertificateRequest( + "CN=test", + key, + HashAlgorithmName.SHA256, + RSASignaturePadding.Pkcs1); + + certReq.CertificateExtensions.Add( + new X509BasicConstraintsExtension(false, false, 0, false)); + + certReq.CertificateExtensions.Add( + new X509Extension( + "1.3.6.1.5.5.7.1.1", + new byte[] { 5 }, + critical: false)); + + DateTimeOffset notBefore = DateTimeOffset.UtcNow.AddDays(-1); + DateTimeOffset notAfter = notBefore.AddDays(30); + + using (X509Certificate2 root = rootReq.CreateSelfSigned(notBefore, notAfter)) + using (X509Certificate2 ee = certReq.Create(root, notBefore, notAfter, root.GetSerialNumber())) + { + X509Chain chain = new X509Chain(); + Assert.False(chain.Build(ee)); + Assert.Equal(1, chain.ChainElements.Count); + } + } + } + private static X509Certificate2 TamperSignature(X509Certificate2 input) { byte[] cert = input.RawData; From 0735c2d2b4c14f7ab6eb0e5b0b97a9f93abeb70f Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Sat, 27 Apr 2019 19:02:47 +0000 Subject: [PATCH 080/607] [master] Update dependencies from dotnet/corefx (#37217) * Update dependencies from https://github.com/dotnet/corefx build 20190425.8 - runtime.native.System.IO.Ports - 4.6.0-preview6.19225.8 - Microsoft.NETCore.Platforms - 3.0.0-preview6.19225.8 * Update dependencies from https://github.com/dotnet/corefx build 20190426.9 - runtime.native.System.IO.Ports - 4.6.0-preview6.19226.9 - Microsoft.NETCore.Platforms - 3.0.0-preview6.19226.9 --- eng/Version.Details.xml | 8 ++++---- eng/Versions.props | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index f45b2a367444..1fcfecfd4a22 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -26,13 +26,13 @@ https://github.com/dotnet/core-setup dfdc7bc432fc67e1cba68176d664bff16c7fff84 - + https://github.com/dotnet/corefx - 8c7afe67ee2e9bd21a4412265b66f875cfafaede + 4ff66e551b07802a4021d538633d77d3ee66ec89 - + https://github.com/dotnet/corefx - 18cd561127e35841db2775dc7a85adad70363e18 + 4ff66e551b07802a4021d538633d77d3ee66ec89 https://github.com/dotnet/arcade diff --git a/eng/Versions.props b/eng/Versions.props index 994de0150ed9..0fa525748f72 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -43,8 +43,8 @@ 3.0.0-preview6-27624-71 3.0.0-preview6-27624-71 - 3.0.0-preview6.19225.1 - 4.6.0-preview6.19225.1 + 3.0.0-preview6.19226.9 + 4.6.0-preview6.19226.9 2.1.0-prerelease.19224.1 From c0c370e0576574d8985970200c00ca83ae366d2e Mon Sep 17 00:00:00 2001 From: Stephen Toub Date: Sat, 27 Apr 2019 16:47:21 -0400 Subject: [PATCH 081/607] Tweak a comment in HttpHandlerDefaults.cs Fixes https://github.com/dotnet/corefx/issues/34966 --- src/Common/src/System/Net/Http/HttpHandlerDefaults.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Common/src/System/Net/Http/HttpHandlerDefaults.cs b/src/Common/src/System/Net/Http/HttpHandlerDefaults.cs index e3991bd17fc9..b32f4d7d81d9 100644 --- a/src/Common/src/System/Net/Http/HttpHandlerDefaults.cs +++ b/src/Common/src/System/Net/Http/HttpHandlerDefaults.cs @@ -7,7 +7,8 @@ namespace System.Net.Http { /// - /// Defines default values for http handler properties which is meant to be re-used across WinHttp and UnixHttp Handlers + /// Central repository for default values used in http handler settings. Not all settings are relevant + /// to or configurable by all handlers. /// internal static class HttpHandlerDefaults { From 610fa286999c78b841e17ea0c301c0986426635d Mon Sep 17 00:00:00 2001 From: Stephen Toub Date: Sat, 27 Apr 2019 17:11:53 -0400 Subject: [PATCH 082/607] Disable sporadically failing HttpClientHandler test (#37253) --- .../FunctionalTests/HttpClientHandlerTest.ServerCertificates.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.ServerCertificates.cs b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.ServerCertificates.cs index 1a7e7e779176..5f4f28c27383 100644 --- a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.ServerCertificates.cs +++ b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.ServerCertificates.cs @@ -135,6 +135,7 @@ public async Task UseCallback_HaveCredsAndUseAuthenticatedCustomProxyAndPostToSe } } + [ActiveIssue(37250)] [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "UAP won't send requests through a custom proxy")] [OuterLoop("Uses external server")] [Fact] From 8e551d4dc7464a465b00ac1bf9a632ea9c3bb5a1 Mon Sep 17 00:00:00 2001 From: Stephen Toub Date: Sat, 27 Apr 2019 19:22:33 -0400 Subject: [PATCH 083/607] Give SocketsHttpHandler more descriptive error messages (#37251) Currently lots of parsing failures just result in an exception stating "The server returned an invalid or unrecognized response." We can instead be more descriptive about what the problem is in most cases. --- .../src/Resources/Strings.resx | 42 +++++++++++++++++++ .../ChunkedEncodingReadStream.cs | 11 ++--- .../ContentLengthReadStream.cs | 4 +- .../SocketsHttpHandler/Http2Connection.cs | 4 +- .../Http/SocketsHttpHandler/Http2Stream.cs | 21 +++++----- .../Http/SocketsHttpHandler/HttpConnection.cs | 36 +++++++--------- .../SocketsHttpHandler/HttpConnectionPool.cs | 2 +- .../SocketsHttpHandler/RawConnectionStream.cs | 4 +- 8 files changed, 81 insertions(+), 43 deletions(-) diff --git a/src/System.Net.Http/src/Resources/Strings.resx b/src/System.Net.Http/src/Resources/Strings.resx index f7cc449b1622..466670154b18 100644 --- a/src/System.Net.Http/src/Resources/Strings.resx +++ b/src/System.Net.Http/src/Resources/Strings.resx @@ -326,6 +326,45 @@ The server returned an invalid or unrecognized response. + + The response ended prematurely. + + + The response ended prematurely, with at least {0} additional bytes expected. + + + Received chunk header length could not be parsed: '{0}'. + + + Received an invalid chunk extension: '{0}'. + + + Received an invalid chunk terminator: '{0}'. + + + Received an invalid status line: '{0}'. + + + Received an invalid status code: '{0}'. + + + Received status phrase could not be decoded with iso-8859-1: '{0}'. + + + Received an invalid folded header. + + + Received an invalid header line: '{0}'. + + + Received an invalid header name: '{0}'. + + + The request was aborted. + + + Received an HTTP/2 pseudo-header as a trailing header. + The handler was disposed of while active operations were in progress. @@ -392,6 +431,9 @@ The application protocol list is invalid. + + HTTP/2 requires TLS 1.2 or newer, but '{0}' was negotiated. + The path '{0}' is too long, or a component of the specified path is too long. diff --git a/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/ChunkedEncodingReadStream.cs b/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/ChunkedEncodingReadStream.cs index 13de7c60b768..e9c0380603c2 100644 --- a/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/ChunkedEncodingReadStream.cs +++ b/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/ChunkedEncodingReadStream.cs @@ -5,6 +5,7 @@ using System.Buffers.Text; using System.Diagnostics; using System.IO; +using System.Text; using System.Threading; using System.Threading.Tasks; @@ -71,7 +72,7 @@ public override int Read(Span buffer) bytesRead = _connection.Read(buffer.Slice(0, (int)Math.Min((ulong)buffer.Length, _chunkBytesRemaining))); if (bytesRead == 0) { - throw new IOException(SR.net_http_invalid_response); + throw new IOException(SR.Format(SR.net_http_invalid_response_premature_eof_bytecount, _chunkBytesRemaining)); } _chunkBytesRemaining -= (ulong)bytesRead; if (_chunkBytesRemaining == 0) @@ -157,7 +158,7 @@ private async ValueTask ReadAsyncCore(Memory buffer, CancellationToke int bytesRead = await _connection.ReadAsync(buffer.Slice(0, (int)Math.Min((ulong)buffer.Length, _chunkBytesRemaining))).ConfigureAwait(false); if (bytesRead == 0) { - throw new IOException(SR.net_http_invalid_response); + throw new IOException(SR.Format(SR.net_http_invalid_response_premature_eof_bytecount, _chunkBytesRemaining)); } _chunkBytesRemaining -= (ulong)bytesRead; if (_chunkBytesRemaining == 0) @@ -277,7 +278,7 @@ private ReadOnlyMemory ReadChunkFromConnectionBuffer(int maxBytesToRead, C // Parse the hex value from it. if (!Utf8Parser.TryParse(currentLine, out ulong chunkSize, out int bytesConsumed, 'X')) { - throw new IOException(SR.net_http_invalid_response); + throw new IOException(SR.Format(SR.net_http_invalid_response_chunk_header_invalid, BitConverter.ToString(currentLine.ToArray()))); } _chunkBytesRemaining = chunkSize; @@ -332,7 +333,7 @@ private ReadOnlyMemory ReadChunkFromConnectionBuffer(int maxBytesToRead, C if (currentLine.Length != 0) { - ThrowInvalidHttpResponse(); + throw new HttpRequestException(SR.Format(SR.net_http_invalid_response_chunk_terminator_invalid, Encoding.ASCII.GetString(currentLine))); } _state = ParsingState.ExpectChunkHeader; @@ -412,7 +413,7 @@ private static void ValidateChunkExtension(ReadOnlySpan lineAfterChunkSize } else if (c != ' ' && c != '\t') // not called out in the RFC, but WinHTTP allows it { - throw new IOException(SR.net_http_invalid_response); + throw new IOException(SR.Format(SR.net_http_invalid_response_chunk_extension_invalid, BitConverter.ToString(lineAfterChunkSize.ToArray()))); } } } diff --git a/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/ContentLengthReadStream.cs b/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/ContentLengthReadStream.cs index 39e1440a317f..00345da2ccbb 100644 --- a/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/ContentLengthReadStream.cs +++ b/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/ContentLengthReadStream.cs @@ -39,7 +39,7 @@ public override int Read(Span buffer) if (bytesRead <= 0) { // Unexpected end of response stream. - throw new IOException(SR.net_http_invalid_response); + throw new IOException(SR.Format(SR.net_http_invalid_response_premature_eof_bytecount, _contentBytesRemaining)); } Debug.Assert((ulong)bytesRead <= _contentBytesRemaining); @@ -101,7 +101,7 @@ public override async ValueTask ReadAsync(Memory buffer, Cancellation CancellationHelper.ThrowIfCancellationRequested(cancellationToken); // Unexpected end of response stream. - throw new IOException(SR.net_http_invalid_response); + throw new IOException(SR.Format(SR.net_http_invalid_response_premature_eof_bytecount, _contentBytesRemaining)); } Debug.Assert((ulong)bytesRead <= _contentBytesRemaining); diff --git a/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http2Connection.cs b/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http2Connection.cs index 6fafb858a5f9..f1924f6d9d08 100644 --- a/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http2Connection.cs +++ b/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http2Connection.cs @@ -715,7 +715,7 @@ private async Task AcquireWriteLockAsync(CancellationToken cancellationToken) // If the connection has been aborted, then fail now instead of trying to send more data. if (IsAborted()) { - throw new IOException(SR.net_http_invalid_response); + throw new IOException(SR.net_http_request_aborted); } } @@ -1486,7 +1486,7 @@ internal static async ValueTask ReadAtLeastAsync(Stream stream, Memory name, ReadOnlySpan value) { // Pseudo-headers not allowed in trailers. if (NetEventSource.IsEnabled) _connection.Trace("Pseudo-header in trailer headers."); - throw new HttpRequestException(SR.net_http_invalid_response); + throw new HttpRequestException(SR.net_http_invalid_response_pseudo_header_in_trailer); } - if (value.Length != 3) - throw new Exception("Invalid status code"); - - // Copied from HttpConnection - byte status1 = value[0], status2 = value[1], status3 = value[2]; - if (!IsDigit(status1) || !IsDigit(status2) || !IsDigit(status3)) + byte status1, status2, status3; + if (value.Length != 3 || + !IsDigit(status1 = value[0]) || + !IsDigit(status2 = value[1]) || + !IsDigit(status3 = value[2])) { - throw new HttpRequestException(SR.net_http_invalid_response); + throw new HttpRequestException(SR.Format(SR.net_http_invalid_response_status_code, Encoding.ASCII.GetString(value))); } _response.SetStatusCodeWithoutValidation((HttpStatusCode)(100 * (status1 - '0') + 10 * (status2 - '0') + (status3 - '0'))); @@ -155,7 +154,7 @@ public void OnResponseHeader(ReadOnlySpan name, ReadOnlySpan value) if (!HeaderDescriptor.TryGet(name, out HeaderDescriptor descriptor)) { // Invalid header name - throw new HttpRequestException(SR.net_http_invalid_response); + throw new HttpRequestException(SR.Format(SR.net_http_invalid_response_header_name, Encoding.ASCII.GetString(name))); } string headerValue = descriptor.GetHeaderValue(value); @@ -301,7 +300,7 @@ public void OnResponseAbort() if (_state == StreamState.Aborted) { - throw new IOException(SR.net_http_invalid_response); + throw new IOException(SR.net_http_request_aborted); } else if (_state == StreamState.ExpectingHeaders) { @@ -394,7 +393,7 @@ private void ExtendWindow(int amount) } else if (_state == StreamState.Aborted) { - throw new IOException(SR.net_http_invalid_response); + throw new IOException(SR.net_http_request_aborted); } Debug.Assert(_state == StreamState.ExpectingData || _state == StreamState.ExpectingTrailingHeaders); diff --git a/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnection.cs b/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnection.cs index 378a9cc90283..5de3ebefd72e 100644 --- a/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnection.cs +++ b/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnection.cs @@ -519,7 +519,7 @@ public async Task SendAsyncCore(HttpRequestMessage request, if (bytesRead == 0) { - throw new IOException(SR.net_http_invalid_response); + throw new IOException(SR.net_http_invalid_response_premature_eof); } _readOffset = 0; @@ -824,7 +824,7 @@ private static void ParseStatusLine(Span line, HttpResponseMessage respons const int MinStatusLineLength = 12; // "HTTP/1.x 123" if (line.Length < MinStatusLineLength || line[8] != ' ') { - ThrowInvalidHttpResponse(); + throw new HttpRequestException(SR.Format(SR.net_http_invalid_response_status_line, Encoding.ASCII.GetString(line))); } ulong first8Bytes = BitConverter.ToUInt64(line); @@ -846,7 +846,7 @@ private static void ParseStatusLine(Span line, HttpResponseMessage respons } else { - ThrowInvalidHttpResponse(); + throw new HttpRequestException(SR.Format(SR.net_http_invalid_response_status_line, Encoding.ASCII.GetString(line))); } } @@ -854,7 +854,7 @@ private static void ParseStatusLine(Span line, HttpResponseMessage respons byte status1 = line[9], status2 = line[10], status3 = line[11]; if (!IsDigit(status1) || !IsDigit(status2) || !IsDigit(status3)) { - ThrowInvalidHttpResponse(); + throw new HttpRequestException(SR.Format(SR.net_http_invalid_response_status_code, Encoding.ASCII.GetString(line.Slice(9, 3)))); } response.SetStatusCodeWithoutValidation((HttpStatusCode)(100 * (status1 - '0') + 10 * (status2 - '0') + (status3 - '0'))); @@ -879,13 +879,13 @@ private static void ParseStatusLine(Span line, HttpResponseMessage respons } catch (FormatException error) { - ThrowInvalidHttpResponse(error); + throw new HttpRequestException(SR.Format(SR.net_http_invalid_response_status_reason, Encoding.ASCII.GetString(reasonBytes.ToArray())), error); } } } else { - ThrowInvalidHttpResponse(); + throw new HttpRequestException(SR.Format(SR.net_http_invalid_response_status_line, Encoding.ASCII.GetString(line))); } } @@ -905,20 +905,20 @@ private static void ParseHeaderNameValue(HttpConnection connection, ReadOnlySpan if (pos == line.Length) { // Invalid header line that doesn't contain ':'. - ThrowInvalidHttpResponse(); + throw new HttpRequestException(SR.Format(SR.net_http_invalid_response_header_line, Encoding.ASCII.GetString(line))); } } if (pos == 0) { // Invalid empty header name. - ThrowInvalidHttpResponse(); + throw new HttpRequestException(SR.Format(SR.net_http_invalid_response_header_name, "")); } if (!HeaderDescriptor.TryGet(line.Slice(0, pos), out HeaderDescriptor descriptor)) { // Invalid header name. - ThrowInvalidHttpResponse(); + throw new HttpRequestException(SR.Format(SR.net_http_invalid_response_header_name, Encoding.ASCII.GetString(line.Slice(0, pos)))); } if (isFromTrailer && descriptor.KnownHeader != null && s_disallowedTrailers.Contains(descriptor.KnownHeader)) @@ -936,14 +936,14 @@ private static void ParseHeaderNameValue(HttpConnection connection, ReadOnlySpan if (pos == line.Length) { // Invalid header line that doesn't contain ':'. - ThrowInvalidHttpResponse(); + throw new HttpRequestException(SR.Format(SR.net_http_invalid_response_header_line, Encoding.ASCII.GetString(line))); } } if (line[pos++] != ':') { // Invalid header line that doesn't contain ':'. - ThrowInvalidHttpResponse(); + throw new HttpRequestException(SR.Format(SR.net_http_invalid_response_header_line, Encoding.ASCII.GetString(line))); } // Skip whitespace after colon @@ -1243,7 +1243,7 @@ private bool TryReadNextLine(out ReadOnlySpan line) { if (_allowedReadLineBytes < buffer.Length) { - ThrowInvalidHttpResponse(); + throw new HttpRequestException(SR.Format(SR.net_http_response_headers_exceeded_length, _pool.Settings._maxResponseHeadersLength)); } line = default; @@ -1311,7 +1311,7 @@ private async ValueTask> ReadNextResponseHeaderLineAsync(bool // so if we haven't seen a colon, this is invalid. if (Array.IndexOf(_readBuffer, (byte)':', _readOffset, lfIndex - _readOffset) == -1) { - ThrowInvalidHttpResponse(); + throw new HttpRequestException(SR.net_http_invalid_response_header_folder); } // When we return the line, we need the interim newlines filtered out. According @@ -1354,7 +1354,7 @@ private void ThrowIfExceededAllowedReadLineBytes() { if (_allowedReadLineBytes < 0) { - ThrowInvalidHttpResponse(); + throw new HttpRequestException(SR.Format(SR.net_http_response_headers_exceeded_length, _pool.Settings._maxResponseHeadersLength)); } } @@ -1398,7 +1398,7 @@ private void Fill() if (NetEventSource.IsEnabled) Trace($"Received {bytesRead} bytes."); if (bytesRead == 0) { - throw new IOException(SR.net_http_invalid_response); + throw new IOException(SR.net_http_invalid_response_premature_eof); } _readLength += bytesRead; @@ -1445,7 +1445,7 @@ private async Task FillAsync() if (NetEventSource.IsEnabled) Trace($"Received {bytesRead} bytes."); if (bytesRead == 0) { - throw new IOException(SR.net_http_invalid_response); + throw new IOException(SR.net_http_invalid_response_premature_eof); } _readLength += bytesRead; @@ -1846,10 +1846,6 @@ private static bool EqualsOrdinal(string left, Span right) public sealed override string ToString() => $"{nameof(HttpConnection)}({_pool})"; // Description for diagnostic purposes - private static void ThrowInvalidHttpResponse() => throw new HttpRequestException(SR.net_http_invalid_response); - - private static void ThrowInvalidHttpResponse(Exception innerException) => throw new HttpRequestException(SR.net_http_invalid_response, innerException); - internal sealed override void Trace(string message, [CallerMemberName] string memberName = null) => NetEventSource.Log.HandlerMessage( _pool?.GetHashCode() ?? 0, // pool ID diff --git a/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionPool.cs b/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionPool.cs index 5b95496fe47e..c7473045efae 100644 --- a/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionPool.cs +++ b/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionPool.cs @@ -427,7 +427,7 @@ private ValueTask GetOrReserveHttp11ConnectionAsync(Cancellation if (sslStream.SslProtocol < SslProtocols.Tls12) { - throw new HttpRequestException(SR.net_http_invalid_response); + throw new HttpRequestException(SR.Format(SR.net_ssl_http2_requires_tls12, sslStream.SslProtocol)); } http2Connection = new Http2Connection(this, sslStream); diff --git a/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/RawConnectionStream.cs b/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/RawConnectionStream.cs index 81d1dfc1b6c0..b45475f65b9f 100644 --- a/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/RawConnectionStream.cs +++ b/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/RawConnectionStream.cs @@ -152,7 +152,7 @@ public override void Write(ReadOnlySpan buffer) { if (_connection == null) { - throw new IOException(SR.net_http_io_write); + throw new IOException(SR.ObjectDisposed_StreamClosed); } if (buffer.Length != 0) @@ -170,7 +170,7 @@ public override ValueTask WriteAsync(ReadOnlyMemory buffer, CancellationTo if (_connection == null) { - return new ValueTask(Task.FromException(new IOException(SR.net_http_io_write))); + return new ValueTask(Task.FromException(new IOException(SR.ObjectDisposed_StreamClosed))); } if (buffer.Length == 0) From 4f27d0f84c17850ef02ea7b330908fddcdf73c86 Mon Sep 17 00:00:00 2001 From: David Shulman Date: Sat, 27 Apr 2019 17:06:35 -0700 Subject: [PATCH 084/607] Add proxy environment variables support for Windows (#37238) Changed the Windows version of SocketsHttpHandler so that it will honor the same environment variables similar to the Linux and OSX versions. If the environment variables are not set then it reverts back to the Windows WinInet/IE settings behavior. I added several kinds of unit and end-to-end tests to verify the SystemProxyInfo class is making the correct choice for all the different platforms regarding whether the HttpEnvironmentProxy or platform proxy (HttpSystemProxy for Windows and MacProxy for OSX) is used. Fixes #37187 --- .../System/Net/Http/LoopbackProxyServer.cs | 18 +++++- .../src/System.Net.Http.csproj | 3 + .../HttpEnvironmentProxy.Unix.cs | 55 ++++++++++++++++ .../HttpEnvironmentProxy.Windows.cs | 51 +++++++++++++++ .../HttpEnvironmentProxy.cs | 47 +------------- .../SocketsHttpHandler/SystemProxyInfo.OSX.cs | 2 +- .../SystemProxyInfo.Unix.cs | 3 +- .../SystemProxyInfo.Windows.cs | 9 ++- .../HttpClientHandlerTest.Proxy.cs | 32 ++++++++++ .../tests/UnitTests/Configurations.props | 4 +- .../tests/UnitTests/Fakes/MacProxy.cs | 25 ++++++++ .../UnitTests/HttpEnvironmentProxyTest.cs | 15 +++-- .../System.Net.Http.Unit.Tests.csproj | 17 +++++ .../tests/UnitTests/SystemProxyInfoTest.cs | 63 +++++++++++++++++++ 14 files changed, 282 insertions(+), 62 deletions(-) create mode 100644 src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpEnvironmentProxy.Unix.cs create mode 100644 src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpEnvironmentProxy.Windows.cs create mode 100644 src/System.Net.Http/tests/UnitTests/Fakes/MacProxy.cs create mode 100644 src/System.Net.Http/tests/UnitTests/SystemProxyInfoTest.cs diff --git a/src/Common/tests/System/Net/Http/LoopbackProxyServer.cs b/src/Common/tests/System/Net/Http/LoopbackProxyServer.cs index e278908140fa..a66dd0cbf748 100644 --- a/src/Common/tests/System/Net/Http/LoopbackProxyServer.cs +++ b/src/Common/tests/System/Net/Http/LoopbackProxyServer.cs @@ -27,10 +27,13 @@ public sealed class LoopbackProxyServer : IDisposable private const string ProxyAuthenticateNtlmHeader = "Proxy-Authenticate: NTLM\r\n"; private const string ProxyAuthenticateNegotiateHeader = "Proxy-Authenticate: Negotiate\r\n"; + private const string ViaHeaderValue = "HTTP/1.1 LoopbackProxyServer"; + private readonly Socket _listener; private readonly Uri _uri; private readonly AuthenticationSchemes _authSchemes; private readonly bool _connectionCloseAfter407; + private readonly bool _addViaRequestHeader; private readonly ManualResetEvent _serverStopped; private readonly List _requests; private int _connections; @@ -50,6 +53,7 @@ private LoopbackProxyServer(Options options) _uri = new Uri($"http://{ep.Address}:{ep.Port}/"); _authSchemes = options.AuthenticationSchemes; _connectionCloseAfter407 = options.ConnectionCloseAfter407; + _addViaRequestHeader = options.AddViaRequestHeader; _serverStopped = new ManualResetEvent(false); _requests = new List(); @@ -170,8 +174,15 @@ private async Task ProcessRequest(StreamReader reader, StreamWriter writer requestMessage.Headers.Add(header.Key, header.Value); } } + + // Add 'Via' header. + if (_addViaRequestHeader) + { + requestMessage.Headers.Add("Via", ViaHeaderValue); + } - using (HttpClient outboundClient = new HttpClient()) + var handler = new HttpClientHandler() { UseProxy = false }; + using (HttpClient outboundClient = new HttpClient(handler)) using (HttpResponseMessage response = await outboundClient.SendAsync(requestMessage)) { @@ -303,7 +314,9 @@ public void Dispose() _disposed = true; } } - + + public string ViaHeader => ViaHeaderValue; + public class ReceivedRequest { public string RequestLine { get; set; } @@ -315,6 +328,7 @@ public class Options { public AuthenticationSchemes AuthenticationSchemes { get; set; } = AuthenticationSchemes.None; public bool ConnectionCloseAfter407 { get; set; } = false; + public bool AddViaRequestHeader { get; set; } = false; } } } diff --git a/src/System.Net.Http/src/System.Net.Http.csproj b/src/System.Net.Http/src/System.Net.Http.csproj index 70ad122051c9..555d6d9e6041 100644 --- a/src/System.Net.Http/src/System.Net.Http.csproj +++ b/src/System.Net.Http/src/System.Net.Http.csproj @@ -216,6 +216,7 @@ + Common\System\Net\ContextAwareResult.Unix.cs @@ -301,6 +302,8 @@ + + Common\Interop\Windows\SChannel\Interop.SecPkgContext_ApplicationProtocol.cs diff --git a/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpEnvironmentProxy.Unix.cs b/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpEnvironmentProxy.Unix.cs new file mode 100644 index 000000000000..66832841d30c --- /dev/null +++ b/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpEnvironmentProxy.Unix.cs @@ -0,0 +1,55 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +namespace System.Net.Http +{ + internal sealed partial class HttpEnvironmentProxy : IWebProxy + { + public static bool TryCreate(out IWebProxy proxy) + { + // Get environment variables. Protocol specific take precedence over + // general all_*, lower case variable has precedence over upper case. + // Note that curl uses HTTPS_PROXY but not HTTP_PROXY. + + Uri httpProxy = GetUriFromString(Environment.GetEnvironmentVariable(EnvHttpProxyLC)); + if (httpProxy == null && Environment.GetEnvironmentVariable(EnvCGI) == null) + { + httpProxy = GetUriFromString(Environment.GetEnvironmentVariable(EnvHttpProxyUC)); + } + + Uri httpsProxy = GetUriFromString(Environment.GetEnvironmentVariable(EnvHttpsProxyLC)) ?? + GetUriFromString(Environment.GetEnvironmentVariable(EnvHttpsProxyUC)); + + if (httpProxy == null || httpsProxy == null) + { + Uri allProxy = GetUriFromString(Environment.GetEnvironmentVariable(EnvAllProxyLC)) ?? + GetUriFromString(Environment.GetEnvironmentVariable(EnvAllProxyUC)); + + if (httpProxy == null) + { + httpProxy = allProxy; + } + + if (httpsProxy == null) + { + httpsProxy = allProxy; + } + } + + // Do not instantiate if nothing is set. + // Caller may pick some other proxy type. + if (httpProxy == null && httpsProxy == null) + { + proxy = null; + return false; + } + + string noProxy = Environment.GetEnvironmentVariable(EnvNoProxyLC) ?? + Environment.GetEnvironmentVariable(EnvNoProxyUC); + proxy = new HttpEnvironmentProxy(httpProxy, httpsProxy, noProxy); + + return true; + } + } +} diff --git a/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpEnvironmentProxy.Windows.cs b/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpEnvironmentProxy.Windows.cs new file mode 100644 index 000000000000..da78df4d8e82 --- /dev/null +++ b/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpEnvironmentProxy.Windows.cs @@ -0,0 +1,51 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +namespace System.Net.Http +{ + internal sealed partial class HttpEnvironmentProxy : IWebProxy + { + public static bool TryCreate(out IWebProxy proxy) + { + // Get environment variables. Protocol specific take precedence over + // general all_*. On Windows, environment variables are case insensitive. + + Uri httpProxy = null; + if (Environment.GetEnvironmentVariable(EnvCGI) == null) + { + httpProxy = GetUriFromString(Environment.GetEnvironmentVariable(EnvHttpProxyUC)); + } + + Uri httpsProxy = GetUriFromString(Environment.GetEnvironmentVariable(EnvHttpsProxyUC)); + + if (httpProxy == null || httpsProxy == null) + { + Uri allProxy = GetUriFromString(Environment.GetEnvironmentVariable(EnvAllProxyUC)); + + if (httpProxy == null) + { + httpProxy = allProxy; + } + + if (httpsProxy == null) + { + httpsProxy = allProxy; + } + } + + // Do not instantiate if nothing is set. + // Caller may pick some other proxy type. + if (httpProxy == null && httpsProxy == null) + { + proxy = null; + return false; + } + + string noProxy = Environment.GetEnvironmentVariable(EnvNoProxyUC); + proxy = new HttpEnvironmentProxy(httpProxy, httpsProxy, noProxy); + + return true; + } + } +} diff --git a/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpEnvironmentProxy.cs b/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpEnvironmentProxy.cs index 1aa71228b72f..c08068670a0c 100644 --- a/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpEnvironmentProxy.cs +++ b/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpEnvironmentProxy.cs @@ -88,7 +88,7 @@ private static NetworkCredential GetCredentialsFromString(string value) } } - internal sealed class HttpEnvironmentProxy : IWebProxy + internal sealed partial class HttpEnvironmentProxy : IWebProxy { private const string EnvAllProxyUC = "ALL_PROXY"; private const string EnvAllProxyLC = "all_proxy"; @@ -105,51 +105,6 @@ internal sealed class HttpEnvironmentProxy : IWebProxy private string[] _bypass = null;// list of domains not to proxy private ICredentials _credentials; - public static bool TryCreate(out IWebProxy proxy) - { - // Get environmental variables. Protocol specific take precedence over - // general all_*, lower case variable has precedence over upper case. - // Note that curl uses HTTPS_PROXY but not HTTP_PROXY. - - Uri httpProxy = GetUriFromString(Environment.GetEnvironmentVariable(EnvHttpProxyLC)); - if (httpProxy == null && Environment.GetEnvironmentVariable(EnvCGI) == null) - { - httpProxy = GetUriFromString(Environment.GetEnvironmentVariable(EnvHttpProxyUC)); - } - - Uri httpsProxy = GetUriFromString(Environment.GetEnvironmentVariable(EnvHttpsProxyLC)) ?? - GetUriFromString(Environment.GetEnvironmentVariable(EnvHttpsProxyUC)); - - if (httpProxy == null || httpsProxy == null) - { - Uri allProxy = GetUriFromString(Environment.GetEnvironmentVariable(EnvAllProxyLC)) ?? - GetUriFromString(Environment.GetEnvironmentVariable(EnvAllProxyUC)); - - if (httpProxy == null) - { - httpProxy = allProxy; - } - if (httpsProxy == null) - { - httpsProxy = allProxy; - } - } - - // Do not instantiate if nothing is set. - // Caller may pick some other proxy type. - if (httpProxy == null && httpsProxy == null) - { - proxy = null; - return false; - } - - string noProxy = Environment.GetEnvironmentVariable(EnvNoProxyLC) ?? - Environment.GetEnvironmentVariable(EnvNoProxyUC); - proxy = new HttpEnvironmentProxy(httpProxy, httpsProxy, noProxy); - - return true; - } - private HttpEnvironmentProxy(Uri httpProxy, Uri httpsProxy, string bypassList) { _httpProxyUri = httpProxy; diff --git a/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/SystemProxyInfo.OSX.cs b/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/SystemProxyInfo.OSX.cs index 2d143dd0183d..a8d6e69d516e 100644 --- a/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/SystemProxyInfo.OSX.cs +++ b/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/SystemProxyInfo.OSX.cs @@ -6,7 +6,7 @@ namespace System.Net.Http { internal static class SystemProxyInfo { - // On Unix we get default proxy configuration from environment variables + // On OSX we get default proxy configuration from either environment variables or the OSX system proxy. public static IWebProxy ConstructSystemProxy() { return HttpEnvironmentProxy.TryCreate(out IWebProxy proxy) ? proxy : new MacProxy(); diff --git a/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/SystemProxyInfo.Unix.cs b/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/SystemProxyInfo.Unix.cs index 4c79a8eb05b0..6d93ee1b51aa 100644 --- a/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/SystemProxyInfo.Unix.cs +++ b/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/SystemProxyInfo.Unix.cs @@ -6,11 +6,10 @@ namespace System.Net.Http { internal static class SystemProxyInfo { - // On Unix we get default proxy configuration from environment variables + // On Unix (except for OSX) we get default proxy configuration from environment variables. public static IWebProxy ConstructSystemProxy() { return HttpEnvironmentProxy.TryCreate(out IWebProxy proxy) ? proxy : null; } } } - diff --git a/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/SystemProxyInfo.Windows.cs b/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/SystemProxyInfo.Windows.cs index 0994bf54a9d0..dde91ba1fc82 100644 --- a/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/SystemProxyInfo.Windows.cs +++ b/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/SystemProxyInfo.Windows.cs @@ -6,10 +6,15 @@ namespace System.Net.Http { internal static class SystemProxyInfo { + // On Windows we get default proxy configuration from either environment variables or the Windows system proxy. public static IWebProxy ConstructSystemProxy() { - return HttpSystemProxy.TryCreate(out IWebProxy proxy) ? proxy : null; + if (!HttpEnvironmentProxy.TryCreate(out IWebProxy proxy)) + { + HttpSystemProxy.TryCreate(out proxy); + } + + return proxy; } } } - diff --git a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Proxy.cs b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Proxy.cs index 329e11fc3076..1adc53e5123c 100644 --- a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Proxy.cs +++ b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Proxy.cs @@ -7,6 +7,9 @@ using System.Text; using System.Threading.Tasks; +using Microsoft.DotNet.XUnitExtensions; +using Microsoft.DotNet.RemoteExecutor; + using Xunit; using Xunit.Abstractions; @@ -101,6 +104,35 @@ await response.Content.ReadAsStringAsync(), } } + [OuterLoop("Uses external server")] + [ConditionalFact] + public void Proxy_UseEnvironmentVariableToSetSystemProxy_RequestGoesThruProxy() + { + if (!UseSocketsHttpHandler) + { + throw new SkipTestException("Test needs SocketsHttpHandler"); + } + + RemoteExecutor.Invoke(async useSocketsHttpHandlerString => + { + var options = new LoopbackProxyServer.Options { AddViaRequestHeader = true }; + using (LoopbackProxyServer proxyServer = LoopbackProxyServer.Create(options)) + { + Environment.SetEnvironmentVariable("http_proxy", proxyServer.Uri.AbsoluteUri.ToString()); + + using (HttpClient client = CreateHttpClient(useSocketsHttpHandlerString)) + using (HttpResponseMessage response = await client.GetAsync(Configuration.Http.RemoteEchoServer)) + { + Assert.Equal(HttpStatusCode.OK, response.StatusCode); + string body = await response.Content.ReadAsStringAsync(); + Assert.Contains(proxyServer.ViaHeader, body); + } + + return RemoteExecutor.SuccessExitCode; + } + }, UseSocketsHttpHandler.ToString()).Dispose(); + } + [ActiveIssue(32809)] [OuterLoop("Uses external server")] [Theory] diff --git a/src/System.Net.Http/tests/UnitTests/Configurations.props b/src/System.Net.Http/tests/UnitTests/Configurations.props index a1eadd7648d8..28007ae5b295 100644 --- a/src/System.Net.Http/tests/UnitTests/Configurations.props +++ b/src/System.Net.Http/tests/UnitTests/Configurations.props @@ -1,7 +1,9 @@  - netcoreapp; + netcoreapp-OSX; + netcoreapp-Unix; + netcoreapp-Windows_NT; diff --git a/src/System.Net.Http/tests/UnitTests/Fakes/MacProxy.cs b/src/System.Net.Http/tests/UnitTests/Fakes/MacProxy.cs new file mode 100644 index 000000000000..2e56bc0aae88 --- /dev/null +++ b/src/System.Net.Http/tests/UnitTests/Fakes/MacProxy.cs @@ -0,0 +1,25 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +namespace System.Net.Http +{ + internal sealed class MacProxy : IWebProxy + { + public ICredentials Credentials + { + get => throw NotImplemented.ByDesignWithMessage("Mac Proxy not implemented"); + set => throw NotImplemented.ByDesignWithMessage("Mac Proxy not implemented"); + } + + public Uri GetProxy(Uri targetUri) + { + throw NotImplemented.ByDesignWithMessage("Mac Proxy not implemented"); + } + + public bool IsBypassed(Uri targetUri) + { + throw NotImplemented.ByDesignWithMessage("Mac Proxy not implemented"); + } + } +} diff --git a/src/System.Net.Http/tests/UnitTests/HttpEnvironmentProxyTest.cs b/src/System.Net.Http/tests/UnitTests/HttpEnvironmentProxyTest.cs index 896b789532f5..2c1b4e301483 100644 --- a/src/System.Net.Http/tests/UnitTests/HttpEnvironmentProxyTest.cs +++ b/src/System.Net.Http/tests/UnitTests/HttpEnvironmentProxyTest.cs @@ -21,13 +21,13 @@ public class HttpEnvironmentProxyTest // to be sure they do not interfere with the test. private void CleanEnv() { - List vars = new List() { "http_proxy", "HTTP_PROXY", - "https_proxy", "HTTPS_PROXY", - "all_proxy", "ALL_PROXY", - "no_proxy", "NO_PROXY", - "GATEWAY_INTERFACE" }; + var envVars = new List() { "http_proxy", "HTTP_PROXY", + "https_proxy", "HTTPS_PROXY", + "all_proxy", "ALL_PROXY", + "no_proxy", "NO_PROXY", + "GATEWAY_INTERFACE" }; - foreach (string v in vars) + foreach (string v in envVars) { Environment.SetEnvironmentVariable(v, null); } @@ -248,14 +248,13 @@ public static IEnumerable HttpProxyCgiEnvVarMemberData() { foreach (bool cgi in new object[] { false, true }) { - yield return new object[] { "http_proxy", cgi, true }; + yield return new object[] { "http_proxy", cgi, !cgi || !PlatformDetection.IsWindows }; yield return new object[] { "HTTP_PROXY", cgi, !cgi }; } } [Theory] [MemberData(nameof(HttpProxyCgiEnvVarMemberData))] - [PlatformSpecific(~TestPlatforms.Windows)] public void HttpProxy_TryCreateAndPossibleCgi_HttpProxyUpperCaseDisabledInCgi( string proxyEnvVar, bool cgi, bool expectedProxyUse) { diff --git a/src/System.Net.Http/tests/UnitTests/System.Net.Http.Unit.Tests.csproj b/src/System.Net.Http/tests/UnitTests/System.Net.Http.Unit.Tests.csproj index b04639cdbabb..e07d99e11758 100644 --- a/src/System.Net.Http/tests/UnitTests/System.Net.Http.Unit.Tests.csproj +++ b/src/System.Net.Http/tests/UnitTests/System.Net.Http.Unit.Tests.csproj @@ -297,6 +297,12 @@ ProductionCode\System\Net\Http\SocketsHttpHandler\HttpEnvironmentProxy.cs + + ProductionCode\System\Net\Http\SocketsHttpHandler\HttpEnvironmentProxy.Unix.cs + + + ProductionCode\System\Net\Http\SocketsHttpHandler\HttpEnvironmentProxy.Windows.cs + ProductionCode\System\Net\Http\SocketsHttpHandler\HPack\HeaderField.cs @@ -309,11 +315,21 @@ ProductionCode\System\Net\Http\SocketsHttpHandler\HPack\StaticTable.cs + + ProductionCode\System\Net\Http\SocketsHttpHandler\SystemProxyInfo.OSX.cs + + + ProductionCode\System\Net\Http\SocketsHttpHandler\SystemProxyInfo.Unix.cs + + + ProductionCode\System\Net\Http\SocketsHttpHandler\SystemProxyInfo.Windows.cs + ProductionCode\System\Net\Http\HttpHandlerDefaults.cs + @@ -373,6 +389,7 @@ + ProductionCode\System\Net\Http\HttpSystemProxy.cs diff --git a/src/System.Net.Http/tests/UnitTests/SystemProxyInfoTest.cs b/src/System.Net.Http/tests/UnitTests/SystemProxyInfoTest.cs new file mode 100644 index 000000000000..33943c53f24f --- /dev/null +++ b/src/System.Net.Http/tests/UnitTests/SystemProxyInfoTest.cs @@ -0,0 +1,63 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Collections.Generic; +using System.Net.Http; +using Microsoft.DotNet.RemoteExecutor; +using Xunit; + +namespace System.Net.Http.Tests +{ + public class SystemProxyInfoTest + { + // This will clean specific environmental variables + // to be sure they do not interfere with the test. + private void CleanEnv() + { + var envVars = new List { "http_proxy", "HTTP_PROXY", + "https_proxy", "HTTPS_PROXY", + "all_proxy", "ALL_PROXY", + "no_proxy", "NO_PROXY", + "GATEWAY_INTERFACE" }; + + foreach (string v in envVars) + { + Environment.SetEnvironmentVariable(v, null); + } + } + + public SystemProxyInfoTest() + { + CleanEnv(); + } + + [Fact] + public void Ctor_NoEnvironmentVariables_NotHttpEnvironmentProxy() + { + RemoteExecutor.Invoke(() => + { + IWebProxy proxy = SystemProxyInfo.ConstructSystemProxy(); + HttpEnvironmentProxy envProxy = proxy as HttpEnvironmentProxy; + Assert.Null(envProxy); + + return RemoteExecutor.SuccessExitCode; + }).Dispose(); + } + + [Fact] + public void Ctor_ProxyEnvironmentVariableSet_IsHttpEnvironmentProxy() + { + var options = new RemoteInvokeOptions(); + options.StartInfo.EnvironmentVariables.Add("http_proxy", "http://proxy.contoso.com"); + RemoteExecutor.Invoke(() => + { + IWebProxy proxy = SystemProxyInfo.ConstructSystemProxy(); + HttpEnvironmentProxy envProxy = proxy as HttpEnvironmentProxy; + Assert.NotNull(envProxy); + + return RemoteExecutor.SuccessExitCode; + }, options).Dispose(); + } + } +} From fdef3abf351a6af5b33c2f935e9a27e65b22f848 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Sun, 28 Apr 2019 13:13:04 +0000 Subject: [PATCH 085/607] Update dependencies from https://github.com/dotnet/core-setup build 20190428.03 (#37256) - Microsoft.NETCore.App - 3.0.0-preview6-27628-03 - Microsoft.NETCore.DotNetHostPolicy - 3.0.0-preview6-27628-03 - Microsoft.NETCore.DotNetHost - 3.0.0-preview6-27628-03 --- eng/Version.Details.xml | 12 ++++++------ eng/Versions.props | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 1fcfecfd4a22..20c8d6f2ace2 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -14,17 +14,17 @@ - + https://github.com/dotnet/core-setup - dfdc7bc432fc67e1cba68176d664bff16c7fff84 + 3cae3dfe319d7fe2b7ec5af161c0648bb1d6f4c4 - + https://github.com/dotnet/core-setup - dfdc7bc432fc67e1cba68176d664bff16c7fff84 + 3cae3dfe319d7fe2b7ec5af161c0648bb1d6f4c4 - + https://github.com/dotnet/core-setup - dfdc7bc432fc67e1cba68176d664bff16c7fff84 + 3cae3dfe319d7fe2b7ec5af161c0648bb1d6f4c4 https://github.com/dotnet/corefx diff --git a/eng/Versions.props b/eng/Versions.props index 0fa525748f72..cfa88e9bfc24 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -36,9 +36,9 @@ 2.2.0-beta.19225.5 1.0.0-beta.19225.5 - 3.0.0-preview6-27627-02 - 3.0.0-preview6-27627-02 - 3.0.0-preview6-27627-02 + 3.0.0-preview6-27628-03 + 3.0.0-preview6-27628-03 + 3.0.0-preview6-27628-03 3.0.0-preview6-27624-71 3.0.0-preview6-27624-71 From 81c8c68d81daad033251d643e230061f38a9ae3a Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Sun, 28 Apr 2019 13:13:33 +0000 Subject: [PATCH 086/607] Update dependencies from https://github.com/dotnet/corefx build 20190427.7 (#37257) - runtime.native.System.IO.Ports - 4.6.0-preview6.19227.7 - Microsoft.NETCore.Platforms - 3.0.0-preview6.19227.7 --- eng/Version.Details.xml | 8 ++++---- eng/Versions.props | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 20c8d6f2ace2..9321bdcbc367 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -26,13 +26,13 @@ https://github.com/dotnet/core-setup 3cae3dfe319d7fe2b7ec5af161c0648bb1d6f4c4 - + https://github.com/dotnet/corefx - 4ff66e551b07802a4021d538633d77d3ee66ec89 + 4f27d0f84c17850ef02ea7b330908fddcdf73c86 - + https://github.com/dotnet/corefx - 4ff66e551b07802a4021d538633d77d3ee66ec89 + 4f27d0f84c17850ef02ea7b330908fddcdf73c86 https://github.com/dotnet/arcade diff --git a/eng/Versions.props b/eng/Versions.props index cfa88e9bfc24..2adc192f1371 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -43,8 +43,8 @@ 3.0.0-preview6-27624-71 3.0.0-preview6-27624-71 - 3.0.0-preview6.19226.9 - 4.6.0-preview6.19226.9 + 3.0.0-preview6.19227.7 + 4.6.0-preview6.19227.7 2.1.0-prerelease.19224.1 From 173a2a165316af9a4e211ceab8c8d9692de8a528 Mon Sep 17 00:00:00 2001 From: Ben Adams Date: Mon, 29 Apr 2019 10:18:30 +0100 Subject: [PATCH 087/607] Don't allocate two strings in Activity.GenerateRootId (#37165) * Don't allocate two strings in Activity.GenerateRootId * Packaging * packaging * Feedback * feedback --- ...System.Diagnostics.DiagnosticSource.csproj | 6 +++++ .../Activity.GenerateRootId.netcoreapp.cs | 26 +++++++++++++++++++ .../Activity.GenerateRootId.netfx.cs | 19 ++++++++++++++ .../src/System/Diagnostics/Activity.cs | 8 ------ 4 files changed, 51 insertions(+), 8 deletions(-) create mode 100644 src/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/Activity.GenerateRootId.netcoreapp.cs create mode 100644 src/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/Activity.GenerateRootId.netfx.cs diff --git a/src/System.Diagnostics.DiagnosticSource/src/System.Diagnostics.DiagnosticSource.csproj b/src/System.Diagnostics.DiagnosticSource/src/System.Diagnostics.DiagnosticSource.csproj index e65db5cda764..b40efde8a808 100644 --- a/src/System.Diagnostics.DiagnosticSource/src/System.Diagnostics.DiagnosticSource.csproj +++ b/src/System.Diagnostics.DiagnosticSource/src/System.Diagnostics.DiagnosticSource.csproj @@ -44,6 +44,12 @@ + + + + + + diff --git a/src/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/Activity.GenerateRootId.netcoreapp.cs b/src/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/Activity.GenerateRootId.netcoreapp.cs new file mode 100644 index 000000000000..adcfe2f44a42 --- /dev/null +++ b/src/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/Activity.GenerateRootId.netcoreapp.cs @@ -0,0 +1,26 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; +using System.Threading; + +namespace System.Diagnostics +{ + partial class Activity + { + private static string GenerateRootId() + { + // It is important that the part that changes frequently be first, because + // some sampling functions don't sample from the high entropy part of their hash function. + // This makes sampling based on this produce poor samples. + Debug.Assert(s_uniqSuffix.Length < 50); // Ensure stackalloc not too large + Span result = stackalloc char[1 + 16 + s_uniqSuffix.Length]; // max length needed + result[0] = '|'; + bool formatted = Interlocked.Increment(ref s_currentRootId).TryFormat(result.Slice(1), out int charsWritten, "x"); + Debug.Assert(formatted); + s_uniqSuffix.AsSpan().CopyTo(result.Slice(1 + charsWritten)); + return new string(result.Slice(0, 1 + charsWritten + s_uniqSuffix.Length)); + } + } +} diff --git a/src/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/Activity.GenerateRootId.netfx.cs b/src/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/Activity.GenerateRootId.netfx.cs new file mode 100644 index 000000000000..21fda96dcb3a --- /dev/null +++ b/src/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/Activity.GenerateRootId.netfx.cs @@ -0,0 +1,19 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Threading; + +namespace System.Diagnostics +{ + partial class Activity + { + private static string GenerateRootId() + { + // It is important that the part that changes frequently be first, because + // some sampling functions don't sample from the high entropy part of their hash function. + // This makes sampling based on this produce poor samples. + return '|' + Interlocked.Increment(ref s_currentRootId).ToString("x") + s_uniqSuffix; + } + } +} diff --git a/src/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/Activity.cs b/src/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/Activity.cs index ded9ee93de2e..609744f6fdd7 100644 --- a/src/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/Activity.cs +++ b/src/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/Activity.cs @@ -745,14 +745,6 @@ private string AppendSuffix(string parentId, string suffix, char delimiter) string overflowSuffix = ((int)GetRandomNumber()).ToString("x8"); return parentId.Substring(0, trimPosition) + overflowSuffix + '#'; } - - private string GenerateRootId() - { - // It is important that the part that changes frequently be first, because - // many hash functions don't 'randomize' the tail of a string. This makes - // sampling based on the hash produce poor samples. - return '|' + Interlocked.Increment(ref s_currentRootId).ToString("x") + s_uniqSuffix; - } #if ALLOW_PARTIALLY_TRUSTED_CALLERS [System.Security.SecuritySafeCriticalAttribute] #endif From 7066a0cac2cadd21ca144cc78d1b1fab9b1f9cd7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Strehovsk=C3=BD?= Date: Mon, 29 Apr 2019 15:06:36 +0200 Subject: [PATCH 088/607] Remove `Partial` from `EnablePartialNgenOptimization` (#36962) Ngen optimizations are controlled with two properties - one is EnableNgen, the other is ApplyNgen. We were already using the ApplyNgen property with value of `full` (as of #36450), so this was already doing full Ngen, but we still used EnablePartialNgen to control the EnableNgen property. It's a roundabout way to EnableNgen, but does the same thing. This pull request removes the indirection. --- Directory.Build.props | 2 +- external/dir.proj | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index 05f23e1bf042..dc6989618df6 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -267,7 +267,7 @@ - true + true optimization.windows_nt-x64.IBC.CoreFx $(optimizationwindows_ntx64IBCCoreFxPackageVersion) diff --git a/external/dir.proj b/external/dir.proj index fccddc9f626d..cb86099dbf35 100644 --- a/external/dir.proj +++ b/external/dir.proj @@ -17,7 +17,7 @@ - + From 5a36da2d2cc19718dfffc5f05ca42541f4d8d8c6 Mon Sep 17 00:00:00 2001 From: Tomas Weinfurt Date: Mon, 29 Apr 2019 09:41:33 -0700 Subject: [PATCH 089/607] fix noencryption tests on platforms with tls1.3 (#37213) * fix noencryption tests on platforms with tls1.3 * feedback from review * fix platform detection --- .../ref/CoreFx.Private.TestUtilities.cs | 1 + .../src/System/PlatformDetection.cs | 5 +++-- .../tests/FunctionalTests/ServerAllowNoEncryptionTest.cs | 3 ++- .../tests/FunctionalTests/ServerNoEncryptionTest.cs | 3 ++- .../tests/FunctionalTests/ServerRequireEncryptionTest.cs | 2 +- .../FunctionalTests/SslStreamNegotiatedCipherSuiteTest.cs | 2 +- 6 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/CoreFx.Private.TestUtilities/ref/CoreFx.Private.TestUtilities.cs b/src/CoreFx.Private.TestUtilities/ref/CoreFx.Private.TestUtilities.cs index 00a65a93bfab..ba807993d1fb 100644 --- a/src/CoreFx.Private.TestUtilities/ref/CoreFx.Private.TestUtilities.cs +++ b/src/CoreFx.Private.TestUtilities/ref/CoreFx.Private.TestUtilities.cs @@ -130,6 +130,7 @@ public static partial class PlatformDetection public static bool SupportsAlpn { get { throw null; } } public static bool SupportsClientAlpn { get { throw null; } } public static bool SupportsSsl3 { get { throw null; } } + public static bool SupportsTls13 { get { throw null; } } public static bool TargetsNetFx452OrLower { get { throw null; } } public static int WindowsVersion { get { throw null; } } public static string GetDistroVersionString() { throw null; } diff --git a/src/CoreFx.Private.TestUtilities/src/System/PlatformDetection.cs b/src/CoreFx.Private.TestUtilities/src/System/PlatformDetection.cs index 3413e1497f80..087f5040fed8 100644 --- a/src/CoreFx.Private.TestUtilities/src/System/PlatformDetection.cs +++ b/src/CoreFx.Private.TestUtilities/src/System/PlatformDetection.cs @@ -57,8 +57,9 @@ public static partial class PlatformDetection public static bool SupportsAlpn => (IsWindows && !IsWindows7) || ((!IsOSX && !IsWindows) && (OpenSslVersion.Major >= 1 && (OpenSslVersion.Minor >= 1 || OpenSslVersion.Build >= 2))); - public static bool SupportsClientAlpn => SupportsAlpn || - (RuntimeInformation.IsOSPlatform(OSPlatform.OSX) && PlatformDetection.OSXVersion > new Version(10, 12)); + public static bool SupportsClientAlpn => SupportsAlpn || (IsOSX && PlatformDetection.OSXVersion > new Version(10, 12)); + // OpenSSL 1.1.1 and above. + public static bool SupportsTls13 => !IsWindows && !IsOSX && (OpenSslVersion.CompareTo(new Version(1,1,1)) >= 0); // Officially, .NET Native only supports processes running in an AppContainer. However, the majority of tests still work fine // in a normal Win32 process and we often do so as running in an AppContainer imposes a substantial tax in debuggability diff --git a/src/System.Net.Security/tests/FunctionalTests/ServerAllowNoEncryptionTest.cs b/src/System.Net.Security/tests/FunctionalTests/ServerAllowNoEncryptionTest.cs index 6a56af4d3345..12918eaf9c2a 100644 --- a/src/System.Net.Security/tests/FunctionalTests/ServerAllowNoEncryptionTest.cs +++ b/src/System.Net.Security/tests/FunctionalTests/ServerAllowNoEncryptionTest.cs @@ -83,7 +83,8 @@ public async Task ServerAllowNoEncryption_ClientNoEncryption_ConnectWithNoEncryp using (var sslStream = new SslStream(client.GetStream(), false, AllowAnyServerCertificate, null, EncryptionPolicy.NoEncryption)) { - await sslStream.AuthenticateAsClientAsync("localhost", null, SslProtocolSupport.DefaultSslProtocols, false); + // null encryption is not permitted with Tls13 + await sslStream.AuthenticateAsClientAsync("localhost", null, SslProtocols.Tls | SslProtocols.Tls11 | SslProtocols.Tls12, false); _log.WriteLine("Client authenticated to server({0}) with encryption cipher: {1} {2}-bit strength", serverAllowNoEncryption.RemoteEndPoint, sslStream.CipherAlgorithm, sslStream.CipherStrength); diff --git a/src/System.Net.Security/tests/FunctionalTests/ServerNoEncryptionTest.cs b/src/System.Net.Security/tests/FunctionalTests/ServerNoEncryptionTest.cs index 00093db3414d..c1a3ddb0bfcb 100644 --- a/src/System.Net.Security/tests/FunctionalTests/ServerNoEncryptionTest.cs +++ b/src/System.Net.Security/tests/FunctionalTests/ServerNoEncryptionTest.cs @@ -85,7 +85,8 @@ public async Task ServerNoEncryption_ClientNoEncryption_ConnectWithNoEncryption( { if (SupportsNullEncryption) { - await sslStream.AuthenticateAsClientAsync("localhost", null, SslProtocolSupport.DefaultSslProtocols, false); + // null encryption is not permitted with Tls13 + await sslStream.AuthenticateAsClientAsync("localhost", null, SslProtocols.Tls | SslProtocols.Tls11 | SslProtocols.Tls12, false); _log.WriteLine("Client authenticated to server({0}) with encryption cipher: {1} {2}-bit strength", serverNoEncryption.RemoteEndPoint, sslStream.CipherAlgorithm, sslStream.CipherStrength); diff --git a/src/System.Net.Security/tests/FunctionalTests/ServerRequireEncryptionTest.cs b/src/System.Net.Security/tests/FunctionalTests/ServerRequireEncryptionTest.cs index b94314d871bb..8d6c3ba0c561 100644 --- a/src/System.Net.Security/tests/FunctionalTests/ServerRequireEncryptionTest.cs +++ b/src/System.Net.Security/tests/FunctionalTests/ServerRequireEncryptionTest.cs @@ -83,7 +83,7 @@ public async Task ServerRequireEncryption_ClientNoEncryption_NoConnect() using (var sslStream = new SslStream(client.GetStream(), false, AllowAnyServerCertificate, null, EncryptionPolicy.NoEncryption)) { await Assert.ThrowsAsync(() => - sslStream.AuthenticateAsClientAsync("localhost", null, SslProtocolSupport.DefaultSslProtocols, false)); + sslStream.AuthenticateAsClientAsync("localhost", null, SslProtocols.Tls | SslProtocols.Tls11 | SslProtocols.Tls12, false)); } } } diff --git a/src/System.Net.Security/tests/FunctionalTests/SslStreamNegotiatedCipherSuiteTest.cs b/src/System.Net.Security/tests/FunctionalTests/SslStreamNegotiatedCipherSuiteTest.cs index 18c77ff665dc..971fa026a138 100644 --- a/src/System.Net.Security/tests/FunctionalTests/SslStreamNegotiatedCipherSuiteTest.cs +++ b/src/System.Net.Security/tests/FunctionalTests/SslStreamNegotiatedCipherSuiteTest.cs @@ -28,7 +28,7 @@ public class NegotiatedCipherSuiteTest private const SslProtocols NonTls13Protocols = AllProtocols & (~SslProtocols.Tls13); - private static bool IsKnownPlatformSupportingTls13 => PlatformDetection.IsUbuntu1810OrHigher; + private static bool IsKnownPlatformSupportingTls13 => PlatformDetection.SupportsTls13; private static bool CipherSuitesPolicySupported => s_cipherSuitePolicySupported.Value; private static bool Tls13Supported { get; set; } = IsKnownPlatformSupportingTls13 || ProtocolsSupported(SslProtocols.Tls13); private static bool CipherSuitesPolicyAndTls13Supported => Tls13Supported && CipherSuitesPolicySupported; From d6e7cbf4f3226f644c114443e617ba53fe686be7 Mon Sep 17 00:00:00 2001 From: Stephen Toub Date: Mon, 29 Apr 2019 13:02:51 -0400 Subject: [PATCH 090/607] Improve a ClientWebSocket connection failure error message (#37267) --- src/System.Net.WebSockets.Client/src/Resources/Strings.resx | 3 +++ .../src/System/Net/WebSockets/WebSocketHandle.Managed.cs | 4 +--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/System.Net.WebSockets.Client/src/Resources/Strings.resx b/src/System.Net.WebSockets.Client/src/Resources/Strings.resx index 3b7e1b596a84..7a1231eb9707 100644 --- a/src/System.Net.WebSockets.Client/src/Resources/Strings.resx +++ b/src/System.Net.WebSockets.Client/src/Resources/Strings.resx @@ -137,6 +137,9 @@ The server returned status code '{0}' when status code '101' was expected. + + The server's response was missing the required header '{0}'. + The '{0}' instance cannot be used for communication because it has been transitioned into the '{1}' state. diff --git a/src/System.Net.WebSockets.Client/src/System/Net/WebSockets/WebSocketHandle.Managed.cs b/src/System.Net.WebSockets.Client/src/System/Net/WebSockets/WebSocketHandle.Managed.cs index 6f673ea36456..1f1e7054e0ef 100644 --- a/src/System.Net.WebSockets.Client/src/System/Net/WebSockets/WebSocketHandle.Managed.cs +++ b/src/System.Net.WebSockets.Client/src/System/Net/WebSockets/WebSocketHandle.Managed.cs @@ -273,7 +273,7 @@ private static void ValidateHeader(HttpHeaders headers, string name, string expe { if (!headers.TryGetValues(name, out IEnumerable values)) { - ThrowConnectFailure(); + throw new WebSocketException(WebSocketError.Faulted, SR.Format(SR.net_WebSockets_MissingResponseHeader, name)); } Debug.Assert(values is string[]); @@ -283,7 +283,5 @@ private static void ValidateHeader(HttpHeaders headers, string name, string expe throw new WebSocketException(WebSocketError.HeaderError, SR.Format(SR.net_WebSockets_InvalidResponseHeader, name, string.Join(", ", array))); } } - - private static void ThrowConnectFailure() => throw new WebSocketException(WebSocketError.Faulted, SR.net_webstatus_ConnectFailure); } } From 7237da089c09531c36a2110a3bdd9ccaf7c05d77 Mon Sep 17 00:00:00 2001 From: Stephen Toub Date: Mon, 29 Apr 2019 13:51:29 -0400 Subject: [PATCH 091/607] Clean up HTTP/2 protocol exception handling (#37223) * Clean up HTTP/2 protocol exception handling - Propagate the GOAWAY and RST_STREAM error codes to the calling code via an exception. - Propagate to the Http2Stream exceptions incurred in the Http2Connection and that result in an Abort. - Don't Dispose of the Http2Stream before we try to Cancel it. - Make Http2ProtocolException serializable, as we generally do that for all of our exception types. - Add tests that verify sufficient HTTP/2 protocol details are in the exception messages. - Clean up the error message for the exception. - Separate the error code and exception into their own files. - Leave Http2ProtocolException internal for now; we can expose it publicly when we design the all-up public error model for HttpClient. * Address PR feedback --- .../src/Resources/Strings.resx | 3 + .../src/System.Net.Http.csproj | 2 + .../SocketsHttpHandler/Http2Connection.cs | 98 +++------ .../Http2ProtocolErrorCode.cs | 44 ++++ .../Http2ProtocolException.cs | 69 +++++++ .../Http/SocketsHttpHandler/Http2Stream.cs | 9 +- .../HttpClientHandlerTest.Http2.cs | 190 +++++++++++------- .../HttpClientHandlerTest.TrailingHeaders.cs | 28 +++ 8 files changed, 300 insertions(+), 143 deletions(-) create mode 100644 src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http2ProtocolErrorCode.cs create mode 100644 src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http2ProtocolException.cs diff --git a/src/System.Net.Http/src/Resources/Strings.resx b/src/System.Net.Http/src/Resources/Strings.resx index 466670154b18..93cdd56ed5d6 100644 --- a/src/System.Net.Http/src/Resources/Strings.resx +++ b/src/System.Net.Http/src/Resources/Strings.resx @@ -443,6 +443,9 @@ Error {0} calling {1}, '{2}'. + + The HTTP/2 request failed with protocol error '{0}' (0x{1}). + This method is not implemented by this class. diff --git a/src/System.Net.Http/src/System.Net.Http.csproj b/src/System.Net.Http/src/System.Net.Http.csproj index 555d6d9e6041..fde227d811b8 100644 --- a/src/System.Net.Http/src/System.Net.Http.csproj +++ b/src/System.Net.Http/src/System.Net.Http.csproj @@ -140,6 +140,8 @@ + + diff --git a/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http2Connection.cs b/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http2Connection.cs index f1924f6d9d08..029185f952d9 100644 --- a/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http2Connection.cs +++ b/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http2Connection.cs @@ -162,9 +162,9 @@ private async Task FlushOutgoingBytesAsync() { await _stream.WriteAsync(_outgoingBuffer.ActiveMemory).ConfigureAwait(false); } - catch (Exception) + catch (Exception e) { - Abort(); + Abort(e); throw; } finally @@ -251,9 +251,9 @@ private async void ProcessIncomingFrames() } } } - catch (Exception) + catch (Exception e) { - Abort(); + Abort(e); } } @@ -604,12 +604,11 @@ private void ProcessRstStreamFrame(FrameHeader frameHeader) return; } - _incomingBuffer.Discard(frameHeader.Length); + var protocolError = (Http2ProtocolErrorCode)BinaryPrimitives.ReadInt32BigEndian(_incomingBuffer.ActiveSpan); - // CONSIDER: We ignore the error code in the RST_STREAM frame. - // We could read this and report it to the user as part of the request exception. + _incomingBuffer.Discard(frameHeader.Length); - http2Stream.OnResponseAbort(); + http2Stream.OnResponseAbort(new Http2ProtocolException(protocolError)); RemoveStream(http2Stream); } @@ -630,9 +629,10 @@ private void ProcessGoAwayFrame(FrameHeader frameHeader) throw new Http2ProtocolException(Http2ProtocolErrorCode.ProtocolError); } - int lastValidStream = (int)((uint)((_incomingBuffer.ActiveSpan[0] << 24) | (_incomingBuffer.ActiveSpan[1] << 16) | (_incomingBuffer.ActiveSpan[2] << 8) | _incomingBuffer.ActiveSpan[3]) & 0x7FFFFFFF); + int lastValidStream = (int)(BinaryPrimitives.ReadUInt32BigEndian(_incomingBuffer.ActiveSpan) & 0x7FFFFFFF); + var errorCode = (Http2ProtocolErrorCode)BinaryPrimitives.ReadInt32BigEndian(_incomingBuffer.ActiveSpan.Slice(sizeof(int))); - AbortStreams(lastValidStream); + AbortStreams(lastValidStream, new Http2ProtocolException(errorCode)); _incomingBuffer.Discard(frameHeader.Length); } @@ -1113,11 +1113,11 @@ private void WriteFrameHeader(FrameHeader frameHeader) _outgoingBuffer.Commit(FrameHeader.Size); } - private void Abort() + private void Abort(Exception abortException) { // The connection has failed, e.g. failed IO or a connection-level frame error. // Abort all streams and cause further processing to fail. - AbortStreams(0); + AbortStreams(0, abortException); } private bool IsAborted() @@ -1160,7 +1160,7 @@ public bool IsExpired(int nowTicks, return LifetimeExpired(nowTicks, connectionLifetime); } - private void AbortStreams(int lastValidStream) + private void AbortStreams(int lastValidStream, Exception abortException) { lock (SyncObject) { @@ -1178,7 +1178,7 @@ private void AbortStreams(int lastValidStream) if (streamId > lastValidStream) { - kvp.Value.OnResponseAbort(); + kvp.Value.OnResponseAbort(abortException); _httpStreams.Remove(kvp.Value.StreamId); } @@ -1338,8 +1338,6 @@ private enum SettingId : ushort public sealed override async Task SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) { - // TODO: ISSUE 31310: Cancellation support - Http2Stream http2Stream = null; try { @@ -1354,20 +1352,13 @@ public sealed override async Task SendAsync(HttpRequestMess } catch (Exception e) { - http2Stream?.Dispose(); + Exception replacementException = null; - if (e is IOException) - { - throw new HttpRequestException(SR.net_http_client_execution_error, e); - } - else if (e is ObjectDisposedException) - { - throw new HttpRequestException(SR.net_http_client_execution_error, e); - } - else if (e is Http2ProtocolException) + if (e is IOException || + e is ObjectDisposedException || + e is Http2ProtocolException) { - // ISSUE 31315: Determine if/how to expose HTTP2 error codes - throw new HttpRequestException(SR.net_http_client_execution_error, e); + replacementException = new HttpRequestException(SR.net_http_client_execution_error, e); } else if (e is OperationCanceledException oce) { @@ -1377,17 +1368,19 @@ public sealed override async Task SendAsync(HttpRequestMess http2Stream.Cancel(); } - if (oce.CancellationToken == cancellationToken) + if (oce.CancellationToken != cancellationToken) { - throw; + replacementException = new OperationCanceledException(oce.Message, oce, cancellationToken); } - - throw new OperationCanceledException(cancellationToken); } - else + + http2Stream?.Dispose(); + + if (replacementException != null) { - throw; + throw replacementException; } + throw; } return http2Stream.Response; @@ -1401,7 +1394,7 @@ private Http2Stream AddStream(HttpRequestMessage request) { // Throw a retryable request exception. This will cause retry logic to kick in // and perform another connection attempt. The user should never see this exception. - throw new HttpRequestException(null, null, true); + throw new HttpRequestException(null, null, allowRetry: true); } int streamId = _nextStream; @@ -1443,40 +1436,7 @@ private void RemoveStream(Http2Stream http2Stream) } } - // TODO: ISSUE 31315: Should this be public? - internal enum Http2ProtocolErrorCode - { - NoError = 0x0, - ProtocolError = 0x1, - InternalError = 0x2, - FlowControlError = 0x3, - SettingsTimeout = 0x4, - StreamClosed = 0x5, - FrameSizeError = 0x6, - RefusedStream = 0x7, - Cancel = 0x8, - CompressionError = 0x9, - ConnectError = 0xa, - EnhanceYourCalm = 0xb, - InadequateSecurity = 0xc, - Http11Required = 0xd - } - - // TODO: ISSUE 31315: Should this be public? - internal class Http2ProtocolException : Exception - { - private readonly Http2ProtocolErrorCode _errorCode; - - public Http2ProtocolException(Http2ProtocolErrorCode errorCode) - : base($"Http2 Protocol Error, errorCode = {errorCode}") - { - _errorCode = errorCode; - } - - public Http2ProtocolErrorCode ErrorCode => _errorCode; - } - - internal static async ValueTask ReadAtLeastAsync(Stream stream, Memory buffer, int minReadBytes) + private static async ValueTask ReadAtLeastAsync(Stream stream, Memory buffer, int minReadBytes) { Debug.Assert(buffer.Length >= minReadBytes); diff --git a/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http2ProtocolErrorCode.cs b/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http2ProtocolErrorCode.cs new file mode 100644 index 000000000000..ffc1e896f7e0 --- /dev/null +++ b/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http2ProtocolErrorCode.cs @@ -0,0 +1,44 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +namespace System.Net.Http +{ + // NOTE: If any additional error codes are added here, they should also be added to Http2ProtocolException's mapping. + + /// + /// Error codes defined by the HTTP/2 protocol, used in RST_STREAM and GOAWAY frames to convey the reasons for the stream or connection error. + /// https://http2.github.io/http2-spec/#PROTOCOL_ERROR + /// + internal enum Http2ProtocolErrorCode + { + /// The associated condition is not a result of an error. + NoError = 0x0, + /// The endpoint detected an unspecific protocol error. This error is for use when a more specific error code is not available. + ProtocolError = 0x1, + /// The endpoint encountered an unexpected internal error. + InternalError = 0x2, + /// The endpoint detected that its peer violated the flow-control protocol. + FlowControlError = 0x3, + /// The endpoint sent a SETTINGS frame but did not receive a response in a timely manner. + SettingsTimeout = 0x4, + /// The endpoint received a frame after a stream was half-closed. + StreamClosed = 0x5, + /// The endpoint received a frame with an invalid size. + FrameSizeError = 0x6, + /// The endpoint refused the stream prior to performing any application processing. + RefusedStream = 0x7, + /// Used by the endpoint to indicate that the stream is no longer needed. + Cancel = 0x8, + /// The endpoint is unable to maintain the header compression context for the connection. + CompressionError = 0x9, + /// The connection established in response to a CONNECT request was reset or abnormally closed. + ConnectError = 0xa, + /// The endpoint detected that its peer is exhibiting a behavior that might be generating excessive load. + EnhanceYourCalm = 0xb, + /// The underlying transport has properties that do not meet minimum security requirements. + InadequateSecurity = 0xc, + /// The endpoint requires that HTTP/1.1 be used instead of HTTP/2. + Http11Required = 0xd + } +} diff --git a/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http2ProtocolException.cs b/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http2ProtocolException.cs new file mode 100644 index 000000000000..f2b135ca8b7e --- /dev/null +++ b/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http2ProtocolException.cs @@ -0,0 +1,69 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Diagnostics; +using System.Runtime.Serialization; + +namespace System.Net.Http +{ + [Serializable] + internal sealed class Http2ProtocolException : Exception + { + public Http2ProtocolException(Http2ProtocolErrorCode protocolError) + : base(SR.Format(SR.net_http_http2_protocol_error, GetName(protocolError), ((int)protocolError).ToString("x"))) + { + ProtocolError = protocolError; + } + + private Http2ProtocolException(SerializationInfo info, StreamingContext context) : base(info, context) + { + ProtocolError = (Http2ProtocolErrorCode)info.GetInt32(nameof(ProtocolError)); + } + + public override void GetObjectData(SerializationInfo info, StreamingContext context) + { + info.AddValue(nameof(ProtocolError), (int)ProtocolError); + base.GetObjectData(info, context); + } + + internal Http2ProtocolErrorCode ProtocolError { get; } + + private static string GetName(Http2ProtocolErrorCode code) + { + // These strings are the names used in the HTTP2 spec and should not be localized. + switch (code) + { + case Http2ProtocolErrorCode.NoError: + return "NO_ERROR"; + default: // any unrecognized error code is treated as a protocol error + case Http2ProtocolErrorCode.ProtocolError: + return "PROTOCOL_ERROR"; + case Http2ProtocolErrorCode.InternalError: + return "INTERNAL_ERROR"; + case Http2ProtocolErrorCode.FlowControlError: + return "FLOW_CONTROL_ERROR"; + case Http2ProtocolErrorCode.SettingsTimeout: + return "SETTINGS_TIMEOUT"; + case Http2ProtocolErrorCode.StreamClosed: + return "STREAM_CLOSED"; + case Http2ProtocolErrorCode.FrameSizeError: + return "FRAME_SIZE_ERROR"; + case Http2ProtocolErrorCode.RefusedStream: + return "REFUSED_STREAM"; + case Http2ProtocolErrorCode.Cancel: + return "CANCEL"; + case Http2ProtocolErrorCode.CompressionError: + return "COMPRESSION_ERROR"; + case Http2ProtocolErrorCode.ConnectError: + return "CONNECT_ERROR"; + case Http2ProtocolErrorCode.EnhanceYourCalm: + return "ENHANCE_YOUR_CALM"; + case Http2ProtocolErrorCode.InadequateSecurity: + return "INADEQUATE_SECURITY"; + case Http2ProtocolErrorCode.Http11Required: + return "HTTP_1_1_REQUIRED"; + } + } + } +} diff --git a/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http2Stream.cs b/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http2Stream.cs index b322ad7287ae..53f793c515e0 100644 --- a/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http2Stream.cs +++ b/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http2Stream.cs @@ -43,6 +43,7 @@ private enum StreamState : byte private StreamState _state; private bool _disposed; + private Exception _abortException; /// The core logic for the IValueTaskSource implementation. private ManualResetValueTaskSourceCore _waitSource = new ManualResetValueTaskSourceCore { RunContinuationsAsynchronously = true }; // mutable struct, do not make this readonly @@ -262,7 +263,7 @@ public void OnResponseData(ReadOnlySpan buffer, bool endStream) } } - public void OnResponseAbort() + public void OnResponseAbort(Exception abortException) { bool signalWaiter; lock (SyncObject) @@ -277,6 +278,7 @@ public void OnResponseAbort() return; } + _abortException = abortException; _state = StreamState.Aborted; signalWaiter = _hasWaiter; @@ -300,7 +302,7 @@ public void OnResponseAbort() if (_state == StreamState.Aborted) { - throw new IOException(SR.net_http_request_aborted); + throw new IOException(SR.net_http_request_aborted, _abortException); } else if (_state == StreamState.ExpectingHeaders) { @@ -393,7 +395,7 @@ private void ExtendWindow(int amount) } else if (_state == StreamState.Aborted) { - throw new IOException(SR.net_http_request_aborted); + throw new IOException(SR.net_http_request_aborted, _abortException); } Debug.Assert(_state == StreamState.ExpectingData || _state == StreamState.ExpectingTrailingHeaders); @@ -493,6 +495,7 @@ public void Cancel() lock (SyncObject) { Task ignored = _connection.SendRstStreamAsync(_streamId, Http2ProtocolErrorCode.Cancel); + _abortException = new OperationCanceledException(); _state = StreamState.Aborted; signalWaiter = _hasWaiter; diff --git a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Http2.cs b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Http2.cs index d25d7cc7c99a..176b4093e8b6 100644 --- a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Http2.cs +++ b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Http2.cs @@ -2,7 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System.Collections.Generic; using System.Diagnostics; +using System.Linq; using System.Net.Test.Common; using System.Threading; using System.Threading.Tasks; @@ -21,6 +23,37 @@ public abstract class HttpClientHandlerTest_Http2 : HttpClientHandlerTestBase public HttpClientHandlerTest_Http2(ITestOutputHelper output) : base(output) { } + private async Task AssertProtocolErrorAsync(Task task, ProtocolErrors errorCode) + { + Exception e = await Assert.ThrowsAsync(() => task); + if (UseSocketsHttpHandler) + { + string text = e.ToString(); + Assert.Contains(((int)errorCode).ToString("x"), text); + Assert.Contains( + Enum.IsDefined(typeof(ProtocolErrors), errorCode) ? errorCode.ToString() : ProtocolErrors.PROTOCOL_ERROR.ToString(), + text); + } + } + + public enum ProtocolErrors + { + NO_ERROR = 0x0, + PROTOCOL_ERROR = 0x1, + INTERNAL_ERROR = 0x2, + FLOW_CONTROL_ERROR = 0x3, + SETTINGS_TIMEOUT = 0x4, + STREAM_CLOSED = 0x5, + FRAME_SIZE_ERROR = 0x6, + REFUSED_STREAM = 0x7, + CANCEL = 0x8, + COMPRESSION_ERROR = 0x9, + CONNECT_ERROR = 0xa, + ENHANCE_YOUR_CALM = 0xb, + INADEQUATE_SECURITY = 0xc, + HTTP_1_1_REQUIRED = 0xd + } + [Fact] public async Task Http2_ClientPreface_Sent() { @@ -81,7 +114,7 @@ public async Task Http2_DataSentBeforeServerPreface_ProtocolError() DataFrame invalidFrame = new DataFrame(new byte[10], FrameFlags.Padded, 10, 1); await server.WriteFrameAsync(invalidFrame); - await Assert.ThrowsAsync(async () => await sendTask); + await AssertProtocolErrorAsync(sendTask, ProtocolErrors.PROTOCOL_ERROR); } } @@ -162,10 +195,10 @@ await server.EstablishConnectionAsync( } [ConditionalTheory(nameof(SupportsAlpn))] - [InlineData(SettingId.MaxFrameSize, 16383, true)] - [InlineData(SettingId.MaxFrameSize, 162777216, true)] - [InlineData(SettingId.InitialWindowSize, 0x80000000, false)] - public async Task Http2_ServerSendsInvalidSettingsValue_ProtocolError(SettingId settingId, uint value, bool skipForWinHttp) + [InlineData(SettingId.MaxFrameSize, 16383, ProtocolErrors.PROTOCOL_ERROR, true)] + [InlineData(SettingId.MaxFrameSize, 162777216, ProtocolErrors.PROTOCOL_ERROR, true)] + [InlineData(SettingId.InitialWindowSize, 0x80000000, ProtocolErrors.FLOW_CONTROL_ERROR, false)] + public async Task Http2_ServerSendsInvalidSettingsValue_Error(SettingId settingId, uint value, ProtocolErrors expectedError, bool skipForWinHttp) { if (IsWinHttpHandler && skipForWinHttp) { @@ -181,7 +214,7 @@ public async Task Http2_ServerSendsInvalidSettingsValue_ProtocolError(SettingId // Send invalid initial SETTINGS value await server.EstablishConnectionAsync(new SettingsEntry { SettingId = settingId, Value = value }); - await Assert.ThrowsAsync(async () => await sendTask); + await AssertProtocolErrorAsync(sendTask, expectedError); } } @@ -204,10 +237,10 @@ public async Task Http2_StreamResetByServerBeforeHeadersSent_RequestFails() int streamId = await server.ReadRequestHeaderAsync(); // Send a reset stream frame so that the stream moves to a terminal state. - RstStreamFrame resetStream = new RstStreamFrame(FrameFlags.None, 0x2, streamId); + RstStreamFrame resetStream = new RstStreamFrame(FrameFlags.None, (int)ProtocolErrors.INTERNAL_ERROR, streamId); await server.WriteFrameAsync(resetStream); - await Assert.ThrowsAsync(async () => await sendTask); + await AssertProtocolErrorAsync(sendTask, ProtocolErrors.INTERNAL_ERROR); } } @@ -226,10 +259,10 @@ public async Task Http2_StreamResetByServerAfterHeadersSent_RequestFails() await server.SendDefaultResponseHeadersAsync(streamId); // Send a reset stream frame so that the stream moves to a terminal state. - RstStreamFrame resetStream = new RstStreamFrame(FrameFlags.None, 0x2, streamId); + RstStreamFrame resetStream = new RstStreamFrame(FrameFlags.None, (int)ProtocolErrors.INTERNAL_ERROR, streamId); await server.WriteFrameAsync(resetStream); - await Assert.ThrowsAsync(async () => await sendTask); + await AssertProtocolErrorAsync(sendTask, ProtocolErrors.INTERNAL_ERROR); } } @@ -250,10 +283,10 @@ public async Task Http2_StreamResetByServerAfterPartialBodySent_RequestFails() await server.WriteFrameAsync(dataFrame); // Send a reset stream frame so that the stream moves to a terminal state. - RstStreamFrame resetStream = new RstStreamFrame(FrameFlags.None, 0x2, streamId); + RstStreamFrame resetStream = new RstStreamFrame(FrameFlags.None, (int)ProtocolErrors.INTERNAL_ERROR, streamId); await server.WriteFrameAsync(resetStream); - await Assert.ThrowsAsync(async () => await sendTask); + await AssertProtocolErrorAsync(sendTask, ProtocolErrors.INTERNAL_ERROR); } } @@ -276,7 +309,7 @@ public async Task DataFrame_NoStream_ConnectionError() await server.WriteFrameAsync(invalidFrame); // As this is a connection level error, the client should see the request fail. - await Assert.ThrowsAsync(async () => await sendTask); + await AssertProtocolErrorAsync(sendTask, ProtocolErrors.PROTOCOL_ERROR); // The client should close the connection as this is a fatal connection level error. Assert.Null(await server.ReadFrameAsync(TimeSpan.FromSeconds(30))); @@ -308,7 +341,7 @@ public async Task DataFrame_IdleStream_ConnectionError() await server.WriteFrameAsync(invalidFrame); // As this is a connection level error, the client should see the request fail. - await Assert.ThrowsAsync(async () => await sendTask); + await AssertProtocolErrorAsync(sendTask, ProtocolErrors.PROTOCOL_ERROR); // The client should close the connection as this is a fatal connection level error. Assert.Null(await server.ReadFrameAsync(TimeSpan.FromSeconds(30))); @@ -339,7 +372,7 @@ public async Task HeadersFrame_IdleStream_ConnectionError() await server.SendDefaultResponseHeadersAsync(5); // As this is a connection level error, the client should see the request fail. - await Assert.ThrowsAsync(async () => await sendTask); + await AssertProtocolErrorAsync(sendTask, ProtocolErrors.PROTOCOL_ERROR); // The client should close the connection as this is a fatal connection level error. Assert.Null(await server.ReadFrameAsync(TimeSpan.FromSeconds(30))); @@ -374,7 +407,7 @@ public async Task ResponseStreamFrames_ContinuationBeforeHeaders_ConnectionError await server.WriteFrameAsync(MakeSimpleContinuationFrame(streamId)); // As this is a connection level error, the client should see the request fail. - await Assert.ThrowsAsync(async () => await sendTask); + await AssertProtocolErrorAsync(sendTask, ProtocolErrors.PROTOCOL_ERROR); // The client should close the connection as this is a fatal connection level error. Assert.Null(await server.ReadFrameAsync(TimeSpan.FromSeconds(30))); @@ -394,7 +427,7 @@ public async Task ResponseStreamFrames_DataBeforeHeaders_ConnectionError() await server.WriteFrameAsync(MakeSimpleDataFrame(streamId)); // As this is a connection level error, the client should see the request fail. - await Assert.ThrowsAsync(async () => await sendTask); + await AssertProtocolErrorAsync(sendTask, ProtocolErrors.PROTOCOL_ERROR); // The client should close the connection as this is a fatal connection level error. Assert.Null(await server.ReadFrameAsync(TimeSpan.FromSeconds(30))); @@ -415,7 +448,7 @@ public async Task ResponseStreamFrames_HeadersAfterHeadersWithoutEndHeaders_Conn await server.WriteFrameAsync(MakeSimpleHeadersFrame(streamId, endHeaders: false)); // As this is a connection level error, the client should see the request fail. - await Assert.ThrowsAsync(async () => await sendTask); + await AssertProtocolErrorAsync(sendTask, ProtocolErrors.PROTOCOL_ERROR); // The client should close the connection as this is a fatal connection level error. Assert.Null(await server.ReadFrameAsync(TimeSpan.FromSeconds(30))); @@ -437,50 +470,7 @@ public async Task ResponseStreamFrames_HeadersAfterHeadersAndContinuationWithout await server.WriteFrameAsync(MakeSimpleHeadersFrame(streamId, endHeaders: false)); // As this is a connection level error, the client should see the request fail. - await Assert.ThrowsAsync(async () => await sendTask); - - // The client should close the connection as this is a fatal connection level error. - Assert.Null(await server.ReadFrameAsync(TimeSpan.FromSeconds(30))); - } - } - - [ConditionalFact(nameof(SupportsAlpn))] - public async Task ResponseStreamFrames_HeadersAfterHeadersWithEndHeaders_ConnectionError() - { - using (var server = Http2LoopbackServer.CreateServer()) - using (var client = CreateHttpClient()) - { - Task sendTask = client.GetAsync(server.Address); - await server.EstablishConnectionAsync(); - int streamId = await server.ReadRequestHeaderAsync(); - - await server.WriteFrameAsync(MakeSimpleHeadersFrame(streamId, endHeaders: true)); - await server.WriteFrameAsync(MakeSimpleHeadersFrame(streamId, endHeaders: false)); - - // As this is a connection level error, the client should see the request fail. - await Assert.ThrowsAsync(async () => await sendTask); - - // The client should close the connection as this is a fatal connection level error. - Assert.Null(await server.ReadFrameAsync(TimeSpan.FromSeconds(30))); - } - } - - [ConditionalFact(nameof(SupportsAlpn))] - public async Task ResponseStreamFrames_HeadersAfterHeadersAndContinuationWithEndHeaders_ConnectionError() - { - using (var server = Http2LoopbackServer.CreateServer()) - using (var client = CreateHttpClient()) - { - Task sendTask = client.GetAsync(server.Address); - await server.EstablishConnectionAsync(); - int streamId = await server.ReadRequestHeaderAsync(); - - await server.WriteFrameAsync(MakeSimpleHeadersFrame(streamId, endHeaders: false)); - await server.WriteFrameAsync(MakeSimpleContinuationFrame(streamId, endHeaders: true)); - await server.WriteFrameAsync(MakeSimpleHeadersFrame(streamId, endHeaders: false)); - - // As this is a connection level error, the client should see the request fail. - await Assert.ThrowsAsync(async () => await sendTask); + await AssertProtocolErrorAsync(sendTask, ProtocolErrors.PROTOCOL_ERROR); // The client should close the connection as this is a fatal connection level error. Assert.Null(await server.ReadFrameAsync(TimeSpan.FromSeconds(30))); @@ -501,7 +491,7 @@ public async Task ResponseStreamFrames_DataAfterHeadersWithoutEndHeaders_Connect await server.WriteFrameAsync(MakeSimpleDataFrame(streamId)); // As this is a connection level error, the client should see the request fail. - await Assert.ThrowsAsync(async () => await sendTask); + await AssertProtocolErrorAsync(sendTask, ProtocolErrors.PROTOCOL_ERROR); // The client should close the connection as this is a fatal connection level error. Assert.Null(await server.ReadFrameAsync(TimeSpan.FromSeconds(30))); @@ -523,7 +513,7 @@ public async Task ResponseStreamFrames_DataAfterHeadersAndContinuationWithoutEnd await server.WriteFrameAsync(MakeSimpleDataFrame(streamId)); // As this is a connection level error, the client should see the request fail. - await Assert.ThrowsAsync(async () => await sendTask); + await AssertProtocolErrorAsync(sendTask, ProtocolErrors.PROTOCOL_ERROR); // The client should close the connection as this is a fatal connection level error. Assert.Null(await server.ReadFrameAsync(TimeSpan.FromSeconds(30))); @@ -545,11 +535,11 @@ public async Task GoAwayFrame_NonzeroStream_ConnectionError() await server.ReadRequestHeaderAsync(); // Send a GoAway frame on stream 1. - GoAwayFrame invalidFrame = new GoAwayFrame(0, 0, new byte[0], 1); + GoAwayFrame invalidFrame = new GoAwayFrame(0, (int)ProtocolErrors.ENHANCE_YOUR_CALM, new byte[0], 1); await server.WriteFrameAsync(invalidFrame); // As this is a connection level error, the client should see the request fail. - await Assert.ThrowsAsync(async () => await sendTask); + await AssertProtocolErrorAsync(sendTask, ProtocolErrors.PROTOCOL_ERROR); // The client should close the connection as this is a fatal connection level error. Assert.Null(await server.ReadFrameAsync(TimeSpan.FromSeconds(30))); @@ -572,7 +562,7 @@ public async Task DataFrame_TooLong_ConnectionError() await server.WriteFrameAsync(invalidFrame); // As this is a connection level error, the client should see the request fail. - await Assert.ThrowsAsync(async () => await sendTask); + await AssertProtocolErrorAsync(sendTask, ProtocolErrors.FRAME_SIZE_ERROR); } } @@ -663,8 +653,15 @@ public async Task CompletedResponse_WindowUpdateFrameReceived_Success() } } - [ConditionalFact(nameof(SupportsAlpn))] - public async Task ResetResponseStream_FrameReceived_ConnectionError() + public static IEnumerable ValidAndInvalidProtocolErrors() => + Enum.GetValues(typeof(ProtocolErrors)) + .Cast() + .Concat(new[] { (ProtocolErrors)12345 }) + .Select(p => new object[] { p }); + + [ConditionalTheory(nameof(SupportsAlpn))] + [MemberData(nameof(ValidAndInvalidProtocolErrors))] + public async Task ResetResponseStream_FrameReceived_ConnectionError(ProtocolErrors error) { using (var server = Http2LoopbackServer.CreateServer()) using (var client = CreateHttpClient()) @@ -676,10 +673,10 @@ public async Task ResetResponseStream_FrameReceived_ConnectionError() await server.SendDefaultResponseHeadersAsync(streamId); // Send a reset stream frame so that stream 1 moves to a terminal state. - RstStreamFrame resetStream = new RstStreamFrame(FrameFlags.None, 0x1, streamId); + RstStreamFrame resetStream = new RstStreamFrame(FrameFlags.None, (int)error, streamId); await server.WriteFrameAsync(resetStream); - await Assert.ThrowsAsync(async () => await sendTask); + await AssertProtocolErrorAsync(sendTask, error); // Send a frame on the now-closed stream. DataFrame invalidFrame = new DataFrame(new byte[10], FrameFlags.None, 0, streamId); @@ -794,6 +791,57 @@ public async Task GoAwayFrame_AllPendingStreamsValid_RequestsSucceedAndConnectio } } + [ConditionalFact(nameof(SupportsAlpn))] + public async Task GoAwayFrame_AbortAllPendingStreams_StreamFailWithExpectedException() + { + using (Http2LoopbackServer server = Http2LoopbackServer.CreateServer()) + using (HttpClient client = CreateHttpClient()) + { + await EstablishConnectionAndProcessOneRequestAsync(client, server); + + // Issue three requests + Task sendTask1 = client.GetAsync(server.Address); + Task sendTask2 = client.GetAsync(server.Address); + Task sendTask3 = client.GetAsync(server.Address); + + // Receive three requests + int streamId1 = await server.ReadRequestHeaderAsync(); + int streamId2 = await server.ReadRequestHeaderAsync(); + int streamId3 = await server.ReadRequestHeaderAsync(); + + Assert.InRange(streamId1, int.MinValue, streamId2 - 1); + Assert.InRange(streamId2, int.MinValue, streamId3 - 1); + + // Send various partial responses + + // First response: Don't send anything yet + + // Second response: Send headers, no body yet + await server.SendDefaultResponseHeadersAsync(streamId2); + + // Third response: Send headers, partial body + await server.SendDefaultResponseHeadersAsync(streamId3); + await server.SendResponseDataAsync(streamId3, new byte[5], endStream: false); + + // Send a GOAWAY frame that indicates that we will abort all the requests. + var goAwayFrame = new GoAwayFrame(0, (int)ProtocolErrors.ENHANCE_YOUR_CALM, new byte[0], 0); + await server.WriteFrameAsync(goAwayFrame); + + // We will not send any more frames, so send EOF now, and ensure the client handles this properly. + server.ShutdownSend(); + + await AssertProtocolErrorAsync(sendTask1, ProtocolErrors.ENHANCE_YOUR_CALM); + await AssertProtocolErrorAsync(sendTask2, ProtocolErrors.ENHANCE_YOUR_CALM); + await AssertProtocolErrorAsync(sendTask3, ProtocolErrors.ENHANCE_YOUR_CALM); + + // Now that all pending responses have been sent, the client should close the connection. + await server.WaitForConnectionShutdownAsync(); + + // New request should cause a new connection + await EstablishConnectionAndProcessOneRequestAsync(client, server); + } + } + private static async Task ReadToEndOfStream(Http2LoopbackServer server, int streamId) { int bytesReceived = 0; diff --git a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.TrailingHeaders.cs b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.TrailingHeaders.cs index 557dad56b68f..cf85747a76df 100644 --- a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.TrailingHeaders.cs +++ b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.TrailingHeaders.cs @@ -257,6 +257,34 @@ public async Task Http2GetAsync_NoTrailingHeaders_EmptyCollection() } } + [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.SupportsAlpn))] + public async Task Http2GetAsync_TrailingHeaders_NoData_EmptyResponseObserved() + { + using (Http2LoopbackServer server = Http2LoopbackServer.CreateServer()) + using (HttpClient client = new HttpClient(CreateHttpClientHandler(useSocketsHttpHandler: true, useHttp2LoopbackServer: true))) + { + Task sendTask = client.GetAsync(server.Address); + + await server.EstablishConnectionAsync(); + + int streamId = await server.ReadRequestHeaderAsync(); + + // Response header. + await server.SendDefaultResponseHeadersAsync(streamId); + + // No data. + + // Response trailing headers + await server.SendResponseHeadersAsync(streamId, isTrailingHeader: true, headers: s_trailingHeaders); + + HttpResponseMessage response = await sendTask; + Assert.Equal(HttpStatusCode.OK, response.StatusCode); + Assert.Equal(Array.Empty(), await response.Content.ReadAsByteArrayAsync()); + Assert.Contains("amazingtrailer", response.TrailingHeaders.GetValues("MyCoolTrailerHeader")); + Assert.Contains("World", response.TrailingHeaders.GetValues("Hello")); + } + } + [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.SupportsAlpn))] public async Task Http2GetAsync_MissingTrailer_TrailingHeadersAccepted() { From 98c8597706bee4a7e21648deb62c72ce198076f6 Mon Sep 17 00:00:00 2001 From: David Shulman Date: Mon, 29 Apr 2019 12:38:00 -0700 Subject: [PATCH 092/607] Cleanup some WebSocket tests (#37271) Skip some tests on .NET Framework due to bugs in .NET Framework. Modify the TestCancellation helper method for the WebSocket client tests to not check for string matching in exception messages. This makes the test too brittle. We're already checking for other important fields in the WebSocket object. Re-enable some UAP tests since the fixes are in master branch. Closes #13302 Closes #22635 Closes #23204 Closes #28777 Closes #33401 --- .../tests/CancelTest.cs | 20 +++++++++-------- .../tests/ClientWebSocketTestBase.cs | 6 ----- .../tests/KeepAliveTest.cs | 1 - .../tests/SendReceiveTest.cs | 22 +++++++++---------- 4 files changed, 22 insertions(+), 27 deletions(-) diff --git a/src/System.Net.WebSockets.Client/tests/CancelTest.cs b/src/System.Net.WebSockets.Client/tests/CancelTest.cs index 1e764d4feb15..177a095f2da3 100644 --- a/src/System.Net.WebSockets.Client/tests/CancelTest.cs +++ b/src/System.Net.WebSockets.Client/tests/CancelTest.cs @@ -14,7 +14,7 @@ public class CancelTest : ClientWebSocketTestBase { public CancelTest(ITestOutputHelper output) : base(output) { } - [OuterLoop] // TODO: Issue #11345 + [OuterLoop("Uses external servers")] [ConditionalTheory(nameof(WebSocketsSupported)), MemberData(nameof(EchoServers))] public async Task ConnectAsync_Cancel_ThrowsWebSocketExceptionWithMessage(Uri server) { @@ -38,7 +38,7 @@ public async Task ConnectAsync_Cancel_ThrowsWebSocketExceptionWithMessage(Uri se } } - [OuterLoop] // TODO: Issue #11345 + [OuterLoop("Uses external servers")] [ConditionalTheory(nameof(WebSocketsSupported)), MemberData(nameof(EchoServers))] public async Task SendAsync_Cancel_Success(Uri server) { @@ -53,7 +53,7 @@ await TestCancellation((cws) => }, server); } - [OuterLoop] // TODO: Issue #11345 + [OuterLoop("Uses external servers")] [ConditionalTheory(nameof(WebSocketsSupported)), MemberData(nameof(EchoServers))] [ActiveIssue(13302)] public async Task ReceiveAsync_Cancel_Success(Uri server) @@ -76,7 +76,8 @@ await cws.SendAsync( }, server); } - [OuterLoop] // TODO: Issue #11345 + [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Cancellation sometimes throw wrong exceptions, dotnet/corefx #28777")] + [OuterLoop("Uses external servers")] [ConditionalTheory(nameof(WebSocketsSupported)), MemberData(nameof(EchoServers))] public async Task CloseAsync_Cancel_Success(Uri server) { @@ -98,7 +99,7 @@ await cws.SendAsync( }, server); } - [OuterLoop] // TODO: Issue #11345 + [OuterLoop("Uses external servers")] [ConditionalTheory(nameof(WebSocketsSupported)), MemberData(nameof(EchoServers))] public async Task CloseOutputAsync_Cancel_Success(Uri server) { @@ -121,7 +122,7 @@ await cws.SendAsync( }, server); } - [OuterLoop] // TODO: Issue #11345 + [OuterLoop("Uses external servers")] [ConditionalTheory(nameof(WebSocketsSupported)), MemberData(nameof(EchoServers))] public async Task ReceiveAsync_CancelThenReceive_ThrowsOperationCanceledException(Uri server) { @@ -136,8 +137,9 @@ public async Task ReceiveAsync_CancelThenReceive_ThrowsOperationCanceledExceptio await Assert.ThrowsAnyAsync(() => receive); } } - - [OuterLoop] // TODO: Issue #11345 + + [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Cancellation sometimes throw wrong exceptions, dotnet/corefx #26635")] + [OuterLoop("Uses external servers")] [ConditionalTheory(nameof(WebSocketsSupported)), MemberData(nameof(EchoServers))] public async Task ReceiveAsync_ReceiveThenCancel_ThrowsOperationCanceledException(Uri server) { @@ -153,7 +155,7 @@ public async Task ReceiveAsync_ReceiveThenCancel_ThrowsOperationCanceledExceptio } } - [OuterLoop] // TODO: Issue #11345 + [OuterLoop("Uses external servers")] [ConditionalTheory(nameof(WebSocketsSupported)), MemberData(nameof(EchoServers))] public async Task ReceiveAsync_AfterCancellationDoReceiveAsync_ThrowsWebSocketException(Uri server) { diff --git a/src/System.Net.WebSockets.Client/tests/ClientWebSocketTestBase.cs b/src/System.Net.WebSockets.Client/tests/ClientWebSocketTestBase.cs index f0f2556545ad..431e2ebec2dd 100644 --- a/src/System.Net.WebSockets.Client/tests/ClientWebSocketTestBase.cs +++ b/src/System.Net.WebSockets.Client/tests/ClientWebSocketTestBase.cs @@ -82,12 +82,6 @@ public async Task TestCancellation(Func action, Uri serve } catch (WebSocketException exception) { - Assert.Equal(ResourceHelper.GetExceptionMessage( - "net_WebSockets_InvalidState_ClosedOrAborted", - "System.Net.WebSockets.InternalClientWebSocket", - "Aborted"), - exception.Message); - Assert.Equal(WebSocketError.InvalidState, exception.WebSocketErrorCode); Assert.Equal(WebSocketState.Aborted, cws.State); } diff --git a/src/System.Net.WebSockets.Client/tests/KeepAliveTest.cs b/src/System.Net.WebSockets.Client/tests/KeepAliveTest.cs index 69216241b43a..e3ee01ecc558 100644 --- a/src/System.Net.WebSockets.Client/tests/KeepAliveTest.cs +++ b/src/System.Net.WebSockets.Client/tests/KeepAliveTest.cs @@ -16,7 +16,6 @@ public class KeepAliveTest : ClientWebSocketTestBase { public KeepAliveTest(ITestOutputHelper output) : base(output) { } - [ActiveIssue(23204, TargetFrameworkMonikers.Uap)] [ConditionalFact(nameof(WebSocketsSupported))] [OuterLoop] // involves long delay public async Task KeepAlive_LongDelayBetweenSendReceives_Succeeds() diff --git a/src/System.Net.WebSockets.Client/tests/SendReceiveTest.cs b/src/System.Net.WebSockets.Client/tests/SendReceiveTest.cs index 9c47ed22c767..d6ef7a7a4e90 100644 --- a/src/System.Net.WebSockets.Client/tests/SendReceiveTest.cs +++ b/src/System.Net.WebSockets.Client/tests/SendReceiveTest.cs @@ -32,7 +32,7 @@ public abstract class SendReceiveTest : ClientWebSocketTestBase public SendReceiveTest(ITestOutputHelper output) : base(output) { } - [OuterLoop("Uses external server")] + [OuterLoop("Uses external servers")] [ConditionalTheory(nameof(WebSocketsSupported)), MemberData(nameof(EchoServers))] public async Task SendReceive_PartialMessageDueToSmallReceiveBuffer_Success(Uri server) { @@ -69,7 +69,7 @@ public async Task SendReceive_PartialMessageDueToSmallReceiveBuffer_Success(Uri } } - [OuterLoop] // TODO: Issue #11345 + [OuterLoop("Uses external servers")] [ConditionalTheory(nameof(WebSocketsSupported), nameof(PartialMessagesSupported)), MemberData(nameof(EchoServers))] public async Task SendReceive_PartialMessageBeforeCompleteMessageArrives_Success(Uri server) { @@ -111,7 +111,7 @@ public async Task SendReceive_PartialMessageBeforeCompleteMessageArrives_Success } } - [OuterLoop] // TODO: Issue #11345 + [OuterLoop("Uses external servers")] [ConditionalTheory(nameof(WebSocketsSupported)), MemberData(nameof(EchoServers))] public async Task SendAsync_SendCloseMessageType_ThrowsArgumentExceptionWithMessage(Uri server) { @@ -139,8 +139,8 @@ public async Task SendAsync_SendCloseMessageType_ThrowsArgumentExceptionWithMess } } - [ActiveIssue(33401, TargetFrameworkMonikers.NetFramework)] - [OuterLoop] // TODO: Issue #11345 + [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Skip due to bugs in NETFX WebSocket, dotnet/corefx #33401")] + [OuterLoop("Uses external servers")] [ConditionalTheory(nameof(WebSocketsSupported)), MemberData(nameof(EchoServers))] public async Task SendAsync_MultipleOutstandingSendOperations_Throws(Uri server) { @@ -199,7 +199,7 @@ public async Task SendAsync_MultipleOutstandingSendOperations_Throws(Uri server) } } - [OuterLoop] // TODO: Issue #11345 + [OuterLoop("Uses external servers")] [ConditionalTheory(nameof(WebSocketsSupported)), MemberData(nameof(EchoServers))] public async Task ReceiveAsync_MultipleOutstandingReceiveOperations_Throws(Uri server) { @@ -263,7 +263,7 @@ await SendAsync( } } - [OuterLoop] // TODO: Issue #11345 + [OuterLoop("Uses external servers")] [ConditionalTheory(nameof(WebSocketsSupported)), MemberData(nameof(EchoServers))] public async Task SendAsync_SendZeroLengthPayloadAsEndOfMessage_Success(Uri server) { @@ -302,7 +302,7 @@ await SendAsync( } } - [OuterLoop] // TODO: Issue #11345 + [OuterLoop("Uses external servers")] [ConditionalTheory(nameof(WebSocketsSupported)), MemberData(nameof(EchoServers))] public async Task SendReceive_VaryingLengthBuffers_Success(Uri server) { @@ -342,7 +342,7 @@ public async Task SendReceive_VaryingLengthBuffers_Success(Uri server) } } - [OuterLoop] // TODO: Issue #11345 + [OuterLoop("Uses external servers")] [ConditionalTheory(nameof(WebSocketsSupported)), MemberData(nameof(EchoServers))] public async Task SendReceive_Concurrent_Success(Uri server) { @@ -371,7 +371,7 @@ public async Task SendReceive_Concurrent_Success(Uri server) } } - [OuterLoop] // TODO: Issue #11345 + [OuterLoop("Uses external servers")] [ConditionalFact(nameof(WebSocketsSupported))] public async Task SendReceive_ConnectionClosedPrematurely_ReceiveAsyncFailsAndWebSocketStateUpdated() { @@ -440,7 +440,7 @@ await LoopbackServer.CreateServerAsync(async (server, url) => }, options); } - [OuterLoop] // TODO: Issue #11345 + [OuterLoop("Uses external servers")] [ConditionalTheory(nameof(WebSocketsSupported)), MemberData(nameof(EchoServers))] public async Task ZeroByteReceive_CompletesWhenDataAvailable(Uri server) { From 5f42eecbfe687b8267644d5c8246515c243c0201 Mon Sep 17 00:00:00 2001 From: Levi Broderick Date: Sat, 27 Apr 2019 14:21:08 -0700 Subject: [PATCH 093/607] Add missing check for UTF-16 low surrogate char at start of buffer (#24286) Signed-off-by: dotnet-bot --- .../CoreLib/System/Text/Unicode/Utf16Utility.Validation.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Common/src/CoreLib/System/Text/Unicode/Utf16Utility.Validation.cs b/src/Common/src/CoreLib/System/Text/Unicode/Utf16Utility.Validation.cs index d398c1f36b1a..b1215f44a13e 100644 --- a/src/Common/src/CoreLib/System/Text/Unicode/Utf16Utility.Validation.cs +++ b/src/Common/src/CoreLib/System/Text/Unicode/Utf16Utility.Validation.cs @@ -325,6 +325,11 @@ static Utf16Utility() // or palignr available to us, we'll do this as a loop. We won't look at // the very last high surrogate char element since we don't yet know if // the next vector read will have a low surrogate char element. + + if (lowSurrogateChars[0] != 0) + { + goto Error; // error: start of buffer contains standalone low surrogate char + } ushort surrogatePairsCount = 0; for (int i = 0; i < Vector.Count - 1; i++) From e613b8cf6d1b2c0b5f3c8be621f56377bda92f1d Mon Sep 17 00:00:00 2001 From: Steve MacLean Date: Mon, 29 Apr 2019 15:37:28 -0400 Subject: [PATCH 094/607] Fix Satellite Assembly loading (dotnet/coreclr#24191) * Fix Satellite Assembly loading When loading satellite assemblies, we should probe next to the parent assembly and load into the same AssemblyLoadContext as the parent assembly. Disable fallback probing for satellite assemblies. Add AssemblyLoadContext.Resolving handler to probe for satellite assemblies next to parent Fixes #20979 * Call ResolveSatelliteAssembly from native Only call ResolveSatelliteAssembly from native when resolving a satellite assembly * PR Feedback Minimize string creation Remove unnecessary if null checks Eliminate corner cases by only allowing one case insensitive matching directory. * ResolveSatelliteAssembly should ... ResolveSatelliteAssembly should always be called on the ALC which loaded parentAssembly Simplify code. Add Debug.Assert * Remove case insensitive culture search * PR Feedback * Fix parentAssembly logic * Fixes from initial testing * Add probe for lower case culture name * PR feedback Signed-off-by: dotnet-bot --- .../Runtime/Loader/AssemblyLoadContext.cs | 39 ++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/src/Common/src/CoreLib/System/Runtime/Loader/AssemblyLoadContext.cs b/src/Common/src/CoreLib/System/Runtime/Loader/AssemblyLoadContext.cs index c0a118c8e7b0..9b7bfb45ed55 100644 --- a/src/Common/src/CoreLib/System/Runtime/Loader/AssemblyLoadContext.cs +++ b/src/Common/src/CoreLib/System/Runtime/Loader/AssemblyLoadContext.cs @@ -187,7 +187,7 @@ public event Func ResolvingUnmanagedDll // // Inputs: The AssemblyLoadContext and AssemblyName to be loaded // Returns: The Loaded assembly object. - public event Func Resolving + public event Func Resolving { add { @@ -555,6 +555,43 @@ public void Dispose() } } } + + private Assembly? ResolveSatelliteAssembly(AssemblyName assemblyName) + { + // Called by native runtime when CultureName is not empty + Debug.Assert(assemblyName.CultureName?.Length > 0); + + string satelliteSuffix = ".resources"; + + if (assemblyName.Name == null || !assemblyName.Name.EndsWith(satelliteSuffix, StringComparison.Ordinal)) + return null; + + string parentAssemblyName = assemblyName.Name.Substring(0, assemblyName.Name.Length - satelliteSuffix.Length); + + Assembly parentAssembly = LoadFromAssemblyName(new AssemblyName(parentAssemblyName)); + + AssemblyLoadContext parentALC = GetLoadContext(parentAssembly)!; + + string parentDirectory = Path.GetDirectoryName(parentAssembly.Location)!; + + string assemblyPath = Path.Combine(parentDirectory, assemblyName.CultureName!, $"{assemblyName.Name}.dll"); + + if (Internal.IO.File.InternalExists(assemblyPath)) + { + return parentALC.LoadFromAssemblyPath(assemblyPath); + } + else if (Path.IsCaseSensitive) + { + assemblyPath = Path.Combine(parentDirectory, assemblyName.CultureName!.ToLowerInvariant(), $"{assemblyName.Name}.dll"); + + if (Internal.IO.File.InternalExists(assemblyPath)) + { + return parentALC.LoadFromAssemblyPath(assemblyPath); + } + } + + return null; + } } internal sealed class DefaultAssemblyLoadContext : AssemblyLoadContext From b18be2a4cc4548d3b4f240b804916896c1d837f6 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Mon, 29 Apr 2019 17:35:19 -0400 Subject: [PATCH 095/607] Update dependencies from https://github.com/dotnet/corefx build 20190429.1 (#37266) - runtime.native.System.IO.Ports - 4.6.0-preview6.19229.1 - Microsoft.NETCore.Platforms - 3.0.0-preview6.19229.1 --- eng/Version.Details.xml | 8 ++++---- eng/Versions.props | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 9321bdcbc367..eaed07be2fa2 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -26,13 +26,13 @@ https://github.com/dotnet/core-setup 3cae3dfe319d7fe2b7ec5af161c0648bb1d6f4c4 - + https://github.com/dotnet/corefx - 4f27d0f84c17850ef02ea7b330908fddcdf73c86 + 173a2a165316af9a4e211ceab8c8d9692de8a528 - + https://github.com/dotnet/corefx - 4f27d0f84c17850ef02ea7b330908fddcdf73c86 + 173a2a165316af9a4e211ceab8c8d9692de8a528 https://github.com/dotnet/arcade diff --git a/eng/Versions.props b/eng/Versions.props index 2adc192f1371..970de804355e 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -43,8 +43,8 @@ 3.0.0-preview6-27624-71 3.0.0-preview6-27624-71 - 3.0.0-preview6.19227.7 - 4.6.0-preview6.19227.7 + 3.0.0-preview6.19229.1 + 4.6.0-preview6.19229.1 2.1.0-prerelease.19224.1 From 8c167e3c0fd7958acac17f88f241865dbff3eed9 Mon Sep 17 00:00:00 2001 From: Charles Stoner Date: Mon, 29 Apr 2019 14:48:19 -0700 Subject: [PATCH 096/607] Port Microsoft.VisualBasic.MyServices.FileSystemProxy and move FileIOTests to C# (#37277) --- .../ref/CoreFx.Private.TestUtilities.cs | 1 + .../src/System/PlatformDetection.cs | 1 + .../Microsoft.VisualBasic.Core.sln | 14 - .../ref/Microsoft.VisualBasic.Core.cs | 79 +- .../VisualBasic/MyServices/FileSystemProxy.vb | 247 +++++ .../tests/FileSystemTests.cs | 6 +- .../Microsoft.VisualBasic.Core.Tests.csproj | 3 + .../VisualBasic/FileIO/FileSystemTests.cs | 860 +++++++++++++++++ .../FileIO/SpecialDirectoriesTests.cs | 94 ++ .../FileIO/TextFieldParserTests.cs | 377 ++++++++ .../MyServices/FileSystemProxyTests.cs | 678 +++++++++++++- .../tests/VB/Configurations.props | 8 - .../tests/VB/FileIOTestBase.vb | 60 -- .../tests/VB/FileIOTests.vb | 883 ------------------ .../tests/VB/Helpers.vb | 20 - ...Microsoft.VisualBasic.VB.Core.Tests.vbproj | 13 - .../tests/VB/SpecialDirectoriesTests.vb | 75 -- .../tests/VB/TextFieldParserTests.vb | 261 ------ 18 files changed, 2325 insertions(+), 1355 deletions(-) create mode 100644 src/Microsoft.VisualBasic.Core/tests/Microsoft/VisualBasic/FileIO/FileSystemTests.cs create mode 100644 src/Microsoft.VisualBasic.Core/tests/Microsoft/VisualBasic/FileIO/SpecialDirectoriesTests.cs create mode 100644 src/Microsoft.VisualBasic.Core/tests/Microsoft/VisualBasic/FileIO/TextFieldParserTests.cs delete mode 100644 src/Microsoft.VisualBasic.Core/tests/VB/Configurations.props delete mode 100644 src/Microsoft.VisualBasic.Core/tests/VB/FileIOTestBase.vb delete mode 100644 src/Microsoft.VisualBasic.Core/tests/VB/FileIOTests.vb delete mode 100644 src/Microsoft.VisualBasic.Core/tests/VB/Helpers.vb delete mode 100644 src/Microsoft.VisualBasic.Core/tests/VB/Microsoft.VisualBasic.VB.Core.Tests.vbproj delete mode 100644 src/Microsoft.VisualBasic.Core/tests/VB/SpecialDirectoriesTests.vb delete mode 100644 src/Microsoft.VisualBasic.Core/tests/VB/TextFieldParserTests.vb diff --git a/src/CoreFx.Private.TestUtilities/ref/CoreFx.Private.TestUtilities.cs b/src/CoreFx.Private.TestUtilities/ref/CoreFx.Private.TestUtilities.cs index ba807993d1fb..8f457aab11c8 100644 --- a/src/CoreFx.Private.TestUtilities/ref/CoreFx.Private.TestUtilities.cs +++ b/src/CoreFx.Private.TestUtilities/ref/CoreFx.Private.TestUtilities.cs @@ -80,6 +80,7 @@ public static partial class PlatformDetection public static bool IsNotNetNative { get { throw null; } } public static bool IsNotNetNativeRunningAsConsoleApp { get { throw null; } } public static bool IsNotOneCoreUAP { get { throw null; } } + public static bool IsNotOSX { get { throw null; } } public static bool IsNotRedHatFamily { get { throw null; } } public static bool IsNotRedHatFamily6 { get { throw null; } } public static bool IsNotWindows8x { get { throw null; } } diff --git a/src/CoreFx.Private.TestUtilities/src/System/PlatformDetection.cs b/src/CoreFx.Private.TestUtilities/src/System/PlatformDetection.cs index 087f5040fed8..98b6b2e33a54 100644 --- a/src/CoreFx.Private.TestUtilities/src/System/PlatformDetection.cs +++ b/src/CoreFx.Private.TestUtilities/src/System/PlatformDetection.cs @@ -25,6 +25,7 @@ public static partial class PlatformDetection public static bool IsNetNative => RuntimeInformation.FrameworkDescription.StartsWith(".NET Native", StringComparison.OrdinalIgnoreCase); public static bool IsNetCore => RuntimeInformation.FrameworkDescription.StartsWith(".NET Core", StringComparison.OrdinalIgnoreCase); public static bool IsOSX => RuntimeInformation.IsOSPlatform(OSPlatform.OSX); + public static bool IsNotOSX => !IsOSX; public static bool IsFreeBSD => RuntimeInformation.IsOSPlatform(OSPlatform.Create("FREEBSD")); public static bool IsNetBSD => RuntimeInformation.IsOSPlatform(OSPlatform.Create("NETBSD")); public static bool IsNotWindows8x => !IsWindows8x; diff --git a/src/Microsoft.VisualBasic.Core/Microsoft.VisualBasic.Core.sln b/src/Microsoft.VisualBasic.Core/Microsoft.VisualBasic.Core.sln index 242e246f52ab..e9e2ecaf4a54 100644 --- a/src/Microsoft.VisualBasic.Core/Microsoft.VisualBasic.Core.sln +++ b/src/Microsoft.VisualBasic.Core/Microsoft.VisualBasic.Core.sln @@ -7,11 +7,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.VisualBasic.Core. {A32671B6-5470-4F9C-9CD8-4094B9AB0799} = {A32671B6-5470-4F9C-9CD8-4094B9AB0799} EndProjectSection EndProject -Project("{778DAE3C-4631-46EA-AA77-85C1314464D9}") = "Microsoft.VisualBasic.VB.Core.Tests", "tests\VB\Microsoft.VisualBasic.VB.Core.Tests.vbproj", "{DA95454E-5F0E-4F8A-871A-25D1AB62867A}" - ProjectSection(ProjectDependencies) = postProject - {A32671B6-5470-4F9C-9CD8-4094B9AB0799} = {A32671B6-5470-4F9C-9CD8-4094B9AB0799} - EndProjectSection -EndProject Project("{778DAE3C-4631-46EA-AA77-85C1314464D9}") = "Microsoft.VisualBasic.Core", "src\Microsoft.VisualBasic.Core.vbproj", "{A32671B6-5470-4F9C-9CD8-4094B9AB0799}" ProjectSection(ProjectDependencies) = postProject {82A4357C-0A9F-4970-AAEA-216A73D8A73E} = {82A4357C-0A9F-4970-AAEA-216A73D8A73E} @@ -41,14 +36,6 @@ Global {325260D6-D5DD-4E06-9DA2-9AF2AD9DE8C8}.Windows_NT-Debug|Any CPU.Build.0 = netcoreapp-Debug|Any CPU {325260D6-D5DD-4E06-9DA2-9AF2AD9DE8C8}.Windows_NT-Release|Any CPU.ActiveCfg = netcoreapp-Release|Any CPU {325260D6-D5DD-4E06-9DA2-9AF2AD9DE8C8}.Windows_NT-Release|Any CPU.Build.0 = netcoreapp-Release|Any CPU - {DA95454E-5F0E-4F8A-871A-25D1AB62867A}.Debug|Any CPU.ActiveCfg = netcoreapp-Debug|Any CPU - {DA95454E-5F0E-4F8A-871A-25D1AB62867A}.Debug|Any CPU.Build.0 = netcoreapp-Debug|Any CPU - {DA95454E-5F0E-4F8A-871A-25D1AB62867A}.Release|Any CPU.ActiveCfg = netcoreapp-Release|Any CPU - {DA95454E-5F0E-4F8A-871A-25D1AB62867A}.Release|Any CPU.Build.0 = netcoreapp-Release|Any CPU - {DA95454E-5F0E-4F8A-871A-25D1AB62867A}.Windows_NT-Debug|Any CPU.ActiveCfg = netcoreapp-Debug|Any CPU - {DA95454E-5F0E-4F8A-871A-25D1AB62867A}.Windows_NT-Debug|Any CPU.Build.0 = netcoreapp-Debug|Any CPU - {DA95454E-5F0E-4F8A-871A-25D1AB62867A}.Windows_NT-Release|Any CPU.ActiveCfg = netcoreapp-Release|Any CPU - {DA95454E-5F0E-4F8A-871A-25D1AB62867A}.Windows_NT-Release|Any CPU.Build.0 = netcoreapp-Release|Any CPU {A32671B6-5470-4F9C-9CD8-4094B9AB0799}.Debug|Any CPU.ActiveCfg = netcoreapp-Debug|Any CPU {A32671B6-5470-4F9C-9CD8-4094B9AB0799}.Debug|Any CPU.Build.0 = netcoreapp-Debug|Any CPU {A32671B6-5470-4F9C-9CD8-4094B9AB0799}.Release|Any CPU.ActiveCfg = netcoreapp-Release|Any CPU @@ -71,7 +58,6 @@ Global EndGlobalSection GlobalSection(NestedProjects) = preSolution {325260D6-D5DD-4E06-9DA2-9AF2AD9DE8C8} = {1A2F9F4A-A032-433E-B914-ADD5992BB178} - {DA95454E-5F0E-4F8A-871A-25D1AB62867A} = {1A2F9F4A-A032-433E-B914-ADD5992BB178} {A32671B6-5470-4F9C-9CD8-4094B9AB0799} = {E107E9C1-E893-4E87-987E-04EF0DCEAEFD} {82A4357C-0A9F-4970-AAEA-216A73D8A73E} = {2E666815-2EDB-464B-9DF6-380BF4789AD4} EndGlobalSection diff --git a/src/Microsoft.VisualBasic.Core/ref/Microsoft.VisualBasic.Core.cs b/src/Microsoft.VisualBasic.Core/ref/Microsoft.VisualBasic.Core.cs index 479ec238edc8..3ceaf6aa4f3b 100644 --- a/src/Microsoft.VisualBasic.Core/ref/Microsoft.VisualBasic.Core.cs +++ b/src/Microsoft.VisualBasic.Core/ref/Microsoft.VisualBasic.Core.cs @@ -1019,18 +1019,17 @@ public enum FieldType public partial class FileSystem { public FileSystem() { } - public static string CurrentDirectory { get { throw null; } set { } } - public static System.Collections.ObjectModel.ReadOnlyCollection Drives { get { throw null; } } public static string CombinePath(string baseDirectory, string relativePath) { throw null; } public static void CopyDirectory(string sourceDirectoryName, string destinationDirectoryName) { } + public static void CopyDirectory(string sourceDirectoryName, string destinationDirectoryName, bool overwrite) { } public static void CopyDirectory(string sourceDirectoryName, string destinationDirectoryName, Microsoft.VisualBasic.FileIO.UIOption showUI) { } public static void CopyDirectory(string sourceDirectoryName, string destinationDirectoryName, Microsoft.VisualBasic.FileIO.UIOption showUI, Microsoft.VisualBasic.FileIO.UICancelOption onUserCancel) { } - public static void CopyDirectory(string sourceDirectoryName, string destinationDirectoryName, bool overwrite) { } public static void CopyFile(string sourceFileName, string destinationFileName) { } + public static void CopyFile(string sourceFileName, string destinationFileName, bool overwrite) { } public static void CopyFile(string sourceFileName, string destinationFileName, Microsoft.VisualBasic.FileIO.UIOption showUI) { } public static void CopyFile(string sourceFileName, string destinationFileName, Microsoft.VisualBasic.FileIO.UIOption showUI, Microsoft.VisualBasic.FileIO.UICancelOption onUserCancel) { } - public static void CopyFile(string sourceFileName, string destinationFileName, bool overwrite) { } public static void CreateDirectory(string directory) { } + public static string CurrentDirectory { get { throw null; } set { } } public static void DeleteDirectory(string directory, Microsoft.VisualBasic.FileIO.DeleteDirectoryOption onDirectoryNotEmpty) { } public static void DeleteDirectory(string directory, Microsoft.VisualBasic.FileIO.UIOption showUI, Microsoft.VisualBasic.FileIO.RecycleOption recycle) { } public static void DeleteDirectory(string directory, Microsoft.VisualBasic.FileIO.UIOption showUI, Microsoft.VisualBasic.FileIO.RecycleOption recycle, Microsoft.VisualBasic.FileIO.UICancelOption onUserCancel) { } @@ -1038,6 +1037,7 @@ public static void DeleteFile(string file) { } public static void DeleteFile(string file, Microsoft.VisualBasic.FileIO.UIOption showUI, Microsoft.VisualBasic.FileIO.RecycleOption recycle) { } public static void DeleteFile(string file, Microsoft.VisualBasic.FileIO.UIOption showUI, Microsoft.VisualBasic.FileIO.RecycleOption recycle, Microsoft.VisualBasic.FileIO.UICancelOption onUserCancel) { } public static bool DirectoryExists(string directory) { throw null; } + public static System.Collections.ObjectModel.ReadOnlyCollection Drives { get { throw null; } } public static bool FileExists(string file) { throw null; } public static System.Collections.ObjectModel.ReadOnlyCollection FindInFiles(string directory, string containsText, bool ignoreCase, Microsoft.VisualBasic.FileIO.SearchOption searchType) { throw null; } public static System.Collections.ObjectModel.ReadOnlyCollection FindInFiles(string directory, string containsText, bool ignoreCase, Microsoft.VisualBasic.FileIO.SearchOption searchType, params string[] fileWildcards) { throw null; } @@ -1052,13 +1052,13 @@ public static void DeleteFile(string file, Microsoft.VisualBasic.FileIO.UIOption public static string GetParentPath(string path) { throw null; } public static string GetTempFileName() { throw null; } public static void MoveDirectory(string sourceDirectoryName, string destinationDirectoryName) { } + public static void MoveDirectory(string sourceDirectoryName, string destinationDirectoryName, bool overwrite) { } public static void MoveDirectory(string sourceDirectoryName, string destinationDirectoryName, Microsoft.VisualBasic.FileIO.UIOption showUI) { } public static void MoveDirectory(string sourceDirectoryName, string destinationDirectoryName, Microsoft.VisualBasic.FileIO.UIOption showUI, Microsoft.VisualBasic.FileIO.UICancelOption onUserCancel) { } - public static void MoveDirectory(string sourceDirectoryName, string destinationDirectoryName, bool overwrite) { } public static void MoveFile(string sourceFileName, string destinationFileName) { } + public static void MoveFile(string sourceFileName, string destinationFileName, bool overwrite) { } public static void MoveFile(string sourceFileName, string destinationFileName, Microsoft.VisualBasic.FileIO.UIOption showUI) { } public static void MoveFile(string sourceFileName, string destinationFileName, Microsoft.VisualBasic.FileIO.UIOption showUI, Microsoft.VisualBasic.FileIO.UICancelOption onUserCancel) { } - public static void MoveFile(string sourceFileName, string destinationFileName, bool overwrite) { } public static Microsoft.VisualBasic.FileIO.TextFieldParser OpenTextFieldParser(string file) { throw null; } public static Microsoft.VisualBasic.FileIO.TextFieldParser OpenTextFieldParser(string file, params int[] fieldWidths) { throw null; } public static Microsoft.VisualBasic.FileIO.TextFieldParser OpenTextFieldParser(string file, params string[] delimiters) { throw null; } @@ -1123,9 +1123,13 @@ public TextFieldParser(System.IO.TextReader reader) { } public TextFieldParser(string path) { } public TextFieldParser(string path, System.Text.Encoding defaultEncoding) { } public TextFieldParser(string path, System.Text.Encoding defaultEncoding, bool detectEncoding) { } + ~TextFieldParser() { } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] + public void Close() { } public string[] CommentTokens { get { throw null; } set { } } public string[] Delimiters { get { throw null; } set { } } + protected virtual void Dispose(bool disposing) { } + void System.IDisposable.Dispose() { } public bool EndOfData { get { throw null; } } public string ErrorLine { get { throw null; } } public long ErrorLineNumber { get { throw null; } } @@ -1134,11 +1138,6 @@ public TextFieldParser(string path, System.Text.Encoding defaultEncoding, bool d public bool HasFieldsEnclosedInQuotes { get { throw null; } set { } } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] public long LineNumber { get { throw null; } } - public Microsoft.VisualBasic.FileIO.FieldType TextFieldType { get { throw null; } set { } } - public bool TrimWhiteSpace { get { throw null; } set { } } - public void Close() { } - protected virtual void Dispose(bool disposing) { } - ~TextFieldParser() { } public string PeekChars(int numberOfChars) { throw null; } public string[] ReadFields() { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] @@ -1147,7 +1146,8 @@ protected virtual void Dispose(bool disposing) { } public string ReadToEnd() { throw null; } public void SetDelimiters(params string[] delimiters) { } public void SetFieldWidths(params int[] fieldWidths) { } - void System.IDisposable.Dispose() { } + public Microsoft.VisualBasic.FileIO.FieldType TextFieldType { get { throw null; } set { } } + public bool TrimWhiteSpace { get { throw null; } set { } } } public enum UICancelOption { @@ -1171,7 +1171,62 @@ internal ClipboardProxy() { } public partial class FileSystemProxy { internal FileSystemProxy() { } + public string CombinePath(string baseDirectory, string relativePath) { throw null; } + public void CopyDirectory(string sourceDirectoryName, string destinationDirectoryName) { } + public void CopyDirectory(string sourceDirectoryName, string destinationDirectoryName, bool overwrite) { } + public void CopyDirectory(string sourceDirectoryName, string destinationDirectoryName, Microsoft.VisualBasic.FileIO.UIOption showUI) { } + public void CopyDirectory(string sourceDirectoryName, string destinationDirectoryName, Microsoft.VisualBasic.FileIO.UIOption showUI, Microsoft.VisualBasic.FileIO.UICancelOption onUserCancel) { } + public void CopyFile(string sourceFileName, string destinationFileName) { } + public void CopyFile(string sourceFileName, string destinationFileName, bool overwrite) { } + public void CopyFile(string sourceFileName, string destinationFileName, Microsoft.VisualBasic.FileIO.UIOption showUI) { } + public void CopyFile(string sourceFileName, string destinationFileName, Microsoft.VisualBasic.FileIO.UIOption showUI, Microsoft.VisualBasic.FileIO.UICancelOption onUserCancel) { } + public void CreateDirectory(string directory) { } + public string CurrentDirectory { get { throw null; } set { } } + public void DeleteDirectory(string directory, Microsoft.VisualBasic.FileIO.DeleteDirectoryOption onDirectoryNotEmpty) { } + public void DeleteDirectory(string directory, Microsoft.VisualBasic.FileIO.UIOption showUI, Microsoft.VisualBasic.FileIO.RecycleOption recycle) { } + public void DeleteDirectory(string directory, Microsoft.VisualBasic.FileIO.UIOption showUI, Microsoft.VisualBasic.FileIO.RecycleOption recycle, Microsoft.VisualBasic.FileIO.UICancelOption onUserCancel) { } + public void DeleteFile(string file) { } + public void DeleteFile(string file, Microsoft.VisualBasic.FileIO.UIOption showUI, Microsoft.VisualBasic.FileIO.RecycleOption recycle) { } + public void DeleteFile(string file, Microsoft.VisualBasic.FileIO.UIOption showUI, Microsoft.VisualBasic.FileIO.RecycleOption recycle, Microsoft.VisualBasic.FileIO.UICancelOption onUserCancel) { } + public bool DirectoryExists(string directory) { throw null; } + public System.Collections.ObjectModel.ReadOnlyCollection Drives { get { throw null; } } + public bool FileExists(string file) { throw null; } + public System.Collections.ObjectModel.ReadOnlyCollection FindInFiles(string directory, string containsText, bool ignoreCase, FileIO.SearchOption searchType) { throw null; } + public System.Collections.ObjectModel.ReadOnlyCollection FindInFiles(string directory, string containsText, bool ignoreCase, FileIO.SearchOption searchType, params string[] fileWildcards) { throw null; } + public System.Collections.ObjectModel.ReadOnlyCollection GetDirectories(string directory) { throw null; } + public System.Collections.ObjectModel.ReadOnlyCollection GetDirectories(string directory, FileIO.SearchOption searchType, params string[] wildcards) { throw null; } + public System.IO.DirectoryInfo GetDirectoryInfo(string directory) { throw null; } + public System.IO.DriveInfo GetDriveInfo(string drive) { throw null; } + public System.IO.FileInfo GetFileInfo(string file) { throw null; } + public System.Collections.ObjectModel.ReadOnlyCollection GetFiles(string directory) { throw null; } + public System.Collections.ObjectModel.ReadOnlyCollection GetFiles(string directory, FileIO.SearchOption searchType, params string[] wildcards) { throw null; } + public string GetName(string path) { throw null; } + public string GetParentPath(string path) { throw null; } + public string GetTempFileName() { throw null; } + public void MoveDirectory(string sourceDirectoryName, string destinationDirectoryName) { } + public void MoveDirectory(string sourceDirectoryName, string destinationDirectoryName, bool overwrite) { } + public void MoveDirectory(string sourceDirectoryName, string destinationDirectoryName, Microsoft.VisualBasic.FileIO.UIOption showUI) { } + public void MoveDirectory(string sourceDirectoryName, string destinationDirectoryName, Microsoft.VisualBasic.FileIO.UIOption showUI, Microsoft.VisualBasic.FileIO.UICancelOption onUserCancel) { } + public void MoveFile(string sourceFileName, string destinationFileName) { } + public void MoveFile(string sourceFileName, string destinationFileName, bool overwrite) { } + public void MoveFile(string sourceFileName, string destinationFileName, Microsoft.VisualBasic.FileIO.UIOption showUI) { } + public void MoveFile(string sourceFileName, string destinationFileName, Microsoft.VisualBasic.FileIO.UIOption showUI, Microsoft.VisualBasic.FileIO.UICancelOption onUserCancel) { } + public Microsoft.VisualBasic.FileIO.TextFieldParser OpenTextFieldParser(string file) { throw null; } + public Microsoft.VisualBasic.FileIO.TextFieldParser OpenTextFieldParser(string file, params int[] fieldWidths) { throw null; } + public Microsoft.VisualBasic.FileIO.TextFieldParser OpenTextFieldParser(string file, params string[] delimiters) { throw null; } + public System.IO.StreamReader OpenTextFileReader(string file) { throw null; } + public System.IO.StreamReader OpenTextFileReader(string file, System.Text.Encoding encoding) { throw null; } + public System.IO.StreamWriter OpenTextFileWriter(string file, bool append) { throw null; } + public System.IO.StreamWriter OpenTextFileWriter(string file, bool append, System.Text.Encoding encoding) { throw null; } + public byte[] ReadAllBytes(string file) { throw null; } + public string ReadAllText(string file) { throw null; } + public string ReadAllText(string file, System.Text.Encoding encoding) { throw null; } + public void RenameDirectory(string directory, string newName) { } + public void RenameFile(string file, string newName) { } public SpecialDirectoriesProxy SpecialDirectories { get { throw null; } } + public void WriteAllBytes(string file, byte[] data, bool append) { } + public void WriteAllText(string file, string text, bool append) { } + public void WriteAllText(string file, string text, bool append, System.Text.Encoding encoding) { } } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public partial class RegistryProxy diff --git a/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/MyServices/FileSystemProxy.vb b/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/MyServices/FileSystemProxy.vb index 1a6901528289..b69dea3a348d 100644 --- a/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/MyServices/FileSystemProxy.vb +++ b/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/MyServices/FileSystemProxy.vb @@ -6,7 +6,10 @@ Option Strict On Option Explicit On Imports System +Imports System.Collections.ObjectModel Imports System.ComponentModel +Imports System.Text +Imports Microsoft.VisualBasic.FileIO Namespace Microsoft.VisualBasic.MyServices @@ -20,6 +23,12 @@ Namespace Microsoft.VisualBasic.MyServices '= PUBLIC ============================================================= + Public ReadOnly Property Drives() As ReadOnlyCollection(Of IO.DriveInfo) + Get + Return Microsoft.VisualBasic.FileIO.FileSystem.Drives + End Get + End Property + Public ReadOnly Property SpecialDirectories() As MyServices.SpecialDirectoriesProxy Get If m_SpecialDirectoriesProxy Is Nothing Then @@ -29,6 +38,244 @@ Namespace Microsoft.VisualBasic.MyServices End Get End Property + Public Property CurrentDirectory() As String + Get + Return Microsoft.VisualBasic.FileIO.FileSystem.CurrentDirectory + End Get + Set(ByVal value As String) + Microsoft.VisualBasic.FileIO.FileSystem.CurrentDirectory = value + End Set + End Property + + Public Function DirectoryExists(ByVal directory As String) As Boolean + Return Microsoft.VisualBasic.FileIO.FileSystem.DirectoryExists(directory) + End Function + + Public Function FileExists(ByVal file As String) As Boolean + Return Microsoft.VisualBasic.FileIO.FileSystem.FileExists(file) + End Function + + Public Sub CreateDirectory(ByVal directory As String) + Microsoft.VisualBasic.FileIO.FileSystem.CreateDirectory(directory) + End Sub + + Public Function GetDirectoryInfo(ByVal directory As String) As System.IO.DirectoryInfo + Return Microsoft.VisualBasic.FileIO.FileSystem.GetDirectoryInfo(directory) + End Function + + Public Function GetFileInfo(ByVal file As String) As System.IO.FileInfo + Return Microsoft.VisualBasic.FileIO.FileSystem.GetFileInfo(file) + End Function + + Public Function GetDriveInfo(ByVal drive As String) As System.IO.DriveInfo + Return Microsoft.VisualBasic.FileIO.FileSystem.GetDriveInfo(drive) + End Function + + Public Function GetFiles(ByVal directory As String) As ReadOnlyCollection(Of String) + Return Microsoft.VisualBasic.FileIO.FileSystem.GetFiles(directory) + End Function + + Public Function GetFiles(ByVal directory As String, ByVal searchType As SearchOption, + ByVal ParamArray wildcards() As String) As ReadOnlyCollection(Of String) + + Return Microsoft.VisualBasic.FileIO.FileSystem.GetFiles(directory, searchType, wildcards) + End Function + + Public Function GetDirectories(ByVal directory As String) As ReadOnlyCollection(Of String) + Return Microsoft.VisualBasic.FileIO.FileSystem.GetDirectories(directory) + End Function + + Public Function GetDirectories(ByVal directory As String, ByVal searchType As SearchOption, + ByVal ParamArray wildcards() As String) As ReadOnlyCollection(Of String) + + Return Microsoft.VisualBasic.FileIO.FileSystem.GetDirectories(directory, searchType, wildcards) + End Function + + Public Function FindInFiles(ByVal directory As String, + ByVal containsText As String, ByVal ignoreCase As Boolean, ByVal searchType As SearchOption) As ReadOnlyCollection(Of String) + + Return Microsoft.VisualBasic.FileIO.FileSystem.FindInFiles(directory, containsText, ignoreCase, searchType) + End Function + + Public Function FindInFiles(ByVal directory As String, ByVal containsText As String, ByVal ignoreCase As Boolean, + ByVal searchType As SearchOption, ByVal ParamArray fileWildcards() As String) As ReadOnlyCollection(Of String) + + Return Microsoft.VisualBasic.FileIO.FileSystem.FindInFiles(directory, containsText, ignoreCase, searchType, fileWildcards) + End Function + + Public Function GetParentPath(ByVal path As String) As String + Return Microsoft.VisualBasic.FileIO.FileSystem.GetParentPath(path) + End Function + + Public Function CombinePath(ByVal baseDirectory As String, ByVal relativePath As String) As String + Return Microsoft.VisualBasic.FileIO.FileSystem.CombinePath(baseDirectory, relativePath) + End Function + + Public Function GetName(ByVal path As String) As String + Return Microsoft.VisualBasic.FileIO.FileSystem.GetName(path) + End Function + + Public Function GetTempFileName() As String + Return Microsoft.VisualBasic.FileIO.FileSystem.GetTempFileName() + End Function + + Public Function ReadAllText(ByVal file As String) As String + Return Microsoft.VisualBasic.FileIO.FileSystem.ReadAllText(file) + End Function + + Public Function ReadAllText(ByVal file As String, ByVal encoding As Encoding) As String + Return Microsoft.VisualBasic.FileIO.FileSystem.ReadAllText(file, encoding) + End Function + + Public Function ReadAllBytes(ByVal file As String) As Byte() + Return Microsoft.VisualBasic.FileIO.FileSystem.ReadAllBytes(file) + End Function + + Public Sub WriteAllText(ByVal file As String, ByVal text As String, ByVal append As Boolean) + Microsoft.VisualBasic.FileIO.FileSystem.WriteAllText(file, text, append) + End Sub + + Public Sub WriteAllText(ByVal file As String, ByVal text As String, ByVal append As Boolean, + ByVal encoding As Encoding) + + Microsoft.VisualBasic.FileIO.FileSystem.WriteAllText(file, text, append, encoding) + End Sub + + Public Sub WriteAllBytes(ByVal file As String, ByVal data() As Byte, ByVal append As Boolean) + Microsoft.VisualBasic.FileIO.FileSystem.WriteAllBytes(file, data, append) + End Sub + + Public Sub CopyFile(ByVal sourceFileName As String, ByVal destinationFileName As String) + Microsoft.VisualBasic.FileIO.FileSystem.CopyFile(sourceFileName, destinationFileName) + End Sub + + Public Sub CopyFile(ByVal sourceFileName As String, ByVal destinationFileName As String, ByVal overwrite As Boolean) + Microsoft.VisualBasic.FileIO.FileSystem.CopyFile(sourceFileName, destinationFileName, overwrite) + End Sub + + Public Sub CopyFile(ByVal sourceFileName As String, ByVal destinationFileName As String, ByVal showUI As UIOption) + Microsoft.VisualBasic.FileIO.FileSystem.CopyFile(sourceFileName, destinationFileName, showUI) + End Sub + + Public Sub CopyFile(ByVal sourceFileName As String, ByVal destinationFileName As String, ByVal showUI As UIOption, ByVal onUserCancel As UICancelOption) + Microsoft.VisualBasic.FileIO.FileSystem.CopyFile(sourceFileName, destinationFileName, showUI, onUserCancel) + End Sub + + Public Sub MoveFile(ByVal sourceFileName As String, ByVal destinationFileName As String) + Microsoft.VisualBasic.FileIO.FileSystem.MoveFile(sourceFileName, destinationFileName) + End Sub + + Public Sub MoveFile(ByVal sourceFileName As String, ByVal destinationFileName As String, ByVal overwrite As Boolean) + Microsoft.VisualBasic.FileIO.FileSystem.MoveFile(sourceFileName, destinationFileName, overwrite) + End Sub + + Public Sub MoveFile(ByVal sourceFileName As String, ByVal destinationFileName As String, ByVal showUI As UIOption) + Microsoft.VisualBasic.FileIO.FileSystem.MoveFile(sourceFileName, destinationFileName, showUI) + End Sub + + Public Sub MoveFile(ByVal sourceFileName As String, ByVal destinationFileName As String, ByVal showUI As UIOption, ByVal onUserCancel As UICancelOption) + Microsoft.VisualBasic.FileIO.FileSystem.MoveFile(sourceFileName, destinationFileName, showUI, onUserCancel) + End Sub + + Public Sub CopyDirectory(ByVal sourceDirectoryName As String, ByVal destinationDirectoryName As String) + Microsoft.VisualBasic.FileIO.FileSystem.CopyDirectory(sourceDirectoryName, destinationDirectoryName) + End Sub + + Public Sub CopyDirectory(ByVal sourceDirectoryName As String, ByVal destinationDirectoryName As String, ByVal overwrite As Boolean) + Microsoft.VisualBasic.FileIO.FileSystem.CopyDirectory(sourceDirectoryName, destinationDirectoryName, overwrite) + End Sub + + Public Sub CopyDirectory(ByVal sourceDirectoryName As String, ByVal destinationDirectoryName As String, ByVal showUI As UIOption) + Microsoft.VisualBasic.FileIO.FileSystem.CopyDirectory(sourceDirectoryName, destinationDirectoryName, showUI) + End Sub + + Public Sub CopyDirectory(ByVal sourceDirectoryName As String, ByVal destinationDirectoryName As String, ByVal showUI As UIOption, ByVal onUserCancel As UICancelOption) + Microsoft.VisualBasic.FileIO.FileSystem.CopyDirectory(sourceDirectoryName, destinationDirectoryName, showUI, onUserCancel) + End Sub + + Public Sub MoveDirectory(ByVal sourceDirectoryName As String, ByVal destinationDirectoryName As String) + Microsoft.VisualBasic.FileIO.FileSystem.MoveDirectory(sourceDirectoryName, destinationDirectoryName) + End Sub + + Public Sub MoveDirectory(ByVal sourceDirectoryName As String, ByVal destinationDirectoryName As String, ByVal overwrite As Boolean) + Microsoft.VisualBasic.FileIO.FileSystem.MoveDirectory(sourceDirectoryName, destinationDirectoryName, overwrite) + End Sub + + Public Sub MoveDirectory(ByVal sourceDirectoryName As String, ByVal destinationDirectoryName As String, ByVal showUI As UIOption) + Microsoft.VisualBasic.FileIO.FileSystem.MoveDirectory(sourceDirectoryName, destinationDirectoryName, showUI) + End Sub + + Public Sub MoveDirectory(ByVal sourceDirectoryName As String, ByVal destinationDirectoryName As String, ByVal showUI As UIOption, ByVal onUserCancel As UICancelOption) + Microsoft.VisualBasic.FileIO.FileSystem.MoveDirectory(sourceDirectoryName, destinationDirectoryName, showUI, onUserCancel) + End Sub + + Public Sub DeleteFile(ByVal file As String) + Microsoft.VisualBasic.FileIO.FileSystem.DeleteFile(file) + End Sub + + Public Sub DeleteFile(ByVal file As String, ByVal showUI As UIOption, ByVal recycle As RecycleOption) + Microsoft.VisualBasic.FileIO.FileSystem.DeleteFile(file, showUI, recycle) + End Sub + + Public Sub DeleteFile(ByVal file As String, ByVal showUI As UIOption, ByVal recycle As RecycleOption, + ByVal onUserCancel As UICancelOption) + + Microsoft.VisualBasic.FileIO.FileSystem.DeleteFile(file, showUI, recycle, onUserCancel) + End Sub + + Public Sub DeleteDirectory(ByVal directory As String, ByVal onDirectoryNotEmpty As DeleteDirectoryOption) + Microsoft.VisualBasic.FileIO.FileSystem.DeleteDirectory(directory, onDirectoryNotEmpty) + End Sub + + Public Sub DeleteDirectory(ByVal directory As String, ByVal showUI As UIOption, ByVal recycle As RecycleOption) + + Microsoft.VisualBasic.FileIO.FileSystem.DeleteDirectory(directory, showUI, recycle) + End Sub + + Public Sub DeleteDirectory(ByVal directory As String, + ByVal showUI As UIOption, ByVal recycle As RecycleOption, ByVal onUserCancel As UICancelOption) + + Microsoft.VisualBasic.FileIO.FileSystem.DeleteDirectory(directory, showUI, recycle, onUserCancel) + End Sub + + Public Sub RenameFile(ByVal file As String, ByVal newName As String) + Microsoft.VisualBasic.FileIO.FileSystem.RenameFile(file, newName) + End Sub + + Public Sub RenameDirectory(ByVal directory As String, ByVal newName As String) + Microsoft.VisualBasic.FileIO.FileSystem.RenameDirectory(directory, newName) + End Sub + + Public Function OpenTextFieldParser(ByVal file As String) As TextFieldParser + Return Microsoft.VisualBasic.FileIO.FileSystem.OpenTextFieldParser(file) + End Function + + Public Function OpenTextFieldParser(ByVal file As String, ByVal ParamArray delimiters As String()) As TextFieldParser + Return Microsoft.VisualBasic.FileIO.FileSystem.OpenTextFieldParser(file, delimiters) + End Function + + Public Function OpenTextFieldParser(ByVal file As String, ByVal ParamArray fieldWidths As Integer()) As TextFieldParser + Return Microsoft.VisualBasic.FileIO.FileSystem.OpenTextFieldParser(file, fieldWidths) + End Function + + Public Function OpenTextFileReader(ByVal file As String) As IO.StreamReader + Return Microsoft.VisualBasic.FileIO.FileSystem.OpenTextFileReader(file) + End Function + + Public Function OpenTextFileReader(ByVal file As String, ByVal encoding As Encoding) As IO.StreamReader + Return Microsoft.VisualBasic.FileIO.FileSystem.OpenTextFileReader(file, encoding) + End Function + + Public Function OpenTextFileWriter(ByVal file As String, ByVal append As Boolean) As IO.StreamWriter + Return Microsoft.VisualBasic.FileIO.FileSystem.OpenTextFileWriter(file, append) + End Function + + Public Function OpenTextFileWriter(ByVal file As String, ByVal append As Boolean, + ByVal encoding As Encoding) As IO.StreamWriter + + Return Microsoft.VisualBasic.FileIO.FileSystem.OpenTextFileWriter(file, append, encoding) + End Function + '= FRIEND ============================================================= '''****************************************************************************** diff --git a/src/Microsoft.VisualBasic.Core/tests/FileSystemTests.cs b/src/Microsoft.VisualBasic.Core/tests/FileSystemTests.cs index 07b79eadbb8a..c056f28b562a 100644 --- a/src/Microsoft.VisualBasic.Core/tests/FileSystemTests.cs +++ b/src/Microsoft.VisualBasic.Core/tests/FileSystemTests.cs @@ -23,12 +23,10 @@ protected override void Dispose(bool disposing) base.Dispose(disposing); } - private static bool IsNotOSX() => !PlatformDetection.IsOSX; - // On OSX, the temp directory /tmp/ is a symlink to /private/tmp, so setting the current // directory to a symlinked path will result in GetCurrentDirectory returning the absolute // path that followed the symlink. - [ConditionalFact(nameof(IsNotOSX))] + [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotOSX))] public void ChDir() { var savedDirectory = System.IO.Directory.GetCurrentDirectory(); @@ -84,7 +82,7 @@ static string getString(string fileName) } // Can't get current directory on OSX before setting it. - [ConditionalFact(nameof(IsNotOSX))] + [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotOSX))] public void CurDir() { Assert.Equal(FileSystem.CurDir(), System.IO.Directory.GetCurrentDirectory()); diff --git a/src/Microsoft.VisualBasic.Core/tests/Microsoft.VisualBasic.Core.Tests.csproj b/src/Microsoft.VisualBasic.Core/tests/Microsoft.VisualBasic.Core.Tests.csproj index 0cf30f8db6e7..f9136263635b 100644 --- a/src/Microsoft.VisualBasic.Core/tests/Microsoft.VisualBasic.Core.Tests.csproj +++ b/src/Microsoft.VisualBasic.Core/tests/Microsoft.VisualBasic.Core.Tests.csproj @@ -41,6 +41,9 @@ + + + diff --git a/src/Microsoft.VisualBasic.Core/tests/Microsoft/VisualBasic/FileIO/FileSystemTests.cs b/src/Microsoft.VisualBasic.Core/tests/Microsoft/VisualBasic/FileIO/FileSystemTests.cs new file mode 100644 index 000000000000..824550fb6d60 --- /dev/null +++ b/src/Microsoft.VisualBasic.Core/tests/Microsoft/VisualBasic/FileIO/FileSystemTests.cs @@ -0,0 +1,860 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; +using System.Collections.Generic; +using System.Runtime.InteropServices; +using Xunit; + +namespace Microsoft.VisualBasic.FileIO.Tests +{ + public class FileSystemTests : System.IO.FileCleanupTestBase + { + private static readonly string DestData = "xXy"; + private static readonly string SourceData = "aAb"; + + private static bool ManualTestsEnabled => !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("MANUAL_TESTS")); + + private static bool HasExpectedData(string FileNameWithPath, string ExpectedData) + { + string actualData = System.IO.File.ReadAllText(FileNameWithPath); + return ExpectedData == actualData; + } + + private static void WriteFile(string FileName, string TestData) + { + System.IO.File.WriteAllText(FileName, TestData); + } + + [Fact] + public void CombinePathTest_BadBaseDirectory_RelativePath() + { + Assert.Throws(() => FileIO.FileSystem.CombinePath(null, "Test2")); + Assert.Throws(() => FileIO.FileSystem.CombinePath("", "Test2")); + } + + [Fact] + public void CombinePathTest_BaseDirectory_RelativePath() + { + var TestDirInfo = new System.IO.DirectoryInfo(TestDirectory); + var Root = TestDirInfo.Root.Name; + Assert.Equal(FileIO.FileSystem.CombinePath(Root, "Test2"), System.IO.Path.Combine(Root, "Test2")); + } + + [Fact] + public void CombinePathTest_RootDirectory_RelativePath() + { + Assert.Equal(FileIO.FileSystem.CombinePath(TestDirectory, null), TestDirectory); + Assert.Equal(FileIO.FileSystem.CombinePath(TestDirectory, ""), TestDirectory); + Assert.Equal(FileIO.FileSystem.CombinePath(TestDirectory, "Test"), System.IO.Path.Combine(TestDirectory, "Test")); + } + + [Fact] + public void CopyDirectory_SourceDirectoryName_DestinationDirectoryName() + { + var FullPathToSourceDirectory = System.IO.Path.Combine(TestDirectory, "SourceDirectory"); + System.IO.Directory.CreateDirectory(FullPathToSourceDirectory); + for (int i = 0; i < 6; i++) + { + CreateTestFile(SourceData, PathFromBase: "SourceDirectory", TestFileName: $"NewFile{i}"); + } + var FullPathToTargetDirectory = System.IO.Path.Combine(TestDirectory, "TargetDirectory"); + FileIO.FileSystem.CopyDirectory(FullPathToSourceDirectory, FullPathToTargetDirectory); + Assert.Equal(System.IO.Directory.GetFiles(FullPathToSourceDirectory).Length, System.IO.Directory.GetFiles(FullPathToTargetDirectory).Length); + foreach (var CurrentFile in System.IO.Directory.GetFiles(FullPathToTargetDirectory)) + { + // Ensure copy transferred written data + Assert.True(HasExpectedData(CurrentFile, SourceData)); + } + System.IO.Directory.Delete(FullPathToTargetDirectory, recursive: true); + System.IO.Directory.CreateDirectory(FullPathToTargetDirectory); + CreateTestFile(TestData: SourceData, PathFromBase: "TargetDirectory", TestFileName: $"NewFile0"); + Assert.Throws(() => FileIO.FileSystem.CopyDirectory(FullPathToSourceDirectory, FullPathToTargetDirectory)); + } + + [Fact] + public void CopyDirectory_SourceDirectoryName_DestinationDirectoryName_OverwriteFalse() + { + var FullPathToSourceDirectory = System.IO.Path.Combine(TestDirectory, "SourceDirectory"); + var FullPathToTargetDirectory = System.IO.Path.Combine(TestDirectory, "TargetDirectory"); + System.IO.Directory.CreateDirectory(FullPathToSourceDirectory); + for (int i = 0; i < 6; i++) + { + CreateTestFile(SourceData, PathFromBase: "SourceDirectory", TestFileName: $"NewFile{i}"); + } + FileIO.FileSystem.CopyDirectory(FullPathToSourceDirectory, FullPathToTargetDirectory, overwrite: false); + Assert.Equal(System.IO.Directory.GetFiles(FullPathToSourceDirectory).Length, System.IO.Directory.GetFiles(FullPathToTargetDirectory).Length); + foreach (var CurrentFile in System.IO.Directory.GetFiles(FullPathToTargetDirectory)) + { + // Ensure copy transferred written data + Assert.True(HasExpectedData(CurrentFile, SourceData)); + } + System.IO.Directory.Delete(FullPathToTargetDirectory, recursive: true); + System.IO.Directory.CreateDirectory(FullPathToTargetDirectory); + CreateTestFile(DestData, PathFromBase: "TargetDirectory", TestFileName: $"NewFile0"); + Assert.Throws(() => FileIO.FileSystem.CopyDirectory(FullPathToSourceDirectory, FullPathToTargetDirectory, overwrite: false)); + Assert.Equal(System.IO.Directory.GetFiles(FullPathToTargetDirectory).Length, System.IO.Directory.GetFiles(FullPathToSourceDirectory).Length); + foreach (var CurrentFile in System.IO.Directory.GetFiles(FullPathToTargetDirectory)) + { + Assert.True(HasExpectedData(CurrentFile, CurrentFile.EndsWith("0") ? DestData : SourceData)) ; + } + } + + [Fact] + public void CopyDirectory_SourceDirectoryName_DestinationDirectoryName_OverwriteTrue() + { + var FullPathToSourceDirectory = System.IO.Path.Combine(TestDirectory, "SourceDirectory"); + var FullPathToTargetDirectory = System.IO.Path.Combine(TestDirectory, "TargetDirectory"); + System.IO.Directory.CreateDirectory(FullPathToSourceDirectory); + System.IO.Directory.CreateDirectory(FullPathToTargetDirectory); + for (int i = 0; i < 6; i++) + { + CreateTestFile(SourceData, PathFromBase: "SourceDirectory", TestFileName: $"NewFile{i}"); + } + FileIO.FileSystem.CopyDirectory(FullPathToSourceDirectory, FullPathToTargetDirectory, overwrite: true); + Assert.Equal(System.IO.Directory.GetFiles(FullPathToSourceDirectory).Length, System.IO.Directory.GetFiles(FullPathToTargetDirectory).Length); + foreach (var CurrentFile in System.IO.Directory.GetFiles(FullPathToTargetDirectory)) + { + // Ensure copy transferred written data + Assert.True(HasExpectedData(CurrentFile, SourceData)); + } + } + + [ConditionalFact(nameof(ManualTestsEnabled))] + [PlatformSpecific(TestPlatforms.Windows)] + public void CopyDirectory_SourceDirectoryName_DestinationDirectoryName_SkipFile() + { + var FullPathToSourceDirectory = System.IO.Path.Combine(TestDirectory, "SourceDirectory"); + var FullPathToTargetDirectory = System.IO.Path.Combine(TestDirectory, "TargetDirectory"); + System.IO.Directory.CreateDirectory(FullPathToSourceDirectory); + for (int i = 0; i < 6; i++) + { + CreateTestFile(SourceData, PathFromBase: "SourceDirectory", TestFileName: $"Select_Skip_this_file{i}"); + } + System.IO.Directory.CreateDirectory(FullPathToTargetDirectory); + CreateTestFile(DestData, PathFromBase: "TargetDirectory", TestFileName: $"Select_Skip_this_file0"); + FileIO.FileSystem.CopyDirectory(FullPathToSourceDirectory, FullPathToTargetDirectory, UIOption.AllDialogs, onUserCancel: UICancelOption.ThrowException); + Assert.Equal(System.IO.Directory.GetFiles(FullPathToTargetDirectory).Length, System.IO.Directory.GetFiles(FullPathToSourceDirectory).Length); + foreach (var CurrentFile in System.IO.Directory.GetFiles(FullPathToTargetDirectory)) + { + Assert.True(HasExpectedData(CurrentFile, CurrentFile.EndsWith("0") ? DestData : SourceData)); + } + } + + [Fact] + [PlatformSpecific(TestPlatforms.AnyUnix)] + public void CopyDirectory_SourceDirectoryName_DestinationDirectoryName_UIOptionUnix() + { + var FullPathToSourceDirectory = System.IO.Path.Combine(TestDirectory, "SourceDirectory"); + var FullPathToTargetDirectory = System.IO.Path.Combine(TestDirectory, "TargetDirectory"); + System.IO.Directory.CreateDirectory(FullPathToSourceDirectory); + System.IO.Directory.CreateDirectory(FullPathToTargetDirectory); + for (int i = 0; i < 6; i++) + { + CreateTestFile(SourceData, PathFromBase: "SourceDirectory", TestFileName: $"NewFile{i}"); + CreateTestFile(DestData, PathFromBase: "TargetDirectory", TestFileName: $"NewFile{i}"); + } + Assert.Throws(() => FileIO.FileSystem.CopyDirectory(FullPathToSourceDirectory, FullPathToTargetDirectory, UIOption.AllDialogs)); + } + + [Fact] + public void CopyFile_FileSourceFileName_DestinationFileName() + { + var testFileSource = GetTestFilePath(); + var testFileDest = GetTestFilePath(); + + // Write and copy file + WriteFile(testFileSource, SourceData); + WriteFile(testFileDest, DestData); + Assert.Throws(() => FileIO.FileSystem.CopyFile(testFileSource, testFileDest)); + + // Ensure copy didn't overwrite existing data + Assert.True(HasExpectedData(testFileDest, DestData)); + + // Get a new destination name + testFileDest = GetTestFilePath(); + FileIO.FileSystem.CopyFile(testFileSource, testFileDest); + + // Ensure copy transferred written data + Assert.True(HasExpectedData(testFileDest, SourceData)); + } + + [Fact] + public void CopyFile_FileSourceFileName_DestinationFileName_OverwriteFalse() + { + var testFileSource = GetTestFilePath(); + var testFileDest = GetTestFilePath(); + + // Write and copy file + WriteFile(testFileSource, SourceData); + WriteFile(testFileDest, DestData); + Assert.Throws(() => FileIO.FileSystem.CopyFile(testFileSource, testFileDest, overwrite: false)); + + // Ensure copy didn't overwrite existing data + Assert.True(HasExpectedData(testFileDest, DestData)); + } + + [Fact] + public void CopyFile_FileSourceFileName_DestinationFileName_OverwriteTrue() + { + var testFileSource = GetTestFilePath(); + var testFileDest = GetTestFilePath(); + + // Write and copy file + WriteFile(testFileSource, SourceData); + WriteFile(testFileDest, DestData); + FileIO.FileSystem.CopyFile(testFileSource, testFileDest, overwrite: true); + + // Ensure copy transferred written data + Assert.True(HasExpectedData(testFileDest, SourceData)); + } + + [ConditionalFact(nameof(ManualTestsEnabled))] + [PlatformSpecific(TestPlatforms.Windows)] + public void CopyFile_SourceFileName_DestinationFileName_UIOptionTestOverWriteFalse() + { + var testFileSource = CreateTestFile(TestData: SourceData, PathFromBase: null, TestFileName: "Select_Skip_this_file"); + var testFileDest = GetTestFilePath(); + + // Write and copy file + WriteFile(testFileSource, SourceData); + WriteFile(testFileDest, DestData); + FileIO.FileSystem.CopyFile(testFileSource, testFileDest, showUI: UIOption.AllDialogs, onUserCancel: UICancelOption.DoNothing); + + // Ensure copy transferred written data + Assert.True(HasExpectedData(testFileDest, DestData)); + } + + [ConditionalFact(nameof(ManualTestsEnabled))] + [PlatformSpecific(TestPlatforms.Windows)] + public void CopyFile_SourceFileName_DestinationFileName_UIOptionTestOverWriteTrue() + { + var testFileSource = CreateTestFile(TestData: SourceData, PathFromBase: null, TestFileName: "Select_Replace_the_file"); + var testFileDest = GetTestFilePath(); + + // Write and copy file + WriteFile(testFileSource, SourceData); + WriteFile(testFileDest, DestData); + + FileIO.FileSystem.CopyFile(testFileSource, testFileDest, showUI: UIOption.AllDialogs, onUserCancel: UICancelOption.DoNothing); + + // Ensure copy transferred written data + Assert.True(HasExpectedData(testFileDest, SourceData)); + } + + [Fact] + public void CreateDirectory_Directory() + { + var FullPathToNewDirectory = System.IO.Path.Combine(TestDirectory, "NewDirectory"); + Assert.False(System.IO.Directory.Exists(FullPathToNewDirectory)); + FileIO.FileSystem.CreateDirectory(FullPathToNewDirectory); + Assert.True(System.IO.Directory.Exists(FullPathToNewDirectory)); + } + + [Fact] + public void CreateDirectory_LongPath() + { + var PathLength = TestDirectory.Length; + Assert.True(PathLength < 257); // Need room for path separator and new directory name + var DirectoryName = new string('B', 30); + + Assert.True(DirectoryName.Length < 248, $"DirectoryName.Length at {DirectoryName.Length} is not < 248"); + Assert.True(System.IO.Directory.Exists(TestDirectory)); + + var FullPathToTargetDirectory = System.IO.Path.Combine(TestDirectory, DirectoryName); + Assert.True(FullPathToTargetDirectory.Length < 260, $"FullPathToTargetDirectory.Length at {FullPathToTargetDirectory.Length} is not < 260"); + + FileIO.FileSystem.CreateDirectory(FullPathToTargetDirectory); + Assert.True(System.IO.Directory.Exists(FullPathToTargetDirectory)); + + try + { + var VeryLongFullPathToTargetDirectory = System.IO.Path.Combine(TestDirectory, new String('E', 239)); + FileIO.FileSystem.CreateDirectory(VeryLongFullPathToTargetDirectory); + Assert.True(System.IO.Directory.Exists(VeryLongFullPathToTargetDirectory), $"Directory {VeryLongFullPathToTargetDirectory} does not exist"); + } + catch (System.IO.PathTooLongException) + { + Assert.True(RuntimeInformation.IsOSPlatform(OSPlatform.Windows), "Unexpected Failure on non-Windows Platform"); + } + catch (System.IO.DirectoryNotFoundException) + { + Assert.True(RuntimeInformation.IsOSPlatform(OSPlatform.Windows), "Unexpected Failure on non-Windows Platform"); + Assert.Equal(8, IntPtr.Size); + } + } + + // Can't get current directory on OSX before setting it. + [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotOSX))] + public void CurrentDirectoryGet() + { + var CurrentDirectory = System.IO.Directory.GetCurrentDirectory(); + Assert.Equal(FileIO.FileSystem.CurrentDirectory, CurrentDirectory); + } + + // On OSX, the temp directory /tmp/ is a symlink to /private/tmp, so setting the current + // directory to a symlinked path will result in GetCurrentDirectory returning the absolute + // path that followed the symlink. + [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotOSX))] + public void CurrentDirectorySet() + { + var SavedCurrentDirectory = System.IO.Directory.GetCurrentDirectory(); + FileIO.FileSystem.CurrentDirectory = TestDirectory; + Assert.Equal(TestDirectory, FileIO.FileSystem.CurrentDirectory); + FileIO.FileSystem.CurrentDirectory = SavedCurrentDirectory; + Assert.Equal(FileIO.FileSystem.CurrentDirectory, SavedCurrentDirectory); + } + + [Fact] + public void DeleteDirectory_Directory_DeleteAllContents() + { + var FullPathToNewDirectory = System.IO.Path.Combine(TestDirectory, "NewDirectory"); + System.IO.Directory.CreateDirectory(FullPathToNewDirectory); + Assert.True(System.IO.Directory.Exists(FullPathToNewDirectory)); + var testFileSource = CreateTestFile(SourceData, PathFromBase: "NewDirectory", TestFileName: "TestFile"); + Assert.True(System.IO.File.Exists(testFileSource)); + FileIO.FileSystem.DeleteDirectory(FullPathToNewDirectory, DeleteDirectoryOption.DeleteAllContents); + Assert.False(System.IO.Directory.Exists(FullPathToNewDirectory)); + } + + [Fact] + public void DeleteDirectory_Directory_ThrowIfDirectoryNonEmpty() + { + var FullPathToNewDirectory = System.IO.Path.Combine(TestDirectory, "NewDirectory"); + FileIO.FileSystem.CreateDirectory(FullPathToNewDirectory); + Assert.True(System.IO.Directory.Exists(FullPathToNewDirectory)); + var testFileSource = CreateTestFile(SourceData, PathFromBase: "NewDirectory", TestFileName: "TestFile"); + + Assert.True(System.IO.File.Exists(testFileSource)); + Assert.Throws(() => FileIO.FileSystem.DeleteDirectory(FullPathToNewDirectory, DeleteDirectoryOption.ThrowIfDirectoryNonEmpty)); + Assert.True(System.IO.Directory.Exists(FullPathToNewDirectory)); + Assert.True(System.IO.File.Exists(testFileSource)); + } + + [ConditionalFact(nameof(ManualTestsEnabled))] + [PlatformSpecific(TestPlatforms.Windows)] + public void DeleteDirectory_Directory_UIOption_Delete() + { + var FullPathToNewDirectory = System.IO.Path.Combine(TestDirectory, "Select_Yes"); + FileIO.FileSystem.CreateDirectory(FullPathToNewDirectory); + Assert.True(System.IO.Directory.Exists(FullPathToNewDirectory)); + var testFileSource = CreateTestFile(SourceData, PathFromBase: "Select_Yes", TestFileName: "DoNotCare"); + + Assert.True(System.IO.File.Exists(testFileSource)); + FileIO.FileSystem.DeleteDirectory(FullPathToNewDirectory, showUI: UIOption.AllDialogs, recycle: RecycleOption.DeletePermanently, onUserCancel: UICancelOption.ThrowException); + Assert.False(System.IO.Directory.Exists(FullPathToNewDirectory)); + Assert.False(System.IO.File.Exists(testFileSource)); + } + + [ConditionalFact(nameof(ManualTestsEnabled))] + [PlatformSpecific(TestPlatforms.Windows)] + public void DeleteDirectory_Directory_UIOption_DoNotDelete() + { + var FullPathToNewDirectory = System.IO.Path.Combine(TestDirectory, "Select_No"); + FileIO.FileSystem.CreateDirectory(FullPathToNewDirectory); + Assert.True(System.IO.Directory.Exists(FullPathToNewDirectory)); + var testFileSource = CreateTestFile(SourceData, PathFromBase: "Select_No", TestFileName: "DoNotCare"); + + Assert.True(System.IO.File.Exists(testFileSource)); + Assert.Throws(() => FileIO.FileSystem.DeleteDirectory(FullPathToNewDirectory, showUI: UIOption.AllDialogs, recycle: RecycleOption.DeletePermanently, onUserCancel: UICancelOption.ThrowException)); + Assert.True(System.IO.Directory.Exists(FullPathToNewDirectory)); + Assert.True(System.IO.File.Exists(testFileSource)); + } + + [Fact] + public void DeleteFile_File() + { + var testFileSource = CreateTestFile(SourceData, TestFileName: GetTestFileName()); + + Assert.True(System.IO.File.Exists(testFileSource)); + FileIO.FileSystem.DeleteFile(testFileSource); + Assert.False(System.IO.File.Exists(testFileSource)); + } + + [Fact] + public void DirectoryExists_Directory() + { + Assert.True(FileIO.FileSystem.DirectoryExists(TestDirectory)); + Assert.False(FileIO.FileSystem.DirectoryExists(System.IO.Path.Combine(TestDirectory, "NewDirectory"))); + } + + // Not tested: + // public System.Collections.ObjectModel.ReadOnlyCollection Drives { get { throw null; } } + + [Fact] + public void FileExists_File() + { + var testFileSource = CreateTestFile(SourceData, TestFileName: GetTestFileName()); + Assert.True(FileIO.FileSystem.FileExists(testFileSource)); + FileIO.FileSystem.FileExists(testFileSource); + System.IO.File.Delete(testFileSource); + Assert.False(FileIO.FileSystem.FileExists(testFileSource)); + } + + // Not tested: + // public System.Collections.ObjectModel.ReadOnlyCollection FindInFiles(string directory, string containsText, bool ignoreCase, FileIO.SearchOption searchType) { throw null; } + // public System.Collections.ObjectModel.ReadOnlyCollection FindInFiles(string directory, string containsText, bool ignoreCase, FileIO.SearchOption searchType, params string[] fileWildcards) { throw null; } + + [Fact] + public void GetDirectories_Directory() + { + var DirectoryList = FileIO.FileSystem.GetDirectories(TestDirectory); + Assert.Equal(DirectoryList.Count, 0); + for (int i = 0; i < 6; i++) + { + System.IO.Directory.CreateDirectory(System.IO.Path.Combine(TestDirectory, $"GetDirectories_DirectoryNewSubDirectory{i}")); + } + DirectoryList = FileIO.FileSystem.GetDirectories(TestDirectory); + Assert.Equal(DirectoryList.Count, 6); + for (int i = 0; i < 6; i++) + { + Assert.True(DirectoryList.Contains(System.IO.Path.Combine(TestDirectory, $"GetDirectories_DirectoryNewSubDirectory{i}"))); + } + System.IO.Directory.CreateDirectory(System.IO.Path.Combine(TestDirectory, $"GetDirectories_DirectoryNewSubDirectory0", $"NewSubSubDirectory")); + DirectoryList = FileIO.FileSystem.GetDirectories(TestDirectory); + Assert.Equal(DirectoryList.Count, 6); + } + + [Fact] + public void GetDirectories_Directory_SearchOption() + { + var DirectoryList = FileIO.FileSystem.GetDirectories(TestDirectory, SearchOption.SearchTopLevelOnly); + Assert.Equal(DirectoryList.Count, 0); + for (int i = 0; i < 6; i++) + { + System.IO.Directory.CreateDirectory(System.IO.Path.Combine(TestDirectory, $"GetDirectories_Directory_SearchOptionNewSubDirectory{i}")); + } + DirectoryList = FileIO.FileSystem.GetDirectories(TestDirectory, SearchOption.SearchTopLevelOnly); + Assert.Equal(DirectoryList.Count, 6); + for (int i = 0; i < 6; i++) + { + Assert.True(DirectoryList.Contains(System.IO.Path.Combine(TestDirectory, $"GetDirectories_Directory_SearchOptionNewSubDirectory{i}"))); + } + System.IO.Directory.CreateDirectory(System.IO.Path.Combine(TestDirectory, $"GetDirectories_Directory_SearchOptionNewSubDirectory0", $"NewSubSubDirectory")); + DirectoryList = FileIO.FileSystem.GetDirectories(TestDirectory, SearchOption.SearchTopLevelOnly); + Assert.Equal(DirectoryList.Count, 6); + DirectoryList = FileIO.FileSystem.GetDirectories(TestDirectory, SearchOption.SearchAllSubDirectories); + Assert.Equal(DirectoryList.Count, 7); + } + + [Fact] + public void GetDirectories_Directory_SearchOption_Wildcards() + { + var DirectoryList = FileIO.FileSystem.GetDirectories(TestDirectory, SearchOption.SearchTopLevelOnly, "*"); + Assert.Equal(DirectoryList.Count, 0); + var CreatedDirectories = new List(); + for (int i = 0; i < 6; i++) + { + CreatedDirectories.Add(System.IO.Directory.CreateDirectory(System.IO.Path.Combine(TestDirectory, $"NewSubDirectory00{i}")).Name); + } + DirectoryList = FileIO.FileSystem.GetDirectories(TestDirectory, SearchOption.SearchTopLevelOnly, "*000", "*001"); + Assert.Equal(DirectoryList.Count, 2); + for (int i = 0; i < 2; i++) + { + var DirectoryName = System.IO.Path.Combine(TestDirectory, $"NewSubDirectory00{i}"); + Assert.True(DirectoryList.Contains(DirectoryName), $"{DirectoryName} Is missing from Wildcard Search"); + } + System.IO.Directory.CreateDirectory(System.IO.Path.Combine(TestDirectory, $"NewSubDirectory000", $"NewSubSubDirectory000")); + DirectoryList = FileIO.FileSystem.GetDirectories(TestDirectory, SearchOption.SearchTopLevelOnly, "*000"); + Assert.Equal(DirectoryList.Count, 1); + DirectoryList = FileIO.FileSystem.GetDirectories(TestDirectory, SearchOption.SearchAllSubDirectories, "*000"); + Assert.Equal(DirectoryList.Count, 2); + } + + [Fact] + public void GetDirectoryInfo_Directory() + { + for (int i = 0; i < 6; i++) + { + System.IO.Directory.CreateDirectory(System.IO.Path.Combine(TestDirectory, $"NewSubDirectory{i}")); + } + System.IO.Directory.CreateDirectory(System.IO.Path.Combine(TestDirectory, $"NewSubDirectory0", $"NewSubSubDirectory")); + var info = FileIO.FileSystem.GetDirectoryInfo(TestDirectory); + var infoFromIO = new System.IO.DirectoryInfo(TestDirectory); + Assert.Equal(info.CreationTime, infoFromIO.CreationTime); + Assert.Equal(info.Extension, infoFromIO.Extension); + Assert.Equal(info.FullName, TestDirectory); + Assert.Equal(info.LastAccessTime, infoFromIO.LastAccessTime); + Assert.Equal(info.Name, infoFromIO.Name); + Assert.Equal(info.Parent.ToString(), infoFromIO.Parent.ToString()); + Assert.Equal(info.Root.Name, infoFromIO.Root.Name); + } + + [Fact] + public void GetDriveInfo_Drive() + { + var Drives = System.IO.DriveInfo.GetDrives(); + Assert.True(Drives.Length > 0); + Assert.Equal(FileIO.FileSystem.GetDriveInfo(Drives[0].Name).Name, new System.IO.DriveInfo(Drives[0].Name).Name); + } + + [Fact] + public void GetFileInfo_File() + { + var TestFile = CreateTestFile(SourceData, TestFileName: GetTestFileName()); + + var FileInfoFromSystemIO = new System.IO.FileInfo(TestFile); + Assert.NotNull(FileInfoFromSystemIO); + + var info = FileIO.FileSystem.GetFileInfo(TestFile); + Assert.NotNull(info); + Assert.True(info.Exists); + Assert.Equal(info.Attributes, FileInfoFromSystemIO.Attributes); + Assert.Equal(info.CreationTime, FileInfoFromSystemIO.CreationTime); + Assert.True(info.CreationTime > DateTime.MinValue); + Assert.Equal(info.DirectoryName, FileInfoFromSystemIO.DirectoryName); + Assert.Equal(info.Extension, FileInfoFromSystemIO.Extension); + Assert.Equal(info.FullName, FileInfoFromSystemIO.FullName); + Assert.Equal(info.IsReadOnly, FileInfoFromSystemIO.IsReadOnly); + Assert.Equal(info.LastAccessTime, FileInfoFromSystemIO.LastAccessTime); + Assert.Equal(info.LastWriteTime, FileInfoFromSystemIO.LastWriteTime); + Assert.Equal(info.Length, FileInfoFromSystemIO.Length); + Assert.Equal(info.Name, FileInfoFromSystemIO.Name); + } + + [Fact] + public void GetFiles_Directory() + { + var FileList = FileIO.FileSystem.GetFiles(TestDirectory); + Assert.Equal(FileList.Count, 0); + for (int i = 0; i < 6; i++) + { + CreateTestFile(SourceData, PathFromBase: null, TestFileName: $"NewFile{i}"); + } + FileList = FileIO.FileSystem.GetFiles(TestDirectory); + Assert.Equal(FileList.Count, 6); + for (int i = 0; i < 6; i++) + { + Assert.True(FileList.Contains(System.IO.Path.Combine(TestDirectory, $"NewFile{i}"))); + } + System.IO.Directory.CreateDirectory(System.IO.Path.Combine(TestDirectory, "GetFiles_DirectoryNewSubDirectory")); + CreateTestFile(SourceData, PathFromBase: "GetFiles_DirectoryNewSubDirectory", TestFileName: "NewFile"); + FileList = FileIO.FileSystem.GetFiles(TestDirectory); + Assert.Equal(FileList.Count, 6); + } + + [Fact] + public void GetFiles_Directory_SearchOption() + { + var NewSubDirectoryPath = System.IO.Path.Combine(TestDirectory, "GetFiles_Directory_SearchOptionNewSubDirectory"); + System.IO.Directory.CreateDirectory(NewSubDirectoryPath); + CreateTestFile(SourceData, PathFromBase: "GetFiles_Directory_SearchOptionNewSubDirectory", TestFileName: "NewFile"); + var FileList = FileIO.FileSystem.GetFiles(TestDirectory); + Assert.Equal(FileList.Count, 0); + for (int i = 0; i < 6; i++) + { + CreateTestFile(SourceData, PathFromBase: null, TestFileName: $"NewFile{i}"); + } + FileList = FileIO.FileSystem.GetFiles(TestDirectory, SearchOption.SearchTopLevelOnly); + CreateTestFile(SourceData, PathFromBase: null, TestFileName: "NewFile"); + Assert.Equal(FileList.Count, 6); + for (int i = 0; i < 6; i++) + { + Assert.True(FileList.Contains(System.IO.Path.Combine(TestDirectory, $"NewFile{i}"))); + } + FileList = FileIO.FileSystem.GetFiles(TestDirectory, SearchOption.SearchAllSubDirectories); + Assert.Equal(FileList.Count, 8); + for (int i = 0; i < 7; i++) + { + Assert.True(System.IO.File.Exists(FileList[i])); + } + } + + [Fact] + public void GetFiles_Directory_SearchOption_Wildcards() + { + var FileList = FileIO.FileSystem.GetFiles(TestDirectory); + Assert.Equal(FileList.Count, 0); + var TestFileList = new List(); + for (int i = 0; i < 6; i++) + { + TestFileList.Add(CreateTestFile(SourceData, PathFromBase: null, TestFileName: $"NewFile{i}{(i % 2 == 0 ? ".vb" : ".cs")}")); + } + FileList = FileIO.FileSystem.GetFiles(TestDirectory, SearchOption.SearchTopLevelOnly, "*.vb"); + Assert.Equal(FileList.Count, 3); + for (int i = 0; i < 3; i++) + { + Assert.True(TestFileList.Contains(FileList[i])); + } + var NewSubDirectoryPath = System.IO.Path.Combine(TestDirectory, "GetFiles_Directory_SearchOption_WildcardsNewSubDirectory"); + System.IO.Directory.CreateDirectory(NewSubDirectoryPath); + TestFileList.Add(CreateTestFile(SourceData, PathFromBase: "GetFiles_Directory_SearchOption_WildcardsNewSubDirectory", TestFileName: "NewFile.cs")); + FileList = FileIO.FileSystem.GetFiles(TestDirectory, SearchOption.SearchAllSubDirectories, "*.cs"); + Assert.True(FileList.Contains(TestFileList[TestFileList.Count - 1]), "File in Subdirectory not found"); + Assert.Equal(FileList.Count, 4); + } + + [Fact] + public void GetName_Path() + { + Assert.Equal(FileIO.FileSystem.GetName(TestDirectory), System.IO.Path.GetFileName(TestDirectory)); + } + + [Fact] + public void GetParentPath_Path() + { + Assert.Equal(FileIO.FileSystem.GetParentPath(TestDirectory), System.IO.Path.GetDirectoryName(TestDirectory)); + } + + [Fact] + public void GetTempFileName() + { + var TempFile = FileIO.FileSystem.GetTempFileName(); + Assert.True(System.IO.File.Exists(TempFile)); + Assert.Equal((new System.IO.FileInfo(TempFile)).Length, 0); + System.IO.File.Delete(TempFile); + } + + [ConditionalFact(nameof(ManualTestsEnabled))] + [PlatformSpecific(TestPlatforms.Windows)] + public void MoveDirectory_Source_DirectoryName_DestinationDirectoryName_UIOptionOverwriteFalse() + { + var FullPathToSourceDirectory = System.IO.Path.Combine(TestDirectory, "SourceDirectory"); + var FullPathToTargetDirectory = System.IO.Path.Combine(TestDirectory, "TargetDirectory"); + System.IO.Directory.CreateDirectory(FullPathToSourceDirectory); + for (int i = 0; i < 6; i++) + { + CreateTestFile(SourceData, PathFromBase: "SourceDirectory", TestFileName: $"Select_Skip_this_file{i}"); + } + System.IO.Directory.CreateDirectory(FullPathToTargetDirectory); + var NewFile0WithPath = CreateTestFile(DestData, PathFromBase: "TargetDirectory", TestFileName: "Select_Skip_this_file0"); + FileIO.FileSystem.MoveDirectory(FullPathToSourceDirectory, FullPathToTargetDirectory, showUI: UIOption.AllDialogs, onUserCancel: UICancelOption.ThrowException); + string[] RemainingSourceFilesWithPath = System.IO.Directory.GetFiles(FullPathToSourceDirectory); + // We couldn't move one file + Assert.Equal(1, RemainingSourceFilesWithPath.Length); + // Ensure the file left has correct data + Assert.True(HasExpectedData(RemainingSourceFilesWithPath[0], SourceData)); + + string[] DestinationFilesWithPath = System.IO.Directory.GetFiles(FullPathToTargetDirectory); + Assert.Equal(6, DestinationFilesWithPath.Length); + foreach (var CurrentFile in DestinationFilesWithPath) + { + Assert.True(HasExpectedData(CurrentFile, CurrentFile.EndsWith("0") ? DestData : SourceData)); + } + } + + [Fact] + public void MoveDirectory_SourceDirectoryName_DestinationDirectoryName() + { + var FullPathToSourceDirectory = System.IO.Path.Combine(TestDirectory, "SourceDirectory"); + var FullPathToTargetDirectory = System.IO.Path.Combine(TestDirectory, "TargetDirectory"); + System.IO.Directory.CreateDirectory(FullPathToSourceDirectory); + for (int i = 0; i < 6; i++) + { + CreateTestFile(SourceData, PathFromBase: "SourceDirectory", TestFileName: $"NewFile{i}"); + } + FileIO.FileSystem.MoveDirectory(FullPathToSourceDirectory, FullPathToTargetDirectory); + Assert.Equal(6, System.IO.Directory.GetFiles(FullPathToTargetDirectory).Length); + Assert.False(System.IO.Directory.Exists(FullPathToSourceDirectory)); + foreach (var CurrentFile in System.IO.Directory.GetFiles(FullPathToTargetDirectory)) + { + // Ensure move transferred written data + Assert.True(HasExpectedData(CurrentFile, SourceData)); + } + System.IO.Directory.Move(FullPathToTargetDirectory, FullPathToSourceDirectory); + System.IO.Directory.CreateDirectory(FullPathToTargetDirectory); + CreateTestFile(SourceData, PathFromBase: "TargetDirectory", TestFileName: "NewFile0"); + Assert.Throws(() => FileIO.FileSystem.MoveDirectory(FullPathToSourceDirectory, FullPathToTargetDirectory)); + } + + [Fact] + public void MoveDirectory_SourceDirectoryName_DestinationDirectoryName_OverwriteFalse() + { + var FullPathToSourceDirectory = System.IO.Path.Combine(TestDirectory, "SourceDirectory"); + var FullPathToTargetDirectory = System.IO.Path.Combine(TestDirectory, "TargetDirectory"); + System.IO.Directory.CreateDirectory(FullPathToSourceDirectory); + for (int i = 0; i < 6; i++) + { + CreateTestFile(SourceData, PathFromBase: "SourceDirectory", TestFileName: $"NewFile{i}"); + } + FileIO.FileSystem.MoveDirectory(FullPathToSourceDirectory, FullPathToTargetDirectory, overwrite: false); + Assert.Equal(6, System.IO.Directory.GetFiles(FullPathToTargetDirectory).Length); + Assert.False(System.IO.Directory.Exists(FullPathToSourceDirectory)); + foreach (var CurrentFile in System.IO.Directory.GetFiles(FullPathToTargetDirectory)) + { + // Ensure move transferred written data + Assert.True(HasExpectedData(CurrentFile, SourceData)); + } + System.IO.Directory.Move(FullPathToTargetDirectory, FullPathToSourceDirectory); + System.IO.Directory.CreateDirectory(FullPathToTargetDirectory); + var NewFile0WithPath = CreateTestFile(DestData, PathFromBase: "TargetDirectory", TestFileName: "NewFile0"); + Assert.Throws(() => FileIO.FileSystem.MoveDirectory(FullPathToSourceDirectory, FullPathToTargetDirectory, overwrite: false)); + string[] RemainingSourceFilesWithPath = System.IO.Directory.GetFiles(FullPathToSourceDirectory); + // We couldn't move one file + Assert.Equal(1, RemainingSourceFilesWithPath.Length); + // Ensure the file left has correct data + Assert.True(HasExpectedData(RemainingSourceFilesWithPath[0], SourceData)); + + string[] DestinationFilesWithPath = System.IO.Directory.GetFiles(FullPathToTargetDirectory); + Assert.Equal(6, DestinationFilesWithPath.Length); + foreach (var CurrentFile in DestinationFilesWithPath) + { + Assert.True(HasExpectedData(CurrentFile, CurrentFile.EndsWith("0") ? DestData : SourceData)); + } + } + + [Fact] + public void MoveDirectory_SourceDirectoryName_DestinationDirectoryName_OverwriteTrue() + { + var FullPathToSourceDirectory = System.IO.Path.Combine(TestDirectory, "SourceDirectory"); + var FullPathToTargetDirectory = System.IO.Path.Combine(TestDirectory, "TargetDirectory"); + System.IO.Directory.CreateDirectory(FullPathToSourceDirectory); + System.IO.Directory.CreateDirectory(FullPathToTargetDirectory); + for (int i = 0; i < 6; i++) + { + CreateTestFile(SourceData, PathFromBase: "SourceDirectory", TestFileName: $"NewFile{i}"); + } + FileIO.FileSystem.MoveDirectory(FullPathToSourceDirectory, FullPathToTargetDirectory, overwrite: true); + Assert.False(System.IO.Directory.Exists(FullPathToSourceDirectory)); + Assert.Equal(6, System.IO.Directory.GetFiles(FullPathToTargetDirectory).Length); + foreach (var CurrentFile in System.IO.Directory.GetFiles(FullPathToTargetDirectory)) + { + // Ensure copy transferred written data + Assert.True(HasExpectedData(CurrentFile, SourceData)); + } + } + + [Fact] + public void MoveFile_SourceFileName_DestinationFileName() + { + var SourceFileNameWithPath = CreateTestFile(SourceData, TestFileName: GetTestFileName()); + var DestinationFileNameWithPath = System.IO.Path.Combine(TestDirectory, "NewName"); + FileIO.FileSystem.MoveFile(SourceFileNameWithPath, DestinationFileNameWithPath); + Assert.False(System.IO.File.Exists(SourceFileNameWithPath)); + Assert.True(System.IO.File.Exists(DestinationFileNameWithPath)); + Assert.True(HasExpectedData(DestinationFileNameWithPath, SourceData)); + + SourceFileNameWithPath = DestinationFileNameWithPath; + DestinationFileNameWithPath = CreateTestFile(DestData, TestFileName: GetTestFileName()); + Assert.Throws(() => FileIO.FileSystem.MoveFile(SourceFileNameWithPath, DestinationFileNameWithPath)); + // Make sure we did not override existing file + Assert.True(HasExpectedData(DestinationFileNameWithPath, DestData)); + Assert.True(System.IO.File.Exists(SourceFileNameWithPath)); + } + + [Fact] + public void MoveFile_SourceFileName_DestinationFileName_OverwriteFalse() + { + var SourceFileNameWithPath = CreateTestFile(SourceData, TestFileName: GetTestFileName()); + var DestinationFileNameWithPath = System.IO.Path.Combine(TestDirectory, "NewName"); + FileIO.FileSystem.MoveFile(SourceFileNameWithPath, DestinationFileNameWithPath, overwrite: false); + Assert.False(System.IO.File.Exists(SourceFileNameWithPath)); + Assert.True(System.IO.File.Exists(DestinationFileNameWithPath)); + Assert.True(HasExpectedData(DestinationFileNameWithPath, SourceData)); + SourceFileNameWithPath = DestinationFileNameWithPath; + DestinationFileNameWithPath = CreateTestFile(DestData, TestFileName: GetTestFileName()); + Assert.Throws(() => FileIO.FileSystem.MoveFile(SourceFileNameWithPath, DestinationFileNameWithPath, overwrite: false)); + // Make sure we did not override existing file + Assert.True(HasExpectedData(DestinationFileNameWithPath, DestData)); + Assert.True(System.IO.File.Exists(SourceFileNameWithPath)); + } + + [Fact] + public void MoveFile_SourceFileName_DestinationFileName_OverwriteTrue() + { + var SourceFileNameWithPath = CreateTestFile(SourceData, TestFileName: GetTestFileName()); + var DestinationFileNameWithPath = System.IO.Path.Combine(TestDirectory, "NewName"); + FileIO.FileSystem.MoveFile(SourceFileNameWithPath, DestinationFileNameWithPath, overwrite: true); + Assert.False(System.IO.File.Exists(SourceFileNameWithPath)); + Assert.True(System.IO.File.Exists(DestinationFileNameWithPath)); + Assert.True(HasExpectedData(DestinationFileNameWithPath, SourceData)); + CreateTestFile(DestData, PathFromBase: null, TestFileName: (new System.IO.FileInfo(SourceFileNameWithPath)).Name); + FileIO.FileSystem.MoveFile(sourceFileName: DestinationFileNameWithPath, destinationFileName: SourceFileNameWithPath, overwrite: true); + Assert.True(System.IO.File.Exists(SourceFileNameWithPath)); + Assert.False(System.IO.File.Exists(DestinationFileNameWithPath)); + Assert.True(HasExpectedData(SourceFileNameWithPath, SourceData)); + } + + [ConditionalFact(nameof(ManualTestsEnabled))] + [PlatformSpecific(TestPlatforms.Windows)] + public void MoveFile_SourceFileName_DestinationFileName_UIOptionOverWriteFalse() + { + var SourceFileNameWithPath = CreateTestFile(SourceData, TestFileName: GetTestFileName()); + var DestinationFileNameWithPath = System.IO.Path.Combine(TestDirectory, "Select_Skip_this_file"); + FileIO.FileSystem.MoveFile(SourceFileNameWithPath, DestinationFileNameWithPath, showUI: UIOption.AllDialogs, onUserCancel: UICancelOption.DoNothing); + Assert.False(System.IO.File.Exists(SourceFileNameWithPath)); + Assert.True(System.IO.File.Exists(DestinationFileNameWithPath)); + Assert.True(HasExpectedData(DestinationFileNameWithPath, SourceData)); + SourceFileNameWithPath = DestinationFileNameWithPath; + DestinationFileNameWithPath = CreateTestFile(DestData, TestFileName: GetTestFileName()); + FileIO.FileSystem.MoveFile(SourceFileNameWithPath, DestinationFileNameWithPath, showUI: UIOption.AllDialogs, onUserCancel: UICancelOption.ThrowException); + // Make sure we did not override existing file + Assert.True(HasExpectedData(DestinationFileNameWithPath, DestData)); + Assert.True(System.IO.File.Exists(SourceFileNameWithPath)); + } + + // Not tested: + // public Microsoft.VisualBasic.FileIO.TextFieldParser OpenTextFieldParser(string file) { throw null; } + // public Microsoft.VisualBasic.FileIO.TextFieldParser OpenTextFieldParser(string file, params int[] fieldWidths) { throw null; } + // public Microsoft.VisualBasic.FileIO.TextFieldParser OpenTextFieldParser(string file, params string[] delimiters) { throw null; } + // public System.IO.StreamReader OpenTextFileReader(string file) { throw null; } + // public System.IO.StreamReader OpenTextFileReader(string file, System.Text.Encoding encoding) { throw null; } + // public System.IO.StreamWriter OpenTextFileWriter(string file, bool append) { throw null; } + // public System.IO.StreamWriter OpenTextFileWriter(string file, bool append, System.Text.Encoding encoding) { throw null; } + // public byte[] ReadAllBytes(string file) { throw null; } + // public string ReadAllText(string file) { throw null; } + // public string ReadAllText(string file, System.Text.Encoding encoding) { throw null; } + + [Fact] + public void RenameDirectory_Directory_NewName() + { + // If directory does not point to an existing directory. + Assert.Throws(() => FileIO.FileSystem.RenameDirectory(System.IO.Path.Combine(TestDirectory, "DoesNotExistDirectory"), "NewDirectory")); + var OrigDirectoryWithPath = System.IO.Path.Combine(TestDirectory, "OriginalDirectory"); + System.IO.Directory.CreateDirectory(OrigDirectoryWithPath); + // If newName is null or Empty String. + Assert.Throws(() => FileIO.FileSystem.RenameDirectory(OrigDirectoryWithPath, "")); + var DirectoryNameWithPath = System.IO.Path.Combine(TestDirectory, "DoesNotExist"); + // If contains path information. + Assert.Throws(() => FileIO.FileSystem.RenameDirectory(OrigDirectoryWithPath, DirectoryNameWithPath)); + FileIO.FileSystem.RenameDirectory(OrigDirectoryWithPath, "NewFDirectory"); + var NewFDirectoryPath = System.IO.Path.Combine(TestDirectory, "NewFDirectory"); + Assert.True(System.IO.Directory.Exists(NewFDirectoryPath)); + Assert.False(System.IO.Directory.Exists(OrigDirectoryWithPath)); + // If directory points to a root directory or if there's an existing directory or an existing file with the same name. + System.IO.Directory.CreateDirectory(OrigDirectoryWithPath); + Assert.Throws(() => FileIO.FileSystem.RenameDirectory(NewFDirectoryPath, "OriginalDirectory")); + } + + [Fact] + public void RenameFile_File_NewName() + { + // If file does not point to an existing file. + Assert.Throws(() => FileIO.FileSystem.RenameFile(System.IO.Path.Combine(TestDirectory, "DoesNotExistFile"), "NewFile")); + var OrigFileWithPath = CreateTestFile(SourceData, TestFileName: GetTestFileName()); + var ExistingFileWithPath = CreateTestFile(DestData, TestFileName: GetTestFileName()); + // If newName is null or Empty String. + Assert.Throws(() => FileIO.FileSystem.RenameFile(OrigFileWithPath, "")); + // If contains path information. + Assert.Throws(() => FileIO.FileSystem.RenameFile(OrigFileWithPath, ExistingFileWithPath)); + FileIO.FileSystem.RenameFile(OrigFileWithPath, "NewFile"); + var NewFileWithPath = System.IO.Path.Combine(TestDirectory, "NewFile"); + Assert.True(System.IO.File.Exists(NewFileWithPath)); + Assert.False(System.IO.File.Exists(OrigFileWithPath)); + // If there's an existing directory or an existing file with the same name. + Assert.Throws(() => FileIO.FileSystem.RenameFile(NewFileWithPath, "NewFile")); + System.IO.Directory.CreateDirectory(System.IO.Path.Combine(TestDirectory, "NewFDirectory")); + Assert.Throws(() => FileIO.FileSystem.RenameFile(NewFileWithPath, "NewFDirectory")); + } + + // Not tested: + // public void WriteAllBytes(string file, byte[] data, bool append) { } + // public void WriteAllText(string file, string text, bool append) { } + // public void WriteAllText(string file, string text, bool append, System.Text.Encoding encoding) { } + + private string CreateTestFile(string TestData, string TestFileName, string PathFromBase = null) + { + Assert.False(String.IsNullOrEmpty(TestFileName)); + var TempFileNameWithPath = TestDirectory; + if (!string.IsNullOrEmpty(PathFromBase)) + { + TempFileNameWithPath = System.IO.Path.Combine(TempFileNameWithPath, PathFromBase); + } + TempFileNameWithPath = System.IO.Path.Combine(TempFileNameWithPath, TestFileName); + Assert.False(System.IO.File.Exists(TempFileNameWithPath), $"File {TempFileNameWithPath} should not exist!"); + WriteFile(TempFileNameWithPath, TestData); + return TempFileNameWithPath; + } + } +} diff --git a/src/Microsoft.VisualBasic.Core/tests/Microsoft/VisualBasic/FileIO/SpecialDirectoriesTests.cs b/src/Microsoft.VisualBasic.Core/tests/Microsoft/VisualBasic/FileIO/SpecialDirectoriesTests.cs new file mode 100644 index 000000000000..de3a398dcd1e --- /dev/null +++ b/src/Microsoft.VisualBasic.Core/tests/Microsoft/VisualBasic/FileIO/SpecialDirectoriesTests.cs @@ -0,0 +1,94 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; +using static System.Environment; +using Xunit; + +namespace Microsoft.VisualBasic.FileIO.Tests +{ + public class SpecialDirectoriesTests + { + private static void CheckSpecialFolder(SpecialFolder folder, Func getSpecialDirectory) + { + var path = Environment.GetFolderPath(folder); + if (string.IsNullOrEmpty(path)) + { + Assert.Throws(getSpecialDirectory); + } + else + { + Assert.Equal(TrimSeparators(path), TrimSeparators(getSpecialDirectory())); + } + } + + [Fact] + [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] + public static void AllUsersApplicationDataFolderTest() + { + Assert.Throws(() => SpecialDirectories.AllUsersApplicationData); + } + + [Fact] + [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] + public static void CurrentUserApplicationDataFolderTest() + { + Assert.Throws(() => SpecialDirectories.CurrentUserApplicationData); + } + + [Fact] + public static void DesktopFolderTest() + { + CheckSpecialFolder(SpecialFolder.Desktop, () => SpecialDirectories.Desktop); + } + + [Fact] + public static void MyDocumentsFolderTest() + { + if (PlatformDetection.IsWindowsNanoServer) + { + Assert.Throws(() => SpecialDirectories.MyDocuments); + } + else + { + CheckSpecialFolder(SpecialFolder.MyDocuments, () => SpecialDirectories.MyDocuments); + } + } + + [Fact] + public static void MyMusicFolderTest() + { + CheckSpecialFolder(SpecialFolder.MyMusic, () => SpecialDirectories.MyMusic); + } + + [Fact] + public static void MyPicturesFolderTest() + { + CheckSpecialFolder(SpecialFolder.MyPictures, () => SpecialDirectories.MyPictures); + } + + [Fact] + public static void ProgramFilesFolderTest() + { + CheckSpecialFolder(SpecialFolder.ProgramFiles, () => SpecialDirectories.ProgramFiles); + } + + [Fact] + public static void ProgramsFolderTest() + { + CheckSpecialFolder(SpecialFolder.Programs, () => SpecialDirectories.Programs); + } + + [Fact] + public static void TempFolderTest() + { + Assert.Equal(TrimSeparators(System.IO.Path.GetTempPath()), TrimSeparators(SpecialDirectories.Temp)); + } + + private static string TrimSeparators(string s) + { + return s.TrimEnd(System.IO.Path.DirectorySeparatorChar, System.IO.Path.AltDirectorySeparatorChar); + } + } +} diff --git a/src/Microsoft.VisualBasic.Core/tests/Microsoft/VisualBasic/FileIO/TextFieldParserTests.cs b/src/Microsoft.VisualBasic.Core/tests/Microsoft/VisualBasic/FileIO/TextFieldParserTests.cs new file mode 100644 index 000000000000..e611c3f9b76b --- /dev/null +++ b/src/Microsoft.VisualBasic.Core/tests/Microsoft/VisualBasic/FileIO/TextFieldParserTests.cs @@ -0,0 +1,377 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; +using System.IO; +using Xunit; + +namespace Microsoft.VisualBasic.FileIO.Tests +{ + public class TextFieldParserTests : FileCleanupTestBase + { + [Fact] + public void Constructors() + { + var path = GetTestFilePath(); + File.WriteAllText(path, "abc123"); + + // public TextFieldParser(System.IO.Stream stream) + using (var stream = new FileStream(path, FileMode.Open)) + { + using (var parser = new TextFieldParser(stream)) + { + } + Assert.Throws(() => stream.ReadByte()); + } + + // public TextFieldParser(System.IO.Stream stream, System.Text.Encoding defaultEncoding, bool detectEncoding, bool leaveOpen); + using (var stream = new FileStream(path, FileMode.Open)) + { + using (var parser = new TextFieldParser(stream, defaultEncoding: System.Text.Encoding.Unicode, detectEncoding: true, leaveOpen: true)) + { + } + _ = stream.ReadByte(); + } + + // public TextFieldParser(System.IO.TextReader reader) + using (var reader = new StreamReader(path)) + { + using (var parser = new TextFieldParser(reader)) + { + } + Assert.Throws(() => reader.ReadToEnd()); + } + + // public TextFieldParser(string path) + using (var parser = new TextFieldParser(path)) + { + } + + // public TextFieldParser(string path) + Assert.Throws(() => new TextFieldParser(GetTestFilePath())); + } + + [Fact] + public void Close() + { + var path = GetTestFilePath(); + File.WriteAllText(path, "abc123"); + + using (var stream = new FileStream(path, FileMode.Open)) + { + using (var parser = new TextFieldParser(stream)) + { + parser.Close(); + } + } + + using (var parser = new TextFieldParser(path)) + { + parser.Close(); + } + + { + var parser = new TextFieldParser(path); + parser.Close(); + parser.Close(); + } + + { + TextFieldParser parser; + using (parser = new TextFieldParser(path)) + { + } + parser.Close(); + } + } + + [Fact] + public void Properties() + { + var path = GetTestFilePath(); + File.WriteAllText(path, "abc123"); + + using (var parser = new TextFieldParser(path)) + { + Assert.Equal(new string[0], parser.CommentTokens); + parser.CommentTokens = new[] { "[", "]" }; + Assert.Equal(new[] { "[", "]" }, parser.CommentTokens); + + Assert.Equal(null, parser.Delimiters); + parser.Delimiters = new[] { "A", "123" }; + Assert.Equal(new[] { "A", "123" }, parser.Delimiters); + parser.SetDelimiters(new[] { "123", "B" }); + Assert.Equal(new[] { "123", "B" }, parser.Delimiters); + + Assert.Equal(null, parser.FieldWidths); + parser.FieldWidths = new[] { 1, 2, int.MaxValue }; + Assert.Equal(new[] { 1, 2, int.MaxValue }, parser.FieldWidths); + parser.SetFieldWidths(new[] { int.MaxValue, 3 }); + Assert.Equal(new[] { int.MaxValue, 3 }, parser.FieldWidths); + Assert.Throws(() => parser.SetFieldWidths(new[] { -1, -1 })); + + Assert.Equal(true, parser.HasFieldsEnclosedInQuotes); + parser.HasFieldsEnclosedInQuotes = false; + Assert.Equal(false, parser.HasFieldsEnclosedInQuotes); + + Assert.Equal(FieldType.Delimited, parser.TextFieldType); + parser.TextFieldType = FieldType.FixedWidth; + Assert.Equal(FieldType.FixedWidth, parser.TextFieldType); + + Assert.Equal(true, parser.TrimWhiteSpace); + parser.TrimWhiteSpace = false; + Assert.Equal(false, parser.TrimWhiteSpace); + } + } + + // Not tested: + // public string[] CommentTokens { get { throw null; } set { } } + + [Fact] + public void ErrorLine() + { + var path = GetTestFilePath(); + File.WriteAllText(path, +@"abc 123 +def 45 +ghi 789"); + + using (var parser = new TextFieldParser(path)) + { + parser.TextFieldType = FieldType.FixedWidth; + parser.SetFieldWidths(new[] { 3, 4 }); + + Assert.Equal(-1, parser.ErrorLineNumber); + Assert.Equal("", parser.ErrorLine); + + Assert.Equal(new[] { "abc", "123" }, parser.ReadFields()); + Assert.Equal(-1, parser.ErrorLineNumber); + Assert.Equal("", parser.ErrorLine); + + Assert.Throws(() => parser.ReadFields()); + Assert.Equal(2, parser.ErrorLineNumber); + Assert.Equal("def 45", parser.ErrorLine); + + Assert.Equal(new[] { "ghi", "789" }, parser.ReadFields()); + Assert.Equal(2, parser.ErrorLineNumber); + Assert.Equal("def 45", parser.ErrorLine); + } + } + + [Fact] + public void HasFieldsEnclosedInQuotes_TrimWhiteSpace() + { + var path = GetTestFilePath(); + File.WriteAllText(path, @""""", "" "" ,""abc"", "" 123 "" ,"); + + using (var parser = new TextFieldParser(path)) + { + parser.Delimiters = new[] { "," }; + Assert.Equal(new[] { "", "", "abc", "123", "" }, parser.ReadFields()); + } + + using (var parser = new TextFieldParser(path)) + { + parser.TrimWhiteSpace = false; + parser.Delimiters = new[] { "," }; + Assert.Equal(new[] { "", " ", "abc", " 123 ", "" }, parser.ReadFields()); + } + + using (var parser = new TextFieldParser(path)) + { + parser.HasFieldsEnclosedInQuotes = false; + parser.Delimiters = new[] { "," }; + Assert.Equal(new[] { @"""""", @""" """, @"""abc""", @""" 123 """, "" }, parser.ReadFields()); + } + + using (var parser = new TextFieldParser(path)) + { + parser.TrimWhiteSpace = false; + parser.HasFieldsEnclosedInQuotes = false; + parser.Delimiters = new[] { "," }; + Assert.Equal(new[] { @"""""", @" "" "" ", @"""abc""", @" "" 123 "" ", "" }, parser.ReadFields()); + } + } + + [Fact] + public void PeekChars() + { + var path = GetTestFilePath(); + File.WriteAllText(path, +@"abc,123 +def,456 +ghi,789"); + + using (var parser = new TextFieldParser(path)) + { + Assert.Throws(() => parser.PeekChars(0)); + + Assert.Equal("a", parser.PeekChars(1)); + Assert.Equal("abc,123", parser.PeekChars(10)); + + Assert.Equal("abc,123", parser.ReadLine()); + + parser.TextFieldType = FieldType.FixedWidth; + parser.SetFieldWidths(new[] { 3, -1 }); + + Assert.Equal("d", parser.PeekChars(1)); + Assert.Equal("def,456", parser.PeekChars(10)); + Assert.Equal(new[] { "def", ",456" }, parser.ReadFields()); + + parser.TextFieldType = FieldType.Delimited; + parser.SetDelimiters(new[] { "," }); + + Assert.Equal("g", parser.PeekChars(1)); + Assert.Equal("ghi,789", parser.PeekChars(10)); + Assert.Equal(new[] { "ghi", "789" }, parser.ReadFields()); + + Assert.Equal(null, parser.PeekChars(1)); + Assert.Equal(null, parser.PeekChars(10)); + } + } + + [Fact] + public void ReadFields_FieldWidths() + { + var path = GetTestFilePath(); + File.WriteAllText(path, +@"abc,123 +def,456 +ghi,789"); + + using (var parser = new TextFieldParser(path)) + { + parser.TextFieldType = FieldType.FixedWidth; + + Assert.Throws(() => parser.ReadFields()); + + parser.SetFieldWidths(new[] { -1 }); + Assert.Equal(new[] { "abc,123" }, parser.ReadFields()); + + parser.SetFieldWidths(new[] { 3, -1 }); + Assert.Equal(new[] { "def", ",456" }, parser.ReadFields()); + + parser.SetFieldWidths(new[] { 3, 2 }); + Assert.Equal(new[] { "ghi", ",7" }, parser.ReadFields()); + + parser.SetFieldWidths(new[] { 3, 2 }); + Assert.Equal(null, parser.ReadFields()); + } + } + + [Fact] + public void ReadFields_Delimiters_LineNumber() + { + var path = GetTestFilePath(); + File.WriteAllText(path, +@"abc,123 +def,456 +ghi,789"); + + using (var parser = new TextFieldParser(path)) + { + Assert.Equal(1, parser.LineNumber); + + Assert.Throws(() => parser.ReadFields()); + Assert.Equal(1, parser.LineNumber); + + parser.SetDelimiters(new[] { ", " }); + Assert.Equal(new[] { "abc,123" }, parser.ReadFields()); + Assert.Equal(2, parser.LineNumber); + + parser.SetDelimiters(new[] { ";", "," }); + Assert.Equal(new[] { "def", "456" }, parser.ReadFields()); + Assert.Equal(3, parser.LineNumber); + + parser.SetDelimiters(new[] { "g", "9" }); + Assert.Equal(new[] { "", "hi,78", "" }, parser.ReadFields()); + Assert.Equal(-1, parser.LineNumber); + } + + File.WriteAllText(path, +@",, + +, +"); + + using (var parser = new TextFieldParser(path)) + { + Assert.Equal(1, parser.LineNumber); + + parser.SetDelimiters(new[] { "," }); + Assert.Equal(new[] { "", "", "" }, parser.ReadFields()); + Assert.Equal(2, parser.LineNumber); + + Assert.Equal(new[] { "", "" }, parser.ReadFields()); + Assert.Equal(-1, parser.LineNumber); + + Assert.Equal(null, parser.ReadFields()); + Assert.Equal(-1, parser.LineNumber); + + Assert.Equal(null, parser.ReadFields()); + Assert.Equal(-1, parser.LineNumber); + } + } + + [Fact] + public void ReadLine_ReadToEnd() + { + var path = GetTestFilePath(); + File.WriteAllText(path, +@"abc +123"); + + using (var parser = new TextFieldParser(path)) + { + Assert.False(parser.EndOfData); + + Assert.Equal( +@"abc +123", + parser.ReadToEnd()); + Assert.Equal(-1, parser.LineNumber); + Assert.True(parser.EndOfData); + } + + using (var parser = new TextFieldParser(path)) + { + Assert.Equal("abc", parser.ReadLine()); + Assert.Equal(2, parser.LineNumber); + Assert.False(parser.EndOfData); + + Assert.Equal("123", parser.ReadToEnd()); + Assert.Equal(-1, parser.LineNumber); + Assert.True(parser.EndOfData); + } + + using (var parser = new TextFieldParser(path)) + { + Assert.Equal("abc", parser.ReadLine()); + Assert.Equal(2, parser.LineNumber); + Assert.False(parser.EndOfData); + + Assert.Equal("123", parser.ReadLine()); + Assert.Equal(-1, parser.LineNumber); + Assert.True(parser.EndOfData); + + Assert.Equal(null, parser.ReadToEnd()); + Assert.Equal(-1, parser.LineNumber); + Assert.True(parser.EndOfData); + } + } + + [Fact] + public void UnmatchedQuote_MalformedLineException() + { + var path = GetTestFilePath(); + File.WriteAllText(path, @""""", """); + + using (var parser = new TextFieldParser(path)) + { + parser.Delimiters = new[] { "," }; + Assert.Throws(() => parser.ReadFields()); + } + } + } +} diff --git a/src/Microsoft.VisualBasic.Core/tests/Microsoft/VisualBasic/MyServices/FileSystemProxyTests.cs b/src/Microsoft.VisualBasic.Core/tests/Microsoft/VisualBasic/MyServices/FileSystemProxyTests.cs index 7fe939d6d340..47cc33fb6eab 100644 --- a/src/Microsoft.VisualBasic.Core/tests/Microsoft/VisualBasic/MyServices/FileSystemProxyTests.cs +++ b/src/Microsoft.VisualBasic.Core/tests/Microsoft/VisualBasic/MyServices/FileSystemProxyTests.cs @@ -3,20 +3,688 @@ // See the LICENSE file in the project root for more information. using System; -using Microsoft.VisualBasic.Devices; +using System.Collections.Generic; +using Microsoft.VisualBasic.FileIO; using Xunit; namespace Microsoft.VisualBasic.MyServices.Tests { - public class FileSystemProxyTests + // File tests cloned from Microsoft.VisualBasic.FileIO.Tests.FileSystemTests. + public class FileSystemProxyTests : System.IO.FileCleanupTestBase { + private static readonly string DestData = "xXy"; + private static readonly string SourceData = "aAb"; + + private readonly FileSystemProxy _fileSystem = new Microsoft.VisualBasic.Devices.ServerComputer().FileSystem; + + private static bool HasExpectedData(string FileNameWithPath, string ExpectedData) + { + string actualData = System.IO.File.ReadAllText(FileNameWithPath); + return ExpectedData == actualData; + } + + private static void WriteFile(string FileName, string TestData) + { + System.IO.File.WriteAllText(FileName, TestData); + } + + [Fact] + public void CombinePathTest_BadBaseDirectory_RelativePath() + { + Assert.Throws(() => _fileSystem.CombinePath(null, "Test2")); + Assert.Throws(() => _fileSystem.CombinePath("", "Test2")); + } + + [Fact] + public void CombinePathTest_BaseDirectory_RelativePath() + { + var TestDirInfo = new System.IO.DirectoryInfo(TestDirectory); + var Root = TestDirInfo.Root.Name; + Assert.Equal(_fileSystem.CombinePath(Root, "Test2"), System.IO.Path.Combine(Root, "Test2")); + } + + [Fact] + public void CombinePathTest_RootDirectory_RelativePath() + { + Assert.Equal(_fileSystem.CombinePath(TestDirectory, null), TestDirectory); + Assert.Equal(_fileSystem.CombinePath(TestDirectory, ""), TestDirectory); + Assert.Equal(_fileSystem.CombinePath(TestDirectory, "Test"), System.IO.Path.Combine(TestDirectory, "Test")); + } + + [Fact] + public void CopyDirectory_SourceDirectoryName_DestinationDirectoryName() + { + var FullPathToSourceDirectory = System.IO.Path.Combine(TestDirectory, "SourceDirectory"); + System.IO.Directory.CreateDirectory(FullPathToSourceDirectory); + for (int i = 0; i < 6; i++) + { + CreateTestFile(SourceData, PathFromBase: "SourceDirectory", TestFileName: $"NewFile{i}"); + } + var FullPathToTargetDirectory = System.IO.Path.Combine(TestDirectory, "TargetDirectory"); + _fileSystem.CopyDirectory(FullPathToSourceDirectory, FullPathToTargetDirectory); + Assert.Equal(System.IO.Directory.GetFiles(FullPathToSourceDirectory).Length, System.IO.Directory.GetFiles(FullPathToTargetDirectory).Length); + foreach (var CurrentFile in System.IO.Directory.GetFiles(FullPathToTargetDirectory)) + { + // Ensure copy transferred written data + Assert.True(HasExpectedData(CurrentFile, SourceData)); + } + System.IO.Directory.Delete(FullPathToTargetDirectory, recursive: true); + System.IO.Directory.CreateDirectory(FullPathToTargetDirectory); + CreateTestFile(TestData: SourceData, PathFromBase: "TargetDirectory", TestFileName: $"NewFile0"); + Assert.Throws(() => _fileSystem.CopyDirectory(FullPathToSourceDirectory, FullPathToTargetDirectory)); + } + + [Fact] + public void CopyDirectory_SourceDirectoryName_DestinationDirectoryName_OverwriteFalse() + { + var FullPathToSourceDirectory = System.IO.Path.Combine(TestDirectory, "SourceDirectory"); + var FullPathToTargetDirectory = System.IO.Path.Combine(TestDirectory, "TargetDirectory"); + System.IO.Directory.CreateDirectory(FullPathToSourceDirectory); + for (int i = 0; i < 6; i++) + { + CreateTestFile(SourceData, PathFromBase: "SourceDirectory", TestFileName: $"NewFile{i}"); + } + _fileSystem.CopyDirectory(FullPathToSourceDirectory, FullPathToTargetDirectory, overwrite: false); + Assert.Equal(System.IO.Directory.GetFiles(FullPathToSourceDirectory).Length, System.IO.Directory.GetFiles(FullPathToTargetDirectory).Length); + foreach (var CurrentFile in System.IO.Directory.GetFiles(FullPathToTargetDirectory)) + { + // Ensure copy transferred written data + Assert.True(HasExpectedData(CurrentFile, SourceData)); + } + System.IO.Directory.Delete(FullPathToTargetDirectory, recursive: true); + System.IO.Directory.CreateDirectory(FullPathToTargetDirectory); + CreateTestFile(DestData, PathFromBase: "TargetDirectory", TestFileName: $"NewFile0"); + Assert.Throws(() => _fileSystem.CopyDirectory(FullPathToSourceDirectory, FullPathToTargetDirectory, overwrite: false)); + Assert.Equal(System.IO.Directory.GetFiles(FullPathToTargetDirectory).Length, System.IO.Directory.GetFiles(FullPathToSourceDirectory).Length); + foreach (var CurrentFile in System.IO.Directory.GetFiles(FullPathToTargetDirectory)) + { + Assert.True(HasExpectedData(CurrentFile, CurrentFile.EndsWith("0") ? DestData : SourceData)); + } + } + + [Fact] + public void CopyDirectory_SourceDirectoryName_DestinationDirectoryName_OverwriteTrue() + { + var FullPathToSourceDirectory = System.IO.Path.Combine(TestDirectory, "SourceDirectory"); + var FullPathToTargetDirectory = System.IO.Path.Combine(TestDirectory, "TargetDirectory"); + System.IO.Directory.CreateDirectory(FullPathToSourceDirectory); + System.IO.Directory.CreateDirectory(FullPathToTargetDirectory); + for (int i = 0; i < 6; i++) + { + CreateTestFile(SourceData, PathFromBase: "SourceDirectory", TestFileName: $"NewFile{i}"); + } + _fileSystem.CopyDirectory(FullPathToSourceDirectory, FullPathToTargetDirectory, overwrite: true); + Assert.Equal(System.IO.Directory.GetFiles(FullPathToSourceDirectory).Length, System.IO.Directory.GetFiles(FullPathToTargetDirectory).Length); + foreach (var CurrentFile in System.IO.Directory.GetFiles(FullPathToTargetDirectory)) + { + // Ensure copy transferred written data + Assert.True(HasExpectedData(CurrentFile, SourceData)); + } + } + + [Fact] + public void CopyFile_FileSourceFileName_DestinationFileName() + { + var testFileSource = GetTestFilePath(); + var testFileDest = GetTestFilePath(); + + // Write and copy file + WriteFile(testFileSource, SourceData); + WriteFile(testFileDest, DestData); + Assert.Throws(() => _fileSystem.CopyFile(testFileSource, testFileDest)); + + // Ensure copy didn't overwrite existing data + Assert.True(HasExpectedData(testFileDest, DestData)); + + // Get a new destination name + testFileDest = GetTestFilePath(); + _fileSystem.CopyFile(testFileSource, testFileDest); + + // Ensure copy transferred written data + Assert.True(HasExpectedData(testFileDest, SourceData)); + } + + [Fact] + public void CopyFile_FileSourceFileName_DestinationFileName_OverwriteFalse() + { + var testFileSource = GetTestFilePath(); + var testFileDest = GetTestFilePath(); + + // Write and copy file + WriteFile(testFileSource, SourceData); + WriteFile(testFileDest, DestData); + Assert.Throws(() => _fileSystem.CopyFile(testFileSource, testFileDest, overwrite: false)); + + // Ensure copy didn't overwrite existing data + Assert.True(HasExpectedData(testFileDest, DestData)); + } + + [Fact] + public void CopyFile_FileSourceFileName_DestinationFileName_OverwriteTrue() + { + var testFileSource = GetTestFilePath(); + var testFileDest = GetTestFilePath(); + + // Write and copy file + WriteFile(testFileSource, SourceData); + WriteFile(testFileDest, DestData); + _fileSystem.CopyFile(testFileSource, testFileDest, overwrite: true); + + // Ensure copy transferred written data + Assert.True(HasExpectedData(testFileDest, SourceData)); + } + + [Fact] + public void CreateDirectory_Directory() + { + var FullPathToNewDirectory = System.IO.Path.Combine(TestDirectory, "NewDirectory"); + Assert.False(System.IO.Directory.Exists(FullPathToNewDirectory)); + _fileSystem.CreateDirectory(FullPathToNewDirectory); + Assert.True(System.IO.Directory.Exists(FullPathToNewDirectory)); + } + + // Can't get current directory on OSX before setting it. + [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotOSX))] + public void CurrentDirectoryGet() + { + var CurrentDirectory = System.IO.Directory.GetCurrentDirectory(); + Assert.Equal(_fileSystem.CurrentDirectory, CurrentDirectory); + } + + // On OSX, the temp directory /tmp/ is a symlink to /private/tmp, so setting the current + // directory to a symlinked path will result in GetCurrentDirectory returning the absolute + // path that followed the symlink. + [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotOSX))] + public void CurrentDirectorySet() + { + var SavedCurrentDirectory = System.IO.Directory.GetCurrentDirectory(); + _fileSystem.CurrentDirectory = TestDirectory; + Assert.Equal(TestDirectory, _fileSystem.CurrentDirectory); + _fileSystem.CurrentDirectory = SavedCurrentDirectory; + Assert.Equal(_fileSystem.CurrentDirectory, SavedCurrentDirectory); + } + + [Fact] + public void DeleteDirectory_Directory_DeleteAllContents() + { + var FullPathToNewDirectory = System.IO.Path.Combine(TestDirectory, "NewDirectory"); + System.IO.Directory.CreateDirectory(FullPathToNewDirectory); + Assert.True(System.IO.Directory.Exists(FullPathToNewDirectory)); + var testFileSource = CreateTestFile(SourceData, PathFromBase: "NewDirectory", TestFileName: "TestFile"); + Assert.True(System.IO.File.Exists(testFileSource)); + _fileSystem.DeleteDirectory(FullPathToNewDirectory, DeleteDirectoryOption.DeleteAllContents); + Assert.False(System.IO.Directory.Exists(FullPathToNewDirectory)); + } + + [Fact] + public void DeleteDirectory_Directory_ThrowIfDirectoryNonEmpty() + { + var FullPathToNewDirectory = System.IO.Path.Combine(TestDirectory, "NewDirectory"); + _fileSystem.CreateDirectory(FullPathToNewDirectory); + Assert.True(System.IO.Directory.Exists(FullPathToNewDirectory)); + var testFileSource = CreateTestFile(SourceData, PathFromBase: "NewDirectory", TestFileName: "TestFile"); + + Assert.True(System.IO.File.Exists(testFileSource)); + Assert.Throws(() => _fileSystem.DeleteDirectory(FullPathToNewDirectory, DeleteDirectoryOption.ThrowIfDirectoryNonEmpty)); + Assert.True(System.IO.Directory.Exists(FullPathToNewDirectory)); + Assert.True(System.IO.File.Exists(testFileSource)); + } + + [Fact] + public void DeleteFile_File() + { + var testFileSource = CreateTestFile(SourceData, TestFileName: GetTestFileName()); + + Assert.True(System.IO.File.Exists(testFileSource)); + _fileSystem.DeleteFile(testFileSource); + Assert.False(System.IO.File.Exists(testFileSource)); + } + + [Fact] + public void DirectoryExists_Directory() + { + Assert.True(_fileSystem.DirectoryExists(TestDirectory)); + Assert.False(_fileSystem.DirectoryExists(System.IO.Path.Combine(TestDirectory, "NewDirectory"))); + } + + // Not tested: + // public System.Collections.ObjectModel.ReadOnlyCollection Drives { get { throw null; } } + + [Fact] + public void FileExists_File() + { + var testFileSource = CreateTestFile(SourceData, TestFileName: GetTestFileName()); + Assert.True(_fileSystem.FileExists(testFileSource)); + _fileSystem.FileExists(testFileSource); + System.IO.File.Delete(testFileSource); + Assert.False(_fileSystem.FileExists(testFileSource)); + } + + // Not tested: + // public System.Collections.ObjectModel.ReadOnlyCollection FindInFiles(string directory, string containsText, bool ignoreCase, FileIO.SearchOption searchType) { throw null; } + // public System.Collections.ObjectModel.ReadOnlyCollection FindInFiles(string directory, string containsText, bool ignoreCase, FileIO.SearchOption searchType, params string[] fileWildcards) { throw null; } + + [Fact] + public void GetDirectories_Directory() + { + var DirectoryList = _fileSystem.GetDirectories(TestDirectory); + Assert.Equal(DirectoryList.Count, 0); + for (int i = 0; i < 6; i++) + { + System.IO.Directory.CreateDirectory(System.IO.Path.Combine(TestDirectory, $"GetDirectories_DirectoryNewSubDirectory{i}")); + } + DirectoryList = _fileSystem.GetDirectories(TestDirectory); + Assert.Equal(DirectoryList.Count, 6); + for (int i = 0; i < 6; i++) + { + Assert.True(DirectoryList.Contains(System.IO.Path.Combine(TestDirectory, $"GetDirectories_DirectoryNewSubDirectory{i}"))); + } + System.IO.Directory.CreateDirectory(System.IO.Path.Combine(TestDirectory, $"GetDirectories_DirectoryNewSubDirectory0", $"NewSubSubDirectory")); + DirectoryList = _fileSystem.GetDirectories(TestDirectory); + Assert.Equal(DirectoryList.Count, 6); + } + + [Fact] + public void GetDirectories_Directory_SearchOption() + { + var DirectoryList = _fileSystem.GetDirectories(TestDirectory, SearchOption.SearchTopLevelOnly); + Assert.Equal(DirectoryList.Count, 0); + for (int i = 0; i < 6; i++) + { + System.IO.Directory.CreateDirectory(System.IO.Path.Combine(TestDirectory, $"GetDirectories_Directory_SearchOptionNewSubDirectory{i}")); + } + DirectoryList = _fileSystem.GetDirectories(TestDirectory, SearchOption.SearchTopLevelOnly); + Assert.Equal(DirectoryList.Count, 6); + for (int i = 0; i < 6; i++) + { + Assert.True(DirectoryList.Contains(System.IO.Path.Combine(TestDirectory, $"GetDirectories_Directory_SearchOptionNewSubDirectory{i}"))); + } + System.IO.Directory.CreateDirectory(System.IO.Path.Combine(TestDirectory, $"GetDirectories_Directory_SearchOptionNewSubDirectory0", $"NewSubSubDirectory")); + DirectoryList = _fileSystem.GetDirectories(TestDirectory, SearchOption.SearchTopLevelOnly); + Assert.Equal(DirectoryList.Count, 6); + DirectoryList = _fileSystem.GetDirectories(TestDirectory, SearchOption.SearchAllSubDirectories); + Assert.Equal(DirectoryList.Count, 7); + } + + [Fact] + public void GetDirectories_Directory_SearchOption_Wildcards() + { + var DirectoryList = _fileSystem.GetDirectories(TestDirectory, SearchOption.SearchTopLevelOnly, "*"); + Assert.Equal(DirectoryList.Count, 0); + var CreatedDirectories = new List(); + for (int i = 0; i < 6; i++) + { + CreatedDirectories.Add(System.IO.Directory.CreateDirectory(System.IO.Path.Combine(TestDirectory, $"NewSubDirectory00{i}")).Name); + } + DirectoryList = _fileSystem.GetDirectories(TestDirectory, SearchOption.SearchTopLevelOnly, "*000", "*001"); + Assert.Equal(DirectoryList.Count, 2); + for (int i = 0; i < 2; i++) + { + var DirectoryName = System.IO.Path.Combine(TestDirectory, $"NewSubDirectory00{i}"); + Assert.True(DirectoryList.Contains(DirectoryName), $"{DirectoryName} Is missing from Wildcard Search"); + } + System.IO.Directory.CreateDirectory(System.IO.Path.Combine(TestDirectory, $"NewSubDirectory000", $"NewSubSubDirectory000")); + DirectoryList = _fileSystem.GetDirectories(TestDirectory, SearchOption.SearchTopLevelOnly, "*000"); + Assert.Equal(DirectoryList.Count, 1); + DirectoryList = _fileSystem.GetDirectories(TestDirectory, SearchOption.SearchAllSubDirectories, "*000"); + Assert.Equal(DirectoryList.Count, 2); + } + + [Fact] + public void GetDirectoryInfo_Directory() + { + for (int i = 0; i < 6; i++) + { + System.IO.Directory.CreateDirectory(System.IO.Path.Combine(TestDirectory, $"NewSubDirectory{i}")); + } + System.IO.Directory.CreateDirectory(System.IO.Path.Combine(TestDirectory, $"NewSubDirectory0", $"NewSubSubDirectory")); + var info = _fileSystem.GetDirectoryInfo(TestDirectory); + var infoFromIO = new System.IO.DirectoryInfo(TestDirectory); + Assert.Equal(info.CreationTime, infoFromIO.CreationTime); + Assert.Equal(info.Extension, infoFromIO.Extension); + Assert.Equal(info.FullName, TestDirectory); + Assert.Equal(info.LastAccessTime, infoFromIO.LastAccessTime); + Assert.Equal(info.Name, infoFromIO.Name); + Assert.Equal(info.Parent.ToString(), infoFromIO.Parent.ToString()); + Assert.Equal(info.Root.Name, infoFromIO.Root.Name); + } + + [Fact] + public void GetDriveInfo_Drive() + { + var Drives = System.IO.DriveInfo.GetDrives(); + Assert.True(Drives.Length > 0); + Assert.Equal(_fileSystem.GetDriveInfo(Drives[0].Name).Name, new System.IO.DriveInfo(Drives[0].Name).Name); + } + + [Fact] + public void GetFileInfo_File() + { + var TestFile = CreateTestFile(SourceData, TestFileName: GetTestFileName()); + + var FileInfoFromSystemIO = new System.IO.FileInfo(TestFile); + Assert.NotNull(FileInfoFromSystemIO); + + var info = _fileSystem.GetFileInfo(TestFile); + Assert.NotNull(info); + Assert.True(info.Exists); + Assert.Equal(info.Attributes, FileInfoFromSystemIO.Attributes); + Assert.Equal(info.CreationTime, FileInfoFromSystemIO.CreationTime); + Assert.True(info.CreationTime > DateTime.MinValue); + Assert.Equal(info.DirectoryName, FileInfoFromSystemIO.DirectoryName); + Assert.Equal(info.Extension, FileInfoFromSystemIO.Extension); + Assert.Equal(info.FullName, FileInfoFromSystemIO.FullName); + Assert.Equal(info.IsReadOnly, FileInfoFromSystemIO.IsReadOnly); + Assert.Equal(info.LastAccessTime, FileInfoFromSystemIO.LastAccessTime); + Assert.Equal(info.LastWriteTime, FileInfoFromSystemIO.LastWriteTime); + Assert.Equal(info.Length, FileInfoFromSystemIO.Length); + Assert.Equal(info.Name, FileInfoFromSystemIO.Name); + } + + [Fact] + public void GetFiles_Directory() + { + var FileList = _fileSystem.GetFiles(TestDirectory); + Assert.Equal(FileList.Count, 0); + for (int i = 0; i < 6; i++) + { + CreateTestFile(SourceData, PathFromBase: null, TestFileName: $"NewFile{i}"); + } + FileList = _fileSystem.GetFiles(TestDirectory); + Assert.Equal(FileList.Count, 6); + for (int i = 0; i < 6; i++) + { + Assert.True(FileList.Contains(System.IO.Path.Combine(TestDirectory, $"NewFile{i}"))); + } + System.IO.Directory.CreateDirectory(System.IO.Path.Combine(TestDirectory, "GetFiles_DirectoryNewSubDirectory")); + CreateTestFile(SourceData, PathFromBase: "GetFiles_DirectoryNewSubDirectory", TestFileName: "NewFile"); + FileList = _fileSystem.GetFiles(TestDirectory); + Assert.Equal(FileList.Count, 6); + } + + [Fact] + public void GetFiles_Directory_SearchOption() + { + var NewSubDirectoryPath = System.IO.Path.Combine(TestDirectory, "GetFiles_Directory_SearchOptionNewSubDirectory"); + System.IO.Directory.CreateDirectory(NewSubDirectoryPath); + CreateTestFile(SourceData, PathFromBase: "GetFiles_Directory_SearchOptionNewSubDirectory", TestFileName: "NewFile"); + var FileList = _fileSystem.GetFiles(TestDirectory); + Assert.Equal(FileList.Count, 0); + for (int i = 0; i < 6; i++) + { + CreateTestFile(SourceData, PathFromBase: null, TestFileName: $"NewFile{i}"); + } + FileList = _fileSystem.GetFiles(TestDirectory, SearchOption.SearchTopLevelOnly); + CreateTestFile(SourceData, PathFromBase: null, TestFileName: "NewFile"); + Assert.Equal(FileList.Count, 6); + for (int i = 0; i < 6; i++) + { + Assert.True(FileList.Contains(System.IO.Path.Combine(TestDirectory, $"NewFile{i}"))); + } + FileList = _fileSystem.GetFiles(TestDirectory, SearchOption.SearchAllSubDirectories); + Assert.Equal(FileList.Count, 8); + for (int i = 0; i < 7; i++) + { + Assert.True(System.IO.File.Exists(FileList[i])); + } + } + + [Fact] + public void GetFiles_Directory_SearchOption_Wildcards() + { + var FileList = _fileSystem.GetFiles(TestDirectory); + Assert.Equal(FileList.Count, 0); + var TestFileList = new List(); + for (int i = 0; i < 6; i++) + { + TestFileList.Add(CreateTestFile(SourceData, PathFromBase: null, TestFileName: $"NewFile{i}{(i % 2 == 0 ? ".vb" : ".cs")}")); + } + FileList = _fileSystem.GetFiles(TestDirectory, SearchOption.SearchTopLevelOnly, "*.vb"); + Assert.Equal(FileList.Count, 3); + for (int i = 0; i < 3; i++) + { + Assert.True(TestFileList.Contains(FileList[i])); + } + var NewSubDirectoryPath = System.IO.Path.Combine(TestDirectory, "GetFiles_Directory_SearchOption_WildcardsNewSubDirectory"); + System.IO.Directory.CreateDirectory(NewSubDirectoryPath); + TestFileList.Add(CreateTestFile(SourceData, PathFromBase: "GetFiles_Directory_SearchOption_WildcardsNewSubDirectory", TestFileName: "NewFile.cs")); + FileList = _fileSystem.GetFiles(TestDirectory, SearchOption.SearchAllSubDirectories, "*.cs"); + Assert.True(FileList.Contains(TestFileList[TestFileList.Count - 1]), "File in Subdirectory not found"); + Assert.Equal(FileList.Count, 4); + } + + [Fact] + public void GetName_Path() + { + Assert.Equal(_fileSystem.GetName(TestDirectory), System.IO.Path.GetFileName(TestDirectory)); + } + + [Fact] + public void GetParentPath_Path() + { + Assert.Equal(_fileSystem.GetParentPath(TestDirectory), System.IO.Path.GetDirectoryName(TestDirectory)); + } + + [Fact] + public void GetTempFileName() + { + var TempFile = _fileSystem.GetTempFileName(); + Assert.True(System.IO.File.Exists(TempFile)); + Assert.Equal((new System.IO.FileInfo(TempFile)).Length, 0); + System.IO.File.Delete(TempFile); + } + + [Fact] + public void MoveDirectory_SourceDirectoryName_DestinationDirectoryName() + { + var FullPathToSourceDirectory = System.IO.Path.Combine(TestDirectory, "SourceDirectory"); + var FullPathToTargetDirectory = System.IO.Path.Combine(TestDirectory, "TargetDirectory"); + System.IO.Directory.CreateDirectory(FullPathToSourceDirectory); + for (int i = 0; i < 6; i++) + { + CreateTestFile(SourceData, PathFromBase: "SourceDirectory", TestFileName: $"NewFile{i}"); + } + _fileSystem.MoveDirectory(FullPathToSourceDirectory, FullPathToTargetDirectory); + Assert.Equal(6, System.IO.Directory.GetFiles(FullPathToTargetDirectory).Length); + Assert.False(System.IO.Directory.Exists(FullPathToSourceDirectory)); + foreach (var CurrentFile in System.IO.Directory.GetFiles(FullPathToTargetDirectory)) + { + // Ensure move transferred written data + Assert.True(HasExpectedData(CurrentFile, SourceData)); + } + System.IO.Directory.Move(FullPathToTargetDirectory, FullPathToSourceDirectory); + System.IO.Directory.CreateDirectory(FullPathToTargetDirectory); + CreateTestFile(SourceData, PathFromBase: "TargetDirectory", TestFileName: "NewFile0"); + Assert.Throws(() => _fileSystem.MoveDirectory(FullPathToSourceDirectory, FullPathToTargetDirectory)); + } + + [Fact] + public void MoveDirectory_SourceDirectoryName_DestinationDirectoryName_OverwriteFalse() + { + var FullPathToSourceDirectory = System.IO.Path.Combine(TestDirectory, "SourceDirectory"); + var FullPathToTargetDirectory = System.IO.Path.Combine(TestDirectory, "TargetDirectory"); + System.IO.Directory.CreateDirectory(FullPathToSourceDirectory); + for (int i = 0; i < 6; i++) + { + CreateTestFile(SourceData, PathFromBase: "SourceDirectory", TestFileName: $"NewFile{i}"); + } + _fileSystem.MoveDirectory(FullPathToSourceDirectory, FullPathToTargetDirectory, overwrite: false); + Assert.Equal(6, System.IO.Directory.GetFiles(FullPathToTargetDirectory).Length); + Assert.False(System.IO.Directory.Exists(FullPathToSourceDirectory)); + foreach (var CurrentFile in System.IO.Directory.GetFiles(FullPathToTargetDirectory)) + { + // Ensure move transferred written data + Assert.True(HasExpectedData(CurrentFile, SourceData)); + } + System.IO.Directory.Move(FullPathToTargetDirectory, FullPathToSourceDirectory); + System.IO.Directory.CreateDirectory(FullPathToTargetDirectory); + var NewFile0WithPath = CreateTestFile(DestData, PathFromBase: "TargetDirectory", TestFileName: "NewFile0"); + Assert.Throws(() => _fileSystem.MoveDirectory(FullPathToSourceDirectory, FullPathToTargetDirectory, overwrite: false)); + string[] RemainingSourceFilesWithPath = System.IO.Directory.GetFiles(FullPathToSourceDirectory); + // We couldn't move one file + Assert.Equal(1, RemainingSourceFilesWithPath.Length); + // Ensure the file left has correct data + Assert.True(HasExpectedData(RemainingSourceFilesWithPath[0], SourceData)); + + string[] DestinationFilesWithPath = System.IO.Directory.GetFiles(FullPathToTargetDirectory); + Assert.Equal(6, DestinationFilesWithPath.Length); + foreach (var CurrentFile in DestinationFilesWithPath) + { + Assert.True(HasExpectedData(CurrentFile, CurrentFile.EndsWith("0") ? DestData : SourceData)); + } + } + + [Fact] + public void MoveDirectory_SourceDirectoryName_DestinationDirectoryName_OverwriteTrue() + { + var FullPathToSourceDirectory = System.IO.Path.Combine(TestDirectory, "SourceDirectory"); + var FullPathToTargetDirectory = System.IO.Path.Combine(TestDirectory, "TargetDirectory"); + System.IO.Directory.CreateDirectory(FullPathToSourceDirectory); + System.IO.Directory.CreateDirectory(FullPathToTargetDirectory); + for (int i = 0; i < 6; i++) + { + CreateTestFile(SourceData, PathFromBase: "SourceDirectory", TestFileName: $"NewFile{i}"); + } + _fileSystem.MoveDirectory(FullPathToSourceDirectory, FullPathToTargetDirectory, overwrite: true); + Assert.False(System.IO.Directory.Exists(FullPathToSourceDirectory)); + Assert.Equal(6, System.IO.Directory.GetFiles(FullPathToTargetDirectory).Length); + foreach (var CurrentFile in System.IO.Directory.GetFiles(FullPathToTargetDirectory)) + { + // Ensure copy transferred written data + Assert.True(HasExpectedData(CurrentFile, SourceData)); + } + } + + [Fact] + public void MoveFile_SourceFileName_DestinationFileName() + { + var SourceFileNameWithPath = CreateTestFile(SourceData, TestFileName: GetTestFileName()); + var DestinationFileNameWithPath = System.IO.Path.Combine(TestDirectory, "NewName"); + _fileSystem.MoveFile(SourceFileNameWithPath, DestinationFileNameWithPath); + Assert.False(System.IO.File.Exists(SourceFileNameWithPath)); + Assert.True(System.IO.File.Exists(DestinationFileNameWithPath)); + Assert.True(HasExpectedData(DestinationFileNameWithPath, SourceData)); + + SourceFileNameWithPath = DestinationFileNameWithPath; + DestinationFileNameWithPath = CreateTestFile(DestData, TestFileName: GetTestFileName()); + Assert.Throws(() => _fileSystem.MoveFile(SourceFileNameWithPath, DestinationFileNameWithPath)); + // Make sure we did not override existing file + Assert.True(HasExpectedData(DestinationFileNameWithPath, DestData)); + Assert.True(System.IO.File.Exists(SourceFileNameWithPath)); + } + + [Fact] + public void MoveFile_SourceFileName_DestinationFileName_OverwriteFalse() + { + var SourceFileNameWithPath = CreateTestFile(SourceData, TestFileName: GetTestFileName()); + var DestinationFileNameWithPath = System.IO.Path.Combine(TestDirectory, "NewName"); + _fileSystem.MoveFile(SourceFileNameWithPath, DestinationFileNameWithPath, overwrite: false); + Assert.False(System.IO.File.Exists(SourceFileNameWithPath)); + Assert.True(System.IO.File.Exists(DestinationFileNameWithPath)); + Assert.True(HasExpectedData(DestinationFileNameWithPath, SourceData)); + SourceFileNameWithPath = DestinationFileNameWithPath; + DestinationFileNameWithPath = CreateTestFile(DestData, TestFileName: GetTestFileName()); + Assert.Throws(() => _fileSystem.MoveFile(SourceFileNameWithPath, DestinationFileNameWithPath, overwrite: false)); + // Make sure we did not override existing file + Assert.True(HasExpectedData(DestinationFileNameWithPath, DestData)); + Assert.True(System.IO.File.Exists(SourceFileNameWithPath)); + } + + [Fact] + public void MoveFile_SourceFileName_DestinationFileName_OverwriteTrue() + { + var SourceFileNameWithPath = CreateTestFile(SourceData, TestFileName: GetTestFileName()); + var DestinationFileNameWithPath = System.IO.Path.Combine(TestDirectory, "NewName"); + _fileSystem.MoveFile(SourceFileNameWithPath, DestinationFileNameWithPath, overwrite: true); + Assert.False(System.IO.File.Exists(SourceFileNameWithPath)); + Assert.True(System.IO.File.Exists(DestinationFileNameWithPath)); + Assert.True(HasExpectedData(DestinationFileNameWithPath, SourceData)); + CreateTestFile(DestData, PathFromBase: null, TestFileName: (new System.IO.FileInfo(SourceFileNameWithPath)).Name); + _fileSystem.MoveFile(sourceFileName: DestinationFileNameWithPath, destinationFileName: SourceFileNameWithPath, overwrite: true); + Assert.True(System.IO.File.Exists(SourceFileNameWithPath)); + Assert.False(System.IO.File.Exists(DestinationFileNameWithPath)); + Assert.True(HasExpectedData(SourceFileNameWithPath, SourceData)); + } + + // Not tested: + // public Microsoft.VisualBasic.FileIO.TextFieldParser OpenTextFieldParser(string file) { throw null; } + // public Microsoft.VisualBasic.FileIO.TextFieldParser OpenTextFieldParser(string file, params int[] fieldWidths) { throw null; } + // public Microsoft.VisualBasic.FileIO.TextFieldParser OpenTextFieldParser(string file, params string[] delimiters) { throw null; } + // public System.IO.StreamReader OpenTextFileReader(string file) { throw null; } + // public System.IO.StreamReader OpenTextFileReader(string file, System.Text.Encoding encoding) { throw null; } + // public System.IO.StreamWriter OpenTextFileWriter(string file, bool append) { throw null; } + // public System.IO.StreamWriter OpenTextFileWriter(string file, bool append, System.Text.Encoding encoding) { throw null; } + // public byte[] ReadAllBytes(string file) { throw null; } + // public string ReadAllText(string file) { throw null; } + // public string ReadAllText(string file, System.Text.Encoding encoding) { throw null; } + + [Fact] + public void RenameDirectory_Directory_NewName() + { + // If directory does not point to an existing directory. + Assert.Throws(() => _fileSystem.RenameDirectory(System.IO.Path.Combine(TestDirectory, "DoesNotExistDirectory"), "NewDirectory")); + var OrigDirectoryWithPath = System.IO.Path.Combine(TestDirectory, "OriginalDirectory"); + System.IO.Directory.CreateDirectory(OrigDirectoryWithPath); + // If newName is null or Empty String. + Assert.Throws(() => _fileSystem.RenameDirectory(OrigDirectoryWithPath, "")); + var DirectoryNameWithPath = System.IO.Path.Combine(TestDirectory, "DoesNotExist"); + // If contains path information. + Assert.Throws(() => _fileSystem.RenameDirectory(OrigDirectoryWithPath, DirectoryNameWithPath)); + _fileSystem.RenameDirectory(OrigDirectoryWithPath, "NewFDirectory"); + var NewFDirectoryPath = System.IO.Path.Combine(TestDirectory, "NewFDirectory"); + Assert.True(System.IO.Directory.Exists(NewFDirectoryPath)); + Assert.False(System.IO.Directory.Exists(OrigDirectoryWithPath)); + // If directory points to a root directory or if there's an existing directory or an existing file with the same name. + System.IO.Directory.CreateDirectory(OrigDirectoryWithPath); + Assert.Throws(() => _fileSystem.RenameDirectory(NewFDirectoryPath, "OriginalDirectory")); + } + + [Fact] + public void RenameFile_File_NewName() + { + // If file does not point to an existing file. + Assert.Throws(() => _fileSystem.RenameFile(System.IO.Path.Combine(TestDirectory, "DoesNotExistFile"), "NewFile")); + var OrigFileWithPath = CreateTestFile(SourceData, TestFileName: GetTestFileName()); + var ExistingFileWithPath = CreateTestFile(DestData, TestFileName: GetTestFileName()); + // If newName is null or Empty String. + Assert.Throws(() => _fileSystem.RenameFile(OrigFileWithPath, "")); + // If contains path information. + Assert.Throws(() => _fileSystem.RenameFile(OrigFileWithPath, ExistingFileWithPath)); + _fileSystem.RenameFile(OrigFileWithPath, "NewFile"); + var NewFileWithPath = System.IO.Path.Combine(TestDirectory, "NewFile"); + Assert.True(System.IO.File.Exists(NewFileWithPath)); + Assert.False(System.IO.File.Exists(OrigFileWithPath)); + // If there's an existing directory or an existing file with the same name. + Assert.Throws(() => _fileSystem.RenameFile(NewFileWithPath, "NewFile")); + System.IO.Directory.CreateDirectory(System.IO.Path.Combine(TestDirectory, "NewFDirectory")); + Assert.Throws(() => _fileSystem.RenameFile(NewFileWithPath, "NewFDirectory")); + } + [Fact] public void SpecialDirectories() { - FileSystemProxy fileSystem = new ServerComputer().FileSystem; - var specialDirectories = fileSystem.SpecialDirectories; + var specialDirectories = _fileSystem.SpecialDirectories; Assert.NotNull(specialDirectories); - Assert.Same(specialDirectories, fileSystem.SpecialDirectories); + Assert.Same(specialDirectories, _fileSystem.SpecialDirectories); + } + + // Not tested: + // public void WriteAllBytes(string file, byte[] data, bool append) { } + // public void WriteAllText(string file, string text, bool append) { } + // public void WriteAllText(string file, string text, bool append, System.Text.Encoding encoding) { } + + private string CreateTestFile(string TestData, string TestFileName, string PathFromBase = null) + { + Assert.False(String.IsNullOrEmpty(TestFileName)); + var TempFileNameWithPath = TestDirectory; + if (!string.IsNullOrEmpty(PathFromBase)) + { + TempFileNameWithPath = System.IO.Path.Combine(TempFileNameWithPath, PathFromBase); + } + TempFileNameWithPath = System.IO.Path.Combine(TempFileNameWithPath, TestFileName); + Assert.False(System.IO.File.Exists(TempFileNameWithPath), $"File {TempFileNameWithPath} should not exist!"); + WriteFile(TempFileNameWithPath, TestData); + return TempFileNameWithPath; } } } diff --git a/src/Microsoft.VisualBasic.Core/tests/VB/Configurations.props b/src/Microsoft.VisualBasic.Core/tests/VB/Configurations.props deleted file mode 100644 index f97cd5ea7a97..000000000000 --- a/src/Microsoft.VisualBasic.Core/tests/VB/Configurations.props +++ /dev/null @@ -1,8 +0,0 @@ - - - - netcoreapp; - uap; - - - \ No newline at end of file diff --git a/src/Microsoft.VisualBasic.Core/tests/VB/FileIOTestBase.vb b/src/Microsoft.VisualBasic.Core/tests/VB/FileIOTestBase.vb deleted file mode 100644 index 7d0f1a4bdfb7..000000000000 --- a/src/Microsoft.VisualBasic.Core/tests/VB/FileIOTestBase.vb +++ /dev/null @@ -1,60 +0,0 @@ -' Licensed to the .NET Foundation under one or more agreements. -' The .NET Foundation licenses this file to you under the MIT license. -' See the LICENSE file in the project root for more information. -Option Explicit On -Option Strict On - -Imports System -Imports System.Runtime.CompilerServices -Imports Xunit -Namespace Microsoft.VisualBasic.Tests.VB - Public MustInherit Class FileIOTestBase - Inherits IO.FileCleanupTestBase - - ''' - ''' All "Public" tests are Named for the FileIO function they test followed by _ParameterName for each Parameter and if there are options - ''' they are separated into additional test and the Option Value is the last part of the name. - ''' For example CopyDirectory_SourceDirectoryName_DestinationDirectoryName_OverwriteFalse tests CopyDirectory with 3 arguments - ''' SourceDirectoryName, DestinationDirectoryName and Overwrite and the value of Overwrite being tested is False - ''' - Public Shared Function CreateTestFile(TestBase As FileIOTestBase, TestData() As Char, Optional memberName As String = Nothing, Optional lineNumber As Integer = 0) As String - Return CreateTestFile(TestBase, TestData, "", "", memberName, lineNumber) - End Function - - Public Shared Function CreateTestFile(TestBase As FileIOTestBase, TestData() As Char, TestFileName As String, Optional memberName As String = Nothing, Optional lineNumber As Integer = 0) As String - Return CreateTestFile(TestBase, TestData, "", TestFileName, memberName, lineNumber) - End Function - - ''' - ''' Create a new file with TestData - ''' - ''' Object to manage temporary Files - ''' Data to be written to file - ''' Optional additional subdirectories that file will be created under - ''' Optional Filename, If TestFileName is not provided, the name is based on memberName and lineNumber rather than being random./param> - ''' Full Path to New File - Public Shared Function CreateTestFile(TestBase As FileIOTestBase, TestData() As Char, PathFromBase As String, TestFileName As String, Optional memberName As String = Nothing, Optional lineNumber As Integer = 0) As String - Dim TempFileNameWithPath As String - If String.IsNullOrEmpty(TestFileName) Then - TempFileNameWithPath = TestBase.GetTestFilePath(memberName:=memberName, lineNumber:=lineNumber) - Else - Assert.False(IO.Path.IsPathRooted(TestFileName)) - If String.IsNullOrEmpty(PathFromBase) Then - TempFileNameWithPath = IO.Path.Combine(TestBase.TestDirectory, TestFileName) - Else - ' If we have a Base we must have a filename - Assert.False(String.IsNullOrWhiteSpace(TestFileName)) - TempFileNameWithPath = IO.Path.Combine(TestBase.TestDirectory, PathFromBase, TestFileName) - End If - End If - Assert.False(IO.File.Exists(TempFileNameWithPath), $"File {TempFileNameWithPath} should not exist!") - ' Write and copy file - Using writer As New IO.StreamWriter(IO.File.Create(TempFileNameWithPath)) - writer.Write(TestData, 0, TestData.Length) - End Using - - Return TempFileNameWithPath - End Function - - End Class -End Namespace diff --git a/src/Microsoft.VisualBasic.Core/tests/VB/FileIOTests.vb b/src/Microsoft.VisualBasic.Core/tests/VB/FileIOTests.vb deleted file mode 100644 index 05890769e9de..000000000000 --- a/src/Microsoft.VisualBasic.Core/tests/VB/FileIOTests.vb +++ /dev/null @@ -1,883 +0,0 @@ -' Licensed to the .NET Foundation under one or more agreements. -' The .NET Foundation licenses this file to you under the MIT license. -' See the LICENSE file in the project root for more information. -Option Explicit On -Option Strict On - -Imports Microsoft.VisualBasic.FileIO -Imports System -Imports System.Collections.Generic -Imports System.Collections.ObjectModel -Imports System.Linq -Imports System.Runtime.InteropServices -Imports System.Text -Imports Xunit -' Do not Imports System.IO -Namespace Microsoft.VisualBasic.Tests.VB - Public NotInheritable Class FileIOTests - Inherits FileIOTestBase - - Sub New() - End Sub - - Shared ReadOnly DestData() As Char = {"x"c, "X"c, "y"c} - Shared ReadOnly SourceData() As Char = {"a"c, "A"c, "b"c} - - Public Shared ReadOnly Property ManualTestsEnabled() As Boolean - Get - Return Not String.IsNullOrEmpty(Environment.GetEnvironmentVariable("MANUAL_TESTS")) - End Get - End Property - - Private Shared Function DirectoryListToString(DirectoryList As ReadOnlyCollection(Of String)) As String - Dim S As New StringBuilder - For Each d As String In DirectoryList - S.Append($"{d} ") - Next - Return S.ToString - End Function - - Private Shared Function HasExpectedData(FileNameWithPath As String, ExpectedData() As Char) As Boolean - Using stream As New IO.StreamReader(IO.File.OpenRead(FileNameWithPath)) - Dim ReadData(ExpectedData.Length - 1) As Char - stream.Read(ReadData, 0, SourceData.Length) - Return ExpectedData = ReadData - End Using - End Function - - Private Shared Sub WriteFile(FileName As String, TestData As Char()) - Using IOStream As New IO.StreamWriter(IO.File.Create(FileName)) - IOStream.Write(TestData, 0, TestData.Length) - End Using - End Sub - - - Public Shared Sub CombinePathTest_BadBaseDirectory_RelativePath() - Assert.Throws(Of ArgumentNullException)(Function() FileIO.FileSystem.CombinePath(Nothing, "Test2")) - Assert.Throws(Of ArgumentNullException)(Function() FileIO.FileSystem.CombinePath("", "Test2")) - End Sub - - - Public Shared Sub CombinePathTest_BaseDirectory_RelativePath() - Using TestBase As New FileIOTests - Dim TestDirInfo As New IO.DirectoryInfo(TestBase.TestDirectory) - Dim Root As String = TestDirInfo.Root.Name - Assert.Equal(FileIO.FileSystem.CombinePath(Root, "Test2"), IO.Path.Combine(Root, "Test2")) - End Using - End Sub - - - Public Shared Sub CombinePathTest_RootDirectory_RelativePath() - Using TestBase As New FileIOTests - Assert.Equal(FileIO.FileSystem.CombinePath(TestBase.TestDirectory, Nothing), TestBase.TestDirectory) - Assert.Equal(FileIO.FileSystem.CombinePath(TestBase.TestDirectory, ""), TestBase.TestDirectory) - Assert.Equal(FileIO.FileSystem.CombinePath(TestBase.TestDirectory, "Test"), IO.Path.Combine(TestBase.TestDirectory, "Test")) - End Using - End Sub - - - Public Shared Sub CopyDirectory_SourceDirectoryName_DestinationDirectoryName() - Using TestBase As New FileIOTests - Dim FullPathToSourceDirectory As String = IO.Path.Combine(TestBase.TestDirectory(), "SourceDirectory") - IO.Directory.CreateDirectory(FullPathToSourceDirectory) - For i As Integer = 0 To 5 - CreateTestFile(TestBase, SourceData, PathFromBase:="SourceDirectory", TestFileName:=$"NewFile{i}") - Next - Dim FullPathToTargetDirectory As String = IO.Path.Combine(TestBase.TestDirectory(), "TargetDirectory") - FileIO.FileSystem.CopyDirectory(FullPathToSourceDirectory, FullPathToTargetDirectory) - Assert.Equal(IO.Directory.GetFiles(FullPathToSourceDirectory).Count, IO.Directory.GetFiles(FullPathToTargetDirectory).Count) - For Each CurrentFile As String In IO.Directory.GetFiles(FullPathToTargetDirectory) - ' Ensure copy transferred written data - Assert.True(HasExpectedData(CurrentFile, SourceData)) - Next - IO.Directory.Delete(FullPathToTargetDirectory, recursive:=True) - IO.Directory.CreateDirectory(FullPathToTargetDirectory) - CreateTestFile(TestBase, TestData:=SourceData, PathFromBase:="TargetDirectory", TestFileName:=$"NewFile0") - Assert.Throws(Of IO.IOException)(Sub() FileIO.FileSystem.CopyDirectory(FullPathToSourceDirectory, FullPathToTargetDirectory)) - End Using - End Sub - - - Public Shared Sub CopyDirectory_SourceDirectoryName_DestinationDirectoryName_OverwriteFalse() - Using TestBase As New FileIOTests - Dim FullPathToSourceDirectory As String = IO.Path.Combine(TestBase.TestDirectory(), "SourceDirectory") - Dim FullPathToTargetDirectory As String = IO.Path.Combine(TestBase.TestDirectory(), "TargetDirectory") - IO.Directory.CreateDirectory(FullPathToSourceDirectory) - For i As Integer = 0 To 5 - CreateTestFile(TestBase, SourceData, PathFromBase:="SourceDirectory", TestFileName:=$"NewFile{i}") - Next - FileIO.FileSystem.CopyDirectory(FullPathToSourceDirectory, FullPathToTargetDirectory, overwrite:=False) - Assert.Equal(IO.Directory.GetFiles(FullPathToSourceDirectory).Count, IO.Directory.GetFiles(FullPathToTargetDirectory).Count) - For Each CurrentFile As String In IO.Directory.GetFiles(FullPathToTargetDirectory) - ' Ensure copy transferred written data - Assert.True(HasExpectedData(CurrentFile, SourceData)) - Next - IO.Directory.Delete(FullPathToTargetDirectory, recursive:=True) - IO.Directory.CreateDirectory(FullPathToTargetDirectory) - CreateTestFile(TestBase, DestData, PathFromBase:="TargetDirectory", TestFileName:=$"NewFile0") - Assert.Throws(Of IO.IOException)(Sub() FileIO.FileSystem.CopyDirectory(FullPathToSourceDirectory, FullPathToTargetDirectory, overwrite:=False)) - Assert.Equal(IO.Directory.GetFiles(FullPathToTargetDirectory).Count, IO.Directory.GetFiles(FullPathToSourceDirectory).Count) - For Each CurrentFile As String In IO.Directory.GetFiles(FullPathToTargetDirectory) - If CurrentFile.EndsWith("0") Then - ' Make sure file 0 is unchanged with DestData - Assert.True(HasExpectedData(CurrentFile, DestData)) - Else - ' Ensure file 1 - 5 transferred SourceData - Assert.True(HasExpectedData(CurrentFile, SourceData)) - End If - Next - End Using - End Sub - - - Public Shared Sub CopyDirectory_SourceDirectoryName_DestinationDirectoryName_OverwriteTrue() - Using TestBase As New FileIOTests - Dim FullPathToSourceDirectory As String = IO.Path.Combine(TestBase.TestDirectory(), "SourceDirectory") - Dim FullPathToTargetDirectory As String = IO.Path.Combine(TestBase.TestDirectory(), "TargetDirectory") - IO.Directory.CreateDirectory(FullPathToSourceDirectory) - IO.Directory.CreateDirectory(FullPathToTargetDirectory) - For i As Integer = 0 To 5 - CreateTestFile(TestBase, SourceData, PathFromBase:="SourceDirectory", TestFileName:=$"NewFile{i}") - Next - FileIO.FileSystem.CopyDirectory(FullPathToSourceDirectory, FullPathToTargetDirectory, overwrite:=True) - Assert.Equal(IO.Directory.GetFiles(FullPathToSourceDirectory).Count, IO.Directory.GetFiles(FullPathToTargetDirectory).Count) - For Each CurrentFile As String In IO.Directory.GetFiles(FullPathToTargetDirectory) - ' Ensure copy transferred written data - Assert.True(HasExpectedData(CurrentFile, SourceData)) - Next - End Using - End Sub - - - - Public Shared Sub CopyDirectory_SourceDirectoryName_DestinationDirectoryName_SkipFile() - Using TestBase As New FileIOTests - Dim FullPathToSourceDirectory As String = IO.Path.Combine(TestBase.TestDirectory(), "SourceDirectory") - Dim FullPathToTargetDirectory As String = IO.Path.Combine(TestBase.TestDirectory(), "TargetDirectory") - IO.Directory.CreateDirectory(FullPathToSourceDirectory) - For i As Integer = 0 To 5 - CreateTestFile(TestBase, SourceData, PathFromBase:="SourceDirectory", TestFileName:=$"Select_Skip_this_file{i}") - Next - IO.Directory.CreateDirectory(FullPathToTargetDirectory) - CreateTestFile(TestBase, DestData, PathFromBase:="TargetDirectory", TestFileName:=$"Select_Skip_this_file0") - FileIO.FileSystem.CopyDirectory(FullPathToSourceDirectory, FullPathToTargetDirectory, UIOption.AllDialogs, onUserCancel:=UICancelOption.ThrowException) - Assert.Equal(IO.Directory.GetFiles(FullPathToTargetDirectory).Count, IO.Directory.GetFiles(FullPathToSourceDirectory).Count) - For Each CurrentFile As String In IO.Directory.GetFiles(FullPathToTargetDirectory) - If CurrentFile.EndsWith("0") Then - ' Make sure file 0 is unchanged with DestData - Assert.True(HasExpectedData(CurrentFile, DestData)) - Else - ' Ensure file 1 - 5 transferred SourceData - Assert.True(HasExpectedData(CurrentFile, SourceData)) - End If - Next - End Using - - End Sub - - - - Public Shared Sub CopyDirectory_SourceDirectoryName_DestinationDirectoryName_UIOptionUnix() - Using TestBase As New FileIOTests - Dim FullPathToSourceDirectory As String = IO.Path.Combine(TestBase.TestDirectory(), "SourceDirectory") - Dim FullPathToTargetDirectory As String = IO.Path.Combine(TestBase.TestDirectory(), "TargetDirectory") - IO.Directory.CreateDirectory(FullPathToSourceDirectory) - IO.Directory.CreateDirectory(FullPathToTargetDirectory) - For i As Integer = 0 To 5 - CreateTestFile(TestBase, SourceData, PathFromBase:="SourceDirectory", TestFileName:=$"NewFile{i}") - CreateTestFile(TestBase, DestData, PathFromBase:="TargetDirectory", TestFileName:=$"NewFile{i}") - Next - Assert.Throws(Of PlatformNotSupportedException)(Sub() FileIO.FileSystem.CopyDirectory(FullPathToSourceDirectory, FullPathToTargetDirectory, UIOption.AllDialogs)) - End Using - - End Sub - - - Public Shared Sub CopyFile_FileSourceFileName_DestinationFileName() - Using TestBase As New FileIOTests - Dim testFileSource As String = TestBase.GetTestFilePath() - Dim testFileDest As String = TestBase.GetTestFilePath() - - ' Write and copy file - WriteFile(testFileSource, SourceData) - WriteFile(testFileDest, DestData) - Assert.Throws(Of IO.IOException)(Sub() FileIO.FileSystem.CopyFile(testFileSource, testFileDest)) - - ' Ensure copy didn't overwrite existing data - Assert.True(HasExpectedData(testFileDest, DestData)) - - ' Get a new destination name - testFileDest = TestBase.GetTestFilePath() - FileIO.FileSystem.CopyFile(testFileSource, testFileDest) - - ' Ensure copy transferred written data - Assert.True(HasExpectedData(testFileDest, SourceData)) - End Using - End Sub - - - Public Shared Sub CopyFile_FileSourceFileName_DestinationFileName_OverwriteFalse() - Using TestBase As New FileIOTests - Dim testFileSource As String = TestBase.GetTestFilePath() - Dim testFileDest As String = TestBase.GetTestFilePath() - - ' Write and copy file - WriteFile(testFileSource, SourceData) - WriteFile(testFileDest, DestData) - Assert.Throws(Of IO.IOException)(Sub() FileIO.FileSystem.CopyFile(testFileSource, testFileDest, overwrite:=False)) - - ' Ensure copy didn't overwrite existing data - Assert.True(HasExpectedData(testFileDest, DestData)) - End Using - End Sub - - - Public Shared Sub CopyFile_FileSourceFileName_DestinationFileName_OverwriteTrue() - Using TestBase As New FileIOTests - Dim testFileSource As String = TestBase.GetTestFilePath() - Dim testFileDest As String = TestBase.GetTestFilePath() - - ' Write and copy file - WriteFile(testFileSource, SourceData) - WriteFile(testFileDest, DestData) - FileIO.FileSystem.CopyFile(testFileSource, testFileDest, overwrite:=True) - - ' Ensure copy transferred written data - Assert.True(HasExpectedData(testFileDest, SourceData)) - End Using - End Sub - - - - Public Shared Sub CopyFile_SourceFileName_DestinationFileName_UIOptionTestOverWriteFalse() - Using TestBase As New FileIOTests - Dim testFileSource As String = CreateTestFile(TestBase:=TestBase, TestData:=SourceData, TestFileName:="Select_Skip_this_file") - Dim testFileDest As String = TestBase.GetTestFilePath() - - ' Write and copy file - WriteFile(testFileSource, SourceData) - WriteFile(testFileDest, DestData) - FileIO.FileSystem.CopyFile(testFileSource, testFileDest, showUI:=UIOption.AllDialogs, onUserCancel:=UICancelOption.DoNothing) - - ' Ensure copy transferred written data - Assert.True(HasExpectedData(testFileDest, DestData)) - End Using - End Sub - - - - Public Shared Sub CopyFile_SourceFileName_DestinationFileName_UIOptionTestOverWriteTrue() - Using TestBase As New FileIOTests - Dim testFileSource As String = CreateTestFile(TestBase:=TestBase, TestData:=SourceData, TestFileName:="Select_Replace_the_file") - Dim testFileDest As String = TestBase.GetTestFilePath() - - ' Write and copy file - WriteFile(testFileSource, SourceData) - WriteFile(testFileDest, DestData) - - FileIO.FileSystem.CopyFile(testFileSource, testFileDest, showUI:=UIOption.AllDialogs, onUserCancel:=UICancelOption.DoNothing) - - ' Ensure copy transferred written data - Assert.True(HasExpectedData(testFileDest, SourceData)) - End Using - End Sub - - - Public Shared Sub CreateDirectory_Directory() - Using TestBase As New FileIOTests - Dim FullPathToNewDirectory As String = IO.Path.Combine(TestBase.TestDirectory(), "NewDirectory") - Assert.False(IO.Directory.Exists(FullPathToNewDirectory)) - FileIO.FileSystem.CreateDirectory(FullPathToNewDirectory) - Assert.True(IO.Directory.Exists(FullPathToNewDirectory)) - End Using - End Sub - - - Public Shared Sub CurrentDirectoryGet() - If Not RuntimeInformation.IsOSPlatform(OSPlatform.OSX) Then - ' Can't get current Directory on Mac before setting it. - Dim CurrentDirectory As String = IO.Directory.GetCurrentDirectory() - Assert.Equal(FileIO.FileSystem.CurrentDirectory, CurrentDirectory) - End If - End Sub - - - Public Shared Sub CurrentDirectorySet() - If Not RuntimeInformation.IsOSPlatform(OSPlatform.OSX) Then - Dim SavedCurrentDirectory As String = IO.Directory.GetCurrentDirectory() - Using TestBase As New FileIOTests - ' On OSX, the temp directory /tmp/ is a symlink to /private/tmp, so setting the current - ' directory to a symlinked path will result in GetCurrentDirectory returning the absolute - ' path that followed the symlink. - FileIO.FileSystem.CurrentDirectory = TestBase.TestDirectory - Assert.Equal(TestBase.TestDirectory, FileIO.FileSystem.CurrentDirectory()) - FileIO.FileSystem.CurrentDirectory = SavedCurrentDirectory - Assert.Equal(FileIO.FileSystem.CurrentDirectory, SavedCurrentDirectory) - End Using - End If - End Sub - - - Public Shared Sub DeleteDirectory_Directory_DeleteAllContents() - Using TestBase As New FileIOTests - Dim FullPathToNewDirectory As String = IO.Path.Combine(TestBase.TestDirectory(), "NewDirectory") - IO.Directory.CreateDirectory(FullPathToNewDirectory) - Assert.True(IO.Directory.Exists(FullPathToNewDirectory)) - Dim testFileSource As String = CreateTestFile(TestBase, SourceData, PathFromBase:="NewDirectory", TestFileName:="TestFile") - Assert.True(IO.File.Exists(testFileSource)) - FileIO.FileSystem.DeleteDirectory(FullPathToNewDirectory, DeleteDirectoryOption.DeleteAllContents) - Assert.False(IO.Directory.Exists(FullPathToNewDirectory)) - End Using - End Sub - - - Public Shared Sub DeleteDirectory_Directory_ThrowIfDirectoryNonEmpty() - Using TestBase As New FileIOTests - Dim FullPathToNewDirectory As String = IO.Path.Combine(TestBase.TestDirectory(), "NewDirectory") - FileIO.FileSystem.CreateDirectory(FullPathToNewDirectory) - Assert.True(IO.Directory.Exists(FullPathToNewDirectory)) - Dim testFileSource As String = CreateTestFile(TestBase, SourceData, PathFromBase:="NewDirectory", TestFileName:="TestFile") - - Assert.True(IO.File.Exists(testFileSource)) - Assert.Throws(Of IO.IOException)(Sub() FileIO.FileSystem.DeleteDirectory(FullPathToNewDirectory, DeleteDirectoryOption.ThrowIfDirectoryNonEmpty)) - Assert.True(IO.Directory.Exists(FullPathToNewDirectory)) - Assert.True(IO.File.Exists(testFileSource)) - End Using - End Sub - - - - Public Shared Sub DeleteDirectory_Directory_UIOption_Delete() - Using TestBase As New FileIOTests - Dim FullPathToNewDirectory As String = IO.Path.Combine(TestBase.TestDirectory(), "Select_Yes") - FileIO.FileSystem.CreateDirectory(FullPathToNewDirectory) - Assert.True(IO.Directory.Exists(FullPathToNewDirectory)) - Dim testFileSource As String = CreateTestFile(TestBase, SourceData, PathFromBase:="Select_Yes", TestFileName:="DoNotCare") - - Assert.True(IO.File.Exists(testFileSource)) - FileIO.FileSystem.DeleteDirectory(FullPathToNewDirectory, showUI:=UIOption.AllDialogs, recycle:=RecycleOption.DeletePermanently, onUserCancel:=UICancelOption.ThrowException) - Assert.False(IO.Directory.Exists(FullPathToNewDirectory)) - Assert.False(IO.File.Exists(testFileSource)) - End Using - End Sub - - - - Public Shared Sub DeleteDirectory_Directory_UIOption_DoNotDelete() - Using TestBase As New FileIOTests - Dim FullPathToNewDirectory As String = IO.Path.Combine(TestBase.TestDirectory(), "Select_No") - FileIO.FileSystem.CreateDirectory(FullPathToNewDirectory) - Assert.True(IO.Directory.Exists(FullPathToNewDirectory)) - Dim testFileSource As String = CreateTestFile(TestBase, SourceData, PathFromBase:="Select_No", TestFileName:="DoNotCare") - - Assert.True(IO.File.Exists(testFileSource)) - Assert.Throws(Of System.OperationCanceledException)(Sub() FileIO.FileSystem.DeleteDirectory(FullPathToNewDirectory, showUI:=UIOption.AllDialogs, recycle:=RecycleOption.DeletePermanently, onUserCancel:=UICancelOption.ThrowException)) - Assert.True(IO.Directory.Exists(FullPathToNewDirectory)) - Assert.True(IO.File.Exists(testFileSource)) - End Using - End Sub - - - Public Shared Sub DeleteFile_File() - Using TestBase As New FileIOTests - Dim testFileSource As String = CreateTestFile(TestBase, SourceData) - - Assert.True(IO.File.Exists(testFileSource)) - FileIO.FileSystem.DeleteFile(testFileSource) - Assert.False(IO.File.Exists(testFileSource)) - End Using - End Sub - - - Public Shared Sub DirectoryExists_Directory() - Using TestBase As New FileIOTests - Dim TestDirectory As String = TestBase.TestDirectory() - Assert.True(FileIO.FileSystem.DirectoryExists(TestDirectory)) - Assert.False(FileIO.FileSystem.DirectoryExists(IO.Path.Combine(TestDirectory, "NewDirectory"))) - End Using - End Sub - - - Public Shared Sub FileExists_File() - Using TestBase As New FileIOTests - Dim testFileSource As String = CreateTestFile(TestBase, SourceData) - Assert.True(FileIO.FileSystem.FileExists(testFileSource)) - FileIO.FileSystem.FileExists(testFileSource) - IO.File.Delete(testFileSource) - Assert.False(FileIO.FileSystem.FileExists(testFileSource)) - End Using - End Sub - - - Public Shared Sub GetDirectories_Directory() - Using TestBase As New FileIOTests - Dim DirectoryList As ReadOnlyCollection(Of String) = FileIO.FileSystem.GetDirectories(TestBase.TestDirectory) - Assert.True(DirectoryList.Count = 0) - For i As Integer = 0 To 5 - IO.Directory.CreateDirectory(IO.Path.Combine(TestBase.TestDirectory, $"GetDirectories_DirectoryNewSubDirectory{i}")) - Next - DirectoryList = FileIO.FileSystem.GetDirectories(TestBase.TestDirectory) - Assert.True(DirectoryList.Count = 6) - For i As Integer = 0 To 5 - Assert.True(DirectoryList.Contains(IO.Path.Combine(TestBase.TestDirectory, $"GetDirectories_DirectoryNewSubDirectory{i}"))) - Next - IO.Directory.CreateDirectory(IO.Path.Combine(TestBase.TestDirectory, $"GetDirectories_DirectoryNewSubDirectory0", $"NewSubSubDirectory")) - DirectoryList = FileIO.FileSystem.GetDirectories(TestBase.TestDirectory) - Assert.True(DirectoryList.Count = 6) - End Using - End Sub - - - Public Shared Sub GetDirectories_Directory_SearchOption() - Using TestBase As New FileIOTests - Dim DirectoryList As ReadOnlyCollection(Of String) = FileIO.FileSystem.GetDirectories(TestBase.TestDirectory, SearchOption.SearchTopLevelOnly) - Assert.True(DirectoryList.Count = 0) - For i As Integer = 0 To 5 - IO.Directory.CreateDirectory(IO.Path.Combine(TestBase.TestDirectory, $"GetDirectories_Directory_SearchOptionNewSubDirectory{i}")) - Next - DirectoryList = FileIO.FileSystem.GetDirectories(TestBase.TestDirectory, SearchOption.SearchTopLevelOnly) - Assert.True(DirectoryList.Count = 6) - For i As Integer = 0 To 5 - Assert.True(DirectoryList.Contains(IO.Path.Combine(TestBase.TestDirectory, $"GetDirectories_Directory_SearchOptionNewSubDirectory{i}"))) - Next - IO.Directory.CreateDirectory(IO.Path.Combine(TestBase.TestDirectory, $"GetDirectories_Directory_SearchOptionNewSubDirectory0", $"NewSubSubDirectory")) - DirectoryList = FileIO.FileSystem.GetDirectories(TestBase.TestDirectory, SearchOption.SearchTopLevelOnly) - Assert.True(DirectoryList.Count = 6) - DirectoryList = FileIO.FileSystem.GetDirectories(TestBase.TestDirectory, SearchOption.SearchAllSubDirectories) - Assert.True(DirectoryList.Count = 7) - End Using - End Sub - - - Public Shared Sub GetDirectories_Directory_SearchOption_Wildcards() - Using TestBase As New FileIOTests - Dim DirectoryList As ReadOnlyCollection(Of String) = FileIO.FileSystem.GetDirectories(TestBase.TestDirectory, SearchOption.SearchTopLevelOnly, "*") - Assert.True(DirectoryList.Count = 0) - Dim CreatedDirectories As New List(Of String) - For i As Integer = 0 To 5 - CreatedDirectories.Add(IO.Directory.CreateDirectory(IO.Path.Combine(TestBase.TestDirectory, $"NewSubDirectory00{i}")).Name) - Next - DirectoryList = FileIO.FileSystem.GetDirectories(TestBase.TestDirectory, SearchOption.SearchTopLevelOnly, "*000", "*001") - Assert.True(DirectoryList.Count = 2, $"Search results Expected 2 Actual {DirectoryList.Count} DirectoryList = {DirectoryListToString(DirectoryList)} Created List = {DirectoryListToString(New ReadOnlyCollection(Of String)(CreatedDirectories))}") - For i As Integer = 0 To 1 - Dim DirectoryName As String = IO.Path.Combine(TestBase.TestDirectory, $"NewSubDirectory00{i}") - Assert.True(DirectoryList.Contains(DirectoryName), $"{DirectoryName} Is missing from Wildcard Search") - Next - IO.Directory.CreateDirectory(IO.Path.Combine(TestBase.TestDirectory, $"NewSubDirectory000", $"NewSubSubDirectory000")) - DirectoryList = FileIO.FileSystem.GetDirectories(TestBase.TestDirectory, SearchOption.SearchTopLevelOnly, "*000") - Assert.True(DirectoryList.Count = 1, $"Search results Expected 1 Actual {DirectoryList.Count} {DirectoryListToString(DirectoryList)}") - DirectoryList = FileIO.FileSystem.GetDirectories(TestBase.TestDirectory, SearchOption.SearchAllSubDirectories, "*000") - Assert.True(DirectoryList.Count = 2, $"Search results Expected 2 Actual {DirectoryList.Count} {DirectoryListToString(DirectoryList)}") - End Using - End Sub - - - Public Shared Sub GetDirectoryInfo_Directory() - Using TestBase As New FileIOTests - For i As Integer = 0 To 5 - IO.Directory.CreateDirectory(IO.Path.Combine(TestBase.TestDirectory, $"NewSubDirectory{i}")) - Next - IO.Directory.CreateDirectory(IO.Path.Combine(TestBase.TestDirectory, $"NewSubDirectory0", $"NewSubSubDirectory")) - Dim info As IO.DirectoryInfo = FileIO.FileSystem.GetDirectoryInfo(TestBase.TestDirectory) - Dim infoFromIO As IO.DirectoryInfo = New IO.DirectoryInfo(TestBase.TestDirectory) - Assert.True(info.CreationTime = infoFromIO.CreationTime, $"Creation Time info ({info.CreationTime}) <> IO.DriveInfo.CreateTime {infoFromIO.CreationTime})") - Assert.True(info.Extension = infoFromIO.Extension, $"Extension {info.Extension} <> IO.DriveInfo.Extension {infoFromIO.Extension}") - Assert.True(info.FullName = TestBase.TestDirectory, $"Fullname {info.FullName} <> TestBase.TestDirectory {TestBase.TestDirectory}") - Assert.True(info.LastAccessTime = infoFromIO.LastAccessTime) - Assert.True(info.Name = infoFromIO.Name, $"Name {info.Name} Doesn't match {infoFromIO.Name}") - Assert.True(info.Parent.ToString = infoFromIO.Parent.ToString, "info.Parent<>infoFromIO.Parent") - Assert.True(info.Root.Name = infoFromIO.Root.Name, $"info.Root.Name {info.Root.Name} <> IO.DriveInfo.Root.Name){infoFromIO.Root.Name}") - End Using - End Sub - - - Public Shared Sub GetDriveInfo_Drive() - Dim Drives() As IO.DriveInfo = IO.DriveInfo.GetDrives() - Assert.True(Drives.Count > 0) - Assert.Equal(FileIO.FileSystem.GetDriveInfo(Drives(0).Name).Name, New System.IO.DriveInfo(Drives(0).Name).Name) - End Sub - - - Public Shared Sub GetFileInfo_File() - Using TestBase As New FileIOTests - Dim TestFile As String = CreateTestFile(TestBase, SourceData) - - Dim FileInfoFromSystemIO As IO.FileInfo = New IO.FileInfo(TestFile) - Assert.NotNull(FileInfoFromSystemIO) - - Dim info As IO.FileInfo = FileIO.FileSystem.GetFileInfo(TestFile) - Assert.NotNull(info) - With FileInfoFromSystemIO - Assert.True(info.Exists) - Assert.True(info.Attributes = .Attributes) - Assert.True(info.CreationTime = .CreationTime) - Assert.True(info.CreationTime > Date.MinValue, "Starttime = 0") - Assert.True(info.DirectoryName = .DirectoryName) - Assert.True(info.Extension = .Extension) - Assert.True(info.FullName = .FullName) - Assert.True(info.IsReadOnly = .IsReadOnly) - Assert.True(info.LastAccessTime = .LastAccessTime) - Assert.True(info.LastWriteTime = .LastWriteTime) - Assert.True(info.Length = .Length) - Assert.True(info.Name = .Name) - End With - - End Using - End Sub - - - Public Shared Sub GetFiles_Directory() - Using TestBase As New FileIOTests - Dim FileList As ReadOnlyCollection(Of String) = FileIO.FileSystem.GetFiles(TestBase.TestDirectory) - Assert.True(FileList.Count = 0) - For i As Integer = 0 To 5 - CreateTestFile(TestBase, SourceData, TestFileName:=$"NewFile{i}") - Next - FileList = FileIO.FileSystem.GetFiles(TestBase.TestDirectory) - Assert.True(FileList.Count = 6) - For i As Integer = 0 To 5 - Assert.True(FileList.Contains(IO.Path.Combine(TestBase.TestDirectory, $"NewFile{i}"))) - Next - IO.Directory.CreateDirectory(IO.Path.Combine(TestBase.TestDirectory, "GetFiles_DirectoryNewSubDirectory")) - CreateTestFile(TestBase, SourceData, PathFromBase:="GetFiles_DirectoryNewSubDirectory", TestFileName:="NewFile") - FileList = FileIO.FileSystem.GetFiles(TestBase.TestDirectory) - Assert.True(FileList.Count = 6) - End Using - End Sub - - - Public Shared Sub GetFiles_Directory_SearchOption() - Using TestBase As New FileIOTests - Dim NewSubDirectoryPath As String = IO.Path.Combine(TestBase.TestDirectory, "GetFiles_Directory_SearchOptionNewSubDirectory") - IO.Directory.CreateDirectory(NewSubDirectoryPath) - CreateTestFile(TestBase, SourceData, "GetFiles_Directory_SearchOptionNewSubDirectory", TestFileName:="NewFile") - Dim FileList As ReadOnlyCollection(Of String) = FileIO.FileSystem.GetFiles(TestBase.TestDirectory) - Assert.True(FileList.Count = 0) - For i As Integer = 0 To 5 - CreateTestFile(TestBase, SourceData, TestFileName:=$"NewFile{i}") - Next - FileList = FileIO.FileSystem.GetFiles(TestBase.TestDirectory, SearchOption.SearchTopLevelOnly) - CreateTestFile(TestBase, SourceData, TestFileName:="NewFile") - Assert.True(FileList.Count = 6) - For i As Integer = 0 To 5 - Assert.True(FileList.Contains(IO.Path.Combine(TestBase.TestDirectory, $"NewFile{i}"))) - Next - FileList = FileIO.FileSystem.GetFiles(TestBase.TestDirectory, SearchOption.SearchAllSubDirectories) - Assert.True(FileList.Count = 8) - For i As Integer = 0 To 7 - Assert.True(IO.File.Exists(FileList(i))) - Next - End Using - End Sub - - - Public Shared Sub GetFiles_Directory_SearchOption_Wildcards() - Using TestBase As New FileIOTests - Dim FileList As ReadOnlyCollection(Of String) = FileIO.FileSystem.GetFiles(TestBase.TestDirectory) - Assert.True(FileList.Count = 0) - Dim TestFileList As New List(Of String) - For i As Integer = 0 To 5 - TestFileList.Add(CreateTestFile(TestBase, SourceData, TestFileName:=$"NewFile{i}{If(i Mod 2 = 0, ".vb", ".cs")}")) - Next - FileList = FileIO.FileSystem.GetFiles(TestBase.TestDirectory, SearchOption.SearchTopLevelOnly, "*.vb") - Assert.True(FileList.Count = 3) - For i As Integer = 0 To 2 - Assert.True(TestFileList.Contains(FileList(i))) - Next - Dim NewSubDirectoryPath As String = IO.Path.Combine(TestBase.TestDirectory, "GetFiles_Directory_SearchOption_WildcardsNewSubDirectory") - IO.Directory.CreateDirectory(NewSubDirectoryPath) - TestFileList.Add(CreateTestFile(TestBase, SourceData, PathFromBase:="GetFiles_Directory_SearchOption_WildcardsNewSubDirectory", TestFileName:="NewFile.cs")) - FileList = FileIO.FileSystem.GetFiles(TestBase.TestDirectory, SearchOption.SearchAllSubDirectories, "*.cs") - Assert.True(FileList.Contains(TestFileList.Last), "File in Subdirectory not found") - Assert.True(FileList.Count = 4, $"4 files expected, {FileList.Count} returned from FileIO.FileSystem.GetFiles") - End Using - End Sub - - - Public Shared Sub GetName_Path() - Using TestBase As New FileIOTests - Assert.Equal(FileIO.FileSystem.GetName(TestBase.TestDirectory), IO.Path.GetFileName(TestBase.TestDirectory)) - End Using - End Sub - - - Public Shared Sub GetParentPath_Path() - Using TestBase As New FileIOTests - Dim TestDirectory As String = TestBase.TestDirectory - Assert.Equal(FileIO.FileSystem.GetParentPath(TestDirectory), IO.Path.GetDirectoryName(TestDirectory.TrimSeparators)) - End Using - End Sub - - - Public Shared Sub GetTempFileName() - Dim TempFile As String = FileIO.FileSystem.GetTempFileName - Assert.True(IO.File.Exists(TempFile)) - Assert.True((New IO.FileInfo(TempFile)).Length = 0) - IO.File.Delete(TempFile) - End Sub - - - Public Sub LongDirectoryPathTest() - Using TestBase As New FileIOTests - Dim PathLength As Integer = TestBase.TestDirectory().Length - Assert.True(PathLength < 257) ' Need room for slash and new directory name - Dim DirectoryName As String = New String("B"c, 30) - - Assert.True(DirectoryName.Length < 248, $"DirectoryBaseName.Length at {DirectoryName.Length} is not < 248") - Assert.True(IO.Directory.Exists(TestBase.TestDirectory)) - - Dim FullPathToTargetDirectory As String = IO.Path.Combine(TestBase.TestDirectory, DirectoryName) - Assert.True(FullPathToTargetDirectory.Length < 260, $"FullPathToTargetDirectory.Length at {FullPathToTargetDirectory.Length} is not < 260") - - FileIO.FileSystem.CreateDirectory(FullPathToTargetDirectory) - Assert.True(IO.Directory.Exists(FullPathToTargetDirectory)) - - Try - Dim VeryLongFullPathToTargetDirectory As String = IO.Path.Combine(TestBase.TestDirectory, New String("E"c, 239)) - FileIO.FileSystem.CreateDirectory(VeryLongFullPathToTargetDirectory) - Assert.True(IO.Directory.Exists(VeryLongFullPathToTargetDirectory), $"Directory {VeryLongFullPathToTargetDirectory} does not exist") - Catch e As IO.PathTooLongException - Assert.True(RuntimeInformation.IsOSPlatform(OSPlatform.Windows), "Unexpected Failure on non-Windows Platform") - Catch e As IO.DirectoryNotFoundException - Assert.True(RuntimeInformation.IsOSPlatform(OSPlatform.Windows), "Unexpected Failure on non-Windows Platform") - Assert.Equal(8, IntPtr.Size) - End Try - End Using - - End Sub - - - - Public Shared Sub MoveDirectory_Source_DirectoryName_DestinationDirectoryName_UIOptionOverwriteFalse() - Using TestBase As New FileIOTests - Dim FullPathToSourceDirectory As String = IO.Path.Combine(TestBase.TestDirectory(), "SourceDirectory") - Dim FullPathToTargetDirectory As String = IO.Path.Combine(TestBase.TestDirectory(), "TargetDirectory") - IO.Directory.CreateDirectory(FullPathToSourceDirectory) - For i As Integer = 0 To 5 - CreateTestFile(TestBase, SourceData, PathFromBase:="SourceDirectory", TestFileName:=$"Select_Skip_this_file{i}") - Next - IO.Directory.CreateDirectory(FullPathToTargetDirectory) - Dim NewFile0WithPath As String = CreateTestFile(TestBase, DestData, PathFromBase:="TargetDirectory", TestFileName:="Select_Skip_this_file0") - FileIO.FileSystem.MoveDirectory(FullPathToSourceDirectory, FullPathToTargetDirectory, showUI:=UIOption.AllDialogs, onUserCancel:=UICancelOption.ThrowException) - Dim RemainingSourceFilesWithPath As String() = IO.Directory.GetFiles(FullPathToSourceDirectory) - ' We couldn't move one file - Assert.Equal(1, RemainingSourceFilesWithPath.Count) - ' Ensure the file left has correct data - Assert.True(HasExpectedData(RemainingSourceFilesWithPath(0), SourceData)) - - Dim DestinationFilesWithPath As String() = IO.Directory.GetFiles(FullPathToTargetDirectory) - Assert.Equal(6, DestinationFilesWithPath.Count) - For Each CurrentFile As String In DestinationFilesWithPath - If CurrentFile.EndsWith("0") Then - ' Make sure file 0 is unchanged with DestData - Assert.True(HasExpectedData(CurrentFile, DestData)) - Else - ' Ensure file 1 - 5 transferred SourceData - Assert.True(HasExpectedData(CurrentFile, SourceData)) - End If - Next - End Using - End Sub - - - Public Shared Sub MoveDirectory_SourceDirectoryName_DestinationDirectoryName() - Using TestBase As New FileIOTests - Dim FullPathToSourceDirectory As String = IO.Path.Combine(TestBase.TestDirectory(), "SourceDirectory") - Dim FullPathToTargetDirectory As String = IO.Path.Combine(TestBase.TestDirectory(), "TargetDirectory") - IO.Directory.CreateDirectory(FullPathToSourceDirectory) - For i As Integer = 0 To 5 - CreateTestFile(TestBase, SourceData, PathFromBase:="SourceDirectory", TestFileName:=$"NewFile{i}") - Next - FileIO.FileSystem.MoveDirectory(FullPathToSourceDirectory, FullPathToTargetDirectory) - Assert.Equal(6, IO.Directory.GetFiles(FullPathToTargetDirectory).Count) - Assert.False(IO.Directory.Exists(FullPathToSourceDirectory)) - For Each CurrentFile As String In IO.Directory.GetFiles(FullPathToTargetDirectory) - ' Ensure move transferred written data - Assert.True(HasExpectedData(CurrentFile, SourceData)) - Next - IO.Directory.Move(FullPathToTargetDirectory, FullPathToSourceDirectory) - IO.Directory.CreateDirectory(FullPathToTargetDirectory) - CreateTestFile(TestBase, SourceData, PathFromBase:="TargetDirectory", TestFileName:="NewFile0") - Assert.Throws(Of IO.IOException)(Sub() FileIO.FileSystem.MoveDirectory(FullPathToSourceDirectory, FullPathToTargetDirectory)) - End Using - End Sub - - - Public Shared Sub MoveDirectory_SourceDirectoryName_DestinationDirectoryName_OverwriteFalse() - Using TestBase As New FileIOTests - Dim FullPathToSourceDirectory As String = IO.Path.Combine(TestBase.TestDirectory(), "SourceDirectory") - Dim FullPathToTargetDirectory As String = IO.Path.Combine(TestBase.TestDirectory(), "TargetDirectory") - IO.Directory.CreateDirectory(FullPathToSourceDirectory) - For i As Integer = 0 To 5 - CreateTestFile(TestBase, SourceData, PathFromBase:="SourceDirectory", TestFileName:=$"NewFile{i}") - Next - FileIO.FileSystem.MoveDirectory(FullPathToSourceDirectory, FullPathToTargetDirectory, overwrite:=False) - Assert.Equal(6, IO.Directory.GetFiles(FullPathToTargetDirectory).Count) - Assert.False(IO.Directory.Exists(FullPathToSourceDirectory)) - For Each CurrentFile As String In IO.Directory.GetFiles(FullPathToTargetDirectory) - ' Ensure move transferred written data - Assert.True(HasExpectedData(CurrentFile, SourceData)) - Next - IO.Directory.Move(FullPathToTargetDirectory, FullPathToSourceDirectory) - IO.Directory.CreateDirectory(FullPathToTargetDirectory) - Dim NewFile0WithPath As String = CreateTestFile(TestBase, DestData, PathFromBase:="TargetDirectory", TestFileName:="NewFile0") - Assert.Throws(Of IO.IOException)(Sub() FileIO.FileSystem.MoveDirectory(FullPathToSourceDirectory, FullPathToTargetDirectory, overwrite:=False)) - Dim RemainingSourceFilesWithPath As String() = IO.Directory.GetFiles(FullPathToSourceDirectory) - ' We couldn't move one file - Assert.Equal(1, RemainingSourceFilesWithPath.Count) - ' Ensure the file left has correct data - Assert.True(HasExpectedData(RemainingSourceFilesWithPath(0), SourceData)) - - Dim DestinationFilesWithPath As String() = IO.Directory.GetFiles(FullPathToTargetDirectory) - Assert.Equal(6, DestinationFilesWithPath.Count) - For Each CurrentFile As String In DestinationFilesWithPath - If CurrentFile.EndsWith("0") Then - ' Make sure file 0 is unchanged with DestData - Assert.True(HasExpectedData(CurrentFile, DestData)) - Else - ' Ensure file 1 - 5 transferred SourceData - Assert.True(HasExpectedData(CurrentFile, SourceData)) - End If - Next - End Using - End Sub - - - Public Shared Sub MoveDirectory_SourceDirectoryName_DestinationDirectoryName_OverwriteTrue() - Using TestBase As New FileIOTests - Dim FullPathToSourceDirectory As String = IO.Path.Combine(TestBase.TestDirectory(), "SourceDirectory") - Dim FullPathToTargetDirectory As String = IO.Path.Combine(TestBase.TestDirectory(), "TargetDirectory") - IO.Directory.CreateDirectory(FullPathToSourceDirectory) - IO.Directory.CreateDirectory(FullPathToTargetDirectory) - For i As Integer = 0 To 5 - CreateTestFile(TestBase, SourceData, PathFromBase:="SourceDirectory", TestFileName:=$"NewFile{i}") - Next - FileIO.FileSystem.MoveDirectory(FullPathToSourceDirectory, FullPathToTargetDirectory, overwrite:=True) - Assert.False(IO.Directory.Exists(FullPathToSourceDirectory)) - Assert.Equal(6, IO.Directory.GetFiles(FullPathToTargetDirectory).Count) - For Each CurrentFile As String In IO.Directory.GetFiles(FullPathToTargetDirectory) - ' Ensure copy transferred written data - Assert.True(HasExpectedData(CurrentFile, SourceData)) - Next - End Using - End Sub - - - Public Shared Sub MoveFile_SourceFileName_DestinationFileName() - Using TestBase As New FileIOTests - Dim SourceFileNameWithPath As String = CreateTestFile(TestBase, SourceData) - Dim DestinationFileNameWithPath As String = IO.Path.Combine(TestBase.TestDirectory, "NewName") - FileIO.FileSystem.MoveFile(SourceFileNameWithPath, DestinationFileNameWithPath) - Assert.False(IO.File.Exists(SourceFileNameWithPath)) - Assert.True(IO.File.Exists(DestinationFileNameWithPath)) - Assert.True(HasExpectedData(DestinationFileNameWithPath, SourceData)) - - SourceFileNameWithPath = DestinationFileNameWithPath - DestinationFileNameWithPath = CreateTestFile(TestBase, DestData) - Assert.Throws(Of IO.IOException)(Sub() FileIO.FileSystem.MoveFile(SourceFileNameWithPath, DestinationFileNameWithPath)) - ' Make sure we did not override existing file - Assert.True(HasExpectedData(DestinationFileNameWithPath, DestData)) - Assert.True(IO.File.Exists(SourceFileNameWithPath)) - End Using - End Sub - - - Public Shared Sub MoveFile_SourceFileName_DestinationFileName_OverwriteFalse() - Using TestBase As New FileIOTests - Dim SourceFileNameWithPath As String = CreateTestFile(TestBase, SourceData) - Dim DestinationFileNameWithPath As String = IO.Path.Combine(TestBase.TestDirectory, "NewName") - FileIO.FileSystem.MoveFile(SourceFileNameWithPath, DestinationFileNameWithPath, overwrite:=False) - Assert.False(IO.File.Exists(SourceFileNameWithPath)) - Assert.True(IO.File.Exists(DestinationFileNameWithPath)) - Assert.True(HasExpectedData(DestinationFileNameWithPath, SourceData)) - SourceFileNameWithPath = DestinationFileNameWithPath - DestinationFileNameWithPath = CreateTestFile(TestBase, DestData) - Assert.Throws(Of IO.IOException)(Sub() FileIO.FileSystem.MoveFile(SourceFileNameWithPath, DestinationFileNameWithPath, overwrite:=False)) - ' Make sure we did not override existing file - Assert.True(HasExpectedData(DestinationFileNameWithPath, DestData)) - Assert.True(IO.File.Exists(SourceFileNameWithPath)) - End Using - End Sub - - - Public Shared Sub MoveFile_SourceFileName_DestinationFileName_OverwriteTrue() - Using TestBase As New FileIOTests - Dim SourceFileNameWithPath As String = CreateTestFile(TestBase, SourceData) - Dim DestinationFileNameWithPath As String = IO.Path.Combine(TestBase.TestDirectory, "NewName") - FileIO.FileSystem.MoveFile(SourceFileNameWithPath, DestinationFileNameWithPath, overwrite:=True) - Assert.False(IO.File.Exists(SourceFileNameWithPath)) - Assert.True(IO.File.Exists(DestinationFileNameWithPath)) - Assert.True(HasExpectedData(DestinationFileNameWithPath, SourceData)) - CreateTestFile(TestBase, DestData, TestFileName:=(New IO.FileInfo(SourceFileNameWithPath)).Name) - FileIO.FileSystem.MoveFile(sourceFileName:=DestinationFileNameWithPath, destinationFileName:=SourceFileNameWithPath, overwrite:=True) - Assert.True(IO.File.Exists(SourceFileNameWithPath)) - Assert.False(IO.File.Exists(DestinationFileNameWithPath)) - Assert.True(HasExpectedData(SourceFileNameWithPath, SourceData)) - End Using - End Sub - - - - Public Shared Sub MoveFile_SourceFileName_DestinationFileName_UIOptionOverWriteFalse() - Using TestBase As New FileIOTests - Dim SourceFileNameWithPath As String = CreateTestFile(TestBase, SourceData) - Dim DestinationFileNameWithPath As String = IO.Path.Combine(TestBase.TestDirectory, "Select_Skip_this_file") - FileIO.FileSystem.MoveFile(SourceFileNameWithPath, DestinationFileNameWithPath, showUI:=UIOption.AllDialogs, onUserCancel:=UICancelOption.DoNothing) - Assert.False(IO.File.Exists(SourceFileNameWithPath)) - Assert.True(IO.File.Exists(DestinationFileNameWithPath)) - Assert.True(HasExpectedData(DestinationFileNameWithPath, SourceData)) - SourceFileNameWithPath = DestinationFileNameWithPath - DestinationFileNameWithPath = CreateTestFile(TestBase, DestData) - FileIO.FileSystem.MoveFile(SourceFileNameWithPath, DestinationFileNameWithPath, showUI:=UIOption.AllDialogs, onUserCancel:=UICancelOption.ThrowException) - ' Make sure we did not override existing file - Assert.True(HasExpectedData(DestinationFileNameWithPath, DestData)) - Assert.True(IO.File.Exists(SourceFileNameWithPath)) - End Using - End Sub - - - Public Shared Sub RenameDirectory_Directory_NewName() - Using TestBase As New FileIOTests - ' If directory does not point to an existing directory. - Assert.Throws(Of IO.DirectoryNotFoundException)(Sub() FileIO.FileSystem.RenameDirectory(IO.Path.Combine(TestBase.TestDirectory, "DoesNotExistDirectory"), "NewDirectory")) - Dim OrigDirectoryWithPath As String = IO.Path.Combine(TestBase.TestDirectory, "OriginalDirectory") - IO.Directory.CreateDirectory(OrigDirectoryWithPath) - ' If newName is Nothing or Empty String. - Assert.Throws(Of ArgumentNullException)(Sub() FileIO.FileSystem.RenameDirectory(OrigDirectoryWithPath, "")) - Dim DirectoryNameWithPath As String = IO.Path.Combine(TestBase.TestDirectory, "DoesNotExist") - ' If contains path information. - Assert.Throws(Of ArgumentException)(Sub() FileIO.FileSystem.RenameDirectory(OrigDirectoryWithPath, DirectoryNameWithPath)) - FileIO.FileSystem.RenameDirectory(OrigDirectoryWithPath, "NewFDirectory") - Dim NewFDirectoryPath As String = IO.Path.Combine(TestBase.TestDirectory, "NewFDirectory") - Assert.True(IO.Directory.Exists(NewFDirectoryPath)) - Assert.False(IO.Directory.Exists(OrigDirectoryWithPath)) - ' If directory points to a root directory or if there's an existing directory or an existing file with the same name. - IO.Directory.CreateDirectory(OrigDirectoryWithPath) - Assert.Throws(Of IO.IOException)(Sub() FileIO.FileSystem.RenameDirectory(NewFDirectoryPath, "OriginalDirectory")) - End Using - End Sub - - - Public Shared Sub RenameFile_File_NewName() - Using TestBase As New FileIOTests - ' If file does not point to an existing file. - Assert.Throws(Of IO.FileNotFoundException)(Sub() FileIO.FileSystem.RenameFile(IO.Path.Combine(TestBase.TestDirectory, "DoesNotExistFile"), "NewFile")) - Dim OrigFileWithPath As String = CreateTestFile(TestBase, SourceData) - Dim ExistingFileWithPath As String = CreateTestFile(TestBase, DestData) - ' If newName is Nothing or Empty String. - Assert.Throws(Of ArgumentNullException)(Sub() FileIO.FileSystem.RenameFile(OrigFileWithPath, "")) - ' If contains path information. - Assert.Throws(Of ArgumentException)(Sub() FileIO.FileSystem.RenameFile(OrigFileWithPath, ExistingFileWithPath)) - FileIO.FileSystem.RenameFile(OrigFileWithPath, "NewFile") - Dim NewFileWithPath As String = IO.Path.Combine(TestBase.TestDirectory, "NewFile") - Assert.True(IO.File.Exists(NewFileWithPath)) - Assert.False(IO.File.Exists(OrigFileWithPath)) - ' If there's an existing directory or an existing file with the same name. - Assert.Throws(Of IO.IOException)(Sub() FileIO.FileSystem.RenameFile(NewFileWithPath, "NewFile")) - IO.Directory.CreateDirectory(IO.Path.Combine(TestBase.TestDirectory, "NewFDirectory")) - Assert.Throws(Of IO.IOException)(Sub() FileIO.FileSystem.RenameFile(NewFileWithPath, "NewFDirectory")) - End Using - End Sub - - End Class -End Namespace diff --git a/src/Microsoft.VisualBasic.Core/tests/VB/Helpers.vb b/src/Microsoft.VisualBasic.Core/tests/VB/Helpers.vb deleted file mode 100644 index a744cccf3f80..000000000000 --- a/src/Microsoft.VisualBasic.Core/tests/VB/Helpers.vb +++ /dev/null @@ -1,20 +0,0 @@ -' Licensed to the .NET Foundation under one or more agreements. -' The .NET Foundation licenses this file to you under the MIT license. -' See the LICENSE file in the project root for more information. -Option Explicit On -Option Strict On - -Imports System -Imports System.Runtime.CompilerServices - -Namespace Microsoft.VisualBasic.Tests.VB - Public Module Helpers - - - Public Function TrimSeparators(s As String) As String - Return s.TrimEnd({IO.Path.DirectorySeparatorChar, IO.Path.AltDirectorySeparatorChar}) - End Function - - End Module -End Namespace - diff --git a/src/Microsoft.VisualBasic.Core/tests/VB/Microsoft.VisualBasic.VB.Core.Tests.vbproj b/src/Microsoft.VisualBasic.Core/tests/VB/Microsoft.VisualBasic.VB.Core.Tests.vbproj deleted file mode 100644 index 8a6756612c8d..000000000000 --- a/src/Microsoft.VisualBasic.Core/tests/VB/Microsoft.VisualBasic.VB.Core.Tests.vbproj +++ /dev/null @@ -1,13 +0,0 @@ - - - {da95454e-5f0e-4f8a-871a-25d1ab62867a} - netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release - - - - - - - - - diff --git a/src/Microsoft.VisualBasic.Core/tests/VB/SpecialDirectoriesTests.vb b/src/Microsoft.VisualBasic.Core/tests/VB/SpecialDirectoriesTests.vb deleted file mode 100644 index a0131af8f39f..000000000000 --- a/src/Microsoft.VisualBasic.Core/tests/VB/SpecialDirectoriesTests.vb +++ /dev/null @@ -1,75 +0,0 @@ -' Licensed to the .NET Foundation under one or more agreements. -' The .NET Foundation licenses this file to you under the MIT license. -' See the LICENSE file in the project root for more information. -Option Explicit On -Option Strict On - -Imports System -Imports System.Environment -Imports Microsoft.VisualBasic.FileIO -Imports Xunit -Namespace Microsoft.VisualBasic.Tests.VB - Public NotInheritable Class SpecialDirectoriesTests - - Private Shared Sub CheckSpecialFolder(folder As SpecialFolder, getSpecialDirectory As Func(Of String)) - Dim LocalFolderPath As String = Environment.GetFolderPath(folder) - If LocalFolderPath = "" Then - Assert.Throws(Of IO.DirectoryNotFoundException)(Function() getSpecialDirectory.Invoke) - Else - Assert.Equal(LocalFolderPath.TrimSeparators, getSpecialDirectory().TrimSeparators) - End If - - End Sub - - - Public Shared Sub AllUsersApplicationDataFolderTest() - Assert.Throws(Of PlatformNotSupportedException)(Function() SpecialDirectories.AllUsersApplicationData) - End Sub - - - Public Shared Sub CurrentUserApplicationDataFolderTest() - Assert.Throws(Of PlatformNotSupportedException)(Function() SpecialDirectories.CurrentUserApplicationData) - End Sub - - - Public Shared Sub DesktopFolderTest() - CheckSpecialFolder(SpecialFolder.Desktop, Function() SpecialDirectories.Desktop) - End Sub - - - Public Shared Sub MyDocumentsFolderTest() - If PlatformDetection.IsWindowsNanoServer Then - Assert.Throws(Of IO.DirectoryNotFoundException)(Function() SpecialDirectories.MyDocuments) - Exit Sub - End If - - CheckSpecialFolder(SpecialFolder.MyDocuments, Function() SpecialDirectories.MyDocuments) - End Sub - - - Public Shared Sub MyMusicFolderTest() - CheckSpecialFolder(SpecialFolder.MyMusic, Function() SpecialDirectories.MyMusic) - End Sub - - - Public Shared Sub MyPicturesFolderTest() - CheckSpecialFolder(SpecialFolder.MyPictures, Function() SpecialDirectories.MyPictures) - End Sub - - - Public Shared Sub ProgramFilesFolderTest() - CheckSpecialFolder(SpecialFolder.ProgramFiles, Function() SpecialDirectories.ProgramFiles) - End Sub - - - Public Shared Sub ProgramsFolderTest() - CheckSpecialFolder(SpecialFolder.Programs, Function() SpecialDirectories.Programs) - End Sub - - - Public Shared Sub TempFolderTest() - Assert.Equal(IO.Path.GetTempPath.TrimSeparators, SpecialDirectories.Temp.TrimSeparators) - End Sub - - End Class -End Namespace diff --git a/src/Microsoft.VisualBasic.Core/tests/VB/TextFieldParserTests.vb b/src/Microsoft.VisualBasic.Core/tests/VB/TextFieldParserTests.vb deleted file mode 100644 index cdd8b10a468e..000000000000 --- a/src/Microsoft.VisualBasic.Core/tests/VB/TextFieldParserTests.vb +++ /dev/null @@ -1,261 +0,0 @@ -' Licensed to the .NET Foundation under one or more agreements. -' The .NET Foundation licenses this file to you under the MIT license. -' See the LICENSE file in the project root for more information. -Option Explicit On -Option Strict On - -Imports Microsoft.VisualBasic.FileIO -Imports System -Imports Xunit - -Namespace Microsoft.VisualBasic.Tests.VB - Public NotInheritable Class TextFieldParserTests - Inherits FileIOTestBase - - Private Const HeaderLine As String = "seq,oneword,age,street,city,state,zip,dollar,pick,date,paragraph" - Private Const ShortHeaderLine As String = "Field1,Field2,Field3,Field4" - - Private Shared ReadOnly FixedFormatData() As String = { - "Err 1001 Cannot access resource.", - "Err 2014 Resource not found.", - "Acc 10/03/2009 User1 Administrator.", - "Err 0323 Warning: Invalid access attempt.", - "Acc 10/03/2009 User2 Standard user.", - "Acc 10/04/2009 User2 Standard user." - } - - - Public Shared Sub BadPathTest() - Using TestBase As New TextFieldParserTests - Assert.Throws(Of IO.FileNotFoundException)(Function() New TextFieldParser(IO.Path.ChangeExtension(CreateTestFile(TestBase:=TestBase, TestData:=(HeaderLine & vbCrLf & """" & vbCrLf).ToCharArray, PathFromBase:="", TestFileName:=""), ".txt"))) - End Using - End Sub - - - Public Shared Sub CSVBadDataTest() - Using TestBase As New TextFieldParserTests - Using MyReader As New TextFieldParser(CreateTestFile(TestBase, TestData:=(HeaderLine & ",""").ToCharArray, PathFromBase:="", TestFileName:="")) - MyReader.TextFieldType = FieldType.Delimited - MyReader.Delimiters = New String() {","} - While Not MyReader.EndOfData - Assert.Throws(Of MalformedLineException)(Function() MyReader.ReadFields()) - End While - End Using - End Using - End Sub - - - Public Shared Sub CSVDataTest() - Const CSVData As String = - HeaderLine & vbCrLf & - "1,Test,99,Two Words,Rumnoman,KS,80586,$8333.85,GREEN,09/28/1929,""Ipmadaw udoteac vu ote ozehop ane lujat, lar buh cugi lef owici tat liz cogde. -Fatigiug kojitfu taapi iz alujok me zimipa koz latkekij vem fo si cepzizhub li por ejcirlu. -Ewujajlu mivec tooju ad bu cowic irtafit ehaoca vojhehfo aztidun zo wezecmo abe muz wikhutwen idce. -Vesu sejawga tef lahi dirueg si uwmac bidiw nowidza daime sapmim ki casdun urokir tawdac rahaw beiweed.""" - - Using TestBase As New TextFieldParserTests - Using MyReader As New TextFieldParser(CreateTestFile(TestBase, TestData:=CSVData.ToCharArray, PathFromBase:="", TestFileName:="")) - MyReader.TextFieldType = FieldType.Delimited - MyReader.Delimiters = New String() {","} - Dim currentRow As String() - Assert.False(MyReader.EndOfData) - Dim HeaderSplit() As String = HeaderLine.Split(CType(",", Char())) - currentRow = MyReader.ReadFields() - For i As Integer = 0 To HeaderSplit.Length - 1 - Assert.Equal(HeaderSplit(i), currentRow(i)) - Next - - Assert.False(MyReader.EndOfData) - currentRow = MyReader.ReadFields() - Assert.Equal(11, currentRow.Length) - Assert.Equal("1", currentRow(0)) - Assert.Equal("Test", currentRow(1)) - Assert.Equal("99", currentRow(2)) - Assert.Equal("Two Words", currentRow(3)) - Assert.Equal("Rumnoman", currentRow(4)) - Assert.Equal("KS", currentRow(5)) - Assert.Equal("80586", currentRow(6)) - Assert.Equal("$8333.85", currentRow(7)) - Assert.Equal("GREEN", currentRow(8)) - Assert.Equal("09/28/1929", currentRow(9)) - Assert.Equal("Ipmadaw udoteac vu ote ozehop ane lujat, lar buh cugi lef owici tat liz cogde. -Fatigiug kojitfu taapi iz alujok me zimipa koz latkekij vem fo si cepzizhub li por ejcirlu. -Ewujajlu mivec tooju ad bu cowic irtafit ehaoca vojhehfo aztidun zo wezecmo abe muz wikhutwen idce. -Vesu sejawga tef lahi dirueg si uwmac bidiw nowidza daime sapmim ki casdun urokir tawdac rahaw beiweed.", currentRow(10)) - Assert.True(MyReader.EndOfData) - End Using - End Using - End Sub - - - Public Shared Sub CSVDataTestEmptyFields() - Const CSVData As String = - ShortHeaderLine & vbCrLf & "1,,"""",4" - - Using TestBase As New TextFieldParserTests - Using MyReader As New TextFieldParser(CreateTestFile(TestBase, TestData:=CSVData.ToCharArray, PathFromBase:="", TestFileName:="")) - MyReader.TextFieldType = FieldType.Delimited - MyReader.Delimiters = New String() {","} - Dim currentRow As String() - Assert.False(MyReader.EndOfData) - Dim HeaderSplit() As String = ShortHeaderLine.Split(CType(",", Char())) - currentRow = MyReader.ReadFields() - For i As Integer = 0 To HeaderSplit.Length - 1 - Assert.Equal(HeaderSplit(i), currentRow(i)) - Next - - Assert.False(MyReader.EndOfData) - currentRow = MyReader.ReadFields() - Assert.Equal(4, currentRow.Length) - Assert.Equal("1", currentRow(0)) - Assert.Equal("", currentRow(1)) - Assert.Equal("", currentRow(2)) - Assert.Equal("4", currentRow(3)) - Assert.True(MyReader.EndOfData) - End Using - End Using - End Sub - - - Public Shared Sub CSVDataTestLeadingandtrailingspaces() - Const CSVData As String = - ShortHeaderLine & vbCrLf & "1, two,three ,4" - - Using TestBase As New TextFieldParserTests - Using MyReader As New TextFieldParser(CreateTestFile(TestBase, TestData:=CSVData.ToCharArray, PathFromBase:="", TestFileName:="")) - MyReader.TextFieldType = FieldType.Delimited - MyReader.Delimiters = New String() {","} - Dim currentRow As String() - Assert.False(MyReader.EndOfData) - Dim HeaderSplit() As String = ShortHeaderLine.Split(CType(",", Char())) - currentRow = MyReader.ReadFields() - For i As Integer = 0 To HeaderSplit.Length - 1 - Assert.Equal(HeaderSplit(i), currentRow(i)) - Next - - Assert.False(MyReader.EndOfData) - currentRow = MyReader.ReadFields() - Assert.Equal(4, currentRow.Length) - Assert.Equal("1", currentRow(0)) - Assert.Equal("two", currentRow(1)) - Assert.Equal("three", currentRow(2)) - Assert.Equal("4", currentRow(3)) - End Using - End Using - End Sub - - - Public Shared Sub CSVDataTestSpacesOnly() - Const CSVData As String = - ShortHeaderLine & vbCrLf & "1,2,3, " & vbCrLf & " ,2,3,4" - - Using TestBase As New TextFieldParserTests - Using MyReader As New TextFieldParser(CreateTestFile(TestBase, TestData:=CSVData.ToCharArray, PathFromBase:="", TestFileName:="")) - MyReader.TextFieldType = FieldType.Delimited - MyReader.Delimiters = New String() {","} - Dim currentRow As String() - Assert.False(MyReader.EndOfData) - Dim HeaderSplit() As String = ShortHeaderLine.Split(CType(",", Char())) - currentRow = MyReader.ReadFields() - For i As Integer = 0 To HeaderSplit.Length - 1 - Assert.Equal(HeaderSplit(i), currentRow(i)) - Next - - Assert.False(MyReader.EndOfData) - currentRow = MyReader.ReadFields() - Assert.Equal(4, currentRow.Length) - Assert.Equal("1", currentRow(0)) - Assert.Equal("2", currentRow(1)) - Assert.Equal("3", currentRow(2)) - Assert.Equal("", currentRow(3)) - currentRow = MyReader.ReadFields() - Assert.Equal(4, currentRow.Length) - Assert.Equal("", currentRow(0)) - Assert.Equal("2", currentRow(1)) - Assert.Equal("3", currentRow(2)) - Assert.Equal("4", currentRow(3)) - Assert.True(MyReader.EndOfData) - End Using - End Using - End Sub - - - Public Shared Sub FixedFormatTest() - Dim FixedFieldWidths() As Integer = {5, 10, 6, -1} - Using TestBase As New TextFieldParserTests - Using MyReader As New TextFieldParser(CreateTestFile(TestBase, TestData:=String.Join(vbCrLf, FixedFormatData).ToCharArray, PathFromBase:="", TestFileName:="")) - MyReader.TextFieldType = FieldType.FixedWidth - MyReader.SetFieldWidths(FixedFieldWidths) - - Dim CurrentRow As String() - Dim CurrentRowIndex As Integer = 0 - While Not MyReader.EndOfData - CurrentRow = MyReader.ReadFields() - Dim CurrentRowData As String = FixedFormatData(CurrentRowIndex) - Assert.Equal(FixedFieldWidths.Length, CurrentRow.Length) - Assert.Equal(CurrentRow(0), CurrentRowData.Substring(0, FixedFieldWidths(0)).Trim) - Assert.Equal(CurrentRow(1), CurrentRowData.Substring(FixedFieldWidths(0), FixedFieldWidths(1)).Trim) - Assert.Equal(CurrentRow(2), CurrentRowData.Substring(FixedFieldWidths(0) + FixedFieldWidths(1), FixedFieldWidths(2)).Trim) - Assert.Equal(CurrentRow(3), CurrentRowData.Substring(FixedFieldWidths(0) + FixedFieldWidths(1) + FixedFieldWidths(2)).Trim) - CurrentRowIndex += 1 - End While - End Using - End Using - End Sub - - ' code taken from https://docs.microsoft.com/en-us/dotnet/visual-basic/developing-apps/programming/drives-directories-files/how-to-read-from-text-files-with-multiple-formats - - Public Shared Sub MultiFormatTest() - Dim MultipleFormatData() As String = { - "Err 1001 Cannot access resource.", - "Err 2014 Resource not found.", - "Acc 10/03/2009User1 Administrator.", - "Err 0323 Warning: Invalid access attempt.", - "Acc 10/03/2009User2 Standard user.", - "Acc 10/04/2009User2 Standard user." - } - Dim ErrorFormat As Integer() = {5, 5, -1} - Dim StdFormat As Integer() = {5, 10, 11, -1} - - Using TestBase As New TextFieldParserTests - Using MyReader As New TextFieldParser(CreateTestFile(TestBase, TestData:=String.Join(vbCrLf, FixedFormatData).ToCharArray, PathFromBase:="", TestFileName:="")) - MyReader.TextFieldType = FieldType.FixedWidth - MyReader.FieldWidths = StdFormat - - Dim useErrorFormat As Boolean - Dim CurrentRow As String() - Dim CurrentRowIndex As Integer = 0 - While Not MyReader.EndOfData - Dim rowType = MyReader.PeekChars(3) - If String.Compare(rowType, "Err") = 0 Then - ' If this line describes an error, the format of the row will be different. - useErrorFormat = True - MyReader.SetFieldWidths(ErrorFormat) - Else - ' Otherwise parse the fields normally - useErrorFormat = False - MyReader.SetFieldWidths(StdFormat) - End If - - CurrentRow = MyReader.ReadFields - Dim CurrentRowData As String = MultipleFormatData(CurrentRowIndex) - If useErrorFormat Then - Assert.Equal(ErrorFormat.Length, CurrentRow.Length) - Assert.Equal(CurrentRow(0), CurrentRowData.Substring(0, ErrorFormat(0)).Trim) - Assert.Equal(CurrentRow(1), CurrentRowData.Substring(ErrorFormat(0), ErrorFormat(1)).Trim) - Assert.Equal(CurrentRow(2), CurrentRowData.Substring(ErrorFormat(0) + ErrorFormat(1)).Trim) - Else - Assert.Equal(StdFormat.Length, CurrentRow.Length) - Assert.Equal(CurrentRow(0), CurrentRowData.Substring(0, StdFormat(0)).Trim) - Assert.Equal(CurrentRow(1), CurrentRowData.Substring(StdFormat(0), StdFormat(1)).Trim) - Assert.Equal(CurrentRow(2), CurrentRowData.Substring(StdFormat(0) + StdFormat(1), StdFormat(2)).Trim) - Assert.Equal(CurrentRow(3), CurrentRowData.Substring(StdFormat(0) + StdFormat(1) + StdFormat(2)).Trim) - End If - CurrentRowIndex += 1 - End While - End Using - End Using - End Sub - - End Class -End Namespace From ff1db9b09082dfd0dcdeaf8ffa291a825916a7f6 Mon Sep 17 00:00:00 2001 From: Stephen Toub Date: Mon, 29 Apr 2019 18:24:48 -0400 Subject: [PATCH 097/607] Plumb cancellation through SslStream.AuthenticateAsXxAsync (#37259) We accept a CancellationToken into several of the overloads, but it's then dropped and not actually used. This fixes that to ensure it's passed through to the underlying Read/WriteAsync operations. --- .../Net/VirtualNetwork/VirtualNetwork.cs | 14 +- .../VirtualNetwork/VirtualNetworkStream.cs | 4 +- .../src/System/Net/FixedSizeReader.cs | 2 +- .../src/System/Net/HelperAsyncResults.cs | 4 +- .../SslStream.Implementation.Adapters.cs | 10 ++ .../Net/Security/SslStream.Implementation.cs | 18 +-- .../src/System/Net/Security/SslStream.cs | 14 +- .../SslStreamStreamToStreamTest.cs | 50 ++++++- .../SslStreamStreamToStreamTest.netcoreapp.cs | 124 ++++++++++++++++++ .../System.Net.Security.Tests.csproj | 1 + .../Fakes/FakeSslStream.Implementation.cs | 3 +- 11 files changed, 209 insertions(+), 35 deletions(-) create mode 100644 src/System.Net.Security/tests/FunctionalTests/SslStreamStreamToStreamTest.netcoreapp.cs diff --git a/src/Common/tests/System/Net/VirtualNetwork/VirtualNetwork.cs b/src/Common/tests/System/Net/VirtualNetwork/VirtualNetwork.cs index 4bc9a802bbb1..92426c045245 100644 --- a/src/Common/tests/System/Net/VirtualNetwork/VirtualNetwork.cs +++ b/src/Common/tests/System/Net/VirtualNetwork/VirtualNetwork.cs @@ -27,12 +27,12 @@ public VirtualNetworkConnectionBroken() : base("Connection broken") { } private bool _connectionBroken = false; public byte[] ReadFrame(bool server) => - ReadFrameCoreAsync(server, sync: true).GetAwaiter().GetResult(); + ReadFrameCoreAsync(server, sync: true, cancellationToken: default).GetAwaiter().GetResult(); - public Task ReadFrameAsync(bool server) => - ReadFrameCoreAsync(server, sync: false); + public Task ReadFrameAsync(bool server, CancellationToken cancellationToken) => + ReadFrameCoreAsync(server, sync: false, cancellationToken); - private async Task ReadFrameCoreAsync(bool server, bool sync) + private async Task ReadFrameCoreAsync(bool server, bool sync, CancellationToken cancellationToken) { if (_connectionBroken) { @@ -54,8 +54,8 @@ private async Task ReadFrameCoreAsync(bool server, bool sync) } bool successfulWait = sync ? - semaphore.Wait(WaitForReadDataTimeoutMilliseconds) : - await semaphore.WaitAsync(WaitForReadDataTimeoutMilliseconds).ConfigureAwait(false); + semaphore.Wait(WaitForReadDataTimeoutMilliseconds, cancellationToken) : + await semaphore.WaitAsync(WaitForReadDataTimeoutMilliseconds, cancellationToken).ConfigureAwait(false); if (!successfulWait) { throw new TimeoutException("VirtualNetwork: Timeout reading the next frame."); @@ -84,7 +84,7 @@ private async Task ReadFrameCoreAsync(bool server, bool sync) } else { - await Task.Delay(backOffDelayMilliseconds).ConfigureAwait(false); + await Task.Delay(backOffDelayMilliseconds, cancellationToken).ConfigureAwait(false); } } while (remainingTries > 0); diff --git a/src/Common/tests/System/Net/VirtualNetwork/VirtualNetworkStream.cs b/src/Common/tests/System/Net/VirtualNetwork/VirtualNetworkStream.cs index c40cf6885493..0f45acc9f80f 100644 --- a/src/Common/tests/System/Net/VirtualNetwork/VirtualNetworkStream.cs +++ b/src/Common/tests/System/Net/VirtualNetwork/VirtualNetworkStream.cs @@ -89,10 +89,10 @@ public override async Task ReadAsync(byte[] buffer, int offset, int count, { if (_readStream == null || (_readStream.Position >= _readStream.Length)) { - _readStream = new MemoryStream(await _network.ReadFrameAsync(_isServer).ConfigureAwait(false)); + _readStream = new MemoryStream(await _network.ReadFrameAsync(_isServer, cancellationToken).ConfigureAwait(false)); } - return await _readStream.ReadAsync(buffer, offset, count).ConfigureAwait(false); + return await _readStream.ReadAsync(buffer, offset, count, cancellationToken).ConfigureAwait(false); } finally { diff --git a/src/System.Net.Security/src/System/Net/FixedSizeReader.cs b/src/System.Net.Security/src/System/Net/FixedSizeReader.cs index 5c0207dcb916..a5c9fd6d78a2 100644 --- a/src/System.Net.Security/src/System/Net/FixedSizeReader.cs +++ b/src/System.Net.Security/src/System/Net/FixedSizeReader.cs @@ -54,7 +54,7 @@ public static async Task ReadPacketAsync(Stream transport, AsyncProtocolRequest int remainingCount = request.Count, offset = request.Offset; do { - int bytes = await transport.ReadAsync(new Memory(request.Buffer, offset, remainingCount), CancellationToken.None).ConfigureAwait(false); + int bytes = await transport.ReadAsync(new Memory(request.Buffer, offset, remainingCount), request.CancellationToken).ConfigureAwait(false); if (bytes == 0) { if (remainingCount != request.Count) diff --git a/src/System.Net.Security/src/System/Net/HelperAsyncResults.cs b/src/System.Net.Security/src/System/Net/HelperAsyncResults.cs index 01a388518d33..5d87ae5a0e13 100644 --- a/src/System.Net.Security/src/System/Net/HelperAsyncResults.cs +++ b/src/System.Net.Security/src/System/Net/HelperAsyncResults.cs @@ -34,12 +34,13 @@ internal class AsyncProtocolRequest public LazyAsyncResult UserAsyncResult; public int Result; public object AsyncState; + public readonly CancellationToken CancellationToken; public byte[] Buffer; // Temporary buffer reused by a protocol. public int Offset; public int Count; - public AsyncProtocolRequest(LazyAsyncResult userAsyncResult) + public AsyncProtocolRequest(LazyAsyncResult userAsyncResult, CancellationToken cancellationToken = default) { if (userAsyncResult == null) { @@ -50,6 +51,7 @@ public AsyncProtocolRequest(LazyAsyncResult userAsyncResult) NetEventSource.Fail(this, "userAsyncResult is already completed."); } UserAsyncResult = userAsyncResult; + CancellationToken = cancellationToken; } public void SetNextRequest(byte[] buffer, int offset, int count, AsyncProtocolCallback callback) diff --git a/src/System.Net.Security/src/System/Net/Security/SslStream.Implementation.Adapters.cs b/src/System.Net.Security/src/System/Net/Security/SslStream.Implementation.Adapters.cs index aa87684cd563..b5d7ecb36237 100644 --- a/src/System.Net.Security/src/System/Net/Security/SslStream.Implementation.Adapters.cs +++ b/src/System.Net.Security/src/System/Net/Security/SslStream.Implementation.Adapters.cs @@ -13,12 +13,14 @@ private interface ISslWriteAdapter { Task LockAsync(); ValueTask WriteAsync(byte[] buffer, int offset, int count); + CancellationToken CancellationToken { get; } } private interface ISslReadAdapter { ValueTask ReadAsync(byte[] buffer, int offset, int count); ValueTask LockAsync(Memory buffer); + CancellationToken CancellationToken { get; } } private readonly struct SslReadAsync : ISslReadAdapter @@ -35,6 +37,8 @@ public SslReadAsync(SslStream sslStream, CancellationToken cancellationToken) public ValueTask ReadAsync(byte[] buffer, int offset, int count) => _sslStream.InnerStream.ReadAsync(new Memory(buffer, offset, count), _cancellationToken); public ValueTask LockAsync(Memory buffer) => _sslStream.CheckEnqueueReadAsync(buffer); + + public CancellationToken CancellationToken => _cancellationToken; } private readonly struct SslReadSync : ISslReadAdapter @@ -46,6 +50,8 @@ public SslReadAsync(SslStream sslStream, CancellationToken cancellationToken) public ValueTask ReadAsync(byte[] buffer, int offset, int count) => new ValueTask(_sslStream.InnerStream.Read(buffer, offset, count)); public ValueTask LockAsync(Memory buffer) => new ValueTask(_sslStream.CheckEnqueueRead(buffer)); + + public CancellationToken CancellationToken => default; } private readonly struct SslWriteAsync : ISslWriteAdapter @@ -62,6 +68,8 @@ public SslWriteAsync(SslStream sslStream, CancellationToken cancellationToken) public Task LockAsync() => _sslStream.CheckEnqueueWriteAsync(); public ValueTask WriteAsync(byte[] buffer, int offset, int count) => _sslStream.InnerStream.WriteAsync(new ReadOnlyMemory(buffer, offset, count), _cancellationToken); + + public CancellationToken CancellationToken => _cancellationToken; } private readonly struct SslWriteSync : ISslWriteAdapter @@ -81,6 +89,8 @@ public ValueTask WriteAsync(byte[] buffer, int offset, int count) _sslStream.InnerStream.Write(buffer, offset, count); return default; } + + public CancellationToken CancellationToken => default; } } } diff --git a/src/System.Net.Security/src/System/Net/Security/SslStream.Implementation.cs b/src/System.Net.Security/src/System/Net/Security/SslStream.Implementation.cs index 0cbd3340be33..f20a5f9671e6 100644 --- a/src/System.Net.Security/src/System/Net/Security/SslStream.Implementation.cs +++ b/src/System.Net.Security/src/System/Net/Security/SslStream.Implementation.cs @@ -283,7 +283,7 @@ private int CheckOldKeyDecryptedData(Memory buffer) // This method assumes that a SSPI context is already in a good shape. // For example it is either a fresh context or already authenticated context that needs renegotiation. // - private void ProcessAuthentication(LazyAsyncResult lazyResult) + private void ProcessAuthentication(LazyAsyncResult lazyResult, CancellationToken cancellationToken) { if (Interlocked.Exchange(ref _nestedAuth, 1) == 1) { @@ -296,7 +296,7 @@ private void ProcessAuthentication(LazyAsyncResult lazyResult) AsyncProtocolRequest asyncRequest = null; if (lazyResult != null) { - asyncRequest = new AsyncProtocolRequest(lazyResult); + asyncRequest = new AsyncProtocolRequest(lazyResult, cancellationToken); asyncRequest.Buffer = null; #if DEBUG lazyResult._debugAsyncChain = asyncRequest; @@ -342,7 +342,7 @@ private void ProcessAuthentication(LazyAsyncResult lazyResult) // // This is used to reply on re-handshake when received SEC_I_RENEGOTIATE on Read(). // - private void ReplyOnReAuthentication(byte[] buffer) + private void ReplyOnReAuthentication(byte[] buffer, CancellationToken cancellationToken) { lock (SyncLock) { @@ -362,7 +362,7 @@ private void ReplyOnReAuthentication(byte[] buffer) // Forcing async mode. The caller will queue another Read as soon as we return using its preferred // calling convention, which will be woken up when the handshake completes. The callback is just // to capture any SocketErrors that happen during the handshake so they can be surfaced from the Read. - AsyncProtocolRequest asyncRequest = new AsyncProtocolRequest(new LazyAsyncResult(this, null, new AsyncCallback(RehandshakeCompleteCallback))); + AsyncProtocolRequest asyncRequest = new AsyncProtocolRequest(new LazyAsyncResult(this, null, new AsyncCallback(RehandshakeCompleteCallback)), cancellationToken); // Buffer contains a result from DecryptMessage that will be passed to ISC/ASC asyncRequest.Buffer = buffer; ForceAuthentication(false, buffer, asyncRequest); @@ -504,7 +504,7 @@ private void StartSendBlob(byte[] incoming, int count, AsyncProtocolRequest asyn else { asyncRequest.AsyncState = message; - Task t = InnerStream.WriteAsync(message.Payload, 0, message.Size); + Task t = InnerStream.WriteAsync(message.Payload, 0, message.Size, asyncRequest.CancellationToken); if (t.IsCompleted) { t.GetAwaiter().GetResult(); @@ -717,7 +717,7 @@ private void StartSendAuthResetSignal(ProtocolToken message, AsyncProtocolReques else { asyncRequest.AsyncState = exception; - Task t = InnerStream.WriteAsync(message.Payload, 0, message.Size); + Task t = InnerStream.WriteAsync(message.Payload, 0, message.Size, asyncRequest.CancellationToken); if (t.IsCompleted) { t.GetAwaiter().GetResult(); @@ -1405,7 +1405,7 @@ private async ValueTask ReadAsyncInternal(TReadAdapter adapte throw new IOException(SR.net_ssl_io_renego); } - ReplyOnReAuthentication(extraBuffer); + ReplyOnReAuthentication(extraBuffer, adapter.CancellationToken); // Loop on read. continue; @@ -1425,7 +1425,7 @@ private async ValueTask ReadAsyncInternal(TReadAdapter adapte { FinishRead(null); - if (e is IOException) + if (e is IOException || (e is OperationCanceledException && adapter.CancellationToken.IsCancellationRequested)) { throw; } @@ -1524,7 +1524,7 @@ private async Task WriteAsyncInternal(TWriteAdapter writeAdapter, { FinishWrite(); - if (e is IOException) + if (e is IOException || (e is OperationCanceledException && writeAdapter.CancellationToken.IsCancellationRequested)) { throw; } diff --git a/src/System.Net.Security/src/System/Net/Security/SslStream.cs b/src/System.Net.Security/src/System/Net/Security/SslStream.cs index 25c1d59d7634..29426e5ca38b 100644 --- a/src/System.Net.Security/src/System/Net/Security/SslStream.cs +++ b/src/System.Net.Security/src/System/Net/Security/SslStream.cs @@ -222,7 +222,7 @@ public virtual IAsyncResult BeginAuthenticateAsClient(string targetHost, X509Cer return BeginAuthenticateAsClient(options, CancellationToken.None, asyncCallback, asyncState); } - internal virtual IAsyncResult BeginAuthenticateAsClient(SslClientAuthenticationOptions sslClientAuthenticationOptions, CancellationToken cancellationToken, AsyncCallback asyncCallback, object asyncState) + internal IAsyncResult BeginAuthenticateAsClient(SslClientAuthenticationOptions sslClientAuthenticationOptions, CancellationToken cancellationToken, AsyncCallback asyncCallback, object asyncState) { SetAndVerifyValidationCallback(sslClientAuthenticationOptions.RemoteCertificateValidationCallback); SetAndVerifySelectionCallback(sslClientAuthenticationOptions.LocalCertificateSelectionCallback); @@ -230,7 +230,7 @@ internal virtual IAsyncResult BeginAuthenticateAsClient(SslClientAuthenticationO ValidateCreateContext(sslClientAuthenticationOptions, _certValidationDelegate, _certSelectionDelegate); LazyAsyncResult result = new LazyAsyncResult(this, asyncState, asyncCallback); - ProcessAuthentication(result); + ProcessAuthentication(result, cancellationToken); return result; } @@ -277,13 +277,13 @@ private IAsyncResult BeginAuthenticateAsServer(SslServerAuthenticationOptions ss ValidateCreateContext(CreateAuthenticationOptions(sslServerAuthenticationOptions)); LazyAsyncResult result = new LazyAsyncResult(this, asyncState, asyncCallback); - ProcessAuthentication(result); + ProcessAuthentication(result, cancellationToken); return result; } public virtual void EndAuthenticateAsServer(IAsyncResult asyncResult) => EndProcessAuthentication(asyncResult); - internal virtual IAsyncResult BeginShutdown(AsyncCallback asyncCallback, object asyncState) + internal IAsyncResult BeginShutdown(AsyncCallback asyncCallback, object asyncState) { CheckThrow(authSuccessCheck: true, shutdownCheck: true); @@ -291,7 +291,7 @@ internal virtual IAsyncResult BeginShutdown(AsyncCallback asyncCallback, object return TaskToApm.Begin(InnerStream.WriteAsync(message.Payload, 0, message.Payload.Length), asyncCallback, asyncState); } - internal virtual void EndShutdown(IAsyncResult asyncResult) + internal void EndShutdown(IAsyncResult asyncResult) { CheckThrow(authSuccessCheck: true, shutdownCheck: true); @@ -334,7 +334,7 @@ private void AuthenticateAsClient(SslClientAuthenticationOptions sslClientAuthen SetAndVerifySelectionCallback(sslClientAuthenticationOptions.LocalCertificateSelectionCallback); ValidateCreateContext(sslClientAuthenticationOptions, _certValidationDelegate, _certSelectionDelegate); - ProcessAuthentication(null); + ProcessAuthentication(null, default); } public virtual void AuthenticateAsServer(X509Certificate serverCertificate) @@ -366,7 +366,7 @@ private void AuthenticateAsServer(SslServerAuthenticationOptions sslServerAuthen SetAndVerifyValidationCallback(sslServerAuthenticationOptions.RemoteCertificateValidationCallback); ValidateCreateContext(CreateAuthenticationOptions(sslServerAuthenticationOptions)); - ProcessAuthentication(null); + ProcessAuthentication(null, default); } #endregion diff --git a/src/System.Net.Security/tests/FunctionalTests/SslStreamStreamToStreamTest.cs b/src/System.Net.Security/tests/FunctionalTests/SslStreamStreamToStreamTest.cs index b507805d52f3..87c38bf66822 100644 --- a/src/System.Net.Security/tests/FunctionalTests/SslStreamStreamToStreamTest.cs +++ b/src/System.Net.Security/tests/FunctionalTests/SslStreamStreamToStreamTest.cs @@ -704,7 +704,43 @@ public ThrowingDelegatingStream(Stream stream) : base(stream) } } - public sealed class SslStreamStreamToStreamTest_Async : SslStreamStreamToStreamTest + public abstract class SslStreamStreamToStreamTest_CancelableReadWriteAsync : SslStreamStreamToStreamTest + { + [Fact] + public async Task ReadAsync_WriteAsync_Precanceled_ThrowsOperationCanceledException() + { + var network = new VirtualNetwork(); + using (var clientSslStream = new SslStream(new VirtualNetworkStream(network, isServer: false), false, AllowAnyServerCertificate)) + using (var serverSslStream = new SslStream(new VirtualNetworkStream(network, isServer: true))) + { + await DoHandshake(clientSslStream, serverSslStream); + await Assert.ThrowsAnyAsync(() => ReadAsync(clientSslStream, new byte[1], 0, 1, new CancellationToken(true))); + await Assert.ThrowsAnyAsync(() => WriteAsync(serverSslStream, new byte[1], 0, 1, new CancellationToken(true))); + } + } + + [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "ReadAsyncs on netfx aren't cancelable after they start.")] + [Fact] + public async Task ReadAsync_CanceledAfterStart_ThrowsOperationCanceledException() + { + var network = new VirtualNetwork(); + using (var clientSslStream = new SslStream(new VirtualNetworkStream(network, isServer: false), false, AllowAnyServerCertificate)) + using (var serverSslStream = new SslStream(new VirtualNetworkStream(network, isServer: true))) + { + await DoHandshake(clientSslStream, serverSslStream); + + var cts = new CancellationTokenSource(); + + Task t = ReadAsync(clientSslStream, new byte[1], 0, 1, cts.Token); + Assert.False(t.IsCompleted); + + cts.Cancel(); + await Assert.ThrowsAnyAsync(() => t); + } + } + } + + public sealed class SslStreamStreamToStreamTest_Async : SslStreamStreamToStreamTest_CancelableReadWriteAsync { protected override async Task DoHandshake(SslStream clientSslStream, SslStream serverSslStream) { @@ -716,10 +752,10 @@ protected override async Task DoHandshake(SslStream clientSslStream, SslStream s } } - protected override Task ReadAsync(Stream stream, byte[] buffer, int offset, int count, CancellationToken cancellationToken = default(CancellationToken)) => + protected override Task ReadAsync(Stream stream, byte[] buffer, int offset, int count, CancellationToken cancellationToken) => stream.ReadAsync(buffer, offset, count, cancellationToken); - protected override Task WriteAsync(Stream stream, byte[] buffer, int offset, int count, CancellationToken cancellationToken = default(CancellationToken)) => + protected override Task WriteAsync(Stream stream, byte[] buffer, int offset, int count, CancellationToken cancellationToken) => stream.WriteAsync(buffer, offset, count, cancellationToken); } @@ -735,12 +771,12 @@ protected override async Task DoHandshake(SslStream clientSslStream, SslStream s } } - protected override Task ReadAsync(Stream stream, byte[] buffer, int offset, int count, CancellationToken cancellationToken = default(CancellationToken)) => + protected override Task ReadAsync(Stream stream, byte[] buffer, int offset, int count, CancellationToken cancellationToken) => cancellationToken.IsCancellationRequested ? Task.FromCanceled(cancellationToken) : Task.Factory.FromAsync(stream.BeginRead, stream.EndRead, buffer, offset, count, null); - protected override Task WriteAsync(Stream stream, byte[] buffer, int offset, int count, CancellationToken cancellationToken = default(CancellationToken)) => + protected override Task WriteAsync(Stream stream, byte[] buffer, int offset, int count, CancellationToken cancellationToken) => cancellationToken.IsCancellationRequested ? Task.FromCanceled(cancellationToken) : Task.Factory.FromAsync(stream.BeginWrite, stream.EndWrite, buffer, offset, count, null); @@ -758,7 +794,7 @@ protected override async Task DoHandshake(SslStream clientSslStream, SslStream s } } - protected override Task ReadAsync(Stream stream, byte[] buffer, int offset, int count, CancellationToken cancellationToken = default(CancellationToken)) + protected override Task ReadAsync(Stream stream, byte[] buffer, int offset, int count, CancellationToken cancellationToken) { if (cancellationToken.IsCancellationRequested) { @@ -775,7 +811,7 @@ protected override async Task DoHandshake(SslStream clientSslStream, SslStream s } } - protected override Task WriteAsync(Stream stream, byte[] buffer, int offset, int count, CancellationToken cancellationToken = default(CancellationToken)) + protected override Task WriteAsync(Stream stream, byte[] buffer, int offset, int count, CancellationToken cancellationToken) { if (cancellationToken.IsCancellationRequested) { diff --git a/src/System.Net.Security/tests/FunctionalTests/SslStreamStreamToStreamTest.netcoreapp.cs b/src/System.Net.Security/tests/FunctionalTests/SslStreamStreamToStreamTest.netcoreapp.cs new file mode 100644 index 000000000000..62de050cadee --- /dev/null +++ b/src/System.Net.Security/tests/FunctionalTests/SslStreamStreamToStreamTest.netcoreapp.cs @@ -0,0 +1,124 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.IO; +using System.Net.Sockets; +using System.Net.Test.Common; +using System.Security.Cryptography.X509Certificates; +using System.Threading; +using System.Threading.Tasks; +using Xunit; + +namespace System.Net.Security.Tests +{ + using Configuration = System.Net.Test.Common.Configuration; + + public sealed class SslStreamStreamToStreamTest_MemoryAsync : SslStreamStreamToStreamTest_CancelableReadWriteAsync + { + protected override async Task DoHandshake(SslStream clientSslStream, SslStream serverSslStream) + { + using (X509Certificate2 certificate = Configuration.Certificates.GetServerCertificate()) + { + Task t1 = clientSslStream.AuthenticateAsClientAsync(new SslClientAuthenticationOptions() { TargetHost = certificate.GetNameInfo(X509NameType.SimpleName, false) }, CancellationToken.None); + Task t2 = serverSslStream.AuthenticateAsServerAsync(new SslServerAuthenticationOptions() { ServerCertificate = certificate }, CancellationToken.None); + await TestConfiguration.WhenAllOrAnyFailedWithTimeout(t1, t2); + } + } + + protected override Task ReadAsync(Stream stream, byte[] buffer, int offset, int count, CancellationToken cancellationToken) => + stream.ReadAsync(new Memory(buffer, offset, count), cancellationToken).AsTask(); + + protected override Task WriteAsync(Stream stream, byte[] buffer, int offset, int count, CancellationToken cancellationToken) => + stream.WriteAsync(new ReadOnlyMemory(buffer, offset, count), cancellationToken).AsTask(); + + [Fact] + public async Task Authenticate_Precanceled_ThrowsOperationCanceledException() + { + var network = new VirtualNetwork(); + using (var clientSslStream = new SslStream(new VirtualNetworkStream(network, isServer: false), false, AllowAnyServerCertificate)) + using (var serverSslStream = new SslStream(new VirtualNetworkStream(network, isServer: true))) + using (X509Certificate2 certificate = Configuration.Certificates.GetServerCertificate()) + { + await Assert.ThrowsAnyAsync(() => clientSslStream.AuthenticateAsClientAsync(new SslClientAuthenticationOptions() { TargetHost = certificate.GetNameInfo(X509NameType.SimpleName, false) }, new CancellationToken(true))); + await Assert.ThrowsAnyAsync(() => serverSslStream.AuthenticateAsServerAsync(new SslServerAuthenticationOptions() { ServerCertificate = certificate }, new CancellationToken(true))); + } + } + + [Fact] + public async Task AuthenticateAsClientAsync_VirtualNetwork_CanceledAfterStart_ThrowsOperationCanceledException() + { + var network = new VirtualNetwork(); + using (var clientSslStream = new SslStream(new VirtualNetworkStream(network, isServer: false), false, AllowAnyServerCertificate)) + using (var serverSslStream = new SslStream(new VirtualNetworkStream(network, isServer: true))) + using (X509Certificate2 certificate = Configuration.Certificates.GetServerCertificate()) + { + var cts = new CancellationTokenSource(); + Task t = clientSslStream.AuthenticateAsClientAsync(new SslClientAuthenticationOptions() { TargetHost = certificate.GetNameInfo(X509NameType.SimpleName, false) }, cts.Token); + cts.Cancel(); + await Assert.ThrowsAnyAsync(() => t); + } + } + + [Fact] + public async Task AuthenticateAsClientAsync_Sockets_CanceledAfterStart_ThrowsOperationCanceledException() + { + using (var listener = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp)) + using (var client = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp)) + { + listener.Bind(new IPEndPoint(IPAddress.Loopback, 0)); + listener.Listen(1); + + await client.ConnectAsync(listener.LocalEndPoint); + using (Socket server = await listener.AcceptAsync()) + using (var clientSslStream = new SslStream(new NetworkStream(client), false, AllowAnyServerCertificate)) + using (var serverSslStream = new SslStream(new NetworkStream(server))) + using (X509Certificate2 certificate = Configuration.Certificates.GetServerCertificate()) + { + var cts = new CancellationTokenSource(); + Task t = clientSslStream.AuthenticateAsClientAsync(new SslClientAuthenticationOptions() { TargetHost = certificate.GetNameInfo(X509NameType.SimpleName, false) }, cts.Token); + cts.Cancel(); + await Assert.ThrowsAnyAsync(() => t); + } + } + } + + [Fact] + public async Task AuthenticateAsServerAsync_VirtualNetwork_CanceledAfterStart_ThrowsOperationCanceledException() + { + var network = new VirtualNetwork(); + using (var clientSslStream = new SslStream(new VirtualNetworkStream(network, isServer: false), false, AllowAnyServerCertificate)) + using (var serverSslStream = new SslStream(new VirtualNetworkStream(network, isServer: true))) + using (X509Certificate2 certificate = Configuration.Certificates.GetServerCertificate()) + { + var cts = new CancellationTokenSource(); + Task t = serverSslStream.AuthenticateAsServerAsync(new SslServerAuthenticationOptions() { ServerCertificate = certificate }, cts.Token); + cts.Cancel(); + await Assert.ThrowsAnyAsync(() => t); + } + } + + [Fact] + public async Task AuthenticateAsServerAsync_Sockets_CanceledAfterStart_ThrowsOperationCanceledException() + { + using (var listener = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp)) + using (var client = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp)) + { + listener.Bind(new IPEndPoint(IPAddress.Loopback, 0)); + listener.Listen(1); + + await client.ConnectAsync(listener.LocalEndPoint); + using (Socket server = await listener.AcceptAsync()) + using (var clientSslStream = new SslStream(new NetworkStream(client), false, AllowAnyServerCertificate)) + using (var serverSslStream = new SslStream(new NetworkStream(server))) + using (X509Certificate2 certificate = Configuration.Certificates.GetServerCertificate()) + { + var cts = new CancellationTokenSource(); + Task t = serverSslStream.AuthenticateAsServerAsync(new SslServerAuthenticationOptions() { ServerCertificate = certificate }, cts.Token); + cts.Cancel(); + await Assert.ThrowsAnyAsync(() => t); + } + } + } + } +} diff --git a/src/System.Net.Security/tests/FunctionalTests/System.Net.Security.Tests.csproj b/src/System.Net.Security/tests/FunctionalTests/System.Net.Security.Tests.csproj index bccb355fc27c..d60b476f02b5 100644 --- a/src/System.Net.Security/tests/FunctionalTests/System.Net.Security.Tests.csproj +++ b/src/System.Net.Security/tests/FunctionalTests/System.Net.Security.Tests.csproj @@ -99,6 +99,7 @@ + diff --git a/src/System.Net.Security/tests/UnitTests/Fakes/FakeSslStream.Implementation.cs b/src/System.Net.Security/tests/UnitTests/Fakes/FakeSslStream.Implementation.cs index 1d2732d4be6a..140a14599e1c 100644 --- a/src/System.Net.Security/tests/UnitTests/Fakes/FakeSslStream.Implementation.cs +++ b/src/System.Net.Security/tests/UnitTests/Fakes/FakeSslStream.Implementation.cs @@ -4,6 +4,7 @@ using System.Security.Authentication.ExtendedProtection; using System.Security.Cryptography.X509Certificates; +using System.Threading; using System.Threading.Tasks; namespace System.Net.Security @@ -64,7 +65,7 @@ private void CloseInternal() // This method assumes that a SSPI context is already in a good shape. // For example it is either a fresh context or already authenticated context that needs renegotiation. // - private void ProcessAuthentication(LazyAsyncResult lazyResult) + private void ProcessAuthentication(LazyAsyncResult lazyResult, CancellationToken cancellationToken) { } From 2b08890a63ac216b00141bf4a17de8b8a948ef27 Mon Sep 17 00:00:00 2001 From: Anirudh Agnihotry Date: Mon, 29 Apr 2019 13:56:48 -0700 Subject: [PATCH 098/607] Improve Precision to 10 microseconds in timespan (dotnet/coreclr#24279) * Increasing precision properly and leaving the rounding of to casting operator * disabling corefx tests in coreclr and addressing feedback * correcting test project name * Fix json Signed-off-by: dotnet-bot --- src/Common/src/CoreLib/System/TimeSpan.cs | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/src/Common/src/CoreLib/System/TimeSpan.cs b/src/Common/src/CoreLib/System/TimeSpan.cs index 2f5c4ed61c19..be5654ef7bb5 100644 --- a/src/Common/src/CoreLib/System/TimeSpan.cs +++ b/src/Common/src/CoreLib/System/TimeSpan.cs @@ -196,7 +196,7 @@ public int CompareTo(TimeSpan value) public static TimeSpan FromDays(double value) { - return Interval(value, MillisPerDay); + return Interval(value, TicksPerDay); } public TimeSpan Duration() @@ -232,28 +232,27 @@ public override int GetHashCode() public static TimeSpan FromHours(double value) { - return Interval(value, MillisPerHour); + return Interval(value, TicksPerHour); } - private static TimeSpan Interval(double value, int scale) + private static TimeSpan Interval(double value, double scale) { if (double.IsNaN(value)) throw new ArgumentException(SR.Arg_CannotBeNaN); - double tmp = value * scale; - double millis = tmp + (value >= 0 ? 0.5 : -0.5); - if ((millis > long.MaxValue / TicksPerMillisecond) || (millis < long.MinValue / TicksPerMillisecond)) + double millis = value * scale; + if ((millis > long.MaxValue) || (millis < long.MinValue)) throw new OverflowException(SR.Overflow_TimeSpanTooLong); - return new TimeSpan((long)millis * TicksPerMillisecond); + return new TimeSpan((long)millis); } public static TimeSpan FromMilliseconds(double value) { - return Interval(value, 1); + return Interval(value, TicksPerMillisecond); } public static TimeSpan FromMinutes(double value) { - return Interval(value, MillisPerMinute); + return Interval(value, TicksPerMinute); } public TimeSpan Negate() @@ -265,7 +264,7 @@ public TimeSpan Negate() public static TimeSpan FromSeconds(double value) { - return Interval(value, MillisPerSecond); + return Interval(value, TicksPerSecond); } public TimeSpan Subtract(TimeSpan ts) From fe807da325e532aaabec338c3ecd78b1a7e5efe8 Mon Sep 17 00:00:00 2001 From: Anirudh Agnihotry Date: Mon, 29 Apr 2019 15:27:05 -0700 Subject: [PATCH 099/607] Making BaseNumberConverter Internal (#37278) * type converter ctor made internal * diasabling apicompat for the change * Fixing uap app compat --- .../ref/System.ComponentModel.TypeConverter.cs | 2 +- .../src/System/ComponentModel/BaseNumberConverter.cs | 2 ++ src/shims/ApiCompatBaseline.netcoreapp.netstandard.txt | 9 ++++++++- .../ApiCompatBaseline.netcoreapp.netstandardOnly.txt | 8 +++++++- src/shims/ApiCompatBaseline.uap.netstandard.txt | 9 ++++++++- src/shims/ApiCompatBaseline.uap.netstandardOnly.txt | 8 +++++++- src/shims/ApiCompatBaseline.uapaot.netstandard.txt | 9 ++++++++- src/shims/ApiCompatBaseline.uapaot.netstandardOnly.txt | 8 +++++++- 8 files changed, 48 insertions(+), 7 deletions(-) diff --git a/src/System.ComponentModel.TypeConverter/ref/System.ComponentModel.TypeConverter.cs b/src/System.ComponentModel.TypeConverter/ref/System.ComponentModel.TypeConverter.cs index 8ecf8e715762..f24bbefe459d 100644 --- a/src/System.ComponentModel.TypeConverter/ref/System.ComponentModel.TypeConverter.cs +++ b/src/System.ComponentModel.TypeConverter/ref/System.ComponentModel.TypeConverter.cs @@ -84,7 +84,7 @@ public AttributeProviderAttribute(System.Type type) { } } public abstract partial class BaseNumberConverter : System.ComponentModel.TypeConverter { - protected BaseNumberConverter() { } + internal BaseNumberConverter() { } public override bool CanConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Type sourceType) { throw null; } public override bool CanConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Type destinationType) { throw null; } public override object ConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value) { throw null; } diff --git a/src/System.ComponentModel.TypeConverter/src/System/ComponentModel/BaseNumberConverter.cs b/src/System.ComponentModel.TypeConverter/src/System/ComponentModel/BaseNumberConverter.cs index b631cde30d84..840378ab0750 100644 --- a/src/System.ComponentModel.TypeConverter/src/System/ComponentModel/BaseNumberConverter.cs +++ b/src/System.ComponentModel.TypeConverter/src/System/ComponentModel/BaseNumberConverter.cs @@ -11,6 +11,8 @@ namespace System.ComponentModel /// public abstract class BaseNumberConverter : TypeConverter { + internal BaseNumberConverter() { } + /// /// Determines whether this editor will attempt to convert hex (0x or #) strings /// diff --git a/src/shims/ApiCompatBaseline.netcoreapp.netstandard.txt b/src/shims/ApiCompatBaseline.netcoreapp.netstandard.txt index f9326ee8077a..9b33da3ea6e7 100644 --- a/src/shims/ApiCompatBaseline.netcoreapp.netstandard.txt +++ b/src/shims/ApiCompatBaseline.netcoreapp.netstandard.txt @@ -26,4 +26,11 @@ Compat issues with assembly System.Security.Cryptography.Pkcs: MembersMustExist : Member 'System.Security.Cryptography.Pkcs.CmsSigner.Certificates.set(System.Security.Cryptography.X509Certificates.X509Certificate2Collection)' does not exist in the implementation but it does exist in the contract. MembersMustExist : Member 'System.Security.Cryptography.Pkcs.CmsSigner.SignedAttributes.set(System.Security.Cryptography.CryptographicAttributeObjectCollection)' does not exist in the implementation but it does exist in the contract. MembersMustExist : Member 'System.Security.Cryptography.Pkcs.CmsSigner.UnsignedAttributes.set(System.Security.Cryptography.CryptographicAttributeObjectCollection)' does not exist in the implementation but it does exist in the contract. -Total Issues: 21 +Compat issues with assembly System.ComponentModel.TypeConverter: +CannotSealType : Type 'System.ComponentModel.BaseNumberConverter' is effectively (has a private constructor) sealed in the implementation but not sealed in the contract. +MembersMustExist : Member 'System.ComponentModel.BaseNumberConverter..ctor()' does not exist in the implementation but it does exist in the contract. +CannotMakeMemberNonVirtual : Member 'System.ComponentModel.BaseNumberConverter.CanConvertFrom(System.ComponentModel.ITypeDescriptorContext, System.Type)' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.ComponentModel.BaseNumberConverter.CanConvertTo(System.ComponentModel.ITypeDescriptorContext, System.Type)' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.ComponentModel.BaseNumberConverter.ConvertFrom(System.ComponentModel.ITypeDescriptorContext, System.Globalization.CultureInfo, System.Object)' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.ComponentModel.BaseNumberConverter.ConvertTo(System.ComponentModel.ITypeDescriptorContext, System.Globalization.CultureInfo, System.Object, System.Type)' is non-virtual in the implementation but is virtual in the contract. +Total Issues: 27 diff --git a/src/shims/ApiCompatBaseline.netcoreapp.netstandardOnly.txt b/src/shims/ApiCompatBaseline.netcoreapp.netstandardOnly.txt index b038da471ac3..a5f2a50cd687 100644 --- a/src/shims/ApiCompatBaseline.netcoreapp.netstandardOnly.txt +++ b/src/shims/ApiCompatBaseline.netcoreapp.netstandardOnly.txt @@ -79,4 +79,10 @@ MembersMustExist : Member 'System.String.Chars.get(System.Range)' does not exist MembersMustExist : Member 'System.String.Substring(System.Index)' does not exist in the implementation but it does exist in the contract. MembersMustExist : Member 'System.String.Substring(System.Range)' does not exist in the implementation but it does exist in the contract. MembersMustExist : Member 'System.Utf8String.Slice(System.Int32, System.Int32)' does not exist in the implementation but it does exist in the contract. -Total Issues: 80 +CannotSealType : Type 'System.ComponentModel.BaseNumberConverter' is effectively (has a private constructor) sealed in the implementation but not sealed in the contract. +MembersMustExist : Member 'System.ComponentModel.BaseNumberConverter..ctor()' does not exist in the implementation but it does exist in the contract. +CannotMakeMemberNonVirtual : Member 'System.ComponentModel.BaseNumberConverter.CanConvertFrom(System.ComponentModel.ITypeDescriptorContext, System.Type)' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.ComponentModel.BaseNumberConverter.CanConvertTo(System.ComponentModel.ITypeDescriptorContext, System.Type)' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.ComponentModel.BaseNumberConverter.ConvertFrom(System.ComponentModel.ITypeDescriptorContext, System.Globalization.CultureInfo, System.Object)' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.ComponentModel.BaseNumberConverter.ConvertTo(System.ComponentModel.ITypeDescriptorContext, System.Globalization.CultureInfo, System.Object, System.Type)' is non-virtual in the implementation but is virtual in the contract. +Total Issues: 86 diff --git a/src/shims/ApiCompatBaseline.uap.netstandard.txt b/src/shims/ApiCompatBaseline.uap.netstandard.txt index 9478e274be96..2dc0f4c796a8 100644 --- a/src/shims/ApiCompatBaseline.uap.netstandard.txt +++ b/src/shims/ApiCompatBaseline.uap.netstandard.txt @@ -99,4 +99,11 @@ Compat issues with assembly System.Security.Cryptography.Pkcs: MembersMustExist : Member 'System.Security.Cryptography.Pkcs.CmsSigner.Certificates.set(System.Security.Cryptography.X509Certificates.X509Certificate2Collection)' does not exist in the implementation but it does exist in the contract. MembersMustExist : Member 'System.Security.Cryptography.Pkcs.CmsSigner.SignedAttributes.set(System.Security.Cryptography.CryptographicAttributeObjectCollection)' does not exist in the implementation but it does exist in the contract. MembersMustExist : Member 'System.Security.Cryptography.Pkcs.CmsSigner.UnsignedAttributes.set(System.Security.Cryptography.CryptographicAttributeObjectCollection)' does not exist in the implementation but it does exist in the contract. -Total Issues: 86 \ No newline at end of file +Compat issues with assembly System.ComponentModel.TypeConverter: +CannotSealType : Type 'System.ComponentModel.BaseNumberConverter' is effectively (has a private constructor) sealed in the implementation but not sealed in the contract. +MembersMustExist : Member 'System.ComponentModel.BaseNumberConverter..ctor()' does not exist in the implementation but it does exist in the contract. +CannotMakeMemberNonVirtual : Member 'System.ComponentModel.BaseNumberConverter.CanConvertFrom(System.ComponentModel.ITypeDescriptorContext, System.Type)' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.ComponentModel.BaseNumberConverter.CanConvertTo(System.ComponentModel.ITypeDescriptorContext, System.Type)' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.ComponentModel.BaseNumberConverter.ConvertFrom(System.ComponentModel.ITypeDescriptorContext, System.Globalization.CultureInfo, System.Object)' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.ComponentModel.BaseNumberConverter.ConvertTo(System.ComponentModel.ITypeDescriptorContext, System.Globalization.CultureInfo, System.Object, System.Type)' is non-virtual in the implementation but is virtual in the contract. +Total Issues: 92 \ No newline at end of file diff --git a/src/shims/ApiCompatBaseline.uap.netstandardOnly.txt b/src/shims/ApiCompatBaseline.uap.netstandardOnly.txt index 5d2d2879f593..5a7c8acf8d6b 100644 --- a/src/shims/ApiCompatBaseline.uap.netstandardOnly.txt +++ b/src/shims/ApiCompatBaseline.uap.netstandardOnly.txt @@ -82,4 +82,10 @@ MembersMustExist : Member 'System.String.Chars.get(System.Range)' does not exist MembersMustExist : Member 'System.String.Substring(System.Index)' does not exist in the implementation but it does exist in the contract. MembersMustExist : Member 'System.String.Substring(System.Range)' does not exist in the implementation but it does exist in the contract. MembersMustExist : Member 'System.Utf8String.Slice(System.Int32, System.Int32)' does not exist in the implementation but it does exist in the contract. -Total Issues: 83 +CannotSealType : Type 'System.ComponentModel.BaseNumberConverter' is effectively (has a private constructor) sealed in the implementation but not sealed in the contract. +MembersMustExist : Member 'System.ComponentModel.BaseNumberConverter..ctor()' does not exist in the implementation but it does exist in the contract. +CannotMakeMemberNonVirtual : Member 'System.ComponentModel.BaseNumberConverter.CanConvertFrom(System.ComponentModel.ITypeDescriptorContext, System.Type)' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.ComponentModel.BaseNumberConverter.CanConvertTo(System.ComponentModel.ITypeDescriptorContext, System.Type)' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.ComponentModel.BaseNumberConverter.ConvertFrom(System.ComponentModel.ITypeDescriptorContext, System.Globalization.CultureInfo, System.Object)' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.ComponentModel.BaseNumberConverter.ConvertTo(System.ComponentModel.ITypeDescriptorContext, System.Globalization.CultureInfo, System.Object, System.Type)' is non-virtual in the implementation but is virtual in the contract. +Total Issues: 89 diff --git a/src/shims/ApiCompatBaseline.uapaot.netstandard.txt b/src/shims/ApiCompatBaseline.uapaot.netstandard.txt index 360298a12ef5..4560b09ab757 100644 --- a/src/shims/ApiCompatBaseline.uapaot.netstandard.txt +++ b/src/shims/ApiCompatBaseline.uapaot.netstandard.txt @@ -105,4 +105,11 @@ Compat issues with assembly System.Security.Cryptography.Pkcs: MembersMustExist : Member 'System.Security.Cryptography.Pkcs.CmsSigner.Certificates.set(System.Security.Cryptography.X509Certificates.X509Certificate2Collection)' does not exist in the implementation but it does exist in the contract. MembersMustExist : Member 'System.Security.Cryptography.Pkcs.CmsSigner.SignedAttributes.set(System.Security.Cryptography.CryptographicAttributeObjectCollection)' does not exist in the implementation but it does exist in the contract. MembersMustExist : Member 'System.Security.Cryptography.Pkcs.CmsSigner.UnsignedAttributes.set(System.Security.Cryptography.CryptographicAttributeObjectCollection)' does not exist in the implementation but it does exist in the contract. -Total Issues: 92 \ No newline at end of file +Compat issues with assembly System.ComponentModel.TypeConverter: +CannotSealType : Type 'System.ComponentModel.BaseNumberConverter' is effectively (has a private constructor) sealed in the implementation but not sealed in the contract. +MembersMustExist : Member 'System.ComponentModel.BaseNumberConverter..ctor()' does not exist in the implementation but it does exist in the contract. +CannotMakeMemberNonVirtual : Member 'System.ComponentModel.BaseNumberConverter.CanConvertFrom(System.ComponentModel.ITypeDescriptorContext, System.Type)' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.ComponentModel.BaseNumberConverter.CanConvertTo(System.ComponentModel.ITypeDescriptorContext, System.Type)' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.ComponentModel.BaseNumberConverter.ConvertFrom(System.ComponentModel.ITypeDescriptorContext, System.Globalization.CultureInfo, System.Object)' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.ComponentModel.BaseNumberConverter.ConvertTo(System.ComponentModel.ITypeDescriptorContext, System.Globalization.CultureInfo, System.Object, System.Type)' is non-virtual in the implementation but is virtual in the contract. +Total Issues: 98 \ No newline at end of file diff --git a/src/shims/ApiCompatBaseline.uapaot.netstandardOnly.txt b/src/shims/ApiCompatBaseline.uapaot.netstandardOnly.txt index e33ffe0f01a2..6615b50b17f6 100644 --- a/src/shims/ApiCompatBaseline.uapaot.netstandardOnly.txt +++ b/src/shims/ApiCompatBaseline.uapaot.netstandardOnly.txt @@ -71,4 +71,10 @@ MembersMustExist : Member 'System.Runtime.InteropServices.Marshal.GetTypedObject MembersMustExist : Member 'System.Runtime.InteropServices.Marshal.SetComObjectData(System.Object, System.Object, System.Object)' does not exist in the implementation but it does exist in the contract. CannotChangeAttribute : Attribute 'System.AttributeUsageAttribute' on 'System.Xml.Serialization.XmlAnyAttributeAttribute' changed from '[AttributeUsageAttribute(AttributeTargets.Field | AttributeTargets.Parameter | AttributeTargets.Property | AttributeTargets.ReturnValue)]' in the contract to '[AttributeUsageAttribute(AttributeTargets.Field | AttributeTargets.Parameter | AttributeTargets.Property | AttributeTargets.ReturnValue, AllowMultiple=false)]' in the implementation. CannotChangeAttribute : Attribute 'System.AttributeUsageAttribute' on 'System.Xml.Serialization.XmlNamespaceDeclarationsAttribute' changed from '[AttributeUsageAttribute(AttributeTargets.Field | AttributeTargets.Parameter | AttributeTargets.Property | AttributeTargets.ReturnValue)]' in the contract to '[AttributeUsageAttribute(AttributeTargets.Field | AttributeTargets.Parameter | AttributeTargets.Property | AttributeTargets.ReturnValue, AllowMultiple=false)]' in the implementation. -Total Issues: 71 +CannotSealType : Type 'System.ComponentModel.BaseNumberConverter' is effectively (has a private constructor) sealed in the implementation but not sealed in the contract. +MembersMustExist : Member 'System.ComponentModel.BaseNumberConverter..ctor()' does not exist in the implementation but it does exist in the contract. +CannotMakeMemberNonVirtual : Member 'System.ComponentModel.BaseNumberConverter.CanConvertFrom(System.ComponentModel.ITypeDescriptorContext, System.Type)' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.ComponentModel.BaseNumberConverter.CanConvertTo(System.ComponentModel.ITypeDescriptorContext, System.Type)' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.ComponentModel.BaseNumberConverter.ConvertFrom(System.ComponentModel.ITypeDescriptorContext, System.Globalization.CultureInfo, System.Object)' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.ComponentModel.BaseNumberConverter.ConvertTo(System.ComponentModel.ITypeDescriptorContext, System.Globalization.CultureInfo, System.Object, System.Type)' is non-virtual in the implementation but is virtual in the contract. +Total Issues: 77 From a26fd9bb1b17510d51a9b5a2ce7aadc1a5b631ee Mon Sep 17 00:00:00 2001 From: Stephen Toub Date: Mon, 29 Apr 2019 18:28:34 -0400 Subject: [PATCH 100/607] Disable failing Process name test (#37283) https://github.com/dotnet/corefx/issues/37198 Regression caused by https://github.com/dotnet/corefx/pull/37144 --- src/System.Diagnostics.Process/tests/ProcessTests.Unix.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/System.Diagnostics.Process/tests/ProcessTests.Unix.cs b/src/System.Diagnostics.Process/tests/ProcessTests.Unix.cs index 94de927dcb47..8242d97bf330 100644 --- a/src/System.Diagnostics.Process/tests/ProcessTests.Unix.cs +++ b/src/System.Diagnostics.Process/tests/ProcessTests.Unix.cs @@ -124,6 +124,7 @@ public void ProcessStart_UseShellExecute_OnUnix_OpenMissingFile_DoesNotThrow() } } + [ActiveIssue(37198)] [Theory, InlineData(true), InlineData(false)] [OuterLoop("Opens program")] public void ProcessStart_UseShellExecute_OnUnix_SuccessWhenProgramInstalled(bool isFolder) From 13c18aed49389d7dd00a1da7fc9a2e714943c9d5 Mon Sep 17 00:00:00 2001 From: Matt Galbraith Date: Mon, 29 Apr 2019 17:27:02 -0700 Subject: [PATCH 101/607] Add Ubuntu 19.04 to official runs Add runs using Ubuntu.1904.Amd64 (docker image) ; this is an AMD image based off requirements used in ARM64 version. --- eng/pipelines/linux.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/pipelines/linux.yml b/eng/pipelines/linux.yml index 2b623afeb34c..aebeb12daba5 100644 --- a/eng/pipelines/linux.yml +++ b/eng/pipelines/linux.yml @@ -115,7 +115,7 @@ jobs: - alpineQueues: \(Alpine.38.Amd64\)ubuntu.1604.amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.8-helix-45b1fa2-20190327215821 - ${{ if eq(parameters.isOfficialBuild, 'true') }}: - - linuxDefaultQueues: Centos.7.Amd64+RedHat.7.Amd64+Debian.8.Amd64+Debian.9.Amd64+Ubuntu.1604.Amd64+Ubuntu.1804.Amd64+Ubuntu.1810.Amd64+OpenSuse.42.Amd64+SLES.12.Amd64+SLES.15.Amd64+\(Fedora.28.Amd64\)ubuntu.1604.amd64@mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-28-helix-45b1fa2-20190402012449+\(Fedora.29.Amd64\)ubuntu.1604.amd64@mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-29-helix-c6dc5e6-20190402012449 + - linuxDefaultQueues: Centos.7.Amd64+RedHat.7.Amd64+Debian.8.Amd64+Debian.9.Amd64+Ubuntu.1604.Amd64+Ubuntu.1804.Amd64+Ubuntu.1810.Amd64+OpenSuse.42.Amd64+SLES.12.Amd64+SLES.15.Amd64+\(Fedora.28.Amd64\)ubuntu.1604.amd64@mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-28-helix-45b1fa2-20190402012449+\(Fedora.29.Amd64\)ubuntu.1604.amd64@mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-29-helix-c6dc5e6-20190402012449+\(Ubuntu.1904.Amd64\)ubuntu.1604.amd64@mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-19.04-helix-amd64-337cf5e-20190429231235 - linuxArm64Queues: \(Ubuntu.1604.Arm64\)Ubuntu.1604.Arm64.Docker@mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-16.04-helix-arm64v8-b049512-20190321153539 - linuxArmQueues: \(Debian.9.Arm32\)Ubuntu.1604.Arm32@mcr.microsoft.com/dotnet-buildtools/prereqs:debian-9-helix-arm32v7-b049512-20190321153542 - alpineQueues: \(Alpine.38.Amd64\)ubuntu.1604.amd64@mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.8-helix-45b1fa2-20190327215821+\(Alpine.39.Amd64\)ubuntu.1604.amd64@mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.9-helix-e4eaef4-20190228230637 From 9c05364f2eddbb7ef741abb975728b050980097a Mon Sep 17 00:00:00 2001 From: Steve MacLean Date: Mon, 29 Apr 2019 20:33:31 -0400 Subject: [PATCH 102/607] ALC SatelliteAssemblies tests (#37248) * Add AssemblyLoadCcontext SatelliteAssemblies tests --- .../tests/MainStrings.en.resx | 123 +++++++++ .../tests/MainStrings.es-MX.resx | 123 +++++++++ .../tests/MainStrings.resx | 123 +++++++++ .../ReferencedClassLib/Configurations.props | 8 + .../ReferencedClassLib/ReferencedClassLib.cs | 28 +++ .../ReferencedClassLib.csproj | 10 + .../ReferencedStrings.en.resx | 123 +++++++++ .../ReferencedClassLib/ReferencedStrings.resx | 123 +++++++++ .../Configurations.props | 8 + .../ReferencedClassLibNeutralIsSatellite.cs | 30 +++ ...eferencedClassLibNeutralIsSatellite.csproj | 10 + .../ReferencedStrings.en.resx | 123 +++++++++ .../ReferencedStrings.es.resx | 123 +++++++++ .../tests/SatelliteAssemblies.cs | 238 ++++++++++++++++++ .../tests/System.Runtime.Loader.Tests.csproj | 4 + 15 files changed, 1197 insertions(+) create mode 100644 src/System.Runtime.Loader/tests/MainStrings.en.resx create mode 100644 src/System.Runtime.Loader/tests/MainStrings.es-MX.resx create mode 100644 src/System.Runtime.Loader/tests/MainStrings.resx create mode 100644 src/System.Runtime.Loader/tests/ReferencedClassLib/Configurations.props create mode 100644 src/System.Runtime.Loader/tests/ReferencedClassLib/ReferencedClassLib.cs create mode 100644 src/System.Runtime.Loader/tests/ReferencedClassLib/ReferencedClassLib.csproj create mode 100644 src/System.Runtime.Loader/tests/ReferencedClassLib/ReferencedStrings.en.resx create mode 100644 src/System.Runtime.Loader/tests/ReferencedClassLib/ReferencedStrings.resx create mode 100644 src/System.Runtime.Loader/tests/ReferencedClassLibNeutralIsSatellite/Configurations.props create mode 100644 src/System.Runtime.Loader/tests/ReferencedClassLibNeutralIsSatellite/ReferencedClassLibNeutralIsSatellite.cs create mode 100644 src/System.Runtime.Loader/tests/ReferencedClassLibNeutralIsSatellite/ReferencedClassLibNeutralIsSatellite.csproj create mode 100644 src/System.Runtime.Loader/tests/ReferencedClassLibNeutralIsSatellite/ReferencedStrings.en.resx create mode 100644 src/System.Runtime.Loader/tests/ReferencedClassLibNeutralIsSatellite/ReferencedStrings.es.resx create mode 100644 src/System.Runtime.Loader/tests/SatelliteAssemblies.cs diff --git a/src/System.Runtime.Loader/tests/MainStrings.en.resx b/src/System.Runtime.Loader/tests/MainStrings.en.resx new file mode 100644 index 000000000000..646202cabd55 --- /dev/null +++ b/src/System.Runtime.Loader/tests/MainStrings.en.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + English language Main description 1.0.0 + + diff --git a/src/System.Runtime.Loader/tests/MainStrings.es-MX.resx b/src/System.Runtime.Loader/tests/MainStrings.es-MX.resx new file mode 100644 index 000000000000..2a375d39e079 --- /dev/null +++ b/src/System.Runtime.Loader/tests/MainStrings.es-MX.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Spanish (Mexico) language Main description 1.0.0 + + diff --git a/src/System.Runtime.Loader/tests/MainStrings.resx b/src/System.Runtime.Loader/tests/MainStrings.resx new file mode 100644 index 000000000000..855547174b57 --- /dev/null +++ b/src/System.Runtime.Loader/tests/MainStrings.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Neutral language Main description 1.0.0 + + diff --git a/src/System.Runtime.Loader/tests/ReferencedClassLib/Configurations.props b/src/System.Runtime.Loader/tests/ReferencedClassLib/Configurations.props new file mode 100644 index 000000000000..f74685e4dea7 --- /dev/null +++ b/src/System.Runtime.Loader/tests/ReferencedClassLib/Configurations.props @@ -0,0 +1,8 @@ + + + + netcoreapp; + uap; + + + diff --git a/src/System.Runtime.Loader/tests/ReferencedClassLib/ReferencedClassLib.cs b/src/System.Runtime.Loader/tests/ReferencedClassLib/ReferencedClassLib.cs new file mode 100644 index 000000000000..55e629f5afb2 --- /dev/null +++ b/src/System.Runtime.Loader/tests/ReferencedClassLib/ReferencedClassLib.cs @@ -0,0 +1,28 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. +using System; +using System.Resources; +using System.Globalization; + +namespace ReferencedClassLib +{ + public class Program + { + static public string Describe(string lang) + { + try + { + ResourceManager rm = new ResourceManager("ReferencedClassLib.ReferencedStrings", typeof(Program).Assembly); + + CultureInfo ci = CultureInfo.CreateSpecificCulture(lang); + + return rm.GetString("Describe", ci); + } + catch (Exception e) + { + return e.ToString(); + } + } + } +} diff --git a/src/System.Runtime.Loader/tests/ReferencedClassLib/ReferencedClassLib.csproj b/src/System.Runtime.Loader/tests/ReferencedClassLib/ReferencedClassLib.csproj new file mode 100644 index 000000000000..a381c828f581 --- /dev/null +++ b/src/System.Runtime.Loader/tests/ReferencedClassLib/ReferencedClassLib.csproj @@ -0,0 +1,10 @@ + + + {2CD5A44C-65B4-4C51-AC7B-B2938307848A} + netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release + + + + + + diff --git a/src/System.Runtime.Loader/tests/ReferencedClassLib/ReferencedStrings.en.resx b/src/System.Runtime.Loader/tests/ReferencedClassLib/ReferencedStrings.en.resx new file mode 100644 index 000000000000..a5b1b0037559 --- /dev/null +++ b/src/System.Runtime.Loader/tests/ReferencedClassLib/ReferencedStrings.en.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + English language ReferencedClassLib description 1.0.0 + + diff --git a/src/System.Runtime.Loader/tests/ReferencedClassLib/ReferencedStrings.resx b/src/System.Runtime.Loader/tests/ReferencedClassLib/ReferencedStrings.resx new file mode 100644 index 000000000000..0c090df38fbe --- /dev/null +++ b/src/System.Runtime.Loader/tests/ReferencedClassLib/ReferencedStrings.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Neutral language ReferencedClassLib description 1.0.0 + + diff --git a/src/System.Runtime.Loader/tests/ReferencedClassLibNeutralIsSatellite/Configurations.props b/src/System.Runtime.Loader/tests/ReferencedClassLibNeutralIsSatellite/Configurations.props new file mode 100644 index 000000000000..f74685e4dea7 --- /dev/null +++ b/src/System.Runtime.Loader/tests/ReferencedClassLibNeutralIsSatellite/Configurations.props @@ -0,0 +1,8 @@ + + + + netcoreapp; + uap; + + + diff --git a/src/System.Runtime.Loader/tests/ReferencedClassLibNeutralIsSatellite/ReferencedClassLibNeutralIsSatellite.cs b/src/System.Runtime.Loader/tests/ReferencedClassLibNeutralIsSatellite/ReferencedClassLibNeutralIsSatellite.cs new file mode 100644 index 000000000000..9bf489d5d975 --- /dev/null +++ b/src/System.Runtime.Loader/tests/ReferencedClassLibNeutralIsSatellite/ReferencedClassLibNeutralIsSatellite.cs @@ -0,0 +1,30 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. +using System; +using System.Resources; +using System.Globalization; + +[assembly:NeutralResourcesLanguage("es", UltimateResourceFallbackLocation.Satellite)] + +namespace ReferencedClassLibNeutralIsSatellite +{ + public class Program + { + static public string Describe(string lang) + { + try + { + ResourceManager rm = new ResourceManager("ReferencedClassLibNeutralIsSatellite.ReferencedStrings", typeof(Program).Assembly); + + CultureInfo ci = CultureInfo.CreateSpecificCulture(lang); + + return rm.GetString("Describe", ci); + } + catch (Exception e) + { + return e.ToString(); + } + } + } +} diff --git a/src/System.Runtime.Loader/tests/ReferencedClassLibNeutralIsSatellite/ReferencedClassLibNeutralIsSatellite.csproj b/src/System.Runtime.Loader/tests/ReferencedClassLibNeutralIsSatellite/ReferencedClassLibNeutralIsSatellite.csproj new file mode 100644 index 000000000000..d71f4219a7b8 --- /dev/null +++ b/src/System.Runtime.Loader/tests/ReferencedClassLibNeutralIsSatellite/ReferencedClassLibNeutralIsSatellite.csproj @@ -0,0 +1,10 @@ + + + {7FA764E6-47A3-42B5-923B-7D5DBC611E8E} + netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release + + + + + + diff --git a/src/System.Runtime.Loader/tests/ReferencedClassLibNeutralIsSatellite/ReferencedStrings.en.resx b/src/System.Runtime.Loader/tests/ReferencedClassLibNeutralIsSatellite/ReferencedStrings.en.resx new file mode 100644 index 000000000000..1a1c8ece1641 --- /dev/null +++ b/src/System.Runtime.Loader/tests/ReferencedClassLibNeutralIsSatellite/ReferencedStrings.en.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + English language ReferencedClassLibNeutralIsSatellite description 1.0.0 + + diff --git a/src/System.Runtime.Loader/tests/ReferencedClassLibNeutralIsSatellite/ReferencedStrings.es.resx b/src/System.Runtime.Loader/tests/ReferencedClassLibNeutralIsSatellite/ReferencedStrings.es.resx new file mode 100644 index 000000000000..c187c5584755 --- /dev/null +++ b/src/System.Runtime.Loader/tests/ReferencedClassLibNeutralIsSatellite/ReferencedStrings.es.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Neutral (es) language ReferencedClassLibNeutralIsSatellite description 1.0.0 + + diff --git a/src/System.Runtime.Loader/tests/SatelliteAssemblies.cs b/src/System.Runtime.Loader/tests/SatelliteAssemblies.cs new file mode 100644 index 000000000000..76a612fb934d --- /dev/null +++ b/src/System.Runtime.Loader/tests/SatelliteAssemblies.cs @@ -0,0 +1,238 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. +using System; +using System.Collections.Generic; +using System.IO; +using System.Reflection; +using System.Resources; +using System.Globalization; +using Xunit; +using ReferencedClassLib; +using ReferencedClassLibNeutralIsSatellite; + +namespace System.Runtime.Loader.Tests +{ + [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "UWP does not use satellite assemblies in most cases")] + public class SatelliteAssembliesTestsFixture + { + public Dictionary contexts = new Dictionary(); + public SatelliteAssembliesTestsFixture() + { + AssemblyLoadContext satelliteAssembliesTests = new AssemblyLoadContext("SatelliteAssembliesTests"); + satelliteAssembliesTests.LoadFromAssemblyPath(typeof(SatelliteAssembliesTests).Assembly.Location); + + AssemblyLoadContext referencedClassLib = new AssemblyLoadContext("ReferencedClassLib"); + referencedClassLib.LoadFromAssemblyPath(typeof(ReferencedClassLib.Program).Assembly.Location); + + AssemblyLoadContext referencedClassLibNeutralIsSatellite = new AssemblyLoadContext("ReferencedClassLibNeutralIsSatellite"); + referencedClassLibNeutralIsSatellite.LoadFromAssemblyPath(typeof(ReferencedClassLibNeutralIsSatellite.Program).Assembly.Location); + + new AssemblyLoadContext("Empty"); + + try + { + Assembly assembly = Assembly.LoadFile(typeof(SatelliteAssembliesTests).Assembly.Location); + contexts["LoadFile"] = AssemblyLoadContext.GetLoadContext(assembly); + } + catch (Exception e) + { + Console.WriteLine(e); + } + + foreach (var alc in AssemblyLoadContext.All) + { + if (alc.Name != null) + contexts[alc.Name] = alc; + } + } + } + + [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "UWP does not use satellite assemblies in most cases")] + public class SatelliteAssembliesTests : IClassFixture + { + Dictionary contexts; + public SatelliteAssembliesTests(SatelliteAssembliesTestsFixture fixture) + { + contexts = fixture.contexts; + } + +#region DescribeTests + [Theory] + [InlineData("", "Neutral language Main description 1.0.0")] + [InlineData("en", "English language Main description 1.0.0")] + [InlineData("en-US", "English language Main description 1.0.0")] + [InlineData("es", "Neutral language Main description 1.0.0")] + [InlineData("es-MX", "Spanish (Mexico) language Main description 1.0.0")] + [InlineData("fr", "Neutral language Main description 1.0.0")] + [InlineData("fr-FR", "Neutral language Main description 1.0.0")] + static public void mainResources(string lang, string expected) + { + Assert.Equal(expected, Describe(lang)); + } + + public static string Describe(string lang) + { + ResourceManager rm = new ResourceManager("System.Runtime.Loader.Tests.MainStrings", typeof(SatelliteAssembliesTests).Assembly); + + CultureInfo ci = CultureInfo.CreateSpecificCulture(lang); + + return rm.GetString("Describe", ci); + } + + [Theory] + [InlineData("Default", "System.Runtime.Loader.Tests.SatelliteAssembliesTests", "", "Neutral language Main description 1.0.0")] + [InlineData("Default", "System.Runtime.Loader.Tests.SatelliteAssembliesTests", "en", "English language Main description 1.0.0")] + [InlineData("Default", "System.Runtime.Loader.Tests.SatelliteAssembliesTests", "en-US", "English language Main description 1.0.0")] + [InlineData("Default", "System.Runtime.Loader.Tests.SatelliteAssembliesTests", "es", "Neutral language Main description 1.0.0")] + [InlineData("Default", "System.Runtime.Loader.Tests.SatelliteAssembliesTests", "es-MX", "Spanish (Mexico) language Main description 1.0.0")] + [InlineData("Default", "System.Runtime.Loader.Tests.SatelliteAssembliesTests", "fr", "Neutral language Main description 1.0.0")] + [InlineData("Default", "System.Runtime.Loader.Tests.SatelliteAssembliesTests", "fr-FR", "Neutral language Main description 1.0.0")] + public void describeLib(string alc, string type, string culture, string expected) + { + string result = "Oops"; + try + { + using (contexts[alc].EnterContextualReflection()) + { + Type describeType = Type.GetType(type); + + result = (String)describeType.InvokeMember("Describe", BindingFlags.InvokeMethod, null, null, new object[] { culture }); + } + + } + catch (Exception e) + { + Console.WriteLine(e); + result = "threw:"; + } + + Assert.Equal(expected, result); + } + + [Theory] + [ActiveIssue("dotnet/sdk#3185")] + [ActiveIssue("dotnet/corefx#37246")] + [InlineData("Default", "ReferencedClassLib.Program, ReferencedClassLib", "", "Neutral language ReferencedClassLib description 1.0.0")] + [InlineData("Default", "ReferencedClassLib.Program, ReferencedClassLib", "en", "English language ReferencedClassLib description 1.0.0")] + [InlineData("Default", "ReferencedClassLib.Program, ReferencedClassLib", "en-US", "English language ReferencedClassLib description 1.0.0")] + [InlineData("Default", "ReferencedClassLib.Program, ReferencedClassLib", "es", "Neutral language ReferencedClassLib description 1.0.0")] + [InlineData("Default", "ReferencedClassLibNeutralIsSatellite.Program, ReferencedClassLibNeutralIsSatellite", "", "Neutral (es) language ReferencedClassLibNeutralIsSatellite description 1.0.0")] + [InlineData("Default", "ReferencedClassLibNeutralIsSatellite.Program, ReferencedClassLibNeutralIsSatellite", "en", "English language ReferencedClassLibNeutralIsSatellite description 1.0.0")] + [InlineData("Default", "ReferencedClassLibNeutralIsSatellite.Program, ReferencedClassLibNeutralIsSatellite", "en-US", "English language ReferencedClassLibNeutralIsSatellite description 1.0.0")] + [InlineData("Default", "ReferencedClassLibNeutralIsSatellite.Program, ReferencedClassLibNeutralIsSatellite", "es", "Neutral (es) language ReferencedClassLibNeutralIsSatellite description 1.0.0")] + public void describeLib3185(string alc, string type, string culture, string expected) + { + describeLib(alc, type, culture, expected); + } + + [Theory] + [ActiveIssue("dotnet/coreclr#24191")] + [InlineData("SatelliteAssembliesTests", "System.Runtime.Loader.Tests.SatelliteAssembliesTests", "", "Neutral language Main description 1.0.0")] + [InlineData("SatelliteAssembliesTests", "System.Runtime.Loader.Tests.SatelliteAssembliesTests", "en", "English language Main description 1.0.0")] + [InlineData("SatelliteAssembliesTests", "System.Runtime.Loader.Tests.SatelliteAssembliesTests", "en-US", "English language Main description 1.0.0")] + [InlineData("SatelliteAssembliesTests", "System.Runtime.Loader.Tests.SatelliteAssembliesTests", "es", "Neutral language Main description 1.0.0")] + [InlineData("SatelliteAssembliesTests", "System.Runtime.Loader.Tests.SatelliteAssembliesTests", "es-MX", "Spanish (Mexico) language Main description 1.0.0")] + [InlineData("SatelliteAssembliesTests", "System.Runtime.Loader.Tests.SatelliteAssembliesTests", "fr", "Neutral language Main description 1.0.0")] + [InlineData("SatelliteAssembliesTests", "System.Runtime.Loader.Tests.SatelliteAssembliesTests", "fr-FR", "Neutral language Main description 1.0.0")] + [InlineData("LoadFile", "System.Runtime.Loader.Tests.SatelliteAssembliesTests", "", "Neutral language Main description 1.0.0")] + [InlineData("LoadFile", "System.Runtime.Loader.Tests.SatelliteAssembliesTests", "en", "English language Main description 1.0.0")] + [InlineData("LoadFile", "System.Runtime.Loader.Tests.SatelliteAssembliesTests", "en-US", "English language Main description 1.0.0")] + [InlineData("LoadFile", "System.Runtime.Loader.Tests.SatelliteAssembliesTests", "es", "Neutral language Main description 1.0.0")] + [InlineData("LoadFile", "System.Runtime.Loader.Tests.SatelliteAssembliesTests", "es-MX", "Spanish (Mexico) language Main description 1.0.0")] + [InlineData("LoadFile", "System.Runtime.Loader.Tests.SatelliteAssembliesTests", "fr", "Neutral language Main description 1.0.0")] + [InlineData("LoadFile", "System.Runtime.Loader.Tests.SatelliteAssembliesTests", "fr-FR", "Neutral language Main description 1.0.0")] + public void describeLib24191(string alc, string type, string culture, string expected) + { + describeLib(alc, type, culture, expected); + } + + [Theory] + [ActiveIssue("dotnet/sdk#3185")] + [ActiveIssue("dotnet/corefx#37246")] + [ActiveIssue("dotnet/coreclr#24191")] + [InlineData("ReferencedClassLib", "ReferencedClassLib.Program, ReferencedClassLib", "", "Neutral language ReferencedClassLib description 1.0.0")] + [InlineData("ReferencedClassLib", "ReferencedClassLib.Program, ReferencedClassLib", "en", "English language ReferencedClassLib description 1.0.0")] + [InlineData("ReferencedClassLib", "ReferencedClassLib.Program, ReferencedClassLib", "en-US", "English language ReferencedClassLib description 1.0.0")] + [InlineData("ReferencedClassLib", "ReferencedClassLib.Program, ReferencedClassLib", "es", "Neutral language ReferencedClassLib description 1.0.0")] + [InlineData("ReferencedClassLibNeutralIsSatellite", "ReferencedClassLibNeutralIsSatellite.Program, ReferencedClassLibNeutralIsSatellite", "", "Neutral (es) language ReferencedClassLibNeutralIsSatellite description 1.0.0")] + [InlineData("ReferencedClassLibNeutralIsSatellite", "ReferencedClassLibNeutralIsSatellite.Program, ReferencedClassLibNeutralIsSatellite", "en", "English language ReferencedClassLibNeutralIsSatellite description 1.0.0")] + [InlineData("ReferencedClassLibNeutralIsSatellite", "ReferencedClassLibNeutralIsSatellite.Program, ReferencedClassLibNeutralIsSatellite", "en-US", "English language ReferencedClassLibNeutralIsSatellite description 1.0.0")] + [InlineData("ReferencedClassLibNeutralIsSatellite", "ReferencedClassLibNeutralIsSatellite.Program, ReferencedClassLibNeutralIsSatellite", "es", "Neutral (es) language ReferencedClassLibNeutralIsSatellite description 1.0.0")] + public void describeLib3185_24191(string alc, string type, string culture, string expected) + { + describeLib(alc, type, culture, expected); + } +#endregion + + [Theory] + [InlineData("Default", "System.Runtime.Loader.Tests", "en")] + [InlineData("Default", "System.Runtime.Loader.Tests", "es-MX")] + [InlineData("Empty", "System.Runtime.Loader.Tests", "en")] + [InlineData("Empty", "System.Runtime.Loader.Tests", "es-MX")] + [InlineData("ReferencedClassLib", "System.Runtime.Loader.Tests", "en")] + [InlineData("ReferencedClassLib", "System.Runtime.Loader.Tests", "es-MX")] + [InlineData("ReferencedClassLibNeutralIsSatellite", "System.Runtime.Loader.Tests", "en")] + [InlineData("ReferencedClassLibNeutralIsSatellite", "System.Runtime.Loader.Tests", "es-MX")] + public void SatelliteLoadsCorrectly(string alc, string assemblyName, string culture) + { + AssemblyName satelliteAssemblyName = new AssemblyName(assemblyName + ".resources"); + satelliteAssemblyName.CultureInfo = new CultureInfo(culture); + + AssemblyLoadContext assemblyLoadContext = contexts[alc]; + + Assembly satelliteAssembly = assemblyLoadContext.LoadFromAssemblyName(satelliteAssemblyName); + + Assert.NotNull(satelliteAssembly); + + AssemblyName parentAssemblyName = new AssemblyName(assemblyName); + Assembly parentAssembly = assemblyLoadContext.LoadFromAssemblyName(parentAssemblyName); + + Assert.Equal(AssemblyLoadContext.GetLoadContext(parentAssembly), AssemblyLoadContext.GetLoadContext(satelliteAssembly)); + } + + [Theory] + [ActiveIssue("dotnet/coreclr#24191")] + [InlineData("SatelliteAssembliesTests", "System.Runtime.Loader.Tests", "en")] + [InlineData("SatelliteAssembliesTests", "System.Runtime.Loader.Tests", "es-MX")] + [InlineData("LoadFile", "System.Runtime.Loader.Tests", "en")] + [InlineData("LoadFile", "System.Runtime.Loader.Tests", "es-MX")] + public void SatelliteLoadsCorrectly24191(string alc, string assemblyName, string culture) + { + SatelliteLoadsCorrectly(alc, assemblyName, culture); + } + + [Theory] + [ActiveIssue("dotnet/sdk#3185")] + [ActiveIssue("dotnet/corefx#37246")] + [InlineData("Default", "ReferencedClassLib", "en")] + [InlineData("Default", "ReferencedClassLibNeutralIsSatellite", "en")] + [InlineData("Default", "ReferencedClassLibNeutralIsSatellite", "es")] + [InlineData("Empty", "ReferencedClassLib", "en")] + [InlineData("Empty", "ReferencedClassLibNeutralIsSatellite", "en")] + [InlineData("Empty", "ReferencedClassLibNeutralIsSatellite", "es")] + [InlineData("LoadFile", "ReferencedClassLib", "en")] + [InlineData("LoadFile", "ReferencedClassLibNeutralIsSatellite", "en")] + [InlineData("LoadFile", "ReferencedClassLibNeutralIsSatellite", "es")] + [InlineData("ReferencedClassLibNeutralIsSatellite", "ReferencedClassLib", "en")] + [InlineData("ReferencedClassLib", "ReferencedClassLibNeutralIsSatellite", "en")] + [InlineData("ReferencedClassLib", "ReferencedClassLibNeutralIsSatellite", "es")] + public void SatelliteLoadsCorrectly3185(string alc, string assemblyName, string culture) + { + SatelliteLoadsCorrectly(alc, assemblyName, culture); + } + + [Theory] + [ActiveIssue("dotnet/sdk#3185")] + [ActiveIssue("dotnet/corefx#37246")] + [ActiveIssue("dotnet/coreclr#24191")] + [InlineData("ReferencedClassLib", "ReferencedClassLib", "en")] + [InlineData("ReferencedClassLibNeutralIsSatellite", "ReferencedClassLibNeutralIsSatellite", "en")] + [InlineData("ReferencedClassLibNeutralIsSatellite", "ReferencedClassLibNeutralIsSatellite", "es")] + public void SatelliteLoadsCorrectly3185_24191(string alc, string assemblyName, string culture) + { + SatelliteLoadsCorrectly(alc, assemblyName, culture); + } + } +} + diff --git a/src/System.Runtime.Loader/tests/System.Runtime.Loader.Tests.csproj b/src/System.Runtime.Loader/tests/System.Runtime.Loader.Tests.csproj index de7001a32014..58f6d648736d 100644 --- a/src/System.Runtime.Loader/tests/System.Runtime.Loader.Tests.csproj +++ b/src/System.Runtime.Loader/tests/System.Runtime.Loader.Tests.csproj @@ -12,6 +12,8 @@ + + @@ -33,5 +35,7 @@ EmbeddedResource + + From a25531fc1f49e5c2d5453c62b0df730000f0896e Mon Sep 17 00:00:00 2001 From: Steve MacLean Date: Mon, 29 Apr 2019 20:43:06 -0400 Subject: [PATCH 103/607] Remove dotnet/sdk#3185 (#37289) Issue closed --- .../tests/SatelliteAssemblies.cs | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/System.Runtime.Loader/tests/SatelliteAssemblies.cs b/src/System.Runtime.Loader/tests/SatelliteAssemblies.cs index 76a612fb934d..65b673fa6e85 100644 --- a/src/System.Runtime.Loader/tests/SatelliteAssemblies.cs +++ b/src/System.Runtime.Loader/tests/SatelliteAssemblies.cs @@ -111,7 +111,6 @@ public void describeLib(string alc, string type, string culture, string expected } [Theory] - [ActiveIssue("dotnet/sdk#3185")] [ActiveIssue("dotnet/corefx#37246")] [InlineData("Default", "ReferencedClassLib.Program, ReferencedClassLib", "", "Neutral language ReferencedClassLib description 1.0.0")] [InlineData("Default", "ReferencedClassLib.Program, ReferencedClassLib", "en", "English language ReferencedClassLib description 1.0.0")] @@ -121,7 +120,7 @@ public void describeLib(string alc, string type, string culture, string expected [InlineData("Default", "ReferencedClassLibNeutralIsSatellite.Program, ReferencedClassLibNeutralIsSatellite", "en", "English language ReferencedClassLibNeutralIsSatellite description 1.0.0")] [InlineData("Default", "ReferencedClassLibNeutralIsSatellite.Program, ReferencedClassLibNeutralIsSatellite", "en-US", "English language ReferencedClassLibNeutralIsSatellite description 1.0.0")] [InlineData("Default", "ReferencedClassLibNeutralIsSatellite.Program, ReferencedClassLibNeutralIsSatellite", "es", "Neutral (es) language ReferencedClassLibNeutralIsSatellite description 1.0.0")] - public void describeLib3185(string alc, string type, string culture, string expected) + public void describeLib37246(string alc, string type, string culture, string expected) { describeLib(alc, type, culture, expected); } @@ -148,7 +147,6 @@ public void describeLib24191(string alc, string type, string culture, string exp } [Theory] - [ActiveIssue("dotnet/sdk#3185")] [ActiveIssue("dotnet/corefx#37246")] [ActiveIssue("dotnet/coreclr#24191")] [InlineData("ReferencedClassLib", "ReferencedClassLib.Program, ReferencedClassLib", "", "Neutral language ReferencedClassLib description 1.0.0")] @@ -159,7 +157,7 @@ public void describeLib24191(string alc, string type, string culture, string exp [InlineData("ReferencedClassLibNeutralIsSatellite", "ReferencedClassLibNeutralIsSatellite.Program, ReferencedClassLibNeutralIsSatellite", "en", "English language ReferencedClassLibNeutralIsSatellite description 1.0.0")] [InlineData("ReferencedClassLibNeutralIsSatellite", "ReferencedClassLibNeutralIsSatellite.Program, ReferencedClassLibNeutralIsSatellite", "en-US", "English language ReferencedClassLibNeutralIsSatellite description 1.0.0")] [InlineData("ReferencedClassLibNeutralIsSatellite", "ReferencedClassLibNeutralIsSatellite.Program, ReferencedClassLibNeutralIsSatellite", "es", "Neutral (es) language ReferencedClassLibNeutralIsSatellite description 1.0.0")] - public void describeLib3185_24191(string alc, string type, string culture, string expected) + public void describeLib37246_24191(string alc, string type, string culture, string expected) { describeLib(alc, type, culture, expected); } @@ -203,7 +201,6 @@ public void SatelliteLoadsCorrectly24191(string alc, string assemblyName, string } [Theory] - [ActiveIssue("dotnet/sdk#3185")] [ActiveIssue("dotnet/corefx#37246")] [InlineData("Default", "ReferencedClassLib", "en")] [InlineData("Default", "ReferencedClassLibNeutralIsSatellite", "en")] @@ -217,19 +214,18 @@ public void SatelliteLoadsCorrectly24191(string alc, string assemblyName, string [InlineData("ReferencedClassLibNeutralIsSatellite", "ReferencedClassLib", "en")] [InlineData("ReferencedClassLib", "ReferencedClassLibNeutralIsSatellite", "en")] [InlineData("ReferencedClassLib", "ReferencedClassLibNeutralIsSatellite", "es")] - public void SatelliteLoadsCorrectly3185(string alc, string assemblyName, string culture) + public void SatelliteLoadsCorrectly37246(string alc, string assemblyName, string culture) { SatelliteLoadsCorrectly(alc, assemblyName, culture); } [Theory] - [ActiveIssue("dotnet/sdk#3185")] [ActiveIssue("dotnet/corefx#37246")] [ActiveIssue("dotnet/coreclr#24191")] [InlineData("ReferencedClassLib", "ReferencedClassLib", "en")] [InlineData("ReferencedClassLibNeutralIsSatellite", "ReferencedClassLibNeutralIsSatellite", "en")] [InlineData("ReferencedClassLibNeutralIsSatellite", "ReferencedClassLibNeutralIsSatellite", "es")] - public void SatelliteLoadsCorrectly3185_24191(string alc, string assemblyName, string culture) + public void SatelliteLoadsCorrectly37246_24191(string alc, string assemblyName, string culture) { SatelliteLoadsCorrectly(alc, assemblyName, culture); } From c28dbd19fda676a57fb3edf25aaa42196ed36f05 Mon Sep 17 00:00:00 2001 From: Stephen Toub Date: Mon, 29 Apr 2019 20:52:59 -0400 Subject: [PATCH 104/607] Add a test for Stopwatch.Elapsed to ensure it's within reason (#37279) If this experiences flakiness in CI, we can tweak it, replace it with something better, etc. --- .../tests/System/Diagnostics/Stopwatch.cs | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/src/System.Runtime.Extensions/tests/System/Diagnostics/Stopwatch.cs b/src/System.Runtime.Extensions/tests/System/Diagnostics/Stopwatch.cs index fc38a8dc5cc2..4936377e9366 100644 --- a/src/System.Runtime.Extensions/tests/System/Diagnostics/Stopwatch.cs +++ b/src/System.Runtime.Extensions/tests/System/Diagnostics/Stopwatch.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System.Collections.Generic; using System.Threading; using Xunit; @@ -93,6 +94,35 @@ public static void StartNewAndRestart() } } + [OuterLoop("Sleeps for relatively long periods of time")] + [Fact] + public static void ElapsedMilliseconds_WithinExpectedWindow() + { + const int AllowedTries = 30; + const int SleepTime = 1000; + const double WindowFactor = 2; + + var results = new List(); + + var sw = new Stopwatch(); + for (int trial = 0; trial < AllowedTries; trial++) + { + sw.Restart(); + Thread.Sleep(SleepTime); + sw.Stop(); + + if (sw.ElapsedMilliseconds >= (SleepTime / WindowFactor) && + sw.ElapsedMilliseconds <= (SleepTime * WindowFactor)) + { + return; + } + + results.Add(sw.ElapsedMilliseconds); + } + + Assert.True(false, $"All {AllowedTries} fell outside of {WindowFactor} window of {SleepTime} sleep time: {string.Join(", ", results)}"); + } + private static void Sleep(int milliseconds = 1) { s_sleepEvent.WaitOne(milliseconds); From 0759a6c6f5c9c4acacb67265f067074a302d01df Mon Sep 17 00:00:00 2001 From: Jan Kotas Date: Mon, 29 Apr 2019 17:38:04 -0700 Subject: [PATCH 105/607] Workaround memset alignment sensitivity (dotnet/coreclr#24302) * Workaround memset alignment sensitivity memset is up to 2x slower on misaligned block on some types of hardware. The problem is uneven performance of "rep stosb" used to implement the memset in some cases. The exact matrix on when it is slower and by how much is very complex. This change workarounds the issue by aligning the memory block before it is passed to memset and filling in the potential misaligned part manually. This workaround will regress performance by a few percent (<10%) in some cases, but we will gain up to 2x improvement in other cases. Fixes #24300 Signed-off-by: dotnet-bot --- src/Common/src/CoreLib/System/SpanHelpers.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Common/src/CoreLib/System/SpanHelpers.cs b/src/Common/src/CoreLib/System/SpanHelpers.cs index 1c32a62b3333..511b85755163 100644 --- a/src/Common/src/CoreLib/System/SpanHelpers.cs +++ b/src/Common/src/CoreLib/System/SpanHelpers.cs @@ -24,7 +24,9 @@ public static unsafe void ClearWithoutReferences(ref byte b, nuint byteLength) return; #if CORECLR && (AMD64 || ARM64) - if (byteLength > 4096) + // The exact matrix on when RhZeroMemory is faster than InitBlockUnaligned is very complex. The factors to consider include + // type of hardware and memory aligment. This threshold was chosen as a good balance accross different configurations. + if (byteLength > 768) goto PInvoke; Unsafe.InitBlockUnaligned(ref b, 0, (uint)byteLength); return; From 467d45e3950e8daeda9373396da8061f5b8b3787 Mon Sep 17 00:00:00 2001 From: dschinde Date: Mon, 29 Apr 2019 19:38:49 -0500 Subject: [PATCH 106/607] Improve pref of `Array.IndexOf()` for certain `T`. (dotnet/coreclr#24293) Applies changes to `Array.IndexOf()` and `Array.LastIndexOf()` similar to the changes made in #20855, so that types other than `byte` and `char` can use use the fast vectorized path. Also allows 32-bit and 64-bit types for which `RuntimeHelpers.IsBitwiseEquatable()` returns `true` to use the faster implementation of `IndexOf` and `LastIndexOf` from `MemoryExtensions`. Signed-off-by: dotnet-bot --- src/Common/src/CoreLib/System/Array.cs | 106 +++++++++++++++++-------- 1 file changed, 73 insertions(+), 33 deletions(-) diff --git a/src/Common/src/CoreLib/System/Array.cs b/src/Common/src/CoreLib/System/Array.cs index 2a4cd816f33d..592cd55bd307 100644 --- a/src/Common/src/CoreLib/System/Array.cs +++ b/src/Common/src/CoreLib/System/Array.cs @@ -7,6 +7,7 @@ using System.Collections.ObjectModel; using System.Diagnostics; using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; using Internal.Runtime.CompilerServices; #nullable enable @@ -1016,24 +1017,40 @@ public static int IndexOf(T[] array, T value, int startIndex, int count) // Hits a code generation bug on ProjectN #if !PROJECTN - if (typeof(T) == typeof(byte)) + if (RuntimeHelpers.IsBitwiseEquatable()) { - int result = SpanHelpers.IndexOf( - ref Unsafe.Add(ref array.GetRawSzArrayData(), startIndex), - Unsafe.As(ref value), - count); - - return (result >= 0 ? startIndex : 0) + result; - } - - if (typeof(T) == typeof(char)) - { - int result = SpanHelpers.IndexOf( - ref Unsafe.Add(ref Unsafe.As(ref array.GetRawSzArrayData()), startIndex), - Unsafe.As(ref value), - count); - - return (result >= 0 ? startIndex : 0) + result; + if (Unsafe.SizeOf() == sizeof(byte)) + { + int result = SpanHelpers.IndexOf( + ref Unsafe.Add(ref array.GetRawSzArrayData(), startIndex), + Unsafe.As(ref value), + count); + return (result >= 0 ? startIndex : 0) + result; + } + else if (Unsafe.SizeOf() == sizeof(char)) + { + int result = SpanHelpers.IndexOf( + ref Unsafe.Add(ref Unsafe.As(ref array.GetRawSzArrayData()), startIndex), + Unsafe.As(ref value), + count); + return (result >= 0 ? startIndex : 0) + result; + } + else if (Unsafe.SizeOf() == sizeof(int)) + { + int result = SpanHelpers.IndexOf( + ref Unsafe.Add(ref Unsafe.As(ref array.GetRawSzArrayData()), startIndex), + Unsafe.As(ref value), + count); + return (result >= 0 ? startIndex : 0) + result; + } + else if (Unsafe.SizeOf() == sizeof(long)) + { + int result = SpanHelpers.IndexOf( + ref Unsafe.Add(ref Unsafe.As(ref array.GetRawSzArrayData()), startIndex), + Unsafe.As(ref value), + count); + return (result >= 0 ? startIndex : 0) + result; + } } #endif @@ -1204,27 +1221,50 @@ public static int LastIndexOf(T[] array, T value, int startIndex, int count) // Hits a code generation bug on ProjectN #if !PROJECTN - if (typeof(T) == typeof(byte)) + if (RuntimeHelpers.IsBitwiseEquatable()) { - int endIndex = startIndex - count + 1; - int result = SpanHelpers.LastIndexOf( - ref Unsafe.Add(ref array.GetRawSzArrayData(), endIndex), - Unsafe.As(ref value), - count); + if (Unsafe.SizeOf() == sizeof(byte)) + { + int endIndex = startIndex - count + 1; + int result = SpanHelpers.LastIndexOf( + ref Unsafe.Add(ref array.GetRawSzArrayData(), endIndex), + Unsafe.As(ref value), + count); - return (result >= 0 ? endIndex : 0) + result; - } + return (result >= 0 ? endIndex : 0) + result; + } + else if (Unsafe.SizeOf() == sizeof(char)) + { + int endIndex = startIndex - count + 1; + int result = SpanHelpers.LastIndexOf( + ref Unsafe.Add(ref Unsafe.As(ref array.GetRawSzArrayData()), endIndex), + Unsafe.As(ref value), + count); - if (typeof(T) == typeof(char)) - { - int endIndex = startIndex - count + 1; - int result = SpanHelpers.LastIndexOf( - ref Unsafe.Add(ref Unsafe.As(ref array.GetRawSzArrayData()), endIndex), - Unsafe.As(ref value), - count); + return (result >= 0 ? endIndex : 0) + result; + } + else if (Unsafe.SizeOf() == sizeof(int)) + { + int endIndex = startIndex - count + 1; + int result = SpanHelpers.LastIndexOf( + ref Unsafe.Add(ref Unsafe.As(ref array.GetRawSzArrayData()), endIndex), + Unsafe.As(ref value), + count); + + return (result >= 0 ? endIndex : 0) + result; + } + else if (Unsafe.SizeOf() == sizeof(long)) + { + int endIndex = startIndex - count + 1; + int result = SpanHelpers.LastIndexOf( + ref Unsafe.Add(ref Unsafe.As(ref array.GetRawSzArrayData()), endIndex), + Unsafe.As(ref value), + count); - return (result >= 0 ? endIndex : 0) + result; + return (result >= 0 ? endIndex : 0) + result; + } } + #endif #if CORECLR From 40130352e9c125d57d15eaecd8802c33cca742d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Strehovsk=C3=BD?= Date: Tue, 30 Apr 2019 04:16:10 +0200 Subject: [PATCH 107/607] Move NativeLibrary to the shared partition (dotnet/coreclr#24143) I'm taking the LibraryNameVariation helper from System.Runtime.Loader for the ride as well because it's a general purpose probing logic that is useful in a managed implementation of NativeLibrary. Signed-off-by: dotnet-bot --- .../System.Private.CoreLib.Shared.projitems | 4 + .../Runtime/InteropServices/NativeLibrary.cs | 247 ++++++++++++++++++ .../Loader/LibraryNameVariation.Unix.cs | 69 +++++ .../Loader/LibraryNameVariation.Windows.cs | 29 ++ .../Runtime/Loader/LibraryNameVariation.cs | 20 ++ 5 files changed, 369 insertions(+) create mode 100644 src/Common/src/CoreLib/System/Runtime/InteropServices/NativeLibrary.cs create mode 100644 src/Common/src/CoreLib/System/Runtime/Loader/LibraryNameVariation.Unix.cs create mode 100644 src/Common/src/CoreLib/System/Runtime/Loader/LibraryNameVariation.Windows.cs create mode 100644 src/Common/src/CoreLib/System/Runtime/Loader/LibraryNameVariation.cs diff --git a/src/Common/src/CoreLib/System.Private.CoreLib.Shared.projitems b/src/Common/src/CoreLib/System.Private.CoreLib.Shared.projitems index 45628625d4ad..5337436bcefa 100644 --- a/src/Common/src/CoreLib/System.Private.CoreLib.Shared.projitems +++ b/src/Common/src/CoreLib/System.Private.CoreLib.Shared.projitems @@ -673,6 +673,7 @@ + @@ -700,6 +701,7 @@ + @@ -1105,6 +1107,7 @@ + @@ -1270,6 +1273,7 @@ + diff --git a/src/Common/src/CoreLib/System/Runtime/InteropServices/NativeLibrary.cs b/src/Common/src/CoreLib/System/Runtime/InteropServices/NativeLibrary.cs new file mode 100644 index 000000000000..8c410242cf6c --- /dev/null +++ b/src/Common/src/CoreLib/System/Runtime/InteropServices/NativeLibrary.cs @@ -0,0 +1,247 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +#nullable enable +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Threading; + +namespace System.Runtime.InteropServices +{ + /// + /// A delegate used to resolve native libraries via callback. + /// + /// The native library to resolve + /// The assembly requesting the resolution + /// + /// The DllImportSearchPathsAttribute on the PInvoke, if any. + /// Otherwise, the DllImportSearchPathsAttribute on the assembly, if any. + /// Otherwise null. + /// + /// The handle for the loaded native library on success, null on failure + public delegate IntPtr DllImportResolver(string libraryName, + Assembly assembly, + DllImportSearchPath? searchPath); + + /// + /// APIs for managing Native Libraries + /// + public static partial class NativeLibrary + { + /// + /// NativeLibrary Loader: Simple API + /// This method is a wrapper around OS loader, using "default" flags. + /// + /// The name of the native library to be loaded + /// The handle for the loaded native library + /// If libraryPath is null + /// If the library can't be found. + /// If the library is not valid. + public static IntPtr Load(string libraryPath) + { + if (libraryPath == null) + throw new ArgumentNullException(nameof(libraryPath)); + + return LoadFromPath(libraryPath, throwOnError: true); + } + + /// + /// NativeLibrary Loader: Simple API that doesn't throw + /// + /// The name of the native library to be loaded + /// The out-parameter for the loaded native library handle + /// True on successful load, false otherwise + /// If libraryPath is null + public static bool TryLoad(string libraryPath, out IntPtr handle) + { + if (libraryPath == null) + throw new ArgumentNullException(nameof(libraryPath)); + + handle = LoadFromPath(libraryPath, throwOnError: false); + return handle != IntPtr.Zero; + } + + /// + /// NativeLibrary Loader: High-level API + /// Given a library name, this function searches specific paths based on the + /// runtime configuration, input parameters, and attributes of the calling assembly. + /// If DllImportSearchPath parameter is non-null, the flags in this enumeration are used. + /// Otherwise, the flags specified by the DefaultDllImportSearchPaths attribute on the + /// calling assembly (if any) are used. + /// This LoadLibrary() method does not invoke the managed call-backs for native library resolution: + /// * The per-assembly registered callback + /// * AssemblyLoadContext.LoadUnmanagedDll() + /// * AssemblyLoadContext.ResolvingUnmanagedDllEvent + /// + /// The name of the native library to be loaded + /// The assembly loading the native library + /// The search path + /// The handle for the loaded library + /// If libraryPath or assembly is null + /// If assembly is not a RuntimeAssembly + /// If the library can't be found. + /// If the library is not valid. + public static IntPtr Load(string libraryName, Assembly assembly, DllImportSearchPath? searchPath) + { + if (libraryName == null) + throw new ArgumentNullException(nameof(libraryName)); + if (assembly == null) + throw new ArgumentNullException(nameof(assembly)); + if (!assembly.IsRuntimeImplemented()) + throw new ArgumentException(SR.Argument_MustBeRuntimeAssembly); + + return LoadLibraryByName(libraryName, + assembly, + searchPath, + throwOnError: true); + } + + /// + /// NativeLibrary Loader: High-level API that doesn't throw. + /// + /// The name of the native library to be loaded + /// The search path + /// The assembly loading the native library + /// The out-parameter for the loaded native library handle + /// True on successful load, false otherwise + /// If libraryPath or assembly is null + /// If assembly is not a RuntimeAssembly + public static bool TryLoad(string libraryName, Assembly assembly, DllImportSearchPath? searchPath, out IntPtr handle) + { + if (libraryName == null) + throw new ArgumentNullException(nameof(libraryName)); + if (assembly == null) + throw new ArgumentNullException(nameof(assembly)); + if (!assembly.IsRuntimeImplemented()) + throw new ArgumentException(SR.Argument_MustBeRuntimeAssembly); + + handle = LoadLibraryByName(libraryName, + assembly, + searchPath, + throwOnError: false); + return handle != IntPtr.Zero; + } + + /// + /// Free a loaded library + /// Given a library handle, free it. + /// No action if the input handle is null. + /// + /// The native library handle to be freed + public static void Free(IntPtr handle) + { + FreeLib(handle); + } + + /// + /// Get the address of an exported Symbol + /// This is a simple wrapper around OS calls, and does not perform any name mangling. + /// + /// The native library handle + /// The name of the exported symbol + /// The address of the symbol + /// If handle or name is null + /// If the symbol is not found + public static IntPtr GetExport(IntPtr handle, string name) + { + if (handle == IntPtr.Zero) + throw new ArgumentNullException(nameof(handle)); + if (name == null) + throw new ArgumentNullException(nameof(name)); + + return GetSymbol(handle, name, throwOnError: true); + } + + /// + /// Get the address of an exported Symbol, but do not throw + /// + /// The native library handle + /// The name of the exported symbol + /// The out-parameter for the symbol address, if it exists + /// True on success, false otherwise + /// If handle or name is null + public static bool TryGetExport(IntPtr handle, string name, out IntPtr address) + { + if (handle == IntPtr.Zero) + throw new ArgumentNullException(nameof(handle)); + if (name == null) + throw new ArgumentNullException(nameof(name)); + + address = GetSymbol(handle, name, throwOnError: false); + return address != IntPtr.Zero; + } + + /// + /// Map from assembly to native-library resolver. + /// Interop specific fields and properties are generally not added to Assembly class. + /// Therefore, this table uses weak assembly pointers to indirectly achieve + /// similar behavior. + /// + private static ConditionalWeakTable? s_nativeDllResolveMap; + + /// + /// Set a callback for resolving native library imports from an assembly. + /// This per-assembly resolver is the first attempt to resolve native library loads + /// initiated by this assembly. + /// + /// Only one resolver can be registered per assembly. + /// Trying to register a second resolver fails with InvalidOperationException. + /// + /// The assembly for which the resolver is registered + /// The resolver callback to register + /// If assembly or resolver is null + /// If a resolver is already set for this assembly + public static void SetDllImportResolver(Assembly assembly, DllImportResolver resolver) + { + if (assembly == null) + throw new ArgumentNullException(nameof(assembly)); + if (resolver == null) + throw new ArgumentNullException(nameof(resolver)); + if (!assembly.IsRuntimeImplemented()) + throw new ArgumentException(SR.Argument_MustBeRuntimeAssembly); + + if (s_nativeDllResolveMap == null) + { + Interlocked.CompareExchange(ref s_nativeDllResolveMap, + new ConditionalWeakTable(), null); + } + + try + { + s_nativeDllResolveMap!.Add(assembly, resolver); // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + } + catch (ArgumentException) + { + // ConditionalWealTable throws ArgumentException if the Key already exists + throw new InvalidOperationException(SR.InvalidOperation_CannotRegisterSecondResolver); + } + } + + /// + /// The helper function that calls the per-assembly native-library resolver + /// if one is registered for this assembly. + /// + /// The native library to load + /// The assembly trying load the native library + /// If the pInvoke has DefaultDllImportSearchPathAttribute + /// If hasdllImportSearchPathFlags is true, the flags in + /// DefaultDllImportSearchPathAttribute; meaningless otherwise + /// The handle for the loaded library on success. Null on failure. + internal static IntPtr LoadLibraryCallbackStub(string libraryName, Assembly assembly, + bool hasDllImportSearchPathFlags, uint dllImportSearchPathFlags) + { + if (s_nativeDllResolveMap == null) + { + return IntPtr.Zero; + } + + if (!s_nativeDllResolveMap.TryGetValue(assembly, out DllImportResolver resolver)) + { + return IntPtr.Zero; + } + + return resolver(libraryName, assembly, hasDllImportSearchPathFlags ? (DllImportSearchPath?)dllImportSearchPathFlags : null); + } + } +} diff --git a/src/Common/src/CoreLib/System/Runtime/Loader/LibraryNameVariation.Unix.cs b/src/Common/src/CoreLib/System/Runtime/Loader/LibraryNameVariation.Unix.cs new file mode 100644 index 000000000000..4895dc86855a --- /dev/null +++ b/src/Common/src/CoreLib/System/Runtime/Loader/LibraryNameVariation.Unix.cs @@ -0,0 +1,69 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +#nullable enable +using System.Collections.Generic; +using System.IO; + +namespace System.Runtime.Loader +{ + internal partial struct LibraryNameVariation + { + private const string LibraryNamePrefix = "lib"; +#if PLATFORM_OSX + private const string LibraryNameSuffix = ".dylib"; +#else + private const string LibraryNameSuffix = ".so"; +#endif + + internal static IEnumerable DetermineLibraryNameVariations(string libName, bool isRelativePath) + { + // This is a copy of the logic in DetermineLibNameVariations in dllimport.cpp in CoreCLR + + if (!isRelativePath) + { + yield return new LibraryNameVariation(string.Empty, string.Empty); + } + else + { + bool containsSuffix = false; + int indexOfSuffix = libName.IndexOf(LibraryNameSuffix, StringComparison.OrdinalIgnoreCase); + if (indexOfSuffix >= 0) + { + indexOfSuffix += LibraryNameSuffix.Length; + containsSuffix = indexOfSuffix == libName.Length || libName[indexOfSuffix] == '.'; + } + + bool containsDelim = libName.Contains(Path.DirectorySeparatorChar); + + if (containsSuffix) + { + yield return new LibraryNameVariation(string.Empty, string.Empty); + if (!containsDelim) + { + yield return new LibraryNameVariation(LibraryNamePrefix, string.Empty); + } + yield return new LibraryNameVariation(string.Empty, LibraryNameSuffix); + if (!containsDelim) + { + yield return new LibraryNameVariation(LibraryNamePrefix, LibraryNameSuffix); + } + } + else + { + yield return new LibraryNameVariation(string.Empty, LibraryNameSuffix); + if (!containsDelim) + { + yield return new LibraryNameVariation(LibraryNamePrefix, LibraryNameSuffix); + } + yield return new LibraryNameVariation(string.Empty, string.Empty); + if (!containsDelim) + { + yield return new LibraryNameVariation(LibraryNamePrefix, string.Empty); + } + } + } + } + } +} diff --git a/src/Common/src/CoreLib/System/Runtime/Loader/LibraryNameVariation.Windows.cs b/src/Common/src/CoreLib/System/Runtime/Loader/LibraryNameVariation.Windows.cs new file mode 100644 index 000000000000..99ccb1e55f75 --- /dev/null +++ b/src/Common/src/CoreLib/System/Runtime/Loader/LibraryNameVariation.Windows.cs @@ -0,0 +1,29 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +#nullable enable +using System.Collections.Generic; + +namespace System.Runtime.Loader +{ + internal partial struct LibraryNameVariation + { + private const string LibraryNameSuffix = ".dll"; + + internal static IEnumerable DetermineLibraryNameVariations(string libName, bool isRelativePath) + { + // This is a copy of the logic in DetermineLibNameVariations in dllimport.cpp in CoreCLR + + yield return new LibraryNameVariation(string.Empty, string.Empty); + + if (isRelativePath && + !libName.EndsWith(".dll", StringComparison.OrdinalIgnoreCase) && + !libName.EndsWith(".exe", StringComparison.OrdinalIgnoreCase)) + { + yield return new LibraryNameVariation(string.Empty, LibraryNameSuffix); + } + } + + } +} diff --git a/src/Common/src/CoreLib/System/Runtime/Loader/LibraryNameVariation.cs b/src/Common/src/CoreLib/System/Runtime/Loader/LibraryNameVariation.cs new file mode 100644 index 000000000000..029e79a19169 --- /dev/null +++ b/src/Common/src/CoreLib/System/Runtime/Loader/LibraryNameVariation.cs @@ -0,0 +1,20 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +#nullable enable + +namespace System.Runtime.Loader +{ + internal partial struct LibraryNameVariation + { + public string Prefix; + public string Suffix; + + public LibraryNameVariation(string prefix, string suffix) + { + Prefix = prefix; + Suffix = suffix; + } + } +} From 957fb5afbdfdf59fe1e522da5b66212c4caf459b Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Tue, 30 Apr 2019 12:54:07 +0000 Subject: [PATCH 108/607] [master] Update dependencies from dotnet/arcade (#37264) * Update dependencies from https://github.com/dotnet/arcade build 20190426.3 - Microsoft.DotNet.XUnitExtensions - 2.4.0-beta.19226.3 - Microsoft.DotNet.XUnitConsoleRunner - 2.5.1-beta.19226.3 - Microsoft.DotNet.VersionTools.Tasks - 1.0.0-beta.19226.3 - Microsoft.DotNet.ApiCompat - 1.0.0-beta.19226.3 - Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19226.3 - Microsoft.DotNet.Build.Tasks.Configuration - 1.0.0-beta.19226.3 - Microsoft.DotNet.Build.Tasks.Feed - 2.2.0-beta.19226.3 - Microsoft.DotNet.Build.Tasks.Packaging - 1.0.0-beta.19226.3 - Microsoft.DotNet.CodeAnalysis - 1.0.0-beta.19226.3 - Microsoft.DotNet.CoreFxTesting - 1.0.0-beta.19226.3 - Microsoft.DotNet.GenAPI - 1.0.0-beta.19226.3 - Microsoft.DotNet.GenFacades - 1.0.0-beta.19226.3 - Microsoft.DotNet.Helix.Sdk - 2.0.0-beta.19226.3 - Microsoft.DotNet.RemoteExecutor - 1.0.0-beta.19226.3 * Update dependencies from https://github.com/dotnet/arcade build 20190429.8 - Microsoft.DotNet.XUnitExtensions - 2.4.0-beta.19229.8 - Microsoft.DotNet.XUnitConsoleRunner - 2.5.1-beta.19229.8 - Microsoft.DotNet.VersionTools.Tasks - 1.0.0-beta.19229.8 - Microsoft.DotNet.ApiCompat - 1.0.0-beta.19229.8 - Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19229.8 - Microsoft.DotNet.Build.Tasks.Configuration - 1.0.0-beta.19229.8 - Microsoft.DotNet.Build.Tasks.Feed - 2.2.0-beta.19229.8 - Microsoft.DotNet.Build.Tasks.Packaging - 1.0.0-beta.19229.8 - Microsoft.DotNet.CodeAnalysis - 1.0.0-beta.19229.8 - Microsoft.DotNet.CoreFxTesting - 1.0.0-beta.19229.8 - Microsoft.DotNet.GenAPI - 1.0.0-beta.19229.8 - Microsoft.DotNet.GenFacades - 1.0.0-beta.19229.8 - Microsoft.DotNet.Helix.Sdk - 2.0.0-beta.19229.8 - Microsoft.DotNet.RemoteExecutor - 1.0.0-beta.19229.8 --- eng/Version.Details.xml | 56 ++++----- eng/Versions.props | 24 ++-- eng/common/SourceLinkValidation.ps1 | 184 ++++++++++++++++++++++++++++ global.json | 4 +- 4 files changed, 226 insertions(+), 42 deletions(-) create mode 100644 eng/common/SourceLinkValidation.ps1 diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index eaed07be2fa2..43746d1d8d97 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -34,65 +34,65 @@ https://github.com/dotnet/corefx 173a2a165316af9a4e211ceab8c8d9692de8a528 - + https://github.com/dotnet/arcade - d37270268a65592cae630f1b979b70f74d4614dd + a7a250e9c13147134543c35fef2fb81f19592edf https://github.com/dotnet/standard 5bd46b63a3e439d2a8e70a1fc52942783f1033f5 - + https://github.com/dotnet/arcade - d37270268a65592cae630f1b979b70f74d4614dd + a7a250e9c13147134543c35fef2fb81f19592edf - + https://github.com/dotnet/arcade - d37270268a65592cae630f1b979b70f74d4614dd + a7a250e9c13147134543c35fef2fb81f19592edf - + https://github.com/dotnet/arcade - d37270268a65592cae630f1b979b70f74d4614dd + a7a250e9c13147134543c35fef2fb81f19592edf - + https://github.com/dotnet/arcade - d37270268a65592cae630f1b979b70f74d4614dd + a7a250e9c13147134543c35fef2fb81f19592edf - + https://github.com/dotnet/arcade - d37270268a65592cae630f1b979b70f74d4614dd + a7a250e9c13147134543c35fef2fb81f19592edf - + https://github.com/dotnet/arcade - d37270268a65592cae630f1b979b70f74d4614dd + a7a250e9c13147134543c35fef2fb81f19592edf - + https://github.com/dotnet/arcade - d37270268a65592cae630f1b979b70f74d4614dd + a7a250e9c13147134543c35fef2fb81f19592edf - + https://github.com/dotnet/arcade - d37270268a65592cae630f1b979b70f74d4614dd + a7a250e9c13147134543c35fef2fb81f19592edf - + https://github.com/dotnet/arcade - d37270268a65592cae630f1b979b70f74d4614dd + a7a250e9c13147134543c35fef2fb81f19592edf - + https://github.com/dotnet/arcade - d37270268a65592cae630f1b979b70f74d4614dd + a7a250e9c13147134543c35fef2fb81f19592edf - + https://github.com/dotnet/arcade - d37270268a65592cae630f1b979b70f74d4614dd + a7a250e9c13147134543c35fef2fb81f19592edf - + https://github.com/dotnet/arcade - d37270268a65592cae630f1b979b70f74d4614dd + a7a250e9c13147134543c35fef2fb81f19592edf - + https://github.com/dotnet/arcade - d37270268a65592cae630f1b979b70f74d4614dd + a7a250e9c13147134543c35fef2fb81f19592edf https://dev.azure.com/dnceng/internal/_git/dotnet-optimization diff --git a/eng/Versions.props b/eng/Versions.props index 970de804355e..0a5f1627f904 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -23,18 +23,18 @@ - 1.0.0-beta.19225.5 - 1.0.0-beta.19225.5 - 1.0.0-beta.19225.5 - 1.0.0-beta.19225.5 - 2.4.0-beta.19225.5 - 2.5.1-beta.19225.5 - 1.0.0-beta.19225.5 - 1.0.0-beta.19225.5 - 1.0.0-beta.19225.5 - 1.0.0-beta.19225.5 - 2.2.0-beta.19225.5 - 1.0.0-beta.19225.5 + 1.0.0-beta.19229.8 + 1.0.0-beta.19229.8 + 1.0.0-beta.19229.8 + 1.0.0-beta.19229.8 + 2.4.0-beta.19229.8 + 2.5.1-beta.19229.8 + 1.0.0-beta.19229.8 + 1.0.0-beta.19229.8 + 1.0.0-beta.19229.8 + 1.0.0-beta.19229.8 + 2.2.0-beta.19229.8 + 1.0.0-beta.19229.8 3.0.0-preview6-27628-03 3.0.0-preview6-27628-03 diff --git a/eng/common/SourceLinkValidation.ps1 b/eng/common/SourceLinkValidation.ps1 new file mode 100644 index 000000000000..cb2d28cb99e1 --- /dev/null +++ b/eng/common/SourceLinkValidation.ps1 @@ -0,0 +1,184 @@ +param( + [Parameter(Mandatory=$true)][string] $InputPath, # Full path to directory where Symbols.NuGet packages to be checked are stored + [Parameter(Mandatory=$true)][string] $ExtractPath, # Full path to directory where the packages will be extracted during validation + [Parameter(Mandatory=$true)][string] $SourceLinkToolPath, # Full path to directory where dotnet SourceLink CLI was installed + [Parameter(Mandatory=$true)][string] $GHRepoName, # GitHub name of the repo including the Org. E.g., dotnet/arcade + [Parameter(Mandatory=$true)][string] $GHCommit # GitHub commit SHA used to build the packages +) + +# Cache/HashMap (File -> Exist flag) used to consult whether a file exist +# in the repository at a specific commit point. This is populated by inserting +# all files present in the repo at a specific commit point. +$global:RepoFiles = @{} + +$ValidatePackage = { + param( + [string] $PackagePath # Full path to a Symbols.NuGet package + ) + + # Ensure input file exist + if (!(Test-Path $PackagePath)) { + throw "Input file does not exist: $PackagePath" + } + + # Extensions for which we'll look for SourceLink information + # For now we'll only care about Portable & Embedded PDBs + $RelevantExtensions = @(".dll", ".exe", ".pdb") + + Write-Host -NoNewLine "Validating" ([System.IO.Path]::GetFileName($PackagePath)) "... " + + $PackageId = [System.IO.Path]::GetFileNameWithoutExtension($PackagePath) + $ExtractPath = Join-Path -Path $using:ExtractPath -ChildPath $PackageId + $FailedFiles = 0 + + Add-Type -AssemblyName System.IO.Compression.FileSystem + + [System.IO.Directory]::CreateDirectory($ExtractPath); + + $zip = [System.IO.Compression.ZipFile]::OpenRead($PackagePath) + + $zip.Entries | + Where-Object {$RelevantExtensions -contains [System.IO.Path]::GetExtension($_.Name)} | + ForEach-Object { + $FileName = $_.FullName + $Extension = [System.IO.Path]::GetExtension($_.Name) + $FakeName = -Join((New-Guid), $Extension) + $TargetFile = Join-Path -Path $ExtractPath -ChildPath $FakeName + + # We ignore resource DLLs + if ($FileName.EndsWith(".resources.dll")) { + return + } + + [System.IO.Compression.ZipFileExtensions]::ExtractToFile($_, $TargetFile, $true) + + $ValidateFile = { + param( + [string] $FullPath, # Full path to the module that has to be checked + [string] $RealPath, + [ref] $FailedFiles + ) + + # Makes easier to reference `sourcelink cli` + Push-Location $using:SourceLinkToolPath + + $SourceLinkInfos = .\sourcelink.exe print-urls $FullPath | Out-String + + if ($LASTEXITCODE -eq 0 -and -not ([string]::IsNullOrEmpty($SourceLinkInfos))) { + $NumFailedLinks = 0 + + # We only care about Http addresses + $Matches = (Select-String '(http[s]?)(:\/\/)([^\s,]+)' -Input $SourceLinkInfos -AllMatches).Matches + + if ($Matches.Count -ne 0) { + $Matches.Value | + ForEach-Object { + $Link = $_ + $CommitUrl = -Join("https://raw.githubusercontent.com/", $using:GHRepoName, "/", $using:GHCommit, "/") + $FilePath = $Link.Replace($CommitUrl, "") + $Status = 200 + $Cache = $using:RepoFiles + + if ( !($Cache.ContainsKey($FilePath)) ) { + try { + $Uri = $Link -as [System.URI] + + # Only GitHub links are valid + if ($Uri.AbsoluteURI -ne $null -and $Uri.Host -match "github") { + $Status = (Invoke-WebRequest -Uri $Link -UseBasicParsing -Method HEAD -TimeoutSec 5).StatusCode + } + else { + $Status = 0 + } + } + catch { + $Status = 0 + } + } + + if ($Status -ne 200) { + if ($NumFailedLinks -eq 0) { + if ($FailedFiles.Value -eq 0) { + Write-Host + } + + Write-Host "`tFile $RealPath has broken links:" + } + + Write-Host "`t`tFailed to retrieve $Link" + + $NumFailedLinks++ + } + } + } + + if ($NumFailedLinks -ne 0) { + $FailedFiles.value++ + $global:LASTEXITCODE = 1 + } + } + + Pop-Location + } + + &$ValidateFile $TargetFile $FileName ([ref]$FailedFiles) + } + + $zip.Dispose() + + if ($FailedFiles -eq 0) { + Write-Host "Passed." + } +} + +function ValidateSourceLinkLinks { + if (!($GHRepoName -Match "^[^\s\/]+/[^\s\/]+$")) { + Write-Host "GHRepoName should be in the format /" + $global:LASTEXITCODE = 1 + return + } + + if (!($GHCommit -Match "^[0-9a-fA-F]{40}$")) { + Write-Host "GHCommit should be a 40 chars hexadecimal string" + $global:LASTEXITCODE = 1 + return + } + + $RepoTreeURL = -Join("https://api.github.com/repos/", $GHRepoName, "/git/trees/", $GHCommit, "?recursive=1") + $CodeExtensions = @(".cs", ".vb", ".fs", ".fsi", ".fsx", ".fsscript") + + try { + # Retrieve the list of files in the repo at that particular commit point and store them in the RepoFiles hash + $Data = Invoke-WebRequest $RepoTreeURL | ConvertFrom-Json | Select-Object -ExpandProperty tree + + foreach ($file in $Data) { + $Extension = [System.IO.Path]::GetExtension($file.path) + + if ($CodeExtensions.Contains($Extension)) { + $RepoFiles[$file.path] = 1 + } + } + } + catch { + Write-Host "Problems downloading the list of files from the repo. Url used: $RepoTreeURL" + $global:LASTEXITCODE = 1 + return + } + + if (Test-Path $ExtractPath) { + Remove-Item $ExtractPath -Force -Recurse -ErrorAction SilentlyContinue + } + + # Process each NuGet package in parallel + $Jobs = @() + Get-ChildItem "$InputPath\*.symbols.nupkg" | + ForEach-Object { + $Jobs += Start-Job -ScriptBlock $ValidatePackage -ArgumentList $_.FullName + } + + foreach ($Job in $Jobs) { + Wait-Job -Id $Job.Id | Receive-Job + } +} + +Measure-Command { ValidateSourceLinkLinks } diff --git a/global.json b/global.json index 027bfba57fe5..13697c8b4afe 100644 --- a/global.json +++ b/global.json @@ -3,8 +3,8 @@ "dotnet": "3.0.100-preview3-010431" }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19225.5", - "Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19225.5", + "Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19229.8", + "Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19229.8", "Microsoft.NET.Sdk.IL": "3.0.0-preview6-27624-71" } } From 6bab1742f604181a10431cce5f62f26b01a3c123 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Tue, 30 Apr 2019 13:24:39 +0000 Subject: [PATCH 109/607] [master] Update dependencies from dotnet/core-setup (#37265) * Update dependencies from https://github.com/dotnet/core-setup build 20190428.14 - Microsoft.NETCore.App - 3.0.0-preview6-27628-14 - Microsoft.NETCore.DotNetHostPolicy - 3.0.0-preview6-27628-14 - Microsoft.NETCore.DotNetHost - 3.0.0-preview6-27628-14 * Update dependencies from https://github.com/dotnet/core-setup build 20190429.07 - Microsoft.NETCore.App - 3.0.0-preview6-27629-07 - Microsoft.NETCore.DotNetHostPolicy - 3.0.0-preview6-27629-07 - Microsoft.NETCore.DotNetHost - 3.0.0-preview6-27629-07 --- eng/Version.Details.xml | 12 ++++++------ eng/Versions.props | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 43746d1d8d97..c57fd541c982 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -14,17 +14,17 @@ - + https://github.com/dotnet/core-setup - 3cae3dfe319d7fe2b7ec5af161c0648bb1d6f4c4 + a3967b6096dc6a688f338d9eb4f986d537977c1e - + https://github.com/dotnet/core-setup - 3cae3dfe319d7fe2b7ec5af161c0648bb1d6f4c4 + a3967b6096dc6a688f338d9eb4f986d537977c1e - + https://github.com/dotnet/core-setup - 3cae3dfe319d7fe2b7ec5af161c0648bb1d6f4c4 + a3967b6096dc6a688f338d9eb4f986d537977c1e https://github.com/dotnet/corefx diff --git a/eng/Versions.props b/eng/Versions.props index 0a5f1627f904..77c665a253e7 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -36,9 +36,9 @@ 2.2.0-beta.19229.8 1.0.0-beta.19229.8 - 3.0.0-preview6-27628-03 - 3.0.0-preview6-27628-03 - 3.0.0-preview6-27628-03 + 3.0.0-preview6-27629-07 + 3.0.0-preview6-27629-07 + 3.0.0-preview6-27629-07 3.0.0-preview6-27624-71 3.0.0-preview6-27624-71 From be8feef62c5a3f14c13b35e67a523765b84a770e Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Tue, 30 Apr 2019 13:36:18 +0000 Subject: [PATCH 110/607] Update dependencies from https://github.com/dotnet/corefx build 20190429.9 (#37297) - runtime.native.System.IO.Ports - 4.6.0-preview6.19229.9 - Microsoft.NETCore.Platforms - 3.0.0-preview6.19229.9 --- eng/Version.Details.xml | 8 ++++---- eng/Versions.props | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index c57fd541c982..cfa0638d1c5c 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -26,13 +26,13 @@ https://github.com/dotnet/core-setup a3967b6096dc6a688f338d9eb4f986d537977c1e - + https://github.com/dotnet/corefx - 173a2a165316af9a4e211ceab8c8d9692de8a528 + 40130352e9c125d57d15eaecd8802c33cca742d3 - + https://github.com/dotnet/corefx - 173a2a165316af9a4e211ceab8c8d9692de8a528 + 40130352e9c125d57d15eaecd8802c33cca742d3 https://github.com/dotnet/arcade diff --git a/eng/Versions.props b/eng/Versions.props index 77c665a253e7..5b5fe379497f 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -43,8 +43,8 @@ 3.0.0-preview6-27624-71 3.0.0-preview6-27624-71 - 3.0.0-preview6.19229.1 - 4.6.0-preview6.19229.1 + 3.0.0-preview6.19229.9 + 4.6.0-preview6.19229.9 2.1.0-prerelease.19224.1 From 422565673deb849b42f656f4a68bec791ee4bed9 Mon Sep 17 00:00:00 2001 From: Stephen Toub Date: Tue, 30 Apr 2019 14:58:25 -0400 Subject: [PATCH 111/607] Harden several SocketsHttpHandler streams against unexpected Dispose (#37299) A few tweaks: - We hand out the ChunkedEncodingWriteStream and ContentLengthWriteStream to an HttpContent.SerializeToStreamAsync. If that user code disposes of the Stream, then we end up null ref'ing when we try to finish the processing. We should instead throw a more descriptive error about the misuse. - Make the non-pooled response streams slightly more robust against concurrent disposal (which is not a supported use, but it happens). --- .../ChunkedEncodingWriteStream.cs | 28 ++++----- .../ConnectionCloseReadStream.cs | 35 ++++++----- .../ContentLengthWriteStream.cs | 6 +- .../Http/SocketsHttpHandler/Http2Stream.cs | 10 ++-- .../SocketsHttpHandler/HttpContentStream.cs | 11 ++++ .../HttpContentWriteStream.cs | 13 +++-- .../SocketsHttpHandler/RawConnectionStream.cs | 58 ++++++++++--------- .../FunctionalTests/SocketsHttpHandlerTest.cs | 50 ++++++++++++++++ 8 files changed, 143 insertions(+), 68 deletions(-) diff --git a/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/ChunkedEncodingWriteStream.cs b/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/ChunkedEncodingWriteStream.cs index 54bb5cfc4c67..8e4e4384cb96 100644 --- a/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/ChunkedEncodingWriteStream.cs +++ b/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/ChunkedEncodingWriteStream.cs @@ -20,7 +20,8 @@ public ChunkedEncodingWriteStream(HttpConnection connection) : base(connection) public override ValueTask WriteAsync(ReadOnlyMemory buffer, CancellationToken ignored) { - Debug.Assert(_connection._currentRequest != null); + HttpConnection connection = GetConnectionOrThrow(); + Debug.Assert(connection._currentRequest != null); // The token is ignored because it's coming from SendAsync and the only operations // here are those that are already covered by the token having been registered with @@ -29,28 +30,29 @@ public override ValueTask WriteAsync(ReadOnlyMemory buffer, CancellationTo ValueTask task = buffer.Length == 0 ? // Don't write if nothing was given, especially since we don't want to accidentally send a 0 chunk, // which would indicate end of body. Instead, just ensure no content is stuck in the buffer. - _connection.FlushAsync() : - new ValueTask(WriteChunkAsync(buffer)); + connection.FlushAsync() : + new ValueTask(WriteChunkAsync(connection, buffer)); return task; - } - private async Task WriteChunkAsync(ReadOnlyMemory buffer) - { - // Write chunk length in hex followed by \r\n - await _connection.WriteHexInt32Async(buffer.Length).ConfigureAwait(false); - await _connection.WriteTwoBytesAsync((byte)'\r', (byte)'\n').ConfigureAwait(false); + static async Task WriteChunkAsync(HttpConnection connection, ReadOnlyMemory buffer) + { + // Write chunk length in hex followed by \r\n + await connection.WriteHexInt32Async(buffer.Length).ConfigureAwait(false); + await connection.WriteTwoBytesAsync((byte)'\r', (byte)'\n').ConfigureAwait(false); - // Write chunk contents followed by \r\n - await _connection.WriteAsync(buffer).ConfigureAwait(false); - await _connection.WriteTwoBytesAsync((byte)'\r', (byte)'\n').ConfigureAwait(false); + // Write chunk contents followed by \r\n + await connection.WriteAsync(buffer).ConfigureAwait(false); + await connection.WriteTwoBytesAsync((byte)'\r', (byte)'\n').ConfigureAwait(false); + } } public override async Task FinishAsync() { // Send 0 byte chunk to indicate end, then final CrLf - await _connection.WriteBytesAsync(s_finalChunkBytes).ConfigureAwait(false); + HttpConnection connection = GetConnectionOrThrow(); _connection = null; + await connection.WriteBytesAsync(s_finalChunkBytes).ConfigureAwait(false); } } } diff --git a/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/ConnectionCloseReadStream.cs b/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/ConnectionCloseReadStream.cs index 8960ad2d8e1b..262ab203e618 100644 --- a/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/ConnectionCloseReadStream.cs +++ b/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/ConnectionCloseReadStream.cs @@ -18,18 +18,19 @@ public ConnectionCloseReadStream(HttpConnection connection) : base(connection) public override int Read(Span buffer) { - if (_connection == null || buffer.Length == 0) + HttpConnection connection = _connection; + if (connection == null || buffer.Length == 0) { // Response body fully consumed or the caller didn't ask for any data return 0; } - int bytesRead = _connection.Read(buffer); + int bytesRead = connection.Read(buffer); if (bytesRead == 0) { // We cannot reuse this connection, so close it. - _connection.Dispose(); _connection = null; + connection.Dispose(); } return bytesRead; @@ -39,13 +40,14 @@ public override async ValueTask ReadAsync(Memory buffer, Cancellation { CancellationHelper.ThrowIfCancellationRequested(cancellationToken); - if (_connection == null || buffer.Length == 0) + HttpConnection connection = _connection; + if (connection == null || buffer.Length == 0) { // Response body fully consumed or the caller didn't ask for any data return 0; } - ValueTask readTask = _connection.ReadAsync(buffer); + ValueTask readTask = connection.ReadAsync(buffer); int bytesRead; if (readTask.IsCompletedSuccessfully) { @@ -53,7 +55,7 @@ public override async ValueTask ReadAsync(Memory buffer, Cancellation } else { - CancellationTokenRegistration ctr = _connection.RegisterCancellation(cancellationToken); + CancellationTokenRegistration ctr = connection.RegisterCancellation(cancellationToken); try { bytesRead = await readTask.ConfigureAwait(false); @@ -79,8 +81,8 @@ public override async ValueTask ReadAsync(Memory buffer, Cancellation CancellationHelper.ThrowIfCancellationRequested(cancellationToken); // We cannot reuse this connection, so close it. - _connection.Dispose(); _connection = null; + connection.Dispose(); } return bytesRead; @@ -95,25 +97,26 @@ public override Task CopyToAsync(Stream destination, int bufferSize, Cancellatio return Task.FromCanceled(cancellationToken); } - if (_connection == null) + HttpConnection connection = _connection; + if (connection == null) { // null if response body fully consumed return Task.CompletedTask; } - Task copyTask = _connection.CopyToUntilEofAsync(destination, bufferSize, cancellationToken); + Task copyTask = connection.CopyToUntilEofAsync(destination, bufferSize, cancellationToken); if (copyTask.IsCompletedSuccessfully) { - Finish(); + Finish(connection); return Task.CompletedTask; } - return CompleteCopyToAsync(copyTask, cancellationToken); + return CompleteCopyToAsync(copyTask, connection, cancellationToken); } - private async Task CompleteCopyToAsync(Task copyTask, CancellationToken cancellationToken) + private async Task CompleteCopyToAsync(Task copyTask, HttpConnection connection, CancellationToken cancellationToken) { - CancellationTokenRegistration ctr = _connection.RegisterCancellation(cancellationToken); + CancellationTokenRegistration ctr = connection.RegisterCancellation(cancellationToken); try { await copyTask.ConfigureAwait(false); @@ -133,14 +136,14 @@ private async Task CompleteCopyToAsync(Task copyTask, CancellationToken cancella // been requested, we assume the copy completed due to cancellation and throw. CancellationHelper.ThrowIfCancellationRequested(cancellationToken); - Finish(); + Finish(connection); } - private void Finish() + private void Finish(HttpConnection connection) { // We cannot reuse this connection, so close it. - _connection.Dispose(); _connection = null; + connection.Dispose(); } } } diff --git a/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/ContentLengthWriteStream.cs b/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/ContentLengthWriteStream.cs index 3c79ead16890..48044271221e 100644 --- a/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/ContentLengthWriteStream.cs +++ b/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/ContentLengthWriteStream.cs @@ -18,12 +18,12 @@ public ContentLengthWriteStream(HttpConnection connection) : base(connection) public override ValueTask WriteAsync(ReadOnlyMemory buffer, CancellationToken ignored) // token ignored as it comes from SendAsync { - Debug.Assert(_connection._currentRequest != null); - // Have the connection write the data, skipping the buffer. Importantly, this will // force a flush of anything already in the buffer, i.e. any remaining request headers // that are still buffered. - return new ValueTask(_connection.WriteAsync(buffer)); + HttpConnection connection = GetConnectionOrThrow(); + Debug.Assert(connection._currentRequest != null); + return new ValueTask(connection.WriteAsync(buffer)); } public override Task FinishAsync() diff --git a/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http2Stream.cs b/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http2Stream.cs index 53f793c515e0..1a45dcae1cff 100644 --- a/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http2Stream.cs +++ b/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http2Stream.cs @@ -599,12 +599,10 @@ protected override void Dispose(bool disposing) public override ValueTask WriteAsync(ReadOnlyMemory buffer, CancellationToken cancellationToken) { Http2Stream http2Stream = _http2Stream; - if (http2Stream == null) - { - return new ValueTask(Task.FromException(new ObjectDisposedException(nameof(Http2WriteStream)))); - } - - return new ValueTask(http2Stream.SendDataAsync(buffer, cancellationToken)); + Task t = http2Stream != null ? + http2Stream.SendDataAsync(buffer, cancellationToken) : + Task.FromException(new ObjectDisposedException(nameof(Http2WriteStream))); + return new ValueTask(t); } } } diff --git a/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpContentStream.cs b/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpContentStream.cs index b1b40ea960d9..860fb558bfee 100644 --- a/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpContentStream.cs +++ b/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpContentStream.cs @@ -26,5 +26,16 @@ protected override void Dispose(bool disposing) base.Dispose(disposing); } + + protected HttpConnection GetConnectionOrThrow() + { + return _connection ?? + // This should only ever happen if the user-code that was handed this instance disposed of + // it, which is misuse, or held onto it and tried to use it later after we've disposed of it, + // which is also misuse. + ThrowObjectDisposedException(); + } + + private HttpConnection ThrowObjectDisposedException() => throw new ObjectDisposedException(GetType().Name); } } diff --git a/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpContentWriteStream.cs b/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpContentWriteStream.cs index 6802a07265c3..537ee6f405ab 100644 --- a/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpContentWriteStream.cs +++ b/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpContentWriteStream.cs @@ -20,10 +20,15 @@ public HttpContentWriteStream(HttpConnection connection) : base(connection) => public sealed override bool CanWrite => true; public sealed override void Flush() => - _connection.Flush(); - - public sealed override Task FlushAsync(CancellationToken ignored) => - _connection.FlushAsync().AsTask(); + _connection?.Flush(); + + public sealed override Task FlushAsync(CancellationToken ignored) + { + HttpConnection connection = _connection; + return connection != null ? + connection.FlushAsync().AsTask() : + default; + } public sealed override int Read(Span buffer) => throw new NotSupportedException(); diff --git a/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/RawConnectionStream.cs b/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/RawConnectionStream.cs index b45475f65b9f..87c260fb9375 100644 --- a/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/RawConnectionStream.cs +++ b/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/RawConnectionStream.cs @@ -22,18 +22,19 @@ public RawConnectionStream(HttpConnection connection) : base(connection) public override int Read(Span buffer) { - if (_connection == null || buffer.Length == 0) + HttpConnection connection = _connection; + if (connection == null || buffer.Length == 0) { // Response body fully consumed or the caller didn't ask for any data return 0; } - int bytesRead = _connection.ReadBuffered(buffer); + int bytesRead = connection.ReadBuffered(buffer); if (bytesRead == 0) { // We cannot reuse this connection, so close it. - _connection.Dispose(); _connection = null; + connection.Dispose(); } return bytesRead; @@ -43,13 +44,14 @@ public override async ValueTask ReadAsync(Memory buffer, Cancellation { CancellationHelper.ThrowIfCancellationRequested(cancellationToken); - if (_connection == null || buffer.Length == 0) + HttpConnection connection = _connection; + if (connection == null || buffer.Length == 0) { // Response body fully consumed or the caller didn't ask for any data return 0; } - ValueTask readTask = _connection.ReadBufferedAsync(buffer); + ValueTask readTask = connection.ReadBufferedAsync(buffer); int bytesRead; if (readTask.IsCompletedSuccessfully) { @@ -57,7 +59,7 @@ public override async ValueTask ReadAsync(Memory buffer, Cancellation } else { - CancellationTokenRegistration ctr = _connection.RegisterCancellation(cancellationToken); + CancellationTokenRegistration ctr = connection.RegisterCancellation(cancellationToken); try { bytesRead = await readTask.ConfigureAwait(false); @@ -78,8 +80,8 @@ public override async ValueTask ReadAsync(Memory buffer, Cancellation CancellationHelper.ThrowIfCancellationRequested(cancellationToken); // We cannot reuse this connection, so close it. - _connection.Dispose(); _connection = null; + connection.Dispose(); } return bytesRead; @@ -94,25 +96,26 @@ public override Task CopyToAsync(Stream destination, int bufferSize, Cancellatio return Task.FromCanceled(cancellationToken); } - if (_connection == null) + HttpConnection connection = _connection; + if (connection == null) { // null if response body fully consumed return Task.CompletedTask; } - Task copyTask = _connection.CopyToUntilEofAsync(destination, bufferSize, cancellationToken); + Task copyTask = connection.CopyToUntilEofAsync(destination, bufferSize, cancellationToken); if (copyTask.IsCompletedSuccessfully) { - Finish(); + Finish(connection); return Task.CompletedTask; } - return CompleteCopyToAsync(copyTask, cancellationToken); + return CompleteCopyToAsync(copyTask, connection, cancellationToken); } - private async Task CompleteCopyToAsync(Task copyTask, CancellationToken cancellationToken) + private async Task CompleteCopyToAsync(Task copyTask, HttpConnection connection, CancellationToken cancellationToken) { - CancellationTokenRegistration ctr = _connection.RegisterCancellation(cancellationToken); + CancellationTokenRegistration ctr = connection.RegisterCancellation(cancellationToken); try { await copyTask.ConfigureAwait(false); @@ -132,13 +135,13 @@ private async Task CompleteCopyToAsync(Task copyTask, CancellationToken cancella // been requested, we assume the copy completed due to cancellation and throw. CancellationHelper.ThrowIfCancellationRequested(cancellationToken); - Finish(); + Finish(connection); } - private void Finish() + private void Finish(HttpConnection connection) { // We cannot reuse this connection, so close it. - _connection.Dispose(); + connection.Dispose(); _connection = null; } @@ -150,14 +153,15 @@ public override void Write(byte[] buffer, int offset, int count) public override void Write(ReadOnlySpan buffer) { - if (_connection == null) + HttpConnection connection = _connection; + if (connection == null) { throw new IOException(SR.ObjectDisposed_StreamClosed); } if (buffer.Length != 0) { - _connection.WriteWithoutBuffering(buffer); + connection.WriteWithoutBuffering(buffer); } } @@ -168,7 +172,8 @@ public override ValueTask WriteAsync(ReadOnlyMemory buffer, CancellationTo return new ValueTask(Task.FromCanceled(cancellationToken)); } - if (_connection == null) + HttpConnection connection = _connection; + if (connection == null) { return new ValueTask(Task.FromException(new IOException(SR.ObjectDisposed_StreamClosed))); } @@ -178,10 +183,10 @@ public override ValueTask WriteAsync(ReadOnlyMemory buffer, CancellationTo return default; } - ValueTask writeTask = _connection.WriteWithoutBufferingAsync(buffer); + ValueTask writeTask = connection.WriteWithoutBufferingAsync(buffer); return writeTask.IsCompleted ? writeTask : - new ValueTask(WaitWithConnectionCancellationAsync(writeTask, cancellationToken)); + new ValueTask(WaitWithConnectionCancellationAsync(writeTask, connection, cancellationToken)); } public override void Flush() => _connection?.Flush(); @@ -193,20 +198,21 @@ public override Task FlushAsync(CancellationToken cancellationToken) return Task.FromCanceled(cancellationToken); } - if (_connection == null) + HttpConnection connection = _connection; + if (connection == null) { return Task.CompletedTask; } - ValueTask flushTask = _connection.FlushAsync(); + ValueTask flushTask = connection.FlushAsync(); return flushTask.IsCompleted ? flushTask.AsTask() : - WaitWithConnectionCancellationAsync(flushTask, cancellationToken); + WaitWithConnectionCancellationAsync(flushTask, connection, cancellationToken); } - private async Task WaitWithConnectionCancellationAsync(ValueTask task, CancellationToken cancellationToken) + private static async Task WaitWithConnectionCancellationAsync(ValueTask task, HttpConnection connection, CancellationToken cancellationToken) { - CancellationTokenRegistration ctr = _connection.RegisterCancellation(cancellationToken); + CancellationTokenRegistration ctr = connection.RegisterCancellation(cancellationToken); try { await task.ConfigureAwait(false); diff --git a/src/System.Net.Http/tests/FunctionalTests/SocketsHttpHandlerTest.cs b/src/System.Net.Http/tests/FunctionalTests/SocketsHttpHandlerTest.cs index 198eb2714b12..e37537aa6252 100644 --- a/src/System.Net.Http/tests/FunctionalTests/SocketsHttpHandlerTest.cs +++ b/src/System.Net.Http/tests/FunctionalTests/SocketsHttpHandlerTest.cs @@ -457,6 +457,56 @@ public sealed class SocketsHttpHandler_PostScenarioTest : PostScenarioTest { public SocketsHttpHandler_PostScenarioTest(ITestOutputHelper output) : base(output) { } protected override bool UseSocketsHttpHandler => true; + + [Theory] + [InlineData(false)] + [InlineData(true)] + public async Task DisposeTargetStream_ThrowsObjectDisposedException(bool knownLength) + { + var tcs = new TaskCompletionSource(TaskContinuationOptions.RunContinuationsAsynchronously); + await LoopbackServerFactory.CreateClientAndServerAsync(async uri => + { + try + { + using (HttpClient client = CreateHttpClient()) + { + Task t = client.PostAsync(uri, new DisposeStreamWhileCopyingContent(knownLength)); + Assert.IsType((await Assert.ThrowsAsync(() => t)).InnerException); + } + } + finally + { + tcs.SetResult(0); + } + }, server => tcs.Task); + } + + private sealed class DisposeStreamWhileCopyingContent : HttpContent + { + private readonly bool _knownLength; + + public DisposeStreamWhileCopyingContent(bool knownLength) => _knownLength = knownLength; + + protected override async Task SerializeToStreamAsync(Stream stream, TransportContext context) + { + await stream.WriteAsync(new byte[42], 0, 42); + stream.Dispose(); + } + + protected override bool TryComputeLength(out long length) + { + if (_knownLength) + { + length = 42; + return true; + } + else + { + length = 0; + return false; + } + } + } } public sealed class SocketsHttpHandler_ResponseStreamTest : ResponseStreamTest From e89d17a0a97d5de707f24587118acc8072667b78 Mon Sep 17 00:00:00 2001 From: Jeremy Barton Date: Tue, 30 Apr 2019 12:25:58 -0700 Subject: [PATCH 112/607] Fix bad usage of ArrayPool in TdsParserStateObject (#37270) If TdsParserStateObject.TryReadString or TdsParserStateObject.TryReadStringWithEncoding hit the growth case they would rent an array, save it into a field, use the array, return the array to the pool, but keep it assigned to the field and continue using it. Since other writes to _bTmp use fresh arrays in an instance-cached-growth pattern, this change restores these two methods to that same approach, rather than renting to a local buffer and not renting into a field. --- .../Data/SqlClient/TdsParserStateObject.cs | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/src/System.Data.SqlClient/src/System/Data/SqlClient/TdsParserStateObject.cs b/src/System.Data.SqlClient/src/System/Data/SqlClient/TdsParserStateObject.cs index a23ec191ad5d..6e33815126e0 100644 --- a/src/System.Data.SqlClient/src/System/Data/SqlClient/TdsParserStateObject.cs +++ b/src/System.Data.SqlClient/src/System/Data/SqlClient/TdsParserStateObject.cs @@ -12,7 +12,6 @@ using System.Text; using System.Security; using System.Runtime.InteropServices; -using System.Buffers; namespace System.Data.SqlClient { @@ -1644,14 +1643,12 @@ internal bool TryReadString(int length, out string value) int cBytes = length << 1; byte[] buf; int offset = 0; - bool rentedBuffer = false; if (((_inBytesUsed + cBytes) > _inBytesRead) || (_inBytesPacket < cBytes)) { if (_bTmp == null || _bTmp.Length < cBytes) { - _bTmp = ArrayPool.Shared.Rent(cBytes); - rentedBuffer = true; + _bTmp = new byte[cBytes]; } if (!TryReadByteArray(_bTmp, cBytes)) @@ -1677,10 +1674,6 @@ internal bool TryReadString(int length, out string value) } value = System.Text.Encoding.Unicode.GetString(buf, offset, cBytes); - if (rentedBuffer) - { - ArrayPool.Shared.Return(_bTmp, clearArray: true); - } return true; } @@ -1713,7 +1706,6 @@ internal bool TryReadStringWithEncoding(int length, System.Text.Encoding encodin } byte[] buf = null; int offset = 0; - bool rentedBuffer = false; if (isPlp) { @@ -1731,8 +1723,7 @@ internal bool TryReadStringWithEncoding(int length, System.Text.Encoding encodin { if (_bTmp == null || _bTmp.Length < length) { - _bTmp = ArrayPool.Shared.Rent(length); - rentedBuffer = true; + _bTmp = new byte[length]; } if (!TryReadByteArray(_bTmp, length)) @@ -1760,10 +1751,6 @@ internal bool TryReadStringWithEncoding(int length, System.Text.Encoding encodin // BCL optimizes to not use char[] underneath value = encoding.GetString(buf, offset, length); - if (rentedBuffer) - { - ArrayPool.Shared.Return(_bTmp, clearArray: true); - } return true; } From ee67e75c1ae98ef73a32aa0a4f1b9c1d9ef392d8 Mon Sep 17 00:00:00 2001 From: Matt Galbraith Date: Tue, 30 Apr 2019 12:55:51 -0700 Subject: [PATCH 113/607] Update Docker image for Ubuntu 19.04 --- eng/pipelines/linux.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/pipelines/linux.yml b/eng/pipelines/linux.yml index aebeb12daba5..c40364e23716 100644 --- a/eng/pipelines/linux.yml +++ b/eng/pipelines/linux.yml @@ -115,7 +115,7 @@ jobs: - alpineQueues: \(Alpine.38.Amd64\)ubuntu.1604.amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.8-helix-45b1fa2-20190327215821 - ${{ if eq(parameters.isOfficialBuild, 'true') }}: - - linuxDefaultQueues: Centos.7.Amd64+RedHat.7.Amd64+Debian.8.Amd64+Debian.9.Amd64+Ubuntu.1604.Amd64+Ubuntu.1804.Amd64+Ubuntu.1810.Amd64+OpenSuse.42.Amd64+SLES.12.Amd64+SLES.15.Amd64+\(Fedora.28.Amd64\)ubuntu.1604.amd64@mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-28-helix-45b1fa2-20190402012449+\(Fedora.29.Amd64\)ubuntu.1604.amd64@mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-29-helix-c6dc5e6-20190402012449+\(Ubuntu.1904.Amd64\)ubuntu.1604.amd64@mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-19.04-helix-amd64-337cf5e-20190429231235 + - linuxDefaultQueues: Centos.7.Amd64+RedHat.7.Amd64+Debian.8.Amd64+Debian.9.Amd64+Ubuntu.1604.Amd64+Ubuntu.1804.Amd64+Ubuntu.1810.Amd64+OpenSuse.42.Amd64+SLES.12.Amd64+SLES.15.Amd64+\(Fedora.28.Amd64\)ubuntu.1604.amd64@mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-28-helix-45b1fa2-20190402012449+\(Fedora.29.Amd64\)ubuntu.1604.amd64@mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-29-helix-c6dc5e6-20190402012449+\(Ubuntu.1904.Amd64\)ubuntu.1604.amd64@mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-19.04-helix-amd64-b2d2f9b-20190430184508 - linuxArm64Queues: \(Ubuntu.1604.Arm64\)Ubuntu.1604.Arm64.Docker@mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-16.04-helix-arm64v8-b049512-20190321153539 - linuxArmQueues: \(Debian.9.Arm32\)Ubuntu.1604.Arm32@mcr.microsoft.com/dotnet-buildtools/prereqs:debian-9-helix-arm32v7-b049512-20190321153542 - alpineQueues: \(Alpine.38.Amd64\)ubuntu.1604.amd64@mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.8-helix-45b1fa2-20190327215821+\(Alpine.39.Amd64\)ubuntu.1604.amd64@mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.9-helix-e4eaef4-20190228230637 From 8d2714b8af06bd563a2015c1b3155f04a91a4b1a Mon Sep 17 00:00:00 2001 From: Santiago Fernandez Madero Date: Tue, 30 Apr 2019 13:03:55 -0700 Subject: [PATCH 114/607] Update dotnet standard manually to fix official builds (#37302) --- eng/Version.Details.xml | 4 ++-- eng/Versions.props | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index cfa0638d1c5c..c74b5f023ecc 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -38,9 +38,9 @@ https://github.com/dotnet/arcade a7a250e9c13147134543c35fef2fb81f19592edf - + https://github.com/dotnet/standard - 5bd46b63a3e439d2a8e70a1fc52942783f1033f5 + e94d4263f03ced7269275c10a59d1dddb0c76b7c https://github.com/dotnet/arcade diff --git a/eng/Versions.props b/eng/Versions.props index 5b5fe379497f..48e5065641ab 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -46,7 +46,7 @@ 3.0.0-preview6.19229.9 4.6.0-preview6.19229.9 - 2.1.0-prerelease.19224.1 + 2.1.0-prerelease.19230.1 99.99.99-master-20190425.1 From 4a4b2cfd556feaa1c112afc604217d5c628385a2 Mon Sep 17 00:00:00 2001 From: Santiago Fernandez Madero Date: Tue, 30 Apr 2019 13:32:10 -0700 Subject: [PATCH 115/607] Move to new BYOC pools (#37303) --- eng/pipelines/publish.yml | 4 ++-- eng/pipelines/windows.yml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/eng/pipelines/publish.yml b/eng/pipelines/publish.yml index 7813515ffac2..6080e752ad85 100644 --- a/eng/pipelines/publish.yml +++ b/eng/pipelines/publish.yml @@ -16,7 +16,7 @@ jobs: dependsOn: ${{ parameters.dependsOn }} pool: - name: NetCoreInternal-Int-Pool + name: NetCoreInternal-Pool queue: buildpool.windows.10.amd64.vs2017 workspace: @@ -112,7 +112,7 @@ jobs: dependsOn: ${{ parameters.dependsOn }} pool: - name: NetCoreInternal-Int-Pool + name: NetCoreInternal-Pool queue: buildpool.windows.10.amd64.vs2017 workspace: diff --git a/eng/pipelines/windows.yml b/eng/pipelines/windows.yml index b165a2ae837e..09610eac20e0 100644 --- a/eng/pipelines/windows.yml +++ b/eng/pipelines/windows.yml @@ -110,7 +110,7 @@ jobs: pool: ${{ if eq(parameters.isOfficialBuild, 'true') }}: - name: NetCoreInternal-Int-Pool + name: NetCoreInternal-Pool queue: buildpool.windows.10.amd64.vs2017 ${{ if eq(parameters.isOfficialBuild, 'false') }}: name: Hosted VS2017 @@ -160,7 +160,7 @@ jobs: pool: ${{ if eq(parameters.isOfficialBuild, 'true') }}: - name: NetCoreInternal-Int-Pool + name: NetCoreInternal-Pool queue: buildpool.windows.10.amd64.vs2017 ${{ if eq(parameters.isOfficialBuild, 'false') }}: name: Hosted VS2017 @@ -226,7 +226,7 @@ jobs: pool: ${{ if eq(parameters.isOfficialBuild, 'true') }}: - name: NetCoreInternal-Int-Pool + name: NetCoreInternal-Pool queue: buildpool.windows.10.amd64.vs2017 ${{ if eq(parameters.isOfficialBuild, 'false') }}: name: Hosted VS2017 From 33f3985174a8f7727cfeaa507963c0f76b8a0908 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Tue, 30 Apr 2019 16:40:12 -0400 Subject: [PATCH 116/607] [master] Update dependencies from dotnet/coreclr (#37298) * Update dependencies from https://github.com/dotnet/coreclr build 20190429.75 - Microsoft.NET.Sdk.IL - 3.0.0-preview6-27629-75 - Microsoft.NETCore.ILAsm - 3.0.0-preview6-27629-75 - Microsoft.NETCore.Runtime.CoreCLR - 3.0.0-preview6-27629-75 * Disable NullEncodingThrows test on all but netfx * add precision precision tests added and precision increased in current tests fixing max value test * Fixing tests for netfx --- eng/Version.Details.xml | 12 +++--- eng/Versions.props | 4 +- global.json | 2 +- .../StreamWriter/StreamWriter.CtorTests.cs | 1 + .../tests/System/TimeSpanTests.cs | 42 ++++++++++++++----- .../tests/System/TimeSpanTests.netcoreapp.cs | 15 ++++++- 6 files changed, 54 insertions(+), 22 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index c74b5f023ecc..1460100927a6 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -1,16 +1,16 @@ - + https://github.com/dotnet/coreclr - 8808f4eab10d1760182590cad4964f566b9c88ca + 54af92b34fc18ee9d8adada35d1f527c67224be7 - + https://github.com/dotnet/coreclr - 8808f4eab10d1760182590cad4964f566b9c88ca + 54af92b34fc18ee9d8adada35d1f527c67224be7 - + https://github.com/dotnet/coreclr - 8808f4eab10d1760182590cad4964f566b9c88ca + 54af92b34fc18ee9d8adada35d1f527c67224be7 diff --git a/eng/Versions.props b/eng/Versions.props index 48e5065641ab..e42756626bf5 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -40,8 +40,8 @@ 3.0.0-preview6-27629-07 3.0.0-preview6-27629-07 - 3.0.0-preview6-27624-71 - 3.0.0-preview6-27624-71 + 3.0.0-preview6-27629-75 + 3.0.0-preview6-27629-75 3.0.0-preview6.19229.9 4.6.0-preview6.19229.9 diff --git a/global.json b/global.json index 13697c8b4afe..40542531a45d 100644 --- a/global.json +++ b/global.json @@ -5,6 +5,6 @@ "msbuild-sdks": { "Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19229.8", "Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19229.8", - "Microsoft.NET.Sdk.IL": "3.0.0-preview6-27624-71" + "Microsoft.NET.Sdk.IL": "3.0.0-preview6-27629-75" } } diff --git a/src/System.IO/tests/StreamWriter/StreamWriter.CtorTests.cs b/src/System.IO/tests/StreamWriter/StreamWriter.CtorTests.cs index 4f8e51da882d..963b6b6c76df 100644 --- a/src/System.IO/tests/StreamWriter/StreamWriter.CtorTests.cs +++ b/src/System.IO/tests/StreamWriter/StreamWriter.CtorTests.cs @@ -31,6 +31,7 @@ public static void CreateStreamWriter() Assert.Equal("HelloWorld", str2); } + [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)] [Fact] public static void NullEncodingThrows() { diff --git a/src/System.Runtime/tests/System/TimeSpanTests.cs b/src/System.Runtime/tests/System/TimeSpanTests.cs index 783c239c50b8..083f88d1f6e1 100644 --- a/src/System.Runtime/tests/System/TimeSpanTests.cs +++ b/src/System.Runtime/tests/System/TimeSpanTests.cs @@ -426,20 +426,40 @@ public static void FromSeconds_Invalid() AssertExtensions.Throws(null, () => TimeSpan.FromSeconds(double.NaN)); // Value is NaN } - public static IEnumerable FromMilliseconds_TestData() + public static IEnumerable FromMilliseconds_TestData_NetCore() { - yield return new object[] { 1500.5, new TimeSpan(0, 0, 0, 1, 501) }; - yield return new object[] { 2.5, new TimeSpan(0, 0, 0, 0, 3) }; - yield return new object[] { 1.0, new TimeSpan(0, 0, 0, 0, 1) }; - yield return new object[] { 0.0, new TimeSpan(0, 0, 0, 0, 0) }; - yield return new object[] { -1.0, new TimeSpan(0, 0, 0, 0, -1) }; - yield return new object[] { -2.5, new TimeSpan(0, 0, 0, 0, -3) }; - yield return new object[] { -1500.5, new TimeSpan(0, 0, 0, -1, -501) }; + yield return new object[] { 1500.5, new TimeSpan(15005000) }; + yield return new object[] { 2.5, new TimeSpan(25000) }; + yield return new object[] { 1.0, new TimeSpan(10000) }; + yield return new object[] { 0.0, new TimeSpan(0) }; + yield return new object[] { -1.0, new TimeSpan(-10000) }; + yield return new object[] { -2.5, new TimeSpan(-25000) }; + yield return new object[] { -1500.5, new TimeSpan(-15005000) }; + } + + [Theory] + [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] + [MemberData(nameof(FromMilliseconds_TestData_NetCore))] + public static void FromMilliseconds_Netcore(double value, TimeSpan expected) + { + Assert.Equal(expected, TimeSpan.FromMilliseconds(value)); + } + + public static IEnumerable FromMilliseconds_TestData_Desktop() + { + yield return new object[] { 1500.5, new TimeSpan(15010000) }; + yield return new object[] { 2.5, new TimeSpan(30000) }; + yield return new object[] { 1.0, new TimeSpan(10000) }; + yield return new object[] { 0.0, new TimeSpan(0) }; + yield return new object[] { -1.0, new TimeSpan(-10000) }; + yield return new object[] { -2.5, new TimeSpan(-30000) }; + yield return new object[] { -1500.5, new TimeSpan(-15010000) }; } [Theory] - [MemberData(nameof(FromMilliseconds_TestData))] - public static void FromMilliseconds(double value, TimeSpan expected) + [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)] + [MemberData(nameof(FromMilliseconds_TestData_Desktop))] + public static void FromMilliseconds_Desktop(double value, TimeSpan expected) { Assert.Equal(expected, TimeSpan.FromMilliseconds(value)); } @@ -447,7 +467,7 @@ public static void FromMilliseconds(double value, TimeSpan expected) [Fact] public static void FromMilliseconds_Invalid() { - double maxMilliseconds = long.MaxValue / TimeSpan.TicksPerMillisecond; + double maxMilliseconds = (double)TimeSpan.MaxValue.Ticks / (double)TimeSpan.TicksPerMillisecond + 1; Assert.Throws(() => TimeSpan.FromMilliseconds(double.PositiveInfinity)); // Value is positive infinity Assert.Throws(() => TimeSpan.FromMilliseconds(double.NegativeInfinity)); // Value is positive infinity diff --git a/src/System.Runtime/tests/System/TimeSpanTests.netcoreapp.cs b/src/System.Runtime/tests/System/TimeSpanTests.netcoreapp.cs index 037dec3af026..13b796980d53 100644 --- a/src/System.Runtime/tests/System/TimeSpanTests.netcoreapp.cs +++ b/src/System.Runtime/tests/System/TimeSpanTests.netcoreapp.cs @@ -16,8 +16,8 @@ public static IEnumerable MultiplicationTestData() yield return new object[] {new TimeSpan(14, 2, 30, 0), 192.0, TimeSpan.FromDays(2708)}; yield return new object[] {TimeSpan.FromDays(366), Math.PI, new TimeSpan(993446995288779)}; yield return new object[] {TimeSpan.FromDays(366), -Math.E, new TimeSpan(-859585952922633)}; - yield return new object[] {TimeSpan.FromDays(29.530587981), 13.0, TimeSpan.FromDays(383.897643819444)}; - yield return new object[] {TimeSpan.FromDays(-29.530587981), -12.0, TimeSpan.FromDays(354.367055833333)}; + yield return new object[] {TimeSpan.FromDays(29.530587981), 13.0, TimeSpan.FromDays(29.530587981 * 13.0) }; + yield return new object[] {TimeSpan.FromDays(-29.530587981), -12.0, TimeSpan.FromDays(-29.530587981 * -12.0) }; yield return new object[] {TimeSpan.FromDays(-29.530587981), 0.0, TimeSpan.Zero}; yield return new object[] {TimeSpan.MaxValue, 0.5, TimeSpan.FromTicks((long)(long.MaxValue * 0.5))}; } @@ -313,5 +313,16 @@ public void TryFormat_InvalidFormat_ThrowsFormatException(string invalidFormat) char[] dst = new char[1]; Assert.Throws(() => new TimeSpan().TryFormat(dst.AsSpan(), out int charsWritten, invalidFormat, null)); } + + [Fact] + public static void ConvertToTimeSpanPrecisionTest() + { + Assert.Equal(12345, TimeSpan.FromMilliseconds(1.23456).Ticks); + Assert.Equal(12345, TimeSpan.FromMilliseconds(1.234567).Ticks); + + Assert.Equal(12345600, TimeSpan.FromSeconds(1.23456).Ticks); + + Assert.Equal(1.23456 * 60 * 10_000_000, TimeSpan.FromMinutes(1.23456).Ticks); + } } } From 7d2af717439d1b60969c712376b842a12c5769cc Mon Sep 17 00:00:00 2001 From: Ahson Khan Date: Tue, 30 Apr 2019 15:09:36 -0700 Subject: [PATCH 117/607] Add TokenStartIndex property to Utf8JsonReader and fix bug in ConsumeNumber (#37167) * Add TokenStartIndex property to Utf8JsonReader with basic tests. * Add more token start index tests and fix bug in ConsumeNumber which was throwing too aggressively. * Update ref to match normalized alpha ordering. * Use TokenStartIndex in more places, i.e. in JsonDocument.TryParseValue * Address PR feedback. * Restructure condition with string first to avoid duplication. --- src/System.Text.Json/ref/System.Text.Json.cs | 1 + .../Text/Json/Document/JsonDocument.Parse.cs | 28 +- .../System/Text/Json/Document/JsonDocument.cs | 52 +- .../Reader/Utf8JsonReader.MultiSegment.cs | 29 +- .../System/Text/Json/Reader/Utf8JsonReader.cs | 55 +- .../tests/Utf8JsonReaderTests.MultiSegment.cs | 303 +++++++++- .../tests/Utf8JsonReaderTests.cs | 544 +++++++++++++++++- 7 files changed, 968 insertions(+), 44 deletions(-) diff --git a/src/System.Text.Json/ref/System.Text.Json.cs b/src/System.Text.Json/ref/System.Text.Json.cs index cf579b34d851..015eb69d41e4 100644 --- a/src/System.Text.Json/ref/System.Text.Json.cs +++ b/src/System.Text.Json/ref/System.Text.Json.cs @@ -174,6 +174,7 @@ public ref partial struct Utf8JsonReader public System.Text.Json.JsonReaderState CurrentState { get { throw null; } } public bool HasValueSequence { get { throw null; } } public System.SequencePosition Position { get { throw null; } } + public long TokenStartIndex { get { throw null; } } public System.Text.Json.JsonTokenType TokenType { get { throw null; } } public System.Buffers.ReadOnlySequence ValueSequence { get { throw null; } } public System.ReadOnlySpan ValueSpan { get { throw null; } } diff --git a/src/System.Text.Json/src/System/Text/Json/Document/JsonDocument.Parse.cs b/src/System.Text.Json/src/System/Text/Json/Document/JsonDocument.Parse.cs index c9135cf833ee..22f740107dc2 100644 --- a/src/System.Text.Json/src/System/Text/Json/Document/JsonDocument.Parse.cs +++ b/src/System.Text.Json/src/System/Text/Json/Document/JsonDocument.Parse.cs @@ -349,10 +349,6 @@ private static bool TryParseValue(ref Utf8JsonReader reader, out JsonDocument do // Value copy to overwrite the ref on an exception and undo the destructive reads. Utf8JsonReader restore = reader; - // Only used for StartArray or StartObject, - // the beginning of the token is one byte earlier. - long startingOffset = state.BytesConsumed; - ReadOnlySpan valueSpan = default; ReadOnlySequence valueSequence = default; @@ -381,9 +377,6 @@ private static bool TryParseValue(ref Utf8JsonReader reader, out JsonDocument do document = null; return false; } - - // Reset the starting position since we moved. - startingOffset = reader.BytesConsumed; break; } } @@ -394,6 +387,8 @@ private static bool TryParseValue(ref Utf8JsonReader reader, out JsonDocument do case JsonTokenType.StartObject: case JsonTokenType.StartArray: { + long startingOffset = reader.TokenStartIndex; + // Placeholder until reader.Skip() is written (#33295) { int depth = reader.CurrentDepth; @@ -421,8 +416,6 @@ private static bool TryParseValue(ref Utf8JsonReader reader, out JsonDocument do } while (reader.CurrentDepth > depth); } - // Back up to be at the beginning of the { or [, vs the end. - startingOffset--; long totalLength = reader.BytesConsumed - startingOffset; ReadOnlySequence sequence = reader.OriginalSequence; @@ -473,18 +466,17 @@ private static bool TryParseValue(ref Utf8JsonReader reader, out JsonDocument do int payloadLength = reader.ValueSpan.Length + 2; Debug.Assert(payloadLength > 1); - int openQuote = checked((int)startingOffset) - payloadLength; ReadOnlySpan readerSpan = reader.OriginalSpan; Debug.Assert( - readerSpan[openQuote] == (byte)'"', - $"Calculated span starts with {readerSpan[openQuote]}"); + readerSpan[(int)reader.TokenStartIndex] == (byte)'"', + $"Calculated span starts with {readerSpan[(int)reader.TokenStartIndex]}"); Debug.Assert( - readerSpan[(int)startingOffset - 1] == (byte)'"', - $"Calculated span ends with {readerSpan[(int)startingOffset - 1]}"); + readerSpan[(int)reader.TokenStartIndex + payloadLength - 1] == (byte)'"', + $"Calculated span ends with {readerSpan[(int)reader.TokenStartIndex + payloadLength - 1]}"); - valueSpan = readerSpan.Slice(openQuote, payloadLength); + valueSpan = readerSpan.Slice((int)reader.TokenStartIndex, payloadLength); } else { @@ -499,10 +491,14 @@ private static bool TryParseValue(ref Utf8JsonReader reader, out JsonDocument do payloadLength += reader.ValueSpan.Length; } - valueSequence = sequence.Slice(startingOffset - payloadLength, payloadLength); + valueSequence = sequence.Slice(reader.TokenStartIndex, payloadLength); Debug.Assert( valueSequence.First.Span[0] == (byte)'"', $"Calculated sequence starts with {valueSequence.First.Span[0]}"); + + Debug.Assert( + valueSequence.ToArray()[payloadLength - 1] == (byte)'"', + $"Calculated sequence ends with {valueSequence.ToArray()[payloadLength - 1]}"); } break; diff --git a/src/System.Text.Json/src/System/Text/Json/Document/JsonDocument.cs b/src/System.Text.Json/src/System/Text/Json/Document/JsonDocument.cs index 65766b86531a..2cdef24444b7 100644 --- a/src/System.Text.Json/src/System/Text/Json/Document/JsonDocument.cs +++ b/src/System.Text.Json/src/System/Text/Json/Document/JsonDocument.cs @@ -903,15 +903,14 @@ private static void Parse( int numberOfRowsForMembers = 0; int numberOfRowsForValues = 0; - ref byte jsonStart = ref MemoryMarshal.GetReference(utf8JsonSpan); - while (reader.Read()) { JsonTokenType tokenType = reader.TokenType; - int tokenStart = Unsafe.ByteOffset( - ref jsonStart, - ref MemoryMarshal.GetReference(reader.ValueSpan)).ToInt32(); + // Since the input payload is contained within a Span, + // token start index can never be larger than int.MaxValue (i.e. utf8JsonSpan.Length). + Debug.Assert(reader.TokenStartIndex <= int.MaxValue); + int tokenStart = (int)reader.TokenStartIndex; if (tokenType == JsonTokenType.StartObject) { @@ -992,7 +991,11 @@ private static void Parse( { numberOfRowsForValues++; numberOfRowsForMembers++; - database.Append(tokenType, tokenStart, reader.ValueSpan.Length); + + // Adding 1 to skip the start quote will never overflow + Debug.Assert(tokenStart < int.MaxValue); + + database.Append(tokenType, tokenStart + 1, reader.ValueSpan.Length); if (reader._stringHasEscaping) { @@ -1006,32 +1009,41 @@ private static void Parse( Debug.Assert(tokenType >= JsonTokenType.String && tokenType <= JsonTokenType.Null); numberOfRowsForValues++; numberOfRowsForMembers++; - database.Append(tokenType, tokenStart, reader.ValueSpan.Length); if (inArray) { arrayItemsCount++; } - if (tokenType == JsonTokenType.Number) + if (tokenType == JsonTokenType.String) { - switch (reader._numberFormat) + // Adding 1 to skip the start quote will never overflow + Debug.Assert(tokenStart < int.MaxValue); + + database.Append(tokenType, tokenStart + 1, reader.ValueSpan.Length); + + if (reader._stringHasEscaping) { - case JsonConstants.ScientificNotationFormat: - database.SetHasComplexChildren(database.Length - DbRow.Size); - break; - default: - Debug.Assert( - reader._numberFormat == default, - $"Unhandled numeric format {reader._numberFormat}"); - break; + database.SetHasComplexChildren(database.Length - DbRow.Size); } } - else if (tokenType == JsonTokenType.String) + else { - if (reader._stringHasEscaping) + database.Append(tokenType, tokenStart, reader.ValueSpan.Length); + + if (tokenType == JsonTokenType.Number) { - database.SetHasComplexChildren(database.Length - DbRow.Size); + switch (reader._numberFormat) + { + case JsonConstants.ScientificNotationFormat: + database.SetHasComplexChildren(database.Length - DbRow.Size); + break; + default: + Debug.Assert( + reader._numberFormat == default, + $"Unhandled numeric format {reader._numberFormat}"); + break; + } } } } diff --git a/src/System.Text.Json/src/System/Text/Json/Reader/Utf8JsonReader.MultiSegment.cs b/src/System.Text.Json/src/System/Text/Json/Reader/Utf8JsonReader.MultiSegment.cs index 70563bb817fe..e0680f803b96 100644 --- a/src/System.Text.Json/src/System/Text/Json/Reader/Utf8JsonReader.MultiSegment.cs +++ b/src/System.Text.Json/src/System/Text/Json/Reader/Utf8JsonReader.MultiSegment.cs @@ -47,6 +47,7 @@ public Utf8JsonReader(in ReadOnlySequence jsonData, bool isFinalBlock, Jso _bitStack = state._bitStack; _consumed = 0; + TokenStartIndex = 0; _totalConsumed = 0; ValueSpan = ReadOnlySpan.Empty; @@ -117,6 +118,8 @@ private bool ReadMultiSegment() first = _buffer[_consumed]; } + TokenStartIndex = BytesConsumed; + if (_tokenType == JsonTokenType.None) { goto ReadFirstToken; @@ -462,6 +465,8 @@ private bool ConsumeValueMultiSegment(byte marker) marker = _buffer[_consumed]; } + TokenStartIndex = BytesConsumed; + // Skip comments and consume the actual JSON value. continue; } @@ -652,10 +657,20 @@ private bool ConsumeNumberMultiSegment() { Debug.Assert(IsLastSpan); - ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.ExpectedEndOfDigitNotFound, _buffer[_consumed - 1]); + // If there is no more data, and the JSON is not a single value, throw. + if (_isNotPrimitive) + { + ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.ExpectedEndOfDigitNotFound, _buffer[_consumed - 1]); + } } - Debug.Assert(JsonConstants.Delimiters.IndexOf(_buffer[_consumed]) >= 0); + // If there is more data and the JSON is not a single value, assert that there is an end of number delimiter. + // Else, if either the JSON is a single value XOR if there is no more data, don't assert anything since there won't always be an end of number delimiter. + Debug.Assert( + ((_consumed < _buffer.Length) && + !_isNotPrimitive && + JsonConstants.Delimiters.IndexOf(_buffer[_consumed]) >= 0) + || (_isNotPrimitive ^ (_consumed >= (uint)_buffer.Length))); return true; } @@ -1626,6 +1641,8 @@ private ConsumeTokenResult ConsumeNextTokenMultiSegment(byte marker) first = _buffer[_consumed]; } + TokenStartIndex = BytesConsumed; + if (_readerOptions.CommentHandling == JsonCommentHandling.Allow && first == JsonConstants.Slash) { _trailingCommaBeforeComment = true; @@ -1719,6 +1736,8 @@ private ConsumeTokenResult ConsumeNextTokenFromLastNonCommentTokenMultiSegment() Debug.Assert(first != JsonConstants.Slash); + TokenStartIndex = BytesConsumed; + if (first == JsonConstants.ListSeparator) { // A comma without some JSON value preceding it is invalid @@ -1763,6 +1782,8 @@ private ConsumeTokenResult ConsumeNextTokenFromLastNonCommentTokenMultiSegment() first = _buffer[_consumed]; } + TokenStartIndex = BytesConsumed; + if (first == JsonConstants.Slash) { _trailingCommaBeforeComment = true; @@ -1986,6 +2007,8 @@ private ConsumeTokenResult ConsumeNextTokenUntilAfterAllCommentsAreSkippedMultiS goto IncompleteNoRollback; } + TokenStartIndex = BytesConsumed; + if (_tokenType == JsonTokenType.StartObject) { if (marker == JsonConstants.CloseBrace) @@ -2088,6 +2111,8 @@ private ConsumeTokenResult ConsumeNextTokenUntilAfterAllCommentsAreSkippedMultiS goto IncompleteRollback; } + TokenStartIndex = BytesConsumed; + if (_inObject) { if (marker != JsonConstants.Quote) diff --git a/src/System.Text.Json/src/System/Text/Json/Reader/Utf8JsonReader.cs b/src/System.Text.Json/src/System/Text/Json/Reader/Utf8JsonReader.cs index c3b2f26eaa58..0a36d7441f04 100644 --- a/src/System.Text.Json/src/System/Text/Json/Reader/Utf8JsonReader.cs +++ b/src/System.Text.Json/src/System/Text/Json/Reader/Utf8JsonReader.cs @@ -71,7 +71,31 @@ public ref partial struct Utf8JsonReader /// Returns the total amount of bytes consumed by the so far /// for the current instance of the with the given UTF-8 encoded input text. /// - public long BytesConsumed => _totalConsumed + _consumed; + public long BytesConsumed + { + get + { +#if DEBUG + if (!_isInputSequence) + { + Debug.Assert(_totalConsumed == 0); + } +#endif + return _totalConsumed + _consumed; + } + } + + /// + /// Returns the index that the last processed JSON token starts at + /// within the given UTF-8 encoded input text, skipping any white space. + /// + /// + /// For JSON strings (including property names), this points to before the start quote. + /// + /// + /// For comments, this points to before the first comment delimiter (i.e. '/'). + /// + public long TokenStartIndex { get; private set; } /// /// Tracks the recursive depth of the nested objects / arrays within the JSON text @@ -200,6 +224,7 @@ public Utf8JsonReader(ReadOnlySpan jsonData, bool isFinalBlock, JsonReader _bitStack = state._bitStack; _consumed = 0; + TokenStartIndex = 0; _totalConsumed = 0; _isLastSegment = _isFinalBlock; _isMultiSegment = false; @@ -615,6 +640,8 @@ private bool ReadSingleSegment() first = _buffer[_consumed]; } + TokenStartIndex = _consumed; + if (_tokenType == JsonTokenType.None) { goto ReadFirstToken; @@ -891,6 +918,8 @@ private bool ConsumeValue(byte marker) marker = _buffer[_consumed]; } + TokenStartIndex = _consumed; + // Skip comments and consume the actual JSON value. continue; } @@ -993,10 +1022,20 @@ private bool ConsumeNumber() { Debug.Assert(IsLastSpan); - ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.ExpectedEndOfDigitNotFound, _buffer[_consumed - 1]); + // If there is no more data, and the JSON is not a single value, throw. + if (_isNotPrimitive) + { + ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.ExpectedEndOfDigitNotFound, _buffer[_consumed - 1]); + } } - Debug.Assert(JsonConstants.Delimiters.IndexOf(_buffer[_consumed]) >= 0); + // If there is more data and the JSON is not a single value, assert that there is an end of number delimiter. + // Else, if either the JSON is a single value XOR if there is no more data, don't assert anything since there won't always be an end of number delimiter. + Debug.Assert( + ((_consumed < _buffer.Length) && + !_isNotPrimitive && + JsonConstants.Delimiters.IndexOf(_buffer[_consumed]) >= 0) + || (_isNotPrimitive ^ (_consumed >= (uint)_buffer.Length))); return true; } @@ -1553,6 +1592,8 @@ private ConsumeTokenResult ConsumeNextToken(byte marker) first = _buffer[_consumed]; } + TokenStartIndex = _consumed; + if (_readerOptions.CommentHandling == JsonCommentHandling.Allow && first == JsonConstants.Slash) { _trailingCommaBeforeComment = true; @@ -1646,6 +1687,8 @@ private ConsumeTokenResult ConsumeNextTokenFromLastNonCommentToken() Debug.Assert(first != JsonConstants.Slash); + TokenStartIndex = _consumed; + if (first == JsonConstants.ListSeparator) { // A comma without some JSON value preceding it is invalid @@ -1681,6 +1724,8 @@ private ConsumeTokenResult ConsumeNextTokenFromLastNonCommentToken() first = _buffer[_consumed]; } + TokenStartIndex = _consumed; + if (first == JsonConstants.Slash) { _trailingCommaBeforeComment = true; @@ -1902,6 +1947,8 @@ private ConsumeTokenResult ConsumeNextTokenUntilAfterAllCommentsAreSkipped(byte goto IncompleteNoRollback; } + TokenStartIndex = _consumed; + if (_tokenType == JsonTokenType.StartObject) { if (marker == JsonConstants.CloseBrace) @@ -1991,6 +2038,8 @@ private ConsumeTokenResult ConsumeNextTokenUntilAfterAllCommentsAreSkipped(byte goto IncompleteRollback; } + TokenStartIndex = _consumed; + if (_inObject) { if (marker != JsonConstants.Quote) diff --git a/src/System.Text.Json/tests/Utf8JsonReaderTests.MultiSegment.cs b/src/System.Text.Json/tests/Utf8JsonReaderTests.MultiSegment.cs index 965c863561c6..c945bdde728b 100644 --- a/src/System.Text.Json/tests/Utf8JsonReaderTests.MultiSegment.cs +++ b/src/System.Text.Json/tests/Utf8JsonReaderTests.MultiSegment.cs @@ -12,6 +12,95 @@ namespace System.Text.Json.Tests { public static partial class Utf8JsonReaderTests { + [Fact] + public static void InitialStateMultiSegment() + { + byte[] utf8 = Encoding.UTF8.GetBytes("1"); + ReadOnlySequence sequence = JsonTestHelper.GetSequence(utf8, 1); + var json = new Utf8JsonReader(sequence, isFinalBlock: true, state: default); + + Assert.Equal(0, json.BytesConsumed); + Assert.Equal(0, json.TokenStartIndex); + Assert.Equal(0, json.CurrentDepth); + Assert.Equal(JsonTokenType.None, json.TokenType); + Assert.NotEqual(default, json.Position); + Assert.False(json.HasValueSequence); + Assert.True(json.ValueSpan.SequenceEqual(default)); + Assert.True(json.ValueSequence.IsEmpty); + + Assert.Equal(0, json.CurrentState.BytesConsumed); + Assert.NotEqual(default, json.CurrentState.Position); + Assert.Equal(64, json.CurrentState.Options.MaxDepth); + Assert.False(json.CurrentState.Options.AllowTrailingCommas); + Assert.Equal(JsonCommentHandling.Disallow, json.CurrentState.Options.CommentHandling); + + Assert.True(json.Read()); + Assert.False(json.Read()); + } + + [Fact] + public static void StateRecoveryMultiSegment() + { + byte[] utf8 = Encoding.UTF8.GetBytes("[1]"); + ReadOnlySequence sequence = JsonTestHelper.GetSequence(utf8, 1); + var json = new Utf8JsonReader(sequence, isFinalBlock: false, state: default); + + Assert.Equal(0, json.BytesConsumed); + Assert.Equal(0, json.TokenStartIndex); + Assert.Equal(0, json.CurrentDepth); + Assert.Equal(JsonTokenType.None, json.TokenType); + Assert.NotEqual(default, json.Position); + Assert.False(json.HasValueSequence); + Assert.True(json.ValueSpan.SequenceEqual(default)); + Assert.True(json.ValueSequence.IsEmpty); + + Assert.Equal(0, json.CurrentState.BytesConsumed); + Assert.NotEqual(default, json.CurrentState.Position); + Assert.Equal(64, json.CurrentState.Options.MaxDepth); + Assert.False(json.CurrentState.Options.AllowTrailingCommas); + Assert.Equal(JsonCommentHandling.Disallow, json.CurrentState.Options.CommentHandling); + + Assert.True(json.Read()); + Assert.True(json.Read()); + + Assert.Equal(2, json.BytesConsumed); + Assert.Equal(1, json.TokenStartIndex); + Assert.Equal(1, json.CurrentDepth); + Assert.Equal(JsonTokenType.Number, json.TokenType); + Assert.NotEqual(default, json.Position); + Assert.True(json.HasValueSequence); + Assert.True(json.ValueSpan.SequenceEqual(default)); + Assert.True(json.ValueSequence.ToArray().AsSpan().SequenceEqual(new byte[] { (byte)'1' })); + + Assert.Equal(2, json.CurrentState.BytesConsumed); + Assert.NotEqual(default, json.CurrentState.Position); + Assert.Equal(64, json.CurrentState.Options.MaxDepth); + Assert.False(json.CurrentState.Options.AllowTrailingCommas); + Assert.Equal(JsonCommentHandling.Disallow, json.CurrentState.Options.CommentHandling); + + JsonReaderState state = json.CurrentState; + + json = new Utf8JsonReader(sequence.Slice(json.Position), isFinalBlock: true, state); + + Assert.Equal(0, json.BytesConsumed); // Not retained + Assert.Equal(0, json.TokenStartIndex); // Not retained + Assert.Equal(1, json.CurrentDepth); + Assert.Equal(JsonTokenType.Number, json.TokenType); + Assert.NotEqual(default, json.Position); + Assert.False(json.HasValueSequence); + Assert.True(json.ValueSpan.SequenceEqual(default)); + Assert.True(json.ValueSequence.IsEmpty); + + Assert.Equal(0, json.CurrentState.BytesConsumed); + Assert.NotEqual(default, json.CurrentState.Position); + Assert.Equal(64, json.CurrentState.Options.MaxDepth); + Assert.False(json.CurrentState.Options.AllowTrailingCommas); + Assert.Equal(JsonCommentHandling.Disallow, json.CurrentState.Options.CommentHandling); + + Assert.True(json.Read()); + Assert.False(json.Read()); + } + // TestCaseType is only used to give the json strings a descriptive name. [Theory] // Skipping large JSON since slicing them (O(n^2)) is too slow. @@ -292,6 +381,8 @@ public static void TestSingleStringsMultiSegment() byte[] resultSequence = JsonTestHelper.ReaderLoop(dataUtf8.Length, out int length, ref utf8JsonReader); string actualStrSequence = Encoding.UTF8.GetString(resultSequence, 0, length); + Assert.Equal(0, utf8JsonReader.TokenStartIndex); + long consumed = utf8JsonReader.BytesConsumed; Assert.Equal(consumed, utf8JsonReader.CurrentState.BytesConsumed); utf8JsonReader = new Utf8JsonReader(sequence.Slice(consumed), isFinalBlock: true, utf8JsonReader.CurrentState); @@ -301,6 +392,8 @@ public static void TestSingleStringsMultiSegment() Assert.Equal(utf8JsonReader.BytesConsumed, utf8JsonReader.CurrentState.BytesConsumed); Assert.True(dataUtf8.Length - consumed == utf8JsonReader.BytesConsumed, message); Assert.Equal(expectedString, actualStrSequence); + + Assert.Equal(0, utf8JsonReader.TokenStartIndex); } } @@ -480,6 +573,7 @@ private static void TestReadingSingleValueJson(byte[] inputData, ReadOnlySequenc { Assert.True(json.ValueSequence.IsEmpty); } + Assert.Equal(2, json.TokenStartIndex); } Assert.Equal(json.BytesConsumed, json.CurrentState.BytesConsumed); @@ -513,7 +607,7 @@ public static void CheckOnlyOneOfValueSpanOrSequenceIsSet(int testCase, string j buffers[4] = dataUtf8.AsSpan(93, 1).ToArray(); buffers[5] = dataUtf8.AsSpan(94, 1).ToArray(); sequence = BufferFactory.Create(buffers); - expectedHasValueSequence = new bool [] {false, true, false, false, true, false, true, false, false, false, false, false }; + expectedHasValueSequence = new bool[] { false, true, false, false, true, false, true, false, false, false, false, false }; break; case 1: Debug.Assert(dataUtf8.Length == 97); @@ -537,7 +631,7 @@ public static void CheckOnlyOneOfValueSpanOrSequenceIsSet(int testCase, string j buffers[3] = dataUtf8.AsSpan(79, 9).ToArray(); buffers[4] = dataUtf8.AsSpan(88, 2).ToArray(); sequence = BufferFactory.Create(buffers); - expectedHasValueSequenceSkip = new bool[] { false, false, false, true, false, false }; + expectedHasValueSequenceSkip = new bool[] { false, false, false, true, false, false }; expectedHasValueSequenceAllow = new bool[] { false, false, false, true, true, true, false, false }; break; default: @@ -858,5 +952,210 @@ private static void TrailingCommasHelper(ReadOnlySequence utf8, JsonReader ; } } + + [Theory] + [MemberData(nameof(SingleJsonTokenStartIndex))] + public static void TestTokenStartIndexMultiSegment_SingleValue(string jsonString, int expectedIndex) + { + byte[] utf8 = Encoding.UTF8.GetBytes(jsonString); + ReadOnlySequence sequence = JsonTestHelper.GetSequence(utf8, 1); + + foreach (JsonCommentHandling commentHandling in Enum.GetValues(typeof(JsonCommentHandling))) + { + var state = new JsonReaderState(options: new JsonReaderOptions { CommentHandling = commentHandling, AllowTrailingCommas = false }); + var reader = new Utf8JsonReader(sequence, isFinalBlock: true, state); + Assert.True(reader.Read()); + Assert.Equal(expectedIndex, reader.TokenStartIndex); + + state = new JsonReaderState(options: new JsonReaderOptions { CommentHandling = commentHandling, AllowTrailingCommas = true }); + reader = new Utf8JsonReader(sequence, isFinalBlock: true, state); + Assert.True(reader.Read()); + Assert.Equal(expectedIndex, reader.TokenStartIndex); + } + } + + [Theory] + [MemberData(nameof(SingleJsonWithCommentsAllowTokenStartIndex))] + public static void TestTokenStartIndexMultiSegment_SingleValueCommentsAllow(string jsonString, int expectedIndex) + { + byte[] utf8 = Encoding.UTF8.GetBytes(jsonString); + ReadOnlySequence sequence = JsonTestHelper.GetSequence(utf8, 1); + + var state = new JsonReaderState(options: new JsonReaderOptions { CommentHandling = JsonCommentHandling.Allow, AllowTrailingCommas = false }); + var reader = new Utf8JsonReader(sequence, isFinalBlock: true, state); + Assert.True(reader.Read()); + Assert.Equal(expectedIndex, reader.TokenStartIndex); + + state = new JsonReaderState(options: new JsonReaderOptions { CommentHandling = JsonCommentHandling.Allow, AllowTrailingCommas = true }); + reader = new Utf8JsonReader(sequence, isFinalBlock: true, state); + Assert.True(reader.Read()); + Assert.Equal(expectedIndex, reader.TokenStartIndex); + } + + [Theory] + [MemberData(nameof(SingleJsonWithCommentsTokenStartIndex))] + public static void TestTokenStartIndexMultiSegment_SingleValueWithComments(string jsonString, int expectedIndex) + { + byte[] utf8 = Encoding.UTF8.GetBytes(jsonString); + ReadOnlySequence sequence = JsonTestHelper.GetSequence(utf8, 1); + + foreach (JsonCommentHandling commentHandling in Enum.GetValues(typeof(JsonCommentHandling))) + { + if (commentHandling == JsonCommentHandling.Disallow) + { + continue; + } + + var state = new JsonReaderState(options: new JsonReaderOptions { CommentHandling = commentHandling, AllowTrailingCommas = false }); + var reader = new Utf8JsonReader(sequence, isFinalBlock: true, state); + Assert.True(reader.Read()); + if (commentHandling == JsonCommentHandling.Allow) + { + Assert.Equal(JsonTokenType.Comment, reader.TokenType); + Assert.True(reader.Read()); + } + Assert.Equal(expectedIndex, reader.TokenStartIndex); + + state = new JsonReaderState(options: new JsonReaderOptions { CommentHandling = commentHandling, AllowTrailingCommas = true }); + reader = new Utf8JsonReader(sequence, isFinalBlock: true, state); + Assert.True(reader.Read()); + if (commentHandling == JsonCommentHandling.Allow) + { + Assert.Equal(JsonTokenType.Comment, reader.TokenType); + Assert.True(reader.Read()); + } + Assert.Equal(expectedIndex, reader.TokenStartIndex); + } + } + + [Theory] + [MemberData(nameof(ComplexArrayJsonTokenStartIndex))] + public static void TestTokenStartIndexMultiSegment_ComplexArrayValue(string jsonString, int expectedIndex) + { + byte[] utf8 = Encoding.UTF8.GetBytes(jsonString); + ReadOnlySequence sequence = JsonTestHelper.GetSequence(utf8, 1); + + foreach (JsonCommentHandling commentHandling in Enum.GetValues(typeof(JsonCommentHandling))) + { + var state = new JsonReaderState(options: new JsonReaderOptions { CommentHandling = commentHandling, AllowTrailingCommas = false }); + var reader = new Utf8JsonReader(sequence, isFinalBlock: true, state); + Assert.True(reader.Read()); + Assert.Equal(JsonTokenType.StartArray, reader.TokenType); + Assert.True(reader.Read()); + Assert.True(reader.Read()); + Assert.Equal(expectedIndex, reader.TokenStartIndex); + + state = new JsonReaderState(options: new JsonReaderOptions { CommentHandling = commentHandling, AllowTrailingCommas = true }); + reader = new Utf8JsonReader(sequence, isFinalBlock: true, state); + Assert.True(reader.Read()); + Assert.Equal(JsonTokenType.StartArray, reader.TokenType); + Assert.True(reader.Read()); + Assert.True(reader.Read()); + Assert.Equal(expectedIndex, reader.TokenStartIndex); + } + } + + [Theory] + [MemberData(nameof(ComplexObjectJsonTokenStartIndex))] + public static void TestTokenStartIndexMultiSegment_ComplexObjectValue(string jsonString, int expectedIndexProperty, int expectedIndexValue) + { + byte[] utf8 = Encoding.UTF8.GetBytes(jsonString); + ReadOnlySequence sequence = JsonTestHelper.GetSequence(utf8, 1); + + foreach (JsonCommentHandling commentHandling in Enum.GetValues(typeof(JsonCommentHandling))) + { + var state = new JsonReaderState(options: new JsonReaderOptions { CommentHandling = commentHandling, AllowTrailingCommas = false }); + var reader = new Utf8JsonReader(sequence, isFinalBlock: true, state); + Assert.True(reader.Read()); + Assert.Equal(JsonTokenType.StartObject, reader.TokenType); + Assert.True(reader.Read()); + Assert.Equal(expectedIndexProperty, reader.TokenStartIndex); + Assert.True(reader.Read()); + Assert.Equal(expectedIndexValue, reader.TokenStartIndex); + + state = new JsonReaderState(options: new JsonReaderOptions { CommentHandling = commentHandling, AllowTrailingCommas = true }); + reader = new Utf8JsonReader(sequence, isFinalBlock: true, state); + Assert.True(reader.Read()); + Assert.Equal(JsonTokenType.StartObject, reader.TokenType); + Assert.True(reader.Read()); + Assert.Equal(expectedIndexProperty, reader.TokenStartIndex); + Assert.True(reader.Read()); + Assert.Equal(expectedIndexValue, reader.TokenStartIndex); + } + } + + [Theory] + [MemberData(nameof(ComplexObjectSeveralJsonTokenStartIndex))] + public static void TestTokenStartIndexMultiSegment_ComplexObjectManyValues(string jsonString, int expectedIndexProperty, int expectedIndexValue) + { + byte[] utf8 = Encoding.UTF8.GetBytes(jsonString); + ReadOnlySequence sequence = JsonTestHelper.GetSequence(utf8, 1); + + foreach (JsonCommentHandling commentHandling in Enum.GetValues(typeof(JsonCommentHandling))) + { + var state = new JsonReaderState(options: new JsonReaderOptions { CommentHandling = commentHandling, AllowTrailingCommas = false }); + var reader = new Utf8JsonReader(sequence, isFinalBlock: true, state); + Assert.True(reader.Read()); + Assert.Equal(JsonTokenType.StartObject, reader.TokenType); + Assert.True(reader.Read()); + Assert.True(reader.Read()); + Assert.True(reader.Read()); + Assert.Equal(expectedIndexProperty, reader.TokenStartIndex); + Assert.True(reader.Read()); + Assert.Equal(expectedIndexValue, reader.TokenStartIndex); + + state = new JsonReaderState(options: new JsonReaderOptions { CommentHandling = commentHandling, AllowTrailingCommas = true }); + reader = new Utf8JsonReader(sequence, isFinalBlock: true, state); + Assert.True(reader.Read()); + Assert.Equal(JsonTokenType.StartObject, reader.TokenType); + Assert.True(reader.Read()); + Assert.True(reader.Read()); + Assert.True(reader.Read()); + Assert.Equal(expectedIndexProperty, reader.TokenStartIndex); + Assert.True(reader.Read()); + Assert.Equal(expectedIndexValue, reader.TokenStartIndex); + } + } + + [Theory] + [MemberData(nameof(JsonWithValidTrailingCommas))] + public static void TestTokenStartIndexMultiSegment_WithTrailingCommas(string jsonString) + { + byte[] utf8 = Encoding.UTF8.GetBytes(jsonString); + ReadOnlySequence sequence = JsonTestHelper.GetSequence(utf8, 1); + + foreach (JsonCommentHandling commentHandling in Enum.GetValues(typeof(JsonCommentHandling))) + { + var state = new JsonReaderState(options: new JsonReaderOptions { CommentHandling = commentHandling, AllowTrailingCommas = true }); + var reader = new Utf8JsonReader(sequence, isFinalBlock: true, state); + while (reader.Read()) + { } + + Assert.Equal(utf8.Length - 1, reader.TokenStartIndex); + } + } + + [Theory] + [MemberData(nameof(JsonWithValidTrailingCommasAndComments))] + public static void TestTokenStartIndexMultiSegment_WithTrailingCommasAndComments(string jsonString) + { + byte[] utf8 = Encoding.UTF8.GetBytes(jsonString); + ReadOnlySequence sequence = JsonTestHelper.GetSequence(utf8, 1); + + foreach (JsonCommentHandling commentHandling in Enum.GetValues(typeof(JsonCommentHandling))) + { + if (commentHandling == JsonCommentHandling.Disallow) + { + continue; + } + + var state = new JsonReaderState(options: new JsonReaderOptions { CommentHandling = commentHandling, AllowTrailingCommas = true }); + var reader = new Utf8JsonReader(sequence, isFinalBlock: true, state); + while (reader.Read()) + { } + + Assert.Equal(utf8.Length - 1, reader.TokenStartIndex); + } + } } } diff --git a/src/System.Text.Json/tests/Utf8JsonReaderTests.cs b/src/System.Text.Json/tests/Utf8JsonReaderTests.cs index f7987db6c458..f8c0dacad1af 100644 --- a/src/System.Text.Json/tests/Utf8JsonReaderTests.cs +++ b/src/System.Text.Json/tests/Utf8JsonReaderTests.cs @@ -20,11 +20,12 @@ public static void DefaultUtf8JsonReader() Utf8JsonReader json = default; Assert.Equal(0, json.BytesConsumed); + Assert.Equal(0, json.TokenStartIndex); Assert.Equal(0, json.CurrentDepth); Assert.Equal(JsonTokenType.None, json.TokenType); Assert.Equal(default, json.Position); - Assert.True(json.ValueSpan.SequenceEqual(default)); Assert.False(json.HasValueSequence); + Assert.True(json.ValueSpan.SequenceEqual(default)); Assert.True(json.ValueSequence.IsEmpty); Assert.Equal(0, json.CurrentState.BytesConsumed); @@ -88,6 +89,92 @@ private static void TestGetMethodsOnDefault() JsonTestHelper.AssertThrows(json, (jsonReader) => jsonReader.GetBoolean()); } + [Fact] + public static void InitialState() + { + var json = new Utf8JsonReader(Encoding.UTF8.GetBytes("1"), isFinalBlock: true, state: default); + + Assert.Equal(0, json.BytesConsumed); + Assert.Equal(0, json.TokenStartIndex); + Assert.Equal(0, json.CurrentDepth); + Assert.Equal(JsonTokenType.None, json.TokenType); + Assert.Equal(default, json.Position); + Assert.False(json.HasValueSequence); + Assert.True(json.ValueSpan.SequenceEqual(default)); + Assert.True(json.ValueSequence.IsEmpty); + + Assert.Equal(0, json.CurrentState.BytesConsumed); + Assert.Equal(default, json.CurrentState.Position); + Assert.Equal(64, json.CurrentState.Options.MaxDepth); + Assert.False(json.CurrentState.Options.AllowTrailingCommas); + Assert.Equal(JsonCommentHandling.Disallow, json.CurrentState.Options.CommentHandling); + + Assert.True(json.Read()); + Assert.False(json.Read()); + } + + [Fact] + public static void StateRecovery() + { + byte[] utf8 = Encoding.UTF8.GetBytes("[1]"); + var json = new Utf8JsonReader(utf8, isFinalBlock: false, state: default); + + Assert.Equal(0, json.BytesConsumed); + Assert.Equal(0, json.TokenStartIndex); + Assert.Equal(0, json.CurrentDepth); + Assert.Equal(JsonTokenType.None, json.TokenType); + Assert.Equal(default, json.Position); + Assert.False(json.HasValueSequence); + Assert.True(json.ValueSpan.SequenceEqual(default)); + Assert.True(json.ValueSequence.IsEmpty); + + Assert.Equal(0, json.CurrentState.BytesConsumed); + Assert.Equal(default, json.CurrentState.Position); + Assert.Equal(64, json.CurrentState.Options.MaxDepth); + Assert.False(json.CurrentState.Options.AllowTrailingCommas); + Assert.Equal(JsonCommentHandling.Disallow, json.CurrentState.Options.CommentHandling); + + Assert.True(json.Read()); + Assert.True(json.Read()); + + Assert.Equal(2, json.BytesConsumed); + Assert.Equal(1, json.TokenStartIndex); + Assert.Equal(1, json.CurrentDepth); + Assert.Equal(JsonTokenType.Number, json.TokenType); + Assert.Equal(default, json.Position); + Assert.False(json.HasValueSequence); + Assert.True(json.ValueSpan.SequenceEqual(new byte[] { (byte)'1'})); + Assert.True(json.ValueSequence.IsEmpty); + + Assert.Equal(2, json.CurrentState.BytesConsumed); + Assert.Equal(default, json.CurrentState.Position); + Assert.Equal(64, json.CurrentState.Options.MaxDepth); + Assert.False(json.CurrentState.Options.AllowTrailingCommas); + Assert.Equal(JsonCommentHandling.Disallow, json.CurrentState.Options.CommentHandling); + + JsonReaderState state = json.CurrentState; + + json = new Utf8JsonReader(utf8.AsSpan((int)json.BytesConsumed), isFinalBlock: true, state); + + Assert.Equal(0, json.BytesConsumed); // Not retained + Assert.Equal(0, json.TokenStartIndex); // Not retained + Assert.Equal(1, json.CurrentDepth); + Assert.Equal(JsonTokenType.Number, json.TokenType); + Assert.Equal(default, json.Position); + Assert.False(json.HasValueSequence); + Assert.True(json.ValueSpan.SequenceEqual(default)); + Assert.True(json.ValueSequence.IsEmpty); + + Assert.Equal(0, json.CurrentState.BytesConsumed); + Assert.Equal(default, json.CurrentState.Position); + Assert.Equal(64, json.CurrentState.Options.MaxDepth); + Assert.False(json.CurrentState.Options.AllowTrailingCommas); + Assert.Equal(JsonCommentHandling.Disallow, json.CurrentState.Options.CommentHandling); + + Assert.True(json.Read()); + Assert.False(json.Read()); + } + // TestCaseType is only used to give the json strings a descriptive name. [Theory] [MemberData(nameof(TestCases))] @@ -286,6 +373,7 @@ public static void TestSingleStrings() long consumed = json.BytesConsumed; Assert.Equal(consumed, json.CurrentState.BytesConsumed); Assert.Equal(default, json.Position); + Assert.Equal(0, json.TokenStartIndex); for (long j = consumed; j < dataUtf8.Length - consumed; j++) { @@ -313,6 +401,7 @@ public static void TestSingleStrings() Assert.Equal(json.BytesConsumed, json.CurrentState.BytesConsumed); Assert.Equal(default, json.Position); Assert.Equal(default, json.CurrentState.Position); + Assert.Equal(0, json.TokenStartIndex); Assert.Equal(outputSpan.Length, written); string actualStr = Encoding.UTF8.GetString(outputArray); @@ -847,6 +936,7 @@ public static void SingleJsonValue(string jsonString, string expectedString) // Check if the TokenType is a primitive "value", i.e. String, Number, True, False, and Null Assert.True(json.TokenType >= JsonTokenType.String && json.TokenType <= JsonTokenType.Null); Assert.Equal(expectedString, Encoding.UTF8.GetString(json.ValueSpan.ToArray())); + Assert.Equal(2, json.TokenStartIndex); } long consumed = json.BytesConsumed; @@ -858,6 +948,10 @@ public static void SingleJsonValue(string jsonString, string expectedString) // Check if the TokenType is a primitive "value", i.e. String, Number, True, False, and Null Assert.True(json.TokenType >= JsonTokenType.String && json.TokenType <= JsonTokenType.Null); Assert.Equal(expectedString, Encoding.UTF8.GetString(json.ValueSpan.ToArray())); + if (consumed <= 2) + { + Assert.Equal(2 - consumed, json.TokenStartIndex); + } } Assert.Equal(dataUtf8.Length - consumed, json.BytesConsumed); Assert.Equal(json.BytesConsumed, json.CurrentState.BytesConsumed); @@ -1856,6 +1950,7 @@ public static void SkipLotsOfComments(string valueString, bool insideArray, stri { Assert.True(json.Read()); Assert.True(json.TokenType == JsonTokenType.StartArray); + Assert.Equal(0, json.TokenStartIndex); } if (json.Read()) @@ -1891,12 +1986,14 @@ public static void SkipLotsOfComments(string valueString, bool insideArray, stri Assert.Equal(expectedString, boolValue.ToString(CultureInfo.InvariantCulture)); break; } + Assert.Equal(insideArray ? 1688894 : 1688894 - 1, json.TokenStartIndex); } if (insideArray) { Assert.True(json.Read()); Assert.True(json.TokenType == JsonTokenType.EndArray); + Assert.Equal(dataUtf8.Length - 1, json.TokenStartIndex); } Assert.False(json.Read()); @@ -1973,9 +2070,19 @@ public static void ConsumeLotsOfComments(string valueString, bool insideArray, s foundPrimitiveValue = true; break; } + if (isTokenPrimitive) + { + Assert.Equal(insideArray ? 1688894 : 1688894 - 1, json.TokenStartIndex); + } } Assert.True(foundPrimitiveValue); Assert.Equal(dataUtf8.Length, json.BytesConsumed); + + if (insideArray) + { + Assert.True(json.TokenType == JsonTokenType.EndArray); + Assert.Equal(dataUtf8.Length - 1, json.TokenStartIndex); + } } private static void VerifyReadLoop(ref Utf8JsonReader json, string expected) @@ -2348,6 +2455,203 @@ private static void PartialReaderLoop(byte[] utf8, JsonReaderState state, int sp ; } + [Theory] + [MemberData(nameof(SingleJsonTokenStartIndex))] + public static void TestTokenStartIndex_SingleValue(string jsonString, int expectedIndex) + { + byte[] utf8 = Encoding.UTF8.GetBytes(jsonString); + + foreach (JsonCommentHandling commentHandling in Enum.GetValues(typeof(JsonCommentHandling))) + { + var state = new JsonReaderState(options: new JsonReaderOptions { CommentHandling = commentHandling, AllowTrailingCommas = false }); + var reader = new Utf8JsonReader(utf8, isFinalBlock: true, state); + Assert.True(reader.Read()); + Assert.Equal(expectedIndex, reader.TokenStartIndex); + + state = new JsonReaderState(options: new JsonReaderOptions { CommentHandling = commentHandling, AllowTrailingCommas = true }); + reader = new Utf8JsonReader(utf8, isFinalBlock: true, state); + Assert.True(reader.Read()); + Assert.Equal(expectedIndex, reader.TokenStartIndex); + } + } + + [Theory] + [MemberData(nameof(SingleJsonWithCommentsAllowTokenStartIndex))] + public static void TestTokenStartIndex_SingleValueCommentsAllow(string jsonString, int expectedIndex) + { + byte[] utf8 = Encoding.UTF8.GetBytes(jsonString); + + var state = new JsonReaderState(options: new JsonReaderOptions { CommentHandling = JsonCommentHandling.Allow, AllowTrailingCommas = false }); + var reader = new Utf8JsonReader(utf8, isFinalBlock: true, state); + Assert.True(reader.Read()); + Assert.Equal(expectedIndex, reader.TokenStartIndex); + + state = new JsonReaderState(options: new JsonReaderOptions { CommentHandling = JsonCommentHandling.Allow, AllowTrailingCommas = true }); + reader = new Utf8JsonReader(utf8, isFinalBlock: true, state); + Assert.True(reader.Read()); + Assert.Equal(expectedIndex, reader.TokenStartIndex); + } + + [Theory] + [MemberData(nameof(SingleJsonWithCommentsTokenStartIndex))] + public static void TestTokenStartIndex_SingleValueWithComments(string jsonString, int expectedIndex) + { + byte[] utf8 = Encoding.UTF8.GetBytes(jsonString); + + foreach (JsonCommentHandling commentHandling in Enum.GetValues(typeof(JsonCommentHandling))) + { + if (commentHandling == JsonCommentHandling.Disallow) + { + continue; + } + + var state = new JsonReaderState(options: new JsonReaderOptions { CommentHandling = commentHandling, AllowTrailingCommas = false }); + var reader = new Utf8JsonReader(utf8, isFinalBlock: true, state); + Assert.True(reader.Read()); + if (commentHandling == JsonCommentHandling.Allow) + { + Assert.Equal(JsonTokenType.Comment, reader.TokenType); + Assert.True(reader.Read()); + } + Assert.Equal(expectedIndex, reader.TokenStartIndex); + + state = new JsonReaderState(options: new JsonReaderOptions { CommentHandling = commentHandling, AllowTrailingCommas = true }); + reader = new Utf8JsonReader(utf8, isFinalBlock: true, state); + Assert.True(reader.Read()); + if (commentHandling == JsonCommentHandling.Allow) + { + Assert.Equal(JsonTokenType.Comment, reader.TokenType); + Assert.True(reader.Read()); + } + Assert.Equal(expectedIndex, reader.TokenStartIndex); + } + } + + [Theory] + [MemberData(nameof(ComplexArrayJsonTokenStartIndex))] + public static void TestTokenStartIndex_ComplexArrayValue(string jsonString, int expectedIndex) + { + byte[] utf8 = Encoding.UTF8.GetBytes(jsonString); + + foreach (JsonCommentHandling commentHandling in Enum.GetValues(typeof(JsonCommentHandling))) + { + var state = new JsonReaderState(options: new JsonReaderOptions { CommentHandling = commentHandling, AllowTrailingCommas = false }); + var reader = new Utf8JsonReader(utf8, isFinalBlock: true, state); + Assert.True(reader.Read()); + Assert.Equal(JsonTokenType.StartArray, reader.TokenType); + Assert.True(reader.Read()); + Assert.True(reader.Read()); + Assert.Equal(expectedIndex, reader.TokenStartIndex); + + state = new JsonReaderState(options: new JsonReaderOptions { CommentHandling = commentHandling, AllowTrailingCommas = true }); + reader = new Utf8JsonReader(utf8, isFinalBlock: true, state); + Assert.True(reader.Read()); + Assert.Equal(JsonTokenType.StartArray, reader.TokenType); + Assert.True(reader.Read()); + Assert.True(reader.Read()); + Assert.Equal(expectedIndex, reader.TokenStartIndex); + } + } + + [Theory] + [MemberData(nameof(ComplexObjectJsonTokenStartIndex))] + public static void TestTokenStartIndex_ComplexObjectValue(string jsonString, int expectedIndexProperty, int expectedIndexValue) + { + byte[] utf8 = Encoding.UTF8.GetBytes(jsonString); + + foreach (JsonCommentHandling commentHandling in Enum.GetValues(typeof(JsonCommentHandling))) + { + var state = new JsonReaderState(options: new JsonReaderOptions { CommentHandling = commentHandling, AllowTrailingCommas = false }); + var reader = new Utf8JsonReader(utf8, isFinalBlock: true, state); + Assert.True(reader.Read()); + Assert.Equal(JsonTokenType.StartObject, reader.TokenType); + Assert.True(reader.Read()); + Assert.Equal(expectedIndexProperty, reader.TokenStartIndex); + Assert.True(reader.Read()); + Assert.Equal(expectedIndexValue, reader.TokenStartIndex); + + state = new JsonReaderState(options: new JsonReaderOptions { CommentHandling = commentHandling, AllowTrailingCommas = true }); + reader = new Utf8JsonReader(utf8, isFinalBlock: true, state); + Assert.True(reader.Read()); + Assert.Equal(JsonTokenType.StartObject, reader.TokenType); + Assert.True(reader.Read()); + Assert.Equal(expectedIndexProperty, reader.TokenStartIndex); + Assert.True(reader.Read()); + Assert.Equal(expectedIndexValue, reader.TokenStartIndex); + } + } + + [Theory] + [MemberData(nameof(ComplexObjectSeveralJsonTokenStartIndex))] + public static void TestTokenStartIndex_ComplexObjectManyValues(string jsonString, int expectedIndexProperty, int expectedIndexValue) + { + byte[] utf8 = Encoding.UTF8.GetBytes(jsonString); + + foreach (JsonCommentHandling commentHandling in Enum.GetValues(typeof(JsonCommentHandling))) + { + var state = new JsonReaderState(options: new JsonReaderOptions { CommentHandling = commentHandling, AllowTrailingCommas = false }); + var reader = new Utf8JsonReader(utf8, isFinalBlock: true, state); + Assert.True(reader.Read()); + Assert.Equal(JsonTokenType.StartObject, reader.TokenType); + Assert.True(reader.Read()); + Assert.True(reader.Read()); + Assert.True(reader.Read()); + Assert.Equal(expectedIndexProperty, reader.TokenStartIndex); + Assert.True(reader.Read()); + Assert.Equal(expectedIndexValue, reader.TokenStartIndex); + + state = new JsonReaderState(options: new JsonReaderOptions { CommentHandling = commentHandling, AllowTrailingCommas = true }); + reader = new Utf8JsonReader(utf8, isFinalBlock: true, state); + Assert.True(reader.Read()); + Assert.Equal(JsonTokenType.StartObject, reader.TokenType); + Assert.True(reader.Read()); + Assert.True(reader.Read()); + Assert.True(reader.Read()); + Assert.Equal(expectedIndexProperty, reader.TokenStartIndex); + Assert.True(reader.Read()); + Assert.Equal(expectedIndexValue, reader.TokenStartIndex); + } + } + + [Theory] + [MemberData(nameof(JsonWithValidTrailingCommas))] + public static void TestTokenStartIndex_WithTrailingCommas(string jsonString) + { + byte[] utf8 = Encoding.UTF8.GetBytes(jsonString); + + foreach (JsonCommentHandling commentHandling in Enum.GetValues(typeof(JsonCommentHandling))) + { + var state = new JsonReaderState(options: new JsonReaderOptions { CommentHandling = commentHandling, AllowTrailingCommas = true }); + var reader = new Utf8JsonReader(utf8, isFinalBlock: true, state); + while (reader.Read()) + { } + + Assert.Equal(utf8.Length - 1, reader.TokenStartIndex); + } + } + + [Theory] + [MemberData(nameof(JsonWithValidTrailingCommasAndComments))] + public static void TestTokenStartIndex_WithTrailingCommasAndComments(string jsonString) + { + byte[] utf8 = Encoding.UTF8.GetBytes(jsonString); + + foreach (JsonCommentHandling commentHandling in Enum.GetValues(typeof(JsonCommentHandling))) + { + if (commentHandling == JsonCommentHandling.Disallow) + { + continue; + } + + var state = new JsonReaderState(options: new JsonReaderOptions { CommentHandling = commentHandling, AllowTrailingCommas = true }); + var reader = new Utf8JsonReader(utf8, isFinalBlock: true, state); + while (reader.Read()) + { } + + Assert.Equal(utf8.Length - 1, reader.TokenStartIndex); + } + } + public static IEnumerable TestCases { get @@ -2683,6 +2987,244 @@ public static IEnumerable JsonWithInvalidTrailingCommasAndComments } } + public static IEnumerable SingleJsonTokenStartIndex + { + get + { + return new List + { + new object[] {"[]", 0}, + new object[] {"{}", 0}, + new object[] {"12345", 0}, + new object[] {"1", 0}, + new object[] {"true", 0}, + new object[] {"false", 0}, + new object[] {"null", 0}, + new object[] {"\"hello\"", 0}, + new object[] {"\"\"", 0}, + + new object[] {" []", 2}, + new object[] {" {}", 2}, + new object[] {" 12345", 2}, + new object[] {" 1", 2}, + new object[] {" true", 2}, + new object[] {" false", 2}, + new object[] {" null", 2}, + new object[] {" \"hello\"", 2}, + new object[] {" \"\"", 2}, + + new object[] {" [] ", 2}, + new object[] {" {} ", 2}, + new object[] {" 12345 ", 2}, + new object[] {" 1 ", 2}, + new object[] {" true ", 2}, + new object[] {" false ", 2}, + new object[] {" null ", 2}, + new object[] {" \"hello\" ", 2}, + new object[] {" \"\" ", 2}, + }; + } + } + + public static IEnumerable SingleJsonWithCommentsAllowTokenStartIndex + { + get + { + return new List + { + new object[] {"/*comment*/", 0}, + new object[] {"//comment\n", 0}, + new object[] {"/*comment*//*comment*/", 0}, + new object[] {"/*comment*///comment\n", 0}, + new object[] {"//comment\n/*comment*/", 0}, + new object[] {"//comment\n//comment\n", 0}, + + new object[] {" /*comment*/", 2}, + new object[] {" //comment\n", 2}, + new object[] {" /*comment*//*comment*/", 2}, + new object[] {" /*comment*///comment\n", 2}, + new object[] {" //comment\n/*comment*/", 2}, + new object[] {" //comment\n//comment\n", 2}, + + new object[] {" /*comment*/ ", 2}, + new object[] {" //comment\n ", 2}, + new object[] {" /*comment*//*comment*/ ", 2}, + new object[] {" /*comment*///comment\n ", 2}, + new object[] {" //comment\n/*comment*/ ", 2}, + new object[] {" //comment\n//comment\n ", 2}, + }; + } + } + + public static IEnumerable SingleJsonWithCommentsTokenStartIndex + { + get + { + return new List + { + new object[] {"/*comment*/[]", 11}, + new object[] {"/*comment*/{}", 11}, + new object[] {"/*comment*/12345", 11}, + new object[] {"/*comment*/12345 ", 11}, + new object[] {"/*comment*/12345/*comment*/", 11}, + new object[] {"/*comment*/12345 /*comment*/", 11}, + new object[] {"/*comment*/12345 /*comment*/ ", 11}, + new object[] {"/*comment*/1", 11}, + new object[] {"/*comment*/true", 11}, + new object[] {"/*comment*/false", 11}, + new object[] {"/*comment*/null", 11}, + new object[] {"/*comment*/\"hello\"", 11}, + new object[] {"/*comment*/\"\"", 11}, + + new object[] {" /*comment*/ []", 15}, + new object[] {" /*comment*/ {}", 15}, + new object[] {" /*comment*/ 12345", 15}, + new object[] { " /*comment*/ 12345 ", 15}, + new object[] { " /*comment*/ 12345/*comment*/", 15}, + new object[] { " /*comment*/ 12345 /*comment*/", 15}, + new object[] { " /*comment*/ 12345 /*comment*/ ", 15}, + new object[] {" /*comment*/ 1", 15}, + new object[] {" /*comment*/ true", 15}, + new object[] {" /*comment*/ false", 15}, + new object[] {" /*comment*/ null", 15}, + new object[] {" /*comment*/ \"hello\"", 15}, + new object[] {" /*comment*/ \"\"", 15}, + }; + } + } + + public static IEnumerable ComplexArrayJsonTokenStartIndex + { + get + { + return new List + { + new object[] {"[1,2]", 3}, + new object[] {"[1, 2]", 5}, + new object[] {"[1 ,2]", 5}, + new object[] {"[1 , 2]", 7}, + new object[] {"[1 , 2 ]", 7}, + + new object[] {"[1,\"string\"]", 3}, + new object[] {"[1, \"string\"]", 5}, + new object[] {"[1 ,\"string\"]", 5}, + new object[] {"[1 , \"string\"]", 7}, + new object[] {"[1 , \"string\" ]", 7}, + + new object[] {"[{}]", 2}, + new object[] {"[[]]", 2}, + new object[] {"[123,{}]", 5}, + new object[] {"[123,[]]", 5}, + new object[] {"[ {}]", 4}, + new object[] {"[ []]", 4}, + new object[] {"[123, {}]", 7}, + new object[] {"[123, []]", 7}, + }; + } + } + + public static IEnumerable ComplexObjectJsonTokenStartIndex + { + get + { + return new List + { + new object[] {"{\"propertyName\":\"value\"}", 1, 16}, + new object[] {"{ \"propertyName\":\"value\"}", 3, 18}, + new object[] {"{\"propertyName\" :\"value\"}", 1, 18}, + new object[] {"{\"propertyName\": \"value\"}", 1, 18}, + new object[] {"{\"propertyName\":\"value\" }", 1, 16}, + new object[] {" {\"propertyName\":\"value\"}", 3, 18}, + new object[] {"{\"propertyName\":\"value\"} ", 1, 16}, + + new object[] {"{ \"propertyName\" :\"value\"}", 3, 20}, + new object[] {"{ \"propertyName\": \"value\"}", 3, 20}, + new object[] {"{ \"propertyName\":\"value\" }", 3, 18}, + new object[] {" { \"propertyName\":\"value\"}", 5, 20}, + new object[] {"{ \"propertyName\":\"value\"} ", 3, 18}, + + new object[] {"{\"propertyName\" : \"value\"}", 1, 20}, + new object[] {"{\"propertyName\": \"value\" }", 1, 18}, + new object[] {" {\"propertyName\": \"value\"}", 3, 20}, + new object[] {"{\"propertyName\": \"value\"} ", 1, 18}, + + new object[] {"{\"propertyName\" :\"value\" }", 1, 18}, + new object[] {" {\"propertyName\" :\"value\"}", 3, 20}, + new object[] {"{\"propertyName\" :\"value\"} ", 1, 18}, + + new object[] {" {\"propertyName\":\"value\" }", 3, 18}, + new object[] {"{\"propertyName\":\"value\" } ", 1, 16}, + + new object[] {"{\"propertyName\":123}", 1, 16}, + new object[] {"{ \"propertyName\":123}", 3, 18}, + new object[] {"{\"propertyName\" :123}", 1, 18}, + new object[] {"{\"propertyName\": 123}", 1, 18}, + new object[] {"{\"propertyName\":123 }", 1, 16}, + new object[] {" {\"propertyName\":123}", 3, 18}, + new object[] {"{\"propertyName\":123} ", 1, 16}, + + new object[] {"{ \"propertyName\" :123}", 3, 20}, + new object[] {"{ \"propertyName\": 123}", 3, 20}, + new object[] {"{ \"propertyName\":123 }", 3, 18}, + new object[] {" { \"propertyName\":123}", 5, 20}, + new object[] {"{ \"propertyName\":123} ", 3, 18}, + + new object[] {"{\"propertyName\" : 123}", 1, 20}, + new object[] {"{\"propertyName\": 123 }", 1, 18}, + new object[] {" {\"propertyName\": 123}", 3, 20}, + new object[] {"{\"propertyName\": 123} ", 1, 18}, + + new object[] {"{\"propertyName\" :123 }", 1, 18}, + new object[] {" {\"propertyName\" :123}", 3, 20}, + new object[] {"{\"propertyName\" :123} ", 1, 18}, + + new object[] {" {\"propertyName\":123 }", 3, 18}, + new object[] {"{\"propertyName\":123 } ", 1, 16}, + + new object[] {"{\"propertyName\":[]}", 1, 16}, + new object[] {"{ \"propertyName\":[]}", 3, 18}, + new object[] {"{\"propertyName\" :[]}", 1, 18}, + new object[] {"{\"propertyName\": []}", 1, 18}, + new object[] {"{\"propertyName\":[] }", 1, 16}, + new object[] {" {\"propertyName\":[]}", 3, 18}, + new object[] {"{\"propertyName\":[]} ", 1, 16}, + + new object[] {"{\"propertyName\":{}}", 1, 16}, + new object[] {"{ \"propertyName\":{}}", 3, 18}, + new object[] {"{\"propertyName\" :{}}", 1, 18}, + new object[] {"{\"propertyName\": {}}", 1, 18}, + new object[] {"{\"propertyName\":{} }", 1, 16}, + new object[] {" {\"propertyName\":{}}", 3, 18}, + new object[] {"{\"propertyName\":{}} ", 1, 16}, + }; + } + } + + public static IEnumerable ComplexObjectSeveralJsonTokenStartIndex + { + get + { + return new List + { + new object[] {"{\"\":\"\", \"propertyName\":[]}", 8, 23}, + new object[] {"{\"\":\"\", \"propertyName\":[]}", 10, 25}, + new object[] {"{\"\":\"\", \"propertyName\" :[]}", 8, 25}, + new object[] {"{\"\":\"\", \"propertyName\": []}", 8, 25}, + new object[] {"{\"\":\"\", \"propertyName\":[] }", 8, 23}, + new object[] {" {\"\":\"\", \"propertyName\":[]}", 10, 25}, + new object[] {"{\"\":\"\", \"propertyName\":[]} ", 8, 23}, + + new object[] {"{\"\":\"\", \"propertyName\":{}}", 8, 23}, + new object[] {"{\"\":\"\", \"propertyName\":{}}", 10, 25}, + new object[] {"{\"\":\"\", \"propertyName\" :{}}", 8, 25}, + new object[] {"{\"\":\"\", \"propertyName\": {}}", 8, 25}, + new object[] {"{\"\":\"\", \"propertyName\":{} }", 8, 23}, + new object[] {"{ \"\":\"\", \"propertyName\":{}}", 10, 25}, + new object[] {"{\"\":\"\", \"propertyName\":{}} ", 8, 23}, + }; + } + } + public static IEnumerable InvalidJsonStrings { get From b1448c5e4e744e1b24852fbd972b5208cb69157e Mon Sep 17 00:00:00 2001 From: Steve MacLean Date: Tue, 30 Apr 2019 18:45:21 -0400 Subject: [PATCH 118/607] Enable test for dotnet/coreclr#24191 (#37311) Enable SatelliteAssembly tests relying on dotnet/coreclr#24191 --- .../tests/SatelliteAssemblies.cs | 71 ++++++------------- 1 file changed, 21 insertions(+), 50 deletions(-) diff --git a/src/System.Runtime.Loader/tests/SatelliteAssemblies.cs b/src/System.Runtime.Loader/tests/SatelliteAssemblies.cs index 65b673fa6e85..28c05f7379fe 100644 --- a/src/System.Runtime.Loader/tests/SatelliteAssemblies.cs +++ b/src/System.Runtime.Loader/tests/SatelliteAssemblies.cs @@ -88,6 +88,20 @@ public static string Describe(string lang) [InlineData("Default", "System.Runtime.Loader.Tests.SatelliteAssembliesTests", "es-MX", "Spanish (Mexico) language Main description 1.0.0")] [InlineData("Default", "System.Runtime.Loader.Tests.SatelliteAssembliesTests", "fr", "Neutral language Main description 1.0.0")] [InlineData("Default", "System.Runtime.Loader.Tests.SatelliteAssembliesTests", "fr-FR", "Neutral language Main description 1.0.0")] + [InlineData("SatelliteAssembliesTests", "System.Runtime.Loader.Tests.SatelliteAssembliesTests", "", "Neutral language Main description 1.0.0")] + [InlineData("SatelliteAssembliesTests", "System.Runtime.Loader.Tests.SatelliteAssembliesTests", "en", "English language Main description 1.0.0")] + [InlineData("SatelliteAssembliesTests", "System.Runtime.Loader.Tests.SatelliteAssembliesTests", "en-US", "English language Main description 1.0.0")] + [InlineData("SatelliteAssembliesTests", "System.Runtime.Loader.Tests.SatelliteAssembliesTests", "es", "Neutral language Main description 1.0.0")] + [InlineData("SatelliteAssembliesTests", "System.Runtime.Loader.Tests.SatelliteAssembliesTests", "es-MX", "Spanish (Mexico) language Main description 1.0.0")] + [InlineData("SatelliteAssembliesTests", "System.Runtime.Loader.Tests.SatelliteAssembliesTests", "fr", "Neutral language Main description 1.0.0")] + [InlineData("SatelliteAssembliesTests", "System.Runtime.Loader.Tests.SatelliteAssembliesTests", "fr-FR", "Neutral language Main description 1.0.0")] + [InlineData("LoadFile", "System.Runtime.Loader.Tests.SatelliteAssembliesTests", "", "Neutral language Main description 1.0.0")] + [InlineData("LoadFile", "System.Runtime.Loader.Tests.SatelliteAssembliesTests", "en", "English language Main description 1.0.0")] + [InlineData("LoadFile", "System.Runtime.Loader.Tests.SatelliteAssembliesTests", "en-US", "English language Main description 1.0.0")] + [InlineData("LoadFile", "System.Runtime.Loader.Tests.SatelliteAssembliesTests", "es", "Neutral language Main description 1.0.0")] + [InlineData("LoadFile", "System.Runtime.Loader.Tests.SatelliteAssembliesTests", "es-MX", "Spanish (Mexico) language Main description 1.0.0")] + [InlineData("LoadFile", "System.Runtime.Loader.Tests.SatelliteAssembliesTests", "fr", "Neutral language Main description 1.0.0")] + [InlineData("LoadFile", "System.Runtime.Loader.Tests.SatelliteAssembliesTests", "fr-FR", "Neutral language Main description 1.0.0")] public void describeLib(string alc, string type, string culture, string expected) { string result = "Oops"; @@ -120,35 +134,6 @@ public void describeLib(string alc, string type, string culture, string expected [InlineData("Default", "ReferencedClassLibNeutralIsSatellite.Program, ReferencedClassLibNeutralIsSatellite", "en", "English language ReferencedClassLibNeutralIsSatellite description 1.0.0")] [InlineData("Default", "ReferencedClassLibNeutralIsSatellite.Program, ReferencedClassLibNeutralIsSatellite", "en-US", "English language ReferencedClassLibNeutralIsSatellite description 1.0.0")] [InlineData("Default", "ReferencedClassLibNeutralIsSatellite.Program, ReferencedClassLibNeutralIsSatellite", "es", "Neutral (es) language ReferencedClassLibNeutralIsSatellite description 1.0.0")] - public void describeLib37246(string alc, string type, string culture, string expected) - { - describeLib(alc, type, culture, expected); - } - - [Theory] - [ActiveIssue("dotnet/coreclr#24191")] - [InlineData("SatelliteAssembliesTests", "System.Runtime.Loader.Tests.SatelliteAssembliesTests", "", "Neutral language Main description 1.0.0")] - [InlineData("SatelliteAssembliesTests", "System.Runtime.Loader.Tests.SatelliteAssembliesTests", "en", "English language Main description 1.0.0")] - [InlineData("SatelliteAssembliesTests", "System.Runtime.Loader.Tests.SatelliteAssembliesTests", "en-US", "English language Main description 1.0.0")] - [InlineData("SatelliteAssembliesTests", "System.Runtime.Loader.Tests.SatelliteAssembliesTests", "es", "Neutral language Main description 1.0.0")] - [InlineData("SatelliteAssembliesTests", "System.Runtime.Loader.Tests.SatelliteAssembliesTests", "es-MX", "Spanish (Mexico) language Main description 1.0.0")] - [InlineData("SatelliteAssembliesTests", "System.Runtime.Loader.Tests.SatelliteAssembliesTests", "fr", "Neutral language Main description 1.0.0")] - [InlineData("SatelliteAssembliesTests", "System.Runtime.Loader.Tests.SatelliteAssembliesTests", "fr-FR", "Neutral language Main description 1.0.0")] - [InlineData("LoadFile", "System.Runtime.Loader.Tests.SatelliteAssembliesTests", "", "Neutral language Main description 1.0.0")] - [InlineData("LoadFile", "System.Runtime.Loader.Tests.SatelliteAssembliesTests", "en", "English language Main description 1.0.0")] - [InlineData("LoadFile", "System.Runtime.Loader.Tests.SatelliteAssembliesTests", "en-US", "English language Main description 1.0.0")] - [InlineData("LoadFile", "System.Runtime.Loader.Tests.SatelliteAssembliesTests", "es", "Neutral language Main description 1.0.0")] - [InlineData("LoadFile", "System.Runtime.Loader.Tests.SatelliteAssembliesTests", "es-MX", "Spanish (Mexico) language Main description 1.0.0")] - [InlineData("LoadFile", "System.Runtime.Loader.Tests.SatelliteAssembliesTests", "fr", "Neutral language Main description 1.0.0")] - [InlineData("LoadFile", "System.Runtime.Loader.Tests.SatelliteAssembliesTests", "fr-FR", "Neutral language Main description 1.0.0")] - public void describeLib24191(string alc, string type, string culture, string expected) - { - describeLib(alc, type, culture, expected); - } - - [Theory] - [ActiveIssue("dotnet/corefx#37246")] - [ActiveIssue("dotnet/coreclr#24191")] [InlineData("ReferencedClassLib", "ReferencedClassLib.Program, ReferencedClassLib", "", "Neutral language ReferencedClassLib description 1.0.0")] [InlineData("ReferencedClassLib", "ReferencedClassLib.Program, ReferencedClassLib", "en", "English language ReferencedClassLib description 1.0.0")] [InlineData("ReferencedClassLib", "ReferencedClassLib.Program, ReferencedClassLib", "en-US", "English language ReferencedClassLib description 1.0.0")] @@ -157,10 +142,11 @@ public void describeLib24191(string alc, string type, string culture, string exp [InlineData("ReferencedClassLibNeutralIsSatellite", "ReferencedClassLibNeutralIsSatellite.Program, ReferencedClassLibNeutralIsSatellite", "en", "English language ReferencedClassLibNeutralIsSatellite description 1.0.0")] [InlineData("ReferencedClassLibNeutralIsSatellite", "ReferencedClassLibNeutralIsSatellite.Program, ReferencedClassLibNeutralIsSatellite", "en-US", "English language ReferencedClassLibNeutralIsSatellite description 1.0.0")] [InlineData("ReferencedClassLibNeutralIsSatellite", "ReferencedClassLibNeutralIsSatellite.Program, ReferencedClassLibNeutralIsSatellite", "es", "Neutral (es) language ReferencedClassLibNeutralIsSatellite description 1.0.0")] - public void describeLib37246_24191(string alc, string type, string culture, string expected) + public void describeLib37246(string alc, string type, string culture, string expected) { describeLib(alc, type, culture, expected); } + #endregion [Theory] @@ -172,6 +158,10 @@ public void describeLib37246_24191(string alc, string type, string culture, stri [InlineData("ReferencedClassLib", "System.Runtime.Loader.Tests", "es-MX")] [InlineData("ReferencedClassLibNeutralIsSatellite", "System.Runtime.Loader.Tests", "en")] [InlineData("ReferencedClassLibNeutralIsSatellite", "System.Runtime.Loader.Tests", "es-MX")] + [InlineData("SatelliteAssembliesTests", "System.Runtime.Loader.Tests", "en")] + [InlineData("SatelliteAssembliesTests", "System.Runtime.Loader.Tests", "es-MX")] + [InlineData("LoadFile", "System.Runtime.Loader.Tests", "en")] + [InlineData("LoadFile", "System.Runtime.Loader.Tests", "es-MX")] public void SatelliteLoadsCorrectly(string alc, string assemblyName, string culture) { AssemblyName satelliteAssemblyName = new AssemblyName(assemblyName + ".resources"); @@ -189,17 +179,6 @@ public void SatelliteLoadsCorrectly(string alc, string assemblyName, string cult Assert.Equal(AssemblyLoadContext.GetLoadContext(parentAssembly), AssemblyLoadContext.GetLoadContext(satelliteAssembly)); } - [Theory] - [ActiveIssue("dotnet/coreclr#24191")] - [InlineData("SatelliteAssembliesTests", "System.Runtime.Loader.Tests", "en")] - [InlineData("SatelliteAssembliesTests", "System.Runtime.Loader.Tests", "es-MX")] - [InlineData("LoadFile", "System.Runtime.Loader.Tests", "en")] - [InlineData("LoadFile", "System.Runtime.Loader.Tests", "es-MX")] - public void SatelliteLoadsCorrectly24191(string alc, string assemblyName, string culture) - { - SatelliteLoadsCorrectly(alc, assemblyName, culture); - } - [Theory] [ActiveIssue("dotnet/corefx#37246")] [InlineData("Default", "ReferencedClassLib", "en")] @@ -214,18 +193,10 @@ public void SatelliteLoadsCorrectly24191(string alc, string assemblyName, string [InlineData("ReferencedClassLibNeutralIsSatellite", "ReferencedClassLib", "en")] [InlineData("ReferencedClassLib", "ReferencedClassLibNeutralIsSatellite", "en")] [InlineData("ReferencedClassLib", "ReferencedClassLibNeutralIsSatellite", "es")] - public void SatelliteLoadsCorrectly37246(string alc, string assemblyName, string culture) - { - SatelliteLoadsCorrectly(alc, assemblyName, culture); - } - - [Theory] - [ActiveIssue("dotnet/corefx#37246")] - [ActiveIssue("dotnet/coreclr#24191")] [InlineData("ReferencedClassLib", "ReferencedClassLib", "en")] [InlineData("ReferencedClassLibNeutralIsSatellite", "ReferencedClassLibNeutralIsSatellite", "en")] [InlineData("ReferencedClassLibNeutralIsSatellite", "ReferencedClassLibNeutralIsSatellite", "es")] - public void SatelliteLoadsCorrectly37246_24191(string alc, string assemblyName, string culture) + public void SatelliteLoadsCorrectly37246(string alc, string assemblyName, string culture) { SatelliteLoadsCorrectly(alc, assemblyName, culture); } From 97fb23198aadfb48f27ac39e96358d4990b1700d Mon Sep 17 00:00:00 2001 From: Levi Broderick Date: Tue, 30 Apr 2019 17:02:33 -0700 Subject: [PATCH 119/607] Additional unit test cases for UTF-8 validation (#37162) --- .../Text/Unicode/Utf8UtilityTests.ValidateBytes.netcoreapp.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/System.Runtime/tests/System/Text/Unicode/Utf8UtilityTests.ValidateBytes.netcoreapp.cs b/src/System.Runtime/tests/System/Text/Unicode/Utf8UtilityTests.ValidateBytes.netcoreapp.cs index 899faa86ce3d..3f1517f71588 100644 --- a/src/System.Runtime/tests/System/Text/Unicode/Utf8UtilityTests.ValidateBytes.netcoreapp.cs +++ b/src/System.Runtime/tests/System/Text/Unicode/Utf8UtilityTests.ValidateBytes.netcoreapp.cs @@ -118,6 +118,7 @@ public void GetIndexOfFirstInvalidUtf8Sequence_WithLargeValidBuffers(string inpu [InlineData("3031" + "E1C080" + EURO_SYMBOL + EURO_SYMBOL, 2, 2, 0)] // Improperly terminated 3-byte sequence at start of DWORD [InlineData("3031" + "EDA080" + EURO_SYMBOL + EURO_SYMBOL, 2, 2, 0)] // Surrogate 3-byte sequence at start of DWORD [InlineData("3031" + "E69C88" + "E59B" + "E69C88", 5, 3, 0)] // Incomplete 3-byte sequence surrounded by valid 3-byte sequences + [InlineData("E78B80" + "80", 3, 1, 0)] // Valid 3-byte sequence followed by standalone continuation byte [InlineData("3031" + "F5808080", 2, 2, 0)] // [ F5 ] is always invalid [InlineData("3031" + "F6808080", 2, 2, 0)] // [ F6 ] is always invalid [InlineData("3031" + "F7808080", 2, 2, 0)] // [ F7 ] is always invalid From 9e4e45d6af3facb06726e659e612a943c11f4d26 Mon Sep 17 00:00:00 2001 From: Tanner Gooding Date: Tue, 30 Apr 2019 17:53:08 -0700 Subject: [PATCH 120/607] Removing the System.Numerics.Vectors pkgproj (#37301) --- .../binplacePackages/binplacePackages.depproj | 4 ++ .../harvestPackages/harvestPackages.props | 3 -- .../packageIndex.json | 1 - pkg/baseline/packageBaseline.1.1.json | 2 +- pkg/descriptions.json | 15 ------ .../pkg/System.Numerics.Vectors.pkgproj | 22 -------- .../ref/Configurations.props | 10 +--- .../ref/System.Numerics.Vectors.csproj | 19 ++----- .../src/Configurations.props | 13 ++--- .../src/System.Numerics.Vectors.csproj | 53 ++----------------- .../tests/Configurations.props | 3 +- .../System.Numerics.Vectors.Tests.csproj | 11 ++-- 12 files changed, 23 insertions(+), 133 deletions(-) delete mode 100644 src/System.Numerics.Vectors/pkg/System.Numerics.Vectors.pkgproj diff --git a/external/binplacePackages/binplacePackages.depproj b/external/binplacePackages/binplacePackages.depproj index 0f6da524ca17..8977622f9ec8 100644 --- a/external/binplacePackages/binplacePackages.depproj +++ b/external/binplacePackages/binplacePackages.depproj @@ -32,6 +32,10 @@ 4.5.1 + + 4.5.0 + + 4.5.1 diff --git a/external/harvestPackages/harvestPackages.props b/external/harvestPackages/harvestPackages.props index 4b088b2258d0..5c0caeb5478b 100644 --- a/external/harvestPackages/harvestPackages.props +++ b/external/harvestPackages/harvestPackages.props @@ -109,9 +109,6 @@ 0.1.0 - - 4.5.0 - 4.3.0 diff --git a/pkg/Microsoft.Private.PackageBaseline/packageIndex.json b/pkg/Microsoft.Private.PackageBaseline/packageIndex.json index 86b2a3bb1579..cb66cb63d64c 100644 --- a/pkg/Microsoft.Private.PackageBaseline/packageIndex.json +++ b/pkg/Microsoft.Private.PackageBaseline/packageIndex.json @@ -3149,7 +3149,6 @@ "4.1.2.0": "4.3.0", "4.1.3.0": "4.4.0", "4.1.4.0": "4.5.0", - "4.1.5.0": "4.6.0" } }, "System.Numerics.Vectors.WindowsRuntime": { diff --git a/pkg/baseline/packageBaseline.1.1.json b/pkg/baseline/packageBaseline.1.1.json index deadd99eaa2e..c1b6c58d7aa1 100644 --- a/pkg/baseline/packageBaseline.1.1.json +++ b/pkg/baseline/packageBaseline.1.1.json @@ -446,4 +446,4 @@ } }, "ModulesToPackages": {} -} \ No newline at end of file +} diff --git a/pkg/descriptions.json b/pkg/descriptions.json index f20d51d24cc4..82e2bda1a892 100644 --- a/pkg/descriptions.json +++ b/pkg/descriptions.json @@ -1245,21 +1245,6 @@ "System.Numerics.Tensors.SparseTensor" ] }, - { - "Name": "System.Numerics.Vectors", - "Description": "Provides hardware-accelerated numeric types, suitable for high-performance processing and graphics applications.", - "CommonTypes": [ - "System.Numerics.Matrix3x2", - "System.Numerics.Matrix4x4", - "System.Numerics.Plane", - "System.Numerics.Quaternion", - "System.Numerics.Vector2", - "System.Numerics.Vector3", - "System.Numerics.Vector4", - "System.Numerics.Vector", - "System.Numerics.Vector" - ] - }, { "Name": "System.Numerics.Vectors.WindowsRuntime", "Description": "Provides extension methods for converting between System.Numerics.Vector2 and Windows.Foundation.Point and Size.", diff --git a/src/System.Numerics.Vectors/pkg/System.Numerics.Vectors.pkgproj b/src/System.Numerics.Vectors/pkg/System.Numerics.Vectors.pkgproj deleted file mode 100644 index c757d86685a8..000000000000 --- a/src/System.Numerics.Vectors/pkg/System.Numerics.Vectors.pkgproj +++ /dev/null @@ -1,22 +0,0 @@ - - - - - 2.8.6 - - - - netcore45;wp8;wpa81;netcoreapp1.0;$(AllXamarinFrameworks) - - - net45 - - - - - - - - - - \ No newline at end of file diff --git a/src/System.Numerics.Vectors/ref/Configurations.props b/src/System.Numerics.Vectors/ref/Configurations.props index c9b6c52ff517..2b2323d47917 100644 --- a/src/System.Numerics.Vectors/ref/Configurations.props +++ b/src/System.Numerics.Vectors/ref/Configurations.props @@ -1,16 +1,8 @@  - - netstandard1.0; - net45; - netstandard; - net46; - netcoreapp; uap; - netfx; - $(PackageConfigurations); - \ No newline at end of file + diff --git a/src/System.Numerics.Vectors/ref/System.Numerics.Vectors.csproj b/src/System.Numerics.Vectors/ref/System.Numerics.Vectors.csproj index 94f4e7d0524f..de3feb440e53 100644 --- a/src/System.Numerics.Vectors/ref/System.Numerics.Vectors.csproj +++ b/src/System.Numerics.Vectors/ref/System.Numerics.Vectors.csproj @@ -1,24 +1,13 @@ {650277B5-9423-4ACE-BB54-2659995B21C7} - true - $(DefineConstants);HAS_SPAN - - 4.1.3.0 - net45-Debug;net45-Release;net46-Debug;net46-Release;netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release;netstandard-Debug;netstandard-Release;netstandard1.0-Debug;netstandard1.0-Release;uap-Debug;uap-Release + $(DefineConstants);HAS_SPAN + netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release - - - - - - - - + - \ No newline at end of file + diff --git a/src/System.Numerics.Vectors/src/Configurations.props b/src/System.Numerics.Vectors/src/Configurations.props index 6a0c1d593ec7..dc04b5e626d2 100644 --- a/src/System.Numerics.Vectors/src/Configurations.props +++ b/src/System.Numerics.Vectors/src/Configurations.props @@ -1,17 +1,10 @@  - - netstandard1.0; - netstandard; - net46; - - uapaot-Windows_NT; - uap-Windows_NT; - netfx-Windows_NT; - netcoreapp-Windows_NT; netcoreapp-Unix; - $(PackageConfigurations) + netcoreapp-Windows_NT; + uap-Windows_NT; + uapaot-Windows_NT; diff --git a/src/System.Numerics.Vectors/src/System.Numerics.Vectors.csproj b/src/System.Numerics.Vectors/src/System.Numerics.Vectors.csproj index b35c637c1985..66e40f18733e 100644 --- a/src/System.Numerics.Vectors/src/System.Numerics.Vectors.csproj +++ b/src/System.Numerics.Vectors/src/System.Numerics.Vectors.csproj @@ -3,12 +3,10 @@ {53134B0C-0D57-481B-B84E-D1991E8D54FF} System.Numerics true - true - true + true true $(DefineConstants);HAS_INTRINSICS - netstandard1.0;portable-net45+win8+wp8+wpa81 - net46-Debug;net46-Release;netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netfx-Windows_NT-Debug;netfx-Windows_NT-Release;netstandard-Debug;netstandard-Release;netstandard1.0-Debug;netstandard1.0-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release;uapaot-Windows_NT-Debug;uapaot-Windows_NT-Release + netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release;uapaot-Windows_NT-Debug;uapaot-Windows_NT-Release @@ -19,38 +17,8 @@ System\Runtime\CompilerServices\IntrinsicAttribute.cs - - - - True - True - ConstantHelper.tt - System\Numerics\ConstantHelper.cs - - - True - True - Register.tt - System\Numerics\Register.cs - - - True - True - Vector.tt - System\Numerics\Vector.cs - - - System\Numerics\Vector_Operations.cs - - - - - - System\MathF.netstandard.cs - - - + @@ -65,10 +33,6 @@ - - - - System\Numerics\GenerationConfig.ttinclude @@ -89,17 +53,10 @@ System\Numerics\Vector.tt - + - - - - - - - - \ No newline at end of file + diff --git a/src/System.Numerics.Vectors/tests/Configurations.props b/src/System.Numerics.Vectors/tests/Configurations.props index bf959c103133..2b2323d47917 100644 --- a/src/System.Numerics.Vectors/tests/Configurations.props +++ b/src/System.Numerics.Vectors/tests/Configurations.props @@ -2,8 +2,7 @@ netcoreapp; - netstandard; uap; - \ No newline at end of file + diff --git a/src/System.Numerics.Vectors/tests/System.Numerics.Vectors.Tests.csproj b/src/System.Numerics.Vectors/tests/System.Numerics.Vectors.Tests.csproj index 1a4fbf4435fb..c323e8f0cc98 100644 --- a/src/System.Numerics.Vectors/tests/System.Numerics.Vectors.Tests.csproj +++ b/src/System.Numerics.Vectors/tests/System.Numerics.Vectors.Tests.csproj @@ -2,7 +2,7 @@ {99E1E564-0EF4-4E33-BECE-8ABE64771349} true - netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release;uap-Debug;uap-Release + netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release true @@ -25,11 +25,8 @@ - - System\MathF.netstandard.cs - - + True True @@ -50,10 +47,10 @@ GenericVectorTests.cs - + TextTemplatingFileGenerator GenericVectorTests.netcoreapp.cs - \ No newline at end of file + From a8dacfb2d4fd38aafce49adc8de30f31e08bd598 Mon Sep 17 00:00:00 2001 From: Levi Broderick Date: Tue, 30 Apr 2019 18:51:57 -0700 Subject: [PATCH 121/607] Add more UTF-16 validation tests (#37252) --- ...16UtilityTests.ValidateChars.netcoreapp.cs | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/src/System.Runtime/tests/System/Text/Unicode/Utf16UtilityTests.ValidateChars.netcoreapp.cs b/src/System.Runtime/tests/System/Text/Unicode/Utf16UtilityTests.ValidateChars.netcoreapp.cs index 510a22cc829c..7e5281e45288 100644 --- a/src/System.Runtime/tests/System/Text/Unicode/Utf16UtilityTests.ValidateChars.netcoreapp.cs +++ b/src/System.Runtime/tests/System/Text/Unicode/Utf16UtilityTests.ValidateChars.netcoreapp.cs @@ -5,6 +5,7 @@ using System.Buffers; using System.Globalization; using System.Linq; +using System.Numerics; using System.Reflection; using System.Runtime.InteropServices; using Xunit; @@ -117,6 +118,28 @@ public void GetIndexOfFirstInvalidUtf16Sequence_WithInvalidSurrogateSequences() GetIndexOfFirstInvalidUtf16Sequence_Test_Core(chars, 15, expectedRuneCount: 13, expectedUtf8ByteCount: 20); } + [Fact] + public void GetIndexOfFirstInvalidUtf16Sequence_WithStandaloneLowSurrogateCharAtStart() + { + // The input stream will be a vector's worth of ASCII chars, followed by a single standalone low + // surrogate char, then padded with U+0000 until it's a multiple of the vector size. + // Using Vector.Count here as a stand-in for Vector.Count. + + char[] chars = new char[Vector.Count * 2]; + for (int i = 0; i < Vector.Count; i++) + { + chars[i] = 'x'; // ASCII char + } + + chars[Vector.Count] = '\uDEAD'; // standalone low surrogate char + + for (int i = 0; i <= Vector.Count; i++) + { + // Expect all ASCII chars to be consumed, low surrogate char to be marked invalid. + GetIndexOfFirstInvalidUtf16Sequence_Test_Core(chars[(Vector.Count - i)..], i, i, i); + } + } + private static void GetIndexOfFirstInvalidUtf16Sequence_Test_Core(string unprocessedInput, int expectedIdxOfFirstInvalidChar, int expectedRuneCount, long expectedUtf8ByteCount) { char[] processedInput = ProcessInput(unprocessedInput).ToCharArray(); From ce0afb0736f85e64bc4b7c4681a3cdc169c9ab89 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Wed, 1 May 2019 02:00:26 +0000 Subject: [PATCH 122/607] Update dependencies from https://github.com/dotnet/coreclr build 20190430.77 (#37312) - Microsoft.NET.Sdk.IL - 3.0.0-preview6-27630-77 - Microsoft.NETCore.ILAsm - 3.0.0-preview6-27630-77 - Microsoft.NETCore.Runtime.CoreCLR - 3.0.0-preview6-27630-77 --- eng/Version.Details.xml | 12 ++++++------ eng/Versions.props | 4 ++-- global.json | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 1460100927a6..6ede6d6c7e98 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -1,16 +1,16 @@ - + https://github.com/dotnet/coreclr - 54af92b34fc18ee9d8adada35d1f527c67224be7 + 94b7f1d2e46c03d269a763c8c996810933c24890 - + https://github.com/dotnet/coreclr - 54af92b34fc18ee9d8adada35d1f527c67224be7 + 94b7f1d2e46c03d269a763c8c996810933c24890 - + https://github.com/dotnet/coreclr - 54af92b34fc18ee9d8adada35d1f527c67224be7 + 94b7f1d2e46c03d269a763c8c996810933c24890 diff --git a/eng/Versions.props b/eng/Versions.props index e42756626bf5..264ce7303b8b 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -40,8 +40,8 @@ 3.0.0-preview6-27629-07 3.0.0-preview6-27629-07 - 3.0.0-preview6-27629-75 - 3.0.0-preview6-27629-75 + 3.0.0-preview6-27630-77 + 3.0.0-preview6-27630-77 3.0.0-preview6.19229.9 4.6.0-preview6.19229.9 diff --git a/global.json b/global.json index 40542531a45d..5ea855bfb1f4 100644 --- a/global.json +++ b/global.json @@ -5,6 +5,6 @@ "msbuild-sdks": { "Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19229.8", "Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19229.8", - "Microsoft.NET.Sdk.IL": "3.0.0-preview6-27629-75" + "Microsoft.NET.Sdk.IL": "3.0.0-preview6-27630-77" } } From 0409c03ac353f93e7598d0ebd19017f43b944efb Mon Sep 17 00:00:00 2001 From: Tomas Weinfurt Date: Tue, 30 Apr 2019 19:03:23 -0700 Subject: [PATCH 123/607] disable ParallelQueryCombinationTests on ARM systems with high core count (#37319) --- .../tests/Combinatorial/ParallelQueryCombinationTests.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/System.Linq.Parallel/tests/Combinatorial/ParallelQueryCombinationTests.cs b/src/System.Linq.Parallel/tests/Combinatorial/ParallelQueryCombinationTests.cs index bfe23520a457..c26c9282d4ae 100644 --- a/src/System.Linq.Parallel/tests/Combinatorial/ParallelQueryCombinationTests.cs +++ b/src/System.Linq.Parallel/tests/Combinatorial/ParallelQueryCombinationTests.cs @@ -2,13 +2,18 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System; using System.Collections.Generic; using Xunit; namespace System.Linq.Parallel.Tests { + [ConditionalClass(typeof(ParallelQueryCombinationTests), nameof(RunSlowTests))] public static partial class ParallelQueryCombinationTests { + // on ARM platforms many available cores makes this unbearably slow: #36494 + static public bool RunSlowTests => PlatformDetection.IsNotArmNorArm64Process || Environment.ProcessorCount <= 8; + [Theory] [MemberData(nameof(UnaryOperations))] [MemberData(nameof(BinaryOperations))] From ebba368b0f5e37cf12a22774b90cb54600ce6760 Mon Sep 17 00:00:00 2001 From: Stephen Toub Date: Tue, 30 Apr 2019 22:04:13 -0400 Subject: [PATCH 124/607] Fix order of "static public" in test file --- .../tests/Combinatorial/ParallelQueryCombinationTests.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/System.Linq.Parallel/tests/Combinatorial/ParallelQueryCombinationTests.cs b/src/System.Linq.Parallel/tests/Combinatorial/ParallelQueryCombinationTests.cs index c26c9282d4ae..1dc6a06e769a 100644 --- a/src/System.Linq.Parallel/tests/Combinatorial/ParallelQueryCombinationTests.cs +++ b/src/System.Linq.Parallel/tests/Combinatorial/ParallelQueryCombinationTests.cs @@ -12,7 +12,7 @@ namespace System.Linq.Parallel.Tests public static partial class ParallelQueryCombinationTests { // on ARM platforms many available cores makes this unbearably slow: #36494 - static public bool RunSlowTests => PlatformDetection.IsNotArmNorArm64Process || Environment.ProcessorCount <= 8; + public static bool RunSlowTests => PlatformDetection.IsNotArmNorArm64Process || Environment.ProcessorCount <= 8; [Theory] [MemberData(nameof(UnaryOperations))] From 54d111bfb4842940514566c2e3fffe06a9c392ab Mon Sep 17 00:00:00 2001 From: Egor Bogatov Date: Tue, 30 Apr 2019 05:21:04 +0300 Subject: [PATCH 125/607] Move DefaultBinder.CanConvert.cs to shared (dotnet/coreclr#23931) Signed-off-by: dotnet-bot --- .../src/CoreLib/System/DefaultBinder.cs | 62 ++++++++++++++++++- 1 file changed, 59 insertions(+), 3 deletions(-) diff --git a/src/Common/src/CoreLib/System/DefaultBinder.cs b/src/Common/src/CoreLib/System/DefaultBinder.cs index f8d8c0c1685a..dca388dfc87b 100644 --- a/src/Common/src/CoreLib/System/DefaultBinder.cs +++ b/src/Common/src/CoreLib/System/DefaultBinder.cs @@ -217,7 +217,7 @@ public sealed override MethodBase BindToMethod( // now do a "classic" type check if (pCls.IsPrimitive) { - if (argTypes[paramOrder[i][j]] == null || !CanChangePrimitiveObjectToType(args[paramOrder[i][j]], pCls)) + if (argTypes[paramOrder[i][j]] == null || !CanChangePrimitive(args[paramOrder[i][j]].GetType(), pCls)) { break; } @@ -247,7 +247,7 @@ public sealed override MethodBase BindToMethod( { if (paramArrayType.IsPrimitive) { - if (argTypes[j] == null || !CanChangePrimitiveObjectToType(args[j], paramArrayType)) + if (argTypes[j] == null || !CanChangePrimitive(args[j]?.GetType(), paramArrayType)) break; } else @@ -475,7 +475,7 @@ public sealed override FieldInfo BindToField(BindingFlags bindingAttr, FieldInfo } if (pCls.IsPrimitive) { - if (CanChangePrimitiveObjectToType(value, pCls)) + if (CanChangePrimitive(valueType, pCls)) { candidates[CurIdx++] = candidates[i]; continue; @@ -1204,6 +1204,62 @@ private static bool CreateParamOrder(int[] paramOrder, ParameterInfo[] pars, str return true; } + // CanChangePrimitive + // This will determine if the source can be converted to the target type + internal static bool CanChangePrimitive(Type source, Type target) + { + if ((source == typeof(IntPtr) && target == typeof(IntPtr)) || + (source == typeof(UIntPtr) && target == typeof(UIntPtr))) + return true; + + Primitives widerCodes = s_primitiveConversions[(int)(Type.GetTypeCode(source))]; + Primitives targetCode = (Primitives)(1 << (int)(Type.GetTypeCode(target))); + + return (widerCodes & targetCode) != 0; + } + + private static readonly Primitives[] s_primitiveConversions = { + /* Empty */ 0, // not primitive + /* Object */ 0, // not primitive + /* DBNull */ 0, // not primitive + /* Boolean */ Primitives.Boolean, + /* Char */ Primitives.Char | Primitives.UInt16 | Primitives.UInt32 | Primitives.Int32 | Primitives.UInt64 | Primitives.Int64 | Primitives.Single | Primitives.Double, + /* SByte */ Primitives.SByte | Primitives.Int16 | Primitives.Int32 | Primitives.Int64 | Primitives.Single | Primitives.Double, + /* Byte */ Primitives.Byte | Primitives.Char | Primitives.UInt16 | Primitives.Int16 | Primitives.UInt32 | Primitives.Int32 | Primitives.UInt64 | Primitives.Int64 | Primitives.Single | Primitives.Double, + /* Int16 */ Primitives.Int16 | Primitives.Int32 | Primitives.Int64 | Primitives.Single | Primitives.Double, + /* UInt16 */ Primitives.UInt16 | Primitives.UInt32 | Primitives.Int32 | Primitives.UInt64 | Primitives.Int64 | Primitives.Single | Primitives.Double, + /* Int32 */ Primitives.Int32 | Primitives.Int64 | Primitives.Single | Primitives.Double, + /* UInt32 */ Primitives.UInt32 | Primitives.UInt64 | Primitives.Int64 | Primitives.Single | Primitives.Double, + /* Int64 */ Primitives.Int64 | Primitives.Single | Primitives.Double, + /* UInt64 */ Primitives.UInt64 | Primitives.Single | Primitives.Double, + /* Single */ Primitives.Single | Primitives.Double, + /* Double */ Primitives.Double, + /* Decimal */ Primitives.Decimal, + /* DateTime */ Primitives.DateTime, + /* [Unused] */ 0, + /* String */ Primitives.String, + }; + + [Flags] + private enum Primitives + { + Boolean = 1 << TypeCode.Boolean, + Char = 1 << TypeCode.Char, + SByte = 1 << TypeCode.SByte, + Byte = 1 << TypeCode.Byte, + Int16 = 1 << TypeCode.Int16, + UInt16 = 1 << TypeCode.UInt16, + Int32 = 1 << TypeCode.Int32, + UInt32 = 1 << TypeCode.UInt32, + Int64 = 1 << TypeCode.Int64, + UInt64 = 1 << TypeCode.UInt64, + Single = 1 << TypeCode.Single, + Double = 1 << TypeCode.Double, + Decimal = 1 << TypeCode.Decimal, + DateTime = 1 << TypeCode.DateTime, + String = 1 << TypeCode.String, + } + internal class BinderState { internal readonly int[] _argsMap; From 6b88ea8488ff543a251761065eddd73e27345a40 Mon Sep 17 00:00:00 2001 From: Levi Broderick Date: Mon, 29 Apr 2019 21:37:58 -0700 Subject: [PATCH 126/607] Add more span-based Vector ctors and CopyTo methods (#23333) Signed-off-by: dotnet-bot --- .../src/CoreLib/System/Numerics/Vector.cs | 193 ++++++++++-------- .../src/CoreLib/System/Numerics/Vector.tt | 155 +++++++++----- src/Common/src/CoreLib/System/ThrowHelper.cs | 3 + 3 files changed, 217 insertions(+), 134 deletions(-) diff --git a/src/Common/src/CoreLib/System/Numerics/Vector.cs b/src/Common/src/CoreLib/System/Numerics/Vector.cs index 3f7832a3a0cc..7d8937d201ab 100644 --- a/src/Common/src/CoreLib/System/Numerics/Vector.cs +++ b/src/Common/src/CoreLib/System/Numerics/Vector.cs @@ -59,10 +59,10 @@ public static int Count [Intrinsic] get { - return s_count; + ThrowHelper.ThrowForUnsupportedVectorBaseType(); + return Unsafe.SizeOf>() / Unsafe.SizeOf(); } } - private static readonly int s_count = InitializeCount(); /// /// Returns a vector containing all zeroes. @@ -101,71 +101,6 @@ internal static Vector AllOnes private static readonly Vector s_allOnes = new Vector(GetAllBitsSetValue()); #endregion Static Members - #region Static Initialization - private struct VectorSizeHelper - { - internal Vector _placeholder; - internal byte _byte; - } - - // Calculates the size of this struct in bytes, by computing the offset of a field in a structure - private static unsafe int InitializeCount() - { - VectorSizeHelper vsh; - byte* vectorBase = &vsh._placeholder.register.byte_0; - byte* byteBase = &vsh._byte; - int vectorSizeInBytes = (int)(byteBase - vectorBase); - - int typeSizeInBytes = -1; - if (typeof(T) == typeof(byte)) - { - typeSizeInBytes = sizeof(byte); - } - else if (typeof(T) == typeof(sbyte)) - { - typeSizeInBytes = sizeof(sbyte); - } - else if (typeof(T) == typeof(ushort)) - { - typeSizeInBytes = sizeof(ushort); - } - else if (typeof(T) == typeof(short)) - { - typeSizeInBytes = sizeof(short); - } - else if (typeof(T) == typeof(uint)) - { - typeSizeInBytes = sizeof(uint); - } - else if (typeof(T) == typeof(int)) - { - typeSizeInBytes = sizeof(int); - } - else if (typeof(T) == typeof(ulong)) - { - typeSizeInBytes = sizeof(ulong); - } - else if (typeof(T) == typeof(long)) - { - typeSizeInBytes = sizeof(long); - } - else if (typeof(T) == typeof(float)) - { - typeSizeInBytes = sizeof(float); - } - else if (typeof(T) == typeof(double)) - { - typeSizeInBytes = sizeof(double); - } - else - { - throw new NotSupportedException(SR.Arg_TypeNotSupported); - } - - return vectorSizeInBytes / typeSizeInBytes; - } - #endregion Static Initialization - #region Constructors /// /// Constructs a vector whose components are all value @@ -779,37 +714,81 @@ private Vector(ref Register existingRegister) #if netcoreapp /// - /// Constructs a vector from the given span. The span must contain at least Vector'T.Count elements. + /// Constructs a vector from the given . The span must contain at least elements. /// - public Vector(Span values) + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public Vector(ReadOnlySpan values) : this() { - if ((typeof(T) == typeof(byte)) - || (typeof(T) == typeof(sbyte)) - || (typeof(T) == typeof(ushort)) - || (typeof(T) == typeof(short)) - || (typeof(T) == typeof(uint)) - || (typeof(T) == typeof(int)) - || (typeof(T) == typeof(ulong)) - || (typeof(T) == typeof(long)) - || (typeof(T) == typeof(float)) - || (typeof(T) == typeof(double))) + ThrowHelper.ThrowForUnsupportedVectorBaseType(); + if (values.Length < Vector.Count) { - if (values.Length < Count) - { - throw new IndexOutOfRangeException(SR.Format(SR.Arg_InsufficientNumberOfElements, Vector.Count, nameof(values))); - } - this = Unsafe.ReadUnaligned>(ref Unsafe.As(ref MemoryMarshal.GetReference(values))); + Vector.ThrowInsufficientNumberOfElementsException(Vector.Count); } - else + this = Unsafe.ReadUnaligned>(ref MemoryMarshal.GetReference(values)); + } + + /// + /// Constructs a vector from the given . The span must contain at least elements. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public Vector(ReadOnlySpan values) + : this() + { + if (values.Length < Count) { - throw new NotSupportedException(SR.Arg_TypeNotSupported); + Vector.ThrowInsufficientNumberOfElementsException(Vector.Count); } + this = Unsafe.ReadUnaligned>(ref Unsafe.As(ref MemoryMarshal.GetReference(values))); + } + + /// + /// Constructs a vector from the given . The span must contain at least elements. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public Vector(Span values) + : this() + { + if (values.Length < Count) + { + Vector.ThrowInsufficientNumberOfElementsException(Vector.Count); + } + this = Unsafe.ReadUnaligned>(ref Unsafe.As(ref MemoryMarshal.GetReference(values))); } #endif #endregion Constructors #region Public Instance Methods + /// + /// Copies the vector to the given . The destination span must be at least size . + /// + /// The destination span which the values are copied into + /// If number of elements in source vector is greater than those available in destination span + public void CopyTo(Span destination) + { + ThrowHelper.ThrowForUnsupportedVectorBaseType(); + if ((uint)destination.Length < (uint)Vector.Count) + { + ThrowHelper.ThrowArgumentException_DestinationTooShort(); + } + Unsafe.WriteUnaligned>(ref MemoryMarshal.GetReference(destination), this); + } + + /// + /// Copies the vector to the given . The destination span must be at least size . + /// + /// The destination span which the values are copied into + /// If number of elements in source vector is greater than those available in destination span + public void CopyTo(Span destination) + { + if ((uint)destination.Length < (uint)Count) + { + ThrowHelper.ThrowArgumentException_DestinationTooShort(); + } + + Unsafe.WriteUnaligned>(ref Unsafe.As(ref MemoryMarshal.GetReference(destination)), this); + } + /// /// Copies the vector to the given destination array. The destination array must be at least size Vector'T.Count. /// @@ -1591,6 +1570,41 @@ public string ToString(string? format, IFormatProvider? formatProvider) sb.Append('>'); return sb.ToString(); } + + /// + /// Attempts to copy the vector to the given . The destination span must be at least size . + /// + /// The destination span which the values are copied into + /// True if the source vector was successfully copied to . False if + /// is not large enough to hold the source vector. + public bool TryCopyTo(Span destination) + { + ThrowHelper.ThrowForUnsupportedVectorBaseType(); + if ((uint)destination.Length < (uint)Vector.Count) + { + return false; + } + + Unsafe.WriteUnaligned>(ref MemoryMarshal.GetReference(destination), this); + return true; + } + + /// + /// Attempts to copy the vector to the given . The destination span must be at least size . + /// + /// The destination span which the values are copied into + /// True if the source vector was successfully copied to . False if + /// is not large enough to hold the source vector. + public bool TryCopyTo(Span destination) + { + if ((uint)destination.Length < (uint)Count) + { + return false; + } + + Unsafe.WriteUnaligned>(ref Unsafe.As(ref MemoryMarshal.GetReference(destination)), this); + return true; + } #endregion Public Instance Methods #region Arithmetic Operators @@ -5335,5 +5349,12 @@ public static unsafe Vector ConvertToUInt64(Vector value) } #endregion Same-Size Conversion + + #region Throw Helpers + internal static void ThrowInsufficientNumberOfElementsException(int requiredElementCount) + { + throw new IndexOutOfRangeException(SR.Format(SR.Arg_InsufficientNumberOfElements, requiredElementCount, "values")); + } + #endregion } } diff --git a/src/Common/src/CoreLib/System/Numerics/Vector.tt b/src/Common/src/CoreLib/System/Numerics/Vector.tt index 5132b09a4a52..4eced4787946 100644 --- a/src/Common/src/CoreLib/System/Numerics/Vector.tt +++ b/src/Common/src/CoreLib/System/Numerics/Vector.tt @@ -64,10 +64,10 @@ namespace System.Numerics [Intrinsic] get { - return s_count; + ThrowHelper.ThrowForUnsupportedVectorBaseType(); + return Unsafe.SizeOf>() / Unsafe.SizeOf(); } } - private static readonly int s_count = InitializeCount(); /// /// Returns a vector containing all zeroes. @@ -106,42 +106,6 @@ namespace System.Numerics private static readonly Vector s_allOnes = new Vector(GetAllBitsSetValue()); #endregion Static Members - #region Static Initialization - private struct VectorSizeHelper - { - internal Vector _placeholder; - internal byte _byte; - } - - // Calculates the size of this struct in bytes, by computing the offset of a field in a structure - private static unsafe int InitializeCount() - { - VectorSizeHelper vsh; - byte* vectorBase = &vsh._placeholder.register.byte_0; - byte* byteBase = &vsh._byte; - int vectorSizeInBytes = (int)(byteBase - vectorBase); - - int typeSizeInBytes = -1; -<# - foreach (Type type in supportedTypes) - { -#> - <#=GenerateIfStatementHeader(type)#> - { - typeSizeInBytes = sizeof(<#=typeAliases[type]#>); - } -<# - } -#> - else - { - throw new NotSupportedException(SR.Arg_TypeNotSupported); - } - - return vectorSizeInBytes / typeSizeInBytes; - } - #endregion Static Initialization - #region Constructors /// /// Constructs a vector whose components are all value @@ -305,28 +269,81 @@ namespace System.Numerics #if netcoreapp /// - /// Constructs a vector from the given span. The span must contain at least Vector'T.Count elements. + /// Constructs a vector from the given . The span must contain at least elements. /// - public Vector(Span values) + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public Vector(ReadOnlySpan values) : this() { - <#=GenerateIfConditionAllTypes(supportedTypes)#> + ThrowHelper.ThrowForUnsupportedVectorBaseType(); + if (values.Length < Vector.Count) { - if (values.Length < Count) - { - throw new IndexOutOfRangeException(SR.Format(SR.Arg_InsufficientNumberOfElements, Vector.Count, nameof(values))); - } - this = Unsafe.ReadUnaligned>(ref Unsafe.As(ref MemoryMarshal.GetReference(values))); + Vector.ThrowInsufficientNumberOfElementsException(Vector.Count); } - else + this = Unsafe.ReadUnaligned>(ref MemoryMarshal.GetReference(values)); + } + + /// + /// Constructs a vector from the given . The span must contain at least elements. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public Vector(ReadOnlySpan values) + : this() + { + if (values.Length < Count) { - throw new NotSupportedException(SR.Arg_TypeNotSupported); + Vector.ThrowInsufficientNumberOfElementsException(Vector.Count); + } + this = Unsafe.ReadUnaligned>(ref Unsafe.As(ref MemoryMarshal.GetReference(values))); + } + + /// + /// Constructs a vector from the given . The span must contain at least elements. + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public Vector(Span values) + : this() + { + if (values.Length < Count) + { + Vector.ThrowInsufficientNumberOfElementsException(Vector.Count); } + this = Unsafe.ReadUnaligned>(ref Unsafe.As(ref MemoryMarshal.GetReference(values))); } #endif #endregion Constructors #region Public Instance Methods + /// + /// Copies the vector to the given . The destination span must be at least size . + /// + /// The destination span which the values are copied into + /// If number of elements in source vector is greater than those available in destination span + public void CopyTo(Span destination) + { + ThrowHelper.ThrowForUnsupportedVectorBaseType(); + if ((uint)destination.Length < (uint)Vector.Count) + { + ThrowHelper.ThrowArgumentException_DestinationTooShort(); + } + Unsafe.WriteUnaligned>(ref MemoryMarshal.GetReference(destination), this); + } + + /// + /// Copies the vector to the given . The destination span must be at least size . + /// + /// The destination span which the values are copied into + /// If number of elements in source vector is greater than those available in destination span + public void CopyTo(Span destination) + { + if ((uint)destination.Length < (uint)Count) + { + ThrowHelper.ThrowArgumentException_DestinationTooShort(); + } + + Unsafe.WriteUnaligned>(ref Unsafe.As(ref MemoryMarshal.GetReference(destination)), this); + } + /// /// Copies the vector to the given destination array. The destination array must be at least size Vector'T.Count. /// @@ -620,6 +637,41 @@ namespace System.Numerics sb.Append('>'); return sb.ToString(); } + + /// + /// Attempts to copy the vector to the given . The destination span must be at least size . + /// + /// The destination span which the values are copied into + /// True if the source vector was successfully copied to . False if + /// is not large enough to hold the source vector. + public bool TryCopyTo(Span destination) + { + ThrowHelper.ThrowForUnsupportedVectorBaseType(); + if ((uint)destination.Length < (uint)Vector.Count) + { + return false; + } + + Unsafe.WriteUnaligned>(ref MemoryMarshal.GetReference(destination), this); + return true; + } + + /// + /// Attempts to copy the vector to the given . The destination span must be at least size . + /// + /// The destination span which the values are copied into + /// True if the source vector was successfully copied to . False if + /// is not large enough to hold the source vector. + public bool TryCopyTo(Span destination) + { + if ((uint)destination.Length < (uint)Count) + { + return false; + } + + Unsafe.WriteUnaligned>(ref Unsafe.As(ref MemoryMarshal.GetReference(destination)), this); + return true; + } #endregion Public Instance Methods #region Arithmetic Operators @@ -1836,5 +1888,12 @@ namespace System.Numerics } #> #endregion Same-Size Conversion + + #region Throw Helpers + internal static void ThrowInsufficientNumberOfElementsException(int requiredElementCount) + { + throw new IndexOutOfRangeException(SR.Format(SR.Arg_InsufficientNumberOfElements, requiredElementCount, "values")); + } + #endregion } } diff --git a/src/Common/src/CoreLib/System/ThrowHelper.cs b/src/Common/src/CoreLib/System/ThrowHelper.cs index e73e1fa4219b..8b460975c22d 100644 --- a/src/Common/src/CoreLib/System/ThrowHelper.cs +++ b/src/Common/src/CoreLib/System/ThrowHelper.cs @@ -404,6 +404,9 @@ internal static void IfNullAndNullsAreIllegalThenThrow(object? value, Excepti ThrowHelper.ThrowArgumentNullException(argName); } + // Throws if 'T' is disallowed in Vector / Vector128 / other related types in the + // Numerics or Intrinsics namespaces. If 'T' is allowed, no-ops. JIT will elide the method + // entirely if 'T' is supported and we're on an optimized release build. [MethodImpl(MethodImplOptions.AggressiveInlining)] internal static void ThrowForUnsupportedVectorBaseType() where T : struct { From dda3289ce64a68613057758f53c20cc4768548de Mon Sep 17 00:00:00 2001 From: Tomas Weinfurt Date: Tue, 30 Apr 2019 19:05:55 -0700 Subject: [PATCH 127/607] handle EPROTOTYPE on OSX (#37208) --- src/Native/Unix/System.Native/pal_networking.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Native/Unix/System.Native/pal_networking.c b/src/Native/Unix/System.Native/pal_networking.c index b95346b41880..041214438a0f 100644 --- a/src/Native/Unix/System.Native/pal_networking.c +++ b/src/Native/Unix/System.Native/pal_networking.c @@ -1268,7 +1268,12 @@ int32_t SystemNative_SendMessage(intptr_t socket, MessageHeader* messageHeader, ConvertMessageHeaderToMsghdr(&header, messageHeader, fd); ssize_t res; +#if defined(__APPLE__) && __APPLE__ + // possible OSX kernel bug: #31927 + while ((res = sendmsg(fd, &header, socketFlags)) < 0 && (errno == EINTR || errno == EPROTOTYPE)); +#else while ((res = sendmsg(fd, &header, socketFlags)) < 0 && errno == EINTR); +#endif if (res != -1) { *sent = res; From bfcbf22e72bd5f814af92c0980993a8b4e9c7232 Mon Sep 17 00:00:00 2001 From: Jose Perez Rodriguez Date: Tue, 30 Apr 2019 19:24:33 -0700 Subject: [PATCH 128/607] Adding Microsoft.Bcl.AsyncInterfaces for .NET Standard 2.0 (#37189) * Adding Microsoft.Compatibility.AsyncInterfaces package * Addressing PR Feedback * Fix small typo * Remove unnecesary configurations from the package * Rename to Microsoft.Bcl.AsyncInterfaces * Addressing PR Feedback --- eng/configurations/targetgroups.props | 19 +++++-- .../packageIndex.json | 9 ++- pkg/descriptions.json | 9 +++ .../Directory.Build.props | 9 +++ .../Microsoft.Bcl.AsyncInterfaces.sln | 41 ++++++++++++++ .../pkg/Microsoft.Bcl.AsyncInterfaces.pkgproj | 10 ++++ .../ref/Configurations.props | 8 +++ .../Microsoft.Bcl.AsyncInterfaces.Forwards.cs | 10 ++++ .../ref/Microsoft.Bcl.AsyncInterfaces.cs | 56 +++++++++++++++++++ .../ref/Microsoft.Bcl.AsyncInterfaces.csproj | 17 ++++++ .../src/Configurations.props | 8 +++ .../src/Microsoft.Bcl.AsyncInterfaces.csproj | 32 +++++++++++ 12 files changed, 221 insertions(+), 7 deletions(-) create mode 100644 src/Microsoft.Bcl.AsyncInterfaces/Directory.Build.props create mode 100644 src/Microsoft.Bcl.AsyncInterfaces/Microsoft.Bcl.AsyncInterfaces.sln create mode 100644 src/Microsoft.Bcl.AsyncInterfaces/pkg/Microsoft.Bcl.AsyncInterfaces.pkgproj create mode 100644 src/Microsoft.Bcl.AsyncInterfaces/ref/Configurations.props create mode 100644 src/Microsoft.Bcl.AsyncInterfaces/ref/Microsoft.Bcl.AsyncInterfaces.Forwards.cs create mode 100644 src/Microsoft.Bcl.AsyncInterfaces/ref/Microsoft.Bcl.AsyncInterfaces.cs create mode 100644 src/Microsoft.Bcl.AsyncInterfaces/ref/Microsoft.Bcl.AsyncInterfaces.csproj create mode 100644 src/Microsoft.Bcl.AsyncInterfaces/src/Configurations.props create mode 100644 src/Microsoft.Bcl.AsyncInterfaces/src/Microsoft.Bcl.AsyncInterfaces.csproj diff --git a/eng/configurations/targetgroups.props b/eng/configurations/targetgroups.props index 320103337fdb..5878d40d2532 100644 --- a/eng/configurations/targetgroups.props +++ b/eng/configurations/targetgroups.props @@ -42,7 +42,7 @@ aot true uap10.0.16299aot - uapvnext;netstandard2.0 + uapvnext;netstandard2.1 $(UAPvNextTFM) @@ -50,7 +50,7 @@ $(UAPvNextVersion) true uap10.0.16299 - netstandard2.0 + netstandard2.1 @@ -59,7 +59,7 @@ $(UAPvNextVersion) true uapvnext - netstandard + netstandard2.1 @@ -69,7 +69,7 @@ aot true uapvnextaot - uap;netstandard + uap;netstandard2.1 netstandard1.0 @@ -126,6 +126,13 @@ true netstandard1.6 + + netstandard2.1 + + true + netstandard + netstandard2.0 @@ -157,14 +164,14 @@ 3.0 netcoreapp3.0 netcoreapp2.2 - netstandard + netstandard2.1 3.0 netcoreapp3.0 netcoreapp3.0 - netstandard + netstandard2.1 net45 diff --git a/pkg/Microsoft.Private.PackageBaseline/packageIndex.json b/pkg/Microsoft.Private.PackageBaseline/packageIndex.json index cb66cb63d64c..fb47f507dfb8 100644 --- a/pkg/Microsoft.Private.PackageBaseline/packageIndex.json +++ b/pkg/Microsoft.Private.PackageBaseline/packageIndex.json @@ -27,6 +27,12 @@ "net45": "4.0.0.0" } }, + "Microsoft.Bcl.AsyncInterfaces": { + "InboxOn": {}, + "AssemblyVersionInPackageVersion": { + "1.0.0.0": "1.0.0" + } + }, "Microsoft.Bcl.Json.Sources": { "InboxOn": {} }, @@ -427,6 +433,7 @@ "netcoreapp3.0": "2.1.0.0", "net461": "2.0.0.0", "netstandard2.0": "2.0.0.0", + "netstandard2.1": "2.1.0.0", "uap10.0.16299": "2.0.0.0", "uap10.0.16300": "2.1.0.0" } @@ -5944,4 +5951,4 @@ "System.Xml.XDocument" ] } -} +} \ No newline at end of file diff --git a/pkg/descriptions.json b/pkg/descriptions.json index 82e2bda1a892..440c24ef46ed 100644 --- a/pkg/descriptions.json +++ b/pkg/descriptions.json @@ -1042,6 +1042,15 @@ "System.Buffers.Text.Utf8Formatter" ] }, + { + "Name": "Microsoft.Bcl.AsyncInterfaces", + "Description": "Provides the IAsyncEnumerable and IAsyncDisposable interfaces and helper types for .NET Standard 2.0. This package is not required starting with .NET Standard 2.1 and .NET Core 3.0.", + "CommonTypes": [ + "System.IAsyncDisposable", + "System.Collections.Generic.IAsyncEnumerable", + "System.Collections.Generic.IAsyncEnumerator" + ] + }, { "Name": "System.Net.Http", "Description": "Provides a programming interface for modern HTTP applications, including HTTP client components that allow applications to consume web services over HTTP and HTTP components that can be used by both clients and servers for parsing HTTP headers.", diff --git a/src/Microsoft.Bcl.AsyncInterfaces/Directory.Build.props b/src/Microsoft.Bcl.AsyncInterfaces/Directory.Build.props new file mode 100644 index 000000000000..2f87c4e4307d --- /dev/null +++ b/src/Microsoft.Bcl.AsyncInterfaces/Directory.Build.props @@ -0,0 +1,9 @@ + + + + 1.0.0.0 + 1.0.0 + Open + + + diff --git a/src/Microsoft.Bcl.AsyncInterfaces/Microsoft.Bcl.AsyncInterfaces.sln b/src/Microsoft.Bcl.AsyncInterfaces/Microsoft.Bcl.AsyncInterfaces.sln new file mode 100644 index 000000000000..7fa9037d6dd7 --- /dev/null +++ b/src/Microsoft.Bcl.AsyncInterfaces/Microsoft.Bcl.AsyncInterfaces.sln @@ -0,0 +1,41 @@ +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.27213.1 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Bcl.AsyncInterfaces", "src\Microsoft.Bcl.AsyncInterfaces.csproj", "{96A7CE75-B5E8-421B-BDF0-C4651D97D8CA}" + ProjectSection(ProjectDependencies) = postProject + {6371299B-8F39-4A0A-A9CD-70F80FF205F6} = {6371299B-8F39-4A0A-A9CD-70F80FF205F6} + EndProjectSection +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Bcl.AsyncInterfaces", "ref\Microsoft.Bcl.AsyncInterfaces.csproj", "{6371299B-8F39-4A0A-A9CD-70F80FF205F6}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{E107E9C1-E893-4E87-987E-04EF0DCEAEFD}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{2E666815-2EDB-464B-9DF6-380BF4789AD4}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {96A7CE75-B5E8-421B-BDF0-C4651D97D8CA}.Debug|Any CPU.ActiveCfg = netstandard-Debug|Any CPU + {96A7CE75-B5E8-421B-BDF0-C4651D97D8CA}.Debug|Any CPU.Build.0 = netstandard-Debug|Any CPU + {96A7CE75-B5E8-421B-BDF0-C4651D97D8CA}.Release|Any CPU.ActiveCfg = netstandard-Release|Any CPU + {96A7CE75-B5E8-421B-BDF0-C4651D97D8CA}.Release|Any CPU.Build.0 = netstandard-Release|Any CPU + {6371299B-8F39-4A0A-A9CD-70F80FF205F6}.Debug|Any CPU.ActiveCfg = netstandard-Debug|Any CPU + {6371299B-8F39-4A0A-A9CD-70F80FF205F6}.Debug|Any CPU.Build.0 = netstandard-Debug|Any CPU + {6371299B-8F39-4A0A-A9CD-70F80FF205F6}.Release|Any CPU.ActiveCfg = netstandard-Release|Any CPU + {6371299B-8F39-4A0A-A9CD-70F80FF205F6}.Release|Any CPU.Build.0 = netstandard-Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {96A7CE75-B5E8-421B-BDF0-C4651D97D8CA} = {E107E9C1-E893-4E87-987E-04EF0DCEAEFD} + {6371299B-8F39-4A0A-A9CD-70F80FF205F6} = {2E666815-2EDB-464B-9DF6-380BF4789AD4} + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {38217F72-3F9A-4B15-96C8-BFA23083AAD3} + EndGlobalSection +EndGlobal diff --git a/src/Microsoft.Bcl.AsyncInterfaces/pkg/Microsoft.Bcl.AsyncInterfaces.pkgproj b/src/Microsoft.Bcl.AsyncInterfaces/pkg/Microsoft.Bcl.AsyncInterfaces.pkgproj new file mode 100644 index 000000000000..3b0fbeee82d3 --- /dev/null +++ b/src/Microsoft.Bcl.AsyncInterfaces/pkg/Microsoft.Bcl.AsyncInterfaces.pkgproj @@ -0,0 +1,10 @@ + + + + + net461;netcoreapp2.0;uap10.0.16299;$(AllXamarinFrameworks) + + + + + \ No newline at end of file diff --git a/src/Microsoft.Bcl.AsyncInterfaces/ref/Configurations.props b/src/Microsoft.Bcl.AsyncInterfaces/ref/Configurations.props new file mode 100644 index 000000000000..20d2e63c9e23 --- /dev/null +++ b/src/Microsoft.Bcl.AsyncInterfaces/ref/Configurations.props @@ -0,0 +1,8 @@ + + + + netstandard; + netstandard2.1; + + + diff --git a/src/Microsoft.Bcl.AsyncInterfaces/ref/Microsoft.Bcl.AsyncInterfaces.Forwards.cs b/src/Microsoft.Bcl.AsyncInterfaces/ref/Microsoft.Bcl.AsyncInterfaces.Forwards.cs new file mode 100644 index 000000000000..8f737d621523 --- /dev/null +++ b/src/Microsoft.Bcl.AsyncInterfaces/ref/Microsoft.Bcl.AsyncInterfaces.Forwards.cs @@ -0,0 +1,10 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.IAsyncDisposable))] +[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Collections.Generic.IAsyncEnumerable<>))] +[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Collections.Generic.IAsyncEnumerator<>))] +[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.CompilerServices.AsyncIteratorStateMachineAttribute))] +[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.CompilerServices.ConfiguredAsyncDisposable))] +[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.CompilerServices.ConfiguredCancelableAsyncEnumerable<>))] diff --git a/src/Microsoft.Bcl.AsyncInterfaces/ref/Microsoft.Bcl.AsyncInterfaces.cs b/src/Microsoft.Bcl.AsyncInterfaces/ref/Microsoft.Bcl.AsyncInterfaces.cs new file mode 100644 index 000000000000..fefe5c5c1e74 --- /dev/null +++ b/src/Microsoft.Bcl.AsyncInterfaces/ref/Microsoft.Bcl.AsyncInterfaces.cs @@ -0,0 +1,56 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. +// ------------------------------------------------------------------------------ +// Changes to this file must follow the http://aka.ms/api-review process. +// ------------------------------------------------------------------------------ + +namespace System +{ + public partial interface IAsyncDisposable + { + System.Threading.Tasks.ValueTask DisposeAsync(); + } +} +namespace System.Collections.Generic +{ + public partial interface IAsyncEnumerable + { + System.Collections.Generic.IAsyncEnumerator GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } + public partial interface IAsyncEnumerator : System.IAsyncDisposable + { + T Current { get; } + System.Threading.Tasks.ValueTask MoveNextAsync(); + } +} +namespace System.Runtime.CompilerServices +{ + [System.AttributeUsageAttribute(System.AttributeTargets.Method, Inherited=false, AllowMultiple=false)] + public sealed partial class AsyncIteratorStateMachineAttribute : System.Runtime.CompilerServices.StateMachineAttribute + { + public AsyncIteratorStateMachineAttribute(System.Type stateMachineType) : base (default(System.Type)) { } + } + public readonly partial struct ConfiguredAsyncDisposable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public System.Runtime.CompilerServices.ConfiguredValueTaskAwaitable DisposeAsync() { throw null; } + } + public readonly partial struct ConfiguredCancelableAsyncEnumerable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public System.Runtime.CompilerServices.ConfiguredCancelableAsyncEnumerable ConfigureAwait(bool continueOnCapturedContext) { throw null; } + public System.Runtime.CompilerServices.ConfiguredCancelableAsyncEnumerable.Enumerator GetAsyncEnumerator() { throw null; } + public System.Runtime.CompilerServices.ConfiguredCancelableAsyncEnumerable WithCancellation(System.Threading.CancellationToken cancellationToken) { throw null; } + public readonly partial struct Enumerator + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public T Current { get { throw null; } } + public System.Runtime.CompilerServices.ConfiguredValueTaskAwaitable DisposeAsync() { throw null; } + public System.Runtime.CompilerServices.ConfiguredValueTaskAwaitable MoveNextAsync() { throw null; } + } + } +} diff --git a/src/Microsoft.Bcl.AsyncInterfaces/ref/Microsoft.Bcl.AsyncInterfaces.csproj b/src/Microsoft.Bcl.AsyncInterfaces/ref/Microsoft.Bcl.AsyncInterfaces.csproj new file mode 100644 index 000000000000..3c58faf3003b --- /dev/null +++ b/src/Microsoft.Bcl.AsyncInterfaces/ref/Microsoft.Bcl.AsyncInterfaces.csproj @@ -0,0 +1,17 @@ + + + {6371299B-8F39-4A0A-A9CD-70F80FF205F6} + netstandard-Debug;netstandard-Release;netstandard2.1-Debug;netstandard2.1-Release + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/Microsoft.Bcl.AsyncInterfaces/src/Configurations.props b/src/Microsoft.Bcl.AsyncInterfaces/src/Configurations.props new file mode 100644 index 000000000000..20d2e63c9e23 --- /dev/null +++ b/src/Microsoft.Bcl.AsyncInterfaces/src/Configurations.props @@ -0,0 +1,8 @@ + + + + netstandard; + netstandard2.1; + + + diff --git a/src/Microsoft.Bcl.AsyncInterfaces/src/Microsoft.Bcl.AsyncInterfaces.csproj b/src/Microsoft.Bcl.AsyncInterfaces/src/Microsoft.Bcl.AsyncInterfaces.csproj new file mode 100644 index 000000000000..2e98b39e5e3b --- /dev/null +++ b/src/Microsoft.Bcl.AsyncInterfaces/src/Microsoft.Bcl.AsyncInterfaces.csproj @@ -0,0 +1,32 @@ + + + {96A7CE75-B5E8-421B-BDF0-C4651D97D8CA} + netstandard-Debug;netstandard-Release;netstandard2.1-Debug;netstandard2.1-Release + true + + + + ProductionCode\Common\CoreLib\System\Collections\Generic\IAsyncEnumerable.cs + + + ProductionCode\Common\CoreLib\System\Collections\Generic\IAsyncEnumerator.cs + + + ProductionCode\Common\CoreLib\System\IAsyncDisposable.cs + + + ProductionCode\Common\CoreLib\System\Runtime\CompilerServices\AsyncIteratorStateMachineAttribute.cs + + + ProductionCode\Common\CoreLib\System\Runtime\CompilerServices\ConfiguredAsyncDisposable.cs + + + ProductionCode\Common\CoreLib\System\Runtime\CompilerServices\ConfiguredCancelableAsyncEnumerable.cs + + + + + + + + \ No newline at end of file From d34db8ed8e2cb8dd9bcf2045b2526165661d501a Mon Sep 17 00:00:00 2001 From: Tomas Weinfurt Date: Tue, 30 Apr 2019 20:31:00 -0700 Subject: [PATCH 129/607] update tests using "localhost" to be more liberal on verification of response address. (#37284) * update tests using "localhost" * feedback from review --- .../tests/FunctionalTests/PingTest.cs | 85 ++++++++++--------- .../tests/FunctionalTests/TestSettings.cs | 28 ++++-- 2 files changed, 67 insertions(+), 46 deletions(-) diff --git a/src/System.Net.Ping/tests/FunctionalTests/PingTest.cs b/src/System.Net.Ping/tests/FunctionalTests/PingTest.cs index f32540d5ecec..264afbb5f3cb 100644 --- a/src/System.Net.Ping/tests/FunctionalTests/PingTest.cs +++ b/src/System.Net.Ping/tests/FunctionalTests/PingTest.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using Microsoft.DotNet.XUnitExtensions; +using System.Linq; using System.Net.Sockets; using System.Net.Test.Common; using System.Runtime.InteropServices; @@ -45,27 +46,35 @@ public PingTest(ITestOutputHelper output) } private void PingResultValidator(PingReply pingReply, IPAddress localIpAddress) + { + PingResultValidator(pingReply, new IPAddress[] { localIpAddress }); + } + + private void PingResultValidator(PingReply pingReply, IPAddress[] localIpAddresses) { if (pingReply.Status == IPStatus.TimedOut) { // Workaround OSX ping6 bug, refer issue #15018 - Assert.Equal(AddressFamily.InterNetworkV6, localIpAddress.AddressFamily); + Assert.Equal(AddressFamily.InterNetworkV6, pingReply.Address.AddressFamily); Assert.True(RuntimeInformation.IsOSPlatform(OSPlatform.OSX)); return; } Assert.Equal(IPStatus.Success, pingReply.Status); - if (!pingReply.Address.Equals(localIpAddress)) + if (localIpAddresses.Any(addr => pingReply.Address.Equals(addr))) { - // Test is going to fail. Collect some more info. - _output.WriteLine($"Reply address {pingReply.Address} is not expected {localIpAddress}"); - IPHostEntry hostEntry = Dns.GetHostEntry(TestSettings.LocalHost); - foreach (IPAddress address in hostEntry.AddressList) - { - _output.WriteLine($"Local address {address}"); - } + // response did come from expected address. Test will pass. + return; + } + // We did not find response address in given list. + // Test is going to fail. Collect some more info. + _output.WriteLine($"Reply address {pingReply.Address} is not expected local address."); + foreach (IPAddress address in localIpAddresses) + { + _output.WriteLine($"Local address {address}"); } - Assert.True(pingReply.Address.Equals(localIpAddress)); + + Assert.Contains(pingReply.Address, localIpAddresses); ///, "Reply address {pingReply.Address} is not expected local address."); } [Fact] @@ -401,52 +410,52 @@ await SendBatchPingAsync( [Fact] public void SendPingWithHost() { - IPAddress localIpAddress = TestSettings.GetLocalIPAddress(); + IPAddress[] localIpAddresses = TestSettings.GetLocalIPAddresses(); SendBatchPing( (ping) => ping.Send(TestSettings.LocalHost), (pingReply) => { - PingResultValidator(pingReply, localIpAddress); + PingResultValidator(pingReply, localIpAddresses); }); } [Fact] public async Task SendPingAsyncWithHost() { - IPAddress localIpAddress = await TestSettings.GetLocalIPAddressAsync(); + IPAddress[] localIpAddresses = await TestSettings.GetLocalIPAddressesAsync(); await SendBatchPingAsync( (ping) => ping.SendPingAsync(TestSettings.LocalHost), (pingReply) => { - PingResultValidator(pingReply, localIpAddress); + PingResultValidator(pingReply, localIpAddresses); }); } [Fact] public void SendPingWithHostAndTimeout() { - IPAddress localIpAddress = TestSettings.GetLocalIPAddress(); + IPAddress[] localIpAddresses = TestSettings.GetLocalIPAddresses(); SendBatchPing( (ping) => ping.Send(TestSettings.LocalHost, TestSettings.PingTimeout), (pingReply) => { - PingResultValidator(pingReply, localIpAddress); + PingResultValidator(pingReply, localIpAddresses); }); } [Fact] public async Task SendPingAsyncWithHostAndTimeout() { - IPAddress localIpAddress = await TestSettings.GetLocalIPAddressAsync(); + IPAddress[] localIpAddresses = await TestSettings.GetLocalIPAddressesAsync(); await SendBatchPingAsync( (ping) => ping.SendPingAsync(TestSettings.LocalHost, TestSettings.PingTimeout), (pingReply) => { - PingResultValidator(pingReply, localIpAddress); + PingResultValidator(pingReply, localIpAddresses); }); } @@ -486,17 +495,17 @@ await SendBatchPingAsync( [Fact] public void SendPingWithHostAndTimeoutAndBuffer_Unix() { - IPAddress localIpAddress = TestSettings.GetLocalIPAddress(); + IPAddress[] localIpAddresses = TestSettings.GetLocalIPAddresses(); byte[] buffer = TestSettings.PayloadAsBytes; SendBatchPing( (ping) => ping.Send(TestSettings.LocalHost, TestSettings.PingTimeout, buffer), (pingReply) => { - PingResultValidator(pingReply, localIpAddress); + PingResultValidator(pingReply, localIpAddresses); // Non-root pings cannot send arbitrary data in the buffer, and do not receive it back in the PingReply. - if (Capability.CanUseRawSockets(localIpAddress.AddressFamily)) + if (Capability.CanUseRawSockets(pingReply.Address.AddressFamily)) { Assert.Equal(buffer, pingReply.Buffer); } @@ -511,17 +520,17 @@ public void SendPingWithHostAndTimeoutAndBuffer_Unix() [Fact] public async Task SendPingAsyncWithHostAndTimeoutAndBuffer_Unix() { - IPAddress localIpAddress = await TestSettings.GetLocalIPAddressAsync(); + IPAddress[] localIpAddresses = await TestSettings.GetLocalIPAddressesAsync(); byte[] buffer = TestSettings.PayloadAsBytes; await SendBatchPingAsync( (ping) => ping.SendPingAsync(TestSettings.LocalHost, TestSettings.PingTimeout, buffer), (pingReply) => { - PingResultValidator(pingReply, localIpAddress); + PingResultValidator(pingReply, localIpAddresses); // Non-root pings cannot send arbitrary data in the buffer, and do not receive it back in the PingReply. - if (Capability.CanUseRawSockets(localIpAddress.AddressFamily)) + if (Capability.CanUseRawSockets(pingReply.Address.AddressFamily)) { Assert.Equal(buffer, pingReply.Buffer); } @@ -570,17 +579,17 @@ await SendBatchPingAsync( [Fact] public void SendPingWithHostAndTimeoutAndBufferAndPingOptions_Unix() { - IPAddress localIpAddress = TestSettings.GetLocalIPAddress(); + IPAddress[] localIpAddresses = TestSettings.GetLocalIPAddresses(); byte[] buffer = TestSettings.PayloadAsBytes; SendBatchPing( (ping) => ping.Send(TestSettings.LocalHost, TestSettings.PingTimeout, buffer, new PingOptions()), (pingReply) => { - PingResultValidator(pingReply, localIpAddress); + PingResultValidator(pingReply, localIpAddresses); // Non-root pings cannot send arbitrary data in the buffer, and do not receive it back in the PingReply. - if (Capability.CanUseRawSockets(localIpAddress.AddressFamily)) + if (Capability.CanUseRawSockets(pingReply.Address.AddressFamily)) { Assert.Equal(buffer, pingReply.Buffer); } @@ -595,17 +604,17 @@ public void SendPingWithHostAndTimeoutAndBufferAndPingOptions_Unix() [Fact] public async Task SendPingAsyncWithHostAndTimeoutAndBufferAndPingOptions_Unix() { - IPAddress localIpAddress = await TestSettings.GetLocalIPAddressAsync(); + IPAddress[] localIpAddresses = await TestSettings.GetLocalIPAddressesAsync(); byte[] buffer = TestSettings.PayloadAsBytes; await SendBatchPingAsync( (ping) => ping.SendPingAsync(TestSettings.LocalHost, TestSettings.PingTimeout, buffer, new PingOptions()), (pingReply) => { - PingResultValidator(pingReply, localIpAddress); + PingResultValidator(pingReply, localIpAddresses); // Non-root pings cannot send arbitrary data in the buffer, and do not receive it back in the PingReply. - if (Capability.CanUseRawSockets(localIpAddress.AddressFamily)) + if (Capability.CanUseRawSockets(pingReply.Address.AddressFamily)) { Assert.Equal(buffer, pingReply.Buffer); } @@ -619,14 +628,14 @@ await SendBatchPingAsync( [Fact] public async Task SendPings_ReuseInstance_Hostname() { - IPAddress localIpAddress = await TestSettings.GetLocalIPAddressAsync(); + IPAddress[] localIpAddresses = await TestSettings.GetLocalIPAddressesAsync(); using (Ping p = new Ping()) { for (int i = 0; i < 3; i++) { PingReply pingReply = await p.SendPingAsync(TestSettings.LocalHost); - PingResultValidator(pingReply, localIpAddress); + PingResultValidator(pingReply, localIpAddresses); } } } @@ -634,14 +643,14 @@ public async Task SendPings_ReuseInstance_Hostname() [Fact] public async Task Sends_ReuseInstance_Hostname() { - IPAddress localIpAddress = await TestSettings.GetLocalIPAddressAsync(); + IPAddress[] localIpAddresses = await TestSettings.GetLocalIPAddressesAsync(); using (Ping p = new Ping()) { for (int i = 0; i < 3; i++) { PingReply pingReply = p.Send(TestSettings.LocalHost); - PingResultValidator(pingReply, localIpAddress); + PingResultValidator(pingReply, localIpAddresses); } } } @@ -649,7 +658,7 @@ public async Task Sends_ReuseInstance_Hostname() [Fact] public async Task SendAsyncs_ReuseInstance_Hostname() { - IPAddress localIpAddress = await TestSettings.GetLocalIPAddressAsync(); + IPAddress[] localIpAddresses = await TestSettings.GetLocalIPAddressesAsync(); using (Ping p = new Ping()) { @@ -674,7 +683,7 @@ public async Task SendAsyncs_ReuseInstance_Hostname() await tcs.Task; Assert.NotNull(ea); - PingResultValidator(ea.Reply, localIpAddress); + PingResultValidator(ea.Reply, localIpAddresses); } // Several canceled iterations @@ -784,7 +793,7 @@ public void CanBeFinalized() [InlineData(false)] public async Task SendPingAsyncWithHostAndTtlAndFragmentPingOptions(bool fragment) { - IPAddress localIpAddress = await TestSettings.GetLocalIPAddressAsync(); + IPAddress[] localIpAddresses = await TestSettings.GetLocalIPAddressesAsync(); byte[] buffer = TestSettings.PayloadAsBytes; @@ -796,7 +805,7 @@ await SendBatchPingAsync( (ping) => ping.SendPingAsync(TestSettings.LocalHost, TestSettings.PingTimeout, buffer, options), (pingReply) => { - PingResultValidator(pingReply, localIpAddress); + PingResultValidator(pingReply, localIpAddresses); }); } diff --git a/src/System.Net.Ping/tests/FunctionalTests/TestSettings.cs b/src/System.Net.Ping/tests/FunctionalTests/TestSettings.cs index a34a120bc2a5..6b8130c1bf50 100644 --- a/src/System.Net.Ping/tests/FunctionalTests/TestSettings.cs +++ b/src/System.Net.Ping/tests/FunctionalTests/TestSettings.cs @@ -18,21 +18,33 @@ internal static class TestSettings public static readonly byte[] PayloadAsBytesShort = Encoding.UTF8.GetBytes("ABCDEF0123456789"); - public static IPAddress GetLocalIPAddress(AddressFamily addressFamily = AddressFamily.Unspecified) + public static IPAddress[] GetLocalIPAddresses() { IPHostEntry hostEntry = Dns.GetHostEntry(LocalHost); - return GetIPAddressForHost(hostEntry, addressFamily); + return hostEntry.AddressList; } - public static async Task GetLocalIPAddressAsync(AddressFamily addressFamily = AddressFamily.Unspecified) + public static async Task GetLocalIPAddressesAsync() { IPHostEntry hostEntry = await Dns.GetHostEntryAsync(LocalHost); - return GetIPAddressForHost(hostEntry, addressFamily); + return hostEntry.AddressList; + } + + public static IPAddress GetLocalIPAddress(AddressFamily addressFamily = AddressFamily.Unspecified) + { + IPAddress[] addressList = GetLocalIPAddresses(); + return GetIPAddressForHost(addressList, addressFamily); + } + + public static async Task GetLocalIPAddressAsync(AddressFamily addressFamily = AddressFamily.Unspecified) + { + IPAddress[] addressList = await GetLocalIPAddressesAsync(); + return GetIPAddressForHost(addressList, addressFamily); } - private static IPAddress GetIPAddressForHost(IPHostEntry hostEntry, AddressFamily addressFamily = AddressFamily.Unspecified) + private static IPAddress GetIPAddressForHost(IPAddress[] addressList, AddressFamily addressFamily = AddressFamily.Unspecified) { - foreach (IPAddress address in hostEntry.AddressList) + foreach (IPAddress address in addressList) { if (address.AddressFamily == addressFamily || (addressFamily == AddressFamily.Unspecified && address.AddressFamily == AddressFamily.InterNetworkV6)) { @@ -43,9 +55,9 @@ private static IPAddress GetIPAddressForHost(IPHostEntry hostEntry, AddressFamil // If there's no IPv6 addresses, just take the first (IPv4) address. if (addressFamily == AddressFamily.Unspecified) { - if (hostEntry.AddressList.Length > 0) + if (addressList.Length > 0) { - return hostEntry.AddressList[0]; + return addressList[0]; } throw new InvalidOperationException("Unable to discover any addresses for the local host."); From 830bf7fc0346d9453d85ad4ec726c92ac3e72998 Mon Sep 17 00:00:00 2001 From: David Shulman Date: Tue, 30 Apr 2019 21:14:02 -0700 Subject: [PATCH 130/607] Internal Http SystemProxyInfo object should never be null (#37306) In order to provide a consistent experience with the HttpClient IWebProxy objects, the returned internal proxy object which represent the system/platform proxy settings should never be null. If the platform's settings indicate that no proxy is being used, then return an instance of the internal HttpNoProxy object. Note that even if the platform settings indicate that a proxy could be used, any particular Http request might still not go thru a proxy. The final determination of what proxy is being used for a request is still governed by the return of the IWebProxy.IsBypassed and IWebProxy.GetProxy methods. Contributes to #36553 --- src/System.Net.Http/src/System.Net.Http.csproj | 2 ++ .../Net/Http/SocketsHttpHandler/HttpNoProxy.cs | 13 +++++++++++++ .../Http/SocketsHttpHandler/SystemProxyInfo.Unix.cs | 6 ++++-- .../SocketsHttpHandler/SystemProxyInfo.Windows.cs | 2 +- .../UnitTests/System.Net.Http.Unit.Tests.csproj | 3 +++ .../tests/UnitTests/SystemProxyInfoTest.cs | 2 ++ 6 files changed, 25 insertions(+), 3 deletions(-) create mode 100644 src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpNoProxy.cs diff --git a/src/System.Net.Http/src/System.Net.Http.csproj b/src/System.Net.Http/src/System.Net.Http.csproj index fde227d811b8..c0e1bac53dfa 100644 --- a/src/System.Net.Http/src/System.Net.Http.csproj +++ b/src/System.Net.Http/src/System.Net.Http.csproj @@ -260,6 +260,7 @@ + @@ -306,6 +307,7 @@ + Common\Interop\Windows\SChannel\Interop.SecPkgContext_ApplicationProtocol.cs diff --git a/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpNoProxy.cs b/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpNoProxy.cs new file mode 100644 index 000000000000..bc33faf24028 --- /dev/null +++ b/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpNoProxy.cs @@ -0,0 +1,13 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +namespace System.Net.Http +{ + internal sealed class HttpNoProxy : IWebProxy + { + public ICredentials Credentials { get; set; } + public Uri GetProxy(Uri destination) => null; + public bool IsBypassed(Uri host) => true; + } +} diff --git a/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/SystemProxyInfo.Unix.cs b/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/SystemProxyInfo.Unix.cs index 6d93ee1b51aa..572322a59eff 100644 --- a/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/SystemProxyInfo.Unix.cs +++ b/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/SystemProxyInfo.Unix.cs @@ -6,10 +6,12 @@ namespace System.Net.Http { internal static class SystemProxyInfo { - // On Unix (except for OSX) we get default proxy configuration from environment variables. + // On Unix (except for OSX) we get default proxy configuration from environment variables. If the + // environment variables are not defined, we return an IWebProxy object that effectively is + // the "no proxy" object. public static IWebProxy ConstructSystemProxy() { - return HttpEnvironmentProxy.TryCreate(out IWebProxy proxy) ? proxy : null; + return HttpEnvironmentProxy.TryCreate(out IWebProxy proxy) ? proxy : new HttpNoProxy(); } } } diff --git a/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/SystemProxyInfo.Windows.cs b/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/SystemProxyInfo.Windows.cs index dde91ba1fc82..51480b556988 100644 --- a/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/SystemProxyInfo.Windows.cs +++ b/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/SystemProxyInfo.Windows.cs @@ -14,7 +14,7 @@ public static IWebProxy ConstructSystemProxy() HttpSystemProxy.TryCreate(out proxy); } - return proxy; + return proxy ?? new HttpNoProxy(); } } } diff --git a/src/System.Net.Http/tests/UnitTests/System.Net.Http.Unit.Tests.csproj b/src/System.Net.Http/tests/UnitTests/System.Net.Http.Unit.Tests.csproj index e07d99e11758..03c3bad3495d 100644 --- a/src/System.Net.Http/tests/UnitTests/System.Net.Http.Unit.Tests.csproj +++ b/src/System.Net.Http/tests/UnitTests/System.Net.Http.Unit.Tests.csproj @@ -390,6 +390,9 @@ + + ProductionCode\System\Net\Http\HttpNoProxy.cs + ProductionCode\System\Net\Http\HttpSystemProxy.cs diff --git a/src/System.Net.Http/tests/UnitTests/SystemProxyInfoTest.cs b/src/System.Net.Http/tests/UnitTests/SystemProxyInfoTest.cs index 33943c53f24f..ca012e4f59af 100644 --- a/src/System.Net.Http/tests/UnitTests/SystemProxyInfoTest.cs +++ b/src/System.Net.Http/tests/UnitTests/SystemProxyInfoTest.cs @@ -38,6 +38,8 @@ public void Ctor_NoEnvironmentVariables_NotHttpEnvironmentProxy() RemoteExecutor.Invoke(() => { IWebProxy proxy = SystemProxyInfo.ConstructSystemProxy(); + Assert.NotNull(proxy); + HttpEnvironmentProxy envProxy = proxy as HttpEnvironmentProxy; Assert.Null(envProxy); From 1f9db60c79e7c4f04fa346f751024ec8684ce64c Mon Sep 17 00:00:00 2001 From: Santiago Fernandez Madero Date: Wed, 1 May 2019 04:05:24 -0700 Subject: [PATCH 131/607] Run tests only on public builds and scheduled or manual official builds (#37316) --- eng/pipelines/corefx-base.yml | 2 ++ eng/pipelines/helix.yml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/eng/pipelines/corefx-base.yml b/eng/pipelines/corefx-base.yml index 67a02a0391a3..3989322dc45d 100644 --- a/eng/pipelines/corefx-base.yml +++ b/eng/pipelines/corefx-base.yml @@ -189,6 +189,8 @@ jobs: - template: /eng/pipelines/helix.yml parameters: + # send tests to helix only on public builds, official scheduled builds or manual official builds. + condition: ${{ or(eq(parameters.isOfficialBuild, 'false'), notIn(variables['Build.Reason'], 'BatchedCI', 'IndividualCI')) }} targetOS: ${{ parameters.targetOS }} archGroup: $(_architecture) configuration: $(_BuildConfig) diff --git a/eng/pipelines/helix.yml b/eng/pipelines/helix.yml index b6395d277952..a1f478cd9a5d 100644 --- a/eng/pipelines/helix.yml +++ b/eng/pipelines/helix.yml @@ -12,6 +12,7 @@ parameters: officialBuildId: '' enableAzurePipelinesReporter: '' # true | false outerloop: '' # true | false + condition: always() steps: - script: ${{ parameters.msbuildScript }} @@ -32,5 +33,6 @@ steps: /p:EnableAzurePipelinesReporter=${{ parameters.enableAzurePipelinesReporter }} /bl:$(Build.SourcesDirectory)/artifacts/log/$(_BuildConfig)/SendToHelix.binlog displayName: Send to Helix + condition: ${{ parameters.condition }} env: SYSTEM_ACCESSTOKEN: $(System.AccessToken) # We need to set this env var to publish helix results to Azure Dev Ops From 23372cc889de2c3d76dcb4fbaeffe70c7c0c3c4f Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Wed, 1 May 2019 13:39:49 +0000 Subject: [PATCH 132/607] Update dependencies from https://github.com/dotnet/coreclr build 20190430.79 (#37328) - Microsoft.NET.Sdk.IL - 3.0.0-preview6-27630-79 - Microsoft.NETCore.ILAsm - 3.0.0-preview6-27630-79 - Microsoft.NETCore.Runtime.CoreCLR - 3.0.0-preview6-27630-79 --- eng/Version.Details.xml | 12 ++++++------ eng/Versions.props | 4 ++-- global.json | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 6ede6d6c7e98..a22262a73a75 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -1,16 +1,16 @@ - + https://github.com/dotnet/coreclr - 94b7f1d2e46c03d269a763c8c996810933c24890 + 7a24a538cd265993e5864179f51781398c28ecdf - + https://github.com/dotnet/coreclr - 94b7f1d2e46c03d269a763c8c996810933c24890 + 7a24a538cd265993e5864179f51781398c28ecdf - + https://github.com/dotnet/coreclr - 94b7f1d2e46c03d269a763c8c996810933c24890 + 7a24a538cd265993e5864179f51781398c28ecdf diff --git a/eng/Versions.props b/eng/Versions.props index 264ce7303b8b..6e2de19a2854 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -40,8 +40,8 @@ 3.0.0-preview6-27629-07 3.0.0-preview6-27629-07 - 3.0.0-preview6-27630-77 - 3.0.0-preview6-27630-77 + 3.0.0-preview6-27630-79 + 3.0.0-preview6-27630-79 3.0.0-preview6.19229.9 4.6.0-preview6.19229.9 diff --git a/global.json b/global.json index 5ea855bfb1f4..859129b226a1 100644 --- a/global.json +++ b/global.json @@ -5,6 +5,6 @@ "msbuild-sdks": { "Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19229.8", "Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19229.8", - "Microsoft.NET.Sdk.IL": "3.0.0-preview6-27630-77" + "Microsoft.NET.Sdk.IL": "3.0.0-preview6-27630-79" } } From ddc6590db7e6cef4b720a279a55145921cc76b2d Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Wed, 1 May 2019 13:46:23 +0000 Subject: [PATCH 133/607] [master] Update dependencies from dnceng/internal/dotnet-optimization (#37219) * Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-optimization build 20190425.3 - optimization.windows_nt-x64.IBC.CoreFx - 99.99.99-master-20190425.3 * Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-optimization build 20190427.1 - optimization.windows_nt-x64.IBC.CoreFx - 99.99.99-master-20190427.1 * Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-optimization build 20190428.1 - optimization.windows_nt-x64.IBC.CoreFx - 99.99.99-master-20190428.1 * Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-optimization build 20190429.1 - optimization.windows_nt-x64.IBC.CoreFx - 99.99.99-master-20190429.1 * Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-optimization build 20190430.1 - optimization.windows_nt-x64.IBC.CoreFx - 99.99.99-master-20190430.1 * Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-optimization build 20190501.1 - optimization.windows_nt-x64.IBC.CoreFx - 99.99.99-master-20190501.1 --- eng/Version.Details.xml | 4 ++-- eng/Versions.props | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index a22262a73a75..ff17bc0fa95f 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -94,9 +94,9 @@ https://github.com/dotnet/arcade a7a250e9c13147134543c35fef2fb81f19592edf - + https://dev.azure.com/dnceng/internal/_git/dotnet-optimization - 25802b2fd96e89bacf720353ed66aa3c7b107bfb + dbd52181d77b595c15dbf1cf0fd403f45528b2b5 diff --git a/eng/Versions.props b/eng/Versions.props index 6e2de19a2854..20dbbffda49e 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -48,6 +48,6 @@ 2.1.0-prerelease.19230.1 - 99.99.99-master-20190425.1 + 99.99.99-master-20190501.1 From 787f87fc781ca1f42d69b27576db0c9dce913700 Mon Sep 17 00:00:00 2001 From: dudu Date: Wed, 1 May 2019 23:10:57 +0800 Subject: [PATCH 134/607] Use Dns.GetHostAddresses in Socket.Connect (#37324) Replace Dns.GetHostAddressesAsync with Dns.GetHostAddresses in Socket.Connect --- src/System.Net.Sockets/src/System/Net/Sockets/Socket.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/System.Net.Sockets/src/System/Net/Sockets/Socket.cs b/src/System.Net.Sockets/src/System/Net/Sockets/Socket.cs index 7d04f748ece7..acb5405f4b13 100644 --- a/src/System.Net.Sockets/src/System/Net/Sockets/Socket.cs +++ b/src/System.Net.Sockets/src/System/Net/Sockets/Socket.cs @@ -899,7 +899,7 @@ public void Connect(string host, int port) } else { - IPAddress[] addresses = Dns.GetHostAddressesAsync(host).GetAwaiter().GetResult(); + IPAddress[] addresses = Dns.GetHostAddresses(host); Connect(addresses, port); } From 07b6760a1a84251a50f744e585e4da5f71a25e68 Mon Sep 17 00:00:00 2001 From: Stephen Toub Date: Wed, 1 May 2019 11:57:35 -0400 Subject: [PATCH 135/607] Add ManualResetValueTaskSourceCore / AsyncIterateMethodBuilder to Microsoft.Bcl.AsyncInterfaces (#37320) * Add ManualResetValueTaskSourceCore / AsyncIterateMethodBuilder to Microsoft.Bcl.AsyncInterfaces These two types needed modifications to target .NET Standard 2.0 and are the necessary pieces to enable the compiler to compile async iterators. - Copied ManualResetValueTaskSourceCore.cs from coreclr and tweaked it. I opted to do this rather than ifdef because the changes are not localized and I didn't want to significantly perturb the primary implementation. - Added a few ifdefs to the shared AsyncIteratorMethodBuilder. It already had ifdefs, so I just added to it. - Added a test project, and included the existing ManualResetValueTaskSourceCore tests. I had to disable two of the tests because of some of the optimization differences. - Augmented those tests to validate that the compiler is able to successfully generate iterators and await foreach them. * Address PR feedback --- .../AsyncIteratorMethodBuilder.cs | 4 +- .../Microsoft.Bcl.AsyncInterfaces.Forwards.cs | 2 + .../ref/Microsoft.Bcl.AsyncInterfaces.cs | 26 ++ .../ref/Microsoft.Bcl.AsyncInterfaces.csproj | 1 + .../src/Microsoft.Bcl.AsyncInterfaces.csproj | 4 +- .../AsyncIteratorMethodBuilder.cs | 62 ++++ .../Sources/ManualResetValueTaskSourceCore.cs | 272 ++++++++++++++++++ .../tests/Configurations.props | 7 + ...Microsoft.Bcl.AsyncInterfaces.Tests.csproj | 14 + .../tests/ManualResetValueTaskSourceTests.cs | 66 +++-- 10 files changed, 430 insertions(+), 28 deletions(-) create mode 100644 src/Microsoft.Bcl.AsyncInterfaces/src/System/Runtime/CompilerServices/AsyncIteratorMethodBuilder.cs create mode 100644 src/Microsoft.Bcl.AsyncInterfaces/src/System/Threading/Tasks/Sources/ManualResetValueTaskSourceCore.cs create mode 100644 src/Microsoft.Bcl.AsyncInterfaces/tests/Configurations.props create mode 100644 src/Microsoft.Bcl.AsyncInterfaces/tests/Microsoft.Bcl.AsyncInterfaces.Tests.csproj diff --git a/src/Common/src/CoreLib/System/Runtime/CompilerServices/AsyncIteratorMethodBuilder.cs b/src/Common/src/CoreLib/System/Runtime/CompilerServices/AsyncIteratorMethodBuilder.cs index 942a867b034f..bc5e4c0be9c5 100644 --- a/src/Common/src/CoreLib/System/Runtime/CompilerServices/AsyncIteratorMethodBuilder.cs +++ b/src/Common/src/CoreLib/System/Runtime/CompilerServices/AsyncIteratorMethodBuilder.cs @@ -42,7 +42,7 @@ public static AsyncIteratorMethodBuilder Create() => /// The state machine instance, passed by reference. [MethodImpl(MethodImplOptions.AggressiveInlining)] public void MoveNext(ref TStateMachine stateMachine) where TStateMachine : IAsyncStateMachine => -#if CORERT +#if CORERT || MICROSOFT_BCL_ASYNCINTERFACES_PACKAGE _methodBuilder.Start(ref stateMachine); #else AsyncMethodBuilderCore.Start(ref stateMachine); @@ -71,7 +71,9 @@ public void AwaitUnsafeOnCompleted(ref TAwaiter awaiter /// Marks iteration as being completed, whether successfully or otherwise. public void Complete() => _methodBuilder.SetResult(); +#if !MICROSOFT_BCL_ASYNCINTERFACES_PACKAGE /// Gets an object that may be used to uniquely identify this builder to the debugger. internal object ObjectIdForDebugger => _methodBuilder.ObjectIdForDebugger; +#endif } } diff --git a/src/Microsoft.Bcl.AsyncInterfaces/ref/Microsoft.Bcl.AsyncInterfaces.Forwards.cs b/src/Microsoft.Bcl.AsyncInterfaces/ref/Microsoft.Bcl.AsyncInterfaces.Forwards.cs index 8f737d621523..6b61d3dc9c96 100644 --- a/src/Microsoft.Bcl.AsyncInterfaces/ref/Microsoft.Bcl.AsyncInterfaces.Forwards.cs +++ b/src/Microsoft.Bcl.AsyncInterfaces/ref/Microsoft.Bcl.AsyncInterfaces.Forwards.cs @@ -5,6 +5,8 @@ [assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.IAsyncDisposable))] [assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Collections.Generic.IAsyncEnumerable<>))] [assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Collections.Generic.IAsyncEnumerator<>))] +[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.CompilerServices.AsyncIteratorMethodBuilder))] [assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.CompilerServices.AsyncIteratorStateMachineAttribute))] [assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.CompilerServices.ConfiguredAsyncDisposable))] [assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.CompilerServices.ConfiguredCancelableAsyncEnumerable<>))] +[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Threading.Tasks.Sources.ManualResetValueTaskSourceCore<>))] diff --git a/src/Microsoft.Bcl.AsyncInterfaces/ref/Microsoft.Bcl.AsyncInterfaces.cs b/src/Microsoft.Bcl.AsyncInterfaces/ref/Microsoft.Bcl.AsyncInterfaces.cs index fefe5c5c1e74..caa86d3d82bf 100644 --- a/src/Microsoft.Bcl.AsyncInterfaces/ref/Microsoft.Bcl.AsyncInterfaces.cs +++ b/src/Microsoft.Bcl.AsyncInterfaces/ref/Microsoft.Bcl.AsyncInterfaces.cs @@ -26,6 +26,15 @@ public partial interface IAsyncEnumerator : System.IAsyncDisposable } namespace System.Runtime.CompilerServices { + public partial struct AsyncIteratorMethodBuilder + { + private object _dummy; + public void AwaitOnCompleted(ref TAwaiter awaiter, ref TStateMachine stateMachine) where TAwaiter : System.Runtime.CompilerServices.INotifyCompletion where TStateMachine : System.Runtime.CompilerServices.IAsyncStateMachine { } + public void AwaitUnsafeOnCompleted(ref TAwaiter awaiter, ref TStateMachine stateMachine) where TAwaiter : System.Runtime.CompilerServices.ICriticalNotifyCompletion where TStateMachine : System.Runtime.CompilerServices.IAsyncStateMachine { } + public void Complete() { } + public static System.Runtime.CompilerServices.AsyncIteratorMethodBuilder Create() { throw null; } + public void MoveNext(ref TStateMachine stateMachine) where TStateMachine : System.Runtime.CompilerServices.IAsyncStateMachine { } + } [System.AttributeUsageAttribute(System.AttributeTargets.Method, Inherited=false, AllowMultiple=false)] public sealed partial class AsyncIteratorStateMachineAttribute : System.Runtime.CompilerServices.StateMachineAttribute { @@ -54,3 +63,20 @@ public readonly partial struct Enumerator } } } +namespace System.Threading.Tasks.Sources +{ + public partial struct ManualResetValueTaskSourceCore + { + private TResult _result; + private object _dummy; + private int _dummyPrimitive; + public bool RunContinuationsAsynchronously { get { throw null; } set { } } + public short Version { get { throw null; } } + public TResult GetResult(short token) { throw null; } + public System.Threading.Tasks.Sources.ValueTaskSourceStatus GetStatus(short token) { throw null; } + public void OnCompleted(System.Action continuation, object state, short token, System.Threading.Tasks.Sources.ValueTaskSourceOnCompletedFlags flags) { } + public void Reset() { } + public void SetException(System.Exception error) { } + public void SetResult(TResult result) { } + } +} diff --git a/src/Microsoft.Bcl.AsyncInterfaces/ref/Microsoft.Bcl.AsyncInterfaces.csproj b/src/Microsoft.Bcl.AsyncInterfaces/ref/Microsoft.Bcl.AsyncInterfaces.csproj index 3c58faf3003b..e61b49621314 100644 --- a/src/Microsoft.Bcl.AsyncInterfaces/ref/Microsoft.Bcl.AsyncInterfaces.csproj +++ b/src/Microsoft.Bcl.AsyncInterfaces/ref/Microsoft.Bcl.AsyncInterfaces.csproj @@ -13,5 +13,6 @@ + \ No newline at end of file diff --git a/src/Microsoft.Bcl.AsyncInterfaces/src/Microsoft.Bcl.AsyncInterfaces.csproj b/src/Microsoft.Bcl.AsyncInterfaces/src/Microsoft.Bcl.AsyncInterfaces.csproj index 2e98b39e5e3b..798c0e1c0f92 100644 --- a/src/Microsoft.Bcl.AsyncInterfaces/src/Microsoft.Bcl.AsyncInterfaces.csproj +++ b/src/Microsoft.Bcl.AsyncInterfaces/src/Microsoft.Bcl.AsyncInterfaces.csproj @@ -5,6 +5,8 @@ true + + ProductionCode\Common\CoreLib\System\Collections\Generic\IAsyncEnumerable.cs @@ -26,7 +28,7 @@ - + \ No newline at end of file diff --git a/src/Microsoft.Bcl.AsyncInterfaces/src/System/Runtime/CompilerServices/AsyncIteratorMethodBuilder.cs b/src/Microsoft.Bcl.AsyncInterfaces/src/System/Runtime/CompilerServices/AsyncIteratorMethodBuilder.cs new file mode 100644 index 000000000000..08e8e3192cca --- /dev/null +++ b/src/Microsoft.Bcl.AsyncInterfaces/src/System/Runtime/CompilerServices/AsyncIteratorMethodBuilder.cs @@ -0,0 +1,62 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +// NOTE: This is a copy of +// https://github.com/dotnet/coreclr/blame/07b3afc27304800f00975c8fd4836b319aaa8820/src/System.Private.CoreLib/shared/System/Runtime/CompilerServices/AsyncIteratorMethodBuilder.cs +// modified to be compilable against .NET Standard 2.0. Key differences: +// - Uses the wrapped AsyncTaskMethodBuilder for Create and MoveNext. +// - Uses a custom object for the debugger identity. +// - Nullable annotations removed. + +using System.Runtime.InteropServices; +using System.Threading; + +namespace System.Runtime.CompilerServices +{ + /// Represents a builder for asynchronous iterators. + [StructLayout(LayoutKind.Auto)] + public struct AsyncIteratorMethodBuilder + { + private AsyncTaskMethodBuilder _methodBuilder; // mutable struct; do not make it readonly + private object _id; + + /// Creates an instance of the struct. + /// The initialized instance. + public static AsyncIteratorMethodBuilder Create() => + new AsyncIteratorMethodBuilder() { _methodBuilder = AsyncTaskMethodBuilder.Create() }; + + /// Invokes on the state machine while guarding the . + /// The type of the state machine. + /// The state machine instance, passed by reference. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public void MoveNext(ref TStateMachine stateMachine) where TStateMachine : IAsyncStateMachine => + _methodBuilder.Start(ref stateMachine); + + /// Schedules the state machine to proceed to the next action when the specified awaiter completes. + /// The type of the awaiter. + /// The type of the state machine. + /// The awaiter. + /// The state machine. + public void AwaitOnCompleted(ref TAwaiter awaiter, ref TStateMachine stateMachine) + where TAwaiter : INotifyCompletion + where TStateMachine : IAsyncStateMachine => + _methodBuilder.AwaitOnCompleted(ref awaiter, ref stateMachine); + + /// Schedules the state machine to proceed to the next action when the specified awaiter completes. + /// The type of the awaiter. + /// The type of the state machine. + /// The awaiter. + /// The state machine. + public void AwaitUnsafeOnCompleted(ref TAwaiter awaiter, ref TStateMachine stateMachine) + where TAwaiter : ICriticalNotifyCompletion + where TStateMachine : IAsyncStateMachine => + _methodBuilder.AwaitUnsafeOnCompleted(ref awaiter, ref stateMachine); + + /// Marks iteration as being completed, whether successfully or otherwise. + public void Complete() => _methodBuilder.SetResult(); + + /// Gets an object that may be used to uniquely identify this builder to the debugger. + internal object ObjectIdForDebugger => _id ?? Interlocked.CompareExchange(ref _id, new object(), null) ?? _id; + } +} diff --git a/src/Microsoft.Bcl.AsyncInterfaces/src/System/Threading/Tasks/Sources/ManualResetValueTaskSourceCore.cs b/src/Microsoft.Bcl.AsyncInterfaces/src/System/Threading/Tasks/Sources/ManualResetValueTaskSourceCore.cs new file mode 100644 index 000000000000..06d0da1cf3d0 --- /dev/null +++ b/src/Microsoft.Bcl.AsyncInterfaces/src/System/Threading/Tasks/Sources/ManualResetValueTaskSourceCore.cs @@ -0,0 +1,272 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +// NOTE: This is a copy of +// https://github.com/dotnet/coreclr/blame/07b3afc27304800f00975c8fd4836b319aaa8820/src/System.Private.CoreLib/shared/System/Threading/Tasks/Sources/ManualResetValueTaskSourceCore.cs, +// modified to be compilable against .NET Standard 2.0. It is missing optimizations present in the .NET Core implementation and should +// only be used when a .NET Standard 2.0 implementation is required. Key differences: +// - ThrowHelper call sites are replaced by normal exception throws. +// - ThreadPool.{Unsafe}QueueUserWorkItem calls that accepted Action/object/bool arguments are replaced by Task.Factory.StartNew usage. +// - ExecutionContext.RunInternal are replaced by ExecutionContext.Run. +// - Nullability annotations are removed. + +using System.Diagnostics; +using System.Runtime.ExceptionServices; +using System.Runtime.InteropServices; + +namespace System.Threading.Tasks.Sources +{ + /// Provides the core logic for implementing a manual-reset or . + /// + [StructLayout(LayoutKind.Auto)] + public struct ManualResetValueTaskSourceCore + { + /// + /// The callback to invoke when the operation completes if was called before the operation completed, + /// or if the operation completed before a callback was supplied, + /// or null if a callback hasn't yet been provided and the operation hasn't yet completed. + /// + private Action _continuation; + /// State to pass to . + private object _continuationState; + /// to flow to the callback, or null if no flowing is required. + private ExecutionContext _executionContext; + /// + /// A "captured" or with which to invoke the callback, + /// or null if no special context is required. + /// + private object _capturedContext; + /// Whether the current operation has completed. + private bool _completed; + /// The result with which the operation succeeded, or the default value if it hasn't yet completed or failed. + private TResult _result; + /// The exception with which the operation failed, or null if it hasn't yet completed or completed successfully. + private ExceptionDispatchInfo _error; + /// The current version of this value, used to help prevent misuse. + private short _version; + + /// Gets or sets whether to force continuations to run asynchronously. + /// Continuations may run asynchronously if this is false, but they'll never run synchronously if this is true. + public bool RunContinuationsAsynchronously { get; set; } + + /// Resets to prepare for the next operation. + public void Reset() + { + // Reset/update state for the next use/await of this instance. + _version++; + _completed = false; + _result = default!; // TODO-NULLABLE-GENERIC + _error = null; + _executionContext = null; + _capturedContext = null; + _continuation = null; + _continuationState = null; + } + + /// Completes with a successful result. + /// The result. + public void SetResult(TResult result) + { + _result = result; + SignalCompletion(); + } + + /// Complets with an error. + /// + public void SetException(Exception error) + { + _error = ExceptionDispatchInfo.Capture(error); + SignalCompletion(); + } + + /// Gets the operation version. + public short Version => _version; + + /// Gets the status of the operation. + /// Opaque value that was provided to the 's constructor. + public ValueTaskSourceStatus GetStatus(short token) + { + ValidateToken(token); + return + _continuation == null || !_completed ? ValueTaskSourceStatus.Pending : + _error == null ? ValueTaskSourceStatus.Succeeded : + _error.SourceException is OperationCanceledException ? ValueTaskSourceStatus.Canceled : + ValueTaskSourceStatus.Faulted; + } + + /// Gets the result of the operation. + /// Opaque value that was provided to the 's constructor. + public TResult GetResult(short token) + { + ValidateToken(token); + if (!_completed) + { + throw new InvalidOperationException(); + } + + _error?.Throw(); + return _result; + } + + /// Schedules the continuation action for this operation. + /// The continuation to invoke when the operation has completed. + /// The state object to pass to when it's invoked. + /// Opaque value that was provided to the 's constructor. + /// The flags describing the behavior of the continuation. + public void OnCompleted(Action continuation, object state, short token, ValueTaskSourceOnCompletedFlags flags) // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + { + if (continuation == null) + { + throw new ArgumentNullException(nameof(continuation)); + } + ValidateToken(token); + + if ((flags & ValueTaskSourceOnCompletedFlags.FlowExecutionContext) != 0) + { + _executionContext = ExecutionContext.Capture(); + } + + if ((flags & ValueTaskSourceOnCompletedFlags.UseSchedulingContext) != 0) + { + SynchronizationContext sc = SynchronizationContext.Current; + if (sc != null && sc.GetType() != typeof(SynchronizationContext)) + { + _capturedContext = sc; + } + else + { + TaskScheduler ts = TaskScheduler.Current; + if (ts != TaskScheduler.Default) + { + _capturedContext = ts; + } + } + } + + // We need to set the continuation state before we swap in the delegate, so that + // if there's a race between this and SetResult/Exception and SetResult/Exception + // sees the _continuation as non-null, it'll be able to invoke it with the state + // stored here. However, this also means that if this is used incorrectly (e.g. + // awaited twice concurrently), _continuationState might get erroneously overwritten. + // To minimize the chances of that, we check preemptively whether _continuation + // is already set to something other than the completion sentinel. + + object oldContinuation = _continuation; + if (oldContinuation == null) + { + _continuationState = state; + oldContinuation = Interlocked.CompareExchange(ref _continuation, continuation, null); + } + + if (oldContinuation != null) + { + // Operation already completed, so we need to queue the supplied callback. + if (!ReferenceEquals(oldContinuation, ManualResetValueTaskSourceCoreShared.s_sentinel)) + { + throw new InvalidOperationException(); + } + + switch (_capturedContext) + { + case null: + Task.Factory.StartNew(continuation, state, CancellationToken.None, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default); + break; + + case SynchronizationContext sc: + sc.Post(s => + { + var tuple = (Tuple, object>)s; + tuple.Item1(tuple.Item2); + }, Tuple.Create(continuation, state)); + break; + + case TaskScheduler ts: + Task.Factory.StartNew(continuation, state, CancellationToken.None, TaskCreationOptions.DenyChildAttach, ts); + break; + } + } + } + + /// Ensures that the specified token matches the current version. + /// The token supplied by . + private void ValidateToken(short token) + { + if (token != _version) + { + throw new InvalidOperationException(); + } + } + + /// Signals that the operation has completed. Invoked after the result or error has been set. + private void SignalCompletion() + { + if (_completed) + { + throw new InvalidOperationException(); + } + _completed = true; + + if (_continuation != null || Interlocked.CompareExchange(ref _continuation, ManualResetValueTaskSourceCoreShared.s_sentinel, null) != null) + { + if (_executionContext != null) + { + ExecutionContext.Run( + _executionContext, + s => ((ManualResetValueTaskSourceCore)s).InvokeContinuation(), + this); + } + else + { + InvokeContinuation(); + } + } + } + + /// + /// Invokes the continuation with the appropriate captured context / scheduler. + /// This assumes that if is not null we're already + /// running within that . + /// + private void InvokeContinuation() + { + Debug.Assert(_continuation != null); + + switch (_capturedContext) + { + case null: + if (RunContinuationsAsynchronously) + { + Task.Factory.StartNew(_continuation, _continuationState, CancellationToken.None, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default); + } + else + { + _continuation(_continuationState); + } + break; + + case SynchronizationContext sc: + sc.Post(s => + { + var state = (Tuple, object>)s; + state.Item1(state.Item2); + }, Tuple.Create(_continuation, _continuationState)); + break; + + case TaskScheduler ts: + Task.Factory.StartNew(_continuation, _continuationState, CancellationToken.None, TaskCreationOptions.DenyChildAttach, ts); + break; + } + } + } + + internal static class ManualResetValueTaskSourceCoreShared // separated out of generic to avoid unnecessary duplication + { + internal static readonly Action s_sentinel = CompletionSentinel; + private static void CompletionSentinel(object _) // named method to aid debugging + { + Debug.Fail("The sentinel delegate should never be invoked."); + throw new InvalidOperationException(); + } + } +} diff --git a/src/Microsoft.Bcl.AsyncInterfaces/tests/Configurations.props b/src/Microsoft.Bcl.AsyncInterfaces/tests/Configurations.props new file mode 100644 index 000000000000..581054d46db4 --- /dev/null +++ b/src/Microsoft.Bcl.AsyncInterfaces/tests/Configurations.props @@ -0,0 +1,7 @@ + + + + netstandard; + + + \ No newline at end of file diff --git a/src/Microsoft.Bcl.AsyncInterfaces/tests/Microsoft.Bcl.AsyncInterfaces.Tests.csproj b/src/Microsoft.Bcl.AsyncInterfaces/tests/Microsoft.Bcl.AsyncInterfaces.Tests.csproj new file mode 100644 index 000000000000..572955e4966a --- /dev/null +++ b/src/Microsoft.Bcl.AsyncInterfaces/tests/Microsoft.Bcl.AsyncInterfaces.Tests.csproj @@ -0,0 +1,14 @@ + + + {72E21903-0FBA-444E-9855-3B4F05DFC1F9} + netstandard-Debug;netstandard-Release + + + + Common\tests\System\Threading\Tasks\Sources\ManualResetValueTaskSource.cs + + + System.Threading.Tasks.Extensions\tests\ManualResetValueTaskSourceTests.cs + + + \ No newline at end of file diff --git a/src/System.Threading.Tasks.Extensions/tests/ManualResetValueTaskSourceTests.cs b/src/System.Threading.Tasks.Extensions/tests/ManualResetValueTaskSourceTests.cs index 9242c2c672ff..15d7f1caa001 100644 --- a/src/System.Threading.Tasks.Extensions/tests/ManualResetValueTaskSourceTests.cs +++ b/src/System.Threading.Tasks.Extensions/tests/ManualResetValueTaskSourceTests.cs @@ -169,6 +169,7 @@ public void SetException_OperationCanceledException_StatusIsCanceled() Assert.Same(e, Assert.Throws(() => mrvts.GetResult(0))); } + [SkipOnTargetFramework(~TargetFrameworkMonikers.Netcoreapp)] [Theory] [InlineData(false)] [InlineData(true)] @@ -192,6 +193,7 @@ public void FlowContext_SetBeforeOnCompleted_FlowsIfExpected(bool flowContext) mres.Wait(); } + [SkipOnTargetFramework(~TargetFrameworkMonikers.Netcoreapp)] [Theory] [InlineData(false)] [InlineData(true)] @@ -399,43 +401,55 @@ protected override void QueueTask(Task task) protected override IEnumerable GetScheduledTasks() => null; } - [Fact] - public async Task AsyncEnumerable_Success() + [Theory] + [InlineData(false, false)] + [InlineData(false, true)] + [InlineData(true, false)] + [InlineData(true, true)] + public async Task AsyncEnumerable_Success(bool awaitForeach, bool asyncIterator) { - // Equivalent to: - // int total = 0; - // foreach async(int i in CountAsync(20)) - // { - // total += i; - // } - // Assert.Equal(190, i); - - IAsyncEnumerator enumerator = CountAsync(20).GetAsyncEnumerator(); - try + IAsyncEnumerable enumerable = asyncIterator ? + CountCompilerAsync(20) : + CountManualAsync(20); + + if (awaitForeach) { int total = 0; - while (await enumerator.MoveNextAsync()) + await foreach (int i in enumerable) { - total += enumerator.Current; + total += i; } Assert.Equal(190, total); } - finally + else + { + IAsyncEnumerator enumerator = enumerable.GetAsyncEnumerator(); + try + { + int total = 0; + while (await enumerator.MoveNextAsync()) + { + total += enumerator.Current; + } + Assert.Equal(190, total); + } + finally + { + await enumerator.DisposeAsync(); + } + } + } + + internal static async IAsyncEnumerable CountCompilerAsync(int items) + { + for (int i = 0; i < items; i++) { - await enumerator.DisposeAsync(); + await Task.Delay(i).ConfigureAwait(false); + yield return i; } } - // Approximate compiler-generated code for: - // internal static AsyncEnumerable CountAsync(int items) - // { - // for (int i = 0; i < items; i++) - // { - // await Task.Delay(i).ConfigureAwait(false); - // yield return i; - // } - // } - internal static IAsyncEnumerable CountAsync(int items) => + internal static IAsyncEnumerable CountManualAsync(int items) => new CountAsyncEnumerable(items); private sealed class CountAsyncEnumerable : From 5cb6b8b340aafc3d7c6afe212fab103ef697fa02 Mon Sep 17 00:00:00 2001 From: Stephen Toub Date: Wed, 1 May 2019 12:45:35 -0400 Subject: [PATCH 136/607] Fix two more System.Net async instead of sync calls (#37329) These were written as sync-over-async before the sync APIs were available. Now that the sync APIs are available, use them. --- src/System.Net.Sockets/src/System/Net/Sockets/UDPClient.cs | 2 +- src/System.Net.WebProxy/src/System/Net/WebProxy.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/System.Net.Sockets/src/System/Net/Sockets/UDPClient.cs b/src/System.Net.Sockets/src/System/Net/Sockets/UDPClient.cs index cb2d2fb6c8d9..0cbc27f54b5e 100644 --- a/src/System.Net.Sockets/src/System/Net/Sockets/UDPClient.cs +++ b/src/System.Net.Sockets/src/System/Net/Sockets/UDPClient.cs @@ -327,7 +327,7 @@ public IAsyncResult BeginSend(byte[] datagram, int bytes, string hostname, int p IPEndPoint ipEndPoint = null; if (hostname != null && port != 0) { - IPAddress[] addresses = Dns.GetHostAddressesAsync(hostname).GetAwaiter().GetResult(); + IPAddress[] addresses = Dns.GetHostAddresses(hostname); int i = 0; for (; i < addresses.Length && !IsAddressFamilyCompatible(addresses[i].AddressFamily); i++) diff --git a/src/System.Net.WebProxy/src/System/Net/WebProxy.cs b/src/System.Net.WebProxy/src/System/Net/WebProxy.cs index 325d82c204ae..a97631f95356 100644 --- a/src/System.Net.WebProxy/src/System/Net/WebProxy.cs +++ b/src/System.Net.WebProxy/src/System/Net/WebProxy.cs @@ -184,7 +184,7 @@ private static bool IsAddressLocal(IPAddress ipAddress) // Perf note: The .NET Framework caches this and then uses network change notifications to track // whether the set should be recomputed. We could consider doing the same if this is observed as // a bottleneck, but that tracking has its own costs. - IPAddress[] localAddresses = Dns.GetHostEntryAsync(Dns.GetHostName()).GetAwaiter().GetResult().AddressList; // TODO: Use synchronous GetHostEntry when available + IPAddress[] localAddresses = Dns.GetHostEntry(Dns.GetHostName()).AddressList; for (int i = 0; i < localAddresses.Length; i++) { if (ipAddress.Equals(localAddresses[i])) From 26320805c8559aabc92c643707920a97d334ec5b Mon Sep 17 00:00:00 2001 From: Stephen Toub Date: Wed, 1 May 2019 13:52:38 -0400 Subject: [PATCH 137/607] Delete stale compilation constants from AsyncIteratorMethodBuilder (#37331) I accidentally left these MICROSOFT_BCL_ASYNCINTERFACES_PACKAGE references in as part of some recent churn. This compilation constant isn't set anywhere. And the CORERT ifdef is no longer needed now that we've consolidated the code to shared. --- .../Runtime/CompilerServices/AsyncIteratorMethodBuilder.cs | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/Common/src/CoreLib/System/Runtime/CompilerServices/AsyncIteratorMethodBuilder.cs b/src/Common/src/CoreLib/System/Runtime/CompilerServices/AsyncIteratorMethodBuilder.cs index bc5e4c0be9c5..b8c23aebc6ca 100644 --- a/src/Common/src/CoreLib/System/Runtime/CompilerServices/AsyncIteratorMethodBuilder.cs +++ b/src/Common/src/CoreLib/System/Runtime/CompilerServices/AsyncIteratorMethodBuilder.cs @@ -42,11 +42,7 @@ public static AsyncIteratorMethodBuilder Create() => /// The state machine instance, passed by reference. [MethodImpl(MethodImplOptions.AggressiveInlining)] public void MoveNext(ref TStateMachine stateMachine) where TStateMachine : IAsyncStateMachine => -#if CORERT || MICROSOFT_BCL_ASYNCINTERFACES_PACKAGE - _methodBuilder.Start(ref stateMachine); -#else AsyncMethodBuilderCore.Start(ref stateMachine); -#endif /// Schedules the state machine to proceed to the next action when the specified awaiter completes. /// The type of the awaiter. @@ -71,9 +67,7 @@ public void AwaitUnsafeOnCompleted(ref TAwaiter awaiter /// Marks iteration as being completed, whether successfully or otherwise. public void Complete() => _methodBuilder.SetResult(); -#if !MICROSOFT_BCL_ASYNCINTERFACES_PACKAGE /// Gets an object that may be used to uniquely identify this builder to the debugger. internal object ObjectIdForDebugger => _methodBuilder.ObjectIdForDebugger; -#endif } } From 5ed8c52f6a6d78267fe5857f7a67780ea02cc7a8 Mon Sep 17 00:00:00 2001 From: Santiago Fernandez Madero Date: Wed, 1 May 2019 12:06:41 -0700 Subject: [PATCH 138/607] Send to helix only when previous steps succeeded (#37332) --- eng/pipelines/corefx-base.yml | 2 +- eng/pipelines/helix.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/pipelines/corefx-base.yml b/eng/pipelines/corefx-base.yml index 3989322dc45d..4db5f431197e 100644 --- a/eng/pipelines/corefx-base.yml +++ b/eng/pipelines/corefx-base.yml @@ -190,7 +190,7 @@ jobs: - template: /eng/pipelines/helix.yml parameters: # send tests to helix only on public builds, official scheduled builds or manual official builds. - condition: ${{ or(eq(parameters.isOfficialBuild, 'false'), notIn(variables['Build.Reason'], 'BatchedCI', 'IndividualCI')) }} + condition: or(eq(${{ parameters.isOfficialBuild }}, 'false'), notIn(variables['Build.Reason'], 'BatchedCI', 'IndividualCI')) targetOS: ${{ parameters.targetOS }} archGroup: $(_architecture) configuration: $(_BuildConfig) diff --git a/eng/pipelines/helix.yml b/eng/pipelines/helix.yml index a1f478cd9a5d..cf1bf9d83822 100644 --- a/eng/pipelines/helix.yml +++ b/eng/pipelines/helix.yml @@ -33,6 +33,6 @@ steps: /p:EnableAzurePipelinesReporter=${{ parameters.enableAzurePipelinesReporter }} /bl:$(Build.SourcesDirectory)/artifacts/log/$(_BuildConfig)/SendToHelix.binlog displayName: Send to Helix - condition: ${{ parameters.condition }} + condition: and(succeeded(), ${{ parameters.condition }}) env: SYSTEM_ACCESSTOKEN: $(System.AccessToken) # We need to set this env var to publish helix results to Azure Dev Ops From 67a929064887d09adaf7f07b0ae66316cabfa562 Mon Sep 17 00:00:00 2001 From: dotnet-maestro-bot Date: Wed, 1 May 2019 12:57:17 -0700 Subject: [PATCH 139/607] Update ProjectNTfs, ProjectNTfsTestILC to beta-27701-01, beta-27701-01, respectively (#36873) --- eng/dependencies.props | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/eng/dependencies.props b/eng/dependencies.props index 955870c67947..713a46f2da88 100644 --- a/eng/dependencies.props +++ b/eng/dependencies.props @@ -9,8 +9,8 @@ These ref versions are pulled from https://github.com/dotnet/versions. --> - c86a1e0c3659a3046d43dc278e9711cd23002d97 - c86a1e0c3659a3046d43dc278e9711cd23002d97 + dcfddcd11246b4bae43860cc239ce01749afc727 + dcfddcd11246b4bae43860cc239ce01749afc727 8bd1ec5fac9f0eec34ff6b34b1d878b4359e02dd @@ -22,9 +22,9 @@ - beta-27612-00 - beta-27612-00 - 1.0.0-beta-27612-00 + beta-27701-01 + beta-27701-01 + 1.0.0-beta-27701-01 4.4.0 From 81b393ccc67dd8126996ab7f652f2a7e05726516 Mon Sep 17 00:00:00 2001 From: Jeremy Barton Date: Wed, 1 May 2019 13:03:19 -0700 Subject: [PATCH 140/607] Fix NullReferenceException when a trusted cert chain fails usage (#37318) * Fix NullReferenceException when a trusted cert chain fails usage A previous change moved overallStatus to be created on demand, but if it made it out to ProcessPolicy before finding the first error it didn't create it first. While adding a test for that it was also discovered that the Windows and Linux chains are inconsistent in where this particular error gets reported. * Fix macOS setting of the NotValidForUsage flag Also change the test to ignore revocation, to avoid macOS failing when it doesn't want to check a CRL. * Reuse one list for all elementStatus expansion --- .../Internal/Cryptography/Pal.OSX/ChainPal.cs | 11 +++-- .../Pal.Unix/OpenSslX509ChainProcessor.cs | 34 +++++++++----- .../tests/ChainTests.cs | 44 +++++++++++++++++++ 3 files changed, 74 insertions(+), 15 deletions(-) diff --git a/src/System.Security.Cryptography.X509Certificates/src/Internal/Cryptography/Pal.OSX/ChainPal.cs b/src/System.Security.Cryptography.X509Certificates/src/Internal/Cryptography/Pal.OSX/ChainPal.cs index dd8e9b664de9..308bfd787d37 100644 --- a/src/System.Security.Cryptography.X509Certificates/src/Internal/Cryptography/Pal.OSX/ChainPal.cs +++ b/src/System.Security.Cryptography.X509Certificates/src/Internal/Cryptography/Pal.OSX/ChainPal.cs @@ -212,11 +212,14 @@ internal void Execute( if (!IsPolicyMatch(elements, applicationPolicy, certificatePolicy)) { - Tuple currentValue = elements[0]; + for (int i = 0; i < elements.Length; i++) + { + Tuple currentValue = elements[i]; - elements[0] = Tuple.Create( - currentValue.Item1, - currentValue.Item2 | (int)X509ChainStatusFlags.NotValidForUsage); + elements[i] = Tuple.Create( + currentValue.Item1, + currentValue.Item2 | (int)X509ChainStatusFlags.NotValidForUsage); + } } FixupRevocationStatus(elements, revocationFlag); diff --git a/src/System.Security.Cryptography.X509Certificates/src/Internal/Cryptography/Pal.Unix/OpenSslX509ChainProcessor.cs b/src/System.Security.Cryptography.X509Certificates/src/Internal/Cryptography/Pal.Unix/OpenSslX509ChainProcessor.cs index e353b16950df..04b1099bde0b 100644 --- a/src/System.Security.Cryptography.X509Certificates/src/Internal/Cryptography/Pal.Unix/OpenSslX509ChainProcessor.cs +++ b/src/System.Security.Cryptography.X509Certificates/src/Internal/Cryptography/Pal.Unix/OpenSslX509ChainProcessor.cs @@ -398,7 +398,7 @@ internal void Finish(OidCollection applicationPolicy, OidCollection certificateP if (applicationPolicy?.Count > 0 || certificatePolicy?.Count > 0) { - ProcessPolicy(elements, overallStatus, applicationPolicy, certificatePolicy); + ProcessPolicy(elements, ref overallStatus, applicationPolicy, certificatePolicy); } ChainStatus = overallStatus?.ToArray() ?? Array.Empty(); @@ -618,7 +618,7 @@ private X509ChainElement[] BuildChainElements( private static void ProcessPolicy( X509ChainElement[] elements, - List overallStatus, + ref List overallStatus, OidCollection applicationPolicy, OidCollection certificatePolicy) { @@ -651,7 +651,10 @@ private static void ProcessPolicy( if (failsPolicyChecks) { - X509ChainElement leafElement = elements[0]; + if (overallStatus == null) + { + overallStatus = new List(); + } X509ChainStatus chainStatus = new X509ChainStatus { @@ -659,16 +662,25 @@ private static void ProcessPolicy( StatusInformation = SR.Chain_NoPolicyMatch, }; - var elementStatus = new List(leafElement.ChainElementStatus.Length + 1); - elementStatus.AddRange(leafElement.ChainElementStatus); - - AddUniqueStatus(elementStatus, ref chainStatus); AddUniqueStatus(overallStatus, ref chainStatus); - elements[0] = new X509ChainElement( - leafElement.Certificate, - elementStatus.ToArray(), - leafElement.Information); + // No individual element can have seen more errors than the chain overall, + // so avoid regrowth of the list. + var elementStatus = new List(overallStatus.Count); + + for (int i = 0; i < elements.Length; i++) + { + X509ChainElement element = elements[i]; + elementStatus.Clear(); + elementStatus.AddRange(element.ChainElementStatus); + + AddUniqueStatus(elementStatus, ref chainStatus); + + elements[i] = new X509ChainElement( + element.Certificate, + elementStatus.ToArray(), + element.Information); + } } } diff --git a/src/System.Security.Cryptography.X509Certificates/tests/ChainTests.cs b/src/System.Security.Cryptography.X509Certificates/tests/ChainTests.cs index be88621bc7e2..0b197cec545b 100644 --- a/src/System.Security.Cryptography.X509Certificates/tests/ChainTests.cs +++ b/src/System.Security.Cryptography.X509Certificates/tests/ChainTests.cs @@ -417,6 +417,50 @@ public static void BuildChain_WithCertificatePolicy_NoMatch() } } + [ConditionalFact(nameof(TrustsMicrosoftDotComRoot))] + public static void BuildChain_FailOnlyApplicationPolicy() + { + using (var microsoftDotCom = new X509Certificate2(TestData.MicrosoftDotComSslCertBytes)) + using (var microsoftDotComRoot = new X509Certificate2(TestData.MicrosoftDotComRootBytes)) + using (ChainHolder holder = new ChainHolder()) + { + holder.Chain.ChainPolicy.ApplicationPolicy.Add(new Oid("0.1.2.3.4", null)); + holder.Chain.ChainPolicy.VerificationTime = microsoftDotCom.NotBefore.AddDays(1); + holder.Chain.ChainPolicy.RevocationMode = X509RevocationMode.NoCheck; + + Assert.False(holder.Chain.Build(microsoftDotCom)); + + Assert.Equal( + X509ChainStatusFlags.NotValidForUsage, + holder.Chain.ChainStatus.Aggregate( + X509ChainStatusFlags.NoError, + (a, status) => a | status.Status)); + + Assert.Equal(3, holder.Chain.ChainElements.Count); + + Assert.Equal(microsoftDotCom.RawData, holder.Chain.ChainElements[0].Certificate.RawData); + Assert.Equal(microsoftDotComRoot.RawData, holder.Chain.ChainElements[2].Certificate.RawData); + + Assert.Equal( + X509ChainStatusFlags.NotValidForUsage, + holder.Chain.ChainElements[0].ChainElementStatus.Aggregate( + X509ChainStatusFlags.NoError, + (a, status) => a | status.Status)); + + Assert.Equal( + X509ChainStatusFlags.NotValidForUsage, + holder.Chain.ChainElements[1].ChainElementStatus.Aggregate( + X509ChainStatusFlags.NoError, + (a, status) => a | status.Status)); + + Assert.Equal( + X509ChainStatusFlags.NotValidForUsage, + holder.Chain.ChainElements[2].ChainElementStatus.Aggregate( + X509ChainStatusFlags.NoError, + (a, status) => a | status.Status)); + } + } + [ConditionalFact(nameof(TrustsMicrosoftDotComRoot), nameof(CanModifyStores))] [OuterLoop(/* Modifies user certificate store */)] public static void BuildChain_MicrosoftDotCom_WithRootCertInUserAndSystemRootCertStores() From 9bb0c8fd8865fc282ea44b67b0738ffbfef96410 Mon Sep 17 00:00:00 2001 From: Stephen Toub Date: Wed, 1 May 2019 16:53:28 -0400 Subject: [PATCH 141/607] Allow Http2Connection header-related processing buffers to grow (#37337) They're currently hard-coded to have a max size. We need to allow them to grow to deal with arbitrarily large headers. (Separately we'll want to enforce the max header size limit.) --- .../SocketsHttpHandler/HPack/HPackDecoder.cs | 26 ++++++++++--------- .../Http/SocketsHttpHandler/HPack/Huffman.cs | 13 +++++++--- .../HttpClientHandlerTest.Headers.cs | 26 +++++++++++++++++++ .../FunctionalTests/HuffmanDecodingTests.cs | 10 +++---- 4 files changed, 54 insertions(+), 21 deletions(-) diff --git a/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HPack/HPackDecoder.cs b/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HPack/HPackDecoder.cs index c1d4ab07bc80..14bbb20fa75d 100644 --- a/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HPack/HPackDecoder.cs +++ b/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HPack/HPackDecoder.cs @@ -26,9 +26,7 @@ private enum State } public const int DefaultHeaderTableSize = 4096; - - // TODO: add new configurable limit - public const int MaxStringOctets = 4096; + public const int DefaultStringOctetsSize = 4096; // http://httpwg.org/specs/rfc7541.html#rfc.section.6.1 // 0 1 2 3 4 5 6 7 @@ -87,9 +85,9 @@ private enum State private readonly int _maxDynamicTableSize; private readonly DynamicTable _dynamicTable; private readonly IntegerDecoder _integerDecoder = new IntegerDecoder(); - private readonly byte[] _stringOctets = new byte[MaxStringOctets]; - private readonly byte[] _headerNameOctets = new byte[MaxStringOctets]; - private readonly byte[] _headerValueOctets = new byte[MaxStringOctets]; + private byte[] _stringOctets = new byte[DefaultStringOctetsSize]; + private byte[] _headerNameOctets = new byte[DefaultStringOctetsSize]; + private byte[] _headerValueOctets = new byte[DefaultStringOctetsSize]; private State _state = State.Ready; private byte[] _headerName; @@ -347,8 +345,7 @@ private void OnStringLength(int length, State nextState) { if (length > _stringOctets.Length) { - // String length too large. - throw new HPackDecodingException(); + _stringOctets = new byte[Math.Max(length, _stringOctets.Length * 2)]; } _stringLength = length; @@ -358,14 +355,19 @@ private void OnStringLength(int length, State nextState) private void OnString(State nextState) { - int Decode(byte[] dst) + int Decode(ref byte[] dst) { if (_huffman) { - return Huffman.Decode(new ReadOnlySpan(_stringOctets, 0, _stringLength), dst); + return Huffman.Decode(new ReadOnlySpan(_stringOctets, 0, _stringLength), ref dst); } else { + if (dst.Length < _stringLength) + { + dst = new byte[Math.Max(_stringLength, dst.Length * 2)]; + } + Buffer.BlockCopy(_stringOctets, 0, dst, 0, _stringLength); return _stringLength; } @@ -375,12 +377,12 @@ int Decode(byte[] dst) { if (_state == State.HeaderName) { + _headerNameLength = Decode(ref _headerNameOctets); _headerName = _headerNameOctets; - _headerNameLength = Decode(_headerNameOctets); } else { - _headerValueLength = Decode(_headerValueOctets); + _headerValueLength = Decode(ref _headerValueOctets); } } catch (HuffmanDecodingException) diff --git a/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HPack/Huffman.cs b/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HPack/Huffman.cs index 105edd73357e..2cc5d88b1a26 100644 --- a/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HPack/Huffman.cs +++ b/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HPack/Huffman.cs @@ -2,6 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System.Diagnostics; + namespace System.Net.Http.HPack { internal class Huffman @@ -302,10 +304,13 @@ public static (uint encoded, int bitLength) Encode(int data) /// Decodes a Huffman encoded string from a byte array. /// /// The source byte array containing the encoded data. - /// The destination byte array to store the decoded data. + /// The destination byte array to store the decoded data. This may grow if its size is insufficient. /// The number of decoded symbols. - public static int Decode(ReadOnlySpan src, Span dst) + public static int Decode(ReadOnlySpan src, ref byte[] dstArray) { + Span dst = dstArray; + Debug.Assert(dst != null && dst.Length > 0); + int i = 0; int j = 0; int lastDecodedBits = 0; @@ -351,8 +356,8 @@ public static int Decode(ReadOnlySpan src, Span dst) if (j == dst.Length) { - // Destination is too small. - throw new HuffmanDecodingException(); + Array.Resize(ref dstArray, dst.Length * 2); + dst = dstArray; } dst[j++] = (byte)ch; diff --git a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Headers.cs b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Headers.cs index edac8e089446..3b2d0b98afcf 100644 --- a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Headers.cs +++ b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Headers.cs @@ -97,6 +97,32 @@ await LoopbackServerFactory.CreateClientAndServerAsync(async uri => }); } + [Theory] + [InlineData("Content-Security-Policy", 4618)] + [InlineData("RandomCustomHeader", 12345)] + public async Task GetAsync_LargeHeader_Success(string headerName, int headerValueLength) + { + var rand = new Random(42); + string headerValue = new string(Enumerable.Range(0, headerValueLength).Select(_ => (char)('A' + rand.Next(26))).ToArray()); + + const string ContentString = "hello world"; + await LoopbackServerFactory.CreateClientAndServerAsync(async uri => + { + using (var client = CreateHttpClient()) + using (HttpResponseMessage resp = await client.GetAsync(uri)) + { + Assert.Equal(headerValue, resp.Headers.GetValues(headerName).Single()); + Assert.Equal(ContentString, await resp.Content.ReadAsStringAsync()); + } + }, + async server => + { + var headers = new List(); + headers.Add(new HttpHeaderData(headerName, headerValue)); + await server.HandleRequestAsync(HttpStatusCode.OK, headers: headers, content: ContentString); + }); + } + [Fact] public async Task GetAsync_EmptyResponseHeader_Success() { diff --git a/src/System.Net.Http/tests/FunctionalTests/HuffmanDecodingTests.cs b/src/System.Net.Http/tests/FunctionalTests/HuffmanDecodingTests.cs index 76241dd360cb..cdaee414cd5d 100644 --- a/src/System.Net.Http/tests/FunctionalTests/HuffmanDecodingTests.cs +++ b/src/System.Net.Http/tests/FunctionalTests/HuffmanDecodingTests.cs @@ -11,7 +11,7 @@ namespace System.Net.Http.Functional.Tests { public class HuffmanDecodingTests { - delegate int DecodeDelegate(ReadOnlySpan src, Span dst); + delegate int DecodeDelegate(ReadOnlySpan src, ref byte[] dst); private static readonly DecodeDelegate s_decodeDelegate = GetDecodeDelegate(); @@ -23,9 +23,9 @@ private static DecodeDelegate GetDecodeDelegate() return (DecodeDelegate)Delegate.CreateDelegate(typeof(DecodeDelegate), decodeMethod); } - private static int Decode(ReadOnlySpan source, Span destination) + private static int Decode(ReadOnlySpan source, ref byte[] destination) { - return s_decodeDelegate(source, destination); + return s_decodeDelegate(source, ref destination); } private static readonly (uint code, int bitLength)[] s_encodingTable = new (uint code, int bitLength)[] @@ -347,7 +347,7 @@ public void HuffmanDecoding_ValidEncoding_Succeeds(byte[] input) // Worst case decoding is an output byte per 5 input bits, so make the decoded buffer 2 times as big byte[] decoded = new byte[encoded.Length * 2]; - int decodedByteCount = Decode(new ReadOnlySpan(encoded, 0, encodedByteCount), decoded); + int decodedByteCount = Decode(new ReadOnlySpan(encoded, 0, encodedByteCount), ref decoded); Assert.Equal(input.Length, decodedByteCount); Assert.Equal(input, decoded.Take(decodedByteCount)); @@ -362,7 +362,7 @@ public void HuffmanDecoding_InvalidEncoding_Throws(byte[] encoded) // Worst case decoding is an output byte per 5 input bits, so make the decoded buffer 2 times as big byte[] decoded = new byte[encoded.Length * 2]; - Assert.Throws(s_huffmanDecodingExceptionType, () => Decode(encoded, decoded)); + Assert.Throws(s_huffmanDecodingExceptionType, () => Decode(encoded, ref decoded)); } // This input sequence will encode to 17 bits, thus offsetting the next character to encode From 07e6ac3476467af0b9825259de1cfa9487f0d9fa Mon Sep 17 00:00:00 2001 From: Stephen Toub Date: Wed, 1 May 2019 17:01:07 -0400 Subject: [PATCH 142/607] Disable AutomaticOrManual_DoesntFailRegardlessOfWhetherClientCertsAreAvailable test (#37339) --- .../FunctionalTests/HttpClientHandlerTest.ClientCertificates.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.ClientCertificates.cs b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.ClientCertificates.cs index 5d888af59540..a052ed00c135 100644 --- a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.ClientCertificates.cs +++ b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.ClientCertificates.cs @@ -255,6 +255,7 @@ await LoopbackServer.CreateServerAsync(async (server, url) => }, options); } + [ActiveIssue(37336)] [ActiveIssue(30056, TargetFrameworkMonikers.Uap)] [Theory] [InlineData(ClientCertificateOption.Manual)] From e4d60675b4e7015d8c41d515239a5bde7faa8152 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Wed, 1 May 2019 17:02:02 -0400 Subject: [PATCH 143/607] Update dependencies from https://github.com/dotnet/corefx build 20190430.13 (#37327) - runtime.native.System.IO.Ports - 4.6.0-preview6.19230.13 - Microsoft.NETCore.Platforms - 3.0.0-preview6.19230.13 --- eng/Version.Details.xml | 8 ++++---- eng/Versions.props | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index ff17bc0fa95f..9a9a143309d3 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -26,13 +26,13 @@ https://github.com/dotnet/core-setup a3967b6096dc6a688f338d9eb4f986d537977c1e - + https://github.com/dotnet/corefx - 40130352e9c125d57d15eaecd8802c33cca742d3 + 830bf7fc0346d9453d85ad4ec726c92ac3e72998 - + https://github.com/dotnet/corefx - 40130352e9c125d57d15eaecd8802c33cca742d3 + 830bf7fc0346d9453d85ad4ec726c92ac3e72998 https://github.com/dotnet/arcade diff --git a/eng/Versions.props b/eng/Versions.props index 20dbbffda49e..256938d0c1cf 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -43,8 +43,8 @@ 3.0.0-preview6-27630-79 3.0.0-preview6-27630-79 - 3.0.0-preview6.19229.9 - 4.6.0-preview6.19229.9 + 3.0.0-preview6.19230.13 + 4.6.0-preview6.19230.13 2.1.0-prerelease.19230.1 From 0b1daee821fbb20df5daf002fd3b1d070d1380cf Mon Sep 17 00:00:00 2001 From: Santiago Fernandez Madero Date: Wed, 1 May 2019 14:16:11 -0700 Subject: [PATCH 144/607] Remove instances of myget in the docs and update to blob feed (#37334) --- Documentation/debugging/unix-instructions.md | 1 - Documentation/project-docs/dogfooding.md | 8 ++++---- README.md | 5 +++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Documentation/debugging/unix-instructions.md b/Documentation/debugging/unix-instructions.md index 20d37c820357..33c89819b54c 100644 --- a/Documentation/debugging/unix-instructions.md +++ b/Documentation/debugging/unix-instructions.md @@ -33,7 +33,6 @@ It is also possible to debug .NET Core crash dumps using lldb and SOS. In order - Matching coreclr/corefx runtime bits from the crash. To get these, you should either: - Download the matching Jenkins archive onto your repro machine. - Check out the coreclr and corefx repositories at the appropriate commit and re-build the necessary portions. - - You can also download the matching "symbols" nuget package from myget.org. There is a "Download Symbols" button in the myget UI for this purpose. - lldb version 3.9. The SOS plugin (i.e. libsosplugin.so) provided is now built for lldb 3.9. In order to install lldb 3.9 just run the following commands: ``` ~$ echo "deb http://llvm.org/apt/trusty/ llvm-toolchain-trusty-3.9 main" | sudo tee /etc/apt/sources.list.d/llvm.list diff --git a/Documentation/project-docs/dogfooding.md b/Documentation/project-docs/dogfooding.md index fffc61f88578..0a771def3d6b 100644 --- a/Documentation/project-docs/dogfooding.md +++ b/Documentation/project-docs/dogfooding.md @@ -47,7 +47,7 @@ To install additional .NET Core runtimes or SDKs: 4. Our nightly builds are uploaded to MyGet, not NuGet - so ensure the .NET Core MyGet feed is in your nuget configuration in case you need other packages from .NET Core that aren't included in the download. For example, on Windows you could edit `%userprofile%\appdata\roaming\nuget\nuget.config` or on Linux edit `~/.nuget/NuGet/NuGet.Config` to add this line: ```xml - + ... ``` @@ -118,7 +118,7 @@ make it self-contained Exe netcoreapp3.0 - + 3.0.0-preview-27218-01 win-x64 @@ -167,13 +167,13 @@ Note these instructions above were only about updates to the binaries that are p By default the dogfooding dotnet SDK will create a Nuget.Config file next to your project, if it doesn't you can create one. Your config file will need a source for your local corefx package directory as well -as a reference to our nightly dotnet-core feed on myget. The Nuget.Config file content should be: +as a reference to our nightly dotnet-core blob feed. The Nuget.Config file content should be: ```xml - + ``` diff --git a/README.md b/README.md index dac3e2e16202..5fa021d4f41d 100644 --- a/README.md +++ b/README.md @@ -83,7 +83,8 @@ There are many .NET related projects on GitHub. ### Daily Builds -Daily builds of .NET Core components are published to [dotnet-core MyGet gallery](https://dotnet.myget.org/gallery/dotnet-core). -The latest version number of each library can be seen in that gallery. +Daily builds of .NET Core components are published to dotnet-blob feed (https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json). +The latest version number of each library can be seen in that feed. +Currently, there is no website to visualize the contents of the feed, so in order to do so, you have to use a NuGet feed explorer, like Visual Studio. Note: See officially supported [OS versions](https://github.com/dotnet/core/blob/master/os-lifecycle-policy.md). From 75a54c95e2d31370bf8b5024a5b68b3e83cefb2e Mon Sep 17 00:00:00 2001 From: Viktor Hofer Date: Wed, 1 May 2019 23:48:48 +0200 Subject: [PATCH 145/607] Publish test artifacts to AzDO (#37296) * Publish test artifacts to AzDO * Disable two flaky UAP tests * Remove leftover buildconfiguration for netfx * Disable flaky printer test * Disable flaky PipeWriter test --- .azure-ci.yml | 15 ++++++++++++--- eng/pipelines/corefx-base.yml | 5 ----- eng/pipelines/helix.yml | 6 ------ eng/pipelines/windows.yml | 2 -- eng/sendtohelix.proj | 14 +------------- .../tests/Configurations.props | 1 - .../tests/ProcessTests.cs | 1 + .../tests/Printing/PrintDocumentTests.cs | 1 + src/System.IO.Pipelines/tests/PipeWriterTests.cs | 1 + .../HttpClientHandlerTest.Http2.cs | 1 + .../tests/FunctionalTests/SocketOptionNameTest.cs | 2 ++ 11 files changed, 19 insertions(+), 30 deletions(-) diff --git a/.azure-ci.yml b/.azure-ci.yml index de5c4e809703..4a4e9aa8ccea 100644 --- a/.azure-ci.yml +++ b/.azure-ci.yml @@ -8,11 +8,20 @@ trigger: include: - master - release/3.0 + paths: + exclude: + - Documentation/* + - /*.md -# TODO: add paths to exclude CI when modifying docs or stuff not affecting the build pr: -- master -- release/3.0 + branches: + include: + - master + - release/3.0 + paths: + exclude: + - Documentation/* + - /*.md resources: containers: diff --git a/eng/pipelines/corefx-base.yml b/eng/pipelines/corefx-base.yml index 4db5f431197e..9c23a1fb7db1 100644 --- a/eng/pipelines/corefx-base.yml +++ b/eng/pipelines/corefx-base.yml @@ -198,19 +198,14 @@ jobs: msbuildScript: $(_msbuildCommand) framework: $(_framework) outerloop: $(_outerloop) - enableAzurePipelinesReporter: false ${{ if eq(parameters.isOfficialBuild, 'true') }}: - isExternal: false - waitForCompletion: false officialBuildId: $(Build.BuildNumber) helixToken: $(HelixApiAccessToken) ${{ if eq(parameters.isOfficialBuild, 'false') }}: # TODO: SET Creator to the PR owner whenever Azure DevOps supports a good way to retrieve it. creator: dotnet-bot - isExternal: true - waitForCompletion: true helixToken: '' - ${{ if eq(parameters.isOfficialBuild, 'true') }}: diff --git a/eng/pipelines/helix.yml b/eng/pipelines/helix.yml index cf1bf9d83822..68073f8983e5 100644 --- a/eng/pipelines/helix.yml +++ b/eng/pipelines/helix.yml @@ -5,12 +5,9 @@ parameters: framework: '' helixQueues: '' helixToken: '' - isExternal: '' # true | false msbuildScript: '' targetOS: '' - waitForCompletion: '' # true | false officialBuildId: '' - enableAzurePipelinesReporter: '' # true | false outerloop: '' # true | false condition: always() @@ -26,11 +23,8 @@ steps: /p:HelixTargetQueues=${{ parameters.helixQueues }} /p:HelixBuild=$(Build.BuildNumber) /p:HelixAccessToken=${{ parameters.helixToken }} - /p:WaitForWorkItemCompletion=${{ parameters.waitForCompletion }} - /p:IsExternal=${{ parameters.isExternal }} /p:Creator=${{ parameters.creator }} /p:OfficialBuildId=${{ parameters.officialBuildId }} - /p:EnableAzurePipelinesReporter=${{ parameters.enableAzurePipelinesReporter }} /bl:$(Build.SourcesDirectory)/artifacts/log/$(_BuildConfig)/SendToHelix.binlog displayName: Send to Helix condition: and(succeeded(), ${{ parameters.condition }}) diff --git a/eng/pipelines/windows.yml b/eng/pipelines/windows.yml index 09610eac20e0..c6bca6c1f918 100644 --- a/eng/pipelines/windows.yml +++ b/eng/pipelines/windows.yml @@ -167,8 +167,6 @@ jobs: submitToHelix: true buildExtraArguments: /p:RuntimeOS=win10 - # azure pipelines reporter only supports xunit results based tests. - enableAzurePipelinesReporter: false variables: - _outerloop: false diff --git a/eng/sendtohelix.proj b/eng/sendtohelix.proj index 32e88f150992..5b07f7fe4da7 100644 --- a/eng/sendtohelix.proj +++ b/eng/sendtohelix.proj @@ -32,19 +32,7 @@ $(BuildConfiguration)- PackageTests-$(ConfigurationGroup)-$(ArchGroup) - 4 - - - - - true - false - - - - - true - false + $(WaitForWorkItemCompletion) diff --git a/src/Microsoft.VisualBasic.Core/tests/Configurations.props b/src/Microsoft.VisualBasic.Core/tests/Configurations.props index 0ea07aa8f9a7..acf56fa2750e 100644 --- a/src/Microsoft.VisualBasic.Core/tests/Configurations.props +++ b/src/Microsoft.VisualBasic.Core/tests/Configurations.props @@ -3,7 +3,6 @@ netcoreapp; uap; - netfx; \ No newline at end of file diff --git a/src/System.Diagnostics.Process/tests/ProcessTests.cs b/src/System.Diagnostics.Process/tests/ProcessTests.cs index 191830beb5c2..2f19b9141713 100644 --- a/src/System.Diagnostics.Process/tests/ProcessTests.cs +++ b/src/System.Diagnostics.Process/tests/ProcessTests.cs @@ -1471,6 +1471,7 @@ public void TestHandleCount_OSX() } } + [ActiveIssue(37325)] [Fact] [PlatformSpecific(TestPlatforms.Linux | TestPlatforms.Windows)] // Expected process HandleCounts differs on OSX [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Handle count change is not reliable, but seems less robust on NETFX")] diff --git a/src/System.Drawing.Common/tests/Printing/PrintDocumentTests.cs b/src/System.Drawing.Common/tests/Printing/PrintDocumentTests.cs index ec531646b8f1..ab6a7c3dc5ad 100644 --- a/src/System.Drawing.Common/tests/Printing/PrintDocumentTests.cs +++ b/src/System.Drawing.Common/tests/Printing/PrintDocumentTests.cs @@ -169,6 +169,7 @@ public void BeginPrint_SetValue_ReturnsExpected() } [ActiveIssue(20884, TestPlatforms.AnyUnix)] + [ActiveIssue(30223)] [ConditionalFact(Helpers.AnyInstalledPrinters, Helpers.IsDrawingSupported)] public void EndPrint_SetValue_ReturnsExpected() { diff --git a/src/System.IO.Pipelines/tests/PipeWriterTests.cs b/src/System.IO.Pipelines/tests/PipeWriterTests.cs index 0ae5110673bb..68ad54fae7e4 100644 --- a/src/System.IO.Pipelines/tests/PipeWriterTests.cs +++ b/src/System.IO.Pipelines/tests/PipeWriterTests.cs @@ -233,6 +233,7 @@ public async Task WritesUsingGetMemoryWorks() pipe.Reader.Complete(); } + [ActiveIssue(37239)] [Fact] public async Task CompleteWithLargeWriteThrows() { diff --git a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Http2.cs b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Http2.cs index 176b4093e8b6..bb5fc03d8a1b 100644 --- a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Http2.cs +++ b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Http2.cs @@ -194,6 +194,7 @@ await server.EstablishConnectionAsync( } } + [ActiveIssue(35466)] [ConditionalTheory(nameof(SupportsAlpn))] [InlineData(SettingId.MaxFrameSize, 16383, ProtocolErrors.PROTOCOL_ERROR, true)] [InlineData(SettingId.MaxFrameSize, 162777216, ProtocolErrors.PROTOCOL_ERROR, true)] diff --git a/src/System.Net.Sockets/tests/FunctionalTests/SocketOptionNameTest.cs b/src/System.Net.Sockets/tests/FunctionalTests/SocketOptionNameTest.cs index daaa2c1e14b0..09fb6005c319 100644 --- a/src/System.Net.Sockets/tests/FunctionalTests/SocketOptionNameTest.cs +++ b/src/System.Net.Sockets/tests/FunctionalTests/SocketOptionNameTest.cs @@ -65,6 +65,7 @@ public void MulticastOption_CreateSocketSetGetOption_GroupAndInterfaceIndex_SetS } } + [ActiveIssue(31609, TargetFrameworkMonikers.Uap)] [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindowsNanoServer))] // Skip on Nano: dotnet/corefx #29929 public async Task MulticastInterface_Set_AnyInterface_Succeeds() { @@ -129,6 +130,7 @@ public void MulticastInterface_Set_InvalidIndex_Throws() } } + [ActiveIssue(31609, TargetFrameworkMonikers.Uap)] [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindowsNanoServer))] // Skip on Nano: dotnet/corefx #29929 [PlatformSpecific(~TestPlatforms.OSX)] public async Task MulticastInterface_Set_IPv6_AnyInterface_Succeeds() From c661db6ce2da91033671c0000afc185de1ad3fe9 Mon Sep 17 00:00:00 2001 From: David Shulman Date: Wed, 1 May 2019 15:17:21 -0700 Subject: [PATCH 146/607] Implement HttpClient.DefaultProxy property (#37333) This PR implements the new static HttpClient.DefaultProxy property which was approved during API review. Modify the SystemProxyInfo.ConstructSystemProxy method to a Singleton. Modify SocketsHttpHandler to use the HttpClient.DefaultProxy property. Rename the HttpSystemProxy class to HttpWindowsProxy. Add some HttpClient tests for the new property. Closes #36553 --- ...emProxyTest.cs => HttpWindowsProxyTest.cs} | 14 +++++----- ....Net.Http.WinHttpHandler.Unit.Tests.csproj | 6 ++-- src/System.Net.Http/ref/System.Net.Http.cs | 1 + .../src/System.Net.Http.csproj | 4 ++- .../src/System/Net/Http/HttpClient.cs | 10 +++++++ .../HttpConnectionPoolManager.cs | 2 +- ...HttpSystemProxy.cs => HttpWindowsProxy.cs} | 6 ++-- .../SocketsHttpHandler/SystemProxyInfo.OSX.cs | 2 +- .../SystemProxyInfo.Unix.cs | 2 +- .../SystemProxyInfo.Windows.cs | 4 +-- .../SocketsHttpHandler/SystemProxyInfo.cs | 13 +++++++++ .../SocketsHttpHandler/SystemProxyInfo.uap.cs | 15 ++++++++++ .../HttpClientTest.netcoreapp.cs | 28 ++++++++++++++++++- ...emProxyTest.cs => HttpWindowsProxyTest.cs} | 26 ++++++++--------- .../System.Net.Http.Unit.Tests.csproj | 9 ++++-- 15 files changed, 106 insertions(+), 36 deletions(-) rename src/System.Net.Http.WinHttpHandler/tests/UnitTests/{HttpSystemProxyTest.cs => HttpWindowsProxyTest.cs} (88%) rename src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/{HttpSystemProxy.cs => HttpWindowsProxy.cs} (98%) create mode 100644 src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/SystemProxyInfo.cs create mode 100644 src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/SystemProxyInfo.uap.cs rename src/System.Net.Http/tests/UnitTests/{HttpSystemProxyTest.cs => HttpWindowsProxyTest.cs} (89%) diff --git a/src/System.Net.Http.WinHttpHandler/tests/UnitTests/HttpSystemProxyTest.cs b/src/System.Net.Http.WinHttpHandler/tests/UnitTests/HttpWindowsProxyTest.cs similarity index 88% rename from src/System.Net.Http.WinHttpHandler/tests/UnitTests/HttpSystemProxyTest.cs rename to src/System.Net.Http.WinHttpHandler/tests/UnitTests/HttpWindowsProxyTest.cs index b9e306b76059..d720080a3143 100644 --- a/src/System.Net.Http.WinHttpHandler/tests/UnitTests/HttpSystemProxyTest.cs +++ b/src/System.Net.Http.WinHttpHandler/tests/UnitTests/HttpWindowsProxyTest.cs @@ -9,14 +9,14 @@ namespace System.Net.Http.WinHttpHandlerUnitTests { - public class HttpSystemProxyTest + public class HttpWindowsProxyTest { private const string ManualSettingsProxyHost = "myproxy.local"; private const string ManualSettingsProxyBypassList = "localhost;*.local"; private readonly ITestOutputHelper _output; - public HttpSystemProxyTest(ITestOutputHelper output) + public HttpWindowsProxyTest(ITestOutputHelper output) { _output = output; TestControl.ResetAll(); @@ -32,7 +32,7 @@ public static IEnumerable ManualSettingsMemberData() [Fact] public void TryCreate_WinInetProxySettingsAllOff_ReturnsFalse() { - Assert.False(HttpSystemProxy.TryCreate(out IWebProxy webProxy)); + Assert.False(HttpWindowsProxy.TryCreate(out IWebProxy webProxy)); } [Theory] @@ -45,13 +45,13 @@ public void GetProxy_BothAutoDetectAndManualSettingsButFailedAutoDetect_ManualSe FakeRegistry.WinInetProxySettings.ProxyBypass = ManualSettingsProxyBypassList; TestControl.PACFileNotDetectedOnNetwork = true; - Assert.True(HttpSystemProxy.TryCreate(out IWebProxy webProxy)); + Assert.True(HttpWindowsProxy.TryCreate(out IWebProxy webProxy)); // The first GetProxy() call will try using WinInetProxyHelper (and thus WinHTTP) since AutoDetect is on. Uri proxyUri1 = webProxy.GetProxy(destination); // The second GetProxy call will skip using WinHTTP since AutoDetect is on but - // there was a recent AutoDetect failure. This tests the codepath in HttpSystemProxy + // there was a recent AutoDetect failure. This tests the codepath in HttpWindowsProxy // which queries WinInetProxyHelper.RecentAutoDetectionFailure. Uri proxyUri2 = webProxy.GetProxy(destination); @@ -75,7 +75,7 @@ public void GetProxy_ManualSettingsOnly_ManualSettingsUsed( FakeRegistry.WinInetProxySettings.Proxy = ManualSettingsProxyHost; FakeRegistry.WinInetProxySettings.ProxyBypass = ManualSettingsProxyBypassList; - Assert.True(HttpSystemProxy.TryCreate(out IWebProxy webProxy)); + Assert.True(HttpWindowsProxy.TryCreate(out IWebProxy webProxy)); Uri proxyUri = webProxy.GetProxy(destination); if (bypassProxy) { @@ -91,7 +91,7 @@ public void GetProxy_ManualSettingsOnly_ManualSettingsUsed( public void IsBypassed_ReturnsFalse() { FakeRegistry.WinInetProxySettings.AutoDetect = true; - Assert.True(HttpSystemProxy.TryCreate(out IWebProxy webProxy)); + Assert.True(HttpWindowsProxy.TryCreate(out IWebProxy webProxy)); Assert.False(webProxy.IsBypassed(new Uri("http://www.microsoft.com/"))); } } diff --git a/src/System.Net.Http.WinHttpHandler/tests/UnitTests/System.Net.Http.WinHttpHandler.Unit.Tests.csproj b/src/System.Net.Http.WinHttpHandler/tests/UnitTests/System.Net.Http.WinHttpHandler.Unit.Tests.csproj index edb4a3d0cbb6..235085afa6e3 100644 --- a/src/System.Net.Http.WinHttpHandler/tests/UnitTests/System.Net.Http.WinHttpHandler.Unit.Tests.csproj +++ b/src/System.Net.Http.WinHttpHandler/tests/UnitTests/System.Net.Http.WinHttpHandler.Unit.Tests.csproj @@ -127,8 +127,8 @@ ProductionCode\WinInetProxyHelper.cs - - ProductionCode\HttpSystemProxy.cs + + ProductionCode\HttpWindowsProxy.cs @@ -138,7 +138,7 @@ - + diff --git a/src/System.Net.Http/ref/System.Net.Http.cs b/src/System.Net.Http/ref/System.Net.Http.cs index 60306ec100d8..68f172e174dc 100644 --- a/src/System.Net.Http/ref/System.Net.Http.cs +++ b/src/System.Net.Http/ref/System.Net.Http.cs @@ -38,6 +38,7 @@ public HttpClient() : base (default(System.Net.Http.HttpMessageHandler)) { } public HttpClient(System.Net.Http.HttpMessageHandler handler) : base (default(System.Net.Http.HttpMessageHandler)) { } public HttpClient(System.Net.Http.HttpMessageHandler handler, bool disposeHandler) : base (default(System.Net.Http.HttpMessageHandler)) { } public System.Uri BaseAddress { get { throw null; } set { } } + public static System.Net.IWebProxy DefaultProxy { get { throw null; } set { } } public System.Net.Http.Headers.HttpRequestHeaders DefaultRequestHeaders { get { throw null; } } public long MaxResponseContentBufferSize { get { throw null; } set { } } public System.TimeSpan Timeout { get { throw null; } set { } } diff --git a/src/System.Net.Http/src/System.Net.Http.csproj b/src/System.Net.Http/src/System.Net.Http.csproj index c0e1bac53dfa..c3e208d68d22 100644 --- a/src/System.Net.Http/src/System.Net.Http.csproj +++ b/src/System.Net.Http/src/System.Net.Http.csproj @@ -93,6 +93,7 @@ + Common\CoreLib\System\IO\StreamHelpers.CopyValidation.cs @@ -308,7 +309,7 @@ - + Common\Interop\Windows\SChannel\Interop.SecPkgContext_ApplicationProtocol.cs @@ -657,6 +658,7 @@ + diff --git a/src/System.Net.Http/src/System/Net/Http/HttpClient.cs b/src/System.Net.Http/src/System/Net/Http/HttpClient.cs index 56826638320a..2b0ac69fb08d 100644 --- a/src/System.Net.Http/src/System/Net/Http/HttpClient.cs +++ b/src/System.Net.Http/src/System/Net/Http/HttpClient.cs @@ -14,6 +14,7 @@ public class HttpClient : HttpMessageInvoker { #region Fields + private static IWebProxy s_defaultProxy; private static readonly TimeSpan s_defaultTimeout = TimeSpan.FromSeconds(100); private static readonly TimeSpan s_maxTimeout = TimeSpan.FromMilliseconds(int.MaxValue); private static readonly TimeSpan s_infiniteTimeout = Threading.Timeout.InfiniteTimeSpan; @@ -32,6 +33,15 @@ public class HttpClient : HttpMessageInvoker #endregion Fields #region Properties + public static IWebProxy DefaultProxy + { + get => LazyInitializer.EnsureInitialized(ref s_defaultProxy, () => SystemProxyInfo.Proxy); + + set + { + s_defaultProxy = value ?? throw new ArgumentNullException(nameof(value)); + } + } public HttpRequestHeaders DefaultRequestHeaders { diff --git a/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionPoolManager.cs b/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionPoolManager.cs index 32b7df9f1c4f..8fe976d85d22 100644 --- a/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionPoolManager.cs +++ b/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionPoolManager.cs @@ -121,7 +121,7 @@ public HttpConnectionPoolManager(HttpConnectionSettings settings) // Figure out proxy stuff. if (settings._useProxy) { - _proxy = settings._proxy ?? SystemProxyInfo.ConstructSystemProxy(); + _proxy = settings._proxy ?? HttpClient.DefaultProxy; if (_proxy != null) { _proxyCredentials = _proxy.Credentials ?? settings._defaultProxyCredentials; diff --git a/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpSystemProxy.cs b/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpWindowsProxy.cs similarity index 98% rename from src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpSystemProxy.cs rename to src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpWindowsProxy.cs index 86b30cf23a06..219a387c4380 100644 --- a/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpSystemProxy.cs +++ b/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpWindowsProxy.cs @@ -11,7 +11,7 @@ namespace System.Net.Http { - internal sealed class HttpSystemProxy : IWebProxy, IDisposable + internal sealed class HttpWindowsProxy : IWebProxy, IDisposable { private readonly Uri _insecureProxyUri; // URI of the http system proxy if set private readonly Uri _secureProxyUri; // URI of the https system proxy if set @@ -55,11 +55,11 @@ public static bool TryCreate(out IWebProxy proxy) } } - proxy = new HttpSystemProxy(proxyHelper, sessionHandle); + proxy = new HttpWindowsProxy(proxyHelper, sessionHandle); return true; } - private HttpSystemProxy(WinInetProxyHelper proxyHelper, SafeWinHttpHandle sessionHandle) + private HttpWindowsProxy(WinInetProxyHelper proxyHelper, SafeWinHttpHandle sessionHandle) { _proxyHelper = proxyHelper; _sessionHandle = sessionHandle; diff --git a/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/SystemProxyInfo.OSX.cs b/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/SystemProxyInfo.OSX.cs index a8d6e69d516e..de138b49a98b 100644 --- a/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/SystemProxyInfo.OSX.cs +++ b/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/SystemProxyInfo.OSX.cs @@ -4,7 +4,7 @@ namespace System.Net.Http { - internal static class SystemProxyInfo + internal static partial class SystemProxyInfo { // On OSX we get default proxy configuration from either environment variables or the OSX system proxy. public static IWebProxy ConstructSystemProxy() diff --git a/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/SystemProxyInfo.Unix.cs b/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/SystemProxyInfo.Unix.cs index 572322a59eff..bb9ec768f0f0 100644 --- a/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/SystemProxyInfo.Unix.cs +++ b/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/SystemProxyInfo.Unix.cs @@ -4,7 +4,7 @@ namespace System.Net.Http { - internal static class SystemProxyInfo + internal static partial class SystemProxyInfo { // On Unix (except for OSX) we get default proxy configuration from environment variables. If the // environment variables are not defined, we return an IWebProxy object that effectively is diff --git a/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/SystemProxyInfo.Windows.cs b/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/SystemProxyInfo.Windows.cs index 51480b556988..68ae86b57008 100644 --- a/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/SystemProxyInfo.Windows.cs +++ b/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/SystemProxyInfo.Windows.cs @@ -4,14 +4,14 @@ namespace System.Net.Http { - internal static class SystemProxyInfo + internal static partial class SystemProxyInfo { // On Windows we get default proxy configuration from either environment variables or the Windows system proxy. public static IWebProxy ConstructSystemProxy() { if (!HttpEnvironmentProxy.TryCreate(out IWebProxy proxy)) { - HttpSystemProxy.TryCreate(out proxy); + HttpWindowsProxy.TryCreate(out proxy); } return proxy ?? new HttpNoProxy(); diff --git a/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/SystemProxyInfo.cs b/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/SystemProxyInfo.cs new file mode 100644 index 000000000000..c265492eccdf --- /dev/null +++ b/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/SystemProxyInfo.cs @@ -0,0 +1,13 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +namespace System.Net.Http +{ + internal static partial class SystemProxyInfo + { + public static IWebProxy Proxy => s_proxy.Value; + + private static readonly Lazy s_proxy = new Lazy(ConstructSystemProxy); + } +} diff --git a/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/SystemProxyInfo.uap.cs b/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/SystemProxyInfo.uap.cs new file mode 100644 index 000000000000..dd2dc666f464 --- /dev/null +++ b/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/SystemProxyInfo.uap.cs @@ -0,0 +1,15 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +namespace System.Net.Http +{ + internal static partial class SystemProxyInfo + { + // For UAP this is currently not implemented. + public static IWebProxy ConstructSystemProxy() + { + throw new PlatformNotSupportedException(); + } + } +} diff --git a/src/System.Net.Http/tests/FunctionalTests/HttpClientTest.netcoreapp.cs b/src/System.Net.Http/tests/FunctionalTests/HttpClientTest.netcoreapp.cs index 4638ce4b1dd4..52da2f67d810 100644 --- a/src/System.Net.Http/tests/FunctionalTests/HttpClientTest.netcoreapp.cs +++ b/src/System.Net.Http/tests/FunctionalTests/HttpClientTest.netcoreapp.cs @@ -4,13 +4,39 @@ using System.Threading; using System.Threading.Tasks; - +using Microsoft.DotNet.RemoteExecutor; using Xunit; namespace System.Net.Http.Functional.Tests { public sealed partial class HttpClientTest { + [Fact] + public void DefaultProxy_SetNull_Throws() + { + Assert.Throws(() => HttpClient.DefaultProxy = null ); + } + + [Fact] + public void DefaultProxy_Get_ReturnsNotNull() + { + IWebProxy proxy = HttpClient.DefaultProxy; + Assert.NotNull(proxy); + } + + [Fact] + public void DefaultProxy_SetGet_Roundtrips() + { + RemoteExecutor.Invoke(() => + { + IWebProxy proxy = new WebProxy("http://localhost:3128/"); + HttpClient.DefaultProxy = proxy; + Assert.True(Object.ReferenceEquals(proxy, HttpClient.DefaultProxy)); + + return RemoteExecutor.SuccessExitCode; + }).Dispose(); + } + [Fact] public async Task PatchAsync_Canceled_Throws() { diff --git a/src/System.Net.Http/tests/UnitTests/HttpSystemProxyTest.cs b/src/System.Net.Http/tests/UnitTests/HttpWindowsProxyTest.cs similarity index 89% rename from src/System.Net.Http/tests/UnitTests/HttpSystemProxyTest.cs rename to src/System.Net.Http/tests/UnitTests/HttpWindowsProxyTest.cs index 2ee7c6376ba7..327ca7bf95c6 100644 --- a/src/System.Net.Http/tests/UnitTests/HttpSystemProxyTest.cs +++ b/src/System.Net.Http/tests/UnitTests/HttpWindowsProxyTest.cs @@ -12,7 +12,7 @@ namespace System.Net.Http.Tests { - public class HttpSystemProxyTest + public class HttpWindowsProxyTest { private readonly ITestOutputHelper _output; private const string FakeProxyString = "http://proxy.contoso.com"; @@ -23,7 +23,7 @@ public class HttpSystemProxyTest private const string fooWs = "ws://foo.com"; private const string fooWss = "wss://foo.com"; - public HttpSystemProxyTest(ITestOutputHelper output) + public HttpWindowsProxyTest(ITestOutputHelper output) { _output = output; } @@ -42,19 +42,19 @@ public HttpSystemProxyTest(ITestOutputHelper output) [InlineData("http=proxy.insecure.com;http=proxy.wrong.com", true, false)] [InlineData("http=http://proxy.insecure.com", true, false)] [InlineData("https=https://proxy.secure.com", false, true)] - public void HttpProxy_SystemProxy_Loaded(string rawProxyString, bool hasInsecureProxy, bool hasSecureProxy) + public void HttpProxy_WindowsProxy_Loaded(string rawProxyString, bool hasInsecureProxy, bool hasSecureProxy) { RemoteExecutor.Invoke((proxyString, insecureProxy, secureProxy) => { IWebProxy p; FakeRegistry.Reset(); - Assert.False(HttpSystemProxy.TryCreate(out p)); + Assert.False(HttpWindowsProxy.TryCreate(out p)); FakeRegistry.WinInetProxySettings.Proxy = proxyString; WinInetProxyHelper proxyHelper = new WinInetProxyHelper(); - Assert.True(HttpSystemProxy.TryCreate(out p)); + Assert.True(HttpWindowsProxy.TryCreate(out p)); Assert.NotNull(p); Assert.Equal(Boolean.Parse(insecureProxy) ? new Uri(insecureProxyUri) : null, p.GetProxy(new Uri(fooHttp))); @@ -68,7 +68,7 @@ public void HttpProxy_SystemProxy_Loaded(string rawProxyString, bool hasInsecure [Theory] [InlineData("localhost:1234", "http://localhost:1234/")] [InlineData("123.123.123.123", "http://123.123.123.123/")] - public void HttpProxy_SystemProxy_Loaded(string rawProxyString, string expectedUri) + public void HttpProxy_WindowsProxy_Loaded(string rawProxyString, string expectedUri) { RemoteExecutor.Invoke((proxyString, expectedString) => { @@ -79,7 +79,7 @@ public void HttpProxy_SystemProxy_Loaded(string rawProxyString, string expectedU FakeRegistry.WinInetProxySettings.Proxy = proxyString; WinInetProxyHelper proxyHelper = new WinInetProxyHelper(); - Assert.True(HttpSystemProxy.TryCreate(out p)); + Assert.True(HttpWindowsProxy.TryCreate(out p)); Assert.NotNull(p); Assert.Equal(expectedString, p.GetProxy(new Uri(fooHttp)).ToString()); Assert.Equal(expectedString, p.GetProxy(new Uri(fooHttps)).ToString()); @@ -117,7 +117,7 @@ public void HttpProxy_Local_Bypassed(string name, bool shouldBypass) FakeRegistry.WinInetProxySettings.Proxy = insecureProxyUri; FakeRegistry.WinInetProxySettings.ProxyBypass = "23.23.86.44;*.foo.com;;BAR.COM; ; 162*;[2002::11];[*:f8b0:4005:80a::200e]; http://www.xn--mnchhausen-9db.at;http://*.xn--bb-bjab.eu;http://xn--bb-bjab.eu;"; - Assert.True(HttpSystemProxy.TryCreate(out p)); + Assert.True(HttpWindowsProxy.TryCreate(out p)); Assert.NotNull(p); Uri u = new Uri(url); @@ -144,10 +144,10 @@ public void HttpProxy_Local_Parsing(string bypass, int count) FakeRegistry.WinInetProxySettings.Proxy = insecureProxyUri; FakeRegistry.WinInetProxySettings.ProxyBypass = bypassValue; - Assert.True(HttpSystemProxy.TryCreate(out p)); + Assert.True(HttpWindowsProxy.TryCreate(out p)); Assert.NotNull(p); - HttpSystemProxy sp = p as HttpSystemProxy; + HttpWindowsProxy sp = p as HttpWindowsProxy; Assert.NotNull(sp); if (expectedCount > 0) @@ -168,19 +168,19 @@ public void HttpProxy_Local_Parsing(string bypass, int count) [InlineData("http://;")] [InlineData("http=;")] [InlineData(" ; ")] - public void HttpProxy_InvalidSystemProxy_Null(string rawProxyString) + public void HttpProxy_InvalidWindowsProxy_Null(string rawProxyString) { RemoteExecutor.Invoke((proxyString) => { IWebProxy p; FakeRegistry.Reset(); - Assert.False(HttpSystemProxy.TryCreate(out p)); + Assert.False(HttpWindowsProxy.TryCreate(out p)); FakeRegistry.WinInetProxySettings.Proxy = proxyString; WinInetProxyHelper proxyHelper = new WinInetProxyHelper(); - Assert.True(HttpSystemProxy.TryCreate(out p)); + Assert.True(HttpWindowsProxy.TryCreate(out p)); Assert.NotNull(p); Assert.Equal(null, p.GetProxy(new Uri(fooHttp))); diff --git a/src/System.Net.Http/tests/UnitTests/System.Net.Http.Unit.Tests.csproj b/src/System.Net.Http/tests/UnitTests/System.Net.Http.Unit.Tests.csproj index 03c3bad3495d..69db21173051 100644 --- a/src/System.Net.Http/tests/UnitTests/System.Net.Http.Unit.Tests.csproj +++ b/src/System.Net.Http/tests/UnitTests/System.Net.Http.Unit.Tests.csproj @@ -315,6 +315,9 @@ ProductionCode\System\Net\Http\SocketsHttpHandler\HPack\StaticTable.cs + + ProductionCode\System\Net\Http\SocketsHttpHandler\SystemProxyInfo.cs + ProductionCode\System\Net\Http\SocketsHttpHandler\SystemProxyInfo.OSX.cs @@ -388,13 +391,13 @@ - + ProductionCode\System\Net\Http\HttpNoProxy.cs - - ProductionCode\System\Net\Http\HttpSystemProxy.cs + + ProductionCode\System\Net\Http\HttpWindowsProxy.cs ProductionCode\System\Net\Http\WinHttpException.cs From c8f623755c53e5100a87a421bd8bb26e8ad16dd5 Mon Sep 17 00:00:00 2001 From: Santiago Fernandez Madero Date: Wed, 1 May 2019 15:27:50 -0700 Subject: [PATCH 147/607] Fix condition for send to helix step in public builds (#37344) --- eng/pipelines/corefx-base.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/pipelines/corefx-base.yml b/eng/pipelines/corefx-base.yml index 9c23a1fb7db1..6cf78b180f50 100644 --- a/eng/pipelines/corefx-base.yml +++ b/eng/pipelines/corefx-base.yml @@ -190,7 +190,7 @@ jobs: - template: /eng/pipelines/helix.yml parameters: # send tests to helix only on public builds, official scheduled builds or manual official builds. - condition: or(eq(${{ parameters.isOfficialBuild }}, 'false'), notIn(variables['Build.Reason'], 'BatchedCI', 'IndividualCI')) + condition: or(eq(${{ parameters.isOfficialBuild }}, False), notIn(variables['Build.Reason'], 'BatchedCI', 'IndividualCI')) targetOS: ${{ parameters.targetOS }} archGroup: $(_architecture) configuration: $(_BuildConfig) From 648d0724c2b9224cace4b1e179fc20904fe27aa4 Mon Sep 17 00:00:00 2001 From: Viktor Hofer Date: Thu, 2 May 2019 00:36:47 +0200 Subject: [PATCH 148/607] Update pullrequest-builds.md --- Documentation/project-docs/pullrequest-builds.md | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/Documentation/project-docs/pullrequest-builds.md b/Documentation/project-docs/pullrequest-builds.md index e46818274e41..ebda7c343c4c 100644 --- a/Documentation/project-docs/pullrequest-builds.md +++ b/Documentation/project-docs/pullrequest-builds.md @@ -15,7 +15,7 @@ As part of our Pull Requests we have some validation builds where we build the p | Linux arm64_Release | netcoreapp | X | X | | Linux arm_Release | netcoreapp | X | | | Linux musl_x64_Debug | netcoreapp | X | | -| MacOS x64_Debug | netcoreapp | X | | +| MacOS x64_Debug | netcoreapp | X | X | | Packaging All Configurations x64_Debug | all | X | X | Our build definitions are defined by some `.yml` files with the following structure: @@ -58,12 +58,7 @@ Once in the build UI you can look at a specific job, or step log, by clicking on ## How to look at a test failure -Currently, our test results are exposed by https://mc.dot.net/ as we wait for new features by Azure DevOps to use their text explorer. In order to get to the test results, you need to click on the `Send to Helix` step on a job, and within its logs, there will be a text containing the test results URL, which you can `CTRL+Click` to open. It will look like the following: -``` -Results will be available from https://mc.dot.net/#/user/dotnet-bot/pr~2Fdotnet~2Fcorefx~2Frefs~2Fpull~2F35667~2Fmerge/test~2Ffunctional~2Fcli~2F/20190228.23 -``` - -Then on Mission Control, you can just navigate through the results and look at stack traces, and detailed logs. +Use the Azure DevOps Test Explorer which lists all tests grouped by the different build configurations. You can filter and navigate through the results and look at stack traces, and detailed logs. ## How to rerun builds @@ -91,4 +86,4 @@ Once you click under the `Artifacts` section, a popup will show, with multiple d 7. Only an entire pipeline can be triggered through comments, triggering a single leg is not supported yet. `/azp run corefx-ci (macOS x64_Debug)` wouldn't work. 8. Rerunning a single leg while others are still running is not yet supported, you have to wait for all legs to finish before retrying an individual leg. -All of this issues have been raised to Azure DevOps teams, expect @safern, to update the docs through PR to widely communicate new features coming. \ No newline at end of file +All of this issues have been raised to Azure DevOps teams, expect @safern, to update the docs through PR to widely communicate new features coming. From 1c05ba74abb2001723c9ff92043386027d8ec9ef Mon Sep 17 00:00:00 2001 From: Tanner Gooding Date: Tue, 30 Apr 2019 03:42:07 -0700 Subject: [PATCH 149/607] Updating System.Numerics.Vector to use the readonly members feature. (#23827) Signed-off-by: dotnet-bot --- .../src/CoreLib/System/Numerics/Vector.cs | 18 +++++++++--------- .../src/CoreLib/System/Numerics/Vector.tt | 18 +++++++++--------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/Common/src/CoreLib/System/Numerics/Vector.cs b/src/Common/src/CoreLib/System/Numerics/Vector.cs index 7d8937d201ab..e5ff360ae7c7 100644 --- a/src/Common/src/CoreLib/System/Numerics/Vector.cs +++ b/src/Common/src/CoreLib/System/Numerics/Vector.cs @@ -796,7 +796,7 @@ public void CopyTo(Span destination) /// If the destination array is null /// If number of elements in source vector is greater than those available in destination array [Intrinsic] - public unsafe void CopyTo(T[] destination) + public unsafe readonly void CopyTo(T[] destination) { CopyTo(destination, 0); } @@ -810,7 +810,7 @@ public unsafe void CopyTo(T[] destination) /// If index is greater than end of the array or index is less than zero /// If number of elements in source vector is greater than those available in destination array [Intrinsic] - public unsafe void CopyTo(T[] destination, int startIndex) + public unsafe readonly void CopyTo(T[] destination, int startIndex) { if (destination == null) { @@ -1083,7 +1083,7 @@ public unsafe void CopyTo(T[] destination, int startIndex) /// /// Returns the element at the given index. /// - public unsafe T this[int index] + public unsafe readonly T this[int index] { [Intrinsic] get @@ -1175,7 +1175,7 @@ public unsafe T this[int index] /// The Object to compare against. /// True if the Object is equal to this vector; False otherwise. [MethodImplAttribute(MethodImplOptions.AggressiveInlining)] - public override bool Equals(object? obj) + public override readonly bool Equals(object? obj) { if (!(obj is Vector)) { @@ -1190,7 +1190,7 @@ public override bool Equals(object? obj) /// The vector to compare this instance to. /// True if the other vector is equal to this instance; False otherwise. [Intrinsic] - public bool Equals(Vector other) + public readonly bool Equals(Vector other) { if (Vector.IsHardwareAccelerated) { @@ -1322,7 +1322,7 @@ public bool Equals(Vector other) /// Returns the hash code for this instance. /// /// The hash code. - public override int GetHashCode() + public override readonly int GetHashCode() { int hash = 0; @@ -1532,7 +1532,7 @@ public override int GetHashCode() /// Returns a String representing this vector. /// /// The string representation. - public override string ToString() + public override readonly string ToString() { return ToString("G", CultureInfo.CurrentCulture); } @@ -1542,7 +1542,7 @@ public override string ToString() /// /// The format of individual elements. /// The string representation. - public string ToString(string? format) + public readonly string ToString(string? format) { return ToString(format, CultureInfo.CurrentCulture); } @@ -1554,7 +1554,7 @@ public string ToString(string? format) /// The format of individual elements. /// The format provider to use when formatting elements. /// The string representation. - public string ToString(string? format, IFormatProvider? formatProvider) + public readonly string ToString(string? format, IFormatProvider? formatProvider) { StringBuilder sb = new StringBuilder(); string separator = NumberFormatInfo.GetInstance(formatProvider).NumberGroupSeparator; diff --git a/src/Common/src/CoreLib/System/Numerics/Vector.tt b/src/Common/src/CoreLib/System/Numerics/Vector.tt index 4eced4787946..58d7ad3f9fd3 100644 --- a/src/Common/src/CoreLib/System/Numerics/Vector.tt +++ b/src/Common/src/CoreLib/System/Numerics/Vector.tt @@ -351,7 +351,7 @@ namespace System.Numerics /// If the destination array is null /// If number of elements in source vector is greater than those available in destination array [Intrinsic] - public unsafe void CopyTo(T[] destination) + public unsafe readonly void CopyTo(T[] destination) { CopyTo(destination, 0); } @@ -365,7 +365,7 @@ namespace System.Numerics /// If index is greater than end of the array or index is less than zero /// If number of elements in source vector is greater than those available in destination array [Intrinsic] - public unsafe void CopyTo(T[] destination, int startIndex) + public unsafe readonly void CopyTo(T[] destination, int startIndex) { if (destination == null) { @@ -432,7 +432,7 @@ namespace System.Numerics /// /// Returns the element at the given index. /// - public unsafe T this[int index] + public unsafe readonly T this[int index] { [Intrinsic] get @@ -468,7 +468,7 @@ namespace System.Numerics /// The Object to compare against. /// True if the Object is equal to this vector; False otherwise. [MethodImplAttribute(MethodImplOptions.AggressiveInlining)] - public override bool Equals(object? obj) + public override readonly bool Equals(object? obj) { if (!(obj is Vector)) { @@ -483,7 +483,7 @@ namespace System.Numerics /// The vector to compare this instance to. /// True if the other vector is equal to this instance; False otherwise. [Intrinsic] - public bool Equals(Vector other) + public readonly bool Equals(Vector other) { if (Vector.IsHardwareAccelerated) { @@ -541,7 +541,7 @@ namespace System.Numerics /// Returns the hash code for this instance. /// /// The hash code. - public override int GetHashCode() + public override readonly int GetHashCode() { int hash = 0; @@ -599,7 +599,7 @@ namespace System.Numerics /// Returns a String representing this vector. /// /// The string representation. - public override string ToString() + public override readonly string ToString() { return ToString("G", CultureInfo.CurrentCulture); } @@ -609,7 +609,7 @@ namespace System.Numerics /// /// The format of individual elements. /// The string representation. - public string ToString(string? format) + public readonly string ToString(string? format) { return ToString(format, CultureInfo.CurrentCulture); } @@ -621,7 +621,7 @@ namespace System.Numerics /// The format of individual elements. /// The format provider to use when formatting elements. /// The string representation. - public string ToString(string? format, IFormatProvider? formatProvider) + public readonly string ToString(string? format, IFormatProvider? formatProvider) { StringBuilder sb = new StringBuilder(); string separator = NumberFormatInfo.GetInstance(formatProvider).NumberGroupSeparator; From 98cbccd4053f47c0c6ee018951e4b47ad531642d Mon Sep 17 00:00:00 2001 From: Marek Safar Date: Tue, 30 Apr 2019 20:45:50 +0200 Subject: [PATCH 150/607] Make block optimized ClearWithoutReferences fully shared (#24312) Signed-off-by: dotnet-bot --- src/Common/src/CoreLib/System/SpanHelpers.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Common/src/CoreLib/System/SpanHelpers.cs b/src/Common/src/CoreLib/System/SpanHelpers.cs index 511b85755163..12b8e26c720d 100644 --- a/src/Common/src/CoreLib/System/SpanHelpers.cs +++ b/src/Common/src/CoreLib/System/SpanHelpers.cs @@ -23,7 +23,7 @@ public static unsafe void ClearWithoutReferences(ref byte b, nuint byteLength) if (byteLength == 0) return; -#if CORECLR && (AMD64 || ARM64) +#if !PROJECTN && (AMD64 || ARM64) // The exact matrix on when RhZeroMemory is faster than InitBlockUnaligned is very complex. The factors to consider include // type of hardware and memory aligment. This threshold was chosen as a good balance accross different configurations. if (byteLength > 768) From 1fb97a4824a1ccd64595890262a6be2f66ca3f64 Mon Sep 17 00:00:00 2001 From: Krzysztof Wicher Date: Fri, 19 Apr 2019 06:15:52 -0700 Subject: [PATCH 151/607] Nullable: System.Diagnostics.Tracing (dotnet/coreclr#24070) * Nullable: System.Diagnostics.Tracing * apply feedback * fix one more comment Signed-off-by: dotnet-bot --- .../Diagnostics/Tracing/ActivityTracker.cs | 37 +- .../Diagnostics/Tracing/CounterGroup.cs | 18 +- .../Diagnostics/Tracing/CounterPayload.cs | 65 +-- .../Diagnostics/Tracing/DiagnosticCounter.cs | 7 +- .../Diagnostics/Tracing/EventCounter.cs | 4 +- .../Diagnostics/Tracing/EventDescriptor.cs | 3 +- .../Diagnostics/Tracing/EventProvider.cs | 56 +-- .../System/Diagnostics/Tracing/EventSource.cs | 429 ++++++++++-------- .../Tracing/FrameworkEventSource.cs | 9 +- .../Diagnostics/Tracing/IEventProvider.cs | 1 + .../Tracing/IncrementingEventCounter.cs | 3 +- .../Tracing/IncrementingPollingCounter.cs | 6 +- .../Diagnostics/Tracing/PollingCounter.cs | 4 + .../Diagnostics/Tracing/StubEnvironment.cs | 19 +- .../Tracing/TraceLogging/ArrayTypeInfo.cs | 10 +- .../Tracing/TraceLogging/ConcurrentSet.cs | 9 +- .../Tracing/TraceLogging/ConcurrentSetItem.cs | 1 + .../Tracing/TraceLogging/DataCollector.cs | 20 +- .../Tracing/TraceLogging/EmptyStruct.cs | 1 + .../Tracing/TraceLogging/EnumHelper.cs | 2 + .../TraceLogging/EnumerableTypeInfo.cs | 10 +- .../TraceLogging/EventDataAttribute.cs | 3 +- .../TraceLogging/EventFieldAttribute.cs | 3 +- .../TraceLogging/EventIgnoreAttribute.cs | 1 + .../Tracing/TraceLogging/EventPayload.cs | 29 +- .../TraceLogging/EventSourceActivity.cs | 33 +- .../TraceLogging/EventSourceOptions.cs | 1 + .../Tracing/TraceLogging/FieldMetadata.cs | 13 +- .../Tracing/TraceLogging/InvokeTypeInfo.cs | 11 +- .../Tracing/TraceLogging/NameInfo.cs | 1 + .../Tracing/TraceLogging/PropertyAnalysis.cs | 5 +- .../Tracing/TraceLogging/PropertyValue.cs | 94 ++-- .../Tracing/TraceLogging/SimpleEventTypes.cs | 4 +- .../Tracing/TraceLogging/SimpleTypeInfos.cs | 39 +- .../Tracing/TraceLogging/Statics.cs | 23 +- .../TraceLogging/TraceLoggingDataCollector.cs | 7 +- .../TraceLogging/TraceLoggingEventSource.cs | 41 +- .../TraceLogging/TraceLoggingEventTypes.cs | 5 +- .../TraceLoggingMetadataCollector.cs | 9 +- .../TraceLogging/TraceLoggingTypeInfo.cs | 13 +- .../Tracing/TraceLogging/TypeAnalysis.cs | 9 +- .../System/Diagnostics/Tracing/Winmeta.cs | 1 + 42 files changed, 591 insertions(+), 468 deletions(-) diff --git a/src/Common/src/CoreLib/System/Diagnostics/Tracing/ActivityTracker.cs b/src/Common/src/CoreLib/System/Diagnostics/Tracing/ActivityTracker.cs index d0cd84a6ae05..c3d524276891 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/Tracing/ActivityTracker.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/Tracing/ActivityTracker.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable using System; using System.Diagnostics; using System.Threading; @@ -99,7 +100,7 @@ public void OnStart(string providerName, string activityName, int task, ref Guid // Check for recursion, and force-stop any activities if the activity already started. if ((options & EventActivityOptions.Recursive) == 0) { - ActivityInfo existingActivity = FindActiveActivity(fullActivityName, currentActivity); + ActivityInfo? existingActivity = FindActiveActivity(fullActivityName, currentActivity); if (existingActivity != null) { OnStop(providerName, activityName, task, ref activityId); @@ -154,13 +155,13 @@ public void OnStop(string providerName, string activityName, int task, ref Guid for (; ; ) // This is a retry loop. { - ActivityInfo currentActivity = m_current.Value; - ActivityInfo newCurrentActivity = null; // if we have seen any live activities (orphans), at he first one we have seen. + ActivityInfo? currentActivity = m_current.Value; + ActivityInfo? newCurrentActivity = null; // if we have seen any live activities (orphans), at he first one we have seen. // Search to find the activity to stop in one pass. This insures that we don't let one mistake // (stopping something that was not started) cause all active starts to be stopped // By first finding the target start to stop we are more robust. - ActivityInfo activityToStop = FindActiveActivity(fullActivityName, currentActivity); + ActivityInfo? activityToStop = FindActiveActivity(fullActivityName, currentActivity); // ignore stops where we can't find a start because we may have popped them previously. if (activityToStop == null) @@ -175,7 +176,7 @@ public void OnStop(string providerName, string activityName, int task, ref Guid activityId = activityToStop.ActivityId; // See if there are any orphans that need to be stopped. - ActivityInfo orphan = currentActivity; + ActivityInfo? orphan = currentActivity; while (orphan != activityToStop && orphan != null) { if (orphan.m_stopped != 0) // Skip dead activities. @@ -229,7 +230,7 @@ public void Enable() // Catch the not Implemented try { - m_current = new AsyncLocal(ActivityChanging); + m_current = new AsyncLocal(ActivityChanging); } catch (NotImplementedException) { #if (!ES_BUILD_PCL && ! ES_BUILD_PN) @@ -251,9 +252,9 @@ public void Enable() /// /// Searched for a active (nonstopped) activity with the given name. Returns null if not found. /// - private ActivityInfo FindActiveActivity(string name, ActivityInfo startLocation) + private ActivityInfo? FindActiveActivity(string name, ActivityInfo? startLocation) { - var activity = startLocation; + ActivityInfo? activity = startLocation; while (activity != null) { if (name == activity.m_name && activity.m_stopped == 0) @@ -293,7 +294,7 @@ private string NormalizeActivityName(string providerName, string activityName, i /// private class ActivityInfo { - public ActivityInfo(string name, long uniqueId, ActivityInfo creator, Guid activityIDToRestore, EventActivityOptions options) + public ActivityInfo(string name, long uniqueId, ActivityInfo? creator, Guid activityIDToRestore, EventActivityOptions options) { m_name = name; m_eventOptions = options; @@ -314,10 +315,10 @@ public Guid ActivityId } } - public static string Path(ActivityInfo activityInfo) + public static string Path(ActivityInfo? activityInfo) { if (activityInfo == null) - return (""); + return ""; return Path(activityInfo.m_creator) + "/" + activityInfo.m_uniqueId.ToString(); } @@ -326,7 +327,7 @@ public override string ToString() return m_name + "(" + Path(this) + (m_stopped != 0 ? ",DEAD)" : ")"); } - public static string LiveActivities(ActivityInfo list) + public static string LiveActivities(ActivityInfo? list) { if (list == null) return ""; @@ -400,7 +401,7 @@ private unsafe void CreateActivityPathGuid(out Guid idRet, out int activityPathG private unsafe void CreateOverflowGuid(Guid* outPtr) { // Search backwards for an ancestor that has sufficient space to put the ID. - for (ActivityInfo ancestor = m_creator; ancestor != null; ancestor = ancestor.m_creator) + for (ActivityInfo? ancestor = m_creator; ancestor != null; ancestor = ancestor.m_creator) { if (ancestor.m_activityPathGuidOffset <= 10) // we need at least 2 bytes. { @@ -540,7 +541,7 @@ private static unsafe void WriteNibble(ref byte* ptr, byte* endPtr, uint value) readonly internal EventActivityOptions m_eventOptions; // Options passed to start. internal long m_lastChildID; // used to create a unique ID for my children activities internal int m_stopped; // This work item has stopped - readonly internal ActivityInfo m_creator; // My parent (creator). Forms the Path() for the activity. + readonly internal ActivityInfo? m_creator; // My parent (creator). Forms the Path() for the activity. readonly internal Guid m_activityIdToRestore; // The Guid to restore after a stop. #endregion } @@ -548,10 +549,10 @@ private static unsafe void WriteNibble(ref byte* ptr, byte* endPtr, uint value) // This callback is used to initialize the m_current AsyncLocal Variable. // Its job is to keep the ETW Activity ID (part of thread local storage) in sync // with m_current.ActivityID - void ActivityChanging(AsyncLocalValueChangedArgs args) + void ActivityChanging(AsyncLocalValueChangedArgs args) { - ActivityInfo cur = args.CurrentValue; - ActivityInfo prev = args.PreviousValue; + ActivityInfo? cur = args.CurrentValue; + ActivityInfo? prev = args.PreviousValue; // Are we popping off a value? (we have a prev, and it creator is cur) // Then check if we should use the GUID at the time of the start event @@ -592,7 +593,7 @@ void ActivityChanging(AsyncLocalValueChangedArgs args) /// /// This variable points to a linked list that represents all Activities that have started but have not stopped. /// - AsyncLocal m_current; + AsyncLocal? m_current; bool m_checkedForEnable; // Singleton diff --git a/src/Common/src/CoreLib/System/Diagnostics/Tracing/CounterGroup.cs b/src/Common/src/CoreLib/System/Diagnostics/Tracing/CounterGroup.cs index 0382556f3b56..a9fa903c305e 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/Tracing/CounterGroup.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/Tracing/CounterGroup.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable using System; using System.Diagnostics; using System.Collections; @@ -48,12 +49,14 @@ private void RegisterCommandCallback() _eventSource.EventCommandExecuted += OnEventSourceCommand; } - private void OnEventSourceCommand(object sender, EventCommandEventArgs e) + private void OnEventSourceCommand(object? sender, EventCommandEventArgs e) { if (e.Command == EventCommand.Enable || e.Command == EventCommand.Update) { string valueStr; float value; + Debug.Assert(e.Arguments != null); + if (e.Arguments.TryGetValue("EventCounterIntervalSec", out valueStr) && float.TryParse(valueStr, out value)) { // Recursion through EventSource callbacks possible. When we enable the timer @@ -76,7 +79,7 @@ private void OnEventSourceCommand(object sender, EventCommandEventArgs e) // We need eventCounters to 'attach' themselves to a particular EventSource. // this table provides the mapping from EventSource -> CounterGroup // which represents this 'attached' information. - private static WeakReference[] s_counterGroups; + private static WeakReference[]? s_counterGroups; private static readonly object s_counterGroupsLock = new object(); private static void EnsureEventSourceIndexAvailable(int eventSourceIndex) @@ -100,8 +103,9 @@ internal static CounterGroup GetCounterGroup(EventSource eventSource) { int eventSourceIndex = EventListener.EventSourceIndex(eventSource); EnsureEventSourceIndexAvailable(eventSourceIndex); + Debug.Assert(s_counterGroups != null); WeakReference weakRef = CounterGroup.s_counterGroups[eventSourceIndex]; - CounterGroup ret = null; + CounterGroup? ret = null; if (weakRef == null || !weakRef.TryGetTarget(out ret)) { ret = new CounterGroup(eventSource); @@ -117,7 +121,7 @@ internal static CounterGroup GetCounterGroup(EventSource eventSource) private DateTime _timeStampSinceCollectionStarted; private int _pollingIntervalInMilliseconds; - private Timer _pollingTimer; + private Timer? _pollingTimer; private void DisposeTimer() { @@ -153,7 +157,7 @@ private void EnableTimer(float pollingIntervalInSeconds) restoreFlow = true; } - _pollingTimer = new Timer(s => ((CounterGroup)s).OnTimer(null), this, _pollingIntervalInMilliseconds, _pollingIntervalInMilliseconds); + _pollingTimer = new Timer(s => ((CounterGroup)s!).OnTimer(null), this, _pollingIntervalInMilliseconds, _pollingIntervalInMilliseconds); } finally { @@ -166,7 +170,7 @@ private void EnableTimer(float pollingIntervalInSeconds) OnTimer(null); } - private void OnTimer(object state) + private void OnTimer(object? state) { Debug.WriteLine("Timer fired at " + DateTime.UtcNow.ToString("mm.ss.ffffff")); lock (this) // Lock the CounterGroup @@ -227,4 +231,4 @@ private void OnTimer(Task t, object s) #endregion // Timer Processing } -} \ No newline at end of file +} diff --git a/src/Common/src/CoreLib/System/Diagnostics/Tracing/CounterPayload.cs b/src/Common/src/CoreLib/System/Diagnostics/Tracing/CounterPayload.cs index 1be7d5494ae9..bca7d3b1967e 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/Tracing/CounterPayload.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/Tracing/CounterPayload.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable using System; using System.Diagnostics; using System.Collections; @@ -18,11 +19,11 @@ namespace System.Diagnostics.Tracing #endif { [EventData] - internal class CounterPayload : IEnumerable> + internal class CounterPayload : IEnumerable> { - public string Name { get; set; } + public string? Name { get; set; } - public string DisplayName { get; set; } + public string? DisplayName { get; set; } public double Mean { get; set; } @@ -36,11 +37,11 @@ internal class CounterPayload : IEnumerable> public float IntervalSec { get; internal set; } - public string Metadata { get; set; } + public string? Metadata { get; set; } #region Implementation of the IEnumerable interface - public IEnumerator> GetEnumerator() + public IEnumerator> GetEnumerator() { return ForEnumeration.GetEnumerator(); } @@ -50,21 +51,21 @@ IEnumerator IEnumerable.GetEnumerator() return ForEnumeration.GetEnumerator(); } - private IEnumerable> ForEnumeration + private IEnumerable> ForEnumeration { get { - yield return new KeyValuePair("Name", Name); - yield return new KeyValuePair("DisplayName", DisplayName); - yield return new KeyValuePair("Mean", Mean); - yield return new KeyValuePair("StandardDeviation", StandardDeviation); - yield return new KeyValuePair("Count", Count); - yield return new KeyValuePair("Min", Min); - yield return new KeyValuePair("Max", Max); - yield return new KeyValuePair("IntervalSec", IntervalSec); - yield return new KeyValuePair("Series", $"Interval={IntervalSec}"); - yield return new KeyValuePair("CounterType", "Mean"); - yield return new KeyValuePair("Metadata", Metadata); + yield return new KeyValuePair("Name", Name); + yield return new KeyValuePair("DisplayName", DisplayName); + yield return new KeyValuePair("Mean", Mean); + yield return new KeyValuePair("StandardDeviation", StandardDeviation); + yield return new KeyValuePair("Count", Count); + yield return new KeyValuePair("Min", Min); + yield return new KeyValuePair("Max", Max); + yield return new KeyValuePair("IntervalSec", IntervalSec); + yield return new KeyValuePair("Series", $"Interval={IntervalSec}"); + yield return new KeyValuePair("CounterType", "Mean"); + yield return new KeyValuePair("Metadata", Metadata); } } @@ -72,23 +73,23 @@ private IEnumerable> ForEnumeration } [EventData] - internal class IncrementingCounterPayload : IEnumerable> + internal class IncrementingCounterPayload : IEnumerable> { - public string Name { get; set; } + public string? Name { get; set; } - public string DisplayName { get; set; } + public string? DisplayName { get; set; } - public string DisplayRateTimeScale { get; set; } + public string? DisplayRateTimeScale { get; set; } public double Increment { get; set; } public float IntervalSec { get; internal set; } - public string Metadata { get; set; } + public string? Metadata { get; set; } #region Implementation of the IEnumerable interface - public IEnumerator> GetEnumerator() + public IEnumerator> GetEnumerator() { return ForEnumeration.GetEnumerator(); } @@ -98,18 +99,18 @@ IEnumerator IEnumerable.GetEnumerator() return ForEnumeration.GetEnumerator(); } - private IEnumerable> ForEnumeration + private IEnumerable> ForEnumeration { get { - yield return new KeyValuePair("Name", Name); - yield return new KeyValuePair("DisplayName", DisplayName); - yield return new KeyValuePair("DisplayRateTimeScale", DisplayRateTimeScale); - yield return new KeyValuePair("Increment", Increment); - yield return new KeyValuePair("IntervalSec", IntervalSec); - yield return new KeyValuePair("Series", $"Interval={IntervalSec}"); - yield return new KeyValuePair("CounterType", "Sum"); - yield return new KeyValuePair("Metadata", Metadata); + yield return new KeyValuePair("Name", Name); + yield return new KeyValuePair("DisplayName", DisplayName); + yield return new KeyValuePair("DisplayRateTimeScale", DisplayRateTimeScale); + yield return new KeyValuePair("Increment", Increment); + yield return new KeyValuePair("IntervalSec", IntervalSec); + yield return new KeyValuePair("Series", $"Interval={IntervalSec}"); + yield return new KeyValuePair("CounterType", "Sum"); + yield return new KeyValuePair("Metadata", Metadata); } } diff --git a/src/Common/src/CoreLib/System/Diagnostics/Tracing/DiagnosticCounter.cs b/src/Common/src/CoreLib/System/Diagnostics/Tracing/DiagnosticCounter.cs index ea4cb92612b1..1d0bc543741c 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/Tracing/DiagnosticCounter.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/Tracing/DiagnosticCounter.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable using System; using System.Diagnostics; using System.Collections; @@ -59,7 +60,7 @@ public void Dispose() if (_group != null) { _group.Remove(this); - _group = null; + _group = null!; // TODO-NULLABLE: should not be nulled out } } @@ -75,7 +76,7 @@ public void AddMetadata(string key, string value) } } - public string DisplayName { get; set; } + public string? DisplayName { get; set; } public string Name { get; } @@ -84,7 +85,7 @@ public void AddMetadata(string key, string value) #region private implementation private CounterGroup _group; - private Dictionary _metadata; + private Dictionary? _metadata; internal abstract void WritePayload(float intervalSec); diff --git a/src/Common/src/CoreLib/System/Diagnostics/Tracing/EventCounter.cs b/src/Common/src/CoreLib/System/Diagnostics/Tracing/EventCounter.cs index a9fc0895c9a8..7c230a2609c6 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/Tracing/EventCounter.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/Tracing/EventCounter.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable using System; using System.Diagnostics; using System.Collections; @@ -111,6 +112,7 @@ internal override void WritePayload(float intervalSec) EventSource.Write("EventCounters", new EventSourceOptions() { Level = EventLevel.LogAlways }, new CounterPayloadType(payload)); } } + private void ResetStatistics() { Debug.Assert(Monitor.IsEntered(MyLock)); @@ -127,7 +129,7 @@ private void ResetStatistics() private const int BufferedSize = 10; private const double UnusedBufferSlotValue = double.NegativeInfinity; private const int UnsetIndex = -1; - private volatile double[] _bufferedValues; + private volatile double[] _bufferedValues = null!; private volatile int _bufferedValuesIndex; private void InitializeBuffer() diff --git a/src/Common/src/CoreLib/System/Diagnostics/Tracing/EventDescriptor.cs b/src/Common/src/CoreLib/System/Diagnostics/Tracing/EventDescriptor.cs index 53017b70602d..cf269bc5a539 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/Tracing/EventDescriptor.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/Tracing/EventDescriptor.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable using System; using System.Runtime.InteropServices; @@ -176,7 +177,7 @@ internal int TraceLoggingId } } - public override bool Equals(object obj) + public override bool Equals(object? obj) { if (!(obj is EventDescriptor)) return false; diff --git a/src/Common/src/CoreLib/System/Diagnostics/Tracing/EventProvider.cs b/src/Common/src/CoreLib/System/Diagnostics/Tracing/EventProvider.cs index a8622a8fb817..2d4d68a436ce 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/Tracing/EventProvider.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/Tracing/EventProvider.cs @@ -1,6 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. + +#nullable enable using Microsoft.Win32; using System.Collections.Generic; using System.Diagnostics; @@ -93,14 +95,14 @@ internal SessionInfo(int sessionIdBit_, int etwSessionId_) } internal IEventProvider m_eventProvider; // The interface that implements the specific logging mechanism functions. - Interop.Advapi32.EtwEnableCallback m_etwCallback; // Trace Callback function + Interop.Advapi32.EtwEnableCallback? m_etwCallback; // Trace Callback function private long m_regHandle; // Trace Registration Handle private byte m_level; // Tracing Level private long m_anyKeywordMask; // Trace Enable Flags private long m_allKeywordMask; // Match all keyword - private List m_liveSessions; // current live sessions (Tuple) + private List? m_liveSessions; // current live sessions (Tuple) private bool m_enabled; // Enabled flag from Trace callback - private string m_providerName; // Control name + private string? m_providerName; // Control name private Guid m_providerId; // Control Guid internal bool m_disposed; // when true provider has unregistered @@ -277,7 +279,7 @@ unsafe void EtwEnableCallBack( try { ControllerCommand command = ControllerCommand.Update; - IDictionary args = null; + IDictionary? args = null; bool skipFinalOnControllerCommand = false; if (controlCode == Interop.Advapi32.EVENT_CONTROL_CODE_ENABLE_PROVIDER) { @@ -315,12 +317,13 @@ unsafe void EtwEnableCallBack( filterData = null; // read filter data only when a session is being *added* - byte[] data; + byte[]? data; int keyIndex; if (bEnabling && GetDataFromController(etwSessionId, filterData, out command, out data, out keyIndex)) { args = new Dictionary(4); + Debug.Assert(data != null); // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 while (keyIndex < data.Length) { int keyEnd = FindNull(data, keyIndex); @@ -366,7 +369,7 @@ unsafe void EtwEnableCallBack( } // New in CLR4.0 - protected virtual void OnControllerCommand(ControllerCommand command, IDictionary arguments, int sessionId, int etwSessionId) { } + protected virtual void OnControllerCommand(ControllerCommand command, IDictionary? arguments, int sessionId, int etwSessionId) { } protected EventLevel Level { get { return (EventLevel)m_level; } set { m_level = (byte)value; } } protected EventKeywords MatchAnyKeyword { get { return (EventKeywords)m_anyKeywordMask; } set { m_anyKeywordMask = unchecked((long)value); } } protected EventKeywords MatchAllKeyword { get { return (EventKeywords)m_allKeywordMask; } set { m_allKeywordMask = unchecked((long)value); } } @@ -390,10 +393,10 @@ private static int FindNull(byte[] buffer, int idx) /// private List> GetSessions() { - List liveSessionList = null; + List? liveSessionList = null; GetSessionInfo( - (int etwSessionId, long matchAllKeywords, ref List sessionList) => + (int etwSessionId, long matchAllKeywords, ref List? sessionList) => GetSessionInfoCallback(etwSessionId, matchAllKeywords, ref sessionList), ref liveSessionList); @@ -407,7 +410,7 @@ private List> GetSessions() { int idx; if ((idx = IndexOfSessionInList(liveSessionList, s.etwSessionId)) < 0 || - (liveSessionList[idx].sessionIdBit != s.sessionIdBit)) + (liveSessionList![idx].sessionIdBit != s.sessionIdBit)) changedSessionList.Add(Tuple.Create(s, false)); } @@ -420,7 +423,7 @@ private List> GetSessions() { int idx; if ((idx = IndexOfSessionInList(m_liveSessions, s.etwSessionId)) < 0 || - (m_liveSessions[idx].sessionIdBit != s.sessionIdBit)) + (m_liveSessions![idx].sessionIdBit != s.sessionIdBit)) changedSessionList.Add(Tuple.Create(s, true)); } } @@ -435,7 +438,7 @@ private List> GetSessions() /// GetSessionInfo() passes in. /// private static void GetSessionInfoCallback(int etwSessionId, long matchAllKeywords, - ref List sessionList) + ref List? sessionList) { uint sessionIdBitMask = (uint)SessionMask.FromEventKeywords(unchecked((ulong)matchAllKeywords)); // an ETW controller that specifies more than the mandated bit for our EventSource @@ -461,14 +464,14 @@ private static void GetSessionInfoCallback(int etwSessionId, long matchAllKeywor sessionList.Add(new SessionInfo(val + 1, etwSessionId)); } - private delegate void SessionInfoCallback(int etwSessionId, long matchAllKeywords, ref List sessionList); + private delegate void SessionInfoCallback(int etwSessionId, long matchAllKeywords, ref List? sessionList); /// /// This method enumerates over all active ETW sessions that have enabled 'this.m_Guid' /// for the current process ID, calling 'action' for each session, and passing it the /// ETW session and the 'AllKeywords' the session enabled for the current provider. /// - private unsafe void GetSessionInfo(SessionInfoCallback action, ref List sessionList) + private unsafe void GetSessionInfo(SessionInfoCallback action, ref List? sessionList) { // We wish the EventSource package to be legal for Windows Store applications. // Currently EnumerateTraceGuidsEx is not an allowed API, so we avoid its use here @@ -578,7 +581,7 @@ private unsafe void GetSessionInfo(SessionInfoCallback action, ref List - private static int IndexOfSessionInList(List sessions, int etwSessionId) + private static int IndexOfSessionInList(List? sessions, int etwSessionId) { if (sessions == null) return -1; @@ -600,7 +603,7 @@ private static int IndexOfSessionInList(List sessions, int etwSessi /// starts, and the command being issued associated with that data. /// private unsafe bool GetDataFromController(int etwSessionId, - Interop.Advapi32.EVENT_FILTER_DESCRIPTOR* filterData, out ControllerCommand command, out byte[] data, out int dataStart) + Interop.Advapi32.EVENT_FILTER_DESCRIPTOR* filterData, out ControllerCommand command, out byte[]? data, out int dataStart) { data = null; dataStart = 0; @@ -727,7 +730,7 @@ private static void SetLastError(WriteEventErrorCode error) // // // - private static unsafe object EncodeObject(ref object data, ref EventData* dataDescriptor, ref byte* dataBuffer, ref uint totalEventSize) + private static unsafe object? EncodeObject(ref object data, ref EventData* dataDescriptor, ref byte* dataBuffer, ref uint totalEventSize) /*++ Routine Description: @@ -753,8 +756,8 @@ to fill the passed in ETW data descriptor. Again: dataDescriptor->Reserved = 0; - string sRet = data as string; - byte[] blobRet = null; + string? sRet = data as string; + byte[]? blobRet = null; if (sRet != null) { @@ -921,7 +924,7 @@ to fill the passed in ETW data descriptor. if (data == null) sRet = ""; else - sRet = data.ToString(); + sRet = data.ToString()!; dataDescriptor->Size = ((uint)sRet.Length + 1) * 2; } @@ -931,7 +934,7 @@ to fill the passed in ETW data descriptor. dataDescriptor++; dataBuffer += s_basicTypeAllocationBufferSize; - return (object)sRet ?? (object)blobRet; + return (object?)sRet ?? (object?)blobRet; } /// @@ -989,7 +992,7 @@ internal unsafe bool WriteEvent(ref EventDescriptor eventDescriptor, IntPtr even int index; int refObjIndex = 0; List refObjPosition = new List(s_etwAPIMaxRefObjCount); - List dataRefObj = new List(s_etwAPIMaxRefObjCount); + List dataRefObj = new List(s_etwAPIMaxRefObjCount); EventData* userData = stackalloc EventData[2 * argCount]; for (int i = 0; i < 2 * argCount; i++) userData[i] = default; @@ -1008,8 +1011,7 @@ internal unsafe bool WriteEvent(ref EventDescriptor eventDescriptor, IntPtr even { if (eventPayload[index] != null) { - object supportedRefObj; - supportedRefObj = EncodeObject(ref eventPayload[index], ref userDataPtr, ref currentBuffer, ref totalEventSize); + object? supportedRefObj = EncodeObject(ref eventPayload[index], ref userDataPtr, ref currentBuffer, ref totalEventSize); if (supportedRefObj != null) { @@ -1061,8 +1063,8 @@ internal unsafe bool WriteEvent(ref EventDescriptor eventDescriptor, IntPtr even // // now fix any string arguments and set the pointer on the data descriptor // - fixed (char* v0 = (string)dataRefObj[0], v1 = (string)dataRefObj[1], v2 = (string)dataRefObj[2], v3 = (string)dataRefObj[3], - v4 = (string)dataRefObj[4], v5 = (string)dataRefObj[5], v6 = (string)dataRefObj[6], v7 = (string)dataRefObj[7]) + fixed (char* v0 = (string?)dataRefObj[0], v1 = (string?)dataRefObj[1], v2 = (string?)dataRefObj[2], v3 = (string?)dataRefObj[3], + v4 = (string?)dataRefObj[4], v5 = (string?)dataRefObj[5], v6 = (string?)dataRefObj[6], v7 = (string?)dataRefObj[7]) { userDataPtr = (EventData*)userData; if (dataRefObj[0] != null) @@ -1114,12 +1116,12 @@ internal unsafe bool WriteEvent(ref EventDescriptor eventDescriptor, IntPtr even rgGCHandle[i] = GCHandle.Alloc(dataRefObj[i], GCHandleType.Pinned); if (dataRefObj[i] is string) { - fixed (char* p = (string)dataRefObj[i]) + fixed (char* p = (string?)dataRefObj[i]) userDataPtr[refObjPosition[i]].Ptr = (ulong)p; } else { - fixed (byte* p = (byte[])dataRefObj[i]) + fixed (byte* p = (byte[]?)dataRefObj[i]) userDataPtr[refObjPosition[i]].Ptr = (ulong)p; } } diff --git a/src/Common/src/CoreLib/System/Diagnostics/Tracing/EventSource.cs b/src/Common/src/CoreLib/System/Diagnostics/Tracing/EventSource.cs index 50343b4c5f3d..5a6625704403 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/Tracing/EventSource.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/Tracing/EventSource.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable // This program uses code hyperlinks available as part of the HyperAddin Visual Studio plug-in. // It is available from http://www.codeplex.com/hyperAddin #if ES_BUILD_STANDALONE @@ -320,7 +321,7 @@ public static Guid GetGuid(Type eventSourceType) if (eventSourceType == null) throw new ArgumentNullException(nameof(eventSourceType)); - EventSourceAttribute attrib = (EventSourceAttribute)GetCustomAttributeHelper(eventSourceType, typeof(EventSourceAttribute)); + EventSourceAttribute? attrib = (EventSourceAttribute?)GetCustomAttributeHelper(eventSourceType, typeof(EventSourceAttribute)); string name = eventSourceType.Name; if (attrib != null) { @@ -366,7 +367,7 @@ public static string GetName(Type eventSourceType) /// The manifest XML fragment contains the string name of the DLL name in /// which it is embedded. This parameter specifies what name will be used /// The XML data string - public static string GenerateManifest(Type eventSourceType, string assemblyPathToIncludeInManifest) + public static string? GenerateManifest(Type eventSourceType, string? assemblyPathToIncludeInManifest) { return GenerateManifest(eventSourceType, assemblyPathToIncludeInManifest, EventManifestOptions.None); } @@ -382,12 +383,12 @@ public static string GenerateManifest(Type eventSourceType, string assemblyPathT /// The flags to customize manifest generation. If flags has bit OnlyIfNeededForRegistration specified /// this returns null when the eventSourceType does not require explicit registration /// The XML data string or null - public static string GenerateManifest(Type eventSourceType, string assemblyPathToIncludeInManifest, EventManifestOptions flags) + public static string? GenerateManifest(Type eventSourceType, string? assemblyPathToIncludeInManifest, EventManifestOptions flags) { if (eventSourceType == null) throw new ArgumentNullException(nameof(eventSourceType)); - byte[] manifestBytes = EventSource.CreateManifestAndDescriptors(eventSourceType, assemblyPathToIncludeInManifest, null, flags); + byte[]? manifestBytes = EventSource.CreateManifestAndDescriptors(eventSourceType, assemblyPathToIncludeInManifest, null, flags); return (manifestBytes == null) ? null : Encoding.UTF8.GetString(manifestBytes, 0, manifestBytes.Length); } @@ -401,6 +402,8 @@ public static IEnumerable GetSources() var ret = new List(); lock (EventListener.EventListenersLock) { + Debug.Assert(EventListener.s_EventSources != null); + foreach (WeakReference eventSourceRef in EventListener.s_EventSources) { if (eventSourceRef.Target is EventSource eventSource && !eventSource.IsDisposed) @@ -419,7 +422,7 @@ public static IEnumerable GetSources() /// The instance of EventSource to send the command to /// A positive user-defined EventCommand, or EventCommand.SendManifest /// A set of (name-argument, value-argument) pairs associated with the command - public static void SendCommand(EventSource eventSource, EventCommand command, IDictionary commandArguments) + public static void SendCommand(EventSource eventSource, EventCommand command, IDictionary? commandArguments) { if (eventSource == null) throw new ArgumentNullException(nameof(eventSource)); @@ -443,7 +446,7 @@ public static void SendCommand(EventSource eventSource, EventCommand command, ID /// The event source constructor does not throw exceptions. Instead we remember any exception that /// was generated (it is also logged to Trace.WriteLine). /// - public Exception ConstructionException { get { return m_constructionException; } } + public Exception? ConstructionException { get { return m_constructionException; } } /// /// EventSources can have arbitrary string key-value pairs associated with them called Traits. @@ -453,7 +456,7 @@ public static void SendCommand(EventSource eventSource, EventCommand command, ID /// /// The key to look up in the set of key-value pairs passed to the EventSource constructor /// The value string associated with key. Will return null if there is no such key. - public string GetTrait(string key) + public string? GetTrait(string key) { if (m_traits != null) { @@ -463,6 +466,7 @@ public string GetTrait(string key) return m_traits[i + 1]; } } + return null; } @@ -485,7 +489,7 @@ public event EventHandler EventCommandExecuted // If we have an EventHandler attached to the EventSource before the first command arrives // It should get a chance to handle the deferred commands. - EventCommandEventArgs deferredCommands = m_deferredCommands; + EventCommandEventArgs? deferredCommands = m_deferredCommands; while (deferredCommands != null) { value(this, deferredCommands); @@ -658,15 +662,15 @@ protected EventSource(EventSourceSettings settings) : this(settings, null) { } /// /// See EventSourceSettings for more. /// A collection of key-value strings (must be an even number). - protected EventSource(EventSourceSettings settings, params string[] traits) + protected EventSource(EventSourceSettings settings, params string[]? traits) { m_config = ValidateSettings(settings); Guid eventSourceGuid; - string eventSourceName; + string? eventSourceName; - EventMetadata[] eventDescriptors; - byte[] manifest; + EventMetadata[]? eventDescriptors; + byte[]? manifest; GetMetadata(out eventSourceGuid, out eventSourceName, out eventDescriptors, out manifest); if (eventSourceGuid.Equals(Guid.Empty) || eventSourceName == null) @@ -726,7 +730,7 @@ private unsafe void DefineEventPipeEvents() } #endif - internal virtual void GetMetadata(out Guid eventSourceGuid, out string eventSourceName, out EventMetadata[] eventData, out byte[] manifestBytes) + internal virtual void GetMetadata(out Guid eventSourceGuid, out string? eventSourceName, out EventMetadata[]? eventData, out byte[]? manifestBytes) { // // In ProjectN subclasses need to override this method, and return the data from their EventSourceAttribute and EventAttribute annotations. @@ -858,7 +862,7 @@ protected unsafe void WriteEvent(int eventId, long arg1, long arg2, long arg3) // optimized for common signatures (strings) [SuppressMessage("Microsoft.Concurrency", "CA8001", Justification = "This does not need to be correct when racing with other threads")] - protected unsafe void WriteEvent(int eventId, string arg1) + protected unsafe void WriteEvent(int eventId, string? arg1) { if (m_eventSourceEnabled) { @@ -875,7 +879,7 @@ protected unsafe void WriteEvent(int eventId, string arg1) } [SuppressMessage("Microsoft.Concurrency", "CA8001", Justification = "This does not need to be correct when racing with other threads")] - protected unsafe void WriteEvent(int eventId, string arg1, string arg2) + protected unsafe void WriteEvent(int eventId, string? arg1, string? arg2) { if (m_eventSourceEnabled) { @@ -897,7 +901,7 @@ protected unsafe void WriteEvent(int eventId, string arg1, string arg2) } [SuppressMessage("Microsoft.Concurrency", "CA8001", Justification = "This does not need to be correct when racing with other threads")] - protected unsafe void WriteEvent(int eventId, string arg1, string arg2, string arg3) + protected unsafe void WriteEvent(int eventId, string? arg1, string? arg2, string? arg3) { if (m_eventSourceEnabled) { @@ -925,7 +929,7 @@ protected unsafe void WriteEvent(int eventId, string arg1, string arg2, string a // optimized for common signatures (string and ints) [SuppressMessage("Microsoft.Concurrency", "CA8001", Justification = "This does not need to be correct when racing with other threads")] - protected unsafe void WriteEvent(int eventId, string arg1, int arg2) + protected unsafe void WriteEvent(int eventId, string? arg1, int arg2) { if (m_eventSourceEnabled) { @@ -945,7 +949,7 @@ protected unsafe void WriteEvent(int eventId, string arg1, int arg2) } [SuppressMessage("Microsoft.Concurrency", "CA8001", Justification = "This does not need to be correct when racing with other threads")] - protected unsafe void WriteEvent(int eventId, string arg1, int arg2, int arg3) + protected unsafe void WriteEvent(int eventId, string? arg1, int arg2, int arg3) { if (m_eventSourceEnabled) { @@ -969,7 +973,7 @@ protected unsafe void WriteEvent(int eventId, string arg1, int arg2, int arg3) // optimized for common signatures (string and longs) [SuppressMessage("Microsoft.Concurrency", "CA8001", Justification = "This does not need to be correct when racing with other threads")] - protected unsafe void WriteEvent(int eventId, string arg1, long arg2) + protected unsafe void WriteEvent(int eventId, string? arg1, long arg2) { if (m_eventSourceEnabled) { @@ -990,7 +994,7 @@ protected unsafe void WriteEvent(int eventId, string arg1, long arg2) // optimized for common signatures (long and string) [SuppressMessage("Microsoft.Concurrency", "CA8001", Justification = "This does not need to be correct when racing with other threads")] - protected unsafe void WriteEvent(int eventId, long arg1, string arg2) + protected unsafe void WriteEvent(int eventId, long arg1, string? arg2) { if (m_eventSourceEnabled) { @@ -1011,7 +1015,7 @@ protected unsafe void WriteEvent(int eventId, long arg1, string arg2) // optimized for common signatures (int and string) [SuppressMessage("Microsoft.Concurrency", "CA8001", Justification = "This does not need to be correct when racing with other threads")] - protected unsafe void WriteEvent(int eventId, int arg1, string arg2) + protected unsafe void WriteEvent(int eventId, int arg1, string? arg2) { if (m_eventSourceEnabled) { @@ -1031,7 +1035,7 @@ protected unsafe void WriteEvent(int eventId, int arg1, string arg2) } [SuppressMessage("Microsoft.Concurrency", "CA8001", Justification = "This does not need to be correct when racing with other threads")] - protected unsafe void WriteEvent(int eventId, byte[] arg1) + protected unsafe void WriteEvent(int eventId, byte[]? arg1) { if (m_eventSourceEnabled) { @@ -1065,7 +1069,7 @@ protected unsafe void WriteEvent(int eventId, byte[] arg1) } [SuppressMessage("Microsoft.Concurrency", "CA8001", Justification = "This does not need to be correct when racing with other threads")] - protected unsafe void WriteEvent(int eventId, long arg1, byte[] arg2) + protected unsafe void WriteEvent(int eventId, long arg1, byte[]? arg2) { if (m_eventSourceEnabled) { @@ -1212,9 +1216,9 @@ protected unsafe void WriteEventWithRelatedActivityIdCore(int eventId, Guid* rel { if (m_eventSourceEnabled) { + Debug.Assert(m_eventData != null); // You must have initialized this if you enabled the source. try { - Debug.Assert(m_eventData != null); // You must have initialized this if you enabled the source. if (relatedActivityId != null) ValidateEventOpcodeForTransfer(ref m_eventData[eventId], m_eventData[eventId].Name); @@ -1260,7 +1264,7 @@ protected unsafe void WriteEventWithRelatedActivityIdCore(int eventId, Guid* rel } else { - TraceLoggingEventTypes tlet = m_eventData[eventId].TraceLoggingEventTypes; + TraceLoggingEventTypes? tlet = m_eventData[eventId].TraceLoggingEventTypes; if (tlet == null) { tlet = new TraceLoggingEventTypes(m_eventData[eventId].Name, @@ -1362,14 +1366,14 @@ protected virtual void Dispose(bool disposing) if (m_etwProvider != null) { m_etwProvider.Dispose(); - m_etwProvider = null; + m_etwProvider = null!; // TODO-NULLABLE: should not be nulled out on Dispose } #endif #if FEATURE_PERFTRACING if (m_eventPipeProvider != null) { m_eventPipeProvider.Dispose(); - m_eventPipeProvider = null; + m_eventPipeProvider = null!; // TODO-NULLABLE: should not be nulled out on Dispose } #endif } @@ -1388,7 +1392,7 @@ protected virtual void Dispose(bool disposing) #region private private unsafe void WriteEventRaw( - string eventName, + string? eventName, ref EventDescriptor eventDescriptor, IntPtr eventHandle, Guid* activityID, @@ -1427,7 +1431,7 @@ internal EventSource(Guid eventSourceGuid, string eventSourceName) { } // Used by the internal FrameworkEventSource constructor and the TraceLogging-style event source constructor - internal EventSource(Guid eventSourceGuid, string eventSourceName, EventSourceSettings settings, string[] traits = null) + internal EventSource(Guid eventSourceGuid, string eventSourceName, EventSourceSettings settings, string[]? traits = null) { m_config = ValidateSettings(settings); Initialize(eventSourceGuid, eventSourceName, traits); @@ -1440,7 +1444,7 @@ internal EventSource(Guid eventSourceGuid, string eventSourceName, EventSourceSe /// member, and any future access to the "Log" would throw the cached exception). /// [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1720:IdentifiersShouldNotContainTypeNames", MessageId = "guid")] - private unsafe void Initialize(Guid eventSourceGuid, string eventSourceName, string[] traits) + private unsafe void Initialize(Guid eventSourceGuid, string eventSourceName, string[]? traits) { try { @@ -1536,7 +1540,7 @@ private unsafe void Initialize(Guid eventSourceGuid, string eventSourceName, str // This is the most likely place for exceptions to happen. // Note that we are NOT resetting m_deferredCommands to NULL here, // We are giving for EventHandler that will be attached later - EventCommandEventArgs deferredCommands = m_deferredCommands; + EventCommandEventArgs? deferredCommands = m_deferredCommands; while (deferredCommands != null) { DoCommand(deferredCommands); // This can never throw, it catches them and reports the errors. @@ -1550,7 +1554,7 @@ private static string GetName(Type eventSourceType, EventManifestOptions flags) if (eventSourceType == null) throw new ArgumentNullException(nameof(eventSourceType)); - EventSourceAttribute attrib = (EventSourceAttribute)GetCustomAttributeHelper(eventSourceType, typeof(EventSourceAttribute), flags); + EventSourceAttribute? attrib = (EventSourceAttribute?)GetCustomAttributeHelper(eventSourceType, typeof(EventSourceAttribute), flags); if (attrib != null && attrib.Name != null) return attrib.Name; @@ -1732,14 +1736,14 @@ private static Guid GenerateGuidFromName(string name) hash.Start(); hash.Append(namespaceBytes); hash.Append(bytes); - Array.Resize(ref bytes, 16); + Array.Resize(ref bytes!, 16); // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 hash.Finish(bytes); bytes[7] = unchecked((byte)((bytes[7] & 0x0F) | 0x50)); // Set high 4 bits of octet 7 to 5, as per RFC 4122 return new Guid(bytes); } - private unsafe object DecodeObject(int eventId, int parameterId, ref EventSource.EventData* data) + private unsafe object? DecodeObject(int eventId, int parameterId, ref EventSource.EventData* data) { // TODO FIX : We use reflection which in turn uses EventSource, right now we carefully avoid // the recursion, but can we do this in a robust way? @@ -1748,6 +1752,7 @@ private unsafe object DecodeObject(int eventId, int parameterId, ref EventSource // advance to next EventData in array ++data; + Debug.Assert(m_eventData != null); Type dataType = GetDataType(m_eventData[eventId], parameterId); Again: @@ -1884,9 +1889,9 @@ private unsafe object DecodeObject(int eventId, int parameterId, ref EventSource // Finds the Dispatcher (which holds the filtering state), for a given dispatcher for the current // eventSource). - private EventDispatcher GetDispatcher(EventListener listener) + private EventDispatcher? GetDispatcher(EventListener? listener) { - EventDispatcher dispatcher = m_Dispatchers; + EventDispatcher? dispatcher = m_Dispatchers; while (dispatcher != null) { if (dispatcher.m_Listener == listener) @@ -1900,9 +1905,9 @@ private unsafe void WriteEventVarargs(int eventId, Guid* childActivityID, object { if (m_eventSourceEnabled) { + Debug.Assert(m_eventData != null); // You must have initialized this if you enabled the source. try { - Debug.Assert(m_eventData != null); // You must have initialized this if you enabled the source. if (childActivityID != null) { ValidateEventOpcodeForTransfer(ref m_eventData[eventId], m_eventData[eventId].Name); @@ -1965,7 +1970,7 @@ private unsafe void WriteEventVarargs(int eventId, Guid* childActivityID, object } else { - TraceLoggingEventTypes tlet = m_eventData[eventId].TraceLoggingEventTypes; + TraceLoggingEventTypes? tlet = m_eventData[eventId].TraceLoggingEventTypes; if (tlet == null) { tlet = new TraceLoggingEventTypes(m_eventData[eventId].Name, @@ -2003,7 +2008,7 @@ private unsafe void WriteEventVarargs(int eventId, Guid* childActivityID, object else #endif // !ES_BUILD_STANDALONE { - object[] serializedArgs = SerializeEventArgs(eventId, args); + object?[] serializedArgs = SerializeEventArgs(eventId, args); WriteToAllListeners( eventId: eventId, osThreadId: null, @@ -2024,9 +2029,10 @@ private unsafe void WriteEventVarargs(int eventId, Guid* childActivityID, object } } - private unsafe object[] SerializeEventArgs(int eventId, object[] args) + private unsafe object?[] SerializeEventArgs(int eventId, object?[] args) { - TraceLoggingEventTypes eventTypes = m_eventData[eventId].TraceLoggingEventTypes; + Debug.Assert(m_eventData != null); + TraceLoggingEventTypes? eventTypes = m_eventData[eventId].TraceLoggingEventTypes; if (eventTypes == null) { eventTypes = new TraceLoggingEventTypes(m_eventData[eventId].Name, @@ -2034,7 +2040,7 @@ private unsafe object[] SerializeEventArgs(int eventId, object[] args) m_eventData[eventId].Parameters); Interlocked.CompareExchange(ref m_eventData[eventId].TraceLoggingEventTypes, eventTypes, null); } - var eventData = new object[eventTypes.typeInfos.Length]; + var eventData = new object?[eventTypes.typeInfos.Length]; for (int i = 0; i < eventTypes.typeInfos.Length; i++) { eventData[i] = eventTypes.typeInfos[i].GetData(args[i]); @@ -2083,6 +2089,7 @@ private void LogEventArgsMismatches(ParameterInfo[] infos, object[] args) private unsafe void WriteToAllListeners(int eventId, Guid* activityID, Guid* childActivityID, int eventDataCount, EventSource.EventData* data) { + Debug.Assert(m_eventData != null); // We represent a byte[] as a integer denoting the length and then a blob of bytes in the data pointer. This causes a spurious // warning because eventDataCount is off by one for the byte[] case since a byte[] has 2 items associated it. So we want to check // that the number of parameters is correct against the byte[] case, but also we the args array would be one too long if @@ -2107,7 +2114,7 @@ private unsafe void WriteToAllListeners(int eventId, Guid* activityID, Guid* chi paramCount = Math.Min(paramCount, eventDataCount); } - object[] args = new object[paramCount]; + object?[] args = new object[paramCount]; EventSource.EventData* dataPtr = data; for (int i = 0; i < paramCount; i++) @@ -2122,7 +2129,7 @@ private unsafe void WriteToAllListeners(int eventId, Guid* activityID, Guid* chi } // helper for writing to all EventListeners attached the current eventSource. - internal unsafe void WriteToAllListeners(int eventId, uint* osThreadId, DateTime* timeStamp, Guid* activityID, Guid* childActivityID, params object[] args) + internal unsafe void WriteToAllListeners(int eventId, uint* osThreadId, DateTime* timeStamp, Guid* activityID, Guid* childActivityID, params object?[] args) { EventWrittenEventArgs eventCallbackArgs = new EventWrittenEventArgs(this); eventCallbackArgs.EventId = eventId; @@ -2134,17 +2141,19 @@ internal unsafe void WriteToAllListeners(int eventId, uint* osThreadId, DateTime eventCallbackArgs.ActivityId = *activityID; if (childActivityID != null) eventCallbackArgs.RelatedActivityId = *childActivityID; + + Debug.Assert(m_eventData != null); eventCallbackArgs.EventName = m_eventData[eventId].Name; eventCallbackArgs.Message = m_eventData[eventId].Message; - eventCallbackArgs.Payload = new ReadOnlyCollection(args); + eventCallbackArgs.Payload = new ReadOnlyCollection(args); DispatchToAllListeners(eventId, childActivityID, eventCallbackArgs); } private unsafe void DispatchToAllListeners(int eventId, Guid* childActivityID, EventWrittenEventArgs eventCallbackArgs) { - Exception lastThrownException = null; - for (EventDispatcher dispatcher = m_Dispatchers; dispatcher != null; dispatcher = dispatcher.m_Next) + Exception? lastThrownException = null; + for (EventDispatcher? dispatcher = m_Dispatchers; dispatcher != null; dispatcher = dispatcher.m_Next) { Debug.Assert(dispatcher.m_EventEnabled != null); if (eventId == -1 || dispatcher.m_EventEnabled[eventId]) @@ -2225,11 +2234,11 @@ private void WriteStringToAllListeners(string eventName, string msg) EventWrittenEventArgs eventCallbackArgs = new EventWrittenEventArgs(this); eventCallbackArgs.EventId = 0; eventCallbackArgs.Message = msg; - eventCallbackArgs.Payload = new ReadOnlyCollection(new List() { msg }); + eventCallbackArgs.Payload = new ReadOnlyCollection(new List() { msg }); eventCallbackArgs.PayloadNames = new ReadOnlyCollection(new List { "message" }); eventCallbackArgs.EventName = eventName; - for (EventDispatcher dispatcher = m_Dispatchers; dispatcher != null; dispatcher = dispatcher.m_Next) + for (EventDispatcher? dispatcher = m_Dispatchers; dispatcher != null; dispatcher = dispatcher.m_Next) { bool dispatcherEnabled = false; if (dispatcher.m_EventEnabled == null) @@ -2272,6 +2281,7 @@ private bool IsEnabledByDefault(int eventNum, bool enable, EventLevel currentLev if (!enable) return false; + Debug.Assert(m_eventData != null); EventLevel eventLevel = (EventLevel)m_eventData[eventNum].Descriptor.Level; EventKeywords eventKeywords = unchecked((EventKeywords)((ulong)m_eventData[eventNum].Descriptor.Keywords & (~(SessionMask.All.ToEventKeywords())))); @@ -2316,7 +2326,7 @@ private bool IsEnabledCommon(bool enabled, EventLevel currentLevel, EventKeyword } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] - private void ThrowEventSourceException(string eventName, Exception innerEx = null) + private void ThrowEventSourceException(string? eventName, Exception? innerEx = null) { // If we fail during out of band logging we may end up trying // to throw another EventSourceException, thus hitting a StackOverflowException. @@ -2370,7 +2380,7 @@ private void ThrowEventSourceException(string eventName, Exception innerEx = nul } } - private void ValidateEventOpcodeForTransfer(ref EventMetadata eventData, string eventName) + private void ValidateEventOpcodeForTransfer(ref EventMetadata eventData, string? eventName) { if ((EventOpcode)eventData.Descriptor.Opcode != EventOpcode.Send && (EventOpcode)eventData.Descriptor.Opcode != EventOpcode.Receive && @@ -2380,7 +2390,7 @@ private void ValidateEventOpcodeForTransfer(ref EventMetadata eventData, string } } - internal static EventOpcode GetOpcodeWithDefault(EventOpcode opcode, string eventName) + internal static EventOpcode GetOpcodeWithDefault(EventOpcode opcode, string? eventName) { if (opcode == EventOpcode.Info && eventName != null) { @@ -2409,11 +2419,11 @@ public OverideEventProvider(EventSource eventSource, EventProviderType providerT this.m_eventSource = eventSource; this.m_eventProviderType = providerType; } - protected override void OnControllerCommand(ControllerCommand command, IDictionary arguments, + protected override void OnControllerCommand(ControllerCommand command, IDictionary? arguments, int perEventSourceSessionId, int etwSessionId) { // We use null to represent the ETW EventListener. - EventListener listener = null; + EventListener? listener = null; m_eventSource.SendCommand(listener, m_eventProviderType, perEventSourceSessionId, etwSessionId, (EventCommand)command, IsEnabled(), Level, MatchAnyKeyword, arguments); } @@ -2485,10 +2495,10 @@ public EventMetadata(EventDescriptor descriptor, public byte TriggersActivityTracking; // count of listeners that marked this event as trigger for start of activity logging. #pragma warning restore 0649 public string Name; // the name of the event - public string Message; // If the event has a message associated with it, this is it. + public string? Message; // If the event has a message associated with it, this is it. public ParameterInfo[] Parameters; // TODO can we remove? - public TraceLoggingEventTypes TraceLoggingEventTypes; + public TraceLoggingEventTypes? TraceLoggingEventTypes; public EventActivityOptions ActivityOptions; #if ES_BUILD_PN @@ -2630,10 +2640,10 @@ private Type EventTypeToType(EventParameterType type) // * The 'enabled' 'level', matchAnyKeyword' arguments are ignored (must be true, 0, 0). // // dispatcher == null has special meaning. It is the 'ETW' dispatcher. - internal void SendCommand(EventListener listener, EventProviderType eventProviderType, int perEventSourceSessionId, int etwSessionId, + internal void SendCommand(EventListener? listener, EventProviderType eventProviderType, int perEventSourceSessionId, int etwSessionId, EventCommand command, bool enable, EventLevel level, EventKeywords matchAnyKeyword, - IDictionary commandArguments) + IDictionary? commandArguments) { var commandArgs = new EventCommandEventArgs(command, commandArguments, this, listener, eventProviderType, perEventSourceSessionId, etwSessionId, enable, level, matchAnyKeyword); lock (EventListener.EventListenersLock) @@ -2784,8 +2794,10 @@ internal void DoCommand(EventCommandEventArgs commandArgs) for (int i = 0; i < m_eventData.Length; i++) { bool isEnabledForAnyListener = false; - for (EventDispatcher dispatcher = m_Dispatchers; dispatcher != null; dispatcher = dispatcher.m_Next) + for (EventDispatcher? dispatcher = m_Dispatchers; dispatcher != null; dispatcher = dispatcher.m_Next) { + Debug.Assert(dispatcher.m_EventEnabled != null); + if (dispatcher.m_EventEnabled[i]) { isEnabledForAnyListener = true; @@ -2840,8 +2852,10 @@ internal void DoCommand(EventCommandEventArgs commandArgs) /// of 'eventId. If value is 'false' disable the event for that dispatcher. If 'eventId' is out of /// range return false, otherwise true. /// - internal bool EnableEventForDispatcher(EventDispatcher dispatcher, EventProviderType eventProviderType, int eventId, bool value) + internal bool EnableEventForDispatcher(EventDispatcher? dispatcher, EventProviderType eventProviderType, int eventId, bool value) { + Debug.Assert(m_eventData != null); + if (dispatcher == null) { if (eventId >= m_eventData.Length) @@ -2857,6 +2871,7 @@ internal bool EnableEventForDispatcher(EventDispatcher dispatcher, EventProvider } else { + Debug.Assert(dispatcher.m_EventEnabled != null); if (eventId >= dispatcher.m_EventEnabled.Length) return false; dispatcher.m_EventEnabled[eventId] = value; @@ -2871,6 +2886,8 @@ internal bool EnableEventForDispatcher(EventDispatcher dispatcher, EventProvider /// private bool AnyEventEnabled() { + Debug.Assert(m_eventData != null); + for (int i = 0; i < m_eventData.Length; i++) if (m_eventData[i].EnabledForETW || m_eventData[i].EnabledForAnyListener #if FEATURE_PERFTRACING @@ -2894,9 +2911,9 @@ private void EnsureDescriptorsInitialized() if (m_eventData == null) { Guid eventSourceGuid = Guid.Empty; - string eventSourceName = null; - EventMetadata[] eventData = null; - byte[] manifest = null; + string? eventSourceName = null; + EventMetadata[]? eventData = null; + byte[]? manifest = null; // Try the GetMetadata provided by the ILTransform in ProjectN. The default sets all to null, and in that case we fall back // to the reflection approach. @@ -2909,7 +2926,6 @@ private void EnsureDescriptorsInitialized() m_rawManifest = CreateManifestAndDescriptors(this.GetType(), Name, this); Debug.Assert(m_eventData != null); - } else { @@ -2920,6 +2936,7 @@ private void EnsureDescriptorsInitialized() m_rawManifest = manifest; } // TODO Enforce singleton pattern + Debug.Assert(EventListener.s_EventSources != null, "should be called within lock on EventListener.EventListenersLock which ensures s_EventSources to be initialized"); foreach (WeakReference eventSourceRef in EventListener.s_EventSources) { if (eventSourceRef.Target is EventSource eventSource && eventSource.Guid == m_guid && !eventSource.IsDisposed) @@ -2932,7 +2949,7 @@ private void EnsureDescriptorsInitialized() } // Make certain all dispatchers also have their arrays initialized - EventDispatcher dispatcher = m_Dispatchers; + EventDispatcher? dispatcher = m_Dispatchers; while (dispatcher != null) { if (dispatcher.m_EventEnabled == null) @@ -2956,7 +2973,7 @@ private void EnsureDescriptorsInitialized() // Send out the ETW manifest XML out to ETW // Today, we only send the manifest to ETW, custom listeners don't get it. - private unsafe bool SendManifest(byte[] rawManifest) + private unsafe bool SendManifest(byte[]? rawManifest) { bool success = true; @@ -3041,7 +3058,7 @@ internal static Attribute GetCustomAttributeHelper(Type type, Type attributeType // Helper to deal with the fact that the type we are reflecting over might be loaded in the ReflectionOnly context. // When that is the case, we have the build the custom assemblies on a member by hand. - internal static Attribute GetCustomAttributeHelper(MemberInfo member, Type attributeType, EventManifestOptions flags = EventManifestOptions.None) + internal static Attribute? GetCustomAttributeHelper(MemberInfo member, Type attributeType, EventManifestOptions flags = EventManifestOptions.None) { #if !ES_BUILD_PN // On ProjectN, ReflectionOnly() always equals false. AllowEventSourceOverride is an option that allows either Microsoft.Diagnostics.Tracing or @@ -3050,7 +3067,7 @@ internal static Attribute GetCustomAttributeHelper(MemberInfo member, Type attri #endif // !ES_BUILD_PN { // Let the runtime to the work for us, since we can execute code in this context. - Attribute firstAttribute = null; + Attribute? firstAttribute = null; foreach (var attribute in member.GetCustomAttributes(attributeType, false)) { firstAttribute = (Attribute)attribute; @@ -3071,17 +3088,17 @@ internal static Attribute GetCustomAttributeHelper(MemberInfo member, Type attri { if (AttributeTypeNamesMatch(attributeType, data.Constructor.ReflectedType)) { - Attribute attr = null; + Attribute? attr = null; Debug.Assert(data.ConstructorArguments.Count <= 1); if (data.ConstructorArguments.Count == 1) { - attr = (Attribute)Activator.CreateInstance(attributeType, new object[] { data.ConstructorArguments[0].Value }); + attr = (Attribute?)Activator.CreateInstance(attributeType, new object[] { data.ConstructorArguments[0].Value }); } else if (data.ConstructorArguments.Count == 0) { - attr = (Attribute)Activator.CreateInstance(attributeType); + attr = (Attribute?)Activator.CreateInstance(attributeType); } if (attr != null) @@ -3095,7 +3112,8 @@ internal static Attribute GetCustomAttributeHelper(MemberInfo member, Type attri if (p.PropertyType.IsEnum) { - value = Enum.Parse(p.PropertyType, value.ToString()); + string val = value.ToString()!; + value = Enum.Parse(p.PropertyType, val); } p.SetValue(attr, value, null); @@ -3140,47 +3158,49 @@ private static bool AttributeTypeNamesMatch(Type attributeType, Type reflectedAt ); } - private static Type GetEventSourceBaseType(Type eventSourceType, bool allowEventSourceOverride, bool reflectionOnly) + private static Type? GetEventSourceBaseType(Type eventSourceType, bool allowEventSourceOverride, bool reflectionOnly) { + Type? ret = eventSourceType; + // return false for "object" and interfaces - if (eventSourceType.BaseType() == null) + if (ret.BaseType() == null) return null; // now go up the inheritance chain until hitting a concrete type ("object" at worse) do { - eventSourceType = eventSourceType.BaseType(); + ret = ret.BaseType(); } - while (eventSourceType != null && eventSourceType.IsAbstract()); + while (ret != null && ret.IsAbstract()); - if (eventSourceType != null) + if (ret != null) { if (!allowEventSourceOverride) { - if (reflectionOnly && eventSourceType.FullName != typeof(EventSource).FullName || - !reflectionOnly && eventSourceType != typeof(EventSource)) + if (reflectionOnly && ret.FullName != typeof(EventSource).FullName || + !reflectionOnly && ret != typeof(EventSource)) return null; } else { - if (eventSourceType.Name != "EventSource") + if (ret.Name != "EventSource") return null; } } - return eventSourceType; + return ret; } // Use reflection to look at the attributes of a class, and generate a manifest for it (as UTF8) and // return the UTF8 bytes. It also sets up the code:EventData structures needed to dispatch events // at run time. 'source' is the event source to place the descriptors. If it is null, // then the descriptors are not creaed, and just the manifest is generated. - private static byte[] CreateManifestAndDescriptors(Type eventSourceType, string eventSourceDllName, EventSource source, + private static byte[]? CreateManifestAndDescriptors(Type eventSourceType, string? eventSourceDllName, EventSource? source, EventManifestOptions flags = EventManifestOptions.None) { - ManifestBuilder manifest = null; + ManifestBuilder? manifest = null; bool bNeedsManifest = source != null ? !source.SelfDescribingEvents : true; - Exception exception = null; // exception that might get raised during validation b/c we couldn't/didn't recover from a previous error - byte[] res = null; + Exception? exception = null; // exception that might get raised during validation b/c we couldn't/didn't recover from a previous error + byte[]? res = null; if (eventSourceType.IsAbstract() && (flags & EventManifestOptions.Strict) == 0) return null; @@ -3197,8 +3217,8 @@ private static byte[] CreateManifestAndDescriptors(Type eventSourceType, string MethodInfo[] methods = eventSourceType.GetMethods(BindingFlags.DeclaredOnly | BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Instance); EventAttribute defaultEventAttribute; int eventId = 1; // The number given to an event that does not have a explicitly given ID. - EventMetadata[] eventData = null; - Dictionary eventsByName = null; + EventMetadata[]? eventData = null; + Dictionary? eventsByName = null; if (source != null || (flags & EventManifestOptions.Strict) != 0) { eventData = new EventMetadata[methods.Length + 1]; @@ -3206,8 +3226,8 @@ private static byte[] CreateManifestAndDescriptors(Type eventSourceType, string } // See if we have localization information. - ResourceManager resources = null; - EventSourceAttribute eventSourceAttrib = (EventSourceAttribute)GetCustomAttributeHelper(eventSourceType, typeof(EventSourceAttribute), flags); + ResourceManager? resources = null; + EventSourceAttribute? eventSourceAttrib = (EventSourceAttribute?)GetCustomAttributeHelper(eventSourceType, typeof(EventSourceAttribute), flags); if (eventSourceAttrib != null && eventSourceAttrib.LocalizationResources != null) resources = new ResourceManager(eventSourceAttrib.LocalizationResources, eventSourceType.Assembly()); @@ -3273,7 +3293,7 @@ private static byte[] CreateManifestAndDescriptors(Type eventSourceType, string ParameterInfo[] args = method.GetParameters(); // Get the EventDescriptor (from the Custom attributes) - EventAttribute eventAttribute = (EventAttribute)GetCustomAttributeHelper(method, typeof(EventAttribute), flags); + EventAttribute? eventAttribute = (EventAttribute?)GetCustomAttributeHelper(method, typeof(EventAttribute), flags); // Compat: until v4.5.1 we ignored any non-void returning methods as well as virtual methods for // the only reason of limiting the number of methods considered to be events. This broke a common @@ -3388,6 +3408,7 @@ private static byte[] CreateManifestAndDescriptors(Type eventSourceType, string bool hasRelatedActivityID = RemoveFirstArgIfRelatedActivityId(ref args); if (!(source != null && source.SelfDescribingEvents)) { + Debug.Assert(eventData != null); manifest.StartEvent(eventName, eventAttribute); for (int fieldIdx = 0; fieldIdx < args.Length; fieldIdx++) { @@ -3398,6 +3419,7 @@ private static byte[] CreateManifestAndDescriptors(Type eventSourceType, string if (source != null || (flags & EventManifestOptions.Strict) != 0) { + Debug.Assert(eventData != null); // Do checking for user errors (optional, but not a big deal so we do it). DebugCheckEvent(ref eventsByName, eventData, method, eventAttribute, manifest, flags); @@ -3413,11 +3435,11 @@ private static byte[] CreateManifestAndDescriptors(Type eventSourceType, string } #endif string eventKey = "event_" + eventName; - string msg = manifest.GetLocalizedMessage(eventKey, CultureInfo.CurrentUICulture, etwFormat: false); + string? msg = manifest.GetLocalizedMessage(eventKey, CultureInfo.CurrentUICulture, etwFormat: false); // overwrite inline message with the localized message if (msg != null) eventAttribute.Message = msg; - AddEventDescriptor(ref eventData, eventName, eventAttribute, args, hasRelatedActivityID); + AddEventDescriptor(ref eventData!, eventName, eventAttribute, args, hasRelatedActivityID); // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/34874 } } } @@ -3427,7 +3449,8 @@ private static byte[] CreateManifestAndDescriptors(Type eventSourceType, string if (source != null) { - TrimEventDescriptors(ref eventData); + Debug.Assert(eventData != null); + TrimEventDescriptors(ref eventData!); // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/34874 source.m_eventData = eventData; // officially initialize it. We do this at most once (it is racy otherwise). #if FEATURE_MANAGED_ETW_CHANNELS source.m_channelData = manifest.GetChannelData(); @@ -3459,9 +3482,11 @@ private static byte[] CreateManifestAndDescriptors(Type eventSourceType, string exception = e; } + Debug.Assert((flags & EventManifestOptions.Strict) != 0 && manifest != null); // TODO-NULLABLE: possible bug: if error is thrown before manifest is assigned in non-strict mode, this will NRE if ((flags & EventManifestOptions.Strict) != 0 && (manifest.Errors.Count > 0 || exception != null)) { string msg = string.Empty; + if (manifest.Errors.Count > 0) { bool firstError = true; @@ -3474,7 +3499,7 @@ private static byte[] CreateManifestAndDescriptors(Type eventSourceType, string } } else - msg = "Unexpected error: " + exception.Message; + msg = "Unexpected error: " + exception!.Message; throw new ArgumentException(msg, exception); } @@ -3544,6 +3569,7 @@ private static void AddEventDescriptor(ref EventMetadata[] eventData, string eve { if (eventData == null || eventData.Length <= eventAttribute.EventId) { + Debug.Assert(eventData != null); // TODO-NULLABLE: possible bug in the code: NRE when eventData == null EventMetadata[] newValues = new EventMetadata[Math.Max(eventData.Length + 16, eventAttribute.EventId + 1)]; Array.Copy(eventData, 0, newValues, 0, eventData.Length); eventData = newValues; @@ -3596,7 +3622,7 @@ internal void AddListener(EventListener listener) { lock (EventListener.EventListenersLock) { - bool[] enabledArray = null; + bool[]? enabledArray = null; if (m_eventData != null) enabledArray = new bool[m_eventData.Length]; m_Dispatchers = new EventDispatcher(m_Dispatchers, enabledArray, listener); @@ -3606,7 +3632,7 @@ internal void AddListener(EventListener listener) // Helper used by code:CreateManifestAndDescriptors to find user mistakes like reusing an event // index for two distinct events etc. Throws exceptions when it finds something wrong. - private static void DebugCheckEvent(ref Dictionary eventsByName, + private static void DebugCheckEvent(ref Dictionary? eventsByName, EventMetadata[] eventData, MethodInfo method, EventAttribute eventAttribute, ManifestBuilder manifest, EventManifestOptions options) { @@ -3912,13 +3938,13 @@ private bool SelfDescribingEvents } // private instance state - private string m_name; // My friendly name (privided in ctor) + private string m_name = null!; // My friendly name (privided in ctor) internal int m_id; // A small integer that is unique to this instance. private Guid m_guid; // GUID representing the ETW eventSource to the OS. - internal volatile EventMetadata[] m_eventData; // None per-event data - private volatile byte[] m_rawManifest; // Bytes to send out representing the event schema + internal volatile EventMetadata[]? m_eventData; // None per-event data + private volatile byte[]? m_rawManifest; // Bytes to send out representing the event schema - private EventHandler m_eventCommandExecuted; + private EventHandler? m_eventCommandExecuted; private EventSourceSettings m_config; // configuration information @@ -3930,19 +3956,19 @@ private bool SelfDescribingEvents internal EventKeywords m_matchAnyKeyword; // the logical OR of all levels enabled by any output dispatcher (zero is a special case) meaning 'all keywords' // Dispatching state - internal volatile EventDispatcher m_Dispatchers; // Linked list of code:EventDispatchers we write the data to (we also do ETW specially) + internal volatile EventDispatcher? m_Dispatchers; // Linked list of code:EventDispatchers we write the data to (we also do ETW specially) #if FEATURE_MANAGED_ETW - private volatile OverideEventProvider m_etwProvider; // This hooks up ETW commands to our 'OnEventCommand' callback + private volatile OverideEventProvider m_etwProvider = null!; // This hooks up ETW commands to our 'OnEventCommand' callback #endif #if FEATURE_PERFTRACING - private volatile OverideEventProvider m_eventPipeProvider; + private volatile OverideEventProvider m_eventPipeProvider = null!; #endif private bool m_completelyInited; // The EventSource constructor has returned without exception. - private Exception m_constructionException; // If there was an exception construction, this is it + private Exception? m_constructionException; // If there was an exception construction, this is it private byte m_outOfBandMessageCount; // The number of out of band messages sent (we throttle them - private EventCommandEventArgs m_deferredCommands;// If we get commands before we are fully we store them here and run the when we are fully inited. + private EventCommandEventArgs? m_deferredCommands;// If we get commands before we are fully we store them here and run the when we are fully inited. - private string[] m_traits; // Used to implement GetTraits + private string[]? m_traits; // Used to implement GetTraits internal static uint s_currentPid; // current process id, used in synthesizing quasi-GUIDs [ThreadStatic] @@ -3952,12 +3978,12 @@ private bool SelfDescribingEvents private static bool m_EventSourceInDecodeObject = false; #if FEATURE_MANAGED_ETW_CHANNELS - internal volatile ulong[] m_channelData; + internal volatile ulong[]? m_channelData; #endif // We use a single instance of ActivityTracker for all EventSources instances to allow correlation between multiple event providers. // We have m_activityTracker field simply because instance field is more efficient than static field fetch. - ActivityTracker m_activityTracker; + ActivityTracker m_activityTracker = null!; internal const string s_ActivityStartSuffix = "Start"; internal const string s_ActivityStopSuffix = "Stop"; @@ -4041,7 +4067,7 @@ public enum EventSourceSettings /// public class EventListener : IDisposable { - private event EventHandler _EventSourceCreated; + private event EventHandler? _EventSourceCreated; /// /// This event is raised whenever a new eventSource is 'attached' to the dispatcher. @@ -4061,11 +4087,11 @@ public event EventHandler EventSourceCreated { CallBackForExistingEventSources(false, value); - this._EventSourceCreated = (EventHandler)Delegate.Combine(_EventSourceCreated, value); + this._EventSourceCreated = (EventHandler?)Delegate.Combine(_EventSourceCreated, value); } remove { - this._EventSourceCreated = (EventHandler)Delegate.Remove(_EventSourceCreated, value); + this._EventSourceCreated = (EventHandler?)Delegate.Remove(_EventSourceCreated, value); } } @@ -4092,7 +4118,10 @@ static EventListener() public EventListener() { // This will cause the OnEventSourceCreated callback to fire. - CallBackForExistingEventSources(true, (obj, args) => args.EventSource.AddListener((EventListener)obj)); + CallBackForExistingEventSources(true, (obj, args) => + { + args.EventSource!.AddListener((EventListener)obj!); + }); } /// @@ -4122,7 +4151,7 @@ public virtual void Dispose() EventListener prev = s_Listeners; for (;;) { - EventListener cur = prev.m_Next; + EventListener? cur = prev.m_Next; if (cur == null) break; if (cur == this) @@ -4183,7 +4212,7 @@ public void EnableEvents(EventSource eventSource, EventLevel level, EventKeyword /// /// This call never has an effect on other EventListeners. /// - public void EnableEvents(EventSource eventSource, EventLevel level, EventKeywords matchAnyKeyword, IDictionary arguments) + public void EnableEvents(EventSource eventSource, EventLevel level, EventKeywords matchAnyKeyword, IDictionary? arguments) { if (eventSource == null) { @@ -4245,7 +4274,7 @@ public void DisableEvents(EventSource eventSource) /// internal protected virtual void OnEventSourceCreated(EventSource eventSource) { - EventHandler callBack = this._EventSourceCreated; + EventHandler? callBack = this._EventSourceCreated; if (callBack != null) { EventSourceCreatedEventArgs args = new EventSourceCreatedEventArgs(); @@ -4335,7 +4364,7 @@ internal static void AddEventSource(EventSource newEventSource) { #endif // Add every existing dispatcher to the new EventSource - for (EventListener listener = s_Listeners; listener != null; listener = listener.m_Next) + for (EventListener? listener = s_Listeners; listener != null; listener = listener.m_Next) newEventSource.AddListener(listener); #if DEBUG } @@ -4356,10 +4385,11 @@ internal static void AddEventSource(EventSource newEventSource) // such callbacks on process shutdown or appdomain so that unmanaged code will never // do this. This is what this callback is for. // See bug 724140 for more - private static void DisposeOnShutdown(object sender, EventArgs e) + private static void DisposeOnShutdown(object? sender, EventArgs e) { lock (EventListenersLock) { + Debug.Assert(s_EventSources != null); foreach (var esRef in s_EventSources) { if (esRef.Target is EventSource es) @@ -4380,20 +4410,22 @@ private static void RemoveReferencesToListenerInEventSources(EventListener liste Debug.Assert(Monitor.IsEntered(EventListener.EventListenersLock)); #endif // Foreach existing EventSource in the appdomain + Debug.Assert(s_EventSources != null); foreach (WeakReference eventSourceRef in s_EventSources) { if (eventSourceRef.Target is EventSource eventSource) { + Debug.Assert(eventSource.m_Dispatchers != null); // Is the first output dispatcher the dispatcher we are removing? if (eventSource.m_Dispatchers.m_Listener == listenerToRemove) eventSource.m_Dispatchers = eventSource.m_Dispatchers.m_Next; else { // Remove 'listenerToRemove' from the eventSource.m_Dispatchers linked list. - EventDispatcher prev = eventSource.m_Dispatchers; + EventDispatcher? prev = eventSource.m_Dispatchers; for (;;) { - EventDispatcher cur = prev.m_Next; + EventDispatcher? cur = prev.m_Next; if (cur == null) { Debug.Fail("EventSource did not have a registered EventListener!"); @@ -4432,9 +4464,10 @@ internal static void Validate() lock (EventListenersLock) { + Debug.Assert(s_EventSources != null); // Get all listeners Dictionary allListeners = new Dictionary(); - EventListener cur = s_Listeners; + EventListener? cur = s_Listeners; while (cur != null) { allListeners.Add(cur, true); @@ -4451,7 +4484,7 @@ internal static void Validate() Debug.Assert(eventSource.m_id == id, "Unexpected event source ID."); // None listeners on eventSources exist in the dispatcher list. - EventDispatcher dispatcher = eventSource.m_Dispatchers; + EventDispatcher? dispatcher = eventSource.m_Dispatchers; while (dispatcher != null) { Debug.Assert(allListeners.ContainsKey(dispatcher.m_Listener), "EventSource has a listener not on the global list."); @@ -4485,7 +4518,7 @@ internal static object EventListenersLock { if (s_EventSources == null) Interlocked.CompareExchange(ref s_EventSources, new List(2), null); - return s_EventSources; + return s_EventSources!; // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/34901 } } @@ -4493,6 +4526,8 @@ private void CallBackForExistingEventSources(bool addToListenersList, EventHandl { lock (EventListenersLock) { + Debug.Assert(s_EventSources != null); + // Disallow creating EventListener reentrancy. if (s_CreatingListener) { @@ -4552,7 +4587,7 @@ private void CallBackForExistingEventSources(bool addToListenersList, EventHandl } // Instance fields - internal volatile EventListener m_Next; // These form a linked list in s_Listeners + internal volatile EventListener? m_Next; // These form a linked list in s_Listeners // static fields @@ -4560,14 +4595,14 @@ private void CallBackForExistingEventSources(bool addToListenersList, EventHandl /// The list of all listeners in the appdomain. Listeners must be explicitly disposed to remove themselves /// from this list. Note that EventSources point to their listener but NOT the reverse. /// - internal static EventListener s_Listeners; + internal static EventListener? s_Listeners; /// /// The list of all active eventSources in the appdomain. Note that eventSources do NOT /// remove themselves from this list this is a weak list and the GC that removes them may /// not have happened yet. Thus it can contain event sources that are dead (thus you have /// to filter those out. /// - internal static List s_EventSources; + internal static List? s_EventSources; /// /// Used to disallow reentrancy. @@ -4604,7 +4639,7 @@ public class EventCommandEventArgs : EventArgs /// /// Gets the arguments for the callback. /// - public IDictionary Arguments { get; internal set; } + public IDictionary? Arguments { get; internal set; } /// /// Enables the event that has the specified identifier. @@ -4632,8 +4667,8 @@ public bool DisableEvent(int eventId) #region private - internal EventCommandEventArgs(EventCommand command, IDictionary arguments, EventSource eventSource, - EventListener listener, EventProviderType eventProviderType, int perEventSourceSessionId, int etwSessionId, bool enable, EventLevel level, EventKeywords matchAnyKeyword) + internal EventCommandEventArgs(EventCommand command, IDictionary? arguments, EventSource eventSource, + EventListener? listener, EventProviderType eventProviderType, int perEventSourceSessionId, int etwSessionId, bool enable, EventLevel level, EventKeywords matchAnyKeyword) { this.Command = command; this.Arguments = arguments; @@ -4648,17 +4683,17 @@ internal EventCommandEventArgs(EventCommand command, IDictionary } internal EventSource eventSource; - internal EventDispatcher dispatcher; + internal EventDispatcher? dispatcher; internal EventProviderType eventProviderType; // These are the arguments of sendCommand and are only used for deferring commands until after we are fully initialized. - internal EventListener listener; + internal EventListener? listener; internal int perEventSourceSessionId; internal int etwSessionId; internal bool enable; internal EventLevel level; internal EventKeywords matchAnyKeyword; - internal EventCommandEventArgs nextCommand; // We form a linked list of these deferred commands. + internal EventCommandEventArgs? nextCommand; // We form a linked list of these deferred commands. #endregion } @@ -4671,7 +4706,7 @@ public class EventSourceCreatedEventArgs : EventArgs /// /// The EventSource that is attaching to the listener. /// - public EventSource EventSource + public EventSource? EventSource { get; internal set; @@ -4687,7 +4722,7 @@ public class EventWrittenEventArgs : EventArgs /// /// The name of the event. /// - public string EventName + public string? EventName { get { @@ -4696,7 +4731,10 @@ public string EventName return m_eventName; } else + { + Debug.Assert(m_eventSource.m_eventData != null); return m_eventSource.m_eventData[EventId].Name; + } } internal set { @@ -4742,12 +4780,12 @@ public Guid RelatedActivityId /// /// Gets the payload for the event. /// - public ReadOnlyCollection Payload { get; internal set; } + public ReadOnlyCollection? Payload { get; internal set; } /// /// Gets the payload argument names. /// - public ReadOnlyCollection PayloadNames + public ReadOnlyCollection? PayloadNames { get { @@ -4758,10 +4796,12 @@ public ReadOnlyCollection PayloadNames { var names = new List(); + Debug.Assert(m_eventSource.m_eventData != null); foreach (var parameter in m_eventSource.m_eventData[EventId].Parameters) { names.Add(parameter.Name); } + m_payloadNames = new ReadOnlyCollection(names); } @@ -4789,6 +4829,7 @@ public EventKeywords Keywords if (EventId < 0) // TraceLogging convention EventID == -1 return m_keywords; + Debug.Assert(m_eventSource.m_eventData != null); return (EventKeywords)m_eventSource.m_eventData[EventId].Descriptor.Keywords; } } @@ -4802,6 +4843,8 @@ public EventOpcode Opcode { if (EventId <= 0) // TraceLogging convention EventID == -1 return m_opcode; + + Debug.Assert(m_eventSource.m_eventData != null); return (EventOpcode)m_eventSource.m_eventData[EventId].Descriptor.Opcode; } } @@ -4816,6 +4859,7 @@ public EventTask Task if (EventId <= 0) // TraceLogging convention EventID == -1 return EventTask.None; + Debug.Assert(m_eventSource.m_eventData != null); return (EventTask)m_eventSource.m_eventData[EventId].Descriptor.Task; } } @@ -4829,6 +4873,8 @@ public EventTags Tags { if (EventId <= 0) // TraceLogging convention EventID == -1 return m_tags; + + Debug.Assert(m_eventSource.m_eventData != null); return m_eventSource.m_eventData[EventId].Tags; } } @@ -4836,14 +4882,19 @@ public EventTags Tags /// /// Gets the message for the event. If the message has {N} parameters they are NOT substituted. /// - public string Message + public string? Message { get { if (EventId <= 0) // TraceLogging convention EventID == -1 + { return m_message; + } else + { + Debug.Assert(m_eventSource.m_eventData != null); return m_eventSource.m_eventData[EventId].Message; + } } internal set { @@ -4862,6 +4913,8 @@ public EventChannel Channel { if (EventId <= 0) // TraceLogging convention EventID == -1 return EventChannel.None; + + Debug.Assert(m_eventSource.m_eventData != null); return (EventChannel)m_eventSource.m_eventData[EventId].Descriptor.Channel; } } @@ -4876,6 +4929,8 @@ public byte Version { if (EventId <= 0) // TraceLogging convention EventID == -1 return 0; + + Debug.Assert(m_eventSource.m_eventData != null); return m_eventSource.m_eventData[EventId].Descriptor.Version; } } @@ -4889,6 +4944,8 @@ public EventLevel Level { if (EventId <= 0) // TraceLogging convention EventID == -1 return m_level; + + Debug.Assert(m_eventSource.m_eventData != null); return (EventLevel)m_eventSource.m_eventData[EventId].Descriptor.Level; } } @@ -4932,10 +4989,10 @@ internal EventWrittenEventArgs(EventSource eventSource) m_eventSource = eventSource; TimeStamp = DateTime.UtcNow; } - private string m_message; - private string m_eventName; + private string? m_message; + private string? m_eventName; private EventSource m_eventSource; - private ReadOnlyCollection m_payloadNames; + private ReadOnlyCollection? m_payloadNames; private Guid m_activityId; private long? m_osThreadId; internal EventTags m_tags; @@ -4954,13 +5011,13 @@ public sealed class EventSourceAttribute : Attribute /// /// Overrides the ETW name of the event source (which defaults to the class name) /// - public string Name { get; set; } + public string? Name { get; set; } /// /// Overrides the default (calculated) Guid of an EventSource type. Explicitly defining a GUID is discouraged, /// except when upgrading existing ETW providers to using event sources. /// - public string Guid { get; set; } + public string? Guid { get; set; } /// /// @@ -4983,7 +5040,7 @@ public sealed class EventSourceAttribute : Attribute /// which represent the payload values. /// /// - public string LocalizationResources { get; set; } + public string? LocalizationResources { get; set; } } /// @@ -5041,7 +5098,7 @@ internal bool IsOpcodeSet /// use standard .NET substitution operators (eg {1}) in the string and they will be replaced /// with the 'ToString()' of the corresponding part of the event payload. /// - public string Message { get; set; } + public string? Message { get; set; } /// /// User defined options associated with the event. These do not have meaning to the EventSource but @@ -5116,12 +5173,12 @@ class EventChannelAttribute : Attribute /// Specifies an SDDL access descriptor that controls access to the log file that backs the channel. /// See MSDN (https://docs.microsoft.com/en-us/windows/desktop/WES/eventmanifestschema-channeltype-complextype) for details. /// - public string Access { get; set; } + public string? Access { get; set; } /// /// Allows importing channels defined in external manifests /// - public string ImportChannel { get; set; } + public string? ImportChannel { get; set; } #endif // TODO: there is a convention that the name is the Provider/Type Should we provide an override? @@ -5302,7 +5359,7 @@ public static explicit operator uint(SessionMask m) /// internal class EventDispatcher { - internal EventDispatcher(EventDispatcher next, bool[] eventEnabled, EventListener listener) + internal EventDispatcher(EventDispatcher? next, bool[]? eventEnabled, EventListener listener) { m_Next = next; m_EventEnabled = eventEnabled; @@ -5311,10 +5368,10 @@ internal EventDispatcher(EventDispatcher next, bool[] eventEnabled, EventListene // Instance fields readonly internal EventListener m_Listener; // The dispatcher this entry is for - internal bool[] m_EventEnabled; // For every event in a the eventSource, is it enabled? + internal bool[]? m_EventEnabled; // For every event in a the eventSource, is it enabled? // Only guaranteed to exist after a InsureInit() - internal EventDispatcher m_Next; // These form a linked list in code:EventSource.m_Dispatchers + internal EventDispatcher? m_Next; // These form a linked list in code:EventSource.m_Dispatchers // Of all listeners for that eventSource. } @@ -5360,7 +5417,7 @@ internal class ManifestBuilder /// Build a manifest for 'providerName' with the given GUID, which will be packaged into 'dllName'. /// 'resources, is a resource manager. If specified all messages are localized using that manager. /// - public ManifestBuilder(string providerName, Guid providerGuid, string dllName, ResourceManager resources, + public ManifestBuilder(string providerName, Guid providerGuid, string? dllName, ResourceManager? resources, EventManifestOptions flags) { #if FEATURE_MANAGED_ETW_CHANNELS @@ -5451,7 +5508,7 @@ public void AddKeyword(string name, ulong value) /// /// Add a channel. channelAttribute can be null /// - public void AddChannel(string name, int value, EventChannelAttribute channelAttribute) + public void AddChannel(string? name, int value, EventChannelAttribute? channelAttribute) { EventChannel chValue = (EventChannel)value; if (value < (int)EventChannel.Admin || value > 255) @@ -5590,6 +5647,8 @@ public void AddEventParameter(Type type, string name) } public void EndEvent() { + Debug.Assert(eventName != null); + if (numParams > 0) { templates.Append(" ").AppendLine(); @@ -5605,7 +5664,7 @@ public void EndEvent() string msg; if (stringTab.TryGetValue("event_" + eventName, out msg)) { - msg = TranslateToManifestConvention(msg, eventName); + msg = TranslateToManifestConvention(msg!, eventName); // https://github.com/dotnet/roslyn/issues/26761 stringTab["event_" + eventName] = msg; } @@ -5695,13 +5754,13 @@ private string CreateManifestString() int channel = kvpair.Key; ChannelInfo channelInfo = kvpair.Value; - string channelType = null; + string? channelType = null; string elementName = "channel"; bool enabled = false; - string fullName = null; + string? fullName = null; #if FEATURE_ADVANCED_MANAGED_ETW_CHANNELS - string isolation = null; - string access = null; + string? isolation = null; + string? access = null; #endif if (channelInfo.Attribs != null) { @@ -5728,6 +5787,7 @@ private string CreateManifestString() sb.Append(" name=\"").Append(fullName).Append("\""); if (elementName == "channel") // not applicable to importChannels. { + Debug.Assert(channelInfo.Name != null); WriteMessageAttrib(sb, "channel", channelInfo.Name, null); sb.Append(" value=\"").Append(channel).Append("\""); if (channelType != null) @@ -5862,7 +5922,7 @@ private string CreateManifestString() // Output the localization information. sb.Append("").AppendLine(); - List cultures = null; + List? cultures = null; if (resources != null && (flags & EventManifestOptions.AllCultures) != 0) { cultures = GetSupportedCultures(resources); @@ -5884,7 +5944,7 @@ private string CreateManifestString() foreach (var stringKey in sortedStrings) { - string val = GetLocalizedMessage(stringKey, ci, etwFormat: true); + string? val = GetLocalizedMessage(stringKey, ci, etwFormat: true); sb.Append(" ").AppendLine(); } sb.Append(" ").AppendLine(); @@ -5901,14 +5961,14 @@ private void WriteNameAndMessageAttribs(StringBuilder stringBuilder, string elem stringBuilder.Append(" name=\"").Append(name).Append("\""); WriteMessageAttrib(sb, elementName, name, name); } - private void WriteMessageAttrib(StringBuilder stringBuilder, string elementName, string name, string value) + private void WriteMessageAttrib(StringBuilder stringBuilder, string elementName, string name, string? value) { string key = elementName + "_" + name; // See if the user wants things localized. if (resources != null) { // resource fallback: strings in the neutral culture will take precedence over inline strings - string localizedString = resources.GetString(key, CultureInfo.InvariantCulture); + string? localizedString = resources.GetString(key, CultureInfo.InvariantCulture); if (localizedString != null) value = localizedString; } @@ -5925,12 +5985,12 @@ private void WriteMessageAttrib(StringBuilder stringBuilder, string elementName, stringTab[key] = value; } - internal string GetLocalizedMessage(string key, CultureInfo ci, bool etwFormat) + internal string? GetLocalizedMessage(string key, CultureInfo ci, bool etwFormat) { - string value = null; + string? value = null; if (resources != null) { - string localizedString = resources.GetString(key, ci); + string? localizedString = resources.GetString(key, ci); if (localizedString != null) { value = localizedString; @@ -5969,9 +6029,9 @@ private static string GetLevelName(EventLevel level) } #if FEATURE_MANAGED_ETW_CHANNELS - private string GetChannelName(EventChannel channel, string eventName, string eventMessage) + private string? GetChannelName(EventChannel channel, string eventName, string? eventMessage) { - ChannelInfo info = null; + ChannelInfo? info = null; if (channelTab == null || !channelTab.TryGetValue((int)channel, out info)) { if (channel < EventChannel.Admin) // || channel > EventChannel.Debug) @@ -5993,6 +6053,8 @@ private string GetChannelName(EventChannel channel, string eventName, string eve // events that specify admin channels *must* have non-null "Message" attributes if (resources != null && eventMessage == null) eventMessage = resources.GetString("event_" + eventName, CultureInfo.InvariantCulture); + + Debug.Assert(info.Attribs != null); // TODO-NULLABLE: Bug - Attribs is documented that it can be null in which case this code will NRE if (info.Attribs.EventChannelType == EventChannelType.Admin && eventMessage == null) ManifestError(SR.Format(SR.EventSource_EventWithAdminChannelMustHaveMessage, eventName, info.Name)); return info.Name; @@ -6011,7 +6073,7 @@ private string GetTaskName(EventTask task, string eventName) return ret; } - private string GetOpcodeName(EventOpcode opcode, string eventName) + private string? GetOpcodeName(EventOpcode opcode, string eventName) { switch (opcode) { @@ -6039,12 +6101,13 @@ private string GetOpcodeName(EventOpcode opcode, string eventName) return "win:Receive"; } - string ret; + string? ret; if (opcodeTab == null || !opcodeTab.TryGetValue((int)opcode, out ret)) { ManifestError(SR.Format(SR.EventSource_UndefinedOpcode, opcode, eventName), true); ret = null; } + return ret; } @@ -6061,7 +6124,7 @@ private string GetKeywords(ulong keywords, string eventName) { if ((keywords & bit) != 0) { - string keyword = null; + string? keyword = null; if ((keywordTab == null || !keywordTab.TryGetValue(bit, out keyword)) && (bit >= (ulong)0x1000000000000)) { @@ -6133,7 +6196,7 @@ private string GetTypeName(Type type) } } - private static void UpdateStringBuilder(ref StringBuilder stringBuilder, string eventMessage, int startIndex, int count) + private static void UpdateStringBuilder(ref StringBuilder? stringBuilder, string eventMessage, int startIndex, int count) // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 nullable in, non-nullable out { if (stringBuilder == null) stringBuilder = new StringBuilder(); @@ -6145,7 +6208,7 @@ private static void UpdateStringBuilder(ref StringBuilder stringBuilder, string // .NET conventions. We can't use RegEx for this (we are in mscorlib), so we do it 'by hand' private string TranslateToManifestConvention(string eventMessage, string evtName) { - StringBuilder stringBuilder = null; // We lazily create this + StringBuilder? stringBuilder = null; // We lazily create this int writtenSoFar = 0; int chIdx = -1; for (int i = 0; ;) @@ -6155,14 +6218,14 @@ private string TranslateToManifestConvention(string eventMessage, string evtName if (stringBuilder == null) return eventMessage; UpdateStringBuilder(ref stringBuilder, eventMessage, writtenSoFar, i - writtenSoFar); - return stringBuilder.ToString(); + return stringBuilder!.ToString(); // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 } if (eventMessage[i] == '%') { // handle format message escaping character '%' by escaping it UpdateStringBuilder(ref stringBuilder, eventMessage, writtenSoFar, i - writtenSoFar); - stringBuilder.Append("%%"); + stringBuilder!.Append("%%"); // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 i++; writtenSoFar = i; } @@ -6171,7 +6234,7 @@ private string TranslateToManifestConvention(string eventMessage, string evtName { // handle C# escaped '{" and '}' UpdateStringBuilder(ref stringBuilder, eventMessage, writtenSoFar, i - writtenSoFar); - stringBuilder.Append(eventMessage[i]); + stringBuilder!.Append(eventMessage[i]); // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 i++; i++; writtenSoFar = i; } @@ -6190,7 +6253,7 @@ private string TranslateToManifestConvention(string eventMessage, string evtName i++; UpdateStringBuilder(ref stringBuilder, eventMessage, writtenSoFar, leftBracket - writtenSoFar); int manIndex = TranslateIndexToManifestConvention(argNum, evtName); - stringBuilder.Append('%').Append(manIndex); + stringBuilder!.Append('%').Append(manIndex); // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 // An '!' after the insert specifier {n} will be interpreted as a literal. // We'll escape it so that mc.exe does not attempt to consider it the // beginning of a format string. @@ -6210,7 +6273,7 @@ private string TranslateToManifestConvention(string eventMessage, string evtName { UpdateStringBuilder(ref stringBuilder, eventMessage, writtenSoFar, i - writtenSoFar); i++; - stringBuilder.Append(s_escapes[chIdx]); + stringBuilder!.Append(s_escapes[chIdx]); // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 writtenSoFar = i; } else @@ -6237,19 +6300,19 @@ private int TranslateIndexToManifestConvention(int idx, string evtName) #if FEATURE_MANAGED_ETW_CHANNELS class ChannelInfo { - public string Name; + public string? Name; public ulong Keywords; - public EventChannelAttribute Attribs; + public EventChannelAttribute? Attribs; } #endif Dictionary opcodeTab; - Dictionary taskTab; + Dictionary? taskTab; #if FEATURE_MANAGED_ETW_CHANNELS - Dictionary channelTab; + Dictionary? channelTab; #endif - Dictionary keywordTab; - Dictionary mapsTab; + Dictionary? keywordTab; + Dictionary? mapsTab; Dictionary stringTab; // Maps unlocalized strings to localized ones @@ -6271,15 +6334,15 @@ class ChannelInfo #if FEATURE_MANAGED_ETW_CHANNELS string providerName; #endif - ResourceManager resources; // Look up localized strings here. + ResourceManager? resources; // Look up localized strings here. EventManifestOptions flags; IList errors; // list of currently encountered errors Dictionary> perEventByteArrayArgIndices; // "event_name" -> List_of_Indices_of_Byte[]_Arg // State we track between StartEvent and EndEvent. - string eventName; // Name of the event currently being processed. + string? eventName; // Name of the event currently being processed. int numParams; // keeps track of the number of args the event has. - List byteArrArgIndices; // keeps track of the index of each byte[] argument + List? byteArrArgIndices; // keeps track of the index of each byte[] argument #endregion } diff --git a/src/Common/src/CoreLib/System/Diagnostics/Tracing/FrameworkEventSource.cs b/src/Common/src/CoreLib/System/Diagnostics/Tracing/FrameworkEventSource.cs index bbeaa246285b..7cd3c097eed6 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/Tracing/FrameworkEventSource.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/Tracing/FrameworkEventSource.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable using Internal.Runtime.CompilerServices; namespace System.Diagnostics.Tracing @@ -33,7 +34,7 @@ private FrameworkEventSource() : base(new Guid(0x8e9f5090, 0x2d75, 0x4d03, 0x8a, // optimized for common signatures (used by the ThreadTransferSend/Receive events) [NonEvent] - private unsafe void WriteEvent(int eventId, long arg1, int arg2, string arg3, bool arg4, int arg5, int arg6) + private unsafe void WriteEvent(int eventId, long arg1, int arg2, string? arg3, bool arg4, int arg5, int arg6) { if (IsEnabled()) { @@ -66,7 +67,7 @@ private unsafe void WriteEvent(int eventId, long arg1, int arg2, string arg3, bo // optimized for common signatures (used by the ThreadTransferSend/Receive events) [NonEvent] - private unsafe void WriteEvent(int eventId, long arg1, int arg2, string arg3) + private unsafe void WriteEvent(int eventId, long arg1, int arg2, string? arg3) { if (IsEnabled()) { @@ -145,7 +146,7 @@ public unsafe void ThreadTransferSendObj(object id, int kind, string info, bool // 3 - WinRT dispatch operations // info - any additional information user code might consider interesting [Event(151, Level = EventLevel.Informational, Keywords = Keywords.ThreadTransfer, Task = Tasks.ThreadTransfer, Opcode = EventOpcode.Receive)] - public void ThreadTransferReceive(long id, int kind, string info) + public void ThreadTransferReceive(long id, int kind, string? info) { WriteEvent(151, id, kind, info); } @@ -153,7 +154,7 @@ public void ThreadTransferReceive(long id, int kind, string info) // keep track of GC movements in order to correlate the value passed to XyzSend with the // (possibly changed) value passed to XyzReceive [NonEvent] - public unsafe void ThreadTransferReceiveObj(object id, int kind, string info) + public unsafe void ThreadTransferReceiveObj(object id, int kind, string? info) { ThreadTransferReceive((long)*((void**)Unsafe.AsPointer(ref id)), kind, info); } diff --git a/src/Common/src/CoreLib/System/Diagnostics/Tracing/IEventProvider.cs b/src/Common/src/CoreLib/System/Diagnostics/Tracing/IEventProvider.cs index bc7ab9aee002..010d9eaebabb 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/Tracing/IEventProvider.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/Tracing/IEventProvider.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable using System; using Microsoft.Win32; diff --git a/src/Common/src/CoreLib/System/Diagnostics/Tracing/IncrementingEventCounter.cs b/src/Common/src/CoreLib/System/Diagnostics/Tracing/IncrementingEventCounter.cs index 40581051cc9f..24a9ea24cf6f 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/Tracing/IncrementingEventCounter.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/Tracing/IncrementingEventCounter.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable using System; using System.Diagnostics; using System.Collections; @@ -43,7 +44,7 @@ public IncrementingEventCounter(string name, EventSource eventSource) : base(nam /// The value to increment by. public void Increment(double increment = 1) { - lock(MyLock) + lock (MyLock) { _increment += increment; } diff --git a/src/Common/src/CoreLib/System/Diagnostics/Tracing/IncrementingPollingCounter.cs b/src/Common/src/CoreLib/System/Diagnostics/Tracing/IncrementingPollingCounter.cs index 1b8ee7553e4d..44fd7573c77c 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/Tracing/IncrementingPollingCounter.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/Tracing/IncrementingPollingCounter.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable using System; using System.Diagnostics; using System.Collections; @@ -36,6 +37,9 @@ public partial class IncrementingPollingCounter : DiagnosticCounter /// The event source. public IncrementingPollingCounter(string name, EventSource eventSource, Func totalValueProvider) : base(name, eventSource) { + if (totalValueProvider == null) + throw new ArgumentNullException(nameof(totalValueProvider)); + _totalValueProvider = totalValueProvider; } @@ -53,7 +57,7 @@ private void UpdateMetric() { try { - lock(MyLock) + lock (MyLock) { _increment = _totalValueProvider(); } diff --git a/src/Common/src/CoreLib/System/Diagnostics/Tracing/PollingCounter.cs b/src/Common/src/CoreLib/System/Diagnostics/Tracing/PollingCounter.cs index e0577181facc..ab69a1ec8236 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/Tracing/PollingCounter.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/Tracing/PollingCounter.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable using System; using System.Diagnostics; using System.Collections; @@ -34,6 +35,9 @@ public partial class PollingCounter : DiagnosticCounter /// The event source. public PollingCounter(string name, EventSource eventSource, Func metricProvider) : base(name, eventSource) { + if (metricProvider == null) + throw new ArgumentNullException(nameof(metricProvider)); + _metricProvider = metricProvider; } diff --git a/src/Common/src/CoreLib/System/Diagnostics/Tracing/StubEnvironment.cs b/src/Common/src/CoreLib/System/Diagnostics/Tracing/StubEnvironment.cs index d376389043be..7487c0f04318 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/Tracing/StubEnvironment.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/Tracing/StubEnvironment.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable using System; using System.Collections.Generic; @@ -28,24 +29,18 @@ internal static class Environment public static int TickCount { get { return System.Environment.TickCount; } } - public static string GetResourceString(string key, params object[] args) + public static string GetResourceString(string key, params object?[] args) { - string fmt = rm.GetString(key); + string? fmt = rm.GetString(key); if (fmt != null) return string.Format(fmt, args); - string sargs = string.Empty; - foreach(var arg in args) - { - if (sargs != string.Empty) - sargs += ", "; - sargs += arg.ToString(); - } + string sargs = string.Join(", ", args); return key + " (" + sargs + ")"; } - public static string GetRuntimeResourceString(string key, params object[] args) + public static string GetRuntimeResourceString(string key, params object?[] args) { return GetResourceString(key, args); } @@ -313,9 +308,9 @@ public static FieldInfo[] GetFields(this Type type, BindingFlags flags) } return fieldInfos.ToArray(); } - public static Type GetNestedType(this Type type, string nestedTypeName) + public static Type? GetNestedType(this Type type, string nestedTypeName) { - TypeInfo ti = null; + TypeInfo? ti = null; foreach(var nt in type.GetTypeInfo().DeclaredNestedTypes) { if (nt.Name == nestedTypeName) diff --git a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/ArrayTypeInfo.cs b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/ArrayTypeInfo.cs index 5771354f671e..83d37c458eeb 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/ArrayTypeInfo.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/ArrayTypeInfo.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable using System; using System.Collections.Generic; @@ -23,7 +24,7 @@ public ArrayTypeInfo(Type type, TraceLoggingTypeInfo elementInfo) public override void WriteMetadata( TraceLoggingMetadataCollector collector, - string name, + string? name, EventFieldFormat format) { collector.BeginBufferedArray(); @@ -36,7 +37,7 @@ public override void WriteData(TraceLoggingDataCollector collector, PropertyValu var bookmark = collector.BeginBufferedArray(); var count = 0; - Array array = (Array)value.ReferenceValue; + Array? array = (Array?)value.ReferenceValue; if (array != null) { count = array.Length; @@ -49,10 +50,11 @@ public override void WriteData(TraceLoggingDataCollector collector, PropertyValu collector.EndBufferedArray(bookmark, count); } - public override object GetData(object value) + public override object? GetData(object? value) { + Debug.Assert(value != null, "null accepted only for some overrides"); var array = (Array)value; - var serializedArray = new object[array.Length]; + var serializedArray = new object?[array.Length]; for (int i = 0; i < array.Length; i++) { serializedArray[i] = this.elementInfo.GetData(array.GetValue(i)); diff --git a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/ConcurrentSet.cs b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/ConcurrentSet.cs index 76c01c6c0683..32f4799d06de 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/ConcurrentSet.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/ConcurrentSet.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable using System; using Interlocked = System.Threading.Interlocked; @@ -26,11 +27,11 @@ namespace System.Diagnostics.Tracing internal struct ConcurrentSet where ItemType : ConcurrentSetItem { - private ItemType[] items; + private ItemType[]? items; - public ItemType TryGet(KeyType key) + public ItemType? TryGet(KeyType key) { - ItemType item; + ItemType? item; var oldItems = this.items; if (oldItems != null) @@ -110,7 +111,7 @@ public ItemType GetOrAdd(ItemType newItem) Array.Copy(oldItems, lo, newItems, lo + 1, oldLength - lo); } - newItems = Interlocked.CompareExchange(ref this.items, newItems, oldItems); + newItems = Interlocked.CompareExchange(ref this.items, newItems, oldItems)!; // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/34901 if (oldItems != newItems) { oldItems = newItems; diff --git a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/ConcurrentSetItem.cs b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/ConcurrentSetItem.cs index 558dbf670b5c..4dbd45ea1496 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/ConcurrentSetItem.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/ConcurrentSetItem.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable using System; #if ES_BUILD_STANDALONE diff --git a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/DataCollector.cs b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/DataCollector.cs index 11c18a260f9e..6afd1872e474 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/DataCollector.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/DataCollector.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable using System; using System.Resources; using System.Runtime.InteropServices; @@ -35,7 +36,7 @@ internal unsafe struct DataCollector private byte* scratch; private EventSource.EventData* datas; private GCHandle* pins; - private byte[] buffer; + private byte[]? buffer; private int bufferPos; private int bufferNesting; // We may merge many fields int a single blob. If we are doing this we increment this. private bool writingScalars; @@ -102,6 +103,8 @@ internal void AddScalar(void* value, int size) var oldPos = this.bufferPos; this.bufferPos = checked(this.bufferPos + size); this.EnsureBuffer(); + Debug.Assert(buffer != null); + for (int i = 0; i != size; i++, oldPos++) { this.buffer[oldPos] = pb[i]; @@ -109,7 +112,7 @@ internal void AddScalar(void* value, int size) } } - internal void AddBinary(string value, int size) + internal void AddBinary(string? value, int size) { if (size > ushort.MaxValue) { @@ -135,6 +138,8 @@ internal void AddBinary(string value, int size) var oldPos = this.bufferPos; this.bufferPos = checked(this.bufferPos + size); this.EnsureBuffer(); + Debug.Assert(buffer != null); + fixed (void* p = value) { Marshal.Copy((IntPtr)p, buffer, oldPos, size); @@ -143,7 +148,7 @@ internal void AddBinary(string value, int size) } } - internal unsafe void AddNullTerminatedString(string value) + internal unsafe void AddNullTerminatedString(string? value) { // Treat null strings as empty strings. if (value == null) @@ -175,6 +180,8 @@ internal unsafe void AddNullTerminatedString(string value) var oldPos = this.bufferPos; this.bufferPos = checked(this.bufferPos + size); this.EnsureBuffer(); + Debug.Assert(buffer != null); + fixed (void* p = value) { Marshal.Copy((IntPtr)p, buffer, oldPos, size); @@ -187,7 +194,7 @@ internal void AddBinary(Array value, int size) this.AddArray(value, size, 1); } - internal void AddArray(Array value, int length, int itemSize) + internal void AddArray(Array? value, int length, int itemSize) { if (length > ushort.MaxValue) { @@ -214,6 +221,7 @@ internal void AddArray(Array value, int length, int itemSize) var oldPos = this.bufferPos; this.bufferPos = checked(this.bufferPos + size); this.EnsureBuffer(); + Debug.Assert(value != null && buffer != null); Buffer.BlockCopy(value, 0, this.buffer, oldPos, size); } } @@ -238,6 +246,7 @@ internal int BeginBufferedArray() internal void EndBufferedArray(int bookmark, int count) { this.EnsureBuffer(); + Debug.Assert(buffer != null); this.buffer[bookmark - 2] = unchecked((byte)count); this.buffer[bookmark - 1] = unchecked((byte)(count >> 8)); this.EndBuffered(); @@ -270,6 +279,7 @@ more efficient to buffer the array instead of pinning it. */ this.EnsureBuffer(); + Debug.Assert(buffer != null); this.PinArray(this.buffer, this.bufferPos); this.buffer = null; this.bufferPos = 0; @@ -307,7 +317,7 @@ private void GrowBuffer(int required) Array.Resize(ref this.buffer, newSize); } - private void PinArray(object value, int size) + private void PinArray(object? value, int size) { var pinsTemp = this.pins; if (this.pinsEnd <= pinsTemp) diff --git a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/EmptyStruct.cs b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/EmptyStruct.cs index bc7fb8c3462e..38dd167a9fb2 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/EmptyStruct.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/EmptyStruct.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable #if ES_BUILD_STANDALONE namespace Microsoft.Diagnostics.Tracing #else diff --git a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/EnumHelper.cs b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/EnumHelper.cs index 7a23378bb166..10cac0277094 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/EnumHelper.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/EnumHelper.cs @@ -1,6 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. + +#nullable enable #if EVENTSOURCE_GENERICS ?using System; using System.Reflection; diff --git a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/EnumerableTypeInfo.cs b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/EnumerableTypeInfo.cs index 74a3fa27b2ca..9a984587ee4e 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/EnumerableTypeInfo.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/EnumerableTypeInfo.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable using System; using System.Collections; using System.Collections.Generic; @@ -24,7 +25,7 @@ public EnumerableTypeInfo(Type type, TraceLoggingTypeInfo elementInfo) public override void WriteMetadata( TraceLoggingMetadataCollector collector, - string name, + string? name, EventFieldFormat format) { collector.BeginBufferedArray(); @@ -37,7 +38,7 @@ public override void WriteData(TraceLoggingDataCollector collector, PropertyValu var bookmark = collector.BeginBufferedArray(); var count = 0; - IEnumerable enumerable = (IEnumerable)value.ReferenceValue; + IEnumerable? enumerable = (IEnumerable?)value.ReferenceValue; if (enumerable != null) { foreach (var element in enumerable) @@ -50,10 +51,11 @@ public override void WriteData(TraceLoggingDataCollector collector, PropertyValu collector.EndBufferedArray(bookmark, count); } - public override object GetData(object value) + public override object? GetData(object? value) { + Debug.Assert(value != null, "null accepted only for some overrides"); var iterType = (IEnumerable)value; - List serializedEnumerable = new List(); + List serializedEnumerable = new List(); foreach (var element in iterType) { serializedEnumerable.Add(elementInfo.GetData(element)); diff --git a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/EventDataAttribute.cs b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/EventDataAttribute.cs index cdedf13c6417..509f885b9d6a 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/EventDataAttribute.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/EventDataAttribute.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable using System; #if ES_BUILD_STANDALONE @@ -53,7 +54,7 @@ public class EventDataAttribute /// else /// fieldName = typeof(T).Name; /// - public string Name + public string? Name { get; set; diff --git a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/EventFieldAttribute.cs b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/EventFieldAttribute.cs index 1a298c285138..3d9da9d99d5e 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/EventFieldAttribute.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/EventFieldAttribute.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable using System; #if ES_BUILD_STANDALONE @@ -58,7 +59,7 @@ public EventFieldTags Tags /// as the event field's name. /// TODO REMOVE /// - internal string Name + internal string? Name { get; set; diff --git a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/EventIgnoreAttribute.cs b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/EventIgnoreAttribute.cs index 769345f78e04..51c457df2e65 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/EventIgnoreAttribute.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/EventIgnoreAttribute.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable using System; #if ES_BUILD_STANDALONE diff --git a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/EventPayload.cs b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/EventPayload.cs index 22abdbef1957..45a66a390bec 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/EventPayload.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/EventPayload.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable using System; using System.Collections.Generic; using System.Collections; @@ -24,9 +25,9 @@ namespace System.Diagnostics.Tracing /// EventSource APIs. /// Preserving the order of the elements as they were found inside user defined types is the most important characteristic of this class. /// - internal class EventPayload : IDictionary + internal class EventPayload : IDictionary { - internal EventPayload(List payloadNames, List payloadValues) + internal EventPayload(List payloadNames, List payloadValues) { Debug.Assert(payloadNames.Count == payloadValues.Count); @@ -35,9 +36,9 @@ internal EventPayload(List payloadNames, List payloadValues) } public ICollection Keys { get { return m_names; } } - public ICollection Values { get { return m_values; } } + public ICollection Values { get { return m_values; } } - public object this[string key] + public object? this[string key] { get { @@ -62,12 +63,12 @@ public object this[string key] } } - public void Add(string key, object value) + public void Add(string key, object? value) { throw new System.NotSupportedException(); } - public void Add(KeyValuePair payloadEntry) + public void Add(KeyValuePair payloadEntry) { throw new System.NotSupportedException(); } @@ -77,7 +78,7 @@ public void Clear() throw new System.NotSupportedException(); } - public bool Contains(KeyValuePair entry) + public bool Contains(KeyValuePair entry) { return ContainsKey(entry.Key); } @@ -99,21 +100,21 @@ public bool ContainsKey(string key) public bool IsReadOnly { get { return true; } } - public IEnumerator> GetEnumerator() + public IEnumerator> GetEnumerator() { for (int i = 0; i < Keys.Count; i++) { - yield return new KeyValuePair(this.m_names[i], this.m_values[i]); + yield return new KeyValuePair(this.m_names[i], this.m_values[i]); } } IEnumerator IEnumerable.GetEnumerator() { - var instance = this as IEnumerable>; + var instance = this as IEnumerable>; return instance.GetEnumerator(); } - public void CopyTo(KeyValuePair[] payloadEntries, int count) + public void CopyTo(KeyValuePair[] payloadEntries, int count) { throw new System.NotSupportedException(); } @@ -123,12 +124,12 @@ public bool Remove(string key) throw new System.NotSupportedException(); } - public bool Remove(KeyValuePair entry) + public bool Remove(KeyValuePair entry) { throw new System.NotSupportedException(); } - public bool TryGetValue(string key, out object value) + public bool TryGetValue(string key, out object? value) { if (key == null) throw new System.ArgumentNullException(nameof(key)); @@ -150,7 +151,7 @@ public bool TryGetValue(string key, out object value) #region private private List m_names; - private List m_values; + private List m_values; #endregion } } diff --git a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/EventSourceActivity.cs b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/EventSourceActivity.cs index 2d71550803cd..ab5f6d0b6396 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/EventSourceActivity.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/EventSourceActivity.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable using System; #if !ES_BUILD_AGAINST_DOTNET_V35 @@ -92,7 +93,7 @@ public Guid RelatedId /// Allow options (keywords, level) to be set for the write associated with this start /// These will also be used for the stop event. /// The data to include in the event. - public EventSourceActivity Start(string eventName, EventSourceOptions options, T data) + public EventSourceActivity Start(string? eventName, EventSourceOptions options, T data) { return this.Start(eventName, ref options, ref data); } @@ -100,7 +101,7 @@ public EventSourceActivity Start(string eventName, EventSourceOptions options /// Shortcut version see Start(string eventName, EventSourceOptions options, T data) Options is empty (no keywords /// and level==Info) Data payload is empty. /// - public EventSourceActivity Start(string eventName) + public EventSourceActivity Start(string? eventName) { var options = new EventSourceOptions(); var data = new EmptyStruct(); @@ -109,7 +110,7 @@ public EventSourceActivity Start(string eventName) /// /// Shortcut version see Start(string eventName, EventSourceOptions options, T data). Data payload is empty. /// - public EventSourceActivity Start(string eventName, EventSourceOptions options) + public EventSourceActivity Start(string? eventName, EventSourceOptions options) { var data = new EmptyStruct(); return this.Start(eventName, ref options, ref data); @@ -118,7 +119,7 @@ public EventSourceActivity Start(string eventName, EventSourceOptions options) /// Shortcut version see Start(string eventName, EventSourceOptions options, T data) Options is empty (no keywords /// and level==Info) /// - public EventSourceActivity Start(string eventName, T data) + public EventSourceActivity Start(string? eventName, T data) { var options = new EventSourceOptions(); return this.Start(eventName, ref options, ref data); @@ -141,7 +142,7 @@ public void Stop(T data) /// This can be useful to indicate unusual ways of stopping (but it is still STRONGLY recommended that /// you start with the same prefix used for the start event and you end with the 'Stop' suffix. /// - public void Stop(string eventName) + public void Stop(string? eventName) { var data = new EmptyStruct(); this.Stop(eventName, ref data); @@ -151,7 +152,7 @@ public void Stop(string eventName) /// This can be useful to indicate unusual ways of stopping (but it is still STRONGLY recommended that /// you start with the same prefix used for the start event and you end with the 'Stop' suffix. /// - public void Stop(string eventName, T data) + public void Stop(string? eventName, T data) { this.Stop(eventName, ref data); } @@ -168,7 +169,7 @@ public void Stop(string eventName, T data) /// The options to use for the event. /// /// The data to include in the event. - public void Write(string eventName, EventSourceOptions options, T data) + public void Write(string? eventName, EventSourceOptions options, T data) { this.Write(this.eventSource, eventName, ref options, ref data); } @@ -181,7 +182,7 @@ public void Write(string eventName, EventSourceOptions options, T data) /// data's type. /// /// The data to include in the event. - public void Write(string eventName, T data) + public void Write(string? eventName, T data) { var options = new EventSourceOptions(); this.Write(this.eventSource, eventName, ref options, ref data); @@ -196,7 +197,7 @@ public void Write(string eventName, T data) /// /// The options to use for the event. /// - public void Write(string eventName, EventSourceOptions options) + public void Write(string? eventName, EventSourceOptions options) { var data = new EmptyStruct(); this.Write(this.eventSource, eventName, ref options, ref data); @@ -208,7 +209,7 @@ public void Write(string eventName, EventSourceOptions options) /// /// The name to use for the event. Must not be null. /// - public void Write(string eventName) + public void Write(string? eventName) { var options = new EventSourceOptions(); var data = new EmptyStruct(); @@ -217,7 +218,7 @@ public void Write(string eventName) /// /// Writes an event to a arbitrary eventSource stamped with the activity ID of this activity. /// - public void Write(EventSource source, string eventName, EventSourceOptions options, T data) + public void Write(EventSource source, string? eventName, EventSourceOptions options, T data) { this.Write(source, eventName, ref options, ref data); } @@ -236,7 +237,7 @@ public void Dispose() } #region private - private EventSourceActivity Start(string eventName, ref EventSourceOptions options, ref T data) + private EventSourceActivity Start(string? eventName, ref EventSourceOptions options, ref T data) { if (this.state != State.Started) throw new InvalidOperationException(); @@ -265,7 +266,7 @@ private EventSourceActivity Start(string eventName, ref EventSourceOptions op return newActivity; } - private void Write(EventSource eventSource, string eventName, ref EventSourceOptions options, ref T data) + private void Write(EventSource eventSource, string? eventName, ref EventSourceOptions options, ref T data) { if (this.state != State.Started) throw new InvalidOperationException(); // Write after stop. @@ -275,7 +276,7 @@ private void Write(EventSource eventSource, string eventName, ref EventSource eventSource.Write(eventName, ref options, ref this.activityId, ref s_empty, ref data); } - private void Stop(string eventName, ref T data) + private void Stop(string? eventName, ref T data) { if (this.state != State.Started) throw new InvalidOperationException(); @@ -284,6 +285,8 @@ private void Stop(string eventName, ref T data) if (!StartEventWasFired) return; + Debug.Assert(this.eventName != null); + this.state = State.Stopped; if (eventName == null) { @@ -312,7 +315,7 @@ private enum State internal Guid activityId; // internal Guid relatedActivityId; private State state; - private string eventName; + private string? eventName; internal static Guid s_empty; #endregion diff --git a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/EventSourceOptions.cs b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/EventSourceOptions.cs index 26305a570838..054fbb29c7e9 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/EventSourceOptions.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/EventSourceOptions.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable using System; #if ES_BUILD_STANDALONE diff --git a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/FieldMetadata.cs b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/FieldMetadata.cs index f153734752d8..c3f4b67a57ba 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/FieldMetadata.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/FieldMetadata.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable using System; using System.Resources; using Encoding = System.Text.Encoding; @@ -29,7 +30,7 @@ internal class FieldMetadata /// private readonly int nameSize; private readonly EventFieldTags tags; - private readonly byte[] custom; + private readonly byte[]? custom; /// /// ETW supports fixed sized arrays. If inType has the InTypeFixedCountFlag then this is the @@ -57,7 +58,6 @@ public FieldMetadata( 0, null) { - return; } /// @@ -86,7 +86,7 @@ public FieldMetadata( string name, TraceLoggingDataType type, EventFieldTags tags, - byte[] custom) + byte[]? custom) : this( name, type, @@ -104,7 +104,7 @@ private FieldMetadata( EventFieldTags tags, byte countFlags, ushort fixedCount = 0, - byte[] custom = null) + byte[]? custom = null) { if (name == null) { @@ -172,7 +172,7 @@ public void IncrementStructFieldCount() /// for a 'two pass' approach where you figure out how big to make the array, and then you /// fill it in. /// - public void Encode(ref int pos, byte[] metadata) + public void Encode(ref int pos, byte[]? metadata) { // Write out the null terminated UTF8 encoded name if (metadata != null) @@ -220,7 +220,8 @@ public void Encode(ref int pos, byte[] metadata) { if (metadata != null) { - Buffer.BlockCopy(this.custom, 0, metadata, pos, this.fixedCount); + Debug.Assert(custom != null); + Buffer.BlockCopy(custom, 0, metadata, pos, this.fixedCount); } pos += this.fixedCount; } diff --git a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/InvokeTypeInfo.cs b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/InvokeTypeInfo.cs index 23339f1c56c4..6b926ee9d1aa 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/InvokeTypeInfo.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/InvokeTypeInfo.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable using System; using System.Collections.Generic; @@ -18,14 +19,14 @@ namespace System.Diagnostics.Tracing /// internal sealed class InvokeTypeInfo : TraceLoggingTypeInfo { - internal readonly PropertyAnalysis[] properties; + internal readonly PropertyAnalysis[]? properties; public InvokeTypeInfo( Type type, TypeAnalysis typeAnalysis) : base( type, - typeAnalysis.name, + typeAnalysis.name!, typeAnalysis.level, typeAnalysis.opcode, typeAnalysis.keywords, @@ -37,7 +38,7 @@ public InvokeTypeInfo( public override void WriteMetadata( TraceLoggingMetadataCollector collector, - string name, + string? name, EventFieldFormat format) { var groupCollector = collector.AddGroup(name); @@ -72,12 +73,12 @@ public override void WriteData(TraceLoggingDataCollector collector, PropertyValu } } - public override object GetData(object value) + public override object? GetData(object? value) { if (this.properties != null) { var membersNames = new List(); - var memebersValues = new List(); + var memebersValues = new List(); for (int i = 0; i < this.properties.Length; i++) { var propertyValue = properties[i].propertyInfo.GetValue(value); diff --git a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/NameInfo.cs b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/NameInfo.cs index a7daf5e757a2..48fe8cfcc49e 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/NameInfo.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/NameInfo.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable using System; using System.Collections.Generic; using System.Collections.Concurrent; diff --git a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/PropertyAnalysis.cs b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/PropertyAnalysis.cs index 1f07539b5232..05eac6dca047 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/PropertyAnalysis.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/PropertyAnalysis.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable using System; using System.Reflection; @@ -21,13 +22,13 @@ internal sealed class PropertyAnalysis internal readonly PropertyInfo propertyInfo; internal readonly Func getter; internal readonly TraceLoggingTypeInfo typeInfo; - internal readonly EventFieldAttribute fieldAttribute; + internal readonly EventFieldAttribute? fieldAttribute; public PropertyAnalysis( string name, PropertyInfo propertyInfo, TraceLoggingTypeInfo typeInfo, - EventFieldAttribute fieldAttribute) + EventFieldAttribute? fieldAttribute) { this.name = name; this.propertyInfo = propertyInfo; diff --git a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/PropertyValue.cs b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/PropertyValue.cs index 0f87ea58db39..35fe7609f188 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/PropertyValue.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/PropertyValue.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable using System; using System.Reflection; using System.Runtime.InteropServices; @@ -80,11 +81,11 @@ public struct Scalar } // Anything not covered by the Scalar union gets stored in this reference. - readonly object _reference; + readonly object? _reference; readonly Scalar _scalar; readonly int _scalarLength; - private PropertyValue(object value) + private PropertyValue(object? value) { _reference = value; _scalar = default; @@ -118,33 +119,32 @@ private PropertyValue(DateTimeOffset value) : this(new Scalar() { AsDateTimeOffs private PropertyValue(TimeSpan value) : this(new Scalar() { AsTimeSpan = value }, sizeof(TimeSpan)) { } private PropertyValue(decimal value) : this(new Scalar() { AsDecimal = value }, sizeof(decimal)) { } - public static Func GetFactory(Type type) + public static Func GetFactory(Type type) { - if (type == typeof(bool)) return value => new PropertyValue((bool)value); - if (type == typeof(byte)) return value => new PropertyValue((byte)value); - if (type == typeof(sbyte)) return value => new PropertyValue((sbyte)value); - if (type == typeof(char)) return value => new PropertyValue((char)value); - if (type == typeof(short)) return value => new PropertyValue((short)value); - if (type == typeof(ushort)) return value => new PropertyValue((ushort)value); - if (type == typeof(int)) return value => new PropertyValue((int)value); - if (type == typeof(uint)) return value => new PropertyValue((uint)value); - if (type == typeof(long)) return value => new PropertyValue((long)value); - if (type == typeof(ulong)) return value => new PropertyValue((ulong)value); - if (type == typeof(IntPtr)) return value => new PropertyValue((IntPtr)value); - if (type == typeof(UIntPtr)) return value => new PropertyValue((UIntPtr)value); - if (type == typeof(float)) return value => new PropertyValue((float)value); - if (type == typeof(double)) return value => new PropertyValue((double)value); - if (type == typeof(Guid)) return value => new PropertyValue((Guid)value); - if (type == typeof(DateTime)) return value => new PropertyValue((DateTime)value); - if (type == typeof(DateTimeOffset)) return value => new PropertyValue((DateTimeOffset)value); - if (type == typeof(TimeSpan)) return value => new PropertyValue((TimeSpan)value); - if (type == typeof(decimal)) return value => new PropertyValue((decimal)value); + if (type == typeof(bool)) return value => new PropertyValue((bool)value!); + if (type == typeof(byte)) return value => new PropertyValue((byte)value!); + if (type == typeof(sbyte)) return value => new PropertyValue((sbyte)value!); + if (type == typeof(char)) return value => new PropertyValue((char)value!); + if (type == typeof(short)) return value => new PropertyValue((short)value!); + if (type == typeof(ushort)) return value => new PropertyValue((ushort)value!); + if (type == typeof(int)) return value => new PropertyValue((int)value!); + if (type == typeof(uint)) return value => new PropertyValue((uint)value!); + if (type == typeof(long)) return value => new PropertyValue((long)value!); + if (type == typeof(ulong)) return value => new PropertyValue((ulong)value!); + if (type == typeof(IntPtr)) return value => new PropertyValue((IntPtr)value!); + if (type == typeof(UIntPtr)) return value => new PropertyValue((UIntPtr)value!); + if (type == typeof(float)) return value => new PropertyValue((float)value!); + if (type == typeof(double)) return value => new PropertyValue((double)value!); + if (type == typeof(Guid)) return value => new PropertyValue((Guid)value!); + if (type == typeof(DateTime)) return value => new PropertyValue((DateTime)value!); + if (type == typeof(DateTimeOffset)) return value => new PropertyValue((DateTimeOffset)value!); + if (type == typeof(TimeSpan)) return value => new PropertyValue((TimeSpan)value!); + if (type == typeof(decimal)) return value => new PropertyValue((decimal)value!); return value => new PropertyValue(value); } - - public object ReferenceValue + public object? ReferenceValue { get { @@ -209,7 +209,7 @@ private static Func GetBoxedValueTypePropertyGette /// private static Func GetReferenceTypePropertyGetter(PropertyInfo property) { - var helper = (TypeHelper)Activator.CreateInstance(typeof(ReferenceTypeHelper<>).MakeGenericType(property.DeclaringType)); + var helper = (TypeHelper)Activator.CreateInstance(typeof(ReferenceTypeHelper<>).MakeGenericType(property.DeclaringType))!; return helper.GetPropertyGetter(property); } @@ -233,7 +233,7 @@ protected Delegate GetGetMethod(PropertyInfo property, Type propertyType) #else private #endif - sealed class ReferenceTypeHelper : TypeHelper where TContainer : class + sealed class ReferenceTypeHelper : TypeHelper where TContainer : class? { public override Func GetPropertyGetter(PropertyInfo property) { @@ -241,33 +241,33 @@ public override Func GetPropertyGetter(PropertyInf if (!Statics.IsValueType(type)) { - var getter = (Func)GetGetMethod(property, type); - return container => new PropertyValue(getter((TContainer)container.ReferenceValue)); + var getter = (Func)GetGetMethod(property, type); + return container => new PropertyValue(getter((TContainer)container.ReferenceValue!)); // TODO-NULLABLE-GENERIC: Re-review } else { if (type.GetTypeInfo().IsEnum) type = Enum.GetUnderlyingType(type); - if (type == typeof(bool)) { var f = (Func)GetGetMethod(property, type); return container => new PropertyValue(f((TContainer)container.ReferenceValue)); } - if (type == typeof(byte)) { var f = (Func)GetGetMethod(property, type); return container => new PropertyValue(f((TContainer)container.ReferenceValue)); } - if (type == typeof(sbyte)) { var f = (Func)GetGetMethod(property, type); return container => new PropertyValue(f((TContainer)container.ReferenceValue)); } - if (type == typeof(char)) { var f = (Func)GetGetMethod(property, type); return container => new PropertyValue(f((TContainer)container.ReferenceValue)); } - if (type == typeof(short)) { var f = (Func)GetGetMethod(property, type); return container => new PropertyValue(f((TContainer)container.ReferenceValue)); } - if (type == typeof(ushort)) { var f = (Func)GetGetMethod(property, type); return container => new PropertyValue(f((TContainer)container.ReferenceValue)); } - if (type == typeof(int)) { var f = (Func)GetGetMethod(property, type); return container => new PropertyValue(f((TContainer)container.ReferenceValue)); } - if (type == typeof(uint)) { var f = (Func)GetGetMethod(property, type); return container => new PropertyValue(f((TContainer)container.ReferenceValue)); } - if (type == typeof(long)) { var f = (Func)GetGetMethod(property, type); return container => new PropertyValue(f((TContainer)container.ReferenceValue)); } - if (type == typeof(ulong)) { var f = (Func)GetGetMethod(property, type); return container => new PropertyValue(f((TContainer)container.ReferenceValue)); } - if (type == typeof(IntPtr)) { var f = (Func)GetGetMethod(property, type); return container => new PropertyValue(f((TContainer)container.ReferenceValue)); } - if (type == typeof(UIntPtr)) { var f = (Func)GetGetMethod(property, type); return container => new PropertyValue(f((TContainer)container.ReferenceValue)); } - if (type == typeof(float)) { var f = (Func)GetGetMethod(property, type); return container => new PropertyValue(f((TContainer)container.ReferenceValue)); } - if (type == typeof(double)) { var f = (Func)GetGetMethod(property, type); return container => new PropertyValue(f((TContainer)container.ReferenceValue)); } - if (type == typeof(Guid)) { var f = (Func)GetGetMethod(property, type); return container => new PropertyValue(f((TContainer)container.ReferenceValue)); } - if (type == typeof(DateTime)) { var f = (Func)GetGetMethod(property, type); return container => new PropertyValue(f((TContainer)container.ReferenceValue)); } - if (type == typeof(DateTimeOffset)) { var f = (Func)GetGetMethod(property, type); return container => new PropertyValue(f((TContainer)container.ReferenceValue)); } - if (type == typeof(TimeSpan)) { var f = (Func)GetGetMethod(property, type); return container => new PropertyValue(f((TContainer)container.ReferenceValue)); } - if (type == typeof(decimal)) { var f = (Func)GetGetMethod(property, type); return container => new PropertyValue(f((TContainer)container.ReferenceValue)); } + if (type == typeof(bool)) { var f = (Func)GetGetMethod(property, type); return container => new PropertyValue(f((TContainer)container.ReferenceValue!)); } // TODO-NULLABLE-GENERIC: Re-review + if (type == typeof(byte)) { var f = (Func)GetGetMethod(property, type); return container => new PropertyValue(f((TContainer)container.ReferenceValue!)); } // TODO-NULLABLE-GENERIC: Re-review + if (type == typeof(sbyte)) { var f = (Func)GetGetMethod(property, type); return container => new PropertyValue(f((TContainer)container.ReferenceValue!)); } // TODO-NULLABLE-GENERIC: Re-review + if (type == typeof(char)) { var f = (Func)GetGetMethod(property, type); return container => new PropertyValue(f((TContainer)container.ReferenceValue!)); } // TODO-NULLABLE-GENERIC: Re-review + if (type == typeof(short)) { var f = (Func)GetGetMethod(property, type); return container => new PropertyValue(f((TContainer)container.ReferenceValue!)); } // TODO-NULLABLE-GENERIC: Re-review + if (type == typeof(ushort)) { var f = (Func)GetGetMethod(property, type); return container => new PropertyValue(f((TContainer)container.ReferenceValue!)); } // TODO-NULLABLE-GENERIC: Re-review + if (type == typeof(int)) { var f = (Func)GetGetMethod(property, type); return container => new PropertyValue(f((TContainer)container.ReferenceValue!)); } // TODO-NULLABLE-GENERIC: Re-review + if (type == typeof(uint)) { var f = (Func)GetGetMethod(property, type); return container => new PropertyValue(f((TContainer)container.ReferenceValue!)); } // TODO-NULLABLE-GENERIC: Re-review + if (type == typeof(long)) { var f = (Func)GetGetMethod(property, type); return container => new PropertyValue(f((TContainer)container.ReferenceValue!)); } // TODO-NULLABLE-GENERIC: Re-review + if (type == typeof(ulong)) { var f = (Func)GetGetMethod(property, type); return container => new PropertyValue(f((TContainer)container.ReferenceValue!)); } // TODO-NULLABLE-GENERIC: Re-review + if (type == typeof(IntPtr)) { var f = (Func)GetGetMethod(property, type); return container => new PropertyValue(f((TContainer)container.ReferenceValue!)); } // TODO-NULLABLE-GENERIC: Re-review + if (type == typeof(UIntPtr)) { var f = (Func)GetGetMethod(property, type); return container => new PropertyValue(f((TContainer)container.ReferenceValue!)); } // TODO-NULLABLE-GENERIC: Re-review + if (type == typeof(float)) { var f = (Func)GetGetMethod(property, type); return container => new PropertyValue(f((TContainer)container.ReferenceValue!)); } // TODO-NULLABLE-GENERIC: Re-review + if (type == typeof(double)) { var f = (Func)GetGetMethod(property, type); return container => new PropertyValue(f((TContainer)container.ReferenceValue!)); } // TODO-NULLABLE-GENERIC: Re-review + if (type == typeof(Guid)) { var f = (Func)GetGetMethod(property, type); return container => new PropertyValue(f((TContainer)container.ReferenceValue!)); } // TODO-NULLABLE-GENERIC: Re-review + if (type == typeof(DateTime)) { var f = (Func)GetGetMethod(property, type); return container => new PropertyValue(f((TContainer)container.ReferenceValue!)); } // TODO-NULLABLE-GENERIC: Re-review + if (type == typeof(DateTimeOffset)) { var f = (Func)GetGetMethod(property, type); return container => new PropertyValue(f((TContainer)container.ReferenceValue!)); } // TODO-NULLABLE-GENERIC: Re-review + if (type == typeof(TimeSpan)) { var f = (Func)GetGetMethod(property, type); return container => new PropertyValue(f((TContainer)container.ReferenceValue!)); } // TODO-NULLABLE-GENERIC: Re-review + if (type == typeof(decimal)) { var f = (Func)GetGetMethod(property, type); return container => new PropertyValue(f((TContainer)container.ReferenceValue!)); } // TODO-NULLABLE-GENERIC: Re-review return container => new PropertyValue(property.GetValue(container.ReferenceValue)); } diff --git a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/SimpleEventTypes.cs b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/SimpleEventTypes.cs index cdced968f057..280c03c70bf8 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/SimpleEventTypes.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/SimpleEventTypes.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable using System; using Interlocked = System.Threading.Interlocked; @@ -21,7 +22,7 @@ namespace System.Diagnostics.Tracing /// internal static class SimpleEventTypes { - private static TraceLoggingEventTypes instance; + private static TraceLoggingEventTypes? instance; public static TraceLoggingEventTypes Instance { @@ -33,6 +34,7 @@ private static TraceLoggingEventTypes InitInstance() var info = TraceLoggingTypeInfo.GetInstance(typeof(T), null); var newInstance = new TraceLoggingEventTypes(info.Name, info.Tags, new TraceLoggingTypeInfo[] { info }); Interlocked.CompareExchange(ref instance, newInstance, null); + Debug.Assert(instance != null); return instance; } } diff --git a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/SimpleTypeInfos.cs b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/SimpleTypeInfos.cs index dc714d860ec8..dc8be3e4d363 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/SimpleTypeInfos.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/SimpleTypeInfos.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable using System; using System.Collections.Generic; using System.Reflection; @@ -28,7 +29,7 @@ public NullTypeInfo() : base(typeof(EmptyStruct)) { } public override void WriteMetadata( TraceLoggingMetadataCollector collector, - string name, + string? name, EventFieldFormat format) { collector.AddGroup(name); @@ -39,7 +40,7 @@ public override void WriteData(TraceLoggingDataCollector collector, PropertyValu return; } - public override object GetData(object value) + public override object? GetData(object? value) { return null; } @@ -63,9 +64,9 @@ private ScalarTypeInfo( this.nativeFormat = nativeFormat; } - public override void WriteMetadata(TraceLoggingMetadataCollector collector, string name, EventFieldFormat format) + public override void WriteMetadata(TraceLoggingMetadataCollector collector, string? name, EventFieldFormat format) { - collector.AddScalar(name, formatFunc(format, nativeFormat)); + collector.AddScalar(name!, formatFunc(format, nativeFormat)); } public override void WriteData(TraceLoggingDataCollector collector, PropertyValue value) @@ -112,9 +113,9 @@ private ScalarArrayTypeInfo( this.elementSize = elementSize; } - public override void WriteMetadata(TraceLoggingMetadataCollector collector, string name, EventFieldFormat format) + public override void WriteMetadata(TraceLoggingMetadataCollector collector, string? name, EventFieldFormat format) { - collector.AddArray(name, formatFunc(format, nativeFormat)); + collector.AddArray(name!, formatFunc(format, nativeFormat)); } public override void WriteData(TraceLoggingDataCollector collector, PropertyValue value) @@ -148,20 +149,20 @@ public StringTypeInfo() : base(typeof(string)) { } public override void WriteMetadata( TraceLoggingMetadataCollector collector, - string name, + string? name, EventFieldFormat format) { - collector.AddNullTerminatedString(name, Statics.MakeDataType(TraceLoggingDataType.Utf16String, format)); + collector.AddNullTerminatedString(name!, Statics.MakeDataType(TraceLoggingDataType.Utf16String, format)); } public override void WriteData(TraceLoggingDataCollector collector, PropertyValue value) { - collector.AddNullTerminatedString((string)value.ReferenceValue); + collector.AddNullTerminatedString((string?)value.ReferenceValue); } - public override object GetData(object value) + public override object GetData(object? value) { - if(value == null) + if (value == null) { return ""; } @@ -179,10 +180,10 @@ public DateTimeTypeInfo() : base(typeof(DateTime)) { } public override void WriteMetadata( TraceLoggingMetadataCollector collector, - string name, + string? name, EventFieldFormat format) { - collector.AddScalar(name, Statics.MakeDataType(TraceLoggingDataType.FileTime, format)); + collector.AddScalar(name!, Statics.MakeDataType(TraceLoggingDataType.FileTime, format)); } public override void WriteData(TraceLoggingDataCollector collector, PropertyValue value) @@ -205,7 +206,7 @@ internal sealed class DateTimeOffsetTypeInfo : TraceLoggingTypeInfo { public DateTimeOffsetTypeInfo() : base(typeof(DateTimeOffset)) { } - public override void WriteMetadata(TraceLoggingMetadataCollector collector, string name, EventFieldFormat format) + public override void WriteMetadata(TraceLoggingMetadataCollector collector, string? name, EventFieldFormat format) { var group = collector.AddGroup(name); group.AddScalar("Ticks", Statics.MakeDataType(TraceLoggingDataType.FileTime, format)); @@ -230,10 +231,10 @@ public TimeSpanTypeInfo() : base(typeof(TimeSpan)) { } public override void WriteMetadata( TraceLoggingMetadataCollector collector, - string name, + string? name, EventFieldFormat format) { - collector.AddScalar(name, Statics.MakeDataType(TraceLoggingDataType.Int64, format)); + collector.AddScalar(name!, Statics.MakeDataType(TraceLoggingDataType.Int64, format)); } public override void WriteData(TraceLoggingDataCollector collector, PropertyValue value) @@ -251,10 +252,10 @@ public DecimalTypeInfo() : base(typeof(decimal)) { } public override void WriteMetadata( TraceLoggingMetadataCollector collector, - string name, + string? name, EventFieldFormat format) { - collector.AddScalar(name, Statics.MakeDataType(TraceLoggingDataType.Double, format)); + collector.AddScalar(name!, Statics.MakeDataType(TraceLoggingDataType.Double, format)); } public override void WriteData(TraceLoggingDataCollector collector, PropertyValue value) @@ -282,7 +283,7 @@ public NullableTypeInfo(Type type, List recursionCheck) public override void WriteMetadata( TraceLoggingMetadataCollector collector, - string name, + string? name, EventFieldFormat format) { var group = collector.AddGroup(name); diff --git a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/Statics.cs b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/Statics.cs index 0c21672131c1..56d53c1d189c 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/Statics.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/Statics.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable using System; using System.Collections.Generic; using System.Reflection; @@ -112,7 +113,7 @@ public static byte[] MetadataForString( /// This is useful for a two pass approach where you figure out how big to /// make the array, and then you fill it in. /// - public static void EncodeTags(int tags, ref int pos, byte[] metadata) + public static void EncodeTags(int tags, ref int pos, byte[]? metadata) { // We transmit the low 28 bits of tags, high bits first, 7 bits at a time. var tagsLeft = tags & 0xfffffff; @@ -172,7 +173,7 @@ public static int Combine( } } - public static void CheckName(string name) + public static void CheckName(string? name) { if (name != null && 0 <= name.IndexOf('\0')) { @@ -363,7 +364,7 @@ All TraceLogging use of reflection APIs should go through wrappers here. kinds of reflection operations are being done. */ - public static object CreateInstance(Type type, params object[] parameters) + public static object? CreateInstance(Type type, params object?[]? parameters) { return Activator.CreateInstance(type, parameters); } @@ -422,9 +423,9 @@ public static bool HasCustomAttribute( } public static AttributeType GetCustomAttribute(PropertyInfo propInfo) - where AttributeType : Attribute + where AttributeType : Attribute? { - AttributeType result = null; + AttributeType result = null!; // TODO-NULLABLE-GENERIC: re-review #if (ES_BUILD_PCL || ES_BUILD_PN) foreach (var attrib in propInfo.GetCustomAttributes(false)) { @@ -442,9 +443,9 @@ public static AttributeType GetCustomAttribute(PropertyInfo propI } public static AttributeType GetCustomAttribute(Type type) - where AttributeType : Attribute + where AttributeType : Attribute? { - AttributeType result = null; + AttributeType result = null!; // TODO-NULLABLE-GENERIC: re-review #if (ES_BUILD_PCL || ES_BUILD_PN) foreach (var attrib in type.GetTypeInfo().GetCustomAttributes(false)) { @@ -466,9 +467,9 @@ public static Type[] GetGenericArguments(Type type) return type.GetGenericArguments(); } - public static Type FindEnumerableElementType(Type type) + public static Type? FindEnumerableElementType(Type type) { - Type elementType = null; + Type? elementType = null; if (IsGenericMatch(type, typeof(IEnumerable<>))) { @@ -537,9 +538,9 @@ public static TraceLoggingTypeInfo CreateDefaultTypeInfo( recursionCheck.Add(dataType); - var eventAttrib = Statics.GetCustomAttribute(dataType); + var eventAttrib = Statics.GetCustomAttribute(dataType); if (eventAttrib != null || - Statics.GetCustomAttribute(dataType) != null || + Statics.GetCustomAttribute(dataType) != null || IsGenericMatch(dataType, typeof(KeyValuePair<,>))) { var analysis = new TypeAnalysis(dataType, eventAttrib, recursionCheck); diff --git a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/TraceLoggingDataCollector.cs b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/TraceLoggingDataCollector.cs index c6f89c8784e6..afa0e7140aa4 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/TraceLoggingDataCollector.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/TraceLoggingDataCollector.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable using System; using System.Security; @@ -99,7 +100,7 @@ public void AddScalar(bool value) /// /// Value to be added. A null value is treated as a zero-length string. /// - public void AddNullTerminatedString(string value) + public void AddNullTerminatedString(string? value) { DataCollector.ThreadInstance.AddNullTerminatedString(value); } @@ -110,14 +111,14 @@ public void AddNullTerminatedString(string value) /// /// Value to be added. A null value is treated as a zero-length string. /// - public void AddBinary(string value) + public void AddBinary(string? value) { DataCollector.ThreadInstance.AddBinary(value, value == null ? 0 : value.Length * 2); } public void AddArray(PropertyValue value, int elementSize) { - Array array = (Array)value.ReferenceValue; + Array? array = (Array?)value.ReferenceValue; DataCollector.ThreadInstance.AddArray(array, array == null ? 0 : array.Length, elementSize); } } diff --git a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/TraceLoggingEventSource.cs b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/TraceLoggingEventSource.cs index 0553f9899936..178334f57f6f 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/TraceLoggingEventSource.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/TraceLoggingEventSource.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable // This program uses code hyperlinks available as part of the HyperAddin Visual Studio plug-in. // It is available from http://www.codeplex.com/hyperAddin @@ -44,7 +45,7 @@ namespace System.Diagnostics.Tracing public partial class EventSource { #if FEATURE_MANAGED_ETW - private byte[] providerMetadata; + private byte[] providerMetadata = null!; #endif #if FEATURE_PERFTRACING @@ -93,10 +94,10 @@ public EventSource( public EventSource( string eventSourceName, EventSourceSettings config, - params string[] traits) + params string[]? traits) : this( eventSourceName == null ? new Guid() : GenerateGuidFromName(eventSourceName.ToUpperInvariant()), - eventSourceName, + eventSourceName!, config, traits) { if (eventSourceName == null) @@ -170,7 +171,7 @@ public unsafe void Write(string eventName, EventSourceOptions options) /// create the fields of the event. /// public unsafe void Write( - string eventName, + string? eventName, T data) { if (!this.IsEnabled()) @@ -206,7 +207,7 @@ public unsafe void Write( /// create the fields of the event. /// public unsafe void Write( - string eventName, + string? eventName, EventSourceOptions options, T data) { @@ -244,7 +245,7 @@ public unsafe void Write( /// create the fields of the event. /// public unsafe void Write( - string eventName, + string? eventName, ref EventSourceOptions options, ref T data) { @@ -289,7 +290,7 @@ public unsafe void Write( /// create the fields of the event. /// public unsafe void Write( - string eventName, + string? eventName, ref EventSourceOptions options, ref Guid activityId, ref Guid relatedActivityId, @@ -345,7 +346,7 @@ public unsafe void Write( /// eventTypes parameter. /// private unsafe void WriteMultiMerge( - string eventName, + string? eventName, ref EventSourceOptions options, TraceLoggingEventTypes eventTypes, Guid* activityID, @@ -405,7 +406,7 @@ private unsafe void WriteMultiMerge( /// eventTypes parameter. /// private unsafe void WriteMultiMergeInner( - string eventName, + string? eventName, ref EventSourceOptions options, TraceLoggingEventTypes eventTypes, Guid* activityID, @@ -528,7 +529,7 @@ private unsafe void WriteMultiMergeInner( /// fields described by the eventTypes parameter. /// internal unsafe void WriteMultiMerge( - string eventName, + string? eventName, ref EventSourceOptions options, TraceLoggingEventTypes eventTypes, Guid* activityID, @@ -600,9 +601,9 @@ internal unsafe void WriteMultiMerge( } private unsafe void WriteImpl( - string eventName, + string? eventName, ref EventSourceOptions options, - object data, + object? data, Guid* pActivityId, Guid* pRelatedActivityId, TraceLoggingEventTypes eventTypes) @@ -630,7 +631,7 @@ private unsafe void WriteImpl( var pinCount = eventTypes.pinCount; var scratch = stackalloc byte[eventTypes.scratchSize]; var descriptors = stackalloc EventData[eventTypes.dataCount + 3]; - for(int i=0; i((IList)payload.Values); + eventCallbackArgs.Payload = new ReadOnlyCollection((IList)payload.Values); eventCallbackArgs.PayloadNames = new ReadOnlyCollection((IList)payload.Keys); } @@ -875,13 +878,13 @@ private static int HexDigit(char c) throw new ArgumentException(SR.Format(SR.EventSource_BadHexDigit, c), "traits"); } - private NameInfo UpdateDescriptor( - string name, + private NameInfo? UpdateDescriptor( + string? name, TraceLoggingEventTypes eventInfo, ref EventSourceOptions options, out EventDescriptor descriptor) { - NameInfo nameInfo = null; + NameInfo? nameInfo = null; int identity = 0; byte level = (options.valuesSet & EventSourceOptions.levelSet) != 0 ? options.level diff --git a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/TraceLoggingEventTypes.cs b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/TraceLoggingEventTypes.cs index 8887714fdb1a..d894acbb7550 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/TraceLoggingEventTypes.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/TraceLoggingEventTypes.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable using System; using System.Collections.Generic; using Interlocked = System.Threading.Interlocked; @@ -26,7 +27,7 @@ public class TraceLoggingEventTypes { internal readonly TraceLoggingTypeInfo[] typeInfos; #if FEATURE_PERFTRACING - internal readonly string[] paramNames; + internal readonly string[]? paramNames; #endif internal readonly string name; internal readonly EventTags tags; @@ -60,7 +61,6 @@ internal TraceLoggingEventTypes( params Type[] types) : this(tags, name, MakeArray(types)) { - return; } /// @@ -87,7 +87,6 @@ internal TraceLoggingEventTypes( params TraceLoggingTypeInfo[] typeInfos) : this(tags, name, MakeArray(typeInfos)) { - return; } internal TraceLoggingEventTypes( diff --git a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/TraceLoggingMetadataCollector.cs b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/TraceLoggingMetadataCollector.cs index b5b199dbca7d..7e39c966a460 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/TraceLoggingMetadataCollector.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/TraceLoggingMetadataCollector.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable using System; using System.Collections.Generic; @@ -19,7 +20,7 @@ namespace System.Diagnostics.Tracing internal class TraceLoggingMetadataCollector { private readonly Impl impl; - private readonly FieldMetadata currentGroup; + private readonly FieldMetadata? currentGroup; private int bufferedArrayFieldCount = int.MinValue; /// @@ -93,7 +94,7 @@ private bool BeginningBufferedArray /// /// A new metadata collector that can be used to add fields to the group. /// - public TraceLoggingMetadataCollector AddGroup(string name) + public TraceLoggingMetadataCollector AddGroup(string? name) { TraceLoggingMetadataCollector result = this; @@ -101,7 +102,7 @@ public TraceLoggingMetadataCollector AddGroup(string name) this.BeginningBufferedArray) // Error, FieldMetadata's constructor will throw the appropriate exception. { var newGroup = new FieldMetadata( - name, + name!, TraceLoggingDataType.Struct, this.Tags, this.BeginningBufferedArray); @@ -375,7 +376,7 @@ public void EndBuffered() this.bufferNesting--; } - public int Encode(byte[] metadata) + public int Encode(byte[]? metadata) { int size = 0; diff --git a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/TraceLoggingTypeInfo.cs b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/TraceLoggingTypeInfo.cs index 511a4fe480c8..62dc932b2ee9 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/TraceLoggingTypeInfo.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/TraceLoggingTypeInfo.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable using System; using System.Collections.Generic; @@ -30,7 +31,7 @@ internal abstract class TraceLoggingTypeInfo private readonly EventOpcode opcode = (EventOpcode)(-1); private readonly EventTags tags; private readonly Type dataType; - private readonly Func propertyValueFactory; + private readonly Func propertyValueFactory; internal TraceLoggingTypeInfo(Type dataType) { @@ -124,7 +125,7 @@ internal Type DataType get { return this.dataType; } } - internal Func PropertyValueFactory + internal Func PropertyValueFactory { get { return this.propertyValueFactory; } } @@ -153,7 +154,7 @@ internal Func PropertyValueFactory /// public abstract void WriteMetadata( TraceLoggingMetadataCollector collector, - string name, + string? name, EventFieldFormat format); /// @@ -177,15 +178,15 @@ public abstract void WriteData( /// /// /// - public virtual object GetData(object value) + public virtual object? GetData(object? value) { return value; } [ThreadStatic] // per-thread cache to avoid synchronization - private static Dictionary threadCache; + private static Dictionary? threadCache; - public static TraceLoggingTypeInfo GetInstance(Type type, List recursionCheck) + public static TraceLoggingTypeInfo GetInstance(Type type, List? recursionCheck) { var cache = threadCache ?? (threadCache = new Dictionary()); diff --git a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/TypeAnalysis.cs b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/TypeAnalysis.cs index 42cdde5f6ad8..83f76af888e8 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/TypeAnalysis.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/TypeAnalysis.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable using System; using System.Collections.Generic; using System.Reflection; @@ -19,7 +20,7 @@ namespace System.Diagnostics.Tracing internal sealed class TypeAnalysis { internal readonly PropertyAnalysis[] properties; - internal readonly string name; + internal readonly string? name; internal readonly EventKeywords keywords; internal readonly EventLevel level = (EventLevel)(-1); internal readonly EventOpcode opcode = (EventOpcode)(-1); @@ -27,7 +28,7 @@ internal sealed class TypeAnalysis public TypeAnalysis( Type dataType, - EventDataAttribute eventAttrib, + EventDataAttribute? eventAttrib, List recursionCheck) { var propertyInfos = Statics.GetProperties(dataType); @@ -46,7 +47,7 @@ public TypeAnalysis( continue; } - MethodInfo getterInfo = Statics.GetGetMethod(propertyInfo); + MethodInfo? getterInfo = Statics.GetGetMethod(propertyInfo); if (getterInfo == null) { continue; @@ -59,7 +60,7 @@ public TypeAnalysis( var propertyType = propertyInfo.PropertyType; var propertyTypeInfo = TraceLoggingTypeInfo.GetInstance(propertyType, recursionCheck); - var fieldAttribute = Statics.GetCustomAttribute(propertyInfo); + var fieldAttribute = Statics.GetCustomAttribute(propertyInfo); string propertyName = fieldAttribute != null && fieldAttribute.Name != null diff --git a/src/Common/src/CoreLib/System/Diagnostics/Tracing/Winmeta.cs b/src/Common/src/CoreLib/System/Diagnostics/Tracing/Winmeta.cs index c60ca5b365c4..217500592c55 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/Tracing/Winmeta.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/Tracing/Winmeta.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable /*============================================================ ** ** From cd841c85b25dbdb3a85b903310e95083bfcfe919 Mon Sep 17 00:00:00 2001 From: buyaa-n Date: Thu, 25 Apr 2019 16:08:26 -0700 Subject: [PATCH 152/607] Nullable for Type class (dotnet/coreclr#23489) System.Type, System.Reflection nullability Signed-off-by: dotnet-bot --- src/Common/src/CoreLib/System/AppDomain.cs | 8 +- src/Common/src/CoreLib/System/Attribute.cs | 21 ++-- .../ComponentModel/DefaultValueAttribute.cs | 2 +- .../src/CoreLib/System/DefaultBinder.cs | 117 +++++++++--------- .../CoreLib/System/Diagnostics/StackTrace.cs | 4 +- .../System/Diagnostics/Tracing/EventSource.cs | 22 ++-- .../Diagnostics/Tracing/StubEnvironment.cs | 2 +- .../Tracing/TraceLogging/PropertyValue.cs | 6 +- .../Tracing/TraceLogging/SimpleTypeInfos.cs | 2 +- .../Tracing/TraceLogging/Statics.cs | 14 +-- .../TraceLogging/TraceLoggingEventTypes.cs | 4 +- .../src/CoreLib/System/Environment.Unix.cs | 4 +- .../src/CoreLib/System/Environment.Win32.cs | 2 +- src/Common/src/CoreLib/System/Environment.cs | 2 +- .../src/CoreLib/System/Reflection/Assembly.cs | 65 +++++----- .../AssemblyDefaultAliasAttribute.cs | 1 + .../Reflection/AssemblyNameFormatter.cs | 3 +- .../src/CoreLib/System/Reflection/Binder.cs | 11 +- .../System/Reflection/ConstructorInfo.cs | 13 +- .../CoreLib/System/Reflection/EventInfo.cs | 45 +++---- .../CoreLib/System/Reflection/FieldInfo.cs | 15 +-- .../Reflection/ICustomAttributeProvider.cs | 1 + .../src/CoreLib/System/Reflection/IReflect.cs | 13 +- .../System/Reflection/IReflectableType.cs | 1 + .../Reflection/IntrospectionExtensions.cs | 1 + .../System/Reflection/LocalVariableInfo.cs | 3 +- .../System/Reflection/ManifestResourceInfo.cs | 1 + .../CoreLib/System/Reflection/MemberFilter.cs | 3 +- .../CoreLib/System/Reflection/MemberInfo.cs | 16 +-- .../CoreLib/System/Reflection/MethodBase.cs | 13 +- .../CoreLib/System/Reflection/MethodBody.cs | 3 +- .../System/Reflection/MethodInfo.Internal.cs | 1 + .../CoreLib/System/Reflection/MethodInfo.cs | 23 ++-- .../src/CoreLib/System/Reflection/Missing.cs | 1 + .../src/CoreLib/System/Reflection/Module.cs | 47 +++---- .../Reflection/ModuleResolveEventHandler.cs | 1 + .../System/Reflection/ParameterInfo.cs | 21 ++-- .../src/CoreLib/System/Reflection/Pointer.cs | 1 + .../CoreLib/System/Reflection/PropertyInfo.cs | 33 ++--- .../System/Reflection/ReflectionContext.cs | 1 + .../System/Reflection/SignatureArrayType.cs | 1 + .../System/Reflection/SignatureByRefType.cs | 3 +- .../SignatureConstructedGenericType.cs | 14 +-- .../SignatureGenericMethodParameterType.cs | 3 +- .../SignatureGenericParameterType.cs | 7 +- .../Reflection/SignatureHasElementType.cs | 7 +- .../System/Reflection/SignaturePointerType.cs | 3 +- .../System/Reflection/SignatureType.cs | 45 ++++--- .../Reflection/SignatureTypeExtensions.cs | 37 +++--- .../System/Reflection/StrongNameKeyPair.cs | 1 + .../System/Reflection/TypeDelegator.cs | 43 +++---- .../CoreLib/System/Reflection/TypeFilter.cs | 1 + .../src/CoreLib/System/Reflection/TypeInfo.cs | 13 +- .../ManifestBasedResourceGroveler.cs | 6 +- .../System/Resources/ResourceManager.Uap.cs | 2 +- .../System/Resources/ResourceManager.cs | 2 +- .../System/Resources/ResourceReader.cs | 54 ++++---- .../CompilerServices/RuntimeHelpers.cs | 2 +- .../ComSourceInterfacesAttribute.cs | 2 +- .../System/Runtime/InteropServices/Marshal.cs | 2 +- .../Serialization/SerializationInfo.cs | 8 +- src/Common/src/CoreLib/System/Type.Enum.cs | 5 +- src/Common/src/CoreLib/System/Type.Helpers.cs | 64 +++++----- src/Common/src/CoreLib/System/Type.cs | 113 ++++++++--------- 64 files changed, 513 insertions(+), 472 deletions(-) diff --git a/src/Common/src/CoreLib/System/AppDomain.cs b/src/Common/src/CoreLib/System/AppDomain.cs index b1a20551b5e9..a5399178b156 100644 --- a/src/Common/src/CoreLib/System/AppDomain.cs +++ b/src/Common/src/CoreLib/System/AppDomain.cs @@ -399,8 +399,8 @@ public void SetThreadPrincipal(IPrincipal principal) case PrincipalPolicy.UnauthenticatedPrincipal: if (s_getUnauthenticatedPrincipal == null) { - Type type = Type.GetType("System.Security.Principal.GenericPrincipal, System.Security.Claims", throwOnError: true); - MethodInfo mi = type.GetMethod("GetDefaultInstance", BindingFlags.NonPublic | BindingFlags.Static); + Type type = Type.GetType("System.Security.Principal.GenericPrincipal, System.Security.Claims", throwOnError: true)!; + MethodInfo? mi = type.GetMethod("GetDefaultInstance", BindingFlags.NonPublic | BindingFlags.Static); Debug.Assert(mi != null); // Don't throw PNSE if null like for WindowsPrincipal as UnauthenticatedPrincipal should // be available on all platforms. @@ -414,8 +414,8 @@ public void SetThreadPrincipal(IPrincipal principal) case PrincipalPolicy.WindowsPrincipal: if (s_getWindowsPrincipal == null) { - Type type = Type.GetType("System.Security.Principal.WindowsPrincipal, System.Security.Principal.Windows", throwOnError: true); - MethodInfo mi = type.GetMethod("GetDefaultInstance", BindingFlags.NonPublic | BindingFlags.Static); + Type type = Type.GetType("System.Security.Principal.WindowsPrincipal, System.Security.Principal.Windows", throwOnError: true)!; + MethodInfo? mi = type.GetMethod("GetDefaultInstance", BindingFlags.NonPublic | BindingFlags.Static); if (mi == null) { throw new PlatformNotSupportedException(SR.PlatformNotSupported_Principal); diff --git a/src/Common/src/CoreLib/System/Attribute.cs b/src/Common/src/CoreLib/System/Attribute.cs index 755d7722615c..88e741c87b91 100644 --- a/src/Common/src/CoreLib/System/Attribute.cs +++ b/src/Common/src/CoreLib/System/Attribute.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable using System.Diagnostics; using System.Reflection; @@ -15,7 +16,7 @@ public abstract partial class Attribute protected Attribute() { } #if !CORERT - public override bool Equals(object obj) + public override bool Equals(object? obj) { if (obj == null) return false; @@ -25,7 +26,7 @@ public override bool Equals(object obj) Type thisType = this.GetType(); object thisObj = this; - object thisResult, thatResult; + object? thisResult, thatResult; while (thisType != typeof(Attribute)) { @@ -41,7 +42,7 @@ public override bool Equals(object obj) return false; } } - thisType = thisType.BaseType; + thisType = thisType.BaseType!; } return true; @@ -54,11 +55,11 @@ public override int GetHashCode() while (type != typeof(Attribute)) { FieldInfo[] fields = type.GetFields(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.DeclaredOnly); - object vThis = null; + object? vThis = null; for (int i = 0; i < fields.Length; i++) { - object fieldValue = fields[i].GetValue(this); + object? fieldValue = fields[i].GetValue(this); // The hashcode of an array ignores the contents of the array, so it can produce // different hashcodes for arrays with the same contents. @@ -74,7 +75,7 @@ public override int GetHashCode() if (vThis != null) return vThis.GetHashCode(); - type = type.BaseType; + type = type.BaseType!; } return type.GetHashCode(); @@ -82,7 +83,7 @@ public override int GetHashCode() #endif // Compares values of custom-attribute fields. - private static bool AreFieldValuesEqual(object thisValue, object thatValue) + private static bool AreFieldValuesEqual(object? thisValue, object? thatValue) { if (thisValue == null && thatValue == null) return true; @@ -99,8 +100,8 @@ private static bool AreFieldValuesEqual(object thisValue, object thatValue) return false; } - Array thisValueArray = thisValue as Array; - Array thatValueArray = thatValue as Array; + Array thisValueArray = (Array)thisValue; + Array thatValueArray = (Array)thatValue; if (thisValueArray.Length != thatValueArray.Length) { return false; @@ -132,7 +133,7 @@ private static bool AreFieldValuesEqual(object thisValue, object thatValue) public virtual object TypeId => GetType(); - public virtual bool Match(object obj) => Equals(obj); + public virtual bool Match(object? obj) => Equals(obj); public virtual bool IsDefaultAttribute() => false; } diff --git a/src/Common/src/CoreLib/System/ComponentModel/DefaultValueAttribute.cs b/src/Common/src/CoreLib/System/ComponentModel/DefaultValueAttribute.cs index 9380064337d9..fdf9e90fc4f2 100644 --- a/src/Common/src/CoreLib/System/ComponentModel/DefaultValueAttribute.cs +++ b/src/Common/src/CoreLib/System/ComponentModel/DefaultValueAttribute.cs @@ -68,7 +68,7 @@ bool TryConvertFromInvariantString(Type? typeToConvert, string? stringValue, out // lazy init reflection objects if (s_convertFromInvariantString == null) { - Type typeDescriptorType = Type.GetType("System.ComponentModel.TypeDescriptor, System.ComponentModel.TypeConverter", throwOnError: false); + Type? typeDescriptorType = Type.GetType("System.ComponentModel.TypeDescriptor, System.ComponentModel.TypeConverter", throwOnError: false); MethodInfo? mi = typeDescriptorType?.GetMethod("ConvertFromInvariantString", BindingFlags.NonPublic | BindingFlags.Static); Volatile.Write(ref s_convertFromInvariantString, mi == null ? new object() : mi.CreateDelegate(typeof(Func))); } diff --git a/src/Common/src/CoreLib/System/DefaultBinder.cs b/src/Common/src/CoreLib/System/DefaultBinder.cs index dca388dfc87b..8d386ddc634d 100644 --- a/src/Common/src/CoreLib/System/DefaultBinder.cs +++ b/src/Common/src/CoreLib/System/DefaultBinder.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable using System.Reflection; using System.Diagnostics; using CultureInfo = System.Globalization.CultureInfo; @@ -29,13 +30,13 @@ partial class DefaultBinder : Binder // The most specific match will be selected. // public sealed override MethodBase BindToMethod( - BindingFlags bindingAttr, MethodBase[] match, ref object[] args, - ParameterModifier[] modifiers, CultureInfo cultureInfo, string[] names, out object state) + BindingFlags bindingAttr, MethodBase[] match, ref object?[] args, + ParameterModifier[]? modifiers, CultureInfo? cultureInfo, string[]? names, out object? state) { if (match == null || match.Length == 0) throw new ArgumentException(SR.Arg_EmptyArray, nameof(match)); - MethodBase[] candidates = (MethodBase[])match.Clone(); + MethodBase?[] candidates = (MethodBase[])match.Clone(); int i; int j; @@ -52,7 +53,7 @@ public sealed override MethodBase BindToMethod( for (i = 0; i < candidates.Length; i++) { - ParameterInfo[] par = candidates[i].GetParametersNoCopy(); + ParameterInfo[] par = candidates[i]!.GetParametersNoCopy(); // args.Length + 1 takes into account the possibility of a last paramArray that can be omitted paramOrder[i] = new int[(par.Length > args.Length) ? par.Length : args.Length]; @@ -84,7 +85,7 @@ public sealed override MethodBase BindToMethod( { if (args[i] != null) { - argTypes[i] = args[i].GetType(); + argTypes[i] = args[i]!.GetType(); //TODO-NULLABLE https://github.com/dotnet/csharplang/issues/2388 } } #endregion @@ -94,7 +95,7 @@ public sealed override MethodBase BindToMethod( int CurIdx = 0; bool defaultValueBinding = ((bindingAttr & BindingFlags.OptionalParamBinding) != 0); - Type paramArrayType = null; + Type? paramArrayType; #region Filter methods by parameter count and type for (i = 0; i < candidates.Length; i++) @@ -106,7 +107,7 @@ public sealed override MethodBase BindToMethod( continue; // Validate the parameters. - ParameterInfo[] par = candidates[i].GetParametersNoCopy(); + ParameterInfo[] par = candidates[i]!.GetParametersNoCopy(); // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/34644 #region Match method by parameter count if (par.Length == 0) @@ -114,7 +115,7 @@ public sealed override MethodBase BindToMethod( #region No formal parameters if (args.Length != 0) { - if ((candidates[i].CallingConvention & CallingConventions.VarArgs) == 0) + if ((candidates[i]!.CallingConvention & CallingConventions.VarArgs) == 0) // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/34644 continue; } @@ -185,7 +186,7 @@ public sealed override MethodBase BindToMethod( } #endregion - Type pCls = null; + Type pCls; int argsToCheck = (paramArrayType != null) ? par.Length - 1 : args.Length; #region Match method by parameter type @@ -196,7 +197,7 @@ public sealed override MethodBase BindToMethod( pCls = par[j].ParameterType; if (pCls.IsByRef) - pCls = pCls.GetElementType(); + pCls = pCls.GetElementType()!; // the type is the same if (pCls == argTypes[paramOrder[i][j]]) @@ -217,7 +218,7 @@ public sealed override MethodBase BindToMethod( // now do a "classic" type check if (pCls.IsPrimitive) { - if (argTypes[paramOrder[i][j]] == null || !CanChangePrimitive(args[paramOrder[i][j]].GetType(), pCls)) + if (argTypes[paramOrder[i][j]] == null || !CanChangePrimitive(args[paramOrder[i][j]]!.GetType(), pCls)) //TODO-NULLABLE https://github.com/dotnet/csharplang/issues/2388 { break; } @@ -247,7 +248,7 @@ public sealed override MethodBase BindToMethod( { if (paramArrayType.IsPrimitive) { - if (argTypes[j] == null || !CanChangePrimitive(args[j]?.GetType(), paramArrayType)) + if (argTypes[j] == null || !CanChangePrimitive(args[j]?.GetType(), paramArrayType)) //TODO-NULLABLE https://github.com/dotnet/csharplang/issues/2388 break; } else @@ -275,7 +276,7 @@ public sealed override MethodBase BindToMethod( { #region This is a valid routine so we move it up the candidates list paramOrder[CurIdx] = paramOrder[i]; - paramArrayTypes[CurIdx] = paramArrayType; + paramArrayTypes[CurIdx] = paramArrayType!; candidates[CurIdx++] = candidates[i]; #endregion } @@ -297,7 +298,7 @@ public sealed override MethodBase BindToMethod( // If the parameters and the args are not the same length or there is a paramArray // then we need to create a argument array. - ParameterInfo[] parms = candidates[0].GetParametersNoCopy(); + ParameterInfo[] parms = candidates[0]!.GetParametersNoCopy(); if (parms.Length == args.Length) { @@ -313,7 +314,7 @@ public sealed override MethodBase BindToMethod( } else if (parms.Length > args.Length) { - object[] objs = new object[parms.Length]; + object?[] objs = new object[parms.Length]; for (i = 0; i < args.Length; i++) objs[i] = args[i]; @@ -331,7 +332,7 @@ public sealed override MethodBase BindToMethod( } else { - if ((candidates[0].CallingConvention & CallingConventions.VarArgs) == 0) + if ((candidates[0]!.CallingConvention & CallingConventions.VarArgs) == 0) { object[] objs = new object[parms.Length]; int paramArrayPos = parms.Length - 1; @@ -343,7 +344,7 @@ public sealed override MethodBase BindToMethod( } #endregion - return candidates[0]; + return candidates[0]!; } int currentMin = 0; @@ -351,8 +352,8 @@ public sealed override MethodBase BindToMethod( for (i = 1; i < CurIdx; i++) { #region Walk all of the methods looking the most specific method to invoke - int newMin = FindMostSpecificMethod(candidates[currentMin], paramOrder[currentMin], paramArrayTypes[currentMin], - candidates[i], paramOrder[i], paramArrayTypes[i], argTypes, args); + int newMin = FindMostSpecificMethod(candidates[currentMin]!, paramOrder[currentMin], paramArrayTypes[currentMin], + candidates[i]!, paramOrder[i], paramArrayTypes[i], argTypes, args); if (newMin == 0) { @@ -378,7 +379,7 @@ public sealed override MethodBase BindToMethod( // If the parameters and the args are not the same length or there is a paramArray // then we need to create a argument array. - ParameterInfo[] parameters = candidates[currentMin].GetParametersNoCopy(); + ParameterInfo[] parameters = candidates[currentMin]!.GetParametersNoCopy(); if (parameters.Length == args.Length) { if (paramArrayTypes[currentMin] != null) @@ -393,7 +394,7 @@ public sealed override MethodBase BindToMethod( } else if (parameters.Length > args.Length) { - object[] objs = new object[parameters.Length]; + object?[] objs = new object[parameters.Length]; for (i = 0; i < args.Length; i++) objs[i] = args[i]; @@ -414,7 +415,7 @@ public sealed override MethodBase BindToMethod( } else { - if ((candidates[currentMin].CallingConvention & CallingConventions.VarArgs) == 0) + if ((candidates[currentMin]!.CallingConvention & CallingConventions.VarArgs) == 0) { object[] objs = new object[parameters.Length]; int paramArrayPos = parameters.Length - 1; @@ -425,13 +426,13 @@ public sealed override MethodBase BindToMethod( } } - return candidates[currentMin]; + return candidates[currentMin]!; } // Given a set of fields that match the base criteria, select a field. // if value is null then we have no way to select a field - public sealed override FieldInfo BindToField(BindingFlags bindingAttr, FieldInfo[] match, object value, CultureInfo cultureInfo) + public sealed override FieldInfo BindToField(BindingFlags bindingAttr, FieldInfo[] match, object value, CultureInfo? cultureInfo) { if (match == null) { @@ -442,7 +443,7 @@ public sealed override FieldInfo BindToField(BindingFlags bindingAttr, FieldInfo // Find the method that match... int CurIdx = 0; - Type valueType = null; + Type valueType; FieldInfo[] candidates = (FieldInfo[])match.Clone(); @@ -521,7 +522,7 @@ public sealed override FieldInfo BindToField(BindingFlags bindingAttr, FieldInfo // Given a set of methods that match the base criteria, select a method based // upon an array of types. This method should return null if no method matchs // the criteria. - public sealed override MethodBase SelectMethod(BindingFlags bindingAttr, MethodBase[] match, Type[] types, ParameterModifier[] modifiers) + public sealed override MethodBase? SelectMethod(BindingFlags bindingAttr, MethodBase[] match, Type[] types, ParameterModifier[]? modifiers) { int i; int j; @@ -557,7 +558,7 @@ public sealed override MethodBase SelectMethod(BindingFlags bindingAttr, MethodB if (pCls == typeof(object)) continue; - Type type = types[j]; + Type? type = types[j]; if (type is SignatureType signatureType) { if (!(candidates[i] is MethodInfo methodInfo)) @@ -614,8 +615,8 @@ public sealed override MethodBase SelectMethod(BindingFlags bindingAttr, MethodB } // Given a set of properties that match the base criteria, select one. - public sealed override PropertyInfo SelectProperty(BindingFlags bindingAttr, PropertyInfo[] match, Type returnType, - Type[] indexes, ParameterModifier[] modifiers) + public sealed override PropertyInfo? SelectProperty(BindingFlags bindingAttr, PropertyInfo[] match, Type? returnType, + Type[]? indexes, ParameterModifier[]? modifiers) { // Allow a null indexes array. But if it is not null, every element must be non-null as well. if (indexes != null) @@ -732,7 +733,7 @@ public sealed override PropertyInfo SelectProperty(BindingFlags bindingAttr, Pro // ChangeType // The default binder doesn't support any change type functionality. // This is because the default is built into the low level invoke code. - public override object ChangeType(object value, Type type, CultureInfo cultureInfo) + public override object ChangeType(object value, Type type, CultureInfo? cultureInfo) { throw new NotSupportedException(SR.NotSupported_ChangeType); } @@ -771,7 +772,7 @@ public sealed override void ReorderArgumentArray(ref object[] args, object state // Return any exact bindings that may exist. (This method is not defined on the // Binder and is used by RuntimeType.) - public static MethodBase ExactBinding(MethodBase[] match, Type[] types, ParameterModifier[] modifiers) + public static MethodBase? ExactBinding(MethodBase[] match, Type[] types, ParameterModifier[]? modifiers) { if (match == null) throw new ArgumentNullException(nameof(match)); @@ -814,12 +815,12 @@ public static MethodBase ExactBinding(MethodBase[] match, Type[] types, Paramete // Return any exact bindings that may exist. (This method is not defined on the // Binder and is used by RuntimeType.) - public static PropertyInfo ExactPropertyBinding(PropertyInfo[] match, Type returnType, Type[] types, ParameterModifier[] modifiers) + public static PropertyInfo? ExactPropertyBinding(PropertyInfo[] match, Type? returnType, Type[]? types, ParameterModifier[]? modifiers) { if (match == null) throw new ArgumentNullException(nameof(match)); - PropertyInfo bestMatch = null; + PropertyInfo? bestMatch = null; int typesLength = (types != null) ? types.Length : 0; for (int i = 0; i < match.Length; i++) { @@ -830,7 +831,7 @@ public static PropertyInfo ExactPropertyBinding(PropertyInfo[] match, Type retur Type pCls = par[j].ParameterType; // If the classes exactly match continue - if (pCls != types[j]) + if (pCls != types![j]) break; } if (j < typesLength) @@ -846,9 +847,9 @@ public static PropertyInfo ExactPropertyBinding(PropertyInfo[] match, Type retur return bestMatch; } - private static int FindMostSpecific(ParameterInfo[] p1, int[] paramOrder1, Type paramArrayType1, - ParameterInfo[] p2, int[] paramOrder2, Type paramArrayType2, - Type[] types, object[] args) + private static int FindMostSpecific(ParameterInfo[] p1, int[] paramOrder1, Type? paramArrayType1, + ParameterInfo[] p2, int[] paramOrder2, Type? paramArrayType2, + Type[] types, object?[]? args) { // A method using params is always less specific than one not using params if (paramArrayType1 != null && paramArrayType2 == null) return 2; @@ -923,7 +924,7 @@ private static int FindMostSpecific(ParameterInfo[] p1, int[] paramOrder1, Type } } - private static int FindMostSpecificType(Type c1, Type c2, Type t) + private static int FindMostSpecificType(Type c1, Type c2, Type? t) { // If the two types are exact move on... if (c1 == c2) @@ -953,22 +954,22 @@ private static int FindMostSpecificType(Type c1, Type c2, Type t) { if (c1.IsByRef && c2.IsByRef) { - c1 = c1.GetElementType(); - c2 = c2.GetElementType(); + c1 = c1.GetElementType()!; + c2 = c2.GetElementType()!; } else if (c1.IsByRef) { if (c1.GetElementType() == c2) return 2; - c1 = c1.GetElementType(); + c1 = c1.GetElementType()!; } - else + else // if (c2.IsByRef) { if (c2.GetElementType() == c1) return 1; - c2 = c2.GetElementType(); + c2 = c2.GetElementType()!; } } @@ -997,9 +998,9 @@ private static int FindMostSpecificType(Type c1, Type c2, Type t) } } - private static int FindMostSpecificMethod(MethodBase m1, int[] paramOrder1, Type paramArrayType1, - MethodBase m2, int[] paramOrder2, Type paramArrayType2, - Type[] types, object[] args) + private static int FindMostSpecificMethod(MethodBase m1, int[] paramOrder1, Type? paramArrayType1, + MethodBase m2, int[] paramOrder2, Type? paramArrayType2, + Type[] types, object?[]? args) { // Find the most specific method based on the parameters. int res = FindMostSpecific(m1.GetParametersNoCopy(), paramOrder1, paramArrayType1, @@ -1013,8 +1014,8 @@ private static int FindMostSpecificMethod(MethodBase m1, int[] paramOrder1, Type if (CompareMethodSig(m1, m2)) { // Determine the depth of the declaring types for both methods. - int hierarchyDepth1 = GetHierarchyDepth(m1.DeclaringType); - int hierarchyDepth2 = GetHierarchyDepth(m2.DeclaringType); + int hierarchyDepth1 = GetHierarchyDepth(m1.DeclaringType!); + int hierarchyDepth2 = GetHierarchyDepth(m2.DeclaringType!); // The most derived method is the most specific one. if (hierarchyDepth1 == hierarchyDepth2) @@ -1040,8 +1041,8 @@ private static int FindMostSpecificField(FieldInfo cur1, FieldInfo cur2) // Check to see if the fields have the same name. if (cur1.Name == cur2.Name) { - int hierarchyDepth1 = GetHierarchyDepth(cur1.DeclaringType); - int hierarchyDepth2 = GetHierarchyDepth(cur2.DeclaringType); + int hierarchyDepth1 = GetHierarchyDepth(cur1.DeclaringType!); + int hierarchyDepth2 = GetHierarchyDepth(cur2.DeclaringType!); if (hierarchyDepth1 == hierarchyDepth2) { @@ -1063,8 +1064,8 @@ private static int FindMostSpecificProperty(PropertyInfo cur1, PropertyInfo cur2 // Check to see if the fields have the same name. if (cur1.Name == cur2.Name) { - int hierarchyDepth1 = GetHierarchyDepth(cur1.DeclaringType); - int hierarchyDepth2 = GetHierarchyDepth(cur2.DeclaringType); + int hierarchyDepth1 = GetHierarchyDepth(cur1.DeclaringType!); + int hierarchyDepth2 = GetHierarchyDepth(cur2.DeclaringType!); if (hierarchyDepth1 == hierarchyDepth2) { @@ -1102,7 +1103,7 @@ private static int GetHierarchyDepth(Type t) { int depth = 0; - Type currentType = t; + Type? currentType = t; do { depth++; @@ -1112,16 +1113,16 @@ private static int GetHierarchyDepth(Type t) return depth; } - internal static MethodBase FindMostDerivedNewSlotMeth(MethodBase[] match, int cMatches) + internal static MethodBase? FindMostDerivedNewSlotMeth(MethodBase[] match, int cMatches) { int deepestHierarchy = 0; - MethodBase methWithDeepestHierarchy = null; + MethodBase? methWithDeepestHierarchy = null; for (int i = 0; i < cMatches; i++) { // Calculate the depth of the hierarchy of the declaring type of the // current method. - int currentHierarchyDepth = GetHierarchyDepth(match[i].DeclaringType); + int currentHierarchyDepth = GetHierarchyDepth(match[i].DeclaringType!); // The two methods have the same name, signature, and hierarchy depth. // This can only happen if at least one is vararg or generic. @@ -1143,9 +1144,9 @@ internal static MethodBase FindMostDerivedNewSlotMeth(MethodBase[] match, int cM // This method will sort the vars array into the mapping order stored // in the paramOrder array. - private static void ReorderParams(int[] paramOrder, object[] vars) + private static void ReorderParams(int[] paramOrder, object?[] vars) { - object[] varsCopy = new object[vars.Length]; + object?[] varsCopy = new object[vars.Length]; for (int i = 0; i < vars.Length; i++) varsCopy[i] = vars[i]; diff --git a/src/Common/src/CoreLib/System/Diagnostics/StackTrace.cs b/src/Common/src/CoreLib/System/Diagnostics/StackTrace.cs index fccd9e1cf069..7b32f063f571 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/StackTrace.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/StackTrace.cs @@ -236,7 +236,7 @@ internal string ToString(TraceFormat traceFormat) if (declaringType != null) { // Append t.FullName, replacing '+' with '.' - string fullName = declaringType.FullName; + string fullName = declaringType.FullName!; for (int i = 0; i < fullName.Length; i++) { char ch = fullName[i]; @@ -386,7 +386,7 @@ private static bool TryResolveStateMachineMethod(ref MethodBase method, out Type // of the original method. Non-iterator async state machines resolve directly to their builder methods // so aren't marked as changed. method = candidateMethod; - declaringType = candidateMethod.DeclaringType; + declaringType = candidateMethod.DeclaringType!; return foundIteratorAttribute; } } diff --git a/src/Common/src/CoreLib/System/Diagnostics/Tracing/EventSource.cs b/src/Common/src/CoreLib/System/Diagnostics/Tracing/EventSource.cs index 5a6625704403..c0416fcb2cbf 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/Tracing/EventSource.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/Tracing/EventSource.cs @@ -3078,7 +3078,7 @@ internal static Attribute GetCustomAttributeHelper(Type type, Type attributeType #if (!ES_BUILD_PCL && !ES_BUILD_PN) // In the reflection only context, we have to do things by hand. - string fullTypeNameToFind = attributeType.FullName; + string fullTypeNameToFind = attributeType.FullName!; #if EVENT_SOURCE_LEGACY_NAMESPACE_SUPPORT fullTypeNameToFind = fullTypeNameToFind.Replace("System.Diagnostics.Eventing", "System.Diagnostics.Tracing"); @@ -3086,7 +3086,7 @@ internal static Attribute GetCustomAttributeHelper(Type type, Type attributeType foreach (CustomAttributeData data in CustomAttributeData.GetCustomAttributes(member)) { - if (AttributeTypeNamesMatch(attributeType, data.Constructor.ReflectedType)) + if (AttributeTypeNamesMatch(attributeType, data.Constructor.ReflectedType!)) { Attribute? attr = null; @@ -3094,7 +3094,7 @@ internal static Attribute GetCustomAttributeHelper(Type type, Type attributeType if (data.ConstructorArguments.Count == 1) { - attr = (Attribute?)Activator.CreateInstance(attributeType, new object[] { data.ConstructorArguments[0].Value }); + attr = (Attribute?)Activator.CreateInstance(attributeType, new object?[] { data.ConstructorArguments[0].Value }); } else if (data.ConstructorArguments.Count == 0) { @@ -3107,8 +3107,8 @@ internal static Attribute GetCustomAttributeHelper(Type type, Type attributeType foreach (CustomAttributeNamedArgument namedArgument in data.NamedArguments) { - PropertyInfo p = t.GetProperty(namedArgument.MemberInfo.Name, BindingFlags.Public | BindingFlags.Instance); - object value = namedArgument.TypedValue.Value; + PropertyInfo p = t.GetProperty(namedArgument.MemberInfo.Name, BindingFlags.Public | BindingFlags.Instance)!; // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + object value = namedArgument.TypedValue.Value!; if (p.PropertyType.IsEnum) { @@ -3150,8 +3150,8 @@ private static bool AttributeTypeNamesMatch(Type attributeType, Type reflectedAt // are the typenames equal and the namespaces under "Diagnostics.Tracing" (typically // either Microsoft.Diagnostics.Tracing or System.Diagnostics.Tracing)? string.Equals(attributeType.Name, reflectedAttributeType.Name, StringComparison.Ordinal) && - attributeType.Namespace.EndsWith("Diagnostics.Tracing", StringComparison.Ordinal) && - (reflectedAttributeType.Namespace.EndsWith("Diagnostics.Tracing", StringComparison.Ordinal) + attributeType.Namespace!.EndsWith("Diagnostics.Tracing", StringComparison.Ordinal) && + (reflectedAttributeType.Namespace!.EndsWith("Diagnostics.Tracing", StringComparison.Ordinal) #if EVENT_SOURCE_LEGACY_NAMESPACE_SUPPORT || reflectedAttributeType.Namespace.EndsWith("Diagnostics.Eventing", StringComparison.Ordinal) #endif @@ -3261,7 +3261,7 @@ private static bool AttributeTypeNamesMatch(Type attributeType, Type reflectedAt foreach (var providerEnumKind in new string[] { "Keywords", "Tasks", "Opcodes" }) #endif { - Type nestedType = eventSourceType.GetNestedType(providerEnumKind); + Type? nestedType = eventSourceType.GetNestedType(providerEnumKind); if (nestedType != null) { if (eventSourceType.IsAbstract()) @@ -3412,7 +3412,7 @@ private static bool AttributeTypeNamesMatch(Type attributeType, Type reflectedAt manifest.StartEvent(eventName, eventAttribute); for (int fieldIdx = 0; fieldIdx < args.Length; fieldIdx++) { - manifest.AddEventParameter(args[fieldIdx].ParameterType, args[fieldIdx].Name); + manifest.AddEventParameter(args[fieldIdx].ParameterType, args[fieldIdx].Name!); } manifest.EndEvent(); } @@ -3739,7 +3739,7 @@ private static int GetHelperCallFirstArg(MethodInfo method) #if ES_BUILD_STANDALONE (new ReflectionPermission(ReflectionPermissionFlag.MemberAccess)).Assert(); #endif - byte[] instrs = method.GetMethodBody().GetILAsByteArray(); + byte[] instrs = method.GetMethodBody().GetILAsByteArray()!; int retVal = -1; for (int idx = 0; idx < instrs.Length;) { @@ -4799,7 +4799,7 @@ public ReadOnlyCollection? PayloadNames Debug.Assert(m_eventSource.m_eventData != null); foreach (var parameter in m_eventSource.m_eventData[EventId].Parameters) { - names.Add(parameter.Name); + names.Add(parameter.Name!); } m_payloadNames = new ReadOnlyCollection(names); diff --git a/src/Common/src/CoreLib/System/Diagnostics/Tracing/StubEnvironment.cs b/src/Common/src/CoreLib/System/Diagnostics/Tracing/StubEnvironment.cs index 7487c0f04318..63e975c1d0d2 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/Tracing/StubEnvironment.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/Tracing/StubEnvironment.cs @@ -221,7 +221,7 @@ static class ReflectionExtensions public static bool IsSealed(this Type type) { return type.IsSealed; } public static bool IsValueType(this Type type) { return type.IsValueType; } public static bool IsGenericType(this Type type) { return type.IsGenericType; } - public static Type BaseType(this Type type) { return type.BaseType; } + public static Type? BaseType(this Type type) { return type.BaseType; } public static Assembly Assembly(this Type type) { return type.Assembly; } public static TypeCode GetTypeCode(this Type type) { return Type.GetTypeCode(type); } diff --git a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/PropertyValue.cs b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/PropertyValue.cs index 35fe7609f188..0b3c67f79556 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/PropertyValue.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/PropertyValue.cs @@ -176,7 +176,7 @@ public int ScalarLength /// public static Func GetPropertyGetter(PropertyInfo property) { - if (property.DeclaringType.GetTypeInfo().IsValueType) + if (property.DeclaringType!.GetTypeInfo().IsValueType) return GetBoxedValueTypePropertyGetter(property); else return GetReferenceTypePropertyGetter(property); @@ -209,7 +209,7 @@ private static Func GetBoxedValueTypePropertyGette /// private static Func GetReferenceTypePropertyGetter(PropertyInfo property) { - var helper = (TypeHelper)Activator.CreateInstance(typeof(ReferenceTypeHelper<>).MakeGenericType(property.DeclaringType))!; + var helper = (TypeHelper)Activator.CreateInstance(typeof(ReferenceTypeHelper<>).MakeGenericType(property.DeclaringType!))!; return helper.GetPropertyGetter(property); } @@ -224,7 +224,7 @@ abstract class TypeHelper protected Delegate GetGetMethod(PropertyInfo property, Type propertyType) { - return property.GetMethod.CreateDelegate(typeof(Func<,>).MakeGenericType(property.DeclaringType, propertyType)); + return property.GetMethod!.CreateDelegate(typeof(Func<,>).MakeGenericType(property.DeclaringType!, propertyType)); } } diff --git a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/SimpleTypeInfos.cs b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/SimpleTypeInfos.cs index dc8be3e4d363..aaa0a30d9387 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/SimpleTypeInfos.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/SimpleTypeInfos.cs @@ -278,7 +278,7 @@ public NullableTypeInfo(Type type, List recursionCheck) var typeArgs = type.GenericTypeArguments; Debug.Assert(typeArgs.Length == 1); this.valueInfo = TraceLoggingTypeInfo.GetInstance(typeArgs[0], recursionCheck); - this.valueGetter = PropertyValue.GetPropertyGetter(type.GetTypeInfo().GetDeclaredProperty("Value")); + this.valueGetter = PropertyValue.GetPropertyGetter(type.GetTypeInfo().GetDeclaredProperty("Value")!); } public override void WriteMetadata( diff --git a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/Statics.cs b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/Statics.cs index 56d53c1d189c..8fa50ac12820 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/Statics.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/Statics.cs @@ -387,15 +387,15 @@ public static IEnumerable GetProperties(Type type) return result; } - public static MethodInfo GetGetMethod(PropertyInfo propInfo) + public static MethodInfo? GetGetMethod(PropertyInfo propInfo) { - MethodInfo result = propInfo.GetGetMethod(); + MethodInfo? result = propInfo.GetGetMethod(); return result; } - public static MethodInfo GetDeclaredStaticMethod(Type declaringType, string name) + public static MethodInfo? GetDeclaredStaticMethod(Type declaringType, string name) { - MethodInfo result; + MethodInfo? result; #if (ES_BUILD_PCL || ES_BUILD_PN) result = declaringType.GetTypeInfo().GetDeclaredMethod(name); #else @@ -506,9 +506,9 @@ public static Type[] GetGenericArguments(Type type) return elementType; } - public static bool IsGenericMatch(Type type, object openType) + public static bool IsGenericMatch(Type type, object? openType) { - return type.IsGenericType() && type.GetGenericTypeDefinition() == (Type)openType; + return type.IsGenericType() && type.GetGenericTypeDefinition() == (Type?)openType; } public static Delegate CreateDelegate(Type delegateType, MethodInfo methodInfo) @@ -548,7 +548,7 @@ public static TraceLoggingTypeInfo CreateDefaultTypeInfo( } else if (dataType.IsArray) { - var elementType = dataType.GetElementType(); + Type elementType = dataType.GetElementType()!; if (elementType == typeof(bool)) { result = ScalarArrayTypeInfo.Boolean(); diff --git a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/TraceLoggingEventTypes.cs b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/TraceLoggingEventTypes.cs index d894acbb7550..8963f5b91c51 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/TraceLoggingEventTypes.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/TraceLoggingEventTypes.cs @@ -115,7 +115,7 @@ internal TraceLoggingEventTypes( this.opcode = Statics.Combine((int)typeInfo.Opcode, this.opcode); this.keywords |= typeInfo.Keywords; var paramName = paramInfos[i].Name; - if (Statics.ShouldOverrideFieldName(paramName)) + if (Statics.ShouldOverrideFieldName(paramName!)) { paramName = typeInfo.Name; } @@ -261,7 +261,7 @@ private static string[] MakeParamNameArray( string[] paramNames = new string[paramInfos.Length]; for (int i = 0; i < paramNames.Length; i++) { - paramNames[i] = paramInfos[i].Name; + paramNames[i] = paramInfos[i].Name!; } return paramNames; diff --git a/src/Common/src/CoreLib/System/Environment.Unix.cs b/src/Common/src/CoreLib/System/Environment.Unix.cs index d74086b0fc4c..8f5fede529f4 100644 --- a/src/Common/src/CoreLib/System/Environment.Unix.cs +++ b/src/Common/src/CoreLib/System/Environment.Unix.cs @@ -79,8 +79,8 @@ private static string GetFolderPathCore(SpecialFolder folder, SpecialFolderOptio // TODO #11151: Replace with Directory.CreateDirectory once we have access to System.IO.FileSystem here. Func createDirectory = LazyInitializer.EnsureInitialized(ref s_directoryCreateDirectory, () => { - Type dirType = Type.GetType("System.IO.Directory, System.IO.FileSystem, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", throwOnError: true); - MethodInfo mi = dirType.GetTypeInfo().GetDeclaredMethod("CreateDirectory"); + Type dirType = Type.GetType("System.IO.Directory, System.IO.FileSystem, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", throwOnError: true)!; + MethodInfo mi = dirType.GetTypeInfo().GetDeclaredMethod("CreateDirectory")!; return (Func)mi.CreateDelegate(typeof(Func)); })!; // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 createDirectory(path); diff --git a/src/Common/src/CoreLib/System/Environment.Win32.cs b/src/Common/src/CoreLib/System/Environment.Win32.cs index bc32146cf9d6..2f2777363206 100644 --- a/src/Common/src/CoreLib/System/Environment.Win32.cs +++ b/src/Common/src/CoreLib/System/Environment.Win32.cs @@ -411,7 +411,7 @@ public static string GetFolderPath(SpecialFolder folder, SpecialFolderOption opt { if (s_winRTFolderPathsGetFolderPath == null) { - Type winRtFolderPathsType = Type.GetType("System.WinRTFolderPaths, System.Runtime.WindowsRuntime, Version=4.0.14.0, Culture=neutral, PublicKeyToken=b77a5c561934e089", throwOnError: false); + Type? winRtFolderPathsType = Type.GetType("System.WinRTFolderPaths, System.Runtime.WindowsRuntime, Version=4.0.14.0, Culture=neutral, PublicKeyToken=b77a5c561934e089", throwOnError: false); MethodInfo? getFolderPathsMethod = winRtFolderPathsType?.GetMethod("GetFolderPath", BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static, null, new Type[] { typeof(SpecialFolder), typeof(SpecialFolderOption) }, null); var d = (Func?)getFolderPathsMethod?.CreateDelegate(typeof(Func)); s_winRTFolderPathsGetFolderPath = d ?? delegate { return string.Empty; }; diff --git a/src/Common/src/CoreLib/System/Environment.cs b/src/Common/src/CoreLib/System/Environment.cs index 3691c0de2b7e..6e9a6bcf6dcb 100644 --- a/src/Common/src/CoreLib/System/Environment.cs +++ b/src/Common/src/CoreLib/System/Environment.cs @@ -162,7 +162,7 @@ public static long WorkingSet // we do this to avoid duplicating the Windows, Linux, macOS, and potentially other platform-specific implementations // present in Process. If it proves important, we could look at separating that functionality out of Process into // Common files which could also be included here. - Type processType = Type.GetType("System.Diagnostics.Process, System.Diagnostics.Process, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", throwOnError: false); + Type? processType = Type.GetType("System.Diagnostics.Process, System.Diagnostics.Process, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", throwOnError: false); IDisposable? currentProcess = processType?.GetMethod("GetCurrentProcess")?.Invoke(null, BindingFlags.DoNotWrapExceptions, null, null, null) as IDisposable; if (currentProcess != null) { diff --git a/src/Common/src/CoreLib/System/Reflection/Assembly.cs b/src/Common/src/CoreLib/System/Reflection/Assembly.cs index 4722ed3fc9e7..bb3dc2117a06 100644 --- a/src/Common/src/CoreLib/System/Reflection/Assembly.cs +++ b/src/Common/src/CoreLib/System/Reflection/Assembly.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable using System.IO; using System.Globalization; using System.Collections.Generic; @@ -73,19 +74,19 @@ public virtual Type[] GetTypes() public virtual Type[] GetExportedTypes() { throw NotImplemented.ByDesign; } public virtual Type[] GetForwardedTypes() { throw NotImplemented.ByDesign; } - public virtual string CodeBase { get { throw NotImplemented.ByDesign; } } - public virtual MethodInfo EntryPoint { get { throw NotImplemented.ByDesign; } } - public virtual string FullName { get { throw NotImplemented.ByDesign; } } + public virtual string? CodeBase { get { throw NotImplemented.ByDesign; } } + public virtual MethodInfo? EntryPoint { get { throw NotImplemented.ByDesign; } } + public virtual string? FullName { get { throw NotImplemented.ByDesign; } } public virtual string ImageRuntimeVersion { get { throw NotImplemented.ByDesign; } } public virtual bool IsDynamic => false; public virtual string Location { get { throw NotImplemented.ByDesign; } } public virtual bool ReflectionOnly { get { throw NotImplemented.ByDesign; } } public virtual bool IsCollectible => true; - public virtual ManifestResourceInfo GetManifestResourceInfo(string resourceName) { throw NotImplemented.ByDesign; } + public virtual ManifestResourceInfo? GetManifestResourceInfo(string resourceName) { throw NotImplemented.ByDesign; } public virtual string[] GetManifestResourceNames() { throw NotImplemented.ByDesign; } - public virtual Stream GetManifestResourceStream(string name) { throw NotImplemented.ByDesign; } - public virtual Stream GetManifestResourceStream(Type type, string name) { throw NotImplemented.ByDesign; } + public virtual Stream? GetManifestResourceStream(string name) { throw NotImplemented.ByDesign; } + public virtual Stream? GetManifestResourceStream(Type type, string name) { throw NotImplemented.ByDesign; } public bool IsFullyTrusted => true; @@ -106,9 +107,9 @@ public virtual Type[] GetTypes() public virtual string EscapedCodeBase => AssemblyName.EscapeCodeBase(CodeBase); - public object CreateInstance(string typeName) => CreateInstance(typeName, false, BindingFlags.Public | BindingFlags.Instance, binder: null, args: null, culture: null, activationAttributes: null); - public object CreateInstance(string typeName, bool ignoreCase) => CreateInstance(typeName, ignoreCase, BindingFlags.Public | BindingFlags.Instance, binder: null, args: null, culture: null, activationAttributes: null); - public virtual object CreateInstance(string typeName, bool ignoreCase, BindingFlags bindingAttr, Binder binder, object[] args, CultureInfo culture, object[] activationAttributes) + public object? CreateInstance(string typeName) => CreateInstance(typeName, false, BindingFlags.Public | BindingFlags.Instance, binder: null, args: null, culture: null, activationAttributes: null); + public object? CreateInstance(string typeName, bool ignoreCase) => CreateInstance(typeName, ignoreCase, BindingFlags.Public | BindingFlags.Instance, binder: null, args: null, culture: null, activationAttributes: null); + public virtual object? CreateInstance(string typeName, bool ignoreCase, BindingFlags bindingAttr, Binder? binder, object[]? args, CultureInfo? culture, object[]? activationAttributes) { Type t = GetType(typeName, throwOnError: false, ignoreCase: ignoreCase); if (t == null) @@ -119,7 +120,7 @@ public virtual object CreateInstance(string typeName, bool ignoreCase, BindingFl public virtual event ModuleResolveEventHandler ModuleResolve { add { throw NotImplemented.ByDesign; } remove { throw NotImplemented.ByDesign; } } - public virtual Module ManifestModule { get { throw NotImplemented.ByDesign; } } + public virtual Module? ManifestModule { get { throw NotImplemented.ByDesign; } } public virtual Module GetModule(string name) { throw NotImplemented.ByDesign; } public Module[] GetModules() => GetModules(getResourceModules: false); @@ -132,17 +133,17 @@ public virtual object CreateInstance(string typeName, bool ignoreCase, BindingFl public virtual AssemblyName[] GetReferencedAssemblies() { throw NotImplemented.ByDesign; } public virtual Assembly GetSatelliteAssembly(CultureInfo culture) { throw NotImplemented.ByDesign; } - public virtual Assembly GetSatelliteAssembly(CultureInfo culture, Version version) { throw NotImplemented.ByDesign; } + public virtual Assembly GetSatelliteAssembly(CultureInfo culture, Version? version) { throw NotImplemented.ByDesign; } - public virtual FileStream GetFile(string name) { throw NotImplemented.ByDesign; } + public virtual FileStream? GetFile(string name) { throw NotImplemented.ByDesign; } public virtual FileStream[] GetFiles() => GetFiles(getResourceModules: false); public virtual FileStream[] GetFiles(bool getResourceModules) { throw NotImplemented.ByDesign; } public virtual void GetObjectData(SerializationInfo info, StreamingContext context) { throw NotImplemented.ByDesign; } - public override string ToString() + public override string? ToString() { - string displayName = FullName; + string? displayName = FullName; if (displayName == null) return base.ToString(); else @@ -155,11 +156,11 @@ public override string ToString() public virtual bool GlobalAssemblyCache { get { throw NotImplemented.ByDesign; } } public virtual long HostContext { get { throw NotImplemented.ByDesign; } } - public override bool Equals(object o) => base.Equals(o); + public override bool Equals(object? o) => base.Equals(o); public override int GetHashCode() => base.GetHashCode(); [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static bool operator ==(Assembly left, Assembly right) + public static bool operator ==(Assembly? left, Assembly? right) { // Test "right" first to allow branch elimination when inlined for null checks (== null) // so it can become a simple test @@ -170,7 +171,7 @@ public override string ToString() } // Try fast reference equality and opposite null check prior to calling the slower virtual Equals - if ((object)left == (object)right) + if ((object?)left == (object)right) { return true; } @@ -178,14 +179,14 @@ public override string ToString() return (left is null) ? false : left.Equals(right); } - public static bool operator !=(Assembly left, Assembly right) + public static bool operator !=(Assembly? left, Assembly? right) { return !(left == right); } - public static string CreateQualifiedName(string assemblyName, string typeName) => typeName + ", " + assemblyName; + public static string CreateQualifiedName(string? assemblyName, string? typeName) => typeName + ", " + assemblyName; - public static Assembly GetAssembly(Type type) + public static Assembly? GetAssembly(Type type) { if (type == null) throw new ArgumentNullException(nameof(type)); @@ -202,7 +203,7 @@ public static Assembly GetAssembly(Type type) // Loads the assembly with a COFF based IMAGE containing // an emitted assembly. The assembly is loaded into a fully isolated ALC with resolution fully deferred to the AssemblyLoadContext.Default. // The second parameter is the raw bytes representing the symbol store that matches the assembly. - public static Assembly Load(byte[] rawAssembly, byte[] rawSymbolStore) + public static Assembly Load(byte[] rawAssembly, byte[]? rawSymbolStore) { if (rawAssembly == null) throw new ArgumentNullException(nameof(rawAssembly)); @@ -252,9 +253,9 @@ public static Assembly LoadFile(string path) return result; } - private static Assembly LoadFromResolveHandler(object sender, ResolveEventArgs args) + private static Assembly? LoadFromResolveHandler(object? sender, ResolveEventArgs args) { - Assembly requestingAssembly = args.RequestingAssembly; + Assembly? requestingAssembly = args.RequestingAssembly; if (requestingAssembly == null) { return null; @@ -281,8 +282,8 @@ private static Assembly LoadFromResolveHandler(object sender, ResolveEventArgs a // Requestor assembly was loaded using loadFrom, so look for its dependencies // in the same folder as it. // Form the name of the assembly using the path of the assembly that requested its load. - AssemblyName requestedAssemblyName = new AssemblyName(args.Name); - string requestedAssemblyPath = Path.Combine(Path.GetDirectoryName(requestorPath), requestedAssemblyName.Name + ".dll"); + AssemblyName requestedAssemblyName = new AssemblyName(args.Name!); + string requestedAssemblyPath = Path.Combine(Path.GetDirectoryName(requestorPath)!, requestedAssemblyName.Name + ".dll"); try { @@ -309,7 +310,7 @@ public static Assembly LoadFrom(string assemblyFile) { if (!s_loadFromHandlerSet) { - AssemblyLoadContext.AssemblyResolve += LoadFromResolveHandler; + AssemblyLoadContext.AssemblyResolve += LoadFromResolveHandler!; s_loadFromHandlerSet = true; } } @@ -328,19 +329,19 @@ public static Assembly LoadFrom(string assemblyFile) return AssemblyLoadContext.Default.LoadFromAssemblyPath(fullPath); } - public static Assembly LoadFrom(string assemblyFile, byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm) + public static Assembly LoadFrom(string? assemblyFile, byte[]? hashValue, AssemblyHashAlgorithm hashAlgorithm) { throw new NotSupportedException(SR.NotSupported_AssemblyLoadFromHash); } public static Assembly UnsafeLoadFrom(string assemblyFile) => LoadFrom(assemblyFile); - public Module LoadModule(string moduleName, byte[] rawModule) => LoadModule(moduleName, rawModule, null); - public virtual Module LoadModule(string moduleName, byte[] rawModule, byte[] rawSymbolStore) { throw NotImplemented.ByDesign; } + public Module LoadModule(string? moduleName, byte[]? rawModule) => LoadModule(moduleName, rawModule, null); + public virtual Module LoadModule(string? moduleName, byte[]? rawModule, byte[]? rawSymbolStore) { throw NotImplemented.ByDesign; } - public static Assembly ReflectionOnlyLoad(byte[] rawAssembly) { throw new PlatformNotSupportedException(SR.PlatformNotSupported_ReflectionOnly); } - public static Assembly ReflectionOnlyLoad(string assemblyString) { throw new PlatformNotSupportedException(SR.PlatformNotSupported_ReflectionOnly); } - public static Assembly ReflectionOnlyLoadFrom(string assemblyFile) { throw new PlatformNotSupportedException(SR.PlatformNotSupported_ReflectionOnly); } + public static Assembly ReflectionOnlyLoad(byte[]? rawAssembly) { throw new PlatformNotSupportedException(SR.PlatformNotSupported_ReflectionOnly); } + public static Assembly ReflectionOnlyLoad(string? assemblyString) { throw new PlatformNotSupportedException(SR.PlatformNotSupported_ReflectionOnly); } + public static Assembly ReflectionOnlyLoadFrom(string? assemblyFile) { throw new PlatformNotSupportedException(SR.PlatformNotSupported_ReflectionOnly); } public virtual SecurityRuleSet SecurityRuleSet => SecurityRuleSet.None; } diff --git a/src/Common/src/CoreLib/System/Reflection/AssemblyDefaultAliasAttribute.cs b/src/Common/src/CoreLib/System/Reflection/AssemblyDefaultAliasAttribute.cs index ced35ed3fd53..6a8e7c0aa63a 100644 --- a/src/Common/src/CoreLib/System/Reflection/AssemblyDefaultAliasAttribute.cs +++ b/src/Common/src/CoreLib/System/Reflection/AssemblyDefaultAliasAttribute.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable namespace System.Reflection { [AttributeUsage(AttributeTargets.Assembly, Inherited = false)] diff --git a/src/Common/src/CoreLib/System/Reflection/AssemblyNameFormatter.cs b/src/Common/src/CoreLib/System/Reflection/AssemblyNameFormatter.cs index 90ccd1fe5431..063dfc7a4bf2 100644 --- a/src/Common/src/CoreLib/System/Reflection/AssemblyNameFormatter.cs +++ b/src/Common/src/CoreLib/System/Reflection/AssemblyNameFormatter.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable using System.IO; using System.Text; using System.Globalization; @@ -11,7 +12,7 @@ namespace System.Reflection { internal static class AssemblyNameFormatter { - public static string ComputeDisplayName(string name, Version version, string cultureName, byte[] pkt, AssemblyNameFlags flags, AssemblyContentType contentType) + public static string ComputeDisplayName(string? name, Version? version, string? cultureName, byte[]? pkt, AssemblyNameFlags flags, AssemblyContentType contentType) { const int PUBLIC_KEY_TOKEN_LEN = 8; diff --git a/src/Common/src/CoreLib/System/Reflection/Binder.cs b/src/Common/src/CoreLib/System/Reflection/Binder.cs index 3dc5665d520f..03ff487c5b09 100644 --- a/src/Common/src/CoreLib/System/Reflection/Binder.cs +++ b/src/Common/src/CoreLib/System/Reflection/Binder.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable using System.Globalization; namespace System.Reflection @@ -9,11 +10,11 @@ namespace System.Reflection public abstract class Binder { protected Binder() { } - public abstract FieldInfo BindToField(BindingFlags bindingAttr, FieldInfo[] match, object value, CultureInfo culture); - public abstract MethodBase BindToMethod(BindingFlags bindingAttr, MethodBase[] match, ref object[] args, ParameterModifier[] modifiers, CultureInfo culture, string[] names, out object state); - public abstract object ChangeType(object value, Type type, CultureInfo culture); + public abstract FieldInfo BindToField(BindingFlags bindingAttr, FieldInfo[] match, object value, CultureInfo? culture); + public abstract MethodBase BindToMethod(BindingFlags bindingAttr, MethodBase[] match, ref object?[] args, ParameterModifier[]? modifiers, CultureInfo? culture, string[]? names, out object? state); + public abstract object ChangeType(object value, Type type, CultureInfo? culture); public abstract void ReorderArgumentArray(ref object[] args, object state); - public abstract MethodBase SelectMethod(BindingFlags bindingAttr, MethodBase[] match, Type[] types, ParameterModifier[] modifiers); - public abstract PropertyInfo SelectProperty(BindingFlags bindingAttr, PropertyInfo[] match, Type returnType, Type[] indexes, ParameterModifier[] modifiers); + public abstract MethodBase? SelectMethod(BindingFlags bindingAttr, MethodBase[] match, Type[] types, ParameterModifier[]? modifiers); + public abstract PropertyInfo? SelectProperty(BindingFlags bindingAttr, PropertyInfo[] match, Type? returnType, Type[]? indexes, ParameterModifier[]? modifiers); } } diff --git a/src/Common/src/CoreLib/System/Reflection/ConstructorInfo.cs b/src/Common/src/CoreLib/System/Reflection/ConstructorInfo.cs index 1e31194cfcad..57bbe3326f21 100644 --- a/src/Common/src/CoreLib/System/Reflection/ConstructorInfo.cs +++ b/src/Common/src/CoreLib/System/Reflection/ConstructorInfo.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable using System.Diagnostics; using System.Globalization; using System.Runtime.CompilerServices; @@ -16,14 +17,14 @@ protected ConstructorInfo() { } [DebuggerHidden] [DebuggerStepThrough] - public object Invoke(object[] parameters) => Invoke(BindingFlags.Default, binder: null, parameters: parameters, culture: null); - public abstract object Invoke(BindingFlags invokeAttr, Binder binder, object[] parameters, CultureInfo culture); + public object Invoke(object?[]? parameters) => Invoke(BindingFlags.Default, binder: null, parameters: parameters, culture: null); + public abstract object Invoke(BindingFlags invokeAttr, Binder? binder, object?[]? parameters, CultureInfo? culture); - public override bool Equals(object obj) => base.Equals(obj); + public override bool Equals(object? obj) => base.Equals(obj); public override int GetHashCode() => base.GetHashCode(); [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static bool operator ==(ConstructorInfo left, ConstructorInfo right) + public static bool operator ==(ConstructorInfo? left, ConstructorInfo? right) { // Test "right" first to allow branch elimination when inlined for null checks (== null) // so it can become a simple test @@ -34,7 +35,7 @@ protected ConstructorInfo() { } } // Try fast reference equality and opposite null check prior to calling the slower virtual Equals - if ((object)left == (object)right) + if ((object?)left == (object)right) { return true; } @@ -42,7 +43,7 @@ protected ConstructorInfo() { } return (left is null) ? false : left.Equals(right); } - public static bool operator !=(ConstructorInfo left, ConstructorInfo right) => !(left == right); + public static bool operator !=(ConstructorInfo? left, ConstructorInfo? right) => !(left == right); public static readonly string ConstructorName = ".ctor"; public static readonly string TypeConstructorName = ".cctor"; diff --git a/src/Common/src/CoreLib/System/Reflection/EventInfo.cs b/src/Common/src/CoreLib/System/Reflection/EventInfo.cs index fa7e49df24b1..f4e689d7e8d8 100644 --- a/src/Common/src/CoreLib/System/Reflection/EventInfo.cs +++ b/src/Common/src/CoreLib/System/Reflection/EventInfo.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable using System.Diagnostics; using System.Runtime.CompilerServices; @@ -23,33 +24,33 @@ protected EventInfo() { } public MethodInfo[] GetOtherMethods() => GetOtherMethods(nonPublic: false); public virtual MethodInfo[] GetOtherMethods(bool nonPublic) { throw NotImplemented.ByDesign; } - public virtual MethodInfo AddMethod => GetAddMethod(nonPublic: true); - public virtual MethodInfo RemoveMethod => GetRemoveMethod(nonPublic: true); - public virtual MethodInfo RaiseMethod => GetRaiseMethod(nonPublic: true); + public virtual MethodInfo? AddMethod => GetAddMethod(nonPublic: true); + public virtual MethodInfo? RemoveMethod => GetRemoveMethod(nonPublic: true); + public virtual MethodInfo? RaiseMethod => GetRaiseMethod(nonPublic: true); - public MethodInfo GetAddMethod() => GetAddMethod(nonPublic: false); - public MethodInfo GetRemoveMethod() => GetRemoveMethod(nonPublic: false); - public MethodInfo GetRaiseMethod() => GetRaiseMethod(nonPublic: false); + public MethodInfo? GetAddMethod() => GetAddMethod(nonPublic: false); + public MethodInfo? GetRemoveMethod() => GetRemoveMethod(nonPublic: false); + public MethodInfo? GetRaiseMethod() => GetRaiseMethod(nonPublic: false); - public abstract MethodInfo GetAddMethod(bool nonPublic); - public abstract MethodInfo GetRemoveMethod(bool nonPublic); - public abstract MethodInfo GetRaiseMethod(bool nonPublic); + public abstract MethodInfo? GetAddMethod(bool nonPublic); + public abstract MethodInfo? GetRemoveMethod(bool nonPublic); + public abstract MethodInfo? GetRaiseMethod(bool nonPublic); public virtual bool IsMulticast { get { - Type cl = EventHandlerType; + Type? cl = EventHandlerType; Type mc = typeof(MulticastDelegate); return mc.IsAssignableFrom(cl); } } - public virtual Type EventHandlerType + public virtual Type? EventHandlerType { get { - MethodInfo m = GetAddMethod(true); + MethodInfo m = GetAddMethod(true)!; ParameterInfo[] p = m.GetParametersNoCopy(); Type del = typeof(Delegate); for (int i = 0; i < p.Length; i++) @@ -64,9 +65,9 @@ public virtual Type EventHandlerType [DebuggerHidden] [DebuggerStepThrough] - public virtual void AddEventHandler(object target, Delegate handler) + public virtual void AddEventHandler(object? target, Delegate? handler) { - MethodInfo addMethod = GetAddMethod(nonPublic: false); + MethodInfo? addMethod = GetAddMethod(nonPublic: false); if (addMethod == null) throw new InvalidOperationException(SR.InvalidOperation_NoPublicAddMethod); @@ -76,14 +77,14 @@ public virtual void AddEventHandler(object target, Delegate handler) throw new InvalidOperationException(SR.InvalidOperation_NotSupportedOnWinRTEvent); #endif //#if FEATURE_COMINTEROP - addMethod.Invoke(target, new object[] { handler }); + addMethod.Invoke(target, new object?[] { handler }); } [DebuggerHidden] [DebuggerStepThrough] - public virtual void RemoveEventHandler(object target, Delegate handler) + public virtual void RemoveEventHandler(object? target, Delegate? handler) { - MethodInfo removeMethod = GetRemoveMethod(nonPublic: false); + MethodInfo? removeMethod = GetRemoveMethod(nonPublic: false); if (removeMethod == null) throw new InvalidOperationException(SR.InvalidOperation_NoPublicRemoveMethod); @@ -94,14 +95,14 @@ public virtual void RemoveEventHandler(object target, Delegate handler) throw new InvalidOperationException(SR.InvalidOperation_NotSupportedOnWinRTEvent); #endif //#if FEATURE_COMINTEROP - removeMethod.Invoke(target, new object[] { handler }); + removeMethod.Invoke(target, new object?[] { handler }); } - public override bool Equals(object obj) => base.Equals(obj); + public override bool Equals(object? obj) => base.Equals(obj); public override int GetHashCode() => base.GetHashCode(); [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static bool operator ==(EventInfo left, EventInfo right) + public static bool operator ==(EventInfo? left, EventInfo? right) { // Test "right" first to allow branch elimination when inlined for null checks (== null) // so it can become a simple test @@ -112,7 +113,7 @@ public virtual void RemoveEventHandler(object target, Delegate handler) } // Try fast reference equality and opposite null check prior to calling the slower virtual Equals - if ((object)left == (object)right) + if ((object?)left == (object)right) { return true; } @@ -120,6 +121,6 @@ public virtual void RemoveEventHandler(object target, Delegate handler) return (left is null) ? false : left.Equals(right); } - public static bool operator !=(EventInfo left, EventInfo right) => !(left == right); + public static bool operator !=(EventInfo? left, EventInfo? right) => !(left == right); } } diff --git a/src/Common/src/CoreLib/System/Reflection/FieldInfo.cs b/src/Common/src/CoreLib/System/Reflection/FieldInfo.cs index fd577b668dc8..a4875adb48ba 100644 --- a/src/Common/src/CoreLib/System/Reflection/FieldInfo.cs +++ b/src/Common/src/CoreLib/System/Reflection/FieldInfo.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable using System.Diagnostics; using System.Globalization; using System.Runtime.CompilerServices; @@ -37,11 +38,11 @@ protected FieldInfo() { } public abstract RuntimeFieldHandle FieldHandle { get; } - public override bool Equals(object obj) => base.Equals(obj); + public override bool Equals(object? obj) => base.Equals(obj); public override int GetHashCode() => base.GetHashCode(); [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static bool operator ==(FieldInfo left, FieldInfo right) + public static bool operator ==(FieldInfo? left, FieldInfo? right) { // Test "right" first to allow branch elimination when inlined for null checks (== null) // so it can become a simple test @@ -52,7 +53,7 @@ protected FieldInfo() { } } // Try fast reference equality and opposite null check prior to calling the slower virtual Equals - if ((object)left == (object)right) + if ((object?)left == (object)right) { return true; } @@ -60,14 +61,14 @@ protected FieldInfo() { } return (left is null) ? false : left.Equals(right); } - public static bool operator !=(FieldInfo left, FieldInfo right) => !(left == right); + public static bool operator !=(FieldInfo? left, FieldInfo? right) => !(left == right); - public abstract object GetValue(object obj); + public abstract object? GetValue(object? obj); [DebuggerHidden] [DebuggerStepThrough] - public void SetValue(object obj, object value) => SetValue(obj, value, BindingFlags.Default, Type.DefaultBinder, null); - public abstract void SetValue(object obj, object value, BindingFlags invokeAttr, Binder binder, CultureInfo culture); + public void SetValue(object? obj, object value) => SetValue(obj, value, BindingFlags.Default, Type.DefaultBinder, null); + public abstract void SetValue(object? obj, object? value, BindingFlags invokeAttr, Binder? binder, CultureInfo? culture); [CLSCompliant(false)] public virtual void SetValueDirect(TypedReference obj, object value) { throw new NotSupportedException(SR.NotSupported_AbstractNonCLS); } diff --git a/src/Common/src/CoreLib/System/Reflection/ICustomAttributeProvider.cs b/src/Common/src/CoreLib/System/Reflection/ICustomAttributeProvider.cs index 3cae295bc49a..660765cd8cfe 100644 --- a/src/Common/src/CoreLib/System/Reflection/ICustomAttributeProvider.cs +++ b/src/Common/src/CoreLib/System/Reflection/ICustomAttributeProvider.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable namespace System.Reflection { public interface ICustomAttributeProvider diff --git a/src/Common/src/CoreLib/System/Reflection/IReflect.cs b/src/Common/src/CoreLib/System/Reflection/IReflect.cs index a7e84b61680e..5099f8bd39cf 100644 --- a/src/Common/src/CoreLib/System/Reflection/IReflect.cs +++ b/src/Common/src/CoreLib/System/Reflection/IReflect.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable using System.Globalization; namespace System.Reflection @@ -11,30 +12,30 @@ public interface IReflect // Return the requested method if it is implemented by the Reflection object. The // match is based upon the name and DescriptorInfo which describes the signature // of the method. - MethodInfo GetMethod(string name, BindingFlags bindingAttr, Binder binder, Type[] types, ParameterModifier[] modifiers); + MethodInfo? GetMethod(string name, BindingFlags bindingAttr, Binder? binder, Type[] types, ParameterModifier[]? modifiers); // Return the requested method if it is implemented by the Reflection object. The // match is based upon the name of the method. If the object implementes multiple methods // with the same name an AmbiguousMatchException is thrown. - MethodInfo GetMethod(string name, BindingFlags bindingAttr); + MethodInfo? GetMethod(string name, BindingFlags bindingAttr); MethodInfo[] GetMethods(BindingFlags bindingAttr); // Return the requestion field if it is implemented by the Reflection object. The // match is based upon a name. There cannot be more than a single field with // a name. - FieldInfo GetField(string name, BindingFlags bindingAttr); + FieldInfo? GetField(string name, BindingFlags bindingAttr); FieldInfo[] GetFields(BindingFlags bindingAttr); // Return the property based upon name. If more than one property has the given // name an AmbiguousMatchException will be thrown. Returns null if no property // is found. - PropertyInfo GetProperty(string name, BindingFlags bindingAttr); + PropertyInfo? GetProperty(string name, BindingFlags bindingAttr); // Return the property based upon the name and Descriptor info describing the property // indexing. Return null if no property is found. - PropertyInfo GetProperty(string name, BindingFlags bindingAttr, Binder binder, Type returnType, Type[] types, ParameterModifier[] modifiers); + PropertyInfo? GetProperty(string name, BindingFlags bindingAttr, Binder? binder, Type? returnType, Type[] types, ParameterModifier[]? modifiers); // Returns an array of PropertyInfos for all the properties defined on // the Reflection object. @@ -67,7 +68,7 @@ public interface IReflect // For the default binder, the most specific method will be selected. // // This will invoke a specific member... - object InvokeMember(string name, BindingFlags invokeAttr, Binder binder, object target, object[] args, ParameterModifier[] modifiers, CultureInfo culture, string[] namedParameters); + object? InvokeMember(string name, BindingFlags invokeAttr, Binder? binder, object? target, object[]? args, ParameterModifier[]? modifiers, CultureInfo? culture, string[]? namedParameters); // Return the underlying Type that represents the IReflect Object. For expando object, // this is the (Object) IReflectInstance.GetType(). For Type object it is this. diff --git a/src/Common/src/CoreLib/System/Reflection/IReflectableType.cs b/src/Common/src/CoreLib/System/Reflection/IReflectableType.cs index 5e2c0edab4b6..0264f6321e2a 100644 --- a/src/Common/src/CoreLib/System/Reflection/IReflectableType.cs +++ b/src/Common/src/CoreLib/System/Reflection/IReflectableType.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable namespace System.Reflection { public interface IReflectableType diff --git a/src/Common/src/CoreLib/System/Reflection/IntrospectionExtensions.cs b/src/Common/src/CoreLib/System/Reflection/IntrospectionExtensions.cs index acf5987d448c..cdf883601856 100644 --- a/src/Common/src/CoreLib/System/Reflection/IntrospectionExtensions.cs +++ b/src/Common/src/CoreLib/System/Reflection/IntrospectionExtensions.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable using System.Diagnostics; namespace System.Reflection diff --git a/src/Common/src/CoreLib/System/Reflection/LocalVariableInfo.cs b/src/Common/src/CoreLib/System/Reflection/LocalVariableInfo.cs index 1540bde531d9..1040d50a585b 100644 --- a/src/Common/src/CoreLib/System/Reflection/LocalVariableInfo.cs +++ b/src/Common/src/CoreLib/System/Reflection/LocalVariableInfo.cs @@ -2,13 +2,14 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable using System.Diagnostics; namespace System.Reflection { public class LocalVariableInfo { - public virtual Type LocalType { get { Debug.Fail("type must be set!"); return null; } } + public virtual Type LocalType { get { Debug.Fail("type must be set!"); return null!; } } public virtual int LocalIndex => 0; public virtual bool IsPinned => false; protected LocalVariableInfo() { } diff --git a/src/Common/src/CoreLib/System/Reflection/ManifestResourceInfo.cs b/src/Common/src/CoreLib/System/Reflection/ManifestResourceInfo.cs index b9c56ab857ff..02296da7b9aa 100644 --- a/src/Common/src/CoreLib/System/Reflection/ManifestResourceInfo.cs +++ b/src/Common/src/CoreLib/System/Reflection/ManifestResourceInfo.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable namespace System.Reflection { public class ManifestResourceInfo diff --git a/src/Common/src/CoreLib/System/Reflection/MemberFilter.cs b/src/Common/src/CoreLib/System/Reflection/MemberFilter.cs index bb1b15796aa7..3f3282325eac 100644 --- a/src/Common/src/CoreLib/System/Reflection/MemberFilter.cs +++ b/src/Common/src/CoreLib/System/Reflection/MemberFilter.cs @@ -2,7 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable namespace System.Reflection { public delegate bool MemberFilter(MemberInfo m, object filterCriteria); -} \ No newline at end of file +} diff --git a/src/Common/src/CoreLib/System/Reflection/MemberInfo.cs b/src/Common/src/CoreLib/System/Reflection/MemberInfo.cs index 8d15005fb47c..adf7bbaa8b65 100644 --- a/src/Common/src/CoreLib/System/Reflection/MemberInfo.cs +++ b/src/Common/src/CoreLib/System/Reflection/MemberInfo.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable using System.Collections.Generic; using System.Runtime.CompilerServices; @@ -13,8 +14,8 @@ protected MemberInfo() { } public abstract MemberTypes MemberType { get; } public abstract string Name { get; } - public abstract Type DeclaringType { get; } - public abstract Type ReflectedType { get; } + public abstract Type? DeclaringType { get; } + public abstract Type? ReflectedType { get; } public virtual Module Module { @@ -23,8 +24,7 @@ public virtual Module Module // This check is necessary because for some reason, Type adds a new "Module" property that hides the inherited one instead // of overriding. - Type type = this as Type; - if (type != null) + if (this is Type type) return type.Module; throw NotImplemented.ByDesign; @@ -42,11 +42,11 @@ public virtual Module Module public virtual bool IsCollectible => true; public virtual int MetadataToken { get { throw new InvalidOperationException(); } } - public override bool Equals(object obj) => base.Equals(obj); + public override bool Equals(object? obj) => base.Equals(obj); public override int GetHashCode() => base.GetHashCode(); [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static bool operator ==(MemberInfo left, MemberInfo right) + public static bool operator ==(MemberInfo? left, MemberInfo? right) { // Test "right" first to allow branch elimination when inlined for null checks (== null) // so it can become a simple test @@ -57,7 +57,7 @@ public virtual Module Module } // Try fast reference equality and opposite null check prior to calling the slower virtual Equals - if ((object)left == (object)right) + if ((object?)left == (object)right) { return true; } @@ -65,6 +65,6 @@ public virtual Module Module return (left is null) ? false : left.Equals(right); } - public static bool operator !=(MemberInfo left, MemberInfo right) => !(left == right); + public static bool operator !=(MemberInfo? left, MemberInfo? right) => !(left == right); } } diff --git a/src/Common/src/CoreLib/System/Reflection/MethodBase.cs b/src/Common/src/CoreLib/System/Reflection/MethodBase.cs index 914689c5ba01..551b78222f54 100644 --- a/src/Common/src/CoreLib/System/Reflection/MethodBase.cs +++ b/src/Common/src/CoreLib/System/Reflection/MethodBase.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable using System.Globalization; using System.Diagnostics; using System.Runtime.CompilerServices; @@ -51,8 +52,8 @@ public bool IsConstructor [DebuggerHidden] [DebuggerStepThrough] - public object Invoke(object obj, object[] parameters) => Invoke(obj, BindingFlags.Default, binder: null, parameters: parameters, culture: null); - public abstract object Invoke(object obj, BindingFlags invokeAttr, Binder binder, object[] parameters, CultureInfo culture); + public object? Invoke(object? obj, object?[]? parameters) => Invoke(obj, BindingFlags.Default, binder: null, parameters: parameters, culture: null); + public abstract object? Invoke(object? obj, BindingFlags invokeAttr, Binder? binder, object?[]? parameters, CultureInfo? culture); public abstract RuntimeMethodHandle MethodHandle { get; } @@ -60,11 +61,11 @@ public bool IsConstructor public virtual bool IsSecuritySafeCritical { get { throw NotImplemented.ByDesign; } } public virtual bool IsSecurityTransparent { get { throw NotImplemented.ByDesign; } } - public override bool Equals(object obj) => base.Equals(obj); + public override bool Equals(object? obj) => base.Equals(obj); public override int GetHashCode() => base.GetHashCode(); [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static bool operator ==(MethodBase left, MethodBase right) + public static bool operator ==(MethodBase? left, MethodBase? right) { // Test "right" first to allow branch elimination when inlined for null checks (== null) // so it can become a simple test @@ -75,7 +76,7 @@ public bool IsConstructor } // Try fast reference equality and opposite null check prior to calling the slower virtual Equals - if ((object)left == (object)right) + if ((object?)left == (object)right) { return true; } @@ -83,6 +84,6 @@ public bool IsConstructor return (left is null) ? false : left.Equals(right); } - public static bool operator !=(MethodBase left, MethodBase right) => !(left == right); + public static bool operator !=(MethodBase? left, MethodBase? right) => !(left == right); } } diff --git a/src/Common/src/CoreLib/System/Reflection/MethodBody.cs b/src/Common/src/CoreLib/System/Reflection/MethodBody.cs index bdf53ad12f63..745a9a0c60b8 100644 --- a/src/Common/src/CoreLib/System/Reflection/MethodBody.cs +++ b/src/Common/src/CoreLib/System/Reflection/MethodBody.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable using System.Collections.Generic; namespace System.Reflection @@ -13,7 +14,7 @@ protected MethodBody() { } public virtual IList LocalVariables => throw new ArgumentNullException("array"); public virtual int MaxStackSize => 0; public virtual bool InitLocals => false; - public virtual byte[] GetILAsByteArray() => null; + public virtual byte[]? GetILAsByteArray() => null; public virtual IList ExceptionHandlingClauses => throw new ArgumentNullException("array"); } } diff --git a/src/Common/src/CoreLib/System/Reflection/MethodInfo.Internal.cs b/src/Common/src/CoreLib/System/Reflection/MethodInfo.Internal.cs index 2806be639efd..273f1639d5dd 100644 --- a/src/Common/src/CoreLib/System/Reflection/MethodInfo.Internal.cs +++ b/src/Common/src/CoreLib/System/Reflection/MethodInfo.Internal.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable namespace System.Reflection { public abstract partial class MethodInfo : MethodBase diff --git a/src/Common/src/CoreLib/System/Reflection/MethodInfo.cs b/src/Common/src/CoreLib/System/Reflection/MethodInfo.cs index 555285434102..260e1338da09 100644 --- a/src/Common/src/CoreLib/System/Reflection/MethodInfo.cs +++ b/src/Common/src/CoreLib/System/Reflection/MethodInfo.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable using System.Runtime.CompilerServices; namespace System.Reflection @@ -12,25 +13,25 @@ protected MethodInfo() { } public override MemberTypes MemberType => MemberTypes.Method; - public virtual ParameterInfo ReturnParameter { get { throw NotImplemented.ByDesign; } } - public virtual Type ReturnType { get { throw NotImplemented.ByDesign; } } + public virtual ParameterInfo? ReturnParameter { get { throw NotImplemented.ByDesign; } } + public virtual Type? ReturnType { get { throw NotImplemented.ByDesign; } } public override Type[] GetGenericArguments() { throw new NotSupportedException(SR.NotSupported_SubclassOverride); } - public virtual MethodInfo GetGenericMethodDefinition() { throw new NotSupportedException(SR.NotSupported_SubclassOverride); } - public virtual MethodInfo MakeGenericMethod(params Type[] typeArguments) { throw new NotSupportedException(SR.NotSupported_SubclassOverride); } + public virtual MethodInfo? GetGenericMethodDefinition() { throw new NotSupportedException(SR.NotSupported_SubclassOverride); } + public virtual MethodInfo? MakeGenericMethod(params Type[] typeArguments) { throw new NotSupportedException(SR.NotSupported_SubclassOverride); } - public abstract MethodInfo GetBaseDefinition(); + public abstract MethodInfo? GetBaseDefinition(); - public abstract ICustomAttributeProvider ReturnTypeCustomAttributes { get; } + public abstract ICustomAttributeProvider? ReturnTypeCustomAttributes { get; } public virtual Delegate CreateDelegate(Type delegateType) { throw new NotSupportedException(SR.NotSupported_SubclassOverride); } - public virtual Delegate CreateDelegate(Type delegateType, object target) { throw new NotSupportedException(SR.NotSupported_SubclassOverride); } + public virtual Delegate CreateDelegate(Type delegateType, object? target) { throw new NotSupportedException(SR.NotSupported_SubclassOverride); } - public override bool Equals(object obj) => base.Equals(obj); + public override bool Equals(object? obj) => base.Equals(obj); public override int GetHashCode() => base.GetHashCode(); [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static bool operator ==(MethodInfo left, MethodInfo right) + public static bool operator ==(MethodInfo? left, MethodInfo? right) { // Test "right" first to allow branch elimination when inlined for null checks (== null) // so it can become a simple test @@ -41,7 +42,7 @@ protected MethodInfo() { } } // Try fast reference equality and opposite null check prior to calling the slower virtual Equals - if ((object)left == (object)right) + if ((object?)left == (object)right) { return true; } @@ -49,6 +50,6 @@ protected MethodInfo() { } return (left is null) ? false : left.Equals(right); } - public static bool operator !=(MethodInfo left, MethodInfo right) => !(left == right); + public static bool operator !=(MethodInfo? left, MethodInfo? right) => !(left == right); } } diff --git a/src/Common/src/CoreLib/System/Reflection/Missing.cs b/src/Common/src/CoreLib/System/Reflection/Missing.cs index 46ab32fccf6b..7f994f9895d7 100644 --- a/src/Common/src/CoreLib/System/Reflection/Missing.cs +++ b/src/Common/src/CoreLib/System/Reflection/Missing.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable using System.Runtime.Serialization; namespace System.Reflection diff --git a/src/Common/src/CoreLib/System/Reflection/Module.cs b/src/Common/src/CoreLib/System/Reflection/Module.cs index 8042160c32d6..b54e70709664 100644 --- a/src/Common/src/CoreLib/System/Reflection/Module.cs +++ b/src/Common/src/CoreLib/System/Reflection/Module.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable using System.Collections.Generic; using System.Runtime.CompilerServices; using System.Runtime.Serialization; @@ -30,7 +31,7 @@ protected Module() { } public virtual object[] GetCustomAttributes(bool inherit) { throw NotImplemented.ByDesign; } public virtual object[] GetCustomAttributes(Type attributeType, bool inherit) { throw NotImplemented.ByDesign; } - public MethodInfo GetMethod(string name) + public MethodInfo? GetMethod(string name) { if (name == null) throw new ArgumentNullException(nameof(name)); @@ -38,8 +39,8 @@ public MethodInfo GetMethod(string name) return GetMethodImpl(name, Module.DefaultLookup, null, CallingConventions.Any, null, null); } - public MethodInfo GetMethod(string name, Type[] types) => GetMethod(name, Module.DefaultLookup, null, CallingConventions.Any, types, null); - public MethodInfo GetMethod(string name, BindingFlags bindingAttr, Binder binder, CallingConventions callConvention, Type[] types, ParameterModifier[] modifiers) + public MethodInfo? GetMethod(string name, Type[] types) => GetMethod(name, Module.DefaultLookup, null, CallingConventions.Any, types, null); + public MethodInfo? GetMethod(string name, BindingFlags bindingAttr, Binder? binder, CallingConventions callConvention, Type[] types, ParameterModifier[]? modifiers) { if (name == null) throw new ArgumentNullException(nameof(name)); @@ -53,31 +54,31 @@ public MethodInfo GetMethod(string name, BindingFlags bindingAttr, Binder binder return GetMethodImpl(name, bindingAttr, binder, callConvention, types, modifiers); } - protected virtual MethodInfo GetMethodImpl(string name, BindingFlags bindingAttr, Binder binder, CallingConventions callConvention, Type[] types, ParameterModifier[] modifiers) { throw NotImplemented.ByDesign; } + protected virtual MethodInfo? GetMethodImpl(string name, BindingFlags bindingAttr, Binder? binder, CallingConventions callConvention, Type[]? types, ParameterModifier[]? modifiers) { throw NotImplemented.ByDesign; } public MethodInfo[] GetMethods() => GetMethods(Module.DefaultLookup); public virtual MethodInfo[] GetMethods(BindingFlags bindingFlags) { throw NotImplemented.ByDesign; } - public FieldInfo GetField(string name) => GetField(name, Module.DefaultLookup); - public virtual FieldInfo GetField(string name, BindingFlags bindingAttr) { throw NotImplemented.ByDesign; } + public FieldInfo? GetField(string name) => GetField(name, Module.DefaultLookup); + public virtual FieldInfo? GetField(string name, BindingFlags bindingAttr) { throw NotImplemented.ByDesign; } public FieldInfo[] GetFields() => GetFields(Module.DefaultLookup); public virtual FieldInfo[] GetFields(BindingFlags bindingFlags) { throw NotImplemented.ByDesign; } public virtual Type[] GetTypes() { throw NotImplemented.ByDesign; } - public virtual Type GetType(string className) => GetType(className, throwOnError: false, ignoreCase: false); - public virtual Type GetType(string className, bool ignoreCase) => GetType(className, throwOnError: false, ignoreCase: ignoreCase); - public virtual Type GetType(string className, bool throwOnError, bool ignoreCase) { throw NotImplemented.ByDesign; } + public virtual Type? GetType(string className) => GetType(className, throwOnError: false, ignoreCase: false); + public virtual Type? GetType(string className, bool ignoreCase) => GetType(className, throwOnError: false, ignoreCase: ignoreCase); + public virtual Type? GetType(string className, bool throwOnError, bool ignoreCase) { throw NotImplemented.ByDesign; } - public virtual Type[] FindTypes(TypeFilter filter, object filterCriteria) + public virtual Type[] FindTypes(TypeFilter? filter, object filterCriteria) { Type[] c = GetTypes(); int cnt = 0; for (int i = 0; i < c.Length; i++) { if (filter != null && !filter(c[i], filterCriteria)) - c[i] = null; + c[i] = null!; else cnt++; } @@ -96,28 +97,28 @@ public virtual Type[] FindTypes(TypeFilter filter, object filterCriteria) public virtual int MetadataToken { get { throw NotImplemented.ByDesign; } } - public FieldInfo ResolveField(int metadataToken) => ResolveField(metadataToken, null, null); - public virtual FieldInfo ResolveField(int metadataToken, Type[] genericTypeArguments, Type[] genericMethodArguments) { throw NotImplemented.ByDesign; } + public FieldInfo? ResolveField(int metadataToken) => ResolveField(metadataToken, null, null); + public virtual FieldInfo? ResolveField(int metadataToken, Type[]? genericTypeArguments, Type[]? genericMethodArguments) { throw NotImplemented.ByDesign; } - public MemberInfo ResolveMember(int metadataToken) => ResolveMember(metadataToken, null, null); - public virtual MemberInfo ResolveMember(int metadataToken, Type[] genericTypeArguments, Type[] genericMethodArguments) { throw NotImplemented.ByDesign; } + public MemberInfo? ResolveMember(int metadataToken) => ResolveMember(metadataToken, null, null); + public virtual MemberInfo? ResolveMember(int metadataToken, Type[]? genericTypeArguments, Type[]? genericMethodArguments) { throw NotImplemented.ByDesign; } - public MethodBase ResolveMethod(int metadataToken) => ResolveMethod(metadataToken, null, null); - public virtual MethodBase ResolveMethod(int metadataToken, Type[] genericTypeArguments, Type[] genericMethodArguments) { throw NotImplemented.ByDesign; } + public MethodBase? ResolveMethod(int metadataToken) => ResolveMethod(metadataToken, null, null); + public virtual MethodBase? ResolveMethod(int metadataToken, Type[]? genericTypeArguments, Type[]? genericMethodArguments) { throw NotImplemented.ByDesign; } public virtual byte[] ResolveSignature(int metadataToken) { throw NotImplemented.ByDesign; } public virtual string ResolveString(int metadataToken) { throw NotImplemented.ByDesign; } public Type ResolveType(int metadataToken) => ResolveType(metadataToken, null, null); - public virtual Type ResolveType(int metadataToken, Type[] genericTypeArguments, Type[] genericMethodArguments) { throw NotImplemented.ByDesign; } + public virtual Type ResolveType(int metadataToken, Type[]? genericTypeArguments, Type[]? genericMethodArguments) { throw NotImplemented.ByDesign; } public virtual void GetObjectData(SerializationInfo info, StreamingContext context) { throw NotImplemented.ByDesign; } - public override bool Equals(object o) => base.Equals(o); + public override bool Equals(object? o) => base.Equals(o); public override int GetHashCode() => base.GetHashCode(); [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static bool operator ==(Module left, Module right) + public static bool operator ==(Module? left, Module? right) { // Test "right" first to allow branch elimination when inlined for null checks (== null) // so it can become a simple test @@ -128,7 +129,7 @@ public virtual Type[] FindTypes(TypeFilter filter, object filterCriteria) } // Try fast reference equality and opposite null check prior to calling the slower virtual Equals - if ((object)left == (object)right) + if ((object?)left == (object)right) { return true; } @@ -136,11 +137,11 @@ public virtual Type[] FindTypes(TypeFilter filter, object filterCriteria) return (left is null) ? false : left.Equals(right); } - public static bool operator !=(Module left, Module right) => !(left == right); + public static bool operator !=(Module? left, Module? right) => !(left == right); public override string ToString() => ScopeName; - public static readonly TypeFilter FilterTypeName = (m, c) => FilterTypeNameImpl(m, c, StringComparison.Ordinal); + public static readonly TypeFilter FilterTypeName = (m, c) => FilterTypeNameImpl(m, c, StringComparison.Ordinal); // TODO-NULLABLE https://github.com/dotnet/roslyn/issues/23268 public static readonly TypeFilter FilterTypeNameIgnoreCase = (m, c) => FilterTypeNameImpl(m, c, StringComparison.OrdinalIgnoreCase); private const BindingFlags DefaultLookup = BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public; diff --git a/src/Common/src/CoreLib/System/Reflection/ModuleResolveEventHandler.cs b/src/Common/src/CoreLib/System/Reflection/ModuleResolveEventHandler.cs index eb8926b5db51..6c52a2221496 100644 --- a/src/Common/src/CoreLib/System/Reflection/ModuleResolveEventHandler.cs +++ b/src/Common/src/CoreLib/System/Reflection/ModuleResolveEventHandler.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable namespace System.Reflection { public delegate Module ModuleResolveEventHandler(object sender, ResolveEventArgs e); diff --git a/src/Common/src/CoreLib/System/Reflection/ParameterInfo.cs b/src/Common/src/CoreLib/System/Reflection/ParameterInfo.cs index 94bfffaa5384..3db4c5c1b9c2 100644 --- a/src/Common/src/CoreLib/System/Reflection/ParameterInfo.cs +++ b/src/Common/src/CoreLib/System/Reflection/ParameterInfo.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable using System.Collections.Generic; using System.Runtime.Serialization; @@ -13,8 +14,8 @@ protected ParameterInfo() { } public virtual ParameterAttributes Attributes => AttrsImpl; public virtual MemberInfo Member => MemberImpl; - public virtual string Name => NameImpl; - public virtual Type ParameterType => ClassImpl; + public virtual string? Name => NameImpl; + public virtual Type ParameterType => ClassImpl!; public virtual int Position => PositionImpl; public bool IsIn => (Attributes & ParameterAttributes.In) != 0; @@ -23,8 +24,8 @@ protected ParameterInfo() { } public bool IsOut => (Attributes & ParameterAttributes.Out) != 0; public bool IsRetval => (Attributes & ParameterAttributes.Retval) != 0; - public virtual object DefaultValue { get { throw NotImplemented.ByDesign; } } - public virtual object RawDefaultValue { get { throw NotImplemented.ByDesign; } } + public virtual object? DefaultValue { get { throw NotImplemented.ByDesign; } } + public virtual object? RawDefaultValue { get { throw NotImplemented.ByDesign; } } public virtual bool HasDefaultValue { get { throw NotImplemented.ByDesign; } } public virtual bool IsDefined(Type attributeType, bool inherit) @@ -60,7 +61,7 @@ public object GetRealObject(StreamingContext context) if (MemberImpl == null) throw new SerializationException(SR.Serialization_InsufficientState); - ParameterInfo[] args = null; + ParameterInfo[]? args = null; switch (MemberImpl.MemberType) { @@ -69,7 +70,7 @@ public object GetRealObject(StreamingContext context) if (PositionImpl == -1) { if (MemberImpl.MemberType == MemberTypes.Method) - return ((MethodInfo)MemberImpl).ReturnParameter; + return ((MethodInfo)MemberImpl).ReturnParameter!; else throw new SerializationException(SR.Serialization_BadParameterInfo); } @@ -99,10 +100,10 @@ public object GetRealObject(StreamingContext context) public override string ToString() => ParameterType.FormatTypeName() + " " + Name; protected ParameterAttributes AttrsImpl; - protected Type ClassImpl; - protected object DefaultValueImpl; - protected MemberInfo MemberImpl; - protected string NameImpl; + protected Type? ClassImpl; + protected object? DefaultValueImpl; + protected MemberInfo MemberImpl = null!; + protected string? NameImpl; protected int PositionImpl; private const int MetadataToken_ParamDef = 0x08000000; diff --git a/src/Common/src/CoreLib/System/Reflection/Pointer.cs b/src/Common/src/CoreLib/System/Reflection/Pointer.cs index e1a9990cf0ee..5761eabb443b 100644 --- a/src/Common/src/CoreLib/System/Reflection/Pointer.cs +++ b/src/Common/src/CoreLib/System/Reflection/Pointer.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable using System.Diagnostics; using System.Runtime.Serialization; diff --git a/src/Common/src/CoreLib/System/Reflection/PropertyInfo.cs b/src/Common/src/CoreLib/System/Reflection/PropertyInfo.cs index 7fbb7eed4443..6edfe7159c00 100644 --- a/src/Common/src/CoreLib/System/Reflection/PropertyInfo.cs +++ b/src/Common/src/CoreLib/System/Reflection/PropertyInfo.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable using System.Diagnostics; using System.Globalization; using System.Runtime.CompilerServices; @@ -26,41 +27,41 @@ protected PropertyInfo() { } public MethodInfo[] GetAccessors() => GetAccessors(nonPublic: false); public abstract MethodInfo[] GetAccessors(bool nonPublic); - public virtual MethodInfo GetMethod => GetGetMethod(nonPublic: true); - public MethodInfo GetGetMethod() => GetGetMethod(nonPublic: false); - public abstract MethodInfo GetGetMethod(bool nonPublic); + public virtual MethodInfo? GetMethod => GetGetMethod(nonPublic: true); + public MethodInfo? GetGetMethod() => GetGetMethod(nonPublic: false); + public abstract MethodInfo? GetGetMethod(bool nonPublic); - public virtual MethodInfo SetMethod => GetSetMethod(nonPublic: true); - public MethodInfo GetSetMethod() => GetSetMethod(nonPublic: false); - public abstract MethodInfo GetSetMethod(bool nonPublic); + public virtual MethodInfo? SetMethod => GetSetMethod(nonPublic: true); + public MethodInfo? GetSetMethod() => GetSetMethod(nonPublic: false); + public abstract MethodInfo? GetSetMethod(bool nonPublic); public virtual Type[] GetOptionalCustomModifiers() => Array.Empty(); public virtual Type[] GetRequiredCustomModifiers() => Array.Empty(); [DebuggerHidden] [DebuggerStepThrough] - public object GetValue(object obj) => GetValue(obj, index: null); + public object? GetValue(object? obj) => GetValue(obj, index: null); [DebuggerHidden] [DebuggerStepThrough] - public virtual object GetValue(object obj, object[] index) => GetValue(obj, BindingFlags.Default, binder: null, index: index, culture: null); - public abstract object GetValue(object obj, BindingFlags invokeAttr, Binder binder, object[] index, CultureInfo culture); + public virtual object? GetValue(object? obj, object?[]? index) => GetValue(obj, BindingFlags.Default, binder: null, index: index, culture: null); + public abstract object? GetValue(object? obj, BindingFlags invokeAttr, Binder? binder, object?[]? index, CultureInfo? culture); public virtual object GetConstantValue() { throw NotImplemented.ByDesign; } public virtual object GetRawConstantValue() { throw NotImplemented.ByDesign; } [DebuggerHidden] [DebuggerStepThrough] - public void SetValue(object obj, object value) => SetValue(obj, value, index: null); + public void SetValue(object? obj, object? value) => SetValue(obj, value, index: null); [DebuggerHidden] [DebuggerStepThrough] - public virtual void SetValue(object obj, object value, object[] index) => SetValue(obj, value, BindingFlags.Default, binder: null, index: index, culture: null); - public abstract void SetValue(object obj, object value, BindingFlags invokeAttr, Binder binder, object[] index, CultureInfo culture); + public virtual void SetValue(object? obj, object? value, object[]? index) => SetValue(obj, value, BindingFlags.Default, binder: null, index: index, culture: null); + public abstract void SetValue(object? obj, object? value, BindingFlags invokeAttr, Binder? binder, object[]? index, CultureInfo? culture); - public override bool Equals(object obj) => base.Equals(obj); + public override bool Equals(object? obj) => base.Equals(obj); public override int GetHashCode() => base.GetHashCode(); [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static bool operator ==(PropertyInfo left, PropertyInfo right) + public static bool operator ==(PropertyInfo? left, PropertyInfo? right) { // Test "right" first to allow branch elimination when inlined for null checks (== null) // so it can become a simple test @@ -71,7 +72,7 @@ protected PropertyInfo() { } } // Try fast reference equality and opposite null check prior to calling the slower virtual Equals - if ((object)left == (object)right) + if ((object?)left == (object)right) { return true; } @@ -79,6 +80,6 @@ protected PropertyInfo() { } return (left is null) ? false : left.Equals(right); } - public static bool operator !=(PropertyInfo left, PropertyInfo right) => !(left == right); + public static bool operator !=(PropertyInfo? left, PropertyInfo? right) => !(left == right); } } diff --git a/src/Common/src/CoreLib/System/Reflection/ReflectionContext.cs b/src/Common/src/CoreLib/System/Reflection/ReflectionContext.cs index e9e93dab81b3..f7f9ce4f80ec 100644 --- a/src/Common/src/CoreLib/System/Reflection/ReflectionContext.cs +++ b/src/Common/src/CoreLib/System/Reflection/ReflectionContext.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable namespace System.Reflection { public abstract class ReflectionContext diff --git a/src/Common/src/CoreLib/System/Reflection/SignatureArrayType.cs b/src/Common/src/CoreLib/System/Reflection/SignatureArrayType.cs index 52011b8a9d1b..6a4b8f076b46 100644 --- a/src/Common/src/CoreLib/System/Reflection/SignatureArrayType.cs +++ b/src/Common/src/CoreLib/System/Reflection/SignatureArrayType.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable using System.Diagnostics; namespace System.Reflection diff --git a/src/Common/src/CoreLib/System/Reflection/SignatureByRefType.cs b/src/Common/src/CoreLib/System/Reflection/SignatureByRefType.cs index eb5f6de42eab..e0d0a3a47826 100644 --- a/src/Common/src/CoreLib/System/Reflection/SignatureByRefType.cs +++ b/src/Common/src/CoreLib/System/Reflection/SignatureByRefType.cs @@ -2,8 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; - +#nullable enable namespace System.Reflection { internal sealed class SignatureByRefType : SignatureHasElementType diff --git a/src/Common/src/CoreLib/System/Reflection/SignatureConstructedGenericType.cs b/src/Common/src/CoreLib/System/Reflection/SignatureConstructedGenericType.cs index d3d88520fc5f..01408016bc29 100644 --- a/src/Common/src/CoreLib/System/Reflection/SignatureConstructedGenericType.cs +++ b/src/Common/src/CoreLib/System/Reflection/SignatureConstructedGenericType.cs @@ -2,9 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; +#nullable enable using System.Text; -using System.Diagnostics; namespace System.Reflection { @@ -14,16 +13,16 @@ internal sealed class SignatureConstructedGenericType : SignatureType // intended user of this constructor. internal SignatureConstructedGenericType(Type genericTypeDefinition, Type[] typeArguments) { - if (genericTypeDefinition == null) + if (genericTypeDefinition is null) throw new ArgumentNullException(nameof(genericTypeDefinition)); - if (typeArguments == null) + if (typeArguments is null) throw new ArgumentNullException(nameof(typeArguments)); typeArguments = (Type[])(typeArguments.Clone()); for (int i = 0; i < typeArguments.Length; i++) { - if (typeArguments[i] == null) + if (typeArguments[i] is null) throw new ArgumentNullException(nameof(typeArguments)); } @@ -57,15 +56,14 @@ public sealed override bool ContainsGenericParameters } } - internal sealed override SignatureType ElementType => null; + internal sealed override SignatureType? ElementType => null; public sealed override int GetArrayRank() => throw new ArgumentException(SR.Argument_HasToBeArrayClass); public sealed override Type GetGenericTypeDefinition() => _genericTypeDefinition; public sealed override Type[] GetGenericArguments() => GenericTypeArguments; public sealed override Type[] GenericTypeArguments => (Type[])(_genericTypeArguments.Clone()); public sealed override int GenericParameterPosition => throw new InvalidOperationException(SR.Arg_NotGenericParameter); - public sealed override string Name => _genericTypeDefinition.Name; - public sealed override string Namespace => _genericTypeDefinition.Namespace; + public sealed override string? Namespace => _genericTypeDefinition.Namespace; public sealed override string ToString() { diff --git a/src/Common/src/CoreLib/System/Reflection/SignatureGenericMethodParameterType.cs b/src/Common/src/CoreLib/System/Reflection/SignatureGenericMethodParameterType.cs index d0790283fb0a..42ab16fe42de 100644 --- a/src/Common/src/CoreLib/System/Reflection/SignatureGenericMethodParameterType.cs +++ b/src/Common/src/CoreLib/System/Reflection/SignatureGenericMethodParameterType.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable namespace System.Reflection { internal sealed class SignatureGenericMethodParameterType : SignatureGenericParameterType @@ -13,7 +14,7 @@ internal SignatureGenericMethodParameterType(int position) public sealed override bool IsGenericTypeParameter => false; public sealed override bool IsGenericMethodParameter => true; - + public sealed override string Name => "!!" + GenericParameterPosition; } } diff --git a/src/Common/src/CoreLib/System/Reflection/SignatureGenericParameterType.cs b/src/Common/src/CoreLib/System/Reflection/SignatureGenericParameterType.cs index fee7bce35303..15e5dfa7c254 100644 --- a/src/Common/src/CoreLib/System/Reflection/SignatureGenericParameterType.cs +++ b/src/Common/src/CoreLib/System/Reflection/SignatureGenericParameterType.cs @@ -2,7 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; +#nullable enable using System.Diagnostics; namespace System.Reflection @@ -29,15 +29,14 @@ protected SignatureGenericParameterType(int position) public abstract override bool IsGenericMethodParameter { get; } public sealed override bool ContainsGenericParameters => true; - internal sealed override SignatureType ElementType => null; + internal sealed override SignatureType? ElementType => null; public sealed override int GetArrayRank() => throw new ArgumentException(SR.Argument_HasToBeArrayClass); public sealed override Type GetGenericTypeDefinition() => throw new InvalidOperationException(SR.InvalidOperation_NotGenericType); public sealed override Type[] GetGenericArguments() => Array.Empty(); public sealed override Type[] GenericTypeArguments => Array.Empty(); public sealed override int GenericParameterPosition => _position; - public abstract override string Name { get; } - public sealed override string Namespace => null; + public sealed override string? Namespace => null; public sealed override string ToString() => Name; diff --git a/src/Common/src/CoreLib/System/Reflection/SignatureHasElementType.cs b/src/Common/src/CoreLib/System/Reflection/SignatureHasElementType.cs index e74e5f5aa284..f5c0a7878522 100644 --- a/src/Common/src/CoreLib/System/Reflection/SignatureHasElementType.cs +++ b/src/Common/src/CoreLib/System/Reflection/SignatureHasElementType.cs @@ -2,7 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; +#nullable enable using System.Diagnostics; namespace System.Reflection @@ -30,15 +30,14 @@ protected SignatureHasElementType(SignatureType elementType) public sealed override bool IsGenericMethodParameter => false; public sealed override bool ContainsGenericParameters => _elementType.ContainsGenericParameters; - internal sealed override SignatureType ElementType => _elementType; + internal sealed override SignatureType? ElementType => _elementType; public abstract override int GetArrayRank(); public sealed override Type GetGenericTypeDefinition() => throw new InvalidOperationException(SR.InvalidOperation_NotGenericType); public sealed override Type[] GetGenericArguments() => Array.Empty(); public sealed override Type[] GenericTypeArguments => Array.Empty(); public sealed override int GenericParameterPosition => throw new InvalidOperationException(SR.Arg_NotGenericParameter); - public sealed override string Name => _elementType.Name + Suffix; - public sealed override string Namespace => _elementType.Namespace; + public sealed override string? Namespace => _elementType.Namespace; public sealed override string ToString() => _elementType.ToString() + Suffix; diff --git a/src/Common/src/CoreLib/System/Reflection/SignaturePointerType.cs b/src/Common/src/CoreLib/System/Reflection/SignaturePointerType.cs index a75a20816586..d7130850b498 100644 --- a/src/Common/src/CoreLib/System/Reflection/SignaturePointerType.cs +++ b/src/Common/src/CoreLib/System/Reflection/SignaturePointerType.cs @@ -2,8 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; - +#nullable enable namespace System.Reflection { internal sealed class SignaturePointerType : SignatureHasElementType diff --git a/src/Common/src/CoreLib/System/Reflection/SignatureType.cs b/src/Common/src/CoreLib/System/Reflection/SignatureType.cs index 40a0590448ba..c54e09c19d88 100644 --- a/src/Common/src/CoreLib/System/Reflection/SignatureType.cs +++ b/src/Common/src/CoreLib/System/Reflection/SignatureType.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable using System.Globalization; using System.Collections.Generic; using System.Runtime.InteropServices; @@ -49,40 +50,48 @@ public sealed override Type MakeArrayType(int rank) public sealed override Type MakeGenericType(params Type[] typeArguments) => throw new NotSupportedException(SR.NotSupported_SignatureType); // There is no SignatureType for type definition types so it would never be legal to call this. // Dissectors - public sealed override Type GetElementType() => ElementType; + public sealed override Type? GetElementType() => ElementType; public abstract override int GetArrayRank(); public abstract override Type GetGenericTypeDefinition(); public abstract override Type[] GenericTypeArguments { get; } public abstract override Type[] GetGenericArguments(); public abstract override int GenericParameterPosition { get; } - internal abstract SignatureType ElementType { get; } + internal abstract SignatureType? ElementType { get; } // Identity #if DEBUG - public sealed override bool Equals(object o) => base.Equals(o); - public sealed override bool Equals(Type o) => base.Equals(o); + public sealed override bool Equals(object? o) => base.Equals(o); + public sealed override bool Equals(Type? o) => base.Equals(o); public sealed override int GetHashCode() => base.GetHashCode(); #endif public sealed override Type UnderlyingSystemType => this; // Equals(Type) depends on this. // Naming and diagnostics public abstract override string Name { get; } - public abstract override string Namespace { get; } - public sealed override string FullName => null; - public sealed override string AssemblyQualifiedName => null; + public abstract override string? Namespace { get; } + public sealed override string? FullName => null; + public sealed override string? AssemblyQualifiedName => null; public abstract override string ToString(); // Not supported on Signature Types public sealed override Assembly Assembly => throw new NotSupportedException(SR.NotSupported_SignatureType); public sealed override Module Module => throw new NotSupportedException(SR.NotSupported_SignatureType); + +#pragma warning disable CS8608 // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/23268 public sealed override Type ReflectedType => throw new NotSupportedException(SR.NotSupported_SignatureType); public sealed override Type BaseType => throw new NotSupportedException(SR.NotSupported_SignatureType); +#pragma warning restore CS8608 + public sealed override Type[] GetInterfaces() => throw new NotSupportedException(SR.NotSupported_SignatureType); - public sealed override bool IsAssignableFrom(Type c) => throw new NotSupportedException(SR.NotSupported_SignatureType); + public sealed override bool IsAssignableFrom(Type? c) => throw new NotSupportedException(SR.NotSupported_SignatureType); public sealed override int MetadataToken => throw new NotSupportedException(SR.NotSupported_SignatureType); public sealed override bool HasSameMetadataDefinitionAs(MemberInfo other) => throw new NotSupportedException(SR.NotSupported_SignatureType); + +#pragma warning disable CS8608 // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/23268 public sealed override Type DeclaringType => throw new NotSupportedException(SR.NotSupported_SignatureType); public sealed override MethodBase DeclaringMethod => throw new NotSupportedException(SR.NotSupported_SignatureType); +#pragma warning restore CS8608 + public sealed override Type[] GetGenericParameterConstraints() => throw new NotSupportedException(SR.NotSupported_SignatureType); public sealed override GenericParameterAttributes GenericParameterAttributes => throw new NotSupportedException(SR.NotSupported_SignatureType); public sealed override bool IsEnumDefined(object value) => throw new NotSupportedException(SR.NotSupported_SignatureType); @@ -103,11 +112,11 @@ public sealed override Type MakeArrayType(int rank) public sealed override Type GetNestedType(string name, BindingFlags bindingAttr) => throw new NotSupportedException(SR.NotSupported_SignatureType); public sealed override Type[] GetNestedTypes(BindingFlags bindingAttr) => throw new NotSupportedException(SR.NotSupported_SignatureType); public sealed override PropertyInfo[] GetProperties(BindingFlags bindingAttr) => throw new NotSupportedException(SR.NotSupported_SignatureType); - public sealed override object InvokeMember(string name, BindingFlags invokeAttr, Binder binder, object target, object[] args, ParameterModifier[] modifiers, CultureInfo culture, string[] namedParameters) => throw new NotSupportedException(SR.NotSupported_SignatureType); - protected sealed override MethodInfo GetMethodImpl(string name, BindingFlags bindingAttr, Binder binder, CallingConventions callConvention, Type[] types, ParameterModifier[] modifiers) => throw new NotSupportedException(SR.NotSupported_SignatureType); - protected sealed override MethodInfo GetMethodImpl(string name, int genericParameterCount, BindingFlags bindingAttr, Binder binder, CallingConventions callConvention, Type[] types, ParameterModifier[] modifiers) => throw new NotSupportedException(SR.NotSupported_SignatureType); - protected sealed override PropertyInfo GetPropertyImpl(string name, BindingFlags bindingAttr, Binder binder, Type returnType, Type[] types, ParameterModifier[] modifiers) => throw new NotSupportedException(SR.NotSupported_SignatureType); - public sealed override MemberInfo[] FindMembers(MemberTypes memberType, BindingFlags bindingAttr, MemberFilter filter, object filterCriteria) => throw new NotSupportedException(SR.NotSupported_SignatureType); + public sealed override object InvokeMember(string name, BindingFlags invokeAttr, Binder? binder, object? target, object[]? args, ParameterModifier[]? modifiers, CultureInfo? culture, string[]? namedParameters) => throw new NotSupportedException(SR.NotSupported_SignatureType); + protected sealed override MethodInfo GetMethodImpl(string name, BindingFlags bindingAttr, Binder? binder, CallingConventions callConvention, Type[]? types, ParameterModifier[]? modifiers) => throw new NotSupportedException(SR.NotSupported_SignatureType); + protected sealed override MethodInfo GetMethodImpl(string name, int genericParameterCount, BindingFlags bindingAttr, Binder? binder, CallingConventions callConvention, Type[]? types, ParameterModifier[]? modifiers) => throw new NotSupportedException(SR.NotSupported_SignatureType); + protected sealed override PropertyInfo GetPropertyImpl(string name, BindingFlags bindingAttr, Binder? binder, Type? returnType, Type[]? types, ParameterModifier[]? modifiers) => throw new NotSupportedException(SR.NotSupported_SignatureType); + public sealed override MemberInfo[] FindMembers(MemberTypes memberType, BindingFlags bindingAttr, MemberFilter? filter, object filterCriteria) => throw new NotSupportedException(SR.NotSupported_SignatureType); public sealed override MemberInfo[] GetMember(string name, BindingFlags bindingAttr) => throw new NotSupportedException(SR.NotSupported_SignatureType); public sealed override MemberInfo[] GetMember(string name, MemberTypes type, BindingFlags bindingAttr) => throw new NotSupportedException(SR.NotSupported_SignatureType); public sealed override MemberInfo[] GetDefaultMembers() => throw new NotSupportedException(SR.NotSupported_SignatureType); @@ -117,7 +126,7 @@ public sealed override Type MakeArrayType(int rank) public sealed override bool IsDefined(Type attributeType, bool inherit) => throw new NotSupportedException(SR.NotSupported_SignatureType); public sealed override IList GetCustomAttributesData() => throw new NotSupportedException(SR.NotSupported_SignatureType); public sealed override Type GetInterface(string name, bool ignoreCase) => throw new NotSupportedException(SR.NotSupported_SignatureType); - protected sealed override ConstructorInfo GetConstructorImpl(BindingFlags bindingAttr, Binder binder, CallingConventions callConvention, Type[] types, ParameterModifier[] modifiers) => throw new NotSupportedException(SR.NotSupported_SignatureType); + protected sealed override ConstructorInfo GetConstructorImpl(BindingFlags bindingAttr, Binder? binder, CallingConventions callConvention, Type[] types, ParameterModifier[]? modifiers) => throw new NotSupportedException(SR.NotSupported_SignatureType); protected sealed override bool IsCOMObjectImpl() => throw new NotSupportedException(SR.NotSupported_SignatureType); protected sealed override bool IsPrimitiveImpl() => throw new NotSupportedException(SR.NotSupported_SignatureType); public sealed override IEnumerable CustomAttributes => throw new NotSupportedException(SR.NotSupported_SignatureType); @@ -125,8 +134,8 @@ public sealed override Type MakeArrayType(int rank) public sealed override InterfaceMapping GetInterfaceMap(Type interfaceType) => throw new NotSupportedException(SR.NotSupported_SignatureType); protected sealed override bool IsContextfulImpl() => throw new NotSupportedException(SR.NotSupported_SignatureType); public sealed override bool IsEnum => throw new NotSupportedException(SR.NotSupported_SignatureType); - public sealed override bool IsEquivalentTo(Type other) => throw new NotSupportedException(SR.NotSupported_SignatureType); - public sealed override bool IsInstanceOfType(object o) => throw new NotSupportedException(SR.NotSupported_SignatureType); + public sealed override bool IsEquivalentTo(Type? other) => throw new NotSupportedException(SR.NotSupported_SignatureType); + public sealed override bool IsInstanceOfType(object? o) => throw new NotSupportedException(SR.NotSupported_SignatureType); protected sealed override bool IsMarshalByRefImpl() => throw new NotSupportedException(SR.NotSupported_SignatureType); public sealed override bool IsSecurityCritical => throw new NotSupportedException(SR.NotSupported_SignatureType); public sealed override bool IsSecuritySafeCritical => throw new NotSupportedException(SR.NotSupported_SignatureType); @@ -134,7 +143,11 @@ public sealed override Type MakeArrayType(int rank) public sealed override bool IsSerializable => throw new NotSupportedException(SR.NotSupported_SignatureType); public sealed override bool IsSubclassOf(Type c) => throw new NotSupportedException(SR.NotSupported_SignatureType); protected sealed override bool IsValueTypeImpl() => throw new NotSupportedException(SR.NotSupported_SignatureType); + +#pragma warning disable CS8608 // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/23268 public sealed override StructLayoutAttribute StructLayoutAttribute => throw new NotSupportedException(SR.NotSupported_SignatureType); +#pragma warning restore CS8608 + public sealed override RuntimeTypeHandle TypeHandle => throw new NotSupportedException(SR.NotSupported_SignatureType); } } diff --git a/src/Common/src/CoreLib/System/Reflection/SignatureTypeExtensions.cs b/src/Common/src/CoreLib/System/Reflection/SignatureTypeExtensions.cs index 9247132546c1..263dc50c7e1b 100644 --- a/src/Common/src/CoreLib/System/Reflection/SignatureTypeExtensions.cs +++ b/src/Common/src/CoreLib/System/Reflection/SignatureTypeExtensions.cs @@ -2,8 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Reflection; +#nullable enable using System.Diagnostics; namespace System.Reflection @@ -42,19 +41,19 @@ internal static bool MatchesExactly(this SignatureType pattern, Type actual) { if (pattern.IsSZArray) { - return actual.IsSZArray && pattern.ElementType.MatchesExactly(actual.GetElementType()); + return actual.IsSZArray && pattern.ElementType!.MatchesExactly(actual.GetElementType()!); } else if (pattern.IsVariableBoundArray) { - return actual.IsVariableBoundArray && pattern.GetArrayRank() == actual.GetArrayRank() && pattern.ElementType.MatchesExactly(actual.GetElementType()); + return actual.IsVariableBoundArray && pattern.GetArrayRank() == actual.GetArrayRank() && pattern.ElementType!.MatchesExactly(actual.GetElementType()!); } else if (pattern.IsByRef) { - return actual.IsByRef && pattern.ElementType.MatchesExactly(actual.GetElementType()); + return actual.IsByRef && pattern.ElementType!.MatchesExactly(actual.GetElementType()!); } else if (pattern.IsPointer) { - return actual.IsPointer && pattern.ElementType.MatchesExactly(actual.GetElementType()); + return actual.IsPointer && pattern.ElementType!.MatchesExactly(actual.GetElementType()!); } else if (pattern.IsConstructedGenericType) { @@ -108,34 +107,34 @@ internal static bool MatchesExactly(this SignatureType pattern, Type actual) /// the method we're looking for, we return null rather than let the TypeLoadException bubble up. The DefaultBinder will catch /// the null and continue its search for a better candidate. /// - internal static Type TryResolveAgainstGenericMethod(this SignatureType signatureType, MethodInfo genericMethod) + internal static Type? TryResolveAgainstGenericMethod(this SignatureType signatureType, MethodInfo genericMethod) { return signatureType.TryResolve(genericMethod.GetGenericArguments()); } - private static Type TryResolve(this SignatureType signatureType, Type[] genericMethodParameters) + private static Type? TryResolve(this SignatureType signatureType, Type[] genericMethodParameters) { if (signatureType.IsSZArray) { - return signatureType.ElementType.TryResolve(genericMethodParameters)?.TryMakeArrayType(); + return signatureType.ElementType!.TryResolve(genericMethodParameters)?.TryMakeArrayType(); } else if (signatureType.IsVariableBoundArray) { - return signatureType.ElementType.TryResolve(genericMethodParameters)?.TryMakeArrayType(signatureType.GetArrayRank()); + return signatureType.ElementType!.TryResolve(genericMethodParameters)?.TryMakeArrayType(signatureType.GetArrayRank()); } else if (signatureType.IsByRef) { - return signatureType.ElementType.TryResolve(genericMethodParameters)?.TryMakeByRefType(); + return signatureType.ElementType!.TryResolve(genericMethodParameters)?.TryMakeByRefType(); } else if (signatureType.IsPointer) { - return signatureType.ElementType.TryResolve(genericMethodParameters)?.TryMakePointerType(); + return signatureType.ElementType!.TryResolve(genericMethodParameters)?.TryMakePointerType(); } else if (signatureType.IsConstructedGenericType) { Type[] genericTypeArguments = signatureType.GenericTypeArguments; int count = genericTypeArguments.Length; - Type[] newGenericTypeArguments = new Type[count]; + Type?[] newGenericTypeArguments = new Type[count]; for (int i = 0; i < count; i++) { Type genericTypeArgument = genericTypeArguments[i]; @@ -150,7 +149,7 @@ private static Type TryResolve(this SignatureType signatureType, Type[] genericM newGenericTypeArguments[i] = genericTypeArgument; } } - return signatureType.GetGenericTypeDefinition().TryMakeGenericType(newGenericTypeArguments); + return signatureType.GetGenericTypeDefinition().TryMakeGenericType(newGenericTypeArguments!); } else if (signatureType.IsGenericMethodParameter) { @@ -165,7 +164,7 @@ private static Type TryResolve(this SignatureType signatureType, Type[] genericM } } - private static Type TryMakeArrayType(this Type type) + private static Type? TryMakeArrayType(this Type type) { try { @@ -177,7 +176,7 @@ private static Type TryMakeArrayType(this Type type) } } - private static Type TryMakeArrayType(this Type type, int rank) + private static Type? TryMakeArrayType(this Type type, int rank) { try { @@ -189,7 +188,7 @@ private static Type TryMakeArrayType(this Type type, int rank) } } - private static Type TryMakeByRefType(this Type type) + private static Type? TryMakeByRefType(this Type type) { try { @@ -201,7 +200,7 @@ private static Type TryMakeByRefType(this Type type) } } - private static Type TryMakePointerType(this Type type) + private static Type? TryMakePointerType(this Type type) { try { @@ -213,7 +212,7 @@ private static Type TryMakePointerType(this Type type) } } - private static Type TryMakeGenericType(this Type type, Type[] instantiation) + private static Type? TryMakeGenericType(this Type type, Type[] instantiation) { try { diff --git a/src/Common/src/CoreLib/System/Reflection/StrongNameKeyPair.cs b/src/Common/src/CoreLib/System/Reflection/StrongNameKeyPair.cs index a0ba97f835a7..0f0abe57f6e5 100644 --- a/src/Common/src/CoreLib/System/Reflection/StrongNameKeyPair.cs +++ b/src/Common/src/CoreLib/System/Reflection/StrongNameKeyPair.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable using System.IO; using System.Runtime.Serialization; diff --git a/src/Common/src/CoreLib/System/Reflection/TypeDelegator.cs b/src/Common/src/CoreLib/System/Reflection/TypeDelegator.cs index e0be6e87b652..f9df366879e8 100644 --- a/src/Common/src/CoreLib/System/Reflection/TypeDelegator.cs +++ b/src/Common/src/CoreLib/System/Reflection/TypeDelegator.cs @@ -6,26 +6,27 @@ // // This class wraps a Type object and delegates all methods to that Type. +#nullable enable using CultureInfo = System.Globalization.CultureInfo; namespace System.Reflection { public class TypeDelegator : TypeInfo { - public override bool IsAssignableFrom(TypeInfo typeInfo) + public override bool IsAssignableFrom(TypeInfo? typeInfo) { if (typeInfo == null) return false; return IsAssignableFrom(typeInfo.AsType()); } - protected Type typeImpl; + protected Type typeImpl = null!; protected TypeDelegator() { } public TypeDelegator(Type delegatingType) { - if (delegatingType == null) + if (delegatingType is null) throw new ArgumentNullException(nameof(delegatingType)); typeImpl = delegatingType; @@ -34,8 +35,8 @@ public TypeDelegator(Type delegatingType) public override Guid GUID => typeImpl.GUID; public override int MetadataToken => typeImpl.MetadataToken; - public override object InvokeMember(string name, BindingFlags invokeAttr, Binder binder, object target, - object[] args, ParameterModifier[] modifiers, CultureInfo culture, string[] namedParameters) + public override object? InvokeMember(string name, BindingFlags invokeAttr, Binder? binder, object? target, + object[]? args, ParameterModifier[]? modifiers, CultureInfo? culture, string[]? namedParameters) { return typeImpl.InvokeMember(name, invokeAttr, binder, target, args, modifiers, culture, namedParameters); } @@ -44,21 +45,21 @@ public override object InvokeMember(string name, BindingFlags invokeAttr, Binder public override Assembly Assembly => typeImpl.Assembly; public override RuntimeTypeHandle TypeHandle => typeImpl.TypeHandle; public override string Name => typeImpl.Name; - public override string FullName => typeImpl.FullName; - public override string Namespace => typeImpl.Namespace; - public override string AssemblyQualifiedName => typeImpl.AssemblyQualifiedName; - public override Type BaseType => typeImpl.BaseType; + public override string? FullName => typeImpl.FullName; + public override string? Namespace => typeImpl.Namespace; + public override string? AssemblyQualifiedName => typeImpl.AssemblyQualifiedName; + public override Type? BaseType => typeImpl.BaseType; - protected override ConstructorInfo GetConstructorImpl(BindingFlags bindingAttr, Binder binder, - CallingConventions callConvention, Type[] types, ParameterModifier[] modifiers) + protected override ConstructorInfo? GetConstructorImpl(BindingFlags bindingAttr, Binder? binder, + CallingConventions callConvention, Type[] types, ParameterModifier[]? modifiers) { return typeImpl.GetConstructor(bindingAttr, binder, callConvention, types, modifiers); } public override ConstructorInfo[] GetConstructors(BindingFlags bindingAttr) => typeImpl.GetConstructors(bindingAttr); - protected override MethodInfo GetMethodImpl(string name, BindingFlags bindingAttr, Binder binder, - CallingConventions callConvention, Type[] types, ParameterModifier[] modifiers) + protected override MethodInfo? GetMethodImpl(string name, BindingFlags bindingAttr, Binder? binder, + CallingConventions callConvention, Type[]? types, ParameterModifier[]? modifiers) { // This is interesting there are two paths into the impl. One that validates // type as non-null and one where type may be null. @@ -70,30 +71,30 @@ protected override MethodInfo GetMethodImpl(string name, BindingFlags bindingAtt public override MethodInfo[] GetMethods(BindingFlags bindingAttr) => typeImpl.GetMethods(bindingAttr); - public override FieldInfo GetField(string name, BindingFlags bindingAttr) => typeImpl.GetField(name, bindingAttr); + public override FieldInfo? GetField(string name, BindingFlags bindingAttr) => typeImpl.GetField(name, bindingAttr); public override FieldInfo[] GetFields(BindingFlags bindingAttr) => typeImpl.GetFields(bindingAttr); - public override Type GetInterface(string name, bool ignoreCase) => typeImpl.GetInterface(name, ignoreCase); + public override Type? GetInterface(string name, bool ignoreCase) => typeImpl.GetInterface(name, ignoreCase); public override Type[] GetInterfaces() => typeImpl.GetInterfaces(); - public override EventInfo GetEvent(string name, BindingFlags bindingAttr) => typeImpl.GetEvent(name, bindingAttr); + public override EventInfo? GetEvent(string name, BindingFlags bindingAttr) => typeImpl.GetEvent(name, bindingAttr); public override EventInfo[] GetEvents() => typeImpl.GetEvents(); - protected override PropertyInfo GetPropertyImpl(string name, BindingFlags bindingAttr, Binder binder, - Type returnType, Type[] types, ParameterModifier[] modifiers) + protected override PropertyInfo? GetPropertyImpl(string name, BindingFlags bindingAttr, Binder? binder, + Type? returnType, Type[]? types, ParameterModifier[]? modifiers) { if (returnType == null && types == null) return typeImpl.GetProperty(name, bindingAttr); else - return typeImpl.GetProperty(name, bindingAttr, binder, returnType, types, modifiers); + return typeImpl.GetProperty(name, bindingAttr, binder, returnType, types!, modifiers); } public override PropertyInfo[] GetProperties(BindingFlags bindingAttr) => typeImpl.GetProperties(bindingAttr); public override EventInfo[] GetEvents(BindingFlags bindingAttr) => typeImpl.GetEvents(bindingAttr); public override Type[] GetNestedTypes(BindingFlags bindingAttr) => typeImpl.GetNestedTypes(bindingAttr); - public override Type GetNestedType(string name, BindingFlags bindingAttr) => typeImpl.GetNestedType(name, bindingAttr); + public override Type? GetNestedType(string name, BindingFlags bindingAttr) => typeImpl.GetNestedType(name, bindingAttr); public override MemberInfo[] GetMember(string name, MemberTypes type, BindingFlags bindingAttr) => typeImpl.GetMember(name, type, bindingAttr); public override MemberInfo[] GetMembers(BindingFlags bindingAttr) => typeImpl.GetMembers(bindingAttr); @@ -115,7 +116,7 @@ protected override PropertyInfo GetPropertyImpl(string name, BindingFlags bindin public override bool IsCollectible => typeImpl.IsCollectible; - public override Type GetElementType() => typeImpl.GetElementType(); + public override Type? GetElementType() => typeImpl.GetElementType(); protected override bool HasElementTypeImpl() => typeImpl.HasElementType; public override Type UnderlyingSystemType => typeImpl.UnderlyingSystemType; diff --git a/src/Common/src/CoreLib/System/Reflection/TypeFilter.cs b/src/Common/src/CoreLib/System/Reflection/TypeFilter.cs index eb049f81f902..ffb2f1fd1bde 100644 --- a/src/Common/src/CoreLib/System/Reflection/TypeFilter.cs +++ b/src/Common/src/CoreLib/System/Reflection/TypeFilter.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable namespace System.Reflection { public delegate bool TypeFilter(Type m, object filterCriteria); diff --git a/src/Common/src/CoreLib/System/Reflection/TypeInfo.cs b/src/Common/src/CoreLib/System/Reflection/TypeInfo.cs index f4add736f468..997207324276 100644 --- a/src/Common/src/CoreLib/System/Reflection/TypeInfo.cs +++ b/src/Common/src/CoreLib/System/Reflection/TypeInfo.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable using System.Collections.Generic; namespace System.Reflection @@ -15,11 +16,11 @@ protected TypeInfo() { } public virtual Type[] GenericTypeParameters => IsGenericTypeDefinition ? GetGenericArguments() : Type.EmptyTypes; - public virtual EventInfo GetDeclaredEvent(string name) => GetEvent(name, TypeInfo.DeclaredOnlyLookup); - public virtual FieldInfo GetDeclaredField(string name) => GetField(name, TypeInfo.DeclaredOnlyLookup); - public virtual MethodInfo GetDeclaredMethod(string name) => GetMethod(name, TypeInfo.DeclaredOnlyLookup); - public virtual TypeInfo GetDeclaredNestedType(string name) => GetNestedType(name, TypeInfo.DeclaredOnlyLookup)?.GetTypeInfo(); - public virtual PropertyInfo GetDeclaredProperty(string name) => GetProperty(name, TypeInfo.DeclaredOnlyLookup); + public virtual EventInfo? GetDeclaredEvent(string name) => GetEvent(name, TypeInfo.DeclaredOnlyLookup); + public virtual FieldInfo? GetDeclaredField(string name) => GetField(name, TypeInfo.DeclaredOnlyLookup); + public virtual MethodInfo? GetDeclaredMethod(string name) => GetMethod(name, TypeInfo.DeclaredOnlyLookup); + public virtual TypeInfo? GetDeclaredNestedType(string name) => GetNestedType(name, TypeInfo.DeclaredOnlyLookup)!.GetTypeInfo(); + public virtual PropertyInfo? GetDeclaredProperty(string name) => GetProperty(name, TypeInfo.DeclaredOnlyLookup); public virtual IEnumerable GetDeclaredMethods(string name) { @@ -50,7 +51,7 @@ public virtual IEnumerable DeclaredNestedTypes public virtual IEnumerable ImplementedInterfaces => GetInterfaces(); //a re-implementation of ISAF from Type, skipping the use of UnderlyingType - public virtual bool IsAssignableFrom(TypeInfo typeInfo) + public virtual bool IsAssignableFrom(TypeInfo? typeInfo) { if (typeInfo == null) return false; diff --git a/src/Common/src/CoreLib/System/Resources/ManifestBasedResourceGroveler.cs b/src/Common/src/CoreLib/System/Resources/ManifestBasedResourceGroveler.cs index 569fcf93ef41..39d4272aec0d 100644 --- a/src/Common/src/CoreLib/System/Resources/ManifestBasedResourceGroveler.cs +++ b/src/Common/src/CoreLib/System/Resources/ManifestBasedResourceGroveler.cs @@ -252,7 +252,7 @@ internal ResourceSet CreateResourceSet(Stream store, Assembly assembly) } else { - Type readerType = Type.GetType(readerTypeName, throwOnError: true); + Type readerType = Type.GetType(readerTypeName, throwOnError: true)!; object[] args = new object[1]; args[0] = store; reader = (IResourceReader)Activator.CreateInstance(readerType, args)!; @@ -265,7 +265,7 @@ internal ResourceSet CreateResourceSet(Stream store, Assembly assembly) if (_mediator.UserResourceSet == null) { Debug.Assert(resSetTypeName != null, "We should have a ResourceSet type name from the custom resource file here."); - resSetType = Type.GetType(resSetTypeName, true, false); + resSetType = Type.GetType(resSetTypeName, true, false)!; } else { @@ -325,7 +325,7 @@ internal ResourceSet CreateResourceSet(Stream store, Assembly assembly) Debug.Assert(satellite != null, "satellite shouldn't be null; check caller"); Debug.Assert(fileName != null, "fileName shouldn't be null; check caller"); - Stream? stream = satellite.GetManifestResourceStream(_mediator.LocationInfo, fileName); + Stream? stream = satellite.GetManifestResourceStream(_mediator.LocationInfo!, fileName); if (stream == null) { stream = CaseInsensitiveManifestResourceStreamLookup(satellite, fileName); diff --git a/src/Common/src/CoreLib/System/Resources/ResourceManager.Uap.cs b/src/Common/src/CoreLib/System/Resources/ResourceManager.Uap.cs index 7437ac966761..6488855b72cb 100644 --- a/src/Common/src/CoreLib/System/Resources/ResourceManager.Uap.cs +++ b/src/Common/src/CoreLib/System/Resources/ResourceManager.Uap.cs @@ -71,7 +71,7 @@ public partial class ResourceManager internal static WindowsRuntimeResourceManagerBase GetWinRTResourceManager() { #if FEATURE_APPX - Type WinRTResourceManagerType = Type.GetType("System.Resources.WindowsRuntimeResourceManager, System.Runtime.WindowsRuntime", throwOnError: true); + Type WinRTResourceManagerType = Type.GetType("System.Resources.WindowsRuntimeResourceManager, System.Runtime.WindowsRuntime", throwOnError: true)!; #else // ENABLE_WINRT Assembly hiddenScopeAssembly = Assembly.Load(Internal.Runtime.Augments.RuntimeAugments.HiddenScopeAssemblyName); Type WinRTResourceManagerType = hiddenScopeAssembly.GetType("System.Resources.WindowsRuntimeResourceManager", true); diff --git a/src/Common/src/CoreLib/System/Resources/ResourceManager.cs b/src/Common/src/CoreLib/System/Resources/ResourceManager.cs index ec5877a6c7b3..713f4e600e64 100644 --- a/src/Common/src/CoreLib/System/Resources/ResourceManager.cs +++ b/src/Common/src/CoreLib/System/Resources/ResourceManager.cs @@ -417,7 +417,7 @@ protected virtual string GetResourceFileName(CultureInfo culture) { string fileName = GetResourceFileName(culture); Debug.Assert(MainAssembly != null); - Stream stream = MainAssembly.GetManifestResourceStream(_locationInfo, fileName); + Stream? stream = MainAssembly.GetManifestResourceStream(_locationInfo!, fileName); if (createIfNotExists && stream != null) { rs = ((ManifestBasedResourceGroveler)_resourceGroveler).CreateResourceSet(stream, MainAssembly); diff --git a/src/Common/src/CoreLib/System/Resources/ResourceReader.cs b/src/Common/src/CoreLib/System/Resources/ResourceReader.cs index 156007b14f24..4b280924ea61 100644 --- a/src/Common/src/CoreLib/System/Resources/ResourceReader.cs +++ b/src/Common/src/CoreLib/System/Resources/ResourceReader.cs @@ -21,10 +21,10 @@ namespace System.Resources // Provides the default implementation of IResourceReader, reading // .resources file from the system default binary format. This class // can be treated as an enumerator once. - // - // See the RuntimeResourceSet overview for details on the system + // + // See the RuntimeResourceSet overview for details on the system // default file format. - // + // internal struct ResourceLocator { @@ -73,14 +73,14 @@ public sealed partial class private BinaryReader _store; // backing store we're reading from. // Used by RuntimeResourceSet and this class's enumerator. Maps - // resource name to a value, a ResourceLocator, or a + // resource name to a value, a ResourceLocator, or a // LooselyLinkedManifestResource. internal Dictionary? _resCache; private long _nameSectionOffset; // Offset to name section of file. private long _dataSectionOffset; // Offset to Data section of file. // Note this class is tightly coupled with UnmanagedMemoryStream. - // At runtime when getting an embedded resource from an assembly, + // At runtime when getting an embedded resource from an assembly, // we're given an UnmanagedMemoryStream referring to the mmap'ed portion // of the assembly. The pointers here are pointers into that block of // memory controlled by the OS's loader. @@ -158,7 +158,7 @@ private unsafe void Dispose(bool disposing) _resCache = null; if (disposing) { - // Close the stream in a thread-safe way. This fix means + // Close the stream in a thread-safe way. This fix means // that we may call Close n times, but that's safe. BinaryReader copyOfStore = _store; _store = null!; // TODO-NULLABLE: dispose should not null this out @@ -256,7 +256,7 @@ internal int FindPosForResource(string name) Debug.Assert(_store != null, "ResourceReader is closed!"); int hash = FastResourceComparer.HashFunction(name); - // Binary search over the hashes. Use the _namePositions array to + // Binary search over the hashes. Use the _namePositions array to // determine where they exist in the underlying stream. int lo = 0; int hi = _numResources - 1; @@ -266,7 +266,7 @@ internal int FindPosForResource(string name) { index = (lo + hi) >> 1; // Do NOT use subtraction here, since it will wrap for large - // negative numbers. + // negative numbers. int currentHash = GetNameHash(index); int c; if (currentHash == hash) @@ -291,9 +291,9 @@ internal int FindPosForResource(string name) return -1; } - // index is the location in our hash array that corresponds with a + // index is the location in our hash array that corresponds with a // value in the namePositions array. - // There could be collisions in our hash function. Check on both sides + // There could be collisions in our hash function. Check on both sides // of index to find the range of hash values that are equal to the // target hash value. if (lo != index) @@ -329,7 +329,7 @@ internal int FindPosForResource(string name) } // This compares the String in the .resources file at the current position - // with the string you pass in. + // with the string you pass in. // Whoever calls this method should make sure that they take a lock // so no one else can cause us to seek in the stream. private unsafe bool CompareStringEqualsName(string name) @@ -457,7 +457,7 @@ private unsafe string AllocateStringForNameIndex(int index, out int dataOffset) // This takes a virtual offset into the data section and reads a String // from that location. - // Anyone who calls LoadObject should make sure they take a lock so + // Anyone who calls LoadObject should make sure they take a lock so // no one can cause us to do a seek in here. internal string? LoadString(int pos) { @@ -478,7 +478,7 @@ private unsafe string AllocateStringForNameIndex(int index, out int dataOffset) ResourceTypeCode typeCode = (ResourceTypeCode)typeIndex; if (typeCode != ResourceTypeCode.String && typeCode != ResourceTypeCode.Null) { - string typeString; + string? typeString; if (typeCode < ResourceTypeCode.StartOfUserTypes) typeString = typeCode.ToString(); else @@ -513,7 +513,7 @@ private unsafe string AllocateStringForNameIndex(int index, out int dataOffset) // This takes a virtual offset into the data section and reads an Object // from that location. - // Anyone who calls LoadObject should make sure they take a lock so + // Anyone who calls LoadObject should make sure they take a lock so // no one can cause us to do a seek in here. internal object? LoadObjectV1(int pos) { @@ -522,7 +522,7 @@ private unsafe string AllocateStringForNameIndex(int index, out int dataOffset) try { - // mega try-catch performs exceptionally bad on x64; factored out body into + // mega try-catch performs exceptionally bad on x64; factored out body into // _LoadObjectV1 and wrap here. return _LoadObjectV1(pos); } @@ -543,8 +543,8 @@ private unsafe string AllocateStringForNameIndex(int index, out int dataOffset) if (typeIndex == -1) return null; Type type = FindType(typeIndex); - // Consider putting in logic to see if this type is a - // primitive or a value type first, so we can reach the + // Consider putting in logic to see if this type is a + // primitive or a value type first, so we can reach the // deserialization code faster for arbitrary objects. if (type == typeof(string)) @@ -597,7 +597,7 @@ private unsafe string AllocateStringForNameIndex(int index, out int dataOffset) try { - // mega try-catch performs exceptionally bad on x64; factored out body into + // mega try-catch performs exceptionally bad on x64; factored out body into // _LoadObjectV2 and wrap here. return _LoadObjectV2(pos, out typeCode); } @@ -715,7 +715,7 @@ private unsafe string AllocateStringForNameIndex(int index, out int dataOffset) return new PinnedBufferMemoryStream(bytes); } - // make sure we don't create an UnmanagedMemoryStream that is longer than the resource stream. + // make sure we don't create an UnmanagedMemoryStream that is longer than the resource stream. if (len > _ums.Length - _ums.Position) { throw new BadImageFormatException(SR.Format(SR.BadImageFormat_ResourceDataLengthInvalid, len)); @@ -751,7 +751,7 @@ private void ReadResources() try { - // mega try-catch performs exceptionally bad on x64; factored out body into + // mega try-catch performs exceptionally bad on x64; factored out body into // _ReadResources and wrap here. _ReadResources(); } @@ -832,8 +832,8 @@ private void _ReadResources() } // Prepare to read in the array of name hashes - // Note that the name hashes array is aligned to 8 bytes so - // we can use pointers into it on 64 bit machines. (4 bytes + // Note that the name hashes array is aligned to 8 bytes so + // we can use pointers into it on 64 bit machines. (4 bytes // may be sufficient, but let's plan for the future) // Skip over alignment stuff. All public .resources files // should be aligned No need to verify the byte values. @@ -922,7 +922,7 @@ private void _ReadResources() } } - // This allows us to delay-initialize the Type[]. This might be a + // This allows us to delay-initialize the Type[]. This might be a // good startup time savings, since we might have to load assemblies // and initialize Reflection. private Type FindType(int typeIndex) @@ -940,15 +940,15 @@ private Type FindType(int typeIndex) string typeName = _store.ReadString(); _typeTable[typeIndex] = Type.GetType(typeName, true); } - // If serialization isn't supported, we convert FileNotFoundException to - // NotSupportedException for consistency with v2. This is a corner-case, but the + // If serialization isn't supported, we convert FileNotFoundException to + // NotSupportedException for consistency with v2. This is a corner-case, but the // idea is that we want to give the user a more accurate error message. Even if // the dependency were found, we know it will require serialization since it // can't be one of the types we special case. So if the dependency were found, - // it would go down the serialization code path, resulting in NotSupported for + // it would go down the serialization code path, resulting in NotSupported for // SKUs without serialization. // - // We don't want to regress the expected case by checking the type info before + // We don't want to regress the expected case by checking the type info before // getting to Type.GetType -- this is costly with v1 resource formats. catch (FileNotFoundException) { diff --git a/src/Common/src/CoreLib/System/Runtime/CompilerServices/RuntimeHelpers.cs b/src/Common/src/CoreLib/System/Runtime/CompilerServices/RuntimeHelpers.cs index 2ec8b760bdb6..f3fb361021ec 100644 --- a/src/Common/src/CoreLib/System/Runtime/CompilerServices/RuntimeHelpers.cs +++ b/src/Common/src/CoreLib/System/Runtime/CompilerServices/RuntimeHelpers.cs @@ -45,7 +45,7 @@ ref Unsafe.Add(ref Unsafe.As(ref array.GetRawSzArrayData()), offset), else { // The array is actually a U[] where U:T. - T[] dest = (T[])Array.CreateInstance(array.GetType().GetElementType(), length); + T[] dest = (T[])Array.CreateInstance(array.GetType().GetElementType()!, length); Array.Copy(array, offset, dest, 0, length); return dest; } diff --git a/src/Common/src/CoreLib/System/Runtime/InteropServices/ComSourceInterfacesAttribute.cs b/src/Common/src/CoreLib/System/Runtime/InteropServices/ComSourceInterfacesAttribute.cs index b5ea55c2813e..aa1a6a283cec 100644 --- a/src/Common/src/CoreLib/System/Runtime/InteropServices/ComSourceInterfacesAttribute.cs +++ b/src/Common/src/CoreLib/System/Runtime/InteropServices/ComSourceInterfacesAttribute.cs @@ -15,7 +15,7 @@ public ComSourceInterfacesAttribute(string sourceInterfaces) public ComSourceInterfacesAttribute(Type sourceInterface) { - Value = sourceInterface.FullName; + Value = sourceInterface.FullName!; } public ComSourceInterfacesAttribute(Type sourceInterface1, Type sourceInterface2) diff --git a/src/Common/src/CoreLib/System/Runtime/InteropServices/Marshal.cs b/src/Common/src/CoreLib/System/Runtime/InteropServices/Marshal.cs index 7cdab7b2aa72..afe298e0b3b1 100644 --- a/src/Common/src/CoreLib/System/Runtime/InteropServices/Marshal.cs +++ b/src/Common/src/CoreLib/System/Runtime/InteropServices/Marshal.cs @@ -831,7 +831,7 @@ public static Guid GenerateGuidForType(Type type) /// a PROGID in the metadata then it is returned otherwise a stable PROGID /// is generated based on the fully qualified name of the type. /// - public static string GenerateProgIdForType(Type type) + public static string? GenerateProgIdForType(Type type) { if (type is null) { diff --git a/src/Common/src/CoreLib/System/Runtime/Serialization/SerializationInfo.cs b/src/Common/src/CoreLib/System/Runtime/Serialization/SerializationInfo.cs index e30e7d394ac4..e3e7c930d895 100644 --- a/src/Common/src/CoreLib/System/Runtime/Serialization/SerializationInfo.cs +++ b/src/Common/src/CoreLib/System/Runtime/Serialization/SerializationInfo.cs @@ -176,8 +176,8 @@ public SerializationInfo(Type type, IFormatterConverter converter) } _rootType = type; - _rootTypeName = type.FullName; - _rootTypeAssemblyName = type.Module.Assembly.FullName; + _rootTypeName = type.FullName!; + _rootTypeAssemblyName = type.Module.Assembly.FullName!; _names = new string[DefaultSize]; _values = new object[DefaultSize]; @@ -238,8 +238,8 @@ public void SetType(Type type) if (!ReferenceEquals(_rootType, type)) { _rootType = type; - _rootTypeName = type.FullName; - _rootTypeAssemblyName = type.Module.Assembly.FullName; + _rootTypeName = type.FullName!; + _rootTypeAssemblyName = type.Module.Assembly.FullName!; IsFullTypeNameSetExplicit = false; IsAssemblyNameSetExplicit = false; } diff --git a/src/Common/src/CoreLib/System/Type.Enum.cs b/src/Common/src/CoreLib/System/Type.Enum.cs index 84a648270938..006f8e94cffe 100644 --- a/src/Common/src/CoreLib/System/Type.Enum.cs +++ b/src/Common/src/CoreLib/System/Type.Enum.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable using System.Reflection; using System.Collections; using System.Collections.Generic; @@ -64,7 +65,7 @@ public virtual bool IsEnumDefined(object value) } } - public virtual string GetEnumName(object value) + public virtual string? GetEnumName(object value) { if (value == null) throw new ArgumentNullException(nameof(value)); @@ -162,7 +163,7 @@ private static int BinarySearch(Array array, object value) { ulong[] ulArray = new ulong[array.Length]; for (int i = 0; i < array.Length; ++i) - ulArray[i] = Enum.ToUInt64(array.GetValue(i)); + ulArray[i] = Enum.ToUInt64(array.GetValue(i)!); ulong ulValue = Enum.ToUInt64(value); diff --git a/src/Common/src/CoreLib/System/Type.Helpers.cs b/src/Common/src/CoreLib/System/Type.Helpers.cs index 1d3c3b8e8e39..c83b8f844987 100644 --- a/src/Common/src/CoreLib/System/Type.Helpers.cs +++ b/src/Common/src/CoreLib/System/Type.Helpers.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable using System.Reflection; namespace System @@ -16,7 +17,7 @@ public virtual bool IsSerializable if ((GetAttributeFlagsImpl() & TypeAttributes.Serializable) != 0) return true; - Type underlyingType = UnderlyingSystemType; + Type? underlyingType = UnderlyingSystemType; if (underlyingType.IsRuntimeImplemented()) { do @@ -66,7 +67,7 @@ internal Type GetRootElementType() Type rootElementType = this; while (rootElementType.HasElementType) - rootElementType = rootElementType.GetElementType(); + rootElementType = rootElementType.GetElementType()!; return rootElementType; } @@ -76,8 +77,7 @@ public bool IsVisible get { #if CORECLR - RuntimeType rt = this as RuntimeType; - if (rt != null) + if (this is RuntimeType rt) return RuntimeTypeHandle.IsVisible(rt); #endif //CORECLR @@ -85,7 +85,7 @@ public bool IsVisible return true; if (HasElementType) - return GetElementType().IsVisible; + return GetElementType()!.IsVisible; Type type = this; while (type.IsNested) @@ -94,7 +94,7 @@ public bool IsVisible return false; // this should be null for non-nested types. - type = type.DeclaringType; + type = type.DeclaringType!; } // Now "type" should be a top level type @@ -119,37 +119,37 @@ public virtual Type[] FindInterfaces(TypeFilter filter, object filterCriteria) if (filter == null) throw new ArgumentNullException(nameof(filter)); - Type[] c = GetInterfaces(); + Type?[] c = GetInterfaces(); int cnt = 0; for (int i = 0; i < c.Length; i++) { - if (!filter(c[i], filterCriteria)) + if (!filter(c[i]!, filterCriteria)) c[i] = null; else cnt++; } if (cnt == c.Length) - return c; + return c!; Type[] ret = new Type[cnt]; cnt = 0; for (int i = 0; i < c.Length; i++) { if (c[i] != null) - ret[cnt++] = c[i]; + ret[cnt++] = c[i]!; // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/34644 } return ret; } - public virtual MemberInfo[] FindMembers(MemberTypes memberType, BindingFlags bindingAttr, MemberFilter filter, object filterCriteria) + public virtual MemberInfo[] FindMembers(MemberTypes memberType, BindingFlags bindingAttr, MemberFilter? filter, object filterCriteria) { // Define the work arrays - MethodInfo[] m = null; - ConstructorInfo[] c = null; - FieldInfo[] f = null; - PropertyInfo[] p = null; - EventInfo[] e = null; - Type[] t = null; + MethodInfo?[]? m = null; + ConstructorInfo?[]? c = null; + FieldInfo?[]? f = null; + PropertyInfo?[]? p = null; + EventInfo?[]? e = null; + Type?[]? t = null; int i = 0; int cnt = 0; // Total Matchs @@ -161,7 +161,7 @@ public virtual MemberInfo[] FindMembers(MemberTypes memberType, BindingFlags bin if (filter != null) { for (i = 0; i < m.Length; i++) - if (!filter(m[i], filterCriteria)) + if (!filter(m[i]!, filterCriteria)) m[i] = null; else cnt++; @@ -179,7 +179,7 @@ public virtual MemberInfo[] FindMembers(MemberTypes memberType, BindingFlags bin if (filter != null) { for (i = 0; i < c.Length; i++) - if (!filter(c[i], filterCriteria)) + if (!filter(c[i]!, filterCriteria)) c[i] = null; else cnt++; @@ -197,7 +197,7 @@ public virtual MemberInfo[] FindMembers(MemberTypes memberType, BindingFlags bin if (filter != null) { for (i = 0; i < f.Length; i++) - if (!filter(f[i], filterCriteria)) + if (!filter(f[i]!, filterCriteria)) f[i] = null; else cnt++; @@ -215,7 +215,7 @@ public virtual MemberInfo[] FindMembers(MemberTypes memberType, BindingFlags bin if (filter != null) { for (i = 0; i < p.Length; i++) - if (!filter(p[i], filterCriteria)) + if (!filter(p[i]!, filterCriteria)) p[i] = null; else cnt++; @@ -233,7 +233,7 @@ public virtual MemberInfo[] FindMembers(MemberTypes memberType, BindingFlags bin if (filter != null) { for (i = 0; i < e.Length; i++) - if (!filter(e[i], filterCriteria)) + if (!filter(e[i]!, filterCriteria)) e[i] = null; else cnt++; @@ -251,7 +251,7 @@ public virtual MemberInfo[] FindMembers(MemberTypes memberType, BindingFlags bin if (filter != null) { for (i = 0; i < t.Length; i++) - if (!filter(t[i], filterCriteria)) + if (!filter(t[i]!, filterCriteria)) t[i] = null; else cnt++; @@ -271,7 +271,7 @@ public virtual MemberInfo[] FindMembers(MemberTypes memberType, BindingFlags bin { for (i = 0; i < m.Length; i++) if (m[i] != null) - ret[cnt++] = m[i]; + ret[cnt++] = m[i]!; // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/34644 } // Copy the Constructors @@ -279,7 +279,7 @@ public virtual MemberInfo[] FindMembers(MemberTypes memberType, BindingFlags bin { for (i = 0; i < c.Length; i++) if (c[i] != null) - ret[cnt++] = c[i]; + ret[cnt++] = c[i]!; // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/34644 } // Copy the Fields @@ -287,7 +287,7 @@ public virtual MemberInfo[] FindMembers(MemberTypes memberType, BindingFlags bin { for (i = 0; i < f.Length; i++) if (f[i] != null) - ret[cnt++] = f[i]; + ret[cnt++] = f[i]!; // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/34644 } // Copy the Properties @@ -295,7 +295,7 @@ public virtual MemberInfo[] FindMembers(MemberTypes memberType, BindingFlags bin { for (i = 0; i < p.Length; i++) if (p[i] != null) - ret[cnt++] = p[i]; + ret[cnt++] = p[i]!; // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/34644 } // Copy the Events @@ -303,7 +303,7 @@ public virtual MemberInfo[] FindMembers(MemberTypes memberType, BindingFlags bin { for (i = 0; i < e.Length; i++) if (e[i] != null) - ret[cnt++] = e[i]; + ret[cnt++] = e[i]!; // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/34644 } // Copy the Types @@ -311,7 +311,7 @@ public virtual MemberInfo[] FindMembers(MemberTypes memberType, BindingFlags bin { for (i = 0; i < t.Length; i++) if (t[i] != null) - ret[cnt++] = t[i]; + ret[cnt++] = t[i]!; // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/34644 } return ret; @@ -319,7 +319,7 @@ public virtual MemberInfo[] FindMembers(MemberTypes memberType, BindingFlags bin public virtual bool IsSubclassOf(Type c) { - Type p = this; + Type? p = this; if (p == c) return false; while (p != null) @@ -331,7 +331,7 @@ public virtual bool IsSubclassOf(Type c) return false; } - public virtual bool IsAssignableFrom(Type c) + public virtual bool IsAssignableFrom(Type? c) { if (c == null) return false; @@ -368,7 +368,7 @@ public virtual bool IsAssignableFrom(Type c) internal bool ImplementInterface(Type ifaceType) { - Type t = this; + Type? t = this; while (t != null) { Type[] interfaces = t.GetInterfaces(); diff --git a/src/Common/src/CoreLib/System/Type.cs b/src/Common/src/CoreLib/System/Type.cs index d2a31cbf675b..6162e12383f5 100644 --- a/src/Common/src/CoreLib/System/Type.cs +++ b/src/Common/src/CoreLib/System/Type.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable using System.Threading; using System.Reflection; using System.Diagnostics; @@ -18,18 +19,18 @@ protected Type() { } public new Type GetType() => base.GetType(); - public abstract string Namespace { get; } - public abstract string AssemblyQualifiedName { get; } - public abstract string FullName { get; } + public abstract string? Namespace { get; } + public abstract string? AssemblyQualifiedName { get; } + public abstract string? FullName { get; } public abstract Assembly Assembly { get; } public abstract new Module Module { get; } public bool IsNested => DeclaringType != null; - public override Type DeclaringType => null; - public virtual MethodBase DeclaringMethod => null; + public override Type? DeclaringType => null; + public virtual MethodBase? DeclaringMethod => null; - public override Type ReflectedType => null; + public override Type? ReflectedType => null; public abstract Type UnderlyingSystemType { get; } public virtual bool IsTypeDefinition { get { throw NotImplemented.ByDesign; } } @@ -41,7 +42,7 @@ protected Type() { } protected abstract bool IsPointerImpl(); public virtual bool IsConstructedGenericType { get { throw NotImplemented.ByDesign; } } public virtual bool IsGenericParameter => false; - public virtual bool IsGenericTypeParameter => IsGenericParameter && DeclaringMethod == null; + public virtual bool IsGenericTypeParameter => IsGenericParameter && DeclaringMethod is null; public virtual bool IsGenericMethodParameter => IsGenericParameter && DeclaringMethod != null; public virtual bool IsGenericType => false; public virtual bool IsGenericTypeDefinition => false; @@ -53,7 +54,7 @@ protected Type() { } public bool HasElementType => HasElementTypeImpl(); protected abstract bool HasElementTypeImpl(); - public abstract Type GetElementType(); + public abstract Type? GetElementType(); public virtual int GetArrayRank() { throw new NotSupportedException(SR.NotSupported_SubclassOverride); } @@ -116,12 +117,12 @@ public virtual Type[] GetGenericParameterConstraints() public virtual bool IsSecuritySafeCritical { get { throw NotImplemented.ByDesign; } } public virtual bool IsSecurityTransparent { get { throw NotImplemented.ByDesign; } } - public virtual StructLayoutAttribute StructLayoutAttribute { get { throw new NotSupportedException(); } } - public ConstructorInfo TypeInitializer => GetConstructorImpl(BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic, null, CallingConventions.Any, Type.EmptyTypes, null); + public virtual StructLayoutAttribute? StructLayoutAttribute { get { throw new NotSupportedException(); } } + public ConstructorInfo? TypeInitializer => GetConstructorImpl(BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic, null, CallingConventions.Any, Type.EmptyTypes, null); - public ConstructorInfo GetConstructor(Type[] types) => GetConstructor(BindingFlags.Public | BindingFlags.Instance, null, types, null); - public ConstructorInfo GetConstructor(BindingFlags bindingAttr, Binder binder, Type[] types, ParameterModifier[] modifiers) => GetConstructor(bindingAttr, binder, CallingConventions.Any, types, modifiers); - public ConstructorInfo GetConstructor(BindingFlags bindingAttr, Binder binder, CallingConventions callConvention, Type[] types, ParameterModifier[] modifiers) + public ConstructorInfo? GetConstructor(Type[] types) => GetConstructor(BindingFlags.Public | BindingFlags.Instance, null, types, null); + public ConstructorInfo? GetConstructor(BindingFlags bindingAttr, Binder? binder, Type[] types, ParameterModifier[]? modifiers) => GetConstructor(bindingAttr, binder, CallingConventions.Any, types, modifiers); + public ConstructorInfo? GetConstructor(BindingFlags bindingAttr, Binder? binder, CallingConventions callConvention, Type[] types, ParameterModifier[]? modifiers) { if (types == null) throw new ArgumentNullException(nameof(types)); @@ -132,19 +133,19 @@ public ConstructorInfo GetConstructor(BindingFlags bindingAttr, Binder binder, C } return GetConstructorImpl(bindingAttr, binder, callConvention, types, modifiers); } - protected abstract ConstructorInfo GetConstructorImpl(BindingFlags bindingAttr, Binder binder, CallingConventions callConvention, Type[] types, ParameterModifier[] modifiers); + protected abstract ConstructorInfo? GetConstructorImpl(BindingFlags bindingAttr, Binder? binder, CallingConventions callConvention, Type[] types, ParameterModifier[]? modifiers); public ConstructorInfo[] GetConstructors() => GetConstructors(BindingFlags.Public | BindingFlags.Instance); public abstract ConstructorInfo[] GetConstructors(BindingFlags bindingAttr); - public EventInfo GetEvent(string name) => GetEvent(name, Type.DefaultLookup); - public abstract EventInfo GetEvent(string name, BindingFlags bindingAttr); + public EventInfo? GetEvent(string name) => GetEvent(name, Type.DefaultLookup); + public abstract EventInfo? GetEvent(string name, BindingFlags bindingAttr); public virtual EventInfo[] GetEvents() => GetEvents(Type.DefaultLookup); public abstract EventInfo[] GetEvents(BindingFlags bindingAttr); - public FieldInfo GetField(string name) => GetField(name, Type.DefaultLookup); - public abstract FieldInfo GetField(string name, BindingFlags bindingAttr); + public FieldInfo? GetField(string name) => GetField(name, Type.DefaultLookup); + public abstract FieldInfo? GetField(string name, BindingFlags bindingAttr); public FieldInfo[] GetFields() => GetFields(Type.DefaultLookup); public abstract FieldInfo[] GetFields(BindingFlags bindingAttr); @@ -156,18 +157,18 @@ public ConstructorInfo GetConstructor(BindingFlags bindingAttr, Binder binder, C public MemberInfo[] GetMembers() => GetMembers(Type.DefaultLookup); public abstract MemberInfo[] GetMembers(BindingFlags bindingAttr); - public MethodInfo GetMethod(string name) => GetMethod(name, Type.DefaultLookup); - public MethodInfo GetMethod(string name, BindingFlags bindingAttr) + public MethodInfo? GetMethod(string name) => GetMethod(name, Type.DefaultLookup); + public MethodInfo? GetMethod(string name, BindingFlags bindingAttr) { if (name == null) throw new ArgumentNullException(nameof(name)); return GetMethodImpl(name, bindingAttr, null, CallingConventions.Any, null, null); } - public MethodInfo GetMethod(string name, Type[] types) => GetMethod(name, types, null); - public MethodInfo GetMethod(string name, Type[] types, ParameterModifier[] modifiers) => GetMethod(name, Type.DefaultLookup, null, types, modifiers); - public MethodInfo GetMethod(string name, BindingFlags bindingAttr, Binder binder, Type[] types, ParameterModifier[] modifiers) => GetMethod(name, bindingAttr, binder, CallingConventions.Any, types, modifiers); - public MethodInfo GetMethod(string name, BindingFlags bindingAttr, Binder binder, CallingConventions callConvention, Type[] types, ParameterModifier[] modifiers) + public MethodInfo? GetMethod(string name, Type[] types) => GetMethod(name, types, null); + public MethodInfo? GetMethod(string name, Type[] types, ParameterModifier[]? modifiers) => GetMethod(name, Type.DefaultLookup, null, types, modifiers); + public MethodInfo? GetMethod(string name, BindingFlags bindingAttr, Binder? binder, Type[] types, ParameterModifier[]? modifiers) => GetMethod(name, bindingAttr, binder, CallingConventions.Any, types, modifiers); + public MethodInfo? GetMethod(string name, BindingFlags bindingAttr, Binder? binder, CallingConventions callConvention, Type[] types, ParameterModifier[]? modifiers) { if (name == null) throw new ArgumentNullException(nameof(name)); @@ -181,12 +182,12 @@ public MethodInfo GetMethod(string name, BindingFlags bindingAttr, Binder binder return GetMethodImpl(name, bindingAttr, binder, callConvention, types, modifiers); } - protected abstract MethodInfo GetMethodImpl(string name, BindingFlags bindingAttr, Binder binder, CallingConventions callConvention, Type[] types, ParameterModifier[] modifiers); + protected abstract MethodInfo? GetMethodImpl(string name, BindingFlags bindingAttr, Binder? binder, CallingConventions callConvention, Type[]? types, ParameterModifier[]? modifiers); - public MethodInfo GetMethod(string name, int genericParameterCount, Type[] types) => GetMethod(name, genericParameterCount, types, null); - public MethodInfo GetMethod(string name, int genericParameterCount, Type[] types, ParameterModifier[] modifiers) => GetMethod(name, genericParameterCount, Type.DefaultLookup, null, types, modifiers); - public MethodInfo GetMethod(string name, int genericParameterCount, BindingFlags bindingAttr, Binder binder, Type[] types, ParameterModifier[] modifiers) => GetMethod(name, genericParameterCount, bindingAttr, binder, CallingConventions.Any, types, modifiers); - public MethodInfo GetMethod(string name, int genericParameterCount, BindingFlags bindingAttr, Binder binder, CallingConventions callConvention, Type[] types, ParameterModifier[] modifiers) + public MethodInfo? GetMethod(string name, int genericParameterCount, Type[] types) => GetMethod(name, genericParameterCount, types, null); + public MethodInfo? GetMethod(string name, int genericParameterCount, Type[] types, ParameterModifier[]? modifiers) => GetMethod(name, genericParameterCount, Type.DefaultLookup, null, types, modifiers); + public MethodInfo? GetMethod(string name, int genericParameterCount, BindingFlags bindingAttr, Binder? binder, Type[] types, ParameterModifier[]? modifiers) => GetMethod(name, genericParameterCount, bindingAttr, binder, CallingConventions.Any, types, modifiers); + public MethodInfo? GetMethod(string name, int genericParameterCount, BindingFlags bindingAttr, Binder? binder, CallingConventions callConvention, Type[] types, ParameterModifier[]? modifiers) { if (name == null) throw new ArgumentNullException(nameof(name)); @@ -202,26 +203,26 @@ public MethodInfo GetMethod(string name, int genericParameterCount, BindingFlags return GetMethodImpl(name, genericParameterCount, bindingAttr, binder, callConvention, types, modifiers); } - protected virtual MethodInfo GetMethodImpl(string name, int genericParameterCount, BindingFlags bindingAttr, Binder binder, CallingConventions callConvention, Type[] types, ParameterModifier[] modifiers) => throw new NotSupportedException(); + protected virtual MethodInfo? GetMethodImpl(string name, int genericParameterCount, BindingFlags bindingAttr, Binder? binder, CallingConventions callConvention, Type[]? types, ParameterModifier[]? modifiers) => throw new NotSupportedException(); public MethodInfo[] GetMethods() => GetMethods(Type.DefaultLookup); public abstract MethodInfo[] GetMethods(BindingFlags bindingAttr); - public Type GetNestedType(string name) => GetNestedType(name, Type.DefaultLookup); - public abstract Type GetNestedType(string name, BindingFlags bindingAttr); + public Type? GetNestedType(string name) => GetNestedType(name, Type.DefaultLookup); + public abstract Type? GetNestedType(string name, BindingFlags bindingAttr); public Type[] GetNestedTypes() => GetNestedTypes(Type.DefaultLookup); public abstract Type[] GetNestedTypes(BindingFlags bindingAttr); - public PropertyInfo GetProperty(string name) => GetProperty(name, Type.DefaultLookup); - public PropertyInfo GetProperty(string name, BindingFlags bindingAttr) + public PropertyInfo? GetProperty(string name) => GetProperty(name, Type.DefaultLookup); + public PropertyInfo? GetProperty(string name, BindingFlags bindingAttr) { if (name == null) throw new ArgumentNullException(nameof(name)); return GetPropertyImpl(name, bindingAttr, null, null, null, null); } - public PropertyInfo GetProperty(string name, Type returnType) + public PropertyInfo? GetProperty(string name, Type returnType) { if (name == null) throw new ArgumentNullException(nameof(name)); @@ -230,10 +231,10 @@ public PropertyInfo GetProperty(string name, Type returnType) return GetPropertyImpl(name, Type.DefaultLookup, null, returnType, null, null); } - public PropertyInfo GetProperty(string name, Type[] types) => GetProperty(name, null, types); - public PropertyInfo GetProperty(string name, Type returnType, Type[] types) => GetProperty(name, returnType, types, null); - public PropertyInfo GetProperty(string name, Type returnType, Type[] types, ParameterModifier[] modifiers) => GetProperty(name, Type.DefaultLookup, null, returnType, types, modifiers); - public PropertyInfo GetProperty(string name, BindingFlags bindingAttr, Binder binder, Type returnType, Type[] types, ParameterModifier[] modifiers) + public PropertyInfo? GetProperty(string name, Type[] types) => GetProperty(name, null, types); + public PropertyInfo? GetProperty(string name, Type? returnType, Type[] types) => GetProperty(name, returnType, types, null); + public PropertyInfo? GetProperty(string name, Type? returnType, Type[] types, ParameterModifier[]? modifiers) => GetProperty(name, Type.DefaultLookup, null, returnType, types, modifiers); + public PropertyInfo? GetProperty(string name, BindingFlags bindingAttr, Binder? binder, Type? returnType, Type[] types, ParameterModifier[]? modifiers) { if (name == null) throw new ArgumentNullException(nameof(name)); @@ -242,7 +243,7 @@ public PropertyInfo GetProperty(string name, BindingFlags bindingAttr, Binder bi return GetPropertyImpl(name, bindingAttr, binder, returnType, types, modifiers); } - protected abstract PropertyInfo GetPropertyImpl(string name, BindingFlags bindingAttr, Binder binder, Type returnType, Type[] types, ParameterModifier[] modifiers); + protected abstract PropertyInfo? GetPropertyImpl(string name, BindingFlags bindingAttr, Binder? binder, Type? returnType, Type[]? types, ParameterModifier[]? modifiers); public PropertyInfo[] GetProperties() => GetProperties(Type.DefaultLookup); public abstract PropertyInfo[] GetProperties(BindingFlags bindingAttr); @@ -273,7 +274,7 @@ public static Type[] GetTypeArray(object[] args) return cls; } - public static TypeCode GetTypeCode(Type type) + public static TypeCode GetTypeCode(Type? type) { if (type == null) return TypeCode.Empty; @@ -292,31 +293,31 @@ protected virtual TypeCode GetTypeCodeImpl() public static Type GetTypeFromCLSID(Guid clsid) => GetTypeFromCLSID(clsid, null, throwOnError: false); public static Type GetTypeFromCLSID(Guid clsid, bool throwOnError) => GetTypeFromCLSID(clsid, null, throwOnError: throwOnError); - public static Type GetTypeFromCLSID(Guid clsid, string server) => GetTypeFromCLSID(clsid, server, throwOnError: false); + public static Type GetTypeFromCLSID(Guid clsid, string? server) => GetTypeFromCLSID(clsid, server, throwOnError: false); public static Type GetTypeFromProgID(string progID) => GetTypeFromProgID(progID, null, throwOnError: false); public static Type GetTypeFromProgID(string progID, bool throwOnError) => GetTypeFromProgID(progID, null, throwOnError: throwOnError); - public static Type GetTypeFromProgID(string progID, string server) => GetTypeFromProgID(progID, server, throwOnError: false); + public static Type GetTypeFromProgID(string progID, string? server) => GetTypeFromProgID(progID, server, throwOnError: false); - public abstract Type BaseType { get; } + public abstract Type? BaseType { get; } [DebuggerHidden] [DebuggerStepThrough] - public object InvokeMember(string name, BindingFlags invokeAttr, Binder binder, object target, object[] args) => InvokeMember(name, invokeAttr, binder, target, args, null, null, null); + public object? InvokeMember(string name, BindingFlags invokeAttr, Binder? binder, object? target, object[]? args) => InvokeMember(name, invokeAttr, binder, target, args, null, null, null); [DebuggerHidden] [DebuggerStepThrough] - public object InvokeMember(string name, BindingFlags invokeAttr, Binder binder, object target, object[] args, CultureInfo culture) => InvokeMember(name, invokeAttr, binder, target, args, null, culture, null); - public abstract object InvokeMember(string name, BindingFlags invokeAttr, Binder binder, object target, object[] args, ParameterModifier[] modifiers, CultureInfo culture, string[] namedParameters); + public object? InvokeMember(string name, BindingFlags invokeAttr, Binder? binder, object? target, object[]? args, CultureInfo? culture) => InvokeMember(name, invokeAttr, binder, target, args, null, culture, null); + public abstract object? InvokeMember(string name, BindingFlags invokeAttr, Binder? binder, object? target, object[]? args, ParameterModifier[]? modifiers, CultureInfo? culture, string[]? namedParameters); - public Type GetInterface(string name) => GetInterface(name, ignoreCase: false); - public abstract Type GetInterface(string name, bool ignoreCase); + public Type? GetInterface(string name) => GetInterface(name, ignoreCase: false); + public abstract Type? GetInterface(string name, bool ignoreCase); public abstract Type[] GetInterfaces(); public virtual InterfaceMapping GetInterfaceMap(Type interfaceType) { throw new NotSupportedException(SR.NotSupported_SubclassOverride); } - public virtual bool IsInstanceOfType(object o) => o == null ? false : IsAssignableFrom(o.GetType()); - public virtual bool IsEquivalentTo(Type other) => this == other; + public virtual bool IsInstanceOfType(object? o) => o == null ? false : IsAssignableFrom(o.GetType()); + public virtual bool IsEquivalentTo(Type? other) => this == other; public virtual Type GetEnumUnderlyingType() { @@ -356,7 +357,7 @@ public static Type MakeGenericMethodParameter(int position) public override string ToString() => "Type: " + Name; // Why do we add the "Type: " prefix? - public override bool Equals(object o) => o == null ? false : Equals(o as Type); + public override bool Equals(object? o) => o == null ? false : Equals(o as Type); public override int GetHashCode() { Type systemType = UnderlyingSystemType; @@ -364,7 +365,7 @@ public override int GetHashCode() return systemType.GetHashCode(); return base.GetHashCode(); } - public virtual bool Equals(Type o) => o == null ? false : object.ReferenceEquals(this.UnderlyingSystemType, o.UnderlyingSystemType); + public virtual bool Equals(Type? o) => o == null ? false : object.ReferenceEquals(this.UnderlyingSystemType, o.UnderlyingSystemType); public static Type ReflectionOnlyGetType(string typeName, bool throwIfNotFound, bool ignoreCase) { throw new PlatformNotSupportedException(SR.PlatformNotSupported_ReflectionOnly); } @@ -375,13 +376,13 @@ public static Binder DefaultBinder if (s_defaultBinder == null) { DefaultBinder binder = new DefaultBinder(); - Interlocked.CompareExchange(ref s_defaultBinder, binder, null); + Interlocked.CompareExchange(ref s_defaultBinder, binder, null); } - return s_defaultBinder; + return s_defaultBinder!; } } - private static volatile Binder s_defaultBinder; + private static volatile Binder? s_defaultBinder; public static readonly char Delimiter = '.'; public static readonly Type[] EmptyTypes = Array.Empty(); From b09833465a8032706e6ceb5ac9a769082deecfd8 Mon Sep 17 00:00:00 2001 From: Santiago Fernandez Madero Date: Thu, 25 Apr 2019 16:12:35 -0700 Subject: [PATCH 153/607] Nullable: Comparers, Dictionary and Friends (dotnet/coreclr#23971) * Nullable: Comparers, Dictionary and Friends * Add object constraint to Dictionary * Fix warning from new compiler and annotating dictionary * PR Feedback Signed-off-by: dotnet-bot --- src/Common/src/CoreLib/System/Array.cs | 4 +- .../System/Collections/DictionaryEntry.cs | 9 +- .../Collections/Generic/ArraySortHelper.cs | 15 +- .../System/Collections/Generic/Comparer.cs | 17 +- .../System/Collections/Generic/Dictionary.cs | 227 +++++++++--------- .../Collections/Generic/EqualityComparer.cs | 19 +- .../Collections/Generic/KeyValuePair.cs | 3 +- .../CoreLib/System/Collections/IDictionary.cs | 6 +- .../Collections/IDictionaryEnumerator.cs | 3 +- .../System/Collections/IEqualityComparer.cs | 5 +- .../System/Security/SecurityElement.cs | 2 +- src/Common/src/CoreLib/System/Tuple.cs | 28 +-- src/Common/src/CoreLib/System/ValueTuple.cs | 92 +++---- 13 files changed, 223 insertions(+), 207 deletions(-) diff --git a/src/Common/src/CoreLib/System/Array.cs b/src/Common/src/CoreLib/System/Array.cs index 592cd55bd307..6bda3a65733b 100644 --- a/src/Common/src/CoreLib/System/Array.cs +++ b/src/Common/src/CoreLib/System/Array.cs @@ -384,7 +384,7 @@ int IStructuralEquatable.GetHashCode(IEqualityComparer comparer) for (int i = (this.Length >= 8 ? this.Length - 8 : 0); i < this.Length; i++) { - ret = CombineHashCodes(ret, comparer!.GetHashCode(GetValue(i))); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + ret = CombineHashCodes(ret, comparer!.GetHashCode(GetValue(i)!)); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 } return ret; @@ -1592,7 +1592,7 @@ public static void Sort(T[] array, Comparison comparison) ThrowHelper.ThrowArgumentNullException(ExceptionArgument.comparison); } - ArraySortHelper.Sort(array!, 0, array!.Length, comparison); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + ArraySortHelper.Sort(array!, 0, array!.Length, comparison!); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 } public static bool TrueForAll(T[] array, Predicate match) diff --git a/src/Common/src/CoreLib/System/Collections/DictionaryEntry.cs b/src/Common/src/CoreLib/System/Collections/DictionaryEntry.cs index 187301a08f49..b2070224ed07 100644 --- a/src/Common/src/CoreLib/System/Collections/DictionaryEntry.cs +++ b/src/Common/src/CoreLib/System/Collections/DictionaryEntry.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable using System.ComponentModel; namespace System.Collections @@ -13,11 +14,11 @@ namespace System.Collections public struct DictionaryEntry { private object _key; // Do not rename (binary serialization) - private object _value; // Do not rename (binary serialization) + private object? _value; // Do not rename (binary serialization) // Constructs a new DictionaryEnumerator by setting the Key // and Value fields appropriately. - public DictionaryEntry(object key, object value) + public DictionaryEntry(object key, object? value) { _key = key; _value = value; @@ -36,7 +37,7 @@ public object Key } } - public object Value + public object? Value { get { @@ -50,7 +51,7 @@ public object Value } [EditorBrowsable(EditorBrowsableState.Never)] - public void Deconstruct(out object key, out object value) + public void Deconstruct(out object key, out object? value) { key = Key; value = Value; diff --git a/src/Common/src/CoreLib/System/Collections/Generic/ArraySortHelper.cs b/src/Common/src/CoreLib/System/Collections/Generic/ArraySortHelper.cs index 03b9865044f6..7d7d94580a8c 100644 --- a/src/Common/src/CoreLib/System/Collections/Generic/ArraySortHelper.cs +++ b/src/Common/src/CoreLib/System/Collections/Generic/ArraySortHelper.cs @@ -13,6 +13,7 @@ ** ===========================================================*/ +#nullable enable using System.Diagnostics; using System.Runtime.CompilerServices; @@ -38,7 +39,7 @@ internal static int FloorLog2PlusOne(int n) return result; } - internal static void ThrowOrIgnoreBadComparer(object comparer) + internal static void ThrowOrIgnoreBadComparer(object? comparer) { throw new ArgumentException(SR.Format(SR.Arg_BogusIComparer, comparer)); } @@ -48,7 +49,7 @@ internal partial class ArraySortHelper { #region IArraySortHelper Members - public void Sort(T[] keys, int index, int length, IComparer comparer) + public void Sort(T[] keys, int index, int length, IComparer? comparer) { Debug.Assert(keys != null, "Check the arguments in the caller!"); Debug.Assert(index >= 0 && length >= 0 && (keys.Length - index >= length), "Check the arguments in the caller!"); @@ -74,7 +75,7 @@ public void Sort(T[] keys, int index, int length, IComparer comparer) } } - public int BinarySearch(T[] array, int index, int length, T value, IComparer comparer) + public int BinarySearch(T[] array, int index, int length, T value, IComparer? comparer) { try { @@ -335,7 +336,7 @@ internal partial class GenericArraySortHelper #region IArraySortHelper Members - public void Sort(T[] keys, int index, int length, IComparer comparer) + public void Sort(T[] keys, int index, int length, IComparer? comparer) { Debug.Assert(keys != null, "Check the arguments in the caller!"); Debug.Assert(index >= 0 && length >= 0 && (keys.Length - index >= length), "Check the arguments in the caller!"); @@ -361,7 +362,7 @@ public void Sort(T[] keys, int index, int length, IComparer comparer) } } - public int BinarySearch(T[] array, int index, int length, T value, IComparer comparer) + public int BinarySearch(T[] array, int index, int length, T value, IComparer? comparer) { Debug.Assert(array != null, "Check the arguments in the caller!"); Debug.Assert(index >= 0 && length >= 0 && (array.Length - index >= length), "Check the arguments in the caller!"); @@ -624,7 +625,7 @@ private static void InsertionSort(T[] keys, int lo, int hi) internal partial class ArraySortHelper { - public void Sort(TKey[] keys, TValue[] values, int index, int length, IComparer comparer) + public void Sort(TKey[] keys, TValue[] values, int index, int length, IComparer? comparer) { Debug.Assert(keys != null, "Check the arguments in the caller!"); // Precondition on interface method Debug.Assert(values != null, "Check the arguments in the caller!"); @@ -871,7 +872,7 @@ private static void InsertionSort(TKey[] keys, TValue[] values, int lo, int hi, internal partial class GenericArraySortHelper where TKey : IComparable { - public void Sort(TKey[] keys, TValue[] values, int index, int length, IComparer comparer) + public void Sort(TKey[] keys, TValue[] values, int index, int length, IComparer? comparer) { Debug.Assert(keys != null, "Check the arguments in the caller!"); Debug.Assert(index >= 0 && length >= 0 && (keys.Length - index >= length), "Check the arguments in the caller!"); diff --git a/src/Common/src/CoreLib/System/Collections/Generic/Comparer.cs b/src/Common/src/CoreLib/System/Collections/Generic/Comparer.cs index f7c6cf81dd65..aa36769a4315 100644 --- a/src/Common/src/CoreLib/System/Collections/Generic/Comparer.cs +++ b/src/Common/src/CoreLib/System/Collections/Generic/Comparer.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable using System.Runtime.CompilerServices; using System.Runtime.Serialization; @@ -21,9 +22,9 @@ public static Comparer Create(Comparison comparison) return new ComparisonComparer(comparison); } - public abstract int Compare(T x, T y); + public abstract int Compare(T x, T y); // TODO-NULLABLE-GENERIC: x and y must be marked as nullable - int IComparer.Compare(object x, object y) + int IComparer.Compare(object? x, object? y) { if (x == null) return y == null ? 0 : -1; if (y == null) return 1; @@ -58,7 +59,7 @@ public override int Compare(T x, T y) // Needs to be public to support binary serialization compatibility public sealed partial class GenericComparer : Comparer where T : IComparable { - public override int Compare(T x, T y) + public override int Compare(T x, T y) // TODO-NULLABLE-GENERIC: x and y must be marked as nullable { if (x != null) { @@ -70,7 +71,7 @@ public override int Compare(T x, T y) } // Equals method for the comparer itself. - public override bool Equals(object obj) => + public override bool Equals(object? obj) => obj != null && GetType() == obj.GetType(); public override int GetHashCode() => @@ -94,7 +95,7 @@ public override int Compare(T? x, T? y) } // Equals method for the comparer itself. - public override bool Equals(object obj) => + public override bool Equals(object? obj) => obj != null && GetType() == obj.GetType(); public override int GetHashCode() => @@ -106,13 +107,13 @@ public override int GetHashCode() => // Needs to be public to support binary serialization compatibility public sealed partial class ObjectComparer : Comparer { - public override int Compare(T x, T y) + public override int Compare(T x, T y) // TODO-NULLABLE-GENERIC: x and y must be marked as nullable { return System.Collections.Comparer.Default.Compare(x, y); } // Equals method for the comparer itself. - public override bool Equals(object obj) => + public override bool Equals(object? obj) => obj != null && GetType() == obj.GetType(); public override int GetHashCode() => @@ -130,7 +131,7 @@ private EnumComparer(SerializationInfo info, StreamingContext context) { } // public override int Compare(T x, T y) is runtime-specific // Equals method for the comparer itself. - public override bool Equals(object obj) => + public override bool Equals(object? obj) => obj != null && GetType() == obj.GetType(); public override int GetHashCode() => diff --git a/src/Common/src/CoreLib/System/Collections/Generic/Dictionary.cs b/src/Common/src/CoreLib/System/Collections/Generic/Dictionary.cs index 0a36cb5f7681..27442029addb 100644 --- a/src/Common/src/CoreLib/System/Collections/Generic/Dictionary.cs +++ b/src/Common/src/CoreLib/System/Collections/Generic/Dictionary.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable using System.Diagnostics; using System.Runtime.CompilerServices; using System.Runtime.Serialization; @@ -33,7 +34,7 @@ internal enum InsertionBehavior : byte [DebuggerDisplay("Count = {Count}")] [Serializable] [TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")] - public class Dictionary : IDictionary, IDictionary, IReadOnlyDictionary, ISerializable, IDeserializationCallback + public class Dictionary : IDictionary, IDictionary, IReadOnlyDictionary, ISerializable, IDeserializationCallback where TKey : object { private struct Entry { @@ -46,15 +47,15 @@ private struct Entry public TValue value; // Value of entry } - private int[] _buckets; - private Entry[] _entries; + private int[]? _buckets; + private Entry[]? _entries; private int _count; private int _freeList; private int _freeCount; private int _version; - private IEqualityComparer _comparer; - private KeyCollection _keys; - private ValueCollection _values; + private IEqualityComparer? _comparer; + private KeyCollection? _keys; + private ValueCollection? _values; private const int StartOfFreeList = -3; // constants for serialization @@ -67,9 +68,9 @@ public Dictionary() : this(0, null) { } public Dictionary(int capacity) : this(capacity, null) { } - public Dictionary(IEqualityComparer comparer) : this(0, comparer) { } + public Dictionary(IEqualityComparer? comparer) : this(0, comparer) { } - public Dictionary(int capacity, IEqualityComparer comparer) + public Dictionary(int capacity, IEqualityComparer? comparer) { if (capacity < 0) ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.capacity); if (capacity > 0) Initialize(capacity); @@ -87,7 +88,7 @@ public Dictionary(int capacity, IEqualityComparer comparer) public Dictionary(IDictionary dictionary) : this(dictionary, null) { } - public Dictionary(IDictionary dictionary, IEqualityComparer comparer) : + public Dictionary(IDictionary dictionary, IEqualityComparer? comparer) : this(dictionary != null ? dictionary.Count : 0, comparer) { if (dictionary == null) @@ -99,14 +100,14 @@ public Dictionary(IDictionary dictionary, IEqualityComparer // avoid the enumerator allocation and overhead by looping through the entries array directly. // We only do this when dictionary is Dictionary and not a subclass, to maintain // back-compat with subclasses that may have overridden the enumerator behavior. - if (dictionary.GetType() == typeof(Dictionary)) + if (dictionary!.GetType() == typeof(Dictionary)) // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 { Dictionary d = (Dictionary)dictionary; int count = d._count; - Entry[] entries = d._entries; + Entry[]? entries = d._entries; for (int i = 0; i < count; i++) { - if (entries[i].next >= -1) + if (entries![i].next >= -1) { Add(entries[i].key, entries[i].value); } @@ -122,7 +123,7 @@ public Dictionary(IDictionary dictionary, IEqualityComparer public Dictionary(IEnumerable> collection) : this(collection, null) { } - public Dictionary(IEnumerable> collection, IEqualityComparer comparer) : + public Dictionary(IEnumerable> collection, IEqualityComparer? comparer) : this((collection as ICollection>)?.Count ?? 0, comparer) { if (collection == null) @@ -130,7 +131,7 @@ public Dictionary(IEnumerable> collection, IEqualityC ThrowHelper.ThrowArgumentNullException(ExceptionArgument.collection); } - foreach (KeyValuePair pair in collection) + foreach (KeyValuePair pair in collection!) // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 { Add(pair.Key, pair.Value); } @@ -216,9 +217,9 @@ public TValue this[TKey key] get { int i = FindEntry(key); - if (i >= 0) return _entries[i].value; + if (i >= 0) return _entries![i].value; ThrowHelper.ThrowKeyNotFoundException(key); - return default; + return default!; // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 (annotating ThrowHelper removes this return statement). } set { @@ -239,7 +240,7 @@ void ICollection>.Add(KeyValuePair keyV bool ICollection>.Contains(KeyValuePair keyValuePair) { int i = FindEntry(keyValuePair.Key); - if (i >= 0 && EqualityComparer.Default.Equals(_entries[i].value, keyValuePair.Value)) + if (i >= 0 && EqualityComparer.Default.Equals(_entries![i].value, keyValuePair.Value)) { return true; } @@ -249,7 +250,7 @@ bool ICollection>.Contains(KeyValuePair bool ICollection>.Remove(KeyValuePair keyValuePair) { int i = FindEntry(keyValuePair.Key); - if (i >= 0 && EqualityComparer.Default.Equals(_entries[i].value, keyValuePair.Value)) + if (i >= 0 && EqualityComparer.Default.Equals(_entries![i].value, keyValuePair.Value)) { Remove(keyValuePair.Key); return true; @@ -262,6 +263,9 @@ public void Clear() int count = _count; if (count > 0) { + Debug.Assert(_buckets != null, "_buckets should be non-null"); + Debug.Assert(_entries != null, "_entries should be non-null"); + Array.Clear(_buckets, 0, _buckets.Length); _count = 0; @@ -276,22 +280,22 @@ public bool ContainsKey(TKey key) public bool ContainsValue(TValue value) { - Entry[] entries = _entries; + Entry[]? entries = _entries; if (value == null) { for (int i = 0; i < _count; i++) { - if (entries[i].next >= -1 && entries[i].value == null) return true; + if (entries![i].next >= -1 && entries[i].value == null) return true; } } else { - if (default(TValue) != null) + if (default(TValue)! != null) // TODO-NULLABLE-GENERIC: https://github.com/dotnet/roslyn/issues/34757 { // ValueType: Devirtualize with EqualityComparer.Default intrinsic for (int i = 0; i < _count; i++) { - if (entries[i].next >= -1 && EqualityComparer.Default.Equals(entries[i].value, value)) return true; + if (entries![i].next >= -1 && EqualityComparer.Default.Equals(entries[i].value, value)) return true; } } else @@ -302,7 +306,7 @@ public bool ContainsValue(TValue value) EqualityComparer defaultComparer = EqualityComparer.Default; for (int i = 0; i < _count; i++) { - if (entries[i].next >= -1 && defaultComparer.Equals(entries[i].value, value)) return true; + if (entries![i].next >= -1 && defaultComparer.Equals(entries[i].value, value)) return true; } } } @@ -316,7 +320,7 @@ private void CopyTo(KeyValuePair[] array, int index) ThrowHelper.ThrowArgumentNullException(ExceptionArgument.array); } - if ((uint)index > (uint)array.Length) + if ((uint)index > (uint)array!.Length) // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 { ThrowHelper.ThrowIndexArgumentOutOfRange_NeedNonNegNumException(); } @@ -327,10 +331,10 @@ private void CopyTo(KeyValuePair[] array, int index) } int count = _count; - Entry[] entries = _entries; + Entry[]? entries = _entries; for (int i = 0; i < count; i++) { - if (entries[i].next >= -1) + if (entries![i].next >= -1) { array[index++] = new KeyValuePair(entries[i].key, entries[i].value); } @@ -350,7 +354,7 @@ public virtual void GetObjectData(SerializationInfo info, StreamingContext conte ThrowHelper.ThrowArgumentNullException(ExceptionArgument.info); } - info.AddValue(VersionName, _version); + info!.AddValue(VersionName, _version); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 info.AddValue(ComparerName, _comparer ?? EqualityComparer.Default, typeof(IEqualityComparer)); info.AddValue(HashSizeName, _buckets == null ? 0 : _buckets.Length); // This is the length of the bucket array @@ -370,18 +374,19 @@ private int FindEntry(TKey key) } int i = -1; - int[] buckets = _buckets; - Entry[] entries = _entries; + int[]? buckets = _buckets; + Entry[]? entries = _entries; int collisionCount = 0; if (buckets != null) { - IEqualityComparer comparer = _comparer; + Debug.Assert(entries != null, "expected entries to be != null"); + IEqualityComparer? comparer = _comparer; if (comparer == null) { - uint hashCode = (uint)key.GetHashCode(); + uint hashCode = (uint)key!.GetHashCode(); // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 // Value in _buckets is 1-based i = buckets[hashCode % (uint)buckets.Length] - 1; - if (default(TKey) != null) + if (default(TKey)! != null) // TODO-NULLABLE-GENERIC: https://github.com/dotnet/roslyn/issues/34757 { // ValueType: Devirtualize with EqualityComparer.Default intrinsic do @@ -482,19 +487,20 @@ private bool TryInsert(TKey key, TValue value, InsertionBehavior behavior) Initialize(0); } - Entry[] entries = _entries; - IEqualityComparer comparer = _comparer; + Entry[]? entries = _entries; + Debug.Assert(entries != null, "expected entries to be non-null"); - uint hashCode = (uint)((comparer == null) ? key.GetHashCode() : comparer.GetHashCode(key)); + IEqualityComparer? comparer = _comparer; + uint hashCode = (uint)((comparer == null) ? key!.GetHashCode() : comparer.GetHashCode(key)); // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 int collisionCount = 0; - ref int bucket = ref _buckets[hashCode % (uint)_buckets.Length]; + ref int bucket = ref _buckets![hashCode % (uint)_buckets.Length]; // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 (Initialize inits sets _buckets to non null) // Value in _buckets is 1-based int i = bucket - 1; if (comparer == null) { - if (default(TKey) != null) + if (default(TKey)! != null) // TODO-NULLABLE-GENERIC: https://github.com/dotnet/roslyn/issues/34757 { // ValueType: Devirtualize with EqualityComparer.Default intrinsic do @@ -637,7 +643,7 @@ private bool TryInsert(TKey key, TValue value, InsertionBehavior behavior) entries = _entries; } - ref Entry entry = ref entries[index]; + ref Entry entry = ref entries![index]; if (updateFreeList) { @@ -655,7 +661,7 @@ private bool TryInsert(TKey key, TValue value, InsertionBehavior behavior) _version++; // Value types never rehash - if (default(TKey) == null && collisionCount > HashHelpers.HashCollisionThreshold && comparer is NonRandomizedStringEqualityComparer) + if (default(TKey)! == null && collisionCount > HashHelpers.HashCollisionThreshold && comparer is NonRandomizedStringEqualityComparer) // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/34757 { // If we hit the collision threshold we'll need to switch to the comparer which is using randomized string hashing // i.e. EqualityComparer.Default. @@ -679,13 +685,13 @@ public virtual void OnDeserialization(object sender) int realVersion = siInfo.GetInt32(VersionName); int hashsize = siInfo.GetInt32(HashSizeName); - _comparer = (IEqualityComparer)siInfo.GetValue(ComparerName, typeof(IEqualityComparer)); + _comparer = (IEqualityComparer)siInfo.GetValue(ComparerName, typeof(IEqualityComparer))!; // When serialized if comparer is null, we use the default. if (hashsize != 0) { Initialize(hashsize); - KeyValuePair[] array = (KeyValuePair[]) + KeyValuePair[]? array = (KeyValuePair[]?) siInfo.GetValue(KeyValuePairsName, typeof(KeyValuePair[])); if (array == null) @@ -693,7 +699,7 @@ public virtual void OnDeserialization(object sender) ThrowHelper.ThrowSerializationException(ExceptionResource.Serialization_MissingKeys); } - for (int i = 0; i < array.Length; i++) + for (int i = 0; i < array!.Length; i++) // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 { if (array[i].Key == null) { @@ -717,7 +723,8 @@ private void Resize() private void Resize(int newSize, bool forceNewHashCodes) { // Value types never rehash - Debug.Assert(!forceNewHashCodes || default(TKey) == null); + Debug.Assert(!forceNewHashCodes || default(TKey)! == null); // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/34757 + Debug.Assert(_entries != null, "_entries should be non-null"); Debug.Assert(newSize >= _entries.Length); int[] buckets = new int[newSize]; @@ -726,7 +733,7 @@ private void Resize(int newSize, bool forceNewHashCodes) int count = _count; Array.Copy(_entries, 0, entries, 0, count); - if (default(TKey) == null && forceNewHashCodes) + if (default(TKey)! == null && forceNewHashCodes) // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/34757 { for (int i = 0; i < count; i++) { @@ -764,12 +771,13 @@ public bool Remove(TKey key) ThrowHelper.ThrowArgumentNullException(ExceptionArgument.key); } - int[] buckets = _buckets; - Entry[] entries = _entries; + int[]? buckets = _buckets; + Entry[]? entries = _entries; int collisionCount = 0; if (buckets != null) { - uint hashCode = (uint)(_comparer?.GetHashCode(key) ?? key.GetHashCode()); + Debug.Assert(entries != null, "entries should be non-null"); + uint hashCode = (uint)(_comparer?.GetHashCode(key) ?? key!.GetHashCode()); // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 uint bucket = hashCode % (uint)buckets.Length; int last = -1; // Value in buckets is 1-based @@ -796,11 +804,11 @@ public bool Remove(TKey key) if (RuntimeHelpers.IsReferenceOrContainsReferences()) { - entry.key = default; + entry.key = default!; // TODO-NULLABLE-GENERIC } if (RuntimeHelpers.IsReferenceOrContainsReferences()) { - entry.value = default; + entry.value = default!; // TODO-NULLABLE-GENERIC } _freeList = i; _freeCount++; @@ -824,19 +832,20 @@ public bool Remove(TKey key) // This overload is a copy of the overload Remove(TKey key) with one additional // statement to copy the value for entry being removed into the output parameter. // Code has been intentionally duplicated for performance reasons. - public bool Remove(TKey key, out TValue value) + public bool Remove(TKey key, out TValue value) // TODO-NULLABLE-GENERIC: https://github.com/dotnet/roslyn/issues/26761 { if (key == null) { ThrowHelper.ThrowArgumentNullException(ExceptionArgument.key); } - int[] buckets = _buckets; - Entry[] entries = _entries; + int[]? buckets = _buckets; + Entry[]? entries = _entries; int collisionCount = 0; if (buckets != null) { - uint hashCode = (uint)(_comparer?.GetHashCode(key) ?? key.GetHashCode()); + Debug.Assert(entries != null, "entries should be non-null"); + uint hashCode = (uint)(_comparer?.GetHashCode(key) ?? key!.GetHashCode()); // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 uint bucket = hashCode % (uint)buckets.Length; int last = -1; // Value in buckets is 1-based @@ -865,11 +874,11 @@ public bool Remove(TKey key, out TValue value) if (RuntimeHelpers.IsReferenceOrContainsReferences()) { - entry.key = default; + entry.key = default!; // TODO-NULLABLE-GENERIC } if (RuntimeHelpers.IsReferenceOrContainsReferences()) { - entry.value = default; + entry.value = default!; // TODO-NULLABLE-GENERIC } _freeList = i; _freeCount++; @@ -887,19 +896,19 @@ public bool Remove(TKey key, out TValue value) collisionCount++; } } - value = default; + value = default!; // TODO-NULLABLE-GENERIC return false; } - public bool TryGetValue(TKey key, out TValue value) + public bool TryGetValue(TKey key, out TValue value) // TODO-NULLABLE-GENERIC: https://github.com/dotnet/roslyn/issues/26761 { int i = FindEntry(key); if (i >= 0) { - value = _entries[i].value; + value = _entries![i].value; return true; } - value = default; + value = default!; // TODO-NULLABLE-GENERIC return false; } @@ -915,7 +924,7 @@ void ICollection.CopyTo(Array array, int index) { if (array == null) ThrowHelper.ThrowArgumentNullException(ExceptionArgument.array); - if (array.Rank != 1) + if (array!.Rank != 1) // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 ThrowHelper.ThrowArgumentException(ExceptionResource.Arg_RankMultiDimNotSupported); if (array.GetLowerBound(0) != 0) ThrowHelper.ThrowArgumentException(ExceptionResource.Arg_NonZeroLowerBound); @@ -930,10 +939,10 @@ void ICollection.CopyTo(Array array, int index) } else if (array is DictionaryEntry[] dictEntryArray) { - Entry[] entries = _entries; + Entry[]? entries = _entries; for (int i = 0; i < _count; i++) { - if (entries[i].next >= -1) + if (entries![i].next >= -1) { dictEntryArray[index++] = new DictionaryEntry(entries[i].key, entries[i].value); } @@ -941,7 +950,7 @@ void ICollection.CopyTo(Array array, int index) } else { - object[] objects = array as object[]; + object[]? objects = array as object[]; if (objects == null) { ThrowHelper.ThrowArgumentException_Argument_InvalidArrayType(); @@ -950,12 +959,12 @@ void ICollection.CopyTo(Array array, int index) try { int count = _count; - Entry[] entries = _entries; + Entry[]? entries = _entries; for (int i = 0; i < count; i++) { - if (entries[i].next >= -1) + if (entries![i].next >= -1) { - objects[index++] = new KeyValuePair(entries[i].key, entries[i].value); + objects![index++] = new KeyValuePair(entries[i].key, entries[i].value); // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 } } } @@ -1013,7 +1022,7 @@ public void TrimExcess(int capacity) ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.capacity); int newSize = HashHelpers.GetPrime(capacity); - Entry[] oldEntries = _entries; + Entry[]? oldEntries = _entries; int currentCapacity = oldEntries == null ? 0 : oldEntries.Length; if (newSize >= currentCapacity) return; @@ -1021,19 +1030,19 @@ public void TrimExcess(int capacity) int oldCount = _count; _version++; Initialize(newSize); - Entry[] entries = _entries; - int[] buckets = _buckets; + Entry[]? entries = _entries; + int[]? buckets = _buckets; int count = 0; for (int i = 0; i < oldCount; i++) { - uint hashCode = oldEntries[i].hashCode; + uint hashCode = oldEntries![i].hashCode; // At this point, we know we have entries. if (oldEntries[i].next >= -1) { - ref Entry entry = ref entries[count]; + ref Entry entry = ref entries![count]; entry = oldEntries[i]; uint bucket = hashCode % (uint)newSize; // Value in _buckets is 1-based - entry.next = buckets[bucket] - 1; + entry.next = buckets![bucket] - 1; // If we get here, we have entries, therefore buckets is not null. // Value in _buckets is 1-based buckets[bucket] = count + 1; count++; @@ -1055,7 +1064,7 @@ public void TrimExcess(int capacity) ICollection IDictionary.Values => (ICollection)Values; - object IDictionary.this[object key] + object? IDictionary.this[object key] // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/2384 { get { @@ -1064,7 +1073,7 @@ object IDictionary.this[object key] int i = FindEntry((TKey)key); if (i >= 0) { - return _entries[i].value; + return _entries![i].value; } } return null; @@ -1079,10 +1088,10 @@ object IDictionary.this[object key] try { - TKey tempKey = (TKey)key; + TKey tempKey = (TKey)key!; // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 try { - this[tempKey] = (TValue)value; + this[tempKey] = (TValue)value!; } catch (InvalidCastException) { @@ -1105,7 +1114,7 @@ private static bool IsCompatibleKey(object key) return (key is TKey); } - void IDictionary.Add(object key, object value) + void IDictionary.Add(object key, object? value) { if (key == null) { @@ -1115,11 +1124,11 @@ void IDictionary.Add(object key, object value) try { - TKey tempKey = (TKey)key; + TKey tempKey = (TKey)key!; // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 try { - Add(tempKey, (TValue)value); + Add(tempKey, (TValue)value!); } catch (InvalidCastException) { @@ -1185,7 +1194,7 @@ public bool MoveNext() // dictionary.count+1 could be negative if dictionary.count is int.MaxValue while ((uint)_index < (uint)_dictionary._count) { - ref Entry entry = ref _dictionary._entries[_index++]; + ref Entry entry = ref _dictionary._entries![_index++]; if (entry.next >= -1) { @@ -1205,7 +1214,7 @@ public void Dispose() { } - object IEnumerator.Current + object? IEnumerator.Current // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/23268 { get { @@ -1262,7 +1271,7 @@ object IDictionaryEnumerator.Key } } - object IDictionaryEnumerator.Value + object? IDictionaryEnumerator.Value { get { @@ -1288,7 +1297,7 @@ public KeyCollection(Dictionary dictionary) { ThrowHelper.ThrowArgumentNullException(ExceptionArgument.dictionary); } - _dictionary = dictionary; + _dictionary = dictionary!; // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 } public Enumerator GetEnumerator() @@ -1301,21 +1310,21 @@ public void CopyTo(TKey[] array, int index) ThrowHelper.ThrowArgumentNullException(ExceptionArgument.array); } - if (index < 0 || index > array.Length) + if (index < 0 || index > array!.Length) // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 { ThrowHelper.ThrowIndexArgumentOutOfRange_NeedNonNegNumException(); } - if (array.Length - index < _dictionary.Count) + if (array!.Length - index < _dictionary.Count) // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 { ThrowHelper.ThrowArgumentException(ExceptionResource.Arg_ArrayPlusOffTooSmall); } int count = _dictionary._count; - Entry[] entries = _dictionary._entries; + Entry[]? entries = _dictionary._entries; for (int i = 0; i < count; i++) { - if (entries[i].next >= -1) array[index++] = entries[i].key; + if (entries![i].next >= -1) array[index++] = entries[i].key; } } @@ -1348,7 +1357,7 @@ void ICollection.CopyTo(Array array, int index) { if (array == null) ThrowHelper.ThrowArgumentNullException(ExceptionArgument.array); - if (array.Rank != 1) + if (array!.Rank != 1) // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 ThrowHelper.ThrowArgumentException(ExceptionResource.Arg_RankMultiDimNotSupported); if (array.GetLowerBound(0) != 0) ThrowHelper.ThrowArgumentException(ExceptionResource.Arg_NonZeroLowerBound); @@ -1363,19 +1372,19 @@ void ICollection.CopyTo(Array array, int index) } else { - object[] objects = array as object[]; + object[]? objects = array as object[]; if (objects == null) { ThrowHelper.ThrowArgumentException_Argument_InvalidArrayType(); } int count = _dictionary._count; - Entry[] entries = _dictionary._entries; + Entry[]? entries = _dictionary._entries; try { for (int i = 0; i < count; i++) { - if (entries[i].next >= -1) objects[index++] = entries[i].key; + if (entries![i].next >= -1) objects![index++] = entries[i].key; // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 (objects) } } catch (ArrayTypeMismatchException) @@ -1401,7 +1410,7 @@ internal Enumerator(Dictionary dictionary) _dictionary = dictionary; _version = dictionary._version; _index = 0; - _currentKey = default; + _currentKey = default!; // TODO-NULLABLE-GENERIC } public void Dispose() @@ -1417,7 +1426,7 @@ public bool MoveNext() while ((uint)_index < (uint)_dictionary._count) { - ref Entry entry = ref _dictionary._entries[_index++]; + ref Entry entry = ref _dictionary._entries![_index++]; if (entry.next >= -1) { @@ -1427,13 +1436,13 @@ public bool MoveNext() } _index = _dictionary._count + 1; - _currentKey = default; + _currentKey = default!; // TODO-NULLABLE-GENERIC return false; } public TKey Current => _currentKey; - object IEnumerator.Current + object? IEnumerator.Current // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/23268 { get { @@ -1454,7 +1463,7 @@ void IEnumerator.Reset() } _index = 0; - _currentKey = default; + _currentKey = default!; // TODO-NULLABLE-GENERIC } } } @@ -1471,7 +1480,7 @@ public ValueCollection(Dictionary dictionary) { ThrowHelper.ThrowArgumentNullException(ExceptionArgument.dictionary); } - _dictionary = dictionary; + _dictionary = dictionary!; // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 } public Enumerator GetEnumerator() @@ -1484,7 +1493,7 @@ public void CopyTo(TValue[] array, int index) ThrowHelper.ThrowArgumentNullException(ExceptionArgument.array); } - if (index < 0 || index > array.Length) + if ((uint)index > array!.Length) // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 { ThrowHelper.ThrowIndexArgumentOutOfRange_NeedNonNegNumException(); } @@ -1495,10 +1504,10 @@ public void CopyTo(TValue[] array, int index) } int count = _dictionary._count; - Entry[] entries = _dictionary._entries; + Entry[]? entries = _dictionary._entries; for (int i = 0; i < count; i++) { - if (entries[i].next >= -1) array[index++] = entries[i].value; + if (entries![i].next >= -1) array[index++] = entries[i].value; } } @@ -1531,7 +1540,7 @@ void ICollection.CopyTo(Array array, int index) { if (array == null) ThrowHelper.ThrowArgumentNullException(ExceptionArgument.array); - if (array.Rank != 1) + if (array!.Rank != 1) // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 ThrowHelper.ThrowArgumentException(ExceptionResource.Arg_RankMultiDimNotSupported); if (array.GetLowerBound(0) != 0) ThrowHelper.ThrowArgumentException(ExceptionResource.Arg_NonZeroLowerBound); @@ -1546,19 +1555,19 @@ void ICollection.CopyTo(Array array, int index) } else { - object[] objects = array as object[]; + object[]? objects = array as object[]; if (objects == null) { ThrowHelper.ThrowArgumentException_Argument_InvalidArrayType(); } int count = _dictionary._count; - Entry[] entries = _dictionary._entries; + Entry[]? entries = _dictionary._entries; try { for (int i = 0; i < count; i++) { - if (entries[i].next >= -1) objects[index++] = entries[i].value; + if (entries![i].next >= -1) objects![index++] = entries[i].value!; // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 } } catch (ArrayTypeMismatchException) @@ -1584,7 +1593,7 @@ internal Enumerator(Dictionary dictionary) _dictionary = dictionary; _version = dictionary._version; _index = 0; - _currentValue = default; + _currentValue = default!; // TODO-NULLABLE-GENERIC } public void Dispose() @@ -1600,7 +1609,7 @@ public bool MoveNext() while ((uint)_index < (uint)_dictionary._count) { - ref Entry entry = ref _dictionary._entries[_index++]; + ref Entry entry = ref _dictionary._entries![_index++]; if (entry.next >= -1) { @@ -1609,13 +1618,13 @@ public bool MoveNext() } } _index = _dictionary._count + 1; - _currentValue = default; + _currentValue = default!; // TODO-NULLABLE-GENERIC return false; } public TValue Current => _currentValue; - object IEnumerator.Current + object? IEnumerator.Current { get { @@ -1635,7 +1644,7 @@ void IEnumerator.Reset() ThrowHelper.ThrowInvalidOperationException_InvalidOperation_EnumFailedVersion(); } _index = 0; - _currentValue = default; + _currentValue = default!; // TODO-NULLABLE-GENERIC } } } diff --git a/src/Common/src/CoreLib/System/Collections/Generic/EqualityComparer.cs b/src/Common/src/CoreLib/System/Collections/Generic/EqualityComparer.cs index 01204775e926..fdaf3bc858ee 100644 --- a/src/Common/src/CoreLib/System/Collections/Generic/EqualityComparer.cs +++ b/src/Common/src/CoreLib/System/Collections/Generic/EqualityComparer.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable using System.Runtime.CompilerServices; using System.Runtime.Serialization; @@ -14,9 +15,11 @@ public abstract partial class EqualityComparer : IEqualityComparer, IEquality // public static EqualityComparer Default is runtime-specific public abstract bool Equals(T x, T y); - public abstract int GetHashCode(T obj); + public abstract int GetHashCode(T obj); // TODO-NULLABLE-GENERIC: Shouldn't accept nulls. - int IEqualityComparer.GetHashCode(object obj) +#pragma warning disable CS8617 // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/30958 + int IEqualityComparer.GetHashCode(object? obj) +#pragma warning restore CS8617 { if (obj == null) return 0; if (obj is T) return GetHashCode((T)obj); @@ -24,7 +27,7 @@ int IEqualityComparer.GetHashCode(object obj) return 0; } - bool IEqualityComparer.Equals(object x, object y) + bool IEqualityComparer.Equals(object? x, object? y) { if (x == y) return true; if (x == null || y == null) return false; @@ -58,7 +61,7 @@ public override bool Equals(T x, T y) // Equals method for the comparer itself. // If in the future this type is made sealed, change the is check to obj != null && GetType() == obj.GetType(). - public override bool Equals(object obj) => + public override bool Equals(object? obj) => obj is GenericEqualityComparer; // If in the future this type is made sealed, change typeof(...) to GetType(). @@ -87,7 +90,7 @@ public override bool Equals(T? x, T? y) public override int GetHashCode(T? obj) => obj.GetHashCode(); // Equals method for the comparer itself. - public override bool Equals(object obj) => + public override bool Equals(object? obj) => obj != null && GetType() == obj.GetType(); public override int GetHashCode() => @@ -115,7 +118,7 @@ public override bool Equals(T x, T y) public override int GetHashCode(T obj) => obj?.GetHashCode() ?? 0; // Equals method for the comparer itself. - public override bool Equals(object obj) => + public override bool Equals(object? obj) => obj != null && GetType() == obj.GetType(); public override int GetHashCode() => @@ -140,7 +143,7 @@ public override int GetHashCode(byte b) } // Equals method for the comparer itself. - public override bool Equals(object obj) => + public override bool Equals(object? obj) => obj != null && GetType() == obj.GetType(); public override int GetHashCode() => @@ -174,7 +177,7 @@ public override int GetHashCode(T obj) } // Equals method for the comparer itself. - public override bool Equals(object obj) => + public override bool Equals(object? obj) => obj != null && GetType() == obj.GetType(); public override int GetHashCode() => diff --git a/src/Common/src/CoreLib/System/Collections/Generic/KeyValuePair.cs b/src/Common/src/CoreLib/System/Collections/Generic/KeyValuePair.cs index 82c786d407c3..18b3863e7856 100644 --- a/src/Common/src/CoreLib/System/Collections/Generic/KeyValuePair.cs +++ b/src/Common/src/CoreLib/System/Collections/Generic/KeyValuePair.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable using System.ComponentModel; using System.Text; @@ -19,7 +20,7 @@ public static KeyValuePair Create(TKey key, TValue v /// /// Used by KeyValuePair.ToString to reduce generic code /// - internal static string PairToString(object key, object value) + internal static string PairToString(object? key, object? value) { StringBuilder s = StringBuilderCache.Acquire(); s.Append('['); diff --git a/src/Common/src/CoreLib/System/Collections/IDictionary.cs b/src/Common/src/CoreLib/System/Collections/IDictionary.cs index b077c9192754..3ecf66992985 100644 --- a/src/Common/src/CoreLib/System/Collections/IDictionary.cs +++ b/src/Common/src/CoreLib/System/Collections/IDictionary.cs @@ -2,7 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; +#nullable enable namespace System.Collections { @@ -15,7 +15,7 @@ public interface IDictionary : ICollection // Interfaces are not serializable // The Item property provides methods to read and edit entries // in the Dictionary. - object this[object key] + object? this[object key] // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/2384 { get; set; @@ -39,7 +39,7 @@ ICollection Values // Adds a key-value pair to the dictionary. // - void Add(object key, object value); + void Add(object key, object? value); // Removes all pairs from the dictionary. void Clear(); diff --git a/src/Common/src/CoreLib/System/Collections/IDictionaryEnumerator.cs b/src/Common/src/CoreLib/System/Collections/IDictionaryEnumerator.cs index 0cf6aaa1545d..59b6f7839a6f 100644 --- a/src/Common/src/CoreLib/System/Collections/IDictionaryEnumerator.cs +++ b/src/Common/src/CoreLib/System/Collections/IDictionaryEnumerator.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable namespace System.Collections { // This interface represents an enumerator that allows sequential access to the @@ -50,7 +51,7 @@ object Key // to GetValue with no intervening calls to GetNext will // return the same object. // - object Value + object? Value { get; } diff --git a/src/Common/src/CoreLib/System/Collections/IEqualityComparer.cs b/src/Common/src/CoreLib/System/Collections/IEqualityComparer.cs index 9b5476896ce6..c2c290c44b4e 100644 --- a/src/Common/src/CoreLib/System/Collections/IEqualityComparer.cs +++ b/src/Common/src/CoreLib/System/Collections/IEqualityComparer.cs @@ -2,15 +2,14 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; - +#nullable enable namespace System.Collections { // An IEqualityComparer is a mechanism to consume custom performant comparison infrastructure // that can be consumed by some of the common collections. public interface IEqualityComparer { - bool Equals(object x, object y); + bool Equals(object? x, object? y); int GetHashCode(object obj); } } diff --git a/src/Common/src/CoreLib/System/Security/SecurityElement.cs b/src/Common/src/CoreLib/System/Security/SecurityElement.cs index 05c13c8a02af..197eaa079b0c 100644 --- a/src/Common/src/CoreLib/System/Security/SecurityElement.cs +++ b/src/Common/src/CoreLib/System/Security/SecurityElement.cs @@ -145,7 +145,7 @@ public Hashtable? Attributes while (enumerator.MoveNext()) { string attrName = (string)enumerator.Key; - string attrValue = (string)enumerator.Value; + string? attrValue = (string?)enumerator.Value; if (!IsValidAttributeName(attrName)) throw new ArgumentException(SR.Format(SR.Argument_InvalidElementName, attrName)); diff --git a/src/Common/src/CoreLib/System/Tuple.cs b/src/Common/src/CoreLib/System/Tuple.cs index cf996005129d..bcfd4ce11572 100644 --- a/src/Common/src/CoreLib/System/Tuple.cs +++ b/src/Common/src/CoreLib/System/Tuple.cs @@ -157,7 +157,7 @@ public override int GetHashCode() int IStructuralEquatable.GetHashCode(IEqualityComparer comparer) { - return comparer.GetHashCode(m_Item1); + return comparer.GetHashCode(m_Item1!); // TODO-NULLABLE-GENERIC } int ITupleInternal.GetHashCode(IEqualityComparer comparer) @@ -262,7 +262,7 @@ public override int GetHashCode() int IStructuralEquatable.GetHashCode(IEqualityComparer comparer) { - return Tuple.CombineHashCodes(comparer.GetHashCode(m_Item1), comparer.GetHashCode(m_Item2)); + return Tuple.CombineHashCodes(comparer.GetHashCode(m_Item1!), comparer.GetHashCode(m_Item2!)); // TODO-NULLABLE-GENERIC } int ITupleInternal.GetHashCode(IEqualityComparer comparer) @@ -380,7 +380,7 @@ public override int GetHashCode() int IStructuralEquatable.GetHashCode(IEqualityComparer comparer) { - return Tuple.CombineHashCodes(comparer.GetHashCode(m_Item1), comparer.GetHashCode(m_Item2), comparer.GetHashCode(m_Item3)); + return Tuple.CombineHashCodes(comparer.GetHashCode(m_Item1!), comparer.GetHashCode(m_Item2!), comparer.GetHashCode(m_Item3!)); // TODO-NULLABLE-GENERIC } int ITupleInternal.GetHashCode(IEqualityComparer comparer) @@ -509,7 +509,7 @@ public override int GetHashCode() int IStructuralEquatable.GetHashCode(IEqualityComparer comparer) { - return Tuple.CombineHashCodes(comparer.GetHashCode(m_Item1), comparer.GetHashCode(m_Item2), comparer.GetHashCode(m_Item3), comparer.GetHashCode(m_Item4)); + return Tuple.CombineHashCodes(comparer.GetHashCode(m_Item1!), comparer.GetHashCode(m_Item2!), comparer.GetHashCode(m_Item3!), comparer.GetHashCode(m_Item4!)); // TODO-NULLABLE-GENERIC } int ITupleInternal.GetHashCode(IEqualityComparer comparer) @@ -649,7 +649,7 @@ public override int GetHashCode() int IStructuralEquatable.GetHashCode(IEqualityComparer comparer) { - return Tuple.CombineHashCodes(comparer.GetHashCode(m_Item1), comparer.GetHashCode(m_Item2), comparer.GetHashCode(m_Item3), comparer.GetHashCode(m_Item4), comparer.GetHashCode(m_Item5)); + return Tuple.CombineHashCodes(comparer.GetHashCode(m_Item1!), comparer.GetHashCode(m_Item2!), comparer.GetHashCode(m_Item3!), comparer.GetHashCode(m_Item4!), comparer.GetHashCode(m_Item5!)); // TODO-NULLABLE-GENERIC } int ITupleInternal.GetHashCode(IEqualityComparer comparer) @@ -800,7 +800,7 @@ public override int GetHashCode() int IStructuralEquatable.GetHashCode(IEqualityComparer comparer) { - return Tuple.CombineHashCodes(comparer.GetHashCode(m_Item1), comparer.GetHashCode(m_Item2), comparer.GetHashCode(m_Item3), comparer.GetHashCode(m_Item4), comparer.GetHashCode(m_Item5), comparer.GetHashCode(m_Item6)); + return Tuple.CombineHashCodes(comparer.GetHashCode(m_Item1!), comparer.GetHashCode(m_Item2!), comparer.GetHashCode(m_Item3!), comparer.GetHashCode(m_Item4!), comparer.GetHashCode(m_Item5!), comparer.GetHashCode(m_Item6!)); // TODO-NULLABLE-GENERIC } int ITupleInternal.GetHashCode(IEqualityComparer comparer) @@ -962,7 +962,7 @@ public override int GetHashCode() int IStructuralEquatable.GetHashCode(IEqualityComparer comparer) { - return Tuple.CombineHashCodes(comparer.GetHashCode(m_Item1), comparer.GetHashCode(m_Item2), comparer.GetHashCode(m_Item3), comparer.GetHashCode(m_Item4), comparer.GetHashCode(m_Item5), comparer.GetHashCode(m_Item6), comparer.GetHashCode(m_Item7)); + return Tuple.CombineHashCodes(comparer.GetHashCode(m_Item1!), comparer.GetHashCode(m_Item2!), comparer.GetHashCode(m_Item3!), comparer.GetHashCode(m_Item4!), comparer.GetHashCode(m_Item5!), comparer.GetHashCode(m_Item6!), comparer.GetHashCode(m_Item7!)); // TODO-NULLABLE-GENERIC } int ITupleInternal.GetHashCode(IEqualityComparer comparer) @@ -1149,19 +1149,19 @@ int IStructuralEquatable.GetHashCode(IEqualityComparer comparer) switch (k) { case 1: - return Tuple.CombineHashCodes(comparer.GetHashCode(m_Item7), t.GetHashCode(comparer)); + return Tuple.CombineHashCodes(comparer.GetHashCode(m_Item7!), t.GetHashCode(comparer)); // TODO-NULLABLE-GENERIC case 2: - return Tuple.CombineHashCodes(comparer.GetHashCode(m_Item6), comparer.GetHashCode(m_Item7), t.GetHashCode(comparer)); + return Tuple.CombineHashCodes(comparer.GetHashCode(m_Item6!), comparer.GetHashCode(m_Item7!), t.GetHashCode(comparer)); // TODO-NULLABLE-GENERIC case 3: - return Tuple.CombineHashCodes(comparer.GetHashCode(m_Item5), comparer.GetHashCode(m_Item6), comparer.GetHashCode(m_Item7), t.GetHashCode(comparer)); + return Tuple.CombineHashCodes(comparer.GetHashCode(m_Item5!), comparer.GetHashCode(m_Item6!), comparer.GetHashCode(m_Item7!), t.GetHashCode(comparer)); // TODO-NULLABLE-GENERIC case 4: - return Tuple.CombineHashCodes(comparer.GetHashCode(m_Item4), comparer.GetHashCode(m_Item5), comparer.GetHashCode(m_Item6), comparer.GetHashCode(m_Item7), t.GetHashCode(comparer)); + return Tuple.CombineHashCodes(comparer.GetHashCode(m_Item4!), comparer.GetHashCode(m_Item5!), comparer.GetHashCode(m_Item6!), comparer.GetHashCode(m_Item7!), t.GetHashCode(comparer)); // TODO-NULLABLE-GENERIC case 5: - return Tuple.CombineHashCodes(comparer.GetHashCode(m_Item3), comparer.GetHashCode(m_Item4), comparer.GetHashCode(m_Item5), comparer.GetHashCode(m_Item6), comparer.GetHashCode(m_Item7), t.GetHashCode(comparer)); + return Tuple.CombineHashCodes(comparer.GetHashCode(m_Item3!), comparer.GetHashCode(m_Item4!), comparer.GetHashCode(m_Item5!), comparer.GetHashCode(m_Item6!), comparer.GetHashCode(m_Item7!), t.GetHashCode(comparer)); // TODO-NULLABLE-GENERIC case 6: - return Tuple.CombineHashCodes(comparer.GetHashCode(m_Item2), comparer.GetHashCode(m_Item3), comparer.GetHashCode(m_Item4), comparer.GetHashCode(m_Item5), comparer.GetHashCode(m_Item6), comparer.GetHashCode(m_Item7), t.GetHashCode(comparer)); + return Tuple.CombineHashCodes(comparer.GetHashCode(m_Item2!), comparer.GetHashCode(m_Item3!), comparer.GetHashCode(m_Item4!), comparer.GetHashCode(m_Item5!), comparer.GetHashCode(m_Item6!), comparer.GetHashCode(m_Item7!), t.GetHashCode(comparer)); // TODO-NULLABLE-GENERIC case 7: - return Tuple.CombineHashCodes(comparer.GetHashCode(m_Item1), comparer.GetHashCode(m_Item2), comparer.GetHashCode(m_Item3), comparer.GetHashCode(m_Item4), comparer.GetHashCode(m_Item5), comparer.GetHashCode(m_Item6), comparer.GetHashCode(m_Item7), t.GetHashCode(comparer)); + return Tuple.CombineHashCodes(comparer.GetHashCode(m_Item1!), comparer.GetHashCode(m_Item2!), comparer.GetHashCode(m_Item3!), comparer.GetHashCode(m_Item4!), comparer.GetHashCode(m_Item5!), comparer.GetHashCode(m_Item6!), comparer.GetHashCode(m_Item7!), t.GetHashCode(comparer)); // TODO-NULLABLE-GENERIC } Debug.Fail("Missed all cases for computing Tuple hash code"); return -1; diff --git a/src/Common/src/CoreLib/System/ValueTuple.cs b/src/Common/src/CoreLib/System/ValueTuple.cs index 0fd476e00ff6..b227535d2762 100644 --- a/src/Common/src/CoreLib/System/ValueTuple.cs +++ b/src/Common/src/CoreLib/System/ValueTuple.cs @@ -412,12 +412,12 @@ public override int GetHashCode() int IStructuralEquatable.GetHashCode(IEqualityComparer comparer) { - return comparer.GetHashCode(Item1); + return comparer.GetHashCode(Item1!); // TODO-NULLABLE-GENERIC } int IValueTupleInternal.GetHashCode(IEqualityComparer comparer) { - return comparer.GetHashCode(Item1); + return comparer.GetHashCode(Item1!); // TODO-NULLABLE-GENERIC } /// @@ -616,8 +616,8 @@ int IStructuralEquatable.GetHashCode(IEqualityComparer comparer) private int GetHashCodeCore(IEqualityComparer comparer) { - return ValueTuple.CombineHashCodes(comparer.GetHashCode(Item1), - comparer.GetHashCode(Item2)); + return ValueTuple.CombineHashCodes(comparer.GetHashCode(Item1!), + comparer.GetHashCode(Item2!)); // TODO-NULLABLE-GENERIC } int IValueTupleInternal.GetHashCode(IEqualityComparer comparer) @@ -823,9 +823,9 @@ int IStructuralEquatable.GetHashCode(IEqualityComparer comparer) private int GetHashCodeCore(IEqualityComparer comparer) { - return ValueTuple.CombineHashCodes(comparer.GetHashCode(Item1), - comparer.GetHashCode(Item2), - comparer.GetHashCode(Item3)); + return ValueTuple.CombineHashCodes(comparer.GetHashCode(Item1!), + comparer.GetHashCode(Item2!), + comparer.GetHashCode(Item3!)); // TODO-NULLABLE-GENERIC } int IValueTupleInternal.GetHashCode(IEqualityComparer comparer) @@ -1047,10 +1047,10 @@ int IStructuralEquatable.GetHashCode(IEqualityComparer comparer) private int GetHashCodeCore(IEqualityComparer comparer) { - return ValueTuple.CombineHashCodes(comparer.GetHashCode(Item1), - comparer.GetHashCode(Item2), - comparer.GetHashCode(Item3), - comparer.GetHashCode(Item4)); + return ValueTuple.CombineHashCodes(comparer.GetHashCode(Item1!), + comparer.GetHashCode(Item2!), + comparer.GetHashCode(Item3!), + comparer.GetHashCode(Item4!)); // TODO-NULLABLE-GENERIC } int IValueTupleInternal.GetHashCode(IEqualityComparer comparer) @@ -1290,11 +1290,11 @@ int IStructuralEquatable.GetHashCode(IEqualityComparer comparer) private int GetHashCodeCore(IEqualityComparer comparer) { - return ValueTuple.CombineHashCodes(comparer.GetHashCode(Item1), - comparer.GetHashCode(Item2), - comparer.GetHashCode(Item3), - comparer.GetHashCode(Item4), - comparer.GetHashCode(Item5)); + return ValueTuple.CombineHashCodes(comparer.GetHashCode(Item1!), + comparer.GetHashCode(Item2!), + comparer.GetHashCode(Item3!), + comparer.GetHashCode(Item4!), + comparer.GetHashCode(Item5!)); // TODO-NULLABLE-GENERIC } int IValueTupleInternal.GetHashCode(IEqualityComparer comparer) @@ -1552,12 +1552,12 @@ int IStructuralEquatable.GetHashCode(IEqualityComparer comparer) private int GetHashCodeCore(IEqualityComparer comparer) { - return ValueTuple.CombineHashCodes(comparer.GetHashCode(Item1), - comparer.GetHashCode(Item2), - comparer.GetHashCode(Item3), - comparer.GetHashCode(Item4), - comparer.GetHashCode(Item5), - comparer.GetHashCode(Item6)); + return ValueTuple.CombineHashCodes(comparer.GetHashCode(Item1!), + comparer.GetHashCode(Item2!), + comparer.GetHashCode(Item3!), + comparer.GetHashCode(Item4!), + comparer.GetHashCode(Item5!), + comparer.GetHashCode(Item6!)); // TODO-NULLABLE-GENERIC } int IValueTupleInternal.GetHashCode(IEqualityComparer comparer) @@ -1833,13 +1833,13 @@ int IStructuralEquatable.GetHashCode(IEqualityComparer comparer) private int GetHashCodeCore(IEqualityComparer comparer) { - return ValueTuple.CombineHashCodes(comparer.GetHashCode(Item1), - comparer.GetHashCode(Item2), - comparer.GetHashCode(Item3), - comparer.GetHashCode(Item4), - comparer.GetHashCode(Item5), - comparer.GetHashCode(Item6), - comparer.GetHashCode(Item7)); + return ValueTuple.CombineHashCodes(comparer.GetHashCode(Item1!), + comparer.GetHashCode(Item2!), + comparer.GetHashCode(Item3!), + comparer.GetHashCode(Item4!), + comparer.GetHashCode(Item5!), + comparer.GetHashCode(Item6!), + comparer.GetHashCode(Item7!)); // TODO-NULLABLE-GENERIC } int IValueTupleInternal.GetHashCode(IEqualityComparer comparer) @@ -2202,9 +2202,9 @@ private int GetHashCodeCore(IEqualityComparer comparer) IValueTupleInternal? rest = Rest as IValueTupleInternal; if (rest == null) { - return ValueTuple.CombineHashCodes(comparer.GetHashCode(Item1), comparer.GetHashCode(Item2), comparer.GetHashCode(Item3), - comparer.GetHashCode(Item4), comparer.GetHashCode(Item5), comparer.GetHashCode(Item6), - comparer.GetHashCode(Item7)); + return ValueTuple.CombineHashCodes(comparer.GetHashCode(Item1!), comparer.GetHashCode(Item2!), comparer.GetHashCode(Item3!), + comparer.GetHashCode(Item4!), comparer.GetHashCode(Item5!), comparer.GetHashCode(Item6!), + comparer.GetHashCode(Item7!)); // TODO-NULLABLE-GENERIC } int size = rest.Length; @@ -2215,27 +2215,27 @@ private int GetHashCodeCore(IEqualityComparer comparer) switch (k) { case 1: - return ValueTuple.CombineHashCodes(comparer.GetHashCode(Item7), rest.GetHashCode(comparer)); + return ValueTuple.CombineHashCodes(comparer.GetHashCode(Item7!), rest.GetHashCode(comparer)); // TODO-NULLABLE-GENERIC case 2: - return ValueTuple.CombineHashCodes(comparer.GetHashCode(Item6), comparer.GetHashCode(Item7), rest.GetHashCode(comparer)); + return ValueTuple.CombineHashCodes(comparer.GetHashCode(Item6!), comparer.GetHashCode(Item7!), rest.GetHashCode(comparer)); // TODO-NULLABLE-GENERIC case 3: - return ValueTuple.CombineHashCodes(comparer.GetHashCode(Item5), comparer.GetHashCode(Item6), comparer.GetHashCode(Item7), - rest.GetHashCode(comparer)); + return ValueTuple.CombineHashCodes(comparer.GetHashCode(Item5!), comparer.GetHashCode(Item6!), comparer.GetHashCode(Item7!), + rest.GetHashCode(comparer)); // TODO-NULLABLE-GENERIC case 4: - return ValueTuple.CombineHashCodes(comparer.GetHashCode(Item4), comparer.GetHashCode(Item5), comparer.GetHashCode(Item6), - comparer.GetHashCode(Item7), rest.GetHashCode(comparer)); + return ValueTuple.CombineHashCodes(comparer.GetHashCode(Item4!), comparer.GetHashCode(Item5!), comparer.GetHashCode(Item6!), + comparer.GetHashCode(Item7!), rest.GetHashCode(comparer)); // TODO-NULLABLE-GENERIC case 5: - return ValueTuple.CombineHashCodes(comparer.GetHashCode(Item3), comparer.GetHashCode(Item4), comparer.GetHashCode(Item5), - comparer.GetHashCode(Item6), comparer.GetHashCode(Item7), rest.GetHashCode(comparer)); + return ValueTuple.CombineHashCodes(comparer.GetHashCode(Item3!), comparer.GetHashCode(Item4!), comparer.GetHashCode(Item5!), + comparer.GetHashCode(Item6!), comparer.GetHashCode(Item7!), rest.GetHashCode(comparer)); // TODO-NULLABLE-GENERIC case 6: - return ValueTuple.CombineHashCodes(comparer.GetHashCode(Item2), comparer.GetHashCode(Item3), comparer.GetHashCode(Item4), - comparer.GetHashCode(Item5), comparer.GetHashCode(Item6), comparer.GetHashCode(Item7), - rest.GetHashCode(comparer)); + return ValueTuple.CombineHashCodes(comparer.GetHashCode(Item2!), comparer.GetHashCode(Item3!), comparer.GetHashCode(Item4!), + comparer.GetHashCode(Item5!), comparer.GetHashCode(Item6!), comparer.GetHashCode(Item7!), + rest.GetHashCode(comparer)); // TODO-NULLABLE-GENERIC case 7: case 8: - return ValueTuple.CombineHashCodes(comparer.GetHashCode(Item1), comparer.GetHashCode(Item2), comparer.GetHashCode(Item3), - comparer.GetHashCode(Item4), comparer.GetHashCode(Item5), comparer.GetHashCode(Item6), - comparer.GetHashCode(Item7), rest.GetHashCode(comparer)); + return ValueTuple.CombineHashCodes(comparer.GetHashCode(Item1!), comparer.GetHashCode(Item2!), comparer.GetHashCode(Item3!), + comparer.GetHashCode(Item4!), comparer.GetHashCode(Item5!), comparer.GetHashCode(Item6!), + comparer.GetHashCode(Item7!), rest.GetHashCode(comparer)); // TODO-NULLABLE-GENERIC } Debug.Fail("Missed all cases for computing ValueTuple hash code"); From 35a0bb76d7cc2d980644f4651285bd8bb700664c Mon Sep 17 00:00:00 2001 From: Krzysztof Wicher Date: Thu, 25 Apr 2019 16:50:53 -0700 Subject: [PATCH 154/607] fix build errors after merge Signed-off-by: dotnet-bot --- .../Collections/ObjectModel/Collection.cs | 2 +- .../ObjectModel/ReadOnlyCollection.cs | 2 +- .../System/Diagnostics/Contracts/Contracts.cs | 2 +- .../System/Diagnostics/Tracing/EventSource.cs | 8 ++++---- .../Tracing/TraceLogging/NameInfo.cs | 2 +- .../src/CoreLib/System/Reflection/TypeInfo.cs | 2 +- .../System/Resources/ResourceReader.Core.cs | 20 +++++++++---------- 7 files changed, 19 insertions(+), 19 deletions(-) diff --git a/src/Common/src/CoreLib/System/Collections/ObjectModel/Collection.cs b/src/Common/src/CoreLib/System/Collections/ObjectModel/Collection.cs index 89817ba61f2c..93a048cebcdd 100644 --- a/src/Common/src/CoreLib/System/Collections/ObjectModel/Collection.cs +++ b/src/Common/src/CoreLib/System/Collections/ObjectModel/Collection.cs @@ -341,7 +341,7 @@ void ICollection.CopyTo(Array array, int index) // For example, if the element type of the Array is derived from T, // we can't figure out if we can successfully copy the element beforehand. // - Type targetType = array.GetType().GetElementType(); + Type targetType = array.GetType().GetElementType()!; Type sourceType = typeof(T); if (!(targetType.IsAssignableFrom(sourceType) || sourceType.IsAssignableFrom(targetType))) { diff --git a/src/Common/src/CoreLib/System/Collections/ObjectModel/ReadOnlyCollection.cs b/src/Common/src/CoreLib/System/Collections/ObjectModel/ReadOnlyCollection.cs index 99ffd262f440..10795acd7c9e 100644 --- a/src/Common/src/CoreLib/System/Collections/ObjectModel/ReadOnlyCollection.cs +++ b/src/Common/src/CoreLib/System/Collections/ObjectModel/ReadOnlyCollection.cs @@ -160,7 +160,7 @@ void ICollection.CopyTo(Array array, int index) // For example, if the element type of the Array is derived from T, // we can't figure out if we can successfully copy the element beforehand. // - Type targetType = array.GetType().GetElementType(); + Type targetType = array.GetType().GetElementType()!; Type sourceType = typeof(T); if (!(targetType.IsAssignableFrom(sourceType) || sourceType.IsAssignableFrom(targetType))) { diff --git a/src/Common/src/CoreLib/System/Diagnostics/Contracts/Contracts.cs b/src/Common/src/CoreLib/System/Diagnostics/Contracts/Contracts.cs index 26cdc7f4910e..c5dc88798be1 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/Contracts/Contracts.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/Contracts/Contracts.cs @@ -655,7 +655,7 @@ private static void AssertMustUseRewriter(ContractFailureKind kind, string contr Assembly? probablyNotRewritten = null; for (int i = 0; i < stack.FrameCount; i++) { - Assembly? caller = stack.GetFrame(i)!.GetMethod()?.DeclaringType.Assembly; + Assembly? caller = stack.GetFrame(i)!.GetMethod()?.DeclaringType!.Assembly; if (caller != null && caller != thisAssembly) { probablyNotRewritten = caller; diff --git a/src/Common/src/CoreLib/System/Diagnostics/Tracing/EventSource.cs b/src/Common/src/CoreLib/System/Diagnostics/Tracing/EventSource.cs index c0416fcb2cbf..22a64c9c3158 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/Tracing/EventSource.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/Tracing/EventSource.cs @@ -243,7 +243,7 @@ public partial class EventSource : IDisposable { #if FEATURE_EVENTSOURCE_XPLAT - private static readonly EventListener persistent_Xplat_Listener = XplatEventLogger.InitializePersistentListener(); + private static readonly EventListener? persistent_Xplat_Listener = XplatEventLogger.InitializePersistentListener(); #endif //FEATURE_EVENTSOURCE_XPLAT /// @@ -704,7 +704,7 @@ private unsafe void DefineEventPipeEvents() if (eventID == 0) continue; - byte[] metadata = EventPipeMetadataGenerator.Instance.GenerateEventMetadata(m_eventData[i]); + byte[]? metadata = EventPipeMetadataGenerator.Instance.GenerateEventMetadata(m_eventData[i]); uint metadataLength = (metadata != null) ? (uint)metadata.Length : 0; string eventName = m_eventData[i].Name; @@ -3482,8 +3482,8 @@ private static bool AttributeTypeNamesMatch(Type attributeType, Type reflectedAt exception = e; } - Debug.Assert((flags & EventManifestOptions.Strict) != 0 && manifest != null); // TODO-NULLABLE: possible bug: if error is thrown before manifest is assigned in non-strict mode, this will NRE - if ((flags & EventManifestOptions.Strict) != 0 && (manifest.Errors.Count > 0 || exception != null)) + // TODO-NULLABLE: possible bug: if error is thrown before manifest is assigned in non-strict mode, this will NRE + if ((flags & EventManifestOptions.Strict) != 0 && (manifest!.Errors.Count > 0 || exception != null)) { string msg = string.Empty; diff --git a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/NameInfo.cs b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/NameInfo.cs index 48fe8cfcc49e..2f6d2f5deaf9 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/NameInfo.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/NameInfo.cs @@ -88,7 +88,7 @@ public IntPtr GetOrCreateEventHandle(EventProvider provider, TraceLoggingEventHa { if ((eventHandle = eventHandleTable[descriptor.EventId]) == IntPtr.Zero) { - byte[] metadataBlob = EventPipeMetadataGenerator.Instance.GenerateEventMetadata( + byte[]? metadataBlob = EventPipeMetadataGenerator.Instance.GenerateEventMetadata( descriptor.EventId, name, (EventKeywords)descriptor.Keywords, diff --git a/src/Common/src/CoreLib/System/Reflection/TypeInfo.cs b/src/Common/src/CoreLib/System/Reflection/TypeInfo.cs index 997207324276..0a207fd6361e 100644 --- a/src/Common/src/CoreLib/System/Reflection/TypeInfo.cs +++ b/src/Common/src/CoreLib/System/Reflection/TypeInfo.cs @@ -19,7 +19,7 @@ protected TypeInfo() { } public virtual EventInfo? GetDeclaredEvent(string name) => GetEvent(name, TypeInfo.DeclaredOnlyLookup); public virtual FieldInfo? GetDeclaredField(string name) => GetField(name, TypeInfo.DeclaredOnlyLookup); public virtual MethodInfo? GetDeclaredMethod(string name) => GetMethod(name, TypeInfo.DeclaredOnlyLookup); - public virtual TypeInfo? GetDeclaredNestedType(string name) => GetNestedType(name, TypeInfo.DeclaredOnlyLookup)!.GetTypeInfo(); + public virtual TypeInfo? GetDeclaredNestedType(string name) => GetNestedType(name, TypeInfo.DeclaredOnlyLookup)?.GetTypeInfo(); public virtual PropertyInfo? GetDeclaredProperty(string name) => GetProperty(name, TypeInfo.DeclaredOnlyLookup); public virtual IEnumerable GetDeclaredMethods(string name) diff --git a/src/Common/src/CoreLib/System/Resources/ResourceReader.Core.cs b/src/Common/src/CoreLib/System/Resources/ResourceReader.Core.cs index 80958b46b913..07f027947415 100644 --- a/src/Common/src/CoreLib/System/Resources/ResourceReader.Core.cs +++ b/src/Common/src/CoreLib/System/Resources/ResourceReader.Core.cs @@ -20,11 +20,11 @@ partial class ResourceReader // statics used to dynamically call into BinaryFormatter // When successfully located s_binaryFormatterType will point to the BinaryFormatter type // and s_deserializeMethod will point to an unbound delegate to the deserialize method. - private static Type s_binaryFormatterType; - private static Func s_deserializeMethod; + private static Type? s_binaryFormatterType; + private static Func? s_deserializeMethod; // This is the constructor the RuntimeResourceSet calls, - // passing in the stream to read from and the RuntimeResourceSet's + // passing in the stream to read from and the RuntimeResourceSet's // internal hash table (hash table of names with file offsets // and values, coupled to this ResourceReader). internal ResourceReader(Stream stream, Dictionary resCache, bool permitDeserialization) @@ -57,7 +57,7 @@ private object DeserializeObject(int typeIndex) Type type = FindType(typeIndex); - object graph = s_deserializeMethod(_binaryFormatter, _store.BaseStream); + object graph = s_deserializeMethod!(_binaryFormatter, _store.BaseStream); // guard against corrupted resources if (graph.GetType() != type) @@ -74,16 +74,16 @@ private void InitializeBinaryFormatter() LazyInitializer.EnsureInitialized(ref s_deserializeMethod, () => { - MethodInfo binaryFormatterDeserialize = s_binaryFormatterType.GetMethod("Deserialize", new Type[] { typeof(Stream) }); + MethodInfo binaryFormatterDeserialize = s_binaryFormatterType!.GetMethod("Deserialize", new Type[] { typeof(Stream) })!; // create an unbound delegate that can accept a BinaryFormatter instance as object return (Func)typeof(ResourceReader) - .GetMethod(nameof(CreateUntypedDelegate), BindingFlags.NonPublic | BindingFlags.Static) - .MakeGenericMethod(s_binaryFormatterType) - .Invoke(null, new object[] { binaryFormatterDeserialize }); + .GetMethod(nameof(CreateUntypedDelegate), BindingFlags.NonPublic | BindingFlags.Static)! + .MakeGenericMethod(s_binaryFormatterType)! + .Invoke(null, new object[] { binaryFormatterDeserialize })!; }); - _binaryFormatter = Activator.CreateInstance(s_binaryFormatterType); + _binaryFormatter = Activator.CreateInstance(s_binaryFormatterType!)!; } // generic method that we specialize at runtime once we've loaded the BinaryFormatter type @@ -157,7 +157,7 @@ public void GetResourceData(string resourceName, out string resourceType, out by } resourceType = TypeNameFromTypeCode(typeCode); - // The length must be adjusted to subtract off the number + // The length must be adjusted to subtract off the number // of bytes in the 7 bit encoded type code. len -= (int)(_store.BaseStream.Position - (_dataSectionOffset + dataPos)); byte[] bytes = _store.ReadBytes(len); From 482755984a308e3d391a98a6a683395e24df058c Mon Sep 17 00:00:00 2001 From: Buyaa Namnan Date: Sun, 28 Apr 2019 21:43:09 -0700 Subject: [PATCH 155/607] Fix test failures Signed-off-by: dotnet-bot --- .../src/CoreLib/System/Diagnostics/Tracing/EventSource.cs | 1 - src/Common/src/CoreLib/System/Reflection/Module.cs | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Common/src/CoreLib/System/Diagnostics/Tracing/EventSource.cs b/src/Common/src/CoreLib/System/Diagnostics/Tracing/EventSource.cs index 22a64c9c3158..91c58bfad389 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/Tracing/EventSource.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/Tracing/EventSource.cs @@ -3408,7 +3408,6 @@ private static bool AttributeTypeNamesMatch(Type attributeType, Type reflectedAt bool hasRelatedActivityID = RemoveFirstArgIfRelatedActivityId(ref args); if (!(source != null && source.SelfDescribingEvents)) { - Debug.Assert(eventData != null); manifest.StartEvent(eventName, eventAttribute); for (int fieldIdx = 0; fieldIdx < args.Length; fieldIdx++) { diff --git a/src/Common/src/CoreLib/System/Reflection/Module.cs b/src/Common/src/CoreLib/System/Reflection/Module.cs index b54e70709664..aac6a85d1f2e 100644 --- a/src/Common/src/CoreLib/System/Reflection/Module.cs +++ b/src/Common/src/CoreLib/System/Reflection/Module.cs @@ -141,7 +141,7 @@ public virtual Type[] FindTypes(TypeFilter? filter, object filterCriteria) public override string ToString() => ScopeName; - public static readonly TypeFilter FilterTypeName = (m, c) => FilterTypeNameImpl(m, c, StringComparison.Ordinal); // TODO-NULLABLE https://github.com/dotnet/roslyn/issues/23268 + public static readonly TypeFilter FilterTypeName = (m, c) => FilterTypeNameImpl(m, c, StringComparison.Ordinal); public static readonly TypeFilter FilterTypeNameIgnoreCase = (m, c) => FilterTypeNameImpl(m, c, StringComparison.OrdinalIgnoreCase); private const BindingFlags DefaultLookup = BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public; From 0c5d8a1121e3f269d1080e121274e3767a0ff732 Mon Sep 17 00:00:00 2001 From: Buyaa Namnan Date: Tue, 30 Apr 2019 10:37:21 -0700 Subject: [PATCH 156/607] Merge master into NullableFeature Signed-off-by: dotnet-bot --- src/Common/src/CoreLib/System/DefaultBinder.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Common/src/CoreLib/System/DefaultBinder.cs b/src/Common/src/CoreLib/System/DefaultBinder.cs index 8d386ddc634d..249f3b92f8e5 100644 --- a/src/Common/src/CoreLib/System/DefaultBinder.cs +++ b/src/Common/src/CoreLib/System/DefaultBinder.cs @@ -1207,7 +1207,7 @@ private static bool CreateParamOrder(int[] paramOrder, ParameterInfo[] pars, str // CanChangePrimitive // This will determine if the source can be converted to the target type - internal static bool CanChangePrimitive(Type source, Type target) + internal static bool CanChangePrimitive(Type? source, Type? target) { if ((source == typeof(IntPtr) && target == typeof(IntPtr)) || (source == typeof(UIntPtr) && target == typeof(UIntPtr))) From 28ce8051404b0c419d17031da842de898837e5ca Mon Sep 17 00:00:00 2001 From: Krzysztof Wicher Date: Wed, 1 May 2019 13:29:33 -0700 Subject: [PATCH 157/607] Add using System.Diagnostics on some files --- .../System/Diagnostics/Tracing/TraceLogging/ArrayTypeInfo.cs | 1 + .../System/Diagnostics/Tracing/TraceLogging/DataCollector.cs | 1 + .../Diagnostics/Tracing/TraceLogging/EnumerableTypeInfo.cs | 1 + .../Diagnostics/Tracing/TraceLogging/EventSourceActivity.cs | 1 + .../System/Diagnostics/Tracing/TraceLogging/FieldMetadata.cs | 1 + .../System/Diagnostics/Tracing/TraceLogging/SimpleEventTypes.cs | 1 + .../Diagnostics/Tracing/TraceLogging/TraceLoggingEventSource.cs | 1 + 7 files changed, 7 insertions(+) diff --git a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/ArrayTypeInfo.cs b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/ArrayTypeInfo.cs index 83d37c458eeb..f0db86229208 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/ArrayTypeInfo.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/ArrayTypeInfo.cs @@ -5,6 +5,7 @@ #nullable enable using System; using System.Collections.Generic; +using System.Diagnostics; #if ES_BUILD_STANDALONE namespace Microsoft.Diagnostics.Tracing diff --git a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/DataCollector.cs b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/DataCollector.cs index 6afd1872e474..4270914580cf 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/DataCollector.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/DataCollector.cs @@ -4,6 +4,7 @@ #nullable enable using System; +using System.Diagnostics; using System.Resources; using System.Runtime.InteropServices; using System.Security; diff --git a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/EnumerableTypeInfo.cs b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/EnumerableTypeInfo.cs index 9a984587ee4e..0d4245457217 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/EnumerableTypeInfo.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/EnumerableTypeInfo.cs @@ -6,6 +6,7 @@ using System; using System.Collections; using System.Collections.Generic; +using System.Diagnostics; #if ES_BUILD_STANDALONE namespace Microsoft.Diagnostics.Tracing diff --git a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/EventSourceActivity.cs b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/EventSourceActivity.cs index ab5f6d0b6396..d45ae7d8f6f4 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/EventSourceActivity.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/EventSourceActivity.cs @@ -4,6 +4,7 @@ #nullable enable using System; +using System.Diagnostics; #if !ES_BUILD_AGAINST_DOTNET_V35 using Contract = System.Diagnostics.Contracts.Contract; diff --git a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/FieldMetadata.cs b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/FieldMetadata.cs index c3f4b67a57ba..15ff780fbb67 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/FieldMetadata.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/FieldMetadata.cs @@ -4,6 +4,7 @@ #nullable enable using System; +using System.Diagnostics; using System.Resources; using Encoding = System.Text.Encoding; diff --git a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/SimpleEventTypes.cs b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/SimpleEventTypes.cs index 280c03c70bf8..78fe98969845 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/SimpleEventTypes.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/SimpleEventTypes.cs @@ -4,6 +4,7 @@ #nullable enable using System; +using System.Diagnostics; using Interlocked = System.Threading.Interlocked; #if ES_BUILD_STANDALONE diff --git a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/TraceLoggingEventSource.cs b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/TraceLoggingEventSource.cs index 178334f57f6f..e49889dfe4d1 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/TraceLoggingEventSource.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/TraceLoggingEventSource.cs @@ -21,6 +21,7 @@ #endif using System; +using System.Diagnostics; using System.Resources; using System.Runtime.InteropServices; using System.Security; From 07fdefad609cb4fb374366d12f69ce4011ef0329 Mon Sep 17 00:00:00 2001 From: Krzysztof Wicher Date: Wed, 1 May 2019 13:52:34 -0700 Subject: [PATCH 158/607] Globally disable nullability warning CS8609 (to match System.Private.CoreLib) --- Directory.Build.props | 1 + 1 file changed, 1 insertion(+) diff --git a/Directory.Build.props b/Directory.Build.props index dc6989618df6..ae69e9c84458 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -331,6 +331,7 @@ $(NoWarn);BCL0020 + $(NoWarn);CS8609 From d0759da699ff6faeb767b1531158dcab896098dc Mon Sep 17 00:00:00 2001 From: Charles Stoner Date: Wed, 1 May 2019 17:21:05 -0700 Subject: [PATCH 159/607] Run Microsoft.VisualBasic.Core.Tests sequentially (#37345) --- .../tests/AssemblyAttributes.cs | 9 +++++++++ .../tests/Microsoft.VisualBasic.Core.Tests.csproj | 1 + 2 files changed, 10 insertions(+) create mode 100644 src/Microsoft.VisualBasic.Core/tests/AssemblyAttributes.cs diff --git a/src/Microsoft.VisualBasic.Core/tests/AssemblyAttributes.cs b/src/Microsoft.VisualBasic.Core/tests/AssemblyAttributes.cs new file mode 100644 index 000000000000..14f2550d780a --- /dev/null +++ b/src/Microsoft.VisualBasic.Core/tests/AssemblyAttributes.cs @@ -0,0 +1,9 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using Xunit; + +// Tests that use ProjectData or AssemblyData rely on shared state +// and should not be run in parallel. +[assembly: CollectionBehavior(CollectionBehavior.CollectionPerAssembly, DisableTestParallelization = true, MaxParallelThreads = 1)] diff --git a/src/Microsoft.VisualBasic.Core/tests/Microsoft.VisualBasic.Core.Tests.csproj b/src/Microsoft.VisualBasic.Core/tests/Microsoft.VisualBasic.Core.Tests.csproj index f9136263635b..a939ef0dc2e8 100644 --- a/src/Microsoft.VisualBasic.Core/tests/Microsoft.VisualBasic.Core.Tests.csproj +++ b/src/Microsoft.VisualBasic.Core/tests/Microsoft.VisualBasic.Core.Tests.csproj @@ -5,6 +5,7 @@ netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release + From 490fc5afbc607d48eab814ed6039a5d7b8fb26c0 Mon Sep 17 00:00:00 2001 From: Stephen Toub Date: Wed, 1 May 2019 20:46:00 -0400 Subject: [PATCH 160/607] Remove NoWarn for BCL0020 (#37342) --- Directory.Build.props | 1 - 1 file changed, 1 deletion(-) diff --git a/Directory.Build.props b/Directory.Build.props index ae69e9c84458..986ca8080e66 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -330,7 +330,6 @@ true - $(NoWarn);BCL0020 $(NoWarn);CS8609 From 49262a8fb76b5763a66b0a781239bf16f610cefe Mon Sep 17 00:00:00 2001 From: Ahson Khan Date: Wed, 1 May 2019 18:46:28 -0700 Subject: [PATCH 161/607] Add JsonEncodedText with Utf8JsonWriter overloads that accept it (#37323) * Initial impl of JsonEncodedText with tests. * Auto-generate the reference assembly. * Update tests and ref assembly to include dummy field. * Add JsonEncodedText overloads to Utf8JsonWriter with tests. * Auto-gen the ref * Address PR feedback. * Fix typo - dispose the Utf8JsonWriter within serializer. * Add XML comments to the new APIs and types. * Alpha order the csproj. --- src/System.Text.Json/ref/System.Text.Json.cs | 36 ++ .../src/Resources/Strings.resx | 15 +- .../src/System.Text.Json.csproj | 1 + .../src/System/Text/Json/JsonEncodedText.cs | 203 +++++++ .../Reader/JsonReaderHelper.Unescaping.cs | 72 ++- .../JsonSerializer.Write.Helpers.cs | 2 +- .../src/System/Text/Json/ThrowHelper.cs | 16 +- ...Utf8JsonWriter.WriteProperties.DateTime.cs | 27 + ...onWriter.WriteProperties.DateTimeOffset.cs | 27 + .../Utf8JsonWriter.WriteProperties.Decimal.cs | 27 + .../Utf8JsonWriter.WriteProperties.Double.cs | 29 + .../Utf8JsonWriter.WriteProperties.Float.cs | 29 + .../Utf8JsonWriter.WriteProperties.Guid.cs | 27 + .../Utf8JsonWriter.WriteProperties.Helpers.cs | 7 + .../Utf8JsonWriter.WriteProperties.Literal.cs | 50 ++ ...JsonWriter.WriteProperties.SignedNumber.cs | 44 ++ .../Utf8JsonWriter.WriteProperties.String.cs | 316 +++++++++-- ...onWriter.WriteProperties.UnsignedNumber.cs | 46 ++ .../Utf8JsonWriter.WriteValues.String.cs | 23 + .../System/Text/Json/Writer/Utf8JsonWriter.cs | 47 ++ .../tests/JsonDocumentTests.cs | 13 +- .../tests/JsonEncodedTextTests.cs | 329 +++++++++++ .../tests/System.Text.Json.Tests.csproj | 1 + .../tests/Utf8JsonWriterTests.cs | 518 ++++++++++++++++-- 24 files changed, 1816 insertions(+), 89 deletions(-) create mode 100644 src/System.Text.Json/src/System/Text/Json/JsonEncodedText.cs create mode 100644 src/System.Text.Json/tests/JsonEncodedTextTests.cs diff --git a/src/System.Text.Json/ref/System.Text.Json.cs b/src/System.Text.Json/ref/System.Text.Json.cs index 015eb69d41e4..cb0b5a2f4509 100644 --- a/src/System.Text.Json/ref/System.Text.Json.cs +++ b/src/System.Text.Json/ref/System.Text.Json.cs @@ -101,6 +101,18 @@ public void Reset() { } System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } } } + public readonly partial struct JsonEncodedText : System.IEquatable + { + private readonly object _dummy; + public System.ReadOnlySpan EncodedUtf8Bytes { get { throw null; } } + public static System.Text.Json.JsonEncodedText Encode(System.ReadOnlySpan utf8Value) { throw null; } + public static System.Text.Json.JsonEncodedText Encode(System.ReadOnlySpan value) { throw null; } + public static System.Text.Json.JsonEncodedText Encode(string value) { throw null; } + public override bool Equals(object obj) { throw null; } + public bool Equals(System.Text.Json.JsonEncodedText other) { throw null; } + public override int GetHashCode() { throw null; } + public override string ToString() { throw null; } + } public readonly partial struct JsonProperty { private readonly object _dummy; @@ -225,6 +237,7 @@ public void Reset(System.IO.Stream utf8Json) { } public void WriteBoolean(System.ReadOnlySpan utf8PropertyName, bool value) { } public void WriteBoolean(System.ReadOnlySpan propertyName, bool value) { } public void WriteBoolean(string propertyName, bool value) { } + public void WriteBoolean(System.Text.Json.JsonEncodedText propertyName, bool value) { } public void WriteBooleanValue(bool value) { } public void WriteCommentValue(System.ReadOnlySpan utf8Value) { } public void WriteCommentValue(System.ReadOnlySpan value) { } @@ -234,6 +247,7 @@ public void WriteEndObject() { } public void WriteNull(System.ReadOnlySpan utf8PropertyName) { } public void WriteNull(System.ReadOnlySpan propertyName) { } public void WriteNull(string propertyName) { } + public void WriteNull(System.Text.Json.JsonEncodedText propertyName) { } public void WriteNullValue() { } public void WriteNumber(System.ReadOnlySpan utf8PropertyName, decimal value) { } public void WriteNumber(System.ReadOnlySpan utf8PropertyName, double value) { } @@ -262,6 +276,15 @@ public void WriteNumber(string propertyName, float value) { } public void WriteNumber(string propertyName, uint value) { } [System.CLSCompliantAttribute(false)] public void WriteNumber(string propertyName, ulong value) { } + public void WriteNumber(System.Text.Json.JsonEncodedText propertyName, decimal value) { } + public void WriteNumber(System.Text.Json.JsonEncodedText propertyName, double value) { } + public void WriteNumber(System.Text.Json.JsonEncodedText propertyName, int value) { } + public void WriteNumber(System.Text.Json.JsonEncodedText propertyName, long value) { } + public void WriteNumber(System.Text.Json.JsonEncodedText propertyName, float value) { } + [System.CLSCompliantAttribute(false)] + public void WriteNumber(System.Text.Json.JsonEncodedText propertyName, uint value) { } + [System.CLSCompliantAttribute(false)] + public void WriteNumber(System.Text.Json.JsonEncodedText propertyName, ulong value) { } public void WriteNumberValue(decimal value) { } public void WriteNumberValue(double value) { } public void WriteNumberValue(int value) { } @@ -275,34 +298,47 @@ public void WriteStartArray() { } public void WriteStartArray(System.ReadOnlySpan utf8PropertyName) { } public void WriteStartArray(System.ReadOnlySpan propertyName) { } public void WriteStartArray(string propertyName) { } + public void WriteStartArray(System.Text.Json.JsonEncodedText propertyName) { } public void WriteStartObject() { } public void WriteStartObject(System.ReadOnlySpan utf8PropertyName) { } public void WriteStartObject(System.ReadOnlySpan propertyName) { } public void WriteStartObject(string propertyName) { } + public void WriteStartObject(System.Text.Json.JsonEncodedText propertyName) { } public void WriteString(System.ReadOnlySpan utf8PropertyName, System.DateTime value) { } public void WriteString(System.ReadOnlySpan utf8PropertyName, System.DateTimeOffset value) { } public void WriteString(System.ReadOnlySpan utf8PropertyName, System.Guid value) { } public void WriteString(System.ReadOnlySpan utf8PropertyName, System.ReadOnlySpan utf8Value) { } public void WriteString(System.ReadOnlySpan utf8PropertyName, System.ReadOnlySpan value) { } public void WriteString(System.ReadOnlySpan utf8PropertyName, string value) { } + public void WriteString(System.ReadOnlySpan utf8PropertyName, System.Text.Json.JsonEncodedText value) { } public void WriteString(System.ReadOnlySpan propertyName, System.DateTime value) { } public void WriteString(System.ReadOnlySpan propertyName, System.DateTimeOffset value) { } public void WriteString(System.ReadOnlySpan propertyName, System.Guid value) { } public void WriteString(System.ReadOnlySpan propertyName, System.ReadOnlySpan utf8Value) { } public void WriteString(System.ReadOnlySpan propertyName, System.ReadOnlySpan value) { } public void WriteString(System.ReadOnlySpan propertyName, string value) { } + public void WriteString(System.ReadOnlySpan propertyName, System.Text.Json.JsonEncodedText value) { } public void WriteString(string propertyName, System.DateTime value) { } public void WriteString(string propertyName, System.DateTimeOffset value) { } public void WriteString(string propertyName, System.Guid value) { } public void WriteString(string propertyName, System.ReadOnlySpan utf8Value) { } public void WriteString(string propertyName, System.ReadOnlySpan value) { } public void WriteString(string propertyName, string value) { } + public void WriteString(string propertyName, System.Text.Json.JsonEncodedText value) { } + public void WriteString(System.Text.Json.JsonEncodedText propertyName, System.DateTime value) { } + public void WriteString(System.Text.Json.JsonEncodedText propertyName, System.DateTimeOffset value) { } + public void WriteString(System.Text.Json.JsonEncodedText propertyName, System.Guid value) { } + public void WriteString(System.Text.Json.JsonEncodedText propertyName, System.ReadOnlySpan utf8Value) { } + public void WriteString(System.Text.Json.JsonEncodedText propertyName, System.ReadOnlySpan value) { } + public void WriteString(System.Text.Json.JsonEncodedText propertyName, string value) { } + public void WriteString(System.Text.Json.JsonEncodedText propertyName, System.Text.Json.JsonEncodedText value) { } public void WriteStringValue(System.DateTime value) { } public void WriteStringValue(System.DateTimeOffset value) { } public void WriteStringValue(System.Guid value) { } public void WriteStringValue(System.ReadOnlySpan utf8Value) { } public void WriteStringValue(System.ReadOnlySpan value) { } public void WriteStringValue(string value) { } + public void WriteStringValue(System.Text.Json.JsonEncodedText value) { } } } namespace System.Text.Json.Serialization diff --git a/src/System.Text.Json/src/Resources/Strings.resx b/src/System.Text.Json/src/Resources/Strings.resx index a403565943ca..c7ac357f2416 100644 --- a/src/System.Text.Json/src/Resources/Strings.resx +++ b/src/System.Text.Json/src/Resources/Strings.resx @@ -138,11 +138,14 @@ Cannot transcode invalid UTF-8 JSON text to UTF-16 string. - - Cannot write invalid UTF-16 text as JSON. Invalid surrogate value: '{0}'. + + Cannot transcode invalid UTF-16 string to UTF-8 JSON text. - - Cannot write invalid UTF-8 text as JSON. Invalid input: '{0}'. + + Cannot encode invalid UTF-16 text as JSON. Invalid surrogate value: '{0}'. + + + Cannot encode invalid UTF-8 text as JSON. Invalid input: '{0}'. Cannot write a JSON property within an array or as the first JSON token. Current token type is '{0}'. @@ -238,7 +241,7 @@ The maximum configured depth of {0} has been exceeded. Cannot read next JSON object. - The JSON property name of length {0} is too large and not supported by the JSON writer. + The JSON property name of length {0} is too large and not supported. The JSON value is either too large or too small for a Decimal. @@ -274,7 +277,7 @@ .NET number values such as positive and negative infinity cannot be written as valid JSON. - The JSON value of length {0} is too large and not supported by the JSON writer. + The JSON value of length {0} is too large and not supported. Expected depth to be zero at the end of the JSON payload. There is an open JSON object or array that should be closed. diff --git a/src/System.Text.Json/src/System.Text.Json.csproj b/src/System.Text.Json/src/System.Text.Json.csproj index c377494d6e77..9181e86ac98a 100644 --- a/src/System.Text.Json/src/System.Text.Json.csproj +++ b/src/System.Text.Json/src/System.Text.Json.csproj @@ -14,6 +14,7 @@ + diff --git a/src/System.Text.Json/src/System/Text/Json/JsonEncodedText.cs b/src/System.Text.Json/src/System/Text/Json/JsonEncodedText.cs new file mode 100644 index 000000000000..c8b0cf6f97e5 --- /dev/null +++ b/src/System.Text.Json/src/System/Text/Json/JsonEncodedText.cs @@ -0,0 +1,203 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Buffers; +using System.Diagnostics; + +namespace System.Text.Json +{ + /// + /// Provides a way to transform UTF-8 or UTF-16 encoded text into a form that is suitable for JSON. + /// + /// + /// This can be used to cache and store known strings used for writing JSON ahead of time by pre-encoding them up front. + /// + public readonly struct JsonEncodedText : IEquatable + { + private readonly byte[] _utf8Value; + private readonly string _value; + + /// + /// Returns the UTF-8 encoded representation of the pre-encoded JSON text. + /// + public ReadOnlySpan EncodedUtf8Bytes => _utf8Value; + + private JsonEncodedText(byte[] utf8Value) + { + Debug.Assert(utf8Value != null); + + _value = JsonReaderHelper.GetTextFromUtf8(utf8Value); + _utf8Value = utf8Value; + } + + /// + /// Encodes the string text value as a JSON string. + /// + /// The UTF-16 encoded value to be transformed as JSON encoded text. + /// + /// Thrown if value is null. + /// + /// + /// Thrown when the specified value is too large or if it contains invalid UTF-16 characters. + /// + public static JsonEncodedText Encode(string value) + { + if (value == null) + throw new ArgumentNullException(nameof(value)); + + return Encode(value.AsSpan()); + } + + /// + /// Encodes the UTF-16 text value as a JSON string. + /// + /// The UTF-16 encoded value to be transformed as JSON encoded text. + /// + /// Thrown when the specified value is too large or if it contains invalid UTF-16 characters. + /// + public static JsonEncodedText Encode(ReadOnlySpan value) + { + if (value.Length == 0) + { + return new JsonEncodedText(Array.Empty()); + } + + return TranscodeAndEncode(value); + } + + private static JsonEncodedText TranscodeAndEncode(ReadOnlySpan value) + { + JsonWriterHelper.ValidateValue(value); + + int expectedByteCount = JsonReaderHelper.GetUtf8ByteCount(value); + byte[] utf8Bytes = ArrayPool.Shared.Rent(expectedByteCount); + + JsonEncodedText encodedText; + + // Since GetUtf8ByteCount above already throws on invalid input, the transcoding + // to UTF-8 is guaranteed to succeed here. Therefore, there's no need for a try-catch-finally block. + int actualByteCount = JsonReaderHelper.GetUtf8FromText(value, utf8Bytes); + Debug.Assert(expectedByteCount == actualByteCount); + + encodedText = EncodeHelper(utf8Bytes.AsSpan(0, actualByteCount)); + + // On the basis that this is user data, go ahead and clear it. + utf8Bytes.AsSpan(0, expectedByteCount).Clear(); + ArrayPool.Shared.Return(utf8Bytes); + + return encodedText; + } + + /// + /// Encodes the UTF-8 text value as a JSON string. + /// + /// The UTF-8 encoded value to be transformed as JSON encoded text. + /// + /// Thrown when the specified value is too large or if it contains invalid UTF-8 bytes. + /// + public static JsonEncodedText Encode(ReadOnlySpan utf8Value) + { + if (utf8Value.Length == 0) + { + return new JsonEncodedText(Array.Empty()); + } + + JsonWriterHelper.ValidateValue(utf8Value); + return EncodeHelper(utf8Value); + } + + private static JsonEncodedText EncodeHelper(ReadOnlySpan utf8Value) + { + int idx = JsonWriterHelper.NeedsEscaping(utf8Value); + + if (idx != -1) + { + return new JsonEncodedText(GetEscapedString(utf8Value, idx)); + } + else + { + return new JsonEncodedText(utf8Value.ToArray()); + } + } + + private static byte[] GetEscapedString(ReadOnlySpan utf8Value, int firstEscapeIndexVal) + { + Debug.Assert(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= utf8Value.Length); + Debug.Assert(firstEscapeIndexVal >= 0 && firstEscapeIndexVal < utf8Value.Length); + + byte[] valueArray = null; + + int length = JsonWriterHelper.GetMaxEscapedLength(utf8Value.Length, firstEscapeIndexVal); + + Span escapedValue = length <= JsonConstants.StackallocThreshold ? + stackalloc byte[length] : + (valueArray = ArrayPool.Shared.Rent(length)); + + JsonWriterHelper.EscapeString(utf8Value, escapedValue, firstEscapeIndexVal, out int written); + + byte[] escapedString = escapedValue.Slice(0, written).ToArray(); + + if (valueArray != null) + { + ArrayPool.Shared.Return(valueArray); + } + + return escapedString; + } + + /// + /// Determines whether this instance and another specified instance have the same value. + /// + /// + /// Default instances of are treated as equal. + /// + public bool Equals(JsonEncodedText other) + { + if (_value == null) + { + return other._value == null; + } + else + { + return _value.Equals(other._value); + } + } + + /// + /// Determines whether this instance and a specified object, which must also be a instance, have the same value. + /// + /// + /// If is null, the method returns false. + /// + public override bool Equals(object obj) + { + if (obj is JsonEncodedText encodedText) + { + return Equals(encodedText); + } + return false; + } + + /// + /// Converts the value of this instance to a . + /// + /// + /// Returns the underlying UTF-16 encoded string. + /// + /// + /// Returns an empty string on a default instance of . + /// + public override string ToString() + => _value ?? string.Empty; + + /// + /// Returns the hash code for this . + /// + /// + /// Returns 0 on a default instance of . + /// + public override int GetHashCode() + => _value == null ? 0 : _value.GetHashCode(); + } +} diff --git a/src/System.Text.Json/src/System/Text/Json/Reader/JsonReaderHelper.Unescaping.cs b/src/System.Text.Json/src/System/Text/Json/Reader/JsonReaderHelper.Unescaping.cs index 8ac8f389f905..e7025e796157 100644 --- a/src/System.Text.Json/src/System/Text/Json/Reader/JsonReaderHelper.Unescaping.cs +++ b/src/System.Text.Json/src/System/Text/Json/Reader/JsonReaderHelper.Unescaping.cs @@ -140,39 +140,83 @@ public static string TranscodeHelper(ReadOnlySpan utf8Unescaped) internal static int GetUtf8ByteCount(ReadOnlySpan text) { + try + { #if BUILDING_INBOX_LIBRARY - return s_utf8Encoding.GetByteCount(text); + return s_utf8Encoding.GetByteCount(text); #else - if (text.IsEmpty) + if (text.IsEmpty) + { + return 0; + } + unsafe + { + fixed (char* charPtr = text) + { + return s_utf8Encoding.GetByteCount(charPtr, text.Length); + } + } +#endif + } + catch (EncoderFallbackException ex) { - return 0; + // We want to be consistent with the exception being thrown + // so the user only has to catch a single exception. + // Since we already throw ArgumentException when validating other arguments, + // using that exception for failure to encode invalid UTF-16 chars as well. + // Therefore, wrapping the EncoderFallbackException around an ArgumentException. + throw ThrowHelper.GetArgumentException_ReadInvalidUTF16(ex); } - unsafe + } + + internal static int GetUtf8FromText(ReadOnlySpan text, Span dest) + { + try { - fixed (char* charPtr = text) +#if BUILDING_INBOX_LIBRARY + return s_utf8Encoding.GetBytes(text, dest); +#else + if (text.IsEmpty) { - return s_utf8Encoding.GetByteCount(charPtr, text.Length); + return 0; + } + + unsafe + { + fixed (char* charPtr = text) + fixed (byte* destPtr = dest) + { + return s_utf8Encoding.GetBytes(charPtr, text.Length, destPtr, dest.Length); + } } - } #endif + } + catch (EncoderFallbackException ex) + { + // We want to be consistent with the exception being thrown + // so the user only has to catch a single exception. + // Since we already throw ArgumentException when validating other arguments, + // using that exception for failure to encode invalid UTF-16 chars as well. + // Therefore, wrapping the EncoderFallbackException around an ArgumentException. + throw ThrowHelper.GetArgumentException_ReadInvalidUTF16(ex); + } } - internal static int GetUtf8FromText(ReadOnlySpan text, Span dest) + internal static string GetTextFromUtf8(ReadOnlySpan utf8Text) { #if BUILDING_INBOX_LIBRARY - return s_utf8Encoding.GetBytes(text, dest); + return s_utf8Encoding.GetString(utf8Text); #else - if (text.IsEmpty) + if (utf8Text.IsEmpty) { - return 0; + return string.Empty; } unsafe { - fixed (char* charPtr = text) - fixed (byte* destPtr = dest) + fixed (byte* bytePtr = utf8Text) { - return s_utf8Encoding.GetBytes(charPtr, text.Length, destPtr, dest.Length); + return s_utf8Encoding.GetString(bytePtr, utf8Text.Length); } } #endif diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.Helpers.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.Helpers.cs index ab80dd5b2449..573f00852700 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.Helpers.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.Helpers.cs @@ -94,7 +94,7 @@ private static void WriteCore(PooledBufferWriter output, object value, Typ { Debug.Assert(type != null || value == null); - var writer = new Utf8JsonWriter(output, options.GetWriterOptions()); + using var writer = new Utf8JsonWriter(output, options.GetWriterOptions()); if (value == null) { diff --git a/src/System.Text.Json/src/System/Text/Json/ThrowHelper.cs b/src/System.Text.Json/src/System/Text/Json/ThrowHelper.cs index 4d9abbd804d5..fd9485804200 100644 --- a/src/System.Text.Json/src/System/Text/Json/ThrowHelper.cs +++ b/src/System.Text.Json/src/System/Text/Json/ThrowHelper.cs @@ -116,6 +116,13 @@ public static void ThrowInvalidOperationOrArgumentException(ReadOnlySpan p } } + public static void ThrowInvalidOperationException(int currentDepth) + { + currentDepth &= JsonConstants.RemoveFlagsBitMask; + Debug.Assert(currentDepth >= JsonConstants.MaxWriterDepth); + ThrowInvalidOperationException(SR.Format(SR.DepthTooLarge, currentDepth, JsonConstants.MaxWriterDepth)); + } + public static void ThrowInvalidOperationException(string message) { throw GetInvalidOperationException(message); @@ -373,12 +380,12 @@ public static void ThrowArgumentException_InvalidUTF8(ReadOnlySpan value) builder.Append("..."); } - throw new ArgumentException(SR.Format(SR.CannotWriteInvalidUTF8, builder)); + throw new ArgumentException(SR.Format(SR.CannotEncodeInvalidUTF8, builder)); } public static void ThrowArgumentException_InvalidUTF16(int charAsInt) { - throw new ArgumentException(SR.Format(SR.CannotWriteInvalidUTF16, $"0x{charAsInt:X2}")); + throw new ArgumentException(SR.Format(SR.CannotEncodeInvalidUTF16, $"0x{charAsInt:X2}")); } public static void ThrowInvalidOperationException_ReadInvalidUTF16(int charAsInt) @@ -396,6 +403,11 @@ public static InvalidOperationException GetInvalidOperationException_ReadInvalid return new InvalidOperationException(SR.CannotTranscodeInvalidUtf8, innerException); } + public static ArgumentException GetArgumentException_ReadInvalidUTF16(EncoderFallbackException innerException) + { + return new ArgumentException(SR.CannotTranscodeInvalidUtf16, innerException); + } + [MethodImpl(MethodImplOptions.NoInlining)] public static InvalidOperationException GetInvalidOperationException(ExceptionResource resource, int currentDepth, byte token, JsonTokenType tokenType) { diff --git a/src/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.WriteProperties.DateTime.cs b/src/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.WriteProperties.DateTime.cs index 065c72f982a1..185be31ef1c5 100644 --- a/src/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.WriteProperties.DateTime.cs +++ b/src/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.WriteProperties.DateTime.cs @@ -10,6 +10,33 @@ namespace System.Text.Json { public sealed partial class Utf8JsonWriter { + /// + /// Writes the pre-encoded property name and value (as a JSON string) as part of a name/value pair of a JSON object. + /// + /// The JSON encoded property name of the JSON object to be transcoded and written as UTF-8. + /// The value to be written as a JSON string as part of the name/value pair. + /// + /// The property name should already be escaped when the instance of was created. + /// + /// + /// Thrown if this would result in an invalid JSON to be written (while validation is enabled). + /// + /// + /// Writes the using the round-trippable ('O') , for example: 2017-06-12T05:30:45.7680000. + /// + public void WriteString(JsonEncodedText propertyName, DateTime value) + => WriteStringHelper(propertyName.EncodedUtf8Bytes, value); + + private void WriteStringHelper(ReadOnlySpan utf8PropertyName, DateTime value) + { + Debug.Assert(utf8PropertyName.Length <= JsonConstants.MaxTokenSize); + + WriteStringByOptions(utf8PropertyName, value); + + SetFlagToAddListSeparatorBeforeNextItem(); + _tokenType = JsonTokenType.String; + } + /// /// Writes the property name and value (as a JSON string) as part of a name/value pair of a JSON object. /// diff --git a/src/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.WriteProperties.DateTimeOffset.cs b/src/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.WriteProperties.DateTimeOffset.cs index 02474bdd7018..d20bcfac3d20 100644 --- a/src/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.WriteProperties.DateTimeOffset.cs +++ b/src/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.WriteProperties.DateTimeOffset.cs @@ -10,6 +10,33 @@ namespace System.Text.Json { public sealed partial class Utf8JsonWriter { + /// + /// Writes the pre-encoded property name and value (as a JSON string) as part of a name/value pair of a JSON object. + /// + /// The JSON encoded property name of the JSON object to be transcoded and written as UTF-8. + /// The value to be written as a JSON string as part of the name/value pair. + /// + /// The property name should already be escaped when the instance of was created. + /// + /// + /// Thrown if this would result in an invalid JSON to be written (while validation is enabled). + /// + /// + /// Writes the using the round-trippable ('O') , for example: 2017-06-12T05:30:45.7680000-07:00. + /// + public void WriteString(JsonEncodedText propertyName, DateTimeOffset value) + => WriteStringHelper(propertyName.EncodedUtf8Bytes, value); + + private void WriteStringHelper(ReadOnlySpan utf8PropertyName, DateTimeOffset value) + { + Debug.Assert(utf8PropertyName.Length <= JsonConstants.MaxTokenSize); + + WriteStringByOptions(utf8PropertyName, value); + + SetFlagToAddListSeparatorBeforeNextItem(); + _tokenType = JsonTokenType.String; + } + /// /// Writes the property name and value (as a JSON string) as part of a name/value pair of a JSON object. /// diff --git a/src/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.WriteProperties.Decimal.cs b/src/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.WriteProperties.Decimal.cs index be3a8f5248ac..90c6cc967119 100644 --- a/src/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.WriteProperties.Decimal.cs +++ b/src/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.WriteProperties.Decimal.cs @@ -10,6 +10,33 @@ namespace System.Text.Json { public sealed partial class Utf8JsonWriter { + /// + /// Writes the pre-encoded property name and value (as a JSON number) as part of a name/value pair of a JSON object. + /// + /// The JSON encoded property name of the JSON object to be transcoded and written as UTF-8. + /// The value to be written as a JSON number as part of the name/value pair. + /// + /// The property name should already be escaped when the instance of was created. + /// + /// + /// Thrown if this would result in an invalid JSON to be written (while validation is enabled). + /// + /// + /// Writes the using the default (i.e. 'G'). + /// + public void WriteNumber(JsonEncodedText propertyName, decimal value) + => WriteNumberHelper(propertyName.EncodedUtf8Bytes, value); + + private void WriteNumberHelper(ReadOnlySpan utf8PropertyName, decimal value) + { + Debug.Assert(utf8PropertyName.Length <= JsonConstants.MaxTokenSize); + + WriteNumberByOptions(utf8PropertyName, value); + + SetFlagToAddListSeparatorBeforeNextItem(); + _tokenType = JsonTokenType.Number; + } + /// /// Writes the property name and value (as a JSON number) as part of a name/value pair of a JSON object. /// diff --git a/src/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.WriteProperties.Double.cs b/src/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.WriteProperties.Double.cs index c8c67ad3c77e..606c5b1cb6b4 100644 --- a/src/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.WriteProperties.Double.cs +++ b/src/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.WriteProperties.Double.cs @@ -10,6 +10,35 @@ namespace System.Text.Json { public sealed partial class Utf8JsonWriter { + /// + /// Writes the pre-encoded property name and value (as a JSON number) as part of a name/value pair of a JSON object. + /// + /// The JSON encoded property name of the JSON object to be transcoded and written as UTF-8. + /// The value to be written as a JSON number as part of the name/value pair. + /// + /// The property name should already be escaped when the instance of was created. + /// + /// + /// Thrown if this would result in an invalid JSON to be written (while validation is enabled). + /// + /// + /// Writes the using the default (i.e. 'G'). + /// + public void WriteNumber(JsonEncodedText propertyName, double value) + => WriteNumberHelper(propertyName.EncodedUtf8Bytes, value); + + private void WriteNumberHelper(ReadOnlySpan utf8PropertyName, double value) + { + Debug.Assert(utf8PropertyName.Length <= JsonConstants.MaxTokenSize); + + JsonWriterHelper.ValidateDouble(value); + + WriteNumberByOptions(utf8PropertyName, value); + + SetFlagToAddListSeparatorBeforeNextItem(); + _tokenType = JsonTokenType.Number; + } + /// /// Writes the property name and value (as a JSON number) as part of a name/value pair of a JSON object. /// diff --git a/src/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.WriteProperties.Float.cs b/src/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.WriteProperties.Float.cs index 7595cd4d8f82..8483347ba066 100644 --- a/src/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.WriteProperties.Float.cs +++ b/src/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.WriteProperties.Float.cs @@ -10,6 +10,35 @@ namespace System.Text.Json { public sealed partial class Utf8JsonWriter { + /// + /// Writes the pre-encoded property name and value (as a JSON number) as part of a name/value pair of a JSON object. + /// + /// The JSON encoded property name of the JSON object to be transcoded and written as UTF-8. + /// The value to be written as a JSON number as part of the name/value pair. + /// + /// The property name should already be escaped when the instance of was created. + /// + /// + /// Thrown if this would result in an invalid JSON to be written (while validation is enabled). + /// + /// + /// Writes the using the default (i.e. 'G'). + /// + public void WriteNumber(JsonEncodedText propertyName, float value) + => WriteNumberHelper(propertyName.EncodedUtf8Bytes, value); + + private void WriteNumberHelper(ReadOnlySpan utf8PropertyName, float value) + { + Debug.Assert(utf8PropertyName.Length <= JsonConstants.MaxTokenSize); + + JsonWriterHelper.ValidateSingle(value); + + WriteNumberByOptions(utf8PropertyName, value); + + SetFlagToAddListSeparatorBeforeNextItem(); + _tokenType = JsonTokenType.Number; + } + /// /// Writes the property name and value (as a JSON number) as part of a name/value pair of a JSON object. /// diff --git a/src/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.WriteProperties.Guid.cs b/src/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.WriteProperties.Guid.cs index d1e4c6924a9c..c7d2b3474bb6 100644 --- a/src/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.WriteProperties.Guid.cs +++ b/src/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.WriteProperties.Guid.cs @@ -10,6 +10,33 @@ namespace System.Text.Json { public sealed partial class Utf8JsonWriter { + /// + /// Writes the pre-encoded property name and value (as a JSON string) as part of a name/value pair of a JSON object. + /// + /// The JSON encoded property name of the JSON object to be transcoded and written as UTF-8. + /// The value to be written as a JSON string as part of the name/value pair. + /// + /// The property name should already be escaped when the instance of was created. + /// + /// + /// Thrown if this would result in an invalid JSON to be written (while validation is enabled). + /// + /// + /// Writes the using the default (i.e. 'D'), as the form: nnnnnnnn-nnnn-nnnn-nnnn-nnnnnnnnnnnn. + /// + public void WriteString(JsonEncodedText propertyName, Guid value) + => WriteStringHelper(propertyName.EncodedUtf8Bytes, value); + + private void WriteStringHelper(ReadOnlySpan utf8PropertyName, Guid value) + { + Debug.Assert(utf8PropertyName.Length <= JsonConstants.MaxTokenSize); + + WriteStringByOptions(utf8PropertyName, value); + + SetFlagToAddListSeparatorBeforeNextItem(); + _tokenType = JsonTokenType.String; + } + /// /// Writes the property name and value (as a JSON string) as part of a name/value pair of a JSON object. /// diff --git a/src/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.WriteProperties.Helpers.cs b/src/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.WriteProperties.Helpers.cs index 4d6f04df9feb..8786cc903d9a 100644 --- a/src/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.WriteProperties.Helpers.cs +++ b/src/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.WriteProperties.Helpers.cs @@ -25,6 +25,13 @@ private void ValidatePropertyNameAndDepth(ReadOnlySpan utf8PropertyName) ThrowHelper.ThrowInvalidOperationOrArgumentException(utf8PropertyName, _currentDepth); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private void ValidateDepth() + { + if (CurrentDepth >= JsonConstants.MaxWriterDepth) + ThrowHelper.ThrowInvalidOperationException(_currentDepth); + } + [MethodImpl(MethodImplOptions.AggressiveInlining)] private void ValidateWritingProperty() { diff --git a/src/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.WriteProperties.Literal.cs b/src/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.WriteProperties.Literal.cs index f5e2a1469d95..e43dd553d8ad 100644 --- a/src/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.WriteProperties.Literal.cs +++ b/src/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.WriteProperties.Literal.cs @@ -9,6 +9,31 @@ namespace System.Text.Json { public sealed partial class Utf8JsonWriter { + /// + /// Writes the pre-encoded property name and the JSON literal "null" as part of a name/value pair of a JSON object. + /// + /// The JSON encoded property name of the JSON object to be transcoded and written as UTF-8. + /// + /// The property name should already be escaped when the instance of was created. + /// + /// + /// Thrown if this would result in an invalid JSON to be written (while validation is enabled). + /// + public void WriteNull(JsonEncodedText propertyName) + { + WriteLiteralHelper(propertyName.EncodedUtf8Bytes, JsonConstants.NullValue); + _tokenType = JsonTokenType.Null; + } + + private void WriteLiteralHelper(ReadOnlySpan utf8PropertyName, ReadOnlySpan value) + { + Debug.Assert(utf8PropertyName.Length <= JsonConstants.MaxTokenSize); + + WriteLiteralByOptions(utf8PropertyName, value); + + SetFlagToAddListSeparatorBeforeNextItem(); + } + /// /// Writes the property name and the JSON literal "null" as part of a name/value pair of a JSON object. /// @@ -75,6 +100,31 @@ public void WriteNull(ReadOnlySpan utf8PropertyName) _tokenType = JsonTokenType.Null; } + /// + /// Writes the pre-encoded property name and value (as a JSON literal "true" or "false") as part of a name/value pair of a JSON object. + /// + /// The JSON encoded property name of the JSON object to be transcoded and written as UTF-8. + /// The value to be written as a JSON literal "true" or "false" as part of the name/value pair. + /// + /// The property name should already be escaped when the instance of was created. + /// + /// + /// Thrown if this would result in an invalid JSON to be written (while validation is enabled). + /// + public void WriteBoolean(JsonEncodedText propertyName, bool value) + { + if (value) + { + WriteLiteralHelper(propertyName.EncodedUtf8Bytes, JsonConstants.TrueValue); + _tokenType = JsonTokenType.True; + } + else + { + WriteLiteralHelper(propertyName.EncodedUtf8Bytes, JsonConstants.FalseValue); + _tokenType = JsonTokenType.False; + } + } + /// /// Writes the property name and value (as a JSON literal "true" or "false") as part of a name/value pair of a JSON object. /// diff --git a/src/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.WriteProperties.SignedNumber.cs b/src/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.WriteProperties.SignedNumber.cs index 8ab324320f8d..2fc232b05159 100644 --- a/src/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.WriteProperties.SignedNumber.cs +++ b/src/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.WriteProperties.SignedNumber.cs @@ -10,6 +10,33 @@ namespace System.Text.Json { public sealed partial class Utf8JsonWriter { + /// + /// Writes the pre-encoded property name and value (as a JSON number) as part of a name/value pair of a JSON object. + /// + /// The JSON encoded property name of the JSON object to be transcoded and written as UTF-8. + /// The value to be written as a JSON number as part of the name/value pair. + /// + /// The property name should already be escaped when the instance of was created. + /// + /// + /// Thrown if this would result in an invalid JSON to be written (while validation is enabled). + /// + /// + /// Writes the using the default (i.e. 'G'), for example: 32767. + /// + public void WriteNumber(JsonEncodedText propertyName, long value) + => WriteNumberHelper(propertyName.EncodedUtf8Bytes, value); + + private void WriteNumberHelper(ReadOnlySpan utf8PropertyName, long value) + { + Debug.Assert(utf8PropertyName.Length <= JsonConstants.MaxTokenSize); + + WriteNumberByOptions(utf8PropertyName, value); + + SetFlagToAddListSeparatorBeforeNextItem(); + _tokenType = JsonTokenType.Number; + } + /// /// Writes the property name and value (as a JSON number) as part of a name/value pair of a JSON object. /// @@ -84,6 +111,23 @@ public void WriteNumber(ReadOnlySpan utf8PropertyName, long value) _tokenType = JsonTokenType.Number; } + /// + /// Writes the pre-encoded property name and value (as a JSON number) as part of a name/value pair of a JSON object. + /// + /// The JSON encoded property name of the JSON object to be transcoded and written as UTF-8. + /// The value to be written as a JSON number as part of the name/value pair. + /// + /// The property name should already be escaped when the instance of was created. + /// + /// + /// Thrown if this would result in an invalid JSON to be written (while validation is enabled). + /// + /// + /// Writes the using the default (i.e. 'G'), for example: 32767. + /// + public void WriteNumber(JsonEncodedText propertyName, int value) + => WriteNumber(propertyName, (long)value); + /// /// Writes the property name and value (as a JSON number) as part of a name/value pair of a JSON object. /// diff --git a/src/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.WriteProperties.String.cs b/src/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.WriteProperties.String.cs index 10367794e8be..ee953851fd21 100644 --- a/src/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.WriteProperties.String.cs +++ b/src/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.WriteProperties.String.cs @@ -4,13 +4,52 @@ using System.Buffers; using System.Diagnostics; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; namespace System.Text.Json { public sealed partial class Utf8JsonWriter { + /// + /// Writes the pre-encoded property name and pre-encoded value (as a JSON string) as part of a name/value pair of a JSON object. + /// + /// The JSON encoded property name of the JSON object to be transcoded and written as UTF-8. + /// The JSON encoded value to be written as a UTF-8 transcoded JSON string as part of the name/value pair. + /// + /// The property name and value should already be escaped when the instance of was created. + /// + /// + /// Thrown if this would result in an invalid JSON to be written (while validation is enabled). + /// + public void WriteString(JsonEncodedText propertyName, JsonEncodedText value) + => WriteStringHelper(propertyName.EncodedUtf8Bytes, value.EncodedUtf8Bytes); + + private void WriteStringHelper(ReadOnlySpan utf8PropertyName, ReadOnlySpan utf8Value) + { + Debug.Assert(utf8PropertyName.Length <= JsonConstants.MaxTokenSize && utf8Value.Length <= JsonConstants.MaxTokenSize); + + WriteStringByOptions(utf8PropertyName, utf8Value); + + SetFlagToAddListSeparatorBeforeNextItem(); + _tokenType = JsonTokenType.String; + } + + /// + /// Writes the property name and pre-encoded value (as a JSON string) as part of a name/value pair of a JSON object. + /// + /// The UTF-16 encoded property name of the JSON object to be transcoded and written as UTF-8. + /// The JSON encoded value to be written as a UTF-8 transcoded JSON string as part of the name/value pair. + /// + /// The value should already be escaped when the instance of was created. The property name is escaped before writing. + /// + /// + /// Thrown when the specified property name is too large. + /// + /// + /// Thrown if this would result in an invalid JSON to be written (while validation is enabled). + /// + public void WriteString(string propertyName, JsonEncodedText value) + => WriteString(propertyName.AsSpan(), value); + /// /// Writes the property name and string text value (as a JSON string) as part of a name/value pair of a JSON object. /// @@ -76,6 +115,63 @@ public void WriteString(ReadOnlySpan utf8PropertyName, ReadOnlySpan _tokenType = JsonTokenType.String; } + /// + /// Writes the pre-encoded property name and string text value (as a JSON string) as part of a name/value pair of a JSON object. + /// + /// The JSON encoded property name of the JSON object to be transcoded and written as UTF-8. + /// The UTF-16 encoded value to be written as a UTF-8 transcoded JSON string as part of the name/value pair. + /// + /// The property name should already be escaped when the instance of was created. The value is escaped before writing. + /// + /// + /// Thrown when the specified value is too large. + /// + /// + /// Thrown if this would result in an invalid JSON to be written (while validation is enabled). + /// + public void WriteString(JsonEncodedText propertyName, string value) + => WriteString(propertyName, value.AsSpan()); + + /// + /// Writes the pre-encoded property name and UTF-16 text value (as a JSON string) as part of a name/value pair of a JSON object. + /// + /// The JSON encoded property name of the JSON object to be transcoded and written as UTF-8. + /// The UTF-16 encoded value to be written as a UTF-8 transcoded JSON string as part of the name/value pair. + /// + /// The property name should already be escaped when the instance of was created. The value is escaped before writing. + /// + /// + /// Thrown when the specified value is too large. + /// + /// + /// Thrown if this would result in an invalid JSON to be written (while validation is enabled). + /// + public void WriteString(JsonEncodedText propertyName, ReadOnlySpan value) + => WriteStringHelperEscapeValue(propertyName.EncodedUtf8Bytes, value); + + private void WriteStringHelperEscapeValue(ReadOnlySpan utf8PropertyName, ReadOnlySpan value) + { + Debug.Assert(utf8PropertyName.Length <= JsonConstants.MaxTokenSize); + + JsonWriterHelper.ValidateValue(value); + + int valueIdx = JsonWriterHelper.NeedsEscaping(value); + + Debug.Assert(valueIdx >= -1 && valueIdx < value.Length && valueIdx < int.MaxValue / 2); + + if (valueIdx != -1) + { + WriteStringEscapeValueOnly(utf8PropertyName, value, valueIdx); + } + else + { + WriteStringByOptions(utf8PropertyName, value); + } + + SetFlagToAddListSeparatorBeforeNextItem(); + _tokenType = JsonTokenType.String; + } + /// /// Writes the property name and UTF-16 text value (as a JSON string) as part of a name/value pair of a JSON object. /// @@ -117,6 +213,46 @@ public void WriteString(ReadOnlySpan utf8PropertyName, ReadOnlySpan _tokenType = JsonTokenType.String; } + /// + /// Writes the pre-encoded property name and UTF-8 text value (as a JSON string) as part of a name/value pair of a JSON object. + /// + /// The JSON encoded property name of the JSON object to be transcoded and written as UTF-8. + /// The UTF-8 encoded value to be written as a JSON string as part of the name/value pair. + /// + /// The property name should already be escaped when the instance of was created. The value is escaped before writing. + /// + /// + /// Thrown when the specified value is too large. + /// + /// + /// Thrown if this would result in an invalid JSON to be written (while validation is enabled). + /// + public void WriteString(JsonEncodedText propertyName, ReadOnlySpan utf8Value) + => WriteStringHelperEscapeValue(propertyName.EncodedUtf8Bytes, utf8Value); + + private void WriteStringHelperEscapeValue(ReadOnlySpan utf8PropertyName, ReadOnlySpan utf8Value) + { + Debug.Assert(utf8PropertyName.Length <= JsonConstants.MaxTokenSize); + + JsonWriterHelper.ValidateValue(utf8Value); + + int valueIdx = JsonWriterHelper.NeedsEscaping(utf8Value); + + Debug.Assert(valueIdx >= -1 && valueIdx < utf8Value.Length && valueIdx < int.MaxValue / 2); + + if (valueIdx != -1) + { + WriteStringEscapeValueOnly(utf8PropertyName, utf8Value, valueIdx); + } + else + { + WriteStringByOptions(utf8PropertyName, utf8Value); + } + + SetFlagToAddListSeparatorBeforeNextItem(); + _tokenType = JsonTokenType.String; + } + /// /// Writes the property name and UTF-8 text value (as a JSON string) as part of a name/value pair of a JSON object. /// @@ -158,6 +294,46 @@ public void WriteString(ReadOnlySpan propertyName, ReadOnlySpan utf8 _tokenType = JsonTokenType.String; } + /// + /// Writes the UTF-16 property name and pre-encoded value (as a JSON string) as part of a name/value pair of a JSON object. + /// + /// The UTF-16 encoded property name of the JSON object to be transcoded and written as UTF-8. + /// The JSON encoded value to be written as a UTF-8 transcoded JSON string as part of the name/value pair. + /// + /// The value should already be escaped when the instance of was created. The property name is escaped before writing. + /// + /// + /// Thrown when the specified property name is too large. + /// + /// + /// Thrown if this would result in an invalid JSON to be written (while validation is enabled). + /// + public void WriteString(ReadOnlySpan propertyName, JsonEncodedText value) + => WriteStringHelperEscapeProperty(propertyName, value.EncodedUtf8Bytes); + + private void WriteStringHelperEscapeProperty(ReadOnlySpan propertyName, ReadOnlySpan utf8Value) + { + Debug.Assert(utf8Value.Length <= JsonConstants.MaxTokenSize); + + JsonWriterHelper.ValidateProperty(propertyName); + + int propertyIdx = JsonWriterHelper.NeedsEscaping(propertyName); + + Debug.Assert(propertyIdx >= -1 && propertyIdx < propertyName.Length && propertyIdx < int.MaxValue / 2); + + if (propertyIdx != -1) + { + WriteStringEscapePropertyOnly(propertyName, utf8Value, propertyIdx); + } + else + { + WriteStringByOptions(propertyName, utf8Value); + } + + SetFlagToAddListSeparatorBeforeNextItem(); + _tokenType = JsonTokenType.String; + } + /// /// Writes the UTF-16 property name and string text value (as a JSON string) as part of a name/value pair of a JSON object. /// @@ -175,6 +351,46 @@ public void WriteString(ReadOnlySpan propertyName, ReadOnlySpan utf8 public void WriteString(ReadOnlySpan propertyName, string value) => WriteString(propertyName, value.AsSpan()); + /// + /// Writes the UTF-8 property name and pre-encoded value (as a JSON string) as part of a name/value pair of a JSON object. + /// + /// The UTF-8 encoded property name of the JSON object to be written. + /// The JSON encoded value to be written as a UTF-8 transcoded JSON string as part of the name/value pair. + /// + /// The value should already be escaped when the instance of was created. The property name is escaped before writing. + /// + /// + /// Thrown when the specified property name is too large. + /// + /// + /// Thrown if this would result in an invalid JSON to be written (while validation is enabled). + /// + public void WriteString(ReadOnlySpan utf8PropertyName, JsonEncodedText value) + => WriteStringHelperEscapeProperty(utf8PropertyName, value.EncodedUtf8Bytes); + + private void WriteStringHelperEscapeProperty(ReadOnlySpan utf8PropertyName, ReadOnlySpan utf8Value) + { + Debug.Assert(utf8Value.Length <= JsonConstants.MaxTokenSize); + + JsonWriterHelper.ValidateProperty(utf8PropertyName); + + int propertyIdx = JsonWriterHelper.NeedsEscaping(utf8PropertyName); + + Debug.Assert(propertyIdx >= -1 && propertyIdx < utf8PropertyName.Length && propertyIdx < int.MaxValue / 2); + + if (propertyIdx != -1) + { + WriteStringEscapePropertyOnly(utf8PropertyName, utf8Value, propertyIdx); + } + else + { + WriteStringByOptions(utf8PropertyName, utf8Value); + } + + SetFlagToAddListSeparatorBeforeNextItem(); + _tokenType = JsonTokenType.String; + } + /// /// Writes the UTF-8 property name and string text value (as a JSON string) as part of a name/value pair of a JSON object. /// @@ -192,60 +408,96 @@ public void WriteString(ReadOnlySpan propertyName, string value) public void WriteString(ReadOnlySpan utf8PropertyName, string value) => WriteString(utf8PropertyName, value.AsSpan()); - private void WriteStringEscapeValueOnly(ReadOnlySpan escapedPropertyName, ReadOnlySpan value, int firstEscapeIndex) + private void WriteStringEscapeValueOnly(ReadOnlySpan escapedPropertyName, ReadOnlySpan utf8Value, int firstEscapeIndex) { - Debug.Assert(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= value.Length); - Debug.Assert(firstEscapeIndex >= 0 && firstEscapeIndex < value.Length); + Debug.Assert(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= utf8Value.Length); + Debug.Assert(firstEscapeIndex >= 0 && firstEscapeIndex < utf8Value.Length); - char[] valueArray = ArrayPool.Shared.Rent(JsonWriterHelper.GetMaxEscapedLength(value.Length, firstEscapeIndex)); - Span escapedValue = valueArray; - JsonWriterHelper.EscapeString(value, escapedValue, firstEscapeIndex, out int written); + byte[] valueArray = null; + + int length = JsonWriterHelper.GetMaxEscapedLength(utf8Value.Length, firstEscapeIndex); + + Span escapedValue = length <= JsonConstants.StackallocThreshold ? + stackalloc byte[length] : + (valueArray = ArrayPool.Shared.Rent(length)); + + JsonWriterHelper.EscapeString(utf8Value, escapedValue, firstEscapeIndex, out int written); WriteStringByOptions(escapedPropertyName, escapedValue.Slice(0, written)); - ArrayPool.Shared.Return(valueArray); + if (valueArray != null) + { + ArrayPool.Shared.Return(valueArray); + } } - private void WriteStringEscapeValueOnly(ReadOnlySpan escapedPropertyName, ReadOnlySpan utf8Value, int firstEscapeIndex) + private void WriteStringEscapeValueOnly(ReadOnlySpan escapedPropertyName, ReadOnlySpan value, int firstEscapeIndex) { - Debug.Assert(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= utf8Value.Length); - Debug.Assert(firstEscapeIndex >= 0 && firstEscapeIndex < utf8Value.Length); + Debug.Assert(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= value.Length); + Debug.Assert(firstEscapeIndex >= 0 && firstEscapeIndex < value.Length); - byte[] valueArray = ArrayPool.Shared.Rent(JsonWriterHelper.GetMaxEscapedLength(utf8Value.Length, firstEscapeIndex)); - Span escapedValue = valueArray; - JsonWriterHelper.EscapeString(utf8Value, escapedValue, firstEscapeIndex, out int written); + char[] valueArray = null; + + int length = JsonWriterHelper.GetMaxEscapedLength(value.Length, firstEscapeIndex); + + Span escapedValue = length <= JsonConstants.StackallocThreshold ? + stackalloc char[length] : + (valueArray = ArrayPool.Shared.Rent(length)); + + JsonWriterHelper.EscapeString(value, escapedValue, firstEscapeIndex, out int written); WriteStringByOptions(escapedPropertyName, escapedValue.Slice(0, written)); - ArrayPool.Shared.Return(valueArray); + if (valueArray != null) + { + ArrayPool.Shared.Return(valueArray); + } } - private void WriteStringEscapeValueOnly(ReadOnlySpan escapedPropertyName, ReadOnlySpan utf8Value, int firstEscapeIndex) + private void WriteStringEscapePropertyOnly(ReadOnlySpan propertyName, ReadOnlySpan escapedValue, int firstEscapeIndex) { - Debug.Assert(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= utf8Value.Length); - Debug.Assert(firstEscapeIndex >= 0 && firstEscapeIndex < utf8Value.Length); + Debug.Assert(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= propertyName.Length); + Debug.Assert(firstEscapeIndex >= 0 && firstEscapeIndex < propertyName.Length); - byte[] valueArray = ArrayPool.Shared.Rent(JsonWriterHelper.GetMaxEscapedLength(utf8Value.Length, firstEscapeIndex)); - Span escapedValue = valueArray; - JsonWriterHelper.EscapeString(utf8Value, escapedValue, firstEscapeIndex, out int written); + char[] propertyArray = null; - WriteStringByOptions(escapedPropertyName, escapedValue.Slice(0, written)); + int length = JsonWriterHelper.GetMaxEscapedLength(propertyName.Length, firstEscapeIndex); + + Span escapedPropertyName = length <= JsonConstants.StackallocThreshold ? + stackalloc char[length] : + (propertyArray = ArrayPool.Shared.Rent(length)); + + JsonWriterHelper.EscapeString(propertyName, escapedPropertyName, firstEscapeIndex, out int written); - ArrayPool.Shared.Return(valueArray); + WriteStringByOptions(escapedPropertyName.Slice(0, written), escapedValue); + + if (propertyArray != null) + { + ArrayPool.Shared.Return(propertyArray); + } } - private void WriteStringEscapeValueOnly(ReadOnlySpan escapedPropertyName, ReadOnlySpan value, int firstEscapeIndex) + private void WriteStringEscapePropertyOnly(ReadOnlySpan utf8PropertyName, ReadOnlySpan escapedValue, int firstEscapeIndex) { - Debug.Assert(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= value.Length); - Debug.Assert(firstEscapeIndex >= 0 && firstEscapeIndex < value.Length); + Debug.Assert(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= utf8PropertyName.Length); + Debug.Assert(firstEscapeIndex >= 0 && firstEscapeIndex < utf8PropertyName.Length); - char[] valueArray = ArrayPool.Shared.Rent(JsonWriterHelper.GetMaxEscapedLength(value.Length, firstEscapeIndex)); - Span escapedValue = valueArray; - JsonWriterHelper.EscapeString(value, escapedValue, firstEscapeIndex, out int written); + byte[] propertyArray = null; - WriteStringByOptions(escapedPropertyName, escapedValue.Slice(0, written)); + int length = JsonWriterHelper.GetMaxEscapedLength(utf8PropertyName.Length, firstEscapeIndex); + + Span escapedPropertyName = length <= JsonConstants.StackallocThreshold ? + stackalloc byte[length] : + (propertyArray = ArrayPool.Shared.Rent(length)); - ArrayPool.Shared.Return(valueArray); + JsonWriterHelper.EscapeString(utf8PropertyName, escapedPropertyName, firstEscapeIndex, out int written); + + WriteStringByOptions(escapedPropertyName.Slice(0, written), escapedValue); + + if (propertyArray != null) + { + ArrayPool.Shared.Return(propertyArray); + } } private void WriteStringEscape(ReadOnlySpan propertyName, ReadOnlySpan value) diff --git a/src/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.WriteProperties.UnsignedNumber.cs b/src/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.WriteProperties.UnsignedNumber.cs index 8ba0f3cf5a05..7576cfafb072 100644 --- a/src/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.WriteProperties.UnsignedNumber.cs +++ b/src/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.WriteProperties.UnsignedNumber.cs @@ -10,6 +10,34 @@ namespace System.Text.Json { public sealed partial class Utf8JsonWriter { + /// + /// Writes the pre-encoded property name and value (as a JSON number) as part of a name/value pair of a JSON object. + /// + /// The JSON encoded property name of the JSON object to be transcoded and written as UTF-8. + /// The value to be written as a JSON number as part of the name/value pair. + /// + /// The property name should already be escaped when the instance of was created. + /// + /// + /// Thrown if this would result in an invalid JSON to be written (while validation is enabled). + /// + /// + /// Writes the using the default (i.e. 'G'), for example: 32767. + /// + [CLSCompliant(false)] + public void WriteNumber(JsonEncodedText propertyName, ulong value) + => WriteNumberHelper(propertyName.EncodedUtf8Bytes, value); + + private void WriteNumberHelper(ReadOnlySpan utf8PropertyName, ulong value) + { + Debug.Assert(utf8PropertyName.Length <= JsonConstants.MaxTokenSize); + + WriteNumberByOptions(utf8PropertyName, value); + + SetFlagToAddListSeparatorBeforeNextItem(); + _tokenType = JsonTokenType.Number; + } + /// /// Writes the property name and value (as a JSON number) as part of a name/value pair of a JSON object. /// @@ -87,6 +115,24 @@ public void WriteNumber(ReadOnlySpan utf8PropertyName, ulong value) _tokenType = JsonTokenType.Number; } + /// + /// Writes the pre-encoded property name and value (as a JSON number) as part of a name/value pair of a JSON object. + /// + /// The JSON encoded property name of the JSON object to be transcoded and written as UTF-8. + /// The value to be written as a JSON number as part of the name/value pair. + /// + /// The property name should already be escaped when the instance of was created. + /// + /// + /// Thrown if this would result in an invalid JSON to be written (while validation is enabled). + /// + /// + /// Writes the using the default (i.e. 'G'), for example: 32767. + /// + [CLSCompliant(false)] + public void WriteNumber(JsonEncodedText propertyName, uint value) + => WriteNumber(propertyName, (ulong)value); + /// /// Writes the property name and value (as a JSON number) as part of a name/value pair of a JSON object. /// diff --git a/src/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.WriteValues.String.cs b/src/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.WriteValues.String.cs index c3422b19105c..e89bdc2413f4 100644 --- a/src/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.WriteValues.String.cs +++ b/src/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.WriteValues.String.cs @@ -9,6 +9,29 @@ namespace System.Text.Json { public sealed partial class Utf8JsonWriter { + /// + /// Writes the pre-encoded text value (as a JSON string) as an element of a JSON array. + /// + /// The JSON encoded value to be written as a UTF-8 transcoded JSON string element of a JSON array. + /// + /// The value should already be escaped when the instance of was created. + /// + /// + /// Thrown if this would result in an invalid JSON to be written (while validation is enabled). + /// + public void WriteStringValue(JsonEncodedText value) + => WriteStringValueHelper(value.EncodedUtf8Bytes); + + private void WriteStringValueHelper(ReadOnlySpan utf8Value) + { + Debug.Assert(utf8Value.Length <= JsonConstants.MaxTokenSize); + + WriteStringByOptions(utf8Value); + + SetFlagToAddListSeparatorBeforeNextItem(); + _tokenType = JsonTokenType.String; + } + /// /// Writes the string text value (as a JSON string) as an element of a JSON array. /// diff --git a/src/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.cs b/src/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.cs index 0039bb895e1d..d7396de01499 100644 --- a/src/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.cs +++ b/src/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.cs @@ -548,6 +548,53 @@ private void WriteStartIndented(byte token) output[BytesPending++] = token; } + /// + /// Writes the beginning of a JSON array with a pre-encoded property name as the key. + /// + /// The JSON encoded property name of the JSON array to be transcoded and written as UTF-8. + /// + /// The property name should already be escaped when the instance of was created. + /// + /// + /// Thrown when the depth of the JSON has exceeded the maximum depth of 1000 + /// OR if this would result in an invalid JSON to be written (while validation is enabled). + /// + public void WriteStartArray(JsonEncodedText propertyName) + { + WriteStartHelper(propertyName.EncodedUtf8Bytes, JsonConstants.OpenBracket); + _tokenType = JsonTokenType.StartArray; + } + + /// + /// Writes the beginning of a JSON object with a pre-encoded property name as the key. + /// + /// The JSON encoded property name of the JSON object to be transcoded and written as UTF-8. + /// + /// The property name should already be escaped when the instance of was created. + /// + /// + /// Thrown when the depth of the JSON has exceeded the maximum depth of 1000 + /// OR if this would result in an invalid JSON to be written (while validation is enabled). + /// + public void WriteStartObject(JsonEncodedText propertyName) + { + WriteStartHelper(propertyName.EncodedUtf8Bytes, JsonConstants.OpenBrace); + _tokenType = JsonTokenType.StartObject; + } + + private void WriteStartHelper(ReadOnlySpan utf8PropertyName, byte token) + { + Debug.Assert(utf8PropertyName.Length <= JsonConstants.MaxTokenSize); + + ValidateDepth(); + + WriteStartByOptions(utf8PropertyName, token); + + _currentDepth &= JsonConstants.RemoveFlagsBitMask; + _currentDepth++; + _isNotPrimitive = true; + } + /// /// Writes the beginning of a JSON array with a property name as the key. /// diff --git a/src/System.Text.Json/tests/JsonDocumentTests.cs b/src/System.Text.Json/tests/JsonDocumentTests.cs index 407f5ef26794..469090efab85 100644 --- a/src/System.Text.Json/tests/JsonDocumentTests.cs +++ b/src/System.Text.Json/tests/JsonDocumentTests.cs @@ -1437,7 +1437,7 @@ public static void CheckUseDefault() [Fact] public static void CheckInvalidString() { - Assert.Throws(() => JsonDocument.Parse("{ \"unpaired\uDFFE\": true }")); + Assert.Throws(() => JsonDocument.Parse("{ \"unpaired\uDFFE\": true }")); } [Theory] @@ -1753,6 +1753,17 @@ public static void GetPropertyByNullName() } } + [Fact] + public static void GetPropertyInvalidUtf16() + { + using (JsonDocument doc = JsonDocument.Parse("{\"name\":\"value\"}")) + { + Assert.Throws(() => doc.RootElement.GetProperty("unpaired\uDFFE")); + + Assert.Throws(() => doc.RootElement.TryGetProperty("unpaired\uDFFE", out _)); + } + } + [Theory] [InlineData("short")] [InlineData("thisValueIsLongerThan86CharsSoWeDeferTheTranscodingUntilWeFindAViableCandidateAsAPropertyMatch")] diff --git a/src/System.Text.Json/tests/JsonEncodedTextTests.cs b/src/System.Text.Json/tests/JsonEncodedTextTests.cs new file mode 100644 index 000000000000..a23bc0668784 --- /dev/null +++ b/src/System.Text.Json/tests/JsonEncodedTextTests.cs @@ -0,0 +1,329 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Collections.Generic; +using Xunit; + +namespace System.Text.Json.Tests +{ + public static partial class JsonEncodedTextTests + { + [Fact] + public static void Default() + { + JsonEncodedText text = default; + Assert.True(text.EncodedUtf8Bytes.IsEmpty); + + Assert.Equal(0, text.GetHashCode()); + Assert.Equal("", text.ToString()); + Assert.True(text.Equals(default)); + Assert.True(text.Equals(text)); + Assert.False(text.Equals(null)); + + JsonEncodedText defaultText = default; + object obj = defaultText; + Assert.True(text.Equals(obj)); + Assert.True(text.Equals(defaultText)); + Assert.True(defaultText.Equals(text)); + + JsonEncodedText textByteEmpty = JsonEncodedText.Encode(Array.Empty()); + Assert.True(textByteEmpty.EncodedUtf8Bytes.IsEmpty); + Assert.Equal("", textByteEmpty.ToString()); + + JsonEncodedText textCharEmpty = JsonEncodedText.Encode(Array.Empty()); + Assert.True(textCharEmpty.EncodedUtf8Bytes.IsEmpty); + Assert.Equal("", textCharEmpty.ToString()); + + Assert.True(textCharEmpty.Equals(textByteEmpty)); + Assert.Equal(textByteEmpty.GetHashCode(), textCharEmpty.GetHashCode()); + } + + [Fact] + public static void Equals() + { + string message = "message"; + + JsonEncodedText text = JsonEncodedText.Encode(message); + JsonEncodedText textCopy = text; + JsonEncodedText textDuplicate = JsonEncodedText.Encode(message); + JsonEncodedText textDuplicateDiffStringRef = JsonEncodedText.Encode(string.Concat("mess", "age")); + JsonEncodedText differentText = JsonEncodedText.Encode("message1"); + + Assert.True(text.Equals(text)); + + Assert.True(text.Equals(textCopy)); + Assert.True(textCopy.Equals(text)); + + Assert.True(text.Equals(textDuplicate)); + Assert.True(textDuplicate.Equals(text)); + + Assert.True(text.Equals(textDuplicateDiffStringRef)); + Assert.True(textDuplicateDiffStringRef.Equals(text)); + + Assert.False(text.Equals(differentText)); + Assert.False(differentText.Equals(text)); + } + + [Fact] + public static void EqualsObject() + { + string message = "message"; + + JsonEncodedText text = JsonEncodedText.Encode(message); + object textCopy = text; + object textDuplicate = JsonEncodedText.Encode(message); + object textDuplicateDiffStringRef = JsonEncodedText.Encode(string.Concat("mess", "age")); + object differentText = JsonEncodedText.Encode("message1"); + + Assert.True(text.Equals(text)); + + Assert.True(text.Equals(textCopy)); + Assert.True(textCopy.Equals(text)); + + Assert.True(text.Equals(textDuplicate)); + Assert.True(textDuplicate.Equals(text)); + + Assert.True(text.Equals(textDuplicateDiffStringRef)); + Assert.True(textDuplicateDiffStringRef.Equals(text)); + + Assert.False(text.Equals(differentText)); + Assert.False(differentText.Equals(text)); + + Assert.False(text.Equals(null)); + } + + [Fact] + public static void GetHashCodeTest() + { + string message = "message"; + + JsonEncodedText text = JsonEncodedText.Encode(message); + JsonEncodedText textCopy = text; + JsonEncodedText textDuplicate = JsonEncodedText.Encode(message); + JsonEncodedText textDuplicateDiffStringRef = JsonEncodedText.Encode(string.Concat("mess", "age")); + JsonEncodedText differentText = JsonEncodedText.Encode("message1"); + + int expectedHashCode = text.GetHashCode(); + + Assert.NotEqual(0, expectedHashCode); + Assert.Equal(expectedHashCode, textCopy.GetHashCode()); + Assert.Equal(expectedHashCode, textDuplicate.GetHashCode()); + Assert.Equal(expectedHashCode, textDuplicateDiffStringRef.GetHashCode()); + Assert.NotEqual(expectedHashCode, differentText.GetHashCode()); + } + + [Theory] + [MemberData(nameof(JsonEncodedTextStrings))] + public static void ToStringTest(string message, string expectedMessage) + { + JsonEncodedText text = JsonEncodedText.Encode(message); + JsonEncodedText textSpan = JsonEncodedText.Encode(message.AsSpan()); + JsonEncodedText textUtf8Span = JsonEncodedText.Encode(Encoding.UTF8.GetBytes(message)); + + Assert.Equal(expectedMessage, text.ToString()); + Assert.Equal(expectedMessage, textSpan.ToString()); + Assert.Equal(expectedMessage, textUtf8Span.ToString()); + + Assert.True(text.Equals(textSpan)); + Assert.True(text.Equals(textUtf8Span)); + Assert.Equal(text.GetHashCode(), textSpan.GetHashCode()); + Assert.Equal(text.GetHashCode(), textUtf8Span.GetHashCode()); + } + + [Theory] + [InlineData(100)] + [InlineData(1_000)] + [InlineData(10_000)] + public static void ToStringLargeTest(int stringLength) + { + { + var message = new string('a', stringLength); + var expectedMessage = new string('a', stringLength); + + JsonEncodedText text = JsonEncodedText.Encode(message); + JsonEncodedText textSpan = JsonEncodedText.Encode(message.AsSpan()); + JsonEncodedText textUtf8Span = JsonEncodedText.Encode(Encoding.UTF8.GetBytes(message)); + + Assert.Equal(expectedMessage, text.ToString()); + Assert.Equal(expectedMessage, textSpan.ToString()); + Assert.Equal(expectedMessage, textUtf8Span.ToString()); + + Assert.True(text.Equals(textSpan)); + Assert.True(text.Equals(textUtf8Span)); + Assert.Equal(text.GetHashCode(), textSpan.GetHashCode()); + Assert.Equal(text.GetHashCode(), textUtf8Span.GetHashCode()); + } + { + var message = new string('>', stringLength); + var builder = new StringBuilder(); + for (int i = 0; i < stringLength; i++) + { + builder.Append("\\u003e"); + } + string expectedMessage = builder.ToString(); + + JsonEncodedText text = JsonEncodedText.Encode(message); + JsonEncodedText textSpan = JsonEncodedText.Encode(message.AsSpan()); + JsonEncodedText textUtf8Span = JsonEncodedText.Encode(Encoding.UTF8.GetBytes(message)); + + Assert.Equal(expectedMessage, text.ToString()); + Assert.Equal(expectedMessage, textSpan.ToString()); + Assert.Equal(expectedMessage, textUtf8Span.ToString()); + + Assert.True(text.Equals(textSpan)); + Assert.True(text.Equals(textUtf8Span)); + Assert.Equal(text.GetHashCode(), textSpan.GetHashCode()); + Assert.Equal(text.GetHashCode(), textUtf8Span.GetHashCode()); + } + } + + [Theory] + [MemberData(nameof(JsonEncodedTextStrings))] + public static void GetUtf8BytesTest(string message, string expectedMessage) + { + byte[] expectedBytes = Encoding.UTF8.GetBytes(expectedMessage); + + JsonEncodedText text = JsonEncodedText.Encode(message); + JsonEncodedText textSpan = JsonEncodedText.Encode(message.AsSpan()); + JsonEncodedText textUtf8Span = JsonEncodedText.Encode(Encoding.UTF8.GetBytes(message)); + + Assert.True(text.EncodedUtf8Bytes.SequenceEqual(expectedBytes)); + Assert.True(textSpan.EncodedUtf8Bytes.SequenceEqual(expectedBytes)); + Assert.True(textUtf8Span.EncodedUtf8Bytes.SequenceEqual(expectedBytes)); + + Assert.True(text.Equals(textSpan)); + Assert.True(text.Equals(textUtf8Span)); + Assert.Equal(text.GetHashCode(), textSpan.GetHashCode()); + Assert.Equal(text.GetHashCode(), textUtf8Span.GetHashCode()); + } + + [Theory] + [InlineData(100)] + [InlineData(1_000)] + [InlineData(10_000)] + public static void GetUtf8BytesLargeTest(int stringLength) + { + { + var message = new string('a', stringLength); + byte[] expectedBytes = Encoding.UTF8.GetBytes(message); + + JsonEncodedText text = JsonEncodedText.Encode(message); + JsonEncodedText textSpan = JsonEncodedText.Encode(message.AsSpan()); + JsonEncodedText textUtf8Span = JsonEncodedText.Encode(Encoding.UTF8.GetBytes(message)); + + Assert.True(text.EncodedUtf8Bytes.SequenceEqual(expectedBytes)); + Assert.True(textSpan.EncodedUtf8Bytes.SequenceEqual(expectedBytes)); + Assert.True(textUtf8Span.EncodedUtf8Bytes.SequenceEqual(expectedBytes)); + + Assert.True(text.Equals(textSpan)); + Assert.True(text.Equals(textUtf8Span)); + Assert.Equal(text.GetHashCode(), textSpan.GetHashCode()); + Assert.Equal(text.GetHashCode(), textUtf8Span.GetHashCode()); + } + { + var message = new string('>', stringLength); + var builder = new StringBuilder(); + for (int i = 0; i < stringLength; i++) + { + builder.Append("\\u003e"); + } + byte[] expectedBytes = Encoding.UTF8.GetBytes(builder.ToString()); + + JsonEncodedText text = JsonEncodedText.Encode(message); + JsonEncodedText textSpan = JsonEncodedText.Encode(message.AsSpan()); + JsonEncodedText textUtf8Span = JsonEncodedText.Encode(Encoding.UTF8.GetBytes(message)); + + Assert.True(text.EncodedUtf8Bytes.SequenceEqual(expectedBytes)); + Assert.True(textSpan.EncodedUtf8Bytes.SequenceEqual(expectedBytes)); + Assert.True(textUtf8Span.EncodedUtf8Bytes.SequenceEqual(expectedBytes)); + + Assert.True(text.Equals(textSpan)); + Assert.True(text.Equals(textUtf8Span)); + Assert.Equal(text.GetHashCode(), textSpan.GetHashCode()); + Assert.Equal(text.GetHashCode(), textUtf8Span.GetHashCode()); + } + } + + [Fact] + public static void InvalidUTF16() + { + var invalid = new char[5] { 'a', 'b', 'c', (char)0xDC00, 'a' }; + Assert.Throws(() => JsonEncodedText.Encode(invalid)); + + invalid = new char[5] { 'a', 'b', 'c', (char)0xD800, 'a' }; + Assert.Throws(() => JsonEncodedText.Encode(invalid)); + + invalid = new char[5] { 'a', 'b', 'c', (char)0xDC00, (char)0xD800 }; + Assert.Throws(() => JsonEncodedText.Encode(invalid)); + + var valid = new char[5] { 'a', 'b', 'c', (char)0xD800, (char)0xDC00 }; + JsonEncodedText _ = JsonEncodedText.Encode(valid); + + Assert.Throws(() => JsonEncodedText.Encode(new string(valid).Substring(0, 4))); + } + + [Theory] + [MemberData(nameof(InvalidUTF8Strings))] + public static void InvalidUTF8(byte[] dataUtf8) + { + Assert.Throws(() => JsonEncodedText.Encode(dataUtf8)); + } + + [Fact] + public static void InvalidEncode() + { + Assert.Throws(() => JsonEncodedText.Encode((string)null)); + } + + [Fact] + [OuterLoop] + public static void InvalidLargeEncode() + { + char[] largeValue = new char[400_000_000]; + + Span largeValueSpan = largeValue.AsSpan(); + largeValueSpan.Fill('a'); + + var largeValueString = new string(largeValue); + byte[] utf8Value = Encoding.UTF8.GetBytes(largeValue); + + Assert.Throws(() => JsonEncodedText.Encode(largeValueString)); + Assert.Throws(() => JsonEncodedText.Encode(largeValue)); + Assert.Throws(() => JsonEncodedText.Encode(utf8Value)); + } + + public static IEnumerable InvalidUTF8Strings + { + get + { + return new List + { + new object[] { new byte[] { 34, 97, 0xc3, 0x28, 98, 34 } }, + new object[] { new byte[] { 34, 97, 0xa0, 0xa1, 98, 34 } }, + new object[] { new byte[] { 34, 97, 0xe2, 0x28, 0xa1, 98, 34 } }, + new object[] { new byte[] { 34, 97, 0xe2, 0x82, 0x28, 98, 34 } }, + new object[] { new byte[] { 34, 97, 0xf0, 0x28, 0x8c, 0xbc, 98, 34 } }, + new object[] { new byte[] { 34, 97, 0xf0, 0x90, 0x28, 0xbc, 98, 34 } }, + new object[] { new byte[] { 34, 97, 0xf0, 0x28, 0x8c, 0x28, 98, 34 } }, + }; + } + } + + public static IEnumerable JsonEncodedTextStrings + { + get + { + return new List + { + new object[] {"", "" }, + new object[] { "message", "message" }, + new object[] { "mess\"age", "mess\\u0022age" }, + new object[] { "mess\\u0022age", "mess\\\\u0022age" }, + new object[] { ">>>>>", "\\u003e\\u003e\\u003e\\u003e\\u003e" }, + new object[] { "\\u003e\\u003e\\u003e\\u003e\\u003e", "\\\\u003e\\\\u003e\\\\u003e\\\\u003e\\\\u003e" }, + }; + } + } + } +} diff --git a/src/System.Text.Json/tests/System.Text.Json.Tests.csproj b/src/System.Text.Json/tests/System.Text.Json.Tests.csproj index 49571147f644..1569772c768f 100644 --- a/src/System.Text.Json/tests/System.Text.Json.Tests.csproj +++ b/src/System.Text.Json/tests/System.Text.Json.Tests.csproj @@ -16,6 +16,7 @@ + diff --git a/src/System.Text.Json/tests/Utf8JsonWriterTests.cs b/src/System.Text.Json/tests/Utf8JsonWriterTests.cs index 6f7305277049..34f97e9be512 100644 --- a/src/System.Text.Json/tests/Utf8JsonWriterTests.cs +++ b/src/System.Text.Json/tests/Utf8JsonWriterTests.cs @@ -9,6 +9,7 @@ using System.Globalization; using System.Threading.Tasks; using System.IO.Pipelines; +using System.Collections.Generic; namespace System.Text.Json.Tests { @@ -954,6 +955,17 @@ public void InvalidJsonMismatch(bool formatted, bool skipValidation) Assert.Throws(() => jsonUtf8.WriteString("key", "value")); } + jsonUtf8 = new Utf8JsonWriter(output, options); + jsonUtf8.WriteStartArray(); + if (skipValidation) + { + jsonUtf8.WriteString(JsonEncodedText.Encode("key"), JsonEncodedText.Encode("value")); + } + else + { + Assert.Throws(() => jsonUtf8.WriteString(JsonEncodedText.Encode("key"), JsonEncodedText.Encode("value"))); + } + jsonUtf8 = new Utf8JsonWriter(output, options); jsonUtf8.WriteStartObject(); if (skipValidation) @@ -1184,6 +1196,17 @@ public void InvalidJsonPrimitive(bool formatted, bool skipValidation) Assert.Throws(() => jsonUtf8.WriteString("property name", "value")); } + jsonUtf8 = new Utf8JsonWriter(output, options); + jsonUtf8.WriteNumberValue(12345); + if (skipValidation) + { + jsonUtf8.WriteString(JsonEncodedText.Encode("property name"), JsonEncodedText.Encode("value")); + } + else + { + Assert.Throws(() => jsonUtf8.WriteString(JsonEncodedText.Encode("property name"), JsonEncodedText.Encode("value"))); + } + jsonUtf8 = new Utf8JsonWriter(output, options); jsonUtf8.WriteNumberValue(12345); if (skipValidation) @@ -1339,6 +1362,14 @@ public void WritingTooDeepProperty(bool formatted, bool skipValidation) jsonUtf8.WriteStartObject(Encoding.UTF8.GetBytes("name")); } Assert.Throws(() => jsonUtf8.WriteStartArray(Encoding.UTF8.GetBytes("name"))); + + jsonUtf8 = new Utf8JsonWriter(output, options); + jsonUtf8.WriteStartObject(); + for (int i = 0; i < 999; i++) + { + jsonUtf8.WriteStartObject(JsonEncodedText.Encode("name")); + } + Assert.Throws(() => jsonUtf8.WriteStartArray(JsonEncodedText.Encode("name"))); } [ConditionalTheory(nameof(IsX64))] @@ -1409,9 +1440,15 @@ public void WriteHelloWorld(bool formatted, bool skipValidation) string value = "Hello, World!"; string expectedStr = GetHelloWorldExpectedString(prettyPrint: formatted, propertyName, value); + JsonEncodedText encodedPropertyName = JsonEncodedText.Encode(propertyName); + JsonEncodedText encodedValue = JsonEncodedText.Encode(value); + + byte[] utf8PropertyName = Encoding.UTF8.GetBytes("message"); + byte[] utf8Value = Encoding.UTF8.GetBytes("Hello, World!"); + var options = new JsonWriterOptions { Indented = formatted, SkipValidation = skipValidation }; - for (int i = 0; i < 9; i++) + for (int i = 0; i < 16; i++) { var output = new ArrayBufferWriter(32); var jsonUtf8 = new Utf8JsonWriter(output, options); @@ -1421,40 +1458,68 @@ public void WriteHelloWorld(bool formatted, bool skipValidation) switch (i) { case 0: - jsonUtf8.WriteString("message", "Hello, World!"); - jsonUtf8.WriteString("message", "Hello, World!"); + jsonUtf8.WriteString(propertyName, value); + jsonUtf8.WriteString(propertyName, value); break; case 1: - jsonUtf8.WriteString("message", "Hello, World!".AsSpan()); - jsonUtf8.WriteString("message", "Hello, World!".AsSpan()); + jsonUtf8.WriteString(propertyName, value.AsSpan()); + jsonUtf8.WriteString(propertyName, value.AsSpan()); break; case 2: - jsonUtf8.WriteString("message", Encoding.UTF8.GetBytes("Hello, World!")); - jsonUtf8.WriteString("message", Encoding.UTF8.GetBytes("Hello, World!")); + jsonUtf8.WriteString(propertyName, utf8Value); + jsonUtf8.WriteString(propertyName, utf8Value); break; case 3: - jsonUtf8.WriteString("message".AsSpan(), "Hello, World!"); - jsonUtf8.WriteString("message".AsSpan(), "Hello, World!"); + jsonUtf8.WriteString(propertyName.AsSpan(), value); + jsonUtf8.WriteString(propertyName.AsSpan(), value); break; case 4: - jsonUtf8.WriteString("message".AsSpan(), "Hello, World!".AsSpan()); - jsonUtf8.WriteString("message".AsSpan(), "Hello, World!".AsSpan()); + jsonUtf8.WriteString(propertyName.AsSpan(), value.AsSpan()); + jsonUtf8.WriteString(propertyName.AsSpan(), value.AsSpan()); break; case 5: - jsonUtf8.WriteString("message".AsSpan(), Encoding.UTF8.GetBytes("Hello, World!")); - jsonUtf8.WriteString("message".AsSpan(), Encoding.UTF8.GetBytes("Hello, World!")); + jsonUtf8.WriteString(propertyName.AsSpan(), utf8Value); + jsonUtf8.WriteString(propertyName.AsSpan(), utf8Value); break; case 6: - jsonUtf8.WriteString(Encoding.UTF8.GetBytes("message"), "Hello, World!"); - jsonUtf8.WriteString(Encoding.UTF8.GetBytes("message"), "Hello, World!"); + jsonUtf8.WriteString(utf8PropertyName, value); + jsonUtf8.WriteString(utf8PropertyName, value); break; case 7: - jsonUtf8.WriteString(Encoding.UTF8.GetBytes("message"), "Hello, World!".AsSpan()); - jsonUtf8.WriteString(Encoding.UTF8.GetBytes("message"), "Hello, World!".AsSpan()); + jsonUtf8.WriteString(utf8PropertyName, value.AsSpan()); + jsonUtf8.WriteString(utf8PropertyName, value.AsSpan()); break; case 8: - jsonUtf8.WriteString(Encoding.UTF8.GetBytes("message"), Encoding.UTF8.GetBytes("Hello, World!")); - jsonUtf8.WriteString(Encoding.UTF8.GetBytes("message"), Encoding.UTF8.GetBytes("Hello, World!")); + jsonUtf8.WriteString(utf8PropertyName, utf8Value); + jsonUtf8.WriteString(utf8PropertyName, utf8Value); + break; + case 9: + jsonUtf8.WriteString(encodedPropertyName, value); + jsonUtf8.WriteString(encodedPropertyName, value); + break; + case 10: + jsonUtf8.WriteString(encodedPropertyName, value.AsSpan()); + jsonUtf8.WriteString(encodedPropertyName, value.AsSpan()); + break; + case 11: + jsonUtf8.WriteString(encodedPropertyName, utf8Value); + jsonUtf8.WriteString(encodedPropertyName, utf8Value); + break; + case 12: + jsonUtf8.WriteString(encodedPropertyName, encodedValue); + jsonUtf8.WriteString(encodedPropertyName, encodedValue); + break; + case 13: + jsonUtf8.WriteString(propertyName, encodedValue); + jsonUtf8.WriteString(propertyName, encodedValue); + break; + case 14: + jsonUtf8.WriteString(propertyName.AsSpan(), encodedValue); + jsonUtf8.WriteString(propertyName.AsSpan(), encodedValue); + break; + case 15: + jsonUtf8.WriteString(utf8PropertyName, encodedValue); + jsonUtf8.WriteString(utf8PropertyName, encodedValue); break; } @@ -1483,7 +1548,10 @@ public void WriteHelloWorldEscaped(bool formatted, bool skipValidation) ReadOnlySpan propertyNameSpanUtf8 = Encoding.UTF8.GetBytes(propertyName); ReadOnlySpan valueSpanUtf8 = Encoding.UTF8.GetBytes(value); - for (int i = 0; i < 9; i++) + JsonEncodedText encodedPropertyName = JsonEncodedText.Encode(propertyName); + JsonEncodedText encodedValue = JsonEncodedText.Encode(value); + + for (int i = 0; i < 16; i++) { var output = new ArrayBufferWriter(32); var jsonUtf8 = new Utf8JsonWriter(output, options); @@ -1528,6 +1596,34 @@ public void WriteHelloWorldEscaped(bool formatted, bool skipValidation) jsonUtf8.WriteString(propertyNameSpanUtf8, valueSpanUtf8); jsonUtf8.WriteString(propertyNameSpanUtf8, valueSpanUtf8); break; + case 9: + jsonUtf8.WriteString(encodedPropertyName, value); + jsonUtf8.WriteString(encodedPropertyName, value); + break; + case 10: + jsonUtf8.WriteString(encodedPropertyName, value.AsSpan()); + jsonUtf8.WriteString(encodedPropertyName, value.AsSpan()); + break; + case 11: + jsonUtf8.WriteString(encodedPropertyName, valueSpanUtf8); + jsonUtf8.WriteString(encodedPropertyName, valueSpanUtf8); + break; + case 12: + jsonUtf8.WriteString(encodedPropertyName, encodedValue); + jsonUtf8.WriteString(encodedPropertyName, encodedValue); + break; + case 13: + jsonUtf8.WriteString(propertyName, encodedValue); + jsonUtf8.WriteString(propertyName, encodedValue); + break; + case 14: + jsonUtf8.WriteString(propertyName.AsSpan(), encodedValue); + jsonUtf8.WriteString(propertyName.AsSpan(), encodedValue); + break; + case 15: + jsonUtf8.WriteString(propertyNameSpanUtf8, encodedValue); + jsonUtf8.WriteString(propertyNameSpanUtf8, encodedValue); + break; } jsonUtf8.WriteEndObject(); @@ -1906,7 +2002,13 @@ public void WriteHelloWorldEscaped(bool formatted, bool skipValidation, string k var options = new JsonWriterOptions { Indented = formatted, SkipValidation = skipValidation }; - for (int i = 0; i < 9; i++) + byte[] keyUtf8 = Encoding.UTF8.GetBytes(key); + byte[] valueUtf8 = Encoding.UTF8.GetBytes(value); + + JsonEncodedText encodedKey = JsonEncodedText.Encode(key); + JsonEncodedText encodedValue = JsonEncodedText.Encode(value); + + for (int i = 0; i < 16; i++) { var output = new ArrayBufferWriter(1024); var jsonUtf8 = new Utf8JsonWriter(output, options); @@ -1919,28 +2021,49 @@ public void WriteHelloWorldEscaped(bool formatted, bool skipValidation, string k jsonUtf8.WriteString(key, value); break; case 1: - jsonUtf8.WriteString(key.AsSpan(), value.AsSpan()); + jsonUtf8.WriteString(key, value.AsSpan()); break; case 2: - jsonUtf8.WriteString(Encoding.UTF8.GetBytes(key), Encoding.UTF8.GetBytes(value)); + jsonUtf8.WriteString(key, valueUtf8); break; case 3: - jsonUtf8.WriteString(key, value.AsSpan()); + jsonUtf8.WriteString(key.AsSpan(), value); break; case 4: - jsonUtf8.WriteString(key, Encoding.UTF8.GetBytes(value)); + jsonUtf8.WriteString(key.AsSpan(), value.AsSpan()); break; case 5: - jsonUtf8.WriteString(key.AsSpan(), value); + jsonUtf8.WriteString(key.AsSpan(), valueUtf8); break; case 6: - jsonUtf8.WriteString(key.AsSpan(), Encoding.UTF8.GetBytes(value)); + jsonUtf8.WriteString(keyUtf8, value); break; case 7: - jsonUtf8.WriteString(Encoding.UTF8.GetBytes(key), value); + jsonUtf8.WriteString(keyUtf8, value.AsSpan()); break; case 8: - jsonUtf8.WriteString(Encoding.UTF8.GetBytes(key), value.AsSpan()); + jsonUtf8.WriteString(keyUtf8, valueUtf8); + break; + case 9: + jsonUtf8.WriteString(encodedKey, value); + break; + case 10: + jsonUtf8.WriteString(encodedKey, value.AsSpan()); + break; + case 11: + jsonUtf8.WriteString(encodedKey, valueUtf8); + break; + case 12: + jsonUtf8.WriteString(encodedKey, encodedValue); + break; + case 13: + jsonUtf8.WriteString(key, encodedValue); + break; + case 14: + jsonUtf8.WriteString(key.AsSpan(), encodedValue); + break; + case 15: + jsonUtf8.WriteString(keyUtf8, encodedValue); break; } @@ -1979,7 +2102,7 @@ public void EscapeAsciiCharacters(bool formatted, bool skipValidation) string expectedStr = GetEscapedExpectedString(prettyPrint: formatted, propertyName, value, StringEscapeHandling.EscapeHtml); var options = new JsonWriterOptions { Indented = formatted, SkipValidation = skipValidation }; - for (int i = 0; i < 2; i++) + for (int i = 0; i < 3; i++) { var output = new ArrayBufferWriter(1024); var jsonUtf8 = new Utf8JsonWriter(output, options); @@ -1994,6 +2117,9 @@ public void EscapeAsciiCharacters(bool formatted, bool skipValidation) case 1: jsonUtf8.WriteString(Encoding.UTF8.GetBytes(propertyName), Encoding.UTF8.GetBytes(value)); break; + case 2: + jsonUtf8.WriteString(JsonEncodedText.Encode(propertyName), JsonEncodedText.Encode(value)); + break; } jsonUtf8.WriteEndObject(); @@ -2027,7 +2153,7 @@ public void EscapeCharacters(bool formatted, bool skipValidation) string expectedStr = GetEscapedExpectedString(prettyPrint: formatted, propertyName, value, StringEscapeHandling.EscapeNonAscii); var options = new JsonWriterOptions { Indented = formatted, SkipValidation = skipValidation }; - for (int i = 0; i < 2; i++) + for (int i = 0; i < 3; i++) { var output = new ArrayBufferWriter(1024); var jsonUtf8 = new Utf8JsonWriter(output, options); @@ -2042,6 +2168,9 @@ public void EscapeCharacters(bool formatted, bool skipValidation) case 1: jsonUtf8.WriteString(Encoding.UTF8.GetBytes(propertyName), Encoding.UTF8.GetBytes(value)); break; + case 2: + jsonUtf8.WriteString(JsonEncodedText.Encode(propertyName), JsonEncodedText.Encode(value)); + break; } jsonUtf8.WriteEndObject(); @@ -2066,7 +2195,7 @@ public void EscapeSurrogatePairs(bool formatted, bool skipValidation) string expectedStr = GetEscapedExpectedString(prettyPrint: formatted, propertyName, value, StringEscapeHandling.EscapeNonAscii); var options = new JsonWriterOptions { Indented = formatted, SkipValidation = skipValidation }; - for (int i = 0; i < 2; i++) + for (int i = 0; i < 3; i++) { var output = new ArrayBufferWriter(1024); var jsonUtf8 = new Utf8JsonWriter(output, options); @@ -2081,6 +2210,9 @@ public void EscapeSurrogatePairs(bool formatted, bool skipValidation) case 1: jsonUtf8.WriteString(Encoding.UTF8.GetBytes(propertyName), Encoding.UTF8.GetBytes(value)); break; + case 2: + jsonUtf8.WriteString(JsonEncodedText.Encode(propertyName), JsonEncodedText.Encode(value)); + break; } jsonUtf8.WriteEndObject(); @@ -3404,6 +3536,310 @@ private static void WriteTooLargeHelper(JsonWriterOptions options, ReadOnlySpan< jsonUtf8.Flush(); } + [Fact] + public static void WriteStringValue_JsonEncodedText_Default() + { + JsonEncodedText text = default; + WriteStringValueHelper(text, "\"\""); + } + + [Theory] + [MemberData(nameof(JsonEncodedTextStrings))] + public static void WriteStringValue_JsonEncodedText(string message, string expectedMessage) + { + JsonEncodedText text = JsonEncodedText.Encode(message); + WriteStringValueHelper(text, expectedMessage); + } + + private static void WriteStringValueHelper(JsonEncodedText text, string expectedMessage) + { + var output = new ArrayBufferWriter(); + using var jsonUtf8 = new Utf8JsonWriter(output); + jsonUtf8.WriteStringValue(text); + jsonUtf8.Flush(); + + AssertContents($"{expectedMessage}", output); + } + + [Theory] + [InlineData(100)] + [InlineData(1_000)] + [InlineData(10_000)] + public static void WriteStringValue_JsonEncodedText_Large(int stringLength) + { + { + var message = new string('a', stringLength); + var builder = new StringBuilder(); + builder.Append("\""); + for (int i = 0; i < stringLength; i++) + { + builder.Append("a"); + } + builder.Append("\""); + string expectedMessage = builder.ToString(); + + JsonEncodedText text = JsonEncodedText.Encode(message); + + var output = new ArrayBufferWriter(); + using var jsonUtf8 = new Utf8JsonWriter(output); + jsonUtf8.WriteStringValue(text); + jsonUtf8.Flush(); + + AssertContents(expectedMessage, output); + } + { + var message = new string('>', stringLength); + var builder = new StringBuilder(); + builder.Append("\""); + for (int i = 0; i < stringLength; i++) + { + builder.Append("\\u003e"); + } + builder.Append("\""); + string expectedMessage = builder.ToString(); + + JsonEncodedText text = JsonEncodedText.Encode(message); + var output = new ArrayBufferWriter(); + using var jsonUtf8 = new Utf8JsonWriter(output); + jsonUtf8.WriteStringValue(text); + jsonUtf8.Flush(); + + AssertContents(expectedMessage, output); + } + } + + [Fact] + public static void WriteStartArrayObject_JsonEncodedText_Default() + { + JsonEncodedText text = default; + WriteArrayObjectHelper(text, "\"\""); + } + + [Theory] + [MemberData(nameof(JsonEncodedTextStrings))] + public static void WriteStartArrayObject_JsonEncodedText(string message, string expectedMessage) + { + JsonEncodedText text = JsonEncodedText.Encode(message); + WriteArrayObjectHelper(text, expectedMessage); + } + + private static void WriteArrayObjectHelper(JsonEncodedText text, string expectedMessage) + { + { + var output = new ArrayBufferWriter(); + using var jsonUtf8 = new Utf8JsonWriter(output); + jsonUtf8.WriteStartObject(); + jsonUtf8.WriteStartObject(text); + jsonUtf8.Flush(); + + AssertContents($"{{{expectedMessage}:{{", output); + } + + { + var output = new ArrayBufferWriter(); + using var jsonUtf8 = new Utf8JsonWriter(output); + jsonUtf8.WriteStartObject(); + jsonUtf8.WriteStartArray(text); + jsonUtf8.Flush(); + + AssertContents($"{{{expectedMessage}:[", output); + } + } + + [Fact] + public static void WriteLiteral_JsonEncodedText_Default() + { + JsonEncodedText text = default; + WriteLiteralHelper(text, "\"\""); + } + + [Theory] + [MemberData(nameof(JsonEncodedTextStrings))] + public static void WriteLiteral_JsonEncodedText(string message, string expectedMessage) + { + JsonEncodedText text = JsonEncodedText.Encode(message); + WriteLiteralHelper(text, expectedMessage); + } + + private static void WriteLiteralHelper(JsonEncodedText text, string expectedMessage) + { + { + var output = new ArrayBufferWriter(); + using var jsonUtf8 = new Utf8JsonWriter(output); + jsonUtf8.WriteStartObject(); + jsonUtf8.WriteBoolean(text, true); + jsonUtf8.Flush(); + + AssertContents($"{{{expectedMessage}:true", output); + } + + { + var output = new ArrayBufferWriter(); + using var jsonUtf8 = new Utf8JsonWriter(output); + jsonUtf8.WriteStartObject(); + jsonUtf8.WriteBoolean(text, false); + jsonUtf8.Flush(); + + AssertContents($"{{{expectedMessage}:false", output); + } + + { + var output = new ArrayBufferWriter(); + using var jsonUtf8 = new Utf8JsonWriter(output); + jsonUtf8.WriteStartObject(); + jsonUtf8.WriteNull(text); + jsonUtf8.Flush(); + + AssertContents($"{{{expectedMessage}:null", output); + } + } + + [Fact] + public static void WriteNumber_JsonEncodedText_Default() + { + JsonEncodedText text = default; + WriteNumberHelper(text, "\"\""); + } + + [Theory] + [MemberData(nameof(JsonEncodedTextStrings))] + public static void WriteNumber_JsonEncodedText(string message, string expectedMessage) + { + JsonEncodedText text = JsonEncodedText.Encode(message); + WriteNumberHelper(text, expectedMessage); + } + + private static void WriteNumberHelper(JsonEncodedText text, string expectedMessage) + { + { + var output = new ArrayBufferWriter(); + using var jsonUtf8 = new Utf8JsonWriter(output); + jsonUtf8.WriteStartObject(); + int value = 1; + jsonUtf8.WriteNumber(text, value); + jsonUtf8.Flush(); + + AssertContents($"{{{expectedMessage}:1", output); + } + + { + var output = new ArrayBufferWriter(); + using var jsonUtf8 = new Utf8JsonWriter(output); + jsonUtf8.WriteStartObject(); + long value = 1; + jsonUtf8.WriteNumber(text, value); + jsonUtf8.Flush(); + + AssertContents($"{{{expectedMessage}:1", output); + } + + { + var output = new ArrayBufferWriter(); + using var jsonUtf8 = new Utf8JsonWriter(output); + jsonUtf8.WriteStartObject(); + uint value = 1; + jsonUtf8.WriteNumber(text, value); + jsonUtf8.Flush(); + + AssertContents($"{{{expectedMessage}:1", output); + } + + { + var output = new ArrayBufferWriter(); + using var jsonUtf8 = new Utf8JsonWriter(output); + jsonUtf8.WriteStartObject(); + ulong value = 1; + jsonUtf8.WriteNumber(text, value); + jsonUtf8.Flush(); + + AssertContents($"{{{expectedMessage}:1", output); + } + + { + var output = new ArrayBufferWriter(); + using var jsonUtf8 = new Utf8JsonWriter(output); + jsonUtf8.WriteStartObject(); + float value = 1; + jsonUtf8.WriteNumber(text, value); + jsonUtf8.Flush(); + + AssertContents($"{{{expectedMessage}:1", output); + } + + { + var output = new ArrayBufferWriter(); + using var jsonUtf8 = new Utf8JsonWriter(output); + jsonUtf8.WriteStartObject(); + double value = 1; + jsonUtf8.WriteNumber(text, value); + jsonUtf8.Flush(); + + AssertContents($"{{{expectedMessage}:1", output); + } + + { + var output = new ArrayBufferWriter(); + using var jsonUtf8 = new Utf8JsonWriter(output); + jsonUtf8.WriteStartObject(); + decimal value = 1; + jsonUtf8.WriteNumber(text, value); + jsonUtf8.Flush(); + + AssertContents($"{{{expectedMessage}:1", output); + } + } + + [Fact] + public static void WriteStringDateAndGuid_JsonEncodedText_Default() + { + JsonEncodedText text = default; + WriteStringHelper(text, "\"\""); + } + + [Theory] + [MemberData(nameof(JsonEncodedTextStrings))] + public static void WriteStringDateAndGuid_JsonEncodedText(string message, string expectedMessage) + { + JsonEncodedText text = JsonEncodedText.Encode(message); + WriteStringHelper(text, expectedMessage); + } + + private static void WriteStringHelper(JsonEncodedText text, string expectedMessage) + { + { + var output = new ArrayBufferWriter(); + using var jsonUtf8 = new Utf8JsonWriter(output); + jsonUtf8.WriteStartObject(); + DateTime value = new DateTime(2019, 1, 1); + jsonUtf8.WriteString(text, value); + jsonUtf8.Flush(); + + AssertContents($"{{{expectedMessage}:\"{value.ToString("yyyy-MM-ddTHH:mm:ss")}\"", output); + } + + { + var output = new ArrayBufferWriter(); + using var jsonUtf8 = new Utf8JsonWriter(output); + jsonUtf8.WriteStartObject(); + DateTimeOffset value = new DateTime(2019, 1, 1); + jsonUtf8.WriteString(text, value); + jsonUtf8.Flush(); + + AssertContents($"{{{expectedMessage}:\"{value.ToString("yyyy-MM-ddTHH:mm:ssK")}\"", output); + } + + { + var output = new ArrayBufferWriter(); + using var jsonUtf8 = new Utf8JsonWriter(output); + jsonUtf8.WriteStartObject(); + Guid value = Guid.NewGuid(); + jsonUtf8.WriteString(text, value); + jsonUtf8.Flush(); + + AssertContents($"{{{expectedMessage}:\"{value.ToString()}\"", output); + } + } + [ConditionalTheory(nameof(IsX64))] [OuterLoop] [InlineData(true, true)] @@ -3435,7 +3871,7 @@ public void WriteTooLargeArguments(bool formatted, bool skipValidation) chars.AsSpan().Fill('a'); var pipe = new Pipe(); - var output = pipe.Writer; + PipeWriter output = pipe.Writer; using var jsonUtf8 = new Utf8JsonWriter(output, options); jsonUtf8.WriteStartArray(); @@ -3991,5 +4427,21 @@ private static void AssertContents(string expectedValue, ArrayBufferWriter #endif )); } + + public static IEnumerable JsonEncodedTextStrings + { + get + { + return new List + { + new object[] {"", "\"\"" }, + new object[] { "message", "\"message\"" }, + new object[] { "mess\"age", "\"mess\\u0022age\"" }, + new object[] { "mess\\u0022age", "\"mess\\\\u0022age\"" }, + new object[] { ">>>>>", "\"\\u003e\\u003e\\u003e\\u003e\\u003e\"" }, + new object[] { "\\u003e\\u003e\\u003e\\u003e\\u003e", "\"\\\\u003e\\\\u003e\\\\u003e\\\\u003e\\\\u003e\"" }, + }; + } + } } } From d398edffd620fd3e4136963faedfea3a9a8e66b0 Mon Sep 17 00:00:00 2001 From: Stephen Toub Date: Wed, 1 May 2019 21:49:37 -0400 Subject: [PATCH 162/607] Make ProcessTests.HandleCountChanges more reliable (#37330) * Make ProcessTests.HandleCountChanges more reliable * Address PR feedback * Update CoreFx.Private.TestUtilities.csproj --- .../ref/CoreFx.Private.TestUtilities.cs | 5 + .../src/CoreFx.Private.TestUtilities.csproj | 1 + .../src/System/RetryHelper.cs | 91 +++++++++++++++++++ .../tests/ProcessModuleTests.cs | 2 +- .../tests/ProcessTests.cs | 86 +++++++++++------- .../tests/ProcessThreadTests.cs | 17 ++-- 6 files changed, 159 insertions(+), 43 deletions(-) create mode 100644 src/CoreFx.Private.TestUtilities/src/System/RetryHelper.cs diff --git a/src/CoreFx.Private.TestUtilities/ref/CoreFx.Private.TestUtilities.cs b/src/CoreFx.Private.TestUtilities/ref/CoreFx.Private.TestUtilities.cs index 8f457aab11c8..ff5dc9cf1e06 100644 --- a/src/CoreFx.Private.TestUtilities/ref/CoreFx.Private.TestUtilities.cs +++ b/src/CoreFx.Private.TestUtilities/ref/CoreFx.Private.TestUtilities.cs @@ -136,6 +136,11 @@ public static partial class PlatformDetection public static int WindowsVersion { get { throw null; } } public static string GetDistroVersionString() { throw null; } } + public static partial class RetryHelper + { + public static void Execute(System.Action test, int maxAttempts = 5, System.Func backoffFunc = null) { } + public static System.Threading.Tasks.Task ExecuteAsync(Func test, int maxAttempts = 5, System.Func backoffFunc = null) { throw null; } + } public static partial class TestEnvironment { public static bool IsStressModeEnabled { get { throw null; } } diff --git a/src/CoreFx.Private.TestUtilities/src/CoreFx.Private.TestUtilities.csproj b/src/CoreFx.Private.TestUtilities/src/CoreFx.Private.TestUtilities.csproj index 1112b71aae4a..cda53cdc7c11 100644 --- a/src/CoreFx.Private.TestUtilities/src/CoreFx.Private.TestUtilities.csproj +++ b/src/CoreFx.Private.TestUtilities/src/CoreFx.Private.TestUtilities.csproj @@ -34,6 +34,7 @@ Common\CoreLib\System\PasteArguments.cs + diff --git a/src/CoreFx.Private.TestUtilities/src/System/RetryHelper.cs b/src/CoreFx.Private.TestUtilities/src/System/RetryHelper.cs new file mode 100644 index 000000000000..0308f11cea5d --- /dev/null +++ b/src/CoreFx.Private.TestUtilities/src/System/RetryHelper.cs @@ -0,0 +1,91 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Collections.Generic; +using System.Threading; +using System.Threading.Tasks; + +namespace System +{ + public static partial class RetryHelper + { + private static readonly Func s_defaultBackoffFunc = i => Math.Min(i * 100, 60_000); + + /// Executes the action up to a maximum of times. + /// The maximum number of times to invoke . + /// The test to invoke. + /// After a failure, invoked to determine how many milliseconds to wait before the next attempt. It's passed the number of iterations attempted. + public static void Execute(Action test, int maxAttempts = 5, Func backoffFunc = null) + { + // Validate arguments + if (maxAttempts < 1) + { + throw new ArgumentOutOfRangeException(nameof(maxAttempts)); + } + if (test == null) + { + throw new ArgumentNullException(nameof(test)); + } + + // Execute the test until it either passes or we run it maxAttempts times + var exceptions = new List(); + for (int i = 1; i <= maxAttempts; i++) + { + try + { + test(); + return; + } + catch (Exception e) + { + exceptions.Add(e); + if (i == maxAttempts) + { + throw new AggregateException(exceptions); + } + } + + Thread.Sleep((backoffFunc ?? s_defaultBackoffFunc)(i)); + } + } + + /// Executes the action up to a maximum of times. + /// The maximum number of times to invoke . + /// The test to invoke. + /// After a failure, invoked to determine how many milliseconds to wait before the next attempt. It's passed the number of iterations attempted. + public static async Task ExecuteAsync(Func test, int maxAttempts = 5, Func backoffFunc = null) + { + // Validate arguments + if (maxAttempts < 1) + { + throw new ArgumentOutOfRangeException(nameof(maxAttempts)); + } + if (test == null) + { + throw new ArgumentNullException(nameof(test)); + } + + // Execute the test until it either passes or we run it maxAttempts times + var exceptions = new List(); + for (int i = 1; i <= maxAttempts; i++) + { + try + { + await test().ConfigureAwait(false); + return; + } + catch (Exception e) + { + exceptions.Add(e); + if (i == maxAttempts) + { + throw new AggregateException(exceptions); + } + } + + await Task.Delay((backoffFunc ?? s_defaultBackoffFunc)(i)).ConfigureAwait(false); + } + } + } +} diff --git a/src/System.Diagnostics.Process/tests/ProcessModuleTests.cs b/src/System.Diagnostics.Process/tests/ProcessModuleTests.cs index 1c6f06fc60cd..b11d5b0eaf17 100644 --- a/src/System.Diagnostics.Process/tests/ProcessModuleTests.cs +++ b/src/System.Diagnostics.Process/tests/ProcessModuleTests.cs @@ -14,7 +14,7 @@ public class ProcessModuleTests : ProcessTestBase public void TestModuleProperties() { ProcessModuleCollection modules = Process.GetCurrentProcess().Modules; - Assert.True(modules.Count > 0); + Assert.InRange(modules.Count, 1, int.MaxValue); foreach (ProcessModule module in modules) { diff --git a/src/System.Diagnostics.Process/tests/ProcessTests.cs b/src/System.Diagnostics.Process/tests/ProcessTests.cs index 2f19b9141713..31f560475434 100644 --- a/src/System.Diagnostics.Process/tests/ProcessTests.cs +++ b/src/System.Diagnostics.Process/tests/ProcessTests.cs @@ -349,12 +349,7 @@ public void TestExitTime() break; } - Assert.True(p.ExitTime.ToUniversalTime() >= timeBeforeProcessStart, - $@"TestExitTime is incorrect. " + - $@"TimeBeforeStart {timeBeforeProcessStart} Ticks={timeBeforeProcessStart.Ticks}, " + - $@"ExitTime={p.ExitTime}, Ticks={p.ExitTime.Ticks}, " + - $@"ExitTimeUniversal {p.ExitTime.ToUniversalTime()} Ticks={p.ExitTime.ToUniversalTime().Ticks}, " + - $@"NowUniversal {DateTime.Now.ToUniversalTime()} Ticks={DateTime.Now.Ticks}"); + Assert.InRange(p.ExitTime.ToUniversalTime(), timeBeforeProcessStart, DateTime.MaxValue); } [Fact] @@ -450,7 +445,7 @@ public void TestMainModule() (Func)((s) => s.ToLowerInvariant()) : (s) => s; - Assert.True(p.Modules.Count > 0); + Assert.InRange(p.Modules.Count, 1, int.MaxValue); Assert.Equal(normalize(RemoteExecutor.HostRunnerName), normalize(p.MainModule.ModuleName)); Assert.EndsWith(normalize(RemoteExecutor.HostRunnerName), normalize(p.MainModule.FileName)); Assert.Equal(normalize(string.Format("System.Diagnostics.ProcessModule ({0})", RemoteExecutor.HostRunnerName)), normalize(p.MainModule.ToString())); @@ -464,8 +459,8 @@ public void TestMaxWorkingSet() using (Process p = Process.GetCurrentProcess()) { - Assert.True((long)p.MaxWorkingSet > 0); - Assert.True((long)p.MinWorkingSet >= 0); + Assert.InRange((long)p.MaxWorkingSet, 1, long.MaxValue); + Assert.InRange((long)p.MinWorkingSet, 0, long.MaxValue); } if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX) || RuntimeInformation.IsOSPlatform(OSPlatform.Create("FREEBSD"))) { @@ -473,7 +468,7 @@ public void TestMaxWorkingSet() } long curValue = (long)_process.MaxWorkingSet; - Assert.True(curValue >= 0); + Assert.InRange(curValue, 0, long.MaxValue); if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) { @@ -520,8 +515,8 @@ public void TestMinWorkingSet() using (Process p = Process.GetCurrentProcess()) { - Assert.True((long)p.MaxWorkingSet > 0); - Assert.True((long)p.MinWorkingSet >= 0); + Assert.InRange((long)p.MaxWorkingSet, 1, long.MaxValue); + Assert.InRange((long)p.MinWorkingSet, 0, long.MaxValue); } if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX) || RuntimeInformation.IsOSPlatform(OSPlatform.Create("FREEBSD"))) { @@ -529,7 +524,7 @@ public void TestMinWorkingSet() } long curValue = (long)_process.MinWorkingSet; - Assert.True(curValue >= 0); + Assert.InRange(curValue, 0, long.MaxValue); if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) { @@ -703,7 +698,7 @@ public void TestVirtualMemorySize64() { CreateDefaultProcess(); - Assert.True(_process.VirtualMemorySize64 > 0); + Assert.InRange(_process.VirtualMemorySize64, 1, long.MaxValue); } [Fact] @@ -722,11 +717,11 @@ public void TestWorkingSet64() if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) { // resident memory can be 0 on OSX. - Assert.True(_process.WorkingSet64 >= 0); + Assert.InRange(_process.WorkingSet64, 0, long.MaxValue); return; } - Assert.True(_process.WorkingSet64 > 0); + Assert.InRange(_process.WorkingSet64, 1, long.MaxValue); } [Fact] @@ -742,8 +737,8 @@ public void TestProcessorTime() { CreateDefaultProcess(); - Assert.True(_process.UserProcessorTime.TotalSeconds >= 0); - Assert.True(_process.PrivilegedProcessorTime.TotalSeconds >= 0); + Assert.InRange(_process.UserProcessorTime.TotalSeconds, 0, long.MaxValue); + Assert.InRange(_process.PrivilegedProcessorTime.TotalSeconds, 0, long.MaxValue); double processorTimeBeforeSpin = Process.GetCurrentProcess().TotalProcessorTime.TotalSeconds; double processorTimeAtHalfSpin = 0; @@ -1457,7 +1452,7 @@ public void TestHandleCount() { using (Process p = Process.GetCurrentProcess()) { - Assert.True(p.HandleCount > 0); + Assert.InRange(p.HandleCount, 1, int.MaxValue); } } @@ -1471,7 +1466,7 @@ public void TestHandleCount_OSX() } } - [ActiveIssue(37325)] + [OuterLoop] [Fact] [PlatformSpecific(TestPlatforms.Linux | TestPlatforms.Windows)] // Expected process HandleCounts differs on OSX [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Handle count change is not reliable, but seems less robust on NETFX")] @@ -1480,20 +1475,41 @@ public void HandleCountChanges() { RemoteExecutor.Invoke(() => { - Process p = Process.GetCurrentProcess(); - int handleCount = p.HandleCount; - using (var fs1 = File.Open(GetTestFilePath(), FileMode.OpenOrCreate)) - using (var fs2 = File.Open(GetTestFilePath(), FileMode.OpenOrCreate)) - using (var fs3 = File.Open(GetTestFilePath(), FileMode.OpenOrCreate)) + RetryHelper.Execute(() => { - p.Refresh(); - int secondHandleCount = p.HandleCount; - Assert.True(handleCount < secondHandleCount); - handleCount = secondHandleCount; - } - p.Refresh(); - int thirdHandleCount = p.HandleCount; - Assert.True(thirdHandleCount < handleCount); + using (Process p = Process.GetCurrentProcess()) + { + // Warm up code paths + p.Refresh(); + using (var tmpFile = File.Open(GetTestFilePath(), FileMode.OpenOrCreate)) + { + // Get the initial handle count + p.Refresh(); + int handleCountAtStart = p.HandleCount; + int handleCountAfterOpens; + + // Open a bunch of files and get a new handle count, then close the files + var files = new List(); + try + { + files.AddRange(Enumerable.Range(0, 50).Select(_ => File.Open(GetTestFilePath(), FileMode.OpenOrCreate))); + p.Refresh(); + handleCountAfterOpens = p.HandleCount; + } + finally + { + files.ForEach(f => f.Dispose()); + } + + // Get the handle count after closing all the files + p.Refresh(); + int handleCountAtEnd = p.HandleCount; + + Assert.InRange(handleCountAfterOpens, handleCountAtStart + 1, int.MaxValue); + Assert.InRange(handleCountAtEnd, handleCountAtStart, handleCountAfterOpens - 1); + } + } + }); return RemoteExecutor.SuccessExitCode; }).Dispose(); } @@ -1762,13 +1778,13 @@ public void TestWorkingSet() { // resident memory can be 0 on OSX. #pragma warning disable 0618 - Assert.True(_process.WorkingSet >= 0); + Assert.InRange(_process.WorkingSet, 0, int.MaxValue); #pragma warning restore 0618 return; } #pragma warning disable 0618 - Assert.True(_process.WorkingSet > 0); + Assert.InRange(_process.WorkingSet, 1, int.MaxValue); #pragma warning restore 0618 } diff --git a/src/System.Diagnostics.Process/tests/ProcessThreadTests.cs b/src/System.Diagnostics.Process/tests/ProcessThreadTests.cs index df00d40b0317..0af036547b4e 100644 --- a/src/System.Diagnostics.Process/tests/ProcessThreadTests.cs +++ b/src/System.Diagnostics.Process/tests/ProcessThreadTests.cs @@ -20,7 +20,7 @@ public void TestCommonPriorityAndTimeProperties() CreateDefaultProcess(); ProcessThreadCollection threadCollection = _process.Threads; - Assert.True(threadCollection.Count > 0); + Assert.InRange(threadCollection.Count, 1, int.MaxValue); ProcessThread thread = threadCollection[0]; try { @@ -29,12 +29,15 @@ public void TestCommonPriorityAndTimeProperties() // On OSX, thread id is a 64bit unsigned value. We truncate the ulong to int // due to .NET API surface area. Hence, on overflow id can be negative while // casting the ulong to int. - Assert.True(thread.Id >= 0 || RuntimeInformation.IsOSPlatform(OSPlatform.OSX)); + if (!RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) + { + Assert.InRange(thread.Id, 0, int.MaxValue); + } Assert.Equal(_process.BasePriority, thread.BasePriority); - Assert.True(thread.CurrentPriority >= 0); - Assert.True(thread.PrivilegedProcessorTime.TotalSeconds >= 0); - Assert.True(thread.UserProcessorTime.TotalSeconds >= 0); - Assert.True(thread.TotalProcessorTime.TotalSeconds >= 0); + Assert.InRange(thread.CurrentPriority, 0, int.MaxValue); + Assert.InRange(thread.PrivilegedProcessorTime.TotalSeconds, 0, int.MaxValue); + Assert.InRange(thread.UserProcessorTime.TotalSeconds, 0, int.MaxValue); + Assert.InRange(thread.TotalProcessorTime.TotalSeconds, 0, int.MaxValue); } } catch (Exception e) when (e is Win32Exception || e is InvalidOperationException) @@ -120,7 +123,7 @@ public async Task TestStartTimeProperty() // The thread may have gone away between our getting its info and attempting to access its StartTime } } - Assert.True(passed > 0, "Expected at least one thread to be valid for StartTime"); + Assert.InRange(passed, 1, int.MaxValue); // Now add a thread, and from that thread, while it's still alive, verify // that there's at least one thread greater than the current time we previously grabbed. From b705522753f09d501762cca6c45d6bd031c112d7 Mon Sep 17 00:00:00 2001 From: Andrew Hoefling Date: Wed, 1 May 2019 23:57:56 -0400 Subject: [PATCH 163/607] Added Range Manipulation APIs to Collection and ObservableCollection (#35772) * Added Collection AddRange and InsertRange and added new XUnit tests to cover new APIs Added missing APIs from Collection; Added new unit tests for RemoveRange, ReplaceRange, InsertItemsRange and RemoveItemsRange Updated AddRange in Collection to add items to the end of the collection Added CollectionChanged tests for ObservableCollection for InsertRange, AddRange, RemoveRange and ReplaceRange Removing API changes as these will be mirrored from CoreCLR Updated array assertions to use Span to simplify logic Sorted order of new API methods Simplified CollectionTests Assertion to use Span instead of calling out each item in the array Added missing API ReplaceItemsRange and updated unit tests for check for overflow errors on RemoveItems Added overrides for ObservableCollection ItemsRange API to only fire CollectionChanged once per API call. Before this was firing for each item in the collection which is not the desired result. Updated unit tests to verify this logic Updated RemoveItemsRange to prevent int.MaxValue overflow errors Added int.MaxValue overflow tests for Collection and ObservableCollection when invoking RemoveItemsRange API Added additional RemoveRange unit tests to cover when Count is Less than 0 or when Count is 0 Updated RemoveRange overflow tests to check for ArgumentException for new business rules Updated ObservableCollection overflow test to assert ArgumentException Added try-finally block to ObservableCollection to certify that _skipCollectionChanged is always set to false after a collection manipulation in case an exception is thrown in a subclass. Added new test class to test the new rules on the example of a NonNullObservableCollection CollectionChanged events do not fire on RemoveRange if the count == 0 Updated ObservableCollection to only throw the 3 required events when ReplaceItemsRange is invoked. Updated OnChangedEvent methods to check for IList and cast as necessary. Added additional exception handling to reset _skipRaisingEvents bool. Added unit tests to verify event and event parameters are being passed correctly. Added Collection AddRange and InsertRange and added new XUnit tests to cover new APIs Simplified CollectionTests Assertion to use Span instead of calling out each item in the array Added additional RemoveRange unit tests to cover when Count is Less than 0 or when Count is 0 Updated ObservableCollection to only throw the 3 required events when ReplaceItemsRange is invoked. Updated OnChangedEvent methods to check for IList and cast as necessary. Added additional exception handling to reset _skipRaisingEvents bool. Added unit tests to verify event and event parameters are being passed correctly. Updated ReplaceRange event to pass in the OldItems and NewItems to match the event docs Simplified CollectionChanged 'NewItems for InsertItemsRange Updated removedItems to use an array instead of a List Added new OnCollectionChanged overloads to reduce need for additional if checks. Removed stale code Optimized ReplaceItemsRange by simplifying the itemsToReplace which is no an array instead of a List Removed (IList) cast in ReplaceItemsRange when raising CollectionChanged Removed temp array in RemoveRange which decreases memory allocation needed * Removed redudent AsSpan parameter in test code * Removed stale code in test code * Removed redundent Assert.NotNull calls in several tests * Added additional check in InsertRange to verify the input collection.Count is greater than 0 before raising the events * Removed stale code from the `NonNullObservableCollection` test harness * Removed unnecessary whitespace * Renamed new API tests to include the .netcoreapp extension; Updated .Tests.csproj file to only run them when the project is built under .NET core as net standard is the default * Renamed CollectionTests -> CollectionTests.netcoreapp.cs and only run the test if it is a netcoreapp as the new APIs aren't in netstandard yet * Added UAP and UAPAOT build configurations for System.ObjectModel tests * Updated ObservableCollection/Collection tests that use new APIs to be in a partial class with the .netcoreapp.cs extension and existings tests to be in the .cs file. * Added CollectionTestBase as parent class for CollectionTests for the use case where the other tests are ignored in netstandard builds * Adding using statements back in which were failing the build * Moving private classes from the netcoreapp tests to the regular CollectionTests as they were not available in the netstandard CI test run * Added missing using statement for colleciton tests * Added if-block that certifies we have replaced items before raising the Replace Event on ReplaceItemsRange * Removed whitespace in System.Runtime.Tests.csproj * Added negative test case for ReplaceRange when no items are replaced * Fixed issue with failing test --- .../ObjectModel/ObservableCollection.cs | 159 ++++++- .../tests/Configurations.props | 2 + ...rvableCollection_MethodTests.netcoreapp.cs | 269 +++++++++++ .../ObservableCollection_MethodsTest.cs | 2 +- ...n_SkipCollectionChangedTests.netcoreapp.cs | 126 ++++++ .../tests/System.ObjectModel.Tests.csproj | 12 +- src/System.Runtime/ref/System.Runtime.cs | 9 +- .../tests/System.Runtime.Tests.csproj | 5 +- .../ObjectModel/CollectionTests.cs | 13 +- .../ObjectModel/CollectionTests.netcoreapp.cs | 424 ++++++++++++++++++ 10 files changed, 995 insertions(+), 26 deletions(-) create mode 100644 src/System.ObjectModel/tests/ObservableCollection/ObservableCollection_MethodTests.netcoreapp.cs create mode 100644 src/System.ObjectModel/tests/ObservableCollection/ObservableCollection_SkipCollectionChangedTests.netcoreapp.cs create mode 100644 src/System.Runtime/tests/System/Collections/ObjectModel/CollectionTests.netcoreapp.cs diff --git a/src/System.ObjectModel/src/System/Collections/ObjectModel/ObservableCollection.cs b/src/System.ObjectModel/src/System/Collections/ObjectModel/ObservableCollection.cs index f74a2c8c7bef..7dac6ec2f3f7 100644 --- a/src/System.ObjectModel/src/System/Collections/ObjectModel/ObservableCollection.cs +++ b/src/System.ObjectModel/src/System/Collections/ObjectModel/ObservableCollection.cs @@ -27,6 +27,9 @@ public class ObservableCollection : Collection, INotifyCollectionChanged, [NonSerialized] private int _blockReentrancyCount; + [NonSerialized] + private bool _skipRaisingEvents; + /// /// Initializes a new instance of ObservableCollection that is empty and has default initial capacity. /// @@ -121,9 +124,95 @@ protected override void RemoveItem(int index) base.RemoveItem(index); - OnCountPropertyChanged(); - OnIndexerPropertyChanged(); - OnCollectionChanged(NotifyCollectionChangedAction.Remove, removedItem, index); + if (!_skipRaisingEvents) + { + OnCountPropertyChanged(); + OnIndexerPropertyChanged(); + OnCollectionChanged(NotifyCollectionChangedAction.Remove, removedItem, index); + } + } + + /// + /// Called by base class Collection<T> when a count of items is removed from the list; + /// raises a CollectionChanged event to any listeners. + /// + protected override void RemoveItemsRange(int index, int count) + { + CheckReentrancy(); + + T[] removedItems = null; + + bool ignore = _skipRaisingEvents; + if (!ignore) + { + _skipRaisingEvents = true; + + if (count > 0) + { + removedItems = new T[count]; + for (int i = 0; i < count; i++) + { + removedItems[i] = this[index + i]; + } + } + } + + try + { + base.RemoveItemsRange(index, count); + } + finally + { + if (!ignore) + { + _skipRaisingEvents = false; + } + } + + if (count > 0 && !_skipRaisingEvents) + { + OnCountPropertyChanged(); + OnIndexerPropertyChanged(); + OnCollectionChanged(NotifyCollectionChangedAction.Remove, removedItems, index); + } + } + + /// + /// Called by base class Collection<T> when a collection of items is added to list; + /// raises a CollectionChanged event to any listeners. + /// + protected override void ReplaceItemsRange(int index, int count, IEnumerable collection) + { + CheckReentrancy(); + + _skipRaisingEvents = true; + + T[] itemsToReplace = new T[count - index]; + for (int i = index; i < count; i++) + { + itemsToReplace[i] = this[i]; + } + + try + { + base.ReplaceItemsRange(index, count, collection); + } + finally + { + _skipRaisingEvents = false; + } + + if (!_skipRaisingEvents) + { + IList newItems = collection is IList list ? list : new List(collection); + + if (newItems.Count > 0) + { + OnCountPropertyChanged(); + OnIndexerPropertyChanged(); + OnCollectionChanged(NotifyCollectionChangedAction.Replace, itemsToReplace, newItems, index); + } + } } /// @@ -135,9 +224,51 @@ protected override void InsertItem(int index, T item) CheckReentrancy(); base.InsertItem(index, item); - OnCountPropertyChanged(); - OnIndexerPropertyChanged(); - OnCollectionChanged(NotifyCollectionChangedAction.Add, item, index); + if (!_skipRaisingEvents) + { + OnCountPropertyChanged(); + OnIndexerPropertyChanged(); + OnCollectionChanged(NotifyCollectionChangedAction.Add, item, index); + } + } + + /// + /// Called by base class Collection<T> when a collection of items is added to list; + /// raises a CollectionChanged event to any listeners. + /// + protected override void InsertItemsRange(int index, IEnumerable collection) + { + CheckReentrancy(); + + bool ignore = _skipRaisingEvents; + if (!ignore) + { + _skipRaisingEvents = true; + } + + try + { + base.InsertItemsRange(index, collection); + } + finally + { + if (!ignore) + { + _skipRaisingEvents = false; + } + } + + if (!_skipRaisingEvents) + { + IList newItems = collection is IList list ? list : new List(collection); + + if (newItems.Count > 0) + { + OnCountPropertyChanged(); + OnIndexerPropertyChanged(); + OnCollectionChanged(NotifyCollectionChangedAction.Add, newItems, index); + } + } } /// @@ -265,6 +396,14 @@ private void OnCollectionChanged(NotifyCollectionChangedAction action, object it OnCollectionChanged(new NotifyCollectionChangedEventArgs(action, item, index)); } + /// + /// Helper to raise CollectionChanged event to any listeners + /// + private void OnCollectionChanged(NotifyCollectionChangedAction action, IList items, int index) + { + OnCollectionChanged(new NotifyCollectionChangedEventArgs(action, items, index)); + } + /// /// Helper to raise CollectionChanged event to any listeners /// @@ -281,6 +420,14 @@ private void OnCollectionChanged(NotifyCollectionChangedAction action, object ol OnCollectionChanged(new NotifyCollectionChangedEventArgs(action, newItem, oldItem, index)); } + /// + /// Helper to raise CollectionChanged event to any listeners + /// + private void OnCollectionChanged(NotifyCollectionChangedAction action, IList oldItems, IList newItems, int index) + { + OnCollectionChanged(new NotifyCollectionChangedEventArgs(action, newItems, oldItems, index)); + } + /// /// Helper to raise CollectionChanged event with action == Reset to any listeners /// diff --git a/src/System.ObjectModel/tests/Configurations.props b/src/System.ObjectModel/tests/Configurations.props index 2bc19ff4170e..63b0f12fe5de 100644 --- a/src/System.ObjectModel/tests/Configurations.props +++ b/src/System.ObjectModel/tests/Configurations.props @@ -3,6 +3,8 @@ netstandard; netcoreapp; + uap; + uapaot; \ No newline at end of file diff --git a/src/System.ObjectModel/tests/ObservableCollection/ObservableCollection_MethodTests.netcoreapp.cs b/src/System.ObjectModel/tests/ObservableCollection/ObservableCollection_MethodTests.netcoreapp.cs new file mode 100644 index 000000000000..f15d3c3c463f --- /dev/null +++ b/src/System.ObjectModel/tests/ObservableCollection/ObservableCollection_MethodTests.netcoreapp.cs @@ -0,0 +1,269 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Linq; +using Xunit; + +namespace System.Collections.ObjectModel.Tests +{ + public partial class ObservableCollection_MethodTests + { + [Fact] + public static void InsertRange_NotifyCollectionChanged_Beginning_Test() + { + int[] dataToInsert = new int[] { 1, 2, 3, 4, 5 }; + int[] initialData = new int[] { 10, 11, 12, 13 }; + int eventCounter = 0; + ObservableCollection collection = new ObservableCollection(initialData); + collection.CollectionChanged += (o, e) => eventCounter++; + + collection.InsertRange(0, dataToInsert); + + Assert.Equal(dataToInsert.Length + initialData.Length, collection.Count); + Assert.Equal(1, eventCounter); + + int[] collectionAssertion = collection.ToArray(); + Assert.Equal(dataToInsert, collectionAssertion.AsSpan(0, 5).ToArray()); + Assert.Equal(initialData, collectionAssertion.AsSpan(5).ToArray()); + } + + [Fact] + public static void InsertRange_NotifyCollectionChanged_Middle_Test() + { + int[] dataToInsert = new int[] { 1, 2, 3, 4, 5 }; + int[] initialData = new int[] { 10, 11, 12, 13 }; + int eventCounter = 0; + ObservableCollection collection = new ObservableCollection(initialData); + collection.CollectionChanged += (o, e) => eventCounter++; + + collection.InsertRange(2, dataToInsert); + + Assert.Equal(dataToInsert.Length + initialData.Length, collection.Count); + Assert.Equal(1, eventCounter); + + int[] collectionAssertion = collection.ToArray(); + Assert.Equal(initialData.AsSpan(0, 2).ToArray(), collectionAssertion.AsSpan(0, 2).ToArray()); + Assert.Equal(dataToInsert, collectionAssertion.AsSpan(2, 5).ToArray()); + Assert.Equal(initialData.AsSpan(2, 2).ToArray(), collectionAssertion.AsSpan(7, 2).ToArray()); + } + + [Fact] + public static void InsertRange_NotifyCollectionChanged_End_Test() + { + int[] dataToInsert = new int[] { 1, 2, 3, 4, 5 }; + int[] initialData = new int[] { 10, 11, 12, 13 }; + int eventCounter = 0; + ObservableCollection collection = new ObservableCollection(initialData); + collection.CollectionChanged += (o, e) => eventCounter++; + + collection.InsertRange(4, dataToInsert); + + Assert.Equal(dataToInsert.Length + initialData.Length, collection.Count); + Assert.Equal(1, eventCounter); + + int[] collectionAssertion = collection.ToArray(); + Assert.Equal(initialData, collectionAssertion.AsSpan(0, 4).ToArray()); + Assert.Equal(dataToInsert, collectionAssertion.AsSpan(4).ToArray()); + } + + [Fact] + public static void AddRange_NotifyCollectionChanged_Test() + { + int[] dataToInsert = new int[] { 1, 2, 3, 4, 5 }; + int[] initialData = new int[] { 10, 11, 12, 13 }; + int eventCounter = 0; + ObservableCollection collection = new ObservableCollection(initialData); + collection.CollectionChanged += (o, e) => eventCounter++; + + collection.AddRange(dataToInsert); + + Assert.Equal(dataToInsert.Length + initialData.Length, collection.Count); + Assert.Equal(1, eventCounter); + + int[] collectionAssertion = collection.ToArray(); + Assert.Equal(initialData, collectionAssertion.AsSpan(0, 4).ToArray()); + Assert.Equal(dataToInsert, collectionAssertion.AsSpan(4).ToArray()); + } + + [Fact] + public static void AddRange_NotifyCollectionChanged_EventArgs_Test() + { + int[] dataToAdd = new int[] { 1, 2, 3, 4, 5, 6, 7, 8 }; + int[] actualDataAdded = new int[0]; + ObservableCollection collection = new ObservableCollection(); + collection.CollectionChanged += (o, e) => actualDataAdded = e.NewItems.Cast().ToArray(); + + collection.AddRange(dataToAdd); + + Assert.Equal(dataToAdd, actualDataAdded); + } + + [Fact] + public static void InsertRange_NotifyCollectionChanged_EventArgs_Test() + { + int[] dataToAdd = new int[] { 1, 2, 3, 4, 5, 6, 7, 8 }; + int[] actualDataAdded = new int[0]; + ObservableCollection collection = new ObservableCollection(); + collection.CollectionChanged += (o, e) => actualDataAdded = e.NewItems.Cast().ToArray(); + + collection.InsertRange(0, dataToAdd); + + Assert.Equal(dataToAdd, actualDataAdded); + } + + [Fact] + public static void InsertRange_NotifyCollectionChanged_EventArgs_Middle_Test() + { + int[] dataToAdd = new int[] { 1, 2, 3, 4, 5, 6, 7, 8 }; + int[] actualDataAdded = new int[0]; + ObservableCollection collection = new ObservableCollection(); + for (int i = 0; i < 4; i++) + { + collection.Add(i); + } + + collection.CollectionChanged += (o, e) => actualDataAdded = e.NewItems.Cast().ToArray(); + collection.InsertRange(2, dataToAdd); + + Assert.Equal(dataToAdd, actualDataAdded); + } + + [Fact] + public static void InsertRange_NotifyCollectionChanged_EventArgs_End_Test() + { + int[] dataToAdd = new int[] { 1, 2, 3, 4, 5, 6, 7, 8 }; + int[] actualDataAdded = new int[0]; + ObservableCollection collection = new ObservableCollection(); + for (int i = 0; i < 4; i++) + { + collection.Add(i); + } + + collection.CollectionChanged += (o, e) => actualDataAdded = e.NewItems.Cast().ToArray(); + collection.InsertRange(4, dataToAdd); + + Assert.Equal(dataToAdd, actualDataAdded); + } + + [Fact] + public static void RemoveRange_NotifyCollectionChanged_FirstTwo_Test() + { + int[] initialData = new int[] { 10, 11, 12, 13 }; + int itemsToRemove = 2; + int eventCounter = 0; + ObservableCollection collection = new ObservableCollection(initialData); + collection.CollectionChanged += (o, e) => eventCounter++; + + collection.RemoveRange(0, itemsToRemove); + + Assert.Equal(initialData.Length - itemsToRemove, collection.Count); + Assert.Equal(1, eventCounter); + Assert.Equal(initialData.AsSpan(2).ToArray(), collection.ToArray()); + } + + [Fact] + public static void RemoveRange_NotifyCollectionChanged_MiddleTwo_Test() + { + int[] initialData = new int[] { 10, 11, 12, 13 }; + int itemsToRemove = 2; + int eventCounter = 0; + ObservableCollection collection = new ObservableCollection(initialData); + collection.CollectionChanged += (o, e) => eventCounter++; + + collection.RemoveRange(1, itemsToRemove); + + Assert.Equal(initialData.Length - itemsToRemove, collection.Count); + Assert.Equal(1, eventCounter); + Assert.Equal(initialData[0], collection[0]); + Assert.Equal(initialData[3], collection[1]); + } + + [Fact] + public static void RemoveRange_NotifyCollectionChanged_LastTwo_Test() + { + int[] initialData = new int[] { 10, 11, 12, 13 }; + int itemsToRemove = 2; + int eventCounter = 0; + ObservableCollection collection = new ObservableCollection(initialData); + collection.CollectionChanged += (o, e) => eventCounter++; + + collection.RemoveRange(2, itemsToRemove); + + Assert.Equal(initialData.Length - itemsToRemove, collection.Count); + Assert.Equal(1, eventCounter); + Assert.Equal(initialData.AsSpan(0, 2).ToArray(), collection.ToArray()); + } + + [Fact] + public static void RemoveRange_NotifyCollectionChanged_IntMaxValueOverflow_Test() + { + int count = 500; + ObservableCollection collection = new ObservableCollection(); + for (int i = 0; i < count; i++) + { + collection.Add(i); + } + + Assert.Throws(() => collection.RemoveRange(collection.Count - 2, int.MaxValue)); + } + + [Fact] + public static void RemoveRange_NotifyCollectionChanged_EventArgs_IndexOfZero_Test() + { + int[] initialData = new int[] { 1, 2, 3, 4, 5, 6, 7, 8 }; + int[] actualDataRemoved = new int[0]; + int numberOfItemsToRemove = 4; + ObservableCollection collection = new ObservableCollection(); + foreach (int item in initialData) + { + collection.Add(item); + } + + collection.CollectionChanged += (o, e) => actualDataRemoved = e.OldItems.Cast().ToArray(); + collection.RemoveRange(0, numberOfItemsToRemove); + + Assert.Equal(initialData.Length - numberOfItemsToRemove, collection.Count); + Assert.Equal(initialData.AsSpan(0, numberOfItemsToRemove).ToArray(), actualDataRemoved); + } + + [Fact] + public static void RemoveRange_NotifyCollectionChanged_EventArgs_IndexMiddle_Test() + { + int[] initialData = new int[] { 1, 2, 3, 4, 5, 6, 7, 8 }; + int[] actualDataRemoved = new int[0]; + int numberOfItemsToRemove = 4; + int startIndex = 3; + ObservableCollection collection = new ObservableCollection(); + foreach (int item in initialData) + { + collection.Add(item); + } + + collection.CollectionChanged += (o, e) => actualDataRemoved = e.OldItems.Cast().ToArray(); + collection.RemoveRange(startIndex, numberOfItemsToRemove); + + Assert.Equal(initialData.Length - numberOfItemsToRemove, collection.Count); + Assert.Equal(initialData.AsSpan(startIndex, numberOfItemsToRemove).ToArray(), actualDataRemoved); + } + + [Fact] + public static void ReplaceRange_NotifyCollectionChanged_Test() + { + int[] initialData = new int[] { 10, 11, 12, 13 }; + int[] dataToReplace = new int[] { 3, 8 }; + int eventCounter = 0; + ObservableCollection collection = new ObservableCollection(initialData); + collection.CollectionChanged += (o, e) => eventCounter++; + + collection.ReplaceRange(0, 2, dataToReplace); + + Assert.Equal(initialData.Length, collection.Count); + Assert.Equal(1, eventCounter); + + int[] collectionAssertion = collection.ToArray(); + Assert.Equal(dataToReplace, collectionAssertion.AsSpan(0, 2).ToArray()); + Assert.Equal(initialData.AsSpan(2, 2).ToArray(), collectionAssertion.AsSpan(2, 2).ToArray()); + } + } +} diff --git a/src/System.ObjectModel/tests/ObservableCollection/ObservableCollection_MethodsTest.cs b/src/System.ObjectModel/tests/ObservableCollection/ObservableCollection_MethodsTest.cs index 6f03a97cc190..bb291a98a3e4 100644 --- a/src/System.ObjectModel/tests/ObservableCollection/ObservableCollection_MethodsTest.cs +++ b/src/System.ObjectModel/tests/ObservableCollection/ObservableCollection_MethodsTest.cs @@ -14,7 +14,7 @@ namespace System.Collections.ObjectModel.Tests /// that the CollectionChanged events and eventargs are fired and populated /// properly. /// - public static class PublicMethodsTest + public partial class PublicMethodsTest { /// /// Tests that is possible to Add an item to the collection. diff --git a/src/System.ObjectModel/tests/ObservableCollection/ObservableCollection_SkipCollectionChangedTests.netcoreapp.cs b/src/System.ObjectModel/tests/ObservableCollection/ObservableCollection_SkipCollectionChangedTests.netcoreapp.cs new file mode 100644 index 000000000000..9a9b1c6f2120 --- /dev/null +++ b/src/System.ObjectModel/tests/ObservableCollection/ObservableCollection_SkipCollectionChangedTests.netcoreapp.cs @@ -0,0 +1,126 @@ +using System.Collections.Generic; +using System.Collections.ObjectModel; +using Xunit; + +namespace System.ObjectModel.Tests.ObservableCollection +{ + public class ObservableCollection_SkipCollectionChangedTests + { + [Fact] + public void SkipCollectionChanged_AddRange_Test() + { + int collectionChangedCounter = 0; + NonNullObservableCollection collection = new NonNullObservableCollection(); + collection.Add("1"); + collection.Add("2"); + collection.Add("3"); + collection.CollectionChanged += (s, e) => collectionChangedCounter++; + + Assert.Throws(() => collection.AddRange(new string[1])); + Assert.Equal(0, collectionChangedCounter); + + collection.Add("4"); + Assert.Equal(1, collectionChangedCounter); + } + + [Fact] + public void SkipCollectionChanged_InsertRange_Test() + { + int collectionChangedCounter = 0; + NonNullObservableCollection collection = new NonNullObservableCollection(); + collection.Add("1"); + collection.Add("2"); + collection.Add("3"); + collection.CollectionChanged += (s, e) => collectionChangedCounter++; + + Assert.Throws(() => collection.InsertRange(0, new string[1])); + Assert.Equal(0, collectionChangedCounter); + + collection.Add("4"); + Assert.Equal(1, collectionChangedCounter); + } + + [Fact] + public void SkipCollectionChanged_RemoveRange_Test() + { + int collectionChangedCounter = 0; + NonNullObservableCollection collection = new NonNullObservableCollection(); + collection.Add("1"); + collection.Add("2"); + collection.Add("3"); + collection.CollectionChanged += (s, e) => collectionChangedCounter++; + + collection.RemoveRange(0, 2); + Assert.Equal(1, collectionChangedCounter); + + collection.Add("1"); + Assert.Equal(2, collectionChangedCounter); + } + + [Fact] + public void SkipCollectionChanged_RemoveRange_NoEventsRaised_Test() + { + int collectionChangedCounter = 0; + NonNullObservableCollection collection = new NonNullObservableCollection(); + collection.Add("1"); + collection.Add("2"); + collection.Add("3"); + collection.CollectionChanged += (s, e) => collectionChangedCounter++; + + collection.RemoveRange(0, 0); + + Assert.Equal(0, collectionChangedCounter); + } + + [Fact] + public void SkipCollectionChanged_ReplaceRange_Test() + { + int collectionChangedCounter = 0; + NonNullObservableCollection collection = new NonNullObservableCollection(); + collection.Add("1"); + collection.Add("2"); + collection.Add("3"); + collection.CollectionChanged += (s, e) => collectionChangedCounter++; + + Assert.Throws(() => collection.ReplaceRange(0, 2, new string[1])); + Assert.Equal(0, collectionChangedCounter); + + collection.Add("1"); + Assert.Equal(1, collectionChangedCounter); + } + + [Fact] + public void SkipCollectionChanged_ReplaceRange_Empty_Test() + { + int collectionChangedCounter = 0; + NonNullObservableCollection collection = new NonNullObservableCollection(); + collection.Add("1"); + collection.Add("2"); + collection.Add("3"); + collection.CollectionChanged += (s, e) => collectionChangedCounter++; + + collection.ReplaceRange(0, 0, new string[0]); + Assert.Equal(0, collectionChangedCounter); + + collection.Add("1"); + Assert.Equal(1, collectionChangedCounter); + } + + public class NonNullObservableCollection : ObservableCollection + { + + public NonNullObservableCollection() : base() { } + public NonNullObservableCollection(List list) : base(list) { } + + protected override void InsertItem(int index, T item) + { + if (item == null) + { + throw new ArgumentNullException(); + } + + base.InsertItem(index, item); + } + } + } +} diff --git a/src/System.ObjectModel/tests/System.ObjectModel.Tests.csproj b/src/System.ObjectModel/tests/System.ObjectModel.Tests.csproj index 7682226ac131..89419f88be3d 100644 --- a/src/System.ObjectModel/tests/System.ObjectModel.Tests.csproj +++ b/src/System.ObjectModel/tests/System.ObjectModel.Tests.csproj @@ -22,6 +22,10 @@ Common\System\CollectionsIDictionaryTest.cs + + + + @@ -32,9 +36,6 @@ - - - @@ -43,17 +44,18 @@ + + - Common\System\Runtime\Serialization\Formatters\BinaryFormatterHelpers.cs - \ No newline at end of file + diff --git a/src/System.Runtime/ref/System.Runtime.cs b/src/System.Runtime/ref/System.Runtime.cs index 2646e062652b..694759465fd0 100644 --- a/src/System.Runtime/ref/System.Runtime.cs +++ b/src/System.Runtime/ref/System.Runtime.cs @@ -4034,6 +4034,7 @@ public Collection(System.Collections.Generic.IList list) { } bool System.Collections.IList.IsReadOnly { get { throw null; } } object System.Collections.IList.this[int index] { get { throw null; } set { } } public void Add(T item) { } + public void AddRange(System.Collections.Generic.IEnumerable collection) { } public void Clear() { } protected virtual void ClearItems() { } public bool Contains(T item) { throw null; } @@ -4042,9 +4043,15 @@ public void CopyTo(T[] array, int index) { } public int IndexOf(T item) { throw null; } public void Insert(int index, T item) { } protected virtual void InsertItem(int index, T item) { } - public bool Remove(T item) { throw null; } + protected virtual void InsertItemsRange(int index, System.Collections.Generic.IEnumerable collection) { } + public void InsertRange(int index, System.Collections.Generic.IEnumerable collection) { } + public bool Remove(T item) { throw null; } public void RemoveAt(int index) { } protected virtual void RemoveItem(int index) { } + protected virtual void RemoveItemsRange(int index, int count) { } + public void RemoveRange(int index, int count) { } + protected virtual void ReplaceItemsRange(int index, int count, System.Collections.Generic.IEnumerable collection) { } + public void ReplaceRange(int index, int count, System.Collections.Generic.IEnumerable collection) { } protected virtual void SetItem(int index, T item) { } void System.Collections.ICollection.CopyTo(System.Array array, int index) { } System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } diff --git a/src/System.Runtime/tests/System.Runtime.Tests.csproj b/src/System.Runtime/tests/System.Runtime.Tests.csproj index 812406b043d9..53a45b1ba1de 100644 --- a/src/System.Runtime/tests/System.Runtime.Tests.csproj +++ b/src/System.Runtime/tests/System.Runtime.Tests.csproj @@ -72,6 +72,7 @@ + @@ -155,7 +156,6 @@ - @@ -234,6 +234,7 @@ + @@ -271,7 +272,7 @@ - + diff --git a/src/System.Runtime/tests/System/Collections/ObjectModel/CollectionTests.cs b/src/System.Runtime/tests/System/Collections/ObjectModel/CollectionTests.cs index 4e1fb2f82eb0..0961f2b8812f 100644 --- a/src/System.Runtime/tests/System/Collections/ObjectModel/CollectionTests.cs +++ b/src/System.Runtime/tests/System/Collections/ObjectModel/CollectionTests.cs @@ -1,22 +1,13 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections; using System.Collections.Generic; -using System.Collections.ObjectModel; using Xunit; namespace System.Collections.ObjectModel.Tests { - /// - /// Since is just a wrapper base class around an , - /// we just verify that the underlying list is what we expect, validate that the calls which - /// we expect are forwarded to the underlying list, and verify that the exceptions we expect - /// are thrown. - /// - public class CollectionTests : CollectionTestBase + public partial class CollectionTests : CollectionTestBase { private static readonly Collection s_empty = new Collection(); diff --git a/src/System.Runtime/tests/System/Collections/ObjectModel/CollectionTests.netcoreapp.cs b/src/System.Runtime/tests/System/Collections/ObjectModel/CollectionTests.netcoreapp.cs new file mode 100644 index 000000000000..940af6773626 --- /dev/null +++ b/src/System.Runtime/tests/System/Collections/ObjectModel/CollectionTests.netcoreapp.cs @@ -0,0 +1,424 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; +using System.Collections.Generic; +using System.Linq; +using Xunit; + +namespace System.Collections.ObjectModel.Tests +{ + /// + /// Since is just a wrapper base class around an , + /// we just verify that the underlying list is what we expect, validate that the calls which + /// we expect are forwarded to the underlying list, and verify that the exceptions we expect + /// are thrown. + /// + public partial class CollectionTests : CollectionTestBase + { + [Fact] + public void Collection_AddRange_ToEmpty_Test() + { + int[] expected = new[] { 1, 2, 3, 4 }; + Collection collection = new Collection(); + + collection.AddRange(expected); + + Assert.NotNull(collection); + Assert.Equal(expected.Length, collection.Count); + Assert.Equal(expected, collection.ToArray()); + } + + [Fact] + public void Collection_AddRange_ToExisting_Test() + { + int[] initial = new int[] { 1, 2, 3, 4 }; + int[] dataToInsert = new int[] { 5, 6, 7, 8 }; + Collection collection = new Collection(); + for (int i = 0; i < initial.Length; i++) + collection.Add(initial[i]); + + collection.AddRange(dataToInsert); + + Assert.NotNull(collection); + Assert.Equal(initial.Length + dataToInsert.Length, collection.Count); + + int[] collectionAssertion = collection.ToArray(); + Assert.Equal(initial, collectionAssertion.AsSpan(0, 4).ToArray()); + Assert.Equal(dataToInsert, collectionAssertion.AsSpan(4, 4).ToArray()); + } + + [Fact] + public void Collection_AddRange_Empty_Test() + { + int[] expected = new int[0]; + Collection collection = new Collection(); + + collection.AddRange(expected); + + Assert.NotNull(collection); + Assert.Equal(expected.Length, collection.Count); + } + + [Fact] + public void Collection_AddRange_Null_Test() + { + Collection collection = new Collection(); + Exception ex = Assert.Throws(() => collection.AddRange(null)); + } + + [Fact] + public void Collection_AddRange_ReadOnly_Test() + { + int[] expected = new int[] { 1, 2, 3, 4 }; + int[] baseCollection = new int[] { 5, 6, 7, 8 }; + Collection collection = new Collection(baseCollection); + + Exception ex = Assert.Throws(() => collection.AddRange(expected)); + } + + [Fact] + public void Collection_InsertRange_Beginning_Test() + { + int[] expected = new int[] { 1, 2, 3, 4, 5 }; + int[] originalCollection = new int[] { 10, 11, 12, 13 }; + List baseCollection = new List(originalCollection); + + int expectedLength = expected.Length + originalCollection.Length; + Collection collection = new Collection(baseCollection); + + collection.InsertRange(0, expected); + + Assert.NotNull(collection); + Assert.Equal(expectedLength, collection.Count); + + int[] collectionAssertion = collection.ToArray(); + Assert.Equal(expected, collectionAssertion.AsSpan(0, 5).ToArray()); + Assert.Equal(originalCollection, collectionAssertion.AsSpan(5, 4).ToArray()); + } + + [Fact] + public void Collection_InsertRange_End_Test() + { + int[] expected = new int[] { 1, 2, 3, 4, 5 }; + int[] originalCollection = new int[] { 10, 11, 12, 13 }; + List baseCollection = new List(originalCollection); + + int expectedLength = expected.Length + originalCollection.Length; + Collection collection = new Collection(baseCollection); + + collection.InsertRange(expected.Length - 1, expected); + + Assert.NotNull(collection); + Assert.Equal(expectedLength, collection.Count); + + int[] collectionAssertion = collection.ToArray(); + Assert.Equal(originalCollection, collectionAssertion.AsSpan(0, 4).ToArray()); + Assert.Equal(expected, collectionAssertion.AsSpan(4, 5).ToArray()); + } + + [Fact] + public void Collection_InsertRange_Middle_Test() + { + int[] expected = new int[] { 1, 2, 3, 4, 5 }; + int[] originalCollection = new int[] { 10, 11, 12, 13 }; + List baseCollection = new List(originalCollection); + + int expectedLength = expected.Length + originalCollection.Length; + Collection collection = new Collection(baseCollection); + + collection.InsertRange(2, expected); + + Assert.NotNull(collection); + Assert.Equal(expectedLength, collection.Count); + + int[] collectionAssertion = collection.ToArray(); + Assert.Equal(originalCollection.AsSpan(0, 2).ToArray(), collectionAssertion.AsSpan(0, 2).ToArray()); + Assert.Equal(expected, collectionAssertion.AsSpan(2, 5).ToArray()); + Assert.Equal(originalCollection.AsSpan(2, 2).ToArray(), collectionAssertion.AsSpan(7, 2).ToArray()); + } + + [Fact] + public void Collection_InsertRange_Empty_Test() + { + List baseCollection = new List(new[] { 10, 11, 12, 13 }); + Collection collection = new Collection(baseCollection); + + collection.InsertRange(0, new int[0]); + + Assert.NotNull(collection); + Assert.Equal(baseCollection.Count, collection.Count); + Assert.Equal(baseCollection, collection.ToArray()); + } + + [Fact] + public void Collection_InsertRange_Null_Test() + { + Collection collection = new Collection(); + Exception ex = Assert.Throws(() => collection.InsertRange(0, null)); + } + + [Fact] + public void Collection_InsertRange_ReadOnly_Test() + { + int[] expected = new int[] { 1, 2, 3, 4 }; + int[] baseCollection = new int[] { 5, 6, 7, 8 }; + Collection collection = new Collection(baseCollection); + + Exception ex = Assert.Throws(() => collection.InsertRange(0, expected)); + } + + [Fact] + public void Collection_InsertRange_IndexLessThan0_Test() + { + int[] expected = new int[] { 1, 2, 3, 4 }; + Collection collection = new Collection(); + Exception ex = Assert.Throws(() => collection.InsertRange(-1, expected)); + } + + [Fact] + public void Collection_InsertRange_IndexGreaterThanCount_Test() + { + int[] expected = new int[] { 1, 2, 3, 4 }; + Collection collection = new Collection(); + Exception ex = Assert.Throws(() => collection.InsertRange(10, expected)); + } + + [Fact] + public void Collection_RemoveRange_Overflow_Test() + { + Collection collection = new Collection(); + collection.Add(1); + collection.Add(2); + collection.Add(3); + + Assert.Throws(() => collection.RemoveRange(0, 4)); + } + + [Fact] + public void Collection_RemoveRange_IntMaxValueOverflow_Test() + { + var count = 500; + Collection collection = new Collection(); + for (int i = 0; i < count; i++) + { + collection.Add(i); + } + + Assert.Throws(() => collection.RemoveRange(collection.Count - 2, int.MaxValue)); + } + + [Fact] + public void Collection_RemoveRange_CountIsZero_Test() + { + int[] expected = new int[] { 1, 2, 3, 4, 5 }; + Collection collection = new Collection(); + for (int i = 0; i < expected.Length; i++) + { + collection.Add(expected[i]); + } + + collection.RemoveRange(0, 0); + + Assert.NotNull(collection); + Assert.Equal(expected.Length, collection.Count); + Assert.Equal(expected, collection.ToArray()); + } + + [Fact] + public void Collection_RemoveRange_CountIsLessThanZero_Test() + { + Collection collection = new Collection(); + collection.Add(1); + collection.Add(2); + + Assert.Throws(() => collection.RemoveRange(0, -1)); + } + + [Fact] + public void Collection_RemoveRange_All_Test() + { + Collection collection = new Collection(); + collection.Add(1); + collection.Add(2); + collection.Add(3); + + collection.RemoveRange(0, 3); + + Assert.NotNull(collection); + Assert.Equal(0, collection.Count); + } + + [Fact] + public void Collection_RemoveRange_FirstTwoItems_Test() + { + Collection collection = new Collection(); + collection.Add(1); + collection.Add(2); + collection.Add(3); + + collection.RemoveRange(0, 2); + + Assert.NotNull(collection); + Assert.Equal(1, collection.Count); + Assert.Equal(3, collection[0]); + } + + [Fact] + public void Collection_RemoveRange_LastTwoItems_Test() + { + Collection collection = new Collection(); + collection.Add(1); + collection.Add(2); + collection.Add(3); + + collection.RemoveRange(1, 2); + + Assert.NotNull(collection); + Assert.Equal(1, collection.Count); + Assert.Equal(1, collection[0]); + } + + [Fact] + public void Collection_RemoveRange_ZeroItems_Test() + { + Collection collection = new Collection(); + collection.Add(1); + collection.Add(2); + collection.Add(3); + + collection.RemoveRange(0, 0); + + Assert.NotNull(collection); + Assert.Equal(3, collection.Count); + Assert.Equal(1, collection[0]); + Assert.Equal(2, collection[1]); + Assert.Equal(3, collection[2]); + } + + [Fact] + public void Collection_RemoveRange_IndexLessThanZero_Test() + { + Collection collection = new Collection(); + collection.Add(1); + collection.Add(2); + collection.Add(3); + + AssertExtensions.Throws("index", () => collection.RemoveRange(-1, 3)); + } + + [Fact] + public void Collection_RemoveRange_IndexGreaterThanCollection_Test() + { + Collection collection = new Collection(); + collection.Add(1); + collection.Add(2); + collection.Add(3); + + AssertExtensions.Throws("index", () => collection.RemoveRange(4, 3)); + } + + [Fact] + public void Collection_RemoveRange_ReadOnly_Test() + { + Collection collection = new Collection(new int[] { 1, 2, 3 }); + + Assert.Throws(() => collection.RemoveRange(0, 2)); + } + + [Fact] + public void Collection_ReplaceRange_FirstTwo_Test() + { + int[] initial = new int[] { 1, 2, 3, 4 }; + int[] replace = new int[] { 5, 6, 7, 8 }; + Collection collection = new Collection(); + foreach (var item in initial) + collection.Add(item); + + collection.ReplaceRange(0, 2, replace); + + Assert.NotNull(collection); + Assert.Equal(initial.Length + 2, collection.Count); + + int[] collectionAssertion = collection.ToArray(); + Assert.Equal(replace, collectionAssertion.AsSpan(0, 4).ToArray()); + Assert.Equal(initial.AsSpan(2, 2).ToArray(), collectionAssertion.AsSpan(4, 2).ToArray()); + } + + [Fact] + public void Collection_ReplaceRange_LastTwo_Test() + { + int[] initial = new int[] { 1, 2, 3, 4 }; + int[] replace = new int[] { 5, 6, 7, 8 }; + Collection collection = new Collection(); + foreach (var item in initial) + collection.Add(item); + + collection.ReplaceRange(2, 2, replace); + + Assert.NotNull(collection); + Assert.Equal(initial.Length + 2, collection.Count); + + int[] collectionAssertion = collection.ToArray(); + Assert.Equal(initial.AsSpan(0, 2).ToArray(), collectionAssertion.AsSpan(0, 2).ToArray()); + Assert.Equal(replace.AsSpan(0, 4).ToArray(), collectionAssertion.AsSpan(2, 4).ToArray()); + } + + [Fact] + public void Collection_ReplaceRange_MiddleTwo_Test() + { + int[] initial = new int[] { 1, 2, 3, 4 }; + int[] replace = new int[] { 5, 6, 7, 8 }; + Collection collection = new Collection(); + foreach (var item in initial) + collection.Add(item); + + collection.ReplaceRange(1, 2, replace); + + Assert.NotNull(collection); + Assert.Equal(initial.Length + 2, collection.Count); + + Assert.Equal(initial[0], collection[0]); + Assert.Equal(replace, collection.ToArray().AsSpan(1, 4).ToArray()); + Assert.Equal(initial[3], collection[5]); + } + + [Fact] + public void Collection_ReplaceRange_NullCollection_Test() + { + Collection collection = new Collection(); + collection.Add(1); + collection.Add(2); + + Assert.Throws(() => collection.ReplaceRange(0, 2, null)); + } + + [Fact] + public void Collection_ReplaceRange_ReadOnly_Test() + { + Collection collection = new Collection(new int[] { 1, 2, 3 }); + Assert.Throws(() => collection.ReplaceRange(0, 2, new int[] { 4, 5 })); + } + + [Fact] + public void Collection_ReplaceRange_IndexLessThanZero_Test() + { + Collection collection = new Collection(); + collection.Add(1); + collection.Add(2); + + AssertExtensions.Throws("index", () => collection.ReplaceRange(-2, 2, new int[] { 1, 2 })); + } + + [Fact] + public void Collection_ReplaceRange_IndexGreaterThanCount_Test() + { + Collection collection = new Collection(); + collection.Add(1); + collection.Add(2); + + AssertExtensions.Throws("index", () => collection.ReplaceRange(4, 2, new int[] { 1, 2 })); + } + } +} From 419a1fe5da1698ea3a380166ab70b11ab37dbde0 Mon Sep 17 00:00:00 2001 From: Stephen Toub Date: Thu, 2 May 2019 00:12:02 -0400 Subject: [PATCH 164/607] Disable GetAsync_UnicodeHostName_SuccessStatusCodeInResponse test --- .../tests/FunctionalTests/HttpClientHandlerTest.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.cs b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.cs index fdf911255269..eaf207ff5dc2 100644 --- a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.cs +++ b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.cs @@ -1585,6 +1585,7 @@ await server.AcceptConnectionSendCustomResponseAndCloseAsync( }); } + [ActiveIssue(37352)] [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, ".NET Framework currently does not allow unicode in DNS names")] [OuterLoop("Uses external server")] [Fact] From b57618e6d1caa03c809e343885f06a5b0791b2c2 Mon Sep 17 00:00:00 2001 From: Dan Moseley Date: Wed, 1 May 2019 21:14:26 -0700 Subject: [PATCH 165/607] Typos etc (#37349) --- src/Common/src/CoreLib/System/IO/PathHelper.Windows.cs | 2 +- .../RuntimeBinder/Semantics/ImplicitConversion.cs | 2 +- .../tests/System/Data/DataColumnCollectionTest.cs | 2 +- .../tests/System/Data/DataRowCollectionTest.cs | 2 +- .../tests/System/Data/DataSetReadXmlSchemaTest.cs | 2 +- .../tests/System/Data/DataTableTest.cs | 1 - .../tests/System/Data/DataViewManagerTest.cs | 2 +- .../tests/System/Data/ForeignKeyConstraintTest.cs | 2 +- .../tests/System/Data/SqlTypes/SqlDecimalTest.cs | 2 +- .../src/System/Drawing/SystemIcons.Unix.cs | 3 --- .../tests/mono/System.Drawing/GraphicsTests.cs | 2 +- .../tests/PortedCommon/IOServices.cs | 2 +- .../tests/SerialPort/Read_char_int_int.cs | 2 +- .../tests/ParsersAndFormatters/TestData.cs | 2 +- .../tests/KeyInfoNodeTest.cs | 2 +- .../tests/KeyInfoTest.cs | 2 +- .../tests/SignedXmlTest.cs | 10 +++++----- .../tests/XmlDsigBase64TransformTest.cs | 2 +- .../tests/XmlDsigXPathTransformTest.cs | 2 +- .../tests/XmlDsigXsltTransformTest.cs | 2 +- 20 files changed, 22 insertions(+), 26 deletions(-) diff --git a/src/Common/src/CoreLib/System/IO/PathHelper.Windows.cs b/src/Common/src/CoreLib/System/IO/PathHelper.Windows.cs index f494412a52f2..83618cfa13c0 100644 --- a/src/Common/src/CoreLib/System/IO/PathHelper.Windows.cs +++ b/src/Common/src/CoreLib/System/IO/PathHelper.Windows.cs @@ -130,7 +130,7 @@ internal static int PrependDevicePathChars(ref ValueStringBuilder content, bool internal static string TryExpandShortFileName(ref ValueStringBuilder outputBuilder, string? originalPath) { // We guarantee we'll expand short names for paths that only partially exist. As such, we need to find the part of the path that actually does exist. To - // avoid allocating like crazy we'll create only one input array and modify the contents with embedded nulls. + // avoid allocating a lot we'll create only one input array and modify the contents with embedded nulls. Debug.Assert(!PathInternal.IsPartiallyQualified(outputBuilder.AsSpan()), "should have resolved by now"); diff --git a/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/ImplicitConversion.cs b/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/ImplicitConversion.cs index 17269e40d045..2005b5b529c7 100644 --- a/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/ImplicitConversion.cs +++ b/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/ImplicitConversion.cs @@ -305,7 +305,7 @@ private bool BindNubConversion(NullableType nubDst) if (_typeSrc is NullType) { // If we have the constant null, generate it as a default value of T?. If we have - // some crazy expression which has been determined to be always null, like (null??null) + // some wacky expression which has been determined to be always null, like (null??null) // keep it in its expression form and transform it in the nullable rewrite pass. if (_needsExprDest) { diff --git a/src/System.Data.Common/tests/System/Data/DataColumnCollectionTest.cs b/src/System.Data.Common/tests/System/Data/DataColumnCollectionTest.cs index 0f8e6c5804f5..cbedf8bb93af 100644 --- a/src/System.Data.Common/tests/System/Data/DataColumnCollectionTest.cs +++ b/src/System.Data.Common/tests/System/Data/DataColumnCollectionTest.cs @@ -358,7 +358,7 @@ public void CanRemove() DataColumn C = new DataColumn("test1"); Cols.Add(); - // LAMESPEC: MSDN says that if C doesn't belong to Cols + // MSDN says that if C doesn't belong to Cols // Exception is thrown. Assert.False(Cols.CanRemove(C)); diff --git a/src/System.Data.Common/tests/System/Data/DataRowCollectionTest.cs b/src/System.Data.Common/tests/System/Data/DataRowCollectionTest.cs index dd36ef702542..e2d73af035a1 100644 --- a/src/System.Data.Common/tests/System/Data/DataRowCollectionTest.cs +++ b/src/System.Data.Common/tests/System/Data/DataRowCollectionTest.cs @@ -206,7 +206,7 @@ public void Add() } catch (ArgumentException e) { - // LAMESPEC: MSDN says this exception is InvalidCastException + // MSDN says this exception is InvalidCastException // Assert.Equal (typeof (ArgumentException), e.GetType ()); } diff --git a/src/System.Data.Common/tests/System/Data/DataSetReadXmlSchemaTest.cs b/src/System.Data.Common/tests/System/Data/DataSetReadXmlSchemaTest.cs index 5cf602208eb2..3c602452544c 100644 --- a/src/System.Data.Common/tests/System/Data/DataSetReadXmlSchemaTest.cs +++ b/src/System.Data.Common/tests/System/Data/DataSetReadXmlSchemaTest.cs @@ -365,7 +365,7 @@ public void ElementHasIdentityConstraint() "; // Constraints on DataSet element. - // Note that in xs:key xpath is crazy except for the last step + // Note that in xs:key xpath is unusual except for the last step string xs = string.Format(xsbase, constraints, string.Empty, string.Empty); var ds = new DataSet(); ds.ReadXmlSchema(new StringReader(xs)); diff --git a/src/System.Data.Common/tests/System/Data/DataTableTest.cs b/src/System.Data.Common/tests/System/Data/DataTableTest.cs index 2aa4d1308c78..f02839dde342 100644 --- a/src/System.Data.Common/tests/System/Data/DataTableTest.cs +++ b/src/System.Data.Common/tests/System/Data/DataTableTest.cs @@ -699,7 +699,6 @@ public void SelectRelations() /* try { - // FIXME: LAMESPEC: Why the exception is thrown why... why... Mom.Select ("Child.Name = 'Jack'"); Assert.False(true); } catch (Exception e) { diff --git a/src/System.Data.Common/tests/System/Data/DataViewManagerTest.cs b/src/System.Data.Common/tests/System/Data/DataViewManagerTest.cs index a19b8c742fbd..f8d706a8d4f5 100644 --- a/src/System.Data.Common/tests/System/Data/DataViewManagerTest.cs +++ b/src/System.Data.Common/tests/System/Data/DataViewManagerTest.cs @@ -69,7 +69,7 @@ public void Ctor() // text node is not rejected (ignored). // RowFilter is not examined. m.DataViewSettingCollectionString = "blah"; - // LAMESPEC: MS.NET ignores ApplyDefaultSort. + // MS.NET ignores ApplyDefaultSort. // Assert.Equal (@"", m.DataViewSettingCollectionString); } diff --git a/src/System.Data.Common/tests/System/Data/ForeignKeyConstraintTest.cs b/src/System.Data.Common/tests/System/Data/ForeignKeyConstraintTest.cs index e00599cc359d..ee605fe8a392 100644 --- a/src/System.Data.Common/tests/System/Data/ForeignKeyConstraintTest.cs +++ b/src/System.Data.Common/tests/System/Data/ForeignKeyConstraintTest.cs @@ -220,7 +220,7 @@ public void TestCtor5() table2.Constraints.Add(fkc); throw new ApplicationException("An Exception was expected"); } - // LAMESPEC : spec says InvalidConstraintException but throws this + // spec says InvalidConstraintException but throws this catch (NullReferenceException) { } diff --git a/src/System.Data.Common/tests/System/Data/SqlTypes/SqlDecimalTest.cs b/src/System.Data.Common/tests/System/Data/SqlTypes/SqlDecimalTest.cs index a44caa49273e..b93038cae053 100644 --- a/src/System.Data.Common/tests/System/Data/SqlTypes/SqlDecimalTest.cs +++ b/src/System.Data.Common/tests/System/Data/SqlTypes/SqlDecimalTest.cs @@ -420,7 +420,7 @@ public void Conversions() } // ToSqlInt32 () - // LAMESPEC: 6464.6464 --> 64646464 ??? with windows + // 6464.6464 --> 64646464 ??? with windows // MS.NET seems to return the first 32 bit integer (i.e. // Data [0]) but we don't have to follow such stupidity. // Assert.Equal ((int)64646464, Test1.ToSqlInt32 ().Value); diff --git a/src/System.Drawing.Common/src/System/Drawing/SystemIcons.Unix.cs b/src/System.Drawing.Common/src/System/Drawing/SystemIcons.Unix.cs index b9108ef63252..d08a0dd2cc9c 100644 --- a/src/System.Drawing.Common/src/System/Drawing/SystemIcons.Unix.cs +++ b/src/System.Drawing.Common/src/System/Drawing/SystemIcons.Unix.cs @@ -33,9 +33,6 @@ namespace System.Drawing { - - // LAME: I don't see why the "old" (win 2.x) names were exposed in the fx :| - public static class SystemIcons { diff --git a/src/System.Drawing.Common/tests/mono/System.Drawing/GraphicsTests.cs b/src/System.Drawing.Common/tests/mono/System.Drawing/GraphicsTests.cs index 44da3cb0431d..4e2fc0ba3eeb 100644 --- a/src/System.Drawing.Common/tests/mono/System.Drawing/GraphicsTests.cs +++ b/src/System.Drawing.Common/tests/mono/System.Drawing/GraphicsTests.cs @@ -1921,7 +1921,7 @@ public void MeasureString_CharactersFitted() Assert.Equal(size2.Height, size.Height); Assert.Equal(1, lines); - // LAMESPEC: documentation seems to suggest chars is total length + // documentation seems to suggest chars is total length Assert.True(chars < s.Length); } } diff --git a/src/System.IO.FileSystem/tests/PortedCommon/IOServices.cs b/src/System.IO.FileSystem/tests/PortedCommon/IOServices.cs index 6b45e65b5a30..73eca3c4a825 100644 --- a/src/System.IO.FileSystem/tests/PortedCommon/IOServices.cs +++ b/src/System.IO.FileSystem/tests/PortedCommon/IOServices.cs @@ -123,7 +123,7 @@ public static string GetPath(string rootPath, int characterCount) else { // Long paths can be over 32K characters. Given that a guid is just 36 chars, this - // can lead to crazy 800+ recursive call depths. We'll create large segments to + // can lead to 800+ recursive call depths. We'll create large segments to // make tests more manageable. path.Append(guid); diff --git a/src/System.IO.Ports/tests/SerialPort/Read_char_int_int.cs b/src/System.IO.Ports/tests/SerialPort/Read_char_int_int.cs index 2552ec2b92c2..73071936d766 100644 --- a/src/System.IO.Ports/tests/SerialPort/Read_char_int_int.cs +++ b/src/System.IO.Ports/tests/SerialPort/Read_char_int_int.cs @@ -812,7 +812,7 @@ private void VerifyBytesReadOnCom1FromCom2(SerialPort com1, SerialPort com2, byt com2.Write(bytesToWrite, 0, bytesToWrite.Length); com1.ReadTimeout = 500; - //This is pretty lame but we will have to live with if for now becuase we can not + //This is pretty silly but we will have to live with if for now becuase we can not //gaurentee the number of bytes Write will add Thread.Sleep((int)(((bytesToWrite.Length * 10.0) / com1.BaudRate) * 1000) + 250); diff --git a/src/System.Memory/tests/ParsersAndFormatters/TestData.cs b/src/System.Memory/tests/ParsersAndFormatters/TestData.cs index 48a2f96c936d..049b0003a579 100644 --- a/src/System.Memory/tests/ParsersAndFormatters/TestData.cs +++ b/src/System.Memory/tests/ParsersAndFormatters/TestData.cs @@ -457,7 +457,7 @@ public static IEnumerable NumberTestData yield return "0.6666666666666666666666666666666666666666666666665"; yield return "0.9999999999999999999999999999999999999999999999999"; - // Crazy case that's expected to yield "Decimal.MaxValue / 10" + // Wacky case that's expected to yield "Decimal.MaxValue / 10" // ( = 7922816251426433759354395034m (= High = 0x19999999, Mid = 0x99999999, Low = 0x9999999A)) // and does thanks to a special overflow code path inside the Number->Decimal converter. yield return "0.79228162514264337593543950335" + "5" + "E28"; diff --git a/src/System.Security.Cryptography.Xml/tests/KeyInfoNodeTest.cs b/src/System.Security.Cryptography.Xml/tests/KeyInfoNodeTest.cs index 790fa8b9be07..ab9a11ff9930 100644 --- a/src/System.Security.Cryptography.Xml/tests/KeyInfoNodeTest.cs +++ b/src/System.Security.Cryptography.Xml/tests/KeyInfoNodeTest.cs @@ -61,7 +61,7 @@ public void InvalidKeyNode() doc.LoadXml(bad); KeyInfoNode node1 = new KeyInfoNode(); - // LAMESPEC: No ArgumentNullException is thrown if value == null + // No ArgumentNullException is thrown if value == null node1.LoadXml(null); Assert.Null(node1.Value); } diff --git a/src/System.Security.Cryptography.Xml/tests/KeyInfoTest.cs b/src/System.Security.Cryptography.Xml/tests/KeyInfoTest.cs index 4fc06bb31463..2d32140fae08 100644 --- a/src/System.Security.Cryptography.Xml/tests/KeyInfoTest.cs +++ b/src/System.Security.Cryptography.Xml/tests/KeyInfoTest.cs @@ -367,7 +367,7 @@ public void InvalidXml() XmlDocument doc = new XmlDocument(); doc.LoadXml(bad); info.LoadXml(doc.DocumentElement); - // LAMESPEC: no expection but Xml isn't loaded + // no expection but Xml isn't loaded Assert.Equal("", (info.GetXml().OuterXml)); Assert.Equal(0, info.Count); } diff --git a/src/System.Security.Cryptography.Xml/tests/SignedXmlTest.cs b/src/System.Security.Cryptography.Xml/tests/SignedXmlTest.cs index 1c6bbe837164..ea679f0bccfe 100644 --- a/src/System.Security.Cryptography.Xml/tests/SignedXmlTest.cs +++ b/src/System.Security.Cryptography.Xml/tests/SignedXmlTest.cs @@ -199,7 +199,7 @@ public void AsymmetricRSASignature() // Get the XML representation of the signature. XmlElement xmlSignature = signedXml.GetXml(); - // LAMESPEC: we must reload the signature or it won't work + // we must reload the signature or it won't work // MS framework throw a "malformed element" SignedXml vrfy = new SignedXml(); vrfy.LoadXml(xmlSignature); @@ -320,7 +320,7 @@ public void AsymmetricDSASignature() // Get the XML representation of the signature. XmlElement xmlSignature = signedXml.GetXml(); - // LAMESPEC: we must reload the signature or it won't work + // we must reload the signature or it won't work // MS framework throw a "malformed element" SignedXml vrfy = new SignedXml(); vrfy.LoadXml(xmlSignature); @@ -354,7 +354,7 @@ public void SymmetricHMACSHA1Signature() // Get the XML representation of the signature. XmlElement xmlSignature = signedXml.GetXml(); - // LAMESPEC: we must reload the signature or it won't work + // we must reload the signature or it won't work // MS framework throw a "malformed element" SignedXml vrfy = new SignedXml(); vrfy.LoadXml(xmlSignature); @@ -364,7 +364,7 @@ public void SymmetricHMACSHA1Signature() } // Using empty constructor - // LAMESPEC: The two other constructors don't seems to apply in verifying signatures + // The two other constructors don't seems to apply in verifying signatures [Fact] public void AsymmetricRSAVerify() { @@ -388,7 +388,7 @@ public void AsymmetricRSAVerify() } // Using empty constructor - // LAMESPEC: The two other constructors don't seems to apply in verifying signatures + // The two other constructors don't seems to apply in verifying signatures [Fact] public void AsymmetricDSAVerify() { diff --git a/src/System.Security.Cryptography.Xml/tests/XmlDsigBase64TransformTest.cs b/src/System.Security.Cryptography.Xml/tests/XmlDsigBase64TransformTest.cs index 99ab2ccea0f6..2aadc0491c11 100644 --- a/src/System.Security.Cryptography.Xml/tests/XmlDsigBase64TransformTest.cs +++ b/src/System.Security.Cryptography.Xml/tests/XmlDsigBase64TransformTest.cs @@ -172,7 +172,7 @@ public void LoadInputAsStream() public void LoadInputWithUnsupportedType() { byte[] bad = { 0xBA, 0xD }; - // LAMESPEC: input MUST be one of InputType - but no exception is thrown (not documented) + // input MUST be one of InputType - but no exception is thrown (not documented) transform.LoadInput(bad); } diff --git a/src/System.Security.Cryptography.Xml/tests/XmlDsigXPathTransformTest.cs b/src/System.Security.Cryptography.Xml/tests/XmlDsigXPathTransformTest.cs index 8075df3c286f..671dd67ac4a6 100644 --- a/src/System.Security.Cryptography.Xml/tests/XmlDsigXPathTransformTest.cs +++ b/src/System.Security.Cryptography.Xml/tests/XmlDsigXPathTransformTest.cs @@ -206,7 +206,7 @@ public void LoadInnerXml() public void UnsupportedInput() { byte[] bad = { 0xBA, 0xD }; - // LAMESPEC: input MUST be one of InputType - but no exception is thrown (not documented) + // input MUST be one of InputType - but no exception is thrown (not documented) transform.LoadInput(bad); } diff --git a/src/System.Security.Cryptography.Xml/tests/XmlDsigXsltTransformTest.cs b/src/System.Security.Cryptography.Xml/tests/XmlDsigXsltTransformTest.cs index 027143b018d9..25d2e84dfd5f 100644 --- a/src/System.Security.Cryptography.Xml/tests/XmlDsigXsltTransformTest.cs +++ b/src/System.Security.Cryptography.Xml/tests/XmlDsigXsltTransformTest.cs @@ -296,7 +296,7 @@ public void Load2() public void UnsupportedInput() { byte[] bad = { 0xBA, 0xD }; - // LAMESPEC: input MUST be one of InputType - but no exception is thrown (not documented) + // input MUST be one of InputType - but no exception is thrown (not documented) transform.LoadInput(bad); } From d69d441dfb0710c2a34155c7c4745db357b14c96 Mon Sep 17 00:00:00 2001 From: Stephen Toub Date: Thu, 2 May 2019 00:15:28 -0400 Subject: [PATCH 166/607] Enable HTTP/2 in SocketsHttpHandler via HttpRequestMessage.Version (#37234) We now respect the version: if it's 1.1, we use 1.1, and if it's 2.0, we try to use HTTP/2. At the same time, the default for HttpRequestMessage.Version goes back to 1.1, so to use HTTP/2, you opt-in by setting the version explicitly to 2.0. --- .../System/Net/Http/GenericLoopbackServer.cs | 6 +- .../System/Net/Http/Http2LoopbackServer.cs | 16 +- .../System/Net/Http/LoopbackProxyServer.cs | 25 +- .../LoopbackServer.AuthenticationHelpers.cs | 12 +- .../tests/System/Net/Http/LoopbackServer.cs | 34 +- .../tests/ProcessTests.Unix.cs | 1 + .../tests/ProcessTests.cs | 1 + src/System.Net.Http/ref/System.Net.Http.cs | 1 + .../src/System/Net/Http/HttpClient.cs | 34 +- .../src/System/Net/Http/HttpUtilities.cs | 11 +- .../HttpConnectionSettings.cs | 16 +- .../FunctionalTests/DefaultCredentialsTest.cs | 18 +- .../tests/FunctionalTests/DiagnosticsTests.cs | 139 +++--- .../HttpClient.SelectedSitesTest.cs | 2 +- .../FunctionalTests/HttpClientEKUTest.cs | 8 +- .../HttpClientHandlerTest.AcceptAllCerts.cs | 4 +- .../HttpClientHandlerTest.Authentication.cs | 32 +- .../HttpClientHandlerTest.AutoRedirect.cs | 36 +- .../HttpClientHandlerTest.Cancellation.cs | 11 +- ...ttpClientHandlerTest.ClientCertificates.cs | 38 +- .../HttpClientHandlerTest.Cookies.cs | 40 +- .../HttpClientHandlerTest.Decompression.cs | 10 +- ...ientHandlerTest.DefaultProxyCredentials.cs | 14 +- .../HttpClientHandlerTest.Headers.cs | 30 +- .../HttpClientHandlerTest.Http1.cs | 3 +- .../HttpClientHandlerTest.Http2.cs | 76 ++- ...ientHandlerTest.MaxConnectionsPerServer.cs | 4 +- ...entHandlerTest.MaxResponseHeadersLength.cs | 6 +- .../HttpClientHandlerTest.Proxy.cs | 20 +- .../HttpClientHandlerTest.ResponseDrain.cs | 6 +- ...ientHandlerTest.ServerCertificates.Unix.cs | 6 +- ...ttpClientHandlerTest.ServerCertificates.cs | 42 +- .../HttpClientHandlerTest.SslProtocols.cs | 12 +- .../HttpClientHandlerTest.TrailingHeaders.cs | 407 --------------- .../FunctionalTests/HttpClientHandlerTest.cs | 96 ++-- .../HttpClientHandlerTestBase.cs | 53 +- .../HttpClientTest.netcoreapp.cs | 70 +++ .../FunctionalTests/HttpProtocolTests.cs | 6 +- .../FunctionalTests/HttpRequestMessageTest.cs | 6 +- .../FunctionalTests/HttpRetryProtocolTests.cs | 2 +- .../FunctionalTests/IdnaProtocolTests.cs | 8 +- .../FunctionalTests/PlatformHandlerTest.cs | 3 +- .../tests/FunctionalTests/PostScenarioTest.cs | 14 +- .../FunctionalTests/PostScenarioUWPTest.cs | 40 +- .../SchSendAuxRecordHttpTest.cs | 2 +- .../FunctionalTests/SocketsHttpHandlerTest.cs | 466 ++++++++++++++++-- .../System.Net.Http.Functional.Tests.csproj | 1 - .../tests/FunctionalTests/TestHelper.cs | 55 +-- .../tests/UnitTests/HttpContentTest.cs | 4 +- 49 files changed, 1007 insertions(+), 940 deletions(-) delete mode 100644 src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.TrailingHeaders.cs diff --git a/src/Common/tests/System/Net/Http/GenericLoopbackServer.cs b/src/Common/tests/System/Net/Http/GenericLoopbackServer.cs index f64460293a79..a7200ad01872 100644 --- a/src/Common/tests/System/Net/Http/GenericLoopbackServer.cs +++ b/src/Common/tests/System/Net/Http/GenericLoopbackServer.cs @@ -13,21 +13,21 @@ namespace System.Net.Test.Common public abstract class LoopbackServerFactory { - public abstract Task CreateServerAsync(Func funcAsync, int millisecondsTimeout = 30_000); + public abstract Task CreateServerAsync(Func funcAsync, int millisecondsTimeout = 60_000); public abstract bool IsHttp11 { get; } public abstract bool IsHttp2 { get; } // Common helper methods - public Task CreateClientAndServerAsync(Func clientFunc, Func serverFunc, int millisecondsTimeout = 30_000) + public Task CreateClientAndServerAsync(Func clientFunc, Func serverFunc, int millisecondsTimeout = 60_000) { return CreateServerAsync(async (server, uri) => { Task clientTask = clientFunc(uri); Task serverTask = serverFunc(server); - await new Task[] { clientTask, serverTask }.WhenAllOrAnyFailed(); + await new Task[] { clientTask, serverTask }.WhenAllOrAnyFailed().ConfigureAwait(false); }).TimeoutAfter(millisecondsTimeout); } } diff --git a/src/Common/tests/System/Net/Http/Http2LoopbackServer.cs b/src/Common/tests/System/Net/Http/Http2LoopbackServer.cs index ca957420a52b..5b527c6c8cd0 100644 --- a/src/Common/tests/System/Net/Http/Http2LoopbackServer.cs +++ b/src/Common/tests/System/Net/Http/Http2LoopbackServer.cs @@ -132,12 +132,12 @@ public async Task ReadFrameAsync(TimeSpan timeout) if (_ignoreSettingsAck && header.Type == FrameType.Settings && header.Flags == FrameFlags.Ack) { _ignoreSettingsAck = false; - return await ReadFrameAsync(timeout); + return await ReadFrameAsync(timeout).ConfigureAwait(false); } if (_ignoreWindowUpdates && header.Type == FrameType.WindowUpdate) { - return await ReadFrameAsync(timeout); + return await ReadFrameAsync(timeout).ConfigureAwait(false); } // Construct the correct frame type and return it. @@ -234,16 +234,16 @@ public void IgnoreWindowUpdates() // Accept connection and handle connection setup public async Task EstablishConnectionAsync(params SettingsEntry[] settingsEntries) { - await AcceptConnectionAsync(); + await AcceptConnectionAsync().ConfigureAwait(false); // Receive the initial client settings frame. - Frame receivedFrame = await ReadFrameAsync(Timeout); + Frame receivedFrame = await ReadFrameAsync(Timeout).ConfigureAwait(false); Assert.Equal(FrameType.Settings, receivedFrame.Type); Assert.Equal(FrameFlags.None, receivedFrame.Flags); Assert.Equal(0, receivedFrame.StreamId); // Receive the initial client window update frame. - receivedFrame = await ReadFrameAsync(Timeout); + receivedFrame = await ReadFrameAsync(Timeout).ConfigureAwait(false); Assert.Equal(FrameType.WindowUpdate, receivedFrame.Type); Assert.Equal(FrameFlags.None, receivedFrame.Flags); Assert.Equal(0, receivedFrame.StreamId); @@ -293,7 +293,7 @@ public async Task WaitForConnectionShutdownAsync() public async Task ReadRequestHeaderAsync() { // Receive HEADERS frame for request. - Frame frame = await ReadFrameAsync(Timeout); + Frame frame = await ReadFrameAsync(Timeout).ConfigureAwait(false); if (frame == null) { throw new IOException("Failed to read Headers frame."); @@ -693,7 +693,7 @@ public sealed class Http2LoopbackServerFactory : LoopbackServerFactory { public static readonly Http2LoopbackServerFactory Singleton = new Http2LoopbackServerFactory(); - public static async Task CreateServerAsync(Func funcAsync, int millisecondsTimeout = 30_000) + public static async Task CreateServerAsync(Func funcAsync, int millisecondsTimeout = 60_000) { using (var server = Http2LoopbackServer.CreateServer()) { @@ -701,7 +701,7 @@ public static async Task CreateServerAsync(Func } } - public override async Task CreateServerAsync(Func funcAsync, int millisecondsTimeout = 30_000) + public override async Task CreateServerAsync(Func funcAsync, int millisecondsTimeout = 60_000) { using (var server = Http2LoopbackServer.CreateServer()) { diff --git a/src/Common/tests/System/Net/Http/LoopbackProxyServer.cs b/src/Common/tests/System/Net/Http/LoopbackProxyServer.cs index a66dd0cbf748..4dafffd68716 100644 --- a/src/Common/tests/System/Net/Http/LoopbackProxyServer.cs +++ b/src/Common/tests/System/Net/Http/LoopbackProxyServer.cs @@ -67,12 +67,12 @@ private void Start() { while (true) { - Socket s = await _listener.AcceptAsync(); + Socket s = await _listener.AcceptAsync().ConfigureAwait(false); var ignored = Task.Run(async () => { try { - await ProcessConnection(s); + await ProcessConnection(s).ConfigureAwait(false); } catch (Exception) { @@ -100,7 +100,7 @@ private async Task ProcessConnection(Socket s) { while(true) { - if (!(await ProcessRequest(reader, writer))) + if (!(await ProcessRequest(reader, writer).ConfigureAwait(false))) { break; } @@ -160,7 +160,7 @@ private async Task ProcessRequest(StreamReader reader, StreamWriter writer int remotePort = int.Parse(tokens[1]); Send200Response(writer); - await ProcessConnectMethod((NetworkStream)reader.BaseStream, remoteHost, remotePort); + await ProcessConnectMethod((NetworkStream)reader.BaseStream, remoteHost, remotePort).ConfigureAwait(false); return false; // connection can't be used for any more requests } @@ -183,8 +183,7 @@ private async Task ProcessRequest(StreamReader reader, StreamWriter writer var handler = new HttpClientHandler() { UseProxy = false }; using (HttpClient outboundClient = new HttpClient(handler)) - using (HttpResponseMessage response = - await outboundClient.SendAsync(requestMessage)) + using (HttpResponseMessage response = await outboundClient.SendAsync(requestMessage).ConfigureAwait(false)) { // Transfer the response headers from the server to the client. var sb = new StringBuilder($"HTTP/{response.Version.ToString(2)} {(int)response.StatusCode} {response.ReasonPhrase}\r\n"); @@ -200,7 +199,7 @@ await outboundClient.SendAsync(requestMessage)) writer.Write(sb.ToString()); // Forward the response body from the server to the client. - string responseBody = await response.Content.ReadAsStringAsync(); + string responseBody = await response.Content.ReadAsStringAsync().ConfigureAwait(false); writer.Write(responseBody); return true; @@ -211,7 +210,7 @@ private async Task ProcessConnectMethod(NetworkStream clientStream, string remot { // Open connection to destination server. Socket serverSocket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); - await serverSocket.ConnectAsync(remoteHost, remotePort); + await serverSocket.ConnectAsync(remoteHost, remotePort).ConfigureAwait(false); NetworkStream serverStream = new NetworkStream(serverSocket); // Relay traffic to/from client and destination server. @@ -221,9 +220,9 @@ private async Task ProcessConnectMethod(NetworkStream clientStream, string remot { byte[] buffer = new byte[8000]; int bytesRead; - while ((bytesRead = await clientStream.ReadAsync(buffer, 0, buffer.Length)) > 0) + while ((bytesRead = await clientStream.ReadAsync(buffer, 0, buffer.Length).ConfigureAwait(false)) > 0) { - await serverStream.WriteAsync(buffer, 0, bytesRead); + await serverStream.WriteAsync(buffer, 0, bytesRead).ConfigureAwait(false); } serverStream.Flush(); serverSocket.Shutdown(SocketShutdown.Send); @@ -239,9 +238,9 @@ private async Task ProcessConnectMethod(NetworkStream clientStream, string remot { byte[] buffer = new byte[8000]; int bytesRead; - while ((bytesRead = await serverStream.ReadAsync(buffer, 0, buffer.Length)) > 0) + while ((bytesRead = await serverStream.ReadAsync(buffer, 0, buffer.Length).ConfigureAwait(false)) > 0) { - await clientStream.WriteAsync(buffer, 0, bytesRead); + await clientStream.WriteAsync(buffer, 0, bytesRead).ConfigureAwait(false); } clientStream.Flush(); } @@ -251,7 +250,7 @@ private async Task ProcessConnectMethod(NetworkStream clientStream, string remot } }); - Task.WhenAny(new[] { clientCopyTask, serverCopyTask }).Wait(); + await Task.WhenAny(new[] { clientCopyTask, serverCopyTask }).ConfigureAwait(false); } private void Send200Response(StreamWriter writer) diff --git a/src/Common/tests/System/Net/Http/LoopbackServer.AuthenticationHelpers.cs b/src/Common/tests/System/Net/Http/LoopbackServer.AuthenticationHelpers.cs index c6c9eebebc3b..426412137e83 100644 --- a/src/Common/tests/System/Net/Http/LoopbackServer.AuthenticationHelpers.cs +++ b/src/Common/tests/System/Net/Http/LoopbackServer.AuthenticationHelpers.cs @@ -25,13 +25,13 @@ public async Task> AcceptConnectionPerformAuthenticationAndCloseAsy await AcceptConnectionAsync(async connection => { string headerName = _options.IsProxy ? "Proxy-Authorization" : "Authorization"; - lines = await connection.ReadRequestHeaderAsync(); + lines = await connection.ReadRequestHeaderAsync().ConfigureAwait(false); if (GetRequestHeaderValue(lines, headerName) == null) { await connection.SendResponseAsync( _options.IsProxy ? - HttpStatusCode.ProxyAuthenticationRequired : HttpStatusCode.Unauthorized, authenticateHeaders); + HttpStatusCode.ProxyAuthenticationRequired : HttpStatusCode.Unauthorized, authenticateHeaders).ConfigureAwait(false); - lines = await connection.ReadRequestHeaderAsync(); + lines = await connection.ReadRequestHeaderAsync().ConfigureAwait(false); } Debug.Assert(lines.Count > 0); @@ -78,13 +78,13 @@ await connection.SendResponseAsync( _options.IsProxy ? if (success) { - await connection.SendResponseAsync(additionalHeaders: "Connection: close\r\n"); + await connection.SendResponseAsync(additionalHeaders: "Connection: close\r\n").ConfigureAwait(false); } else { - await connection.SendResponseAsync(HttpStatusCode.Unauthorized, "Connection: close\r\n" + authenticateHeaders); + await connection.SendResponseAsync(HttpStatusCode.Unauthorized, "Connection: close\r\n" + authenticateHeaders).ConfigureAwait(false); } - }); + }).ConfigureAwait(false); return lines; } diff --git a/src/Common/tests/System/Net/Http/LoopbackServer.cs b/src/Common/tests/System/Net/Http/LoopbackServer.cs index a1867eecfc22..c2c0e3dadaf4 100644 --- a/src/Common/tests/System/Net/Http/LoopbackServer.cs +++ b/src/Common/tests/System/Net/Http/LoopbackServer.cs @@ -63,7 +63,7 @@ public static async Task CreateServerAsync(Func funcAsync, using (var server = new LoopbackServer(listenSocket, options)) { - await funcAsync(server); + await funcAsync(server).ConfigureAwait(false); } } } @@ -80,7 +80,7 @@ public static Task CreateClientAndServerAsync(Func clientFunc, Func> AcceptConnectionSendCustomResponseAndCloseAsync( // We'll close the connection after reading the request header and sending the response. await AcceptConnectionAsync(async connection => { - lines = await connection.ReadRequestHeaderAndSendCustomResponseAsync(response); + lines = await connection.ReadRequestHeaderAndSendCustomResponseAsync(response).ConfigureAwait(false); }); return lines; @@ -140,7 +140,7 @@ public async Task> AcceptConnectionSendResponseAndCloseAsync(HttpSt // We'll close the connection after reading the request header and sending the response. await AcceptConnectionAsync(async connection => { - lines = await connection.ReadRequestHeaderAndSendResponseAsync(statusCode, additionalHeaders + "Connection: close\r\n", content); + lines = await connection.ReadRequestHeaderAndSendResponseAsync(statusCode, additionalHeaders + "Connection: close\r\n", content).ConfigureAwait(false); }); return lines; @@ -404,7 +404,7 @@ public async Task ReadAsync(Memory buffer, int offset, int size) #if NETSTANDARD // stream does not have Memory overload byte[] tempBuffer = new byte[size]; - int readLength = await _stream.ReadAsync(tempBuffer, 0, size); + int readLength = await _stream.ReadAsync(tempBuffer, 0, size).ConfigureAwait(false); if (readLength > 0) { tempBuffer.AsSpan(readLength).CopyTo(buffer.Span.Slice(offset, size)); @@ -440,7 +440,7 @@ public async Task ReadBlockAsync(Memory buffer, int offset, int size) public async Task ReadBlockAsync(char[] result, int offset, int size) { byte[] buffer = new byte[size]; - int readLength = await ReadBlockAsync(buffer, 0, size); + int readLength = await ReadBlockAsync(buffer, 0, size).ConfigureAwait(false); string asString = System.Text.Encoding.ASCII.GetString(buffer, 0, readLength); @@ -461,7 +461,7 @@ public async Task ReadToEndAsync() do { - bytesRead = await ReadAsync(buffer, offset, buffer.Length - offset); + bytesRead = await ReadAsync(buffer, offset, buffer.Length - offset).ConfigureAwait(false); totalLength += bytesRead; offset+=bytesRead; @@ -573,20 +573,20 @@ public async Task> ReadRequestHeaderAsync() public async Task SendResponseAsync(HttpStatusCode statusCode = HttpStatusCode.OK, string additionalHeaders = null, string content = null) { - await _writer.WriteAsync(GetHttpResponse(statusCode, additionalHeaders, content)); + await _writer.WriteAsync(GetHttpResponse(statusCode, additionalHeaders, content)).ConfigureAwait(false); } public async Task> ReadRequestHeaderAndSendCustomResponseAsync(string response) { List lines = await ReadRequestHeaderAsync().ConfigureAwait(false); - await _writer.WriteAsync(response); + await _writer.WriteAsync(response).ConfigureAwait(false); return lines; } public async Task> ReadRequestHeaderAndSendResponseAsync(HttpStatusCode statusCode = HttpStatusCode.OK, string additionalHeaders = null, string content = null) { List lines = await ReadRequestHeaderAsync().ConfigureAwait(false); - await SendResponseAsync(statusCode, additionalHeaders, content); + await SendResponseAsync(statusCode, additionalHeaders, content).ConfigureAwait(false); return lines; } } @@ -637,7 +637,7 @@ await AcceptConnectionAsync(async connection => if (contentLength > 0) { byte[] buffer = new byte[contentLength]; - int bytesRead = await connection.ReadBlockAsync(buffer, 0, contentLength); + int bytesRead = await connection.ReadBlockAsync(buffer, 0, contentLength).ConfigureAwait(false); Assert.Equal(contentLength, bytesRead); requestData.Body = buffer; } @@ -646,18 +646,18 @@ await AcceptConnectionAsync(async connection => { while (true) { - string chunkHeader = await connection.ReadLineAsync(); + string chunkHeader = await connection.ReadLineAsync().ConfigureAwait(false); int chunkLength = int.Parse(chunkHeader, System.Globalization.NumberStyles.HexNumber); if (chunkLength == 0) { // Last chunk. Read CRLF and exit. - await connection.ReadLineAsync(); + await connection.ReadLineAsync().ConfigureAwait(false); break; } byte[] buffer = new byte[chunkLength]; - await connection.ReadBlockAsync(buffer, 0, chunkLength); - await connection.ReadLineAsync(); + await connection.ReadBlockAsync(buffer, 0, chunkLength).ConfigureAwait(false); + await connection.ReadLineAsync().ConfigureAwait(false); if (requestData.Body == null) { requestData.Body = buffer; @@ -685,7 +685,7 @@ public sealed class Http11LoopbackServerFactory : LoopbackServerFactory { public static readonly Http11LoopbackServerFactory Singleton = new Http11LoopbackServerFactory(); - public override Task CreateServerAsync(Func funcAsync, int millisecondsTimeout = 30_000) + public override Task CreateServerAsync(Func funcAsync, int millisecondsTimeout = 60_000) { return LoopbackServer.CreateServerAsync((server, uri) => funcAsync(server, uri)); } diff --git a/src/System.Diagnostics.Process/tests/ProcessTests.Unix.cs b/src/System.Diagnostics.Process/tests/ProcessTests.Unix.cs index 8242d97bf330..176eaa44984d 100644 --- a/src/System.Diagnostics.Process/tests/ProcessTests.Unix.cs +++ b/src/System.Diagnostics.Process/tests/ProcessTests.Unix.cs @@ -294,6 +294,7 @@ public void ProcessStart_OpenFileOnLinux_UsesSpecifiedProgram(string programToOp } } + [ActiveIssue(37198)] [Theory, InlineData("vi")] [PlatformSpecific(TestPlatforms.Linux)] [OuterLoop("Opens program")] diff --git a/src/System.Diagnostics.Process/tests/ProcessTests.cs b/src/System.Diagnostics.Process/tests/ProcessTests.cs index 31f560475434..319e179149fd 100644 --- a/src/System.Diagnostics.Process/tests/ProcessTests.cs +++ b/src/System.Diagnostics.Process/tests/ProcessTests.cs @@ -1892,6 +1892,7 @@ public void TestLongProcessIsWorking() Assert.True(p.HasExited); } + [ActiveIssue(37198)] [PlatformSpecific(TestPlatforms.AnyUnix)] [ActiveIssue(37054, TestPlatforms.OSX)] [Fact] diff --git a/src/System.Net.Http/ref/System.Net.Http.cs b/src/System.Net.Http/ref/System.Net.Http.cs index 68f172e174dc..3988d52b8fb8 100644 --- a/src/System.Net.Http/ref/System.Net.Http.cs +++ b/src/System.Net.Http/ref/System.Net.Http.cs @@ -40,6 +40,7 @@ public HttpClient(System.Net.Http.HttpMessageHandler handler, bool disposeHandle public System.Uri BaseAddress { get { throw null; } set { } } public static System.Net.IWebProxy DefaultProxy { get { throw null; } set { } } public System.Net.Http.Headers.HttpRequestHeaders DefaultRequestHeaders { get { throw null; } } + public System.Version DefaultRequestVersion { get { throw null; } set { } } public long MaxResponseContentBufferSize { get { throw null; } set { } } public System.TimeSpan Timeout { get { throw null; } set { } } public void CancelPendingRequests() { } diff --git a/src/System.Net.Http/src/System/Net/Http/HttpClient.cs b/src/System.Net.Http/src/System/Net/Http/HttpClient.cs index 2b0ac69fb08d..8a039462f954 100644 --- a/src/System.Net.Http/src/System/Net/Http/HttpClient.cs +++ b/src/System.Net.Http/src/System/Net/Http/HttpClient.cs @@ -25,6 +25,7 @@ public class HttpClient : HttpMessageInvoker private CancellationTokenSource _pendingRequestsCts; private HttpRequestHeaders _defaultRequestHeaders; + private Version _defaultRequestVersion = HttpUtilities.DefaultRequestVersion; private Uri _baseAddress; private TimeSpan _timeout; @@ -55,6 +56,16 @@ public HttpRequestHeaders DefaultRequestHeaders } } + public Version DefaultRequestVersion + { + get => _defaultRequestVersion; + set + { + CheckDisposedOrStarted(); + _defaultRequestVersion = value ?? throw new ArgumentNullException(nameof(value)); + } + } + public Uri BaseAddress { get { return _baseAddress; } @@ -306,7 +317,7 @@ public Task GetAsync(string requestUri, HttpCompletionOptio public Task GetAsync(Uri requestUri, HttpCompletionOption completionOption, CancellationToken cancellationToken) { - return SendAsync(new HttpRequestMessage(HttpMethod.Get, requestUri), completionOption, cancellationToken); + return SendAsync(CreateRequestMessage(HttpMethod.Get, requestUri), completionOption, cancellationToken); } public Task PostAsync(string requestUri, HttpContent content) @@ -328,7 +339,7 @@ public Task PostAsync(string requestUri, HttpContent conten public Task PostAsync(Uri requestUri, HttpContent content, CancellationToken cancellationToken) { - HttpRequestMessage request = new HttpRequestMessage(HttpMethod.Post, requestUri); + HttpRequestMessage request = CreateRequestMessage(HttpMethod.Post, requestUri); request.Content = content; return SendAsync(request, cancellationToken); } @@ -352,7 +363,7 @@ public Task PutAsync(string requestUri, HttpContent content public Task PutAsync(Uri requestUri, HttpContent content, CancellationToken cancellationToken) { - HttpRequestMessage request = new HttpRequestMessage(HttpMethod.Put, requestUri); + HttpRequestMessage request = CreateRequestMessage(HttpMethod.Put, requestUri); request.Content = content; return SendAsync(request, cancellationToken); } @@ -376,7 +387,7 @@ public Task PatchAsync(string requestUri, HttpContent conte public Task PatchAsync(Uri requestUri, HttpContent content, CancellationToken cancellationToken) { - HttpRequestMessage request = new HttpRequestMessage(HttpMethod.Patch, requestUri); + HttpRequestMessage request = CreateRequestMessage(HttpMethod.Patch, requestUri); request.Content = content; return SendAsync(request, cancellationToken); } @@ -398,7 +409,7 @@ public Task DeleteAsync(string requestUri, CancellationToke public Task DeleteAsync(Uri requestUri, CancellationToken cancellationToken) { - return SendAsync(new HttpRequestMessage(HttpMethod.Delete, requestUri), cancellationToken); + return SendAsync(CreateRequestMessage(HttpMethod.Delete, requestUri), cancellationToken); } #endregion REST Send Overloads @@ -709,14 +720,11 @@ private static void CheckBaseAddress(Uri baseAddress, string parameterName) } } - private Uri CreateUri(string uri) - { - if (string.IsNullOrEmpty(uri)) - { - return null; - } - return new Uri(uri, UriKind.RelativeOrAbsolute); - } + private Uri CreateUri(string uri) => + string.IsNullOrEmpty(uri) ? null : new Uri(uri, UriKind.RelativeOrAbsolute); + + private HttpRequestMessage CreateRequestMessage(HttpMethod method, Uri uri) => + new HttpRequestMessage(method, uri) { Version = _defaultRequestVersion }; #endregion Private Helpers } } diff --git a/src/System.Net.Http/src/System/Net/Http/HttpUtilities.cs b/src/System.Net.Http/src/System/Net/Http/HttpUtilities.cs index 5910fcad5b9e..0afe5e31de07 100644 --- a/src/System.Net.Http/src/System/Net/Http/HttpUtilities.cs +++ b/src/System.Net.Http/src/System/Net/Http/HttpUtilities.cs @@ -2,19 +2,20 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections.Generic; -using System.Text; using System.Diagnostics; using System.Threading.Tasks; using System.Threading; -using System.Net.Http.Headers; namespace System.Net.Http { internal static class HttpUtilities { - internal static Version DefaultRequestVersion => HttpVersion.Version20; + internal static Version DefaultRequestVersion => +#if uap + HttpVersion.Version20; +#else + HttpVersion.Version11; +#endif internal static Version DefaultResponseVersion => HttpVersion.Version11; diff --git a/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionSettings.cs b/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionSettings.cs index a8cb6249e620..3fe40764bce8 100644 --- a/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionSettings.cs +++ b/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionSettings.cs @@ -106,6 +106,9 @@ private static bool AllowHttp2 { get { + // Default to allowing HTTP/2, but enable that to be overridden by an + // AppContext switch, or by an environment variable being set to false/0. + // First check for the AppContext switch, giving it priority over the environment variable. if (AppContext.TryGetSwitch(Http2SupportAppCtxSettingName, out bool allowHttp2)) { @@ -114,14 +117,14 @@ private static bool AllowHttp2 // AppContext switch wasn't used. Check the environment variable. string envVar = Environment.GetEnvironmentVariable(Http2SupportEnvironmentVariableSettingName); - if (envVar != null && (envVar.Equals("true", StringComparison.OrdinalIgnoreCase) || envVar.Equals("1"))) + if (envVar != null && (envVar.Equals("false", StringComparison.OrdinalIgnoreCase) || envVar.Equals("0"))) { - // Allow HTTP/2.0 protocol. - return true; + // Disallow HTTP/2 protocol. + return false; } - // Default to a maximum of HTTP/1.1. - return false; + // Default to a maximum of HTTP/2. + return true; } } @@ -129,6 +132,9 @@ private static bool AllowUnencryptedHttp2 { get { + // Default to not allowing unencrypted HTTP/2, but enable that to be overridden + // by an AppContext switch, or by an environment variable being to to true/1. + // First check for the AppContext switch, giving it priority over the environment variable. if (AppContext.TryGetSwitch(Http2UnencryptedSupportAppCtxSettingName, out bool allowHttp2)) { diff --git a/src/System.Net.Http/tests/FunctionalTests/DefaultCredentialsTest.cs b/src/System.Net.Http/tests/FunctionalTests/DefaultCredentialsTest.cs index 3b219069ff8d..db34a22396ff 100644 --- a/src/System.Net.Http/tests/FunctionalTests/DefaultCredentialsTest.cs +++ b/src/System.Net.Http/tests/FunctionalTests/DefaultCredentialsTest.cs @@ -46,7 +46,7 @@ public async Task UseDefaultCredentials_DefaultValue_Unauthorized(string uri, bo HttpClientHandler handler = CreateHttpClientHandler(); handler.UseProxy = useProxy; - using (var client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient(handler)) using (HttpResponseMessage response = await client.GetAsync(uri)) { Assert.Equal(HttpStatusCode.Unauthorized, response.StatusCode); @@ -62,7 +62,7 @@ public async Task UseDefaultCredentials_SetFalse_Unauthorized(string uri, bool u handler.UseProxy = useProxy; handler.UseDefaultCredentials = false; - using (var client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient(handler)) using (HttpResponseMessage response = await client.GetAsync(uri)) { Assert.Equal(HttpStatusCode.Unauthorized, response.StatusCode); @@ -78,7 +78,7 @@ public async Task UseDefaultCredentials_SetTrue_ConnectAsCurrentIdentity(string handler.UseProxy = useProxy; handler.UseDefaultCredentials = true; - using (var client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient(handler)) using (HttpResponseMessage response = await client.GetAsync(uri)) { Assert.Equal(HttpStatusCode.OK, response.StatusCode); @@ -102,7 +102,7 @@ public async Task Credentials_SetToWrappedDefaultCredential_ConnectAsCurrentIden InnerCredentials = CredentialCache.DefaultCredentials }; - using (var client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient(handler)) using (HttpResponseMessage response = await client.GetAsync(uri)) { Assert.Equal(HttpStatusCode.OK, response.StatusCode); @@ -123,7 +123,7 @@ public async Task Credentials_SetToBadCredential_Unauthorized(string uri, bool u handler.UseProxy = useProxy; handler.Credentials = new NetworkCredential("notarealuser", "123456"); - using (var client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient(handler)) using (HttpResponseMessage response = await client.GetAsync(uri)) { Assert.Equal(HttpStatusCode.Unauthorized, response.StatusCode); @@ -142,7 +142,7 @@ public async Task Credentials_SetToSpecificCredential_ConnectAsSpecificIdentity( handler.UseDefaultCredentials = false; handler.Credentials = _specificCredential; - using (var client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient(handler)) using (HttpResponseMessage response = await client.GetAsync(s_authenticatedServer)) { Assert.Equal(HttpStatusCode.OK, response.StatusCode); @@ -160,7 +160,7 @@ public async Task Proxy_UseAuthenticatedProxyWithNoCredentials_ProxyAuthenticati HttpClientHandler handler = CreateHttpClientHandler(); handler.Proxy = new AuthenticatedProxy(null); - using (var client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient(handler)) using (HttpResponseMessage response = await client.GetAsync(Configuration.Http.RemoteEchoServer)) { Assert.Equal(HttpStatusCode.ProxyAuthenticationRequired, response.StatusCode); @@ -175,7 +175,7 @@ public async Task Proxy_UseAuthenticatedProxyWithDefaultCredentials_OK() HttpClientHandler handler = CreateHttpClientHandler(); handler.Proxy = new AuthenticatedProxy(CredentialCache.DefaultCredentials); - using (var client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient(handler)) using (HttpResponseMessage response = await client.GetAsync(Configuration.Http.RemoteEchoServer)) { Assert.Equal(HttpStatusCode.OK, response.StatusCode); @@ -194,7 +194,7 @@ public async Task Proxy_UseAuthenticatedProxyWithWrappedDefaultCredentials_OK() HttpClientHandler handler = CreateHttpClientHandler(); handler.Proxy = new AuthenticatedProxy(wrappedCreds); - using (var client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient(handler)) using (HttpResponseMessage response = await client.GetAsync(Configuration.Http.RemoteEchoServer)) { Assert.Equal(HttpStatusCode.OK, response.StatusCode); diff --git a/src/System.Net.Http/tests/FunctionalTests/DiagnosticsTests.cs b/src/System.Net.Http/tests/FunctionalTests/DiagnosticsTests.cs index dc8e57b09bbd..e87f16130682 100644 --- a/src/System.Net.Http/tests/FunctionalTests/DiagnosticsTests.cs +++ b/src/System.Net.Http/tests/FunctionalTests/DiagnosticsTests.cs @@ -52,7 +52,7 @@ public static void EventSource_ExistsWithCorrectId() [Fact] public void SendAsync_ExpectedDiagnosticSourceLogging() { - RemoteExecutor.Invoke(useSocketsHttpHandlerString => + RemoteExecutor.Invoke((useSocketsHttpHandlerString, useHttp2String) => { bool requestLogged = false; Guid requestGuid = Guid.Empty; @@ -95,7 +95,7 @@ public void SendAsync_ExpectedDiagnosticSourceLogging() using (DiagnosticListener.AllListeners.Subscribe(diagnosticListenerObserver)) { diagnosticListenerObserver.Enable(s => !s.Contains("HttpRequestOut")); - using (HttpClient client = CreateHttpClient(useSocketsHttpHandlerString)) + using (HttpClient client = CreateHttpClient(useSocketsHttpHandlerString, useHttp2String)) { client.GetAsync(Configuration.Http.RemoteEchoServer).Result.Dispose(); } @@ -111,7 +111,7 @@ public void SendAsync_ExpectedDiagnosticSourceLogging() } return RemoteExecutor.SuccessExitCode; - }, UseSocketsHttpHandler.ToString()).Dispose(); + }, UseSocketsHttpHandler.ToString(), UseHttp2.ToString()).Dispose(); } /// @@ -122,7 +122,7 @@ public void SendAsync_ExpectedDiagnosticSourceLogging() [Fact] public void SendAsync_ExpectedDiagnosticSourceNoLogging() { - RemoteExecutor.Invoke(useSocketsHttpHandlerString => + RemoteExecutor.Invoke((useSocketsHttpHandlerString, useHttp2String) => { bool requestLogged = false; bool responseLogged = false; @@ -151,7 +151,7 @@ public void SendAsync_ExpectedDiagnosticSourceNoLogging() using (DiagnosticListener.AllListeners.Subscribe(diagnosticListenerObserver)) { - using (HttpClient client = CreateHttpClient(useSocketsHttpHandlerString)) + using (HttpClient client = CreateHttpClient(useSocketsHttpHandlerString, useHttp2String)) { LoopbackServer.CreateServerAsync(async (server, url) => { @@ -161,7 +161,7 @@ public void SendAsync_ExpectedDiagnosticSourceNoLogging() AssertNoHeadersAreInjected(requestLines.Result); response.Result.Dispose(); - }).Wait(); + }).GetAwaiter().GetResult(); } Assert.False(requestLogged, "Request was logged while logging disabled."); @@ -172,7 +172,7 @@ public void SendAsync_ExpectedDiagnosticSourceNoLogging() } return RemoteExecutor.SuccessExitCode; - }, UseSocketsHttpHandler.ToString()).Dispose(); + }, UseSocketsHttpHandler.ToString(), UseHttp2.ToString()).Dispose(); } [ActiveIssue(23771, TestPlatforms.AnyUnix)] @@ -182,7 +182,7 @@ public void SendAsync_ExpectedDiagnosticSourceNoLogging() [InlineData(true)] public void SendAsync_HttpTracingEnabled_Succeeds(bool useSsl) { - RemoteExecutor.Invoke(async (useSocketsHttpHandlerString, useSslString) => + RemoteExecutor.Invoke(async (useSocketsHttpHandlerString, useHttp2String, useSslString) => { using (var listener = new TestEventListener("Microsoft-System-Net-Http", EventLevel.Verbose)) { @@ -190,7 +190,7 @@ public void SendAsync_HttpTracingEnabled_Succeeds(bool useSsl) await listener.RunWithCallbackAsync(events.Enqueue, async () => { // Exercise various code paths to get coverage of tracing - using (HttpClient client = CreateHttpClient(useSocketsHttpHandlerString)) + using (HttpClient client = CreateHttpClient(useSocketsHttpHandlerString, useHttp2String)) { // Do a get to a loopback server await LoopbackServer.CreateServerAsync(async (server, url) => @@ -223,14 +223,14 @@ await TestHelper.WhenAllCompletedOrAnyFailed( } return RemoteExecutor.SuccessExitCode; - }, UseSocketsHttpHandler.ToString(), useSsl.ToString()).Dispose(); + }, UseSocketsHttpHandler.ToString(), UseHttp2.ToString(), useSsl.ToString()).Dispose(); } [OuterLoop("Uses external server")] [Fact] public void SendAsync_ExpectedDiagnosticExceptionLogging() { - RemoteExecutor.Invoke(useSocketsHttpHandlerString => + RemoteExecutor.Invoke((useSocketsHttpHandlerString, useHttp2String) => { bool exceptionLogged = false; bool responseLogged = false; @@ -257,10 +257,10 @@ public void SendAsync_ExpectedDiagnosticExceptionLogging() using (DiagnosticListener.AllListeners.Subscribe(diagnosticListenerObserver)) { diagnosticListenerObserver.Enable(s => !s.Contains("HttpRequestOut")); - using (HttpClient client = CreateHttpClient(useSocketsHttpHandlerString)) + using (HttpClient client = CreateHttpClient(useSocketsHttpHandlerString, useHttp2String)) { - Assert.ThrowsAsync(() => client.GetAsync($"http://{Guid.NewGuid()}.com")) - .Wait(); + Assert.ThrowsAsync(() => client.GetAsync($"http://_{Guid.NewGuid().ToString("N")}.com")) + .GetAwaiter().GetResult(); } // Poll with a timeout since logging response is not synchronized with returning a response. @@ -271,7 +271,7 @@ public void SendAsync_ExpectedDiagnosticExceptionLogging() } return RemoteExecutor.SuccessExitCode; - }, UseSocketsHttpHandler.ToString()).Dispose(); + }, UseSocketsHttpHandler.ToString(), UseHttp2.ToString()).Dispose(); } [ActiveIssue(23209)] @@ -279,7 +279,7 @@ public void SendAsync_ExpectedDiagnosticExceptionLogging() [Fact] public void SendAsync_ExpectedDiagnosticCancelledLogging() { - RemoteExecutor.Invoke(useSocketsHttpHandlerString => + RemoteExecutor.Invoke((useSocketsHttpHandlerString, useHttp2String) => { bool cancelLogged = false; var diagnosticListenerObserver = new FakeDiagnosticListenerObserver(kvp => @@ -297,7 +297,7 @@ public void SendAsync_ExpectedDiagnosticCancelledLogging() using (DiagnosticListener.AllListeners.Subscribe(diagnosticListenerObserver)) { diagnosticListenerObserver.Enable(s => !s.Contains("HttpRequestOut")); - using (HttpClient client = CreateHttpClient(useSocketsHttpHandlerString)) + using (HttpClient client = CreateHttpClient(useSocketsHttpHandlerString, useHttp2String)) { LoopbackServer.CreateServerAsync(async (server, url) => { @@ -310,7 +310,7 @@ public void SendAsync_ExpectedDiagnosticCancelledLogging() Task response = client.GetAsync(url, tcs.Token); await Assert.ThrowsAnyAsync(() => TestHelper.WhenAllCompletedOrAnyFailed(response, request)); - }).Wait(); + }).GetAwaiter().GetResult(); } } @@ -320,13 +320,13 @@ await Assert.ThrowsAnyAsync(() => diagnosticListenerObserver.Disable(); return RemoteExecutor.SuccessExitCode; - }, UseSocketsHttpHandler.ToString()).Dispose(); + }, UseSocketsHttpHandler.ToString(), UseHttp2.ToString()).Dispose(); } [Fact] public void SendAsync_ExpectedDiagnosticSourceActivityLoggingRequestId() { - RemoteExecutor.Invoke(useSocketsHttpHandlerString => + RemoteExecutor.Invoke((useSocketsHttpHandlerString, useHttp2String) => { bool requestLogged = false; bool responseLogged = false; @@ -335,8 +335,8 @@ public void SendAsync_ExpectedDiagnosticSourceActivityLoggingRequestId() bool exceptionLogged = false; Activity parentActivity = new Activity("parent"); - parentActivity.AddBaggage("correlationId", Guid.NewGuid().ToString()); - parentActivity.AddBaggage("moreBaggage", Guid.NewGuid().ToString()); + parentActivity.AddBaggage("correlationId", Guid.NewGuid().ToString("N").ToString()); + parentActivity.AddBaggage("moreBaggage", Guid.NewGuid().ToString("N").ToString()); parentActivity.AddTag("tag", "tag"); //add tag to ensure it is not injected into request parentActivity.Start(); @@ -382,7 +382,7 @@ public void SendAsync_ExpectedDiagnosticSourceActivityLoggingRequestId() using (DiagnosticListener.AllListeners.Subscribe(diagnosticListenerObserver)) { diagnosticListenerObserver.Enable(s => s.Contains("HttpRequestOut")); - using (HttpClient client = CreateHttpClient(useSocketsHttpHandlerString)) + using (HttpClient client = CreateHttpClient(useSocketsHttpHandlerString, useHttp2String)) { LoopbackServer.CreateServerAsync(async (server, url) => { @@ -392,7 +392,7 @@ public void SendAsync_ExpectedDiagnosticSourceActivityLoggingRequestId() AssertHeadersAreInjected(requestLines.Result, parentActivity); response.Result.Dispose(); - }).Wait(); + }).GetAwaiter().GetResult(); } Assert.True(activityStartLogged, "HttpRequestOut.Start was not logged."); @@ -406,13 +406,13 @@ public void SendAsync_ExpectedDiagnosticSourceActivityLoggingRequestId() } return RemoteExecutor.SuccessExitCode; - }, UseSocketsHttpHandler.ToString()).Dispose(); + }, UseSocketsHttpHandler.ToString(), UseHttp2.ToString()).Dispose(); } [Fact] public void SendAsync_ExpectedDiagnosticSourceActivityLoggingW3C() { - RemoteExecutor.Invoke(useSocketsHttpHandlerString => + RemoteExecutor.Invoke((useSocketsHttpHandlerString, useHttp2String) => { bool requestLogged = false; bool responseLogged = false; @@ -422,7 +422,7 @@ public void SendAsync_ExpectedDiagnosticSourceActivityLoggingW3C() Activity parentActivity = new Activity("parent"); parentActivity.SetParentId(ActivityTraceId.CreateRandom(), ActivitySpanId.CreateRandom()); - parentActivity.AddBaggage("moreBaggage", Guid.NewGuid().ToString()); + parentActivity.AddBaggage("moreBaggage", Guid.NewGuid().ToString("N").ToString()); parentActivity.Start(); var diagnosticListenerObserver = new FakeDiagnosticListenerObserver(kvp => @@ -467,7 +467,7 @@ public void SendAsync_ExpectedDiagnosticSourceActivityLoggingW3C() using (DiagnosticListener.AllListeners.Subscribe(diagnosticListenerObserver)) { diagnosticListenerObserver.Enable(s => s.Contains("HttpRequestOut")); - using (HttpClient client = CreateHttpClient(useSocketsHttpHandlerString)) + using (HttpClient client = CreateHttpClient(useSocketsHttpHandlerString, useHttp2String)) { LoopbackServer.CreateServerAsync(async (server, url) => { @@ -477,7 +477,7 @@ public void SendAsync_ExpectedDiagnosticSourceActivityLoggingW3C() AssertHeadersAreInjected(requestLines.Result, parentActivity); response.Result.Dispose(); - }).Wait(); + }).GetAwaiter().GetResult(); } Assert.True(activityStartLogged, "HttpRequestOut.Start was not logged."); @@ -491,14 +491,14 @@ public void SendAsync_ExpectedDiagnosticSourceActivityLoggingW3C() } return RemoteExecutor.SuccessExitCode; - }, UseSocketsHttpHandler.ToString()).Dispose(); + }, UseSocketsHttpHandler.ToString(), UseHttp2.ToString()).Dispose(); } [OuterLoop("Uses external server")] [Fact] public void SendAsync_ExpectedDiagnosticSourceActivityLogging_InvalidBaggage() { - RemoteExecutor.Invoke(useSocketsHttpHandlerString => + RemoteExecutor.Invoke((useSocketsHttpHandlerString, useHttp2String) => { bool activityStopLogged = false; bool exceptionLogged = false; @@ -539,7 +539,7 @@ public void SendAsync_ExpectedDiagnosticSourceActivityLogging_InvalidBaggage() using (DiagnosticListener.AllListeners.Subscribe(diagnosticListenerObserver)) { diagnosticListenerObserver.Enable(s => s.Contains("HttpRequestOut")); - using (HttpClient client = CreateHttpClient(useSocketsHttpHandlerString)) + using (HttpClient client = CreateHttpClient(useSocketsHttpHandlerString, useHttp2String)) { client.GetAsync(Configuration.Http.RemoteEchoServer).Result.Dispose(); } @@ -551,20 +551,20 @@ public void SendAsync_ExpectedDiagnosticSourceActivityLogging_InvalidBaggage() } return RemoteExecutor.SuccessExitCode; - }, UseSocketsHttpHandler.ToString()).Dispose(); + }, UseSocketsHttpHandler.ToString(), UseHttp2.ToString()).Dispose(); } [OuterLoop("Uses external server")] [Fact] public void SendAsync_ExpectedDiagnosticSourceActivityLoggingDoesNotOverwriteHeader() { - RemoteExecutor.Invoke(useSocketsHttpHandlerString => + RemoteExecutor.Invoke((useSocketsHttpHandlerString, useHttp2String) => { bool activityStartLogged = false; bool activityStopLogged = false; Activity parentActivity = new Activity("parent"); - parentActivity.AddBaggage("correlationId", Guid.NewGuid().ToString()); + parentActivity.AddBaggage("correlationId", Guid.NewGuid().ToString("N").ToString()); parentActivity.Start(); string customRequestIdHeader = "|foo.bar."; @@ -594,7 +594,7 @@ public void SendAsync_ExpectedDiagnosticSourceActivityLoggingDoesNotOverwriteHea using (DiagnosticListener.AllListeners.Subscribe(diagnosticListenerObserver)) { diagnosticListenerObserver.Enable(); - using (HttpClient client = CreateHttpClient(useSocketsHttpHandlerString)) + using (HttpClient client = CreateHttpClient(useSocketsHttpHandlerString, useHttp2String)) { client.GetAsync(Configuration.Http.RemoteEchoServer).Result.Dispose(); } @@ -608,14 +608,15 @@ public void SendAsync_ExpectedDiagnosticSourceActivityLoggingDoesNotOverwriteHea } return RemoteExecutor.SuccessExitCode; - }, UseSocketsHttpHandler.ToString()).Dispose(); + }, UseSocketsHttpHandler.ToString(), UseHttp2.ToString()).Dispose(); } [OuterLoop("Uses external server")] [Fact] public void SendAsync_ExpectedDiagnosticSourceActivityLoggingDoesNotOverwriteW3CTraceParentHeader() { - RemoteExecutor.Invoke(useSocketsHttpHandlerString => + Assert.False(UseHttp2, "The test currently ignores UseHttp2."); + RemoteExecutor.Invoke((useSocketsHttpHandlerString, useHttp2String) => { bool activityStartLogged = false; bool activityStopLogged = false; @@ -650,7 +651,7 @@ public void SendAsync_ExpectedDiagnosticSourceActivityLoggingDoesNotOverwriteW3C { diagnosticListenerObserver.Enable(); using (var request = new HttpRequestMessage(HttpMethod.Get, Configuration.Http.RemoteEchoServer)) - using (HttpClient client = CreateHttpClient(useSocketsHttpHandlerString)) + using (HttpClient client = CreateHttpClient(useSocketsHttpHandlerString, useHttp2String)) { request.Headers.Add("traceparent", customTraceParentHeader); client.SendAsync(request).Result.Dispose(); @@ -665,14 +666,14 @@ public void SendAsync_ExpectedDiagnosticSourceActivityLoggingDoesNotOverwriteW3C } return RemoteExecutor.SuccessExitCode; - }, UseSocketsHttpHandler.ToString()).Dispose(); + }, UseSocketsHttpHandler.ToString(), UseHttp2.ToString()).Dispose(); } [OuterLoop("Uses external server")] [Fact] public void SendAsync_ExpectedDiagnosticSourceUrlFilteredActivityLogging() { - RemoteExecutor.Invoke(useSocketsHttpHandlerString => + RemoteExecutor.Invoke((useSocketsHttpHandlerString, useHttp2String) => { bool activityStartLogged = false; bool activityStopLogged = false; @@ -702,7 +703,7 @@ public void SendAsync_ExpectedDiagnosticSourceUrlFilteredActivityLogging() return true; }); - using (HttpClient client = CreateHttpClient(useSocketsHttpHandlerString)) + using (HttpClient client = CreateHttpClient(useSocketsHttpHandlerString, useHttp2String)) { client.GetAsync(Configuration.Http.RemoteEchoServer).Result.Dispose(); } @@ -714,14 +715,14 @@ public void SendAsync_ExpectedDiagnosticSourceUrlFilteredActivityLogging() } return RemoteExecutor.SuccessExitCode; - }, UseSocketsHttpHandler.ToString()).Dispose(); + }, UseSocketsHttpHandler.ToString(), UseHttp2.ToString()).Dispose(); } [OuterLoop("Uses external server")] [Fact] public void SendAsync_ExpectedDiagnosticExceptionActivityLogging() { - RemoteExecutor.Invoke(useSocketsHttpHandlerString => + RemoteExecutor.Invoke((useSocketsHttpHandlerString, useHttp2String) => { bool exceptionLogged = false; bool activityStopLogged = false; @@ -749,10 +750,10 @@ public void SendAsync_ExpectedDiagnosticExceptionActivityLogging() using (DiagnosticListener.AllListeners.Subscribe(diagnosticListenerObserver)) { diagnosticListenerObserver.Enable(); - using (HttpClient client = CreateHttpClient(useSocketsHttpHandlerString)) + using (HttpClient client = CreateHttpClient(useSocketsHttpHandlerString, useHttp2String)) { - Assert.ThrowsAsync(() => client.GetAsync($"http://{Guid.NewGuid()}.com")) - .Wait(); + Assert.ThrowsAsync(() => client.GetAsync($"http://_{Guid.NewGuid().ToString("N")}.com")) + .GetAwaiter().GetResult(); } // Poll with a timeout since logging response is not synchronized with returning a response. @@ -763,7 +764,7 @@ public void SendAsync_ExpectedDiagnosticExceptionActivityLogging() } return RemoteExecutor.SuccessExitCode; - }, UseSocketsHttpHandler.ToString()).Dispose(); + }, UseSocketsHttpHandler.ToString(), UseHttp2.ToString()).Dispose(); } [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "UAP HTTP stack doesn't support .Proxy property")] @@ -779,7 +780,7 @@ public void SendAsync_ExpectedDiagnosticSynchronousExceptionActivityLogging() return; } - RemoteExecutor.Invoke(useSocketsHttpHandlerString => + RemoteExecutor.Invoke((useSocketsHttpHandlerString, useHttp2String) => { bool exceptionLogged = false; bool activityStopLogged = false; @@ -807,13 +808,13 @@ public void SendAsync_ExpectedDiagnosticSynchronousExceptionActivityLogging() using (DiagnosticListener.AllListeners.Subscribe(diagnosticListenerObserver)) { diagnosticListenerObserver.Enable(); - using (HttpClientHandler handler = CreateHttpClientHandler(useSocketsHttpHandlerString)) - using (HttpClient client = new HttpClient(handler)) + using (HttpClientHandler handler = CreateHttpClientHandler(useSocketsHttpHandlerString, useHttp2String)) + using (HttpClient client = CreateHttpClient(handler, useHttp2String)) { // Set a https proxy. - handler.Proxy = new WebProxy($"https://{Guid.NewGuid()}.com", false); + handler.Proxy = new WebProxy($"https://_{Guid.NewGuid().ToString("N")}.com", false); HttpRequestMessage request = - new HttpRequestMessage(HttpMethod.Get, $"http://{Guid.NewGuid()}.com"); + new HttpRequestMessage(HttpMethod.Get, $"http://_{Guid.NewGuid().ToString("N")}.com"); if (bool.Parse(useSocketsHttpHandlerString)) { @@ -854,14 +855,14 @@ public void SendAsync_ExpectedDiagnosticSynchronousExceptionActivityLogging() } return RemoteExecutor.SuccessExitCode; - }, UseSocketsHttpHandler.ToString()).Dispose(); + }, UseSocketsHttpHandler.ToString(), UseHttp2.ToString()).Dispose(); } [OuterLoop("Uses external server")] [Fact] public void SendAsync_ExpectedDiagnosticSourceNewAndDeprecatedEventsLogging() { - RemoteExecutor.Invoke(useSocketsHttpHandlerString => + RemoteExecutor.Invoke((useSocketsHttpHandlerString, useHttp2String) => { bool requestLogged = false; bool responseLogged = false; @@ -891,7 +892,7 @@ public void SendAsync_ExpectedDiagnosticSourceNewAndDeprecatedEventsLogging() using (DiagnosticListener.AllListeners.Subscribe(diagnosticListenerObserver)) { diagnosticListenerObserver.Enable(); - using (HttpClient client = CreateHttpClient(useSocketsHttpHandlerString)) + using (HttpClient client = CreateHttpClient(useSocketsHttpHandlerString, useHttp2String)) { client.GetAsync(Configuration.Http.RemoteEchoServer).Result.Dispose(); } @@ -906,14 +907,14 @@ public void SendAsync_ExpectedDiagnosticSourceNewAndDeprecatedEventsLogging() } return RemoteExecutor.SuccessExitCode; - }, UseSocketsHttpHandler.ToString()).Dispose(); + }, UseSocketsHttpHandler.ToString(), UseHttp2.ToString()).Dispose(); } [OuterLoop("Uses external server")] [Fact] public void SendAsync_ExpectedDiagnosticExceptionOnlyActivityLogging() { - RemoteExecutor.Invoke(useSocketsHttpHandlerString => + RemoteExecutor.Invoke((useSocketsHttpHandlerString, useHttp2String) => { bool exceptionLogged = false; bool activityLogged = false; @@ -935,10 +936,10 @@ public void SendAsync_ExpectedDiagnosticExceptionOnlyActivityLogging() using (DiagnosticListener.AllListeners.Subscribe(diagnosticListenerObserver)) { diagnosticListenerObserver.Enable(s => s.Equals("System.Net.Http.Exception")); - using (HttpClient client = CreateHttpClient(useSocketsHttpHandlerString)) + using (HttpClient client = CreateHttpClient(useSocketsHttpHandlerString, useHttp2String)) { - Assert.ThrowsAsync(() => client.GetAsync($"http://{Guid.NewGuid()}.com")) - .Wait(); + Assert.ThrowsAsync(() => client.GetAsync($"http://_{Guid.NewGuid().ToString("N")}.com")) + .GetAwaiter().GetResult(); } // Poll with a timeout since logging response is not synchronized with returning a response. @@ -949,14 +950,14 @@ public void SendAsync_ExpectedDiagnosticExceptionOnlyActivityLogging() } return RemoteExecutor.SuccessExitCode; - }, UseSocketsHttpHandler.ToString()).Dispose(); + }, UseSocketsHttpHandler.ToString(), UseHttp2.ToString()).Dispose(); } [OuterLoop("Uses external server")] [Fact] public void SendAsync_ExpectedDiagnosticStopOnlyActivityLogging() { - RemoteExecutor.Invoke(useSocketsHttpHandlerString => + RemoteExecutor.Invoke((useSocketsHttpHandlerString, useHttp2String) => { bool activityStartLogged = false; bool activityStopLogged = false; @@ -977,7 +978,7 @@ public void SendAsync_ExpectedDiagnosticStopOnlyActivityLogging() using (DiagnosticListener.AllListeners.Subscribe(diagnosticListenerObserver)) { diagnosticListenerObserver.Enable(s => s.Equals("System.Net.Http.HttpRequestOut")); - using (HttpClient client = CreateHttpClient(useSocketsHttpHandlerString)) + using (HttpClient client = CreateHttpClient(useSocketsHttpHandlerString, useHttp2String)) { client.GetAsync(Configuration.Http.RemoteEchoServer).Result.Dispose(); } @@ -991,7 +992,7 @@ public void SendAsync_ExpectedDiagnosticStopOnlyActivityLogging() } return RemoteExecutor.SuccessExitCode; - }, UseSocketsHttpHandler.ToString()).Dispose(); + }, UseSocketsHttpHandler.ToString(), UseHttp2.ToString()).Dispose(); } [ActiveIssue(23209)] @@ -999,7 +1000,7 @@ public void SendAsync_ExpectedDiagnosticStopOnlyActivityLogging() [Fact] public void SendAsync_ExpectedDiagnosticCancelledActivityLogging() { - RemoteExecutor.Invoke(useSocketsHttpHandlerString => + RemoteExecutor.Invoke((useSocketsHttpHandlerString, useHttp2String) => { bool cancelLogged = false; var diagnosticListenerObserver = new FakeDiagnosticListenerObserver(kvp => @@ -1018,7 +1019,7 @@ public void SendAsync_ExpectedDiagnosticCancelledActivityLogging() using (DiagnosticListener.AllListeners.Subscribe(diagnosticListenerObserver)) { diagnosticListenerObserver.Enable(); - using (HttpClient client = CreateHttpClient(useSocketsHttpHandlerString)) + using (HttpClient client = CreateHttpClient(useSocketsHttpHandlerString, useHttp2String)) { LoopbackServer.CreateServerAsync(async (server, url) => { @@ -1031,7 +1032,7 @@ public void SendAsync_ExpectedDiagnosticCancelledActivityLogging() Task response = client.GetAsync(url, tcs.Token); await Assert.ThrowsAnyAsync(() => TestHelper.WhenAllCompletedOrAnyFailed(response, request)); - }).Wait(); + }).GetAwaiter().GetResult(); } } @@ -1041,7 +1042,7 @@ await Assert.ThrowsAnyAsync(() => diagnosticListenerObserver.Disable(); return RemoteExecutor.SuccessExitCode; - }, UseSocketsHttpHandler.ToString()).Dispose(); + }, UseSocketsHttpHandler.ToString(), UseHttp2.ToString()).Dispose(); } [Fact] diff --git a/src/System.Net.Http/tests/FunctionalTests/HttpClient.SelectedSitesTest.cs b/src/System.Net.Http/tests/FunctionalTests/HttpClient.SelectedSitesTest.cs index 8009eb7ecb56..d4d5b744d29b 100644 --- a/src/System.Net.Http/tests/FunctionalTests/HttpClient.SelectedSitesTest.cs +++ b/src/System.Net.Http/tests/FunctionalTests/HttpClient.SelectedSitesTest.cs @@ -114,7 +114,7 @@ private async Task VisitSiteWithClient(string site, HttpClient httpClient) private HttpClient CreateHttpClientForSiteVisit() { - HttpClient httpClient = new HttpClient(CreateHttpClientHandler(UseSocketsHttpHandler)); + HttpClient httpClient = CreateHttpClient(CreateHttpClientHandler(UseSocketsHttpHandler)); // Some extra headers since some sites only give proper responses when they are present. httpClient.DefaultRequestHeaders.Add( diff --git a/src/System.Net.Http/tests/FunctionalTests/HttpClientEKUTest.cs b/src/System.Net.Http/tests/FunctionalTests/HttpClientEKUTest.cs index 81d300211cca..3906e0a9c651 100644 --- a/src/System.Net.Http/tests/FunctionalTests/HttpClientEKUTest.cs +++ b/src/System.Net.Http/tests/FunctionalTests/HttpClientEKUTest.cs @@ -55,7 +55,7 @@ public async Task HttpClient_NoEKUServerAuth_Ok() using (var server = new HttpsTestServer(options)) using (HttpClientHandler handler = CreateHttpClientHandler()) - using (var client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient(handler)) { server.Start(); @@ -77,7 +77,7 @@ public async Task HttpClient_ClientEKUServerAuth_Fails() using (var server = new HttpsTestServer(options)) using (HttpClientHandler handler = CreateHttpClientHandler()) - using (var client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient(handler)) { server.Start(); @@ -100,7 +100,7 @@ public async Task HttpClient_NoEKUClientAuth_Ok() using (var server = new HttpsTestServer(options)) using (HttpClientHandler handler = CreateHttpClientHandler()) - using (var client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient(handler)) { server.Start(); @@ -124,7 +124,7 @@ public async Task HttpClient_ServerEKUClientAuth_Fails() using (var server = new HttpsTestServer(options)) using (HttpClientHandler handler = CreateHttpClientHandler()) - using (var client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient(handler)) { server.Start(); diff --git a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.AcceptAllCerts.cs b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.AcceptAllCerts.cs index 25e001635b98..2f9ec21a312e 100644 --- a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.AcceptAllCerts.cs +++ b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.AcceptAllCerts.cs @@ -39,7 +39,7 @@ public void SingletonReturnsTrue() public async Task SetDelegate_ConnectionSucceeds(SslProtocols acceptedProtocol, bool requestOnlyThisProtocol) { using (HttpClientHandler handler = CreateHttpClientHandler()) - using (var client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient(handler)) { handler.ServerCertificateCustomValidationCallback = HttpClientHandler.DangerousAcceptAnyServerCertificateValidator; @@ -75,7 +75,7 @@ await TestHelper.WhenAllCompletedOrAnyFailed( public async Task InvalidCertificateServers_CertificateValidationDisabled_Succeeds(string url) { using (HttpClientHandler handler = CreateHttpClientHandler()) - using (var client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient(handler)) { handler.ServerCertificateCustomValidationCallback = HttpClientHandler.DangerousAcceptAnyServerCertificateValidator; (await client.GetAsync(url)).Dispose(); diff --git a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Authentication.cs b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Authentication.cs index dd882fb5d6a3..7b793a240ee7 100644 --- a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Authentication.cs +++ b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Authentication.cs @@ -26,16 +26,16 @@ public abstract class HttpClientHandler_Authentication_Test : HttpClientHandlerT private static readonly NetworkCredential s_credentials = new NetworkCredential(Username, Password, Domain); private static readonly NetworkCredential s_credentialsNoDomain = new NetworkCredential(Username, Password); - private static readonly Func s_createAndValidateRequest = async (handler, url, expectedStatusCode, credentials) => + private async Task CreateAndValidateRequest(HttpClientHandler handler, Uri url, HttpStatusCode expectedStatusCode, ICredentials credentials) { handler.Credentials = credentials; - using (HttpClient client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient(handler)) using (HttpResponseMessage response = await client.GetAsync(url)) { Assert.Equal(expectedStatusCode, response.StatusCode); } - }; + } public HttpClientHandler_Authentication_Test(ITestOutputHelper output) : base(output) { } @@ -64,7 +64,7 @@ await LoopbackServer.CreateServerAsync(async (server, url) => server.AcceptConnectionSendResponseAndCloseAsync(HttpStatusCode.Unauthorized, serverAuthenticateHeader); await TestHelper.WhenAllCompletedOrAnyFailedWithTimeout(TestHelper.PassingTestTimeoutMilliseconds, - s_createAndValidateRequest(handler, url, result ? HttpStatusCode.OK : HttpStatusCode.Unauthorized, credentials), serverTask); + CreateAndValidateRequest(handler, url, result ? HttpStatusCode.OK : HttpStatusCode.Unauthorized, credentials), serverTask); }, options); } @@ -100,7 +100,7 @@ await LoopbackServer.CreateServerAsync(async (server, url) => { HttpClientHandler handler = CreateHttpClientHandler(); Task serverTask = server.AcceptConnectionPerformAuthenticationAndCloseAsync(authenticateHeader); - await TestHelper.WhenAllCompletedOrAnyFailed(s_createAndValidateRequest(handler, url, HttpStatusCode.OK, s_credentials), serverTask); + await TestHelper.WhenAllCompletedOrAnyFailed(CreateAndValidateRequest(handler, url, HttpStatusCode.OK, s_credentials), serverTask); }, options); } @@ -126,7 +126,7 @@ await LoopbackServer.CreateServerAsync(async (server, url) => credentials.Add(url, unsupportedAuth, new NetworkCredential(Username, Password, Domain)); Task serverTask = server.AcceptConnectionPerformAuthenticationAndCloseAsync(authenticateHeader); - await TestHelper.WhenAllCompletedOrAnyFailed(s_createAndValidateRequest(handler, url, HttpStatusCode.OK, credentials), serverTask); + await TestHelper.WhenAllCompletedOrAnyFailed(CreateAndValidateRequest(handler, url, HttpStatusCode.OK, credentials), serverTask); }, options); } @@ -140,7 +140,7 @@ await LoopbackServer.CreateServerAsync(async (server, url) => { HttpClientHandler handler = CreateHttpClientHandler(); Task serverTask = server.AcceptConnectionPerformAuthenticationAndCloseAsync(authenticateHeader); - await TestHelper.WhenAllCompletedOrAnyFailed(s_createAndValidateRequest(handler, url, HttpStatusCode.Unauthorized, new NetworkCredential("wronguser", "wrongpassword")), serverTask); + await TestHelper.WhenAllCompletedOrAnyFailed(CreateAndValidateRequest(handler, url, HttpStatusCode.Unauthorized, new NetworkCredential("wronguser", "wrongpassword")), serverTask); }, options); } @@ -187,7 +187,7 @@ public async Task PreAuthenticate_NoPreviousAuthenticatedRequests_NoCredentialsS await LoopbackServer.CreateClientAndServerAsync(async uri => { using (HttpClientHandler handler = CreateHttpClientHandler()) - using (var client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient(handler)) { client.DefaultRequestHeaders.ConnectionClose = true; // for simplicity of not needing to know every handler's pooling policy handler.PreAuthenticate = true; @@ -235,7 +235,7 @@ public async Task PreAuthenticate_FirstRequestNoHeaderAndAuthenticates_SecondReq await LoopbackServer.CreateClientAndServerAsync(async uri => { using (HttpClientHandler handler = CreateHttpClientHandler()) - using (var client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient(handler)) { client.DefaultRequestHeaders.ConnectionClose = true; // for simplicity of not needing to know every handler's pooling policy handler.PreAuthenticate = true; @@ -330,7 +330,7 @@ public async Task PreAuthenticate_FirstRequestNoHeader_SecondRequestVariousStatu await LoopbackServer.CreateClientAndServerAsync(async uri => { using (HttpClientHandler handler = CreateHttpClientHandler()) - using (var client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient(handler)) { client.DefaultRequestHeaders.ConnectionClose = true; // for simplicity of not needing to know every handler's pooling policy handler.PreAuthenticate = true; @@ -374,7 +374,7 @@ public async Task PreAuthenticate_AuthenticatedUrl_ThenTryDifferentUrl_SendsAuth await LoopbackServer.CreateClientAndServerAsync(async uri => { using (HttpClientHandler handler = CreateHttpClientHandler()) - using (var client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient(handler)) { client.DefaultRequestHeaders.ConnectionClose = true; // for simplicity of not needing to know every handler's pooling policy handler.PreAuthenticate = true; @@ -410,7 +410,7 @@ public async Task PreAuthenticate_SuccessfulBasicButThenFails_DoesntLoopInfinite await LoopbackServer.CreateClientAndServerAsync(async uri => { using (HttpClientHandler handler = CreateHttpClientHandler()) - using (var client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient(handler)) { client.DefaultRequestHeaders.ConnectionClose = true; // for simplicity of not needing to know every handler's pooling policy handler.PreAuthenticate = true; @@ -468,7 +468,7 @@ public async Task PreAuthenticate_SuccessfulBasic_ThenDigestChallenged() await LoopbackServer.CreateClientAndServerAsync(async uri => { using (HttpClientHandler handler = CreateHttpClientHandler()) - using (var client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient(handler)) { client.DefaultRequestHeaders.ConnectionClose = true; // for simplicity of not needing to know every handler's pooling policy handler.PreAuthenticate = true; @@ -528,7 +528,7 @@ public async Task Credentials_DomainJoinedServerUsesKerberos_Success() } using (HttpClientHandler handler = CreateHttpClientHandler()) - using (var client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient(handler)) { handler.Credentials = new NetworkCredential( Configuration.Security.ActiveDirectoryUserName, @@ -563,7 +563,7 @@ public async Task Credentials_ServerUsesWindowsAuthentication_Success(string ser } using (HttpClientHandler handler = CreateHttpClientHandler()) - using (var client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient(handler)) { handler.Credentials = new NetworkCredential( Configuration.Security.WindowsServerUserName, @@ -600,7 +600,7 @@ await LoopbackServerFactory.CreateClientAndServerAsync( async uri => { using (HttpClientHandler handler = CreateHttpClientHandler()) - using (var client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient(handler)) { handler.Credentials = new NetworkCredential("username", "password"); await client.GetAsync(uri); diff --git a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.AutoRedirect.cs b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.AutoRedirect.cs index 9a3fb6f7a883..a390e479af65 100644 --- a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.AutoRedirect.cs +++ b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.AutoRedirect.cs @@ -74,7 +74,7 @@ public async Task GetAsync_AllowAutoRedirectFalse_RedirectFromHttpToHttp_StatusC HttpClientHandler handler = CreateHttpClientHandler(); handler.AllowAutoRedirect = false; - using (var client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient(handler)) { Uri uri = Configuration.Http.RedirectUriForDestinationUri( secure: false, @@ -108,11 +108,11 @@ public async Task AllowAutoRedirect_True_ValidateNewMethodUsedOnRedirection( } HttpClientHandler handler = CreateHttpClientHandler(); - using (var client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient(handler)) { await LoopbackServer.CreateServerAsync(async (origServer, origUrl) => { - var request = new HttpRequestMessage(new HttpMethod(oldMethod), origUrl); + var request = new HttpRequestMessage(new HttpMethod(oldMethod), origUrl) { Version = VersionFromUseHttp2 }; Task getResponseTask = client.SendAsync(request); @@ -168,11 +168,11 @@ public async Task AllowAutoRedirect_True_PostToGetDoesNotSendTE(int statusCode) } HttpClientHandler handler = CreateHttpClientHandler(); - using (var client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient(handler)) { await LoopbackServer.CreateServerAsync(async (origServer, origUrl) => { - var request = new HttpRequestMessage(HttpMethod.Post, origUrl); + var request = new HttpRequestMessage(HttpMethod.Post, origUrl) { Version = VersionFromUseHttp2 }; request.Content = new StringContent(ExpectedContent); request.Headers.TransferEncodingChunked = true; @@ -234,7 +234,7 @@ public async Task GetAsync_AllowAutoRedirectTrue_RedirectFromHttpToHttp_StatusCo HttpClientHandler handler = CreateHttpClientHandler(); handler.AllowAutoRedirect = true; - using (var client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient(handler)) { Uri uri = Configuration.Http.RedirectUriForDestinationUri( secure: false, @@ -256,7 +256,7 @@ public async Task GetAsync_AllowAutoRedirectTrue_RedirectFromHttpToHttps_StatusC { HttpClientHandler handler = CreateHttpClientHandler(); handler.AllowAutoRedirect = true; - using (var client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient(handler)) { Uri uri = Configuration.Http.RedirectUriForDestinationUri( secure: false, @@ -279,7 +279,7 @@ public async Task GetAsync_AllowAutoRedirectTrue_RedirectFromHttpsToHttp_StatusC { HttpClientHandler handler = CreateHttpClientHandler(); handler.AllowAutoRedirect = true; - using (var client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient(handler)) { Uri uri = Configuration.Http.RedirectUriForDestinationUri( secure: true, @@ -307,7 +307,7 @@ public async Task GetAsync_AllowAutoRedirectTrue_RedirectWithoutLocation_Returns HttpClientHandler handler = CreateHttpClientHandler(); handler.AllowAutoRedirect = true; - using (var client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient(handler)) { await LoopbackServer.CreateServerAsync(async (server, url) => { @@ -331,7 +331,7 @@ public async Task GetAsync_AllowAutoRedirectTrue_RedirectToUriWithParams_Request HttpClientHandler handler = CreateHttpClientHandler(); handler.AllowAutoRedirect = true; Uri targetUri = Configuration.Http.BasicAuthUriForCreds(secure: false, userName: Username, password: Password); - using (var client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient(handler)) { Uri uri = Configuration.Http.RedirectUriForDestinationUri( secure: false, @@ -371,7 +371,7 @@ public async Task GetAsync_MaxAutomaticRedirectionsNServerHops_ThrowsIfTooMany(i HttpClientHandler handler = CreateHttpClientHandler(); handler.MaxAutomaticRedirections = maxHops; - using (var client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient(handler)) { Task t = client.GetAsync(Configuration.Http.RedirectUriForDestinationUri( secure: false, @@ -410,7 +410,7 @@ public async Task GetAsync_AllowAutoRedirectTrue_RedirectWithRelativeLocation() { HttpClientHandler handler = CreateHttpClientHandler(); handler.AllowAutoRedirect = true; - using (var client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient(handler)) { Uri uri = Configuration.Http.RedirectUriForDestinationUri( secure: false, @@ -436,7 +436,7 @@ public async Task GetAsync_AllowAutoRedirectTrue_NonRedirectStatusCode_LocationH { HttpClientHandler handler = CreateHttpClientHandler(); handler.AllowAutoRedirect = true; - using (var client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient(handler)) { await LoopbackServer.CreateServerAsync(async (origServer, origUrl) => { @@ -495,7 +495,7 @@ public async Task GetAsync_AllowAutoRedirectTrue_RetainsOriginalFragmentIfApprop HttpClientHandler handler = CreateHttpClientHandler(); handler.AllowAutoRedirect = true; - using (var client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient(handler)) { await LoopbackServer.CreateServerAsync(async (origServer, origUrl) => { @@ -539,7 +539,7 @@ public async Task GetAsync_CredentialIsNetworkCredentialUriRedirect_StatusCodeUn { HttpClientHandler handler = CreateHttpClientHandler(); handler.Credentials = _credential; - using (var client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient(handler)) { Uri redirectUri = Configuration.Http.RedirectUriForCreds( secure: false, @@ -560,7 +560,7 @@ public async Task HttpClientHandler_CredentialIsNotCredentialCacheAfterRedirect_ { HttpClientHandler handler = CreateHttpClientHandler(); handler.Credentials = _credential; - using (var client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient(handler)) { Uri redirectUri = Configuration.Http.RedirectUriForCreds( secure: false, @@ -611,7 +611,7 @@ public async Task GetAsync_CredentialIsCredentialCacheUriRedirect_StatusCodeOK(i else { handler.Credentials = credentialCache; - using (var client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient(handler)) { using (HttpResponseMessage response = await client.GetAsync(redirectUri)) { @@ -634,7 +634,7 @@ public async Task DefaultHeaders_SetCredentials_ClearedOnRedirect(int statusCode } HttpClientHandler handler = CreateHttpClientHandler(); - using (var client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient(handler)) { string credentialString = _credential.UserName + ":" + _credential.Password; client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Basic", credentialString); diff --git a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Cancellation.cs b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Cancellation.cs index 9c061ade7e92..cd03b96434d9 100644 --- a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Cancellation.cs +++ b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Cancellation.cs @@ -41,7 +41,8 @@ await LoopbackServer.CreateClientAndServerAsync(async uri => var waitToSend = new TaskCompletionSource(); var contentSending = new TaskCompletionSource(); - var req = new HttpRequestMessage(HttpMethod.Post, uri) { Content = new ByteAtATimeContent(int.MaxValue, waitToSend.Task, contentSending) }; + var req = new HttpRequestMessage(HttpMethod.Post, uri) { Version = VersionFromUseHttp2 }; + req.Content = new ByteAtATimeContent(int.MaxValue, waitToSend.Task, contentSending); req.Headers.TransferEncodingChunked = chunkedTransfer; Task resp = client.SendAsync(req, HttpCompletionOption.ResponseHeadersRead, cts.Token); @@ -83,7 +84,7 @@ await connection.ReadRequestHeaderAndSendCustomResponseAsync( await ValidateClientCancellationAsync(async () => { - var req = new HttpRequestMessage(HttpMethod.Get, url); + var req = new HttpRequestMessage(HttpMethod.Get, url) { Version = VersionFromUseHttp2 }; req.Headers.ConnectionClose = connectionClose; Task getResponse = client.SendAsync(req, HttpCompletionOption.ResponseHeadersRead, cts.Token); @@ -131,7 +132,7 @@ await connection.ReadRequestHeaderAndSendCustomResponseAsync( await ValidateClientCancellationAsync(async () => { - var req = new HttpRequestMessage(HttpMethod.Get, url); + var req = new HttpRequestMessage(HttpMethod.Get, url) { Version = VersionFromUseHttp2 }; req.Headers.ConnectionClose = connectionClose; Task getResponse = client.SendAsync(req, HttpCompletionOption.ResponseContentRead, cts.Token); @@ -181,7 +182,7 @@ await connection.ReadRequestHeaderAndSendCustomResponseAsync( await clientFinished.Task; }); - var req = new HttpRequestMessage(HttpMethod.Get, url); + var req = new HttpRequestMessage(HttpMethod.Get, url) { Version = VersionFromUseHttp2 }; req.Headers.ConnectionClose = connectionClose; Task getResponse = client.SendAsync(req, HttpCompletionOption.ResponseHeadersRead, cts.Token); await ValidateClientCancellationAsync(async () => @@ -304,7 +305,7 @@ public async Task MaxConnectionsPerServer_WaitingConnectionsAreCancelable() } using (HttpClientHandler handler = CreateHttpClientHandler()) - using (HttpClient client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient(handler)) { handler.MaxConnectionsPerServer = 1; client.Timeout = Timeout.InfiniteTimeSpan; diff --git a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.ClientCertificates.cs b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.ClientCertificates.cs index a052ed00c135..be8e265258c5 100644 --- a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.ClientCertificates.cs +++ b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.ClientCertificates.cs @@ -80,7 +80,7 @@ public async Task Automatic_SSLBackendNotSupported_ThrowsPlatformNotSupportedExc } using (HttpClientHandler handler = CreateHttpClientHandler()) - using (var client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient(handler)) { handler.ClientCertificateOptions = ClientCertificateOption.Automatic; await Assert.ThrowsAsync(() => client.GetAsync(Configuration.Http.SecureRemoteEchoServer)); @@ -98,7 +98,7 @@ public async Task Manual_SSLBackendNotSupported_ThrowsPlatformNotSupportedExcept HttpClientHandler handler = CreateHttpClientHandler(); handler.ClientCertificates.Add(Configuration.Certificates.GetClientCertificate()); - using (var client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient(handler)) { await Assert.ThrowsAsync(() => client.GetAsync(Configuration.Http.SecureRemoteEchoServer)); } @@ -126,7 +126,7 @@ public void Manual_SelectClientCertificateForRemoteServer_ServerOnlyReceivesVali // UAP HTTP stack caches connections per-process. This causes interference when these tests run in // the same process as the other tests. Each test needs to be isolated to its own process. // See dicussion: https://github.com/dotnet/corefx/issues/21945 - RemoteExecutor.Invoke(async (certIndexString, expectedStatusCodeString, useSocketsHttpHandlerString) => + RemoteExecutor.Invoke((certIndexString, expectedStatusCodeString, useSocketsHttpHandlerString, useHttp2String) => { X509Certificate2 clientCert = null; @@ -151,21 +151,21 @@ public void Manual_SelectClientCertificateForRemoteServer_ServerOnlyReceivesVali Assert.NotNull(clientCert); var statusCode = (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), expectedStatusCodeString); - HttpClientHandler handler = CreateHttpClientHandler(useSocketsHttpHandlerString); + HttpClientHandler handler = CreateHttpClientHandler(useSocketsHttpHandlerString, useHttp2String); handler.ClientCertificates.Add(clientCert); - using (var client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient(handler, useHttp2String)) { var request = new HttpRequestMessage(); request.RequestUri = new Uri(Configuration.Http.EchoClientCertificateRemoteServer); // Issue #35239. Force HTTP/1.1. request.Version = new Version(1,1); - HttpResponseMessage response = await client.SendAsync(request); + HttpResponseMessage response = client.SendAsync(request).GetAwaiter().GetResult(); // need a 4-arg overload of RemoteInvoke that returns a Task Assert.Equal(statusCode, response.StatusCode); if (statusCode == HttpStatusCode.OK) { - string body = await response.Content.ReadAsStringAsync(); + string body = response.Content.ReadAsStringAsync().GetAwaiter().GetResult(); // need a 4-arg overload of RemoteInvoke that returns a Task byte[] bytes = Convert.FromBase64String(body); var receivedCert = new X509Certificate2(bytes); Assert.Equal(clientCert, receivedCert); @@ -173,7 +173,7 @@ public void Manual_SelectClientCertificateForRemoteServer_ServerOnlyReceivesVali return RemoteExecutor.SuccessExitCode; } - }, certIndex.ToString(), expectedStatusCode.ToString(), UseSocketsHttpHandler.ToString()).Dispose(); + }, certIndex.ToString(), expectedStatusCode.ToString(), UseSocketsHttpHandler.ToString(), UseHttp2.ToString()).Dispose(); } [ActiveIssue(30056, TargetFrameworkMonikers.Uap)] @@ -193,16 +193,16 @@ public async Task Manual_CertificateSentMatchesCertificateReceived_Success( var options = new LoopbackServer.Options { UseSsl = true }; - Func createClient = (cert) => + HttpClient CreateClient(X509Certificate2 cert) { HttpClientHandler handler = CreateHttpClientHandler(); - handler.ServerCertificateCustomValidationCallback = delegate { return true; }; + handler.ServerCertificateCustomValidationCallback = TestHelper.AllowAllCertificates; handler.ClientCertificates.Add(cert); Assert.True(handler.ClientCertificates.Contains(cert)); - return new HttpClient(handler); - }; + return CreateHttpClient(handler); + } - Func makeAndValidateRequest = async (client, server, url, cert) => + async Task MakeAndValidateRequest(HttpClient client, LoopbackServer server, Uri url, X509Certificate2 cert) { await TestHelper.WhenAllCompletedOrAnyFailed( client.GetStringAsync(url), @@ -227,11 +227,11 @@ await LoopbackServer.CreateServerAsync(async (server, url) => { if (reuseClient) { - using (HttpClient client = createClient(cert)) + using (HttpClient client = CreateClient(cert)) { for (int i = 0; i < numberOfRequests; i++) { - await makeAndValidateRequest(client, server, url, cert); + await MakeAndValidateRequest(client, server, url, cert); GC.Collect(); GC.WaitForPendingFinalizers(); @@ -242,9 +242,9 @@ await LoopbackServer.CreateServerAsync(async (server, url) => { for (int i = 0; i < numberOfRequests; i++) { - using (HttpClient client = createClient(cert)) + using (HttpClient client = CreateClient(cert)) { - await makeAndValidateRequest(client, server, url, cert); + await MakeAndValidateRequest(client, server, url, cert); } GC.Collect(); @@ -270,9 +270,9 @@ public async Task AutomaticOrManual_DoesntFailRegardlessOfWhetherClientCertsAreA } using (HttpClientHandler handler = CreateHttpClientHandler()) - using (var client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient(handler)) { - handler.ServerCertificateCustomValidationCallback = delegate { return true; }; + handler.ServerCertificateCustomValidationCallback = TestHelper.AllowAllCertificates; handler.ClientCertificateOptions = mode; await LoopbackServer.CreateServerAsync(async server => diff --git a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Cookies.cs b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Cookies.cs index 060a5ef3f831..9fffe0043f15 100644 --- a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Cookies.cs +++ b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Cookies.cs @@ -69,7 +69,7 @@ await LoopbackServerFactory.CreateClientAndServerAsync( handler.CookieContainer = CreateSingleCookieContainer(uri, cookieName, cookieValue); handler.UseCookies = useCookies; - using (HttpClient client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient(handler)) { await client.GetAsync(uri); } @@ -109,7 +109,7 @@ await LoopbackServerFactory.CreateClientAndServerAsync( } handler.CookieContainer = cookieContainer; - using (HttpClient client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient(handler)) { await client.GetAsync(uri); } @@ -129,10 +129,9 @@ public async Task GetAsync_AddCookieHeader_CookieHeaderSent() await LoopbackServerFactory.CreateClientAndServerAsync( async uri => { - HttpClientHandler handler = CreateHttpClientHandler(); - using (HttpClient client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient()) { - HttpRequestMessage requestMessage = new HttpRequestMessage(HttpMethod.Get, uri); + var requestMessage = new HttpRequestMessage(HttpMethod.Get, uri) { Version = VersionFromUseHttp2 }; requestMessage.Headers.Add("Cookie", s_customCookieHeaderValue); await client.SendAsync(requestMessage); @@ -153,10 +152,9 @@ public async Task GetAsync_AddMultipleCookieHeaders_CookiesSent() await LoopbackServerFactory.CreateClientAndServerAsync( async uri => { - HttpClientHandler handler = CreateHttpClientHandler(); - using (HttpClient client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient()) { - HttpRequestMessage requestMessage = new HttpRequestMessage(HttpMethod.Get, uri); + var requestMessage = new HttpRequestMessage(HttpMethod.Get, uri) { Version = VersionFromUseHttp2 }; requestMessage.Headers.Add("Cookie", "A=1"); requestMessage.Headers.Add("Cookie", "B=2"); requestMessage.Headers.Add("Cookie", "C=3"); @@ -224,9 +222,9 @@ await LoopbackServerFactory.CreateServerAsync(async (server, url) => HttpClientHandler handler = CreateHttpClientHandler(); handler.CookieContainer = CreateSingleCookieContainer(url); - using (HttpClient client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient(handler)) { - HttpRequestMessage requestMessage = new HttpRequestMessage(HttpMethod.Get, url); + var requestMessage = new HttpRequestMessage(HttpMethod.Get, url) { Version = VersionFromUseHttp2 }; requestMessage.Headers.Add("Cookie", s_customCookieHeaderValue); Task getResponseTask = client.SendAsync(requestMessage); @@ -260,9 +258,9 @@ await LoopbackServerFactory.CreateServerAsync(async (server, url) => HttpClientHandler handler = CreateHttpClientHandler(); handler.CookieContainer = CreateSingleCookieContainer(url); - using (HttpClient client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient(handler)) { - HttpRequestMessage requestMessage = new HttpRequestMessage(HttpMethod.Get, url); + var requestMessage = new HttpRequestMessage(HttpMethod.Get, url) { Version = VersionFromUseHttp2 }; requestMessage.Headers.Add("Cookie", "A=1"); requestMessage.Headers.Add("Cookie", "B=2"); @@ -321,7 +319,7 @@ await LoopbackServerFactory.CreateClientAndServerAsync(async url => handler.CookieContainer.Add(url2, new Cookie("cookie2", "value2")); handler.CookieContainer.Add(unusedUrl, new Cookie("cookie3", "value3")); - using (HttpClient client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient(handler)) { client.DefaultRequestHeaders.ConnectionClose = true; // to avoid issues with connection pooling await client.GetAsync(url1); @@ -350,7 +348,7 @@ await LoopbackServerFactory.CreateServerAsync(async (server, url) => HttpClientHandler handler = CreateHttpClientHandler(); handler.UseCookies = useCookies; - using (HttpClient client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient(handler)) { Task getResponseTask = client.GetAsync(url); Task serverTask = server.HandleRequestAsync( @@ -380,7 +378,7 @@ await LoopbackServerFactory.CreateServerAsync(async (server, url) => { HttpClientHandler handler = CreateHttpClientHandler(); - using (HttpClient client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient(handler)) { Task getResponseTask = client.GetAsync(url); Task serverTask = server.HandleRequestAsync( @@ -418,7 +416,7 @@ await LoopbackServerFactory.CreateServerAsync(async (server, url) => HttpClientHandler handler = CreateHttpClientHandler(); handler.CookieContainer = CreateSingleCookieContainer(url); - using (HttpClient client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient(handler)) { Task getResponseTask = client.GetAsync(url); Task serverTask = server.HandleRequestAsync( @@ -444,7 +442,7 @@ await LoopbackServerFactory.CreateServerAsync(async (server, url) => HttpClientHandler handler = CreateHttpClientHandler(); handler.CookieContainer = CreateSingleCookieContainer(url); - using (HttpClient client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient(handler)) { Task getResponseTask = client.GetAsync(url); Task serverTask = server.HandleRequestAsync( @@ -473,7 +471,7 @@ await LoopbackServerFactory.CreateServerAsync(async (server, url) => { HttpClientHandler handler = CreateHttpClientHandler(); - using (HttpClient client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient(handler)) { Task getResponseTask = client.GetAsync(url); Task serverTask = server.HandleRequestAsync( @@ -512,7 +510,7 @@ await LoopbackServerFactory.CreateClientAndServerAsync(async url => HttpClientHandler handler = CreateHttpClientHandler(); - using (HttpClient client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient(handler)) { client.DefaultRequestHeaders.ConnectionClose = true; // to avoid issues with connection pooling await client.GetAsync(url1); @@ -569,7 +567,7 @@ await LoopbackServerFactory.CreateClientAndServerAsync(async url => HttpClientHandler handler = CreateHttpClientHandler(); handler.Credentials = new NetworkCredential("user", "pass"); - using (HttpClient client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient(handler)) { await client.GetAsync(url); @@ -682,7 +680,7 @@ await LoopbackServer.CreateServerAsync(async (server, url) => { HttpClientHandler handler = CreateHttpClientHandler(); - using (HttpClient client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient(handler)) { Task getResponseTask = client.GetAsync(url); Task> serverTask = server.AcceptConnectionSendResponseAndCloseAsync( diff --git a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Decompression.cs b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Decompression.cs index dd1a284b8f36..47c69af845a9 100644 --- a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Decompression.cs +++ b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Decompression.cs @@ -62,7 +62,7 @@ public async Task DecompressedResponse_MethodSpecified_DecompressedContentReturn await LoopbackServer.CreateClientAndServerAsync(async uri => { using (HttpClientHandler handler = CreateHttpClientHandler()) - using (var client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient(handler)) { handler.AutomaticDecompression = methods; Assert.Equal(expectedContent, await client.GetByteArrayAsync(uri)); @@ -128,7 +128,7 @@ public async Task DecompressedResponse_MethodNotSpecified_OriginalContentReturne await LoopbackServer.CreateClientAndServerAsync(async uri => { using (HttpClientHandler handler = CreateHttpClientHandler()) - using (var client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient(handler)) { handler.AutomaticDecompression = methods; Assert.Equal(compressedContent, await client.GetByteArrayAsync(uri)); @@ -150,7 +150,7 @@ public async Task GetAsync_SetAutomaticDecompression_ContentDecompressed(Uri ser { HttpClientHandler handler = CreateHttpClientHandler(); handler.AutomaticDecompression = DecompressionMethods.GZip | DecompressionMethods.Deflate; - using (var client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient(handler)) { using (HttpResponseMessage response = await client.GetAsync(server)) { @@ -172,7 +172,7 @@ public async Task GetAsync_SetAutomaticDecompression_HeadersRemoved(Uri server) { HttpClientHandler handler = CreateHttpClientHandler(); handler.AutomaticDecompression = DecompressionMethods.GZip | DecompressionMethods.Deflate; - using (var client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient(handler)) using (HttpResponseMessage response = await client.GetAsync(server, HttpCompletionOption.ResponseHeadersRead)) { Assert.Equal(HttpStatusCode.OK, response.StatusCode); @@ -222,7 +222,7 @@ await LoopbackServer.CreateServerAsync(async (server, url) => HttpClientHandler handler = CreateHttpClientHandler(); handler.AutomaticDecompression = methods; - using (var client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient(handler)) { if (!string.IsNullOrEmpty(manualAcceptEncodingHeaderValues)) { diff --git a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.DefaultProxyCredentials.cs b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.DefaultProxyCredentials.cs index aab74804a20a..b568eaea574a 100644 --- a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.DefaultProxyCredentials.cs +++ b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.DefaultProxyCredentials.cs @@ -59,7 +59,7 @@ public async Task ProxyExplicitlyProvided_DefaultCredentials_Ignored() await LoopbackServer.CreateClientAndServerAsync(async proxyUrl => { using (HttpClientHandler handler = CreateHttpClientHandler()) - using (var client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient(handler)) { handler.Proxy = new UseSpecifiedUriWebProxy(proxyUrl, explicitProxyCreds); handler.DefaultProxyCredentials = defaultSystemProxyCreds; @@ -106,10 +106,10 @@ await LoopbackServer.CreateServerAsync(async (proxyServer, proxyUri) => psi.Environment.Add("http_proxy", $"http://{proxyUri.Host}:{proxyUri.Port}"); } - RemoteExecutor.Invoke(async (useProxyString, useSocketsHttpHandlerString) => + RemoteExecutor.Invoke(async (useProxyString, useSocketsHttpHandlerString, useHttp2String) => { - using (HttpClientHandler handler = CreateHttpClientHandler(useSocketsHttpHandlerString)) - using (var client = new HttpClient(handler)) + using (HttpClientHandler handler = CreateHttpClientHandler(useSocketsHttpHandlerString, useHttp2String)) + using (HttpClient client = CreateHttpClient(handler, useHttp2String)) { var creds = new NetworkCredential(ExpectedUsername, ExpectedPassword); handler.DefaultProxyCredentials = creds; @@ -117,10 +117,10 @@ await LoopbackServer.CreateServerAsync(async (proxyServer, proxyUri) => HttpResponseMessage response = await client.GetAsync(Configuration.Http.RemoteEchoServer); // Correctness of user and password is done in server part. - Assert.True(response.StatusCode == HttpStatusCode.OK); + Assert.True(response.StatusCode == HttpStatusCode.OK); } return RemoteExecutor.SuccessExitCode; - }, useProxy.ToString(), UseSocketsHttpHandler.ToString(), new RemoteInvokeOptions { StartInfo = psi }).Dispose(); + }, useProxy.ToString(), UseSocketsHttpHandler.ToString(), UseHttp2.ToString(), new RemoteInvokeOptions { StartInfo = psi }).Dispose(); if (useProxy) { await proxyTask; @@ -138,7 +138,7 @@ public async Task ProxyNotExplicitlyProvided_DefaultCredentialsSet_DefaultWebPro WebRequest.DefaultWebProxy = null; using (HttpClientHandler handler = CreateHttpClientHandler()) - using (var client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient(handler)) { handler.DefaultProxyCredentials = new NetworkCredential("UsernameNotUsed", "PasswordNotUsed"); HttpResponseMessage response = await client.GetAsync(Configuration.Http.RemoteEchoServer); diff --git a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Headers.cs b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Headers.cs index 3b2d0b98afcf..82a123cd5927 100644 --- a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Headers.cs +++ b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Headers.cs @@ -7,8 +7,6 @@ using System.Linq; using System.Net.Http.Headers; using System.Net.Test.Common; -using System.Text; -using System.Threading; using System.Threading.Tasks; using Xunit; @@ -31,9 +29,9 @@ public async Task SendAsync_UserAgent_CorrectlyWritten() await LoopbackServerFactory.CreateClientAndServerAsync(async uri => { - using (var client = CreateHttpClient()) + using (HttpClient client = CreateHttpClient()) { - var message = new HttpRequestMessage(HttpMethod.Get, uri); + var message = new HttpRequestMessage(HttpMethod.Get, uri) { Version = VersionFromUseHttp2 }; message.Headers.TryAddWithoutValidation("User-Agent", userAgent); (await client.SendAsync(message).ConfigureAwait(false)).Dispose(); } @@ -57,7 +55,7 @@ await LoopbackServerFactory.CreateClientAndServerAsync(async uri => HttpClientHandler handler = CreateHttpClientHandler(); using (HttpClient client = CreateHttpClient()) { - var request = new HttpRequestMessage(HttpMethod.Get, uri); + var request = new HttpRequestMessage(HttpMethod.Get, uri) { Version = VersionFromUseHttp2 }; Assert.True(request.Headers.TryAddWithoutValidation("bad", value)); await Assert.ThrowsAsync(() => client.SendAsync(request)); @@ -81,9 +79,9 @@ public async Task SendAsync_SpecialCharacterHeader_Success() string headerValue = "header name with underscore"; await LoopbackServerFactory.CreateClientAndServerAsync(async uri => { - using (var client = CreateHttpClient()) + using (HttpClient client = CreateHttpClient()) { - var message = new HttpRequestMessage(HttpMethod.Get, uri); + var message = new HttpRequestMessage(HttpMethod.Get, uri) { Version = VersionFromUseHttp2 }; message.Headers.TryAddWithoutValidation("x-Special_name", "header name with underscore"); (await client.SendAsync(message).ConfigureAwait(false)).Dispose(); } @@ -103,13 +101,13 @@ await LoopbackServerFactory.CreateClientAndServerAsync(async uri => public async Task GetAsync_LargeHeader_Success(string headerName, int headerValueLength) { var rand = new Random(42); - string headerValue = new string(Enumerable.Range(0, headerValueLength).Select(_ => (char)('A' + rand.Next(26))).ToArray()); + string headerValue = string.Concat(Enumerable.Range(0, headerValueLength).Select(_ => (char)('A' + rand.Next(26)))); const string ContentString = "hello world"; await LoopbackServerFactory.CreateClientAndServerAsync(async uri => { - using (var client = CreateHttpClient()) - using (HttpResponseMessage resp = await client.GetAsync(uri)) + using (HttpClient client = CreateHttpClient()) + using (HttpResponseMessage resp = await client.GetAsync(uri, HttpCompletionOption.ResponseHeadersRead)) { Assert.Equal(headerValue, resp.Headers.GetValues(headerName).Single()); Assert.Equal(ContentString, await resp.Content.ReadAsStringAsync()); @@ -137,7 +135,7 @@ await LoopbackServerFactory.CreateClientAndServerAsync(async uri => { HttpResponseMessage response = await client.GetAsync(uri).ConfigureAwait(false); // HTTP/1.1 LoopbackServer adds Connection: close and Date to responses. - Assert.Equal(UseHttp2LoopbackServer ? headers.Count : headers.Count + 2, response.Headers.Count()); + Assert.Equal(UseHttp2 ? headers.Count : headers.Count + 2, response.Headers.Count()); Assert.NotNull(response.Headers.GetValues("x-empty")); } }, @@ -152,7 +150,7 @@ public async Task GetAsync_MissingExpires_ReturnNull() { await LoopbackServerFactory.CreateClientAndServerAsync(async uri => { - using (var client = CreateHttpClient()) + using (HttpClient client = CreateHttpClient()) { HttpResponseMessage response = await client.GetAsync(uri); Assert.Null(response.Content.Headers.Expires); @@ -172,9 +170,9 @@ public async Task SendAsync_Expires_Success(string value, bool isValid) { await LoopbackServerFactory.CreateClientAndServerAsync(async uri => { - using (var client = CreateHttpClient()) + using (HttpClient client = CreateHttpClient()) { - var message = new HttpRequestMessage(HttpMethod.Get, uri); + var message = new HttpRequestMessage(HttpMethod.Get, uri) { Version = VersionFromUseHttp2 }; HttpResponseMessage response = await client.SendAsync(message); Assert.NotNull(response.Content.Headers.Expires); // Invalid date should be converted to MinValue so everything is expired. @@ -210,7 +208,7 @@ public void HeadersAdd_CustomExpires_Success(string value, bool isValid) [InlineData(true)] public async Task SendAsync_GetWithValidHostHeader_Success(bool withPort) { - var m = new HttpRequestMessage(HttpMethod.Get, Configuration.Http.SecureRemoteEchoServer); + var m = new HttpRequestMessage(HttpMethod.Get, Configuration.Http.SecureRemoteEchoServer) { Version = VersionFromUseHttp2 }; m.Headers.Host = withPort ? Configuration.Http.SecureHost + ":443" : Configuration.Http.SecureHost; using (HttpClient client = CreateHttpClient()) @@ -237,7 +235,7 @@ public async Task SendAsync_GetWithInvalidHostHeader_ThrowsException() return; } - var m = new HttpRequestMessage(HttpMethod.Get, Configuration.Http.SecureRemoteEchoServer); + var m = new HttpRequestMessage(HttpMethod.Get, Configuration.Http.SecureRemoteEchoServer) { Version = VersionFromUseHttp2 }; m.Headers.Host = "hostheaderthatdoesnotmatch"; using (HttpClient client = CreateHttpClient()) diff --git a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Http1.cs b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Http1.cs index b75e0b32fc7f..88b143ecbc02 100644 --- a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Http1.cs +++ b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Http1.cs @@ -16,7 +16,6 @@ namespace System.Net.Http.Functional.Tests public class HttpClientHandlerTest_Http1 : HttpClientHandlerTestBase { protected override bool UseSocketsHttpHandler => true; - protected override bool UseHttp2LoopbackServer => false; public HttpClientHandlerTest_Http1(ITestOutputHelper output) : base(output) { } @@ -28,7 +27,7 @@ await LoopbackServer.CreateServerAsync(async (server, url) => { using (HttpClient client = CreateHttpClient()) { - HttpRequestMessage request = new HttpRequestMessage(HttpMethod.Get, url); + HttpRequestMessage request = new HttpRequestMessage(HttpMethod.Get, url) { Version = HttpVersion.Version11 }; request.Headers.Add("X-foo", "bar"); Task sendTask = client.SendAsync(request); diff --git a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Http2.cs b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Http2.cs index bb5fc03d8a1b..b85cc03f8ced 100644 --- a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Http2.cs +++ b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Http2.cs @@ -17,7 +17,7 @@ namespace System.Net.Http.Functional.Tests public abstract class HttpClientHandlerTest_Http2 : HttpClientHandlerTestBase { protected override bool UseSocketsHttpHandler => true; - protected override bool UseHttp2LoopbackServer => true; + protected override bool UseHttp2 => true; public static bool SupportsAlpn => PlatformDetection.SupportsAlpn; @@ -58,7 +58,7 @@ public enum ProtocolErrors public async Task Http2_ClientPreface_Sent() { using (var server = Http2LoopbackServer.CreateServer()) - using (var client = CreateHttpClient()) + using (HttpClient client = CreateHttpClient()) { Task sendTask = client.GetAsync(server.Address); @@ -72,7 +72,7 @@ public async Task Http2_ClientPreface_Sent() public async Task Http2_InitialSettings_SentAndAcked() { using (var server = Http2LoopbackServer.CreateServer()) - using (var client = CreateHttpClient()) + using (HttpClient client = CreateHttpClient()) { Task sendTask = client.GetAsync(server.Address); @@ -104,7 +104,7 @@ public async Task Http2_InitialSettings_SentAndAcked() public async Task Http2_DataSentBeforeServerPreface_ProtocolError() { using (var server = Http2LoopbackServer.CreateServer()) - using (var client = CreateHttpClient()) + using (HttpClient client = CreateHttpClient()) { Task sendTask = client.GetAsync(server.Address); @@ -122,7 +122,7 @@ public async Task Http2_DataSentBeforeServerPreface_ProtocolError() public async Task Http2_NoResponseBody_Success() { using (var server = Http2LoopbackServer.CreateServer()) - using (var client = CreateHttpClient()) + using (HttpClient client = CreateHttpClient()) { Task sendTask = client.GetAsync(server.Address); @@ -142,7 +142,7 @@ public async Task Http2_NoResponseBody_Success() public async Task Http2_ZeroLengthResponseBody_Success() { using (var server = Http2LoopbackServer.CreateServer()) - using (var client = CreateHttpClient()) + using (HttpClient client = CreateHttpClient()) { Task sendTask = client.GetAsync(server.Address); @@ -166,7 +166,7 @@ public async Task Http2_ZeroLengthResponseBody_Success() public async Task Http2_ServerSendsValidSettingsValues_Success() { using (var server = Http2LoopbackServer.CreateServer()) - using (var client = CreateHttpClient()) + using (HttpClient client = CreateHttpClient()) { Task sendTask = client.GetAsync(server.Address); @@ -208,7 +208,7 @@ public async Task Http2_ServerSendsInvalidSettingsValue_Error(SettingId settingI } using (var server = Http2LoopbackServer.CreateServer()) - using (var client = CreateHttpClient()) + using (HttpClient client = CreateHttpClient()) { Task sendTask = client.GetAsync(server.Address); @@ -230,7 +230,7 @@ public async Task Http2_StreamResetByServerBeforeHeadersSent_RequestFails() } using (var server = Http2LoopbackServer.CreateServer()) - using (var client = CreateHttpClient()) + using (HttpClient client = CreateHttpClient()) { Task sendTask = client.GetAsync(server.Address); @@ -249,7 +249,7 @@ public async Task Http2_StreamResetByServerBeforeHeadersSent_RequestFails() public async Task Http2_StreamResetByServerAfterHeadersSent_RequestFails() { using (var server = Http2LoopbackServer.CreateServer()) - using (var client = CreateHttpClient()) + using (HttpClient client = CreateHttpClient()) { Task sendTask = client.GetAsync(server.Address); @@ -271,7 +271,7 @@ public async Task Http2_StreamResetByServerAfterHeadersSent_RequestFails() public async Task Http2_StreamResetByServerAfterPartialBodySent_RequestFails() { using (var server = Http2LoopbackServer.CreateServer()) - using (var client = CreateHttpClient()) + using (HttpClient client = CreateHttpClient()) { Task sendTask = client.GetAsync(server.Address); @@ -298,7 +298,7 @@ public async Task Http2_StreamResetByServerAfterPartialBodySent_RequestFails() public async Task DataFrame_NoStream_ConnectionError() { using (var server = Http2LoopbackServer.CreateServer()) - using (var client = CreateHttpClient()) + using (HttpClient client = CreateHttpClient()) { Task sendTask = client.GetAsync(server.Address); @@ -330,7 +330,7 @@ public async Task DataFrame_IdleStream_ConnectionError() } using (var server = Http2LoopbackServer.CreateServer()) - using (var client = CreateHttpClient()) + using (HttpClient client = CreateHttpClient()) { Task sendTask = client.GetAsync(server.Address); @@ -362,7 +362,7 @@ public async Task HeadersFrame_IdleStream_ConnectionError() } using (var server = Http2LoopbackServer.CreateServer()) - using (var client = CreateHttpClient()) + using (HttpClient client = CreateHttpClient()) { Task sendTask = client.GetAsync(server.Address); @@ -399,7 +399,7 @@ private static Frame MakeSimpleDataFrame(int streamId, bool endStream = false) = public async Task ResponseStreamFrames_ContinuationBeforeHeaders_ConnectionError() { using (var server = Http2LoopbackServer.CreateServer()) - using (var client = CreateHttpClient()) + using (HttpClient client = CreateHttpClient()) { Task sendTask = client.GetAsync(server.Address); await server.EstablishConnectionAsync(); @@ -419,7 +419,7 @@ public async Task ResponseStreamFrames_ContinuationBeforeHeaders_ConnectionError public async Task ResponseStreamFrames_DataBeforeHeaders_ConnectionError() { using (var server = Http2LoopbackServer.CreateServer()) - using (var client = CreateHttpClient()) + using (HttpClient client = CreateHttpClient()) { Task sendTask = client.GetAsync(server.Address); await server.EstablishConnectionAsync(); @@ -439,7 +439,7 @@ public async Task ResponseStreamFrames_DataBeforeHeaders_ConnectionError() public async Task ResponseStreamFrames_HeadersAfterHeadersWithoutEndHeaders_ConnectionError() { using (var server = Http2LoopbackServer.CreateServer()) - using (var client = CreateHttpClient()) + using (HttpClient client = CreateHttpClient()) { Task sendTask = client.GetAsync(server.Address); await server.EstablishConnectionAsync(); @@ -460,7 +460,7 @@ public async Task ResponseStreamFrames_HeadersAfterHeadersWithoutEndHeaders_Conn public async Task ResponseStreamFrames_HeadersAfterHeadersAndContinuationWithoutEndHeaders_ConnectionError() { using (var server = Http2LoopbackServer.CreateServer()) - using (var client = CreateHttpClient()) + using (HttpClient client = CreateHttpClient()) { Task sendTask = client.GetAsync(server.Address); await server.EstablishConnectionAsync(); @@ -482,7 +482,7 @@ public async Task ResponseStreamFrames_HeadersAfterHeadersAndContinuationWithout public async Task ResponseStreamFrames_DataAfterHeadersWithoutEndHeaders_ConnectionError() { using (var server = Http2LoopbackServer.CreateServer()) - using (var client = CreateHttpClient()) + using (HttpClient client = CreateHttpClient()) { Task sendTask = client.GetAsync(server.Address); await server.EstablishConnectionAsync(); @@ -503,7 +503,7 @@ public async Task ResponseStreamFrames_DataAfterHeadersWithoutEndHeaders_Connect public async Task ResponseStreamFrames_DataAfterHeadersAndContinuationWithoutEndHeaders_ConnectionError() { using (var server = Http2LoopbackServer.CreateServer()) - using (var client = CreateHttpClient()) + using (HttpClient client = CreateHttpClient()) { Task sendTask = client.GetAsync(server.Address); await server.EstablishConnectionAsync(); @@ -528,7 +528,7 @@ public async Task ResponseStreamFrames_DataAfterHeadersAndContinuationWithoutEnd public async Task GoAwayFrame_NonzeroStream_ConnectionError() { using (var server = Http2LoopbackServer.CreateServer()) - using (var client = CreateHttpClient()) + using (HttpClient client = CreateHttpClient()) { Task sendTask = client.GetAsync(server.Address); @@ -551,7 +551,7 @@ public async Task GoAwayFrame_NonzeroStream_ConnectionError() public async Task DataFrame_TooLong_ConnectionError() { using (var server = Http2LoopbackServer.CreateServer()) - using (var client = CreateHttpClient()) + using (HttpClient client = CreateHttpClient()) { Task sendTask = client.GetAsync(server.Address); @@ -571,7 +571,7 @@ public async Task DataFrame_TooLong_ConnectionError() public async Task CompletedResponse_FrameReceived_ConnectionError() { using (var server = Http2LoopbackServer.CreateServer()) - using (var client = CreateHttpClient()) + using (HttpClient client = CreateHttpClient()) { Task sendTask = client.GetAsync(server.Address); @@ -603,7 +603,7 @@ public async Task CompletedResponse_FrameReceived_ConnectionError() public async Task EmptyResponse_FrameReceived_ConnectionError() { using (var server = Http2LoopbackServer.CreateServer()) - using (var client = CreateHttpClient()) + using (HttpClient client = CreateHttpClient()) { Task sendTask = client.GetAsync(server.Address); @@ -632,7 +632,7 @@ public async Task EmptyResponse_FrameReceived_ConnectionError() public async Task CompletedResponse_WindowUpdateFrameReceived_Success() { using (var server = Http2LoopbackServer.CreateServer()) - using (var client = CreateHttpClient()) + using (HttpClient client = CreateHttpClient()) { Task sendTask = client.GetAsync(server.Address); @@ -665,7 +665,7 @@ public static IEnumerable ValidAndInvalidProtocolErrors() => public async Task ResetResponseStream_FrameReceived_ConnectionError(ProtocolErrors error) { using (var server = Http2LoopbackServer.CreateServer()) - using (var client = CreateHttpClient()) + using (HttpClient client = CreateHttpClient()) { Task sendTask = client.GetAsync(server.Address); @@ -712,7 +712,7 @@ private static async Task EstablishConnectionAndProcessOneRequestAsync(Http public async Task GoAwayFrame_NoPendingStreams_ConnectionClosed() { using (var server = Http2LoopbackServer.CreateServer()) - using (var client = CreateHttpClient()) + using (HttpClient client = CreateHttpClient()) { int streamId = await EstablishConnectionAndProcessOneRequestAsync(client, server); @@ -732,7 +732,7 @@ public async Task GoAwayFrame_NoPendingStreams_ConnectionClosed() public async Task GoAwayFrame_AllPendingStreamsValid_RequestsSucceedAndConnectionClosed() { using (var server = Http2LoopbackServer.CreateServer()) - using (var client = CreateHttpClient()) + using (HttpClient client = CreateHttpClient()) { await EstablishConnectionAndProcessOneRequestAsync(client, server); @@ -877,7 +877,7 @@ public async Task Http2_FlowControl_ClientDoesNotExceedWindows() var content = new ByteArrayContent(TestHelper.GenerateRandomContent(ContentSize)); using (var server = Http2LoopbackServer.CreateServer()) - using (var client = CreateHttpClient()) + using (HttpClient client = CreateHttpClient()) { Task clientTask = client.PostAsync(server.Address, content); @@ -981,7 +981,7 @@ public async Task Http2_InitialWindowSize_ClientDoesNotExceedWindows() var content = new ByteArrayContent(TestHelper.GenerateRandomContent(ContentSize)); using (var server = Http2LoopbackServer.CreateServer()) - using (var client = CreateHttpClient()) + using (HttpClient client = CreateHttpClient()) { Task clientTask = client.PostAsync(server.Address, content); @@ -1100,7 +1100,7 @@ public async Task Http2_InitialWindowSize_ClientDoesNotExceedWindows() public async Task Http2_MaxConcurrentStreams_LimitEnforced() { using (var server = Http2LoopbackServer.CreateServer()) - using (var client = CreateHttpClient()) + using (HttpClient client = CreateHttpClient()) { Task sendTask = client.GetAsync(server.Address); @@ -1167,11 +1167,8 @@ public async Task Http2_MaxConcurrentStreams_LimitEnforced() [ConditionalFact(nameof(SupportsAlpn))] public async Task Http2_WaitingForStream_Cancellation() { - HttpClientHandler handler = CreateHttpClientHandler(); - handler.ServerCertificateCustomValidationCallback = TestHelper.AllowAllCertificates; - using (var server = Http2LoopbackServer.CreateServer()) - using (var client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient()) { Task sendTask = client.GetAsync(server.Address); @@ -1227,12 +1224,11 @@ public async Task Http2_WaitingOnWindowCredit_Cancellation() HttpClientHandler handler = CreateHttpClientHandler(); handler.ServerCertificateCustomValidationCallback = TestHelper.AllowAllCertificates; - TestHelper.EnsureHttp2Feature(handler); var content = new ByteArrayContent(TestHelper.GenerateRandomContent(ContentSize)); using (var server = Http2LoopbackServer.CreateServer()) - using (var client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient(handler)) { var cts = new CancellationTokenSource(); Task clientTask = client.PostAsync(server.Address, content, cts.Token); @@ -1283,14 +1279,10 @@ public async Task Http2_PendingSend_Cancellation() const int InitialWindowSize = 65535; const int ContentSize = InitialWindowSize * 2; // Double the default TCP window size. - HttpClientHandler handler = CreateHttpClientHandler(); - handler.ServerCertificateCustomValidationCallback = TestHelper.AllowAllCertificates; - TestHelper.EnsureHttp2Feature(handler); - var content = new ByteArrayContent(TestHelper.GenerateRandomContent(ContentSize)); using (var server = Http2LoopbackServer.CreateServer()) - using (var client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient()) { var cts = new CancellationTokenSource(); diff --git a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.MaxConnectionsPerServer.cs b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.MaxConnectionsPerServer.cs index c73c3a106b69..ee9dc8689005 100644 --- a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.MaxConnectionsPerServer.cs +++ b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.MaxConnectionsPerServer.cs @@ -74,7 +74,7 @@ public void Set_ValidValues_Success(int validValue) public async Task GetAsync_MaxLimited_ConcurrentCallsStillSucceed(int maxConnections, int numRequests, bool secure) { using (HttpClientHandler handler = CreateHttpClientHandler()) - using (var client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient(handler)) { handler.MaxConnectionsPerServer = maxConnections; await Task.WhenAll( @@ -96,7 +96,7 @@ public async Task GetAsync_DontDisposeResponse_EventuallyUnblocksWaiters() await LoopbackServer.CreateServerAsync(async (server, uri) => { using (HttpClientHandler handler = CreateHttpClientHandler()) - using (HttpClient client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient(handler)) { handler.MaxConnectionsPerServer = 1; diff --git a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.MaxResponseHeadersLength.cs b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.MaxResponseHeadersLength.cs index 4ed05d620b4c..6f5e9a000f70 100644 --- a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.MaxResponseHeadersLength.cs +++ b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.MaxResponseHeadersLength.cs @@ -48,7 +48,7 @@ public void ValidValue_SetGet_Roundtrips(int validValue) public async Task SetAfterUse_Throws() { using (HttpClientHandler handler = CreateHttpClientHandler()) - using (var client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient(handler)) { handler.MaxResponseHeadersLength = 1; (await client.GetStreamAsync(Configuration.Http.RemoteEchoServer)).Dispose(); @@ -70,7 +70,7 @@ public async Task InfiniteSingleHeader_ThrowsException() await LoopbackServer.CreateServerAsync(async (server, url) => { using (HttpClientHandler handler = CreateHttpClientHandler()) - using (var client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient(handler)) { Task getAsync = client.GetAsync(url, HttpCompletionOption.ResponseHeadersRead); await server.AcceptConnectionAsync(async connection => @@ -112,7 +112,7 @@ public async Task ThresholdExceeded_ThrowsException(string responseHeaders, int? await LoopbackServer.CreateServerAsync(async (server, url) => { using (HttpClientHandler handler = CreateHttpClientHandler()) - using (var client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient(handler)) { if (maxResponseHeadersLength.HasValue) { diff --git a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Proxy.cs b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Proxy.cs index 1adc53e5123c..1ae5d55f468f 100644 --- a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Proxy.cs +++ b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Proxy.cs @@ -87,7 +87,7 @@ public async Task AuthProxy__ValidCreds_ProxySendsRequestToServer( using (LoopbackProxyServer proxyServer = LoopbackProxyServer.Create(options)) { using (HttpClientHandler handler = CreateHttpClientHandler()) - using (var client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient(handler)) { handler.Proxy = new WebProxy(proxyServer.Uri); handler.Proxy.Credentials = new NetworkCredential("username", "password"); @@ -113,14 +113,14 @@ public void Proxy_UseEnvironmentVariableToSetSystemProxy_RequestGoesThruProxy() throw new SkipTestException("Test needs SocketsHttpHandler"); } - RemoteExecutor.Invoke(async useSocketsHttpHandlerString => + RemoteExecutor.Invoke(async (useSocketsHttpHandlerString, useHttp2String) => { var options = new LoopbackProxyServer.Options { AddViaRequestHeader = true }; using (LoopbackProxyServer proxyServer = LoopbackProxyServer.Create(options)) { Environment.SetEnvironmentVariable("http_proxy", proxyServer.Uri.AbsoluteUri.ToString()); - using (HttpClient client = CreateHttpClient(useSocketsHttpHandlerString)) + using (HttpClient client = CreateHttpClient(useSocketsHttpHandlerString, useHttp2String)) using (HttpResponseMessage response = await client.GetAsync(Configuration.Http.RemoteEchoServer)) { Assert.Equal(HttpStatusCode.OK, response.StatusCode); @@ -130,7 +130,7 @@ public void Proxy_UseEnvironmentVariableToSetSystemProxy_RequestGoesThruProxy() return RemoteExecutor.SuccessExitCode; } - }, UseSocketsHttpHandler.ToString()).Dispose(); + }, UseSocketsHttpHandler.ToString(), UseHttp2.ToString()).Dispose(); } [ActiveIssue(32809)] @@ -154,7 +154,7 @@ public async Task Proxy_BypassFalse_GetRequestGoesThroughCustomProxy(ICredential } using (HttpClientHandler handler = CreateHttpClientHandler()) - using (var client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient(handler)) { handler.Proxy = new WebProxy(proxyServer.Uri) { Credentials = creds }; @@ -197,7 +197,7 @@ public async Task Proxy_BypassTrue_GetRequestDoesntGoesThroughCustomProxy(IWebPr { HttpClientHandler handler = CreateHttpClientHandler(); handler.Proxy = proxy; - using (var client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient(handler)) using (HttpResponseMessage response = await client.GetAsync(Configuration.Http.RemoteEchoServer)) { TestHelper.VerifyResponseBody( @@ -217,7 +217,7 @@ public async Task Proxy_HaveNoCredsAndUseAuthenticatedCustomProxy_ProxyAuthentic { HttpClientHandler handler = CreateHttpClientHandler(); handler.Proxy = new WebProxy(proxyServer.Uri); - using (var client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient(handler)) using (HttpResponseMessage response = await client.GetAsync(Configuration.Http.RemoteEchoServer)) { Assert.Equal(HttpStatusCode.ProxyAuthenticationRequired, response.StatusCode); @@ -229,7 +229,7 @@ public async Task Proxy_HaveNoCredsAndUseAuthenticatedCustomProxy_ProxyAuthentic public async Task Proxy_SslProxyUnsupported_Throws() { using (HttpClientHandler handler = CreateHttpClientHandler()) - using (var client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient(handler)) { handler.Proxy = new WebProxy("https://" + Guid.NewGuid().ToString("N")); @@ -256,7 +256,7 @@ public async Task Proxy_SendSecureRequestThruProxy_ConnectTunnelUsed() { HttpClientHandler handler = CreateHttpClientHandler(); handler.Proxy = new WebProxy(proxyServer.Uri); - using (var client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient(handler)) using (HttpResponseMessage response = await client.GetAsync(Configuration.Http.SecureRemoteEchoServer)) { Assert.Equal(HttpStatusCode.OK, response.StatusCode); @@ -285,7 +285,7 @@ public async Task ProxyAuth_Digest_Succeeds() await LoopbackServer.CreateServerAsync(async (proxyServer, proxyUrl) => { using (HttpClientHandler handler = CreateHttpClientHandler()) - using (var client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient(handler)) { handler.Proxy = new WebProxy(proxyUrl) { Credentials = proxyCreds }; diff --git a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.ResponseDrain.cs b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.ResponseDrain.cs index 3ba0fb51d768..cebb9e16944f 100644 --- a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.ResponseDrain.cs +++ b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.ResponseDrain.cs @@ -30,7 +30,7 @@ public async Task GetAsync_DisposeBeforeReadingToEnd_DrainsRequestsAndReusesConn await LoopbackServer.CreateClientAndServerAsync( async url => { - using (var client = CreateHttpClient()) + using (HttpClient client = CreateHttpClient()) { HttpResponseMessage response1 = await client.GetAsync(url, HttpCompletionOption.ResponseHeadersRead); ValidateResponseHeaders(response1, simpleContent.Length, mode); @@ -101,7 +101,7 @@ await LoopbackServer.CreateClientAndServerAsync( // Set MaxConnectionsPerServer to 1. This will ensure we will wait for the previous request to drain (or fail to) handler.MaxConnectionsPerServer = 1; - using (var client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient(handler)) { HttpResponseMessage response1 = await client.GetAsync(url, HttpCompletionOption.ResponseHeadersRead); ValidateResponseHeaders(response1, totalSize, mode); @@ -173,7 +173,7 @@ await LoopbackServer.CreateClientAndServerAsync( // Set MaxConnectionsPerServer to 1. This will ensure we will wait for the previous request to drain (or fail to) handler.MaxConnectionsPerServer = 1; - using (var client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient(handler)) { HttpResponseMessage response1 = await client.GetAsync(url, HttpCompletionOption.ResponseHeadersRead); ValidateResponseHeaders(response1, totalSize, mode); diff --git a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.ServerCertificates.Unix.cs b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.ServerCertificates.Unix.cs index 5eaa250ad545..b30bdf596280 100644 --- a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.ServerCertificates.Unix.cs +++ b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.ServerCertificates.Unix.cs @@ -79,16 +79,16 @@ public void HttpClientUsesSslCertEnvironmentVariables() File.WriteAllText(sslCertFile, ""); psi.Environment.Add("SSL_CERT_FILE", sslCertFile); - RemoteExecutor.Invoke(async useSocketsHttpHandlerString => + RemoteExecutor.Invoke(async (useSocketsHttpHandlerString, useHttp2String) => { const string Url = "https://www.microsoft.com"; - using (var client = CreateHttpClient(useSocketsHttpHandlerString)) + using (HttpClient client = CreateHttpClient(useSocketsHttpHandlerString, useHttp2String)) { await Assert.ThrowsAsync(() => client.GetAsync(Url)); } return RemoteExecutor.SuccessExitCode; - }, UseSocketsHttpHandler.ToString(), new RemoteInvokeOptions { StartInfo = psi }).Dispose(); + }, UseSocketsHttpHandler.ToString(), UseHttp2.ToString(), new RemoteInvokeOptions { StartInfo = psi }).Dispose(); } } } diff --git a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.ServerCertificates.cs b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.ServerCertificates.cs index 5f4f28c27383..9f264ec9d7a3 100644 --- a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.ServerCertificates.cs +++ b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.ServerCertificates.cs @@ -75,7 +75,7 @@ public void ServerCertificateCustomValidationCallback_SetGet_Roundtrips() public async Task NoCallback_ValidCertificate_SuccessAndExpectedPropertyBehavior() { HttpClientHandler handler = CreateHttpClientHandler(); - using (var client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient(handler)) { using (HttpResponseMessage response = await client.GetAsync(Configuration.Http.SecureRemoteEchoServer)) { @@ -87,6 +87,7 @@ public async Task NoCallback_ValidCertificate_SuccessAndExpectedPropertyBehavior } } + [ActiveIssue(37250)] [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "UAP won't send requests through a custom proxy")] [OuterLoop("Uses external server")] [Fact] @@ -110,7 +111,7 @@ public async Task UseCallback_HaveCredsAndUseAuthenticatedCustomProxyAndPostToSe using (LoopbackProxyServer proxyServer = LoopbackProxyServer.Create(options)) { HttpClientHandler handler = CreateHttpClientHandler(); - handler.ServerCertificateCustomValidationCallback = delegate { return true; }; + handler.ServerCertificateCustomValidationCallback = TestHelper.AllowAllCertificates; handler.Proxy = new WebProxy(proxyServer.Uri) { Credentials = new NetworkCredential("rightusername", "rightpassword") @@ -118,7 +119,7 @@ public async Task UseCallback_HaveCredsAndUseAuthenticatedCustomProxyAndPostToSe const string content = "This is a test"; - using (var client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient(handler)) using (HttpResponseMessage response = await client.PostAsync( Configuration.Http.SecureRemoteEchoServer, new StringContent(content))) @@ -154,8 +155,8 @@ public async Task UseCallback_HaveNoCredsAndUseAuthenticatedCustomProxyAndPostTo { HttpClientHandler handler = CreateHttpClientHandler(); handler.Proxy = new WebProxy(proxyServer.Uri); - handler.ServerCertificateCustomValidationCallback = delegate { return true; }; - using (var client = new HttpClient(handler)) + handler.ServerCertificateCustomValidationCallback = TestHelper.AllowAllCertificates; + using (HttpClient client = CreateHttpClient(handler)) using (HttpResponseMessage response = await client.PostAsync( Configuration.Http.SecureRemoteEchoServer, new StringContent("This is a test"))) @@ -176,7 +177,7 @@ public async Task UseCallback_NotSecureConnection_CallbackNotCalled() } HttpClientHandler handler = CreateHttpClientHandler(); - using (var client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient(handler)) { bool callbackCalled = false; handler.ServerCertificateCustomValidationCallback = delegate { callbackCalled = true; return true; }; @@ -217,7 +218,7 @@ public async Task UseCallback_ValidCertificate_ExpectedValuesDuringCallback(Uri } HttpClientHandler handler = CreateHttpClientHandler(); - using (var client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient(handler)) { bool callbackCalled = false; handler.CheckCertificateRevocationList = checkRevocation; @@ -265,7 +266,7 @@ public async Task UseCallback_CallbackReturnsFailure_ThrowsException() } HttpClientHandler handler = CreateHttpClientHandler(); - using (var client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient(handler)) { handler.ServerCertificateCustomValidationCallback = delegate { return false; }; await Assert.ThrowsAsync(() => client.GetAsync(Configuration.Http.SecureRemoteEchoServer)); @@ -283,7 +284,7 @@ public async Task UseCallback_CallbackThrowsException_ExceptionPropagatesAsBaseE } HttpClientHandler handler = CreateHttpClientHandler(); - using (var client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient(handler)) { var e = new DivideByZeroException(); handler.ServerCertificateCustomValidationCallback = delegate { throw e; }; @@ -346,7 +347,7 @@ public async Task NoCallback_RevokedCertificate_RevocationChecking_Fails() HttpClientHandler handler = CreateHttpClientHandler(); handler.CheckCertificateRevocationList = true; - using (var client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient(handler)) { await Assert.ThrowsAsync(() => client.GetAsync(Configuration.Http.RevokedCertRemoteServer)); } @@ -359,7 +360,7 @@ public async Task NoCallback_RevokedCertificate_RevocationChecking_Fails() new object[] { Configuration.Http.WrongHostNameCertRemoteServer , SslPolicyErrors.RemoteCertificateNameMismatch}, }; - private async Task UseCallback_BadCertificate_ExpectedPolicyErrors_Helper(string url, bool useSocketsHttpHandler, SslPolicyErrors expectedErrors) + private async Task UseCallback_BadCertificate_ExpectedPolicyErrors_Helper(string url, string useSocketsHttpHandlerString, string useHttp2String, SslPolicyErrors expectedErrors) { if (!BackendSupportsCustomCertificateHandling) { @@ -367,8 +368,8 @@ private async Task UseCallback_BadCertificate_ExpectedPolicyErrors_Helper(string return; } - HttpClientHandler handler = CreateHttpClientHandler(useSocketsHttpHandler); - using (var client = new HttpClient(handler)) + HttpClientHandler handler = CreateHttpClientHandler(useSocketsHttpHandlerString, useHttp2String); + using (HttpClient client = CreateHttpClient(handler, useHttp2String)) { bool callbackCalled = false; @@ -411,19 +412,20 @@ public async Task UseCallback_BadCertificate_ExpectedPolicyErrors(string url, Ss // UAP HTTP stack caches connections per-process. This causes interference when these tests run in // the same process as the other tests. Each test needs to be isolated to its own process. // See dicussion: https://github.com/dotnet/corefx/issues/21945 - RemoteExecutor.Invoke((remoteUrl, remoteExpectedErrors, useSocketsHttpHandlerString) => + RemoteExecutor.Invoke((remoteUrl, remoteExpectedErrors, useSocketsHttpHandlerString, useHttp2String) => { UseCallback_BadCertificate_ExpectedPolicyErrors_Helper( remoteUrl, - bool.Parse(useSocketsHttpHandlerString), + useSocketsHttpHandlerString, + useHttp2String, (SslPolicyErrors)Enum.Parse(typeof(SslPolicyErrors), remoteExpectedErrors)).Wait(); return RemoteExecutor.SuccessExitCode; - }, url, expectedErrors.ToString(), UseSocketsHttpHandler.ToString()).Dispose(); + }, url, expectedErrors.ToString(), UseSocketsHttpHandler.ToString(), UseHttp2.ToString()).Dispose(); } else { - await UseCallback_BadCertificate_ExpectedPolicyErrors_Helper(url, UseSocketsHttpHandler, expectedErrors); + await UseCallback_BadCertificate_ExpectedPolicyErrors_Helper(url, UseSocketsHttpHandler.ToString(), UseHttp2.ToString(), expectedErrors); } } catch (HttpRequestException e) when (e.InnerException?.GetType().Name == "WinHttpException" && @@ -445,8 +447,8 @@ public async Task SSLBackendNotSupported_Callback_ThrowsPlatformNotSupportedExce } HttpClientHandler handler = CreateHttpClientHandler(); - handler.ServerCertificateCustomValidationCallback = delegate { return true; }; - using (var client = new HttpClient(handler)) + handler.ServerCertificateCustomValidationCallback = delegate { return true; }; // Do not use TestHelper.AllowAllCertificates / HttpClientHandler.DangerousAcceptAnyServerCertificateValidator + using (HttpClient client = CreateHttpClient(handler)) { await Assert.ThrowsAsync(() => client.GetAsync(Configuration.Http.SecureRemoteEchoServer)); } @@ -465,7 +467,7 @@ public async Task SSLBackendNotSupported_Revocation_ThrowsPlatformNotSupportedEx HttpClientHandler handler = CreateHttpClientHandler(); handler.CheckCertificateRevocationList = true; - using (var client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient(handler)) { await Assert.ThrowsAsync(() => client.GetAsync(Configuration.Http.SecureRemoteEchoServer)); } diff --git a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.SslProtocols.cs b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.SslProtocols.cs index 910025362ce0..0619592fc9ca 100644 --- a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.SslProtocols.cs +++ b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.SslProtocols.cs @@ -66,7 +66,7 @@ public async Task SetProtocols_AfterRequest_ThrowsException() } using (HttpClientHandler handler = CreateHttpClientHandler()) - using (var client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient(handler)) { handler.ServerCertificateCustomValidationCallback = TestHelper.AllowAllCertificates; await LoopbackServer.CreateServerAsync(async (server, url) => @@ -130,7 +130,7 @@ public async Task GetAsync_AllowedSSLVersion_Succeeds(SslProtocols acceptedProto #pragma warning restore 0618 using (HttpClientHandler handler = CreateHttpClientHandler()) - using (var client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient(handler)) { handler.ServerCertificateCustomValidationCallback = TestHelper.AllowAllCertificates; @@ -180,7 +180,7 @@ public async Task GetAsync_SupportedSSLVersion_Succeeds(SslProtocols sslProtocol using (HttpClientHandler handler = CreateHttpClientHandler()) { handler.SslProtocols = sslProtocols; - using (var client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient(handler)) { (await RemoteServerQuery.Run(() => client.GetAsync(url), remoteServerExceptionWrapper, url)).Dispose(); } @@ -220,7 +220,7 @@ public static IEnumerable NotSupportedSSLVersionServers() public async Task GetAsync_UnsupportedSSLVersion_Throws(SslProtocols sslProtocols, string url) { using (HttpClientHandler handler = CreateHttpClientHandler()) - using (HttpClient client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient(handler)) { handler.SslProtocols = sslProtocols; await Assert.ThrowsAsync(() => RemoteServerQuery.Run(() => client.GetAsync(url), remoteServerExceptionWrapper, url)); @@ -236,7 +236,7 @@ public async Task GetAsync_NoSpecifiedProtocol_DefaultsToTls12() } using (HttpClientHandler handler = CreateHttpClientHandler()) - using (var client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient(handler)) { handler.ServerCertificateCustomValidationCallback = TestHelper.AllowAllCertificates; @@ -283,7 +283,7 @@ public async Task GetAsync_AllowedClientSslVersionDiffersFromServer_ThrowsExcept } using (HttpClientHandler handler = CreateHttpClientHandler()) - using (var client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient(handler)) { handler.SslProtocols = allowedClientProtocols; handler.ServerCertificateCustomValidationCallback = TestHelper.AllowAllCertificates; diff --git a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.TrailingHeaders.cs b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.TrailingHeaders.cs deleted file mode 100644 index cf85747a76df..000000000000 --- a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.TrailingHeaders.cs +++ /dev/null @@ -1,407 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Net.Test.Common; -using System.Text; -using System.Threading; -using System.Threading.Tasks; - -using Xunit; -using Xunit.Abstractions; - -namespace System.Net.Http.Functional.Tests -{ - public abstract class HttpClientHandlerTest_TrailingHeaders_Test : HttpClientHandlerTestBase - { - private static byte[] s_dataBytes = Encoding.ASCII.GetBytes("data"); - private static IList s_trailingHeaders = new HttpHeaderData[] { - new HttpHeaderData("MyCoolTrailerHeader", "amazingtrailer"), - new HttpHeaderData("EmptyHeader", ""), - new HttpHeaderData("Hello", "World") }; - - private static Frame MakeDataFrame(int streamId, byte[] data, bool endStream = false) => - new DataFrame(data, (endStream ? FrameFlags.EndStream : FrameFlags.None), 0, streamId); - - public HttpClientHandlerTest_TrailingHeaders_Test (ITestOutputHelper output) : base(output) { } - - [Theory] - [InlineData(false)] - [InlineData(true)] - public async Task GetAsyncDefaultCompletionOption_TrailingHeaders_Available(bool includeTrailerHeader) - { - await LoopbackServer.CreateServerAsync(async (server, url) => - { - using (HttpClientHandler handler = CreateHttpClientHandler()) - using (var client = new HttpClient(handler)) - { - Task getResponseTask = client.GetAsync(url); - await TestHelper.WhenAllCompletedOrAnyFailed( - getResponseTask, - server.AcceptConnectionSendCustomResponseAndCloseAsync( - "HTTP/1.1 200 OK\r\n" + - "Connection: close\r\n" + - "Transfer-Encoding: chunked\r\n" + - (includeTrailerHeader ? "Trailer: MyCoolTrailerHeader, Hello\r\n" : "") + - "\r\n" + - "4\r\n" + - "data\r\n" + - "0\r\n" + - "MyCoolTrailerHeader: amazingtrailer\r\n" + - "Hello: World\r\n" + - "\r\n")); - - using (HttpResponseMessage response = await getResponseTask) - { - Assert.Equal(HttpStatusCode.OK, response.StatusCode); - Assert.Contains("chunked", response.Headers.GetValues("Transfer-Encoding")); - - // Check the Trailer header. - if (includeTrailerHeader) - { - Assert.Contains("MyCoolTrailerHeader", response.Headers.GetValues("Trailer")); - Assert.Contains("Hello", response.Headers.GetValues("Trailer")); - } - - Assert.Contains("amazingtrailer", response.TrailingHeaders.GetValues("MyCoolTrailerHeader")); - Assert.Contains("World", response.TrailingHeaders.GetValues("Hello")); - - string data = await response.Content.ReadAsStringAsync(); - Assert.Contains("data", data); - // Trailers should not be part of the content data. - Assert.DoesNotContain("MyCoolTrailerHeader", data); - Assert.DoesNotContain("amazingtrailer", data); - Assert.DoesNotContain("Hello", data); - Assert.DoesNotContain("World", data); - } - } - }); - } - - [Fact] - public async Task GetAsyncResponseHeadersReadOption_TrailingHeaders_Available() - { - await LoopbackServer.CreateServerAsync(async (server, url) => - { - using (HttpClientHandler handler = CreateHttpClientHandler()) - using (var client = new HttpClient(handler)) - { - Task getResponseTask = client.GetAsync(url, HttpCompletionOption.ResponseHeadersRead); - await TestHelper.WhenAllCompletedOrAnyFailed( - getResponseTask, - server.AcceptConnectionSendCustomResponseAndCloseAsync( - "HTTP/1.1 200 OK\r\n" + - "Connection: close\r\n" + - "Transfer-Encoding: chunked\r\n" + - "Trailer: MyCoolTrailerHeader\r\n" + - "\r\n" + - "4\r\n" + - "data\r\n" + - "0\r\n" + - "MyCoolTrailerHeader: amazingtrailer\r\n" + - "Hello: World\r\n" + - "\r\n")); - - using (HttpResponseMessage response = await getResponseTask) - { - Assert.Equal(HttpStatusCode.OK, response.StatusCode); - Assert.Contains("chunked", response.Headers.GetValues("Transfer-Encoding")); - Assert.Contains("MyCoolTrailerHeader", response.Headers.GetValues("Trailer")); - - // Pending read on the response content. - var trailingHeaders = response.TrailingHeaders; - Assert.Empty(trailingHeaders); - - Stream stream = await response.Content.ReadAsStreamAsync(); - Byte[] data = new Byte[100]; - // Read some data, preferably whole body. - int readBytes = await stream.ReadAsync(data, 0, 4); - - // Intermediate test - haven't reached stream EOF yet. - Assert.Empty(response.TrailingHeaders); - if (readBytes == 4) - { - // If we consumed whole content, check content. - Assert.Contains("data", System.Text.Encoding.Default.GetString(data)); - } - - // Read data until EOF is reached - while (stream.Read(data, 0, data.Length) != 0); - - Assert.Same(trailingHeaders, response.TrailingHeaders); - Assert.Contains("amazingtrailer", response.TrailingHeaders.GetValues("MyCoolTrailerHeader")); - Assert.Contains("World", response.TrailingHeaders.GetValues("Hello")); - } - } - }); - } - - [Theory] - [InlineData("Age", "1")] - [InlineData("Authorization", "Basic YWxhZGRpbjpvcGVuc2VzYW1l")] - [InlineData("Cache-Control", "no-cache")] - [InlineData("Content-Encoding", "gzip")] - [InlineData("Content-Length", "22")] - [InlineData("Content-type", "foo/bar")] - [InlineData("Content-Range", "bytes 200-1000/67589")] - [InlineData("Date", "Wed, 21 Oct 2015 07:28:00 GMT")] - [InlineData("Expect", "100-continue")] - [InlineData("Expires", "Wed, 21 Oct 2015 07:28:00 GMT")] - [InlineData("Host", "foo")] - [InlineData("If-Match", "Wed, 21 Oct 2015 07:28:00 GMT")] - [InlineData("If-Modified-Since", "Wed, 21 Oct 2015 07:28:00 GMT")] - [InlineData("If-None-Match", "*")] - [InlineData("If-Range", "Wed, 21 Oct 2015 07:28:00 GMT")] - [InlineData("If-Unmodified-Since", "Wed, 21 Oct 2015 07:28:00 GMT")] - [InlineData("Location", "/index.html")] - [InlineData("Max-Forwards","2")] - [InlineData("Pragma", "no-cache")] - [InlineData("Range", "5/10")] - [InlineData("Retry-After", "20")] - [InlineData("Set-Cookie", "foo=bar")] - [InlineData("TE", "boo")] - [InlineData("Transfer-Encoding", "chunked")] - [InlineData("Transfer-Encoding", "gzip")] - [InlineData("Vary", "*")] - [InlineData("Warning", "300 - \"Be Warned!\"")] - public async Task GetAsync_ForbiddenTrailingHeaders_Ignores(string name, string value) - { - await LoopbackServer.CreateClientAndServerAsync(async url => - { - using (HttpClientHandler handler = CreateHttpClientHandler()) - using (var client = new HttpClient(handler)) - { - HttpResponseMessage response = await client.GetAsync(url); - Assert.Contains("amazingtrailer", response.TrailingHeaders.GetValues("MyCoolTrailerHeader")); - Assert.False(response.TrailingHeaders.TryGetValues(name, out IEnumerable values)); - Assert.Contains("Loopback", response.TrailingHeaders.GetValues("Server")); - } - }, server => server.AcceptConnectionSendCustomResponseAndCloseAsync( - "HTTP/1.1 200 OK\r\n" + - "Connection: close\r\n" + - "Transfer-Encoding: chunked\r\n" + - $"Trailer: Set-Cookie, MyCoolTrailerHeader, {name}, Hello\r\n" + - "\r\n" + - "4\r\n" + - "data\r\n" + - "0\r\n" + - "Set-Cookie: yummy\r\n" + - "MyCoolTrailerHeader: amazingtrailer\r\n" + - $"{name}: {value}\r\n" + - "Server: Loopback\r\n" + - $"{name}: {value}\r\n" + - "\r\n")); - } - - [Fact] - public async Task GetAsync_NoTrailingHeaders_EmptyCollection() - { - await LoopbackServer.CreateServerAsync(async (server, url) => - { - using (HttpClientHandler handler = CreateHttpClientHandler()) - using (var client = new HttpClient(handler)) - { - Task getResponseTask = client.GetAsync(url); - await TestHelper.WhenAllCompletedOrAnyFailed( - getResponseTask, - server.AcceptConnectionSendCustomResponseAndCloseAsync( - "HTTP/1.1 200 OK\r\n" + - "Connection: close\r\n" + - "Transfer-Encoding: chunked\r\n" + - "Trailer: MyCoolTrailerHeader\r\n" + - "\r\n" + - "4\r\n" + - "data\r\n" + - "0\r\n" + - "\r\n")); - - using (HttpResponseMessage response = await getResponseTask) - { - Assert.Equal(HttpStatusCode.OK, response.StatusCode); - Assert.Contains("chunked", response.Headers.GetValues("Transfer-Encoding")); - - Assert.NotNull(response.TrailingHeaders); - Assert.Equal(0, response.TrailingHeaders.Count()); - Assert.Same(response.TrailingHeaders, response.TrailingHeaders); - } - } - }); - } - - [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.SupportsAlpn))] - public async Task Http2GetAsync_NoTrailingHeaders_EmptyCollection() - { - using (var server = Http2LoopbackServer.CreateServer()) - using (var client = new HttpClient(CreateHttpClientHandler(useSocketsHttpHandler: true, useHttp2LoopbackServer: true))) - { - Task sendTask = client.GetAsync(server.Address); - - await server.EstablishConnectionAsync(); - - int streamId = await server.ReadRequestHeaderAsync(); - - // Response header. - await server.SendDefaultResponseHeadersAsync(streamId); - - // Response data. - await server.WriteFrameAsync(MakeDataFrame(streamId, s_dataBytes, endStream: true)); - - // Server doesn't send trailing header frame. - HttpResponseMessage response = await sendTask; - Assert.Equal(HttpStatusCode.OK, response.StatusCode); - Assert.NotNull(response.TrailingHeaders); - Assert.Equal(0, response.TrailingHeaders.Count()); - } - } - - [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.SupportsAlpn))] - public async Task Http2GetAsync_TrailingHeaders_NoData_EmptyResponseObserved() - { - using (Http2LoopbackServer server = Http2LoopbackServer.CreateServer()) - using (HttpClient client = new HttpClient(CreateHttpClientHandler(useSocketsHttpHandler: true, useHttp2LoopbackServer: true))) - { - Task sendTask = client.GetAsync(server.Address); - - await server.EstablishConnectionAsync(); - - int streamId = await server.ReadRequestHeaderAsync(); - - // Response header. - await server.SendDefaultResponseHeadersAsync(streamId); - - // No data. - - // Response trailing headers - await server.SendResponseHeadersAsync(streamId, isTrailingHeader: true, headers: s_trailingHeaders); - - HttpResponseMessage response = await sendTask; - Assert.Equal(HttpStatusCode.OK, response.StatusCode); - Assert.Equal(Array.Empty(), await response.Content.ReadAsByteArrayAsync()); - Assert.Contains("amazingtrailer", response.TrailingHeaders.GetValues("MyCoolTrailerHeader")); - Assert.Contains("World", response.TrailingHeaders.GetValues("Hello")); - } - } - - [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.SupportsAlpn))] - public async Task Http2GetAsync_MissingTrailer_TrailingHeadersAccepted() - { - using (var server = Http2LoopbackServer.CreateServer()) - using (var client = new HttpClient(CreateHttpClientHandler(useSocketsHttpHandler: true, useHttp2LoopbackServer: true))) - { - Task sendTask = client.GetAsync(server.Address); - - await server.EstablishConnectionAsync(); - - int streamId = await server.ReadRequestHeaderAsync(); - - // Response header. - await server.SendDefaultResponseHeadersAsync(streamId); - - // Response data, missing Trailers. - await server.WriteFrameAsync(MakeDataFrame(streamId, s_dataBytes)); - - // Additional trailing header frame. - await server.SendResponseHeadersAsync(streamId, isTrailingHeader:true, headers: s_trailingHeaders, endStream : true); - - HttpResponseMessage response = await sendTask; - Assert.Equal(HttpStatusCode.OK, response.StatusCode); - Assert.Equal(s_trailingHeaders.Count, response.TrailingHeaders.Count()); - Assert.Contains("amazingtrailer", response.TrailingHeaders.GetValues("MyCoolTrailerHeader")); - Assert.Contains("World", response.TrailingHeaders.GetValues("Hello")); - } - } - - [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.SupportsAlpn))] - public async Task Http2GetAsync_TrailerHeaders_TrailingPseudoHeadersThrow() - { - using (var server = Http2LoopbackServer.CreateServer()) - using (var client = new HttpClient(CreateHttpClientHandler(useSocketsHttpHandler: true, useHttp2LoopbackServer: true))) - { - Task sendTask = client.GetAsync(server.Address); - - await server.EstablishConnectionAsync(); - - int streamId = await server.ReadRequestHeaderAsync(); - - // Response header. - await server.SendDefaultResponseHeadersAsync(streamId); - await server.WriteFrameAsync(MakeDataFrame(streamId, s_dataBytes)); - // Additional trailing header frame with pseudo-headers again.. - await server.SendResponseHeadersAsync(streamId, isTrailingHeader:false, headers: s_trailingHeaders, endStream : true); - - await Assert.ThrowsAsync(() => sendTask); - } - } - - [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.SupportsAlpn))] - public async Task Http2GetAsyncResponseHeadersReadOption_TrailingHeaders_Available() - { - using (var server = Http2LoopbackServer.CreateServer()) - using (var client = new HttpClient(CreateHttpClientHandler(useSocketsHttpHandler: true, useHttp2LoopbackServer: true))) - { - Task sendTask = client.GetAsync(server.Address, HttpCompletionOption.ResponseHeadersRead); - - await server.EstablishConnectionAsync(); - - int streamId = await server.ReadRequestHeaderAsync(); - - // Response header. - await server.SendDefaultResponseHeadersAsync(streamId); - - // Response data, missing Trailers. - await server.WriteFrameAsync(MakeDataFrame(streamId, s_dataBytes)); - - HttpResponseMessage response = await sendTask; - Assert.Equal(HttpStatusCode.OK, response.StatusCode); - - // Pending read on the response content. - Assert.Empty(response.TrailingHeaders); - - Stream stream = await response.Content.ReadAsStreamAsync(); - Byte[] data = new Byte[100]; - await stream.ReadAsync(data, 0, data.Length); - - // Intermediate test - haven't reached stream EOF yet. - Assert.Empty(response.TrailingHeaders); - - // Finish data stream and write out trailing headers. - await server.WriteFrameAsync(MakeDataFrame(streamId, s_dataBytes)); - await server.SendResponseHeadersAsync(streamId, endStream : true, isTrailingHeader:true, headers: s_trailingHeaders); - - // Read data until EOF is reached - while (stream.Read(data, 0, data.Length) != 0); - - Assert.Equal(s_trailingHeaders.Count, response.TrailingHeaders.Count()); - Assert.Contains("amazingtrailer", response.TrailingHeaders.GetValues("MyCoolTrailerHeader")); - Assert.Contains("World", response.TrailingHeaders.GetValues("Hello")); - } - } - - [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.SupportsAlpn))] - public async Task Http2GetAsync_TrailerHeaders_TrailingHeaderNoBody() - { - using (var server = Http2LoopbackServer.CreateServer()) - using (var client = new HttpClient(CreateHttpClientHandler(useSocketsHttpHandler: true, useHttp2LoopbackServer: true))) - { - Task sendTask = client.GetAsync(server.Address); - - await server.EstablishConnectionAsync(); - - int streamId = await server.ReadRequestHeaderAsync(); - - // Response header. - await server.SendDefaultResponseHeadersAsync(streamId); - await server.SendResponseHeadersAsync(streamId, endStream : true, isTrailingHeader:true, headers: s_trailingHeaders); - - HttpResponseMessage response = await sendTask; - Assert.Equal(HttpStatusCode.OK, response.StatusCode); - Assert.Equal(s_trailingHeaders.Count, response.TrailingHeaders.Count()); - Assert.Contains("amazingtrailer", response.TrailingHeaders.GetValues("MyCoolTrailerHeader")); - Assert.Contains("World", response.TrailingHeaders.GetValues("Hello")); - } - } - } -} diff --git a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.cs b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.cs index eaf207ff5dc2..04b573603ab2 100644 --- a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.cs +++ b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.cs @@ -192,7 +192,7 @@ public async Task UseDefaultCredentials_SetToFalseAndServerNeedsAuth_StatusCodeU HttpClientHandler handler = CreateHttpClientHandler(); handler.UseProxy = useProxy; handler.UseDefaultCredentials = false; - using (var client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient(handler)) { Uri uri = Configuration.Http.NegotiateAuthUriForDefaultCreds(secure: false); _output.WriteLine("Uri: {0}", uri); @@ -340,7 +340,7 @@ public async Task GetAsync_IPv6AddressInHostHeader_CorrectlyFormatted(string hos await LoopbackServer.CreateClientAndServerAsync(async proxyUri => { using (HttpClientHandler handler = CreateHttpClientHandler()) - using (var client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient(handler)) { handler.Proxy = new WebProxy(proxyUri); try { await client.GetAsync(ipv6Address); } catch { } @@ -369,7 +369,7 @@ public async Task ProxiedIPAddressRequest_NotDefaultPort_CorrectlyFormatted(stri await LoopbackServer.CreateClientAndServerAsync(async proxyUri => { using (HttpClientHandler handler = CreateHttpClientHandler()) - using (var client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient(handler)) { handler.Proxy = new WebProxy(proxyUri); try { await client.GetAsync(uri); } catch { } @@ -404,7 +404,7 @@ public async Task ProxiedRequest_DefaultPort_PortStrippedOffInUri(string host) await LoopbackServer.CreateClientAndServerAsync(async proxyUri => { using (HttpClientHandler handler = CreateHttpClientHandler()) - using (var client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient(handler)) { handler.Proxy = new WebProxy(proxyUri); try { await client.GetAsync(addressUri); } catch { } @@ -432,7 +432,7 @@ public async Task ProxyTunnelRequest_PortSpecified_NotStrippedOffInUri() await LoopbackServer.CreateClientAndServerAsync(async proxyUri => { using (HttpClientHandler handler = CreateHttpClientHandler()) - using (var client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient(handler)) { handler.Proxy = new WebProxy(proxyUri); handler.ServerCertificateCustomValidationCallback = TestHelper.AllowAllCertificates; @@ -466,7 +466,7 @@ await LoopbackServer.CreateClientAndServerAsync(async url => { host = $"{url.Host}:{url.Port}"; using (HttpClientHandler handler = CreateHttpClientHandler()) - using (var client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient(handler)) { if (useSsl) { @@ -491,7 +491,7 @@ public async Task GetAsync_ServerNeedsBasicAuthAndSetDefaultCredentials_StatusCo { HttpClientHandler handler = CreateHttpClientHandler(); handler.Credentials = CredentialCache.DefaultCredentials; - using (var client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient(handler)) { Uri uri = Configuration.Http.BasicAuthUriForCreds(secure: false, userName: Username, password: Password); using (HttpResponseMessage response = await client.GetAsync(uri)) @@ -507,7 +507,7 @@ public async Task GetAsync_ServerNeedsAuthAndSetCredential_StatusCodeOK() { HttpClientHandler handler = CreateHttpClientHandler(); handler.Credentials = _credential; - using (var client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient(handler)) { Uri uri = Configuration.Http.BasicAuthUriForCreds(secure: false, userName: Username, password: Password); using (HttpResponseMessage response = await client.GetAsync(uri)) @@ -524,9 +524,9 @@ public void GetAsync_ServerNeedsAuthAndNoCredential_StatusCodeUnauthorized() // UAP HTTP stack caches connections per-process. This causes interference when these tests run in // the same process as the other tests. Each test needs to be isolated to its own process. // See dicussion: https://github.com/dotnet/corefx/issues/21945 - RemoteExecutor.Invoke(async useSocketsHttpHandlerString => + RemoteExecutor.Invoke(async (useSocketsHttpHandlerString, useHttp2String) => { - using (var client = CreateHttpClient(useSocketsHttpHandlerString)) + using (HttpClient client = CreateHttpClient(useSocketsHttpHandlerString, useHttp2String)) { Uri uri = Configuration.Http.BasicAuthUriForCreds(secure: false, userName: Username, password: Password); using (HttpResponseMessage response = await client.GetAsync(uri)) @@ -536,7 +536,7 @@ public void GetAsync_ServerNeedsAuthAndNoCredential_StatusCodeUnauthorized() return RemoteExecutor.SuccessExitCode; } - }, UseSocketsHttpHandler.ToString()).Dispose(); + }, UseSocketsHttpHandler.ToString(), UseHttp2.ToString()).Dispose(); } [Theory] @@ -548,7 +548,7 @@ await LoopbackServer.CreateServerAsync(async (server, url) => { HttpClientHandler handler = CreateHttpClientHandler(); handler.Credentials = new NetworkCredential("unused", "unused"); - using (var client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient(handler)) { Task getResponseTask = client.GetAsync(url); Task> serverTask = server.AcceptConnectionSendResponseAndCloseAsync(HttpStatusCode.Unauthorized); @@ -693,7 +693,7 @@ public async Task GetAsync_InvalidHeaderNameValue_ThrowsHttpRequestException(str await LoopbackServer.CreateClientAndServerAsync(async uri => { - using (var client = CreateHttpClient()) + using (HttpClient client = CreateHttpClient()) { await Assert.ThrowsAsync(() => client.GetStringAsync(uri)); } @@ -720,10 +720,10 @@ public async Task PostAsync_ManyDifferentRequestHeaders_SentCorrectly() // Exercises all exposed request.Headers and request.Content.Headers strongly-typed properties await LoopbackServerFactory.CreateClientAndServerAsync(async uri => { - using (var client = CreateHttpClient()) + using (HttpClient client = CreateHttpClient()) { byte[] contentArray = Encoding.ASCII.GetBytes(content); - var request = new HttpRequestMessage(HttpMethod.Post, uri) { Content = new ByteArrayContent(contentArray) }; + var request = new HttpRequestMessage(HttpMethod.Post, uri) { Content = new ByteArrayContent(contentArray), Version = VersionFromUseHttp2 }; request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue("text/plain")); request.Headers.AcceptCharset.Add(new StringWithQualityHeaderValue("utf-8")); @@ -903,7 +903,7 @@ public async Task GetAsync_ManyDifferentResponseHeaders_ParsedCorrectly(string n // Exercises all exposed response.Headers and response.Content.Headers strongly-typed properties await LoopbackServer.CreateClientAndServerAsync(async uri => { - using (var client = CreateHttpClient()) + using (HttpClient client = CreateHttpClient()) using (HttpResponseMessage resp = await client.GetAsync(uri)) { Assert.Equal("1.1", resp.Version.ToString()); @@ -1027,8 +1027,7 @@ public async Task GetAsync_NonTraditionalChunkSizes_Accepted() { await LoopbackServer.CreateServerAsync(async (server, url) => { - using (HttpClientHandler handler = CreateHttpClientHandler()) - using (var client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient()) { Task getResponseTask = client.GetAsync(url); await TestHelper.WhenAllCompletedOrAnyFailed( @@ -1160,7 +1159,7 @@ await LoopbackServer.CreateServerAsync(async (server, url) => [Fact] public async Task SendAsync_TransferEncodingSetButNoRequestContent_Throws() { - var req = new HttpRequestMessage(HttpMethod.Post, "http://bing.com"); + var req = new HttpRequestMessage(HttpMethod.Post, "http://bing.com") { Version = VersionFromUseHttp2 }; req.Headers.TransferEncodingChunked = true; using (HttpClient c = CreateHttpClient()) { @@ -1198,7 +1197,7 @@ public async Task GetAsync_ResponseHeadersRead_ReadFromEachIterativelyDoesntDead [Fact] public async Task SendAsync_HttpRequestMsgResponseHeadersRead_StatusCodeOK() { - HttpRequestMessage request = new HttpRequestMessage(HttpMethod.Get, Configuration.Http.SecureRemoteEchoServer); + HttpRequestMessage request = new HttpRequestMessage(HttpMethod.Get, Configuration.Http.SecureRemoteEchoServer) { Version = VersionFromUseHttp2 }; using (HttpClient client = CreateHttpClient()) { using (HttpResponseMessage response = await client.SendAsync(request, HttpCompletionOption.ResponseHeadersRead)) @@ -1257,7 +1256,7 @@ public async Task ReadAsStreamAsync_HandlerProducesWellBehavedResponseStream(boo { await LoopbackServer.CreateClientAndServerAsync(async uri => { - var request = new HttpRequestMessage(HttpMethod.Get, uri); + var request = new HttpRequestMessage(HttpMethod.Get, uri) { Version = VersionFromUseHttp2 }; using (var client = new HttpMessageInvoker(CreateHttpClientHandler())) using (HttpResponseMessage response = await client.SendAsync(request, CancellationToken.None)) { @@ -1402,7 +1401,7 @@ await LoopbackServer.CreateClientAndServerAsync(async uri => { using (var client = new HttpMessageInvoker(CreateHttpClientHandler())) { - var request = new HttpRequestMessage(HttpMethod.Get, uri); + var request = new HttpRequestMessage(HttpMethod.Get, uri) { Version = VersionFromUseHttp2 }; using (HttpResponseMessage response = await client.SendAsync(request, CancellationToken.None)) using (Stream responseStream = await response.Content.ReadAsStreamAsync()) @@ -1591,8 +1590,7 @@ await server.AcceptConnectionSendCustomResponseAndCloseAsync( [Fact] public async Task GetAsync_UnicodeHostName_SuccessStatusCodeInResponse() { - HttpClientHandler handler = CreateHttpClientHandler(); - using (var client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient()) { // international version of the Starbucks website // punycode: xn--oy2b35ckwhba574atvuzkc.com @@ -1846,10 +1844,10 @@ public async Task PostAsync_ExpectContinue_Success(bool? expectContinue, string { var req = new HttpRequestMessage(HttpMethod.Post, Configuration.Http.RemoteEchoServer) { - Content = new StringContent("Test String", Encoding.UTF8) + Content = new StringContent("Test String", Encoding.UTF8), + Version = new Version(version) }; req.Headers.ExpectContinue = expectContinue; - req.Version = new Version(version); using (HttpResponseMessage response = await client.SendAsync(req)) { @@ -1879,7 +1877,7 @@ public async Task GetAsync_ExpectContinueTrue_NoContent_StillSendsHeader() var clientCompleted = new TaskCompletionSource(); await LoopbackServer.CreateClientAndServerAsync(async uri => { - using (var client = CreateHttpClient()) + using (HttpClient client = CreateHttpClient()) { client.DefaultRequestHeaders.ExpectContinue = true; Assert.Equal(ExpectedContent, await client.GetStringAsync(uri)); @@ -1934,9 +1932,9 @@ public async Task SendAsync_1xxResponsesWithHeaders_InterimResponsesHeadersIgnor await LoopbackServer.CreateClientAndServerAsync(async uri => { using (var handler = CreateHttpClientHandler()) - using (var client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient(handler)) { - HttpRequestMessage initialMessage = new HttpRequestMessage(HttpMethod.Post, uri); + HttpRequestMessage initialMessage = new HttpRequestMessage(HttpMethod.Post, uri) { Version = VersionFromUseHttp2 }; initialMessage.Content = new StringContent(TestString); initialMessage.Headers.ExpectContinue = true; HttpResponseMessage response = await client.SendAsync(initialMessage); @@ -1987,10 +1985,9 @@ public async Task SendAsync_Unexpected1xxResponses_DropAllInterimResponses(HttpS await LoopbackServer.CreateClientAndServerAsync(async uri => { - using (var handler = CreateHttpClientHandler()) - using (var client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient()) { - HttpRequestMessage initialMessage = new HttpRequestMessage(HttpMethod.Post, uri); + HttpRequestMessage initialMessage = new HttpRequestMessage(HttpMethod.Post, uri) { Version = VersionFromUseHttp2 }; initialMessage.Content = new StringContent(TestString); // No ExpectContinue header. initialMessage.Headers.ExpectContinue = false; @@ -2028,10 +2025,9 @@ public async Task SendAsync_MultipleExpected100Responses_ReceivesCorrectResponse await LoopbackServer.CreateClientAndServerAsync(async uri => { - using (var handler = CreateHttpClientHandler()) - using (var client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient()) { - HttpRequestMessage initialMessage = new HttpRequestMessage(HttpMethod.Post, uri); + HttpRequestMessage initialMessage = new HttpRequestMessage(HttpMethod.Post, uri) { Version = VersionFromUseHttp2 }; initialMessage.Content = new StringContent(TestString); initialMessage.Headers.ExpectContinue = true; HttpResponseMessage response = await client.SendAsync(initialMessage); @@ -2072,10 +2068,9 @@ public async Task SendAsync_No100ContinueReceived_RequestBodySentEventually() await LoopbackServer.CreateClientAndServerAsync(async uri => { - using (var handler = CreateHttpClientHandler()) - using (var client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient()) { - HttpRequestMessage initialMessage = new HttpRequestMessage(HttpMethod.Post, uri); + HttpRequestMessage initialMessage = new HttpRequestMessage(HttpMethod.Post, uri) { Version = VersionFromUseHttp2 }; initialMessage.Content = new StringContent(TestString); initialMessage.Headers.ExpectContinue = true; HttpResponseMessage response = await client.SendAsync(initialMessage); @@ -2110,8 +2105,7 @@ public async Task SendAsync_101SwitchingProtocolsResponse_Success() await LoopbackServer.CreateClientAndServerAsync(async uri => { - using (var handler = CreateHttpClientHandler()) - using (var client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient()) { HttpResponseMessage response = await client.GetAsync(uri, HttpCompletionOption.ResponseHeadersRead); Assert.Equal(HttpStatusCode.SwitchingProtocols, response.StatusCode); @@ -2143,7 +2137,7 @@ await LoopbackServer.CreateServerAsync(async (server, uri) => while (await connection.Socket.ReceiveAsync(new ArraySegment(buffer, 0, buffer.Length), SocketFlags.None) != 0); }); - using (var client = CreateHttpClient()) + using (HttpClient client = CreateHttpClient()) { Exception error = new FormatException(); var content = new StreamContent(new DelegateStream( @@ -2306,7 +2300,7 @@ public async Task SendAsync_SendRequestUsingMethodToEchoServerWithNoContent_Meth { var request = new HttpRequestMessage( new HttpMethod(method), - secureServer ? Configuration.Http.SecureRemoteEchoServer : Configuration.Http.RemoteEchoServer); + secureServer ? Configuration.Http.SecureRemoteEchoServer : Configuration.Http.RemoteEchoServer) { Version = VersionFromUseHttp2 }; if (PlatformDetection.IsUap && method == "TRACE") { @@ -2341,7 +2335,7 @@ public async Task SendAsync_SendRequestUsingMethodToEchoServerWithContent_Succes { var request = new HttpRequestMessage( new HttpMethod(method), - secureServer ? Configuration.Http.SecureRemoteEchoServer : Configuration.Http.RemoteEchoServer); + secureServer ? Configuration.Http.SecureRemoteEchoServer : Configuration.Http.RemoteEchoServer) { Version = VersionFromUseHttp2 }; request.Content = new StringContent(ExpectedContent); using (HttpResponseMessage response = await client.SendAsync(request)) { @@ -2373,7 +2367,7 @@ public async Task SendAsync_SendSameRequestMultipleTimesDirectlyOnHandler_Succes var content = new MemoryStream(); content.Write(byteContent, 0, byteContent.Length); content.Position = startingPosition; - var request = new HttpRequestMessage(HttpMethod.Post, Configuration.Http.RemoteEchoServer) { Content = new StreamContent(content) }; + var request = new HttpRequestMessage(HttpMethod.Post, Configuration.Http.RemoteEchoServer) { Content = new StreamContent(content), Version = VersionFromUseHttp2 }; for (int iter = 0; iter < 2; iter++) { @@ -2422,7 +2416,8 @@ public async Task SendAsync_SendRequestUsingNoBodyMethodToEchoServerWithContent_ new HttpMethod(method), secureServer ? Configuration.Http.SecureRemoteEchoServer : Configuration.Http.RemoteEchoServer) { - Content = new StringContent(ExpectedContent) + Content = new StringContent(ExpectedContent), + Version = VersionFromUseHttp2 }; using (HttpResponseMessage response = await client.SendAsync(request)) @@ -2492,14 +2487,12 @@ public async Task SendAsync_RequestVersion20_ResponseVersion20IfHttp2Supported(U // Skip this test if running on Windows but on a release prior to Windows 10 Creators Update. throw new SkipTestException("Skipping test due to Windows 10 version prior to Version 1703."); } - // We don't currently have a good way to test whether HTTP/2 is supported without // using the same mechanism we're trying to test, so for now we allow both 2.0 and 1.1 responses. var request = new HttpRequestMessage(HttpMethod.Get, server); request.Version = new Version(2, 0); - using (HttpClientHandler handler = CreateHttpClientHandler()) - using (var client = new HttpClient(handler, false)) + using (HttpClient client = CreateHttpClient()) { // It is generally expected that the test hosts will be trusted, so we don't register a validation // callback in the usual case. @@ -2541,8 +2534,7 @@ public async Task SendAsync_RequestVersion20_ResponseVersion20(Uri server) var request = new HttpRequestMessage(HttpMethod.Get, server); request.Version = new Version(2, 0); - HttpClientHandler handler = CreateHttpClientHandler(); - using (var client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient()) { using (HttpResponseMessage response = await client.SendAsync(request)) { @@ -2602,12 +2594,10 @@ await LoopbackServer.CreateServerAsync(async (server, rootUrl) => { var uri = new Uri($"http://{rootUrl.Host}:{rootUrl.Port}/test[]"); _output.WriteLine(uri.AbsoluteUri.ToString()); - var request = new HttpRequestMessage(HttpMethod.Get, uri); - string statusLine = string.Empty; using (HttpClient client = CreateHttpClient()) { - Task getResponseTask = client.SendAsync(request); + Task getResponseTask = client.GetAsync(uri); Task> serverTask = server.AcceptConnectionSendResponseAndCloseAsync(); await TestHelper.WhenAllCompletedOrAnyFailed(getResponseTask, serverTask); diff --git a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTestBase.cs b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTestBase.cs index f34fdfc6b497..b04ffb41ae03 100644 --- a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTestBase.cs +++ b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTestBase.cs @@ -8,6 +8,8 @@ using System.Net.Test.Common; using Xunit.Abstractions; +using System.Collections.Generic; +using System.Text; namespace System.Net.Http.Functional.Tests { @@ -16,7 +18,7 @@ public abstract class HttpClientHandlerTestBase : FileCleanupTestBase public readonly ITestOutputHelper _output; protected virtual bool UseSocketsHttpHandler => true; - protected virtual bool UseHttp2LoopbackServer => false; + protected virtual bool UseHttp2 => false; protected bool IsWinHttpHandler => !UseSocketsHttpHandler && PlatformDetection.IsWindows && !PlatformDetection.IsUap && !PlatformDetection.IsFullFramework; protected bool IsCurlHandler => !UseSocketsHttpHandler && !PlatformDetection.IsWindows; @@ -28,15 +30,40 @@ public HttpClientHandlerTestBase(ITestOutputHelper output) _output = output; } - protected HttpClient CreateHttpClient() => new HttpClient(CreateHttpClientHandler()); + protected Version VersionFromUseHttp2 => GetVersion(UseHttp2); - protected HttpClientHandler CreateHttpClientHandler() => CreateHttpClientHandler(UseSocketsHttpHandler, UseHttp2LoopbackServer); + private static Version GetVersion(bool http2) => http2 ? new Version(2, 0) : HttpVersion.Version11; - protected static HttpClient CreateHttpClient(string useSocketsHttpHandlerBoolString) => - new HttpClient(CreateHttpClientHandler(useSocketsHttpHandlerBoolString)); + protected HttpClient CreateHttpClient() => CreateHttpClient(CreateHttpClientHandler()); - protected static HttpClientHandler CreateHttpClientHandler(string useSocketsHttpHandlerBoolString) => - CreateHttpClientHandler(bool.Parse(useSocketsHttpHandlerBoolString)); + protected HttpClient CreateHttpClient(HttpMessageHandler handler) + { + var client = new HttpClient(handler); + SetDefaultRequestVersion(client, VersionFromUseHttp2); + return client; + } + + protected static HttpClient CreateHttpClient(string useSocketsHttpHandlerBoolString, string useHttp2String) => + CreateHttpClient(CreateHttpClientHandler(useSocketsHttpHandlerBoolString, useHttp2String), useHttp2String); + + protected static HttpClient CreateHttpClient(HttpMessageHandler handler, string useHttp2String) + { + var client = new HttpClient(handler); + SetDefaultRequestVersion(client, GetVersion(bool.Parse(useHttp2String))); + return client; + } + + protected HttpClientHandler CreateHttpClientHandler() => CreateHttpClientHandler(UseSocketsHttpHandler, UseHttp2); + + protected static HttpClientHandler CreateHttpClientHandler(string useSocketsHttpHandlerBoolString, string useHttp2LoopbackServerString) => + CreateHttpClientHandler(bool.Parse(useSocketsHttpHandlerBoolString), bool.Parse(useHttp2LoopbackServerString)); + + protected static void SetDefaultRequestVersion(HttpClient client, Version version) + { + PropertyInfo pi = client.GetType().GetProperty("DefaultRequestVersion", BindingFlags.Public | BindingFlags.Instance); + Debug.Assert(pi != null || !PlatformDetection.IsNetCore); + pi?.SetValue(client, version); + } protected static HttpClientHandler CreateHttpClientHandler(bool useSocketsHttpHandler, bool useHttp2LoopbackServer = false) { @@ -56,10 +83,9 @@ protected static HttpClientHandler CreateHttpClientHandler(bool useSocketsHttpHa Debug.Assert(useSocketsHttpHandler == IsSocketsHttpHandler(handler), "Unexpected handler."); } - TestHelper.EnsureHttp2Feature(handler, useHttp2LoopbackServer); - if (useHttp2LoopbackServer) { + TestHelper.EnableUnencryptedHttp2IfNecessary(handler); handler.ServerCertificateCustomValidationCallback = TestHelper.AllowAllCertificates; } @@ -75,12 +101,11 @@ protected static object GetUnderlyingSocketsHttpHandler(HttpClientHandler handle return field?.GetValue(handler); } + protected LoopbackServerFactory LoopbackServerFactory => #if netcoreapp - protected LoopbackServerFactory LoopbackServerFactory => UseHttp2LoopbackServer ? - (LoopbackServerFactory)Http2LoopbackServerFactory.Singleton : - (LoopbackServerFactory)Http11LoopbackServerFactory.Singleton; -#else - protected LoopbackServerFactory LoopbackServerFactory => Http11LoopbackServerFactory.Singleton; + UseHttp2 ? + (LoopbackServerFactory)Http2LoopbackServerFactory.Singleton : #endif + Http11LoopbackServerFactory.Singleton; } } diff --git a/src/System.Net.Http/tests/FunctionalTests/HttpClientTest.netcoreapp.cs b/src/System.Net.Http/tests/FunctionalTests/HttpClientTest.netcoreapp.cs index 52da2f67d810..26b71403b2c1 100644 --- a/src/System.Net.Http/tests/FunctionalTests/HttpClientTest.netcoreapp.cs +++ b/src/System.Net.Http/tests/FunctionalTests/HttpClientTest.netcoreapp.cs @@ -72,5 +72,75 @@ public void Dispose_UsePatchAfterDispose_Throws() Assert.Throws(() => { client.PatchAsync(CreateFakeUri(), new ByteArrayContent(new byte[1])); }); } + + [Fact] + public void DefaultRequestVersion_InitialValueExpected() + { + using (var client = new HttpClient()) + { + Assert.Equal(PlatformDetection.IsUap ? new Version(2, 0) : new Version(1, 1), client.DefaultRequestVersion); + Assert.Same(client.DefaultRequestVersion, client.DefaultRequestVersion); + } + } + + [Fact] + public void DefaultRequestVersion_Roundtrips() + { + using (var client = new HttpClient()) + { + for (int i = 3; i < 5; i++) + { + var newVersion = new Version(i, i, i, i); + client.DefaultRequestVersion = newVersion; + Assert.Same(newVersion, client.DefaultRequestVersion); + } + } + } + + [Fact] + public void DefaultRequestVersion_InvalidArgument_Throws() + { + using (var client = new HttpClient()) + { + AssertExtensions.Throws("value", () => client.DefaultRequestVersion = null); + client.DefaultRequestVersion = new Version(1, 0); // still usable after + Assert.Equal(new Version(1, 0), client.DefaultRequestVersion); + } + } + + [Fact] + public async Task DefaultRequestVersion_SetAfterUse_Throws() + { + var handler = new StoreMessageHttpMessageInvoker(); + using (var client = new HttpClient(handler)) + { + await client.GetAsync("http://doesntmatter", HttpCompletionOption.ResponseHeadersRead); + Assert.Throws(() => client.DefaultRequestVersion = new Version(1, 1)); + } + } + + [Fact] + public async Task DefaultRequestVersion_UsedInCreatedMessages() + { + var handler = new StoreMessageHttpMessageInvoker(); + using (var client = new HttpClient(handler)) + { + var version = new Version(1, 2, 3, 4); + client.DefaultRequestVersion = version; + await client.GetAsync("http://doesntmatter", HttpCompletionOption.ResponseHeadersRead); + Assert.Same(version, handler.Message.Version); + } + } + + private sealed class StoreMessageHttpMessageInvoker : HttpMessageHandler + { + public HttpRequestMessage Message; + + protected override Task SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) + { + Message = request; + return Task.FromResult(new HttpResponseMessage()); + } + } } } diff --git a/src/System.Net.Http/tests/FunctionalTests/HttpProtocolTests.cs b/src/System.Net.Http/tests/FunctionalTests/HttpProtocolTests.cs index 0a0577ecb25d..f483f4b3366f 100644 --- a/src/System.Net.Http/tests/FunctionalTests/HttpProtocolTests.cs +++ b/src/System.Net.Http/tests/FunctionalTests/HttpProtocolTests.cs @@ -569,7 +569,7 @@ public async Task GetAsync_Chunked_VaryingSizeChunks_ReceivedCorrectly(int maxCh await LoopbackServer.CreateClientAndServerAsync(async uri => { using (HttpMessageInvoker client = new HttpMessageInvoker(CreateHttpClientHandler())) - using (HttpResponseMessage resp = await client.SendAsync(new HttpRequestMessage(HttpMethod.Get, uri), CancellationToken.None)) + using (HttpResponseMessage resp = await client.SendAsync(new HttpRequestMessage(HttpMethod.Get, uri) { Version = VersionFromUseHttp2 }, CancellationToken.None)) using (Stream respStream = await resp.Content.ReadAsStreamAsync()) { var actualData = new MemoryStream(); @@ -630,9 +630,9 @@ public async Task CustomMethod_SentUppercasedIfKnown(string specifiedMethod, str await LoopbackServer.CreateClientAndServerAsync(async uri => { - using (var client = CreateHttpClient()) + using (HttpClient client = CreateHttpClient()) { - var m = new HttpRequestMessage(new HttpMethod(specifiedMethod), uri); + var m = new HttpRequestMessage(new HttpMethod(specifiedMethod), uri) { Version = VersionFromUseHttp2 }; (await client.SendAsync(m)).Dispose(); } }, async server => diff --git a/src/System.Net.Http/tests/FunctionalTests/HttpRequestMessageTest.cs b/src/System.Net.Http/tests/FunctionalTests/HttpRequestMessageTest.cs index aa02d41664e6..987a074a9779 100644 --- a/src/System.Net.Http/tests/FunctionalTests/HttpRequestMessageTest.cs +++ b/src/System.Net.Http/tests/FunctionalTests/HttpRequestMessageTest.cs @@ -2,12 +2,10 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Collections.Generic; using System.IO; using System.Net.Http.Headers; using System.Net.Test.Common; -using System.Threading; using System.Threading.Tasks; using Xunit; @@ -17,7 +15,7 @@ namespace System.Net.Http.Functional.Tests { public class HttpRequestMessageTest : HttpClientHandlerTestBase { - Version _expectedRequestMessageVersion = !PlatformDetection.IsFullFramework ? new Version(2,0) : new Version(1, 1); + private readonly Version _expectedRequestMessageVersion = PlatformDetection.IsUap ? new Version(2,0) : new Version(1, 1); public HttpRequestMessageTest(ITestOutputHelper output) : base(output) { } @@ -232,7 +230,7 @@ public async Task HttpRequest_BodylessMethod_NoContentLength(string method) return; } - using (HttpClient client = new HttpClient()) + using (HttpClient client = CreateHttpClient()) { await LoopbackServer.CreateServerAsync(async (server, uri) => { diff --git a/src/System.Net.Http/tests/FunctionalTests/HttpRetryProtocolTests.cs b/src/System.Net.Http/tests/FunctionalTests/HttpRetryProtocolTests.cs index 5a8a52644c63..b17746038dd3 100644 --- a/src/System.Net.Http/tests/FunctionalTests/HttpRetryProtocolTests.cs +++ b/src/System.Net.Http/tests/FunctionalTests/HttpRetryProtocolTests.cs @@ -90,7 +90,7 @@ await LoopbackServer.CreateClientAndServerAsync(async url => // expires, the content will start to be serialized and will signal the server to // close the connection; then once the connection is closed, the send will be allowed // to continue and will fail. - var request = new HttpRequestMessage(HttpMethod.Post, url); + var request = new HttpRequestMessage(HttpMethod.Post, url) { Version = VersionFromUseHttp2 }; request.Headers.ExpectContinue = true; request.Content = new SynchronizedSendContent(contentSending, connectionClosed.Task); await Assert.ThrowsAsync(() => client.SendAsync(request)); diff --git a/src/System.Net.Http/tests/FunctionalTests/IdnaProtocolTests.cs b/src/System.Net.Http/tests/FunctionalTests/IdnaProtocolTests.cs index aa82b32ba143..d2e1b52d97ea 100644 --- a/src/System.Net.Http/tests/FunctionalTests/IdnaProtocolTests.cs +++ b/src/System.Net.Http/tests/FunctionalTests/IdnaProtocolTests.cs @@ -36,7 +36,7 @@ await LoopbackServer.CreateServerAsync(async (server, serverUrl) => handler.UseProxy = true; handler.Proxy = new WebProxy(serverUrl.ToString()); - using (HttpClient client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient(handler)) { Task getResponseTask = client.GetAsync(uri); Task> serverTask = server.AcceptConnectionSendResponseAndCloseAsync(); @@ -66,9 +66,9 @@ public async Task InternationalRequestHeaderValues_UsesIdnaEncoding_Success(stri await LoopbackServer.CreateServerAsync(async (server, serverUrl) => { - using (HttpClient client = new HttpClient(CreateHttpClientHandler())) + using (HttpClient client = CreateHttpClient()) { - var request = new HttpRequestMessage(HttpMethod.Get, serverUrl); + var request = new HttpRequestMessage(HttpMethod.Get, serverUrl) { Version = VersionFromUseHttp2 }; request.Headers.Host = hostname; request.Headers.Referrer = uri; Task getResponseTask = client.SendAsync(request); @@ -101,7 +101,7 @@ await LoopbackServer.CreateServerAsync(async (server, serverUrl) => HttpClientHandler handler = CreateHttpClientHandler(); handler.AllowAutoRedirect = false; - using (HttpClient client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient(handler)) { Task getResponseTask = client.GetAsync(serverUrl); Task> serverTask = server.AcceptConnectionSendResponseAndCloseAsync( diff --git a/src/System.Net.Http/tests/FunctionalTests/PlatformHandlerTest.cs b/src/System.Net.Http/tests/FunctionalTests/PlatformHandlerTest.cs index 778af074fdfb..16d48a127505 100644 --- a/src/System.Net.Http/tests/FunctionalTests/PlatformHandlerTest.cs +++ b/src/System.Net.Http/tests/FunctionalTests/PlatformHandlerTest.cs @@ -25,8 +25,7 @@ public async Task GetAsync_TrailingHeaders_Ignored(bool includeTrailerHeader) { await LoopbackServer.CreateServerAsync(async (server, url) => { - using (HttpClientHandler handler = CreateHttpClientHandler()) - using (var client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient()) { Task getResponseTask = client.GetAsync(url); await TestHelper.WhenAllCompletedOrAnyFailed( diff --git a/src/System.Net.Http/tests/FunctionalTests/PostScenarioTest.cs b/src/System.Net.Http/tests/FunctionalTests/PostScenarioTest.cs index f55450de67c4..861fa7448310 100644 --- a/src/System.Net.Http/tests/FunctionalTests/PostScenarioTest.cs +++ b/src/System.Net.Http/tests/FunctionalTests/PostScenarioTest.cs @@ -43,9 +43,15 @@ public PostScenarioTest(ITestOutputHelper output) : base(output) { } [Theory, MemberData(nameof(EchoServers))] public async Task PostRewindableStreamContentMultipleTimes_StreamContentFullySent(Uri serverUri) { + if (IsCurlHandler) + { + // CurlHandler rewinds the stream at the end: https://github.com/dotnet/corefx/issues/23782 + return; + } + const string requestBody = "ABC"; - using (var client = new HttpClient()) + using (HttpClient client = CreateHttpClient()) using (var ms = new MemoryStream(Encoding.UTF8.GetBytes(requestBody))) { var content = new StreamContent(ms); @@ -270,18 +276,18 @@ private async Task PostUsingAuthHelper( HttpClientHandler handler = CreateHttpClientHandler(); handler.PreAuthenticate = preAuthenticate; handler.Credentials = credential; - using (var client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient(handler)) { // Send HEAD request to help bypass the 401 auth challenge for the latter POST assuming // that the authentication will be cached and re-used later when PreAuthenticate is true. - var request = new HttpRequestMessage(HttpMethod.Head, serverUri); + var request = new HttpRequestMessage(HttpMethod.Head, serverUri) { Version = VersionFromUseHttp2 }; using (HttpResponseMessage response = await client.SendAsync(request)) { Assert.Equal(HttpStatusCode.OK, response.StatusCode); } // Now send POST request. - request = new HttpRequestMessage(HttpMethod.Post, serverUri); + request = new HttpRequestMessage(HttpMethod.Post, serverUri) { Version = VersionFromUseHttp2 }; request.Content = requestContent; requestContent.Headers.ContentLength = null; request.Headers.TransferEncodingChunked = true; diff --git a/src/System.Net.Http/tests/FunctionalTests/PostScenarioUWPTest.cs b/src/System.Net.Http/tests/FunctionalTests/PostScenarioUWPTest.cs index 76a3ce3642ae..6834109c868d 100644 --- a/src/System.Net.Http/tests/FunctionalTests/PostScenarioUWPTest.cs +++ b/src/System.Net.Http/tests/FunctionalTests/PostScenarioUWPTest.cs @@ -23,7 +23,7 @@ public PostScenarioUWPTest(ITestOutputHelper output) : base(output) { } [Fact] public void Authentication_UseStreamContent_Throws() { - RemoteExecutor.Invoke(async useSocketsHttpHandlerString => + RemoteExecutor.Invoke(async (useSocketsHttpHandlerString, useHttp2String) => { // This test validates the current limitation of CoreFx's NetFxToWinRtStreamAdapter // which throws exceptions when trying to rewind a .NET Stream when it needs to be @@ -31,10 +31,10 @@ public void Authentication_UseStreamContent_Throws() string username = "testuser"; string password = "password"; Uri uri = Configuration.Http.BasicAuthUriForCreds(secure: false, userName: username, password: password); - HttpClientHandler handler = CreateHttpClientHandler(useSocketsHttpHandlerString); + HttpClientHandler handler = CreateHttpClientHandler(useSocketsHttpHandlerString, useHttp2String); handler.Credentials = new NetworkCredential(username, password); - using (var client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient(handler, useHttp2String)) { byte[] postData = Encoding.UTF8.GetBytes("This is data to post."); var stream = new MemoryStream(postData, false); @@ -44,21 +44,21 @@ public void Authentication_UseStreamContent_Throws() } return RemoteExecutor.SuccessExitCode; - }, UseSocketsHttpHandler.ToString()).Dispose(); + }, UseSocketsHttpHandler.ToString(), UseHttp2.ToString()).Dispose(); } [Fact] public void Authentication_UseMultiInterfaceNonRewindableStreamContent_Throws() { - RemoteExecutor.Invoke(async useSocketsHttpHandlerString => + RemoteExecutor.Invoke(async (useSocketsHttpHandlerString, useHttp2String) => { string username = "testuser"; string password = "password"; Uri uri = Configuration.Http.BasicAuthUriForCreds(secure: false, userName: username, password: password); - HttpClientHandler handler = CreateHttpClientHandler(useSocketsHttpHandlerString); + HttpClientHandler handler = CreateHttpClientHandler(useSocketsHttpHandlerString, useHttp2String); handler.Credentials = new NetworkCredential(username, password); - using (var client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient(handler, useHttp2String)) { byte[] postData = Encoding.UTF8.GetBytes("This is data to post."); var stream = new MultiInterfaceNonRewindableReadOnlyStream(postData); @@ -68,21 +68,21 @@ public void Authentication_UseMultiInterfaceNonRewindableStreamContent_Throws() } return RemoteExecutor.SuccessExitCode; - }, UseSocketsHttpHandler.ToString()).Dispose(); + }, UseSocketsHttpHandler.ToString(), UseHttp2.ToString()).Dispose(); } [Fact] public void Authentication_UseMultiInterfaceStreamContent_Success() { - RemoteExecutor.Invoke(async useSocketsHttpHandlerString => + RemoteExecutor.Invoke(async (useSocketsHttpHandlerString, useHttp2String) => { string username = "testuser"; string password = "password"; Uri uri = Configuration.Http.BasicAuthUriForCreds(secure: false, userName: username, password: password); - HttpClientHandler handler = CreateHttpClientHandler(useSocketsHttpHandlerString); + HttpClientHandler handler = CreateHttpClientHandler(useSocketsHttpHandlerString, useHttp2String); handler.Credentials = new NetworkCredential(username, password); - using (var client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient(handler, useHttp2String)) { byte[] postData = Encoding.UTF8.GetBytes("This is data to post."); var stream = new MultiInterfaceReadOnlyStream(postData); @@ -96,21 +96,21 @@ public void Authentication_UseMultiInterfaceStreamContent_Success() } return RemoteExecutor.SuccessExitCode; - }, UseSocketsHttpHandler.ToString()).Dispose(); + }, UseSocketsHttpHandler.ToString(), UseHttp2.ToString()).Dispose(); } [Fact] public void Authentication_UseMemoryStreamVisibleBufferContent_Success() { - RemoteExecutor.Invoke(async useSocketsHttpHandlerString => + RemoteExecutor.Invoke(async (useSocketsHttpHandlerString, useHttp2String) => { string username = "testuser"; string password = "password"; Uri uri = Configuration.Http.BasicAuthUriForCreds(secure: false, userName: username, password: password); - HttpClientHandler handler = CreateHttpClientHandler(useSocketsHttpHandlerString); + HttpClientHandler handler = CreateHttpClientHandler(useSocketsHttpHandlerString, useHttp2String); handler.Credentials = new NetworkCredential(username, password); - using (var client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient(handler, useHttp2String)) { byte[] postData = Encoding.UTF8.GetBytes("This is data to post."); var stream = new MemoryStream(postData, 0, postData.Length, false, true); @@ -124,21 +124,21 @@ public void Authentication_UseMemoryStreamVisibleBufferContent_Success() } return RemoteExecutor.SuccessExitCode; - }, UseSocketsHttpHandler.ToString()).Dispose(); + }, UseSocketsHttpHandler.ToString(), UseHttp2.ToString()).Dispose(); } [Fact] public void Authentication_UseMemoryStreamNotVisibleBufferContent_Success() { - RemoteExecutor.Invoke(async useSocketsHttpHandlerString => + RemoteExecutor.Invoke(async (useSocketsHttpHandlerString, useHttp2String) => { string username = "testuser"; string password = "password"; Uri uri = Configuration.Http.BasicAuthUriForCreds(secure: false, userName: username, password: password); - HttpClientHandler handler = CreateHttpClientHandler(useSocketsHttpHandlerString); + HttpClientHandler handler = CreateHttpClientHandler(useSocketsHttpHandlerString, useHttp2String); handler.Credentials = new NetworkCredential(username, password); - using (var client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient(handler, useHttp2String)) { byte[] postData = Encoding.UTF8.GetBytes("This is data to post."); var stream = new MemoryStream(postData, 0, postData.Length, false, false); @@ -152,7 +152,7 @@ public void Authentication_UseMemoryStreamNotVisibleBufferContent_Success() } return RemoteExecutor.SuccessExitCode; - }, UseSocketsHttpHandler.ToString()).Dispose(); + }, UseSocketsHttpHandler.ToString(), UseHttp2.ToString()).Dispose(); } } } diff --git a/src/System.Net.Http/tests/FunctionalTests/SchSendAuxRecordHttpTest.cs b/src/System.Net.Http/tests/FunctionalTests/SchSendAuxRecordHttpTest.cs index 61a1a5253d91..81173e5e166e 100644 --- a/src/System.Net.Http/tests/FunctionalTests/SchSendAuxRecordHttpTest.cs +++ b/src/System.Net.Http/tests/FunctionalTests/SchSendAuxRecordHttpTest.cs @@ -26,7 +26,7 @@ public async Task HttpClient_ClientUsesAuxRecord_Ok() using (var server = new HttpsTestServer(options)) using (HttpClientHandler handler = CreateHttpClientHandler()) - using (var client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient(handler)) { handler.ServerCertificateCustomValidationCallback = TestHelper.AllowAllCertificates; server.Start(); diff --git a/src/System.Net.Http/tests/FunctionalTests/SocketsHttpHandlerTest.cs b/src/System.Net.Http/tests/FunctionalTests/SocketsHttpHandlerTest.cs index e37537aa6252..17132cca6a96 100644 --- a/src/System.Net.Http/tests/FunctionalTests/SocketsHttpHandlerTest.cs +++ b/src/System.Net.Http/tests/FunctionalTests/SocketsHttpHandlerTest.cs @@ -169,7 +169,7 @@ public async Task SmallConnectionLifetimeWithMaxConnections_PendingRequestUsesDi handler.PooledConnectionLifetime = TimeSpan.FromMilliseconds(lifetimeMilliseconds); handler.MaxConnectionsPerServer = 1; - using (HttpClient client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient(handler)) { await LoopbackServer.CreateServerAsync(async (server, uri) => { @@ -254,7 +254,7 @@ public void MaxResponseDrainSize_InvalidArgument_Throws() public void MaxResponseDrainSize_SetAfterUse_Throws() { using (var handler = new SocketsHttpHandler()) - using (var client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient(handler)) { handler.MaxResponseDrainSize = 1; client.GetAsync("http://" + Guid.NewGuid().ToString("N")); // ignoring failure @@ -297,7 +297,7 @@ public void MaxResponseDraiTime_InvalidArgument_Throws() public void ResponseDrainTimeout_SetAfterUse_Throws() { using (var handler = new SocketsHttpHandler()) - using (var client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient(handler)) { handler.ResponseDrainTimeout = TimeSpan.FromSeconds(42); client.GetAsync("http://" + Guid.NewGuid().ToString("N")); // ignoring failure @@ -323,7 +323,7 @@ await LoopbackServer.CreateClientAndServerAsync( // Set MaxConnectionsPerServer to 1. This will ensure we will wait for the previous request to drain (or fail to) handler.MaxConnectionsPerServer = 1; - using (var client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient(handler)) { HttpResponseMessage response1 = await client.GetAsync(url, HttpCompletionOption.ResponseHeadersRead); ValidateResponseHeaders(response1, totalSize, mode); @@ -370,7 +370,7 @@ await LoopbackServer.CreateClientAndServerAsync( // Set MaxConnectionsPerServer to 1. This will ensure we will wait for the previous request to drain (or fail to) handler.MaxConnectionsPerServer = 1; - using (var client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient(handler)) { HttpResponseMessage response1 = await client.GetAsync(url, HttpCompletionOption.ResponseHeadersRead); ValidateResponseHeaders(response1, totalSize, mode); @@ -418,7 +418,7 @@ await LoopbackServer.CreateClientAndServerAsync( // Set MaxConnectionsPerServer to 1. This will ensure we will wait for the previous request to drain (or fail to) handler.MaxConnectionsPerServer = 1; - using (var client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient(handler)) { client.Timeout = Timeout.InfiniteTimeSpan; @@ -527,11 +527,409 @@ public SocketsHttpHandler_HttpClientHandler_Proxy_Test(ITestOutputHelper output) protected override bool UseSocketsHttpHandler => true; } - public sealed class SocketsHttpHandler_HttpClientHandler_TrailingHeaders_Test : HttpClientHandlerTest_TrailingHeaders_Test + public abstract class SocketsHttpHandler_TrailingHeaders_Test : HttpClientHandlerTestBase { - public SocketsHttpHandler_HttpClientHandler_TrailingHeaders_Test(ITestOutputHelper output) : base(output) { } - // PlatformHandlers don't support trailers. + public SocketsHttpHandler_TrailingHeaders_Test(ITestOutputHelper output) : base(output) { } + + protected static byte[] DataBytes = Encoding.ASCII.GetBytes("data"); + + protected static readonly IList TrailingHeaders = new HttpHeaderData[] { + new HttpHeaderData("MyCoolTrailerHeader", "amazingtrailer"), + new HttpHeaderData("EmptyHeader", ""), + new HttpHeaderData("Hello", "World") }; + + protected static Frame MakeDataFrame(int streamId, byte[] data, bool endStream = false) => + new DataFrame(data, (endStream ? FrameFlags.EndStream : FrameFlags.None), 0, streamId); + } + + public class SocketsHttpHandler_Http1_TrailingHeaders_Test : SocketsHttpHandler_TrailingHeaders_Test + { + public SocketsHttpHandler_Http1_TrailingHeaders_Test(ITestOutputHelper output) : base(output) { } protected override bool UseSocketsHttpHandler => true; + + [Theory] + [InlineData(false)] + [InlineData(true)] + public async Task GetAsyncDefaultCompletionOption_TrailingHeaders_Available(bool includeTrailerHeader) + { + await LoopbackServer.CreateServerAsync(async (server, url) => + { + using (HttpClientHandler handler = CreateHttpClientHandler()) + using (HttpClient client = CreateHttpClient(handler)) + { + Task getResponseTask = client.GetAsync(url); + await TestHelper.WhenAllCompletedOrAnyFailed( + getResponseTask, + server.AcceptConnectionSendCustomResponseAndCloseAsync( + "HTTP/1.1 200 OK\r\n" + + "Connection: close\r\n" + + "Transfer-Encoding: chunked\r\n" + + (includeTrailerHeader ? "Trailer: MyCoolTrailerHeader, Hello\r\n" : "") + + "\r\n" + + "4\r\n" + + "data\r\n" + + "0\r\n" + + "MyCoolTrailerHeader: amazingtrailer\r\n" + + "Hello: World\r\n" + + "\r\n")); + + using (HttpResponseMessage response = await getResponseTask) + { + Assert.Equal(HttpStatusCode.OK, response.StatusCode); + Assert.Contains("chunked", response.Headers.GetValues("Transfer-Encoding")); + + // Check the Trailer header. + if (includeTrailerHeader) + { + Assert.Contains("MyCoolTrailerHeader", response.Headers.GetValues("Trailer")); + Assert.Contains("Hello", response.Headers.GetValues("Trailer")); + } + + Assert.Contains("amazingtrailer", response.TrailingHeaders.GetValues("MyCoolTrailerHeader")); + Assert.Contains("World", response.TrailingHeaders.GetValues("Hello")); + + string data = await response.Content.ReadAsStringAsync(); + Assert.Contains("data", data); + // Trailers should not be part of the content data. + Assert.DoesNotContain("MyCoolTrailerHeader", data); + Assert.DoesNotContain("amazingtrailer", data); + Assert.DoesNotContain("Hello", data); + Assert.DoesNotContain("World", data); + } + } + }); + } + + [Fact] + public async Task GetAsyncResponseHeadersReadOption_TrailingHeaders_Available() + { + await LoopbackServer.CreateServerAsync(async (server, url) => + { + using (HttpClientHandler handler = CreateHttpClientHandler()) + using (HttpClient client = CreateHttpClient(handler)) + { + Task getResponseTask = client.GetAsync(url, HttpCompletionOption.ResponseHeadersRead); + await TestHelper.WhenAllCompletedOrAnyFailed( + getResponseTask, + server.AcceptConnectionSendCustomResponseAndCloseAsync( + "HTTP/1.1 200 OK\r\n" + + "Connection: close\r\n" + + "Transfer-Encoding: chunked\r\n" + + "Trailer: MyCoolTrailerHeader\r\n" + + "\r\n" + + "4\r\n" + + "data\r\n" + + "0\r\n" + + "MyCoolTrailerHeader: amazingtrailer\r\n" + + "Hello: World\r\n" + + "\r\n")); + + using (HttpResponseMessage response = await getResponseTask) + { + Assert.Equal(HttpStatusCode.OK, response.StatusCode); + Assert.Contains("chunked", response.Headers.GetValues("Transfer-Encoding")); + Assert.Contains("MyCoolTrailerHeader", response.Headers.GetValues("Trailer")); + + // Pending read on the response content. + var trailingHeaders = response.TrailingHeaders; + Assert.Empty(trailingHeaders); + + Stream stream = await response.Content.ReadAsStreamAsync(); + Byte[] data = new Byte[100]; + // Read some data, preferably whole body. + int readBytes = await stream.ReadAsync(data, 0, 4); + + // Intermediate test - haven't reached stream EOF yet. + Assert.Empty(response.TrailingHeaders); + if (readBytes == 4) + { + // If we consumed whole content, check content. + Assert.Contains("data", System.Text.Encoding.Default.GetString(data)); + } + + // Read data until EOF is reached + while (stream.Read(data, 0, data.Length) != 0) + ; + + Assert.Same(trailingHeaders, response.TrailingHeaders); + Assert.Contains("amazingtrailer", response.TrailingHeaders.GetValues("MyCoolTrailerHeader")); + Assert.Contains("World", response.TrailingHeaders.GetValues("Hello")); + } + } + }); + } + + [Theory] + [InlineData("Age", "1")] + [InlineData("Authorization", "Basic YWxhZGRpbjpvcGVuc2VzYW1l")] + [InlineData("Cache-Control", "no-cache")] + [InlineData("Content-Encoding", "gzip")] + [InlineData("Content-Length", "22")] + [InlineData("Content-type", "foo/bar")] + [InlineData("Content-Range", "bytes 200-1000/67589")] + [InlineData("Date", "Wed, 21 Oct 2015 07:28:00 GMT")] + [InlineData("Expect", "100-continue")] + [InlineData("Expires", "Wed, 21 Oct 2015 07:28:00 GMT")] + [InlineData("Host", "foo")] + [InlineData("If-Match", "Wed, 21 Oct 2015 07:28:00 GMT")] + [InlineData("If-Modified-Since", "Wed, 21 Oct 2015 07:28:00 GMT")] + [InlineData("If-None-Match", "*")] + [InlineData("If-Range", "Wed, 21 Oct 2015 07:28:00 GMT")] + [InlineData("If-Unmodified-Since", "Wed, 21 Oct 2015 07:28:00 GMT")] + [InlineData("Location", "/index.html")] + [InlineData("Max-Forwards", "2")] + [InlineData("Pragma", "no-cache")] + [InlineData("Range", "5/10")] + [InlineData("Retry-After", "20")] + [InlineData("Set-Cookie", "foo=bar")] + [InlineData("TE", "boo")] + [InlineData("Transfer-Encoding", "chunked")] + [InlineData("Transfer-Encoding", "gzip")] + [InlineData("Vary", "*")] + [InlineData("Warning", "300 - \"Be Warned!\"")] + public async Task GetAsync_ForbiddenTrailingHeaders_Ignores(string name, string value) + { + await LoopbackServer.CreateClientAndServerAsync(async url => + { + using (HttpClientHandler handler = CreateHttpClientHandler()) + using (HttpClient client = CreateHttpClient(handler)) + { + HttpResponseMessage response = await client.GetAsync(url); + Assert.Contains("amazingtrailer", response.TrailingHeaders.GetValues("MyCoolTrailerHeader")); + Assert.False(response.TrailingHeaders.TryGetValues(name, out IEnumerable values)); + Assert.Contains("Loopback", response.TrailingHeaders.GetValues("Server")); + } + }, server => server.AcceptConnectionSendCustomResponseAndCloseAsync( + "HTTP/1.1 200 OK\r\n" + + "Connection: close\r\n" + + "Transfer-Encoding: chunked\r\n" + + $"Trailer: Set-Cookie, MyCoolTrailerHeader, {name}, Hello\r\n" + + "\r\n" + + "4\r\n" + + "data\r\n" + + "0\r\n" + + "Set-Cookie: yummy\r\n" + + "MyCoolTrailerHeader: amazingtrailer\r\n" + + $"{name}: {value}\r\n" + + "Server: Loopback\r\n" + + $"{name}: {value}\r\n" + + "\r\n")); + } + + [Fact] + public async Task GetAsync_NoTrailingHeaders_EmptyCollection() + { + await LoopbackServer.CreateServerAsync(async (server, url) => + { + using (HttpClientHandler handler = CreateHttpClientHandler()) + using (HttpClient client = CreateHttpClient(handler)) + { + Task getResponseTask = client.GetAsync(url); + await TestHelper.WhenAllCompletedOrAnyFailed( + getResponseTask, + server.AcceptConnectionSendCustomResponseAndCloseAsync( + "HTTP/1.1 200 OK\r\n" + + "Connection: close\r\n" + + "Transfer-Encoding: chunked\r\n" + + "Trailer: MyCoolTrailerHeader\r\n" + + "\r\n" + + "4\r\n" + + "data\r\n" + + "0\r\n" + + "\r\n")); + + using (HttpResponseMessage response = await getResponseTask) + { + Assert.Equal(HttpStatusCode.OK, response.StatusCode); + Assert.Contains("chunked", response.Headers.GetValues("Transfer-Encoding")); + + Assert.NotNull(response.TrailingHeaders); + Assert.Equal(0, response.TrailingHeaders.Count()); + Assert.Same(response.TrailingHeaders, response.TrailingHeaders); + } + } + }); + } + } + + public sealed class SocketsHttpHandler_Http2_TrailingHeaders_Test : SocketsHttpHandler_TrailingHeaders_Test + { + public SocketsHttpHandler_Http2_TrailingHeaders_Test(ITestOutputHelper output) : base(output) { } + protected override bool UseSocketsHttpHandler => true; + protected override bool UseHttp2 => true; + + [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.SupportsAlpn))] + public async Task Http2GetAsync_NoTrailingHeaders_EmptyCollection() + { + using (Http2LoopbackServer server = Http2LoopbackServer.CreateServer()) + using (HttpClient client = CreateHttpClient()) + { + Task sendTask = client.GetAsync(server.Address); + + await server.EstablishConnectionAsync(); + + int streamId = await server.ReadRequestHeaderAsync(); + + // Response header. + await server.SendDefaultResponseHeadersAsync(streamId); + + // Response data. + await server.WriteFrameAsync(MakeDataFrame(streamId, DataBytes, endStream: true)); + + // Server doesn't send trailing header frame. + HttpResponseMessage response = await sendTask; + Assert.Equal(HttpStatusCode.OK, response.StatusCode); + Assert.NotNull(response.TrailingHeaders); + Assert.Equal(0, response.TrailingHeaders.Count()); + } + } + + [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.SupportsAlpn))] + public async Task Http2GetAsync_MissingTrailer_TrailingHeadersAccepted() + { + using (Http2LoopbackServer server = Http2LoopbackServer.CreateServer()) + using (HttpClient client = CreateHttpClient()) + { + Task sendTask = client.GetAsync(server.Address); + + await server.EstablishConnectionAsync(); + + int streamId = await server.ReadRequestHeaderAsync(); + + // Response header. + await server.SendDefaultResponseHeadersAsync(streamId); + + // Response data, missing Trailers. + await server.WriteFrameAsync(MakeDataFrame(streamId, DataBytes)); + + // Additional trailing header frame. + await server.SendResponseHeadersAsync(streamId, isTrailingHeader:true, headers: TrailingHeaders, endStream : true); + + HttpResponseMessage response = await sendTask; + Assert.Equal(HttpStatusCode.OK, response.StatusCode); + Assert.Equal(TrailingHeaders.Count, response.TrailingHeaders.Count()); + Assert.Contains("amazingtrailer", response.TrailingHeaders.GetValues("MyCoolTrailerHeader")); + Assert.Contains("World", response.TrailingHeaders.GetValues("Hello")); + } + } + + [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.SupportsAlpn))] + public async Task Http2GetAsync_TrailerHeaders_TrailingPseudoHeadersThrow() + { + using (Http2LoopbackServer server = Http2LoopbackServer.CreateServer()) + using (HttpClient client = CreateHttpClient()) + { + Task sendTask = client.GetAsync(server.Address); + + await server.EstablishConnectionAsync(); + + int streamId = await server.ReadRequestHeaderAsync(); + + // Response header. + await server.SendDefaultResponseHeadersAsync(streamId); + await server.WriteFrameAsync(MakeDataFrame(streamId, DataBytes)); + // Additional trailing header frame with pseudo-headers again.. + await server.SendResponseHeadersAsync(streamId, isTrailingHeader:false, headers: TrailingHeaders, endStream : true); + + await Assert.ThrowsAsync(() => sendTask); + } + } + + [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.SupportsAlpn))] + public async Task Http2GetAsyncResponseHeadersReadOption_TrailingHeaders_Available() + { + using (Http2LoopbackServer server = Http2LoopbackServer.CreateServer()) + using (HttpClient client = CreateHttpClient()) + { + Task sendTask = client.GetAsync(server.Address, HttpCompletionOption.ResponseHeadersRead); + + await server.EstablishConnectionAsync(); + + int streamId = await server.ReadRequestHeaderAsync(); + + // Response header. + await server.SendDefaultResponseHeadersAsync(streamId); + + // Response data, missing Trailers. + await server.WriteFrameAsync(MakeDataFrame(streamId, DataBytes)); + + HttpResponseMessage response = await sendTask; + Assert.Equal(HttpStatusCode.OK, response.StatusCode); + + // Pending read on the response content. + Assert.Empty(response.TrailingHeaders); + + Stream stream = await response.Content.ReadAsStreamAsync(); + Byte[] data = new Byte[100]; + await stream.ReadAsync(data, 0, data.Length); + + // Intermediate test - haven't reached stream EOF yet. + Assert.Empty(response.TrailingHeaders); + + // Finish data stream and write out trailing headers. + await server.WriteFrameAsync(MakeDataFrame(streamId, DataBytes)); + await server.SendResponseHeadersAsync(streamId, endStream : true, isTrailingHeader:true, headers: TrailingHeaders); + + // Read data until EOF is reached + while (stream.Read(data, 0, data.Length) != 0); + + Assert.Equal(TrailingHeaders.Count, response.TrailingHeaders.Count()); + Assert.Contains("amazingtrailer", response.TrailingHeaders.GetValues("MyCoolTrailerHeader")); + Assert.Contains("World", response.TrailingHeaders.GetValues("Hello")); + } + } + + [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.SupportsAlpn))] + public async Task Http2GetAsync_TrailerHeaders_TrailingHeaderNoBody() + { + using (Http2LoopbackServer server = Http2LoopbackServer.CreateServer()) + using (HttpClient client = CreateHttpClient()) + { + Task sendTask = client.GetAsync(server.Address); + + await server.EstablishConnectionAsync(); + + int streamId = await server.ReadRequestHeaderAsync(); + + // Response header. + await server.SendDefaultResponseHeadersAsync(streamId); + await server.SendResponseHeadersAsync(streamId, endStream : true, isTrailingHeader:true, headers: TrailingHeaders); + + HttpResponseMessage response = await sendTask; + Assert.Equal(HttpStatusCode.OK, response.StatusCode); + Assert.Equal(TrailingHeaders.Count, response.TrailingHeaders.Count()); + Assert.Contains("amazingtrailer", response.TrailingHeaders.GetValues("MyCoolTrailerHeader")); + Assert.Contains("World", response.TrailingHeaders.GetValues("Hello")); + } + } + + [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.SupportsAlpn))] + public async Task Http2GetAsync_TrailingHeaders_NoData_EmptyResponseObserved() + { + using (Http2LoopbackServer server = Http2LoopbackServer.CreateServer()) + using (HttpClient client = CreateHttpClient()) + { + Task sendTask = client.GetAsync(server.Address); + + await server.EstablishConnectionAsync(); + + int streamId = await server.ReadRequestHeaderAsync(); + + // Response header. + await server.SendDefaultResponseHeadersAsync(streamId); + + // No data. + + // Response trailing headers + await server.SendResponseHeadersAsync(streamId, isTrailingHeader: true, headers: TrailingHeaders); + + HttpResponseMessage response = await sendTask; + Assert.Equal(HttpStatusCode.OK, response.StatusCode); + Assert.Equal(Array.Empty(), await response.Content.ReadAsByteArrayAsync()); + Assert.Contains("amazingtrailer", response.TrailingHeaders.GetValues("MyCoolTrailerHeader")); + Assert.Contains("World", response.TrailingHeaders.GetValues("Hello")); + } + } } public sealed class SocketsHttpHandler_SchSendAuxRecordHttpTest : SchSendAuxRecordHttpTest @@ -633,7 +1031,7 @@ public void ConnectTimeout_ValidValues_Roundtrip(long ms) public void ConnectTimeout_SetAfterUse_Throws() { using (var handler = new SocketsHttpHandler()) - using (var client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient(handler)) { handler.ConnectTimeout = TimeSpan.FromMilliseconds(int.MaxValue); client.GetAsync("http://" + Guid.NewGuid().ToString("N")); // ignoring failure @@ -658,7 +1056,7 @@ await LoopbackServer.CreateClientAndServerAsync(async uri => var sw = Stopwatch.StartNew(); await Assert.ThrowsAsync(() => invoker.SendAsync(new HttpRequestMessage(HttpMethod.Get, - new UriBuilder(uri) { Scheme = "https" }.ToString()), default)); + new UriBuilder(uri) { Scheme = "https" }.ToString()) { Version = VersionFromUseHttp2 }, default)); sw.Stop(); Assert.InRange(sw.ElapsedMilliseconds, 500, 60_000); @@ -706,7 +1104,7 @@ public void Expect100ContinueTimeout_ValidValues_Roundtrip(long ms) public void Expect100ContinueTimeout_SetAfterUse_Throws() { using (var handler = new SocketsHttpHandler()) - using (var client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient(handler)) { handler.Expect100ContinueTimeout = TimeSpan.FromMilliseconds(int.MaxValue); client.GetAsync("http://" + Guid.NewGuid().ToString("N")); // ignoring failure @@ -729,14 +1127,14 @@ await LoopbackServer.CreateClientAndServerAsync(async uri => var tcs = new TaskCompletionSource(); var content = new SetTcsContent(new MemoryStream(new byte[1]), tcs); - var request = new HttpRequestMessage(HttpMethod.Post, uri) { Content = content }; + var request = new HttpRequestMessage(HttpMethod.Post, uri) { Content = content, Version = VersionFromUseHttp2 }; request.Headers.ExpectContinue = true; var sw = Stopwatch.StartNew(); (await invoker.SendAsync(request, default)).Dispose(); sw.Stop(); - Assert.InRange(sw.Elapsed, delay - TimeSpan.FromSeconds(.5), delay * 10); // arbitrary wiggle room + Assert.InRange(sw.Elapsed, delay - TimeSpan.FromSeconds(.5), delay * 20); // arbitrary wiggle room } }, async server => { @@ -945,7 +1343,7 @@ await LoopbackServer.CreateServerAsync(async (server, url) => { using (HttpClient client = CreateHttpClient()) { - HttpRequestMessage request = new HttpRequestMessage(new HttpMethod("CONNECT"), url); + HttpRequestMessage request = new HttpRequestMessage(new HttpMethod("CONNECT"), url) { Version = VersionFromUseHttp2 }; request.Headers.Host = "foo.com:345"; // We need to use ResponseHeadersRead here, otherwise we will hang trying to buffer the response body. @@ -1004,7 +1402,7 @@ await LoopbackServer.CreateServerAsync(async (server, url) => { using (HttpClient client = CreateHttpClient()) { - HttpRequestMessage request = new HttpRequestMessage(new HttpMethod("CONNECT"), url); + HttpRequestMessage request = new HttpRequestMessage(new HttpMethod("CONNECT"), url) { Version = VersionFromUseHttp2 }; request.Headers.Host = "foo.com:345"; // We need to use ResponseHeadersRead here, otherwise we will hang trying to buffer the response body. Task responseTask = client.SendAsync(request, HttpCompletionOption.ResponseHeadersRead); @@ -1164,7 +1562,7 @@ public async Task SmallConnectionTimeout_SubsequentRequestUsesDifferentConnectio default: throw new ArgumentOutOfRangeException(nameof(timeoutPropertyName)); } - using (HttpClient client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient(handler)) { await LoopbackServer.CreateServerAsync(async (server, uri) => { @@ -1196,8 +1594,6 @@ await server.AcceptConnectionAsync(async connection2 => [InlineData("PooledConnectionIdleTimeout")] public async Task Http2_SmallConnectionTimeout_SubsequentRequestUsesDifferentConnection(string timeoutPropertyName) { - - await Http2LoopbackServerFactory.CreateServerAsync(async (server, url) => { HttpClientHandler handler = CreateHttpClientHandler(useSocketsHttpHandler : true, useHttp2LoopbackServer : true); @@ -1209,8 +1605,9 @@ await Http2LoopbackServerFactory.CreateServerAsync(async (server, url) => default: throw new ArgumentOutOfRangeException(nameof(timeoutPropertyName)); } - using (HttpClient client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient(handler)) { + SetDefaultRequestVersion(client, HttpVersion.Version20); Task request1 = client.GetStringAsync(url); await server.EstablishConnectionAsync(); @@ -1242,13 +1639,13 @@ await Http2LoopbackServerFactory.CreateServerAsync(async (server, url) => [InlineData(true)] public void ConnectionsPooledThenDisposed_NoUnobservedTaskExceptions(bool secure) { - RemoteExecutor.Invoke(async secureString => + RemoteExecutor.Invoke(async (secureString, useHttp2String) => { var releaseServer = new TaskCompletionSource(); await LoopbackServer.CreateClientAndServerAsync(async uri => { using (var handler = new SocketsHttpHandler()) - using (var client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient(handler, useHttp2String)) { handler.SslOptions.RemoteCertificateValidationCallback = delegate { return true; }; handler.PooledConnectionLifetime = TimeSpan.FromMilliseconds(1); @@ -1277,7 +1674,7 @@ await LoopbackServer.CreateClientAndServerAsync(async uri => }), new LoopbackServer.Options { UseSsl = bool.Parse(secureString) }); return RemoteExecutor.SuccessExitCode; - }, secure.ToString()).Dispose(); + }, secure.ToString(), UseHttp2.ToString()).Dispose(); } [OuterLoop] @@ -1306,7 +1703,7 @@ private void HandlerDroppedWithoutDisposal_NotKeptAliveCore(TaskCompletionSource // Make a bunch of requests and drop the associated HttpClient instances after making them, without disposal. Task.WaitAll((from i in Enumerable.Range(0, 10) select LoopbackServer.CreateClientAndServerAsync( - url => new HttpClient(new SocketsHttpHandler { Proxy = p }).GetStringAsync(url), + url => CreateHttpClient(new SocketsHttpHandler { Proxy = p }).GetStringAsync(url), server => server.AcceptConnectionSendResponseAndCloseAsync())).ToArray()); } @@ -1339,7 +1736,7 @@ public async Task ProxyAuth_SameConnection_Succeeds() { handler.Proxy = new UseSpecifiedUriWebProxy(proxyUrl, new NetworkCredential("abc", "def")); - using (var client = new HttpClient(handler)) + using (HttpClient client = CreateHttpClient(handler)) { Task request = client.GetStringAsync($"http://notarealserver.com/"); @@ -1362,13 +1759,6 @@ await proxyServer.AcceptConnectionAsync(async connection => public sealed class SocketsHttpHandler_PublicAPIBehavior_Test { - private static async Task IssueRequestAsync(HttpMessageHandler handler) - { - using (var c = new HttpMessageInvoker(handler, disposeHandler: false)) - await Assert.ThrowsAnyAsync(() => - c.SendAsync(new HttpRequestMessage(HttpMethod.Get, new Uri("/shouldquicklyfail", UriKind.Relative)), default)); - } - [Fact] public void AllowAutoRedirect_GetSet_Roundtrips() { @@ -1650,7 +2040,9 @@ public async Task AfterDisposeSendAsync_GettersUsable_SettersThrow(bool dispose) } else { - await IssueRequestAsync(handler); + using (var c = new HttpMessageInvoker(handler, disposeHandler: false)) + await Assert.ThrowsAnyAsync(() => + c.SendAsync(new HttpRequestMessage(HttpMethod.Get, new Uri("/shouldquicklyfail", UriKind.Relative)), default)); expectedExceptionType = typeof(InvalidOperationException); } @@ -1783,7 +2175,7 @@ public sealed class SocketsHttpHandlerTest_Cookies_Http2 : HttpClientHandlerTest { public SocketsHttpHandlerTest_Cookies_Http2(ITestOutputHelper output) : base(output) { } protected override bool UseSocketsHttpHandler => true; - protected override bool UseHttp2LoopbackServer => true; + protected override bool UseHttp2 => true; } [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.SupportsAlpn))] @@ -1791,7 +2183,7 @@ public sealed class SocketsHttpHandlerTest_HttpClientHandlerTest_Http2 : HttpCli { public SocketsHttpHandlerTest_HttpClientHandlerTest_Http2(ITestOutputHelper output) : base(output) { } protected override bool UseSocketsHttpHandler => true; - protected override bool UseHttp2LoopbackServer => true; + protected override bool UseHttp2 => true; } public sealed class SocketsHttpHandlerTest_HttpClientHandlerTest_Headers_Http11 : HttpClientHandlerTest_Headers @@ -1805,7 +2197,7 @@ public sealed class SocketsHttpHandlerTest_HttpClientHandlerTest_Headers_Http2 : { public SocketsHttpHandlerTest_HttpClientHandlerTest_Headers_Http2(ITestOutputHelper output) : base(output) { } protected override bool UseSocketsHttpHandler => true; - protected override bool UseHttp2LoopbackServer => true; + protected override bool UseHttp2 => true; } [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.SupportsAlpn))] @@ -1813,6 +2205,6 @@ public sealed class SocketsHttpHandler_HttpClientHandler_Cancellation_Test_Http2 { public SocketsHttpHandler_HttpClientHandler_Cancellation_Test_Http2(ITestOutputHelper output) : base(output) { } protected override bool UseSocketsHttpHandler => true; - protected override bool UseHttp2LoopbackServer => true; + protected override bool UseHttp2 => true; } } diff --git a/src/System.Net.Http/tests/FunctionalTests/System.Net.Http.Functional.Tests.csproj b/src/System.Net.Http/tests/FunctionalTests/System.Net.Http.Functional.Tests.csproj index 0844ed84a87e..e7b2d9ff7d25 100644 --- a/src/System.Net.Http/tests/FunctionalTests/System.Net.Http.Functional.Tests.csproj +++ b/src/System.Net.Http/tests/FunctionalTests/System.Net.Http.Functional.Tests.csproj @@ -140,7 +140,6 @@ - diff --git a/src/System.Net.Http/tests/FunctionalTests/TestHelper.cs b/src/System.Net.Http/tests/FunctionalTests/TestHelper.cs index 838a7814c623..98ea27ae592d 100644 --- a/src/System.Net.Http/tests/FunctionalTests/TestHelper.cs +++ b/src/System.Net.Http/tests/FunctionalTests/TestHelper.cs @@ -119,52 +119,39 @@ public static IPAddress GetIPv6LinkLocalAddress() => .Where(a => a.IsIPv6LinkLocal) .FirstOrDefault(); - public static void EnsureHttp2Feature(HttpClientHandler handler, bool useHttp2LoopbackServer = true) + public static void EnableUnencryptedHttp2IfNecessary(HttpClientHandler handler) { - // All .NET Core implementations of HttpClientHandler have HTTP/2 enabled by default except when using - // SocketsHttpHandler. Right now, the HTTP/2 feature is disabled on SocketsHttpHandler unless certain - // AppContext switches or environment variables are set. To help with testing, we can enable the HTTP/2 - // feature for a specific handler instance by using reflection. - FieldInfo field_socketsHttpHandler = typeof(HttpClientHandler).GetField( - "_socketsHttpHandler", - BindingFlags.NonPublic | BindingFlags.Instance); - if (field_socketsHttpHandler == null) + if (PlatformDetection.SupportsAlpn && !Capability.Http2ForceUnencryptedLoopback()) + { + return; + } + + FieldInfo socketsHttpHandlerField = typeof(HttpClientHandler).GetField("_socketsHttpHandler", BindingFlags.NonPublic | BindingFlags.Instance); + if (socketsHttpHandlerField == null) { // Not using .NET Core implementation, i.e. could be .NET Framework or UAP. return; } - object _socketsHttpHandler = field_socketsHttpHandler.GetValue(handler); - if (_socketsHttpHandler == null) + object socketsHttpHandler = socketsHttpHandlerField.GetValue(handler); + if (socketsHttpHandler == null) { // Not using SocketsHttpHandler, i.e. using WinHttpHandler or CurlHandler. return; } // Get HttpConnectionSettings object from SocketsHttpHandler. - Type type_SocketsHttpHandler = typeof(HttpClientHandler).Assembly.GetType("System.Net.Http.SocketsHttpHandler"); - FieldInfo field_settings = type_SocketsHttpHandler.GetField( - "_settings", - BindingFlags.NonPublic | BindingFlags.Instance); - Assert.NotNull(field_settings); - object _settings = field_settings.GetValue(_socketsHttpHandler); - Assert.NotNull(_settings); - - // Set _maxHttpVersion field to HTTP/2.0. - Type type_HttpConnectionSettings = typeof(HttpClientHandler).Assembly.GetType("System.Net.Http.HttpConnectionSettings"); - FieldInfo field_maxHttpVersion = type_HttpConnectionSettings.GetField( - "_maxHttpVersion", - BindingFlags.NonPublic | BindingFlags.Instance); - field_maxHttpVersion.SetValue(_settings, new Version(2, 0)); - - if (useHttp2LoopbackServer && (!PlatformDetection.SupportsAlpn || Capability.Http2ForceUnencryptedLoopback())) - { - // Allow HTTP/2.0 via unencrypted socket if ALPN is not supported on platform. - FieldInfo field_allowPlainHttp2 = type_HttpConnectionSettings.GetField( - "_allowUnencryptedHttp2", - BindingFlags.NonPublic | BindingFlags.Instance); - field_allowPlainHttp2.SetValue(_settings, true); - } + Type socketsHttpHandlerType = typeof(HttpClientHandler).Assembly.GetType("System.Net.Http.SocketsHttpHandler"); + FieldInfo settingsField = socketsHttpHandlerType.GetField("_settings", BindingFlags.NonPublic | BindingFlags.Instance); + Assert.NotNull(settingsField); + object settings = settingsField.GetValue(socketsHttpHandler); + Assert.NotNull(settings); + + // Allow HTTP/2.0 via unencrypted socket if ALPN is not supported on platform. + Type httpConnectionSettingsType = typeof(HttpClientHandler).Assembly.GetType("System.Net.Http.HttpConnectionSettings"); + FieldInfo allowUnencryptedHttp2Field = httpConnectionSettingsType.GetField("_allowUnencryptedHttp2", BindingFlags.NonPublic | BindingFlags.Instance); + Assert.NotNull(allowUnencryptedHttp2Field); + allowUnencryptedHttp2Field.SetValue(settings, true); } public static bool NativeHandlerSupportsSslConfiguration() diff --git a/src/System.Net.Http/tests/UnitTests/HttpContentTest.cs b/src/System.Net.Http/tests/UnitTests/HttpContentTest.cs index 59e8bdbada9b..364864292fa6 100644 --- a/src/System.Net.Http/tests/UnitTests/HttpContentTest.cs +++ b/src/System.Net.Http/tests/UnitTests/HttpContentTest.cs @@ -12,10 +12,10 @@ namespace System.Net.Http.Tests public class HttpContentTest { [Fact] - public void Dispose_BufferContentThenDisposeContent_BufferedStreamGetsDisposed() + public async Task Dispose_BufferContentThenDisposeContent_BufferedStreamGetsDisposed() { MockContent content = new MockContent(); - content.LoadIntoBufferAsync().Wait(); + await content.LoadIntoBufferAsync(); Type type = typeof(HttpContent); TypeInfo typeInfo = type.GetTypeInfo(); From 3728c9618debe640c22d7469fe4aa937f4a774b7 Mon Sep 17 00:00:00 2001 From: Santiago Fernandez Madero Date: Wed, 1 May 2019 23:28:49 -0700 Subject: [PATCH 167/607] Nop LongProcessNamesAreSupported test on Alpine (#37350) --- src/System.Diagnostics.Process/tests/ProcessTests.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/System.Diagnostics.Process/tests/ProcessTests.cs b/src/System.Diagnostics.Process/tests/ProcessTests.cs index 319e179149fd..8bd402108050 100644 --- a/src/System.Diagnostics.Process/tests/ProcessTests.cs +++ b/src/System.Diagnostics.Process/tests/ProcessTests.cs @@ -1898,6 +1898,11 @@ public void TestLongProcessIsWorking() [Fact] public void LongProcessNamesAreSupported() { + if (PlatformDetection.IsAlpine) + { + return; // https://github.com/dotnet/corefx/issues/37054 + } + string programPath = GetProgramPath("sleep"); if (programPath == null) From 182cd401a849cb5e4ef43ca82e21139aa6113769 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Thu, 2 May 2019 09:46:31 -0400 Subject: [PATCH 168/607] Update dependencies from https://github.com/dotnet/coreclr build 20190501.72 (#37361) - Microsoft.NET.Sdk.IL - 3.0.0-preview6-27701-72 - Microsoft.NETCore.ILAsm - 3.0.0-preview6-27701-72 - Microsoft.NETCore.Runtime.CoreCLR - 3.0.0-preview6-27701-72 --- eng/Version.Details.xml | 12 ++++++------ eng/Versions.props | 4 ++-- global.json | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 9a9a143309d3..030c4377d678 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -1,16 +1,16 @@ - + https://github.com/dotnet/coreclr - 7a24a538cd265993e5864179f51781398c28ecdf + 5a34da317e3f8cef7895d6d4ad6ed75f3a79d38e - + https://github.com/dotnet/coreclr - 7a24a538cd265993e5864179f51781398c28ecdf + 5a34da317e3f8cef7895d6d4ad6ed75f3a79d38e - + https://github.com/dotnet/coreclr - 7a24a538cd265993e5864179f51781398c28ecdf + 5a34da317e3f8cef7895d6d4ad6ed75f3a79d38e diff --git a/eng/Versions.props b/eng/Versions.props index 256938d0c1cf..2b5d4bebd4ac 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -40,8 +40,8 @@ 3.0.0-preview6-27629-07 3.0.0-preview6-27629-07 - 3.0.0-preview6-27630-79 - 3.0.0-preview6-27630-79 + 3.0.0-preview6-27701-72 + 3.0.0-preview6-27701-72 3.0.0-preview6.19230.13 4.6.0-preview6.19230.13 diff --git a/global.json b/global.json index 859129b226a1..0d2d1f2d1e23 100644 --- a/global.json +++ b/global.json @@ -5,6 +5,6 @@ "msbuild-sdks": { "Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19229.8", "Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19229.8", - "Microsoft.NET.Sdk.IL": "3.0.0-preview6-27630-79" + "Microsoft.NET.Sdk.IL": "3.0.0-preview6-27701-72" } } From ea24a554b787229ef1311e9d5f79decebaf9355a Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Thu, 2 May 2019 10:04:59 -0400 Subject: [PATCH 169/607] Update dependencies from https://github.com/dotnet/corefx build 20190502.1 (#37360) - runtime.native.System.IO.Ports - 4.6.0-preview6.19252.1 - Microsoft.NETCore.Platforms - 3.0.0-preview6.19252.1 --- eng/Version.Details.xml | 8 ++++---- eng/Versions.props | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 030c4377d678..d59e53ebd156 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -26,13 +26,13 @@ https://github.com/dotnet/core-setup a3967b6096dc6a688f338d9eb4f986d537977c1e - + https://github.com/dotnet/corefx - 830bf7fc0346d9453d85ad4ec726c92ac3e72998 + 3728c9618debe640c22d7469fe4aa937f4a774b7 - + https://github.com/dotnet/corefx - 830bf7fc0346d9453d85ad4ec726c92ac3e72998 + 3728c9618debe640c22d7469fe4aa937f4a774b7 https://github.com/dotnet/arcade diff --git a/eng/Versions.props b/eng/Versions.props index 2b5d4bebd4ac..cd18eef07e1b 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -43,8 +43,8 @@ 3.0.0-preview6-27701-72 3.0.0-preview6-27701-72 - 3.0.0-preview6.19230.13 - 4.6.0-preview6.19230.13 + 3.0.0-preview6.19252.1 + 4.6.0-preview6.19252.1 2.1.0-prerelease.19230.1 From ef08a1384a16c5dcc2632e3b636aac0e01108f38 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Thu, 2 May 2019 10:13:59 -0400 Subject: [PATCH 170/607] Update dependencies from https://github.com/dotnet/core-setup build 20190502.01 (#37359) - Microsoft.NETCore.App - 3.0.0-preview6-27702-01 - Microsoft.NETCore.DotNetHostPolicy - 3.0.0-preview6-27702-01 - Microsoft.NETCore.DotNetHost - 3.0.0-preview6-27702-01 --- eng/Version.Details.xml | 12 ++++++------ eng/Versions.props | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index d59e53ebd156..2f240f0474c7 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -14,17 +14,17 @@ - + https://github.com/dotnet/core-setup - a3967b6096dc6a688f338d9eb4f986d537977c1e + cc67037583762fd5ab3876dc5210c1a41bc42994 - + https://github.com/dotnet/core-setup - a3967b6096dc6a688f338d9eb4f986d537977c1e + cc67037583762fd5ab3876dc5210c1a41bc42994 - + https://github.com/dotnet/core-setup - a3967b6096dc6a688f338d9eb4f986d537977c1e + cc67037583762fd5ab3876dc5210c1a41bc42994 https://github.com/dotnet/corefx diff --git a/eng/Versions.props b/eng/Versions.props index cd18eef07e1b..7eb19da66c94 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -36,9 +36,9 @@ 2.2.0-beta.19229.8 1.0.0-beta.19229.8 - 3.0.0-preview6-27629-07 - 3.0.0-preview6-27629-07 - 3.0.0-preview6-27629-07 + 3.0.0-preview6-27702-01 + 3.0.0-preview6-27702-01 + 3.0.0-preview6-27702-01 3.0.0-preview6-27701-72 3.0.0-preview6-27701-72 From ef02cf17b5cdb57d5277b158cd3afba047df4d1b Mon Sep 17 00:00:00 2001 From: Viktor Hofer Date: Thu, 2 May 2019 16:32:27 +0200 Subject: [PATCH 171/607] Disable flaky Dns GetHostName tests on OSX (#37363) --- .../tests/FunctionalTests/GetHostByNameTest.cs | 2 ++ .../tests/FunctionalTests/GetHostEntryTest.cs | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/System.Net.NameResolution/tests/FunctionalTests/GetHostByNameTest.cs b/src/System.Net.NameResolution/tests/FunctionalTests/GetHostByNameTest.cs index 1ad3089295ea..0e12894a8a61 100644 --- a/src/System.Net.NameResolution/tests/FunctionalTests/GetHostByNameTest.cs +++ b/src/System.Net.NameResolution/tests/FunctionalTests/GetHostByNameTest.cs @@ -102,6 +102,7 @@ public void DnsObsoleteGetHostByName_IPv6String_ReturnsOnlyGivenIP() Assert.Equal(IPAddress.IPv6Loopback, entry.AddressList[0]); } + [ActiveIssue(37362, TestPlatforms.OSX)] [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotArm64Process))] // [ActiveIssue(32797)] public void DnsObsoleteGetHostByName_EmptyString_ReturnsHostName() { @@ -111,6 +112,7 @@ public void DnsObsoleteGetHostByName_EmptyString_ReturnsHostName() Assert.Contains(Dns.GetHostName(), entry.HostName, StringComparison.OrdinalIgnoreCase); } + [ActiveIssue(37362, TestPlatforms.OSX)] [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotArm64Process))] // [ActiveIssue(32797)] public void DnsObsoleteBeginEndGetHostByName_EmptyString_ReturnsHostName() { diff --git a/src/System.Net.NameResolution/tests/FunctionalTests/GetHostEntryTest.cs b/src/System.Net.NameResolution/tests/FunctionalTests/GetHostEntryTest.cs index 8b2a21d700ed..92aa0162c1ab 100644 --- a/src/System.Net.NameResolution/tests/FunctionalTests/GetHostEntryTest.cs +++ b/src/System.Net.NameResolution/tests/FunctionalTests/GetHostEntryTest.cs @@ -20,11 +20,13 @@ public async Task Dns_GetHostEntryAsync_IPAddress_Ok() await TestGetHostEntryAsync(() => Dns.GetHostEntryAsync(localIPAddress)); } + [ActiveIssue(37362, TestPlatforms.OSX)] [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsNotArm64Process))] // [ActiveIssue(32797)] [InlineData("")] [InlineData(TestSettings.LocalHost)] public Task Dns_GetHostEntry_HostString_Ok(string hostName) => TestGetHostEntryAsync(() => Task.FromResult(Dns.GetHostEntry(hostName))); + [ActiveIssue(37362, TestPlatforms.OSX)] [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsNotArm64Process))] // [ActiveIssue(32797)] [InlineData("")] [InlineData(TestSettings.LocalHost)] From 359762251831ef498814f6718a54f5b91439d974 Mon Sep 17 00:00:00 2001 From: Ahson Khan Date: Thu, 2 May 2019 10:04:58 -0700 Subject: [PATCH 172/607] Surround InvalidLargeEncode outerloop test with try-catch to avoid OOM (#37355) * Disable InvalidLargeEncode test on x86 to prevent OOM --- .../tests/JsonEncodedTextTests.cs | 25 +++++++++++-------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/src/System.Text.Json/tests/JsonEncodedTextTests.cs b/src/System.Text.Json/tests/JsonEncodedTextTests.cs index a23bc0668784..00a6568121a9 100644 --- a/src/System.Text.Json/tests/JsonEncodedTextTests.cs +++ b/src/System.Text.Json/tests/JsonEncodedTextTests.cs @@ -276,21 +276,24 @@ public static void InvalidEncode() Assert.Throws(() => JsonEncodedText.Encode((string)null)); } - [Fact] + [ConditionalFact(typeof(Environment), nameof(Environment.Is64BitProcess))] [OuterLoop] public static void InvalidLargeEncode() { - char[] largeValue = new char[400_000_000]; - - Span largeValueSpan = largeValue.AsSpan(); - largeValueSpan.Fill('a'); - - var largeValueString = new string(largeValue); - byte[] utf8Value = Encoding.UTF8.GetBytes(largeValue); + try + { + var largeValueString = new string('a', 400_000_000); + var utf8Value = new byte[400_000_000]; + utf8Value.AsSpan().Fill((byte)'a'); - Assert.Throws(() => JsonEncodedText.Encode(largeValueString)); - Assert.Throws(() => JsonEncodedText.Encode(largeValue)); - Assert.Throws(() => JsonEncodedText.Encode(utf8Value)); + Assert.Throws(() => JsonEncodedText.Encode(largeValueString)); + Assert.Throws(() => JsonEncodedText.Encode(largeValueString.AsSpan())); + Assert.Throws(() => JsonEncodedText.Encode(utf8Value)); + } + catch (OutOfMemoryException) + { + return; + } } public static IEnumerable InvalidUTF8Strings From 541d941e6e59793cd56708cd81e9fff85ec112f8 Mon Sep 17 00:00:00 2001 From: Stephen Toub Date: Thu, 2 May 2019 13:17:54 -0400 Subject: [PATCH 173/607] Fix test failure in XmlWriterTraceListenerTests.ListenerWithFilter (#37368) This test randomly and somewhat amusingly failed in CI. The test validates that a particular value passed into one of the writer's methods doesn't show up in the output, but the writer also outputs the current process ID, and the process ID happened to match that value. The fix is to just ensure it doesn't. --- .../tests/XmlWriterTraceListenerTests.cs | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/System.Diagnostics.TextWriterTraceListener/tests/XmlWriterTraceListenerTests.cs b/src/System.Diagnostics.TextWriterTraceListener/tests/XmlWriterTraceListenerTests.cs index bd08332106e0..e00f0830ba51 100644 --- a/src/System.Diagnostics.TextWriterTraceListener/tests/XmlWriterTraceListenerTests.cs +++ b/src/System.Diagnostics.TextWriterTraceListener/tests/XmlWriterTraceListenerTests.cs @@ -103,6 +103,15 @@ public void Close_AfterXPathNavigatorTraced() [Fact] public void ListenerWithFilter() { + int processId; + using (Process p = Process.GetCurrentProcess()) + { + processId = p.Id; + } + + // Ensure we use an arbitrary ID that doesn't match the process ID. + int traceTransferId = processId + 1; + string file = GetTestFilePath(); Guid guid = Guid.NewGuid(); using (var listener = new XmlWriterTraceListener(file)) @@ -119,7 +128,7 @@ public void ListenerWithFilter() listener.TraceData(null, "Trace", TraceEventType.Error, 1, "ghost", "not", "here"); listener.TraceData(null, "Trace", TraceEventType.Critical, 1, "existent", ".net", "code"); - listener.TraceTransfer(null, "Transfer", 2304, "this is a transfer", guid); + listener.TraceTransfer(null, "Transfer", traceTransferId, "this is a transfer", guid); } string text = File.ReadAllText(file); @@ -139,7 +148,7 @@ public void ListenerWithFilter() { // Desktop has a boolean to turn on filtering in TraceTransfer due to a bug. // https://referencesource.microsoft.com/#System/compmod/system/diagnostics/XmlWriterTraceListener.cs,26 - Assert.DoesNotContain("2304", text); + Assert.DoesNotContain('"' + traceTransferId.ToString(CultureInfo.InvariantCulture) + '"', text); Assert.DoesNotContain("this is a transfer", text); Assert.DoesNotContain("Transfer", text); Assert.DoesNotContain(guid.ToString("B"), text); From bf0fb29fb55cf4c3d9063c78e8f72fb9cd4d041b Mon Sep 17 00:00:00 2001 From: Stephen Toub Date: Thu, 2 May 2019 13:29:40 -0400 Subject: [PATCH 174/607] Tweak preferLocal value in System.Net.Sockets (#37369) These ThreadPool.UnsafeQueueUserWorkItem calls come from a non-thread pool thread, and as such currently the preferLocal argument has no effect and was defaulted to false when this was written. But logically it makes sense for it to be true, and it could start to have an effect if we make a change to the thread pool that allows threads to share their local queues. --- .../src/System/Net/Sockets/SocketAsyncContext.Unix.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/System.Net.Sockets/src/System/Net/Sockets/SocketAsyncContext.Unix.cs b/src/System.Net.Sockets/src/System/Net/Sockets/SocketAsyncContext.Unix.cs index 3ed34d29bea6..d29e0e614cb2 100644 --- a/src/System.Net.Sockets/src/System/Net/Sockets/SocketAsyncContext.Unix.cs +++ b/src/System.Net.Sockets/src/System/Net/Sockets/SocketAsyncContext.Unix.cs @@ -255,7 +255,7 @@ public bool TryCancel() // we can't pool the object, as ProcessQueue may still have a reference to it, due to // using a pattern whereby it takes the lock to grab an item, but then releases the lock // to do further processing on the item that's still in the list. - ThreadPool.UnsafeQueueUserWorkItem(o => ((AsyncOperation)o).InvokeCallback(allowPooling: false), this); + ThreadPool.UnsafeQueueUserWorkItem(s => s.InvokeCallback(allowPooling: false), this, preferLocal: true); } Trace("Exit"); @@ -276,7 +276,7 @@ public void Dispatch() else { // Async operation. Process the IO on the threadpool. - ThreadPool.UnsafeQueueUserWorkItem(this, preferLocal: false); + ThreadPool.UnsafeQueueUserWorkItem(this, preferLocal: true); } } From 5374d01ef2337a85adc13a2b2cf0a354c6199c86 Mon Sep 17 00:00:00 2001 From: Maryam Ariyan Date: Thu, 2 May 2019 10:42:33 -0700 Subject: [PATCH 175/607] Ports System.Data.OleDb (#37101) --- .../packageIndex.json | 6 + .../Microsoft.Windows.Compatibility.pkgproj | 1 + pkg/descriptions.json | 14 + .../DbConnectionPoolProviderInfo.cs | 2 +- src/System.Data.OleDb/Directory.Build.props | 6 + src/System.Data.OleDb/System.Data.Oledb.sln | 53 + .../pkg/System.Data.OleDb.pkgproj | 10 + .../ref/Configurations.props | 12 + .../ref/System.Data.OleDb.Manual.cs | 24 + .../ref/System.Data.OleDb.cs | 503 ++++ .../ref/System.Data.OleDb.csproj | 23 + src/System.Data.OleDb/src/AdapterSwitches.cs | 29 + src/System.Data.OleDb/src/ColumnBinding.cs | 1699 +++++++++++ .../src/Configurations.props | 13 + src/System.Data.OleDb/src/DbBindings.cs | 414 +++ .../src/DbConnectionOptions.cs | 997 +++++++ .../src/DbConnectionStringCommon.cs | 232 ++ .../src/DbParameterHelper.cs | 274 ++ src/System.Data.OleDb/src/DbPropSet.cs | 280 ++ src/System.Data.OleDb/src/NativeMethods.cs | 114 + src/System.Data.OleDb/src/OleDbCommand.cs | 1370 +++++++++ .../src/OleDbCommandBuilder.cs | 455 +++ src/System.Data.OleDb/src/OleDbConnection.cs | 661 +++++ .../src/OleDbConnectionFactory.cs | 175 ++ .../src/OleDbConnectionInternal.cs | 845 ++++++ .../OleDbConnectionPoolGroupProviderInfo.cs | 38 + .../src/OleDbConnectionString.cs | 466 +++ src/System.Data.OleDb/src/OleDbDataAdapter.cs | 477 +++ src/System.Data.OleDb/src/OleDbDataReader.cs | 2632 +++++++++++++++++ src/System.Data.OleDb/src/OleDbEnumerator.cs | 81 + src/System.Data.OleDb/src/OleDbError.cs | 114 + .../src/OleDbErrorCollection.cs | 80 + src/System.Data.OleDb/src/OleDbException.cs | 155 + src/System.Data.OleDb/src/OleDbFactory.cs | 49 + src/System.Data.OleDb/src/OleDbHResult.cs | 968 ++++++ .../src/OleDbInfoMessageEvent.cs | 56 + .../src/OleDbInfoMessageEventHandler.cs | 8 + src/System.Data.OleDb/src/OleDbLiteral.cs | 45 + .../src/OleDbMetaDataFactory.cs | 686 +++++ .../src/OleDbMetadataCollectionNames.cs | 19 + .../src/OleDbMetadataColumnNames.cs | 15 + src/System.Data.OleDb/src/OleDbParameter.cs | 740 +++++ .../src/OleDbParameterCollection.cs | 135 + .../src/OleDbParameterCollectionHelper.cs | 320 ++ .../src/OleDbPropertySetGuid.cs | 81 + .../src/OleDbPropertyStatus.cs | 20 + .../src/OleDbReferenceCollection.cs | 46 + .../src/OleDbRowUpdatedEvent.cs | 24 + .../src/OleDbRowUpdatedEventHandler.cs | 8 + .../src/OleDbRowUpdatingEvent.cs | 28 + .../src/OleDbRowUpdatingEventHandler.cs | 8 + src/System.Data.OleDb/src/OleDbSchemaGuid.cs | 176 ++ src/System.Data.OleDb/src/OleDbStruct.cs | 467 +++ src/System.Data.OleDb/src/OleDbTransaction.cs | 375 +++ src/System.Data.OleDb/src/OleDbType.cs | 48 + src/System.Data.OleDb/src/OleDbWrapper.cs | 527 ++++ src/System.Data.OleDb/src/OleDb_Enum.cs | 540 ++++ src/System.Data.OleDb/src/OleDb_Util.cs | 796 +++++ .../src/OledbConnectionStringbuilder.cs | 745 +++++ src/System.Data.OleDb/src/PropertyIDSet.cs | 57 + src/System.Data.OleDb/src/PropertyInfoSet.cs | 201 ++ .../src/Resources/Strings.resx | 579 ++++ .../System.Data.OleDb.OleDbMetaData.xml | 1028 +++++++ src/System.Data.OleDb/src/RowBinding.cs | 644 ++++ src/System.Data.OleDb/src/SafeHandles.cs | 827 ++++++ .../src/SafeNativeMethods.cs | 94 + .../src/System.Data.OleDb.csproj | 114 + .../src/System/Data/Common/AdapterUtil.cs | 1329 +++++++++ .../Data/Common/DataCommonEventSource.cs | 126 + .../System/Data/Common/DbConnectionPoolKey.cs | 61 + .../src/System/Data/Common/FieldNameLookup.cs | 157 + .../src/System/Data/Common/NameValuePair.cs | 49 + .../src/System/Data/Common/SR.cs | 19 + .../src/System/Data/ProviderBase/DbBuffer.cs | 757 +++++ .../Data/ProviderBase/DbConnectionClosed.cs | 162 + .../Data/ProviderBase/DbConnectionFactory.cs | 585 ++++ .../Data/ProviderBase/DbConnectionHelper.cs | 334 +++ .../DbConnectionInternal.Shared.cs | 663 +++++ .../Data/ProviderBase/DbConnectionInternal.cs | 154 + .../Data/ProviderBase/DbConnectionPool.cs | 1724 +++++++++++ .../ProviderBase/DbConnectionPoolCounters.cs | 342 +++ .../ProviderBase/DbConnectionPoolGroup.cs | 328 ++ .../DbConnectionPoolGroupProviderInfo.cs | 23 + .../ProviderBase/DbConnectionPoolIdentity.cs | 100 + .../ProviderBase/DbConnectionPoolOptions.cs | 68 + .../Data/ProviderBase/DbMetaDataFactory.cs | 581 ++++ .../ProviderBase/DbReferenceCollection.cs | 282 ++ .../Data/ProviderBase/WrappedIUnknown.cs | 80 + .../src/UnsafeNativeMethods.cs | 836 ++++++ .../tests/Configurations.props | 8 + src/System.Data.OleDb/tests/Helpers.cs | 42 + .../tests/OleDbCommandBuilderTests.cs | 161 + .../tests/OleDbCommandTests.cs | 72 + .../tests/OleDbConnectionTests.cs | 305 ++ .../tests/OleDbDataAdapterTests.cs | 184 ++ .../tests/OleDbDataReaderTests.cs | 302 ++ .../tests/OleDbParameterTests.cs | 287 ++ src/System.Data.OleDb/tests/OleDbTestBase.cs | 46 + .../tests/System.Data.OleDb.Tests.csproj | 16 + ...patBaseline.netcoreapp.netfx461.ignore.txt | 1 - .../ApiCompatBaseline.netcoreapp.netfx461.txt | 25 - 101 files changed, 32911 insertions(+), 27 deletions(-) create mode 100644 src/System.Data.OleDb/Directory.Build.props create mode 100644 src/System.Data.OleDb/System.Data.Oledb.sln create mode 100644 src/System.Data.OleDb/pkg/System.Data.OleDb.pkgproj create mode 100644 src/System.Data.OleDb/ref/Configurations.props create mode 100644 src/System.Data.OleDb/ref/System.Data.OleDb.Manual.cs create mode 100644 src/System.Data.OleDb/ref/System.Data.OleDb.cs create mode 100644 src/System.Data.OleDb/ref/System.Data.OleDb.csproj create mode 100644 src/System.Data.OleDb/src/AdapterSwitches.cs create mode 100644 src/System.Data.OleDb/src/ColumnBinding.cs create mode 100644 src/System.Data.OleDb/src/Configurations.props create mode 100644 src/System.Data.OleDb/src/DbBindings.cs create mode 100644 src/System.Data.OleDb/src/DbConnectionOptions.cs create mode 100644 src/System.Data.OleDb/src/DbConnectionStringCommon.cs create mode 100644 src/System.Data.OleDb/src/DbParameterHelper.cs create mode 100644 src/System.Data.OleDb/src/DbPropSet.cs create mode 100644 src/System.Data.OleDb/src/NativeMethods.cs create mode 100644 src/System.Data.OleDb/src/OleDbCommand.cs create mode 100644 src/System.Data.OleDb/src/OleDbCommandBuilder.cs create mode 100644 src/System.Data.OleDb/src/OleDbConnection.cs create mode 100644 src/System.Data.OleDb/src/OleDbConnectionFactory.cs create mode 100644 src/System.Data.OleDb/src/OleDbConnectionInternal.cs create mode 100644 src/System.Data.OleDb/src/OleDbConnectionPoolGroupProviderInfo.cs create mode 100644 src/System.Data.OleDb/src/OleDbConnectionString.cs create mode 100644 src/System.Data.OleDb/src/OleDbDataAdapter.cs create mode 100644 src/System.Data.OleDb/src/OleDbDataReader.cs create mode 100644 src/System.Data.OleDb/src/OleDbEnumerator.cs create mode 100644 src/System.Data.OleDb/src/OleDbError.cs create mode 100644 src/System.Data.OleDb/src/OleDbErrorCollection.cs create mode 100644 src/System.Data.OleDb/src/OleDbException.cs create mode 100644 src/System.Data.OleDb/src/OleDbFactory.cs create mode 100644 src/System.Data.OleDb/src/OleDbHResult.cs create mode 100644 src/System.Data.OleDb/src/OleDbInfoMessageEvent.cs create mode 100644 src/System.Data.OleDb/src/OleDbInfoMessageEventHandler.cs create mode 100644 src/System.Data.OleDb/src/OleDbLiteral.cs create mode 100644 src/System.Data.OleDb/src/OleDbMetaDataFactory.cs create mode 100644 src/System.Data.OleDb/src/OleDbMetadataCollectionNames.cs create mode 100644 src/System.Data.OleDb/src/OleDbMetadataColumnNames.cs create mode 100644 src/System.Data.OleDb/src/OleDbParameter.cs create mode 100644 src/System.Data.OleDb/src/OleDbParameterCollection.cs create mode 100644 src/System.Data.OleDb/src/OleDbParameterCollectionHelper.cs create mode 100644 src/System.Data.OleDb/src/OleDbPropertySetGuid.cs create mode 100644 src/System.Data.OleDb/src/OleDbPropertyStatus.cs create mode 100644 src/System.Data.OleDb/src/OleDbReferenceCollection.cs create mode 100644 src/System.Data.OleDb/src/OleDbRowUpdatedEvent.cs create mode 100644 src/System.Data.OleDb/src/OleDbRowUpdatedEventHandler.cs create mode 100644 src/System.Data.OleDb/src/OleDbRowUpdatingEvent.cs create mode 100644 src/System.Data.OleDb/src/OleDbRowUpdatingEventHandler.cs create mode 100644 src/System.Data.OleDb/src/OleDbSchemaGuid.cs create mode 100644 src/System.Data.OleDb/src/OleDbStruct.cs create mode 100644 src/System.Data.OleDb/src/OleDbTransaction.cs create mode 100644 src/System.Data.OleDb/src/OleDbType.cs create mode 100644 src/System.Data.OleDb/src/OleDbWrapper.cs create mode 100644 src/System.Data.OleDb/src/OleDb_Enum.cs create mode 100644 src/System.Data.OleDb/src/OleDb_Util.cs create mode 100644 src/System.Data.OleDb/src/OledbConnectionStringbuilder.cs create mode 100644 src/System.Data.OleDb/src/PropertyIDSet.cs create mode 100644 src/System.Data.OleDb/src/PropertyInfoSet.cs create mode 100644 src/System.Data.OleDb/src/Resources/Strings.resx create mode 100644 src/System.Data.OleDb/src/Resources/System.Data.OleDb.OleDbMetaData.xml create mode 100644 src/System.Data.OleDb/src/RowBinding.cs create mode 100644 src/System.Data.OleDb/src/SafeHandles.cs create mode 100644 src/System.Data.OleDb/src/SafeNativeMethods.cs create mode 100644 src/System.Data.OleDb/src/System.Data.OleDb.csproj create mode 100644 src/System.Data.OleDb/src/System/Data/Common/AdapterUtil.cs create mode 100644 src/System.Data.OleDb/src/System/Data/Common/DataCommonEventSource.cs create mode 100644 src/System.Data.OleDb/src/System/Data/Common/DbConnectionPoolKey.cs create mode 100644 src/System.Data.OleDb/src/System/Data/Common/FieldNameLookup.cs create mode 100644 src/System.Data.OleDb/src/System/Data/Common/NameValuePair.cs create mode 100644 src/System.Data.OleDb/src/System/Data/Common/SR.cs create mode 100644 src/System.Data.OleDb/src/System/Data/ProviderBase/DbBuffer.cs create mode 100644 src/System.Data.OleDb/src/System/Data/ProviderBase/DbConnectionClosed.cs create mode 100644 src/System.Data.OleDb/src/System/Data/ProviderBase/DbConnectionFactory.cs create mode 100644 src/System.Data.OleDb/src/System/Data/ProviderBase/DbConnectionHelper.cs create mode 100644 src/System.Data.OleDb/src/System/Data/ProviderBase/DbConnectionInternal.Shared.cs create mode 100644 src/System.Data.OleDb/src/System/Data/ProviderBase/DbConnectionInternal.cs create mode 100644 src/System.Data.OleDb/src/System/Data/ProviderBase/DbConnectionPool.cs create mode 100644 src/System.Data.OleDb/src/System/Data/ProviderBase/DbConnectionPoolCounters.cs create mode 100644 src/System.Data.OleDb/src/System/Data/ProviderBase/DbConnectionPoolGroup.cs create mode 100644 src/System.Data.OleDb/src/System/Data/ProviderBase/DbConnectionPoolGroupProviderInfo.cs create mode 100644 src/System.Data.OleDb/src/System/Data/ProviderBase/DbConnectionPoolIdentity.cs create mode 100644 src/System.Data.OleDb/src/System/Data/ProviderBase/DbConnectionPoolOptions.cs create mode 100644 src/System.Data.OleDb/src/System/Data/ProviderBase/DbMetaDataFactory.cs create mode 100644 src/System.Data.OleDb/src/System/Data/ProviderBase/DbReferenceCollection.cs create mode 100644 src/System.Data.OleDb/src/System/Data/ProviderBase/WrappedIUnknown.cs create mode 100644 src/System.Data.OleDb/src/UnsafeNativeMethods.cs create mode 100644 src/System.Data.OleDb/tests/Configurations.props create mode 100644 src/System.Data.OleDb/tests/Helpers.cs create mode 100644 src/System.Data.OleDb/tests/OleDbCommandBuilderTests.cs create mode 100644 src/System.Data.OleDb/tests/OleDbCommandTests.cs create mode 100644 src/System.Data.OleDb/tests/OleDbConnectionTests.cs create mode 100644 src/System.Data.OleDb/tests/OleDbDataAdapterTests.cs create mode 100644 src/System.Data.OleDb/tests/OleDbDataReaderTests.cs create mode 100644 src/System.Data.OleDb/tests/OleDbParameterTests.cs create mode 100644 src/System.Data.OleDb/tests/OleDbTestBase.cs create mode 100644 src/System.Data.OleDb/tests/System.Data.OleDb.Tests.csproj diff --git a/pkg/Microsoft.Private.PackageBaseline/packageIndex.json b/pkg/Microsoft.Private.PackageBaseline/packageIndex.json index fb47f507dfb8..105fead9722d 100644 --- a/pkg/Microsoft.Private.PackageBaseline/packageIndex.json +++ b/pkg/Microsoft.Private.PackageBaseline/packageIndex.json @@ -1274,6 +1274,12 @@ "4.0.1.0": "4.6.0" } }, + "System.Data.OleDb": { + "InboxOn": {}, + "AssemblyVersionInPackageVersion": { + "4.0.0.0": "4.6.0" + } + }, "System.Data.OracleClient": { "InboxOn": { "net45": "4.0.0.0" diff --git a/pkg/Microsoft.Windows.Compatibility/Microsoft.Windows.Compatibility.pkgproj b/pkg/Microsoft.Windows.Compatibility/Microsoft.Windows.Compatibility.pkgproj index 52fb8f3764fd..1c9ce5a57bff 100644 --- a/pkg/Microsoft.Windows.Compatibility/Microsoft.Windows.Compatibility.pkgproj +++ b/pkg/Microsoft.Windows.Compatibility/Microsoft.Windows.Compatibility.pkgproj @@ -24,6 +24,7 @@ + 4.7.0 diff --git a/pkg/descriptions.json b/pkg/descriptions.json index 440c24ef46ed..24608d0974c4 100644 --- a/pkg/descriptions.json +++ b/pkg/descriptions.json @@ -540,6 +540,20 @@ "System.Data.Odbc.OdbcTransaction" ] }, + { + "Name": "System.Data.OleDb", + "Description": "Provides a collection of classes for OLEDB.", + "CommonTypes": [ + "System.Data.OleDb.OleDbCommand", + "System.Data.OleDb.OleDbCommandBuilder", + "System.Data.OleDb.OleDbConnection", + "System.Data.OleDb.OleDbDataAdapter", + "System.Data.OleDb.OleDbDataReader", + "System.Data.OleDb.OleDbParameter", + "System.Data.OleDb.OleDbParameterCollection", + "System.Data.OleDb.OleDbTransaction" + ] + }, { "Name": "System.Data.SqlClient", "Description": "Provides the data provider for SQL Server. These classes provide access to versions of SQL Server and encapsulate database-specific protocols, including tabular data stream (TDS)", diff --git a/src/System.Data.Odbc/src/Common/System/Data/ProviderBase/DbConnectionPoolProviderInfo.cs b/src/System.Data.Odbc/src/Common/System/Data/ProviderBase/DbConnectionPoolProviderInfo.cs index 629a09a1f422..21ecb177db11 100644 --- a/src/System.Data.Odbc/src/Common/System/Data/ProviderBase/DbConnectionPoolProviderInfo.cs +++ b/src/System.Data.Odbc/src/Common/System/Data/ProviderBase/DbConnectionPoolProviderInfo.cs @@ -7,4 +7,4 @@ namespace System.Data.ProviderBase internal class DbConnectionPoolProviderInfo { } -} +} \ No newline at end of file diff --git a/src/System.Data.OleDb/Directory.Build.props b/src/System.Data.OleDb/Directory.Build.props new file mode 100644 index 000000000000..b82e19afe7eb --- /dev/null +++ b/src/System.Data.OleDb/Directory.Build.props @@ -0,0 +1,6 @@ + + + + 4.0.0.0 + + \ No newline at end of file diff --git a/src/System.Data.OleDb/System.Data.Oledb.sln b/src/System.Data.OleDb/System.Data.Oledb.sln new file mode 100644 index 000000000000..c1726e5de9a2 --- /dev/null +++ b/src/System.Data.OleDb/System.Data.Oledb.sln @@ -0,0 +1,53 @@ +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.27213.1 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Data.OleDb.Tests", "tests\System.Data.OleDb.Tests.csproj", "{73C7A14F-C3C5-44EA-AB02-05BFBA55722C}" + ProjectSection(ProjectDependencies) = postProject + {D909B69D-8F3B-4551-A355-8FFF6A308CF6} = {D909B69D-8F3B-4551-A355-8FFF6A308CF6} + EndProjectSection +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Data.OleDb", "src\System.Data.OleDb.csproj", "{D909B69D-8F3B-4551-A355-8FFF6A308CF6}" + ProjectSection(ProjectDependencies) = postProject + {EF4F0844-7AAD-4B0C-A29C-37E1F92D2D78} = {EF4F0844-7AAD-4B0C-A29C-37E1F92D2D78} + EndProjectSection +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Data.OleDb", "ref\System.Data.OleDb.csproj", "{EF4F0844-7AAD-4B0C-A29C-37E1F92D2D78}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{1A2F9F4A-A032-433E-B914-ADD5992BB178}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{E107E9C1-E893-4E87-987E-04EF0DCEAEFD}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{2E666815-2EDB-464B-9DF6-380BF4789AD4}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {73C7A14F-C3C5-44EA-AB02-05BFBA55722C}.Debug|Any CPU.ActiveCfg = netcoreapp-Windows_NT-Debug|Any CPU + {73C7A14F-C3C5-44EA-AB02-05BFBA55722C}.Debug|Any CPU.Build.0 = netcoreapp-Windows_NT-Debug|Any CPU + {73C7A14F-C3C5-44EA-AB02-05BFBA55722C}.Release|Any CPU.ActiveCfg = netcoreapp-Windows_NT-Release|Any CPU + {73C7A14F-C3C5-44EA-AB02-05BFBA55722C}.Release|Any CPU.Build.0 = netcoreapp-Windows_NT-Release|Any CPU + {D909B69D-8F3B-4551-A355-8FFF6A308CF6}.Debug|Any CPU.ActiveCfg = netcoreapp-Windows_NT-Debug|Any CPU + {D909B69D-8F3B-4551-A355-8FFF6A308CF6}.Debug|Any CPU.Build.0 = netcoreapp-Windows_NT-Debug|Any CPU + {D909B69D-8F3B-4551-A355-8FFF6A308CF6}.Release|Any CPU.ActiveCfg = netcoreapp-Windows_NT-Release|Any CPU + {D909B69D-8F3B-4551-A355-8FFF6A308CF6}.Release|Any CPU.Build.0 = netcoreapp-Windows_NT-Release|Any CPU + {EF4F0844-7AAD-4B0C-A29C-37E1F92D2D78}.Debug|Any CPU.ActiveCfg = netstandard-Debug|Any CPU + {EF4F0844-7AAD-4B0C-A29C-37E1F92D2D78}.Debug|Any CPU.Build.0 = netstandard-Debug|Any CPU + {EF4F0844-7AAD-4B0C-A29C-37E1F92D2D78}.Release|Any CPU.ActiveCfg = netstandard-Release|Any CPU + {EF4F0844-7AAD-4B0C-A29C-37E1F92D2D78}.Release|Any CPU.Build.0 = netstandard-Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {73C7A14F-C3C5-44EA-AB02-05BFBA55722C} = {1A2F9F4A-A032-433E-B914-ADD5992BB178} + {D909B69D-8F3B-4551-A355-8FFF6A308CF6} = {E107E9C1-E893-4E87-987E-04EF0DCEAEFD} + {EF4F0844-7AAD-4B0C-A29C-37E1F92D2D78} = {2E666815-2EDB-464B-9DF6-380BF4789AD4} + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {04C9232C-0656-4BA5-9836-7DAE3DD4057C} + EndGlobalSection +EndGlobal diff --git a/src/System.Data.OleDb/pkg/System.Data.OleDb.pkgproj b/src/System.Data.OleDb/pkg/System.Data.OleDb.pkgproj new file mode 100644 index 000000000000..50913971f866 --- /dev/null +++ b/src/System.Data.OleDb/pkg/System.Data.OleDb.pkgproj @@ -0,0 +1,10 @@ + + + + + net461;netcoreapp2.0;uap10.0.16299;$(AllXamarinFrameworks) + + + + + \ No newline at end of file diff --git a/src/System.Data.OleDb/ref/Configurations.props b/src/System.Data.OleDb/ref/Configurations.props new file mode 100644 index 000000000000..e4525e78a4a5 --- /dev/null +++ b/src/System.Data.OleDb/ref/Configurations.props @@ -0,0 +1,12 @@ + + + + netstandard; + net461; + + + $(PackageConfigurations); + netfx + + + \ No newline at end of file diff --git a/src/System.Data.OleDb/ref/System.Data.OleDb.Manual.cs b/src/System.Data.OleDb/ref/System.Data.OleDb.Manual.cs new file mode 100644 index 000000000000..d88db211f9b0 --- /dev/null +++ b/src/System.Data.OleDb/ref/System.Data.OleDb.Manual.cs @@ -0,0 +1,24 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. +// ------------------------------------------------------------------------------ +// Changes to this file must follow the http://aka.ms/api-review process. +// ------------------------------------------------------------------------------ + +namespace System.Data.OleDb +{ + [System.ComponentModel.TypeConverterAttribute(typeof(OleDbParameter.OleDbParameterConverter))] + public sealed partial class OleDbParameter : System.Data.Common.DbParameter, System.Data.IDataParameter, System.Data.IDbDataParameter, System.ICloneable + { + internal class OleDbParameterConverter : System.ComponentModel.ExpandableObjectConverter + { + } + } + [System.ComponentModel.TypeConverterAttribute(typeof(OleDbConnectionStringBuilder.OleDbConnectionStringBuilderConverter))] + public sealed partial class OleDbConnectionStringBuilder : System.Data.Common.DbConnectionStringBuilder + { + internal class OleDbConnectionStringBuilderConverter : System.ComponentModel.ExpandableObjectConverter + { + } + } +} diff --git a/src/System.Data.OleDb/ref/System.Data.OleDb.cs b/src/System.Data.OleDb/ref/System.Data.OleDb.cs new file mode 100644 index 000000000000..60b3e7516d7e --- /dev/null +++ b/src/System.Data.OleDb/ref/System.Data.OleDb.cs @@ -0,0 +1,503 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +namespace System.Data.OleDb +{ + public sealed partial class OleDbCommand : System.Data.Common.DbCommand, System.Data.IDbCommand, System.ICloneable, System.IDisposable + { + public OleDbCommand() { } + public OleDbCommand(string cmdText) { } + public OleDbCommand(string cmdText, System.Data.OleDb.OleDbConnection connection) { } + public OleDbCommand(string cmdText, System.Data.OleDb.OleDbConnection connection, System.Data.OleDb.OleDbTransaction transaction) { } + [System.ComponentModel.DefaultValueAttribute("")] + [System.ComponentModel.RefreshPropertiesAttribute(System.ComponentModel.RefreshProperties.All)] + public override string CommandText { get { throw null; } set { } } + public override int CommandTimeout { get { throw null; } set { } } + [System.ComponentModel.DefaultValueAttribute(System.Data.CommandType.Text)] + [System.ComponentModel.RefreshPropertiesAttribute(System.ComponentModel.RefreshProperties.All)] + public override System.Data.CommandType CommandType { get { throw null; } set { } } + [System.ComponentModel.DefaultValueAttribute(null)] + public new System.Data.OleDb.OleDbConnection Connection { get { throw null; } set { } } + protected override System.Data.Common.DbConnection DbConnection { get { throw null; } set { } } + protected override System.Data.Common.DbParameterCollection DbParameterCollection { get { throw null; } } + protected override System.Data.Common.DbTransaction DbTransaction { get { throw null; } set { } } + [System.ComponentModel.BrowsableAttribute(false)] + [System.ComponentModel.DefaultValueAttribute(true)] + [System.ComponentModel.DesignOnlyAttribute(true)] + public override bool DesignTimeVisible { get { throw null; } set { } } + [System.ComponentModel.DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Content)] + public new System.Data.OleDb.OleDbParameterCollection Parameters { get { throw null; } } + [System.ComponentModel.BrowsableAttribute(false)] + [System.ComponentModel.DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)] + public new System.Data.OleDb.OleDbTransaction Transaction { get { throw null; } set { } } + [System.ComponentModel.DefaultValueAttribute(System.Data.UpdateRowSource.Both)] + public override System.Data.UpdateRowSource UpdatedRowSource { get { throw null; } set { } } + public override void Cancel() { } + public System.Data.OleDb.OleDbCommand Clone() { throw null; } + protected override System.Data.Common.DbParameter CreateDbParameter() { throw null; } + public new System.Data.OleDb.OleDbParameter CreateParameter() { throw null; } + protected override void Dispose(bool disposing) { } + protected override System.Data.Common.DbDataReader ExecuteDbDataReader(System.Data.CommandBehavior behavior) { throw null; } + public override int ExecuteNonQuery() { throw null; } + public new System.Data.OleDb.OleDbDataReader ExecuteReader() { throw null; } + public new System.Data.OleDb.OleDbDataReader ExecuteReader(System.Data.CommandBehavior behavior) { throw null; } + public override object ExecuteScalar() { throw null; } + public override void Prepare() { } + public void ResetCommandTimeout() { } + System.Data.IDataReader System.Data.IDbCommand.ExecuteReader() { throw null; } + System.Data.IDataReader System.Data.IDbCommand.ExecuteReader(System.Data.CommandBehavior behavior) { throw null; } + object System.ICloneable.Clone() { throw null; } + } + public sealed partial class OleDbCommandBuilder : System.Data.Common.DbCommandBuilder + { + public OleDbCommandBuilder() { } + public OleDbCommandBuilder(System.Data.OleDb.OleDbDataAdapter adapter) { } + [System.ComponentModel.DefaultValueAttribute(null)] + public new System.Data.OleDb.OleDbDataAdapter DataAdapter { get { throw null; } set { } } + protected override void ApplyParameterInfo(System.Data.Common.DbParameter parameter, System.Data.DataRow datarow, System.Data.StatementType statementType, bool whereClause) { } + public static void DeriveParameters(System.Data.OleDb.OleDbCommand command) { } + public new System.Data.OleDb.OleDbCommand GetDeleteCommand() { throw null; } + public new System.Data.OleDb.OleDbCommand GetDeleteCommand(bool useColumnsForParameterNames) { throw null; } + public new System.Data.OleDb.OleDbCommand GetInsertCommand() { throw null; } + public new System.Data.OleDb.OleDbCommand GetInsertCommand(bool useColumnsForParameterNames) { throw null; } + protected override string GetParameterName(int parameterOrdinal) { throw null; } + protected override string GetParameterName(string parameterName) { throw null; } + protected override string GetParameterPlaceholder(int parameterOrdinal) { throw null; } + public new System.Data.OleDb.OleDbCommand GetUpdateCommand() { throw null; } + public new System.Data.OleDb.OleDbCommand GetUpdateCommand(bool useColumnsForParameterNames) { throw null; } + public override string QuoteIdentifier(string unquotedIdentifier) { throw null; } + public string QuoteIdentifier(string unquotedIdentifier, System.Data.OleDb.OleDbConnection connection) { throw null; } + protected override void SetRowUpdatingHandler(System.Data.Common.DbDataAdapter adapter) { } + public override string UnquoteIdentifier(string quotedIdentifier) { throw null; } + public string UnquoteIdentifier(string quotedIdentifier, System.Data.OleDb.OleDbConnection connection) { throw null; } + } + [System.ComponentModel.DefaultEventAttribute("InfoMessage")] + public sealed partial class OleDbConnection : System.Data.Common.DbConnection, System.Data.IDbConnection, System.ICloneable, System.IDisposable + { + public OleDbConnection() { } + public OleDbConnection(string connectionString) { } + [System.ComponentModel.DefaultValueAttribute("")] + [System.ComponentModel.RefreshPropertiesAttribute(System.ComponentModel.RefreshProperties.All)] + [System.ComponentModel.SettingsBindableAttribute(true)] + public override string ConnectionString { get { throw null; } set { } } + [System.ComponentModel.DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)] + public override int ConnectionTimeout { get { throw null; } } + [System.ComponentModel.DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)] + public override string Database { get { throw null; } } + [System.ComponentModel.BrowsableAttribute(true)] + public override string DataSource { get { throw null; } } + [System.ComponentModel.BrowsableAttribute(true)] + [System.ComponentModel.DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)] + public string Provider { get { throw null; } } + public override string ServerVersion { get { throw null; } } + [System.ComponentModel.BrowsableAttribute(false)] + [System.ComponentModel.DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)] + public override System.Data.ConnectionState State { get { throw null; } } + public event System.Data.OleDb.OleDbInfoMessageEventHandler InfoMessage { add { } remove { } } + protected override System.Data.Common.DbTransaction BeginDbTransaction(System.Data.IsolationLevel isolationLevel) { throw null; } + public new System.Data.OleDb.OleDbTransaction BeginTransaction() { throw null; } + public new System.Data.OleDb.OleDbTransaction BeginTransaction(System.Data.IsolationLevel isolationLevel) { throw null; } + public override void ChangeDatabase(string value) { } + public override void Close() { } + public new System.Data.OleDb.OleDbCommand CreateCommand() { throw null; } + protected override System.Data.Common.DbCommand CreateDbCommand() { throw null; } + protected override void Dispose(bool disposing) { } + public override void EnlistTransaction(System.Transactions.Transaction transaction) { } + public System.Data.DataTable GetOleDbSchemaTable(System.Guid schema, object[] restrictions) { throw null; } + public override System.Data.DataTable GetSchema() { throw null; } + public override System.Data.DataTable GetSchema(string collectionName) { throw null; } + public override System.Data.DataTable GetSchema(string collectionName, string[] restrictionValues) { throw null; } + public override void Open() { } + public static void ReleaseObjectPool() { } + public void ResetState() { } + object System.ICloneable.Clone() { throw null; } + } + [System.ComponentModel.DefaultPropertyAttribute("Provider")] + [System.ComponentModel.RefreshPropertiesAttribute(System.ComponentModel.RefreshProperties.All)] + public sealed partial class OleDbConnectionStringBuilder : System.Data.Common.DbConnectionStringBuilder + { + public OleDbConnectionStringBuilder() { } + public OleDbConnectionStringBuilder(string connectionString) { } + [System.ComponentModel.DisplayNameAttribute("Data Source")] + [System.ComponentModel.RefreshPropertiesAttribute(System.ComponentModel.RefreshProperties.All)] + public string DataSource { get { throw null; } set { } } + [System.ComponentModel.DisplayNameAttribute("File Name")] + [System.ComponentModel.RefreshPropertiesAttribute(System.ComponentModel.RefreshProperties.All)] + public string FileName { get { throw null; } set { } } + public override object this[string keyword] { get { throw null; } set { } } + public override System.Collections.ICollection Keys { get { throw null; } } + [System.ComponentModel.DisplayNameAttribute("OLE DB Services")] + [System.ComponentModel.RefreshPropertiesAttribute(System.ComponentModel.RefreshProperties.All)] + public int OleDbServices { get { throw null; } set { } } + [System.ComponentModel.DisplayNameAttribute("Persist Security Info")] + [System.ComponentModel.RefreshPropertiesAttribute(System.ComponentModel.RefreshProperties.All)] + public bool PersistSecurityInfo { get { throw null; } set { } } + [System.ComponentModel.DisplayNameAttribute("Provider")] + [System.ComponentModel.RefreshPropertiesAttribute(System.ComponentModel.RefreshProperties.All)] + public string Provider { get { throw null; } set { } } + public override void Clear() { } + public override bool ContainsKey(string keyword) { throw null; } + public override bool Remove(string keyword) { throw null; } + public override bool TryGetValue(string keyword, out object value) { throw null; } + } + public sealed partial class OleDbDataAdapter : System.Data.Common.DbDataAdapter, System.Data.IDataAdapter, System.Data.IDbDataAdapter, System.ICloneable + { + public OleDbDataAdapter() { } + public OleDbDataAdapter(System.Data.OleDb.OleDbCommand selectCommand) { } + public OleDbDataAdapter(string selectCommandText, System.Data.OleDb.OleDbConnection selectConnection) { } + public OleDbDataAdapter(string selectCommandText, string selectConnectionString) { } + [System.ComponentModel.DefaultValueAttribute(null)] + public new System.Data.OleDb.OleDbCommand DeleteCommand { get { throw null; } set { } } + [System.ComponentModel.DefaultValueAttribute(null)] + public new System.Data.OleDb.OleDbCommand InsertCommand { get { throw null; } set { } } + [System.ComponentModel.DefaultValueAttribute(null)] + public new System.Data.OleDb.OleDbCommand SelectCommand { get { throw null; } set { } } + System.Data.IDbCommand System.Data.IDbDataAdapter.DeleteCommand { get { throw null; } set { } } + System.Data.IDbCommand System.Data.IDbDataAdapter.InsertCommand { get { throw null; } set { } } + System.Data.IDbCommand System.Data.IDbDataAdapter.SelectCommand { get { throw null; } set { } } + System.Data.IDbCommand System.Data.IDbDataAdapter.UpdateCommand { get { throw null; } set { } } + [System.ComponentModel.DefaultValueAttribute(null)] + public new System.Data.OleDb.OleDbCommand UpdateCommand { get { throw null; } set { } } + public event System.Data.OleDb.OleDbRowUpdatedEventHandler RowUpdated { add { } remove { } } + public event System.Data.OleDb.OleDbRowUpdatingEventHandler RowUpdating { add { } remove { } } + protected override System.Data.Common.RowUpdatedEventArgs CreateRowUpdatedEvent(System.Data.DataRow dataRow, System.Data.IDbCommand command, System.Data.StatementType statementType, System.Data.Common.DataTableMapping tableMapping) { throw null; } + protected override System.Data.Common.RowUpdatingEventArgs CreateRowUpdatingEvent(System.Data.DataRow dataRow, System.Data.IDbCommand command, System.Data.StatementType statementType, System.Data.Common.DataTableMapping tableMapping) { throw null; } + public int Fill(System.Data.DataSet dataSet, object ADODBRecordSet, string srcTable) { throw null; } + public int Fill(System.Data.DataTable dataTable, object ADODBRecordSet) { throw null; } + protected override void OnRowUpdated(System.Data.Common.RowUpdatedEventArgs value) { } + protected override void OnRowUpdating(System.Data.Common.RowUpdatingEventArgs value) { } + object System.ICloneable.Clone() { throw null; } + } + public sealed partial class OleDbDataReader : System.Data.Common.DbDataReader + { + internal OleDbDataReader() { } + public override int Depth { get { throw null; } } + public override int FieldCount { get { throw null; } } + public override bool HasRows { get { throw null; } } + public override bool IsClosed { get { throw null; } } + public override object this[int index] { get { throw null; } } + public override object this[string name] { get { throw null; } } + public override int RecordsAffected { get { throw null; } } + public override int VisibleFieldCount { get { throw null; } } + public override void Close() { } + public override bool GetBoolean(int ordinal) { throw null; } + public override byte GetByte(int ordinal) { throw null; } + public override long GetBytes(int ordinal, long dataIndex, byte[] buffer, int bufferIndex, int length) { throw null; } + public override char GetChar(int ordinal) { throw null; } + public override long GetChars(int ordinal, long dataIndex, char[] buffer, int bufferIndex, int length) { throw null; } + public new System.Data.OleDb.OleDbDataReader GetData(int ordinal) { throw null; } + public override string GetDataTypeName(int index) { throw null; } + public override System.DateTime GetDateTime(int ordinal) { throw null; } + protected override System.Data.Common.DbDataReader GetDbDataReader(int ordinal) { throw null; } + public override decimal GetDecimal(int ordinal) { throw null; } + public override double GetDouble(int ordinal) { throw null; } + public override System.Collections.IEnumerator GetEnumerator() { throw null; } + public override System.Type GetFieldType(int index) { throw null; } + public override float GetFloat(int ordinal) { throw null; } + public override System.Guid GetGuid(int ordinal) { throw null; } + public override short GetInt16(int ordinal) { throw null; } + public override int GetInt32(int ordinal) { throw null; } + public override long GetInt64(int ordinal) { throw null; } + public override string GetName(int index) { throw null; } + public override int GetOrdinal(string name) { throw null; } + public override System.Data.DataTable GetSchemaTable() { throw null; } + public override string GetString(int ordinal) { throw null; } + public System.TimeSpan GetTimeSpan(int ordinal) { throw null; } + public override object GetValue(int ordinal) { throw null; } + public override int GetValues(object[] values) { throw null; } + public override bool IsDBNull(int ordinal) { throw null; } + public override bool NextResult() { throw null; } + public override bool Read() { throw null; } + } + public sealed partial class OleDbEnumerator + { + public OleDbEnumerator() { } + public System.Data.DataTable GetElements() { throw null; } + public static System.Data.OleDb.OleDbDataReader GetEnumerator(System.Type type) { throw null; } + public static System.Data.OleDb.OleDbDataReader GetRootEnumerator() { throw null; } + } + public sealed partial class OleDbError + { + internal OleDbError() { } + public string Message { get { throw null; } } + public int NativeError { get { throw null; } } + public string Source { get { throw null; } } + public string SQLState { get { throw null; } } + public override string ToString() { throw null; } + } + [System.ComponentModel.ListBindableAttribute(false)] + public sealed partial class OleDbErrorCollection : System.Collections.ICollection, System.Collections.IEnumerable + { + internal OleDbErrorCollection() { } + public int Count { get { throw null; } } + public System.Data.OleDb.OleDbError this[int index] { get { throw null; } } + bool System.Collections.ICollection.IsSynchronized { get { throw null; } } + object System.Collections.ICollection.SyncRoot { get { throw null; } } + public void CopyTo(System.Array array, int index) { } + public void CopyTo(System.Data.OleDb.OleDbError[] array, int index) { } + public System.Collections.IEnumerator GetEnumerator() { throw null; } + } + public sealed partial class OleDbException : System.Data.Common.DbException + { + internal OleDbException() { } + public override int ErrorCode { get { throw null; } } + public System.Data.OleDb.OleDbErrorCollection Errors { get { throw null; } } + public override void GetObjectData(System.Runtime.Serialization.SerializationInfo si, System.Runtime.Serialization.StreamingContext context) { } + } + public sealed partial class OleDbFactory : System.Data.Common.DbProviderFactory + { + internal OleDbFactory() { } + public static readonly System.Data.OleDb.OleDbFactory Instance; + public override System.Data.Common.DbCommand CreateCommand() { throw null; } + public override System.Data.Common.DbCommandBuilder CreateCommandBuilder() { throw null; } + public override System.Data.Common.DbConnection CreateConnection() { throw null; } + public override System.Data.Common.DbConnectionStringBuilder CreateConnectionStringBuilder() { throw null; } + public override System.Data.Common.DbDataAdapter CreateDataAdapter() { throw null; } + public override System.Data.Common.DbParameter CreateParameter() { throw null; } + } + public sealed partial class OleDbInfoMessageEventArgs : System.EventArgs + { + internal OleDbInfoMessageEventArgs() { } + public int ErrorCode { get { throw null; } } + [System.ComponentModel.DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Content)] + public System.Data.OleDb.OleDbErrorCollection Errors { get { throw null; } } + public string Message { get { throw null; } } + public string Source { get { throw null; } } + public override string ToString() { throw null; } + } + public delegate void OleDbInfoMessageEventHandler(object sender, System.Data.OleDb.OleDbInfoMessageEventArgs e); + public enum OleDbLiteral + { + Binary_Literal = 1, + Catalog_Name = 2, + Catalog_Separator = 3, + Char_Literal = 4, + Column_Alias = 5, + Column_Name = 6, + Correlation_Name = 7, + Cube_Name = 21, + Cursor_Name = 8, + Dimension_Name = 22, + Escape_Percent_Prefix = 9, + Escape_Percent_Suffix = 29, + Escape_Underscore_Prefix = 10, + Escape_Underscore_Suffix = 30, + Hierarchy_Name = 23, + Index_Name = 11, + Invalid = 0, + Level_Name = 24, + Like_Percent = 12, + Like_Underscore = 13, + Member_Name = 25, + Procedure_Name = 14, + Property_Name = 26, + Quote_Prefix = 15, + Quote_Suffix = 28, + Schema_Name = 16, + Schema_Separator = 27, + Table_Name = 17, + Text_Command = 18, + User_Name = 19, + View_Name = 20, + } + public static partial class OleDbMetaDataCollectionNames + { + public static readonly string Catalogs; + public static readonly string Collations; + public static readonly string Columns; + public static readonly string Indexes; + public static readonly string ProcedureColumns; + public static readonly string ProcedureParameters; + public static readonly string Procedures; + public static readonly string Tables; + public static readonly string Views; + } + public static partial class OleDbMetaDataColumnNames + { + public static readonly string BooleanFalseLiteral; + public static readonly string BooleanTrueLiteral; + public static readonly string DateTimeDigits; + public static readonly string NativeDataType; + } + public sealed partial class OleDbParameter : System.Data.Common.DbParameter, System.Data.IDataParameter, System.Data.IDbDataParameter, System.ICloneable + { + public OleDbParameter() { } + public OleDbParameter(string name, System.Data.OleDb.OleDbType dataType) { } + public OleDbParameter(string name, System.Data.OleDb.OleDbType dataType, int size) { } + public OleDbParameter(string parameterName, System.Data.OleDb.OleDbType dbType, int size, System.Data.ParameterDirection direction, bool isNullable, byte precision, byte scale, string srcColumn, System.Data.DataRowVersion srcVersion, object value) { } + public OleDbParameter(string parameterName, System.Data.OleDb.OleDbType dbType, int size, System.Data.ParameterDirection direction, byte precision, byte scale, string sourceColumn, System.Data.DataRowVersion sourceVersion, bool sourceColumnNullMapping, object value) { } + public OleDbParameter(string name, System.Data.OleDb.OleDbType dataType, int size, string srcColumn) { } + public OleDbParameter(string name, object value) { } + public override System.Data.DbType DbType { get { throw null; } set { } } + [System.ComponentModel.RefreshPropertiesAttribute(System.ComponentModel.RefreshProperties.All)] + public override System.Data.ParameterDirection Direction { get { throw null; } set { } } + public override bool IsNullable { get { throw null; } set { } } + [System.ComponentModel.RefreshPropertiesAttribute(System.ComponentModel.RefreshProperties.All)] + [System.Data.Common.DbProviderSpecificTypePropertyAttribute(true)] + public System.Data.OleDb.OleDbType OleDbType { get { throw null; } set { } } + public override string ParameterName { get { throw null; } set { } } + [System.ComponentModel.DefaultValueAttribute((byte)0)] + public new byte Precision { get { throw null; } set { } } + [System.ComponentModel.DefaultValueAttribute((byte)0)] + public new byte Scale { get { throw null; } set { } } + public override int Size { get { throw null; } set { } } + public override string SourceColumn { get { throw null; } set { } } + public override bool SourceColumnNullMapping { get { throw null; } set { } } + public override System.Data.DataRowVersion SourceVersion { get { throw null; } set { } } + [System.ComponentModel.RefreshPropertiesAttribute(System.ComponentModel.RefreshProperties.All)] + [System.ComponentModel.TypeConverterAttribute(typeof(System.ComponentModel.StringConverter))] + public override object Value { get { throw null; } set { } } + public override void ResetDbType() { } + public void ResetOleDbType() { } + object System.ICloneable.Clone() { throw null; } + public override string ToString() { throw null; } + } + public sealed partial class OleDbParameterCollection : System.Data.Common.DbParameterCollection + { + internal OleDbParameterCollection() { } + public override int Count { get { throw null; } } + [System.ComponentModel.BrowsableAttribute(false)] + [System.ComponentModel.DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)] + public new System.Data.OleDb.OleDbParameter this[int index] { get { throw null; } set { } } + [System.ComponentModel.BrowsableAttribute(false)] + [System.ComponentModel.DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)] + public new System.Data.OleDb.OleDbParameter this[string parameterName] { get { throw null; } set { } } + public override object SyncRoot { get { throw null; } } + public System.Data.OleDb.OleDbParameter Add(System.Data.OleDb.OleDbParameter value) { throw null; } + public override int Add(object value) { throw null; } + public System.Data.OleDb.OleDbParameter Add(string parameterName, System.Data.OleDb.OleDbType oleDbType) { throw null; } + public System.Data.OleDb.OleDbParameter Add(string parameterName, System.Data.OleDb.OleDbType oleDbType, int size) { throw null; } + public System.Data.OleDb.OleDbParameter Add(string parameterName, System.Data.OleDb.OleDbType oleDbType, int size, string sourceColumn) { throw null; } + public System.Data.OleDb.OleDbParameter Add(string parameterName, object value) { throw null; } + public override void AddRange(System.Array values) { } + public void AddRange(System.Data.OleDb.OleDbParameter[] values) { } + public System.Data.OleDb.OleDbParameter AddWithValue(string parameterName, object value) { throw null; } + public override void Clear() { } + public bool Contains(System.Data.OleDb.OleDbParameter value) { throw null; } + public override bool Contains(object value) { throw null; } + public override bool Contains(string value) { throw null; } + public override void CopyTo(System.Array array, int index) { } + public void CopyTo(System.Data.OleDb.OleDbParameter[] array, int index) { } + public override System.Collections.IEnumerator GetEnumerator() { throw null; } + protected override System.Data.Common.DbParameter GetParameter(int index) { throw null; } + protected override System.Data.Common.DbParameter GetParameter(string parameterName) { throw null; } + public int IndexOf(System.Data.OleDb.OleDbParameter value) { throw null; } + public override int IndexOf(object value) { throw null; } + public override int IndexOf(string parameterName) { throw null; } + public void Insert(int index, System.Data.OleDb.OleDbParameter value) { } + public override void Insert(int index, object value) { } + public void Remove(System.Data.OleDb.OleDbParameter value) { } + public override void Remove(object value) { } + public override void RemoveAt(int index) { } + public override void RemoveAt(string parameterName) { } + protected override void SetParameter(int index, System.Data.Common.DbParameter value) { } + protected override void SetParameter(string parameterName, System.Data.Common.DbParameter value) { } + } + public sealed partial class OleDbRowUpdatedEventArgs : System.Data.Common.RowUpdatedEventArgs + { + public OleDbRowUpdatedEventArgs(System.Data.DataRow dataRow, System.Data.IDbCommand command, System.Data.StatementType statementType, System.Data.Common.DataTableMapping tableMapping) : base(default(System.Data.DataRow), default(System.Data.IDbCommand), default(System.Data.StatementType), default(System.Data.Common.DataTableMapping)) { } + public new System.Data.OleDb.OleDbCommand Command { get { throw null; } } + } + public delegate void OleDbRowUpdatedEventHandler(object sender, System.Data.OleDb.OleDbRowUpdatedEventArgs e); + public sealed partial class OleDbRowUpdatingEventArgs : System.Data.Common.RowUpdatingEventArgs + { + public OleDbRowUpdatingEventArgs(System.Data.DataRow dataRow, System.Data.IDbCommand command, System.Data.StatementType statementType, System.Data.Common.DataTableMapping tableMapping) : base(default(System.Data.DataRow), default(System.Data.IDbCommand), default(System.Data.StatementType), default(System.Data.Common.DataTableMapping)) { } + protected override System.Data.IDbCommand BaseCommand { get { throw null; } set { } } + public new System.Data.OleDb.OleDbCommand Command { get { throw null; } set { } } + } + public delegate void OleDbRowUpdatingEventHandler(object sender, System.Data.OleDb.OleDbRowUpdatingEventArgs e); + public sealed partial class OleDbSchemaGuid + { + public static readonly System.Guid Assertions; + public static readonly System.Guid Catalogs; + public static readonly System.Guid Character_Sets; + public static readonly System.Guid Check_Constraints; + public static readonly System.Guid Check_Constraints_By_Table; + public static readonly System.Guid Collations; + public static readonly System.Guid Columns; + public static readonly System.Guid Column_Domain_Usage; + public static readonly System.Guid Column_Privileges; + public static readonly System.Guid Constraint_Column_Usage; + public static readonly System.Guid Constraint_Table_Usage; + public static readonly System.Guid DbInfoKeywords; + public static readonly System.Guid DbInfoLiterals; + public static readonly System.Guid Foreign_Keys; + public static readonly System.Guid Indexes; + public static readonly System.Guid Key_Column_Usage; + public static readonly System.Guid Primary_Keys; + public static readonly System.Guid Procedures; + public static readonly System.Guid Procedure_Columns; + public static readonly System.Guid Procedure_Parameters; + public static readonly System.Guid Provider_Types; + public static readonly System.Guid Referential_Constraints; + public static readonly System.Guid SchemaGuids; + public static readonly System.Guid Schemata; + public static readonly System.Guid Sql_Languages; + public static readonly System.Guid Statistics; + public static readonly System.Guid Tables; + public static readonly System.Guid Tables_Info; + public static readonly System.Guid Table_Constraints; + public static readonly System.Guid Table_Privileges; + public static readonly System.Guid Table_Statistics; + public static readonly System.Guid Translations; + public static readonly System.Guid Trustee; + public static readonly System.Guid Usage_Privileges; + public static readonly System.Guid Views; + public static readonly System.Guid View_Column_Usage; + public static readonly System.Guid View_Table_Usage; + public OleDbSchemaGuid() { } + } + public sealed partial class OleDbTransaction : System.Data.Common.DbTransaction + { + internal OleDbTransaction() { } + public new System.Data.OleDb.OleDbConnection Connection { get { throw null; } } + protected override System.Data.Common.DbConnection DbConnection { get { throw null; } } + public override System.Data.IsolationLevel IsolationLevel { get { throw null; } } + public System.Data.OleDb.OleDbTransaction Begin() { throw null; } + public System.Data.OleDb.OleDbTransaction Begin(System.Data.IsolationLevel isolevel) { throw null; } + public override void Commit() { } + protected override void Dispose(bool disposing) { } + public override void Rollback() { } + } + public enum OleDbType + { + BigInt = 20, + Binary = 128, + Boolean = 11, + BSTR = 8, + Char = 129, + Currency = 6, + Date = 7, + DBDate = 133, + DBTime = 134, + DBTimeStamp = 135, + Decimal = 14, + Double = 5, + Empty = 0, + Error = 10, + Filetime = 64, + Guid = 72, + IDispatch = 9, + Integer = 3, + IUnknown = 13, + LongVarBinary = 205, + LongVarChar = 201, + LongVarWChar = 203, + Numeric = 131, + PropVariant = 138, + Single = 4, + SmallInt = 2, + TinyInt = 16, + UnsignedBigInt = 21, + UnsignedInt = 19, + UnsignedSmallInt = 18, + UnsignedTinyInt = 17, + VarBinary = 204, + VarChar = 200, + Variant = 12, + VarNumeric = 139, + VarWChar = 202, + WChar = 130, + } +} \ No newline at end of file diff --git a/src/System.Data.OleDb/ref/System.Data.OleDb.csproj b/src/System.Data.OleDb/ref/System.Data.OleDb.csproj new file mode 100644 index 000000000000..addccb242b80 --- /dev/null +++ b/src/System.Data.OleDb/ref/System.Data.OleDb.csproj @@ -0,0 +1,23 @@ + + + {EF4F0844-7AAD-4B0C-A29C-37E1F92D2D78} + true + net461-Debug;net461-Release;netfx-Debug;netfx-Release;netstandard-Debug;netstandard-Release + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/System.Data.OleDb/src/AdapterSwitches.cs b/src/System.Data.OleDb/src/AdapterSwitches.cs new file mode 100644 index 000000000000..30c023fbc012 --- /dev/null +++ b/src/System.Data.OleDb/src/AdapterSwitches.cs @@ -0,0 +1,29 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +#if DEBUG + +using System.Diagnostics; + +namespace System.Data.Common +{ + internal static class AdapterSwitches + { + static private TraceSwitch _dataSchema; + + static internal TraceSwitch DataSchema + { + get + { + TraceSwitch dataSchema = _dataSchema; + if (null == dataSchema) + { + _dataSchema = dataSchema = new TraceSwitch("Data.Schema", "Enable tracing for schema actions."); + } + return dataSchema; + } + } + } +} +#endif diff --git a/src/System.Data.OleDb/src/ColumnBinding.cs b/src/System.Data.OleDb/src/ColumnBinding.cs new file mode 100644 index 000000000000..50bcc2ef36d7 --- /dev/null +++ b/src/System.Data.OleDb/src/ColumnBinding.cs @@ -0,0 +1,1699 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Data.Common; +using System.Diagnostics; +using System.Globalization; +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Threading; + +namespace System.Data.OleDb +{ + sealed internal class ColumnBinding + { + // shared with other ColumnBindings + private readonly OleDbDataReader _dataReader; // HCHAPTER + private readonly RowBinding _rowbinding; // for native buffer interaction + private readonly Bindings _bindings; + + // unique to this ColumnBinding + private readonly OleDbParameter _parameter; // output value + private readonly int _parameterChangeID; + private readonly int _offsetStatus; + private readonly int _offsetLength; + private readonly int _offsetValue; + + // Delegate ad hoc created 'Marshal.GetIDispatchForObject' reflection object cache + private static Func s_getIDispatchForObject; + + private readonly int _ordinal; + private readonly int _maxLen; + private readonly short _wType; + private readonly byte _precision; + + private readonly int _index; + private readonly int _indexForAccessor; // HCHAPTER + private readonly int _indexWithinAccessor; // HCHAPTER + + private readonly bool _ifIRowsetElseIRow; + + // unique per current input value + private int _valueBindingOffset; + private int _valueBindingSize; + internal StringMemHandle _sptr; + private GCHandle _pinnedBuffer; + + // value is cached via property getters so the original may be released + // for Value, ValueByteArray, ValueString, ValueVariant + private object _value; + + internal ColumnBinding(OleDbDataReader dataReader, int index, int indexForAccessor, int indexWithinAccessor, + OleDbParameter parameter, RowBinding rowbinding, Bindings bindings, tagDBBINDING binding, int offset, + bool ifIRowsetElseIRow) + { + Debug.Assert(null != rowbinding, "null rowbinding"); + Debug.Assert(null != bindings, "null bindings"); + Debug.Assert(ODB.SizeOf_tagDBBINDING <= offset, "invalid offset" + offset); + + _dataReader = dataReader; + _rowbinding = rowbinding; + _bindings = bindings; + _index = index; + _indexForAccessor = indexForAccessor; + _indexWithinAccessor = indexWithinAccessor; + + if (null != parameter) + { + _parameter = parameter; + _parameterChangeID = parameter.ChangeID; + } + _offsetStatus = binding.obStatus.ToInt32() + offset; + _offsetLength = binding.obLength.ToInt32() + offset; + _offsetValue = binding.obValue.ToInt32() + offset; + + Debug.Assert(0 <= _offsetStatus, "negative _offsetStatus"); + Debug.Assert(0 <= _offsetLength, "negative _offsetLength"); + Debug.Assert(0 <= _offsetValue, "negative _offsetValue"); + + _ordinal = binding.iOrdinal.ToInt32(); + _maxLen = binding.cbMaxLen.ToInt32(); + _wType = binding.wType; + _precision = binding.bPrecision; + + _ifIRowsetElseIRow = ifIRowsetElseIRow; + + SetSize(Bindings.ParamSize.ToInt32()); + } + + internal Bindings Bindings + { + get + { + _bindings.CurrentIndex = IndexWithinAccessor; + return _bindings; + } + } + + internal RowBinding RowBinding + { + get { return _rowbinding; } + } + + internal int ColumnBindingOrdinal + { + get { return _ordinal; } + } + + private int ColumnBindingMaxLen + { + get { return _maxLen; } + } + + private byte ColumnBindingPrecision + { + get { return _precision; } + } + + private short DbType + { + get { return _wType; } + } + + private Type ExpectedType + { + get { return NativeDBType.FromDBType(DbType, false, false).dataType; } + } + + internal int Index + { + get { return _index; } + } + internal int IndexForAccessor + { + get { return _indexForAccessor; } + } + + internal int IndexWithinAccessor + { + get { return _indexWithinAccessor; } + } + + private int ValueBindingOffset + { // offset within the value of where to start copying + get { return _valueBindingOffset; } + } + + private int ValueBindingSize + { // maximum size of the value to copy + get { return _valueBindingSize; } + } + + internal int ValueOffset + { // offset within the native buffer to put the value + get { return _offsetValue; } + } + + private OleDbDataReader DataReader() + { + Debug.Assert(null != _dataReader, "null DataReader"); + return _dataReader; + } + + internal bool IsParameterBindingInvalid(OleDbParameter parameter) + { + Debug.Assert((null != _parameter) && (null != parameter), "null parameter"); + return ((_parameter.ChangeID != _parameterChangeID) || (_parameter != parameter)); + } + + internal bool IsValueNull() + { + return ((DBStatus.S_ISNULL == StatusValue()) + || (((NativeDBType.VARIANT == DbType) || (NativeDBType.PROPVARIANT == DbType)) + && (Convert.IsDBNull(ValueVariant())))); + } + + private int LengthValue() + { + int length; + if (_ifIRowsetElseIRow) + { + length = RowBinding.ReadIntPtr(_offsetLength).ToInt32(); + } + else + { + length = Bindings.DBColumnAccess[IndexWithinAccessor].cbDataLen.ToInt32(); + } + return Math.Max(length, 0); + } + private void LengthValue(int value) + { + Debug.Assert(0 <= value, "negative LengthValue"); + RowBinding.WriteIntPtr(_offsetLength, (IntPtr)value); + } + + internal OleDbParameter Parameter() + { + Debug.Assert(null != _parameter, "null parameter"); + return _parameter; + } + + internal void ResetValue() + { + _value = null; + + StringMemHandle sptr = _sptr; + _sptr = null; + + if (null != sptr) + { + sptr.Dispose(); + } + + if (_pinnedBuffer.IsAllocated) + { + _pinnedBuffer.Free(); + } + } + + internal DBStatus StatusValue() + { + if (_ifIRowsetElseIRow) + { + return (DBStatus)RowBinding.ReadInt32(_offsetStatus); + } + else + { + return (DBStatus)Bindings.DBColumnAccess[IndexWithinAccessor].dwStatus; + } + } + internal void StatusValue(DBStatus value) + { +#if DEBUG + switch (value) + { + case DBStatus.S_OK: + case DBStatus.S_ISNULL: + case DBStatus.S_DEFAULT: + break; + default: + Debug.Assert(false, "unexpected StatusValue"); + break; + } +#endif + RowBinding.WriteInt32(_offsetStatus, (int)value); + } + + internal void SetOffset(int offset) + { + if (0 > offset) + { + throw ADP.InvalidOffsetValue(offset); + } + _valueBindingOffset = Math.Max(offset, 0); + } + + internal void SetSize(int size) + { + _valueBindingSize = Math.Max(size, 0); + } + + private void SetValueDBNull() + { + LengthValue(0); + StatusValue(DBStatus.S_ISNULL); + RowBinding.WriteInt64(ValueOffset, 0); // safe because AlignDataSize forces 8 byte blocks + } + private void SetValueEmpty() + { + LengthValue(0); + StatusValue(DBStatus.S_DEFAULT); + RowBinding.WriteInt64(ValueOffset, 0); // safe because AlignDataSize forces 8 byte blocks + } + + internal Object Value() + { + object value = _value; + if (null == value) + { + switch (StatusValue()) + { + case DBStatus.S_OK: + switch (DbType) + { + case NativeDBType.EMPTY: + case NativeDBType.NULL: + value = DBNull.Value; + break; + case NativeDBType.I2: + value = Value_I2(); // Int16 + break; + case NativeDBType.I4: + value = Value_I4(); // Int32 + break; + case NativeDBType.R4: + value = Value_R4(); // Single + break; + case NativeDBType.R8: + value = Value_R8(); // Double + break; + case NativeDBType.CY: + value = Value_CY(); // Decimal + break; + case NativeDBType.DATE: + value = Value_DATE(); // DateTime + break; + case NativeDBType.BSTR: + value = Value_BSTR(); // String + break; + case NativeDBType.IDISPATCH: + value = Value_IDISPATCH(); // Object + break; + case NativeDBType.ERROR: + value = Value_ERROR(); // Int32 + break; + case NativeDBType.BOOL: + value = Value_BOOL(); // Boolean + break; + case NativeDBType.VARIANT: + value = Value_VARIANT(); // Object + break; + case NativeDBType.IUNKNOWN: + value = Value_IUNKNOWN(); // Object + break; + case NativeDBType.DECIMAL: + value = Value_DECIMAL(); // Decimal + break; + case NativeDBType.I1: + value = (short)Value_I1(); // SByte->Int16 + break; + case NativeDBType.UI1: + value = Value_UI1(); // Byte + break; + case NativeDBType.UI2: + value = (int)Value_UI2(); // UInt16->Int32 + break; + case NativeDBType.UI4: + value = (long)Value_UI4(); // UInt32->Int64 + break; + case NativeDBType.I8: + value = Value_I8(); // Int64 + break; + case NativeDBType.UI8: + value = (Decimal)Value_UI8(); // UInt64->Decimal + break; + case NativeDBType.FILETIME: + value = Value_FILETIME(); // DateTime + break; + case NativeDBType.GUID: + value = Value_GUID(); // Guid + break; + case NativeDBType.BYTES: + value = Value_BYTES(); // Byte[] + break; + case NativeDBType.WSTR: + value = Value_WSTR(); // String + break; + case NativeDBType.NUMERIC: + value = Value_NUMERIC(); // Decimal + break; + case NativeDBType.DBDATE: + value = Value_DBDATE(); // DateTime + break; + case NativeDBType.DBTIME: + value = Value_DBTIME(); // TimeSpan + break; + case NativeDBType.DBTIMESTAMP: + value = Value_DBTIMESTAMP(); // DateTime + break; + case NativeDBType.PROPVARIANT: + value = Value_VARIANT(); // Object + break; + case NativeDBType.HCHAPTER: + value = Value_HCHAPTER(); // OleDbDataReader + break; + case (NativeDBType.BYREF | NativeDBType.BYTES): + value = Value_ByRefBYTES(); + break; + case (NativeDBType.BYREF | NativeDBType.WSTR): + value = Value_ByRefWSTR(); + break; + default: + throw ODB.GVtUnknown(DbType); +#if DEBUG + case NativeDBType.STR: + Debug.Assert(false, "should have bound as WSTR"); + goto default; + case NativeDBType.VARNUMERIC: + Debug.Assert(false, "should have bound as NUMERIC"); + goto default; + case NativeDBType.UDT: + Debug.Assert(false, "UDT binding should not have been encountered"); + goto default; + case (NativeDBType.BYREF | NativeDBType.STR): + Debug.Assert(false, "should have bound as BYREF|WSTR"); + goto default; +#endif + } + break; + case DBStatus.S_TRUNCATED: + switch (DbType) + { + case NativeDBType.BYTES: + value = Value_BYTES(); + break; + case NativeDBType.WSTR: + value = Value_WSTR(); + break; + case (NativeDBType.BYREF | NativeDBType.BYTES): + value = Value_ByRefBYTES(); + break; + case (NativeDBType.BYREF | NativeDBType.WSTR): + value = Value_ByRefWSTR(); + break; + default: + throw ODB.GVtUnknown(DbType); +#if DEBUG + case NativeDBType.STR: + Debug.Assert(false, "should have bound as WSTR"); + goto default; + case (NativeDBType.BYREF | NativeDBType.STR): + Debug.Assert(false, "should have bound as BYREF|WSTR"); + goto default; +#endif + } + break; + case DBStatus.S_ISNULL: + case DBStatus.S_DEFAULT: + value = DBNull.Value; + break; + default: + throw CheckTypeValueStatusValue(); + } + _value = value; + } + return value; + } + internal void Value(object value) + { + if (null == value) + { + SetValueEmpty(); + } + else if (Convert.IsDBNull(value)) + { + SetValueDBNull(); + } + else + switch (DbType) + { + case NativeDBType.EMPTY: + SetValueEmpty(); + break; + case NativeDBType.NULL: // language null - no representation, use DBNull + SetValueDBNull(); + break; + case NativeDBType.I2: + Value_I2((Int16)value); + break; + case NativeDBType.I4: + Value_I4((Int32)value); + break; + case NativeDBType.R4: + Value_R4((Single)value); + break; + case NativeDBType.R8: + Value_R8((Double)value); + break; + case NativeDBType.CY: + Value_CY((Decimal)value); + break; + case NativeDBType.DATE: + Value_DATE((DateTime)value); + break; + case NativeDBType.BSTR: + Value_BSTR((String)value); + break; + case NativeDBType.IDISPATCH: + Value_IDISPATCH(value); + break; + case NativeDBType.ERROR: + Value_ERROR((Int32)value); + break; + case NativeDBType.BOOL: + Value_BOOL((Boolean)value); + break; + case NativeDBType.VARIANT: + Value_VARIANT(value); + break; + case NativeDBType.IUNKNOWN: + Value_IUNKNOWN(value); + break; + case NativeDBType.DECIMAL: + Value_DECIMAL((Decimal)value); + break; + case NativeDBType.I1: + if (value is Int16) + { + Value_I1(Convert.ToSByte((Int16)value, CultureInfo.InvariantCulture)); + } + else + { + Value_I1((SByte)value); + } + break; + case NativeDBType.UI1: + Value_UI1((Byte)value); + break; + case NativeDBType.UI2: + if (value is Int32) + { + Value_UI2(Convert.ToUInt16((Int32)value, CultureInfo.InvariantCulture)); + } + else + { + Value_UI2((UInt16)value); + } + break; + case NativeDBType.UI4: + if (value is Int64) + { + Value_UI4(Convert.ToUInt32((Int64)value, CultureInfo.InvariantCulture)); + } + else + { + Value_UI4((UInt32)value); + } + break; + case NativeDBType.I8: + Value_I8((Int64)value); + break; + case NativeDBType.UI8: + if (value is Decimal) + { + Value_UI8(Convert.ToUInt64((Decimal)value, CultureInfo.InvariantCulture)); + } + else + { + Value_UI8((UInt64)value); + } + break; + case NativeDBType.FILETIME: + Value_FILETIME((DateTime)value); + break; + case NativeDBType.GUID: + Value_GUID((Guid)value); + break; + case NativeDBType.BYTES: + Value_BYTES((Byte[])value); + break; + case NativeDBType.WSTR: + if (value is string) + { + Value_WSTR((String)value); + } + else + { + Value_WSTR((char[])value); + } + break; + case NativeDBType.NUMERIC: + Value_NUMERIC((Decimal)value); + break; + case NativeDBType.DBDATE: + Value_DBDATE((DateTime)value); + break; + case NativeDBType.DBTIME: + Value_DBTIME((TimeSpan)value); + break; + case NativeDBType.DBTIMESTAMP: + Value_DBTIMESTAMP((DateTime)value); + break; + case NativeDBType.PROPVARIANT: + Value_VARIANT(value); + break; + case (NativeDBType.BYREF | NativeDBType.BYTES): + Value_ByRefBYTES((Byte[])value); + break; + case (NativeDBType.BYREF | NativeDBType.WSTR): + if (value is string) + { + Value_ByRefWSTR((String)value); + } + else + { + Value_ByRefWSTR((char[])value); + } + break; + default: + Debug.Assert(false, "unknown DBTYPE"); + throw ODB.SVtUnknown(DbType); +#if DEBUG + case NativeDBType.STR: + Debug.Assert(false, "Should have bound as WSTR"); + goto default; + case NativeDBType.UDT: + Debug.Assert(false, "UDT binding should not have been encountered"); + goto default; + case NativeDBType.HCHAPTER: + Debug.Assert(false, "not allowed to set HCHAPTER"); + goto default; + case NativeDBType.VARNUMERIC: + Debug.Assert(false, "should have bound as NUMERIC"); + goto default; + case (NativeDBType.BYREF | NativeDBType.STR): + Debug.Assert(false, "should have bound as BYREF|WSTR"); + goto default; +#endif + } + } + + internal Boolean Value_BOOL() + { + Debug.Assert((NativeDBType.BOOL == DbType), "Value_BOOL"); + Debug.Assert((DBStatus.S_OK == StatusValue()), "Value_BOOL"); + Int16 value = RowBinding.ReadInt16(ValueOffset); + return (0 != value); + } + private void Value_BOOL(Boolean value) + { + Debug.Assert((NativeDBType.BOOL == DbType), "Value_BOOL"); + LengthValue(0); + StatusValue(DBStatus.S_OK); + RowBinding.WriteInt16(ValueOffset, (short)(value ? ODB.VARIANT_TRUE : ODB.VARIANT_FALSE)); + } + + private String Value_BSTR() + { + Debug.Assert((NativeDBType.BSTR == DbType), "Value_BSTR"); + Debug.Assert((DBStatus.S_OK == StatusValue()), "Value_BSTR"); + string value = ""; + RowBinding bindings = RowBinding; + bool mustRelease = false; + RuntimeHelpers.PrepareConstrainedRegions(); + try + { + bindings.DangerousAddRef(ref mustRelease); + IntPtr ptr = bindings.ReadIntPtr(ValueOffset); + if (ADP.PtrZero != ptr) + { + value = Marshal.PtrToStringBSTR(ptr); + } + } + finally + { + if (mustRelease) + { + bindings.DangerousRelease(); + } + } + return value; + } + private void Value_BSTR(String value) + { + Debug.Assert((null != value), "Value_BSTR null"); + Debug.Assert((NativeDBType.BSTR == DbType), "Value_BSTR"); + LengthValue(value.Length * 2); /* bytecount*/ + StatusValue(DBStatus.S_OK); + RowBinding.SetBstrValue(ValueOffset, value); + } + + private Byte[] Value_ByRefBYTES() + { + Debug.Assert(((NativeDBType.BYREF | NativeDBType.BYTES) == DbType), "Value_ByRefBYTES"); + Debug.Assert((DBStatus.S_OK == StatusValue()), "Value_ByRefBYTES"); + byte[] value = null; + RowBinding bindings = RowBinding; + bool mustRelease = false; + RuntimeHelpers.PrepareConstrainedRegions(); + try + { + bindings.DangerousAddRef(ref mustRelease); + IntPtr ptr = bindings.ReadIntPtr(ValueOffset); + if (ADP.PtrZero != ptr) + { + value = new byte[LengthValue()]; + Marshal.Copy(ptr, value, 0, value.Length); + } + } + finally + { + if (mustRelease) + { + bindings.DangerousRelease(); + } + } + return ((null != value) ? value : new byte[0]); + } + private void Value_ByRefBYTES(Byte[] value) + { + Debug.Assert(null != value, "Value_ByRefBYTES null"); + Debug.Assert((NativeDBType.BYREF | NativeDBType.BYTES) == DbType, "Value_ByRefBYTES"); + + // we expect the provider/server to apply the silent truncation when binding BY_REF + // if (value.Length < ValueBindingOffset) { throw "Offset must refer to a location within the value" } + int length = ((ValueBindingOffset < value.Length) ? (value.Length - ValueBindingOffset) : 0); + LengthValue(((0 < ValueBindingSize) ? Math.Min(ValueBindingSize, length) : length)); + StatusValue(DBStatus.S_OK); + + IntPtr ptr = ADP.PtrZero; + if (0 < length) + { // avoid pinning empty byte[] + _pinnedBuffer = GCHandle.Alloc(value, GCHandleType.Pinned); + ptr = _pinnedBuffer.AddrOfPinnedObject(); + ptr = ADP.IntPtrOffset(ptr, ValueBindingOffset); + } + RowBinding.SetByRefValue(ValueOffset, ptr); + } + + private String Value_ByRefWSTR() + { + Debug.Assert((NativeDBType.BYREF | NativeDBType.WSTR) == DbType, "Value_ByRefWSTR"); + Debug.Assert((DBStatus.S_OK == StatusValue()) || (DBStatus.S_TRUNCATED == StatusValue()), "Value_ByRefWSTR"); + string value = ""; + RowBinding bindings = RowBinding; + bool mustRelease = false; + RuntimeHelpers.PrepareConstrainedRegions(); + try + { + bindings.DangerousAddRef(ref mustRelease); + IntPtr ptr = bindings.ReadIntPtr(ValueOffset); + if (ADP.PtrZero != ptr) + { + int charCount = LengthValue() / 2; + value = Marshal.PtrToStringUni(ptr, charCount); + } + } + finally + { + if (mustRelease) + { + bindings.DangerousRelease(); + } + } + return value; + } + private void Value_ByRefWSTR(String value) + { + Debug.Assert(null != value, "Value_ByRefWSTR null"); + Debug.Assert((NativeDBType.BYREF | NativeDBType.WSTR) == DbType, "Value_ByRefWSTR"); + // we expect the provider/server to apply the silent truncation when binding BY_REF + // if (value.Length < ValueBindingOffset) { throw "Offset must refer to a location within the value" } + int length = ((ValueBindingOffset < value.Length) ? (value.Length - ValueBindingOffset) : 0); + LengthValue(((0 < ValueBindingSize) ? Math.Min(ValueBindingSize, length) : length) * 2); /* charcount->bytecount*/ + StatusValue(DBStatus.S_OK); + + IntPtr ptr = ADP.PtrZero; + if (0 < length) + { // avoid pinning empty string, i.e String.Empty + _pinnedBuffer = GCHandle.Alloc(value, GCHandleType.Pinned); + ptr = _pinnedBuffer.AddrOfPinnedObject(); + ptr = ADP.IntPtrOffset(ptr, ValueBindingOffset); + } + RowBinding.SetByRefValue(ValueOffset, ptr); + } + private void Value_ByRefWSTR(char[] value) + { + Debug.Assert(null != value, "Value_ByRefWSTR null"); + Debug.Assert((NativeDBType.BYREF | NativeDBType.WSTR) == DbType, "Value_ByRefWSTR"); + // we expect the provider/server to apply the silent truncation when binding BY_REF + // if (value.Length < ValueBindingOffset) { throw "Offset must refer to a location within the value" } + int length = ((ValueBindingOffset < value.Length) ? (value.Length - ValueBindingOffset) : 0); + LengthValue(((0 < ValueBindingSize) ? Math.Min(ValueBindingSize, length) : length) * 2); /* charcount->bytecount*/ + StatusValue(DBStatus.S_OK); + + IntPtr ptr = ADP.PtrZero; + if (0 < length) + { // avoid pinning empty char[] + _pinnedBuffer = GCHandle.Alloc(value, GCHandleType.Pinned); + ptr = _pinnedBuffer.AddrOfPinnedObject(); + ptr = ADP.IntPtrOffset(ptr, ValueBindingOffset); + } + RowBinding.SetByRefValue(ValueOffset, ptr); + } + + private Byte[] Value_BYTES() + { + Debug.Assert(NativeDBType.BYTES == DbType, "Value_BYTES"); + Debug.Assert((DBStatus.S_OK == StatusValue()) || (DBStatus.S_TRUNCATED == StatusValue()), "Value_BYTES"); + int byteCount = Math.Min(LengthValue(), ColumnBindingMaxLen); + byte[] value = new byte[byteCount]; + RowBinding.ReadBytes(ValueOffset, value, 0, byteCount); + return value; + } + private void Value_BYTES(Byte[] value) + { + Debug.Assert(null != value, "Value_BYTES null"); + // we silently truncate when the user has specified a given Size + int bytecount = ((ValueBindingOffset < value.Length) ? Math.Min(value.Length - ValueBindingOffset, ColumnBindingMaxLen) : 0); + LengthValue(bytecount); + StatusValue(DBStatus.S_OK); + if (0 < bytecount) + { + RowBinding.WriteBytes(ValueOffset, value, ValueBindingOffset, bytecount); + } + } + + private Decimal Value_CY() + { + Debug.Assert(NativeDBType.CY == DbType, "Value_CY"); + Debug.Assert(DBStatus.S_OK == StatusValue(), "Value_CY"); + return Decimal.FromOACurrency(RowBinding.ReadInt64(ValueOffset)); + } + private void Value_CY(Decimal value) + { + Debug.Assert(NativeDBType.CY == DbType, "Value_CY"); + LengthValue(0); + StatusValue(DBStatus.S_OK); + RowBinding.WriteInt64(ValueOffset, Decimal.ToOACurrency(value)); + } + + private DateTime Value_DATE() + { + Debug.Assert(NativeDBType.DATE == DbType, "Value_DATE"); + Debug.Assert(DBStatus.S_OK == StatusValue(), "Value_DATE"); + return DateTime.FromOADate(RowBinding.ReadDouble(ValueOffset)); + } + private void Value_DATE(DateTime value) + { + Debug.Assert(NativeDBType.DATE == DbType, "Value_DATE"); + LengthValue(0); + StatusValue(DBStatus.S_OK); + RowBinding.WriteDouble(ValueOffset, value.ToOADate()); + } + + private DateTime Value_DBDATE() + { + Debug.Assert(NativeDBType.DBDATE == DbType, "Value_DBDATE"); + Debug.Assert(DBStatus.S_OK == StatusValue(), "Value_DBDATE"); + return RowBinding.ReadDate(ValueOffset); + } + private void Value_DBDATE(DateTime value) + { + Debug.Assert(NativeDBType.DBDATE == DbType, "Value_DATE"); + LengthValue(0); + StatusValue(DBStatus.S_OK); + RowBinding.WriteDate(ValueOffset, value); + } + + private TimeSpan Value_DBTIME() + { + Debug.Assert(NativeDBType.DBTIME == DbType, "Value_DBTIME"); + Debug.Assert(DBStatus.S_OK == StatusValue(), "Value_DBTIME"); + return RowBinding.ReadTime(ValueOffset); + } + private void Value_DBTIME(TimeSpan value) + { + Debug.Assert(NativeDBType.DBTIME == DbType, "Value_DBTIME"); + LengthValue(0); + StatusValue(DBStatus.S_OK); + RowBinding.WriteTime(ValueOffset, value); + } + + private DateTime Value_DBTIMESTAMP() + { + Debug.Assert(NativeDBType.DBTIMESTAMP == DbType, "Value_DBTIMESTAMP"); + Debug.Assert(DBStatus.S_OK == StatusValue(), "Value_DBTIMESTAMP"); + return RowBinding.ReadDateTime(ValueOffset); + } + private void Value_DBTIMESTAMP(DateTime value) + { + Debug.Assert(NativeDBType.DBTIMESTAMP == DbType, "Value_DBTIMESTAMP"); + LengthValue(0); + StatusValue(DBStatus.S_OK); + RowBinding.WriteDateTime(ValueOffset, value); + } + + private Decimal Value_DECIMAL() + { + Debug.Assert(NativeDBType.DECIMAL == DbType, "Value_DECIMAL"); + Debug.Assert(DBStatus.S_OK == StatusValue(), "Value_DECIMAL"); + int[] buffer = new int[4]; + RowBinding.ReadInt32Array(ValueOffset, buffer, 0, 4); + return new Decimal( + buffer[2], // low + buffer[3], // mid + buffer[1], // high + (0 != (buffer[0] & unchecked((int)0x80000000))), // sign + unchecked((byte)((buffer[0] & unchecked((int)0x00FF0000)) >> 16))); // scale + } + private void Value_DECIMAL(Decimal value) + { + Debug.Assert(NativeDBType.DECIMAL == DbType, "Value_DECIMAL"); + + /* pending breaking change approval + if (_precision < ((System.Data.SqlTypes.SqlDecimal) value).Precision) { + throw ADP.ParameterValueOutOfRange(value); + } + */ + + LengthValue(0); + StatusValue(DBStatus.S_OK); + + int[] tmp = Decimal.GetBits(value); + int[] buffer = new int[4] { + tmp[3], tmp[2], tmp[0], tmp[1] + }; + RowBinding.WriteInt32Array(ValueOffset, buffer, 0, 4); + } + + private Int32 Value_ERROR() + { + Debug.Assert(NativeDBType.ERROR == DbType, "Value_ERROR"); + Debug.Assert(DBStatus.S_OK == StatusValue(), "Value_ERROR"); + return RowBinding.ReadInt32(ValueOffset); + } + private void Value_ERROR(Int32 value) + { + Debug.Assert(NativeDBType.ERROR == DbType, "Value_ERROR"); + LengthValue(0); + StatusValue(DBStatus.S_OK); + RowBinding.WriteInt32(ValueOffset, value); + } + + private DateTime Value_FILETIME() + { + Debug.Assert(NativeDBType.FILETIME == DbType, "Value_FILETIME"); + Debug.Assert(DBStatus.S_OK == StatusValue(), "Value_FILETIME"); + Int64 tmp = RowBinding.ReadInt64(ValueOffset); + return DateTime.FromFileTime(tmp); + } + private void Value_FILETIME(DateTime value) + { + Debug.Assert(NativeDBType.FILETIME == DbType, "Value_FILETIME"); + LengthValue(0); + StatusValue(DBStatus.S_OK); + Int64 tmp = value.ToFileTime(); + RowBinding.WriteInt64(ValueOffset, tmp); + } + + internal Guid Value_GUID() + { + Debug.Assert(NativeDBType.GUID == DbType, "Value_GUID"); + Debug.Assert(DBStatus.S_OK == StatusValue(), "Value_GUID"); + return RowBinding.ReadGuid(ValueOffset); + } + private void Value_GUID(Guid value) + { + Debug.Assert(NativeDBType.GUID == DbType, "Value_GUID"); + + LengthValue(0); + StatusValue(DBStatus.S_OK); + RowBinding.WriteGuid(ValueOffset, value); + } + + internal OleDbDataReader Value_HCHAPTER() + { + Debug.Assert(NativeDBType.HCHAPTER == DbType, "Value_HCHAPTER"); + Debug.Assert(DBStatus.S_OK == StatusValue(), "Value_HCHAPTER"); + + return DataReader().ResetChapter(IndexForAccessor, IndexWithinAccessor, RowBinding, ValueOffset); + } + + private SByte Value_I1() + { + Debug.Assert(NativeDBType.I1 == DbType, "Value_I1"); + Debug.Assert(DBStatus.S_OK == StatusValue(), "Value_I1"); + byte value = RowBinding.ReadByte(ValueOffset); + return unchecked((SByte)value); + } + private void Value_I1(SByte value) + { + Debug.Assert(NativeDBType.I1 == DbType, "Value_I1"); + LengthValue(0); + StatusValue(DBStatus.S_OK); + RowBinding.WriteByte(ValueOffset, unchecked((Byte)value)); + } + + internal Int16 Value_I2() + { + Debug.Assert(NativeDBType.I2 == DbType, "Value_I2"); + Debug.Assert(DBStatus.S_OK == StatusValue(), "Value_I2"); + return RowBinding.ReadInt16(ValueOffset); + } + private void Value_I2(Int16 value) + { + Debug.Assert(NativeDBType.I2 == DbType, "Value_I2"); + LengthValue(0); + StatusValue(DBStatus.S_OK); + RowBinding.WriteInt16(ValueOffset, value); + } + + private Int32 Value_I4() + { + Debug.Assert(NativeDBType.I4 == DbType, "Value_I4"); + Debug.Assert(DBStatus.S_OK == StatusValue(), "Value_I4"); + return RowBinding.ReadInt32(ValueOffset); + } + private void Value_I4(Int32 value) + { + Debug.Assert(NativeDBType.I4 == DbType, "Value_I4"); + LengthValue(0); + StatusValue(DBStatus.S_OK); + RowBinding.WriteInt32(ValueOffset, value); + } + + private Int64 Value_I8() + { + Debug.Assert(NativeDBType.I8 == DbType, "Value_I8"); + Debug.Assert(DBStatus.S_OK == StatusValue(), "Value_I8"); + return RowBinding.ReadInt64(ValueOffset); + } + private void Value_I8(Int64 value) + { + Debug.Assert(NativeDBType.I8 == DbType, "Value_I8"); + LengthValue(0); + StatusValue(DBStatus.S_OK); + RowBinding.WriteInt64(ValueOffset, value); + } + + private object Value_IDISPATCH() + { + Debug.Assert(NativeDBType.IDISPATCH == DbType, "Value_IDISPATCH"); + Debug.Assert(DBStatus.S_OK == StatusValue(), "Value_IDISPATCH"); + object value; + RowBinding bindings = RowBinding; + bool mustRelease = false; + RuntimeHelpers.PrepareConstrainedRegions(); + try + { + bindings.DangerousAddRef(ref mustRelease); + IntPtr ptr = bindings.ReadIntPtr(ValueOffset); + value = Marshal.GetObjectForIUnknown(ptr); + } + finally + { + if (mustRelease) + { + bindings.DangerousRelease(); + } + } + return value; + } + private void Value_IDISPATCH(object value) + { + // UNDONE: OLE DB will IUnknown.Release input storage parameter values + Debug.Assert(NativeDBType.IDISPATCH == DbType, "Value_IDISPATCH"); + LengthValue(0); + StatusValue(DBStatus.S_OK); + + IntPtr ptr = IntPtr.Zero; + // lazy init reflection objects + if (s_getIDispatchForObject == null) + { + object delegateInstance = null; + MethodInfo mi = typeof(Marshal).GetMethod("GetIDispatchForObject", BindingFlags.Public | BindingFlags.Static); + if (mi == null) + { + throw new NotSupportedException(SR.PlatformNotSupported_GetIDispatchForObject); + } + Volatile.Write(ref delegateInstance, mi.CreateDelegate(typeof(Func))); + s_getIDispatchForObject = delegateInstance as Func; + ptr = s_getIDispatchForObject(value); + } + RowBinding.WriteIntPtr(ValueOffset, ptr); + } + + private object Value_IUNKNOWN() + { + Debug.Assert(NativeDBType.IUNKNOWN == DbType, "Value_IUNKNOWN"); + Debug.Assert(DBStatus.S_OK == StatusValue(), "Value_IUNKNOWN"); + object value; + RowBinding bindings = RowBinding; + bool mustRelease = false; + RuntimeHelpers.PrepareConstrainedRegions(); + try + { + bindings.DangerousAddRef(ref mustRelease); + IntPtr ptr = bindings.ReadIntPtr(ValueOffset); + value = Marshal.GetObjectForIUnknown(ptr); + } + finally + { + if (mustRelease) + { + bindings.DangerousRelease(); + } + } + return value; + } + private void Value_IUNKNOWN(object value) + { + // UNDONE: OLE DB will IUnknown.Release input storage parameter values + Debug.Assert(NativeDBType.IUNKNOWN == DbType, "Value_IUNKNOWN"); + LengthValue(0); + StatusValue(DBStatus.S_OK); + IntPtr ptr = Marshal.GetIUnknownForObject(value); + RowBinding.WriteIntPtr(ValueOffset, ptr); + } + + private Decimal Value_NUMERIC() + { + Debug.Assert(NativeDBType.NUMERIC == DbType, "Value_NUMERIC"); + Debug.Assert(DBStatus.S_OK == StatusValue(), "Value_NUMERIC"); + return RowBinding.ReadNumeric(ValueOffset); + } + private void Value_NUMERIC(Decimal value) + { + Debug.Assert(NativeDBType.NUMERIC == DbType, "Value_NUMERIC"); + + /* pending breaking change approval + if (_precision < ((System.Data.SqlTypes.SqlDecimal) value).Precision) { + throw ADP.ParameterValueOutOfRange(value); + } + */ + + LengthValue(0); + StatusValue(DBStatus.S_OK); + RowBinding.WriteNumeric(ValueOffset, value, ColumnBindingPrecision); + } + + private Single Value_R4() + { + Debug.Assert(NativeDBType.R4 == DbType, "Value_R4"); + Debug.Assert(DBStatus.S_OK == StatusValue(), "Value_R4"); + + return RowBinding.ReadSingle(ValueOffset); + } + private void Value_R4(Single value) + { + Debug.Assert(NativeDBType.R4 == DbType, "Value_R4"); + LengthValue(0); + StatusValue(DBStatus.S_OK); + RowBinding.WriteSingle(ValueOffset, value); + } + + private Double Value_R8() + { + Debug.Assert(NativeDBType.R8 == DbType, "Value_R8"); + Debug.Assert(DBStatus.S_OK == StatusValue(), "Value_R8"); + + return RowBinding.ReadDouble(ValueOffset); + } + private void Value_R8(Double value) + { + Debug.Assert(NativeDBType.R8 == DbType, "Value_I4"); + LengthValue(0); + StatusValue(DBStatus.S_OK); + RowBinding.WriteDouble(ValueOffset, value); + } + + private Byte Value_UI1() + { + Debug.Assert(NativeDBType.UI1 == DbType, "Value_UI1"); + Debug.Assert(DBStatus.S_OK == StatusValue(), "Value_UI1"); + return RowBinding.ReadByte(ValueOffset); + } + private void Value_UI1(Byte value) + { + Debug.Assert(NativeDBType.UI1 == DbType, "Value_UI1"); + LengthValue(0); + StatusValue(DBStatus.S_OK); + RowBinding.WriteByte(ValueOffset, value); + } + + internal UInt16 Value_UI2() + { + Debug.Assert(NativeDBType.UI2 == DbType, "Value_UI2"); + Debug.Assert(DBStatus.S_OK == StatusValue(), "Value_UI2"); + return unchecked((UInt16)RowBinding.ReadInt16(ValueOffset)); + } + private void Value_UI2(UInt16 value) + { + Debug.Assert(NativeDBType.UI2 == DbType, "Value_UI2"); + LengthValue(0); + StatusValue(DBStatus.S_OK); + RowBinding.WriteInt16(ValueOffset, unchecked((Int16)value)); + } + + internal UInt32 Value_UI4() + { + Debug.Assert(NativeDBType.UI4 == DbType, "Value_UI4"); + Debug.Assert(DBStatus.S_OK == StatusValue(), "Value_UI4"); + return unchecked((UInt32)RowBinding.ReadInt32(ValueOffset)); + } + private void Value_UI4(UInt32 value) + { + Debug.Assert(NativeDBType.UI4 == DbType, "Value_UI4"); + LengthValue(0); + StatusValue(DBStatus.S_OK); + RowBinding.WriteInt32(ValueOffset, unchecked((Int32)value)); + } + + internal UInt64 Value_UI8() + { + Debug.Assert(NativeDBType.UI8 == DbType, "Value_UI8"); + Debug.Assert(DBStatus.S_OK == StatusValue(), "Value_UI8"); + return unchecked((UInt64)RowBinding.ReadInt64(ValueOffset)); + } + private void Value_UI8(UInt64 value) + { + Debug.Assert(NativeDBType.UI8 == DbType, "Value_UI8"); + LengthValue(0); + StatusValue(DBStatus.S_OK); + RowBinding.WriteInt64(ValueOffset, unchecked((Int64)value)); + } + + private String Value_WSTR() + { + Debug.Assert(NativeDBType.WSTR == DbType, "Value_WSTR"); + Debug.Assert((DBStatus.S_OK == StatusValue()) || (DBStatus.S_TRUNCATED == StatusValue()), "Value_WSTR"); + Debug.Assert(2 < ColumnBindingMaxLen, "Value_WSTR"); + int byteCount = Math.Min(LengthValue(), ColumnBindingMaxLen - 2); + return RowBinding.PtrToStringUni(ValueOffset, byteCount / 2); + } + private void Value_WSTR(String value) + { + Debug.Assert(null != value, "Value_BYTES null"); + Debug.Assert(NativeDBType.WSTR == DbType, "Value_WSTR"); + // we silently truncate when the user has specified a given Size + int charCount = ((ValueBindingOffset < value.Length) ? Math.Min(value.Length - ValueBindingOffset, (ColumnBindingMaxLen - 2) / 2) : 0); + + LengthValue(charCount * 2); + StatusValue(DBStatus.S_OK); + if (0 < charCount) + { + char[] chars = value.ToCharArray(ValueBindingOffset, charCount); + RowBinding.WriteCharArray(ValueOffset, chars, ValueBindingOffset, charCount); + } + } + private void Value_WSTR(char[] value) + { + Debug.Assert(null != value, "Value_BYTES null"); + Debug.Assert(NativeDBType.WSTR == DbType, "Value_WSTR"); + // we silently truncate when the user has specified a given Size + int charCount = ((ValueBindingOffset < value.Length) ? Math.Min(value.Length - ValueBindingOffset, (ColumnBindingMaxLen - 2) / 2) : 0); + + LengthValue(charCount * 2); + StatusValue(DBStatus.S_OK); + if (0 < charCount) + { + RowBinding.WriteCharArray(ValueOffset, value, ValueBindingOffset, charCount); + } + } + private object Value_VARIANT() + { + Debug.Assert((NativeDBType.VARIANT == DbType) || (NativeDBType.PROPVARIANT == DbType), "Value_VARIANT"); + Debug.Assert(DBStatus.S_OK == StatusValue(), "Value_VARIANT"); + return RowBinding.GetVariantValue(ValueOffset); + } + private void Value_VARIANT(object value) + { + Debug.Assert((NativeDBType.VARIANT == DbType) || (NativeDBType.PROPVARIANT == DbType), "Value_VARIANT"); + LengthValue(0); + StatusValue(DBStatus.S_OK); + RowBinding.SetVariantValue(ValueOffset, value); + } + + internal Boolean ValueBoolean() + { + Boolean value; + switch (StatusValue()) + { + case DBStatus.S_OK: + switch (DbType) + { + case NativeDBType.BOOL: + value = Value_BOOL(); + break; + case NativeDBType.VARIANT: + value = (Boolean)ValueVariant(); + break; + default: + throw ODB.ConversionRequired(); + } + break; + default: + throw CheckTypeValueStatusValue(typeof(Boolean)); + } + return value; + } + + internal byte[] ValueByteArray() + { + byte[] value = (byte[])_value; + if (null == value) + { + switch (StatusValue()) + { + case DBStatus.S_OK: + switch (DbType) + { + case NativeDBType.BYTES: + value = Value_BYTES(); // String + break; + case NativeDBType.VARIANT: + value = (byte[])ValueVariant(); // Object + break; + case (NativeDBType.BYREF | NativeDBType.BYTES): + value = Value_ByRefBYTES(); + break; + default: + throw ODB.ConversionRequired(); + } + break; + case DBStatus.S_TRUNCATED: + switch (DbType) + { + case NativeDBType.BYTES: + value = Value_BYTES(); + break; + case (NativeDBType.BYREF | NativeDBType.BYTES): + value = Value_ByRefBYTES(); + break; + default: + throw ODB.ConversionRequired(); + } + break; + default: + throw CheckTypeValueStatusValue(typeof(byte[])); + } + _value = value; + } + return value; + } + + internal Byte ValueByte() + { + Byte value; + switch (StatusValue()) + { + case DBStatus.S_OK: + switch (DbType) + { + case NativeDBType.UI1: + value = Value_UI1(); + break; + case NativeDBType.VARIANT: + value = (Byte)ValueVariant(); + break; + default: + throw ODB.ConversionRequired(); + } + break; + default: + throw CheckTypeValueStatusValue(typeof(Byte)); + } + return value; + } + + internal OleDbDataReader ValueChapter() + { + OleDbDataReader value = (OleDbDataReader)_value; + if (null == value) + { + switch (StatusValue()) + { + case DBStatus.S_OK: + switch (DbType) + { + case NativeDBType.HCHAPTER: + value = Value_HCHAPTER(); // OleDbDataReader + break; + default: + throw ODB.ConversionRequired(); + } + break; + default: + throw CheckTypeValueStatusValue(typeof(String)); + } + _value = value; + } + return value; + } + + internal DateTime ValueDateTime() + { + DateTime value; + switch (StatusValue()) + { + case DBStatus.S_OK: + switch (DbType) + { + case NativeDBType.DATE: + value = Value_DATE(); + break; + case NativeDBType.DBDATE: + value = Value_DBDATE(); + break; + case NativeDBType.DBTIMESTAMP: + value = Value_DBTIMESTAMP(); + break; + case NativeDBType.FILETIME: + value = Value_FILETIME(); + break; + case NativeDBType.VARIANT: + value = (DateTime)ValueVariant(); + break; + default: + throw ODB.ConversionRequired(); + } + break; + default: + throw CheckTypeValueStatusValue(typeof(Int16)); + } + return value; + } + + internal Decimal ValueDecimal() + { + Decimal value; + switch (StatusValue()) + { + case DBStatus.S_OK: + switch (DbType) + { + case NativeDBType.CY: + value = Value_CY(); + break; + case NativeDBType.DECIMAL: + value = Value_DECIMAL(); + break; + case NativeDBType.NUMERIC: + value = Value_NUMERIC(); + break; + case NativeDBType.UI8: + value = (Decimal)Value_UI8(); + break; + case NativeDBType.VARIANT: + value = (Decimal)ValueVariant(); + break; + default: + throw ODB.ConversionRequired(); + } + break; + default: + throw CheckTypeValueStatusValue(typeof(Int16)); + } + return value; + } + + internal Guid ValueGuid() + { + Guid value; + switch (StatusValue()) + { + case DBStatus.S_OK: + switch (DbType) + { + case NativeDBType.GUID: + value = Value_GUID(); + break; + default: + throw ODB.ConversionRequired(); + } + break; + default: + throw CheckTypeValueStatusValue(typeof(Int16)); + } + return value; + } + + internal Int16 ValueInt16() + { + Int16 value; + switch (StatusValue()) + { + case DBStatus.S_OK: + switch (DbType) + { + case NativeDBType.I2: + value = Value_I2(); + break; + case NativeDBType.I1: + value = (Int16)Value_I1(); + break; + case NativeDBType.VARIANT: + object variant = ValueVariant(); + if (variant is SByte) + { + value = (Int16)(SByte)variant; + } + else + { + value = (Int16)variant; + } + break; + default: + throw ODB.ConversionRequired(); + } + break; + default: + throw CheckTypeValueStatusValue(typeof(Int16)); + } + return value; + } + + internal Int32 ValueInt32() + { + Int32 value; + switch (StatusValue()) + { + case DBStatus.S_OK: + switch (DbType) + { + case NativeDBType.I4: + value = Value_I4(); + break; + case NativeDBType.UI2: + value = (Int32)Value_UI2(); + break; + case NativeDBType.VARIANT: + object variant = ValueVariant(); + if (variant is UInt16) + { + value = (Int32)(UInt16)variant; + } + else + { + value = (Int32)variant; + } + break; + default: + throw ODB.ConversionRequired(); + } + break; + default: + throw CheckTypeValueStatusValue(typeof(Int32)); + } + return value; + } + + internal Int64 ValueInt64() + { + Int64 value; + switch (StatusValue()) + { + case DBStatus.S_OK: + switch (DbType) + { + case NativeDBType.I8: + value = Value_I8(); + break; + case NativeDBType.UI4: + value = (Int64)Value_UI4(); + break; + case NativeDBType.VARIANT: + object variant = ValueVariant(); + if (variant is UInt32) + { + value = (Int64)(UInt32)variant; + } + else + { + value = (Int64)variant; + } + break; + default: + throw ODB.ConversionRequired(); + } + break; + default: + throw CheckTypeValueStatusValue(typeof(Int64)); + } + return value; + } + + internal Single ValueSingle() + { + Single value; + switch (StatusValue()) + { + case DBStatus.S_OK: + switch (DbType) + { + case NativeDBType.R4: + value = Value_R4(); + break; + case NativeDBType.VARIANT: + value = (Single)ValueVariant(); + break; + default: + throw ODB.ConversionRequired(); + } + break; + default: + throw CheckTypeValueStatusValue(typeof(Single)); + } + return value; + } + + internal Double ValueDouble() + { + Double value; + switch (StatusValue()) + { + case DBStatus.S_OK: + switch (DbType) + { + case NativeDBType.R8: + value = Value_R8(); + break; + case NativeDBType.VARIANT: + value = (Double)ValueVariant(); + break; + default: + throw ODB.ConversionRequired(); + } + break; + default: + throw CheckTypeValueStatusValue(typeof(Double)); + } + return value; + } + + internal string ValueString() + { + string value = (String)_value; + if (null == value) + { + switch (StatusValue()) + { + case DBStatus.S_OK: + switch (DbType) + { + case NativeDBType.BSTR: + value = Value_BSTR(); // String + break; + case NativeDBType.VARIANT: + value = (String)ValueVariant(); // Object + break; + case NativeDBType.WSTR: + value = Value_WSTR(); // String + break; + case (NativeDBType.BYREF | NativeDBType.WSTR): + value = Value_ByRefWSTR(); + break; + default: + throw ODB.ConversionRequired(); + } + break; + case DBStatus.S_TRUNCATED: + switch (DbType) + { + case NativeDBType.WSTR: + value = Value_WSTR(); + break; + case (NativeDBType.BYREF | NativeDBType.WSTR): + value = Value_ByRefWSTR(); + break; + default: + throw ODB.ConversionRequired(); + } + break; + default: + throw CheckTypeValueStatusValue(typeof(String)); + } + _value = value; + } + return value; + } + + private object ValueVariant() + { + object value = _value; + if (null == value) + { + value = Value_VARIANT(); + _value = value; + } + return value; + } + + private Exception CheckTypeValueStatusValue() + { + return CheckTypeValueStatusValue(ExpectedType); + } + + private Exception CheckTypeValueStatusValue(Type expectedType) + { + switch (StatusValue()) + { + case DBStatus.S_OK: + Debug.Assert(false, "CheckStatusValue: unhandled data with ok status"); + goto case DBStatus.E_CANTCONVERTVALUE; + case DBStatus.S_TRUNCATED: + Debug.Assert(false, "CheckStatusValue: unhandled data with truncated status"); + goto case DBStatus.E_CANTCONVERTVALUE; + case DBStatus.E_BADACCESSOR: + return ODB.BadAccessor(); + case DBStatus.E_CANTCONVERTVALUE: + return ODB.CantConvertValue(); // UNDONE: need original data type + case DBStatus.S_ISNULL: // database null + return ADP.InvalidCast(); // UNDONE: NullValue exception + case DBStatus.E_SIGNMISMATCH: + return ODB.SignMismatch(expectedType); + case DBStatus.E_DATAOVERFLOW: + return ODB.DataOverflow(expectedType); + case DBStatus.E_CANTCREATE: + return ODB.CantCreate(expectedType); + case DBStatus.E_UNAVAILABLE: + return ODB.Unavailable(expectedType); + default: + return ODB.UnexpectedStatusValue(StatusValue()); + } + } + } +} diff --git a/src/System.Data.OleDb/src/Configurations.props b/src/System.Data.OleDb/src/Configurations.props new file mode 100644 index 000000000000..f95907eed7a2 --- /dev/null +++ b/src/System.Data.OleDb/src/Configurations.props @@ -0,0 +1,13 @@ + + + + netstandard-Windows_NT; + netstandard; + net461-Windows_NT; + + + $(PackageConfigurations); + netfx-Windows_NT; + + + \ No newline at end of file diff --git a/src/System.Data.OleDb/src/DbBindings.cs b/src/System.Data.OleDb/src/DbBindings.cs new file mode 100644 index 000000000000..5b996672826b --- /dev/null +++ b/src/System.Data.OleDb/src/DbBindings.cs @@ -0,0 +1,414 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Data.Common; +using System.Diagnostics; +using System.Text; + +namespace System.Data.OleDb +{ + sealed internal class Bindings + { + private readonly tagDBPARAMBINDINFO[] _bindInfo; + private readonly tagDBBINDING[] _dbbindings; + private readonly tagDBCOLUMNACCESS[] _dbcolumns; + + private OleDbParameter[] _parameters; + private int _collectionChangeID; + + private OleDbDataReader _dataReader; + private ColumnBinding[] _columnBindings; + private RowBinding _rowBinding; + + private int _index; + private int _count; + private int _dataBufferSize; + private bool _ifIRowsetElseIRow; + private bool _forceRebind; + private bool _needToReset; + + private Bindings(int count) + { + _count = count; + + _dbbindings = new tagDBBINDING[count]; + for (int i = 0; i < _dbbindings.Length; ++i) + { + _dbbindings[i] = new tagDBBINDING(); + } + _dbcolumns = new tagDBCOLUMNACCESS[count]; + } + + internal Bindings(OleDbParameter[] parameters, int collectionChangeID) : this(parameters.Length) + { + _bindInfo = new tagDBPARAMBINDINFO[parameters.Length]; + _parameters = parameters; + _collectionChangeID = collectionChangeID; + _ifIRowsetElseIRow = true; + } + + internal Bindings(OleDbDataReader dataReader, bool ifIRowsetElseIRow, int count) : this(count) + { + _dataReader = dataReader; + _ifIRowsetElseIRow = ifIRowsetElseIRow; + } + + internal tagDBPARAMBINDINFO[] BindInfo + { + get { return _bindInfo; } + } + internal tagDBCOLUMNACCESS[] DBColumnAccess + { + get { return _dbcolumns; } + } + + internal int CurrentIndex + { + //get { return _index; } + set + { + Debug.Assert((0 <= value) && (value < _count), "bad binding index"); + _index = value; + } + } + + internal ColumnBinding[] ColumnBindings() + { + Debug.Assert(null != _columnBindings, "null ColumnBindings"); + return _columnBindings; + } + + internal OleDbParameter[] Parameters() + { + Debug.Assert(null != _parameters, "null Parameters"); + return _parameters; + } + + internal RowBinding RowBinding() + { + //Debug.Assert(null != _rowBinding, "null RowBinding"); + return _rowBinding; + } + + internal bool ForceRebind + { + get { return _forceRebind; } + set { _forceRebind = value; } + } + + // tagDBPARAMBINDINFO member access + internal IntPtr DataSourceType + { + //get { return _bindInfo[_index].pwszDataSourceType; } + set + { + _bindInfo[_index].pwszDataSourceType = value; + } + } + internal IntPtr Name + { + //get { return _bindInfo[_index].pwszName; } + set + { + _bindInfo[_index].pwszName = value; + } + } + internal IntPtr ParamSize + { + get + { + if (null != _bindInfo) + { + return _bindInfo[_index].ulParamSize; + } + return IntPtr.Zero; + } + set + { + _bindInfo[_index].ulParamSize = value; + } + } + internal int Flags + { + //get { return _bindInfo[_index].dwFlag; } + set + { + _bindInfo[_index].dwFlags = value; + } + } + + // tagDBBINDING member access + // + internal IntPtr Ordinal + { // iOrdinal + //get { return _dbbindings[_index].iOrdinal.ToInt32(); } + set + { + _dbbindings[_index].iOrdinal = value; + } + } +#if DEBUG + /*internal int ValueOffset { // obValue + get { return _dbbindings[_index].obValue.ToInt32(); } + } + internal int LengthOffset { // obLength + get { return _dbbindings[_index].obLength.ToInt32(); } + } + internal int StatusOffset { // obStatus + get { return _dbbindings[_index].obStatus.ToInt32(); } + }*/ +#endif + internal int Part + { // dwPart +#if DEBUG + //get { return _dbbindings[_index].dwPart; } +#endif + set { _dbbindings[_index].dwPart = value; } + } + internal int ParamIO + { // eParamIO +#if DEBUG + //get { return _dbbindings[_index].eParamIO; } +#endif + set { _dbbindings[_index].eParamIO = value; } + } + internal int MaxLen + { // cbMaxLen + //get { return (int) _dbbindings[_index].cbMaxLen; } + set + { + Debug.Assert(0 <= value, "invalid MaxLen"); + + _dbbindings[_index].obStatus = (IntPtr)(_dataBufferSize + 0); + _dbbindings[_index].obLength = (IntPtr)(_dataBufferSize + ADP.PtrSize); + _dbbindings[_index].obValue = (IntPtr)(_dataBufferSize + ADP.PtrSize + ADP.PtrSize); + _dataBufferSize += ADP.PtrSize + ADP.PtrSize; + + switch (DbType) + { + case (NativeDBType.BSTR): // ADP.PtrSize + case (NativeDBType.HCHAPTER): // ADP.PtrSize + case (NativeDBType.PROPVARIANT): // sizeof(PROPVARIANT) + case (NativeDBType.VARIANT): // 16 or 24 (8 + ADP.PtrSize *2) + case (NativeDBType.BYREF | NativeDBType.BYTES): // ADP.PtrSize + case (NativeDBType.BYREF | NativeDBType.WSTR): // ADP.PtrSize + // allocate extra space to cache original value for disposal + _dataBufferSize += System.Data.OleDb.RowBinding.AlignDataSize(value * 2); + _needToReset = true; + break; + default: + _dataBufferSize += System.Data.OleDb.RowBinding.AlignDataSize(value); + break; + } + + _dbbindings[_index].cbMaxLen = (IntPtr)value; + _dbcolumns[_index].cbMaxLen = (IntPtr)value; + } + } + internal int DbType + { // wType + get { return _dbbindings[_index].wType; } + set + { + _dbbindings[_index].wType = (short)value; + _dbcolumns[_index].wType = (short)value; + } + } + internal byte Precision + { // bPrecision +#if DEBUG + //get { return _dbbindings[_index].bPrecision; } + +#endif + set + { + if (null != _bindInfo) + { + _bindInfo[_index].bPrecision = value; + } + _dbbindings[_index].bPrecision = value; + _dbcolumns[_index].bPrecision = value; + } + } + internal byte Scale + { // bScale +#if DEBUG + //get { return _dbbindings[_index].bScale; } +#endif + set + { + if (null != _bindInfo) + { + _bindInfo[_index].bScale = value; + } + _dbbindings[_index].bScale = value; + _dbcolumns[_index].bScale = value; + } + } + + internal int AllocateForAccessor(OleDbDataReader dataReader, int indexStart, int indexForAccessor) + { + Debug.Assert(null == _rowBinding, "row binding already allocated"); + Debug.Assert(null == _columnBindings, "column bindings already allocated"); + + RowBinding rowBinding = System.Data.OleDb.RowBinding.CreateBuffer(_count, _dataBufferSize, _needToReset); + _rowBinding = rowBinding; + + ColumnBinding[] columnBindings = rowBinding.SetBindings(dataReader, this, indexStart, indexForAccessor, _parameters, _dbbindings, _ifIRowsetElseIRow); + Debug.Assert(null != columnBindings, "null column bindings"); + _columnBindings = columnBindings; + + if (!_ifIRowsetElseIRow) + { + Debug.Assert(columnBindings.Length == _dbcolumns.Length, "length mismatch"); + for (int i = 0; i < columnBindings.Length; ++i) + { + _dbcolumns[i].pData = rowBinding.DangerousGetDataPtr(columnBindings[i].ValueOffset); // We are simply pointing at a location later in the buffer, so we're OK to not addref the buffer. + } + } + +#if DEBUG + int index = -1; + foreach (ColumnBinding binding in columnBindings) + { + Debug.Assert(index < binding.Index, "invaild index"); + index = binding.Index; + } +#endif + return (indexStart + columnBindings.Length); + } + + internal void ApplyInputParameters() + { + ColumnBinding[] columnBindings = this.ColumnBindings(); + OleDbParameter[] parameters = this.Parameters(); + + RowBinding().StartDataBlock(); + for (int i = 0; i < parameters.Length; ++i) + { + if (ADP.IsDirection(parameters[i], ParameterDirection.Input)) + { + columnBindings[i].SetOffset(parameters[i].Offset); + columnBindings[i].Value(parameters[i].GetCoercedValue()); + } + else + { + // always set ouput only and return value parameter values to null when executing + parameters[i].Value = null; + + //columnBindings[i].SetValueEmpty(); + } + } + } + + internal void ApplyOutputParameters() + { + ColumnBinding[] columnBindings = this.ColumnBindings(); + OleDbParameter[] parameters = this.Parameters(); + + for (int i = 0; i < parameters.Length; ++i) + { + if (ADP.IsDirection(parameters[i], ParameterDirection.Output)) + { + parameters[i].Value = columnBindings[i].Value(); + } + } + CleanupBindings(); + } + + internal bool AreParameterBindingsInvalid(OleDbParameterCollection collection) + { + Debug.Assert(null != collection, "null parameter collection"); + Debug.Assert(null != _parameters, "null parameters"); + + ColumnBinding[] columnBindings = this.ColumnBindings(); + if (!ForceRebind && ((collection.ChangeID == _collectionChangeID) && (_parameters.Length == collection.Count))) + { + for (int i = 0; i < columnBindings.Length; ++i) + { + ColumnBinding binding = columnBindings[i]; + + Debug.Assert(null != binding, "null column binding"); + Debug.Assert(binding.Parameter() == _parameters[i], "parameter mismatch"); + if (binding.IsParameterBindingInvalid(collection[i])) + { + //Debug.WriteLine("ParameterBindingsInvalid"); + return true; + } + } + //Debug.WriteLine("ParameterBindingsValid"); + return false; // collection and cached values are the same + } + //Debug.WriteLine("ParameterBindingsInvalid"); + return true; + } + + internal void CleanupBindings() + { + RowBinding rowBinding = this.RowBinding(); + if (null != rowBinding) + { + rowBinding.ResetValues(); + + ColumnBinding[] columnBindings = this.ColumnBindings(); + for (int i = 0; i < columnBindings.Length; ++i) + { + ColumnBinding binding = columnBindings[i]; + if (null != binding) + { + binding.ResetValue(); + } + } + } + } + + internal void CloseFromConnection() + { + if (null != _rowBinding) + { + _rowBinding.CloseFromConnection(); + } + Dispose(); + } + + internal OleDbHResult CreateAccessor(UnsafeNativeMethods.IAccessor iaccessor, int flags) + { + Debug.Assert(null != _rowBinding, "no row binding"); + Debug.Assert(null != _columnBindings, "no column bindings"); + return _rowBinding.CreateAccessor(iaccessor, flags, _columnBindings); + } + + public void Dispose() + { + _parameters = null; + _dataReader = null; + _columnBindings = null; + + RowBinding rowBinding = _rowBinding; + _rowBinding = null; + if (null != rowBinding) + { + rowBinding.Dispose(); + } + } + + internal void GuidKindName(Guid guid, int eKind, IntPtr propid) + { + tagDBCOLUMNACCESS[] dbcolumns = DBColumnAccess; + dbcolumns[_index].columnid.uGuid = guid; + dbcolumns[_index].columnid.eKind = eKind; + dbcolumns[_index].columnid.ulPropid = propid; + } + + internal void ParameterStatus(StringBuilder builder) + { + ColumnBinding[] columnBindings = ColumnBindings(); + for (int i = 0; i < columnBindings.Length; ++i) + { + ODB.CommandParameterStatus(builder, i, columnBindings[i].StatusValue()); + } + } + } +} + diff --git a/src/System.Data.OleDb/src/DbConnectionOptions.cs b/src/System.Data.OleDb/src/DbConnectionOptions.cs new file mode 100644 index 000000000000..5a7e3aa9039c --- /dev/null +++ b/src/System.Data.OleDb/src/DbConnectionOptions.cs @@ -0,0 +1,997 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Collections; +using System.Diagnostics; +using System.Globalization; +using System.Runtime.Versioning; +using System.Text; +using System.Text.RegularExpressions; + +namespace System.Data.Common +{ + internal class DbConnectionOptions + { + // instances of this class are intended to be immutable, i.e readonly + // used by pooling classes so it is much easier to verify correctness + // when not worried about the class being modified during execution + +#if DEBUG + /*private const string ConnectionStringPatternV1 = + "[\\s;]*" + +"(?([^=\\s]|\\s+[^=\\s]|\\s+==|==)+)" + + "\\s*=(?!=)\\s*" + +"(?(" + + "(" + "\"" + "([^\"]|\"\")*" + "\"" + ")" + + "|" + + "(" + "'" + "([^']|'')*" + "'" + ")" + + "|" + + "(" + "(?![\"'])" + "([^\\s;]|\\s+[^\\s;])*" + "(?([^=\\s\\p{Cc}]|\\s+[^=\\s\\p{Cc}]|\\s+==|==)+)" // allow any visible character for keyname except '=' which must quoted as '==' + + "\\s*=(?!=)\\s*" // the equal sign divides the key and value parts + + "(?" + + "(\"([^\"\u0000]|\"\")*\")" // double quoted string, " must be quoted as "" + + "|" + + "('([^'\u0000]|'')*')" // single quoted string, ' must be quoted as '' + + "|" + + "((?![\"'\\s])" // unquoted value must not start with " or ' or space, would also like = but too late to change + + "([^;\\s\\p{Cc}]|\\s+[^;\\s\\p{Cc}])*" // control characters must be quoted + + "(?([^=\\s\\p{Cc}]|\\s+[^=\\s\\p{Cc}])+)" // allow any visible character for keyname except '=' + + "\\s*=\\s*" // the equal sign divides the key and value parts + + "(?" + + "(\\{([^\\}\u0000]|\\}\\})*\\})" // quoted string, starts with { and ends with } + + "|" + + "((?![\\{\\s])" // unquoted value must not start with { or space, would also like = but too late to change + + "([^;\\s\\p{Cc}]|\\s+[^;\\s\\p{Cc}])*" // control characters must be quoted + + + ")" // although the spec does not allow {} + // embedded within a value, the retail code does. + // + "(? = in keywords + // first key-value pair wins + // quote values using \{ and \}, only driver= and pwd= appear to generically allow quoting + // do not strip quotes from value, or add quotes except for driver keyword + // OLEDB: + // http://msdn.microsoft.com/library/default.asp?url=/library/en-us/oledb/htm/oledbconnectionstringsyntax.asp + // support == -> = in keywords + // last key-value pair wins + // quote values using \" or \' + // strip quotes from value + internal readonly bool UseOdbcRules; + + // called by derived classes that may cache based on connectionString + public DbConnectionOptions(string connectionString) + : this(connectionString, null, false) + { + } + + // synonyms hashtable is meant to be read-only translation of parsed string + // keywords/synonyms to a known keyword string + public DbConnectionOptions(string connectionString, Hashtable synonyms, bool useOdbcRules) + { + UseOdbcRules = useOdbcRules; + _parsetable = new Hashtable(); + _usersConnectionString = ((null != connectionString) ? connectionString : ""); + + // first pass on parsing, initial syntax check + if (0 < _usersConnectionString.Length) + { + KeyChain = ParseInternal(_parsetable, _usersConnectionString, true, synonyms, UseOdbcRules); + HasPasswordKeyword = (_parsetable.ContainsKey(KEY.Password) || _parsetable.ContainsKey(SYNONYM.Pwd)); + HasUserIdKeyword = (_parsetable.ContainsKey(KEY.User_ID) || _parsetable.ContainsKey(SYNONYM.UID)); + } + } + + public string UsersConnectionString(bool hidePassword) + { + return UsersConnectionString(hidePassword, false); + } + + private string UsersConnectionString(bool hidePassword, bool forceHidePassword) + { + string connectionString = _usersConnectionString; + if (HasPasswordKeyword && (forceHidePassword || (hidePassword && !HasPersistablePassword))) + { + ReplacePasswordPwd(out connectionString, false); + } + return ((null != connectionString) ? connectionString : ""); + } + + internal bool HasPersistablePassword + { + get + { + if (HasPasswordKeyword) + { + return ConvertValueToBoolean(KEY.Persist_Security_Info, false); + } + return true; // no password means persistable password so we don't have to munge + } + } + + public bool IsEmpty + { + get { return (null == KeyChain); } + } + + public string this[string keyword] + { + get { return (string)_parsetable[keyword]; } + } + + internal static void AppendKeyValuePairBuilder(StringBuilder builder, string keyName, string keyValue, bool useOdbcRules) + { + ADP.CheckArgumentNull(builder, "builder"); + ADP.CheckArgumentLength(keyName, "keyName"); + + if ((null == keyName) || !ConnectionStringValidKeyRegex.IsMatch(keyName)) + { + throw ADP.InvalidKeyname(keyName); + } + if ((null != keyValue) && !IsValueValidInternal(keyValue)) + { + throw ADP.InvalidValue(keyName); + } + + if ((0 < builder.Length) && (';' != builder[builder.Length - 1])) + { + builder.Append(";"); + } + + if (useOdbcRules) + { + builder.Append(keyName); + } + else + { + builder.Append(keyName.Replace("=", "==")); + } + builder.Append("="); + + if (null != keyValue) + { // else =; + if (useOdbcRules) + { + if ((0 < keyValue.Length) && + (('{' == keyValue[0]) || (0 <= keyValue.IndexOf(';')) || (0 == String.Compare(DbConnectionStringKeywords.Driver, keyName, StringComparison.OrdinalIgnoreCase))) && + !ConnectionStringQuoteOdbcValueRegex.IsMatch(keyValue)) + { + // always quote Driver value (required for ODBC Version 2.65 and earlier) + // always quote values that contain a ';' + builder.Append('{').Append(keyValue.Replace("}", "}}")).Append('}'); + } + else + { + builder.Append(keyValue); + } + } + else if (ConnectionStringQuoteValueRegex.IsMatch(keyValue)) + { + // -> + builder.Append(keyValue); + } + else if ((-1 != keyValue.IndexOf('\"')) && (-1 == keyValue.IndexOf('\''))) + { + // -> <'val"ue'> + builder.Append('\''); + builder.Append(keyValue); + builder.Append('\''); + } + else + { + // -> <"val'ue"> + // <=value> -> <"=value"> + // <;value> -> <";value"> + // < value> -> <" value"> + // -> <"va lue"> + // -> <"va'""lue"> + builder.Append('\"'); + builder.Append(keyValue.Replace("\"", "\"\"")); + builder.Append('\"'); + } + } + } + + public bool ConvertValueToBoolean(string keyName, bool defaultValue) + { + object value = _parsetable[keyName]; + if (null == value) + { + return defaultValue; + } + return ConvertValueToBooleanInternal(keyName, (string)value); + } + + internal static bool ConvertValueToBooleanInternal(string keyName, string stringValue) + { + if (CompareInsensitiveInvariant(stringValue, "true") || CompareInsensitiveInvariant(stringValue, "yes")) + return true; + else if (CompareInsensitiveInvariant(stringValue, "false") || CompareInsensitiveInvariant(stringValue, "no")) + return false; + else + { + string tmp = stringValue.Trim(); // Remove leading & trailing white space. + if (CompareInsensitiveInvariant(tmp, "true") || CompareInsensitiveInvariant(tmp, "yes")) + return true; + else if (CompareInsensitiveInvariant(tmp, "false") || CompareInsensitiveInvariant(tmp, "no")) + return false; + else + { + throw ADP.InvalidConnectionOptionValue(keyName); + } + } + } + + public int ConvertValueToInt32(string keyName, int defaultValue) + { + object value = _parsetable[keyName]; + if (null == value) + { + return defaultValue; + } + return ConvertToInt32Internal(keyName, (string)value); + } + + internal static int ConvertToInt32Internal(string keyname, string stringValue) + { + try + { + return System.Int32.Parse(stringValue, System.Globalization.NumberStyles.Integer, CultureInfo.InvariantCulture); + } + catch (FormatException e) + { + throw ADP.InvalidConnectionOptionValue(keyname, e); + } + catch (OverflowException e) + { + throw ADP.InvalidConnectionOptionValue(keyname, e); + } + } + + public string ConvertValueToString(string keyName, string defaultValue) + { + string value = (string)_parsetable[keyName]; + return ((null != value) ? value : defaultValue); + } + + static private bool CompareInsensitiveInvariant(string strvalue, string strconst) + { + return (0 == StringComparer.OrdinalIgnoreCase.Compare(strvalue, strconst)); + } + + public bool ContainsKey(string keyword) + { + return _parsetable.ContainsKey(keyword); + } + + protected internal virtual string Expand() + { + return _usersConnectionString; + } + + // SxS notes: + // * this method queries "DataDirectory" value from the current AppDomain. + // This string is used for to replace "!DataDirectory!" values in the connection string, it is not considered as an "exposed resource". + // * This method uses GetFullPath to validate that root path is valid, the result is not exposed out. + internal static string ExpandDataDirectory(string keyword, string value, ref string datadir) + { + string fullPath = null; + if ((null != value) && value.StartsWith(DataDirectory, StringComparison.OrdinalIgnoreCase)) + { + string rootFolderPath = datadir; + if (null == rootFolderPath) + { + // find the replacement path + object rootFolderObject = AppDomain.CurrentDomain.GetData("DataDirectory"); + rootFolderPath = (rootFolderObject as string); + if ((null != rootFolderObject) && (null == rootFolderPath)) + { + throw ADP.InvalidDataDirectory(); + } + else if (ADP.IsEmpty(rootFolderPath)) + { + rootFolderPath = AppDomain.CurrentDomain.BaseDirectory; + } + if (null == rootFolderPath) + { + rootFolderPath = ""; + } + // cache the |DataDir| for ExpandDataDirectories + datadir = rootFolderPath; + } + + // We don't know if rootFolderpath ends with '\', and we don't know if the given name starts with onw + int fileNamePosition = DataDirectory.Length; // filename starts right after the '|datadirectory|' keyword + bool rootFolderEndsWith = (0 < rootFolderPath.Length) && rootFolderPath[rootFolderPath.Length - 1] == '\\'; + bool fileNameStartsWith = (fileNamePosition < value.Length) && value[fileNamePosition] == '\\'; + + // replace |datadirectory| with root folder path + if (!rootFolderEndsWith && !fileNameStartsWith) + { + // need to insert '\' + fullPath = rootFolderPath + '\\' + value.Substring(fileNamePosition); + } + else if (rootFolderEndsWith && fileNameStartsWith) + { + // need to strip one out + fullPath = rootFolderPath + value.Substring(fileNamePosition + 1); + } + else + { + // simply concatenate the strings + fullPath = rootFolderPath + value.Substring(fileNamePosition); + } + + // verify root folder path is a real path without unexpected "..\" + if (!ADP.GetFullPath(fullPath).StartsWith(rootFolderPath, StringComparison.Ordinal)) + { + throw ADP.InvalidConnectionOptionValue(keyword); + } + } + return fullPath; + } + + internal string ExpandDataDirectories(ref string filename, ref int position) + { + string value = null; + StringBuilder builder = new StringBuilder(_usersConnectionString.Length); + string datadir = null; + + int copyPosition = 0; + bool expanded = false; + + for (NameValuePair current = KeyChain; null != current; current = current.Next) + { + value = current.Value; + + // remove duplicate keyswords from connectionstring + //if ((object)this[current.Name] != (object)value) { + // expanded = true; + // copyPosition += current.Length; + // continue; + //} + + // There is a set of keywords we explictly do NOT want to expand |DataDirectory| on + if (UseOdbcRules) + { + switch (current.Name) + { + case DbConnectionOptionKeywords.Driver: + case DbConnectionOptionKeywords.Pwd: + case DbConnectionOptionKeywords.UID: + break; + default: + value = ExpandDataDirectory(current.Name, value, ref datadir); + break; + } + } + else + { + switch (current.Name) + { + case DbConnectionOptionKeywords.Provider: + case DbConnectionOptionKeywords.DataProvider: + case DbConnectionOptionKeywords.RemoteProvider: + case DbConnectionOptionKeywords.ExtendedProperties: + case DbConnectionOptionKeywords.UserID: + case DbConnectionOptionKeywords.Password: + case DbConnectionOptionKeywords.UID: + case DbConnectionOptionKeywords.Pwd: + break; + default: + value = ExpandDataDirectory(current.Name, value, ref datadir); + break; + } + } + if (null == value) + { + value = current.Value; + } + if (UseOdbcRules || (DbConnectionOptionKeywords.FileName != current.Name)) + { + if (value != current.Value) + { + expanded = true; + AppendKeyValuePairBuilder(builder, current.Name, value, UseOdbcRules); + builder.Append(';'); + } + else + { + builder.Append(_usersConnectionString, copyPosition, current.Length); + } + } + else + { + // strip out 'File Name=myconnection.udl' for OleDb + // remembering is value for which UDL file to open + // and where to insert the strnig + expanded = true; + filename = value; + position = builder.Length; + } + copyPosition += current.Length; + } + + if (expanded) + { + value = builder.ToString(); + } + else + { + value = null; + } + return value; + } + + [System.Diagnostics.Conditional("DEBUG")] + private static void DebugTraceKeyValuePair(string keyname, string keyvalue, Hashtable synonyms) + { + Debug.Assert(keyname == keyname.ToLower(CultureInfo.InvariantCulture), "missing ToLower"); + + string realkeyname = ((null != synonyms) ? (string)synonyms[keyname] : keyname); + if ((KEY.Password != realkeyname) && (SYNONYM.Pwd != realkeyname)) + { // don't trace passwords ever! + if (null != keyvalue) + { + } + else + { + } + } + } + + static private string GetKeyName(StringBuilder buffer) + { + int count = buffer.Length; + while ((0 < count) && Char.IsWhiteSpace(buffer[count - 1])) + { + count--; // trailing whitespace + } + return buffer.ToString(0, count).ToLower(CultureInfo.InvariantCulture); + } + + static private string GetKeyValue(StringBuilder buffer, bool trimWhitespace) + { + int count = buffer.Length; + int index = 0; + if (trimWhitespace) + { + while ((index < count) && Char.IsWhiteSpace(buffer[index])) + { + index++; // leading whitespace + } + while ((0 < count) && Char.IsWhiteSpace(buffer[count - 1])) + { + count--; // trailing whitespace + } + } + return buffer.ToString(index, count - index); + } + + // transistion states used for parsing + private enum ParserState + { + NothingYet = 1, //start point + Key, + KeyEqual, + KeyEnd, + UnquotedValue, + DoubleQuoteValue, + DoubleQuoteValueQuote, + SingleQuoteValue, + SingleQuoteValueQuote, + BraceQuoteValue, + BraceQuoteValueQuote, + QuotedValueEnd, + NullTermination, + }; + + static internal int GetKeyValuePair(string connectionString, int currentPosition, StringBuilder buffer, bool useOdbcRules, out string keyname, out string keyvalue) + { + int startposition = currentPosition; + + buffer.Length = 0; + keyname = null; + keyvalue = null; + + char currentChar = '\0'; + + ParserState parserState = ParserState.NothingYet; + int length = connectionString.Length; + for (; currentPosition < length; ++currentPosition) + { + currentChar = connectionString[currentPosition]; + + switch (parserState) + { + case ParserState.NothingYet: // [\\s;]* + if ((';' == currentChar) || Char.IsWhiteSpace(currentChar)) + { + continue; + } + if ('\0' == currentChar) + { parserState = ParserState.NullTermination; continue; } + if (Char.IsControl(currentChar)) + { throw ADP.ConnectionStringSyntax(startposition); } + startposition = currentPosition; + if ('=' != currentChar) + { + parserState = ParserState.Key; + break; + } + else + { + parserState = ParserState.KeyEqual; + continue; + } + + case ParserState.Key: // (?([^=\\s\\p{Cc}]|\\s+[^=\\s\\p{Cc}]|\\s+==|==)+) + if ('=' == currentChar) + { parserState = ParserState.KeyEqual; continue; } + if (Char.IsWhiteSpace(currentChar)) + { break; } + if (Char.IsControl(currentChar)) + { throw ADP.ConnectionStringSyntax(startposition); } + break; + + case ParserState.KeyEqual: // \\s*=(?!=)\\s* + if (!useOdbcRules && '=' == currentChar) + { parserState = ParserState.Key; break; } + keyname = GetKeyName(buffer); + if (ADP.IsEmpty(keyname)) + { throw ADP.ConnectionStringSyntax(startposition); } + buffer.Length = 0; + parserState = ParserState.KeyEnd; + goto case ParserState.KeyEnd; + + case ParserState.KeyEnd: + if (Char.IsWhiteSpace(currentChar)) + { continue; } + if (useOdbcRules) + { + if ('{' == currentChar) + { parserState = ParserState.BraceQuoteValue; break; } + } + else + { + if ('\'' == currentChar) + { parserState = ParserState.SingleQuoteValue; continue; } + if ('"' == currentChar) + { parserState = ParserState.DoubleQuoteValue; continue; } + } + if (';' == currentChar) + { goto ParserExit; } + if ('\0' == currentChar) + { goto ParserExit; } + if (Char.IsControl(currentChar)) + { throw ADP.ConnectionStringSyntax(startposition); } + parserState = ParserState.UnquotedValue; + break; + + case ParserState.UnquotedValue: // "((?![\"'\\s])" + "([^;\\s\\p{Cc}]|\\s+[^;\\s\\p{Cc}])*" + "(?"); + Debug.Assert(value1 == value2, "ParseInternal code vs. regex mismatch keyvalue <" + value1 + "> <" + value2 + ">"); + } + + } + catch (ArgumentException f) + { + if (null != e) + { + string msg1 = e.Message; + string msg2 = f.Message; + + const string KeywordNotSupportedMessagePrefix = "Keyword not supported:"; + const string WrongFormatMessagePrefix = "Format of the initialization string"; + bool isEquivalent = (msg1 == msg2); + if (!isEquivalent) + { + // we also accept cases were Regex parser (debug only) reports "wrong format" and + // retail parsing code reports format exception in different location or "keyword not supported" + if (msg2.StartsWith(WrongFormatMessagePrefix, StringComparison.Ordinal)) + { + if (msg1.StartsWith(KeywordNotSupportedMessagePrefix, StringComparison.Ordinal) || msg1.StartsWith(WrongFormatMessagePrefix, StringComparison.Ordinal)) + { + isEquivalent = true; + } + } + } + Debug.Assert(isEquivalent, "ParseInternal code vs regex message mismatch: <" + msg1 + "> <" + msg2 + ">"); + } + else + { + Debug.Assert(false, "ParseInternal code vs regex throw mismatch " + f.Message); + } + e = null; + } + if (null != e) + { + Debug.Assert(false, "ParseInternal code threw exception vs regex mismatch"); + } + } +#endif + private static NameValuePair ParseInternal(Hashtable parsetable, string connectionString, bool buildChain, Hashtable synonyms, bool firstKey) + { + Debug.Assert(null != connectionString, "null connectionstring"); + StringBuilder buffer = new StringBuilder(); + NameValuePair localKeychain = null, keychain = null; +#if DEBUG + try + { +#endif + int nextStartPosition = 0; + int endPosition = connectionString.Length; + while (nextStartPosition < endPosition) + { + int startPosition = nextStartPosition; + + string keyname, keyvalue; + nextStartPosition = GetKeyValuePair(connectionString, startPosition, buffer, firstKey, out keyname, out keyvalue); + if (ADP.IsEmpty(keyname)) + { + // if (nextStartPosition != endPosition) { throw; } + break; + } +#if DEBUG + DebugTraceKeyValuePair(keyname, keyvalue, synonyms); + + Debug.Assert(IsKeyNameValid(keyname), "ParseFailure, invalid keyname"); + Debug.Assert(IsValueValidInternal(keyvalue), "parse failure, invalid keyvalue"); +#endif + string realkeyname = ((null != synonyms) ? (string)synonyms[keyname] : keyname); + if (!IsKeyNameValid(realkeyname)) + { + throw ADP.KeywordNotSupported(keyname); + } + if (!firstKey || !parsetable.Contains(realkeyname)) + { + parsetable[realkeyname] = keyvalue; // last key-value pair wins (or first) + } + + if (null != localKeychain) + { + localKeychain = localKeychain.Next = new NameValuePair(realkeyname, keyvalue, nextStartPosition - startPosition); + } + else if (buildChain) + { // first time only - don't contain modified chain from UDL file + keychain = localKeychain = new NameValuePair(realkeyname, keyvalue, nextStartPosition - startPosition); + } + } +#if DEBUG + } + catch (ArgumentException e) + { + ParseComparison(parsetable, connectionString, synonyms, firstKey, e); + throw; + } + ParseComparison(parsetable, connectionString, synonyms, firstKey, null); +#endif + return keychain; + } + + internal NameValuePair ReplacePasswordPwd(out string constr, bool fakePassword) + { + bool expanded = false; + int copyPosition = 0; + NameValuePair head = null, tail = null, next = null; + StringBuilder builder = new StringBuilder(_usersConnectionString.Length); + for (NameValuePair current = KeyChain; null != current; current = current.Next) + { + if ((KEY.Password != current.Name) && (SYNONYM.Pwd != current.Name)) + { + builder.Append(_usersConnectionString, copyPosition, current.Length); + if (fakePassword) + { + next = new NameValuePair(current.Name, current.Value, current.Length); + } + } + else if (fakePassword) + { // replace user password/pwd value with * + const string equalstar = "=*;"; + builder.Append(current.Name).Append(equalstar); + next = new NameValuePair(current.Name, "*", current.Name.Length + equalstar.Length); + expanded = true; + } + else + { // drop the password/pwd completely in returning for user + expanded = true; + } + + if (fakePassword) + { + if (null != tail) + { + tail = tail.Next = next; + } + else + { + tail = head = next; + } + } + copyPosition += current.Length; + } + Debug.Assert(expanded, "password/pwd was not removed"); + constr = builder.ToString(); + return head; + } + } +} diff --git a/src/System.Data.OleDb/src/DbConnectionStringCommon.cs b/src/System.Data.OleDb/src/DbConnectionStringCommon.cs new file mode 100644 index 000000000000..ae318e82a1f3 --- /dev/null +++ b/src/System.Data.OleDb/src/DbConnectionStringCommon.cs @@ -0,0 +1,232 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Collections.Generic; +using System.ComponentModel; +using System.Diagnostics; +using System.Globalization; +using System.Data.SqlClient; + +namespace System.Data.Common +{ + internal sealed class ReadOnlyCollection : System.Collections.ICollection, ICollection + { + private T[] _items; + + internal ReadOnlyCollection(T[] items) + { + _items = items; +#if DEBUG + for (int i = 0; i < items.Length; ++i) + { + Debug.Assert(null != items[i], "null item"); + } +#endif + } + + public void CopyTo(T[] array, int arrayIndex) + { + Array.Copy(_items, 0, array, arrayIndex, _items.Length); + } + + void System.Collections.ICollection.CopyTo(Array array, int arrayIndex) + { + Array.Copy(_items, 0, array, arrayIndex, _items.Length); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return new Enumerator(_items); + } + + public System.Collections.IEnumerator GetEnumerator() + { + return new Enumerator(_items); + } + + bool System.Collections.ICollection.IsSynchronized + { + get { return false; } + } + + Object System.Collections.ICollection.SyncRoot + { + get { return _items; } + } + + bool ICollection.IsReadOnly + { + get { return true; } + } + + void ICollection.Add(T value) + { + throw new NotSupportedException(); + } + + void ICollection.Clear() + { + throw new NotSupportedException(); + } + + bool ICollection.Contains(T value) + { + return Array.IndexOf(_items, value) >= 0; + } + + bool ICollection.Remove(T value) + { + throw new NotSupportedException(); + } + + public int Count + { + get { return _items.Length; } + } + + internal struct Enumerator : IEnumerator, System.Collections.IEnumerator + { // based on List.Enumerator + private K[] _items; + private int _index; + + internal Enumerator(K[] items) + { + _items = items; + _index = -1; + } + + public void Dispose() + { + } + + public bool MoveNext() + { + return (++_index < _items.Length); + } + + public K Current + { + get + { + return _items[_index]; + } + } + + Object System.Collections.IEnumerator.Current + { + get + { + return _items[_index]; + } + } + + void System.Collections.IEnumerator.Reset() + { + _index = -1; + } + } + } + + internal static class DbConnectionStringBuilderUtil + { + internal static bool ConvertToBoolean(object value) + { + Debug.Assert(null != value, "ConvertToBoolean(null)"); + string svalue = (value as string); + if (null != svalue) + { + if (StringComparer.OrdinalIgnoreCase.Equals(svalue, "true") || StringComparer.OrdinalIgnoreCase.Equals(svalue, "yes")) + return true; + else if (StringComparer.OrdinalIgnoreCase.Equals(svalue, "false") || StringComparer.OrdinalIgnoreCase.Equals(svalue, "no")) + return false; + else + { + string tmp = svalue.Trim(); // Remove leading & trailing white space. + if (StringComparer.OrdinalIgnoreCase.Equals(tmp, "true") || StringComparer.OrdinalIgnoreCase.Equals(tmp, "yes")) + return true; + else if (StringComparer.OrdinalIgnoreCase.Equals(tmp, "false") || StringComparer.OrdinalIgnoreCase.Equals(tmp, "no")) + return false; + } + return Boolean.Parse(svalue); + } + try + { + return ((IConvertible)value).ToBoolean(CultureInfo.InvariantCulture); + } + catch (InvalidCastException e) + { + throw ADP.ConvertFailed(value.GetType(), typeof(Boolean), e); + } + } + + internal static int ConvertToInt32(object value) + { + try + { + return ((IConvertible)value).ToInt32(CultureInfo.InvariantCulture); + } + catch (InvalidCastException e) + { + throw ADP.ConvertFailed(value.GetType(), typeof(Int32), e); + } + } + + internal static string ConvertToString(object value) + { + try + { + return ((IConvertible)value).ToString(CultureInfo.InvariantCulture); + } + catch (InvalidCastException e) + { + throw ADP.ConvertFailed(value.GetType(), typeof(String), e); + } + } + } + + internal static class DbConnectionStringDefaults + { + // OleDb + internal const string FileName = ""; + internal const int OleDbServices = ~(/*DBPROPVAL_OS_AGR_AFTERSESSION*/0x00000008 | /*DBPROPVAL_OS_CLIENTCURSOR*/0x00000004); // -13 + internal const string Provider = ""; + + internal const int ConnectTimeout = 15; + internal const bool PersistSecurityInfo = false; + internal const string DataSource = ""; + } + + internal static class DbConnectionOptionKeywords + { + // Odbc + internal const string Driver = "driver"; + internal const string Pwd = "pwd"; + internal const string UID = "uid"; + + // OleDb + internal const string DataProvider = "data provider"; + internal const string ExtendedProperties = "extended properties"; + internal const string FileName = "file name"; + internal const string Provider = "provider"; + internal const string RemoteProvider = "remote provider"; + + // common keywords (OleDb, OracleClient, SqlClient) + internal const string Password = "password"; + internal const string UserID = "user id"; + } + + internal static class DbConnectionStringKeywords + { + // Odbc + internal const string Driver = "Driver"; + + // OleDb + internal const string FileName = "File Name"; + internal const string OleDbServices = "OLE DB Services"; + internal const string Provider = "Provider"; + + internal const string DataSource = "Data Source"; + internal const string PersistSecurityInfo = "Persist Security Info"; + } +} diff --git a/src/System.Data.OleDb/src/DbParameterHelper.cs b/src/System.Data.OleDb/src/DbParameterHelper.cs new file mode 100644 index 000000000000..982e093f6dfe --- /dev/null +++ b/src/System.Data.OleDb/src/DbParameterHelper.cs @@ -0,0 +1,274 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.ComponentModel; +using System.Data.Common; + +namespace System.Data.OleDb +{ + public sealed partial class OleDbParameter : DbParameter + { // V1.2.3300 + private object _value; + + private object _parent; + + private ParameterDirection _direction; + private int _size; + private string _sourceColumn; + private DataRowVersion _sourceVersion; + private bool _sourceColumnNullMapping; + + private bool _isNullable; + + private object _coercedValue; + + private OleDbParameter(OleDbParameter source) : this() + { // V1.2.3300, Clone + ADP.CheckArgumentNull(source, "source"); + + source.CloneHelper(this); + + ICloneable cloneable = (_value as ICloneable); + if (null != cloneable) + { + _value = cloneable.Clone(); + } + } + + private object CoercedValue + { // V1.2.3300 + get + { + return _coercedValue; + } + set + { + _coercedValue = value; + } + } + + [RefreshProperties(RefreshProperties.All)] + override public ParameterDirection Direction + { // V1.2.3300, XXXParameter V1.0.3300 + get + { + ParameterDirection direction = _direction; + return ((0 != direction) ? direction : ParameterDirection.Input); + } + set + { + if (_direction != value) + { + switch (value) + { // @perfnote: Enum.IsDefined + case ParameterDirection.Input: + case ParameterDirection.Output: + case ParameterDirection.InputOutput: + case ParameterDirection.ReturnValue: + PropertyChanging(); + _direction = value; + break; + default: + throw ADP.InvalidParameterDirection(value); + } + } + } + } + + override public bool IsNullable + { // V1.2.3300, XXXParameter V1.0.3300 + get + { + return _isNullable; + } + set + { + _isNullable = value; + } + } + + internal int Offset + { + get + { + return 0; + } + } + + override public int Size + { // V1.2.3300, XXXParameter V1.0.3300 + get + { + int size = _size; + if (0 == size) + { + size = ValueSize(Value); + } + return size; + } + set + { + if (_size != value) + { + if (value < -1) + { + throw ADP.InvalidSizeValue(value); + } + PropertyChanging(); + _size = value; + } + } + } + + private void ResetSize() + { + if (0 != _size) + { + PropertyChanging(); + _size = 0; + } + } + + private bool ShouldSerializeSize() + { // V1.2.3300 + return (0 != _size); + } + + override public string SourceColumn + { // V1.2.3300, XXXParameter V1.0.3300 + get + { + string sourceColumn = _sourceColumn; + return ((null != sourceColumn) ? sourceColumn : string.Empty); + } + set + { + _sourceColumn = value; + } + } + + public override bool SourceColumnNullMapping + { + get + { + return _sourceColumnNullMapping; + } + set + { + _sourceColumnNullMapping = value; + } + } + + override public DataRowVersion SourceVersion + { // V1.2.3300, XXXParameter V1.0.3300 + get + { + DataRowVersion sourceVersion = _sourceVersion; + return ((0 != sourceVersion) ? sourceVersion : DataRowVersion.Current); + } + set + { + switch (value) + { // @perfnote: Enum.IsDefined + case DataRowVersion.Original: + case DataRowVersion.Current: + case DataRowVersion.Proposed: + case DataRowVersion.Default: + _sourceVersion = value; + break; + default: + throw ADP.InvalidDataRowVersion(value); + } + } + } + + private void CloneHelperCore(OleDbParameter destination) + { + destination._value = _value; + // NOTE: _parent is not cloned + destination._direction = _direction; + destination._size = _size; + destination._sourceColumn = _sourceColumn; + destination._sourceVersion = _sourceVersion; + destination._sourceColumnNullMapping = _sourceColumnNullMapping; + destination._isNullable = _isNullable; + } + + internal void CopyTo(DbParameter destination) + { + ADP.CheckArgumentNull(destination, "destination"); + CloneHelper((OleDbParameter)destination); + } + + internal object CompareExchangeParent(object value, object comparand) + { + // the interlock guarantees same parameter won't belong to multiple collections + // at the same time, but to actually occur the user must really try + // since we never declared thread safety, we don't care at this time + //return System.Threading.Interlocked.CompareExchange(ref _parent, value, comparand); + object parent = _parent; + if (comparand == parent) + { + _parent = value; + } + return parent; + } + + internal void ResetParent() + { + _parent = null; + } + + override public string ToString() + { // V1.2.3300, XXXParameter V1.0.3300 + return ParameterName; + } + + private byte ValuePrecisionCore(object value) + { // V1.2.3300 + if (value is Decimal) + { + return ((System.Data.SqlTypes.SqlDecimal)(Decimal)value).Precision; + } + return 0; + } + + private byte ValueScaleCore(object value) + { // V1.2.3300 + if (value is Decimal) + { + return (byte)((Decimal.GetBits((Decimal)value)[3] & 0x00ff0000) >> 0x10); + } + return 0; + } + + private int ValueSizeCore(object value) + { // V1.2.3300 + if (!ADP.IsNull(value)) + { + string svalue = (value as string); + if (null != svalue) + { + return svalue.Length; + } + byte[] bvalue = (value as byte[]); + if (null != bvalue) + { + return bvalue.Length; + } + char[] cvalue = (value as char[]); + if (null != cvalue) + { + return cvalue.Length; + } + if ((value is byte) || (value is char)) + { + return 1; + } + } + return 0; + } + } +} + diff --git a/src/System.Data.OleDb/src/DbPropSet.cs b/src/System.Data.OleDb/src/DbPropSet.cs new file mode 100644 index 000000000000..df7da6d43f63 --- /dev/null +++ b/src/System.Data.OleDb/src/DbPropSet.cs @@ -0,0 +1,280 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Data.Common; +using System.Diagnostics; +using System.Globalization; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +namespace System.Data.OleDb +{ + sealed internal class DBPropSet : SafeHandle + { + private readonly Int32 propertySetCount; + + // stores the exception with last error.HRESULT from IDBProperties.GetProperties + private Exception lastErrorFromProvider; + + private DBPropSet() : base(IntPtr.Zero, true) + { + propertySetCount = 0; + } + + internal DBPropSet(int propertysetCount) : this() + { + this.propertySetCount = propertysetCount; + IntPtr countOfBytes = (IntPtr)(propertysetCount * ODB.SizeOf_tagDBPROPSET); + RuntimeHelpers.PrepareConstrainedRegions(); + try + { } + finally + { + base.handle = SafeNativeMethods.CoTaskMemAlloc(countOfBytes); + if (ADP.PtrZero != base.handle) + { + SafeNativeMethods.ZeroMemory(base.handle, (int)countOfBytes); + } + } + if (ADP.PtrZero == base.handle) + { + throw new OutOfMemoryException(); + } + } + + internal DBPropSet(UnsafeNativeMethods.IDBProperties properties, PropertyIDSet propidset, out OleDbHResult hr) : this() + { + Debug.Assert(null != properties, "null IDBProperties"); + + int propidsetcount = 0; + if (null != propidset) + { + propidsetcount = propidset.Count; + } + hr = properties.GetProperties(propidsetcount, propidset, out this.propertySetCount, out base.handle); + + if (hr < 0) + { + // remember the last HRESULT. Note we do not want to raise exception now to avoid breaking change from Orcas RTM/SP1 + SetLastErrorInfo(hr); + } + } + + internal DBPropSet(UnsafeNativeMethods.IRowsetInfo properties, PropertyIDSet propidset, out OleDbHResult hr) : this() + { + Debug.Assert(null != properties, "null IRowsetInfo"); + + int propidsetcount = 0; + if (null != propidset) + { + propidsetcount = propidset.Count; + } + hr = properties.GetProperties(propidsetcount, propidset, out this.propertySetCount, out base.handle); + + if (hr < 0) + { + // remember the last HRESULT. Note we do not want to raise exception now to avoid breaking change from Orcas RTM/SP1 + SetLastErrorInfo(hr); + } + } + + internal DBPropSet(UnsafeNativeMethods.ICommandProperties properties, PropertyIDSet propidset, out OleDbHResult hr) : this() + { + Debug.Assert(null != properties, "null ICommandProperties"); + + int propidsetcount = 0; + if (null != propidset) + { + propidsetcount = propidset.Count; + } + hr = properties.GetProperties(propidsetcount, propidset, out this.propertySetCount, out base.handle); + + if (hr < 0) + { + // remember the last HRESULT. Note we do not want to raise exception now to avoid breaking change from Orcas RTM/SP1 + SetLastErrorInfo(hr); + } + } + + private void SetLastErrorInfo(OleDbHResult lastErrorHr) + { + // note: OleDbHResult is actually a simple wrapper over HRESULT with OLEDB-specific codes + UnsafeNativeMethods.IErrorInfo errorInfo = null; + string message = String.Empty; + + OleDbHResult errorInfoHr = UnsafeNativeMethods.GetErrorInfo(0, out errorInfo); // 0 - IErrorInfo exists, 1 - no IErrorInfo + if ((errorInfoHr == OleDbHResult.S_OK) && (errorInfo != null)) + { + ODB.GetErrorDescription(errorInfo, lastErrorHr, out message); + // note that either GetErrorInfo or GetErrorDescription might fail in which case we will have only the HRESULT value in exception message + } + lastErrorFromProvider = new COMException(message, (int)lastErrorHr); + } + + public override bool IsInvalid + { + get + { + return (IntPtr.Zero == base.handle); + } + } + + override protected bool ReleaseHandle() + { + // NOTE: The SafeHandle class guarantees this will be called exactly once and is non-interrutible. + IntPtr ptr = base.handle; + base.handle = IntPtr.Zero; + if (ADP.PtrZero != ptr) + { + int count = this.propertySetCount; + for (int i = 0, offset = 0; i < count; ++i, offset += ODB.SizeOf_tagDBPROPSET) + { + IntPtr rgProperties = Marshal.ReadIntPtr(ptr, offset); + if (ADP.PtrZero != rgProperties) + { + int cProperties = Marshal.ReadInt32(ptr, offset + ADP.PtrSize); + + IntPtr vptr = ADP.IntPtrOffset(rgProperties, ODB.OffsetOf_tagDBPROP_Value); + for (int k = 0; k < cProperties; ++k, vptr = ADP.IntPtrOffset(vptr, ODB.SizeOf_tagDBPROP)) + { + SafeNativeMethods.VariantClear(vptr); + } + SafeNativeMethods.CoTaskMemFree(rgProperties); + } + } + SafeNativeMethods.CoTaskMemFree(ptr); + } + return true; + } + + internal int PropertySetCount + { + get + { + return this.propertySetCount; + } + } + + internal tagDBPROP[] GetPropertySet(int index, out Guid propertyset) + { + if ((index < 0) || (PropertySetCount <= index)) + { + if (lastErrorFromProvider != null) + { + // add extra error information for CSS/stress troubleshooting. + // We need to keep same exception type to avoid breaking change with Orcas RTM/SP1. + throw ADP.InternalError(ADP.InternalErrorCode.InvalidBuffer, lastErrorFromProvider); + } + else + { + throw ADP.InternalError(ADP.InternalErrorCode.InvalidBuffer); + } + } + + tagDBPROPSET propset = new tagDBPROPSET(); + tagDBPROP[] properties = null; + + bool mustRelease = false; + RuntimeHelpers.PrepareConstrainedRegions(); + try + { + DangerousAddRef(ref mustRelease); + IntPtr propertySetPtr = ADP.IntPtrOffset(DangerousGetHandle(), index * ODB.SizeOf_tagDBPROPSET); + Marshal.PtrToStructure(propertySetPtr, propset); + propertyset = propset.guidPropertySet; + + properties = new tagDBPROP[propset.cProperties]; + for (int i = 0; i < properties.Length; ++i) + { + properties[i] = new tagDBPROP(); + IntPtr ptr = ADP.IntPtrOffset(propset.rgProperties, i * ODB.SizeOf_tagDBPROP); + Marshal.PtrToStructure(ptr, properties[i]); + } + } + finally + { + if (mustRelease) + { + DangerousRelease(); + } + } + return properties; + } + + internal void SetPropertySet(int index, Guid propertySet, tagDBPROP[] properties) + { + if ((index < 0) || (PropertySetCount <= index)) + { + if (lastErrorFromProvider != null) + { + // add extra error information for CSS/stress troubleshooting. + // We need to keep same exception type to avoid breaking change with Orcas RTM/SP1. + throw ADP.InternalError(ADP.InternalErrorCode.InvalidBuffer, lastErrorFromProvider); + } + else + { + throw ADP.InternalError(ADP.InternalErrorCode.InvalidBuffer); + } + } + Debug.Assert(Guid.Empty != propertySet, "invalid propertySet"); + Debug.Assert((null != properties) && (0 < properties.Length), "invalid properties"); + + IntPtr countOfBytes = (IntPtr)(properties.Length * ODB.SizeOf_tagDBPROP); + tagDBPROPSET propset = new tagDBPROPSET(properties.Length, propertySet); + + bool mustRelease = false; + RuntimeHelpers.PrepareConstrainedRegions(); + try + { + DangerousAddRef(ref mustRelease); + + IntPtr propsetPtr = ADP.IntPtrOffset(DangerousGetHandle(), index * ODB.SizeOf_tagDBPROPSET); + + RuntimeHelpers.PrepareConstrainedRegions(); + try + { } + finally + { + // must allocate and clear the memory without interruption + propset.rgProperties = SafeNativeMethods.CoTaskMemAlloc(countOfBytes); + if (ADP.PtrZero != propset.rgProperties) + { + // clearing is important so that we don't treat existing + // garbage as important information during releaseHandle + SafeNativeMethods.ZeroMemory(propset.rgProperties, (int)countOfBytes); + + // writing the structure to native memory so that it knows to free the referenced pointers + Marshal.StructureToPtr(propset, propsetPtr, false/*deleteold*/); + } + } + if (ADP.PtrZero == propset.rgProperties) + { + throw new OutOfMemoryException(); + } + + for (int i = 0; i < properties.Length; ++i) + { + Debug.Assert(null != properties[i], "null tagDBPROP " + i.ToString(CultureInfo.InvariantCulture)); + IntPtr propertyPtr = ADP.IntPtrOffset(propset.rgProperties, i * ODB.SizeOf_tagDBPROP); + Marshal.StructureToPtr(properties[i], propertyPtr, false/*deleteold*/); + } + } + finally + { + if (mustRelease) + { + DangerousRelease(); + } + } + } + + static internal DBPropSet CreateProperty(Guid propertySet, int propertyId, bool required, object value) + { + tagDBPROP dbprop = new tagDBPROP(propertyId, required, value); + DBPropSet propertyset = new DBPropSet(1); + propertyset.SetPropertySet(0, propertySet, new tagDBPROP[1] { dbprop }); + return propertyset; + } + } +} diff --git a/src/System.Data.OleDb/src/NativeMethods.cs b/src/System.Data.OleDb/src/NativeMethods.cs new file mode 100644 index 000000000000..02d113dd9771 --- /dev/null +++ b/src/System.Data.OleDb/src/NativeMethods.cs @@ -0,0 +1,114 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Runtime.InteropServices; + +namespace System.Data.Common +{ + internal static class NativeMethods + { + [Guid("0c733a1e-2a1c-11ce-ade5-00aa0044773d"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown), ComImport] + internal interface ISourcesRowset + { + [PreserveSig] + System.Data.OleDb.OleDbHResult GetSourcesRowset( + [In] IntPtr pUnkOuter, + [In, MarshalAs(UnmanagedType.LPStruct)] Guid riid, + [In] int cPropertySets, + [In] IntPtr rgProperties, + [Out, MarshalAs(UnmanagedType.Interface)] out object ppRowset); + } + + [Guid("0C733A5E-2A1C-11CE-ADE5-00AA0044773D"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown), ComImport] + internal interface ITransactionJoin + { + [Obsolete("not used", true)] + [PreserveSig] + int GetOptionsObject( + /*deleted parameter signature*/); + + void JoinTransaction( + [In, MarshalAs(UnmanagedType.Interface)] object punkTransactionCoord, + [In] Int32 isoLevel, + [In] Int32 isoFlags, + [In] IntPtr pOtherOptions); + } + + [DllImport(Interop.Libraries.Kernel32, ExactSpelling = true, CharSet = System.Runtime.InteropServices.CharSet.Auto)] + static internal extern IntPtr MapViewOfFile(IntPtr hFileMappingObject, int dwDesiredAccess, int dwFileOffsetHigh, int dwFileOffsetLow, IntPtr dwNumberOfBytesToMap); + + // OpenFileMappingA contains a security venerability, in the unicode->ansi conversion + // Its possible to spoof the directory and construct ../ sequeences, See FxCop Warrning + // Specify marshaling for pinvoke string arguments + [DllImport(Interop.Libraries.Kernel32, CharSet = System.Runtime.InteropServices.CharSet.Ansi, BestFitMapping = false, ThrowOnUnmappableChar = true)] + // [DllImport(Interop.Libraries.Kernel32, CharSet=System.Runtime.InteropServices.CharSet.Ansi)] + static internal extern IntPtr OpenFileMappingA(int dwDesiredAccess, bool bInheritHandle, [MarshalAs(UnmanagedType.LPStr)] string lpName); + + // CreateFileMappingA contains a security venerability, in the unicode->ansi conversion + // Its possible to spoof the directory and construct ../ sequeences, See FxCop Warrning + // Specify marshaling for pinvoke string arguments + [DllImport(Interop.Libraries.Kernel32, CharSet = System.Runtime.InteropServices.CharSet.Ansi, BestFitMapping = false, ThrowOnUnmappableChar = true)] + // [DllImport(Interop.Libraries.Kernel32, CharSet=System.Runtime.InteropServices.CharSet.Ansi)] + static internal extern IntPtr CreateFileMappingA(IntPtr hFile, IntPtr pAttr, int flProtect, int dwMaximumSizeHigh, int dwMaximumSizeLow, [MarshalAs(UnmanagedType.LPStr)] string lpName); + + [DllImport(Interop.Libraries.Kernel32, ExactSpelling = true, CharSet = System.Runtime.InteropServices.CharSet.Auto)] + static internal extern bool UnmapViewOfFile(IntPtr lpBaseAddress); + + [DllImport(Interop.Libraries.Kernel32, ExactSpelling = true, CharSet = System.Runtime.InteropServices.CharSet.Auto, SetLastError = true)] + static internal extern bool CloseHandle(IntPtr handle); + + [DllImport(Interop.Libraries.Advapi32, ExactSpelling = true, CharSet = System.Runtime.InteropServices.CharSet.Auto, SetLastError = true)] + static internal extern bool AllocateAndInitializeSid( + IntPtr pIdentifierAuthority, // authority + byte nSubAuthorityCount, // count of subauthorities + int dwSubAuthority0, // subauthority 0 + int dwSubAuthority1, // subauthority 1 + int dwSubAuthority2, // subauthority 2 + int dwSubAuthority3, // subauthority 3 + int dwSubAuthority4, // subauthority 4 + int dwSubAuthority5, // subauthority 5 + int dwSubAuthority6, // subauthority 6 + int dwSubAuthority7, // subauthority 7 + ref IntPtr pSid); // SID + + [DllImport(Interop.Libraries.Advapi32, ExactSpelling = true, CharSet = System.Runtime.InteropServices.CharSet.Auto, SetLastError = true)] + static internal extern int GetLengthSid( + IntPtr pSid); // SID to query + + [DllImport(Interop.Libraries.Advapi32, ExactSpelling = true, CharSet = System.Runtime.InteropServices.CharSet.Auto, SetLastError = true)] + static internal extern bool InitializeAcl( + IntPtr pAcl, // ACL + int nAclLength, // size of ACL + int dwAclRevision); // revision level of ACL + + [DllImport(Interop.Libraries.Advapi32, ExactSpelling = true, CharSet = System.Runtime.InteropServices.CharSet.Auto, SetLastError = true)] + static internal extern bool AddAccessDeniedAce( + IntPtr pAcl, // access control list + int dwAceRevision, // ACL revision level + int AccessMask, // access mask + IntPtr pSid); // security identifier + + [DllImport(Interop.Libraries.Advapi32, ExactSpelling = true, CharSet = System.Runtime.InteropServices.CharSet.Auto, SetLastError = true)] + static internal extern bool AddAccessAllowedAce( + IntPtr pAcl, // access control list + int dwAceRevision, // ACL revision level + uint AccessMask, // access mask + IntPtr pSid); // security identifier + + [DllImport(Interop.Libraries.Advapi32, ExactSpelling = true, CharSet = System.Runtime.InteropServices.CharSet.Auto, SetLastError = true)] + static internal extern bool InitializeSecurityDescriptor( + IntPtr pSecurityDescriptor, // SD + int dwRevision); // revision level + [DllImport(Interop.Libraries.Advapi32, ExactSpelling = true, CharSet = System.Runtime.InteropServices.CharSet.Auto, SetLastError = true)] + static internal extern bool SetSecurityDescriptorDacl( + IntPtr pSecurityDescriptor, // SD + bool bDaclPresent, // DACL presence + IntPtr pDacl, // DACL + bool bDaclDefaulted); // default DACL + + [DllImport(Interop.Libraries.Advapi32, ExactSpelling = true, CharSet = System.Runtime.InteropServices.CharSet.Auto, SetLastError = true)] + static internal extern IntPtr FreeSid( + IntPtr pSid); // SID to free + } +} diff --git a/src/System.Data.OleDb/src/OleDbCommand.cs b/src/System.Data.OleDb/src/OleDbCommand.cs new file mode 100644 index 000000000000..192c09ec2acf --- /dev/null +++ b/src/System.Data.OleDb/src/OleDbCommand.cs @@ -0,0 +1,1370 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.ComponentModel; +using System.Data.Common; +using System.Diagnostics; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Text; +using System.Threading; + +namespace System.Data.OleDb +{ + public sealed class OleDbCommand : DbCommand, ICloneable, IDbCommand + { + // command data + private string _commandText; + private CommandType _commandType; + private int _commandTimeout = ADP.DefaultCommandTimeout; + private UpdateRowSource _updatedRowSource = UpdateRowSource.Both; + private bool _designTimeInvisible; + private OleDbConnection _connection; + private OleDbTransaction _transaction; + + private OleDbParameterCollection _parameters; + + // native information + private UnsafeNativeMethods.ICommandText _icommandText; + + // if executing with a different CommandBehavior.KeyInfo behavior + // original ICommandText must be released and a new ICommandText generated + private CommandBehavior commandBehavior; + + private Bindings _dbBindings; + + internal bool canceling; + private bool _isPrepared; + private bool _executeQuery; + private bool _trackingForClose; + private bool _hasDataReader; + + private IntPtr _recordsAffected; + private int _changeID; + private int _lastChangeID; + + public OleDbCommand() : base() + { + GC.SuppressFinalize(this); + } + + public OleDbCommand(string cmdText) : this() + { + CommandText = cmdText; + } + + public OleDbCommand(string cmdText, OleDbConnection connection) : this() + { + CommandText = cmdText; + Connection = connection; + } + + public OleDbCommand(string cmdText, OleDbConnection connection, OleDbTransaction transaction) : this() + { + CommandText = cmdText; + Connection = connection; + Transaction = transaction; + } + + private OleDbCommand(OleDbCommand from) : this() + { // Clone + CommandText = from.CommandText; + CommandTimeout = from.CommandTimeout; + CommandType = from.CommandType; + Connection = from.Connection; + DesignTimeVisible = from.DesignTimeVisible; + UpdatedRowSource = from.UpdatedRowSource; + Transaction = from.Transaction; + + OleDbParameterCollection parameters = Parameters; + foreach (object parameter in from.Parameters) + { + parameters.Add((parameter is ICloneable) ? (parameter as ICloneable).Clone() : parameter); + } + } + + private Bindings ParameterBindings + { + get + { + return _dbBindings; + } + set + { + Bindings bindings = _dbBindings; + _dbBindings = value; + if ((null != bindings) && (value != bindings)) + { + bindings.Dispose(); + } + } + } + + [DefaultValue("")] + [RefreshProperties(RefreshProperties.All)] + override public string CommandText + { + get + { + string value = _commandText; + return ((null != value) ? value : string.Empty); + } + set + { + if (0 != ADP.SrcCompare(_commandText, value)) + { + PropertyChanging(); + _commandText = value; + } + } + } + + override public int CommandTimeout + { // V1.2.3300, XXXCommand V1.0.5000 + get + { + return _commandTimeout; + } + set + { + if (value < 0) + { + throw ADP.InvalidCommandTimeout(value); + } + if (value != _commandTimeout) + { + PropertyChanging(); + _commandTimeout = value; + } + } + } + + public void ResetCommandTimeout() + { // V1.2.3300 + if (ADP.DefaultCommandTimeout != _commandTimeout) + { + PropertyChanging(); + _commandTimeout = ADP.DefaultCommandTimeout; + } + } + + [DefaultValue(System.Data.CommandType.Text)] + [RefreshProperties(RefreshProperties.All)] + override public CommandType CommandType + { + get + { + CommandType cmdType = _commandType; + return ((0 != cmdType) ? cmdType : CommandType.Text); + } + set + { + switch (value) + { // @perfnote: Enum.IsDefined + case CommandType.Text: + case CommandType.StoredProcedure: + case CommandType.TableDirect: + PropertyChanging(); + _commandType = value; + break; + default: + throw ADP.InvalidCommandType(value); + } + } + } + + [DefaultValue(null)] + new public OleDbConnection Connection + { + get + { + return _connection; + } + set + { + OleDbConnection connection = _connection; + if (value != connection) + { + PropertyChanging(); + ResetConnection(); + + _connection = value; + + if (null != value) + { + _transaction = OleDbTransaction.TransactionUpdate(_transaction); + } + } + } + } + + private void ResetConnection() + { + OleDbConnection connection = _connection; + if (null != connection) + { + PropertyChanging(); + CloseInternal(); + if (_trackingForClose) + { + connection.RemoveWeakReference(this); + _trackingForClose = false; + } + } + _connection = null; + } + + override protected DbConnection DbConnection + { // V1.2.3300 + get + { + return Connection; + } + set + { + Connection = (OleDbConnection)value; + } + } + + override protected DbParameterCollection DbParameterCollection + { // V1.2.3300 + get + { + return Parameters; + } + } + + override protected DbTransaction DbTransaction + { // V1.2.3300 + get + { + return Transaction; + } + set + { + Transaction = (OleDbTransaction)value; + } + } + + // @devnote: By default, the cmd object is visible on the design surface (i.e. VS7 Server Tray) + // to limit the number of components that clutter the design surface, + // when the DataAdapter design wizard generates the insert/update/delete commands it will + // set the DesignTimeVisible property to false so that cmds won't appear as individual objects + [ + DefaultValue(true), + DesignOnly(true), + Browsable(false), + EditorBrowsable(EditorBrowsableState.Never), + ] + public override bool DesignTimeVisible + { // V1.2.3300, XXXCommand V1.0.5000 + get + { + return !_designTimeInvisible; + } + set + { + _designTimeInvisible = !value; + TypeDescriptor.Refresh(this); + } + } + + [ + DesignerSerializationVisibility(DesignerSerializationVisibility.Content) + ] + new public OleDbParameterCollection Parameters + { + get + { + OleDbParameterCollection value = _parameters; + if (null == value) + { + // delay the creation of the OleDbParameterCollection + // until user actually uses the Parameters property + value = new OleDbParameterCollection(); + _parameters = value; + } + return value; + } + } + + private bool HasParameters() + { + OleDbParameterCollection value = _parameters; + return (null != value) && (0 < value.Count); + } + + [ + Browsable(false), + DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden), + ] + new public OleDbTransaction Transaction + { + get + { + // find the last non-zombied local transaction object, but not transactions + // that may have been started after the current local transaction + OleDbTransaction transaction = _transaction; + while ((null != transaction) && (null == transaction.Connection)) + { + transaction = transaction.Parent; + _transaction = transaction; + } + return transaction; + } + set + { + _transaction = value; + } + } + + [ + DefaultValue(System.Data.UpdateRowSource.Both) + ] + override public UpdateRowSource UpdatedRowSource + { // V1.2.3300, XXXCommand V1.0.5000 + get + { + return _updatedRowSource; + } + set + { + switch (value) + { // @perfnote: Enum.IsDefined + case UpdateRowSource.None: + case UpdateRowSource.OutputParameters: + case UpdateRowSource.FirstReturnedRecord: + case UpdateRowSource.Both: + _updatedRowSource = value; + break; + default: + throw ADP.InvalidUpdateRowSource(value); + } + } + } + + // required interface, safe cast + private UnsafeNativeMethods.IAccessor IAccessor() + { + Debug.Assert(null != _icommandText, "IAccessor: null ICommandText"); + return (UnsafeNativeMethods.IAccessor)_icommandText; + } + + // required interface, safe cast + internal UnsafeNativeMethods.ICommandProperties ICommandProperties() + { + Debug.Assert(null != _icommandText, "ICommandProperties: null ICommandText"); + return (UnsafeNativeMethods.ICommandProperties)_icommandText; + } + + // optional interface, unsafe cast + private UnsafeNativeMethods.ICommandPrepare ICommandPrepare() + { + Debug.Assert(null != _icommandText, "ICommandPrepare: null ICommandText"); + return (_icommandText as UnsafeNativeMethods.ICommandPrepare); + } + + // optional interface, unsafe cast + private UnsafeNativeMethods.ICommandWithParameters ICommandWithParameters() + { + Debug.Assert(null != _icommandText, "ICommandWithParameters: null ICommandText"); + UnsafeNativeMethods.ICommandWithParameters value = (_icommandText as UnsafeNativeMethods.ICommandWithParameters); + if (null == value) + { + throw ODB.NoProviderSupportForParameters(_connection.Provider, (Exception)null); + } + return value; + } + + private void CreateAccessor() + { + Debug.Assert(System.Data.CommandType.Text == CommandType || System.Data.CommandType.StoredProcedure == CommandType, "CreateAccessor: incorrect CommandType"); + Debug.Assert(null == _dbBindings, "CreateAccessor: already has dbBindings"); + Debug.Assert(HasParameters(), "CreateAccessor: unexpected, no parameter collection"); + + // do this first in-case the command doesn't support parameters + UnsafeNativeMethods.ICommandWithParameters commandWithParameters = ICommandWithParameters(); + + OleDbParameterCollection collection = _parameters; + OleDbParameter[] parameters = new OleDbParameter[collection.Count]; + collection.CopyTo(parameters, 0); + + // _dbBindings is used as a switch during ExecuteCommand, so don't set it until everything okay + Bindings bindings = new Bindings(parameters, collection.ChangeID); + + for (int i = 0; i < parameters.Length; ++i) + { + bindings.ForceRebind |= parameters[i].BindParameter(i, bindings); + } + + bindings.AllocateForAccessor(null, 0, 0); + + ApplyParameterBindings(commandWithParameters, bindings.BindInfo); + + UnsafeNativeMethods.IAccessor iaccessor = IAccessor(); + OleDbHResult hr = bindings.CreateAccessor(iaccessor, ODB.DBACCESSOR_PARAMETERDATA); + if (hr < 0) + { + ProcessResults(hr); + } + _dbBindings = bindings; + } + + private void ApplyParameterBindings(UnsafeNativeMethods.ICommandWithParameters commandWithParameters, tagDBPARAMBINDINFO[] bindInfo) + { + IntPtr[] ordinals = new IntPtr[bindInfo.Length]; + for (int i = 0; i < ordinals.Length; ++i) + { + ordinals[i] = (IntPtr)(i + 1); + } + OleDbHResult hr = commandWithParameters.SetParameterInfo((IntPtr)bindInfo.Length, ordinals, bindInfo); + + if (hr < 0) + { + ProcessResults(hr); + } + } + + override public void Cancel() + { + unchecked + { _changeID++; } + + UnsafeNativeMethods.ICommandText icmdtxt = _icommandText; + if (null != icmdtxt) + { + OleDbHResult hr = OleDbHResult.S_OK; + + lock (icmdtxt) + { + // lock the object to avoid race conditions between using the object and releasing the object + // after we acquire the lock, if the class has moved on don't actually call Cancel + if (icmdtxt == _icommandText) + { + hr = icmdtxt.Cancel(); + } + } + if (OleDbHResult.DB_E_CANTCANCEL != hr) + { + // if the provider can't cancel the command - don't cancel the DataReader + this.canceling = true; + } + + // since cancel is allowed to occur at anytime we can't check the connection status + // since if it returns as closed then the connection will close causing the reader to close + // and that would introduce the possilbility of one thread reading and one thread closing at the same time + ProcessResultsNoReset(hr); + } + else + { + this.canceling = true; + } + } + + public OleDbCommand Clone() + { + OleDbCommand clone = new OleDbCommand(this); + return clone; + } + + object ICloneable.Clone() + { + return Clone(); + } + + // Connection.Close & Connection.Dispose(true) notification + internal void CloseCommandFromConnection(bool canceling) + { + this.canceling = canceling; + CloseInternal(); + _trackingForClose = false; + _transaction = null; + //GC.SuppressFinalize(this); + } + + internal void CloseInternal() + { + Debug.Assert(null != _connection, "no connection, CloseInternal"); + CloseInternalParameters(); + CloseInternalCommand(); + } + + // may be called from either + // OleDbDataReader.Close/Dispose + // via OleDbCommand.Dispose or OleDbConnection.Close + internal void CloseFromDataReader(Bindings bindings) + { + if (null != bindings) + { + if (canceling) + { + bindings.Dispose(); + Debug.Assert(_dbBindings == bindings, "bindings with two owners"); + } + else + { + bindings.ApplyOutputParameters(); + ParameterBindings = bindings; + } + } + _hasDataReader = false; + } + + private void CloseInternalCommand() + { + unchecked + { _changeID++; } + this.commandBehavior = CommandBehavior.Default; + _isPrepared = false; + + UnsafeNativeMethods.ICommandText ict = Interlocked.Exchange(ref _icommandText, null); + if (null != ict) + { + lock (ict) + { + // lock the object to avoid race conditions between using the object and releasing the object + Marshal.ReleaseComObject(ict); + } + } + } + private void CloseInternalParameters() + { + Debug.Assert(null != _connection, "no connection, CloseInternalParameters"); + Bindings bindings = _dbBindings; + _dbBindings = null; + if (null != bindings) + { + bindings.Dispose(); + } + } + + new public OleDbParameter CreateParameter() + { + return new OleDbParameter(); + } + + override protected DbParameter CreateDbParameter() + { + return CreateParameter(); + } + + override protected void Dispose(bool disposing) + { + if (disposing) + { // release mananged objects + // the DataReader takes ownership of the parameter Bindings + // this way they don't get destroyed when user calls OleDbCommand.Dispose + // when there is an open DataReader + + unchecked + { _changeID++; } + + // in V1.0, V1.1 the Connection,Parameters,CommandText,Transaction where reset + ResetConnection(); + _transaction = null; + _parameters = null; + CommandText = null; + } + // release unmanaged objects + base.Dispose(disposing); // notify base classes + } + + new public OleDbDataReader ExecuteReader() + { + return ExecuteReader(CommandBehavior.Default); + } + + IDataReader IDbCommand.ExecuteReader() + { + return ExecuteReader(CommandBehavior.Default); + } + + new public OleDbDataReader ExecuteReader(CommandBehavior behavior) + { + _executeQuery = true; + return ExecuteReaderInternal(behavior, ADP.ExecuteReader); + } + + IDataReader IDbCommand.ExecuteReader(CommandBehavior behavior) + { + return ExecuteReader(behavior); + } + + override protected DbDataReader ExecuteDbDataReader(CommandBehavior behavior) + { + return ExecuteReader(behavior); + } + + private OleDbDataReader ExecuteReaderInternal(CommandBehavior behavior, string method) + { + OleDbDataReader dataReader = null; + OleDbException nextResultsFailure = null; + int state = ODB.InternalStateClosed; + try + { + ValidateConnectionAndTransaction(method); + + if (0 != (CommandBehavior.SingleRow & behavior)) + { + // CommandBehavior.SingleRow implies CommandBehavior.SingleResult + behavior |= CommandBehavior.SingleResult; + } + + object executeResult; + int resultType; + + switch (CommandType) + { + case 0: // uninitialized CommandType.Text + case CommandType.Text: + case CommandType.StoredProcedure: + resultType = ExecuteCommand(behavior, out executeResult); + break; + + case CommandType.TableDirect: + resultType = ExecuteTableDirect(behavior, out executeResult); + break; + + default: + throw ADP.InvalidCommandType(CommandType); + } + + if (_executeQuery) + { + try + { + dataReader = new OleDbDataReader(_connection, this, 0, this.commandBehavior); + + switch (resultType) + { + case ODB.ExecutedIMultipleResults: + dataReader.InitializeIMultipleResults(executeResult); + dataReader.NextResult(); + break; + case ODB.ExecutedIRowset: + dataReader.InitializeIRowset(executeResult, ChapterHandle.DB_NULL_HCHAPTER, _recordsAffected); + dataReader.BuildMetaInfo(); + dataReader.HasRowsRead(); + break; + case ODB.ExecutedIRow: + dataReader.InitializeIRow(executeResult, _recordsAffected); + dataReader.BuildMetaInfo(); + break; + case ODB.PrepareICommandText: + if (!_isPrepared) + { + PrepareCommandText(2); + } + OleDbDataReader.GenerateSchemaTable(dataReader, _icommandText, behavior); + break; + default: + Debug.Assert(false, "ExecuteReaderInternal: unknown result type"); + break; + } + executeResult = null; + _hasDataReader = true; + _connection.AddWeakReference(dataReader, OleDbReferenceCollection.DataReaderTag); + + // command stays in the executing state until the connection + // has a datareader to track for it being closed + state = ODB.InternalStateOpen; + } + finally + { + if (ODB.InternalStateOpen != state) + { + this.canceling = true; + if (null != dataReader) + { + ((IDisposable)dataReader).Dispose(); + dataReader = null; + } + } + } + Debug.Assert(null != dataReader, "ExecuteReader should never return a null DataReader"); + } + else + { // optimized code path for ExecuteNonQuery to not create a OleDbDataReader object + try + { + if (ODB.ExecutedIMultipleResults == resultType) + { + UnsafeNativeMethods.IMultipleResults multipleResults = (UnsafeNativeMethods.IMultipleResults)executeResult; + + // may cause a Connection.ResetState which closes connection + nextResultsFailure = OleDbDataReader.NextResults(multipleResults, _connection, this, out _recordsAffected); + } + } + finally + { + try + { + if (null != executeResult) + { + Marshal.ReleaseComObject(executeResult); + executeResult = null; + } + CloseFromDataReader(ParameterBindings); + } + catch (Exception e) + { + // UNDONE - should not be catching all exceptions!!! + if (!ADP.IsCatchableExceptionType(e)) + { + throw; + } + if (null != nextResultsFailure) + { + nextResultsFailure = new OleDbException(nextResultsFailure, e); + } + else + { + throw; + } + } + } + } + } + finally + { // finally clear executing state + try + { + if ((null == dataReader) && (ODB.InternalStateOpen != state)) + { + ParameterCleanup(); + } + } + catch (Exception e) + { + // UNDONE - should not be catching all exceptions!!! + if (!ADP.IsCatchableExceptionType(e)) + { + throw; + } + if (null != nextResultsFailure) + { + nextResultsFailure = new OleDbException(nextResultsFailure, e); + } + else + { + throw; + } + } + if (null != nextResultsFailure) + { + throw nextResultsFailure; + } + } + return dataReader; + } + + private int ExecuteCommand(CommandBehavior behavior, out object executeResult) + { + if (InitializeCommand(behavior, false)) + { + if (0 != (CommandBehavior.SchemaOnly & this.commandBehavior)) + { + executeResult = null; + return ODB.PrepareICommandText; + } + return ExecuteCommandText(out executeResult); + } + return ExecuteTableDirect(behavior, out executeResult); + } + + // dbindings handle can't be freed until the output parameters + // have been filled in which occurs after the last rowset is released + // dbbindings.FreeDataHandle occurs in Cloe + private int ExecuteCommandText(out object executeResult) + { + int retcode; + tagDBPARAMS dbParams = null; + RowBinding rowbinding = null; + Bindings bindings = ParameterBindings; + bool mustRelease = false; + + RuntimeHelpers.PrepareConstrainedRegions(); + try + { + if (null != bindings) + { // parameters may be suppressed + rowbinding = bindings.RowBinding(); + + rowbinding.DangerousAddRef(ref mustRelease); + + // bindings can't be released until after last rowset is released + // that is when output parameters are populated + // initialize the input parameters to the input databuffer + bindings.ApplyInputParameters(); + + dbParams = new tagDBPARAMS(); + dbParams.pData = rowbinding.DangerousGetDataPtr(); + dbParams.cParamSets = 1; + dbParams.hAccessor = rowbinding.DangerousGetAccessorHandle(); + } + if ((0 == (CommandBehavior.SingleResult & this.commandBehavior)) && _connection.SupportMultipleResults()) + { + retcode = ExecuteCommandTextForMultpleResults(dbParams, out executeResult); + } + else if (0 == (CommandBehavior.SingleRow & this.commandBehavior) || !_executeQuery) + { + retcode = ExecuteCommandTextForSingleResult(dbParams, out executeResult); + } + else + { + retcode = ExecuteCommandTextForSingleRow(dbParams, out executeResult); + } + } + finally + { + if (mustRelease) + { + rowbinding.DangerousRelease(); + } + } + return retcode; + } + + private int ExecuteCommandTextForMultpleResults(tagDBPARAMS dbParams, out object executeResult) + { + Debug.Assert(0 == (CommandBehavior.SingleRow & this.commandBehavior), "SingleRow implies SingleResult"); + OleDbHResult hr; + hr = _icommandText.Execute(ADP.PtrZero, ref ODB.IID_IMultipleResults, dbParams, out _recordsAffected, out executeResult); + + if (OleDbHResult.E_NOINTERFACE != hr) + { + ExecuteCommandTextErrorHandling(hr); + return ODB.ExecutedIMultipleResults; + } + SafeNativeMethods.Wrapper.ClearErrorInfo(); + return ExecuteCommandTextForSingleResult(dbParams, out executeResult); + } + + private int ExecuteCommandTextForSingleResult(tagDBPARAMS dbParams, out object executeResult) + { + OleDbHResult hr; + + // (Microsoft.Jet.OLEDB.4.0 returns 0 for recordsAffected instead of -1) + if (_executeQuery) + { + hr = _icommandText.Execute(ADP.PtrZero, ref ODB.IID_IRowset, dbParams, out _recordsAffected, out executeResult); + } + else + { + hr = _icommandText.Execute(ADP.PtrZero, ref ODB.IID_NULL, dbParams, out _recordsAffected, out executeResult); + } + ExecuteCommandTextErrorHandling(hr); + return ODB.ExecutedIRowset; + } + + private int ExecuteCommandTextForSingleRow(tagDBPARAMS dbParams, out object executeResult) + { + Debug.Assert(_executeQuery, "ExecuteNonQuery should always use ExecuteCommandTextForSingleResult"); + + if (_connection.SupportIRow(this)) + { + OleDbHResult hr; + hr = _icommandText.Execute(ADP.PtrZero, ref ODB.IID_IRow, dbParams, out _recordsAffected, out executeResult); + + if (OleDbHResult.DB_E_NOTFOUND == hr) + { + SafeNativeMethods.Wrapper.ClearErrorInfo(); + return ODB.ExecutedIRow; + } + else if (OleDbHResult.E_NOINTERFACE != hr) + { + ExecuteCommandTextErrorHandling(hr); + return ODB.ExecutedIRow; + } + } + SafeNativeMethods.Wrapper.ClearErrorInfo(); + return ExecuteCommandTextForSingleResult(dbParams, out executeResult); + } + + private void ExecuteCommandTextErrorHandling(OleDbHResult hr) + { + Exception e = OleDbConnection.ProcessResults(hr, _connection, this); + if (null != e) + { + e = ExecuteCommandTextSpecialErrorHandling(hr, e); + throw e; + } + } + + private Exception ExecuteCommandTextSpecialErrorHandling(OleDbHResult hr, Exception e) + { + if (((OleDbHResult.DB_E_ERRORSOCCURRED == hr) || (OleDbHResult.DB_E_BADBINDINFO == hr)) && (null != _dbBindings)) + { + // + // this code exist to try for a better user error message by post-morten detection + // of invalid parameter types being passed to a provider that doesn't understand + // the user specified parameter OleDbType + + Debug.Assert(null != e, "missing inner exception"); + + StringBuilder builder = new StringBuilder(); + ParameterBindings.ParameterStatus(builder); + e = ODB.CommandParameterStatus(builder.ToString(), e); + } + return e; + } + + override public int ExecuteNonQuery() + { + _executeQuery = false; + ExecuteReaderInternal(CommandBehavior.Default, ADP.ExecuteNonQuery); + return ADP.IntPtrToInt32(_recordsAffected); + } + + override public object ExecuteScalar() + { + object value = null; + _executeQuery = true; + using (OleDbDataReader reader = ExecuteReaderInternal(CommandBehavior.Default, ADP.ExecuteScalar)) + { + if (reader.Read() && (0 < reader.FieldCount)) + { + value = reader.GetValue(0); + } + } + return value; + } + + private int ExecuteTableDirect(CommandBehavior behavior, out object executeResult) + { + this.commandBehavior = behavior; + executeResult = null; + + OleDbHResult hr = OleDbHResult.S_OK; + + StringMemHandle sptr = null; + bool mustReleaseStringHandle = false; + + RuntimeHelpers.PrepareConstrainedRegions(); + try + { + sptr = new StringMemHandle(ExpandCommandText()); + + sptr.DangerousAddRef(ref mustReleaseStringHandle); + + if (mustReleaseStringHandle) + { + tagDBID tableID = new tagDBID(); + tableID.uGuid = Guid.Empty; + tableID.eKind = ODB.DBKIND_NAME; + tableID.ulPropid = sptr.DangerousGetHandle(); + + using (IOpenRowsetWrapper iopenRowset = _connection.IOpenRowset()) + { + using (DBPropSet propSet = CommandPropertySets()) + { + if (null != propSet) + { + bool mustRelease = false; + RuntimeHelpers.PrepareConstrainedRegions(); + try + { + propSet.DangerousAddRef(ref mustRelease); + hr = iopenRowset.Value.OpenRowset(ADP.PtrZero, tableID, ADP.PtrZero, ref ODB.IID_IRowset, propSet.PropertySetCount, propSet.DangerousGetHandle(), out executeResult); + } + finally + { + if (mustRelease) + { + propSet.DangerousRelease(); + } + } + + if (OleDbHResult.DB_E_ERRORSOCCURRED == hr) + { + hr = iopenRowset.Value.OpenRowset(ADP.PtrZero, tableID, ADP.PtrZero, ref ODB.IID_IRowset, 0, IntPtr.Zero, out executeResult); + } + } + else + { + hr = iopenRowset.Value.OpenRowset(ADP.PtrZero, tableID, ADP.PtrZero, ref ODB.IID_IRowset, 0, IntPtr.Zero, out executeResult); + } + } + } + } + } + finally + { + if (mustReleaseStringHandle) + { + sptr.DangerousRelease(); + } + } + ProcessResults(hr); + _recordsAffected = ADP.RecordsUnaffected; + return ODB.ExecutedIRowset; + } + + private string ExpandCommandText() + { + string cmdtxt = CommandText; + if (ADP.IsEmpty(cmdtxt)) + { + return string.Empty; + } + CommandType cmdtype = CommandType; + switch (cmdtype) + { + case System.Data.CommandType.Text: + // do nothing, already expanded by user + return cmdtxt; + + case System.Data.CommandType.StoredProcedure: + // { ? = CALL SPROC (? ?) }, { ? = CALL SPROC }, { CALL SPRC (? ?) }, { CALL SPROC } + return ExpandStoredProcedureToText(cmdtxt); + + case System.Data.CommandType.TableDirect: + // @devnote: Provider=Jolt4.0 doesn't like quoted table names, SQOLEDB requires them + // Providers should not require table names to be quoted and should guarantee that + // unquoted table names correctly open the specified table, even if the table name + // contains special characters, as long as the table can be unambiguously identified + // without quoting. + return cmdtxt; + + default: + throw ADP.InvalidCommandType(cmdtype); + } + } + + private string ExpandOdbcMaximumToText(string sproctext, int parameterCount) + { + StringBuilder builder = new StringBuilder(); + if ((0 < parameterCount) && (ParameterDirection.ReturnValue == Parameters[0].Direction)) + { + parameterCount--; + builder.Append("{ ? = CALL "); + } + else + { + builder.Append("{ CALL "); + } + builder.Append(sproctext); + + switch (parameterCount) + { + case 0: + builder.Append(" }"); + break; + case 1: + builder.Append("( ? ) }"); + break; + default: + builder.Append("( ?, ?"); + for (int i = 2; i < parameterCount; ++i) + { + builder.Append(", ?"); + } + builder.Append(" ) }"); + break; + } + return builder.ToString(); + } + + private string ExpandOdbcMinimumToText(string sproctext, int parameterCount) + { + //if ((0 < parameterCount) && (ParameterDirection.ReturnValue == Parameters[0].Direction)) { + // Debug.Assert("doesn't support ReturnValue parameters"); + //} + StringBuilder builder = new StringBuilder(); + builder.Append("exec "); + builder.Append(sproctext); + if (0 < parameterCount) + { + builder.Append(" ?"); + for (int i = 1; i < parameterCount; ++i) + { + builder.Append(", ?"); + } + } + return builder.ToString(); + } + + private string ExpandStoredProcedureToText(string sproctext) + { + Debug.Assert(null != _connection, "ExpandStoredProcedureToText: null Connection"); + + int parameterCount = (null != _parameters) ? _parameters.Count : 0; + if (0 == (ODB.DBPROPVAL_SQL_ODBC_MINIMUM & _connection.SqlSupport())) + { + return ExpandOdbcMinimumToText(sproctext, parameterCount); + } + return ExpandOdbcMaximumToText(sproctext, parameterCount); + } + + private void ParameterCleanup() + { + Bindings bindings = ParameterBindings; + if (null != bindings) + { + bindings.CleanupBindings(); + } + } + + private bool InitializeCommand(CommandBehavior behavior, bool throwifnotsupported) + { + Debug.Assert(null != _connection, "InitializeCommand: null OleDbConnection"); + + int changeid = _changeID; + if ((0 != (CommandBehavior.KeyInfo & (this.commandBehavior ^ behavior))) || (_lastChangeID != changeid)) + { + CloseInternalParameters(); // could optimize out + CloseInternalCommand(); + } + this.commandBehavior = behavior; + changeid = _changeID; + + if (!PropertiesOnCommand(false)) + { + return false; + } + + if ((null != _dbBindings) && _dbBindings.AreParameterBindingsInvalid(_parameters)) + { + CloseInternalParameters(); + } + + // if we already having bindings - don't create the accessor + // if _parameters is null - no parameters exist - don't create the collection + // do we actually have parameters since the collection exists + if ((null == _dbBindings) && HasParameters()) + { + // if we setup the parameters before setting cmdtxt then named parameters can happen + CreateAccessor(); + } + + if (_lastChangeID != changeid) + { + OleDbHResult hr; + + String commandText = ExpandCommandText(); + + hr = _icommandText.SetCommandText(ref ODB.DBGUID_DEFAULT, commandText); + + if (hr < 0) + { + ProcessResults(hr); + } + } + + _lastChangeID = changeid; + + return true; + } + + private void PropertyChanging() + { + unchecked + { _changeID++; } + } + + override public void Prepare() + { + if (CommandType.TableDirect != CommandType) + { + ValidateConnectionAndTransaction(ADP.Prepare); + + _isPrepared = false; + if (CommandType.TableDirect != CommandType) + { + InitializeCommand(0, true); + PrepareCommandText(1); + } + } + } + + private void PrepareCommandText(int expectedExecutionCount) + { + OleDbParameterCollection parameters = _parameters; + if (null != parameters) + { + foreach (OleDbParameter parameter in parameters) + { + if (parameter.IsParameterComputed()) + { + // @devnote: use IsParameterComputed which is called in the normal case + // only to call Prepare to throw the specialized error message + // reducing the overall number of methods to actually jit + parameter.Prepare(this); + } + } + } + UnsafeNativeMethods.ICommandPrepare icommandPrepare = ICommandPrepare(); + if (null != icommandPrepare) + { + OleDbHResult hr; + hr = icommandPrepare.Prepare(expectedExecutionCount); + + ProcessResults(hr); + + } + // don't recompute bindings on prepared statements + _isPrepared = true; + } + + private void ProcessResults(OleDbHResult hr) + { + Exception e = OleDbConnection.ProcessResults(hr, _connection, this); + if (null != e) + { throw e; } + } + + private void ProcessResultsNoReset(OleDbHResult hr) + { + Exception e = OleDbConnection.ProcessResults(hr, null, this); + if (null != e) + { throw e; } + } + + internal object GetPropertyValue(Guid propertySet, int propertyID) + { + if (null != _icommandText) + { + OleDbHResult hr; + tagDBPROP[] dbprops; + UnsafeNativeMethods.ICommandProperties icommandProperties = ICommandProperties(); + + using (PropertyIDSet propidset = new PropertyIDSet(propertySet, propertyID)) + { + using (DBPropSet propset = new DBPropSet(icommandProperties, propidset, out hr)) + { + if (hr < 0) + { + // OLEDB Data Reader masks provider specific errors by raising "Internal Data Provider error 30." + // DBPropSet c-tor will register the exception and it will be raised at GetPropertySet call in case of failure + SafeNativeMethods.Wrapper.ClearErrorInfo(); + } + dbprops = propset.GetPropertySet(0, out propertySet); + } + } + if (OleDbPropertyStatus.Ok == dbprops[0].dwStatus) + { + return dbprops[0].vValue; + } + return dbprops[0].dwStatus; + } + return OleDbPropertyStatus.NotSupported; + } + + private bool PropertiesOnCommand(bool throwNotSupported) + { + if (null != _icommandText) + { + return true; + } + Debug.Assert(!_isPrepared, "null command isPrepared"); + + OleDbConnection connection = _connection; + if (null == connection) + { + connection.CheckStateOpen(ODB.Properties); + } + if (!_trackingForClose) + { + _trackingForClose = true; + connection.AddWeakReference(this, OleDbReferenceCollection.CommandTag); + } + _icommandText = connection.ICommandText(); + + if (null == _icommandText) + { + if (throwNotSupported || HasParameters()) + { + throw ODB.CommandTextNotSupported(connection.Provider, null); + } + return false; + } + + using (DBPropSet propSet = CommandPropertySets()) + { + if (null != propSet) + { + UnsafeNativeMethods.ICommandProperties icommandProperties = ICommandProperties(); + OleDbHResult hr = icommandProperties.SetProperties(propSet.PropertySetCount, propSet); + + if (hr < 0) + { + SafeNativeMethods.Wrapper.ClearErrorInfo(); + } + } + } + return true; + } + + private DBPropSet CommandPropertySets() + { + DBPropSet propSet = null; + + bool keyInfo = (0 != (CommandBehavior.KeyInfo & this.commandBehavior)); + + // always set the CommandTimeout value? + int count = (_executeQuery ? (keyInfo ? 4 : 2) : 1); + + if (0 < count) + { + propSet = new DBPropSet(1); + + tagDBPROP[] dbprops = new tagDBPROP[count]; + + dbprops[0] = new tagDBPROP(ODB.DBPROP_COMMANDTIMEOUT, false, CommandTimeout); + + if (_executeQuery) + { + // 'Microsoft.Jet.OLEDB.4.0' default is DBPROPVAL_AO_SEQUENTIAL + dbprops[1] = new tagDBPROP(ODB.DBPROP_ACCESSORDER, false, ODB.DBPROPVAL_AO_RANDOM); + + if (keyInfo) + { + // 'Unique Rows' property required for SQLOLEDB to retrieve things like 'BaseTableName' + dbprops[2] = new tagDBPROP(ODB.DBPROP_UNIQUEROWS, false, keyInfo); + + // otherwise 'Microsoft.Jet.OLEDB.4.0' doesn't support IColumnsRowset + dbprops[3] = new tagDBPROP(ODB.DBPROP_IColumnsRowset, false, true); + } + } + propSet.SetPropertySet(0, OleDbPropertySetGuid.Rowset, dbprops); + } + return propSet; + } + + internal Bindings TakeBindingOwnerShip() + { + Bindings bindings = _dbBindings; + _dbBindings = null; + return bindings; + } + + private void ValidateConnection(string method) + { + if (null == _connection) + { + throw ADP.ConnectionRequired(method); + } + _connection.CheckStateOpen(method); + + // user attempting to execute the command while the first dataReader hasn't returned + // use the connection reference collection to see if the dataReader referencing this + // command has been garbage collected or not. + if (_hasDataReader) + { + if (_connection.HasLiveReader(this)) + { + throw ADP.OpenReaderExists(); + } + _hasDataReader = false; + } + } + + private void ValidateConnectionAndTransaction(string method) + { + ValidateConnection(method); + _transaction = _connection.ValidateTransaction(Transaction, method); + this.canceling = false; + } + } +} diff --git a/src/System.Data.OleDb/src/OleDbCommandBuilder.cs b/src/System.Data.OleDb/src/OleDbCommandBuilder.cs new file mode 100644 index 000000000000..cdcc39f3ff6d --- /dev/null +++ b/src/System.Data.OleDb/src/OleDbCommandBuilder.cs @@ -0,0 +1,455 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.ComponentModel; +using System.Data.Common; +using System.Diagnostics; +using System.Globalization; + +namespace System.Data.OleDb +{ + public sealed class OleDbCommandBuilder : DbCommandBuilder + { + public OleDbCommandBuilder() : base() + { + GC.SuppressFinalize(this); + } + + public OleDbCommandBuilder(OleDbDataAdapter adapter) : this() + { + DataAdapter = adapter; + } + + [DefaultValue(null)] + new public OleDbDataAdapter DataAdapter + { + get + { + return (base.DataAdapter as OleDbDataAdapter); + } + set + { + base.DataAdapter = value; + } + } + + private void OleDbRowUpdatingHandler(object sender, OleDbRowUpdatingEventArgs ruevent) + { + RowUpdatingHandler(ruevent); + } + + new public OleDbCommand GetInsertCommand() + { + return (OleDbCommand)base.GetInsertCommand(); + } + new public OleDbCommand GetInsertCommand(bool useColumnsForParameterNames) + { + return (OleDbCommand)base.GetInsertCommand(useColumnsForParameterNames); + } + + new public OleDbCommand GetUpdateCommand() + { + return (OleDbCommand)base.GetUpdateCommand(); + } + new public OleDbCommand GetUpdateCommand(bool useColumnsForParameterNames) + { + return (OleDbCommand)base.GetUpdateCommand(useColumnsForParameterNames); + } + + new public OleDbCommand GetDeleteCommand() + { + return (OleDbCommand)base.GetDeleteCommand(); + } + new public OleDbCommand GetDeleteCommand(bool useColumnsForParameterNames) + { + return (OleDbCommand)base.GetDeleteCommand(useColumnsForParameterNames); + } + + override protected string GetParameterName(int parameterOrdinal) + { + return "p" + parameterOrdinal.ToString(System.Globalization.CultureInfo.InvariantCulture); + } + override protected string GetParameterName(string parameterName) + { + return parameterName; + } + + override protected string GetParameterPlaceholder(int parameterOrdinal) + { + return "?"; + } + + override protected void ApplyParameterInfo(DbParameter parameter, DataRow datarow, StatementType statementType, bool whereClause) + { + OleDbParameter p = (OleDbParameter)parameter; + object valueType = datarow[SchemaTableColumn.ProviderType]; + p.OleDbType = (OleDbType)valueType; + + object bvalue = datarow[SchemaTableColumn.NumericPrecision]; + if (DBNull.Value != bvalue) + { + byte bval = (byte)(short)bvalue; + p.PrecisionInternal = ((0xff != bval) ? bval : (byte)0); + } + + bvalue = datarow[SchemaTableColumn.NumericScale]; + if (DBNull.Value != bvalue) + { + byte bval = (byte)(short)bvalue; + p.ScaleInternal = ((0xff != bval) ? bval : (byte)0); + } + } + + static public void DeriveParameters(OleDbCommand command) + { + if (null == command) + { + throw ADP.ArgumentNull("command"); + } + switch (command.CommandType) + { + case System.Data.CommandType.Text: + throw ADP.DeriveParametersNotSupported(command); + case System.Data.CommandType.StoredProcedure: + break; + case System.Data.CommandType.TableDirect: + // CommandType.TableDirect - do nothing, parameters are not supported + throw ADP.DeriveParametersNotSupported(command); + default: + throw ADP.InvalidCommandType(command.CommandType); + } + if (ADP.IsEmpty(command.CommandText)) + { + throw ADP.CommandTextRequired(ADP.DeriveParameters); + } + OleDbConnection connection = command.Connection; + if (null == connection) + { + throw ADP.ConnectionRequired(ADP.DeriveParameters); + } + ConnectionState state = connection.State; + if (ConnectionState.Open != state) + { + throw ADP.OpenConnectionRequired(ADP.DeriveParameters, state); + } + OleDbParameter[] list = DeriveParametersFromStoredProcedure(connection, command); + + OleDbParameterCollection parameters = command.Parameters; + parameters.Clear(); + + for (int i = 0; i < list.Length; ++i) + { + parameters.Add(list[i]); + } + } + + // known difference: when getting the parameters for a sproc, the + // return value gets marked as a return value but for a sql stmt + // the return value gets marked as an output parameter. + static private OleDbParameter[] DeriveParametersFromStoredProcedure(OleDbConnection connection, OleDbCommand command) + { + OleDbParameter[] plist = new OleDbParameter[0]; + + if (connection.SupportSchemaRowset(OleDbSchemaGuid.Procedure_Parameters)) + { + string quotePrefix, quoteSuffix; + connection.GetLiteralQuotes(ADP.DeriveParameters, out quotePrefix, out quoteSuffix); + + Object[] parsed = MultipartIdentifier.ParseMultipartIdentifier(command.CommandText, quotePrefix, quoteSuffix, '.', 4, true, SR.OLEDB_OLEDBCommandText, false); + if (null == parsed[3]) + { + throw ADP.NoStoredProcedureExists(command.CommandText); + } + + Object[] restrictions = new object[4]; + object value; + + // Parse returns an enforced 4 part array + // 0) Server - ignored but removal would be a run-time breaking change from V1.0 + // 1) Catalog + // 2) Schema + // 3) ProcedureName + + // Restrictions array which is passed to OleDb API expects: + // 0) Catalog + // 1) Schema + // 2) ProcedureName + // 3) ParameterName (leave null) + + // Copy from Parse format to OleDb API format + Array.Copy(parsed, 1, restrictions, 0, 3); + + //if (cmdConnection.IsServer_msdaora) { + // restrictions[1] = Convert.ToString(cmdConnection.UserId).ToUpper(); + //} + DataTable table = connection.GetSchemaRowset(OleDbSchemaGuid.Procedure_Parameters, restrictions); + + if (null != table) + { + DataColumnCollection columns = table.Columns; + + DataColumn parameterName = null; + DataColumn parameterDirection = null; + DataColumn dataType = null; + DataColumn maxLen = null; + DataColumn numericPrecision = null; + DataColumn numericScale = null; + DataColumn backendtype = null; + + int index = columns.IndexOf(ODB.PARAMETER_NAME); + if (-1 != index) + parameterName = columns[index]; + + index = columns.IndexOf(ODB.PARAMETER_TYPE); + if (-1 != index) + parameterDirection = columns[index]; + + index = columns.IndexOf(ODB.DATA_TYPE); + if (-1 != index) + dataType = columns[index]; + + index = columns.IndexOf(ODB.CHARACTER_MAXIMUM_LENGTH); + if (-1 != index) + maxLen = columns[index]; + + index = columns.IndexOf(ODB.NUMERIC_PRECISION); + if (-1 != index) + numericPrecision = columns[index]; + + index = columns.IndexOf(ODB.NUMERIC_SCALE); + if (-1 != index) + numericScale = columns[index]; + + index = columns.IndexOf(ODB.TYPE_NAME); + if (-1 != index) + backendtype = columns[index]; + + DataRow[] dataRows = table.Select(null, ODB.ORDINAL_POSITION_ASC, DataViewRowState.CurrentRows); + plist = new OleDbParameter[dataRows.Length]; + for (index = 0; index < dataRows.Length; ++index) + { + DataRow dataRow = dataRows[index]; + + OleDbParameter parameter = new OleDbParameter(); + + if ((null != parameterName) && !dataRow.IsNull(parameterName, DataRowVersion.Default)) + { + // $CONSIDER - not trimming the @ from the beginning but to left the designer do that + parameter.ParameterName = Convert.ToString(dataRow[parameterName, DataRowVersion.Default], CultureInfo.InvariantCulture).TrimStart(new char[] { '@', ' ', ':' }); + } + if ((null != parameterDirection) && !dataRow.IsNull(parameterDirection, DataRowVersion.Default)) + { + short direction = Convert.ToInt16(dataRow[parameterDirection, DataRowVersion.Default], CultureInfo.InvariantCulture); + parameter.Direction = ConvertToParameterDirection(direction); + } + if ((null != dataType) && !dataRow.IsNull(dataType, DataRowVersion.Default)) + { + // need to ping FromDBType, otherwise WChar->WChar when the user really wants VarWChar + short wType = Convert.ToInt16(dataRow[dataType, DataRowVersion.Default], CultureInfo.InvariantCulture); + parameter.OleDbType = NativeDBType.FromDBType(wType, false, false).enumOleDbType; + } + if ((null != maxLen) && !dataRow.IsNull(maxLen, DataRowVersion.Default)) + { + parameter.Size = Convert.ToInt32(dataRow[maxLen, DataRowVersion.Default], CultureInfo.InvariantCulture); + } + switch (parameter.OleDbType) + { + case OleDbType.Decimal: + case OleDbType.Numeric: + case OleDbType.VarNumeric: + if ((null != numericPrecision) && !dataRow.IsNull(numericPrecision, DataRowVersion.Default)) + { + // @devnote: unguarded cast from Int16 to Byte + parameter.PrecisionInternal = (Byte)Convert.ToInt16(dataRow[numericPrecision], CultureInfo.InvariantCulture); + } + if ((null != numericScale) && !dataRow.IsNull(numericScale, DataRowVersion.Default)) + { + // @devnote: unguarded cast from Int16 to Byte + parameter.ScaleInternal = (Byte)Convert.ToInt16(dataRow[numericScale], CultureInfo.InvariantCulture); + } + break; + case OleDbType.VarBinary: + case OleDbType.VarChar: + case OleDbType.VarWChar: + value = dataRow[backendtype, DataRowVersion.Default]; + if (value is string) + { + string backendtypename = ((string)value).ToLower(CultureInfo.InvariantCulture); + switch (backendtypename) + { + case "binary": + parameter.OleDbType = OleDbType.Binary; + break; + //case "varbinary": + // parameter.OleDbType = OleDbType.VarBinary; + // break; + case "image": + parameter.OleDbType = OleDbType.LongVarBinary; + break; + case "char": + parameter.OleDbType = OleDbType.Char; + break; + //case "varchar": + //case "varchar2": + // parameter.OleDbType = OleDbType.VarChar; + // break; + case "text": + parameter.OleDbType = OleDbType.LongVarChar; + break; + case "nchar": + parameter.OleDbType = OleDbType.WChar; + break; + //case "nvarchar": + // parameter.OleDbType = OleDbType.VarWChar; + case "ntext": + parameter.OleDbType = OleDbType.LongVarWChar; + break; + } + } + break; + } + //if (AdapterSwitches.OleDbSql.TraceVerbose) { + // ADP.Trace_Parameter("StoredProcedure", parameter); + //} + plist[index] = parameter; + } + } + if ((0 == plist.Length) && connection.SupportSchemaRowset(OleDbSchemaGuid.Procedures)) + { + restrictions = new Object[4] { null, null, command.CommandText, null }; + table = connection.GetSchemaRowset(OleDbSchemaGuid.Procedures, restrictions); + if (0 == table.Rows.Count) + { + throw ADP.NoStoredProcedureExists(command.CommandText); + } + } + } + else if (connection.SupportSchemaRowset(OleDbSchemaGuid.Procedures)) + { + Object[] restrictions = new Object[4] { null, null, command.CommandText, null }; + DataTable table = connection.GetSchemaRowset(OleDbSchemaGuid.Procedures, restrictions); + if (0 == table.Rows.Count) + { + throw ADP.NoStoredProcedureExists(command.CommandText); + } + // we don't ever expect a procedure with 0 parameters, they should have at least a return value + throw ODB.NoProviderSupportForSProcResetParameters(connection.Provider); + } + else + { + throw ODB.NoProviderSupportForSProcResetParameters(connection.Provider); + } + return plist; + } + + static private ParameterDirection ConvertToParameterDirection(int value) + { + switch (value) + { + case ODB.DBPARAMTYPE_INPUT: + return System.Data.ParameterDirection.Input; + case ODB.DBPARAMTYPE_INPUTOUTPUT: + return System.Data.ParameterDirection.InputOutput; + case ODB.DBPARAMTYPE_OUTPUT: + return System.Data.ParameterDirection.Output; + case ODB.DBPARAMTYPE_RETURNVALUE: + return System.Data.ParameterDirection.ReturnValue; + default: + return System.Data.ParameterDirection.Input; + } + } + + public override string QuoteIdentifier(string unquotedIdentifier) + { + return QuoteIdentifier(unquotedIdentifier, null /* use DataAdapter.SelectCommand.Connection if available */); + } + public string QuoteIdentifier(string unquotedIdentifier, OleDbConnection connection) + { + ADP.CheckArgumentNull(unquotedIdentifier, "unquotedIdentifier"); + + // if the user has specificed a prefix use the user specified prefix and suffix + // otherwise get them from the provider + string quotePrefix = QuotePrefix; + string quoteSuffix = QuoteSuffix; + if (ADP.IsEmpty(quotePrefix) == true) + { + if (connection == null) + { + // Use the adapter's connection if QuoteIdentifier was called from + // DbCommandBuilder instance (which does not have an overload that gets connection object) + connection = DataAdapter?.SelectCommand?.Connection; + if (connection == null) + { + throw ADP.QuotePrefixNotSet(ADP.QuoteIdentifier); + } + } + connection.GetLiteralQuotes(ADP.QuoteIdentifier, out quotePrefix, out quoteSuffix); + // if the quote suffix is null assume that it is the same as the prefix (See OLEDB spec + // IDBInfo::GetLiteralInfo DBLITERAL_QUOTE_SUFFIX.) + if (quoteSuffix == null) + { + quoteSuffix = quotePrefix; + } + } + + return ADP.BuildQuotedString(quotePrefix, quoteSuffix, unquotedIdentifier); + } + + override protected void SetRowUpdatingHandler(DbDataAdapter adapter) + { + Debug.Assert(adapter is OleDbDataAdapter, "!OleDbDataAdapter"); + if (adapter == base.DataAdapter) + { // removal case + ((OleDbDataAdapter)adapter).RowUpdating -= OleDbRowUpdatingHandler; + } + else + { // adding case + ((OleDbDataAdapter)adapter).RowUpdating += OleDbRowUpdatingHandler; + } + } + + public override string UnquoteIdentifier(string quotedIdentifier) + { + return UnquoteIdentifier(quotedIdentifier, null /* use DataAdapter.SelectCommand.Connection if available */); + } + + public string UnquoteIdentifier(string quotedIdentifier, OleDbConnection connection) + { + ADP.CheckArgumentNull(quotedIdentifier, "quotedIdentifier"); + + // if the user has specificed a prefix use the user specified prefix and suffix + // otherwise get them from the provider + string quotePrefix = QuotePrefix; + string quoteSuffix = QuoteSuffix; + if (ADP.IsEmpty(quotePrefix) == true) + { + if (connection == null) + { + // Use the adapter's connection if UnquoteIdentifier was called from + // DbCommandBuilder instance (which does not have an overload that gets connection object) + connection = DataAdapter?.SelectCommand?.Connection; + if (connection == null) + { + throw ADP.QuotePrefixNotSet(ADP.UnquoteIdentifier); + } + } + connection.GetLiteralQuotes(ADP.UnquoteIdentifier, out quotePrefix, out quoteSuffix); + // if the quote suffix is null assume that it is the same as the prefix (See OLEDB spec + // IDBInfo::GetLiteralInfo DBLITERAL_QUOTE_SUFFIX.) + if (quoteSuffix == null) + { + quoteSuffix = quotePrefix; + } + } + + String unquotedIdentifier; + // ignoring the return value because it is acceptable for the quotedString to not be quoted in this + // context. + ADP.RemoveStringQuotes(quotePrefix, quoteSuffix, quotedIdentifier, out unquotedIdentifier); + return unquotedIdentifier; + + } + + } +} diff --git a/src/System.Data.OleDb/src/OleDbConnection.cs b/src/System.Data.OleDb/src/OleDbConnection.cs new file mode 100644 index 000000000000..3eb5e941c787 --- /dev/null +++ b/src/System.Data.OleDb/src/OleDbConnection.cs @@ -0,0 +1,661 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.ComponentModel; +using System.Data.Common; +using System.Data.ProviderBase; +using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; +using System.Globalization; +using System.Runtime.InteropServices; +using System.Text; + +namespace System.Data.OleDb +{ + using SysTx = Transactions; + + // wraps the OLEDB IDBInitialize interface which represents a connection + // Notes about connection pooling + // 1. Connection pooling isn't supported on Win95 + // 2. Only happens if we use the IDataInitialize or IDBPromptInitialize interfaces + // it won't happen if you directly create the provider and set its properties + // 3. First call on IDBInitialize must be Initialize, can't QI for any other interfaces before that + [DefaultEvent("InfoMessage")] + public sealed partial class OleDbConnection : DbConnection, ICloneable, IDbConnection + { + static private readonly object EventInfoMessage = new object(); + + public OleDbConnection(string connectionString) : this() + { + ConnectionString = connectionString; + } + + private OleDbConnection(OleDbConnection connection) : this() + { // Clone + CopyFrom(connection); + } + + [ + DefaultValue(""), +#pragma warning disable 618 // ignore obsolete warning about RecommendedAsConfigurable to use SettingsBindableAttribute + RecommendedAsConfigurable(true), +#pragma warning restore 618 + SettingsBindable(true), + RefreshProperties(RefreshProperties.All), + ] + override public string ConnectionString + { + get + { + return ConnectionString_Get(); + } + set + { + ConnectionString_Set(value); + } + } + + private OleDbConnectionString OleDbConnectionStringValue + { + get { return (OleDbConnectionString)ConnectionOptions; } + } + + [ + DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden), + ] + override public int ConnectionTimeout + { + get + { + object value = null; + if (IsOpen) + { + value = GetDataSourceValue(OleDbPropertySetGuid.DBInit, ODB.DBPROP_INIT_TIMEOUT); + } + else + { + OleDbConnectionString constr = this.OleDbConnectionStringValue; + value = (null != constr) ? constr.ConnectTimeout : ADP.DefaultConnectionTimeout; + } + if (null != value) + { + return Convert.ToInt32(value, CultureInfo.InvariantCulture); + } + else + { + return ADP.DefaultConnectionTimeout; + } + } + } + + [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] + override public string Database + { + get + { + OleDbConnectionString constr = (OleDbConnectionString)UserConnectionOptions; + object value = (null != constr) ? constr.InitialCatalog : string.Empty; + if ((null != value) && !((string)value).StartsWith(DbConnectionOptions.DataDirectory, StringComparison.OrdinalIgnoreCase)) + { + OleDbConnectionInternal connection = GetOpenConnection(); + if (null != connection) + { + if (connection.HasSession) + { + value = GetDataSourceValue(OleDbPropertySetGuid.DataSource, ODB.DBPROP_CURRENTCATALOG); + } + else + { + value = GetDataSourceValue(OleDbPropertySetGuid.DBInit, ODB.DBPROP_INIT_CATALOG); + } + } + else + { + constr = this.OleDbConnectionStringValue; + value = (null != constr) ? constr.InitialCatalog : string.Empty; + } + } + return Convert.ToString(value, CultureInfo.InvariantCulture); + } + } + + [ + Browsable(true) + ] + override public string DataSource + { + get + { + OleDbConnectionString constr = (OleDbConnectionString)UserConnectionOptions; + object value = (null != constr) ? constr.DataSource : string.Empty; + if ((null != value) && !((string)value).StartsWith(DbConnectionOptions.DataDirectory, StringComparison.OrdinalIgnoreCase)) + { + if (IsOpen) + { + value = GetDataSourceValue(OleDbPropertySetGuid.DBInit, ODB.DBPROP_INIT_DATASOURCE); + if ((null == value) || ((value is string) && (0 == (value as string).Length))) + { + value = GetDataSourceValue(OleDbPropertySetGuid.DataSourceInfo, ODB.DBPROP_DATASOURCENAME); + } + } + else + { + constr = this.OleDbConnectionStringValue; + value = (null != constr) ? constr.DataSource : string.Empty; + } + } + return Convert.ToString(value, CultureInfo.InvariantCulture); + } + } + + internal bool IsOpen + { + get { return (null != GetOpenConnection()); } + } + + internal OleDbTransaction LocalTransaction + { + set + { + OleDbConnectionInternal openConnection = GetOpenConnection(); + + if (null != openConnection) + { + openConnection.LocalTransaction = value; + } + } + } + + [ + Browsable(true), + DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden), + ] + public String Provider + { + get + { + OleDbConnectionString constr = this.OleDbConnectionStringValue; + string value = ((null != constr) ? constr.ConvertValueToString(ODB.Provider, null) : null); + return ((null != value) ? value : string.Empty); + } + } + + internal OleDbConnectionPoolGroupProviderInfo ProviderInfo + { + get + { + return (OleDbConnectionPoolGroupProviderInfo)PoolGroup.ProviderInfo; + } + } + + override public string ServerVersion + { + get + { + return InnerConnection.ServerVersion; + } + } + + [ + Browsable(false), + DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden), + // ResDescriptionAttribute(SR.DbConnection_State), + ] + override public ConnectionState State + { + get + { + return InnerConnection.State; + } + } + + [EditorBrowsable(EditorBrowsableState.Advanced)] + public void ResetState() + { + if (IsOpen) + { + object value = GetDataSourcePropertyValue(OleDbPropertySetGuid.DataSourceInfo, ODB.DBPROP_CONNECTIONSTATUS); + if (value is Int32) + { + int connectionStatus = (int)value; + switch (connectionStatus) + { + case ODB.DBPROPVAL_CS_UNINITIALIZED: // provider closed on us + case ODB.DBPROPVAL_CS_COMMUNICATIONFAILURE: // broken connection + GetOpenConnection().DoomThisConnection(); + NotifyWeakReference(OleDbReferenceCollection.Canceling); + Close(); + break; + + case ODB.DBPROPVAL_CS_INITIALIZED: // everything is okay + break; + + default: // have to assume everything is okay + Debug.Assert(false, "Unknown 'Connection Status' value " + connectionStatus.ToString("G", CultureInfo.InvariantCulture)); + break; + } + } + } + } + + public event OleDbInfoMessageEventHandler InfoMessage + { + add + { + Events.AddHandler(EventInfoMessage, value); + } + remove + { + Events.RemoveHandler(EventInfoMessage, value); + } + } + + internal UnsafeNativeMethods.ICommandText ICommandText() + { + Debug.Assert(null != GetOpenConnection(), "ICommandText closed"); + return GetOpenConnection().ICommandText(); + } + + private IDBPropertiesWrapper IDBProperties() + { + Debug.Assert(null != GetOpenConnection(), "IDBProperties closed"); + return GetOpenConnection().IDBProperties(); + } + + internal IOpenRowsetWrapper IOpenRowset() + { + Debug.Assert(null != GetOpenConnection(), "IOpenRowset closed"); + return GetOpenConnection().IOpenRowset(); + } + + internal int SqlSupport() + { + Debug.Assert(null != this.OleDbConnectionStringValue, "no OleDbConnectionString SqlSupport"); + return this.OleDbConnectionStringValue.GetSqlSupport(this); + } + + internal bool SupportMultipleResults() + { + Debug.Assert(null != this.OleDbConnectionStringValue, "no OleDbConnectionString SupportMultipleResults"); + return this.OleDbConnectionStringValue.GetSupportMultipleResults(this); + } + + internal bool SupportIRow(OleDbCommand cmd) + { + Debug.Assert(null != this.OleDbConnectionStringValue, "no OleDbConnectionString SupportIRow"); + return this.OleDbConnectionStringValue.GetSupportIRow(this, cmd); + } + + internal int QuotedIdentifierCase() + { + Debug.Assert(null != this.OleDbConnectionStringValue, "no OleDbConnectionString QuotedIdentifierCase"); + + int quotedIdentifierCase; + object value = GetDataSourcePropertyValue(OleDbPropertySetGuid.DataSourceInfo, ODB.DBPROP_QUOTEDIDENTIFIERCASE); + if (value is Int32) + {// not OleDbPropertyStatus + quotedIdentifierCase = (int)value; + } + else + { + quotedIdentifierCase = -1; + } + return quotedIdentifierCase; + } + + internal bool ForceNewConnection { get { return false; } set {; } } + + new public OleDbTransaction BeginTransaction() + { + return BeginTransaction(IsolationLevel.Unspecified); + } + + new public OleDbTransaction BeginTransaction(IsolationLevel isolationLevel) + { + return (OleDbTransaction)InnerConnection.BeginTransaction(isolationLevel); + } + + override public void ChangeDatabase(string value) + { + CheckStateOpen(ADP.ChangeDatabase); + if ((null == value) || (0 == value.Trim().Length)) + { + throw ADP.EmptyDatabaseName(); + } + SetDataSourcePropertyValue(OleDbPropertySetGuid.DataSource, ODB.DBPROP_CURRENTCATALOG, ODB.Current_Catalog, true, value); + } + + internal void CheckStateOpen(string method) + { + ConnectionState state = State; + if (ConnectionState.Open != state) + { + throw ADP.OpenConnectionRequired(method, state); + } + } + + object ICloneable.Clone() + { + OleDbConnection clone = new OleDbConnection(this); + return clone; + } + + override public void Close() + { + InnerConnection.CloseConnection(this, ConnectionFactory); + // does not require GC.KeepAlive(this) because of OnStateChange + } + + new public OleDbCommand CreateCommand() + { + return new OleDbCommand("", this); + } + + private void DisposeMe(bool disposing) + { + if (disposing) + { // release mananged objects + if (DesignMode) + { + // release the object pool in design-mode so that + // native MDAC can be properly released during shutdown + OleDbConnection.ReleaseObjectPool(); + } + } + } + + // suppress this message - we cannot use SafeHandle here. + [SuppressMessage("Microsoft.Reliability", "CA2004:RemoveCallsToGCKeepAlive")] + override protected DbTransaction BeginDbTransaction(IsolationLevel isolationLevel) + { + DbTransaction transaction = InnerConnection.BeginTransaction(isolationLevel); + + // InnerConnection doesn't maintain a ref on the outer connection (this) and + // subsequently leaves open the possibility that the outer connection could be GC'ed before the DbTransaction + // is fully hooked up (leaving a DbTransaction with a null connection property). Ensure that this is reachable + // until the completion of BeginTransaction with KeepAlive + GC.KeepAlive(this); + + return transaction; + } + + internal object GetDataSourcePropertyValue(Guid propertySet, int propertyID) + { + OleDbConnectionInternal connection = GetOpenConnection(); + return connection.GetDataSourcePropertyValue(propertySet, propertyID); + } + + internal object GetDataSourceValue(Guid propertySet, int propertyID) + { + object value = GetDataSourcePropertyValue(propertySet, propertyID); + if ((value is OleDbPropertyStatus) || Convert.IsDBNull(value)) + { + value = null; + } + return value; + } + + private OleDbConnectionInternal GetOpenConnection() + { + DbConnectionInternal innerConnection = InnerConnection; + return (innerConnection as OleDbConnectionInternal); + } + + internal void GetLiteralQuotes(string method, out string quotePrefix, out string quoteSuffix) + { + CheckStateOpen(method); + OleDbConnectionPoolGroupProviderInfo info = ProviderInfo; + if (info.HasQuoteFix) + { + quotePrefix = info.QuotePrefix; + quoteSuffix = info.QuoteSuffix; + } + else + { + OleDbConnectionInternal connection = GetOpenConnection(); + quotePrefix = connection.GetLiteralInfo(ODB.DBLITERAL_QUOTE_PREFIX); + quoteSuffix = connection.GetLiteralInfo(ODB.DBLITERAL_QUOTE_SUFFIX); + if (null == quotePrefix) + { + quotePrefix = ""; + } + if (null == quoteSuffix) + { + quoteSuffix = quotePrefix; + } + info.SetQuoteFix(quotePrefix, quoteSuffix); + } + } + + public DataTable GetOleDbSchemaTable(Guid schema, object[] restrictions) + { + CheckStateOpen(ADP.GetOleDbSchemaTable); + OleDbConnectionInternal connection = GetOpenConnection(); + + if (OleDbSchemaGuid.DbInfoLiterals == schema) + { + if ((null == restrictions) || (0 == restrictions.Length)) + { + return connection.BuildInfoLiterals(); + } + throw ODB.InvalidRestrictionsDbInfoLiteral("restrictions"); + } + else if (OleDbSchemaGuid.SchemaGuids == schema) + { + if ((null == restrictions) || (0 == restrictions.Length)) + { + return connection.BuildSchemaGuids(); + } + throw ODB.InvalidRestrictionsSchemaGuids("restrictions"); + } + else if (OleDbSchemaGuid.DbInfoKeywords == schema) + { + if ((null == restrictions) || (0 == restrictions.Length)) + { + return connection.BuildInfoKeywords(); + } + throw ODB.InvalidRestrictionsDbInfoKeywords("restrictions"); + } + + if (connection.SupportSchemaRowset(schema)) + { + return connection.GetSchemaRowset(schema, restrictions); + } + else + { + using (IDBSchemaRowsetWrapper wrapper = connection.IDBSchemaRowset()) + { + if (null == wrapper.Value) + { + throw ODB.SchemaRowsetsNotSupported(Provider); + } + } + throw ODB.NotSupportedSchemaTable(schema, this); + } + } + + internal DataTable GetSchemaRowset(Guid schema, object[] restrictions) + { + Debug.Assert(null != GetOpenConnection(), "GetSchemaRowset closed"); + return GetOpenConnection().GetSchemaRowset(schema, restrictions); + } + + internal bool HasLiveReader(OleDbCommand cmd) + { + bool result = false; + OleDbConnectionInternal openConnection = GetOpenConnection(); + + if (null != openConnection) + { + result = openConnection.HasLiveReader(cmd); + } + return result; + } + + internal void OnInfoMessage(UnsafeNativeMethods.IErrorInfo errorInfo, OleDbHResult errorCode) + { + OleDbInfoMessageEventHandler handler = (OleDbInfoMessageEventHandler)Events[EventInfoMessage]; + if (null != handler) + { + try + { + OleDbException exception = OleDbException.CreateException(errorInfo, errorCode, null); + OleDbInfoMessageEventArgs e = new OleDbInfoMessageEventArgs(exception); + handler(this, e); + } + catch (Exception e) + { // eat the exception + // UNDONE - should not be catching all exceptions!!! + if (!ADP.IsCatchableOrSecurityExceptionType(e)) + { + throw; + } + + ADP.TraceExceptionWithoutRethrow(e); + } + } +#if DEBUG + else + { + OleDbException exception = OleDbException.CreateException(errorInfo, errorCode, null); + } +#endif + } + + override public void Open() + { + InnerConnection.OpenConnection(this, ConnectionFactory); + + // need to manually enlist in some cases, because + // native OLE DB doesn't know about SysTx transactions. + if ((0 != (ODB.DBPROPVAL_OS_TXNENLISTMENT & ((OleDbConnectionString)(this.ConnectionOptions)).OleDbServices)) + && ADP.NeedManualEnlistment()) + { + GetOpenConnection().EnlistTransactionInternal(SysTx.Transaction.Current); + } + } + + internal void SetDataSourcePropertyValue(Guid propertySet, int propertyID, string description, bool required, object value) + { + CheckStateOpen(ADP.SetProperties); + OleDbHResult hr; + using (IDBPropertiesWrapper idbProperties = IDBProperties()) + { + using (DBPropSet propSet = DBPropSet.CreateProperty(propertySet, propertyID, required, value)) + { + hr = idbProperties.Value.SetProperties(propSet.PropertySetCount, propSet); + + if (hr < 0) + { + Exception e = OleDbConnection.ProcessResults(hr, null, this); + if (OleDbHResult.DB_E_ERRORSOCCURRED == hr) + { + StringBuilder builder = new StringBuilder(); + Debug.Assert(1 == propSet.PropertySetCount, "too many PropertySets"); + + tagDBPROP[] dbprops = propSet.GetPropertySet(0, out propertySet); + Debug.Assert(1 == dbprops.Length, "too many Properties"); + + ODB.PropsetSetFailure(builder, description, dbprops[0].dwStatus); + + e = ODB.PropsetSetFailure(builder.ToString(), e); + } + if (null != e) + { + throw e; + } + } + else + { + SafeNativeMethods.Wrapper.ClearErrorInfo(); + } + } + } + } + + internal bool SupportSchemaRowset(Guid schema) + { + return GetOpenConnection().SupportSchemaRowset(schema); + } + + internal OleDbTransaction ValidateTransaction(OleDbTransaction transaction, string method) + { + return GetOpenConnection().ValidateTransaction(transaction, method); + } + + static internal Exception ProcessResults(OleDbHResult hresult, OleDbConnection connection, object src) + { + if ((0 <= (int)hresult) && ((null == connection) || (null == connection.Events[EventInfoMessage]))) + { + SafeNativeMethods.Wrapper.ClearErrorInfo(); + return null; + } + + // ErrorInfo object is to be checked regardless the hresult returned by the function called + Exception e = null; + UnsafeNativeMethods.IErrorInfo errorInfo = null; + OleDbHResult hr = UnsafeNativeMethods.GetErrorInfo(0, out errorInfo); // 0 - IErrorInfo exists, 1 - no IErrorInfo + if ((OleDbHResult.S_OK == hr) && (null != errorInfo)) + { + if (hresult < 0) + { + // UNDONE: if authentication failed - throw a unique exception object type + //if (/*OLEDB_Error.DB_SEC_E_AUTH_FAILED*/unchecked((int)0x80040E4D) == hr) { + //} + //else if (/*OLEDB_Error.DB_E_CANCELED*/unchecked((int)0x80040E4E) == hr) { + //} + // else { + e = OleDbException.CreateException(errorInfo, hresult, null); + //} + + if (OleDbHResult.DB_E_OBJECTOPEN == hresult) + { + e = ADP.OpenReaderExists(e); + } + + ResetState(connection); + } + else if (null != connection) + { + connection.OnInfoMessage(errorInfo, hresult); + } + else + { + } + Marshal.ReleaseComObject(errorInfo); + } + else if (0 < hresult) + { + // @devnote: OnInfoMessage with no ErrorInfo + } + else if ((int)hresult < 0) + { + e = ODB.NoErrorInformation((null != connection) ? connection.Provider : null, hresult, null); // OleDbException + + ResetState(connection); + } + if (null != e) + { + ADP.TraceExceptionAsReturnValue(e); + } + return e; + } + + // @devnote: should be multithread safe + static public void ReleaseObjectPool() + { + OleDbConnectionString.ReleaseObjectPool(); + OleDbConnectionInternal.ReleaseObjectPool(); + OleDbConnectionFactory.SingletonInstance.ClearAllPools(); + } + + static private void ResetState(OleDbConnection connection) + { + if (null != connection) + { + connection.ResetState(); + } + } + } +} diff --git a/src/System.Data.OleDb/src/OleDbConnectionFactory.cs b/src/System.Data.OleDb/src/OleDbConnectionFactory.cs new file mode 100644 index 000000000000..193e433e8d8b --- /dev/null +++ b/src/System.Data.OleDb/src/OleDbConnectionFactory.cs @@ -0,0 +1,175 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Collections.Specialized; +using System.Data.Common; +using System.Configuration; +using System.Data.ProviderBase; +using System.Diagnostics; +using System.IO; +using System.Runtime.Versioning; + +namespace System.Data.OleDb +{ + sealed internal class OleDbConnectionFactory : DbConnectionFactory + { + private OleDbConnectionFactory() : base() { } + // At this time, the OleDb Managed Provider doesn't have any connection pool + // counters because we'd only confuse people with "non-pooled" connections + // that are actually being pooled by the native pooler. + + private const string _metaDataXml = ":MetaDataXml"; + private const string _defaultMetaDataXml = "defaultMetaDataXml"; + + public static readonly OleDbConnectionFactory SingletonInstance = new OleDbConnectionFactory(); + + override public DbProviderFactory ProviderFactory + { + get + { + return OleDbFactory.Instance; + } + } + + override protected DbConnectionInternal CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject) + { + DbConnectionInternal result = new OleDbConnectionInternal((OleDbConnectionString)options, (OleDbConnection)owningObject); + return result; + } + + protected override DbConnectionOptions CreateConnectionOptions(string connectionString, DbConnectionOptions previous) + { + Debug.Assert(!ADP.IsEmpty(connectionString), "null connectionString"); + OleDbConnectionString result = new OleDbConnectionString(connectionString, (null != previous)); + return result; + } + + override protected DbMetaDataFactory CreateMetaDataFactory(DbConnectionInternal internalConnection, out bool cacheMetaDataFactory) + { + Debug.Assert(internalConnection != null, "internalConnection may not be null."); + cacheMetaDataFactory = false; + + OleDbConnectionInternal oleDbInternalConnection = (OleDbConnectionInternal)internalConnection; + OleDbConnection oleDbOuterConnection = oleDbInternalConnection.Connection; + Debug.Assert(oleDbOuterConnection != null, "outer connection may not be null."); + + NameValueCollection settings = (NameValueCollection)ConfigurationManager.GetSection("system.data.oledb"); + Stream XMLStream = null; + String providerFileName = oleDbOuterConnection.GetDataSourcePropertyValue(OleDbPropertySetGuid.DataSourceInfo, ODB.DBPROP_PROVIDERFILENAME) as string; + + if (settings != null) + { + string[] values = null; + string metaDataXML = null; + // first try to get the provider specific xml + + // if providerfilename is not supported we can't build the settings key needed to + // get the provider specific XML path + if (providerFileName != null) + { + metaDataXML = providerFileName + _metaDataXml; + values = settings.GetValues(metaDataXML); + } + + // if we did not find provider specific xml see if there is new default xml + if (values == null) + { + metaDataXML = _defaultMetaDataXml; + values = settings.GetValues(metaDataXML); + } + + // If there is new XML get it + if (values != null) + { + XMLStream = ADP.GetXmlStreamFromValues(values, metaDataXML); + } + } + + // if the xml was not obtained from machine.config use the embedded XML resource + if (XMLStream == null) + { + XMLStream = System.Reflection.Assembly.GetExecutingAssembly().GetManifestResourceStream("System.Data.OleDb.OleDbMetaData.xml"); + cacheMetaDataFactory = true; + } + + Debug.Assert(XMLStream != null, "XMLstream may not be null."); + + // using the ServerVersion as the NormalizedServerVersion. Doing this for two reasons + // 1) The Spec for DBPROP_DBMSVER normalizes the ServerVersion + // 2) for OLE DB its the only game in town + return new OleDbMetaDataFactory(XMLStream, + oleDbInternalConnection.ServerVersion, + oleDbInternalConnection.ServerVersion, + oleDbInternalConnection.GetSchemaRowsetInformation()); + } + + override protected DbConnectionPoolGroupOptions CreateConnectionPoolGroupOptions(DbConnectionOptions connectionOptions) + { + return null; + } + + override internal DbConnectionPoolGroupProviderInfo CreateConnectionPoolGroupProviderInfo(DbConnectionOptions connectionOptions) + { + return new OleDbConnectionPoolGroupProviderInfo(); + } + + override internal DbConnectionPoolGroup GetConnectionPoolGroup(DbConnection connection) + { + OleDbConnection c = (connection as OleDbConnection); + if (null != c) + { + return c.PoolGroup; + } + return null; + } + + override internal void PermissionDemand(DbConnection outerConnection) + { + OleDbConnection c = (outerConnection as OleDbConnection); + if (null != c) + { + c.PermissionDemand(); + } + } + + override internal void SetConnectionPoolGroup(DbConnection outerConnection, DbConnectionPoolGroup poolGroup) + { + OleDbConnection c = (outerConnection as OleDbConnection); + if (null != c) + { + c.PoolGroup = poolGroup; + } + } + + override internal void SetInnerConnectionEvent(DbConnection owningObject, DbConnectionInternal to) + { + OleDbConnection c = (owningObject as OleDbConnection); + if (null != c) + { + c.SetInnerConnectionEvent(to); + } + } + + override internal bool SetInnerConnectionFrom(DbConnection owningObject, DbConnectionInternal to, DbConnectionInternal from) + { + OleDbConnection c = (owningObject as OleDbConnection); + if (null != c) + { + return c.SetInnerConnectionFrom(to, from); + } + return false; + } + + override internal void SetInnerConnectionTo(DbConnection owningObject, DbConnectionInternal to) + { + OleDbConnection c = (owningObject as OleDbConnection); + if (null != c) + { + c.SetInnerConnectionTo(to); + } + } + + } +} + diff --git a/src/System.Data.OleDb/src/OleDbConnectionInternal.cs b/src/System.Data.OleDb/src/OleDbConnectionInternal.cs new file mode 100644 index 000000000000..1356109ff093 --- /dev/null +++ b/src/System.Data.OleDb/src/OleDbConnectionInternal.cs @@ -0,0 +1,845 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Collections.Generic; +using System.Data.Common; +using System.Data.ProviderBase; +using System.Diagnostics; +using System.Globalization; +using System.Runtime.InteropServices; +using System.Threading; + +namespace System.Data.OleDb +{ + using SysTx = Transactions; + + sealed internal class OleDbConnectionInternal : DbConnectionInternal, IDisposable + { + static private volatile OleDbServicesWrapper idataInitialize; + static private object dataInitializeLock = new object(); + + internal readonly OleDbConnectionString ConnectionString; // parsed connection string attributes + + // A SafeHandle is used instead of a RCW because we need to fake the CLR into not marshalling + + // OLE DB Services is marked apartment thread, but it actually supports/requires free-threading. + // However the CLR doesn't know this and attempts to marshal the interfaces back to their original context. + // But the OLE DB doesn't marshal very well if at all. Our workaround is based on the fact + // OLE DB is free-threaded and allows the workaround. + + // Creating DataSource/Session would requiring marshalling DataLins to its original context + // and has a severe performance impact (when working with transactions), hence our workaround to not Marshal. + + // Creating a Command would requiring marshalling Session to its original context and + // actually doesn't work correctly, without our workaround you must execute the command in + // the same context of the connection open. This doesn't work for pooled objects that contain + // an open OleDbConnection. + + // We don't do extra work at this time to allow the DataReader to be used in a different context + // from which the command was executed in. IRowset.GetNextRows will throw InvalidCastException + + // In V1.0, we worked around the performance impact of creating a DataSource/Session using + // WrapIUnknownWithComObject which creates a new RCW without searching for existing RCW + // effectively faking out the CLR into thinking the call is in the correct context. + // We also would use Marshal.ReleaseComObject to force the release of the 'temporary' RCW. + + // In V1.1, we worked around the CreateCommand issue with the same WrapIUnknownWithComObject trick. + + // In V2.0, the performance of using WrapIUnknownWithComObject & ReleaseComObject severly degraded. + // Using a SafeHandle (for lifetime control) and a delegate to call the apporiate COM method + // offered much better performance. + + // the "Data Source object". + private readonly DataSourceWrapper _datasrcwrp; + + // the "Session object". + private readonly SessionWrapper _sessionwrp; + + private WeakReference weakTransaction; + + // When set to true the current connection is enlisted in a transaction that must be + // un-enlisted during Deactivate. + private bool _unEnlistDuringDeactivate; + + internal OleDbConnectionInternal(OleDbConnectionString constr, OleDbConnection connection) : base() + { + Debug.Assert((null != constr) && !constr.IsEmpty, "empty connectionstring"); + ConnectionString = constr; + + if (constr.PossiblePrompt && !System.Environment.UserInteractive) + { + throw ODB.PossiblePromptNotUserInteractive(); + } + + try + { + // this is the native DataLinks object which pools the native datasource/session + OleDbServicesWrapper wrapper = OleDbConnectionInternal.GetObjectPool(); + _datasrcwrp = new DataSourceWrapper(); + + // DataLinks wrapper will call IDataInitialize::GetDataSource to create the DataSource + // uses constr.ActualConnectionString, no InfoMessageEvent checking + wrapper.GetDataSource(constr, ref _datasrcwrp); + Debug.Assert(!_datasrcwrp.IsInvalid, "bad DataSource"); + + // initialization is delayed because of OleDbConnectionStringBuilder only wants + // pre-Initialize IDBPropertyInfo & IDBProperties on the data source + if (null != connection) + { + _sessionwrp = new SessionWrapper(); + + // From the DataSource object, will call IDBInitialize.Initialize & IDBCreateSession.CreateSession + // We always need both called so we use a single call for a single DangerousAddRef/DangerousRelease pair. + OleDbHResult hr = _datasrcwrp.InitializeAndCreateSession(constr, ref _sessionwrp); + + // process the HResult here instead of from the SafeHandle because the possibility + // of an InfoMessageEvent. + if ((0 <= hr) && !_sessionwrp.IsInvalid) + { // process infonessage events + OleDbConnection.ProcessResults(hr, connection, connection); + } + else + { + Exception e = OleDbConnection.ProcessResults(hr, null, null); + Debug.Assert(null != e, "CreateSessionError"); + throw e; + } + Debug.Assert(!_sessionwrp.IsInvalid, "bad Session"); + } + } + catch + { + if (null != _sessionwrp) + { + _sessionwrp.Dispose(); + _sessionwrp = null; + } + if (null != _datasrcwrp) + { + _datasrcwrp.Dispose(); + _datasrcwrp = null; + } + throw; + } + } + + internal OleDbConnection Connection + { + get + { + return (OleDbConnection)Owner; + } + } + + internal bool HasSession + { + get + { + return (null != _sessionwrp); + } + } + + internal OleDbTransaction LocalTransaction + { + get + { + OleDbTransaction result = null; + if (null != weakTransaction) + { + result = ((OleDbTransaction)weakTransaction.Target); + } + return result; + } + set + { + weakTransaction = null; + + if (null != value) + { + weakTransaction = new WeakReference((OleDbTransaction)value); + } + } + } + + private string Provider + { + get { return ConnectionString.Provider; } + } + + override public string ServerVersion + { + // consider making a method, not a property + get + { + object value = GetDataSourceValue(OleDbPropertySetGuid.DataSourceInfo, ODB.DBPROP_DBMSVER); + return Convert.ToString(value, CultureInfo.InvariantCulture); + } + } + + // grouping the native OLE DB casts togther by required interfaces and optional interfaces, connection then session + // want these to be methods, not properties otherwise they appear in VS7 managed debugger which attempts to evaluate them + + // required interface, safe cast + internal IDBPropertiesWrapper IDBProperties() + { + Debug.Assert(null != _datasrcwrp, "IDBProperties: null datasource"); + return _datasrcwrp.IDBProperties(this); + } + + // required interface, safe cast + internal IOpenRowsetWrapper IOpenRowset() + { + Debug.Assert(null != _datasrcwrp, "IOpenRowset: null datasource"); + Debug.Assert(null != _sessionwrp, "IOpenRowset: null session"); + return _sessionwrp.IOpenRowset(this); + } + + // optional interface, unsafe cast + private IDBInfoWrapper IDBInfo() + { + Debug.Assert(null != _datasrcwrp, "IDBInfo: null datasource"); + return _datasrcwrp.IDBInfo(this); + } + + // optional interface, unsafe cast + internal IDBSchemaRowsetWrapper IDBSchemaRowset() + { + Debug.Assert(null != _datasrcwrp, "IDBSchemaRowset: null datasource"); + Debug.Assert(null != _sessionwrp, "IDBSchemaRowset: null session"); + return _sessionwrp.IDBSchemaRowset(this); + } + + // optional interface, unsafe cast + internal ITransactionJoinWrapper ITransactionJoin() + { + Debug.Assert(null != _datasrcwrp, "ITransactionJoin: null datasource"); + Debug.Assert(null != _sessionwrp, "ITransactionJoin: null session"); + return _sessionwrp.ITransactionJoin(this); + } + + // optional interface, unsafe cast + internal UnsafeNativeMethods.ICommandText ICommandText() + { + Debug.Assert(null != _datasrcwrp, "IDBCreateCommand: null datasource"); + Debug.Assert(null != _sessionwrp, "IDBCreateCommand: null session"); + + object icommandText = null; + OleDbHResult hr = _sessionwrp.CreateCommand(ref icommandText); + + Debug.Assert((0 <= hr) || (null == icommandText), "CreateICommandText: error with ICommandText"); + if (hr < 0) + { + if (OleDbHResult.E_NOINTERFACE != hr) + { + ProcessResults(hr); + } + else + { + SafeNativeMethods.Wrapper.ClearErrorInfo(); + } + } + return (UnsafeNativeMethods.ICommandText)icommandText; + } + + override protected void Activate(SysTx.Transaction transaction) + { + throw ADP.NotSupported(); + } + + override public DbTransaction BeginTransaction(IsolationLevel isolationLevel) + { + OleDbConnection outerConnection = Connection; + if (null != LocalTransaction) + { + throw ADP.ParallelTransactionsNotSupported(outerConnection); + } + + object unknown = null; + OleDbTransaction transaction; + try + { + transaction = new OleDbTransaction(outerConnection, null, isolationLevel); + Debug.Assert(null != _datasrcwrp, "ITransactionLocal: null datasource"); + Debug.Assert(null != _sessionwrp, "ITransactionLocal: null session"); + unknown = _sessionwrp.ComWrapper(); + UnsafeNativeMethods.ITransactionLocal value = (unknown as UnsafeNativeMethods.ITransactionLocal); + if (null == value) + { + throw ODB.TransactionsNotSupported(Provider, (Exception)null); + } + transaction.BeginInternal(value); + } + finally + { + if (null != unknown) + { + Marshal.ReleaseComObject(unknown); + } + } + LocalTransaction = transaction; + return transaction; + } + + override protected DbReferenceCollection CreateReferenceCollection() + { + return new OleDbReferenceCollection(); + } + + override protected void Deactivate() + { // used by both managed and native pooling + NotifyWeakReference(OleDbReferenceCollection.Closing); + + if (_unEnlistDuringDeactivate) + { + // Un-enlist transaction as OLEDB connection pool is unaware of managed transactions. + EnlistTransactionInternal(null); + } + OleDbTransaction transaction = LocalTransaction; + if (null != transaction) + { + LocalTransaction = null; + // required to rollback any transactions on this connection + // before releasing the back to the oledb connection pool + transaction.Dispose(); + } + } + + public override void Dispose() + { + Debug.Assert(null == LocalTransaction, "why was Deactivate not called first"); + if (null != _sessionwrp) + { + _sessionwrp.Dispose(); + } + if (null != _datasrcwrp) + { + _datasrcwrp.Dispose(); + } + base.Dispose(); + } + + override public void EnlistTransaction(SysTx.Transaction transaction) + { + OleDbConnection outerConnection = Connection; + if (null != LocalTransaction) + { + throw ADP.LocalTransactionPresent(); + } + EnlistTransactionInternal(transaction); + } + + internal void EnlistTransactionInternal(SysTx.Transaction transaction) + { + SysTx.IDtcTransaction oleTxTransaction = ADP.GetOletxTransaction(transaction); + + using (ITransactionJoinWrapper transactionJoin = ITransactionJoin()) + { + if (null == transactionJoin.Value) + { + throw ODB.TransactionsNotSupported(Provider, (Exception)null); + } + transactionJoin.Value.JoinTransaction(oleTxTransaction, (int)IsolationLevel.Unspecified, 0, IntPtr.Zero); + _unEnlistDuringDeactivate = (null != transaction); + } + EnlistedTransaction = transaction; + } + + internal object GetDataSourceValue(Guid propertySet, int propertyID) + { + object value = GetDataSourcePropertyValue(propertySet, propertyID); + if ((value is OleDbPropertyStatus) || Convert.IsDBNull(value)) + { + value = null; + } + return value; + } + + internal object GetDataSourcePropertyValue(Guid propertySet, int propertyID) + { + OleDbHResult hr; + tagDBPROP[] dbprops; + using (IDBPropertiesWrapper idbProperties = IDBProperties()) + { + using (PropertyIDSet propidset = new PropertyIDSet(propertySet, propertyID)) + { + using (DBPropSet propset = new DBPropSet(idbProperties.Value, propidset, out hr)) + { + if (hr < 0) + { + // OLEDB Data Reader masks provider specific errors by raising "Internal Data Provider error 30." + // DBPropSet c-tor will register the exception and it will be raised at GetPropertySet call in case of failure + SafeNativeMethods.Wrapper.ClearErrorInfo(); + } + dbprops = propset.GetPropertySet(0, out propertySet); + } + } + } + if (OleDbPropertyStatus.Ok == dbprops[0].dwStatus) + { + return dbprops[0].vValue; + } + return dbprops[0].dwStatus; + } + + internal DataTable BuildInfoLiterals() + { + using (IDBInfoWrapper wrapper = IDBInfo()) + { + UnsafeNativeMethods.IDBInfo dbInfo = wrapper.Value; + if (null == dbInfo) + { + return null; + } + + DataTable table = new DataTable("DbInfoLiterals"); + table.Locale = CultureInfo.InvariantCulture; + DataColumn literalName = new DataColumn("LiteralName", typeof(String)); + DataColumn literalValue = new DataColumn("LiteralValue", typeof(String)); + DataColumn invalidChars = new DataColumn("InvalidChars", typeof(String)); + DataColumn invalidStart = new DataColumn("InvalidStartingChars", typeof(String)); + DataColumn literal = new DataColumn("Literal", typeof(Int32)); + DataColumn maxlen = new DataColumn("Maxlen", typeof(Int32)); + + table.Columns.Add(literalName); + table.Columns.Add(literalValue); + table.Columns.Add(invalidChars); + table.Columns.Add(invalidStart); + table.Columns.Add(literal); + table.Columns.Add(maxlen); + + OleDbHResult hr; + int literalCount = 0; + IntPtr literalInfo = ADP.PtrZero; + using (DualCoTaskMem handle = new DualCoTaskMem(dbInfo, null, out literalCount, out literalInfo, out hr)) + { + // All literals were either invalid or unsupported. The provider allocates memory for *prgLiteralInfo and sets the value of the fSupported element in all of the structures to FALSE. The consumer frees this memory when it no longer needs the information. + if (OleDbHResult.DB_E_ERRORSOCCURRED != hr) + { + long offset = literalInfo.ToInt64(); + tagDBLITERALINFO tag = new tagDBLITERALINFO(); + for (int i = 0; i < literalCount; ++i, offset += ODB.SizeOf_tagDBLITERALINFO) + { + Marshal.PtrToStructure((IntPtr)offset, tag); + + DataRow row = table.NewRow(); + row[literalName] = ((OleDbLiteral)tag.it).ToString(); + row[literalValue] = tag.pwszLiteralValue; + row[invalidChars] = tag.pwszInvalidChars; + row[invalidStart] = tag.pwszInvalidStartingChars; + row[literal] = tag.it; + row[maxlen] = tag.cchMaxLen; + + table.Rows.Add(row); + row.AcceptChanges(); + } + if (hr < 0) + { // ignore infomsg + ProcessResults(hr); + } + } + else + { + SafeNativeMethods.Wrapper.ClearErrorInfo(); + } + } + return table; + } + } + + internal DataTable BuildInfoKeywords() + { + DataTable table = new DataTable(ODB.DbInfoKeywords); + table.Locale = CultureInfo.InvariantCulture; + DataColumn keyword = new DataColumn(ODB.Keyword, typeof(String)); + table.Columns.Add(keyword); + + if (!AddInfoKeywordsToTable(table, keyword)) + { + table = null; + } + + return table; + } + + internal bool AddInfoKeywordsToTable(DataTable table, DataColumn keyword) + { + using (IDBInfoWrapper wrapper = IDBInfo()) + { + UnsafeNativeMethods.IDBInfo dbInfo = wrapper.Value; + if (null == dbInfo) + { + return false; + } + + OleDbHResult hr; + string keywords; + hr = dbInfo.GetKeywords(out keywords); + + if (hr < 0) + { // ignore infomsg + ProcessResults(hr); + } + + if (null != keywords) + { + string[] values = keywords.Split(new char[1] { ',' }); + for (int i = 0; i < values.Length; ++i) + { + DataRow row = table.NewRow(); + row[keyword] = values[i]; + + table.Rows.Add(row); + row.AcceptChanges(); + } + } + return true; + } + } + + internal DataTable BuildSchemaGuids() + { + DataTable table = new DataTable(ODB.SchemaGuids); + table.Locale = CultureInfo.InvariantCulture; + + DataColumn schemaGuid = new DataColumn(ODB.Schema, typeof(Guid)); + DataColumn restrictionSupport = new DataColumn(ODB.RestrictionSupport, typeof(Int32)); + + table.Columns.Add(schemaGuid); + table.Columns.Add(restrictionSupport); + + SchemaSupport[] supportedSchemas = GetSchemaRowsetInformation(); + + if (null != supportedSchemas) + { + object[] values = new object[2]; + table.BeginLoadData(); + for (int i = 0; i < supportedSchemas.Length; ++i) + { + values[0] = supportedSchemas[i]._schemaRowset; + values[1] = supportedSchemas[i]._restrictions; + table.LoadDataRow(values, LoadOption.OverwriteChanges); + } + table.EndLoadData(); + } + return table; + } + + internal string GetLiteralInfo(int literal) + { + using (IDBInfoWrapper wrapper = IDBInfo()) + { + UnsafeNativeMethods.IDBInfo dbInfo = wrapper.Value; + if (null == dbInfo) + { + return null; + } + string literalValue = null; + IntPtr literalInfo = ADP.PtrZero; + int literalCount = 0; + OleDbHResult hr; + + using (DualCoTaskMem handle = new DualCoTaskMem(dbInfo, new int[1] { literal }, out literalCount, out literalInfo, out hr)) + { + // All literals were either invalid or unsupported. The provider allocates memory for *prgLiteralInfo and sets the value of the fSupported element in all of the structures to FALSE. The consumer frees this memory when it no longer needs the information. + if (OleDbHResult.DB_E_ERRORSOCCURRED != hr) + { + if ((1 == literalCount) && Marshal.ReadInt32(literalInfo, ODB.OffsetOf_tagDBLITERALINFO_it) == literal) + { + literalValue = Marshal.PtrToStringUni(Marshal.ReadIntPtr(literalInfo, 0)); + } + if (hr < 0) + { // ignore infomsg + ProcessResults(hr); + } + } + else + { + SafeNativeMethods.Wrapper.ClearErrorInfo(); + } + } + return literalValue; + } + } + + internal SchemaSupport[] GetSchemaRowsetInformation() + { + OleDbConnectionString constr = ConnectionString; + SchemaSupport[] supportedSchemas = constr.SchemaSupport; + if (null != supportedSchemas) + { + return supportedSchemas; + } + using (IDBSchemaRowsetWrapper wrapper = IDBSchemaRowset()) + { + UnsafeNativeMethods.IDBSchemaRowset dbSchemaRowset = wrapper.Value; + if (null == dbSchemaRowset) + { + return null; // IDBSchemaRowset not supported + } + + OleDbHResult hr; + int schemaCount = 0; + IntPtr schemaGuids = ADP.PtrZero; + IntPtr schemaRestrictions = ADP.PtrZero; + + using (DualCoTaskMem safehandle = new DualCoTaskMem(dbSchemaRowset, out schemaCount, out schemaGuids, out schemaRestrictions, out hr)) + { + dbSchemaRowset = null; + if (hr < 0) + { // ignore infomsg + ProcessResults(hr); + } + + supportedSchemas = new SchemaSupport[schemaCount]; + if (ADP.PtrZero != schemaGuids) + { + for (int i = 0, offset = 0; i < supportedSchemas.Length; ++i, offset += ODB.SizeOf_Guid) + { + IntPtr ptr = ADP.IntPtrOffset(schemaGuids, i * ODB.SizeOf_Guid); + supportedSchemas[i]._schemaRowset = (Guid)Marshal.PtrToStructure(ptr, typeof(Guid)); + } + } + if (ADP.PtrZero != schemaRestrictions) + { + for (int i = 0; i < supportedSchemas.Length; ++i) + { + supportedSchemas[i]._restrictions = Marshal.ReadInt32(schemaRestrictions, i * 4); + } + } + } + constr.SchemaSupport = supportedSchemas; + return supportedSchemas; + } + } + + internal DataTable GetSchemaRowset(Guid schema, object[] restrictions) + { + if (null == restrictions) + { + restrictions = new object[0]; + } + DataTable dataTable = null; + using (IDBSchemaRowsetWrapper wrapper = IDBSchemaRowset()) + { + UnsafeNativeMethods.IDBSchemaRowset dbSchemaRowset = wrapper.Value; + if (null == dbSchemaRowset) + { + throw ODB.SchemaRowsetsNotSupported(Provider); + } + + UnsafeNativeMethods.IRowset rowset = null; + OleDbHResult hr; + hr = dbSchemaRowset.GetRowset(ADP.PtrZero, ref schema, restrictions.Length, restrictions, ref ODB.IID_IRowset, 0, ADP.PtrZero, out rowset); + + if (hr < 0) + { // ignore infomsg + ProcessResults(hr); + } + + if (null != rowset) + { + using (OleDbDataReader dataReader = new OleDbDataReader(Connection, null, 0, CommandBehavior.Default)) + { + dataReader.InitializeIRowset(rowset, ChapterHandle.DB_NULL_HCHAPTER, IntPtr.Zero); + dataReader.BuildMetaInfo(); + dataReader.HasRowsRead(); + + dataTable = new DataTable(); + dataTable.Locale = CultureInfo.InvariantCulture; + dataTable.TableName = OleDbSchemaGuid.GetTextFromValue(schema); + OleDbDataAdapter.FillDataTable(dataReader, dataTable); + } + } + return dataTable; + } + } + + // returns true if there is an active data reader on the specified command + internal bool HasLiveReader(OleDbCommand cmd) + { + OleDbDataReader reader = null; + + if (null != ReferenceCollection) + { + reader = ReferenceCollection.FindItem(OleDbReferenceCollection.DataReaderTag, (dataReader) => cmd == dataReader.Command); + } + + return (reader != null); + } + + private void ProcessResults(OleDbHResult hr) + { + OleDbConnection connection = Connection; // get value from weakref only once + Exception e = OleDbConnection.ProcessResults(hr, connection, connection); + if (null != e) + { throw e; } + } + + internal bool SupportSchemaRowset(Guid schema) + { + SchemaSupport[] schemaSupport = GetSchemaRowsetInformation(); + if (null != schemaSupport) + { + for (int i = 0; i < schemaSupport.Length; ++i) + { + if (schema == schemaSupport[i]._schemaRowset) + { + return true; + } + } + } + return false; + } + + static private object CreateInstanceDataLinks() + { + Type datalink = Type.GetTypeFromCLSID(ODB.CLSID_DataLinks, true); + return Activator.CreateInstance(datalink, System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.Instance, null, null, CultureInfo.InvariantCulture, null); + } + + // @devnote: should be multithread safe access to OleDbConnection.idataInitialize, + // though last one wins for setting variable. It may be different objects, but + // OLE DB will ensure I'll work with just the single pool + static private OleDbServicesWrapper GetObjectPool() + { + OleDbServicesWrapper wrapper = OleDbConnectionInternal.idataInitialize; + if (null == wrapper) + { + lock (dataInitializeLock) + { + wrapper = OleDbConnectionInternal.idataInitialize; + if (null == wrapper) + { + VersionCheck(); + + object datalinks; + try + { + datalinks = CreateInstanceDataLinks(); + } + catch (Exception e) + { + // UNDONE - should not be catching all exceptions!!! + if (!ADP.IsCatchableExceptionType(e)) + { + throw; + } + + throw ODB.MDACNotAvailable(e); + } + if (null == datalinks) + { + throw ODB.MDACNotAvailable(null); + } + wrapper = new OleDbServicesWrapper(datalinks); + OleDbConnectionInternal.idataInitialize = wrapper; + } + } + } + Debug.Assert(null != wrapper, "GetObjectPool: null dataInitialize"); + return wrapper; + } + + static private void VersionCheck() + { + // $REVIEW: do we still need this? + // if ApartmentUnknown, then CoInitialize may not have been called yet + if (ApartmentState.Unknown == Thread.CurrentThread.GetApartmentState()) + { + SetMTAApartmentState(); + } + + ADP.CheckVersionMDAC(false); + } + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + static private void SetMTAApartmentState() + { + // we are defaulting to a multithread apartment state + Thread.CurrentThread.SetApartmentState(ApartmentState.MTA); + } + + // @devnote: should be multithread safe + static public void ReleaseObjectPool() + { + OleDbConnectionInternal.idataInitialize = null; + } + + internal OleDbTransaction ValidateTransaction(OleDbTransaction transaction, string method) + { + if (null != this.weakTransaction) + { + OleDbTransaction head = (OleDbTransaction)this.weakTransaction.Target; + if ((null != head) && this.weakTransaction.IsAlive) + { + head = OleDbTransaction.TransactionUpdate(head); + + // either we are wrong or finalize was called and object still alive + Debug.Assert(null != head, "unexcpted Transaction state"); + } + // else transaction has finalized on user + + if (null != head) + { + if (null == transaction) + { + // valid transaction exists and cmd doesn't have it + throw ADP.TransactionRequired(method); + } + else + { + OleDbTransaction tail = OleDbTransaction.TransactionLast(head); + if (tail != transaction) + { + if (tail.Connection != transaction.Connection) + { + throw ADP.TransactionConnectionMismatch(); + } + // else cmd has incorrect transaction + throw ADP.TransactionCompleted(); + } + // else cmd has correct transaction + return transaction; + } + } + else + { // cleanup for Finalized transaction + this.weakTransaction = null; + } + } + else if ((null != transaction) && (null != transaction.Connection)) + { + throw ADP.TransactionConnectionMismatch(); + } + // else no transaction and cmd is correct + + // if transactionObject is from this connection but zombied + // and no transactions currently exists - then ignore the bogus object + return null; + } + + internal Dictionary GetPropertyInfo(Guid[] propertySets) + { + bool isopen = HasSession; + OleDbConnectionString constr = ConnectionString; + Dictionary properties = null; + + if (null == propertySets) + { + propertySets = new Guid[0]; + } + using (PropertyIDSet propidset = new PropertyIDSet(propertySets)) + { + using (IDBPropertiesWrapper idbProperties = IDBProperties()) + { + using (PropertyInfoSet infoset = new PropertyInfoSet(idbProperties.Value, propidset)) + { + properties = infoset.GetValues(); + } + } + } + return properties; + } + } +} diff --git a/src/System.Data.OleDb/src/OleDbConnectionPoolGroupProviderInfo.cs b/src/System.Data.OleDb/src/OleDbConnectionPoolGroupProviderInfo.cs new file mode 100644 index 000000000000..76a1493e7eca --- /dev/null +++ b/src/System.Data.OleDb/src/OleDbConnectionPoolGroupProviderInfo.cs @@ -0,0 +1,38 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Data.ProviderBase; + +namespace System.Data.OleDb +{ + internal sealed class OleDbConnectionPoolGroupProviderInfo : DbConnectionPoolGroupProviderInfo + { + private bool _hasQuoteFix; + private string _quotePrefix, _quoteSuffix; + + internal OleDbConnectionPoolGroupProviderInfo() + { + } + + internal bool HasQuoteFix + { + get { return _hasQuoteFix; } + } + internal string QuotePrefix + { + get { return _quotePrefix; } + } + internal string QuoteSuffix + { + get { return _quoteSuffix; } + } + + internal void SetQuoteFix(string prefix, string suffix) + { + _quotePrefix = prefix; + _quoteSuffix = suffix; + _hasQuoteFix = true; + } + } +} diff --git a/src/System.Data.OleDb/src/OleDbConnectionString.cs b/src/System.Data.OleDb/src/OleDbConnectionString.cs new file mode 100644 index 000000000000..71421c11cc9d --- /dev/null +++ b/src/System.Data.OleDb/src/OleDbConnectionString.cs @@ -0,0 +1,466 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Collections.Generic; +using System.Data.Common; +using System.Diagnostics; +using System.Globalization; +using System.IO; +using System.Text; +using System.Runtime.Versioning; + +namespace System.Data.OleDb +{ + internal struct SchemaSupport + { + internal Guid _schemaRowset; + internal int _restrictions; + } + + internal sealed class OleDbConnectionString : DbConnectionOptions + { + // instances of this class are intended to be immutable, i.e readonly + // used by pooling classes so it is much easier to verify correctness + // when not worried about the class being modified during execution + + internal static class KEY + { + internal const string Asynchronous_Processing = "asynchronous processing"; + internal const string Connect_Timeout = "connect timeout"; + internal const string Data_Provider = "data provider"; + internal const string Data_Source = "data source"; + internal const string Extended_Properties = "extended properties"; + internal const string File_Name = "file name"; + internal const string Initial_Catalog = "initial catalog"; + internal const string Ole_DB_Services = "ole db services"; + internal const string Persist_Security_Info = "persist security info"; + internal const string Prompt = "prompt"; + internal const string Provider = "provider"; + internal const string RemoteProvider = "remote provider"; + internal const string WindowHandle = "window handle"; + } + + // registry key and dword value entry for udl pooling + private static class UDL + { + internal const string Header = "\xfeff[oledb]\r\n; Everything after this line is an OLE DB initstring\r\n"; + internal const string Location = "SOFTWARE\\Microsoft\\DataAccess\\Udl Pooling"; + internal const string Pooling = "Cache Size"; + + static internal volatile bool _PoolSizeInit; + static internal int _PoolSize; + + static internal volatile Dictionary _Pool; + static internal object _PoolLock = new object(); + } + + private static class VALUES + { + internal const string NoPrompt = "noprompt"; + } + + // set during ctor + internal readonly bool PossiblePrompt; + internal readonly string ActualConnectionString; // cached value passed to GetDataSource + + private readonly string _expandedConnectionString; + + internal SchemaSupport[] _schemaSupport; + + internal int _sqlSupport; + internal bool _supportMultipleResults; + internal bool _supportIRow; + internal bool _hasSqlSupport; + internal bool _hasSupportMultipleResults, _hasSupportIRow; + + private int _oledbServices; + + // these are cached delegates (per unique connectionstring) + internal UnsafeNativeMethods.IUnknownQueryInterface DangerousDataSourceIUnknownQueryInterface; + internal UnsafeNativeMethods.IDBInitializeInitialize DangerousIDBInitializeInitialize; + internal UnsafeNativeMethods.IDBCreateSessionCreateSession DangerousIDBCreateSessionCreateSession; + internal UnsafeNativeMethods.IDBCreateCommandCreateCommand DangerousIDBCreateCommandCreateCommand; + + // since IDBCreateCommand interface may not be supported for a particular provider (only IOpenRowset) + // we cache that fact rather than call QueryInterface on every call to Open + internal bool HaveQueriedForCreateCommand; + + // SxS: if user specifies a value for "File Name=" (UDL) in connection string, OleDbConnectionString will load the connection string + // from the UDL file. The UDL file is opened as FileMode.Open, FileAccess.Read, FileShare.Read, allowing concurrent access to it. + internal OleDbConnectionString(string connectionString, bool validate) : base(connectionString) + { + string prompt = this[KEY.Prompt]; + PossiblePrompt = ((!ADP.IsEmpty(prompt) && (0 != String.Compare(prompt, VALUES.NoPrompt, StringComparison.OrdinalIgnoreCase))) + || !ADP.IsEmpty(this[KEY.WindowHandle])); + + if (!IsEmpty) + { + string udlConnectionString = null; + if (!validate) + { + int position = 0; + string udlFileName = null; + _expandedConnectionString = ExpandDataDirectories(ref udlFileName, ref position); + + if (!ADP.IsEmpty(udlFileName)) + { // fail via new FileStream vs. GetFullPath + udlFileName = ADP.GetFullPath(udlFileName); + } + if (null != udlFileName) + { + udlConnectionString = LoadStringFromStorage(udlFileName); + + if (!ADP.IsEmpty(udlConnectionString)) + { + _expandedConnectionString = _expandedConnectionString.Substring(0, position) + udlConnectionString + ';' + _expandedConnectionString.Substring(position); + } + } + } + if (validate || ADP.IsEmpty(udlConnectionString)) + { + ActualConnectionString = ValidateConnectionString(connectionString); + } + } + } + + internal int ConnectTimeout + { + get { return base.ConvertValueToInt32(KEY.Connect_Timeout, ADP.DefaultConnectionTimeout); } + } + + internal string DataSource + { + get { return base.ConvertValueToString(KEY.Data_Source, string.Empty); } + } + + internal string InitialCatalog + { + get { return base.ConvertValueToString(KEY.Initial_Catalog, string.Empty); } + } + + internal string Provider + { + get + { + Debug.Assert(!ADP.IsEmpty(this[KEY.Provider]), "no Provider"); + return this[KEY.Provider]; + } + } + + internal int OleDbServices + { + get + { + return _oledbServices; + } + } + + internal SchemaSupport[] SchemaSupport + { // OleDbConnection.GetSchemaRowsetInformation + get { return _schemaSupport; } + set { _schemaSupport = value; } + } + + protected internal override string Expand() + { + if (null != _expandedConnectionString) + { + return _expandedConnectionString; + } + else + { + return base.Expand(); + } + } + + internal int GetSqlSupport(OleDbConnection connection) + { + int sqlSupport = _sqlSupport; + if (!_hasSqlSupport) + { + object value = connection.GetDataSourcePropertyValue(OleDbPropertySetGuid.DataSourceInfo, ODB.DBPROP_SQLSUPPORT); + if (value is Int32) + { // not OleDbPropertyStatus + sqlSupport = (int)value; + } + _sqlSupport = sqlSupport; + _hasSqlSupport = true; + } + return sqlSupport; + } + + internal bool GetSupportIRow(OleDbConnection connection, OleDbCommand command) + { + bool supportIRow = _supportIRow; + if (!_hasSupportIRow) + { + object value = command.GetPropertyValue(OleDbPropertySetGuid.Rowset, ODB.DBPROP_IRow); + + // SQLOLEDB always returns VARIANT_FALSE for DBPROP_IROW, so base the answer on existance + supportIRow = !(value is OleDbPropertyStatus); + _supportIRow = supportIRow; + _hasSupportIRow = true; + } + return supportIRow; + } + + internal bool GetSupportMultipleResults(OleDbConnection connection) + { + bool supportMultipleResults = _supportMultipleResults; + if (!_hasSupportMultipleResults) + { + object value = connection.GetDataSourcePropertyValue(OleDbPropertySetGuid.DataSourceInfo, ODB.DBPROP_MULTIPLERESULTS); + if (value is Int32) + {// not OleDbPropertyStatus + supportMultipleResults = (ODB.DBPROPVAL_MR_NOTSUPPORTED != (int)value); + } + _supportMultipleResults = supportMultipleResults; + _hasSupportMultipleResults = true; + } + return supportMultipleResults; + } + + static private int UdlPoolSize + { + // SxS: UdpPoolSize reads registry value to get the pool size + get + { + int poolsize = UDL._PoolSize; + if (!UDL._PoolSizeInit) + { + object value = ADP.LocalMachineRegistryValue(UDL.Location, UDL.Pooling); + if (value is Int32) + { + poolsize = (int)value; + poolsize = ((0 < poolsize) ? poolsize : 0); + UDL._PoolSize = poolsize; + } + UDL._PoolSizeInit = true; + } + return poolsize; + } + } + + static private string LoadStringFromStorage(string udlfilename) + { + string udlConnectionString = null; + Dictionary udlcache = UDL._Pool; + + if ((null == udlcache) || !udlcache.TryGetValue(udlfilename, out udlConnectionString)) + { + udlConnectionString = LoadStringFromFileStorage(udlfilename); + if (null != udlConnectionString) + { + Debug.Assert(!ADP.IsEmpty(udlfilename), "empty filename didn't fail"); + + if (0 < UdlPoolSize) + { + Debug.Assert(udlfilename == ADP.GetFullPath(udlfilename), "only cache full path filenames"); + + if (null == udlcache) + { + udlcache = new Dictionary(); + udlcache[udlfilename] = udlConnectionString; + + lock (UDL._PoolLock) + { + if (null != UDL._Pool) + { + udlcache = UDL._Pool; + } + else + { + UDL._Pool = udlcache; + udlcache = null; + } + } + } + if (null != udlcache) + { + lock (udlcache) + { + udlcache[udlfilename] = udlConnectionString; + } + } + } + } + } + return udlConnectionString; + } + + static private string LoadStringFromFileStorage(string udlfilename) + { + // Microsoft Data Link File Format + // The first two lines of a .udl file must have exactly the following contents in order to work properly: + // [oledb] + // ; Everything after this line is an OLE DB initstring + // + string connectionString = null; + Exception failure = null; + try + { + int hdrlength = ADP.CharSize * UDL.Header.Length; + using (FileStream fstream = new FileStream(udlfilename, FileMode.Open, FileAccess.Read, FileShare.Read)) + { + long length = fstream.Length; + if (length < hdrlength || (0 != length % ADP.CharSize)) + { + failure = ADP.InvalidUDL(); + } + else + { + byte[] bytes = new Byte[hdrlength]; + int count = fstream.Read(bytes, 0, bytes.Length); + if (count < hdrlength) + { + failure = ADP.InvalidUDL(); + } + else if (System.Text.Encoding.Unicode.GetString(bytes, 0, hdrlength) != UDL.Header) + { + failure = ADP.InvalidUDL(); + } + else + { // please verify header before allocating memory block for connection string + bytes = new Byte[length - hdrlength]; + count = fstream.Read(bytes, 0, bytes.Length); + connectionString = System.Text.Encoding.Unicode.GetString(bytes, 0, count); + } + } + } + } + catch (Exception e) + { + // UNDONE - should not be catching all exceptions!!! + if (!ADP.IsCatchableExceptionType(e)) + { + throw; + } + + throw ADP.UdlFileError(e); + } + if (null != failure) + { + throw failure; + } + return connectionString.Trim(); + } + + private string ValidateConnectionString(string connectionString) + { + if (ConvertValueToBoolean(KEY.Asynchronous_Processing, false)) + { + throw ODB.AsynchronousNotSupported(); + } + + int connectTimeout = ConvertValueToInt32(KEY.Connect_Timeout, 0); + if (connectTimeout < 0) + { + throw ADP.InvalidConnectTimeoutValue(); + } + + string progid = ConvertValueToString(KEY.Data_Provider, null); + if (null != progid) + { + progid = progid.Trim(); + if (0 < progid.Length) + { // don't fail on empty 'Data Provider' value + ValidateProvider(progid); + } + } + progid = ConvertValueToString(KEY.RemoteProvider, null); + if (null != progid) + { + progid = progid.Trim(); + if (0 < progid.Length) + { // don't fail on empty 'Data Provider' value + ValidateProvider(progid); + } + } + progid = ConvertValueToString(KEY.Provider, string.Empty).Trim(); + ValidateProvider(progid); // will fail on empty 'Provider' value + + // initialize to default + // If the value is not provided in connection string and OleDbServices registry key has not been set by the provider, + // the default for the provider is -1 (all services are ON). + // our default is -13, we turn off ODB.DBPROPVAL_OS_AGR_AFTERSESSION and ODB.DBPROPVAL_OS_CLIENTCURSOR flags + _oledbServices = DbConnectionStringDefaults.OleDbServices; + + bool hasOleDBServices = (base.ContainsKey(KEY.Ole_DB_Services) && !ADP.IsEmpty((string)base[KEY.Ole_DB_Services])); + if (!hasOleDBServices) + { // don't touch registry if they have OLE DB Services + string classid = (string)ADP.ClassesRootRegistryValue(progid + "\\CLSID", String.Empty); + if ((null != classid) && (0 < classid.Length)) + { + // CLSID detection of 'Microsoft OLE DB Provider for ODBC Drivers' + Guid classidProvider = new Guid(classid); + if (ODB.CLSID_MSDASQL == classidProvider) + { + throw ODB.MSDASQLNotSupported(); + } + object tmp = ADP.ClassesRootRegistryValue("CLSID\\{" + classidProvider.ToString("D", CultureInfo.InvariantCulture) + "}", ODB.OLEDB_SERVICES); + if (null != tmp) + { + // @devnote: some providers like MSDataShape don't have the OLEDB_SERVICES value + // the MSDataShape provider doesn't support the 'Ole Db Services' keyword + // hence, if the value doesn't exist - don't prepend to string + try + { + _oledbServices = (int)tmp; + } + catch (InvalidCastException e) + { + ADP.TraceExceptionWithoutRethrow(e); + } + _oledbServices &= ~(ODB.DBPROPVAL_OS_AGR_AFTERSESSION | ODB.DBPROPVAL_OS_CLIENTCURSOR); + + StringBuilder builder = new StringBuilder(); + builder.Append(KEY.Ole_DB_Services); + builder.Append("="); + builder.Append(_oledbServices.ToString(CultureInfo.InvariantCulture)); + builder.Append(";"); + builder.Append(connectionString); + connectionString = builder.ToString(); + } + } + } + else + { + // parse the Ole Db Services value from connection string + _oledbServices = ConvertValueToInt32(KEY.Ole_DB_Services, DbConnectionStringDefaults.OleDbServices); + } + + return connectionString; + } + + internal static bool IsMSDASQL(string progid) + { + return (("msdasql" == progid) || progid.StartsWith("msdasql.", StringComparison.Ordinal) || ("microsoft ole db provider for odbc drivers" == progid)); + } + + static private void ValidateProvider(string progid) + { + if (ADP.IsEmpty(progid)) + { + throw ODB.NoProviderSpecified(); + } + if (ODB.MaxProgIdLength <= progid.Length) + { + throw ODB.InvalidProviderSpecified(); + } + progid = progid.ToLower(CultureInfo.InvariantCulture); + if (IsMSDASQL(progid)) + { + // fail msdasql even if not on the machine. + throw ODB.MSDASQLNotSupported(); + } + } + + static internal void ReleaseObjectPool() + { + UDL._PoolSizeInit = false; + UDL._Pool = null; + } + } +} + diff --git a/src/System.Data.OleDb/src/OleDbDataAdapter.cs b/src/System.Data.OleDb/src/OleDbDataAdapter.cs new file mode 100644 index 000000000000..1f245569cf38 --- /dev/null +++ b/src/System.Data.OleDb/src/OleDbDataAdapter.cs @@ -0,0 +1,477 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.ComponentModel; +using System.Data.Common; +using System.Diagnostics; +using System.Runtime.InteropServices; + +namespace System.Data.OleDb +{ + public sealed class OleDbDataAdapter : DbDataAdapter, IDbDataAdapter, ICloneable + { + static private readonly object EventRowUpdated = new object(); + static private readonly object EventRowUpdating = new object(); + + private OleDbCommand _deleteCommand, _insertCommand, _selectCommand, _updateCommand; + + public OleDbDataAdapter() : base() + { + GC.SuppressFinalize(this); + } + + public OleDbDataAdapter(OleDbCommand selectCommand) : this() + { + SelectCommand = selectCommand; + } + + public OleDbDataAdapter(string selectCommandText, string selectConnectionString) : this() + { + OleDbConnection connection = new OleDbConnection(selectConnectionString); + SelectCommand = new OleDbCommand(selectCommandText, connection); + } + + public OleDbDataAdapter(string selectCommandText, OleDbConnection selectConnection) : this() + { + SelectCommand = new OleDbCommand(selectCommandText, selectConnection); + } + + private OleDbDataAdapter(OleDbDataAdapter from) : base(from) + { + GC.SuppressFinalize(this); + } + + [ + DefaultValue(null), + ] + new public OleDbCommand DeleteCommand + { + get { return _deleteCommand; } + set { _deleteCommand = value; } + } + + IDbCommand IDbDataAdapter.DeleteCommand + { + get { return _deleteCommand; } + set { _deleteCommand = (OleDbCommand)value; } + } + + [ + DefaultValue(null) + ] + new public OleDbCommand InsertCommand + { + get { return _insertCommand; } + set { _insertCommand = value; } + } + + IDbCommand IDbDataAdapter.InsertCommand + { + get { return _insertCommand; } + set { _insertCommand = (OleDbCommand)value; } + } + + [ + DefaultValue(null) + ] + new public OleDbCommand SelectCommand + { + get { return _selectCommand; } + set { _selectCommand = value; } + } + + IDbCommand IDbDataAdapter.SelectCommand + { + get { return _selectCommand; } + set { _selectCommand = (OleDbCommand)value; } + } + + [ + DefaultValue(null) + ] + new public OleDbCommand UpdateCommand + { + get { return _updateCommand; } + set { _updateCommand = value; } + } + + IDbCommand IDbDataAdapter.UpdateCommand + { + get { return _updateCommand; } + set { _updateCommand = (OleDbCommand)value; } + } + + public event OleDbRowUpdatedEventHandler RowUpdated + { + add { Events.AddHandler(EventRowUpdated, value); } + remove { Events.RemoveHandler(EventRowUpdated, value); } + } + + public event OleDbRowUpdatingEventHandler RowUpdating + { + add + { + OleDbRowUpdatingEventHandler handler = (OleDbRowUpdatingEventHandler)Events[EventRowUpdating]; + + // prevent someone from registering two different command builders on the adapter by + // silently removing the old one + if ((null != handler) && (value.Target is DbCommandBuilder)) + { + OleDbRowUpdatingEventHandler d = (OleDbRowUpdatingEventHandler)ADP.FindBuilder(handler); + if (null != d) + { + Events.RemoveHandler(EventRowUpdating, d); + } + } + Events.AddHandler(EventRowUpdating, value); + } + remove { Events.RemoveHandler(EventRowUpdating, value); } + } + + object ICloneable.Clone() + { + return new OleDbDataAdapter(this); + } + + override protected RowUpdatedEventArgs CreateRowUpdatedEvent(DataRow dataRow, IDbCommand command, StatementType statementType, DataTableMapping tableMapping) + { + return new OleDbRowUpdatedEventArgs(dataRow, command, statementType, tableMapping); + } + + override protected RowUpdatingEventArgs CreateRowUpdatingEvent(DataRow dataRow, IDbCommand command, StatementType statementType, DataTableMapping tableMapping) + { + return new OleDbRowUpdatingEventArgs(dataRow, command, statementType, tableMapping); + } + + internal static void FillDataTable(OleDbDataReader dataReader, params DataTable[] dataTables) + { + OleDbDataAdapter adapter = new OleDbDataAdapter(); + adapter.Fill(dataTables, dataReader, 0, 0); + } + + public int Fill(DataTable dataTable, object ADODBRecordSet) + { + if (null == dataTable) + { + throw ADP.ArgumentNull("dataTable"); + } + if (null == ADODBRecordSet) + { + throw ADP.ArgumentNull("adodb"); + } + return FillFromADODB((object)dataTable, ADODBRecordSet, null, false); + } + + public int Fill(DataSet dataSet, object ADODBRecordSet, string srcTable) + { + if (null == dataSet) + { + throw ADP.ArgumentNull("dataSet"); + } + if (null == ADODBRecordSet) + { + throw ADP.ArgumentNull("adodb"); + } + if (ADP.IsEmpty(srcTable)) + { + throw ADP.FillRequiresSourceTableName("srcTable"); + } + return FillFromADODB((object)dataSet, ADODBRecordSet, srcTable, true); + } + + private int FillFromADODB(Object data, object adodb, string srcTable, bool multipleResults) + { + Debug.Assert(null != data, "FillFromADODB: null data object"); + Debug.Assert(null != adodb, "FillFromADODB: null ADODB"); + Debug.Assert(!(adodb is DataTable), "call Fill( (DataTable) value)"); + Debug.Assert(!(adodb is DataSet), "call Fill( (DataSet) value)"); + + /* + IntPtr adodbptr = ADP.PtrZero; + try { // generate a new COM Callable Wrapper around the user object so they can't ReleaseComObject on us. + adodbptr = Marshal.GetIUnknownForObject(adodb); + adodb = System.Runtime.Remoting.Services.EnterpriseServicesHelper.WrapIUnknownWithComObject(adodbptr); + } + finally { + if (ADP.PtrZero != adodbptr) { + Marshal.Release(adodbptr); + } + } + */ + + bool closeRecordset = multipleResults; + UnsafeNativeMethods.ADORecordsetConstruction recordset = (adodb as UnsafeNativeMethods.ADORecordsetConstruction); + UnsafeNativeMethods.ADORecordConstruction record = null; + + if (null != recordset) + { + if (multipleResults) + { + // The NextRecordset method is not available on a disconnected Recordset object, where ActiveConnection has been set to NULL + object activeConnection; + activeConnection = ((UnsafeNativeMethods.Recordset15)adodb).get_ActiveConnection(); + + if (null == activeConnection) + { + multipleResults = false; + } + } + } + else + { + record = (adodb as UnsafeNativeMethods.ADORecordConstruction); + + if (null != record) + { + multipleResults = false; // IRow implies CommandBehavior.SingleRow which implies CommandBehavior.SingleResult + } + } + // else throw ODB.Fill_NotADODB("adodb"); /* throw later, less code here*/ + + int results = 0; + if (null != recordset) + { + int resultCount = 0; + bool incrementResultCount; + object[] value = new object[1]; + + do + { + string tmp = null; + if (data is DataSet) + { + tmp = GetSourceTableName(srcTable, resultCount); + } + results += FillFromRecordset(data, recordset, tmp, out incrementResultCount); + + if (multipleResults) + { + value[0] = DBNull.Value; + + object recordsAffected; + object nextresult; + OleDbHResult hr = ((UnsafeNativeMethods.Recordset15)adodb).NextRecordset(out recordsAffected, out nextresult); + + if (0 > hr) + { + // Current provider does not support returning multiple recordsets from a single execution. + if (ODB.ADODB_NextResultError != (int)hr) + { + UnsafeNativeMethods.IErrorInfo errorInfo = null; + UnsafeNativeMethods.GetErrorInfo(0, out errorInfo); + + string message = String.Empty; + if (null != errorInfo) + { + OleDbHResult hresult = ODB.GetErrorDescription(errorInfo, hr, out message); + } + throw new COMException(message, (int)hr); + } + break; + } + adodb = nextresult; + if (null != adodb) + { + recordset = (UnsafeNativeMethods.ADORecordsetConstruction)adodb; + + if (incrementResultCount) + { + resultCount++; + } + continue; + } + } + break; + } while (null != recordset); + + if ((null != recordset) && (closeRecordset || (null == adodb))) + { + FillClose(true, recordset); + } + } + else if (null != record) + { + results = FillFromRecord(data, record, srcTable); + if (closeRecordset) + { + FillClose(false, record); + } + } + else + { + throw ODB.Fill_NotADODB("adodb"); + } + return results; + } + + //override protected int Fill(DataTable dataTable, IDataReader dataReader) { + // return base.Fill(dataTable, dataReader); + //} + + private int FillFromRecordset(Object data, UnsafeNativeMethods.ADORecordsetConstruction recordset, string srcTable, out bool incrementResultCount) + { + incrementResultCount = false; + + IntPtr chapter; /*ODB.DB_NULL_HCHAPTER*/ + object result = null; + try + { + result = recordset.get_Rowset(); + chapter = recordset.get_Chapter(); + } + catch (Exception e) + { + // UNDONE - should not be catching all exceptions!!! + if (!ADP.IsCatchableExceptionType(e)) + { + throw; + } + + throw ODB.Fill_EmptyRecordSet("ADODBRecordSet", e); + } + + if (null != result) + { + CommandBehavior behavior = (MissingSchemaAction.AddWithKey != MissingSchemaAction) ? 0 : CommandBehavior.KeyInfo; + behavior |= CommandBehavior.SequentialAccess; + + OleDbDataReader dataReader = null; + try + { + // intialized with chapter only since we don't want ReleaseChapter called for this chapter handle + ChapterHandle chapterHandle = ChapterHandle.CreateChapterHandle(chapter); + + dataReader = new OleDbDataReader(null, null, 0, behavior); + dataReader.InitializeIRowset(result, chapterHandle, ADP.RecordsUnaffected); + dataReader.BuildMetaInfo(); + + incrementResultCount = (0 < dataReader.FieldCount); + if (incrementResultCount) + { + if (data is DataTable) + { + return base.Fill((DataTable)data, dataReader); + } + else + { + return base.Fill((DataSet)data, srcTable, dataReader, 0, 0); + } + } + } + finally + { + if (null != dataReader) + { + dataReader.Close(); + } + } + } + return 0; + } + + private int FillFromRecord(Object data, UnsafeNativeMethods.ADORecordConstruction record, string srcTable) + { + object result = null; + try + { + result = record.get_Row(); + } + catch (Exception e) + { + // UNDONE - should not be catching all exceptions!!! + if (!ADP.IsCatchableExceptionType(e)) + { + throw; + } + + throw ODB.Fill_EmptyRecord("adodb", e); + } + + if (null != result) + { + CommandBehavior behavior = (MissingSchemaAction.AddWithKey != MissingSchemaAction) ? 0 : CommandBehavior.KeyInfo; + behavior |= CommandBehavior.SequentialAccess | CommandBehavior.SingleRow; + + OleDbDataReader dataReader = null; + try + { + dataReader = new OleDbDataReader(null, null, 0, behavior); + dataReader.InitializeIRow(result, ADP.RecordsUnaffected); + dataReader.BuildMetaInfo(); + + if (data is DataTable) + { + return base.Fill((DataTable)data, dataReader); + } + else + { + return base.Fill((DataSet)data, srcTable, dataReader, 0, 0); + } + } + finally + { + if (null != dataReader) + { + dataReader.Close(); + } + } + } + return 0; + } + + private void FillClose(bool isrecordset, object value) + { + OleDbHResult hr; + if (isrecordset) + { + hr = ((UnsafeNativeMethods.Recordset15)value).Close(); + } + else + { + hr = ((UnsafeNativeMethods._ADORecord)value).Close(); + } + if ((0 < (int)hr) && (ODB.ADODB_AlreadyClosedError != (int)hr)) + { + UnsafeNativeMethods.IErrorInfo errorInfo = null; + UnsafeNativeMethods.GetErrorInfo(0, out errorInfo); + string message = String.Empty; + if (null != errorInfo) + { + OleDbHResult hresult = ODB.GetErrorDescription(errorInfo, hr, out message); + } + throw new COMException(message, (int)hr); + } + } + + override protected void OnRowUpdated(RowUpdatedEventArgs value) + { + OleDbRowUpdatedEventHandler handler = (OleDbRowUpdatedEventHandler)Events[EventRowUpdated]; + if ((null != handler) && (value is OleDbRowUpdatedEventArgs)) + { + handler(this, (OleDbRowUpdatedEventArgs)value); + } + base.OnRowUpdated(value); + } + + override protected void OnRowUpdating(RowUpdatingEventArgs value) + { + OleDbRowUpdatingEventHandler handler = (OleDbRowUpdatingEventHandler)Events[EventRowUpdating]; + if ((null != handler) && (value is OleDbRowUpdatingEventArgs)) + { + handler(this, (OleDbRowUpdatingEventArgs)value); + } + base.OnRowUpdating(value); + } + + static private string GetSourceTableName(string srcTable, int index) + { + //if ((null != srcTable) && (0 <= index) && (index < srcTable.Length)) { + if (0 == index) + { + return srcTable; //[index]; + } + return srcTable + index.ToString(System.Globalization.CultureInfo.InvariantCulture); + } + } +} diff --git a/src/System.Data.OleDb/src/OleDbDataReader.cs b/src/System.Data.OleDb/src/OleDbDataReader.cs new file mode 100644 index 000000000000..f46affc22587 --- /dev/null +++ b/src/System.Data.OleDb/src/OleDbDataReader.cs @@ -0,0 +1,2632 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Collections; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data.Common; +using System.Data.ProviderBase; +using System.Diagnostics; +using System.Globalization; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +namespace System.Data.OleDb +{ + public sealed class OleDbDataReader : DbDataReader + { + private CommandBehavior _commandBehavior; + + // object model interaction + private OleDbConnection _connection; + private OleDbCommand _command; + + // DataReader owns the parameter bindings until CloseDataReader + // this allows OleDbCommand.Dispose to not require OleDbDataReader.Dispose + private Bindings _parameterBindings; + + // OLEDB interfaces + private UnsafeNativeMethods.IMultipleResults _imultipleResults; + private UnsafeNativeMethods.IRowset _irowset; + private UnsafeNativeMethods.IRow _irow; + + private ChapterHandle _chapterHandle = ChapterHandle.DB_NULL_HCHAPTER; + + private int _depth; + private bool _isClosed, _isRead, _hasRows, _hasRowsReadCheck; + + long _sequentialBytesRead; + int _sequentialOrdinal; + + private Bindings[] _bindings; // _metdata contains the ColumnBinding + + // do we need to jump to the next accessor + private int _nextAccessorForRetrieval; + + // must increment the counter before retrieving value so that + // if an exception is thrown, user can continue without erroring again + private int _nextValueForRetrieval; + + // record affected for the current dataset + private IntPtr _recordsAffected = ADP.RecordsUnaffected; + private bool _useIColumnsRowset; + private bool _sequentialAccess; + private bool _singleRow; + + // cached information for Reading (rowhandles/status) + private IntPtr _rowHandleFetchCount; // (>1 fails against jet) + private RowHandleBuffer _rowHandleNativeBuffer; + + private IntPtr _rowFetchedCount; + private int _currentRow; + + private DataTable _dbSchemaTable; + + private int _visibleFieldCount; + private MetaData[] _metadata; + private FieldNameLookup _fieldNameLookup; + + // ctor for an ICommandText, IMultipleResults, IRowset, IRow + // ctor for an ADODB.Recordset, ADODB.Record or Hierarchial resultset + internal OleDbDataReader(OleDbConnection connection, OleDbCommand command, int depth, CommandBehavior commandBehavior) + { + _connection = connection; + _command = command; + _commandBehavior = commandBehavior; + + if ((null != command) && (0 == _depth)) + { + _parameterBindings = command.TakeBindingOwnerShip(); + } + _depth = depth; + } + + private void Initialize() + { + CommandBehavior behavior = _commandBehavior; + _useIColumnsRowset = (0 != (CommandBehavior.KeyInfo & behavior)); + _sequentialAccess = (0 != (CommandBehavior.SequentialAccess & behavior)); + if (0 == _depth) + { + _singleRow = (0 != (CommandBehavior.SingleRow & behavior)); + } + } + + internal void InitializeIMultipleResults(object result) + { + Initialize(); + _imultipleResults = (UnsafeNativeMethods.IMultipleResults)result; // maybe null if no results + } + internal void InitializeIRowset(object result, ChapterHandle chapterHandle, IntPtr recordsAffected) + { + // if from ADODB, connection will be null + if ((null == _connection) || (ChapterHandle.DB_NULL_HCHAPTER != chapterHandle)) + { + _rowHandleFetchCount = new IntPtr(1); + } + + Initialize(); + _recordsAffected = recordsAffected; + _irowset = (UnsafeNativeMethods.IRowset)result; // maybe null if no results + _chapterHandle = chapterHandle; + } + + internal void InitializeIRow(object result, IntPtr recordsAffected) + { + Initialize(); + Debug.Assert(_singleRow, "SingleRow not already set"); + _singleRow = true; + _recordsAffected = recordsAffected; + _irow = (UnsafeNativeMethods.IRow)result; // maybe null if no results + _hasRows = (null != _irow); + } + + internal OleDbCommand Command + { + get + { + return _command; + } + } + + override public int Depth + { + get + { + if (IsClosed) + { + throw ADP.DataReaderClosed("Depth"); + } + return _depth; + } + } + + override public Int32 FieldCount + { + get + { + if (IsClosed) + { + throw ADP.DataReaderClosed("FieldCount"); + } + MetaData[] metadata = MetaData; + return ((null != metadata) ? metadata.Length : 0); + } + } + + override public bool HasRows + { + get + { + if (IsClosed) + { + throw ADP.DataReaderClosed("HasRows"); + } + return _hasRows; + } + } + + override public Boolean IsClosed + { + get + { // if we have a rowset or multipleresults, we may have more to read + Debug.Assert((_singleRow && !_isClosed && !_isRead && (null == _irow) && (null == _irowset)) || + _isClosed == ((null == _irow) && (null == _irowset) && (null == _imultipleResults) + && (null == _dbSchemaTable) && (null == _connection) && (null == _command)), + "IsClosed mismatch"); + return _isClosed; + } + } + + private MetaData[] MetaData + { + get { return _metadata; } + } + + override public int RecordsAffected + { + get + { + return ADP.IntPtrToInt32(_recordsAffected); + } + } + + /* + internal long RecordsAffectedLong { + get { + return (long)_recordsAffected; + } + }*/ + + override public object this[Int32 index] + { + get + { + return GetValue(index); + } + } + + override public object this[String name] + { + get + { + int ordinal = GetOrdinal(name); + return GetValue(ordinal); + } + } + + // grouping the native OLE DB casts togther by required interfaces and optional interfaces + // want these to be methods, not properties otherwise they appear in VS7 managed debugger which attempts to evaluate them + + // required interface, safe cast + private UnsafeNativeMethods.IAccessor IAccessor() + { + return (UnsafeNativeMethods.IAccessor)IRowset(); + } + + // required interface, safe cast + private UnsafeNativeMethods.IRowsetInfo IRowsetInfo() + { + return (UnsafeNativeMethods.IRowsetInfo)IRowset(); + } + + private UnsafeNativeMethods.IRowset IRowset() + { + UnsafeNativeMethods.IRowset irowset = _irowset; + if (null == irowset) + { + Debug.Assert(false, "object is disposed"); + throw new ObjectDisposedException(GetType().Name); + } + return irowset; + } + + private UnsafeNativeMethods.IRow IRow() + { + UnsafeNativeMethods.IRow irow = _irow; + if (null == irow) + { + Debug.Assert(false, "object is disposed"); + throw new ObjectDisposedException(GetType().Name); + } + return irow; + } + + override public DataTable GetSchemaTable() + { + DataTable schemaTable = _dbSchemaTable; + if (null == schemaTable) + { + MetaData[] metadata = MetaData; + if ((null != metadata) && (0 < metadata.Length)) + { + if ((0 < metadata.Length) && _useIColumnsRowset && (null != _connection)) + { + AppendSchemaInfo(); + } + schemaTable = BuildSchemaTable(metadata); + } + else if (IsClosed) + { + throw ADP.DataReaderClosed("GetSchemaTable"); + } + //GetSchemaTable() is defined to return null after NextResult returns false + //throw ADP.DataReaderNoData(); + } + return schemaTable; + } + + internal void BuildMetaInfo() + { + Debug.Assert(null == _metadata, "BuildMetaInfo: already built, by _metadata"); + + if (null != _irowset) + { + if (_useIColumnsRowset) + { + BuildSchemaTableRowset(_irowset); + } + else + { + BuildSchemaTableInfo(_irowset, false, false); + } + if (null != _metadata && 0 < _metadata.Length) + { + // @devnote: because we want to use the DBACCESSOR_OPTIMIZED bit, + // we are required to create the accessor before fetching any rows + CreateAccessors(true); + Debug.Assert(null != _bindings, "unexpected dbBindings"); + } + } + else if (null != _irow) + { + BuildSchemaTableInfo(_irow, false, false); + if (null != _metadata && 0 < _metadata.Length) + { + CreateBindingsFromMetaData(true); + } + } + if (null == _metadata) + { + _hasRows = false; + _visibleFieldCount = 0; + _metadata = new MetaData[0]; + } + } + + private DataTable BuildSchemaTable(MetaData[] metadata) + { + Debug.Assert(null == _dbSchemaTable, "BuildSchemaTable: schema table already exists"); + Debug.Assert(null != metadata, "BuildSchemaTable: no _metadata"); + + DataTable schemaTable = new DataTable("SchemaTable"); + schemaTable.Locale = CultureInfo.InvariantCulture; + schemaTable.MinimumCapacity = metadata.Length; + + DataColumn name = new DataColumn("ColumnName", typeof(System.String)); + DataColumn ordinal = new DataColumn("ColumnOrdinal", typeof(System.Int32)); + DataColumn size = new DataColumn("ColumnSize", typeof(System.Int32)); + DataColumn precision = new DataColumn("NumericPrecision", typeof(System.Int16)); + DataColumn scale = new DataColumn("NumericScale", typeof(System.Int16)); + + DataColumn dataType = new DataColumn("DataType", typeof(System.Type)); + DataColumn providerType = new DataColumn("ProviderType", typeof(System.Int32)); + + DataColumn isLong = new DataColumn("IsLong", typeof(System.Boolean)); + DataColumn allowDBNull = new DataColumn("AllowDBNull", typeof(System.Boolean)); + DataColumn isReadOnly = new DataColumn("IsReadOnly", typeof(System.Boolean)); + DataColumn isRowVersion = new DataColumn("IsRowVersion", typeof(System.Boolean)); + + DataColumn isUnique = new DataColumn("IsUnique", typeof(System.Boolean)); + DataColumn isKey = new DataColumn("IsKey", typeof(System.Boolean)); + DataColumn isAutoIncrement = new DataColumn("IsAutoIncrement", typeof(System.Boolean)); + DataColumn isHidden = new DataColumn("IsHidden", typeof(System.Boolean)); + + DataColumn baseSchemaName = new DataColumn("BaseSchemaName", typeof(System.String)); + DataColumn baseCatalogName = new DataColumn("BaseCatalogName", typeof(System.String)); + DataColumn baseTableName = new DataColumn("BaseTableName", typeof(System.String)); + DataColumn baseColumnName = new DataColumn("BaseColumnName", typeof(System.String)); + + ordinal.DefaultValue = 0; + isLong.DefaultValue = false; + + DataColumnCollection columns = schemaTable.Columns; + + columns.Add(name); + columns.Add(ordinal); + columns.Add(size); + columns.Add(precision); + columns.Add(scale); + + columns.Add(dataType); + columns.Add(providerType); + + columns.Add(isLong); + columns.Add(allowDBNull); + columns.Add(isReadOnly); + columns.Add(isRowVersion); + + columns.Add(isUnique); + columns.Add(isKey); + columns.Add(isAutoIncrement); + if (_visibleFieldCount < metadata.Length) + { + columns.Add(isHidden); + } + + columns.Add(baseSchemaName); + columns.Add(baseCatalogName); + columns.Add(baseTableName); + columns.Add(baseColumnName); + + for (int i = 0; i < metadata.Length; ++i) + { + MetaData info = metadata[i]; + + DataRow newRow = schemaTable.NewRow(); + newRow[name] = info.columnName; + newRow[ordinal] = i; + // @devnote: size is count of characters for WSTR or STR, bytes otherwise + // @devnote: see OLEDB spec under IColumnsInfo::GetColumnInfo + newRow[size] = ((info.type.enumOleDbType != OleDbType.BSTR) ? info.size : -1); + newRow[precision] = info.precision; + newRow[scale] = info.scale; + + newRow[dataType] = info.type.dataType; + newRow[providerType] = info.type.enumOleDbType; + newRow[isLong] = OleDbDataReader.IsLong(info.flags); + if (info.isKeyColumn) + { + newRow[allowDBNull] = OleDbDataReader.AllowDBNull(info.flags); + } + else + { + newRow[allowDBNull] = OleDbDataReader.AllowDBNullMaybeNull(info.flags); + } + newRow[isReadOnly] = OleDbDataReader.IsReadOnly(info.flags); + newRow[isRowVersion] = OleDbDataReader.IsRowVersion(info.flags); + + newRow[isUnique] = info.isUnique; + newRow[isKey] = info.isKeyColumn; + newRow[isAutoIncrement] = info.isAutoIncrement; + if (_visibleFieldCount < metadata.Length) + { + newRow[isHidden] = info.isHidden; + } + + if (null != info.baseSchemaName) + { + newRow[baseSchemaName] = info.baseSchemaName; + } + if (null != info.baseCatalogName) + { + newRow[baseCatalogName] = info.baseCatalogName; + } + if (null != info.baseTableName) + { + newRow[baseTableName] = info.baseTableName; + } + if (null != info.baseColumnName) + { + newRow[baseColumnName] = info.baseColumnName; + } + + schemaTable.Rows.Add(newRow); + newRow.AcceptChanges(); + } + + // mark all columns as readonly + int count = columns.Count; + for (int i = 0; i < count; i++) + { + columns[i].ReadOnly = true; + } + + _dbSchemaTable = schemaTable; + return schemaTable; + } + + private void BuildSchemaTableInfo(object handle, bool filterITypeInfo, bool filterChapters) + { + Debug.Assert(null == _dbSchemaTable, "non-null SchemaTable"); + Debug.Assert(null == _metadata, "non-null metadata"); + Debug.Assert(null != handle, "unexpected null rowset"); + UnsafeNativeMethods.IColumnsInfo icolumnsInfo = (handle as UnsafeNativeMethods.IColumnsInfo); + if (null == icolumnsInfo) + { + _dbSchemaTable = null; +#if DEBUG + if (handle is UnsafeNativeMethods.IRow) + { + Debug.Assert(false, "bad IRow - IColumnsInfo not available"); + } + else + { + Debug.Assert(handle is UnsafeNativeMethods.IRowset, "bad IRowset - IColumnsInfo not available"); + } +#endif + return; + } + + OleDbHResult hr; + IntPtr columnCount = ADP.PtrZero; // column count + IntPtr columnInfos = ADP.PtrZero; // ptr to byvalue tagDBCOLUMNINFO[] + + using (DualCoTaskMem safehandle = new DualCoTaskMem(icolumnsInfo, out columnCount, out columnInfos, out hr)) + { + if (hr < 0) + { + ProcessResults(hr); + } + if (0 < (int)columnCount) + { + BuildSchemaTableInfoTable(columnCount.ToInt32(), columnInfos, filterITypeInfo, filterChapters); + } + } + } + + // create DataColumns + // add DataColumns to DataTable + // add schema information to DataTable + // generate unique column names + private void BuildSchemaTableInfoTable(int columnCount, IntPtr columnInfos, bool filterITypeInfo, bool filterChapters) + { + Debug.Assert(0 < columnCount, "BuildSchemaTableInfoTable - no column"); + + int rowCount = 0; + MetaData[] metainfo = new MetaData[columnCount]; + + // for every column, build an equivalent to tagDBCOLUMNINFO + tagDBCOLUMNINFO dbColumnInfo = new tagDBCOLUMNINFO(); + for (int i = 0, offset = 0; i < columnCount; ++i, offset += ODB.SizeOf_tagDBCOLUMNINFO) + { + Marshal.PtrToStructure(ADP.IntPtrOffset(columnInfos, offset), dbColumnInfo); +#if WIN32 + if (0 >= (int) dbColumnInfo.iOrdinal) { +#else + if (0 >= (long)dbColumnInfo.iOrdinal) + { +#endif + continue; + } + if (OleDbDataReader.DoColumnDropFilter(dbColumnInfo.dwFlags)) + { + continue; + } + + if (null == dbColumnInfo.pwszName) + { + dbColumnInfo.pwszName = ""; + } + if (filterITypeInfo && (ODB.DBCOLUMN_TYPEINFO == dbColumnInfo.pwszName)) + { + continue; + } + if (filterChapters && (NativeDBType.HCHAPTER == dbColumnInfo.wType)) + { + continue; // filter chapters in IRowset from IDBSchemaRowset for DumpToTable + } + + bool islong = OleDbDataReader.IsLong(dbColumnInfo.dwFlags); + bool isfixed = OleDbDataReader.IsFixed(dbColumnInfo.dwFlags); + NativeDBType dbType = NativeDBType.FromDBType(dbColumnInfo.wType, islong, isfixed); + + MetaData info = new MetaData(); + info.columnName = dbColumnInfo.pwszName; + info.type = dbType; + info.ordinal = dbColumnInfo.iOrdinal; +#if WIN32 + info.size = (int)dbColumnInfo.ulColumnSize; +#else + long maxsize = (long)dbColumnInfo.ulColumnSize; + info.size = (((maxsize < 0) || (Int32.MaxValue < maxsize)) ? Int32.MaxValue : (int)maxsize); +#endif + info.flags = dbColumnInfo.dwFlags; + info.precision = dbColumnInfo.bPrecision; + info.scale = dbColumnInfo.bScale; + + info.kind = dbColumnInfo.columnid.eKind; + switch (dbColumnInfo.columnid.eKind) + { + case ODB.DBKIND_GUID_NAME: + case ODB.DBKIND_GUID_PROPID: + case ODB.DBKIND_GUID: + info.guid = dbColumnInfo.columnid.uGuid; + break; + default: + Debug.Assert(ODB.DBKIND_PGUID_NAME != dbColumnInfo.columnid.eKind, "OLE DB providers never return pGuid-style bindings."); + Debug.Assert(ODB.DBKIND_PGUID_PROPID != dbColumnInfo.columnid.eKind, "OLE DB providers never return pGuid-style bindings."); + info.guid = Guid.Empty; + break; + } + switch (dbColumnInfo.columnid.eKind) + { + case ODB.DBKIND_GUID_PROPID: + case ODB.DBKIND_PROPID: + info.propid = dbColumnInfo.columnid.ulPropid; + break; + case ODB.DBKIND_GUID_NAME: + case ODB.DBKIND_NAME: + if (ADP.PtrZero != dbColumnInfo.columnid.ulPropid) + { + info.idname = Marshal.PtrToStringUni(dbColumnInfo.columnid.ulPropid); + } + else + { + info.idname = null; + } + break; + default: + info.propid = ADP.PtrZero; + break; + } + metainfo[rowCount] = info; + +#if DEBUG + if (AdapterSwitches.DataSchema.TraceVerbose) + { + Debug.WriteLine("OleDbDataReader[" + info.ordinal.ToInt64().ToString(CultureInfo.InvariantCulture) + ", " + dbColumnInfo.pwszName + "]=" + dbType.enumOleDbType.ToString() + "," + dbType.dataSourceType + ", " + dbType.wType); + } +#endif + rowCount++; + } + if (rowCount < columnCount) + { // shorten names array appropriately + MetaData[] tmpinfo = new MetaData[rowCount]; + for (int i = 0; i < rowCount; ++i) + { + tmpinfo[i] = metainfo[i]; + } + metainfo = tmpinfo; + } + _visibleFieldCount = rowCount; + _metadata = metainfo; + } + + private void BuildSchemaTableRowset(object handle) + { + Debug.Assert(null == _dbSchemaTable, "BuildSchemaTableRowset - non-null SchemaTable"); + Debug.Assert(null != handle, "BuildSchemaTableRowset(object) - unexpected null handle"); + UnsafeNativeMethods.IColumnsRowset icolumnsRowset = (handle as UnsafeNativeMethods.IColumnsRowset); + + if (null != icolumnsRowset) + { + UnsafeNativeMethods.IRowset rowset = null; + IntPtr cOptColumns; + OleDbHResult hr; + + using (DualCoTaskMem prgOptColumns = new DualCoTaskMem(icolumnsRowset, out cOptColumns, out hr)) + { + Debug.Assert((0 == hr) || prgOptColumns.IsInvalid, "GetAvailableCOlumns: unexpected return"); + hr = icolumnsRowset.GetColumnsRowset(ADP.PtrZero, cOptColumns, prgOptColumns, ref ODB.IID_IRowset, 0, ADP.PtrZero, out rowset); + } + + Debug.Assert((0 <= hr) || (null == rowset), "if GetColumnsRowset failed, rowset should be null"); + if (hr < 0) + { + ProcessResults(hr); + } + DumpToSchemaTable(rowset); + + // release the rowset to avoid race condition between the GC and the user code causing + // "Connection is busy with results for another command" exception + if (null != rowset) + { + Marshal.ReleaseComObject(rowset); + } + } + else + { + _useIColumnsRowset = false; + BuildSchemaTableInfo(handle, false, false); + } + } + + override public void Close() + { + OleDbConnection con = _connection; + OleDbCommand cmd = _command; + Bindings bindings = _parameterBindings; + _connection = null; + _command = null; + _parameterBindings = null; + + _isClosed = true; + + DisposeOpenResults(); + _hasRows = false; + + if ((null != cmd) && cmd.canceling) + { + DisposeNativeMultipleResults(); + + if (null != bindings) + { + bindings.CloseFromConnection(); + bindings = null; + } + } + else + { + UnsafeNativeMethods.IMultipleResults multipleResults = _imultipleResults; + _imultipleResults = null; + + if (null != multipleResults) + { + // if we don't have a cmd, same as a cancel (don't call NextResults) which is ADODB behavior + + try + { + // tricky code path is an exception is thrown + // causing connection to do a ResetState and connection.Close + // resulting in OleDbCommand.CloseFromConnection + if ((null != cmd) && !cmd.canceling) + { + IntPtr affected = IntPtr.Zero; + OleDbException nextResultsFailure = NextResults(multipleResults, null, cmd, out affected); + _recordsAffected = AddRecordsAffected(_recordsAffected, affected); + if (null != nextResultsFailure) + { + throw nextResultsFailure; + } + } + } + finally + { + if (null != multipleResults) + { + Marshal.ReleaseComObject(multipleResults); + } + } + } + } + + if ((null != cmd) && (0 == _depth)) + { + // return bindings back to the cmd after closure of root DataReader + cmd.CloseFromDataReader(bindings); + } + + if (null != con) + { + con.RemoveWeakReference(this); + + // if the DataReader is Finalized it will not close the connection + if (IsCommandBehavior(CommandBehavior.CloseConnection)) + { + con.Close(); + } + } + + // release unmanaged objects + RowHandleBuffer rowHandleNativeBuffer = _rowHandleNativeBuffer; + _rowHandleNativeBuffer = null; + if (null != rowHandleNativeBuffer) + { + rowHandleNativeBuffer.Dispose(); + } + } + + internal void CloseReaderFromConnection(bool canceling) + { + // being called from the connection, we will have a command. that command + // may be Disposed, but it doesn't matter since another command can't execute + // until all DataReader are closed + if (null != _command) + { // UNDONE: understand why this could be null, it shouldn't be but was + _command.canceling = canceling; + } + + // called from the connection which will remove this from its ReferenceCollection + // we want the NextResult behavior, but no errors + _connection = null; + + Close(); + } + + private void DisposeManagedRowset() + { + //not cleared after last rowset + //_hasRows = false; + + _isRead = false; + _hasRowsReadCheck = false; + + _nextAccessorForRetrieval = 0; + _nextValueForRetrieval = 0; + + Bindings[] bindings = _bindings; + _bindings = null; + + if (null != bindings) + { + for (int i = 0; i < bindings.Length; ++i) + { + if (null != bindings[i]) + { + bindings[i].Dispose(); + } + } + } + + _currentRow = 0; + _rowFetchedCount = IntPtr.Zero; + + _dbSchemaTable = null; + _visibleFieldCount = 0; + _metadata = null; + _fieldNameLookup = null; + } + + private void DisposeNativeMultipleResults() + { + UnsafeNativeMethods.IMultipleResults imultipleResults = _imultipleResults; + _imultipleResults = null; + + if (null != imultipleResults) + { + Marshal.ReleaseComObject(imultipleResults); + } + } + + private void DisposeNativeRowset() + { + UnsafeNativeMethods.IRowset irowset = _irowset; + _irowset = null; + + ChapterHandle chapter = _chapterHandle; + _chapterHandle = ChapterHandle.DB_NULL_HCHAPTER; + + if (ChapterHandle.DB_NULL_HCHAPTER != chapter) + { + chapter.Dispose(); + } + + if (null != irowset) + { + Marshal.ReleaseComObject(irowset); + } + } + + private void DisposeNativeRow() + { + UnsafeNativeMethods.IRow irow = _irow; + _irow = null; + + if (null != irow) + { + Marshal.ReleaseComObject(irow); + } + } + + private void DisposeOpenResults() + { + DisposeManagedRowset(); + + DisposeNativeRow(); + DisposeNativeRowset(); + } + + override public Boolean GetBoolean(int ordinal) + { + ColumnBinding binding = GetColumnBinding(ordinal); + return binding.ValueBoolean(); + } + + override public Byte GetByte(int ordinal) + { + ColumnBinding binding = GetColumnBinding(ordinal); + return binding.ValueByte(); + } + + private ColumnBinding DoSequentialCheck(int ordinal, Int64 dataIndex, string method) + { + ColumnBinding binding = GetColumnBinding(ordinal); + + if (dataIndex > Int32.MaxValue) + { + throw ADP.InvalidSourceBufferIndex(0, dataIndex, "dataIndex"); + } + if (_sequentialOrdinal != ordinal) + { + _sequentialOrdinal = ordinal; + _sequentialBytesRead = 0; + } + else if (_sequentialAccess && (_sequentialBytesRead < dataIndex)) + { + throw ADP.NonSeqByteAccess(dataIndex, _sequentialBytesRead, method); + } + // getting the value doesn't really belong, but it's common to both + // callers GetBytes and GetChars so we might as well have the code here + return binding; + } + + override public Int64 GetBytes(int ordinal, Int64 dataIndex, byte[] buffer, Int32 bufferIndex, Int32 length) + { + ColumnBinding binding = DoSequentialCheck(ordinal, dataIndex, ADP.GetBytes); + byte[] value = binding.ValueByteArray(); + + if (null == buffer) + { + return value.Length; + } + int srcIndex = (int)dataIndex; + int byteCount = Math.Min(value.Length - srcIndex, length); + if (srcIndex < 0) + { + throw ADP.InvalidSourceBufferIndex(value.Length, srcIndex, "dataIndex"); + } + else if ((bufferIndex < 0) || (bufferIndex >= buffer.Length)) + { + throw ADP.InvalidDestinationBufferIndex(buffer.Length, bufferIndex, "bufferIndex"); + } + if (0 < byteCount) + { + // @usernote: user may encounter ArgumentException from Buffer.BlockCopy + Buffer.BlockCopy(value, srcIndex, buffer, bufferIndex, byteCount); + _sequentialBytesRead = srcIndex + byteCount; + } + else if (length < 0) + { + throw ADP.InvalidDataLength(length); + } + else + { + byteCount = 0; + } + return byteCount; + } + + override public Int64 GetChars(int ordinal, Int64 dataIndex, char[] buffer, Int32 bufferIndex, Int32 length) + { + ColumnBinding binding = DoSequentialCheck(ordinal, dataIndex, ADP.GetChars); + string value = binding.ValueString(); + + if (null == buffer) + { + return value.Length; + } + + int srcIndex = (int)dataIndex; + int charCount = Math.Min(value.Length - srcIndex, length); + if (srcIndex < 0) + { + throw ADP.InvalidSourceBufferIndex(value.Length, srcIndex, "dataIndex"); + } + else if ((bufferIndex < 0) || (bufferIndex >= buffer.Length)) + { + throw ADP.InvalidDestinationBufferIndex(buffer.Length, bufferIndex, "bufferIndex"); + } + if (0 < charCount) + { + // @usernote: user may encounter ArgumentException from String.CopyTo + value.CopyTo(srcIndex, buffer, bufferIndex, charCount); + _sequentialBytesRead = srcIndex + charCount; + } + else if (length < 0) + { + throw ADP.InvalidDataLength(length); + } + else + { + charCount = 0; + } + return charCount; + } + + [EditorBrowsable(EditorBrowsableState.Never)] + override public Char GetChar(int ordinal) + { + throw ADP.NotSupported(); + } + + [EditorBrowsable(EditorBrowsableState.Advanced)] + new public OleDbDataReader GetData(int ordinal) + { + ColumnBinding binding = GetColumnBinding(ordinal); + return binding.ValueChapter(); + } + + override protected DbDataReader GetDbDataReader(int ordinal) + { + return GetData(ordinal); + } + + internal OleDbDataReader ResetChapter(int bindingIndex, int index, RowBinding rowbinding, int valueOffset) + { + return GetDataForReader(_metadata[bindingIndex + index].ordinal, rowbinding, valueOffset); + } + + private OleDbDataReader GetDataForReader(IntPtr ordinal, RowBinding rowbinding, int valueOffset) + { + UnsafeNativeMethods.IRowsetInfo rowsetInfo = IRowsetInfo(); + UnsafeNativeMethods.IRowset result; + OleDbHResult hr; + hr = rowsetInfo.GetReferencedRowset((IntPtr)ordinal, ref ODB.IID_IRowset, out result); + + ProcessResults(hr); + + OleDbDataReader reader = null; + if (null != result) + { + // only when the first datareader is closed will the connection close + ChapterHandle chapterHandle = ChapterHandle.CreateChapterHandle(result, rowbinding, valueOffset); + reader = new OleDbDataReader(_connection, _command, 1 + Depth, _commandBehavior & ~CommandBehavior.CloseConnection); + reader.InitializeIRowset(result, chapterHandle, ADP.RecordsUnaffected); + reader.BuildMetaInfo(); + reader.HasRowsRead(); + + if (null != _connection) + { + // connection tracks all readers to prevent cmd from executing + // until all readers (including nested) are closed + _connection.AddWeakReference(reader, OleDbReferenceCollection.DataReaderTag); + } + } + return reader; + } + + override public String GetDataTypeName(int index) + { + if (null != _metadata) + { + return _metadata[index].type.dataSourceType; + } + throw ADP.DataReaderNoData(); + } + + override public DateTime GetDateTime(int ordinal) + { + ColumnBinding binding = GetColumnBinding(ordinal); + return binding.ValueDateTime(); + } + + override public Decimal GetDecimal(int ordinal) + { + ColumnBinding binding = GetColumnBinding(ordinal); + return binding.ValueDecimal(); + } + + override public Double GetDouble(int ordinal) + { + ColumnBinding binding = GetColumnBinding(ordinal); + return binding.ValueDouble(); + } + + override public IEnumerator GetEnumerator() + { + return new DbEnumerator((IDataReader)this, IsCommandBehavior(CommandBehavior.CloseConnection)); + } + + override public Type GetFieldType(int index) + { + if (null != _metadata) + { + return _metadata[index].type.dataType; + } + throw ADP.DataReaderNoData(); + } + + override public Single GetFloat(int ordinal) + { + ColumnBinding binding = GetColumnBinding(ordinal); + return binding.ValueSingle(); + } + + override public Guid GetGuid(int ordinal) + { + ColumnBinding binding = GetColumnBinding(ordinal); + return binding.ValueGuid(); + } + + override public Int16 GetInt16(int ordinal) + { + ColumnBinding binding = GetColumnBinding(ordinal); + return binding.ValueInt16(); + } + + override public Int32 GetInt32(int ordinal) + { + ColumnBinding binding = GetColumnBinding(ordinal); + return binding.ValueInt32(); + } + + override public Int64 GetInt64(int ordinal) + { + ColumnBinding binding = GetColumnBinding(ordinal); + return binding.ValueInt64(); + } + + override public String GetName(int index) + { + if (null != _metadata) + { + Debug.Assert(null != _metadata[index].columnName); + return _metadata[index].columnName; + } + throw ADP.DataReaderNoData(); + } + + override public Int32 GetOrdinal(String name) + { + if (null == _fieldNameLookup) + { + if (null == _metadata) + { + throw ADP.DataReaderNoData(); + } + _fieldNameLookup = new FieldNameLookup(this, -1); + } + return _fieldNameLookup.GetOrdinal(name); + } + + override public String GetString(int ordinal) + { + ColumnBinding binding = GetColumnBinding(ordinal); + return binding.ValueString(); + } + + public TimeSpan GetTimeSpan(int ordinal) + { + return (TimeSpan)GetValue(ordinal); + } + + private MetaData DoValueCheck(int ordinal) + { + if (!_isRead) + { + // Read hasn't been called yet or no more data + throw ADP.DataReaderNoData(); + } + else if (_sequentialAccess && (ordinal < _nextValueForRetrieval)) + { + throw ADP.NonSequentialColumnAccess(ordinal, _nextValueForRetrieval); + } + // @usernote: user may encounter the IndexOutOfRangeException + MetaData info = _metadata[ordinal]; + return info; + } + + private ColumnBinding GetColumnBinding(int ordinal) + { + MetaData info = DoValueCheck(ordinal); + return GetValueBinding(info); + } + + private ColumnBinding GetValueBinding(MetaData info) + { + ColumnBinding binding = info.columnBinding; + Debug.Assert(null != binding, "null binding"); + + // do we need to jump to the next accessor + for (int i = _nextAccessorForRetrieval; i <= binding.IndexForAccessor; ++i) + { + Debug.Assert(_nextAccessorForRetrieval <= binding.IndexForAccessor, "backwards index for accessor"); + Debug.Assert(_nextAccessorForRetrieval == i, "failed to increment"); + + if (_sequentialAccess) + { + if (_nextValueForRetrieval != binding.Index) + { // release old value + _metadata[_nextValueForRetrieval].columnBinding.ResetValue(); + } + _nextAccessorForRetrieval = binding.IndexForAccessor; + } + + if (null != _irowset) + { + GetRowDataFromHandle(); // will increment _nextAccessorForRetrieval + } + else if (null != _irow) + { + GetRowValue(); // will increment _nextAccessorForRetrieval + } + else + { + throw ADP.DataReaderNoData(); + } + } + + // to enforce sequential access + _nextValueForRetrieval = binding.Index; + return binding; + } + + override public object GetValue(int ordinal) + { + ColumnBinding binding = GetColumnBinding(ordinal); + object value = binding.Value(); + return value; + } + + override public Int32 GetValues(object[] values) + { + if (null == values) + { + throw ADP.ArgumentNull("values"); + } + MetaData info = DoValueCheck(0); + int count = Math.Min(values.Length, _visibleFieldCount); + for (int i = 0; (i < _metadata.Length) && (i < count); ++i) + { + ColumnBinding binding = GetValueBinding(_metadata[i]); + values[i] = binding.Value(); + } + return count; + } + + private bool IsCommandBehavior(CommandBehavior condition) + { + return (condition == (condition & _commandBehavior)); + } + + override public Boolean IsDBNull(int ordinal) + { + ColumnBinding binding = GetColumnBinding(ordinal); + return binding.IsValueNull(); + } + + private void ProcessResults(OleDbHResult hr) + { + Exception e; + if (null != _command) + { + e = OleDbConnection.ProcessResults(hr, _connection, _command); + } + else + { + e = OleDbConnection.ProcessResults(hr, _connection, _connection); + } + if (null != e) + { throw e; } + } + + static private IntPtr AddRecordsAffected(IntPtr recordsAffected, IntPtr affected) + { +#if WIN32 + if (0 <= (int)affected) { + if (0 <= (int)recordsAffected) { + return (IntPtr)((int)recordsAffected + (int)affected); +#else + if (0 <= (long)affected) + { + if (0 <= (long)recordsAffected) + { + return (IntPtr)((long)recordsAffected + (long)affected); +#endif + } + return affected; + } + return recordsAffected; + } + + override public int VisibleFieldCount + { + get + { + if (IsClosed) + { + throw ADP.DataReaderClosed("VisibleFieldCount"); + } + return _visibleFieldCount; + } + } + + internal void HasRowsRead() + { + Debug.Assert(!_hasRowsReadCheck, "_hasRowsReadCheck not reset"); + bool flag = Read(); + _hasRows = flag; + _hasRowsReadCheck = true; + _isRead = false; + } + + static internal OleDbException NextResults(UnsafeNativeMethods.IMultipleResults imultipleResults, OleDbConnection connection, OleDbCommand command, out IntPtr recordsAffected) + { + recordsAffected = ADP.RecordsUnaffected; + List exceptions = null; + if (null != imultipleResults) + { + object result; + IntPtr affected; + OleDbHResult hr; + + // MSOLAP provider doesn't move onto the next result when calling GetResult with IID_NULL, but does return S_OK with 0 affected records. + // we want to break out of that infinite loop for ExecuteNonQuery and the multiple result Close scenarios + for (int loop = 0; ; ++loop) + { + if ((null != command) && command.canceling) + { + break; + } + hr = imultipleResults.GetResult(ADP.PtrZero, ODB.DBRESULTFLAG_DEFAULT, ref ODB.IID_NULL, out affected, out result); + + // If a provider doesn't support IID_NULL and returns E_NOINTERFACE we want to break out + // of the loop without throwing an exception. Our behavior will match ADODB in that scenario + // where Recordset.Close just releases the interfaces without proccessing remaining results + if ((OleDbHResult.DB_S_NORESULT == hr) || (OleDbHResult.E_NOINTERFACE == hr)) + { + break; + } + if (null != connection) + { + Exception e = OleDbConnection.ProcessResults(hr, connection, command); + if (null != e) + { + OleDbException excep = (e as OleDbException); + if (null != excep) + { + if (null == exceptions) + { + exceptions = new List(); + } + exceptions.Add(excep); + } + else + { + Debug.Assert(OleDbHResult.DB_E_OBJECTOPEN == hr, "unexpected"); + throw e; // we don't expect to be here, but it could happen + } + } + } + else if (hr < 0) + { + SafeNativeMethods.Wrapper.ClearErrorInfo(); + break; + } + recordsAffected = AddRecordsAffected(recordsAffected, affected); + + if (0 != (int)affected) + { + loop = 0; + } + else if (2000 <= loop) + { // (reason for more than 1000 iterations) + NextResultsInfinite(); + break; + } + } + } + if (null != exceptions) + { + return OleDbException.CombineExceptions(exceptions); + } + return null; + } + + static private void NextResultsInfinite() + { + // edtriou's suggestion is that we debug assert so that users will learn of MSOLAP's misbehavior and not call ExecuteNonQuery + Debug.Assert(false, " System.Data.OleDb.OleDbDataReader: 2000 IMultipleResult.GetResult(NULL, DBRESULTFLAG_DEFAULT, IID_NULL, NULL, NULL) iterations with 0 records affected. Stopping suspect infinite loop. To work-around try using ExecuteReader() and iterating through results with NextResult().\n"); + } + + override public bool NextResult() + { + bool retflag = false; + if (IsClosed) + { + throw ADP.DataReaderClosed("NextResult"); + } + _fieldNameLookup = null; + + OleDbCommand command = _command; + UnsafeNativeMethods.IMultipleResults imultipleResults = _imultipleResults; + if (null != imultipleResults) + { + DisposeOpenResults(); + _hasRows = false; + + for (; ; ) + { + Debug.Assert(null == _irow, "NextResult: row loop check"); + Debug.Assert(null == _irowset, "NextResult: rowset loop check"); + + object result = null; + OleDbHResult hr; + IntPtr affected; + + if ((null != command) && command.canceling) + { + Close(); + break; + } + hr = imultipleResults.GetResult(ADP.PtrZero, ODB.DBRESULTFLAG_DEFAULT, ref ODB.IID_IRowset, out affected, out result); + + if ((0 <= hr) && (null != result)) + { + _irowset = (UnsafeNativeMethods.IRowset)result; + } + _recordsAffected = AddRecordsAffected(_recordsAffected, affected); + + if (OleDbHResult.DB_S_NORESULT == hr) + { + DisposeNativeMultipleResults(); + break; + } + // @devnote: infomessage events may be fired from here + ProcessResults(hr); + + if (null != _irowset) + { + BuildMetaInfo(); + HasRowsRead(); + retflag = true; + break; + } + } + } + else + { + DisposeOpenResults(); + _hasRows = false; + } + return retflag; + } + + override public bool Read() + { + bool retflag = false; + OleDbCommand command = _command; + if ((null != command) && command.canceling) + { + DisposeOpenResults(); + } + else if (null != _irowset) + { + if (_hasRowsReadCheck) + { + _isRead = retflag = _hasRows; + _hasRowsReadCheck = false; + } + else if (_singleRow && _isRead) + { + DisposeOpenResults(); + } + else + { + retflag = ReadRowset(); + } + } + else if (null != _irow) + { + retflag = ReadRow(); + } + else if (IsClosed) + { + throw ADP.DataReaderClosed("Read"); + } + return retflag; + } + + private bool ReadRow() + { + if (_isRead) + { + _isRead = false; // for DoValueCheck + + DisposeNativeRow(); + + _sequentialOrdinal = -1; // sequentialBytesRead will reset when used + } + else + { + _isRead = true; + return (0 < _metadata.Length); + } + return false; + } + + private bool ReadRowset() + { + Debug.Assert(null != _irowset, "ReadRow: null IRowset"); + Debug.Assert(0 <= _metadata.Length, "incorrect state for fieldCount"); + + // releases bindings as necessary + // bumps current row, else resets it back to initial state + ReleaseCurrentRow(); + + _sequentialOrdinal = -1; // sequentialBytesRead will reset when used + + // making the check if (null != irowset) unnecessary + // if necessary, get next group of row handles + if (IntPtr.Zero == _rowFetchedCount) + { // starts at (-1 <= 0) + Debug.Assert(0 == _currentRow, "incorrect state for _currentRow"); + Debug.Assert(0 <= _metadata.Length, "incorrect state for fieldCount"); + Debug.Assert(0 == _nextAccessorForRetrieval, "incorrect state for nextAccessorForRetrieval"); + Debug.Assert(0 == _nextValueForRetrieval, "incorrect state for nextValueForRetrieval"); + + // @devnote: releasing row handles occurs next time user calls read, skip, or close + GetRowHandles(/*skipCount*/); + } + return ((_currentRow <= (int)_rowFetchedCount) && _isRead); + } + + private void ReleaseCurrentRow() + { + Debug.Assert(null != _irowset, "ReleaseCurrentRow: no rowset"); + + if (0 < (int)_rowFetchedCount) + { + // release the data in the current row + Bindings[] bindings = _bindings; + Debug.Assert(null != bindings, "ReleaseCurrentRow: null dbBindings"); + for (int i = 0; (i < bindings.Length) && (i < _nextAccessorForRetrieval); ++i) + { + bindings[i].CleanupBindings(); + } + _nextAccessorForRetrieval = 0; + _nextValueForRetrieval = 0; + + _currentRow++; + if (_currentRow == (int)_rowFetchedCount) + { + ReleaseRowHandles(); + } + } + } + + private void CreateAccessors(bool allowMultipleAccessor) + { + Debug.Assert(null == _bindings, "CreateAccessor: dbBindings already exists"); + Debug.Assert(null != _irowset, "CreateAccessor: no IRowset available"); + Debug.Assert(null != _metadata && 0 < _metadata.Length, "no columns"); + + Bindings[] dbBindings = CreateBindingsFromMetaData(allowMultipleAccessor); + + UnsafeNativeMethods.IAccessor iaccessor = IAccessor(); + for (int i = 0; i < dbBindings.Length; ++i) + { + OleDbHResult hr = dbBindings[i].CreateAccessor(iaccessor, ODB.DBACCESSOR_ROWDATA); + if (hr < 0) + { + ProcessResults(hr); + } + } + + if (IntPtr.Zero == _rowHandleFetchCount) + { + _rowHandleFetchCount = new IntPtr(1); + + object maxRows = GetPropertyValue(ODB.DBPROP_MAXROWS); + if (maxRows is Int32) + { + _rowHandleFetchCount = new IntPtr((int)maxRows); + if ((ADP.PtrZero == _rowHandleFetchCount) || (20 <= (int)_rowHandleFetchCount)) + { + _rowHandleFetchCount = new IntPtr(20); + } + } + else if (maxRows is Int64) + { + _rowHandleFetchCount = new IntPtr((long)maxRows); + if ((ADP.PtrZero == _rowHandleFetchCount) || (20 <= (long)_rowHandleFetchCount)) + { + _rowHandleFetchCount = new IntPtr(20); + } + } + } + if (null == _rowHandleNativeBuffer) + { + _rowHandleNativeBuffer = new RowHandleBuffer(_rowHandleFetchCount); + } + } + + private Bindings[] CreateBindingsFromMetaData(bool allowMultipleAccessor) + { + int bindingCount = 0; + int currentBindingIndex = 0; + + MetaData[] metadata = _metadata; + + int[] indexToBinding = new int[metadata.Length]; + int[] indexWithinBinding = new int[metadata.Length]; + + // walk through the schemaRows to determine the number of binding groups + if (allowMultipleAccessor) + { + if (null != _irowset) + { + for (int i = 0; i < indexToBinding.Length; ++i) + { + indexToBinding[i] = bindingCount; + indexWithinBinding[i] = currentBindingIndex; +#if false + // @denote: single/multiple Accessors + if ((bindingCount < 2) && IsLong(metadata[i].flags)) { + bindingCount++; + currentBindingIndex = 0; + } + else { + currentBindingIndex++; + } +#elif false + // @devnote: one accessor per column option + bindingCount++; + currentBindingIndex = 0; +#else + // @devnote: one accessor only for IRowset + currentBindingIndex++; +#endif + } + if (0 < currentBindingIndex) + { // when blob is not the last column + bindingCount++; + } + } + else if (null != _irow) + { + for (int i = 0; i < indexToBinding.Length; ++i) + { + indexToBinding[i] = i; + indexWithinBinding[i] = 0; + } + bindingCount = metadata.Length; + } + } + else + { + for (int i = 0; i < indexToBinding.Length; ++i) + { + indexToBinding[i] = 0; + indexWithinBinding[i] = i; + } + bindingCount = 1; + } + + Bindings bindings; + Bindings[] dbbindings = new Bindings[bindingCount]; + bindingCount = 0; + + // for every column, build tagDBBinding info + for (int index = 0; index < metadata.Length; ++index) + { + Debug.Assert(indexToBinding[index] < dbbindings.Length, "bad indexToAccessor"); + bindings = dbbindings[indexToBinding[index]]; + if (null == bindings) + { + bindingCount = 0; + for (int i = index; (i < metadata.Length) && (bindingCount == indexWithinBinding[i]); ++i) + { + bindingCount++; + } + dbbindings[indexToBinding[index]] = bindings = new Bindings((OleDbDataReader)this, (null != _irowset), bindingCount); + + // runningTotal is buffered to start values on 16-byte boundary + // the first columnCount * 8 bytes are for the length and status fields + //bindings.DataBufferSize = (bindingCount + (bindingCount % 2)) * sizeof_int64; + } + MetaData info = metadata[index]; + + int maxLen = info.type.fixlen; + short getType = info.type.wType; + + Debug.Assert(NativeDBType.STR != getType, "Should have bound as WSTR"); + Debug.Assert(!NativeDBType.HasHighBit(getType), "CreateAccessor - unexpected high bits on datatype"); + + if (-1 != info.size) + { + if (info.type.islong) + { + maxLen = ADP.PtrSize; + getType = (short)((ushort)getType | (ushort)NativeDBType.BYREF); + } + else if (-1 == maxLen) + { + // @devnote: not using provider owned memory for PDC, no one really supports it anyway. + /*if (((null != connection) && connection.PropertyGetProviderOwnedMemory()) + || ((null != command) && command.Connection.PropertyGetProviderOwnedMemory())) { + bindings.MemOwner = DBMemOwner.ProviderOwned; + + bindings.MaxLen = ADP.PtrSize; + bindings.DbType = (short) (getType | DbType.BYREF); + } + else*/ + + if (ODB.LargeDataSize < info.size) + { + maxLen = ADP.PtrSize; + getType = (short)((ushort)getType | (ushort)NativeDBType.BYREF); + } + else if ((NativeDBType.WSTR == getType) && (-1 != info.size)) + { + maxLen = info.size * 2 + 2; + } + else + { + maxLen = info.size; + } + } + } + else if (maxLen < 0) + { + // if variable length and no defined size we require this to be byref at this time + /*if (((null != connection) && connection.PropertyGetProviderOwnedMemory()) + || ((null != command) && command.Connection.PropertyGetProviderOwnedMemory())) { + bindings.MemOwner = DBMemOwner.ProviderOwned; + }*/ + maxLen = ADP.PtrSize; + getType = (short)((ushort)getType | (ushort)NativeDBType.BYREF); + } + + currentBindingIndex = indexWithinBinding[index]; + bindings.CurrentIndex = currentBindingIndex; + + bindings.Ordinal = info.ordinal; + bindings.Part = info.type.dbPart; + bindings.Precision = (byte)info.precision; + bindings.Scale = (byte)info.scale; + bindings.DbType = (short)getType; + bindings.MaxLen = maxLen; // also increments databuffer size (uses DbType) + + //bindings.ValueOffset = // set via MaxLen + //bindings.LengthOffset = // set via MaxLen + //bindings.StatusOffset = // set via MaxLen + //bindings.TypeInfoPtr = 0; + //bindings.ObjectPtr = 0; + //bindings.BindExtPtr = 0; + //bindings.MemOwner = /*DBMEMOWNER_CLIENTOWNED*/0; + //bindings.ParamIO = ODB.DBPARAMIO_NOTPARAM; + //bindings.Flags = 0; + } + + int count = 0, indexStart = 0; + for (int i = 0; i < dbbindings.Length; ++i) + { + indexStart = dbbindings[i].AllocateForAccessor(this, indexStart, i); + + ColumnBinding[] columnBindings = dbbindings[i].ColumnBindings(); + for (int k = 0; k < columnBindings.Length; ++k) + { + Debug.Assert(count == columnBindings[k].Index, "column binding mismatch"); + metadata[count].columnBinding = columnBindings[k]; + metadata[count].bindings = dbbindings[i]; + count++; + } + } + + _bindings = dbbindings; + return dbbindings; + } + + private void GetRowHandles(/*int skipCount*/) + { + Debug.Assert(0 < (int)_rowHandleFetchCount, "GetRowHandles: bad _rowHandleFetchCount"); + Debug.Assert(!_isRead, "GetRowHandles: _isRead"); + + OleDbHResult hr = 0; + + RowHandleBuffer rowHandleBuffer = _rowHandleNativeBuffer; + bool mustRelease = false; + + RuntimeHelpers.PrepareConstrainedRegions(); + try + { + rowHandleBuffer.DangerousAddRef(ref mustRelease); + + IntPtr rowHandlesPtr = rowHandleBuffer.DangerousGetHandle(); + UnsafeNativeMethods.IRowset irowset = IRowset(); + try + { + hr = irowset.GetNextRows(_chapterHandle.HChapter, /*skipCount*/IntPtr.Zero, _rowHandleFetchCount, out _rowFetchedCount, ref rowHandlesPtr); + Debug.Assert(rowHandleBuffer.DangerousGetHandle() == rowHandlesPtr, "rowhandlebuffer changed"); + } + catch (System.InvalidCastException e) + { + throw ODB.ThreadApartmentState(e); + } + } + finally + { + if (mustRelease) + { + rowHandleBuffer.DangerousRelease(); + } + } + + //if (/*DB_S_ROWLIMITEXCEEDED*/0x00040EC0 == hr) { + // _rowHandleFetchCount = 1; + // _isRead = true; + //} else + if (hr < 0) + { + // filter out the BadStartPosition due to the skipCount which + // maybe greater than the number of rows in the return rowset + //const int /*OLEDB_Error.*/DB_E_BADSTARTPOSITION = unchecked((int)0x80040E1E); + //if (DB_E_BADSTARTPOSITION != hr) + ProcessResults(hr); + } + _isRead = ((OleDbHResult.DB_S_ENDOFROWSET != hr) || (0 < (int)_rowFetchedCount)); + _rowFetchedCount = (IntPtr)Math.Max((int)_rowFetchedCount, 0); + } + + private void GetRowDataFromHandle() + { + Debug.Assert(null != _bindings, "GetRowDataFromHandle: null dbBindings"); + Debug.Assert(null != _rowHandleNativeBuffer, "GetRowDataFromHandle: null dbBindings"); + + OleDbHResult hr = 0; + UnsafeNativeMethods.IRowset irowset = IRowset(); + + IntPtr rowHandle = _rowHandleNativeBuffer.GetRowHandle(_currentRow); + + RowBinding rowBinding = _bindings[_nextAccessorForRetrieval].RowBinding(); + IntPtr accessorHandle = rowBinding.DangerousGetAccessorHandle(); + + bool mustRelease = false; + RuntimeHelpers.PrepareConstrainedRegions(); + try + { + rowBinding.DangerousAddRef(ref mustRelease); + rowBinding.StartDataBlock(); + + IntPtr dataPtr = rowBinding.DangerousGetDataPtr(); + hr = irowset.GetData(rowHandle, accessorHandle, dataPtr); + } + finally + { + if (mustRelease) + { + rowBinding.DangerousRelease(); + } + } + + _nextAccessorForRetrieval++; + if (hr < 0) + { + ProcessResults(hr); + } + } + + private void ReleaseRowHandles() + { + Debug.Assert(0 < (int)_rowFetchedCount, "invalid _rowFetchedCount"); + + OleDbHResult hr; + UnsafeNativeMethods.IRowset irowset = IRowset(); + hr = irowset.ReleaseRows(_rowFetchedCount, _rowHandleNativeBuffer, ADP.PtrZero, ADP.PtrZero, ADP.PtrZero); + + if (hr < 0) + { + //ProcessFailure(hr); + //ProcessFailure(hr); + SafeNativeMethods.Wrapper.ClearErrorInfo(); + } + _rowFetchedCount = IntPtr.Zero; + _currentRow = 0; + _isRead = false; + } + + private object GetPropertyValue(int propertyId) + { + if (null != _irowset) + { + return GetPropertyOnRowset(OleDbPropertySetGuid.Rowset, propertyId); + } + else if (null != _command) + { + return _command.GetPropertyValue(OleDbPropertySetGuid.Rowset, propertyId); + } + return OleDbPropertyStatus.NotSupported; + } + + private object GetPropertyOnRowset(Guid propertySet, int propertyID) + { + OleDbHResult hr; + tagDBPROP[] dbprops; + UnsafeNativeMethods.IRowsetInfo irowsetinfo = IRowsetInfo(); + + using (PropertyIDSet propidset = new PropertyIDSet(propertySet, propertyID)) + { + using (DBPropSet propset = new DBPropSet(irowsetinfo, propidset, out hr)) + { + if (hr < 0) + { + // OLEDB Data Reader masks provider specific errors by raising "Internal Data Provider error 30." + // DBPropSet c-tor will register the exception and it will be raised at GetPropertySet call in case of failure + SafeNativeMethods.Wrapper.ClearErrorInfo(); + } + dbprops = propset.GetPropertySet(0, out propertySet); + } + } + if (OleDbPropertyStatus.Ok == dbprops[0].dwStatus) + { + return dbprops[0].vValue; + } + return dbprops[0].dwStatus; + } + + private void GetRowValue() + { + Debug.Assert(null != _irow, "GetRowValue: null IRow"); + Debug.Assert(null != _metadata, "GetRowValue: null MetaData"); + + Bindings bindings = _bindings[_nextAccessorForRetrieval]; + ColumnBinding[] columnBindings = bindings.ColumnBindings(); + RowBinding rowBinding = bindings.RowBinding(); + Debug.Assert(_nextValueForRetrieval <= columnBindings[0].Index, "backwards retrieval"); + + bool mustReleaseBinding = false; + bool[] mustRelease = new bool[columnBindings.Length]; + StringMemHandle[] sptr = new StringMemHandle[columnBindings.Length]; + + RuntimeHelpers.PrepareConstrainedRegions(); + try + { + for (int i = 0; i < columnBindings.Length; ++i) + { + bindings.CurrentIndex = i; + + sptr[i] = null; + MetaData info = _metadata[columnBindings[i].Index]; + if ((ODB.DBKIND_GUID_NAME == info.kind) || (ODB.DBKIND_NAME == info.kind)) + { + sptr[i] = new StringMemHandle(info.idname); + columnBindings[i]._sptr = sptr[i]; + } + + sptr[i].DangerousAddRef(ref mustRelease[i]); + + IntPtr ulPropid = ((null != sptr[i]) ? sptr[i].DangerousGetHandle() : info.propid); + bindings.GuidKindName(info.guid, info.kind, ulPropid); + } + + OleDbHResult hr; + tagDBCOLUMNACCESS[] access = bindings.DBColumnAccess; + + rowBinding.DangerousAddRef(ref mustReleaseBinding); + rowBinding.StartDataBlock(); + + UnsafeNativeMethods.IRow irow = IRow(); + hr = irow.GetColumns((IntPtr)access.Length, access); + } + finally + { + if (mustReleaseBinding) + { + rowBinding.DangerousRelease(); + } + for (int i = 0; i < mustRelease.Length; i++) + { + if (mustRelease[i]) + { + sptr[i].DangerousRelease(); + } + } + } + _nextAccessorForRetrieval++; + } + + private Int32 IndexOf(Hashtable hash, string name) + { + // via case sensitive search, first match with lowest ordinal matches + object index = hash[name]; + if (null != index) + { + return (int)index; // match via case-insensitive or by chance lowercase + } + + // via case insensitive search, first match with lowest ordinal matches + string tmp = name.ToLower(CultureInfo.InvariantCulture); + index = hash[tmp]; // match via lowercase + return ((null != index) ? (int)index : -1); + } + + private void AppendSchemaInfo() + { + Debug.Assert(null != _connection, "null connection"); + Debug.Assert(null != _metadata, "no _metadata"); + + if (_metadata.Length <= 0) + { + return; + } + + int keyCount = 0; + for (int i = 0; i < _metadata.Length; ++i) + { + if (_metadata[i].isKeyColumn && !_metadata[i].isHidden) + { + keyCount++; + } + } + if (0 != keyCount) /*|| _connection.IsServer_msdaora || _connection.IsServer_Microsoft_SQL)*/ + { + return; + } + + string schemaName, catalogName; // enforce single table + string baseSchemaName = null, baseCatalogName = null, baseTableName = null; + for (int i = 0; i < _metadata.Length; ++i) + { + MetaData info = _metadata[i]; + if ((null != info.baseTableName) && (0 < info.baseTableName.Length)) + { + catalogName = ((null != info.baseCatalogName) ? info.baseCatalogName : ""); + schemaName = ((null != info.baseSchemaName) ? info.baseSchemaName : ""); + if (null == baseTableName) + { + baseSchemaName = schemaName; + baseCatalogName = catalogName; + baseTableName = info.baseTableName; + } + else if ((0 != ADP.SrcCompare(baseTableName, info.baseTableName)) + || (0 != ADP.SrcCompare(baseCatalogName, catalogName)) + || (0 != ADP.SrcCompare(baseSchemaName, schemaName))) + { +#if DEBUG + if (AdapterSwitches.DataSchema.TraceVerbose) + { + Debug.WriteLine("Multiple BaseTableName detected:" + + " <" + baseCatalogName + "." + baseCatalogName + "." + baseTableName + ">" + + " <" + info.baseCatalogName + "." + info.baseCatalogName + "." + info.baseTableName + ">"); + } +#endif + baseTableName = null; + break; + } + } + } + if (null == baseTableName) + { + return; + } + baseCatalogName = ADP.IsEmpty(baseCatalogName) ? null : baseCatalogName; + baseSchemaName = ADP.IsEmpty(baseSchemaName) ? null : baseSchemaName; + + if (null != _connection) + { + if (ODB.DBPROPVAL_IC_SENSITIVE == _connection.QuotedIdentifierCase()) + { + string p = null, s = null; + _connection.GetLiteralQuotes(ADP.GetSchemaTable, out s, out p); + if (null == s) + { + s = ""; + } + if (null == p) + { + p = ""; + } + baseTableName = s + baseTableName + p; + } + } + + Hashtable baseColumnNames = new Hashtable(_metadata.Length * 2); + + for (int i = _metadata.Length - 1; 0 <= i; --i) + { + string basecolumname = _metadata[i].baseColumnName; + if (!ADP.IsEmpty(basecolumname)) + { + baseColumnNames[basecolumname] = i; + } + } + for (int i = 0; i < _metadata.Length; ++i) + { + string basecolumname = _metadata[i].baseColumnName; + if (!ADP.IsEmpty(basecolumname)) + { + basecolumname = basecolumname.ToLower(CultureInfo.InvariantCulture); + if (!baseColumnNames.Contains(basecolumname)) + { + baseColumnNames[basecolumname] = i; + } + } + } + + // look for primary keys in the table + if (_connection.SupportSchemaRowset(OleDbSchemaGuid.Primary_Keys)) + { + Object[] restrictions = new Object[] { baseCatalogName, baseSchemaName, baseTableName }; + keyCount = AppendSchemaPrimaryKey(baseColumnNames, restrictions); + } + if (0 != keyCount) + { + return; + } + + // look for a single unique contraint that can be upgraded + if (_connection.SupportSchemaRowset(OleDbSchemaGuid.Indexes)) + { + Object[] restrictions = new Object[] { baseCatalogName, baseSchemaName, null, null, baseTableName }; + AppendSchemaUniqueIndexAsKey(baseColumnNames, restrictions); + } + } + + private int AppendSchemaPrimaryKey(Hashtable baseColumnNames, object[] restrictions) + { + int keyCount = 0; + bool partialPrimaryKey = false; + DataTable table = null; + try + { + table = _connection.GetSchemaRowset(OleDbSchemaGuid.Primary_Keys, restrictions); + } + catch (Exception e) + { + // UNDONE - should not be catching all exceptions!!! + if (!ADP.IsCatchableExceptionType(e)) + { + throw; + } + + ADP.TraceExceptionWithoutRethrow(e); + } + if (null != table) + { + DataColumnCollection dataColumns = table.Columns; + int nameColumnIndex = dataColumns.IndexOf(ODB.COLUMN_NAME); + + if (-1 != nameColumnIndex) + { + DataColumn nameColumn = dataColumns[nameColumnIndex]; + foreach (DataRow dataRow in table.Rows) + { + string name = (string)dataRow[nameColumn, DataRowVersion.Default]; + + int metaindex = IndexOf(baseColumnNames, name); + if (0 <= metaindex) + { + MetaData info = _metadata[metaindex]; + info.isKeyColumn = true; + info.flags &= ~ODB.DBCOLUMNFLAGS_ISNULLABLE; + keyCount++; + } + else + { +#if DEBUG + if (AdapterSwitches.DataSchema.TraceVerbose) + { + Debug.WriteLine("PartialKeyColumn detected: <" + name + "> metaindex=" + metaindex); + } +#endif + partialPrimaryKey = true; + break; + } + } + } + } + if (partialPrimaryKey) + { // partial primary key detected + for (int i = 0; i < _metadata.Length; ++i) + { + _metadata[i].isKeyColumn = false; + } + return -1; + } + return keyCount; + } + + private void AppendSchemaUniqueIndexAsKey(Hashtable baseColumnNames, object[] restrictions) + { + bool partialPrimaryKey = false; + DataTable table = null; + try + { + table = _connection.GetSchemaRowset(OleDbSchemaGuid.Indexes, restrictions); + } + catch (Exception e) + { + // UNDONE - should not be catching all exceptions!!! + if (!ADP.IsCatchableExceptionType(e)) + { + throw; + } + + ADP.TraceExceptionWithoutRethrow(e); + } + if (null != table) + { + DataColumnCollection dataColumns = table.Columns; + + int indxIndex = dataColumns.IndexOf(ODB.INDEX_NAME); + int pkeyIndex = dataColumns.IndexOf(ODB.PRIMARY_KEY); + int uniqIndex = dataColumns.IndexOf(ODB.UNIQUE); + int nameIndex = dataColumns.IndexOf(ODB.COLUMN_NAME); + int nullIndex = dataColumns.IndexOf(ODB.NULLS); + + if ((-1 != indxIndex) && (-1 != pkeyIndex) && (-1 != uniqIndex) && (-1 != nameIndex)) + { + DataColumn indxColumn = dataColumns[indxIndex]; + DataColumn pkeyColumn = dataColumns[pkeyIndex]; + DataColumn uniqCOlumn = dataColumns[uniqIndex]; + DataColumn nameColumn = dataColumns[nameIndex]; + DataColumn nulls = ((-1 != nullIndex) ? dataColumns[nullIndex] : null); + + bool[] keys = new bool[_metadata.Length]; + bool[] uniq = new bool[_metadata.Length]; + string uniqueIndexName = null; + + // match pkey name BaseColumnName + foreach (DataRow dataRow in table.Rows) + { + bool isPKey = (!dataRow.IsNull(pkeyColumn, DataRowVersion.Default) && (bool)dataRow[pkeyColumn, DataRowVersion.Default]); + bool isUniq = (!dataRow.IsNull(uniqCOlumn, DataRowVersion.Default) && (bool)dataRow[uniqCOlumn, DataRowVersion.Default]); + bool nullsVal = (null != nulls) && (dataRow.IsNull(nulls, DataRowVersion.Default) || (ODB.DBPROPVAL_IN_ALLOWNULL == Convert.ToInt32(dataRow[nulls, DataRowVersion.Default], CultureInfo.InvariantCulture))); + + if (isPKey || isUniq) + { + string name = (string)dataRow[nameColumn, DataRowVersion.Default]; + + int metaindex = IndexOf(baseColumnNames, name); + if (0 <= metaindex) + { + if (isPKey) + { + keys[metaindex] = true; + } + if (isUniq && (null != uniq)) + { + uniq[metaindex] = true; + + string indexname = (string)dataRow[indxColumn, DataRowVersion.Default]; + if (null == uniqueIndexName) + { + uniqueIndexName = indexname; + } + else if (indexname != uniqueIndexName) + { +#if DEBUG + if (AdapterSwitches.DataSchema.TraceVerbose) + { + Debug.WriteLine("MultipleUniqueIndexes detected: <" + uniqueIndexName + "> <" + indexname + ">"); + } +#endif + uniq = null; + } + } + } + else if (isPKey) + { +#if DEBUG + if (AdapterSwitches.DataSchema.TraceVerbose) + { + Debug.WriteLine("PartialKeyColumn detected: " + name); + } +#endif + partialPrimaryKey = true; + break; + } + else if (null != uniqueIndexName) + { + string indexname = (string)dataRow[indxColumn, DataRowVersion.Default]; + + if (indexname != uniqueIndexName) + { +#if DEBUG + if (AdapterSwitches.DataSchema.TraceVerbose) + { + Debug.WriteLine("PartialUniqueIndexes detected: <" + uniqueIndexName + "> <" + indexname + ">"); + } +#endif + uniq = null; + } + } + } + } + if (partialPrimaryKey) + { + for (int i = 0; i < _metadata.Length; ++i) + { + _metadata[i].isKeyColumn = false; + } + return; + } + else if (null != uniq) + { +#if DEBUG + if (AdapterSwitches.DataSchema.TraceVerbose) + { + Debug.WriteLine("upgrade single unique index to be a key: <" + uniqueIndexName + ">"); + } +#endif + // upgrade single unique index to be a key + for (int i = 0; i < _metadata.Length; ++i) + { + _metadata[i].isKeyColumn = uniq[i]; + } + } + } + } + } + + private MetaData FindMetaData(string name) + { + int index = _fieldNameLookup.IndexOfName(name); + return ((-1 != index) ? _metadata[index] : null); + } + + internal void DumpToSchemaTable(UnsafeNativeMethods.IRowset rowset) + { + List metainfo = new List(); + + object hiddenColumns = null; + using (OleDbDataReader dataReader = new OleDbDataReader(_connection, _command, Int32.MinValue, 0)) + { + dataReader.InitializeIRowset(rowset, ChapterHandle.DB_NULL_HCHAPTER, IntPtr.Zero); + dataReader.BuildSchemaTableInfo(rowset, true, false); + + hiddenColumns = GetPropertyValue(ODB.DBPROP_HIDDENCOLUMNS); + if (0 == dataReader.FieldCount) + { + return; + } + + Debug.Assert(null == dataReader._fieldNameLookup, "lookup already exists"); + FieldNameLookup lookup = new FieldNameLookup(dataReader, -1); + dataReader._fieldNameLookup = lookup; + + // This column, together with the DBCOLUMN_GUID and DBCOLUMN_PROPID + // columns, forms the ID of the column. One or more (but not all) of these columns + // will be NULL, depending on which elements of the DBID structure the provider uses. + MetaData columnidname = dataReader.FindMetaData(ODB.DBCOLUMN_IDNAME); + MetaData columnguid = dataReader.FindMetaData(ODB.DBCOLUMN_GUID); + MetaData columnpropid = dataReader.FindMetaData(ODB.DBCOLUMN_PROPID); + + MetaData columnname = dataReader.FindMetaData(ODB.DBCOLUMN_NAME); + MetaData columnordinal = dataReader.FindMetaData(ODB.DBCOLUMN_NUMBER); + MetaData dbtype = dataReader.FindMetaData(ODB.DBCOLUMN_TYPE); + MetaData columnsize = dataReader.FindMetaData(ODB.DBCOLUMN_COLUMNSIZE); + MetaData numericprecision = dataReader.FindMetaData(ODB.DBCOLUMN_PRECISION); + MetaData numericscale = dataReader.FindMetaData(ODB.DBCOLUMN_SCALE); + MetaData columnflags = dataReader.FindMetaData(ODB.DBCOLUMN_FLAGS); + MetaData baseschemaname = dataReader.FindMetaData(ODB.DBCOLUMN_BASESCHEMANAME); + MetaData basecatalogname = dataReader.FindMetaData(ODB.DBCOLUMN_BASECATALOGNAME); + MetaData basetablename = dataReader.FindMetaData(ODB.DBCOLUMN_BASETABLENAME); + MetaData basecolumnname = dataReader.FindMetaData(ODB.DBCOLUMN_BASECOLUMNNAME); + MetaData isautoincrement = dataReader.FindMetaData(ODB.DBCOLUMN_ISAUTOINCREMENT); + MetaData isunique = dataReader.FindMetaData(ODB.DBCOLUMN_ISUNIQUE); + MetaData iskeycolumn = dataReader.FindMetaData(ODB.DBCOLUMN_KEYCOLUMN); + + // @devnote: because we want to use the DBACCESSOR_OPTIMIZED bit, + // we are required to create the accessor before fetching any rows + dataReader.CreateAccessors(false); + + ColumnBinding binding; + while (dataReader.ReadRowset()) + { + dataReader.GetRowDataFromHandle(); + + MetaData info = new MetaData(); + + binding = columnidname.columnBinding; + if (!binding.IsValueNull()) + { + info.idname = (string)binding.Value(); + info.kind = ODB.DBKIND_NAME; + } + + binding = columnguid.columnBinding; + if (!binding.IsValueNull()) + { + info.guid = binding.Value_GUID(); + info.kind = ((ODB.DBKIND_NAME == info.kind) ? ODB.DBKIND_GUID_NAME : ODB.DBKIND_GUID); + } + + binding = columnpropid.columnBinding; + if (!binding.IsValueNull()) + { + info.propid = new IntPtr(binding.Value_UI4()); + info.kind = ((ODB.DBKIND_GUID == info.kind) ? ODB.DBKIND_GUID_PROPID : ODB.DBKIND_PROPID); + } + + binding = columnname.columnBinding; + if (!binding.IsValueNull()) + { + info.columnName = (string)binding.Value(); + } + else + { + info.columnName = ""; + } + + if (4 == ADP.PtrSize) + { + info.ordinal = (IntPtr)columnordinal.columnBinding.Value_UI4(); + } + else + { + info.ordinal = (IntPtr)columnordinal.columnBinding.Value_UI8(); + } + short wType = unchecked((short)dbtype.columnBinding.Value_UI2()); + + if (4 == ADP.PtrSize) + { + info.size = unchecked((int)columnsize.columnBinding.Value_UI4()); + } + else + { + info.size = ADP.IntPtrToInt32((IntPtr)unchecked((long)columnsize.columnBinding.Value_UI8())); + } + + binding = numericprecision.columnBinding; + if (!binding.IsValueNull()) + { + info.precision = (byte)binding.Value_UI2(); + } + + binding = numericscale.columnBinding; + if (!binding.IsValueNull()) + { + info.scale = (byte)binding.Value_I2(); + } + + info.flags = unchecked((int)columnflags.columnBinding.Value_UI4()); + + bool islong = OleDbDataReader.IsLong(info.flags); + bool isfixed = OleDbDataReader.IsFixed(info.flags); + NativeDBType dbType = NativeDBType.FromDBType(wType, islong, isfixed); + + info.type = dbType; + + if (null != isautoincrement) + { + binding = isautoincrement.columnBinding; + if (!binding.IsValueNull()) + { + info.isAutoIncrement = binding.Value_BOOL(); + } + } + if (null != isunique) + { + binding = isunique.columnBinding; + if (!binding.IsValueNull()) + { + info.isUnique = binding.Value_BOOL(); + } + } + if (null != iskeycolumn) + { + binding = iskeycolumn.columnBinding; + if (!binding.IsValueNull()) + { + info.isKeyColumn = binding.Value_BOOL(); + } + } + if (null != baseschemaname) + { + binding = baseschemaname.columnBinding; + if (!binding.IsValueNull()) + { + info.baseSchemaName = binding.ValueString(); + } + } + if (null != basecatalogname) + { + binding = basecatalogname.columnBinding; + if (!binding.IsValueNull()) + { + info.baseCatalogName = binding.ValueString(); + } + } + if (null != basetablename) + { + binding = basetablename.columnBinding; + if (!binding.IsValueNull()) + { + info.baseTableName = binding.ValueString(); + } + } + if (null != basecolumnname) + { + binding = basecolumnname.columnBinding; + if (!binding.IsValueNull()) + { + info.baseColumnName = binding.ValueString(); + } + } + metainfo.Add(info); + } + } + + int visibleCount = metainfo.Count; + if (hiddenColumns is Int32) + { + visibleCount -= (int)hiddenColumns; + } + + // if one key column is invalidated, they all need to be invalidated. The SET is the key, + // and subsets likely are not accurate keys. Note the assumption that the two loops below + // will traverse the entire set of columns. + bool disallowKeyColumns = false; + + for (int index = metainfo.Count - 1; visibleCount <= index; --index) + { + MetaData info = metainfo[index]; + + info.isHidden = true; + + if (disallowKeyColumns) + { + info.isKeyColumn = false; + } + else if (info.guid.Equals(ODB.DBCOL_SPECIALCOL)) + { + info.isKeyColumn = false; + + // This is the first key column to be invalidated, scan back through the + // columns we already processed to make sure none of those are marked as keys. + disallowKeyColumns = true; + for (int index2 = metainfo.Count - 1; index < index2; --index2) + { + metainfo[index2].isKeyColumn = false; + } + } + } + + for (int index = visibleCount - 1; 0 <= index; --index) + { + MetaData info = metainfo[index]; + + if (disallowKeyColumns) + { + info.isKeyColumn = false; + } + + if (info.guid.Equals(ODB.DBCOL_SPECIALCOL)) + { +#if DEBUG + if (AdapterSwitches.DataSchema.TraceVerbose) + { + Debug.WriteLine("Filtered Column: DBCOLUMN_GUID=DBCOL_SPECIALCOL DBCOLUMN_NAME=" + info.columnName + " DBCOLUMN_KEYCOLUMN=" + info.isKeyColumn); + } +#endif + info.isHidden = true; + visibleCount--; + } +#if WIN32 + else if (0 >= (int)info.ordinal) { +#else + else if (0 >= (long)info.ordinal) + { +#endif +#if DEBUG + if (AdapterSwitches.DataSchema.TraceVerbose) + { + Debug.WriteLine("Filtered Column: DBCOLUMN_NUMBER=" + info.ordinal.ToInt64().ToString(CultureInfo.InvariantCulture) + " DBCOLUMN_NAME=" + info.columnName); + } +#endif + info.isHidden = true; + visibleCount--; + } + else if (OleDbDataReader.DoColumnDropFilter(info.flags)) + { +#if DEBUG + if (AdapterSwitches.DataSchema.TraceVerbose) + { + Debug.WriteLine("Filtered Column: DBCOLUMN_FLAGS=" + info.flags.ToString("X8", (System.IFormatProvider)null) + " DBCOLUMN_NAME=" + info.columnName); + } +#endif + info.isHidden = true; + visibleCount--; + } + } + + // CONSIDER: perf tracking to see if we need to sort or not + metainfo.Sort(); + _visibleFieldCount = visibleCount; + _metadata = metainfo.ToArray(); + } + + static internal void GenerateSchemaTable(OleDbDataReader dataReader, object handle, CommandBehavior behavior) + { + if (0 != (CommandBehavior.KeyInfo & behavior)) + { + dataReader.BuildSchemaTableRowset(handle); // tries IColumnsRowset first then IColumnsInfo + dataReader.AppendSchemaInfo(); + } + else + { + dataReader.BuildSchemaTableInfo(handle, false, false); // only tries IColumnsInfo + } + MetaData[] metadata = dataReader.MetaData; + if ((null != metadata) && (0 < metadata.Length)) + { + dataReader.BuildSchemaTable(metadata); + } + } + + static private bool DoColumnDropFilter(int flags) + { + return (0 != (ODB.DBCOLUMNFLAGS_ISBOOKMARK & flags)); + } + static private bool IsLong(int flags) + { + return (0 != (ODB.DBCOLUMNFLAGS_ISLONG & flags)); + } + static private bool IsFixed(int flags) + { + return (0 != (ODB.DBCOLUMNFLAGS_ISFIXEDLENGTH & flags)); + } + static private bool IsRowVersion(int flags) + { + return (0 != (ODB.DBCOLUMNFLAGS_ISROWID_DBCOLUMNFLAGS_ISROWVER & flags)); + } + static private bool AllowDBNull(int flags) + { + return (0 != (ODB.DBCOLUMNFLAGS_ISNULLABLE & flags)); + } + static private bool AllowDBNullMaybeNull(int flags) + { + return (0 != (ODB.DBCOLUMNFLAGS_ISNULLABLE_DBCOLUMNFLAGS_MAYBENULL & flags)); + } + static private bool IsReadOnly(int flags) + { + return (0 == (ODB.DBCOLUMNFLAGS_WRITE_DBCOLUMNFLAGS_WRITEUNKNOWN & flags)); + } + } + + sealed internal class MetaData : IComparable + { + internal Bindings bindings; + internal ColumnBinding columnBinding; + + internal string columnName; + + internal Guid guid; + internal int kind; + internal IntPtr propid; + internal string idname; + + internal NativeDBType type; + + internal IntPtr ordinal; + internal int size; + + internal int flags; + + internal byte precision; + internal byte scale; + + internal bool isAutoIncrement; + internal bool isUnique; + internal bool isKeyColumn; + internal bool isHidden; + + internal string baseSchemaName; + internal string baseCatalogName; + internal string baseTableName; + internal string baseColumnName; + + int IComparable.CompareTo(object obj) + { + if (isHidden == (obj as MetaData).isHidden) + { +#if WIN32 + return ((int)ordinal - (int)(obj as MetaData).ordinal); +#else + long v = ((long)ordinal - (long)(obj as MetaData).ordinal); + return ((0 < v) ? 1 : ((v < 0) ? -1 : 0)); +#endif + + } + return (isHidden) ? 1 : -1; // ensure that all hidden columns come after non-hidden columns + } + + internal MetaData() + { + } + } +} diff --git a/src/System.Data.OleDb/src/OleDbEnumerator.cs b/src/System.Data.OleDb/src/OleDbEnumerator.cs new file mode 100644 index 000000000000..567b1775f91e --- /dev/null +++ b/src/System.Data.OleDb/src/OleDbEnumerator.cs @@ -0,0 +1,81 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Data.Common; +using System.Globalization; + +namespace System.Data.OleDb +{ + public sealed class OleDbEnumerator + { + public OleDbEnumerator() + { + } + + public DataTable GetElements() + { + DataTable dataTable = new DataTable("MSDAENUM"); + dataTable.Locale = CultureInfo.InvariantCulture; + OleDbDataReader dataReader = GetRootEnumerator(); + OleDbDataAdapter.FillDataTable(dataReader, dataTable); + return dataTable; + } + + static public OleDbDataReader GetEnumerator(Type type) + { + return GetEnumeratorFromType(type); + } + + static internal OleDbDataReader GetEnumeratorFromType(Type type) + { + object value = Activator.CreateInstance(type, System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.Instance, null, null, CultureInfo.InvariantCulture, null); + return GetEnumeratorReader(value); + } + + static private OleDbDataReader GetEnumeratorReader(object value) + { + NativeMethods.ISourcesRowset srcrowset = null; + + try + { + srcrowset = (NativeMethods.ISourcesRowset)value; + } + catch (InvalidCastException) + { + throw ODB.ISourcesRowsetNotSupported(); + } + if (null == srcrowset) + { + throw ODB.ISourcesRowsetNotSupported(); + } + value = null; // still held by ISourcesRowset, reused for IRowset + + int propCount = 0; + IntPtr propSets = ADP.PtrZero; + OleDbHResult hr = srcrowset.GetSourcesRowset(ADP.PtrZero, ODB.IID_IRowset, propCount, propSets, out value); + + Exception f = OleDbConnection.ProcessResults(hr, null, null); + if (null != f) + { + throw f; + } + + OleDbDataReader dataReader = new OleDbDataReader(null, null, 0, CommandBehavior.Default); + dataReader.InitializeIRowset(value, ChapterHandle.DB_NULL_HCHAPTER, ADP.RecordsUnaffected); + dataReader.BuildMetaInfo(); + dataReader.HasRowsRead(); + return dataReader; + } + + static public OleDbDataReader GetRootEnumerator() + { + //readonly Guid CLSID_MSDAENUM = new Guid(0xc8b522d0,0x5cf3,0x11ce,0xad,0xe5,0x00,0xaa,0x00,0x44,0x77,0x3d); + //Type msdaenum = Type.GetTypeFromCLSID(CLSID_MSDAENUM, true); + const string PROGID_MSDAENUM = "MSDAENUM"; + Type msdaenum = Type.GetTypeFromProgID(PROGID_MSDAENUM, true); + return GetEnumeratorFromType(msdaenum); + } + } +} + diff --git a/src/System.Data.OleDb/src/OleDbError.cs b/src/System.Data.OleDb/src/OleDbError.cs new file mode 100644 index 000000000000..fc8191e69055 --- /dev/null +++ b/src/System.Data.OleDb/src/OleDbError.cs @@ -0,0 +1,114 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Data.Common; +using System.Runtime.InteropServices; + +namespace System.Data.OleDb +{ + public sealed class OleDbError + { + readonly private string message; + readonly private string source; + readonly private string sqlState; + readonly private int nativeError; + + internal OleDbError(UnsafeNativeMethods.IErrorRecords errorRecords, int index) + { + OleDbHResult hr; + int lcid = System.Globalization.CultureInfo.CurrentCulture.LCID; + UnsafeNativeMethods.IErrorInfo errorInfo = errorRecords.GetErrorInfo(index, lcid); + if (null != errorInfo) + { + hr = errorInfo.GetDescription(out this.message); + + if (OleDbHResult.DB_E_NOLOCALE == hr) + { + Marshal.ReleaseComObject(errorInfo); + lcid = SafeNativeMethods.GetUserDefaultLCID(); + errorInfo = errorRecords.GetErrorInfo(index, lcid); + + if (null != errorInfo) + { + hr = errorInfo.GetDescription(out this.message); + } + } + if ((hr < 0) && ADP.IsEmpty(this.message)) + { + this.message = ODB.FailedGetDescription(hr); + } + if (null != errorInfo) + { + hr = errorInfo.GetSource(out this.source); + + if (OleDbHResult.DB_E_NOLOCALE == hr) + { + Marshal.ReleaseComObject(errorInfo); + lcid = SafeNativeMethods.GetUserDefaultLCID(); + errorInfo = errorRecords.GetErrorInfo(index, lcid); + + if (null != errorInfo) + { + hr = errorInfo.GetSource(out this.source); + } + } + if ((hr < 0) && ADP.IsEmpty(this.source)) + { + this.source = ODB.FailedGetSource(hr); + } + Marshal.ReleaseComObject(errorInfo); + } + } + + UnsafeNativeMethods.ISQLErrorInfo sqlErrorInfo; + hr = errorRecords.GetCustomErrorObject(index, ref ODB.IID_ISQLErrorInfo, out sqlErrorInfo); + + if (null != sqlErrorInfo) + { + this.nativeError = sqlErrorInfo.GetSQLInfo(out this.sqlState); + Marshal.ReleaseComObject(sqlErrorInfo); + } + } + + public string Message + { + get + { + string message = this.message; + return ((null != message) ? message : string.Empty); + } + } + + public int NativeError + { + get + { + return this.nativeError; + } + } + + public string Source + { + get + { + string source = this.source; + return ((null != source) ? source : string.Empty); + } + } + + public string SQLState + { + get + { + string sqlState = this.sqlState; + return ((null != sqlState) ? sqlState : string.Empty); + } + } + + override public string ToString() + { + return Message; + } + } +} diff --git a/src/System.Data.OleDb/src/OleDbErrorCollection.cs b/src/System.Data.OleDb/src/OleDbErrorCollection.cs new file mode 100644 index 000000000000..c3c619be46cb --- /dev/null +++ b/src/System.Data.OleDb/src/OleDbErrorCollection.cs @@ -0,0 +1,80 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Collections; +using System.ComponentModel; +using System.Data.Common; + +namespace System.Data.OleDb +{ + [Serializable, ListBindable(false)] + public sealed class OleDbErrorCollection : System.Collections.ICollection + { + readonly private ArrayList items; + + internal OleDbErrorCollection(UnsafeNativeMethods.IErrorInfo errorInfo) + { + ArrayList items = new ArrayList(); + UnsafeNativeMethods.IErrorRecords errorRecords = (errorInfo as UnsafeNativeMethods.IErrorRecords); + if (null != errorRecords) + { + int recordCount = errorRecords.GetRecordCount(); + + for (int i = 0; i < recordCount; ++i) + { + OleDbError error = new OleDbError(errorRecords, i); + items.Add(error); + } + } + this.items = items; + } + + bool System.Collections.ICollection.IsSynchronized + { + get { return false; } + } + + object System.Collections.ICollection.SyncRoot + { + get { return this; } + } + + public int Count + { + get + { + ArrayList items = this.items; + return ((null != items) ? items.Count : 0); + } + } + + public OleDbError this[int index] + { + get + { + return (this.items[index] as OleDbError); + } + } + + internal void AddRange(ICollection c) + { + items.AddRange(c); + } + + public void CopyTo(Array array, int index) + { + this.items.CopyTo(array, index); + } + + public void CopyTo(OleDbError[] array, int index) + { + this.items.CopyTo(array, index); + } + + public IEnumerator GetEnumerator() + { + return this.items.GetEnumerator(); + } + } +} diff --git a/src/System.Data.OleDb/src/OleDbException.cs b/src/System.Data.OleDb/src/OleDbException.cs new file mode 100644 index 000000000000..9aeb935e5731 --- /dev/null +++ b/src/System.Data.OleDb/src/OleDbException.cs @@ -0,0 +1,155 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Collections.Generic; +using System.ComponentModel; +using System.Data.Common; +using System.Diagnostics; +using System.Globalization; +using System.Runtime.Serialization; +using System.Text; + +namespace System.Data.OleDb +{ + public sealed class OleDbException : System.Data.Common.DbException + { + private OleDbErrorCollection oledbErrors; + + internal OleDbException(string message, OleDbHResult errorCode, Exception inner) : base(message, inner) + { + HResult = (int)errorCode; + this.oledbErrors = new OleDbErrorCollection(null); + } + + internal OleDbException(OleDbException previous, Exception inner) : base(previous.Message, inner) + { + HResult = previous.ErrorCode; + this.oledbErrors = previous.oledbErrors; + } + + private OleDbException(string message, Exception inner, string source, OleDbHResult errorCode, OleDbErrorCollection errors) : base(message, inner) + { + Debug.Assert(null != errors, "OleDbException without OleDbErrorCollection"); + Source = source; + HResult = (int)errorCode; + this.oledbErrors = errors; + } + + override public void GetObjectData(SerializationInfo si, StreamingContext context) + { + if (null == si) + { + throw new ArgumentNullException("si"); + } + si.AddValue("oledbErrors", oledbErrors, typeof(OleDbErrorCollection)); + base.GetObjectData(si, context); + } + + [TypeConverter(typeof(ErrorCodeConverter))] + override public int ErrorCode + { + get + { + return base.ErrorCode; + } + } + + [DesignerSerializationVisibility(DesignerSerializationVisibility.Content)] + public OleDbErrorCollection Errors + { + get + { + OleDbErrorCollection errors = this.oledbErrors; + return ((null != errors) ? errors : new OleDbErrorCollection(null)); + } + } + + static internal OleDbException CreateException(UnsafeNativeMethods.IErrorInfo errorInfo, OleDbHResult errorCode, Exception inner) + { + OleDbErrorCollection errors = new OleDbErrorCollection(errorInfo); + string message = null; + string source = null; + OleDbHResult hr = 0; + + if (null != errorInfo) + { + hr = errorInfo.GetDescription(out message); + + hr = errorInfo.GetSource(out source); + } + + int count = errors.Count; + if (0 < errors.Count) + { + StringBuilder builder = new StringBuilder(); + + if ((null != message) && (message != errors[0].Message)) + { + builder.Append(message.TrimEnd(ODB.ErrorTrimCharacters)); + if (1 < count) + { + builder.Append(Environment.NewLine); + } + } + for (int i = 0; i < count; ++i) + { + if (0 < i) + { + builder.Append(Environment.NewLine); + } + builder.Append(errors[i].Message.TrimEnd(ODB.ErrorTrimCharacters)); + } + message = builder.ToString(); + } + if (ADP.IsEmpty(message)) + { + message = ODB.NoErrorMessage(errorCode); + } + return new OleDbException(message, inner, source, errorCode, errors); + } + + static internal OleDbException CombineExceptions(List exceptions) + { + Debug.Assert(0 < exceptions.Count, "missing exceptions"); + if (1 < exceptions.Count) + { + OleDbErrorCollection errors = new OleDbErrorCollection(null); + StringBuilder builder = new StringBuilder(); + + foreach (OleDbException exception in exceptions) + { + errors.AddRange(exception.Errors); + builder.Append(exception.Message); + builder.Append(Environment.NewLine); + } + return new OleDbException(builder.ToString(), null, exceptions[0].Source, (OleDbHResult)exceptions[0].ErrorCode, errors); + } + else + { + return exceptions[0]; + } + } + + sealed internal class ErrorCodeConverter : Int32Converter + { + // converter classes should have public ctor + public ErrorCodeConverter() + { + } + + override public object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType) + { + if (destinationType == null) + { + throw ADP.ArgumentNull("destinationType"); + } + if ((destinationType == typeof(string)) && (value != null) && (value is Int32)) + { + return ODB.ELookup((OleDbHResult)value); + } + return base.ConvertTo(context, culture, value, destinationType); + } + } + } +} diff --git a/src/System.Data.OleDb/src/OleDbFactory.cs b/src/System.Data.OleDb/src/OleDbFactory.cs new file mode 100644 index 000000000000..d6a892ea2266 --- /dev/null +++ b/src/System.Data.OleDb/src/OleDbFactory.cs @@ -0,0 +1,49 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Data.Common; + +namespace System.Data.OleDb +{ + public sealed class OleDbFactory : DbProviderFactory + { + public static readonly OleDbFactory Instance = new OleDbFactory(); + + private OleDbFactory() + { + } + + public override DbCommand CreateCommand() + { + return new OleDbCommand(); + } + + public override DbCommandBuilder CreateCommandBuilder() + { + return new OleDbCommandBuilder(); + } + + public override DbConnection CreateConnection() + { + return new OleDbConnection(); + } + + public override DbConnectionStringBuilder CreateConnectionStringBuilder() + { + return new OleDbConnectionStringBuilder(); + } + + public override DbDataAdapter CreateDataAdapter() + { + return new OleDbDataAdapter(); + } + + public override DbParameter CreateParameter() + { + return new OleDbParameter(); + } + + } +} + diff --git a/src/System.Data.OleDb/src/OleDbHResult.cs b/src/System.Data.OleDb/src/OleDbHResult.cs new file mode 100644 index 000000000000..f43fd5be1ccf --- /dev/null +++ b/src/System.Data.OleDb/src/OleDbHResult.cs @@ -0,0 +1,968 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +namespace System.Data.OleDb +{ + internal enum OleDbHResult + { // OLEDB Error codes + CO_E_CLASSSTRING = unchecked((int)0x800401f3), + REGDB_E_CLASSNOTREG = unchecked((int)0x80040154), + CO_E_NOTINITIALIZED = unchecked((int)0x800401F0), + + S_OK = 0x00000000, + S_FALSE = 0x00000001, + + E_UNEXPECTED = unchecked((int)0x8000FFFF), + E_NOTIMPL = unchecked((int)0x80004001), + E_OUTOFMEMORY = unchecked((int)0x8007000E), + E_INVALIDARG = unchecked((int)0x80070057), + E_NOINTERFACE = unchecked((int)0x80004002), + E_POINTER = unchecked((int)0x80004003), + E_HANDLE = unchecked((int)0x80070006), + E_ABORT = unchecked((int)0x80004004), + E_FAIL = unchecked((int)0x80004005), + E_ACCESSDENIED = unchecked((int)0x80070005), + + // MessageId: DB_E_BADACCESSORHANDLE + // MessageText: + // Accessor is invalid. + DB_E_BADACCESSORHANDLE = unchecked((int)0x80040E00), + + // MessageId: DB_E_ROWLIMITEXCEEDED + // MessageText: + // Row could not be inserted into the rowset without exceeding provider's maximum number of active rows. + DB_E_ROWLIMITEXCEEDED = unchecked((int)0x80040E01), + + // MessageId: DB_E_REOLEDBNLYACCESSOR + // MessageText: + // Accessor is read-only. Operation failed. + DB_E_REOLEDBNLYACCESSOR = unchecked((int)0x80040E02), + + // MessageId: DB_E_SCHEMAVIOLATION + // MessageText: + // Values violate the database schema. + DB_E_SCHEMAVIOLATION = unchecked((int)0x80040E03), + + // MessageId: DB_E_BADROWHANDLE + // MessageText: + // Row handle is invalid. + DB_E_BADROWHANDLE = unchecked((int)0x80040E04), + + // MessageId: DB_E_OBJECTOPEN + // MessageText: + // Object was open. + DB_E_OBJECTOPEN = unchecked((int)0x80040E05), + + // MessageId: DB_E_BADCHAPTER + // MessageText: + // Chapter is invalid. + DB_E_BADCHAPTER = unchecked((int)0x80040E06), + + // MessageId: DB_E_CANTCONVERTVALUE + // MessageText: + // Data or literal value could not be converted to the type of the column in the data source, and the provider was unable to determine which columns could not be converted. Data overflow or sign mismatch was not the cause. + DB_E_CANTCONVERTVALUE = unchecked((int)0x80040E07), + + // MessageId: DB_E_BADBINDINFO + // MessageText: + // Binding information is invalid. + DB_E_BADBINDINFO = unchecked((int)0x80040E08), + + // MessageId: DB_SEC_E_PERMISSIONDENIED + // MessageText: + // Permission denied. + DB_SEC_E_PERMISSIONDENIED = unchecked((int)0x80040E09), + + // MessageId: DB_E_NOTAREFERENCECOLUMN + // MessageText: + // Column does not contain bookmarks or chapters. + DB_E_NOTAREFERENCECOLUMN = unchecked((int)0x80040E0A), + + // MessageId: DB_E_LIMITREJECTED + // MessageText: + // Cost limits were rejected. + DB_E_LIMITREJECTED = unchecked((int)0x80040E0B), + + // MessageId: DB_E_NOCOMMAND + // MessageText: + // Command text was not set for the command object. + DB_E_NOCOMMAND = unchecked((int)0x80040E0C), + + // MessageId: DB_E_COSTLIMIT + // MessageText: + // Query plan within the cost limit cannot be found. + DB_E_COSTLIMIT = unchecked((int)0x80040E0D), + + // MessageId: DB_E_BADBOOKMARK + // MessageText: + // Bookmark is invalid. + DB_E_BADBOOKMARK = unchecked((int)0x80040E0E), + + // MessageId: DB_E_BADLOCKMODE + // MessageText: + // Lock mode is invalid. + DB_E_BADLOCKMODE = unchecked((int)0x80040E0F), + + // MessageId: DB_E_PARAMNOTOPTIONAL + // MessageText: + // No value given for one or more required parameters. + DB_E_PARAMNOTOPTIONAL = unchecked((int)0x80040E10), + + // MessageId: DB_E_BADCOLUMNID + // MessageText: + // Column ID is invalid. + DB_E_BADCOLUMNID = unchecked((int)0x80040E11), + + // MessageId: DB_E_BADRATIO + // MessageText: + // Numerator was greater than denominator. Values must express ratio between zero and 1. + DB_E_BADRATIO = unchecked((int)0x80040E12), + + // MessageId: DB_E_BADVALUES + // MessageText: + // Value is invalid. + DB_E_BADVALUES = unchecked((int)0x80040E13), + + // MessageId: DB_E_ERRORSINCOMMAND + // MessageText: + // One or more errors occurred during processing of command. + DB_E_ERRORSINCOMMAND = unchecked((int)0x80040E14), + + // MessageId: DB_E_CANTCANCEL + // MessageText: + // Command cannot be canceled. + DB_E_CANTCANCEL = unchecked((int)0x80040E15), + + // MessageId: DB_E_DIALECTNOTSUPPORTED + // MessageText: + // Command dialect is not supported by this provider. + DB_E_DIALECTNOTSUPPORTED = unchecked((int)0x80040E16), + + // MessageId: DB_E_DUPLICATEDATASOURCE + // MessageText: + // Data source object could not be created because the named data source already exists. + DB_E_DUPLICATEDATASOURCE = unchecked((int)0x80040E17), + + // MessageId: DB_E_CANNOTRESTART + // MessageText: + // Rowset position cannot be restarted. + DB_E_CANNOTRESTART = unchecked((int)0x80040E18), + + // MessageId: DB_E_NOTFOUND + // MessageText: + // Object or data matching the name, range, or selection criteria was not found within the scope of this operation. + DB_E_NOTFOUND = unchecked((int)0x80040E19), + + // MessageId: DB_E_NEWLYINSERTED + // MessageText: + // Identity cannot be determined for newly inserted rows. + DB_E_NEWLYINSERTED = unchecked((int)0x80040E1B), + + // MessageId: DB_E_CANNOTFREE + // MessageText: + // Provider has ownership of this tree. + DB_E_CANNOTFREE = unchecked((int)0x80040E1A), + + // MessageId: DB_E_GOALREJECTED + // MessageText: + // Goal was rejected because no nonzero weights were specified for any goals supported. Current goal was not changed. + DB_E_GOALREJECTED = unchecked((int)0x80040E1C), + + // MessageId: DB_E_UNSUPPORTEDCONVERSION + // MessageText: + // Requested conversion is not supported. + DB_E_UNSUPPORTEDCONVERSION = unchecked((int)0x80040E1D), + + // MessageId: DB_E_BADSTARTPOSITION + // MessageText: + // No rows were returned because the offset value moves the position before the beginning or after the end of the rowset. + DB_E_BADSTARTPOSITION = unchecked((int)0x80040E1E), + + // MessageId: DB_E_NOQUERY + // MessageText: + // Information was requested for a query and the query was not set. + DB_E_NOQUERY = unchecked((int)0x80040E1F), + + // MessageId: DB_E_NOTREENTRANT + // MessageText: + // Consumer's event handler called a non-reentrant method in the provider. + DB_E_NOTREENTRANT = unchecked((int)0x80040E20), + + // MessageId: DB_E_ERRORSOCCURRED + // MessageText: + // Multiple-step operation generated errors. Check each status value. No work was done. + DB_E_ERRORSOCCURRED = unchecked((int)0x80040E21), + + // MessageId: DB_E_NOAGGREGATION + // MessageText: + // Non-NULL controlling IUnknown was specified, and either the requested interface was not + // IUnknown, or the provider does not support COM aggregation. + DB_E_NOAGGREGATION = unchecked((int)0x80040E22), + + // MessageId: DB_E_DELETEDROW + // MessageText: + // Row handle referred to a deleted row or a row marked for deletion. + DB_E_DELETEDROW = unchecked((int)0x80040E23), + + // MessageId: DB_E_CANTFETCHBACKWARDS + // MessageText: + // Rowset does not support fetching backward. + DB_E_CANTFETCHBACKWARDS = unchecked((int)0x80040E24), + + // MessageId: DB_E_ROWSNOTRELEASED + // MessageText: + // Row handles must all be released before new ones can be obtained. + DB_E_ROWSNOTRELEASED = unchecked((int)0x80040E25), + + // MessageId: DB_E_BADSTORAGEFLAG + // MessageText: + // One or more storage flags are not supported. + DB_E_BADSTORAGEFLAG = unchecked((int)0x80040E26), + + // MessageId: DB_E_BADCOMPAREOP + // MessageText: + // Comparison operator is invalid. + DB_E_BADCOMPAREOP = unchecked((int)0x80040E27), + + // MessageId: DB_E_BADSTATUSVALUE + // MessageText: + // Status flag was neither DBCOLUMNSTATUS_OK nor + // DBCOLUMNSTATUS_ISNULL. + DB_E_BADSTATUSVALUE = unchecked((int)0x80040E28), + + // MessageId: DB_E_CANTSCROLLBACKWARDS + // MessageText: + // Rowset does not support scrolling backward. + DB_E_CANTSCROLLBACKWARDS = unchecked((int)0x80040E29), + + // MessageId: DB_E_BADREGIONHANDLE + // MessageText: + // Region handle is invalid. + DB_E_BADREGIONHANDLE = unchecked((int)0x80040E2A), + + // MessageId: DB_E_NONCONTIGUOUSRANGE + // MessageText: + // Set of rows is not contiguous to, or does not overlap, the rows in the watch region. + DB_E_NONCONTIGUOUSRANGE = unchecked((int)0x80040E2B), + + // MessageId: DB_E_INVALIDTRANSITION + // MessageText: + // Transition from ALL* to MOVE* or EXTEND* was specified. + DB_E_INVALIDTRANSITION = unchecked((int)0x80040E2C), + + // MessageId: DB_E_NOTASUBREGION + // MessageText: + // Region is not a proper subregion of the region identified by the watch region handle. + DB_E_NOTASUBREGION = unchecked((int)0x80040E2D), + + // MessageId: DB_E_MULTIPLESTATEMENTS + // MessageText: + // Multiple-statement commands are not supported by this provider. + DB_E_MULTIPLESTATEMENTS = unchecked((int)0x80040E2E), + + // MessageId: DB_E_INTEGRITYVIOLATION + // MessageText: + // Value violated the integrity constraints for a column or table. + DB_E_INTEGRITYVIOLATION = unchecked((int)0x80040E2F), + + // MessageId: DB_E_BADTYPENAME + // MessageText: + // Type name is invalid. + DB_E_BADTYPENAME = unchecked((int)0x80040E30), + + // MessageId: DB_E_ABORTLIMITREACHED + // MessageText: + // Execution stopped because a resource limit was reached. No results were returned. + DB_E_ABORTLIMITREACHED = unchecked((int)0x80040E31), + + // MessageId: DB_E_ROWSETINCOMMAND + // MessageText: + // Command object whose command tree contains a rowset or rowsets cannot be cloned. + DB_E_ROWSETINCOMMAND = unchecked((int)0x80040E32), + + // MessageId: DB_E_CANTTRANSLATE + // MessageText: + // Current tree cannot be represented as text. + DB_E_CANTTRANSLATE = unchecked((int)0x80040E33), + + // MessageId: DB_E_DUPLICATEINDEXID + // MessageText: + // Index already exists. + DB_E_DUPLICATEINDEXID = unchecked((int)0x80040E34), + + // MessageId: DB_E_NOINDEX + // MessageText: + // Index does not exist. + DB_E_NOINDEX = unchecked((int)0x80040E35), + + // MessageId: DB_E_INDEXINUSE + // MessageText: + // Index is in use. + DB_E_INDEXINUSE = unchecked((int)0x80040E36), + + // MessageId: DB_E_NOTABLE + // MessageText: + // Table does not exist. + DB_E_NOTABLE = unchecked((int)0x80040E37), + + // MessageId: DB_E_CONCURRENCYVIOLATION + // MessageText: + // Rowset used optimistic concurrency and the value of a column has changed since it was last read. + DB_E_CONCURRENCYVIOLATION = unchecked((int)0x80040E38), + + // MessageId: DB_E_BADCOPY + // MessageText: + // Errors detected during the copy. + DB_E_BADCOPY = unchecked((int)0x80040E39), + + // MessageId: DB_E_BADPRECISION + // MessageText: + // Precision is invalid. + DB_E_BADPRECISION = unchecked((int)0x80040E3A), + + // MessageId: DB_E_BADSCALE + // MessageText: + // Scale is invalid. + DB_E_BADSCALE = unchecked((int)0x80040E3B), + + // MessageId: DB_E_BADTABLEID + // MessageText: + // Table ID is invalid. + DB_E_BADTABLEID = unchecked((int)0x80040E3C), + + // MessageId: DB_E_BADTYPE + // MessageText: + // Type is invalid. + DB_E_BADTYPE = unchecked((int)0x80040E3D), + + // MessageId: DB_E_DUPLICATECOLUMNID + // MessageText: + // Column ID already exists or occurred more than once in the array of columns. + DB_E_DUPLICATECOLUMNID = unchecked((int)0x80040E3E), + + // MessageId: DB_E_DUPLICATETABLEID + // MessageText: + // Table already exists. + DB_E_DUPLICATETABLEID = unchecked((int)0x80040E3F), + + // MessageId: DB_E_TABLEINUSE + // MessageText: + // Table is in use. + DB_E_TABLEINUSE = unchecked((int)0x80040E40), + + // MessageId: DB_E_NOLOCALE + // MessageText: + // Locale ID is not supported. + DB_E_NOLOCALE = unchecked((int)0x80040E41), + + // MessageId: DB_E_BADRECORDNUM + // MessageText: + // Record number is invalid. + DB_E_BADRECORDNUM = unchecked((int)0x80040E42), + + // MessageId: DB_E_BOOKMARKSKIPPED + // MessageText: + // Form of bookmark is valid, but no row was found to match it. + DB_E_BOOKMARKSKIPPED = unchecked((int)0x80040E43), + + // MessageId: DB_E_BADPROPERTYVALUE + // MessageText: + // Property value is invalid. + DB_E_BADPROPERTYVALUE = unchecked((int)0x80040E44), + + // MessageId: DB_E_INVALID + // MessageText: + // Rowset is not chaptered. + DB_E_INVALID = unchecked((int)0x80040E45), + + // MessageId: DB_E_BADACCESSORFLAGS + // MessageText: + // One or more accessor flags were invalid. + DB_E_BADACCESSORFLAGS = unchecked((int)0x80040E46), + + // MessageId: DB_E_BADSTORAGEFLAGS + // MessageText: + // One or more storage flags are invalid. + DB_E_BADSTORAGEFLAGS = unchecked((int)0x80040E47), + + // MessageId: DB_E_BYREFACCESSORNOTSUPPORTED + // MessageText: + // Reference accessors are not supported by this provider. + DB_E_BYREFACCESSORNOTSUPPORTED = unchecked((int)0x80040E48), + + // MessageId: DB_E_NULLACCESSORNOTSUPPORTED + // MessageText: + // Null accessors are not supported by this provider. + DB_E_NULLACCESSORNOTSUPPORTED = unchecked((int)0x80040E49), + + // MessageId: DB_E_NOTPREPARED + // MessageText: + // Command was not prepared. + DB_E_NOTPREPARED = unchecked((int)0x80040E4A), + + // MessageId: DB_E_BADACCESSORTYPE + // MessageText: + // Accessor is not a parameter accessor. + DB_E_BADACCESSORTYPE = unchecked((int)0x80040E4B), + + // MessageId: DB_E_WRITEONLYACCESSOR + // MessageText: + // Accessor is write-only. + DB_E_WRITEONLYACCESSOR = unchecked((int)0x80040E4C), + + // MessageId: DB_SEC_E_AUTH_FAILED + // MessageText: + // Authentication failed. + DB_SEC_E_AUTH_FAILED = unchecked((int)0x80040E4D), + + // MessageId: DB_E_CANCELED + // MessageText: + // Operation was canceled. + DB_E_CANCELED = unchecked((int)0x80040E4E), + + // MessageId: DB_E_CHAPTERNOTRELEASED + // MessageText: + // Rowset is single-chaptered. The chapter was not released. + DB_E_CHAPTERNOTRELEASED = unchecked((int)0x80040E4F), + + // MessageId: DB_E_BADSOURCEHANDLE + // MessageText: + // Source handle is invalid. + DB_E_BADSOURCEHANDLE = unchecked((int)0x80040E50), + + // MessageId: DB_E_PARAMUNAVAILABLE + // MessageText: + // Provider cannot derive parameter information and SetParameterInfo has not been called. + DB_E_PARAMUNAVAILABLE = unchecked((int)0x80040E51), + + // MessageId: DB_E_ALREADYINITIALIZED + // MessageText: + // Data source object is already initialized. + DB_E_ALREADYINITIALIZED = unchecked((int)0x80040E52), + + // MessageId: DB_E_NOTSUPPORTED + // MessageText: + // Method is not supported by this provider. + DB_E_NOTSUPPORTED = unchecked((int)0x80040E53), + + // MessageId: DB_E_MAXPENDCHANGESEXCEEDED + // MessageText: + // Number of rows with pending changes exceeded the limit. + DB_E_MAXPENDCHANGESEXCEEDED = unchecked((int)0x80040E54), + + // MessageId: DB_E_BADORDINAL + // MessageText: + // Column does not exist. + DB_E_BADORDINAL = unchecked((int)0x80040E55), + + // MessageId: DB_E_PENDINGCHANGES + // MessageText: + // Pending changes exist on a row with a reference count of zero. + DB_E_PENDINGCHANGES = unchecked((int)0x80040E56), + + // MessageId: DB_E_DATAOVERFLOW + // MessageText: + // Literal value in the command exceeded the range of the type of the associated column. + DB_E_DATAOVERFLOW = unchecked((int)0x80040E57), + + // MessageId: DB_E_BADHRESULT + // MessageText: + // HRESULT is invalid. + DB_E_BADHRESULT = unchecked((int)0x80040E58), + + // MessageId: DB_E_BADLOOKUPID + // MessageText: + // Lookup ID is invalid. + DB_E_BADLOOKUPID = unchecked((int)0x80040E59), + + // MessageId: DB_E_BADDYNAMICERRORID + // MessageText: + // DynamicError ID is invalid. + DB_E_BADDYNAMICERRORID = unchecked((int)0x80040E5A), + + // MessageId: DB_E_PENDINGINSERT + // MessageText: + // Most recent data for a newly inserted row could not be retrieved because the insert is pending. + DB_E_PENDINGINSERT = unchecked((int)0x80040E5B), + + // MessageId: DB_E_BADCONVERTFLAG + // MessageText: + // Conversion flag is invalid. + DB_E_BADCONVERTFLAG = unchecked((int)0x80040E5C), + + // MessageId: DB_E_BADPARAMETERNAME + // MessageText: + // Parameter name is unrecognized. + DB_E_BADPARAMETERNAME = unchecked((int)0x80040E5D), + + // MessageId: DB_E_MULTIPLESTORAGE + // MessageText: + // Multiple storage objects cannot be open simultaneously. + DB_E_MULTIPLESTORAGE = unchecked((int)0x80040E5E), + + // MessageId: DB_E_CANTFILTER + // MessageText: + // Filter cannot be opened. + DB_E_CANTFILTER = unchecked((int)0x80040E5F), + + // MessageId: DB_E_CANTORDER + // MessageText: + // Order cannot be opened. + DB_E_CANTORDER = unchecked((int)0x80040E60), + + // MessageId: MD_E_BADTUPLE + // MessageText: + // Tuple is invalid. + MD_E_BADTUPLE = unchecked((int)0x80040E61), + + // MessageId: MD_E_BADCOORDINATE + // MessageText: + // Coordinate is invalid. + MD_E_BADCOORDINATE = unchecked((int)0x80040E62), + + // MessageId: MD_E_INVALIDAXIS + // MessageText: + // Axis is invalid. + MD_E_INVALIDAXIS = unchecked((int)0x80040E63), + + // MessageId: MD_E_INVALIDCELLRANGE + // MessageText: + // One or more cell ordinals is invalid. + MD_E_INVALIDCELLRANGE = unchecked((int)0x80040E64), + + // MessageId: DB_E_NOCOLUMN + // MessageText: + // Column ID is invalid. + DB_E_NOCOLUMN = unchecked((int)0x80040E65), + + // MessageId: DB_E_COMMANDNOTPERSISTED + // MessageText: + // Command does not have a DBID. + DB_E_COMMANDNOTPERSISTED = unchecked((int)0x80040E67), + + // MessageId: DB_E_DUPLICATEID + // MessageText: + // DBID already exists. + DB_E_DUPLICATEID = unchecked((int)0x80040E68), + + // MessageId: DB_E_OBJECTCREATIONLIMITREACHED + // MessageText: + // Session cannot be created because maximum number of active sessions was already reached. Consumer must release one or more sessions before creating a new session object. + DB_E_OBJECTCREATIONLIMITREACHED = unchecked((int)0x80040E69), + + // MessageId: DB_E_BADINDEXID + // MessageText: + // Index ID is invalid. + DB_E_BADINDEXID = unchecked((int)0x80040E72), + + // MessageId: DB_E_BADINITSTRING + // MessageText: + // Format of the initialization string does not conform to the OLE DB specification. + DB_E_BADINITSTRING = unchecked((int)0x80040E73), + + // MessageId: DB_E_NOPROVIDERSREGISTERED + // MessageText: + // No OLE DB providers of this source type are registered. + DB_E_NOPROVIDERSREGISTERED = unchecked((int)0x80040E74), + + // MessageId: DB_E_MISMATCHEDPROVIDER + // MessageText: + // Initialization string specifies a provider that does not match the active provider. + DB_E_MISMATCHEDPROVIDER = unchecked((int)0x80040E75), + + // MessageId: DB_E_BADCOMMANDID + // MessageText: + // DBID is invalid. + DB_E_BADCOMMANDID = unchecked((int)0x80040E76), + + // MessageId: SEC_E_BADTRUSTEEID + // MessageText: + // Trustee is invalid. + SEC_E_BADTRUSTEEID = unchecked((int)0x80040E6A), + + // MessageId: SEC_E_NOTRUSTEEID + // MessageText: + // Trustee was not recognized for this data source. + SEC_E_NOTRUSTEEID = unchecked((int)0x80040E6B), + + // MessageId: SEC_E_NOMEMBERSHIPSUPPORT + // MessageText: + // Trustee does not support memberships or collections. + SEC_E_NOMEMBERSHIPSUPPORT = unchecked((int)0x80040E6C), + + // MessageId: SEC_E_INVALIDOBJECT + // MessageText: + // Object is invalid or unknown to the provider. + SEC_E_INVALIDOBJECT = unchecked((int)0x80040E6D), + + // MessageId: SEC_E_NOOWNER + // MessageText: + // Object does not have an owner. + SEC_E_NOOWNER = unchecked((int)0x80040E6E), + + // MessageId: SEC_E_INVALIDACCESSENTRYLIST + // MessageText: + // Access entry list is invalid. + SEC_E_INVALIDACCESSENTRYLIST = unchecked((int)0x80040E6F), + + // MessageId: SEC_E_INVALIDOWNER + // MessageText: + // Trustee supplied as owner is invalid or unknown to the provider. + SEC_E_INVALIDOWNER = unchecked((int)0x80040E70), + + // MessageId: SEC_E_INVALIDACCESSENTRY + // MessageText: + // Permission in the access entry list is invalid. + SEC_E_INVALIDACCESSENTRY = unchecked((int)0x80040E71), + + // MessageId: DB_E_BADCONSTRAINTTYPE + // MessageText: + // ConstraintType is invalid or not supported by the provider. + DB_E_BADCONSTRAINTTYPE = unchecked((int)0x80040E77), + + // MessageId: DB_E_BADCONSTRAINTFORM + // MessageText: + // ConstraintType is not DBCONSTRAINTTYPE_FOREIGNKEY and cForeignKeyColumns is not zero. + DB_E_BADCONSTRAINTFORM = unchecked((int)0x80040E78), + + // MessageId: DB_E_BADDEFERRABILITY + // MessageText: + // Specified deferrability flag is invalid or not supported by the provider. + DB_E_BADDEFERRABILITY = unchecked((int)0x80040E79), + + // MessageId: DB_E_BADMATCHTYPE + // MessageText: + // MatchType is invalid or the value is not supported by the provider. + DB_E_BADMATCHTYPE = unchecked((int)0x80040E80), + + // MessageId: DB_E_BADUPDATEDELETERULE + // MessageText: + // Constraint update rule or delete rule is invalid. + DB_E_BADUPDATEDELETERULE = unchecked((int)0x80040E8A), + + // MessageId: DB_E_BADCONSTRAINTID + // MessageText: + // Constraint does not exist. + DB_E_BADCONSTRAINTID = unchecked((int)0x80040E8B), + + // MessageId: DB_E_BADCOMMANDFLAGS + // MessageText: + // Command persistence flag is invalid. + DB_E_BADCOMMANDFLAGS = unchecked((int)0x80040E8C), + + // MessageId: DB_E_OBJECTMISMATCH + // MessageText: + // rguidColumnType points to a GUID that does not match the object type of this column, or this column was not set. + DB_E_OBJECTMISMATCH = unchecked((int)0x80040E8D), + + // MessageId: DB_E_NOSOURCEOBJECT + // MessageText: + // Source row does not exist. + DB_E_NOSOURCEOBJECT = unchecked((int)0x80040E91), + + // MessageId: DB_E_RESOURCELOCKED + // MessageText: + // OLE DB object represented by this URL is locked by one or more other processes. + DB_E_RESOURCELOCKED = unchecked((int)0x80040E92), + + // MessageId: DB_E_NOTCOLLECTION + // MessageText: + // Client requested an object type that is valid only for a collection. + DB_E_NOTCOLLECTION = unchecked((int)0x80040E93), + + // MessageId: DB_E_REOLEDBNLY + // MessageText: + // Caller requested write access to a read-only object. + DB_E_REOLEDBNLY = unchecked((int)0x80040E94), + + // MessageId: DB_E_ASYNCNOTSUPPORTED + // MessageText: + // Asynchronous binding is not supported by this provider. + DB_E_ASYNCNOTSUPPORTED = unchecked((int)0x80040E95), + + // MessageId: DB_E_CANNOTCONNECT + // MessageText: + // Connection to the server for this URL cannot be established. + DB_E_CANNOTCONNECT = unchecked((int)0x80040E96), + + // MessageId: DB_E_TIMEOUT + // MessageText: + // Timeout occurred when attempting to bind to the object. + DB_E_TIMEOUT = unchecked((int)0x80040E97), + + // MessageId: DB_E_RESOURCEEXISTS + // MessageText: + // Object cannot be created at this URL because an object named by this URL already exists. + DB_E_RESOURCEEXISTS = unchecked((int)0x80040E98), + + // MessageId: DB_E_RESOURCEOUTOFSCOPE + // MessageText: + // URL is outside of scope. + DB_E_RESOURCEOUTOFSCOPE = unchecked((int)0x80040E8E), + + // MessageId: DB_E_DROPRESTRICTED + // MessageText: + // Column or constraint could not be dropped because it is referenced by a dependent view or constraint. + DB_E_DROPRESTRICTED = unchecked((int)0x80040E90), + + // MessageId: DB_E_DUPLICATECONSTRAINTID + // MessageText: + // Constraint already exists. + DB_E_DUPLICATECONSTRAINTID = unchecked((int)0x80040E99), + + // MessageId: DB_E_OUTOFSPACE + // MessageText: + // Object cannot be created at this URL because the server is out of physical storage. + DB_E_OUTOFSPACE = unchecked((int)0x80040E9A), + + // MessageId: DB_SEC_E_SAFEMODE_DENIED + // MessageText: + // Safety settings on this computer prohibit accessing a data source on another domain. + DB_SEC_E_SAFEMODE_DENIED = unchecked((int)0x80040E9B), + + // MessageId: DB_S_ROWLIMITEXCEEDED + // MessageText: + // Fetching requested number of rows will exceed total number of active rows supported by the rowset. + DB_S_ROWLIMITEXCEEDED = 0x00040EC0, + + // MessageId: DB_S_COLUMNTYPEMISMATCH + // MessageText: + // One or more column types are incompatible. Conversion errors will occur during copying. + DB_S_COLUMNTYPEMISMATCH = 0x00040EC1, + + // MessageId: DB_S_TYPEINFOOVERRIDDEN + // MessageText: + // Parameter type information was overridden by caller. + DB_S_TYPEINFOOVERRIDDEN = 0x00040EC2, + + // MessageId: DB_S_BOOKMARKSKIPPED + // MessageText: + // Bookmark was skipped for deleted or nonmember row. + DB_S_BOOKMARKSKIPPED = 0x00040EC3, + + // MessageId: DB_S_NONEXTROWSET + // MessageText: + // No more rowsets. + DB_S_NONEXTROWSET = 0x00040EC5, + + // MessageId: DB_S_ENDOFROWSET + // MessageText: + // Start or end of rowset or chapter was reached. + DB_S_ENDOFROWSET = 0x00040EC6, + + // MessageId: DB_S_COMMANDREEXECUTED + // MessageText: + // Command was reexecuted. + DB_S_COMMANDREEXECUTED = 0x00040EC7, + + // MessageId: DB_S_BUFFERFULL + // MessageText: + // Operation succeeded, but status array or string buffer could not be allocated. + DB_S_BUFFERFULL = 0x00040EC8, + + // MessageId: DB_S_NORESULT + // MessageText: + // No more results. + DB_S_NORESULT = 0x00040EC9, + + // MessageId: DB_S_CANTRELEASE + // MessageText: + // Server cannot release or downgrade a lock until the end of the transaction. + DB_S_CANTRELEASE = 0x00040ECA, + + // MessageId: DB_S_GOALCHANGED + // MessageText: + // Weight is not supported or exceeded the supported limit, and was set to 0 or the supported limit. + DB_S_GOALCHANGED = 0x00040ECB, + + // MessageId: DB_S_UNWANTEDOPERATION + // MessageText: + // Consumer does not want to receive further notification calls for this operation. + DB_S_UNWANTEDOPERATION = 0x00040ECC, + + // MessageId: DB_S_DIALECTIGNORED + // MessageText: + // Input dialect was ignored and command was processed using default dialect. + DB_S_DIALECTIGNORED = 0x00040ECD, + + // MessageId: DB_S_UNWANTEDPHASE + // MessageText: + // Consumer does not want to receive further notification calls for this phase. + DB_S_UNWANTEDPHASE = 0x00040ECE, + + // MessageId: DB_S_UNWANTEDREASON + // MessageText: + // Consumer does not want to receive further notification calls for this reason. + DB_S_UNWANTEDREASON = 0x00040ECF, + + // MessageId: DB_S_ASYNCHRONOUS + // MessageText: + // Operation is being processed asynchronously. + DB_S_ASYNCHRONOUS = 0x00040ED0, + + // MessageId: DB_S_COLUMNSCHANGED + // MessageText: + // Command was executed to reposition to the start of the rowset. Either the order of the columns changed, or columns were added to or removed from the rowset. + DB_S_COLUMNSCHANGED = 0x00040ED1, + + // MessageId: DB_S_ERRORSRETURNED + // MessageText: + // Method had some errors, which were returned in the error array. + DB_S_ERRORSRETURNED = 0x00040ED2, + + // MessageId: DB_S_BADROWHANDLE + // MessageText: + // Row handle is invalid. + DB_S_BADROWHANDLE = 0x00040ED3, + + // MessageId: DB_S_DELETEDROW + // MessageText: + // Row handle referred to a deleted row. + DB_S_DELETEDROW = 0x00040ED4, + + // MessageId: DB_S_TOOMANYCHANGES + // MessageText: + // Provider cannot keep track of all the changes. Client must refetch the data associated with the watch region by using another method. + DB_S_TOOMANYCHANGES = 0x00040ED5, + + // MessageId: DB_S_STOPLIMITREACHED + // MessageText: + // Execution stopped because a resource limit was reached. Results obtained so far were returned, but execution cannot resume. + DB_S_STOPLIMITREACHED = 0x00040ED6, + + // MessageId: DB_S_LOCKUPGRADED + // MessageText: + // Lock was upgraded from the value specified. + DB_S_LOCKUPGRADED = 0x00040ED8, + + // MessageId: DB_S_PROPERTIESCHANGED + // MessageText: + // One or more properties were changed as allowed by provider. + DB_S_PROPERTIESCHANGED = 0x00040ED9, + + // MessageId: DB_S_ERRORSOCCURRED + // MessageText: + // Multiple-step operation completed with one or more errors. Check each status value. + DB_S_ERRORSOCCURRED = 0x00040EDA, + + // MessageId: DB_S_PARAMUNAVAILABLE + // MessageText: + // Parameter is invalid. + DB_S_PARAMUNAVAILABLE = 0x00040EDB, + + // MessageId: DB_S_MULTIPLECHANGES + // MessageText: + // Updating a row caused more than one row to be updated in the data source. + DB_S_MULTIPLECHANGES = 0x00040EDC, + + // MessageId: DB_S_NOTSINGLETON + // MessageText: + // Row object was requested on a non-singleton result. First row was returned. + DB_S_NOTSINGLETON = 0x00040ED7, + + // MessageId: DB_S_NOROWSPECIFICCOLUMNS + // MessageText: + // Row has no row-specific columns. + DB_S_NOROWSPECIFICCOLUMNS = 0x00040EDD, + + XACT_E_FIRST = unchecked((int)0x8004d000), + XACT_E_LAST = unchecked((int)0x8004d022), + XACT_S_FIRST = 0x4d000, + XACT_S_LAST = 0x4d009, + XACT_E_ALREADYOTHERSINGLEPHASE = unchecked((int)0x8004d000), + XACT_E_CANTRETAIN = unchecked((int)0x8004d001), + XACT_E_COMMITFAILED = unchecked((int)0x8004d002), + XACT_E_COMMITPREVENTED = unchecked((int)0x8004d003), + XACT_E_HEURISTICABORT = unchecked((int)0x8004d004), + XACT_E_HEURISTICCOMMIT = unchecked((int)0x8004d005), + XACT_E_HEURISTICDAMAGE = unchecked((int)0x8004d006), + XACT_E_HEURISTICDANGER = unchecked((int)0x8004d007), + XACT_E_ISOLATIONLEVEL = unchecked((int)0x8004d008), + XACT_E_NOASYNC = unchecked((int)0x8004d009), + XACT_E_NOENLIST = unchecked((int)0x8004d00a), + XACT_E_NOISORETAIN = unchecked((int)0x8004d00b), + XACT_E_NORESOURCE = unchecked((int)0x8004d00c), + XACT_E_NOTCURRENT = unchecked((int)0x8004d00d), + XACT_E_NOTRANSACTION = unchecked((int)0x8004d00e), + XACT_E_NOTSUPPORTED = unchecked((int)0x8004d00f), + XACT_E_UNKNOWNRMGRID = unchecked((int)0x8004d010), + XACT_E_WRONGSTATE = unchecked((int)0x8004d011), + XACT_E_WRONGUOW = unchecked((int)0x8004d012), + XACT_E_XTIONEXISTS = unchecked((int)0x8004d013), + XACT_E_NOIMPORTOBJECT = unchecked((int)0x8004d014), + XACT_E_INVALIDCOOKIE = unchecked((int)0x8004d015), + XACT_E_INDOUBT = unchecked((int)0x8004d016), + XACT_E_NOTIMEOUT = unchecked((int)0x8004d017), + XACT_E_ALREADYINPROGRESS = unchecked((int)0x8004d018), + XACT_E_ABORTED = unchecked((int)0x8004d019), + XACT_E_LOGFULL = unchecked((int)0x8004d01a), + XACT_E_TMNOTAVAILABLE = unchecked((int)0x8004d01b), + XACT_E_CONNECTION_DOWN = unchecked((int)0x8004d01c), + XACT_E_CONNECTION_DENIED = unchecked((int)0x8004d01d), + XACT_E_REENLISTTIMEOUT = unchecked((int)0x8004d01e), + XACT_E_TIP_CONNECT_FAILED = unchecked((int)0x8004d01f), + XACT_E_TIP_PROTOCOL_ERROR = unchecked((int)0x8004d020), + XACT_E_TIP_PULL_FAILED = unchecked((int)0x8004d021), + XACT_E_DEST_TMNOTAVAILABLE = unchecked((int)0x8004d022), + XACT_E_CLERKNOTFOUND = unchecked((int)0x8004d080), + XACT_E_CLERKEXISTS = unchecked((int)0x8004d081), + XACT_E_RECOVERYINPROGRESS = unchecked((int)0x8004d082), + XACT_E_TRANSACTIONCLOSED = unchecked((int)0x8004d083), + XACT_E_INVALIDLSN = unchecked((int)0x8004d084), + XACT_E_REPLAYREQUEST = unchecked((int)0x8004d085), + XACT_S_ASYNC = 0x4d000, + XACT_S_DEFECT = 0x4d001, + XACT_S_REOLEDBNLY = 0x4d002, + XACT_S_SOMENORETAIN = 0x4d003, + XACT_S_OKINFORM = 0x4d004, + XACT_S_MADECHANGESCONTENT = 0x4d005, + XACT_S_MADECHANGESINFORM = 0x4d006, + XACT_S_ALLNORETAIN = 0x4d007, + XACT_S_ABORTING = 0x4d008, + XACT_S_SINGLEPHASE = 0x4d009, + + STG_E_INVALIDFUNCTION = unchecked((int)0x80030001), + STG_E_FILENOTFOUND = unchecked((int)0x80030002), + STG_E_PATHNOTFOUND = unchecked((int)0x80030003), + STG_E_TOOMANYOPENFILES = unchecked((int)0x80030004), + STG_E_ACCESSDENIED = unchecked((int)0x80030005), + STG_E_INVALIDHANDLE = unchecked((int)0x80030006), + STG_E_INSUFFICIENTMEMORY = unchecked((int)0x80030008), + STG_E_INVALIDPOINTER = unchecked((int)0x80030009), + STG_E_NOMOREFILES = unchecked((int)0x80030012), + STG_E_DISKISWRITEPROTECTED = unchecked((int)0x80030013), + STG_E_SEEKERROR = unchecked((int)0x80030019), + STG_E_WRITEFAULT = unchecked((int)0x8003001D), + STG_E_READFAULT = unchecked((int)0x8003001E), + STG_E_SHAREVIOLATION = unchecked((int)0x80030020), + STG_E_LOCKVIOLATION = unchecked((int)0x80030021), + STG_E_FILEALREADYEXISTS = unchecked((int)0x80030050), + STG_E_INVALIDPARAMETER = unchecked((int)0x80030057), + STG_E_MEDIUMFULL = unchecked((int)0x80030070), + STG_E_PROPSETMISMATCHED = unchecked((int)0x800300F0), + STG_E_ABNORMALAPIEXIT = unchecked((int)0x800300FA), + STG_E_INVALIDHEADER = unchecked((int)0x800300FB), + STG_E_INVALIDNAME = unchecked((int)0x800300FC), + STG_E_UNKNOWN = unchecked((int)0x800300FD), + STG_E_UNIMPLEMENTEDFUNCTION = unchecked((int)0x800300FE), + STG_E_INVALIDFLAG = unchecked((int)0x800300FF), + STG_E_INUSE = unchecked((int)0x80030100), + STG_E_NOTCURRENT = unchecked((int)0x80030101), + STG_E_REVERTED = unchecked((int)0x80030102), + STG_E_CANTSAVE = unchecked((int)0x80030103), + STG_E_OLDFORMAT = unchecked((int)0x80030104), + STG_E_OLDDLL = unchecked((int)0x80030105), + STG_E_SHAREREQUIRED = unchecked((int)0x80030106), + STG_E_NOTFILEBASEDSTORAGE = unchecked((int)0x80030107), + STG_E_EXTANTMARSHALLINGS = unchecked((int)0x80030108), + STG_E_DOCFILECORRUPT = unchecked((int)0x80030109), + STG_E_BADBASEADDRESS = unchecked((int)0x80030110), + STG_E_INCOMPLETE = unchecked((int)0x80030201), + STG_E_TERMINATED = unchecked((int)0x80030202), + STG_S_CONVERTED = 0x00030200, + STG_S_BLOCK = 0x00030201, + STG_S_RETRYNOW = 0x00030202, + STG_S_MONITORING = 0x00030203, + } +} diff --git a/src/System.Data.OleDb/src/OleDbInfoMessageEvent.cs b/src/System.Data.OleDb/src/OleDbInfoMessageEvent.cs new file mode 100644 index 000000000000..62f0427365d8 --- /dev/null +++ b/src/System.Data.OleDb/src/OleDbInfoMessageEvent.cs @@ -0,0 +1,56 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Diagnostics; + +namespace System.Data.OleDb +{ + public sealed class OleDbInfoMessageEventArgs : System.EventArgs + { + readonly private OleDbException exception; + + internal OleDbInfoMessageEventArgs(OleDbException exception) + { + Debug.Assert(null != exception, "OleDbInfoMessageEventArgs without OleDbException"); + this.exception = exception; + } + + public int ErrorCode + { + get + { + return this.exception.ErrorCode; + } + } + + public OleDbErrorCollection Errors + { + get + { + return this.exception.Errors; + } + } + + public string Message + { + get + { + return this.exception.Message; + } + } + + public string Source + { + get + { + return this.exception.Source; + } + } + + override public string ToString() + { + return Message; + } + } +} diff --git a/src/System.Data.OleDb/src/OleDbInfoMessageEventHandler.cs b/src/System.Data.OleDb/src/OleDbInfoMessageEventHandler.cs new file mode 100644 index 000000000000..951cd2043cb9 --- /dev/null +++ b/src/System.Data.OleDb/src/OleDbInfoMessageEventHandler.cs @@ -0,0 +1,8 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +namespace System.Data.OleDb +{ + public delegate void OleDbInfoMessageEventHandler(object sender, OleDbInfoMessageEventArgs e); +} diff --git a/src/System.Data.OleDb/src/OleDbLiteral.cs b/src/System.Data.OleDb/src/OleDbLiteral.cs new file mode 100644 index 000000000000..b8b4ce7fa29d --- /dev/null +++ b/src/System.Data.OleDb/src/OleDbLiteral.cs @@ -0,0 +1,45 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +namespace System.Data.OleDb +{ + public enum OleDbLiteral : int + { + Invalid = 0, + Binary_Literal = 1, + Catalog_Name = 2, + Catalog_Separator = 3, + Char_Literal = 4, + Column_Alias = 5, + Column_Name = 6, + Correlation_Name = 7, + Cursor_Name = 8, + Escape_Percent_Prefix = 9, + Escape_Underscore_Prefix = 10, + Index_Name = 11, + Like_Percent = 12, + Like_Underscore = 13, + Procedure_Name = 14, + Quote_Prefix = 15, + Schema_Name = 16, + Table_Name = 17, + Text_Command = 18, + User_Name = 19, + View_Name = 20, + + // MDAC 2.0 + Cube_Name = 21, + Dimension_Name = 22, + Hierarchy_Name = 23, + Level_Name = 24, + Member_Name = 25, + Property_Name = 26, + Schema_Separator = 27, + Quote_Suffix = 28, + + // MDAC 2.1 + Escape_Percent_Suffix = 29, + Escape_Underscore_Suffix = 30, + } +} diff --git a/src/System.Data.OleDb/src/OleDbMetaDataFactory.cs b/src/System.Data.OleDb/src/OleDbMetaDataFactory.cs new file mode 100644 index 000000000000..7ad853c36f0e --- /dev/null +++ b/src/System.Data.OleDb/src/OleDbMetaDataFactory.cs @@ -0,0 +1,686 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Data.Common; +using System.Data.ProviderBase; +using System.Diagnostics; +using System.Globalization; +using System.IO; +using System.Text; + +namespace System.Data.OleDb +{ + internal sealed class OleDbMetaDataFactory : DbMetaDataFactory + { // V1.2.3300 + + private struct SchemaRowsetName + { + internal SchemaRowsetName(string schemaName, Guid schemaRowset) + { + _schemaName = schemaName; + _schemaRowset = schemaRowset; + } + internal readonly string _schemaName; + internal readonly Guid _schemaRowset; + } + + private const string _collectionName = "CollectionName"; + private const string _populationMechanism = "PopulationMechanism"; + private const string _prepareCollection = "PrepareCollection"; + + private readonly SchemaRowsetName[] _schemaMapping; + + internal OleDbMetaDataFactory(Stream XMLStream, + string serverVersion, + string serverVersionNormalized, + SchemaSupport[] schemaSupport) : + base(XMLStream, serverVersion, serverVersionNormalized) + { + // set up the colletion mane schema rowset guid mapping + _schemaMapping = new SchemaRowsetName[] { + new SchemaRowsetName(DbMetaDataCollectionNames.DataTypes,OleDbSchemaGuid.Provider_Types), + new SchemaRowsetName(OleDbMetaDataCollectionNames.Catalogs,OleDbSchemaGuid.Catalogs), + new SchemaRowsetName(OleDbMetaDataCollectionNames.Collations,OleDbSchemaGuid.Collations), + new SchemaRowsetName(OleDbMetaDataCollectionNames.Columns,OleDbSchemaGuid.Columns), + new SchemaRowsetName(OleDbMetaDataCollectionNames.Indexes,OleDbSchemaGuid.Indexes), + new SchemaRowsetName(OleDbMetaDataCollectionNames.Procedures,OleDbSchemaGuid.Procedures), + new SchemaRowsetName(OleDbMetaDataCollectionNames.ProcedureColumns,OleDbSchemaGuid.Procedure_Columns), + new SchemaRowsetName(OleDbMetaDataCollectionNames.ProcedureParameters,OleDbSchemaGuid.Procedure_Parameters), + new SchemaRowsetName(OleDbMetaDataCollectionNames.Tables,OleDbSchemaGuid.Tables), + new SchemaRowsetName(OleDbMetaDataCollectionNames.Views,OleDbSchemaGuid.Views)}; + + // verify the existance of the table in the data set + DataTable metaDataCollectionsTable = CollectionDataSet.Tables[DbMetaDataCollectionNames.MetaDataCollections]; + if (metaDataCollectionsTable == null) + { + throw ADP.UnableToBuildCollection(DbMetaDataCollectionNames.MetaDataCollections); + } + + // copy the table filtering out any rows that don't apply to the current version of the provider + metaDataCollectionsTable = CloneAndFilterCollection(DbMetaDataCollectionNames.MetaDataCollections, null); + + // verify the existance of the table in the data set + DataTable restrictionsTable = CollectionDataSet.Tables[DbMetaDataCollectionNames.Restrictions]; + if (restrictionsTable != null) + { + // copy the table filtering out any rows that don't apply to the current version of the provider + restrictionsTable = CloneAndFilterCollection(DbMetaDataCollectionNames.Restrictions, null); + } + + // need to filter out any of the collections where + // 1) it is populated using prepare collection + // 2) it is in the collection to schema rowset mapping above + // 3) the provider does not support the necessary schema rowset + + DataColumn populationMechanism = metaDataCollectionsTable.Columns[_populationMechanism]; + if ((null == populationMechanism) || (typeof(System.String) != populationMechanism.DataType)) + { + throw ADP.InvalidXmlMissingColumn(DbMetaDataCollectionNames.MetaDataCollections, _populationMechanism); + } + DataColumn collectionName = metaDataCollectionsTable.Columns[_collectionName]; + if ((null == collectionName) || (typeof(System.String) != collectionName.DataType)) + { + throw ADP.InvalidXmlMissingColumn(DbMetaDataCollectionNames.MetaDataCollections, _collectionName); + } + DataColumn restrictionCollectionName = null; + if (restrictionsTable != null) + { + restrictionCollectionName = restrictionsTable.Columns[_collectionName]; + if ((null == restrictionCollectionName) || (typeof(System.String) != restrictionCollectionName.DataType)) + { + throw ADP.InvalidXmlMissingColumn(DbMetaDataCollectionNames.Restrictions, _collectionName); + } + } + + foreach (DataRow collection in metaDataCollectionsTable.Rows) + { + string populationMechanismValue = collection[populationMechanism] as string; + if (ADP.IsEmpty(populationMechanismValue)) + { + throw ADP.InvalidXmlInvalidValue(DbMetaDataCollectionNames.MetaDataCollections, _populationMechanism); + } + string collectionNameValue = collection[collectionName] as string; + if (ADP.IsEmpty(collectionNameValue)) + { + throw ADP.InvalidXmlInvalidValue(DbMetaDataCollectionNames.MetaDataCollections, _collectionName); + } + + if (populationMechanismValue == _prepareCollection) + { + // is the collection in the mapping + int mapping = -1; + for (int i = 0; i < _schemaMapping.Length; i++) + { + if (_schemaMapping[i]._schemaName == collectionNameValue) + { + mapping = i; + break; + } + } + // no go on to the next collection + if (mapping == -1) + { + continue; + } + + // does the provider support the necessary schema rowset + bool isSchemaRowsetSupported = false; + if (schemaSupport != null) + { + for (int i = 0; i < schemaSupport.Length; i++) + { + if (_schemaMapping[mapping]._schemaRowset == schemaSupport[i]._schemaRowset) + { + isSchemaRowsetSupported = true; + break; + } + } + } + // if not delete the row from the table + if (isSchemaRowsetSupported == false) + { + // but first delete any related restrictions + if (restrictionsTable != null) + { + foreach (DataRow restriction in restrictionsTable.Rows) + { + string restrictionCollectionNameValue = restriction[restrictionCollectionName] as string; + if (ADP.IsEmpty(restrictionCollectionNameValue)) + { + throw ADP.InvalidXmlInvalidValue(DbMetaDataCollectionNames.Restrictions, _collectionName); + } + if (collectionNameValue == restrictionCollectionNameValue) + { + restriction.Delete(); + } + } + restrictionsTable.AcceptChanges(); + } + collection.Delete(); + } + + } + } + + // replace the original table with the updated one + metaDataCollectionsTable.AcceptChanges(); + CollectionDataSet.Tables.Remove(CollectionDataSet.Tables[DbMetaDataCollectionNames.MetaDataCollections]); + CollectionDataSet.Tables.Add(metaDataCollectionsTable); + + if (restrictionsTable != null) + { + CollectionDataSet.Tables.Remove(CollectionDataSet.Tables[DbMetaDataCollectionNames.Restrictions]); + CollectionDataSet.Tables.Add(restrictionsTable); + } + + } + + private String BuildRegularExpression(string invalidChars, string invalidStartingChars) + { + StringBuilder regularExpression = new StringBuilder("[^"); + ADP.EscapeSpecialCharacters(invalidStartingChars, regularExpression); + regularExpression.Append("][^"); + ADP.EscapeSpecialCharacters(invalidChars, regularExpression); + regularExpression.Append("]*"); + + return regularExpression.ToString(); + } + + private DataTable GetDataSourceInformationTable(OleDbConnection connection, OleDbConnectionInternal internalConnection) + { + // verify that the data source information table is in the data set + DataTable dataSourceInformationTable = CollectionDataSet.Tables[DbMetaDataCollectionNames.DataSourceInformation]; + if (dataSourceInformationTable == null) + { + throw ADP.UnableToBuildCollection(DbMetaDataCollectionNames.DataSourceInformation); + } + + // copy the table filtering out any rows that don't apply to tho current version of the prrovider + dataSourceInformationTable = CloneAndFilterCollection(DbMetaDataCollectionNames.DataSourceInformation, null); + + // after filtering there better be just one row + if (dataSourceInformationTable.Rows.Count != 1) + { + throw ADP.IncorrectNumberOfDataSourceInformationRows(); + } + DataRow dataSourceInformation = dataSourceInformationTable.Rows[0]; + + // update the identifier separator + string catalogSeparatorPattern = internalConnection.GetLiteralInfo(ODB.DBLITERAL_CATALOG_SEPARATOR); + string schemaSeparatorPattern = internalConnection.GetLiteralInfo(ODB.DBLITERAL_SCHEMA_SEPARATOR); + + if (catalogSeparatorPattern != null) + { + StringBuilder compositeSeparatorPattern = new StringBuilder(); + StringBuilder patternEscaped = new StringBuilder(); + ADP.EscapeSpecialCharacters(catalogSeparatorPattern, patternEscaped); + compositeSeparatorPattern.Append(patternEscaped.ToString()); + if ((schemaSeparatorPattern != null) && (schemaSeparatorPattern != catalogSeparatorPattern)) + { + compositeSeparatorPattern.Append("|"); + patternEscaped.Length = 0; + ADP.EscapeSpecialCharacters(schemaSeparatorPattern, patternEscaped); + compositeSeparatorPattern.Append(patternEscaped.ToString()); + } + dataSourceInformation[DbMetaDataColumnNames.CompositeIdentifierSeparatorPattern] = compositeSeparatorPattern.ToString(); + } + else if (schemaSeparatorPattern != null) + { + StringBuilder patternEscaped = new StringBuilder(); + ADP.EscapeSpecialCharacters(schemaSeparatorPattern, patternEscaped); + dataSourceInformation[DbMetaDataColumnNames.CompositeIdentifierSeparatorPattern] = patternEscaped.ToString(); + ; + } + + // update the DataSourceProductName + object property; + property = connection.GetDataSourcePropertyValue(OleDbPropertySetGuid.DataSourceInfo, ODB.DBPROP_DBMSNAME); + if (property != null) + { + dataSourceInformation[DbMetaDataColumnNames.DataSourceProductName] = (string)property; + } + + // update the server version strings + dataSourceInformation[DbMetaDataColumnNames.DataSourceProductVersion] = ServerVersion; + dataSourceInformation[DbMetaDataColumnNames.DataSourceProductVersionNormalized] = ServerVersionNormalized; + + // values that are the same for all OLE DB Providers. + dataSourceInformation[DbMetaDataColumnNames.ParameterMarkerFormat] = "?"; + dataSourceInformation[DbMetaDataColumnNames.ParameterMarkerPattern] = "\\?"; + dataSourceInformation[DbMetaDataColumnNames.ParameterNameMaxLength] = 0; + + property = connection.GetDataSourcePropertyValue(OleDbPropertySetGuid.DataSourceInfo, ODB.DBPROP_GROUPBY); + GroupByBehavior groupByBehavior = GroupByBehavior.Unknown; + if (property != null) + { + switch ((int)property) + { + case ODB.DBPROPVAL_GB_CONTAINS_SELECT: + groupByBehavior = GroupByBehavior.MustContainAll; + break; + + case ODB.DBPROPVAL_GB_EQUALS_SELECT: + groupByBehavior = GroupByBehavior.ExactMatch; + break; + + case ODB.DBPROPVAL_GB_NO_RELATION: + groupByBehavior = GroupByBehavior.Unrelated; + break; + + case ODB.DBPROPVAL_GB_NOT_SUPPORTED: + groupByBehavior = GroupByBehavior.NotSupported; + break; + } + } + dataSourceInformation[DbMetaDataColumnNames.GroupByBehavior] = groupByBehavior; + + SetIdentifierCase(DbMetaDataColumnNames.IdentifierCase, ODB.DBPROP_IDENTIFIERCASE, dataSourceInformation, connection); + SetIdentifierCase(DbMetaDataColumnNames.QuotedIdentifierCase, ODB.DBPROP_QUOTEDIDENTIFIERCASE, dataSourceInformation, connection); + + property = connection.GetDataSourcePropertyValue(OleDbPropertySetGuid.DataSourceInfo, ODB.DBPROP_ORDERBYCOLUNSINSELECT); + if (property != null) + { + dataSourceInformation[DbMetaDataColumnNames.OrderByColumnsInSelect] = (bool)property; + } + + DataTable infoLiterals = internalConnection.BuildInfoLiterals(); + if (infoLiterals != null) + { + DataRow[] tableNameRow = infoLiterals.Select("Literal = " + ODB.DBLITERAL_TABLE_NAME.ToString(CultureInfo.InvariantCulture)); + if (tableNameRow != null) + { + object invalidCharsObject = tableNameRow[0]["InvalidChars"]; + if (invalidCharsObject.GetType() == typeof(string)) + { + string invalidChars = (string)invalidCharsObject; + object invalidStartingCharsObject = tableNameRow[0]["InvalidStartingChars"]; + string invalidStartingChars; + if (invalidStartingCharsObject.GetType() == typeof(string)) + { + invalidStartingChars = (string)invalidStartingCharsObject; + } + else + { + invalidStartingChars = invalidChars; + } + dataSourceInformation[DbMetaDataColumnNames.IdentifierPattern] = + BuildRegularExpression(invalidChars, invalidStartingChars); + } + } + } + + // build the QuotedIdentifierPattern using the quote prefix and suffix from the provider and + // assuming that the quote suffix is escaped via repetion (i.e " becomes "") + string quotePrefix; + string quoteSuffix; + connection.GetLiteralQuotes(ADP.GetSchema, out quotePrefix, out quoteSuffix); + + if (quotePrefix != null) + { + // if the quote suffix is null assume that it is the same as the prefix (See OLEDB spec + // IDBInfo::GetLiteralInfo DBLITERAL_QUOTE_SUFFIX.) + if (quoteSuffix == null) + { + quoteSuffix = quotePrefix; + } + + // only know how to build the parttern if the suffix is 1 character + // in all other cases just leave the field null + if (quoteSuffix.Length == 1) + { + StringBuilder scratchStringBuilder = new StringBuilder(); + ADP.EscapeSpecialCharacters(quoteSuffix, scratchStringBuilder); + string escapedQuoteSuffixString = scratchStringBuilder.ToString(); + scratchStringBuilder.Length = 0; + + ADP.EscapeSpecialCharacters(quotePrefix, scratchStringBuilder); + scratchStringBuilder.Append("(([^"); + scratchStringBuilder.Append(escapedQuoteSuffixString); + scratchStringBuilder.Append("]|"); + scratchStringBuilder.Append(escapedQuoteSuffixString); + scratchStringBuilder.Append(escapedQuoteSuffixString); + scratchStringBuilder.Append(")*)"); + scratchStringBuilder.Append(escapedQuoteSuffixString); + dataSourceInformation[DbMetaDataColumnNames.QuotedIdentifierPattern] = scratchStringBuilder.ToString(); + } + } + + dataSourceInformationTable.AcceptChanges(); + + return dataSourceInformationTable; + } + + private DataTable GetDataTypesTable(OleDbConnection connection) + { + // verify the existance of the table in the data set + DataTable dataTypesTable = CollectionDataSet.Tables[DbMetaDataCollectionNames.DataTypes]; + if (dataTypesTable == null) + { + throw ADP.UnableToBuildCollection(DbMetaDataCollectionNames.DataTypes); + } + + // copy the table filtering out any rows that don't apply to tho current version of the prrovider + dataTypesTable = CloneAndFilterCollection(DbMetaDataCollectionNames.DataTypes, null); + + DataTable providerTypesTable = connection.GetOleDbSchemaTable(OleDbSchemaGuid.Provider_Types, null); + + DataColumn[] targetColumns = new DataColumn[] { + dataTypesTable.Columns[DbMetaDataColumnNames.TypeName], + dataTypesTable.Columns[DbMetaDataColumnNames.ColumnSize], + dataTypesTable.Columns[DbMetaDataColumnNames.CreateParameters], + dataTypesTable.Columns[DbMetaDataColumnNames.IsAutoIncrementable], + dataTypesTable.Columns[DbMetaDataColumnNames.IsCaseSensitive], + dataTypesTable.Columns[DbMetaDataColumnNames.IsFixedLength], + dataTypesTable.Columns[DbMetaDataColumnNames.IsFixedPrecisionScale], + dataTypesTable.Columns[DbMetaDataColumnNames.IsLong], + dataTypesTable.Columns[DbMetaDataColumnNames.IsNullable], + dataTypesTable.Columns[DbMetaDataColumnNames.IsUnsigned], + dataTypesTable.Columns[DbMetaDataColumnNames.MaximumScale], + dataTypesTable.Columns[DbMetaDataColumnNames.MinimumScale], + dataTypesTable.Columns[DbMetaDataColumnNames.LiteralPrefix], + dataTypesTable.Columns[DbMetaDataColumnNames.LiteralSuffix], + dataTypesTable.Columns[OleDbMetaDataColumnNames.NativeDataType]}; + + DataColumn[] sourceColumns = new DataColumn[] { + providerTypesTable.Columns["TYPE_NAME"], + providerTypesTable.Columns["COLUMN_SIZE"], + providerTypesTable.Columns["CREATE_PARAMS"], + providerTypesTable.Columns["AUTO_UNIQUE_VALUE"], + providerTypesTable.Columns["CASE_SENSITIVE"], + providerTypesTable.Columns["IS_FIXEDLENGTH"], + providerTypesTable.Columns["FIXED_PREC_SCALE"], + providerTypesTable.Columns["IS_LONG"], + providerTypesTable.Columns["IS_NULLABLE"], + providerTypesTable.Columns["UNSIGNED_ATTRIBUTE"], + providerTypesTable.Columns["MAXIMUM_SCALE"], + providerTypesTable.Columns["MINIMUM_SCALE"], + providerTypesTable.Columns["LITERAL_PREFIX"], + providerTypesTable.Columns["LITERAL_SUFFIX"], + providerTypesTable.Columns["DATA_TYPE"]}; + + Debug.Assert(sourceColumns.Length == targetColumns.Length); + + DataColumn isSearchable = dataTypesTable.Columns[DbMetaDataColumnNames.IsSearchable]; + DataColumn isSearchableWithLike = dataTypesTable.Columns[DbMetaDataColumnNames.IsSearchableWithLike]; + DataColumn providerDbType = dataTypesTable.Columns[DbMetaDataColumnNames.ProviderDbType]; + DataColumn clrType = dataTypesTable.Columns[DbMetaDataColumnNames.DataType]; + DataColumn isLong = dataTypesTable.Columns[DbMetaDataColumnNames.IsLong]; + DataColumn isFixed = dataTypesTable.Columns[DbMetaDataColumnNames.IsFixedLength]; + DataColumn sourceOleDbType = providerTypesTable.Columns["DATA_TYPE"]; + + DataColumn searchable = providerTypesTable.Columns["SEARCHABLE"]; + + foreach (DataRow sourceRow in providerTypesTable.Rows) + { + DataRow newRow = dataTypesTable.NewRow(); + for (int i = 0; i < sourceColumns.Length; i++) + { + if ((sourceColumns[i] != null) && (targetColumns[i] != null)) + { + newRow[targetColumns[i]] = sourceRow[sourceColumns[i]]; + } + } + + short nativeDataType = (short)Convert.ChangeType(sourceRow[sourceOleDbType], typeof(short), CultureInfo.InvariantCulture); + NativeDBType nativeType = NativeDBType.FromDBType(nativeDataType, (bool)newRow[isLong], (bool)newRow[isFixed]); + + newRow[clrType] = nativeType.dataType.FullName; + newRow[providerDbType] = nativeType.enumOleDbType; + + // searchable has to be special cased becasue it is not an eaxct mapping + if ((isSearchable != null) && (isSearchableWithLike != null) && (searchable != null)) + { + newRow[isSearchable] = DBNull.Value; + newRow[isSearchableWithLike] = DBNull.Value; + if (DBNull.Value != sourceRow[searchable]) + { + Int64 searchableValue = (Int64)(sourceRow[searchable]); + switch (searchableValue) + { + case ODB.DB_UNSEARCHABLE: + newRow[isSearchable] = false; + newRow[isSearchableWithLike] = false; + break; + + case ODB.DB_LIKE_ONLY: + newRow[isSearchable] = false; + newRow[isSearchableWithLike] = true; + break; + + case ODB.DB_ALL_EXCEPT_LIKE: + newRow[isSearchable] = true; + newRow[isSearchableWithLike] = false; + break; + + case ODB.DB_SEARCHABLE: + newRow[isSearchable] = true; + newRow[isSearchableWithLike] = true; + break; + } + } + } + + dataTypesTable.Rows.Add(newRow); + } + + dataTypesTable.AcceptChanges(); + + return dataTypesTable; + + } + + private DataTable GetReservedWordsTable(OleDbConnectionInternal internalConnection) + { + // verify the existance of the table in the data set + DataTable reservedWordsTable = CollectionDataSet.Tables[DbMetaDataCollectionNames.ReservedWords]; + if (null == reservedWordsTable) + { + throw ADP.UnableToBuildCollection(DbMetaDataCollectionNames.ReservedWords); + } + + // copy the table filtering out any rows that don't apply to tho current version of the prrovider + reservedWordsTable = CloneAndFilterCollection(DbMetaDataCollectionNames.ReservedWords, null); + + DataColumn reservedWordColumn = reservedWordsTable.Columns[DbMetaDataColumnNames.ReservedWord]; + if (null == reservedWordColumn) + { + throw ADP.UnableToBuildCollection(DbMetaDataCollectionNames.ReservedWords); + } + + if (!internalConnection.AddInfoKeywordsToTable(reservedWordsTable, reservedWordColumn)) + { + throw ODB.IDBInfoNotSupported(); + } + + return reservedWordsTable; + } + + protected override DataTable PrepareCollection(String collectionName, String[] restrictions, DbConnection connection) + { + OleDbConnection oleDbConnection = (OleDbConnection)connection; + OleDbConnectionInternal oleDbInternalConnection = (OleDbConnectionInternal)(oleDbConnection.InnerConnection); + DataTable resultTable = null; + if (collectionName == DbMetaDataCollectionNames.DataSourceInformation) + { + if (ADP.IsEmptyArray(restrictions) == false) + { + throw ADP.TooManyRestrictions(DbMetaDataCollectionNames.DataSourceInformation); + } + resultTable = GetDataSourceInformationTable(oleDbConnection, oleDbInternalConnection); + } + else if (collectionName == DbMetaDataCollectionNames.DataTypes) + { + if (ADP.IsEmptyArray(restrictions) == false) + { + throw ADP.TooManyRestrictions(DbMetaDataCollectionNames.DataTypes); + } + resultTable = GetDataTypesTable(oleDbConnection); + } + else if (collectionName == DbMetaDataCollectionNames.ReservedWords) + { + if (ADP.IsEmptyArray(restrictions) == false) + { + throw ADP.TooManyRestrictions(DbMetaDataCollectionNames.ReservedWords); + } + resultTable = GetReservedWordsTable(oleDbInternalConnection); + } + else + { + for (int i = 0; i < _schemaMapping.Length; i++) + { + if (_schemaMapping[i]._schemaName == collectionName) + { + // need to special case the oledb schema rowset restrictions on columns that are not + // string tpyes + object[] mungedRestrictions = restrictions; + ; + if (restrictions != null) + { + //verify that there are not too many restrictions + DataTable metaDataCollectionsTable = CollectionDataSet.Tables[DbMetaDataCollectionNames.MetaDataCollections]; + int numberOfSupportedRestictions = -1; + // prepare colletion is called with the exact collection name so + // we can do an exact string comparision here + foreach (DataRow row in metaDataCollectionsTable.Rows) + { + string candidateCollectionName = ((string)row[DbMetaDataColumnNames.CollectionName, DataRowVersion.Current]); + + if (collectionName == candidateCollectionName) + { + numberOfSupportedRestictions = (int)row[DbMetaDataColumnNames.NumberOfRestrictions]; + if (numberOfSupportedRestictions < restrictions.Length) + { + throw ADP.TooManyRestrictions(collectionName); + } + break; + } + } + + Debug.Assert(numberOfSupportedRestictions != -1, "PrepareCollection was called for an collection that is not supported."); + + // the 4th restrictionon the indexes schema rowset(type) is an I2 - enum + const int indexRestrictionTypeSlot = 3; + + if ((collectionName == OleDbMetaDataCollectionNames.Indexes) && + (restrictions.Length >= indexRestrictionTypeSlot + 1) && + (restrictions[indexRestrictionTypeSlot] != null)) + { + mungedRestrictions = new object[restrictions.Length]; + for (int j = 0; j < restrictions.Length; j++) + { + mungedRestrictions[j] = restrictions[j]; + } + + UInt16 indexTypeValue; + + if ((restrictions[indexRestrictionTypeSlot] == "DBPROPVAL_IT_BTREE") || + (restrictions[indexRestrictionTypeSlot] == "1")) + { + indexTypeValue = 1; + } + else if ((restrictions[indexRestrictionTypeSlot] == "DBPROPVAL_IT_HASH") || + (restrictions[indexRestrictionTypeSlot] == "2")) + { + indexTypeValue = 2; + } + else if ((restrictions[indexRestrictionTypeSlot] == "DBPROPVAL_IT_CONTENT") || + (restrictions[indexRestrictionTypeSlot] == "3")) + { + indexTypeValue = 3; + } + else if ((restrictions[indexRestrictionTypeSlot] == "DBPROPVAL_IT_OTHER") || + (restrictions[indexRestrictionTypeSlot] == "4")) + { + indexTypeValue = 4; + } + else + { + throw ADP.InvalidRestrictionValue(collectionName, "TYPE", restrictions[indexRestrictionTypeSlot]); + } + + mungedRestrictions[indexRestrictionTypeSlot] = indexTypeValue; + + } + + // the 4th restrictionon the procedures schema rowset(type) is an I2 - enum + const int procedureRestrictionTypeSlot = 3; + + if ((collectionName == OleDbMetaDataCollectionNames.Procedures) && + (restrictions.Length >= procedureRestrictionTypeSlot + 1) && + (restrictions[procedureRestrictionTypeSlot] != null)) + { + mungedRestrictions = new object[restrictions.Length]; + for (int j = 0; j < restrictions.Length; j++) + { + mungedRestrictions[j] = restrictions[j]; + } + + Int16 procedureTypeValue; + + if ((restrictions[procedureRestrictionTypeSlot] == "DB_PT_UNKNOWN") || + (restrictions[procedureRestrictionTypeSlot] == "1")) + { + procedureTypeValue = 1; + } + else if ((restrictions[procedureRestrictionTypeSlot] == "DB_PT_PROCEDURE") || + (restrictions[procedureRestrictionTypeSlot] == "2")) + { + procedureTypeValue = 2; + } + else if ((restrictions[procedureRestrictionTypeSlot] == "DB_PT_FUNCTION") || + (restrictions[procedureRestrictionTypeSlot] == "3")) + { + procedureTypeValue = 3; + } + else + { + throw ADP.InvalidRestrictionValue(collectionName, "PROCEDURE_TYPE", restrictions[procedureRestrictionTypeSlot]); + } + + mungedRestrictions[procedureRestrictionTypeSlot] = procedureTypeValue; + + } + } + + resultTable = oleDbConnection.GetOleDbSchemaTable((System.Guid)_schemaMapping[i]._schemaRowset, mungedRestrictions); + break; + } + } + } + + if (resultTable == null) + { + throw ADP.UnableToBuildCollection(collectionName); + } + + return resultTable; + } + + private void SetIdentifierCase(string columnName, int propertyID, DataRow row, OleDbConnection connection) + { + object property = connection.GetDataSourcePropertyValue(OleDbPropertySetGuid.DataSourceInfo, propertyID); + IdentifierCase identifierCase = IdentifierCase.Unknown; + if (property != null) + { + int propertyValue = (int)property; + switch (propertyValue) + { + case ODB.DBPROPVAL_IC_UPPER: + case ODB.DBPROPVAL_IC_LOWER: + case ODB.DBPROPVAL_IC_MIXED: + identifierCase = IdentifierCase.Insensitive; + break; + + case ODB.DBPROPVAL_IC_SENSITIVE: + identifierCase = IdentifierCase.Sensitive; + break; + } + } + row[columnName] = identifierCase; + + } + + } +} + diff --git a/src/System.Data.OleDb/src/OleDbMetadataCollectionNames.cs b/src/System.Data.OleDb/src/OleDbMetadataCollectionNames.cs new file mode 100644 index 000000000000..368470de59cc --- /dev/null +++ b/src/System.Data.OleDb/src/OleDbMetadataCollectionNames.cs @@ -0,0 +1,19 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +namespace System.Data.OleDb +{ + public static class OleDbMetaDataCollectionNames + { + public static readonly string Catalogs = "Catalogs"; + public static readonly string Collations = "Collations"; + public static readonly string Columns = "Columns"; + public static readonly string Indexes = "Indexes"; + public static readonly string Procedures = "Procedures"; + public static readonly string ProcedureColumns = "ProcedureColumns"; + public static readonly string ProcedureParameters = "ProcedureParameters"; + public static readonly string Tables = "Tables"; + public static readonly string Views = "Views"; + } +} diff --git a/src/System.Data.OleDb/src/OleDbMetadataColumnNames.cs b/src/System.Data.OleDb/src/OleDbMetadataColumnNames.cs new file mode 100644 index 000000000000..a8e50600c676 --- /dev/null +++ b/src/System.Data.OleDb/src/OleDbMetadataColumnNames.cs @@ -0,0 +1,15 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +namespace System.Data.OleDb +{ + public static class OleDbMetaDataColumnNames + { + public static readonly string BooleanFalseLiteral = "BooleanFalseLiteral"; + public static readonly string BooleanTrueLiteral = "BooleanTrueLiteral"; + public static readonly string NativeDataType = "NativeDataType"; + public static readonly string DateTimeDigits = "DateTimeDigits"; + } +} + diff --git a/src/System.Data.OleDb/src/OleDbParameter.cs b/src/System.Data.OleDb/src/OleDbParameter.cs new file mode 100644 index 000000000000..d4fe8e20eb10 --- /dev/null +++ b/src/System.Data.OleDb/src/OleDbParameter.cs @@ -0,0 +1,740 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.ComponentModel; +using System.Data.Common; +using System.Diagnostics; +using System.Globalization; + +namespace System.Data.OleDb +{ + [TypeConverter(typeof(OleDbParameter.OleDbParameterConverter))] + public sealed partial class OleDbParameter : DbParameter, ICloneable, IDbDataParameter + { + private NativeDBType _metaType; + private int _changeID; + + private string _parameterName; + private byte _precision; + private byte _scale; + private bool _hasScale; + + private NativeDBType _coerceMetaType; + + public OleDbParameter() : base() + { // V1.0 nothing + } + + public OleDbParameter(string name, object value) : this() + { + Debug.Assert(!(value is OleDbType), "use OleDbParameter(string, OleDbType)"); + Debug.Assert(!(value is SqlDbType), "use OleDbParameter(string, OleDbType)"); + + ParameterName = name; + Value = value; + } + + public OleDbParameter(string name, OleDbType dataType) : this() + { + ParameterName = name; + OleDbType = dataType; + } + + public OleDbParameter(string name, OleDbType dataType, int size) : this() + { + ParameterName = name; + OleDbType = dataType; + Size = size; + } + + public OleDbParameter(string name, OleDbType dataType, int size, string srcColumn) : this() + { + ParameterName = name; + OleDbType = dataType; + Size = size; + SourceColumn = srcColumn; + } + + [EditorBrowsable(EditorBrowsableState.Advanced)] + public OleDbParameter(string parameterName, + OleDbType dbType, int size, + ParameterDirection direction, Boolean isNullable, + Byte precision, Byte scale, + string srcColumn, DataRowVersion srcVersion, + object value) : this() + { // V1.0 everything + ParameterName = parameterName; + OleDbType = dbType; + Size = size; + Direction = direction; + IsNullable = isNullable; + PrecisionInternal = precision; + ScaleInternal = scale; + SourceColumn = srcColumn; + SourceVersion = srcVersion; + Value = value; + } + + [EditorBrowsable(EditorBrowsableState.Advanced)] + public OleDbParameter(string parameterName, + OleDbType dbType, int size, + ParameterDirection direction, + Byte precision, Byte scale, + string sourceColumn, DataRowVersion sourceVersion, bool sourceColumnNullMapping, + object value) : this() + { // V2.0 everything - round trip all browsable properties + precision/scale + ParameterName = parameterName; + OleDbType = dbType; + Size = size; + Direction = direction; + PrecisionInternal = precision; + ScaleInternal = scale; + SourceColumn = sourceColumn; + SourceVersion = sourceVersion; + SourceColumnNullMapping = sourceColumnNullMapping; + Value = value; + } + + internal int ChangeID + { + get + { + return _changeID; + } + } + + override public DbType DbType + { + get + { + return GetBindType(Value).enumDbType; + } + set + { + NativeDBType dbtype = _metaType; + if ((null == dbtype) || (dbtype.enumDbType != value)) + { + PropertyTypeChanging(); + _metaType = NativeDBType.FromDbType(value); + } + } + } + + public override void ResetDbType() + { + ResetOleDbType(); + } + + [ + RefreshProperties(RefreshProperties.All), + DbProviderSpecificTypeProperty(true), + ] + public OleDbType OleDbType + { + get + { + return GetBindType(Value).enumOleDbType; + } + set + { + NativeDBType dbtype = _metaType; + if ((null == dbtype) || (dbtype.enumOleDbType != value)) + { + PropertyTypeChanging(); + _metaType = NativeDBType.FromDataType(value); + } + } + } + + private bool ShouldSerializeOleDbType() + { + return (null != _metaType); + } + + public void ResetOleDbType() + { + if (null != _metaType) + { + PropertyTypeChanging(); + _metaType = null; + } + } + + override public string ParameterName + { // V1.2.3300, XXXParameter V1.0.3300 + get + { + string parameterName = _parameterName; + return ((null != parameterName) ? parameterName : string.Empty); + } + set + { + if (_parameterName != value) + { + PropertyChanging(); + _parameterName = value; + } + } + } + + [DefaultValue((Byte)0)] + public new Byte Precision + { + get + { + return PrecisionInternal; + } + set + { + PrecisionInternal = value; + } + } + internal byte PrecisionInternal + { + get + { + byte precision = _precision; + if (0 == precision) + { + precision = ValuePrecision(Value); + } + return precision; + } + set + { + if (_precision != value) + { + PropertyChanging(); + _precision = value; + } + } + } + private bool ShouldSerializePrecision() + { + return (0 != _precision); + } + + [DefaultValue((Byte)0)] + public new Byte Scale + { + get + { + return ScaleInternal; + } + set + { + ScaleInternal = value; + } + } + internal byte ScaleInternal + { + get + { + byte scale = _scale; + if (!ShouldSerializeScale(scale)) + { + scale = ValueScale(Value); + } + return scale; + } + set + { + if (_scale != value || !_hasScale) + { + PropertyChanging(); + _scale = value; + _hasScale = true; + } + } + } + private bool ShouldSerializeScale() + { + return ShouldSerializeScale(_scale); + } + + private bool ShouldSerializeScale(byte scale) + { + return _hasScale && ((0 != scale) || ShouldSerializePrecision()); + } + + object ICloneable.Clone() + { + return new OleDbParameter(this); + } + + private void CloneHelper(OleDbParameter destination) + { + CloneHelperCore(destination); + destination._metaType = _metaType; + destination._parameterName = _parameterName; + destination._precision = _precision; + destination._scale = _scale; + destination._hasScale = _hasScale; + } + + private void PropertyChanging() + { + unchecked + { _changeID++; } + } + + private void PropertyTypeChanging() + { + PropertyChanging(); + _coerceMetaType = null; + CoercedValue = null; + } + + // goal: call virtual property getters only once per parameter + internal bool BindParameter(int index, Bindings bindings) + { + int changeID = _changeID; + object value = Value; + + NativeDBType dbtype = GetBindType(value); + if (OleDbType.Empty == dbtype.enumOleDbType) + { + throw ODB.UninitializedParameters(index, dbtype.enumOleDbType); + } + _coerceMetaType = dbtype; + value = CoerceValue(value, dbtype); + CoercedValue = value; + + ParameterDirection direction = Direction; + + byte precision; + if (ShouldSerializePrecision()) + { + precision = PrecisionInternal; + } + else + { + precision = ValuePrecision(value); + } + if (0 == precision) + { + precision = dbtype.maxpre; + } + + byte scale; + if (ShouldSerializeScale()) + { + scale = ScaleInternal; + } + else + { + scale = ValueScale(value); + } + + int wtype = dbtype.wType; + int bytecount, size; + + if (dbtype.islong) + { // long data (image, text, ntext) + bytecount = ADP.PtrSize; + if (ShouldSerializeSize()) + { + size = Size; + } + else + { + if (NativeDBType.STR == dbtype.dbType) + { + size = Int32.MaxValue; + } + else if (NativeDBType.WSTR == dbtype.dbType) + { + size = Int32.MaxValue / 2; + } + else + { + size = Int32.MaxValue; + } + } + wtype |= NativeDBType.BYREF; + } + else if (dbtype.IsVariableLength) + { // variable length data (varbinary, varchar, nvarchar) + if (!ShouldSerializeSize() && ADP.IsDirection(this, ParameterDirection.Output)) + { + throw ADP.UninitializedParameterSize(index, _coerceMetaType.dataType); + } + + bool computedSize; + if (ShouldSerializeSize()) + { + size = Size; + computedSize = false; + } + else + { + size = ValueSize(value); + computedSize = true; + } + if (0 < size) + { + if (NativeDBType.WSTR == dbtype.wType) + { + // maximum 0x3FFFFFFE characters, computed this way to avoid overflow exception + bytecount = Math.Min(size, 0x3FFFFFFE) * 2 + 2; + } + else + { + Debug.Assert(NativeDBType.STR != dbtype.wType, "should have ANSI binding, describing is okay"); + bytecount = size; + } + + if (computedSize) + { + if (NativeDBType.STR == dbtype.dbType) + { + // maximum 0x7ffffffe characters, computed this way to avoid overflow exception + size = Math.Min(size, 0x3FFFFFFE) * 2; + } + } + + if (ODB.LargeDataSize < bytecount) + { + bytecount = ADP.PtrSize; + wtype |= NativeDBType.BYREF; + } + } + else if (0 == size) + { + if (NativeDBType.WSTR == wtype) + { // allow space for null termination character + bytecount = 2; + // 0 == size, okay for (STR == dbType) + } + else + { + Debug.Assert(NativeDBType.STR != dbtype.wType, "should have ANSI binding, describing is okay"); + bytecount = 0; + } + } + else if (-1 == size) + { + bytecount = ADP.PtrSize; + wtype |= NativeDBType.BYREF; + } + else + { + throw ADP.InvalidSizeValue(size); + } + } + else + { // fixed length data + bytecount = dbtype.fixlen; + size = bytecount; + } + bindings.CurrentIndex = index; + + // tagDBPARAMBINDINFO info for SetParameterInfo + bindings.DataSourceType = dbtype.dbString.DangerousGetHandle(); // NOTE: This is a constant and isn't exposed publicly, so there really isn't a potential for Handle Recycling. + bindings.Name = ADP.PtrZero; + bindings.ParamSize = new IntPtr(size); + bindings.Flags = GetBindFlags(direction); + //bindings.Precision = precision; + //bindings.Scale = scale; + + // tagDBBINDING info for CreateAccessor + bindings.Ordinal = (IntPtr)(index + 1); + bindings.Part = dbtype.dbPart; + bindings.ParamIO = GetBindDirection(direction); + bindings.Precision = precision; + bindings.Scale = scale; + bindings.DbType = wtype; + bindings.MaxLen = bytecount; // also increments databuffer size (uses DbType) + //bindings.ValueOffset = bindings.DataBufferSize; // set via MaxLen + //bindings.LengthOffset = i * sizeof_int64; + //bindings.StatusOffset = i * sizeof_int64 + sizeof_int32; + //bindings.TypeInfoPtr = 0; + //bindings.ObjectPtr = 0; + //bindings.BindExtPtr = 0; + //bindings.MemOwner = /*DBMEMOWNER_CLIENTOWNED*/0; + //bindings.Flags = 0; + + //bindings.ParameterChangeID = changeID; // bind until something changes + Debug.Assert(_changeID == changeID, "parameter has unexpectedly changed"); + + return IsParameterComputed(); + } + + private static object CoerceValue(object value, NativeDBType destinationType) + { + Debug.Assert(null != destinationType, "null destinationType"); + if ((null != value) && (DBNull.Value != value) && (typeof(object) != destinationType.dataType)) + { + Type currentType = value.GetType(); + if (currentType != destinationType.dataType) + { + try + { + if ((typeof(string) == destinationType.dataType) && (typeof(char[]) == currentType)) + { + } + else if ((NativeDBType.CY == destinationType.dbType) && (typeof(string) == currentType)) + { + value = Decimal.Parse((string)value, NumberStyles.Currency, (IFormatProvider)null); + } + else + { + value = Convert.ChangeType(value, destinationType.dataType, (IFormatProvider)null); + } + } + catch (Exception e) + { + // UNDONE - should not be catching all exceptions!!! + if (!ADP.IsCatchableExceptionType(e)) + { + throw; + } + + throw ADP.ParameterConversionFailed(value, destinationType.dataType, e); + } + } + } + return value; + } + + private NativeDBType GetBindType(object value) + { + NativeDBType dbtype = _metaType; + if (null == dbtype) + { + if (ADP.IsNull(value)) + { + dbtype = OleDb.NativeDBType.Default; + } + else + { + dbtype = NativeDBType.FromSystemType(value); + } + } + return dbtype; + } + + internal object GetCoercedValue() + { + object value = CoercedValue; // will also be set during binding, will rebind everytime if _metaType not set + if (null == value) + { + value = CoerceValue(Value, _coerceMetaType); + CoercedValue = value; + } + return value; + } + + internal bool IsParameterComputed() + { + NativeDBType metaType = _metaType; + return ((null == metaType) + || (!ShouldSerializeSize() && metaType.IsVariableLength) + || ((NativeDBType.DECIMAL == metaType.dbType) || (NativeDBType.NUMERIC == metaType.dbType) + && (!ShouldSerializeScale() || !ShouldSerializePrecision()) + ) + ); + } + + // @devnote: use IsParameterComputed which is called in the normal case + // only to call Prepare to throw the specialized error message + // reducing the overall number of methods to actually jit + internal void Prepare(OleDbCommand cmd) + { + Debug.Assert(IsParameterComputed(), "Prepare computed parameter"); + if (null == _metaType) + { + throw ADP.PrepareParameterType(cmd); + } + else if (!ShouldSerializeSize() && _metaType.IsVariableLength) + { + throw ADP.PrepareParameterSize(cmd); + } + else if (!ShouldSerializePrecision() && !ShouldSerializeScale() && ((NativeDBType.DECIMAL == _metaType.wType) || (NativeDBType.NUMERIC == _metaType.wType))) + { + throw ADP.PrepareParameterScale(cmd, _metaType.wType.ToString("G", CultureInfo.InvariantCulture)); + } + } + + [ + RefreshProperties(RefreshProperties.All), + TypeConverter(typeof(StringConverter)), + ] + override public object Value + { // V1.2.3300, XXXParameter V1.0.3300 + get + { + return _value; + } + set + { + _coercedValue = null; + _value = value; + } + } + + private byte ValuePrecision(object value) + { + return ValuePrecisionCore(value); + } + + private byte ValueScale(object value) + { + return ValueScaleCore(value); + } + + private int ValueSize(object value) + { + return ValueSizeCore(value); + } + + static private int GetBindDirection(ParameterDirection direction) + { + return (ODB.ParameterDirectionFlag & (int)direction); + /*switch(Direction) { + default: + case ParameterDirection.Input: + return ODB.DBPARAMIO_INPUT; + case ParameterDirection.Output: + case ParameterDirection.ReturnValue: + return ODB.DBPARAMIO_OUTPUT; + case ParameterDirection.InputOutput: + return (ODB.DBPARAMIO_INPUT | ODB.DBPARAMIO_OUTPUT); + }*/ + } + + static private int GetBindFlags(ParameterDirection direction) + { + return (ODB.ParameterDirectionFlag & (int)direction); + /*switch(Direction) { + default: + case ParameterDirection.Input: + return ODB.DBPARAMFLAGS_ISINPUT; + case ParameterDirection.Output: + case ParameterDirection.ReturnValue: + return ODB.DBPARAMFLAGS_ISOUTPUT; + case ParameterDirection.InputOutput: + return (ODB.DBPARAMFLAGS_ISINPUT | ODB.DBPARAMFLAGS_ISOUTPUT); + }*/ + } + + // implemented as nested class to take advantage of the private/protected ShouldSerializeXXX methods + sealed internal class OleDbParameterConverter : System.ComponentModel.ExpandableObjectConverter + { + // converter classes should have public ctor + public OleDbParameterConverter() + { + } + + public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType) + { + if (typeof(System.ComponentModel.Design.Serialization.InstanceDescriptor) == destinationType) + { + return true; + } + return base.CanConvertTo(context, destinationType); + } + + public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType) + { + if (null == destinationType) + { + throw ADP.ArgumentNull("destinationType"); + } + if ((typeof(System.ComponentModel.Design.Serialization.InstanceDescriptor) == destinationType) && (value is OleDbParameter)) + { + return ConvertToInstanceDescriptor(value as OleDbParameter); + } + return base.ConvertTo(context, culture, value, destinationType); + } + + private System.ComponentModel.Design.Serialization.InstanceDescriptor ConvertToInstanceDescriptor(OleDbParameter p) + { + int flags = 0; + + if (p.ShouldSerializeOleDbType()) + { + flags |= 1; + } + if (p.ShouldSerializeSize()) + { + flags |= 2; + } + if (!ADP.IsEmpty(p.SourceColumn)) + { + flags |= 4; + } + if (null != p.Value) + { + flags |= 8; + } + if ((ParameterDirection.Input != p.Direction) || p.IsNullable + || p.ShouldSerializePrecision() || p.ShouldSerializeScale() + || (DataRowVersion.Current != p.SourceVersion)) + { + flags |= 16; // V1.0 everything + } + if (p.SourceColumnNullMapping) + { + flags |= 32; // v2.0 everything + } + + Type[] ctorParams; + object[] ctorValues; + switch (flags) + { + case 0: // ParameterName + case 1: // OleDbType + ctorParams = new Type[] { typeof(string), typeof(OleDbType) }; + ctorValues = new object[] { p.ParameterName, p.OleDbType }; + break; + case 2: // Size + case 3: // Size, OleDbType + ctorParams = new Type[] { typeof(string), typeof(OleDbType), typeof(int) }; + ctorValues = new object[] { p.ParameterName, p.OleDbType, p.Size }; + break; + case 4: // SourceColumn + case 5: // SourceColumn, OleDbType + case 6: // SourceColumn, Size + case 7: // SourceColumn, Size, OleDbType + ctorParams = new Type[] { typeof(string), typeof(OleDbType), typeof(int), typeof(string) }; + ctorValues = new object[] { p.ParameterName, p.OleDbType, p.Size, p.SourceColumn }; + break; + case 8: // Value + ctorParams = new Type[] { typeof(string), typeof(object) }; + ctorValues = new object[] { p.ParameterName, p.Value }; + break; + default: // everything else + if (0 == (32 & flags)) + { // V1.0 everything + ctorParams = new Type[] { + typeof(string), typeof(OleDbType), typeof(int), typeof(ParameterDirection), + typeof(bool), typeof(byte), typeof(byte), typeof(string), + typeof(DataRowVersion), typeof(object) }; + ctorValues = new object[] { + p.ParameterName, p.OleDbType, p.Size, p.Direction, + p.IsNullable, p.PrecisionInternal, p.ScaleInternal, p.SourceColumn, + p.SourceVersion, p.Value }; + } + else + { // v2.0 everything - round trip all browsable properties + precision/scale + ctorParams = new Type[] { + typeof(string), typeof(OleDbType), typeof(int), typeof(ParameterDirection), + typeof(byte), typeof(byte), + typeof(string), typeof(DataRowVersion), typeof(bool), + typeof(object) }; + ctorValues = new object[] { + p.ParameterName, p.OleDbType, p.Size, p.Direction, + p.PrecisionInternal, p.ScaleInternal, + p.SourceColumn, p.SourceVersion, p.SourceColumnNullMapping, + p.Value }; + } + break; + } + System.Reflection.ConstructorInfo ctor = typeof(OleDbParameter).GetConstructor(ctorParams); + return new System.ComponentModel.Design.Serialization.InstanceDescriptor(ctor, ctorValues); + } + } + } +} diff --git a/src/System.Data.OleDb/src/OleDbParameterCollection.cs b/src/System.Data.OleDb/src/OleDbParameterCollection.cs new file mode 100644 index 000000000000..86d74678cc62 --- /dev/null +++ b/src/System.Data.OleDb/src/OleDbParameterCollection.cs @@ -0,0 +1,135 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.ComponentModel; +using System.Data.Common; + +namespace System.Data.OleDb +{ + public sealed partial class OleDbParameterCollection : DbParameterCollection + { + private int _changeID; + + private static Type s_itemType = typeof(OleDbParameter); + + internal OleDbParameterCollection() : base() + { + } + + internal int ChangeID + { + get + { + return _changeID; + } + } + + [ + Browsable(false), + DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden) + ] + public new OleDbParameter this[int index] + { + get + { + return (OleDbParameter)GetParameter(index); + } + set + { + SetParameter(index, value); + } + } + + [ + Browsable(false), + DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden) + ] + public new OleDbParameter this[string parameterName] + { + get + { + return (OleDbParameter)GetParameter(parameterName); + } + set + { + SetParameter(parameterName, value); + } + } + + public OleDbParameter Add(OleDbParameter value) + { + Add((object)value); + return value; + } + + [EditorBrowsable(EditorBrowsableState.Never)] + [Obsolete("Add(String parameterName, Object value) has been deprecated. Use AddWithValue(String parameterName, Object value). https://go.microsoft.com/fwlink/?linkid=14202", false)] + public OleDbParameter Add(string parameterName, object value) + { + return Add(new OleDbParameter(parameterName, value)); + } + + public OleDbParameter AddWithValue(string parameterName, object value) + { + return Add(new OleDbParameter(parameterName, value)); + } + + public OleDbParameter Add(string parameterName, OleDbType oleDbType) + { + return Add(new OleDbParameter(parameterName, oleDbType)); + } + + public OleDbParameter Add(string parameterName, OleDbType oleDbType, int size) + { + return Add(new OleDbParameter(parameterName, oleDbType, size)); + } + + public OleDbParameter Add(string parameterName, OleDbType oleDbType, int size, string sourceColumn) + { + return Add(new OleDbParameter(parameterName, oleDbType, size, sourceColumn)); + } + + public void AddRange(OleDbParameter[] values) + { // V1.2.3300 + AddRange((Array)values); + } + + public override bool Contains(string value) + { + return (-1 != IndexOf(value)); + } + + public bool Contains(OleDbParameter value) + { + return (-1 != IndexOf(value)); + } + + public void CopyTo(OleDbParameter[] array, int index) + { + CopyTo((Array)array, index); + } + + public int IndexOf(OleDbParameter value) + { + return IndexOf((object)value); + } + + public void Insert(int index, OleDbParameter value) + { + Insert(index, (object)value); + } + + private void OnChange() + { + unchecked + { _changeID++; } + } + + public void Remove(OleDbParameter value) + { + Remove((object)value); + } + + } +} diff --git a/src/System.Data.OleDb/src/OleDbParameterCollectionHelper.cs b/src/System.Data.OleDb/src/OleDbParameterCollectionHelper.cs new file mode 100644 index 000000000000..f5145ddc9dfd --- /dev/null +++ b/src/System.Data.OleDb/src/OleDbParameterCollectionHelper.cs @@ -0,0 +1,320 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +// In the desktop version of the framework, this file is generated from ProviderBase\DbParameterCollectionHelper.cs +//#line 1 "e:\\fxdata\\src\\ndp\\fx\\src\\data\\system\\data\\providerbase\\dbparametercollectionhelper.cs" + +using System.Collections.Generic; +using System.Data.Common; +using System.Diagnostics; +using System.Globalization; +using System.Reflection; + +namespace System.Data.OleDb +{ + public sealed partial class OleDbParameterCollection : DbParameterCollection + { + private List _items; + + override public int Count + { + get + { + return ((null != _items) ? _items.Count : 0); + } + } + + private List InnerList + { + get + { + List items = _items; + + if (null == items) + { + items = new List(); + _items = items; + } + return items; + } + } + + override public object SyncRoot + { + get + { + return ((System.Collections.ICollection)InnerList).SyncRoot; + } + } + + override public int Add(object value) + { + OnChange(); + ValidateType(value); + Validate(-1, value); + InnerList.Add((OleDbParameter)value); + return Count - 1; + } + + override public void AddRange(System.Array values) + { + OnChange(); + if (null == values) + { + throw ADP.ArgumentNull(nameof(values)); + } + foreach (object value in values) + { + ValidateType(value); + } + foreach (OleDbParameter value in values) + { + Validate(-1, value); + InnerList.Add((OleDbParameter)value); + } + } + + private int CheckName(string parameterName) + { + int index = IndexOf(parameterName); + if (index < 0) + { + throw ADP.ParametersSourceIndex(parameterName, this, s_itemType); + } + return index; + } + + override public void Clear() + { + OnChange(); + List items = InnerList; + + if (null != items) + { + foreach (OleDbParameter item in items) + { + item.ResetParent(); + } + items.Clear(); + } + } + + override public bool Contains(object value) + { + return (-1 != IndexOf(value)); + } + + override public void CopyTo(Array array, int index) + { + ((System.Collections.ICollection)InnerList).CopyTo(array, index); + } + + override public System.Collections.IEnumerator GetEnumerator() + { + return ((System.Collections.ICollection)InnerList).GetEnumerator(); + } + + override protected DbParameter GetParameter(int index) + { + RangeCheck(index); + return InnerList[index]; + } + + override protected DbParameter GetParameter(string parameterName) + { + int index = IndexOf(parameterName); + if (index < 0) + { + throw ADP.ParametersSourceIndex(parameterName, this, s_itemType); + } + return InnerList[index]; + } + + private static int IndexOf(System.Collections.IEnumerable items, string parameterName) + { + if (null != items) + { + int i = 0; + + foreach (OleDbParameter parameter in items) + { + if (parameterName == parameter.ParameterName) + { + return i; + } + ++i; + } + i = 0; + + foreach (OleDbParameter parameter in items) + { + if (0 == ADP.DstCompare(parameterName, parameter.ParameterName)) + { + return i; + } + ++i; + } + } + return -1; + } + + override public int IndexOf(string parameterName) + { + return IndexOf(InnerList, parameterName); + } + + override public int IndexOf(object value) + { + if (null != value) + { + ValidateType(value); + + List items = InnerList; + + if (null != items) + { + int count = items.Count; + + for (int i = 0; i < count; i++) + { + if (value == items[i]) + { + return i; + } + } + } + } + return -1; + } + + override public void Insert(int index, object value) + { + OnChange(); + ValidateType(value); + Validate(-1, (OleDbParameter)value); + InnerList.Insert(index, (OleDbParameter)value); + } + + private void RangeCheck(int index) + { + if ((index < 0) || (Count <= index)) + { + throw ADP.ParametersMappingIndex(index, this); + } + } + + override public void Remove(object value) + { + OnChange(); + ValidateType(value); + int index = IndexOf(value); + if (-1 != index) + { + RemoveIndex(index); + } + else if (this != ((OleDbParameter)value).CompareExchangeParent(null, this)) + { + throw ADP.CollectionRemoveInvalidObject(s_itemType, this); + } + } + + override public void RemoveAt(int index) + { + OnChange(); + RangeCheck(index); + RemoveIndex(index); + } + + override public void RemoveAt(string parameterName) + { + OnChange(); + int index = CheckName(parameterName); + RemoveIndex(index); + } + + private void RemoveIndex(int index) + { + List items = InnerList; + Debug.Assert((null != items) && (0 <= index) && (index < Count), "RemoveIndex, invalid"); + OleDbParameter item = items[index]; + items.RemoveAt(index); + item.ResetParent(); + } + + private void Replace(int index, object newValue) + { + List items = InnerList; + Debug.Assert((null != items) && (0 <= index) && (index < Count), "Replace Index invalid"); + ValidateType(newValue); + Validate(index, newValue); + OleDbParameter item = items[index]; + items[index] = (OleDbParameter)newValue; + item.ResetParent(); + } + + override protected void SetParameter(int index, DbParameter value) + { + OnChange(); + RangeCheck(index); + Replace(index, value); + } + + override protected void SetParameter(string parameterName, DbParameter value) + { + OnChange(); + int index = IndexOf(parameterName); + if (index < 0) + { + throw ADP.ParametersSourceIndex(parameterName, this, s_itemType); + } + Replace(index, value); + } + + private void Validate(int index, object value) + { + if (null == value) + { + throw ADP.ParameterNull(nameof(value), this, s_itemType); + } + + object parent = ((OleDbParameter)value).CompareExchangeParent(this, null); + if (null != parent) + { + if (this != parent) + { + throw ADP.ParametersIsNotParent(s_itemType, this); + } + if (index != IndexOf(value)) + { + throw ADP.ParametersIsParent(s_itemType, this); + } + } + + string name = ((OleDbParameter)value).ParameterName; + if (0 == name.Length) + { + index = 1; + do + { + name = ADP.Parameter + index.ToString(CultureInfo.CurrentCulture); + index++; + } while (-1 != IndexOf(name)); + ((OleDbParameter)value).ParameterName = name; + } + } + + private void ValidateType(object value) + { + if (null == value) + { + throw ADP.ParameterNull(nameof(value), this, s_itemType); + } + else if (!s_itemType.IsInstanceOfType(value)) + { + throw ADP.InvalidParameterType(this, s_itemType, value); + } + } + }; +} + diff --git a/src/System.Data.OleDb/src/OleDbPropertySetGuid.cs b/src/System.Data.OleDb/src/OleDbPropertySetGuid.cs new file mode 100644 index 000000000000..0a5f38b20ead --- /dev/null +++ b/src/System.Data.OleDb/src/OleDbPropertySetGuid.cs @@ -0,0 +1,81 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +namespace System.Data.OleDb +{ + sealed internal class OleDbPropertySetGuid + { + private OleDbPropertySetGuid() + { + } + + static internal readonly Guid Column = new Guid(0xc8b522b9, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d); + static internal readonly Guid DataSource = new Guid(0xc8b522ba, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d); + static internal readonly Guid DataSourceInfo = new Guid(0xc8b522bb, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d); + static internal readonly Guid DBInit = new Guid(0xc8b522bc, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d); + static internal readonly Guid Index = new Guid(0xc8b522bd, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d); + static internal readonly Guid PropertiesInError = new Guid(0xc8b522d4, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d); + static internal readonly Guid Rowset = new Guid(0xc8b522be, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d); + static internal readonly Guid Session = new Guid(0xc8b522c6, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d); + static internal readonly Guid Stream = new Guid(0xc8b522fd, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d); + static internal readonly Guid Table = new Guid(0xc8b522bf, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d); + static internal readonly Guid Trustee = new Guid(0xc8b522e1, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d); + static internal readonly Guid View = new Guid(0xc8b522df, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d); + + static internal readonly Guid DataSourceAll = new Guid(0xc8b522c0, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d); + static internal readonly Guid DataSourceInfoAll = new Guid(0xc8b522c1, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d); + static internal readonly Guid DBInitAll = new Guid(0xc8b522ca, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d); + static internal readonly Guid ColumnAll = new Guid(0xc8b522f0, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d); + static internal readonly Guid ConstraintAll = new Guid(0xc8b522fa, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d); + static internal readonly Guid IndexAll = new Guid(0xc8b522f1, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d); + static internal readonly Guid RowsetAll = new Guid(0xc8b522c2, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d); + static internal readonly Guid SessionAll = new Guid(0xc8b522c7, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d); + static internal readonly Guid StreamAll = new Guid(0xc8b522fe, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d); + static internal readonly Guid TableAll = new Guid(0xc8b522f2, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d); + static internal readonly Guid TrusteeAll = new Guid(0xc8b522f3, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d); + static internal readonly Guid ViewAll = new Guid(0xc8b522fc, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d); + + /* + static internal string GetTextFromValue(Guid guid) { + string value = ConvertToString(guid); + if (null == value) { + value = "{" + guid.ToString("D", CultureInfo.InvariantCulture) + "}"; + } + return value; + } + + static internal string ConvertToString(Guid guid) { + if (guid == OleDbPropertySetGuid.DBInit) { return "DBInit"; } + if (guid == OleDbPropertySetGuid.Rowset) { return "Rowset"; } + if (guid == OleDbPropertySetGuid.DataSource) { return "DataSource"; } + if (guid == OleDbPropertySetGuid.DataSourceInfo) { return "DataSourceInfo"; } + if (guid == OleDbPropertySetGuid.PropertiesInError) { return "PropertiesInError"; } + + if (guid == OleDbPropertySetGuid.View) { return "View"; } + if (guid == OleDbPropertySetGuid.Trustee) { return "Trustee"; } + if (guid == OleDbPropertySetGuid.Column) { return "Column"; } + if (guid == OleDbPropertySetGuid.Index) { return "Index"; } + if (guid == OleDbPropertySetGuid.Table) { return "Table"; } + if (guid == OleDbPropertySetGuid.Session) { return "Session"; } + if (guid == OleDbPropertySetGuid.Stream) { return "Stream"; } + + if (guid == OleDbPropertySetGuid.ColumnAll) { return "ColumnAll"; } + if (guid == OleDbPropertySetGuid.IndexAll) { return "IndexAll"; } + if (guid == OleDbPropertySetGuid.TableAll) { return "TableAll"; } + if (guid == OleDbPropertySetGuid.TrusteeAll) { return "TrusteeAll"; } + if (guid == OleDbPropertySetGuid.ConstraintAll) { return "ConstraintAll"; } + if (guid == OleDbPropertySetGuid.DataSourceAll) { return "DataSourceAll"; } + if (guid == OleDbPropertySetGuid.DataSourceInfoAll) { return "DataSourceInfoAll"; } + if (guid == OleDbPropertySetGuid.RowsetAll) { return "RowsetAll"; } + if (guid == OleDbPropertySetGuid.SessionAll) { return "SessionAll"; } + if (guid == OleDbPropertySetGuid.DBInitAll) { return "DBInitAll"; } + if (guid == OleDbPropertySetGuid.ViewAll) { return "ViewAll"; } + if (guid == OleDbPropertySetGuid.StreamAll) { return "StreamAll"; } + + return null; + } + */ + } +} + diff --git a/src/System.Data.OleDb/src/OleDbPropertyStatus.cs b/src/System.Data.OleDb/src/OleDbPropertyStatus.cs new file mode 100644 index 000000000000..a3fb41d888d1 --- /dev/null +++ b/src/System.Data.OleDb/src/OleDbPropertyStatus.cs @@ -0,0 +1,20 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +namespace System.Data.OleDb +{ + internal enum OleDbPropertyStatus + { + Ok = 0, + NotSupported = 1, + BadValue = 2, + BadOption = 3, + BadColumn = 4, + NotAllSettable = 5, + NotSettable = 6, + NotSet = 7, + Conflicting = 8, + NotAvailable = 9, + } +} diff --git a/src/System.Data.OleDb/src/OleDbReferenceCollection.cs b/src/System.Data.OleDb/src/OleDbReferenceCollection.cs new file mode 100644 index 000000000000..379925f71136 --- /dev/null +++ b/src/System.Data.OleDb/src/OleDbReferenceCollection.cs @@ -0,0 +1,46 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Data.ProviderBase; +using System.Diagnostics; + +namespace System.Data.OleDb +{ + sealed internal class OleDbReferenceCollection : DbReferenceCollection + { + internal const int Closing = 0; + internal const int Canceling = -1; + + internal const int CommandTag = 1; + internal const int DataReaderTag = 2; + + override public void Add(object value, int tag) + { + base.AddItem(value, tag); + } + + override protected void NotifyItem(int message, int tag, object value) + { + bool canceling = (Canceling == message); + if (CommandTag == tag) + { + ((OleDbCommand)value).CloseCommandFromConnection(canceling); + } + else if (DataReaderTag == tag) + { + ((OleDbDataReader)value).CloseReaderFromConnection(canceling); + } + else + { + Debug.Assert(false, "shouldn't be here"); + } + } + + override public void Remove(object value) + { + base.RemoveItem(value); + } + + } +} diff --git a/src/System.Data.OleDb/src/OleDbRowUpdatedEvent.cs b/src/System.Data.OleDb/src/OleDbRowUpdatedEvent.cs new file mode 100644 index 000000000000..b76081e6028b --- /dev/null +++ b/src/System.Data.OleDb/src/OleDbRowUpdatedEvent.cs @@ -0,0 +1,24 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Data.Common; + +namespace System.Data.OleDb +{ + public sealed class OleDbRowUpdatedEventArgs : RowUpdatedEventArgs + { + public OleDbRowUpdatedEventArgs(DataRow dataRow, IDbCommand command, StatementType statementType, DataTableMapping tableMapping) + : base(dataRow, command, statementType, tableMapping) + { + } + + new public OleDbCommand Command + { + get + { + return (OleDbCommand)base.Command; + } + } + } +} diff --git a/src/System.Data.OleDb/src/OleDbRowUpdatedEventHandler.cs b/src/System.Data.OleDb/src/OleDbRowUpdatedEventHandler.cs new file mode 100644 index 000000000000..18e2b11c78c9 --- /dev/null +++ b/src/System.Data.OleDb/src/OleDbRowUpdatedEventHandler.cs @@ -0,0 +1,8 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +namespace System.Data.OleDb +{ + public delegate void OleDbRowUpdatedEventHandler(object sender, OleDbRowUpdatedEventArgs e); +} diff --git a/src/System.Data.OleDb/src/OleDbRowUpdatingEvent.cs b/src/System.Data.OleDb/src/OleDbRowUpdatingEvent.cs new file mode 100644 index 000000000000..7782dea21a43 --- /dev/null +++ b/src/System.Data.OleDb/src/OleDbRowUpdatingEvent.cs @@ -0,0 +1,28 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Data.Common; + +namespace System.Data.OleDb +{ + public sealed class OleDbRowUpdatingEventArgs : RowUpdatingEventArgs + { + public OleDbRowUpdatingEventArgs(DataRow dataRow, IDbCommand command, StatementType statementType, DataTableMapping tableMapping) + : base(dataRow, command, statementType, tableMapping) + { + } + + new public OleDbCommand Command + { + get { return (base.Command as OleDbCommand); } + set { base.Command = value; } + } + + override protected IDbCommand BaseCommand + { + get { return base.BaseCommand; } + set { base.BaseCommand = (value as OleDbCommand); } + } + } +} diff --git a/src/System.Data.OleDb/src/OleDbRowUpdatingEventHandler.cs b/src/System.Data.OleDb/src/OleDbRowUpdatingEventHandler.cs new file mode 100644 index 000000000000..1726620ddbda --- /dev/null +++ b/src/System.Data.OleDb/src/OleDbRowUpdatingEventHandler.cs @@ -0,0 +1,8 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +namespace System.Data.OleDb +{ + public delegate void OleDbRowUpdatingEventHandler(object sender, OleDbRowUpdatingEventArgs e); +} diff --git a/src/System.Data.OleDb/src/OleDbSchemaGuid.cs b/src/System.Data.OleDb/src/OleDbSchemaGuid.cs new file mode 100644 index 000000000000..e88a4d92f8e7 --- /dev/null +++ b/src/System.Data.OleDb/src/OleDbSchemaGuid.cs @@ -0,0 +1,176 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Globalization; + +namespace System.Data.OleDb +{ + public sealed class OleDbSchemaGuid + { + // V1 shipped with default ctor which is public + // so we can NOT remove the now explict public ctor + public OleDbSchemaGuid() { } + + // MDAC 2.0 + + static public readonly Guid Tables_Info = new Guid(0xc8b522e0, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d); + + // MDAC 2.1 + + static public readonly Guid Trustee = new Guid(0xc8b522ef, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d); + + static public readonly Guid Assertions = new Guid(0xc8b52210, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d); + + static public readonly Guid Catalogs = new Guid(0xc8b52211, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d); + + static public readonly Guid Character_Sets = new Guid(0xc8b52212, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d); + + static public readonly Guid Collations = new Guid(0xc8b52213, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d); + + static public readonly Guid Columns = new Guid(0xc8b52214, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d); + + static public readonly Guid Check_Constraints = new Guid(0xc8b52215, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d); + + static public readonly Guid Constraint_Column_Usage = new Guid(0xc8b52216, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d); + + static public readonly Guid Constraint_Table_Usage = new Guid(0xc8b52217, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d); + + static public readonly Guid Key_Column_Usage = new Guid(0xc8b52218, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d); + + static public readonly Guid Referential_Constraints = new Guid(0xc8b52219, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d); + + static public readonly Guid Table_Constraints = new Guid(0xc8b5221a, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d); + + static public readonly Guid Column_Domain_Usage = new Guid(0xc8b5221b, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d); + + static public readonly Guid Indexes = new Guid(0xc8b5221e, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d); + + static public readonly Guid Column_Privileges = new Guid(0xc8b52221, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d); + + static public readonly Guid Table_Privileges = new Guid(0xc8b52222, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d); + + static public readonly Guid Usage_Privileges = new Guid(0xc8b52223, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d); + + static public readonly Guid Procedures = new Guid(0xc8b52224, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d); + + static public readonly Guid Schemata = new Guid(0xc8b52225, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d); + + static public readonly Guid Sql_Languages = new Guid(0xc8b52226, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d); + + static public readonly Guid Statistics = new Guid(0xc8b52227, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d); + + static public readonly Guid Tables = new Guid(0xc8b52229, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d); + + static public readonly Guid Translations = new Guid(0xc8b5222a, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d); + + static public readonly Guid Provider_Types = new Guid(0xc8b5222c, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d); + + static public readonly Guid Views = new Guid(0xc8b5222d, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d); + + static public readonly Guid View_Column_Usage = new Guid(0xc8b5222e, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d); + + static public readonly Guid View_Table_Usage = new Guid(0xc8b5222f, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d); + + static public readonly Guid Procedure_Parameters = new Guid(0xc8b522b8, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d); + + static public readonly Guid Foreign_Keys = new Guid(0xc8b522c4, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d); + + static public readonly Guid Primary_Keys = new Guid(0xc8b522c5, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d); + + static public readonly Guid Procedure_Columns = new Guid(0xc8b522c9, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d); + + // MDAC 2.6 + + static public readonly Guid Table_Statistics = new Guid(0xc8b522ff, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d); + + static public readonly Guid Check_Constraints_By_Table = new Guid(0xc8b52301, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d); + + static public readonly Guid SchemaGuids = new Guid(0xf3264c9b, 0x1860, 0x4dfe, 0xb7, 0x1b, 0x29, 0x61, 0xb2, 0xea, 0x91, 0xbd); + + static public readonly Guid DbInfoKeywords = new Guid(0xf3264c9c, 0x1860, 0x4dfe, 0xb7, 0x1b, 0x29, 0x61, 0xb2, 0xea, 0x91, 0xbd); + + static public readonly Guid DbInfoLiterals = new Guid(0xf3264c9d, 0x1860, 0x4dfe, 0xb7, 0x1b, 0x29, 0x61, 0xb2, 0xea, 0x91, 0xbd); + + static internal string GetTextFromValue(Guid guid) + { + // it is correct that SchemaGuids, DbInfoKeywords, DbInfoLiterals don't appear below + // those are manufactured guids for calling methods other than IDBSchemaRowset.GetRowset + // when the user calls OleDbConnection.GetOleDbSchemaTable + + if (guid == Primary_Keys) + { return "Primary_Keys"; } + if (guid == Indexes) + { return "Indexes"; } + if (guid == Procedure_Parameters) + { return "Procedure_Parameters"; } + if (guid == Procedures) + { return "Procedures"; } + + if (guid == Tables_Info) + { return "Tables_Info"; } + + if (guid == Trustee) + { return "Trustee"; } + if (guid == Assertions) + { return "Assertions"; } + if (guid == Catalogs) + { return "Catalogs"; } + if (guid == Character_Sets) + { return "Character_Sets"; } + if (guid == Collations) + { return "Collations"; } + if (guid == Columns) + { return "Columns"; } + if (guid == Check_Constraints) + { return "Check_Constraints"; } + if (guid == Constraint_Column_Usage) + { return "Constraint_Column_Usage"; } + if (guid == Constraint_Table_Usage) + { return "Constraint_Table_Usage"; } + if (guid == Key_Column_Usage) + { return "Key_Column_Usage"; } + if (guid == Referential_Constraints) + { return "Referential_Constraints"; } + if (guid == Table_Constraints) + { return "Table_Constraints"; } + if (guid == Column_Domain_Usage) + { return "Column_Domain_Usage"; } + if (guid == Column_Privileges) + { return "Column_Privileges"; } + if (guid == Table_Privileges) + { return "Table_Privileges"; } + if (guid == Usage_Privileges) + { return "Usage_Privileges"; } + if (guid == Schemata) + { return "Schemata"; } + if (guid == Sql_Languages) + { return "Sql_Languages"; } + if (guid == Statistics) + { return "Statistics"; } + if (guid == Tables) + { return "Tables"; } + if (guid == Translations) + { return "Translations"; } + if (guid == Provider_Types) + { return "Provider_Types"; } + if (guid == Views) + { return "Views"; } + if (guid == View_Column_Usage) + { return "View_Column_Usage"; } + if (guid == View_Table_Usage) + { return "View_Table_Usage"; } + if (guid == Foreign_Keys) + { return "Foreign_Keys"; } + if (guid == Procedure_Columns) + { return "Procedure_Columns"; } + + if (guid == Table_Statistics) + { return "Table_Statistics"; } + if (guid == Check_Constraints_By_Table) + { return "Check_Constraints_By_Table"; } + + return "{" + guid.ToString("D", CultureInfo.InvariantCulture) + ")"; + } + } +} diff --git a/src/System.Data.OleDb/src/OleDbStruct.cs b/src/System.Data.OleDb/src/OleDbStruct.cs new file mode 100644 index 000000000000..6ef843c03c76 --- /dev/null +++ b/src/System.Data.OleDb/src/OleDbStruct.cs @@ -0,0 +1,467 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Runtime.InteropServices; + +namespace System.Data.OleDb +{ +#if DEBUG + using Globalization; + using Text; +#endif + + internal enum DBBindStatus + { + OK = 0, + BADORDINAL = 1, + UNSUPPORTEDCONVERSION = 2, + BADBINDINFO = 3, + BADSTORAGEFLAGS = 4, + NOINTERFACE = 5, + MULTIPLESTORAGE = 6 + } + +#if false + typedef struct tagDBPARAMBINDINFO { + LPOLESTR pwszDataSourceType; + LPOLESTR pwszName; + DBLENGTH ulParamSize; + DBPARAMFLAGS dwFlags; + BYTE bPrecision; + BYTE bScale; + } +#endif + +#if (WIN32 && !ARCH_arm) + [StructLayoutAttribute(LayoutKind.Sequential, Pack = 2)] +#else + [StructLayout(LayoutKind.Sequential, Pack = 8)] +#endif + internal struct tagDBPARAMBINDINFO + { + internal IntPtr pwszDataSourceType; + internal IntPtr pwszName; + internal IntPtr ulParamSize; + internal Int32 dwFlags; + internal Byte bPrecision; + internal Byte bScale; + +#if DEBUG + public override string ToString() + { + StringBuilder builder = new StringBuilder(); + builder.Append("tagDBPARAMBINDINFO").Append(Environment.NewLine); + if (IntPtr.Zero != pwszDataSourceType) + { + builder.Append("pwszDataSourceType =").Append(Marshal.PtrToStringUni(pwszDataSourceType)).Append(Environment.NewLine); + } + builder.Append("\tulParamSize =" + ulParamSize.ToInt64().ToString(CultureInfo.InvariantCulture)).Append(Environment.NewLine); + builder.Append("\tdwFlags =0x" + dwFlags.ToString("X4", CultureInfo.InvariantCulture)).Append(Environment.NewLine); + builder.Append("\tPrecision =" + bPrecision.ToString(CultureInfo.InvariantCulture)).Append(Environment.NewLine); + builder.Append("\tScale =" + bScale.ToString(CultureInfo.InvariantCulture)).Append(Environment.NewLine); + return builder.ToString(); + } +#endif + } + +#if false + typedef struct tagDBBINDING { + DBORDINAL iOrdinal; + DBBYTEOFFSET obValue; + DBBYTEOFFSET obLength; + DBBYTEOFFSET obStatus; + ITypeInfo *pTypeInfo; + DBOBJECT *pObject; + DBBINDEXT *pBindExt; + DBPART dwPart; + DBMEMOWNER dwMemOwner; + DBPARAMIO eParamIO; + DBLENGTH cbMaxLen; + DWORD dwFlags; + DBTYPE wType; + BYTE bPrecision; + BYTE bScale; + } +#endif + +#if (WIN32 && !ARCH_arm) + [StructLayoutAttribute(LayoutKind.Sequential, Pack = 2)] +#else + [StructLayout(LayoutKind.Sequential, Pack = 8)] +#endif + internal sealed class tagDBBINDING + { + internal IntPtr iOrdinal; + internal IntPtr obValue; + internal IntPtr obLength; + internal IntPtr obStatus; + + internal IntPtr pTypeInfo; + internal IntPtr pObject; + internal IntPtr pBindExt; + + internal Int32 dwPart; + internal Int32 dwMemOwner; + internal Int32 eParamIO; + + internal IntPtr cbMaxLen; + + internal Int32 dwFlags; + internal Int16 wType; + internal byte bPrecision; + internal byte bScale; + + internal tagDBBINDING() + { + } + +#if DEBUG + public override string ToString() + { + StringBuilder builder = new StringBuilder(); + builder.Append("tagDBBINDING").Append(Environment.NewLine); + builder.Append("\tOrdinal =" + iOrdinal.ToInt64().ToString(CultureInfo.InvariantCulture)).Append(Environment.NewLine); + builder.Append("\tValueOffset =" + obValue.ToInt64().ToString(CultureInfo.InvariantCulture)).Append(Environment.NewLine); + builder.Append("\tLengthOffset=" + obLength.ToInt64().ToString(CultureInfo.InvariantCulture)).Append(Environment.NewLine); + builder.Append("\tStatusOffset=" + obStatus.ToInt64().ToString(CultureInfo.InvariantCulture)).Append(Environment.NewLine); + builder.Append("\tMaxLength =" + cbMaxLen.ToInt64().ToString(CultureInfo.InvariantCulture)).Append(Environment.NewLine); + builder.Append("\tDB_Type =" + ODB.WLookup(wType)).Append(Environment.NewLine); + builder.Append("\tPrecision =" + bPrecision.ToString(CultureInfo.InvariantCulture)).Append(Environment.NewLine); + builder.Append("\tScale =" + bScale.ToString(CultureInfo.InvariantCulture)).Append(Environment.NewLine); + return builder.ToString(); + } +#endif + } + +#if false + typedef struct tagDBCOLUMNACCESS { + void *pData; + DBID columnid; + DBLENGTH cbDataLen; + DBSTATUS dwStatus; + DBLENGTH cbMaxLen; + DB_DWRESERVE dwReserved; + DBTYPE wType; + BYTE bPrecision; + BYTE bScale; + } +#endif + +#if (WIN32 && !ARCH_arm) + [StructLayoutAttribute(LayoutKind.Sequential, Pack = 2)] +#else + [StructLayout(LayoutKind.Sequential, Pack = 8)] +#endif + internal struct tagDBCOLUMNACCESS + { + internal IntPtr pData; + internal tagDBIDX columnid; + internal IntPtr cbDataLen; + internal Int32 dwStatus; + internal IntPtr cbMaxLen; + internal IntPtr dwReserved; + internal Int16 wType; + internal Byte bPrecision; + internal Byte bScale; + } + +#if false + typedef struct tagDBID { + /* [switch_is][switch_type] */ union { + /* [case()] */ GUID guid; + /* [case()] */ GUID *pguid; + /* [default] */ /* Empty union arm */ + } uGuid; + DBKIND eKind; + /* [switch_is][switch_type] */ union { + /* [case()] */ LPOLESTR pwszName; + /* [case()] */ ULONG ulPropid; + /* [default] */ /* Empty union arm */ + } uName; + } +#endif + +#if (WIN32 && !ARCH_arm) + [StructLayoutAttribute(LayoutKind.Sequential, Pack = 2)] +#else + [StructLayout(LayoutKind.Sequential, Pack = 8)] +#endif + internal struct tagDBIDX + { + internal Guid uGuid; + internal Int32 eKind; + internal IntPtr ulPropid; + } + +#if (WIN32 && !ARCH_arm) + [StructLayoutAttribute(LayoutKind.Sequential, Pack = 2)] +#else + [StructLayout(LayoutKind.Sequential, Pack = 8)] +#endif + internal sealed class tagDBID + { + internal Guid uGuid; + internal Int32 eKind; + internal IntPtr ulPropid; + } + +#if false + typedef struct tagDBLITERALINFO { + LPOLESTR pwszLiteralValue; + LPOLESTR pwszInvalidChars; + LPOLESTR pwszInvalidStartingChars; + DBLITERAL lt; + BOOL fSupported; + ULONG cchMaxLen; + } +#endif +#if (WIN32 && !ARCH_arm) + [StructLayoutAttribute(LayoutKind.Sequential, Pack = 2)] +#else + [StructLayout(LayoutKind.Sequential, Pack = 8)] +#endif + sealed internal class tagDBLITERALINFO + { + [MarshalAs(UnmanagedType.LPWStr)] + internal String pwszLiteralValue = null; + + [MarshalAs(UnmanagedType.LPWStr)] + internal String pwszInvalidChars = null; + + [MarshalAs(UnmanagedType.LPWStr)] + internal String pwszInvalidStartingChars = null; + + internal Int32 it; + + internal Int32 fSupported; + + internal Int32 cchMaxLen; + + internal tagDBLITERALINFO() + { + } + } + +#if false + typedef struct tagDBPROPSET { + /* [size_is] */ DBPROP *rgProperties; + ULONG cProperties; + GUID guidPropertySet; + } +#endif +#if (WIN32 && !ARCH_arm) + [StructLayoutAttribute(LayoutKind.Sequential, Pack = 2)] +#else + [StructLayout(LayoutKind.Sequential, Pack = 8)] +#endif + sealed internal class tagDBPROPSET + { + internal IntPtr rgProperties; + internal Int32 cProperties; + internal Guid guidPropertySet; + + internal tagDBPROPSET() + { + } + + internal tagDBPROPSET(int propertyCount, Guid propertySet) + { + cProperties = propertyCount; + guidPropertySet = propertySet; + } + } + +#if false + typedef struct tagDBPROP { + DBPROPID dwPropertyID; + DBPROPOPTIONS dwOptions; + DBPROPSTATUS dwStatus; + DBID colid; + VARIANT vValue; + } +#endif +#if (WIN32 && !ARCH_arm) + [StructLayoutAttribute(LayoutKind.Sequential, Pack = 2)] +#else + [StructLayout(LayoutKind.Sequential, Pack = 8)] +#endif + sealed internal class tagDBPROP + { + internal Int32 dwPropertyID; + internal Int32 dwOptions; + internal OleDbPropertyStatus dwStatus; + + internal tagDBIDX columnid; + + // Variant + [MarshalAs(UnmanagedType.Struct)] internal object vValue; + + internal tagDBPROP() + { + } + + internal tagDBPROP(int propertyID, bool required, object value) + { + dwPropertyID = propertyID; + dwOptions = ((required) ? ODB.DBPROPOPTIONS_REQUIRED : ODB.DBPROPOPTIONS_OPTIONAL); + vValue = value; + } + } + +#if false + typedef struct tagDBPARAMS { + void *pData; + DB_UPARAMS cParamSets; + HACCESSOR hAccessor; + } +#endif +#if (WIN32 && !ARCH_arm) + [StructLayoutAttribute(LayoutKind.Sequential, Pack = 2)] +#else + [StructLayout(LayoutKind.Sequential, Pack = 8)] +#endif + sealed internal class tagDBPARAMS + { + internal IntPtr pData; + internal Int32 cParamSets; + internal IntPtr hAccessor; + + internal tagDBPARAMS() + { + } + } + +#if false + typedef struct tagDBCOLUMNINFO { + LPOLESTR pwszName; + ITypeInfo *pTypeInfo; + DBORDINAL iOrdinal; + DBCOLUMNFLAGS dwFlags; + DBLENGTH ulColumnSize; + DBTYPE wType; + BYTE bPrecision; + BYTE bScale; + DBID columnid; + } +#endif +#if (WIN32 && !ARCH_arm) + [StructLayoutAttribute(LayoutKind.Sequential, Pack = 2)] +#else + [StructLayout(LayoutKind.Sequential, Pack = 8)] +#endif + sealed internal class tagDBCOLUMNINFO + { + [MarshalAs(UnmanagedType.LPWStr)] + internal String pwszName = null; + + //[MarshalAs(UnmanagedType.Interface)] + internal IntPtr pTypeInfo = (IntPtr)0; + + internal IntPtr iOrdinal = (IntPtr)0; + + internal Int32 dwFlags = 0; + + internal IntPtr ulColumnSize = (IntPtr)0; + + internal Int16 wType = 0; + + internal Byte bPrecision = 0; + + internal Byte bScale = 0; + + internal tagDBIDX columnid; + + internal tagDBCOLUMNINFO() + { + } +#if DEBUG + public override string ToString() + { + StringBuilder builder = new StringBuilder(); + builder.Append("tagDBCOLUMNINFO: " + Convert.ToString(pwszName, CultureInfo.InvariantCulture)).Append(Environment.NewLine); + builder.Append("\t" + iOrdinal.ToInt64().ToString(CultureInfo.InvariantCulture)).Append(Environment.NewLine); + builder.Append("\t" + "0x" + dwFlags.ToString("X8", CultureInfo.InvariantCulture)).Append(Environment.NewLine); + builder.Append("\t" + ulColumnSize.ToInt64().ToString(CultureInfo.InvariantCulture)).Append(Environment.NewLine); + builder.Append("\t" + "0x" + wType.ToString("X2", CultureInfo.InvariantCulture)).Append(Environment.NewLine); + builder.Append("\t" + bPrecision.ToString(CultureInfo.InvariantCulture)).Append(Environment.NewLine); + builder.Append("\t" + bScale.ToString(CultureInfo.InvariantCulture)).Append(Environment.NewLine); + builder.Append("\t" + columnid.eKind.ToString(CultureInfo.InvariantCulture)).Append(Environment.NewLine); + return builder.ToString(); + } +#endif + } + +#if false + typedef struct tagDBPROPINFOSET { + /* [size_is] */ PDBPROPINFO rgPropertyInfos; + ULONG cPropertyInfos; + GUID guidPropertySet; + } +#endif +#if (WIN32 && !ARCH_arm) + [StructLayoutAttribute(LayoutKind.Sequential, Pack = 2)] +#else + [StructLayout(LayoutKind.Sequential, Pack = 8)] +#endif + sealed internal class tagDBPROPINFOSET + { + internal IntPtr rgPropertyInfos; + internal Int32 cPropertyInfos; + internal Guid guidPropertySet; + + internal tagDBPROPINFOSET() + { + } + } + +#if false + typedef struct tagDBPROPINFO { + LPOLESTR pwszDescription; + DBPROPID dwPropertyID; + DBPROPFLAGS dwFlags; + VARTYPE vtType; + VARIANT vValues; + } +#endif +#if (WIN32 && !ARCH_arm) + [StructLayoutAttribute(LayoutKind.Sequential, Pack = 2)] +#else + [StructLayout(LayoutKind.Sequential, Pack = 8)] +#endif + sealed internal class tagDBPROPINFO + { + [MarshalAs(UnmanagedType.LPWStr)] internal string pwszDescription; + + internal Int32 dwPropertyID; + internal Int32 dwFlags; + + internal Int16 vtType; + + [MarshalAs(UnmanagedType.Struct)] internal object vValue; + + internal tagDBPROPINFO() + { + } + } + +#if false + typedef struct tagDBPROPIDSET { + /* [size_is] */ DBPROPID *rgPropertyIDs; + ULONG cPropertyIDs; + GUID guidPropertySet; + } +#endif +#if (WIN32 && !ARCH_arm) + [StructLayoutAttribute(LayoutKind.Sequential, Pack = 2)] +#else + [StructLayout(LayoutKind.Sequential, Pack = 8)] +#endif + internal struct tagDBPROPIDSET + { + internal IntPtr rgPropertyIDs; + internal Int32 cPropertyIDs; + internal Guid guidPropertySet; + } +} + diff --git a/src/System.Data.OleDb/src/OleDbTransaction.cs b/src/System.Data.OleDb/src/OleDbTransaction.cs new file mode 100644 index 000000000000..65bf1829178d --- /dev/null +++ b/src/System.Data.OleDb/src/OleDbTransaction.cs @@ -0,0 +1,375 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Data.Common; +using System.Data.ProviderBase; +using System.Diagnostics; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +namespace System.Data.OleDb +{ + public sealed class OleDbTransaction : DbTransaction + { + private readonly OleDbTransaction _parentTransaction; // strong reference to keep parent alive + private readonly System.Data.IsolationLevel _isolationLevel; + + private WeakReference _nestedTransaction; // child transactions + private WrappedTransaction _transaction; + + internal OleDbConnection _parentConnection; + + private sealed class WrappedTransaction : WrappedIUnknown + { + private bool _mustComplete; + + internal WrappedTransaction(UnsafeNativeMethods.ITransactionLocal transaction, int isolevel, out OleDbHResult hr) : base(transaction) + { + int transactionLevel = 0; + RuntimeHelpers.PrepareConstrainedRegions(); + try + { } + finally + { + hr = transaction.StartTransaction(isolevel, 0, IntPtr.Zero, out transactionLevel); + if (0 <= hr) + { + _mustComplete = true; + } + } + } + + internal bool MustComplete + { + get { return _mustComplete; } + } + + internal OleDbHResult Abort() + { + Debug.Assert(_mustComplete, "transaction already completed"); + OleDbHResult hr; + bool mustRelease = false; + RuntimeHelpers.PrepareConstrainedRegions(); + try + { + DangerousAddRef(ref mustRelease); + RuntimeHelpers.PrepareConstrainedRegions(); + try + { } + finally + { + hr = (OleDbHResult)NativeOledbWrapper.ITransactionAbort(DangerousGetHandle()); + _mustComplete = false; + } + } + finally + { + if (mustRelease) + { + DangerousRelease(); + } + } + return hr; + } + + internal OleDbHResult Commit() + { + Debug.Assert(_mustComplete, "transaction already completed"); + OleDbHResult hr; + bool mustRelease = false; + RuntimeHelpers.PrepareConstrainedRegions(); + try + { + DangerousAddRef(ref mustRelease); + RuntimeHelpers.PrepareConstrainedRegions(); + try + { } + finally + { + hr = (OleDbHResult)NativeOledbWrapper.ITransactionCommit(DangerousGetHandle()); + if ((0 <= (int)hr) || (OleDbHResult.XACT_E_NOTRANSACTION == hr)) + { + _mustComplete = false; + } + } + } + finally + { + if (mustRelease) + { + DangerousRelease(); + } + } + return hr; + } + + override protected bool ReleaseHandle() + { + if (_mustComplete && (IntPtr.Zero != base.handle)) + { + OleDbHResult hr = (OleDbHResult)NativeOledbWrapper.ITransactionAbort(base.handle); + _mustComplete = false; + } + return base.ReleaseHandle(); + } + } + + internal OleDbTransaction(OleDbConnection connection, OleDbTransaction transaction, IsolationLevel isolevel) + { + _parentConnection = connection; + _parentTransaction = transaction; + + switch (isolevel) + { + case IsolationLevel.Unspecified: // OLE DB doesn't support this isolevel on local transactions + isolevel = IsolationLevel.ReadCommitted; + break; + case IsolationLevel.Chaos: + case IsolationLevel.ReadUncommitted: + case IsolationLevel.ReadCommitted: + case IsolationLevel.RepeatableRead: + case IsolationLevel.Serializable: + case IsolationLevel.Snapshot: + break; + default: + throw ADP.InvalidIsolationLevel(isolevel); + } + _isolationLevel = isolevel; + } + + new public OleDbConnection Connection + { + get + { + return _parentConnection; + } + } + + override protected DbConnection DbConnection + { + get + { + return Connection; + } + } + + override public IsolationLevel IsolationLevel + { + get + { + if (null == _transaction) + { + throw ADP.TransactionZombied(this); + } + return _isolationLevel; + } + } + + internal OleDbTransaction Parent + { + get + { + return _parentTransaction; + } + } + + public OleDbTransaction Begin(IsolationLevel isolevel) + { + if (null == _transaction) + { + throw ADP.TransactionZombied(this); + } + else if ((null != _nestedTransaction) && _nestedTransaction.IsAlive) + { + throw ADP.ParallelTransactionsNotSupported(Connection); + } + // either the connection will be open or this will be a zombie + + OleDbTransaction transaction = new OleDbTransaction(_parentConnection, this, isolevel); + _nestedTransaction = new WeakReference(transaction, false); + + UnsafeNativeMethods.ITransactionLocal wrapper = null; + try + { + wrapper = (UnsafeNativeMethods.ITransactionLocal)_transaction.ComWrapper(); + transaction.BeginInternal(wrapper); + } + finally + { + if (null != wrapper) + { + Marshal.ReleaseComObject(wrapper); + } + } + return transaction; + } + + public OleDbTransaction Begin() + { + return Begin(IsolationLevel.ReadCommitted); + } + + internal void BeginInternal(UnsafeNativeMethods.ITransactionLocal transaction) + { + OleDbHResult hr; + _transaction = new WrappedTransaction(transaction, (int)_isolationLevel, out hr); + if (hr < 0) + { + _transaction.Dispose(); + _transaction = null; + ProcessResults(hr); + } + } + + override public void Commit() + { + if (null == _transaction) + { + throw ADP.TransactionZombied(this); + } + CommitInternal(); + } + + private void CommitInternal() + { + if (null == _transaction) + { + return; + } + if (null != _nestedTransaction) + { + OleDbTransaction transaction = (OleDbTransaction)_nestedTransaction.Target; + if ((null != transaction) && _nestedTransaction.IsAlive) + { + transaction.CommitInternal(); + } + _nestedTransaction = null; + } + OleDbHResult hr = _transaction.Commit(); + if (!_transaction.MustComplete) + { + _transaction.Dispose(); + _transaction = null; + + DisposeManaged(); + } + if (hr < 0) + { + // if an exception is thrown, user can try to commit their transaction again + ProcessResults(hr); + } + } + + /*public OleDbCommand CreateCommand() { + OleDbCommand cmd = Connection.CreateCommand(); + cmd.Transaction = this; + return cmd; + } + + IDbCommand IDbTransaction.CreateCommand() { + return CreateCommand(); + }*/ + + protected override void Dispose(bool disposing) + { + if (disposing) + { + DisposeManaged(); + RollbackInternal(false); + } + base.Dispose(disposing); + } + + private void DisposeManaged() + { + if (null != _parentTransaction) + { + _parentTransaction._nestedTransaction = null; + //_parentTransaction = null; + } + else if (null != _parentConnection) + { + _parentConnection.LocalTransaction = null; + } + _parentConnection = null; + } + + private void ProcessResults(OleDbHResult hr) + { + Exception e = OleDbConnection.ProcessResults(hr, _parentConnection, this); + if (null != e) + { throw e; } + } + + override public void Rollback() + { + if (null == _transaction) + { + throw ADP.TransactionZombied(this); + } + DisposeManaged(); + RollbackInternal(true); // no recover if this throws an exception + } + + /*protected virtual*/ + internal OleDbHResult RollbackInternal(bool exceptionHandling) + { + OleDbHResult hr = 0; + if (null != _transaction) + { + if (null != _nestedTransaction) + { + OleDbTransaction transaction = (OleDbTransaction)_nestedTransaction.Target; + if ((null != transaction) && _nestedTransaction.IsAlive) + { + hr = transaction.RollbackInternal(exceptionHandling); + if (exceptionHandling && (hr < 0)) + { + SafeNativeMethods.Wrapper.ClearErrorInfo(); + return hr; + } + } + _nestedTransaction = null; + } + hr = _transaction.Abort(); + _transaction.Dispose(); + _transaction = null; + if (hr < 0) + { + if (exceptionHandling) + { + ProcessResults(hr); + } + else + { + SafeNativeMethods.Wrapper.ClearErrorInfo(); + } + } + } + return hr; + } + + static internal OleDbTransaction TransactionLast(OleDbTransaction head) + { + if (null != head._nestedTransaction) + { + OleDbTransaction current = (OleDbTransaction)head._nestedTransaction.Target; + if ((null != current) && head._nestedTransaction.IsAlive) + { + return TransactionLast(current); + } + } + return head; + } + + static internal OleDbTransaction TransactionUpdate(OleDbTransaction transaction) + { + if ((null != transaction) && (null == transaction._transaction)) + { + return null; + } + return transaction; + } + } +} diff --git a/src/System.Data.OleDb/src/OleDbType.cs b/src/System.Data.OleDb/src/OleDbType.cs new file mode 100644 index 000000000000..b975ac0e49b9 --- /dev/null +++ b/src/System.Data.OleDb/src/OleDbType.cs @@ -0,0 +1,48 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +namespace System.Data.OleDb +{ + public enum OleDbType + { + BigInt = 20, + Binary = 128, + Boolean = 11, + BSTR = 8, + Char = 129, + Currency = 6, + Date = 7, + DBDate = 133, + DBTime = 134, + DBTimeStamp = 135, + Decimal = 14, + Double = 5, + Empty = 0, + Error = 10, + Filetime = 64, + Guid = 72, + IDispatch = 9, + Integer = 3, + IUnknown = 13, + LongVarBinary = 205, + LongVarChar = 201, + LongVarWChar = 203, + Numeric = 131, + PropVariant = 138, + Single = 4, + SmallInt = 2, + TinyInt = 16, + UnsignedBigInt = 21, + UnsignedInt = 19, + UnsignedSmallInt = 18, + UnsignedTinyInt = 17, + VarBinary = 204, + VarChar = 200, + Variant = 12, + VarNumeric = 139, + VarWChar = 202, + WChar = 130, + } +} + diff --git a/src/System.Data.OleDb/src/OleDbWrapper.cs b/src/System.Data.OleDb/src/OleDbWrapper.cs new file mode 100644 index 000000000000..ce6fe77c7c3b --- /dev/null +++ b/src/System.Data.OleDb/src/OleDbWrapper.cs @@ -0,0 +1,527 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Data.Common; +using System.Data.ProviderBase; +using System.Diagnostics; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +namespace System.Data.OleDb +{ + // SafeHandle wrapper around 'DataLinks' object which pools the native OLE DB providers. + // expect 1 per app-domain + sealed internal class OleDbServicesWrapper : WrappedIUnknown + { + // we expect to store IDataInitialize instance pointer in base.handle + + // since we only have one DataLinks object, caching the delegate here is valid as long we + // maintain an AddRef which is also the lifetime of this class instance + private UnsafeNativeMethods.IDataInitializeGetDataSource DangerousIDataInitializeGetDataSource; + + // DataLinks (the unknown parameter) is created via Activator.CreateInstance outside of the SafeHandle + internal OleDbServicesWrapper(object unknown) : base() + { + if (null != unknown) + { + RuntimeHelpers.PrepareConstrainedRegions(); + try + { } + finally + { + // store the QI result for IID_IDataInitialize + base.handle = Marshal.GetComInterfaceForObject(unknown, typeof(UnsafeNativeMethods.IDataInitialize)); + } + // native COM rules are the QI result is the 'this' pointer + // the pointer stored at that location is the vtable + // since IDataInitialize is a public,shipped COM interface, its layout will not change (ever) + IntPtr vtable = Marshal.ReadIntPtr(base.handle, 0); + IntPtr method = Marshal.ReadIntPtr(vtable, 3 * IntPtr.Size); // GetDataSource is the 4'th vtable entry + DangerousIDataInitializeGetDataSource = (UnsafeNativeMethods.IDataInitializeGetDataSource)Marshal.GetDelegateForFunctionPointer(method, typeof(UnsafeNativeMethods.IDataInitializeGetDataSource)); + } + } + + internal void GetDataSource(OleDbConnectionString constr, ref DataSourceWrapper datasrcWrapper) + { + OleDbHResult hr; + UnsafeNativeMethods.IDataInitializeGetDataSource GetDataSource = DangerousIDataInitializeGetDataSource; + bool mustRelease = false; + RuntimeHelpers.PrepareConstrainedRegions(); + try + { + DangerousAddRef(ref mustRelease); + + // this is the string that DataLinks / OLE DB Services will use to create the provider + string connectionString = constr.ActualConnectionString; + + // base.handle is the 'this' pointer for making the COM call to GetDataSource + // the datasrcWrapper will store the IID_IDBInitialize pointer + // call IDataInitiailze::GetDataSource via the delegate + hr = GetDataSource(base.handle, IntPtr.Zero, ODB.CLSCTX_ALL, connectionString, ref ODB.IID_IDBInitialize, ref datasrcWrapper); + } + finally + { + if (mustRelease) + { + DangerousRelease(); + } + } + if (hr < 0) + { // ignore infomsg + if (OleDbHResult.REGDB_E_CLASSNOTREG == hr) + { + throw ODB.ProviderUnavailable(constr.Provider, null); + } + Exception e = OleDbConnection.ProcessResults(hr, null, null); + Debug.Assert(null != e, "CreateProviderError"); + throw e; + } + else if (datasrcWrapper.IsInvalid) + { + SafeNativeMethods.Wrapper.ClearErrorInfo(); + throw ODB.ProviderUnavailable(constr.Provider, null); + } + Debug.Assert(!datasrcWrapper.IsInvalid, "bad DataSource"); + } + } + + // SafeHandle wrapper around 'Data Source' object which represents the connection + // expect 1 per OleDbConnectionInternal + sealed internal class DataSourceWrapper : WrappedIUnknown + { + // we expect to store IDBInitialize instance pointer in base.handle + + // construct a DataSourceWrapper and used as a ref parameter to GetDataSource + internal DataSourceWrapper() : base() + { + } + + internal OleDbHResult InitializeAndCreateSession(OleDbConnectionString constr, ref SessionWrapper sessionWrapper) + { + OleDbHResult hr; + bool mustRelease = false; + IntPtr idbCreateSession = IntPtr.Zero; + RuntimeHelpers.PrepareConstrainedRegions(); + try + { + DangerousAddRef(ref mustRelease); + + // native COM rules are the QI result is the 'this' pointer + // the pointer stored at that location is the vtable + // since IUnknown is a public,shipped COM interface, its layout will not change (ever) + IntPtr vtable = Marshal.ReadIntPtr(base.handle, 0); + IntPtr method = Marshal.ReadIntPtr(vtable, 0); + + // we cache the QueryInterface delegate to prevent recreating it on every call + UnsafeNativeMethods.IUnknownQueryInterface QueryInterface = constr.DangerousDataSourceIUnknownQueryInterface; + + // since the delegate lifetime is longer than the original instance used to create it + // we double check before each usage to verify the delegates function pointer + if ((null == QueryInterface) || (method != Marshal.GetFunctionPointerForDelegate(QueryInterface))) + { + QueryInterface = (UnsafeNativeMethods.IUnknownQueryInterface)Marshal.GetDelegateForFunctionPointer(method, typeof(UnsafeNativeMethods.IUnknownQueryInterface)); + constr.DangerousDataSourceIUnknownQueryInterface = QueryInterface; + } + + // native COM rules are the QI result is the 'this' pointer + // the pointer stored at that location is the vtable + // since IDBInitialize is a public,shipped COM interface, its layout will not change (ever) + vtable = Marshal.ReadIntPtr(base.handle, 0); + method = Marshal.ReadIntPtr(vtable, 3 * IntPtr.Size); // Initialize is the 4'th vtable entry + + // we cache the Initialize delegate to prevent recreating it on every call + UnsafeNativeMethods.IDBInitializeInitialize Initialize = constr.DangerousIDBInitializeInitialize; + + // since the delegate lifetime is longer than the original instance used to create it + // we double check before each usage to verify the delegates function pointer + if ((null == Initialize) || (method != Marshal.GetFunctionPointerForDelegate(Initialize))) + { + Initialize = (UnsafeNativeMethods.IDBInitializeInitialize)Marshal.GetDelegateForFunctionPointer(method, typeof(UnsafeNativeMethods.IDBInitializeInitialize)); + constr.DangerousIDBInitializeInitialize = Initialize; + } + + // call IDBInitialize::Initialize via the delegate + hr = Initialize(base.handle); + + // we don't ever expect DB_E_ALREADYINITIALIZED, but since we checked in V1.0 - its propagated along + if ((0 <= hr) || (OleDbHResult.DB_E_ALREADYINITIALIZED == hr)) + { + // call IUnknown::QueryInterface via the delegate + hr = (OleDbHResult)QueryInterface(base.handle, ref ODB.IID_IDBCreateSession, ref idbCreateSession); + if ((0 <= hr) && (IntPtr.Zero != idbCreateSession)) + { + // native COM rules are the QI result is the 'this' pointer + // the pointer stored at that location is the vtable + // since IDBCreateSession is a public,shipped COM interface, its layout will not change (ever) + vtable = Marshal.ReadIntPtr(idbCreateSession, 0); + method = Marshal.ReadIntPtr(vtable, 3 * IntPtr.Size); // CreateSession is the 4'th vtable entry + + UnsafeNativeMethods.IDBCreateSessionCreateSession CreateSession = constr.DangerousIDBCreateSessionCreateSession; + + // since the delegate lifetime is longer than the original instance used to create it + // we double check before each usage to verify the delegates function pointer + if ((null == CreateSession) || (method != Marshal.GetFunctionPointerForDelegate(CreateSession))) + { + CreateSession = (UnsafeNativeMethods.IDBCreateSessionCreateSession)Marshal.GetDelegateForFunctionPointer(method, typeof(UnsafeNativeMethods.IDBCreateSessionCreateSession)); + constr.DangerousIDBCreateSessionCreateSession = CreateSession; + } + + // if I have a delegate for CreateCommand directly ask for IDBCreateCommand + if (null != constr.DangerousIDBCreateCommandCreateCommand) + { + // call IDBCreateSession::CreateSession via the delegate directly for IDBCreateCommand + hr = CreateSession(idbCreateSession, IntPtr.Zero, ref ODB.IID_IDBCreateCommand, ref sessionWrapper); + if ((0 <= hr) && !sessionWrapper.IsInvalid) + { + // double check the cached delegate is correct + sessionWrapper.VerifyIDBCreateCommand(constr); + } + } + else + { + // otherwise ask for IUnknown (it may be first time usage or IDBCreateCommand not supported) + hr = CreateSession(idbCreateSession, IntPtr.Zero, ref ODB.IID_IUnknown, ref sessionWrapper); + if ((0 <= hr) && !sessionWrapper.IsInvalid) + { + // and check support for IDBCreateCommand and create delegate for CreateCommand + sessionWrapper.QueryInterfaceIDBCreateCommand(constr); + } + } + } + } + } + finally + { + if (IntPtr.Zero != idbCreateSession) + { + // release the QI for IDBCreateSession + Marshal.Release(idbCreateSession); + } + if (mustRelease) + { + // release the AddRef on DataLinks + DangerousRelease(); + } + } + return hr; + } + + internal IDBInfoWrapper IDBInfo(OleDbConnectionInternal connection) + { + return new IDBInfoWrapper(ComWrapper()); + } + internal IDBPropertiesWrapper IDBProperties(OleDbConnectionInternal connection) + { + return new IDBPropertiesWrapper(ComWrapper()); + } + } + + // SafeHandle wrapper around 'Session' object which represents the session on the connection + // expect 1 per OleDbConnectionInternal + sealed internal class SessionWrapper : WrappedIUnknown + { + // base.handle will either reference the IUnknown interface or IDBCreateCommand interface + // if OleDbConnectionString.DangerousIDBCreateCommandCreateCommand exists + // the CreateSession call will ask directly for the optional IDBCreateCommand + // otherwise it is the first call or known that IDBCreateCommand isn't supported + + // we cache the DangerousIDBCreateCommandCreateCommand (expecting base.handle to be IDBCreateCommand) + // since we maintain an AddRef on IDBCreateCommand it is safe to use the delegate without rechecking its function pointer + private UnsafeNativeMethods.IDBCreateCommandCreateCommand DangerousIDBCreateCommandCreateCommand; + + internal SessionWrapper() : base() + { + } + + // if OleDbConnectionString.DangerousIDBCreateCommandCreateCommand does not exist + // this method will be called to query for IDBCreateCommand (and cache that interface pointer) + // or it will be known that IDBCreateCommand is not supported + internal void QueryInterfaceIDBCreateCommand(OleDbConnectionString constr) + { + // DangerousAddRef/DangerousRelease are not neccessary here in the current implementation + // only used from within OleDbConnectionInternal.ctor->DataSourceWrapper.InitializeAndCreateSession + + // caching the fact if we have queried for IDBCreateCommand or not + // the command object is not supported by all providers, they would use IOpenRowset + // added extra if condition + // If constr.HaveQueriedForCreateCommand is false, this is the first time through this method and we need to set up the cache for sure. + // If two threads try to set the cache at the same time, everything should be okay. There can be multiple delegates that point to the same unmanaged function. + // If constr.HaveQueriedForCreateCommand is true, we have already tried to query for IDBCreateCommand on a previous call to this method, but based on that alone, + // we don't know if another thread set the flag, or if the provider really doesn't support commands. + // If constr.HaveQueriedForCreateCommand is true and constr.DangerousIDBCreateCommandCreateCommand is not null, that means that another thread has set it after we + // determined we needed to call QueryInterfaceIDBCreateCommand -- otherwise we would have called VerifyIDBCreateCommand instead + // In that case, we still need to set our local DangerousIDBCreateCommandCreateCommand, so we want to go through the if block even though the cache has been set on constr already + if (!constr.HaveQueriedForCreateCommand || (null != constr.DangerousIDBCreateCommandCreateCommand)) + { + IntPtr idbCreateCommand = IntPtr.Zero; + RuntimeHelpers.PrepareConstrainedRegions(); + try + { + // native COM rules are the QI result is the 'this' pointer + // the pointer stored at that location is the vtable + // since IUnknown is a public,shipped COM interface, its layout will not change (ever) + IntPtr vtable = Marshal.ReadIntPtr(base.handle, 0); + IntPtr method = Marshal.ReadIntPtr(vtable, 0); + UnsafeNativeMethods.IUnknownQueryInterface QueryInterface = (UnsafeNativeMethods.IUnknownQueryInterface)Marshal.GetDelegateForFunctionPointer(method, typeof(UnsafeNativeMethods.IUnknownQueryInterface)); + + int hresult = QueryInterface(base.handle, ref ODB.IID_IDBCreateCommand, ref idbCreateCommand); + if ((0 <= hresult) && (IntPtr.Zero != idbCreateCommand)) + { + vtable = Marshal.ReadIntPtr(idbCreateCommand, 0); + method = Marshal.ReadIntPtr(vtable, 3 * IntPtr.Size); + + DangerousIDBCreateCommandCreateCommand = (UnsafeNativeMethods.IDBCreateCommandCreateCommand)Marshal.GetDelegateForFunctionPointer(method, typeof(UnsafeNativeMethods.IDBCreateCommandCreateCommand)); + constr.DangerousIDBCreateCommandCreateCommand = DangerousIDBCreateCommandCreateCommand; + } + + // caching the fact that we have queried for IDBCreateCommand + constr.HaveQueriedForCreateCommand = true; + } + finally + { + if (IntPtr.Zero != idbCreateCommand) + { + IntPtr ptr = base.handle; + base.handle = idbCreateCommand; + Marshal.Release(ptr); + } + } + } + //else if constr.HaveQueriedForCreateCommand is true and constr.DangerousIDBCreateCommandCreateCommand is still null, it means that this provider doesn't support commands + } + + internal void VerifyIDBCreateCommand(OleDbConnectionString constr) + { + // DangerousAddRef/DangerousRelease are not neccessary here in the current implementation + // only used from within OleDbConnectionInternal.ctor->DataSourceWrapper.InitializeAndCreateSession + + Debug.Assert(constr.HaveQueriedForCreateCommand, "expected HaveQueriedForCreateCommand"); + Debug.Assert(null != constr.DangerousIDBCreateCommandCreateCommand, "expected DangerousIDBCreateCommandCreateCommand"); + + // native COM rules are the QI result is the 'this' pointer + // the pointer stored at that location is the vtable + // since IDBCreateCommand is a public,shipped COM interface, its layout will not change (ever) + IntPtr vtable = Marshal.ReadIntPtr(base.handle, 0); + IntPtr method = Marshal.ReadIntPtr(vtable, 3 * IntPtr.Size); + + // obtain the cached delegate to be cached on this instance + UnsafeNativeMethods.IDBCreateCommandCreateCommand CreateCommand = constr.DangerousIDBCreateCommandCreateCommand; + + // since the delegate lifetime is longer than the original instance used to create it + // we double check before each usage to verify the delegates function pointer + if ((null == CreateCommand) || (method != Marshal.GetFunctionPointerForDelegate(CreateCommand))) + { + CreateCommand = (UnsafeNativeMethods.IDBCreateCommandCreateCommand)Marshal.GetDelegateForFunctionPointer(method, typeof(UnsafeNativeMethods.IDBCreateCommandCreateCommand)); + constr.DangerousIDBCreateCommandCreateCommand = CreateCommand; + } + // since this instance can be used to create multiple commands + // cache it on the class so that the function pointer doesn't have to be validated every time + DangerousIDBCreateCommandCreateCommand = CreateCommand; + } + + internal OleDbHResult CreateCommand(ref object icommandText) + { + // if (null == CreateCommand), the IDBCreateCommand isn't supported - aka E_NOINTERFACE + OleDbHResult hr = OleDbHResult.E_NOINTERFACE; + UnsafeNativeMethods.IDBCreateCommandCreateCommand CreateCommand = DangerousIDBCreateCommandCreateCommand; + if (null != CreateCommand) + { + bool mustRelease = false; + RuntimeHelpers.PrepareConstrainedRegions(); + try + { + DangerousAddRef(ref mustRelease); + + // call IDBCreateCommand::CreateCommand via the delegate directly for IDBCreateCommand + hr = CreateCommand(base.handle, IntPtr.Zero, ref ODB.IID_ICommandText, ref icommandText); + } + finally + { + if (mustRelease) + { + DangerousRelease(); + } + } + } + return hr; + } + + internal IDBSchemaRowsetWrapper IDBSchemaRowset(OleDbConnectionInternal connection) + { + return new IDBSchemaRowsetWrapper(ComWrapper()); + } + + internal IOpenRowsetWrapper IOpenRowset(OleDbConnectionInternal connection) + { + return new IOpenRowsetWrapper(ComWrapper()); + } + + internal ITransactionJoinWrapper ITransactionJoin(OleDbConnectionInternal connection) + { + return new ITransactionJoinWrapper(ComWrapper()); + } + } + + // unable to use generics bacause (unknown as T) doesn't compile + internal struct IDBInfoWrapper : IDisposable + { + // _unknown must be tracked because the _value may not exist, + // yet _unknown must still be released + private object _unknown; + private UnsafeNativeMethods.IDBInfo _value; + + internal IDBInfoWrapper(object unknown) + { + _unknown = unknown; + _value = (unknown as UnsafeNativeMethods.IDBInfo); + } + + internal UnsafeNativeMethods.IDBInfo Value + { + get + { + return _value; + } + } + + public void Dispose() + { + object unknown = _unknown; + _unknown = null; + _value = null; + if (null != unknown) + { + Marshal.ReleaseComObject(unknown); + } + } + } + + internal struct IDBPropertiesWrapper : IDisposable + { + private object _unknown; + private UnsafeNativeMethods.IDBProperties _value; + + internal IDBPropertiesWrapper(object unknown) + { + _unknown = unknown; + _value = (unknown as UnsafeNativeMethods.IDBProperties); + Debug.Assert(null != _value, "null IDBProperties"); + } + + internal UnsafeNativeMethods.IDBProperties Value + { + get + { + Debug.Assert(null != _value, "null IDBProperties"); + return _value; + } + } + + public void Dispose() + { + object unknown = _unknown; + _unknown = null; + _value = null; + if (null != unknown) + { + Marshal.ReleaseComObject(unknown); + } + } + } + + internal struct IDBSchemaRowsetWrapper : IDisposable + { + private object _unknown; + private UnsafeNativeMethods.IDBSchemaRowset _value; + + internal IDBSchemaRowsetWrapper(object unknown) + { + _unknown = unknown; + _value = (unknown as UnsafeNativeMethods.IDBSchemaRowset); + } + + internal UnsafeNativeMethods.IDBSchemaRowset Value + { + get + { + return _value; + } + } + + public void Dispose() + { + object unknown = _unknown; + _unknown = null; + _value = null; + if (null != unknown) + { + Marshal.ReleaseComObject(unknown); + } + } + } + + internal struct IOpenRowsetWrapper : IDisposable + { + private object _unknown; + private UnsafeNativeMethods.IOpenRowset _value; + + internal IOpenRowsetWrapper(object unknown) + { + _unknown = unknown; + _value = (unknown as UnsafeNativeMethods.IOpenRowset); + Debug.Assert(null != _value, "null IOpenRowsetWrapper"); + } + + internal UnsafeNativeMethods.IOpenRowset Value + { + get + { + Debug.Assert(null != _value, "null IDBProperties"); + return _value; + } + } + + public void Dispose() + { + object unknown = _unknown; + _unknown = null; + _value = null; + if (null != unknown) + { + Marshal.ReleaseComObject(unknown); + } + } + } + + internal struct ITransactionJoinWrapper : IDisposable + { + private object _unknown; + private NativeMethods.ITransactionJoin _value; + + internal ITransactionJoinWrapper(object unknown) + { + _unknown = unknown; + _value = (unknown as NativeMethods.ITransactionJoin); + } + + internal NativeMethods.ITransactionJoin Value + { + get + { + return _value; + } + } + + public void Dispose() + { + object unknown = _unknown; + _unknown = null; + _value = null; + if (null != unknown) + { + Marshal.ReleaseComObject(unknown); + } + } + } +} diff --git a/src/System.Data.OleDb/src/OleDb_Enum.cs b/src/System.Data.OleDb/src/OleDb_Enum.cs new file mode 100644 index 000000000000..9e93e62d1781 --- /dev/null +++ b/src/System.Data.OleDb/src/OleDb_Enum.cs @@ -0,0 +1,540 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Data.Common; + +namespace System.Data.OleDb +{ + internal enum DBStatus + { // from 4214.0 + S_OK = 0, + E_BADACCESSOR = 1, + E_CANTCONVERTVALUE = 2, + S_ISNULL = 3, + S_TRUNCATED = 4, + E_SIGNMISMATCH = 5, + E_DATAOVERFLOW = 6, + E_CANTCREATE = 7, + E_UNAVAILABLE = 8, + E_PERMISSIONDENIED = 9, + E_INTEGRITYVIOLATION = 10, + E_SCHEMAVIOLATION = 11, + E_BADSTATUS = 12, + S_DEFAULT = 13, + S_CELLEMPTY = 14, // 2.0 + S_IGNORE = 15, // 2.0 + E_DOESNOTEXIST = 16, // 2.1 + E_INVALIDURL = 17, // 2.1 + E_RESOURCELOCKED = 18, // 2.1 + E_RESOURCEEXISTS = 19, // 2.1 + E_CANNOTCOMPLETE = 20, // 2.1 + E_VOLUMENOTFOUND = 21, // 2.1 + E_OUTOFSPACE = 22, // 2.1 + S_CANNOTDELETESOURCE = 23, // 2.1 + E_READONLY = 24, // 2.1 + E_RESOURCEOUTOFSCOPE = 25, // 2.1 + S_ALREADYEXISTS = 26, // 2.1 + E_CANCELED = 27, // 2.5 + E_NOTCOLLECTION = 28, // 2.5 + S_ROWSETCOLUMN = 29, // 2.6 + } + + sealed internal class NativeDBType + { // from 4214.0 + // Variant compatible + internal const short EMPTY = 0; // + internal const short NULL = 1; // + internal const short I2 = 2; // + internal const short I4 = 3; // + internal const short R4 = 4; // + internal const short R8 = 5; // + internal const short CY = 6; // + internal const short DATE = 7; // + internal const short BSTR = 8; // + internal const short IDISPATCH = 9; // + internal const short ERROR = 10; // + internal const short BOOL = 11; // + internal const short VARIANT = 12; // + internal const short IUNKNOWN = 13; // + internal const short DECIMAL = 14; // + internal const short I1 = 16; // + internal const short UI1 = 17; // + internal const short UI2 = 18; // + internal const short UI4 = 19; // + internal const short I8 = 20; // + internal const short UI8 = 21; // + internal const short FILETIME = 64; // 2.0 + internal const short DBUTCDATETIME = 65; // 9.0 + internal const short DBTIME_EX = 66; // 9.0 + internal const short GUID = 72; // + internal const short BYTES = 128; // + internal const short STR = 129; // + internal const short WSTR = 130; // + internal const short NUMERIC = 131; // with potential overflow + internal const short UDT = 132; // should never be encountered + internal const short DBDATE = 133; // + internal const short DBTIME = 134; // + internal const short DBTIMESTAMP = 135; // granularity reduced from 1ns to 100ns (sql is 3.33 milli seconds) + internal const short HCHAPTER = 136; // 1.5 + internal const short PROPVARIANT = 138; // 2.0 - as variant + internal const short VARNUMERIC = 139; // 2.0 - as string else ConversionException + internal const short XML = 141; // 9.0 + internal const short VECTOR = unchecked((short)0x1000); + internal const short ARRAY = unchecked((short)0x2000); + internal const short BYREF = unchecked((short)0x4000); // + internal const short RESERVED = unchecked((short)0x8000); // SystemException + + // high mask + internal const short HighMask = unchecked((short)0xf000); + + static internal bool HasHighBit(short value) + { + return (0 != (HighMask & value)); + } + /* + static internal bool IsArray(short value) { + return (ARRAY == (HighMask & value)); + } + static internal bool IsByRef(short value) { + return (BYREF == (HighMask & value)); + } + static internal bool IsReserved(short value) { + return (RESERVED == (HighMask & value)); + } + static internal bool IsVector(short value) { + return (VECTOR == (HighMask & value)); + } + static internal int GetLowBits(short value) { + return (value & ~HighMask); + } + */ + + private const string S_BINARY = "DBTYPE_BINARY"; // DBTYPE_BYTES + private const string S_BOOL = "DBTYPE_BOOL"; + private const string S_BSTR = "DBTYPE_BSTR"; + private const string S_CHAR = "DBTYPE_CHAR"; // DBTYPE_STR + private const string S_CY = "DBTYPE_CY"; + private const string S_DATE = "DBTYPE_DATE"; + private const string S_DBDATE = "DBTYPE_DBDATE"; + private const string S_DBTIME = "DBTYPE_DBTIME"; + private const string S_DBTIMESTAMP = "DBTYPE_DBTIMESTAMP"; + private const string S_DECIMAL = "DBTYPE_DECIMAL"; + private const string S_ERROR = "DBTYPE_ERROR"; + private const string S_FILETIME = "DBTYPE_FILETIME"; + private const string S_GUID = "DBTYPE_GUID"; + private const string S_I1 = "DBTYPE_I1"; + private const string S_I2 = "DBTYPE_I2"; + private const string S_I4 = "DBTYPE_I4"; + private const string S_I8 = "DBTYPE_I8"; + private const string S_IDISPATCH = "DBTYPE_IDISPATCH"; + private const string S_IUNKNOWN = "DBTYPE_IUNKNOWN"; + private const string S_LONGVARBINARY = "DBTYPE_LONGVARBINARY"; // DBTYPE_BYTES + private const string S_LONGVARCHAR = "DBTYPE_LONGVARCHAR"; // DBTYPE_STR + private const string S_NUMERIC = "DBTYPE_NUMERIC"; + private const string S_PROPVARIANT = "DBTYPE_PROPVARIANT"; + private const string S_R4 = "DBTYPE_R4"; + private const string S_R8 = "DBTYPE_R8"; + private const string S_UDT = "DBTYPE_UDT"; + private const string S_UI1 = "DBTYPE_UI1"; + private const string S_UI2 = "DBTYPE_UI2"; + private const string S_UI4 = "DBTYPE_UI4"; + private const string S_UI8 = "DBTYPE_UI8"; + private const string S_VARBINARY = "DBTYPE_VARBINARY"; // DBTYPE_BYTES + private const string S_VARCHAR = "DBTYPE_VARCHAR"; // DBTYPE_STR + private const string S_VARIANT = "DBTYPE_VARIANT"; + private const string S_VARNUMERIC = "DBTYPE_VARNUMERIC"; + private const string S_WCHAR = "DBTYPE_WCHAR"; // DBTYPE_WSTR + private const string S_WVARCHAR = "DBTYPE_WVARCHAR"; // DBTYPE_WSTR + private const string S_WLONGVARCHAR = "DBTYPE_WLONGVARCHAR"; // DBTYPE_WSTR + private const string S_XML = "DBTYPE_XML"; + + static private readonly NativeDBType D_Binary = new NativeDBType(0xff, -1, true, false, OleDbType.Binary, NativeDBType.BYTES, S_BINARY, typeof(System.Byte[]), NativeDBType.BYTES, DbType.Binary); // 0 + static private readonly NativeDBType D_Boolean = new NativeDBType(0xff, 2, true, false, OleDbType.Boolean, NativeDBType.BOOL, S_BOOL, typeof(System.Boolean), NativeDBType.BOOL, DbType.Boolean); // 1 - integer2 (variant_bool) + static private readonly NativeDBType D_BSTR = new NativeDBType(0xff, ADP.PtrSize, false, false, OleDbType.BSTR, NativeDBType.BSTR, S_BSTR, typeof(System.String), NativeDBType.BSTR, DbType.String); // 2 - integer4 (pointer) + static private readonly NativeDBType D_Char = new NativeDBType(0xff, -1, true, false, OleDbType.Char, NativeDBType.STR, S_CHAR, typeof(System.String), NativeDBType.WSTR/*STR*/, DbType.AnsiStringFixedLength); // 3 - (ansi pointer) + static private readonly NativeDBType D_Currency = new NativeDBType(19, 8, true, false, OleDbType.Currency, NativeDBType.CY, S_CY, typeof(System.Decimal), NativeDBType.CY, DbType.Currency); // 4 - integer8 + static private readonly NativeDBType D_Date = new NativeDBType(0xff, 8, true, false, OleDbType.Date, NativeDBType.DATE, S_DATE, typeof(System.DateTime), NativeDBType.DATE, DbType.DateTime); // 5 - double + static private readonly NativeDBType D_DBDate = new NativeDBType(0xff, 6, true, false, OleDbType.DBDate, NativeDBType.DBDATE, S_DBDATE, typeof(System.DateTime), NativeDBType.DBDATE, DbType.Date); // 6 - (tagDBDate) + static private readonly NativeDBType D_DBTime = new NativeDBType(0xff, 6, true, false, OleDbType.DBTime, NativeDBType.DBTIME, S_DBTIME, typeof(System.TimeSpan), NativeDBType.DBTIME, DbType.Time); // 7 - (tagDBTime) + static private readonly NativeDBType D_DBTimeStamp = new NativeDBType(0xff, 16, true, false, OleDbType.DBTimeStamp, NativeDBType.DBTIMESTAMP, S_DBTIMESTAMP, typeof(System.DateTime), NativeDBType.DBTIMESTAMP, DbType.DateTime); // 8 - (tagDBTIMESTAMP) + static private readonly NativeDBType D_Decimal = new NativeDBType(28, 16, true, false, OleDbType.Decimal, NativeDBType.DECIMAL, S_DECIMAL, typeof(System.Decimal), NativeDBType.DECIMAL, DbType.Decimal); // 9 - (tagDec) + static private readonly NativeDBType D_Error = new NativeDBType(0xff, 4, true, false, OleDbType.Error, NativeDBType.ERROR, S_ERROR, typeof(System.Int32), NativeDBType.ERROR, DbType.Int32); // 10 - integer4 + static private readonly NativeDBType D_Filetime = new NativeDBType(0xff, 8, true, false, OleDbType.Filetime, NativeDBType.FILETIME, S_FILETIME, typeof(System.DateTime), NativeDBType.FILETIME, DbType.DateTime); // 11 - integer8 + static private readonly NativeDBType D_Guid = new NativeDBType(0xff, 16, true, false, OleDbType.Guid, NativeDBType.GUID, S_GUID, typeof(System.Guid), NativeDBType.GUID, DbType.Guid); // 12 - ubyte[16] + static private readonly NativeDBType D_TinyInt = new NativeDBType(3, 1, true, false, OleDbType.TinyInt, NativeDBType.I1, S_I1, typeof(System.Int16), NativeDBType.I1, DbType.SByte); // 13 - integer1 + static private readonly NativeDBType D_SmallInt = new NativeDBType(5, 2, true, false, OleDbType.SmallInt, NativeDBType.I2, S_I2, typeof(System.Int16), NativeDBType.I2, DbType.Int16); // 14 - integer2 + static private readonly NativeDBType D_Integer = new NativeDBType(10, 4, true, false, OleDbType.Integer, NativeDBType.I4, S_I4, typeof(System.Int32), NativeDBType.I4, DbType.Int32); // 15 - integer4 + static private readonly NativeDBType D_BigInt = new NativeDBType(19, 8, true, false, OleDbType.BigInt, NativeDBType.I8, S_I8, typeof(System.Int64), NativeDBType.I8, DbType.Int64); // 16 - integer8 + static private readonly NativeDBType D_IDispatch = new NativeDBType(0xff, ADP.PtrSize, true, false, OleDbType.IDispatch, NativeDBType.IDISPATCH, S_IDISPATCH, typeof(System.Object), NativeDBType.IDISPATCH, DbType.Object); // 17 - integer4 (pointer) + static private readonly NativeDBType D_IUnknown = new NativeDBType(0xff, ADP.PtrSize, true, false, OleDbType.IUnknown, NativeDBType.IUNKNOWN, S_IUNKNOWN, typeof(System.Object), NativeDBType.IUNKNOWN, DbType.Object); // 18 - integer4 (pointer) + static private readonly NativeDBType D_LongVarBinary = new NativeDBType(0xff, -1, false, true, OleDbType.LongVarBinary, NativeDBType.BYTES, S_LONGVARBINARY, typeof(System.Byte[]), NativeDBType.BYTES, DbType.Binary); // 19 + static private readonly NativeDBType D_LongVarChar = new NativeDBType(0xff, -1, false, true, OleDbType.LongVarChar, NativeDBType.STR, S_LONGVARCHAR, typeof(System.String), NativeDBType.WSTR/*STR*/, DbType.AnsiString); // 20 - (ansi pointer) + static private readonly NativeDBType D_Numeric = new NativeDBType(28, 19, true, false, OleDbType.Numeric, NativeDBType.NUMERIC, S_NUMERIC, typeof(System.Decimal), NativeDBType.NUMERIC, DbType.Decimal); // 21 - (tagDB_Numeric) + static unsafe private readonly NativeDBType D_PropVariant = new NativeDBType(0xff, sizeof(PROPVARIANT), + true, false, OleDbType.PropVariant, NativeDBType.PROPVARIANT, S_PROPVARIANT, typeof(System.Object), NativeDBType.VARIANT, DbType.Object); // 22 + static private readonly NativeDBType D_Single = new NativeDBType(7, 4, true, false, OleDbType.Single, NativeDBType.R4, S_R4, typeof(System.Single), NativeDBType.R4, DbType.Single); // 23 - single + static private readonly NativeDBType D_Double = new NativeDBType(15, 8, true, false, OleDbType.Double, NativeDBType.R8, S_R8, typeof(System.Double), NativeDBType.R8, DbType.Double); // 24 - double + static private readonly NativeDBType D_UnsignedTinyInt = new NativeDBType(3, 1, true, false, OleDbType.UnsignedTinyInt, NativeDBType.UI1, S_UI1, typeof(System.Byte), NativeDBType.UI1, DbType.Byte); // 25 - byte7 + static private readonly NativeDBType D_UnsignedSmallInt = new NativeDBType(5, 2, true, false, OleDbType.UnsignedSmallInt, NativeDBType.UI2, S_UI2, typeof(System.Int32), NativeDBType.UI2, DbType.UInt16); // 26 - unsigned integer2 + static private readonly NativeDBType D_UnsignedInt = new NativeDBType(10, 4, true, false, OleDbType.UnsignedInt, NativeDBType.UI4, S_UI4, typeof(System.Int64), NativeDBType.UI4, DbType.UInt32); // 27 - unsigned integer4 + static private readonly NativeDBType D_UnsignedBigInt = new NativeDBType(20, 8, true, false, OleDbType.UnsignedBigInt, NativeDBType.UI8, S_UI8, typeof(System.Decimal), NativeDBType.UI8, DbType.UInt64); // 28 - unsigned integer8 + static private readonly NativeDBType D_VarBinary = new NativeDBType(0xff, -1, false, false, OleDbType.VarBinary, NativeDBType.BYTES, S_VARBINARY, typeof(System.Byte[]), NativeDBType.BYTES, DbType.Binary); // 29 + static private readonly NativeDBType D_VarChar = new NativeDBType(0xff, -1, false, false, OleDbType.VarChar, NativeDBType.STR, S_VARCHAR, typeof(System.String), NativeDBType.WSTR/*STR*/, DbType.AnsiString); // 30 - (ansi pointer) + static private readonly NativeDBType D_Variant = new NativeDBType(0xff, ODB.SizeOf_Variant, true, false, OleDbType.Variant, NativeDBType.VARIANT, S_VARIANT, typeof(System.Object), NativeDBType.VARIANT, DbType.Object); // 31 - ubyte[16] (variant) + static private readonly NativeDBType D_VarNumeric = new NativeDBType(255, 16, true, false, OleDbType.VarNumeric, NativeDBType.VARNUMERIC, S_VARNUMERIC, typeof(System.Decimal), NativeDBType.DECIMAL, DbType.VarNumeric); // 32 - (unicode pointer) + static private readonly NativeDBType D_WChar = new NativeDBType(0xff, -1, true, false, OleDbType.WChar, NativeDBType.WSTR, S_WCHAR, typeof(System.String), NativeDBType.WSTR, DbType.StringFixedLength); // 33 - (unicode pointer) + static private readonly NativeDBType D_VarWChar = new NativeDBType(0xff, -1, false, false, OleDbType.VarWChar, NativeDBType.WSTR, S_WVARCHAR, typeof(System.String), NativeDBType.WSTR, DbType.String); // 34 - (unicode pointer) + static private readonly NativeDBType D_LongVarWChar = new NativeDBType(0xff, -1, false, true, OleDbType.LongVarWChar, NativeDBType.WSTR, S_WLONGVARCHAR, typeof(System.String), NativeDBType.WSTR, DbType.String); // 35 - (unicode pointer) + static private readonly NativeDBType D_Chapter = new NativeDBType(0xff, ADP.PtrSize, false, false, OleDbType.Empty, NativeDBType.HCHAPTER, S_UDT, typeof(IDataReader), NativeDBType.HCHAPTER, DbType.Object); // 36 - (hierarchical chaper) + static private readonly NativeDBType D_Empty = new NativeDBType(0xff, 0, false, false, OleDbType.Empty, NativeDBType.EMPTY, "", null, NativeDBType.EMPTY, DbType.Object); // 37 - invalid param default + static private readonly NativeDBType D_Xml = new NativeDBType(0xff, -1, false, false, OleDbType.VarWChar, NativeDBType.XML, S_XML, typeof(System.String), NativeDBType.WSTR, DbType.String); // 38 - (unicode pointer) + static private readonly NativeDBType D_Udt = new NativeDBType(0xff, -1, false, false, OleDbType.VarBinary, NativeDBType.UDT, S_BINARY, typeof(System.Byte[]), NativeDBType.BYTES, DbType.Binary); // 39 - (unicode pointer) + + static internal readonly NativeDBType Default = D_VarWChar; + static internal readonly Byte MaximumDecimalPrecision = D_Decimal.maxpre; + + private const int FixedDbPart = /*DBPART_VALUE*/0x1 | /*DBPART_STATUS*/0x4; + private const int VarblDbPart = /*DBPART_VALUE*/0x1 | /*DBPART_LENGTH*/0x2 | /*DBPART_STATUS*/0x4; + + internal readonly OleDbType enumOleDbType; // enum System.Data.OleDb.OleDbType + internal readonly DbType enumDbType; // enum System.Data.DbType + internal readonly short dbType; // OLE DB DBTYPE_ + internal readonly short wType; // OLE DB DBTYPE_ we ask OleDB Provider to bind as + internal readonly Type dataType; // CLR Type + + internal readonly int dbPart; // the DBPart w or w/out length + internal readonly bool isfixed; // IsFixedLength + internal readonly bool islong; // IsLongLength + internal readonly Byte maxpre; // maxium precision for numeric types // $CONSIDER - are we going to use this? + internal readonly int fixlen; // fixed length size in bytes (-1 for variable) + + internal readonly String dataSourceType; // ICommandWithParameters.SetParameterInfo standard type name + internal readonly StringMemHandle dbString; // ptr to native allocated memory for dataSourceType string + + private NativeDBType(Byte maxpre, int fixlen, bool isfixed, bool islong, OleDbType enumOleDbType, short dbType, string dbstring, Type dataType, short wType, DbType enumDbType) + { + this.enumOleDbType = enumOleDbType; + this.dbType = dbType; + this.dbPart = (-1 == fixlen) ? VarblDbPart : FixedDbPart; + this.isfixed = isfixed; + this.islong = islong; + this.maxpre = maxpre; + this.fixlen = fixlen; + this.wType = wType; + this.dataSourceType = dbstring; + this.dbString = new StringMemHandle(dbstring); + this.dataType = dataType; + this.enumDbType = enumDbType; + } + + internal bool IsVariableLength + { + get + { + return (-1 == fixlen); + } + } + +#if DEBUG + override public string ToString() + { + return enumOleDbType.ToString(); + } +#endif + + static internal NativeDBType FromDataType(OleDbType enumOleDbType) + { + switch (enumOleDbType) + { // @perfnote: Enum.IsDefined + case OleDbType.Empty: + return D_Empty; // 0 + case OleDbType.SmallInt: + return D_SmallInt; // 2 + case OleDbType.Integer: + return D_Integer; // 3 + case OleDbType.Single: + return D_Single; // 4 + case OleDbType.Double: + return D_Double; // 5 + case OleDbType.Currency: + return D_Currency; // 6 + case OleDbType.Date: + return D_Date; // 7 + case OleDbType.BSTR: + return D_BSTR; // 8 + case OleDbType.IDispatch: + return D_IDispatch; // 9 + case OleDbType.Error: + return D_Error; // 10 + case OleDbType.Boolean: + return D_Boolean; // 11 + case OleDbType.Variant: + return D_Variant; // 12 + case OleDbType.IUnknown: + return D_IUnknown; // 13 + case OleDbType.Decimal: + return D_Decimal; // 14 + case OleDbType.TinyInt: + return D_TinyInt; // 16 + case OleDbType.UnsignedTinyInt: + return D_UnsignedTinyInt; // 17 + case OleDbType.UnsignedSmallInt: + return D_UnsignedSmallInt; // 18 + case OleDbType.UnsignedInt: + return D_UnsignedInt; // 19 + case OleDbType.BigInt: + return D_BigInt; // 20 + case OleDbType.UnsignedBigInt: + return D_UnsignedBigInt; // 21 + case OleDbType.Filetime: + return D_Filetime; // 64 + case OleDbType.Guid: + return D_Guid; // 72 + case OleDbType.Binary: + return D_Binary; // 128 + case OleDbType.Char: + return D_Char; // 129 + case OleDbType.WChar: + return D_WChar; // 130 + case OleDbType.Numeric: + return D_Numeric; // 131 + case OleDbType.DBDate: + return D_DBDate; // 133 + case OleDbType.DBTime: + return D_DBTime; // 134 + case OleDbType.DBTimeStamp: + return D_DBTimeStamp; // 135 + case OleDbType.PropVariant: + return D_PropVariant; // 138 + case OleDbType.VarNumeric: + return D_VarNumeric; // 139 + case OleDbType.VarChar: + return D_VarChar; // 200 + case OleDbType.LongVarChar: + return D_LongVarChar; // 201 + case OleDbType.VarWChar: + return D_VarWChar; // 202: ORA-12704: character set mismatch + case OleDbType.LongVarWChar: + return D_LongVarWChar; // 203 + case OleDbType.VarBinary: + return D_VarBinary; // 204 + case OleDbType.LongVarBinary: + return D_LongVarBinary; // 205 + default: + throw ODB.InvalidOleDbType(enumOleDbType); + } + } + + static internal NativeDBType FromSystemType(object value) + { + IConvertible ic = (value as IConvertible); + if (null != ic) + { + switch (ic.GetTypeCode()) + { + case TypeCode.Empty: + return NativeDBType.D_Empty; + case TypeCode.Object: + return NativeDBType.D_Variant; + case TypeCode.DBNull: + throw ADP.InvalidDataType(TypeCode.DBNull); + case TypeCode.Boolean: + return NativeDBType.D_Boolean; + case TypeCode.Char: + return NativeDBType.D_Char; + case TypeCode.SByte: + return NativeDBType.D_TinyInt; + case TypeCode.Byte: + return NativeDBType.D_UnsignedTinyInt; + case TypeCode.Int16: + return NativeDBType.D_SmallInt; + case TypeCode.UInt16: + return NativeDBType.D_UnsignedSmallInt; + case TypeCode.Int32: + return NativeDBType.D_Integer; + case TypeCode.UInt32: + return NativeDBType.D_UnsignedInt; + case TypeCode.Int64: + return NativeDBType.D_BigInt; + case TypeCode.UInt64: + return NativeDBType.D_UnsignedBigInt; + case TypeCode.Single: + return NativeDBType.D_Single; + case TypeCode.Double: + return NativeDBType.D_Double; + case TypeCode.Decimal: + return NativeDBType.D_Decimal; + case TypeCode.DateTime: + return NativeDBType.D_DBTimeStamp; + case TypeCode.String: + return NativeDBType.D_VarWChar; + default: + throw ADP.UnknownDataTypeCode(value.GetType(), ic.GetTypeCode()); + } + } + else if (value is System.Byte[]) + { + return NativeDBType.D_VarBinary; + } + else if (value is System.Guid) + { + return NativeDBType.D_Guid; + } + else if (value is System.TimeSpan) + { + return NativeDBType.D_DBTime; + } + else + { + return NativeDBType.D_Variant; + } + //throw ADP.UnknownDataType(value.GetType()); + } + + static internal NativeDBType FromDbType(DbType dbType) + { + switch (dbType) + { + case DbType.AnsiString: + return D_VarChar; + case DbType.AnsiStringFixedLength: + return D_Char; + case DbType.Binary: + return D_VarBinary; + case DbType.Byte: + return D_UnsignedTinyInt; + case DbType.Boolean: + return D_Boolean; + case DbType.Currency: + return D_Currency; + case DbType.Date: + return D_DBDate; + case DbType.DateTime: + return D_DBTimeStamp; + case DbType.Decimal: + return D_Decimal; + case DbType.Double: + return D_Double; + case DbType.Guid: + return D_Guid; + case DbType.Int16: + return D_SmallInt; + case DbType.Int32: + return D_Integer; + case DbType.Int64: + return D_BigInt; + case DbType.Object: + return D_Variant; + case DbType.SByte: + return D_TinyInt; + case DbType.Single: + return D_Single; + case DbType.String: + return D_VarWChar; + case DbType.StringFixedLength: + return D_WChar; + case DbType.Time: + return D_DBTime; + case DbType.UInt16: + return D_UnsignedSmallInt; + case DbType.UInt32: + return D_UnsignedInt; + case DbType.UInt64: + return D_UnsignedBigInt; + case DbType.VarNumeric: + return D_VarNumeric; + case DbType.Xml: + return D_Xml; + default: + throw ADP.DbTypeNotSupported(dbType, typeof(OleDbType)); + } + } + + static internal NativeDBType FromDBType(short dbType, bool isLong, bool isFixed) + { + switch (dbType) + { + //case EMPTY: + //case NULL: + case I2: + return D_SmallInt; + case I4: + return D_Integer; + case R4: + return D_Single; + case R8: + return D_Double; + case CY: + return D_Currency; + case DATE: + return D_Date; + case BSTR: + return D_BSTR; + case IDISPATCH: + return D_IDispatch; + case ERROR: + return D_Error; + case BOOL: + return D_Boolean; + case VARIANT: + return D_Variant; + case IUNKNOWN: + return D_IUnknown; + case DECIMAL: + return D_Decimal; + case I1: + return D_TinyInt; + case UI1: + return D_UnsignedTinyInt; + case UI2: + return D_UnsignedSmallInt; + case UI4: + return D_UnsignedInt; + case I8: + return D_BigInt; + case UI8: + return D_UnsignedBigInt; + case FILETIME: + return D_Filetime; + case GUID: + return D_Guid; + case BYTES: + return (isLong) ? D_LongVarBinary : (isFixed) ? D_Binary : D_VarBinary; + case STR: + return (isLong) ? D_LongVarChar : (isFixed) ? D_Char : D_VarChar; + case WSTR: + return (isLong) ? D_LongVarWChar : (isFixed) ? D_WChar : D_VarWChar; + case NUMERIC: + return D_Numeric; + //case UDT: + case DBDATE: + return D_DBDate; + case DBTIME: + return D_DBTime; + case DBTIMESTAMP: + return D_DBTimeStamp; + case HCHAPTER: + return D_Chapter; + case PROPVARIANT: + return D_PropVariant; + case VARNUMERIC: + return D_VarNumeric; + case XML: + return D_Xml; + case UDT: + return D_Udt; + //case VECTOR: + //case ARRAY: + //case BYREF: + //case RESERVED: + default: + if (0 != (NativeDBType.VECTOR & dbType)) + { + throw ODB.DBBindingGetVector(); + } + return D_Variant; + } + } + } +} diff --git a/src/System.Data.OleDb/src/OleDb_Util.cs b/src/System.Data.OleDb/src/OleDb_Util.cs new file mode 100644 index 000000000000..fcb80d5fc614 --- /dev/null +++ b/src/System.Data.OleDb/src/OleDb_Util.cs @@ -0,0 +1,796 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Collections; +using System.Data.Common; +using System.Diagnostics; +using System.Globalization; +using System.Runtime.InteropServices; +using System.Text; + +namespace System.Data.OleDb +{ + internal static class ODB + { + // OleDbCommand + static internal void CommandParameterStatus(StringBuilder builder, int index, DBStatus status) + { + switch (status) + { + case DBStatus.S_OK: + case DBStatus.S_ISNULL: + case DBStatus.S_IGNORE: + break; + + case DBStatus.E_BADACCESSOR: + builder.Append(SR.Format(SR.OleDb_CommandParameterBadAccessor, index.ToString(CultureInfo.InvariantCulture), "")); + builder.Append(Environment.NewLine); + break; + + case DBStatus.E_CANTCONVERTVALUE: + builder.Append(SR.Format(SR.OleDb_CommandParameterCantConvertValue, index.ToString(CultureInfo.InvariantCulture), "")); + builder.Append(Environment.NewLine); + break; + + case DBStatus.E_SIGNMISMATCH: + builder.Append(SR.Format(SR.OleDb_CommandParameterSignMismatch, index.ToString(CultureInfo.InvariantCulture), "")); + builder.Append(Environment.NewLine); + break; + + case DBStatus.E_DATAOVERFLOW: + builder.Append(SR.Format(SR.OleDb_CommandParameterDataOverflow, index.ToString(CultureInfo.InvariantCulture), "")); + builder.Append(Environment.NewLine); + break; + + case DBStatus.E_CANTCREATE: + Debug.Assert(false, "CommandParameterStatus: unexpected E_CANTCREATE"); + goto default; + + case DBStatus.E_UNAVAILABLE: + builder.Append(SR.Format(SR.OleDb_CommandParameterUnavailable, index.ToString(CultureInfo.InvariantCulture), "")); + builder.Append(Environment.NewLine); + break; + + case DBStatus.E_PERMISSIONDENIED: + Debug.Assert(false, "CommandParameterStatus: unexpected E_PERMISSIONDENIED"); + goto default; + + case DBStatus.E_INTEGRITYVIOLATION: + Debug.Assert(false, "CommandParameterStatus: unexpected E_INTEGRITYVIOLATION"); + goto default; + + case DBStatus.E_SCHEMAVIOLATION: + Debug.Assert(false, "CommandParameterStatus: unexpected E_SCHEMAVIOLATION"); + goto default; + + case DBStatus.E_BADSTATUS: + Debug.Assert(false, "CommandParameterStatus: unexpected E_BADSTATUS"); + goto default; + + case DBStatus.S_DEFAULT: + builder.Append(SR.Format(SR.OleDb_CommandParameterDefault, index.ToString(CultureInfo.InvariantCulture), "")); + builder.Append(Environment.NewLine); + break; + + default: + builder.Append(SR.Format(SR.OleDb_CommandParameterError, index.ToString(CultureInfo.InvariantCulture), status.ToString())); + builder.Append(Environment.NewLine); + break; + } + } + static internal Exception CommandParameterStatus(string value, Exception inner) + { + if (ADP.IsEmpty(value)) + { return inner; } + return ADP.InvalidOperation(value, inner); + } + static internal Exception UninitializedParameters(int index, OleDbType dbtype) + { + return ADP.InvalidOperation(SR.Format(SR.OleDb_UninitializedParameters, index.ToString(CultureInfo.InvariantCulture), dbtype.ToString())); + } + static internal Exception BadStatus_ParamAcc(int index, DBBindStatus status) + { + return ADP.DataAdapter(SR.Format(SR.OleDb_BadStatus_ParamAcc, index.ToString(CultureInfo.InvariantCulture), status.ToString())); + } + static internal Exception NoProviderSupportForParameters(string provider, Exception inner) + { + return ADP.DataAdapter(SR.Format(SR.OleDb_NoProviderSupportForParameters, provider), inner); + } + static internal Exception NoProviderSupportForSProcResetParameters(string provider) + { + return ADP.DataAdapter(SR.Format(SR.OleDb_NoProviderSupportForSProcResetParameters, provider)); + } + + // OleDbProperties + static internal void PropsetSetFailure(StringBuilder builder, string description, OleDbPropertyStatus status) + { + if (OleDbPropertyStatus.Ok == status) + { + return; + } + switch (status) + { + case OleDbPropertyStatus.NotSupported: + if (0 < builder.Length) + { builder.Append(Environment.NewLine); } + builder.Append(SR.Format(SR.OleDb_PropertyNotSupported, description)); + break; + case OleDbPropertyStatus.BadValue: + if (0 < builder.Length) + { builder.Append(Environment.NewLine); } + builder.Append(SR.Format(SR.OleDb_PropertyBadValue, description)); + break; + case OleDbPropertyStatus.BadOption: + if (0 < builder.Length) + { builder.Append(Environment.NewLine); } + builder.Append(SR.Format(SR.OleDb_PropertyBadOption, description)); + break; + case OleDbPropertyStatus.BadColumn: + if (0 < builder.Length) + { builder.Append(Environment.NewLine); } + builder.Append(SR.Format(SR.OleDb_PropertyBadColumn, description)); + break; + case OleDbPropertyStatus.NotAllSettable: + if (0 < builder.Length) + { builder.Append(Environment.NewLine); } + builder.Append(SR.Format(SR.OleDb_PropertyNotAllSettable, description)); + break; + case OleDbPropertyStatus.NotSettable: + if (0 < builder.Length) + { builder.Append(Environment.NewLine); } + builder.Append(SR.Format(SR.OleDb_PropertyNotSettable, description)); + break; + case OleDbPropertyStatus.NotSet: + if (0 < builder.Length) + { builder.Append(Environment.NewLine); } + builder.Append(SR.Format(SR.OleDb_PropertyNotSet, description)); + break; + case OleDbPropertyStatus.Conflicting: + if (0 < builder.Length) + { builder.Append(Environment.NewLine); } + builder.Append(SR.Format(SR.OleDb_PropertyConflicting, description)); + break; + case OleDbPropertyStatus.NotAvailable: + if (0 < builder.Length) + { builder.Append(Environment.NewLine); } + builder.Append(SR.Format(SR.OleDb_PropertyNotAvailable, description)); + break; + default: + if (0 < builder.Length) + { builder.Append(Environment.NewLine); } + builder.Append(SR.Format(SR.OleDb_PropertyStatusUnknown, ((int)status).ToString(CultureInfo.InvariantCulture))); + break; + } + } + static internal Exception PropsetSetFailure(string value, Exception inner) + { + if (ADP.IsEmpty(value)) + { return inner; } + return ADP.InvalidOperation(value, inner); + } + + // OleDbConnection + static internal ArgumentException SchemaRowsetsNotSupported(string provider) + { + return ADP.Argument(SR.Format(SR.OleDb_SchemaRowsetsNotSupported, "IDBSchemaRowset", provider)); + } + static internal OleDbException NoErrorInformation(string provider, OleDbHResult hr, Exception inner) + { + OleDbException e; + if (!ADP.IsEmpty(provider)) + { + e = new OleDbException(SR.Format(SR.OleDb_NoErrorInformation2, provider, ODB.ELookup(hr)), hr, inner); + } + else + { + e = new OleDbException(SR.Format(SR.OleDb_NoErrorInformation, ODB.ELookup(hr)), hr, inner); + } + ADP.TraceExceptionAsReturnValue(e); + return e; + } + static internal InvalidOperationException MDACNotAvailable(Exception inner) + { + return ADP.DataAdapter(SR.Format(SR.OleDb_MDACNotAvailable), inner); + } + static internal ArgumentException MSDASQLNotSupported() + { + return ADP.Argument(SR.Format(SR.OleDb_MSDASQLNotSupported)); + } + static internal InvalidOperationException CommandTextNotSupported(string provider, Exception inner) + { + return ADP.DataAdapter(SR.Format(SR.OleDb_CommandTextNotSupported, provider), inner); + } + static internal InvalidOperationException PossiblePromptNotUserInteractive() + { + return ADP.DataAdapter(SR.Format(SR.OleDb_PossiblePromptNotUserInteractive)); + } + static internal InvalidOperationException ProviderUnavailable(string provider, Exception inner) + { + //return new OleDbException(SR.Format(SR.OleDb_ProviderUnavailable, provider), (int)OleDbHResult.CO_E_CLASSSTRING, inner); + return ADP.DataAdapter(SR.Format(SR.OleDb_ProviderUnavailable, provider), inner); + } + static internal InvalidOperationException TransactionsNotSupported(string provider, Exception inner) + { + return ADP.DataAdapter(SR.Format(SR.OleDb_TransactionsNotSupported, provider), inner); + } + static internal ArgumentException AsynchronousNotSupported() + { + return ADP.Argument(SR.Format(SR.OleDb_AsynchronousNotSupported)); + } + static internal ArgumentException NoProviderSpecified() + { + return ADP.Argument(SR.Format(SR.OleDb_NoProviderSpecified)); + } + static internal ArgumentException InvalidProviderSpecified() + { + return ADP.Argument(SR.Format(SR.OleDb_InvalidProviderSpecified)); + } + static internal ArgumentException InvalidRestrictionsDbInfoKeywords(string parameter) + { + return ADP.Argument(SR.Format(SR.OleDb_InvalidRestrictionsDbInfoKeywords), parameter); + } + static internal ArgumentException InvalidRestrictionsDbInfoLiteral(string parameter) + { + return ADP.Argument(SR.Format(SR.OleDb_InvalidRestrictionsDbInfoLiteral), parameter); + } + static internal ArgumentException InvalidRestrictionsSchemaGuids(string parameter) + { + return ADP.Argument(SR.Format(SR.OleDb_InvalidRestrictionsSchemaGuids), parameter); + } + static internal ArgumentException NotSupportedSchemaTable(Guid schema, OleDbConnection connection) + { + return ADP.Argument(SR.Format(SR.OleDb_NotSupportedSchemaTable, OleDbSchemaGuid.GetTextFromValue(schema), connection.Provider)); + } + + // OleDbParameter + static internal Exception InvalidOleDbType(OleDbType value) + { + return ADP.InvalidEnumerationValue(typeof(OleDbType), (int)value); + } + + // Getting Data + static internal InvalidOperationException BadAccessor() + { + return ADP.DataAdapter(SR.Format(SR.OleDb_BadAccessor)); + } + static internal InvalidCastException ConversionRequired() + { + return ADP.InvalidCast(); + } + static internal InvalidCastException CantConvertValue() + { + return ADP.InvalidCast(SR.Format(SR.OleDb_CantConvertValue)); + } + static internal InvalidOperationException SignMismatch(Type type) + { + return ADP.DataAdapter(SR.Format(SR.OleDb_SignMismatch, type.Name)); + } + static internal InvalidOperationException DataOverflow(Type type) + { + return ADP.DataAdapter(SR.Format(SR.OleDb_DataOverflow, type.Name)); + } + static internal InvalidOperationException CantCreate(Type type) + { + return ADP.DataAdapter(SR.Format(SR.OleDb_CantCreate, type.Name)); + } + static internal InvalidOperationException Unavailable(Type type) + { + return ADP.DataAdapter(SR.Format(SR.OleDb_Unavailable, type.Name)); + } + static internal InvalidOperationException UnexpectedStatusValue(DBStatus status) + { + return ADP.DataAdapter(SR.Format(SR.OleDb_UnexpectedStatusValue, status.ToString())); + } + static internal InvalidOperationException GVtUnknown(int wType) + { + return ADP.DataAdapter(SR.Format(SR.OleDb_GVtUnknown, wType.ToString("X4", CultureInfo.InvariantCulture), wType.ToString(CultureInfo.InvariantCulture))); + } + static internal InvalidOperationException SVtUnknown(int wType) + { + return ADP.DataAdapter(SR.Format(SR.OleDb_SVtUnknown, wType.ToString("X4", CultureInfo.InvariantCulture), wType.ToString(CultureInfo.InvariantCulture))); + } + + // OleDbDataReader + static internal InvalidOperationException BadStatusRowAccessor(int i, DBBindStatus rowStatus) + { + return ADP.DataAdapter(SR.Format(SR.OleDb_BadStatusRowAccessor, i.ToString(CultureInfo.InvariantCulture), rowStatus.ToString())); + } + static internal InvalidOperationException ThreadApartmentState(Exception innerException) + { + return ADP.InvalidOperation(SR.Format(SR.OleDb_ThreadApartmentState), innerException); + } + + // OleDbDataAdapter + static internal ArgumentException Fill_NotADODB(string parameter) + { + return ADP.Argument(SR.Format(SR.OleDb_Fill_NotADODB), parameter); + } + static internal ArgumentException Fill_EmptyRecordSet(string parameter, Exception innerException) + { + return ADP.Argument(SR.Format(SR.OleDb_Fill_EmptyRecordSet, "IRowset"), parameter, innerException); + } + static internal ArgumentException Fill_EmptyRecord(string parameter, Exception innerException) + { + return ADP.Argument(SR.Format(SR.OleDb_Fill_EmptyRecord), parameter, innerException); + } + + static internal string NoErrorMessage(OleDbHResult errorcode) + { + return SR.Format(SR.OleDb_NoErrorMessage, ODB.ELookup(errorcode)); + } + static internal string FailedGetDescription(OleDbHResult errorcode) + { + return SR.Format(SR.OleDb_FailedGetDescription, ODB.ELookup(errorcode)); + } + static internal string FailedGetSource(OleDbHResult errorcode) + { + return SR.Format(SR.OleDb_FailedGetSource, ODB.ELookup(errorcode)); + } + + static internal InvalidOperationException DBBindingGetVector() + { + return ADP.InvalidOperation(SR.Format(SR.OleDb_DBBindingGetVector)); + } + + static internal OleDbHResult GetErrorDescription(UnsafeNativeMethods.IErrorInfo errorInfo, OleDbHResult hresult, out string message) + { + OleDbHResult hr = errorInfo.GetDescription(out message); + if (((int)hr < 0) && ADP.IsEmpty(message)) + { + message = FailedGetDescription(hr) + Environment.NewLine + ODB.ELookup(hresult); + } + if (ADP.IsEmpty(message)) + { + message = ODB.ELookup(hresult); + } + return hr; + } + + // OleDbEnumerator + internal static ArgumentException ISourcesRowsetNotSupported() + { + throw ADP.Argument(SR.OleDb_ISourcesRowsetNotSupported); + } + + // OleDbMetaDataFactory + static internal InvalidOperationException IDBInfoNotSupported() + { + return ADP.InvalidOperation(SR.Format(SR.OleDb_IDBInfoNotSupported)); + } + + // explictly used error codes + internal const int ADODB_AlreadyClosedError = unchecked((int)0x800A0E78); + internal const int ADODB_NextResultError = unchecked((int)0x800A0CB3); + + // internal command states + internal const int InternalStateExecuting = (int)(ConnectionState.Open | ConnectionState.Executing); + internal const int InternalStateFetching = (int)(ConnectionState.Open | ConnectionState.Fetching); + internal const int InternalStateClosed = (int)(ConnectionState.Closed); + + internal const int ExecutedIMultipleResults = 0; + internal const int ExecutedIRowset = 1; + internal const int ExecutedIRow = 2; + internal const int PrepareICommandText = 3; + + // internal connection states, a superset of the command states + internal const int InternalStateExecutingNot = (int)~(ConnectionState.Executing); + internal const int InternalStateFetchingNot = (int)~(ConnectionState.Fetching); + internal const int InternalStateConnecting = (int)(ConnectionState.Connecting); + internal const int InternalStateOpen = (int)(ConnectionState.Open); + + // constants used to trigger from binding as WSTR to BYREF|WSTR + // used by OleDbCommand, OleDbDataReader + internal const int LargeDataSize = (1 << 13); // 8K + internal const int CacheIncrement = 10; + + // constants used by OleDbDataReader + internal static readonly IntPtr DBRESULTFLAG_DEFAULT = IntPtr.Zero; + + internal const short VARIANT_TRUE = -1; + internal const short VARIANT_FALSE = 0; + + // OleDbConnection constants + internal const int CLSCTX_ALL = /*CLSCTX_INPROC_SERVER*/1 | /*CLSCTX_INPROC_HANDLER*/2 | /*CLSCTX_LOCAL_SERVER*/4 | /*CLSCTX_REMOTE_SERVER*/16; + internal const int MaxProgIdLength = 255; + + internal const int DBLITERAL_CATALOG_SEPARATOR = 3; + internal const int DBLITERAL_QUOTE_PREFIX = 15; + internal const int DBLITERAL_QUOTE_SUFFIX = 28; + internal const int DBLITERAL_SCHEMA_SEPARATOR = 27; + internal const int DBLITERAL_TABLE_NAME = 17; + internal const int DBPROP_ACCESSORDER = 0xe7; + + internal const int DBPROP_AUTH_CACHE_AUTHINFO = 0x5; + internal const int DBPROP_AUTH_ENCRYPT_PASSWORD = 0x6; + internal const int DBPROP_AUTH_INTEGRATED = 0x7; + internal const int DBPROP_AUTH_MASK_PASSWORD = 0x8; + internal const int DBPROP_AUTH_PASSWORD = 0x9; + internal const int DBPROP_AUTH_PERSIST_ENCRYPTED = 0xa; + internal const int DBPROP_AUTH_PERSIST_SENSITIVE_AUTHINFO = 0xb; + internal const int DBPROP_AUTH_USERID = 0xc; + + internal const int DBPROP_CATALOGLOCATION = 0x16; + internal const int DBPROP_COMMANDTIMEOUT = 0x22; + internal const int DBPROP_CONNECTIONSTATUS = 0xf4; + internal const int DBPROP_CURRENTCATALOG = 0x25; + internal const int DBPROP_DATASOURCENAME = 0x26; + internal const int DBPROP_DBMSNAME = 0x28; + internal const int DBPROP_DBMSVER = 0x29; + internal const int DBPROP_GROUPBY = 0x2c; + internal const int DBPROP_HIDDENCOLUMNS = 0x102; + internal const int DBPROP_IColumnsRowset = 0x7b; + internal const int DBPROP_IDENTIFIERCASE = 0x2e; + + internal const int DBPROP_INIT_ASYNCH = 0xc8; + internal const int DBPROP_INIT_BINDFLAGS = 0x10e; + internal const int DBPROP_INIT_CATALOG = 0xe9; + internal const int DBPROP_INIT_DATASOURCE = 0x3b; + internal const int DBPROP_INIT_GENERALTIMEOUT = 0x11c; + internal const int DBPROP_INIT_HWND = 0x3c; + internal const int DBPROP_INIT_IMPERSONATION_LEVEL = 0x3d; + internal const int DBPROP_INIT_LCID = 0xba; + internal const int DBPROP_INIT_LOCATION = 0x3e; + internal const int DBPROP_INIT_LOCKOWNER = 0x10f; + internal const int DBPROP_INIT_MODE = 0x3f; + internal const int DBPROP_INIT_OLEDBSERVICES = 0xf8; + internal const int DBPROP_INIT_PROMPT = 0x40; + internal const int DBPROP_INIT_PROTECTION_LEVEL = 0x41; + internal const int DBPROP_INIT_PROVIDERSTRING = 0xa0; + internal const int DBPROP_INIT_TIMEOUT = 0x42; + + internal const int DBPROP_IRow = 0x107; + internal const int DBPROP_MAXROWS = 0x49; + internal const int DBPROP_MULTIPLERESULTS = 0xc4; + internal const int DBPROP_ORDERBYCOLUNSINSELECT = 0x55; + internal const int DBPROP_PROVIDERFILENAME = 0x60; + internal const int DBPROP_QUOTEDIDENTIFIERCASE = 0x64; + internal const int DBPROP_RESETDATASOURCE = 0xf7; + internal const int DBPROP_SQLSUPPORT = 0x6d; + internal const int DBPROP_UNIQUEROWS = 0xee; + + // property status + internal const int DBPROPSTATUS_OK = 0; + internal const int DBPROPSTATUS_NOTSUPPORTED = 1; + internal const int DBPROPSTATUS_BADVALUE = 2; + internal const int DBPROPSTATUS_BADOPTION = 3; + internal const int DBPROPSTATUS_BADCOLUMN = 4; + internal const int DBPROPSTATUS_NOTALLSETTABLE = 5; + internal const int DBPROPSTATUS_NOTSETTABLE = 6; + internal const int DBPROPSTATUS_NOTSET = 7; + internal const int DBPROPSTATUS_CONFLICTING = 8; + internal const int DBPROPSTATUS_NOTAVAILABLE = 9; + + internal const int DBPROPOPTIONS_REQUIRED = 0; + internal const int DBPROPOPTIONS_OPTIONAL = 1; + + internal const int DBPROPFLAGS_WRITE = 0x400; + internal const int DBPROPFLAGS_SESSION = 0x1000; + + // misc. property values + internal const int DBPROPVAL_AO_RANDOM = 2; + + internal const int DBPROPVAL_CL_END = 2; + internal const int DBPROPVAL_CL_START = 1; + + internal const int DBPROPVAL_CS_COMMUNICATIONFAILURE = 2; + internal const int DBPROPVAL_CS_INITIALIZED = 1; + internal const int DBPROPVAL_CS_UNINITIALIZED = 0; + + internal const int DBPROPVAL_GB_COLLATE = 16; + internal const int DBPROPVAL_GB_CONTAINS_SELECT = 4; + internal const int DBPROPVAL_GB_EQUALS_SELECT = 2; + internal const int DBPROPVAL_GB_NO_RELATION = 8; + internal const int DBPROPVAL_GB_NOT_SUPPORTED = 1; + + internal const int DBPROPVAL_IC_LOWER = 2; + internal const int DBPROPVAL_IC_MIXED = 8; + internal const int DBPROPVAL_IC_SENSITIVE = 4; + internal const int DBPROPVAL_IC_UPPER = 1; + + internal const int DBPROPVAL_IN_ALLOWNULL = 0x00000000; + /*internal const int DBPROPVAL_IN_DISALLOWNULL = 0x00000001; + internal const int DBPROPVAL_IN_IGNORENULL = 0x00000002; + internal const int DBPROPVAL_IN_IGNOREANYNULL = 0x00000004;*/ + internal const int DBPROPVAL_MR_NOTSUPPORTED = 0; + + internal const int DBPROPVAL_RD_RESETALL = unchecked((int)0xffffffff); + + internal const int DBPROPVAL_OS_RESOURCEPOOLING = 0x00000001; + internal const int DBPROPVAL_OS_TXNENLISTMENT = 0x00000002; + internal const int DBPROPVAL_OS_CLIENTCURSOR = 0x00000004; + internal const int DBPROPVAL_OS_AGR_AFTERSESSION = 0x00000008; + internal const int DBPROPVAL_SQL_ODBC_MINIMUM = 1; + internal const int DBPROPVAL_SQL_ESCAPECLAUSES = 0x00000100; + + // OLE DB providers never return pGuid-style bindings. + // They are provided as a convenient shortcut for consumers supplying bindings all covered by the same GUID (for example, when creating bindings to access data). + internal const int DBKIND_GUID_NAME = 0; + internal const int DBKIND_GUID_PROPID = 1; + internal const int DBKIND_NAME = 2; + internal const int DBKIND_PGUID_NAME = 3; + internal const int DBKIND_PGUID_PROPID = 4; + internal const int DBKIND_PROPID = 5; + internal const int DBKIND_GUID = 6; + + internal const int DBCOLUMNFLAGS_ISBOOKMARK = 0x01; + internal const int DBCOLUMNFLAGS_ISLONG = 0x80; + internal const int DBCOLUMNFLAGS_ISFIXEDLENGTH = 0x10; + internal const int DBCOLUMNFLAGS_ISNULLABLE = 0x20; + internal const int DBCOLUMNFLAGS_ISROWSET = 0x100000; + internal const int DBCOLUMNFLAGS_ISROW = 0x200000; + internal const int DBCOLUMNFLAGS_ISROWSET_DBCOLUMNFLAGS_ISROW = /*DBCOLUMNFLAGS_ISROWSET*/0x100000 | /*DBCOLUMNFLAGS_ISROW*/0x200000; + internal const int DBCOLUMNFLAGS_ISLONG_DBCOLUMNFLAGS_ISSTREAM = /*DBCOLUMNFLAGS_ISLONG*/0x80 | /*DBCOLUMNFLAGS_ISSTREAM*/0x80000; + internal const int DBCOLUMNFLAGS_ISROWID_DBCOLUMNFLAGS_ISROWVER = /*DBCOLUMNFLAGS_ISROWID*/0x100 | /*DBCOLUMNFLAGS_ISROWVER*/0x200; + internal const int DBCOLUMNFLAGS_WRITE_DBCOLUMNFLAGS_WRITEUNKNOWN = /*DBCOLUMNFLAGS_WRITE*/0x4 | /*DBCOLUMNFLAGS_WRITEUNKNOWN*/0x8; + internal const int DBCOLUMNFLAGS_ISNULLABLE_DBCOLUMNFLAGS_MAYBENULL = /*DBCOLUMNFLAGS_ISNULLABLE*/0x20 | /*DBCOLUMNFLAGS_MAYBENULL*/0x40; + + // accessor constants + internal const int DBACCESSOR_ROWDATA = 0x2; + internal const int DBACCESSOR_PARAMETERDATA = 0x4; + + // commandbuilder constants + internal const int DBPARAMTYPE_INPUT = 0x01; + internal const int DBPARAMTYPE_INPUTOUTPUT = 0x02; + internal const int DBPARAMTYPE_OUTPUT = 0x03; + internal const int DBPARAMTYPE_RETURNVALUE = 0x04; + + // parameter constants + /*internal const int DBPARAMIO_NOTPARAM = 0; + internal const int DBPARAMIO_INPUT = 0x1; + internal const int DBPARAMIO_OUTPUT = 0x2;*/ + + /*internal const int DBPARAMFLAGS_ISINPUT = 0x1; + internal const int DBPARAMFLAGS_ISOUTPUT = 0x2; + internal const int DBPARAMFLAGS_ISSIGNED = 0x10; + internal const int DBPARAMFLAGS_ISNULLABLE = 0x40; + internal const int DBPARAMFLAGS_ISLONG = 0x80;*/ + + internal const int ParameterDirectionFlag = 3; + + // values of the searchable column in the provider types schema rowset + internal const uint DB_UNSEARCHABLE = 1; + internal const uint DB_LIKE_ONLY = 2; + internal const uint DB_ALL_EXCEPT_LIKE = 3; + internal const uint DB_SEARCHABLE = 4; + + static internal readonly IntPtr DB_INVALID_HACCESSOR = ADP.PtrZero; + static internal readonly IntPtr DB_NULL_HCHAPTER = ADP.PtrZero; + static internal readonly IntPtr DB_NULL_HROW = ADP.PtrZero; + + /*static internal readonly int SizeOf_tagDBPARAMINFO = Marshal.SizeOf(typeof(tagDBPARAMINFO));*/ + static internal readonly int SizeOf_tagDBBINDING = Marshal.SizeOf(typeof(tagDBBINDING)); + static internal readonly int SizeOf_tagDBCOLUMNINFO = Marshal.SizeOf(typeof(tagDBCOLUMNINFO)); + static internal readonly int SizeOf_tagDBLITERALINFO = Marshal.SizeOf(typeof(tagDBLITERALINFO)); + static internal readonly int SizeOf_tagDBPROPSET = Marshal.SizeOf(typeof(tagDBPROPSET)); + static internal readonly int SizeOf_tagDBPROP = Marshal.SizeOf(typeof(tagDBPROP)); + static internal readonly int SizeOf_tagDBPROPINFOSET = Marshal.SizeOf(typeof(tagDBPROPINFOSET)); + static internal readonly int SizeOf_tagDBPROPINFO = Marshal.SizeOf(typeof(tagDBPROPINFO)); + static internal readonly int SizeOf_tagDBPROPIDSET = Marshal.SizeOf(typeof(tagDBPROPIDSET)); + static internal readonly int SizeOf_Guid = Marshal.SizeOf(typeof(Guid)); + static internal readonly int SizeOf_Variant = 8 + (2 * ADP.PtrSize); // 16 on 32bit, 24 on 64bit + + static internal readonly int OffsetOf_tagDBPROP_Status = Marshal.OffsetOf(typeof(tagDBPROP), "dwStatus").ToInt32(); + static internal readonly int OffsetOf_tagDBPROP_Value = Marshal.OffsetOf(typeof(tagDBPROP), "vValue").ToInt32(); + static internal readonly int OffsetOf_tagDBPROPSET_Properties = Marshal.OffsetOf(typeof(tagDBPROPSET), "rgProperties").ToInt32(); + static internal readonly int OffsetOf_tagDBPROPINFO_Value = Marshal.OffsetOf(typeof(tagDBPROPINFO), "vValue").ToInt32(); + static internal readonly int OffsetOf_tagDBPROPIDSET_PropertySet = Marshal.OffsetOf(typeof(tagDBPROPIDSET), "guidPropertySet").ToInt32(); + static internal readonly int OffsetOf_tagDBLITERALINFO_it = Marshal.OffsetOf(typeof(tagDBLITERALINFO), "it").ToInt32(); + static internal readonly int OffsetOf_tagDBBINDING_obValue = Marshal.OffsetOf(typeof(tagDBBINDING), "obValue").ToInt32(); + static internal readonly int OffsetOf_tagDBBINDING_wType = Marshal.OffsetOf(typeof(tagDBBINDING), "wType").ToInt32(); + + static internal Guid IID_NULL = Guid.Empty; + static internal Guid IID_IUnknown = new Guid(0x00000000, 0x0000, 0x0000, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46); + static internal Guid IID_IDBInitialize = new Guid(0x0C733A8B, 0x2A1C, 0x11CE, 0xAD, 0xE5, 0x00, 0xAA, 0x00, 0x44, 0x77, 0x3D); + static internal Guid IID_IDBCreateSession = new Guid(0x0C733A5D, 0x2A1C, 0x11CE, 0xAD, 0xE5, 0x00, 0xAA, 0x00, 0x44, 0x77, 0x3D); + static internal Guid IID_IDBCreateCommand = new Guid(0x0C733A1D, 0x2A1C, 0x11CE, 0xAD, 0xE5, 0x00, 0xAA, 0x00, 0x44, 0x77, 0x3D); + static internal Guid IID_ICommandText = new Guid(0x0C733A27, 0x2A1C, 0x11CE, 0xAD, 0xE5, 0x00, 0xAA, 0x00, 0x44, 0x77, 0x3D); + static internal Guid IID_IMultipleResults = new Guid(0x0C733A90, 0x2A1C, 0x11CE, 0xAD, 0xE5, 0x00, 0xAA, 0x00, 0x44, 0x77, 0x3D); + static internal Guid IID_IRow = new Guid(0x0C733AB4, 0x2A1C, 0x11CE, 0xAD, 0xE5, 0x00, 0xAA, 0x00, 0x44, 0x77, 0x3D); + static internal Guid IID_IRowset = new Guid(0x0C733A7C, 0x2A1C, 0x11CE, 0xAD, 0xE5, 0x00, 0xAA, 0x00, 0x44, 0x77, 0x3D); + static internal Guid IID_ISQLErrorInfo = new Guid(0x0C733A74, 0x2A1C, 0x11CE, 0xAD, 0xE5, 0x00, 0xAA, 0x00, 0x44, 0x77, 0x3D); + + static internal Guid CLSID_DataLinks = new Guid(0x2206CDB2, 0x19C1, 0x11D1, 0x89, 0xE0, 0x00, 0xC0, 0x4F, 0xD7, 0xA8, 0x29); + + static internal Guid DBGUID_DEFAULT = new Guid(0xc8b521fb, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d); + static internal Guid DBGUID_ROWSET = new Guid(0xc8b522f6, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d); + static internal Guid DBGUID_ROW = new Guid(0xc8b522f7, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d); + + static internal Guid DBGUID_ROWDEFAULTSTREAM = new Guid(0x0C733AB7, 0x2A1C, 0x11CE, 0xAD, 0xE5, 0x00, 0xAA, 0x00, 0x44, 0x77, 0x3D); + + static internal readonly Guid CLSID_MSDASQL = new Guid(0xc8b522cb, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d); + + static internal readonly object DBCOL_SPECIALCOL = new Guid(0xc8b52232, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d); + + static internal readonly char[] ErrorTrimCharacters = new char[] { '\r', '\n', '\0' }; + + // used by ConnectionString hashtable, must be all lowercase + internal const string Asynchronous_Processing = "asynchronous processing"; + internal const string AttachDBFileName = "attachdbfilename"; + internal const string Connect_Timeout = "connect timeout"; + internal const string Data_Source = "data source"; + internal const string File_Name = "file name"; + internal const string Initial_Catalog = "initial catalog"; + internal const string Password = "password"; + internal const string Persist_Security_Info = "persist security info"; + internal const string Provider = "provider"; + internal const string Pwd = "pwd"; + internal const string User_ID = "user id"; + + // used by OleDbConnection as property names + internal const string Current_Catalog = "current catalog"; + internal const string DBMS_Version = "dbms version"; + internal const string Properties = "Properties"; + + // used by OleDbConnection to create and verify OLE DB Services + internal const string DataLinks_CLSID = "CLSID\\{2206CDB2-19C1-11D1-89E0-00C04FD7A829}\\InprocServer32"; + internal const string OLEDB_SERVICES = "OLEDB_SERVICES"; + + // used by OleDbConnection to eliminate post-open detection of 'Microsoft OLE DB Provider for ODBC Drivers' + internal const string DefaultDescription_MSDASQL = "microsoft ole db provider for odbc drivers"; + internal const string MSDASQL = "msdasql"; + internal const string MSDASQLdot = "msdasql."; + + // used by OleDbPermission + internal const string _Add = "add"; + internal const string _Keyword = "keyword"; + internal const string _Name = "name"; + internal const string _Value = "value"; + + // IColumnsRowset column names + internal const string DBCOLUMN_BASECATALOGNAME = "DBCOLUMN_BASECATALOGNAME"; + internal const string DBCOLUMN_BASECOLUMNNAME = "DBCOLUMN_BASECOLUMNNAME"; + internal const string DBCOLUMN_BASESCHEMANAME = "DBCOLUMN_BASESCHEMANAME"; + internal const string DBCOLUMN_BASETABLENAME = "DBCOLUMN_BASETABLENAME"; + internal const string DBCOLUMN_COLUMNSIZE = "DBCOLUMN_COLUMNSIZE"; + internal const string DBCOLUMN_FLAGS = "DBCOLUMN_FLAGS"; + internal const string DBCOLUMN_GUID = "DBCOLUMN_GUID"; + internal const string DBCOLUMN_IDNAME = "DBCOLUMN_IDNAME"; + internal const string DBCOLUMN_ISAUTOINCREMENT = "DBCOLUMN_ISAUTOINCREMENT"; + internal const string DBCOLUMN_ISUNIQUE = "DBCOLUMN_ISUNIQUE"; + internal const string DBCOLUMN_KEYCOLUMN = "DBCOLUMN_KEYCOLUMN"; + internal const string DBCOLUMN_NAME = "DBCOLUMN_NAME"; + internal const string DBCOLUMN_NUMBER = "DBCOLUMN_NUMBER"; + internal const string DBCOLUMN_PRECISION = "DBCOLUMN_PRECISION"; + internal const string DBCOLUMN_PROPID = "DBCOLUMN_PROPID"; + internal const string DBCOLUMN_SCALE = "DBCOLUMN_SCALE"; + internal const string DBCOLUMN_TYPE = "DBCOLUMN_TYPE"; + internal const string DBCOLUMN_TYPEINFO = "DBCOLUMN_TYPEINFO"; + + // ISchemaRowset.GetRowset(OleDbSchemaGuid.Indexes) column names + internal const string PRIMARY_KEY = "PRIMARY_KEY"; + internal const string UNIQUE = "UNIQUE"; + internal const string COLUMN_NAME = "COLUMN_NAME"; + internal const string NULLS = "NULLS"; + internal const string INDEX_NAME = "INDEX_NAME"; + + // ISchemaRowset.GetSchemaRowset(OleDbSchemaGuid.Procedure_Parameters) column names + internal const string PARAMETER_NAME = "PARAMETER_NAME"; + internal const string ORDINAL_POSITION = "ORDINAL_POSITION"; + internal const string PARAMETER_TYPE = "PARAMETER_TYPE"; + internal const string IS_NULLABLE = "IS_NULLABLE"; + internal const string DATA_TYPE = "DATA_TYPE"; + internal const string CHARACTER_MAXIMUM_LENGTH = "CHARACTER_MAXIMUM_LENGTH"; + internal const string NUMERIC_PRECISION = "NUMERIC_PRECISION"; + internal const string NUMERIC_SCALE = "NUMERIC_SCALE"; + internal const string TYPE_NAME = "TYPE_NAME"; + + // DataTable.Select to sort on ordinal position for OleDbSchemaGuid.Procedure_Parameters + internal const string ORDINAL_POSITION_ASC = "ORDINAL_POSITION ASC"; + + // OleDbConnection.GetOleDbSchemmaTable(OleDbSchemaGuid.SchemaGuids) table and column names + internal const string SchemaGuids = "SchemaGuids"; + internal const string Schema = "Schema"; + internal const string RestrictionSupport = "RestrictionSupport"; + + // OleDbConnection.GetOleDbSchemmaTable(OleDbSchemaGuid.DbInfoKeywords) table and column names + internal const string DbInfoKeywords = "DbInfoKeywords"; + internal const string Keyword = "Keyword"; + + // Debug error string writeline + static internal string ELookup(OleDbHResult hr) + { + StringBuilder builder = new StringBuilder(); + builder.Append(hr.ToString()); + if ((0 < builder.Length) && Char.IsDigit(builder[0])) + { + builder.Length = 0; + } + builder.Append("(0x"); + builder.Append(((int)hr).ToString("X8", CultureInfo.InvariantCulture)); + builder.Append(")"); + return builder.ToString(); + } + +#if DEBUG + static readonly private Hashtable g_wlookpup = new Hashtable(); + static internal string WLookup(short id) + { + string value = (string)g_wlookpup[id]; + if (null == value) + { + value = "0x" + ((short)id).ToString("X2", CultureInfo.InvariantCulture) + " " + ((short)id); + value += " " + ((DBTypeEnum)id).ToString(); + g_wlookpup[id] = value; + } + return value; + } + + private enum DBTypeEnum + { + EMPTY = 0, // + NULL = 1, // + I2 = 2, // + I4 = 3, // + R4 = 4, // + R8 = 5, // + CY = 6, // + DATE = 7, // + BSTR = 8, // + IDISPATCH = 9, // + ERROR = 10, // + BOOL = 11, // + VARIANT = 12, // + IUNKNOWN = 13, // + DECIMAL = 14, // + I1 = 16, // + UI1 = 17, // + UI2 = 18, // + UI4 = 19, // + I8 = 20, // + UI8 = 21, // + FILETIME = 64, // 2.0 + GUID = 72, // + BYTES = 128, // + STR = 129, // + WSTR = 130, // + NUMERIC = 131, // with potential overflow + UDT = 132, // should never be encountered + DBDATE = 133, // + DBTIME = 134, // + DBTIMESTAMP = 135, // granularity reduced from 1ns to 100ns (sql is 3.33 milli seconds) + HCHAPTER = 136, // 1.5 + PROPVARIANT = 138, // 2.0 - as variant + VARNUMERIC = 139, // 2.0 - as string else ConversionException + + BYREF_I2 = 0x4002, + BYREF_I4 = 0x4003, + BYREF_R4 = 0x4004, + BYREF_R8 = 0x4005, + BYREF_CY = 0x4006, + BYREF_DATE = 0x4007, + BYREF_BSTR = 0x4008, + BYREF_IDISPATCH = 0x4009, + BYREF_ERROR = 0x400a, + BYREF_BOOL = 0x400b, + BYREF_VARIANT = 0x400c, + BYREF_IUNKNOWN = 0x400d, + BYREF_DECIMAL = 0x400e, + BYREF_I1 = 0x4010, + BYREF_UI1 = 0x4011, + BYREF_UI2 = 0x4012, + BYREF_UI4 = 0x4013, + BYREF_I8 = 0x4014, + BYREF_UI8 = 0x4015, + BYREF_FILETIME = 0x4040, + BYREF_GUID = 0x4048, + BYREF_BYTES = 0x4080, + BYREF_STR = 0x4081, + BYREF_WSTR = 0x4082, + BYREF_NUMERIC = 0x4083, + BYREF_UDT = 0x4084, + BYREF_DBDATE = 0x4085, + BYREF_DBTIME = 0x4086, + BYREF_DBTIMESTAMP = 0x4087, + BYREF_HCHAPTER = 0x4088, + BYREF_PROPVARIANT = 0x408a, + BYREF_VARNUMERIC = 0x408b, + + VECTOR = 0x1000, + ARRAY = 0x2000, + BYREF = 0x4000, // + RESERVED = 0x8000, // SystemException + } +#endif + } +} diff --git a/src/System.Data.OleDb/src/OledbConnectionStringbuilder.cs b/src/System.Data.OleDb/src/OledbConnectionStringbuilder.cs new file mode 100644 index 000000000000..6a70683db5e2 --- /dev/null +++ b/src/System.Data.OleDb/src/OledbConnectionStringbuilder.cs @@ -0,0 +1,745 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Collections; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data.Common; +using System.Diagnostics; +using System.Globalization; +using System.Text; + +namespace System.Data.OleDb +{ + [DefaultProperty("Provider")] + [RefreshProperties(RefreshProperties.All)] + [TypeConverter(typeof(OleDbConnectionStringBuilder.OleDbConnectionStringBuilderConverter))] + public sealed class OleDbConnectionStringBuilder : DbConnectionStringBuilder + { + private enum Keywords + { // specific ordering for ConnectionString output construction + // NamedConnection, + FileName, + + Provider, + DataSource, + PersistSecurityInfo, + + OleDbServices, + } + + private static readonly string[] _validKeywords; + private static readonly Dictionary _keywords; + + private string[] _knownKeywords; + private Dictionary _propertyInfo; + + private string _fileName = DbConnectionStringDefaults.FileName; + + private string _dataSource = DbConnectionStringDefaults.DataSource; + private string _provider = DbConnectionStringDefaults.Provider; + + private int _oleDbServices = DbConnectionStringDefaults.OleDbServices; + + private bool _persistSecurityInfo = DbConnectionStringDefaults.PersistSecurityInfo; + + static OleDbConnectionStringBuilder() + { + string[] validKeywords = new string[5]; + validKeywords[(int)Keywords.DataSource] = DbConnectionStringKeywords.DataSource; + validKeywords[(int)Keywords.FileName] = DbConnectionStringKeywords.FileName; + validKeywords[(int)Keywords.OleDbServices] = DbConnectionStringKeywords.OleDbServices; + validKeywords[(int)Keywords.PersistSecurityInfo] = DbConnectionStringKeywords.PersistSecurityInfo; + validKeywords[(int)Keywords.Provider] = DbConnectionStringKeywords.Provider; + _validKeywords = validKeywords; + + Dictionary hash = new Dictionary(9, StringComparer.OrdinalIgnoreCase); + hash.Add(DbConnectionStringKeywords.DataSource, Keywords.DataSource); + hash.Add(DbConnectionStringKeywords.FileName, Keywords.FileName); + hash.Add(DbConnectionStringKeywords.OleDbServices, Keywords.OleDbServices); + hash.Add(DbConnectionStringKeywords.PersistSecurityInfo, Keywords.PersistSecurityInfo); + hash.Add(DbConnectionStringKeywords.Provider, Keywords.Provider); + Debug.Assert(5 == hash.Count, "initial expected size is incorrect"); + _keywords = hash; + } + + public OleDbConnectionStringBuilder() : this(null) + { + _knownKeywords = _validKeywords; + } + + public OleDbConnectionStringBuilder(string connectionString) : base() + { + if (!ADP.IsEmpty(connectionString)) + { + ConnectionString = connectionString; + } + } + + public override object this[string keyword] + { + get + { + ADP.CheckArgumentNull(keyword, "keyword"); + object value; + Keywords index; + if (_keywords.TryGetValue(keyword, out index)) + { + value = GetAt(index); + } + else if (!base.TryGetValue(keyword, out value)) + { + Dictionary dynamic = GetProviderInfo(Provider); + OleDbPropertyInfo info = dynamic[keyword]; + value = info._defaultValue; + } + return value; + } + set + { + if (null != value) + { + ADP.CheckArgumentNull(keyword, "keyword"); + Keywords index; + if (_keywords.TryGetValue(keyword, out index)) + { + switch (index) + { + case Keywords.DataSource: + DataSource = ConvertToString(value); + break; + case Keywords.FileName: + FileName = ConvertToString(value); + break; + // case Keywords.NamedConnection: NamedConnection = ConvertToString(value); break; + case Keywords.Provider: + Provider = ConvertToString(value); + break; + + case Keywords.OleDbServices: + OleDbServices = ConvertToInt32(value); + break; + + case Keywords.PersistSecurityInfo: + PersistSecurityInfo = ConvertToBoolean(value); + break; + default: + Debug.Assert(false, "unexpected keyword"); + throw ADP.KeywordNotSupported(keyword); + } + } + else + { + base[keyword] = value; + ClearPropertyDescriptors(); + } + } + else + { + Remove(keyword); + } + } + } + + [DisplayName(DbConnectionStringKeywords.DataSource)] + [RefreshProperties(RefreshProperties.All)] + // TODO: hand off to editor VS, if SQL - do database names, if Jet do file picker + public string DataSource + { + get { return _dataSource; } + set + { + SetValue(DbConnectionStringKeywords.DataSource, value); + _dataSource = value; + } + } + + [DisplayName(DbConnectionStringKeywords.FileName)] + [RefreshProperties(RefreshProperties.All)] + // TODO: hand off to VS, they derive from FileNameEditor and set the OpenDialogFilter to *.UDL + public string FileName + { + get { return _fileName; } + set + { + SetValue(DbConnectionStringKeywords.FileName, value); + _fileName = value; + } + } + + [DisplayName(DbConnectionStringKeywords.OleDbServices)] + [RefreshProperties(RefreshProperties.All)] + [TypeConverter(typeof(OleDbConnectionStringBuilder.OleDbServicesConverter))] + public int OleDbServices + { + get { return _oleDbServices; } + set + { + SetValue(DbConnectionStringKeywords.OleDbServices, value); + _oleDbServices = value; + } + } + + [DisplayName(DbConnectionStringKeywords.PersistSecurityInfo)] + [RefreshProperties(RefreshProperties.All)] + public bool PersistSecurityInfo + { + get { return _persistSecurityInfo; } + set + { + SetValue(DbConnectionStringKeywords.PersistSecurityInfo, value); + _persistSecurityInfo = value; + } + } + + [DisplayName(DbConnectionStringKeywords.Provider)] + [RefreshProperties(RefreshProperties.All)] + [TypeConverter(typeof(OleDbConnectionStringBuilder.OleDbProviderConverter))] + public string Provider + { + get { return _provider; } + set + { + SetValue(DbConnectionStringKeywords.Provider, value); + _provider = value; + RestartProvider(); + } + } + + public override ICollection Keys + { + get + { + string[] knownKeywords = _knownKeywords; + if (null == knownKeywords) + { + Dictionary dynamic = GetProviderInfo(Provider); + if (0 < dynamic.Count) + { + knownKeywords = new string[_validKeywords.Length + dynamic.Count]; + _validKeywords.CopyTo(knownKeywords, 0); + dynamic.Keys.CopyTo(knownKeywords, _validKeywords.Length); + } + else + { + knownKeywords = _validKeywords; + } + + int count = 0; + foreach (string keyword in base.Keys) + { + bool flag = true; + foreach (string s in knownKeywords) + { + if (StringComparer.OrdinalIgnoreCase.Equals(s, keyword)) + { + flag = false; + break; + } + } + if (flag) + { + count++; + } + } + if (0 < count) + { + string[] tmp = new string[knownKeywords.Length + count]; + knownKeywords.CopyTo(tmp, 0); + + int index = knownKeywords.Length; + foreach (string keyword in base.Keys) + { + bool flag = true; + foreach (string s in knownKeywords) + { + if (StringComparer.OrdinalIgnoreCase.Equals(s, keyword)) + { + flag = false; + break; + } + } + if (flag) + { + tmp[index++] = keyword; + } + } + knownKeywords = tmp; + } + _knownKeywords = knownKeywords; + } + return new System.Data.Common.ReadOnlyCollection(knownKeywords); + } + } + + public override bool ContainsKey(string keyword) + { + ADP.CheckArgumentNull(keyword, "keyword"); + return _keywords.ContainsKey(keyword) || base.ContainsKey(keyword); + } + + private static bool ConvertToBoolean(object value) + { + return DbConnectionStringBuilderUtil.ConvertToBoolean(value); + } + private static int ConvertToInt32(object value) + { + return DbConnectionStringBuilderUtil.ConvertToInt32(value); + } + private static string ConvertToString(object value) + { + return DbConnectionStringBuilderUtil.ConvertToString(value); + } + + public override void Clear() + { + base.Clear(); + for (int i = 0; i < _validKeywords.Length; ++i) + { + Reset((Keywords)i); + } + base.ClearPropertyDescriptors(); + _knownKeywords = _validKeywords; + } + + private object GetAt(Keywords index) + { + switch (index) + { + case Keywords.DataSource: + return DataSource; + case Keywords.FileName: + return FileName; + // case Keywords.NamedConnection: return NamedConnection; + case Keywords.OleDbServices: + return OleDbServices; + case Keywords.PersistSecurityInfo: + return PersistSecurityInfo; + case Keywords.Provider: + return Provider; + default: + Debug.Assert(false, "unexpected keyword"); + throw ADP.KeywordNotSupported(_validKeywords[(int)index]); + } + } + + public override bool Remove(string keyword) + { + ADP.CheckArgumentNull(keyword, "keyword"); + bool value = base.Remove(keyword); + + Keywords index; + if (_keywords.TryGetValue(keyword, out index)) + { + Reset(index); + } + else if (value) + { + ClearPropertyDescriptors(); + } + return value; + } + + private void Reset(Keywords index) + { + switch (index) + { + case Keywords.DataSource: + _dataSource = DbConnectionStringDefaults.DataSource; + break; + case Keywords.FileName: + _fileName = DbConnectionStringDefaults.FileName; + RestartProvider(); + break; + case Keywords.OleDbServices: + _oleDbServices = DbConnectionStringDefaults.OleDbServices; + break; + case Keywords.PersistSecurityInfo: + _persistSecurityInfo = DbConnectionStringDefaults.PersistSecurityInfo; + break; + case Keywords.Provider: + _provider = DbConnectionStringDefaults.Provider; + RestartProvider(); + break; + default: + Debug.Assert(false, "unexpected keyword"); + throw ADP.KeywordNotSupported(_validKeywords[(int)index]); + } + } + + private new void ClearPropertyDescriptors() + { + base.ClearPropertyDescriptors(); + _knownKeywords = null; + } + + private void RestartProvider() + { + ClearPropertyDescriptors(); + _propertyInfo = null; + } + + private void SetValue(string keyword, bool value) + { + base[keyword] = value.ToString((System.IFormatProvider)null); + } + private void SetValue(string keyword, int value) + { + base[keyword] = value.ToString((System.IFormatProvider)null); + } + private void SetValue(string keyword, string value) + { + ADP.CheckArgumentNull(value, keyword); + base[keyword] = value; + } + + public override bool TryGetValue(string keyword, out object value) + { + ADP.CheckArgumentNull(keyword, "keyword"); + Keywords index; + if (_keywords.TryGetValue(keyword, out index)) + { + value = GetAt(index); + return true; + } + else if (!base.TryGetValue(keyword, out value)) + { + Dictionary dynamic = GetProviderInfo(Provider); + OleDbPropertyInfo info; + if (dynamic.TryGetValue(keyword, out info)) + { + value = info._defaultValue; + return true; + } + return false; + } + return true; + } + + private Dictionary GetProviderInfo(string provider) + { + Dictionary providerInfo = _propertyInfo; + if (null == providerInfo) + { + providerInfo = new Dictionary(StringComparer.OrdinalIgnoreCase); + if (!ADP.IsEmpty(provider)) + { + Dictionary hash = null; + try + { + StringBuilder builder = new StringBuilder(); + AppendKeyValuePair(builder, DbConnectionStringKeywords.Provider, provider); + OleDbConnectionString constr = new OleDbConnectionString(builder.ToString(), true); + + // load provider without calling Initialize or CreateDataSource + using (OleDbConnectionInternal connection = new OleDbConnectionInternal(constr, (OleDbConnection)null)) + { + // get all the init property information for the provider + hash = connection.GetPropertyInfo(new Guid[] { OleDbPropertySetGuid.DBInitAll }); + foreach (KeyValuePair entry in hash) + { + Keywords index; + OleDbPropertyInfo info = entry.Value; + if (!_keywords.TryGetValue(info._description, out index)) + { + if ((OleDbPropertySetGuid.DBInit == info._propertySet) && + ((ODB.DBPROP_INIT_ASYNCH == info._propertyID) || + (ODB.DBPROP_INIT_HWND == info._propertyID) || + (ODB.DBPROP_INIT_PROMPT == info._propertyID))) + { + continue; // skip this keyword + } + providerInfo[info._description] = info; + } + } + + // what are the unique propertysets? + List listPropertySets = new List(); + foreach (KeyValuePair entry in hash) + { + OleDbPropertyInfo info = entry.Value; + if (!listPropertySets.Contains(info._propertySet)) + { + listPropertySets.Add(info._propertySet); + } + } + Guid[] arrayPropertySets = new Guid[listPropertySets.Count]; + listPropertySets.CopyTo(arrayPropertySets, 0); + + // get all the init property values for the provider + using (PropertyIDSet propidset = new PropertyIDSet(arrayPropertySets)) + { + using (IDBPropertiesWrapper idbProperties = connection.IDBProperties()) + { + OleDbHResult hr; + using (DBPropSet propset = new DBPropSet(idbProperties.Value, propidset, out hr)) + { + // OleDbConnectionStringBuilder is ignoring/hiding potential errors of OLEDB provider when reading its properties information + if (0 <= (int)hr) + { + int count = propset.PropertySetCount; + for (int i = 0; i < count; ++i) + { + Guid propertyset; + tagDBPROP[] props = propset.GetPropertySet(i, out propertyset); + + // attach the default property value to the property info + foreach (tagDBPROP prop in props) + { + foreach (KeyValuePair entry in hash) + { + OleDbPropertyInfo info = entry.Value; + if ((info._propertyID == prop.dwPropertyID) && (info._propertySet == propertyset)) + { + info._defaultValue = prop.vValue; + + if (null == info._defaultValue) + { + if (typeof(string) == info._type) + { + info._defaultValue = ""; + } + else if (typeof(Int32) == info._type) + { + info._defaultValue = 0; + } + else if (typeof(Boolean) == info._type) + { + info._defaultValue = false; + } + } + } + } + } + } + } + } + } + } + } + } + catch (System.InvalidOperationException e) + { + ADP.TraceExceptionWithoutRethrow(e); + } + catch (System.Data.OleDb.OleDbException e) + { + ADP.TraceExceptionWithoutRethrow(e); + } + catch (System.Security.SecurityException e) + { + ADP.TraceExceptionWithoutRethrow(e); + } + } + _propertyInfo = providerInfo; + } + return providerInfo; + } + + private sealed class OleDbProviderConverter : StringConverter + { + private const int DBSOURCETYPE_DATASOURCE_TDP = 1; + private const int DBSOURCETYPE_DATASOURCE_MDP = 3; + + private StandardValuesCollection _standardValues; + + // converter classes should have public ctor + public OleDbProviderConverter() + { + } + + public override bool GetStandardValuesSupported(ITypeDescriptorContext context) + { + return true; + } + + public override bool GetStandardValuesExclusive(ITypeDescriptorContext context) + { + return false; + } + + public override StandardValuesCollection GetStandardValues(ITypeDescriptorContext context) + { + StandardValuesCollection dataSourceNames = _standardValues; + if (null == _standardValues) + { + // Get the sources rowset for the SQLOLEDB enumerator + DataTable table = (new OleDbEnumerator()).GetElements(); + + DataColumn column2 = table.Columns["SOURCES_NAME"]; + DataColumn column5 = table.Columns["SOURCES_TYPE"]; + //DataColumn column4 = table.Columns["SOURCES_DESCRIPTION"]; + + System.Collections.Generic.List providerNames = new System.Collections.Generic.List(table.Rows.Count); + foreach (DataRow row in table.Rows) + { + int sourceType = (int)row[column5]; + if (DBSOURCETYPE_DATASOURCE_TDP == sourceType || DBSOURCETYPE_DATASOURCE_MDP == sourceType) + { + string progid = (string)row[column2]; + if (!OleDbConnectionString.IsMSDASQL(progid.ToLower(CultureInfo.InvariantCulture))) + { + if (0 > providerNames.IndexOf(progid)) + { + providerNames.Add(progid); + } + } + } + } + + // Create the standard values collection that contains the sources + dataSourceNames = new StandardValuesCollection(providerNames); + _standardValues = dataSourceNames; + } + return dataSourceNames; + } + } + + [Flags()] + internal enum OleDbServiceValues : int + { + DisableAll = unchecked((int)0x00000000), + ResourcePooling = unchecked((int)0x00000001), + TransactionEnlistment = unchecked((int)0x00000002), + ClientCursor = unchecked((int)0x00000004), + AggregationAfterSession = unchecked((int)0x00000008), + EnableAll = unchecked((int)0xffffffff), + Default = ~(ClientCursor | AggregationAfterSession), + }; + + internal sealed class OleDbServicesConverter : TypeConverter + { + private StandardValuesCollection _standardValues; + + // converter classes should have public ctor + public OleDbServicesConverter() : base() + { + } + + public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) + { + // Only know how to convert from a string + return ((typeof(string) == sourceType) || base.CanConvertFrom(context, sourceType)); + } + + public override object ConvertFrom(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value) + { + string svalue = (value as string); + if (null != svalue) + { + Int32 services; + if (Int32.TryParse(svalue, out services)) + { + return services; + } + else + { + if (svalue.IndexOf(',') != -1) + { + int convertedValue = 0; + string[] values = svalue.Split(new char[] { ',' }); + foreach (string v in values) + { + convertedValue |= (int)(OleDbServiceValues)Enum.Parse(typeof(OleDbServiceValues), v, true); + } + return (int)convertedValue; + ; + } + else + { + return (int)(OleDbServiceValues)Enum.Parse(typeof(OleDbServiceValues), svalue, true); + } + } + } + return base.ConvertFrom(context, culture, value); + } + + public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType) + { + // Only know how to convert to the NetworkLibrary enumeration + return ((typeof(string) == destinationType) || base.CanConvertTo(context, destinationType)); + } + + public override object ConvertTo(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, Type destinationType) + { + if ((typeof(string) == destinationType) && (null != value) && (typeof(Int32) == value.GetType())) + { + return Enum.Format(typeof(OleDbServiceValues), ((OleDbServiceValues)(int)value), "G"); + } + return base.ConvertTo(context, culture, value, destinationType); + } + + public override bool GetStandardValuesSupported(ITypeDescriptorContext context) + { + return true; + } + + public override bool GetStandardValuesExclusive(ITypeDescriptorContext context) + { + return false; + } + + public override StandardValuesCollection GetStandardValues(ITypeDescriptorContext context) + { + StandardValuesCollection standardValues = _standardValues; + if (null == standardValues) + { + Array objValues = Enum.GetValues(typeof(OleDbServiceValues)); + Array.Sort(objValues, 0, objValues.Length); + standardValues = new StandardValuesCollection(objValues); + _standardValues = standardValues; + } + return standardValues; + } + + public override bool IsValid(ITypeDescriptorContext context, object value) + { + return true; + //return Enum.IsDefined(type, value); + } + } + + sealed internal class OleDbConnectionStringBuilderConverter : ExpandableObjectConverter + { + // converter classes should have public ctor + public OleDbConnectionStringBuilderConverter() + { + } + + override public bool CanConvertTo(ITypeDescriptorContext context, Type destinationType) + { + if (typeof(System.ComponentModel.Design.Serialization.InstanceDescriptor) == destinationType) + { + return true; + } + return base.CanConvertTo(context, destinationType); + } + + override public object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType) + { + if (destinationType == null) + { + throw ADP.ArgumentNull("destinationType"); + } + if (typeof(System.ComponentModel.Design.Serialization.InstanceDescriptor) == destinationType) + { + OleDbConnectionStringBuilder obj = (value as OleDbConnectionStringBuilder); + if (null != obj) + { + return ConvertToInstanceDescriptor(obj); + } + } + return base.ConvertTo(context, culture, value, destinationType); + } + + private System.ComponentModel.Design.Serialization.InstanceDescriptor ConvertToInstanceDescriptor(OleDbConnectionStringBuilder options) + { + Type[] ctorParams = new Type[] { typeof(string) }; + object[] ctorValues = new object[] { options.ConnectionString }; + System.Reflection.ConstructorInfo ctor = typeof(OleDbConnectionStringBuilder).GetConstructor(ctorParams); + return new System.ComponentModel.Design.Serialization.InstanceDescriptor(ctor, ctorValues); + } + } + } +} diff --git a/src/System.Data.OleDb/src/PropertyIDSet.cs b/src/System.Data.OleDb/src/PropertyIDSet.cs new file mode 100644 index 000000000000..3ab5bab3fc81 --- /dev/null +++ b/src/System.Data.OleDb/src/PropertyIDSet.cs @@ -0,0 +1,57 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Data.Common; +using System.Data.ProviderBase; +using System.Runtime.InteropServices; + +namespace System.Data.OleDb +{ + internal sealed class PropertyIDSet : DbBuffer + { + static private readonly int PropertyIDSetAndValueSize = ODB.SizeOf_tagDBPROPIDSET + ADP.PtrSize; // sizeof(tagDBPROPIDSET) + sizeof(int) + static private readonly int PropertyIDSetSize = ODB.SizeOf_tagDBPROPIDSET; + + private int _count; + + // the PropertyID is stored at the end of the tagDBPROPIDSET structure + // this way only a single memory allocation is required instead of two + internal PropertyIDSet(Guid propertySet, int propertyID) : base(PropertyIDSetAndValueSize) + { + _count = 1; + + // rgPropertyIDs references where that PropertyID is stored + // depending on IntPtr.Size, tagDBPROPIDSET is either 24 or 28 bytes long + IntPtr ptr = ADP.IntPtrOffset(base.handle, PropertyIDSetSize); + Marshal.WriteIntPtr(base.handle, 0, ptr); + + Marshal.WriteInt32(base.handle, ADP.PtrSize, /*propertyid count*/1); + + ptr = ADP.IntPtrOffset(base.handle, ODB.OffsetOf_tagDBPROPIDSET_PropertySet); + Marshal.StructureToPtr(propertySet, ptr, false/*deleteold*/); + + // write the propertyID at the same offset + Marshal.WriteInt32(base.handle, PropertyIDSetSize, propertyID); + } + + // no propertyIDs, just the propertyset guids + internal PropertyIDSet(Guid[] propertySets) : base(PropertyIDSetSize * propertySets.Length) + { + _count = propertySets.Length; + for (int i = 0; i < propertySets.Length; ++i) + { + IntPtr ptr = ADP.IntPtrOffset(base.handle, (i * PropertyIDSetSize) + ODB.OffsetOf_tagDBPROPIDSET_PropertySet); + Marshal.StructureToPtr(propertySets[i], ptr, false/*deleteold*/); + } + } + + internal int Count + { + get + { + return _count; + } + } + } +} diff --git a/src/System.Data.OleDb/src/PropertyInfoSet.cs b/src/System.Data.OleDb/src/PropertyInfoSet.cs new file mode 100644 index 000000000000..ca4eea5bf689 --- /dev/null +++ b/src/System.Data.OleDb/src/PropertyInfoSet.cs @@ -0,0 +1,201 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Collections.Generic; +using System.Data.Common; +using System.Globalization; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +namespace System.Data.OleDb +{ + sealed internal class OleDbPropertyInfo + { + public Guid _propertySet; + public Int32 _propertyID; + public string _description; + public string _lowercase; + public Type _type; + + public int _flags; + public int _vtype; + public object _supportedValues; + + public object _defaultValue; + } + + internal sealed class PropertyInfoSet : SafeHandle + { + private int setCount; + private IntPtr descBuffer; + + internal PropertyInfoSet(UnsafeNativeMethods.IDBProperties idbProperties, PropertyIDSet propIDSet) : base(IntPtr.Zero, true) + { + OleDbHResult hr; + int propIDSetCount = propIDSet.Count; + RuntimeHelpers.PrepareConstrainedRegions(); + try + { } + finally + { + hr = idbProperties.GetPropertyInfo(propIDSetCount, propIDSet, out this.setCount, out base.handle, out this.descBuffer); + } + if ((0 <= hr) && (ADP.PtrZero != handle)) + { + SafeNativeMethods.Wrapper.ClearErrorInfo(); + } + } + + public override bool IsInvalid + { + get + { + return ((IntPtr.Zero == base.handle) && (IntPtr.Zero == this.descBuffer)); + } + } + + internal Dictionary GetValues() + { + Dictionary propertyLookup = null; + + bool mustRelease = false; + RuntimeHelpers.PrepareConstrainedRegions(); + try + { + DangerousAddRef(ref mustRelease); + if (ADP.PtrZero != this.handle) + { + propertyLookup = new Dictionary(StringComparer.OrdinalIgnoreCase); + + IntPtr setPtr = this.handle; + tagDBPROPINFO propinfo = new tagDBPROPINFO(); + tagDBPROPINFOSET propinfoset = new tagDBPROPINFOSET(); + + for (int i = 0; i < setCount; ++i, setPtr = ADP.IntPtrOffset(setPtr, ODB.SizeOf_tagDBPROPINFOSET)) + { + Marshal.PtrToStructure(setPtr, propinfoset); + + int infoCount = propinfoset.cPropertyInfos; + IntPtr infoPtr = propinfoset.rgPropertyInfos; + for (int k = 0; k < infoCount; ++k, infoPtr = ADP.IntPtrOffset(infoPtr, ODB.SizeOf_tagDBPROPINFO)) + { + Marshal.PtrToStructure(infoPtr, propinfo); + + OleDbPropertyInfo propertyInfo = new OleDbPropertyInfo(); + propertyInfo._propertySet = propinfoset.guidPropertySet; + propertyInfo._propertyID = propinfo.dwPropertyID; + propertyInfo._flags = propinfo.dwFlags; + propertyInfo._vtype = propinfo.vtType; + propertyInfo._supportedValues = propinfo.vValue; + propertyInfo._description = propinfo.pwszDescription; + propertyInfo._lowercase = propinfo.pwszDescription.ToLower(CultureInfo.InvariantCulture); + propertyInfo._type = PropertyInfoSet.FromVtType(propinfo.vtType); + + propertyLookup[propertyInfo._lowercase] = propertyInfo; + } + } + } + } + finally + { + if (mustRelease) + { + DangerousRelease(); + } + } + return propertyLookup; + } + + override protected bool ReleaseHandle() + { + // NOTE: The SafeHandle class guarantees this will be called exactly once and is non-interrutible. + IntPtr ptr = base.handle; + base.handle = IntPtr.Zero; + if (IntPtr.Zero != ptr) + { + int count = this.setCount; + for (int i = 0; i < count; ++i) + { + int offset = (i * ODB.SizeOf_tagDBPROPINFOSET); + IntPtr infoPtr = Marshal.ReadIntPtr(ptr, offset); + if (IntPtr.Zero != infoPtr) + { + int infoCount = Marshal.ReadInt32(ptr, offset + ADP.PtrSize); + + for (int k = 0; k < infoCount; ++k) + { + IntPtr valuePtr = ADP.IntPtrOffset(infoPtr, (k * ODB.SizeOf_tagDBPROPINFO) + ODB.OffsetOf_tagDBPROPINFO_Value); + SafeNativeMethods.VariantClear(valuePtr); + } + SafeNativeMethods.CoTaskMemFree(infoPtr); // was allocated by provider + } + } + SafeNativeMethods.CoTaskMemFree(ptr); + } + + ptr = this.descBuffer; + this.descBuffer = IntPtr.Zero; + if (IntPtr.Zero != ptr) + { + SafeNativeMethods.CoTaskMemFree(ptr); + } + return true; + } + + internal static Type FromVtType(int vartype) + { + switch ((VarEnum)vartype) + { + case VarEnum.VT_EMPTY: + return null; + case VarEnum.VT_NULL: + return typeof(System.DBNull); + case VarEnum.VT_I2: + return typeof(System.Int16); + case VarEnum.VT_I4: + return typeof(System.Int32); + case VarEnum.VT_R4: + return typeof(System.Single); + case VarEnum.VT_R8: + return typeof(System.Double); + case VarEnum.VT_CY: + return typeof(System.Decimal); + case VarEnum.VT_DATE: + return typeof(System.DateTime); + case VarEnum.VT_BSTR: + return typeof(System.String); + case VarEnum.VT_DISPATCH: + return typeof(System.Object); + case VarEnum.VT_ERROR: + return typeof(System.Int32); + case VarEnum.VT_BOOL: + return typeof(System.Boolean); + case VarEnum.VT_VARIANT: + return typeof(System.Object); + case VarEnum.VT_UNKNOWN: + return typeof(System.Object); + case VarEnum.VT_DECIMAL: + return typeof(System.Decimal); + case VarEnum.VT_I1: + return typeof(System.SByte); + case VarEnum.VT_UI1: + return typeof(System.Byte); + case VarEnum.VT_UI2: + return typeof(System.UInt16); + case VarEnum.VT_UI4: + return typeof(System.UInt32); + case VarEnum.VT_I8: + return typeof(System.Int64); + case VarEnum.VT_UI8: + return typeof(System.UInt64); + case VarEnum.VT_INT: + return typeof(System.Int32); + case VarEnum.VT_UINT: + return typeof(System.UInt32); + default: + return typeof(System.Object); + } + } + } +} diff --git a/src/System.Data.OleDb/src/Resources/Strings.resx b/src/System.Data.OleDb/src/Resources/Strings.resx new file mode 100644 index 000000000000..57f5b1d9eed2 --- /dev/null +++ b/src/System.Data.OleDb/src/Resources/Strings.resx @@ -0,0 +1,579 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Invalid index {0} for this {1} with Count={2}. + + + An {0} with {1} '{2}' is not contained by this {3}. + + + The {0} only accepts non-null {1} type objects, not {2} objects. + + + The {0} is already contained by another {1}. + + + The {0} only accepts non-null {1} type objects. + + + Attempted to remove an {0} that is not contained by this {1}. + + + The connection's current state is closed. + + + The connection's current state is connecting. + + + The connection's current state is open. + + + The connection's current state is executing. + + + The connection's current state is fetching. + + + The connection's current state: {0}. + + + Format of the initialization string does not conform to specification starting at index {0}. + + + Invalid attempt to call {0} when reader is closed. + + + The {0} enumeration value, {1}, is invalid. + + + Cannot convert object of type '{0}' to object of type '{1}'. + + + Invalid value for key '{0}'. + + + Keyword not supported: '{0}'. + + + Internal data provider error {0}. + + + {0} "{1}". + + + {0} "{1}", incorrect usage of quotes. + + + {0} "{1}", the current limit of "{2}" is insufficient. + + + OleDbCommandBuilder.DeriveParameters failed because the OleDbCommandBuilder.CommandText property value is an invalid multipart name + + + Invalid source buffer (size of {0}) offset: {1} + + + Invalid destination buffer (size of {0}) offset: {1} + + + '{0}' interface is not supported by the '{1}' provider. GetOleDbSchemaTable is unavailable with the current provider. + + + '{0}' failed with no error message available, result code: {1}. + + + No error message available, result code: {0}. + + + The data providers require Microsoft Data Access Components (MDAC). Please install Microsoft Data Access Components (MDAC) version 2.6 or later. + + + The data provider for OLEDB (System.Data.OleDb) does not support the Microsoft OLEDB Provider for ODBC Drivers (MSDASQL). Use the data provider for ODBC (System.Data.Odbc). + + + The data provider for OLEDB will not allow the OLEDB Provider to prompt the user in a non-interactive environment. + + + The '{0}' provider is not registered on the local machine. + + + The ICommandText interface is not supported by the '{0}' provider. Use CommandType.TableDirect instead. + + + The ITransactionLocal interface is not supported by the '{0}' provider. Local transactions are unavailable with the current provider. + + + 'Asynchronous Processing' is not a supported feature of the Data OLEDB Provider (System.Data.OleDb). + + + An OLEDB Provider was not specified in the ConnectionString. An example would be, 'Provider=SQLOLEDB;'. + + + The OLEDB Provider specified in the ConnectionString is too long. + + + No restrictions are expected for the DbInfoKeywords OleDbSchemaGuid. + + + No restrictions are expected for the DbInfoLiterals OleDbSchemaGuid. + + + No restrictions are expected for the schema guid OleDbSchemaGuid. + + + The {0} OleDbSchemaGuid is not a supported schema by the '{1}' provider. + + + Command parameter[{0}] '{1}' is invalid. + + + Command parameter[{0}] '{1}' data value could not be converted for reasons other than sign mismatch or data overflow. + + + Conversion failed for command parameter[{0}] '{1}' because the data value was signed and the type used by the provider was unsigned. + + + Conversion failed for command parameter[{0}] '{1}' because the data value overflowed the type used by the provider. + + + Provider encountered an error while sending command parameter[{0}] '{1}' value and stopped processing. + + + Parameter[{0}] '{1}' has no default value. + + + Error occurred with parameter[{0}]: {1}. + + + System.Data.OleDb.OleDbDataAdapter internal error: invalid parameter accessor: {0} {1}. + + + Parameter[{0}]: the OleDbType property is uninitialized: OleDbType.{1}. + + + The ICommandWithParameters interface is not supported by the '{0}' provider. Command parameters are unsupported with the current provider. + + + Retrieving procedure parameter information is not supported by the '{0}' provider. + + + Object is not an ADODB.RecordSet or an ADODB.Record. + + + Unable to retrieve the '{0}' interface from the ADODB.RecordSet object. + + + Unable to retrieve the IRow interface from the ADODB.Record object. + + + Type does not support the OLEDB interface ISourcesRowset + + + Cannot construct the ReservedWords schema collection because the provider does not support IDBInfo. + + + The property's value was not set because the provider did not support the '{0}' property, or the consumer attempted to get or set values of properties not in the Initialization property group and the data source object is uninitialized. + + + Failed to initialize the '{0}' property for one of the following reasons: + The value data type was not the data type of the property or was not null. For example, the property was DBPROP_MEMORYUSAGE, which has a data type of Int32, and the data type was Int64. + The value was not a valid value. For example, the property was DBPROP_MEMORYUSAGE and the value was negative. + The value was a valid value for the property and the provider supports the property as a settable property, but the provider does not support the value specified. This includes the case where the value was added to the property in OLEDB after the provider was written. + + + The value of Options was invalid. + + + The ColumnID element was invalid. + + + A '{0}' property was specified to be applied to all columns but could not be applied to one or more of them. + + + The '{0}' property was read-only, or the consumer attempted to set values of properties in the Initialization property group after the data source object was initialized. Consumers can set the value of a read-only property to its current value. This status is also returned if a settable column property could not be set for the particular column. + + + The optional '{0}' property's value was not set to the specified value and setting the property to the specified value was not possible. + + + The '{0}'property's value was not set because doing so would have conflicted with an existing property. + + + (Reserved). + + + The provider returned an unknown DBPROPSTATUS_ value '{0}'. + + + Accessor validation was deferred and was performed while the method returned data. The binding was invalid for this column or parameter. + + + OleDbDataAdapter internal error: invalid row set accessor: Ordinal={0} Status={1}. + + + The data value could not be converted for reasons other than sign mismatch or data overflow. For example, the data was corrupted in the data store but the row was still retrievable. + + + The provider could not allocate memory in which to return {0} data. + + + Conversion failed because the {0} data value overflowed the type specified for the {0} value part in the consumer's buffer. + + + OleDbDataAdapter internal error: [get] Unknown OLEDB data type: 0x{0} ({1}). + + + Conversion failed because the {0} data value was signed and the type specified for the {0} value part in the consumer's buffer was unsigned. + + + OleDbDataAdapter internal error: [set] Unknown OLEDB data type: 0x{0} ({1}). + + + The provider could not determine the {0} value. For example, the row was just created, the default for the {0} column was not available, and the consumer had not yet set a new {0} value. + + + OLEDB Provider returned an unexpected status value of {0}. + + + The OleDbDataReader.Read must be used from the same thread on which is was created if that thread's ApartmentState was not ApartmentState.MTA. + + + Unspecified error: {0} + + + IErrorInfo.GetDescription failed with {0}. + + + IErrorInfo.GetSource failed with {0}. + + + DBTYPE_VECTOR data is not supported by the Data OLEDB Provider (System.Data.OleDb). + + + Data length '{0}' is less than 0. + + + System.Data.OleDb is not supported on this platform. + + + Marshal.GetIDispatchForObject API not available on this plaTform + + + Expecting non-empty string for '{0}' parameter. + + + Unable to load the UDL file. + + + Invalid UDL file. + + + The DataDirectory substitute is not a string. + + + Invalid keyword, contain one or more of 'no characters', 'control characters', 'leading or trailing whitespace' or 'leading semicolons'. + + + The value contains embedded nulls (\\u0000). + + + The ConnectionString property has not been initialized. + + + Unable to load the XML file specified in configuration setting '{0}'. + + + The '{0}' configuration setting has the wrong number of values. + + + Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool size was reached. + + + Timeout attempting to open the connection. The time period elapsed prior to attempting to open the connection has been exceeded. + + + The transaction is either not associated with the current connection or has been completed. + + + {0} requires the command to have a transaction when the connection assigned to the command is in a pending local transaction. The Transaction property of the command has not been initialized. + + + {0}: CommandText property has not been initialized + + + {0}: Connection property has not been initialized. + + + {0} requires an open and available Connection. {1} + + + The stored procedure '{0}' doesn't exist. + + + There is already an open DataReader associated with this Command which must be closed first. + + + The transaction assigned to this command must be the most nested pending local transaction. + + + Invalid {2} attempt at dataIndex '{0}'. With CommandBehavior.SequentialAccess, you may only read from dataIndex '{1}' or greater. + + + The numerical value is too large to fit into a 96 bit decimal. + + + Invalid attempt to read from column ordinal '{0}'. With CommandBehavior.SequentialAccess, you may only read from column ordinal '{1}' or greater. + + + Fill: expected a non-empty string for the SourceTable name. + + + Invalid CommandTimeout value {0}; the value must be >= 0. + + + {0} DeriveParameters only supports CommandType.StoredProcedure, not CommandType.{1}. + + + {1}[{0}]: the Size property has an invalid size of 0. + + + {0}.Prepare method requires all parameters to have an explicitly set type. + + + {0}.Prepare method requires all variable length parameters to have an explicitly set non-zero Size. + + + {0}.Prepare method requires parameters of type '{1}' have an explicitly set Precision and Scale. + + + Invalid operation. The connection is closed. + + + The connection was not closed. {0} + + + Connection currently has transaction enlisted. Finish current transaction and retry. + + + Cannot enlist in the transaction because a local transaction is in progress on the connection. Finish local transaction and retry. + + + Not allowed to change the '{0}' property. {1} + + + Database cannot be null, the empty string, or string of only whitespace. + + + Internal DbConnection Error: {0} + + + Invalid 'Connect Timeout' value which must be an integer >= 0. + + + No data exists for the row/column. + + + The parameter data type of {0} is invalid. + + + No mapping exists from DbType {0} to a known {1}. + + + Unable to handle an unknown TypeCode {0} returned by Type {1}. + + + Invalid parameter Offset value '{0}'. The value must be greater than or equal to 0. + + + Invalid parameter Size value '{0}'. The value must be greater than or equal to 0. + + + Failed to convert parameter value from a {0} to a {1}. + + + {0} does not support parallel transactions. + + + This {0} has completed; it is no longer usable. + + + The collection name '{0}' matches at least two collections with the same name but with different case, but does not match any of them exactly. + + + There are multiple collections named '{0}'. + + + The collection '{0}' is missing from the metadata XML. + + + The DataSourceInformation table must contain exactly one row. + + + '{2}' is not a valid value for the '{1}' restriction of the '{0}' schema collection. + + + The metadata XML is invalid. + + + The metadata XML is invalid. The {0} collection must contain a {1} column and it must be a string column. + + + The metadata XML is invalid. The {1} column of the {0} collection must contain a non-empty string. + + + One of the required DataSourceInformation tables columns is missing. + + + One or more of the required columns of the restrictions collection is missing. + + + A restriction exists for which there is no matching row in the restrictions collection. + + + The schema table contains no columns. + + + Unable to build the '{0}' collection because execution of the SQL query failed. See the inner exception for details. + + + More restrictions were provided than the requested schema ('{0}') supports. + + + Unable to build schema collection '{0}'; + + + The requested collection ({0}) is not defined. + + + The population mechanism '{0}' is not defined. + + + The requested collection ({0}) is not supported by this version of the provider. + + + {0} requires open connection when the quote prefix has not been set. + + + The Odbc Data Provider requires Microsoft Data Access Components (MDAC) version 2.6 or later. Version {0} was found currently installed. + + + The OLEDB Data Provider requires Microsoft Data Access Components (MDAC) version 2.6 or later. Version {0} was found currently installed. + + \ No newline at end of file diff --git a/src/System.Data.OleDb/src/Resources/System.Data.OleDb.OleDbMetaData.xml b/src/System.Data.OleDb/src/Resources/System.Data.OleDb.OleDbMetaData.xml new file mode 100644 index 000000000000..8bb13d3d49c3 --- /dev/null +++ b/src/System.Data.OleDb/src/Resources/System.Data.OleDb.OleDbMetaData.xml @@ -0,0 +1,1028 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + MetaDataCollections + 0 + 0 + DataTable + MetaDataCollections + + + DataSourceInformation + 0 + 0 + PrepareCollection + DataSourceInformation + + + DataTypes + 0 + 0 + PrepareCollection + DataTypes + + + Restrictions + 0 + 0 + DataTable + Restrictions + + + ReservedWords + 0 + 0 + PrepareCollection + ReservedWords + + + Catalogs + 1 + 1 + PrepareCollection + + + Collations + 3 + 3 + PrepareCollection + + + Columns + 4 + 4 + PrepareCollection + + + Indexes + 5 + 4 + PrepareCollection + + + Procedures + 4 + 3 + PrepareCollection + + + ProcedureColumns + 4 + 4 + PrepareCollection + + + ProcedureParameters + 4 + 4 + PrepareCollection + + + Tables + 4 + 3 + PrepareCollection + + + Views + 3 + 3 + PrepareCollection + + + Catalogs + CATALOG_NAME + 1 + + + Collations + COLLATION_CATALOG + 1 + + + Collations + COLLATION_SCHEMA + 2 + + + Collations + COLLATION_NAME + 3 + + + Columns + TABLE_CATALOG + 1 + + + Columns + TABLE_SCHEMA + 2 + + + Columns + TABLE_NAME + 3 + + + Columns + COLUMN_NAME + 4 + + + Indexes + TABLE_CATALOG + 1 + + + Indexes + TABLE_SCHEMA + 2 + + + Indexes + INDEX_NAME + 3 + + + Indexes + TYPE + 4 + + + Indexes + TABLE_NAME + 5 + + + Procedures + PROCEDURE_CATALOG + 1 + + + Procedures + PROCEDURE_SCHEMA + 2 + + + Procedures + PROCEDURE_NAME + 3 + + + Procedures + PROCEDURE_TYPE + 4 + + + ProcedureColumns + PROCEDURE_CATALOG + 1 + + + ProcedureColumns + PROCEDURE_SCHEMA + 2 + + + ProcedureColumns + PROCEDURE_NAME + 3 + + + ProcedureColumns + COLUMN_NAME + 4 + + + ProcedureParameters + PROCEDURE_CATALOG + 1 + + + ProcedureParameters + PROCEDURE_SCHEMA + 2 + + + ProcedureParameters + PROCEDURE_NAME + 3 + + + ProcedureParameters + PARAMETER_NAME + 4 + + + Tables + TABLE_CATALOG + 1 + + + Tables + TABLE_SCHEMA + 2 + + + Tables + TABLE_NAME + 3 + + + Tables + TABLE_TYPE + 4 + + + Views + TABLE_CATALOG + 1 + + + Views + TABLE_SCHEMA + 2 + + + Views + TABLE_NAME + 3 + + + + ABSOLUTE + + + ACTION + + + ADD + + + ALL + + + ALLOCATE + + + ALTER + + + AND + + + ANY + + + ARE + + + AS + + + ASC + + + ASSERTION + + + AT + + + AUTHORIZATION + + + AVG + + + BEGIN + + + BETWEEN + + + BIT + + + BIT_LENGTH + + + BOTH + + + BY + + + CASCADE + + + CASCADED + + + CASE + + + CAST + + + CATALOG + + + CHAR + + + CHAR_LENGTH + + + CHARACTER + + + CHARACTER_LENGTH + + + CHECK + + + CLOSE + + + COALESCE + + + COLLATE + + + COLLATION + + + COLUMN + + + COMMIT + + + CONNECT + + + CONNECTION + + + CONSTRAINT + + + CONSTRAINTS + + + CONTINUE + + + CONVERT + + + CORRESPONDING + + + COUNT + + + CREATE + + + CROSS + + + CURRENT + + + CURRENT_DATE + + + CURRENT_TIME + + + CURRENT_TIMESTAMP + + + CURRENT_USER + + + CURSOR + + + DATE + + + DAY + + + DEALLOCATE + + + DEC + + + DECIMAL + + + DECLARE + + + DEFAULT + + + DEFERRABLE + + + DEFERRED + + + DELETE + + + DESC + + + DESCRIBE + + + DESCRIPTOR + + + DIAGNOSTICS + + + DISCONNECT + + + DISTINCT + + + DISTINCTROW + + + DOMAIN + + + DOUBLE + + + DROP + + + ELSE + + + END + + + END-EXEC + + + ESCAPE + + + EXCEPT + + + EXCEPTION + + + EXEC + + + EXECUTE + + + EXISTS + + + EXTERNAL + + + EXTRACT + + + FALSE + + + FETCH + + + FIRST + + + FLOAT + + + FOR + + + FOREIGN + + + FOUND + + + FROM + + + FULL + + + GET + + + GLOBAL + + + GO + + + GOTO + + + GRANT + + + GROUP + + + HAVING + + + HOUR + + + IDENTITY + + + IMMEDIATE + + + IN + + + INDICATOR + + + INITIALLY + + + INNER + + + INPUT + + + INSENSITIVE + + + INSERT + + + INT + + + INTEGER + + + INTERSECT + + + INTERVAL + + + INTO + + + IS + + + ISOLATION + + + JOIN + + + KEY + + + LANGUAGE + + + LAST + + + LEADING + + + LEFT + + + LEVEL + + + LIKE + + + LOCAL + + + LOWER + + + MATCH + + + MAX + + + MIN + + + MINUTE + + + MODULE + + + MONTH + + + NAMES + + + NATIONAL + + + NATURAL + + + NCHAR + + + NEXT + + + NO + + + NOT + + + NULL + + + NULLIF + + + NUMERIC + + + OCTET_LENGTH + + + OF + + + ON + + + ONLY + + + OPEN + + + OPTION + + + OR + + + ORDER + + + OUTER + + + OUTPUT + + + OVERLAPS + + + PARTIAL + + + POSITION + + + PRECISION + + + PREPARE + + + PRESERVE + + + PRIMARY + + + PRIOR + + + PRIVILEGES + + + PROCEDURE + + + PUBLIC + + + READ + + + REAL + + + REFERENCES + + + RELATIVE + + + RESTRICT + + + REVOKE + + + RIGHT + + + ROLLBACK + + + ROWS + + + SCHEMA + + + SCROLL + + + SECOND + + + SECTION + + + SELECT + + + SESSION + + + SESSION_USER + + + SET + + + SIZE + + + SMALLINT + + + SOME + + + SQL + + + SQLCODE + + + SQLERROR + + + SQLSTATE + + + SUBSTRING + + + SUM + + + SYSTEM_USER + + + TABLE + + + TEMPORARY + + + THEN + + + TIME + + + TIMESTAMP + + + TIMEZONE_HOUR + + + TIMEZONE_MINUTE + + + TO + + + TRAILING + + + TRANSACTION + + + TRANSLATE + + + TRANSLATION + + + TRIGGER + + + TRIM + + + TRUE + + + UNION + + + UNIQUE + + + UNKNOWN + + + UPDATE + + + UPPER + + + USAGE + + + USER + + + USING + + + VALUE + + + VALUES + + + VARCHAR + + + VARYING + + + VIEW + + + WHEN + + + WHENEVER + + + WHERE + + + WITH + + + WORK + + + WRITE + + + YEAR + + + ZONE + + \ No newline at end of file diff --git a/src/System.Data.OleDb/src/RowBinding.cs b/src/System.Data.OleDb/src/RowBinding.cs new file mode 100644 index 000000000000..52af287c02f4 --- /dev/null +++ b/src/System.Data.OleDb/src/RowBinding.cs @@ -0,0 +1,644 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Data.Common; +using System.Diagnostics; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +namespace System.Data.OleDb +{ + sealed internal class RowBinding : System.Data.ProviderBase.DbBuffer + { + private readonly int _bindingCount; + private readonly int _headerLength; + private readonly int _dataLength; + private readonly int _emptyStringOffset; + + private UnsafeNativeMethods.IAccessor _iaccessor; + private IntPtr _accessorHandle; + + private readonly bool _needToReset; + private bool _haveData; + + // tagDBBINDING[] starting 64bit aligned + // all DBSTATUS values (32bit per value), starting 64bit aligned + // all DBLENGTH values (32/64bit per value), starting 64bit alignedsa + // all data values listed after that (variable length), each individual starting 64bit aligned + // Int64 - zero for pointers to emptystring + + internal static RowBinding CreateBuffer(int bindingCount, int databuffersize, bool needToReset) + { + int headerLength = RowBinding.AlignDataSize(bindingCount * ODB.SizeOf_tagDBBINDING); + int length = RowBinding.AlignDataSize(headerLength + databuffersize) + 8; // 8 bytes for a null terminated string + return new RowBinding(bindingCount, headerLength, databuffersize, length, needToReset); + } + + private RowBinding(int bindingCount, int headerLength, int dataLength, int length, bool needToReset) : base(length) + { + _bindingCount = bindingCount; + _headerLength = headerLength; + _dataLength = dataLength; + _emptyStringOffset = length - 8; // 8 bytes for a null terminated string + _needToReset = needToReset; + + Debug.Assert(0 < _bindingCount, "bad _bindingCount"); + Debug.Assert(0 < _headerLength, "bad _headerLength"); + Debug.Assert(0 < _dataLength, "bad _dataLength"); + Debug.Assert(_bindingCount * 3 * IntPtr.Size <= _dataLength, "_dataLength too small"); + Debug.Assert(_headerLength + _dataLength <= _emptyStringOffset, "bad string offset"); + Debug.Assert(_headerLength + _dataLength + 8 <= length, "bad length"); + } + + internal void StartDataBlock() + { + if (_haveData) + { + Debug.Assert(false, "previous row not yet cleared"); + ResetValues(); + } + _haveData = true; + } + + internal int BindingCount() + { + return _bindingCount; + } + + internal IntPtr DangerousGetAccessorHandle() + { + return _accessorHandle; + } + + internal IntPtr DangerousGetDataPtr() + { + //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + // NOTE: You must have called DangerousAddRef before calling this + // method, or you run the risk of allowing Handle Recycling + // to occur! + //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + return ADP.IntPtrOffset(DangerousGetHandle(), _headerLength); + } + + internal IntPtr DangerousGetDataPtr(int valueOffset) + { + //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + // NOTE: You must have called DangerousAddRef before calling this + // method, or you run the risk of allowing Handle Recycling + // to occur! + //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + return ADP.IntPtrOffset(DangerousGetHandle(), valueOffset); + } + + internal OleDbHResult CreateAccessor(UnsafeNativeMethods.IAccessor iaccessor, int flags, ColumnBinding[] bindings) + { + OleDbHResult hr = 0; + int[] rowBindStatus = new int[BindingCount()]; + + _iaccessor = iaccessor; + hr = iaccessor.CreateAccessor(flags, (IntPtr)rowBindStatus.Length, this, (IntPtr)_dataLength, out _accessorHandle, rowBindStatus); + + for (int k = 0; k < rowBindStatus.Length; ++k) + { + if (DBBindStatus.OK != (DBBindStatus)rowBindStatus[k]) + { + if (ODB.DBACCESSOR_PARAMETERDATA == flags) + { + throw ODB.BadStatus_ParamAcc(bindings[k].ColumnBindingOrdinal, (DBBindStatus)rowBindStatus[k]); + } + else if (ODB.DBACCESSOR_ROWDATA == flags) + { + throw ODB.BadStatusRowAccessor(bindings[k].ColumnBindingOrdinal, (DBBindStatus)rowBindStatus[k]); + } + else + Debug.Assert(false, "unknown accessor buffer"); + } + } + return hr; + } + + internal ColumnBinding[] SetBindings(OleDbDataReader dataReader, Bindings bindings, + int indexStart, int indexForAccessor, + OleDbParameter[] parameters, tagDBBINDING[] dbbindings, bool ifIRowsetElseIRow) + { + Debug.Assert(null != bindings, "null bindings"); + Debug.Assert(dbbindings.Length == BindingCount(), "count mismatch"); + + bool mustRelease = false; + + RuntimeHelpers.PrepareConstrainedRegions(); + try + { + DangerousAddRef(ref mustRelease); + + IntPtr buffer = DangerousGetHandle(); + for (int i = 0; i < dbbindings.Length; ++i) + { + IntPtr ptr = ADP.IntPtrOffset(buffer, (i * ODB.SizeOf_tagDBBINDING)); + Marshal.StructureToPtr(dbbindings[i], ptr, false/*deleteold*/); + } + } + finally + { + if (mustRelease) + { + DangerousRelease(); + } + } + + ColumnBinding[] columns = new ColumnBinding[dbbindings.Length]; + for (int indexWithinAccessor = 0; indexWithinAccessor < columns.Length; ++indexWithinAccessor) + { + int index = indexStart + indexWithinAccessor; + OleDbParameter parameter = ((null != parameters) ? parameters[index] : null); + columns[indexWithinAccessor] = new ColumnBinding( + dataReader, index, indexForAccessor, indexWithinAccessor, + parameter, this, bindings, dbbindings[indexWithinAccessor], _headerLength, + ifIRowsetElseIRow); + } + return columns; + } + + static internal int AlignDataSize(int value) + { + // buffer data to start on 8-byte boundary + return Math.Max(8, (value + 7) & ~0x7); + } + + internal object GetVariantValue(int offset) + { + Debug.Assert(_needToReset, "data type requires reseting and _needToReset is false"); + Debug.Assert(0 == (ODB.SizeOf_Variant % 8), "unexpected VARIANT size mutiplier"); + Debug.Assert(0 == offset % 8, "invalid alignment"); + ValidateCheck(offset, 2 * ODB.SizeOf_Variant); + + object value = null; + bool mustRelease = false; + RuntimeHelpers.PrepareConstrainedRegions(); + try + { + DangerousAddRef(ref mustRelease); + + IntPtr buffer = ADP.IntPtrOffset(DangerousGetHandle(), offset); + value = Marshal.GetObjectForNativeVariant(buffer); + } + finally + { + if (mustRelease) + { + DangerousRelease(); + } + } + + return ((null != value) ? value : DBNull.Value); + } + + // translate to native + internal void SetVariantValue(int offset, object value) + { + // two contigous VARIANT structures, second should be a binary copy of the first + Debug.Assert(_needToReset, "data type requires reseting and _needToReset is false"); + Debug.Assert(0 == (ODB.SizeOf_Variant % 8), "unexpected VARIANT size mutiplier"); + Debug.Assert(0 == offset % 8, "invalid alignment"); + ValidateCheck(offset, 2 * ODB.SizeOf_Variant); + + IntPtr buffer = ADP.PtrZero; + bool mustRelease = false; + RuntimeHelpers.PrepareConstrainedRegions(); + try + { + DangerousAddRef(ref mustRelease); + + buffer = ADP.IntPtrOffset(DangerousGetHandle(), offset); + + RuntimeHelpers.PrepareConstrainedRegions(); + try + { + // GetNativeVariantForObject must be in try block since it has no reliability contract + Marshal.GetNativeVariantForObject(value, buffer); + } + finally + { + // safe to copy memory(dst,src,count), even if GetNativeVariantForObject failed + NativeOledbWrapper.MemoryCopy(ADP.IntPtrOffset(buffer, ODB.SizeOf_Variant), buffer, ODB.SizeOf_Variant); + } + } + finally + { + if (mustRelease) + { + DangerousRelease(); + } + } + } + + // value + // cached value + // cached zero value + // translate to native + internal void SetBstrValue(int offset, string value) + { + // two contigous BSTR ptr, second should be a binary copy of the first + Debug.Assert(_needToReset, "data type requires reseting and _needToReset is false"); + Debug.Assert(0 == offset % ADP.PtrSize, "invalid alignment"); + ValidateCheck(offset, 2 * IntPtr.Size); + + IntPtr ptr; + bool mustRelease = false; + RuntimeHelpers.PrepareConstrainedRegions(); + try + { + DangerousAddRef(ref mustRelease); + + RuntimeHelpers.PrepareConstrainedRegions(); + try + { } + finally + { + ptr = SafeNativeMethods.SysAllocStringLen(value, value.Length); + + // safe to copy ptr, even if SysAllocStringLen failed + Marshal.WriteIntPtr(base.handle, offset, ptr); + Marshal.WriteIntPtr(base.handle, offset + ADP.PtrSize, ptr); + } + } + finally + { + if (mustRelease) + { + DangerousRelease(); + } + } + if (IntPtr.Zero == ptr) + { + throw new OutOfMemoryException(); + } + } + + // translate to native + internal void SetByRefValue(int offset, IntPtr pinnedValue) + { + Debug.Assert(_needToReset, "data type requires reseting and _needToReset is false"); + Debug.Assert(0 == offset % ADP.PtrSize, "invalid alignment"); + ValidateCheck(offset, 2 * IntPtr.Size); + + if (ADP.PtrZero == pinnedValue) + { // empty array scenario + pinnedValue = ADP.IntPtrOffset(base.handle, _emptyStringOffset); + } + bool mustRelease = false; + RuntimeHelpers.PrepareConstrainedRegions(); + try + { + DangerousAddRef(ref mustRelease); + + RuntimeHelpers.PrepareConstrainedRegions(); + try + { } + finally + { + Marshal.WriteIntPtr(base.handle, offset, pinnedValue); // parameter input value + Marshal.WriteIntPtr(base.handle, offset + ADP.PtrSize, pinnedValue); // original parameter value + } + } + finally + { + if (mustRelease) + { + DangerousRelease(); + } + } + } + + internal void CloseFromConnection() + { + _iaccessor = null; + _accessorHandle = ODB.DB_INVALID_HACCESSOR; + } + + internal new void Dispose() + { + ResetValues(); + + UnsafeNativeMethods.IAccessor iaccessor = _iaccessor; + IntPtr accessorHandle = _accessorHandle; + + _iaccessor = null; + _accessorHandle = ODB.DB_INVALID_HACCESSOR; + + if ((ODB.DB_INVALID_HACCESSOR != accessorHandle) && (null != iaccessor)) + { + OleDbHResult hr; + int refcount; + hr = iaccessor.ReleaseAccessor(accessorHandle, out refcount); + if (hr < 0) + { // ignore any error msgs + SafeNativeMethods.Wrapper.ClearErrorInfo(); + } + } + + base.Dispose(); + } + + internal void ResetValues() + { + if (_needToReset && _haveData) + { + lock (this) + { // prevent Dispose/ResetValues race condition + + bool mustRelease = false; + RuntimeHelpers.PrepareConstrainedRegions(); + try + { + DangerousAddRef(ref mustRelease); + + ResetValues(DangerousGetHandle(), _iaccessor); + } + finally + { + if (mustRelease) + { + DangerousRelease(); + } + } + } + } + else + { + _haveData = false; + } +#if DEBUG + // verify types that need reseting are not forgotton, since the code + // that sets this up is in dbbinding.cs, MaxLen { set; } + if (!_needToReset) + { + Debug.Assert(0 <= _bindingCount && (_bindingCount * ODB.SizeOf_tagDBBINDING) < Length, "bad _bindingCount"); + for (int i = 0; i < _bindingCount; ++i) + { + short wtype = ReadInt16((i * ODB.SizeOf_tagDBBINDING) + ODB.OffsetOf_tagDBBINDING_wType); + switch (wtype) + { + case (NativeDBType.BYREF | NativeDBType.BYTES): + case (NativeDBType.BYREF | NativeDBType.WSTR): + case NativeDBType.PROPVARIANT: + case NativeDBType.VARIANT: + case NativeDBType.BSTR: + case NativeDBType.HCHAPTER: + Debug.Assert(false, "expected _needToReset"); + break; + } + } + } +#endif + } + + private unsafe void ResetValues(IntPtr buffer, object iaccessor) + { + Debug.Assert(ADP.PtrZero != buffer && _needToReset && _haveData, "shouldn't be calling ResetValues"); + for (int i = 0; i < _bindingCount; ++i) + { + IntPtr ptr = ADP.IntPtrOffset(buffer, (i * ODB.SizeOf_tagDBBINDING)); + + int valueOffset = _headerLength + Marshal.ReadIntPtr(ptr, ODB.OffsetOf_tagDBBINDING_obValue).ToInt32(); + short wtype = Marshal.ReadInt16(ptr, ODB.OffsetOf_tagDBBINDING_wType); + + switch (wtype) + { + case (NativeDBType.BYREF | NativeDBType.BYTES): + case (NativeDBType.BYREF | NativeDBType.WSTR): + ValidateCheck(valueOffset, 2 * IntPtr.Size); + FreeCoTaskMem(buffer, valueOffset); + break; + case NativeDBType.PROPVARIANT: + ValidateCheck(valueOffset, 2 * sizeof(PROPVARIANT)); + FreePropVariant(buffer, valueOffset); + break; + case NativeDBType.VARIANT: + ValidateCheck(valueOffset, 2 * ODB.SizeOf_Variant); + FreeVariant(buffer, valueOffset); + break; + case NativeDBType.BSTR: + ValidateCheck(valueOffset, 2 * IntPtr.Size); + FreeBstr(buffer, valueOffset); + break; + case NativeDBType.HCHAPTER: + if (null != iaccessor) + { + // iaccessor will always be null when from ReleaseHandle + FreeChapter(buffer, valueOffset, iaccessor); + } + break; +#if DEBUG + + case NativeDBType.EMPTY: + case NativeDBType.NULL: + case NativeDBType.I2: + case NativeDBType.I4: + case NativeDBType.R4: + case NativeDBType.R8: + case NativeDBType.CY: + case NativeDBType.DATE: + case NativeDBType.ERROR: + case NativeDBType.BOOL: + case NativeDBType.DECIMAL: + case NativeDBType.I1: + case NativeDBType.UI1: + case NativeDBType.UI2: + case NativeDBType.UI4: + case NativeDBType.I8: + case NativeDBType.UI8: + case NativeDBType.FILETIME: + case NativeDBType.GUID: + case NativeDBType.BYTES: + case NativeDBType.WSTR: + case NativeDBType.NUMERIC: + case NativeDBType.DBDATE: + case NativeDBType.DBTIME: + case NativeDBType.DBTIMESTAMP: + break; // known, do nothing + case NativeDBType.IDISPATCH: + case NativeDBType.IUNKNOWN: + break; // known, releasing RowHandle will handle lifetimes correctly + default: + Debug.Assert(false, "investigate"); + break; +#endif + } + } + _haveData = false; + } + + static private void FreeChapter(IntPtr buffer, int valueOffset, object iaccessor) + { + Debug.Assert(0 == valueOffset % 8, "unexpected unaligned ptr offset"); + + UnsafeNativeMethods.IChapteredRowset chapteredRowset = (iaccessor as UnsafeNativeMethods.IChapteredRowset); + IntPtr chapter = SafeNativeMethods.InterlockedExchangePointer(ADP.IntPtrOffset(buffer, valueOffset), ADP.PtrZero); + if (ODB.DB_NULL_HCHAPTER != chapter) + { + int refCount; + OleDbHResult hr = chapteredRowset.ReleaseChapter(chapter, out refCount); + } + } + + static private void FreeBstr(IntPtr buffer, int valueOffset) + { + Debug.Assert(0 == valueOffset % 8, "unexpected unaligned ptr offset"); + + // two contigous BSTR ptrs that need to be freed + // the second should only be freed if different from the first + RuntimeHelpers.PrepareConstrainedRegions(); + try + { } + finally + { + IntPtr currentValue = Marshal.ReadIntPtr(buffer, valueOffset); + IntPtr originalValue = Marshal.ReadIntPtr(buffer, valueOffset + ADP.PtrSize); + + if ((ADP.PtrZero != currentValue) && (currentValue != originalValue)) + { + SafeNativeMethods.SysFreeString(currentValue); + } + if (ADP.PtrZero != originalValue) + { + SafeNativeMethods.SysFreeString(originalValue); + } + + // for debugability - delay clearing memory until after FreeBSTR + Marshal.WriteIntPtr(buffer, valueOffset, ADP.PtrZero); + Marshal.WriteIntPtr(buffer, valueOffset + ADP.PtrSize, ADP.PtrZero); + } + } + + static private void FreeCoTaskMem(IntPtr buffer, int valueOffset) + { + Debug.Assert(0 == valueOffset % 8, "unexpected unaligned ptr offset"); + + // two contigous CoTaskMemAlloc ptrs that need to be freed + // the first should only be freed if different from the first + RuntimeHelpers.PrepareConstrainedRegions(); + try + { } + finally + { + IntPtr currentValue = Marshal.ReadIntPtr(buffer, valueOffset); + IntPtr originalValue = Marshal.ReadIntPtr(buffer, valueOffset + ADP.PtrSize); + + // originalValue is pinned managed memory or pointer to emptyStringOffset + if ((ADP.PtrZero != currentValue) && (currentValue != originalValue)) + { + SafeNativeMethods.CoTaskMemFree(currentValue); + } + + // for debugability - delay clearing memory until after CoTaskMemFree + Marshal.WriteIntPtr(buffer, valueOffset, ADP.PtrZero); + Marshal.WriteIntPtr(buffer, valueOffset + ADP.PtrSize, ADP.PtrZero); + } + } + + static private void FreeVariant(IntPtr buffer, int valueOffset) + { + // two contigous VARIANT structures that need to be freed + // the second should only be freed if different from the first + + Debug.Assert(0 == (ODB.SizeOf_Variant % 8), "unexpected VARIANT size mutiplier"); + Debug.Assert(0 == valueOffset % 8, "unexpected unaligned ptr offset"); + + IntPtr currentHandle = ADP.IntPtrOffset(buffer, valueOffset); + IntPtr originalHandle = ADP.IntPtrOffset(buffer, valueOffset + ODB.SizeOf_Variant); + bool different = NativeOledbWrapper.MemoryCompare(currentHandle, originalHandle, ODB.SizeOf_Variant); + + RuntimeHelpers.PrepareConstrainedRegions(); + try + { } + finally + { + // always clear the first structure + SafeNativeMethods.VariantClear(currentHandle); + if (different) + { + // second structure different from the first + SafeNativeMethods.VariantClear(originalHandle); + } + else + { + // second structure same as the first, just clear the field + SafeNativeMethods.ZeroMemory(originalHandle, ODB.SizeOf_Variant); + } + } + } + + static unsafe private void FreePropVariant(IntPtr buffer, int valueOffset) + { + // two contigous PROPVARIANT structures that need to be freed + // the second should only be freed if different from the first + Debug.Assert(0 == (sizeof(PROPVARIANT) % 8), "unexpected PROPVARIANT size mutiplier"); + Debug.Assert(0 == valueOffset % 8, "unexpected unaligned ptr offset"); + + IntPtr currentHandle = ADP.IntPtrOffset(buffer, valueOffset); + IntPtr originalHandle = ADP.IntPtrOffset(buffer, valueOffset + sizeof(PROPVARIANT)); + bool different = NativeOledbWrapper.MemoryCompare(currentHandle, originalHandle, sizeof(PROPVARIANT)); + + RuntimeHelpers.PrepareConstrainedRegions(); + try + { } + finally + { + // always clear the first structure + SafeNativeMethods.PropVariantClear(currentHandle); + if (different) + { + // second structure different from the first + SafeNativeMethods.PropVariantClear(originalHandle); + } + else + { + // second structure same as the first, just clear the field + SafeNativeMethods.ZeroMemory(originalHandle, sizeof(PROPVARIANT)); + } + } + } + + internal IntPtr InterlockedExchangePointer(int offset) + { + ValidateCheck(offset, IntPtr.Size); + Debug.Assert(0 == offset % ADP.PtrSize, "invalid alignment"); + + IntPtr value; + bool mustRelease = false; + RuntimeHelpers.PrepareConstrainedRegions(); + try + { + DangerousAddRef(ref mustRelease); + + IntPtr ptr = ADP.IntPtrOffset(DangerousGetHandle(), offset); + value = SafeNativeMethods.InterlockedExchangePointer(ptr, IntPtr.Zero); + } + finally + { + if (mustRelease) + { + DangerousRelease(); + } + } + return value; + } + + override protected bool ReleaseHandle() + { + // NOTE: The SafeHandle class guarantees this will be called exactly once. + _iaccessor = null; + if (_needToReset && _haveData) + { + IntPtr buffer = base.handle; + if (IntPtr.Zero != buffer) + { + ResetValues(buffer, null); + } + } + return base.ReleaseHandle(); + } + } +} diff --git a/src/System.Data.OleDb/src/SafeHandles.cs b/src/System.Data.OleDb/src/SafeHandles.cs new file mode 100644 index 000000000000..ab6ddbf74e15 --- /dev/null +++ b/src/System.Data.OleDb/src/SafeHandles.cs @@ -0,0 +1,827 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Data.Common; +using System.Data.ProviderBase; +using System.Diagnostics; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Runtime.Versioning; + +namespace System.Data.OleDb +{ + internal sealed class DualCoTaskMem : SafeHandle + { + private IntPtr handle2; // this must be protected so derived classes can use out params. + + private DualCoTaskMem() : base(IntPtr.Zero, true) + { + this.handle2 = IntPtr.Zero; + } + + // IDBInfo.GetLiteralInfo + internal DualCoTaskMem(UnsafeNativeMethods.IDBInfo dbInfo, int[] literals, out int literalCount, out IntPtr literalInfo, out OleDbHResult hr) : this() + { + int count = (null != literals) ? literals.Length : 0; + hr = dbInfo.GetLiteralInfo(count, literals, out literalCount, out base.handle, out this.handle2); + literalInfo = base.handle; + } + + // IColumnsInfo.GetColumnInfo + internal DualCoTaskMem(UnsafeNativeMethods.IColumnsInfo columnsInfo, out IntPtr columnCount, out IntPtr columnInfos, out OleDbHResult hr) : this() + { + hr = columnsInfo.GetColumnInfo(out columnCount, out base.handle, out this.handle2); + columnInfos = base.handle; + } + + // IDBSchemaRowset.GetSchemas + internal DualCoTaskMem(UnsafeNativeMethods.IDBSchemaRowset dbSchemaRowset, out int schemaCount, out IntPtr schemaGuids, out IntPtr schemaRestrictions, out OleDbHResult hr) : this() + { + hr = dbSchemaRowset.GetSchemas(out schemaCount, out base.handle, out this.handle2); + schemaGuids = base.handle; + schemaRestrictions = this.handle2; + } + + internal DualCoTaskMem(UnsafeNativeMethods.IColumnsRowset icolumnsRowset, out IntPtr cOptColumns, out OleDbHResult hr) : base(IntPtr.Zero, true) + { + hr = icolumnsRowset.GetAvailableColumns(out cOptColumns, out base.handle); + } + + public override bool IsInvalid + { + get + { + return (((IntPtr.Zero == base.handle)) && (IntPtr.Zero == this.handle2)); + } + } + + protected override bool ReleaseHandle() + { + // NOTE: The SafeHandle class guarantees this will be called exactly once. + + IntPtr ptr = base.handle; + base.handle = IntPtr.Zero; + if (IntPtr.Zero != ptr) + { + SafeNativeMethods.CoTaskMemFree(ptr); + } + + ptr = this.handle2; + this.handle2 = IntPtr.Zero; + if (IntPtr.Zero != ptr) + { + SafeNativeMethods.CoTaskMemFree(ptr); + } + return true; + } + } + + internal sealed class RowHandleBuffer : DbBuffer + { + internal RowHandleBuffer(IntPtr rowHandleFetchCount) : base((int)rowHandleFetchCount * ADP.PtrSize) + { + } + + internal IntPtr GetRowHandle(int index) + { + IntPtr value = ReadIntPtr(index * ADP.PtrSize); + Debug.Assert(ODB.DB_NULL_HROW != value, "bad rowHandle"); + return value; + } + } + + internal sealed class StringMemHandle : DbBuffer + { + internal StringMemHandle(string value) : base((null != value) ? checked(2 + 2 * value.Length) : 0) + { + if (null != value) + { + // null-termination exists because of the extra 2+ which is zero'd during on allocation + WriteCharArray(0, value.ToCharArray(), 0, value.Length); + } + } + } + + internal sealed class ChapterHandle : WrappedIUnknown + { + internal static readonly ChapterHandle DB_NULL_HCHAPTER = new ChapterHandle(IntPtr.Zero); + private IntPtr _chapterHandle; + + internal static ChapterHandle CreateChapterHandle(object chapteredRowset, RowBinding binding, int valueOffset) + { + if ((null == chapteredRowset) || (IntPtr.Zero == binding.ReadIntPtr(valueOffset))) + { + return ChapterHandle.DB_NULL_HCHAPTER; + } + return new ChapterHandle(chapteredRowset, binding, valueOffset); + } + + // from ADODBRecordSetConstruction we do not want to release the initial chapter handle + internal static ChapterHandle CreateChapterHandle(IntPtr chapter) + { + if (IntPtr.Zero == chapter) + { + return ChapterHandle.DB_NULL_HCHAPTER; + } + return new ChapterHandle(chapter); + } + + // from ADODBRecordSetConstruction we do not want to release the initial chapter handle + private ChapterHandle(IntPtr chapter) : base((object)null) + { + _chapterHandle = chapter; + } + + private ChapterHandle(object chapteredRowset, RowBinding binding, int valueOffset) : base(chapteredRowset) + { + RuntimeHelpers.PrepareConstrainedRegions(); + try + { } + finally + { + _chapterHandle = binding.InterlockedExchangePointer(valueOffset); + } + } + + internal IntPtr HChapter + { + get + { + return _chapterHandle; + } + } + + protected override bool ReleaseHandle() + { + // NOTE: The SafeHandle class guarantees this will be called exactly once and is non-interrutible. + IntPtr chapter = _chapterHandle; + _chapterHandle = IntPtr.Zero; + + if ((IntPtr.Zero != base.handle) && (IntPtr.Zero != chapter)) + { + OleDbHResult hr = (OleDbHResult)NativeOledbWrapper.IChapteredRowsetReleaseChapter(base.handle, chapter); + } + return base.ReleaseHandle(); + } + } + + [Guid("0fb15084-af41-11ce-bd2b-204c4f4f5020")] + [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] + [ComImport] + internal interface ITransaction + { + [PreserveSig] + int Commit + ( + [In] bool fRetaining, + [In] uint grfTC, + [In] uint grfRM + ); + + [PreserveSig] + int Abort + ( + [In] IntPtr pboidReason, + [In] bool fRetaining, + [In] bool fAsync + ); + + [PreserveSig] + int GetTransactionInfo + ( + [Out] IntPtr pinfo + ); + } + + [Guid("0c733a93-2a1c-11ce-ade5-00aa0044773d")] + [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] + [ComImport] + unsafe internal interface ITransactionLocal : ITransaction + { + [PreserveSig] + new int Commit + ( + [In] bool fRetaining, + [In] uint grfTC, + [In] uint grfRM + ); + + [PreserveSig] + new int Abort + ( + [In] IntPtr pboidReason, + [In] bool fRetaining, + [In] bool fAsync + ); + + [PreserveSig] + new int GetTransactionInfo + ( + [Out] IntPtr pinfo + ); + + [PreserveSig] + int GetOptionsObject( + [Out, Optional] IntPtr ppOptions + ); + + [PreserveSig] + int StartTransaction( + [In] int isoLevel, + [In] uint isoFlags, + [In, Optional] IntPtr pOtherOptions, + [Out, Optional] uint* pulTransactionLevel + ); + } + + internal enum XACTTC + { + XACTTC_NONE = 0x0000, + XACTTC_SYNC_PHASEONE = 0x0001, + XACTTC_SYNC_PHASETWO = 0x0002, + XACTTC_SYNC = 0x0002, + XACTTC_ASYNC_PHASEONE = 0x0004, + XACTTC_ASYNC = 0x0004 + } + + #region PROPVARIANT + + /// + /// Managed view of unmanaged PROPVARIANT type + /// + /// + /// PROPVARIANT can represent many different things. We are only interested in strings + /// for this version but the full range of values is listed her for completeness. + /// + /// typedef unsigned short VARTYPE; + /// typedef unsigned short WORD; + /// typedef struct PROPVARIANT { + /// VARTYPE vt; WORD wReserved1; WORD wReserved2; WORD wReserved3; + /// union { + /// CHAR cVal; + /// UCHAR bVal; + /// SHORT iVal; + /// USHORT uiVal; + /// LONG lVal; + /// INT intVal; + /// ULONG ulVal; + /// UINT uintVal; + /// LARGE_INTEGER hVal; + /// ULARGE_INTEGER uhVal; + /// FLOAT fltVal; DOUBLE dblVal; CY cyVal; DATE date; + /// BSTR bstrVal; VARIANT_BOOL boolVal; SCODE scode; + /// FILETIME filetime; LPSTR pszVal; LPWSTR pwszVal; + /// CLSID* puuid; CLIPDATA* pclipdata; BLOB blob; + /// IStream* pStream; IStorage* pStorage; IUnknown* punkVal; + /// IDispatch* pdispVal; LPSAFEARRAY parray; CAC cac; + /// CAUB caub; CAI cai; CAUI caui; CAL cal; CAUL caul; + /// CAH cah; CAUH cauh; CAFLT caflt; CADBL cadbl; + /// CACY cacy; CADATE cadate; CABSTR cabstr; + /// CABOOL cabool; CASCODE cascode; CALPSTR calpstr; + /// CALPWSTR calpwstr; CAFILETIME cafiletime; CACLSID cauuid; + /// CACLIPDATA caclipdata; CAPROPVARIANT capropvar; + /// CHAR* pcVal; UCHAR* pbVal; SHORT* piVal; USHORT* puiVal; + /// LONG* plVal; ULONG* pulVal; INT* pintVal; UINT* puintVal; + /// FLOAT* pfltVal; DOUBLE* pdblVal; VARIANT_BOOL* pboolVal; + /// DECIMAL* pdecVal; SCODE* pscode; CY* pcyVal; + /// PROPVARIANT* pvarVal; + /// }; + /// } PROPVARIANT; + /// + [StructLayout(LayoutKind.Sequential, Pack = 0)] + internal struct PROPVARIANT + { + /// + /// Variant type + /// + internal VARTYPE vt; + + /// + /// unused + /// + internal ushort wReserved1; + + /// + /// unused + /// + internal ushort wReserved2; + + /// + /// unused + /// + internal ushort wReserved3; + + /// + /// union where the actual variant value lives + /// + internal PropVariantUnion union; + } + + /// + /// enumeration for all legal types of a PROPVARIANT + /// + /// add definitions as needed + internal enum VARTYPE : short + { + /// + /// BSTR + /// + VT_BSTR = 8, // BSTR allocated using SysAllocString + + /// + /// LPSTR + /// + VT_LPSTR = 30, + + /// + /// FILETIME + /// + VT_FILETIME = 64, + } + + /// + /// Union portion of PROPVARIANT + /// + /// + /// All fields (or their placeholders) are declared even if + /// they are not used. This is to make sure that the size of + /// the union matches the size of the union in + /// the actual unmanaged PROPVARIANT structure + /// for all architectures (32-bit/64-bit). + /// Points to note: + /// - All pointer type fields are declared as IntPtr. + /// - CAxxx type fields (like CAC, CAUB, etc.) are all of same + /// structural layout, hence not all declared individually + /// since they are not used. A placeholder CArray + /// is used to represent all of them to account for the + /// size of these types. CArray is defined later. + /// - Rest of the fields are declared with corresponding + /// managed equivalent types. + /// + [StructLayout(LayoutKind.Explicit)] + internal struct PropVariantUnion + { + /// + /// CHAR + /// + [FieldOffset(0)] + internal sbyte cVal; + + /// + /// UCHAR + /// + [FieldOffset(0)] + internal byte bVal; + + /// + /// SHORT + /// + [FieldOffset(0)] + internal short iVal; + + /// + /// USHORT + /// + [FieldOffset(0)] + internal ushort uiVal; + + /// + /// LONG + /// + [FieldOffset(0)] + internal int lVal; + + /// + /// ULONG + /// + [FieldOffset(0)] + internal uint ulVal; + + /// + /// INT + /// + [FieldOffset(0)] + internal int intVal; + + /// + /// UINT + /// + [FieldOffset(0)] + internal uint uintVal; + + /// + /// LARGE_INTEGER + /// + [FieldOffset(0)] + internal Int64 hVal; + + /// + /// ULARGE_INTEGER + /// + [FieldOffset(0)] + internal UInt64 uhVal; + + /// + /// FLOAT + /// + [FieldOffset(0)] + internal float fltVal; + + /// + /// DOUBLE + /// + [FieldOffset(0)] + internal double dblVal; + + /// + /// VARIANT_BOOL + /// + [FieldOffset(0)] + internal short boolVal; + + /// + /// SCODE + /// + [FieldOffset(0)] + internal int scode; + + /// + /// CY + /// + [FieldOffset(0)] + internal CY cyVal; + + /// + /// DATE + /// + [FieldOffset(0)] + internal double date; + + /// + /// FILETIME + /// + [FieldOffset(0)] + internal System.Runtime.InteropServices.ComTypes.FILETIME filetime; + + /// + /// CLSID* + /// + [FieldOffset(0)] + internal IntPtr puuid; + + /// + /// CLIPDATA* + /// + [FieldOffset(0)] + internal IntPtr pclipdata; + + /// + /// BSTR + /// + [FieldOffset(0)] + internal IntPtr bstrVal; + + /// + /// BSTRBLOB + /// + [FieldOffset(0)] + internal BSTRBLOB bstrblobVal; + + /// + /// BLOB + /// + [FieldOffset(0)] + internal BLOB blob; + + /// + /// LPSTR + /// + [FieldOffset(0)] + internal IntPtr pszVal; + + /// + /// LPWSTR + /// + [FieldOffset(0)] + internal IntPtr pwszVal; + + /// + /// IUnknown* + /// + [FieldOffset(0)] + internal IntPtr punkVal; + + /// + /// IDispatch* + /// + [FieldOffset(0)] + internal IntPtr pdispVal; + + /// + /// IStream* + /// + [FieldOffset(0)] + internal IntPtr pStream; + + /// + /// IStorage* + /// + [FieldOffset(0)] + internal IntPtr pStorage; + + /// + /// LPVERSIONEDSTREAM + /// + [FieldOffset(0)] + internal IntPtr pVersionedStream; + + /// + /// LPSAFEARRAY + /// + [FieldOffset(0)] + internal IntPtr parray; + + /// + /// Placeholder for + /// CAC, CAUB, CAI, CAUI, CAL, CAUL, CAH, CAUH; CAFLT, + /// CADBL, CABOOL, CASCODE, CACY, CADATE, CAFILETIME, + /// CACLSID, CACLIPDATA, CABSTR, CABSTRBLOB, + /// CALPSTR, CALPWSTR, CAPROPVARIANT + /// + [FieldOffset(0)] + internal CArray cArray; + + /// + /// CHAR* + /// + [FieldOffset(0)] + internal IntPtr pcVal; + + /// + /// UCHAR* + /// + [FieldOffset(0)] + internal IntPtr pbVal; + + /// + /// SHORT* + /// + [FieldOffset(0)] + internal IntPtr piVal; + + /// + /// USHORT* + /// + [FieldOffset(0)] + internal IntPtr puiVal; + + /// + /// LONG* + /// + [FieldOffset(0)] + internal IntPtr plVal; + + /// + /// ULONG* + /// + [FieldOffset(0)] + internal IntPtr pulVal; + + /// + /// INT* + /// + [FieldOffset(0)] + internal IntPtr pintVal; + + /// + /// UINT* + /// + [FieldOffset(0)] + internal IntPtr puintVal; + + /// + /// FLOAT* + /// + [FieldOffset(0)] + internal IntPtr pfltVal; + + /// + /// DOUBLE* + /// + [FieldOffset(0)] + internal IntPtr pdblVal; + + /// + /// VARIANT_BOOL* + /// + [FieldOffset(0)] + internal IntPtr pboolVal; + + /// + /// DECIMAL* + /// + [FieldOffset(0)] + internal IntPtr pdecVal; + + /// + /// SCODE* + /// + [FieldOffset(0)] + internal IntPtr pscode; + + /// + /// CY* + /// + [FieldOffset(0)] + internal IntPtr pcyVal; + + /// + /// DATE* + /// + [FieldOffset(0)] + internal IntPtr pdate; + + /// + /// BSTR* + /// + [FieldOffset(0)] + internal IntPtr pbstrVal; + + /// + /// IUnknown** + /// + [FieldOffset(0)] + internal IntPtr ppunkVal; + + /// + /// IDispatch** + /// + [FieldOffset(0)] + internal IntPtr ppdispVal; + + /// + /// LPSAFEARRAY* + /// + [FieldOffset(0)] + internal IntPtr pparray; + + /// + /// PROPVARIANT* + /// + [FieldOffset(0)] + internal IntPtr pvarVal; + } + + #region Structs used by PropVariantUnion + + // + // NOTE: Verifiability requires that the + // fields of these value-types need to be public + // since PropVariantUnion has explicit layout, + // and has these value-types as its fields in a way that + // overlaps with other PropVariantUnion fields + // (same FieldOffset for multiple fields). + // + + /// + /// CY, used in PropVariantUnion. + /// + [StructLayout(LayoutKind.Sequential, Pack = 0)] + internal struct CY + { + public uint Lo; + public int Hi; + } + + /// + /// BSTRBLOB, used in PropVariantUnion. + /// + [StructLayout(LayoutKind.Sequential, Pack = 0)] + internal struct BSTRBLOB + { + public uint cbSize; + public IntPtr pData; + } + + /// + /// BLOB, used in PropVariantUnion. + /// + [StructLayout(LayoutKind.Sequential, Pack = 0)] + internal struct BLOB + { + public uint cbSize; + public IntPtr pBlobData; + } + + /// + /// CArray, used in PropVariantUnion. + /// + [StructLayout(LayoutKind.Sequential, Pack = 0)] + internal struct CArray + { + public uint cElems; + public IntPtr pElems; + } + + #endregion Structs used by PropVariantUnion + + #endregion PROPVARIANT + + internal class NativeOledbWrapper + { + internal unsafe static OleDbHResult IChapteredRowsetReleaseChapter(System.IntPtr ptr, System.IntPtr chapter) + { + OleDbHResult hr = OleDbHResult.E_UNEXPECTED; + IntPtr hchapter = chapter; + System.Data.Common.UnsafeNativeMethods.IChapteredRowset chapteredRowset = null; + RuntimeHelpers.PrepareConstrainedRegions(); + try + { } + finally + { + Guid IID_IChapteredRowset = typeof(System.Data.Common.UnsafeNativeMethods.IChapteredRowset).GUID; + hr = (OleDbHResult)Marshal.QueryInterface(ptr, ref IID_IChapteredRowset, out var pChapteredRowset); + if (pChapteredRowset != IntPtr.Zero) + { + chapteredRowset = (System.Data.Common.UnsafeNativeMethods.IChapteredRowset)Marshal.GetObjectForIUnknown(pChapteredRowset); + hr = (OleDbHResult)chapteredRowset.ReleaseChapter(hchapter, out var refcount); + Marshal.Release(pChapteredRowset); + } + } + return hr; + } + + internal unsafe static OleDbHResult ITransactionAbort(System.IntPtr ptr) + { + OleDbHResult hr = OleDbHResult.E_UNEXPECTED; + ITransactionLocal transactionLocal = null; + RuntimeHelpers.PrepareConstrainedRegions(); + try + { } + finally + { + Guid IID_ITransactionLocal = typeof(ITransactionLocal).GUID; + hr = (OleDbHResult)Marshal.QueryInterface(ptr, ref IID_ITransactionLocal, out var pTransaction); + if (pTransaction != IntPtr.Zero) + { + transactionLocal = (ITransactionLocal)Marshal.GetObjectForIUnknown(pTransaction); + hr = (OleDbHResult)transactionLocal.Abort(IntPtr.Zero, false, false); + Marshal.Release(pTransaction); + } + } + return hr; + } + + internal unsafe static OleDbHResult ITransactionCommit(System.IntPtr ptr) + { + OleDbHResult hr = OleDbHResult.E_UNEXPECTED; + ITransactionLocal transactionLocal = null; + RuntimeHelpers.PrepareConstrainedRegions(); + try + { } + finally + { + Guid IID_ITransactionLocal = typeof(ITransactionLocal).GUID; + hr = (OleDbHResult)Marshal.QueryInterface(ptr, ref IID_ITransactionLocal, out var pTransaction); + if (pTransaction != IntPtr.Zero) + { + transactionLocal = (ITransactionLocal)Marshal.GetObjectForIUnknown(pTransaction); + hr = (OleDbHResult)transactionLocal.Commit(false, (uint)XACTTC.XACTTC_SYNC_PHASETWO, 0); + Marshal.Release(pTransaction); + } + } + return hr; + } + + internal static bool MemoryCompare(System.IntPtr buf1, System.IntPtr buf2, System.Int32 count) + { + Debug.Assert(buf1 != buf2, "buf1 and buf2 are the same"); + Debug.Assert(buf1.ToInt64() < buf2.ToInt64() || buf2.ToInt64() + count <= buf1.ToInt64(), "overlapping region buf1"); + Debug.Assert(buf2.ToInt64() < buf1.ToInt64() || buf1.ToInt64() + count <= buf2.ToInt64(), "overlapping region buf2"); + Debug.Assert(0 <= count, "negative count"); + unsafe + { + ReadOnlySpan span1 = new ReadOnlySpan(buf1.ToPointer(), count); + ReadOnlySpan span2 = new ReadOnlySpan(buf2.ToPointer(), count); + return !MemoryExtensions.SequenceEqual(span1, span2); + //0​ if all count bytes of lhs and rhs are equal. + // TODO: confirm condition with tests + } + } + + internal static void MemoryCopy(System.IntPtr dst, System.IntPtr src, System.Int32 count) + { + Debug.Assert(dst != src, "dst and src are the same"); + Debug.Assert(dst.ToInt64() < src.ToInt64() || src.ToInt64() + count <= dst.ToInt64(), "overlapping region dst"); + Debug.Assert(src.ToInt64() < dst.ToInt64() || dst.ToInt64() + count <= src.ToInt64(), "overlapping region src"); + Debug.Assert(0 <= count, "negative count"); + unsafe + { + var dstSpan = new System.Span(dst.ToPointer(), count); + var srcSpan = new System.Span(src.ToPointer(), count); + srcSpan.CopyTo(dstSpan); + } + } + } +} diff --git a/src/System.Data.OleDb/src/SafeNativeMethods.cs b/src/System.Data.OleDb/src/SafeNativeMethods.cs new file mode 100644 index 000000000000..9260dc17e315 --- /dev/null +++ b/src/System.Data.OleDb/src/SafeNativeMethods.cs @@ -0,0 +1,94 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Runtime.InteropServices; +using System.Runtime.Versioning; +using System.Security; +using System.Text; +using System.Threading; + +namespace System.Data.Common +{ + [SuppressUnmanagedCodeSecurity()] + internal static class SafeNativeMethods + { + [DllImport(Interop.Libraries.Ole32, SetLastError = false)] + static internal extern IntPtr CoTaskMemAlloc(IntPtr cb); + + [DllImport(Interop.Libraries.Ole32, SetLastError = false)] + static internal extern void CoTaskMemFree(IntPtr handle); + + [DllImport(Interop.Libraries.Kernel32, CharSet = CharSet.Unicode, PreserveSig = true)] + static internal extern int GetUserDefaultLCID(); + + internal static void ZeroMemory(IntPtr ptr, int length) + { + var zeroes = new byte[length]; + Marshal.Copy(zeroes, 0, ptr, length); + } + + static internal unsafe IntPtr InterlockedExchangePointer( + IntPtr lpAddress, + IntPtr lpValue) + { + IntPtr previousPtr; + IntPtr actualPtr = *(IntPtr*)lpAddress.ToPointer(); + + do + { + previousPtr = actualPtr; + actualPtr = Interlocked.CompareExchange(ref *(IntPtr*)lpAddress.ToPointer(), lpValue, previousPtr); + } + while (actualPtr != previousPtr); + + return actualPtr; + } + + [DllImport(Interop.Libraries.Kernel32, CharSet = System.Runtime.InteropServices.CharSet.Auto)] + static internal extern int GetCurrentProcessId(); + + [DllImport(Interop.Libraries.Kernel32, SetLastError = true)] + static internal extern IntPtr LocalAlloc(int flags, IntPtr countOfBytes); + + [DllImport(Interop.Libraries.Kernel32, SetLastError = true)] + static internal extern IntPtr LocalFree(IntPtr handle); + + [DllImport(Interop.Libraries.OleAut32, CharSet = CharSet.Unicode)] + internal static extern IntPtr SysAllocStringLen(String src, int len); // BSTR + + [DllImport(Interop.Libraries.OleAut32)] + internal static extern void SysFreeString(IntPtr bstr); + + // only using this to clear existing error info with null + [DllImport(Interop.Libraries.OleAut32, CharSet = CharSet.Unicode, PreserveSig = false)] + // TLS values are preserved between threads, need to check that we use this API to clear the error state only. + static private extern void SetErrorInfo(Int32 dwReserved, IntPtr pIErrorInfo); + + [DllImport(Interop.Libraries.Kernel32, SetLastError = true)] + static internal extern int ReleaseSemaphore(IntPtr handle, int releaseCount, IntPtr previousCount); + + [DllImport(Interop.Libraries.Kernel32, SetLastError = true)] + static internal extern int WaitForMultipleObjectsEx(uint nCount, IntPtr lpHandles, bool bWaitAll, uint dwMilliseconds, bool bAlertable); + + [DllImport(Interop.Libraries.Kernel32/*, SetLastError=true*/)] + static internal extern int WaitForSingleObjectEx(IntPtr lpHandles, uint dwMilliseconds, bool bAlertable); + + [DllImport(Interop.Libraries.Ole32, PreserveSig = false)] + static internal extern void PropVariantClear(IntPtr pObject); + + [DllImport(Interop.Libraries.OleAut32, PreserveSig = false)] + static internal extern void VariantClear(IntPtr pObject); + + sealed internal class Wrapper + { + private Wrapper() { } + + // SxS: clearing error information is considered safe + static internal void ClearErrorInfo() + { + SafeNativeMethods.SetErrorInfo(0, ADP.PtrZero); + } + } + } +} diff --git a/src/System.Data.OleDb/src/System.Data.OleDb.csproj b/src/System.Data.OleDb/src/System.Data.OleDb.csproj new file mode 100644 index 000000000000..e426aa553c41 --- /dev/null +++ b/src/System.Data.OleDb/src/System.Data.OleDb.csproj @@ -0,0 +1,114 @@ + + + {D909B69D-8F3B-4551-A355-8FFF6A308CF6} + System.Data.OleDb + System.Data.OleDb + true + $(NoWarn);CS1573 + $(DefineConstants); + true + SR.PlatformNotSupported_OleDb + net461-Windows_NT-Debug;net461-Windows_NT-Release;netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netfx-Windows_NT-Debug;netfx-Windows_NT-Release;netstandard-Debug;netstandard-Release;netstandard-Unix-Debug;netstandard-Unix-Release;netstandard-Windows_NT-Debug;netstandard-Windows_NT-Release + true + false + + + + Common\Interop\Windows\Interop.Libraries.cs + + + Common\System\Data\Common\MultipartIdentifier.cs + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + System.Data.OleDb.OleDbMetaData.xml + + + + + + + + + + + + + + + diff --git a/src/System.Data.OleDb/src/System/Data/Common/AdapterUtil.cs b/src/System.Data.OleDb/src/System/Data/Common/AdapterUtil.cs new file mode 100644 index 000000000000..f81bd463aa70 --- /dev/null +++ b/src/System.Data.OleDb/src/System/Data/Common/AdapterUtil.cs @@ -0,0 +1,1329 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Collections; +using System.Collections.Generic; +using System.Configuration; +using System.Data.SqlTypes; +using System.Diagnostics; +using System.Globalization; +using System.IO; +using System.Runtime.Versioning; +using System.Security; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using System.Xml; +using Microsoft.Win32; +using SysTx = System.Transactions; + +namespace System.Data.Common +{ + internal static class ADP + { + static internal Exception ExceptionWithStackTrace(Exception e) + { + try + { + throw e; + } + catch (Exception caught) + { + return caught; + } + } + + static void TraceException(string trace, Exception e) + { + Debug.Assert(e != null, "TraceException: null Exception"); + if (e != null) + { + DataCommonEventSource.Log.Trace(trace, e); + } + } + + static internal void TraceExceptionAsReturnValue(Exception e) + { + TraceException(" '%ls'\n", e); + } + static internal void TraceExceptionForCapture(Exception e) + { + Debug.Assert(ADP.IsCatchableExceptionType(e), "Invalid exception type, should have been re-thrown!"); + TraceException(" '%ls'\n", e); + } + static internal void TraceExceptionWithoutRethrow(Exception e) + { + Debug.Assert(ADP.IsCatchableExceptionType(e), "Invalid exception type, should have been re-thrown!"); + TraceException(" '%ls'\n", e); + } + + // + // COM+ exceptions + // + static internal ArgumentException Argument(string error) + { + ArgumentException e = new ArgumentException(error); + TraceExceptionAsReturnValue(e); + return e; + } + static internal ArgumentException Argument(string error, Exception inner) + { + ArgumentException e = new ArgumentException(error, inner); + TraceExceptionAsReturnValue(e); + return e; + } + static internal ArgumentException Argument(string error, string parameter) + { + ArgumentException e = new ArgumentException(error, parameter); + TraceExceptionAsReturnValue(e); + return e; + } + static internal ArgumentException Argument(string error, string parameter, Exception inner) + { + ArgumentException e = new ArgumentException(error, parameter, inner); + TraceExceptionAsReturnValue(e); + return e; + } + static internal ArgumentNullException ArgumentNull(string parameter) + { + ArgumentNullException e = new ArgumentNullException(parameter); + TraceExceptionAsReturnValue(e); + return e; + } + static internal ArgumentNullException ArgumentNull(string parameter, string error) + { + ArgumentNullException e = new ArgumentNullException(parameter, error); + TraceExceptionAsReturnValue(e); + return e; + } + static internal ArgumentOutOfRangeException ArgumentOutOfRange(string message, string parameterName) + { + ArgumentOutOfRangeException e = new ArgumentOutOfRangeException(parameterName, message); + TraceExceptionAsReturnValue(e); + return e; + } + static internal ConfigurationException Configuration(string message) + { + ConfigurationException e = new ConfigurationErrorsException(message); + TraceExceptionAsReturnValue(e); + return e; + } + static internal IndexOutOfRangeException IndexOutOfRange(string error) + { + IndexOutOfRangeException e = new IndexOutOfRangeException(error); + TraceExceptionAsReturnValue(e); + return e; + } + static internal InvalidCastException InvalidCast(string error) + { + return InvalidCast(error, null); + } + static internal InvalidCastException InvalidCast(string error, Exception inner) + { + InvalidCastException e = new InvalidCastException(error, inner); + TraceExceptionAsReturnValue(e); + return e; + } + static internal InvalidOperationException InvalidOperation(string error) + { + InvalidOperationException e = new InvalidOperationException(error); + TraceExceptionAsReturnValue(e); + return e; + } + static internal TimeoutException TimeoutException(string error) + { + TimeoutException e = new TimeoutException(error); + TraceExceptionAsReturnValue(e); + return e; + } + static internal InvalidOperationException InvalidOperation(string error, Exception inner) + { + InvalidOperationException e = new InvalidOperationException(error, inner); + TraceExceptionAsReturnValue(e); + return e; + } + static internal NotSupportedException NotSupported() + { + NotSupportedException e = new NotSupportedException(); + TraceExceptionAsReturnValue(e); + return e; + } + static internal InvalidCastException InvalidCast() + { + InvalidCastException e = new InvalidCastException(); + TraceExceptionAsReturnValue(e); + return e; + } + static internal InvalidOperationException DataAdapter(string error) + { + return InvalidOperation(error); + } + static internal InvalidOperationException DataAdapter(string error, Exception inner) + { + return InvalidOperation(error, inner); + } + static private InvalidOperationException Provider(string error) + { + return InvalidOperation(error); + } + + static internal ArgumentException InvalidMultipartName(string property, string value) + { + ArgumentException e = new ArgumentException(SR.GetString(SR.ADP_InvalidMultipartName, SR.GetString(property), value)); + TraceExceptionAsReturnValue(e); + return e; + } + + static internal ArgumentException InvalidMultipartNameIncorrectUsageOfQuotes(string property, string value) + { + ArgumentException e = new ArgumentException(SR.GetString(SR.ADP_InvalidMultipartNameQuoteUsage, SR.GetString(property), value)); + TraceExceptionAsReturnValue(e); + return e; + } + + static internal ArgumentException InvalidMultipartNameToManyParts(string property, string value, int limit) + { + ArgumentException e = new ArgumentException(SR.GetString(SR.ADP_InvalidMultipartNameToManyParts, SR.GetString(property), value, limit)); + TraceExceptionAsReturnValue(e); + return e; + } + + // + // Helper Functions + // + static internal void CheckArgumentLength(string value, string parameterName) + { + CheckArgumentNull(value, parameterName); + if (0 == value.Length) + { + throw Argument(SR.GetString(SR.ADP_EmptyString, parameterName)); + } + } + + static internal void CheckArgumentNull(object value, string parameterName) + { + if (null == value) + { + throw ArgumentNull(parameterName); + } + } + + // only StackOverflowException & ThreadAbortException are sealed classes + static private readonly Type StackOverflowType = typeof(StackOverflowException); + static private readonly Type OutOfMemoryType = typeof(OutOfMemoryException); + static private readonly Type ThreadAbortType = typeof(ThreadAbortException); + static private readonly Type NullReferenceType = typeof(NullReferenceException); + static private readonly Type AccessViolationType = typeof(AccessViolationException); + static private readonly Type SecurityType = typeof(SecurityException); + + static internal bool IsCatchableExceptionType(Exception e) + { + // a 'catchable' exception is defined by what it is not. + Debug.Assert(e != null, "Unexpected null exception!"); + Type type = e.GetType(); + + return ((type != StackOverflowType) && + (type != OutOfMemoryType) && + (type != ThreadAbortType) && + (type != NullReferenceType) && + (type != AccessViolationType) && + !SecurityType.IsAssignableFrom(type)); + } + + static internal bool IsCatchableOrSecurityExceptionType(Exception e) + { + // a 'catchable' exception is defined by what it is not. + // since IsCatchableExceptionType defined SecurityException as not 'catchable' + // this method will return true for SecurityException has being catchable. + + // the other way to write this method is, but then SecurityException is checked twice + // return ((e is SecurityException) || IsCatchableExceptionType(e)); + + Debug.Assert(e != null, "Unexpected null exception!"); + Type type = e.GetType(); + + return ((type != StackOverflowType) && + (type != OutOfMemoryType) && + (type != ThreadAbortType) && + (type != NullReferenceType) && + (type != AccessViolationType)); + } + + // Invalid Enumeration + + static internal ArgumentOutOfRangeException InvalidEnumerationValue(Type type, int value) + { + return ADP.ArgumentOutOfRange(SR.GetString(SR.ADP_InvalidEnumerationValue, type.Name, value.ToString(System.Globalization.CultureInfo.InvariantCulture)), type.Name); + } + + // IDbCommand.CommandType + static internal ArgumentOutOfRangeException InvalidCommandType(CommandType value) + { +#if DEBUG + switch(value) { + case CommandType.Text: + case CommandType.StoredProcedure: + case CommandType.TableDirect: + Debug.Assert(false, "valid CommandType " + value.ToString()); + break; + } +#endif + return InvalidEnumerationValue(typeof(CommandType), (int)value); + } + + // IDataParameter.SourceVersion + static internal ArgumentOutOfRangeException InvalidDataRowVersion(DataRowVersion value) + { +#if DEBUG + switch(value) { + case DataRowVersion.Default: + case DataRowVersion.Current: + case DataRowVersion.Original: + case DataRowVersion.Proposed: + Debug.Assert(false, "valid DataRowVersion " + value.ToString()); + break; + } +#endif + return InvalidEnumerationValue(typeof(DataRowVersion), (int)value); + } + + // IDbConnection.BeginTransaction, OleDbTransaction.Begin + static internal ArgumentOutOfRangeException InvalidIsolationLevel(IsolationLevel value) + { +#if DEBUG + switch(value) { + case IsolationLevel.Unspecified: + case IsolationLevel.Chaos: + case IsolationLevel.ReadUncommitted: + case IsolationLevel.ReadCommitted: + case IsolationLevel.RepeatableRead: + case IsolationLevel.Serializable: + case IsolationLevel.Snapshot: + Debug.Assert(false, "valid IsolationLevel " + value.ToString()); + break; + } +#endif + return InvalidEnumerationValue(typeof(IsolationLevel), (int)value); + } + + // IDataParameter.Direction + static internal ArgumentOutOfRangeException InvalidParameterDirection(ParameterDirection value) + { +#if DEBUG + switch(value) { + case ParameterDirection.Input: + case ParameterDirection.Output: + case ParameterDirection.InputOutput: + case ParameterDirection.ReturnValue: + Debug.Assert(false, "valid ParameterDirection " + value.ToString()); + break; + } +#endif + return InvalidEnumerationValue(typeof(ParameterDirection), (int)value); + } + + // IDbCommand.UpdateRowSource + static internal ArgumentOutOfRangeException InvalidUpdateRowSource(UpdateRowSource value) + { +#if DEBUG + switch(value) { + case UpdateRowSource.None: + case UpdateRowSource.OutputParameters: + case UpdateRowSource.FirstReturnedRecord: + case UpdateRowSource.Both: + Debug.Assert(false, "valid UpdateRowSource " + value.ToString()); + break; + } +#endif + return InvalidEnumerationValue(typeof(UpdateRowSource), (int)value); + } + + // + // DbConnectionOptions, DataAccess + // + static internal ArgumentException ConnectionStringSyntax(int index) + { + return Argument(SR.GetString(SR.ADP_ConnectionStringSyntax, index)); + } + static internal ArgumentException KeywordNotSupported(string keyword) + { + return Argument(SR.GetString(SR.ADP_KeywordNotSupported, keyword)); + } + static internal ArgumentException UdlFileError(Exception inner) + { + return Argument(SR.GetString(SR.ADP_UdlFileError), inner); + } + static internal ArgumentException InvalidUDL() + { + return Argument(SR.GetString(SR.ADP_InvalidUDL)); + } + static internal InvalidOperationException InvalidDataDirectory() + { + return ADP.InvalidOperation(SR.GetString(SR.ADP_InvalidDataDirectory)); + } + static internal ArgumentException InvalidKeyname(string parameterName) + { + return Argument(SR.GetString(SR.ADP_InvalidKey), parameterName); + } + static internal ArgumentException InvalidValue(string parameterName) + { + return Argument(SR.GetString(SR.ADP_InvalidValue), parameterName); + } + static internal ArgumentException ConvertFailed(Type fromType, Type toType, Exception innerException) + { + return ADP.Argument(SR.GetString(SR.SqlConvert_ConvertFailed, fromType.FullName, toType.FullName), innerException); + } + + // + // DbConnection + // + static internal InvalidOperationException NoConnectionString() + { + return InvalidOperation(SR.GetString(SR.ADP_NoConnectionString)); + } + + static private string ConnectionStateMsg(ConnectionState state) + { + switch (state) + { + case (ConnectionState.Closed): + case (ConnectionState.Connecting | ConnectionState.Broken): // treated the same as closed + return SR.GetString(SR.ADP_ConnectionStateMsg_Closed); + case (ConnectionState.Connecting): + return SR.GetString(SR.ADP_ConnectionStateMsg_Connecting); + case (ConnectionState.Open): + return SR.GetString(SR.ADP_ConnectionStateMsg_Open); + case (ConnectionState.Open | ConnectionState.Executing): + return SR.GetString(SR.ADP_ConnectionStateMsg_OpenExecuting); + case (ConnectionState.Open | ConnectionState.Fetching): + return SR.GetString(SR.ADP_ConnectionStateMsg_OpenFetching); + default: + return SR.GetString(SR.ADP_ConnectionStateMsg, state.ToString()); + } + } + + static internal ConfigurationException ConfigUnableToLoadXmlMetaDataFile(string settingName) + { + return Configuration(SR.GetString(SR.OleDb_ConfigUnableToLoadXmlMetaDataFile, settingName)); + } + + static internal ConfigurationException ConfigWrongNumberOfValues(string settingName) + { + return Configuration(SR.GetString(SR.OleDb_ConfigWrongNumberOfValues, settingName)); + } + + // + // : DbConnectionOptions, DataAccess, SqlClient + // + static internal Exception InvalidConnectionOptionValue(string key) + { + return InvalidConnectionOptionValue(key, null); + } + static internal Exception InvalidConnectionOptionValue(string key, Exception inner) + { + return Argument(SR.GetString(SR.ADP_InvalidConnectionOptionValue, key), inner); + } + + // + // DbConnectionPool and related + // + static internal Exception PooledOpenTimeout() + { + return ADP.InvalidOperation(SR.GetString(SR.ADP_PooledOpenTimeout)); + } + + static internal Exception NonPooledOpenTimeout() + { + return ADP.TimeoutException(SR.GetString(SR.ADP_NonPooledOpenTimeout)); + } + + // + // Generic Data Provider Collection + // + static internal ArgumentException CollectionRemoveInvalidObject(Type itemType, ICollection collection) + { + return Argument(SR.GetString(SR.ADP_CollectionRemoveInvalidObject, itemType.Name, collection.GetType().Name)); + } + static internal ArgumentNullException CollectionNullValue(string parameter, Type collection, Type itemType) + { + return ArgumentNull(parameter, SR.GetString(SR.ADP_CollectionNullValue, collection.Name, itemType.Name)); + } + static internal IndexOutOfRangeException CollectionIndexInt32(int index, Type collection, int count) + { + return IndexOutOfRange(SR.GetString(SR.ADP_CollectionIndexInt32, index.ToString(CultureInfo.InvariantCulture), collection.Name, count.ToString(CultureInfo.InvariantCulture))); + } + static internal IndexOutOfRangeException CollectionIndexString(Type itemType, string propertyName, string propertyValue, Type collection) + { + return IndexOutOfRange(SR.GetString(SR.ADP_CollectionIndexString, itemType.Name, propertyName, propertyValue, collection.Name)); + } + static internal InvalidCastException CollectionInvalidType(Type collection, Type itemType, object invalidValue) + { + return InvalidCast(SR.GetString(SR.ADP_CollectionInvalidType, collection.Name, itemType.Name, invalidValue.GetType().Name)); + } + static internal ArgumentException ParametersIsNotParent(Type parameterType, ICollection collection) + { + return Argument(SR.GetString(SR.ADP_CollectionIsNotParent, parameterType.Name, collection.GetType().Name)); + } + static internal ArgumentException ParametersIsParent(Type parameterType, ICollection collection) + { + return Argument(SR.GetString(SR.ADP_CollectionIsNotParent, parameterType.Name, collection.GetType().Name)); + } + + // + // DbProviderException + // + static internal InvalidOperationException TransactionConnectionMismatch() + { + return Provider(SR.GetString(SR.ADP_TransactionConnectionMismatch)); + } + static internal InvalidOperationException TransactionRequired(string method) + { + return Provider(SR.GetString(SR.ADP_TransactionRequired, method)); + } + + static internal Exception CommandTextRequired(string method) + { + return InvalidOperation(SR.GetString(SR.ADP_CommandTextRequired, method)); + } + + static internal InvalidOperationException ConnectionRequired(string method) + { + return InvalidOperation(SR.GetString(SR.ADP_ConnectionRequired, method)); + } + static internal InvalidOperationException OpenConnectionRequired(string method, ConnectionState state) + { + return InvalidOperation(SR.GetString(SR.ADP_OpenConnectionRequired, method, ADP.ConnectionStateMsg(state))); + } + + static internal Exception NoStoredProcedureExists(string sproc) + { + return InvalidOperation(SR.GetString(SR.ADP_NoStoredProcedureExists, sproc)); + } + static internal Exception OpenReaderExists() + { + return OpenReaderExists(null); + } + + static internal Exception OpenReaderExists(Exception e) + { + return InvalidOperation(SR.GetString(SR.ADP_OpenReaderExists), e); + } + + static internal Exception TransactionCompleted() + { + return DataAdapter(SR.GetString(SR.ADP_TransactionCompleted)); + } + + // + // DbDataReader + // + static internal Exception NonSeqByteAccess(long badIndex, long currIndex, string method) + { + return InvalidOperation(SR.GetString(SR.ADP_NonSeqByteAccess, badIndex.ToString(CultureInfo.InvariantCulture), currIndex.ToString(CultureInfo.InvariantCulture), method)); + } + + static internal Exception NumericToDecimalOverflow() + { + return InvalidCast(SR.GetString(SR.ADP_NumericToDecimalOverflow)); + } + static internal InvalidOperationException NonSequentialColumnAccess(int badCol, int currCol) + { + return InvalidOperation(SR.GetString(SR.ADP_NonSequentialColumnAccess, badCol.ToString(CultureInfo.InvariantCulture), currCol.ToString(CultureInfo.InvariantCulture))); + } + static internal Exception FillRequiresSourceTableName(string parameter) + { + return Argument(SR.GetString(SR.ADP_FillRequiresSourceTableName), parameter); + } + + // + // : IDbCommand + // + static internal Exception InvalidCommandTimeout(int value) + { + return Argument(SR.GetString(SR.ADP_InvalidCommandTimeout, value.ToString(CultureInfo.InvariantCulture)), ADP.CommandTimeout); + } + static internal Exception DeriveParametersNotSupported(IDbCommand value) + { + return DataAdapter(SR.GetString(SR.ADP_DeriveParametersNotSupported, value.GetType().Name, value.CommandType.ToString())); + } + static internal Exception UninitializedParameterSize(int index, Type dataType) + { + return InvalidOperation(SR.GetString(SR.ADP_UninitializedParameterSize, index.ToString(CultureInfo.InvariantCulture), dataType.Name)); + } + static internal Exception PrepareParameterType(IDbCommand cmd) + { + return InvalidOperation(SR.GetString(SR.ADP_PrepareParameterType, cmd.GetType().Name)); + } + static internal Exception PrepareParameterSize(IDbCommand cmd) + { + return InvalidOperation(SR.GetString(SR.ADP_PrepareParameterSize, cmd.GetType().Name)); + } + static internal Exception PrepareParameterScale(IDbCommand cmd, string type) + { + return InvalidOperation(SR.GetString(SR.ADP_PrepareParameterScale, cmd.GetType().Name, type)); + } + + // + // : ConnectionUtil + // + + static internal Exception ClosedConnectionError() + { + return InvalidOperation(SR.GetString(SR.ADP_ClosedConnectionError)); + } + static internal Exception ConnectionAlreadyOpen(ConnectionState state) + { + return InvalidOperation(SR.GetString(SR.ADP_ConnectionAlreadyOpen, ADP.ConnectionStateMsg(state))); + } + static internal Exception TransactionPresent() + { + return InvalidOperation(SR.GetString(SR.ADP_TransactionPresent)); + } + static internal Exception LocalTransactionPresent() + { + return InvalidOperation(SR.GetString(SR.ADP_LocalTransactionPresent)); + } + static internal Exception OpenConnectionPropertySet(string property, ConnectionState state) + { + return InvalidOperation(SR.GetString(SR.ADP_OpenConnectionPropertySet, property, ADP.ConnectionStateMsg(state))); + } + static internal Exception EmptyDatabaseName() + { + return Argument(SR.GetString(SR.ADP_EmptyDatabaseName)); + } + + internal enum ConnectionError + { + BeginGetConnectionReturnsNull, + GetConnectionReturnsNull, + ConnectionOptionsMissing, + CouldNotSwitchToClosedPreviouslyOpenedState, + } + static internal Exception InternalConnectionError(ConnectionError internalError) + { + return InvalidOperation(SR.GetString(SR.ADP_InternalConnectionError, (int)internalError)); + } + + internal enum InternalErrorCode + { + UnpooledObjectHasOwner = 0, + UnpooledObjectHasWrongOwner = 1, + PushingObjectSecondTime = 2, + PooledObjectHasOwner = 3, + PooledObjectInPoolMoreThanOnce = 4, + CreateObjectReturnedNull = 5, + NewObjectCannotBePooled = 6, + NonPooledObjectUsedMoreThanOnce = 7, + AttemptingToPoolOnRestrictedToken = 8, + // ConnectionOptionsInUse = 9, + ConvertSidToStringSidWReturnedNull = 10, + // UnexpectedTransactedObject = 11, + AttemptingToConstructReferenceCollectionOnStaticObject = 12, + AttemptingToEnlistTwice = 13, + CreateReferenceCollectionReturnedNull = 14, + PooledObjectWithoutPool = 15, + UnexpectedWaitAnyResult = 16, + SynchronousConnectReturnedPending = 17, + CompletedConnectReturnedPending = 18, + + NameValuePairNext = 20, + InvalidParserState1 = 21, + InvalidParserState2 = 22, + InvalidParserState3 = 23, + + InvalidBuffer = 30, + + UnimplementedSMIMethod = 40, + InvalidSmiCall = 41, + + SqlDependencyObtainProcessDispatcherFailureObjectHandle = 50, + SqlDependencyProcessDispatcherFailureCreateInstance = 51, + SqlDependencyProcessDispatcherFailureAppDomain = 52, + SqlDependencyCommandHashIsNotAssociatedWithNotification = 53, + + UnknownTransactionFailure = 60, + } + static internal Exception InternalError(InternalErrorCode internalError) + { + return InvalidOperation(SR.GetString(SR.ADP_InternalProviderError, (int)internalError)); + } + static internal Exception InternalError(InternalErrorCode internalError, Exception innerException) + { + return InvalidOperation(SR.GetString(SR.ADP_InternalProviderError, (int)internalError), innerException); + } + static internal Exception InvalidConnectTimeoutValue() + { + return Argument(SR.GetString(SR.ADP_InvalidConnectTimeoutValue)); + } + + // + // : DbDataReader + // + static internal Exception DataReaderNoData() + { + return InvalidOperation(SR.GetString(SR.ADP_DataReaderNoData)); + } + static internal Exception DataReaderClosed(string method) + { + return InvalidOperation(SR.GetString(SR.ADP_DataReaderClosed, method)); + } + static internal ArgumentOutOfRangeException InvalidSourceBufferIndex(int maxLen, long srcOffset, string parameterName) + { + return ArgumentOutOfRange(SR.GetString(SR.ADP_InvalidSourceBufferIndex, maxLen.ToString(CultureInfo.InvariantCulture), srcOffset.ToString(CultureInfo.InvariantCulture)), parameterName); + } + static internal ArgumentOutOfRangeException InvalidDestinationBufferIndex(int maxLen, int dstOffset, string parameterName) + { + return ArgumentOutOfRange(SR.GetString(SR.ADP_InvalidDestinationBufferIndex, maxLen.ToString(CultureInfo.InvariantCulture), dstOffset.ToString(CultureInfo.InvariantCulture)), parameterName); + } + static internal Exception InvalidDataLength(long length) + { + return IndexOutOfRange(SR.GetString(SR.SQL_InvalidDataLength, length.ToString(CultureInfo.InvariantCulture))); + } + + // + // : IDataParameter + // + static internal ArgumentException InvalidDataType(TypeCode typecode) + { + return Argument(SR.GetString(SR.ADP_InvalidDataType, typecode.ToString())); + } + static internal ArgumentException DbTypeNotSupported(System.Data.DbType type, Type enumtype) + { + return Argument(SR.GetString(SR.ADP_DbTypeNotSupported, type.ToString(), enumtype.Name)); + } + static internal ArgumentException UnknownDataTypeCode(Type dataType, TypeCode typeCode) + { + return Argument(SR.GetString(SR.ADP_UnknownDataTypeCode, ((int)typeCode).ToString(CultureInfo.InvariantCulture), dataType.FullName)); + } + static internal ArgumentException InvalidOffsetValue(int value) + { + return Argument(SR.GetString(SR.ADP_InvalidOffsetValue, value.ToString(CultureInfo.InvariantCulture))); + } + static internal ArgumentException InvalidSizeValue(int value) + { + return Argument(SR.GetString(SR.ADP_InvalidSizeValue, value.ToString(CultureInfo.InvariantCulture))); + } + static internal Exception ParameterConversionFailed(object value, Type destType, Exception inner) + { + Debug.Assert(null != value, "null value on conversion failure"); + Debug.Assert(null != inner, "null inner on conversion failure"); + + Exception e; + string message = SR.GetString(SR.ADP_ParameterConversionFailed, value.GetType().Name, destType.Name); + if (inner is ArgumentException) + { + e = new ArgumentException(message, inner); + } + else if (inner is FormatException) + { + e = new FormatException(message, inner); + } + else if (inner is InvalidCastException) + { + e = new InvalidCastException(message, inner); + } + else if (inner is OverflowException) + { + e = new OverflowException(message, inner); + } + else + { + e = inner; + } + TraceExceptionAsReturnValue(e); + return e; + } + + // + // : IDataParameterCollection + // + static internal Exception ParametersMappingIndex(int index, IDataParameterCollection collection) + { + return CollectionIndexInt32(index, collection.GetType(), collection.Count); + } + static internal Exception ParametersSourceIndex(string parameterName, IDataParameterCollection collection, Type parameterType) + { + return CollectionIndexString(parameterType, ADP.ParameterName, parameterName, collection.GetType()); + } + static internal Exception ParameterNull(string parameter, IDataParameterCollection collection, Type parameterType) + { + return CollectionNullValue(parameter, collection.GetType(), parameterType); + } + static internal Exception InvalidParameterType(IDataParameterCollection collection, Type parameterType, object invalidValue) + { + return CollectionInvalidType(collection.GetType(), parameterType, invalidValue); + } + + // + // : IDbTransaction + // + static internal Exception ParallelTransactionsNotSupported(IDbConnection obj) + { + return InvalidOperation(SR.GetString(SR.ADP_ParallelTransactionsNotSupported, obj.GetType().Name)); + } + static internal Exception TransactionZombied(IDbTransaction obj) + { + return InvalidOperation(SR.GetString(SR.ADP_TransactionZombied, obj.GetType().Name)); + } + + // + // : DbMetaDataFactory + // + + static internal Exception AmbigousCollectionName(string collectionName) + { + return Argument(SR.GetString(SR.MDF_AmbigousCollectionName, collectionName)); + } + + static internal Exception CollectionNameIsNotUnique(string collectionName) + { + return Argument(SR.GetString(SR.MDF_CollectionNameISNotUnique, collectionName)); + } + + static internal Exception DataTableDoesNotExist(string collectionName) + { + return Argument(SR.GetString(SR.MDF_DataTableDoesNotExist, collectionName)); + } + + static internal Exception IncorrectNumberOfDataSourceInformationRows() + { + return Argument(SR.GetString(SR.MDF_IncorrectNumberOfDataSourceInformationRows)); + } + + static internal ArgumentException InvalidRestrictionValue(string collectionName, string restrictionName, string restrictionValue) + { + return ADP.Argument(SR.GetString(SR.MDF_InvalidRestrictionValue, collectionName, restrictionName, restrictionValue)); + } + + static internal Exception InvalidXml() + { + return Argument(SR.GetString(SR.MDF_InvalidXml)); + } + + static internal Exception InvalidXmlMissingColumn(string collectionName, string columnName) + { + return Argument(SR.GetString(SR.MDF_InvalidXmlMissingColumn, collectionName, columnName)); + } + + static internal Exception InvalidXmlInvalidValue(string collectionName, string columnName) + { + return Argument(SR.GetString(SR.MDF_InvalidXmlInvalidValue, collectionName, columnName)); + } + + static internal Exception MissingDataSourceInformationColumn() + { + return Argument(SR.GetString(SR.MDF_MissingDataSourceInformationColumn)); + } + + static internal Exception MissingRestrictionColumn() + { + return Argument(SR.GetString(SR.MDF_MissingRestrictionColumn)); + } + + static internal Exception MissingRestrictionRow() + { + return Argument(SR.GetString(SR.MDF_MissingRestrictionRow)); + } + + static internal Exception NoColumns() + { + return Argument(SR.GetString(SR.MDF_NoColumns)); + } + + static internal Exception QueryFailed(string collectionName, Exception e) + { + return InvalidOperation(SR.GetString(SR.MDF_QueryFailed, collectionName), e); + } + + static internal Exception TooManyRestrictions(string collectionName) + { + return Argument(SR.GetString(SR.MDF_TooManyRestrictions, collectionName)); + } + + static internal Exception UnableToBuildCollection(string collectionName) + { + return Argument(SR.GetString(SR.MDF_UnableToBuildCollection, collectionName)); + } + + static internal Exception UndefinedCollection(string collectionName) + { + return Argument(SR.GetString(SR.MDF_UndefinedCollection, collectionName)); + } + + static internal Exception UndefinedPopulationMechanism(string populationMechanism) + { + return Argument(SR.GetString(SR.MDF_UndefinedPopulationMechanism, populationMechanism)); + } + + static internal Exception UnsupportedVersion(string collectionName) + { + return Argument(SR.GetString(SR.MDF_UnsupportedVersion, collectionName)); + } + + // + // : CommandBuilder + // + static internal InvalidOperationException QuotePrefixNotSet(string method) + { + return InvalidOperation(SR.GetString(SR.ADP_QuotePrefixNotSet, method)); + } + + // global constant strings + internal const string BeginTransaction = nameof(BeginTransaction); + internal const string ChangeDatabase = nameof(ChangeDatabase); + internal const string CommandTimeout = nameof(CommandTimeout); + internal const string ConnectionString = nameof(ConnectionString); + internal const string DeriveParameters = nameof(DeriveParameters); + internal const string ExecuteReader = nameof(ExecuteReader); + internal const string ExecuteNonQuery = nameof(ExecuteNonQuery); + internal const string ExecuteScalar = nameof(ExecuteScalar); + internal const string GetBytes = nameof(GetBytes); + internal const string GetChars = nameof(GetChars); + internal const string GetOleDbSchemaTable = nameof(GetOleDbSchemaTable); + internal const string GetSchema = nameof(GetSchema); + internal const string GetSchemaTable = nameof(GetSchemaTable); + internal const string Parameter = nameof(Parameter); + internal const string ParameterName = nameof(ParameterName); + internal const string Prepare = nameof(Prepare); + internal const string QuoteIdentifier = nameof(QuoteIdentifier); + internal const string SetProperties = nameof(SetProperties); + internal const string UnquoteIdentifier = nameof(UnquoteIdentifier); + + internal const CompareOptions compareOptions = CompareOptions.IgnoreKanaType | CompareOptions.IgnoreWidth | CompareOptions.IgnoreCase; + internal const int DefaultCommandTimeout = 30; + internal const int DefaultConnectionTimeout = DbConnectionStringDefaults.ConnectTimeout; + + static internal readonly IntPtr PtrZero = new IntPtr(0); // IntPtr.Zero + static internal readonly int PtrSize = IntPtr.Size; + static internal readonly IntPtr RecordsUnaffected = new IntPtr(-1); + + internal const int CharSize = System.Text.UnicodeEncoding.CharSize; + + static internal bool CompareInsensitiveInvariant(string strvalue, string strconst) + { + return (0 == CultureInfo.InvariantCulture.CompareInfo.Compare(strvalue, strconst, CompareOptions.IgnoreCase)); + } + + static internal Delegate FindBuilder(MulticastDelegate mcd) + { // V1.2.3300 + if (null != mcd) + { + Delegate[] d = mcd.GetInvocationList(); + for (int i = 0; i < d.Length; i++) + { + if (d[i].Target is DbCommandBuilder) + return d[i]; + } + } + + return null; + } + + static internal readonly bool IsWindowsNT = (PlatformID.Win32NT == Environment.OSVersion.Platform); + static internal readonly bool IsPlatformNT5 = (ADP.IsWindowsNT && (Environment.OSVersion.Version.Major >= 5)); + + static internal SysTx.Transaction GetCurrentTransaction() + { + SysTx.Transaction transaction = SysTx.Transaction.Current; + return transaction; + } + + static internal void SetCurrentTransaction(SysTx.Transaction transaction) + { + SysTx.Transaction.Current = transaction; + } + + static internal SysTx.IDtcTransaction GetOletxTransaction(SysTx.Transaction transaction) + { + SysTx.IDtcTransaction oleTxTransaction = null; + + if (null != transaction) + { + oleTxTransaction = SysTx.TransactionInterop.GetDtcTransaction(transaction); + } + return oleTxTransaction; + } + + internal static bool NeedManualEnlistment() + { + return false; + } + + static internal long TimerCurrent() + { + return DateTime.UtcNow.ToFileTimeUtc(); + } + + static internal long TimerFromSeconds(int seconds) + { + long result = checked((long)seconds * TimeSpan.TicksPerSecond); + return result; + } + + static internal long TimerRemaining(long timerExpire) + { + long timerNow = TimerCurrent(); + long result = checked(timerExpire - timerNow); + return result; + } + + static internal long TimerRemainingMilliseconds(long timerExpire) + { + long result = TimerToMilliseconds(TimerRemaining(timerExpire)); + return result; + } + + static internal long TimerToMilliseconds(long timerValue) + { + long result = timerValue / TimeSpan.TicksPerMillisecond; + return result; + } + + static internal string BuildQuotedString(string quotePrefix, string quoteSuffix, string unQuotedString) + { + StringBuilder resultString = new StringBuilder(); + if (ADP.IsEmpty(quotePrefix) == false) + { + resultString.Append(quotePrefix); + } + + // Assuming that the suffix is escaped by doubling it. i.e. foo"bar becomes "foo""bar". + if (ADP.IsEmpty(quoteSuffix) == false) + { + resultString.Append(unQuotedString.Replace(quoteSuffix, quoteSuffix + quoteSuffix)); + resultString.Append(quoteSuffix); + } + else + { + resultString.Append(unQuotedString); + } + + return resultString.ToString(); + } + + static internal void EscapeSpecialCharacters(string unescapedString, StringBuilder escapedString) + { + // note special characters list is from character escapes + // in the MSDN regular expression language elements documentation + // added ] since escaping it seems necessary + const string specialCharacters = ".$^{[(|)*+?\\]"; + + foreach (char currentChar in unescapedString) + { + if (specialCharacters.IndexOf(currentChar) >= 0) + { + escapedString.Append("\\"); + } + escapedString.Append(currentChar); + } + return; + } + + static internal string GetFullPath(string filename) + { + return Path.GetFullPath(filename); + } + + // SxS: the file is opened in FileShare.Read mode allowing several threads/apps to read it simultaneously + static internal Stream GetFileStream(string filename) + { + return new FileStream(filename, FileMode.Open, FileAccess.Read, FileShare.Read); + } + + static internal FileVersionInfo GetVersionInfo(string filename) + { + return FileVersionInfo.GetVersionInfo(filename); + } + + static internal Stream GetXmlStreamFromValues(String[] values, String errorString) + { + if (values.Length != 1) + { + throw ADP.ConfigWrongNumberOfValues(errorString); + } + return ADP.GetXmlStream(values[0], errorString); + } + + // metadata files are opened from <.NetRuntimeFolder>\CONFIG\ + // this operation is safe in SxS because the file is opened in read-only mode and each NDP runtime accesses its own copy of the metadata + // under the runtime folder. + static internal Stream GetXmlStream(String value, String errorString) + { + Stream XmlStream; + const string config = "config\\"; + // get location of config directory + string rootPath = System.Runtime.InteropServices.RuntimeEnvironment.GetRuntimeDirectory(); + if (rootPath == null) + { + throw ADP.ConfigUnableToLoadXmlMetaDataFile(errorString); + } + StringBuilder tempstring = new StringBuilder(rootPath.Length + config.Length + value.Length); + tempstring.Append(rootPath); + tempstring.Append(config); + tempstring.Append(value); + String fullPath = tempstring.ToString(); + + // don't allow relative paths + if (ADP.GetFullPath(fullPath) != fullPath) + { + throw ADP.ConfigUnableToLoadXmlMetaDataFile(errorString); + } + + try + { + XmlStream = ADP.GetFileStream(fullPath); + } + catch (Exception e) + { + // UNDONE - should not be catching all exceptions!!! + if (!ADP.IsCatchableExceptionType(e)) + { + throw; + } + throw ADP.ConfigUnableToLoadXmlMetaDataFile(errorString); + } + + return XmlStream; + + } + + static internal object ClassesRootRegistryValue(string subkey, string queryvalue) + { + try + { + using (RegistryKey key = Registry.ClassesRoot.OpenSubKey(subkey, false)) + { + return ((null != key) ? key.GetValue(queryvalue) : null); + } + } + catch (SecurityException e) + { + // it's possible there are + // ACL's on registry that cause SecurityException to be thrown. + ADP.TraceExceptionWithoutRethrow(e); + return null; + } + } + + static internal object LocalMachineRegistryValue(string subkey, string queryvalue) + { + try + { + using (RegistryKey key = Registry.LocalMachine.OpenSubKey(subkey, false)) + { + return ((null != key) ? key.GetValue(queryvalue) : null); + } + } + catch (SecurityException e) + { + // it's possible there are + // ACL's on registry that cause SecurityException to be thrown. + ADP.TraceExceptionWithoutRethrow(e); + return null; + } + } + + // SxS: although this method uses registry, it does not expose anything out + static internal void CheckVersionMDAC(bool ifodbcelseoledb) + { + int major, minor, build; + string version; + + try + { + version = (string)ADP.LocalMachineRegistryValue("Software\\Microsoft\\DataAccess", "FullInstallVer"); + if (ADP.IsEmpty(version)) + { + string filename = (string)ADP.ClassesRootRegistryValue(System.Data.OleDb.ODB.DataLinks_CLSID, string.Empty); + FileVersionInfo versionInfo = ADP.GetVersionInfo(filename); + major = versionInfo.FileMajorPart; + minor = versionInfo.FileMinorPart; + build = versionInfo.FileBuildPart; + version = versionInfo.FileVersion; + } + else + { + string[] parts = version.Split('.'); + major = Int32.Parse(parts[0], NumberStyles.None, CultureInfo.InvariantCulture); + minor = Int32.Parse(parts[1], NumberStyles.None, CultureInfo.InvariantCulture); + build = Int32.Parse(parts[2], NumberStyles.None, CultureInfo.InvariantCulture); + Int32.Parse(parts[3], NumberStyles.None, CultureInfo.InvariantCulture); + } + } + catch (Exception e) + { + // UNDONE - should not be catching all exceptions!!! + if (!ADP.IsCatchableExceptionType(e)) + { + throw; + } + + throw System.Data.OleDb.ODB.MDACNotAvailable(e); + } + + // disallow any MDAC version before MDAC 2.6 rtm + // include MDAC 2.51 that ships with Win2k + if ((major < 2) || ((major == 2) && ((minor < 60) || ((minor == 60) && (build < 6526))))) + { + if (ifodbcelseoledb) + { + throw ADP.DataAdapter(SR.GetString(SR.Odbc_MDACWrongVersion, version)); + } + else + { + throw ADP.DataAdapter(SR.GetString(SR.OleDb_MDACWrongVersion, version)); + } + } + } + + // the return value is true if the string was quoted and false if it was not + // this allows the caller to determine if it is an error or not for the quotedString to not be quoted + static internal Boolean RemoveStringQuotes(string quotePrefix, string quoteSuffix, string quotedString, out string unquotedString) + { + int prefixLength; + if (quotePrefix == null) + { + prefixLength = 0; + } + else + { + prefixLength = quotePrefix.Length; + } + + int suffixLength; + if (quoteSuffix == null) + { + suffixLength = 0; + } + else + { + suffixLength = quoteSuffix.Length; + } + + if ((suffixLength + prefixLength) == 0) + { + unquotedString = quotedString; + return true; + } + + if (quotedString == null) + { + unquotedString = quotedString; + return false; + } + + int quotedStringLength = quotedString.Length; + + // is the source string too short to be quoted + if (quotedStringLength < prefixLength + suffixLength) + { + unquotedString = quotedString; + return false; + } + + // is the prefix present? + if (prefixLength > 0) + { + if (quotedString.StartsWith(quotePrefix, StringComparison.Ordinal) == false) + { + unquotedString = quotedString; + return false; + } + } + + // is the suffix present? + if (suffixLength > 0) + { + if (quotedString.EndsWith(quoteSuffix, StringComparison.Ordinal) == false) + { + unquotedString = quotedString; + return false; + } + unquotedString = quotedString.Substring(prefixLength, quotedStringLength - (prefixLength + suffixLength)).Replace(quoteSuffix + quoteSuffix, quoteSuffix); + } + else + { + unquotedString = quotedString.Substring(prefixLength, quotedStringLength - prefixLength); + } + return true; + } + + static internal IntPtr IntPtrOffset(IntPtr pbase, Int32 offset) + { + if (4 == ADP.PtrSize) + { + return (IntPtr)checked(pbase.ToInt32() + offset); + } + Debug.Assert(8 == ADP.PtrSize, "8 != IntPtr.Size"); + return (IntPtr)checked(pbase.ToInt64() + offset); + } + + static internal int IntPtrToInt32(IntPtr value) + { + if (4 == ADP.PtrSize) + { + return (int)value; + } + else + { + long lval = (long)value; + lval = Math.Min((long)Int32.MaxValue, lval); + lval = Math.Max((long)Int32.MinValue, lval); + return (int)lval; + } + } + + // TODO: are those names appropriate for common code? + static internal int SrcCompare(string strA, string strB) + { // this is null safe + return ((strA == strB) ? 0 : 1); + } + + static internal int DstCompare(string strA, string strB) + { // this is null safe + return CultureInfo.CurrentCulture.CompareInfo.Compare(strA, strB, ADP.compareOptions); + } + + static internal bool IsDirection(IDataParameter value, ParameterDirection condition) + { +#if DEBUG + IsDirectionValid(condition); +#endif + return (condition == (condition & value.Direction)); + } +#if DEBUG + static private void IsDirectionValid(ParameterDirection value) { + switch (value) { // @perfnote: Enum.IsDefined + case ParameterDirection.Input: + case ParameterDirection.Output: + case ParameterDirection.InputOutput: + case ParameterDirection.ReturnValue: + break; + default: + throw ADP.InvalidParameterDirection(value); + } + } +#endif + + static internal bool IsEmpty(string str) + { + return ((null == str) || (0 == str.Length)); + } + + static internal bool IsEmptyArray(string[] array) + { + return ((null == array) || (0 == array.Length)); + } + + static internal bool IsNull(object value) + { + if ((null == value) || (DBNull.Value == value)) + { + return true; + } + INullable nullable = (value as INullable); + return ((null != nullable) && nullable.IsNull); + } + } +} diff --git a/src/System.Data.OleDb/src/System/Data/Common/DataCommonEventSource.cs b/src/System.Data.OleDb/src/System/Data/Common/DataCommonEventSource.cs new file mode 100644 index 000000000000..1df531fa88ee --- /dev/null +++ b/src/System.Data.OleDb/src/System/Data/Common/DataCommonEventSource.cs @@ -0,0 +1,126 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Diagnostics.Tracing; +using System.Threading; + +namespace System.Data +{ + [EventSource(Name = "System.Data.DataCommonEventSource")] +#if uapaot + public +#else + internal +#endif + class DataCommonEventSource : EventSource + { + internal static readonly DataCommonEventSource Log = new DataCommonEventSource(); +#if uapaot + public +#else + private +#endif + const int TraceEventId = 1; + + [Event(TraceEventId, Level = EventLevel.Informational)] +#if uapaot + public +#else + internal +#endif + void Trace(string message) + { + WriteEvent(TraceEventId, message); + } + + [NonEvent] +#if uapaot + public +#else + internal +#endif + void Trace(string format, T0 arg0) + { + if (!Log.IsEnabled()) + return; + Trace(string.Format(format, arg0)); + } + +#if uapaot + private static long s_nextScopeId = 0; + public const int EnterScopeId = 2; + public const int ExitScopeId = 3; + + [NonEvent] + public void Trace(string format, T0 arg0, T1 arg1) + { + if (!Log.IsEnabled()) + return; + Trace(string.Format(format, arg0, arg1)); + } + + [NonEvent] + public void Trace(string format, T0 arg0, T1 arg1, T2 arg2) + { + if (!Log.IsEnabled()) + return; + Trace(string.Format(format, arg0, arg1, arg2)); + } + + [NonEvent] + public void Trace(string format, T0 arg0, T1 arg1, T2 arg2, T3 arg3) + { + if (!Log.IsEnabled()) + return; + Trace(string.Format(format, arg0, arg1, arg2, arg3)); + } + + [NonEvent] + public void Trace(string format, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4) + { + if (!Log.IsEnabled()) + return; + Trace(string.Format(format, arg0, arg1, arg2, arg3, arg4)); + } + + [NonEvent] + public void Trace(string format, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6) + { + if (!Log.IsEnabled()) + return; + Trace(string.Format(format, arg0, arg1, arg2, arg3, arg4, arg5, arg6)); + } + + [Event(EnterScopeId, Level = EventLevel.Verbose)] + public long EnterScope(string message) + { + long scopeId = 0; + if (Log.IsEnabled()) + { + scopeId = Interlocked.Increment(ref s_nextScopeId); + WriteEvent(EnterScopeId, scopeId, message); + } + return scopeId; + } + + [NonEvent] + public long EnterScope(string format, T1 arg1) => Log.IsEnabled() ? EnterScope(string.Format(format, arg1)) : 0; + + [NonEvent] + public long EnterScope(string format, T1 arg1, T2 arg2) => Log.IsEnabled() ? EnterScope(string.Format(format, arg1, arg2)) : 0; + + [NonEvent] + public long EnterScope(string format, T1 arg1, T2 arg2, T3 arg3) => Log.IsEnabled() ? EnterScope(string.Format(format, arg1, arg2, arg3)) : 0; + + [NonEvent] + public long EnterScope(string format, T1 arg1, T2 arg2, T3 arg3, T4 arg4) => Log.IsEnabled() ? EnterScope(string.Format(format, arg1, arg2, arg3, arg4)) : 0; + + [Event(ExitScopeId, Level = EventLevel.Verbose)] + public void ExitScope(long scopeId) + { + WriteEvent(ExitScopeId, scopeId); + } +#endif + } +} diff --git a/src/System.Data.OleDb/src/System/Data/Common/DbConnectionPoolKey.cs b/src/System.Data.OleDb/src/System/Data/Common/DbConnectionPoolKey.cs new file mode 100644 index 000000000000..8a0e87e1af5c --- /dev/null +++ b/src/System.Data.OleDb/src/System/Data/Common/DbConnectionPoolKey.cs @@ -0,0 +1,61 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. +using System; +using System.Collections.Generic; +using System.Data; + +namespace System.Data.Common +{ + // DbConnectionPoolKey: Base class implementation of a key to connection pool groups + // Only connection string is used as a key + internal class DbConnectionPoolKey : ICloneable + { + private string _connectionString; + + internal DbConnectionPoolKey(string connectionString) + { + _connectionString = connectionString; + } + + protected DbConnectionPoolKey(DbConnectionPoolKey key) + { + _connectionString = key.ConnectionString; + } + + object ICloneable.Clone() + { + return new DbConnectionPoolKey(this); + } + + internal virtual string ConnectionString + { + get + { + return _connectionString; + } + + set + { + _connectionString = value; + } + } + + public override bool Equals(object obj) + { + if (obj == null || obj.GetType() != typeof(DbConnectionPoolKey)) + { + return false; + } + + DbConnectionPoolKey key = obj as DbConnectionPoolKey; + + return (key != null && _connectionString == key._connectionString); + } + + public override int GetHashCode() + { + return _connectionString == null ? 0 : _connectionString.GetHashCode(); + } + } +} diff --git a/src/System.Data.OleDb/src/System/Data/Common/FieldNameLookup.cs b/src/System.Data.OleDb/src/System/Data/Common/FieldNameLookup.cs new file mode 100644 index 000000000000..9a59e8cbc5f8 --- /dev/null +++ b/src/System.Data.OleDb/src/System/Data/Common/FieldNameLookup.cs @@ -0,0 +1,157 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Collections; +using System.Data.Common; +using System.Diagnostics; +using System.Globalization; + +namespace System.Data.ProviderBase +{ + internal sealed class FieldNameLookup + { // V1.2.3300 + + // hashtable stores the index into the _fieldNames, match via case-sensitive + private Hashtable _fieldNameLookup; + + // original names for linear searches when exact matches fail + private string[] _fieldNames; + + // if _defaultLocaleID is -1 then _compareInfo is initialized with InvariantCulture CompareInfo + // otherwise it is specified by the server? for the correct compare info + private CompareInfo _compareInfo; + private int _defaultLocaleID; + + public FieldNameLookup(string[] fieldNames, int defaultLocaleID) + { // V1.2.3300 + if (null == fieldNames) + { + throw ADP.ArgumentNull("fieldNames"); + } + _fieldNames = fieldNames; + _defaultLocaleID = defaultLocaleID; + } + + public FieldNameLookup(System.Collections.ObjectModel.ReadOnlyCollection columnNames, int defaultLocaleID) + { + int length = columnNames.Count; + string[] fieldNames = new string[length]; + for (int i = 0; i < length; ++i) + { + fieldNames[i] = columnNames[i]; + Debug.Assert(null != fieldNames[i]); + } + _fieldNames = fieldNames; + _defaultLocaleID = defaultLocaleID; + GenerateLookup(); + } + + public FieldNameLookup(IDataRecord reader, int defaultLocaleID) + { // V1.2.3300 + + int length = reader.FieldCount; + string[] fieldNames = new string[length]; + for (int i = 0; i < length; ++i) + { + fieldNames[i] = reader.GetName(i); + Debug.Assert(null != fieldNames[i]); + } + _fieldNames = fieldNames; + _defaultLocaleID = defaultLocaleID; + } + + public int GetOrdinal(string fieldName) + { // V1.2.3300 + if (null == fieldName) + { + throw ADP.ArgumentNull("fieldName"); + } + int index = IndexOf(fieldName); + if (-1 == index) + { + throw ADP.IndexOutOfRange(fieldName); + } + return index; + } + + public int IndexOfName(string fieldName) + { // V1.2.3300 + if (null == _fieldNameLookup) + { + GenerateLookup(); + } + // via case sensitive search, first match with lowest ordinal matches + object value = _fieldNameLookup[fieldName]; + return ((null != value) ? (int)value : -1); + } + + public int IndexOf(string fieldName) + { // V1.2.3300 + if (null == _fieldNameLookup) + { + GenerateLookup(); + } + int index; + object value = _fieldNameLookup[fieldName]; + if (null != value) + { + // via case sensitive search, first match with lowest ordinal matches + index = (int)value; + } + else + { + // via case insensitive search, first match with lowest ordinal matches + index = LinearIndexOf(fieldName, CompareOptions.IgnoreCase); + if (-1 == index) + { + // do the slow search now (kana, width insensitive comparison) + index = LinearIndexOf(fieldName, ADP.compareOptions); + } + } + return index; + } + + private int LinearIndexOf(string fieldName, CompareOptions compareOptions) + { + CompareInfo compareInfo = _compareInfo; + if (null == compareInfo) + { + if (-1 != _defaultLocaleID) + { + compareInfo = CompareInfo.GetCompareInfo(_defaultLocaleID); + } + if (null == compareInfo) + { + compareInfo = CultureInfo.InvariantCulture.CompareInfo; + } + _compareInfo = compareInfo; + } + int length = _fieldNames.Length; + for (int i = 0; i < length; ++i) + { + if (0 == compareInfo.Compare(fieldName, _fieldNames[i], compareOptions)) + { + _fieldNameLookup[fieldName] = i; // add an exact match for the future + return i; + } + } + return -1; + } + + // RTM common code for generating Hashtable from array of column names + private void GenerateLookup() + { + int length = _fieldNames.Length; + Hashtable hash = new Hashtable(length); + + // via case sensitive search, first match with lowest ordinal matches + for (int i = length - 1; 0 <= i; --i) + { + string fieldName = _fieldNames[i]; + hash[fieldName] = i; + } + _fieldNameLookup = hash; + } + } +} diff --git a/src/System.Data.OleDb/src/System/Data/Common/NameValuePair.cs b/src/System.Data.OleDb/src/System/Data/Common/NameValuePair.cs new file mode 100644 index 000000000000..168f55929001 --- /dev/null +++ b/src/System.Data.OleDb/src/System/Data/Common/NameValuePair.cs @@ -0,0 +1,49 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Diagnostics; + +namespace System.Data.Common +{ + internal sealed class NameValuePair + { + readonly private string _name; + readonly private string _value; + readonly private int _length; + private NameValuePair _next; + + internal NameValuePair(string name, string value, int length) + { + Debug.Assert(!string.IsNullOrEmpty(name), "empty keyname"); + _name = name; + _value = value; + _length = length; + } + + internal int Length + { + get + { + Debug.Assert(0 < _length, "NameValuePair zero Length usage"); + return _length; + } + } + + internal string Name => _name; + internal string Value => _value; + + internal NameValuePair Next + { + get { return _next; } + set + { + if ((null != _next) || (null == value)) + { + throw ADP.InternalError(ADP.InternalErrorCode.NameValuePairNext); + } + _next = value; + } + } + } +} diff --git a/src/System.Data.OleDb/src/System/Data/Common/SR.cs b/src/System.Data.OleDb/src/System/Data/Common/SR.cs new file mode 100644 index 000000000000..15078bcebd8a --- /dev/null +++ b/src/System.Data.OleDb/src/System/Data/Common/SR.cs @@ -0,0 +1,19 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +namespace System +{ + internal static partial class SR + { + internal static string GetString(string value) + { + return value; + } + + internal static string GetString(string format, params object[] args) + { + return SR.Format(format, args); + } + } +} \ No newline at end of file diff --git a/src/System.Data.OleDb/src/System/Data/ProviderBase/DbBuffer.cs b/src/System.Data.OleDb/src/System/Data/ProviderBase/DbBuffer.cs new file mode 100644 index 000000000000..730f3bdd976e --- /dev/null +++ b/src/System.Data.OleDb/src/System/Data/ProviderBase/DbBuffer.cs @@ -0,0 +1,757 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Data.Common; +using System.Diagnostics; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +namespace System.Data.ProviderBase +{ + // DbBuffer is abstract to require derived class to exist + // so that when debugging, we can tell the difference between one DbBuffer and another + internal abstract class DbBuffer : SafeHandle + { + internal const int LMEM_FIXED = 0x0000; + internal const int LMEM_MOVEABLE = 0x0002; + internal const int LMEM_ZEROINIT = 0x0040; + + private readonly int _bufferLength; + + private DbBuffer(int initialSize, bool zeroBuffer) : base(IntPtr.Zero, true) + { + if (0 < initialSize) + { + int flags = ((zeroBuffer) ? LMEM_ZEROINIT : LMEM_FIXED); + + _bufferLength = initialSize; + RuntimeHelpers.PrepareConstrainedRegions(); + try + { } + finally + { + base.handle = SafeNativeMethods.LocalAlloc(flags, (IntPtr)initialSize); + } + if (IntPtr.Zero == base.handle) + { + throw new OutOfMemoryException(); + } + } + } + + protected DbBuffer(int initialSize) : this(initialSize, true) + { + } + + protected DbBuffer(IntPtr invalidHandleValue, bool ownsHandle) : base(invalidHandleValue, ownsHandle) + { + } + + private int BaseOffset { get { return 0; } } + + public override bool IsInvalid + { + get + { + return (IntPtr.Zero == base.handle); + } + } + + internal int Length + { + get + { + return _bufferLength; + } + } + + internal String PtrToStringUni(int offset, int length) + { + offset += BaseOffset; + Validate(offset, 2 * length); + Debug.Assert(0 == offset % ADP.PtrSize, "invalid alignment"); + + string value = null; + bool mustRelease = false; + RuntimeHelpers.PrepareConstrainedRegions(); + try + { + DangerousAddRef(ref mustRelease); + + IntPtr ptr = ADP.IntPtrOffset(DangerousGetHandle(), offset); + value = Marshal.PtrToStringUni(ptr, length); + } + finally + { + if (mustRelease) + { + DangerousRelease(); + } + } + return value; + } + + internal byte ReadByte(int offset) + { + offset += BaseOffset; + ValidateCheck(offset, 1); + Debug.Assert(0 == offset % 4, "invalid alignment"); + + byte value; + bool mustRelease = false; + RuntimeHelpers.PrepareConstrainedRegions(); + try + { + DangerousAddRef(ref mustRelease); + + IntPtr ptr = DangerousGetHandle(); + value = Marshal.ReadByte(ptr, offset); + } + finally + { + if (mustRelease) + { + DangerousRelease(); + } + } + return value; + } + + internal byte[] ReadBytes(int offset, int length) + { + byte[] value = new byte[length]; + return ReadBytes(offset, value, 0, length); + } + + internal byte[] ReadBytes(int offset, byte[] destination, int startIndex, int length) + { + offset += BaseOffset; + Validate(offset, length); + Debug.Assert(0 == offset % ADP.PtrSize, "invalid alignment"); + Debug.Assert(null != destination, "null destination"); + Debug.Assert(startIndex + length <= destination.Length, "destination too small"); + + bool mustRelease = false; + RuntimeHelpers.PrepareConstrainedRegions(); + try + { + DangerousAddRef(ref mustRelease); + + IntPtr ptr = ADP.IntPtrOffset(DangerousGetHandle(), offset); + Marshal.Copy(ptr, destination, startIndex, length); + } + finally + { + if (mustRelease) + { + DangerousRelease(); + } + } + return destination; + } + + internal Char ReadChar(int offset) + { + short value = ReadInt16(offset); + return unchecked((char)value); + } + + internal char[] ReadChars(int offset, char[] destination, int startIndex, int length) + { + offset += BaseOffset; + Validate(offset, 2 * length); + Debug.Assert(0 == offset % ADP.PtrSize, "invalid alignment"); + Debug.Assert(null != destination, "null destination"); + Debug.Assert(startIndex + length <= destination.Length, "destination too small"); + + bool mustRelease = false; + RuntimeHelpers.PrepareConstrainedRegions(); + try + { + DangerousAddRef(ref mustRelease); + + IntPtr ptr = ADP.IntPtrOffset(DangerousGetHandle(), offset); + Marshal.Copy(ptr, destination, startIndex, length); + } + finally + { + if (mustRelease) + { + DangerousRelease(); + } + } + return destination; + } + + internal Double ReadDouble(int offset) + { + Int64 value = ReadInt64(offset); + return BitConverter.Int64BitsToDouble(value); + } + + internal Int16 ReadInt16(int offset) + { + offset += BaseOffset; + ValidateCheck(offset, 2); + Debug.Assert(0 == offset % 2, "invalid alignment"); + + short value; + bool mustRelease = false; + RuntimeHelpers.PrepareConstrainedRegions(); + try + { + DangerousAddRef(ref mustRelease); + + IntPtr ptr = DangerousGetHandle(); + value = Marshal.ReadInt16(ptr, offset); + } + finally + { + if (mustRelease) + { + DangerousRelease(); + } + } + return value; + } + + internal void ReadInt16Array(int offset, short[] destination, int startIndex, int length) + { + offset += BaseOffset; + Validate(offset, 2 * length); + Debug.Assert(0 == offset % ADP.PtrSize, "invalid alignment"); + Debug.Assert(null != destination, "null destination"); + Debug.Assert(startIndex + length <= destination.Length, "destination too small"); + + bool mustRelease = false; + RuntimeHelpers.PrepareConstrainedRegions(); + try + { + DangerousAddRef(ref mustRelease); + + IntPtr ptr = ADP.IntPtrOffset(DangerousGetHandle(), offset); + Marshal.Copy(ptr, destination, startIndex, length); + } + finally + { + if (mustRelease) + { + DangerousRelease(); + } + } + } + + internal Int32 ReadInt32(int offset) + { + offset += BaseOffset; + ValidateCheck(offset, 4); + Debug.Assert(0 == offset % 4, "invalid alignment"); + + int value; + bool mustRelease = false; + RuntimeHelpers.PrepareConstrainedRegions(); + try + { + DangerousAddRef(ref mustRelease); + + IntPtr ptr = DangerousGetHandle(); + value = Marshal.ReadInt32(ptr, offset); + } + finally + { + if (mustRelease) + { + DangerousRelease(); + } + } + return value; + } + + internal void ReadInt32Array(int offset, int[] destination, int startIndex, int length) + { + offset += BaseOffset; + Validate(offset, 4 * length); + Debug.Assert(0 == offset % ADP.PtrSize, "invalid alignment"); + Debug.Assert(null != destination, "null destination"); + Debug.Assert(startIndex + length <= destination.Length, "destination too small"); + + bool mustRelease = false; + RuntimeHelpers.PrepareConstrainedRegions(); + try + { + DangerousAddRef(ref mustRelease); + + IntPtr ptr = ADP.IntPtrOffset(DangerousGetHandle(), offset); + Marshal.Copy(ptr, destination, startIndex, length); + } + finally + { + if (mustRelease) + { + DangerousRelease(); + } + } + } + + internal Int64 ReadInt64(int offset) + { + offset += BaseOffset; + ValidateCheck(offset, 8); + Debug.Assert(0 == offset % IntPtr.Size, "invalid alignment"); + + long value; + bool mustRelease = false; + RuntimeHelpers.PrepareConstrainedRegions(); + try + { + DangerousAddRef(ref mustRelease); + + IntPtr ptr = DangerousGetHandle(); + value = Marshal.ReadInt64(ptr, offset); + } + finally + { + if (mustRelease) + { + DangerousRelease(); + } + } + return value; + } + + internal IntPtr ReadIntPtr(int offset) + { + offset += BaseOffset; + ValidateCheck(offset, IntPtr.Size); + Debug.Assert(0 == offset % ADP.PtrSize, "invalid alignment"); + + IntPtr value; + bool mustRelease = false; + RuntimeHelpers.PrepareConstrainedRegions(); + try + { + DangerousAddRef(ref mustRelease); + + IntPtr ptr = DangerousGetHandle(); + value = Marshal.ReadIntPtr(ptr, offset); + } + finally + { + if (mustRelease) + { + DangerousRelease(); + } + } + return value; + } + + internal unsafe Single ReadSingle(int offset) + { + Int32 value = ReadInt32(offset); + return *(Single*)&value; + } + + override protected bool ReleaseHandle() + { + // NOTE: The SafeHandle class guarantees this will be called exactly once. + IntPtr ptr = base.handle; + base.handle = IntPtr.Zero; + if (IntPtr.Zero != ptr) + { + SafeNativeMethods.LocalFree(ptr); + } + return true; + } + + private void StructureToPtr(int offset, object structure) + { + Debug.Assert(null != structure, "null structure"); + offset += BaseOffset; + ValidateCheck(offset, Marshal.SizeOf(structure.GetType())); + Debug.Assert(0 == offset % ADP.PtrSize, "invalid alignment"); + + bool mustRelease = false; + RuntimeHelpers.PrepareConstrainedRegions(); + try + { + DangerousAddRef(ref mustRelease); + + IntPtr ptr = ADP.IntPtrOffset(DangerousGetHandle(), offset); + Marshal.StructureToPtr(structure, ptr, false/*fDeleteOld*/); + } + finally + { + if (mustRelease) + { + DangerousRelease(); + } + } + } + + internal void WriteByte(int offset, byte value) + { + offset += BaseOffset; + ValidateCheck(offset, 1); + Debug.Assert(0 == offset % 4, "invalid alignment"); + + bool mustRelease = false; + RuntimeHelpers.PrepareConstrainedRegions(); + try + { + DangerousAddRef(ref mustRelease); + + IntPtr ptr = DangerousGetHandle(); + Marshal.WriteByte(ptr, offset, value); + } + finally + { + if (mustRelease) + { + DangerousRelease(); + } + } + } + + internal void WriteBytes(int offset, byte[] source, int startIndex, int length) + { + offset += BaseOffset; + Validate(offset, length); + Debug.Assert(0 == offset % ADP.PtrSize, "invalid alignment"); + Debug.Assert(null != source, "null source"); + Debug.Assert(startIndex + length <= source.Length, "source too small"); + + bool mustRelease = false; + RuntimeHelpers.PrepareConstrainedRegions(); + try + { + DangerousAddRef(ref mustRelease); + + IntPtr ptr = ADP.IntPtrOffset(DangerousGetHandle(), offset); + Marshal.Copy(source, startIndex, ptr, length); + } + finally + { + if (mustRelease) + { + DangerousRelease(); + } + } + } + + internal void WriteCharArray(int offset, char[] source, int startIndex, int length) + { + offset += BaseOffset; + Validate(offset, 2 * length); + Debug.Assert(0 == offset % ADP.PtrSize, "invalid alignment"); + Debug.Assert(null != source, "null source"); + Debug.Assert(startIndex + length <= source.Length, "source too small"); + + bool mustRelease = false; + RuntimeHelpers.PrepareConstrainedRegions(); + try + { + DangerousAddRef(ref mustRelease); + + IntPtr ptr = ADP.IntPtrOffset(DangerousGetHandle(), offset); + Marshal.Copy(source, startIndex, ptr, length); + } + finally + { + if (mustRelease) + { + DangerousRelease(); + } + } + } + + internal void WriteDouble(int offset, Double value) + { + WriteInt64(offset, BitConverter.DoubleToInt64Bits(value)); + } + + internal void WriteInt16(int offset, short value) + { + offset += BaseOffset; + ValidateCheck(offset, 2); + Debug.Assert(0 == offset % 2, "invalid alignment"); + + bool mustRelease = false; + RuntimeHelpers.PrepareConstrainedRegions(); + try + { + DangerousAddRef(ref mustRelease); + + IntPtr ptr = DangerousGetHandle(); + Marshal.WriteInt16(ptr, offset, value); + } + finally + { + if (mustRelease) + { + DangerousRelease(); + } + } + } + + internal void WriteInt16Array(int offset, short[] source, int startIndex, int length) + { + offset += BaseOffset; + Validate(offset, 2 * length); + Debug.Assert(0 == offset % ADP.PtrSize, "invalid alignment"); + Debug.Assert(null != source, "null source"); + Debug.Assert(startIndex + length <= source.Length, "source too small"); + + bool mustRelease = false; + RuntimeHelpers.PrepareConstrainedRegions(); + try + { + DangerousAddRef(ref mustRelease); + + IntPtr ptr = ADP.IntPtrOffset(DangerousGetHandle(), offset); + Marshal.Copy(source, startIndex, ptr, length); + } + finally + { + if (mustRelease) + { + DangerousRelease(); + } + } + } + + internal void WriteInt32(int offset, int value) + { + offset += BaseOffset; + ValidateCheck(offset, 4); + Debug.Assert(0 == offset % 4, "invalid alignment"); + + bool mustRelease = false; + RuntimeHelpers.PrepareConstrainedRegions(); + try + { + DangerousAddRef(ref mustRelease); + + IntPtr ptr = DangerousGetHandle(); + Marshal.WriteInt32(ptr, offset, value); + } + finally + { + if (mustRelease) + { + DangerousRelease(); + } + } + } + + internal void WriteInt32Array(int offset, int[] source, int startIndex, int length) + { + offset += BaseOffset; + Validate(offset, 4 * length); + Debug.Assert(0 == offset % ADP.PtrSize, "invalid alignment"); + Debug.Assert(null != source, "null source"); + Debug.Assert(startIndex + length <= source.Length, "source too small"); + + bool mustRelease = false; + RuntimeHelpers.PrepareConstrainedRegions(); + try + { + DangerousAddRef(ref mustRelease); + + IntPtr ptr = ADP.IntPtrOffset(DangerousGetHandle(), offset); + Marshal.Copy(source, startIndex, ptr, length); + } + finally + { + if (mustRelease) + { + DangerousRelease(); + } + } + } + + internal void WriteInt64(int offset, long value) + { + offset += BaseOffset; + ValidateCheck(offset, 8); + Debug.Assert(0 == offset % IntPtr.Size, "invalid alignment"); + + bool mustRelease = false; + RuntimeHelpers.PrepareConstrainedRegions(); + try + { + DangerousAddRef(ref mustRelease); + + IntPtr ptr = DangerousGetHandle(); + Marshal.WriteInt64(ptr, offset, value); + } + finally + { + if (mustRelease) + { + DangerousRelease(); + } + } + } + + internal void WriteIntPtr(int offset, IntPtr value) + { + offset += BaseOffset; + ValidateCheck(offset, IntPtr.Size); + Debug.Assert(0 == offset % IntPtr.Size, "invalid alignment"); + + bool mustRelease = false; + RuntimeHelpers.PrepareConstrainedRegions(); + try + { + DangerousAddRef(ref mustRelease); + + IntPtr ptr = DangerousGetHandle(); + Marshal.WriteIntPtr(ptr, offset, value); + } + finally + { + if (mustRelease) + { + DangerousRelease(); + } + } + } + + internal unsafe void WriteSingle(int offset, Single value) + { + WriteInt32(offset, *(Int32*)&value); + } + + internal Guid ReadGuid(int offset) + { + // faster than Marshal.PtrToStructure(offset, typeof(Guid)) + byte[] buffer = new byte[16]; + ReadBytes(offset, buffer, 0, 16); + return new Guid(buffer); + } + internal void WriteGuid(int offset, Guid value) + { + // faster than Marshal.Copy(value.GetByteArray() + StructureToPtr(offset, value); + } + + internal DateTime ReadDate(int offset) + { + short[] buffer = new short[3]; + ReadInt16Array(offset, buffer, 0, 3); + return new DateTime( + unchecked((ushort)buffer[0]), // Year + unchecked((ushort)buffer[1]), // Month + unchecked((ushort)buffer[2])); // Day + } + internal void WriteDate(int offset, DateTime value) + { + short[] buffer = new short[3] { + unchecked((short)value.Year), + unchecked((short)value.Month), + unchecked((short)value.Day), + }; + WriteInt16Array(offset, buffer, 0, 3); + } + + internal TimeSpan ReadTime(int offset) + { + short[] buffer = new short[3]; + ReadInt16Array(offset, buffer, 0, 3); + return new TimeSpan( + unchecked((ushort)buffer[0]), // Hours + unchecked((ushort)buffer[1]), // Minutes + unchecked((ushort)buffer[2])); // Seconds + } + internal void WriteTime(int offset, TimeSpan value) + { + short[] buffer = new short[3] { + unchecked((short)value.Hours), + unchecked((short)value.Minutes), + unchecked((short)value.Seconds), + }; + WriteInt16Array(offset, buffer, 0, 3); + } + + internal DateTime ReadDateTime(int offset) + { + short[] buffer = new short[6]; + ReadInt16Array(offset, buffer, 0, 6); + int ticks = ReadInt32(offset + 12); + DateTime value = new DateTime( + unchecked((ushort)buffer[0]), // Year + unchecked((ushort)buffer[1]), // Month + unchecked((ushort)buffer[2]), // Day + unchecked((ushort)buffer[3]), // Hours + unchecked((ushort)buffer[4]), // Minutes + unchecked((ushort)buffer[5])); // Seconds + return value.AddTicks(ticks / 100); + } + internal void WriteDateTime(int offset, DateTime value) + { + int ticks = (int)(value.Ticks % 10000000L) * 100; + short[] buffer = new short[6] { + unchecked((short)value.Year), + unchecked((short)value.Month), + unchecked((short)value.Day), + unchecked((short)value.Hour), + unchecked((short)value.Minute), + unchecked((short)value.Second), + }; + WriteInt16Array(offset, buffer, 0, 6); + WriteInt32(offset + 12, ticks); + } + + internal Decimal ReadNumeric(int offset) + { + byte[] bits = new byte[20]; + ReadBytes(offset, bits, 1, 19); + + int[] buffer = new int[4]; + buffer[3] = ((int)bits[2]) << 16; // scale + if (0 == bits[3]) + { + buffer[3] |= unchecked((int)0x80000000); //sign + } + buffer[0] = BitConverter.ToInt32(bits, 4); // low + buffer[1] = BitConverter.ToInt32(bits, 8); // mid + buffer[2] = BitConverter.ToInt32(bits, 12); // high + if (0 != BitConverter.ToInt32(bits, 16)) + { + throw ADP.NumericToDecimalOverflow(); + } + return new Decimal(buffer); + } + + internal void WriteNumeric(int offset, Decimal value, byte precision) + { + int[] tmp = Decimal.GetBits(value); + byte[] buffer = new byte[20]; + + buffer[1] = precision; + Buffer.BlockCopy(tmp, 14, buffer, 2, 2); // copy sign and scale + buffer[3] = (Byte)((0 == buffer[3]) ? 1 : 0); // flip sign for native + Buffer.BlockCopy(tmp, 0, buffer, 4, 12); + buffer[16] = 0; + buffer[17] = 0; + buffer[18] = 0; + buffer[19] = 0; + WriteBytes(offset, buffer, 1, 19); + } + + [Conditional("DEBUG")] + protected void ValidateCheck(int offset, int count) + { + Validate(offset, count); + } + + protected void Validate(int offset, int count) + { + if ((offset < 0) || (count < 0) || (Length < checked(offset + count))) + { + throw ADP.InternalError(ADP.InternalErrorCode.InvalidBuffer); + } + } + } +} diff --git a/src/System.Data.OleDb/src/System/Data/ProviderBase/DbConnectionClosed.cs b/src/System.Data.OleDb/src/System/Data/ProviderBase/DbConnectionClosed.cs new file mode 100644 index 000000000000..1fde315ab5af --- /dev/null +++ b/src/System.Data.OleDb/src/System/Data/ProviderBase/DbConnectionClosed.cs @@ -0,0 +1,162 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Data.Common; +using System.Diagnostics; +using System.Threading.Tasks; +using SysTx = System.Transactions; + +namespace System.Data.ProviderBase +{ + abstract internal class DbConnectionClosed : DbConnectionInternal + { + // Construct an "empty" connection + protected DbConnectionClosed(ConnectionState state, bool hidePassword, bool allowSetConnectionString) : base(state, hidePassword, allowSetConnectionString) + { + } + + override public string ServerVersion + { + get + { + throw ADP.ClosedConnectionError(); + } + } + + override protected void Activate(SysTx.Transaction transaction) + { + throw ADP.ClosedConnectionError(); + } + + override public DbTransaction BeginTransaction(IsolationLevel il) + { + throw ADP.ClosedConnectionError(); + } + + internal override void CloseConnection(DbConnection owningObject, DbConnectionFactory connectionFactory) + { + // not much to do here... + } + + override protected void Deactivate() + { + throw ADP.ClosedConnectionError(); + } + + override public void EnlistTransaction(SysTx.Transaction transaction) + { + throw ADP.ClosedConnectionError(); + } + + override protected internal DataTable GetSchema(DbConnectionFactory factory, DbConnectionPoolGroup poolGroup, DbConnection outerConnection, string collectionName, string[] restrictions) + { + throw ADP.ClosedConnectionError(); + } + + protected override DbReferenceCollection CreateReferenceCollection() + { + throw ADP.ClosedConnectionError(); + } + + internal override bool TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource retry, DbConnectionOptions userOptions) + { + return base.TryOpenConnectionInternal(outerConnection, connectionFactory, retry, userOptions); + } + } + + abstract internal class DbConnectionBusy : DbConnectionClosed + { + protected DbConnectionBusy(ConnectionState state) : base(state, true, false) + { + } + + internal override bool TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource retry, DbConnectionOptions userOptions) + { + throw ADP.ConnectionAlreadyOpen(State); + } + } + + sealed internal class DbConnectionClosedBusy : DbConnectionBusy + { + // Closed Connection, Currently Busy - changing connection string + internal static readonly DbConnectionInternal SingletonInstance = new DbConnectionClosedBusy(); // singleton object + + private DbConnectionClosedBusy() : base(ConnectionState.Closed) + { + } + } + + sealed internal class DbConnectionOpenBusy : DbConnectionBusy + { + // Open Connection, Currently Busy - closing connection + internal static readonly DbConnectionInternal SingletonInstance = new DbConnectionOpenBusy(); // singleton object + + private DbConnectionOpenBusy() : base(ConnectionState.Open) + { + } + } + + sealed internal class DbConnectionClosedConnecting : DbConnectionBusy + { + // Closed Connection, Currently Connecting + + internal static readonly DbConnectionInternal SingletonInstance = new DbConnectionClosedConnecting(); // singleton object + + private DbConnectionClosedConnecting() : base(ConnectionState.Connecting) + { + } + + internal override void CloseConnection(DbConnection owningObject, DbConnectionFactory connectionFactory) + { + connectionFactory.SetInnerConnectionTo(owningObject, DbConnectionClosedPreviouslyOpened.SingletonInstance); + } + + internal override bool TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource retry, DbConnectionOptions userOptions) + { + if (retry == null || !retry.Task.IsCompleted) + { + // retry is null if this is a synchronous call + + // if someone calls Open or OpenAsync while in this state, + // then the retry task will not be completed + + throw ADP.ConnectionAlreadyOpen(State); + } + + // we are completing an asynchronous open + Debug.Assert(retry.Task.Status == TaskStatus.RanToCompletion, "retry task must be completed successfully"); + DbConnectionInternal openConnection = retry.Task.Result; + if (null == openConnection) + { + connectionFactory.SetInnerConnectionTo(outerConnection, this); + throw ADP.InternalConnectionError(ADP.ConnectionError.GetConnectionReturnsNull); + } + connectionFactory.SetInnerConnectionEvent(outerConnection, openConnection); + + return true; + } + } + + sealed internal class DbConnectionClosedNeverOpened : DbConnectionClosed + { + // Closed Connection, Has Never Been Opened + + internal static readonly DbConnectionInternal SingletonInstance = new DbConnectionClosedNeverOpened(); // singleton object + + private DbConnectionClosedNeverOpened() : base(ConnectionState.Closed, false, true) + { + } + } + + sealed internal class DbConnectionClosedPreviouslyOpened : DbConnectionClosed + { + // Closed Connection, Has Previously Been Opened + + internal static readonly DbConnectionInternal SingletonInstance = new DbConnectionClosedPreviouslyOpened(); // singleton object + + private DbConnectionClosedPreviouslyOpened() : base(ConnectionState.Closed, true, true) + { + } + } +} diff --git a/src/System.Data.OleDb/src/System/Data/ProviderBase/DbConnectionFactory.cs b/src/System.Data.OleDb/src/System/Data/ProviderBase/DbConnectionFactory.cs new file mode 100644 index 000000000000..461085754534 --- /dev/null +++ b/src/System.Data.OleDb/src/System/Data/ProviderBase/DbConnectionFactory.cs @@ -0,0 +1,585 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Collections.Generic; +using System.Data.Common; +using System.Diagnostics; +using System.Threading; +using System.Threading.Tasks; + +namespace System.Data.ProviderBase +{ + internal abstract class DbConnectionFactory + { + private Dictionary _connectionPoolGroups; + private readonly List _poolsToRelease; + private readonly List _poolGroupsToRelease; + private readonly DbConnectionPoolCounters _performanceCounters; + private readonly Timer _pruningTimer; + + private const int PruningDueTime = 4 * 60 * 1000; // 4 minutes + private const int PruningPeriod = 30 * 1000; // thirty seconds + + // s_pendingOpenNonPooled is an array of tasks used to throttle creation of non-pooled connections to + // a maximum of Environment.ProcessorCount at a time. + static int s_pendingOpenNonPooledNext = 0; + static Task[] s_pendingOpenNonPooled = new Task[Environment.ProcessorCount]; + static Task s_completedTask; + + protected DbConnectionFactory() : this(DbConnectionPoolCountersNoCounters.SingletonInstance) { } + + protected DbConnectionFactory(DbConnectionPoolCounters performanceCounters) + { + _performanceCounters = performanceCounters; + _connectionPoolGroups = new Dictionary(); + _poolsToRelease = new List(); + _poolGroupsToRelease = new List(); + _pruningTimer = CreatePruningTimer(); + } + + internal DbConnectionPoolCounters PerformanceCounters + { + get { return _performanceCounters; } + } + + abstract public DbProviderFactory ProviderFactory + { + get; + } + + public void ClearAllPools() + { + Dictionary connectionPoolGroups = _connectionPoolGroups; + foreach (KeyValuePair entry in connectionPoolGroups) + { + DbConnectionPoolGroup poolGroup = entry.Value; + if (null != poolGroup) + { + poolGroup.Clear(); + } + } + } + + virtual protected DbMetaDataFactory CreateMetaDataFactory(DbConnectionInternal internalConnection, out bool cacheMetaDataFactory) + { + // providers that support GetSchema must override this with a method that creates a meta data + // factory appropriate for them. + cacheMetaDataFactory = false; + throw ADP.NotSupported(); + } + + internal DbConnectionInternal CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup, DbConnectionOptions userOptions) + { + Debug.Assert(null != owningConnection, "null owningConnection?"); + Debug.Assert(null != poolGroup, "null poolGroup?"); + + DbConnectionOptions connectionOptions = poolGroup.ConnectionOptions; + DbConnectionPoolGroupProviderInfo poolGroupProviderInfo = poolGroup.ProviderInfo; + DbConnectionPoolKey poolKey = poolGroup.PoolKey; + + DbConnectionInternal newConnection = CreateConnection(connectionOptions, poolKey, poolGroupProviderInfo, null, owningConnection, userOptions); + if (null != newConnection) + { + PerformanceCounters.HardConnectsPerSecond.Increment(); + newConnection.MakeNonPooledObject(owningConnection, PerformanceCounters); + } + return newConnection; + } + + internal DbConnectionInternal CreatePooledConnection(DbConnectionPool pool, DbConnection owningObject, DbConnectionOptions options, DbConnectionPoolKey poolKey, DbConnectionOptions userOptions) + { + Debug.Assert(null != pool, "null pool?"); + DbConnectionPoolGroupProviderInfo poolGroupProviderInfo = pool.PoolGroup.ProviderInfo; + + DbConnectionInternal newConnection = CreateConnection(options, poolKey, poolGroupProviderInfo, pool, owningObject, userOptions); + if (null != newConnection) + { + PerformanceCounters.HardConnectsPerSecond.Increment(); + newConnection.MakePooledConnection(pool); + } + return newConnection; + } + + virtual internal DbConnectionPoolGroupProviderInfo CreateConnectionPoolGroupProviderInfo(DbConnectionOptions connectionOptions) + { + return null; + } + + private Timer CreatePruningTimer() + { + TimerCallback callback = new TimerCallback(PruneConnectionPoolGroups); + return new Timer(callback, null, PruningDueTime, PruningPeriod); + } + + // GetCompletedTask must be called from within s_pendingOpenPooled lock + static Task GetCompletedTask() + { + if (s_completedTask == null) + { + TaskCompletionSource source = new TaskCompletionSource(); + source.SetResult(null); + s_completedTask = source.Task; + } + return s_completedTask; + } + + internal bool TryGetConnection(DbConnection owningConnection, TaskCompletionSource retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, out DbConnectionInternal connection) + { + Debug.Assert(null != owningConnection, "null owningConnection?"); + + DbConnectionPoolGroup poolGroup; + DbConnectionPool connectionPool; + connection = null; + + // Work around race condition with clearing the pool between GetConnectionPool obtaining pool + // and GetConnection on the pool checking the pool state. Clearing the pool in this window + // will switch the pool into the ShuttingDown state, and GetConnection will return null. + // There is probably a better solution involving locking the pool/group, but that entails a major + // re-design of the connection pooling synchronization, so is post-poned for now. + + // use retriesLeft to prevent CPU spikes with incremental sleep + // start with one msec, double the time every retry + // max time is: 1 + 2 + 4 + ... + 2^(retries-1) == 2^retries -1 == 1023ms (for 10 retries) + int retriesLeft = 10; + int timeBetweenRetriesMilliseconds = 1; + + do + { + poolGroup = GetConnectionPoolGroup(owningConnection); + // Doing this on the callers thread is important because it looks up the WindowsIdentity from the thread. + connectionPool = GetConnectionPool(owningConnection, poolGroup); + if (null == connectionPool) + { + // If GetConnectionPool returns null, we can be certain that + // this connection should not be pooled via DbConnectionPool + // or have a disabled pool entry. + poolGroup = GetConnectionPoolGroup(owningConnection); // previous entry have been disabled + + if (retry != null) + { + Task newTask; + CancellationTokenSource cancellationTokenSource = new CancellationTokenSource(); + lock (s_pendingOpenNonPooled) + { + // look for an available task slot (completed or empty) + int idx; + for (idx = 0; idx < s_pendingOpenNonPooled.Length; idx++) + { + Task task = s_pendingOpenNonPooled[idx]; + if (task == null) + { + s_pendingOpenNonPooled[idx] = GetCompletedTask(); + break; + } + else if (task.IsCompleted) + { + break; + } + } + + // if didn't find one, pick the next one in round-robbin fashion + if (idx == s_pendingOpenNonPooled.Length) + { + idx = s_pendingOpenNonPooledNext++ % s_pendingOpenNonPooled.Length; + } + + // now that we have an antecedent task, schedule our work when it is completed. + // If it is a new slot or a compelted task, this continuation will start right away. + // BUG? : If we have timed out task on top of running task, then new task could be started + // on top of that, since we are only checking the top task. This will lead to starting more threads + // than intended. + newTask = s_pendingOpenNonPooled[idx].ContinueWith((_) => + { + Transactions.Transaction originalTransaction = ADP.GetCurrentTransaction(); + try + { + ADP.SetCurrentTransaction(retry.Task.AsyncState as Transactions.Transaction); + var newConnection = CreateNonPooledConnection(owningConnection, poolGroup, userOptions); + if ((oldConnection != null) && (oldConnection.State == ConnectionState.Open)) + { + oldConnection.PrepareForReplaceConnection(); + oldConnection.Dispose(); + } + return newConnection; + } + finally + { + ADP.SetCurrentTransaction(originalTransaction); + } + }, cancellationTokenSource.Token, TaskContinuationOptions.LongRunning, TaskScheduler.Default); + + // Place this new task in the slot so any future work will be queued behind it + s_pendingOpenNonPooled[idx] = newTask; + } + + // Set up the timeout (if needed) + if (owningConnection.ConnectionTimeout > 0) + { + int connectionTimeoutMilliseconds = owningConnection.ConnectionTimeout * 1000; + cancellationTokenSource.CancelAfter(connectionTimeoutMilliseconds); + } + + // once the task is done, propagate the final results to the original caller + newTask.ContinueWith((task) => + { + cancellationTokenSource.Dispose(); + if (task.IsCanceled) + { + retry.TrySetException(ADP.ExceptionWithStackTrace(ADP.NonPooledOpenTimeout())); + } + else if (task.IsFaulted) + { + retry.TrySetException(task.Exception.InnerException); + } + else + { + if (retry.TrySetResult(task.Result)) + { + PerformanceCounters.NumberOfNonPooledConnections.Increment(); + } + else + { + // The outer TaskCompletionSource was already completed + // Which means that we don't know if someone has messed with the outer connection in the middle of creation + // So the best thing to do now is to destroy the newly created connection + task.Result.DoomThisConnection(); + task.Result.Dispose(); + } + } + }, TaskScheduler.Default); + + return false; + } + + connection = CreateNonPooledConnection(owningConnection, poolGroup, userOptions); + PerformanceCounters.NumberOfNonPooledConnections.Increment(); + } + else + { + if (((System.Data.OleDb.OleDbConnection)owningConnection).ForceNewConnection) + { + Debug.Assert(!(oldConnection is DbConnectionClosed), "Force new connection, but there is no old connection"); + connection = connectionPool.ReplaceConnection(owningConnection, userOptions, oldConnection); + } + else + { + if (!connectionPool.TryGetConnection(owningConnection, retry, userOptions, out connection)) + { + return false; + } + } + + if (connection == null) + { + // connection creation failed on semaphore waiting or if max pool reached + if (connectionPool.IsRunning) + { + // If GetConnection failed while the pool is running, the pool timeout occurred. + throw ADP.PooledOpenTimeout(); + } + else + { + // We've hit the race condition, where the pool was shut down after we got it from the group. + // Yield time slice to allow shut down activities to complete and a new, running pool to be instantiated + // before retrying. + Threading.Thread.Sleep(timeBetweenRetriesMilliseconds); + timeBetweenRetriesMilliseconds *= 2; // double the wait time for next iteration + } + } + } + } while (connection == null && retriesLeft-- > 0); + + if (connection == null) + { + // exhausted all retries or timed out - give up + throw ADP.PooledOpenTimeout(); + } + + return true; + } + + private DbConnectionPool GetConnectionPool(DbConnection owningObject, DbConnectionPoolGroup connectionPoolGroup) + { + // if poolgroup is disabled, it will be replaced with a new entry + + Debug.Assert(null != owningObject, "null owningObject?"); + Debug.Assert(null != connectionPoolGroup, "null connectionPoolGroup?"); + + // It is possible that while the outer connection object has + // been sitting around in a closed and unused state in some long + // running app, the pruner may have come along and remove this + // the pool entry from the master list. If we were to use a + // pool entry in this state, we would create "unmanaged" pools, + // which would be bad. To avoid this problem, we automagically + // re-create the pool entry whenever it's disabled. + + // however, don't rebuild connectionOptions if no pooling is involved - let new connections do that work + if (connectionPoolGroup.IsDisabled && (null != connectionPoolGroup.PoolGroupOptions)) + { + // reusing existing pool option in case user originally used SetConnectionPoolOptions + DbConnectionPoolGroupOptions poolOptions = connectionPoolGroup.PoolGroupOptions; + + // get the string to hash on again + DbConnectionOptions connectionOptions = connectionPoolGroup.ConnectionOptions; + Debug.Assert(null != connectionOptions, "prevent expansion of connectionString"); + + connectionPoolGroup = GetConnectionPoolGroup(connectionPoolGroup.PoolKey, poolOptions, ref connectionOptions); + Debug.Assert(null != connectionPoolGroup, "null connectionPoolGroup?"); + SetConnectionPoolGroup(owningObject, connectionPoolGroup); + } + DbConnectionPool connectionPool = connectionPoolGroup.GetConnectionPool(this); + return connectionPool; + } + + internal DbConnectionPoolGroup GetConnectionPoolGroup(DbConnectionPoolKey key, DbConnectionPoolGroupOptions poolOptions, ref DbConnectionOptions userConnectionOptions) + { + if (ADP.IsEmpty(key.ConnectionString)) + { + return (DbConnectionPoolGroup)null; + } + + DbConnectionPoolGroup connectionPoolGroup; + Dictionary connectionPoolGroups = _connectionPoolGroups; + if (!connectionPoolGroups.TryGetValue(key, out connectionPoolGroup) || (connectionPoolGroup.IsDisabled && (null != connectionPoolGroup.PoolGroupOptions))) + { + // If we can't find an entry for the connection string in + // our collection of pool entries, then we need to create a + // new pool entry and add it to our collection. + + DbConnectionOptions connectionOptions = CreateConnectionOptions(key.ConnectionString, userConnectionOptions); + if (null == connectionOptions) + { + throw ADP.InternalConnectionError(ADP.ConnectionError.ConnectionOptionsMissing); + } + + string expandedConnectionString = key.ConnectionString; + if (null == userConnectionOptions) + { // we only allow one expansion on the connection string + + userConnectionOptions = connectionOptions; + expandedConnectionString = connectionOptions.Expand(); + + // if the expanded string is same instance (default implementation), the use the already created options + if ((object)expandedConnectionString != (object)key.ConnectionString) + { + // CONSIDER: caching the original string to reduce future parsing + DbConnectionPoolKey newKey = (DbConnectionPoolKey)((ICloneable)key).Clone(); + newKey.ConnectionString = expandedConnectionString; + return GetConnectionPoolGroup(newKey, null, ref userConnectionOptions); + } + } + + // We don't support connection pooling on Win9x; it lacks too many of the APIs we require. + if ((null == poolOptions) && ADP.IsWindowsNT) + { + if (null != connectionPoolGroup) + { + // reusing existing pool option in case user originally used SetConnectionPoolOptions + poolOptions = connectionPoolGroup.PoolGroupOptions; + } + else + { + // Note: may return null for non-pooled connections + poolOptions = CreateConnectionPoolGroupOptions(connectionOptions); + } + } + + lock (this) + { + connectionPoolGroups = _connectionPoolGroups; + if (!connectionPoolGroups.TryGetValue(key, out connectionPoolGroup)) + { + DbConnectionPoolGroup newConnectionPoolGroup = new DbConnectionPoolGroup(connectionOptions, key, poolOptions); + newConnectionPoolGroup.ProviderInfo = CreateConnectionPoolGroupProviderInfo(connectionOptions); + + // build new dictionary with space for new connection string + Dictionary newConnectionPoolGroups = new Dictionary(1 + connectionPoolGroups.Count); + foreach (KeyValuePair entry in connectionPoolGroups) + { + newConnectionPoolGroups.Add(entry.Key, entry.Value); + } + + // lock prevents race condition with PruneConnectionPoolGroups + newConnectionPoolGroups.Add(key, newConnectionPoolGroup); + PerformanceCounters.NumberOfActiveConnectionPoolGroups.Increment(); + connectionPoolGroup = newConnectionPoolGroup; + _connectionPoolGroups = newConnectionPoolGroups; + } + else + { + Debug.Assert(!connectionPoolGroup.IsDisabled, "Disabled pool entry discovered"); + } + } + Debug.Assert(null != connectionPoolGroup, "how did we not create a pool entry?"); + Debug.Assert(null != userConnectionOptions, "how did we not have user connection options?"); + } + else if (null == userConnectionOptions) + { + userConnectionOptions = connectionPoolGroup.ConnectionOptions; + } + return connectionPoolGroup; + } + + internal DbMetaDataFactory GetMetaDataFactory(DbConnectionPoolGroup connectionPoolGroup, DbConnectionInternal internalConnection) + { + Debug.Assert(connectionPoolGroup != null, "connectionPoolGroup may not be null."); + + // get the matadatafactory from the pool entry. If it does not already have one + // create one and save it on the pool entry + DbMetaDataFactory metaDataFactory = connectionPoolGroup.MetaDataFactory; + + // consider serializing this so we don't construct multiple metadata factories + // if two threads happen to hit this at the same time. One will be GC'd + if (metaDataFactory == null) + { + bool allowCache = false; + metaDataFactory = CreateMetaDataFactory(internalConnection, out allowCache); + if (allowCache) + { + connectionPoolGroup.MetaDataFactory = metaDataFactory; + } + } + return metaDataFactory; + } + + private void PruneConnectionPoolGroups(object state) + { + // when debugging this method, expect multiple threads at the same time + // First, walk the pool release list and attempt to clear each + // pool, when the pool is finally empty, we dispose of it. If the + // pool isn't empty, it's because there are active connections or + // distributed transactions that need it. + lock (_poolsToRelease) + { + if (0 != _poolsToRelease.Count) + { + DbConnectionPool[] poolsToRelease = _poolsToRelease.ToArray(); + foreach (DbConnectionPool pool in poolsToRelease) + { + if (null != pool) + { + pool.Clear(); + + if (0 == pool.Count) + { + _poolsToRelease.Remove(pool); + PerformanceCounters.NumberOfInactiveConnectionPools.Decrement(); + } + } + } + } + } + + // Next, walk the pool entry release list and dispose of each + // pool entry when it is finally empty. If the pool entry isn't + // empty, it's because there are active pools that need it. + lock (_poolGroupsToRelease) + { + if (0 != _poolGroupsToRelease.Count) + { + DbConnectionPoolGroup[] poolGroupsToRelease = _poolGroupsToRelease.ToArray(); + foreach (DbConnectionPoolGroup poolGroup in poolGroupsToRelease) + { + if (null != poolGroup) + { + int poolsLeft = poolGroup.Clear(); // may add entries to _poolsToRelease + + if (0 == poolsLeft) + { + _poolGroupsToRelease.Remove(poolGroup); + PerformanceCounters.NumberOfInactiveConnectionPoolGroups.Decrement(); + } + } + } + } + } + + // Finally, we walk through the collection of connection pool entries + // and prune each one. This will cause any empty pools to be put + // into the release list. + lock (this) + { + Dictionary connectionPoolGroups = _connectionPoolGroups; + Dictionary newConnectionPoolGroups = new Dictionary(connectionPoolGroups.Count); + + foreach (KeyValuePair entry in connectionPoolGroups) + { + if (null != entry.Value) + { + Debug.Assert(!entry.Value.IsDisabled, "Disabled pool entry discovered"); + + // entries start active and go idle during prune if all pools are gone + // move idle entries from last prune pass to a queue for pending release + // otherwise process entry which may move it from active to idle + if (entry.Value.Prune()) + { // may add entries to _poolsToRelease + PerformanceCounters.NumberOfActiveConnectionPoolGroups.Decrement(); + QueuePoolGroupForRelease(entry.Value); + } + else + { + newConnectionPoolGroups.Add(entry.Key, entry.Value); + } + } + } + _connectionPoolGroups = newConnectionPoolGroups; + } + } + + internal void QueuePoolForRelease(DbConnectionPool pool, bool clearing) + { + // Queue the pool up for release -- we'll clear it out and dispose + // of it as the last part of the pruning timer callback so we don't + // do it with the pool entry or the pool collection locked. + Debug.Assert(null != pool, "null pool?"); + + // set the pool to the shutdown state to force all active + // connections to be automatically disposed when they + // are returned to the pool + pool.Shutdown(); + + lock (_poolsToRelease) + { + if (clearing) + { + pool.Clear(); + } + _poolsToRelease.Add(pool); + } + PerformanceCounters.NumberOfInactiveConnectionPools.Increment(); + } + + internal void QueuePoolGroupForRelease(DbConnectionPoolGroup poolGroup) + { + Debug.Assert(null != poolGroup, "null poolGroup?"); + lock (_poolGroupsToRelease) + { + _poolGroupsToRelease.Add(poolGroup); + } + PerformanceCounters.NumberOfInactiveConnectionPoolGroups.Increment(); + } + + virtual protected DbConnectionInternal CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions) + { + return CreateConnection(options, poolKey, poolGroupProviderInfo, pool, owningConnection); + } + + abstract protected DbConnectionInternal CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection); + + abstract protected DbConnectionOptions CreateConnectionOptions(string connectionString, DbConnectionOptions previous); + + abstract protected DbConnectionPoolGroupOptions CreateConnectionPoolGroupOptions(DbConnectionOptions options); + + abstract internal DbConnectionPoolGroup GetConnectionPoolGroup(DbConnection connection); + abstract internal void PermissionDemand(DbConnection outerConnection); + + abstract internal void SetConnectionPoolGroup(DbConnection outerConnection, DbConnectionPoolGroup poolGroup); + + abstract internal void SetInnerConnectionEvent(DbConnection owningObject, DbConnectionInternal to); + + abstract internal bool SetInnerConnectionFrom(DbConnection owningObject, DbConnectionInternal to, DbConnectionInternal from); + + abstract internal void SetInnerConnectionTo(DbConnection owningObject, DbConnectionInternal to); + } +} diff --git a/src/System.Data.OleDb/src/System/Data/ProviderBase/DbConnectionHelper.cs b/src/System.Data.OleDb/src/System/Data/ProviderBase/DbConnectionHelper.cs new file mode 100644 index 000000000000..722ba326f981 --- /dev/null +++ b/src/System.Data.OleDb/src/System/Data/ProviderBase/DbConnectionHelper.cs @@ -0,0 +1,334 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Data.Common; +using System.Data.ProviderBase; +using System.Diagnostics; +using System.Threading; + +namespace System.Data.OleDb +{ + using SysTx = Transactions; + + public sealed partial class OleDbConnection : DbConnection + { + private static readonly DbConnectionFactory _connectionFactory = OleDbConnectionFactory.SingletonInstance; + + private DbConnectionOptions _userConnectionOptions; + private DbConnectionPoolGroup _poolGroup; + private DbConnectionInternal _innerConnection; + private int _closeCount; // used to distinguish between different uses of this object, so we don't have to maintain a list of it's children + + public OleDbConnection() : base() + { + GC.SuppressFinalize(this); + _innerConnection = DbConnectionClosedNeverOpened.SingletonInstance; + } + + // Copy Constructor + private void CopyFrom(OleDbConnection connection) + { // V1.2.3300 + ADP.CheckArgumentNull(connection, "connection"); + _userConnectionOptions = connection.UserConnectionOptions; + _poolGroup = connection.PoolGroup; + + // Match the original connection's behavior for whether the connection was never opened, + // but ensure Clone is in the closed state. + if (DbConnectionClosedNeverOpened.SingletonInstance == connection._innerConnection) + { + _innerConnection = DbConnectionClosedNeverOpened.SingletonInstance; + } + else + { + _innerConnection = DbConnectionClosedPreviouslyOpened.SingletonInstance; + } + } + + internal DbConnectionFactory ConnectionFactory + { + get + { + return _connectionFactory; + } + } + + internal DbConnectionOptions ConnectionOptions + { + get + { + System.Data.ProviderBase.DbConnectionPoolGroup poolGroup = PoolGroup; + return ((null != poolGroup) ? poolGroup.ConnectionOptions : null); + } + } + + private string ConnectionString_Get() + { + bool hidePassword = InnerConnection.ShouldHidePassword; + DbConnectionOptions connectionOptions = UserConnectionOptions; + return ((null != connectionOptions) ? connectionOptions.UsersConnectionString(hidePassword) : ""); + } + + private void ConnectionString_Set(string value) + { + DbConnectionPoolKey key = new DbConnectionPoolKey(value); + + ConnectionString_Set(key); + } + + private void ConnectionString_Set(DbConnectionPoolKey key) + { + DbConnectionOptions connectionOptions = null; + System.Data.ProviderBase.DbConnectionPoolGroup poolGroup = ConnectionFactory.GetConnectionPoolGroup(key, null, ref connectionOptions); + DbConnectionInternal connectionInternal = InnerConnection; + bool flag = connectionInternal.AllowSetConnectionString; + if (flag) + { + //try { + // NOTE: There's a race condition with multiple threads changing + // ConnectionString and any thread throws an exception + // Closed->Busy: prevent Open during set_ConnectionString + flag = SetInnerConnectionFrom(DbConnectionClosedBusy.SingletonInstance, connectionInternal); + if (flag) + { + _userConnectionOptions = connectionOptions; + _poolGroup = poolGroup; + _innerConnection = DbConnectionClosedNeverOpened.SingletonInstance; + } + //} + //catch { + // // recover from exceptions to avoid sticking in busy state + // SetInnerConnectionFrom(connectionInternal, DbConnectionClosedBusy.SingletonInstance); + // throw; + //} + } + if (!flag) + { + throw ADP.OpenConnectionPropertySet(ADP.ConnectionString, connectionInternal.State); + } + } + + internal DbConnectionInternal InnerConnection + { + get + { + return _innerConnection; + } + } + + internal System.Data.ProviderBase.DbConnectionPoolGroup PoolGroup + { + get + { + return _poolGroup; + } + set + { + // when a poolgroup expires and the connection eventually activates, the pool entry will be replaced + Debug.Assert(null != value, "null poolGroup"); + _poolGroup = value; + } + } + + internal DbConnectionOptions UserConnectionOptions + { + get + { + return _userConnectionOptions; + } + } + + internal void AddWeakReference(object value, int tag) + { + InnerConnection.AddWeakReference(value, tag); + } + + override protected DbCommand CreateDbCommand() + { + DbCommand command = null; + + DbProviderFactory providerFactory = ConnectionFactory.ProviderFactory; + command = providerFactory.CreateCommand(); + command.Connection = this; + return command; + } + + override protected void Dispose(bool disposing) + { + if (disposing) + { + _userConnectionOptions = null; + _poolGroup = null; + Close(); + } + DisposeMe(disposing); + base.Dispose(disposing); // notify base classes + } + + partial void RepairInnerConnection(); + + //// NOTE: This is just a private helper because OracleClient V1.1 shipped + //// with a different argument name and it's a breaking change to not use + //// the same argument names in V2.0 (VB Named Parameter Binding--Ick) + //private void EnlistDistributedTransactionHelper(System.EnterpriseServices.ITransaction transaction) { + // SysTx.Transaction indigoTransaction = null; + + // if (null != transaction) { + // indigoTransaction = SysTx.TransactionInterop.GetTransactionFromDtcTransaction((SysTx.IDtcTransaction)transaction); + // } + + // RepairInnerConnection(); + // // NOTE: since transaction enlistment involves round trips to the + // // server, we don't want to lock here, we'll handle the race conditions + // // elsewhere. + // InnerConnection.EnlistTransaction(indigoTransaction); + + // // NOTE: If this outer connection were to be GC'd while we're + // // enlisting, the pooler would attempt to reclaim the inner connection + // // while we're attempting to enlist; not sure how likely that is but + // // we should consider a GC.KeepAlive(this) here. + // GC.KeepAlive(this); + //} + + override public void EnlistTransaction(SysTx.Transaction transaction) + { + // If we're currently enlisted in a transaction and we were called + // on the EnlistTransaction method (Whidbey) we're not allowed to + // enlist in a different transaction. + + DbConnectionInternal innerConnection = InnerConnection; + + // NOTE: since transaction enlistment involves round trips to the + // server, we don't want to lock here, we'll handle the race conditions + // elsewhere. + SysTx.Transaction enlistedTransaction = innerConnection.EnlistedTransaction; + if (enlistedTransaction != null) + { + // Allow calling enlist if already enlisted (no-op) + if (enlistedTransaction.Equals(transaction)) + { + return; + } + + // Allow enlisting in a different transaction if the enlisted transaction has completed. + if (enlistedTransaction.TransactionInformation.Status == SysTx.TransactionStatus.Active) + { + throw ADP.TransactionPresent(); + } + } + RepairInnerConnection(); + InnerConnection.EnlistTransaction(transaction); + + // NOTE: If this outer connection were to be GC'd while we're + // enlisting, the pooler would attempt to reclaim the inner connection + // while we're attempting to enlist; not sure how likely that is but + // we should consider a GC.KeepAlive(this) here. + GC.KeepAlive(this); + } + + override public DataTable GetSchema() + { + return this.GetSchema(DbMetaDataCollectionNames.MetaDataCollections, null); + } + + override public DataTable GetSchema(string collectionName) + { + return this.GetSchema(collectionName, null); + } + + override public DataTable GetSchema(string collectionName, string[] restrictionValues) + { + // NOTE: This is virtual because not all providers may choose to support + // returning schema data + return InnerConnection.GetSchema(ConnectionFactory, PoolGroup, this, collectionName, restrictionValues); + } + + internal void NotifyWeakReference(int message) + { + InnerConnection.NotifyWeakReference(message); + } + + internal void PermissionDemand() + { + Debug.Assert(DbConnectionClosedConnecting.SingletonInstance == _innerConnection, "not connecting"); + + System.Data.ProviderBase.DbConnectionPoolGroup poolGroup = PoolGroup; + DbConnectionOptions connectionOptions = ((null != poolGroup) ? poolGroup.ConnectionOptions : null); + if ((null == connectionOptions) || connectionOptions.IsEmpty) + { + throw ADP.NoConnectionString(); + } + + DbConnectionOptions userConnectionOptions = UserConnectionOptions; + Debug.Assert(null != userConnectionOptions, "null UserConnectionOptions"); + } + + internal void RemoveWeakReference(object value) + { + InnerConnection.RemoveWeakReference(value); + } + + // OpenBusy->Closed (previously opened) + // Connecting->Open + internal void SetInnerConnectionEvent(DbConnectionInternal to) + { + // Set's the internal connection without verifying that it's a specific value + Debug.Assert(null != _innerConnection, "null InnerConnection"); + Debug.Assert(null != to, "to null InnerConnection"); + + ConnectionState originalState = _innerConnection.State & ConnectionState.Open; + ConnectionState currentState = to.State & ConnectionState.Open; + + if ((originalState != currentState) && (ConnectionState.Closed == currentState)) + { + // Increment the close count whenever we switch to Closed + unchecked + { _closeCount++; } + } + + _innerConnection = to; + + if (ConnectionState.Closed == originalState && ConnectionState.Open == currentState) + { + OnStateChange(DbConnectionInternal.StateChangeOpen); + } + else if (ConnectionState.Open == originalState && ConnectionState.Closed == currentState) + { + OnStateChange(DbConnectionInternal.StateChangeClosed); + } + else + { + Debug.Assert(false, "unexpected state switch"); + if (originalState != currentState) + { + OnStateChange(new StateChangeEventArgs(originalState, currentState)); + } + } + } + + // Closed->Connecting: prevent set_ConnectionString during Open + // Open->OpenBusy: guarantee internal connection is returned to correct pool + // Closed->ClosedBusy: prevent Open during set_ConnectionString + internal bool SetInnerConnectionFrom(DbConnectionInternal to, DbConnectionInternal from) + { + // Set's the internal connection, verifying that it's a specific value before doing so. + Debug.Assert(null != _innerConnection, "null InnerConnection"); + Debug.Assert(null != from, "from null InnerConnection"); + Debug.Assert(null != to, "to null InnerConnection"); + + bool result = (from == Interlocked.CompareExchange(ref _innerConnection, to, from)); + return result; + } + + // ClosedBusy->Closed (never opened) + // Connecting->Closed (exception during open, return to previous closed state) + internal void SetInnerConnectionTo(DbConnectionInternal to) + { + // Set's the internal connection without verifying that it's a specific value + Debug.Assert(null != _innerConnection, "null InnerConnection"); + Debug.Assert(null != to, "to null InnerConnection"); + _innerConnection = to; + } + } +} + diff --git a/src/System.Data.OleDb/src/System/Data/ProviderBase/DbConnectionInternal.Shared.cs b/src/System.Data.OleDb/src/System/Data/ProviderBase/DbConnectionInternal.Shared.cs new file mode 100644 index 000000000000..9cccf427db9a --- /dev/null +++ b/src/System.Data.OleDb/src/System/Data/ProviderBase/DbConnectionInternal.Shared.cs @@ -0,0 +1,663 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Data.Common; +using System.Diagnostics; +using System.Threading; +using System.Threading.Tasks; +using SysTx = System.Transactions; + +namespace System.Data.ProviderBase +{ + internal abstract partial class DbConnectionInternal // V1.1.3300 + { + internal static readonly StateChangeEventArgs StateChangeClosed = new StateChangeEventArgs(ConnectionState.Open, ConnectionState.Closed); + internal static readonly StateChangeEventArgs StateChangeOpen = new StateChangeEventArgs(ConnectionState.Closed, ConnectionState.Open); + + private readonly bool _allowSetConnectionString; + private readonly bool _hidePassword; + private readonly ConnectionState _state; + + private readonly WeakReference _owningObject = new WeakReference(null, false); // [usage must be thread safe] the owning object, when not in the pool. (both Pooled and Non-Pooled connections) + + private DbConnectionPool _connectionPool; // the pooler that the connection came from (Pooled connections only) + private DbConnectionPoolCounters _performanceCounters; // the performance counters we're supposed to update + private DbReferenceCollection _referenceCollection; // collection of objects that we need to notify in some way when we're being deactivated + private int _pooledCount; // [usage must be thread safe] the number of times this object has been pushed into the pool less the number of times it's been popped (0 != inPool) + + private bool _connectionIsDoomed; // true when the connection should no longer be used. + private bool _cannotBePooled; // true when the connection should no longer be pooled. + private bool _isInStasis; + + private DateTime _createTime; // when the connection was created. + + private SysTx.Transaction _enlistedTransaction; // [usage must be thread-safe] the transaction that we're enlisted in, either manually or automatically + + // _enlistedTransaction is a clone, so that transaction information can be queried even if the original transaction object is disposed. + // However, there are times when we need to know if the original transaction object was disposed, so we keep a reference to it here. + // This field should only be assigned a value at the same time _enlistedTransaction is updated. + // Also, this reference should not be disposed, since we aren't taking ownership of it. + private SysTx.Transaction _enlistedTransactionOriginal; + +#if DEBUG + private int _activateCount; // debug only counter to verify activate/deactivates are in sync. +#endif //DEBUG + + protected DbConnectionInternal() : this(ConnectionState.Open, true, false) + { // V1.1.3300 + } + + // Constructor for internal connections + internal DbConnectionInternal(ConnectionState state, bool hidePassword, bool allowSetConnectionString) + { + _allowSetConnectionString = allowSetConnectionString; + _hidePassword = hidePassword; + _state = state; + } + + internal bool AllowSetConnectionString + { + get + { + return _allowSetConnectionString; + } + } + + internal bool CanBePooled + { + get + { + bool flag = (!_connectionIsDoomed && !_cannotBePooled && !_owningObject.IsAlive); + return flag; + } + } + + protected internal SysTx.Transaction EnlistedTransaction + { + get + { + return _enlistedTransaction; + } + set + { + SysTx.Transaction currentEnlistedTransaction = _enlistedTransaction; + if (((null == currentEnlistedTransaction) && (null != value)) + || ((null != currentEnlistedTransaction) && !currentEnlistedTransaction.Equals(value))) + { + // Pay attention to the order here: + // 1) defect from any notifications + // 2) replace the transaction + // 3) re-enlist in notifications for the new transaction + + // we need to use a clone of the transaction + // when we store it, or we'll end up keeping it past the + // duration of the using block of the TransactionScope + SysTx.Transaction valueClone = null; + SysTx.Transaction previousTransactionClone = null; + try + { + if (null != value) + { + valueClone = value.Clone(); + } + + // NOTE: rather than take locks around several potential round- + // trips to the server, and/or virtual function calls, we simply + // presume that you aren't doing something illegal from multiple + // threads, and check once we get around to finalizing things + // inside a lock. + + lock (this) + { + // NOTE: There is still a race condition here, when we are + // called from EnlistTransaction (which cannot re-enlist) + // instead of EnlistDistributedTransaction (which can), + // however this should have been handled by the outer + // connection which checks to ensure that it's OK. The + // only case where we have the race condition is multiple + // concurrent enlist requests to the same connection, which + // is a bit out of line with something we should have to + // support. + + // enlisted transaction can be nullified in Dispose call without lock + previousTransactionClone = Interlocked.Exchange(ref _enlistedTransaction, valueClone); + _enlistedTransactionOriginal = value; + value = valueClone; + valueClone = null; // we've stored it, don't dispose it. + } + } + finally + { + // we really need to dispose our clones; they may have + // native resources and GC may not happen soon enough. + // don't dispose if still holding reference in _enlistedTransaction + if (null != previousTransactionClone && + !Object.ReferenceEquals(previousTransactionClone, _enlistedTransaction)) + { + previousTransactionClone.Dispose(); + } + if (null != valueClone && !Object.ReferenceEquals(valueClone, _enlistedTransaction)) + { + valueClone.Dispose(); + } + } + + // I don't believe that we need to lock to protect the actual + // enlistment in the transaction; it would only protect us + // against multiple concurrent calls to enlist, which really + // isn't supported anyway. + } + } + } + + // Is this connection in stasis, waiting for transaction to end before returning to pool? + internal bool IsTxRootWaitingForTxEnd + { + get + { + return _isInStasis; + } + } + + /// + /// Get boolean that specifies whether an enlisted transaction can be unbound from + /// the connection when that transaction completes. + /// + /// + /// True if the enlisted transaction can be unbound on transaction completion; otherwise false. + /// + virtual protected bool UnbindOnTransactionCompletion + { + get + { + return true; + } + } + + // Is this a connection that must be put in stasis (or is already in stasis) pending the end of it's transaction? + virtual protected internal bool IsNonPoolableTransactionRoot + { + get + { + return false; // if you want to have delegated transactions that are non-poolable, you better override this... + } + } + + virtual internal bool IsTransactionRoot + { + get + { + return false; // if you want to have delegated transactions, you better override this... + } + } + + protected internal bool IsConnectionDoomed + { + get + { + return _connectionIsDoomed; + } + } + + internal bool IsEmancipated + { + get + { + // NOTE: There are race conditions between PrePush, PostPop and this + // property getter -- only use this while this object is locked; + // (DbConnectionPool.Clear and ReclaimEmancipatedObjects + // do this for us) + + // Remember how this works (I keep getting confused...) + // + // _pooledCount is incremented when the connection is pushed into the pool + // _pooledCount is decremented when the connection is popped from the pool + // _pooledCount is set to -1 when the connection is not pooled (just in case...) + // + // That means that: + // + // _pooledCount > 1 connection is in the pool multiple times (this is a serious bug...) + // _pooledCount == 1 connection is in the pool + // _pooledCount == 0 connection is out of the pool + // _pooledCount == -1 connection is not a pooled connection; we shouldn't be here for non-pooled connections. + // _pooledCount < -1 connection out of the pool multiple times (not sure how this could happen...) + // + // Now, our job is to return TRUE when the connection is out + // of the pool and it's owning object is no longer around to + // return it. + + bool value = !IsTxRootWaitingForTxEnd && (_pooledCount < 1) && !_owningObject.IsAlive; + return value; + } + } + + protected internal object Owner + { + // We use a weak reference to the owning object so we can identify when + // it has been garbage collected without thowing exceptions. + get + { + return _owningObject.Target; + } + } + + internal DbConnectionPool Pool + { + get + { + return _connectionPool; + } + } + + protected DbConnectionPoolCounters PerformanceCounters + { + get + { + return _performanceCounters; + } + } + protected internal DbReferenceCollection ReferenceCollection + { + get + { + return _referenceCollection; + } + } + + abstract public string ServerVersion + { + get; + } + + public bool ShouldHidePassword + { + get + { + return _hidePassword; + } + } + + public ConnectionState State + { + get + { + return _state; + } + } + + abstract protected void Activate(SysTx.Transaction transaction); + + internal void AddWeakReference(object value, int tag) + { + if (null == _referenceCollection) + { + _referenceCollection = CreateReferenceCollection(); + if (null == _referenceCollection) + { + throw ADP.InternalError(ADP.InternalErrorCode.CreateReferenceCollectionReturnedNull); + } + } + _referenceCollection.Add(value, tag); + } + + abstract public DbTransaction BeginTransaction(IsolationLevel il); + + virtual internal void PrepareForReplaceConnection() + { + // By default, there is no preperation required + } + + virtual protected void PrepareForCloseConnection() + { + // By default, there is no preperation required + } + + virtual protected object ObtainAdditionalLocksForClose() + { + return null; // no additional locks in default implementation + } + + virtual protected void ReleaseAdditionalLocksForClose(object lockToken) + { + // no additional locks in default implementation + } + + virtual protected DbReferenceCollection CreateReferenceCollection() + { + throw ADP.InternalError(ADP.InternalErrorCode.AttemptingToConstructReferenceCollectionOnStaticObject); + } + + abstract protected void Deactivate(); + + internal void DeactivateConnection() + { + // Internal method called from the connection pooler so we don't expose + // the Deactivate method publicly. +#if DEBUG + int activateCount = Interlocked.Decrement(ref _activateCount); + Debug.Assert(0 == activateCount, "activated multiple times?"); +#endif // DEBUG + + if (PerformanceCounters != null) + { // Pool.Clear will DestroyObject that will clean performanceCounters before going here + PerformanceCounters.NumberOfActiveConnections.Decrement(); + } + + if (!_connectionIsDoomed && Pool.UseLoadBalancing) + { + // If we're not already doomed, check the connection's lifetime and + // doom it if it's lifetime has elapsed. + + DateTime now = DateTime.UtcNow; + if ((now.Ticks - _createTime.Ticks) > Pool.LoadBalanceTimeout.Ticks) + { + DoNotPoolThisConnection(); + } + } + Deactivate(); + } + + virtual internal void DelegatedTransactionEnded() + { + // Called by System.Transactions when the delegated transaction has + // completed. We need to make closed connections that are in stasis + // available again, or disposed closed/leaked non-pooled connections. + + // IMPORTANT NOTE: You must have taken a lock on the object before + // you call this method to prevent race conditions with Clear and + // ReclaimEmancipatedObjects. + + if (1 == _pooledCount) + { + // When _pooledCount is 1, it indicates a closed, pooled, + // connection so it is ready to put back into the pool for + // general use. + + TerminateStasis(true); + + Deactivate(); // call it one more time just in case + + DbConnectionPool pool = Pool; + + if (null == pool) + { + throw ADP.InternalError(ADP.InternalErrorCode.PooledObjectWithoutPool); // pooled connection does not have a pool + } + pool.PutObjectFromTransactedPool(this); + } + else if (-1 == _pooledCount && !_owningObject.IsAlive) + { + // When _pooledCount is -1 and the owning object no longer exists, + // it indicates a closed (or leaked), non-pooled connection so + // it is safe to dispose. + + TerminateStasis(false); + + Deactivate(); // call it one more time just in case + + // it's a non-pooled connection, we need to dispose of it + // once and for all, or the server will have fits about us + // leaving connections open until the client-side GC kicks + // in. + PerformanceCounters.NumberOfNonPooledConnections.Decrement(); + Dispose(); + } + // When _pooledCount is 0, the connection is a pooled connection + // that is either open (if the owning object is alive) or leaked (if + // the owning object is not alive) In either case, we can't muck + // with the connection here. + } + + protected internal void DoNotPoolThisConnection() + { + _cannotBePooled = true; + } + + /// Ensure that this connection cannot be put back into the pool. + protected internal void DoomThisConnection() + { + _connectionIsDoomed = true; + } + + abstract public void EnlistTransaction(SysTx.Transaction transaction); + + virtual protected internal DataTable GetSchema(DbConnectionFactory factory, DbConnectionPoolGroup poolGroup, DbConnection outerConnection, string collectionName, string[] restrictions) + { + Debug.Assert(outerConnection != null, "outerConnection may not be null."); + + DbMetaDataFactory metaDataFactory = factory.GetMetaDataFactory(poolGroup, this); + Debug.Assert(metaDataFactory != null, "metaDataFactory may not be null."); + + return metaDataFactory.GetSchema(outerConnection, collectionName, restrictions); + } + + internal void MakeNonPooledObject(object owningObject, DbConnectionPoolCounters performanceCounters) + { + // Used by DbConnectionFactory to indicate that this object IS NOT part of + // a connection pool. + + _connectionPool = null; + _performanceCounters = performanceCounters; + _owningObject.Target = owningObject; + _pooledCount = -1; + } + + internal void MakePooledConnection(DbConnectionPool connectionPool) + { + // Used by DbConnectionFactory to indicate that this object IS part of + // a connection pool. + + // TODO: consider using ADP.TimerCurrent() for this. + _createTime = DateTime.UtcNow; + + _connectionPool = connectionPool; + _performanceCounters = connectionPool.PerformanceCounters; + } + + internal void NotifyWeakReference(int message) + { + DbReferenceCollection referenceCollection = ReferenceCollection; + if (null != referenceCollection) + { + referenceCollection.Notify(message); + } + } + + internal virtual void OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) + { + if (!TryOpenConnection(outerConnection, connectionFactory, null, null)) + { + throw ADP.InternalError(ADP.InternalErrorCode.SynchronousConnectReturnedPending); + } + } + + /// The default implementation is for the open connection objects, and + /// it simply throws. Our private closed-state connection objects + /// override this and do the correct thing. + // User code should either override DbConnectionInternal.Activate when it comes out of the pool + // or override DbConnectionFactory.CreateConnection when the connection is created for non-pooled connections + internal virtual bool TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource retry, DbConnectionOptions userOptions) + { + throw ADP.ConnectionAlreadyOpen(State); + } + + protected bool TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource retry, DbConnectionOptions userOptions) + { + // ?->Connecting: prevent set_ConnectionString during Open + if (connectionFactory.SetInnerConnectionFrom(outerConnection, DbConnectionClosedConnecting.SingletonInstance, this)) + { + DbConnectionInternal openConnection = null; + try + { + connectionFactory.PermissionDemand(outerConnection); + if (!connectionFactory.TryGetConnection(outerConnection, retry, userOptions, this, out openConnection)) + { + return false; + } + } + catch + { + // This should occure for all exceptions, even ADP.UnCatchableExceptions. + connectionFactory.SetInnerConnectionTo(outerConnection, this); + throw; + } + if (null == openConnection) + { + connectionFactory.SetInnerConnectionTo(outerConnection, this); + throw ADP.InternalConnectionError(ADP.ConnectionError.GetConnectionReturnsNull); + } + connectionFactory.SetInnerConnectionEvent(outerConnection, openConnection); + } + + return true; + } + + internal void PrePush(object expectedOwner) + { + // Called by DbConnectionPool when we're about to be put into it's pool, we + // take this opportunity to ensure ownership and pool counts are legit. + + // IMPORTANT NOTE: You must have taken a lock on the object before + // you call this method to prevent race conditions with Clear and + // ReclaimEmancipatedObjects. + + //3 // The following tests are retail assertions of things we can't allow to happen. + if (null == expectedOwner) + { + if (null != _owningObject.Target) + { + throw ADP.InternalError(ADP.InternalErrorCode.UnpooledObjectHasOwner); // new unpooled object has an owner + } + } + else if (_owningObject.Target != expectedOwner) + { + throw ADP.InternalError(ADP.InternalErrorCode.UnpooledObjectHasWrongOwner); // unpooled object has incorrect owner + } + if (0 != _pooledCount) + { + throw ADP.InternalError(ADP.InternalErrorCode.PushingObjectSecondTime); // pushing object onto stack a second time + } + _pooledCount++; + _owningObject.Target = null; // NOTE: doing this and checking for InternalError.PooledObjectHasOwner degrades the close by 2% + } + + internal void PostPop(object newOwner) + { + // Called by DbConnectionPool right after it pulls this from it's pool, we + // take this opportunity to ensure ownership and pool counts are legit. + + Debug.Assert(!IsEmancipated, "pooled object not in pool"); + + // When another thread is clearing this pool, it + // will doom all connections in this pool without prejudice which + // causes the following assert to fire, which really mucks up stress + // against checked bits. The assert is benign, so we're commenting + // it out. + //Debug.Assert(CanBePooled, "pooled object is not poolable"); + + // IMPORTANT NOTE: You must have taken a lock on the object before + // you call this method to prevent race conditions with Clear and + // ReclaimEmancipatedObjects. + + if (null != _owningObject.Target) + { + throw ADP.InternalError(ADP.InternalErrorCode.PooledObjectHasOwner); // pooled connection already has an owner! + } + _owningObject.Target = newOwner; + _pooledCount--; + //3 // The following tests are retail assertions of things we can't allow to happen. + if (null != Pool) + { + if (0 != _pooledCount) + { + throw ADP.InternalError(ADP.InternalErrorCode.PooledObjectInPoolMoreThanOnce); // popping object off stack with multiple pooledCount + } + } + else if (-1 != _pooledCount) + { + throw ADP.InternalError(ADP.InternalErrorCode.NonPooledObjectUsedMoreThanOnce); // popping object off stack with multiple pooledCount + } + } + + internal void RemoveWeakReference(object value) + { + DbReferenceCollection referenceCollection = ReferenceCollection; + if (null != referenceCollection) + { + referenceCollection.Remove(value); + } + } + + internal void DetachCurrentTransactionIfEnded() + { + SysTx.Transaction enlistedTransaction = EnlistedTransaction; + if (enlistedTransaction != null) + { + bool transactionIsDead; + try + { + transactionIsDead = (SysTx.TransactionStatus.Active != enlistedTransaction.TransactionInformation.Status); + } + catch (SysTx.TransactionException) + { + // If the transaction is being processed (i.e. is part way through a rollback\commit\etc then TransactionInformation.Status will throw an exception) + transactionIsDead = true; + } + if (transactionIsDead) + { + DetachTransaction(enlistedTransaction, true); + } + } + } + + // Detach transaction from connection. + internal void DetachTransaction(SysTx.Transaction transaction, bool isExplicitlyReleasing) + { + // potentially a multi-threaded event, so lock the connection to make sure we don't enlist in a new + // transaction between compare and assignment. No need to short circuit outside of lock, since failed comparisons should + // be the exception, not the rule. + lock (this) + { + // Detach if detach-on-end behavior, or if outer connection was closed + DbConnection owner = (DbConnection)Owner; + if (isExplicitlyReleasing || UnbindOnTransactionCompletion || null == owner) + { + SysTx.Transaction currentEnlistedTransaction = _enlistedTransaction; + if (currentEnlistedTransaction != null && transaction.Equals(currentEnlistedTransaction)) + { + EnlistedTransaction = null; + + if (IsTxRootWaitingForTxEnd) + { + DelegatedTransactionEnded(); + } + } + } + } + } + + internal void SetInStasis() + { + _isInStasis = true; + PerformanceCounters.NumberOfStasisConnections.Increment(); + } + + private void TerminateStasis(bool returningToPool) + { + PerformanceCounters.NumberOfStasisConnections.Decrement(); + _isInStasis = false; + } + + /// + /// When overridden in a derived class, will check if the underlying connection is still actually alive + /// + /// If true an exception will be thrown if the connection is dead instead of returning true\false + /// (this allows the caller to have the real reason that the connection is not alive (e.g. network error, etc)) + /// True if the connection is still alive, otherwise false (If not overridden, then always true) + internal virtual bool IsConnectionAlive(bool throwOnException = false) + { + return true; + } + } +} diff --git a/src/System.Data.OleDb/src/System/Data/ProviderBase/DbConnectionInternal.cs b/src/System.Data.OleDb/src/System/Data/ProviderBase/DbConnectionInternal.cs new file mode 100644 index 000000000000..f291646fccdd --- /dev/null +++ b/src/System.Data.OleDb/src/System/Data/ProviderBase/DbConnectionInternal.cs @@ -0,0 +1,154 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Data.Common; +using System.Diagnostics; +using System.Threading; +using System.Threading.Tasks; +using SysTx = System.Transactions; + +namespace System.Data.ProviderBase +{ + internal abstract partial class DbConnectionInternal + { + internal void ActivateConnection(SysTx.Transaction transaction) + { + // Internal method called from the connection pooler so we don't expose + // the Activate method publicly. +#if DEBUG + int activateCount = Interlocked.Increment(ref _activateCount); + Debug.Assert(1 == activateCount, "activated multiple times?"); +#endif // DEBUG + + Activate(transaction); + + PerformanceCounters.NumberOfActiveConnections.Increment(); + } + + internal virtual void CloseConnection(DbConnection owningObject, DbConnectionFactory connectionFactory) + { + // The implementation here is the implementation required for the + // "open" internal connections, since our own private "closed" + // singleton internal connection objects override this method to + // prevent anything funny from happening (like disposing themselves + // or putting them into a connection pool) + // + // Derived class should override DbConnectionInternal.Deactivate and DbConnectionInternal.Dispose + // for cleaning up after DbConnection.Close + // protected override void Deactivate() { // override DbConnectionInternal.Close + // // do derived class connection deactivation for both pooled & non-pooled connections + // } + // public override void Dispose() { // override DbConnectionInternal.Close + // // do derived class cleanup + // base.Dispose(); + // } + // + // overriding DbConnection.Close is also possible, but must provider for their own synchronization + // public override void Close() { // override DbConnection.Close + // base.Close(); + // // do derived class outer connection for both pooled & non-pooled connections + // // user must do their own synchronization here + // } + // + // if the DbConnectionInternal derived class needs to close the connection it should + // delegate to the DbConnection if one exists or directly call dispose + // DbConnection owningObject = (DbConnection)Owner; + // if (null != owningObject) { + // owningObject.Close(); // force the closed state on the outer object. + // } + // else { + // Dispose(); + // } + // + //////////////////////////////////////////////////////////////// + // DON'T MESS WITH THIS CODE UNLESS YOU KNOW WHAT YOU'RE DOING! + //////////////////////////////////////////////////////////////// + Debug.Assert(null != owningObject, "null owningObject"); + Debug.Assert(null != connectionFactory, "null connectionFactory"); + + // if an exception occurs after the state change but before the try block + // the connection will be stuck in OpenBusy state. The commented out try-catch + // block doesn't really help because a ThreadAbort during the finally block + // would just revert the connection to a bad state. + // Open->Closed: guarantee internal connection is returned to correct pool + if (connectionFactory.SetInnerConnectionFrom(owningObject, DbConnectionOpenBusy.SingletonInstance, this)) + { + // Lock to prevent race condition with cancellation + lock (this) + { + object lockToken = ObtainAdditionalLocksForClose(); + try + { + PrepareForCloseConnection(); + + DbConnectionPool connectionPool = Pool; + + // Detach from enlisted transactions that are no longer active on close + DetachCurrentTransactionIfEnded(); + + // The singleton closed classes won't have owners and + // connection pools, and we won't want to put them back + // into the pool. + if (null != connectionPool) + { + connectionPool.PutObject(this, owningObject); // PutObject calls Deactivate for us... + // NOTE: Before we leave the PutObject call, another + // thread may have already popped the connection from + // the pool, so don't expect to be able to verify it. + } + else + { + Deactivate(); // ensure we de-activate non-pooled connections, or the data readers and transactions may not get cleaned up... + + PerformanceCounters.HardDisconnectsPerSecond.Increment(); + + // To prevent an endless recursion, we need to clear + // the owning object before we call dispose so that + // we can't get here a second time... Ordinarily, I + // would call setting the owner to null a hack, but + // this is safe since we're about to dispose the + // object and it won't have an owner after that for + // certain. + _owningObject.Target = null; + + if (IsTransactionRoot) + { + SetInStasis(); + } + else + { + PerformanceCounters.NumberOfNonPooledConnections.Decrement(); + Dispose(); + } + } + } + finally + { + ReleaseAdditionalLocksForClose(lockToken); + // if a ThreadAbort puts us here then its possible the outer connection will not reference + // this and this will be orphaned, not reclaimed by object pool until outer connection goes out of scope. + connectionFactory.SetInnerConnectionEvent(owningObject, DbConnectionClosedPreviouslyOpened.SingletonInstance); + } + } + } + } + + public virtual void Dispose() + { + _connectionPool = null; + _performanceCounters = null; + _connectionIsDoomed = true; + _enlistedTransactionOriginal = null; // should not be disposed + + // Dispose of the _enlistedTransaction since it is a clone + // of the original reference. + // _enlistedTransaction can be changed by another thread (TX end event) + SysTx.Transaction enlistedTransaction = Interlocked.Exchange(ref _enlistedTransaction, null); + if (enlistedTransaction != null) + { + enlistedTransaction.Dispose(); + } + } + } +} diff --git a/src/System.Data.OleDb/src/System/Data/ProviderBase/DbConnectionPool.cs b/src/System.Data.OleDb/src/System/Data/ProviderBase/DbConnectionPool.cs new file mode 100644 index 000000000000..9f7048fff5e9 --- /dev/null +++ b/src/System.Data.OleDb/src/System/Data/ProviderBase/DbConnectionPool.cs @@ -0,0 +1,1724 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Collections.Concurrent; +using System.Collections.Generic; +using System.Data.Common; +using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Runtime.Versioning; +using System.Threading; +using System.Threading.Tasks; + +namespace System.Data.ProviderBase +{ + using SysTx = Transactions; + + sealed internal class DbConnectionPool + { + private enum State + { + Initializing, + Running, + ShuttingDown, + } + + // This class is a way to stash our cloned Tx key for later disposal when it's no longer needed. + // We can't get at the key in the dictionary without enumerating entries, so we stash an extra + // copy as part of the value. + sealed private class TransactedConnectionList : List + { + private SysTx.Transaction _transaction; + internal TransactedConnectionList(int initialAllocation, SysTx.Transaction tx) : base(initialAllocation) + { + _transaction = tx; + } + + internal void Dispose() + { + if (null != _transaction) + { + _transaction.Dispose(); + } + } + } + + sealed class PendingGetConnection + { + public PendingGetConnection(long dueTime, DbConnection owner, TaskCompletionSource completion, DbConnectionOptions userOptions) + { + DueTime = dueTime; + Owner = owner; + Completion = completion; + } + public long DueTime { get; private set; } + public DbConnection Owner { get; private set; } + public TaskCompletionSource Completion { get; private set; } + public DbConnectionOptions UserOptions { get; private set; } + } + + sealed private class TransactedConnectionPool + { + Dictionary _transactedCxns; + + DbConnectionPool _pool; + + internal TransactedConnectionPool(DbConnectionPool pool) + { + Debug.Assert(null != pool, "null pool?"); + + _pool = pool; + _transactedCxns = new Dictionary(); + } + + internal DbConnectionPool Pool + { + get + { + return _pool; + } + } + + internal DbConnectionInternal GetTransactedObject(SysTx.Transaction transaction) + { + Debug.Assert(null != transaction, "null transaction?"); + + DbConnectionInternal transactedObject = null; + + TransactedConnectionList connections; + bool txnFound = false; + + lock (_transactedCxns) + { + txnFound = _transactedCxns.TryGetValue(transaction, out connections); + } + + // NOTE: GetTransactedObject is only used when AutoEnlist = True and the ambient transaction + // (Sys.Txns.Txn.Current) is still valid/non-null. This, in turn, means that we don't need + // to worry about a pending asynchronous TransactionCompletedEvent to trigger processing in + // TransactionEnded below and potentially wipe out the connections list underneath us. It + // is similarly alright if a pending addition to the connections list in PutTransactedObject + // below is not completed prior to the lock on the connections object here...getting a new + // connection is probably better than unnecessarily locking + if (txnFound) + { + Debug.Assert(connections != null); + + // synchronize multi-threaded access with PutTransactedObject (TransactionEnded should + // not be a concern, see comments above) + lock (connections) + { + int i = connections.Count - 1; + if (0 <= i) + { + transactedObject = connections[i]; + connections.RemoveAt(i); + } + } + } + return transactedObject; + } + + internal void PutTransactedObject(SysTx.Transaction transaction, DbConnectionInternal transactedObject) + { + Debug.Assert(null != transaction, "null transaction?"); + Debug.Assert(null != transactedObject, "null transactedObject?"); + + TransactedConnectionList connections; + bool txnFound = false; + + // NOTE: because TransactionEnded is an asynchronous notification, there's no guarantee + // around the order in which PutTransactionObject and TransactionEnded are called. + + lock (_transactedCxns) + { + // Check if a transacted pool has been created for this transaction + if (txnFound = _transactedCxns.TryGetValue(transaction, out connections)) + { + Debug.Assert(connections != null); + + // synchronize multi-threaded access with GetTransactedObject + lock (connections) + { + Debug.Assert(0 > connections.IndexOf(transactedObject), "adding to pool a second time?"); + + connections.Add(transactedObject); + } + } + } + + // CONSIDER: the following code is more complicated than it needs to be to avoid cloning the + // transaction and allocating memory within a lock. Is that complexity really necessary? + if (!txnFound) + { + // create the transacted pool, making sure to clone the associated transaction + // for use as a key in our internal dictionary of transactions and connections + SysTx.Transaction transactionClone = null; + TransactedConnectionList newConnections = null; + + try + { + transactionClone = transaction.Clone(); + newConnections = new TransactedConnectionList(2, transactionClone); // start with only two connections in the list; most times we won't need that many. + + lock (_transactedCxns) + { + // NOTE: in the interim between the locks on the transacted pool (this) during + // execution of this method, another thread (threadB) may have attempted to + // add a different connection to the transacted pool under the same + // transaction. As a result, threadB may have completed creating the + // transacted pool while threadA was processing the above instructions. + if (txnFound = _transactedCxns.TryGetValue(transaction, out connections)) + { + Debug.Assert(connections != null); + + // synchronize multi-threaded access with GetTransactedObject + lock (connections) + { + Debug.Assert(0 > connections.IndexOf(transactedObject), "adding to pool a second time?"); + + connections.Add(transactedObject); + } + } + else + { + // add the connection/transacted object to the list + newConnections.Add(transactedObject); + + _transactedCxns.Add(transactionClone, newConnections); + transactionClone = null; // we've used it -- don't throw it or the TransactedConnectionList that references it away. + } + } + } + finally + { + if (null != transactionClone) + { + if (newConnections != null) + { + // another thread created the transaction pool and thus the new + // TransactedConnectionList was not used, so dispose of it and + // the transaction clone that it incorporates. + newConnections.Dispose(); + } + else + { + // memory allocation for newConnections failed...clean up unused transactionClone + transactionClone.Dispose(); + } + } + } + } + + Pool.PerformanceCounters.NumberOfFreeConnections.Increment(); + + } + } + + private sealed class PoolWaitHandles : DbBuffer + { + private readonly Semaphore _poolSemaphore; + private readonly ManualResetEvent _errorEvent; + + // Using a Mutex requires ThreadAffinity because SQL CLR can swap + // the underlying Win32 thread associated with a managed thread in preemptive mode. + // Using an AutoResetEvent does not have that complication. + private readonly Semaphore _creationSemaphore; + + private readonly SafeHandle _poolHandle; + private readonly SafeHandle _errorHandle; + private readonly SafeHandle _creationHandle; + + private readonly int _releaseFlags; + + internal PoolWaitHandles() : base(3 * IntPtr.Size) + { + bool mustRelease1 = false, mustRelease2 = false, mustRelease3 = false; + + _poolSemaphore = new Semaphore(0, MAX_Q_SIZE); + _errorEvent = new ManualResetEvent(false); + _creationSemaphore = new Semaphore(1, 1); + + RuntimeHelpers.PrepareConstrainedRegions(); + try + { + // because SafeWaitHandle doesn't have reliability contract + _poolHandle = _poolSemaphore.SafeWaitHandle; + _errorHandle = _errorEvent.SafeWaitHandle; + _creationHandle = _creationSemaphore.SafeWaitHandle; + + _poolHandle.DangerousAddRef(ref mustRelease1); + _errorHandle.DangerousAddRef(ref mustRelease2); + _creationHandle.DangerousAddRef(ref mustRelease3); + + Debug.Assert(0 == SEMAPHORE_HANDLE, "SEMAPHORE_HANDLE"); + Debug.Assert(1 == ERROR_HANDLE, "ERROR_HANDLE"); + Debug.Assert(2 == CREATION_HANDLE, "CREATION_HANDLE"); + + WriteIntPtr(SEMAPHORE_HANDLE * IntPtr.Size, _poolHandle.DangerousGetHandle()); + WriteIntPtr(ERROR_HANDLE * IntPtr.Size, _errorHandle.DangerousGetHandle()); + WriteIntPtr(CREATION_HANDLE * IntPtr.Size, _creationHandle.DangerousGetHandle()); + } + finally + { + if (mustRelease1) + { + _releaseFlags |= 1; + } + if (mustRelease2) + { + _releaseFlags |= 2; + } + if (mustRelease3) + { + _releaseFlags |= 4; + } + } + } + + internal SafeHandle CreationHandle + { + get { return _creationHandle; } + } + + internal Semaphore CreationSemaphore + { + get { return _creationSemaphore; } + } + + internal ManualResetEvent ErrorEvent + { + get { return _errorEvent; } + } + + internal Semaphore PoolSemaphore + { + get { return _poolSemaphore; } + } + + protected override bool ReleaseHandle() + { + // NOTE: The SafeHandle class guarantees this will be called exactly once. + // we know we can touch these other managed objects because of our original DangerousAddRef + if (0 != (1 & _releaseFlags)) + { + _poolHandle.DangerousRelease(); + } + if (0 != (2 & _releaseFlags)) + { + _errorHandle.DangerousRelease(); + } + if (0 != (4 & _releaseFlags)) + { + _creationHandle.DangerousRelease(); + } + return base.ReleaseHandle(); + } + } + + private const int MAX_Q_SIZE = (int)0x00100000; + + // The order of these is important; we want the WaitAny call to be signaled + // for a free object before a creation signal. Only the index first signaled + // object is returned from the WaitAny call. + private const int SEMAPHORE_HANDLE = (int)0x0; + private const int ERROR_HANDLE = (int)0x1; + private const int CREATION_HANDLE = (int)0x2; + private const int BOGUS_HANDLE = (int)0x3; + + private const int WAIT_OBJECT_0 = 0; + private const int WAIT_TIMEOUT = (int)0x102; + private const int WAIT_ABANDONED = (int)0x80; + private const int WAIT_FAILED = -1; + + private const int ERROR_WAIT_DEFAULT = 5 * 1000; // 5 seconds + + // we do want a testable, repeatable set of generated random numbers + private static readonly Random _random = new Random(5101977); // Value obtained from Dave Driver + + private readonly int _cleanupWait; + private readonly DbConnectionPoolIdentity _identity; + + private readonly DbConnectionFactory _connectionFactory; + private readonly DbConnectionPoolGroup _connectionPoolGroup; + private readonly DbConnectionPoolGroupOptions _connectionPoolGroupOptions; + private State _state; + + private readonly ConcurrentStack _stackOld = new ConcurrentStack(); + private readonly ConcurrentStack _stackNew = new ConcurrentStack(); + + private readonly ConcurrentQueue _pendingOpens = new ConcurrentQueue(); + private int _pendingOpensWaiting = 0; + + private readonly WaitCallback _poolCreateRequest; + + private int _waitCount; + private readonly PoolWaitHandles _waitHandles; + + private Exception _resError; + private volatile bool _errorOccurred; + + private int _errorWait; + private Timer _errorTimer; + + private Timer _cleanupTimer; + + private readonly TransactedConnectionPool _transactedConnectionPool; + + private readonly List _objectList; + private int _totalObjects; + + // only created by DbConnectionPoolGroup.GetConnectionPool + internal DbConnectionPool( + DbConnectionFactory connectionFactory, + DbConnectionPoolGroup connectionPoolGroup, + DbConnectionPoolIdentity identity) + { + Debug.Assert(ADP.IsWindowsNT, "Attempting to construct a connection pool on Win9x?"); + Debug.Assert(null != connectionPoolGroup, "null connectionPoolGroup"); + + if ((null != identity) && identity.IsRestricted) + { + throw ADP.InternalError(ADP.InternalErrorCode.AttemptingToPoolOnRestrictedToken); + } + + _state = State.Initializing; + + lock (_random) + { // Random.Next is not thread-safe + _cleanupWait = _random.Next(12, 24) * 10 * 1000; // 2-4 minutes in 10 sec intervals + } + + _connectionFactory = connectionFactory; + _connectionPoolGroup = connectionPoolGroup; + _connectionPoolGroupOptions = connectionPoolGroup.PoolGroupOptions; + _identity = identity; + + _waitHandles = new PoolWaitHandles(); + + _errorWait = ERROR_WAIT_DEFAULT; + _errorTimer = null; // No error yet. + + _objectList = new List(MaxPoolSize); + + if (ADP.IsPlatformNT5) + { + _transactedConnectionPool = new TransactedConnectionPool(this); + } + + _poolCreateRequest = new WaitCallback(PoolCreateRequest); // used by CleanupCallback + _state = State.Running; + + //_cleanupTimer & QueuePoolCreateRequest is delayed until DbConnectionPoolGroup calls + // StartBackgroundCallbacks after pool is actually in the collection + } + + private int CreationTimeout + { + get { return PoolGroupOptions.CreationTimeout; } + } + + internal int Count + { + get { return _totalObjects; } + } + + internal DbConnectionFactory ConnectionFactory + { + get { return _connectionFactory; } + } + + internal bool ErrorOccurred + { + get { return _errorOccurred; } + } + + private bool HasTransactionAffinity + { + get { return PoolGroupOptions.HasTransactionAffinity; } + } + + internal TimeSpan LoadBalanceTimeout + { + get { return PoolGroupOptions.LoadBalanceTimeout; } + } + + private bool NeedToReplenish + { + get + { + if (State.Running != _state) // don't allow connection create when not running. + return false; + + int totalObjects = Count; + + if (totalObjects >= MaxPoolSize) + return false; + + if (totalObjects < MinPoolSize) + return true; + + int freeObjects = (_stackNew.Count + _stackOld.Count); + int waitingRequests = _waitCount; + bool needToReplenish = (freeObjects < waitingRequests) || ((freeObjects == waitingRequests) && (totalObjects > 1)); + + return needToReplenish; + } + } + + internal bool IsRunning + { + get { return State.Running == _state; } + } + + private int MaxPoolSize + { + get { return PoolGroupOptions.MaxPoolSize; } + } + + private int MinPoolSize + { + get { return PoolGroupOptions.MinPoolSize; } + } + + internal DbConnectionPoolCounters PerformanceCounters + { + get { return _connectionFactory.PerformanceCounters; } + } + + internal DbConnectionPoolGroup PoolGroup + { + get { return _connectionPoolGroup; } + } + + internal DbConnectionPoolGroupOptions PoolGroupOptions + { + get { return _connectionPoolGroupOptions; } + } + + internal bool UseLoadBalancing + { + get { return PoolGroupOptions.UseLoadBalancing; } + } + + private bool UsingIntegrateSecurity + { + get { return (null != _identity && DbConnectionPoolIdentity.NoIdentity != _identity); } + } + + private void CleanupCallback(Object state) + { + // Called when the cleanup-timer ticks over. + + // This is the automatic prunning method. Every period, we will + // perform a two-step process: + // + // First, for each free object above MinPoolSize, we will obtain a + // semaphore representing one object and destroy one from old stack. + // We will continue this until we either reach MinPoolSize, we are + // unable to obtain a free object, or we have exhausted all the + // objects on the old stack. + // + // Second we move all free objects on the new stack to the old stack. + // So, every period the objects on the old stack are destroyed and + // the objects on the new stack are pushed to the old stack. All + // objects that are currently out and in use are not on either stack. + // + // With this logic, objects are pruned from the pool if unused for + // at least one period but not more than two periods. + + // Destroy free objects that put us above MinPoolSize from old stack. + while (Count > MinPoolSize) + { // While above MinPoolSize... + + if (_waitHandles.PoolSemaphore.WaitOne(0, false) /* != WAIT_TIMEOUT */) + { + // We obtained a objects from the semaphore. + DbConnectionInternal obj; + + if (_stackOld.TryPop(out obj)) + { + Debug.Assert(obj != null, "null connection is not expected"); + // If we obtained one from the old stack, destroy it. + PerformanceCounters.NumberOfFreeConnections.Decrement(); + + // Transaction roots must survive even aging out (TxEnd event will clean them up). + bool shouldDestroy = true; + lock (obj) + { // Lock to prevent race condition window between IsTransactionRoot and shouldDestroy assignment + if (obj.IsTransactionRoot) + { + shouldDestroy = false; + } + } + + // !!!!!!!!!! WARNING !!!!!!!!!!!!! + // ONLY touch obj after lock release if shouldDestroy is false!!! Otherwise, it may be destroyed + // by transaction-end thread! + + // Note that there is a minor race condition between this task and the transaction end event, if the latter runs + // between the lock above and the SetInStasis call below. The reslult is that the stasis counter may be + // incremented without a corresponding decrement (the transaction end task is normally expected + // to decrement, but will only do so if the stasis flag is set when it runs). I've minimized the size + // of the window, but we aren't totally eliminating it due to SetInStasis needing to do bid tracing, which + // we don't want to do under this lock, if possible. It should be possible to eliminate this race condition with + // more substantial re-architecture of the pool, but we don't have the time to do that work for the current release. + + if (shouldDestroy) + { + DestroyObject(obj); + } + else + { + obj.SetInStasis(); + } + } + else + { + // Else we exhausted the old stack (the object the + // semaphore represents is on the new stack), so break. + _waitHandles.PoolSemaphore.Release(1); + break; + } + } + else + { + break; + } + } + + // Push to the old-stack. For each free object, move object from + // new stack to old stack. + if (_waitHandles.PoolSemaphore.WaitOne(0, false) /* != WAIT_TIMEOUT */) + { + for (; ; ) + { + DbConnectionInternal obj; + + if (!_stackNew.TryPop(out obj)) + break; + + Debug.Assert(obj != null, "null connection is not expected"); + + Debug.Assert(!obj.IsEmancipated, "pooled object not in pool"); + Debug.Assert(obj.CanBePooled, "pooled object is not poolable"); + + _stackOld.Push(obj); + } + _waitHandles.PoolSemaphore.Release(1); + } + + // Queue up a request to bring us up to MinPoolSize + QueuePoolCreateRequest(); + } + + internal void Clear() + { + DbConnectionInternal obj; + + // First, quickly doom everything. + lock (_objectList) + { + int count = _objectList.Count; + + for (int i = 0; i < count; ++i) + { + obj = _objectList[i]; + + if (null != obj) + { + obj.DoNotPoolThisConnection(); + } + } + } + + // Second, dispose of all the free connections. + while (_stackNew.TryPop(out obj)) + { + Debug.Assert(obj != null, "null connection is not expected"); + PerformanceCounters.NumberOfFreeConnections.Decrement(); + DestroyObject(obj); + } + while (_stackOld.TryPop(out obj)) + { + Debug.Assert(obj != null, "null connection is not expected"); + PerformanceCounters.NumberOfFreeConnections.Decrement(); + DestroyObject(obj); + } + + // Finally, reclaim everything that's emancipated (which, because + // it's been doomed, will cause it to be disposed of as well) + ReclaimEmancipatedObjects(); + } + + private Timer CreateCleanupTimer() + { + return (new Timer(new TimerCallback(this.CleanupCallback), null, _cleanupWait, _cleanupWait)); + } + + private bool IsBlockingPeriodEnabled() => true; + + private DbConnectionInternal CreateObject(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection) + { + DbConnectionInternal newObj = null; + + try + { + newObj = _connectionFactory.CreatePooledConnection(this, owningObject, _connectionPoolGroup.ConnectionOptions, _connectionPoolGroup.PoolKey, userOptions); + if (null == newObj) + { + throw ADP.InternalError(ADP.InternalErrorCode.CreateObjectReturnedNull); // CreateObject succeeded, but null object + } + if (!newObj.CanBePooled) + { + throw ADP.InternalError(ADP.InternalErrorCode.NewObjectCannotBePooled); // CreateObject succeeded, but non-poolable object + } + newObj.PrePush(null); + + lock (_objectList) + { + if ((oldConnection != null) && (oldConnection.Pool == this)) + { + _objectList.Remove(oldConnection); + } + _objectList.Add(newObj); + _totalObjects = _objectList.Count; + PerformanceCounters.NumberOfPooledConnections.Increment(); // TODO: Performance: Consider moving outside of lock? + } + + // If the old connection belonged to another pool, we need to remove it from that + if (oldConnection != null) + { + var oldConnectionPool = oldConnection.Pool; + if (oldConnectionPool != null && oldConnectionPool != this) + { + Debug.Assert(oldConnectionPool._state == State.ShuttingDown, "Old connections pool should be shutting down"); + lock (oldConnectionPool._objectList) + { + oldConnectionPool._objectList.Remove(oldConnection); + oldConnectionPool._totalObjects = oldConnectionPool._objectList.Count; + } + } + } + + // Reset the error wait: + _errorWait = ERROR_WAIT_DEFAULT; + } + catch (Exception e) + { + // UNDONE - should not be catching all exceptions!!! + if (!ADP.IsCatchableExceptionType(e)) + { + throw; + } + + ADP.TraceExceptionForCapture(e); + + if (!IsBlockingPeriodEnabled()) + { + throw; + } + + newObj = null; // set to null, so we do not return bad new object + // Failed to create instance + _resError = e; + + // Make sure the timer starts even if ThreadAbort occurs after setting the ErrorEvent. + + // timer allocation has to be done out of CER block + Timer t = new Timer(new TimerCallback(this.ErrorCallback), null, Timeout.Infinite, Timeout.Infinite); + bool timerIsNotDisposed; + RuntimeHelpers.PrepareConstrainedRegions(); + try + { } + finally + { + _waitHandles.ErrorEvent.Set(); + _errorOccurred = true; + + // Enable the timer. + // Note that the timer is created to allow periodic invocation. If ThreadAbort occurs in the middle of ErrorCallback, + // the timer will restart. Otherwise, the timer callback (ErrorCallback) destroys the timer after resetting the error to avoid second callback. + _errorTimer = t; + timerIsNotDisposed = t.Change(_errorWait, _errorWait); + } + + Debug.Assert(timerIsNotDisposed, "ErrorCallback timer has been disposed"); + + if (30000 < _errorWait) + { + _errorWait = 60000; + } + else + { + _errorWait *= 2; + } + throw; + } + return newObj; + } + + private void DeactivateObject(DbConnectionInternal obj) + { + obj.DeactivateConnection(); // we presume this operation is safe outside of a lock... + + bool returnToGeneralPool = false; + bool destroyObject = false; + bool rootTxn = false; + + if (obj.IsConnectionDoomed) + { + // the object is not fit for reuse -- just dispose of it. + destroyObject = true; + } + else + { + // NOTE: constructor should ensure that current state cannot be State.Initializing, so it can only + // be State.Running or State.ShuttingDown + Debug.Assert(_state == State.Running || _state == State.ShuttingDown); + + lock (obj) + { + // A connection with a delegated transaction cannot currently + // be returned to a different customer until the transaction + // actually completes, so we send it into Stasis -- the SysTx + // transaction object will ensure that it is owned (not lost), + // and it will be certain to put it back into the pool. + + if (_state == State.ShuttingDown) + { + if (obj.IsTransactionRoot) + { + // connections that are affiliated with a + // root transaction and that also happen to be in a connection + // pool that is being shutdown need to be put in stasis so that + // the root transaction isn't effectively orphaned with no + // means to promote itself to a full delegated transaction or + // Commit or Rollback + obj.SetInStasis(); + rootTxn = true; + } + else + { + // connection is being closed and the pool has been marked as shutting + // down, so destroy this object. + destroyObject = true; + } + } + else + { + if (obj.IsNonPoolableTransactionRoot) + { + obj.SetInStasis(); + rootTxn = true; + } + else if (obj.CanBePooled) + { + // We must put this connection into the transacted pool + // while inside a lock to prevent a race condition with + // the transaction asyncronously completing on a second + // thread. + + SysTx.Transaction transaction = obj.EnlistedTransaction; + if (null != transaction) + { + // NOTE: we're not locking on _state, so it's possible that its + // value could change between the conditional check and here. + // Although perhaps not ideal, this is OK because the + // DelegatedTransactionEnded event will clean up the + // connection appropriately regardless of the pool state. + Debug.Assert(_transactedConnectionPool != null, "Transacted connection pool was not expected to be null."); + _transactedConnectionPool.PutTransactedObject(transaction, obj); + rootTxn = true; + } + else + { + // return to general pool + returnToGeneralPool = true; + } + } + else + { + if (obj.IsTransactionRoot && !obj.IsConnectionDoomed) + { + // if the object cannot be pooled but is a transaction + // root, then we must have hit one of two race conditions: + // 1) PruneConnectionPoolGroups shutdown the pool and marked this connection + // as non-poolable while we were processing within this lock + // 2) The LoadBalancingTimeout expired on this connection and marked this + // connection as DoNotPool. + // + // This connection needs to be put in stasis so that the root transaction isn't + // effectively orphaned with no means to promote itself to a full delegated + // transaction or Commit or Rollback + obj.SetInStasis(); + rootTxn = true; + } + else + { + // object is not fit for reuse -- just dispose of it + destroyObject = true; + } + } + } + } + } + + if (returnToGeneralPool) + { + // Only push the connection into the general pool if we didn't + // already push it onto the transacted pool, put it into stasis, + // or want to destroy it. + Debug.Assert(destroyObject == false); + PutNewObject(obj); + } + else if (destroyObject) + { + // connections that have been marked as no longer + // poolable (e.g. exceeded their connection lifetime) are not, in fact, + // returned to the general pool + DestroyObject(obj); + QueuePoolCreateRequest(); + } + + //------------------------------------------------------------------------------------- + // postcondition + + // ensure that the connection was processed + Debug.Assert(rootTxn == true || returnToGeneralPool == true || destroyObject == true); + + // TODO: BID trace processing state? + } + + internal void DestroyObject(DbConnectionInternal obj) + { + // A connection with a delegated transaction cannot be disposed of + // until the delegated transaction has actually completed. Instead, + // we simply leave it alone; when the transaction completes, it will + // come back through PutObjectFromTransactedPool, which will call us + // again. + if (obj.IsTxRootWaitingForTxEnd) + { + } + else + { + bool removed = false; + lock (_objectList) + { + removed = _objectList.Remove(obj); + Debug.Assert(removed, "attempt to DestroyObject not in list"); + _totalObjects = _objectList.Count; + } + + if (removed) + { + PerformanceCounters.NumberOfPooledConnections.Decrement(); + } + obj.Dispose(); + PerformanceCounters.HardDisconnectsPerSecond.Increment(); + } + } + + private void ErrorCallback(Object state) + { + _errorOccurred = false; + _waitHandles.ErrorEvent.Reset(); + + // the error state is cleaned, destroy the timer to avoid periodic invocation + Timer t = _errorTimer; + _errorTimer = null; + if (t != null) + { + t.Dispose(); // Cancel timer request. + } + } + + // TODO: move this to src/Common and integrate with SqlClient + // Note: OleDb connections are not passing through this code + private Exception TryCloneCachedException() + { + return _resError; + } + + void WaitForPendingOpen() + { + Debug.Assert(!Thread.CurrentThread.IsThreadPoolThread, "This thread may block for a long time. Threadpool threads should not be used."); + + PendingGetConnection next; + + do + { + bool started = false; + + RuntimeHelpers.PrepareConstrainedRegions(); + try + { + RuntimeHelpers.PrepareConstrainedRegions(); + try + { } + finally + { + started = Interlocked.CompareExchange(ref _pendingOpensWaiting, 1, 0) == 0; + } + + if (!started) + { + return; + } + + while (_pendingOpens.TryDequeue(out next)) + { + if (next.Completion.Task.IsCompleted) + { + continue; + } + + uint delay; + if (next.DueTime == Timeout.Infinite) + { + delay = unchecked((uint)Timeout.Infinite); + } + else + { + delay = (uint)Math.Max(ADP.TimerRemainingMilliseconds(next.DueTime), 0); + } + + DbConnectionInternal connection = null; + bool timeout = false; + Exception caughtException = null; + + RuntimeHelpers.PrepareConstrainedRegions(); + try + { + bool allowCreate = true; + bool onlyOneCheckConnection = false; + ADP.SetCurrentTransaction(next.Completion.Task.AsyncState as Transactions.Transaction); + timeout = !TryGetConnection(next.Owner, delay, allowCreate, onlyOneCheckConnection, next.UserOptions, out connection); + } + catch (System.OutOfMemoryException) + { + if (connection != null) + { connection.DoomThisConnection(); } + throw; + } + catch (System.StackOverflowException) + { + if (connection != null) + { connection.DoomThisConnection(); } + throw; + } + catch (System.Threading.ThreadAbortException) + { + if (connection != null) + { connection.DoomThisConnection(); } + throw; + } + catch (Exception e) + { + caughtException = e; + } + + if (caughtException != null) + { + next.Completion.TrySetException(caughtException); + } + else if (timeout) + { + next.Completion.TrySetException(ADP.ExceptionWithStackTrace(ADP.PooledOpenTimeout())); + } + else + { + Debug.Assert(connection != null, "connection should never be null in success case"); + if (!next.Completion.TrySetResult(connection)) + { + // if the completion was cancelled, lets try and get this connection back for the next try + PutObject(connection, next.Owner); + } + } + } + } + finally + { + if (started) + { + Interlocked.Exchange(ref _pendingOpensWaiting, 0); + } + } + + } while (_pendingOpens.TryPeek(out next)); + } + + internal bool TryGetConnection(DbConnection owningObject, TaskCompletionSource retry, DbConnectionOptions userOptions, out DbConnectionInternal connection) + { + uint waitForMultipleObjectsTimeout = 0; + bool allowCreate = false; + + if (retry == null) + { + waitForMultipleObjectsTimeout = (uint)CreationTimeout; + + // set the wait timeout to INFINITE (-1) if the SQL connection timeout is 0 (== infinite) + if (waitForMultipleObjectsTimeout == 0) + waitForMultipleObjectsTimeout = unchecked((uint)Timeout.Infinite); + + allowCreate = true; + } + + if (_state != State.Running) + { + connection = null; + return true; + } + + bool onlyOneCheckConnection = true; + if (TryGetConnection(owningObject, waitForMultipleObjectsTimeout, allowCreate, onlyOneCheckConnection, userOptions, out connection)) + { + return true; + } + else if (retry == null) + { + // timed out on a sync call + return true; + } + + var pendingGetConnection = + new PendingGetConnection( + CreationTimeout == 0 ? Timeout.Infinite : ADP.TimerCurrent() + ADP.TimerFromSeconds(CreationTimeout / 1000), + owningObject, + retry, + userOptions); + _pendingOpens.Enqueue(pendingGetConnection); + + // it is better to StartNew too many times than not enough + if (_pendingOpensWaiting == 0) + { + Thread waitOpenThread = new Thread(WaitForPendingOpen); + waitOpenThread.IsBackground = true; + waitOpenThread.Start(); + } + + connection = null; + return false; + } + + [SuppressMessage("Microsoft.Reliability", "CA2001:AvoidCallingProblematicMethods")] // copied from Triaged.cs + private bool TryGetConnection(DbConnection owningObject, uint waitForMultipleObjectsTimeout, bool allowCreate, bool onlyOneCheckConnection, DbConnectionOptions userOptions, out DbConnectionInternal connection) + { + DbConnectionInternal obj = null; + SysTx.Transaction transaction = null; + + PerformanceCounters.SoftConnectsPerSecond.Increment(); + + // If automatic transaction enlistment is required, then we try to + // get the connection from the transacted connection pool first. + if (HasTransactionAffinity) + { + obj = GetFromTransactedPool(out transaction); + } + + if (null == obj) + { + Interlocked.Increment(ref _waitCount); + uint waitHandleCount = allowCreate ? 3u : 2u; + + do + { + int waitResult = BOGUS_HANDLE; + int releaseSemaphoreResult = 0; + + bool mustRelease = false; + int waitForMultipleObjectsExHR = 0; + RuntimeHelpers.PrepareConstrainedRegions(); + try + { + _waitHandles.DangerousAddRef(ref mustRelease); + + // We absolutely must have the value of waitResult set, + // or we may leak the mutex in async abort cases. + RuntimeHelpers.PrepareConstrainedRegions(); + try + { + Debug.Assert(2 == waitHandleCount || 3 == waitHandleCount, "unexpected waithandle count"); + } + finally + { + waitResult = SafeNativeMethods.WaitForMultipleObjectsEx(waitHandleCount, _waitHandles.DangerousGetHandle(), false, waitForMultipleObjectsTimeout, false); + + // call GetHRForLastWin32Error immediately after after the native call + if (waitResult == WAIT_FAILED) + { + waitForMultipleObjectsExHR = Marshal.GetHRForLastWin32Error(); + } + } + + // From the WaitAny docs: "If more than one object became signaled during + // the call, this is the array index of the signaled object with the + // smallest index value of all the signaled objects." This is important + // so that the free object signal will be returned before a creation + // signal. + + switch (waitResult) + { + case WAIT_TIMEOUT: + Interlocked.Decrement(ref _waitCount); + connection = null; + return false; + + case ERROR_HANDLE: + // Throw the error that PoolCreateRequest stashed. + Interlocked.Decrement(ref _waitCount); + throw TryCloneCachedException(); + + case CREATION_HANDLE: + + try + { + obj = UserCreateRequest(owningObject, userOptions); + } + catch + { + if (null == obj) + { + Interlocked.Decrement(ref _waitCount); + } + throw; + } + finally + { + // ensure that we release this waiter, regardless + // of any exceptions that may be thrown. + if (null != obj) + { + Interlocked.Decrement(ref _waitCount); + } + } + + if (null == obj) + { + // If we were not able to create an object, check to see if + // we reached MaxPoolSize. If so, we will no longer wait on + // the CreationHandle, but instead wait for a free object or + // the timeout. + + // BUG - if we receive the CreationHandle midway into the wait + // period and re-wait, we will be waiting on the full period + if (Count >= MaxPoolSize && 0 != MaxPoolSize) + { + if (!ReclaimEmancipatedObjects()) + { + // modify handle array not to wait on creation mutex anymore + Debug.Assert(2 == CREATION_HANDLE, "creation handle changed value"); + waitHandleCount = 2; + } + } + } + break; + + case SEMAPHORE_HANDLE: + // + // guaranteed available inventory + // + Interlocked.Decrement(ref _waitCount); + obj = GetFromGeneralPool(); + + if ((obj != null) && (!obj.IsConnectionAlive())) + { + DestroyObject(obj); + obj = null; // Setting to null in case creating a new object fails + + if (onlyOneCheckConnection) + { + if (_waitHandles.CreationSemaphore.WaitOne(unchecked((int)waitForMultipleObjectsTimeout))) + { + RuntimeHelpers.PrepareConstrainedRegions(); + try + { + obj = UserCreateRequest(owningObject, userOptions); + } + finally + { + _waitHandles.CreationSemaphore.Release(1); + } + } + else + { + // Timeout waiting for creation semaphore - return null + connection = null; + return false; + } + } + } + break; + + case WAIT_FAILED: + Debug.Assert(waitForMultipleObjectsExHR != 0, "WaitForMultipleObjectsEx failed but waitForMultipleObjectsExHR remained 0"); + Interlocked.Decrement(ref _waitCount); + Marshal.ThrowExceptionForHR(waitForMultipleObjectsExHR); + goto default; // if ThrowExceptionForHR didn't throw for some reason + case (WAIT_ABANDONED + SEMAPHORE_HANDLE): + Interlocked.Decrement(ref _waitCount); + throw new AbandonedMutexException(SEMAPHORE_HANDLE, _waitHandles.PoolSemaphore); + case (WAIT_ABANDONED + ERROR_HANDLE): + Interlocked.Decrement(ref _waitCount); + throw new AbandonedMutexException(ERROR_HANDLE, _waitHandles.ErrorEvent); + case (WAIT_ABANDONED + CREATION_HANDLE): + Interlocked.Decrement(ref _waitCount); + throw new AbandonedMutexException(CREATION_HANDLE, _waitHandles.CreationSemaphore); + default: + Interlocked.Decrement(ref _waitCount); + throw ADP.InternalError(ADP.InternalErrorCode.UnexpectedWaitAnyResult); + } + } + finally + { + if (CREATION_HANDLE == waitResult) + { + int result = SafeNativeMethods.ReleaseSemaphore(_waitHandles.CreationHandle.DangerousGetHandle(), 1, IntPtr.Zero); + if (0 == result) + { // failure case + releaseSemaphoreResult = Marshal.GetHRForLastWin32Error(); + } + } + if (mustRelease) + { + _waitHandles.DangerousRelease(); + } + } + if (0 != releaseSemaphoreResult) + { + Marshal.ThrowExceptionForHR(releaseSemaphoreResult); // will only throw if (hresult < 0) + } + } while (null == obj); + } + + if (null != obj) + { + PrepareConnection(owningObject, obj, transaction); + } + + connection = obj; + return true; + } + + private void PrepareConnection(DbConnection owningObject, DbConnectionInternal obj, SysTx.Transaction transaction) + { + lock (obj) + { // Protect against Clear and ReclaimEmancipatedObjects, which call IsEmancipated, which is affected by PrePush and PostPop + obj.PostPop(owningObject); + } + try + { + obj.ActivateConnection(transaction); + } + catch + { + // if Activate throws an exception + // put it back in the pool or have it properly disposed of + this.PutObject(obj, owningObject); + throw; + } + } + + /// + /// Creates a new connection to replace an existing connection + /// + /// Outer connection that currently owns + /// Options used to create the new connection + /// Inner connection that will be replaced + /// A new inner connection that is attached to the + internal DbConnectionInternal ReplaceConnection(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection) + { + PerformanceCounters.SoftConnectsPerSecond.Increment(); + + DbConnectionInternal newConnection = UserCreateRequest(owningObject, userOptions, oldConnection); + + if (newConnection != null) + { + PrepareConnection(owningObject, newConnection, oldConnection.EnlistedTransaction); + oldConnection.PrepareForReplaceConnection(); + oldConnection.DeactivateConnection(); + oldConnection.Dispose(); + } + + return newConnection; + } + + private DbConnectionInternal GetFromGeneralPool() + { + DbConnectionInternal obj = null; + + if (!_stackNew.TryPop(out obj)) + { + if (!_stackOld.TryPop(out obj)) + { + obj = null; + } + else + { + Debug.Assert(obj != null, "null connection is not expected"); + } + } + else + { + Debug.Assert(obj != null, "null connection is not expected"); + } + + // When another thread is clearing this pool, + // it will remove all connections in this pool which causes the + // following assert to fire, which really mucks up stress against + // checked bits. The assert is benign, so we're commenting it out. + //Debug.Assert(obj != null, "GetFromGeneralPool called with nothing in the pool!"); + + if (null != obj) + { + PerformanceCounters.NumberOfFreeConnections.Decrement(); + } + return (obj); + } + + private DbConnectionInternal GetFromTransactedPool(out SysTx.Transaction transaction) + { + transaction = ADP.GetCurrentTransaction(); + DbConnectionInternal obj = null; + + if (null != transaction && null != _transactedConnectionPool) + { + obj = _transactedConnectionPool.GetTransactedObject(transaction); + + if (null != obj) + { + PerformanceCounters.NumberOfFreeConnections.Decrement(); + + if (obj.IsTransactionRoot) + { + try + { + obj.IsConnectionAlive(true); + } + catch + { + DestroyObject(obj); + throw; + } + } + else if (!obj.IsConnectionAlive()) + { + DestroyObject(obj); + obj = null; + } + } + } + return obj; + } + + private void PoolCreateRequest(object state) + { + // called by pooler to ensure pool requests are currently being satisfied - + // creation mutex has not been obtained + + if (State.Running == _state) + { + // in case WaitForPendingOpen ever failed with no subsequent OpenAsync calls, + // start it back up again + if (!_pendingOpens.IsEmpty && _pendingOpensWaiting == 0) + { + Thread waitOpenThread = new Thread(WaitForPendingOpen); + waitOpenThread.IsBackground = true; + waitOpenThread.Start(); + } + + // Before creating any new objects, reclaim any released objects that were + // not closed. + ReclaimEmancipatedObjects(); + + if (!ErrorOccurred) + { + if (NeedToReplenish) + { + // Check to see if pool was created using integrated security and if so, make + // sure the identity of current user matches that of user that created pool. + // If it doesn't match, do not create any objects on the ThreadPool thread, + // since either Open will fail or we will open a object for this pool that does + // not belong in this pool. The side effect of this is that if using integrated + // security min pool size cannot be guaranteed. + if (UsingIntegrateSecurity && !_identity.Equals(DbConnectionPoolIdentity.GetCurrent())) + { + return; + } + bool mustRelease = false; + int waitResult = BOGUS_HANDLE; + uint timeout = (uint)CreationTimeout; + + RuntimeHelpers.PrepareConstrainedRegions(); + try + { + _waitHandles.DangerousAddRef(ref mustRelease); + + // Obtain creation mutex so we're the only one creating objects + // and we must have the wait result + RuntimeHelpers.PrepareConstrainedRegions(); + try + { } + finally + { + waitResult = SafeNativeMethods.WaitForSingleObjectEx(_waitHandles.CreationHandle.DangerousGetHandle(), timeout, false); + } + if (WAIT_OBJECT_0 == waitResult) + { + DbConnectionInternal newObj; + + // Check ErrorOccurred again after obtaining mutex + if (!ErrorOccurred) + { + while (NeedToReplenish) + { + // Don't specify any user options because there is no outer connection associated with the new connection + newObj = CreateObject(owningObject: null, userOptions: null, oldConnection: null); + + // We do not need to check error flag here, since we know if + // CreateObject returned null, we are in error case. + if (null != newObj) + { + PutNewObject(newObj); + } + else + { + break; + } + } + } + } + else if (WAIT_TIMEOUT == waitResult) + { + // do not wait forever and potential block this worker thread + // instead wait for a period of time and just requeue to try again + QueuePoolCreateRequest(); + } + else + { + // trace waitResult and ignore the failure + } + } + catch (Exception e) + { + // UNDONE - should not be catching all exceptions!!! + if (!ADP.IsCatchableExceptionType(e)) + { + throw; + } + + // Now that CreateObject can throw, we need to catch the exception and discard it. + // There is no further action we can take beyond tracing. The error will be + // thrown to the user the next time they request a connection. + } + finally + { + if (WAIT_OBJECT_0 == waitResult) + { + // reuse waitResult and ignore its value + waitResult = SafeNativeMethods.ReleaseSemaphore(_waitHandles.CreationHandle.DangerousGetHandle(), 1, IntPtr.Zero); + } + if (mustRelease) + { + _waitHandles.DangerousRelease(); + } + } + } + } + } + } + + internal void PutNewObject(DbConnectionInternal obj) + { + Debug.Assert(null != obj, "why are we adding a null object to the pool?"); + + // When another thread is clearing this pool, it + // will set _cannotBePooled for all connections in this pool without prejudice which + // causes the following assert to fire, which really mucks up stress + // against checked bits. + // Debug.Assert(obj.CanBePooled, "non-poolable object in pool"); + + _stackNew.Push(obj); + _waitHandles.PoolSemaphore.Release(1); + PerformanceCounters.NumberOfFreeConnections.Increment(); + + } + + internal void PutObject(DbConnectionInternal obj, object owningObject) + { + Debug.Assert(null != obj, "null obj?"); + + PerformanceCounters.SoftDisconnectsPerSecond.Increment(); + + // Once a connection is closing (which is the state that we're in at + // this point in time) you cannot delegate a transaction to or enlist + // a transaction in it, so we can correctly presume that if there was + // not a delegated or enlisted transaction to start with, that there + // will not be a delegated or enlisted transaction once we leave the + // lock. + + lock (obj) + { + // Calling PrePush prevents the object from being reclaimed + // once we leave the lock, because it sets _pooledCount such + // that it won't appear to be out of the pool. What that + // means, is that we're now responsible for this connection: + // it won't get reclaimed if we drop the ball somewhere. + obj.PrePush(owningObject); + + // TODO: Consider using a Cer to ensure that we mark the object for reclaimation in the event something bad happens? + } + + DeactivateObject(obj); + } + + internal void PutObjectFromTransactedPool(DbConnectionInternal obj) + { + Debug.Assert(null != obj, "null pooledObject?"); + Debug.Assert(obj.EnlistedTransaction == null, "pooledObject is still enlisted?"); + + // called by the transacted connection pool , once it's removed the + // connection from it's list. We put the connection back in general + // circulation. + + // NOTE: there is no locking required here because if we're in this + // method, we can safely presume that the caller is the only person + // that is using the connection, and that all pre-push logic has been + // done and all transactions are ended. + + if (_state == State.Running && obj.CanBePooled) + { + PutNewObject(obj); + } + else + { + DestroyObject(obj); + QueuePoolCreateRequest(); + } + } + + private void QueuePoolCreateRequest() + { + if (State.Running == _state) + { + // Make sure we're at quota by posting a callback to the threadpool. + ThreadPool.QueueUserWorkItem(_poolCreateRequest); + } + } + + private bool ReclaimEmancipatedObjects() + { + bool emancipatedObjectFound = false; + + List reclaimedObjects = new List(); + int count; + + lock (_objectList) + { + count = _objectList.Count; + + for (int i = 0; i < count; ++i) + { + DbConnectionInternal obj = _objectList[i]; + + if (null != obj) + { + bool locked = false; + + try + { + Monitor.TryEnter(obj, ref locked); + + if (locked) + { // avoid race condition with PrePush/PostPop and IsEmancipated + if (obj.IsEmancipated) + { + // Inside the lock, we want to do as little + // as possible, so we simply mark the object + // as being in the pool, but hand it off to + // an out of pool list to be deactivated, + // etc. + obj.PrePush(null); + reclaimedObjects.Add(obj); + } + } + } + finally + { + if (locked) + Monitor.Exit(obj); + } + } + } + } + + // NOTE: we don't want to call DeactivateObject while we're locked, + // because it can make roundtrips to the server and this will block + // object creation in the pooler. Instead, we queue things we need + // to do up, and process them outside the lock. + count = reclaimedObjects.Count; + + for (int i = 0; i < count; ++i) + { + DbConnectionInternal obj = reclaimedObjects[i]; + PerformanceCounters.NumberOfReclaimedConnections.Increment(); + + emancipatedObjectFound = true; + + obj.DetachCurrentTransactionIfEnded(); + DeactivateObject(obj); + } + return emancipatedObjectFound; + } + + internal void Startup() + { + _cleanupTimer = CreateCleanupTimer(); + if (NeedToReplenish) + { + QueuePoolCreateRequest(); + } + } + + internal void Shutdown() + { + _state = State.ShuttingDown; + + // deactivate timer callbacks + Timer t = _cleanupTimer; + _cleanupTimer = null; + if (null != t) + { + t.Dispose(); + } + } + + private DbConnectionInternal UserCreateRequest(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection = null) + { + // called by user when they were not able to obtain a free object but + // instead obtained creation mutex + + DbConnectionInternal obj = null; + if (ErrorOccurred) + { + throw TryCloneCachedException(); + } + else + { + if ((oldConnection != null) || (Count < MaxPoolSize) || (0 == MaxPoolSize)) + { + // If we have an odd number of total objects, reclaim any dead objects. + // If we did not find any objects to reclaim, create a new one. + + // TODO: Consider implement a control knob here; why do we only check for dead objects ever other time? why not every 10th time or every time? + if ((oldConnection != null) || (Count & 0x1) == 0x1 || !ReclaimEmancipatedObjects()) + obj = CreateObject(owningObject, userOptions, oldConnection); + } + return obj; + } + } + } +} diff --git a/src/System.Data.OleDb/src/System/Data/ProviderBase/DbConnectionPoolCounters.cs b/src/System.Data.OleDb/src/System/Data/ProviderBase/DbConnectionPoolCounters.cs new file mode 100644 index 000000000000..0c4aaeb3e46d --- /dev/null +++ b/src/System.Data.OleDb/src/System/Data/ProviderBase/DbConnectionPoolCounters.cs @@ -0,0 +1,342 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information + +using System; +using System.Collections; +using System.Data.Common; +using System.Diagnostics; +using System.Globalization; +using System.Reflection; +using System.Runtime.Versioning; +using System.Security; +using System.Security.Principal; + +namespace System.Data.ProviderBase +{ + internal abstract class DbConnectionPoolCounters + { + private static class CreationData + { + static internal readonly CounterCreationData HardConnectsPerSecond = new CounterCreationData( + "HardConnectsPerSecond", + "The number of actual connections per second that are being made to servers", + PerformanceCounterType.RateOfCountsPerSecond32); + + static internal readonly CounterCreationData HardDisconnectsPerSecond = new CounterCreationData( + "HardDisconnectsPerSecond", + "The number of actual disconnects per second that are being made to servers", + PerformanceCounterType.RateOfCountsPerSecond32); + + static internal readonly CounterCreationData SoftConnectsPerSecond = new CounterCreationData( + "SoftConnectsPerSecond", + "The number of connections we get from the pool per second", + PerformanceCounterType.RateOfCountsPerSecond32); + + static internal readonly CounterCreationData SoftDisconnectsPerSecond = new CounterCreationData( + "SoftDisconnectsPerSecond", + "The number of connections we return to the pool per second", + PerformanceCounterType.RateOfCountsPerSecond32); + + static internal readonly CounterCreationData NumberOfNonPooledConnections = new CounterCreationData( + "NumberOfNonPooledConnections", + "The number of connections that are not using connection pooling", + PerformanceCounterType.NumberOfItems32); + + static internal readonly CounterCreationData NumberOfPooledConnections = new CounterCreationData( + "NumberOfPooledConnections", + "The number of connections that are managed by the connection pooler", + PerformanceCounterType.NumberOfItems32); + + static internal readonly CounterCreationData NumberOfActiveConnectionPoolGroups = new CounterCreationData( + "NumberOfActiveConnectionPoolGroups", + "The number of unique connection strings", + PerformanceCounterType.NumberOfItems32); + + static internal readonly CounterCreationData NumberOfInactiveConnectionPoolGroups = new CounterCreationData( + "NumberOfInactiveConnectionPoolGroups", + "The number of unique connection strings waiting for pruning", + PerformanceCounterType.NumberOfItems32); + + static internal readonly CounterCreationData NumberOfActiveConnectionPools = new CounterCreationData( + "NumberOfActiveConnectionPools", + "The number of connection pools", + PerformanceCounterType.NumberOfItems32); + + static internal readonly CounterCreationData NumberOfInactiveConnectionPools = new CounterCreationData( + "NumberOfInactiveConnectionPools", + "The number of connection pools", + PerformanceCounterType.NumberOfItems32); + + static internal readonly CounterCreationData NumberOfActiveConnections = new CounterCreationData( + "NumberOfActiveConnections", + "The number of connections currently in-use", + PerformanceCounterType.NumberOfItems32); + + static internal readonly CounterCreationData NumberOfFreeConnections = new CounterCreationData( + "NumberOfFreeConnections", + "The number of connections currently available for use", + PerformanceCounterType.NumberOfItems32); + + static internal readonly CounterCreationData NumberOfStasisConnections = new CounterCreationData( + "NumberOfStasisConnections", + "The number of connections currently waiting to be made ready for use", + PerformanceCounterType.NumberOfItems32); + + static internal readonly CounterCreationData NumberOfReclaimedConnections = new CounterCreationData( + "NumberOfReclaimedConnections", + "The number of connections we reclaim from GC'd external connections", + PerformanceCounterType.NumberOfItems32); + }; + + sealed internal class Counter + { + private PerformanceCounter _instance; + + internal Counter(string categoryName, string instanceName, string counterName, PerformanceCounterType counterType) + { + if (ADP.IsPlatformNT5) + { + try + { + if (!ADP.IsEmpty(categoryName) && !ADP.IsEmpty(instanceName)) + { + PerformanceCounter instance = new PerformanceCounter(); + instance.CategoryName = categoryName; + instance.CounterName = counterName; + instance.InstanceName = instanceName; + instance.InstanceLifetime = PerformanceCounterInstanceLifetime.Process; + instance.ReadOnly = false; + instance.RawValue = 0; // make sure we start out at zero + _instance = instance; + } + } + catch (InvalidOperationException e) + { + ADP.TraceExceptionWithoutRethrow(e); + // TODO: generate Application EventLog entry about inability to find perf counter + } + } + } + + internal void Decrement() + { + PerformanceCounter instance = _instance; + if (null != instance) + { + instance.Decrement(); + } + } + + internal void Dispose() + { // TODO: race condition, Dispose at the same time as Increment/Decrement + PerformanceCounter instance = _instance; + _instance = null; + if (null != instance) + { + instance.RemoveInstance(); + // should we be calling instance.Close? + // if we do will it exacerbate the Dispose vs. Decrement race condition + //instance.Close(); + } + } + + internal void Increment() + { + PerformanceCounter instance = _instance; + if (null != instance) + { + instance.Increment(); + } + } + }; + + const int CounterInstanceNameMaxLength = 127; + + internal readonly Counter HardConnectsPerSecond; + internal readonly Counter HardDisconnectsPerSecond; + internal readonly Counter SoftConnectsPerSecond; + internal readonly Counter SoftDisconnectsPerSecond; + internal readonly Counter NumberOfNonPooledConnections; + internal readonly Counter NumberOfPooledConnections; + internal readonly Counter NumberOfActiveConnectionPoolGroups; + internal readonly Counter NumberOfInactiveConnectionPoolGroups; + internal readonly Counter NumberOfActiveConnectionPools; + internal readonly Counter NumberOfInactiveConnectionPools; + internal readonly Counter NumberOfActiveConnections; + internal readonly Counter NumberOfFreeConnections; + internal readonly Counter NumberOfStasisConnections; + internal readonly Counter NumberOfReclaimedConnections; + + protected DbConnectionPoolCounters() : this(null, null) + { + } + + protected DbConnectionPoolCounters(string categoryName, string categoryHelp) + { + AppDomain.CurrentDomain.DomainUnload += new EventHandler(this.UnloadEventHandler); + AppDomain.CurrentDomain.ProcessExit += new EventHandler(this.ExitEventHandler); + AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(this.ExceptionEventHandler); + + string instanceName = null; + + if (!ADP.IsEmpty(categoryName)) + { + if (ADP.IsPlatformNT5) + { + instanceName = GetInstanceName(); + } + } + + // level 0-3: hard connects/disconnects, plus basic pool/pool entry statistics + string basicCategoryName = categoryName; + HardConnectsPerSecond = new Counter(basicCategoryName, instanceName, CreationData.HardConnectsPerSecond.CounterName, CreationData.HardConnectsPerSecond.CounterType); + HardDisconnectsPerSecond = new Counter(basicCategoryName, instanceName, CreationData.HardDisconnectsPerSecond.CounterName, CreationData.HardDisconnectsPerSecond.CounterType); + NumberOfNonPooledConnections = new Counter(basicCategoryName, instanceName, CreationData.NumberOfNonPooledConnections.CounterName, CreationData.NumberOfNonPooledConnections.CounterType); + NumberOfPooledConnections = new Counter(basicCategoryName, instanceName, CreationData.NumberOfPooledConnections.CounterName, CreationData.NumberOfPooledConnections.CounterType); + NumberOfActiveConnectionPoolGroups = new Counter(basicCategoryName, instanceName, CreationData.NumberOfActiveConnectionPoolGroups.CounterName, CreationData.NumberOfActiveConnectionPoolGroups.CounterType); + NumberOfInactiveConnectionPoolGroups = new Counter(basicCategoryName, instanceName, CreationData.NumberOfInactiveConnectionPoolGroups.CounterName, CreationData.NumberOfInactiveConnectionPoolGroups.CounterType); + NumberOfActiveConnectionPools = new Counter(basicCategoryName, instanceName, CreationData.NumberOfActiveConnectionPools.CounterName, CreationData.NumberOfActiveConnectionPools.CounterType); + NumberOfInactiveConnectionPools = new Counter(basicCategoryName, instanceName, CreationData.NumberOfInactiveConnectionPools.CounterName, CreationData.NumberOfInactiveConnectionPools.CounterType); + NumberOfStasisConnections = new Counter(basicCategoryName, instanceName, CreationData.NumberOfStasisConnections.CounterName, CreationData.NumberOfStasisConnections.CounterType); + NumberOfReclaimedConnections = new Counter(basicCategoryName, instanceName, CreationData.NumberOfReclaimedConnections.CounterName, CreationData.NumberOfReclaimedConnections.CounterType); + + // level 4: expensive stuff + string verboseCategoryName = null; + if (!ADP.IsEmpty(categoryName)) + { + // don't load TraceSwitch if no categoryName so that Odbc/OleDb have a chance of not loading TraceSwitch + // which are also used by System.Diagnostics.PerformanceCounter.ctor & System.Transactions.get_Current + TraceSwitch perfCtrSwitch = new TraceSwitch("ConnectionPoolPerformanceCounterDetail", "level of detail to track with connection pool performance counters"); + if (TraceLevel.Verbose == perfCtrSwitch.Level) + { + verboseCategoryName = categoryName; + } + } + SoftConnectsPerSecond = new Counter(verboseCategoryName, instanceName, CreationData.SoftConnectsPerSecond.CounterName, CreationData.SoftConnectsPerSecond.CounterType); + SoftDisconnectsPerSecond = new Counter(verboseCategoryName, instanceName, CreationData.SoftDisconnectsPerSecond.CounterName, CreationData.SoftDisconnectsPerSecond.CounterType); + NumberOfActiveConnections = new Counter(verboseCategoryName, instanceName, CreationData.NumberOfActiveConnections.CounterName, CreationData.NumberOfActiveConnections.CounterType); + NumberOfFreeConnections = new Counter(verboseCategoryName, instanceName, CreationData.NumberOfFreeConnections.CounterName, CreationData.NumberOfFreeConnections.CounterType); + } + private string GetAssemblyName() + { + string result = null; + + // First try GetEntryAssembly name, then AppDomain.FriendlyName. + Assembly assembly = Assembly.GetEntryAssembly(); + + if (null != assembly) + { + AssemblyName name = assembly.GetName(); + if (name != null) + { + result = name.Name; + } + } + return result; + } + + // SxS: this method uses GetCurrentProcessId to construct the instance name. + // TODO: remove the Resource* attributes if you do not use GetCurrentProcessId after the fix + private string GetInstanceName() + { + string result = null; + + string instanceName = GetAssemblyName(); // instance perfcounter name + + if (ADP.IsEmpty(instanceName)) + { + AppDomain appDomain = AppDomain.CurrentDomain; + if (null != appDomain) + { + instanceName = appDomain.FriendlyName; + } + } + + // TODO: If you do not use GetCurrentProcessId after fixing VSDD 534795, please remove Resource* attributes from this method + int pid = SafeNativeMethods.GetCurrentProcessId(); + + // there are several characters which have special meaning + // to PERFMON. They recommend that we translate them as shown below, to + // prevent problems. + + result = String.Format((IFormatProvider)null, "{0}[{1}]", instanceName, pid); + result = result.Replace('(', '[').Replace(')', ']').Replace('#', '_').Replace('/', '_').Replace('\\', '_'); + + // counter instance name cannot be greater than 127 + if (result.Length > CounterInstanceNameMaxLength) + { + // Replacing the middle part with "[...]" + // For example: if path is c:\long_path\very_(Ax200)_long__path\perftest.exe and process ID is 1234 than the resulted instance name will be: + // c:\long_path\very_(AxM)[...](AxN)_long__path\perftest.exe[1234] + // while M and N are adjusted to make each part before and after the [...] = 61 (making the total = 61 + 5 + 61 = 127) + const string insertString = "[...]"; + int firstPartLength = (CounterInstanceNameMaxLength - insertString.Length) / 2; + int lastPartLength = CounterInstanceNameMaxLength - firstPartLength - insertString.Length; + result = string.Format((IFormatProvider)null, "{0}{1}{2}", + result.Substring(0, firstPartLength), + insertString, + result.Substring(result.Length - lastPartLength, lastPartLength)); + + Debug.Assert(result.Length == CounterInstanceNameMaxLength, + string.Format((IFormatProvider)null, "wrong calculation of the instance name: expected {0}, actual: {1}", CounterInstanceNameMaxLength, result.Length)); + } + + return result; + } + + public void Dispose() + { + // ExceptionEventHandler with IsTerminiating may be called before + // the Connection Close is called or the variables are initialized + SafeDispose(HardConnectsPerSecond); + SafeDispose(HardDisconnectsPerSecond); + SafeDispose(SoftConnectsPerSecond); + SafeDispose(SoftDisconnectsPerSecond); + SafeDispose(NumberOfNonPooledConnections); + SafeDispose(NumberOfPooledConnections); + SafeDispose(NumberOfActiveConnectionPoolGroups); + SafeDispose(NumberOfInactiveConnectionPoolGroups); + SafeDispose(NumberOfActiveConnectionPools); + SafeDispose(NumberOfActiveConnections); + SafeDispose(NumberOfFreeConnections); + SafeDispose(NumberOfStasisConnections); + SafeDispose(NumberOfReclaimedConnections); + } + + private void SafeDispose(Counter counter) + { + if (null != counter) + { + counter.Dispose(); + } + } + + void ExceptionEventHandler(object sender, UnhandledExceptionEventArgs e) + { + if ((null != e) && e.IsTerminating) + { + Dispose(); + } + } + + void ExitEventHandler(object sender, EventArgs e) + { + Dispose(); + } + + void UnloadEventHandler(object sender, EventArgs e) + { + Dispose(); + } + } + + sealed internal class DbConnectionPoolCountersNoCounters : DbConnectionPoolCounters + { + public static readonly DbConnectionPoolCountersNoCounters SingletonInstance = new DbConnectionPoolCountersNoCounters(); + + private DbConnectionPoolCountersNoCounters() : base() + { + } + } +} diff --git a/src/System.Data.OleDb/src/System/Data/ProviderBase/DbConnectionPoolGroup.cs b/src/System.Data.OleDb/src/System/Data/ProviderBase/DbConnectionPoolGroup.cs new file mode 100644 index 000000000000..79639752bd8d --- /dev/null +++ b/src/System.Data.OleDb/src/System/Data/ProviderBase/DbConnectionPoolGroup.cs @@ -0,0 +1,328 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Collections.Concurrent; +using System.Data.Common; +using System.Diagnostics; + +namespace System.Data.ProviderBase +{ + // set_ConnectionString calls DbConnectionFactory.GetConnectionPoolGroup + // when not found a new pool entry is created and potentially added + // DbConnectionPoolGroup starts in the Active state + + // Open calls DbConnectionFactory.GetConnectionPool + // if the existing pool entry is Disabled, GetConnectionPoolGroup is called for a new entry + // DbConnectionFactory.GetConnectionPool calls DbConnectionPoolGroup.GetConnectionPool + + // DbConnectionPoolGroup.GetConnectionPool will return pool for the current identity + // or null if identity is restricted or pooling is disabled or state is disabled at time of add + // state changes are Active->Active, Idle->Active + + // DbConnectionFactory.PruneConnectionPoolGroups calls Prune + // which will QueuePoolForRelease on all empty pools + // and once no pools remain, change state from Active->Idle->Disabled + // Once Disabled, factory can remove its reference to the pool entry + + sealed internal class DbConnectionPoolGroup + { + private readonly DbConnectionOptions _connectionOptions; + private readonly DbConnectionPoolKey _poolKey; + private readonly DbConnectionPoolGroupOptions _poolGroupOptions; + private ConcurrentDictionary _poolCollection; + + private int _state; // see PoolGroupState* below + + private DbConnectionPoolGroupProviderInfo _providerInfo; + private DbMetaDataFactory _metaDataFactory; + + // always lock this before changing _state, we don't want to move out of the 'Disabled' state + // PoolGroupStateUninitialized = 0; + private const int PoolGroupStateActive = 1; // initial state, GetPoolGroup from cache, connection Open + private const int PoolGroupStateIdle = 2; // all pools are pruned via Clear + private const int PoolGroupStateDisabled = 4; // factory pool entry prunning method + + internal DbConnectionPoolGroup(DbConnectionOptions connectionOptions, DbConnectionPoolKey key, DbConnectionPoolGroupOptions poolGroupOptions) + { + Debug.Assert(null != connectionOptions, "null connection options"); + Debug.Assert(null == poolGroupOptions || ADP.IsWindowsNT, "should not have pooling options on Win9x"); + + _connectionOptions = connectionOptions; + _poolKey = key; + _poolGroupOptions = poolGroupOptions; + + // always lock this object before changing state + // HybridDictionary does not create any sub-objects until add + // so it is safe to use for non-pooled connection as long as + // we check _poolGroupOptions first + _poolCollection = new ConcurrentDictionary(); + _state = PoolGroupStateActive; + } + + internal DbConnectionOptions ConnectionOptions + { + get + { + return _connectionOptions; + } + } + + internal DbConnectionPoolKey PoolKey + { + get + { + return _poolKey; + } + } + + internal DbConnectionPoolGroupProviderInfo ProviderInfo + { + get + { + return _providerInfo; + } + set + { + _providerInfo = value; + if (null != value) + { + _providerInfo.PoolGroup = this; + } + } + } + + internal bool IsDisabled + { + get + { + return (PoolGroupStateDisabled == _state); + } + } + + internal DbConnectionPoolGroupOptions PoolGroupOptions + { + get + { + return _poolGroupOptions; + } + } + + internal DbMetaDataFactory MetaDataFactory + { + get + { + return _metaDataFactory; + } + + set + { + _metaDataFactory = value; + } + } + + internal int Clear() + { + // must be multi-thread safe with competing calls by Clear and Prune via background thread + // will return the number of connections in the group after clearing has finished + + // First, note the old collection and create a new collection to be used + ConcurrentDictionary oldPoolCollection = null; + lock (this) + { + if (_poolCollection.Count > 0) + { + oldPoolCollection = _poolCollection; + _poolCollection = new ConcurrentDictionary(); + } + } + + // Then, if a new collection was created, release the pools from the old collection + if (oldPoolCollection != null) + { + foreach (var entry in oldPoolCollection) + { + DbConnectionPool pool = entry.Value; + if (pool != null) + { + // Pruning a pool while a connection is currently attempting to connect + // will cause the pool to be prematurely abandoned. The only known effect so + // far is that the errorWait throttling will be reset when this occurs. + // We should be able to avoid this situation by not pruning the pool if + // it's _waitCount is non-zero (i.e. no connections *in* the pool, but also + // no connections attempting to be created for the pool). + + DbConnectionFactory connectionFactory = pool.ConnectionFactory; + connectionFactory.PerformanceCounters.NumberOfActiveConnectionPools.Decrement(); + connectionFactory.QueuePoolForRelease(pool, true); + } + } + } + + // Finally, return the pool collection count - this may be non-zero if something was added while we were clearing + return _poolCollection.Count; + } + + internal DbConnectionPool GetConnectionPool(DbConnectionFactory connectionFactory) + { + // When this method returns null it indicates that the connection + // factory should not use pooling. + + // We don't support connection pooling on Win9x; it lacks too + // many of the APIs we require. + // PoolGroupOptions will only be null when we're not supposed to pool + // connections. + DbConnectionPool pool = null; + if (null != _poolGroupOptions) + { + Debug.Assert(ADP.IsWindowsNT, "should not be pooling on Win9x"); + + DbConnectionPoolIdentity currentIdentity = DbConnectionPoolIdentity.NoIdentity; + if (_poolGroupOptions.PoolByIdentity) + { + // if we're pooling by identity (because integrated security is + // being used for these connections) then we need to go out and + // search for the connectionPool that matches the current identity. + + currentIdentity = DbConnectionPoolIdentity.GetCurrent(); + + // If the current token is restricted in some way, then we must + // not attempt to pool these connections. + if (currentIdentity.IsRestricted) + { + currentIdentity = null; + } + } + + if (null != currentIdentity) + { + if (!_poolCollection.TryGetValue(currentIdentity, out pool)) + { // find the pool + lock (this) + { + // Did someone already add it to the list? + if (!_poolCollection.TryGetValue(currentIdentity, out pool)) + { + DbConnectionPool newPool = new DbConnectionPool(connectionFactory, this, currentIdentity); + + if (MarkPoolGroupAsActive()) + { + // If we get here, we know for certain that we there isn't + // a pool that matches the current identity, so we have to + // add the optimistically created one + newPool.Startup(); // must start pool before usage + bool addResult = _poolCollection.TryAdd(currentIdentity, newPool); + Debug.Assert(addResult, "No other pool with current identity should exist at this point"); + connectionFactory.PerformanceCounters.NumberOfActiveConnectionPools.Increment(); + pool = newPool; + } + else + { + // else pool entry has been disabled so don't create new pools + Debug.Assert(PoolGroupStateDisabled == _state, "state should be disabled"); + + // don't need to call connectionFactory.QueuePoolForRelease(newPool) because + // pool callbacks were delayed and no risk of connections being created + newPool.Shutdown(); + } + } + else + { + // else found an existing pool to use instead + Debug.Assert(PoolGroupStateActive == _state, "state should be active since a pool exists and lock holds"); + } + } + } + // the found pool could be in any state + } + } + + if (null == pool) + { + lock (this) + { + // keep the pool entry state active when not pooling + MarkPoolGroupAsActive(); + } + } + return pool; + } + + private bool MarkPoolGroupAsActive() + { + // when getting a connection, make the entry active if it was idle (but not disabled) + // must always lock this before calling + + if (PoolGroupStateIdle == _state) + { + _state = PoolGroupStateActive; + } + return (PoolGroupStateActive == _state); + } + + internal bool Prune() + { + // must only call from DbConnectionFactory.PruneConnectionPoolGroups on background timer thread + // must lock(DbConnectionFactory._connectionPoolGroups.SyncRoot) before calling ReadyToRemove + // to avoid conflict with DbConnectionFactory.CreateConnectionPoolGroup replacing pool entry + lock (this) + { + if (_poolCollection.Count > 0) + { + var newPoolCollection = new ConcurrentDictionary(); + + foreach (var entry in _poolCollection) + { + DbConnectionPool pool = entry.Value; + if (pool != null) + { + // Pruning a pool while a connection is currently attempting to connect + // will cause the pool to be prematurely abandoned. The only known effect so + // far is that the errorWait throttling will be reset when this occurs. + // We should be able to avoid this situation by not pruning the pool if + // it's _waitCount is non-zero (i.e. no connections *in* the pool, but also + // no connections attempting to be created for the pool). + + // Actually prune the pool if there are no connections in the pool and no errors occurred. + // Empty pool during pruning indicates zero or low activity, but + // an error state indicates the pool needs to stay around to + // throttle new connection attempts. + if ((!pool.ErrorOccurred) && (0 == pool.Count)) + { + // Order is important here. First we remove the pool + // from the collection of pools so no one will try + // to use it while we're processing and finally we put the + // pool into a list of pools to be released when they + // are completely empty. + DbConnectionFactory connectionFactory = pool.ConnectionFactory; + + connectionFactory.PerformanceCounters.NumberOfActiveConnectionPools.Decrement(); + connectionFactory.QueuePoolForRelease(pool, false); + } + else + { + newPoolCollection.TryAdd(entry.Key, entry.Value); + } + } + } + _poolCollection = newPoolCollection; + } + + // must be pruning thread to change state and no connections + // otherwise pruning thread risks making entry disabled soon after user calls ClearPool + if (0 == _poolCollection.Count) + { + if (PoolGroupStateActive == _state) + { + _state = PoolGroupStateIdle; + } + else if (PoolGroupStateIdle == _state) + { + _state = PoolGroupStateDisabled; + } + } + return (PoolGroupStateDisabled == _state); + } + } + } +} diff --git a/src/System.Data.OleDb/src/System/Data/ProviderBase/DbConnectionPoolGroupProviderInfo.cs b/src/System.Data.OleDb/src/System/Data/ProviderBase/DbConnectionPoolGroupProviderInfo.cs new file mode 100644 index 000000000000..a8b6b1352aa9 --- /dev/null +++ b/src/System.Data.OleDb/src/System/Data/ProviderBase/DbConnectionPoolGroupProviderInfo.cs @@ -0,0 +1,23 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +namespace System.Data.ProviderBase +{ + internal class DbConnectionPoolGroupProviderInfo + { + private DbConnectionPoolGroup _poolGroup; + + internal DbConnectionPoolGroup PoolGroup + { + get + { + return _poolGroup; + } + set + { + _poolGroup = value; + } + } + } +} diff --git a/src/System.Data.OleDb/src/System/Data/ProviderBase/DbConnectionPoolIdentity.cs b/src/System.Data.OleDb/src/System/Data/ProviderBase/DbConnectionPoolIdentity.cs new file mode 100644 index 000000000000..38ccd6d632d1 --- /dev/null +++ b/src/System.Data.OleDb/src/System/Data/ProviderBase/DbConnectionPoolIdentity.cs @@ -0,0 +1,100 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information + +using System; +using System.Collections; +using System.Data.Common; +using System.Diagnostics; +using System.Globalization; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Security; +using System.Security.Principal; +using System.Threading; +using System.Runtime.Versioning; + +namespace System.Data.ProviderBase +{ + sealed internal class DbConnectionPoolIdentity + { + private const int E_NotImpersonationToken = unchecked((int)0x8007051D); + private const int Win32_CheckTokenMembership = 1; + private const int Win32_GetTokenInformation_1 = 2; + private const int Win32_GetTokenInformation_2 = 3; + private const int Win32_ConvertSidToStringSidW = 4; + private const int Win32_CreateWellKnownSid = 5; + + static public readonly DbConnectionPoolIdentity NoIdentity = new DbConnectionPoolIdentity(String.Empty, false, true); + static private readonly byte[] NetworkSid = (ADP.IsWindowsNT ? CreateWellKnownSid(WellKnownSidType.NetworkSid) : null); + + private readonly string _sidString; + private readonly bool _isRestricted; + private readonly bool _isNetwork; + private readonly int _hashCode; + + private DbConnectionPoolIdentity(string sidString, bool isRestricted, bool isNetwork) + { + _sidString = sidString; + _isRestricted = isRestricted; + _isNetwork = isNetwork; + _hashCode = sidString == null ? 0 : sidString.GetHashCode(); + } + + internal bool IsRestricted + { + get { return _isRestricted; } + } + + static private byte[] CreateWellKnownSid(WellKnownSidType sidType) + { + // Passing an array as big as it can ever be is a small price to pay for + // not having to P/Invoke twice (once to get the buffer, once to get the data) + + uint length = (uint)SecurityIdentifier.MaxBinaryLength; + byte[] resultSid = new byte[length]; + + // NOTE - We copied this code from System.Security.Principal.Win32.CreateWellKnownSid... + + if (0 == UnsafeNativeMethods.CreateWellKnownSid((int)sidType, null, resultSid, ref length)) + { + IntegratedSecurityError(Win32_CreateWellKnownSid); + } + return resultSid; + } + + public override bool Equals(object value) + { + bool result = ((this == NoIdentity) || (this == value)); + if (!result && (null != value)) + { + DbConnectionPoolIdentity that = ((DbConnectionPoolIdentity)value); + result = ((_sidString == that._sidString) && (_isRestricted == that._isRestricted) && (_isNetwork == that._isNetwork)); + } + return result; + } + + internal static DbConnectionPoolIdentity GetCurrent() + { + throw new PlatformNotSupportedException(); + } + + public override int GetHashCode() + { + return _hashCode; + } + + static private void IntegratedSecurityError(int caller) + { + // passing 1,2,3,4,5 instead of true/false so that with a debugger + // we could determine more easily which Win32 method call failed + int lastError = Marshal.GetHRForLastWin32Error(); + if ((Win32_CheckTokenMembership != caller) || (E_NotImpersonationToken != lastError)) + { + Marshal.ThrowExceptionForHR(lastError); // will only throw if (hresult < 0) + } + } + + } +} + diff --git a/src/System.Data.OleDb/src/System/Data/ProviderBase/DbConnectionPoolOptions.cs b/src/System.Data.OleDb/src/System/Data/ProviderBase/DbConnectionPoolOptions.cs new file mode 100644 index 000000000000..dcb02f3b2620 --- /dev/null +++ b/src/System.Data.OleDb/src/System/Data/ProviderBase/DbConnectionPoolOptions.cs @@ -0,0 +1,68 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information + +namespace System.Data.ProviderBase +{ + internal sealed class DbConnectionPoolGroupOptions + { + private readonly bool _poolByIdentity; + private readonly int _minPoolSize; + private readonly int _maxPoolSize; + private readonly int _creationTimeout; + private readonly TimeSpan _loadBalanceTimeout; + private readonly bool _hasTransactionAffinity; + private readonly bool _useLoadBalancing; + + public DbConnectionPoolGroupOptions( + bool poolByIdentity, + int minPoolSize, + int maxPoolSize, + int creationTimeout, + int loadBalanceTimeout, + bool hasTransactionAffinity) + { + _poolByIdentity = poolByIdentity; + _minPoolSize = minPoolSize; + _maxPoolSize = maxPoolSize; + _creationTimeout = creationTimeout; + + if (0 != loadBalanceTimeout) + { + _loadBalanceTimeout = new TimeSpan(0, 0, loadBalanceTimeout); + _useLoadBalancing = true; + } + + _hasTransactionAffinity = hasTransactionAffinity; + } + + public int CreationTimeout + { + get { return _creationTimeout; } + } + public bool HasTransactionAffinity + { + get { return _hasTransactionAffinity; } + } + public TimeSpan LoadBalanceTimeout + { + get { return _loadBalanceTimeout; } + } + public int MaxPoolSize + { + get { return _maxPoolSize; } + } + public int MinPoolSize + { + get { return _minPoolSize; } + } + public bool PoolByIdentity + { + get { return _poolByIdentity; } + } + public bool UseLoadBalancing + { + get { return _useLoadBalancing; } + } + } +} diff --git a/src/System.Data.OleDb/src/System/Data/ProviderBase/DbMetaDataFactory.cs b/src/System.Data.OleDb/src/System/Data/ProviderBase/DbMetaDataFactory.cs new file mode 100644 index 000000000000..69bed5c9daeb --- /dev/null +++ b/src/System.Data.OleDb/src/System/Data/ProviderBase/DbMetaDataFactory.cs @@ -0,0 +1,581 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Data.Common; +using System.Diagnostics; +using System.Globalization; +using System.IO; + +namespace System.Data.ProviderBase +{ + internal class DbMetaDataFactory + { // V1.2.3300 + + private DataSet _metaDataCollectionsDataSet; + private string _normalizedServerVersion; + private string _serverVersionString; + // well known column names + private const string _collectionName = "CollectionName"; + private const string _populationMechanism = "PopulationMechanism"; + private const string _populationString = "PopulationString"; + private const string _maximumVersion = "MaximumVersion"; + private const string _minimumVersion = "MinimumVersion"; + private const string _dataSourceProductVersionNormalized = "DataSourceProductVersionNormalized"; + private const string _dataSourceProductVersion = "DataSourceProductVersion"; + private const string _restrictionDefault = "RestrictionDefault"; + private const string _restrictionNumber = "RestrictionNumber"; + private const string _numberOfRestrictions = "NumberOfRestrictions"; + private const string _restrictionName = "RestrictionName"; + private const string _parameterName = "ParameterName"; + + // population mechanisms + private const string _dataTable = "DataTable"; + private const string _sqlCommand = "SQLCommand"; + private const string _prepareCollection = "PrepareCollection"; + + public DbMetaDataFactory(Stream xmlStream, string serverVersion, string normalizedServerVersion) + { + ADP.CheckArgumentNull(xmlStream, "xmlStream"); + ADP.CheckArgumentNull(serverVersion, "serverVersion"); + ADP.CheckArgumentNull(normalizedServerVersion, "normalizedServerVersion"); + + LoadDataSetFromXml(xmlStream); + + _serverVersionString = serverVersion; + _normalizedServerVersion = normalizedServerVersion; + } + + protected DataSet CollectionDataSet + { + get + { + return _metaDataCollectionsDataSet; + } + } + + protected string ServerVersion + { + get + { + return _serverVersionString; + } + } + + protected string ServerVersionNormalized + { + get + { + return _normalizedServerVersion; + } + } + + protected DataTable CloneAndFilterCollection(string collectionName, string[] hiddenColumnNames) + { + DataTable sourceTable; + DataTable destinationTable; + DataColumn[] filteredSourceColumns; + DataColumnCollection destinationColumns; + DataRow newRow; + + sourceTable = _metaDataCollectionsDataSet.Tables[collectionName]; + + if ((sourceTable == null) || (collectionName != sourceTable.TableName)) + { + throw ADP.DataTableDoesNotExist(collectionName); + } + + destinationTable = new DataTable(collectionName); + destinationTable.Locale = CultureInfo.InvariantCulture; + destinationColumns = destinationTable.Columns; + + filteredSourceColumns = FilterColumns(sourceTable, hiddenColumnNames, destinationColumns); + + foreach (DataRow row in sourceTable.Rows) + { + if (SupportedByCurrentVersion(row) == true) + { + newRow = destinationTable.NewRow(); + for (int i = 0; i < destinationColumns.Count; i++) + { + newRow[destinationColumns[i]] = row[filteredSourceColumns[i], DataRowVersion.Current]; + } + destinationTable.Rows.Add(newRow); + newRow.AcceptChanges(); + } + } + + return destinationTable; + } + + public void Dispose() + { + Dispose(true); + } + + virtual protected void Dispose(bool disposing) + { + if (disposing) + { + _normalizedServerVersion = null; + _serverVersionString = null; + _metaDataCollectionsDataSet.Dispose(); + } + } + + private DataTable ExecuteCommand(DataRow requestedCollectionRow, String[] restrictions, DbConnection connection) + { + DataTable metaDataCollectionsTable = _metaDataCollectionsDataSet.Tables[DbMetaDataCollectionNames.MetaDataCollections]; + DataColumn populationStringColumn = metaDataCollectionsTable.Columns[_populationString]; + DataColumn numberOfRestrictionsColumn = metaDataCollectionsTable.Columns[_numberOfRestrictions]; + DataColumn collectionNameColumn = metaDataCollectionsTable.Columns[_collectionName]; + //DataColumn restrictionNameColumn = metaDataCollectionsTable.Columns[_restrictionName]; + + DataTable resultTable = null; + DbCommand command = null; + DataTable schemaTable = null; + + Debug.Assert(requestedCollectionRow != null); + String sqlCommand = requestedCollectionRow[populationStringColumn, DataRowVersion.Current] as string; + int numberOfRestrictions = (int)requestedCollectionRow[numberOfRestrictionsColumn, DataRowVersion.Current]; + String collectionName = requestedCollectionRow[collectionNameColumn, DataRowVersion.Current] as string; + + if ((restrictions != null) && (restrictions.Length > numberOfRestrictions)) + { + throw ADP.TooManyRestrictions(collectionName); + } + + command = connection.CreateCommand(); + command.CommandText = sqlCommand; + command.CommandTimeout = System.Math.Max(command.CommandTimeout, 180); + + for (int i = 0; i < numberOfRestrictions; i++) + { + DbParameter restrictionParameter = command.CreateParameter(); + + if ((restrictions != null) && (restrictions.Length > i) && (restrictions[i] != null)) + { + restrictionParameter.Value = restrictions[i]; + } + else + { + // This is where we have to assign null to the value of the parameter. + restrictionParameter.Value = DBNull.Value; + + } + + restrictionParameter.ParameterName = GetParameterName(collectionName, i + 1); + restrictionParameter.Direction = ParameterDirection.Input; + command.Parameters.Add(restrictionParameter); + } + + DbDataReader reader = null; + try + { + try + { + reader = command.ExecuteReader(); + } + catch (Exception e) + { + if (!ADP.IsCatchableExceptionType(e)) + { + throw; + } + throw ADP.QueryFailed(collectionName, e); + } + + // TODO: Consider using the DataAdapter.Fill + + // Build a DataTable from the reader + resultTable = new DataTable(collectionName); + resultTable.Locale = CultureInfo.InvariantCulture; + + schemaTable = reader.GetSchemaTable(); + foreach (DataRow row in schemaTable.Rows) + { + resultTable.Columns.Add(row["ColumnName"] as string, (Type)row["DataType"] as Type); + } + object[] values = new object[resultTable.Columns.Count]; + while (reader.Read()) + { + reader.GetValues(values); + resultTable.Rows.Add(values); + } + } + finally + { + if (reader != null) + { + reader.Dispose(); + reader = null; + } + } + return resultTable; + } + + private DataColumn[] FilterColumns(DataTable sourceTable, string[] hiddenColumnNames, DataColumnCollection destinationColumns) + { + DataColumn newDestinationColumn; + int currentColumn; + DataColumn[] filteredSourceColumns = null; + + int columnCount = 0; + foreach (DataColumn sourceColumn in sourceTable.Columns) + { + if (IncludeThisColumn(sourceColumn, hiddenColumnNames) == true) + { + columnCount++; + } + } + + if (columnCount == 0) + { + throw ADP.NoColumns(); + } + + currentColumn = 0; + filteredSourceColumns = new DataColumn[columnCount]; + + foreach (DataColumn sourceColumn in sourceTable.Columns) + { + if (IncludeThisColumn(sourceColumn, hiddenColumnNames) == true) + { + newDestinationColumn = new DataColumn(sourceColumn.ColumnName, sourceColumn.DataType); + destinationColumns.Add(newDestinationColumn); + filteredSourceColumns[currentColumn] = sourceColumn; + currentColumn++; + } + } + return filteredSourceColumns; + } + + internal DataRow FindMetaDataCollectionRow(string collectionName) + { + bool versionFailure; + bool haveExactMatch; + bool haveMultipleInexactMatches; + string candidateCollectionName; + + DataTable metaDataCollectionsTable = _metaDataCollectionsDataSet.Tables[DbMetaDataCollectionNames.MetaDataCollections]; + if (metaDataCollectionsTable == null) + { + throw ADP.InvalidXml(); + } + + DataColumn collectionNameColumn = metaDataCollectionsTable.Columns[DbMetaDataColumnNames.CollectionName]; + + if ((null == collectionNameColumn) || (typeof(System.String) != collectionNameColumn.DataType)) + { + throw ADP.InvalidXmlMissingColumn(DbMetaDataCollectionNames.MetaDataCollections, DbMetaDataColumnNames.CollectionName); + } + + DataRow requestedCollectionRow = null; + String exactCollectionName = null; + + // find the requested collection + versionFailure = false; + haveExactMatch = false; + haveMultipleInexactMatches = false; + + foreach (DataRow row in metaDataCollectionsTable.Rows) + { + candidateCollectionName = row[collectionNameColumn, DataRowVersion.Current] as string; + if (ADP.IsEmpty(candidateCollectionName)) + { + throw ADP.InvalidXmlInvalidValue(DbMetaDataCollectionNames.MetaDataCollections, DbMetaDataColumnNames.CollectionName); + } + + if (ADP.CompareInsensitiveInvariant(candidateCollectionName, collectionName)) + { + if (SupportedByCurrentVersion(row) == false) + { + versionFailure = true; + } + else + { + if (collectionName == candidateCollectionName) + { + if (haveExactMatch == true) + { + throw ADP.CollectionNameIsNotUnique(collectionName); + } + requestedCollectionRow = row; + exactCollectionName = candidateCollectionName; + haveExactMatch = true; + } + else + { + // have an inexact match - ok only if it is the only one + if (exactCollectionName != null) + { + // can't fail here becasue we may still find an exact match + haveMultipleInexactMatches = true; + } + requestedCollectionRow = row; + exactCollectionName = candidateCollectionName; + } + } + } + } + + if (requestedCollectionRow == null) + { + if (versionFailure == false) + { + throw ADP.UndefinedCollection(collectionName); + } + else + { + throw ADP.UnsupportedVersion(collectionName); + } + } + + if ((haveExactMatch == false) && (haveMultipleInexactMatches == true)) + { + throw ADP.AmbigousCollectionName(collectionName); + } + + return requestedCollectionRow; + + } + + private void FixUpVersion(DataTable dataSourceInfoTable) + { + Debug.Assert(dataSourceInfoTable.TableName == DbMetaDataCollectionNames.DataSourceInformation); + DataColumn versionColumn = dataSourceInfoTable.Columns[_dataSourceProductVersion]; + DataColumn normalizedVersionColumn = dataSourceInfoTable.Columns[_dataSourceProductVersionNormalized]; + + if ((versionColumn == null) || (normalizedVersionColumn == null)) + { + throw ADP.MissingDataSourceInformationColumn(); + } + + if (dataSourceInfoTable.Rows.Count != 1) + { + throw ADP.IncorrectNumberOfDataSourceInformationRows(); + } + + DataRow dataSourceInfoRow = dataSourceInfoTable.Rows[0]; + + dataSourceInfoRow[versionColumn] = _serverVersionString; + dataSourceInfoRow[normalizedVersionColumn] = _normalizedServerVersion; + dataSourceInfoRow.AcceptChanges(); + } + + private string GetParameterName(string neededCollectionName, int neededRestrictionNumber) + { + DataTable restrictionsTable = null; + DataColumnCollection restrictionColumns = null; + DataColumn collectionName = null; + DataColumn parameterName = null; + DataColumn restrictionName = null; + DataColumn restrictionNumber = null; + ; + string result = null; + + restrictionsTable = _metaDataCollectionsDataSet.Tables[DbMetaDataCollectionNames.Restrictions]; + if (restrictionsTable != null) + { + restrictionColumns = restrictionsTable.Columns; + if (restrictionColumns != null) + { + collectionName = restrictionColumns[_collectionName]; + parameterName = restrictionColumns[_parameterName]; + restrictionName = restrictionColumns[_restrictionName]; + restrictionNumber = restrictionColumns[_restrictionNumber]; + } + } + + if ((parameterName == null) || (collectionName == null) || (restrictionName == null) || (restrictionNumber == null)) + { + throw ADP.MissingRestrictionColumn(); + } + + foreach (DataRow restriction in restrictionsTable.Rows) + { + if (((string)restriction[collectionName] == neededCollectionName) && + ((int)restriction[restrictionNumber] == neededRestrictionNumber) && + (SupportedByCurrentVersion(restriction))) + { + result = (string)restriction[parameterName]; + break; + } + } + + if (result == null) + { + throw ADP.MissingRestrictionRow(); + } + + return result; + + } + + virtual public DataTable GetSchema(DbConnection connection, string collectionName, string[] restrictions) + { + Debug.Assert(_metaDataCollectionsDataSet != null); + + //TODO: MarkAsh or EnzoL should review this code for efficency. + DataTable metaDataCollectionsTable = _metaDataCollectionsDataSet.Tables[DbMetaDataCollectionNames.MetaDataCollections]; + DataColumn populationMechanismColumn = metaDataCollectionsTable.Columns[_populationMechanism]; + DataColumn collectionNameColumn = metaDataCollectionsTable.Columns[DbMetaDataColumnNames.CollectionName]; + DataRow requestedCollectionRow = null; + DataTable requestedSchema = null; + string[] hiddenColumns; + string exactCollectionName = null; + + requestedCollectionRow = FindMetaDataCollectionRow(collectionName); + exactCollectionName = requestedCollectionRow[collectionNameColumn, DataRowVersion.Current] as string; + + if (ADP.IsEmptyArray(restrictions) == false) + { + for (int i = 0; i < restrictions.Length; i++) + { + if ((restrictions[i] != null) && (restrictions[i].Length > 4096)) + { + // use a non-specific error because no new beta 2 error messages are allowed + // TODO: will add a more descriptive error in RTM + throw ADP.NotSupported(); + } + } + } + + string populationMechanism = requestedCollectionRow[populationMechanismColumn, DataRowVersion.Current] as string; + switch (populationMechanism) + { + case _dataTable: + if (exactCollectionName == DbMetaDataCollectionNames.MetaDataCollections) + { + hiddenColumns = new string[2]; + hiddenColumns[0] = _populationMechanism; + hiddenColumns[1] = _populationString; + } + else + { + hiddenColumns = null; + } + // none of the datatable collections support restrictions + if (ADP.IsEmptyArray(restrictions) == false) + { + throw ADP.TooManyRestrictions(exactCollectionName); + } + + requestedSchema = CloneAndFilterCollection(exactCollectionName, hiddenColumns); + + // TODO: Consider an alternate method that doesn't involve special casing -- perhaps _prepareCollection + + // for the data source infomation table we need to fix up the version columns at run time + // since the version is determined at run time + if (exactCollectionName == DbMetaDataCollectionNames.DataSourceInformation) + { + FixUpVersion(requestedSchema); + } + break; + + case _sqlCommand: + requestedSchema = ExecuteCommand(requestedCollectionRow, restrictions, connection); + break; + + case _prepareCollection: + requestedSchema = PrepareCollection(exactCollectionName, restrictions, connection); + break; + + default: + throw ADP.UndefinedPopulationMechanism(populationMechanism); + } + + return requestedSchema; + } + + private bool IncludeThisColumn(DataColumn sourceColumn, string[] hiddenColumnNames) + { + bool result = true; + string sourceColumnName = sourceColumn.ColumnName; + + switch (sourceColumnName) + { + case _minimumVersion: + case _maximumVersion: + result = false; + break; + + default: + if (hiddenColumnNames == null) + { + break; + } + for (int i = 0; i < hiddenColumnNames.Length; i++) + { + if (hiddenColumnNames[i] == sourceColumnName) + { + result = false; + break; + } + } + break; + } + + return result; + } + + private void LoadDataSetFromXml(Stream XmlStream) + { + _metaDataCollectionsDataSet = new DataSet(); + _metaDataCollectionsDataSet.Locale = System.Globalization.CultureInfo.InvariantCulture; + _metaDataCollectionsDataSet.ReadXml(XmlStream); + } + + virtual protected DataTable PrepareCollection(String collectionName, String[] restrictions, DbConnection connection) + { + throw ADP.NotSupported(); + } + + private bool SupportedByCurrentVersion(DataRow requestedCollectionRow) + { + bool result = true; + DataColumnCollection tableColumns = requestedCollectionRow.Table.Columns; + DataColumn versionColumn; + Object version; + + // check the minimum version first + versionColumn = tableColumns[_minimumVersion]; + if (versionColumn != null) + { + version = requestedCollectionRow[versionColumn]; + if (version != null) + { + if (version != DBNull.Value) + { + if (0 > string.Compare(_normalizedServerVersion, (string)version, StringComparison.OrdinalIgnoreCase)) + { + result = false; + } + } + } + } + + // if the minmum version was ok what about the maximum version + if (result == true) + { + versionColumn = tableColumns[_maximumVersion]; + if (versionColumn != null) + { + version = requestedCollectionRow[versionColumn]; + if (version != null) + { + if (version != DBNull.Value) + { + if (0 < string.Compare(_normalizedServerVersion, (string)version, StringComparison.OrdinalIgnoreCase)) + { + result = false; + } + } + } + } + } + + return result; + } + } +} \ No newline at end of file diff --git a/src/System.Data.OleDb/src/System/Data/ProviderBase/DbReferenceCollection.cs b/src/System.Data.OleDb/src/System/Data/ProviderBase/DbReferenceCollection.cs new file mode 100644 index 000000000000..972eba55477f --- /dev/null +++ b/src/System.Data.OleDb/src/System/Data/ProviderBase/DbReferenceCollection.cs @@ -0,0 +1,282 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Diagnostics; +using System.Threading; + +namespace System.Data.ProviderBase +{ + internal abstract class DbReferenceCollection + { + private struct CollectionEntry + { + private int _tag; // information about the reference + private WeakReference _weak; // the reference itself. + + public void NewTarget(int tag, object target) + { + Debug.Assert(!HasTarget, "Entry already has a valid target"); + Debug.Assert(tag != 0, "Bad tag"); + Debug.Assert(target != null, "Invalid target"); + + if (_weak == null) + { + _weak = new WeakReference(target, false); + } + else + { + _weak.Target = target; + } + _tag = tag; + } + + public void RemoveTarget() + { + _tag = 0; + } + + public bool HasTarget + { + get + { + return ((_tag != 0) && (_weak.IsAlive)); + } + } + + public int Tag + { + get + { + return _tag; + } + } + + public object Target + { + get + { + return (_tag == 0 ? null : _weak.Target); + } + } + } + + private const int LockPollTime = 100; // Time to wait (in ms) between attempting to get the _itemLock + private const int DefaultCollectionSize = 20; // Default size for the collection, and the amount to grow everytime the collection is full + private CollectionEntry[] _items; // The collection of items we are keeping track of + private readonly object _itemLock; // Used to synchronize access to the _items collection + private int _optimisticCount; // (#ItemsAdded - #ItemsRemoved) - This estimates the number of items that we *should* have (but doesn't take into account item targets being GC'd) + private int _lastItemIndex; // Location of the last item in _items + private volatile bool _isNotifying; // Indicates that the collection is currently being notified (and, therefore, about to be cleared) + + protected DbReferenceCollection() + { + _items = new CollectionEntry[DefaultCollectionSize]; + _itemLock = new object(); + _optimisticCount = 0; + _lastItemIndex = 0; + } + + abstract public void Add(object value, int tag); + + protected void AddItem(object value, int tag) + { + Debug.Assert(null != value && 0 != tag, "AddItem with null value or 0 tag"); + bool itemAdded = false; + + lock (_itemLock) + { + // Try to find a free spot + for (int i = 0; i <= _lastItemIndex; ++i) + { + if (_items[i].Tag == 0) + { + _items[i].NewTarget(tag, value); + Debug.Assert(_items[i].HasTarget, "missing expected target"); + itemAdded = true; + break; + } + } + + // No free spots, can we just add on to the end? + if ((!itemAdded) && (_lastItemIndex + 1 < _items.Length)) + { + _lastItemIndex++; + _items[_lastItemIndex].NewTarget(tag, value); + itemAdded = true; + } + + // If no free spots and no space at the end, try to find a dead item + if (!itemAdded) + { + for (int i = 0; i <= _lastItemIndex; ++i) + { + if (!_items[i].HasTarget) + { + _items[i].NewTarget(tag, value); + Debug.Assert(_items[i].HasTarget, "missing expected target"); + itemAdded = true; + break; + } + } + } + + // If nothing was free, then resize and add to the end + if (!itemAdded) + { + Array.Resize(ref _items, _items.Length * 2); + _lastItemIndex++; + _items[_lastItemIndex].NewTarget(tag, value); + } + + _optimisticCount++; + } + } + + internal T FindItem(int tag, Func filterMethod) where T : class + { + bool lockObtained = false; + try + { + TryEnterItemLock(ref lockObtained); + if (lockObtained) + { + if (_optimisticCount > 0) + { + // Loop through the items + for (int counter = 0; counter <= _lastItemIndex; counter++) + { + // Check tag (should be easiest and quickest) + if (_items[counter].Tag == tag) + { + // NOTE: Check if the returned value is null twice may seem wasteful, but this if for performance + // Since checking for null twice is cheaper than calling both HasTarget and Target OR always attempting to typecast + object value = _items[counter].Target; + if (value != null) + { + // Make sure the item has the correct type and passes the filtering + T tempItem = value as T; + if ((tempItem != null) && (filterMethod(tempItem))) + { + return tempItem; + } + } + } + } + } + } + } + finally + { + ExitItemLockIfNeeded(lockObtained); + } + + // If we got to here, then no item was found, so return null + return null; + } + + public void Notify(int message) + { + bool lockObtained = false; + try + { + TryEnterItemLock(ref lockObtained); + if (lockObtained) + { + try + { + _isNotifying = true; + + // Loop through each live item and notify it + if (_optimisticCount > 0) + { + for (int index = 0; index <= _lastItemIndex; ++index) + { + object value = _items[index].Target; // checks tag & gets target + if (null != value) + { + NotifyItem(message, _items[index].Tag, value); + _items[index].RemoveTarget(); + } + Debug.Assert(!_items[index].HasTarget, "Unexpected target after notifying"); + } + _optimisticCount = 0; + } + + // Shrink collection (if needed) + if (_items.Length > 100) + { + _lastItemIndex = 0; + _items = new CollectionEntry[DefaultCollectionSize]; + } + } + finally + { + _isNotifying = false; + } + } + } + finally + { + ExitItemLockIfNeeded(lockObtained); + } + } + + abstract protected void NotifyItem(int message, int tag, object value); + + abstract public void Remove(object value); + + protected void RemoveItem(object value) + { + Debug.Assert(null != value, "RemoveItem with null"); + + bool lockObtained = false; + try + { + TryEnterItemLock(ref lockObtained); + + if (lockObtained) + { + // Find the value, and then remove the target from our collection + if (_optimisticCount > 0) + { + for (int index = 0; index <= _lastItemIndex; ++index) + { + if (value == _items[index].Target) + { // checks tag & gets target + _items[index].RemoveTarget(); + _optimisticCount--; + break; + } + } + } + } + } + finally + { + ExitItemLockIfNeeded(lockObtained); + } + } + + // This is polling lock that will abandon getting the lock if _isNotifying is set to true + private void TryEnterItemLock(ref bool lockObtained) + { + // Assume that we couldn't take the lock + lockObtained = false; + // Keep trying to take the lock until either we've taken it, or the collection is being notified + while ((!_isNotifying) && (!lockObtained)) + { + Monitor.TryEnter(_itemLock, LockPollTime, ref lockObtained); + } + } + + private void ExitItemLockIfNeeded(bool lockObtained) + { + if (lockObtained) + { + Monitor.Exit(_itemLock); + } + } + } +} + diff --git a/src/System.Data.OleDb/src/System/Data/ProviderBase/WrappedIUnknown.cs b/src/System.Data.OleDb/src/System/Data/ProviderBase/WrappedIUnknown.cs new file mode 100644 index 000000000000..c55acf6df1be --- /dev/null +++ b/src/System.Data.OleDb/src/System/Data/ProviderBase/WrappedIUnknown.cs @@ -0,0 +1,80 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +namespace System.Data.ProviderBase +{ + // We wrap the interface as a native IUnknown IntPtr so that every + // thread that creates a connection will fake the correct context when + // in transactions, otherwise everything is marshalled. We do this + // for two reasons: first for the connection pooler, this is a significant + // performance gain, second for the OLE DB provider, it doesn't marshal. + + internal class WrappedIUnknown : SafeHandle + { + internal WrappedIUnknown() : base(IntPtr.Zero, true) + { + } + + internal WrappedIUnknown(object unknown) : this() + { + if (null != unknown) + { + RuntimeHelpers.PrepareConstrainedRegions(); + try + { } + finally + { + base.handle = Marshal.GetIUnknownForObject(unknown); + } + } + } + + public override bool IsInvalid + { + get + { + return (IntPtr.Zero == base.handle); + } + } + + internal object ComWrapper() + { + // NOTE: Method, instead of property, to avoid being evaluated at + // runtime in the debugger. + object value = null; + bool mustRelease = false; + RuntimeHelpers.PrepareConstrainedRegions(); + try + { + DangerousAddRef(ref mustRelease); + + IntPtr handle = DangerousGetHandle(); + value = Marshal.GetObjectForIUnknown(handle); + } + finally + { + if (mustRelease) + { + DangerousRelease(); + } + } + return value; + } + + override protected bool ReleaseHandle() + { + // NOTE: The SafeHandle class guarantees this will be called exactly once. + IntPtr ptr = base.handle; + base.handle = IntPtr.Zero; + if (IntPtr.Zero != ptr) + { + Marshal.Release(ptr); + } + return true; + } + } +} diff --git a/src/System.Data.OleDb/src/UnsafeNativeMethods.cs b/src/System.Data.OleDb/src/UnsafeNativeMethods.cs new file mode 100644 index 000000000000..c63be49fdfc5 --- /dev/null +++ b/src/System.Data.OleDb/src/UnsafeNativeMethods.cs @@ -0,0 +1,836 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Runtime.InteropServices; +using System.Security; + +#pragma warning disable 0618 // ComInterfaceType.InterfaceIsDual is obsolete + +namespace System.Data.Common +{ + internal static class UnsafeNativeMethods + { + // + // Oleaut32 + // + + [DllImport(Interop.Libraries.OleAut32, CharSet = CharSet.Unicode, PreserveSig = true)] + static internal extern System.Data.OleDb.OleDbHResult GetErrorInfo( + [In] Int32 dwReserved, + [Out, MarshalAs(UnmanagedType.Interface)] out IErrorInfo ppIErrorInfo); + + [Guid("00000567-0000-0010-8000-00AA006D2EA4"), InterfaceType(ComInterfaceType.InterfaceIsDual), ComImport, SuppressUnmanagedCodeSecurity] + internal interface ADORecordConstruction + { + [return: MarshalAs(UnmanagedType.Interface)] object get_Row(); + + //void put_Row( + // [In, MarshalAs(UnmanagedType.Interface)] object pRow); + + //void put_ParentRow( + // [In, MarshalAs(UnmanagedType.Interface)]object pRow); + } + + [Guid("00000283-0000-0010-8000-00AA006D2EA4"), InterfaceType(ComInterfaceType.InterfaceIsDual), ComImport, SuppressUnmanagedCodeSecurity] + internal interface ADORecordsetConstruction + { + [return: MarshalAs(UnmanagedType.Interface)] object get_Rowset(); + + [Obsolete("not used", true)] void put_Rowset(/*deleted parameters signature*/); + + /*[return:MarshalAs(UnmanagedType.SysInt)]*/ + IntPtr get_Chapter(); + + //[[PreserveSig] + //iint put_Chapter ( + // [In] + // IntPtr pcRefCount); + + //[[PreserveSig] + //iint get_RowPosition ( + // [Out, MarshalAs(UnmanagedType.Interface)] + // out object ppRowPos); + + //[[PreserveSig] + //iint put_RowPosition ( + // [In, MarshalAs(UnmanagedType.Interface)] + // object pRowPos); + } + + [Guid("0000050E-0000-0010-8000-00AA006D2EA4"), InterfaceType(ComInterfaceType.InterfaceIsDual), ComImport, SuppressUnmanagedCodeSecurity] + internal interface Recordset15 + { + [Obsolete("not used", true)] void get_Properties(/*deleted parameters signature*/); + [Obsolete("not used", true)] void get_AbsolutePosition(/*deleted parameters signature*/); + [Obsolete("not used", true)] void put_AbsolutePosition(/*deleted parameters signature*/); + [Obsolete("not used", true)] void putref_ActiveConnection(/*deleted parameters signature*/); + [Obsolete("not used", true)] void put_ActiveConnection(/*deleted parameters signature*/); + + /*[return:MarshalAs(UnmanagedType.Variant)]*/ + object get_ActiveConnection(); + + [Obsolete("not used", true)] void get_BOF(/*deleted parameters signature*/); + [Obsolete("not used", true)] void get_Bookmark(/*deleted parameters signature*/); + [Obsolete("not used", true)] void put_Bookmark(/*deleted parameters signature*/); + [Obsolete("not used", true)] void get_CacheSize(/*deleted parameters signature*/); + [Obsolete("not used", true)] void put_CacheSize(/*deleted parameters signature*/); + [Obsolete("not used", true)] void get_CursorType(/*deleted parameters signature*/); + [Obsolete("not used", true)] void put_CursorType(/*deleted parameters signature*/); + [Obsolete("not used", true)] void get_EOF(/*deleted parameters signature*/); + [Obsolete("not used", true)] void get_Fields(/*deleted parameters signature*/); + [Obsolete("not used", true)] void get_LockType(/*deleted parameters signature*/); + [Obsolete("not used", true)] void put_LockType(/*deleted parameters signature*/); + [Obsolete("not used", true)] void get_MaxRecords(/*deleted parameters signature*/); + [Obsolete("not used", true)] void put_MaxRecords(/*deleted parameters signature*/); + [Obsolete("not used", true)] void get_RecordCount(/*deleted parameters signature*/); + [Obsolete("not used", true)] void putref_Source(/*deleted parameters signature*/); + [Obsolete("not used", true)] void put_Source(/*deleted parameters signature*/); + [Obsolete("not used", true)] void get_Source(/*deleted parameters signature*/); + [Obsolete("not used", true)] void AddNew(/*deleted parameters signature*/); + [Obsolete("not used", true)] void CancelUpdate(/*deleted parameters signature*/); + + [PreserveSig] System.Data.OleDb.OleDbHResult Close(); + + [Obsolete("not used", true)] void Delete(/*deleted parameters signature*/); + [Obsolete("not used", true)] void GetRows(/*deleted parameters signature*/); + [Obsolete("not used", true)] void Move(/*deleted parameters signature*/); + [Obsolete("not used", true)] void MoveNext(); + [Obsolete("not used", true)] void MovePrevious(); + [Obsolete("not used", true)] void MoveFirst(); + [Obsolete("not used", true)] void MoveLast(); + [Obsolete("not used", true)] void Open(/*deleted parameters signature*/); + [Obsolete("not used", true)] void Requery(/*deleted parameters signature*/); + [Obsolete("not used", true)] void _xResync(/*deleted parameters signature*/); + [Obsolete("not used", true)] void Update(/*deleted parameters signature*/); + [Obsolete("not used", true)] void get_AbsolutePage(/*deleted parameters signature*/); + [Obsolete("not used", true)] void put_AbsolutePage(/*deleted parameters signature*/); + [Obsolete("not used", true)] void get_EditMode(/*deleted parameters signature*/); + [Obsolete("not used", true)] void get_Filter(/*deleted parameters signature*/); + [Obsolete("not used", true)] void put_Filter(/*deleted parameters signature*/); + [Obsolete("not used", true)] void get_PageCount(/*deleted parameters signature*/); + [Obsolete("not used", true)] void get_PageSize(/*deleted parameters signature*/); + [Obsolete("not used", true)] void put_PageSize(/*deleted parameters signature*/); + [Obsolete("not used", true)] void get_Sort(/*deleted parameters signature*/); + [Obsolete("not used", true)] void put_Sort(/*deleted parameters signature*/); + [Obsolete("not used", true)] void get_Status(/*deleted parameters signature*/); + [Obsolete("not used", true)] void get_State(/*deleted parameters signature*/); + [Obsolete("not used", true)] void _xClone(/*deleted parameters signature*/); + [Obsolete("not used", true)] void UpdateBatch(/*deleted parameters signature*/); + [Obsolete("not used", true)] void CancelBatch(/*deleted parameters signature*/); + [Obsolete("not used", true)] void get_CursorLocation(/*deleted parameters signature*/); + [Obsolete("not used", true)] void put_CursorLocation(/*deleted parameters signature*/); + + [PreserveSig] + System.Data.OleDb.OleDbHResult NextRecordset( + [Out]out object RecordsAffected, + [Out, MarshalAs(UnmanagedType.Interface)] out object ppiRs); + + //[ Obsolete("not used", true)] void Supports(/*deleted parameters signature*/); + //[ Obsolete("not used", true)] void get_Collect(/*deleted parameters signature*/); + //[ Obsolete("not used", true)] void put_Collect(/*deleted parameters signature*/); + //[ Obsolete("not used", true)] void get_MarshalOptions(/*deleted parameters signature*/); + //[ Obsolete("not used", true)] void put_MarshalOptions(/*deleted parameters signature*/); + //[ Obsolete("not used", true)] void Find(/*deleted parameters signature*/); + } + + [Guid("00000562-0000-0010-8000-00AA006D2EA4"), InterfaceType(ComInterfaceType.InterfaceIsDual), ComImport, SuppressUnmanagedCodeSecurity] + internal interface _ADORecord + { + [Obsolete("not used", true)] void get_Properties(/*deleted parameters signature*/); + + /*[return:MarshalAs(UnmanagedType.Variant)]*/ + object get_ActiveConnection(); + + [Obsolete("not used", true)] void put_ActiveConnection(/*deleted parameters signature*/); + [Obsolete("not used", true)] void putref_ActiveConnection(/*deleted parameters signature*/); + [Obsolete("not used", true)] void get_State(/*deleted parameters signature*/); + [Obsolete("not used", true)] void get_Source(/*deleted parameters signature*/); + [Obsolete("not used", true)] void put_Source(/*deleted parameters signature*/); + [Obsolete("not used", true)] void putref_Source(/*deleted parameters signature*/); + [Obsolete("not used", true)] void get_Mode(/*deleted parameters signature*/); + [Obsolete("not used", true)] void put_Mode(/*deleted parameters signature*/); + [Obsolete("not used", true)] void get_ParentURL(/*deleted parameters signature*/); + [Obsolete("not used", true)] void MoveRecord(/*deleted parameters signature*/); + [Obsolete("not used", true)] void CopyRecord(/*deleted parameters signature*/); + [Obsolete("not used", true)] void DeleteRecord(/*deleted parameters signature*/); + [Obsolete("not used", true)] void Open(/*deleted parameters signature*/); + + [PreserveSig] System.Data.OleDb.OleDbHResult Close(); + + //[ Obsolete("not used", true)] void get_Fields(/*deleted parameters signature*/); + //[ Obsolete("not used", true)] void get_RecordType(/*deleted parameters signature*/); + //[ Obsolete("not used", true)] void GetChildren(/*deleted parameters signature*/); + //[ Obsolete("not used", true)] void Cancel(); + } + + /* + typedef ULONGLONG DBLENGTH; + + // Offset within a rowset + typedef LONGLONG DBROWOFFSET; + + // Number of rows + typedef LONGLONG DBROWCOUNT; + + typedef ULONGLONG DBCOUNTITEM; + + // Ordinal (column number, etc.) + typedef ULONGLONG DBORDINAL; + + typedef LONGLONG DB_LORDINAL; + + // Bookmarks + typedef ULONGLONG DBBKMARK; + // Offset in the buffer + + typedef ULONGLONG DBBYTEOFFSET; + // Reference count of each row/accessor handle + + typedef ULONG DBREFCOUNT; + + // Parameters + typedef ULONGLONG DB_UPARAMS; + + typedef LONGLONG DB_LPARAMS; + + // hash values corresponding to the elements (bookmarks) + typedef DWORDLONG DBHASHVALUE; + + // For reserve + typedef DWORDLONG DB_DWRESERVE; + + typedef LONGLONG DB_LRESERVE; + + typedef ULONGLONG DB_URESERVE; + */ + + [ComImport, Guid("0C733A8C-2A1C-11CE-ADE5-00AA0044773D"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown), SuppressUnmanagedCodeSecurity] + internal interface IAccessor + { + [Obsolete("not used", true)] void AddRefAccessor(/*deleted parameters signature*/); + + /*[local] + HRESULT CreateAccessor( + [in] DBACCESSORFLAGS dwAccessorFlags, + [in] DBCOUNTITEM cBindings, + [in, size_is(cBindings)] const DBBINDING rgBindings[], + [in] DBLENGTH cbRowSize, + [out] HACCESSOR * phAccessor, + [out, size_is(cBindings)] DBBINDSTATUS rgStatus[] + );*/ + [PreserveSig] + System.Data.OleDb.OleDbHResult CreateAccessor( + [In] int dwAccessorFlags, + [In] IntPtr cBindings, + [In] /*tagDBBINDING[]*/SafeHandle rgBindings, + [In] IntPtr cbRowSize, + [Out] out IntPtr phAccessor, + [In, Out, MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.I4)] int[] rgStatus); + + [Obsolete("not used", true)] void GetBindings(/*deleted parameters signature*/); + + /*[local] + HRESULT ReleaseAccessor( + [in] HACCESSOR hAccessor, + [in, out, unique] DBREFCOUNT * pcRefCount + );*/ + [PreserveSig] + System.Data.OleDb.OleDbHResult ReleaseAccessor( + [In] IntPtr hAccessor, + [Out] out int pcRefCount); + } + + [Guid("0C733A93-2A1C-11CE-ADE5-00AA0044773D"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown), ComImport, SuppressUnmanagedCodeSecurity] + internal interface IChapteredRowset + { + [Obsolete("not used", true)] void AddRefChapter(/*deleted parameters signature*/); + + /*[local] + HRESULT ReleaseChapter( + [in] HCHAPTER hChapter, + [out] DBREFCOUNT * pcRefCount + );*/ + [PreserveSig] + System.Data.OleDb.OleDbHResult ReleaseChapter( + [In] IntPtr hChapter, + [Out] out int pcRefCount); + } + + [Guid("0C733A11-2A1C-11CE-ADE5-00AA0044773D"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown), ComImport, SuppressUnmanagedCodeSecurity] + internal interface IColumnsInfo + { + /*[local] + HRESULT GetColumnInfo( + [in, out] DBORDINAL * pcColumns, + [out, size_is(,(ULONG)*pcColumns)] DBCOLUMNINFO ** prgInfo, + [out] OLECHAR ** ppStringsBuffer + );*/ + [PreserveSig] + System.Data.OleDb.OleDbHResult GetColumnInfo( + [Out] out IntPtr pcColumns, + [Out] out IntPtr prgInfo, + [Out] out IntPtr ppStringsBuffer); + + //[PreserveSig] + //int MapColumnIDs(/* deleted parameters*/); + } + + [Guid("0C733A10-2A1C-11CE-ADE5-00AA0044773D"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown), ComImport, SuppressUnmanagedCodeSecurity] + internal interface IColumnsRowset + { + /*[local] + HRESULT GetAvailableColumns( + [in, out] DBORDINAL * pcOptColumns, + [out, size_is(,(ULONG)*pcOptColumns)] DBID ** prgOptColumns + );*/ + [PreserveSig] + System.Data.OleDb.OleDbHResult GetAvailableColumns( + [Out] out IntPtr pcOptColumns, + [Out] out IntPtr prgOptColumns); + + /*[local] + HRESULT GetColumnsRowset( + [in] IUnknown * pUnkOuter, + [in] DBORDINAL cOptColumns, + [in, size_is((ULONG)cOptColumns)] const DBID rgOptColumns[], + [in] REFIID riid, + [in] ULONG cPropertySets, + [in, out, size_is((ULONG)cPropertySets)] DBPROPSET rgPropertySets[], + [out, iid_is(riid)] IUnknown ** ppColRowset + );*/ + [PreserveSig] + System.Data.OleDb.OleDbHResult GetColumnsRowset( + [In] IntPtr pUnkOuter, + [In] IntPtr cOptColumns, + [In] SafeHandle rgOptColumns, + [In] ref Guid riid, + [In] int cPropertySets, + [In] IntPtr rgPropertySets, + [Out, MarshalAs(UnmanagedType.Interface)] out IRowset ppColRowset); + } + + [Guid("0C733A26-2A1C-11CE-ADE5-00AA0044773D"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown), ComImport, SuppressUnmanagedCodeSecurity] + internal interface ICommandPrepare + { + /*[local] + HRESULT Prepare( + [in] ULONG cExpectedRuns + );*/ + [PreserveSig] + System.Data.OleDb.OleDbHResult Prepare( + [In] int cExpectedRuns); + + //[PreserveSig] + //int Unprepare(); + } + + [Guid("0C733A79-2A1C-11CE-ADE5-00AA0044773D"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown), ComImport, SuppressUnmanagedCodeSecurity] + internal interface ICommandProperties + { + /*[local] + HRESULT GetProperties( + [in] const ULONG cPropertyIDSets, + [in, size_is(cPropertyIDSets)] const DBPROPIDSET rgPropertyIDSets[], + [in, out] ULONG * pcPropertySets, + [out, size_is(,*pcPropertySets)] DBPROPSET ** prgPropertySets + );*/ + [PreserveSig] + System.Data.OleDb.OleDbHResult GetProperties( + [In] int cPropertyIDSets, + [In] SafeHandle rgPropertyIDSets, + [Out] out int pcPropertySets, + [Out] out IntPtr prgPropertySets); + + /*[local] + HRESULT SetProperties( + [in] ULONG cPropertySets, + [in, out, unique, size_is(cPropertySets)] DBPROPSET rgPropertySets[] + );*/ + [PreserveSig] + System.Data.OleDb.OleDbHResult SetProperties( + [In] int cPropertySets, + [In] SafeHandle rgPropertySets); + } + + [Guid("0C733A27-2A1C-11CE-ADE5-00AA0044773D"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown), ComImport, SuppressUnmanagedCodeSecurity] + internal interface ICommandText + { + /*[local] + HRESULT Cancel( + );*/ + [PreserveSig] System.Data.OleDb.OleDbHResult Cancel(); + + /*[local] + HRESULT Execute( + [in] IUnknown * pUnkOuter, + [in] REFIID riid, + [in, out] DBPARAMS * pParams, + [out] DBROWCOUNT * pcRowsAffected, + [out, iid_is(riid)] IUnknown ** ppRowset + );*/ + [PreserveSig] + System.Data.OleDb.OleDbHResult Execute( + [In] IntPtr pUnkOuter, + [In] ref Guid riid, + [In] System.Data.OleDb.tagDBPARAMS pDBParams, + [Out] out IntPtr pcRowsAffected, + [Out, MarshalAs(UnmanagedType.Interface)] out object ppRowset); + + [Obsolete("not used", true)] void GetDBSession(/*deleted parameter signature*/); + + [Obsolete("not used", true)] void GetCommandText(/*deleted parameter signature*/); + + /*[local] + HRESULT SetCommandText( + [in] REFGUID rguidDialect, + [in, unique] LPCOLESTR pwszCommand + );*/ + [PreserveSig] + System.Data.OleDb.OleDbHResult SetCommandText( + [In] ref Guid rguidDialect, + [In, MarshalAs(UnmanagedType.LPWStr)] string pwszCommand); + } + + [Guid("0C733A64-2A1C-11CE-ADE5-00AA0044773D"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown), ComImport, SuppressUnmanagedCodeSecurity] + internal interface ICommandWithParameters + { + [Obsolete("not used", true)] void GetParameterInfo(/*deleted parameters signature*/); + + [Obsolete("not used", true)] void MapParameterNames(/*deleted parameter signature*/); + + /*[local] + HRESULT SetParameterInfo( + [in] DB_UPARAMS cParams, + [in, unique, size_is((ULONG)cParams)] const DB_UPARAMS rgParamOrdinals[], + [in, unique, size_is((ULONG)cParams)] const DBPARAMBINDINFO rgParamBindInfo[] + );*/ + [PreserveSig] + System.Data.OleDb.OleDbHResult SetParameterInfo( + [In] IntPtr cParams, + [In, MarshalAs(UnmanagedType.LPArray)] IntPtr[] rgParamOrdinals, + [In, MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.Struct)] System.Data.OleDb.tagDBPARAMBINDINFO[] rgParamBindInfo); + } + + [Guid("2206CCB1-19C1-11D1-89E0-00C04FD7A829"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown), ComImport, SuppressUnmanagedCodeSecurity] + internal interface IDataInitialize { } + + [Guid("0C733A89-2A1C-11CE-ADE5-00AA0044773D"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown), ComImport, SuppressUnmanagedCodeSecurity] + internal interface IDBInfo + { + /*[local] + HRESULT GetKeywords( + [out] LPOLESTR * ppwszKeywords + );*/ + [PreserveSig] + System.Data.OleDb.OleDbHResult GetKeywords( + [Out, MarshalAs(UnmanagedType.LPWStr)] out string ppwszKeywords); + + /*[local] + HRESULT GetLiteralInfo( + [in] ULONG cLiterals, + [in, size_is(cLiterals)] const DBLITERAL rgLiterals[], + [in, out] ULONG * pcLiteralInfo, + [out, size_is(,*pcLiteralInfo)] DBLITERALINFO ** prgLiteralInfo, + [out] OLECHAR ** ppCharBuffer + );*/ + [PreserveSig] + System.Data.OleDb.OleDbHResult GetLiteralInfo( + [In] int cLiterals, + [In, MarshalAs(UnmanagedType.LPArray)] int[] rgLiterals, + [Out] out int pcLiteralInfo, + [Out] out IntPtr prgLiteralInfo, + [Out] out IntPtr ppCharBuffer); + } + + [Guid("0C733A8A-2A1C-11CE-ADE5-00AA0044773D"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown), ComImport, SuppressUnmanagedCodeSecurity] + internal interface IDBProperties + { + /*[local] + HRESULT GetProperties( + [in] const ULONG cPropertyIDSets, + [in, size_is(cPropertyIDSets)] const DBPROPIDSET rgPropertyIDSets[], + [in, out] ULONG * pcPropertySets, + [out, size_is(,*pcPropertySets)] DBPROPSET ** prgPropertySets + );*/ + [PreserveSig] + System.Data.OleDb.OleDbHResult GetProperties( + [In] int cPropertyIDSets, + [In] SafeHandle rgPropertyIDSets, + [Out] out int pcPropertySets, + [Out] out IntPtr prgPropertySets); + + [PreserveSig] + System.Data.OleDb.OleDbHResult GetPropertyInfo( + [In] int cPropertyIDSets, + [In] SafeHandle rgPropertyIDSets, + [Out] out int pcPropertySets, + [Out] out IntPtr prgPropertyInfoSets, + [Out] out IntPtr ppDescBuffer); + + [PreserveSig] + System.Data.OleDb.OleDbHResult SetProperties( + [In] int cPropertySets, + [In] SafeHandle rgPropertySets); + } + + [Guid("0C733A7B-2A1C-11CE-ADE5-00AA0044773D"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown), ComImport, SuppressUnmanagedCodeSecurity] + internal interface IDBSchemaRowset + { + /*[local] + HRESULT GetRowset( + [in] IUnknown * pUnkOuter, + [in] REFGUID rguidSchema, + [in] ULONG cRestrictions, + [in, size_is(cRestrictions)] const VARIANT rgRestrictions[], + [in] REFIID riid, + [in] ULONG cPropertySets, + [in, out, unique, size_is(cPropertySets)] DBPROPSET rgPropertySets[], + [out, iid_is(riid)] IUnknown ** ppRowset + );*/ + [PreserveSig] + System.Data.OleDb.OleDbHResult GetRowset( + [In] IntPtr pUnkOuter, + [In] ref Guid rguidSchema, + [In] int cRestrictions, + [In, MarshalAs(UnmanagedType.LPArray)] object[] rgRestrictions, + [In] ref Guid riid, + [In] int cPropertySets, + [In] IntPtr rgPropertySets, + [Out, MarshalAs(UnmanagedType.Interface)] out IRowset ppRowset); + + /*[local] + HRESULT GetSchemas( + [in, out] ULONG * pcSchemas, + [out, size_is(,*pcSchemas)] GUID ** prgSchemas, + [out, size_is(,*pcSchemas)] ULONG ** prgRestrictionSupport + );*/ + [PreserveSig] + System.Data.OleDb.OleDbHResult GetSchemas( + [Out] out int pcSchemas, + [Out] out IntPtr rguidSchema, + [Out] out IntPtr prgRestrictionSupport); + } + + [Guid("1CF2B120-547D-101B-8E65-08002B2BD119"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown), ComImport, SuppressUnmanagedCodeSecurity] + internal interface IErrorInfo + { + [Obsolete("not used", true)] void GetGUID(/*deleted parameter signature*/); + + [PreserveSig] + System.Data.OleDb.OleDbHResult GetSource( + [Out, MarshalAs(UnmanagedType.BStr)] out string pBstrSource); + + [PreserveSig] + System.Data.OleDb.OleDbHResult GetDescription( + [Out, MarshalAs(UnmanagedType.BStr)] out string pBstrDescription); + + //[ Obsolete("not used", true)] void GetHelpFile(/*deleted parameter signature*/); + + //[ Obsolete("not used", true)] void GetHelpContext(/*deleted parameter signature*/); + } +#if false + MIDL_INTERFACE("1CF2B120-547D-101B-8E65-08002B2BD119") + IErrorInfo : public IUnknown + virtual HRESULT STDMETHODCALLTYPE GetGUID( + /* [out] */ GUID *pGUID) = 0; + virtual HRESULT STDMETHODCALLTYPE GetSource( + /* [out] */ BSTR *pBstrSource) = 0; + virtual HRESULT STDMETHODCALLTYPE GetDescription( + /* [out] */ BSTR *pBstrDescription) = 0; + virtual HRESULT STDMETHODCALLTYPE GetHelpFile( + /* [out] */ BSTR *pBstrHelpFile) = 0; + virtual HRESULT STDMETHODCALLTYPE GetHelpContext( + /* [out] */ DWORD *pdwHelpContext) = 0; +#endif + + [Guid("0C733A67-2A1C-11CE-ADE5-00AA0044773D"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown), ComImport, SuppressUnmanagedCodeSecurity] + internal interface IErrorRecords + { + [Obsolete("not used", true)] void AddErrorRecord(/*deleted parameter signature*/); + + [Obsolete("not used", true)] void GetBasicErrorInfo(/*deleted parameter signature*/); + + [PreserveSig] + System.Data.OleDb.OleDbHResult GetCustomErrorObject( // may return E_NOINTERFACE when asking for IID_ISQLErrorInfo + [In] Int32 ulRecordNum, + [In] ref Guid riid, + [Out, MarshalAs(UnmanagedType.Interface)] out ISQLErrorInfo ppObject); + + [return: MarshalAs(UnmanagedType.Interface)] + IErrorInfo GetErrorInfo( + [In] Int32 ulRecordNum, + [In] Int32 lcid); + + [Obsolete("not used", true)] void GetErrorParameters(/*deleted parameter signature*/); + + Int32 GetRecordCount(); + } +#if false + MIDL_INTERFACE("0c733a67-2a1c-11ce-ade5-00aa0044773d") + IErrorRecords : public IUnknown + virtual /* [local] */ HRESULT STDMETHODCALLTYPE AddErrorRecord( + /* [in] */ ERRORINFO *pErrorInfo, + /* [in] */ DWORD dwLookupID, + /* [in] */ DISPPARAMS *pdispparams, + /* [in] */ IUnknown *punkCustomError, + /* [in] */ DWORD dwDynamicErrorID) = 0; + virtual /* [local] */ HRESULT STDMETHODCALLTYPE GetBasicErrorInfo( + /* [in] */ ULONG ulRecordNum, + /* [out] */ ERRORINFO *pErrorInfo) = 0; + virtual /* [local] */ HRESULT STDMETHODCALLTYPE GetCustomErrorObject( + /* [in] */ ULONG ulRecordNum, + /* [in] */ REFIID riid, + /* [iid_is][out] */ IUnknown **ppObject) = 0; + virtual /* [local] */ HRESULT STDMETHODCALLTYPE GetErrorInfo( + /* [in] */ ULONG ulRecordNum, + /* [in] */ LCID lcid, + /* [out] */ IErrorInfo **ppErrorInfo) = 0; + virtual /* [local] */ HRESULT STDMETHODCALLTYPE GetErrorParameters( + /* [in] */ ULONG ulRecordNum, + /* [out] */ DISPPARAMS *pdispparams) = 0; + virtual /* [local] */ HRESULT STDMETHODCALLTYPE GetRecordCount( + /* [out] */ ULONG *pcRecords) = 0; +#endif + + [Guid("0C733A90-2A1C-11CE-ADE5-00AA0044773D"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown), ComImport, SuppressUnmanagedCodeSecurity] + internal interface IMultipleResults + { + /*[local] + HRESULT GetResult( + [in] IUnknown * pUnkOuter, + [in] DBRESULTFLAG lResultFlag, + [in] REFIID riid, + [out] DBROWCOUNT * pcRowsAffected, + [out, iid_is(riid)] IUnknown ** ppRowset + );*/ + [PreserveSig] + System.Data.OleDb.OleDbHResult GetResult( + [In] IntPtr pUnkOuter, + [In] IntPtr lResultFlag, + [In] ref Guid riid, + [Out] out IntPtr pcRowsAffected, + [Out, MarshalAs(UnmanagedType.Interface)] out object ppRowset); + } +#if false + enum DBRESULTFLAGENUM { + DBRESULTFLAG_DEFAULT = 0, + DBRESULTFLAG_ROWSET = 1, + DBRESULTFLAG_ROW = 2 + } + MIDL_INTERFACE("0c733a90-2a1c-11ce-ade5-00aa0044773d") + IMultipleResults : public IUnknown + virtual /* [local] */ HRESULT STDMETHODCALLTYPE GetResult( + /* [in] */ IUnknown *pUnkOuter, + /* [in] */ DBRESULTFLAG lResultFlag, + /* [in] */ REFIID riid, + /* [out] */ DBROWCOUNT *pcRowsAffected, + /* [iid_is][out] */ IUnknown **ppRowset) = 0; +#endif + + [Guid("0C733A69-2A1C-11CE-ADE5-00AA0044773D"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown), ComImport, SuppressUnmanagedCodeSecurity] + internal interface IOpenRowset + { + [PreserveSig] + System.Data.OleDb.OleDbHResult OpenRowset( + [In] IntPtr pUnkOuter, + [In] System.Data.OleDb.tagDBID pTableID, + [In] IntPtr pIndexID, + [In] ref Guid riid, + [In] int cPropertySets, + [In] IntPtr rgPropertySets, + [Out, MarshalAs(UnmanagedType.Interface)] out object ppRowset); + } + + [Guid("0C733AB4-2A1C-11CE-ADE5-00AA0044773D"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown), ComImport, SuppressUnmanagedCodeSecurity] + internal interface IRow + { + [PreserveSig] + System.Data.OleDb.OleDbHResult GetColumns( + [In] IntPtr cColumns, + [In, Out, MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.Struct)] System.Data.OleDb.tagDBCOLUMNACCESS[] rgColumns); + + //[ Obsolete("not used", true)] void GetSourceRowset(/*deleted parameter signature*/); + //[ Obsolete("not used", true)] void Open(/*deleted parameter signature*/); + } + + [Guid("0C733A7C-2A1C-11CE-ADE5-00AA0044773D"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown), ComImport, SuppressUnmanagedCodeSecurity] + internal interface IRowset + { + [Obsolete("not used", true)] void AddRefRows(/*deleted parameter signature*/); + + /*HRESULT GetData( + [in] HROW hRow, + [in] HACCESSOR hAccessor, + [out] void * pData + );*/ + [PreserveSig] + System.Data.OleDb.OleDbHResult GetData( + [In] IntPtr hRow, + [In] IntPtr hAccessor, + [In] IntPtr pData); + + /*HRESULT GetNextRows( + [in] HCHAPTER hReserved, + [in] DBROWOFFSET lRowsOffset, + [in] DBROWCOUNT cRows, + [out] DBCOUNTITEM * pcRowsObtained, + [out, size_is(,cRows)] HROW ** prghRows + );*/ + [PreserveSig] + System.Data.OleDb.OleDbHResult GetNextRows( + [In] IntPtr hChapter, + [In] IntPtr lRowsOffset, + [In] IntPtr cRows, + [Out] out IntPtr pcRowsObtained, + [In] ref IntPtr pprghRows); + + /*HRESULT ReleaseRows( + [in] DBCOUNTITEM cRows, + [in, size_is(cRows)] const HROW rghRows[], + [in, size_is(cRows)] DBROWOPTIONS rgRowOptions[], + [out, size_is(cRows)] DBREFCOUNT rgRefCounts[], + [out, size_is(cRows)] DBROWSTATUS rgRowStatus[] + );*/ + [PreserveSig] + System.Data.OleDb.OleDbHResult ReleaseRows( + [In] IntPtr cRows, + [In] SafeHandle rghRows, + [In/*, MarshalAs(UnmanagedType.LPArray)*/] IntPtr/*int[]*/ rgRowOptions, + [In/*, Out, MarshalAs(UnmanagedType.LPArray)*/] IntPtr/*int[]*/ rgRefCounts, + [In/*, Out, MarshalAs(UnmanagedType.LPArray)*/] IntPtr/*int[]*/ rgRowStatus); + + [Obsolete("not used", true)] void RestartPosition(/*deleted parameter signature*/); + } + + [Guid("0C733A55-2A1C-11CE-ADE5-00AA0044773D"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown), ComImport, SuppressUnmanagedCodeSecurity] + internal interface IRowsetInfo + { + /*[local] + HRESULT GetProperties( + [in] const ULONG cPropertyIDSets, + [in, size_is(cPropertyIDSets)] const DBPROPIDSET rgPropertyIDSets[], + [in, out] ULONG * pcPropertySets, + [out, size_is(,*pcPropertySets)] DBPROPSET ** prgPropertySets + );*/ + [PreserveSig] + System.Data.OleDb.OleDbHResult GetProperties( + [In] int cPropertyIDSets, + [In] SafeHandle rgPropertyIDSets, + [Out] out int pcPropertySets, + [Out] out IntPtr prgPropertySets); + + [PreserveSig] + System.Data.OleDb.OleDbHResult GetReferencedRowset( + [In] IntPtr iOrdinal, + [In] ref Guid riid, + [Out, MarshalAs(UnmanagedType.Interface)] out IRowset ppRowset); + + //[PreserveSig] + //int GetSpecification(/*deleted parameter signature*/); + } + + [Guid("0C733A74-2A1C-11CE-ADE5-00AA0044773D"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown), ComImport, SuppressUnmanagedCodeSecurity] + internal interface ISQLErrorInfo + { + [return: MarshalAs(UnmanagedType.I4)] + Int32 GetSQLInfo( + [Out, MarshalAs(UnmanagedType.BStr)] out String pbstrSQLState); + } + + [Guid("0C733A5F-2A1C-11CE-ADE5-00AA0044773D"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown), ComImport, SuppressUnmanagedCodeSecurity] + internal interface ITransactionLocal + { + [Obsolete("not used", true)] void Commit(/*deleted parameter signature*/); + + [Obsolete("not used", true)] void Abort(/*deleted parameter signature*/); + + [Obsolete("not used", true)] void GetTransactionInfo(/*deleted parameter signature*/); + + [Obsolete("not used", true)] void GetOptionsObject(/*deleted parameter signature*/); + + [PreserveSig] + System.Data.OleDb.OleDbHResult StartTransaction( + [In] int isoLevel, + [In] int isoFlags, + [In] IntPtr pOtherOptions, + [Out] out int pulTransactionLevel); + } + + // we wrap the vtable entry which is just a function pointer as a delegate + // since code (unlike data) doesn't move around within the process, it is safe to cache the delegate + + // we do not expect native to change its vtable entry at run-time (especially since these are free-threaded objects) + // however to be extra safe double check the function pointer is the same as the cached delegate + // whenever we encounter a new instance of the data + + // dangerous delegate around IUnknown::QueryInterface (0th vtable entry) + [SuppressUnmanagedCodeSecurity()] + internal delegate int IUnknownQueryInterface( + IntPtr pThis, + ref Guid riid, + ref IntPtr ppInterface); + + // dangerous delegate around IDataInitialize::GetDataSource (4th vtable entry) + [SuppressUnmanagedCodeSecurity()] + internal delegate System.Data.OleDb.OleDbHResult IDataInitializeGetDataSource( + IntPtr pThis, // first parameter is always the 'this' value, must use use result from QI + IntPtr pUnkOuter, + int dwClsCtx, + [MarshalAs(UnmanagedType.LPWStr)] string pwszInitializationString, + ref Guid riid, + ref System.Data.OleDb.DataSourceWrapper ppDataSource); + + // dangerous wrapper around IDBInitialize::Initialize (4th vtable entry) + [SuppressUnmanagedCodeSecurity()] + internal delegate System.Data.OleDb.OleDbHResult IDBInitializeInitialize( + IntPtr pThis); // first parameter is always the 'this' value, must use use result from QI + + // dangerous wrapper around IDBCreateSession::CreateSession (4th vtable entry) + [SuppressUnmanagedCodeSecurity()] + internal delegate System.Data.OleDb.OleDbHResult IDBCreateSessionCreateSession( + IntPtr pThis, // first parameter is always the 'this' value, must use use result from QI + IntPtr pUnkOuter, + ref Guid riid, + ref System.Data.OleDb.SessionWrapper ppDBSession); + + // dangerous wrapper around IDBCreateCommand::CreateCommand (4th vtable entry) + [SuppressUnmanagedCodeSecurity()] + internal delegate System.Data.OleDb.OleDbHResult IDBCreateCommandCreateCommand( + IntPtr pThis, // first parameter is always the 'this' value, must use use result from QI + IntPtr pUnkOuter, + ref Guid riid, + [MarshalAs(UnmanagedType.Interface)] ref object ppCommand); + + // + // Advapi32.dll Integrated security functions + // + + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)] + internal struct Trustee + { + internal IntPtr _pMultipleTrustee; // PTRUSTEE + internal int _MultipleTrusteeOperation; // MULTIPLE_TRUSTEE_OPERATION + internal int _TrusteeForm; // TRUSTEE_FORM + internal int _TrusteeType; // TRUSTEE_TYPE + [MarshalAs(UnmanagedType.LPTStr)] + internal string _name; + + internal Trustee(string name) + { + _pMultipleTrustee = IntPtr.Zero; + _MultipleTrusteeOperation = 0; // NO_MULTIPLE_TRUSTEE + _TrusteeForm = 1; // TRUSTEE_IS_NAME + _TrusteeType = 1; // TRUSTEE_IS_USER + _name = name; + } + } + + [DllImport(Interop.Libraries.Advapi32, EntryPoint = "CreateWellKnownSid", SetLastError = true, CharSet = CharSet.Unicode)] + static internal extern int CreateWellKnownSid( + int sidType, + byte[] domainSid, + [Out] byte[] resultSid, + ref uint resultSidLength); + } +} diff --git a/src/System.Data.OleDb/tests/Configurations.props b/src/System.Data.OleDb/tests/Configurations.props new file mode 100644 index 000000000000..d2b1d4d5d861 --- /dev/null +++ b/src/System.Data.OleDb/tests/Configurations.props @@ -0,0 +1,8 @@ + + + + netcoreapp-Windows_NT; + netfx-Windows_NT; + + + diff --git a/src/System.Data.OleDb/tests/Helpers.cs b/src/System.Data.OleDb/tests/Helpers.cs new file mode 100644 index 000000000000..ffea07a80775 --- /dev/null +++ b/src/System.Data.OleDb/tests/Helpers.cs @@ -0,0 +1,42 @@ +// Licensed to the .NET Foundation under one or more agreements. +// See the LICENSE file in the project root for more information. + +using System; +using System.Collections.Generic; +using System.Runtime.InteropServices; + +namespace System.Data.OleDb.Tests +{ + public static class Helpers + { + public const string IsDriverAvailable = nameof(Helpers) + "." + nameof(GetIsDriverAvailable); + public static bool GetIsDriverAvailable() => Nested.IsAvailable; + public static string ProviderName => Nested.ProviderName; + public static string GetTableName(string memberName) => memberName + ".csv"; + + private class Nested + { + public static readonly bool IsAvailable; + public static readonly string ProviderName; + public static Nested Instance => s_instance; + private static readonly Nested s_instance = new Nested(); + private Nested() { } + static Nested() + { + // Get the sources rowset for the SQLOLEDB enumerator + DataTable table = (new OleDbEnumerator()).GetElements(); + DataColumn providersRegistered = table.Columns["SOURCES_NAME"]; + List providerNames = new List(); + foreach (DataRow row in table.Rows) + { + providerNames.Add(row[providersRegistered]); + } + string providerName = PlatformDetection.Is32BitProcess ? + @"Microsoft.Jet.OLEDB.4.0" : + @"Microsoft.ACE.OLEDB.12.0"; + IsAvailable = providerNames.Contains(providerName); + ProviderName = IsAvailable ? providerName : null; + } + } + } +} diff --git a/src/System.Data.OleDb/tests/OleDbCommandBuilderTests.cs b/src/System.Data.OleDb/tests/OleDbCommandBuilderTests.cs new file mode 100644 index 000000000000..90cd02179de6 --- /dev/null +++ b/src/System.Data.OleDb/tests/OleDbCommandBuilderTests.cs @@ -0,0 +1,161 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using Xunit; +using System.Collections.Generic; +using System.Data.OleDb; +using System.IO; +using System.Runtime.CompilerServices; +using System.Text.RegularExpressions; +using System.Transactions; + +namespace System.Data.OleDb.Tests +{ + public class OleDbCommandBuilderTests : OleDbTestBase + { + [ConditionalFact(Helpers.IsDriverAvailable)] + public void DeriveParameters_NullCommand_Throws() + { + Assert.Throws(() => OleDbCommandBuilder.DeriveParameters(null)); + } + + [ConditionalTheory(Helpers.IsDriverAvailable)] + [InlineData(CommandType.Text)] + [InlineData(CommandType.TableDirect)] + public void DeriveParameters_NullCommand_Throws(CommandType commandType) + { + using (var cmd = (OleDbCommand)OleDbFactory.Instance.CreateCommand()) + { + cmd.CommandType = commandType; + var exception = Record.Exception(() => OleDbCommandBuilder.DeriveParameters(cmd)); + Assert.NotNull(exception); + Assert.IsType(exception); + Assert.Equal( + string.Format("{0} DeriveParameters only supports CommandType.StoredProcedure, not CommandType.{1}.", nameof(OleDbCommand), cmd.CommandType.ToString()), + exception.Message); + } + } + + [ConditionalFact(Helpers.IsDriverAvailable)] + public void DeriveParameters_NulllCommandText_Throws() + { + using (var cmd = (OleDbCommand)OleDbFactory.Instance.CreateCommand()) + { + cmd.CommandType = CommandType.StoredProcedure; + cmd.CommandText = null; + var exception = Record.Exception(() => OleDbCommandBuilder.DeriveParameters(cmd)); + Assert.NotNull(exception); + Assert.IsType(exception); + Assert.Equal( + string.Format("{0}: {1} property has not been initialized", nameof(OleDbCommandBuilder.DeriveParameters), nameof(cmd.CommandText)), + exception.Message); + } + } + + [OuterLoop] + [ConditionalFact(Helpers.IsDriverAvailable)] + public void DeriveParameters_NullConnection_Throws() + { + RunTest((command, tableName) => { + using (var cmd = (OleDbCommand)OleDbFactory.Instance.CreateCommand()) + { + cmd.CommandType = CommandType.StoredProcedure; + cmd.CommandText = @"SELECT * FROM " + tableName; + cmd.Connection = null; + var exception = Record.Exception(() => OleDbCommandBuilder.DeriveParameters(cmd)); + Assert.NotNull(exception); + Assert.IsType(exception); + Assert.Equal( + string.Format("{0}: {1} property has not been initialized.", nameof(OleDbCommandBuilder.DeriveParameters), nameof(cmd.Connection)), + exception.Message); + } + }); + } + + [OuterLoop] + [ConditionalFact(Helpers.IsDriverAvailable)] + public void DeriveParameters_ClosedConnection_Throws() + { + RunTest((command, tableName) => { + using (var cmd = (OleDbCommand)OleDbFactory.Instance.CreateCommand()) + { + cmd.CommandType = CommandType.StoredProcedure; + cmd.CommandText = @"SELECT * FROM " + tableName; + cmd.Connection = (OleDbConnection)OleDbFactory.Instance.CreateConnection(); + cmd.Connection.Close(); + var exception = Record.Exception(() => OleDbCommandBuilder.DeriveParameters(cmd)); + Assert.NotNull(exception); + Assert.IsType(exception); + Assert.Contains( + string.Format("{0} requires an open and available Connection.", nameof(OleDbCommandBuilder.DeriveParameters)), + exception.Message); + } + }); + } + + [OuterLoop] + [ConditionalFact(Helpers.IsDriverAvailable)] + public void UnquoteIdentifier_Null_Throws() + { + RunTest((command, tableName) => { + using (var cmd = (OleDbCommand)OleDbFactory.Instance.CreateCommand()) + { + cmd.CommandType = CommandType.StoredProcedure; + cmd.CommandText = @"SELECT * FROM " + tableName; + cmd.Connection = (OleDbConnection)OleDbFactory.Instance.CreateConnection(); + cmd.Transaction = transaction; + var builder = (OleDbCommandBuilder)OleDbFactory.Instance.CreateCommandBuilder(); + Assert.Throws(() => builder.UnquoteIdentifier(null, cmd.Connection)); + } + }); + } + + [OuterLoop] + [ConditionalFact(Helpers.IsDriverAvailable)] + public void Ctor_Defaults() + { + RunTest((command, tableName) => { + using (var cmd = (OleDbCommand)OleDbFactory.Instance.CreateCommand()) + { + cmd.CommandType = CommandType.StoredProcedure; + cmd.CommandText = @"SELECT * FROM " + tableName; + cmd.Connection = (OleDbConnection)OleDbFactory.Instance.CreateConnection(); + cmd.Connection.ConnectionString = connection.ConnectionString; + cmd.Transaction = transaction; + + DataSet ds = new DataSet(); + OleDbDataAdapter adapter = new OleDbDataAdapter(cmd); + OleDbCommandBuilder commandBuilder = new OleDbCommandBuilder(adapter); + Assert.Equal(adapter, commandBuilder.DataAdapter); + } + }); + } + + private void RunTest(Action testAction, [CallerMemberName] string memberName = null) + { + string tableName = Helpers.GetTableName(memberName); + Assert.False(File.Exists(Path.Combine(TestDirectory, tableName))); + command.CommandText = + @"CREATE TABLE " + tableName + @" ( + Firstname NVARCHAR(5), + Lastname NVARCHAR(40), + Nickname NVARCHAR(30))"; + command.ExecuteNonQuery(); + Assert.True(File.Exists(Path.Combine(TestDirectory, tableName))); + + command.CommandText = + @"INSERT INTO " + tableName + @" ( + Firstname, + Lastname, + Nickname) + VALUES ( 'Foo', 'Bar', 'John' );"; + command.ExecuteNonQuery(); + + testAction(command, tableName); + + command.CommandText = @"DROP TABLE " + tableName; + command.ExecuteNonQuery(); + } + } +} \ No newline at end of file diff --git a/src/System.Data.OleDb/tests/OleDbCommandTests.cs b/src/System.Data.OleDb/tests/OleDbCommandTests.cs new file mode 100644 index 000000000000..282c9352c819 --- /dev/null +++ b/src/System.Data.OleDb/tests/OleDbCommandTests.cs @@ -0,0 +1,72 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using Xunit; +using System.Collections.Generic; +using System.Data.OleDb; +using System.IO; +using System.Runtime.CompilerServices; +using System.Text.RegularExpressions; + +namespace System.Data.OleDb.Tests +{ + public class OleDbCommandTests : OleDbTestBase + { + [OuterLoop] + [ConditionalFact(Helpers.IsDriverAvailable)] + public void CommandType_InvalidType_Throws() + { + RunTest((command, tableName) => { + using (var innerCommand = new OleDbCommand(cmdText: @"SELECT * FROM " + tableName)) + { + Assert.Throws(() => innerCommand.CommandType = (CommandType)0); + } + }); + } + + [OuterLoop] + [ConditionalFact(Helpers.IsDriverAvailable)] + public void ExecuteScalar_Select_ComputesSumAndCount() + { + RunTest((command, tableName) => { + command.CommandText = @"SELECT Count(*) FROM " + tableName; + Assert.Equal(2, Convert.ToInt32(command.ExecuteScalar())); + + command.CommandText = @"SELECT Sum(NumPlants) FROM " + tableName; + Assert.Equal(13, Convert.ToInt32(command.ExecuteScalar())); + }); + } + + private void RunTest(Action testAction, [CallerMemberName] string memberName = null) + { + string tableName = Helpers.GetTableName(memberName); + Assert.False(File.Exists(Path.Combine(TestDirectory, tableName))); + command.CommandText = + @"CREATE TABLE " + tableName + @" ( + Firstname NVARCHAR(5), + NumPlants INT)"; + command.ExecuteNonQuery(); + Assert.True(File.Exists(Path.Combine(TestDirectory, tableName))); + + command.CommandText = + @"INSERT INTO " + tableName + @" ( + Firstname, + NumPlants) + VALUES ( 'John', 7 );"; + command.ExecuteNonQuery(); + + command.CommandText = + @"INSERT INTO " + tableName + @" ( + Firstname, + NumPlants) + VALUES ( 'Sam', 6 );"; + command.ExecuteNonQuery(); + + testAction(command, tableName); + + command.CommandText = @"DROP TABLE " + tableName; + command.ExecuteNonQuery(); + } + } +} \ No newline at end of file diff --git a/src/System.Data.OleDb/tests/OleDbConnectionTests.cs b/src/System.Data.OleDb/tests/OleDbConnectionTests.cs new file mode 100644 index 000000000000..ed52272f7d70 --- /dev/null +++ b/src/System.Data.OleDb/tests/OleDbConnectionTests.cs @@ -0,0 +1,305 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using Xunit; +using System.Collections.Generic; +using System.Data.Common; +using System.Data.OleDb; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; + +namespace System.Data.OleDb.Tests +{ + public class OleDbConnectionTests : OleDbTestBase + { + [ConditionalFact(Helpers.IsDriverAvailable)] + public void Ctor_ConnectionStringMissingProvider_Throws() + { + Assert.Throws(() => new OleDbConnection("Reason=missingProvider")); + } + + [ConditionalFact(Helpers.IsDriverAvailable)] + public void Ctor_LongProvider_Throws() + { + Assert.Throws(() => new OleDbConnection("provider=" + new string('c', 256))); + } + + [ConditionalFact(Helpers.IsDriverAvailable)] + public void Ctor_MSDASQLNotSupported_Throws() + { + Assert.Throws(() => new OleDbConnection("provider=MSDASQL")); + } + + [ConditionalFact(Helpers.IsDriverAvailable)] + public void Ctor_MissingUdlFile_Throws() + { + Assert.Throws(() => new OleDbConnection(@"file name = missing-file.udl")); + } + + [ConditionalFact(Helpers.IsDriverAvailable)] + public void Ctor_AsynchronousNotSupported_Throws() + { + Assert.Throws(() => + new OleDbConnection(ConnectionString + ";asynchronous processing=true")); + } + + [ConditionalFact(Helpers.IsDriverAvailable)] + public void Ctor_InvalidConnectTimeout_Throws() + { + Assert.Throws(() => + new OleDbConnection(ConnectionString + ";connect timeout=-2")); + } + + [ConditionalFact(Helpers.IsDriverAvailable)] + public void Open_NoConnectionString_Throws() + { + using (var innerConnection = (OleDbConnection)OleDbFactory.Instance.CreateConnection()) + { + innerConnection.ConnectionString = null; + Assert.Throws(() => innerConnection.Open()); + } + } + + [ConditionalFact(Helpers.IsDriverAvailable)] + public void BeginTransaction_IsolationLevelIsUnspecified_SetsReadCommitted() + { + using (var oleDbConnection = new OleDbConnection(ConnectionString)) + { + oleDbConnection.Open(); + using (OleDbTransaction transaction = oleDbConnection.BeginTransaction()) + { + Assert.Equal(IsolationLevel.ReadCommitted, transaction.IsolationLevel); + } + using (OleDbTransaction transaction = oleDbConnection.BeginTransaction(IsolationLevel.Unspecified)) + { + Assert.Equal(IsolationLevel.ReadCommitted, transaction.IsolationLevel); + } + } + } + + [ConditionalTheory(Helpers.IsDriverAvailable)] + [MemberData(nameof(IsolationLevelsExceptUnspecified))] + public void BeginTransaction_SpecificIsolationLevel_Success(IsolationLevel isolationLevel) + { + using (var oleDbConnection = new OleDbConnection(ConnectionString)) + { + oleDbConnection.Open(); + using (OleDbTransaction transaction = oleDbConnection.BeginTransaction(isolationLevel)) + { + Assert.Equal(isolationLevel, transaction.IsolationLevel); + } + } + } + + [ConditionalFact(Helpers.IsDriverAvailable)] + public void BeginTransaction_InvalidIsolationLevel_Throws() + { + using (var oleDbConnection = new OleDbConnection(ConnectionString)) + { + oleDbConnection.Open(); + Assert.Throws(() => oleDbConnection.BeginTransaction((IsolationLevel)0)); + } + } + + [ConditionalFact(Helpers.IsDriverAvailable)] + public void Provider_SetProperlyFromCtor() + { + using (var oleDbConnection = new OleDbConnection(ConnectionString)) + { + oleDbConnection.Open(); + Assert.Equal(Helpers.ProviderName, oleDbConnection.Provider); + } + } + + [ConditionalFact(Helpers.IsDriverAvailable)] + public void GetSchema() + { + using (var oleDbConnection = new OleDbConnection(ConnectionString)) + { + oleDbConnection.Open(); + + DataTable metaDataCollections = oleDbConnection.GetSchema(DbMetaDataCollectionNames.MetaDataCollections); + Assert.True(metaDataCollections != null && metaDataCollections.Rows.Count > 0); + + DataTable metaDataSourceInfo = oleDbConnection.GetSchema(DbMetaDataCollectionNames.DataSourceInformation); + Assert.True(metaDataSourceInfo != null && metaDataSourceInfo.Rows.Count > 0); + + DataTable metaDataTypes = oleDbConnection.GetSchema(DbMetaDataCollectionNames.DataTypes); + Assert.True(metaDataTypes != null && metaDataTypes.Rows.Count > 0); + + DataTable schema = oleDbConnection.GetSchema(); + Assert.True(schema != null && schema.Rows.Count > 0); + + Assert.Throws( + () => oleDbConnection.GetSchema(DbMetaDataCollectionNames.MetaDataCollections, new string[] { new string('a', 5000) } )); + } + } + + [ConditionalFact(Helpers.IsDriverAvailable)] + public void ChangeDatabase_EmptyDatabase_Throws() + { + using (var oleDbConnection = new OleDbConnection(ConnectionString)) + { + oleDbConnection.Open(); + Assert.Throws(() => oleDbConnection.ChangeDatabase(string.Empty)); + } + } + + [ConditionalTheory(Helpers.IsDriverAvailable)] + [MemberData(nameof(ManufacturedOleDbSchemaGuids))] + public void GetOleDbSchemaTable_NoRestrictions_Success(Guid oleDbSchemaGuid) + { + DataTable oleDbSchemaTable = null; + using (var oleDbConnection = new OleDbConnection(ConnectionString)) + { + oleDbConnection.Open(); + oleDbSchemaTable = oleDbConnection.GetOleDbSchemaTable(oleDbSchemaGuid, restrictions: null); + } + Assert.NotNull(oleDbSchemaTable); + Assert.NotNull(oleDbSchemaTable.Rows); + foreach (DataRow dataRow in oleDbSchemaTable.Rows) + { + Assert.NotNull(dataRow.ItemArray); + } + } + + [ConditionalTheory(Helpers.IsDriverAvailable)] + [MemberData(nameof(ManufacturedOleDbSchemaGuids))] + public void GetOleDbSchemaTable_SomeRestrictions_Throws(Guid oleDbSchemaGuid) + { + object[] restrictions = new object[] { null }; + using (var oleDbConnection = new OleDbConnection(ConnectionString)) + { + oleDbConnection.Open(); + Assert.Throws(() => + oleDbConnection.GetOleDbSchemaTable(oleDbSchemaGuid, restrictions)); + } + } + + public static IEnumerable ManufacturedOleDbSchemaGuids + { + get + { + yield return new object[] { OleDbSchemaGuid.DbInfoLiterals }; + yield return new object[] { OleDbSchemaGuid.SchemaGuids }; + yield return new object[] { OleDbSchemaGuid.DbInfoKeywords }; + } + } + + public static IEnumerable IsolationLevelsExceptUnspecified + { + get + { + yield return new object[] { IsolationLevel.Chaos }; + yield return new object[] { IsolationLevel.ReadUncommitted }; + yield return new object[] { IsolationLevel.ReadCommitted }; + } + } + + [ConditionalTheory(Helpers.IsDriverAvailable)] + [InlineData(0, 0)] + [InlineData(0, 1)] + [InlineData(0, 2)] + [InlineData(1, 1)] + [InlineData(1, 2)] + [InlineData(2, 1)] + [InlineData(0, 3)] + public void Ctor_InvalidUdlFile_Throws(int start, int length) + { + string udlFile = GetTestFilePath() + ".udl"; + Span lines = new string[] { + "[oledb]", + "; Everything after this line is an OLE DB initstring", + ConnectionString }.AsSpan(); + File.WriteAllLines(udlFile, lines.Slice(start, length).ToArray()); + + var exception = Record.Exception(() => new OleDbConnection(@"file name = " + udlFile)); + Assert.NotNull(exception); + Assert.IsType(exception); + Assert.Equal( + "Invalid UDL file.", + exception.Message); + } + + [ConditionalFact(Helpers.IsDriverAvailable)] + public void Ctor_ValidUdlFile_Success() + { + string udlFile = GetTestFilePath() + ".udl"; + File.WriteAllLines(udlFile, new string[] { + "[oledb]", + "; Everything after this line is an OLE DB initstring", + ConnectionString + }, System.Text.Encoding.Unicode); + var oleDbConnection = new OleDbConnection(@"file name = " + udlFile); + Assert.NotNull(oleDbConnection); + oleDbConnection.Open(); + Assert.Equal(Helpers.ProviderName, oleDbConnection.Provider); + oleDbConnection.Dispose(); + } + + [ConditionalFact(Helpers.IsDriverAvailable)] + public void OleDbConnectionStringBuilder_Success() + { + var connectionStringBuilder = (OleDbConnectionStringBuilder)OleDbFactory.Instance.CreateConnectionStringBuilder(); + Assert.Empty(connectionStringBuilder.Provider); + Assert.True(connectionStringBuilder.ContainsKey("Provider")); + Assert.Empty((string)connectionStringBuilder["Provider"]); + + Assert.False(connectionStringBuilder.ContainsKey("MissingKey")); + Assert.False(connectionStringBuilder.TryGetValue("MissingKey", out var value)); + + // Default values + Assert.Equal(-13, connectionStringBuilder.OleDbServices); + Assert.False(connectionStringBuilder.PersistSecurityInfo); + + connectionStringBuilder = new OleDbConnectionStringBuilder(ConnectionString); + Assert.Equal(Helpers.ProviderName, connectionStringBuilder.Provider); + Assert.Equal(TestDirectory, connectionStringBuilder.DataSource); + + string udlFile = GetTestFilePath() + ".udl"; + connectionStringBuilder = new OleDbConnectionStringBuilder(@"file name = " + udlFile); + Assert.Equal(udlFile, connectionStringBuilder.FileName); + + connectionStringBuilder = new OleDbConnectionStringBuilder(); + connectionStringBuilder.Provider = "myProvider"; + connectionStringBuilder.DataSource = "myServer"; + connectionStringBuilder.FileName = "myAccessFile.mdb"; + connectionStringBuilder.PersistSecurityInfo = true; + connectionStringBuilder.OleDbServices = 0; + + Assert.Equal(connectionStringBuilder.Provider, connectionStringBuilder["Provider"]); + Assert.Equal(connectionStringBuilder.DataSource, connectionStringBuilder["Data Source"]); + Assert.Equal(connectionStringBuilder.FileName, connectionStringBuilder["File Name"]); + Assert.Equal(connectionStringBuilder.OleDbServices, connectionStringBuilder["OLE DB Services"]); + Assert.Equal(connectionStringBuilder.PersistSecurityInfo, connectionStringBuilder["Persist Security Info"]); + + connectionStringBuilder["CustomKey"] = "CustomValue"; + string connectionString = connectionStringBuilder.ToString(); + + Assert.Contains(@"Provider=" + connectionStringBuilder.Provider, connectionString); + Assert.Contains(@"Data Source=" + connectionStringBuilder.DataSource, connectionString); + Assert.Contains(@"File Name=" + connectionStringBuilder.FileName, connectionString); + Assert.Contains(@"OLE DB Services=" + connectionStringBuilder.OleDbServices, connectionString); + Assert.Contains(@"Persist Security Info=" + connectionStringBuilder.PersistSecurityInfo, connectionString); + Assert.Contains(@"CustomKey=" + connectionStringBuilder["CustomKey"], connectionString); + + connectionStringBuilder["OLE DB Services"] = 3; + Assert.Contains(@"OLE DB Services=" + 3, connectionStringBuilder.ToString()); + connectionStringBuilder["Persist Security Info"] = false; + Assert.Contains(@"Persist Security Info=" + false, connectionStringBuilder.ToString()); + + connectionStringBuilder["Provider"] = string.Empty; + Assert.Contains(@"Provider=;", connectionStringBuilder.ToString()); + Assert.Equal(string.Empty, connectionStringBuilder["Provider"]); + + Assert.Throws(() => connectionStringBuilder.Remove(null)); + Assert.False(connectionStringBuilder.Remove("NonExistentKey")); + Assert.True(connectionStringBuilder.Remove("File Name")); + Assert.Empty(connectionStringBuilder.FileName); + Assert.True(connectionStringBuilder.Remove("Provider")); + Assert.Empty(connectionStringBuilder.Provider); + } + } +} \ No newline at end of file diff --git a/src/System.Data.OleDb/tests/OleDbDataAdapterTests.cs b/src/System.Data.OleDb/tests/OleDbDataAdapterTests.cs new file mode 100644 index 000000000000..bbd2fb45e4dd --- /dev/null +++ b/src/System.Data.OleDb/tests/OleDbDataAdapterTests.cs @@ -0,0 +1,184 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using Xunit; +using System.Collections.Generic; +using System.Data.OleDb; +using System.IO; +using System.Runtime.CompilerServices; +using System.Text.RegularExpressions; +using System.Transactions; + +namespace System.Data.OleDb.Tests +{ + public class OleDbDataAdapterTests : OleDbTestBase + { + [ConditionalFact(Helpers.IsDriverAvailable)] + public void Fill_NullDataTable_Throws() + { + var adapter = (OleDbDataAdapter)OleDbFactory.Instance.CreateDataAdapter(); + Assert.Throws(() => adapter.Fill(null, new object())); + } + + [OuterLoop] + [ConditionalFact(Helpers.IsDriverAvailable)] + public void Fill_NoSelectCommand_Throws() + { + RunTest((command, tableName) => { + var adapter = new OleDbDataAdapter(); + Assert.Throws(() => adapter.Fill(new DataSet())); + }); + } + + [OuterLoop] + [ConditionalFact(Helpers.IsDriverAvailable)] + public void DefaultCommandValues() + { + RunTest((command, tableName) => { + string commandText = @"SELECT * FROM " + tableName; + var dataTable = new DataTable(); + var adapter = new OleDbDataAdapter(commandText, connection); + Assert.Null(adapter.InsertCommand); + Assert.Null(adapter.UpdateCommand); + Assert.Null(adapter.DeleteCommand); + Assert.NotNull(adapter.SelectCommand); + Assert.Equal(commandText, adapter.SelectCommand.CommandText); + + adapter.SelectCommand.Dispose(); + }); + } + + [OuterLoop] + [ConditionalFact(Helpers.IsDriverAvailable)] + public void Fill_Select_Success() + { + RunTest((command, tableName) => { + OleDbDataAdapter adapter = new OleDbDataAdapter(@"SELECT * FROM " + tableName, ConnectionString); + + DataSet ds = new DataSet(); + adapter.Fill(ds); + Assert.Equal(1, ds.Tables.Count); + Assert.Equal(1, ds.Tables[0].Rows.Count); + + string[] expectedValues = { "Foo", "Bar", "John" }; + for (int i = 0; i < expectedValues.Length; i++) + { + Assert.Equal(expectedValues[i], ds.Tables[0].Rows[0][i]); + } + }); + } + + [OuterLoop] + [ConditionalFact(Helpers.IsDriverAvailable)] + public void Fill_Select_NullDataTable_Throws() + { + RunTest((command, tableName) => { + var adapter = new OleDbDataAdapter(@"SELECT * FROM " + tableName, connection); + + Assert.Throws(() => adapter.Fill(null)); + Assert.Throws(() => adapter.Fill(new DataTable(), null)); + Assert.Throws(() => adapter.Fill(null, null, null)); + Assert.Throws(() => adapter.Fill(new DataSet(), null, null)); + + adapter.SelectCommand.Dispose(); + }); + } + + [OuterLoop] + [ConditionalFact(Helpers.IsDriverAvailable)] + public void Update_Success() + { + RunTest((command, tableName) => { + var dataTable = new DataTable(); + var adapter = new OleDbDataAdapter(); + + adapter.SelectCommand = new OleDbCommand(@"SELECT * FROM " + tableName + @" WHERE Nickname = @Nickname", connection); + var selectParam = new OleDbParameter("@Nickname", OleDbType.VarWChar, 30, ParameterDirection.Input, true, 0, 0, "Nickname", DataRowVersion.Current, "John"); + adapter.SelectCommand.Parameters.Add(selectParam); + adapter.SelectCommand.Transaction = transaction; + + adapter.UpdateCommand = new OleDbCommand(@"UPDATE " + tableName + @" SET Nickname = @Nickname WHERE Firstname = @Firstname", connection); + OleDbParameter[] parameters = new OleDbParameter[] { + new OleDbParameter("@Nickname", OleDbType.WChar, 30, ParameterDirection.Input, true, 0, 0, "Nickname", DataRowVersion.Current, null), + new OleDbParameter("@Firstname", OleDbType.WChar, 5, ParameterDirection.Input, false, 0, 0, "Firstname", DataRowVersion.Current, null) + }; + adapter.UpdateCommand.Parameters.AddRange(parameters); + adapter.UpdateCommand.Transaction = transaction; + + adapter.Fill(dataTable); + object titleData = dataTable.Rows[0]["Nickname"]; + Assert.Equal("John", (string)titleData); + + titleData = "Sam"; + adapter.Update(dataTable); + adapter.Fill(dataTable); + Assert.Equal("Sam", (string)titleData); + + titleData = "John"; + adapter.Update(dataTable); + + adapter.SelectCommand.Dispose(); + adapter.UpdateCommand.Dispose(); + }); + } + + [OuterLoop] + [ConditionalFact(Helpers.IsDriverAvailable)] + public void Fill_OpenDataReader_Throws() + { + RunTest((command, tableName) => { + command.CommandText = @"SELECT * FROM " + tableName; + Action FillShouldThrow = (shouldFail) => { + DataSet ds = new DataSet(); + OleDbDataAdapter adapter = new OleDbDataAdapter(command); + var exception = Record.Exception(() => adapter.Fill(ds, tableName)); + if (shouldFail) + { + Assert.NotNull(exception); + Assert.IsType(exception); + Assert.Equal( + "There is already an open DataReader associated with this Command which must be closed first.", + exception.Message); + } + else + { + Assert.Null(exception); + } + }; + using (var reader = command.ExecuteReader()) + { + FillShouldThrow(true); + } + using (var reader = command.ExecuteReader()) { } + FillShouldThrow(false); + }); + } + + private void RunTest(Action testAction, [CallerMemberName] string memberName = null) + { + string tableName = Helpers.GetTableName(memberName); + Assert.False(File.Exists(Path.Combine(TestDirectory, tableName))); + command.CommandText = + @"CREATE TABLE " + tableName + @" ( + Firstname NVARCHAR(5), + Lastname NVARCHAR(40), + Nickname NVARCHAR(30))"; + command.ExecuteNonQuery(); + Assert.True(File.Exists(Path.Combine(TestDirectory, tableName))); + + command.CommandText = + @"INSERT INTO " + tableName + @" ( + Firstname, + Lastname, + Nickname) + VALUES ( 'Foo', 'Bar', 'John' );"; + command.ExecuteNonQuery(); + + testAction(command, tableName); + + command.CommandText = @"DROP TABLE " + tableName; + command.ExecuteNonQuery(); + } + } +} \ No newline at end of file diff --git a/src/System.Data.OleDb/tests/OleDbDataReaderTests.cs b/src/System.Data.OleDb/tests/OleDbDataReaderTests.cs new file mode 100644 index 000000000000..e73f994f3954 --- /dev/null +++ b/src/System.Data.OleDb/tests/OleDbDataReaderTests.cs @@ -0,0 +1,302 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using Xunit; +using System.Collections.Generic; +using System.Data.OleDb; +using System.IO; +using System.Runtime.CompilerServices; +using System.Text.RegularExpressions; + +namespace System.Data.OleDb.Tests +{ + public class OleDbDataReaderTests : OleDbTestBase + { + [ConditionalFact(Helpers.IsDriverAvailable)] + public void ExecuteNonQuery_TableNameWithoutCsvExtension_Throws() + { + command.CommandText = + @"CREATE TABLE TableNameWithoutCsvExtension ( + SomeInt32 INT, + SomeString NVARCHAR(100))"; + Assert.Throws(() => command.ExecuteNonQuery()); + } + + [OuterLoop] + [ConditionalFact(Helpers.IsDriverAvailable)] + public void InvalidRowIndex() + { + RunTest((reader) => { + reader.Read(); + Assert.True(reader.HasRows); + DataTable schema = reader.GetSchemaTable(); + Assert.Equal(4, schema.Rows.Count); + var exception = Record.Exception(() => reader.GetString(5)); + Assert.NotNull(exception); + Assert.IsType(exception); + Assert.Equal( + "Index was outside the bounds of the array.", + exception.Message); + }); + } + + [OuterLoop] + [ConditionalFact(Helpers.IsDriverAvailable)] + public void NonExistentColumn() + { + RunTest((reader) => { + reader.Read(); + Assert.True(reader.HasRows); + var exception = Record.Exception(() => reader["NonExistentColumn"]); + Assert.NotNull(exception); + Assert.IsType(exception); + Assert.Equal( + "NonExistentColumn", + exception.Message); + }); + } + + [OuterLoop] + [ConditionalFact(Helpers.IsDriverAvailable)] + public void GetValues() + { + RunTest((reader) => { + reader.Read(); + var values = new object[reader.FieldCount]; + reader.GetValues(values); + Assert.Equal(123, values[0]); + Assert.Equal("XYZ", values[1]); + Assert.Equal(42.2, values[2]); + Assert.Equal(48.3f, values[3]); + }); + } + + [OuterLoop] + [ConditionalFact(Helpers.IsDriverAvailable)] + public void EmptyReader_SchemaOnly_EmptyReader() + { + RunTest((reader) => { + reader.Read(); + Assert.False(reader.HasRows); + var exception = Record.Exception(() => reader.GetString(1)); + Assert.NotNull(exception); + Assert.IsType(exception); + Assert.Equal( + "No data exists for the row/column.", + exception.Message); + + var values = new object[1]; + exception = Record.Exception(() => reader.GetValues(values)); + Assert.NotNull(exception); + Assert.IsType(exception); + Assert.Equal( + "No data exists for the row/column.", + exception.Message); + }, schemaOnly: true); + } + + [OuterLoop] + [ConditionalFact(Helpers.IsDriverAvailable)] + public void GetSchemaTable_SchemaOnly_GetsColumnInfo() + { + RunTest((reader) => { + DataTable schema = reader.GetSchemaTable(); + Assert.Equal(4, schema.Rows.Count); + Assert.Equal("CustomerName", schema.Rows[1].Field("ColumnName")); + Assert.Equal(typeof(string), schema.Rows[1].Field("DataType")); + Assert.Equal(40, schema.Rows[1].Field("ColumnSize")); + }, schemaOnly: true); + } + + [OuterLoop] + [ConditionalFact(Helpers.IsDriverAvailable)] + public void GetSchemaTable_ColumnName_Success() + { + RunTest((reader) => { + DataTable schema = reader.GetSchemaTable(); + Assert.Equal(4, schema.Rows.Count); + Assert.Equal("CustomerID", schema.Rows[0].Field("ColumnName")); + Assert.Equal("CustomerName", schema.Rows[1].Field("ColumnName")); + Assert.Equal("SingleAmount", schema.Rows[2].Field("ColumnName")); + Assert.Equal("RealAmount", schema.Rows[3].Field("ColumnName")); + }); + } + + [OuterLoop] + [ConditionalFact(Helpers.IsDriverAvailable)] + public void GetSchemaTable_DataType_Success() + { + RunTest((reader) => { + DataTable schema = reader.GetSchemaTable(); + Assert.Equal(4, schema.Rows.Count); + Assert.Equal(typeof(int), schema.Rows[0].Field("DataType")); + Assert.Equal(typeof(string), schema.Rows[1].Field("DataType")); + Assert.Equal(typeof(double), schema.Rows[2].Field("DataType")); + Assert.Equal(typeof(float), schema.Rows[3].Field("DataType")); + }); + } + + [OuterLoop] + [ConditionalFact(Helpers.IsDriverAvailable)] + public void Read_GetInt32_Success() + { + RunTest((reader) => { + Assert.True(reader.HasRows); + reader.Read(); + Assert.Throws(() => reader.GetInt16(0)); + Assert.Equal(123, reader.GetInt32(0)); + Assert.Throws(() => reader.GetInt64(0)); + }); + } + + [OuterLoop] + [ConditionalFact(Helpers.IsDriverAvailable)] + public void Read_GetString_Success() + { + RunTest((reader) => { + Assert.True(reader.HasRows); + reader.Read(); + Assert.Equal("XYZ", reader.GetString(1)); + }); + } + + [OuterLoop] + [ConditionalFact(Helpers.IsDriverAvailable)] + public void Read_GetDouble_Success() + { + RunTest((reader) => { + Assert.True(reader.HasRows); + reader.Read(); + Assert.Equal(42.2, reader.GetDouble(2)); + Assert.Throws(() => reader.GetDouble(3)); + }); + } + + [OuterLoop] + [ConditionalFact(Helpers.IsDriverAvailable)] + public void Read_GetFloat_Success() + { + RunTest((reader) => { + Assert.True(reader.HasRows); + reader.Read(); + Assert.Throws(() => reader.GetFloat(2)); + Assert.Equal(48.3f, reader.GetFloat(3)); + }); + } + + [OuterLoop] + [ConditionalTheory(Helpers.IsDriverAvailable)] + [InlineData(0)] + [InlineData(1)] + public void GetChar_MethodNotSupported_Throws(int ordinal) + { + RunTest((reader) => { + Assert.Throws(() => reader.GetChar(ordinal)); + }); + } + + [OuterLoop] + [ConditionalFact(Helpers.IsDriverAvailable)] + public void GetValues_Null_Throws() + { + RunTest((reader) => { + Assert.Throws(() => reader.GetValues(null)); + }); + } + + [OuterLoop] + [ConditionalFact(Helpers.IsDriverAvailable)] + public void Depth_IsClosed_Throws() + { + RunTest((reader) => { + reader.Close(); + Assert.Throws(() => reader.Depth); + }); + } + + [OuterLoop] + [ConditionalFact(Helpers.IsDriverAvailable)] + public void FieldCount_IsClosed_Throws() + { + RunTest((reader) => { + reader.Close(); + Assert.Throws(() => reader.FieldCount); + }); + } + + [OuterLoop] + [ConditionalFact(Helpers.IsDriverAvailable)] + public void VisibleFieldCount_IsClosed_Throws() + { + RunTest((reader) => { + reader.Close(); + Assert.Throws(() => reader.VisibleFieldCount); + }); + } + + [OuterLoop] + [ConditionalFact(Helpers.IsDriverAvailable)] + public void HasRows_IsClosed_Throws() + { + RunTest((reader) => { + reader.Close(); + Assert.Throws(() => reader.HasRows); + }); + } + + [OuterLoop] + [ConditionalFact(Helpers.IsDriverAvailable)] + public void GetSchemaTable_IsClosed_Throws() + { + RunTest((reader) => { + reader.Close(); + Assert.Throws(() => reader.GetSchemaTable()); + }); + } + + [ConditionalFact(Helpers.IsDriverAvailable)] + public void GetEnumerator_BadType_Throws() + { + Assert.Throws(() => OleDbEnumerator.GetEnumerator(typeof(Exception))); + } + + private void RunTest(Action testAction, bool schemaOnly = false, [CallerMemberName] string memberName = null) + { + string tableName = Helpers.GetTableName(memberName); + Assert.False(File.Exists(Path.Combine(TestDirectory, tableName))); + command.CommandText = + @"CREATE TABLE " + tableName + @" ( + CustomerID INT, + CustomerName NVARCHAR(40), + SingleAmount FLOAT, + RealAmount REAL);"; + command.ExecuteNonQuery(); + Assert.True(File.Exists(Path.Combine(TestDirectory, tableName))); + + if (!schemaOnly) + { + command.CommandText = + @"INSERT INTO " + tableName + @" ( + CustomerID, + CustomerName, + SingleAmount, + RealAmount) + VALUES ( 123, 'XYZ', @value, @realValue );"; +#pragma warning disable 612,618 + command.Parameters.Add("@value", 42.2); + command.Parameters.Add("@realValue", 48.3); +#pragma warning restore 612,618 + command.ExecuteNonQuery(); + } + + command.CommandText = "SELECT CustomerID, CustomerName, SingleAmount, RealAmount FROM " + tableName; + using (OleDbDataReader reader = schemaOnly ? command.ExecuteReader(CommandBehavior.SchemaOnly) : command.ExecuteReader()) + { + testAction(reader); + } + command.CommandText = @"DROP TABLE " + tableName; + command.ExecuteNonQuery(); + } + } +} \ No newline at end of file diff --git a/src/System.Data.OleDb/tests/OleDbParameterTests.cs b/src/System.Data.OleDb/tests/OleDbParameterTests.cs new file mode 100644 index 000000000000..76ef529e8602 --- /dev/null +++ b/src/System.Data.OleDb/tests/OleDbParameterTests.cs @@ -0,0 +1,287 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using Xunit; +using System.Collections.Generic; +using System.Data.OleDb; +using System.IO; +using System.Linq; +using System.Text.RegularExpressions; + +namespace System.Data.OleDb.Tests +{ + public class OleDbParameterTests : OleDbTestBase + { + [ConditionalFact(Helpers.IsDriverAvailable)] + public void OleDbParameterCollection_MultipleScenarios_Success() + { + OleDbParameterCollection opc = new OleDbCommand().Parameters; + + Assert.True(opc.Count == 0); + Assert.False(((Collections.IList)opc).IsReadOnly); + Assert.False(((Collections.IList)opc).IsFixedSize); + Assert.False(((Collections.IList)opc).IsSynchronized); + Assert.Throws(() => opc[0].ParameterName); + Assert.Throws(() => opc["@p1"].ParameterName); + Assert.Throws(() => opc.Add(null)); + + opc.Add((object)new OleDbParameter()); + opc.Add((object)new OleDbParameter()); + Collections.IEnumerator enm = opc.GetEnumerator(); + Assert.True(enm.MoveNext()); + Assert.Equal("Parameter1", ((OleDbParameter)enm.Current).ParameterName); + Assert.True(enm.MoveNext()); + Assert.Equal("Parameter2", ((OleDbParameter)enm.Current).ParameterName); + + opc.Add(new OleDbParameter(null, null)); + opc.Add(null, OleDbType.Integer, 0, null); + Assert.Equal("Parameter4", opc["Parameter4"].ParameterName); + + opc.Add(new OleDbParameter("Parameter5", OleDbType.LongVarWChar, 20)); + opc.Add(new OleDbParameter(null, OleDbType.WChar, 20, "a")); + + opc.RemoveAt(opc[3].ParameterName); + Assert.Equal(-1, opc.IndexOf(null)); + Assert.False(opc.Contains(null)); + Assert.Throws(() => opc.RemoveAt(null)); + + OleDbParameter p = opc[0]; + Assert.Throws(() => opc.Add((object)p)); + Assert.Throws(() => new OleDbCommand().Parameters.Add(p)); + Assert.Throws(() => opc.Remove(null)); + + string pname = p.ParameterName; + p.ParameterName = pname; + p.ParameterName = pname.ToUpper(); + p.ParameterName = pname.ToLower(); + p.ParameterName = "@p1"; + p.ParameterName = pname; + + opc.Clear(); + opc.Add(p); + + opc.Clear(); + opc.AddWithValue("@p1", null); + + Assert.Equal(-1, opc.IndexOf(p.ParameterName)); + + opc[0] = p; + Assert.Equal(0, opc.IndexOf(p.ParameterName)); + + Assert.True(opc.Contains(p.ParameterName)); + Assert.True(opc.Contains(opc[0])); + + opc[0] = p; + opc[p.ParameterName] = new OleDbParameter(p.ParameterName, null); + opc[p.ParameterName] = (OleDbParameter)OleDbFactory.Instance.CreateParameter(); + opc.RemoveAt(0); + + new OleDbCommand().Parameters.Clear(); + new OleDbCommand().Parameters.CopyTo(new object[0], 0); + Assert.False(new OleDbCommand().Parameters.GetEnumerator().MoveNext()); + + Assert.Throws(() => new OleDbCommand().Parameters.Add(0)); + Assert.Throws(() => new OleDbCommand().Parameters.AddRange(null)); + Assert.Throws(() => new OleDbCommand().Parameters.Insert(0, 0)); + Assert.Throws(() => new OleDbCommand().Parameters.Remove(0)); + + Assert.Throws(() => opc.Remove(new OleDbParameter())); + } + + [ConditionalFact(Helpers.IsDriverAvailable)] + public void IsNullable_Default_False() + { + var oleDbParameter = new OleDbParameter(); + Assert.False(oleDbParameter.IsNullable); + oleDbParameter.IsNullable = true; + Assert.True(oleDbParameter.IsNullable); + } + + [ConditionalTheory(Helpers.IsDriverAvailable)] + [MemberData(nameof(OleDbTypes))] + public void Ctor_SetOleDbType_Success(OleDbType type) + { + var oleDbParameter = new OleDbParameter(name: "ParameterName", dataType: type); + Assert.Equal(type, oleDbParameter.OleDbType); + } + + [ConditionalFact(Helpers.IsDriverAvailable)] + public void Ctor_InvalidOleDbType_Throws() + { + Assert.Throws(() => new OleDbParameter(name: "ParameterName", dataType: (OleDbType)500)); + } + + [ConditionalFact(Helpers.IsDriverAvailable)] + public void ResetOleDbType_ResetsToVarWChar() + { + var oleDbParameter = new OleDbParameter(); + Assert.Equal(OleDbType.VarWChar, oleDbParameter.OleDbType); + + oleDbParameter.OleDbType = OleDbType.Guid; + Assert.Equal(OleDbType.Guid, oleDbParameter.OleDbType); + + oleDbParameter.ResetOleDbType(); + Assert.Equal(OleDbType.VarWChar, oleDbParameter.OleDbType); + } + + [ConditionalFact(Helpers.IsDriverAvailable)] + public void ResetDbType_ResetsToVarWChar() + { + var oleDbParameter = new OleDbParameter(); + Assert.Equal(DbType.String, oleDbParameter.DbType); + + oleDbParameter.DbType = DbType.DateTime; + Assert.Equal(DbType.DateTime, oleDbParameter.DbType); + + oleDbParameter.ResetDbType(); + Assert.Equal(DbType.String, oleDbParameter.DbType); + } + + [ConditionalFact(Helpers.IsDriverAvailable)] + public void SourceColumn_Success() + { + var oleDbParameter = new OleDbParameter(default, default, default, srcColumn: null); + Assert.Equal(string.Empty, oleDbParameter.SourceColumn); + + oleDbParameter.SourceColumn = "someSourceColumn"; + Assert.Equal("someSourceColumn", oleDbParameter.SourceColumn); + } + + [ConditionalFact(Helpers.IsDriverAvailable)] + public void PrecisionAndScale_Success() + { + var oleDbParameter = new OleDbParameter(default, default, default, default, default, precision: default, scale: default, + srcColumn: default, srcVersion: DataRowVersion.Default, value: default); + Assert.Equal(default(byte), oleDbParameter.Precision); + Assert.Equal(default(byte), oleDbParameter.Scale); + + oleDbParameter.Precision = 10; + Assert.Equal(10, oleDbParameter.Precision); + + oleDbParameter.Scale = 4; + Assert.Equal(4, oleDbParameter.Scale); + } + + [ConditionalFact(Helpers.IsDriverAvailable)] + public void SourceColumnNullMapping_Success() + { + var oleDbParameter = new OleDbParameter(); + Assert.False(oleDbParameter.SourceColumnNullMapping); + + oleDbParameter.SourceColumnNullMapping = true; + Assert.True(oleDbParameter.SourceColumnNullMapping); + } + + [ConditionalFact(Helpers.IsDriverAvailable)] + public void Size_InvalidSizeValue_Throws() + { + Assert.Throws(() => new OleDbParameter(default, default, size: -2)); + Assert.Throws(() => new OleDbParameter(default, default, size: -2, srcColumn: default)); + + var oleDbParameter = new OleDbParameter(); + Assert.Equal(0, oleDbParameter.Size); + oleDbParameter = new OleDbParameter(default, default, size: 10); + Assert.Equal(10, oleDbParameter.Size); + Assert.Throws(() => oleDbParameter.Size = -2); + } + + [ConditionalFact(Helpers.IsDriverAvailable)] + public void ParameterDirection_InvalidEnumValue_Throws() + { + var oleDbParameter = new OleDbParameter(default, default, default, (ParameterDirection)0, + default, default, default, default, DataRowVersion.Original, default); + Assert.Equal(ParameterDirection.Input, oleDbParameter.Direction); + + oleDbParameter.Direction = ParameterDirection.InputOutput; + Assert.Equal(ParameterDirection.InputOutput, oleDbParameter.Direction); + + Assert.Throws(() => oleDbParameter.Direction = (ParameterDirection)0); + } + + [ConditionalTheory(Helpers.IsDriverAvailable)] + [MemberData(nameof(ParameterDirections))] + public void ParameterDirection_Success(ParameterDirection direction) + { + var oleDbParameter = new OleDbParameter(default, default, default, direction, + default, default, default, DataRowVersion.Original, default, default); + Assert.Equal(direction, oleDbParameter.Direction); + } + + [ConditionalFact(Helpers.IsDriverAvailable)] + public void SourceVersion_InvalidEnumValue_Throws() + { + Assert.Throws(() => new OleDbParameter(default, default, default, default, + default, default, default, default, (DataRowVersion)0, default)); + + var oleDbParameter = new OleDbParameter(); + oleDbParameter.SourceVersion = DataRowVersion.Proposed; + Assert.Equal(DataRowVersion.Proposed, oleDbParameter.SourceVersion); + + Assert.Throws(() => oleDbParameter.SourceVersion = (DataRowVersion)0); + } + + [ConditionalTheory(Helpers.IsDriverAvailable)] + [MemberData(nameof(DataRowVersions))] + public void SourceVersion_Success(DataRowVersion dataRowVersion) + { + var oleDbParameter = new OleDbParameter(default, default, default, default, + default, default, default, dataRowVersion, default, default); + Assert.Equal(dataRowVersion, oleDbParameter.SourceVersion); + } + + [ConditionalFact(Helpers.IsDriverAvailable)] + public void Value_Success() + { + const string ParameterName = "Name"; + const string ParameterValue = "Value"; + OleDbParameter oleDbParameter; + + oleDbParameter = new OleDbParameter(null, null); + Assert.Equal(string.Empty, oleDbParameter.ToString()); + Assert.Equal(string.Empty, oleDbParameter.ParameterName); + Assert.Null(oleDbParameter.Value); + + oleDbParameter = new OleDbParameter(ParameterName, null); + Assert.Equal(ParameterName, oleDbParameter.ToString()); + Assert.Equal(ParameterName, oleDbParameter.ParameterName); + Assert.Null(oleDbParameter.Value); + + oleDbParameter = new OleDbParameter(ParameterName, ParameterValue); + Assert.Equal(ParameterName, oleDbParameter.ToString()); + Assert.Equal(ParameterName, oleDbParameter.ParameterName); + Assert.Equal(ParameterValue, oleDbParameter.Value); + } + + public static IEnumerable ParameterDirections + { + get + { + yield return new object[] { ParameterDirection.Input }; + yield return new object[] { ParameterDirection.Output }; + yield return new object[] { ParameterDirection.InputOutput }; + yield return new object[] { ParameterDirection.ReturnValue }; + } + } + + public static IEnumerable DataRowVersions + { + get + { + yield return new object[] { DataRowVersion.Original }; + yield return new object[] { DataRowVersion.Current }; + yield return new object[] { DataRowVersion.Proposed }; + yield return new object[] { DataRowVersion.Default }; + } + } + + public static IEnumerable OleDbTypes + { + get + { + foreach (var x in Enum.GetValues(typeof(OleDbType)).Cast()) + yield return new object[] { x }; + } + } + } +} \ No newline at end of file diff --git a/src/System.Data.OleDb/tests/OleDbTestBase.cs b/src/System.Data.OleDb/tests/OleDbTestBase.cs new file mode 100644 index 000000000000..ef0353c2e381 --- /dev/null +++ b/src/System.Data.OleDb/tests/OleDbTestBase.cs @@ -0,0 +1,46 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using Xunit; +using System.Data.OleDb; +using System.IO; + +namespace System.Data.OleDb.Tests +{ + public abstract class OleDbTestBase : FileCleanupTestBase, IDisposable + { + protected readonly OleDbConnection connection; + protected readonly OleDbTransaction transaction; + protected readonly OleDbCommand command; + private bool _disposed; + + + public OleDbTestBase() + { + _disposed = false; + connection = new OleDbConnection(ConnectionString); + connection.Open(); + transaction = connection.BeginTransaction(); + command = connection.CreateCommand(); + command.Transaction = transaction; + } + + protected override void Dispose(bool disposing) + { + if (!_disposed) + { + if (disposing) + { + command.Dispose(); + transaction.Dispose(); + connection.Dispose(); + } + _disposed = true; + } + base.Dispose(disposing); + } + + protected string ConnectionString => @"Provider=" + Helpers.ProviderName + @";Data source=" + TestDirectory + @";Extended Properties=""Text;HDR=No;FMT=Delimited"""; + } +} diff --git a/src/System.Data.OleDb/tests/System.Data.OleDb.Tests.csproj b/src/System.Data.OleDb/tests/System.Data.OleDb.Tests.csproj new file mode 100644 index 000000000000..011d9c3074fb --- /dev/null +++ b/src/System.Data.OleDb/tests/System.Data.OleDb.Tests.csproj @@ -0,0 +1,16 @@ + + + {73C7A14F-C3C5-44EA-AB02-05BFBA55722C} + netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netfx-Windows_NT-Debug;netfx-Windows_NT-Release + + + + + + + + + + + + \ No newline at end of file diff --git a/src/shims/ApiCompatBaseline.netcoreapp.netfx461.ignore.txt b/src/shims/ApiCompatBaseline.netcoreapp.netfx461.ignore.txt index c33d4073e7cd..216d95eac181 100644 --- a/src/shims/ApiCompatBaseline.netcoreapp.netfx461.ignore.txt +++ b/src/shims/ApiCompatBaseline.netcoreapp.netfx461.ignore.txt @@ -766,7 +766,6 @@ CannotRemoveBaseTypeOrInterface : Type 'System.Net.WebPermissionAttribute' does CannotRemoveBaseTypeOrInterface : Type 'System.Net.Mail.SmtpPermissionAttribute' does not implement interface 'System.Runtime.InteropServices._Attribute' in the implementation but it does in the contract. CannotRemoveBaseTypeOrInterface : Type 'System.Net.NetworkInformation.NetworkInformationPermissionAttribute' does not implement interface 'System.Runtime.InteropServices._Attribute' in the implementation but it does in the contract. CannotRemoveBaseTypeOrInterface : Type 'System.Data.Odbc.OdbcPermissionAttribute' does not implement interface 'System.Runtime.InteropServices._Attribute' in the implementation but it does in the contract. -CannotRemoveBaseTypeOrInterface : Type 'System.Data.OleDb.OleDbPermissionAttribute' does not implement interface 'System.Runtime.InteropServices._Attribute' in the implementation but it does in the contract. CannotRemoveBaseTypeOrInterface : Type 'System.Drawing.Printing.PrintingPermissionAttribute' does not implement interface 'System.Runtime.InteropServices._Attribute' in the implementation but it does in the contract. CannotRemoveBaseTypeOrInterface : Type 'System.Net.PeerToPeer.PnrpPermissionAttribute' does not implement interface 'System.Runtime.InteropServices._Attribute' in the implementation but it does in the contract. CannotRemoveBaseTypeOrInterface : Type 'System.Net.PeerToPeer.Collaboration.PeerCollaborationPermissionAttribute' does not implement interface 'System.Runtime.InteropServices._Attribute' in the implementation but it does in the contract. diff --git a/src/shims/ApiCompatBaseline.netcoreapp.netfx461.txt b/src/shims/ApiCompatBaseline.netcoreapp.netfx461.txt index 9572b3bb58a9..4fd3fa2437be 100644 --- a/src/shims/ApiCompatBaseline.netcoreapp.netfx461.txt +++ b/src/shims/ApiCompatBaseline.netcoreapp.netfx461.txt @@ -187,31 +187,6 @@ TypesMustExist : Type 'System.Data.Common.DbProviderFactoriesConfigurationHandle MembersMustExist : Member 'System.Data.Common.DbProviderFactory.CreatePermission(System.Security.Permissions.PermissionState)' does not exist in the implementation but it does exist in the contract. MembersMustExist : Member 'System.Data.Odbc.OdbcConnection.EnlistDistributedTransaction(System.EnterpriseServices.ITransaction)' does not exist in the implementation but it does exist in the contract. MembersMustExist : Member 'System.Data.Odbc.OdbcFactory.CreatePermission(System.Security.Permissions.PermissionState)' does not exist in the implementation but it does exist in the contract. -TypesMustExist : Type 'System.Data.OleDb.OleDbCommand' does not exist in the implementation but it does exist in the contract. -TypesMustExist : Type 'System.Data.OleDb.OleDbCommandBuilder' does not exist in the implementation but it does exist in the contract. -TypesMustExist : Type 'System.Data.OleDb.OleDbConnection' does not exist in the implementation but it does exist in the contract. -TypesMustExist : Type 'System.Data.OleDb.OleDbConnectionStringBuilder' does not exist in the implementation but it does exist in the contract. -TypesMustExist : Type 'System.Data.OleDb.OleDbDataAdapter' does not exist in the implementation but it does exist in the contract. -TypesMustExist : Type 'System.Data.OleDb.OleDbDataReader' does not exist in the implementation but it does exist in the contract. -TypesMustExist : Type 'System.Data.OleDb.OleDbEnumerator' does not exist in the implementation but it does exist in the contract. -TypesMustExist : Type 'System.Data.OleDb.OleDbError' does not exist in the implementation but it does exist in the contract. -TypesMustExist : Type 'System.Data.OleDb.OleDbErrorCollection' does not exist in the implementation but it does exist in the contract. -TypesMustExist : Type 'System.Data.OleDb.OleDbException' does not exist in the implementation but it does exist in the contract. -TypesMustExist : Type 'System.Data.OleDb.OleDbFactory' does not exist in the implementation but it does exist in the contract. -TypesMustExist : Type 'System.Data.OleDb.OleDbInfoMessageEventArgs' does not exist in the implementation but it does exist in the contract. -TypesMustExist : Type 'System.Data.OleDb.OleDbInfoMessageEventHandler' does not exist in the implementation but it does exist in the contract. -TypesMustExist : Type 'System.Data.OleDb.OleDbLiteral' does not exist in the implementation but it does exist in the contract. -TypesMustExist : Type 'System.Data.OleDb.OleDbMetaDataCollectionNames' does not exist in the implementation but it does exist in the contract. -TypesMustExist : Type 'System.Data.OleDb.OleDbMetaDataColumnNames' does not exist in the implementation but it does exist in the contract. -TypesMustExist : Type 'System.Data.OleDb.OleDbParameter' does not exist in the implementation but it does exist in the contract. -TypesMustExist : Type 'System.Data.OleDb.OleDbParameterCollection' does not exist in the implementation but it does exist in the contract. -TypesMustExist : Type 'System.Data.OleDb.OleDbRowUpdatedEventArgs' does not exist in the implementation but it does exist in the contract. -TypesMustExist : Type 'System.Data.OleDb.OleDbRowUpdatedEventHandler' does not exist in the implementation but it does exist in the contract. -TypesMustExist : Type 'System.Data.OleDb.OleDbRowUpdatingEventArgs' does not exist in the implementation but it does exist in the contract. -TypesMustExist : Type 'System.Data.OleDb.OleDbRowUpdatingEventHandler' does not exist in the implementation but it does exist in the contract. -TypesMustExist : Type 'System.Data.OleDb.OleDbSchemaGuid' does not exist in the implementation but it does exist in the contract. -TypesMustExist : Type 'System.Data.OleDb.OleDbTransaction' does not exist in the implementation but it does exist in the contract. -TypesMustExist : Type 'System.Data.OleDb.OleDbType' does not exist in the implementation but it does exist in the contract. TypesMustExist : Type 'System.Data.Sql.SqlDataSourceEnumerator' does not exist in the implementation but it does exist in the contract. TypesMustExist : Type 'System.Data.SqlClient.SqlAuthenticationMethod' does not exist in the implementation but it does exist in the contract. MembersMustExist : Member 'System.Data.SqlClient.SqlBulkCopyOptions System.Data.SqlClient.SqlBulkCopyOptions.AllowEncryptedValueModifications' does not exist in the implementation but it does exist in the contract. From b99a0ce1f32406b0120a605d64f8299b8a2860e4 Mon Sep 17 00:00:00 2001 From: Stephen Toub Date: Wed, 1 May 2019 16:54:40 -0400 Subject: [PATCH 176/607] Move the new ConfigureAwait/WithCancellation extension methods to a new type (#24331) We decided after all to put these on a different type, TaskAsyncEnumerableExtensions. This commit adds the new type. We can delete the methods in the old location once corefx consumes an updated build and switches over to using the new ones. Signed-off-by: dotnet-bot --- .../System.Private.CoreLib.Shared.projitems | 1 + .../Tasks/TaskAsyncEnumerableExtensions.cs | 39 +++++++++++++++++++ .../System/Threading/Tasks/TaskExtensions.cs | 5 +++ 3 files changed, 45 insertions(+) create mode 100644 src/Common/src/CoreLib/System/Threading/Tasks/TaskAsyncEnumerableExtensions.cs diff --git a/src/Common/src/CoreLib/System.Private.CoreLib.Shared.projitems b/src/Common/src/CoreLib/System.Private.CoreLib.Shared.projitems index 5337436bcefa..dd58b4d94361 100644 --- a/src/Common/src/CoreLib/System.Private.CoreLib.Shared.projitems +++ b/src/Common/src/CoreLib/System.Private.CoreLib.Shared.projitems @@ -857,6 +857,7 @@ + diff --git a/src/Common/src/CoreLib/System/Threading/Tasks/TaskAsyncEnumerableExtensions.cs b/src/Common/src/CoreLib/System/Threading/Tasks/TaskAsyncEnumerableExtensions.cs new file mode 100644 index 000000000000..6411bb21347d --- /dev/null +++ b/src/Common/src/CoreLib/System/Threading/Tasks/TaskAsyncEnumerableExtensions.cs @@ -0,0 +1,39 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +#nullable enable +using System.Collections.Generic; +using System.Runtime.CompilerServices; + +namespace System.Threading.Tasks +{ + /// Provides a set of static methods for configuring -related behaviors on asynchronous enumerables and disposables. + public static class TaskAsyncEnumerableExtensions + { + /// Configures how awaits on the tasks returned from an async disposable will be performed. + /// The source async disposable. + /// Whether to capture and marshal back to the current context. + /// The configured async disposable. + public static ConfiguredAsyncDisposable ConfigureAwait(this IAsyncDisposable source, bool continueOnCapturedContext) => + new ConfiguredAsyncDisposable(source, continueOnCapturedContext); + + /// Configures how awaits on the tasks returned from an async iteration will be performed. + /// The type of the objects being iterated. + /// The source enumerable being iterated. + /// Whether to capture and marshal back to the current context. + /// The configured enumerable. + public static ConfiguredCancelableAsyncEnumerable ConfigureAwait( + this IAsyncEnumerable source, bool continueOnCapturedContext) => + new ConfiguredCancelableAsyncEnumerable(source, continueOnCapturedContext, cancellationToken: default); + + /// Sets the to be passed to when iterating. + /// The type of the objects being iterated. + /// The source enumerable being iterated. + /// The to use. + /// The configured enumerable. + public static ConfiguredCancelableAsyncEnumerable WithCancellation( + this IAsyncEnumerable source, CancellationToken cancellationToken) => + new ConfiguredCancelableAsyncEnumerable(source, continueOnCapturedContext: true, cancellationToken); + } +} diff --git a/src/Common/src/CoreLib/System/Threading/Tasks/TaskExtensions.cs b/src/Common/src/CoreLib/System/Threading/Tasks/TaskExtensions.cs index 4b45f75c986e..cbe8d6745401 100644 --- a/src/Common/src/CoreLib/System/Threading/Tasks/TaskExtensions.cs +++ b/src/Common/src/CoreLib/System/Threading/Tasks/TaskExtensions.cs @@ -49,10 +49,13 @@ public static Task Unwrap(this Task> task) Task.FromCanceled(new CancellationToken(true)); } + // TODO: Remove the below three methods once corefx has consumed a build with them in their new TaskAsyncEnumerableExtensions location. + /// Configures how awaits on the tasks returned from an async disposable will be performed. /// The source async disposable. /// Whether to capture and marshal back to the current context. /// The configured async disposable. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] public static ConfiguredAsyncDisposable ConfigureAwait(this IAsyncDisposable source, bool continueOnCapturedContext) => new ConfiguredAsyncDisposable(source, continueOnCapturedContext); @@ -61,6 +64,7 @@ public static ConfiguredAsyncDisposable ConfigureAwait(this IAsyncDisposable sou /// The source enumerable being iterated. /// Whether to capture and marshal back to the current context. /// The configured enumerable. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] public static ConfiguredCancelableAsyncEnumerable ConfigureAwait( this IAsyncEnumerable source, bool continueOnCapturedContext) => new ConfiguredCancelableAsyncEnumerable(source, continueOnCapturedContext, cancellationToken: default); @@ -70,6 +74,7 @@ public static ConfiguredCancelableAsyncEnumerable ConfigureAwait( /// The source enumerable being iterated. /// The to use. /// The configured enumerable. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] public static ConfiguredCancelableAsyncEnumerable WithCancellation( this IAsyncEnumerable source, CancellationToken cancellationToken) => new ConfiguredCancelableAsyncEnumerable(source, continueOnCapturedContext: true, cancellationToken); From ddb748d8f5e00eccea8618f3165c0154531e3907 Mon Sep 17 00:00:00 2001 From: Blake Hensley Date: Wed, 1 May 2019 21:07:07 -0700 Subject: [PATCH 177/607] Added overloads to Path.Join (dotnet/coreclr#24307) * Added overloads to Path.Join * Refactor Path.Join and Path.Combine to use ValueStringBuilder * Use proper defined const for empty string * Fix Windows-specific const Signed-off-by: dotnet-bot --- src/Common/src/CoreLib/System/IO/Path.cs | 96 +++++++++++++++++++++--- 1 file changed, 85 insertions(+), 11 deletions(-) diff --git a/src/Common/src/CoreLib/System/IO/Path.cs b/src/Common/src/CoreLib/System/IO/Path.cs index db491bfdc00f..27741b9248e9 100644 --- a/src/Common/src/CoreLib/System/IO/Path.cs +++ b/src/Common/src/CoreLib/System/IO/Path.cs @@ -346,7 +346,7 @@ public static string Combine(params string[] paths) throw new ArgumentNullException(nameof(paths)); } - int finalSize = 0; + int maxSize = 0; int firstComponent = 0; // We have two passes, the first calculates how large a buffer to allocate and does some precondition @@ -367,19 +367,21 @@ public static string Combine(params string[] paths) if (IsPathRooted(paths[i])) { firstComponent = i; - finalSize = paths[i].Length; + maxSize = paths[i].Length; } else { - finalSize += paths[i].Length; + maxSize += paths[i].Length; } char ch = paths[i][paths[i].Length - 1]; if (!PathInternal.IsDirectorySeparator(ch)) - finalSize++; + maxSize++; } - StringBuilder finalPath = StringBuilderCache.Acquire(finalSize); + Span initialBuffer = stackalloc char[260]; // MaxShortPath on Windows + var builder = new ValueStringBuilder(initialBuffer); + builder.EnsureCapacity(maxSize); for (int i = firstComponent; i < paths.Length; i++) { @@ -388,23 +390,23 @@ public static string Combine(params string[] paths) continue; } - if (finalPath.Length == 0) + if (builder.Length == 0) { - finalPath.Append(paths[i]); + builder.Append(paths[i]); } else { - char ch = finalPath[finalPath.Length - 1]; + char ch = builder[builder.Length - 1]; if (!PathInternal.IsDirectorySeparator(ch)) { - finalPath.Append(PathInternal.DirectorySeparatorChar); + builder.Append(PathInternal.DirectorySeparatorChar); } - finalPath.Append(paths[i]); + builder.Append(paths[i]); } } - return StringBuilderCache.GetStringAndRelease(finalPath); + return builder.ToString(); } // Unlike Combine(), Join() methods do not consider rooting. They simply combine paths, ensuring that there @@ -434,6 +436,23 @@ public static string Join(ReadOnlySpan path1, ReadOnlySpan path2, Re return JoinInternal(path1, path2, path3); } + public static string Join(ReadOnlySpan path1, ReadOnlySpan path2, ReadOnlySpan path3, ReadOnlySpan path4) + { + if (path1.Length == 0) + return Join(path2, path3, path4); + + if (path2.Length == 0) + return Join(path1, path3, path4); + + if (path3.Length == 0) + return Join(path1, path2, path4); + + if (path4.Length == 0) + return Join(path1, path2, path3); + + return JoinInternal(path1, path2, path3, path4); + } + public static string Join(string? path1, string? path2) { return Join(path1.AsSpan(), path2.AsSpan()); @@ -444,6 +463,61 @@ public static string Join(string? path1, string? path2, string? path3) return Join(path1.AsSpan(), path2.AsSpan(), path3.AsSpan()); } + public static string Join(string? path1, string? path2, string? path3, string? path4) + { + return Join(path1.AsSpan(), path2.AsSpan(), path3.AsSpan(), path4.AsSpan()); + } + + public static string Join(params string[] paths) + { + if (paths == null) + { + throw new ArgumentNullException(nameof(paths)); + } + + if (paths.Length == 0) + { + return string.Empty; + } + + int maxSize = 0; + foreach (string path in paths) + { + maxSize += path?.Length ?? 0; + } + maxSize += paths.Length - 1; + + Span initialBuffer = stackalloc char[260]; // MaxShortPath on Windows + var builder = new ValueStringBuilder(initialBuffer); + builder.EnsureCapacity(maxSize); + + for (int i = 0; i < paths.Length; i++) + { + if ((paths[i]?.Length ?? 0) == 0) + { + continue; + } + + string path = paths[i]; + + if (builder.Length == 0) + { + builder.Append(path); + } + else + { + if (!PathInternal.IsDirectorySeparator(builder[builder.Length - 1]) && !PathInternal.IsDirectorySeparator(path[0])) + { + builder.Append(PathInternal.DirectorySeparatorChar); + } + + builder.Append(path); + } + } + + return builder.ToString(); + } + public static bool TryJoin(ReadOnlySpan path1, ReadOnlySpan path2, Span destination, out int charsWritten) { charsWritten = 0; From ff885a4b5cba23031afdbe909b23fed06edf6e58 Mon Sep 17 00:00:00 2001 From: Krzysztof Wicher Date: Wed, 1 May 2019 21:20:50 -0700 Subject: [PATCH 178/607] Nullable: System.Collections remainder (non-generic) (dotnet/coreclr#24326) * Nullable: System.Collections remainder (non-generic) * apply feedback Signed-off-by: dotnet-bot --- .../CoreLib/System/Collections/ArrayList.cs | 259 +++++++++--------- .../CoreLib/System/Collections/Comparer.cs | 7 +- .../System/Collections/CompatibleComparer.cs | 15 +- .../HashHelpers.SerializationInfoTable.cs | 7 +- .../CoreLib/System/Collections/HashHelpers.cs | 2 +- .../CoreLib/System/Collections/Hashtable.cs | 113 ++++---- .../CoreLib/System/Collections/ICollection.cs | 1 + .../System/Collections/IHashCodeProvider.cs | 1 + .../src/CoreLib/System/Collections/IList.cs | 13 +- .../Collections/IStructuralComparable.cs | 3 +- .../System/Collections/KeyValuePairs.cs | 5 +- .../Collections/ListDictionaryInternal.cs | 48 ++-- .../ObjectModel/ReadOnlyCollection.cs | 6 +- .../CoreLib/System/CurrentSystemTimeZone.cs | 2 +- .../System/Security/SecurityElement.cs | 18 +- .../src/CoreLib/System/Text/EncodingTable.cs | 2 +- src/Common/src/CoreLib/System/Tuple.cs | 16 +- src/Common/src/CoreLib/System/ValueTuple.cs | 18 +- 18 files changed, 274 insertions(+), 262 deletions(-) diff --git a/src/Common/src/CoreLib/System/Collections/ArrayList.cs b/src/Common/src/CoreLib/System/Collections/ArrayList.cs index d2ccc23d70a3..1f6c4906e8bc 100644 --- a/src/Common/src/CoreLib/System/Collections/ArrayList.cs +++ b/src/Common/src/CoreLib/System/Collections/ArrayList.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable /*============================================================ ** ** Class: ArrayList @@ -33,7 +34,7 @@ namespace System.Collections #endif public class ArrayList : IList, ICloneable { - private object[] _items; // Do not rename (binary serialization) + private object?[] _items = null!; // Do not rename (binary serialization) private int _size; // Do not rename (binary serialization) private int _version; // Do not rename (binary serialization) @@ -161,7 +162,7 @@ public virtual bool IsSynchronized // Sets or Gets the element at the given index. // - public virtual object this[int index] + public virtual object? this[int index] { get { @@ -195,7 +196,7 @@ public static ArrayList Adapter(IList list) // increased by one. If required, the capacity of the list is doubled // before adding the new element. // - public virtual int Add(object value) + public virtual int Add(object? value) { if (_size == _items.Length) EnsureCapacity(_size + 1); _items[_size] = value; @@ -232,7 +233,7 @@ public virtual void AddRange(ICollection c) // The method uses the Array.BinarySearch method to perform the // search. // - public virtual int BinarySearch(int index, int count, object value, IComparer comparer) + public virtual int BinarySearch(int index, int count, object? value, IComparer? comparer) { if (index < 0) throw new ArgumentOutOfRangeException(nameof(index), SR.ArgumentOutOfRange_NeedNonNegNum); @@ -244,12 +245,12 @@ public virtual int BinarySearch(int index, int count, object value, IComparer co return Array.BinarySearch((Array)_items, index, count, value, comparer); } - public virtual int BinarySearch(object value) + public virtual int BinarySearch(object? value) { return BinarySearch(0, Count, value, null); } - public virtual int BinarySearch(object value, IComparer comparer) + public virtual int BinarySearch(object? value, IComparer? comparer) { return BinarySearch(0, Count, value, comparer); } @@ -283,7 +284,7 @@ public virtual object Clone() // It does a linear, O(n) search. Equality is determined by calling // item.Equals(). // - public virtual bool Contains(object item) + public virtual bool Contains(object? item) { if (item == null) { @@ -295,7 +296,7 @@ public virtual bool Contains(object item) else { for (int i = 0; i < _size; i++) - if ((_items[i] != null) && (_items[i].Equals(item))) + if ((_items[i] != null) && (_items[i]!.Equals(item))) // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/34644 return true; return false; } @@ -318,7 +319,7 @@ public virtual void CopyTo(Array array, int arrayIndex) throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(array)); // Delegate rest of error checking to Array.Copy. - Array.Copy(_items, 0, array, arrayIndex, _size); + Array.Copy(_items, 0, array!, arrayIndex, _size); } // Copies a section of this list to the given array at the given index. @@ -333,7 +334,7 @@ public virtual void CopyTo(int index, Array array, int arrayIndex, int count) throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(array)); // Delegate rest of error checking to Array.Copy. - Array.Copy(_items, index, array, arrayIndex, count); + Array.Copy(_items, index, array!, arrayIndex, count); } // Ensures that the capacity of this list is at least the given minimum @@ -407,7 +408,7 @@ public virtual IEnumerator GetEnumerator(int index, int count) // This method uses the Array.IndexOf method to perform the // search. // - public virtual int IndexOf(object value) + public virtual int IndexOf(object? value) { return Array.IndexOf((Array)_items, value, 0, _size); } @@ -421,7 +422,7 @@ public virtual int IndexOf(object value) // This method uses the Array.IndexOf method to perform the // search. // - public virtual int IndexOf(object value, int startIndex) + public virtual int IndexOf(object? value, int startIndex) { if (startIndex > _size) throw new ArgumentOutOfRangeException(nameof(startIndex), SR.ArgumentOutOfRange_Index); @@ -437,7 +438,7 @@ public virtual int IndexOf(object value, int startIndex) // This method uses the Array.IndexOf method to perform the // search. // - public virtual int IndexOf(object value, int startIndex, int count) + public virtual int IndexOf(object? value, int startIndex, int count) { if (startIndex > _size) throw new ArgumentOutOfRangeException(nameof(startIndex), SR.ArgumentOutOfRange_Index); @@ -449,7 +450,7 @@ public virtual int IndexOf(object value, int startIndex, int count) // is increased by one. If required, the capacity of the list is doubled // before inserting the new element. // - public virtual void Insert(int index, object value) + public virtual void Insert(int index, object? value) { // Note that insertions at the end are legal. if (index < 0 || index > _size) throw new ArgumentOutOfRangeException(nameof(index), SR.ArgumentOutOfRange_Index); @@ -501,7 +502,7 @@ public virtual void InsertRange(int index, ICollection c) // This method uses the Array.LastIndexOf method to perform the // search. // - public virtual int LastIndexOf(object value) + public virtual int LastIndexOf(object? value) { return LastIndexOf(value, _size - 1, _size); } @@ -515,7 +516,7 @@ public virtual int LastIndexOf(object value) // This method uses the Array.LastIndexOf method to perform the // search. // - public virtual int LastIndexOf(object value, int startIndex) + public virtual int LastIndexOf(object? value, int startIndex) { if (startIndex >= _size) throw new ArgumentOutOfRangeException(nameof(startIndex), SR.ArgumentOutOfRange_Index); @@ -531,7 +532,7 @@ public virtual int LastIndexOf(object value, int startIndex) // This method uses the Array.LastIndexOf method to perform the // search. // - public virtual int LastIndexOf(object value, int startIndex, int count) + public virtual int LastIndexOf(object? value, int startIndex, int count) { if (Count != 0 && (startIndex < 0 || count < 0)) throw new ArgumentOutOfRangeException(startIndex < 0 ? nameof(startIndex) : nameof(count), SR.ArgumentOutOfRange_NeedNonNegNum); @@ -566,7 +567,7 @@ public static ArrayList ReadOnly(ArrayList list) // Removes the element at the given index. The size of the list is // decreased by one. // - public virtual void Remove(object obj) + public virtual void Remove(object? obj) { int index = IndexOf(obj); if (index >= 0) @@ -615,7 +616,7 @@ public virtual void RemoveRange(int index, int count) // Returns an IList that contains count copies of value. // - public static ArrayList Repeat(object value, int count) + public static ArrayList Repeat(object? value, int count) { if (count < 0) throw new ArgumentOutOfRangeException(nameof(count), SR.ArgumentOutOfRange_NeedNonNegNum); @@ -688,7 +689,7 @@ public virtual void Sort() // Sorts the elements in this list. Uses Array.Sort with the // provided comparer. - public virtual void Sort(IComparer comparer) + public virtual void Sort(IComparer? comparer) { Sort(0, Count, comparer); } @@ -701,7 +702,7 @@ public virtual void Sort(IComparer comparer) // // This method uses the Array.Sort method to sort the elements. // - public virtual void Sort(int index, int count, IComparer comparer) + public virtual void Sort(int index, int count, IComparer? comparer) { if (index < 0) throw new ArgumentOutOfRangeException(nameof(index), SR.ArgumentOutOfRange_NeedNonNegNum); @@ -734,12 +735,12 @@ public static ArrayList Synchronized(ArrayList list) // ToArray returns a new Object array containing the contents of the ArrayList. // This requires copying the ArrayList, which is an O(n) operation. - public virtual object[] ToArray() + public virtual object?[] ToArray() { if (_size == 0) return Array.Empty(); - object[] array = new object[_size]; + object?[] array = new object[_size]; Array.Copy(_items, 0, array, 0, _size); return array; } @@ -816,7 +817,7 @@ public override bool IsSynchronized get { return _list.IsSynchronized; } } - public override object this[int index] + public override object? this[int index] { get { @@ -834,7 +835,7 @@ public override object SyncRoot get { return _list.SyncRoot; } } - public override int Add(object obj) + public override int Add(object? obj) { int i = _list.Add(obj); _version++; @@ -847,7 +848,7 @@ public override void AddRange(ICollection c) } // Other overloads with automatically work - public override int BinarySearch(int index, int count, object value, IComparer comparer) + public override int BinarySearch(int index, int count, object? value, IComparer? comparer) { if (index < 0 || count < 0) throw new ArgumentOutOfRangeException(index < 0 ? nameof(index) : nameof(count), SR.ArgumentOutOfRange_NeedNonNegNum); @@ -896,7 +897,7 @@ public override object Clone() return new IListWrapper(_list); } - public override bool Contains(object obj) + public override bool Contains(object? obj) { return _list.Contains(obj); } @@ -942,18 +943,18 @@ public override IEnumerator GetEnumerator(int index, int count) return new IListWrapperEnumWrapper(this, index, count); } - public override int IndexOf(object value) + public override int IndexOf(object? value) { return _list.IndexOf(value); } [SuppressMessage("Microsoft.Contracts", "CC1055")] // Skip extra error checking to avoid *potential* AppCompat problems. - public override int IndexOf(object value, int startIndex) + public override int IndexOf(object? value, int startIndex) { return IndexOf(value, startIndex, _list.Count - startIndex); } - public override int IndexOf(object value, int startIndex, int count) + public override int IndexOf(object? value, int startIndex, int count) { if (startIndex < 0 || startIndex > Count) throw new ArgumentOutOfRangeException(nameof(startIndex), SR.ArgumentOutOfRange_Index); if (count < 0 || startIndex > Count - count) throw new ArgumentOutOfRangeException(nameof(count), SR.ArgumentOutOfRange_Count); @@ -969,13 +970,13 @@ public override int IndexOf(object value, int startIndex, int count) else { for (int i = startIndex; i < endIndex; i++) - if (_list[i] != null && _list[i].Equals(value)) + if (_list[i] != null && _list[i]!.Equals(value)) // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/34644 return i; return -1; } } - public override void Insert(int index, object obj) + public override void Insert(int index, object? obj) { _list.Insert(index, obj); _version++; @@ -989,7 +990,7 @@ public override void InsertRange(int index, ICollection c) if (c.Count > 0) { - ArrayList al = _list as ArrayList; + ArrayList? al = _list as ArrayList; if (al != null) { // We need to special case ArrayList. @@ -1009,19 +1010,19 @@ public override void InsertRange(int index, ICollection c) } } - public override int LastIndexOf(object value) + public override int LastIndexOf(object? value) { return LastIndexOf(value, _list.Count - 1, _list.Count); } [SuppressMessage("Microsoft.Contracts", "CC1055")] // Skip extra error checking to avoid *potential* AppCompat problems. - public override int LastIndexOf(object value, int startIndex) + public override int LastIndexOf(object? value, int startIndex) { return LastIndexOf(value, startIndex, startIndex + 1); } [SuppressMessage("Microsoft.Contracts", "CC1055")] // Skip extra error checking to avoid *potential* AppCompat problems. - public override int LastIndexOf(object value, int startIndex, int count) + public override int LastIndexOf(object? value, int startIndex, int count) { if (_list.Count == 0) return -1; @@ -1040,13 +1041,13 @@ public override int LastIndexOf(object value, int startIndex, int count) else { for (int i = startIndex; i >= endIndex; i--) - if (_list[i] != null && _list[i].Equals(value)) + if (_list[i] != null && _list[i]!.Equals(value)) // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/34644 return i; return -1; } } - public override void Remove(object value) + public override void Remove(object? value) { int index = IndexOf(value); if (index >= 0) @@ -1089,7 +1090,7 @@ public override void Reverse(int index, int count) int j = index + count - 1; while (i < j) { - object tmp = _list[i]; + object? tmp = _list[i]; _list[i++] = _list[j]; _list[j--] = tmp; } @@ -1128,7 +1129,7 @@ public override ArrayList GetRange(int index, int count) return new Range(this, index, count); } - public override void Sort(int index, int count, IComparer comparer) + public override void Sort(int index, int count, IComparer? comparer) { if (index < 0 || count < 0) throw new ArgumentOutOfRangeException(index < 0 ? nameof(index) : nameof(count), SR.ArgumentOutOfRange_NeedNonNegNum); @@ -1145,12 +1146,12 @@ public override void Sort(int index, int count, IComparer comparer) } - public override object[] ToArray() + public override object?[] ToArray() { if (Count == 0) - return Array.Empty(); + return Array.Empty(); - object[] array = new object[Count]; + object?[] array = new object[Count]; _list.CopyTo(array, 0); return array; } @@ -1174,7 +1175,7 @@ public override void TrimToSize() // class that implements all of ArrayList's methods. private sealed class IListWrapperEnumWrapper : IEnumerator, ICloneable { - private IEnumerator _en; + private IEnumerator _en = null!; private int _remaining; private int _initialStartIndex; // for reset private int _initialCount; // for reset @@ -1216,7 +1217,7 @@ public bool MoveNext() return r && _remaining-- > 0; } - public object Current + public object? Current { get { @@ -1291,7 +1292,7 @@ public override bool IsSynchronized get { return true; } } - public override object this[int index] + public override object? this[int index] { get { @@ -1314,7 +1315,7 @@ public override object SyncRoot get { return _root; } } - public override int Add(object value) + public override int Add(object? value) { lock (_root) { @@ -1330,7 +1331,7 @@ public override void AddRange(ICollection c) } } - public override int BinarySearch(object value) + public override int BinarySearch(object? value) { lock (_root) { @@ -1338,7 +1339,7 @@ public override int BinarySearch(object value) } } - public override int BinarySearch(object value, IComparer comparer) + public override int BinarySearch(object? value, IComparer? comparer) { lock (_root) { @@ -1347,7 +1348,7 @@ public override int BinarySearch(object value, IComparer comparer) } [SuppressMessage("Microsoft.Contracts", "CC1055")] // Skip extra error checking to avoid *potential* AppCompat problems. - public override int BinarySearch(int index, int count, object value, IComparer comparer) + public override int BinarySearch(int index, int count, object? value, IComparer? comparer) { lock (_root) { @@ -1371,7 +1372,7 @@ public override object Clone() } } - public override bool Contains(object item) + public override bool Contains(object? item) { lock (_root) { @@ -1421,7 +1422,7 @@ public override IEnumerator GetEnumerator(int index, int count) } } - public override int IndexOf(object value) + public override int IndexOf(object? value) { lock (_root) { @@ -1430,7 +1431,7 @@ public override int IndexOf(object value) } [SuppressMessage("Microsoft.Contracts", "CC1055")] // Skip extra error checking to avoid *potential* AppCompat problems. - public override int IndexOf(object value, int startIndex) + public override int IndexOf(object? value, int startIndex) { lock (_root) { @@ -1439,7 +1440,7 @@ public override int IndexOf(object value, int startIndex) } [SuppressMessage("Microsoft.Contracts", "CC1055")] // Skip extra error checking to avoid *potential* AppCompat problems. - public override int IndexOf(object value, int startIndex, int count) + public override int IndexOf(object? value, int startIndex, int count) { lock (_root) { @@ -1447,7 +1448,7 @@ public override int IndexOf(object value, int startIndex, int count) } } - public override void Insert(int index, object value) + public override void Insert(int index, object? value) { lock (_root) { @@ -1464,7 +1465,7 @@ public override void InsertRange(int index, ICollection c) } } - public override int LastIndexOf(object value) + public override int LastIndexOf(object? value) { lock (_root) { @@ -1473,7 +1474,7 @@ public override int LastIndexOf(object value) } [SuppressMessage("Microsoft.Contracts", "CC1055")] // Skip extra error checking to avoid *potential* AppCompat problems. - public override int LastIndexOf(object value, int startIndex) + public override int LastIndexOf(object? value, int startIndex) { lock (_root) { @@ -1482,7 +1483,7 @@ public override int LastIndexOf(object value, int startIndex) } [SuppressMessage("Microsoft.Contracts", "CC1055")] // Skip extra error checking to avoid *potential* AppCompat problems. - public override int LastIndexOf(object value, int startIndex, int count) + public override int LastIndexOf(object? value, int startIndex, int count) { lock (_root) { @@ -1490,7 +1491,7 @@ public override int LastIndexOf(object value, int startIndex, int count) } } - public override void Remove(object value) + public override void Remove(object? value) { lock (_root) { @@ -1550,7 +1551,7 @@ public override void Sort() } } - public override void Sort(IComparer comparer) + public override void Sort(IComparer? comparer) { lock (_root) { @@ -1559,7 +1560,7 @@ public override void Sort(IComparer comparer) } [SuppressMessage("Microsoft.Contracts", "CC1055")] // Skip extra error checking to avoid *potential* AppCompat problems. - public override void Sort(int index, int count, IComparer comparer) + public override void Sort(int index, int count, IComparer? comparer) { lock (_root) { @@ -1567,7 +1568,7 @@ public override void Sort(int index, int count, IComparer comparer) } } - public override object[] ToArray() + public override object?[] ToArray() { lock (_root) { @@ -1626,7 +1627,7 @@ public virtual bool IsSynchronized get { return true; } } - public virtual object this[int index] + public virtual object? this[int index] { get { @@ -1649,7 +1650,7 @@ public virtual object SyncRoot get { return _root; } } - public virtual int Add(object value) + public virtual int Add(object? value) { lock (_root) { @@ -1666,7 +1667,7 @@ public virtual void Clear() } } - public virtual bool Contains(object item) + public virtual bool Contains(object? item) { lock (_root) { @@ -1690,7 +1691,7 @@ public virtual IEnumerator GetEnumerator() } } - public virtual int IndexOf(object value) + public virtual int IndexOf(object? value) { lock (_root) { @@ -1698,7 +1699,7 @@ public virtual int IndexOf(object value) } } - public virtual void Insert(int index, object value) + public virtual void Insert(int index, object? value) { lock (_root) { @@ -1706,7 +1707,7 @@ public virtual void Insert(int index, object value) } } - public virtual void Remove(object value) + public virtual void Remove(object? value) { lock (_root) { @@ -1752,7 +1753,7 @@ public virtual bool IsSynchronized get { return _list.IsSynchronized; } } - public virtual object this[int index] + public virtual object? this[int index] { get { @@ -1769,7 +1770,7 @@ public virtual object SyncRoot get { return _list.SyncRoot; } } - public virtual int Add(object obj) + public virtual int Add(object? obj) { throw new NotSupportedException(SR.NotSupported_FixedSizeCollection); } @@ -1779,7 +1780,7 @@ public virtual void Clear() throw new NotSupportedException(SR.NotSupported_FixedSizeCollection); } - public virtual bool Contains(object obj) + public virtual bool Contains(object? obj) { return _list.Contains(obj); } @@ -1794,17 +1795,17 @@ public virtual IEnumerator GetEnumerator() return _list.GetEnumerator(); } - public virtual int IndexOf(object value) + public virtual int IndexOf(object? value) { return _list.IndexOf(value); } - public virtual void Insert(int index, object obj) + public virtual void Insert(int index, object? obj) { throw new NotSupportedException(SR.NotSupported_FixedSizeCollection); } - public virtual void Remove(object value) + public virtual void Remove(object? value) { throw new NotSupportedException(SR.NotSupported_FixedSizeCollection); } @@ -1845,7 +1846,7 @@ public override bool IsSynchronized get { return _list.IsSynchronized; } } - public override object this[int index] + public override object? this[int index] { get { @@ -1863,7 +1864,7 @@ public override object SyncRoot get { return _list.SyncRoot; } } - public override int Add(object obj) + public override int Add(object? obj) { throw new NotSupportedException(SR.NotSupported_FixedSizeCollection); } @@ -1874,7 +1875,7 @@ public override void AddRange(ICollection c) } [SuppressMessage("Microsoft.Contracts", "CC1055")] // Skip extra error checking to avoid *potential* AppCompat problems. - public override int BinarySearch(int index, int count, object value, IComparer comparer) + public override int BinarySearch(int index, int count, object? value, IComparer? comparer) { return _list.BinarySearch(index, count, value, comparer); } @@ -1899,7 +1900,7 @@ public override object Clone() return arrayList; } - public override bool Contains(object obj) + public override bool Contains(object? obj) { return _list.Contains(obj); } @@ -1926,24 +1927,24 @@ public override IEnumerator GetEnumerator(int index, int count) return _list.GetEnumerator(index, count); } - public override int IndexOf(object value) + public override int IndexOf(object? value) { return _list.IndexOf(value); } [SuppressMessage("Microsoft.Contracts", "CC1055")] // Skip extra error checking to avoid *potential* AppCompat problems. - public override int IndexOf(object value, int startIndex) + public override int IndexOf(object? value, int startIndex) { return _list.IndexOf(value, startIndex); } [SuppressMessage("Microsoft.Contracts", "CC1055")] // Skip extra error checking to avoid *potential* AppCompat problems. - public override int IndexOf(object value, int startIndex, int count) + public override int IndexOf(object? value, int startIndex, int count) { return _list.IndexOf(value, startIndex, count); } - public override void Insert(int index, object obj) + public override void Insert(int index, object? obj) { throw new NotSupportedException(SR.NotSupported_FixedSizeCollection); } @@ -1954,24 +1955,24 @@ public override void InsertRange(int index, ICollection c) throw new NotSupportedException(SR.NotSupported_FixedSizeCollection); } - public override int LastIndexOf(object value) + public override int LastIndexOf(object? value) { return _list.LastIndexOf(value); } [SuppressMessage("Microsoft.Contracts", "CC1055")] // Skip extra error checking to avoid *potential* AppCompat problems. - public override int LastIndexOf(object value, int startIndex) + public override int LastIndexOf(object? value, int startIndex) { return _list.LastIndexOf(value, startIndex); } [SuppressMessage("Microsoft.Contracts", "CC1055")] // Skip extra error checking to avoid *potential* AppCompat problems. - public override int LastIndexOf(object value, int startIndex, int count) + public override int LastIndexOf(object? value, int startIndex, int count) { return _list.LastIndexOf(value, startIndex, count); } - public override void Remove(object value) + public override void Remove(object? value) { throw new NotSupportedException(SR.NotSupported_FixedSizeCollection); } @@ -2012,13 +2013,13 @@ public override void Reverse(int index, int count) } [SuppressMessage("Microsoft.Contracts", "CC1055")] // Skip extra error checking to avoid *potential* AppCompat problems. - public override void Sort(int index, int count, IComparer comparer) + public override void Sort(int index, int count, IComparer? comparer) { _list.Sort(index, count, comparer); _version = _list._version; } - public override object[] ToArray() + public override object?[] ToArray() { return _list.ToArray(); } @@ -2064,7 +2065,7 @@ public virtual bool IsSynchronized get { return _list.IsSynchronized; } } - public virtual object this[int index] + public virtual object? this[int index] { get { @@ -2081,7 +2082,7 @@ public virtual object SyncRoot get { return _list.SyncRoot; } } - public virtual int Add(object obj) + public virtual int Add(object? obj) { throw new NotSupportedException(SR.NotSupported_ReadOnlyCollection); } @@ -2091,7 +2092,7 @@ public virtual void Clear() throw new NotSupportedException(SR.NotSupported_ReadOnlyCollection); } - public virtual bool Contains(object obj) + public virtual bool Contains(object? obj) { return _list.Contains(obj); } @@ -2106,17 +2107,17 @@ public virtual IEnumerator GetEnumerator() return _list.GetEnumerator(); } - public virtual int IndexOf(object value) + public virtual int IndexOf(object? value) { return _list.IndexOf(value); } - public virtual void Insert(int index, object obj) + public virtual void Insert(int index, object? obj) { throw new NotSupportedException(SR.NotSupported_ReadOnlyCollection); } - public virtual void Remove(object value) + public virtual void Remove(object? value) { throw new NotSupportedException(SR.NotSupported_ReadOnlyCollection); } @@ -2156,7 +2157,7 @@ public override bool IsSynchronized get { return _list.IsSynchronized; } } - public override object this[int index] + public override object? this[int index] { get { @@ -2173,7 +2174,7 @@ public override object SyncRoot get { return _list.SyncRoot; } } - public override int Add(object obj) + public override int Add(object? obj) { throw new NotSupportedException(SR.NotSupported_ReadOnlyCollection); } @@ -2184,7 +2185,7 @@ public override void AddRange(ICollection c) } [SuppressMessage("Microsoft.Contracts", "CC1055")] // Skip extra error checking to avoid *potential* AppCompat problems. - public override int BinarySearch(int index, int count, object value, IComparer comparer) + public override int BinarySearch(int index, int count, object? value, IComparer? comparer) { return _list.BinarySearch(index, count, value, comparer); } @@ -2210,7 +2211,7 @@ public override object Clone() return arrayList; } - public override bool Contains(object obj) + public override bool Contains(object? obj) { return _list.Contains(obj); } @@ -2237,24 +2238,24 @@ public override IEnumerator GetEnumerator(int index, int count) return _list.GetEnumerator(index, count); } - public override int IndexOf(object value) + public override int IndexOf(object? value) { return _list.IndexOf(value); } [SuppressMessage("Microsoft.Contracts", "CC1055")] // Skip extra error checking to avoid *potential* AppCompat problems. - public override int IndexOf(object value, int startIndex) + public override int IndexOf(object? value, int startIndex) { return _list.IndexOf(value, startIndex); } [SuppressMessage("Microsoft.Contracts", "CC1055")] // Skip extra error checking to avoid *potential* AppCompat problems. - public override int IndexOf(object value, int startIndex, int count) + public override int IndexOf(object? value, int startIndex, int count) { return _list.IndexOf(value, startIndex, count); } - public override void Insert(int index, object obj) + public override void Insert(int index, object? obj) { throw new NotSupportedException(SR.NotSupported_ReadOnlyCollection); } @@ -2265,24 +2266,24 @@ public override void InsertRange(int index, ICollection c) throw new NotSupportedException(SR.NotSupported_ReadOnlyCollection); } - public override int LastIndexOf(object value) + public override int LastIndexOf(object? value) { return _list.LastIndexOf(value); } [SuppressMessage("Microsoft.Contracts", "CC1055")] // Skip extra error checking to avoid *potential* AppCompat problems. - public override int LastIndexOf(object value, int startIndex) + public override int LastIndexOf(object? value, int startIndex) { return _list.LastIndexOf(value, startIndex); } [SuppressMessage("Microsoft.Contracts", "CC1055")] // Skip extra error checking to avoid *potential* AppCompat problems. - public override int LastIndexOf(object value, int startIndex, int count) + public override int LastIndexOf(object? value, int startIndex, int count) { return _list.LastIndexOf(value, startIndex, count); } - public override void Remove(object value) + public override void Remove(object? value) { throw new NotSupportedException(SR.NotSupported_ReadOnlyCollection); } @@ -2321,12 +2322,12 @@ public override void Reverse(int index, int count) } [SuppressMessage("Microsoft.Contracts", "CC1055")] // Skip extra error checking to avoid *potential* AppCompat problems. - public override void Sort(int index, int count, IComparer comparer) + public override void Sort(int index, int count, IComparer? comparer) { throw new NotSupportedException(SR.NotSupported_ReadOnlyCollection); } - public override object[] ToArray() + public override object?[] ToArray() { return _list.ToArray(); } @@ -2353,7 +2354,7 @@ private sealed class ArrayListEnumerator : IEnumerator, ICloneable private int _index; private int _endIndex; // Where to stop. private int _version; - private object _currentElement; + private object? _currentElement; private int _startIndex; // Save this for Reset. internal ArrayListEnumerator(ArrayList list, int index, int count) @@ -2384,7 +2385,7 @@ public bool MoveNext() return false; } - public object Current + public object? Current { get { @@ -2436,7 +2437,7 @@ private void InternalUpdateVersion() _version++; } - public override int Add(object value) + public override int Add(object? value) { InternalUpdateRange(); _baseList.Insert(_baseIndex + _baseSize, value); @@ -2461,7 +2462,7 @@ public override void AddRange(ICollection c) } } - public override int BinarySearch(int index, int count, object value, IComparer comparer) + public override int BinarySearch(int index, int count, object? value, IComparer? comparer) { if (index < 0 || count < 0) throw new ArgumentOutOfRangeException(index < 0 ? nameof(index) : nameof(count), SR.ArgumentOutOfRange_NeedNonNegNum); @@ -2508,7 +2509,7 @@ public override object Clone() return arrayList; } - public override bool Contains(object item) + public override bool Contains(object? item) { InternalUpdateRange(); if (item == null) @@ -2521,7 +2522,7 @@ public override bool Contains(object item) else { for (int i = 0; i < _baseSize; i++) - if (_baseList[_baseIndex + i] != null && _baseList[_baseIndex + i].Equals(item)) + if (_baseList[_baseIndex + i] != null && _baseList[_baseIndex + i]!.Equals(item)) // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/34644 return true; return false; } @@ -2619,7 +2620,7 @@ public override object SyncRoot } - public override int IndexOf(object value) + public override int IndexOf(object? value) { InternalUpdateRange(); int i = _baseList.IndexOf(value, _baseIndex, _baseSize); @@ -2627,7 +2628,7 @@ public override int IndexOf(object value) return -1; } - public override int IndexOf(object value, int startIndex) + public override int IndexOf(object? value, int startIndex) { if (startIndex < 0) throw new ArgumentOutOfRangeException(nameof(startIndex), SR.ArgumentOutOfRange_NeedNonNegNum); @@ -2640,7 +2641,7 @@ public override int IndexOf(object value, int startIndex) return -1; } - public override int IndexOf(object value, int startIndex, int count) + public override int IndexOf(object? value, int startIndex, int count) { if (startIndex < 0 || startIndex > _baseSize) throw new ArgumentOutOfRangeException(nameof(startIndex), SR.ArgumentOutOfRange_Index); @@ -2654,7 +2655,7 @@ public override int IndexOf(object value, int startIndex, int count) return -1; } - public override void Insert(int index, object value) + public override void Insert(int index, object? value) { if (index < 0 || index > _baseSize) throw new ArgumentOutOfRangeException(nameof(index), SR.ArgumentOutOfRange_Index); @@ -2682,7 +2683,7 @@ public override void InsertRange(int index, ICollection c) } } - public override int LastIndexOf(object value) + public override int LastIndexOf(object? value) { InternalUpdateRange(); int i = _baseList.LastIndexOf(value, _baseIndex + _baseSize - 1, _baseSize); @@ -2691,13 +2692,13 @@ public override int LastIndexOf(object value) } [SuppressMessage("Microsoft.Contracts", "CC1055")] // Skip extra error checking to avoid *potential* AppCompat problems. - public override int LastIndexOf(object value, int startIndex) + public override int LastIndexOf(object? value, int startIndex) { return LastIndexOf(value, startIndex, startIndex + 1); } [SuppressMessage("Microsoft.Contracts", "CC1055")] // Skip extra error checking to avoid *potential* AppCompat problems. - public override int LastIndexOf(object value, int startIndex, int count) + public override int LastIndexOf(object? value, int startIndex, int count) { InternalUpdateRange(); if (_baseSize == 0) @@ -2767,7 +2768,7 @@ public override void SetRange(int index, ICollection c) } } - public override void Sort(int index, int count, IComparer comparer) + public override void Sort(int index, int count, IComparer? comparer) { if (index < 0 || count < 0) throw new ArgumentOutOfRangeException(index < 0 ? nameof(index) : nameof(count), SR.ArgumentOutOfRange_NeedNonNegNum); @@ -2779,7 +2780,7 @@ public override void Sort(int index, int count, IComparer comparer) InternalUpdateVersion(); } - public override object this[int index] + public override object? this[int index] { get { @@ -2796,11 +2797,11 @@ public override object this[int index] } } - public override object[] ToArray() + public override object?[] ToArray() { InternalUpdateRange(); if (_baseSize == 0) - return Array.Empty(); + return Array.Empty(); object[] array = new object[_baseSize]; Array.Copy(_baseList._items, _baseIndex, array, 0, _baseSize); return array; @@ -2828,7 +2829,7 @@ private sealed class ArrayListEnumeratorSimple : IEnumerator, ICloneable private ArrayList _list; private int _index; private int _version; - private object _currentElement; + private object? _currentElement; private bool _isArrayList; // this object is used to indicate enumeration has not started or has terminated private static object s_dummyObject = new object(); @@ -2881,11 +2882,11 @@ public bool MoveNext() } } - public object Current + public object? Current { get { - object temp = _currentElement; + object? temp = _currentElement; if (s_dummyObject == temp) { // check if enumeration has not started or has terminated if (_index == -1) @@ -2927,7 +2928,7 @@ public ArrayListDebugView(ArrayList arrayList) } [DebuggerBrowsable(DebuggerBrowsableState.RootHidden)] - public object[] Items + public object?[] Items { get { diff --git a/src/Common/src/CoreLib/System/Collections/Comparer.cs b/src/Common/src/CoreLib/System/Collections/Comparer.cs index 24a6cbff622a..2b02433951c7 100644 --- a/src/Common/src/CoreLib/System/Collections/Comparer.cs +++ b/src/Common/src/CoreLib/System/Collections/Comparer.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable /*============================================================ ** ** Purpose: Default IComparer implementation. @@ -35,7 +36,7 @@ private Comparer(SerializationInfo info, StreamingContext context) if (info == null) throw new ArgumentNullException(nameof(info)); - _compareInfo = (CompareInfo)info.GetValue("CompareInfo", typeof(CompareInfo)); + _compareInfo = (CompareInfo)info.GetValue("CompareInfo", typeof(CompareInfo))!; } public void GetObjectData(SerializationInfo info, StreamingContext context) @@ -52,13 +53,13 @@ public void GetObjectData(SerializationInfo info, StreamingContext context) // If a doesn't implement IComparable and b does, -(b.CompareTo(a)) is returned. // Otherwise an exception is thrown. // - public int Compare(object a, object b) + public int Compare(object? a, object? b) { if (a == b) return 0; if (a == null) return -1; if (b == null) return 1; - string sa = a as string; + string? sa = a as string; if (sa != null && b is string sb) return _compareInfo.Compare(sa, sb); diff --git a/src/Common/src/CoreLib/System/Collections/CompatibleComparer.cs b/src/Common/src/CoreLib/System/Collections/CompatibleComparer.cs index 5342dcd6fb91..f4042e50029d 100644 --- a/src/Common/src/CoreLib/System/Collections/CompatibleComparer.cs +++ b/src/Common/src/CoreLib/System/Collections/CompatibleComparer.cs @@ -2,28 +2,29 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable #pragma warning disable 618 // obsolete types namespace System.Collections { internal sealed class CompatibleComparer : IEqualityComparer { - private readonly IHashCodeProvider _hcp; - private readonly IComparer _comparer; + private readonly IHashCodeProvider? _hcp; + private readonly IComparer? _comparer; - internal CompatibleComparer(IHashCodeProvider hashCodeProvider, IComparer comparer) + internal CompatibleComparer(IHashCodeProvider? hashCodeProvider, IComparer? comparer) { _hcp = hashCodeProvider; _comparer = comparer; } - internal IHashCodeProvider HashCodeProvider => _hcp; + internal IHashCodeProvider? HashCodeProvider => _hcp; - internal IComparer Comparer => _comparer; + internal IComparer? Comparer => _comparer; - public new bool Equals(object a, object b) => Compare(a, b) == 0; + public new bool Equals(object? a, object? b) => Compare(a, b) == 0; - public int Compare(object a, object b) + public int Compare(object? a, object? b) { if (a == b) return 0; diff --git a/src/Common/src/CoreLib/System/Collections/HashHelpers.SerializationInfoTable.cs b/src/Common/src/CoreLib/System/Collections/HashHelpers.SerializationInfoTable.cs index d91dfd878e35..5c627afb8fbf 100644 --- a/src/Common/src/CoreLib/System/Collections/HashHelpers.SerializationInfoTable.cs +++ b/src/Common/src/CoreLib/System/Collections/HashHelpers.SerializationInfoTable.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable // Used by Hashtable and Dictionary's SeralizationInfo .ctor's to store the SeralizationInfo // object until OnDeserialization is called. @@ -13,7 +14,7 @@ namespace System.Collections { internal static partial class HashHelpers { - private static ConditionalWeakTable s_serializationInfoTable; + private static ConditionalWeakTable? s_serializationInfoTable; public static ConditionalWeakTable SerializationInfoTable { @@ -22,8 +23,8 @@ public static ConditionalWeakTable SerializationInfoT if (s_serializationInfoTable == null) Interlocked.CompareExchange(ref s_serializationInfoTable, new ConditionalWeakTable(), null); - return s_serializationInfoTable; + return s_serializationInfoTable!; // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/34901 } } } -} \ No newline at end of file +} diff --git a/src/Common/src/CoreLib/System/Collections/HashHelpers.cs b/src/Common/src/CoreLib/System/Collections/HashHelpers.cs index ba2c75c89c88..9cb957e8f480 100644 --- a/src/Common/src/CoreLib/System/Collections/HashHelpers.cs +++ b/src/Common/src/CoreLib/System/Collections/HashHelpers.cs @@ -2,7 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - +#nullable enable using System.Diagnostics; namespace System.Collections diff --git a/src/Common/src/CoreLib/System/Collections/Hashtable.cs b/src/Common/src/CoreLib/System/Collections/Hashtable.cs index 5c562126307d..ae8f6d4de84c 100644 --- a/src/Common/src/CoreLib/System/Collections/Hashtable.cs +++ b/src/Common/src/CoreLib/System/Collections/Hashtable.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable /*============================================================ ** ** Class: Hashtable @@ -127,12 +128,12 @@ the hash table. // This cannot be serialized private struct bucket { - public object key; - public object val; + public object? key; + public object? val; public int hash_coll; // Store hash code; sign bit means there was a collision. } - private bucket[] _buckets; + private bucket[] _buckets = null!; // The total number of entries in the hash table. private int _count; @@ -146,13 +147,13 @@ private struct bucket private volatile int _version; private volatile bool _isWriterInProgress; - private ICollection _keys; - private ICollection _values; + private ICollection? _keys; + private ICollection? _values; - private IEqualityComparer _keycomparer; + private IEqualityComparer? _keycomparer; [Obsolete("Please use EqualityComparer property.")] - protected IHashCodeProvider hcp + protected IHashCodeProvider? hcp { get { @@ -178,7 +179,7 @@ protected IHashCodeProvider hcp } else if (_keycomparer == null) { - _keycomparer = new CompatibleComparer(value, (IComparer)null); + _keycomparer = new CompatibleComparer(value, (IComparer?)null); } else { @@ -188,7 +189,7 @@ protected IHashCodeProvider hcp } [Obsolete("Please use KeyComparer properties.")] - protected IComparer comparer + protected IComparer? comparer { get { @@ -214,7 +215,7 @@ protected IComparer comparer } else if (_keycomparer == null) { - _keycomparer = new CompatibleComparer((IHashCodeProvider)null, value); + _keycomparer = new CompatibleComparer((IHashCodeProvider?)null, value); } else { @@ -224,7 +225,7 @@ protected IComparer comparer } - protected IEqualityComparer EqualityComparer + protected IEqualityComparer? EqualityComparer { get { @@ -290,28 +291,28 @@ public Hashtable(int capacity, float loadFactor) Debug.Assert(_loadsize < hashsize, "Invalid hashtable loadsize!"); } - public Hashtable(int capacity, float loadFactor, IEqualityComparer equalityComparer) : this(capacity, loadFactor) + public Hashtable(int capacity, float loadFactor, IEqualityComparer? equalityComparer) : this(capacity, loadFactor) { _keycomparer = equalityComparer; } [Obsolete("Please use Hashtable(IEqualityComparer) instead.")] - public Hashtable(IHashCodeProvider hcp, IComparer comparer) + public Hashtable(IHashCodeProvider? hcp, IComparer? comparer) : this(0, 1.0f, hcp, comparer) { } - public Hashtable(IEqualityComparer equalityComparer) : this(0, 1.0f, equalityComparer) + public Hashtable(IEqualityComparer? equalityComparer) : this(0, 1.0f, equalityComparer) { } [Obsolete("Please use Hashtable(int, IEqualityComparer) instead.")] - public Hashtable(int capacity, IHashCodeProvider hcp, IComparer comparer) + public Hashtable(int capacity, IHashCodeProvider? hcp, IComparer? comparer) : this(capacity, 1.0f, hcp, comparer) { } - public Hashtable(int capacity, IEqualityComparer equalityComparer) + public Hashtable(int capacity, IEqualityComparer? equalityComparer) : this(capacity, 1.0f, equalityComparer) { } @@ -327,23 +328,23 @@ public Hashtable(IDictionary d) : this(d, 1.0f) // dictionary. The hashtable is created with the given load factor. // public Hashtable(IDictionary d, float loadFactor) - : this(d, loadFactor, (IEqualityComparer)null) + : this(d, loadFactor, (IEqualityComparer?)null) { } [Obsolete("Please use Hashtable(IDictionary, IEqualityComparer) instead.")] - public Hashtable(IDictionary d, IHashCodeProvider hcp, IComparer comparer) + public Hashtable(IDictionary d, IHashCodeProvider? hcp, IComparer? comparer) : this(d, 1.0f, hcp, comparer) { } - public Hashtable(IDictionary d, IEqualityComparer equalityComparer) + public Hashtable(IDictionary d, IEqualityComparer? equalityComparer) : this(d, 1.0f, equalityComparer) { } [Obsolete("Please use Hashtable(int, float, IEqualityComparer) instead.")] - public Hashtable(int capacity, float loadFactor, IHashCodeProvider hcp, IComparer comparer) + public Hashtable(int capacity, float loadFactor, IHashCodeProvider? hcp, IComparer? comparer) : this(capacity, loadFactor) { if (hcp != null || comparer != null) @@ -353,7 +354,7 @@ public Hashtable(int capacity, float loadFactor, IHashCodeProvider hcp, ICompare } [Obsolete("Please use Hashtable(IDictionary, float, IEqualityComparer) instead.")] - public Hashtable(IDictionary d, float loadFactor, IHashCodeProvider hcp, IComparer comparer) + public Hashtable(IDictionary d, float loadFactor, IHashCodeProvider? hcp, IComparer? comparer) : this((d != null ? d.Count : 0), loadFactor, hcp, comparer) { if (d == null) @@ -364,7 +365,7 @@ public Hashtable(IDictionary d, float loadFactor, IHashCodeProvider hcp, ICompar Add(e.Key, e.Value); } - public Hashtable(IDictionary d, float loadFactor, IEqualityComparer equalityComparer) + public Hashtable(IDictionary d, float loadFactor, IEqualityComparer? equalityComparer) : this((d != null ? d.Count : 0), loadFactor, equalityComparer) { if (d == null) @@ -422,7 +423,7 @@ private uint InitHash(object key, int hashsize, out uint seed, out uint incr) // ArgumentException is thrown if the key is null or if the key is already // present in the hashtable. // - public virtual void Add(object key, object value) + public virtual void Add(object key, object? value) { Insert(key, value, true); } @@ -464,7 +465,7 @@ public virtual object Clone() while (bucket > 0) { bucket--; - object keyv = lbuckets[bucket].key; + object? keyv = lbuckets[bucket].key; if ((keyv != null) && (keyv != lbuckets)) { ht[keyv] = lbuckets[bucket].val; @@ -522,7 +523,7 @@ public virtual bool ContainsKey(object key) // search and is thus be substantially slower than the ContainsKey // method. // - public virtual bool ContainsValue(object value) + public virtual bool ContainsValue(object? value) { if (value == null) { @@ -536,7 +537,7 @@ public virtual bool ContainsValue(object value) { for (int i = _buckets.Length; --i >= 0;) { - object val = _buckets[i].val; + object? val = _buckets[i].val; if (val != null && val.Equals(value)) return true; } @@ -555,7 +556,7 @@ private void CopyKeys(Array array, int arrayIndex) bucket[] lbuckets = _buckets; for (int i = lbuckets.Length; --i >= 0;) { - object keyv = lbuckets[i].key; + object? keyv = lbuckets[i].key; if ((keyv != null) && (keyv != _buckets)) { array.SetValue(keyv, arrayIndex++); @@ -574,7 +575,7 @@ private void CopyEntries(Array array, int arrayIndex) bucket[] lbuckets = _buckets; for (int i = lbuckets.Length; --i >= 0;) { - object keyv = lbuckets[i].key; + object? keyv = lbuckets[i].key; if ((keyv != null) && (keyv != _buckets)) { DictionaryEntry entry = new DictionaryEntry(keyv, lbuckets[i].val); @@ -610,7 +611,7 @@ internal virtual KeyValuePairs[] ToKeyValuePairsArray() bucket[] lbuckets = _buckets; for (int i = lbuckets.Length; --i >= 0;) { - object keyv = lbuckets[i].key; + object? keyv = lbuckets[i].key; if ((keyv != null) && (keyv != _buckets)) { array[index++] = new KeyValuePairs(keyv, lbuckets[i].val); @@ -632,7 +633,7 @@ private void CopyValues(Array array, int arrayIndex) bucket[] lbuckets = _buckets; for (int i = lbuckets.Length; --i >= 0;) { - object keyv = lbuckets[i].key; + object? keyv = lbuckets[i].key; if ((keyv != null) && (keyv != _buckets)) { array.SetValue(lbuckets[i].val, arrayIndex++); @@ -643,7 +644,7 @@ private void CopyValues(Array array, int arrayIndex) // Returns the value associated with the given key. If an entry with the // given key is not found, the returned value is null. // - public virtual object this[object key] + public virtual object? this[object key] { get { @@ -826,7 +827,7 @@ public virtual bool IsSynchronized // instance in the constructor, this method will call comparer.Compare(item, key). // Otherwise, it will call item.Equals(key). // - protected virtual bool KeyEquals(object item, object key) + protected virtual bool KeyEquals(object? item, object key) { Debug.Assert(key != null, "key can't be null here!"); if (object.ReferenceEquals(_buckets, item)) @@ -884,7 +885,7 @@ public virtual ICollection Values // Inserts an entry into this hashtable. This method is called from the Set // and Add methods. If the add parameter is true and the given key already // exists in the hashtable, an exception is thrown. - private void Insert(object key, object nvalue, bool add) + private void Insert(object key, object? nvalue, bool add) { if (key == null) { @@ -997,7 +998,7 @@ private void Insert(object key, object nvalue, bool add) throw new InvalidOperationException(SR.InvalidOperation_HashInsertFailed); } - private void putEntry(bucket[] newBuckets, object key, object nvalue, int hashcode) + private void putEntry(bucket[] newBuckets, object key, object? nvalue, int hashcode) { Debug.Assert(hashcode >= 0, "hashcode >= 0"); // make sure collision bit (sign bit) wasn't set. @@ -1114,7 +1115,7 @@ public virtual void GetObjectData(SerializationInfo info, StreamingContext conte // Also, if the Hashtable is using randomized hashing, serialize the old // view of the _keycomparer so perevious frameworks don't see the new types #pragma warning disable 618 - IEqualityComparer keyComparerForSerilization = _keycomparer; + IEqualityComparer? keyComparerForSerilization = _keycomparer; if (keyComparerForSerilization == null) { @@ -1123,7 +1124,7 @@ public virtual void GetObjectData(SerializationInfo info, StreamingContext conte } else if (keyComparerForSerilization is CompatibleComparer) { - CompatibleComparer c = keyComparerForSerilization as CompatibleComparer; + CompatibleComparer c = (keyComparerForSerilization as CompatibleComparer)!; info.AddValue(ComparerName, c.Comparer, typeof(IComparer)); info.AddValue(HashCodeProviderName, c.HashCodeProvider, typeof(IHashCodeProvider)); } @@ -1170,14 +1171,14 @@ public virtual void OnDeserialization(object sender) } int hashsize = 0; - IComparer c = null; + IComparer? c = null; #pragma warning disable 618 - IHashCodeProvider hcp = null; + IHashCodeProvider? hcp = null; #pragma warning restore 618 - object[] serKeys = null; - object[] serValues = null; + object[]? serKeys = null; + object?[]? serValues = null; SerializationInfoEnumerator enumerator = siInfo.GetEnumerator(); @@ -1192,21 +1193,21 @@ public virtual void OnDeserialization(object sender) hashsize = siInfo.GetInt32(HashSizeName); break; case KeyComparerName: - _keycomparer = (IEqualityComparer)siInfo.GetValue(KeyComparerName, typeof(IEqualityComparer)); + _keycomparer = (IEqualityComparer?)siInfo.GetValue(KeyComparerName, typeof(IEqualityComparer)); break; case ComparerName: - c = (IComparer)siInfo.GetValue(ComparerName, typeof(IComparer)); + c = (IComparer?)siInfo.GetValue(ComparerName, typeof(IComparer)); break; case HashCodeProviderName: #pragma warning disable 618 - hcp = (IHashCodeProvider)siInfo.GetValue(HashCodeProviderName, typeof(IHashCodeProvider)); + hcp = (IHashCodeProvider?)siInfo.GetValue(HashCodeProviderName, typeof(IHashCodeProvider)); #pragma warning restore 618 break; case KeysName: - serKeys = (object[])siInfo.GetValue(KeysName, typeof(object[])); + serKeys = (object[]?)siInfo.GetValue(KeysName, typeof(object[])); break; case ValuesName: - serValues = (object[])siInfo.GetValue(ValuesName, typeof(object[])); + serValues = (object?[]?)siInfo.GetValue(ValuesName, typeof(object[])); break; } } @@ -1377,7 +1378,7 @@ public override bool IsSynchronized get { return true; } } - public override object this[object key] + public override object? this[object key] { get { @@ -1397,7 +1398,7 @@ public override object SyncRoot get { return _table.SyncRoot; } } - public override void Add(object key, object value) + public override void Add(object key, object? value) { lock (_table.SyncRoot) { @@ -1427,7 +1428,7 @@ public override bool ContainsKey(object key) return _table.ContainsKey(key); } - public override bool ContainsValue(object key) + public override bool ContainsValue(object? key) { lock (_table.SyncRoot) { @@ -1515,8 +1516,8 @@ private class HashtableEnumerator : IDictionaryEnumerator, ICloneable private int _version; private bool _current; private int _getObjectRetType; // What should GetObject return? - private object _currentKey; - private object _currentValue; + private object? _currentKey; + private object? _currentValue; internal const int Keys = 1; internal const int Values = 2; @@ -1539,7 +1540,7 @@ public virtual object Key { if (_current == false) throw new InvalidOperationException(SR.InvalidOperation_EnumNotStarted); - return _currentKey; + return _currentKey!; } } @@ -1550,7 +1551,7 @@ public virtual bool MoveNext() while (_bucket > 0) { _bucket--; - object keyv = _hashtable._buckets[_bucket].key; + object? keyv = _hashtable._buckets[_bucket].key; if ((keyv != null) && (keyv != _hashtable._buckets)) { _currentKey = keyv; @@ -1569,12 +1570,12 @@ public virtual DictionaryEntry Entry { if (_current == false) throw new InvalidOperationException(SR.InvalidOperation_EnumOpCantHappen); - return new DictionaryEntry(_currentKey, _currentValue); + return new DictionaryEntry(_currentKey!, _currentValue); } } - public virtual object Current + public virtual object? Current { get { @@ -1586,11 +1587,11 @@ public virtual object Current else if (_getObjectRetType == Values) return _currentValue; else - return new DictionaryEntry(_currentKey, _currentValue); + return new DictionaryEntry(_currentKey!, _currentValue); } } - public virtual object Value + public virtual object? Value { get { diff --git a/src/Common/src/CoreLib/System/Collections/ICollection.cs b/src/Common/src/CoreLib/System/Collections/ICollection.cs index 65e37c73813b..95ebb7e808d3 100644 --- a/src/Common/src/CoreLib/System/Collections/ICollection.cs +++ b/src/Common/src/CoreLib/System/Collections/ICollection.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable using System; namespace System.Collections diff --git a/src/Common/src/CoreLib/System/Collections/IHashCodeProvider.cs b/src/Common/src/CoreLib/System/Collections/IHashCodeProvider.cs index 7d6c63f9f1db..260aab2acd50 100644 --- a/src/Common/src/CoreLib/System/Collections/IHashCodeProvider.cs +++ b/src/Common/src/CoreLib/System/Collections/IHashCodeProvider.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable namespace System.Collections { /// diff --git a/src/Common/src/CoreLib/System/Collections/IList.cs b/src/Common/src/CoreLib/System/Collections/IList.cs index 25d3b1922690..0857885a973c 100644 --- a/src/Common/src/CoreLib/System/Collections/IList.cs +++ b/src/Common/src/CoreLib/System/Collections/IList.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable using System; namespace System.Collections @@ -12,7 +13,7 @@ namespace System.Collections public interface IList : ICollection { // The Item property provides methods to read and edit entries in the List. - object this[int index] + object? this[int index] { get; set; @@ -22,10 +23,10 @@ object this[int index] // implementation-dependent, so while ArrayList may always insert // in the last available location, a SortedList most likely would not. // The return value is the position the new element was inserted in. - int Add(object value); + int Add(object? value); // Returns whether the list contains a particular item. - bool Contains(object value); + bool Contains(object? value); // Removes all items from the list. void Clear(); @@ -42,16 +43,16 @@ bool IsFixedSize // Returns the index of a particular item, if it is in the list. // Returns -1 if the item isn't in the list. - int IndexOf(object value); + int IndexOf(object? value); // Inserts value into the list at position index. // index must be non-negative and less than or equal to the // number of elements in the list. If index equals the number // of items in the list, then value is appended to the end. - void Insert(int index, object value); + void Insert(int index, object? value); // Removes an item from the list. - void Remove(object value); + void Remove(object? value); // Removes the item at position index. void RemoveAt(int index); diff --git a/src/Common/src/CoreLib/System/Collections/IStructuralComparable.cs b/src/Common/src/CoreLib/System/Collections/IStructuralComparable.cs index 9041e0d5ff2e..b012618c89a7 100644 --- a/src/Common/src/CoreLib/System/Collections/IStructuralComparable.cs +++ b/src/Common/src/CoreLib/System/Collections/IStructuralComparable.cs @@ -2,12 +2,13 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable using System; namespace System.Collections { public interface IStructuralComparable { - int CompareTo(object other, IComparer comparer); + int CompareTo(object? other, IComparer comparer); } } diff --git a/src/Common/src/CoreLib/System/Collections/KeyValuePairs.cs b/src/Common/src/CoreLib/System/Collections/KeyValuePairs.cs index 9ec6365b92f7..26043311cdf2 100644 --- a/src/Common/src/CoreLib/System/Collections/KeyValuePairs.cs +++ b/src/Common/src/CoreLib/System/Collections/KeyValuePairs.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable /*============================================================ ** ** Class: KeyValuePairs @@ -22,9 +23,9 @@ internal class KeyValuePairs private readonly object _key; [DebuggerBrowsable(DebuggerBrowsableState.Never)] - private readonly object _value; + private readonly object? _value; - public KeyValuePairs(object key, object value) + public KeyValuePairs(object key, object? value) { _value = value; _key = key; diff --git a/src/Common/src/CoreLib/System/Collections/ListDictionaryInternal.cs b/src/Common/src/CoreLib/System/Collections/ListDictionaryInternal.cs index 1bc61db2a377..ce9caed784c0 100644 --- a/src/Common/src/CoreLib/System/Collections/ListDictionaryInternal.cs +++ b/src/Common/src/CoreLib/System/Collections/ListDictionaryInternal.cs @@ -12,7 +12,7 @@ ** ===========================================================*/ - +#nullable enable namespace System.Collections { /// This is a simple implementation of IDictionary using a singly linked list. This @@ -23,7 +23,7 @@ namespace System.Collections // Needs to be public to support binary serialization compatibility public class ListDictionaryInternal : IDictionary { - private DictionaryNode head; // Do not rename (binary serialization) + private DictionaryNode? head; // Do not rename (binary serialization) private int version; // Do not rename (binary serialization) private int count; // Do not rename (binary serialization) @@ -31,7 +31,7 @@ public ListDictionaryInternal() { } - public object this[object key] + public object? this[object key] { get { @@ -39,7 +39,7 @@ public object this[object key] { throw new ArgumentNullException(nameof(key), SR.ArgumentNull_Key); } - DictionaryNode node = head; + DictionaryNode? node = head; while (node != null) { @@ -60,8 +60,8 @@ public object this[object key] version++; - DictionaryNode last = null; - DictionaryNode node; + DictionaryNode? last = null; + DictionaryNode? node; for (node = head; node != null; node = node.next) { if (node.key.Equals(key)) @@ -142,7 +142,7 @@ public ICollection Values } } - public void Add(object key, object value) + public void Add(object key, object? value) { if (key == null) { @@ -151,8 +151,8 @@ public void Add(object key, object value) version++; - DictionaryNode last = null; - DictionaryNode node; + DictionaryNode? last = null; + DictionaryNode? node; for (node = head; node != null; node = node.next) { if (node.key.Equals(key)) @@ -195,7 +195,7 @@ public bool Contains(object key) { throw new ArgumentNullException(nameof(key), SR.ArgumentNull_Key); } - for (DictionaryNode node = head; node != null; node = node.next) + for (DictionaryNode? node = head; node != null; node = node.next) { if (node.key.Equals(key)) { @@ -219,7 +219,7 @@ public void CopyTo(Array array, int index) if (array.Length - index < this.Count) throw new ArgumentException(SR.ArgumentOutOfRange_Index, nameof(index)); - for (DictionaryNode node = head; node != null; node = node.next) + for (DictionaryNode? node = head; node != null; node = node.next) { array.SetValue(new DictionaryEntry(node.key, node.value), index); index++; @@ -243,8 +243,8 @@ public void Remove(object key) throw new ArgumentNullException(nameof(key), SR.ArgumentNull_Key); } version++; - DictionaryNode last = null; - DictionaryNode node; + DictionaryNode? last = null; + DictionaryNode? node; for (node = head; node != null; node = node.next) { if (node.key.Equals(key)) @@ -263,7 +263,7 @@ public void Remove(object key) } else { - last.next = node.next; + last!.next = node.next; } count--; } @@ -271,7 +271,7 @@ public void Remove(object key) private class NodeEnumerator : IDictionaryEnumerator { private ListDictionaryInternal list; - private DictionaryNode current; + private DictionaryNode? current; private int version; private bool start; @@ -284,7 +284,9 @@ public NodeEnumerator(ListDictionaryInternal list) current = null; } +#pragma warning disable CS8612 // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/30958 public object Current +#pragma warning restore CS8612 { get { @@ -316,7 +318,7 @@ public object Key } } - public object Value + public object? Value { get { @@ -382,7 +384,7 @@ void ICollection.CopyTo(Array array, int index) throw new ArgumentOutOfRangeException(nameof(index), SR.ArgumentOutOfRange_NeedNonNegNum); if (array.Length - index < list.Count) throw new ArgumentException(SR.ArgumentOutOfRange_Index, nameof(index)); - for (DictionaryNode node = list.head; node != null; node = node.next) + for (DictionaryNode? node = list.head; node != null; node = node.next) { array.SetValue(isKeys ? node.key : node.value, index); index++; @@ -394,7 +396,7 @@ int ICollection.Count get { int count = 0; - for (DictionaryNode node = list.head; node != null; node = node.next) + for (DictionaryNode? node = list.head; node != null; node = node.next) { count++; } @@ -427,7 +429,7 @@ IEnumerator IEnumerable.GetEnumerator() private class NodeKeyValueEnumerator : IEnumerator { private ListDictionaryInternal list; - private DictionaryNode current; + private DictionaryNode? current; private int version; private bool isKeys; private bool start; @@ -441,7 +443,7 @@ public NodeKeyValueEnumerator(ListDictionaryInternal list, bool isKeys) current = null; } - public object Current + public object? Current { get { @@ -489,9 +491,9 @@ public void Reset() [Serializable] private class DictionaryNode { - public object key; - public object value; - public DictionaryNode next; + public object key = null!; + public object? value; + public DictionaryNode? next; } } } diff --git a/src/Common/src/CoreLib/System/Collections/ObjectModel/ReadOnlyCollection.cs b/src/Common/src/CoreLib/System/Collections/ObjectModel/ReadOnlyCollection.cs index 10795acd7c9e..9ab299bef991 100644 --- a/src/Common/src/CoreLib/System/Collections/ObjectModel/ReadOnlyCollection.cs +++ b/src/Common/src/CoreLib/System/Collections/ObjectModel/ReadOnlyCollection.cs @@ -211,7 +211,7 @@ bool IList.IsReadOnly } } - int IList.Add(object value) + int IList.Add(object? value) { ThrowHelper.ThrowNotSupportedException(ExceptionResource.NotSupported_ReadOnlyCollection); return -1; @@ -247,12 +247,12 @@ int IList.IndexOf(object? value) return -1; } - void IList.Insert(int index, object value) + void IList.Insert(int index, object? value) { ThrowHelper.ThrowNotSupportedException(ExceptionResource.NotSupported_ReadOnlyCollection); } - void IList.Remove(object value) + void IList.Remove(object? value) { ThrowHelper.ThrowNotSupportedException(ExceptionResource.NotSupported_ReadOnlyCollection); } diff --git a/src/Common/src/CoreLib/System/CurrentSystemTimeZone.cs b/src/Common/src/CoreLib/System/CurrentSystemTimeZone.cs index 5b5fdd63aa7c..f88ea79738d3 100644 --- a/src/Common/src/CoreLib/System/CurrentSystemTimeZone.cs +++ b/src/Common/src/CoreLib/System/CurrentSystemTimeZone.cs @@ -207,7 +207,7 @@ private DaylightTime GetCachedDaylightChanges(int year) } } - return (DaylightTime)m_CachedDaylightChanges[objYear]; + return (DaylightTime)m_CachedDaylightChanges[objYear]!; } // The per-year information is cached in this instance value. As a result it can diff --git a/src/Common/src/CoreLib/System/Security/SecurityElement.cs b/src/Common/src/CoreLib/System/Security/SecurityElement.cs index 197eaa079b0c..bdefc7d27275 100644 --- a/src/Common/src/CoreLib/System/Security/SecurityElement.cs +++ b/src/Common/src/CoreLib/System/Security/SecurityElement.cs @@ -124,7 +124,7 @@ public Hashtable? Attributes for (int i = 0; i < iMax; i += 2) { - hashtable.Add(_attributes[i], _attributes[i + 1]); + hashtable.Add(_attributes[i]!, _attributes[i + 1]); } return hashtable; @@ -231,7 +231,7 @@ internal void AddAttributeSafe(string name, string value) for (int i = 0; i < iMax; i += 2) { - string strAttrName = (string)_attributes[i]; + string? strAttrName = (string?)_attributes[i]; if (string.Equals(strAttrName, name)) throw new ArgumentException(SR.Argument_AttributeNamesMustBeUnique); @@ -301,8 +301,8 @@ public bool Equal(SecurityElement? other) for (int i = 0; i < iMax; i++) { - string lhs = (string)_attributes[i]; - string rhs = (string)other._attributes[i]; + string? lhs = (string?)_attributes[i]; + string? rhs = (string?)other._attributes[i]; if (!string.Equals(lhs, rhs)) return false; @@ -524,8 +524,8 @@ private void ToString(string indent, object obj, Action write) for (int i = 0; i < iMax; i += 2) { - string strAttrName = (string)_attributes[i]; - string strAttrValue = (string)_attributes[i + 1]; + string? strAttrName = (string?)_attributes[i]; + string? strAttrValue = (string?)_attributes[i + 1]; write(obj, strAttrName); write(obj, "=\""); @@ -562,7 +562,7 @@ private void ToString(string indent, object obj, Action write) for (int i = 0; i < _children.Count; ++i) { - ((SecurityElement)_children[i]).ToString(string.Empty, obj, write); + ((SecurityElement)_children[i]!).ToString(string.Empty, obj, write); } } @@ -591,11 +591,11 @@ private void ToString(string indent, object obj, Action write) for (int i = 0; i < iMax; i += 2) { - string strAttrName = (string)_attributes[i]; + string? strAttrName = (string?)_attributes[i]; if (string.Equals(strAttrName, name)) { - string strAttrValue = (string)_attributes[i + 1]; + string? strAttrValue = (string?)_attributes[i + 1]; return Unescape(strAttrValue); } diff --git a/src/Common/src/CoreLib/System/Text/EncodingTable.cs b/src/Common/src/CoreLib/System/Text/EncodingTable.cs index 14c9bbe329da..7f4d746f637e 100644 --- a/src/Common/src/CoreLib/System/Text/EncodingTable.cs +++ b/src/Common/src/CoreLib/System/Text/EncodingTable.cs @@ -34,7 +34,7 @@ internal static int GetCodePageFromName(string name) if (name == null) throw new ArgumentNullException(nameof(name)); - object codePageObj; + object? codePageObj; codePageObj = s_nameToCodePage[name]; if (codePageObj != null) diff --git a/src/Common/src/CoreLib/System/Tuple.cs b/src/Common/src/CoreLib/System/Tuple.cs index bcfd4ce11572..d3f0a91e394c 100644 --- a/src/Common/src/CoreLib/System/Tuple.cs +++ b/src/Common/src/CoreLib/System/Tuple.cs @@ -138,7 +138,7 @@ int IComparable.CompareTo(object? obj) return ((IStructuralComparable)this).CompareTo(obj, Comparer.Default); } - int IStructuralComparable.CompareTo(object other, IComparer comparer) + int IStructuralComparable.CompareTo(object? other, IComparer comparer) { if (other == null) return 1; @@ -237,7 +237,7 @@ int IComparable.CompareTo(object? obj) return ((IStructuralComparable)this).CompareTo(obj, Comparer.Default); } - int IStructuralComparable.CompareTo(object other, IComparer comparer) + int IStructuralComparable.CompareTo(object? other, IComparer comparer) { if (other == null) return 1; @@ -351,7 +351,7 @@ int IComparable.CompareTo(object? obj) return ((IStructuralComparable)this).CompareTo(obj, Comparer.Default); } - int IStructuralComparable.CompareTo(object other, IComparer comparer) + int IStructuralComparable.CompareTo(object? other, IComparer comparer) { if (other == null) return 1; @@ -476,7 +476,7 @@ int IComparable.CompareTo(object? obj) return ((IStructuralComparable)this).CompareTo(obj, Comparer.Default); } - int IStructuralComparable.CompareTo(object other, IComparer comparer) + int IStructuralComparable.CompareTo(object? other, IComparer comparer) { if (other == null) return 1; @@ -612,7 +612,7 @@ int IComparable.CompareTo(object? obj) return ((IStructuralComparable)this).CompareTo(obj, Comparer.Default); } - int IStructuralComparable.CompareTo(object other, IComparer comparer) + int IStructuralComparable.CompareTo(object? other, IComparer comparer) { if (other == null) return 1; @@ -759,7 +759,7 @@ int IComparable.CompareTo(object? obj) return ((IStructuralComparable)this).CompareTo(obj, Comparer.Default); } - int IStructuralComparable.CompareTo(object other, IComparer comparer) + int IStructuralComparable.CompareTo(object? other, IComparer comparer) { if (other == null) return 1; @@ -917,7 +917,7 @@ int IComparable.CompareTo(object? obj) return ((IStructuralComparable)this).CompareTo(obj, Comparer.Default); } - int IStructuralComparable.CompareTo(object other, IComparer comparer) + int IStructuralComparable.CompareTo(object? other, IComparer comparer) { if (other == null) return 1; @@ -1091,7 +1091,7 @@ int IComparable.CompareTo(object? obj) return ((IStructuralComparable)this).CompareTo(obj, Comparer.Default); } - int IStructuralComparable.CompareTo(object other, IComparer comparer) + int IStructuralComparable.CompareTo(object? other, IComparer comparer) { if (other == null) return 1; diff --git a/src/Common/src/CoreLib/System/ValueTuple.cs b/src/Common/src/CoreLib/System/ValueTuple.cs index b227535d2762..663c1ae96711 100644 --- a/src/Common/src/CoreLib/System/ValueTuple.cs +++ b/src/Common/src/CoreLib/System/ValueTuple.cs @@ -82,7 +82,7 @@ public int CompareTo(ValueTuple other) return 0; } - int IStructuralComparable.CompareTo(object other, IComparer comparer) + int IStructuralComparable.CompareTo(object? other, IComparer comparer) { if (other == null) return 1; @@ -387,7 +387,7 @@ public int CompareTo(ValueTuple other) return Comparer.Default.Compare(Item1, other.Item1); } - int IStructuralComparable.CompareTo(object other, IComparer comparer) + int IStructuralComparable.CompareTo(object? other, IComparer comparer) { if (other == null) return 1; @@ -582,7 +582,7 @@ public int CompareTo(ValueTuple other) return Comparer.Default.Compare(Item2, other.Item2); } - int IStructuralComparable.CompareTo(object other, IComparer comparer) + int IStructuralComparable.CompareTo(object? other, IComparer comparer) { if (other == null) return 1; @@ -785,7 +785,7 @@ public int CompareTo(ValueTuple other) return Comparer.Default.Compare(Item3, other.Item3); } - int IStructuralComparable.CompareTo(object other, IComparer comparer) + int IStructuralComparable.CompareTo(object? other, IComparer comparer) { if (other == null) return 1; @@ -1005,7 +1005,7 @@ public int CompareTo(ValueTuple other) return Comparer.Default.Compare(Item4, other.Item4); } - int IStructuralComparable.CompareTo(object other, IComparer comparer) + int IStructuralComparable.CompareTo(object? other, IComparer comparer) { if (other == null) return 1; @@ -1244,7 +1244,7 @@ public int CompareTo(ValueTuple other) return Comparer.Default.Compare(Item5, other.Item5); } - int IStructuralComparable.CompareTo(object other, IComparer comparer) + int IStructuralComparable.CompareTo(object? other, IComparer comparer) { if (other == null) return 1; @@ -1502,7 +1502,7 @@ public int CompareTo(ValueTuple other) return Comparer.Default.Compare(Item6, other.Item6); } - int IStructuralComparable.CompareTo(object other, IComparer comparer) + int IStructuralComparable.CompareTo(object? other, IComparer comparer) { if (other == null) return 1; @@ -1779,7 +1779,7 @@ public int CompareTo(ValueTuple other) return Comparer.Default.Compare(Item7, other.Item7); } - int IStructuralComparable.CompareTo(object other, IComparer comparer) + int IStructuralComparable.CompareTo(object? other, IComparer comparer) { if (other == null) return 1; @@ -2081,7 +2081,7 @@ public int CompareTo(ValueTuple other) return Comparer.Default.Compare(Rest, other.Rest); } - int IStructuralComparable.CompareTo(object other, IComparer comparer) + int IStructuralComparable.CompareTo(object? other, IComparer comparer) { if (other == null) return 1; From 0e2731784dbe50d84d8abe02f9f933095ac22045 Mon Sep 17 00:00:00 2001 From: Krzysztof Wicher Date: Wed, 1 May 2019 21:21:29 -0700 Subject: [PATCH 179/607] Nullable: Interop and src/System remainder (dotnet/coreclr#24328) * Nullable: Interop and src/System remainder * apply feedback Signed-off-by: dotnet-bot --- .../src/CoreLib/Interop/Windows/Kernel32/Interop.FILE_TIME.cs | 1 + .../Interop/Windows/Kernel32/Interop.GET_FILEEX_INFO_LEVELS.cs | 1 + .../Windows/Kernel32/Interop.WIN32_FILE_ATTRIBUTE_DATA.cs | 1 + .../CoreLib/Interop/Windows/Kernel32/Interop.WIN32_FIND_DATA.cs | 1 + 4 files changed, 4 insertions(+) diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.FILE_TIME.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.FILE_TIME.cs index d3b055e287db..713e9577eda2 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.FILE_TIME.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.FILE_TIME.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable using System; internal partial class Interop diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GET_FILEEX_INFO_LEVELS.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GET_FILEEX_INFO_LEVELS.cs index 76e43f64af77..28c30d57b49a 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GET_FILEEX_INFO_LEVELS.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GET_FILEEX_INFO_LEVELS.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable internal partial class Interop { internal partial class Kernel32 diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.WIN32_FILE_ATTRIBUTE_DATA.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.WIN32_FILE_ATTRIBUTE_DATA.cs index 971b311244a7..1bd7ed084584 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.WIN32_FILE_ATTRIBUTE_DATA.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.WIN32_FILE_ATTRIBUTE_DATA.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable internal partial class Interop { internal partial class Kernel32 diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.WIN32_FIND_DATA.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.WIN32_FIND_DATA.cs index c8d319d766d7..f44400767885 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.WIN32_FIND_DATA.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.WIN32_FIND_DATA.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable using System; using System.Runtime.InteropServices; From f5b57382cd5fef53cf09e5fd6b9b9812dfddb953 Mon Sep 17 00:00:00 2001 From: Ludovic Henry Date: Thu, 2 May 2019 07:39:19 -0700 Subject: [PATCH 180/607] Implement GC.RegisterMemoryLoadChangeNotification (dotnet/coreclr#24202) * Implement GC.RegisterMemoryLoadChangeNotification This allows users to register a callback to be called whenever the memory load is between a low and high thresholds. The idea is to allow them to tweak their memory usage based on the available memory. It is only internal for now because we are not confident on the shape of the API and if it's the best we can provide users. This needs to go through a few iterations with first party users like ASP.NET or corefx. WIP for https://github.com/dotnet/coreclr/issues/18619 * fixup! Implement GC.RegisterMemoryLoadChangeNotification * fixup! Implement GC.RegisterMemoryLoadChangeNotification * fixup! Implement GC.RegisterMemoryLoadChangeNotification Signed-off-by: dotnet-bot --- .../src/CoreLib/System/Gen2GcCallback.cs | 80 ++++++++++++++----- 1 file changed, 61 insertions(+), 19 deletions(-) diff --git a/src/Common/src/CoreLib/System/Gen2GcCallback.cs b/src/Common/src/CoreLib/System/Gen2GcCallback.cs index 10dffb544ad4..88de270ad704 100644 --- a/src/Common/src/CoreLib/System/Gen2GcCallback.cs +++ b/src/Common/src/CoreLib/System/Gen2GcCallback.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. #nullable enable +using System.Diagnostics; using System.Runtime.ConstrainedExecution; using System.Runtime.InteropServices; @@ -14,15 +15,31 @@ namespace System /// internal sealed class Gen2GcCallback : CriticalFinalizerObject { - private readonly Func _callback; + private readonly Func? _callback0; + private readonly Func? _callback1; private readonly GCHandle _weakTargetObj; + private Gen2GcCallback(Func callback) + { + _callback0 = callback; + } + private Gen2GcCallback(Func callback, object targetObj) { - _callback = callback; + _callback1 = callback; _weakTargetObj = GCHandle.Alloc(targetObj, GCHandleType.Weak); } + /// + /// Schedule 'callback' to be called in the next GC. If the callback returns true it is + /// rescheduled for the next Gen 2 GC. Otherwise the callbacks stop. + /// + public static void Register(Func callback) + { + // Create a unreachable object that remembers the callback function and target object. + new Gen2GcCallback(callback); + } + /// /// Schedule 'callback' to be called in the next GC. If the callback returns true it is /// rescheduled for the next Gen 2 GC. Otherwise the callbacks stop. @@ -38,31 +55,56 @@ public static void Register(Func callback, object targetObj) ~Gen2GcCallback() { - // Check to see if the target object is still alive. - object? targetObj = _weakTargetObj.Target; - if (targetObj == null) - { - // The target object is dead, so this callback object is no longer needed. - _weakTargetObj.Free(); - return; - } - - // Execute the callback method. - try + if (_weakTargetObj.IsAllocated) { - if (!_callback(targetObj)) + // Check to see if the target object is still alive. + object? targetObj = _weakTargetObj.Target; + if (targetObj == null) { - // If the callback returns false, this callback object is no longer needed. + // The target object is dead, so this callback object is no longer needed. + _weakTargetObj.Free(); return; } + + // Execute the callback method. + try + { + Debug.Assert(_callback1 != null); + if (!_callback1(targetObj)) + { + // If the callback returns false, this callback object is no longer needed. + return; + } + } + catch + { + // Ensure that we still get a chance to resurrect this object, even if the callback throws an exception. +#if DEBUG + // Except in DEBUG, as we really shouldn't be hitting any exceptions here. + throw; +#endif + } } - catch + else { - // Ensure that we still get a chance to resurrect this object, even if the callback throws an exception. + // Execute the callback method. + try + { + Debug.Assert(_callback0 != null); + if (!_callback0()) + { + // If the callback returns false, this callback object is no longer needed. + return; + } + } + catch + { + // Ensure that we still get a chance to resurrect this object, even if the callback throws an exception. #if DEBUG - // Except in DEBUG, as we really shouldn't be hitting any exceptions here. - throw; + // Except in DEBUG, as we really shouldn't be hitting any exceptions here. + throw; #endif + } } // Resurrect ourselves by re-registering for finalization. From 1a2401cd4c3f56c022173d2ac1e0c34799d387e3 Mon Sep 17 00:00:00 2001 From: Stephen Toub Date: Thu, 2 May 2019 14:41:02 -0400 Subject: [PATCH 181/607] Fix MultipleCallsToGetSpan test with pinning (#37373) The test is getting two pointers to an array and validating that they're the same pointer. But if the array is moved by the GC between the two calls, the test fails. The fix is to pin the array. --- .../ArrayBufferWriterTests.T.cs | 44 ++++++++++++------- 1 file changed, 29 insertions(+), 15 deletions(-) diff --git a/src/System.Memory/tests/ArrayBufferWriter/ArrayBufferWriterTests.T.cs b/src/System.Memory/tests/ArrayBufferWriter/ArrayBufferWriterTests.T.cs index 1675955a994a..013307af7bfb 100644 --- a/src/System.Memory/tests/ArrayBufferWriter/ArrayBufferWriterTests.T.cs +++ b/src/System.Memory/tests/ArrayBufferWriter/ArrayBufferWriterTests.T.cs @@ -357,25 +357,39 @@ public void InvalidGetMemoryAndSpan() [Fact] public void MultipleCallsToGetSpan() { + if (RuntimeHelpers.IsReferenceOrContainsReferences()) + { + return; + } + var output = new ArrayBufferWriter(300); - int previousAvailable = output.FreeCapacity; - Assert.True(previousAvailable >= 300); - Assert.True(output.Capacity >= 300); - Assert.Equal(previousAvailable, output.Capacity); - Span span = output.GetSpan(); - Assert.True(span.Length >= previousAvailable); - Assert.True(span.Length >= 256); - Span newSpan = output.GetSpan(); - Assert.Equal(span.Length, newSpan.Length); + Assert.True(MemoryMarshal.TryGetArray(output.GetMemory(), out ArraySegment array)); + GCHandle pinnedArray = GCHandle.Alloc(array.Array, GCHandleType.Pinned); + try + { + int previousAvailable = output.FreeCapacity; + Assert.True(previousAvailable >= 300); + Assert.True(output.Capacity >= 300); + Assert.Equal(previousAvailable, output.Capacity); + Span span = output.GetSpan(); + Assert.True(span.Length >= previousAvailable); + Assert.True(span.Length >= 256); + Span newSpan = output.GetSpan(); + Assert.Equal(span.Length, newSpan.Length); - unsafe + unsafe + { + void* pSpan = Unsafe.AsPointer(ref MemoryMarshal.GetReference(span)); + void* pNewSpan = Unsafe.AsPointer(ref MemoryMarshal.GetReference(newSpan)); + Assert.Equal((IntPtr)pSpan, (IntPtr)pNewSpan); + } + + Assert.Equal(span.Length, output.GetSpan().Length); + } + finally { - void* pSpan = Unsafe.AsPointer(ref MemoryMarshal.GetReference(span)); - void* pNewSpan = Unsafe.AsPointer(ref MemoryMarshal.GetReference(newSpan)); - Assert.Equal((IntPtr)pSpan, (IntPtr)pNewSpan); + pinnedArray.Free(); } - - Assert.Equal(span.Length, output.GetSpan().Length); } public abstract void WriteData(IBufferWriter bufferWriter, int numBytes); From 772aa2d1029caa8be3b360168b63dadd42ae788b Mon Sep 17 00:00:00 2001 From: Stephen Toub Date: Thu, 2 May 2019 14:56:19 -0400 Subject: [PATCH 182/607] Fix SendAsync_No100ContinueReceived_RequestBodySentEventually test flakiness (#37371) The server in the test was sending down the entire response and then trying to read the data from the client. If the client sent its whole payload and read the response before the server go around to doing the read, the client might close the connection, in which case the read might fail. The fix just changes the server code to only send down the headers, then read the data from the client, and only then finish the response, at which point it's fine if the client closes the connection. --- .../tests/System/Net/Http/LoopbackServer.cs | 14 ++++++++--- .../FunctionalTests/HttpClientHandlerTest.cs | 24 ++++++++++++------- 2 files changed, 26 insertions(+), 12 deletions(-) diff --git a/src/Common/tests/System/Net/Http/LoopbackServer.cs b/src/Common/tests/System/Net/Http/LoopbackServer.cs index c2c0e3dadaf4..b6a20b490c3d 100644 --- a/src/Common/tests/System/Net/Http/LoopbackServer.cs +++ b/src/Common/tests/System/Net/Http/LoopbackServer.cs @@ -305,13 +305,16 @@ public static string GetContentModeResponse(ContentMode mode, string content, bo } public static string GetHttpResponse(HttpStatusCode statusCode = HttpStatusCode.OK, string additionalHeaders = null, string content = null, bool connectionClose = false) => + GetHttpResponseHeaders(statusCode, additionalHeaders, content, connectionClose) + + content; + + public static string GetHttpResponseHeaders(HttpStatusCode statusCode = HttpStatusCode.OK, string additionalHeaders = null, string content = null, bool connectionClose = false) => $"HTTP/1.1 {(int)statusCode} {GetStatusDescription(statusCode)}\r\n" + (connectionClose ? "Connection: close\r\n" : "") + $"Date: {DateTimeOffset.UtcNow:R}\r\n" + $"Content-Length: {(content == null ? 0 : content.Length)}\r\n" + additionalHeaders + - "\r\n" + - content; + "\r\n"; public static string GetSingleChunkHttpResponse(HttpStatusCode statusCode = HttpStatusCode.OK, string additionalHeaders = null, string content = null, bool connectionClose = false) => $"HTTP/1.1 {(int)statusCode} {GetStatusDescription(statusCode)}\r\n" + @@ -571,9 +574,14 @@ public async Task> ReadRequestHeaderAsync() return lines; } + public async Task SendResponseAsync(string response) + { + await _writer.WriteAsync(response).ConfigureAwait(false); + } + public async Task SendResponseAsync(HttpStatusCode statusCode = HttpStatusCode.OK, string additionalHeaders = null, string content = null) { - await _writer.WriteAsync(GetHttpResponse(statusCode, additionalHeaders, content)).ConfigureAwait(false); + await SendResponseAsync(GetHttpResponse(statusCode, additionalHeaders, content)).ConfigureAwait(false); } public async Task> ReadRequestHeaderAndSendCustomResponseAsync(string response) diff --git a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.cs b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.cs index 04b573603ab2..883db8bdb050 100644 --- a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.cs +++ b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.cs @@ -2064,30 +2064,36 @@ public async Task SendAsync_No100ContinueReceived_RequestBodySentEventually() if (IsCurlHandler) return; var clientFinished = new TaskCompletionSource(); - const string TestString = "test"; + const string RequestString = "request"; + const string ResponseString = "response"; await LoopbackServer.CreateClientAndServerAsync(async uri => { using (HttpClient client = CreateHttpClient()) { HttpRequestMessage initialMessage = new HttpRequestMessage(HttpMethod.Post, uri) { Version = VersionFromUseHttp2 }; - initialMessage.Content = new StringContent(TestString); + initialMessage.Content = new StringContent(RequestString); initialMessage.Headers.ExpectContinue = true; - HttpResponseMessage response = await client.SendAsync(initialMessage); + using (HttpResponseMessage response = await client.SendAsync(initialMessage)) + { + Assert.Equal(HttpStatusCode.OK, response.StatusCode); + Assert.Equal(ResponseString, await response.Content.ReadAsStringAsync()); + } - Assert.Equal(HttpStatusCode.OK, response.StatusCode); clientFinished.SetResult(true); } }, async server => { await server.AcceptConnectionAsync(async connection => { - // Send final status code 200. - await connection.ReadRequestHeaderAndSendResponseAsync(); + await connection.ReadRequestHeaderAsync(); + await connection.SendResponseAsync(LoopbackServer.GetHttpResponseHeaders(HttpStatusCode.OK, content: ResponseString)); - var result = new char[TestString.Length]; - await connection.ReadBlockAsync(result, 0, TestString.Length); - Assert.Equal(TestString, new string(result)); + var result = new char[RequestString.Length]; + await connection.ReadBlockAsync(result, 0, RequestString.Length); + Assert.Equal(RequestString, new string(result)); + + await connection.SendResponseAsync(ResponseString); await clientFinished.Task; }); From de0effdf96e40747ce18d47d7248cc936d2192a9 Mon Sep 17 00:00:00 2001 From: Jeremy Kuhne Date: Thu, 2 May 2019 11:58:42 -0700 Subject: [PATCH 183/607] Start on object serialization. (#36806) * Add JsonElement to object support Object and object[] properties now get JsonElement for their value when deserializing. When serializing out the JsonElements are rehydrated into their original Json. * Remove the done TODO * Add JsonElement property tests. * Initial complex object/JsonElement support. Skipping one test temporarily. * Add Skip condition and reenable test. * Address feedback. * Address more feedback, add more tests. * Addressing feedback. --- .../src/System.Text.Json.csproj | 2 + .../src/System/Text/Json/JsonHelpers.cs | 16 +- .../Converters/DefaultConverters.cs | 8 + .../JsonValueConverterJsonElement.cs | 36 +++++ .../Converters/JsonValueConverterObject.cs | 36 +++++ .../JsonClassInfo.AddProperty.cs | 21 +-- .../Text/Json/Serialization/JsonClassInfo.cs | 85 +++++----- .../Json/Serialization/JsonPropertyInfo.cs | 1 + .../JsonSerializer.Read.HandleArray.cs | 6 +- .../JsonSerializer.Read.HandleValue.cs | 6 +- .../Json/Serialization/JsonSerializer.Read.cs | 19 ++- .../JsonSerializer.Write.HandleObject.cs | 4 +- .../Text/Json/Serialization/ReadStack.cs | 1 + .../Text/Json/Serialization/ReadStackFrame.cs | 17 ++ .../Json/Writer/JsonWriterHelper.Escaping.cs | 4 +- src/System.Text.Json/tests/JsonTestHelper.cs | 9 +- .../tests/Serialization/JsonElementTests.cs | 149 ++++++++++++++++++ .../tests/Serialization/Object.ReadTests.cs | 49 +++++- .../tests/Serialization/Object.WriteTests.cs | 13 ++ .../tests/Serialization/PolymorphicTests.cs | 16 +- .../tests/Serialization/SpanTests.cs | 7 +- .../TestClasses.SimpleTestClassWithObject.cs | 75 +-------- ...Classes.SimpleTestClassWithObjectArrays.cs | 139 ++++++++++++++++ ...Classes.SimpleTestClassWithSimpleObject.cs | 138 ++++++++++++++++ .../tests/Serialization/TestData.cs | 10 ++ .../tests/System.Text.Json.Tests.csproj | 4 + .../TestClasses.ClassWithComplexObjects.cs | 75 +++++++++ 27 files changed, 802 insertions(+), 144 deletions(-) create mode 100644 src/System.Text.Json/src/System/Text/Json/Serialization/Converters/JsonValueConverterJsonElement.cs create mode 100644 src/System.Text.Json/src/System/Text/Json/Serialization/Converters/JsonValueConverterObject.cs create mode 100644 src/System.Text.Json/tests/Serialization/JsonElementTests.cs create mode 100644 src/System.Text.Json/tests/Serialization/TestClasses.SimpleTestClassWithObjectArrays.cs create mode 100644 src/System.Text.Json/tests/Serialization/TestClasses.SimpleTestClassWithSimpleObject.cs create mode 100644 src/System.Text.Json/tests/TestClasses.ClassWithComplexObjects.cs diff --git a/src/System.Text.Json/src/System.Text.Json.csproj b/src/System.Text.Json/src/System.Text.Json.csproj index 9181e86ac98a..1bdb995f7797 100644 --- a/src/System.Text.Json/src/System.Text.Json.csproj +++ b/src/System.Text.Json/src/System.Text.Json.csproj @@ -59,6 +59,8 @@ + + diff --git a/src/System.Text.Json/src/System/Text/Json/JsonHelpers.cs b/src/System.Text.Json/src/System/Text/Json/JsonHelpers.cs index add2b4eb73e0..251fe2925e69 100644 --- a/src/System.Text.Json/src/System/Text/Json/JsonHelpers.cs +++ b/src/System.Text.Json/src/System/Text/Json/JsonHelpers.cs @@ -9,7 +9,7 @@ namespace System.Text.Json internal static partial class JsonHelpers { /// - /// Returns iff is a valid Unicode scalar + /// Returns if is a valid Unicode scalar /// value, i.e., is in [ U+0000..U+D7FF ], inclusive; or [ U+E000..U+10FFFF ], inclusive. /// [MethodImpl(MethodImplOptions.AggressiveInlining)] @@ -24,7 +24,7 @@ public static bool IsValidUnicodeScalar(uint value) } /// - /// Returns iff is between + /// Returns if is between /// and , inclusive. /// [MethodImpl(MethodImplOptions.AggressiveInlining)] @@ -32,7 +32,7 @@ public static bool IsInRangeInclusive(uint value, uint lowerBound, uint upperBou => (value - lowerBound) <= (upperBound - lowerBound); /// - /// Returns iff is between + /// Returns if is between /// and , inclusive. /// [MethodImpl(MethodImplOptions.AggressiveInlining)] @@ -40,7 +40,7 @@ public static bool IsInRangeInclusive(byte value, byte lowerBound, byte upperBou => ((byte)(value - lowerBound) <= (byte)(upperBound - lowerBound)); /// - /// Returns iff is between + /// Returns if is between /// and , inclusive. /// [MethodImpl(MethodImplOptions.AggressiveInlining)] @@ -48,7 +48,7 @@ public static bool IsInRangeInclusive(int value, int lowerBound, int upperBound) => (uint)(value - lowerBound) <= (uint)(upperBound - lowerBound); /// - /// Returns iff is between + /// Returns if is between /// and , inclusive. /// [MethodImpl(MethodImplOptions.AggressiveInlining)] @@ -56,7 +56,7 @@ public static bool IsInRangeInclusive(long value, long lowerBound, long upperBou => (ulong)(value - lowerBound) <= (ulong)(upperBound - lowerBound); /// - /// Returns iff is between + /// Returns if is between /// and , inclusive. /// [MethodImpl(MethodImplOptions.AggressiveInlining)] @@ -65,7 +65,7 @@ public static bool IsInRangeInclusive(double value, double lowerBound, double up => (value >= lowerBound) && (value <= upperBound); /// - /// Returns iff is between + /// Returns if is between /// and , inclusive. /// [MethodImpl(MethodImplOptions.AggressiveInlining)] @@ -73,7 +73,7 @@ public static bool IsInRangeInclusive(JsonTokenType value, JsonTokenType lowerBo => (value - lowerBound) <= (upperBound - lowerBound); /// - /// Returns iff is in the range [0..9]. + /// Returns if is in the range [0..9]. /// Otherwise, returns . /// public static bool IsDigit(byte value) => (uint)(value - '0') <= '9' - '0'; diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/DefaultConverters.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/DefaultConverters.cs index a9ea32e67276..0920a8abb287 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/DefaultConverters.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/DefaultConverters.cs @@ -58,6 +58,14 @@ internal static object Create(Type type) { return new JsonValueConverterDateTimeOffset(); } + if (type == typeof(JsonElement)) + { + return new JsonValueConverterJsonElement(); + } + if (type == typeof(object)) + { + return new JsonValueConverterObject(); + } return null; } diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/JsonValueConverterJsonElement.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/JsonValueConverterJsonElement.cs new file mode 100644 index 000000000000..ca750ae70d67 --- /dev/null +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/JsonValueConverterJsonElement.cs @@ -0,0 +1,36 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Text.Json.Serialization.Policies; + +namespace System.Text.Json.Serialization.Converters +{ + internal sealed class JsonValueConverterJsonElement : JsonValueConverter + { + public override bool TryRead(Type valueType, ref Utf8JsonReader reader, out JsonElement value) + { + if (JsonDocument.TryParseValue(ref reader, out JsonDocument document)) + { + value = document.RootElement.Clone(); + document.Dispose(); + return true; + } + else + { + value = default; + return false; + } + } + + public override void Write(JsonElement value, Utf8JsonWriter writer) + { + value.WriteAsValue(writer); + } + + public override void Write(Span escapedPropertyName, JsonElement value, Utf8JsonWriter writer) + { + value.WriteAsProperty(escapedPropertyName, writer); + } + } +} diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/JsonValueConverterObject.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/JsonValueConverterObject.cs new file mode 100644 index 000000000000..3a099d7db666 --- /dev/null +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/JsonValueConverterObject.cs @@ -0,0 +1,36 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Text.Json.Serialization.Policies; + +namespace System.Text.Json.Serialization.Converters +{ + internal sealed class JsonValueConverterObject : JsonValueConverter + { + public override bool TryRead(Type valueType, ref Utf8JsonReader reader, out object value) + { + if (JsonDocument.TryParseValue(ref reader, out JsonDocument document)) + { + value = document.RootElement.Clone(); + document.Dispose(); + return true; + } + else + { + value = default; + return false; + } + } + + public override void Write(object value, Utf8JsonWriter writer) + { + throw new InvalidOperationException(); + } + + public override void Write(Span escapedPropertyName, object value, Utf8JsonWriter writer) + { + throw new InvalidOperationException(); + } + } +} diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonClassInfo.AddProperty.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonClassInfo.AddProperty.cs index df4f992522e8..08e1d9edc16a 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonClassInfo.AddProperty.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonClassInfo.AddProperty.cs @@ -51,11 +51,13 @@ private JsonPropertyInfo AddProperty(Type propertyType, PropertyInfo propertyInf internal JsonPropertyInfo CreateProperty(Type declaredPropertyType, Type runtimePropertyType, PropertyInfo propertyInfo, Type parentClassType, JsonSerializerOptions options) { Type collectionElementType = null; - ClassType propertyClassType = GetClassType(runtimePropertyType); - if (propertyClassType == ClassType.Enumerable || propertyClassType == ClassType.Dictionary) + switch (GetClassType(runtimePropertyType)) { - collectionElementType = GetElementType(runtimePropertyType); - // todo: if collectionElementType is object, create loosely-typed collection (JsonArray). + case ClassType.Enumerable: + case ClassType.Dictionary: + case ClassType.Unknown: + collectionElementType = GetElementType(runtimePropertyType); + break; } // Create the JsonPropertyInfo @@ -80,14 +82,13 @@ internal JsonPropertyInfo CreateProperty(Type declaredPropertyType, Type runtime return jsonInfo; } - internal JsonPropertyInfo CreatePolymorphicProperty(JsonPropertyInfo property, Type runtimePropertyType, JsonSerializerOptions options) + internal JsonPropertyInfo CreateRootObject(JsonSerializerOptions options) { - if (property == null) - { - // Used with root objects which are not really a property. - return CreateProperty(runtimePropertyType, runtimePropertyType, null, runtimePropertyType, options); - } + return CreateProperty(Type, Type, null, Type, options); + } + internal JsonPropertyInfo CreatePolymorphicProperty(JsonPropertyInfo property, Type runtimePropertyType, JsonSerializerOptions options) + { JsonPropertyInfo runtimeProperty = CreateProperty(property.DeclaredPropertyType, runtimePropertyType, property?.PropertyInfo, Type, options); property.CopyRuntimeSettingsTo(runtimeProperty); diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonClassInfo.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonClassInfo.cs index a4f81226095e..5bcb5cc2ada0 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonClassInfo.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonClassInfo.cs @@ -10,6 +10,7 @@ namespace System.Text.Json.Serialization { + [DebuggerDisplay("ClassType.{ClassType} {Type.Name}")] internal sealed partial class JsonClassInfo { // The length of the property name embedded in the key (in bytes). @@ -84,55 +85,54 @@ internal JsonClassInfo(Type type, JsonSerializerOptions options) CreateObject = options.ClassMaterializerStrategy.CreateConstructor(type); // Ignore properties on enumerable. - if (ClassType == ClassType.Object) + switch (ClassType) { - var propertyNames = new HashSet(StringComparer.Ordinal); + case ClassType.Object: + var propertyNames = new HashSet(StringComparer.Ordinal); - foreach (PropertyInfo propertyInfo in type.GetProperties(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic)) - { - // For now we only support public getters\setters - if (propertyInfo.GetMethod?.IsPublic == true || - propertyInfo.SetMethod?.IsPublic == true) + foreach (PropertyInfo propertyInfo in type.GetProperties(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic)) { - JsonPropertyInfo jsonPropertyInfo = AddProperty(propertyInfo.PropertyType, propertyInfo, type, options); - - if (jsonPropertyInfo.NameAsString == null) + // For now we only support public getters\setters + if (propertyInfo.GetMethod?.IsPublic == true || + propertyInfo.SetMethod?.IsPublic == true) { - ThrowHelper.ThrowInvalidOperationException_SerializerPropertyNameNull(this, jsonPropertyInfo); - } + JsonPropertyInfo jsonPropertyInfo = AddProperty(propertyInfo.PropertyType, propertyInfo, type, options); - // If the JsonPropertyNameAttribute or naming policy results in collisions, throw an exception. - if (!propertyNames.Add(jsonPropertyInfo.NameUsedToCompareAsString)) - { - ThrowHelper.ThrowInvalidOperationException_SerializerPropertyNameConflict(this, jsonPropertyInfo); - } + if (jsonPropertyInfo.NameAsString == null) + { + ThrowHelper.ThrowInvalidOperationException_SerializerPropertyNameNull(this, jsonPropertyInfo); + } - jsonPropertyInfo.ClearUnusedValuesAfterAdd(); - } - } - } - else if (ClassType == ClassType.Enumerable || ClassType == ClassType.Dictionary) - { - // Add a single property that maps to the class type so we can have policies applied. - JsonPropertyInfo jsonPropertyInfo = AddPolicyProperty(type, options); + // If the JsonPropertyNameAttribute or naming policy results in collisions, throw an exception. + if (!propertyNames.Add(jsonPropertyInfo.NameUsedToCompareAsString)) + { + ThrowHelper.ThrowInvalidOperationException_SerializerPropertyNameConflict(this, jsonPropertyInfo); + } - // Use the type from the property policy to get any late-bound concrete types (from an interface like IDictionary). - CreateObject = options.ClassMaterializerStrategy.CreateConstructor(jsonPropertyInfo.RuntimePropertyType); + jsonPropertyInfo.ClearUnusedValuesAfterAdd(); + } + } + break; + case ClassType.Enumerable: + case ClassType.Dictionary: + // Add a single property that maps to the class type so we can have policies applied. + JsonPropertyInfo policyProperty = AddPolicyProperty(type, options); - // Create a ClassInfo that maps to the element type which is used for (de)serialization and policies. - Type elementType = GetElementType(type); + // Use the type from the property policy to get any late-bound concrete types (from an interface like IDictionary). + CreateObject = options.ClassMaterializerStrategy.CreateConstructor(policyProperty.RuntimePropertyType); - ElementClassInfo = options.GetOrAddClass(elementType); - } - else if (ClassType == ClassType.Value) - { - // Add a single property that maps to the class type so we can have policies applied. - AddPolicyProperty(type, options); - } - else - { - Debug.Assert(ClassType == ClassType.Unknown); - // Do nothing. The type is typeof(object). + // Create a ClassInfo that maps to the element type which is used for (de)serialization and policies. + Type elementType = GetElementType(type); + ElementClassInfo = options.GetOrAddClass(elementType); + break; + case ClassType.Value: + case ClassType.Unknown: + // Add a single property that maps to the class type so we can have policies applied. + AddPolicyProperty(type, options); + break; + default: + Debug.Fail($"Unexpected class type: {ClassType}"); + break; } } @@ -322,7 +322,6 @@ public static Type GetElementType(Type propertyType) if (GetClassType(propertyType) == ClassType.Dictionary && args.Length >= 2) // It is >= 2 in case there is a Dictionary. { - elementType = args[1]; } else if (args.Length >= 1) // It is >= 1 in case there is an IEnumerable. @@ -351,8 +350,8 @@ internal static ClassType GetClassType(Type type) type = Nullable.GetUnderlyingType(type); } - // A Type is considered a value if it implements IConvertible or is a DateTimeOffset. - if (typeof(IConvertible).IsAssignableFrom(type) || type == typeof(DateTimeOffset)) + // A Type is considered a value if it implements IConvertible or is a DateTimeOffset or JsonElement. + if (typeof(IConvertible).IsAssignableFrom(type) || type == typeof(DateTimeOffset) || type == typeof(JsonElement)) { return ClassType.Value; } diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfo.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfo.cs index f46a5c95a994..81dedb60d03e 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfo.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfo.cs @@ -11,6 +11,7 @@ namespace System.Text.Json.Serialization { + [DebuggerDisplay("{PropertyInfo}")] internal abstract class JsonPropertyInfo { // Cache the converters so they don't get created for every enumerable property. diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleArray.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleArray.cs index 5d12c8ff692e..9646ce37705c 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleArray.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleArray.cs @@ -29,7 +29,11 @@ private static void HandleStartArray( return; } - if (jsonPropertyInfo == null || state.Current.JsonClassInfo.ClassType == ClassType.Unknown) + if (jsonPropertyInfo == null) + { + jsonPropertyInfo = state.Current.JsonClassInfo.CreateRootObject(options); + } + else if (state.Current.JsonClassInfo.ClassType == ClassType.Unknown) { jsonPropertyInfo = state.Current.JsonClassInfo.CreatePolymorphicProperty(jsonPropertyInfo, typeof(object), options); } diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleValue.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleValue.cs index 4f3c737c1400..15e9d98dbcbf 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleValue.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleValue.cs @@ -14,7 +14,11 @@ private static bool HandleValue(JsonTokenType tokenType, JsonSerializerOptions o } JsonPropertyInfo jsonPropertyInfo = state.Current.JsonPropertyInfo; - if (jsonPropertyInfo == null || state.Current.JsonClassInfo.ClassType == ClassType.Unknown) + if (jsonPropertyInfo == null) + { + jsonPropertyInfo = state.Current.JsonClassInfo.CreateRootObject(options); + } + else if (state.Current.JsonClassInfo.ClassType == ClassType.Unknown) { jsonPropertyInfo = state.Current.JsonClassInfo.CreatePolymorphicProperty(jsonPropertyInfo, typeof(object), options); } diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.cs index 94b89a4c863c..b73e3a671520 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.cs @@ -3,7 +3,6 @@ // See the LICENSE file in the project root for more information. using System.Buffers; -using System.Collections.Generic; using System.Diagnostics; namespace System.Text.Json.Serialization @@ -75,7 +74,14 @@ private static void ReadCore( } else if (tokenType == JsonTokenType.StartObject) { - HandleStartObject(options, ref reader, ref state); + if (!state.Current.IsProcessingProperty) + { + HandleStartObject(options, ref reader, ref state); + } + else if (HandleValue(tokenType, options, ref reader, ref state)) + { + return; + } } else if (tokenType == JsonTokenType.EndObject) { @@ -86,7 +92,14 @@ private static void ReadCore( } else if (tokenType == JsonTokenType.StartArray) { - HandleStartArray(options, ref reader, ref state); + if (!state.Current.IsProcessingProperty) + { + HandleStartArray(options, ref reader, ref state); + } + else if (HandleValue(tokenType, options, ref reader, ref state)) + { + return; + } } else if (tokenType == JsonTokenType.EndArray) { diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.HandleObject.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.HandleObject.cs index 4e8585b4e1ab..1daa62da2db0 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.HandleObject.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.HandleObject.cs @@ -22,7 +22,9 @@ private static bool WriteObject( } // Determine if we are done enumerating properties. - if (state.Current.PropertyIndex != classInfo.PropertyCount) + // If the ClassType is unknown, there will be a policy property applied. There is probably + // a better way to identify policy properties- maybe not put them in the normal property bag? + if (classInfo.ClassType != ClassType.Unknown && state.Current.PropertyIndex != classInfo.PropertyCount) { HandleObject(options, writer, ref state); return false; diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/ReadStack.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/ReadStack.cs index 9da7166f8e7d..1e68821b443e 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/ReadStack.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/ReadStack.cs @@ -7,6 +7,7 @@ namespace System.Text.Json.Serialization { + [DebuggerDisplay("Current: ClassType.{Current.JsonClassInfo.ClassType} {Current.JsonClassInfo.Type.Name}")] internal struct ReadStack { // A fields is used instead of a property to avoid value semantics. diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/ReadStackFrame.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/ReadStackFrame.cs index 54e11c65a36b..dda53fcea721 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/ReadStackFrame.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/ReadStackFrame.cs @@ -5,9 +5,11 @@ using System.Collections; using System.Collections.Generic; using System.Diagnostics; +using System.Runtime.CompilerServices; namespace System.Text.Json.Serialization { + [DebuggerDisplay("ClassType.{JsonClassInfo.ClassType} {JsonClassInfo.Type.Name}")] internal struct ReadStackFrame { // The object (POCO or IEnumerable) that is being populated @@ -40,6 +42,21 @@ internal struct ReadStackFrame public bool IsProcessingEnumerable => IsEnumerable || IsPropertyEnumerable; public bool IsPropertyEnumerable => JsonPropertyInfo != null ? JsonPropertyInfo.ClassType == ClassType.Enumerable : false; + public bool IsProcessingProperty + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get + { + if (JsonPropertyInfo == null || Skip()) + { + return false; + } + + ClassType type = JsonPropertyInfo.ClassType; + return type == ClassType.Value || type == ClassType.Unknown; + } + } + public void Initialize(Type type, JsonSerializerOptions options) { JsonClassInfo = options.GetOrAddClass(type); diff --git a/src/System.Text.Json/src/System/Text/Json/Writer/JsonWriterHelper.Escaping.cs b/src/System.Text.Json/src/System/Text/Json/Writer/JsonWriterHelper.Escaping.cs index 876049307ba6..891bd7e4062a 100644 --- a/src/System.Text.Json/src/System/Text/Json/Writer/JsonWriterHelper.Escaping.cs +++ b/src/System.Text.Json/src/System/Text/Json/Writer/JsonWriterHelper.Escaping.cs @@ -173,13 +173,13 @@ private static int EscapeNextBytes(ReadOnlySpan value, Span destinat private static bool IsAsciiValue(byte value) => value < 0x80; /// - /// Returns iff is a UTF-8 continuation byte. + /// Returns if is a UTF-8 continuation byte. /// A UTF-8 continuation byte is a byte whose value is in the range 0x80-0xBF, inclusive. /// private static bool IsUtf8ContinuationByte(byte value) => (value & 0xC0) == 0x80; /// - /// Returns iff the low word of is a UTF-16 surrogate. + /// Returns if the low word of is a UTF-16 surrogate. /// [MethodImpl(MethodImplOptions.AggressiveInlining)] private static bool IsLowWordSurrogate(uint @char) diff --git a/src/System.Text.Json/tests/JsonTestHelper.cs b/src/System.Text.Json/tests/JsonTestHelper.cs index 0d5edaa01074..6c7cc0d91992 100644 --- a/src/System.Text.Json/tests/JsonTestHelper.cs +++ b/src/System.Text.Json/tests/JsonTestHelper.cs @@ -6,12 +6,14 @@ using System.Collections.Generic; using System.Globalization; using System.IO; +using System.Text.Json.Tests; +using System.Text.RegularExpressions; using Newtonsoft.Json; using Newtonsoft.Json.Linq; using Xunit; using Xunit.Sdk; -namespace System.Text.Json.Tests +namespace System.Text.Json { internal static class JsonTestHelper { @@ -636,5 +638,10 @@ public static void AssertThrows( throw new ThrowsException(typeof(E), ex); } } + + private static readonly Regex s_stripWhitespace = new Regex(@"\s+", RegexOptions.Compiled); + + public static string StripWhitespace(this string value) + => s_stripWhitespace.Replace(value, string.Empty); } } diff --git a/src/System.Text.Json/tests/Serialization/JsonElementTests.cs b/src/System.Text.Json/tests/Serialization/JsonElementTests.cs new file mode 100644 index 000000000000..f146734d52f7 --- /dev/null +++ b/src/System.Text.Json/tests/Serialization/JsonElementTests.cs @@ -0,0 +1,149 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Linq; +using Xunit; + +namespace System.Text.Json.Serialization.Tests +{ + public class JsonElementTests + { + [Fact] + public void SerializeJsonElement() + { + JsonElementClass obj = JsonSerializer.Parse(JsonElementClass.s_json); + obj.Verify(); + string reserialized = JsonSerializer.ToString(obj); + + // Properties in the exported json will be in the order that they were reflected, doing a quick check to see that + // we end up with the same length (i.e. same amount of data) to start. + Assert.Equal(JsonElementClass.s_json.StripWhitespace().Length, reserialized.Length); + + // Shoving it back through the parser should validate round tripping. + obj = JsonSerializer.Parse(reserialized); + obj.Verify(); + } + + public class JsonElementClass : ITestClass + { + public JsonElement Number { get; set; } + public JsonElement True { get; set; } + public JsonElement False { get; set; } + public JsonElement String { get; set; } + public JsonElement Array { get; set; } + public JsonElement Object { get; set; } + // public JsonElement Null { get; set; } + + public static readonly string s_json = + @"{" + + @"""Number"" : 1," + + @"""True"" : true," + + @"""False"" : false," + + @"""String"" : ""Hello""," + + @"""Array"" : [2, false, true, ""Goodbye""]," + + @"""Object"" : {}" + + // TODO: Null doesn't work yet (but probably should? object gets null in this case) + //@"""Null"" : null" + + @"}"; + + public static readonly byte[] s_data = Encoding.UTF8.GetBytes(s_json); + + public void Initialize() + { + Number = JsonDocument.Parse(@"1").RootElement.Clone(); + True = JsonDocument.Parse(@"true").RootElement.Clone(); + False = JsonDocument.Parse(@"false").RootElement.Clone(); + String = JsonDocument.Parse(@"""Hello""").RootElement.Clone(); + Array = JsonDocument.Parse(@"[2, false, true, ""Goodbye""]").RootElement.Clone(); + Object = JsonDocument.Parse(@"{}").RootElement.Clone(); + // Null = JsonDocument.Parse(@"null").RootElement.Clone(); + } + + public void Verify() + { + Assert.Equal(JsonValueType.Number, Number.Type); + Assert.Equal("1", Number.ToString()); + Assert.Equal(JsonValueType.True, True.Type); + Assert.Equal("True", True.ToString()); + Assert.Equal(JsonValueType.False, False.Type); + Assert.Equal("False", False.ToString()); + Assert.Equal(JsonValueType.String, String.Type); + Assert.Equal("Hello", String.ToString()); + Assert.Equal(JsonValueType.Array, Array.Type); + JsonElement[] elements = Array.EnumerateArray().ToArray(); + Assert.Equal(JsonValueType.Number, elements[0].Type); + Assert.Equal("2", elements[0].ToString()); + Assert.Equal(JsonValueType.False, elements[1].Type); + Assert.Equal("False", elements[1].ToString()); + Assert.Equal(JsonValueType.True, elements[2].Type); + Assert.Equal("True", elements[2].ToString()); + Assert.Equal(JsonValueType.String, elements[3].Type); + Assert.Equal("Goodbye", elements[3].ToString()); + Assert.Equal(JsonValueType.Object, Object.Type); + Assert.Equal("{}", Object.ToString()); + //Assert.Equal(JsonValueType.Null, Null.Type); + //Assert.Equal("Null", Null.ToString()); + } + } + + [Fact] + public void SerializeJsonElementArray() + { + JsonElementArrayClass obj = JsonSerializer.Parse(JsonElementArrayClass.s_json); + obj.Verify(); + string reserialized = JsonSerializer.ToString(obj); + + // Properties in the exported json will be in the order that they were reflected, doing a quick check to see that + // we end up with the same length (i.e. same amount of data) to start. + Assert.Equal(JsonElementArrayClass.s_json.StripWhitespace().Length, reserialized.Length); + + // Shoving it back through the parser should validate round tripping. + obj = JsonSerializer.Parse(reserialized); + obj.Verify(); + } + + public class JsonElementArrayClass : ITestClass + { + public JsonElement[] Array { get; set; } + + public static readonly string s_json = + @"{" + + @"""Array"" : [" + + @"1, " + + @"true, " + + @"false, " + + @"""Hello""" + + // TODO: Nested complex objects aren't handled by the collection code yet. + // @"[2, false, true, ""Goodbye""], " + + // @"{}" + + @"]" + + @"}"; + + public static readonly byte[] s_data = Encoding.UTF8.GetBytes(s_json); + + public void Initialize() + { + Array = new JsonElement[] + { + JsonDocument.Parse(@"1").RootElement.Clone(), + JsonDocument.Parse(@"true").RootElement.Clone(), + JsonDocument.Parse(@"false").RootElement.Clone(), + JsonDocument.Parse(@"""Hello""").RootElement.Clone() + }; + } + + public void Verify() + { + Assert.Equal(JsonValueType.Number, Array[0].Type); + Assert.Equal("1", Array[0].ToString()); + Assert.Equal(JsonValueType.True, Array[1].Type); + Assert.Equal("True", Array[1].ToString()); + Assert.Equal(JsonValueType.False, Array[2].Type); + Assert.Equal("False", Array[2].ToString()); + Assert.Equal(JsonValueType.String, Array[3].Type); + Assert.Equal("Hello", Array[3].ToString()); + } + } + } +} diff --git a/src/System.Text.Json/tests/Serialization/Object.ReadTests.cs b/src/System.Text.Json/tests/Serialization/Object.ReadTests.cs index 4b41c4b3d2fd..6e455d8ad0eb 100644 --- a/src/System.Text.Json/tests/Serialization/Object.ReadTests.cs +++ b/src/System.Text.Json/tests/Serialization/Object.ReadTests.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System.Collections.Generic; using Xunit; namespace System.Text.Json.Serialization.Tests @@ -16,6 +15,54 @@ public static void ReadSimpleClass() obj.Verify(); } + [Fact] + public static void ReadSimpleClassWithObject() + { + SimpleTestClassWithSimpleObject obj = JsonSerializer.Parse(SimpleTestClassWithSimpleObject.s_json); + obj.Verify(); + string reserialized = JsonSerializer.ToString(obj); + + // Properties in the exported json will be in the order that they were reflected, doing a quick check to see that + // we end up with the same length (i.e. same amount of data) to start. + Assert.Equal(SimpleTestClassWithSimpleObject.s_json.StripWhitespace().Length, reserialized.Length); + + // Shoving it back through the parser should validate round tripping. + obj = JsonSerializer.Parse(reserialized); + obj.Verify(); + } + + [Fact] + public static void ReadSimpleClassWithObjectArray() + { + SimpleTestClassWithObjectArrays obj = JsonSerializer.Parse(SimpleTestClassWithObjectArrays.s_json); + obj.Verify(); + string reserialized = JsonSerializer.ToString(obj); + + // Properties in the exported json will be in the order that they were reflected, doing a quick check to see that + // we end up with the same length (i.e. same amount of data) to start. + Assert.Equal(SimpleTestClassWithObjectArrays.s_json.StripWhitespace().Length, reserialized.Length); + + // Shoving it back through the parser should validate round tripping. + obj = JsonSerializer.Parse(reserialized); + obj.Verify(); + } + + [Fact] + public static void ReadClassWithComplexObjects() + { + ClassWithComplexObjects obj = JsonSerializer.Parse(ClassWithComplexObjects.s_json); + obj.Verify(); + string reserialized = JsonSerializer.ToString(obj); + + // Properties in the exported json will be in the order that they were reflected, doing a quick check to see that + // we end up with the same length (i.e. same amount of data) to start. + Assert.Equal(ClassWithComplexObjects.s_json.StripWhitespace().Length, reserialized.Length); + + // Shoving it back through the parser should validate round tripping. + obj = JsonSerializer.Parse(reserialized); + obj.Verify(); + } + [Fact] public static void ReadEmpty() { diff --git a/src/System.Text.Json/tests/Serialization/Object.WriteTests.cs b/src/System.Text.Json/tests/Serialization/Object.WriteTests.cs index b9df97278568..1306d895a5ed 100644 --- a/src/System.Text.Json/tests/Serialization/Object.WriteTests.cs +++ b/src/System.Text.Json/tests/Serialization/Object.WriteTests.cs @@ -40,5 +40,18 @@ public static IEnumerable WriteSuccessCases return TestData.WriteSuccessCases; } } + + [Fact] + public static void WriteObjectAsObject() + { + var obj = new ObjectObject { Object = new object() }; + string json = JsonSerializer.ToString(obj); + Assert.Equal(@"{""Object"":{}}", json); + } + + public class ObjectObject + { + public object Object { get; set; } + } } } diff --git a/src/System.Text.Json/tests/Serialization/PolymorphicTests.cs b/src/System.Text.Json/tests/Serialization/PolymorphicTests.cs index e6021ddd2117..8f8a4d815c3f 100644 --- a/src/System.Text.Json/tests/Serialization/PolymorphicTests.cs +++ b/src/System.Text.Json/tests/Serialization/PolymorphicTests.cs @@ -49,9 +49,19 @@ public static void ReadPrimitivesFail() [Fact] public static void ParseUntyped() { - // Not supported until we are able to deserialize into JsonElement. - Assert.Throws(() => JsonSerializer.Parse(@"""hello""")); - Assert.Throws(() => JsonSerializer.Parse(@"true")); + object obj = JsonSerializer.Parse(@"""hello"""); + Assert.IsType(obj); + JsonElement element = (JsonElement)obj; + Assert.Equal(JsonValueType.String, element.Type); + Assert.Equal("hello", element.GetString()); + + obj = JsonSerializer.Parse(@"true"); + element = (JsonElement)obj; + Assert.Equal(JsonValueType.True, element.Type); + Assert.Equal(true, element.GetBoolean()); + + obj = JsonSerializer.Parse(@"null"); + Assert.Null(obj); } [Fact] diff --git a/src/System.Text.Json/tests/Serialization/SpanTests.cs b/src/System.Text.Json/tests/Serialization/SpanTests.cs index bfbf7610e350..b8ef567c4177 100644 --- a/src/System.Text.Json/tests/Serialization/SpanTests.cs +++ b/src/System.Text.Json/tests/Serialization/SpanTests.cs @@ -34,9 +34,12 @@ public static void ReadGenericApi() [Fact] public static void ParseUntyped() { - // Not supported until we are able to deserialize into JsonElement. byte[] bytes = Encoding.UTF8.GetBytes("42"); - Assert.Throws(() => JsonSerializer.Parse(bytes, typeof(object))); + object obj = JsonSerializer.Parse(bytes, typeof(object)); + Assert.IsType(obj); + JsonElement element = (JsonElement)obj; + Assert.Equal(JsonValueType.Number, element.Type); + Assert.Equal(42, element.GetInt32()); } [Fact] diff --git a/src/System.Text.Json/tests/Serialization/TestClasses.SimpleTestClassWithObject.cs b/src/System.Text.Json/tests/Serialization/TestClasses.SimpleTestClassWithObject.cs index 1a0ae4d73d66..042b395bbd6a 100644 --- a/src/System.Text.Json/tests/Serialization/TestClasses.SimpleTestClassWithObject.cs +++ b/src/System.Text.Json/tests/Serialization/TestClasses.SimpleTestClassWithObject.cs @@ -3,30 +3,12 @@ // See the LICENSE file in the project root for more information. using System.Collections.Generic; -using System.Linq; using Xunit; namespace System.Text.Json.Serialization.Tests { - public class SimpleTestClassWithObject : ITestClass + public class SimpleTestClassWithObject : SimpleTestClassWithSimpleObject { - public object MyInt16 { get; set; } - public object MyInt32 { get; set; } - public object MyInt64 { get; set; } - public object MyUInt16 { get; set; } - public object MyUInt32 { get; set; } - public object MyUInt64 { get; set; } - public object MyByte { get; set; } - public object MySByte { get; set; } - public object MyChar { get; set; } - public object MyString { get; set; } - public object MyDecimal { get; set; } - public object MyBooleanTrue { get; set; } - public object MyBooleanFalse { get; set; } - public object MySingle { get; set; } - public object MyDouble { get; set; } - public object MyDateTime { get; set; } - public object MyEnum { get; set; } public object MyInt16Array { get; set; } public object MyInt32Array { get; set; } public object MyInt64Array { get; set; } @@ -54,7 +36,7 @@ public class SimpleTestClassWithObject : ITestClass public object MyStringToStringIDict { get; set; } public object MyStringToStringIReadOnlyDict { get; set; } - public static readonly string s_json = + public new static readonly string s_json = @"{" + @"""MyInt16"" : 1," + @"""MyInt32"" : 2," + @@ -101,27 +83,11 @@ public class SimpleTestClassWithObject : ITestClass @"""MyStringToStringIReadOnlyDict"" : {""key"" : ""value""}" + @"}"; - public static readonly byte[] s_data = Encoding.UTF8.GetBytes(s_json); + public new static readonly byte[] s_data = Encoding.UTF8.GetBytes(s_json); - public void Initialize() + public override void Initialize() { - MyInt16 = (short)1; - MyInt32 = (int)2; - MyInt64 = (long)3; - MyUInt16 = (ushort)4; - MyUInt32 = (uint)5; - MyUInt64 = (ulong)6; - MyByte = (byte)7; - MySByte = (sbyte)8; - MyChar = 'a'; - MyString = "Hello"; - MyBooleanTrue = true; - MyBooleanFalse = false; - MySingle = 1.1f; - MyDouble = 2.2d; - MyDecimal = 3.3m; - MyDateTime = new DateTime(2019, 1, 30, 12, 1, 2, DateTimeKind.Utc); - MyEnum = SampleEnum.Two; + base.Initialize(); MyInt16Array = new short[] { 1 }; MyInt32Array = new int[] { 2 }; @@ -153,25 +119,9 @@ public void Initialize() MyStringToStringIReadOnlyDict = new Dictionary { { "key", "value" } }; } - public void Verify() + public override void Verify() { - Assert.Equal((short)1, MyInt16); - Assert.Equal((int)2, MyInt32); - Assert.Equal((long)3, MyInt64); - Assert.Equal((ushort)4, MyUInt16); - Assert.Equal((uint)5, MyUInt32); - Assert.Equal((ulong)6, MyUInt64); - Assert.Equal((byte)7, MyByte); - Assert.Equal((sbyte)8, MySByte); - Assert.Equal('a', MyChar); - Assert.Equal("Hello", MyString); - Assert.Equal(3.3m, MyDecimal); - Assert.Equal(false, MyBooleanFalse); - Assert.Equal(true, MyBooleanTrue); - Assert.Equal(1.1f, MySingle); - Assert.Equal(2.2d, MyDouble); - Assert.Equal(new DateTime(2019, 1, 30, 12, 1, 2, DateTimeKind.Utc), MyDateTime); - Assert.Equal(SampleEnum.Two, MyEnum); + base.Verify(); Assert.Equal((short)1, ((short[])MyInt16Array)[0]); Assert.Equal((int)2, ((int[])MyInt32Array)[0]); @@ -190,17 +140,6 @@ public void Verify() Assert.Equal(2.2d, ((double[])MyDoubleArray)[0]); Assert.Equal(new DateTime(2019, 1, 30, 12, 1, 2, DateTimeKind.Utc), ((DateTime[])MyDateTimeArray)[0]); Assert.Equal(SampleEnum.Two, ((SampleEnum[])MyEnumArray)[0]); - - Assert.Equal("Hello", ((List)MyStringList)[0]); - Assert.Equal("Hello", ((IEnumerable)MyStringIEnumerableT).First()); - Assert.Equal("Hello", ((IList)MyStringIListT)[0]); - Assert.Equal("Hello", ((ICollection)MyStringICollectionT).First()); - Assert.Equal("Hello", ((IReadOnlyCollection)MyStringIReadOnlyCollectionT).First()); - Assert.Equal("Hello", ((IReadOnlyList)MyStringIReadOnlyListT)[0]); - - Assert.Equal("value", ((Dictionary)MyStringToStringDict)["key"]); - Assert.Equal("value", ((IDictionary)MyStringToStringIDict)["key"]); - Assert.Equal("value", ((IReadOnlyDictionary)MyStringToStringIReadOnlyDict)["key"]); } } } diff --git a/src/System.Text.Json/tests/Serialization/TestClasses.SimpleTestClassWithObjectArrays.cs b/src/System.Text.Json/tests/Serialization/TestClasses.SimpleTestClassWithObjectArrays.cs new file mode 100644 index 000000000000..103f646f6522 --- /dev/null +++ b/src/System.Text.Json/tests/Serialization/TestClasses.SimpleTestClassWithObjectArrays.cs @@ -0,0 +1,139 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using Xunit; + +namespace System.Text.Json.Serialization.Tests +{ + public class SimpleTestClassWithObjectArrays : ITestClass + { + public object[] MyInt16 { get; set; } + public object[] MyInt32 { get; set; } + public object[] MyInt64 { get; set; } + public object[] MyUInt16 { get; set; } + public object[] MyUInt32 { get; set; } + public object[] MyUInt64 { get; set; } + public object[] MyByte { get; set; } + public object[] MySByte { get; set; } + public object[] MyChar { get; set; } + public object[] MyString { get; set; } + public object[] MyDecimal { get; set; } + public object[] MyBooleanTrue { get; set; } + public object[] MyBooleanFalse { get; set; } + public object[] MySingle { get; set; } + public object[] MyDouble { get; set; } + public object[] MyDateTime { get; set; } + public object[] MyEnum { get; set; } + + public static readonly string s_json = + @"{" + + @"""MyInt16"" : [1]," + + @"""MyInt32"" : [2]," + + @"""MyInt64"" : [3]," + + @"""MyUInt16"" : [4]," + + @"""MyUInt32"" : [5]," + + @"""MyUInt64"" : [6]," + + @"""MyByte"" : [7]," + + @"""MySByte"" : [8]," + + @"""MyChar"" : [""a""]," + + @"""MyString"" : [""Hello""]," + + @"""MyBooleanTrue"" : [true]," + + @"""MyBooleanFalse"" : [false]," + + @"""MySingle"" : [1.1]," + + @"""MyDouble"" : [2.2]," + + @"""MyDecimal"" : [3.3]," + + @"""MyDateTime"" : [""2019-01-30T12:01:02.0000000Z""]," + + @"""MyEnum"" : [2]" + // int by default + @"}"; + + public static readonly byte[] s_data = Encoding.UTF8.GetBytes(s_json); + + private bool _initialized; + + public void Initialize() + { + _initialized = true; + + MyInt16 = new object[] { (short)1 }; + MyInt32 = new object[] { (int)2 }; + MyInt64 = new object[] { (long)3 }; + MyUInt16 = new object[] { (ushort)4 }; + MyUInt32 = new object[] { (uint)5 }; + MyUInt64 = new object[] { (ulong)6 }; + MyByte = new object[] { (byte)7 }; + MySByte = new object[] { (sbyte)8 }; + MyChar = new object[] { 'a' }; + MyString = new object[] { "Hello" }; + MyBooleanTrue = new object[] { true }; + MyBooleanFalse = new object[] { false }; + MySingle = new object[] { 1.1f }; + MyDouble = new object[] { 2.2d }; + MyDecimal = new object[] { 3.3m }; + MyDateTime = new object[] { new DateTime(2019, 1, 30, 12, 1, 2, DateTimeKind.Utc) }; + MyEnum = new object[] { SampleEnum.Two }; + } + + public void Verify() + { + // Shared test logic verifies state after calling Initialize. In the object + // case we don't care if the object is initialized with non JsonElement values, + // they'll still be serialized back in as JsonElement. + + if (_initialized) + return; + + Assert.IsType(MyInt16[0]); + Assert.Equal(JsonValueType.Number, ((JsonElement)MyInt16[0]).Type); + Assert.Equal(1, ((JsonElement)MyInt16[0]).GetInt32()); + Assert.IsType(MyInt32[0]); + Assert.Equal(JsonValueType.Number, ((JsonElement)MyInt32[0]).Type); + Assert.Equal(2, ((JsonElement)MyInt32[0]).GetInt32()); + Assert.IsType(MyInt64[0]); + Assert.Equal(JsonValueType.Number, ((JsonElement)MyInt64[0]).Type); + Assert.Equal(3L, ((JsonElement)MyInt64[0]).GetInt64()); + Assert.IsType(MyUInt16[0]); + Assert.Equal(JsonValueType.Number, ((JsonElement)MyUInt16[0]).Type); + Assert.Equal(4u, ((JsonElement)MyUInt16[0]).GetUInt32()); + Assert.IsType(MyUInt32[0]); + Assert.Equal(JsonValueType.Number, ((JsonElement)MyUInt32[0]).Type); + Assert.Equal(5u, ((JsonElement)MyUInt32[0]).GetUInt32()); + Assert.IsType(MyUInt64[0]); + Assert.Equal(JsonValueType.Number, ((JsonElement)MyUInt64[0]).Type); + Assert.Equal(6UL, ((JsonElement)MyUInt64[0]).GetUInt32()); + Assert.IsType(MyByte[0]); + Assert.Equal(JsonValueType.Number, ((JsonElement)MyByte[0]).Type); + Assert.Equal(7, ((JsonElement)MyByte[0]).GetInt32()); + Assert.IsType(MySByte[0]); + Assert.Equal(JsonValueType.Number, ((JsonElement)MySByte[0]).Type); + Assert.Equal((byte)8, ((JsonElement)MySByte[0]).GetUInt32()); + Assert.IsType(MyChar[0]); + Assert.Equal(JsonValueType.String, ((JsonElement)MyChar[0]).Type); + Assert.Equal("a", ((JsonElement)MyChar[0]).GetString()); + Assert.IsType(MyString[0]); + Assert.Equal(JsonValueType.String, ((JsonElement)MyString[0]).Type); + Assert.Equal("Hello", ((JsonElement)MyString[0]).GetString()); + Assert.IsType(MyDecimal[0]); + Assert.Equal(JsonValueType.Number, ((JsonElement)MyDecimal[0]).Type); + Assert.Equal(3.3m, ((JsonElement)MyDecimal[0]).GetDecimal()); + Assert.IsType(MyBooleanFalse[0]); + Assert.Equal(JsonValueType.False, ((JsonElement)MyBooleanFalse[0]).Type); + Assert.Equal(false, ((JsonElement)MyBooleanFalse[0]).GetBoolean()); + Assert.IsType(MyBooleanTrue[0]); + Assert.Equal(JsonValueType.True, ((JsonElement)MyBooleanTrue[0]).Type); + Assert.Equal(true, ((JsonElement)MyBooleanTrue[0]).GetBoolean()); + Assert.IsType(MySingle[0]); + Assert.Equal(JsonValueType.Number, ((JsonElement)MySingle[0]).Type); + Assert.Equal(1.1f, ((JsonElement)MySingle[0]).GetSingle()); + Assert.IsType(MyDouble[0]); + Assert.Equal(JsonValueType.Number, ((JsonElement)MyDouble[0]).Type); + Assert.Equal(2.2d, ((JsonElement)MyDouble[0]).GetDouble()); + Assert.IsType(MyDateTime[0]); + Assert.Equal(JsonValueType.String, ((JsonElement)MyDateTime[0]).Type); + Assert.Equal(new DateTime(2019, 1, 30, 12, 1, 2, DateTimeKind.Utc), ((JsonElement)MyDateTime[0]).GetDateTime()); + Assert.IsType(MyEnum[0]); + Assert.Equal(JsonValueType.Number, ((JsonElement)MyEnum[0]).Type); + Assert.Equal(SampleEnum.Two, (SampleEnum)((JsonElement)MyEnum[0]).GetUInt32()); + } + } +} diff --git a/src/System.Text.Json/tests/Serialization/TestClasses.SimpleTestClassWithSimpleObject.cs b/src/System.Text.Json/tests/Serialization/TestClasses.SimpleTestClassWithSimpleObject.cs new file mode 100644 index 000000000000..55ce2fd7d00a --- /dev/null +++ b/src/System.Text.Json/tests/Serialization/TestClasses.SimpleTestClassWithSimpleObject.cs @@ -0,0 +1,138 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using Xunit; + +namespace System.Text.Json.Serialization.Tests +{ + public class SimpleTestClassWithSimpleObject : ITestClass + { + public object MyInt16 { get; set; } + public object MyInt32 { get; set; } + public object MyInt64 { get; set; } + public object MyUInt16 { get; set; } + public object MyUInt32 { get; set; } + public object MyUInt64 { get; set; } + public object MyByte { get; set; } + public object MySByte { get; set; } + public object MyChar { get; set; } + public object MyString { get; set; } + public object MyDecimal { get; set; } + public object MyBooleanTrue { get; set; } + public object MyBooleanFalse { get; set; } + public object MySingle { get; set; } + public object MyDouble { get; set; } + public object MyDateTime { get; set; } + public object MyEnum { get; set; } + + public static readonly string s_json = + @"{" + + @"""MyInt16"" : 1," + + @"""MyInt32"" : 2," + + @"""MyInt64"" : 3," + + @"""MyUInt16"" : 4," + + @"""MyUInt32"" : 5," + + @"""MyUInt64"" : 6," + + @"""MyByte"" : 7," + + @"""MySByte"" : 8," + + @"""MyChar"" : ""a""," + + @"""MyString"" : ""Hello""," + + @"""MyBooleanTrue"" : true," + + @"""MyBooleanFalse"" : false," + + @"""MySingle"" : 1.1," + + @"""MyDouble"" : 2.2," + + @"""MyDecimal"" : 3.3," + + @"""MyDateTime"" : ""2019-01-30T12:01:02.0000000Z""," + + @"""MyEnum"" : 2" + // int by default + @"}"; + + public static readonly byte[] s_data = Encoding.UTF8.GetBytes(s_json); + + private bool _initialized; + + public virtual void Initialize() + { + _initialized = true; + MyInt16 = (short)1; + MyInt32 = (int)2; + MyInt64 = (long)3; + MyUInt16 = (ushort)4; + MyUInt32 = (uint)5; + MyUInt64 = (ulong)6; + MyByte = (byte)7; + MySByte = (sbyte)8; + MyChar = 'a'; + MyString = "Hello"; + MyBooleanTrue = true; + MyBooleanFalse = false; + MySingle = 1.1f; + MyDouble = 2.2d; + MyDecimal = 3.3m; + MyDateTime = new DateTime(2019, 1, 30, 12, 1, 2, DateTimeKind.Utc); + MyEnum = SampleEnum.Two; + } + + public virtual void Verify() + { + // Shared test logic verifies state after calling Initialize. In the object + // case we don't care if the object is initialized with non JsonElement values, + // they'll still be serialized back in as JsonElement. + + if (_initialized) + return; + + Assert.IsType(MyInt16); + Assert.Equal(JsonValueType.Number, ((JsonElement)MyInt16).Type); + Assert.Equal(1, ((JsonElement)MyInt16).GetInt32()); + Assert.IsType(MyInt32); + Assert.Equal(JsonValueType.Number, ((JsonElement)MyInt32).Type); + Assert.Equal(2, ((JsonElement)MyInt32).GetInt32()); + Assert.IsType(MyInt64); + Assert.Equal(JsonValueType.Number, ((JsonElement)MyInt64).Type); + Assert.Equal(3L, ((JsonElement)MyInt64).GetInt64()); + Assert.IsType(MyUInt16); + Assert.Equal(JsonValueType.Number, ((JsonElement)MyUInt16).Type); + Assert.Equal(4u, ((JsonElement)MyUInt16).GetUInt32()); + Assert.IsType(MyUInt32); + Assert.Equal(JsonValueType.Number, ((JsonElement)MyUInt32).Type); + Assert.Equal(5u, ((JsonElement)MyUInt32).GetUInt32()); + Assert.IsType(MyUInt64); + Assert.Equal(JsonValueType.Number, ((JsonElement)MyUInt64).Type); + Assert.Equal(6UL, ((JsonElement)MyUInt64).GetUInt32()); + Assert.IsType(MyByte); + Assert.Equal(JsonValueType.Number, ((JsonElement)MyByte).Type); + Assert.Equal(7, ((JsonElement)MyByte).GetInt32()); + Assert.IsType(MySByte); + Assert.Equal(JsonValueType.Number, ((JsonElement)MySByte).Type); + Assert.Equal((byte)8, ((JsonElement)MySByte).GetUInt32()); + Assert.IsType(MyChar); + Assert.Equal(JsonValueType.String, ((JsonElement)MyChar).Type); + Assert.Equal("a", ((JsonElement)MyChar).GetString()); + Assert.IsType(MyString); + Assert.Equal(JsonValueType.String, ((JsonElement)MyString).Type); + Assert.Equal("Hello", ((JsonElement)MyString).GetString()); + Assert.IsType(MyDecimal); + Assert.Equal(JsonValueType.Number, ((JsonElement)MyDecimal).Type); + Assert.Equal(3.3m, ((JsonElement)MyDecimal).GetDecimal()); + Assert.IsType(MyBooleanFalse); + Assert.Equal(JsonValueType.False, ((JsonElement)MyBooleanFalse).Type); + Assert.Equal(false, ((JsonElement)MyBooleanFalse).GetBoolean()); + Assert.IsType(MyBooleanTrue); + Assert.Equal(JsonValueType.True, ((JsonElement)MyBooleanTrue).Type); + Assert.Equal(true, ((JsonElement)MyBooleanTrue).GetBoolean()); + Assert.IsType(MySingle); + Assert.Equal(JsonValueType.Number, ((JsonElement)MySingle).Type); + Assert.Equal(1.1f, ((JsonElement)MySingle).GetSingle()); + Assert.IsType(MyDouble); + Assert.Equal(JsonValueType.Number, ((JsonElement)MyDouble).Type); + Assert.Equal(2.2d, ((JsonElement)MyDouble).GetDouble()); + Assert.IsType(MyDateTime); + Assert.Equal(JsonValueType.String, ((JsonElement)MyDateTime).Type); + Assert.Equal(new DateTime(2019, 1, 30, 12, 1, 2, DateTimeKind.Utc), ((JsonElement)MyDateTime).GetDateTime()); + Assert.IsType(MyEnum); + Assert.Equal(JsonValueType.Number, ((JsonElement)MyEnum).Type); + Assert.Equal(SampleEnum.Two, (SampleEnum)((JsonElement)MyEnum).GetUInt32()); + } + } +} diff --git a/src/System.Text.Json/tests/Serialization/TestData.cs b/src/System.Text.Json/tests/Serialization/TestData.cs index de39bd4fa99c..8e585d755d47 100644 --- a/src/System.Text.Json/tests/Serialization/TestData.cs +++ b/src/System.Text.Json/tests/Serialization/TestData.cs @@ -15,6 +15,8 @@ public static IEnumerable ReadSuccessCases yield return new object[] { typeof(SimpleTestClass), SimpleTestClass.s_data }; yield return new object[] { typeof(SimpleTestClassWithNullables), SimpleTestClassWithNullables.s_data }; yield return new object[] { typeof(SimpleTestClassWithNulls), SimpleTestClassWithNulls.s_data }; + yield return new object[] { typeof(SimpleTestClassWithSimpleObject), SimpleTestClassWithSimpleObject.s_data }; + yield return new object[] { typeof(SimpleTestClassWithObjectArrays), SimpleTestClassWithObjectArrays.s_data }; yield return new object[] { typeof(BasicPerson), BasicPerson.s_data }; yield return new object[] { typeof(BasicCompany), BasicCompany.s_data }; yield return new object[] { typeof(TestClassWithNestedObjectInner), TestClassWithNestedObjectInner.s_data }; @@ -32,6 +34,9 @@ public static IEnumerable ReadSuccessCases yield return new object[] { typeof(TestClassWithGenericICollectionT), TestClassWithGenericICollectionT.s_data }; yield return new object[] { typeof(TestClassWithGenericIReadOnlyCollectionT), TestClassWithGenericIReadOnlyCollectionT.s_data }; yield return new object[] { typeof(TestClassWithGenericIReadOnlyListT), TestClassWithGenericIReadOnlyListT.s_data }; + yield return new object[] { typeof(JsonElementTests.JsonElementClass), JsonElementTests.JsonElementClass.s_data }; + yield return new object[] { typeof(JsonElementTests.JsonElementArrayClass), JsonElementTests.JsonElementArrayClass.s_data }; + yield return new object[] { typeof(ClassWithComplexObjects), ClassWithComplexObjects.s_data }; } } public static IEnumerable WriteSuccessCases @@ -41,6 +46,8 @@ public static IEnumerable WriteSuccessCases yield return new object[] { new SimpleTestClass() }; yield return new object[] { new SimpleTestClassWithNullables() }; yield return new object[] { new SimpleTestClassWithNulls() }; + yield return new object[] { new SimpleTestClassWithSimpleObject() }; + yield return new object[] { new SimpleTestClassWithObjectArrays() }; yield return new object[] { new BasicPerson() }; yield return new object[] { new BasicCompany() }; yield return new object[] { new TestClassWithNestedObjectInner() }; @@ -58,6 +65,9 @@ public static IEnumerable WriteSuccessCases yield return new object[] { new TestClassWithGenericICollectionT() }; yield return new object[] { new TestClassWithGenericIReadOnlyCollectionT() }; yield return new object[] { new TestClassWithGenericIReadOnlyListT() }; + yield return new object[] { new JsonElementTests.JsonElementClass() }; + yield return new object[] { new JsonElementTests.JsonElementArrayClass() }; + yield return new object[] { new ClassWithComplexObjects() }; } } } diff --git a/src/System.Text.Json/tests/System.Text.Json.Tests.csproj b/src/System.Text.Json/tests/System.Text.Json.Tests.csproj index 1569772c768f..d371902ce363 100644 --- a/src/System.Text.Json/tests/System.Text.Json.Tests.csproj +++ b/src/System.Text.Json/tests/System.Text.Json.Tests.csproj @@ -29,6 +29,7 @@ + @@ -45,10 +46,13 @@ + + + diff --git a/src/System.Text.Json/tests/TestClasses.ClassWithComplexObjects.cs b/src/System.Text.Json/tests/TestClasses.ClassWithComplexObjects.cs new file mode 100644 index 000000000000..bc5c013cf1e4 --- /dev/null +++ b/src/System.Text.Json/tests/TestClasses.ClassWithComplexObjects.cs @@ -0,0 +1,75 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Linq; +using Xunit; + +namespace System.Text.Json.Serialization.Tests +{ + public class ClassWithComplexObjects : ITestClass + { + public object Array { get; set; } + public object Object { get; set; } + + public static readonly string s_array = + @"[" + + @"1," + + @"""Hello""," + + @"true," + + @"false," + + @"{}," + + @"[2, ""Goodbye"", false, true, {}, [3]]" + + @"]"; + + public static readonly string s_object = + @"{" + + @"""NestedArray"" : " + + s_array + + @"}"; + + public static readonly string s_json = + @"{" + + @"""Array"" : " + + s_array + "," + + @"""Object"" : " + + s_object + + @"}"; + + public static readonly byte[] s_data = Encoding.UTF8.GetBytes(s_json); + + public void Initialize() + { + Array = JsonDocument.Parse(s_array).RootElement.Clone(); + Object = JsonDocument.Parse(s_object).RootElement.Clone(); + } + + public void Verify() + { + Assert.IsType(Array); + ValidateArray((JsonElement)Array); + Assert.IsType(Object); + JsonElement jsonObject = (JsonElement)Object; + Assert.Equal(JsonValueType.Object, jsonObject.Type); + JsonProperty property = jsonObject.EnumerateObject().First(); + Assert.Equal("NestedArray", property.Name); + ValidateArray(property.Value); + + void ValidateArray(JsonElement element) + { + Assert.Equal(JsonValueType.Array, element.Type); + JsonElement[] elements = element.EnumerateArray().ToArray(); + + Assert.Equal(JsonValueType.Number, elements[0].Type); + Assert.Equal("1", elements[0].ToString()); + Assert.Equal(JsonValueType.String, elements[1].Type); + Assert.Equal("Hello", elements[1].ToString()); + Assert.Equal(JsonValueType.True, elements[2].Type); + Assert.Equal(true, elements[2].GetBoolean()); + Assert.Equal(JsonValueType.False, elements[3].Type); + Assert.Equal(false, elements[3].GetBoolean()); + } + + } + } +} From dd368445da30401b9dd2290a9612fccf617063b9 Mon Sep 17 00:00:00 2001 From: Stephen Toub Date: Thu, 2 May 2019 20:29:58 -0400 Subject: [PATCH 184/607] Fix TestPriorityLevelProperty test (#37377) * Fix TestPriorityLevelProperty test If the target thread goes away between the time we grab it and try to manipulate it, the test fails. Instead, just create a thread in the current process, as we can then target that one directly and ensure it's always in a good state for testing against. * Address PR feedback --- .../tests/ProcessThreadTests.Unix.cs | 35 +++++++++++ .../tests/ProcessThreadTests.Windows.cs | 60 +++++++++++++++++++ .../tests/ProcessThreadTests.cs | 44 +------------- .../System.Diagnostics.Process.Tests.csproj | 6 +- 4 files changed, 101 insertions(+), 44 deletions(-) create mode 100644 src/System.Diagnostics.Process/tests/ProcessThreadTests.Unix.cs create mode 100644 src/System.Diagnostics.Process/tests/ProcessThreadTests.Windows.cs diff --git a/src/System.Diagnostics.Process/tests/ProcessThreadTests.Unix.cs b/src/System.Diagnostics.Process/tests/ProcessThreadTests.Unix.cs new file mode 100644 index 000000000000..9869514d85df --- /dev/null +++ b/src/System.Diagnostics.Process/tests/ProcessThreadTests.Unix.cs @@ -0,0 +1,35 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.ComponentModel; +using System.Runtime.InteropServices; +using System.Threading; +using Xunit; + +namespace System.Diagnostics.Tests +{ + public partial class ProcessThreadTests + { + [PlatformSpecific(TestPlatforms.AnyUnix)] + [Fact] + public void TestPriorityLevelProperty_Unix() + { + CreateDefaultProcess(); + + ProcessThread thread = _process.Threads[0]; + ThreadPriorityLevel level = ThreadPriorityLevel.Normal; + + if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) + { + Assert.Throws(() => thread.PriorityLevel); + } + else + { + level = thread.PriorityLevel; + } + + Assert.Throws(() => thread.PriorityLevel = level); + } + } +} diff --git a/src/System.Diagnostics.Process/tests/ProcessThreadTests.Windows.cs b/src/System.Diagnostics.Process/tests/ProcessThreadTests.Windows.cs new file mode 100644 index 000000000000..19efc14c183f --- /dev/null +++ b/src/System.Diagnostics.Process/tests/ProcessThreadTests.Windows.cs @@ -0,0 +1,60 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Runtime.InteropServices; +using System.Threading; +using System.Linq; +using Xunit; + +namespace System.Diagnostics.Tests +{ + public partial class ProcessThreadTests : ProcessTestBase + { + [PlatformSpecific(TestPlatforms.Windows)] // P/Invokes + [Fact] + [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Retrieving information about local processes is not supported on uap")] + public void PriorityLevel_Roundtrips() + { + using (Barrier b = new Barrier(2)) + using (Process currentProcess = Process.GetCurrentProcess()) + { + int targetThreadId = 0; + + // Launch a thread whose priority we'll manipulate. + var t = new Thread(() => + { + targetThreadId = GetCurrentThreadId(); + b.SignalAndWait(); + b.SignalAndWait(); // wait until the main test is done targeting this thread + }); + t.IsBackground = true; + t.Start(); + + b.SignalAndWait(); // wait until targetThreadId is valid + try + { + // Find the relevant ProcessThread in this process + ProcessThread targetThread = currentProcess.Threads.Cast().Single(pt => pt.Id == targetThreadId); + + // Try setting and getting its priority + foreach (ThreadPriorityLevel level in new[] { ThreadPriorityLevel.AboveNormal, ThreadPriorityLevel.BelowNormal, ThreadPriorityLevel.Normal }) + { + targetThread.PriorityLevel = ThreadPriorityLevel.AboveNormal; + Assert.Equal(ThreadPriorityLevel.AboveNormal, targetThread.PriorityLevel); + } + } + finally + { + // Allow the thread to exit + b.SignalAndWait(); + } + + t.Join(); + } + } + + [DllImport("kernel32")] + private extern static int GetCurrentThreadId(); + } +} diff --git a/src/System.Diagnostics.Process/tests/ProcessThreadTests.cs b/src/System.Diagnostics.Process/tests/ProcessThreadTests.cs index 0af036547b4e..3edb546ead9b 100644 --- a/src/System.Diagnostics.Process/tests/ProcessThreadTests.cs +++ b/src/System.Diagnostics.Process/tests/ProcessThreadTests.cs @@ -11,7 +11,7 @@ namespace System.Diagnostics.Tests { - public class ProcessThreadTests : ProcessTestBase + public partial class ProcessThreadTests : ProcessTestBase { [Fact] [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Retrieving information about local processes is not supported on uap")] @@ -153,53 +153,13 @@ public void TestStartAddressProperty() Assert.NotNull(threads); Assert.NotEmpty(threads); - IntPtr startAddress = threads[0].StartAddress; + IntPtr startAddress = threads[0].StartAddress; // There's nothing we can really validate about StartAddress, other than that we can get its value // without throwing. All values (even zero) are valid on all platforms. } } - [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Retrieving information about local processes is not supported on uap")] - public void TestPriorityLevelProperty() - { - CreateDefaultProcess(); - ProcessThread thread = _process.Threads[0]; - - if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) - { - Assert.Throws(() => thread.PriorityLevel); - Assert.Throws(() => thread.PriorityLevel = ThreadPriorityLevel.AboveNormal); - return; - } - - ThreadPriorityLevel originalPriority = thread.PriorityLevel; - - if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) - { - Assert.Throws(() => thread.PriorityLevel = ThreadPriorityLevel.AboveNormal); - return; - } - - if (RuntimeInformation.IsOSPlatform(OSPlatform.Create("FREEBSD"))) - { - Assert.Throws(() => thread.PriorityLevel = ThreadPriorityLevel.AboveNormal); - return; - } - - try - { - thread.PriorityLevel = ThreadPriorityLevel.AboveNormal; - Assert.Equal(ThreadPriorityLevel.AboveNormal, thread.PriorityLevel); - } - finally - { - thread.PriorityLevel = originalPriority; - Assert.Equal(originalPriority, thread.PriorityLevel); - } - } - [Fact] [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Retrieving information about local processes is not supported on uap")] public void TestThreadStateProperty() diff --git a/src/System.Diagnostics.Process/tests/System.Diagnostics.Process.Tests.csproj b/src/System.Diagnostics.Process/tests/System.Diagnostics.Process.Tests.csproj index c3c4e27c4369..3b44ab5c5f52 100644 --- a/src/System.Diagnostics.Process/tests/System.Diagnostics.Process.Tests.csproj +++ b/src/System.Diagnostics.Process/tests/System.Diagnostics.Process.Tests.csproj @@ -31,8 +31,6 @@ - - @@ -45,12 +43,16 @@ + + Common\CoreLib\System\PasteArguments.Windows.cs + + Common\CoreLib\System\PasteArguments.Unix.cs From 25d7b8b252bbf4d8b7606804db55b96d8d8027f4 Mon Sep 17 00:00:00 2001 From: Tomas Weinfurt Date: Thu, 2 May 2019 21:13:20 -0700 Subject: [PATCH 185/607] impove error reporting on OSX (#37382) --- src/System.Net.Ping/tests/FunctionalTests/PingTest.cs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/System.Net.Ping/tests/FunctionalTests/PingTest.cs b/src/System.Net.Ping/tests/FunctionalTests/PingTest.cs index 264afbb5f3cb..f6e6e53ccdb8 100644 --- a/src/System.Net.Ping/tests/FunctionalTests/PingTest.cs +++ b/src/System.Net.Ping/tests/FunctionalTests/PingTest.cs @@ -52,11 +52,9 @@ private void PingResultValidator(PingReply pingReply, IPAddress localIpAddress) private void PingResultValidator(PingReply pingReply, IPAddress[] localIpAddresses) { - if (pingReply.Status == IPStatus.TimedOut) + if (pingReply.Status == IPStatus.TimedOut && pingReply.Address.AddressFamily == AddressFamily.InterNetworkV6 && PlatformDetection.IsOSX) { // Workaround OSX ping6 bug, refer issue #15018 - Assert.Equal(AddressFamily.InterNetworkV6, pingReply.Address.AddressFamily); - Assert.True(RuntimeInformation.IsOSPlatform(OSPlatform.OSX)); return; } From 1f159018b21e1f70fa2ade50d5e341f5ce457654 Mon Sep 17 00:00:00 2001 From: Tomas Weinfurt Date: Thu, 2 May 2019 23:23:27 -0700 Subject: [PATCH 186/607] reject invalid pseudo-headers (#37069) * reject invalid pseudo-headers * feedback from review * feedback from review * fix typo in comment * feedback from review * syncup with recent changes --- .../System/Net/Http/Http2LoopbackServer.cs | 11 +++- .../Http/SocketsHttpHandler/Http2Stream.cs | 54 ++++++++++++------ .../HttpClientHandlerTest.Http2.cs | 56 +++++++++++++++++++ 3 files changed, 104 insertions(+), 17 deletions(-) diff --git a/src/Common/tests/System/Net/Http/Http2LoopbackServer.cs b/src/Common/tests/System/Net/Http/Http2LoopbackServer.cs index 5b527c6c8cd0..c0363042ccea 100644 --- a/src/Common/tests/System/Net/Http/Http2LoopbackServer.cs +++ b/src/Common/tests/System/Net/Http/Http2LoopbackServer.cs @@ -115,8 +115,17 @@ public async Task ReadFrameAsync(TimeSpan timeout) // First read the frame headers, which should tell us how long the rest of the frame is. byte[] headerBytes = new byte[Frame.FrameHeaderLength]; - if (!await FillBufferAsync(headerBytes, timeoutCts.Token).ConfigureAwait(false)) + + try + { + if (!await FillBufferAsync(headerBytes, timeoutCts.Token).ConfigureAwait(false)) + { + return null; + } + } + catch (IOException) { + // eat errors when client aborts connection and return null. return null; } diff --git a/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http2Stream.cs b/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http2Stream.cs index 1a45dcae1cff..2211f84aa9dc 100644 --- a/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http2Stream.cs +++ b/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http2Stream.cs @@ -36,7 +36,7 @@ private enum StreamState : byte private readonly int _streamId; private readonly CreditManager _streamWindow; private readonly HttpRequestMessage _request; - private readonly HttpResponseMessage _response; + private HttpResponseMessage _response; private ArrayBuffer _responseBuffer; // mutable struct, do not make this readonly private int _pendingWindowUpdate; @@ -66,12 +66,6 @@ public Http2Stream(HttpRequestMessage request, Http2Connection connection, int s _state = StreamState.ExpectingHeaders; _request = request; - _response = new HttpResponseMessage() - { - Version = HttpVersion.Version20, - RequestMessage = request, - Content = new HttpConnectionResponseContent() - }; _disposed = false; @@ -121,6 +115,7 @@ public void OnWindowUpdate(int amount) public void OnResponseHeader(ReadOnlySpan name, ReadOnlySpan value) { + Debug.Assert(name != null && name.Length > 0); // TODO: ISSUE 31309: Optimize HPACK static table decoding lock (SyncObject) @@ -130,7 +125,7 @@ public void OnResponseHeader(ReadOnlySpan name, ReadOnlySpan value) throw new Http2ProtocolException(Http2ProtocolErrorCode.ProtocolError); } - if (name.SequenceEqual(s_statusHeaderName)) + if (name[0] == (byte)':') { if (_state == StreamState.ExpectingTrailingHeaders) { @@ -139,19 +134,46 @@ public void OnResponseHeader(ReadOnlySpan name, ReadOnlySpan value) throw new HttpRequestException(SR.net_http_invalid_response_pseudo_header_in_trailer); } - byte status1, status2, status3; - if (value.Length != 3 || - !IsDigit(status1 = value[0]) || - !IsDigit(status2 = value[1]) || - !IsDigit(status3 = value[2])) + if (name.SequenceEqual(s_statusHeaderName)) { - throw new HttpRequestException(SR.Format(SR.net_http_invalid_response_status_code, Encoding.ASCII.GetString(value))); + if (_response != null) + { + if (NetEventSource.IsEnabled) _connection.Trace("Received duplicate status headers."); + throw new Http2ProtocolException(Http2ProtocolErrorCode.ProtocolError); + } + + byte status1, status2, status3; + if (value.Length != 3 || + !IsDigit(status1 = value[0]) || + !IsDigit(status2 = value[1]) || + !IsDigit(status3 = value[2])) + { + throw new HttpRequestException(SR.Format(SR.net_http_invalid_response_status_code, Encoding.ASCII.GetString(value))); + } + + int statusValue = (100 * (status1 - '0') + 10 * (status2 - '0') + (status3 - '0')); + _response = new HttpResponseMessage() + { + Version = HttpVersion.Version20, + RequestMessage = _request, + Content = new HttpConnectionResponseContent(), + StatusCode = (HttpStatusCode)statusValue + }; + } + else + { + if (NetEventSource.IsEnabled) _connection.Trace("Invalid response pseudo-header '{System.Text.Encoding.ASCII.GetString(name)}'."); + throw new HttpRequestException(SR.net_http_invalid_response); } - - _response.SetStatusCodeWithoutValidation((HttpStatusCode)(100 * (status1 - '0') + 10 * (status2 - '0') + (status3 - '0'))); } else { + if (_response == null) + { + if (NetEventSource.IsEnabled) _connection.Trace($"Received header before status pseudo-header."); + throw new HttpRequestException(SR.net_http_invalid_response); + } + if (!HeaderDescriptor.TryGet(name, out HeaderDescriptor descriptor)) { // Invalid header name diff --git a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Http2.cs b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Http2.cs index b85cc03f8ced..9669d6f74acc 100644 --- a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Http2.cs +++ b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Http2.cs @@ -6,6 +6,7 @@ using System.Diagnostics; using System.Linq; using System.Net.Test.Common; +using System.Text; using System.Threading; using System.Threading.Tasks; @@ -1306,5 +1307,60 @@ public async Task Http2_PendingSend_Cancellation() await Assert.ThrowsAnyAsync(async () => await clientTask); } } + + // rfc7540 8.1.2.3. + [ConditionalFact(nameof(SupportsAlpn))] + public async Task Http2GetAsync_MultipleStatusHeaders_Throws() + { + using (var server = Http2LoopbackServer.CreateServer()) + using (HttpClient client = CreateHttpClient()) + { + IList headers = new HttpHeaderData[] { new HttpHeaderData(":status", "300"), new HttpHeaderData("x-test", "Http2GetAsync_MultipleStatusHeaders_Throws") }; + Task sendTask = client.GetAsync(server.Address); + + await server.EstablishConnectionAsync(); + int streamId = await server.ReadRequestHeaderAsync(); + await server.SendResponseHeadersAsync(streamId, endStream : true, headers: headers); + await Assert.ThrowsAsync(() => sendTask); + } + } + + // rfc7540 8.1.2.3. + [ConditionalFact(nameof(SupportsAlpn))] + public async Task Http2GetAsync_StatusHeaderNotFirst_Throws() + { + using (var server = Http2LoopbackServer.CreateServer()) + using (HttpClient client = CreateHttpClient()) + { + IList headers = new HttpHeaderData[] { new HttpHeaderData("x-test", "Http2GetAsync_StatusHeaderNotFirst_Throws"), new HttpHeaderData(":status", "200") }; + Task sendTask = client.GetAsync(server.Address); + + await server.EstablishConnectionAsync(); + int streamId = await server.ReadRequestHeaderAsync(); + await server.SendResponseHeadersAsync(streamId, endStream : true, isTrailingHeader : true, headers: headers); + + await Assert.ThrowsAsync(() => sendTask); + } + } + + // rfc7540 8.1.2.3. + [ConditionalFact(nameof(SupportsAlpn))] + public async Task Http2GetAsync_TrailigPseudo_Throw() + { + using (var server = Http2LoopbackServer.CreateServer()) + using (HttpClient client = CreateHttpClient()) + { + IList headers = new HttpHeaderData[] { new HttpHeaderData(":path", "http"), new HttpHeaderData("x-test", "Http2GetAsync_TrailigPseudo_Throw") }; + Task sendTask = client.GetAsync(server.Address); + + await server.EstablishConnectionAsync(); + int streamId = await server.ReadRequestHeaderAsync(); + await server.SendDefaultResponseHeadersAsync(streamId); + await server.SendResponseDataAsync(streamId, Encoding.ASCII.GetBytes("hello"), endStream: false); + await server.SendResponseHeadersAsync(streamId, endStream : true, isTrailingHeader : true, headers: headers); + + await Assert.ThrowsAsync(() => sendTask); + } + } } } From c412fa7dc60559dc38050c63b2e34b5156a2499e Mon Sep 17 00:00:00 2001 From: Tomas Weinfurt Date: Thu, 2 May 2019 23:31:53 -0700 Subject: [PATCH 187/607] improve error handling on failed Http/2 handshake (#37050) * improve error handling on failed Http/2 handshake * remove extra space * add test for HTTP2 client talking to HTTP1 server. * fix broken tests * improve exception handling * update exception handling * ws update * fix bad merge * update test and changes from #37223 * use _abortException only if the stream is not aborted already * fix IsAborted check * updates to syncup with recent changes --- .../SocketsHttpHandler/Http2Connection.cs | 25 ++++++++--- .../HttpClientHandlerTest.Http2.cs | 43 +++++++++++++++++++ 2 files changed, 61 insertions(+), 7 deletions(-) diff --git a/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http2Connection.cs b/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http2Connection.cs index 029185f952d9..2bf95d841386 100644 --- a/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http2Connection.cs +++ b/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http2Connection.cs @@ -45,6 +45,7 @@ internal sealed partial class Http2Connection : HttpConnectionBase, IDisposable private int _pendingWriters; private bool _disposed; + private Exception _abortException; // If an in-progress write is canceled we need to be able to immediately // report a cancellation to the user, but also block the connection until @@ -173,17 +174,24 @@ private async Task FlushOutgoingBytesAsync() } } - private async ValueTask ReadFrameAsync() + private async ValueTask ReadFrameAsync(bool initialFrame = false) { // Read frame header await EnsureIncomingBytesAsync(FrameHeader.Size).ConfigureAwait(false); FrameHeader frameHeader = FrameHeader.ReadFrom(_incomingBuffer.ActiveSpan); - _incomingBuffer.Discard(FrameHeader.Size); if (frameHeader.Length > FrameHeader.MaxLength) { - throw new Http2ProtocolException(Http2ProtocolErrorCode.FrameSizeError); + if (initialFrame && NetEventSource.IsEnabled) + { + string response = System.Text.Encoding.ASCII.GetString(_incomingBuffer.ActiveSpan.Slice(0, Math.Min(20, _incomingBuffer.ActiveSpan.Length))); + Trace($"HTTP/2 handshake failed. Server returned {response}"); + } + + _incomingBuffer.Discard(FrameHeader.Size); + throw new Http2ProtocolException(initialFrame ? Http2ProtocolErrorCode.ProtocolError : Http2ProtocolErrorCode.FrameSizeError); } + _incomingBuffer.Discard(FrameHeader.Size); // Read frame contents await EnsureIncomingBytesAsync(frameHeader.Length).ConfigureAwait(false); @@ -195,14 +203,13 @@ private async void ProcessIncomingFrames() { try { - // Receive the initial SETTINGS frame from the peer. - FrameHeader frameHeader = await ReadFrameAsync().ConfigureAwait(false); + FrameHeader frameHeader = await ReadFrameAsync(initialFrame: true).ConfigureAwait(false); if (frameHeader.Type != FrameType.Settings || frameHeader.AckFlag) { throw new Http2ProtocolException(Http2ProtocolErrorCode.ProtocolError); } - // Process the SETTINGS frame. This will send an ACK. + // Process the initial SETTINGS frame. This will send an ACK. ProcessSettingsFrame(frameHeader); // Keep processing frames as they arrive. @@ -1117,6 +1124,10 @@ private void Abort(Exception abortException) { // The connection has failed, e.g. failed IO or a connection-level frame error. // Abort all streams and cause further processing to fail. + if (!IsAborted()) + { + _abortException = abortException; + } AbortStreams(0, abortException); } @@ -1358,7 +1369,7 @@ public sealed override async Task SendAsync(HttpRequestMess e is ObjectDisposedException || e is Http2ProtocolException) { - replacementException = new HttpRequestException(SR.net_http_client_execution_error, e); + replacementException = new HttpRequestException(SR.net_http_client_execution_error, _abortException ?? e); } else if (e is OperationCanceledException oce) { diff --git a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Http2.cs b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Http2.cs index 9669d6f74acc..b45dbcab1e7e 100644 --- a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Http2.cs +++ b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Http2.cs @@ -4,6 +4,7 @@ using System.Collections.Generic; using System.Diagnostics; +using System.Net.Security; using System.Linq; using System.Net.Test.Common; using System.Text; @@ -1308,6 +1309,48 @@ public async Task Http2_PendingSend_Cancellation() } } + [ConditionalFact(nameof(SupportsAlpn))] + public async Task Http2_ProtocolMismatch_Throws() + { + HttpClientHandler handler = CreateHttpClientHandler(); + handler.ServerCertificateCustomValidationCallback = TestHelper.AllowAllCertificates; + + using (HttpClient client = CreateHttpClient()) + { + // Create HTTP/1.1 loopback server and advertise HTTP2 via ALPN. + await LoopbackServer.CreateServerAsync(async (server, uri) => + { + // Convert http to https as we are going to negotiate TLS. + Task requestTask = client.GetStringAsync(uri.ToString().Replace("http://", "https://")); + + await server.AcceptConnectionAsync(async connection => + { + // negotiate TLS with ALPN H/2 + var sslStream = new SslStream(connection.Stream, false, delegate { return true; }); + SslServerAuthenticationOptions options = new SslServerAuthenticationOptions(); + options.ServerCertificate = Net.Test.Common.Configuration.Certificates.GetServerCertificate(); + options.ApplicationProtocols = new List() { SslApplicationProtocol.Http2 }; + options.ApplicationProtocols.Add(SslApplicationProtocol.Http2); + // Negotiate TLS. + await sslStream.AuthenticateAsServerAsync(options, CancellationToken.None).ConfigureAwait(false); + // Send back HTTP/1.1 response + await sslStream.WriteAsync(Encoding.ASCII.GetBytes("HTTP/1.1 400 Unrecognized request\r\n\r\n"), CancellationToken.None); + }); + + try { + await requestTask; + throw new Exception("Should not be here"); + } + catch (HttpRequestException e) + { + Assert.NotNull(e.InnerException); + // TBD expect Http2ProtocolException when/if exposed + Assert.False(e.InnerException is ObjectDisposedException); + } + //}); + }); + } + // rfc7540 8.1.2.3. [ConditionalFact(nameof(SupportsAlpn))] public async Task Http2GetAsync_MultipleStatusHeaders_Throws() From 3075793b035cfa51d5b2a8aa0d388ee41faf2bf9 Mon Sep 17 00:00:00 2001 From: Viktor Hofer Date: Fri, 3 May 2019 12:23:37 +0200 Subject: [PATCH 188/607] Fix build break in HttpClientHandlerTest Caused by https://github.com/dotnet/corefx/commit/c412fa7dc60559dc38050c63b2e34b5156a2499e --- .../tests/FunctionalTests/HttpClientHandlerTest.Http2.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Http2.cs b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Http2.cs index b45dbcab1e7e..c4b903ce5f94 100644 --- a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Http2.cs +++ b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Http2.cs @@ -1337,7 +1337,8 @@ await server.AcceptConnectionAsync(async connection => await sslStream.WriteAsync(Encoding.ASCII.GetBytes("HTTP/1.1 400 Unrecognized request\r\n\r\n"), CancellationToken.None); }); - try { + try + { await requestTask; throw new Exception("Should not be here"); } @@ -1347,8 +1348,8 @@ await server.AcceptConnectionAsync(async connection => // TBD expect Http2ProtocolException when/if exposed Assert.False(e.InnerException is ObjectDisposedException); } - //}); }); + } } // rfc7540 8.1.2.3. From dab7fd41802389b41f4b22b6e1caac2b8df54d3d Mon Sep 17 00:00:00 2001 From: Stephen Toub Date: Fri, 3 May 2019 10:13:07 -0400 Subject: [PATCH 189/607] Tweak asserts used in GetGCMemoryInfo test to be more informative (#37387) With Assert.True, all we know is whether the test passed or failed. With Assert.Equal and Assert.InRange, a failure will include information about the input values. --- .../tests/System/GCTests.netcoreapp.cs | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/System.Runtime/tests/System/GCTests.netcoreapp.cs b/src/System.Runtime/tests/System/GCTests.netcoreapp.cs index d01349369e40..13cafec0fd55 100644 --- a/src/System.Runtime/tests/System/GCTests.netcoreapp.cs +++ b/src/System.Runtime/tests/System/GCTests.netcoreapp.cs @@ -36,11 +36,11 @@ public static void GetGCMemoryInfo() GCMemoryInfo memoryInfo1 = GC.GetGCMemoryInfo(); - Assert.True(memoryInfo1.HighMemoryLoadThresholdBytes > 0); - Assert.True(memoryInfo1.MemoryLoadBytes > 0); - Assert.True(memoryInfo1.TotalAvailableMemoryBytes > 0); - Assert.True(memoryInfo1.HeapSizeBytes > 0); - Assert.True(memoryInfo1.FragmentedBytes >= 0); + Assert.InRange(memoryInfo1.HighMemoryLoadThresholdBytes, 1, long.MaxValue); + Assert.InRange(memoryInfo1.MemoryLoadBytes, 1, long.MaxValue); + Assert.InRange(memoryInfo1.TotalAvailableMemoryBytes, 1, long.MaxValue); + Assert.InRange(memoryInfo1.HeapSizeBytes, 1, long.MaxValue); + Assert.InRange(memoryInfo1.FragmentedBytes, 0, long.MaxValue); GCHandle[] gch = new GCHandle[64 * 1024]; for (int i = 0; i < gch.Length * 2; ++i) @@ -57,11 +57,11 @@ public static void GetGCMemoryInfo() GCMemoryInfo memoryInfo2 = GC.GetGCMemoryInfo(); - Assert.True(memoryInfo2.HighMemoryLoadThresholdBytes == memoryInfo1.HighMemoryLoadThresholdBytes); - Assert.True(memoryInfo2.MemoryLoadBytes >= memoryInfo1.MemoryLoadBytes); - Assert.True(memoryInfo2.TotalAvailableMemoryBytes == memoryInfo1.TotalAvailableMemoryBytes); - Assert.True(memoryInfo2.HeapSizeBytes > memoryInfo1.HeapSizeBytes); - Assert.True(memoryInfo2.FragmentedBytes > memoryInfo1.FragmentedBytes); + Assert.Equal(memoryInfo2.HighMemoryLoadThresholdBytes, memoryInfo1.HighMemoryLoadThresholdBytes); + Assert.InRange(memoryInfo2.MemoryLoadBytes, memoryInfo1.MemoryLoadBytes, long.MaxValue); + Assert.Equal(memoryInfo2.TotalAvailableMemoryBytes, memoryInfo1.TotalAvailableMemoryBytes); + Assert.InRange(memoryInfo2.HeapSizeBytes, memoryInfo1.HeapSizeBytes + 1, long.MaxValue); + Assert.InRange(memoryInfo2.FragmentedBytes, memoryInfo1.FragmentedBytes + 1, long.MaxValue); }).Dispose(); } } From 1cd41ad660e5cb5c8778d86334f7c79b45e521e8 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Fri, 3 May 2019 10:17:33 -0400 Subject: [PATCH 190/607] Update dependencies from https://github.com/dotnet/corefx build 20190502.9 (#37406) - runtime.native.System.IO.Ports - 4.6.0-preview6.19252.9 - Microsoft.NETCore.Platforms - 3.0.0-preview6.19252.9 --- eng/Version.Details.xml | 8 ++++---- eng/Versions.props | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 2f240f0474c7..dab055724f6f 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -26,13 +26,13 @@ https://github.com/dotnet/core-setup cc67037583762fd5ab3876dc5210c1a41bc42994 - + https://github.com/dotnet/corefx - 3728c9618debe640c22d7469fe4aa937f4a774b7 + 1f159018b21e1f70fa2ade50d5e341f5ce457654 - + https://github.com/dotnet/corefx - 3728c9618debe640c22d7469fe4aa937f4a774b7 + 1f159018b21e1f70fa2ade50d5e341f5ce457654 https://github.com/dotnet/arcade diff --git a/eng/Versions.props b/eng/Versions.props index 7eb19da66c94..16195aabf005 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -43,8 +43,8 @@ 3.0.0-preview6-27701-72 3.0.0-preview6-27701-72 - 3.0.0-preview6.19252.1 - 4.6.0-preview6.19252.1 + 3.0.0-preview6.19252.9 + 4.6.0-preview6.19252.9 2.1.0-prerelease.19230.1 From d18bf393b51862780320772672307abacd01d55d Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Fri, 3 May 2019 10:18:20 -0400 Subject: [PATCH 191/607] Update dependencies from https://github.com/dotnet/core-setup build 20190503.02 (#37405) - Microsoft.NETCore.App - 3.0.0-preview6-27703-02 - Microsoft.NETCore.DotNetHostPolicy - 3.0.0-preview6-27703-02 - Microsoft.NETCore.DotNetHost - 3.0.0-preview6-27703-02 --- eng/Version.Details.xml | 12 ++++++------ eng/Versions.props | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index dab055724f6f..395790ea74b8 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -14,17 +14,17 @@ - + https://github.com/dotnet/core-setup - cc67037583762fd5ab3876dc5210c1a41bc42994 + 45876af5c7a20db88da33f0fa46b987767951c13 - + https://github.com/dotnet/core-setup - cc67037583762fd5ab3876dc5210c1a41bc42994 + 45876af5c7a20db88da33f0fa46b987767951c13 - + https://github.com/dotnet/core-setup - cc67037583762fd5ab3876dc5210c1a41bc42994 + 45876af5c7a20db88da33f0fa46b987767951c13 https://github.com/dotnet/corefx diff --git a/eng/Versions.props b/eng/Versions.props index 16195aabf005..d02a285e0821 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -36,9 +36,9 @@ 2.2.0-beta.19229.8 1.0.0-beta.19229.8 - 3.0.0-preview6-27702-01 - 3.0.0-preview6-27702-01 - 3.0.0-preview6-27702-01 + 3.0.0-preview6-27703-02 + 3.0.0-preview6-27703-02 + 3.0.0-preview6-27703-02 3.0.0-preview6-27701-72 3.0.0-preview6-27701-72 From 354260c3a67c69a1009e4bf8c2cba4f63c5828cd Mon Sep 17 00:00:00 2001 From: dotnet-maestro-bot Date: Fri, 3 May 2019 07:21:01 -0700 Subject: [PATCH 192/607] Update ProjectNTfs, ProjectNTfsTestILC to beta-27703-00, beta-27703-00, respectively (#37356) --- eng/dependencies.props | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/eng/dependencies.props b/eng/dependencies.props index 713a46f2da88..e2a0b065456a 100644 --- a/eng/dependencies.props +++ b/eng/dependencies.props @@ -9,8 +9,8 @@ These ref versions are pulled from https://github.com/dotnet/versions. --> - dcfddcd11246b4bae43860cc239ce01749afc727 - dcfddcd11246b4bae43860cc239ce01749afc727 + 4ebf44309b6c66d511de35421b81c5d17f4d33aa + 4ebf44309b6c66d511de35421b81c5d17f4d33aa 8bd1ec5fac9f0eec34ff6b34b1d878b4359e02dd @@ -22,9 +22,9 @@ - beta-27701-01 - beta-27701-01 - 1.0.0-beta-27701-01 + beta-27703-00 + beta-27703-00 + 1.0.0-beta-27703-00 4.4.0 From ecb4d648de5edbfb9f6907cc05c5e98f7005460e Mon Sep 17 00:00:00 2001 From: Charles Stoner Date: Fri, 3 May 2019 07:21:35 -0700 Subject: [PATCH 193/607] Port Constants, Globals, DateAndTime (#37376) * Port Constants, Globals, DateAndTime * PR feedback * Add DateString test * Remove using --- .../ref/Microsoft.VisualBasic.Core.cs | 168 +++++- .../src/Microsoft.VisualBasic.Core.vbproj | 3 +- .../src/Microsoft/VisualBasic/CallType.vb | 12 - .../CompilerServices/Utils.LateBinder.vb | 5 +- .../VisualBasic/CompilerServices/Utils.vb | 73 ++- .../src/Microsoft/VisualBasic/Constants.vb | 80 +++ .../src/Microsoft/VisualBasic/DateAndTime.vb | 570 +++++++++++++++++- .../src/Microsoft/VisualBasic/Globals.vb | 118 ++++ .../VisualBasic/Helpers/SafeNativeMethods.vb | 31 + .../Helpers/UnsafeNativeMethods.vb | 4 + .../src/Microsoft/VisualBasic/VariantType.vb | 28 - .../tests/DateAndTimeTests.cs | 447 +++++++++++++- 12 files changed, 1479 insertions(+), 60 deletions(-) delete mode 100644 src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/CallType.vb create mode 100644 src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/Helpers/SafeNativeMethods.vb delete mode 100644 src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/VariantType.vb diff --git a/src/Microsoft.VisualBasic.Core/ref/Microsoft.VisualBasic.Core.cs b/src/Microsoft.VisualBasic.Core/ref/Microsoft.VisualBasic.Core.cs index 3ceaf6aa4f3b..2a92c08715ac 100644 --- a/src/Microsoft.VisualBasic.Core/ref/Microsoft.VisualBasic.Core.cs +++ b/src/Microsoft.VisualBasic.Core/ref/Microsoft.VisualBasic.Core.cs @@ -7,6 +7,15 @@ namespace Microsoft.VisualBasic { + public enum AppWinStyle : short + { + Hide = 0, + MaximizedFocus = 3, + MinimizedFocus = 2, + MinimizedNoFocus = 6, + NormalFocus = 1, + NormalNoFocus = 4, + } public enum CallType { Method = 1, @@ -65,44 +74,109 @@ public enum CompareMethod public sealed partial class Constants { internal Constants() { } + public const MsgBoxResult vbAbort = MsgBoxResult.Abort; + public const MsgBoxStyle vbAbortRetryIgnore = MsgBoxStyle.AbortRetryIgnore; + public const MsgBoxStyle vbApplicationModal = MsgBoxStyle.ApplicationModal; public const FileAttribute vbArchive = FileAttribute.Archive; + public const VariantType vbArray = VariantType.Array; public const string vbBack = "\b"; public const Microsoft.VisualBasic.CompareMethod vbBinaryCompare = Microsoft.VisualBasic.CompareMethod.Binary; + public const VariantType vbBoolean = VariantType.Boolean; + public const VariantType vbByte = VariantType.Byte; + public const MsgBoxResult vbCancel = MsgBoxResult.Cancel; public const string vbCr = "\r"; + public const MsgBoxStyle vbCritical = MsgBoxStyle.Critical; public const string vbCrLf = "\r\n"; + public const VariantType vbCurrency = VariantType.Currency; + public const VariantType vbDate = VariantType.Date; + public const VariantType vbDecimal = VariantType.Decimal; + public const MsgBoxStyle vbDefaultButton1 = MsgBoxStyle.ApplicationModal; + public const MsgBoxStyle vbDefaultButton2 = MsgBoxStyle.DefaultButton2; + public const MsgBoxStyle vbDefaultButton3 = MsgBoxStyle.DefaultButton3; public const FileAttribute vbDirectory = FileAttribute.Directory; + public const VariantType vbDouble = VariantType.Double; + public const VariantType vbEmpty = VariantType.Empty; + public const MsgBoxStyle vbExclamation = MsgBoxStyle.Exclamation; public const TriState vbFalse = TriState.False; + public const FirstWeekOfYear vbFirstFourDays = FirstWeekOfYear.FirstFourDays; + public const FirstWeekOfYear vbFirstFullWeek = FirstWeekOfYear.FirstFullWeek; + public const FirstWeekOfYear vbFirstJan1 = FirstWeekOfYear.Jan1; public const string vbFormFeed = "\f"; + public const FirstDayOfWeek vbFriday = FirstDayOfWeek.Friday; public const DateFormat vbGeneralDate = DateFormat.GeneralDate; + public const CallType vbGet = CallType.Get; + public const AppWinStyle vbHide = AppWinStyle.Hide; public const FileAttribute vbHidden = FileAttribute.Hidden; public const VbStrConv vbHiragana = VbStrConv.Hiragana; + public const MsgBoxStyle vbInformation = MsgBoxStyle.Information; + public const MsgBoxResult vbIgnore = MsgBoxResult.Ignore; + public const VariantType vbInteger = VariantType.Integer; public const VbStrConv vbKatakana = VbStrConv.Katakana; + public const CallType vbLet = CallType.Let; public const string vbLf = "\n"; public const VbStrConv vbLinguisticCasing = VbStrConv.LinguisticCasing; + public const VariantType vbLong = VariantType.Long; public const DateFormat vbLongDate = DateFormat.LongDate; public const DateFormat vbLongTime = DateFormat.LongTime; public const VbStrConv vbLowerCase = VbStrConv.Lowercase; + public const CallType vbMethod = CallType.Method; + public const AppWinStyle vbMaximizedFocus = AppWinStyle.MaximizedFocus; + public const AppWinStyle vbMinimizedFocus = AppWinStyle.MinimizedFocus; + public const AppWinStyle vbMinimizedNoFocus = AppWinStyle.MinimizedNoFocus; + public const FirstDayOfWeek vbMonday = FirstDayOfWeek.Monday; + public const MsgBoxStyle vbMsgBoxHelp = MsgBoxStyle.MsgBoxHelp; + public const MsgBoxStyle vbMsgBoxRight = MsgBoxStyle.MsgBoxRight; + public const MsgBoxStyle vbMsgBoxRtlReading = MsgBoxStyle.MsgBoxRtlReading; + public const MsgBoxStyle vbMsgBoxSetForeground = MsgBoxStyle.MsgBoxSetForeground; [System.ObsoleteAttribute("For a carriage return and line feed, use vbCrLf. For the current platform's newline, use System.Environment.NewLine.")] public const VbStrConv vbNarrow = VbStrConv.Narrow; public const string vbNewLine = "\r\n"; + public const MsgBoxResult vbNo = MsgBoxResult.No; public const FileAttribute vbNormal = FileAttribute.Normal; + public const AppWinStyle vbNormalFocus = AppWinStyle.NormalFocus; + public const AppWinStyle vbNormalNoFocus = AppWinStyle.NormalNoFocus; + public const VariantType vbNull = VariantType.Null; public const string vbNullChar = "\0"; public const string vbNullString = null; + public const VariantType vbObject = VariantType.Object; + public const int vbObjectError = unchecked((int)0x80040000); + public const MsgBoxResult vbOK = MsgBoxResult.Ok; + public const MsgBoxStyle vbOKCancel = MsgBoxStyle.OkCancel; + public const MsgBoxStyle vbOKOnly = MsgBoxStyle.ApplicationModal; public const VbStrConv vbProperCase = VbStrConv.ProperCase; + public const MsgBoxStyle vbQuestion = MsgBoxStyle.Question; public const FileAttribute vbReadOnly = FileAttribute.ReadOnly; + public const MsgBoxResult vbRetry = MsgBoxResult.Retry; + public const MsgBoxStyle vbRetryCancel = MsgBoxStyle.RetryCancel; + public const FirstDayOfWeek vbSaturday = FirstDayOfWeek.Saturday; + public const CallType vbSet = CallType.Set; public const DateFormat vbShortDate = DateFormat.ShortDate; public const DateFormat vbShortTime = DateFormat.ShortTime; public const VbStrConv vbSimplifiedChinese = VbStrConv.SimplifiedChinese; + public const VariantType vbSingle = VariantType.Single; + public const VariantType vbString = VariantType.String; + public const FirstDayOfWeek vbSunday = FirstDayOfWeek.Sunday; public const FileAttribute vbSystem = FileAttribute.System; + public const MsgBoxStyle vbSystemModal = MsgBoxStyle.SystemModal; public const string vbTab = "\t"; public const Microsoft.VisualBasic.CompareMethod vbTextCompare = Microsoft.VisualBasic.CompareMethod.Text; + public const FirstDayOfWeek vbThursday = FirstDayOfWeek.Thursday; public const VbStrConv vbTraditionalChinese = VbStrConv.TraditionalChinese; public const TriState vbTrue = TriState.True; + public const FirstDayOfWeek vbTuesday = FirstDayOfWeek.Tuesday; public const VbStrConv vbUpperCase = VbStrConv.Uppercase; public const TriState vbUseDefault = TriState.UseDefault; + public const VariantType vbUserDefinedType = VariantType.UserDefinedType; + public const FirstWeekOfYear vbUseSystem = FirstWeekOfYear.System; + public const FirstDayOfWeek vbUseSystemDayOfWeek = FirstDayOfWeek.System; + public const VariantType vbVariant = VariantType.Variant; public const string vbVerticalTab = "\v"; public const FileAttribute vbVolume = FileAttribute.Volume; + public const FirstDayOfWeek vbWednesday = FirstDayOfWeek.Wednesday; public const VbStrConv vbWide = VbStrConv.Wide; + public const MsgBoxResult vbYes = MsgBoxResult.Yes; + public const MsgBoxStyle vbYesNo = MsgBoxStyle.YesNo; + public const MsgBoxStyle vbYesNoCancel = MsgBoxStyle.YesNoCancel; } public sealed partial class ControlChars { @@ -175,8 +249,31 @@ internal Conversion() { } public sealed partial class DateAndTime { internal DateAndTime() { } + public static System.DateTime DateAdd(DateInterval Interval, double Number, System.DateTime DateValue) { throw null; } + public static System.DateTime DateAdd(string Interval, double Number, object DateValue) { throw null; } + public static long DateDiff(DateInterval Interval, System.DateTime Date1, System.DateTime Date2, FirstDayOfWeek DayOfWeek = FirstDayOfWeek.Sunday, FirstWeekOfYear WeekOfYear = FirstWeekOfYear.Jan1) { throw null; } + public static long DateDiff(string Interval, object Date1, object Date2, FirstDayOfWeek DayOfWeek = FirstDayOfWeek.Sunday, FirstWeekOfYear WeekOfYear = FirstWeekOfYear.Jan1) { throw null; } + public static int DatePart(DateInterval Interval, System.DateTime DateValue, FirstDayOfWeek FirstDayOfWeekValue = FirstDayOfWeek.Sunday, FirstWeekOfYear FirstWeekOfYearValue = FirstWeekOfYear.Jan1) { throw null; } + public static int DatePart(string Interval, object DateValue, FirstDayOfWeek DayOfWeek = FirstDayOfWeek.Sunday, FirstWeekOfYear WeekOfYear = FirstWeekOfYear.Jan1) { throw null; } + public static System.DateTime DateSerial(int Year, int Month, int Day) { throw null; } + public static string DateString { get { throw null; } set { } } + public static System.DateTime DateValue(string StringDate) { throw null; } + public static int Day(System.DateTime DateValue) { throw null; } + public static int Hour(System.DateTime TimeValue) { throw null; } + public static int Minute(System.DateTime TimeValue) { throw null; } + public static int Month(System.DateTime DateValue) { throw null; } + public static string MonthName(int Month, bool Abbreviate = false) { throw null; } public static System.DateTime Now { get { throw null; } } - public static System.DateTime Today { get { throw null; } } + public static int Second(System.DateTime TimeValue) { throw null; } + public static System.DateTime TimeOfDay { get { throw null; } set { } } + public static double Timer { get { throw null; } } + public static System.DateTime TimeSerial(int Hour, int Minute, int Second) { throw null; } + public static string TimeString { get { throw null; } set { } } + public static System.DateTime TimeValue(string StringTime) { throw null; } + public static System.DateTime Today { get { throw null; } set { } } + public static int Weekday(System.DateTime DateValue, FirstDayOfWeek DayOfWeek = FirstDayOfWeek.Sunday) { throw null; } + public static string WeekdayName(int Weekday, bool Abbreviate = false, FirstDayOfWeek FirstDayOfWeekValue = FirstDayOfWeek.System) { throw null; } + public static int Year(System.DateTime DateValue) { throw null; } } public enum DateFormat { @@ -186,6 +283,24 @@ public enum DateFormat ShortDate = 2, ShortTime = 4, } + public enum DateInterval + { + DayOfYear = 3, + Day = 4, + Hour = 7, + Minute = 8, + Month = 2, + Quarter = 1, + Second = 9, + Weekday = 6, + WeekOfYear = 5, + Year = 0, + } + public enum DueDate + { + BegOfPeriod = 1, + EndOfPeriod = 0, + } public sealed partial class ErrObject { internal ErrObject() { } @@ -297,6 +412,24 @@ public static void Unlock(int FileNumber, long FromRecord, long ToRecord) { } public static void Write(int FileNumber, params object[] Output) { } public static void WriteLine(int FileNumber, params object[] Output) { } } + public enum FirstDayOfWeek + { + Friday = 6, + Monday = 2, + Saturday = 7, + Sunday = 1, + System = 0, + Thursday = 5, + Tuesday = 3, + Wednesday = 4, + } + public enum FirstWeekOfYear + { + FirstFourDays = 2, + FirstFullWeek = 3, + Jan1 = 1, + System = 0, + } [System.AttributeUsageAttribute(System.AttributeTargets.Class, AllowMultiple=false, Inherited=false)] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public sealed partial class HideModuleNameAttribute : System.Attribute @@ -330,6 +463,39 @@ public sealed partial class Interaction internal Interaction() { } public static object CallByName(object ObjectRef, string ProcName, CallType UseCallType, params object[] Args) { throw null; } } + public enum MsgBoxResult + { + Abort = 3, + Cancel = 2, + Ignore = 5, + Ok = 1, + Retry = 4, + No = 7, + Yes = 6, + } + [System.FlagsAttribute] + public enum MsgBoxStyle + { + AbortRetryIgnore = 2, + ApplicationModal = 0, + Critical = 16, + DefaultButton1 = 0, + DefaultButton2 = 256, + DefaultButton3 = 512, + Exclamation = 48, + Information = 64, + MsgBoxHelp = 16384, + MsgBoxRight = 524288, + MsgBoxRtlReading = 1048576, + MsgBoxSetForeground = 65536, + OkCancel = 1, + OkOnly = 0, + Question = 32, + RetryCancel = 5, + SystemModal = 4096, + YesNo = 4, + YesNoCancel = 3, + } [System.AttributeUsageAttribute(System.AttributeTargets.Class, AllowMultiple=false, Inherited=false)] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] public sealed partial class MyGroupCollectionAttribute : System.Attribute diff --git a/src/Microsoft.VisualBasic.Core/src/Microsoft.VisualBasic.Core.vbproj b/src/Microsoft.VisualBasic.Core/src/Microsoft.VisualBasic.Core.vbproj index c8413b93ff8e..4efe9860a2fa 100644 --- a/src/Microsoft.VisualBasic.Core/src/Microsoft.VisualBasic.Core.vbproj +++ b/src/Microsoft.VisualBasic.Core/src/Microsoft.VisualBasic.Core.vbproj @@ -23,6 +23,7 @@ + @@ -34,7 +35,6 @@ - @@ -111,7 +111,6 @@ - diff --git a/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/CallType.vb b/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/CallType.vb deleted file mode 100644 index 97412f05bbb7..000000000000 --- a/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/CallType.vb +++ /dev/null @@ -1,12 +0,0 @@ -' Licensed to the .NET Foundation under one or more agreements. -' The .NET Foundation licenses this file to you under the MIT license. -' See the LICENSE file in the project root for more information. - -Namespace Global.Microsoft.VisualBasic - Public Enum CallType - Method = 1 - [Get] = 2 - [Let] = 4 - [Set] = 8 - End Enum -End Namespace diff --git a/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/CompilerServices/Utils.LateBinder.vb b/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/CompilerServices/Utils.LateBinder.vb index 37b6adee699e..06fd03f10825 100644 --- a/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/CompilerServices/Utils.LateBinder.vb +++ b/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/CompilerServices/Utils.LateBinder.vb @@ -3,13 +3,10 @@ ' See the LICENSE file in the project root for more information. Imports System -Imports System.Security Imports System.Text Imports System.Globalization -Imports System.Runtime.InteropServices Imports System.Reflection Imports System.Diagnostics -Imports Microsoft.VisualBasic.CompilerServices.ExceptionUtils Imports Microsoft.VisualBasic.CompilerServices.Symbols Namespace Microsoft.VisualBasic.CompilerServices @@ -22,7 +19,7 @@ Namespace Microsoft.VisualBasic.CompilerServices Friend Const FACILITY_RPC As Integer = &H10000I Friend Const FACILITY_ITF As Integer = &H40000I Friend Const SCODE_FACILITY As Integer = &H1FFF0000I - Private Const s_ERROR_INVALID_PARAMETER As Integer = 87 + Private Const ERROR_INVALID_PARAMETER As Integer = 87 Friend Const chPeriod As Char = "."c Friend Const chSpace As Char = ChrW(32) diff --git a/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/CompilerServices/Utils.vb b/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/CompilerServices/Utils.vb index 76f7fdf173ae..f3b3af70de79 100644 --- a/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/CompilerServices/Utils.vb +++ b/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/CompilerServices/Utils.vb @@ -4,10 +4,13 @@ Imports System Imports System.Diagnostics +Imports System.Globalization Imports System.Linq Imports System.Linq.Expressions -Imports System.Text Imports System.Reflection +Imports System.Runtime.InteropServices +Imports System.Security +Imports System.Text Namespace Global.Microsoft.VisualBasic.CompilerServices @@ -15,6 +18,66 @@ Namespace Global.Microsoft.VisualBasic.CompilerServices Partial Public Class Utils Private Sub New() End Sub + + + Friend Shared Sub SetTime(ByVal dtTime As DateTime) +#If PLATFORM_WINDOWS Then + Dim systime As New NativeTypes.SystemTime + + SafeNativeMethods.GetLocalTime(systime) + + systime.wHour = CShort(dtTime.Hour) + systime.wMinute = CShort(dtTime.Minute) + systime.wSecond = CShort(dtTime.Second) + systime.wMilliseconds = CShort(dtTime.Millisecond) + + If UnsafeNativeMethods.SetLocalTime(systime) = 0 Then + If Marshal.GetLastWin32Error() = ERROR_INVALID_PARAMETER Then + Throw New ArgumentException(GetResourceString(SR.Argument_InvalidValue)) + Else + Throw New SecurityException(GetResourceString(SR.SetLocalTimeFailure)) + End If + End If +#Else + Throw New PlatformNotSupportedException() +#End If + End Sub + + + Friend Shared Sub SetDate(ByVal vDate As DateTime) +#If PLATFORM_WINDOWS Then + Dim systime As New NativeTypes.SystemTime + + SafeNativeMethods.GetLocalTime(systime) + + systime.wYear = CShort(vDate.Year) + systime.wMonth = CShort(vDate.Month) + systime.wDay = CShort(vDate.Day) + + If UnsafeNativeMethods.SetLocalTime(systime) = 0 Then + If Marshal.GetLastWin32Error() = ERROR_INVALID_PARAMETER Then + Throw New ArgumentException(GetResourceString(SR.Argument_InvalidValue)) + Else + Throw New SecurityException(GetResourceString(SR.SetLocalDateFailure)) + End If + End If +#Else + Throw New PlatformNotSupportedException() +#End If + End Sub + + Friend Shared Function GetDateTimeFormatInfo() As DateTimeFormatInfo + Return System.Threading.Thread.CurrentThread.CurrentCulture.DateTimeFormat + End Function + + Friend Shared Function GetFileIOEncoding() As Encoding + Return System.Text.Encoding.Default + End Function + + Friend Shared Function GetLocaleCodePage() As Integer + Return System.Threading.Thread.CurrentThread.CurrentCulture.TextInfo.ANSICodePage + End Function + Public Shared Function CopyArray(arySrc As Global.System.Array, aryDest As Global.System.Array) As Global.System.Array If arySrc Is Nothing Then Return aryDest @@ -54,14 +117,6 @@ Namespace Global.Microsoft.VisualBasic.CompilerServices Return aryDest End Function - Friend Shared Function GetFileIOEncoding() As Encoding - Return System.Text.Encoding.Default - End Function - - Friend Shared Function GetLocaleCodePage() As Integer - Return System.Threading.Thread.CurrentThread.CurrentCulture.TextInfo.ANSICodePage - End Function - End Class Friend Module ReflectionExtensions diff --git a/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/Constants.vb b/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/Constants.vb index 8f0babe1965d..2f4322787dde 100644 --- a/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/Constants.vb +++ b/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/Constants.vb @@ -8,6 +8,7 @@ Namespace Global.Microsoft.VisualBasic Public Module Constants Public Const vbCrLf As String = ChrW(13) & ChrW(10) + Public Const vbObjectError As Integer = &H80040000I Public Const vbNewLine As String = ChrW(13) & ChrW(10) Public Const vbCr As String = ChrW(13) @@ -19,6 +20,20 @@ Namespace Global.Microsoft.VisualBasic Public Const vbNullChar As String = ChrW(0) Public Const vbNullString As String = Nothing + 'AppWinStyle + Public Const vbHide As AppWinStyle = AppWinStyle.Hide + Public Const vbNormalFocus As AppWinStyle = AppWinStyle.NormalFocus + Public Const vbMinimizedFocus As AppWinStyle = AppWinStyle.MinimizedFocus + Public Const vbMaximizedFocus As AppWinStyle = AppWinStyle.MaximizedFocus + Public Const vbNormalNoFocus As AppWinStyle = AppWinStyle.NormalNoFocus + Public Const vbMinimizedNoFocus As AppWinStyle = AppWinStyle.MinimizedNoFocus + + 'vbCallType Enum values + Public Const vbMethod As CallType = CallType.Method + Public Const vbGet As CallType = CallType.Get + Public Const vbLet As CallType = CallType.Let + Public Const vbSet As CallType = CallType.Set + 'vbCompareMethod enum values Public Const vbBinaryCompare As CompareMethod = CompareMethod.Binary Public Const vbTextCompare As CompareMethod = CompareMethod.Text @@ -30,6 +45,16 @@ Namespace Global.Microsoft.VisualBasic Public Const vbLongTime As DateFormat = DateFormat.LongTime Public Const vbShortTime As DateFormat = DateFormat.ShortTime + 'vbDayOfWeek + Public Const vbUseSystemDayOfWeek As FirstDayOfWeek = FirstDayOfWeek.System + Public Const vbSunday As FirstDayOfWeek = FirstDayOfWeek.Sunday + Public Const vbMonday As FirstDayOfWeek = FirstDayOfWeek.Monday + Public Const vbTuesday As FirstDayOfWeek = FirstDayOfWeek.Tuesday + Public Const vbWednesday As FirstDayOfWeek = FirstDayOfWeek.Wednesday + Public Const vbThursday As FirstDayOfWeek = FirstDayOfWeek.Thursday + Public Const vbFriday As FirstDayOfWeek = FirstDayOfWeek.Friday + Public Const vbSaturday As FirstDayOfWeek = FirstDayOfWeek.Saturday + 'FileAttribute Public Const vbNormal As FileAttribute = FileAttribute.Normal Public Const vbReadOnly As FileAttribute = FileAttribute.ReadOnly @@ -39,6 +64,12 @@ Namespace Global.Microsoft.VisualBasic Public Const vbDirectory As FileAttribute = FileAttribute.Directory Public Const vbArchive As FileAttribute = FileAttribute.Archive + 'vbFirstWeekOfYear + Public Const vbUseSystem As FirstWeekOfYear = FirstWeekOfYear.System + Public Const vbFirstJan1 As FirstWeekOfYear = FirstWeekOfYear.Jan1 + Public Const vbFirstFourDays As FirstWeekOfYear = FirstWeekOfYear.FirstFourDays + Public Const vbFirstFullWeek As FirstWeekOfYear = FirstWeekOfYear.FirstFullWeek + 'vbStrConv Public Const vbUpperCase As VbStrConv = VbStrConv.Uppercase Public Const vbLowerCase As VbStrConv = VbStrConv.Lowercase @@ -56,6 +87,55 @@ Namespace Global.Microsoft.VisualBasic Public Const vbTrue As TriState = TriState.True Public Const vbFalse As TriState = TriState.False + 'VariantType + Public Const vbEmpty As VariantType = VariantType.Empty + Public Const vbNull As VariantType = VariantType.Null + Public Const vbInteger As VariantType = VariantType.Integer + Public Const vbLong As VariantType = VariantType.Long + Public Const vbSingle As VariantType = VariantType.Single + Public Const vbDouble As VariantType = VariantType.Double + Public Const vbCurrency As VariantType = VariantType.Currency + Public Const vbDate As VariantType = VariantType.Date + Public Const vbString As VariantType = VariantType.String + Public Const vbObject As VariantType = VariantType.Object + Public Const vbBoolean As VariantType = VariantType.Boolean + Public Const vbVariant As VariantType = VariantType.Variant + Public Const vbDecimal As VariantType = VariantType.Decimal + Public Const vbByte As VariantType = VariantType.Byte + Public Const vbUserDefinedType As VariantType = VariantType.UserDefinedType + Public Const vbArray As VariantType = VariantType.Array + + 'MsgBoxResult + Public Const vbOK As MsgBoxResult = MsgBoxResult.Ok + Public Const vbCancel As MsgBoxResult = MsgBoxResult.Cancel + Public Const vbAbort As MsgBoxResult = MsgBoxResult.Abort + Public Const vbRetry As MsgBoxResult = MsgBoxResult.Retry + Public Const vbIgnore As MsgBoxResult = MsgBoxResult.Ignore + Public Const vbYes As MsgBoxResult = MsgBoxResult.Yes + Public Const vbNo As MsgBoxResult = MsgBoxResult.No + + 'MsgBoxStyle + 'You may BitOr one value from each group + Public Const vbOKOnly As MsgBoxStyle = MsgBoxStyle.OkOnly + Public Const vbOKCancel As MsgBoxStyle = MsgBoxStyle.OkCancel + Public Const vbAbortRetryIgnore As MsgBoxStyle = MsgBoxStyle.AbortRetryIgnore + Public Const vbYesNoCancel As MsgBoxStyle = MsgBoxStyle.YesNoCancel + Public Const vbYesNo As MsgBoxStyle = MsgBoxStyle.YesNo + Public Const vbRetryCancel As MsgBoxStyle = MsgBoxStyle.RetryCancel + Public Const vbCritical As MsgBoxStyle = MsgBoxStyle.Critical + Public Const vbQuestion As MsgBoxStyle = MsgBoxStyle.Question + Public Const vbExclamation As MsgBoxStyle = MsgBoxStyle.Exclamation + Public Const vbInformation As MsgBoxStyle = MsgBoxStyle.Information + Public Const vbDefaultButton1 As MsgBoxStyle = MsgBoxStyle.DefaultButton1 + Public Const vbDefaultButton2 As MsgBoxStyle = MsgBoxStyle.DefaultButton2 + Public Const vbDefaultButton3 As MsgBoxStyle = MsgBoxStyle.DefaultButton3 + Public Const vbApplicationModal As MsgBoxStyle = MsgBoxStyle.ApplicationModal + Public Const vbSystemModal As MsgBoxStyle = MsgBoxStyle.SystemModal + Public Const vbMsgBoxHelp As MsgBoxStyle = MsgBoxStyle.MsgBoxHelp + Public Const vbMsgBoxRight As MsgBoxStyle = MsgBoxStyle.MsgBoxRight + Public Const vbMsgBoxRtlReading As MsgBoxStyle = MsgBoxStyle.MsgBoxRtlReading + Public Const vbMsgBoxSetForeground As MsgBoxStyle = MsgBoxStyle.MsgBoxSetForeground + End Module End Namespace diff --git a/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/DateAndTime.vb b/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/DateAndTime.vb index afff19001fc7..bc42c4972b00 100644 --- a/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/DateAndTime.vb +++ b/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/DateAndTime.vb @@ -3,19 +3,585 @@ ' See the LICENSE file in the project root for more information. Imports System +Imports System.Globalization +Imports Microsoft.VisualBasic.CompilerServices +Imports Microsoft.VisualBasic.CompilerServices.ExceptionUtils +Imports Microsoft.VisualBasic.CompilerServices.Utils Namespace Microsoft.VisualBasic Public Module DateAndTime + + Private AcceptedDateFormatsDBCS() As String = {"yyyy-M-d", "y-M-d", "yyyy/M/d", "y/M/d"} + Private AcceptedDateFormatsSBCS() As String = {"M-d-yyyy", "M-d-y", "M/d/yyyy", "M/d/y"} + + '============================================================================ + ' Date/Time Properties + '============================================================================ + Public Property Today() As DateTime + Get + Return DateTime.Today + End Get + Set(ByVal Value As DateTime) + SetDate(Value) + End Set + End Property + Public ReadOnly Property Now As DateTime Get Return DateTime.Now End Get End Property - Public ReadOnly Property Today As DateTime + Public Property TimeOfDay() As DateTime Get - Return DateTime.Today + Dim Ticks As Int64 = DateTime.Now.TimeOfDay.Ticks + + 'Truncate to the nearest second + Return New DateTime(Ticks - Ticks Mod TimeSpan.TicksPerSecond) + End Get + Set(ByVal Value As DateTime) + SetTime(Value) + End Set + End Property + + ' TimeString (replaces Time$) + Public Property TimeString() As String + 'Locale agnostic, Always returns 24hr clock + Get + Return (New DateTime(DateTime.Now.TimeOfDay.Ticks)).ToString("HH:mm:ss", GetInvariantCultureInfo()) + End Get + Set(ByVal Value As String) + Dim dt As Date + + Try + dt = CompilerServices.DateType.FromString(Value, GetInvariantCultureInfo()) + Catch ex As StackOverflowException + Throw ex + Catch ex As OutOfMemoryException + Throw ex + Catch ex As System.Threading.ThreadAbortException + Throw ex + Catch + Throw VbMakeException(New InvalidCastException(GetResourceString(SR.InvalidCast_FromStringTo, Left(Value, 32), "Date")), vbErrors.IllegalFuncCall) + End Try + + SetTime(dt) + End Set + End Property + + Private Function IsDBCSCulture() As Boolean +#If PLATFORM_WINDOWS Then + 'This function is apparently trying to determine a different default for East Asian systems. + If System.Runtime.InteropServices.Marshal.SystemMaxDBCSCharSize = 1 Then + Return False + End If + Return True +#Else + ' Emulate IsDBCSCulture of .NET 3.5 using CultureInfo + Dim langName As String = System.Threading.Thread.CurrentThread.CurrentCulture.TwoLetterISOLanguageName + Return String.Equals(langName, "zh", StringComparison.OrdinalIgnoreCase) OrElse _ + String.Equals(langName, "ko", StringComparison.OrdinalIgnoreCase) OrElse _ + String.Equals(langName, "ja", StringComparison.OrdinalIgnoreCase) +#End If + End Function + + Public Property DateString() As String + ' DateString (replaces Date$) + 'Returns yyyy-MM-dd for DBCS locale + 'Returns MM-dd-yyyy for non-DBCS locale + Get + If IsDBCSCulture() Then + Return DateTime.Today.ToString("yyyy\-MM\-dd", GetInvariantCultureInfo()) + Else + Return DateTime.Today.ToString("MM\-dd\-yyyy", GetInvariantCultureInfo()) + End If + End Get + Set(ByVal Value As String) + Dim NewDate As Date + + Try + Dim TmpValue As String = ToHalfwidthNumbers(Value, GetCultureInfo()) + If IsDBCSCulture() Then + NewDate = DateTime.ParseExact(TmpValue, AcceptedDateFormatsDBCS, GetInvariantCultureInfo(), DateTimeStyles.AllowWhiteSpaces) + Else + NewDate = DateTime.ParseExact(TmpValue, AcceptedDateFormatsSBCS, GetInvariantCultureInfo(), DateTimeStyles.AllowWhiteSpaces) + End If + Catch ex As StackOverflowException + Throw ex + Catch ex As OutOfMemoryException + Throw ex + Catch ex As System.Threading.ThreadAbortException + Throw ex + Catch + Throw VbMakeException(New InvalidCastException(GetResourceString(SR.InvalidCast_FromStringTo, Left(Value, 32), "Date")), vbErrors.IllegalFuncCall) + End Try + + SetDate(NewDate) + + End Set + End Property + + Public ReadOnly Property Timer() As Double + Get + 'Returns number of seconds past Midnight + Return (System.DateTime.Now.Ticks Mod System.TimeSpan.TicksPerDay) / + (TimeSpan.TicksPerMillisecond * 1000) End Get End Property + + Private ReadOnly Property CurrentCalendar() As Calendar + Get + Return Threading.Thread.CurrentThread.CurrentCulture.Calendar + End Get + End Property + + '============================================================================ + ' Date manipulation functions. + '============================================================================ + Public Function DateAdd(ByVal Interval As DateInterval, + ByVal Number As Double, + ByVal DateValue As DateTime) As DateTime + Dim lNumber As Integer + + lNumber = CInt(Fix(Number)) + + Select Case Interval + Case DateInterval.Year + Return CurrentCalendar.AddYears(DateValue, lNumber) + Case DateInterval.Month + Return CurrentCalendar.AddMonths(DateValue, lNumber) + Case DateInterval.Day, + DateInterval.DayOfYear, + DateInterval.Weekday + Return DateValue.AddDays(lNumber) + Case DateInterval.WeekOfYear + Return DateValue.AddDays(lNumber * 7.0#) + Case DateInterval.Hour + Return DateValue.AddHours(lNumber) + Case DateInterval.Minute + Return DateValue.AddMinutes(lNumber) + Case DateInterval.Second + Return DateValue.AddSeconds(lNumber) + Case DateInterval.Quarter + Return DateValue.AddMonths(lNumber * 3) + End Select + + Throw New ArgumentException(GetResourceString(SR.Argument_InvalidValue1, "Interval")) + End Function + + Public Function DateDiff(ByVal Interval As DateInterval, + ByVal Date1 As DateTime, + ByVal Date2 As DateTime, + Optional ByVal DayOfWeek As FirstDayOfWeek = FirstDayOfWeek.Sunday, + Optional ByVal WeekOfYear As FirstWeekOfYear = FirstWeekOfYear.Jan1) As Long + + Dim tm As TimeSpan + Dim cal As Calendar + + tm = Date2.Subtract(Date1) + + Select Case Interval + Case DateInterval.Year + cal = CurrentCalendar + Return cal.GetYear(Date2) - cal.GetYear(Date1) + Case DateInterval.Month + cal = CurrentCalendar + Return (cal.GetYear(Date2) - cal.GetYear(Date1)) * 12 + cal.GetMonth(Date2) - cal.GetMonth(Date1) + Case DateInterval.Day, + DateInterval.DayOfYear + Return CLng(Fix(tm.TotalDays())) + Case DateInterval.Hour + Return CLng(Fix(tm.TotalHours())) + Case DateInterval.Minute + Return CLng(Fix(tm.TotalMinutes())) + Case DateInterval.Second + Return CLng(Fix(tm.TotalSeconds())) + Case DateInterval.WeekOfYear + Date1 = Date1.AddDays(-GetDayOfWeek(Date1, DayOfWeek)) + Date2 = Date2.AddDays(-GetDayOfWeek(Date2, DayOfWeek)) + tm = Date2.Subtract(Date1) + Return CLng(Fix(tm.TotalDays())) \ 7 + Case DateInterval.Weekday + Return CLng(Fix(tm.TotalDays())) \ 7 + Case DateInterval.Quarter + cal = CurrentCalendar + Return (cal.GetYear(Date2) - cal.GetYear(Date1)) * 4 + (cal.GetMonth(Date2) - 1) \ 3 - (cal.GetMonth(Date1) - 1) \ 3 + End Select + + Throw New ArgumentException(GetResourceString(SR.Argument_InvalidValue1, "Interval")) + End Function + + Private Function GetDayOfWeek(ByVal dt As Date, ByVal weekdayFirst As FirstDayOfWeek) As Integer + If (weekdayFirst < FirstDayOfWeek.System OrElse weekdayFirst > FirstDayOfWeek.Saturday) Then + Throw VbMakeException(vbErrors.IllegalFuncCall) + End If + + ' If FirstWeekDay is 0, get offset from NLS. + If (weekdayFirst = FirstDayOfWeek.System) Then + weekdayFirst = CType(GetDateTimeFormatInfo().FirstDayOfWeek + 1, FirstDayOfWeek) + End If + + Return (dt.DayOfWeek - weekdayFirst + 8) Mod 7 + 1 + End Function + + Public Function DatePart(ByVal Interval As DateInterval, ByVal DateValue As DateTime, + Optional ByVal FirstDayOfWeekValue As FirstDayOfWeek = vbSunday, + Optional ByVal FirstWeekOfYearValue As FirstWeekOfYear = vbFirstJan1) As Integer + + 'Get the part asked for + Select Case Interval + Case DateInterval.Year + Return CurrentCalendar.GetYear(DateValue) + Case DateInterval.Month + Return CurrentCalendar.GetMonth(DateValue) + Case DateInterval.Day + Return CurrentCalendar.GetDayOfMonth(DateValue) + Case DateInterval.Hour + Return CurrentCalendar.GetHour(DateValue) + Case DateInterval.Minute + Return CurrentCalendar.GetMinute(DateValue) + Case DateInterval.Second + Return CurrentCalendar.GetSecond(DateValue) + Case DateInterval.Weekday + Return Weekday(DateValue, FirstDayOfWeekValue) + Case DateInterval.WeekOfYear + Dim WeekRule As CalendarWeekRule + Dim Day As DayOfWeek + + If FirstDayOfWeekValue = vbUseSystemDayOfWeek Then + Day = GetCultureInfo().DateTimeFormat.FirstDayOfWeek + Else + Day = CType(FirstDayOfWeekValue - 1, DayOfWeek) + End If + + Select Case FirstWeekOfYearValue + Case vbUseSystem + WeekRule = GetCultureInfo().DateTimeFormat.CalendarWeekRule + Case vbFirstJan1 + WeekRule = CalendarWeekRule.FirstDay + Case vbFirstFourDays + WeekRule = CalendarWeekRule.FirstFourDayWeek + Case vbFirstFullWeek + WeekRule = CalendarWeekRule.FirstFullWeek + End Select + + Return CurrentCalendar.GetWeekOfYear(DateValue, WeekRule, Day) + Case DateInterval.Quarter + Return ((DateValue.Month - 1) \ 3) + 1 + Case DateInterval.DayOfYear + Return CurrentCalendar.GetDayOfYear(DateValue) + End Select + + Throw New ArgumentException(GetResourceString(SR.Argument_InvalidValue1, "Interval")) + End Function + + Public Function DateAdd(ByVal Interval As String, + ByVal Number As Double, + ByVal DateValue As Object) As DateTime + + Dim dt1 As Date + + Try + dt1 = CDate(DateValue) + Catch ex As StackOverflowException + Throw ex + Catch ex As OutOfMemoryException + Throw ex + Catch ex As System.Threading.ThreadAbortException + Throw ex + Catch + Throw New InvalidCastException(GetResourceString(SR.Argument_InvalidDateValue1, "DateValue")) + End Try + + Return DateAdd(DateIntervalFromString(Interval), Number, dt1) + End Function + + Public Function DateDiff(ByVal Interval As String, + ByVal Date1 As Object, + ByVal Date2 As Object, + Optional ByVal DayOfWeek As FirstDayOfWeek = FirstDayOfWeek.Sunday, + Optional ByVal WeekOfYear As FirstWeekOfYear = FirstWeekOfYear.Jan1) As Long + + Dim dt1, dt2 As Date + + Try + dt1 = CDate(Date1) + Catch ex As StackOverflowException + Throw ex + Catch ex As OutOfMemoryException + Throw ex + Catch ex As System.Threading.ThreadAbortException + Throw ex + Catch + Throw New InvalidCastException(GetResourceString(SR.Argument_InvalidDateValue1, "Date1")) + End Try + Try + dt2 = CDate(Date2) + Catch ex As StackOverflowException + Throw ex + Catch ex As OutOfMemoryException + Throw ex + Catch ex As System.Threading.ThreadAbortException + Throw ex + Catch + Throw New InvalidCastException(GetResourceString(SR.Argument_InvalidDateValue1, "Date2")) + End Try + + Return DateDiff(DateIntervalFromString(Interval), dt1, dt2, DayOfWeek, WeekOfYear) + End Function + + Public Function DatePart(ByVal Interval As String, ByVal DateValue As Object, + Optional ByVal DayOfWeek As FirstDayOfWeek = FirstDayOfWeek.Sunday, + Optional ByVal WeekOfYear As FirstWeekOfYear = FirstWeekOfYear.Jan1) As Integer + + Dim dt1 As Date + + Try + dt1 = CDate(DateValue) + Catch ex As StackOverflowException + Throw ex + Catch ex As OutOfMemoryException + Throw ex + Catch ex As System.Threading.ThreadAbortException + Throw ex + Catch + Throw New InvalidCastException(GetResourceString(SR.Argument_InvalidDateValue1, "DateValue")) + End Try + + Return DatePart(DateIntervalFromString(Interval), dt1, DayOfWeek, WeekOfYear) + End Function + + Private Function DateIntervalFromString(ByVal Interval As String) As DateInterval + If Interval IsNot Nothing Then + Interval = Interval.ToUpperInvariant() + End If + + Select Case Interval + Case "YYYY" + Return DateInterval.Year + Case "Y" + Return DateInterval.DayOfYear + Case "M" + Return DateInterval.Month + Case "D" + Return DateInterval.Day + Case "H" + Return DateInterval.Hour + Case "N" + Return DateInterval.Minute + Case "S" + Return DateInterval.Second + Case "WW" + Return DateInterval.WeekOfYear + Case "W" + Return DateInterval.Weekday + Case "Q" + Return DateInterval.Quarter + Case Else + Throw New ArgumentException(GetResourceString(SR.Argument_InvalidValue1, "Interval")) + End Select + End Function + + '============================================================================ + ' Date value functions. + '============================================================================ + Public Function DateSerial(ByVal [Year] As Integer, ByVal [Month] As Integer, ByVal [Day] As Integer) As DateTime + 'We have to handle negative months and days + ' so we start with the year and add months and days + Dim cal As Calendar = CurrentCalendar + Dim Result As DateTime + + If Year < 0 Then + Year = cal.GetYear(System.DateTime.Today) + Year + ElseIf Year < 100 Then + Year = cal.ToFourDigitYear(Year) + End If + + '*** BEGIN PERFOPT *** + '*** Gregorian Calendar perf optimization + '*** The AddMonths/AddDays require excessive conversion to/from ticks + '*** so we special case + If TypeOf cal Is GregorianCalendar Then + If (Month >= 1 AndAlso Month <= 12) AndAlso (Day >= 1 AndAlso Day <= 28) Then + 'Uses 28 so we don't have to use the calendar to obtain + ' the number of days in the month, which is the cause of the + ' extra overhead we are trying to avoid + Return New DateTime(Year, Month, Day) + End If + End If + '*** END PERFOPT *** + + Try + Result = cal.ToDateTime(Year, 1, 1, 0, 0, 0, 0) + Catch ex As StackOverflowException + Throw ex + Catch ex As OutOfMemoryException + Throw ex + Catch ex As System.Threading.ThreadAbortException + Throw ex + Catch + Throw VbMakeException(New ArgumentException(GetResourceString(SR.Argument_InvalidValue1, "Year")), vbErrors.IllegalFuncCall) + End Try + + Try + Result = cal.AddMonths(Result, Month - 1) + Catch ex As StackOverflowException + Throw ex + Catch ex As OutOfMemoryException + Throw ex + Catch ex As System.Threading.ThreadAbortException + Throw ex + Catch + Throw VbMakeException(New ArgumentException(GetResourceString(SR.Argument_InvalidValue1, "Month")), vbErrors.IllegalFuncCall) + End Try + + Try + Result = cal.AddDays(Result, Day - 1) + Catch ex As StackOverflowException + Throw ex + Catch ex As OutOfMemoryException + Throw ex + Catch ex As System.Threading.ThreadAbortException + Throw ex + Catch + Throw VbMakeException(New ArgumentException(GetResourceString(SR.Argument_InvalidValue1, "Day")), vbErrors.IllegalFuncCall) + End Try + + Return Result + End Function + + Public Function TimeSerial(ByVal Hour As Integer, ByVal Minute As Integer, ByVal Second As Integer) As DateTime + Const SecondsInDay As Integer = (24 * 60 * 60) + + Dim TotalSeconds As Integer = (Hour * 60 * 60) + (Minute * 60) + Second + + If TotalSeconds < 0 Then + 'Wrap clock + TotalSeconds += SecondsInDay + End If + + Return (New DateTime(TotalSeconds * TimeSpan.TicksPerSecond)) + End Function + + Public Function DateValue(ByVal [StringDate] As String) As DateTime + + Return CDate([StringDate]).Date + + End Function + + Public Function TimeValue(ByVal [StringTime] As String) As DateTime + + Return New DateTime(CDate([StringTime]).Ticks Mod TimeSpan.TicksPerDay) + + End Function + + '============================================================================ + ' Date/time part functions. + '============================================================================ + Public Function Year(ByVal DateValue As DateTime) As Integer + Return CurrentCalendar.GetYear(DateValue) + End Function + + Public Function Month(ByVal DateValue As DateTime) As Integer + Return CurrentCalendar.GetMonth(DateValue) + End Function + + Public Function Day(ByVal DateValue As DateTime) As Integer + Return CurrentCalendar.GetDayOfMonth(DateValue) + End Function + + Public Function Hour(ByVal [TimeValue] As DateTime) As Integer + Return CurrentCalendar.GetHour([TimeValue]) + End Function + + Public Function Minute(ByVal [TimeValue] As DateTime) As Integer + Return CurrentCalendar.GetMinute([TimeValue]) + End Function + + Public Function Second(ByVal [TimeValue] As DateTime) As Integer + Return CurrentCalendar.GetSecond([TimeValue]) + End Function + + Public Function Weekday(ByVal DateValue As DateTime, Optional ByVal DayOfWeek As FirstDayOfWeek = FirstDayOfWeek.Sunday) As Integer + If DayOfWeek = FirstDayOfWeek.System Then + ' + DayOfWeek = CType(DateTimeFormatInfo.CurrentInfo.FirstDayOfWeek + 1, FirstDayOfWeek) + + ElseIf (DayOfWeek < FirstDayOfWeek.Sunday) OrElse (DayOfWeek > FirstDayOfWeek.Saturday) Then + Throw New ArgumentException(GetResourceString(SR.Argument_InvalidValue1, "DayOfWeek")) + End If + + 'Get the day from the date + Dim iDayOfWeek As Integer + + iDayOfWeek = CurrentCalendar.GetDayOfWeek(DateValue) + 1 ' System.DateTime uses Sunday = 0 thru Satuday = 6 + Return ((iDayOfWeek - DayOfWeek + 7) Mod 7) + 1 + End Function + + '============================================================================ + ' Date name functions. + '============================================================================ + + Public Function MonthName(ByVal Month As Integer, Optional ByVal Abbreviate As Boolean = False) As String + Dim Result As String + + If Month < 1 OrElse Month > 13 Then + Throw New ArgumentException(GetResourceString(SR.Argument_InvalidValue1, "Month")) + End If + + If Abbreviate Then + Result = GetDateTimeFormatInfo().GetAbbreviatedMonthName(Month) + Else + Result = GetDateTimeFormatInfo().GetMonthName(Month) + End If + + If Result.Length = 0 Then + Throw New ArgumentException(GetResourceString(SR.Argument_InvalidValue1, "Month")) + End If + + Return Result + End Function + + Public Function WeekdayName(ByVal Weekday As Integer, Optional ByVal Abbreviate As Boolean = False, Optional ByVal FirstDayOfWeekValue As FirstDayOfWeek = FirstDayOfWeek.System) As String + Dim dtfi As DateTimeFormatInfo + Dim Result As String + + If (Weekday < 1) OrElse (Weekday > 7) Then + Throw New ArgumentException(GetResourceString(SR.Argument_InvalidValue1, "Weekday")) + End If + + If (FirstDayOfWeekValue < 0) OrElse (FirstDayOfWeekValue > 7) Then + Throw New ArgumentException(GetResourceString(SR.Argument_InvalidValue1, "FirstDayOfWeekValue")) + End If + + dtfi = CType(GetCultureInfo().GetFormat(GetType(System.Globalization.DateTimeFormatInfo)), DateTimeFormatInfo) 'Returns a read-only object + + If FirstDayOfWeekValue = 0 Then + FirstDayOfWeekValue = CType(CInt(dtfi.FirstDayOfWeek) + 1, FirstDayOfWeek) + End If + + Try + If Abbreviate Then + Result = dtfi.GetAbbreviatedDayName(CType((Weekday + FirstDayOfWeekValue - 2) Mod 7, System.DayOfWeek)) + Else + Result = dtfi.GetDayName(CType((Weekday + FirstDayOfWeekValue - 2) Mod 7, System.DayOfWeek)) + End If + Catch ex As StackOverflowException + Throw ex + Catch ex As OutOfMemoryException + Throw ex + Catch ex As System.Threading.ThreadAbortException + Throw ex + Catch + Throw New ArgumentException(GetResourceString(SR.Argument_InvalidValue1, "Weekday")) + End Try + + If Result.Length = 0 Then + Throw New ArgumentException(GetResourceString(SR.Argument_InvalidValue1, "Weekday")) + End If + + Return Result + End Function + End Module End Namespace diff --git a/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/Globals.vb b/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/Globals.vb index a00c48e67126..47b1a1ec80fd 100644 --- a/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/Globals.vb +++ b/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/Globals.vb @@ -6,6 +6,45 @@ Imports System Namespace Global.Microsoft.VisualBasic + Public Enum VariantType + Empty = 0 + Null = 1 + [Short] = 2 + [Integer] = 3 + [Single] = 4 + [Double] = 5 + Currency = 6 + [Date] = 7 + [String] = 8 + [Object] = 9 + [Error] = 10 + [Boolean] = 11 + [Variant] = 12 + [DataObject] = 13 + [Decimal] = 14 + [Byte] = 17 + [Char] = 18 + [Long] = 20 + UserDefinedType = 36 + Array = 8192 + End Enum + + Public Enum AppWinStyle As Short + Hide = 0 + NormalFocus = 1 + MinimizedFocus = 2 + MaximizedFocus = 3 + NormalNoFocus = 4 + MinimizedNoFocus = 6 + End Enum + + Public Enum CallType + Method = 1 + [Get] = 2 + [Let] = 4 + [Set] = 8 + End Enum + Public Enum CompareMethod [Binary] = 0 [Text] = 1 @@ -19,6 +58,17 @@ Namespace Global.Microsoft.VisualBasic ShortTime = 4 End Enum + Public Enum FirstDayOfWeek + System = 0 + Sunday = 1 + Monday = 2 + Tuesday = 3 + Wednesday = 4 + Thursday = 5 + Friday = 6 + Saturday = 7 + End Enum + Public Enum FileAttribute [Normal] = 0 [ReadOnly] = 1 @@ -29,6 +79,13 @@ Namespace Global.Microsoft.VisualBasic [Archive] = 32 End Enum + Public Enum FirstWeekOfYear + System = 0 + Jan1 = 1 + FirstFourDays = 2 + FirstFullWeek = 3 + End Enum + Public Enum VbStrConv [None] = 0 [Uppercase] = 1 @@ -51,6 +108,24 @@ Namespace Global.Microsoft.VisualBasic [UseDefault] = -2 End Enum + Public Enum DateInterval + [Year] = 0 + [Quarter] = 1 + [Month] = 2 + [DayOfYear] = 3 + [Day] = 4 + [WeekOfYear] = 5 + [Weekday] = 6 + [Hour] = 7 + [Minute] = 8 + [Second] = 9 + End Enum + + Public Enum DueDate + EndOfPeriod = 0 + BegOfPeriod = 1 + End Enum + Public Enum OpenMode [Input] = 1 [Output] = 2 @@ -93,4 +168,47 @@ Namespace Global.Microsoft.VisualBasic Public Count As Short End Structure + Public Enum MsgBoxResult + Ok = 1 + Cancel = 2 + Abort = 3 + Retry = 4 + Ignore = 5 + Yes = 6 + No = 7 + End Enum + + + Public Enum MsgBoxStyle + 'You may BitOr one value from each group + 'Button group: Lower 4 bits, &H00F + OkOnly = &H0I + OkCancel = &H1I + AbortRetryIgnore = &H2I + YesNoCancel = &H3I + YesNo = &H4I + RetryCancel = &H5I + + 'Icon Group: Middle 4 bits &H0F0 + Critical = &H10I 'Same as Windows.Forms.MessageBox.IconError + Question = &H20I 'Same As Windows.MessageBox.IconQuestion + Exclamation = &H30I 'Same As Windows.MessageBox.IconExclamation + Information = &H40I 'Same As Windows.MessageBox.IconInformation + + 'Default Group: High 4 bits &HF00 + DefaultButton1 = 0 + DefaultButton2 = &H100I + DefaultButton3 = &H200I + 'UNSUPPORTED IN VB7 + 'DefaultButton4 = &H300I + + ApplicationModal = &H0I + SystemModal = &H1000I + + MsgBoxHelp = &H4000I + MsgBoxRight = &H80000I + MsgBoxRtlReading = &H100000I + MsgBoxSetForeground = &H10000I + End Enum + End Namespace diff --git a/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/Helpers/SafeNativeMethods.vb b/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/Helpers/SafeNativeMethods.vb new file mode 100644 index 000000000000..b83487aa620d --- /dev/null +++ b/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/Helpers/SafeNativeMethods.vb @@ -0,0 +1,31 @@ +' Licensed to the .NET Foundation under one or more agreements. +' The .NET Foundation licenses this file to you under the MIT license. +' See the LICENSE file in the project root for more information. + +Imports System.Runtime.InteropServices +Imports System.Runtime.Versioning + +Namespace Microsoft.VisualBasic.CompilerServices + + + + Friend NotInheritable Class _ + SafeNativeMethods + + + Friend Declare Sub _ + GetLocalTime _ + Lib "kernel32" (ByVal systime As NativeTypes.SystemTime) + + '''************************************************************************* + ''' ;New + ''' + ''' FxCop violation: Avoid uninstantiated internal class. + ''' Adding a private constructor to prevent the compiler from generating a default constructor. + ''' + Private Sub New() + End Sub + End Class + +End Namespace + diff --git a/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/Helpers/UnsafeNativeMethods.vb b/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/Helpers/UnsafeNativeMethods.vb index 1cc307ace334..fea304860851 100644 --- a/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/Helpers/UnsafeNativeMethods.vb +++ b/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/Helpers/UnsafeNativeMethods.vb @@ -44,6 +44,10 @@ Namespace Microsoft.VisualBasic.CompilerServices ByVal vt As Int16) End Sub + + Friend Shared Function SetLocalTime(ByVal systime As NativeTypes.SystemTime) As Integer + End Function + Friend Shared Function MoveFile(<[In](), MarshalAs(UnmanagedType.LPTStr)> ByVal lpExistingFileName As String, <[In](), MarshalAs(UnmanagedType.LPTStr)> ByVal lpNewFileName As String) As Integer diff --git a/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/VariantType.vb b/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/VariantType.vb deleted file mode 100644 index 8ae955c241f9..000000000000 --- a/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/VariantType.vb +++ /dev/null @@ -1,28 +0,0 @@ -' Licensed to the .NET Foundation under one or more agreements. -' The .NET Foundation licenses this file to you under the MIT license. -' See the LICENSE file in the project root for more information. - -Namespace Microsoft.VisualBasic - Public Enum VariantType - Empty = 0 - Null = 1 - [Short] = 2 - [Integer] = 3 - [Single] = 4 - [Double] = 5 - Currency = 6 - [Date] = 7 - [String] = 8 - [Object] = 9 - [Error] = 10 - [Boolean] = 11 - [Variant] = 12 - [DataObject] = 13 - [Decimal] = 14 - [Byte] = 17 - [Char] = 18 - [Long] = 20 - UserDefinedType = 36 - Array = 8192 - End Enum -End Namespace diff --git a/src/Microsoft.VisualBasic.Core/tests/DateAndTimeTests.cs b/src/Microsoft.VisualBasic.Core/tests/DateAndTimeTests.cs index 6c75dbc37cfd..e1a522f8fd1f 100644 --- a/src/Microsoft.VisualBasic.Core/tests/DateAndTimeTests.cs +++ b/src/Microsoft.VisualBasic.Core/tests/DateAndTimeTests.cs @@ -3,14 +3,420 @@ // See the LICENSE file in the project root for more information. using System; +using System.Collections.Generic; +using System.Globalization; using Xunit; namespace Microsoft.VisualBasic.Tests { public class DateAndTimeTests { + [Theory] + [MemberData(nameof(DateAdd_DateInterval_TestData))] + public void DateAdd(DateInterval interval, double number, DateTime dateValue, DateTime expected) + { + Assert.Equal(expected, DateAndTime.DateAdd(interval, number, dateValue)); + } + + [Theory] + [MemberData(nameof(DateAdd_DateInterval_ArgumentOutOfRangeException_TestData))] + public void DateAdd_ArgumentOutOfRangeException(DateInterval interval, double number, DateTime dateValue) + { + Assert.Throws(() => DateAndTime.DateAdd(interval, number, dateValue)); + } + + private static IEnumerable DateAdd_DateInterval_TestData() + { + var now = DateTime.UtcNow; + var calendar = System.Threading.Thread.CurrentThread.CurrentCulture.Calendar; + + yield return new object[] { DateInterval.Year, 0.0, DateTime.MinValue, DateTime.MinValue }; + yield return new object[] { DateInterval.Year, 0.0, now, now }; + yield return new object[] { DateInterval.Year, 0.0, DateTime.MaxValue, DateTime.MaxValue }; + yield return new object[] { DateInterval.Year, 2.0, DateTime.MinValue, calendar.AddYears(DateTime.MinValue, 2) }; + yield return new object[] { DateInterval.Year, 2.0, now, calendar.AddYears(now, 2) }; + yield return new object[] { DateInterval.Year, -2.0, now, calendar.AddYears(now, -2) }; + yield return new object[] { DateInterval.Year, -2.0, DateTime.MaxValue, calendar.AddYears(DateTime.MaxValue, -2) }; + + yield return new object[] { DateInterval.Quarter, 0.0, DateTime.MinValue, DateTime.MinValue }; + yield return new object[] { DateInterval.Quarter, 0.0, now, now }; + yield return new object[] { DateInterval.Quarter, 0.0, DateTime.MaxValue, DateTime.MaxValue }; + yield return new object[] { DateInterval.Quarter, 2.0, DateTime.MinValue, calendar.AddMonths(DateTime.MinValue, 6) }; + yield return new object[] { DateInterval.Quarter, 2.0, now, calendar.AddMonths(now, 6) }; + yield return new object[] { DateInterval.Quarter, -2.0, now, calendar.AddMonths(now, -6) }; + yield return new object[] { DateInterval.Quarter, -2.0, DateTime.MaxValue, calendar.AddMonths(DateTime.MaxValue, -6) }; + + yield return new object[] { DateInterval.Month, 0.0, DateTime.MinValue, DateTime.MinValue }; + yield return new object[] { DateInterval.Month, 0.0, now, now }; + yield return new object[] { DateInterval.Month, 0.0, DateTime.MaxValue, DateTime.MaxValue }; + yield return new object[] { DateInterval.Month, 2.0, DateTime.MinValue, calendar.AddMonths(DateTime.MinValue, 2) }; + yield return new object[] { DateInterval.Month, 2.0, now, calendar.AddMonths(now, 2) }; + yield return new object[] { DateInterval.Month, -2.0, now, calendar.AddMonths(now, -2) }; + yield return new object[] { DateInterval.Month, -2.0, DateTime.MaxValue, calendar.AddMonths(DateTime.MaxValue, -2) }; + + yield return new object[] { DateInterval.DayOfYear, 0.0, DateTime.MinValue, DateTime.MinValue }; + yield return new object[] { DateInterval.DayOfYear, 0.0, now, now }; + yield return new object[] { DateInterval.DayOfYear, 0.0, DateTime.MaxValue, DateTime.MaxValue }; + yield return new object[] { DateInterval.DayOfYear, 2.0, DateTime.MinValue, DateTime.MinValue.AddDays(2) }; + yield return new object[] { DateInterval.DayOfYear, 2.0, now, now.AddDays(2) }; + yield return new object[] { DateInterval.DayOfYear, -2.0, now, now.AddDays(-2) }; + yield return new object[] { DateInterval.DayOfYear, -2.0, DateTime.MaxValue, DateTime.MaxValue.AddDays(-2) }; + + yield return new object[] { DateInterval.Day, 0.0, DateTime.MinValue, DateTime.MinValue }; + yield return new object[] { DateInterval.Day, 0.0, now, now }; + yield return new object[] { DateInterval.Day, 0.0, DateTime.MaxValue, DateTime.MaxValue }; + yield return new object[] { DateInterval.Day, 2.0, DateTime.MinValue, DateTime.MinValue.AddDays(2) }; + yield return new object[] { DateInterval.Day, 2.0, now, now.AddDays(2) }; + yield return new object[] { DateInterval.Day, -2.0, now, now.AddDays(-2) }; + yield return new object[] { DateInterval.Day, -2.0, DateTime.MaxValue, DateTime.MaxValue.AddDays(-2) }; + + yield return new object[] { DateInterval.WeekOfYear, 0.0, DateTime.MinValue, DateTime.MinValue }; + yield return new object[] { DateInterval.WeekOfYear, 0.0, now, now }; + yield return new object[] { DateInterval.WeekOfYear, 0.0, DateTime.MaxValue, DateTime.MaxValue }; + yield return new object[] { DateInterval.WeekOfYear, 2.0, DateTime.MinValue, DateTime.MinValue.AddDays(14) }; + yield return new object[] { DateInterval.WeekOfYear, 2.0, now, now.AddDays(14) }; + yield return new object[] { DateInterval.WeekOfYear, -2.0, now, now.AddDays(-14) }; + yield return new object[] { DateInterval.WeekOfYear, -2.0, DateTime.MaxValue, DateTime.MaxValue.AddDays(-14) }; + + yield return new object[] { DateInterval.Weekday, 0.0, DateTime.MinValue, DateTime.MinValue }; + yield return new object[] { DateInterval.Weekday, 0.0, now, now }; + yield return new object[] { DateInterval.Weekday, 0.0, DateTime.MaxValue, DateTime.MaxValue }; + yield return new object[] { DateInterval.Weekday, 2.0, DateTime.MinValue, DateTime.MinValue.AddDays(2) }; + yield return new object[] { DateInterval.Weekday, 2.0, now, now.AddDays(2) }; + yield return new object[] { DateInterval.Weekday, -2.0, now, now.AddDays(-2) }; + yield return new object[] { DateInterval.Weekday, -2.0, DateTime.MaxValue, DateTime.MaxValue.AddDays(-2) }; + + yield return new object[] { DateInterval.Hour, 0.0, DateTime.MinValue, DateTime.MinValue }; + yield return new object[] { DateInterval.Hour, 0.0, now, now }; + yield return new object[] { DateInterval.Hour, 0.0, DateTime.MaxValue, DateTime.MaxValue }; + yield return new object[] { DateInterval.Hour, 2.0, DateTime.MinValue, DateTime.MinValue.AddHours(2) }; + yield return new object[] { DateInterval.Hour, 2.0, now, now.AddHours(2) }; + yield return new object[] { DateInterval.Hour, -2.0, now, now.AddHours(-2) }; + yield return new object[] { DateInterval.Hour, -2.0, DateTime.MaxValue, DateTime.MaxValue.AddHours(-2) }; + + yield return new object[] { DateInterval.Minute, 0.0, DateTime.MinValue, DateTime.MinValue }; + yield return new object[] { DateInterval.Minute, 0.0, now, now }; + yield return new object[] { DateInterval.Minute, 0.0, DateTime.MaxValue, DateTime.MaxValue }; + yield return new object[] { DateInterval.Minute, 2.0, DateTime.MinValue, DateTime.MinValue.AddMinutes(2) }; + yield return new object[] { DateInterval.Minute, 2.0, now, now.AddMinutes(2) }; + yield return new object[] { DateInterval.Minute, -2.0, now, now.AddMinutes(-2) }; + yield return new object[] { DateInterval.Minute, -2.0, DateTime.MaxValue, DateTime.MaxValue.AddMinutes(-2) }; + + yield return new object[] { DateInterval.Second, 0.0, DateTime.MinValue, DateTime.MinValue }; + yield return new object[] { DateInterval.Second, 0.0, now, now }; + yield return new object[] { DateInterval.Second, 0.0, DateTime.MaxValue, DateTime.MaxValue }; + yield return new object[] { DateInterval.Second, 2.0, DateTime.MinValue, DateTime.MinValue.AddSeconds(2) }; + yield return new object[] { DateInterval.Second, 2.0, now, now.AddSeconds(2) }; + yield return new object[] { DateInterval.Second, -2.0, now, now.AddSeconds(-2) }; + yield return new object[] { DateInterval.Second, -2.0, DateTime.MaxValue, DateTime.MaxValue.AddSeconds(-2) }; + } + + private static IEnumerable DateAdd_DateInterval_ArgumentOutOfRangeException_TestData() + { + yield return new object[] { DateInterval.Year, 2.0, DateTime.MaxValue }; + yield return new object[] { DateInterval.Year, -2.0, DateTime.MinValue }; + + yield return new object[] { DateInterval.Day, 2.0, DateTime.MaxValue }; + yield return new object[] { DateInterval.Day, -2.0, DateTime.MinValue }; + + yield return new object[] { DateInterval.Second, 2.0, DateTime.MaxValue }; + yield return new object[] { DateInterval.Second, -2.0, DateTime.MinValue }; + } + + [Theory] + [MemberData(nameof(DateAdd_StringInterval_TestData))] + public void DateAdd(string interval, double number, object dateValue, DateTime expected) + { + Assert.Equal(expected, DateAndTime.DateAdd(interval, number, dateValue)); + } + + [Theory] + [MemberData(nameof(DateAdd_StringInterval_ArgumentOutOfRangeException_TestData))] + public void DateAdd_ArgumentOutOfRangeException(string interval, double number, object dateValue) + { + Assert.Throws(() => DateAndTime.DateAdd(interval, number, dateValue)); + } + + private static IEnumerable DateAdd_StringInterval_TestData() + { + var now = DateTime.UtcNow; + var calendar = System.Threading.Thread.CurrentThread.CurrentCulture.Calendar; + + yield return new object[] { "YYYY", 0.0, DateTime.MinValue, DateTime.MinValue }; + yield return new object[] { "YYYY", 0.0, now, now }; + yield return new object[] { "YYYY", 0.0, DateTime.MaxValue, DateTime.MaxValue }; + yield return new object[] { "YYYY", 2.0, DateTime.MinValue, calendar.AddYears(DateTime.MinValue, 2) }; + yield return new object[] { "YYYY", 2.0, now, calendar.AddYears(now, 2) }; + yield return new object[] { "YYYY", -2.0, now, calendar.AddYears(now, -2) }; + yield return new object[] { "YYYY", -2.0, DateTime.MaxValue, calendar.AddYears(DateTime.MaxValue, -2) }; + + yield return new object[] { "Q", 0.0, DateTime.MinValue, DateTime.MinValue }; + yield return new object[] { "Q", 0.0, now, now }; + yield return new object[] { "Q", 0.0, DateTime.MaxValue, DateTime.MaxValue }; + yield return new object[] { "Q", 2.0, DateTime.MinValue, calendar.AddMonths(DateTime.MinValue, 6) }; + yield return new object[] { "Q", 2.0, now, calendar.AddMonths(now, 6) }; + yield return new object[] { "Q", -2.0, now, calendar.AddMonths(now, -6) }; + yield return new object[] { "Q", -2.0, DateTime.MaxValue, calendar.AddMonths(DateTime.MaxValue, -6) }; + + yield return new object[] { "M", 0.0, DateTime.MinValue, DateTime.MinValue }; + yield return new object[] { "M", 0.0, now, now }; + yield return new object[] { "M", 0.0, DateTime.MaxValue, DateTime.MaxValue }; + yield return new object[] { "M", 2.0, DateTime.MinValue, calendar.AddMonths(DateTime.MinValue, 2) }; + yield return new object[] { "M", 2.0, now, calendar.AddMonths(now, 2) }; + yield return new object[] { "M", -2.0, now, calendar.AddMonths(now, -2) }; + yield return new object[] { "M", -2.0, DateTime.MaxValue, calendar.AddMonths(DateTime.MaxValue, -2) }; + + yield return new object[] { "Y", 0.0, DateTime.MinValue, DateTime.MinValue }; + yield return new object[] { "Y", 0.0, now, now }; + yield return new object[] { "Y", 0.0, DateTime.MaxValue, DateTime.MaxValue }; + yield return new object[] { "Y", 2.0, DateTime.MinValue, DateTime.MinValue.AddDays(2) }; + yield return new object[] { "Y", 2.0, now, now.AddDays(2) }; + yield return new object[] { "Y", -2.0, now, now.AddDays(-2) }; + yield return new object[] { "Y", -2.0, DateTime.MaxValue, DateTime.MaxValue.AddDays(-2) }; + + yield return new object[] { "D", 0.0, DateTime.MinValue, DateTime.MinValue }; + yield return new object[] { "D", 0.0, now, now }; + yield return new object[] { "D", 0.0, DateTime.MaxValue, DateTime.MaxValue }; + yield return new object[] { "D", 2.0, DateTime.MinValue, DateTime.MinValue.AddDays(2) }; + yield return new object[] { "D", 2.0, now, now.AddDays(2) }; + yield return new object[] { "D", -2.0, now, now.AddDays(-2) }; + yield return new object[] { "D", -2.0, DateTime.MaxValue, DateTime.MaxValue.AddDays(-2) }; + + yield return new object[] { "WW", 0.0, DateTime.MinValue, DateTime.MinValue }; + yield return new object[] { "WW", 0.0, now, now }; + yield return new object[] { "WW", 0.0, DateTime.MaxValue, DateTime.MaxValue }; + yield return new object[] { "WW", 2.0, DateTime.MinValue, DateTime.MinValue.AddDays(14) }; + yield return new object[] { "WW", 2.0, now, now.AddDays(14) }; + yield return new object[] { "WW", -2.0, now, now.AddDays(-14) }; + yield return new object[] { "WW", -2.0, DateTime.MaxValue, DateTime.MaxValue.AddDays(-14) }; + + yield return new object[] { "W", 0.0, DateTime.MinValue, DateTime.MinValue }; + yield return new object[] { "W", 0.0, now, now }; + yield return new object[] { "W", 0.0, DateTime.MaxValue, DateTime.MaxValue }; + yield return new object[] { "W", 2.0, DateTime.MinValue, DateTime.MinValue.AddDays(2) }; + yield return new object[] { "W", 2.0, now, now.AddDays(2) }; + yield return new object[] { "W", -2.0, now, now.AddDays(-2) }; + yield return new object[] { "W", -2.0, DateTime.MaxValue, DateTime.MaxValue.AddDays(-2) }; + + yield return new object[] { "H", 0.0, DateTime.MinValue, DateTime.MinValue }; + yield return new object[] { "H", 0.0, now, now }; + yield return new object[] { "H", 0.0, DateTime.MaxValue, DateTime.MaxValue }; + yield return new object[] { "H", 2.0, DateTime.MinValue, DateTime.MinValue.AddHours(2) }; + yield return new object[] { "H", 2.0, now, now.AddHours(2) }; + yield return new object[] { "H", -2.0, now, now.AddHours(-2) }; + yield return new object[] { "H", -2.0, DateTime.MaxValue, DateTime.MaxValue.AddHours(-2) }; + + yield return new object[] { "N", 0.0, DateTime.MinValue, DateTime.MinValue }; + yield return new object[] { "N", 0.0, now, now }; + yield return new object[] { "N", 0.0, DateTime.MaxValue, DateTime.MaxValue }; + yield return new object[] { "N", 2.0, DateTime.MinValue, DateTime.MinValue.AddMinutes(2) }; + yield return new object[] { "N", 2.0, now, now.AddMinutes(2) }; + yield return new object[] { "N", -2.0, now, now.AddMinutes(-2) }; + yield return new object[] { "N", -2.0, DateTime.MaxValue, DateTime.MaxValue.AddMinutes(-2) }; + + yield return new object[] { "S", 0.0, DateTime.MinValue, DateTime.MinValue }; + yield return new object[] { "S", 0.0, now, now }; + yield return new object[] { "S", 0.0, DateTime.MaxValue, DateTime.MaxValue }; + yield return new object[] { "S", 2.0, DateTime.MinValue, DateTime.MinValue.AddSeconds(2) }; + yield return new object[] { "S", 2.0, now, now.AddSeconds(2) }; + yield return new object[] { "S", -2.0, now, now.AddSeconds(-2) }; + yield return new object[] { "S", -2.0, DateTime.MaxValue, DateTime.MaxValue.AddSeconds(-2) }; + } + + private static IEnumerable DateAdd_StringInterval_ArgumentOutOfRangeException_TestData() + { + yield return new object[] { "YYYY", 2.0, DateTime.MaxValue }; + yield return new object[] { "YYYY", -2.0, DateTime.MinValue }; + + yield return new object[] { "D", 2.0, DateTime.MaxValue }; + yield return new object[] { "D", -2.0, DateTime.MinValue }; + + yield return new object[] { "S", 2.0, DateTime.MaxValue }; + yield return new object[] { "S", -2.0, DateTime.MinValue }; + } + + [Theory] + [MemberData(nameof(DateDiff_DateInterval_TestData))] + public void DateDiff(DateInterval interval, DateTime dateTime1, DateTime dateTime2, long expected) + { + Assert.Equal(expected, DateAndTime.DateDiff(interval, dateTime1, dateTime2)); + } + + private static IEnumerable DateDiff_DateInterval_TestData() + { + var now = DateTime.UtcNow; + + yield return new object[] { DateInterval.Year, DateTime.MinValue, DateTime.MinValue, 0 }; + yield return new object[] { DateInterval.Year, now, now, 0 }; + yield return new object[] { DateInterval.Year, DateTime.MaxValue, DateTime.MaxValue, 0 }; + + yield return new object[] { DateInterval.Quarter, now, now, 0 }; + + yield return new object[] { DateInterval.Month, now, now, 0 }; + + yield return new object[] { DateInterval.DayOfYear, now, now, 0 }; + yield return new object[] { DateInterval.DayOfYear, now, now.AddDays(2), 2 }; + yield return new object[] { DateInterval.DayOfYear, now, now.AddDays(-2), -2 }; + + yield return new object[] { DateInterval.Day, now, now, 0 }; + yield return new object[] { DateInterval.Day, now, now.AddDays(2), 2 }; + yield return new object[] { DateInterval.Day, now, now.AddDays(-2), -2 }; + + yield return new object[] { DateInterval.Hour, now, now, 0 }; + yield return new object[] { DateInterval.Hour, now, now.AddHours(2), 2 }; + yield return new object[] { DateInterval.Hour, now, now.AddHours(-2), -2 }; + + yield return new object[] { DateInterval.Minute, now, now, 0 }; + yield return new object[] { DateInterval.Minute, now, now.AddMinutes(2), 2 }; + yield return new object[] { DateInterval.Minute, now, now.AddMinutes(-2), -2 }; + + yield return new object[] { DateInterval.Second, now, now, 0 }; + yield return new object[] { DateInterval.Second, now, now.AddSeconds(2), 2 }; + yield return new object[] { DateInterval.Second, now, now.AddSeconds(-2), -2 }; + } + + [Theory] + [MemberData(nameof(DateDiff_StringInterval_TestData))] + public void DateDiff(string interval, object dateTime1, object dateTime2, long expected) + { + Assert.Equal(expected, DateAndTime.DateDiff(interval, dateTime1, dateTime2)); + } + + private static IEnumerable DateDiff_StringInterval_TestData() + { + var now = DateTime.UtcNow; + + yield return new object[] { "YYYY", DateTime.MinValue, DateTime.MinValue, 0 }; + yield return new object[] { "YYYY", now, now, 0 }; + yield return new object[] { "YYYY", DateTime.MaxValue, DateTime.MaxValue, 0 }; + + yield return new object[] { "Q", now, now, 0 }; + + yield return new object[] { "M", now, now, 0 }; + + yield return new object[] { "Y", now, now, 0 }; + yield return new object[] { "Y", now, now.AddDays(2), 2 }; + yield return new object[] { "Y", now, now.AddDays(-2), -2 }; + + yield return new object[] { "D", now, now, 0 }; + yield return new object[] { "D", now, now.AddDays(2), 2 }; + yield return new object[] { "D", now, now.AddDays(-2), -2 }; + + yield return new object[] { "H", now, now, 0 }; + yield return new object[] { "H", now, now.AddHours(2), 2 }; + yield return new object[] { "H", now, now.AddHours(-2), -2 }; + + yield return new object[] { "N", now, now, 0 }; + yield return new object[] { "N", now, now.AddMinutes(2), 2 }; + yield return new object[] { "N", now, now.AddMinutes(-2), -2 }; + + yield return new object[] { "S", now, now, 0 }; + yield return new object[] { "S", now, now.AddSeconds(2), 2 }; + yield return new object[] { "S", now, now.AddSeconds(-2), -2 }; + } + + [Theory] + [MemberData(nameof(DatePart_DateInterval_TestData))] + public void DatePart(DateInterval interval, DateTime dateValue, int expected) + { + Assert.Equal(expected, DateAndTime.DatePart(interval, dateValue)); + } + + private static IEnumerable DatePart_DateInterval_TestData() + { + var now = DateTime.UtcNow; + var calendar = System.Threading.Thread.CurrentThread.CurrentCulture.Calendar; + + yield return new object[] { DateInterval.Year, now, calendar.GetYear(now) }; + yield return new object[] { DateInterval.Month, now, calendar.GetMonth(now) }; + yield return new object[] { DateInterval.Day, now, calendar.GetDayOfMonth(now) }; + yield return new object[] { DateInterval.Hour, now, calendar.GetHour(now) }; + yield return new object[] { DateInterval.Minute, now, calendar.GetMinute(now) }; + yield return new object[] { DateInterval.Second, now, calendar.GetSecond(now) }; + } + + [Theory] + [MemberData(nameof(DatePart_StringInterval_TestData))] + public void DatePart(string interval, object dateValue, int expected) + { + Assert.Equal(expected, DateAndTime.DatePart(interval, dateValue)); + } + + private static IEnumerable DatePart_StringInterval_TestData() + { + var now = DateTime.UtcNow; + var calendar = System.Threading.Thread.CurrentThread.CurrentCulture.Calendar; + + yield return new object[] { "YYYY", now, calendar.GetYear(now) }; + yield return new object[] { "M", now, calendar.GetMonth(now) }; + yield return new object[] { "D", now, calendar.GetDayOfMonth(now) }; + yield return new object[] { "H", now, calendar.GetHour(now) }; + yield return new object[] { "N", now, calendar.GetMinute(now) }; + yield return new object[] { "S", now, calendar.GetSecond(now) }; + } + + // Not tested: + // public static DateTime DateSerial(int Year, int Month, int Day) { throw null; } + + [Fact] + public void DateString() + { + string str = DateAndTime.DateString; + // Should return a date with three non-empty parts. + string[] parts = str.Split('-'); + Assert.Equal(3, parts.Length); + foreach (var part in parts) + { + Assert.False(string.IsNullOrEmpty(part)); + } + } + + // Not tested: + // public static string DateString { set { } } + // public static DateTime DateValue(string StringDate) { throw null; } + [Fact] - public void Now_ReturnsDateTimeNow() + public void Fields() + { + var now = DateTime.UtcNow; + var calendar = System.Threading.Thread.CurrentThread.CurrentCulture.Calendar; + + Assert.Equal(calendar.GetYear(now), DateAndTime.Year(now)); + Assert.Equal(calendar.GetMonth(now), DateAndTime.Month(now)); + Assert.Equal(calendar.GetDayOfMonth(now), DateAndTime.Day(now)); + Assert.Equal(calendar.GetHour(now), DateAndTime.Hour(now)); + Assert.Equal(calendar.GetMinute(now), DateAndTime.Minute(now)); + Assert.Equal(calendar.GetSecond(now), DateAndTime.Second(now)); + } + + [Fact] + public void MonthName() + { + var culture = System.Threading.Thread.CurrentThread.CurrentCulture; + try + { + System.Threading.Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture; + + Assert.Throws(() => DateAndTime.MonthName(0, Abbreviate: false)); + Assert.Throws(() => DateAndTime.MonthName(0, Abbreviate: true)); + + Assert.Equal("January", DateAndTime.MonthName(1, Abbreviate: false)); + Assert.Equal("Jan", DateAndTime.MonthName(1, Abbreviate: true)); + + Assert.Equal("December", DateAndTime.MonthName(12, Abbreviate: false)); + Assert.Equal("Dec", DateAndTime.MonthName(12, Abbreviate: true)); + + Assert.Throws(() => DateAndTime.MonthName(int.MaxValue, Abbreviate: false)); + Assert.Throws(() => DateAndTime.MonthName(int.MaxValue, Abbreviate: true)); + } + finally + { + System.Threading.Thread.CurrentThread.CurrentCulture = culture; + } + } + + [Fact] + public void Now() { var dateTimeNowBefore = DateTime.Now; var now = DateAndTime.Now; @@ -19,8 +425,15 @@ public void Now_ReturnsDateTimeNow() Assert.InRange(now, dateTimeNowBefore, dateTimeNowAfter); } + // Not tested: + // public static DateTime TimeOfDay { get { throw null; } set { } } + // public static double Timer { get { throw null; } } + // public static DateTime TimeSerial(int Hour, int Minute, int Second) { throw null; } + // public static string TimeString { get { throw null; } set { } } + // public static DateTime TimeValue(string StringTime) { throw null; } + [Fact] - public void Today_ReturnsDateTimeToday() + public void Today() { var dateTimeTodayBefore = DateTime.Today; var today = DateAndTime.Today; @@ -29,5 +442,35 @@ public void Today_ReturnsDateTimeToday() Assert.InRange(today, dateTimeTodayBefore, dateTimeTodayAfter); Assert.Equal(TimeSpan.Zero, today.TimeOfDay); } + + // Not tested: + // public static DateTime Today { set { } } + // public static int Weekday(System.DateTime DateValue, FirstDayOfWeek DayOfWeek = FirstDayOfWeek.Sunday) { throw null; } + + [Fact] + public void WeekdayName() + { + var culture = System.Threading.Thread.CurrentThread.CurrentCulture; + try + { + System.Threading.Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture; + + Assert.Throws(() => DateAndTime.WeekdayName(0, Abbreviate: false)); + Assert.Throws(() => DateAndTime.WeekdayName(0, Abbreviate: true)); + + Assert.Equal("Sunday", DateAndTime.WeekdayName(1, Abbreviate: false)); + Assert.Equal("Sun", DateAndTime.WeekdayName(1, Abbreviate: true)); + + Assert.Equal("Saturday", DateAndTime.WeekdayName(7, Abbreviate: false)); + Assert.Equal("Sat", DateAndTime.WeekdayName(7, Abbreviate: true)); + + Assert.Throws(() => DateAndTime.WeekdayName(int.MaxValue, Abbreviate: false)); + Assert.Throws(() => DateAndTime.WeekdayName(int.MaxValue, Abbreviate: true)); + } + finally + { + System.Threading.Thread.CurrentThread.CurrentCulture = culture; + } + } } } From d86da53b536b5f327aeaa9292469ea1a151af594 Mon Sep 17 00:00:00 2001 From: Tarek Mahmoud Sayed Date: Fri, 3 May 2019 07:23:42 -0700 Subject: [PATCH 194/607] Fix Macedonian display name in ComponentModel CultureInfo converter (#37390) * Fix Macedonian display name in ComponentModel CultureInfo converter * Fix the comment --- .../src/System/ComponentModel/CultureInfoConverter.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/System.ComponentModel.TypeConverter/src/System/ComponentModel/CultureInfoConverter.cs b/src/System.ComponentModel.TypeConverter/src/System/ComponentModel/CultureInfoConverter.cs index 6cbe647be22f..2e1703f6fd98 100644 --- a/src/System.ComponentModel.TypeConverter/src/System/ComponentModel/CultureInfoConverter.cs +++ b/src/System.ComponentModel.TypeConverter/src/System/ComponentModel/CultureInfoConverter.cs @@ -58,9 +58,9 @@ public override bool CanConvertTo(ITypeDescriptorContext context, Type destinati /// public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value) { - // Hack, Only when GetCultureName returns culture.Name, we use CultureInfoMapper + // Only when GetCultureName returns culture.Name, we use CultureInfoMapper // (Since CultureInfoMapper will transfer Culture.DisplayName to Culture.Name). - // Otherwise, we just keep the value unchange. + // Otherwise, we just keep the value unchanged. if (value is string text) { if (GetCultureName(CultureInfo.InvariantCulture).Equals("")) @@ -434,7 +434,7 @@ private static Dictionary CreateMap() {"Lower Sorbian (Germany)", "dsb-DE"}, {"Luxembourgish (Luxembourg)", "lb-LU"}, {"Macedonian", "mk"}, - {"Macedonian (Former Yugoslav Republic of Macedonia)", "mk-MK"}, + {"Macedonian (North Macedonia)", "mk-MK"}, {"Malay", "ms"}, {"Malay (Brunei Darussalam)", "ms-BN"}, {"Malay (Malaysia)", "ms-MY"}, From 6f6d22a285b1d522fa7f7f4e9c52f07496f4636f Mon Sep 17 00:00:00 2001 From: Sung Yoon Whang Date: Thu, 2 May 2019 12:34:39 -0700 Subject: [PATCH 195/607] Add Series/CounterType to CounterPayload and IncrementingCounterPayload (#24349) Signed-off-by: dotnet-bot --- .../CoreLib/System/Diagnostics/Tracing/CounterGroup.cs | 2 +- .../CoreLib/System/Diagnostics/Tracing/CounterPayload.cs | 8 ++++++++ .../System/Diagnostics/Tracing/DiagnosticCounter.cs | 2 +- .../CoreLib/System/Diagnostics/Tracing/EventCounter.cs | 5 +++-- .../Diagnostics/Tracing/IncrementingEventCounter.cs | 4 +++- .../Diagnostics/Tracing/IncrementingPollingCounter.cs | 4 +++- .../CoreLib/System/Diagnostics/Tracing/PollingCounter.cs | 4 +++- 7 files changed, 22 insertions(+), 7 deletions(-) diff --git a/src/Common/src/CoreLib/System/Diagnostics/Tracing/CounterGroup.cs b/src/Common/src/CoreLib/System/Diagnostics/Tracing/CounterGroup.cs index a9fa903c305e..43dbd442aa95 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/Tracing/CounterGroup.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/Tracing/CounterGroup.cs @@ -182,7 +182,7 @@ private void OnTimer(object? state) foreach (var counter in _counters) { - counter.WritePayload((float)elapsed.TotalSeconds); + counter.WritePayload((float)elapsed.TotalSeconds, _pollingIntervalInMilliseconds); } _timeStampSinceCollectionStarted = now; } diff --git a/src/Common/src/CoreLib/System/Diagnostics/Tracing/CounterPayload.cs b/src/Common/src/CoreLib/System/Diagnostics/Tracing/CounterPayload.cs index bca7d3b1967e..b44a856e187d 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/Tracing/CounterPayload.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/Tracing/CounterPayload.cs @@ -37,6 +37,10 @@ internal class CounterPayload : IEnumerable> public float IntervalSec { get; internal set; } + public string? Series { get; set; } + + public string? CounterType { get; set; } + public string? Metadata { get; set; } #region Implementation of the IEnumerable interface @@ -87,6 +91,10 @@ internal class IncrementingCounterPayload : IEnumerable> GetEnumerator() diff --git a/src/Common/src/CoreLib/System/Diagnostics/Tracing/DiagnosticCounter.cs b/src/Common/src/CoreLib/System/Diagnostics/Tracing/DiagnosticCounter.cs index 1d0bc543741c..c82ff3423dc7 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/Tracing/DiagnosticCounter.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/Tracing/DiagnosticCounter.cs @@ -87,7 +87,7 @@ public void AddMetadata(string key, string value) private CounterGroup _group; private Dictionary? _metadata; - internal abstract void WritePayload(float intervalSec); + internal abstract void WritePayload(float intervalSec, int pollingIntervalMillisec); // arbitrarily we use name as the lock object. internal object MyLock { get { return Name; } } diff --git a/src/Common/src/CoreLib/System/Diagnostics/Tracing/EventCounter.cs b/src/Common/src/CoreLib/System/Diagnostics/Tracing/EventCounter.cs index 7c230a2609c6..fae65ec40e61 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/Tracing/EventCounter.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/Tracing/EventCounter.cs @@ -84,7 +84,7 @@ internal void OnMetricWritten(double value) _count++; } - internal override void WritePayload(float intervalSec) + internal override void WritePayload(float intervalSec, int pollingIntervalMillisec) { lock (MyLock) { @@ -104,7 +104,8 @@ internal override void WritePayload(float intervalSec) } payload.Min = _min; payload.Max = _max; - + payload.Series = $"Interval={pollingIntervalMillisec}"; // TODO: This may need to change when we support multi-session + payload.CounterType = "Mean"; payload.Metadata = GetMetadataString(); payload.DisplayName = DisplayName; payload.Name = Name; diff --git a/src/Common/src/CoreLib/System/Diagnostics/Tracing/IncrementingEventCounter.cs b/src/Common/src/CoreLib/System/Diagnostics/Tracing/IncrementingEventCounter.cs index 24a9ea24cf6f..d4efae8cc39e 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/Tracing/IncrementingEventCounter.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/Tracing/IncrementingEventCounter.cs @@ -56,7 +56,7 @@ public void Increment(double increment = 1) public override string ToString() => $"IncrementingEventCounter '{Name}' Increment {_increment}"; - internal override void WritePayload(float intervalSec) + internal override void WritePayload(float intervalSec, int pollingIntervalMillisec) { lock (MyLock) // Lock the counter { @@ -65,6 +65,8 @@ internal override void WritePayload(float intervalSec) payload.IntervalSec = intervalSec; payload.DisplayName = DisplayName ?? ""; payload.DisplayRateTimeScale = (DisplayRateTimeScale == TimeSpan.Zero) ? "" : DisplayRateTimeScale.ToString("c"); + payload.Series = $"Interval={pollingIntervalMillisec}"; // TODO: This may need to change when we support multi-session + payload.CounterType = "Sum"; payload.Metadata = GetMetadataString(); payload.Increment = _increment - _prevIncrement; _prevIncrement = _increment; diff --git a/src/Common/src/CoreLib/System/Diagnostics/Tracing/IncrementingPollingCounter.cs b/src/Common/src/CoreLib/System/Diagnostics/Tracing/IncrementingPollingCounter.cs index 44fd7573c77c..2c93943f163d 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/Tracing/IncrementingPollingCounter.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/Tracing/IncrementingPollingCounter.cs @@ -68,7 +68,7 @@ private void UpdateMetric() } } - internal override void WritePayload(float intervalSec) + internal override void WritePayload(float intervalSec, int pollingIntervalMillisec) { UpdateMetric(); lock (MyLock) // Lock the counter @@ -78,6 +78,8 @@ internal override void WritePayload(float intervalSec) payload.DisplayName = DisplayName ?? ""; payload.DisplayRateTimeScale = (DisplayRateTimeScale == TimeSpan.Zero) ? "" : DisplayRateTimeScale.ToString("c"); payload.IntervalSec = intervalSec; + payload.Series = $"Interval={pollingIntervalMillisec}"; // TODO: This may need to change when we support multi-session + payload.CounterType = "Sum"; payload.Metadata = GetMetadataString(); payload.Increment = _increment - _prevIncrement; _prevIncrement = _increment; diff --git a/src/Common/src/CoreLib/System/Diagnostics/Tracing/PollingCounter.cs b/src/Common/src/CoreLib/System/Diagnostics/Tracing/PollingCounter.cs index ab69a1ec8236..6a0d3c0b5fde 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/Tracing/PollingCounter.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/Tracing/PollingCounter.cs @@ -46,7 +46,7 @@ public PollingCounter(string name, EventSource eventSource, Func metricP private Func _metricProvider; private double _lastVal; - internal override void WritePayload(float intervalSec) + internal override void WritePayload(float intervalSec, int pollingIntervalMillisec) { lock (MyLock) { @@ -65,6 +65,8 @@ internal override void WritePayload(float intervalSec) payload.DisplayName = DisplayName ?? ""; payload.Count = 1; // NOTE: These dumb-looking statistics is intentional payload.IntervalSec = intervalSec; + payload.Series = $"Interval={pollingIntervalMillisec}"; // TODO: This may need to change when we support multi-session + payload.CounterType = "Mean"; payload.Mean = value; payload.Max = value; payload.Min = value; From c5d6284dec3136ff9e45d02c5d788f29269ae1df Mon Sep 17 00:00:00 2001 From: Kevin Jones Date: Fri, 3 May 2019 11:05:38 -0400 Subject: [PATCH 196/607] Better support RSAES_OAEP certificates for EnvelopedCms Improve the .NET Core EnvelopedCms support on Windows for certificates whose public key says the algorithm is RSA-OAEP to restore .NET Framework-equivalent capability. Linux and macOS cannot reliably represent those certificates as an X509Certificate2, so their support is unchanged at this time. --- .../src/System/Security/Cryptography/Oids.cs | 2 + .../Pal/AnyOS/ManagedPal.KeyTrans.cs | 89 +--- .../Pal/Windows/PkcsPalWindows.Encrypt.cs | 64 +-- .../src/Internal/Cryptography/PkcsHelpers.cs | 72 +++ .../tests/Certificates.cs | 443 ++++++++++++++++++ .../tests/EnvelopedCms/GeneralTests.cs | 61 +++ .../KeyTransRecipientInfoRsaOaepCertTests.cs | 76 +++ ...eyTransRecipientInfoRsaPaddingModeTests.cs | 23 +- ...em.Security.Cryptography.Pkcs.Tests.csproj | 5 +- 9 files changed, 711 insertions(+), 124 deletions(-) create mode 100644 src/System.Security.Cryptography.Pkcs/tests/EnvelopedCms/KeyTransRecipientInfoRsaOaepCertTests.cs diff --git a/src/Common/src/System/Security/Cryptography/Oids.cs b/src/Common/src/System/Security/Cryptography/Oids.cs index b24fa7a59f63..872e0a6c2927 100644 --- a/src/Common/src/System/Security/Cryptography/Oids.cs +++ b/src/Common/src/System/Security/Cryptography/Oids.cs @@ -26,6 +26,8 @@ internal static partial class Oids internal const string RsaPkcs1Sha512 = "1.2.840.113549.1.1.13"; internal const string Esdh = "1.2.840.113549.1.9.16.3.5"; internal const string EcDiffieHellman = "1.3.132.1.12"; + internal const string DiffieHellman = "1.2.840.10046.2.1"; + internal const string DiffieHellmanPkcs3 = "1.2.840.113549.1.3.1"; // Cryptographic Attribute Types internal const string SigningTime = "1.2.840.113549.1.9.5"; diff --git a/src/System.Security.Cryptography.Pkcs/src/Internal/Cryptography/Pal/AnyOS/ManagedPal.KeyTrans.cs b/src/System.Security.Cryptography.Pkcs/src/Internal/Cryptography/Pal/AnyOS/ManagedPal.KeyTrans.cs index 56ff34e264f9..59625e49c56e 100644 --- a/src/System.Security.Cryptography.Pkcs/src/Internal/Cryptography/Pal/AnyOS/ManagedPal.KeyTrans.cs +++ b/src/System.Security.Cryptography.Pkcs/src/Internal/Cryptography/Pal/AnyOS/ManagedPal.KeyTrans.cs @@ -6,7 +6,6 @@ using System.Buffers; using System.Diagnostics; using System.Security.Cryptography; -using System.Security.Cryptography.Asn1; using System.Security.Cryptography.Pkcs; using System.Security.Cryptography.Pkcs.Asn1; using System.Security.Cryptography.X509Certificates; @@ -15,8 +14,6 @@ namespace Internal.Cryptography.Pal.AnyOS { internal sealed partial class ManagedPkcsPal : PkcsPal { - private static readonly byte[] s_pSpecifiedDefaultParameters = { 0x04, 0x00 }; - internal sealed class ManagedKeyTransPal : KeyTransRecipientInfoPal { private readonly KeyTransRecipientInfoAsn _asn; @@ -81,7 +78,7 @@ internal static byte[] DecryptCekCore( encryptionPadding = RSAEncryptionPadding.Pkcs1; break; case Oids.RsaOaep: - if (!TryGetRsaOaepEncryptionPadding(algorithmParameters, out encryptionPadding, out exception)) + if (!PkcsHelpers.TryGetRsaOaepEncryptionPadding(algorithmParameters, out encryptionPadding, out exception)) { return null; } @@ -140,19 +137,7 @@ private KeyTransRecipientInfoAsn MakeKtri( recipient.RecipientIdentifierType.ToString()); } - RSAEncryptionPadding padding = recipient.RSAEncryptionPadding; - - if (padding is null) - { - if (recipient.Certificate.GetKeyAlgorithm() == Oids.RsaOaep) - { - padding = RSAEncryptionPadding.OaepSHA1; - } - else - { - padding = RSAEncryptionPadding.Pkcs1; - } - } + RSAEncryptionPadding padding = recipient.RSAEncryptionPadding ?? RSAEncryptionPadding.Pkcs1; if (padding == RSAEncryptionPadding.Pkcs1) { @@ -249,75 +234,5 @@ private static byte[] DecryptKey( } #endif } - - private static bool TryGetRsaOaepEncryptionPadding( - ReadOnlyMemory? parameters, - out RSAEncryptionPadding rsaEncryptionPadding, - out Exception exception) - { - exception = null; - rsaEncryptionPadding = null; - - if (parameters == null || parameters.Value.IsEmpty) - { - exception = new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); - return false; - } - - try - { - OaepParamsAsn oaepParameters = OaepParamsAsn.Decode(parameters.Value, AsnEncodingRules.DER); - - if (oaepParameters.MaskGenFunc.Algorithm.Value != Oids.Mgf1 || - oaepParameters.MaskGenFunc.Parameters == null || - oaepParameters.PSourceFunc.Algorithm.Value != Oids.PSpecified - ) - { - exception = new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); - return false; - } - - AlgorithmIdentifierAsn mgf1AlgorithmIdentifier = AlgorithmIdentifierAsn.Decode(oaepParameters.MaskGenFunc.Parameters.Value, AsnEncodingRules.DER); - - if (mgf1AlgorithmIdentifier.Algorithm.Value != oaepParameters.HashFunc.Algorithm.Value) - { - exception = new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); - return false; - } - - if (oaepParameters.PSourceFunc.Parameters != null && - !oaepParameters.PSourceFunc.Parameters.Value.Span.SequenceEqual(s_pSpecifiedDefaultParameters)) - { - exception = new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); - return false; - } - - switch (oaepParameters.HashFunc.Algorithm.Value) - { - case Oids.Sha1: - rsaEncryptionPadding = RSAEncryptionPadding.OaepSHA1; - return true; - case Oids.Sha256: - rsaEncryptionPadding = RSAEncryptionPadding.OaepSHA256; - return true; - case Oids.Sha384: - rsaEncryptionPadding = RSAEncryptionPadding.OaepSHA384; - return true; - case Oids.Sha512: - rsaEncryptionPadding = RSAEncryptionPadding.OaepSHA512; - return true; - default: - exception = new CryptographicException( - SR.Cryptography_Cms_UnknownAlgorithm, - oaepParameters.HashFunc.Algorithm.Value); - return false; - } - } - catch (CryptographicException e) - { - exception = e; - return false; - } - } } } diff --git a/src/System.Security.Cryptography.Pkcs/src/Internal/Cryptography/Pal/Windows/PkcsPalWindows.Encrypt.cs b/src/System.Security.Cryptography.Pkcs/src/Internal/Cryptography/Pal/Windows/PkcsPalWindows.Encrypt.cs index 6477d758b0d3..ac321609ae94 100644 --- a/src/System.Security.Cryptography.Pkcs/src/Internal/Cryptography/Pal/Windows/PkcsPalWindows.Encrypt.cs +++ b/src/System.Security.Cryptography.Pkcs/src/Internal/Cryptography/Pal/Windows/PkcsPalWindows.Encrypt.cs @@ -207,36 +207,22 @@ public static SafeCryptMsgHandle CreateCryptMsgHandleToEncode(CmsRecipientCollec // private static CMSG_RECIPIENT_ENCODE_INFO EncodeRecipientInfo(CmsRecipient recipient, AlgorithmIdentifier contentEncryptionAlgorithm, HeapBlockRetainer hb) { - CMsgCmsRecipientChoice recipientChoice; - string keyAlgorithmOid = recipient.Certificate.GetKeyAlgorithm(); - AlgId algId = keyAlgorithmOid.ToAlgId(); - switch (algId) - { - case AlgId.CALG_RSA_KEYX: - recipientChoice = CMsgCmsRecipientChoice.CMSG_KEY_TRANS_RECIPIENT; - break; - - case AlgId.CALG_DH_SF: - case AlgId.CALG_DH_EPHEM: - recipientChoice = CMsgCmsRecipientChoice.CMSG_KEY_AGREE_RECIPIENT; - break; - - default: - throw ErrorCode.CRYPT_E_UNKNOWN_ALGO.ToCryptographicException(); - } - CMSG_RECIPIENT_ENCODE_INFO recipientEncodeInfo; - recipientEncodeInfo.dwRecipientChoice = recipientChoice; unsafe { - switch (recipientChoice) + switch (recipient.Certificate.GetKeyAlgorithm()) { - case CMsgCmsRecipientChoice.CMSG_KEY_TRANS_RECIPIENT: + case Oids.Rsa: + case Oids.RsaOaep: + recipientEncodeInfo.dwRecipientChoice = CMsgCmsRecipientChoice.CMSG_KEY_TRANS_RECIPIENT; recipientEncodeInfo.pCmsRecipientEncodeInfo = (IntPtr)EncodeKeyTransRecipientInfo(recipient, hb); break; - case CMsgCmsRecipientChoice.CMSG_KEY_AGREE_RECIPIENT: + case Oids.Esdh: + case Oids.DiffieHellman: + case Oids.DiffieHellmanPkcs3: + recipientEncodeInfo.dwRecipientChoice = CMsgCmsRecipientChoice.CMSG_KEY_AGREE_RECIPIENT; recipientEncodeInfo.pCmsRecipientEncodeInfo = (IntPtr)EncodeKeyAgreeRecipientInfo(recipient, contentEncryptionAlgorithm, hb); break; @@ -266,36 +252,54 @@ private static CMSG_RECIPIENT_ENCODE_INFO EncodeRecipientInfo(CmsRecipient recip pEncodeInfo->cbSize = sizeof(CMSG_KEY_TRANS_RECIPIENT_ENCODE_INFO); - if (recipient.RSAEncryptionPadding is null) + RSAEncryptionPadding padding = recipient.RSAEncryptionPadding; + + if (padding is null) { - CRYPT_ALGORITHM_IDENTIFIER algId = pCertInfo->SubjectPublicKeyInfo.Algorithm; - pEncodeInfo->KeyEncryptionAlgorithm = algId; + if (recipient.Certificate.GetKeyAlgorithm() == Oids.RsaOaep) + { + byte[] parameters = recipient.Certificate.GetKeyAlgorithmParameters(); + + if (parameters == null || parameters.Length == 0) + { + padding = RSAEncryptionPadding.OaepSHA1; + } + else if (!PkcsHelpers.TryGetRsaOaepEncryptionPadding(parameters, out padding, out _)) + { + throw ErrorCode.CRYPT_E_UNKNOWN_ALGO.ToCryptographicException(); + } + } + else + { + padding = RSAEncryptionPadding.Pkcs1; + } } - else if (recipient.RSAEncryptionPadding == RSAEncryptionPadding.Pkcs1) + + if (padding == RSAEncryptionPadding.Pkcs1) { pEncodeInfo->KeyEncryptionAlgorithm.pszObjId = hb.AllocAsciiString(Oids.Rsa); pEncodeInfo->KeyEncryptionAlgorithm.Parameters.cbData = (uint)s_rsaPkcsParameters.Length; pEncodeInfo->KeyEncryptionAlgorithm.Parameters.pbData = hb.AllocBytes(s_rsaPkcsParameters); } - else if (recipient.RSAEncryptionPadding == RSAEncryptionPadding.OaepSHA1) + else if (padding == RSAEncryptionPadding.OaepSHA1) { pEncodeInfo->KeyEncryptionAlgorithm.pszObjId = hb.AllocAsciiString(Oids.RsaOaep); pEncodeInfo->KeyEncryptionAlgorithm.Parameters.cbData = (uint)s_rsaOaepSha1Parameters.Length; pEncodeInfo->KeyEncryptionAlgorithm.Parameters.pbData = hb.AllocBytes(s_rsaOaepSha1Parameters); } - else if (recipient.RSAEncryptionPadding == RSAEncryptionPadding.OaepSHA256) + else if (padding == RSAEncryptionPadding.OaepSHA256) { pEncodeInfo->KeyEncryptionAlgorithm.pszObjId = hb.AllocAsciiString(Oids.RsaOaep); pEncodeInfo->KeyEncryptionAlgorithm.Parameters.cbData = (uint)s_rsaOaepSha256Parameters.Length; pEncodeInfo->KeyEncryptionAlgorithm.Parameters.pbData = hb.AllocBytes(s_rsaOaepSha256Parameters); } - else if (recipient.RSAEncryptionPadding == RSAEncryptionPadding.OaepSHA384) + else if (padding == RSAEncryptionPadding.OaepSHA384) { pEncodeInfo->KeyEncryptionAlgorithm.pszObjId = hb.AllocAsciiString(Oids.RsaOaep); pEncodeInfo->KeyEncryptionAlgorithm.Parameters.cbData = (uint)s_rsaOaepSha384Parameters.Length; pEncodeInfo->KeyEncryptionAlgorithm.Parameters.pbData = hb.AllocBytes(s_rsaOaepSha384Parameters); } - else if (recipient.RSAEncryptionPadding == RSAEncryptionPadding.OaepSHA512) + else if (padding == RSAEncryptionPadding.OaepSHA512) { pEncodeInfo->KeyEncryptionAlgorithm.pszObjId = hb.AllocAsciiString(Oids.RsaOaep); pEncodeInfo->KeyEncryptionAlgorithm.Parameters.cbData = (uint)s_rsaOaepSha512Parameters.Length; diff --git a/src/System.Security.Cryptography.Pkcs/src/Internal/Cryptography/PkcsHelpers.cs b/src/System.Security.Cryptography.Pkcs/src/Internal/Cryptography/PkcsHelpers.cs index b0acf2677210..346a2fd2ab70 100644 --- a/src/System.Security.Cryptography.Pkcs/src/Internal/Cryptography/PkcsHelpers.cs +++ b/src/System.Security.Cryptography.Pkcs/src/Internal/Cryptography/PkcsHelpers.cs @@ -20,6 +20,8 @@ namespace Internal.Cryptography { internal static partial class PkcsHelpers { + private static readonly byte[] s_pSpecifiedDefaultParameters = { 0x04, 0x00 }; + #if !netcoreapp // Compatibility API. internal static void AppendData(this IncrementalHash hasher, ReadOnlySpan data) @@ -475,5 +477,75 @@ public static ReadOnlyMemory DecodeOctetString(ReadOnlyMemory encode Debug.Fail("TryCopyOctetStringBytes failed with an over-allocated array"); throw new CryptographicException(); } + + public static bool TryGetRsaOaepEncryptionPadding( + ReadOnlyMemory? parameters, + out RSAEncryptionPadding rsaEncryptionPadding, + out Exception exception) + { + exception = null; + rsaEncryptionPadding = null; + + if (parameters == null || parameters.Value.IsEmpty) + { + exception = new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); + return false; + } + + try + { + OaepParamsAsn oaepParameters = OaepParamsAsn.Decode(parameters.Value, AsnEncodingRules.DER); + + if (oaepParameters.MaskGenFunc.Algorithm.Value != Oids.Mgf1 || + oaepParameters.MaskGenFunc.Parameters == null || + oaepParameters.PSourceFunc.Algorithm.Value != Oids.PSpecified + ) + { + exception = new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); + return false; + } + + AlgorithmIdentifierAsn mgf1AlgorithmIdentifier = AlgorithmIdentifierAsn.Decode(oaepParameters.MaskGenFunc.Parameters.Value, AsnEncodingRules.DER); + + if (mgf1AlgorithmIdentifier.Algorithm.Value != oaepParameters.HashFunc.Algorithm.Value) + { + exception = new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); + return false; + } + + if (oaepParameters.PSourceFunc.Parameters != null && + !oaepParameters.PSourceFunc.Parameters.Value.Span.SequenceEqual(s_pSpecifiedDefaultParameters)) + { + exception = new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); + return false; + } + + switch (oaepParameters.HashFunc.Algorithm.Value) + { + case Oids.Sha1: + rsaEncryptionPadding = RSAEncryptionPadding.OaepSHA1; + return true; + case Oids.Sha256: + rsaEncryptionPadding = RSAEncryptionPadding.OaepSHA256; + return true; + case Oids.Sha384: + rsaEncryptionPadding = RSAEncryptionPadding.OaepSHA384; + return true; + case Oids.Sha512: + rsaEncryptionPadding = RSAEncryptionPadding.OaepSHA512; + return true; + default: + exception = new CryptographicException( + SR.Cryptography_Cms_UnknownAlgorithm, + oaepParameters.HashFunc.Algorithm.Value); + return false; + } + } + catch (CryptographicException e) + { + exception = e; + return false; + } + } } } diff --git a/src/System.Security.Cryptography.Pkcs/tests/Certificates.cs b/src/System.Security.Cryptography.Pkcs/tests/Certificates.cs index 5ab90c305c52..35a636b87fa2 100644 --- a/src/System.Security.Cryptography.Pkcs/tests/Certificates.cs +++ b/src/System.Security.Cryptography.Pkcs/tests/Certificates.cs @@ -29,6 +29,10 @@ internal static class Certificates public static readonly CertLoader RSAKeyTransfer4_ExplicitSki = new CertLoaderFromRawData(RawData.s_RSAKeyTransfer4_ExplicitSkiCer, RawData.s_RSAKeyTransfer4_ExplicitSkiPfx, "1111"); public static readonly CertLoader RSAKeyTransfer5_ExplicitSkiOfRSAKeyTransfer4 = new CertLoaderFromRawData(RawData.s_RSAKeyTransfer5_ExplicitSkiOfRSAKeyTransfer4Cer, RawData.s_RSAKeyTransfer5_ExplicitSkiOfRSAKeyTransfer4Pfx, "1111"); public static readonly CertLoader NegativeSerialNumber = new CertLoaderFromRawData(RawData.NegativeSerialNumberCert, RawData.NegativeSerialNumberPfx, "1234"); + public static readonly CertLoader RsaOaep2048_NullParameters = new CertLoaderFromRawData(RawData.RsaOaep2048_NullParametersCert, RawData.RsaOaep2048_NullParametersPfx, "1111"); + public static readonly CertLoader RsaOaep2048_Sha1Parameters = new CertLoaderFromRawData(RawData.RsaOaep2048_Sha1ParametersCert, RawData.RsaOaep2048_Sha1ParametersPfx, "1111"); + public static readonly CertLoader RsaOaep2048_Sha256Parameters = new CertLoaderFromRawData(RawData.RsaOaep2048_Sha256ParametersCert, RawData.RsaOaep2048_Sha256ParametersPfx, "1111"); + public static readonly CertLoader RsaOaep2048_NoParameters = new CertLoaderFromRawData(RawData.RsaOaep2048_NoParametersCert, RawData.RsaOaep2048_NoParametersPfx, "1111"); // Note: the raw data is its own (nested) class to avoid problems with static field initialization ordering. private static class RawData @@ -1601,6 +1605,445 @@ private static class RawData "5C86500AF2760F8A87DB8E6E5FA2753037301F300706052B0E03021A0414AA38" + "B6B4257EBA3E399CA9EDD87BDC1F82FBF7D70414B796F49E612D1A2B5A0DEC11" + "608A153B5BCD4FE9").HexToByteArray(); + + internal static byte[] RsaOaep2048_NullParametersCert = ( + "3082032830820210A003020102021000B2DB376E004B56F8089A1034C37D7330" + + "0D06092A864886F70D01010B050030173115301306035504030C0C436F6E746F" + + "736F20526F6F74301E170D3139303432313231323134335A170D323930343232" + + "3231323134335A30173115301306035504030C0C436F6E746F736F204C656166" + + "30820122300D06092A864886F70D01010705000382010F003082010A02820101" + + "0091A009FE3025D0366735DB93BFCD714979B4982B54374E60C4220A2C0F7E74" + + "A9BF62EDA8D87BE09956A73F4C527FEF7A53C2DA2BFBFAF28FD49C786E09963A" + + "948A10D65DB8AEC829EF88DD5FB7386211AC8828124CBC24582450FA11337B4A" + + "72FE8FFC9C95C30F4C7B0019FF591D0C92F88B7A21D25C8CE47D52E55E4823F9" + + "CB06B7F62E10586E2DBAE84D48654F1D7A8EB5D160F6B076A82A3806864B09A7" + + "58E9121AE8EF50D76CFFCFF81FE4193E5D0BD3E0CC4E58FDBC3CC973A2907C88" + + "EA3E7BD2689384341ABDCDA2525C275EAFA4884F548F4FF20A869E9F598F48C1" + + "571D42DE9E8B4C4CDD6B47865F9BA0A7BB342B29CDCE00D6711B79C2C8D50405" + + "330203010001A370306E300C0603551D130101FF04023000300E0603551D0F01" + + "01FF040403020430304E0603551D23044730458014A791F70FC3C8B363A49AEE" + + "505055EAD33659711CA11BA41930173115301306035504030C0C436F6E746F73" + + "6F20526F6F7482100099356AD75D355A305839B87F087B5F300D06092A864886" + + "F70D01010B050003820101006F0FA161D224E2E27F35CEB37B92A8090568C9AE" + + "F29F659A1DF3484770369751359849721A544759230AC79E8487D38CFDEAA31A" + + "492E286B10E24B6B2FACF0E6F103B1D4CD6FD2B8784F536C1397B6E791499DCC" + + "5B82C006458793815B2FA016A9C2DB1A690A8005803B60FD1876C11D290F77ED" + + "5E41F63E907F21E645CECD96F063EB3E22BCDA5D80EEEE8BC23379BFD6B37184" + + "82ADFBB84C6E28F86A8367F28A1777E61A1E0EA50E50993957E9715D95707A22" + + "5C7B4071D980FDC13E0D72DEDC6205884B14E523941CC0F1ADFC64109E85ED67" + + "83039EF14C45C5CE54151D679E8D38FB90F5F64F96C8FE23CBBA362C1A17A922" + + "32DB27C43535DD8ABB9C054B").HexToByteArray(); + + internal static byte[] RsaOaep2048_NullParametersPfx = ( + "308209BE0201033082097806092A864886F70D010701A0820969048209653082" + + "09613082056606092A864886F70D010701A0820557048205533082054F308205" + + "4B060B2A864886F70D010C0A0102A08204FA308204F63028060A2A864886F70D" + + "010C0103301A0414CDCA906D503CB0FD77952B3E473FCDA78409868302020400" + + "048204C8580404D87213470B672926374C32E46601DF1B0CF28A28C89E91B402" + + "BBA6F12557D46C36D7C50447651BB14AB488671879C278BF4ED7B3FD1C2C387C" + + "B5491192C552F2617683DB4B8D752CDCC29FD16E711B3D715BAFA893A606F767" + + "8D464A12AD34D74EAFA7872CFD90413407723C3A2344B37BBC801BA5A2FC50F7" + + "F23ECEC60FFF517B942EFB269F7291A568E6CE294A89231D309639228FA3559D" + + "D72A9D51A33A6B112422F63E55C65E8C5B7AC69D04FDB785D9DAF53FAFEAAD02" + + "CCE7A10690EFEED1CB61335B663E8AB05D43148EFADD170205CFD9C0BAE14703" + + "40B2B10BDD0F6607ADF176026183DD62D2E0E52E77AD6945B616F979956ABE3A" + + "E1C193A8BC7AD57DF90F02D52B88761FA85656039035B15D326C7C400D0C1BCA" + + "CE265C8B1B3F48DE1297852055C37C89718383F7AFFEA171795570A2A13EDBB1" + + "22B257A47752A67AC0AA922C69C50939A225B6725FE826A2ADFDF6672196547A" + + "71C25A1FFAE1BCFBC06A20D25F1A0A1C35678E1DD9ECAF3BD1DA1F8B803CB3BC" + + "FE39EA2BF26D4B74F44B6F8BCC43B39B1D51F8B935BFA55DFCFA504B5EA8792C" + + "35D30E40F908C4B9D200C65F89492559265DF46B7659C2F3934EC1F4590F6294" + + "319E03E88105CDE763347B77C30FE66F538DDB7C353563238224F523EC0D7469" + + "1DB8C4D4FD5B99CAF8576A5508A0D537E33864749D790864D78886C47362EEF0" + + "22E5E32B1A8DDA19949317196D641D5B08473A234817E10B2BED5DD9E680B30D" + + "E5E545A1B93819200435D73CE39E083E9F1D19B55E8B0A0BC9144A5072908127" + + "DD9031F5FAF0111FA7D1511ECB5809E49E29DA27954C78CFBE384D2944CDEEB8" + + "3AF2B4C861AD92005ACD0A6374544DC8C89C28BC3FD7A9287BDA231902D8C6DC" + + "3417423BFC82075BB29009C7CEEC69043AB209BE934C6A08A11362E79083C25A" + + "716267098C9B8C054FCD55B8310D559E612273E84DABA24CAFB3FCBFC2068591" + + "0762FFF325599FF882AB2C013BBFED97D21520DBCBEC0EBC03170591A4A98229" + + "0FE8ACD561CE5DECD3C4DFB8C32BB6AB1B8799A8D6515569F37977CE60603D43" + + "87A5D2BF4D62FF0C971B9EE6AE735FC4C047376DEA0EE16A12CDE810A5AF738E" + + "4B454B2CE484D608A07FA18CE4868B6047F1BD377F7A8F16A983E19D9693D677" + + "7F734F7417221B7D2ABC0E74CF9C039FBE16DD34106F88AF25ACCE8F407A5179" + + "EC3BF209E35F5F315F0F0CE064627EFD830DF50CDCF8D21403D533924711B442" + + "3E6DFB65B5AA000EF6DB8D90F57BCC592FE9C6F1A30A7B7FD4D651F4B3E37F70" + + "C6CE0267370B5960C74EE23EE476AF8290114E41A2535FF3DE6A629EA2C87A71" + + "7B3C164E6103222F9010ED4426A2B766DFF4271C1C6A2CF704F1DB1B8A27215D" + + "91115FA4E873A00487DF7EC18E07013D47F59A5014AEE87FD1F94BBFFE72D8E6" + + "CD0BFE40ACD32DC3F8AF7E8E288ADC9ABC75E5FEE7E56C676D25D94F1AFBADCA" + + "7ADB09ED186751211D5A07CE4735508489178B1958FAE7E96A5AF25ED52FDEFC" + + "D72E351096336D4C65836BA62693D6DB3111EB61679EC9AF0D837C1B1C1E08FD" + + "E4413EF1CCA6B61E029195E477DCA8F92DC503A3F90A917730A0B4134F5543A0" + + "877E7A125E7B2B87BF21CE84A811E2D8063C3506DF6ED4BD3E5AD0EB1119876E" + + "C51172FC664C4D2771501D9B977B0579059932DC6F4B6811593CA1B063316150" + + "A4385EF3EE87C2D4A64A2BD2313E301706092A864886F70D010914310A1E0800" + + "74006500730074302306092A864886F70D01091531160414989A932D9FF76F8C" + + "FCAA6B7420276D27B96236F9308203F306092A864886F70D010706A08203E430" + + "8203E0020100308203D906092A864886F70D0107013028060A2A864886F70D01" + + "0C0106301A0414692101FB773A3B21A23929C1ABEFC05DA7FB2C970202040080" + + "8203A021B1E0409E6D0C4D02435D73CEF56BA485245E75AFF29214F9889B3AFB" + + "80529C789BB4F0F366A850F89B35175554DF88A0CD453FB4FCA331ECC5069B11" + + "03B670B745EC8F612896FE1451857232E5444FBA5A52ED963984ED79906D815D" + + "B3F59FB19DAE35D8EC29E71016581AD3BEEF9992A76B776E221C73C47930D7E8" + + "FD378FF254EF23CA3B34B6E75F1F7FDF58688129E4973A18BCDBBD9C5469D6D5" + + "7B08E5377C2C416BC55642EB8C27545BF641500916EAE7A37B7D3346B9EEDF32" + + "3DEB35D07D1E28420950BA40FCD45F2CFB7BADFDFF30D04454AE32A7583A79BE" + + "002B34DFEA8259FC93BBFC67F6FDB428F4E73BB5228FDCFA1B5E4BAB67AF73C8" + + "B53683CCE9A3A255CF66AE2DA79BE727F378E74FA9CFBBD6F30AC1C33D25501C" + + "DFC61E5FD79BC13AD0091FDCEB00BA11A26DA4E8FC08DED37C8E4176C7D9A4D2" + + "A6C91F847AEE5EB07EF37FB45411CC21CA230957F4D9BCDE96CFE8C5E476B5E5" + + "7CC87ECAE0197C77C7977DA5D5E5002D5F51DBA06359B9F5E99448D700ED65FE" + + "1618B347E2D1C9B4425F664DF796DF08110BB72E55D4CA34A9C19D4A00DC7161" + + "8A5C047DDF25AA1BEDB4649ED421F51316B4EAEA1D6B264E86743BB92BFA172C" + + "EF5CE50715D1226505F780D3BB9ED84E30719B88B776A44278360B052A6BCD98" + + "17F0129FAFD37EB2566802B54533D345974E55D3C6EA59A224EE38203B32595E" + + "5FFF6BBD41DADC4220D1202C8C71633A026901F08F2FFF54D4661EB7E4E658BB" + + "8F059DA7F300405E17007694BA1939E473610802F427848B0C7A9C5AAAAD1F24" + + "0CEFB2BDCF0F4F8200B1EAE67430C47FC460B57E65D973FD9852B20B9F7C8009" + + "B9B99A52513264081BE6AC7C4ECEA3E8F702D32C82DB7221F5FD8116971D2473" + + "811BB2C13ED6349F907BD1819B04DF7DB213FB0AEF0EEEAC47D9DD74FB387448" + + "519E03F43803CE1A0CE168C225B8EC2FF5A4F7B7F2E985458DF078C1152C8D8E" + + "0835A762A307AC352A3B6D37CF84B934F857DDC70306D0953CB7797356F374E2" + + "6DD3B96C32BCA6DB98DFC8413B87171955B6758F382C2EC43DE012D9F02E5335" + + "1F8E063C1E0B1896334672D621AF38E153EBCAB7D5CCF61087916CD6107416E9" + + "11069B57359839F7D64FEC244CC8AB35F65C3F84DB80D1657016F69111DA7B63" + + "052205786981FA3E3047FA4BB4876F315235F96FB83F02282ADD202168123C73" + + "A2A8698209BEF3D3FFCE19EACD67708D97194BC77D94784CE85C33ED1BCB82D5" + + "4256318773B4E6A58D1518CACEB03CA74999BF7A898A6BB543413803F77D925A" + + "6D9A23303D3021300906052B0E03021A05000414A0CE79F0E969E2A8F6959B58" + + "6B99CD091DE4E4FA04143FFA346F6E7F8ABDE22A51853C06F365CE21D7D70202" + + "0400").HexToByteArray(); + + internal static byte[] RsaOaep2048_Sha1ParametersCert = ( + "3082032830820210A003020102021000CD1B955EB1EFB9F3BAE8C64D49C16F30" + + "0D06092A864886F70D01010B050030173115301306035504030C0C436F6E746F" + + "736F20526F6F74301E170D3139303432313232313734315A170D323930343232" + + "3232313734315A30173115301306035504030C0C436F6E746F736F204C656166" + + "30820122300D06092A864886F70D01010730000382010F003082010A02820101" + + "00DD16801AF1ABCA05C53DA0863C7719C9719DFB363784F5ADBC0367BB98E873" + + "FD46B06CCE3640BC3BAB450756E8CA7FB336D5EF1FA15BE76C60F06E71F3843B" + + "9155D6DCEA8A3C9D361068FE4AB95064AABB997731E47FDD00AED791A377774D" + + "36A204C851E521325F2BA01616CB5684C8CA628D7A42C8CD02CF423FF9C6EB80" + + "74F5D61E8226A39DAC0E4B051701FB7301C4F85DD4D2DE0FD1D5CC143B18FDE8" + + "007ADC853C08003B86F5D4B97E87124906CF4D3C746CDBDE3B3B8431FB1601D6" + + "4EC6E9EC99C6A5288023F8C15803DD8E85A6621C0714C60FA8062D5E6208FC5B" + + "F1C32B7DE521C0AB1A7E60E444A1230E6BAF605BA35FC1111CDEF6B6E188DF84" + + "8D0203010001A370306E300C0603551D130101FF04023000300E0603551D0F01" + + "01FF040403020430304E0603551D2304473045801419AA399804F91ED61132EC" + + "CBAAF578543F46972DA11BA41930173115301306035504030C0C436F6E746F73" + + "6F20526F6F74821000BEBBAC206CB54DF85376C2D4E0F19F300D06092A864886" + + "F70D01010B050003820101000B8F34A7BBD7E2DEAD1E1025B505DB439A7CC9B2" + + "6D9BD4EC8E0D5A5B3222E0926F5B2F97B888AD2AB8632CE2EEF9878FEED75A23" + + "019B4FFC6583B95FE8E033A75D2293E6A37084E811275E9819311A9E9A5AC9AA" + + "F27031E814CDC7A7DEB99B42D8D24334BD00C4B8066EEDEDA9A19F5AD4720A87" + + "E0EC4299A8F527929ADA9AE72A6D28E5E8EBBC7AE565D645065E0D64FD57F87D" + + "8A3D542EBDF21F3464FC3B3AB33A74A46DCC2658E73690B7BB800B20E30AB038" + + "6CF44C4211FA82A49F2E52BD168590955159B2D82A37421E0A72A11E6AB2117D" + + "F9AB0E0165F0E4C5D4075FE9E21C8B6E783C3EAC67027B4F9FBCA3855FA361C3" + + "C322E14CE938B2FE3A5AF38A").HexToByteArray(); + + internal static byte[] RsaOaep2048_Sha1ParametersPfx = ( + "308209BE0201033082097806092A864886F70D010701A0820969048209653082" + + "09613082056606092A864886F70D010701A0820557048205533082054F308205" + + "4B060B2A864886F70D010C0A0102A08204FA308204F63028060A2A864886F70D" + + "010C0103301A0414F4D52466643FE5A7B6C45AD1800F828B2FED17DF02020400" + + "048204C8C5779FCEF0DE7E5D03ACCF6BCE8126CEE1F35DE299F7CE2ECF36F54E" + + "A95DDFE98D164F8A5BC7A9F6CF39C8B90FCD40323D0C885E6AA5C54D810CD706" + + "A42909972CAA471BF8A6AE1E51D646D95E29507CC018ACFB060B36268BFABC8B" + + "82D01A31B1D492AC016D06BE487A5557793DE1DD1197C9D723C1AF3E9AE2DBC0" + + "640FA18D3998356C2FD6D2A06DFD259E34083543AFEC7F72B85CCE6BE565C430" + + "6EE7B19A039D1F22BF4F3AA3EA272C21AC4DEE6155041CCC0EC2DB68CAED1609" + + "3F328689478A7A25B36A47A6655691F10163220ADA2F436943A68A6AB24D76A7" + + "D12D400EFAE7C6D85FDAF8434CC8C524CB4B3759893536957F06BDB03711DB60" + + "315EB84799C29C00186D4640278640815928679266CD6D767E83EF10B2CCB277" + + "4D1A90D8F64A23CBB3A823A6A7D0BC1BD8B5D2E56E91F3F117D5D88EB88489CB" + + "5CF4522D47DF401D1C8525A89A79D04E7A6A17CC04F4F2D7FF355F91FB0EEE57" + + "C8B8B8CEF5AC41704A303013FE95DDBE70646D9A34A77A4CA283018213E2BDD0" + + "92F3F45A8070E1472A3A1D6D8AD46190620CBD84FC5183F3A03921D9C815C1FA" + + "D1140B6BB1008301B60E58239BDE8AAD68340AC3BAF2FDC00240DB5965C6BCC0" + + "5F58C2B63F36A25656F645425B019D9EC57893245C48C0709827B208FA705716" + + "3CA6DA5441C46B1A76187B7B6D2A286EEA26035ADED73B3B2B3229EC53F04608" + + "60FDA1413CF2B5D16DB55806D90F09CE9D4FC41CB9FDE51869E2650270B042B4" + + "063572217AFF48B3D6B5EFF29575DE8178B2D3397DB909A1F6ED2BC4623D4AAC" + + "F2E56B20DCC6064BD5673F9AFB317372BAC63B9B12CC18E3A8C3EAAF63B2A96D" + + "D04EF4A6580F98C353570ED1F268C4CAB268F6409F972AFE37D42FEC5896AD95" + + "F576F745BA5092D7D0591A894B3C2B922AB76A8BA5523DB6EBB7CA3C63A39436" + + "31CFB8958DC8C327296C2892FBFFD40A66F34195C5D9C8CECEB0596BD09406F5" + + "CE417BAFDF31D0438409D12A8A657B093BF48FBEFE532E6A54EFBA99439CB96C" + + "971BA7CD42CEFA3F5CE46A1290AB16DD451CB5228D6C6B611F1DC3A3856D2689" + + "495949D68921C7AAF01E96F5BDFD365C1D09776EFA1367C8C1613B3EE01FE02B" + + "338600062391E21341C2B2EF0E918FBB30E382DE3011374E852C8AC37EC74220" + + "C1172AFDF61229F02D7774D5FDB33E5B5B44A961CDCF386D3DBB73946E20ADF4" + + "D3F52F21A433AB71217E6AD17CFE85224D4E6326F6BC6FA0DE4B76B433C24767" + + "7D7DCB754C2C5F30F6C50817A7AA7AC0520DAD79BDC5273ACFFF2E08A38349E6" + + "6BE4027344D0BB590C8F9080CBD0D9C0C0DFF360CB53E74ED5922C75CB87703C" + + "3601A7FE69BEFDE8618CC23D05855A7ADB58F18C68A970E6B9B9D16C0147B2E4" + + "279460B856DEDAB4855C529CFE3BC76D2AEC253911DA6A2CB3BC965FB9B43A85" + + "B3EA673724C310698F16E24F9DEAA547095C70736AA559447DE34EE8A80FF9AA" + + "EF79929BF7BDB474A41E7F4D7B509FD195CB8C6B260D92D76AC50B3650CCBA7D" + + "FF11C04C1DC8F5CB1E99CD651234882269212BE7957732C3EF74731D2D349B60" + + "8AB1DB1DF628C1D50842E481ABD7BD15A95196416ECA8870A2AE9EE6B1724933" + + "44DD0B843AE53362CDF4C23BAD8E96BF205B783CC0B810B56E7AFC50F1F91B19" + + "C6776F01D452B29A87326D262F1742902072B4143647E28D821AFC27BDDF4F36" + + "CF6A6857159C43582396C7A2313E301706092A864886F70D010914310A1E0800" + + "74006500730074302306092A864886F70D0109153116041481AC4AB421E0EE3E" + + "783F04B1FD5314632A7CA500308203F306092A864886F70D010706A08203E430" + + "8203E0020100308203D906092A864886F70D0107013028060A2A864886F70D01" + + "0C0106301A04140003F5A90C3AFBADC5D4B269C00550E8291F952E0202040080" + + "8203A085E9E37AC65A1539B96463E46790E461AC4FE12D09E72B584C47332342" + + "1446095C926D54A8154CC5237E41F3DB93D5AC96600A3FFA115BBA90942D35D3" + + "4C540FA5FE7C06BE6EBF432AE0674D0BBF51F5AF54A00FE6B0779F6D24133632" + + "EFCB75AE44022F8DAFA05D82BE8704E4A2F331CF4DED131C9DE7C2BFF7871539" + + "724AC6425922C9D8C4DD45ECB1957FE3A97A0CCF8AC38FF6B8969C310ADA5AE9" + + "DB43DF7556AD724702D82B334738543B8B85723F1DE520EFCF3F15BA72BDFBD4" + + "CE9A3B858D812317341605346DD17569FED134D7FD68F628CA4C888883FF8BE1" + + "9AA25E24AD46AC4FB9672B5FFDA7FDA340C611E4D7E8761EAC8A3D9246E4DC1E" + + "D1A92263E8ECFC9A9BB676CEF3E413D159F475EEBD7707889E71E6F799740B3C" + + "E56A1EE57752C7A979DBD90EFFE1E2AD2B17685BCD9AF73F59532225C648E2EB" + + "7BEA8CB81CE5705F922657F8E5EF4F32C8F4426F2E5C9664EAF7AFF9C7FA0975" + + "E1A3AA5509E0931AB471B7B9C64A08E9A103F47C4C4430D7D9EE848094B6268A" + + "9C7CD811763CB0344B6AA1CB3C3A9964628BA348A93C75C2755F7E11315609A2" + + "27BF54010948206501C92D3551B106DBC15EB596E1141A0CA48B7D655A13D0D0" + + "E35473701AC38936102905C4723CC84F01C74DE854DB3AE352E0514F4AFF54CD" + + "BF4146A03ADB72909AB999CD21733B9C5065FA5165E27A6ABD89AF8754D9C010" + + "0C76A2976CDF958FBB0B83C15E2CA8C80397B74E43ED388C80FF4A05BA13928A" + + "61077A56BC6064098D4EDE315A6E96B2C30D3B48102896BD1B9E1D0774F1CAE8" + + "9AE21A0A0162CA05336E82351DA659F3E8231467C40B28774D639848FC435B12" + + "4D5BEABC70765F021E9B04823E33D0A62C00CC3206DBDC5A65E3A6404241E715" + + "2B3C942592A0B1655E9C1BFBF87E5643CC227258B64F3BE8266A91F2D4DCFB48" + + "036E6AF7B81069EB66AEEB50C8BFD9129C51B518E15B4BE8BBA60989DF77852D" + + "C3B394BC2A17BCE4A9C935DD1E51F8F672B5DFE18EB1A414791651B4875C1F45" + + "7BE8EE0D3D1DBA0869513879E8D9338F993D4E57267DE23B7015D744572BDBDD" + + "135E07793F3E24E04638772645DCE8325D7DDB9803E2CF7BBCA9792F0EEEE001" + + "5D9621D316D83CD90E7F5451F2A8F9264A5F6FF6AE85325985F31854421D82B4" + + "60F4420B9F3F08608CDC79F15F1D0096A8580225AE9BB81EFB85E56C80A08AA7" + + "D70C42B1CF6DADE96D635574847F84AB9DD15FE1E393DEAF368FACB2F03D45CC" + + "52C4F6A3BE155B7D32D46738200062BB36B53D7CE3FAF2DE04A83B42544AE212" + + "728658303D3021300906052B0E03021A050004144200D15CFF93500F241D12EA" + + "D690D3DB9CDE40A90414E9656D02B74AD5F7C1C9ECBEECDAA9F91B3B3E3A0202" + + "0400").HexToByteArray(); + + internal static byte[] RsaOaep2048_Sha256ParametersCert = ( + "308203573082023FA003020102021000E632D0CD2B7885DEC18B874E9DEB2930" + + "0D06092A864886F70D01010B050030173115301306035504030C0C436F6E746F" + + "736F20526F6F74301E170D3139303432313232313734325A170D323930343232" + + "3232313734325A30173115301306035504030C0C436F6E746F736F204C656166" + + "30820151303C06092A864886F70D010107302FA00F300D060960864801650304" + + "02010500A11C301A06092A864886F70D010108300D0609608648016503040201" + + "05000382010F003082010A02820101009773FC00EF371FCEBE2145563A29A08C" + + "608EC3F24FB1976594876E3D168BD744BC665C061B75F0B0ADFBFE90967ECFAE" + + "522A30A38457656F0D620C8CF4632D9B879F80240A0F6304CE276F5641C3B756" + + "995202CFA14E6BC777235D942B517CA963A5AFED7B595569877E3EA645A6D887" + + "10975FD8BB213D58F50DBEE58A3716D7EFD2171734CD17E099513F3225366C6E" + + "B91B0946FDC8F6745A15FF15EB71E7C2C6537C9E3CB95F38E9A571496247C9BF" + + "118B2A361AD47B6122D4E098095105F8BE7C031C7CAD1044F44849B794379235" + + "27AED01CC9E8605BA7431956E7ECF4B4A829A36C77FB8353AA8966EAE05219DC" + + "0BA45F0E41F5B6B91D954148455055450203010001A370306E300C0603551D13" + + "0101FF04023000300E0603551D0F0101FF040403020430304E0603551D230447" + + "3045801419AA399804F91ED61132ECCBAAF578543F46972DA11BA41930173115" + + "301306035504030C0C436F6E746F736F20526F6F74821000BEBBAC206CB54DF8" + + "5376C2D4E0F19F300D06092A864886F70D01010B050003820101004629B34FF2" + + "9208886EBFFDB0C54F935394F33FDC2F4B82C7EA1A18E0630905906D8DFF23F8" + + "0D79848584453DA67D65FB8E4C8C5D53EBF864B1414B43AEB89276C6BF0C0870" + + "6545E90C14F033ED8F47B6020E6FB87AFE0C41B3A5DCB5ECA881D519759D7EC1" + + "093A21C38CAE7202EBFA99FE94121EF89944EA68BF92C8EF605D6C9EFCA0D849" + + "D4E775AE0EABADAFB83019A323A0CE3544B9F877546C5B0043730E8F1342F332" + + "5AF4683C73BADDFEF3518B0A4E015A10BC6178C10E3AF6A11430A9F102E59B5C" + + "C44593D76E1A80D29932CF3A4F170F4516AD3666108BE1CE17FD74E266DE6B7E" + + "2F7DB1215D41CE515B615167083E8EF4A3A54607EC7D14A0839A58").HexToByteArray(); + + internal static byte[] RsaOaep2048_Sha256ParametersPfx = ( + "308209EE020103308209A806092A864886F70D010701A0820999048209953082" + + "09913082056606092A864886F70D010701A0820557048205533082054F308205" + + "4B060B2A864886F70D010C0A0102A08204FA308204F63028060A2A864886F70D" + + "010C0103301A0414E5DDB04EF6C37EC860C8F2CD89330E233C6732A402020400" + + "048204C8500596DD0681F7DAD596776609BB7B87D9D4163DB7FDDD4814771FC9" + + "F022BF51CAEDF359C2FE122ACE3409EEAFD0231AB4F935FFCE3ED94FAB187A72" + + "332AB58C59515412F10184AB793AD31A483BEB0D4D51757E9C069BFDF3803801" + + "95DCC13ECA7DC5F8F89E25DF0AE364A88B6621707352AF566C8E3342ACD4AB0D" + + "DF49651B755EF8837AE1690EF1FEB85AB3550EB618CE9FE74213F85806CF8A1A" + + "3575F994F4F6CBFAA81DBAFE07ADEBDBDD526054749219B1745C246E66CCBEA0" + + "2B8B00A68AF82BB2EBA9F57C58B0BD10D0CC646735928AE4AD5229192416658D" + + "BEA6B46E7C161E1ADC228478BE8DAB604988A41408D95D352B7270B837102784" + + "2C9FC6763770702AB4FA0F408CE67AA65650C8E399F311E32D7EA162304460AF" + + "5719B36D2064A6A00B41B264B26939158C261FED9E176E9BF7C29E66C54B9614" + + "0957315A65F04EE868B0A18018A763073C320E322C1AA9E767AA788B7B045626" + + "D1C51DE5BA8C74A82D4FB7892AA6E628BA874A79BBF17E6764BE4D600DE83673" + + "86A8D182E44E67EB74806606429420AD3A102821323A58718FA5CF45711AAE82" + + "072DEDE5122CA829D9B29DE4B6AECE54D5C1C3E6732A943926A658E8BBAEF062" + + "8128DDB63000F7958894F38167F80F1F7CB204C4EB7A7F34329E4D0D9DC5F75B" + + "7619AA40A7D7FFAEDA481BB0720E9705F1FEAA93B2A30DF3A1E5BA5BED5F15C6" + + "CD2B4E58EADF9C533F03FCEC1ACB4FEF64A11A190AAD270B33CB6E088AD6EF61" + + "C16757FE5B5907D7C7AD7B0306521703B2363D3CB8EB4C2D53FB6941DA9A05DE" + + "41854F18F8F7DADE6D615DEF8F8ADB3C94722B68EC811F4C26A59210005C89A1" + + "5D3B8D440BD859919E3D83427A7A758CD3F01E5050275F3131A25624AF2ABA7B" + + "98F38A0D5867EEC386F69A6B4A02FCD906D5DF1A70FADC0DEFF1421530395894" + + "84C99689821BF286FC9074C5C42AA31790947B0B5D86BC775F764EFF6E42A514" + + "603624FD8AF0DE2C1A76D9AE94807A69449B569979B1AA3FB5C9C33E12C9A6CC" + + "4B4E02C4FBCC8DEF3D3A176ADA3BC21615E01596AD45E2479929570BE4752C38" + + "CCEEBB5C1DAEDBB85E9529E5ED6A5D427B4ADF572C8F5BA75E538BEB3A8CE059" + + "3FA05AB3779912CA314CD2DC4B801D5FFAE7F0FDDACD71EE4483FDC32F0CBB62" + + "AE18D4DE521AD50EFD4E8D34586CE208D6CD74800A3FB0E869746D9D9F64129E" + + "9308C0AD94B4A788C9B0F9E689F9B7B132368C701D79308D716347BAB6F66219" + + "94B00B06A260B3F71B3477BFE363C4D2CFB26ECBD54B0D83F7F399A1A60ECE5F" + + "7DEA546ACD40F94F01DFBA2814F760BD9FFC36F7C04104D1897B6928745DFB53" + + "5F9B297EE6E0F1301402CE8413D2B4AF18024D356EFEA7444FA4ABA371F49706" + + "FE050E2697F8A57D917A18BA1049BC6CB4CD5BB0E60313C06259A792B18E086C" + + "47B7052D47BA524391F4B03BC33B175176E9E223C0ED55CCBAFB4C228BCFA862" + + "BD1A28D38AEF249B7CD6A5D54B27A31CBD48081D26DD4F8ACEB54519969E98F0" + + "E550B14F9BD123D0BC687B12FB5D4703AE971C6528435DEE49C8C919DF9FF27A" + + "B1C28944694890C3CAF085ED60CEB25B2F77B71EFDB0E4462C42A2D4ECB9BB80" + + "ED7E63724548295851BEC017A2FF662EED7DE5496C3A03B2E66722AB61437EFB" + + "D1FD01A1D38FCF8D7088E44FCDDB46B04C3ED8B1A5957B414952EDA21F134BAF" + + "B63DAFB9EA61D1E6C1B7FF07313E301706092A864886F70D010914310A1E0800" + + "74006500730074302306092A864886F70D01091531160414A818F5D36906905E" + + "2F6FA5BFF7829502427B9A573082042306092A864886F70D010706A082041430" + + "8204100201003082040906092A864886F70D0107013028060A2A864886F70D01" + + "0C0106301A04145D4F6CE75AFE72F271F5ABF7D4222AEC5F689C1E0202040080" + + "8203D086644BB639A1348939D6F67CA12354E69D27B92D36C6DBF62D6565B58A" + + "920992B8E5EB63078E73F4CA3FC66EAF9772FB35A7A6C514A9EEA4C84CDED3D5" + + "0D7CE9B5105D5D43273995E83BFDC2E30769007712FBF949B4B9DB584508AC25" + + "78ED447FB17B6D289601F1ACDDB5D5C9D511366F48E0B1A1D1F80F81957B0C71" + + "1BCD3DE8D2B7C166DEEE93994B9845D6719376F0DE335F8130B8AA0478837809" + + "D71BFC6430BCC4939C5E6329694E6E80097888007C80DD6733633470D5234728" + + "4C17257AD610BE367A7383C1AD98F4499C0ED644EC840FF119EEA82F9B910E2B" + + "53BC6C430D629696DA5AC7C24099E334A4DF8FB28B5A21CA05A72D3590307B5D" + + "D0B68C6F76BAD7EC14D4732F0BEAE723D111A2DC31AFA06E55E6837FB8706289" + + "45EBCF4B4AA6A6998E973BBA5EB853B3BEC95C81736149A8173ADCF319DB9CFB" + + "C10BFF450B9C026ABB4A5887DFDD6F5B8F19D6D59ED2CBD3113F867414E21647" + + "1E963878D7292B2749FABCC7982AB187A79BF74BD591D8523B4E2587C4714E94" + + "FFE21193A28DD72C4C947889674A7EE0305433FDE0572D8B69881491EF03D963" + + "9A0A9D8E65F234DF51428C662DAFDB68C7665DD917EBD1338AF36CA418B67632" + + "B4C057D96E400E571C31F7FF75291013E8D092648109E1366F378F86C4311678" + + "67932071DBEB100DF01F95E7B9262F06DC6393ADA419AB583AF78F94E7FB72D7" + + "C4AB90F52D94E309152F07C349625AD67D7B922990E82CF79436AFB5DA314DE5" + + "AF55FEF6E70442334E8574A7FAFBC5DA56A72E87ED56ABC84D6389BCBF0C54F0" + + "8AFC841522F41A90CA11B5597E0F822B20177FCD15B74AAF975601DCCD628C0F" + + "B33F5BA273D33CD8647CC681EA44F7DC452F2DC6750CA88E0D8FF1C2A9132D53" + + "62F1A57F87E778969B88ADA6D9F8AF1C404D4AB9730E44BFAAF7080481C8B066" + + "D4FC8B0C47AF90926D7A91C95C6FC5CAD275DBD65BD0835BE93DC30AD0ACC2A1" + + "942F29A8D28C20D0F1220C9AD981896BA50E99718CAC9D48963DEF98BEFDDDE0" + + "32FFD89374716F1946E922AF828533BCDBA7865DD50F190F526763D008B8F44F" + + "EEC22E7C90F86E24EEABAC404FE49AF49787A31FB7FC2AEAA04C114F64A4DC68" + + "ACEE48F7AF3939CED423A9664D25B906EDA43AC2EAE0E571B857199C9AAF4858" + + "F4DFE1F83BBB15D2889FA7B1EE3CE768445007F5949C2F353C3A405EE7842E4B" + + "6FC77F1A26042DD5D182C44A21AC6ACF1A43FC9498664A7A722E90AC297078E0" + + "633BFB83D85DAB26CD9462364FF161BF9CF194103F6D91A6D28B7284293FB55B" + + "3909151C85CFAEB5F5633E82D5364725EFA4CCFB7F62454399BEEDF1FDCD64A7" + + "788822C1BE1A53B5B4FBF60039AF86B12E1B1E303D3021300906052B0E03021A" + + "050004144E291DFD7C40F48494D521D4939815FF16938E220414732425C273E6" + + "923C8F31AED55ED4BA1110E70AEA02020400").HexToByteArray(); + + + internal static byte[] RsaOaep2048_NoParametersCert = ( + "308203263082020EA003020102021000D90B171E0AE0BB7FC73832CF72AB8530" + + "0D06092A864886F70D01010B050030173115301306035504030C0C436F6E746F" + + "736F20526F6F74301E170D3139303432313232313734315A170D323930343232" + + "3232313734315A30173115301306035504030C0C436F6E746F736F204C656166" + + "30820120300B06092A864886F70D0101070382010F003082010A0282010100D2" + + "12A4429CE6557322B0558BACB0DE8CABEC6FCA8E57C58125AFE1B91F9A79FA0E" + + "59CD6D580F139A80378DF000AC6837E303B0C873A31ECE01C604CED463160DDC" + + "8842447FB36C4013D3DF4039BF0C24DF522914AB6FE836E465114A80EF5C46D4" + + "6ED19222A7C92294BE39966D814A24A996E9618A055A24C7A5E4271BC6BBB7AF" + + "E29667CABDD4216CB286E8D95DEECA2AAC0D6E5D15B7BC6CA40BE80C0FED9830" + + "C8D933F871244BB69A61F8CC10BA1D6BB3402B8542D79BFCE2E9BD7D91D4E118" + + "F7E0181148EE8F6A665492B00E28F2A4F2481343A1BD063B86E11C67C74B0D49" + + "8DB0AD1B84A013D6E89184BEFDF87CA9DA2DE2C62FCCF056B48953C696AB4502" + + "03010001A370306E300C0603551D130101FF04023000300E0603551D0F0101FF" + + "040403020430304E0603551D2304473045801419AA399804F91ED61132ECCBAA" + + "F578543F46972DA11BA41930173115301306035504030C0C436F6E746F736F20" + + "526F6F74821000BEBBAC206CB54DF85376C2D4E0F19F300D06092A864886F70D" + + "01010B050003820101007522F8814F534DB7EA5D2A1DC9D0344D4C4877F291FB" + + "7C4DB42D172C431A9C81267F114D8E4197AD90854522E4D55D4B211C7367A5FE" + + "45478971642AC940A6D66FB6384AC437628B8679C2495FA35B3998B852DDF59B" + + "3944FB15577B3FBD9F104A823A92E09AD7CFACD886B363EADF2478056D5CCB97" + + "B233762DE31525E4FC6733E2CBDEBFC282E3F6B467BBD5932C89B92D0EA7A8DD" + + "5C44AFCAD2980C6A24B8DF83E743CDC2DA3BB9188D01C8C8F596BBA5ACFE2E7A" + + "21FE0F3D753D409AE08E34208C1AD07F70B73B97ED62DA6B8959232585BA5AAD" + + "6AFFDD7D7298CD80D42B50AA7DC6A317BB7B2FE9EE95AB1FC8E3C1B2392D5750" + + "45DC4D41362F8C83ABED").HexToByteArray(); + + internal static byte[] RsaOaep2048_NoParametersPfx = ( + "308209BE0201033082097806092A864886F70D010701A0820969048209653082" + + "09613082056606092A864886F70D010701A0820557048205533082054F308205" + + "4B060B2A864886F70D010C0A0102A08204FA308204F63028060A2A864886F70D" + + "010C0103301A0414993C8510854D2E0B2E6A93146230548B5EA6290602020400" + + "048204C8BF5DCE211704D21DAA9C8F855657C889DB6F5B29ADA8F9DF721A159A" + + "A3CB9899904C80B382EEC08767A6C7AA2B3FFFA13F41BF5FC8205DC70EE9F4B0" + + "49D270D48EBD290157267DA0393F2746032B9D6F6C7594FD3495DFA6FE4D0D84" + + "DF9E8091620DA4219BA65031CFCFF3F0024DEF64E47681806FEC30B625DBA88B" + + "823B7120835E8DAAAA8A8E110B9DBA537426C50099B7824AF3451EFC406AAB22" + + "C5B3698CE2A73C222392960699BA3F3AEE9F089C299DF80D720489424596D1B1" + + "8538AC963F9C0E545ED6DDAD79DA3D401CAD32D5F88A1025E8491D76AB3ADD3B" + + "36500B8DC4D3FE6F5E5A1819AA767C5BE7344C985821D88CAFE9914F6388C0E1" + + "E715F4A1B7BA67A4687697FF8632756101C70CFE6ECD4711F1DF8694D1A7DAB1" + + "6998C6D96BEF5DEAD2FB97E36B39ECF794DCD057544878FA55135F71ADAFE8BB" + + "A0249C3208E6B56E310767984F9E405389F54732CD6FCF9B2650E1ADA2B2AB1E" + + "298C549D09050A2C004F1D4F491070FC9B115B06EE2AE30939A836E38CF1FA3C" + + "6B39373E61AA64F030E772F78A49C6CE6762A2B3F1D771B1FE17669906E26042" + + "54158DB5D4B5E8965D267B99008FCB36A9B2A3EA83E534DC255BF1B0C79EDBA9" + + "86623FDC395A59A2D95EB0A7E1D67899ED84F7F832B2775E4DA9ECBA63253E65" + + "7E509442E4A794E93E2A24D1672939D69EDCA784684781A5B40A98F5E6E61F0B" + + "72918E04847070C5C1E46E9156A3E25849B2F701E8B11FAE6A9C949DFD70F106" + + "9751D120A93B6BBF8C14A7419E470479C32FCC3824CB3F56A1F93F0EEAC3A402" + + "26CDBA64FACCCBA3E09888B920ABCB9E18D8F1E673C3D3B6475C1E406221571E" + + "C92FFBCCB2FE9F110410196FEBC905C6926D25E717ACA85EC10B456F02B11561" + + "467B152A74BD263F26C636FEF093D03AA8FD880E68692B3808C6BA7152A16A50" + + "E82000A04760C86756FF0EA382EDA8571AD0181F98EC110B278493512F052B2B" + + "95E0CF3798A9A54C688661746DAE65603BD43F990CEB0D0CB53DA780494E59F1" + + "608E5B0C150C044CDE74870225A2F932D69D27ECDDC5EC3818D043ED363F27E8" + + "F55D9B9396E439B8A3154B4E7F2BE160615220FA327253EFDEC5F19B6D51E0B9" + + "1E513D17A6277066C866E59123019025994ECA8BAE4CDDD4021E2497A8C62DBF" + + "A22711832CCFE68824D0D410933DCEB1A15AE4ABEA523D18E8417A161A508796" + + "CDB9B746A97EF90A1E0597C82B148DDE0572A1AFE212670509FB4CC3FB6ED3D4" + + "A85372B85EAD17EBE704D97B976D4D157F58DD5D6E3EA8C307CEC87B936E4950" + + "BB136131001E937184B5973D4038DCE98C15E68C0951286AA8D676913A67F3EB" + + "1291F96326EC0B8A0B4DB8DBD9E11390B0AF1772B247A3ABE572367B8A4B6FC0" + + "36AF30130DA7D148540BD294438509CD879AAC3F62357C52914F58AD2B1BCF3F" + + "0DF373314423F64B3687D692BDFE595F478BC6D879F4DBA572063B8648EB59D6" + + "DF4B1BB6BD01B1B077195CAA63DD2C927850A0AF54A8711A929EA899716B8928" + + "CB9E559AA4C89B06D3C8A9FB2C64F9A61763A532FBA9CD03F6A750560893B3D0" + + "F32605C0C9D260FA5DF10EA9498A19FD1BA8C35FF988959CB76CB178DB3AE544" + + "2AA3DFCAAF79595A85D8EA3BDC860A06A1176D95EF72E66898E06D3357CC434C" + + "A2F46E9B57C5FDEBDD23B23186D9DF280FC05B326013FD96F44BD56E54B90A59" + + "AA21865A576FE43C14DCD8DB313E301706092A864886F70D010914310A1E0800" + + "74006500730074302306092A864886F70D01091531160414C8FCFD94B774494D" + + "0B5A9187550D9562468B86C8308203F306092A864886F70D010706A08203E430" + + "8203E0020100308203D906092A864886F70D0107013028060A2A864886F70D01" + + "0C0106301A041495480C3C3F897F0F2763D2A8A89AF4F546485E800202040080" + + "8203A0C9D6ACAC66EEE46EA9B5A3188623408790361FFEE1BBD67D1CEC14A22E" + + "9F90D6F65CEADE7B1A25313ADAB523FFFC47FB41A953C8E4414E834FB51CEB1C" + + "853F6FEC9FDCA5CED07BB8DD695D728DE4CC2B2EE40F243D4CDB6A20E7EDDC2B" + + "32B1A570A9EC50360D5864774F0C04501FCEB9BFBAA3B76CD3855DAE042D3FDC" + + "884F6673F77AFBFC9FD1344854E3E26996E6493C8C39C86077FD998B066E56B7" + + "3F3CE9175CA6369780D92EA4F8DE7BE7918670B6BA044DCF5C39BAF85FC305B8" + + "16541B335A6D528945DE6047ED8A30AC1B1292CD3E2050F5665E9DBA4816E053" + + "6E45EB3C2D271C1D4FE4C44502E298B9958351EC282DD218701A7B06E85FC7FC" + + "58EA1C69FC89326D1936A5E485DEF9DB036C76CA1BFB1E9C2EF926E0076BADC6" + + "6164905F62CAD6AD8042C269F91AFF5508E3DB16CFDD966D8A88A03F446AEBBC" + + "A56A17E525770A51D2595E7605DB4864FEE301B0376C91B416327C635FBEE114" + + "3F0D686FBF77758831F4FC1984E9274D2D4C463A4EDE3864DB1825DAF10C3FAB" + + "BDAAC3A0127226356DF027C91D01210F9D1E2449A25C73A882BDAC43936EC224" + + "4CA0CF84097BE8381014564B64F012739F97B91AAD04AFEA1C7BFCCAD998A693" + + "8204DA560F510B1EA3E4B99908F25058DCFB0032C51E6DDD7D6BB4A459833B5A" + + "5295F727B7A306A9DD43A537242F527BCEDC633BE50A5699F4AC39E1DBE54867" + + "654BC85E5FD43594FE00F1F86651E43C4D9BE7F86ADFD862BAD7801D68D124DB" + + "4A90CB71DF4AF601A05E65D5F4D48B21F1E5151AAAFE899434E5DE503D217867" + + "73F7DC27AC46B35E02AF1102BD39285E8DBA07E425947D2100DAA3A6CB263F18" + + "32AFE5BC659A28C67DF8572BE6360825BBC837BEDA8B87EE10A38C3682FC1C2C" + + "2ABFDD0AA11C4DA433B9AB1927F9B1955814EE044BCC095BDE4BAB05C245E211" + + "7FCD5FB503CBC918B48E6D7F2E4D12693B01D8969956E92AC49E54A63879F113" + + "52D8EFA103CE559D071F430067B05FBF68B5DC54FD25BE68CA054170E777B575" + + "E4355674DB504F9480AA7ADDAEB2295C964689561ED6A909F5C279E6F1EF1CAE" + + "94202A9073B1CDC5746E7EC47D60B927C661E39E305051CC77CE54EDF4F199DF" + + "7C67596A9264F6AA7D6AFE955116BC100117E41F361A2C9F1DA8073B8D184037" + + "EC9E23DF5F346E16D2B7F713FCE053CD815E783D13EA8CDEF7ACD014BB4B1D3E" + + "EC46C75DD09C005ADA5F8DBEAC2B47D5B77F31A967B419FA57A61C661CD10903" + + "D8CEBD9820ABEA3089F4387471FBEC87596FD036CC448F37B775538AE72C5AF1" + + "9502F3303D3021300906052B0E03021A0500041484BFCFD2BED79AAAAD26AFCC" + + "CC8F76FB6FD9D40804143A666EE41B085688C62A85EC7964C0FACF0512DF0202" + + "0400").HexToByteArray(); } } } diff --git a/src/System.Security.Cryptography.Pkcs/tests/EnvelopedCms/GeneralTests.cs b/src/System.Security.Cryptography.Pkcs/tests/EnvelopedCms/GeneralTests.cs index 56b1215d8d21..4f6bd83f4857 100644 --- a/src/System.Security.Cryptography.Pkcs/tests/EnvelopedCms/GeneralTests.cs +++ b/src/System.Security.Cryptography.Pkcs/tests/EnvelopedCms/GeneralTests.cs @@ -16,6 +16,7 @@ namespace System.Security.Cryptography.Pkcs.EnvelopedCmsTests.Tests public static partial class GeneralTests { public static bool SupportsDiffieHellman { get; } = KeyAgreeRecipientInfoTests.SupportsDiffieHellman; + public static bool SupportsRsaOaepCerts => PlatformDetection.IsWindows; [Fact] public static void DecodeVersion0_RoundTrip() @@ -286,6 +287,40 @@ public static void RoundTrip_ExplicitSki() Assert.Equal(contentInfo.Content, ecms.ContentInfo.Content); } + [ConditionalFact(nameof(SupportsRsaOaepCerts))] + [OuterLoop(/* Leaks key on disk if interrupted */)] + public static void RsaOaepCertificate_NullParameters_Throws() + { + ContentInfo contentInfo = new ContentInfo(new byte[] { 1, 2, 3 }); + EnvelopedCms ecms = new EnvelopedCms(contentInfo); + using (X509Certificate2 cert = Certificates.RsaOaep2048_NullParameters.GetCertificate()) + { + CmsRecipient recipient = new CmsRecipient(cert); + Assert.ThrowsAny(() => ecms.Encrypt(recipient)); + } + } + + [ConditionalFact(nameof(SupportsRsaOaepCerts))] + [OuterLoop(/* Leaks key on disk if interrupted */)] + public static void RoundTrip_RsaOaepCertificate_Sha1KeyParameters() + { + Assert_Certificate_Roundtrip(Certificates.RsaOaep2048_Sha1Parameters); + } + + [ConditionalFact(nameof(SupportsRsaOaepCerts))] + [OuterLoop(/* Leaks key on disk if interrupted */)] + public static void RoundTrip_RsaOaepCertificate_Sha256KeyParameters() + { + Assert_Certificate_Roundtrip(Certificates.RsaOaep2048_Sha256Parameters); + } + + [ConditionalFact(nameof(SupportsRsaOaepCerts))] + [OuterLoop(/* Leaks key on disk if interrupted */)] + public static void RoundTrip_RsaOaepCertificate_NoParameters() + { + Assert_Certificate_Roundtrip(Certificates.RsaOaep2048_NoParameters); + } + [Fact] public static void Encrypt_Data_DoesNotIncreaseInSize() { @@ -338,6 +373,32 @@ public static void FromManagedPal_CompatWithOctetStringWrappedContents_Decrypt() Assert.Equal(expectedContent, ecms.ContentInfo.Content); } + private static void Assert_Certificate_Roundtrip(CertLoader certificateLoader) + { + ContentInfo contentInfo = new ContentInfo(new byte[] { 1, 2, 3 }); + EnvelopedCms ecms = new EnvelopedCms(contentInfo); + using (X509Certificate2 cert = certificateLoader.GetCertificate()) + { + CmsRecipient recipient = new CmsRecipient(cert); + ecms.Encrypt(recipient); + } + + byte[] encodedMessage = ecms.Encode(); + + ecms = new EnvelopedCms(); + ecms.Decode(encodedMessage); + + using (X509Certificate2 privateCert = certificateLoader.TryGetCertificateWithPrivateKey()) + { + if (privateCert == null) + return; // CertLoader can't load the private certificate. + + ecms.Decrypt(new X509Certificate2Collection(privateCert)); + } + Assert.Equal(contentInfo.ContentType.Value, ecms.ContentInfo.ContentType.Value); + Assert.Equal(contentInfo.Content, ecms.ContentInfo.Content); + } + private static X509Certificate2[] s_certs = { Certificates.RSAKeyTransfer1.GetCertificate(), diff --git a/src/System.Security.Cryptography.Pkcs/tests/EnvelopedCms/KeyTransRecipientInfoRsaOaepCertTests.cs b/src/System.Security.Cryptography.Pkcs/tests/EnvelopedCms/KeyTransRecipientInfoRsaOaepCertTests.cs new file mode 100644 index 000000000000..9d00ba03da88 --- /dev/null +++ b/src/System.Security.Cryptography.Pkcs/tests/EnvelopedCms/KeyTransRecipientInfoRsaOaepCertTests.cs @@ -0,0 +1,76 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Security.Cryptography.X509Certificates; +using Xunit; + +using System.Security.Cryptography.Pkcs.Tests; + +namespace System.Security.Cryptography.Pkcs.EnvelopedCmsTests.Tests +{ + public static partial class KeyTransRecipientInfoRsaOaepCertTests + { + public static bool SupportsRsaOaepCerts => PlatformDetection.IsWindows; + public static bool DoesNotSupportRsaOaepCerts => !SupportsRsaOaepCerts; + + [ConditionalFact(nameof(SupportsRsaOaepCerts))] + public static void TestKeyTransEncryptKey_RsaOaepCertificate_NoParameters_DefaultToSha1() + { + ContentInfo contentInfo = new ContentInfo(new byte[] { 1, 2, 3 }); + EnvelopedCms ecms = new EnvelopedCms(contentInfo); + using (X509Certificate2 cert = Certificates.RsaOaep2048_NoParameters.GetCertificate()) + { + CmsRecipient cmsRecipient = new CmsRecipient(cert); + ecms.Encrypt(cmsRecipient); + } + byte[] encodedMessage = ecms.Encode(); + + EnvelopedCms ecms2 = new EnvelopedCms(); + ecms2.Decode(encodedMessage); + + RecipientInfoCollection recipients = ecms2.RecipientInfos; + Assert.Equal(1, recipients.Count); + KeyTransRecipientInfo recipient = Assert.IsType(recipients[0]); + Assert.Equal(Oids.RsaOaep, recipient.KeyEncryptionAlgorithm.Oid.Value); + Assert.Equal(s_rsaOaepSha1Parameters, recipient.KeyEncryptionAlgorithm.Parameters); + } + + [ConditionalFact(nameof(SupportsRsaOaepCerts))] + public static void TestKeyTransEncryptKey_RsaOaepCertificate_Sha256Parameters() + { + ContentInfo contentInfo = new ContentInfo(new byte[] { 1, 2, 3 }); + EnvelopedCms ecms = new EnvelopedCms(contentInfo); + using (X509Certificate2 cert = Certificates.RsaOaep2048_Sha256Parameters.GetCertificate()) + { + CmsRecipient cmsRecipient = new CmsRecipient(cert); + ecms.Encrypt(cmsRecipient); + } + byte[] encodedMessage = ecms.Encode(); + + EnvelopedCms ecms2 = new EnvelopedCms(); + ecms2.Decode(encodedMessage); + + RecipientInfoCollection recipients = ecms2.RecipientInfos; + Assert.Equal(1, recipients.Count); + KeyTransRecipientInfo recipient = Assert.IsType(recipients[0]); + Assert.Equal(Oids.RsaOaep, recipient.KeyEncryptionAlgorithm.Oid.Value); + Assert.Equal(s_rsaOaepSha256Parameters, recipient.KeyEncryptionAlgorithm.Parameters); + } + + [ConditionalFact(nameof(DoesNotSupportRsaOaepCerts))] + public static void TestKeyTransEncryptKey_RsaOaepCertificate_NoPlatformSupport_Throws() + { + ContentInfo contentInfo = new ContentInfo(new byte[] { 1, 2, 3 }); + EnvelopedCms ecms = new EnvelopedCms(contentInfo); + using (X509Certificate2 cert = Certificates.RsaOaep2048_NoParameters.GetCertificate()) + { + CmsRecipient cmsRecipient = new CmsRecipient(cert); + Assert.Throws(() => ecms.Encrypt(cmsRecipient)); + } + } + + private static readonly byte[] s_rsaOaepSha1Parameters = { 0x30, 0x00 }; + private static readonly byte[] s_rsaOaepSha256Parameters = { 0x30, 0x2f, 0xa0, 0x0f, 0x30, 0x0d, 0x06, 0x09, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x01, 0x05, 0x00, 0xa1, 0x1c, 0x30, 0x1a, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x08, 0x30, 0x0d, 0x06, 0x09, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x01, 0x05, 0x00 }; + } +} diff --git a/src/System.Security.Cryptography.Pkcs/tests/EnvelopedCms/KeyTransRecipientInfoRsaPaddingModeTests.cs b/src/System.Security.Cryptography.Pkcs/tests/EnvelopedCms/KeyTransRecipientInfoRsaPaddingModeTests.cs index c8b1d983e839..a78a8bc59a86 100644 --- a/src/System.Security.Cryptography.Pkcs/tests/EnvelopedCms/KeyTransRecipientInfoRsaPaddingModeTests.cs +++ b/src/System.Security.Cryptography.Pkcs/tests/EnvelopedCms/KeyTransRecipientInfoRsaPaddingModeTests.cs @@ -7,26 +7,37 @@ using Xunit; using System.Security.Cryptography.Pkcs.Tests; +using Test.Cryptography; namespace System.Security.Cryptography.Pkcs.EnvelopedCmsTests.Tests { public static partial class KeyTransRecipientInfoRsaPaddingModeTests { + public static bool SupportsRsaOaepCerts => PlatformDetection.IsWindows; + [Theory] [MemberData(nameof(TestKeyTransEncryptedKey_RsaAlgorithmTypes))] public static void TestKeyTransEncryptedKey_RsaAlgorithms(RSAEncryptionPadding encryptionPadding, string expectedOid, byte[] expectedParameters) { - KeyTransRecipientInfo recipientInfo1 = EncodeKeyTransl_Rsa2048(encryptionPadding); + KeyTransRecipientInfo recipientInfo1 = EncodeKeyTransl_Rsa2048(encryptionPadding, Certificates.RSA2048Sha256KeyTransfer1); Assert.Equal(expectedOid, recipientInfo1.KeyEncryptionAlgorithm.Oid.Value); Assert.Equal(expectedParameters, recipientInfo1.KeyEncryptionAlgorithm.Parameters); } + [ConditionalFact(nameof(SupportsRsaOaepCerts))] + public static void TestKeyTransEncryptedKey_RsaAlgorithms_Recipient_PreferredOverCertificate() + { + KeyTransRecipientInfo recipientInfo1 = EncodeKeyTransl_Rsa2048(RSAEncryptionPadding.OaepSHA256, Certificates.RsaOaep2048_Sha1Parameters); + Assert.Equal(Oids.RsaOaep, recipientInfo1.KeyEncryptionAlgorithm.Oid.Value); + Assert.Equal(s_rsaOaepSha256Parameters, recipientInfo1.KeyEncryptionAlgorithm.Parameters); + } + [Fact] public static void TestKeyTransEncryptedKey_RsaOaepMd5_Throws() { RSAEncryptionPadding oaepMd5Padding = RSAEncryptionPadding.CreateOaep(HashAlgorithmName.MD5); Assert.ThrowsAny(() => { - EncodeKeyTransl_Rsa2048(oaepMd5Padding); + EncodeKeyTransl_Rsa2048(oaepMd5Padding, Certificates.RSA2048Sha256KeyTransfer1); }); } @@ -43,20 +54,20 @@ public static IEnumerable TestKeyTransEncryptedKey_RsaAlgorithmTypes } } - private static KeyTransRecipientInfo EncodeKeyTransl_Rsa2048(RSAEncryptionPadding encryptionPadding, SubjectIdentifierType type = SubjectIdentifierType.IssuerAndSerialNumber) + private static KeyTransRecipientInfo EncodeKeyTransl_Rsa2048(RSAEncryptionPadding encryptionPadding, CertLoader loader) { ContentInfo contentInfo = new ContentInfo(new byte[] { 1, 2, 3 }); EnvelopedCms ecms = new EnvelopedCms(contentInfo); - using (X509Certificate2 cert = Certificates.RSA2048Sha256KeyTransfer1.GetCertificate()) + using (X509Certificate2 cert = loader.GetCertificate()) { CmsRecipient cmsRecipient; if (encryptionPadding is null) { - cmsRecipient = new CmsRecipient(type, cert); + cmsRecipient = new CmsRecipient(cert); } else { - cmsRecipient = new CmsRecipient(type, cert, encryptionPadding); + cmsRecipient = new CmsRecipient(cert, encryptionPadding); } ecms.Encrypt(cmsRecipient); diff --git a/src/System.Security.Cryptography.Pkcs/tests/System.Security.Cryptography.Pkcs.Tests.csproj b/src/System.Security.Cryptography.Pkcs/tests/System.Security.Cryptography.Pkcs.Tests.csproj index 38eb061afa11..395e860a27ed 100644 --- a/src/System.Security.Cryptography.Pkcs/tests/System.Security.Cryptography.Pkcs.Tests.csproj +++ b/src/System.Security.Cryptography.Pkcs/tests/System.Security.Cryptography.Pkcs.Tests.csproj @@ -63,7 +63,10 @@ + + + - \ No newline at end of file + From 421bcd0ca9565ad74ef4259f74424da2229bc9e3 Mon Sep 17 00:00:00 2001 From: Charles Stoner Date: Fri, 3 May 2019 12:41:33 -0700 Subject: [PATCH 197/607] Port AssemblyInfo, ConsoleApplicationBase.CommandLineArgs, ComputerInfo.*Memory (#37413) --- .../ref/Microsoft.VisualBasic.Core.cs | 34 +- .../src/Microsoft.VisualBasic.Core.vbproj | 2 + .../ApplicationServices/ApplicationBase.vb | 20 ++ .../ApplicationServices/AssemblyInfo.vb | 291 ++++++++++++++++++ .../ConsoleApplicationBase.vb | 81 +++++ .../VisualBasic/Devices/ComputerInfo.vb | 171 ++++++++++ .../VisualBasic/Helpers/NativeMethods.vb | 43 ++- .../VisualBasic/Helpers/NativeTypes.vb | 24 -- .../Microsoft.VisualBasic.Core.Tests.csproj | 2 + .../ApplicationBaseTests.cs | 10 + .../ApplicationServices/AssemblyInfoTests.cs | 78 +++++ .../ConsoleApplicationBaseTests.cs | 21 ++ .../VisualBasic/Devices/ComputerInfoTests.cs | 20 ++ 13 files changed, 771 insertions(+), 26 deletions(-) create mode 100644 src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/ApplicationServices/AssemblyInfo.vb create mode 100644 src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/ApplicationServices/ConsoleApplicationBase.vb create mode 100644 src/Microsoft.VisualBasic.Core/tests/Microsoft/VisualBasic/ApplicationServices/AssemblyInfoTests.cs create mode 100644 src/Microsoft.VisualBasic.Core/tests/Microsoft/VisualBasic/ApplicationServices/ConsoleApplicationBaseTests.cs diff --git a/src/Microsoft.VisualBasic.Core/ref/Microsoft.VisualBasic.Core.cs b/src/Microsoft.VisualBasic.Core/ref/Microsoft.VisualBasic.Core.cs index 2a92c08715ac..1b62f90fb88e 100644 --- a/src/Microsoft.VisualBasic.Core/ref/Microsoft.VisualBasic.Core.cs +++ b/src/Microsoft.VisualBasic.Core/ref/Microsoft.VisualBasic.Core.cs @@ -681,8 +681,32 @@ public ApplicationBase() { } public void ChangeCulture(string cultureName) { throw null; } public void ChangeUICulture(string cultureName) { throw null; } public System.Globalization.CultureInfo Culture { get { throw null; } } - public System.Globalization.CultureInfo UICulture { get { throw null; } } public string GetEnvironmentVariable(string name) { throw null; } + public AssemblyInfo Info { get { throw null; } } + public System.Globalization.CultureInfo UICulture { get { throw null; } } + } + public class AssemblyInfo + { + public AssemblyInfo(System.Reflection.Assembly currentAssembly) { } + public string AssemblyName { get { throw null; } } + public string CompanyName { get { throw null; } } + public string Copyright { get { throw null; } } + public string Description { get { throw null; } } + public string DirectoryPath { get { throw null; } } + public System.Collections.ObjectModel.ReadOnlyCollection LoadedAssemblies { get { throw null; } } + public string ProductName { get { throw null; } } + public string StackTrace { get { throw null; } } + public string Title { get { throw null; } } + public string Trademark { get { throw null; } } + public System.Version Version { get { throw null; } } + public long WorkingSet { get { throw null; } } + } + public class ConsoleApplicationBase : ApplicationBase + { + public ConsoleApplicationBase() { } + public System.Collections.ObjectModel.ReadOnlyCollection CommandLineArgs { get { throw null; } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] + protected System.Collections.ObjectModel.ReadOnlyCollection InternalCommandLine { set { } } } public partial class StartupEventArgs : System.ComponentModel.CancelEventArgs { @@ -1134,9 +1158,17 @@ public Computer() { } public partial class ComputerInfo { public ComputerInfo() { } + [System.CLSCompliant(false)] + public ulong AvailablePhysicalMemory { get { throw null; } } + [System.CLSCompliant(false)] + public ulong AvailableVirtualMemory { get { throw null; } } public System.Globalization.CultureInfo InstalledUICulture { get { throw null; } } public string OSPlatform { get { throw null; } } public string OSVersion { get { throw null; } } + [System.CLSCompliant(false)] + public ulong TotalPhysicalMemory { get { throw null; } } + [System.CLSCompliant(false)] + public ulong TotalVirtualMemory { get { throw null; } } } public partial class Keyboard { diff --git a/src/Microsoft.VisualBasic.Core/src/Microsoft.VisualBasic.Core.vbproj b/src/Microsoft.VisualBasic.Core/src/Microsoft.VisualBasic.Core.vbproj index 4efe9860a2fa..b8d0de8ac04e 100644 --- a/src/Microsoft.VisualBasic.Core/src/Microsoft.VisualBasic.Core.vbproj +++ b/src/Microsoft.VisualBasic.Core/src/Microsoft.VisualBasic.Core.vbproj @@ -31,6 +31,8 @@ + + diff --git a/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/ApplicationServices/ApplicationBase.vb b/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/ApplicationServices/ApplicationBase.vb index b91fca668c7d..7e22ff26bfe3 100644 --- a/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/ApplicationServices/ApplicationBase.vb +++ b/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/ApplicationServices/ApplicationBase.vb @@ -46,6 +46,25 @@ Namespace Microsoft.VisualBasic.ApplicationServices Return VariableValue End Function + '''************************************************************************** + ''' ;Info + ''' + ''' Returns the info about the application. If we are executing in a DLL, we still return the info + ''' about the application, not the DLL. + ''' + Public ReadOnly Property Info() As AssemblyInfo + Get + If m_Info Is Nothing Then + Dim Assembly As System.Reflection.Assembly = System.Reflection.Assembly.GetEntryAssembly() + If Assembly Is Nothing Then 'It can be nothing if we are an add-in or a dll on the web + Assembly = System.Reflection.Assembly.GetCallingAssembly() + End If + m_Info = New AssemblyInfo(Assembly) + End If + Return m_Info + End Get + End Property + '********************************************************************** ';Culture ' @@ -115,5 +134,6 @@ Namespace Microsoft.VisualBasic.ApplicationServices '= PRIVATE ========================================================== + Private m_Info As AssemblyInfo ' The executing application (the EntryAssembly) End Class 'ApplicationBase End Namespace diff --git a/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/ApplicationServices/AssemblyInfo.vb b/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/ApplicationServices/AssemblyInfo.vb new file mode 100644 index 000000000000..552801b9fc58 --- /dev/null +++ b/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/ApplicationServices/AssemblyInfo.vb @@ -0,0 +1,291 @@ +' Licensed to the .NET Foundation under one or more agreements. +' The .NET Foundation licenses this file to you under the MIT license. +' See the LICENSE file in the project root for more information. + +Option Strict On +Option Explicit On + +Imports System +Imports System.Reflection +Imports System.Diagnostics +Imports System.Collections.ObjectModel +Imports Microsoft.VisualBasic.CompilerServices.ExceptionUtils + +Namespace Microsoft.VisualBasic.ApplicationServices + + '''************************************************************************** + ''' ;AssemblyInfo + ''' + ''' A class that contains the information about an Application. This information can be + ''' specified using the assembly attributes (contained in AssemblyInfo.vb file in case of + ''' a VB project in Visual Studio .NET). + ''' + ''' This class is based on the FileVersionInfo class of the framework, but + ''' reduced to a number of relevant properties. + Public Class AssemblyInfo + + '= PUBLIC ============================================================= + + '''************************************************************************** + ''' ;New + ''' + ''' Create an AssemblyInfo from an assembly + ''' + ''' The assembly for which we want to obtain the information. + Public Sub New(ByVal currentAssembly As System.Reflection.Assembly) + If currentAssembly Is Nothing Then + Throw GetArgumentNullException("CurrentAssembly") + End If + m_Assembly = currentAssembly + End Sub + + ' NOTE: All properties below work in Low Trust Zone. + + '''************************************************************************** + ''' ;Description + ''' + ''' Get the description associated with the assembly. + ''' + ''' A String containing the AssemblyDescriptionAttribute associated with the assembly. + ''' if the AssemblyDescriptionAttribute is not defined. + Public ReadOnly Property Description() As String + Get + If m_Description Is Nothing Then + Dim Attribute As AssemblyDescriptionAttribute = + CType(GetAttribute(GetType(AssemblyDescriptionAttribute)), AssemblyDescriptionAttribute) + If Attribute Is Nothing Then + m_Description = "" + Else + m_Description = Attribute.Description + End If + End If + Return m_Description + End Get + End Property + + '''************************************************************************** + ''' ;CompanyName + ''' + ''' Get the company name associated with the assembly. + ''' + ''' A String containing the AssemblyCompanyAttribute associated with the assembly. + ''' if the AssemblyCompanyAttribute is not defined. + Public ReadOnly Property CompanyName() As String + Get + If m_CompanyName Is Nothing Then + Dim Attribute As AssemblyCompanyAttribute = + CType(GetAttribute(GetType(AssemblyCompanyAttribute)), AssemblyCompanyAttribute) + If Attribute Is Nothing Then + m_CompanyName = "" + Else + m_CompanyName = Attribute.Company + End If + End If + Return m_CompanyName + End Get + End Property + + '''************************************************************************** + ''' ;Title + ''' + ''' Get the title associated with the assembly. + ''' + ''' A String containing the AssemblyTitleAttribute associated with the assembly. + ''' if the AssemblyTitleAttribute is not defined. + Public ReadOnly Property Title() As String + Get + If m_Title Is Nothing Then + Dim Attribute As AssemblyTitleAttribute = + CType(GetAttribute(GetType(AssemblyTitleAttribute)), AssemblyTitleAttribute) + If Attribute Is Nothing Then + m_Title = "" + Else + m_Title = Attribute.Title + End If + End If + Return m_Title + End Get + End Property + + '''************************************************************************** + ''' ;Copyright + ''' + ''' Get the copyright notices associated with the assembly. + ''' + ''' A String containing the AssemblyCopyrightAttribute associated with the assembly. + ''' if the AssemblyCopyrightAttribute is not defined. + Public ReadOnly Property Copyright() As String + Get + If m_Copyright Is Nothing Then + Dim Attribute As AssemblyCopyrightAttribute = CType(GetAttribute(GetType(AssemblyCopyrightAttribute)), AssemblyCopyrightAttribute) + If Attribute Is Nothing Then + m_Copyright = "" + Else + m_Copyright = Attribute.Copyright + End If + End If + Return m_Copyright + End Get + End Property + + '''************************************************************************** + ''' ;Trademark + ''' + ''' Get the trademark notices associated with the assembly. + ''' + ''' A String containing the AssemblyTrademarkAttribute associated with the assembly. + ''' if the AssemblyTrademarkAttribute is not defined. + Public ReadOnly Property Trademark() As String + Get + If m_Trademark Is Nothing Then + Dim Attribute As AssemblyTrademarkAttribute = CType(GetAttribute(GetType(AssemblyTrademarkAttribute)), AssemblyTrademarkAttribute) + If Attribute Is Nothing Then + m_Trademark = "" + Else + m_Trademark = Attribute.Trademark + End If + End If + Return m_Trademark + End Get + End Property + + '''************************************************************************** + ''' ;ProductName + ''' + ''' Get the product name associated with the assembly. + ''' + ''' A String containing the AssemblyProductAttribute associated with the assembly. + ''' if the AssemblyProductAttribute is not defined. + Public ReadOnly Property ProductName() As String + Get + If m_ProductName Is Nothing Then + Dim Attribute As AssemblyProductAttribute = CType(GetAttribute(GetType(AssemblyProductAttribute)), AssemblyProductAttribute) + If Attribute Is Nothing Then + m_ProductName = "" + Else + m_ProductName = Attribute.Product + End If + End If + Return m_ProductName + End Get + End Property + + '''************************************************************************** + ''' ;Version + ''' + ''' Get the version number of the assembly. + ''' + ''' A System.Version class containing the version number of the assembly + ''' Cannot use AssemblyVersionAttribute since it always return Nothing. + Public ReadOnly Property Version() As System.Version + Get + Return m_Assembly.GetName().Version + End Get + End Property + + '''************************************************************************** + ''' ;AssemblyName + ''' + ''' Get the name of the file containing the manifest (usually the .exe file). + ''' + ''' A String containing the file name. + Public ReadOnly Property AssemblyName() As String + Get + Return m_Assembly.GetName.Name + End Get + End Property + + '''************************************************************************** + ''' ;DirectoryPath + ''' + ''' Gets the directory where the assembly lives. + ''' + ''' + ''' If you are calling this from an EXE, gives you the directory path of the exe assembly. If you + ''' call this from a DLL, it gives you the directory path of the DLL assembly + Public ReadOnly Property DirectoryPath() As String + Get + Return IO.Path.GetDirectoryName(m_Assembly.Location) + End Get + End Property + + '''****************************************************************************** + ''' ;LoadedAssemblies + ''' + ''' Returns the names of all assemblies loaded by the current application. + ''' + ''' A ReadOnlyCollection(Of Assembly) containing all the loaded assemblies. + ''' attempt on an unloaded application domain. + Public ReadOnly Property LoadedAssemblies() As ReadOnlyCollection(Of Reflection.Assembly) + Get + Dim Result As New Collection(Of Reflection.Assembly) + For Each Assembly As Reflection.Assembly In AppDomain.CurrentDomain.GetAssemblies() + Result.Add(Assembly) + Next + Return New ReadOnlyCollection(Of Reflection.Assembly)(Result) + End Get + End Property + + '''****************************************************************************** + ''' ;StackTrace + ''' + ''' Returns the current stack trace information. + ''' + ''' A string containing stack trace information. Value can be String.Empty. + ''' The requested stack trace information is out of range. + Public ReadOnly Property StackTrace() As String + Get + Return Environment.StackTrace + End Get + End Property + + '''****************************************************************************** + ''' ;WorkingSet + ''' + ''' Gets the amount of physical memory mapped to the process context. + ''' + ''' + ''' A 64-bit signed integer containing the size of physical memory mapped to the process context, in bytes. + ''' + Public ReadOnly Property WorkingSet() As Long + Get + Return Environment.WorkingSet + End Get + End Property + + + '= PRIVATE ============================================================ + + '''************************************************************************** + ''' ;GetAttribute + ''' + ''' Get an attribute from the assembly and throw exception if the attribute does not exist. + ''' + ''' The type of the required attribute. + ''' The attribute with the given type gotten from the assembly, or Nothing. + Private Function GetAttribute(ByVal AttributeType As Type) As Object + + Debug.Assert(m_Assembly IsNot Nothing, "Null m_Assembly") + + Dim Attributes() As Object = m_Assembly.GetCustomAttributes(AttributeType, inherit:=True) + + If Attributes.Length = 0 Then + Return Nothing + Else + Return Attributes(0) + End If + End Function + + ' Private fields. + Private m_Assembly As Assembly ' The assembly with the information. + + ' Since these properties will not change during run time, they're cached. + ' "" is not Nothing so use Nothing to mark an un-accessed property. + Private m_Description As String = Nothing ' Cache the assembly's description. + Private m_Title As String = Nothing ' Cache the assembly's title. + Private m_ProductName As String = Nothing ' Cache the assembly's product name. + Private m_CompanyName As String = Nothing ' Cache the assembly's company name. + Private m_Trademark As String = Nothing ' Cache the assembly's trademark. + Private m_Copyright As String = Nothing ' Cache the assembly's copyright. + End Class +End Namespace diff --git a/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/ApplicationServices/ConsoleApplicationBase.vb b/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/ApplicationServices/ConsoleApplicationBase.vb new file mode 100644 index 000000000000..c1b06488e265 --- /dev/null +++ b/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/ApplicationServices/ConsoleApplicationBase.vb @@ -0,0 +1,81 @@ +' Licensed to the .NET Foundation under one or more agreements. +' The .NET Foundation licenses this file to you under the MIT license. +' See the LICENSE file in the project root for more information. + +Option Strict On +Option Explicit On + +Imports System.ComponentModel + +Namespace Microsoft.VisualBasic.ApplicationServices + + '''************************************************************************** + ''' ;ConsoleApplicationBase + ''' + ''' Abstract class that defines the application Startup/Shutdown model for VB + ''' Windows Applications such as console, winforms, dll, service. + ''' + ''' + Public Class ConsoleApplicationBase : Inherits ApplicationBase + + '= PUBLIC ============================================================= + + '''************************************************************************** + ''' ;New + ''' + ''' Constructs the application Shutdown/Startup model object + ''' + ''' We have to have a parameterless ctor because the platform specific Application + ''' object derives from this one and it doesn't define a ctor. The partial class generated by the + ''' designer defines the ctor in order to configure the application. + Public Sub New() + MyBase.New() + End Sub + + '''************************************************************************** + ''' ;CommandLineArgs + ''' + ''' Returns the command line arguments for the current application. + ''' + ''' + ''' This function differs from System.Environment.GetCommandLineArgs in that the + ''' path of the executing file (the 0th entry) is omitted from the returned collection + Public ReadOnly Property CommandLineArgs() As System.Collections.ObjectModel.ReadOnlyCollection(Of String) + Get + If m_CommandLineArgs Is Nothing Then + 'Get rid of Arg(0) which is the path of the executing program. Main(args() as string) doesn't report the name of the app and neither will we + Dim EnvArgs As String() = System.Environment.GetCommandLineArgs + If EnvArgs.GetLength(0) >= 2 Then '1 element means no args, just the executing program. >= 2 means executing program + one or more command line arguments + Dim NewArgs(EnvArgs.GetLength(0) - 2) As String 'dimming z(0) gives a z() of 1 element. + System.Array.Copy(EnvArgs, 1, NewArgs, 0, EnvArgs.GetLength(0) - 1) 'copy everything but the 0th element (the path of the executing program) + m_CommandLineArgs = New System.Collections.ObjectModel.ReadOnlyCollection(Of String)(NewArgs) + Else + m_CommandLineArgs = New System.Collections.ObjectModel.ReadOnlyCollection(Of String)(New String() {}) 'provide the empty set + End If + End If + Return m_CommandLineArgs + End Get + End Property + + '= PROTECTED ============================================================= + + '''************************************************************************* + ''';InternalCommandLine + ''' + ''' Allows derived classes to set what the command line should look like. WindowsFormsApplicationBase calls this + ''' for instance because we snag the command line from Main(). + ''' + ''' + Protected WriteOnly Property InternalCommandLine() As System.Collections.ObjectModel.ReadOnlyCollection(Of String) + Set(ByVal value As System.Collections.ObjectModel.ReadOnlyCollection(Of String)) + m_CommandLineArgs = value + End Set + End Property + + '= FRIEND ============================================================= + + '= PRIVATE ========================================================== + + Private m_CommandLineArgs As System.Collections.ObjectModel.ReadOnlyCollection(Of String) ' Lazy-initialized and cached collection of command line arguments. + End Class 'ApplicationBase +End Namespace diff --git a/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/Devices/ComputerInfo.vb b/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/Devices/ComputerInfo.vb index 0d9d405f3fe3..218bf9048db8 100644 --- a/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/Devices/ComputerInfo.vb +++ b/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/Devices/ComputerInfo.vb @@ -4,6 +4,7 @@ Imports System Imports System.Diagnostics +Imports Microsoft.VisualBasic.CompilerServices Namespace Microsoft.VisualBasic.Devices @@ -27,6 +28,64 @@ Namespace Microsoft.VisualBasic.Devices Sub New() End Sub + '''****************************************************************************** + ''' ;TotalPhysicalMemory + ''' + ''' Gets the total size of physical memory on the machine. + ''' + ''' A 64-bit unsigned integer containing the size of total physical memory on the machine, in bytes. + ''' If we are unable to obtain the memory status. + + Public ReadOnly Property TotalPhysicalMemory() As UInt64 + Get + Return MemoryStatus.TotalPhysicalMemory + End Get + End Property + + '''****************************************************************************** + ''' ;AvailablePhysicalMemory + ''' + ''' Gets the total size of free physical memory on the machine. + ''' + ''' A 64-bit unsigned integer containing the size of free physical memory on the machine, in bytes. + ''' If we are unable to obtain the memory status. + + Public ReadOnly Property AvailablePhysicalMemory() As UInt64 + Get + Return MemoryStatus.AvailablePhysicalMemory + End Get + End Property + + '''****************************************************************************** + ''' ;TotalVirtualMemory + ''' + ''' Gets the total size of user potion of virtual address space for calling process. + ''' + ''' A 64-bit unsigned integer containing the size of user potion of virtual address space for calling process, + ''' in bytes. + ''' If we are unable to obtain the memory status. + + Public ReadOnly Property TotalVirtualMemory() As UInt64 + Get + Return MemoryStatus.TotalVirtualMemory + End Get + End Property + + '''****************************************************************************** + ''' ;AvailableVirtualMemory + ''' + ''' Gets the total size of free user potion of virtual address space for calling process. + ''' + ''' A 64-bit unsigned integer containing the size of free user potion of virtual address space for calling process, + ''' in bytes. + ''' If we are unable to obtain the memory status. + + Public ReadOnly Property AvailableVirtualMemory() As UInt64 + Get + Return MemoryStatus.AvailableVirtualMemory + End Get + End Property + '''****************************************************************************** ''' ;InstalledUICulture ''' @@ -79,6 +138,34 @@ Namespace Microsoft.VisualBasic.Devices m_InstanceBeingWatched = RealClass End Sub + + Public ReadOnly Property TotalPhysicalMemory() As UInt64 + Get + Return m_InstanceBeingWatched.TotalPhysicalMemory + End Get + End Property + + + Public ReadOnly Property AvailablePhysicalMemory() As UInt64 + Get + Return m_InstanceBeingWatched.AvailablePhysicalMemory + End Get + End Property + + + Public ReadOnly Property TotalVirtualMemory() As UInt64 + Get + Return m_InstanceBeingWatched.TotalVirtualMemory + End Get + End Property + + + Public ReadOnly Property AvailableVirtualMemory() As UInt64 + Get + Return m_InstanceBeingWatched.AvailableVirtualMemory + End Get + End Property + Public ReadOnly Property InstalledUICulture() As Globalization.CultureInfo Get @@ -103,6 +190,90 @@ Namespace Microsoft.VisualBasic.Devices Private m_InstanceBeingWatched As ComputerInfo End Class + '= PRIVATE ============================================================ + + '''****************************************************************************** + ''' ;MemoryStatus + ''' + ''' Get the whole memory information details. + ''' + ''' An InternalMemoryStatus class. + Private ReadOnly Property MemoryStatus() As InternalMemoryStatus + Get + If m_InternalMemoryStatus Is Nothing Then + m_InternalMemoryStatus = New InternalMemoryStatus + End If + Return m_InternalMemoryStatus + End Get + End Property + + Private m_InternalMemoryStatus As InternalMemoryStatus = Nothing ' Cache our InternalMemoryStatus + + '''****************************************************************************** + ''' ;InternalMemoryStatus + ''' + ''' Calls GlobalMemoryStatusEx and returns the correct value. + ''' + Private Class InternalMemoryStatus + Friend Sub New() + End Sub + + Friend ReadOnly Property TotalPhysicalMemory() As UInt64 + Get +#If PLATFORM_WINDOWS Then + Refresh() + Return m_MemoryStatusEx.ullTotalPhys +#Else + Throw New PlatformNotSupportedException() +#End If + End Get + End Property + + Friend ReadOnly Property AvailablePhysicalMemory() As UInt64 + Get +#If PLATFORM_WINDOWS Then + Refresh() + Return m_MemoryStatusEx.ullAvailPhys +#Else + Throw New PlatformNotSupportedException() +#End If + End Get + End Property + + Friend ReadOnly Property TotalVirtualMemory() As UInt64 + Get +#If PLATFORM_WINDOWS Then + Refresh() + Return m_MemoryStatusEx.ullTotalVirtual +#Else + Throw New PlatformNotSupportedException() +#End If + End Get + End Property + + Friend ReadOnly Property AvailableVirtualMemory() As UInt64 + Get +#If PLATFORM_WINDOWS Then + Refresh() + Return m_MemoryStatusEx.ullAvailVirtual +#Else + Throw New PlatformNotSupportedException() +#End If + End Get + End Property + +#If PLATFORM_WINDOWS Then + Private Sub Refresh() + m_MemoryStatusEx = New NativeMethods.MEMORYSTATUSEX + m_MemoryStatusEx.Init() + If (Not NativeMethods.GlobalMemoryStatusEx(m_MemoryStatusEx)) Then + Throw ExceptionUtils.GetWin32Exception(SR.DiagnosticInfo_Memory) + End If + End Sub + + Private m_MemoryStatusEx As NativeMethods.MEMORYSTATUSEX +#End If + End Class End Class End Namespace diff --git a/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/Helpers/NativeMethods.vb b/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/Helpers/NativeMethods.vb index a0f0babcf97d..62f89292c1e7 100644 --- a/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/Helpers/NativeMethods.vb +++ b/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/Helpers/NativeMethods.vb @@ -129,7 +129,7 @@ Namespace Microsoft.VisualBasic.CompilerServices ''' ''' Contains information that the SHFileOperation function uses to perform file operations - ''' on 64-bit platforms, where the structure is unpacked. VSWhidbey 421265, + ''' on 64-bit platforms, where the structure is unpacked. ''' Private Structure SHFILEOPSTRUCT64 @@ -237,6 +237,47 @@ Namespace Microsoft.VisualBasic.CompilerServices SHCNF_DWORD = &H3 End Enum + ''' + ''' Contains information about the current state of both physical and virtual memory, including extended memory. + ''' + + Friend Structure MEMORYSTATUSEX + 'typedef struct _MEMORYSTATUSEX { + ' DWORD dwLength; Size of the structure. Must set before calling GlobalMemoryStatusEx. + ' DWORD dwMemoryLoad; Number between 0 and 100 on current memory utilization. + ' DWORDLONG ullTotalPhys; Total size of physical memory. + ' DWORDLONG ullAvailPhys; Total size of available physical memory. + ' DWORDLONG ullTotalPageFile; Size of committed memory limit. + ' DWORDLONG ullAvailPageFile; Size of available memory to committed (ullTotalPageFile max). + ' DWORDLONG ullTotalVirtual; Total size of user potion of virtual address space of calling process. + ' DWORDLONG ullAvailVirtual; Total size of unreserved and uncommitted memory in virtual address space. + ' DWORDLONG ullAvailExtendedVirtual; Total size of unreserved and uncommitted memory in extended portion of virual address. + '} MEMORYSTATUSEX, *LPMEMORYSTATUSEX; + + Friend dwLength As UInt32 + Friend dwMemoryLoad As UInt32 + Friend ullTotalPhys As UInt64 + Friend ullAvailPhys As UInt64 + Friend ullTotalPageFile As UInt64 + Friend ullAvailPageFile As UInt64 + Friend ullTotalVirtual As UInt64 + Friend ullAvailVirtual As UInt64 + Friend ullAvailExtendedVirtual As UInt64 + + Friend Sub Init() + dwLength = CType(Marshal.SizeOf(GetType(MEMORYSTATUSEX)), UInt32) + End Sub + End Structure + + ''' + ''' Obtains information about the system's current usage of both physical and virtual memory. + ''' + ''' Pointer to a MEMORYSTATUSEX structure. + ''' True if the function succeeds. Otherwise, False. + + Friend Shared Function GlobalMemoryStatusEx(ByRef lpBuffer As MEMORYSTATUSEX) As Boolean + End Function + ''' ''' The MoveFileEx function moves an existing file or directory. ''' http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/fs/movefileex.asp diff --git a/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/Helpers/NativeTypes.vb b/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/Helpers/NativeTypes.vb index 3ac3b77a68f7..9fd680ec39d3 100644 --- a/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/Helpers/NativeTypes.vb +++ b/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/Helpers/NativeTypes.vb @@ -5,9 +5,7 @@ Option Explicit On Option Strict On Imports System -Imports System.Diagnostics Imports System.Runtime.InteropServices -Imports Microsoft.Win32.SafeHandles Namespace Microsoft.VisualBasic.CompilerServices @@ -40,28 +38,6 @@ Namespace Microsoft.VisualBasic.CompilerServices End Sub End Class - ''' - ''' Inherits SafeHandleZeroOrMinusOneIsInvalid, with additional InitialSetHandle method. - ''' This is required because call to constructor of SafeHandle is not allowed in constrained region. - ''' - ''' VSWhidbey 544308 - Friend NotInheritable Class LateInitSafeHandleZeroOrMinusOneIsInvalid - Inherits SafeHandleZeroOrMinusOneIsInvalid - - Friend Sub New() - MyBase.New(True) - End Sub - - Friend Sub InitialSetHandle(ByVal h As IntPtr) - Debug.Assert(MyBase.IsInvalid, "Safe handle should only be set once.") - MyBase.SetHandle(h) - End Sub - - Protected Overrides Function ReleaseHandle() As Boolean - Return NativeMethods.CloseHandle(Me.handle) <> 0 - End Function - End Class - ''' ''' Represent Win32 PROCESS_INFORMATION structure. IMPORTANT: Copy the handles to a SafeHandle before use them. ''' diff --git a/src/Microsoft.VisualBasic.Core/tests/Microsoft.VisualBasic.Core.Tests.csproj b/src/Microsoft.VisualBasic.Core/tests/Microsoft.VisualBasic.Core.Tests.csproj index a939ef0dc2e8..26b83481bea0 100644 --- a/src/Microsoft.VisualBasic.Core/tests/Microsoft.VisualBasic.Core.Tests.csproj +++ b/src/Microsoft.VisualBasic.Core/tests/Microsoft.VisualBasic.Core.Tests.csproj @@ -27,6 +27,8 @@ + + diff --git a/src/Microsoft.VisualBasic.Core/tests/Microsoft/VisualBasic/ApplicationServices/ApplicationBaseTests.cs b/src/Microsoft.VisualBasic.Core/tests/Microsoft/VisualBasic/ApplicationServices/ApplicationBaseTests.cs index d83952ba0fc4..0ea36a77e24e 100644 --- a/src/Microsoft.VisualBasic.Core/tests/Microsoft/VisualBasic/ApplicationServices/ApplicationBaseTests.cs +++ b/src/Microsoft.VisualBasic.Core/tests/Microsoft/VisualBasic/ApplicationServices/ApplicationBaseTests.cs @@ -56,5 +56,15 @@ public void GetEnvironmentVariable() break; } } + + [Fact] + public void Info() + { + var app = new ApplicationBase(); + var assembly = System.Reflection.Assembly.GetEntryAssembly() ?? System.Reflection.Assembly.GetCallingAssembly(); + var assemblyName = assembly.GetName(); + Assert.Equal(assemblyName.Name, app.Info.AssemblyName); + Assert.Equal(assemblyName.Version, app.Info.Version); + } } } diff --git a/src/Microsoft.VisualBasic.Core/tests/Microsoft/VisualBasic/ApplicationServices/AssemblyInfoTests.cs b/src/Microsoft.VisualBasic.Core/tests/Microsoft/VisualBasic/ApplicationServices/AssemblyInfoTests.cs new file mode 100644 index 000000000000..26d02458dee7 --- /dev/null +++ b/src/Microsoft.VisualBasic.Core/tests/Microsoft/VisualBasic/ApplicationServices/AssemblyInfoTests.cs @@ -0,0 +1,78 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; +using System.Collections.Generic; +using System.Reflection; +using Xunit; + +namespace Microsoft.VisualBasic.ApplicationServices.Tests +{ + public class AssemblyInfoTests + { + [Fact] + public void Constructor_ArgumentNullException() + { + Assert.Throws(() => new AssemblyInfo(null)); + } + + [Theory] + [MemberData(nameof(AssemblyProperties_TestData))] + public void AssemblyProperties(System.Reflection.Assembly assembly) + { + var assemblyInfo = new AssemblyInfo(assembly); + var assemblyName = assembly.GetName(); + Assert.Equal(assemblyName.Name, assemblyInfo.AssemblyName); + Assert.Equal(System.IO.Path.GetDirectoryName(assembly.Location), assemblyInfo.DirectoryPath); + Assert.Equal(GetAttributeValue(assembly, attr => attr.Company), assemblyInfo.CompanyName); + Assert.Equal(GetAttributeValue(assembly, attr => attr.Copyright), assemblyInfo.Copyright); + Assert.Equal(GetAttributeValue(assembly, attr => attr.Description), assemblyInfo.Description); + Assert.Equal(GetAttributeValue(assembly, attr => attr.Product), assemblyInfo.ProductName); + Assert.Equal(GetAttributeValue(assembly, attr => attr.Title), assemblyInfo.Title); + Assert.Equal(GetAttributeValue(assembly, attr => attr.Trademark), assemblyInfo.Trademark); + Assert.Equal(assemblyName.Version, assemblyInfo.Version); + } + + private static IEnumerable AssemblyProperties_TestData() + { + yield return new object[] { typeof(object).Assembly }; + yield return new object[] { Assembly.GetExecutingAssembly() }; + } + + [Fact] + public void LoadedAssemblies() + { + var executingAssembly = Assembly.GetExecutingAssembly(); + var assemblyInfo = new AssemblyInfo(executingAssembly); + var loadedAssemblies = assemblyInfo.LoadedAssemblies; + Assert.True(loadedAssemblies.Contains(executingAssembly)); + } + + [Fact] + public void StackTrace() + { + // Property is independent of the actual assembly. + var assemblyInfo = new AssemblyInfo(Assembly.GetExecutingAssembly()); + var stackTrace = assemblyInfo.StackTrace; + Assert.True(stackTrace.Contains(nameof(AssemblyInfoTests))); + } + + [Fact] + [SkipOnTargetFramework(TargetFrameworkMonikers.Uap)] + public void WorkingSet() + { + // Property is independent of the actual assembly. + var assemblyInfo = new AssemblyInfo(Assembly.GetExecutingAssembly()); + var workingSet = assemblyInfo.WorkingSet; + Assert.True(workingSet > 0); + } + + private static string GetAttributeValue(System.Reflection.Assembly assembly, Func getAttributeValue) + where TAttribute : Attribute + { + var attribute = (TAttribute)assembly.GetCustomAttribute(typeof(TAttribute)); + return (attribute is null) ? "" : getAttributeValue(attribute); + } + } +} diff --git a/src/Microsoft.VisualBasic.Core/tests/Microsoft/VisualBasic/ApplicationServices/ConsoleApplicationBaseTests.cs b/src/Microsoft.VisualBasic.Core/tests/Microsoft/VisualBasic/ApplicationServices/ConsoleApplicationBaseTests.cs new file mode 100644 index 000000000000..fe0ecc76f566 --- /dev/null +++ b/src/Microsoft.VisualBasic.Core/tests/Microsoft/VisualBasic/ApplicationServices/ConsoleApplicationBaseTests.cs @@ -0,0 +1,21 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; +using System.Linq; +using Xunit; + +namespace Microsoft.VisualBasic.ApplicationServices.Tests +{ + public class ConsoleApplicationBaseTests + { + [Fact] + public void CommandLineArgs() + { + var app = new ConsoleApplicationBase(); + var expected = System.Environment.GetCommandLineArgs().Skip(1).ToArray(); + Assert.Equal(expected, app.CommandLineArgs); + } + } +} diff --git a/src/Microsoft.VisualBasic.Core/tests/Microsoft/VisualBasic/Devices/ComputerInfoTests.cs b/src/Microsoft.VisualBasic.Core/tests/Microsoft/VisualBasic/Devices/ComputerInfoTests.cs index a3395cad132b..b3eb5901b0ed 100644 --- a/src/Microsoft.VisualBasic.Core/tests/Microsoft/VisualBasic/Devices/ComputerInfoTests.cs +++ b/src/Microsoft.VisualBasic.Core/tests/Microsoft/VisualBasic/Devices/ComputerInfoTests.cs @@ -17,5 +17,25 @@ public void Properties() Assert.Equal(System.Environment.OSVersion.Platform.ToString(), info.OSPlatform); Assert.Equal(System.Environment.OSVersion.Version.ToString(), info.OSVersion); } + + [Fact] + public void Memory() + { + var info = new ComputerInfo(); + if (PlatformDetection.IsWindows) + { + Assert.NotEqual(0u, info.AvailablePhysicalMemory); + Assert.NotEqual(0u, info.AvailableVirtualMemory); + Assert.NotEqual(0u, info.TotalPhysicalMemory); + Assert.NotEqual(0u, info.TotalVirtualMemory); + } + else + { + Assert.Throws(() => info.AvailablePhysicalMemory); + Assert.Throws(() => info.AvailableVirtualMemory); + Assert.Throws(() => info.TotalPhysicalMemory); + Assert.Throws(() => info.TotalVirtualMemory); + } + } } } From d301a1d1485764e57822c91b9727018c02765cd8 Mon Sep 17 00:00:00 2001 From: Stephen Toub Date: Fri, 3 May 2019 16:23:17 -0400 Subject: [PATCH 198/607] Use RemoveInvoke in several StringTests (#37417) Every test that modifies CurrentCulture should be run out-of-process (to avoid one test interfering with another, either due to leaving a thread configured inappropriately or due to platforms where changing culture actually has global impact). A few snuck in to StringTests that weren't, and we've seen sporadic failures as a result. --- src/Common/tests/Tests/System/StringTests.cs | 464 ++++++++++--------- 1 file changed, 238 insertions(+), 226 deletions(-) diff --git a/src/Common/tests/Tests/System/StringTests.cs b/src/Common/tests/Tests/System/StringTests.cs index 4190825940fe..64b1fb5962f5 100644 --- a/src/Common/tests/Tests/System/StringTests.cs +++ b/src/Common/tests/Tests/System/StringTests.cs @@ -2170,145 +2170,151 @@ public static void EndsWithUnknownComparisonType_StringComparison() [Fact] public static void EndsWithMatchNonOrdinal_StringComparison() { - string s = "dabc"; - string value = "aBc"; - Assert.False(s.EndsWith(value, StringComparison.Ordinal)); - Assert.True(s.EndsWith(value, StringComparison.OrdinalIgnoreCase)); - - ReadOnlySpan span = s.AsSpan(); - ReadOnlySpan spanValue = value.AsSpan(); - Assert.False(span.EndsWith(spanValue, StringComparison.Ordinal)); - Assert.True(span.EndsWith(spanValue, StringComparison.OrdinalIgnoreCase)); - - CultureInfo backupCulture = CultureInfo.CurrentCulture; - - Thread.CurrentThread.CurrentCulture = new CultureInfo("el-GR"); - - s = "\u03b4\u03b1\u03b2\u03b3"; // δαβγ - value = "\u03b1\u03b2\u03b3"; // αβγ - - Assert.True(s.EndsWith(value, StringComparison.CurrentCulture)); - Assert.True(s.EndsWith(value, StringComparison.CurrentCultureIgnoreCase)); - - span = s.AsSpan(); // δαβγ - spanValue = value.AsSpan(); // αβγ - - Assert.True(span.EndsWith(spanValue, StringComparison.CurrentCulture)); - Assert.True(span.EndsWith(spanValue, StringComparison.CurrentCultureIgnoreCase)); - - value = "\u03b1\u0392\u03b3"; // αΒγ - Assert.False(s.EndsWith(value, StringComparison.CurrentCulture)); - Assert.True(s.EndsWith(value, StringComparison.CurrentCultureIgnoreCase)); - - spanValue = value.AsSpan(); // αΒγ - Assert.False(span.EndsWith(spanValue, StringComparison.CurrentCulture)); - Assert.True(span.EndsWith(spanValue, StringComparison.CurrentCultureIgnoreCase)); - - Thread.CurrentThread.CurrentCulture = backupCulture; - - s = "\u03b4\u0069\u00df\u0049"; // δißI - value = "\u0069\u0073\u0073\u0049"; // issI - - Assert.False(s.EndsWith(value, StringComparison.Ordinal)); - // Different behavior depending on OS - True on Windows, False on Unix - Assert.Equal( - s.ToString().EndsWith(value.ToString(), StringComparison.InvariantCulture), - s.EndsWith(value, StringComparison.InvariantCulture)); - Assert.Equal( - s.ToString().EndsWith(value.ToString(), StringComparison.InvariantCultureIgnoreCase), - s.EndsWith(value, StringComparison.InvariantCultureIgnoreCase)); - - span = s.AsSpan(); // δißI - spanValue = value.AsSpan(); // issI - - Assert.False(span.EndsWith(spanValue, StringComparison.Ordinal)); - // Different behavior depending on OS - True on Windows, False on Unix - Assert.Equal( - span.ToString().EndsWith(spanValue.ToString(), StringComparison.InvariantCulture), - span.EndsWith(spanValue, StringComparison.InvariantCulture)); - Assert.Equal( - span.ToString().EndsWith(spanValue.ToString(), StringComparison.InvariantCultureIgnoreCase), - span.EndsWith(spanValue, StringComparison.InvariantCultureIgnoreCase)); - - value = "\u0049\u0073\u0073\u0049"; // IssI - Assert.False(s.EndsWith(value, StringComparison.OrdinalIgnoreCase)); - Assert.False(s.EndsWith(value, StringComparison.InvariantCulture)); - // Different behavior depending on OS - True on Windows, False on Unix - Assert.Equal( - s.ToString().EndsWith(value.ToString(), StringComparison.InvariantCultureIgnoreCase), - s.EndsWith(value, StringComparison.InvariantCultureIgnoreCase)); + RemoteExecutor.Invoke(() => + { + string s = "dabc"; + string value = "aBc"; + Assert.False(s.EndsWith(value, StringComparison.Ordinal)); + Assert.True(s.EndsWith(value, StringComparison.OrdinalIgnoreCase)); - spanValue = value.AsSpan(); // IssI - Assert.False(span.EndsWith(spanValue, StringComparison.OrdinalIgnoreCase)); - Assert.False(span.EndsWith(spanValue, StringComparison.InvariantCulture)); - // Different behavior depending on OS - True on Windows, False on Unix - Assert.Equal( - span.ToString().EndsWith(spanValue.ToString(), StringComparison.InvariantCultureIgnoreCase), - span.EndsWith(spanValue, StringComparison.InvariantCultureIgnoreCase)); + ReadOnlySpan span = s.AsSpan(); + ReadOnlySpan spanValue = value.AsSpan(); + Assert.False(span.EndsWith(spanValue, StringComparison.Ordinal)); + Assert.True(span.EndsWith(spanValue, StringComparison.OrdinalIgnoreCase)); + + CultureInfo backupCulture = CultureInfo.CurrentCulture; + + Thread.CurrentThread.CurrentCulture = new CultureInfo("el-GR"); + + s = "\u03b4\u03b1\u03b2\u03b3"; // δαβγ + value = "\u03b1\u03b2\u03b3"; // αβγ + + Assert.True(s.EndsWith(value, StringComparison.CurrentCulture)); + Assert.True(s.EndsWith(value, StringComparison.CurrentCultureIgnoreCase)); + + span = s.AsSpan(); // δαβγ + spanValue = value.AsSpan(); // αβγ + + Assert.True(span.EndsWith(spanValue, StringComparison.CurrentCulture)); + Assert.True(span.EndsWith(spanValue, StringComparison.CurrentCultureIgnoreCase)); + + value = "\u03b1\u0392\u03b3"; // αΒγ + Assert.False(s.EndsWith(value, StringComparison.CurrentCulture)); + Assert.True(s.EndsWith(value, StringComparison.CurrentCultureIgnoreCase)); + + spanValue = value.AsSpan(); // αΒγ + Assert.False(span.EndsWith(spanValue, StringComparison.CurrentCulture)); + Assert.True(span.EndsWith(spanValue, StringComparison.CurrentCultureIgnoreCase)); + + Thread.CurrentThread.CurrentCulture = backupCulture; + + s = "\u03b4\u0069\u00df\u0049"; // δißI + value = "\u0069\u0073\u0073\u0049"; // issI + + Assert.False(s.EndsWith(value, StringComparison.Ordinal)); + // Different behavior depending on OS - True on Windows, False on Unix + Assert.Equal( + s.ToString().EndsWith(value.ToString(), StringComparison.InvariantCulture), + s.EndsWith(value, StringComparison.InvariantCulture)); + Assert.Equal( + s.ToString().EndsWith(value.ToString(), StringComparison.InvariantCultureIgnoreCase), + s.EndsWith(value, StringComparison.InvariantCultureIgnoreCase)); + + span = s.AsSpan(); // δißI + spanValue = value.AsSpan(); // issI + + Assert.False(span.EndsWith(spanValue, StringComparison.Ordinal)); + // Different behavior depending on OS - True on Windows, False on Unix + Assert.Equal( + span.ToString().EndsWith(spanValue.ToString(), StringComparison.InvariantCulture), + span.EndsWith(spanValue, StringComparison.InvariantCulture)); + Assert.Equal( + span.ToString().EndsWith(spanValue.ToString(), StringComparison.InvariantCultureIgnoreCase), + span.EndsWith(spanValue, StringComparison.InvariantCultureIgnoreCase)); + + value = "\u0049\u0073\u0073\u0049"; // IssI + Assert.False(s.EndsWith(value, StringComparison.OrdinalIgnoreCase)); + Assert.False(s.EndsWith(value, StringComparison.InvariantCulture)); + // Different behavior depending on OS - True on Windows, False on Unix + Assert.Equal( + s.ToString().EndsWith(value.ToString(), StringComparison.InvariantCultureIgnoreCase), + s.EndsWith(value, StringComparison.InvariantCultureIgnoreCase)); + + spanValue = value.AsSpan(); // IssI + Assert.False(span.EndsWith(spanValue, StringComparison.OrdinalIgnoreCase)); + Assert.False(span.EndsWith(spanValue, StringComparison.InvariantCulture)); + // Different behavior depending on OS - True on Windows, False on Unix + Assert.Equal( + span.ToString().EndsWith(spanValue.ToString(), StringComparison.InvariantCultureIgnoreCase), + span.EndsWith(spanValue, StringComparison.InvariantCultureIgnoreCase)); + }).Dispose(); } [Fact] public static void EndsWithNoMatchNonOrdinal_StringComparison() { - string s = "dabc"; - string value = "aDc"; - Assert.False(s.EndsWith(value, StringComparison.Ordinal)); - Assert.False(s.EndsWith(value, StringComparison.OrdinalIgnoreCase)); + RemoteExecutor.Invoke(() => + { + string s = "dabc"; + string value = "aDc"; + Assert.False(s.EndsWith(value, StringComparison.Ordinal)); + Assert.False(s.EndsWith(value, StringComparison.OrdinalIgnoreCase)); - ReadOnlySpan span = s.AsSpan(); - ReadOnlySpan spanValue = value.AsSpan(); - Assert.False(span.EndsWith(spanValue, StringComparison.Ordinal)); - Assert.False(span.EndsWith(spanValue, StringComparison.OrdinalIgnoreCase)); + ReadOnlySpan span = s.AsSpan(); + ReadOnlySpan spanValue = value.AsSpan(); + Assert.False(span.EndsWith(spanValue, StringComparison.Ordinal)); + Assert.False(span.EndsWith(spanValue, StringComparison.OrdinalIgnoreCase)); - CultureInfo backupCulture = CultureInfo.CurrentCulture; + CultureInfo backupCulture = CultureInfo.CurrentCulture; - Thread.CurrentThread.CurrentCulture = new CultureInfo("el-GR"); + Thread.CurrentThread.CurrentCulture = new CultureInfo("el-GR"); - s = "\u03b4\u03b1\u03b2\u03b3"; // δαβγ - value = "\u03b1\u03b4\u03b3"; // αδγ + s = "\u03b4\u03b1\u03b2\u03b3"; // δαβγ + value = "\u03b1\u03b4\u03b3"; // αδγ - Assert.False(s.EndsWith(value, StringComparison.CurrentCulture)); - Assert.False(s.EndsWith(value, StringComparison.CurrentCultureIgnoreCase)); + Assert.False(s.EndsWith(value, StringComparison.CurrentCulture)); + Assert.False(s.EndsWith(value, StringComparison.CurrentCultureIgnoreCase)); - span = s.AsSpan(); // δαβγ - spanValue = value.AsSpan(); // αδγ + span = s.AsSpan(); // δαβγ + spanValue = value.AsSpan(); // αδγ - Assert.False(span.EndsWith(spanValue, StringComparison.CurrentCulture)); - Assert.False(span.EndsWith(spanValue, StringComparison.CurrentCultureIgnoreCase)); + Assert.False(span.EndsWith(spanValue, StringComparison.CurrentCulture)); + Assert.False(span.EndsWith(spanValue, StringComparison.CurrentCultureIgnoreCase)); - value = "\u03b1\u0394\u03b3"; // αΔγ - Assert.False(s.EndsWith(value, StringComparison.CurrentCulture)); - Assert.False(s.EndsWith(value, StringComparison.CurrentCultureIgnoreCase)); + value = "\u03b1\u0394\u03b3"; // αΔγ + Assert.False(s.EndsWith(value, StringComparison.CurrentCulture)); + Assert.False(s.EndsWith(value, StringComparison.CurrentCultureIgnoreCase)); - spanValue = value.AsSpan(); // αΔγ - Assert.False(span.EndsWith(spanValue, StringComparison.CurrentCulture)); - Assert.False(span.EndsWith(spanValue, StringComparison.CurrentCultureIgnoreCase)); + spanValue = value.AsSpan(); // αΔγ + Assert.False(span.EndsWith(spanValue, StringComparison.CurrentCulture)); + Assert.False(span.EndsWith(spanValue, StringComparison.CurrentCultureIgnoreCase)); - Thread.CurrentThread.CurrentCulture = backupCulture; + Thread.CurrentThread.CurrentCulture = backupCulture; - s = "\u03b4\u0069\u00df\u0049"; // δißI - value = "\u0069\u03b4\u03b4\u0049"; // iδδI + s = "\u03b4\u0069\u00df\u0049"; // δißI + value = "\u0069\u03b4\u03b4\u0049"; // iδδI - Assert.False(s.EndsWith(value, StringComparison.Ordinal)); - Assert.False(s.EndsWith(value, StringComparison.InvariantCulture)); - Assert.False(s.EndsWith(value, StringComparison.InvariantCultureIgnoreCase)); + Assert.False(s.EndsWith(value, StringComparison.Ordinal)); + Assert.False(s.EndsWith(value, StringComparison.InvariantCulture)); + Assert.False(s.EndsWith(value, StringComparison.InvariantCultureIgnoreCase)); - span = s.AsSpan(); // δißI - spanValue = value.AsSpan(); // iδδI + span = s.AsSpan(); // δißI + spanValue = value.AsSpan(); // iδδI - Assert.False(span.EndsWith(spanValue, StringComparison.Ordinal)); - Assert.False(span.EndsWith(spanValue, StringComparison.InvariantCulture)); - Assert.False(span.EndsWith(spanValue, StringComparison.InvariantCultureIgnoreCase)); + Assert.False(span.EndsWith(spanValue, StringComparison.Ordinal)); + Assert.False(span.EndsWith(spanValue, StringComparison.InvariantCulture)); + Assert.False(span.EndsWith(spanValue, StringComparison.InvariantCultureIgnoreCase)); - value = "\u0049\u03b4\u03b4\u0049"; // IδδI - Assert.False(s.EndsWith(value, StringComparison.OrdinalIgnoreCase)); - Assert.False(s.EndsWith(value, StringComparison.InvariantCulture)); - Assert.False(s.EndsWith(value, StringComparison.InvariantCultureIgnoreCase)); + value = "\u0049\u03b4\u03b4\u0049"; // IδδI + Assert.False(s.EndsWith(value, StringComparison.OrdinalIgnoreCase)); + Assert.False(s.EndsWith(value, StringComparison.InvariantCulture)); + Assert.False(s.EndsWith(value, StringComparison.InvariantCultureIgnoreCase)); - spanValue = value.AsSpan(); // IδδI - Assert.False(span.EndsWith(spanValue, StringComparison.OrdinalIgnoreCase)); - Assert.False(span.EndsWith(spanValue, StringComparison.InvariantCulture)); - Assert.False(span.EndsWith(spanValue, StringComparison.InvariantCultureIgnoreCase)); + spanValue = value.AsSpan(); // IδδI + Assert.False(span.EndsWith(spanValue, StringComparison.OrdinalIgnoreCase)); + Assert.False(span.EndsWith(spanValue, StringComparison.InvariantCulture)); + Assert.False(span.EndsWith(spanValue, StringComparison.InvariantCultureIgnoreCase)); + }).Dispose(); } [Theory] @@ -7076,145 +7082,151 @@ public static void StartsWithUnknownComparisonType_StringComparison() [Fact] public static void StartsWithMatchNonOrdinal_StringComparison() { - string s1 = "abcd"; - string s2 = "aBc"; - Assert.False(s1.StartsWith(s2, StringComparison.Ordinal)); - Assert.True(s1.StartsWith(s2, StringComparison.OrdinalIgnoreCase)); - - ReadOnlySpan span = s1.AsSpan(); - ReadOnlySpan value = s2.AsSpan(); - Assert.False(span.StartsWith(value, StringComparison.Ordinal)); - Assert.True(span.StartsWith(value, StringComparison.OrdinalIgnoreCase)); + RemoteExecutor.Invoke(() => + { + string s1 = "abcd"; + string s2 = "aBc"; + Assert.False(s1.StartsWith(s2, StringComparison.Ordinal)); + Assert.True(s1.StartsWith(s2, StringComparison.OrdinalIgnoreCase)); - CultureInfo backupCulture = CultureInfo.CurrentCulture; + ReadOnlySpan span = s1.AsSpan(); + ReadOnlySpan value = s2.AsSpan(); + Assert.False(span.StartsWith(value, StringComparison.Ordinal)); + Assert.True(span.StartsWith(value, StringComparison.OrdinalIgnoreCase)); - Thread.CurrentThread.CurrentCulture = new CultureInfo("el-GR"); + CultureInfo backupCulture = CultureInfo.CurrentCulture; - s1 = "\u03b1\u03b2\u03b3\u03b4"; // αβγδ - s2 = "\u03b1\u03b2\u03b3"; // αβγ + Thread.CurrentThread.CurrentCulture = new CultureInfo("el-GR"); - Assert.True(s1.StartsWith(s2, StringComparison.CurrentCulture)); - Assert.True(s1.StartsWith(s2, StringComparison.CurrentCultureIgnoreCase)); + s1 = "\u03b1\u03b2\u03b3\u03b4"; // αβγδ + s2 = "\u03b1\u03b2\u03b3"; // αβγ - span = s1.AsSpan(); - value = s2.AsSpan(); + Assert.True(s1.StartsWith(s2, StringComparison.CurrentCulture)); + Assert.True(s1.StartsWith(s2, StringComparison.CurrentCultureIgnoreCase)); - Assert.True(span.StartsWith(value, StringComparison.CurrentCulture)); - Assert.True(span.StartsWith(value, StringComparison.CurrentCultureIgnoreCase)); + span = s1.AsSpan(); + value = s2.AsSpan(); - s2 = "\u03b1\u0392\u03b3"; // αΒγ - Assert.False(s1.StartsWith(s2, StringComparison.CurrentCulture)); - Assert.True(s1.StartsWith(s2, StringComparison.CurrentCultureIgnoreCase)); + Assert.True(span.StartsWith(value, StringComparison.CurrentCulture)); + Assert.True(span.StartsWith(value, StringComparison.CurrentCultureIgnoreCase)); - value = s2.AsSpan(); - Assert.False(span.StartsWith(value, StringComparison.CurrentCulture)); - Assert.True(span.StartsWith(value, StringComparison.CurrentCultureIgnoreCase)); - - Thread.CurrentThread.CurrentCulture = backupCulture; - - s1 = "\u0069\u00df\u0049\u03b4"; // ißIδ - s2 = "\u0069\u0073\u0073\u0049"; // issI - - Assert.False(s1.StartsWith(s2, StringComparison.Ordinal)); - // Different behavior depending on OS - True on Windows, False on Unix - Assert.Equal( - s1.ToString().StartsWith(s2.ToString(), StringComparison.InvariantCulture), - s1.StartsWith(s2, StringComparison.InvariantCulture)); - Assert.Equal( - s1.ToString().StartsWith(s2.ToString(), StringComparison.InvariantCultureIgnoreCase), - s1.StartsWith(s2, StringComparison.InvariantCultureIgnoreCase)); - - span = s1.AsSpan(); - value = s2.AsSpan(); - - Assert.False(span.StartsWith(value, StringComparison.Ordinal)); - // Different behavior depending on OS - True on Windows, False on Unix - Assert.Equal( - span.ToString().StartsWith(value.ToString(), StringComparison.InvariantCulture), - span.StartsWith(value, StringComparison.InvariantCulture)); - Assert.Equal( - span.ToString().StartsWith(value.ToString(), StringComparison.InvariantCultureIgnoreCase), - span.StartsWith(value, StringComparison.InvariantCultureIgnoreCase)); - - s2 = "\u0049\u0073\u0073\u0049"; // IssI - Assert.False(s1.StartsWith(s2, StringComparison.OrdinalIgnoreCase)); - Assert.False(s1.StartsWith(s2, StringComparison.InvariantCulture)); - // Different behavior depending on OS - True on Windows, False on Unix - Assert.Equal( - s1.ToString().StartsWith(s2.ToString(), StringComparison.InvariantCultureIgnoreCase), - s1.StartsWith(s2, StringComparison.InvariantCultureIgnoreCase)); + s2 = "\u03b1\u0392\u03b3"; // αΒγ + Assert.False(s1.StartsWith(s2, StringComparison.CurrentCulture)); + Assert.True(s1.StartsWith(s2, StringComparison.CurrentCultureIgnoreCase)); - value = s2.AsSpan(); - Assert.False(span.StartsWith(value, StringComparison.OrdinalIgnoreCase)); - Assert.False(span.StartsWith(value, StringComparison.InvariantCulture)); - // Different behavior depending on OS - True on Windows, False on Unix - Assert.Equal( - span.ToString().StartsWith(value.ToString(), StringComparison.InvariantCultureIgnoreCase), - span.StartsWith(value, StringComparison.InvariantCultureIgnoreCase)); + value = s2.AsSpan(); + Assert.False(span.StartsWith(value, StringComparison.CurrentCulture)); + Assert.True(span.StartsWith(value, StringComparison.CurrentCultureIgnoreCase)); + + Thread.CurrentThread.CurrentCulture = backupCulture; + + s1 = "\u0069\u00df\u0049\u03b4"; // ißIδ + s2 = "\u0069\u0073\u0073\u0049"; // issI + + Assert.False(s1.StartsWith(s2, StringComparison.Ordinal)); + // Different behavior depending on OS - True on Windows, False on Unix + Assert.Equal( + s1.ToString().StartsWith(s2.ToString(), StringComparison.InvariantCulture), + s1.StartsWith(s2, StringComparison.InvariantCulture)); + Assert.Equal( + s1.ToString().StartsWith(s2.ToString(), StringComparison.InvariantCultureIgnoreCase), + s1.StartsWith(s2, StringComparison.InvariantCultureIgnoreCase)); + + span = s1.AsSpan(); + value = s2.AsSpan(); + + Assert.False(span.StartsWith(value, StringComparison.Ordinal)); + // Different behavior depending on OS - True on Windows, False on Unix + Assert.Equal( + span.ToString().StartsWith(value.ToString(), StringComparison.InvariantCulture), + span.StartsWith(value, StringComparison.InvariantCulture)); + Assert.Equal( + span.ToString().StartsWith(value.ToString(), StringComparison.InvariantCultureIgnoreCase), + span.StartsWith(value, StringComparison.InvariantCultureIgnoreCase)); + + s2 = "\u0049\u0073\u0073\u0049"; // IssI + Assert.False(s1.StartsWith(s2, StringComparison.OrdinalIgnoreCase)); + Assert.False(s1.StartsWith(s2, StringComparison.InvariantCulture)); + // Different behavior depending on OS - True on Windows, False on Unix + Assert.Equal( + s1.ToString().StartsWith(s2.ToString(), StringComparison.InvariantCultureIgnoreCase), + s1.StartsWith(s2, StringComparison.InvariantCultureIgnoreCase)); + + value = s2.AsSpan(); + Assert.False(span.StartsWith(value, StringComparison.OrdinalIgnoreCase)); + Assert.False(span.StartsWith(value, StringComparison.InvariantCulture)); + // Different behavior depending on OS - True on Windows, False on Unix + Assert.Equal( + span.ToString().StartsWith(value.ToString(), StringComparison.InvariantCultureIgnoreCase), + span.StartsWith(value, StringComparison.InvariantCultureIgnoreCase)); + }).Dispose(); } [Fact] public static void StartsWithNoMatchNonOrdinal_StringComparison() { - string s1 = "abcd"; - string s2 = "aDc"; - Assert.False(s1.StartsWith(s2, StringComparison.Ordinal)); - Assert.False(s1.StartsWith(s2, StringComparison.OrdinalIgnoreCase)); + RemoteExecutor.Invoke(() => + { + string s1 = "abcd"; + string s2 = "aDc"; + Assert.False(s1.StartsWith(s2, StringComparison.Ordinal)); + Assert.False(s1.StartsWith(s2, StringComparison.OrdinalIgnoreCase)); - ReadOnlySpan span = s1.AsSpan(); - ReadOnlySpan value = s2.AsSpan(); - Assert.False(span.StartsWith(value, StringComparison.Ordinal)); - Assert.False(span.StartsWith(value, StringComparison.OrdinalIgnoreCase)); + ReadOnlySpan span = s1.AsSpan(); + ReadOnlySpan value = s2.AsSpan(); + Assert.False(span.StartsWith(value, StringComparison.Ordinal)); + Assert.False(span.StartsWith(value, StringComparison.OrdinalIgnoreCase)); - CultureInfo backupCulture = CultureInfo.CurrentCulture; + CultureInfo backupCulture = CultureInfo.CurrentCulture; - Thread.CurrentThread.CurrentCulture = new CultureInfo("el-GR"); + Thread.CurrentThread.CurrentCulture = new CultureInfo("el-GR"); - s1 = "\u03b1\u03b2\u03b3\u03b4"; // αβγδ - s2 = "\u03b1\u03b4\u03b3"; // αδγ + s1 = "\u03b1\u03b2\u03b3\u03b4"; // αβγδ + s2 = "\u03b1\u03b4\u03b3"; // αδγ - Assert.False(s1.StartsWith(s2, StringComparison.CurrentCulture)); - Assert.False(s1.StartsWith(s2, StringComparison.CurrentCultureIgnoreCase)); + Assert.False(s1.StartsWith(s2, StringComparison.CurrentCulture)); + Assert.False(s1.StartsWith(s2, StringComparison.CurrentCultureIgnoreCase)); - span = s1.AsSpan(); - value = s2.AsSpan(); + span = s1.AsSpan(); + value = s2.AsSpan(); - Assert.False(span.StartsWith(value, StringComparison.CurrentCulture)); - Assert.False(span.StartsWith(value, StringComparison.CurrentCultureIgnoreCase)); + Assert.False(span.StartsWith(value, StringComparison.CurrentCulture)); + Assert.False(span.StartsWith(value, StringComparison.CurrentCultureIgnoreCase)); - s2 = "\u03b1\u0394\u03b3"; // αΔγ - Assert.False(s1.StartsWith(s2, StringComparison.CurrentCulture)); - Assert.False(s1.StartsWith(s2, StringComparison.CurrentCultureIgnoreCase)); + s2 = "\u03b1\u0394\u03b3"; // αΔγ + Assert.False(s1.StartsWith(s2, StringComparison.CurrentCulture)); + Assert.False(s1.StartsWith(s2, StringComparison.CurrentCultureIgnoreCase)); - value = s2.AsSpan(); - Assert.False(span.StartsWith(value, StringComparison.CurrentCulture)); - Assert.False(span.StartsWith(value, StringComparison.CurrentCultureIgnoreCase)); + value = s2.AsSpan(); + Assert.False(span.StartsWith(value, StringComparison.CurrentCulture)); + Assert.False(span.StartsWith(value, StringComparison.CurrentCultureIgnoreCase)); - Thread.CurrentThread.CurrentCulture = backupCulture; + Thread.CurrentThread.CurrentCulture = backupCulture; - s1 = "\u0069\u00df\u0049\u03b4"; // ißIδ - s2 = "\u0069\u03b4\u03b4\u0049"; // iδδI + s1 = "\u0069\u00df\u0049\u03b4"; // ißIδ + s2 = "\u0069\u03b4\u03b4\u0049"; // iδδI - Assert.False(s1.StartsWith(s2, StringComparison.Ordinal)); - Assert.False(s1.StartsWith(s2, StringComparison.InvariantCulture)); - Assert.False(s1.StartsWith(s2, StringComparison.InvariantCultureIgnoreCase)); + Assert.False(s1.StartsWith(s2, StringComparison.Ordinal)); + Assert.False(s1.StartsWith(s2, StringComparison.InvariantCulture)); + Assert.False(s1.StartsWith(s2, StringComparison.InvariantCultureIgnoreCase)); - span = s1.AsSpan(); - value = s2.AsSpan(); + span = s1.AsSpan(); + value = s2.AsSpan(); - Assert.False(span.StartsWith(value, StringComparison.Ordinal)); - Assert.False(span.StartsWith(value, StringComparison.InvariantCulture)); - Assert.False(span.StartsWith(value, StringComparison.InvariantCultureIgnoreCase)); + Assert.False(span.StartsWith(value, StringComparison.Ordinal)); + Assert.False(span.StartsWith(value, StringComparison.InvariantCulture)); + Assert.False(span.StartsWith(value, StringComparison.InvariantCultureIgnoreCase)); - s2 = "\u0049\u03b4\u03b4\u0049"; // IδδI - Assert.False(s1.StartsWith(s2, StringComparison.OrdinalIgnoreCase)); - Assert.False(s1.StartsWith(s2, StringComparison.InvariantCulture)); - Assert.False(s1.StartsWith(s2, StringComparison.InvariantCultureIgnoreCase)); + s2 = "\u0049\u03b4\u03b4\u0049"; // IδδI + Assert.False(s1.StartsWith(s2, StringComparison.OrdinalIgnoreCase)); + Assert.False(s1.StartsWith(s2, StringComparison.InvariantCulture)); + Assert.False(s1.StartsWith(s2, StringComparison.InvariantCultureIgnoreCase)); - value = s2.AsSpan(); - Assert.False(span.StartsWith(value, StringComparison.OrdinalIgnoreCase)); - Assert.False(span.StartsWith(value, StringComparison.InvariantCulture)); - Assert.False(span.StartsWith(value, StringComparison.InvariantCultureIgnoreCase)); + value = s2.AsSpan(); + Assert.False(span.StartsWith(value, StringComparison.OrdinalIgnoreCase)); + Assert.False(span.StartsWith(value, StringComparison.InvariantCulture)); + Assert.False(span.StartsWith(value, StringComparison.InvariantCultureIgnoreCase)); + }).Dispose(); } // NOTE: This is by design. Unix ignores the null characters (i.e. null characters have no weights for the string comparison). From de3ce3254f90b1d132d612fee61ee438497f7b98 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Fri, 3 May 2019 21:25:54 +0000 Subject: [PATCH 199/607] Update dependencies from https://github.com/dotnet/coreclr build 20190502.72 (#37407) - Microsoft.NET.Sdk.IL - 3.0.0-preview6-27702-72 - Microsoft.NETCore.ILAsm - 3.0.0-preview6-27702-72 - Microsoft.NETCore.Runtime.CoreCLR - 3.0.0-preview6-27702-72 --- eng/Version.Details.xml | 12 ++++++------ eng/Versions.props | 4 ++-- global.json | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 395790ea74b8..c3d28f894487 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -1,16 +1,16 @@ - + https://github.com/dotnet/coreclr - 5a34da317e3f8cef7895d6d4ad6ed75f3a79d38e + 299c9d5733368d101882eb89d897c88f094997c1 - + https://github.com/dotnet/coreclr - 5a34da317e3f8cef7895d6d4ad6ed75f3a79d38e + 299c9d5733368d101882eb89d897c88f094997c1 - + https://github.com/dotnet/coreclr - 5a34da317e3f8cef7895d6d4ad6ed75f3a79d38e + 299c9d5733368d101882eb89d897c88f094997c1 diff --git a/eng/Versions.props b/eng/Versions.props index d02a285e0821..20c9e028c7b8 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -40,8 +40,8 @@ 3.0.0-preview6-27703-02 3.0.0-preview6-27703-02 - 3.0.0-preview6-27701-72 - 3.0.0-preview6-27701-72 + 3.0.0-preview6-27702-72 + 3.0.0-preview6-27702-72 3.0.0-preview6.19252.9 4.6.0-preview6.19252.9 diff --git a/global.json b/global.json index 0d2d1f2d1e23..b2fd58a02dab 100644 --- a/global.json +++ b/global.json @@ -5,6 +5,6 @@ "msbuild-sdks": { "Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19229.8", "Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19229.8", - "Microsoft.NET.Sdk.IL": "3.0.0-preview6-27701-72" + "Microsoft.NET.Sdk.IL": "3.0.0-preview6-27702-72" } } From 0bc3ee4a4f1debaa0dd3c957d5201ae2a47757a1 Mon Sep 17 00:00:00 2001 From: Stephen Toub Date: Fri, 3 May 2019 17:33:55 -0400 Subject: [PATCH 200/607] Log exceptions from asynchronously failing Expect: 100-continue sends (#37391) * Log exceptions from asynchronously failing Expect: 100-continue sends When Expect: 100-continue is used, the sending of the request body content is allowed to run concurrently with the receipt of the response headers. If the processing of the response headers encounters an exception, we currently fail to ever join with that send task, which results in a TaskScheduler.UnobservedTaskException event. This PR changes to observe the exception in such cases and log it. (In doing so, I also came across an async void method, and changed all of the remaining ones in the assembly to be async Task instead. The current implementation of async void isn't any cheaper than async Task, and is actually more expensive in certain ways, plus it unnecessarily interacts with any SynchronizationContext that may exist.) * Address PR feedback --- .../src/System/Net/Http/WinHttpHandler.cs | 4 +-- .../SocketsHttpHandler/Http2Connection.cs | 4 +-- .../Http/SocketsHttpHandler/HttpConnection.cs | 36 ++++++++++++++++--- .../HttpContentReadStream.cs | 4 +-- 4 files changed, 38 insertions(+), 10 deletions(-) diff --git a/src/System.Net.Http.WinHttpHandler/src/System/Net/Http/WinHttpHandler.cs b/src/System.Net.Http.WinHttpHandler/src/System/Net/Http/WinHttpHandler.cs index c65517c7576e..aa69c6ededd6 100644 --- a/src/System.Net.Http.WinHttpHandler/src/System/Net/Http/WinHttpHandler.cs +++ b/src/System.Net.Http.WinHttpHandler/src/System/Net/Http/WinHttpHandler.cs @@ -557,7 +557,7 @@ protected override Task SendAsync( Task.Factory.StartNew( s => { var whrs = (WinHttpRequestState)s; - whrs.Handler.StartRequest(whrs); + _ = whrs.Handler.StartRequestAsync(whrs); }, state, CancellationToken.None, @@ -789,7 +789,7 @@ private void EnsureSessionHandleExists(WinHttpRequestState state) } } - private async void StartRequest(WinHttpRequestState state) + private async Task StartRequestAsync(WinHttpRequestState state) { if (state.CancellationToken.IsCancellationRequested) { diff --git a/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http2Connection.cs b/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http2Connection.cs index 2bf95d841386..18ebd60ac4c4 100644 --- a/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http2Connection.cs +++ b/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http2Connection.cs @@ -139,7 +139,7 @@ public async Task SetupAsync() _expectingSettingsAck = true; - ProcessIncomingFrames(); + _ = ProcessIncomingFramesAsync(); } private async Task EnsureIncomingBytesAsync(int minReadBytes) @@ -199,7 +199,7 @@ private async ValueTask ReadFrameAsync(bool initialFrame = false) return frameHeader; } - private async void ProcessIncomingFrames() + private async Task ProcessIncomingFramesAsync() { try { diff --git a/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnection.cs b/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnection.cs index 5de3ebefd72e..4217fce167dd 100644 --- a/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnection.cs +++ b/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnection.cs @@ -149,18 +149,31 @@ protected void Dispose(bool disposing) ValueTask? readAheadTask = ConsumeReadAheadTask(); if (readAheadTask != null) { - IgnoreExceptionsAsync(readAheadTask.GetValueOrDefault()); + _ = IgnoreExceptionsAsync(readAheadTask.GetValueOrDefault()); } } } } /// Awaits a task, ignoring any resulting exceptions. - private static async void IgnoreExceptionsAsync(ValueTask task) + private static async Task IgnoreExceptionsAsync(ValueTask task) { try { await task.ConfigureAwait(false); } catch { } } + /// Awaits a task, logging any resulting exceptions (which are otherwise ignored). + private async Task LogExceptionsAsync(Task task) + { + try + { + await task.ConfigureAwait(false); + } + catch (Exception e) + { + if (NetEventSource.IsEnabled) Trace($"Exception from asynchronous processing: {e}"); + } + } + /// Do a non-blocking poll to see whether the connection has data available or has been closed. /// If we don't have direct access to the underlying socket, we instead use a read-ahead task. public bool PollRead() @@ -360,6 +373,7 @@ private Task WriteHexInt32Async(int value) public async Task SendAsyncCore(HttpRequestMessage request, CancellationToken cancellationToken) { TaskCompletionSource allowExpect100ToContinue = null; + Task sendRequestContentTask = null; Debug.Assert(_currentRequest == null, $"Expected null {nameof(_currentRequest)}."); Debug.Assert(RemainingBuffer.Length == 0, "Unexpected data in read buffer"); @@ -465,7 +479,6 @@ public async Task SendAsyncCore(HttpRequestMessage request, // CRLF for end of headers. await WriteTwoBytesAsync((byte)'\r', (byte)'\n').ConfigureAwait(false); - Task sendRequestContentTask = null; if (request.Content == null) { // We have nothing more to send, so flush out any headers we haven't yet sent. @@ -603,8 +616,9 @@ public async Task SendAsyncCore(HttpRequestMessage request, // content has been received, so this task should generally already be complete. if (sendRequestContentTask != null) { - await sendRequestContentTask.ConfigureAwait(false); + Task sendTask = sendRequestContentTask; sendRequestContentTask = null; + await sendTask.ConfigureAwait(false); } // Now we are sure that the request was fully sent. @@ -697,6 +711,20 @@ public async Task SendAsyncCore(HttpRequestMessage request, allowExpect100ToContinue?.TrySetResult(false); if (NetEventSource.IsEnabled) Trace($"Error sending request: {error}"); + + // In the rare case where Expect: 100-continue was used and then processing + // of the response headers encountered an error such that we weren't able to + // wait for the sending to complete, it's possible the sending also encountered + // an exception or potentially is still going and will encounter an exception + // (we're about to Dispose for the connection). In such cases, we don't want any + // exception in that sending task to become unobserved and raise alarm bells, so we + // hook up a continuation that will log it. + if (sendRequestContentTask != null && !sendRequestContentTask.IsCompletedSuccessfully) + { + _ = LogExceptionsAsync(sendRequestContentTask); + } + + // Now clean up the connection. Dispose(); // At this point, we're going to throw an exception; we just need to diff --git a/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpContentReadStream.cs b/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpContentReadStream.cs index b7527bede787..8911933a51dd 100644 --- a/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpContentReadStream.cs +++ b/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpContentReadStream.cs @@ -52,14 +52,14 @@ protected override void Dispose(bool disposing) // Start the asynchronous drain. // It may complete synchronously, in which case the connection will be put back in the pool synchronously. // Skip the call to base.Dispose -- it will be deferred until DrainOnDisposeAsync finishes. - DrainOnDisposeAsync(); + _ = DrainOnDisposeAsync(); return; } base.Dispose(disposing); } - private async void DrainOnDisposeAsync() + private async Task DrainOnDisposeAsync() { HttpConnection connection = _connection; // Will be null after drain succeeds From 3c13f6e53bd57db3a75c8ddbbf2be6b3b6b7c934 Mon Sep 17 00:00:00 2001 From: Stephen Toub Date: Fri, 3 May 2019 17:34:24 -0400 Subject: [PATCH 201/607] Disable GetPropertyValues_NotStoredProperty_ValueEqualsNull test (#37420) * Disable GetPropertyValues_NotStoredProperty_ValueEqualsNull test * Disable the other test as well --- .../System/Configuration/LocalFileSettingsProviderTests.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/System.Configuration.ConfigurationManager/tests/System/Configuration/LocalFileSettingsProviderTests.cs b/src/System.Configuration.ConfigurationManager/tests/System/Configuration/LocalFileSettingsProviderTests.cs index bad25718f529..1f51ce1db52d 100644 --- a/src/System.Configuration.ConfigurationManager/tests/System/Configuration/LocalFileSettingsProviderTests.cs +++ b/src/System.Configuration.ConfigurationManager/tests/System/Configuration/LocalFileSettingsProviderTests.cs @@ -15,6 +15,7 @@ public class LocalFileSettingsProviderTests ["SettingsKey"] = "SettingsKeyFoo" }; + [ActiveIssue(37364)] [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotNetNativeRunningAsConsoleApp))] public void GetPropertyValues_NotStoredProperty_ValueEqualsNull() { @@ -30,6 +31,7 @@ public void GetPropertyValues_NotStoredProperty_ValueEqualsNull() Assert.Equal(null, propertyValues["PropertyName"].PropertyValue); } + [ActiveIssue(37364)] [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotNetNativeRunningAsConsoleApp))] public void GetPropertyValues_NotStoredConnectionStringProperty_ValueEqualsEmptyString() { @@ -47,4 +49,4 @@ public void GetPropertyValues_NotStoredConnectionStringProperty_ValueEqualsEmpty Assert.Equal(string.Empty, propertyValues["PropertyName"].PropertyValue); } } -} \ No newline at end of file +} From 214f424c1821c4b8979b37762098defe17ac0db6 Mon Sep 17 00:00:00 2001 From: Steve Harter Date: Fri, 3 May 2019 16:03:07 -0700 Subject: [PATCH 202/607] Update doc for Preview 5 (#37433) --- .../docs/SerializerProgrammingModel.md | 509 +++--------------- 1 file changed, 77 insertions(+), 432 deletions(-) diff --git a/src/System.Text.Json/docs/SerializerProgrammingModel.md b/src/System.Text.Json/docs/SerializerProgrammingModel.md index e1fe82e9f048..59633a1229c7 100644 --- a/src/System.Text.Json/docs/SerializerProgrammingModel.md +++ b/src/System.Text.Json/docs/SerializerProgrammingModel.md @@ -1,8 +1,6 @@ This document describes the current serializer API (both committed and forward-looking) and provides information on associated features. -Related API issues: -- [Main API](https://github.com/dotnet/corefx/issues/34372) -- [Property Name Policy](https://github.com/dotnet/corefx/issues/36351) +The APIs shown here reflection Preview 5. Design points: - Due to time constraints, and to gather feedback, the feature set is intended to a minimum viable product for 3.0. @@ -28,19 +26,19 @@ Using a simple POCO class: } ``` -To deserialize JSON bytes into a POCO instance: +To deserialize a JSON string into a POCO instance: ```cs - ReadOnlySpan utf8= ... - Person person = JsonSerializer.Parse(utf8); + string json = ... + Person person = JsonSerializer.Parse(json); ``` -To serialize an object to JSON bytes: +To serialize an object to a JSON string: ```cs Person person = ... - byte[] utf8 = JsonSerializer.ToBytes(person); + string json = JsonSerializer.ToString(person); ``` -The string-based `Parse()` and `ToString()` are convenience methods for strings, but slower than using the `` flavors because UTF8 must be converted to\from UTF16. +Note there are also byte[]-based methods of these which are faster than using the string-based methods because the bytes (as UTF8) do not need to be converted to\from string (UTF16). ```cs namespace System.Text.Json.Serialization @@ -69,15 +67,9 @@ namespace System.Text.Json.Serialization } ``` ## JsonSerializerOptions -This class contains the options that are used during (de)serialization. - -The design-time attributes applied to either a class or property can be specified or overridden at runtime here through the use of `AddAttribute()` methods or by setting the appropriate property on the options class. +This class contains the options that are used during (de)serialization and optionally passed as the last argument into methods in `JsonSerializer`. If not specified, a global version is used (which is not accessible). -If an instance of `JsonSerializerOptions` is not specified when calling read\write then a default instance is used which is immutable and private. Having a global\static instance is not a viable feature because of unintended side effects when more than one area of code changes the same settings. Having a instance specified per thread\context mechanism is possible, but will only be added pending feedback. It is expected that ASP.NET and other consumers that have non-default settings maintain their own global, thread or stack variable and pass that in on every call. ASP.NET and others may also want to read a .config file at startup in order to initialize the options instance. - -An instance of this class and exposed objects will be immutable once (de)serialization has occurred. This allows the instance to be shared globally with the same settings without the worry of side effects. The immutability is also desired with a future code-generation feature. Due to the immutable nature and fine-grain control over options through Attributes, it is expected that the instance is shared across users and applications. We may provide a Clone() method pending feedback. - -For performance, when a `JsonSerializerOptions` instance is used, it should be cached or re-used especially when run-time attributes are added because when that occurs, caches are held by the instance instead of being global. +For performance, when a `JsonSerializerOptions` instance is created, it should be cached or re-used because caches are held by it. ```cs namespace System.Text.Json.Serialization @@ -86,475 +78,144 @@ namespace System.Text.Json.Serialization { public JsonSerializerOptions(); - // All bool? properties assume default 'false' semantics - - // Once deserialization occurs, these properties can no longer be - // set (an InvalidOperationException will be thrown). - - public int DefaultBufferSize { get; set; } // Default value is 16K - public Func? DictionaryKeyConverter { get; set; } - public bool? IgnoreNullValue { get; set; } - public bool? IgnoreReadOnly { get; set; } - public int? MaxReadDepth { get; set; } - public Func? PropertyNameConverter { get; set; } - public JsonCommentHandling? ReadCommentHandling { get; set; } - public bool? CamelCasePropertyNames { get; set; } - public bool? WriteIndented { get; set; } - - // Add a attribute at run-time. - // These methods can be called until (de)serialization occurs for the given type. - public void AddAttribute(JsonAttribute value, Type type); - public void AddAttribute(JsonAttribute value, Type type, string propertyName); - } - - public abstract class JsonAttribute : Attribute - { - } -} -``` -## JsonIgnoreAttribute -This attribute specifies that the property is not serialized. - -```cs - [JsonIgnore] public DateTime? BirthDay { get; set; } -``` - -### API -```cs -namespace System.Text.Json.Serialization -{ - [AttributeUsage(AttributeTargets.Property, AllowMultiple = false)] - public sealed class JsonIgnoreAttribute : JsonAttribute - { - public JsonIgnoreAttribute(); - } -} -``` -## JsonIgnoreReadOnlyAttribute -This attribute specifies that readonly properties are not serialized. Only applies to a class. - -```cs - // Properties that do not have a setter will not be written to JSON - [JsonIgnoreReadOnly] - public class Person -``` + // Note that all bool-based properties are false by default. -### API -```cs -namespace System.Text.Json.Serialization -{ - [AttributeUsage(AttributeTargets.Class, AllowMultiple = false)] - public sealed class JsonIgnoreReadOnlyAttribute : JsonAttribute - { - public JsonIgnoreReadOnlyAttribute(); - } - - public class JsonSerializerOptions - { -... - public bool IgnoreReadOnly {get; set;} -... + public bool AllowTrailingCommas { get; set; } + public int DefaultBufferSize { get; set; } + public JsonNamingPolicy DictionaryKeyPolicy { get; set; } + public bool IgnoreNullValues { get; set; } + public bool IgnoreReadOnlyProperties { get; set; } + public int MaxDepth { get; set; } + public bool PropertyNameCaseInsensitive { get; set; } + public JsonNamingPolicy PropertyNamingPolicy { get; set; } + public JsonCommentHandling ReadCommentHandling { get; set; } + public bool WriteIndented { get; set; } } } -``` - -## JsonIgnoreNullValueAttribute -This attribute specifies that properties with a null value are not (de)serialized. Applies to a property but can be defaulted by applying to a class. - -```cs - [JsonIgnoreNullValue] - public class Person -``` - -or to a property: - -```cs - public class Person - { -... - [JsonIgnoreNullValue] public DateTime? BirthDay { get; set; } -... - } -``` - -### API -```cs -namespace System.Text.Json.Serialization -{ - [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property, AllowMultiple = false)] - public sealed class JsonIgnoreNullValueAttribute : JsonAttribute - { - public JsonIgnoreNullValueAttribute(); - } - public class JsonSerializerOptions - { -... - public bool IgnoreNullValue {get; set;} -... - } -} ``` - ## Property Name feature -These attributes determine how a property name is (de)serialized. Functionality includes: -- An attribute used to specify an explicit name (`JsonNameAttribute`). -- An attribute used to specify camel casing (`JsonCamelCasingAttribute`). - - An abstract base attribute (`JsonNameConverterAttribute`) that is an extension point used to create additional attributes, such as one to support snake-casing. -- A base attribute for the ones above (`JsonPropertyNamePolicyAttribute`) that specifies whether to use case-insensitive property name comparisons (by default case-sensitive). +This feature determine how a property name is (de)serialized. Functionality includes: +- An attribute used to specify an explicit name (`JsonPropertyNameAttribute`). +- The `JsonSerializerOptions.PropertyNamingPolicy` property specifies a name converter for properties, such as a converter for camel-casing. +- A similar `DictionaryKeyPolicy` property is used to specify a name converter for dictionary keys. -To change a property name explicitly (JSON will contain "birthdate" instead of "BirthDay") +To change a property name using the attribute (JSON will contain "birthdate" instead of "BirthDay") ```cs public class Person { ... - [JsonName("birthdate")] public DateTime BirthDay { get; set; } + [JsonPropertyName("birthdate")] public DateTime BirthDay { get; set; } ... } ``` -To use case-insensitivity: +To specify camel-casing: ```cs - [JsonPropertyNamePolicy(CaseInsensitive = true)] public DateTime? BirthDay { get; set; } -``` + var options = new JsonSerializerOptions(); + options.PropertyNamingPolicy = JsonNamingPolicy.CamelCase; -To use camel-casing (JSON will contain "birthDay" instead of "BirthDay") -```cs - [JsonCamelCasing] public DateTime BirthDay { get; set; } + // Be sure to specify the options class on calls to the serializer: + string json = JsonSerializer.ToString(person, options); ``` -To use camel-casing and case-insensitivity: -```cs - [JsonCamelCasing(CaseInsensitive = true)] public DateTime BirthDay { get; set; } -``` +It is possible to author a new converter by deriving from `JsonNamingPolicy` and overriding `ConvertName`. + ### API ```cs namespace System.Text.Json.Serialization { [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property, AllowMultiple = false)] - public sealed class JsonCamelCasingAttribute : JsonNameConverterAttribute + public sealed class JsonPropertyNameAttribute : System.Text.Json.Serialization.JsonAttribute { - public JsonCamelCasingAttribute(); - public override Func ResolveName; - } - - [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property, AllowMultiple = false)] - public abstract class JsonNameConverterAttribute : JsonPropertyNamePolicyAttribute - { - public JsonNameConverterAttribute(); - public abstract Func ResolveName; - } - - [AttributeUsage(AttributeTargets.Property, AllowMultiple = false)] - public sealed class JsonNameAttribute : JsonPropertyNamePolicyAttribute - { - public JsonPropertyNameAttribute(); - public JsonPropertyNameAttribute(string name); - + public JsonPropertyNameAttribute(string propertyName) { } public string Name { get; set; } } - [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property, AllowMultiple = false)] - public class JsonPropertyNamePolicyAttribute : JsonAttribute + public abstract partial class JsonNamingPolicy { - public bool CaseInsensitive { get; set; } - } + public static System.Text.Json.Serialization.JsonNamingPolicy CamelCase { get; } - public class JsonSerializerOptions - { -... - public Func? PropertyNameConverter { get; set; } -... - } + protected JsonNamingPolicy() { } + public abstract string ConvertName(string name); + } } ``` -_Note that these attributes are not used to change the naming policy for Dictionary keys, Enum item names or other cases. Dictionary and Enum support is TBD but may have their own attribute for this and\or a callback approach may be used._ - -## Date Converter feature -Dates are not part of JSON, so we need a converter. Dates are typically JSON strings. Currently there is an internal `DateTime` and `DateTimeOffset` converter that currently supports ISO 8601 format of `"yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fffffffK"`. See https://github.com/dotnet/corefx/issues/34690 for more information. - -If the internal converter is not sufficient, such as when the format has a custom format or is not ISO 8601 compatible, then a developer can add a new type that derives from `JsonDataTypeConverterAttribute` and specifies `PropertyType=typeof(DateTime)` or `PropertyType=typeof(DateTimeConverter)` on that attribute. - -## Enum Converter feature -By default, Enums are treated as longs in the JSON. This is most efficient and supports bit-wise attributes without any extra work. -This attribute, through `TreatAsString=true` allows Enums to be written with their string-based literal value. If this is not sufficient, a developer can derive from `JsonDataTypeConverterAttribute` and have that attribute specify `PropertyType=typeof(Enum)` or the specific Type of enum to define behavior for. Currently bit-wise string-based attributes are not supported (Json.Net supports this through a comma-separated list). +## Ignore feature +The `JsonIgnore` attribute specifies that the property is not serialized or deserialized. ```cs -namespace System.Text.Json.Serialization -{ - [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property, AllowMultiple = true)] - public sealed class JsonEnumConverterAttribute: JsonDataTypeConverterAttribute - { - public JsonEnumConverterAttribute(); - public JsonEnumConverterAttribute(bool treatAsString = default); - - public bool TreatAsString { get; set; } - - public override System.Text.Json.Serialization.Policies.JsonDataTypeConverter GetConverter(); - public override System.Text.Json.Serialization.Policies.JsonDataTypeConverter GetConverter(); - } -} + [JsonIgnore] public DateTime? BirthDay { get; set; } ``` -## ICollection and Array Converter feature -By default there is an internal ICollection converter that supports any concrete class that implements IList and an Array converter that supports jagged arrays (`foo[][]`) but not multidimensional (`foo[,]`). - -## Enumerable Converter extensibility feature -The abstract `JsonEnumerableConverterAttribute` attribute is derived from to determine how an IEnumerable is converted by default during deserialization. This policy can be used when the collection type does not implement IList, the property returns an abstract type or interface, or for immutable collection types or similar collections which require all values passed into the constructor. - -This attribute is used internally by the default Array converter since Arrays do not implement IList and because the size must be known while creating the Array. - -## Policy namespace -This namespace contains classes that are not normally used or seen by the consumer. Instead, they are used by an author when deriving\extending existing attributes. Having them in a separate namespace reduces the class count of the main namespace. - +### API ```cs -namespace System.Text.Json.Serialization.Policies -{ - [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property, AllowMultiple = true)] - public abstract class JsonEnumerableConverterAttribute: Attribute - { - public EnumerableConverterAttribute(); - public Type EnumerableType { get; protected set; } - public JsonEnumerableConverter CreateConverter(); - } - - public abstract class JsonEnumerableConverter - { - protected JsonEnumerableConverter(); - public abstract IEnumerable CreateFromList(Type elementType, IList sourceList); - } - - // Base Attribute class for data type converters. - [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property, AllowMultiple = true)] - public abstract class JsonDataTypeConverterAttribute : Attribute - { - public Type PropertyType {get; protected set;} - public abstract JsonDataTypeConverter GetConverter; - } - - // Base data type converter class. - // Review note: this may be refactored to add an abstraction on top of the reader and writer. - // This would allow for a single Write() method instead of two (it will handle property name or lack of) - // and prevent potential misuses of exposing the Utf8JsonReader and Utf8JsonWriter directly. - public abstract class JsonDataTypeConverter - { - // Returning false here will case a JsonReaderException to be thrown. - public abstract bool TryRead(Type valueType, ref Utf8JsonReader reader, out TValue value); - - // An implementation of this calls the lower-level reader\writer `WriteXXXValue()` methods. - public abstract void Write(TValue value, ref Utf8JsonWriter writer); - - // An implementation of this calls the lower-level reader\writer `WriteXXX()` methods. - // Review note: ideally this `Write()` which takes the property name doesn't need to exist; doing that required the lower-level reader\writer to add functionality. - public abstract void Write(Span escapedPropertyName, TValue value, ref Utf8JsonWriter writer); - } -} + [System.AttributeUsage(AttributeTargets.Property, AllowMultiple=false)] + public sealed partial class JsonIgnoreAttribute : System.Text.Json.Serialization.JsonAttribute + { + public JsonIgnoreAttribute() { } + } ``` -## Extensibility and manual (de)serialization -There are several scenarios where lower-level callbacks are necessary. Here are some examples: -- OnDeserializing: initialize collections and other properties before serialization occurs. -- OnDeserialized: handle "underflow" scenarios by defaulting unassigned properties; set calculated properties. -- OnSerializing: assign default values as appropriate and write any properties not present in public properties. -- OnSerialized: write any additional properties that occur after the normal properties are serialized. -- OnPropertyRead: manually deserialize the property. -- OnPropertyWrite: manually serialize the property. -- OnMissingPropertyRead: manually deserialize a missing property. -- OnMissingPropertyWrite: manually serialize missing properties. -- OnMissingPropertyDeserialized: apply "overflow" json data and assign to the poco object, or remember it for later for serialization. - -From a design standpoint, these callbacks could occur in several locations: -1) On the actual POCO instance. -2) On a converter type for the POCO. -3) As an event raised from the options class or elsewhere. - -The current design and prototype supports (1) and (2) through the use of interfaces either applied to a POCO or to a Converter. - -These extensibility interfaces exist in the `System.Text.Json.Serialization.Converters` namespace which is used by those that need to author code to perform manual deserialization. This namespace is not used by normal consumers. In the future it will also contain several simple static methods to help with per-property converters such as Enums and DateTime. - -```cs -namespace System.Text.Json.Serialization.Converters -{ - public interface IJsonTypeConverterOnDeserialized - { - void OnDeserialized(object obj, JsonClassInfo jsonClassInfo, JsonSerializerOptions options); - } +## Case insensitivity feature +The `JsonSerializerOptions.PropertyNameCaseInsensitive` property specifies that property names in JSON should be treated as being case-insensitive when finding the corresponding property name on an object. The default is case-sensitive. - public interface IJsonTypeConverterOnDeserializing - { - void OnDeserializing(object obj, JsonClassInfo jsonClassInfo, JsonSerializerOptions options); - } +Note that Json.NET is case-insensitive by default. - public interface IJsonTypeConverterOnSerialized - { - void OnSerialized(object obj, JsonClassInfo jsonClassInfo, in Utf8JsonWriter writer, JsonSerializerOptions options); - } - - public interface IJsonTypeConverterOnSerializing - { - void OnSerializing(object obj, JsonClassInfo jsonClassInfo, in Utf8JsonWriter writer, JsonSerializerOptions options); - } +## Date Support +Dates are not part of JSON, so an internal converter is supplied. Dates are typically JSON strings. Currently there is an internal `DateTime` and `DateTimeOffset` converter that currently supports ISO 8601 formats. See https://github.com/dotnet/corefx/issues/34690 for more information. - // TBD: the other interfaces mentioned earlier to support OnPropertyRead etc... -} -``` - -A converter is specified through an attribute: -```cs -namespace System.Text.Json.Serialization -{ - [AttributeUsage(AttributeTargets.Class, AllowMultiple = false)] - public class JsonClassAttribute : System.Attribute - { - public JsonClassAttribute() { } - public Type ConverterType { get; set; } - } -} -``` -The `JsonClassInfo` type passed into the callbacks support exposing metadata on the object including its System.Type and exposes the type's properties and their converters, escaped name, etc: -```cs -namespace System.Text.Json.Serialization -{ - public sealed class JsonClassInfo - { - public System.Type Type { get; } +If the internal converter is not sufficient, such as when the format has a custom format or is not ISO 8601 compatible, then a developer will be able to add a new value converter. - public JsonPropertyInfo GetProperty(ReadOnlySpan propertyName); - public JsonPropertyInfo GetProperty(string propertyName); +## Enum Supprt +By default, Enums are treated as longs in the JSON. This is most efficient. There will be future support to be based on strings; likely through an attribute to change the default for a given property and an option on `JsonSerializerOptions` to change the default globally. - public void AddDataTypeConverter(JsonDataTypeConverterAttribute attribute); - public JsonPropertyValueAttribute PropertyPolicyDefault { get; set; } - public JsonPropertyNamePolicyAttribute PropertyNamePolicyDefault { get; set; } - } +## ICollection and Array Converter feature +By default there is an internal converter that supports any concrete class that implements IList and an Array converter that supports jagged arrays (`foo[][]`) but not multidimensional (`foo[,]`). - public abstract class JsonPropertyInfo - { - public string EscapedName { get; } - public string Name { get; } - public PropertyInfo PropertyInfo { get; } +Work is underway to support collections in the System.Collections.Immutable namespace and others automatically. - public JsonDataTypeConverterAttribute DataTypeConverter { get; set; } - public JsonPropertyValueAttribute PropertyPolicyDefault { get; set; } - public JsonPropertyNamePolicyAttribute PropertyNamePolicyDefault { get; set; } - } - - // Each JsonPropertyInfo is an instance of this (to avoid boxing) - public class JsonPropertyInfo : JsonPropertyInfo - { - // This is the effective data type converter that will be used. - public JsonDataTypeConverter DataTypeConverter { get; } - } -} -``` - -Note that `JsonClassInfo`, `JsonPropertyInfo`, and `JsonPropertyInfo` are all used internally by the (de)serializer for its core implementation and thus are not created just for extensibility. +## Extensibility and manual (de)serialization +This is a pending feature and design work and requirement gathering is underway. There will likely be two types of converters: a "value" converter for primitive types that have a single value in JSON (such as a number or string) and an "object" converter that allows access to the reader and writer and will have before- and after- callbacks. These converters will be registered with `JsonSerializerOptions`. # API comparison to Json.NET ## Simple scenario Json.NET: ```cs Person person = ...; - string result = JsonConvert.SerializeObject(person); - person = JsonConvert.DeserializeObject(person); + string json = JsonConvert.SerializeObject(person); + person = JsonConvert.DeserializeObject(json); ``` JsonSerializer: ```cs Person person = ...; - byte[] result = JsonSerializer.ToBytes(person); - person = JsonSerializer.Parse(result); + string json = JsonSerializer.ToBytes(person); + person = JsonSerializer.Parse(json); ``` ## Simple scenario with run-time settings Json.NET: ```cs var settings = new JsonSerializerSettings(); settings.NullValueHandling = NullValueHandling.Ignore; - string result = JsonConvert.SerializeObject(person, settings); + string json = JsonConvert.SerializeObject(person, settings); ``` JsonSerializer: ```cs var options = new JsonSerializerOptions(); - options.JsonPropertyValueAttribute = new JsonPropertyValueAttribute - { - IgnoreNullValueOnRead = true, - IgnoreNullValueOnWrite = true - }; - byte[] result = JsonSerializer.ToBytes(person, options); + options.IgnoreNullValues = true; + string json = JsonSerializer.ToString(person, options); ``` Note that Json.NET also has a `JsonSerializer` class with instance methods for advanced scenarios. See also Json.NET [code samples](https://www.newtonsoft.com/json/help/html/Samples.htm) and [documentation](https://www.newtonsoft.com/json/help/html/R_Project_Documentation.htm). -## Callbacks -Json.NET: -```cs - public class Person - { - private string _foo; - - [OnDeserializing()] - internal void OnDeserializing(StreamingContext context) - { - _foo = "custom value"; - } - } -``` - -JsonSerializer -```cs - public class Person : IJsonTypeConverterOnDeserializing - { - private string _foo; - - void IJsonTypeConverterOnDeserializing.OnDeserializing(object obj, JsonClassInfo jsonClassInfo, JsonSerializerOptions options) - { - _foo = "Hello"; - } - } -``` -or using a POCO converter type (so the POCO class itself doesn't need to be modified) -```cs - // Attribute can also be specified at run-time. - [JsonClass(ConverterType = typeof(MyPersonConverter))] - public class Person - { - private string _foo; - - public void SetFoo(string value) - { - _foo = value; - } - } - - internal struct MyPersonConverter : IJsonTypeConverterOnDeserializing - { - void IJsonTypeConverterOnDeserializing.OnDeserializing(object obj, JsonClassInfo jsonClassInfo, JsonSerializerOptions options) - { - ((MyPerson)obj).SetFoo("Hello"); - } - } -``` - -A converter instance is created during deserialization and again during serialization. However since the same instance is used for the entire deserialization (and similarly for serialization), the instance of the converter can maintain state across callbacks, which is useful for logic such as remembering "overflow" property values as they are deserialized in order to use them later during OnDeserialized. - -If the converter cannot assign "overflow" state to the POCO for later serialization, then we will need a feature to support the converter adding that state to an user-defined object that will be returned from the `JsonSerializer` "read" methods and then manually passed back to the "write" methods, or adding an attribute that can be applied to a property on the POCO type that represents an overflow property bag. - # Design notes -## Attribute Usage -All supported attributes are located in the `System.Text.Json.Serialization` namespace, although new ones can be added by the community through inheritance as previously discussed (for example for Enums, DateTime, PhoneNumber). - -Having all attributes in a single namespace makes it intuitive to find the appropriate functionality. However it is different from some other serializers which re-use attributes from: -- [DataContract] from System.Runtime.Serialization. -- [DataMember] from System.Runtime.Serialization. Typically just the "Name" property is supported. -- [EnumMember] from System.Runtime.Serialization. -- [IgnoreDataMember] from System.Runtime.Serialization. -- [Serializable] and [NonSerializable] from System (for fields). -- ShouldSerializeXXX pattern. - -Json.NET for example supports both their own `JsonPropertyAttribute` and `DataMemberAttribute` to specify the name override of a property. +## JsonSerializerOptions +If an instance of `JsonSerializerOptions` is not specified when calling read\write then a default instance is used which is immutable and private. Having a global\static instance is not a viable feature because of unintended side effects when more than one area of code changes the same settings. Having a instance specified per thread\context mechanism is possible, but will only be added pending feedback. It is expected that ASP.NET and other consumers that have non-default settings maintain their own global, thread or stack variable and pass that in on every call. ASP.NET and others may also want to read a .config file at startup in order to initialize the options instance. -Pending feedback, we may elect to support some of these other attributes to help with compatibility with existing POCOs types. +An instance of this class and exposed objects will be immutable once (de)serialization has occurred. This allows the instance to be shared globally with the same settings without the worry of side effects. The immutability is also desired with a future code-generation feature. Due to the immutable nature and fine-grain control over options through Attributes, it is expected that the instance is shared across users and applications. We may provide a Clone() method pending feedback. ## Static typing \ polymorphic behavior The Read\Write methods specify statically (at compile time) the POCO type through `` which below is ``: @@ -582,30 +243,12 @@ In this case, if `person` is actually a Customer object, the Customer will be se When POCO objects are returned from other properties or collection, they follow the same static typing based on the property's type or the collection's generic type. There is not a mechanism to support polymorphic behavior here, although that could be added in the future as an opt-in model. ## Async support for Stream and Pipe (Pipe support pending active discussions) -The design supports async methods that can stream with a buffer size around the size of the largest property value which means the capability to asynchronously (de)serialize a very large object tree with a minimal memory footprint. +The design supports async methods that can stream with a buffer size around the size of the largest property value which means the capability to asynchronously (de)serialize a very large object tree with a minimal memory footprint. This is unlike other serializers which may "drain" the Stream upfront during deserialization and pass around a potentially very large buffer which can cause the allocations to be placed on the Large Object Heap and cause other performance issues or simply run out of memory. Currently the async `await` calls on Stream and Pipe is based on a byte threshold determined by the current buffer size. For the Stream-based async methods, the Stream's `ReadAsync()` \ `WriteAsync()` are awaited. There is no call to `FlushAsync()` - it is expected the consumer does this or uses a Stream or an adapter that can auto-flush. -## Layering of Attributes -Currently the information below applies to `JsonPropertyValueAttribute` and `JsonPropertyNameAttribute`, but the same rules would apply to any similar future property. - -Using design-time attributes means that consumers of POCO types should not to apply any run-time options for common scenarios, making it easier for various consumers to properly use these types. - -A given Attribute class can typically be applied to a Property or Class either at run-time or design-time. In addition at run-time a global attribute to the current JsonSerializerOptions instance can be specified. The lower-level (e.g. property) having precedence of the higher-level (e.g. class). This allows for global options with override capability. - -Note: we could add design-time support for applying an attribute to an Assembly if that feature is desired. - -For Attribute classes with several properties\options, a `null` value for a given setting indicates no setting, and a lower-level setting should be used. - -The rules listed: -- Attributes added at run-time override design-time attributes when both applied to the same level (global, class or property). -- Attributes at a lower-level (e.g. property) have precedence over high-level (e.g. class). -- A null value of a property on an Attribute (if allowed) means there is no setting. This allows a given Attribute to contain more than one "independent" option and allows assigning that value somewhere else. - -The attributes specified at run-time on `JsonSerializerOptions` instance have the least precedence and thus are the "default" values if no design-time attributes exist for them or other run-time attributes specify those same option(s) on a class or property. - ## Performance The goal is to have a super fast (de)serializer given the feature set with minimal overhead on top of the reader and writer. @@ -621,7 +264,7 @@ Design notes: ## Pending features that will affect the public API ### Loosely-typed arrays and objects -Support for the equivalent of `JArray.Load(serializer)` and `JObject.Load(serializer)` to process out-of-order properties or loosely-typed objects that have to be manually (de)serialized. +Support for the equivalent of `JArray.Load(serializer)` and `JObject.Load(serializer)` to process out-of-order properties or loosely-typed objects that have to be manually (de)serialized. This is being done ### Underflow \ overflow feature These are important for version resiliency as they can be used to be backwards- or forward- compatible with changes to JSON schemas. It also allows the POCO object to have minimal deserialized properties for the local logic but enables preserving the other loosely-typed properties for later serialization \ round-trip support. #### Default values \ underflow @@ -643,13 +286,15 @@ Ability to specify which fields are required. - Char (as a JSON string of length 1) - DateTime (see the feature notes) - DateTimeOffset (see the feature notes) +- Dictionary (currently just primitives in Preview 5) - Double -- Enum (see the feature notes) +- Enum (as integer for now) - Int16 - Int32 - Int64 - IEnumerable (see the feature notes) - IList (see the feature notes) +- Object (polymorhic mode for serialization only) - Nullable < T > - SByte - Single From af5a54a64406d40e2108dfc521dcea7867342f69 Mon Sep 17 00:00:00 2001 From: Jeremy Barton Date: Fri, 3 May 2019 16:51:42 -0700 Subject: [PATCH 203/607] Use X509_check_host when available instead of a custom implementation. X509_check_host was added in OpenSSL 1.0.2, but the Debian 8 line is still on 1.0.1, so keep our version as a fallback. The local_ implementation was changed to support wildcard CN values in 3+ label names, because OpenSSL X509_check_host does, too. --- .../Security/CertificateValidation.Unix.cs | 5 + .../apibridge.c | 197 +++++++++++++++++ .../apibridge.h | 1 + .../openssl.c | 198 ++---------------- .../opensslshim.h | 6 + .../tests/HostnameMatchTests.Unix.cs | 15 +- 6 files changed, 240 insertions(+), 182 deletions(-) diff --git a/src/Common/src/System/Net/Security/CertificateValidation.Unix.cs b/src/Common/src/System/Net/Security/CertificateValidation.Unix.cs index a6cb181512f0..7313b7202803 100644 --- a/src/Common/src/System/Net/Security/CertificateValidation.Unix.cs +++ b/src/Common/src/System/Net/Security/CertificateValidation.Unix.cs @@ -45,6 +45,11 @@ internal static SslPolicyErrors BuildChainAndVerifyProperties(X509Chain chain, X // like "all characters being within [a-z0-9.-]+" string matchName = s_idnMapping.GetAscii(hostName); hostNameMatch = Interop.Crypto.CheckX509Hostname(certHandle, matchName, matchName.Length); + + if (hostNameMatch < 0) + { + throw Interop.Crypto.CreateOpenSslCryptographicException(); + } } } diff --git a/src/Native/Unix/System.Security.Cryptography.Native/apibridge.c b/src/Native/Unix/System.Security.Cryptography.Native/apibridge.c index 0f5ee6dfe7f6..167de7fd8e6a 100644 --- a/src/Native/Unix/System.Security.Cryptography.Native/apibridge.c +++ b/src/Native/Unix/System.Security.Cryptography.Native/apibridge.c @@ -6,6 +6,9 @@ #include "pal_crypto_types.h" #include "pal_types.h" +#include "../Common/pal_safecrt.h" +#include + #ifdef NEED_OPENSSL_1_0 #include "apibridge.h" @@ -24,6 +27,8 @@ #define SSL_ST_OK 3 #endif +c_static_assert(X509_CHECK_FLAG_NO_PARTIAL_WILDCARDS == 4); + const ASN1_TIME* local_X509_get0_notBefore(const X509* x509) { if (x509 && x509->cert_info && x509->cert_info->validity) @@ -479,6 +484,198 @@ int32_t local_SSL_is_init_finished(const SSL* ssl) return SSL_state(ssl) == SSL_ST_OK; } +/* +Function: +CheckX509HostnameMatch + +Checks if a particular ASN1_STRING represents the entry in a certificate which would match against +the requested hostname. + +Parameter sanRules: 0 for match rules against the subject CN, 1 for match rules against a SAN entry + +Return values: +1 if the hostname is a match +0 if the hostname is not a match +Any negative number indicates an error in the arguments. +*/ +static int CheckX509HostnameMatch(ASN1_STRING* candidate, const char* hostname, int cchHostname, int typeMatch) +{ + assert(candidate != NULL); + assert(hostname != NULL); + + if (!candidate->data || !candidate->length) + { + return 0; + } + + // If the candidate is *.example.org then the smallest we would match is a.example.org, which is the same + // length. So anything longer than what we're matching against isn't valid. + + // Since the IDNA punycode conversion was applied already this holds even + // in Unicode requests. + if (candidate->length > cchHostname) + { + return 0; + } + + char* candidateStr; + int i; + int hostnameFirstDot = -1; + + if (candidate->type != typeMatch) + { + return 0; + } + + // Great, candidateStr is just candidate->data! + candidateStr = (char*)(candidate->data); + + // First, verify that the string is alphanumeric, plus hyphens or periods and maybe starting with an asterisk. + for (i = 0; i < candidate->length; ++i) + { + char c = candidateStr[i]; + + if ((c < 'A' || c > 'Z') && (c < 'a' || c > 'z') && (c < '0' || c > '9') && (c != '.') && (c != '-') && + (c != '*' || i != 0)) + { + return 0; + } + } + + if (candidateStr[0] != '*') + { + if (candidate->length != cchHostname) + { + return 0; + } + + return !strncasecmp((const char*)candidateStr, hostname, (size_t)cchHostname); + } + + for (i = 0; i < cchHostname; ++i) + { + if (hostname[i] == '.') + { + hostnameFirstDot = i; + break; + } + } + + if (hostnameFirstDot < 0) + { + // It's possible that this should be considered a match if the entire SAN entry is '*', + // aka candidate->length == 1; but nothing talks about this case. + return 0; + } + + int foundSecondDot = 0; + + for (i = hostnameFirstDot + 1; i < cchHostname; ++i) + { + if (hostname[i] == '.') + { + foundSecondDot = 1; + break; + } + } + + // OpenSSL requires two dots for their hostname match. + if (!foundSecondDot) + { + return 0; + } + + { + // Determine how many characters exist after the portion the wildcard would match. For example, + // if hostname is 10 bytes long, and the '.' was at index 3, then we eliminate the first 3 + // characters (www) from the match constraint. This forces the wildcard to be the last + // character before the . in its match group. + int matchLength = cchHostname - hostnameFirstDot; + + // If what's left over from hostname isn't as long as what's left over from the candidate + // after the first character was an asterisk, it can't match. + if (matchLength != (candidate->length - 1)) + { + return 0; + } + + return !strncasecmp(candidateStr + 1, hostname + hostnameFirstDot, (size_t)matchLength); + } +} + +int32_t local_X509_check_host(X509* x509, const char* name, size_t namelen, unsigned int flags, char** peername) +{ + assert(peername == NULL); + assert(flags == X509_CHECK_FLAG_NO_PARTIAL_WILDCARDS); + (void)flags; + (void)peername; + + GENERAL_NAMES* san = (GENERAL_NAMES*)(X509_get_ext_d2i(x509, NID_subject_alt_name, NULL, NULL)); + int readSubject = 1; + int success = 0; + + // RFC2818 says that if ANY dNSName alternative name field is present then + // we should ignore the subject common name. + + if (san != NULL) + { + int count = sk_GENERAL_NAME_num(san); + + for (int i = 0; i < count; ++i) + { + GENERAL_NAME* sanEntry = sk_GENERAL_NAME_value(san, i); + + if (sanEntry->type != GEN_DNS) + { + continue; + } + + readSubject = 0; + + // A GEN_DNS name is supposed to be a V_ASN1_IA5STRING. + // If it isn't, we don't know how to read it. + if (CheckX509HostnameMatch(sanEntry->d.dNSName, name, (int)namelen, V_ASN1_IA5STRING)) + { + success = 1; + break; + } + } + + GENERAL_NAMES_free(san); + } + + if (readSubject) + { + assert(success == 0); + + // This is a shared/interor pointer, do not free! + X509_NAME* subject = X509_get_subject_name(x509); + + if (subject != NULL) + { + int i = -1; + + while ((i = X509_NAME_get_index_by_NID(subject, NID_commonName, i)) >= 0) + { + // Shared/interior pointers, do not free! + X509_NAME_ENTRY* nameEnt = X509_NAME_get_entry(subject, i); + ASN1_STRING* cn = X509_NAME_ENTRY_get_data(nameEnt); + + // For compatibility with previous .NET Core builds, allow any type of + // string for CN, provided it ended up with a single-byte encoding (otherwise + // strncasecmp simply won't match). + if (CheckX509HostnameMatch(cn, name, (int)namelen, cn->type)) + { + success = 1; + break; + } + } + } + } + + return success; +} + X509Stack* local_X509_STORE_CTX_get0_chain(X509_STORE_CTX* ctx) { return ctx ? ctx->chain : NULL; diff --git a/src/Native/Unix/System.Security.Cryptography.Native/apibridge.h b/src/Native/Unix/System.Security.Cryptography.Native/apibridge.h index c7f4405b41c8..5f62864b2496 100644 --- a/src/Native/Unix/System.Security.Cryptography.Native/apibridge.h +++ b/src/Native/Unix/System.Security.Cryptography.Native/apibridge.h @@ -30,6 +30,7 @@ int32_t local_SSL_is_init_finished(const SSL* ssl); unsigned long local_SSL_CTX_set_options(SSL_CTX* ctx, unsigned long options); void local_SSL_CTX_set_security_level(SSL_CTX* ctx, int32_t level); int local_SSL_session_reused(SSL* ssl); +int32_t local_X509_check_host(X509* x509, const char* name, size_t namelen, unsigned int flags, char** peername); const ASN1_TIME* local_X509_CRL_get0_nextUpdate(const X509_CRL* crl); int32_t local_X509_NAME_get0_der(X509_NAME* x509Name, const uint8_t** pder, size_t* pderlen); int32_t local_X509_PUBKEY_get0_param( diff --git a/src/Native/Unix/System.Security.Cryptography.Native/openssl.c b/src/Native/Unix/System.Security.Cryptography.Native/openssl.c index 9bbd92014468..82d001122648 100644 --- a/src/Native/Unix/System.Security.Cryptography.Native/openssl.c +++ b/src/Native/Unix/System.Security.Cryptography.Native/openssl.c @@ -703,126 +703,6 @@ BIO* CryptoNative_GetX509NameInfo(X509* x509, int32_t nameType, int32_t forIssue return NULL; } -/* -Function: -CheckX509HostnameMatch - -Checks if a particular ASN1_STRING represents the entry in a certificate which would match against -the requested hostname. - -Prameter sanRules: 0 for match rules against the subject CN, 1 for match rules against a SAN entry - -Return values: -1 if the hostname is a match -0 if the hostname is not a match -Any negative number indicates an error in the arguments. -*/ -static int CheckX509HostnameMatch(ASN1_STRING* candidate, const char* hostname, int cchHostname, char sanRules) -{ - assert(candidate); - assert(hostname); - - if (!candidate->data || !candidate->length) - { - return 0; - } - - // If the candidate is *.example.org then the smallest we would match is a.example.org, which is the same - // length. So anything longer than what we're matching against isn't valid. - - // Since the IDNA punycode conversion was applied already this holds even - // in Unicode requests. - if (candidate->length > cchHostname) - { - return 0; - } - - if (sanRules) - { - // RFC2818 says to use RFC2595 matching rules, but then gives an example that f*.com would match foo.com - // RFC2595 says that '*' may be used as the left name component, in which case it is a wildcard that does - // not match a '.'. - // The recommendation from the Windows Crypto team was not to match f*.com with foo.com. - - char* candidateStr; - int i; - int hostnameFirstDot = -1; - - // A GEN_DNS name is supposed to be a V_ASN1_IA5STRING. If it isn't, we don't know how to read it. - if (candidate->type != V_ASN1_IA5STRING) - { - return 0; - } - - // Great, candidateStr is just candidate->data! - candidateStr = (char*)(candidate->data); - - // First, verify that the string is alphanumeric, plus hyphens or periods and maybe starting with an asterisk. - for (i = 0; i < candidate->length; ++i) - { - char c = candidateStr[i]; - - if ((c < 'A' || c > 'Z') && (c < 'a' || c > 'z') && (c < '0' || c > '9') && (c != '.') && (c != '-') && - (c != '*' || i != 0)) - { - return 0; - } - } - - if (candidateStr[0] != '*') - { - if (candidate->length != cchHostname) - { - return 0; - } - - return !strncasecmp((const char*)candidateStr, hostname, (size_t)cchHostname); - } - - for (i = 0; i < cchHostname; ++i) - { - if (hostname[i] == '.') - { - hostnameFirstDot = i; - break; - } - } - - if (hostnameFirstDot < 0) - { - // It's possible that this should be considered a match if the entire SAN entry is '*', - // aka candidate->length == 1; but nothing talks about this case. - return 0; - } - - { - // Determine how many characters exist after the portion the wildcard would match. For example, - // if hostname is 10 bytes long, and the '.' was at index 3, then we eliminate the first 3 - // characters (www) from the match constraint. This forces the wildcard to be the last - // character before the . in its match group. - int matchLength = cchHostname - hostnameFirstDot; - - // If what's left over from hostname isn't as long as what's left over from the candidate - // after the first character was an asterisk, it can't match. - if (matchLength != (candidate->length - 1)) - { - return 0; - } - - return !strncasecmp(candidateStr + 1, hostname + hostnameFirstDot, (size_t)matchLength); - } - } - - // Not SAN-rules, much simpler: - - if (candidate->length != cchHostname) - { - return 0; - } - - return !strncasecmp((const char*)candidate->data, hostname, (size_t)cchHostname); -} - /* Function: CheckX509Hostname @@ -837,73 +717,28 @@ Any negative number indicates an error in the arguments. */ int32_t CryptoNative_CheckX509Hostname(X509* x509, const char* hostname, int32_t cchHostname) { + // Input errors. OpenSSL might return -1 or -2, so skip those. if (!x509) - return -2; - if (cchHostname > 0 && !hostname) return -3; - if (cchHostname < 0) + if (cchHostname > 0 && !hostname) return -4; + if (cchHostname < 0) + return -5; - int subjectNid = NID_commonName; - int sanGenType = GEN_DNS; - GENERAL_NAMES* san = (GENERAL_NAMES*)(X509_get_ext_d2i(x509, NID_subject_alt_name, NULL, NULL)); - char readSubject = 1; - int success = 0; - - // RFC2818 says that if ANY dNSName alternative name field is present then - // we should ignore the subject common name. - - if (san) - { - int i; - int count = sk_GENERAL_NAME_num(san); - - for (i = 0; i < count; ++i) - { - GENERAL_NAME* sanEntry = sk_GENERAL_NAME_value(san, i); - - if (sanEntry->type != sanGenType) - { - continue; - } - - readSubject = 0; - - if (CheckX509HostnameMatch(sanEntry->d.dNSName, hostname, cchHostname, 1)) - { - success = 1; - break; - } - } - - GENERAL_NAMES_free(san); - } - - if (readSubject && !success) + // OpenSSL will treat a target hostname starting with '.' as special. + // We don't expect target hostnames to start with '.', but if one gets in here, the fallback + // and the mainline won't be the same... so just make it report false. + if (cchHostname > 0 && hostname[0] == '.') { - // This is a shared/interor pointer, do not free! - X509_NAME* subject = X509_get_subject_name(x509); - - if (subject) - { - int i = -1; - - while ((i = X509_NAME_get_index_by_NID(subject, subjectNid, i)) >= 0) - { - // Shared/interior pointers, do not free! - X509_NAME_ENTRY* nameEnt = X509_NAME_get_entry(subject, i); - ASN1_STRING* cn = X509_NAME_ENTRY_get_data(nameEnt); - - if (CheckX509HostnameMatch(cn, hostname, cchHostname, 0)) - { - success = 1; - break; - } - } - } + return 0; } - return success; + return X509_check_host( + x509, + hostname, + (size_t)cchHostname, + X509_CHECK_FLAG_NO_PARTIAL_WILDCARDS, + NULL); } /* @@ -984,7 +819,8 @@ int32_t CryptoNative_CheckX509IpAddress( X509_NAME_ENTRY* nameEnt = X509_NAME_get_entry(subject, i); ASN1_STRING* cn = X509_NAME_ENTRY_get_data(nameEnt); - if (CheckX509HostnameMatch(cn, hostname, cchHostname, 0)) + if (cn->length == cchHostname && + !strncasecmp((const char*)cn->data, hostname, (size_t)cchHostname)) { success = 1; break; diff --git a/src/Native/Unix/System.Security.Cryptography.Native/opensslshim.h b/src/Native/Unix/System.Security.Cryptography.Native/opensslshim.h index 585ff6797eb6..7d88cd7b7f6e 100644 --- a/src/Native/Unix/System.Security.Cryptography.Native/opensslshim.h +++ b/src/Native/Unix/System.Security.Cryptography.Native/opensslshim.h @@ -172,6 +172,9 @@ int32_t X509_up_ref(X509* x509); #if OPENSSL_VERSION_NUMBER < OPENSSL_VERSION_1_0_2_RTM X509_STORE* X509_STORE_CTX_get0_store(X509_STORE_CTX* ctx); +int32_t X509_check_host(X509* x509, const char* name, size_t namelen, unsigned int flags, char** peername); +#define X509_CHECK_FLAG_NO_PARTIAL_WILDCARDS 4 + #endif #if !HAVE_OPENSSL_ALPN @@ -487,6 +490,7 @@ void SSL_get0_alpn_selected(const SSL* ssl, const unsigned char** protocol, unsi LEGACY_FUNCTION(SSLeay) \ RENAMED_FUNCTION(TLS_method, SSLv23_method) \ REQUIRED_FUNCTION(SSL_write) \ + FALLBACK_FUNCTION(X509_check_host) \ REQUIRED_FUNCTION(X509_check_issued) \ REQUIRED_FUNCTION(X509_check_purpose) \ REQUIRED_FUNCTION(X509_cmp_current_time) \ @@ -877,6 +881,7 @@ FOR_ALL_OPENSSL_FUNCTIONS #define SSLeay SSLeay_ptr #define SSL_write SSL_write_ptr #define TLS_method TLS_method_ptr +#define X509_check_host X509_check_host_ptr #define X509_check_issued X509_check_issued_ptr #define X509_check_purpose X509_check_purpose_ptr #define X509_cmp_current_time X509_cmp_current_time_ptr @@ -1034,6 +1039,7 @@ FOR_ALL_OPENSSL_FUNCTIONS #if OPENSSL_VERSION_NUMBER < OPENSSL_VERSION_1_0_2_RTM +#define X509_check_host local_X509_check_host #define X509_STORE_CTX_get0_store local_X509_STORE_CTX_get0_store #endif diff --git a/src/System.Security.Cryptography.X509Certificates/tests/HostnameMatchTests.Unix.cs b/src/System.Security.Cryptography.X509Certificates/tests/HostnameMatchTests.Unix.cs index 2a3b8b141743..b6acc0d8c8f1 100644 --- a/src/System.Security.Cryptography.X509Certificates/tests/HostnameMatchTests.Unix.cs +++ b/src/System.Security.Cryptography.X509Certificates/tests/HostnameMatchTests.Unix.cs @@ -16,7 +16,20 @@ public static class HostnameMatchTests [InlineData(false, true)] [InlineData(true, false)] [InlineData(true, true)] - public static void MatchCN_NoWildcards(bool wantsWildcard, bool mixedCase) + public static void MatchCN_ThreeLabels(bool wantsWildcard, bool mixedCase) + { + string targetName = "LocalHost.loCAldoMaIn.exAmple"; + string subjectCN = wantsWildcard ? "*.LOcaLdomain.exAMPle" : targetName; + + RunTest(targetName, subjectCN, null, !mixedCase, true); + } + + [Theory] + [InlineData(false, false)] + [InlineData(false, true)] + [InlineData(true, false)] + [InlineData(true, true)] + public static void MatchCN_TwoLabels(bool wantsWildcard, bool mixedCase) { string targetName = "LocalHost.loCAldoMaIn"; string subjectCN = wantsWildcard ? "*.LOcaLdomain" : targetName; From ce88e68fa9e592b24173343ec72098fb5f5acde6 Mon Sep 17 00:00:00 2001 From: Levi Broderick Date: Thu, 2 May 2019 23:09:56 -0700 Subject: [PATCH 204/607] Vector.CopyTo / TryCopyTo should be readonly methods (dotnet/coreclr#24359) Signed-off-by: dotnet-bot --- src/Common/src/CoreLib/System/Numerics/Vector.cs | 8 ++++---- src/Common/src/CoreLib/System/Numerics/Vector.tt | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/Common/src/CoreLib/System/Numerics/Vector.cs b/src/Common/src/CoreLib/System/Numerics/Vector.cs index e5ff360ae7c7..92b16a4e87e5 100644 --- a/src/Common/src/CoreLib/System/Numerics/Vector.cs +++ b/src/Common/src/CoreLib/System/Numerics/Vector.cs @@ -764,7 +764,7 @@ public Vector(Span values) /// /// The destination span which the values are copied into /// If number of elements in source vector is greater than those available in destination span - public void CopyTo(Span destination) + public readonly void CopyTo(Span destination) { ThrowHelper.ThrowForUnsupportedVectorBaseType(); if ((uint)destination.Length < (uint)Vector.Count) @@ -779,7 +779,7 @@ public void CopyTo(Span destination) /// /// The destination span which the values are copied into /// If number of elements in source vector is greater than those available in destination span - public void CopyTo(Span destination) + public readonly void CopyTo(Span destination) { if ((uint)destination.Length < (uint)Count) { @@ -1577,7 +1577,7 @@ public readonly string ToString(string? format, IFormatProvider? formatProvider) /// The destination span which the values are copied into /// True if the source vector was successfully copied to . False if /// is not large enough to hold the source vector. - public bool TryCopyTo(Span destination) + public readonly bool TryCopyTo(Span destination) { ThrowHelper.ThrowForUnsupportedVectorBaseType(); if ((uint)destination.Length < (uint)Vector.Count) @@ -1595,7 +1595,7 @@ public bool TryCopyTo(Span destination) /// The destination span which the values are copied into /// True if the source vector was successfully copied to . False if /// is not large enough to hold the source vector. - public bool TryCopyTo(Span destination) + public readonly bool TryCopyTo(Span destination) { if ((uint)destination.Length < (uint)Count) { diff --git a/src/Common/src/CoreLib/System/Numerics/Vector.tt b/src/Common/src/CoreLib/System/Numerics/Vector.tt index 58d7ad3f9fd3..ac64bac40c17 100644 --- a/src/Common/src/CoreLib/System/Numerics/Vector.tt +++ b/src/Common/src/CoreLib/System/Numerics/Vector.tt @@ -319,7 +319,7 @@ namespace System.Numerics /// /// The destination span which the values are copied into /// If number of elements in source vector is greater than those available in destination span - public void CopyTo(Span destination) + public readonly void CopyTo(Span destination) { ThrowHelper.ThrowForUnsupportedVectorBaseType(); if ((uint)destination.Length < (uint)Vector.Count) @@ -334,7 +334,7 @@ namespace System.Numerics /// /// The destination span which the values are copied into /// If number of elements in source vector is greater than those available in destination span - public void CopyTo(Span destination) + public readonly void CopyTo(Span destination) { if ((uint)destination.Length < (uint)Count) { @@ -644,7 +644,7 @@ namespace System.Numerics /// The destination span which the values are copied into /// True if the source vector was successfully copied to . False if /// is not large enough to hold the source vector. - public bool TryCopyTo(Span destination) + public readonly bool TryCopyTo(Span destination) { ThrowHelper.ThrowForUnsupportedVectorBaseType(); if ((uint)destination.Length < (uint)Vector.Count) @@ -662,7 +662,7 @@ namespace System.Numerics /// The destination span which the values are copied into /// True if the source vector was successfully copied to . False if /// is not large enough to hold the source vector. - public bool TryCopyTo(Span destination) + public readonly bool TryCopyTo(Span destination) { if ((uint)destination.Length < (uint)Count) { From 52848fe1da5fc2abd662152e163d838b9d7cfff2 Mon Sep 17 00:00:00 2001 From: Filip Navara Date: Fri, 3 May 2019 15:37:19 +0200 Subject: [PATCH 205/607] Implement String.IsAscii in shared CoreLib and use it for [Is]Normalize[d] for all runtimes (#24373) Signed-off-by: dotnet-bot --- src/Common/src/CoreLib/System/String.cs | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/src/Common/src/CoreLib/System/String.cs b/src/Common/src/CoreLib/System/String.cs index 3701434defa1..d765bdd68410 100644 --- a/src/Common/src/CoreLib/System/String.cs +++ b/src/Common/src/CoreLib/System/String.cs @@ -774,17 +774,15 @@ public bool IsNormalized() public bool IsNormalized(NormalizationForm normalizationForm) { -#if CORECLR - if (this.IsFastSort()) + if (this.IsAscii()) { - // If its FastSort && one of the 4 main forms, then its already normalized + // If its ASCII && one of the 4 main forms, then its already normalized if (normalizationForm == NormalizationForm.FormC || normalizationForm == NormalizationForm.FormKC || normalizationForm == NormalizationForm.FormD || normalizationForm == NormalizationForm.FormKD) return true; } -#endif return Normalization.IsNormalized(this, normalizationForm); } @@ -795,18 +793,24 @@ public string Normalize() public string Normalize(NormalizationForm normalizationForm) { -#if CORECLR if (this.IsAscii()) { - // If its FastSort && one of the 4 main forms, then its already normalized + // If its ASCII && one of the 4 main forms, then its already normalized if (normalizationForm == NormalizationForm.FormC || normalizationForm == NormalizationForm.FormKC || normalizationForm == NormalizationForm.FormD || normalizationForm == NormalizationForm.FormKD) return this; } -#endif return Normalization.Normalize(this, normalizationForm); } + + private unsafe bool IsAscii() + { + fixed (char* str = &_firstChar) + { + return ASCIIUtility.GetIndexOfFirstNonAsciiChar(str, (uint)Length) == (uint)Length; + } + } } } From 69d2b0f3a5bd73eb4281466715a0dc7750f4c0bf Mon Sep 17 00:00:00 2001 From: Jan Kotas Date: Thu, 2 May 2019 13:07:24 -0700 Subject: [PATCH 206/607] Fix CoreRT build breaks Signed-off-by: dotnet-bot --- .../src/CoreLib/System/Diagnostics/Tracing/EventSource.cs | 4 ++-- .../CoreLib/System/Diagnostics/Tracing/StubEnvironment.cs | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Common/src/CoreLib/System/Diagnostics/Tracing/EventSource.cs b/src/Common/src/CoreLib/System/Diagnostics/Tracing/EventSource.cs index 91c58bfad389..7ea9be38fc73 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/Tracing/EventSource.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/Tracing/EventSource.cs @@ -2472,7 +2472,7 @@ public EventMetadata(EventDescriptor descriptor, this.TriggersActivityTracking = 0; this.Name = name; this.Message = message; - this.Parameters = null; + this.Parameters = null!; this.TraceLoggingEventTypes = null; this.ActivityOptions = EventActivityOptions.None; this.ParameterTypes = parameterTypes; @@ -2609,7 +2609,7 @@ private Type EventTypeToType(EventParameterType type) return typeof(string); default: // TODO: should I throw an exception here? - return null; + return null!; } } #endif diff --git a/src/Common/src/CoreLib/System/Diagnostics/Tracing/StubEnvironment.cs b/src/Common/src/CoreLib/System/Diagnostics/Tracing/StubEnvironment.cs index 63e975c1d0d2..dfb021747c3f 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/Tracing/StubEnvironment.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/Tracing/StubEnvironment.cs @@ -237,7 +237,7 @@ static class ReflectionExtensions public static bool IsSealed(this Type type) { return type.GetTypeInfo().IsSealed; } public static bool IsValueType(this Type type) { return type.GetTypeInfo().IsValueType; } public static bool IsGenericType(this Type type) { return type.IsConstructedGenericType; } - public static Type BaseType(this Type type) { return type.GetTypeInfo().BaseType; } + public static Type? BaseType(this Type type) { return type.GetTypeInfo().BaseType; } public static Assembly Assembly(this Type type) { return type.GetTypeInfo().Assembly; } public static IEnumerable GetProperties(this Type type) { @@ -247,7 +247,7 @@ public static IEnumerable GetProperties(this Type type) return type.GetRuntimeProperties(); #endif } - public static MethodInfo GetGetMethod(this PropertyInfo propInfo) { return propInfo.GetMethod; } + public static MethodInfo? GetGetMethod(this PropertyInfo propInfo) { return propInfo.GetMethod; } public static Type[] GetGenericArguments(this Type type) { return type.GenericTypeArguments; } public static MethodInfo[] GetMethods(this Type type, BindingFlags flags) @@ -344,7 +344,7 @@ public static TypeCode GetTypeCode(this Type type) // // FieldInfo extension methods // - public static object GetRawConstantValue(this FieldInfo fi) + public static object? GetRawConstantValue(this FieldInfo fi) { return fi.GetValue(null); } // From 4b4b791e56cfc5e3afc9fc918e51fb9b975ae0ab Mon Sep 17 00:00:00 2001 From: Stephen Toub Date: Fri, 3 May 2019 21:01:39 -0400 Subject: [PATCH 207/607] Fix deadlock in SystemEventsTests.CreateTimerTests (#37426) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Fix deadlock in SystemEventsTests.CreateTimerTests The main thread in the ConcurrentTimers takes a lock on object timersSignaled and then calls CreateTimer while holding the lock. CreateTimer tries to SendMessageW a message to be processed by the events window, and as a result won’t return until the window has processed the message. Meanwhile, that window’s WindowThreadProc is handling a timer callback, which in the event handler in ConcurrentTimers tries to take the timersSignaled lock. That lock is held by the main thread, that’s calling CreateTimer and doing the SendMessageW that will only wake up when this callback completes. Deadlock. The fix is to stop locking while performing such work. * Address PR feedback --- .../tests/SystemEvents.CreateTimer.cs | 45 +++++++++---------- 1 file changed, 20 insertions(+), 25 deletions(-) diff --git a/src/Microsoft.Win32.SystemEvents/tests/SystemEvents.CreateTimer.cs b/src/Microsoft.Win32.SystemEvents/tests/SystemEvents.CreateTimer.cs index c244c3be78f4..c743d0540fee 100644 --- a/src/Microsoft.Win32.SystemEvents/tests/SystemEvents.CreateTimer.cs +++ b/src/Microsoft.Win32.SystemEvents/tests/SystemEvents.CreateTimer.cs @@ -3,11 +3,13 @@ // See the LICENSE file in the project root for more information. using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Runtime.InteropServices; using System.Threading; +using System.Threading.Tasks; using Xunit; namespace Microsoft.Win32.SystemEventsTests @@ -78,24 +80,19 @@ public void TimerElapsedSignaled() public void ConcurrentTimers() { const int NumConcurrentTimers = 10; - var timersSignalled = new Dictionary(); + var timersSignaled = new ConcurrentDictionary(); int numSignaled = 0; - var elapsed = new AutoResetEvent(false); + var elapsed = new ManualResetEventSlim(); TimerElapsedEventHandler handler = (sender, args) => { - bool signaled = false; - lock (timersSignalled) + // A timer might fire more than once. When it fires the first time, track it by adding + // it to a set and then increment the number of timers that have ever fired. When all + // timers have fired, set the event. + if (timersSignaled.TryAdd(args.TimerId, true) && + Interlocked.Increment(ref numSignaled) == NumConcurrentTimers) { - if (timersSignalled.TryGetValue(args.TimerId, out signaled) && !signaled) - { - timersSignalled[args.TimerId] = true; - - if (Interlocked.Increment(ref numSignaled) == NumConcurrentTimers) - { - elapsed.Set(); - } - } + elapsed.Set(); } }; @@ -104,27 +101,25 @@ public void ConcurrentTimers() { if (PlatformDetection.IsFullFramework) { - // desktop has a bug where it will allow EnsureSystemEvents to proceed without actually creating the HWND + // netfx has a bug where it will allow EnsureSystemEvents to proceed without actually creating the HWND SystemEventsTest.WaitForSystemEventsWindow(); } + // Create all the timers + var timers = new List(); for (int i = 0; i < NumConcurrentTimers; i++) { - lock (timersSignalled) - { - timersSignalled[SystemEvents.CreateTimer(TimerInterval)] = false; - } + timers.Add(SystemEvents.CreateTimer(TimerInterval)); } - Assert.True(elapsed.WaitOne(TimerInterval * SystemEventsTest.ExpectedEventMultiplier)); + // Wait for them all to fire + Assert.True(elapsed.Wait(TimerInterval * SystemEventsTest.ExpectedEventMultiplier)); - lock (timersSignalled) + // Delete them all + foreach (IntPtr timer in timers) { - foreach (var timer in timersSignalled.Keys.ToArray()) - { - Assert.True(timersSignalled[timer]); - SystemEvents.KillTimer(timer); - } + Assert.True(timersSignaled.TryGetValue(timer, out _)); + SystemEvents.KillTimer(timer); } } finally From 7ce249aa13e564968c867bd97c1a589bf4dc34b9 Mon Sep 17 00:00:00 2001 From: Levi Broderick Date: Fri, 3 May 2019 18:27:12 -0700 Subject: [PATCH 208/607] Create Utf8String package install docs (#37421) --- src/System.Utf8String.Experimental/README.md | 40 ++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 src/System.Utf8String.Experimental/README.md diff --git a/src/System.Utf8String.Experimental/README.md b/src/System.Utf8String.Experimental/README.md new file mode 100644 index 000000000000..8086006c1f6b --- /dev/null +++ b/src/System.Utf8String.Experimental/README.md @@ -0,0 +1,40 @@ +The `Utf8String` and `Char8` types are now available for experimentation. They currently exist in the package __System.Utf8String.Experimental__. Because this is an experimental package, it is unsupported for use in production workloads. + +To install: + +```ps +install-package System.Utf8String.Experimental -prerelease -source https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json +``` + +This package can only be installed into a project targeting a __nightly__ build of coreclr or corefx. Anything under the _master_ column of https://github.com/dotnet/core-sdk would work, as would any coreclr + corefx built from your own dev box (as long as you're building from _master_ instead of _release/..._). Installing this onto a project targeting an official Preview build would not work, as official Preview builds come from the _release_ branch. + +It's possible that installing the package might fail with an error similar to that seen below. + +```txt +install-package : NU1605: Detected package downgrade: Microsoft.NETCore.Platforms from 3.0.0-preview6.19251.6 to 3.0.0-preview6.19223.2. Reference the package directly from the project to select a different version. +``` + +This can occur if the NuGet client attempts to install a newer version of the package than allowed by the coreclr / corefx your application is targeting. For now you can work around this error by specifying the explicit package version in the install command. Match the version passed to the NuGet client (shown below) to the version specified in the error message (shown above). + +```ps +install-package System.Utf8String.Experimental -prerelease -source https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json -version 3.0.0-preview6.19223.2 +``` + +Not all of the APIs are hooked up yet, but we have some preliminary APIs that allow experimentation with the feature, including basic creation and inspection of `Utf8String` instances, wrapping a `ReadOnlySpan` or a `ReadOnlyMemory` around a `Utf8String` instance, and passing a `Utf8String` instance through `HttpClient`. Full list of APIs available at https://github.com/dotnet/corefx/blob/master/src/System.Utf8String.Experimental/ref/System.Utf8String.cs. + +Certain language features also work as expected. + +```cs +Utf8String s1 = new Utf8String(/* ... */); + +// range indexers work +Utf8String s2 = s1[2..5]; + +// as does pinning +fixed (byte* pUtf8 = s1) { /* use 'pUtf8' here */ } + +// and allocating a GCHandle +GCHandle handle = GCHandle.Alloc(s1, GCHandleType.Pinned); +``` + +For more information on the feature, see https://github.com/dotnet/corefx/issues/30503. From 23c22eb9c6838e5e4ce24ffbc97085e797942da3 Mon Sep 17 00:00:00 2001 From: Tanner Gooding Date: Fri, 3 May 2019 19:11:07 -0700 Subject: [PATCH 209/607] Regenerating the System.Runtime.Intrinsics and System.Numerics.Vectors reference assemblies (#37424) * Renaming System.Runtime.Intrinsics.cs to System.Runtime.Intrinsics.Experimental.cs * Updating GenerateReferenceSource to pass through LangVersion * Regenerating the System.Numerics.Vectors ref assembly --- Directory.Build.targets | 1 + .../ref/System.Numerics.Vectors.cs | 110 +++++++++--------- ...System.Runtime.Intrinsics.Experimental.cs} | 0 ...tem.Runtime.Intrinsics.Experimental.csproj | 2 +- 4 files changed, 57 insertions(+), 56 deletions(-) rename src/System.Runtime.Intrinsics.Experimental/ref/{System.Runtime.Intrinsics.cs => System.Runtime.Intrinsics.Experimental.cs} (100%) diff --git a/Directory.Build.targets b/Directory.Build.targets index 8591539bf844..d58e963d4487 100644 --- a/Directory.Build.targets +++ b/Directory.Build.targets @@ -170,6 +170,7 @@ <_GenAPICmd>$(_GenAPICmd) --out "$(_RefSourceFileOutputPath)" <_GenAPICmd>$(_GenAPICmd) --exclude-attributes-list "$(_ExcludeAPIList)" <_GenAPICmd>$(_GenAPICmd) --header-file "$(_LicenseHeaderTxtPath)" + <_GenAPICmd Condition="'$(LangVersion)' != ''">$(_GenAPICmd) --lang-version "$(LangVersion)" diff --git a/src/System.Numerics.Vectors/ref/System.Numerics.Vectors.cs b/src/System.Numerics.Vectors/ref/System.Numerics.Vectors.cs index 5765d185439e..1202bab3e86e 100644 --- a/src/System.Numerics.Vectors/ref/System.Numerics.Vectors.cs +++ b/src/System.Numerics.Vectors/ref/System.Numerics.Vectors.cs @@ -17,8 +17,8 @@ public partial struct Matrix3x2 : System.IEquatable public float M32; public Matrix3x2(float m11, float m12, float m21, float m22, float m31, float m32) { throw null; } public static System.Numerics.Matrix3x2 Identity { get { throw null; } } - public bool IsIdentity { get { throw null; } } - public System.Numerics.Vector2 Translation { get { throw null; } set { } } + public readonly bool IsIdentity { get { throw null; } } + public System.Numerics.Vector2 Translation { readonly get { throw null; } set { } } public static System.Numerics.Matrix3x2 Add(System.Numerics.Matrix3x2 value1, System.Numerics.Matrix3x2 value2) { throw null; } public static System.Numerics.Matrix3x2 CreateRotation(float radians) { throw null; } public static System.Numerics.Matrix3x2 CreateRotation(float radians, System.Numerics.Vector2 centerPoint) { throw null; } @@ -32,10 +32,10 @@ public partial struct Matrix3x2 : System.IEquatable public static System.Numerics.Matrix3x2 CreateSkew(float radiansX, float radiansY, System.Numerics.Vector2 centerPoint) { throw null; } public static System.Numerics.Matrix3x2 CreateTranslation(System.Numerics.Vector2 position) { throw null; } public static System.Numerics.Matrix3x2 CreateTranslation(float xPosition, float yPosition) { throw null; } - public bool Equals(System.Numerics.Matrix3x2 other) { throw null; } - public override bool Equals(object obj) { throw null; } - public float GetDeterminant() { throw null; } - public override int GetHashCode() { throw null; } + public readonly bool Equals(System.Numerics.Matrix3x2 other) { throw null; } + public override readonly bool Equals(object obj) { throw null; } + public readonly float GetDeterminant() { throw null; } + public override readonly int GetHashCode() { throw null; } public static bool Invert(System.Numerics.Matrix3x2 matrix, out System.Numerics.Matrix3x2 result) { throw null; } public static System.Numerics.Matrix3x2 Lerp(System.Numerics.Matrix3x2 matrix1, System.Numerics.Matrix3x2 matrix2, float amount) { throw null; } public static System.Numerics.Matrix3x2 Multiply(System.Numerics.Matrix3x2 value1, System.Numerics.Matrix3x2 value2) { throw null; } @@ -49,7 +49,7 @@ public partial struct Matrix3x2 : System.IEquatable public static System.Numerics.Matrix3x2 operator -(System.Numerics.Matrix3x2 value1, System.Numerics.Matrix3x2 value2) { throw null; } public static System.Numerics.Matrix3x2 operator -(System.Numerics.Matrix3x2 value) { throw null; } public static System.Numerics.Matrix3x2 Subtract(System.Numerics.Matrix3x2 value1, System.Numerics.Matrix3x2 value2) { throw null; } - public override string ToString() { throw null; } + public override readonly string ToString() { throw null; } } public partial struct Matrix4x4 : System.IEquatable { @@ -72,8 +72,8 @@ public partial struct Matrix4x4 : System.IEquatable public Matrix4x4(System.Numerics.Matrix3x2 value) { throw null; } public Matrix4x4(float m11, float m12, float m13, float m14, float m21, float m22, float m23, float m24, float m31, float m32, float m33, float m34, float m41, float m42, float m43, float m44) { throw null; } public static System.Numerics.Matrix4x4 Identity { get { throw null; } } - public bool IsIdentity { get { throw null; } } - public System.Numerics.Vector3 Translation { get { throw null; } set { } } + public readonly bool IsIdentity { get { throw null; } } + public System.Numerics.Vector3 Translation { readonly get { throw null; } set { } } public static System.Numerics.Matrix4x4 Add(System.Numerics.Matrix4x4 value1, System.Numerics.Matrix4x4 value2) { throw null; } public static System.Numerics.Matrix4x4 CreateBillboard(System.Numerics.Vector3 objectPosition, System.Numerics.Vector3 cameraPosition, System.Numerics.Vector3 cameraUpVector, System.Numerics.Vector3 cameraForwardVector) { throw null; } public static System.Numerics.Matrix4x4 CreateConstrainedBillboard(System.Numerics.Vector3 objectPosition, System.Numerics.Vector3 cameraPosition, System.Numerics.Vector3 rotateAxis, System.Numerics.Vector3 cameraForwardVector, System.Numerics.Vector3 objectForwardVector) { throw null; } @@ -104,10 +104,10 @@ public partial struct Matrix4x4 : System.IEquatable public static System.Numerics.Matrix4x4 CreateTranslation(float xPosition, float yPosition, float zPosition) { throw null; } public static System.Numerics.Matrix4x4 CreateWorld(System.Numerics.Vector3 position, System.Numerics.Vector3 forward, System.Numerics.Vector3 up) { throw null; } public static bool Decompose(System.Numerics.Matrix4x4 matrix, out System.Numerics.Vector3 scale, out System.Numerics.Quaternion rotation, out System.Numerics.Vector3 translation) { throw null; } - public bool Equals(System.Numerics.Matrix4x4 other) { throw null; } - public override bool Equals(object obj) { throw null; } - public float GetDeterminant() { throw null; } - public override int GetHashCode() { throw null; } + public readonly bool Equals(System.Numerics.Matrix4x4 other) { throw null; } + public override readonly bool Equals(object obj) { throw null; } + public readonly float GetDeterminant() { throw null; } + public override readonly int GetHashCode() { throw null; } public static bool Invert(System.Numerics.Matrix4x4 matrix, out System.Numerics.Matrix4x4 result) { throw null; } public static System.Numerics.Matrix4x4 Lerp(System.Numerics.Matrix4x4 matrix1, System.Numerics.Matrix4x4 matrix2, float amount) { throw null; } public static System.Numerics.Matrix4x4 Multiply(System.Numerics.Matrix4x4 value1, System.Numerics.Matrix4x4 value2) { throw null; } @@ -121,7 +121,7 @@ public partial struct Matrix4x4 : System.IEquatable public static System.Numerics.Matrix4x4 operator -(System.Numerics.Matrix4x4 value1, System.Numerics.Matrix4x4 value2) { throw null; } public static System.Numerics.Matrix4x4 operator -(System.Numerics.Matrix4x4 value) { throw null; } public static System.Numerics.Matrix4x4 Subtract(System.Numerics.Matrix4x4 value1, System.Numerics.Matrix4x4 value2) { throw null; } - public override string ToString() { throw null; } + public override readonly string ToString() { throw null; } public static System.Numerics.Matrix4x4 Transform(System.Numerics.Matrix4x4 value, System.Numerics.Quaternion rotation) { throw null; } public static System.Numerics.Matrix4x4 Transpose(System.Numerics.Matrix4x4 matrix) { throw null; } } @@ -136,13 +136,13 @@ public partial struct Plane : System.IEquatable public static float Dot(System.Numerics.Plane plane, System.Numerics.Vector4 value) { throw null; } public static float DotCoordinate(System.Numerics.Plane plane, System.Numerics.Vector3 value) { throw null; } public static float DotNormal(System.Numerics.Plane plane, System.Numerics.Vector3 value) { throw null; } - public bool Equals(System.Numerics.Plane other) { throw null; } - public override bool Equals(object obj) { throw null; } - public override int GetHashCode() { throw null; } + public readonly bool Equals(System.Numerics.Plane other) { throw null; } + public override readonly bool Equals(object obj) { throw null; } + public override readonly int GetHashCode() { throw null; } public static System.Numerics.Plane Normalize(System.Numerics.Plane value) { throw null; } public static bool operator ==(System.Numerics.Plane value1, System.Numerics.Plane value2) { throw null; } public static bool operator !=(System.Numerics.Plane value1, System.Numerics.Plane value2) { throw null; } - public override string ToString() { throw null; } + public override readonly string ToString() { throw null; } public static System.Numerics.Plane Transform(System.Numerics.Plane plane, System.Numerics.Matrix4x4 matrix) { throw null; } public static System.Numerics.Plane Transform(System.Numerics.Plane plane, System.Numerics.Quaternion rotation) { throw null; } } @@ -155,7 +155,7 @@ public partial struct Quaternion : System.IEquatable public Quaternion(System.Numerics.Vector3 vectorPart, float scalarPart) { throw null; } public Quaternion(float x, float y, float z, float w) { throw null; } public static System.Numerics.Quaternion Identity { get { throw null; } } - public bool IsIdentity { get { throw null; } } + public readonly bool IsIdentity { get { throw null; } } public static System.Numerics.Quaternion Add(System.Numerics.Quaternion value1, System.Numerics.Quaternion value2) { throw null; } public static System.Numerics.Quaternion Concatenate(System.Numerics.Quaternion value1, System.Numerics.Quaternion value2) { throw null; } public static System.Numerics.Quaternion Conjugate(System.Numerics.Quaternion value) { throw null; } @@ -164,12 +164,12 @@ public partial struct Quaternion : System.IEquatable public static System.Numerics.Quaternion CreateFromYawPitchRoll(float yaw, float pitch, float roll) { throw null; } public static System.Numerics.Quaternion Divide(System.Numerics.Quaternion value1, System.Numerics.Quaternion value2) { throw null; } public static float Dot(System.Numerics.Quaternion quaternion1, System.Numerics.Quaternion quaternion2) { throw null; } - public bool Equals(System.Numerics.Quaternion other) { throw null; } - public override bool Equals(object obj) { throw null; } - public override int GetHashCode() { throw null; } + public readonly bool Equals(System.Numerics.Quaternion other) { throw null; } + public override readonly bool Equals(object obj) { throw null; } + public override readonly int GetHashCode() { throw null; } public static System.Numerics.Quaternion Inverse(System.Numerics.Quaternion value) { throw null; } - public float Length() { throw null; } - public float LengthSquared() { throw null; } + public readonly float Length() { throw null; } + public readonly float LengthSquared() { throw null; } public static System.Numerics.Quaternion Lerp(System.Numerics.Quaternion quaternion1, System.Numerics.Quaternion quaternion2, float amount) { throw null; } public static System.Numerics.Quaternion Multiply(System.Numerics.Quaternion value1, System.Numerics.Quaternion value2) { throw null; } public static System.Numerics.Quaternion Multiply(System.Numerics.Quaternion value1, float value2) { throw null; } @@ -185,7 +185,7 @@ public partial struct Quaternion : System.IEquatable public static System.Numerics.Quaternion operator -(System.Numerics.Quaternion value) { throw null; } public static System.Numerics.Quaternion Slerp(System.Numerics.Quaternion quaternion1, System.Numerics.Quaternion quaternion2, float amount) { throw null; } public static System.Numerics.Quaternion Subtract(System.Numerics.Quaternion value1, System.Numerics.Quaternion value2) { throw null; } - public override string ToString() { throw null; } + public override readonly string ToString() { throw null; } } public static partial class Vector { @@ -307,18 +307,18 @@ public partial struct Vector2 : System.IEquatable, Syst public static System.Numerics.Vector2 Abs(System.Numerics.Vector2 value) { throw null; } public static System.Numerics.Vector2 Add(System.Numerics.Vector2 left, System.Numerics.Vector2 right) { throw null; } public static System.Numerics.Vector2 Clamp(System.Numerics.Vector2 value1, System.Numerics.Vector2 min, System.Numerics.Vector2 max) { throw null; } - public void CopyTo(float[] array) { } - public void CopyTo(float[] array, int index) { } + public readonly void CopyTo(float[] array) { } + public readonly void CopyTo(float[] array, int index) { } public static float Distance(System.Numerics.Vector2 value1, System.Numerics.Vector2 value2) { throw null; } public static float DistanceSquared(System.Numerics.Vector2 value1, System.Numerics.Vector2 value2) { throw null; } public static System.Numerics.Vector2 Divide(System.Numerics.Vector2 left, System.Numerics.Vector2 right) { throw null; } public static System.Numerics.Vector2 Divide(System.Numerics.Vector2 left, float divisor) { throw null; } public static float Dot(System.Numerics.Vector2 value1, System.Numerics.Vector2 value2) { throw null; } - public bool Equals(System.Numerics.Vector2 other) { throw null; } - public override bool Equals(object obj) { throw null; } - public override int GetHashCode() { throw null; } - public float Length() { throw null; } - public float LengthSquared() { throw null; } + public readonly bool Equals(System.Numerics.Vector2 other) { throw null; } + public override readonly bool Equals(object obj) { throw null; } + public override readonly int GetHashCode() { throw null; } + public readonly float Length() { throw null; } + public readonly float LengthSquared() { throw null; } public static System.Numerics.Vector2 Lerp(System.Numerics.Vector2 value1, System.Numerics.Vector2 value2, float amount) { throw null; } public static System.Numerics.Vector2 Max(System.Numerics.Vector2 value1, System.Numerics.Vector2 value2) { throw null; } public static System.Numerics.Vector2 Min(System.Numerics.Vector2 value1, System.Numerics.Vector2 value2) { throw null; } @@ -340,9 +340,9 @@ public void CopyTo(float[] array, int index) { } public static System.Numerics.Vector2 Reflect(System.Numerics.Vector2 vector, System.Numerics.Vector2 normal) { throw null; } public static System.Numerics.Vector2 SquareRoot(System.Numerics.Vector2 value) { throw null; } public static System.Numerics.Vector2 Subtract(System.Numerics.Vector2 left, System.Numerics.Vector2 right) { throw null; } - public override string ToString() { throw null; } - public string ToString(string format) { throw null; } - public string ToString(string format, System.IFormatProvider formatProvider) { throw null; } + public override readonly string ToString() { throw null; } + public readonly string ToString(string format) { throw null; } + public readonly string ToString(string format, System.IFormatProvider formatProvider) { throw null; } public static System.Numerics.Vector2 Transform(System.Numerics.Vector2 position, System.Numerics.Matrix3x2 matrix) { throw null; } public static System.Numerics.Vector2 Transform(System.Numerics.Vector2 position, System.Numerics.Matrix4x4 matrix) { throw null; } public static System.Numerics.Vector2 Transform(System.Numerics.Vector2 value, System.Numerics.Quaternion rotation) { throw null; } @@ -365,19 +365,19 @@ public partial struct Vector3 : System.IEquatable, Syst public static System.Numerics.Vector3 Abs(System.Numerics.Vector3 value) { throw null; } public static System.Numerics.Vector3 Add(System.Numerics.Vector3 left, System.Numerics.Vector3 right) { throw null; } public static System.Numerics.Vector3 Clamp(System.Numerics.Vector3 value1, System.Numerics.Vector3 min, System.Numerics.Vector3 max) { throw null; } - public void CopyTo(float[] array) { } - public void CopyTo(float[] array, int index) { } + public readonly void CopyTo(float[] array) { } + public readonly void CopyTo(float[] array, int index) { } public static System.Numerics.Vector3 Cross(System.Numerics.Vector3 vector1, System.Numerics.Vector3 vector2) { throw null; } public static float Distance(System.Numerics.Vector3 value1, System.Numerics.Vector3 value2) { throw null; } public static float DistanceSquared(System.Numerics.Vector3 value1, System.Numerics.Vector3 value2) { throw null; } public static System.Numerics.Vector3 Divide(System.Numerics.Vector3 left, System.Numerics.Vector3 right) { throw null; } public static System.Numerics.Vector3 Divide(System.Numerics.Vector3 left, float divisor) { throw null; } public static float Dot(System.Numerics.Vector3 vector1, System.Numerics.Vector3 vector2) { throw null; } - public bool Equals(System.Numerics.Vector3 other) { throw null; } - public override bool Equals(object obj) { throw null; } - public override int GetHashCode() { throw null; } - public float Length() { throw null; } - public float LengthSquared() { throw null; } + public readonly bool Equals(System.Numerics.Vector3 other) { throw null; } + public override readonly bool Equals(object obj) { throw null; } + public override readonly int GetHashCode() { throw null; } + public readonly float Length() { throw null; } + public readonly float LengthSquared() { throw null; } public static System.Numerics.Vector3 Lerp(System.Numerics.Vector3 value1, System.Numerics.Vector3 value2, float amount) { throw null; } public static System.Numerics.Vector3 Max(System.Numerics.Vector3 value1, System.Numerics.Vector3 value2) { throw null; } public static System.Numerics.Vector3 Min(System.Numerics.Vector3 value1, System.Numerics.Vector3 value2) { throw null; } @@ -399,9 +399,9 @@ public void CopyTo(float[] array, int index) { } public static System.Numerics.Vector3 Reflect(System.Numerics.Vector3 vector, System.Numerics.Vector3 normal) { throw null; } public static System.Numerics.Vector3 SquareRoot(System.Numerics.Vector3 value) { throw null; } public static System.Numerics.Vector3 Subtract(System.Numerics.Vector3 left, System.Numerics.Vector3 right) { throw null; } - public override string ToString() { throw null; } - public string ToString(string format) { throw null; } - public string ToString(string format, System.IFormatProvider formatProvider) { throw null; } + public override readonly string ToString() { throw null; } + public readonly string ToString(string format) { throw null; } + public readonly string ToString(string format, System.IFormatProvider formatProvider) { throw null; } public static System.Numerics.Vector3 Transform(System.Numerics.Vector3 position, System.Numerics.Matrix4x4 matrix) { throw null; } public static System.Numerics.Vector3 Transform(System.Numerics.Vector3 value, System.Numerics.Quaternion rotation) { throw null; } public static System.Numerics.Vector3 TransformNormal(System.Numerics.Vector3 normal, System.Numerics.Matrix4x4 matrix) { throw null; } @@ -425,18 +425,18 @@ public partial struct Vector4 : System.IEquatable, Syst public static System.Numerics.Vector4 Abs(System.Numerics.Vector4 value) { throw null; } public static System.Numerics.Vector4 Add(System.Numerics.Vector4 left, System.Numerics.Vector4 right) { throw null; } public static System.Numerics.Vector4 Clamp(System.Numerics.Vector4 value1, System.Numerics.Vector4 min, System.Numerics.Vector4 max) { throw null; } - public void CopyTo(float[] array) { } - public void CopyTo(float[] array, int index) { } + public readonly void CopyTo(float[] array) { } + public readonly void CopyTo(float[] array, int index) { } public static float Distance(System.Numerics.Vector4 value1, System.Numerics.Vector4 value2) { throw null; } public static float DistanceSquared(System.Numerics.Vector4 value1, System.Numerics.Vector4 value2) { throw null; } public static System.Numerics.Vector4 Divide(System.Numerics.Vector4 left, System.Numerics.Vector4 right) { throw null; } public static System.Numerics.Vector4 Divide(System.Numerics.Vector4 left, float divisor) { throw null; } public static float Dot(System.Numerics.Vector4 vector1, System.Numerics.Vector4 vector2) { throw null; } - public bool Equals(System.Numerics.Vector4 other) { throw null; } - public override bool Equals(object obj) { throw null; } - public override int GetHashCode() { throw null; } - public float Length() { throw null; } - public float LengthSquared() { throw null; } + public readonly bool Equals(System.Numerics.Vector4 other) { throw null; } + public override readonly bool Equals(object obj) { throw null; } + public override readonly int GetHashCode() { throw null; } + public readonly float Length() { throw null; } + public readonly float LengthSquared() { throw null; } public static System.Numerics.Vector4 Lerp(System.Numerics.Vector4 value1, System.Numerics.Vector4 value2, float amount) { throw null; } public static System.Numerics.Vector4 Max(System.Numerics.Vector4 value1, System.Numerics.Vector4 value2) { throw null; } public static System.Numerics.Vector4 Min(System.Numerics.Vector4 value1, System.Numerics.Vector4 value2) { throw null; } @@ -457,9 +457,9 @@ public void CopyTo(float[] array, int index) { } public static System.Numerics.Vector4 operator -(System.Numerics.Vector4 value) { throw null; } public static System.Numerics.Vector4 SquareRoot(System.Numerics.Vector4 value) { throw null; } public static System.Numerics.Vector4 Subtract(System.Numerics.Vector4 left, System.Numerics.Vector4 right) { throw null; } - public override string ToString() { throw null; } - public string ToString(string format) { throw null; } - public string ToString(string format, System.IFormatProvider formatProvider) { throw null; } + public override readonly string ToString() { throw null; } + public readonly string ToString(string format) { throw null; } + public readonly string ToString(string format, System.IFormatProvider formatProvider) { throw null; } public static System.Numerics.Vector4 Transform(System.Numerics.Vector2 position, System.Numerics.Matrix4x4 matrix) { throw null; } public static System.Numerics.Vector4 Transform(System.Numerics.Vector2 value, System.Numerics.Quaternion rotation) { throw null; } public static System.Numerics.Vector4 Transform(System.Numerics.Vector3 position, System.Numerics.Matrix4x4 matrix) { throw null; } diff --git a/src/System.Runtime.Intrinsics.Experimental/ref/System.Runtime.Intrinsics.cs b/src/System.Runtime.Intrinsics.Experimental/ref/System.Runtime.Intrinsics.Experimental.cs similarity index 100% rename from src/System.Runtime.Intrinsics.Experimental/ref/System.Runtime.Intrinsics.cs rename to src/System.Runtime.Intrinsics.Experimental/ref/System.Runtime.Intrinsics.Experimental.cs diff --git a/src/System.Runtime.Intrinsics.Experimental/ref/System.Runtime.Intrinsics.Experimental.csproj b/src/System.Runtime.Intrinsics.Experimental/ref/System.Runtime.Intrinsics.Experimental.csproj index 72462ebbdd76..3372317eda19 100644 --- a/src/System.Runtime.Intrinsics.Experimental/ref/System.Runtime.Intrinsics.Experimental.csproj +++ b/src/System.Runtime.Intrinsics.Experimental/ref/System.Runtime.Intrinsics.Experimental.csproj @@ -6,7 +6,7 @@ netcoreapp-Debug;netcoreapp-Release - + From e21c2b5af100dc5d70ef1777f5de21d0d5a96210 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=A1vid=20Kaya?= Date: Sat, 4 May 2019 04:50:13 +0200 Subject: [PATCH 210/607] Changed File.Copy to throw if destination is a directory on macOS (#36713) (#37428) --- src/System.IO.FileSystem/src/System/IO/FileSystem.Unix.cs | 5 ++--- src/System.IO.FileSystem/tests/File/Copy.cs | 3 ++- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/System.IO.FileSystem/src/System/IO/FileSystem.Unix.cs b/src/System.IO.FileSystem/src/System/IO/FileSystem.Unix.cs index 71fd1834765c..322db16f0407 100644 --- a/src/System.IO.FileSystem/src/System/IO/FileSystem.Unix.cs +++ b/src/System.IO.FileSystem/src/System/IO/FileSystem.Unix.cs @@ -14,11 +14,10 @@ internal static partial class FileSystem public static void CopyFile(string sourceFullPath, string destFullPath, bool overwrite) { - // The destination path may just be a directory into which the file should be copied. - // If it is, append the filename from the source onto the destination directory + // If the destination path points to a directory, we throw to match Windows behaviour if (DirectoryExists(destFullPath)) { - destFullPath = Path.Combine(destFullPath, Path.GetFileName(sourceFullPath)); + throw new IOException(SR.Format(SR.Arg_FileIsDirectory_Name, destFullPath)); } // Copy the contents of the file from the source to the destination, creating the destination in the process diff --git a/src/System.IO.FileSystem/tests/File/Copy.cs b/src/System.IO.FileSystem/tests/File/Copy.cs index 1caca2aae125..b677a6e654c9 100644 --- a/src/System.IO.FileSystem/tests/File/Copy.cs +++ b/src/System.IO.FileSystem/tests/File/Copy.cs @@ -35,8 +35,9 @@ public void EmptyFileName() public void CopyOntoDirectory() { string testFile = GetTestFilePath(); + string targetTestDirectory = Directory.CreateDirectory(GetTestFilePath()).FullName; File.Create(testFile).Dispose(); - Assert.Throws(() => Copy(testFile, TestDirectory)); + Assert.Throws(() => Copy(testFile, targetTestDirectory)); } [Fact] From fcaec7c79abef572985d9b7973e4a8c6a6384f41 Mon Sep 17 00:00:00 2001 From: Charles Stoner Date: Fri, 3 May 2019 22:53:18 -0700 Subject: [PATCH 211/607] Port several Interaction methods (#37436) --- .../ref/Microsoft.VisualBasic.Core.cs | 3 + .../Helpers/UnsafeNativeMethods.vb | 4 ++ .../src/Microsoft/VisualBasic/Interaction.vb | 70 +++++++++++++++++++ .../tests/InteractionTests.cs | 25 +++++++ .../ApplicationServices/AssemblyInfoTests.cs | 2 +- 5 files changed, 103 insertions(+), 1 deletion(-) diff --git a/src/Microsoft.VisualBasic.Core/ref/Microsoft.VisualBasic.Core.cs b/src/Microsoft.VisualBasic.Core/ref/Microsoft.VisualBasic.Core.cs index 1b62f90fb88e..00fde3f4c2d4 100644 --- a/src/Microsoft.VisualBasic.Core/ref/Microsoft.VisualBasic.Core.cs +++ b/src/Microsoft.VisualBasic.Core/ref/Microsoft.VisualBasic.Core.cs @@ -461,7 +461,10 @@ internal Information() { } public sealed partial class Interaction { internal Interaction() { } + public static void Beep() { } public static object CallByName(object ObjectRef, string ProcName, CallType UseCallType, params object[] Args) { throw null; } + public static object CreateObject(string ProgId, string ServerName = "") { throw null; } + public static object IIf(bool Expression, object TruePart, object FalsePart) { throw null; } } public enum MsgBoxResult { diff --git a/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/Helpers/UnsafeNativeMethods.vb b/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/Helpers/UnsafeNativeMethods.vb index fea304860851..f5d5b389f4d6 100644 --- a/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/Helpers/UnsafeNativeMethods.vb +++ b/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/Helpers/UnsafeNativeMethods.vb @@ -44,6 +44,10 @@ Namespace Microsoft.VisualBasic.CompilerServices ByVal vt As Int16) End Sub + + Friend Shared Function MessageBeep(ByVal uType As Integer) As Integer + End Function + Friend Shared Function SetLocalTime(ByVal systime As NativeTypes.SystemTime) As Integer End Function diff --git a/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/Interaction.vb b/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/Interaction.vb index 97d8c5e50088..2b67161968a8 100644 --- a/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/Interaction.vb +++ b/src/Microsoft.VisualBasic.Core/src/Microsoft/VisualBasic/Interaction.vb @@ -3,12 +3,36 @@ ' See the LICENSE file in the project root for more information. Imports System +Imports System.Runtime.InteropServices + +Imports Microsoft.VisualBasic.CompilerServices +Imports Microsoft.VisualBasic.CompilerServices.ExceptionUtils Imports Microsoft.VisualBasic.CompilerServices.Utils Namespace Microsoft.VisualBasic Public Module Interaction + '============================================================================ + ' User interaction functions. + '============================================================================ + + Public Sub Beep() +#If PLATFORM_WINDOWS Then + UnsafeNativeMethods.MessageBeep(0) +#Else + Throw New PlatformNotSupportedException() +#End If + End Sub + + Public Function IIf(ByVal Expression As Boolean, ByVal TruePart As Object, ByVal FalsePart As Object) As Object + If Expression Then + Return TruePart + End If + + Return FalsePart + End Function + Friend Function IIf(Of T)(ByVal condition As Boolean, ByVal truePart As T, ByVal falsePart As T) As T If condition Then Return truePart @@ -17,6 +41,52 @@ Namespace Microsoft.VisualBasic Return falsePart End Function + Public Function CreateObject(ByVal ProgId As String, Optional ByVal ServerName As String = "") As Object + 'Creates local or remote COM2 objects. Should not be used to create COM+ objects. + 'Applications that need to be STA should set STA either on their Sub Main via STAThreadAttribute + 'or through Thread.CurrentThread.ApartmentState - the VB runtime will not change this. + 'DO NOT SET THREAD STATE - Thread.CurrentThread.ApartmentState = ApartmentState.STA + + Dim t As Type + + If ProgId.Length = 0 Then + Throw VbMakeException(vbErrors.CantCreateObject) + End If + + If ServerName Is Nothing OrElse ServerName.Length = 0 Then + ServerName = Nothing + Else + 'Does the ServerName match the MachineName? + If String.Compare(Environment.MachineName, ServerName, StringComparison.OrdinalIgnoreCase) = 0 Then + ServerName = Nothing + End If + End If + + Try + If ServerName Is Nothing Then + t = Type.GetTypeFromProgID(ProgId) + Else + t = Type.GetTypeFromProgID(ProgId, ServerName, True) + End If + + Return System.Activator.CreateInstance(t) + Catch e As COMException + If e.ErrorCode = &H800706BA Then '&H800706BA = The RPC Server is unavailable + Throw VbMakeException(vbErrors.ServerNotFound) + Else + Throw VbMakeException(vbErrors.CantCreateObject) + End If + Catch ex As StackOverflowException + Throw ex + Catch ex As OutOfMemoryException + Throw ex + Catch ex As System.Threading.ThreadAbortException + Throw ex + Catch e As Exception + Throw VbMakeException(vbErrors.CantCreateObject) + End Try + End Function + '============================================================================ ' Object/latebound functions. '============================================================================ diff --git a/src/Microsoft.VisualBasic.Core/tests/InteractionTests.cs b/src/Microsoft.VisualBasic.Core/tests/InteractionTests.cs index b5b09f010987..5f540bfb089b 100644 --- a/src/Microsoft.VisualBasic.Core/tests/InteractionTests.cs +++ b/src/Microsoft.VisualBasic.Core/tests/InteractionTests.cs @@ -73,5 +73,30 @@ public object this[object index] set { Value = (int)value + (int)index; } } } + + [Fact] + public void CreateObject() + { + Assert.Throws(() => Interaction.CreateObject(null)); + Assert.Throws(() => Interaction.CreateObject("")); + // Not tested: valid ProgID. + } + + [Theory] + [MemberData(nameof(IIf_TestData))] + public void IIf(bool expression, object truePart, object falsePart, object expected) + { + Assert.Equal(expected, Interaction.IIf(expression, truePart, falsePart)); + } + + private static IEnumerable IIf_TestData() + { + yield return new object[] { false, 1, null, null }; + yield return new object[] { true, 1, null, 1 }; + yield return new object[] { false, null, 2, 2 }; + yield return new object[] { true, null, 2, null }; + yield return new object[] { false, 3, "str", "str" }; + yield return new object[] { true, 3, "str", 3 }; + } } } diff --git a/src/Microsoft.VisualBasic.Core/tests/Microsoft/VisualBasic/ApplicationServices/AssemblyInfoTests.cs b/src/Microsoft.VisualBasic.Core/tests/Microsoft/VisualBasic/ApplicationServices/AssemblyInfoTests.cs index 26d02458dee7..33daf4ceee86 100644 --- a/src/Microsoft.VisualBasic.Core/tests/Microsoft/VisualBasic/ApplicationServices/AssemblyInfoTests.cs +++ b/src/Microsoft.VisualBasic.Core/tests/Microsoft/VisualBasic/ApplicationServices/AssemblyInfoTests.cs @@ -59,7 +59,7 @@ public void StackTrace() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.Uap)] + [SkipOnTargetFramework(TargetFrameworkMonikers.Uap)] // Retrieving local process info is not supported on UWP. public void WorkingSet() { // Property is independent of the actual assembly. From 017f2d7cde7fa316cc8bafae4e49560b611073ee Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Sat, 4 May 2019 13:39:13 +0000 Subject: [PATCH 212/607] Update dependencies from https://github.com/dotnet/coreclr build 20190503.71 (#37442) - Microsoft.NET.Sdk.IL - 3.0.0-preview6-27703-71 - Microsoft.NETCore.ILAsm - 3.0.0-preview6-27703-71 - Microsoft.NETCore.Runtime.CoreCLR - 3.0.0-preview6-27703-71 --- eng/Version.Details.xml | 12 ++++++------ eng/Versions.props | 4 ++-- global.json | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index c3d28f894487..c4b37735ffb7 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -1,16 +1,16 @@ - + https://github.com/dotnet/coreclr - 299c9d5733368d101882eb89d897c88f094997c1 + 964461ca69639003914fd4fedaf08baf1f388f7e - + https://github.com/dotnet/coreclr - 299c9d5733368d101882eb89d897c88f094997c1 + 964461ca69639003914fd4fedaf08baf1f388f7e - + https://github.com/dotnet/coreclr - 299c9d5733368d101882eb89d897c88f094997c1 + 964461ca69639003914fd4fedaf08baf1f388f7e diff --git a/eng/Versions.props b/eng/Versions.props index 20c9e028c7b8..bb97a60cac57 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -40,8 +40,8 @@ 3.0.0-preview6-27703-02 3.0.0-preview6-27703-02 - 3.0.0-preview6-27702-72 - 3.0.0-preview6-27702-72 + 3.0.0-preview6-27703-71 + 3.0.0-preview6-27703-71 3.0.0-preview6.19252.9 4.6.0-preview6.19252.9 diff --git a/global.json b/global.json index b2fd58a02dab..41f2afd58f5a 100644 --- a/global.json +++ b/global.json @@ -5,6 +5,6 @@ "msbuild-sdks": { "Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19229.8", "Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19229.8", - "Microsoft.NET.Sdk.IL": "3.0.0-preview6-27702-72" + "Microsoft.NET.Sdk.IL": "3.0.0-preview6-27703-71" } } From 21d37e982026c3a979121d7f831814588bbd5783 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Sat, 4 May 2019 14:01:30 +0000 Subject: [PATCH 213/607] [master] Update dependencies from dnceng/internal/dotnet-optimization (#37408) * Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-optimization build 20190503.1 - optimization.windows_nt-x64.IBC.CoreFx - 99.99.99-master-20190503.1 * Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-optimization build 20190504.1 - optimization.windows_nt-x64.IBC.CoreFx - 99.99.99-master-20190504.1 --- eng/Version.Details.xml | 4 ++-- eng/Versions.props | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index c4b37735ffb7..d236fbdbafee 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -94,9 +94,9 @@ https://github.com/dotnet/arcade a7a250e9c13147134543c35fef2fb81f19592edf - + https://dev.azure.com/dnceng/internal/_git/dotnet-optimization - dbd52181d77b595c15dbf1cf0fd403f45528b2b5 + e8942bef6d28b9ca4eed093e1501264b85451e8a diff --git a/eng/Versions.props b/eng/Versions.props index bb97a60cac57..e09780e24f5d 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -48,6 +48,6 @@ 2.1.0-prerelease.19230.1 - 99.99.99-master-20190501.1 + 99.99.99-master-20190504.1 From 742d6367892167256617de5c3c7b9b1eae67bea2 Mon Sep 17 00:00:00 2001 From: Maryam Ariyan Date: Sat, 4 May 2019 07:33:21 -0700 Subject: [PATCH 214/607] System.Data.OleDb.Tests.OleDbConnectionTests.GetSchema failed in CI (#37438) Fixes #37411 - Remove small bit of dead code. - Add test and cleanup test code - Fix System.Data.OleDb.Tests.OleDbConnectionTests.GetSchema failure on CI --- src/System.Data.OleDb/src/OleDbDataReader.cs | 1 - src/System.Data.OleDb/src/OleDb_Enum.cs | 22 ------ .../Data/ProviderBase/DbMetaDataFactory.cs | 1 - src/System.Data.OleDb/tests/Helpers.cs | 1 + .../tests/OleDbCommandBuilderTests.cs | 32 +++----- .../tests/OleDbCommandTests.cs | 12 +++ .../tests/OleDbConnectionTests.cs | 48 ++++++------ .../tests/OleDbDataAdapterTests.cs | 11 +-- .../tests/OleDbDataReaderTests.cs | 75 +++---------------- 9 files changed, 62 insertions(+), 141 deletions(-) diff --git a/src/System.Data.OleDb/src/OleDbDataReader.cs b/src/System.Data.OleDb/src/OleDbDataReader.cs index f46affc22587..4c16e74e6b52 100644 --- a/src/System.Data.OleDb/src/OleDbDataReader.cs +++ b/src/System.Data.OleDb/src/OleDbDataReader.cs @@ -1623,7 +1623,6 @@ private Bindings[] CreateBindingsFromMetaData(bool allowMultipleAccessor) short getType = info.type.wType; Debug.Assert(NativeDBType.STR != getType, "Should have bound as WSTR"); - Debug.Assert(!NativeDBType.HasHighBit(getType), "CreateAccessor - unexpected high bits on datatype"); if (-1 != info.size) { diff --git a/src/System.Data.OleDb/src/OleDb_Enum.cs b/src/System.Data.OleDb/src/OleDb_Enum.cs index 9e93e62d1781..8c575941943a 100644 --- a/src/System.Data.OleDb/src/OleDb_Enum.cs +++ b/src/System.Data.OleDb/src/OleDb_Enum.cs @@ -88,28 +88,6 @@ sealed internal class NativeDBType // high mask internal const short HighMask = unchecked((short)0xf000); - static internal bool HasHighBit(short value) - { - return (0 != (HighMask & value)); - } - /* - static internal bool IsArray(short value) { - return (ARRAY == (HighMask & value)); - } - static internal bool IsByRef(short value) { - return (BYREF == (HighMask & value)); - } - static internal bool IsReserved(short value) { - return (RESERVED == (HighMask & value)); - } - static internal bool IsVector(short value) { - return (VECTOR == (HighMask & value)); - } - static internal int GetLowBits(short value) { - return (value & ~HighMask); - } - */ - private const string S_BINARY = "DBTYPE_BINARY"; // DBTYPE_BYTES private const string S_BOOL = "DBTYPE_BOOL"; private const string S_BSTR = "DBTYPE_BSTR"; diff --git a/src/System.Data.OleDb/src/System/Data/ProviderBase/DbMetaDataFactory.cs b/src/System.Data.OleDb/src/System/Data/ProviderBase/DbMetaDataFactory.cs index 69bed5c9daeb..e028e7bcc229 100644 --- a/src/System.Data.OleDb/src/System/Data/ProviderBase/DbMetaDataFactory.cs +++ b/src/System.Data.OleDb/src/System/Data/ProviderBase/DbMetaDataFactory.cs @@ -416,7 +416,6 @@ virtual public DataTable GetSchema(DbConnection connection, string collectionNam { Debug.Assert(_metaDataCollectionsDataSet != null); - //TODO: MarkAsh or EnzoL should review this code for efficency. DataTable metaDataCollectionsTable = _metaDataCollectionsDataSet.Tables[DbMetaDataCollectionNames.MetaDataCollections]; DataColumn populationMechanismColumn = metaDataCollectionsTable.Columns[_populationMechanism]; DataColumn collectionNameColumn = metaDataCollectionsTable.Columns[DbMetaDataColumnNames.CollectionName]; diff --git a/src/System.Data.OleDb/tests/Helpers.cs b/src/System.Data.OleDb/tests/Helpers.cs index ffea07a80775..60ebce81d490 100644 --- a/src/System.Data.OleDb/tests/Helpers.cs +++ b/src/System.Data.OleDb/tests/Helpers.cs @@ -4,6 +4,7 @@ using System; using System.Collections.Generic; using System.Runtime.InteropServices; +using Xunit; namespace System.Data.OleDb.Tests { diff --git a/src/System.Data.OleDb/tests/OleDbCommandBuilderTests.cs b/src/System.Data.OleDb/tests/OleDbCommandBuilderTests.cs index 90cd02179de6..680c95317b14 100644 --- a/src/System.Data.OleDb/tests/OleDbCommandBuilderTests.cs +++ b/src/System.Data.OleDb/tests/OleDbCommandBuilderTests.cs @@ -28,12 +28,9 @@ public void DeriveParameters_NullCommand_Throws(CommandType commandType) using (var cmd = (OleDbCommand)OleDbFactory.Instance.CreateCommand()) { cmd.CommandType = commandType; - var exception = Record.Exception(() => OleDbCommandBuilder.DeriveParameters(cmd)); - Assert.NotNull(exception); - Assert.IsType(exception); - Assert.Equal( - string.Format("{0} DeriveParameters only supports CommandType.StoredProcedure, not CommandType.{1}.", nameof(OleDbCommand), cmd.CommandType.ToString()), - exception.Message); + AssertExtensions.Throws( + () => OleDbCommandBuilder.DeriveParameters(cmd), + $"{nameof(OleDbCommand)} DeriveParameters only supports CommandType.StoredProcedure, not CommandType.{cmd.CommandType.ToString()}."); } } @@ -43,13 +40,10 @@ public void DeriveParameters_NulllCommandText_Throws() using (var cmd = (OleDbCommand)OleDbFactory.Instance.CreateCommand()) { cmd.CommandType = CommandType.StoredProcedure; - cmd.CommandText = null; - var exception = Record.Exception(() => OleDbCommandBuilder.DeriveParameters(cmd)); - Assert.NotNull(exception); - Assert.IsType(exception); - Assert.Equal( - string.Format("{0}: {1} property has not been initialized", nameof(OleDbCommandBuilder.DeriveParameters), nameof(cmd.CommandText)), - exception.Message); + cmd.CommandText = null; + AssertExtensions.Throws( + () => OleDbCommandBuilder.DeriveParameters(cmd), + $"{nameof(OleDbCommandBuilder.DeriveParameters)}: {nameof(cmd.CommandText)} property has not been initialized"); } } @@ -63,12 +57,10 @@ public void DeriveParameters_NullConnection_Throws() cmd.CommandType = CommandType.StoredProcedure; cmd.CommandText = @"SELECT * FROM " + tableName; cmd.Connection = null; - var exception = Record.Exception(() => OleDbCommandBuilder.DeriveParameters(cmd)); - Assert.NotNull(exception); - Assert.IsType(exception); - Assert.Equal( - string.Format("{0}: {1} property has not been initialized.", nameof(OleDbCommandBuilder.DeriveParameters), nameof(cmd.Connection)), - exception.Message); + + AssertExtensions.Throws( + () => OleDbCommandBuilder.DeriveParameters(cmd), + $"{nameof(OleDbCommandBuilder.DeriveParameters)}: {nameof(cmd.Connection)} property has not been initialized."); } }); } @@ -88,7 +80,7 @@ public void DeriveParameters_ClosedConnection_Throws() Assert.NotNull(exception); Assert.IsType(exception); Assert.Contains( - string.Format("{0} requires an open and available Connection.", nameof(OleDbCommandBuilder.DeriveParameters)), + $"{nameof(OleDbCommandBuilder.DeriveParameters)} requires an open and available Connection.", exception.Message); } }); diff --git a/src/System.Data.OleDb/tests/OleDbCommandTests.cs b/src/System.Data.OleDb/tests/OleDbCommandTests.cs index 282c9352c819..d20f3396416d 100644 --- a/src/System.Data.OleDb/tests/OleDbCommandTests.cs +++ b/src/System.Data.OleDb/tests/OleDbCommandTests.cs @@ -13,6 +13,18 @@ namespace System.Data.OleDb.Tests { public class OleDbCommandTests : OleDbTestBase { + [ConditionalFact(Helpers.IsDriverAvailable)] + public void CommandType_SetInvalidValue_Throws() + { + using (var cmd = (OleDbCommand)OleDbFactory.Instance.CreateCommand()) + { + AssertExtensions.Throws( + () => cmd.CommandType = (CommandType)0, + $"The CommandType enumeration value, 0, is invalid.\r\nParameter name: {nameof(cmd.CommandType)}" + ); + } + } + [OuterLoop] [ConditionalFact(Helpers.IsDriverAvailable)] public void CommandType_InvalidType_Throws() diff --git a/src/System.Data.OleDb/tests/OleDbConnectionTests.cs b/src/System.Data.OleDb/tests/OleDbConnectionTests.cs index ed52272f7d70..85380ce32566 100644 --- a/src/System.Data.OleDb/tests/OleDbConnectionTests.cs +++ b/src/System.Data.OleDb/tests/OleDbConnectionTests.cs @@ -113,28 +113,25 @@ public void Provider_SetProperlyFromCtor() } } - [ConditionalFact(Helpers.IsDriverAvailable)] - public void GetSchema() + [ConditionalTheory(Helpers.IsDriverAvailable)] + [InlineData(nameof(DbMetaDataCollectionNames.MetaDataCollections), "CollectionName")] + [InlineData(nameof(DbMetaDataCollectionNames.DataSourceInformation), "CompositeIdentifierSeparatorPattern")] + [InlineData(nameof(DbMetaDataCollectionNames.DataTypes), "TypeName")] + public void GetSchema(string tableName, string columnName) { - using (var oleDbConnection = new OleDbConnection(ConnectionString)) - { - oleDbConnection.Open(); - - DataTable metaDataCollections = oleDbConnection.GetSchema(DbMetaDataCollectionNames.MetaDataCollections); - Assert.True(metaDataCollections != null && metaDataCollections.Rows.Count > 0); - - DataTable metaDataSourceInfo = oleDbConnection.GetSchema(DbMetaDataCollectionNames.DataSourceInformation); - Assert.True(metaDataSourceInfo != null && metaDataSourceInfo.Rows.Count > 0); - - DataTable metaDataTypes = oleDbConnection.GetSchema(DbMetaDataCollectionNames.DataTypes); - Assert.True(metaDataTypes != null && metaDataTypes.Rows.Count > 0); - - DataTable schema = oleDbConnection.GetSchema(); - Assert.True(schema != null && schema.Rows.Count > 0); - - Assert.Throws( - () => oleDbConnection.GetSchema(DbMetaDataCollectionNames.MetaDataCollections, new string[] { new string('a', 5000) } )); - } + DataTable schema = connection.GetSchema(tableName); + Assert.True(schema != null && schema.Rows.Count > 0); + var exception = Record.Exception(() => schema.Rows[0].Field(columnName)); + Assert.Null(exception); + + AssertExtensions.Throws( + () => connection.GetSchema(tableName, new string[] { null }), + $"More restrictions were provided than the requested schema ('{tableName}') supports." + ); + const string MissingColumn = "MissingColumn"; + AssertExtensions.Throws( + () => schema.Rows[0].Field>(MissingColumn), + $"Column '{MissingColumn}' does not belong to table {tableName}."); } [ConditionalFact(Helpers.IsDriverAvailable)] @@ -215,12 +212,9 @@ public void Ctor_InvalidUdlFile_Throws(int start, int length) ConnectionString }.AsSpan(); File.WriteAllLines(udlFile, lines.Slice(start, length).ToArray()); - var exception = Record.Exception(() => new OleDbConnection(@"file name = " + udlFile)); - Assert.NotNull(exception); - Assert.IsType(exception); - Assert.Equal( - "Invalid UDL file.", - exception.Message); + AssertExtensions.Throws( + () => new OleDbConnection(@"file name = " + udlFile), + "Invalid UDL file."); } [ConditionalFact(Helpers.IsDriverAvailable)] diff --git a/src/System.Data.OleDb/tests/OleDbDataAdapterTests.cs b/src/System.Data.OleDb/tests/OleDbDataAdapterTests.cs index bbd2fb45e4dd..d564a81451c0 100644 --- a/src/System.Data.OleDb/tests/OleDbDataAdapterTests.cs +++ b/src/System.Data.OleDb/tests/OleDbDataAdapterTests.cs @@ -132,18 +132,15 @@ public void Fill_OpenDataReader_Throws() Action FillShouldThrow = (shouldFail) => { DataSet ds = new DataSet(); OleDbDataAdapter adapter = new OleDbDataAdapter(command); - var exception = Record.Exception(() => adapter.Fill(ds, tableName)); if (shouldFail) { - Assert.NotNull(exception); - Assert.IsType(exception); - Assert.Equal( - "There is already an open DataReader associated with this Command which must be closed first.", - exception.Message); + AssertExtensions.Throws( + () => adapter.Fill(ds, tableName), + "There is already an open DataReader associated with this Command which must be closed first."); } else { - Assert.Null(exception); + Assert.NotNull(adapter.Fill(ds, tableName)); } }; using (var reader = command.ExecuteReader()) diff --git a/src/System.Data.OleDb/tests/OleDbDataReaderTests.cs b/src/System.Data.OleDb/tests/OleDbDataReaderTests.cs index e73f994f3954..ca8ef4494fdb 100644 --- a/src/System.Data.OleDb/tests/OleDbDataReaderTests.cs +++ b/src/System.Data.OleDb/tests/OleDbDataReaderTests.cs @@ -32,12 +32,9 @@ public void InvalidRowIndex() Assert.True(reader.HasRows); DataTable schema = reader.GetSchemaTable(); Assert.Equal(4, schema.Rows.Count); - var exception = Record.Exception(() => reader.GetString(5)); - Assert.NotNull(exception); - Assert.IsType(exception); - Assert.Equal( - "Index was outside the bounds of the array.", - exception.Message); + AssertExtensions.Throws( + () => reader.GetString(5), + "Index was outside the bounds of the array."); }); } @@ -48,12 +45,9 @@ public void NonExistentColumn() RunTest((reader) => { reader.Read(); Assert.True(reader.HasRows); - var exception = Record.Exception(() => reader["NonExistentColumn"]); - Assert.NotNull(exception); - Assert.IsType(exception); - Assert.Equal( - "NonExistentColumn", - exception.Message); + object obj; + AssertExtensions.Throws( + () => obj = reader["NonExistentColumn"], "NonExistentColumn"); }); } @@ -76,23 +70,13 @@ public void GetValues() [ConditionalFact(Helpers.IsDriverAvailable)] public void EmptyReader_SchemaOnly_EmptyReader() { + const string expectedMessage = "No data exists for the row/column."; RunTest((reader) => { reader.Read(); Assert.False(reader.HasRows); - var exception = Record.Exception(() => reader.GetString(1)); - Assert.NotNull(exception); - Assert.IsType(exception); - Assert.Equal( - "No data exists for the row/column.", - exception.Message); - - var values = new object[1]; - exception = Record.Exception(() => reader.GetValues(values)); - Assert.NotNull(exception); - Assert.IsType(exception); - Assert.Equal( - "No data exists for the row/column.", - exception.Message); + AssertExtensions.Throws(() => reader.GetString(1), expectedMessage); + AssertExtensions.Throws(() => reader.GetValues(new object[1]), expectedMessage); + AssertExtensions.Throws(() => reader.GetData(0), expectedMessage); }, schemaOnly: true); } @@ -207,51 +191,16 @@ public void GetValues_Null_Throws() [OuterLoop] [ConditionalFact(Helpers.IsDriverAvailable)] - public void Depth_IsClosed_Throws() + public void IsClosed_CallReaderApis_Throws() { RunTest((reader) => { reader.Close(); Assert.Throws(() => reader.Depth); - }); - } - - [OuterLoop] - [ConditionalFact(Helpers.IsDriverAvailable)] - public void FieldCount_IsClosed_Throws() - { - RunTest((reader) => { - reader.Close(); Assert.Throws(() => reader.FieldCount); - }); - } - - [OuterLoop] - [ConditionalFact(Helpers.IsDriverAvailable)] - public void VisibleFieldCount_IsClosed_Throws() - { - RunTest((reader) => { - reader.Close(); Assert.Throws(() => reader.VisibleFieldCount); - }); - } - - [OuterLoop] - [ConditionalFact(Helpers.IsDriverAvailable)] - public void HasRows_IsClosed_Throws() - { - RunTest((reader) => { - reader.Close(); Assert.Throws(() => reader.HasRows); - }); - } - - [OuterLoop] - [ConditionalFact(Helpers.IsDriverAvailable)] - public void GetSchemaTable_IsClosed_Throws() - { - RunTest((reader) => { - reader.Close(); Assert.Throws(() => reader.GetSchemaTable()); + Assert.Throws(() => reader.NextResult()); }); } From 4dda7cfd17b95ab3da927a853ec468068f18a231 Mon Sep 17 00:00:00 2001 From: Jose Perez Rodriguez Date: Sat, 4 May 2019 08:00:46 -0700 Subject: [PATCH 215/607] Adding Microsoft.Bcl.HashCode package for .NET Standard 2.0 (#37273) * Adding Microsoft.Compatibility.HashCode package for .NET Standard 2.0 * Fixing package configurations and addressing description comment * Addressing PR Feedback * Renaming to Microsoft.Bcl.HashCode * Addressing more PR feedback --- .../packageIndex.json | 6 + pkg/descriptions.json | 7 + .../Directory.Build.props | 9 ++ .../Microsoft.Bcl.HashCode.sln | 41 ++++++ .../pkg/Microsoft.Bcl.HashCode.pkgproj | 10 ++ .../ref/Configurations.props | 13 ++ .../ref/Microsoft.Bcl.HashCode.Forwards.cs | 5 + .../ref/Microsoft.Bcl.HashCode.cs | 27 ++++ .../ref/Microsoft.Bcl.HashCode.csproj | 14 ++ .../src/BitOperations.cs | 37 ++++++ .../src/Configurations.props | 13 ++ .../src/Interop.GetRandomBytes.cs | 14 ++ .../src/Microsoft.Bcl.HashCode.csproj | 20 +++ .../src/Resources/Strings.resx | 125 ++++++++++++++++++ 14 files changed, 341 insertions(+) create mode 100644 src/Microsoft.Bcl.HashCode/Directory.Build.props create mode 100644 src/Microsoft.Bcl.HashCode/Microsoft.Bcl.HashCode.sln create mode 100644 src/Microsoft.Bcl.HashCode/pkg/Microsoft.Bcl.HashCode.pkgproj create mode 100644 src/Microsoft.Bcl.HashCode/ref/Configurations.props create mode 100644 src/Microsoft.Bcl.HashCode/ref/Microsoft.Bcl.HashCode.Forwards.cs create mode 100644 src/Microsoft.Bcl.HashCode/ref/Microsoft.Bcl.HashCode.cs create mode 100644 src/Microsoft.Bcl.HashCode/ref/Microsoft.Bcl.HashCode.csproj create mode 100644 src/Microsoft.Bcl.HashCode/src/BitOperations.cs create mode 100644 src/Microsoft.Bcl.HashCode/src/Configurations.props create mode 100644 src/Microsoft.Bcl.HashCode/src/Interop.GetRandomBytes.cs create mode 100644 src/Microsoft.Bcl.HashCode/src/Microsoft.Bcl.HashCode.csproj create mode 100644 src/Microsoft.Bcl.HashCode/src/Resources/Strings.resx diff --git a/pkg/Microsoft.Private.PackageBaseline/packageIndex.json b/pkg/Microsoft.Private.PackageBaseline/packageIndex.json index 105fead9722d..b1cfa6cd444e 100644 --- a/pkg/Microsoft.Private.PackageBaseline/packageIndex.json +++ b/pkg/Microsoft.Private.PackageBaseline/packageIndex.json @@ -33,6 +33,12 @@ "1.0.0.0": "1.0.0" } }, + "Microsoft.Bcl.HashCode": { + "InboxOn": {}, + "AssemblyVersionInPackageVersion": { + "1.0.0.0": "1.0.0" + } + }, "Microsoft.Bcl.Json.Sources": { "InboxOn": {} }, diff --git a/pkg/descriptions.json b/pkg/descriptions.json index 24608d0974c4..ca6c9a43039a 100644 --- a/pkg/descriptions.json +++ b/pkg/descriptions.json @@ -30,6 +30,13 @@ "Microsoft.CSharp.RuntimeBinder.CSharpBinderFlags" ] }, + { + "Name": "Microsoft.Bcl.HashCode", + "Description": "Provides the HashCode type for .NET Standard 2.0. This package is not required starting with .NET Standard 2.1 and .NET Core 3.0.", + "CommonTypes": [ + "System.HashCode" + ] + }, { "Name": "Microsoft.Diagnostics.Tracing.EventSource.Redist", "Description": "This package includes the class Microsoft.Diagnostics.Tracing.EventSource which enables firing ETW events from managed code. This is the \"runtime\" or \"redist\" EventSource package and should be referenced directly only by other NuGet packages that need the EventSource functionality. Application developers that need this functionality should instead reference the Microsoft.Diagnostics.Tracing.EventSource NuGet package which provides an enhanced developer experience. diff --git a/src/Microsoft.Bcl.HashCode/Directory.Build.props b/src/Microsoft.Bcl.HashCode/Directory.Build.props new file mode 100644 index 000000000000..2f87c4e4307d --- /dev/null +++ b/src/Microsoft.Bcl.HashCode/Directory.Build.props @@ -0,0 +1,9 @@ + + + + 1.0.0.0 + 1.0.0 + Open + + + diff --git a/src/Microsoft.Bcl.HashCode/Microsoft.Bcl.HashCode.sln b/src/Microsoft.Bcl.HashCode/Microsoft.Bcl.HashCode.sln new file mode 100644 index 000000000000..55acc6138737 --- /dev/null +++ b/src/Microsoft.Bcl.HashCode/Microsoft.Bcl.HashCode.sln @@ -0,0 +1,41 @@ +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.27213.1 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Bcl.HashCode", "src\Microsoft.Bcl.HashCode.csproj", "{B77D0212-D53C-4F7F-8CEC-2E067AC6FCAB}" + ProjectSection(ProjectDependencies) = postProject + {96AA2060-C846-4E56-9509-E8CB9C114C8F} = {96AA2060-C846-4E56-9509-E8CB9C114C8F} + EndProjectSection +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Bcl.HashCode", "ref\Microsoft.Bcl.HashCode.csproj", "{96AA2060-C846-4E56-9509-E8CB9C114C8F}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{E107E9C1-E893-4E87-987E-04EF0DCEAEFD}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{2E666815-2EDB-464B-9DF6-380BF4789AD4}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {B77D0212-D53C-4F7F-8CEC-2E067AC6FCAB}.Debug|Any CPU.ActiveCfg = netcoreapp-Debug|Any CPU + {B77D0212-D53C-4F7F-8CEC-2E067AC6FCAB}.Debug|Any CPU.Build.0 = netcoreapp-Debug|Any CPU + {B77D0212-D53C-4F7F-8CEC-2E067AC6FCAB}.Release|Any CPU.ActiveCfg = netcoreapp-Release|Any CPU + {B77D0212-D53C-4F7F-8CEC-2E067AC6FCAB}.Release|Any CPU.Build.0 = netcoreapp-Release|Any CPU + {96AA2060-C846-4E56-9509-E8CB9C114C8F}.Debug|Any CPU.ActiveCfg = netcoreapp-Debug|Any CPU + {96AA2060-C846-4E56-9509-E8CB9C114C8F}.Debug|Any CPU.Build.0 = netcoreapp-Debug|Any CPU + {96AA2060-C846-4E56-9509-E8CB9C114C8F}.Release|Any CPU.ActiveCfg = netcoreapp-Release|Any CPU + {96AA2060-C846-4E56-9509-E8CB9C114C8F}.Release|Any CPU.Build.0 = netcoreapp-Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {B77D0212-D53C-4F7F-8CEC-2E067AC6FCAB} = {E107E9C1-E893-4E87-987E-04EF0DCEAEFD} + {96AA2060-C846-4E56-9509-E8CB9C114C8F} = {2E666815-2EDB-464B-9DF6-380BF4789AD4} + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {9B2C2F54-126A-4D67-8690-F9E19A1B901F} + EndGlobalSection +EndGlobal diff --git a/src/Microsoft.Bcl.HashCode/pkg/Microsoft.Bcl.HashCode.pkgproj b/src/Microsoft.Bcl.HashCode/pkg/Microsoft.Bcl.HashCode.pkgproj new file mode 100644 index 000000000000..522a67470143 --- /dev/null +++ b/src/Microsoft.Bcl.HashCode/pkg/Microsoft.Bcl.HashCode.pkgproj @@ -0,0 +1,10 @@ + + + + + net461;netcoreapp2.0;uap10.0.16299;$(AllXamarinFrameworks) + + + + + \ No newline at end of file diff --git a/src/Microsoft.Bcl.HashCode/ref/Configurations.props b/src/Microsoft.Bcl.HashCode/ref/Configurations.props new file mode 100644 index 000000000000..1264571929b0 --- /dev/null +++ b/src/Microsoft.Bcl.HashCode/ref/Configurations.props @@ -0,0 +1,13 @@ + + + + netstandard; + netstandard2.1; + netcoreapp2.1; + + + $(PackageConfigurations); + netcoreapp; + + + diff --git a/src/Microsoft.Bcl.HashCode/ref/Microsoft.Bcl.HashCode.Forwards.cs b/src/Microsoft.Bcl.HashCode/ref/Microsoft.Bcl.HashCode.Forwards.cs new file mode 100644 index 000000000000..2ed742de3deb --- /dev/null +++ b/src/Microsoft.Bcl.HashCode/ref/Microsoft.Bcl.HashCode.Forwards.cs @@ -0,0 +1,5 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.HashCode))] \ No newline at end of file diff --git a/src/Microsoft.Bcl.HashCode/ref/Microsoft.Bcl.HashCode.cs b/src/Microsoft.Bcl.HashCode/ref/Microsoft.Bcl.HashCode.cs new file mode 100644 index 000000000000..e211d1a9f2a3 --- /dev/null +++ b/src/Microsoft.Bcl.HashCode/ref/Microsoft.Bcl.HashCode.cs @@ -0,0 +1,27 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. +// ------------------------------------------------------------------------------ +// Changes to this file must follow the http://aka.ms/api-review process. +// ------------------------------------------------------------------------------ + +namespace System +{ + public partial struct HashCode + { + private int _dummyPrimitive; + public void Add(T value) { } + public void Add(T value, System.Collections.Generic.IEqualityComparer comparer) { } + public static int Combine(T1 value1) { throw null; } + public static int Combine(T1 value1, T2 value2) { throw null; } + public static int Combine(T1 value1, T2 value2, T3 value3) { throw null; } + public static int Combine(T1 value1, T2 value2, T3 value3, T4 value4) { throw null; } + public static int Combine(T1 value1, T2 value2, T3 value3, T4 value4, T5 value5) { throw null; } + public static int Combine(T1 value1, T2 value2, T3 value3, T4 value4, T5 value5, T6 value6) { throw null; } + public static int Combine(T1 value1, T2 value2, T3 value3, T4 value4, T5 value5, T6 value6, T7 value7) { throw null; } + public static int Combine(T1 value1, T2 value2, T3 value3, T4 value4, T5 value5, T6 value6, T7 value7, T8 value8) { throw null; } + public override bool Equals(object obj) { throw null; } + public override int GetHashCode() { throw null; } + public int ToHashCode() { throw null; } + } +} diff --git a/src/Microsoft.Bcl.HashCode/ref/Microsoft.Bcl.HashCode.csproj b/src/Microsoft.Bcl.HashCode/ref/Microsoft.Bcl.HashCode.csproj new file mode 100644 index 000000000000..409ce4dfd777 --- /dev/null +++ b/src/Microsoft.Bcl.HashCode/ref/Microsoft.Bcl.HashCode.csproj @@ -0,0 +1,14 @@ + + + {96AA2060-C846-4E56-9509-E8CB9C114C8F} + netcoreapp-Debug;netcoreapp-Release;netcoreapp2.1-Debug;netcoreapp2.1-Release;netstandard-Debug;netstandard-Release;netstandard2.1-Debug;netstandard2.1-Release + + + + + + + + + + \ No newline at end of file diff --git a/src/Microsoft.Bcl.HashCode/src/BitOperations.cs b/src/Microsoft.Bcl.HashCode/src/BitOperations.cs new file mode 100644 index 000000000000..269993251e57 --- /dev/null +++ b/src/Microsoft.Bcl.HashCode/src/BitOperations.cs @@ -0,0 +1,37 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Runtime.CompilerServices; + +namespace System.Numerics +{ + // NOTE: This class is a copy from src\Common\src\CoreLib\System\Numerics\BitOperations.cs only for HashCode purposes. + // Any changes to the BitOperations class should be done in there instead. + internal static class BitOperations + { + /// + /// Rotates the specified value left by the specified number of bits. + /// Similar in behavior to the x86 instruction ROL. + /// + /// The value to rotate. + /// The number of bits to rotate by. + /// Any value outside the range [0..31] is treated as congruent mod 32. + /// The rotated value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint RotateLeft(uint value, int offset) + => (value << offset) | (value >> (32 - offset)); + + /// + /// Rotates the specified value left by the specified number of bits. + /// Similar in behavior to the x86 instruction ROL. + /// + /// The value to rotate. + /// The number of bits to rotate by. + /// Any value outside the range [0..63] is treated as congruent mod 64. + /// The rotated value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong RotateLeft(ulong value, int offset) + => (value << offset) | (value >> (64 - offset)); + } +} diff --git a/src/Microsoft.Bcl.HashCode/src/Configurations.props b/src/Microsoft.Bcl.HashCode/src/Configurations.props new file mode 100644 index 000000000000..1264571929b0 --- /dev/null +++ b/src/Microsoft.Bcl.HashCode/src/Configurations.props @@ -0,0 +1,13 @@ + + + + netstandard; + netstandard2.1; + netcoreapp2.1; + + + $(PackageConfigurations); + netcoreapp; + + + diff --git a/src/Microsoft.Bcl.HashCode/src/Interop.GetRandomBytes.cs b/src/Microsoft.Bcl.HashCode/src/Interop.GetRandomBytes.cs new file mode 100644 index 000000000000..0b24650b483f --- /dev/null +++ b/src/Microsoft.Bcl.HashCode/src/Interop.GetRandomBytes.cs @@ -0,0 +1,14 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; + +internal partial class Interop +{ + internal static unsafe void GetRandomBytes(byte* buffer, int length) + { + byte[] bytes = Guid.NewGuid().ToByteArray(); + buffer = (byte*)BitConverter.ToUInt32(bytes, 0); + } +} diff --git a/src/Microsoft.Bcl.HashCode/src/Microsoft.Bcl.HashCode.csproj b/src/Microsoft.Bcl.HashCode/src/Microsoft.Bcl.HashCode.csproj new file mode 100644 index 000000000000..bc1975586b6f --- /dev/null +++ b/src/Microsoft.Bcl.HashCode/src/Microsoft.Bcl.HashCode.csproj @@ -0,0 +1,20 @@ + + + {B77D0212-D53C-4F7F-8CEC-2E067AC6FCAB} + true + true + $(IsPartialFacadeAssembly) + netcoreapp-Debug;netcoreapp-Release;netcoreapp2.1-Debug;netcoreapp2.1-Release;netstandard-Debug;netstandard-Release;netstandard2.1-Debug;netstandard2.1-Release + + + + ProductionCode\Common\CoreLib\System\HashCode.cs + + + + + + + + + \ No newline at end of file diff --git a/src/Microsoft.Bcl.HashCode/src/Resources/Strings.resx b/src/Microsoft.Bcl.HashCode/src/Resources/Strings.resx new file mode 100644 index 000000000000..1155d69a3a40 --- /dev/null +++ b/src/Microsoft.Bcl.HashCode/src/Resources/Strings.resx @@ -0,0 +1,125 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + HashCode is a mutable struct and should not be compared with other HashCodes. + + + HashCode is a mutable struct and should not be compared with other HashCodes. Use ToHashCode to retrieve the computed hash code. + + From a0ad6436bdbcee831362268fdba99bcc7badd683 Mon Sep 17 00:00:00 2001 From: Jeremy Barton Date: Sat, 4 May 2019 09:39:28 -0700 Subject: [PATCH 216/607] Define X509_CHECK_FLAG_NO_PARTIAL_WILDCARDS on non-portable compat builds --- .../Unix/System.Security.Cryptography.Native/opensslshim.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Native/Unix/System.Security.Cryptography.Native/opensslshim.h b/src/Native/Unix/System.Security.Cryptography.Native/opensslshim.h index 7d88cd7b7f6e..ade4e08abe74 100644 --- a/src/Native/Unix/System.Security.Cryptography.Native/opensslshim.h +++ b/src/Native/Unix/System.Security.Cryptography.Native/opensslshim.h @@ -1039,6 +1039,8 @@ FOR_ALL_OPENSSL_FUNCTIONS #if OPENSSL_VERSION_NUMBER < OPENSSL_VERSION_1_0_2_RTM +#define X509_CHECK_FLAG_NO_PARTIAL_WILDCARDS 4 + #define X509_check_host local_X509_check_host #define X509_STORE_CTX_get0_store local_X509_STORE_CTX_get0_store From 464097cfc9c970c7ce31288fbd7e7cd8930364ca Mon Sep 17 00:00:00 2001 From: Levi Broderick Date: Sat, 4 May 2019 17:02:19 -0700 Subject: [PATCH 217/607] Move System.Text.Encodings.Web inbox (#37398) - netstandard1.0 support is harvested - internal copies of APIs like memmove are removed in favor of in-box implementations --- .../packageIndex.json | 4 +- .../Directory.Build.props | 1 + .../System.Text.Encodings.Web.sln | 29 ++- .../pkg/System.Text.Encodings.Web.pkgproj | 14 +- .../ref/Configurations.props | 12 + .../ref/System.Text.Encodings.Web.cs | 239 ++++++++++++++++++ .../ref/System.Text.Encodings.Web.csproj | 23 ++ .../src/Configurations.props | 5 +- .../src/Properties/AssemblyInfo.cs | 8 - .../src/Properties/GlobalSuppressions.cs | 6 - .../src/System.Text.Encodings.Web.csproj | 9 +- .../Text/Encodings/Web/BufferInternal.cs | 200 --------------- .../System/Text/Encodings/Web/TextEncoder.cs | 8 +- .../tests/BufferInternalTests.cs | 61 ----- .../tests/Configurations.props | 4 +- .../System.Text.Encodings.Web.Tests.csproj | 8 +- .../tests/TemporaryEncoderAdapters.cs | 18 +- .../tests/TextEncoderSettingsTests.cs | 14 +- 18 files changed, 349 insertions(+), 314 deletions(-) create mode 100644 src/System.Text.Encodings.Web/ref/Configurations.props create mode 100644 src/System.Text.Encodings.Web/ref/System.Text.Encodings.Web.cs create mode 100644 src/System.Text.Encodings.Web/ref/System.Text.Encodings.Web.csproj delete mode 100644 src/System.Text.Encodings.Web/src/Properties/AssemblyInfo.cs delete mode 100644 src/System.Text.Encodings.Web/src/Properties/GlobalSuppressions.cs delete mode 100644 src/System.Text.Encodings.Web/src/System/Text/Encodings/Web/BufferInternal.cs delete mode 100644 src/System.Text.Encodings.Web/tests/BufferInternalTests.cs diff --git a/pkg/Microsoft.Private.PackageBaseline/packageIndex.json b/pkg/Microsoft.Private.PackageBaseline/packageIndex.json index b1cfa6cd444e..8a6024e4a7f7 100644 --- a/pkg/Microsoft.Private.PackageBaseline/packageIndex.json +++ b/pkg/Microsoft.Private.PackageBaseline/packageIndex.json @@ -4959,7 +4959,9 @@ "4.5.0" ], "BaselineVersion": "4.5.0", - "InboxOn": {}, + "InboxOn": { + "netcoreapp3.0": "4.0.4.0" + }, "AssemblyVersionInPackageVersion": { "4.0.0.0": "4.0.0", "4.0.1.0": "4.3.0", diff --git a/src/System.Text.Encodings.Web/Directory.Build.props b/src/System.Text.Encodings.Web/Directory.Build.props index 4e60571e9e2a..e3343ce9e05c 100644 --- a/src/System.Text.Encodings.Web/Directory.Build.props +++ b/src/System.Text.Encodings.Web/Directory.Build.props @@ -3,5 +3,6 @@ 4.0.4.0 Open + true \ No newline at end of file diff --git a/src/System.Text.Encodings.Web/System.Text.Encodings.Web.sln b/src/System.Text.Encodings.Web/System.Text.Encodings.Web.sln index a628856a2753..4e6317cc01ac 100644 --- a/src/System.Text.Encodings.Web/System.Text.Encodings.Web.sln +++ b/src/System.Text.Encodings.Web/System.Text.Encodings.Web.sln @@ -1,6 +1,6 @@ Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.27213.1 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.28829.227 MinimumVisualStudioVersion = 10.0.40219.1 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Encodings.Web.Tests", "tests\System.Text.Encodings.Web.Tests.csproj", "{2337A55E-7077-4FBE-8132-2CD8DDC18671}" ProjectSection(ProjectDependencies) = postProject @@ -13,20 +13,28 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{1A2F9F4A EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{E107E9C1-E893-4E87-987E-04EF0DCEAEFD}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{E70569F3-C1DA-4EDE-A850-328BDBFDC59A}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Encodings.Web", "ref\System.Text.Encodings.Web.csproj", "{41648C6D-D431-478D-8228-7EB68714541C}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {2337A55E-7077-4FBE-8132-2CD8DDC18671}.Debug|Any CPU.ActiveCfg = netstandard-Debug|Any CPU - {2337A55E-7077-4FBE-8132-2CD8DDC18671}.Debug|Any CPU.Build.0 = netstandard-Debug|Any CPU - {2337A55E-7077-4FBE-8132-2CD8DDC18671}.Release|Any CPU.ActiveCfg = netstandard-Release|Any CPU - {2337A55E-7077-4FBE-8132-2CD8DDC18671}.Release|Any CPU.Build.0 = netstandard-Release|Any CPU - {B7EDBF00-765A-48E8-B593-CD668288E274}.Debug|Any CPU.ActiveCfg = netstandard-Debug|Any CPU - {B7EDBF00-765A-48E8-B593-CD668288E274}.Debug|Any CPU.Build.0 = netstandard-Debug|Any CPU - {B7EDBF00-765A-48E8-B593-CD668288E274}.Release|Any CPU.ActiveCfg = netstandard-Release|Any CPU - {B7EDBF00-765A-48E8-B593-CD668288E274}.Release|Any CPU.Build.0 = netstandard-Release|Any CPU + {2337A55E-7077-4FBE-8132-2CD8DDC18671}.Debug|Any CPU.ActiveCfg = netcoreapp-Debug|Any CPU + {2337A55E-7077-4FBE-8132-2CD8DDC18671}.Debug|Any CPU.Build.0 = netcoreapp-Debug|Any CPU + {2337A55E-7077-4FBE-8132-2CD8DDC18671}.Release|Any CPU.ActiveCfg = netcoreapp-Release|Any CPU + {2337A55E-7077-4FBE-8132-2CD8DDC18671}.Release|Any CPU.Build.0 = netcoreapp-Release|Any CPU + {B7EDBF00-765A-48E8-B593-CD668288E274}.Debug|Any CPU.ActiveCfg = netcoreapp-Debug|Any CPU + {B7EDBF00-765A-48E8-B593-CD668288E274}.Debug|Any CPU.Build.0 = netcoreapp-Debug|Any CPU + {B7EDBF00-765A-48E8-B593-CD668288E274}.Release|Any CPU.ActiveCfg = netcoreapp-Release|Any CPU + {B7EDBF00-765A-48E8-B593-CD668288E274}.Release|Any CPU.Build.0 = netcoreapp-Release|Any CPU + {41648C6D-D431-478D-8228-7EB68714541C}.Debug|Any CPU.ActiveCfg = netcoreapp-Debug|Any CPU + {41648C6D-D431-478D-8228-7EB68714541C}.Debug|Any CPU.Build.0 = netcoreapp-Debug|Any CPU + {41648C6D-D431-478D-8228-7EB68714541C}.Release|Any CPU.ActiveCfg = netcoreapp-Release|Any CPU + {41648C6D-D431-478D-8228-7EB68714541C}.Release|Any CPU.Build.0 = netcoreapp-Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -34,6 +42,7 @@ Global GlobalSection(NestedProjects) = preSolution {2337A55E-7077-4FBE-8132-2CD8DDC18671} = {1A2F9F4A-A032-433E-B914-ADD5992BB178} {B7EDBF00-765A-48E8-B593-CD668288E274} = {E107E9C1-E893-4E87-987E-04EF0DCEAEFD} + {41648C6D-D431-478D-8228-7EB68714541C} = {E70569F3-C1DA-4EDE-A850-328BDBFDC59A} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {2EFFAFC0-87C3-45D1-88AF-35F0AC866D70} diff --git a/src/System.Text.Encodings.Web/pkg/System.Text.Encodings.Web.pkgproj b/src/System.Text.Encodings.Web/pkg/System.Text.Encodings.Web.pkgproj index 54b7155b6264..9fbfdd61a8b7 100644 --- a/src/System.Text.Encodings.Web/pkg/System.Text.Encodings.Web.pkgproj +++ b/src/System.Text.Encodings.Web/pkg/System.Text.Encodings.Web.pkgproj @@ -1,9 +1,19 @@  - - net45;netcore45;wp8;wpa81;netcoreapp1.0;$(AllXamarinFrameworks) + + net461;netcoreapp2.0;uap10.0.16299;$(AllXamarinFrameworks) + + + + + .NETCoreApp;UAP + \ No newline at end of file diff --git a/src/System.Text.Encodings.Web/ref/Configurations.props b/src/System.Text.Encodings.Web/ref/Configurations.props new file mode 100644 index 000000000000..6a88cfc1ed62 --- /dev/null +++ b/src/System.Text.Encodings.Web/ref/Configurations.props @@ -0,0 +1,12 @@ + + + + netstandard; + + + $(PackageConfigurations); + netcoreapp; + uap; + + + \ No newline at end of file diff --git a/src/System.Text.Encodings.Web/ref/System.Text.Encodings.Web.cs b/src/System.Text.Encodings.Web/ref/System.Text.Encodings.Web.cs new file mode 100644 index 000000000000..804855920a4c --- /dev/null +++ b/src/System.Text.Encodings.Web/ref/System.Text.Encodings.Web.cs @@ -0,0 +1,239 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. +// ------------------------------------------------------------------------------ +// Changes to this file must follow the http://aka.ms/api-review process. +// ------------------------------------------------------------------------------ + +#pragma warning disable CS3011 // Only CLS-compliant members can be abstract + +namespace System.Text.Encodings.Web +{ + public abstract partial class HtmlEncoder : System.Text.Encodings.Web.TextEncoder + { + protected HtmlEncoder() { } + public static System.Text.Encodings.Web.HtmlEncoder Default { get { throw null; } } + public static System.Text.Encodings.Web.HtmlEncoder Create(System.Text.Encodings.Web.TextEncoderSettings settings) { throw null; } + public static System.Text.Encodings.Web.HtmlEncoder Create(params System.Text.Unicode.UnicodeRange[] allowedRanges) { throw null; } + } + public abstract partial class JavaScriptEncoder : System.Text.Encodings.Web.TextEncoder + { + protected JavaScriptEncoder() { } + public static System.Text.Encodings.Web.JavaScriptEncoder Default { get { throw null; } } + public static System.Text.Encodings.Web.JavaScriptEncoder Create(System.Text.Encodings.Web.TextEncoderSettings settings) { throw null; } + public static System.Text.Encodings.Web.JavaScriptEncoder Create(params System.Text.Unicode.UnicodeRange[] allowedRanges) { throw null; } + } + public abstract partial class TextEncoder + { + protected TextEncoder() { } + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public abstract int MaxOutputCharactersPerInputCharacter { get; } + public virtual void Encode(System.IO.TextWriter output, char[] value, int startIndex, int characterCount) { } + public void Encode(System.IO.TextWriter output, string value) { } + public virtual void Encode(System.IO.TextWriter output, string value, int startIndex, int characterCount) { } + public virtual string Encode(string value) { throw null; } + [System.CLSCompliantAttribute(false)] + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public unsafe abstract int FindFirstCharacterToEncode(char* text, int textLength); + [System.CLSCompliantAttribute(false)] + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public unsafe abstract bool TryEncodeUnicodeScalar(int unicodeScalar, char* buffer, int bufferLength, out int numberOfCharactersWritten); + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public abstract bool WillEncode(int unicodeScalar); + } + public partial class TextEncoderSettings + { + public TextEncoderSettings() { } + public TextEncoderSettings(System.Text.Encodings.Web.TextEncoderSettings other) { } + public TextEncoderSettings(params System.Text.Unicode.UnicodeRange[] allowedRanges) { } + public virtual void AllowCharacter(char character) { } + public virtual void AllowCharacters(params char[] characters) { } + public virtual void AllowCodePoints(System.Collections.Generic.IEnumerable codePoints) { } + public virtual void AllowRange(System.Text.Unicode.UnicodeRange range) { } + public virtual void AllowRanges(params System.Text.Unicode.UnicodeRange[] ranges) { } + public virtual void Clear() { } + public virtual void ForbidCharacter(char character) { } + public virtual void ForbidCharacters(params char[] characters) { } + public virtual void ForbidRange(System.Text.Unicode.UnicodeRange range) { } + public virtual void ForbidRanges(params System.Text.Unicode.UnicodeRange[] ranges) { } + public virtual System.Collections.Generic.IEnumerable GetAllowedCodePoints() { throw null; } + } + public abstract partial class UrlEncoder : System.Text.Encodings.Web.TextEncoder + { + protected UrlEncoder() { } + public static System.Text.Encodings.Web.UrlEncoder Default { get { throw null; } } + public static System.Text.Encodings.Web.UrlEncoder Create(System.Text.Encodings.Web.TextEncoderSettings settings) { throw null; } + public static System.Text.Encodings.Web.UrlEncoder Create(params System.Text.Unicode.UnicodeRange[] allowedRanges) { throw null; } + } +} +namespace System.Text.Unicode +{ + public sealed partial class UnicodeRange + { + public UnicodeRange(int firstCodePoint, int length) { } + public int FirstCodePoint { get { throw null; } } + public int Length { get { throw null; } } + public static System.Text.Unicode.UnicodeRange Create(char firstCharacter, char lastCharacter) { throw null; } + } + public static partial class UnicodeRanges + { + public static System.Text.Unicode.UnicodeRange All { get { throw null; } } + public static System.Text.Unicode.UnicodeRange AlphabeticPresentationForms { get { throw null; } } + public static System.Text.Unicode.UnicodeRange Arabic { get { throw null; } } + public static System.Text.Unicode.UnicodeRange ArabicExtendedA { get { throw null; } } + public static System.Text.Unicode.UnicodeRange ArabicPresentationFormsA { get { throw null; } } + public static System.Text.Unicode.UnicodeRange ArabicPresentationFormsB { get { throw null; } } + public static System.Text.Unicode.UnicodeRange ArabicSupplement { get { throw null; } } + public static System.Text.Unicode.UnicodeRange Armenian { get { throw null; } } + public static System.Text.Unicode.UnicodeRange Arrows { get { throw null; } } + public static System.Text.Unicode.UnicodeRange Balinese { get { throw null; } } + public static System.Text.Unicode.UnicodeRange Bamum { get { throw null; } } + public static System.Text.Unicode.UnicodeRange BasicLatin { get { throw null; } } + public static System.Text.Unicode.UnicodeRange Batak { get { throw null; } } + public static System.Text.Unicode.UnicodeRange Bengali { get { throw null; } } + public static System.Text.Unicode.UnicodeRange BlockElements { get { throw null; } } + public static System.Text.Unicode.UnicodeRange Bopomofo { get { throw null; } } + public static System.Text.Unicode.UnicodeRange BopomofoExtended { get { throw null; } } + public static System.Text.Unicode.UnicodeRange BoxDrawing { get { throw null; } } + public static System.Text.Unicode.UnicodeRange BraillePatterns { get { throw null; } } + public static System.Text.Unicode.UnicodeRange Buginese { get { throw null; } } + public static System.Text.Unicode.UnicodeRange Buhid { get { throw null; } } + public static System.Text.Unicode.UnicodeRange Cham { get { throw null; } } + public static System.Text.Unicode.UnicodeRange Cherokee { get { throw null; } } + public static System.Text.Unicode.UnicodeRange CherokeeSupplement { get { throw null; } } + public static System.Text.Unicode.UnicodeRange CjkCompatibility { get { throw null; } } + public static System.Text.Unicode.UnicodeRange CjkCompatibilityForms { get { throw null; } } + public static System.Text.Unicode.UnicodeRange CjkCompatibilityIdeographs { get { throw null; } } + public static System.Text.Unicode.UnicodeRange CjkRadicalsSupplement { get { throw null; } } + public static System.Text.Unicode.UnicodeRange CjkStrokes { get { throw null; } } + public static System.Text.Unicode.UnicodeRange CjkSymbolsandPunctuation { get { throw null; } } + public static System.Text.Unicode.UnicodeRange CjkUnifiedIdeographs { get { throw null; } } + public static System.Text.Unicode.UnicodeRange CjkUnifiedIdeographsExtensionA { get { throw null; } } + public static System.Text.Unicode.UnicodeRange CombiningDiacriticalMarks { get { throw null; } } + public static System.Text.Unicode.UnicodeRange CombiningDiacriticalMarksExtended { get { throw null; } } + public static System.Text.Unicode.UnicodeRange CombiningDiacriticalMarksforSymbols { get { throw null; } } + public static System.Text.Unicode.UnicodeRange CombiningDiacriticalMarksSupplement { get { throw null; } } + public static System.Text.Unicode.UnicodeRange CombiningHalfMarks { get { throw null; } } + public static System.Text.Unicode.UnicodeRange CommonIndicNumberForms { get { throw null; } } + public static System.Text.Unicode.UnicodeRange ControlPictures { get { throw null; } } + public static System.Text.Unicode.UnicodeRange Coptic { get { throw null; } } + public static System.Text.Unicode.UnicodeRange CurrencySymbols { get { throw null; } } + public static System.Text.Unicode.UnicodeRange Cyrillic { get { throw null; } } + public static System.Text.Unicode.UnicodeRange CyrillicExtendedA { get { throw null; } } + public static System.Text.Unicode.UnicodeRange CyrillicExtendedB { get { throw null; } } + public static System.Text.Unicode.UnicodeRange CyrillicSupplement { get { throw null; } } + public static System.Text.Unicode.UnicodeRange Devanagari { get { throw null; } } + public static System.Text.Unicode.UnicodeRange DevanagariExtended { get { throw null; } } + public static System.Text.Unicode.UnicodeRange Dingbats { get { throw null; } } + public static System.Text.Unicode.UnicodeRange EnclosedAlphanumerics { get { throw null; } } + public static System.Text.Unicode.UnicodeRange EnclosedCjkLettersandMonths { get { throw null; } } + public static System.Text.Unicode.UnicodeRange Ethiopic { get { throw null; } } + public static System.Text.Unicode.UnicodeRange EthiopicExtended { get { throw null; } } + public static System.Text.Unicode.UnicodeRange EthiopicExtendedA { get { throw null; } } + public static System.Text.Unicode.UnicodeRange EthiopicSupplement { get { throw null; } } + public static System.Text.Unicode.UnicodeRange GeneralPunctuation { get { throw null; } } + public static System.Text.Unicode.UnicodeRange GeometricShapes { get { throw null; } } + public static System.Text.Unicode.UnicodeRange Georgian { get { throw null; } } + public static System.Text.Unicode.UnicodeRange GeorgianSupplement { get { throw null; } } + public static System.Text.Unicode.UnicodeRange Glagolitic { get { throw null; } } + public static System.Text.Unicode.UnicodeRange GreekandCoptic { get { throw null; } } + public static System.Text.Unicode.UnicodeRange GreekExtended { get { throw null; } } + public static System.Text.Unicode.UnicodeRange Gujarati { get { throw null; } } + public static System.Text.Unicode.UnicodeRange Gurmukhi { get { throw null; } } + public static System.Text.Unicode.UnicodeRange HalfwidthandFullwidthForms { get { throw null; } } + public static System.Text.Unicode.UnicodeRange HangulCompatibilityJamo { get { throw null; } } + public static System.Text.Unicode.UnicodeRange HangulJamo { get { throw null; } } + public static System.Text.Unicode.UnicodeRange HangulJamoExtendedA { get { throw null; } } + public static System.Text.Unicode.UnicodeRange HangulJamoExtendedB { get { throw null; } } + public static System.Text.Unicode.UnicodeRange HangulSyllables { get { throw null; } } + public static System.Text.Unicode.UnicodeRange Hanunoo { get { throw null; } } + public static System.Text.Unicode.UnicodeRange Hebrew { get { throw null; } } + public static System.Text.Unicode.UnicodeRange Hiragana { get { throw null; } } + public static System.Text.Unicode.UnicodeRange IdeographicDescriptionCharacters { get { throw null; } } + public static System.Text.Unicode.UnicodeRange IpaExtensions { get { throw null; } } + public static System.Text.Unicode.UnicodeRange Javanese { get { throw null; } } + public static System.Text.Unicode.UnicodeRange Kanbun { get { throw null; } } + public static System.Text.Unicode.UnicodeRange KangxiRadicals { get { throw null; } } + public static System.Text.Unicode.UnicodeRange Kannada { get { throw null; } } + public static System.Text.Unicode.UnicodeRange Katakana { get { throw null; } } + public static System.Text.Unicode.UnicodeRange KatakanaPhoneticExtensions { get { throw null; } } + public static System.Text.Unicode.UnicodeRange KayahLi { get { throw null; } } + public static System.Text.Unicode.UnicodeRange Khmer { get { throw null; } } + public static System.Text.Unicode.UnicodeRange KhmerSymbols { get { throw null; } } + public static System.Text.Unicode.UnicodeRange Lao { get { throw null; } } + public static System.Text.Unicode.UnicodeRange Latin1Supplement { get { throw null; } } + public static System.Text.Unicode.UnicodeRange LatinExtendedA { get { throw null; } } + public static System.Text.Unicode.UnicodeRange LatinExtendedAdditional { get { throw null; } } + public static System.Text.Unicode.UnicodeRange LatinExtendedB { get { throw null; } } + public static System.Text.Unicode.UnicodeRange LatinExtendedC { get { throw null; } } + public static System.Text.Unicode.UnicodeRange LatinExtendedD { get { throw null; } } + public static System.Text.Unicode.UnicodeRange LatinExtendedE { get { throw null; } } + public static System.Text.Unicode.UnicodeRange Lepcha { get { throw null; } } + public static System.Text.Unicode.UnicodeRange LetterlikeSymbols { get { throw null; } } + public static System.Text.Unicode.UnicodeRange Limbu { get { throw null; } } + public static System.Text.Unicode.UnicodeRange Lisu { get { throw null; } } + public static System.Text.Unicode.UnicodeRange Malayalam { get { throw null; } } + public static System.Text.Unicode.UnicodeRange Mandaic { get { throw null; } } + public static System.Text.Unicode.UnicodeRange MathematicalOperators { get { throw null; } } + public static System.Text.Unicode.UnicodeRange MeeteiMayek { get { throw null; } } + public static System.Text.Unicode.UnicodeRange MeeteiMayekExtensions { get { throw null; } } + public static System.Text.Unicode.UnicodeRange MiscellaneousMathematicalSymbolsA { get { throw null; } } + public static System.Text.Unicode.UnicodeRange MiscellaneousMathematicalSymbolsB { get { throw null; } } + public static System.Text.Unicode.UnicodeRange MiscellaneousSymbols { get { throw null; } } + public static System.Text.Unicode.UnicodeRange MiscellaneousSymbolsandArrows { get { throw null; } } + public static System.Text.Unicode.UnicodeRange MiscellaneousTechnical { get { throw null; } } + public static System.Text.Unicode.UnicodeRange ModifierToneLetters { get { throw null; } } + public static System.Text.Unicode.UnicodeRange Mongolian { get { throw null; } } + public static System.Text.Unicode.UnicodeRange Myanmar { get { throw null; } } + public static System.Text.Unicode.UnicodeRange MyanmarExtendedA { get { throw null; } } + public static System.Text.Unicode.UnicodeRange MyanmarExtendedB { get { throw null; } } + public static System.Text.Unicode.UnicodeRange NewTaiLue { get { throw null; } } + public static System.Text.Unicode.UnicodeRange NKo { get { throw null; } } + public static System.Text.Unicode.UnicodeRange None { get { throw null; } } + public static System.Text.Unicode.UnicodeRange NumberForms { get { throw null; } } + public static System.Text.Unicode.UnicodeRange Ogham { get { throw null; } } + public static System.Text.Unicode.UnicodeRange OlChiki { get { throw null; } } + public static System.Text.Unicode.UnicodeRange OpticalCharacterRecognition { get { throw null; } } + public static System.Text.Unicode.UnicodeRange Oriya { get { throw null; } } + public static System.Text.Unicode.UnicodeRange Phagspa { get { throw null; } } + public static System.Text.Unicode.UnicodeRange PhoneticExtensions { get { throw null; } } + public static System.Text.Unicode.UnicodeRange PhoneticExtensionsSupplement { get { throw null; } } + public static System.Text.Unicode.UnicodeRange Rejang { get { throw null; } } + public static System.Text.Unicode.UnicodeRange Runic { get { throw null; } } + public static System.Text.Unicode.UnicodeRange Samaritan { get { throw null; } } + public static System.Text.Unicode.UnicodeRange Saurashtra { get { throw null; } } + public static System.Text.Unicode.UnicodeRange Sinhala { get { throw null; } } + public static System.Text.Unicode.UnicodeRange SmallFormVariants { get { throw null; } } + public static System.Text.Unicode.UnicodeRange SpacingModifierLetters { get { throw null; } } + public static System.Text.Unicode.UnicodeRange Specials { get { throw null; } } + public static System.Text.Unicode.UnicodeRange Sundanese { get { throw null; } } + public static System.Text.Unicode.UnicodeRange SundaneseSupplement { get { throw null; } } + public static System.Text.Unicode.UnicodeRange SuperscriptsandSubscripts { get { throw null; } } + public static System.Text.Unicode.UnicodeRange SupplementalArrowsA { get { throw null; } } + public static System.Text.Unicode.UnicodeRange SupplementalArrowsB { get { throw null; } } + public static System.Text.Unicode.UnicodeRange SupplementalMathematicalOperators { get { throw null; } } + public static System.Text.Unicode.UnicodeRange SupplementalPunctuation { get { throw null; } } + public static System.Text.Unicode.UnicodeRange SylotiNagri { get { throw null; } } + public static System.Text.Unicode.UnicodeRange Syriac { get { throw null; } } + public static System.Text.Unicode.UnicodeRange Tagalog { get { throw null; } } + public static System.Text.Unicode.UnicodeRange Tagbanwa { get { throw null; } } + public static System.Text.Unicode.UnicodeRange TaiLe { get { throw null; } } + public static System.Text.Unicode.UnicodeRange TaiTham { get { throw null; } } + public static System.Text.Unicode.UnicodeRange TaiViet { get { throw null; } } + public static System.Text.Unicode.UnicodeRange Tamil { get { throw null; } } + public static System.Text.Unicode.UnicodeRange Telugu { get { throw null; } } + public static System.Text.Unicode.UnicodeRange Thaana { get { throw null; } } + public static System.Text.Unicode.UnicodeRange Thai { get { throw null; } } + public static System.Text.Unicode.UnicodeRange Tibetan { get { throw null; } } + public static System.Text.Unicode.UnicodeRange Tifinagh { get { throw null; } } + public static System.Text.Unicode.UnicodeRange UnifiedCanadianAboriginalSyllabics { get { throw null; } } + public static System.Text.Unicode.UnicodeRange UnifiedCanadianAboriginalSyllabicsExtended { get { throw null; } } + public static System.Text.Unicode.UnicodeRange Vai { get { throw null; } } + public static System.Text.Unicode.UnicodeRange VariationSelectors { get { throw null; } } + public static System.Text.Unicode.UnicodeRange VedicExtensions { get { throw null; } } + public static System.Text.Unicode.UnicodeRange VerticalForms { get { throw null; } } + public static System.Text.Unicode.UnicodeRange YijingHexagramSymbols { get { throw null; } } + public static System.Text.Unicode.UnicodeRange YiRadicals { get { throw null; } } + public static System.Text.Unicode.UnicodeRange YiSyllables { get { throw null; } } + } +} diff --git a/src/System.Text.Encodings.Web/ref/System.Text.Encodings.Web.csproj b/src/System.Text.Encodings.Web/ref/System.Text.Encodings.Web.csproj new file mode 100644 index 000000000000..eb9b554c7317 --- /dev/null +++ b/src/System.Text.Encodings.Web/ref/System.Text.Encodings.Web.csproj @@ -0,0 +1,23 @@ + + + {41648C6D-D431-478D-8228-7EB68714541C} + netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release;uap-Debug;uap-Release + true + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/System.Text.Encodings.Web/src/Configurations.props b/src/System.Text.Encodings.Web/src/Configurations.props index 2882a0e4c891..45f47966c3a9 100644 --- a/src/System.Text.Encodings.Web/src/Configurations.props +++ b/src/System.Text.Encodings.Web/src/Configurations.props @@ -1,8 +1,9 @@  - netstandard1.0; netstandard; + netcoreapp; + uap-Windows_NT; - \ No newline at end of file + diff --git a/src/System.Text.Encodings.Web/src/Properties/AssemblyInfo.cs b/src/System.Text.Encodings.Web/src/Properties/AssemblyInfo.cs deleted file mode 100644 index d452af55b9f3..000000000000 --- a/src/System.Text.Encodings.Web/src/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,8 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Runtime.CompilerServices; - -[assembly: InternalsVisibleTo("System.Text.Encodings.Web.Tests, PublicKey=00240000048000009400000006020000002400005253413100040000010001004b86c4cb78549b34bab61a3b1800e23bfeb5b3ec390074041536a7e3cbd97f5f04cf0f857155a8928eaa29ebfd11cfbbad3ba70efea7bda3226c6a8d370a4cd303f714486b6ebc225985a638471e6ef571cc92a4613c00b8fa65d61ccee0cbe5f36330c9a01f4183559f1bef24cc2917c6d913e3a541333a1d05d9bed22b38cb")] diff --git a/src/System.Text.Encodings.Web/src/Properties/GlobalSuppressions.cs b/src/System.Text.Encodings.Web/src/Properties/GlobalSuppressions.cs deleted file mode 100644 index 7f4af832de84..000000000000 --- a/src/System.Text.Encodings.Web/src/Properties/GlobalSuppressions.cs +++ /dev/null @@ -1,6 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1020:AvoidNamespacesWithFewTypes", Scope = "namespace", Target = "System.Collections.Generic")] -[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1016:MarkAssembliesWithAssemblyVersion", Justification = "The official build system adds this attribute.")] diff --git a/src/System.Text.Encodings.Web/src/System.Text.Encodings.Web.csproj b/src/System.Text.Encodings.Web/src/System.Text.Encodings.Web.csproj index 5f2deb282e14..d3ba7317ac24 100644 --- a/src/System.Text.Encodings.Web/src/System.Text.Encodings.Web.csproj +++ b/src/System.Text.Encodings.Web/src/System.Text.Encodings.Web.csproj @@ -1,13 +1,12 @@ - + {B7EDBF00-765A-48E8-B593-CD668288E274} System.Text.Encodings.Web true - netstandard-Debug;netstandard-Release;netstandard1.0-Debug;netstandard1.0-Release + netstandard-Debug;netstandard-Release;netcoreapp-Debug;netcoreapp-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release - @@ -18,13 +17,11 @@ - - - + diff --git a/src/System.Text.Encodings.Web/src/System/Text/Encodings/Web/BufferInternal.cs b/src/System.Text.Encodings.Web/src/System/Text/Encodings/Web/BufferInternal.cs deleted file mode 100644 index dd2aa1ca80cd..000000000000 --- a/src/System.Text.Encodings.Web/src/System/Text/Encodings/Web/BufferInternal.cs +++ /dev/null @@ -1,200 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System.Diagnostics; -using System.Runtime.CompilerServices; - -namespace System { - - // These sources are taken from corclr repo (src\mscorlib\src\System\Buffer.cs with x64 path removed) - // The reason for this duplication is that System.Runtime.dll 4.0.10 did not expose Buffer.MemoryCopy, - // but we need to make this component work with System.Runtime.dll 4.0.10 - // The methods AreOverlapping and SlowCopyBackwards are not from Buffer.cs. Buffer.cs does an internal CLR call for these. - static class BufferInternal - { - // This method has different signature for x64 and other platforms and is done for performance reasons. - private static unsafe void Memmove(byte* dest, byte* src, uint len) - { - if (AreOverlapping(dest, src, len)) - { - SlowCopyBackwards(dest, src, len); - return; - } - - // This is portable version of memcpy. It mirrors what the hand optimized assembly versions of memcpy typically do. - switch (len) - { - case 0: - return; - case 1: - *dest = *src; - return; - case 2: - *(short*)dest = *(short*)src; - return; - case 3: - *(short*)dest = *(short*)src; - *(dest + 2) = *(src + 2); - return; - case 4: - *(int*)dest = *(int*)src; - return; - case 5: - *(int*)dest = *(int*)src; - *(dest + 4) = *(src + 4); - return; - case 6: - *(int*)dest = *(int*)src; - *(short*)(dest + 4) = *(short*)(src + 4); - return; - case 7: - *(int*)dest = *(int*)src; - *(short*)(dest + 4) = *(short*)(src + 4); - *(dest + 6) = *(src + 6); - return; - case 8: - *(int*)dest = *(int*)src; - *(int*)(dest + 4) = *(int*)(src + 4); - return; - case 9: - *(int*)dest = *(int*)src; - *(int*)(dest + 4) = *(int*)(src + 4); - *(dest + 8) = *(src + 8); - return; - case 10: - *(int*)dest = *(int*)src; - *(int*)(dest + 4) = *(int*)(src + 4); - *(short*)(dest + 8) = *(short*)(src + 8); - return; - case 11: - *(int*)dest = *(int*)src; - *(int*)(dest + 4) = *(int*)(src + 4); - *(short*)(dest + 8) = *(short*)(src + 8); - *(dest + 10) = *(src + 10); - return; - case 12: - *(int*)dest = *(int*)src; - *(int*)(dest + 4) = *(int*)(src + 4); - *(int*)(dest + 8) = *(int*)(src + 8); - return; - case 13: - *(int*)dest = *(int*)src; - *(int*)(dest + 4) = *(int*)(src + 4); - *(int*)(dest + 8) = *(int*)(src + 8); - *(dest + 12) = *(src + 12); - return; - case 14: - *(int*)dest = *(int*)src; - *(int*)(dest + 4) = *(int*)(src + 4); - *(int*)(dest + 8) = *(int*)(src + 8); - *(short*)(dest + 12) = *(short*)(src + 12); - return; - case 15: - *(int*)dest = *(int*)src; - *(int*)(dest + 4) = *(int*)(src + 4); - *(int*)(dest + 8) = *(int*)(src + 8); - *(short*)(dest + 12) = *(short*)(src + 12); - *(dest + 14) = *(src + 14); - return; - case 16: - *(int*)dest = *(int*)src; - *(int*)(dest + 4) = *(int*)(src + 4); - *(int*)(dest + 8) = *(int*)(src + 8); - *(int*)(dest + 12) = *(int*)(src + 12); - return; - default: - break; - } - - if ((unchecked((int)dest) & 3) != 0) - { - if (((int)dest & 1) != 0) - { - *dest = *src; - src++; - dest++; - len--; - if (((int)dest & 2) == 0) - goto Aligned; - } - *(short*)dest = *(short*)src; - src += 2; - dest += 2; - len -= 2; - Aligned:; - } - - uint count = len / 16; - while (count > 0) - { - ((int*)dest)[0] = ((int*)src)[0]; - ((int*)dest)[1] = ((int*)src)[1]; - ((int*)dest)[2] = ((int*)src)[2]; - ((int*)dest)[3] = ((int*)src)[3]; - dest += 16; - src += 16; - count--; - } - - if ((len & 8) != 0) - { - ((int*)dest)[0] = ((int*)src)[0]; - ((int*)dest)[1] = ((int*)src)[1]; - dest += 8; - src += 8; - } - if ((len & 4) != 0) - { - ((int*)dest)[0] = ((int*)src)[0]; - dest += 4; - src += 4; - } - if ((len & 2) != 0) - { - ((short*)dest)[0] = ((short*)src)[0]; - dest += 2; - src += 2; - } - if ((len & 1) != 0) - *dest = *src; - - return; - } - - private static unsafe void SlowCopyBackwards(byte* dest, byte* src, uint len) - { - Debug.Assert(len <= int.MaxValue); - if (len == 0) return; - - for(int i=((int)len)-1; i>=0; i--) - { - dest[i] = src[i]; - } - } - - private static unsafe bool AreOverlapping(byte* dest, byte* src, uint len) - { - byte* srcEnd = src + len; - byte* destEnd = dest + len; - if (srcEnd >= dest && srcEnd <= destEnd) - { - return true; - } - return false; - } - - // The attributes on this method are chosen for best JIT performance. - // Please do not edit unless intentional. - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static unsafe void MemoryCopy(void* source, void* destination, int destinationSizeInBytes, int sourceBytesToCopy) - { - if (sourceBytesToCopy > destinationSizeInBytes) - { - throw new ArgumentOutOfRangeException(nameof(sourceBytesToCopy)); - } - - Memmove((byte*)destination, (byte*)source, checked((uint)sourceBytesToCopy)); - } - } -} diff --git a/src/System.Text.Encodings.Web/src/System/Text/Encodings/Web/TextEncoder.cs b/src/System.Text.Encodings.Web/src/System/Text/Encodings/Web/TextEncoder.cs index 2b4923bc7fa5..701ee3a6c407 100644 --- a/src/System.Text.Encodings.Web/src/System/Text/Encodings/Web/TextEncoder.cs +++ b/src/System.Text.Encodings.Web/src/System/Text/Encodings/Web/TextEncoder.cs @@ -130,8 +130,12 @@ private unsafe int EncodeIntoBuffer(char* buffer, int bufferLength, char* value, if (firstCharacterToEncode > 0) { - int bytesToCopy = firstCharacterToEncode + firstCharacterToEncode; - BufferInternal.MemoryCopy(value, buffer, bytesToCopy, bytesToCopy); + Debug.Assert(firstCharacterToEncode <= valueLength); + Buffer.MemoryCopy(source: value, + destination: buffer, + destinationSizeInBytes: sizeof(char) * bufferLength, + sourceBytesToCopy: sizeof(char) * firstCharacterToEncode); + totalWritten += firstCharacterToEncode; bufferLength -= firstCharacterToEncode; buffer += firstCharacterToEncode; diff --git a/src/System.Text.Encodings.Web/tests/BufferInternalTests.cs b/src/System.Text.Encodings.Web/tests/BufferInternalTests.cs deleted file mode 100644 index 7adc137017b1..000000000000 --- a/src/System.Text.Encodings.Web/tests/BufferInternalTests.cs +++ /dev/null @@ -1,61 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using Xunit; - -namespace System.Text.Encodings.Web -{ - public class BufferInternalTests - { - [Fact] - public unsafe void CopyOverlappingNotOK() - { - byte[] array = new byte[] { 1, 2, 3, 4 }; - - fixed (byte* pArray = array) - { - void* pArrayPlusOne = pArray + 1; - BufferInternal.MemoryCopy(pArray, pArrayPlusOne, array.Length - 1, array.Length - 1); - } - - Assert.Equal(1, array[0]); - Assert.Equal(1, array[1]); - Assert.Equal(2, array[2]); - Assert.Equal(3, array[3]); - } - - [Fact] - public unsafe void CopyOverlappingNotOKByOne() - { - byte[] array = new byte[] { 1, 2 }; - - fixed (byte* pArray = array) - { - void* pArrayPlusOne = pArray + 1; - BufferInternal.MemoryCopy(pArray, pArrayPlusOne, array.Length - 1, array.Length - 1); - } - - Assert.Equal(1, array[0]); - Assert.Equal(1, array[1]); - } - - [Fact] - public unsafe void CopyOverlappingOK() - { - byte[] array = new byte[] { 1, 2, 3, 4 }; - - fixed (byte* pArray = array) - { - void* pArrayPlusOne = pArray + 1; - BufferInternal.MemoryCopy(pArrayPlusOne, pArray, array.Length - 1, array.Length - 1); - } - - Assert.Equal(2, array[0]); - Assert.Equal(3, array[1]); - Assert.Equal(4, array[2]); - Assert.Equal(4, array[3]); - } - } -} diff --git a/src/System.Text.Encodings.Web/tests/Configurations.props b/src/System.Text.Encodings.Web/tests/Configurations.props index 581054d46db4..4e89c411e22d 100644 --- a/src/System.Text.Encodings.Web/tests/Configurations.props +++ b/src/System.Text.Encodings.Web/tests/Configurations.props @@ -1,7 +1,9 @@  + netcoreapp; + uap-Windows_NT; netstandard; - \ No newline at end of file + diff --git a/src/System.Text.Encodings.Web/tests/System.Text.Encodings.Web.Tests.csproj b/src/System.Text.Encodings.Web/tests/System.Text.Encodings.Web.Tests.csproj index 8ebd5eb8a493..cd7f153ceb55 100644 --- a/src/System.Text.Encodings.Web/tests/System.Text.Encodings.Web.Tests.csproj +++ b/src/System.Text.Encodings.Web/tests/System.Text.Encodings.Web.Tests.csproj @@ -1,4 +1,4 @@ - + 2.0 {2337A55E-7077-4FBE-8132-2CD8DDC18671} @@ -6,7 +6,7 @@ $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages ..\..\ true - netstandard-Debug;netstandard-Release + netstandard-Debug;netstandard-Release;netcoreapp-Debug;netcoreapp-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release @@ -14,11 +14,13 @@ + + + - diff --git a/src/System.Text.Encodings.Web/tests/TemporaryEncoderAdapters.cs b/src/System.Text.Encodings.Web/tests/TemporaryEncoderAdapters.cs index 7be22dd06831..dfbfb72b1031 100644 --- a/src/System.Text.Encodings.Web/tests/TemporaryEncoderAdapters.cs +++ b/src/System.Text.Encodings.Web/tests/TemporaryEncoderAdapters.cs @@ -12,7 +12,7 @@ namespace Microsoft.Framework.WebEncoders // These implement ASP.NET interfaces. They will be removed once we transition ASP.NET internal sealed class HtmlEncoder : IHtmlEncoder { - System.Text.Encodings.Web.DefaultHtmlEncoder _encoder; + System.Text.Encodings.Web.HtmlEncoder _encoder; static HtmlEncoder s_default; /// @@ -44,11 +44,11 @@ public static HtmlEncoder Default public HtmlEncoder() { - _encoder = System.Text.Encodings.Web.DefaultHtmlEncoder.Singleton; + _encoder = System.Text.Encodings.Web.HtmlEncoder.Default; } public HtmlEncoder(TextEncoderSettings filter) { - _encoder = new System.Text.Encodings.Web.DefaultHtmlEncoder(filter); + _encoder = System.Text.Encodings.Web.HtmlEncoder.Create(filter); } public HtmlEncoder(UnicodeRange allowedRange) : this(new TextEncoderSettings(allowedRange)) @@ -75,7 +75,7 @@ public void HtmlEncode(string value, int startIndex, int characterCount, TextWri internal sealed class JavaScriptStringEncoder : IJavaScriptStringEncoder { - System.Text.Encodings.Web.DefaultJavaScriptEncoder _encoder; + System.Text.Encodings.Web.JavaScriptEncoder _encoder; static JavaScriptStringEncoder s_default; /// @@ -107,11 +107,11 @@ public static JavaScriptStringEncoder Default public JavaScriptStringEncoder() { - _encoder = System.Text.Encodings.Web.DefaultJavaScriptEncoder.Singleton; + _encoder = System.Text.Encodings.Web.JavaScriptEncoder.Default; } public JavaScriptStringEncoder(TextEncoderSettings filter) { - _encoder = new System.Text.Encodings.Web.DefaultJavaScriptEncoder(filter); + _encoder = System.Text.Encodings.Web.JavaScriptEncoder.Create(filter); } public JavaScriptStringEncoder(UnicodeRange allowedRange) : this(new TextEncoderSettings(allowedRange)) @@ -138,7 +138,7 @@ public void JavaScriptStringEncode(string value, int startIndex, int characterCo internal sealed class UrlEncoder : IUrlEncoder { - System.Text.Encodings.Web.DefaultUrlEncoder _encoder; + System.Text.Encodings.Web.UrlEncoder _encoder; static UrlEncoder s_default; /// @@ -170,11 +170,11 @@ public static UrlEncoder Default public UrlEncoder() { - _encoder = System.Text.Encodings.Web.DefaultUrlEncoder.Singleton; + _encoder = System.Text.Encodings.Web.UrlEncoder.Default; } public UrlEncoder(TextEncoderSettings filter) { - _encoder = new System.Text.Encodings.Web.DefaultUrlEncoder(filter); + _encoder = System.Text.Encodings.Web.UrlEncoder.Create(filter); } public UrlEncoder(UnicodeRange allowedRange) : this(new TextEncoderSettings(allowedRange)) diff --git a/src/System.Text.Encodings.Web/tests/TextEncoderSettingsTests.cs b/src/System.Text.Encodings.Web/tests/TextEncoderSettingsTests.cs index 41f5df772d65..df6fafd2b79c 100644 --- a/src/System.Text.Encodings.Web/tests/TextEncoderSettingsTests.cs +++ b/src/System.Text.Encodings.Web/tests/TextEncoderSettingsTests.cs @@ -5,18 +5,26 @@ using System; using System.Collections.Generic; using System.Linq; +using System.Reflection; using System.Text.Encodings.Web; +using System.Text.Internal; using System.Text.Unicode; using Xunit; namespace Microsoft.Framework.WebEncoders { - public static class TextEncoderSettingsExtensions + internal static class TextEncoderSettingsExtensions { + public static AllowedCharactersBitmap GetAllowedCharacters(this TextEncoderSettings settings) + { + object bitmap = settings.GetType().InvokeMember("GetAllowedCharacters", BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.InvokeMethod, null, settings, null); + object underlyingArray = bitmap.GetType().GetField("_allowedCharacters", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(bitmap); + return (AllowedCharactersBitmap)typeof(AllowedCharactersBitmap).GetConstructor(BindingFlags.NonPublic | BindingFlags.Instance, null, new Type[] { typeof(uint[]) }, null).Invoke(new object[] { underlyingArray }); + } + public static bool IsCharacterAllowed(this TextEncoderSettings settings, char character) { - var bitmap = settings.GetAllowedCharacters(); - return bitmap.IsCharacterAllowed(character); + return GetAllowedCharacters(settings).IsCharacterAllowed(character); } } From 54f172d07d5da33e5b27f963aeb2fce03fc8c158 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Sun, 5 May 2019 13:21:26 +0000 Subject: [PATCH 218/607] [master] Update dependencies from dotnet/core-setup (#37440) * Update dependencies from https://github.com/dotnet/core-setup build 20190503.17 - Microsoft.NETCore.App - 3.0.0-preview6-27703-17 - Microsoft.NETCore.DotNetHostPolicy - 3.0.0-preview6-27703-17 - Microsoft.NETCore.DotNetHost - 3.0.0-preview6-27703-17 * Update dependencies from https://github.com/dotnet/core-setup build 20190505.02 - Microsoft.NETCore.App - 3.0.0-preview6-27705-02 - Microsoft.NETCore.DotNetHostPolicy - 3.0.0-preview6-27705-02 - Microsoft.NETCore.DotNetHost - 3.0.0-preview6-27705-02 --- eng/Version.Details.xml | 12 ++++++------ eng/Versions.props | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index d236fbdbafee..24bbd505449c 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -14,17 +14,17 @@ - + https://github.com/dotnet/core-setup - 45876af5c7a20db88da33f0fa46b987767951c13 + 71ef9eea28230688230124e49e6967bf2e2bbfbd - + https://github.com/dotnet/core-setup - 45876af5c7a20db88da33f0fa46b987767951c13 + 71ef9eea28230688230124e49e6967bf2e2bbfbd - + https://github.com/dotnet/core-setup - 45876af5c7a20db88da33f0fa46b987767951c13 + 71ef9eea28230688230124e49e6967bf2e2bbfbd https://github.com/dotnet/corefx diff --git a/eng/Versions.props b/eng/Versions.props index e09780e24f5d..499d720ed48e 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -36,9 +36,9 @@ 2.2.0-beta.19229.8 1.0.0-beta.19229.8 - 3.0.0-preview6-27703-02 - 3.0.0-preview6-27703-02 - 3.0.0-preview6-27703-02 + 3.0.0-preview6-27705-02 + 3.0.0-preview6-27705-02 + 3.0.0-preview6-27705-02 3.0.0-preview6-27703-71 3.0.0-preview6-27703-71 From f5c963fabcca42d7f2ad9b3c313d93abe7d3d37a Mon Sep 17 00:00:00 2001 From: Viktor Hofer Date: Mon, 6 May 2019 02:43:14 +0200 Subject: [PATCH 219/607] Disable GetSchema test on Win7 (#37450) --- src/System.Data.OleDb/tests/OleDbConnectionTests.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/System.Data.OleDb/tests/OleDbConnectionTests.cs b/src/System.Data.OleDb/tests/OleDbConnectionTests.cs index 85380ce32566..259bdd2eb214 100644 --- a/src/System.Data.OleDb/tests/OleDbConnectionTests.cs +++ b/src/System.Data.OleDb/tests/OleDbConnectionTests.cs @@ -119,6 +119,11 @@ public void Provider_SetProperlyFromCtor() [InlineData(nameof(DbMetaDataCollectionNames.DataTypes), "TypeName")] public void GetSchema(string tableName, string columnName) { + if (PlatformDetection.IsWindows7) + { + return; // [ActiveIssue(37438)] + } + DataTable schema = connection.GetSchema(tableName); Assert.True(schema != null && schema.Rows.Count > 0); var exception = Record.Exception(() => schema.Rows[0].Field(columnName)); From 91005d05f12e948100d13054feb70610e73cbcc3 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Sun, 5 May 2019 20:43:54 -0400 Subject: [PATCH 220/607] Update dependencies from https://github.com/dotnet/coreclr build 20190504.72 (#37448) - Microsoft.NET.Sdk.IL - 3.0.0-preview6-27704-72 - Microsoft.NETCore.ILAsm - 3.0.0-preview6-27704-72 - Microsoft.NETCore.Runtime.CoreCLR - 3.0.0-preview6-27704-72 --- eng/Version.Details.xml | 12 ++++++------ eng/Versions.props | 4 ++-- global.json | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 24bbd505449c..31626b84d199 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -1,16 +1,16 @@ - + https://github.com/dotnet/coreclr - 964461ca69639003914fd4fedaf08baf1f388f7e + 71cae4ca99a163c4fd146e3583c64cb77a83fd0b - + https://github.com/dotnet/coreclr - 964461ca69639003914fd4fedaf08baf1f388f7e + 71cae4ca99a163c4fd146e3583c64cb77a83fd0b - + https://github.com/dotnet/coreclr - 964461ca69639003914fd4fedaf08baf1f388f7e + 71cae4ca99a163c4fd146e3583c64cb77a83fd0b diff --git a/eng/Versions.props b/eng/Versions.props index 499d720ed48e..4004293090b1 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -40,8 +40,8 @@ 3.0.0-preview6-27705-02 3.0.0-preview6-27705-02 - 3.0.0-preview6-27703-71 - 3.0.0-preview6-27703-71 + 3.0.0-preview6-27704-72 + 3.0.0-preview6-27704-72 3.0.0-preview6.19252.9 4.6.0-preview6.19252.9 diff --git a/global.json b/global.json index 41f2afd58f5a..8bfc946cb110 100644 --- a/global.json +++ b/global.json @@ -5,6 +5,6 @@ "msbuild-sdks": { "Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19229.8", "Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19229.8", - "Microsoft.NET.Sdk.IL": "3.0.0-preview6-27703-71" + "Microsoft.NET.Sdk.IL": "3.0.0-preview6-27704-72" } } From 86bb4e9e9916e73d7b7a3bb45315c10a5e98cc95 Mon Sep 17 00:00:00 2001 From: Dotnet-GitSync-Bot <45578709+Dotnet-GitSync-Bot@users.noreply.github.com> Date: Sun, 5 May 2019 17:50:37 -0700 Subject: [PATCH 221/607] Move AsyncMethodBuilder.SetStateMachine to non-generic (#24403) (#37454) Signed-off-by: dotnet-bot --- .../CompilerServices/AsyncMethodBuilder.cs | 35 ++++++++++--------- 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/src/Common/src/CoreLib/System/Runtime/CompilerServices/AsyncMethodBuilder.cs b/src/Common/src/CoreLib/System/Runtime/CompilerServices/AsyncMethodBuilder.cs index 53978e8d0c19..fb6f2197c06a 100644 --- a/src/Common/src/CoreLib/System/Runtime/CompilerServices/AsyncMethodBuilder.cs +++ b/src/Common/src/CoreLib/System/Runtime/CompilerServices/AsyncMethodBuilder.cs @@ -354,22 +354,7 @@ public void Start(ref TStateMachine stateMachine) where TStateMac /// The argument was null (Nothing in Visual Basic). /// The builder is incorrectly initialized. public void SetStateMachine(IAsyncStateMachine stateMachine) - { - if (stateMachine == null) - { - ThrowHelper.ThrowArgumentNullException(ExceptionArgument.stateMachine); - } - - if (m_task != null) - { - ThrowHelper.ThrowInvalidOperationException(ExceptionResource.AsyncMethodBuilder_InstanceNotInitialized); - } - - // SetStateMachine was originally needed in order to store the boxed state machine reference into - // the boxed copy. Now that a normal box is no longer used, SetStateMachine is also legacy. We need not - // do anything here, and thus assert to ensure we're not calling this from our own implementations. - Debug.Fail("SetStateMachine should not be used."); - } + => AsyncMethodBuilderCore.SetStateMachine(stateMachine, m_task); /// /// Schedules the specified state machine to be pushed forward when the specified awaiter completes. @@ -1047,6 +1032,24 @@ public static void Start(ref TStateMachine stateMachine) where TS } } + public static void SetStateMachine(IAsyncStateMachine stateMachine, Task task) + { + if (stateMachine == null) + { + ThrowHelper.ThrowArgumentNullException(ExceptionArgument.stateMachine); + } + + if (task != null) + { + ThrowHelper.ThrowInvalidOperationException(ExceptionResource.AsyncMethodBuilder_InstanceNotInitialized); + } + + // SetStateMachine was originally needed in order to store the boxed state machine reference into + // the boxed copy. Now that a normal box is no longer used, SetStateMachine is also legacy. We need not + // do anything here, and thus assert to ensure we're not calling this from our own implementations. + Debug.Fail("SetStateMachine should not be used."); + } + #if !CORERT /// Gets whether we should be tracking async method completions for eventing. internal static bool TrackAsyncMethodCompletion From 3a27ba11f2c20a5ba191c3c76b9817aad915b227 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Sun, 5 May 2019 21:49:12 -0400 Subject: [PATCH 222/607] [master] Update dependencies from dotnet/corefx (#37441) * Update dependencies from https://github.com/dotnet/corefx build 20190503.8 - runtime.native.System.IO.Ports - 4.6.0-preview6.19253.8 - Microsoft.NETCore.Platforms - 3.0.0-preview6.19253.8 * Update dependencies from https://github.com/dotnet/corefx build 20190504.7 - runtime.native.System.IO.Ports - 4.6.0-preview6.19254.7 - Microsoft.NETCore.Platforms - 3.0.0-preview6.19254.7 --- eng/Version.Details.xml | 8 ++++---- eng/Versions.props | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 31626b84d199..b87287845340 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -26,13 +26,13 @@ https://github.com/dotnet/core-setup 71ef9eea28230688230124e49e6967bf2e2bbfbd - + https://github.com/dotnet/corefx - 1f159018b21e1f70fa2ade50d5e341f5ce457654 + 464097cfc9c970c7ce31288fbd7e7cd8930364ca - + https://github.com/dotnet/corefx - 1f159018b21e1f70fa2ade50d5e341f5ce457654 + 464097cfc9c970c7ce31288fbd7e7cd8930364ca https://github.com/dotnet/arcade diff --git a/eng/Versions.props b/eng/Versions.props index 4004293090b1..38bc38141a5e 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -43,8 +43,8 @@ 3.0.0-preview6-27704-72 3.0.0-preview6-27704-72 - 3.0.0-preview6.19252.9 - 4.6.0-preview6.19252.9 + 3.0.0-preview6.19254.7 + 4.6.0-preview6.19254.7 2.1.0-prerelease.19230.1 From 322eeeb25e1b5eae950bb6494383406902def5f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9rald=20Barr=C3=A9?= Date: Sun, 5 May 2019 22:28:17 -0400 Subject: [PATCH 223/607] Add FlushAsync (#37458) --- src/System.Private.Xml.Linq/src/System/Xml/Linq/XDocument.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/System.Private.Xml.Linq/src/System/Xml/Linq/XDocument.cs b/src/System.Private.Xml.Linq/src/System/Xml/Linq/XDocument.cs index 1957ec2e1428..2f41c6fc94e4 100644 --- a/src/System.Private.Xml.Linq/src/System/Xml/Linq/XDocument.cs +++ b/src/System.Private.Xml.Linq/src/System/Xml/Linq/XDocument.cs @@ -638,6 +638,7 @@ public async Task SaveAsync(Stream stream, SaveOptions options, CancellationToke using (XmlWriter w = XmlWriter.Create(stream, ws)) { await WriteToAsync(w, cancellationToken).ConfigureAwait(false); + await w.FlushAsync().ConfigureAwait(false); } } @@ -710,6 +711,7 @@ public async Task SaveAsync(TextWriter textWriter, SaveOptions options, Cancella using (XmlWriter w = XmlWriter.Create(textWriter, ws)) { await WriteToAsync(w, cancellationToken).ConfigureAwait(false); + await w.FlushAsync().ConfigureAwait(false); } } From bd278630dd08914ef521e62658afb69845c5b93a Mon Sep 17 00:00:00 2001 From: Shay Rojansky Date: Mon, 6 May 2019 00:58:49 -0700 Subject: [PATCH 224/607] Switch to newer, explicit atomic API (#37456) Starting with clang 8, the older __sync atomic functions produce a warning for implicit strong memory barriers. This switches to the newer __atomic API where memory ordering is explicitly specified. Fixes #37174 --- src/Native/Unix/System.Native/pal_random.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Native/Unix/System.Native/pal_random.c b/src/Native/Unix/System.Native/pal_random.c index 8a267a34bd10..e08519906259 100644 --- a/src/Native/Unix/System.Native/pal_random.c +++ b/src/Native/Unix/System.Native/pal_random.c @@ -51,7 +51,8 @@ void SystemNative_GetNonCryptographicallySecureRandomBytes(uint8_t* buffer, int3 if (fd != -1) { - if (!__sync_bool_compare_and_swap(&rand_des, -1, fd)) + int expected = -1; + if (!__atomic_compare_exchange_n(&rand_des, &expected, fd, false, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST)) { // Another thread has already set the rand_des close(fd); From ea58ec54ccea6ea73cbc920ca9b331b67bcc5703 Mon Sep 17 00:00:00 2001 From: dotnet-maestro-bot Date: Mon, 6 May 2019 04:06:20 -0700 Subject: [PATCH 225/607] Update ProjectNTfs, ProjectNTfsTestILC to beta-27706-00, beta-27706-00, respectively (#37459) --- eng/dependencies.props | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/eng/dependencies.props b/eng/dependencies.props index e2a0b065456a..a77374bff912 100644 --- a/eng/dependencies.props +++ b/eng/dependencies.props @@ -9,8 +9,8 @@ These ref versions are pulled from https://github.com/dotnet/versions. --> - 4ebf44309b6c66d511de35421b81c5d17f4d33aa - 4ebf44309b6c66d511de35421b81c5d17f4d33aa + 508d4062082351b8478804dda240e7a827f733db + 508d4062082351b8478804dda240e7a827f733db 8bd1ec5fac9f0eec34ff6b34b1d878b4359e02dd @@ -22,9 +22,9 @@ - beta-27703-00 - beta-27703-00 - 1.0.0-beta-27703-00 + beta-27706-00 + beta-27706-00 + 1.0.0-beta-27706-00 4.4.0 From ce72b1566554b82b77cd127ecde9774d22465be4 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Mon, 6 May 2019 08:31:39 -0400 Subject: [PATCH 226/607] Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-optimization build 20190505.1 (#37449) - optimization.windows_nt-x64.IBC.CoreFx - 99.99.99-master-20190505.1 --- eng/Version.Details.xml | 4 ++-- eng/Versions.props | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index b87287845340..ac82b44697b7 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -94,9 +94,9 @@ https://github.com/dotnet/arcade a7a250e9c13147134543c35fef2fb81f19592edf - + https://dev.azure.com/dnceng/internal/_git/dotnet-optimization - e8942bef6d28b9ca4eed093e1501264b85451e8a + ae67e92d954578d6c8a2ba8bab0481288e04f967 diff --git a/eng/Versions.props b/eng/Versions.props index 38bc38141a5e..6cdcf22aabf5 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -48,6 +48,6 @@ 2.1.0-prerelease.19230.1 - 99.99.99-master-20190504.1 + 99.99.99-master-20190505.1 From 8c9aa2213aafe03b67cdda2f1b5e8664a969e434 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Mon, 6 May 2019 13:43:30 +0000 Subject: [PATCH 227/607] Update dependencies from https://github.com/dotnet/corefx build 20190506.1 (#37466) - runtime.native.System.IO.Ports - 4.6.0-preview6.19256.1 - Microsoft.NETCore.Platforms - 3.0.0-preview6.19256.1 --- eng/Version.Details.xml | 8 ++++---- eng/Versions.props | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index ac82b44697b7..6eefd6500cd1 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -26,13 +26,13 @@ https://github.com/dotnet/core-setup 71ef9eea28230688230124e49e6967bf2e2bbfbd - + https://github.com/dotnet/corefx - 464097cfc9c970c7ce31288fbd7e7cd8930364ca + bd278630dd08914ef521e62658afb69845c5b93a - + https://github.com/dotnet/corefx - 464097cfc9c970c7ce31288fbd7e7cd8930364ca + bd278630dd08914ef521e62658afb69845c5b93a https://github.com/dotnet/arcade diff --git a/eng/Versions.props b/eng/Versions.props index 6cdcf22aabf5..0daccd393adf 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -43,8 +43,8 @@ 3.0.0-preview6-27704-72 3.0.0-preview6-27704-72 - 3.0.0-preview6.19254.7 - 4.6.0-preview6.19254.7 + 3.0.0-preview6.19256.1 + 4.6.0-preview6.19256.1 2.1.0-prerelease.19230.1 From 23f320bcc04c6bdd6ec2338e8b999710e81e5839 Mon Sep 17 00:00:00 2001 From: Stephen Toub Date: Mon, 6 May 2019 10:14:31 -0400 Subject: [PATCH 228/607] Optimize Enumerable.Range(...).Select(...) (#37410) * Optimize Enumerable.Range(...).Select(...) Looking at some large code indexes, by far the most common uses of Enumerable.Range are when it's either directly iterated with a foreach, converted to an array with ToArray, or probably the most common, succeeded by Select. The first two are already decently optimized, with a custom range iterator returned from Enumerable.Range and that iterator already having a ToArray override. But it's missing the Select case. This commit adds that, by copying the existing SelectArrayIterator and then just tweaking it to use _start/_end rather than accessing a stored _source array. * Add more Debug.Asserts --- .../src/System/Linq/Range.SpeedOpt.cs | 2 +- .../src/System/Linq/Repeat.SpeedOpt.cs | 5 + .../src/System/Linq/Select.SpeedOpt.cs | 157 +++++++++++++++++- 3 files changed, 155 insertions(+), 9 deletions(-) diff --git a/src/System.Linq/src/System/Linq/Range.SpeedOpt.cs b/src/System.Linq/src/System/Linq/Range.SpeedOpt.cs index b6437812c673..29a6f0c02507 100644 --- a/src/System.Linq/src/System/Linq/Range.SpeedOpt.cs +++ b/src/System.Linq/src/System/Linq/Range.SpeedOpt.cs @@ -12,7 +12,7 @@ private sealed partial class RangeIterator : IPartition { public override IEnumerable Select(Func selector) { - return new SelectIPartitionIterator(this, selector); + return new SelectRangeIterator(_start, _end, selector); } public int[] ToArray() diff --git a/src/System.Linq/src/System/Linq/Repeat.SpeedOpt.cs b/src/System.Linq/src/System/Linq/Repeat.SpeedOpt.cs index 1764351bc831..a55cfe209130 100644 --- a/src/System.Linq/src/System/Linq/Repeat.SpeedOpt.cs +++ b/src/System.Linq/src/System/Linq/Repeat.SpeedOpt.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System.Collections.Generic; +using System.Diagnostics; namespace System.Linq { @@ -39,6 +40,8 @@ public List ToList() public IPartition Skip(int count) { + Debug.Assert(count > 0); + if (count >= _count) { return EmptyPartition.Instance; @@ -49,6 +52,8 @@ public IPartition Skip(int count) public IPartition Take(int count) { + Debug.Assert(count > 0); + if (count >= _count) { return this; diff --git a/src/System.Linq/src/System/Linq/Select.SpeedOpt.cs b/src/System.Linq/src/System/Linq/Select.SpeedOpt.cs index ff5a3a551556..b226a75abd79 100644 --- a/src/System.Linq/src/System/Linq/Select.SpeedOpt.cs +++ b/src/System.Linq/src/System/Linq/Select.SpeedOpt.cs @@ -125,8 +125,13 @@ public IPartition Skip(int count) return new SelectListPartitionIterator(_source, _selector, count, int.MaxValue); } - public IPartition Take(int count) => - count >= _source.Length ? (IPartition)this : new SelectListPartitionIterator(_source, _selector, 0, count - 1); + public IPartition Take(int count) + { + Debug.Assert(count > 0); + return count >= _source.Length ? + (IPartition)this : + new SelectListPartitionIterator(_source, _selector, 0, count - 1); + } public TResult TryGetElementAt(int index, out bool found) { @@ -157,6 +162,132 @@ public TResult TryGetLast(out bool found) } } + private sealed partial class SelectRangeIterator : Iterator, IPartition + { + private readonly int _start; + private readonly int _end; + private readonly Func _selector; + + public SelectRangeIterator(int start, int end, Func selector) + { + Debug.Assert(start < end); + Debug.Assert((end - start) <= int.MaxValue); + Debug.Assert(selector != null); + + _start = start; + _end = end; + _selector = selector; + } + + public override Iterator Clone() => + new SelectRangeIterator(_start, _end, _selector); + + public override bool MoveNext() + { + if (_state < 1 || _state == (_end - _start + 1)) + { + Dispose(); + return false; + } + + int index = _state++ - 1; + Debug.Assert(_start < _end - index); + _current = _selector(_start + index); + return true; + } + + public override IEnumerable Select(Func selector) => + new SelectRangeIterator(_start, _end, CombineSelectors(_selector, selector)); + + public TResult[] ToArray() + { + var results = new TResult[_end - _start]; + int srcIndex = _start; + for (int i = 0; i < results.Length; i++) + { + results[i] = _selector(srcIndex++); + } + + return results; + } + + public List ToList() + { + var results = new List(_end - _start); + for (int i = _start; i != _end; i++) + { + results.Add(_selector(i)); + } + + return results; + } + + public int GetCount(bool onlyIfCheap) + { + // In case someone uses Count() to force evaluation of the selector, + // run it provided `onlyIfCheap` is false. + if (!onlyIfCheap) + { + for (int i = _start; i != _end; i++) + { + _selector(i); + } + } + + return _end - _start; + } + + public IPartition Skip(int count) + { + Debug.Assert(count > 0); + + if (count >= (_end - _start)) + { + return EmptyPartition.Instance; + } + + return new SelectRangeIterator(_start + count, _end, _selector); + } + + public IPartition Take(int count) + { + Debug.Assert(count > 0); + + if (count >= (_end - _start)) + { + return this; + } + + return new SelectRangeIterator(_start, _start + count, _selector); + } + + public TResult TryGetElementAt(int index, out bool found) + { + if ((uint)index < (uint)(_end - _start)) + { + found = true; + return _selector(_start + index); + } + + found = false; + return default; + } + + public TResult TryGetFirst(out bool found) + { + Debug.Assert(_end > _start); + found = true; + return _selector(_start); + } + + public TResult TryGetLast(out bool found) + { + Debug.Assert(_end > _start); + found = true; + return _selector(_end - 1); + } + } + private sealed partial class SelectListIterator : IPartition { public TResult[] ToArray() @@ -212,8 +343,11 @@ public IPartition Skip(int count) return new SelectListPartitionIterator(_source, _selector, count, int.MaxValue); } - public IPartition Take(int count) => - new SelectListPartitionIterator(_source, _selector, 0, count - 1); + public IPartition Take(int count) + { + Debug.Assert(count > 0); + return new SelectListPartitionIterator(_source, _selector, 0, count - 1); + } public TResult TryGetElementAt(int index, out bool found) { @@ -308,8 +442,11 @@ public IPartition Skip(int count) return new SelectListPartitionIterator(_source, _selector, count, int.MaxValue); } - public IPartition Take(int count) => - new SelectListPartitionIterator(_source, _selector, 0, count - 1); + public IPartition Take(int count) + { + Debug.Assert(count > 0); + return new SelectListPartitionIterator(_source, _selector, 0, count - 1); + } public TResult TryGetElementAt(int index, out bool found) { @@ -413,8 +550,11 @@ public IPartition Skip(int count) return new SelectIPartitionIterator(_source.Skip(count), _selector); } - public IPartition Take(int count) => - new SelectIPartitionIterator(_source.Take(count), _selector); + public IPartition Take(int count) + { + Debug.Assert(count > 0); + return new SelectIPartitionIterator(_source.Take(count), _selector); + } public TResult TryGetElementAt(int index, out bool found) { @@ -579,6 +719,7 @@ public IPartition Skip(int count) public IPartition Take(int count) { + Debug.Assert(count > 0); int maxIndex = _minIndexInclusive + count - 1; return (uint)maxIndex >= (uint)_maxIndexInclusive ? this : new SelectListPartitionIterator(_source, _selector, _minIndexInclusive, maxIndex); } From b6e317127f4d05b04356f3a2a60313fb0dec7d2a Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Mon, 6 May 2019 14:31:27 +0000 Subject: [PATCH 229/607] Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-optimization build 20190506.1 (#37470) - optimization.windows_nt-x64.IBC.CoreFx - 99.99.99-master-20190506.1 --- eng/Version.Details.xml | 4 ++-- eng/Versions.props | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 6eefd6500cd1..207983f0e11e 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -94,9 +94,9 @@ https://github.com/dotnet/arcade a7a250e9c13147134543c35fef2fb81f19592edf - + https://dev.azure.com/dnceng/internal/_git/dotnet-optimization - ae67e92d954578d6c8a2ba8bab0481288e04f967 + 1c49409dc0cd36d049721c39b4f4013562a9625b diff --git a/eng/Versions.props b/eng/Versions.props index 0daccd393adf..f7ecb4d6ba1e 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -48,6 +48,6 @@ 2.1.0-prerelease.19230.1 - 99.99.99-master-20190505.1 + 99.99.99-master-20190506.1 From 10a014e2b4bb7c8f94616d639fe62e580d5dacae Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Mon, 6 May 2019 15:46:19 +0000 Subject: [PATCH 230/607] Update dependencies from https://github.com/dotnet/coreclr build 20190505.72 (#37469) - Microsoft.NET.Sdk.IL - 3.0.0-preview6-27705-72 - Microsoft.NETCore.ILAsm - 3.0.0-preview6-27705-72 - Microsoft.NETCore.Runtime.CoreCLR - 3.0.0-preview6-27705-72 --- eng/Version.Details.xml | 12 ++++++------ eng/Versions.props | 4 ++-- global.json | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 207983f0e11e..a016c8dfbda2 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -1,16 +1,16 @@ - + https://github.com/dotnet/coreclr - 71cae4ca99a163c4fd146e3583c64cb77a83fd0b + 08136a667d1a30c242f40731b3b0b299e4167220 - + https://github.com/dotnet/coreclr - 71cae4ca99a163c4fd146e3583c64cb77a83fd0b + 08136a667d1a30c242f40731b3b0b299e4167220 - + https://github.com/dotnet/coreclr - 71cae4ca99a163c4fd146e3583c64cb77a83fd0b + 08136a667d1a30c242f40731b3b0b299e4167220 diff --git a/eng/Versions.props b/eng/Versions.props index f7ecb4d6ba1e..438e58f7c020 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -40,8 +40,8 @@ 3.0.0-preview6-27705-02 3.0.0-preview6-27705-02 - 3.0.0-preview6-27704-72 - 3.0.0-preview6-27704-72 + 3.0.0-preview6-27705-72 + 3.0.0-preview6-27705-72 3.0.0-preview6.19256.1 4.6.0-preview6.19256.1 diff --git a/global.json b/global.json index 8bfc946cb110..ae9aff2e1eeb 100644 --- a/global.json +++ b/global.json @@ -5,6 +5,6 @@ "msbuild-sdks": { "Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19229.8", "Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19229.8", - "Microsoft.NET.Sdk.IL": "3.0.0-preview6-27704-72" + "Microsoft.NET.Sdk.IL": "3.0.0-preview6-27705-72" } } From 5518ab965f32dafebc7be23be295531030fd9677 Mon Sep 17 00:00:00 2001 From: Tarek Mahmoud Sayed Date: Mon, 6 May 2019 10:14:23 -0700 Subject: [PATCH 231/607] Fix Timezone Test with Morocco on Windows (#37419) --- .../tests/System/TimeZoneInfoTests.cs | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/System.Runtime/tests/System/TimeZoneInfoTests.cs b/src/System.Runtime/tests/System/TimeZoneInfoTests.cs index c100f0ded88c..9457cf1f6f2b 100644 --- a/src/System.Runtime/tests/System/TimeZoneInfoTests.cs +++ b/src/System.Runtime/tests/System/TimeZoneInfoTests.cs @@ -2221,12 +2221,23 @@ public static void TimeZoneInfo_DisplayNameStartsWithOffset() { Assert.False(string.IsNullOrWhiteSpace(tzi.StandardName)); Assert.Matches(@"^\(UTC(\+|-)[0-9]{2}:[0-9]{2}\) \S.*", tzi.DisplayName); - + // see https://github.com/dotnet/corefx/pull/33204#issuecomment-438782500 if (PlatformDetection.IsNotWindowsNanoServer && !PlatformDetection.IsWindows7) { string offset = Regex.Match(tzi.DisplayName, @"(-|)[0-9]{2}:[0-9]{2}").Value; - Assert.True(tzi.BaseUtcOffset == TimeSpan.Parse(offset), $"{offset} != {tzi.BaseUtcOffset}, dn:{tzi.DisplayName}, sn:{tzi.DisplayName}"); + TimeSpan ts = TimeSpan.Parse(offset); + if (tzi.BaseUtcOffset != ts && tzi.Id.IndexOf("Morocco", StringComparison.Ordinal) >= 0) + { + // Windows data can report display name with UTC+01:00 offset which is not matching the actual BaseUtcOffset. + // We special case this in the test to avoid the test failures like: + // 01:00 != 00:00:00, dn:(UTC+01:00) Casablanca, sn:Morocco Standard Time + Assert.True(tzi.BaseUtcOffset == new TimeSpan(0, 0, 0), $"{offset} != {tzi.BaseUtcOffset}, dn:{tzi.DisplayName}, sn:{tzi.StandardName}"); + } + else + { + Assert.True(tzi.BaseUtcOffset == ts, $"{offset} != {tzi.BaseUtcOffset}, dn:{tzi.DisplayName}, sn:{tzi.StandardName}"); + } } } } From 852f46def1b9abfebbf6cc58aa39c256a63f520a Mon Sep 17 00:00:00 2001 From: Matt Galbraith Date: Mon, 6 May 2019 10:54:54 -0700 Subject: [PATCH 232/607] Update Ubuntu 19.04 Docker Image Addresses https://github.com/dotnet/corefx/issues/37321 --- eng/pipelines/linux.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/pipelines/linux.yml b/eng/pipelines/linux.yml index c40364e23716..a1d96b909035 100644 --- a/eng/pipelines/linux.yml +++ b/eng/pipelines/linux.yml @@ -115,7 +115,7 @@ jobs: - alpineQueues: \(Alpine.38.Amd64\)ubuntu.1604.amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.8-helix-45b1fa2-20190327215821 - ${{ if eq(parameters.isOfficialBuild, 'true') }}: - - linuxDefaultQueues: Centos.7.Amd64+RedHat.7.Amd64+Debian.8.Amd64+Debian.9.Amd64+Ubuntu.1604.Amd64+Ubuntu.1804.Amd64+Ubuntu.1810.Amd64+OpenSuse.42.Amd64+SLES.12.Amd64+SLES.15.Amd64+\(Fedora.28.Amd64\)ubuntu.1604.amd64@mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-28-helix-45b1fa2-20190402012449+\(Fedora.29.Amd64\)ubuntu.1604.amd64@mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-29-helix-c6dc5e6-20190402012449+\(Ubuntu.1904.Amd64\)ubuntu.1604.amd64@mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-19.04-helix-amd64-b2d2f9b-20190430184508 + - linuxDefaultQueues: Centos.7.Amd64+RedHat.7.Amd64+Debian.8.Amd64+Debian.9.Amd64+Ubuntu.1604.Amd64+Ubuntu.1804.Amd64+Ubuntu.1810.Amd64+OpenSuse.42.Amd64+SLES.12.Amd64+SLES.15.Amd64+\(Fedora.28.Amd64\)ubuntu.1604.amd64@mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-28-helix-45b1fa2-20190402012449+\(Fedora.29.Amd64\)ubuntu.1604.amd64@mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-29-helix-c6dc5e6-20190402012449+\(Ubuntu.1904.Amd64\)ubuntu.1604.amd64@mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-19.04-helix-amd64-b43bf34-20190503204407 - linuxArm64Queues: \(Ubuntu.1604.Arm64\)Ubuntu.1604.Arm64.Docker@mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-16.04-helix-arm64v8-b049512-20190321153539 - linuxArmQueues: \(Debian.9.Arm32\)Ubuntu.1604.Arm32@mcr.microsoft.com/dotnet-buildtools/prereqs:debian-9-helix-arm32v7-b049512-20190321153542 - alpineQueues: \(Alpine.38.Amd64\)ubuntu.1604.amd64@mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.8-helix-45b1fa2-20190327215821+\(Alpine.39.Amd64\)ubuntu.1604.amd64@mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.9-helix-e4eaef4-20190228230637 From 5921c1076078e90c3998f41890dddeeb704b790c Mon Sep 17 00:00:00 2001 From: David Fowler Date: Mon, 6 May 2019 11:10:04 -0700 Subject: [PATCH 233/607] Fix remaining races in WriteAsync (#37414) * Fix remaining races in WriteAsync - Lock everything, this ensures Complete won't interfere with the copying or flushing * Enable test --- .../src/System/IO/Pipelines/Pipe.cs | 81 +++++++++++-------- .../tests/PipeWriterTests.cs | 1 - 2 files changed, 46 insertions(+), 36 deletions(-) diff --git a/src/System.IO.Pipelines/src/System/IO/Pipelines/Pipe.cs b/src/System.IO.Pipelines/src/System/IO/Pipelines/Pipe.cs index 69925aa971c3..dbd5a2d03c60 100644 --- a/src/System.IO.Pipelines/src/System/IO/Pipelines/Pipe.cs +++ b/src/System.IO.Pipelines/src/System/IO/Pipelines/Pipe.cs @@ -334,44 +334,49 @@ internal ValueTask FlushAsync(CancellationToken cancellationToken) ValueTask result; lock (_sync) { - var wasEmpty = CommitUnsynchronized(); + PrepareFlush(out completionData, out result, cancellationToken); + } - // AttachToken before completing reader awaiter in case cancellationToken is already completed - _writerAwaitable.BeginOperation(cancellationToken, s_signalWriterAwaitable, this); + TrySchedule(_readerScheduler, completionData); - // If the writer is completed (which it will be most of the time) then return a completed ValueTask - if (_writerAwaitable.IsCompleted) - { - var flushResult = new FlushResult(); - GetFlushResult(ref flushResult); - result = new ValueTask(flushResult); - } - else - { - // Otherwise it's async - result = new ValueTask(_writer, token: 0); - } + return result; + } - // Complete reader only if new data was pushed into the pipe - // Avoid throwing in between completing the reader and scheduling the callback - // if the intent is to allow pipe to continue reading the data - if (!wasEmpty) - { - _readerAwaitable.Complete(out completionData); - } - else - { - completionData = default; - } + private void PrepareFlush(out CompletionData completionData, out ValueTask result, CancellationToken cancellationToken) + { + var wasEmpty = CommitUnsynchronized(); - // I couldn't find a way for flush to induce backpressure deadlock - // if it always adds new data to pipe and wakes up the reader but assert anyway - Debug.Assert(_writerAwaitable.IsCompleted || _readerAwaitable.IsCompleted); + // AttachToken before completing reader awaiter in case cancellationToken is already completed + _writerAwaitable.BeginOperation(cancellationToken, s_signalWriterAwaitable, this); + + // If the writer is completed (which it will be most of the time) then return a completed ValueTask + if (_writerAwaitable.IsCompleted) + { + var flushResult = new FlushResult(); + GetFlushResult(ref flushResult); + result = new ValueTask(flushResult); + } + else + { + // Otherwise it's async + result = new ValueTask(_writer, token: 0); } - TrySchedule(_readerScheduler, completionData); + // Complete reader only if new data was pushed into the pipe + // Avoid throwing in between completing the reader and scheduling the callback + // if the intent is to allow pipe to continue reading the data + if (!wasEmpty) + { + _readerAwaitable.Complete(out completionData); + } + else + { + completionData = default; + } - return result; + // I couldn't find a way for flush to induce backpressure deadlock + // if it always adds new data to pipe and wakes up the reader but assert anyway + Debug.Assert(_writerAwaitable.IsCompleted || _readerAwaitable.IsCompleted); } internal void CompleteWriter(Exception exception) @@ -930,12 +935,15 @@ internal ValueTask WriteAsync(ReadOnlyMemory source, Cancella ThrowHelper.ThrowInvalidOperationException_NoWritingAllowed(); } - // Allocate whatever the pool gives us so we can write, this also marks the - // state as writing - AllocateWriteHeadIfNeeded(0); + CompletionData completionData; + ValueTask result; lock (_sync) { + // Allocate whatever the pool gives us so we can write, this also marks the + // state as writing + AllocateWriteHeadIfNeeded(0); + if (source.Length <= _writingHeadMemory.Length) { source.CopyTo(_writingHeadMemory); @@ -947,9 +955,12 @@ internal ValueTask WriteAsync(ReadOnlyMemory source, Cancella // This is the multi segment copy WriteMultiSegment(source.Span); } + + PrepareFlush(out completionData, out result, cancellationToken); } - return FlushAsync(cancellationToken); + TrySchedule(_readerScheduler, completionData); + return result; } private void WriteMultiSegment(ReadOnlySpan source) diff --git a/src/System.IO.Pipelines/tests/PipeWriterTests.cs b/src/System.IO.Pipelines/tests/PipeWriterTests.cs index 68ad54fae7e4..0ae5110673bb 100644 --- a/src/System.IO.Pipelines/tests/PipeWriterTests.cs +++ b/src/System.IO.Pipelines/tests/PipeWriterTests.cs @@ -233,7 +233,6 @@ public async Task WritesUsingGetMemoryWorks() pipe.Reader.Complete(); } - [ActiveIssue(37239)] [Fact] public async Task CompleteWithLargeWriteThrows() { From e486c461f4c2c6609285f94b6948c5e67a9f7bd5 Mon Sep 17 00:00:00 2001 From: Jeremy Barton Date: Mon, 6 May 2019 11:15:38 -0700 Subject: [PATCH 234/607] Update RID graph There are some releases that have already happened that we've missed: * Fedora 30 * Linux Mint 19.1 * SLES 12.4 Others are upcoming / in beta: * Debian 10 (June) * Linux Mint 19.2 (announced, no date) * openSUSE 15.1 (imminent) * SLES 15.1 (June) * Fedora 31 (October) * Ubuntu 19.10 (October) * Oracle Linux 8(.0) (Beta) --- .../runtime.compatibility.json | 385 ++++++++++++++++++ pkg/Microsoft.NETCore.Platforms/runtime.json | 171 +++++++- .../runtimeGroups.props | 19 +- 3 files changed, 566 insertions(+), 9 deletions(-) diff --git a/pkg/Microsoft.NETCore.Platforms/runtime.compatibility.json b/pkg/Microsoft.NETCore.Platforms/runtime.compatibility.json index 4c398f887dd2..1d45d566032f 100644 --- a/pkg/Microsoft.NETCore.Platforms/runtime.compatibility.json +++ b/pkg/Microsoft.NETCore.Platforms/runtime.compatibility.json @@ -303,6 +303,74 @@ "any", "base" ], + "debian.10": [ + "debian.10", + "debian", + "linux", + "unix", + "any", + "base" + ], + "debian.10-arm": [ + "debian.10-arm", + "debian.10", + "debian-arm", + "debian", + "linux-arm", + "linux", + "unix-arm", + "unix", + "any", + "base" + ], + "debian.10-arm64": [ + "debian.10-arm64", + "debian.10", + "debian-arm64", + "debian", + "linux-arm64", + "linux", + "unix-arm64", + "unix", + "any", + "base" + ], + "debian.10-armel": [ + "debian.10-armel", + "debian.10", + "debian-armel", + "debian", + "linux-armel", + "linux", + "unix-armel", + "unix", + "any", + "base" + ], + "debian.10-x64": [ + "debian.10-x64", + "debian.10", + "debian-x64", + "debian", + "linux-x64", + "linux", + "unix-x64", + "unix", + "any", + "base" + ], + "debian.10-x86": [ + "debian.10-x86", + "debian.10", + "debian-x86", + "debian", + "linux-x86", + "linux", + "unix-x86", + "unix", + "any", + "base" + ], "debian.8": [ "debian.8", "debian", @@ -596,6 +664,46 @@ "any", "base" ], + "fedora.30": [ + "fedora.30", + "fedora", + "linux", + "unix", + "any", + "base" + ], + "fedora.30-x64": [ + "fedora.30-x64", + "fedora.30", + "fedora-x64", + "fedora", + "linux-x64", + "linux", + "unix-x64", + "unix", + "any", + "base" + ], + "fedora.31": [ + "fedora.31", + "fedora", + "linux", + "unix", + "any", + "base" + ], + "fedora.31-x64": [ + "fedora.31-x64", + "fedora.31", + "fedora-x64", + "fedora", + "linux-x64", + "linux", + "unix-x64", + "unix", + "any", + "base" + ], "freebsd": [ "freebsd", "unix", @@ -1086,6 +1194,67 @@ "any", "base" ], + "linuxmint.19.1": [ + "linuxmint.19.1", + "linuxmint.19", + "ubuntu.18.04", + "ubuntu", + "debian", + "linux", + "unix", + "any", + "base" + ], + "linuxmint.19.1-x64": [ + "linuxmint.19.1-x64", + "linuxmint.19.1", + "linuxmint.19-x64", + "linuxmint.19", + "ubuntu.18.04-x64", + "ubuntu.18.04", + "ubuntu-x64", + "ubuntu", + "debian-x64", + "debian", + "linux-x64", + "linux", + "unix-x64", + "unix", + "any", + "base" + ], + "linuxmint.19.2": [ + "linuxmint.19.2", + "linuxmint.19.1", + "linuxmint.19", + "ubuntu.18.04", + "ubuntu", + "debian", + "linux", + "unix", + "any", + "base" + ], + "linuxmint.19.2-x64": [ + "linuxmint.19.2-x64", + "linuxmint.19.2", + "linuxmint.19.1-x64", + "linuxmint.19.1", + "linuxmint.19-x64", + "linuxmint.19", + "ubuntu.18.04-x64", + "ubuntu.18.04", + "ubuntu-x64", + "ubuntu", + "debian-x64", + "debian", + "linux-x64", + "linux", + "unix-x64", + "unix", + "any", + "base" + ], "ol": [ "ol", "rhel", @@ -1482,6 +1651,64 @@ "any", "base" ], + "ol.8": [ + "ol.8", + "ol", + "rhel.8", + "rhel", + "linux", + "unix", + "any", + "base" + ], + "ol.8-x64": [ + "ol.8-x64", + "ol.8", + "ol-x64", + "rhel.8-x64", + "ol", + "rhel.8", + "rhel-x64", + "rhel", + "linux-x64", + "linux", + "unix-x64", + "unix", + "any", + "base" + ], + "ol.8.0": [ + "ol.8.0", + "ol.8", + "rhel.8.0", + "ol", + "rhel.8", + "rhel", + "linux", + "unix", + "any", + "base" + ], + "ol.8.0-x64": [ + "ol.8.0-x64", + "ol.8.0", + "ol.8-x64", + "rhel.8.0-x64", + "ol.8", + "rhel.8.0", + "ol-x64", + "rhel.8-x64", + "ol", + "rhel.8", + "rhel-x64", + "rhel", + "linux-x64", + "linux", + "unix-x64", + "unix", + "any", + "base" + ], "opensuse": [ "opensuse", "linux", @@ -1539,6 +1766,26 @@ "any", "base" ], + "opensuse.15.1": [ + "opensuse.15.1", + "opensuse", + "linux", + "unix", + "any", + "base" + ], + "opensuse.15.1-x64": [ + "opensuse.15.1-x64", + "opensuse.15.1", + "opensuse-x64", + "opensuse", + "linux-x64", + "linux", + "unix-x64", + "unix", + "any", + "base" + ], "opensuse.42.1": [ "opensuse.42.1", "opensuse", @@ -2167,8 +2414,41 @@ "any", "base" ], + "sles.12.4": [ + "sles.12.4", + "sles.12.3", + "sles.12.2", + "sles.12.1", + "sles.12", + "sles", + "linux", + "unix", + "any", + "base" + ], + "sles.12.4-x64": [ + "sles.12.4-x64", + "sles.12.4", + "sles.12.3-x64", + "sles.12.3", + "sles.12.2-x64", + "sles.12.2", + "sles.12.1-x64", + "sles.12.1", + "sles.12-x64", + "sles.12", + "sles-x64", + "sles", + "linux-x64", + "linux", + "unix-x64", + "unix", + "any", + "base" + ], "sles.15": [ "sles.15", + "sles.12.4", "sles.12.3", "sles.12.2", "sles.12.1", @@ -2182,6 +2462,46 @@ "sles.15-x64": [ "sles.15-x64", "sles.15", + "sles.12.4-x64", + "sles.12.4", + "sles.12.3-x64", + "sles.12.3", + "sles.12.2-x64", + "sles.12.2", + "sles.12.1-x64", + "sles.12.1", + "sles.12-x64", + "sles.12", + "sles-x64", + "sles", + "linux-x64", + "linux", + "unix-x64", + "unix", + "any", + "base" + ], + "sles.15.1": [ + "sles.15.1", + "sles.15", + "sles.12.4", + "sles.12.3", + "sles.12.2", + "sles.12.1", + "sles.12", + "sles", + "linux", + "unix", + "any", + "base" + ], + "sles.15.1-x64": [ + "sles.15.1-x64", + "sles.15.1", + "sles.15-x64", + "sles.15", + "sles.12.4-x64", + "sles.12.4", "sles.12.3-x64", "sles.12.3", "sles.12.2-x64", @@ -3010,6 +3330,71 @@ "any", "base" ], + "ubuntu.19.10": [ + "ubuntu.19.10", + "ubuntu", + "debian", + "linux", + "unix", + "any", + "base" + ], + "ubuntu.19.10-arm": [ + "ubuntu.19.10-arm", + "ubuntu.19.10", + "ubuntu-arm", + "ubuntu", + "debian-arm", + "debian", + "linux-arm", + "linux", + "unix-arm", + "unix", + "any", + "base" + ], + "ubuntu.19.10-arm64": [ + "ubuntu.19.10-arm64", + "ubuntu.19.10", + "ubuntu-arm64", + "ubuntu", + "debian-arm64", + "debian", + "linux-arm64", + "linux", + "unix-arm64", + "unix", + "any", + "base" + ], + "ubuntu.19.10-x64": [ + "ubuntu.19.10-x64", + "ubuntu.19.10", + "ubuntu-x64", + "ubuntu", + "debian-x64", + "debian", + "linux-x64", + "linux", + "unix-x64", + "unix", + "any", + "base" + ], + "ubuntu.19.10-x86": [ + "ubuntu.19.10-x86", + "ubuntu.19.10", + "ubuntu-x86", + "ubuntu", + "debian-x86", + "debian", + "linux-x86", + "linux", + "unix-x86", + "unix", + "any", + "base" + ], "unix": [ "unix", "any", diff --git a/pkg/Microsoft.NETCore.Platforms/runtime.json b/pkg/Microsoft.NETCore.Platforms/runtime.json index 5c6e6987189f..af6347b76c6f 100644 --- a/pkg/Microsoft.NETCore.Platforms/runtime.json +++ b/pkg/Microsoft.NETCore.Platforms/runtime.json @@ -161,6 +161,41 @@ "linux-x86" ] }, + "debian.10": { + "#import": [ + "debian" + ] + }, + "debian.10-arm": { + "#import": [ + "debian.10", + "debian-arm" + ] + }, + "debian.10-arm64": { + "#import": [ + "debian.10", + "debian-arm64" + ] + }, + "debian.10-armel": { + "#import": [ + "debian.10", + "debian-armel" + ] + }, + "debian.10-x64": { + "#import": [ + "debian.10", + "debian-x64" + ] + }, + "debian.10-x86": { + "#import": [ + "debian.10", + "debian-x86" + ] + }, "debian.8": { "#import": [ "debian" @@ -319,6 +354,28 @@ "fedora-x64" ] }, + "fedora.30": { + "#import": [ + "fedora" + ] + }, + "fedora.30-x64": { + "#import": [ + "fedora.30", + "fedora-x64" + ] + }, + "fedora.31": { + "#import": [ + "fedora" + ] + }, + "fedora.31-x64": { + "#import": [ + "fedora.31", + "fedora-x64" + ] + }, "freebsd": { "#import": [ "unix" @@ -554,6 +611,28 @@ "ubuntu.18.04-x64" ] }, + "linuxmint.19.1": { + "#import": [ + "linuxmint.19" + ] + }, + "linuxmint.19.1-x64": { + "#import": [ + "linuxmint.19.1", + "linuxmint.19-x64" + ] + }, + "linuxmint.19.2": { + "#import": [ + "linuxmint.19.1" + ] + }, + "linuxmint.19.2-x64": { + "#import": [ + "linuxmint.19.2", + "linuxmint.19.1-x64" + ] + }, "ol": { "#import": [ "rhel" @@ -669,6 +748,32 @@ "rhel.7.6-x64" ] }, + "ol.8": { + "#import": [ + "ol", + "rhel.8" + ] + }, + "ol.8-x64": { + "#import": [ + "ol.8", + "ol-x64", + "rhel.8-x64" + ] + }, + "ol.8.0": { + "#import": [ + "ol.8", + "rhel.8.0" + ] + }, + "ol.8.0-x64": { + "#import": [ + "ol.8.0", + "ol.8-x64", + "rhel.8.0-x64" + ] + }, "opensuse": { "#import": [ "linux" @@ -702,6 +807,17 @@ "opensuse-x64" ] }, + "opensuse.15.1": { + "#import": [ + "opensuse" + ] + }, + "opensuse.15.1-x64": { + "#import": [ + "opensuse.15.1", + "opensuse-x64" + ] + }, "opensuse.42.1": { "#import": [ "opensuse" @@ -988,15 +1104,37 @@ "sles.12.2-x64" ] }, - "sles.15": { + "sles.12.4": { "#import": [ "sles.12.3" ] }, + "sles.12.4-x64": { + "#import": [ + "sles.12.4", + "sles.12.3-x64" + ] + }, + "sles.15": { + "#import": [ + "sles.12.4" + ] + }, "sles.15-x64": { "#import": [ "sles.15", - "sles.12.3-x64" + "sles.12.4-x64" + ] + }, + "sles.15.1": { + "#import": [ + "sles.15" + ] + }, + "sles.15.1-x64": { + "#import": [ + "sles.15.1", + "sles.15-x64" ] }, "tizen": { @@ -1374,6 +1512,35 @@ "ubuntu-x86" ] }, + "ubuntu.19.10": { + "#import": [ + "ubuntu" + ] + }, + "ubuntu.19.10-arm": { + "#import": [ + "ubuntu.19.10", + "ubuntu-arm" + ] + }, + "ubuntu.19.10-arm64": { + "#import": [ + "ubuntu.19.10", + "ubuntu-arm64" + ] + }, + "ubuntu.19.10-x64": { + "#import": [ + "ubuntu.19.10", + "ubuntu-x64" + ] + }, + "ubuntu.19.10-x86": { + "#import": [ + "ubuntu.19.10", + "ubuntu-x86" + ] + }, "unix": { "#import": [ "any" diff --git a/pkg/Microsoft.NETCore.Platforms/runtimeGroups.props b/pkg/Microsoft.NETCore.Platforms/runtimeGroups.props index 249e5be9a2f3..55299c20432a 100644 --- a/pkg/Microsoft.NETCore.Platforms/runtimeGroups.props +++ b/pkg/Microsoft.NETCore.Platforms/runtimeGroups.props @@ -35,14 +35,14 @@ linux x64;x86;arm;armel;arm64 - 8;9 + 8;9;10 false linux x64 - 23;24;25;26;27;28;29 + 23;24;25;26;27;28;29;30;31 false @@ -65,7 +65,7 @@ ubuntu.18.04 x64 - + 1;2 @@ -74,12 +74,18 @@ 7;7.0;7.1;7.2;7.3;7.4;7.5;7.6 true + + rhel + x64 + 8;8.0 + true + linux x64 - 13.2;15.0;42.1;42.2;42.3 + 13.2;15.0;15.1;42.1;42.2;42.3 false @@ -107,7 +113,6 @@ x64 7;7.0;7.1;7.2;7.3;7.4;7.5;7.6 - linux x64 @@ -117,7 +122,7 @@ linux x64 - 12;12.1;12.2;12.3;15 + 12;12.1;12.2;12.3;12.4;15;15.1 @@ -135,7 +140,7 @@ debian x64;x86;arm;arm64 - 16.04;16.10;17.04;17.10;18.04;18.10;19.04 + 16.04;16.10;17.04;17.10;18.04;18.10;19.04;19.10 false From bed74bf66181a0361775ddaa94f82e5049f1280c Mon Sep 17 00:00:00 2001 From: Viktor Hofer Date: Wed, 1 May 2019 22:42:46 +0200 Subject: [PATCH 235/607] Update the dotnet SDK to 3.0.100-preview6-011681 --- global.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/global.json b/global.json index ae9aff2e1eeb..f5752f4c55e4 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "tools": { - "dotnet": "3.0.100-preview3-010431" + "dotnet": "3.0.100-preview6-011681" }, "msbuild-sdks": { "Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19229.8", From 5da06ed03ceb0a94032ac566b52edcc86e70b35b Mon Sep 17 00:00:00 2001 From: Viktor Hofer Date: Thu, 2 May 2019 15:02:01 +0200 Subject: [PATCH 236/607] Manual darc update from build '20190504.1' --- eng/Version.Details.xml | 46 ++++++++++++++++---------------- eng/Versions.props | 22 +++++++-------- eng/common/build.ps1 | 4 +++ eng/common/build.sh | 4 +++ eng/common/init-tools-native.ps1 | 6 ++++- eng/common/init-tools-native.sh | 12 +++------ eng/common/tools.ps1 | 10 +++++++ eng/common/tools.sh | 12 +++++++++ 8 files changed, 73 insertions(+), 43 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index a016c8dfbda2..4e26dcc62810 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -48,51 +48,51 @@ https://github.com/dotnet/arcade - a7a250e9c13147134543c35fef2fb81f19592edf + 1b8589bbf53b9a5e819460798eff59830f39a3be - + https://github.com/dotnet/arcade - a7a250e9c13147134543c35fef2fb81f19592edf + 1b8589bbf53b9a5e819460798eff59830f39a3be - + https://github.com/dotnet/arcade - a7a250e9c13147134543c35fef2fb81f19592edf + 1b8589bbf53b9a5e819460798eff59830f39a3be - + https://github.com/dotnet/arcade - a7a250e9c13147134543c35fef2fb81f19592edf + 1b8589bbf53b9a5e819460798eff59830f39a3be - + https://github.com/dotnet/arcade - a7a250e9c13147134543c35fef2fb81f19592edf + 1b8589bbf53b9a5e819460798eff59830f39a3be - + https://github.com/dotnet/arcade - a7a250e9c13147134543c35fef2fb81f19592edf + 1b8589bbf53b9a5e819460798eff59830f39a3be - + https://github.com/dotnet/arcade - a7a250e9c13147134543c35fef2fb81f19592edf + 1b8589bbf53b9a5e819460798eff59830f39a3be - + https://github.com/dotnet/arcade - a7a250e9c13147134543c35fef2fb81f19592edf + 1b8589bbf53b9a5e819460798eff59830f39a3be - + https://github.com/dotnet/arcade - a7a250e9c13147134543c35fef2fb81f19592edf + 1b8589bbf53b9a5e819460798eff59830f39a3be - + https://github.com/dotnet/arcade - a7a250e9c13147134543c35fef2fb81f19592edf + 1b8589bbf53b9a5e819460798eff59830f39a3be - + https://github.com/dotnet/arcade - a7a250e9c13147134543c35fef2fb81f19592edf + 1b8589bbf53b9a5e819460798eff59830f39a3be - + https://github.com/dotnet/arcade - a7a250e9c13147134543c35fef2fb81f19592edf + 1b8589bbf53b9a5e819460798eff59830f39a3be https://dev.azure.com/dnceng/internal/_git/dotnet-optimization diff --git a/eng/Versions.props b/eng/Versions.props index 438e58f7c020..6633bea6a84a 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -24,17 +24,17 @@ 1.0.0-beta.19229.8 - 1.0.0-beta.19229.8 - 1.0.0-beta.19229.8 - 1.0.0-beta.19229.8 - 2.4.0-beta.19229.8 - 2.5.1-beta.19229.8 - 1.0.0-beta.19229.8 - 1.0.0-beta.19229.8 - 1.0.0-beta.19229.8 - 1.0.0-beta.19229.8 - 2.2.0-beta.19229.8 - 1.0.0-beta.19229.8 + 1.0.0-beta.19254.1 + 1.0.0-beta.19254.1 + 1.0.0-beta.19254.1 + 2.4.0-beta.19254.1 + 2.5.1-beta.19254.1 + 1.0.0-beta.19254.1 + 1.0.0-beta.19254.1 + 1.0.0-beta.19254.1 + 1.0.0-beta.19254.1 + 2.2.0-beta.19254.1 + 1.0.0-beta.19254.1 3.0.0-preview6-27705-02 3.0.0-preview6-27705-02 diff --git a/eng/common/build.ps1 b/eng/common/build.ps1 index d0147db4bd52..d7e3799ebd99 100644 --- a/eng/common/build.ps1 +++ b/eng/common/build.ps1 @@ -122,6 +122,10 @@ try { . $configureToolsetScript } + if (($restore) -and ($null -eq $env:DisableNativeToolsetInstalls)) { + InitializeNativeTools + } + Build } catch { diff --git a/eng/common/build.sh b/eng/common/build.sh index 40b1e8ec73e3..d038959ab46c 100755 --- a/eng/common/build.sh +++ b/eng/common/build.sh @@ -218,4 +218,8 @@ if [[ -n "${useInstalledDotNetCli:-}" ]]; then use_installed_dotnet_cli="$useInstalledDotNetCli" fi +if [[ "$restore" == true && -z ${DisableNativeToolsetInstalls:-} ]]; then + InitializeNativeTools +fi + Build diff --git a/eng/common/init-tools-native.ps1 b/eng/common/init-tools-native.ps1 index 495a563a7583..a4306bd37e14 100644 --- a/eng/common/init-tools-native.ps1 +++ b/eng/common/init-tools-native.ps1 @@ -41,9 +41,13 @@ Param ( [switch] $Force = $False, [int] $DownloadRetries = 5, [int] $RetryWaitTimeInSeconds = 30, - [string] $GlobalJsonFile = "$PSScriptRoot\..\..\global.json" + [string] $GlobalJsonFile ) +if (!$GlobalJsonFile) { + $GlobalJsonFile = Join-Path (Get-Item $PSScriptRoot).Parent.Parent.FullName "global.json" +} + Set-StrictMode -version 2.0 $ErrorActionPreference="Stop" diff --git a/eng/common/init-tools-native.sh b/eng/common/init-tools-native.sh index 54b70f678ba3..fc72d13948e8 100644 --- a/eng/common/init-tools-native.sh +++ b/eng/common/init-tools-native.sh @@ -9,7 +9,7 @@ clean=false force=false download_retries=5 retry_wait_time_seconds=30 -global_json_file="${scriptroot}/../../global.json" +global_json_file="$(dirname "$(dirname "${scriptroot}")")/global.json" declare -A native_assets . $scriptroot/native/common-library.sh @@ -71,6 +71,7 @@ function ReadGlobalJsonNativeTools { local native_tools_list=$(echo $native_tools_section | awk -F"[{}]" '{print $2}') native_tools_list=${native_tools_list//[\" ]/} native_tools_list=${native_tools_list//,/$'\n'} + native_tools_list="$(echo -e "${native_tools_list}" | tr -d '[:space:]')" local old_IFS=$IFS while read -r line; do @@ -116,8 +117,6 @@ else installer_command+=" --clean" fi - echo "Installing $tool version $tool_version" - echo "Executing '$installer_command'" $installer_command if [[ $? != 0 ]]; then @@ -127,19 +126,16 @@ else done fi -if [[ ! -z $clean ]]; then +if [[ $clean = true ]]; then exit 0 fi if [[ -d $install_bin ]]; then echo "Native tools are available from $install_bin" - if [[ !-z BUILD_BUILDNUMBER ]]; then - echo "##vso[task.prependpath]$install_bin" - fi + echo "##vso[task.prependpath]$install_bin" else echo "Native tools install directory does not exist, installation failed" >&2 exit 1 fi exit 0 - diff --git a/eng/common/tools.ps1 b/eng/common/tools.ps1 index 5c4a129c8632..09794dff8377 100644 --- a/eng/common/tools.ps1 +++ b/eng/common/tools.ps1 @@ -391,6 +391,16 @@ function GetSdkTaskProject([string]$taskName) { return Join-Path (Split-Path (InitializeToolset) -Parent) "SdkTasks\$taskName.proj" } +function InitializeNativeTools() { + if (Get-Member -InputObject $GlobalJson -Name "native-tools") { + $nativeArgs="" + if ($ci) { + $nativeArgs = "-InstallDirectory $ToolsDir" + } + Invoke-Expression "& `"$PSScriptRoot/init-tools-native.ps1`" $nativeArgs" + } +} + function InitializeToolset() { if (Test-Path variable:global:_ToolsetBuildProj) { return $global:_ToolsetBuildProj diff --git a/eng/common/tools.sh b/eng/common/tools.sh index ecdece1f8552..59f47c5fa90d 100644 --- a/eng/common/tools.sh +++ b/eng/common/tools.sh @@ -212,6 +212,17 @@ function GetNuGetPackageCachePath { _GetNuGetPackageCachePath=$NUGET_PACKAGES } +function InitializeNativeTools() { + if grep -Fq "native-tools" $global_json_file + then + local nativeArgs="" + if [[ "$ci" == true ]]; then + nativeArgs="-InstallDirectory $tools_dir" + fi + "$_script_dir/init-tools-native.sh" $nativeArgs + fi +} + function InitializeToolset { if [[ -n "${_InitializeToolset:-}" ]]; then return @@ -307,6 +318,7 @@ eng_root=`cd -P "$_script_dir/.." && pwd` repo_root=`cd -P "$_script_dir/../.." && pwd` artifacts_dir="$repo_root/artifacts" toolset_dir="$artifacts_dir/toolset" +tools_dir="$repo_root/.tools" log_dir="$artifacts_dir/log/$configuration" temp_dir="$artifacts_dir/tmp/$configuration" From b76b8ba99aa69bed5f5979dc9e9159c57f72ca26 Mon Sep 17 00:00:00 2001 From: Viktor Hofer Date: Mon, 6 May 2019 21:10:22 +0200 Subject: [PATCH 237/607] Move Resources.targets to run before the SDK --- Directory.Build.targets | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Directory.Build.targets b/Directory.Build.targets index d58e963d4487..603a30e0cc15 100644 --- a/Directory.Build.targets +++ b/Directory.Build.targets @@ -15,6 +15,7 @@ $(TestStrongNameKeyId) + @@ -125,7 +126,6 @@ - From 0375997f5bda0aeab769834ae1881c96910273c7 Mon Sep 17 00:00:00 2001 From: ericstj Date: Mon, 6 May 2019 10:48:11 -0700 Subject: [PATCH 238/607] Don't include the nupkg/nuspec from the package folder Package testing was failing because the SDK probed up the directory structure for the locally copied CLI and found our package nupkg/nuspec. --- pkg/test/testPackages.proj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/test/testPackages.proj b/pkg/test/testPackages.proj index 4d9cb550066a..193762258d67 100644 --- a/pkg/test/testPackages.proj +++ b/pkg/test/testPackages.proj @@ -52,7 +52,7 @@ $(TestToolsDir)eng/ - + $(TestToolsDir)%(RecursiveDir) From 6a53eef1e3cdacada60ec9a70d6a48a23bd0e062 Mon Sep 17 00:00:00 2001 From: Randolph West Date: Mon, 6 May 2019 14:54:03 -0600 Subject: [PATCH 239/607] Update SerializerProgrammingModel.md (#37478) "Supprt" typo. --- src/System.Text.Json/docs/SerializerProgrammingModel.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/System.Text.Json/docs/SerializerProgrammingModel.md b/src/System.Text.Json/docs/SerializerProgrammingModel.md index 59633a1229c7..73d4d7e4000e 100644 --- a/src/System.Text.Json/docs/SerializerProgrammingModel.md +++ b/src/System.Text.Json/docs/SerializerProgrammingModel.md @@ -168,7 +168,7 @@ Dates are not part of JSON, so an internal converter is supplied. Dates are typi If the internal converter is not sufficient, such as when the format has a custom format or is not ISO 8601 compatible, then a developer will be able to add a new value converter. -## Enum Supprt +## Enum Support By default, Enums are treated as longs in the JSON. This is most efficient. There will be future support to be based on strings; likely through an attribute to change the default for a given property and an option on `JsonSerializerOptions` to change the default globally. ## ICollection and Array Converter feature From 881021d6799973ae0a32addbc8e84d7b1f99768f Mon Sep 17 00:00:00 2001 From: Tanner Gooding Date: Mon, 6 May 2019 13:56:38 -0700 Subject: [PATCH 240/607] Regenerating the System.Numerics.Vectors ref assembly to pick up the changes made in S.P.Corelib (#37473) * Regenerating the System.Numerics.Vectors ref assembly to pick up the changes made in S.P.Corelib * Fixing the ApiCompatBaseline for System.Numerics.Vectors --- .../ref/System.Numerics.Vectors.cs | 26 +++++++++++-------- .../ref/System.Numerics.Vectors.csproj | 1 - .../src/ApiCompatBaseline.uapaot.txt | 7 +++++ 3 files changed, 22 insertions(+), 12 deletions(-) create mode 100644 src/System.Numerics.Vectors/src/ApiCompatBaseline.uapaot.txt diff --git a/src/System.Numerics.Vectors/ref/System.Numerics.Vectors.cs b/src/System.Numerics.Vectors/ref/System.Numerics.Vectors.cs index 1202bab3e86e..a70fe74fa6e3 100644 --- a/src/System.Numerics.Vectors/ref/System.Numerics.Vectors.cs +++ b/src/System.Numerics.Vectors/ref/System.Numerics.Vectors.cs @@ -470,21 +470,23 @@ public readonly void CopyTo(float[] array, int index) { } public partial struct Vector : System.IEquatable>, System.IFormattable where T : struct { private int _dummyPrimitive; -#if HAS_SPAN + public Vector(System.ReadOnlySpan values) { throw null; } + public Vector(System.ReadOnlySpan values) { throw null; } public Vector(System.Span values) { throw null; } -#endif public Vector(T value) { throw null; } public Vector(T[] values) { throw null; } public Vector(T[] values, int index) { throw null; } public static int Count { get { throw null; } } - public T this[int index] { get { throw null; } } + public readonly T this[int index] { get { throw null; } } public static System.Numerics.Vector One { get { throw null; } } public static System.Numerics.Vector Zero { get { throw null; } } - public void CopyTo(T[] destination) { } - public void CopyTo(T[] destination, int startIndex) { } - public bool Equals(System.Numerics.Vector other) { throw null; } - public override bool Equals(object obj) { throw null; } - public override int GetHashCode() { throw null; } + public readonly void CopyTo(System.Span destination) { } + public readonly void CopyTo(System.Span destination) { } + public readonly void CopyTo(T[] destination) { } + public readonly void CopyTo(T[] destination, int startIndex) { } + public readonly bool Equals(System.Numerics.Vector other) { throw null; } + public override readonly bool Equals(object obj) { throw null; } + public override readonly int GetHashCode() { throw null; } public static System.Numerics.Vector operator +(System.Numerics.Vector left, System.Numerics.Vector right) { throw null; } public static System.Numerics.Vector operator &(System.Numerics.Vector left, System.Numerics.Vector right) { throw null; } public static System.Numerics.Vector operator |(System.Numerics.Vector left, System.Numerics.Vector right) { throw null; } @@ -512,8 +514,10 @@ public void CopyTo(T[] destination, int startIndex) { } public static System.Numerics.Vector operator ~(System.Numerics.Vector value) { throw null; } public static System.Numerics.Vector operator -(System.Numerics.Vector left, System.Numerics.Vector right) { throw null; } public static System.Numerics.Vector operator -(System.Numerics.Vector value) { throw null; } - public override string ToString() { throw null; } - public string ToString(string format) { throw null; } - public string ToString(string format, System.IFormatProvider formatProvider) { throw null; } + public override readonly string ToString() { throw null; } + public readonly string ToString(string format) { throw null; } + public readonly string ToString(string format, System.IFormatProvider formatProvider) { throw null; } + public readonly bool TryCopyTo(System.Span destination) { throw null; } + public readonly bool TryCopyTo(System.Span destination) { throw null; } } } diff --git a/src/System.Numerics.Vectors/ref/System.Numerics.Vectors.csproj b/src/System.Numerics.Vectors/ref/System.Numerics.Vectors.csproj index de3feb440e53..2bdc2116580a 100644 --- a/src/System.Numerics.Vectors/ref/System.Numerics.Vectors.csproj +++ b/src/System.Numerics.Vectors/ref/System.Numerics.Vectors.csproj @@ -1,7 +1,6 @@ {650277B5-9423-4ACE-BB54-2659995B21C7} - $(DefineConstants);HAS_SPAN netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release diff --git a/src/System.Numerics.Vectors/src/ApiCompatBaseline.uapaot.txt b/src/System.Numerics.Vectors/src/ApiCompatBaseline.uapaot.txt new file mode 100644 index 000000000000..ccf8db70f13e --- /dev/null +++ b/src/System.Numerics.Vectors/src/ApiCompatBaseline.uapaot.txt @@ -0,0 +1,7 @@ +Compat issues with assembly System.Numerics.Vectors: +MembersMustExist : Member 'System.Numerics.Vector..ctor(System.ReadOnlySpan)' does not exist in the implementation but it does exist in the contract. +MembersMustExist : Member 'System.Numerics.Vector..ctor(System.ReadOnlySpan)' does not exist in the implementation but it does exist in the contract. +MembersMustExist : Member 'System.Numerics.Vector.CopyTo(System.Span)' does not exist in the implementation but it does exist in the contract. +MembersMustExist : Member 'System.Numerics.Vector.CopyTo(System.Span)' does not exist in the implementation but it does exist in the contract. +MembersMustExist : Member 'System.Numerics.Vector.TryCopyTo(System.Span)' does not exist in the implementation but it does exist in the contract. +MembersMustExist : Member 'System.Numerics.Vector.TryCopyTo(System.Span)' does not exist in the implementation but it does exist in the contract. From 1c48331eb5784c58b81309665257f454abd7d322 Mon Sep 17 00:00:00 2001 From: Jose Perez Rodriguez Date: Mon, 6 May 2019 14:46:10 -0700 Subject: [PATCH 241/607] Fix VS Configurations for all projects in corefx (#37477) --- .../StaticTestGenerator.csproj | 8 +- .../CoreFx.Private.TestUtilities.sln | 8 +- .../Microsoft.Bcl.AsyncInterfaces.sln | 12 ++ src/Microsoft.CSharp/Microsoft.CSharp.sln | 14 +-- .../src/Microsoft.CSharp.csproj | 2 +- .../Microsoft.VisualBasic.Core.sln | 32 ++--- src/System.Buffers/System.Buffers.sln | 8 +- src/System.Buffers/ref/System.Buffers.csproj | 4 +- .../System.Data.DataSetExtensions.sln | 22 ++-- .../ref/System.Data.DataSetExtensions.csproj | 2 +- .../src/System.Data.DataSetExtensions.csproj | 3 + .../tests/System.Data.Odbc.Tests.csproj | 4 +- src/System.Data.OleDb/System.Data.Oledb.sln | 8 +- .../src/System.Data.OleDb.csproj | 116 +++++++++--------- .../System.Data.SqlClient.sln | 8 +- .../System.Data.SqlClient.Tests.csproj | 2 +- ....Diagnostics.DiagnosticSource.Tests.csproj | 2 +- ...Diagnostics.TextWriterTraceListener.csproj | 4 +- ...stics.TextWriterTraceListener.Tests.csproj | 2 +- .../src/System.Diagnostics.TraceSource.csproj | 4 +- .../System.Drawing.Common.sln | 8 +- .../src/System.Globalization.Calendars.csproj | 2 +- .../src/System.IO.FileSystem.Watcher.csproj | 4 +- .../src/System.IO.Pipelines.csproj | 2 +- .../src/System.IO.Ports.csproj | 4 +- .../tests/System.IO.Ports.Tests.csproj | 4 +- src/System.IO/System.IO.sln | 14 +-- src/System.Memory/src/System.Memory.csproj | 4 +- .../tests/System.Memory.Tests.csproj | 5 +- .../System.Net.Http.WinHttpHandler.sln | 8 +- ....Net.Http.WinHttpHandler.Unit.Tests.csproj | 4 +- src/System.Net.Http/System.Net.Http.sln | 8 +- .../System.Net.Http.Unit.Tests.csproj | 4 +- .../src/System.Net.NetworkInformation.csproj | 4 +- src/System.Net.Sockets/System.Net.Sockets.sln | 14 +-- .../System.Numerics.Tensors.sln | 56 ++++----- .../ref/System.Numerics.Tensors.csproj | 7 +- .../src/System.Numerics.Tensors.csproj | 7 +- .../System.Numerics.Tensors.Tests.csproj | 7 +- .../tests/System.ObjectModel.Tests.csproj | 6 +- src/System.Private.Uri/System.Private.Uri.sln | 8 +- .../System.Private.Xml.Linq.sln | 8 +- .../System.Xml.Linq.xNodeBuilder.Tests.csproj | 2 +- .../System.Reflection.DispatchProxy.sln | 8 +- .../System.Reflection.DispatchProxy.csproj | 2 +- src/System.Reflection/System.Reflection.sln | 38 +++++- .../System.Resources.Extensions.sln | 56 +++++---- .../ref/System.Resources.Extensions.csproj | 3 + .../src/System.Resources.Extensions.csproj | 5 +- .../System.Resources.Extensions.Tests.csproj | 10 +- .../System.Resources.ResourceManager.sln | 8 +- ...opServices.RuntimeInformation.Tests.csproj | 4 +- .../System.Runtime.Intrinsics.sln | 26 ++-- .../ref/System.Runtime.Intrinsics.csproj | 4 +- .../src/System.Runtime.Intrinsics.csproj | 4 +- .../System.Runtime.Loader.sln | 30 +++++ ...ystem.Runtime.Serialization.Formatters.sln | 16 +-- src/System.Runtime/System.Runtime.sln | 48 +++----- .../tests/System.Runtime.Tests.csproj | 5 +- .../TestCollectibleAssembly.csproj | 3 + .../System.Reflection.TestModule.ilproj | 2 +- .../System.Security.AccessControl.sln | 8 +- .../ref/System.Security.AccessControl.csproj | 2 +- .../System.Security.Permissions.sln | 16 +-- .../ref/System.Security.Permissions.csproj | 2 +- .../src/System.Security.Permissions.csproj | 2 +- .../System.Security.Principal.Windows.sln | 8 +- .../System.Security.Principal.Windows.csproj | 2 +- .../System.Security.Principal.sln | 8 +- .../src/System.Security.Principal.csproj | 4 +- .../System.Text.Encoding.Extensions.csproj | 2 +- .../System.Text.Encodings.Web.sln | 15 ++- .../src/System.Text.Encodings.Web.csproj | 2 +- .../System.Text.Encodings.Web.Tests.csproj | 2 +- src/System.Text.Json/System.Text.Json.sln | 14 +-- .../ref/System.Text.Json.csproj | 2 +- .../System.Threading.Channels.sln | 16 +-- .../src/System.Threading.Channels.csproj | 4 +- .../System.Threading.Tasks.Dataflow.sln | 12 +- ...stem.Threading.Tasks.Dataflow.Tests.csproj | 2 +- .../System.Threading.Tasks.Extensions.sln | 2 +- .../System.Threading.Tasks.Extensions.csproj | 2 +- .../System.Threading.Tasks.Extensions.csproj | 2 +- .../System.Threading.Timer.sln | 8 +- .../System.Utf8String.Experimental.sln | 31 ++--- .../src/System.Utf8String.Experimental.csproj | 4 +- ...ystem.Utf8String.Experimental.Tests.csproj | 4 +- .../src/System.ValueTuple.csproj | 2 +- 88 files changed, 487 insertions(+), 418 deletions(-) diff --git a/src/Common/tests/StaticTestGenerator/StaticTestGenerator.csproj b/src/Common/tests/StaticTestGenerator/StaticTestGenerator.csproj index 879922b032ab..48621710d6d4 100644 --- a/src/Common/tests/StaticTestGenerator/StaticTestGenerator.csproj +++ b/src/Common/tests/StaticTestGenerator/StaticTestGenerator.csproj @@ -1,5 +1,4 @@  - Exe netcoreapp3.0 @@ -9,12 +8,14 @@ true enable + Debug;Release + + + {67648882-2D9D-451A-BAC2-D16DE96895C2} - - @@ -23,5 +24,4 @@ - \ No newline at end of file diff --git a/src/CoreFx.Private.TestUtilities/CoreFx.Private.TestUtilities.sln b/src/CoreFx.Private.TestUtilities/CoreFx.Private.TestUtilities.sln index c17e21dfa171..a769c774bfcb 100644 --- a/src/CoreFx.Private.TestUtilities/CoreFx.Private.TestUtilities.sln +++ b/src/CoreFx.Private.TestUtilities/CoreFx.Private.TestUtilities.sln @@ -34,10 +34,10 @@ Global {EBDB0247-CA43-4226-B7A1-8FEF21061D09}.Debug|Any CPU.Build.0 = netcoreapp-Windows_NT-Debug|Any CPU {EBDB0247-CA43-4226-B7A1-8FEF21061D09}.Release|Any CPU.ActiveCfg = netcoreapp-Windows_NT-Release|Any CPU {EBDB0247-CA43-4226-B7A1-8FEF21061D09}.Release|Any CPU.Build.0 = netcoreapp-Windows_NT-Release|Any CPU - {E2E59C98-998F-9965-991D-99411166AF6F}.Debug|Any CPU.ActiveCfg = netstandard-Debug|Any CPU - {E2E59C98-998F-9965-991D-99411166AF6F}.Debug|Any CPU.Build.0 = netstandard-Debug|Any CPU - {E2E59C98-998F-9965-991D-99411166AF6F}.Release|Any CPU.ActiveCfg = netstandard-Release|Any CPU - {E2E59C98-998F-9965-991D-99411166AF6F}.Release|Any CPU.Build.0 = netstandard-Release|Any CPU + {E2E59C98-998F-9965-991D-99411166AF6F}.Debug|Any CPU.ActiveCfg = netcoreapp-Debug|Any CPU + {E2E59C98-998F-9965-991D-99411166AF6F}.Debug|Any CPU.Build.0 = netcoreapp-Debug|Any CPU + {E2E59C98-998F-9965-991D-99411166AF6F}.Release|Any CPU.ActiveCfg = netcoreapp-Release|Any CPU + {E2E59C98-998F-9965-991D-99411166AF6F}.Release|Any CPU.Build.0 = netcoreapp-Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/src/Microsoft.Bcl.AsyncInterfaces/Microsoft.Bcl.AsyncInterfaces.sln b/src/Microsoft.Bcl.AsyncInterfaces/Microsoft.Bcl.AsyncInterfaces.sln index 7fa9037d6dd7..025b244840d0 100644 --- a/src/Microsoft.Bcl.AsyncInterfaces/Microsoft.Bcl.AsyncInterfaces.sln +++ b/src/Microsoft.Bcl.AsyncInterfaces/Microsoft.Bcl.AsyncInterfaces.sln @@ -2,6 +2,11 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 15 VisualStudioVersion = 15.0.27213.1 MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Bcl.AsyncInterfaces.Tests", "tests\Microsoft.Bcl.AsyncInterfaces.Tests.csproj", "{72E21903-0FBA-444E-9855-3B4F05DFC1F9}" + ProjectSection(ProjectDependencies) = postProject + {96A7CE75-B5E8-421B-BDF0-C4651D97D8CA} = {96A7CE75-B5E8-421B-BDF0-C4651D97D8CA} + EndProjectSection +EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Bcl.AsyncInterfaces", "src\Microsoft.Bcl.AsyncInterfaces.csproj", "{96A7CE75-B5E8-421B-BDF0-C4651D97D8CA}" ProjectSection(ProjectDependencies) = postProject {6371299B-8F39-4A0A-A9CD-70F80FF205F6} = {6371299B-8F39-4A0A-A9CD-70F80FF205F6} @@ -9,6 +14,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Bcl.AsyncInterfac EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Bcl.AsyncInterfaces", "ref\Microsoft.Bcl.AsyncInterfaces.csproj", "{6371299B-8F39-4A0A-A9CD-70F80FF205F6}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{1A2F9F4A-A032-433E-B914-ADD5992BB178}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{E107E9C1-E893-4E87-987E-04EF0DCEAEFD}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{2E666815-2EDB-464B-9DF6-380BF4789AD4}" @@ -19,6 +26,10 @@ Global Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution + {72E21903-0FBA-444E-9855-3B4F05DFC1F9}.Debug|Any CPU.ActiveCfg = netstandard-Debug|Any CPU + {72E21903-0FBA-444E-9855-3B4F05DFC1F9}.Debug|Any CPU.Build.0 = netstandard-Debug|Any CPU + {72E21903-0FBA-444E-9855-3B4F05DFC1F9}.Release|Any CPU.ActiveCfg = netstandard-Release|Any CPU + {72E21903-0FBA-444E-9855-3B4F05DFC1F9}.Release|Any CPU.Build.0 = netstandard-Release|Any CPU {96A7CE75-B5E8-421B-BDF0-C4651D97D8CA}.Debug|Any CPU.ActiveCfg = netstandard-Debug|Any CPU {96A7CE75-B5E8-421B-BDF0-C4651D97D8CA}.Debug|Any CPU.Build.0 = netstandard-Debug|Any CPU {96A7CE75-B5E8-421B-BDF0-C4651D97D8CA}.Release|Any CPU.ActiveCfg = netstandard-Release|Any CPU @@ -32,6 +43,7 @@ Global HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution + {72E21903-0FBA-444E-9855-3B4F05DFC1F9} = {1A2F9F4A-A032-433E-B914-ADD5992BB178} {96A7CE75-B5E8-421B-BDF0-C4651D97D8CA} = {E107E9C1-E893-4E87-987E-04EF0DCEAEFD} {6371299B-8F39-4A0A-A9CD-70F80FF205F6} = {2E666815-2EDB-464B-9DF6-380BF4789AD4} EndGlobalSection diff --git a/src/Microsoft.CSharp/Microsoft.CSharp.sln b/src/Microsoft.CSharp/Microsoft.CSharp.sln index 36a44371920a..8f60525bbf39 100644 --- a/src/Microsoft.CSharp/Microsoft.CSharp.sln +++ b/src/Microsoft.CSharp/Microsoft.CSharp.sln @@ -4,10 +4,10 @@ VisualStudioVersion = 15.0.27213.1 MinimumVisualStudioVersion = 10.0.40219.1 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.CSharp.Tests", "tests\Microsoft.CSharp.Tests.csproj", "{82B54697-0251-47A1-8546-FC507D0F3B08}" ProjectSection(ProjectDependencies) = postProject - {96AA2060-C846-4E56-9509-E8CB9C114C8F} = {96AA2060-C846-4E56-9509-E8CB9C114C8F} + {149D7DFE-2FAC-4A38-89AD-E24CE63AACB8} = {149D7DFE-2FAC-4A38-89AD-E24CE63AACB8} EndProjectSection EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.CSharp", "src\Microsoft.CSharp.csproj", "{96AA2060-C846-4E56-9509-E8CB9C114C8F}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.CSharp", "src\Microsoft.CSharp.csproj", "{149D7DFE-2FAC-4A38-89AD-E24CE63AACB8}" ProjectSection(ProjectDependencies) = postProject {1427906B-FF3D-422A-8278-F2B7E89DE12A} = {1427906B-FF3D-422A-8278-F2B7E89DE12A} EndProjectSection @@ -30,10 +30,10 @@ Global {82B54697-0251-47A1-8546-FC507D0F3B08}.Debug|Any CPU.Build.0 = netcoreapp-Debug|Any CPU {82B54697-0251-47A1-8546-FC507D0F3B08}.Release|Any CPU.ActiveCfg = netcoreapp-Release|Any CPU {82B54697-0251-47A1-8546-FC507D0F3B08}.Release|Any CPU.Build.0 = netcoreapp-Release|Any CPU - {96AA2060-C846-4E56-9509-E8CB9C114C8F}.Debug|Any CPU.ActiveCfg = netstandard-Debug|Any CPU - {96AA2060-C846-4E56-9509-E8CB9C114C8F}.Debug|Any CPU.Build.0 = netstandard-Debug|Any CPU - {96AA2060-C846-4E56-9509-E8CB9C114C8F}.Release|Any CPU.ActiveCfg = netstandard-Release|Any CPU - {96AA2060-C846-4E56-9509-E8CB9C114C8F}.Release|Any CPU.Build.0 = netstandard-Release|Any CPU + {149D7DFE-2FAC-4A38-89AD-E24CE63AACB8}.Debug|Any CPU.ActiveCfg = netstandard-Debug|Any CPU + {149D7DFE-2FAC-4A38-89AD-E24CE63AACB8}.Debug|Any CPU.Build.0 = netstandard-Debug|Any CPU + {149D7DFE-2FAC-4A38-89AD-E24CE63AACB8}.Release|Any CPU.ActiveCfg = netstandard-Release|Any CPU + {149D7DFE-2FAC-4A38-89AD-E24CE63AACB8}.Release|Any CPU.Build.0 = netstandard-Release|Any CPU {1427906B-FF3D-422A-8278-F2B7E89DE12A}.Debug|Any CPU.ActiveCfg = netstandard-Debug|Any CPU {1427906B-FF3D-422A-8278-F2B7E89DE12A}.Debug|Any CPU.Build.0 = netstandard-Debug|Any CPU {1427906B-FF3D-422A-8278-F2B7E89DE12A}.Release|Any CPU.ActiveCfg = netstandard-Release|Any CPU @@ -44,7 +44,7 @@ Global EndGlobalSection GlobalSection(NestedProjects) = preSolution {82B54697-0251-47A1-8546-FC507D0F3B08} = {1A2F9F4A-A032-433E-B914-ADD5992BB178} - {96AA2060-C846-4E56-9509-E8CB9C114C8F} = {E107E9C1-E893-4E87-987E-04EF0DCEAEFD} + {149D7DFE-2FAC-4A38-89AD-E24CE63AACB8} = {E107E9C1-E893-4E87-987E-04EF0DCEAEFD} {1427906B-FF3D-422A-8278-F2B7E89DE12A} = {2E666815-2EDB-464B-9DF6-380BF4789AD4} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution diff --git a/src/Microsoft.CSharp/src/Microsoft.CSharp.csproj b/src/Microsoft.CSharp/src/Microsoft.CSharp.csproj index c6e8a46069df..dc222180434e 100644 --- a/src/Microsoft.CSharp/src/Microsoft.CSharp.csproj +++ b/src/Microsoft.CSharp/src/Microsoft.CSharp.csproj @@ -1,6 +1,6 @@ - {96AA2060-C846-4E56-9509-E8CB9C114C8F} + {149D7DFE-2FAC-4A38-89AD-E24CE63AACB8} Microsoft.CSharp Microsoft.CSharp diff --git a/src/Microsoft.VisualBasic.Core/Microsoft.VisualBasic.Core.sln b/src/Microsoft.VisualBasic.Core/Microsoft.VisualBasic.Core.sln index e9e2ecaf4a54..a10d192f90ad 100644 --- a/src/Microsoft.VisualBasic.Core/Microsoft.VisualBasic.Core.sln +++ b/src/Microsoft.VisualBasic.Core/Microsoft.VisualBasic.Core.sln @@ -1,13 +1,13 @@ Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.28805.205 +# Visual Studio 15 +VisualStudioVersion = 15.0.27213.1 MinimumVisualStudioVersion = 10.0.40219.1 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.VisualBasic.Core.Tests", "tests\Microsoft.VisualBasic.Core.Tests.csproj", "{325260D6-D5DD-4E06-9DA2-9AF2AD9DE8C8}" ProjectSection(ProjectDependencies) = postProject - {A32671B6-5470-4F9C-9CD8-4094B9AB0799} = {A32671B6-5470-4F9C-9CD8-4094B9AB0799} + {a32671b6-5470-4f9c-9cd8-4094b9ab0799} = {a32671b6-5470-4f9c-9cd8-4094b9ab0799} EndProjectSection EndProject -Project("{778DAE3C-4631-46EA-AA77-85C1314464D9}") = "Microsoft.VisualBasic.Core", "src\Microsoft.VisualBasic.Core.vbproj", "{A32671B6-5470-4F9C-9CD8-4094B9AB0799}" +Project("{778DAE3C-4631-46EA-AA77-85C1314464D9}") = "Microsoft.VisualBasic.Core", "src\Microsoft.VisualBasic.Core.vbproj", "{a32671b6-5470-4f9c-9cd8-4094b9ab0799}" ProjectSection(ProjectDependencies) = postProject {82A4357C-0A9F-4970-AAEA-216A73D8A73E} = {82A4357C-0A9F-4970-AAEA-216A73D8A73E} EndProjectSection @@ -24,41 +24,27 @@ Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU - Windows_NT-Debug|Any CPU = Windows_NT-Debug|Any CPU - Windows_NT-Release|Any CPU = Windows_NT-Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {325260D6-D5DD-4E06-9DA2-9AF2AD9DE8C8}.Debug|Any CPU.ActiveCfg = netcoreapp-Debug|Any CPU {325260D6-D5DD-4E06-9DA2-9AF2AD9DE8C8}.Debug|Any CPU.Build.0 = netcoreapp-Debug|Any CPU {325260D6-D5DD-4E06-9DA2-9AF2AD9DE8C8}.Release|Any CPU.ActiveCfg = netcoreapp-Release|Any CPU {325260D6-D5DD-4E06-9DA2-9AF2AD9DE8C8}.Release|Any CPU.Build.0 = netcoreapp-Release|Any CPU - {325260D6-D5DD-4E06-9DA2-9AF2AD9DE8C8}.Windows_NT-Debug|Any CPU.ActiveCfg = netcoreapp-Debug|Any CPU - {325260D6-D5DD-4E06-9DA2-9AF2AD9DE8C8}.Windows_NT-Debug|Any CPU.Build.0 = netcoreapp-Debug|Any CPU - {325260D6-D5DD-4E06-9DA2-9AF2AD9DE8C8}.Windows_NT-Release|Any CPU.ActiveCfg = netcoreapp-Release|Any CPU - {325260D6-D5DD-4E06-9DA2-9AF2AD9DE8C8}.Windows_NT-Release|Any CPU.Build.0 = netcoreapp-Release|Any CPU - {A32671B6-5470-4F9C-9CD8-4094B9AB0799}.Debug|Any CPU.ActiveCfg = netcoreapp-Debug|Any CPU - {A32671B6-5470-4F9C-9CD8-4094B9AB0799}.Debug|Any CPU.Build.0 = netcoreapp-Debug|Any CPU - {A32671B6-5470-4F9C-9CD8-4094B9AB0799}.Release|Any CPU.ActiveCfg = netcoreapp-Release|Any CPU - {A32671B6-5470-4F9C-9CD8-4094B9AB0799}.Release|Any CPU.Build.0 = netcoreapp-Release|Any CPU - {A32671B6-5470-4F9C-9CD8-4094B9AB0799}.Windows_NT-Debug|Any CPU.ActiveCfg = netcoreapp-Windows_NT-Release|Any CPU - {A32671B6-5470-4F9C-9CD8-4094B9AB0799}.Windows_NT-Debug|Any CPU.Build.0 = netcoreapp-Windows_NT-Release|Any CPU - {A32671B6-5470-4F9C-9CD8-4094B9AB0799}.Windows_NT-Release|Any CPU.ActiveCfg = netcoreapp-Windows_NT-Release|Any CPU - {A32671B6-5470-4F9C-9CD8-4094B9AB0799}.Windows_NT-Release|Any CPU.Build.0 = netcoreapp-Windows_NT-Release|Any CPU + {a32671b6-5470-4f9c-9cd8-4094b9ab0799}.Debug|Any CPU.ActiveCfg = netcoreapp-Windows_NT-Debug|Any CPU + {a32671b6-5470-4f9c-9cd8-4094b9ab0799}.Debug|Any CPU.Build.0 = netcoreapp-Windows_NT-Debug|Any CPU + {a32671b6-5470-4f9c-9cd8-4094b9ab0799}.Release|Any CPU.ActiveCfg = netcoreapp-Windows_NT-Release|Any CPU + {a32671b6-5470-4f9c-9cd8-4094b9ab0799}.Release|Any CPU.Build.0 = netcoreapp-Windows_NT-Release|Any CPU {82A4357C-0A9F-4970-AAEA-216A73D8A73E}.Debug|Any CPU.ActiveCfg = netcoreapp-Debug|Any CPU {82A4357C-0A9F-4970-AAEA-216A73D8A73E}.Debug|Any CPU.Build.0 = netcoreapp-Debug|Any CPU {82A4357C-0A9F-4970-AAEA-216A73D8A73E}.Release|Any CPU.ActiveCfg = netcoreapp-Release|Any CPU {82A4357C-0A9F-4970-AAEA-216A73D8A73E}.Release|Any CPU.Build.0 = netcoreapp-Release|Any CPU - {82A4357C-0A9F-4970-AAEA-216A73D8A73E}.Windows_NT-Debug|Any CPU.ActiveCfg = netcoreapp-Debug|Any CPU - {82A4357C-0A9F-4970-AAEA-216A73D8A73E}.Windows_NT-Debug|Any CPU.Build.0 = netcoreapp-Debug|Any CPU - {82A4357C-0A9F-4970-AAEA-216A73D8A73E}.Windows_NT-Release|Any CPU.ActiveCfg = netcoreapp-Release|Any CPU - {82A4357C-0A9F-4970-AAEA-216A73D8A73E}.Windows_NT-Release|Any CPU.Build.0 = netcoreapp-Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution {325260D6-D5DD-4E06-9DA2-9AF2AD9DE8C8} = {1A2F9F4A-A032-433E-B914-ADD5992BB178} - {A32671B6-5470-4F9C-9CD8-4094B9AB0799} = {E107E9C1-E893-4E87-987E-04EF0DCEAEFD} + {a32671b6-5470-4f9c-9cd8-4094b9ab0799} = {E107E9C1-E893-4E87-987E-04EF0DCEAEFD} {82A4357C-0A9F-4970-AAEA-216A73D8A73E} = {2E666815-2EDB-464B-9DF6-380BF4789AD4} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution diff --git a/src/System.Buffers/System.Buffers.sln b/src/System.Buffers/System.Buffers.sln index fc8772d4c735..6c55cd5808d4 100644 --- a/src/System.Buffers/System.Buffers.sln +++ b/src/System.Buffers/System.Buffers.sln @@ -34,10 +34,10 @@ Global {2ADDB484-6F57-4D71-A3FE-A57EC6329A2B}.Debug|Any CPU.Build.0 = netcoreapp-Windows_NT-Debug|Any CPU {2ADDB484-6F57-4D71-A3FE-A57EC6329A2B}.Release|Any CPU.ActiveCfg = netcoreapp-Windows_NT-Release|Any CPU {2ADDB484-6F57-4D71-A3FE-A57EC6329A2B}.Release|Any CPU.Build.0 = netcoreapp-Windows_NT-Release|Any CPU - {11AE73F7-3532-47B9-8FF6-B4F22D76456C}.Debug|Any CPU.ActiveCfg = netstandard-Debug|Any CPU - {11AE73F7-3532-47B9-8FF6-B4F22D76456C}.Debug|Any CPU.Build.0 = netstandard-Debug|Any CPU - {11AE73F7-3532-47B9-8FF6-B4F22D76456C}.Release|Any CPU.ActiveCfg = netstandard-Release|Any CPU - {11AE73F7-3532-47B9-8FF6-B4F22D76456C}.Release|Any CPU.Build.0 = netstandard-Release|Any CPU + {11AE73F7-3532-47B9-8FF6-B4F22D76456C}.Debug|Any CPU.ActiveCfg = netcoreapp-Debug|Any CPU + {11AE73F7-3532-47B9-8FF6-B4F22D76456C}.Debug|Any CPU.Build.0 = netcoreapp-Debug|Any CPU + {11AE73F7-3532-47B9-8FF6-B4F22D76456C}.Release|Any CPU.ActiveCfg = netcoreapp-Release|Any CPU + {11AE73F7-3532-47B9-8FF6-B4F22D76456C}.Release|Any CPU.Build.0 = netcoreapp-Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/src/System.Buffers/ref/System.Buffers.csproj b/src/System.Buffers/ref/System.Buffers.csproj index 745c95b0607e..f4882d8e375e 100644 --- a/src/System.Buffers/ref/System.Buffers.csproj +++ b/src/System.Buffers/ref/System.Buffers.csproj @@ -1,10 +1,10 @@ - 4.0.2.0 {11AE73F7-3532-47B9-8FF6-B4F22D76456C} - netstandard-Debug;netstandard-Release;netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release + netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release;uap-Debug;uap-Release diff --git a/src/System.Data.DataSetExtensions/System.Data.DataSetExtensions.sln b/src/System.Data.DataSetExtensions/System.Data.DataSetExtensions.sln index 9ef5b9a73919..83fa2c7a6e11 100644 --- a/src/System.Data.DataSetExtensions/System.Data.DataSetExtensions.sln +++ b/src/System.Data.DataSetExtensions/System.Data.DataSetExtensions.sln @@ -4,10 +4,10 @@ VisualStudioVersion = 15.0.27213.1 MinimumVisualStudioVersion = 10.0.40219.1 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Data.DataSetExtensions.Tests", "tests\System.Data.DataSetExtensions.Tests.csproj", "{2B38992F-9979-485F-B104-38C476D0B706}" ProjectSection(ProjectDependencies) = postProject - {C7CB4B69-2A11-4A20-A21E-5C954855AE5A} = {C7CB4B69-2A11-4A20-A21E-5C954855AE5A} + {50D18478-BE75-4F54-8080-A5C3047D776B} = {50D18478-BE75-4F54-8080-A5C3047D776B} EndProjectSection EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Data.DataSetExtensions", "src\System.Data.DataSetExtensions.csproj", "{C7CB4B69-2A11-4A20-A21E-5C954855AE5A}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Data.DataSetExtensions", "src\System.Data.DataSetExtensions.csproj", "{50D18478-BE75-4F54-8080-A5C3047D776B}" ProjectSection(ProjectDependencies) = postProject {50A5A8BC-C6A9-4000-8B52-667BEE00459D} = {50A5A8BC-C6A9-4000-8B52-667BEE00459D} EndProjectSection @@ -30,21 +30,21 @@ Global {2B38992F-9979-485F-B104-38C476D0B706}.Debug|Any CPU.Build.0 = netstandard-Debug|Any CPU {2B38992F-9979-485F-B104-38C476D0B706}.Release|Any CPU.ActiveCfg = netstandard-Release|Any CPU {2B38992F-9979-485F-B104-38C476D0B706}.Release|Any CPU.Build.0 = netstandard-Release|Any CPU - {C7CB4B69-2A11-4A20-A21E-5C954855AE5A}.Debug|Any CPU.ActiveCfg = netstandard-Debug|Any CPU - {C7CB4B69-2A11-4A20-A21E-5C954855AE5A}.Debug|Any CPU.Build.0 = netstandard-Debug|Any CPU - {C7CB4B69-2A11-4A20-A21E-5C954855AE5A}.Release|Any CPU.ActiveCfg = netstandard-Release|Any CPU - {C7CB4B69-2A11-4A20-A21E-5C954855AE5A}.Release|Any CPU.Build.0 = netstandard-Release|Any CPU - {50A5A8BC-C6A9-4000-8B52-667BEE00459D}.Debug|Any CPU.ActiveCfg = netstandard-Debug|Any CPU - {50A5A8BC-C6A9-4000-8B52-667BEE00459D}.Debug|Any CPU.Build.0 = netstandard-Debug|Any CPU - {50A5A8BC-C6A9-4000-8B52-667BEE00459D}.Release|Any CPU.ActiveCfg = netstandard-Release|Any CPU - {50A5A8BC-C6A9-4000-8B52-667BEE00459D}.Release|Any CPU.Build.0 = netstandard-Release|Any CPU + {50D18478-BE75-4F54-8080-A5C3047D776B}.Debug|Any CPU.ActiveCfg = netcoreapp-Debug|Any CPU + {50D18478-BE75-4F54-8080-A5C3047D776B}.Debug|Any CPU.Build.0 = netcoreapp-Debug|Any CPU + {50D18478-BE75-4F54-8080-A5C3047D776B}.Release|Any CPU.ActiveCfg = netcoreapp-Release|Any CPU + {50D18478-BE75-4F54-8080-A5C3047D776B}.Release|Any CPU.Build.0 = netcoreapp-Release|Any CPU + {50A5A8BC-C6A9-4000-8B52-667BEE00459D}.Debug|Any CPU.ActiveCfg = netcoreapp-Debug|Any CPU + {50A5A8BC-C6A9-4000-8B52-667BEE00459D}.Debug|Any CPU.Build.0 = netcoreapp-Debug|Any CPU + {50A5A8BC-C6A9-4000-8B52-667BEE00459D}.Release|Any CPU.ActiveCfg = netcoreapp-Release|Any CPU + {50A5A8BC-C6A9-4000-8B52-667BEE00459D}.Release|Any CPU.Build.0 = netcoreapp-Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution {2B38992F-9979-485F-B104-38C476D0B706} = {1A2F9F4A-A032-433E-B914-ADD5992BB178} - {C7CB4B69-2A11-4A20-A21E-5C954855AE5A} = {E107E9C1-E893-4E87-987E-04EF0DCEAEFD} + {50D18478-BE75-4F54-8080-A5C3047D776B} = {E107E9C1-E893-4E87-987E-04EF0DCEAEFD} {50A5A8BC-C6A9-4000-8B52-667BEE00459D} = {2E666815-2EDB-464B-9DF6-380BF4789AD4} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution diff --git a/src/System.Data.DataSetExtensions/ref/System.Data.DataSetExtensions.csproj b/src/System.Data.DataSetExtensions/ref/System.Data.DataSetExtensions.csproj index e51da496c853..e5730fd83694 100644 --- a/src/System.Data.DataSetExtensions/ref/System.Data.DataSetExtensions.csproj +++ b/src/System.Data.DataSetExtensions/ref/System.Data.DataSetExtensions.csproj @@ -1,7 +1,7 @@ {50A5A8BC-C6A9-4000-8B52-667BEE00459D} - netstandard-Debug;netstandard-Release;netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release + netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release;uap-Debug;uap-Release true diff --git a/src/System.Data.DataSetExtensions/src/System.Data.DataSetExtensions.csproj b/src/System.Data.DataSetExtensions/src/System.Data.DataSetExtensions.csproj index d83b2edd2d7c..0e9902b2a439 100644 --- a/src/System.Data.DataSetExtensions/src/System.Data.DataSetExtensions.csproj +++ b/src/System.Data.DataSetExtensions/src/System.Data.DataSetExtensions.csproj @@ -4,6 +4,9 @@ netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release true + + {50D18478-BE75-4F54-8080-A5C3047D776B} + diff --git a/src/System.Data.Odbc/tests/System.Data.Odbc.Tests.csproj b/src/System.Data.Odbc/tests/System.Data.Odbc.Tests.csproj index f3cc82e709c3..327e9cbd0716 100644 --- a/src/System.Data.Odbc/tests/System.Data.Odbc.Tests.csproj +++ b/src/System.Data.Odbc/tests/System.Data.Odbc.Tests.csproj @@ -2,7 +2,7 @@ {F3E72F35-0351-4D67-2209-725BCAD807BA} $(DefineConstants);TargetsWindows - netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netfx-Windows_NT-Debug;netfx-Windows_NT-Release + netcoreapp-FreeBSD-Debug;netcoreapp-FreeBSD-Release;netcoreapp-Linux-Debug;netcoreapp-Linux-Release;netcoreapp-OSX-Debug;netcoreapp-OSX-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netfx-Windows_NT-Debug;netfx-Windows_NT-Release @@ -48,4 +48,4 @@ - + \ No newline at end of file diff --git a/src/System.Data.OleDb/System.Data.Oledb.sln b/src/System.Data.OleDb/System.Data.Oledb.sln index c1726e5de9a2..b62e0670442c 100644 --- a/src/System.Data.OleDb/System.Data.Oledb.sln +++ b/src/System.Data.OleDb/System.Data.Oledb.sln @@ -30,10 +30,10 @@ Global {73C7A14F-C3C5-44EA-AB02-05BFBA55722C}.Debug|Any CPU.Build.0 = netcoreapp-Windows_NT-Debug|Any CPU {73C7A14F-C3C5-44EA-AB02-05BFBA55722C}.Release|Any CPU.ActiveCfg = netcoreapp-Windows_NT-Release|Any CPU {73C7A14F-C3C5-44EA-AB02-05BFBA55722C}.Release|Any CPU.Build.0 = netcoreapp-Windows_NT-Release|Any CPU - {D909B69D-8F3B-4551-A355-8FFF6A308CF6}.Debug|Any CPU.ActiveCfg = netcoreapp-Windows_NT-Debug|Any CPU - {D909B69D-8F3B-4551-A355-8FFF6A308CF6}.Debug|Any CPU.Build.0 = netcoreapp-Windows_NT-Debug|Any CPU - {D909B69D-8F3B-4551-A355-8FFF6A308CF6}.Release|Any CPU.ActiveCfg = netcoreapp-Windows_NT-Release|Any CPU - {D909B69D-8F3B-4551-A355-8FFF6A308CF6}.Release|Any CPU.Build.0 = netcoreapp-Windows_NT-Release|Any CPU + {D909B69D-8F3B-4551-A355-8FFF6A308CF6}.Debug|Any CPU.ActiveCfg = netstandard-Windows_NT-Debug|Any CPU + {D909B69D-8F3B-4551-A355-8FFF6A308CF6}.Debug|Any CPU.Build.0 = netstandard-Windows_NT-Debug|Any CPU + {D909B69D-8F3B-4551-A355-8FFF6A308CF6}.Release|Any CPU.ActiveCfg = netstandard-Windows_NT-Release|Any CPU + {D909B69D-8F3B-4551-A355-8FFF6A308CF6}.Release|Any CPU.Build.0 = netstandard-Windows_NT-Release|Any CPU {EF4F0844-7AAD-4B0C-A29C-37E1F92D2D78}.Debug|Any CPU.ActiveCfg = netstandard-Debug|Any CPU {EF4F0844-7AAD-4B0C-A29C-37E1F92D2D78}.Debug|Any CPU.Build.0 = netstandard-Debug|Any CPU {EF4F0844-7AAD-4B0C-A29C-37E1F92D2D78}.Release|Any CPU.ActiveCfg = netstandard-Release|Any CPU diff --git a/src/System.Data.OleDb/src/System.Data.OleDb.csproj b/src/System.Data.OleDb/src/System.Data.OleDb.csproj index e426aa553c41..b2babda06b8e 100644 --- a/src/System.Data.OleDb/src/System.Data.OleDb.csproj +++ b/src/System.Data.OleDb/src/System.Data.OleDb.csproj @@ -8,9 +8,9 @@ $(DefineConstants); true SR.PlatformNotSupported_OleDb - net461-Windows_NT-Debug;net461-Windows_NT-Release;netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netfx-Windows_NT-Debug;netfx-Windows_NT-Release;netstandard-Debug;netstandard-Release;netstandard-Unix-Debug;netstandard-Unix-Release;netstandard-Windows_NT-Debug;netstandard-Windows_NT-Release + net461-Windows_NT-Debug;net461-Windows_NT-Release;netfx-Windows_NT-Debug;netfx-Windows_NT-Release;netstandard-Debug;netstandard-Release;netstandard-Windows_NT-Debug;netstandard-Windows_NT-Release true - false + false @@ -19,64 +19,64 @@ Common\System\Data\Common\MultipartIdentifier.cs - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + @@ -111,4 +111,4 @@ - + \ No newline at end of file diff --git a/src/System.Data.SqlClient/System.Data.SqlClient.sln b/src/System.Data.SqlClient/System.Data.SqlClient.sln index 5c631f1ec633..f925debaf6d9 100644 --- a/src/System.Data.SqlClient/System.Data.SqlClient.sln +++ b/src/System.Data.SqlClient/System.Data.SqlClient.sln @@ -86,10 +86,10 @@ Global Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {F3E72F35-0351-4D67-9388-725BCAD807BA}.Debug|Any CPU.ActiveCfg = netstandard-Windows_NT-Debug|Any CPU - {F3E72F35-0351-4D67-9388-725BCAD807BA}.Debug|Any CPU.Build.0 = netstandard-Windows_NT-Debug|Any CPU - {F3E72F35-0351-4D67-9388-725BCAD807BA}.Release|Any CPU.ActiveCfg = netstandard-Windows_NT-Release|Any CPU - {F3E72F35-0351-4D67-9388-725BCAD807BA}.Release|Any CPU.Build.0 = netstandard-Windows_NT-Release|Any CPU + {F3E72F35-0351-4D67-9388-725BCAD807BA}.Debug|Any CPU.ActiveCfg = netcoreapp-Windows_NT-Debug|Any CPU + {F3E72F35-0351-4D67-9388-725BCAD807BA}.Debug|Any CPU.Build.0 = netcoreapp-Windows_NT-Debug|Any CPU + {F3E72F35-0351-4D67-9388-725BCAD807BA}.Release|Any CPU.ActiveCfg = netcoreapp-Windows_NT-Release|Any CPU + {F3E72F35-0351-4D67-9388-725BCAD807BA}.Release|Any CPU.Build.0 = netcoreapp-Windows_NT-Release|Any CPU {D1392B54-998A-4F27-BC17-4CE149117BCC}.Debug|Any CPU.ActiveCfg = netstandard-Debug|Any CPU {D1392B54-998A-4F27-BC17-4CE149117BCC}.Debug|Any CPU.Build.0 = netstandard-Debug|Any CPU {D1392B54-998A-4F27-BC17-4CE149117BCC}.Release|Any CPU.ActiveCfg = netstandard-Release|Any CPU diff --git a/src/System.Data.SqlClient/tests/FunctionalTests/System.Data.SqlClient.Tests.csproj b/src/System.Data.SqlClient/tests/FunctionalTests/System.Data.SqlClient.Tests.csproj index 27f764096700..1b7013dbcb06 100644 --- a/src/System.Data.SqlClient/tests/FunctionalTests/System.Data.SqlClient.Tests.csproj +++ b/src/System.Data.SqlClient/tests/FunctionalTests/System.Data.SqlClient.Tests.csproj @@ -2,7 +2,7 @@ {F3E72F35-0351-4D67-9388-725BCAD807BA} true - netstandard-Unix-Debug;netstandard-Unix-Release;netstandard-Windows_NT-Debug;netstandard-Windows_NT-Release + netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netstandard-Unix-Debug;netstandard-Unix-Release;netstandard-Windows_NT-Debug;netstandard-Windows_NT-Release diff --git a/src/System.Diagnostics.DiagnosticSource/tests/System.Diagnostics.DiagnosticSource.Tests.csproj b/src/System.Diagnostics.DiagnosticSource/tests/System.Diagnostics.DiagnosticSource.Tests.csproj index 132284dac0d9..48ed19db3d22 100644 --- a/src/System.Diagnostics.DiagnosticSource/tests/System.Diagnostics.DiagnosticSource.Tests.csproj +++ b/src/System.Diagnostics.DiagnosticSource/tests/System.Diagnostics.DiagnosticSource.Tests.csproj @@ -2,7 +2,7 @@ {A7922FA3-306A-41B9-B8DC-CC4DBE685A85} true - netfx-Windows_NT-Debug;netfx-Windows_NT-Release;netstandard-Debug;netstandard-Release;netstandard1.1-Debug;netstandard1.1-Release;netstandard1.3-Debug;netstandard1.3-Release;netstandard1.5-Debug;netstandard1.5-Release + netfx-Windows_NT-Debug;netfx-Windows_NT-Release;netstandard-Debug;netstandard-Release diff --git a/src/System.Diagnostics.TextWriterTraceListener/src/System.Diagnostics.TextWriterTraceListener.csproj b/src/System.Diagnostics.TextWriterTraceListener/src/System.Diagnostics.TextWriterTraceListener.csproj index 3fca8108a70c..29facb015cea 100644 --- a/src/System.Diagnostics.TextWriterTraceListener/src/System.Diagnostics.TextWriterTraceListener.csproj +++ b/src/System.Diagnostics.TextWriterTraceListener/src/System.Diagnostics.TextWriterTraceListener.csproj @@ -3,7 +3,7 @@ System.Diagnostics.TextWriterTraceListener System.Diagnostics.TextWriterTraceListener {315929D9-D76E-47E9-BE82-C787FB3A7876} - netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netcoreapp-Unix-Debug;netcoreapp-Unix-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release + netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release @@ -55,4 +55,4 @@ - + \ No newline at end of file diff --git a/src/System.Diagnostics.TextWriterTraceListener/tests/System.Diagnostics.TextWriterTraceListener.Tests.csproj b/src/System.Diagnostics.TextWriterTraceListener/tests/System.Diagnostics.TextWriterTraceListener.Tests.csproj index 56522385b1fb..05f802c6645c 100644 --- a/src/System.Diagnostics.TextWriterTraceListener/tests/System.Diagnostics.TextWriterTraceListener.Tests.csproj +++ b/src/System.Diagnostics.TextWriterTraceListener/tests/System.Diagnostics.TextWriterTraceListener.Tests.csproj @@ -2,7 +2,7 @@ {92A9467A-9F7E-4294-A7D5-7B59F2E54ABE} true - netstandard-Debug;netstandard-Release;netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release + netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release;netstandard-Debug;netstandard-Release diff --git a/src/System.Diagnostics.TraceSource/src/System.Diagnostics.TraceSource.csproj b/src/System.Diagnostics.TraceSource/src/System.Diagnostics.TraceSource.csproj index 8c0cfb591e0a..0738efa622f2 100644 --- a/src/System.Diagnostics.TraceSource/src/System.Diagnostics.TraceSource.csproj +++ b/src/System.Diagnostics.TraceSource/src/System.Diagnostics.TraceSource.csproj @@ -4,7 +4,7 @@ System.Diagnostics.TraceSource $(DefineConstants);TRACE {5380420C-EB1D-4C53-9CFC-916578C18334} - netcoreapp-FreeBSD-Debug;netcoreapp-FreeBSD-Release;netcoreapp-Linux-Debug;netcoreapp-Linux-Release;netcoreapp-OSX-Debug;netcoreapp-OSX-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release + netcoreapp-FreeBSD-Debug;netcoreapp-FreeBSD-Release;netcoreapp-Linux-Debug;netcoreapp-Linux-Release;netcoreapp-OSX-Debug;netcoreapp-OSX-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release;uapaot-Windows_NT-Debug;uapaot-Windows_NT-Release @@ -76,4 +76,4 @@ - + \ No newline at end of file diff --git a/src/System.Drawing.Common/System.Drawing.Common.sln b/src/System.Drawing.Common/System.Drawing.Common.sln index 9688c0d8793b..cbbbebddba26 100644 --- a/src/System.Drawing.Common/System.Drawing.Common.sln +++ b/src/System.Drawing.Common/System.Drawing.Common.sln @@ -34,10 +34,10 @@ Global {191B3618-FECD-4ABD-9D6B-5AC90DC33621}.Debug|Any CPU.Build.0 = netcoreapp-Windows_NT-Debug|Any CPU {191B3618-FECD-4ABD-9D6B-5AC90DC33621}.Release|Any CPU.ActiveCfg = netcoreapp-Windows_NT-Release|Any CPU {191B3618-FECD-4ABD-9D6B-5AC90DC33621}.Release|Any CPU.Build.0 = netcoreapp-Windows_NT-Release|Any CPU - {D7AEA698-275D-441F-B7A7-8491D1F0EFF0}.Debug|Any CPU.ActiveCfg = netstandard-Debug|Any CPU - {D7AEA698-275D-441F-B7A7-8491D1F0EFF0}.Debug|Any CPU.Build.0 = netstandard-Debug|Any CPU - {D7AEA698-275D-441F-B7A7-8491D1F0EFF0}.Release|Any CPU.ActiveCfg = netstandard-Release|Any CPU - {D7AEA698-275D-441F-B7A7-8491D1F0EFF0}.Release|Any CPU.Build.0 = netstandard-Release|Any CPU + {D7AEA698-275D-441F-B7A7-8491D1F0EFF0}.Debug|Any CPU.ActiveCfg = netcoreapp-Debug|Any CPU + {D7AEA698-275D-441F-B7A7-8491D1F0EFF0}.Debug|Any CPU.Build.0 = netcoreapp-Debug|Any CPU + {D7AEA698-275D-441F-B7A7-8491D1F0EFF0}.Release|Any CPU.ActiveCfg = netcoreapp-Release|Any CPU + {D7AEA698-275D-441F-B7A7-8491D1F0EFF0}.Release|Any CPU.Build.0 = netcoreapp-Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/src/System.Globalization.Calendars/src/System.Globalization.Calendars.csproj b/src/System.Globalization.Calendars/src/System.Globalization.Calendars.csproj index 639be35ead58..caf7455089e6 100644 --- a/src/System.Globalization.Calendars/src/System.Globalization.Calendars.csproj +++ b/src/System.Globalization.Calendars/src/System.Globalization.Calendars.csproj @@ -3,7 +3,7 @@ System.Globalization.Calendars true {7126BEDB-0903-454A-8A2B-8BE1CBDF8F2E} - netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release + netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release;uapaot-Windows_NT-Debug;uapaot-Windows_NT-Release diff --git a/src/System.IO.FileSystem.Watcher/src/System.IO.FileSystem.Watcher.csproj b/src/System.IO.FileSystem.Watcher/src/System.IO.FileSystem.Watcher.csproj index d2c712f90f05..8baa7191fc6c 100644 --- a/src/System.IO.FileSystem.Watcher/src/System.IO.FileSystem.Watcher.csproj +++ b/src/System.IO.FileSystem.Watcher/src/System.IO.FileSystem.Watcher.csproj @@ -2,7 +2,7 @@ {77E702D9-C6D8-4CE4-9941-D3056C3CCBED} true - netcoreapp-Linux-Debug;netcoreapp-Linux-Release;netcoreapp-OSX-Debug;netcoreapp-OSX-Release;netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release + netcoreapp-FreeBSD-Debug;netcoreapp-FreeBSD-Release;netcoreapp-Linux-Debug;netcoreapp-Linux-Release;netcoreapp-OSX-Debug;netcoreapp-OSX-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release @@ -162,4 +162,4 @@ - + \ No newline at end of file diff --git a/src/System.IO.Pipelines/src/System.IO.Pipelines.csproj b/src/System.IO.Pipelines/src/System.IO.Pipelines.csproj index 694f02f1d606..c537773c3d29 100644 --- a/src/System.IO.Pipelines/src/System.IO.Pipelines.csproj +++ b/src/System.IO.Pipelines/src/System.IO.Pipelines.csproj @@ -1,7 +1,7 @@  {1032D5F6-5AE7-4002-A0E4-FEBEADFEA977} - netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release + netcoreapp-Debug;netcoreapp-Debug;netcoreapp-Release;netcoreapp-Release;netstandard-Debug;netstandard-Release diff --git a/src/System.IO.Ports/src/System.IO.Ports.csproj b/src/System.IO.Ports/src/System.IO.Ports.csproj index aaed009912fd..1969532939ce 100644 --- a/src/System.IO.Ports/src/System.IO.Ports.csproj +++ b/src/System.IO.Ports/src/System.IO.Ports.csproj @@ -6,7 +6,7 @@ SR.PlatformNotSupported_IOPorts $(DefineConstants);NOSPAN true - net461-Windows_NT-Debug;net461-Windows_NT-Release;netfx-Windows_NT-Debug;netfx-Windows_NT-Release;netstandard-Debug;netstandard-Release;netstandard-Windows_NT-Debug;netstandard-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release;netstandard-Linux-Debug;netstandard-Linux-Release + net461-Windows_NT-Debug;net461-Windows_NT-Release;netfx-Windows_NT-Debug;netfx-Windows_NT-Release;netstandard-Debug;netstandard-Linux-Debug;netstandard-Linux-Release;netstandard-OSX-Debug;netstandard-OSX-Release;netstandard-Release;netstandard-Windows_NT-Debug;netstandard-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release @@ -229,4 +229,4 @@ - + \ No newline at end of file diff --git a/src/System.IO.Ports/tests/System.IO.Ports.Tests.csproj b/src/System.IO.Ports/tests/System.IO.Ports.Tests.csproj index f34a3b47db6d..d724f5c7b451 100644 --- a/src/System.IO.Ports/tests/System.IO.Ports.Tests.csproj +++ b/src/System.IO.Ports/tests/System.IO.Ports.Tests.csproj @@ -1,7 +1,7 @@ {4259DCE9-3480-40BB-B08A-64A2D446264B} - netfx-Debug;netfx-Release;netstandard-Windows_NT-Debug;netstandard-Windows_NT-Release;netstandard-Linux-Debug;netstandard-Linux-Release;netstandard-OSX-Debug;netstandard-OSX-Release + netfx-Debug;netfx-Release;netstandard-Linux-Debug;netstandard-Linux-Release;netstandard-OSX-Debug;netstandard-OSX-Release;netstandard-Windows_NT-Debug;netstandard-Windows_NT-Release @@ -118,4 +118,4 @@ - + \ No newline at end of file diff --git a/src/System.IO/System.IO.sln b/src/System.IO/System.IO.sln index f851f2b25187..9fcc875d9d43 100644 --- a/src/System.IO/System.IO.sln +++ b/src/System.IO/System.IO.sln @@ -4,10 +4,10 @@ VisualStudioVersion = 15.0.27213.1 MinimumVisualStudioVersion = 10.0.40219.1 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.IO.Tests", "tests\System.IO.Tests.csproj", "{492EC54D-D2C4-4B3F-AC1F-646B3F7EBB02}" ProjectSection(ProjectDependencies) = postProject - {07390899-C8F6-4E83-A3A9-6867B8CB46A0} = {07390899-C8F6-4E83-A3A9-6867B8CB46A0} + {07390899-C8F6-4e83-A3A9-6867B8CB46A0} = {07390899-C8F6-4e83-A3A9-6867B8CB46A0} EndProjectSection EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.IO", "src\System.IO.csproj", "{07390899-C8F6-4E83-A3A9-6867B8CB46A0}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.IO", "src\System.IO.csproj", "{07390899-C8F6-4e83-A3A9-6867B8CB46A0}" ProjectSection(ProjectDependencies) = postProject {88883C57-83BE-4E93-A363-4CFC716F248F} = {88883C57-83BE-4E93-A363-4CFC716F248F} EndProjectSection @@ -30,10 +30,10 @@ Global {492EC54D-D2C4-4B3F-AC1F-646B3F7EBB02}.Debug|Any CPU.Build.0 = netcoreapp-Debug|Any CPU {492EC54D-D2C4-4B3F-AC1F-646B3F7EBB02}.Release|Any CPU.ActiveCfg = netcoreapp-Release|Any CPU {492EC54D-D2C4-4B3F-AC1F-646B3F7EBB02}.Release|Any CPU.Build.0 = netcoreapp-Release|Any CPU - {07390899-C8F6-4E83-A3A9-6867B8CB46A0}.Debug|Any CPU.ActiveCfg = uapaot-Windows_NT-Debug|Any CPU - {07390899-C8F6-4E83-A3A9-6867B8CB46A0}.Debug|Any CPU.Build.0 = uapaot-Windows_NT-Debug|Any CPU - {07390899-C8F6-4E83-A3A9-6867B8CB46A0}.Release|Any CPU.ActiveCfg = uap-Windows_NT-Release|Any CPU - {07390899-C8F6-4E83-A3A9-6867B8CB46A0}.Release|Any CPU.Build.0 = uap-Windows_NT-Release|Any CPU + {07390899-C8F6-4e83-A3A9-6867B8CB46A0}.Debug|Any CPU.ActiveCfg = netcoreapp-Debug|Any CPU + {07390899-C8F6-4e83-A3A9-6867B8CB46A0}.Debug|Any CPU.Build.0 = netcoreapp-Debug|Any CPU + {07390899-C8F6-4e83-A3A9-6867B8CB46A0}.Release|Any CPU.ActiveCfg = netcoreapp-Release|Any CPU + {07390899-C8F6-4e83-A3A9-6867B8CB46A0}.Release|Any CPU.Build.0 = netcoreapp-Release|Any CPU {88883C57-83BE-4E93-A363-4CFC716F248F}.Debug|Any CPU.ActiveCfg = netcoreapp-Debug|Any CPU {88883C57-83BE-4E93-A363-4CFC716F248F}.Debug|Any CPU.Build.0 = netcoreapp-Debug|Any CPU {88883C57-83BE-4E93-A363-4CFC716F248F}.Release|Any CPU.ActiveCfg = netcoreapp-Release|Any CPU @@ -44,7 +44,7 @@ Global EndGlobalSection GlobalSection(NestedProjects) = preSolution {492EC54D-D2C4-4B3F-AC1F-646B3F7EBB02} = {1A2F9F4A-A032-433E-B914-ADD5992BB178} - {07390899-C8F6-4E83-A3A9-6867B8CB46A0} = {E107E9C1-E893-4E87-987E-04EF0DCEAEFD} + {07390899-C8F6-4e83-A3A9-6867B8CB46A0} = {E107E9C1-E893-4E87-987E-04EF0DCEAEFD} {88883C57-83BE-4E93-A363-4CFC716F248F} = {2E666815-2EDB-464B-9DF6-380BF4789AD4} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution diff --git a/src/System.Memory/src/System.Memory.csproj b/src/System.Memory/src/System.Memory.csproj index 7212bb1457c8..f96c558a325d 100644 --- a/src/System.Memory/src/System.Memory.csproj +++ b/src/System.Memory/src/System.Memory.csproj @@ -3,7 +3,7 @@ {4BBC8F69-D03E-4432-AA8A-D458FA5B235A} true true - netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release + netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release;uapaot-Windows_NT-Debug;uapaot-Windows_NT-Release $(DefineConstants);MAKE_ABW_PUBLIC @@ -42,4 +42,4 @@ - + \ No newline at end of file diff --git a/src/System.Memory/tests/System.Memory.Tests.csproj b/src/System.Memory/tests/System.Memory.Tests.csproj index 67f112faba28..74eeb412c021 100644 --- a/src/System.Memory/tests/System.Memory.Tests.csproj +++ b/src/System.Memory/tests/System.Memory.Tests.csproj @@ -5,7 +5,7 @@ true true true - netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release;uap-Debug;uap-Release + netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release @@ -253,7 +253,6 @@ - @@ -275,4 +274,4 @@ - + \ No newline at end of file diff --git a/src/System.Net.Http.WinHttpHandler/System.Net.Http.WinHttpHandler.sln b/src/System.Net.Http.WinHttpHandler/System.Net.Http.WinHttpHandler.sln index e6d5e8341c3e..f6facd100629 100644 --- a/src/System.Net.Http.WinHttpHandler/System.Net.Http.WinHttpHandler.sln +++ b/src/System.Net.Http.WinHttpHandler/System.Net.Http.WinHttpHandler.sln @@ -35,10 +35,10 @@ Global {17D5CC82-F72C-4DD2-B6DB-DE7FB2F19C34}.Debug|Any CPU.Build.0 = netstandard-Windows_NT-Debug|Any CPU {17D5CC82-F72C-4DD2-B6DB-DE7FB2F19C34}.Release|Any CPU.ActiveCfg = netstandard-Windows_NT-Release|Any CPU {17D5CC82-F72C-4DD2-B6DB-DE7FB2F19C34}.Release|Any CPU.Build.0 = netstandard-Windows_NT-Release|Any CPU - {A2ECDEDB-12B7-402C-9230-152B7601179F}.Debug|Any CPU.ActiveCfg = netstandard-Windows_NT-Debug|Any CPU - {A2ECDEDB-12B7-402C-9230-152B7601179F}.Debug|Any CPU.Build.0 = netstandard-Windows_NT-Debug|Any CPU - {A2ECDEDB-12B7-402C-9230-152B7601179F}.Release|Any CPU.ActiveCfg = netstandard-Windows_NT-Release|Any CPU - {A2ECDEDB-12B7-402C-9230-152B7601179F}.Release|Any CPU.Build.0 = netstandard-Windows_NT-Release|Any CPU + {A2ECDEDB-12B7-402C-9230-152B7601179F}.Debug|Any CPU.ActiveCfg = netcoreapp-Windows_NT-Debug|Any CPU + {A2ECDEDB-12B7-402C-9230-152B7601179F}.Debug|Any CPU.Build.0 = netcoreapp-Windows_NT-Debug|Any CPU + {A2ECDEDB-12B7-402C-9230-152B7601179F}.Release|Any CPU.ActiveCfg = netcoreapp-Windows_NT-Release|Any CPU + {A2ECDEDB-12B7-402C-9230-152B7601179F}.Release|Any CPU.Build.0 = netcoreapp-Windows_NT-Release|Any CPU {F75E3008-0562-42DF-BE72-C1384F12157E}.Debug|Any CPU.ActiveCfg = netstandard-Windows_NT-Debug|Any CPU {F75E3008-0562-42DF-BE72-C1384F12157E}.Debug|Any CPU.Build.0 = netstandard-Windows_NT-Debug|Any CPU {F75E3008-0562-42DF-BE72-C1384F12157E}.Release|Any CPU.ActiveCfg = netstandard-Windows_NT-Release|Any CPU diff --git a/src/System.Net.Http.WinHttpHandler/tests/UnitTests/System.Net.Http.WinHttpHandler.Unit.Tests.csproj b/src/System.Net.Http.WinHttpHandler/tests/UnitTests/System.Net.Http.WinHttpHandler.Unit.Tests.csproj index 235085afa6e3..dd901d115fb8 100644 --- a/src/System.Net.Http.WinHttpHandler/tests/UnitTests/System.Net.Http.WinHttpHandler.Unit.Tests.csproj +++ b/src/System.Net.Http.WinHttpHandler/tests/UnitTests/System.Net.Http.WinHttpHandler.Unit.Tests.csproj @@ -4,7 +4,7 @@ $(NoWarn);0436 true ../../src/Resources/Strings.resx - netstandard-Windows_NT-Debug;netstandard-Windows_NT-Release + netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release @@ -149,4 +149,4 @@ - + \ No newline at end of file diff --git a/src/System.Net.Http/System.Net.Http.sln b/src/System.Net.Http/System.Net.Http.sln index de0dfb353f51..aca8883d827c 100644 --- a/src/System.Net.Http/System.Net.Http.sln +++ b/src/System.Net.Http/System.Net.Http.sln @@ -35,10 +35,10 @@ Global {C85CF035-7804-41FF-9557-48B7C948B58D}.Debug|Any CPU.Build.0 = netcoreapp-Windows_NT-Debug|Any CPU {C85CF035-7804-41FF-9557-48B7C948B58D}.Release|Any CPU.ActiveCfg = netcoreapp-Windows_NT-Release|Any CPU {C85CF035-7804-41FF-9557-48B7C948B58D}.Release|Any CPU.Build.0 = netcoreapp-Windows_NT-Release|Any CPU - {5F9C3C9F-652E-461E-B2D6-85D264F5A733}.Debug|Any CPU.ActiveCfg = netcoreapp-Debug|Any CPU - {5F9C3C9F-652E-461E-B2D6-85D264F5A733}.Debug|Any CPU.Build.0 = netcoreapp-Debug|Any CPU - {5F9C3C9F-652E-461E-B2D6-85D264F5A733}.Release|Any CPU.ActiveCfg = netcoreapp-Release|Any CPU - {5F9C3C9F-652E-461E-B2D6-85D264F5A733}.Release|Any CPU.Build.0 = netcoreapp-Release|Any CPU + {5F9C3C9F-652E-461E-B2D6-85D264F5A733}.Debug|Any CPU.ActiveCfg = netcoreapp-Windows_NT-Debug|Any CPU + {5F9C3C9F-652E-461E-B2D6-85D264F5A733}.Debug|Any CPU.Build.0 = netcoreapp-Windows_NT-Debug|Any CPU + {5F9C3C9F-652E-461E-B2D6-85D264F5A733}.Release|Any CPU.ActiveCfg = netcoreapp-Windows_NT-Release|Any CPU + {5F9C3C9F-652E-461E-B2D6-85D264F5A733}.Release|Any CPU.Build.0 = netcoreapp-Windows_NT-Release|Any CPU {1D422B1D-D7C4-41B9-862D-EB3D98DF37DE}.Debug|Any CPU.ActiveCfg = netcoreapp-Windows_NT-Debug|Any CPU {1D422B1D-D7C4-41B9-862D-EB3D98DF37DE}.Debug|Any CPU.Build.0 = netcoreapp-Windows_NT-Debug|Any CPU {1D422B1D-D7C4-41B9-862D-EB3D98DF37DE}.Release|Any CPU.ActiveCfg = netcoreapp-Windows_NT-Release|Any CPU diff --git a/src/System.Net.Http/tests/UnitTests/System.Net.Http.Unit.Tests.csproj b/src/System.Net.Http/tests/UnitTests/System.Net.Http.Unit.Tests.csproj index 69db21173051..c1f69dd18018 100644 --- a/src/System.Net.Http/tests/UnitTests/System.Net.Http.Unit.Tests.csproj +++ b/src/System.Net.Http/tests/UnitTests/System.Net.Http.Unit.Tests.csproj @@ -4,7 +4,7 @@ ../../src/Resources/Strings.resx true true - netcoreapp-Debug;netcoreapp-Release + netcoreapp-OSX-Debug;netcoreapp-OSX-Release;netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release @@ -448,4 +448,4 @@ WinHttpHandler\UnitTests\TestServer.cs - + \ No newline at end of file diff --git a/src/System.Net.NetworkInformation/src/System.Net.NetworkInformation.csproj b/src/System.Net.NetworkInformation/src/System.Net.NetworkInformation.csproj index a9ff802af3be..27a0801c29d5 100644 --- a/src/System.Net.NetworkInformation/src/System.Net.NetworkInformation.csproj +++ b/src/System.Net.NetworkInformation/src/System.Net.NetworkInformation.csproj @@ -4,7 +4,7 @@ Library {3CA89D6C-F8D1-4813-9775-F8D249686E31} true - netcoreapp-Linux-Debug;netcoreapp-Linux-Release;netcoreapp-OSX-Debug;netcoreapp-OSX-Release;netcoreapp-FreeBSD-Debug;netcoreapp-FreeBSD-Release;netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release + netcoreapp-FreeBSD-Debug;netcoreapp-FreeBSD-Release;netcoreapp-Linux-Debug;netcoreapp-Linux-Release;netcoreapp-OSX-Debug;netcoreapp-OSX-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release @@ -306,4 +306,4 @@ - + \ No newline at end of file diff --git a/src/System.Net.Sockets/System.Net.Sockets.sln b/src/System.Net.Sockets/System.Net.Sockets.sln index 411d0fb0b4c1..3a888122b35f 100644 --- a/src/System.Net.Sockets/System.Net.Sockets.sln +++ b/src/System.Net.Sockets/System.Net.Sockets.sln @@ -1,13 +1,13 @@ Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.28725.219 +# Visual Studio 15 +VisualStudioVersion = 15.0.27213.1 MinimumVisualStudioVersion = 10.0.40219.1 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Net.Sockets.Tests", "tests\FunctionalTests\System.Net.Sockets.Tests.csproj", "{8CBA022C-635F-4C8D-9D29-CD8AAC68C8E6}" ProjectSection(ProjectDependencies) = postProject {43311AFB-D7C4-4E5A-B1DE-855407F90D1B} = {43311AFB-D7C4-4E5A-B1DE-855407F90D1B} EndProjectSection EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Net.Sockets.Async.PerformanceTests", "tests\ManualPerformanceTests\System.Net.Sockets.Async.PerformanceTests.csproj", "{BB5C85AD-C51A-4903-80E9-6F6E1AC1AD34}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Net.Sockets.Async.Stress.Tests", "tests\ManualPerformanceTests\System.Net.Sockets.Async.Stress.Tests.csproj", "{BB5C85AD-C51A-4903-80E9-6F6E1AC1AD34}" ProjectSection(ProjectDependencies) = postProject {43311AFB-D7C4-4E5A-B1DE-855407F90D1B} = {43311AFB-D7C4-4E5A-B1DE-855407F90D1B} EndProjectSection @@ -31,10 +31,10 @@ Global Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {8CBA022C-635F-4C8D-9D29-CD8AAC68C8E6}.Debug|Any CPU.ActiveCfg = netcoreapp-Unix-Debug|Any CPU - {8CBA022C-635F-4C8D-9D29-CD8AAC68C8E6}.Debug|Any CPU.Build.0 = netcoreapp-Unix-Debug|Any CPU - {8CBA022C-635F-4C8D-9D29-CD8AAC68C8E6}.Release|Any CPU.ActiveCfg = netcoreapp-Unix-Release|Any CPU - {8CBA022C-635F-4C8D-9D29-CD8AAC68C8E6}.Release|Any CPU.Build.0 = netcoreapp-Unix-Release|Any CPU + {8CBA022C-635F-4C8D-9D29-CD8AAC68C8E6}.Debug|Any CPU.ActiveCfg = netcoreapp-Windows_NT-Debug|Any CPU + {8CBA022C-635F-4C8D-9D29-CD8AAC68C8E6}.Debug|Any CPU.Build.0 = netcoreapp-Windows_NT-Debug|Any CPU + {8CBA022C-635F-4C8D-9D29-CD8AAC68C8E6}.Release|Any CPU.ActiveCfg = netcoreapp-Windows_NT-Release|Any CPU + {8CBA022C-635F-4C8D-9D29-CD8AAC68C8E6}.Release|Any CPU.Build.0 = netcoreapp-Windows_NT-Release|Any CPU {BB5C85AD-C51A-4903-80E9-6F6E1AC1AD34}.Debug|Any CPU.ActiveCfg = netstandard-Windows_NT-Debug|Any CPU {BB5C85AD-C51A-4903-80E9-6F6E1AC1AD34}.Debug|Any CPU.Build.0 = netstandard-Windows_NT-Debug|Any CPU {BB5C85AD-C51A-4903-80E9-6F6E1AC1AD34}.Release|Any CPU.ActiveCfg = netstandard-Windows_NT-Release|Any CPU diff --git a/src/System.Numerics.Tensors/System.Numerics.Tensors.sln b/src/System.Numerics.Tensors/System.Numerics.Tensors.sln index 4e55da3d5745..aba8a659f539 100644 --- a/src/System.Numerics.Tensors/System.Numerics.Tensors.sln +++ b/src/System.Numerics.Tensors/System.Numerics.Tensors.sln @@ -1,24 +1,24 @@ - Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 15 -VisualStudioVersion = 15.0.28224.57 +VisualStudioVersion = 15.0.27213.1 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{87920B79-6C7A-4815-89F4-1DA09FAFF411}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{D221B689-1AF1-4595-B37B-85D478B94EAD}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{559061C0-F6A9-4522-992E-3C95AAF852DB}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Numerics.Tensors.Tests", "tests\System.Numerics.Tensors.Tests.csproj", "{D4718CD3-8492-4734-94B7-E31A39AA6275}" + ProjectSection(ProjectDependencies) = postProject + {BE0F13BE-9140-49A8-9FDD-994D0D8A3805} = {BE0F13BE-9140-49A8-9FDD-994D0D8A3805} + EndProjectSection EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "pkg", "pkg", "{7CCC80FC-70B2-4026-BE52-FA2451FAA83D}" - ProjectSection(SolutionItems) = preProject - pkg\System.Numerics.Tensors.pkgproj = pkg\System.Numerics.Tensors.pkgproj +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Numerics.Tensors", "src\System.Numerics.Tensors.csproj", "{BE0F13BE-9140-49A8-9FDD-994D0D8A3805}" + ProjectSection(ProjectDependencies) = postProject + {F64208FC-83DA-4C94-973F-1DDDE4354AFF} = {F64208FC-83DA-4C94-973F-1DDDE4354AFF} EndProjectSection EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Numerics.Tensors", "ref\System.Numerics.Tensors.csproj", "{AEE6F10B-B34C-4D0A-A94D-277AE02F06E8}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Numerics.Tensors", "ref\System.Numerics.Tensors.csproj", "{F64208FC-83DA-4C94-973F-1DDDE4354AFF}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{1A2F9F4A-A032-433E-B914-ADD5992BB178}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Numerics.Tensors", "src\System.Numerics.Tensors.csproj", "{34B7B42D-ADE0-419D-A636-80180244875D}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{E107E9C1-E893-4E87-987E-04EF0DCEAEFD}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Numerics.Tensors.Tests", "tests\System.Numerics.Tensors.Tests.csproj", "{1725EFB4-DE6C-4EBA-8E94-78D3E46F6B37}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{2E666815-2EDB-464B-9DF6-380BF4789AD4}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -26,26 +26,26 @@ Global Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {AEE6F10B-B34C-4D0A-A94D-277AE02F06E8}.Debug|Any CPU.ActiveCfg = netstandard-Debug|Any CPU - {AEE6F10B-B34C-4D0A-A94D-277AE02F06E8}.Debug|Any CPU.Build.0 = netstandard-Debug|Any CPU - {AEE6F10B-B34C-4D0A-A94D-277AE02F06E8}.Release|Any CPU.ActiveCfg = netstandard-Release|Any CPU - {AEE6F10B-B34C-4D0A-A94D-277AE02F06E8}.Release|Any CPU.Build.0 = netstandard-Release|Any CPU - {34B7B42D-ADE0-419D-A636-80180244875D}.Debug|Any CPU.ActiveCfg = netstandard-Debug|Any CPU - {34B7B42D-ADE0-419D-A636-80180244875D}.Debug|Any CPU.Build.0 = netstandard-Debug|Any CPU - {34B7B42D-ADE0-419D-A636-80180244875D}.Release|Any CPU.ActiveCfg = netstandard-Release|Any CPU - {34B7B42D-ADE0-419D-A636-80180244875D}.Release|Any CPU.Build.0 = netstandard-Release|Any CPU - {1725EFB4-DE6C-4EBA-8E94-78D3E46F6B37}.Debug|Any CPU.ActiveCfg = netstandard-Debug|Any CPU - {1725EFB4-DE6C-4EBA-8E94-78D3E46F6B37}.Debug|Any CPU.Build.0 = netstandard-Debug|Any CPU - {1725EFB4-DE6C-4EBA-8E94-78D3E46F6B37}.Release|Any CPU.ActiveCfg = netstandard-Release|Any CPU - {1725EFB4-DE6C-4EBA-8E94-78D3E46F6B37}.Release|Any CPU.Build.0 = netstandard-Release|Any CPU + {D4718CD3-8492-4734-94B7-E31A39AA6275}.Debug|Any CPU.ActiveCfg = netcoreapp-Debug|Any CPU + {D4718CD3-8492-4734-94B7-E31A39AA6275}.Debug|Any CPU.Build.0 = netcoreapp-Debug|Any CPU + {D4718CD3-8492-4734-94B7-E31A39AA6275}.Release|Any CPU.ActiveCfg = netcoreapp-Release|Any CPU + {D4718CD3-8492-4734-94B7-E31A39AA6275}.Release|Any CPU.Build.0 = netcoreapp-Release|Any CPU + {BE0F13BE-9140-49A8-9FDD-994D0D8A3805}.Debug|Any CPU.ActiveCfg = netstandard-Debug|Any CPU + {BE0F13BE-9140-49A8-9FDD-994D0D8A3805}.Debug|Any CPU.Build.0 = netstandard-Debug|Any CPU + {BE0F13BE-9140-49A8-9FDD-994D0D8A3805}.Release|Any CPU.ActiveCfg = netstandard-Release|Any CPU + {BE0F13BE-9140-49A8-9FDD-994D0D8A3805}.Release|Any CPU.Build.0 = netstandard-Release|Any CPU + {F64208FC-83DA-4C94-973F-1DDDE4354AFF}.Debug|Any CPU.ActiveCfg = netstandard-Debug|Any CPU + {F64208FC-83DA-4C94-973F-1DDDE4354AFF}.Debug|Any CPU.Build.0 = netstandard-Debug|Any CPU + {F64208FC-83DA-4C94-973F-1DDDE4354AFF}.Release|Any CPU.ActiveCfg = netstandard-Release|Any CPU + {F64208FC-83DA-4C94-973F-1DDDE4354AFF}.Release|Any CPU.Build.0 = netstandard-Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution - {AEE6F10B-B34C-4D0A-A94D-277AE02F06E8} = {87920B79-6C7A-4815-89F4-1DA09FAFF411} - {34B7B42D-ADE0-419D-A636-80180244875D} = {D221B689-1AF1-4595-B37B-85D478B94EAD} - {1725EFB4-DE6C-4EBA-8E94-78D3E46F6B37} = {559061C0-F6A9-4522-992E-3C95AAF852DB} + {D4718CD3-8492-4734-94B7-E31A39AA6275} = {1A2F9F4A-A032-433E-B914-ADD5992BB178} + {BE0F13BE-9140-49A8-9FDD-994D0D8A3805} = {E107E9C1-E893-4E87-987E-04EF0DCEAEFD} + {F64208FC-83DA-4C94-973F-1DDDE4354AFF} = {2E666815-2EDB-464B-9DF6-380BF4789AD4} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {13D12508-D252-4FD4-A8AA-1DD44F666914} diff --git a/src/System.Numerics.Tensors/ref/System.Numerics.Tensors.csproj b/src/System.Numerics.Tensors/ref/System.Numerics.Tensors.csproj index 2b63eca1134b..660a849a98d4 100644 --- a/src/System.Numerics.Tensors/ref/System.Numerics.Tensors.csproj +++ b/src/System.Numerics.Tensors/ref/System.Numerics.Tensors.csproj @@ -1,6 +1,9 @@  - netstandard-Debug;netstandard-Release;netstandard1.1-Debug;netstandard1.1-Release; + netstandard-Debug;netstandard-Release;netstandard1.1-Debug;netstandard1.1-Release + + + {F64208FC-83DA-4C94-973F-1DDDE4354AFF} @@ -14,4 +17,4 @@ - + \ No newline at end of file diff --git a/src/System.Numerics.Tensors/src/System.Numerics.Tensors.csproj b/src/System.Numerics.Tensors/src/System.Numerics.Tensors.csproj index c540695b0ac5..a6eb24c27afd 100644 --- a/src/System.Numerics.Tensors/src/System.Numerics.Tensors.csproj +++ b/src/System.Numerics.Tensors/src/System.Numerics.Tensors.csproj @@ -1,10 +1,13 @@  true - netstandard-Debug;netstandard-Release;netstandard1.1-Debug;netstandard1.1-Release; + netstandard-Debug;netstandard-Release;netstandard1.1-Debug;netstandard1.1-Release $(OutputPath)$(MSBuildProjectName).xml System.Numerics.Tensors + + {BE0F13BE-9140-49A8-9FDD-994D0D8A3805} + @@ -23,4 +26,4 @@ - + \ No newline at end of file diff --git a/src/System.Numerics.Tensors/tests/System.Numerics.Tensors.Tests.csproj b/src/System.Numerics.Tensors/tests/System.Numerics.Tensors.Tests.csproj index 0329734d849d..cfa8438f208b 100644 --- a/src/System.Numerics.Tensors/tests/System.Numerics.Tensors.Tests.csproj +++ b/src/System.Numerics.Tensors/tests/System.Numerics.Tensors.Tests.csproj @@ -1,7 +1,10 @@  True - netcoreapp-Debug;netcoreapp-Release; + netcoreapp-Debug;netcoreapp-Release + + + {D4718CD3-8492-4734-94B7-E31A39AA6275} @@ -39,4 +42,4 @@ - + \ No newline at end of file diff --git a/src/System.ObjectModel/tests/System.ObjectModel.Tests.csproj b/src/System.ObjectModel/tests/System.ObjectModel.Tests.csproj index 89419f88be3d..358949109576 100644 --- a/src/System.ObjectModel/tests/System.ObjectModel.Tests.csproj +++ b/src/System.ObjectModel/tests/System.ObjectModel.Tests.csproj @@ -1,7 +1,7 @@ {43841228-2A2B-4215-B97F-33006995E486} - netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release + netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release;uap-Debug;uap-Release;uapaot-Debug;uapaot-Release @@ -44,7 +44,7 @@ - + @@ -58,4 +58,4 @@ Common\System\Runtime\Serialization\Formatters\BinaryFormatterHelpers.cs - + \ No newline at end of file diff --git a/src/System.Private.Uri/System.Private.Uri.sln b/src/System.Private.Uri/System.Private.Uri.sln index b6d88c45e4ce..7fd10b3ab269 100644 --- a/src/System.Private.Uri/System.Private.Uri.sln +++ b/src/System.Private.Uri/System.Private.Uri.sln @@ -37,10 +37,10 @@ Global {B0FFC4A8-BAC3-4A7F-8FD5-5B680209371C}.Debug|Any CPU.Build.0 = netstandard-Debug|Any CPU {B0FFC4A8-BAC3-4A7F-8FD5-5B680209371C}.Release|Any CPU.ActiveCfg = netstandard-Release|Any CPU {B0FFC4A8-BAC3-4A7F-8FD5-5B680209371C}.Release|Any CPU.Build.0 = netstandard-Release|Any CPU - {96AF3242-A368-4F13-B006-A722CC3B8517}.Debug|Any CPU.ActiveCfg = netstandard-Debug|Any CPU - {96AF3242-A368-4F13-B006-A722CC3B8517}.Debug|Any CPU.Build.0 = netstandard-Debug|Any CPU - {96AF3242-A368-4F13-B006-A722CC3B8517}.Release|Any CPU.ActiveCfg = netstandard-Release|Any CPU - {96AF3242-A368-4F13-B006-A722CC3B8517}.Release|Any CPU.Build.0 = netstandard-Release|Any CPU + {96AF3242-A368-4F13-B006-A722CC3B8517}.Debug|Any CPU.ActiveCfg = netcoreapp-Debug|Any CPU + {96AF3242-A368-4F13-B006-A722CC3B8517}.Debug|Any CPU.Build.0 = netcoreapp-Debug|Any CPU + {96AF3242-A368-4F13-B006-A722CC3B8517}.Release|Any CPU.ActiveCfg = netcoreapp-Release|Any CPU + {96AF3242-A368-4F13-B006-A722CC3B8517}.Release|Any CPU.Build.0 = netcoreapp-Release|Any CPU {4AC5343E-6E31-4BA5-A795-0493AE7E9008}.Debug|Any CPU.ActiveCfg = netcoreapp-Windows_NT-Debug|Any CPU {4AC5343E-6E31-4BA5-A795-0493AE7E9008}.Debug|Any CPU.Build.0 = netcoreapp-Windows_NT-Debug|Any CPU {4AC5343E-6E31-4BA5-A795-0493AE7E9008}.Release|Any CPU.ActiveCfg = netcoreapp-Windows_NT-Release|Any CPU diff --git a/src/System.Private.Xml.Linq/System.Private.Xml.Linq.sln b/src/System.Private.Xml.Linq/System.Private.Xml.Linq.sln index a0ef3808d214..4462f235f2be 100644 --- a/src/System.Private.Xml.Linq/System.Private.Xml.Linq.sln +++ b/src/System.Private.Xml.Linq/System.Private.Xml.Linq.sln @@ -119,10 +119,10 @@ Global {979510CE-9042-4F8D-9C74-EE03B89194CC}.Debug|Any CPU.Build.0 = netstandard-Debug|Any CPU {979510CE-9042-4F8D-9C74-EE03B89194CC}.Release|Any CPU.ActiveCfg = netstandard-Release|Any CPU {979510CE-9042-4F8D-9C74-EE03B89194CC}.Release|Any CPU.Build.0 = netstandard-Release|Any CPU - {5D4FB9ED-C3AC-4EFA-9FEE-619ED4B4B92D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {5D4FB9ED-C3AC-4EFA-9FEE-619ED4B4B92D}.Debug|Any CPU.Build.0 = Debug|Any CPU - {5D4FB9ED-C3AC-4EFA-9FEE-619ED4B4B92D}.Release|Any CPU.ActiveCfg = Release|Any CPU - {5D4FB9ED-C3AC-4EFA-9FEE-619ED4B4B92D}.Release|Any CPU.Build.0 = Release|Any CPU + {5D4FB9ED-C3AC-4EFA-9FEE-619ED4B4B92D}.Debug|Any CPU.ActiveCfg = netcoreapp-Debug|Any CPU + {5D4FB9ED-C3AC-4EFA-9FEE-619ED4B4B92D}.Debug|Any CPU.Build.0 = netcoreapp-Debug|Any CPU + {5D4FB9ED-C3AC-4EFA-9FEE-619ED4B4B92D}.Release|Any CPU.ActiveCfg = netcoreapp-Release|Any CPU + {5D4FB9ED-C3AC-4EFA-9FEE-619ED4B4B92D}.Release|Any CPU.Build.0 = netcoreapp-Release|Any CPU {6E1C5358-7F04-4791-8B5F-6A5A4E42ABF1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {6E1C5358-7F04-4791-8B5F-6A5A4E42ABF1}.Debug|Any CPU.Build.0 = Debug|Any CPU {6E1C5358-7F04-4791-8B5F-6A5A4E42ABF1}.Release|Any CPU.ActiveCfg = Release|Any CPU diff --git a/src/System.Private.Xml.Linq/tests/xNodeBuilder/System.Xml.Linq.xNodeBuilder.Tests.csproj b/src/System.Private.Xml.Linq/tests/xNodeBuilder/System.Xml.Linq.xNodeBuilder.Tests.csproj index 714de5a1c84f..bb677e8e6b61 100644 --- a/src/System.Private.Xml.Linq/tests/xNodeBuilder/System.Xml.Linq.xNodeBuilder.Tests.csproj +++ b/src/System.Private.Xml.Linq/tests/xNodeBuilder/System.Xml.Linq.xNodeBuilder.Tests.csproj @@ -1,7 +1,7 @@ {5D4FB9ED-C3AC-4EFA-9FEE-619ED4B4B92D} - Debug;Release + netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release diff --git a/src/System.Reflection.DispatchProxy/System.Reflection.DispatchProxy.sln b/src/System.Reflection.DispatchProxy/System.Reflection.DispatchProxy.sln index df711309d27b..b2fac594478d 100644 --- a/src/System.Reflection.DispatchProxy/System.Reflection.DispatchProxy.sln +++ b/src/System.Reflection.DispatchProxy/System.Reflection.DispatchProxy.sln @@ -34,10 +34,10 @@ Global {1E689C1B-690C-4799-BDE9-6E7990585894}.Debug|Any CPU.Build.0 = netcoreapp-Debug|Any CPU {1E689C1B-690C-4799-BDE9-6E7990585894}.Release|Any CPU.ActiveCfg = netcoreapp-Release|Any CPU {1E689C1B-690C-4799-BDE9-6E7990585894}.Release|Any CPU.Build.0 = netcoreapp-Release|Any CPU - {7DF3C428-AAD6-41C7-98E6-6CACFD5C391E}.Debug|Any CPU.ActiveCfg = netstandard-Debug|Any CPU - {7DF3C428-AAD6-41C7-98E6-6CACFD5C391E}.Debug|Any CPU.Build.0 = netstandard-Debug|Any CPU - {7DF3C428-AAD6-41C7-98E6-6CACFD5C391E}.Release|Any CPU.ActiveCfg = netstandard-Release|Any CPU - {7DF3C428-AAD6-41C7-98E6-6CACFD5C391E}.Release|Any CPU.Build.0 = netstandard-Release|Any CPU + {7DF3C428-AAD6-41C7-98E6-6CACFD5C391E}.Debug|Any CPU.ActiveCfg = netcoreapp-Debug|Any CPU + {7DF3C428-AAD6-41C7-98E6-6CACFD5C391E}.Debug|Any CPU.Build.0 = netcoreapp-Debug|Any CPU + {7DF3C428-AAD6-41C7-98E6-6CACFD5C391E}.Release|Any CPU.ActiveCfg = netcoreapp-Release|Any CPU + {7DF3C428-AAD6-41C7-98E6-6CACFD5C391E}.Release|Any CPU.Build.0 = netcoreapp-Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/src/System.Reflection.DispatchProxy/ref/System.Reflection.DispatchProxy.csproj b/src/System.Reflection.DispatchProxy/ref/System.Reflection.DispatchProxy.csproj index 2c3078ed3f24..0a007b371121 100644 --- a/src/System.Reflection.DispatchProxy/ref/System.Reflection.DispatchProxy.csproj +++ b/src/System.Reflection.DispatchProxy/ref/System.Reflection.DispatchProxy.csproj @@ -1,7 +1,7 @@ {7DF3C428-AAD6-41C7-98E6-6CACFD5C391E} - netstandard-Debug;netstandard-Release;uap-Debug;uap-Release;uap10.0.16299-Debug;uap10.0.16299-Release;netcoreapp-Debug;netcoreapp-Release + netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release;uap-Debug;uap-Release;uap10.0.16299-Debug;uap10.0.16299-Release diff --git a/src/System.Reflection/System.Reflection.sln b/src/System.Reflection/System.Reflection.sln index e3c5a8aaa264..7f5dd9e67e97 100644 --- a/src/System.Reflection/System.Reflection.sln +++ b/src/System.Reflection/System.Reflection.sln @@ -67,11 +67,26 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Reflection.CoreCLR.T {68F87E68-E13F-4354-A6D6-B44727FE53EE} = {68F87E68-E13F-4354-A6D6-B44727FE53EE} EndProjectSection EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ForwardedTypesAssembly", "tests\ForwardedTypesAssembly\ForwardedTypesAssembly.csproj", "{FA12CC14-C4A5-495D-B7AA-651E4BCC1027}" + ProjectSection(ProjectDependencies) = postProject + {68F87E68-E13F-4354-A6D6-B44727FE53EE} = {68F87E68-E13F-4354-A6D6-B44727FE53EE} + EndProjectSection +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestAssembly", "tests\TestAssembly\TestAssembly.csproj", "{0CD33916-DD1D-4DF3-B579-2896ACE43E45}" + ProjectSection(ProjectDependencies) = postProject + {68F87E68-E13F-4354-A6D6-B44727FE53EE} = {68F87E68-E13F-4354-A6D6-B44727FE53EE} + EndProjectSection +EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Reflection.TestExe", "tests\TestExe\System.Reflection.TestExe.csproj", "{8C19B991-41E9-4B38-9602-E19375397F1D}" ProjectSection(ProjectDependencies) = postProject {68F87E68-E13F-4354-A6D6-B44727FE53EE} = {68F87E68-E13F-4354-A6D6-B44727FE53EE} EndProjectSection EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "UnloadableAssembly", "tests\UnloadableAssembly\UnloadableAssembly.csproj", "{7FFD1B55-D69A-4469-B775-6CBEB1CE50B0}" + ProjectSection(ProjectDependencies) = postProject + {68F87E68-E13F-4354-A6D6-B44727FE53EE} = {68F87E68-E13F-4354-A6D6-B44727FE53EE} + EndProjectSection +EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Reflection", "src\System.Reflection.csproj", "{68F87E68-E13F-4354-A6D6-B44727FE53EE}" ProjectSection(ProjectDependencies) = postProject {23B83DCB-45FD-4C8F-A6FB-C6799FB52BA6} = {23B83DCB-45FD-4C8F-A6FB-C6799FB52BA6} @@ -91,10 +106,10 @@ Global Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {B027C72E-F04E-42E0-A7F7-993AEF8400D2}.Debug|Any CPU.ActiveCfg = netstandard-Debug|Any CPU - {B027C72E-F04E-42E0-A7F7-993AEF8400D2}.Debug|Any CPU.Build.0 = netstandard-Debug|Any CPU - {B027C72E-F04E-42E0-A7F7-993AEF8400D2}.Release|Any CPU.ActiveCfg = netstandard-Release|Any CPU - {B027C72E-F04E-42E0-A7F7-993AEF8400D2}.Release|Any CPU.Build.0 = netstandard-Release|Any CPU + {B027C72E-F04E-42E0-A7F7-993AEF8400D2}.Debug|Any CPU.ActiveCfg = netcoreapp-Debug|Any CPU + {B027C72E-F04E-42E0-A7F7-993AEF8400D2}.Debug|Any CPU.Build.0 = netcoreapp-Debug|Any CPU + {B027C72E-F04E-42E0-A7F7-993AEF8400D2}.Release|Any CPU.ActiveCfg = netcoreapp-Release|Any CPU + {B027C72E-F04E-42E0-A7F7-993AEF8400D2}.Release|Any CPU.Build.0 = netcoreapp-Release|Any CPU {5B003EB4-DD06-4BC6-B2E9-A9F0E445CB86}.Debug|Any CPU.ActiveCfg = netstandard-Debug|Any CPU {5B003EB4-DD06-4BC6-B2E9-A9F0E445CB86}.Debug|Any CPU.Build.0 = netstandard-Debug|Any CPU {5B003EB4-DD06-4BC6-B2E9-A9F0E445CB86}.Release|Any CPU.ActiveCfg = netstandard-Release|Any CPU @@ -143,10 +158,22 @@ Global {C8049356-559D-4F34-AC17-56F3AE62C897}.Debug|Any CPU.Build.0 = netcoreapp-Debug|Any CPU {C8049356-559D-4F34-AC17-56F3AE62C897}.Release|Any CPU.ActiveCfg = netcoreapp-Release|Any CPU {C8049356-559D-4F34-AC17-56F3AE62C897}.Release|Any CPU.Build.0 = netcoreapp-Release|Any CPU + {FA12CC14-C4A5-495D-B7AA-651E4BCC1027}.Debug|Any CPU.ActiveCfg = netstandard-Debug|Any CPU + {FA12CC14-C4A5-495D-B7AA-651E4BCC1027}.Debug|Any CPU.Build.0 = netstandard-Debug|Any CPU + {FA12CC14-C4A5-495D-B7AA-651E4BCC1027}.Release|Any CPU.ActiveCfg = netstandard-Release|Any CPU + {FA12CC14-C4A5-495D-B7AA-651E4BCC1027}.Release|Any CPU.Build.0 = netstandard-Release|Any CPU + {0CD33916-DD1D-4DF3-B579-2896ACE43E45}.Debug|Any CPU.ActiveCfg = netstandard-Debug|Any CPU + {0CD33916-DD1D-4DF3-B579-2896ACE43E45}.Debug|Any CPU.Build.0 = netstandard-Debug|Any CPU + {0CD33916-DD1D-4DF3-B579-2896ACE43E45}.Release|Any CPU.ActiveCfg = netstandard-Release|Any CPU + {0CD33916-DD1D-4DF3-B579-2896ACE43E45}.Release|Any CPU.Build.0 = netstandard-Release|Any CPU {8C19B991-41E9-4B38-9602-E19375397F1D}.Debug|Any CPU.ActiveCfg = netstandard-Debug|Any CPU {8C19B991-41E9-4B38-9602-E19375397F1D}.Debug|Any CPU.Build.0 = netstandard-Debug|Any CPU {8C19B991-41E9-4B38-9602-E19375397F1D}.Release|Any CPU.ActiveCfg = netstandard-Release|Any CPU {8C19B991-41E9-4B38-9602-E19375397F1D}.Release|Any CPU.Build.0 = netstandard-Release|Any CPU + {7FFD1B55-D69A-4469-B775-6CBEB1CE50B0}.Debug|Any CPU.ActiveCfg = netstandard-Debug|Any CPU + {7FFD1B55-D69A-4469-B775-6CBEB1CE50B0}.Debug|Any CPU.Build.0 = netstandard-Debug|Any CPU + {7FFD1B55-D69A-4469-B775-6CBEB1CE50B0}.Release|Any CPU.ActiveCfg = netstandard-Release|Any CPU + {7FFD1B55-D69A-4469-B775-6CBEB1CE50B0}.Release|Any CPU.Build.0 = netstandard-Release|Any CPU {68F87E68-E13F-4354-A6D6-B44727FE53EE}.Debug|Any CPU.ActiveCfg = netcoreapp-Windows_NT-Debug|Any CPU {68F87E68-E13F-4354-A6D6-B44727FE53EE}.Debug|Any CPU.Build.0 = netcoreapp-Windows_NT-Debug|Any CPU {68F87E68-E13F-4354-A6D6-B44727FE53EE}.Release|Any CPU.ActiveCfg = netcoreapp-Windows_NT-Release|Any CPU @@ -173,7 +200,10 @@ Global {68AD3675-F57E-4FB3-9943-49E602678BCA} = {1A2F9F4A-A032-433E-B914-ADD5992BB178} {42E66302-6F46-47BE-936B-4264DFD6004F} = {1A2F9F4A-A032-433E-B914-ADD5992BB178} {C8049356-559D-4F34-AC17-56F3AE62C897} = {1A2F9F4A-A032-433E-B914-ADD5992BB178} + {FA12CC14-C4A5-495D-B7AA-651E4BCC1027} = {1A2F9F4A-A032-433E-B914-ADD5992BB178} + {0CD33916-DD1D-4DF3-B579-2896ACE43E45} = {1A2F9F4A-A032-433E-B914-ADD5992BB178} {8C19B991-41E9-4B38-9602-E19375397F1D} = {1A2F9F4A-A032-433E-B914-ADD5992BB178} + {7FFD1B55-D69A-4469-B775-6CBEB1CE50B0} = {1A2F9F4A-A032-433E-B914-ADD5992BB178} {68F87E68-E13F-4354-A6D6-B44727FE53EE} = {E107E9C1-E893-4E87-987E-04EF0DCEAEFD} {23B83DCB-45FD-4C8F-A6FB-C6799FB52BA6} = {2E666815-2EDB-464B-9DF6-380BF4789AD4} EndGlobalSection diff --git a/src/System.Resources.Extensions/System.Resources.Extensions.sln b/src/System.Resources.Extensions/System.Resources.Extensions.sln index f4e15b4e90f8..8c4005658ad3 100644 --- a/src/System.Resources.Extensions/System.Resources.Extensions.sln +++ b/src/System.Resources.Extensions/System.Resources.Extensions.sln @@ -1,45 +1,51 @@ Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.28621.142 +# Visual Studio 15 +VisualStudioVersion = 15.0.27213.1 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Resources.Extensions", "src\System.Resources.Extensions.csproj", "{694389E4-6F68-4E0A-A8AC-2B85416C0742}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Resources.Extensions.Tests", "tests\System.Resources.Extensions.Tests.csproj", "{9003846C-EE54-4E58-B01E-6AA177E046C5}" + ProjectSection(ProjectDependencies) = postProject + {6773D354-A573-4D9C-9A67-C7FAE579DA50} = {6773D354-A573-4D9C-9A67-C7FAE579DA50} + EndProjectSection EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Resources.Extensions", "ref\System.Resources.Extensions.csproj", "{CD6088BF-DDA2-4097-A505-D786E8968A76}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Resources.Extensions", "src\System.Resources.Extensions.csproj", "{6773D354-A573-4D9C-9A67-C7FAE579DA50}" + ProjectSection(ProjectDependencies) = postProject + {D8C148D2-FAB2-4D8C-ACA3-D201665F7255} = {D8C148D2-FAB2-4D8C-ACA3-D201665F7255} + EndProjectSection EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Resources.Extensions.Tests", "tests\System.Resources.Extensions.Tests.csproj", "{9359E7DF-50C8-471B-AF9E-706FE2C4B326}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Resources.Extensions", "ref\System.Resources.Extensions.csproj", "{D8C148D2-FAB2-4D8C-ACA3-D201665F7255}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{E107E9C1-E893-4E87-987E-04EF0DCEAEFD}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{1A2F9F4A-A032-433E-B914-ADD5992BB178}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{606176E0-E028-42B8-8FBA-3DA36A65E6FC}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{E107E9C1-E893-4E87-987E-04EF0DCEAEFD}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{E5D875A9-7379-4393-A808-E52B1AB05D66}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{2E666815-2EDB-464B-9DF6-380BF4789AD4}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution - netstandard-Debug|Any CPU = netstandard-Debug|Any CPU - netstandard-Release|Any CPU = netstandard-Release|Any CPU + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {694389E4-6F68-4E0A-A8AC-2B85416C0742}.netstandard-Debug|Any CPU.ActiveCfg = netstandard-Debug|Any CPU - {694389E4-6F68-4E0A-A8AC-2B85416C0742}.netstandard-Debug|Any CPU.Build.0 = netstandard-Debug|Any CPU - {694389E4-6F68-4E0A-A8AC-2B85416C0742}.netstandard-Release|Any CPU.ActiveCfg = netstandard-Release|Any CPU - {694389E4-6F68-4E0A-A8AC-2B85416C0742}.netstandard-Release|Any CPU.Build.0 = netstandard-Release|Any CPU - {CD6088BF-DDA2-4097-A505-D786E8968A76}.netstandard-Debug|Any CPU.ActiveCfg = netstandard-Debug|Any CPU - {CD6088BF-DDA2-4097-A505-D786E8968A76}.netstandard-Debug|Any CPU.Build.0 = netstandard-Debug|Any CPU - {CD6088BF-DDA2-4097-A505-D786E8968A76}.netstandard-Release|Any CPU.ActiveCfg = netstandard-Release|Any CPU - {CD6088BF-DDA2-4097-A505-D786E8968A76}.netstandard-Release|Any CPU.Build.0 = netstandard-Release|Any CPU - {9359E7DF-50C8-471B-AF9E-706FE2C4B326}.netstandard-Debug|Any CPU.ActiveCfg = netstandard-Debug|Any CPU - {9359E7DF-50C8-471B-AF9E-706FE2C4B326}.netstandard-Debug|Any CPU.Build.0 = netstandard-Debug|Any CPU - {9359E7DF-50C8-471B-AF9E-706FE2C4B326}.netstandard-Release|Any CPU.ActiveCfg = netstandard-Release|Any CPU - {9359E7DF-50C8-471B-AF9E-706FE2C4B326}.netstandard-Release|Any CPU.Build.0 = netstandard-Release|Any CPU + {9003846C-EE54-4E58-B01E-6AA177E046C5}.Debug|Any CPU.ActiveCfg = netstandard-Debug|Any CPU + {9003846C-EE54-4E58-B01E-6AA177E046C5}.Debug|Any CPU.Build.0 = netstandard-Debug|Any CPU + {9003846C-EE54-4E58-B01E-6AA177E046C5}.Release|Any CPU.ActiveCfg = netstandard-Release|Any CPU + {9003846C-EE54-4E58-B01E-6AA177E046C5}.Release|Any CPU.Build.0 = netstandard-Release|Any CPU + {6773D354-A573-4D9C-9A67-C7FAE579DA50}.Debug|Any CPU.ActiveCfg = netstandard-Debug|Any CPU + {6773D354-A573-4D9C-9A67-C7FAE579DA50}.Debug|Any CPU.Build.0 = netstandard-Debug|Any CPU + {6773D354-A573-4D9C-9A67-C7FAE579DA50}.Release|Any CPU.ActiveCfg = netstandard-Release|Any CPU + {6773D354-A573-4D9C-9A67-C7FAE579DA50}.Release|Any CPU.Build.0 = netstandard-Release|Any CPU + {D8C148D2-FAB2-4D8C-ACA3-D201665F7255}.Debug|Any CPU.ActiveCfg = netstandard-Debug|Any CPU + {D8C148D2-FAB2-4D8C-ACA3-D201665F7255}.Debug|Any CPU.Build.0 = netstandard-Debug|Any CPU + {D8C148D2-FAB2-4D8C-ACA3-D201665F7255}.Release|Any CPU.ActiveCfg = netstandard-Release|Any CPU + {D8C148D2-FAB2-4D8C-ACA3-D201665F7255}.Release|Any CPU.Build.0 = netstandard-Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution - {694389E4-6F68-4E0A-A8AC-2B85416C0742} = {E107E9C1-E893-4E87-987E-04EF0DCEAEFD} - {CD6088BF-DDA2-4097-A505-D786E8968A76} = {606176E0-E028-42B8-8FBA-3DA36A65E6FC} - {9359E7DF-50C8-471B-AF9E-706FE2C4B326} = {E5D875A9-7379-4393-A808-E52B1AB05D66} + {9003846C-EE54-4E58-B01E-6AA177E046C5} = {1A2F9F4A-A032-433E-B914-ADD5992BB178} + {6773D354-A573-4D9C-9A67-C7FAE579DA50} = {E107E9C1-E893-4E87-987E-04EF0DCEAEFD} + {D8C148D2-FAB2-4D8C-ACA3-D201665F7255} = {2E666815-2EDB-464B-9DF6-380BF4789AD4} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {046617DD-67EB-43A1-BE4E-22CCFC3EC15F} diff --git a/src/System.Resources.Extensions/ref/System.Resources.Extensions.csproj b/src/System.Resources.Extensions/ref/System.Resources.Extensions.csproj index c6891bf9b57a..94de79c63f19 100644 --- a/src/System.Resources.Extensions/ref/System.Resources.Extensions.csproj +++ b/src/System.Resources.Extensions/ref/System.Resources.Extensions.csproj @@ -2,6 +2,9 @@ netstandard-Debug;netstandard-Release + + {D8C148D2-FAB2-4D8C-ACA3-D201665F7255} + diff --git a/src/System.Resources.Extensions/src/System.Resources.Extensions.csproj b/src/System.Resources.Extensions/src/System.Resources.Extensions.csproj index 07e9415378f0..aaece98adfc4 100644 --- a/src/System.Resources.Extensions/src/System.Resources.Extensions.csproj +++ b/src/System.Resources.Extensions/src/System.Resources.Extensions.csproj @@ -4,6 +4,9 @@ netstandard-Debug;netstandard-Release $(DefineConstants);RESOURCES_EXTENSIONS + + {6773D354-A573-4D9C-9A67-C7FAE579DA50} + @@ -14,7 +17,7 @@ - + diff --git a/src/System.Resources.Extensions/tests/System.Resources.Extensions.Tests.csproj b/src/System.Resources.Extensions/tests/System.Resources.Extensions.Tests.csproj index 0f9b7922090d..e774f0d55882 100644 --- a/src/System.Resources.Extensions/tests/System.Resources.Extensions.Tests.csproj +++ b/src/System.Resources.Extensions/tests/System.Resources.Extensions.Tests.csproj @@ -4,6 +4,9 @@ 1.0.9 true + + {9003846C-EE54-4E58-B01E-6AA177E046C5} + @@ -11,7 +14,6 @@ - @@ -20,10 +22,7 @@ <_executor>Microsoft.DotNet.RemoteExecutorHost.dll - - + $(TargetDir)%(Class)%(Identity).exception.txt @@ -31,7 +30,6 @@ $(TestHostRootPath)dotnet $(_executor) $(AssemblyName) %(Class) %(Identity) %(ExceptionFile) %(Parameters) - \ No newline at end of file diff --git a/src/System.Resources.ResourceManager/System.Resources.ResourceManager.sln b/src/System.Resources.ResourceManager/System.Resources.ResourceManager.sln index 2b6a013fd651..f9dce38c1151 100644 --- a/src/System.Resources.ResourceManager/System.Resources.ResourceManager.sln +++ b/src/System.Resources.ResourceManager/System.Resources.ResourceManager.sln @@ -26,10 +26,10 @@ Global Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {1D51A16C-B6D8-4E8F-98DE-21AD9A7062A1}.Debug|Any CPU.ActiveCfg = netstandard-Debug|Any CPU - {1D51A16C-B6D8-4E8F-98DE-21AD9A7062A1}.Debug|Any CPU.Build.0 = netstandard-Debug|Any CPU - {1D51A16C-B6D8-4E8F-98DE-21AD9A7062A1}.Release|Any CPU.ActiveCfg = netstandard-Release|Any CPU - {1D51A16C-B6D8-4E8F-98DE-21AD9A7062A1}.Release|Any CPU.Build.0 = netstandard-Release|Any CPU + {1D51A16C-B6D8-4E8F-98DE-21AD9A7062A1}.Debug|Any CPU.ActiveCfg = netcoreapp-Debug|Any CPU + {1D51A16C-B6D8-4E8F-98DE-21AD9A7062A1}.Debug|Any CPU.Build.0 = netcoreapp-Debug|Any CPU + {1D51A16C-B6D8-4E8F-98DE-21AD9A7062A1}.Release|Any CPU.ActiveCfg = netcoreapp-Release|Any CPU + {1D51A16C-B6D8-4E8F-98DE-21AD9A7062A1}.Release|Any CPU.Build.0 = netcoreapp-Release|Any CPU {3E7810B2-2802-4867-B223-30427F3F2D5B}.Debug|Any CPU.ActiveCfg = netcoreapp-Windows_NT-Debug|Any CPU {3E7810B2-2802-4867-B223-30427F3F2D5B}.Debug|Any CPU.Build.0 = netcoreapp-Windows_NT-Debug|Any CPU {3E7810B2-2802-4867-B223-30427F3F2D5B}.Release|Any CPU.ActiveCfg = netcoreapp-Windows_NT-Release|Any CPU diff --git a/src/System.Runtime.InteropServices.RuntimeInformation/tests/System.Runtime.InteropServices.RuntimeInformation.Tests.csproj b/src/System.Runtime.InteropServices.RuntimeInformation/tests/System.Runtime.InteropServices.RuntimeInformation.Tests.csproj index 75949807ea77..8736afdb3778 100644 --- a/src/System.Runtime.InteropServices.RuntimeInformation/tests/System.Runtime.InteropServices.RuntimeInformation.Tests.csproj +++ b/src/System.Runtime.InteropServices.RuntimeInformation/tests/System.Runtime.InteropServices.RuntimeInformation.Tests.csproj @@ -1,7 +1,7 @@ {9B4D1DA9-AA4C-428F-9F66-D45C924025A5} - netstandard-Unix-Debug;netstandard-Unix-Release;netstandard-Windows_NT-Debug;netstandard-Windows_NT-Release;netcoreapp-Unix-Debug;netcoreapp-Unix-Release + netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netstandard-Unix-Debug;netstandard-Unix-Release;netstandard-Windows_NT-Debug;netstandard-Windows_NT-Release @@ -12,4 +12,4 @@ Common\Interop\Linux\Interop.cgroups.cs - + \ No newline at end of file diff --git a/src/System.Runtime.Intrinsics/System.Runtime.Intrinsics.sln b/src/System.Runtime.Intrinsics/System.Runtime.Intrinsics.sln index 56137c441b69..91551b7cbe12 100644 --- a/src/System.Runtime.Intrinsics/System.Runtime.Intrinsics.sln +++ b/src/System.Runtime.Intrinsics/System.Runtime.Intrinsics.sln @@ -2,12 +2,12 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 15 VisualStudioVersion = 15.0.27213.1 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime.Intrinsics", "src\System.Runtime.Intrinsics.csproj", "{543FBFE5-E9E4-4631-8242-911A707FE818}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime.Intrinsics", "src\System.Runtime.Intrinsics.csproj", "{315E3C60-A5D9-4F47-A940-D57395EED606}" ProjectSection(ProjectDependencies) = postProject - {4074AF8C-8C65-486C-960E-F45DAAB0BE0D} = {4074AF8C-8C65-486C-960E-F45DAAB0BE0D} + {F9097917-AFA3-4E3E-A592-BFA2C483C7E2} = {F9097917-AFA3-4E3E-A592-BFA2C483C7E2} EndProjectSection EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime.Intrinsics", "ref\System.Runtime.Intrinsics.csproj", "{4074AF8C-8C65-486C-960E-F45DAAB0BE0D}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime.Intrinsics", "ref\System.Runtime.Intrinsics.csproj", "{F9097917-AFA3-4E3E-A592-BFA2C483C7E2}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{E107E9C1-E893-4E87-987E-04EF0DCEAEFD}" EndProject @@ -19,21 +19,21 @@ Global Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {543FBFE5-E9E4-4631-8242-911A707FE818}.Debug|Any CPU.ActiveCfg = netcoreapp-Windows_NT-Debug|Any CPU - {543FBFE5-E9E4-4631-8242-911A707FE818}.Debug|Any CPU.Build.0 = netcoreapp-Windows_NT-Debug|Any CPU - {543FBFE5-E9E4-4631-8242-911A707FE818}.Release|Any CPU.ActiveCfg = netcoreapp-Windows_NT-Release|Any CPU - {543FBFE5-E9E4-4631-8242-911A707FE818}.Release|Any CPU.Build.0 = netcoreapp-Windows_NT-Release|Any CPU - {4074AF8C-8C65-486C-960E-F45DAAB0BE0D}.Debug|Any CPU.ActiveCfg = netcoreapp-Debug|Any CPU - {4074AF8C-8C65-486C-960E-F45DAAB0BE0D}.Debug|Any CPU.Build.0 = netcoreapp-Debug|Any CPU - {4074AF8C-8C65-486C-960E-F45DAAB0BE0D}.Release|Any CPU.ActiveCfg = netcoreapp-Release|Any CPU - {4074AF8C-8C65-486C-960E-F45DAAB0BE0D}.Release|Any CPU.Build.0 = netcoreapp-Release|Any CPU + {315E3C60-A5D9-4F47-A940-D57395EED606}.Debug|Any CPU.ActiveCfg = netcoreapp-Windows_NT-Debug|Any CPU + {315E3C60-A5D9-4F47-A940-D57395EED606}.Debug|Any CPU.Build.0 = netcoreapp-Windows_NT-Debug|Any CPU + {315E3C60-A5D9-4F47-A940-D57395EED606}.Release|Any CPU.ActiveCfg = netcoreapp-Windows_NT-Release|Any CPU + {315E3C60-A5D9-4F47-A940-D57395EED606}.Release|Any CPU.Build.0 = netcoreapp-Windows_NT-Release|Any CPU + {F9097917-AFA3-4E3E-A592-BFA2C483C7E2}.Debug|Any CPU.ActiveCfg = netcoreapp-Debug|Any CPU + {F9097917-AFA3-4E3E-A592-BFA2C483C7E2}.Debug|Any CPU.Build.0 = netcoreapp-Debug|Any CPU + {F9097917-AFA3-4E3E-A592-BFA2C483C7E2}.Release|Any CPU.ActiveCfg = netcoreapp-Release|Any CPU + {F9097917-AFA3-4E3E-A592-BFA2C483C7E2}.Release|Any CPU.Build.0 = netcoreapp-Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution - {543FBFE5-E9E4-4631-8242-911A707FE818} = {E107E9C1-E893-4E87-987E-04EF0DCEAEFD} - {4074AF8C-8C65-486C-960E-F45DAAB0BE0D} = {2E666815-2EDB-464B-9DF6-380BF4789AD4} + {315E3C60-A5D9-4F47-A940-D57395EED606} = {E107E9C1-E893-4E87-987E-04EF0DCEAEFD} + {F9097917-AFA3-4E3E-A592-BFA2C483C7E2} = {2E666815-2EDB-464B-9DF6-380BF4789AD4} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {2E88FB02-CE53-4D6E-8D60-CDCD578E1871} diff --git a/src/System.Runtime.Intrinsics/ref/System.Runtime.Intrinsics.csproj b/src/System.Runtime.Intrinsics/ref/System.Runtime.Intrinsics.csproj index b62e54d6c86a..e41aed2a41f9 100644 --- a/src/System.Runtime.Intrinsics/ref/System.Runtime.Intrinsics.csproj +++ b/src/System.Runtime.Intrinsics/ref/System.Runtime.Intrinsics.csproj @@ -2,7 +2,7 @@ true false - {4074AF8C-8C65-486C-960E-F45DAAB0BE0D} + {F9097917-AFA3-4E3E-A592-BFA2C483C7E2} netcoreapp-Debug;netcoreapp-Release @@ -11,4 +11,4 @@ - + \ No newline at end of file diff --git a/src/System.Runtime.Intrinsics/src/System.Runtime.Intrinsics.csproj b/src/System.Runtime.Intrinsics/src/System.Runtime.Intrinsics.csproj index 43d2b0633519..2200dd72f6cb 100644 --- a/src/System.Runtime.Intrinsics/src/System.Runtime.Intrinsics.csproj +++ b/src/System.Runtime.Intrinsics/src/System.Runtime.Intrinsics.csproj @@ -3,10 +3,10 @@ System.Runtime.Intrinsics true false - {543FBFE5-E9E4-4631-8242-911A707FE818} + {315E3C60-A5D9-4F47-A940-D57395EED606} netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release - + \ No newline at end of file diff --git a/src/System.Runtime.Loader/System.Runtime.Loader.sln b/src/System.Runtime.Loader/System.Runtime.Loader.sln index 9021aec59ec6..19034a6722fd 100644 --- a/src/System.Runtime.Loader/System.Runtime.Loader.sln +++ b/src/System.Runtime.Loader/System.Runtime.Loader.sln @@ -7,6 +7,11 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime.Loader.Tests {485A65F0-51C9-4B95-A7A8-A4860C231E67} = {485A65F0-51C9-4B95-A7A8-A4860C231E67} EndProjectSection EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime.Loader.Test.ContextualReflectionDependency", "tests\ContextualReflectionDependency\System.Runtime.Loader.Test.ContextualReflectionDependency.csproj", "{95DBE3B0-AA86-4366-BB8A-E04B534365F3}" + ProjectSection(ProjectDependencies) = postProject + {485A65F0-51C9-4B95-A7A8-A4860C231E67} = {485A65F0-51C9-4B95-A7A8-A4860C231E67} + EndProjectSection +EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime.Loader.DefaultContext.Tests", "tests\DefaultContext\System.Runtime.Loader.DefaultContext.Tests.csproj", "{701CB3BC-00DC-435D-BDE4-C5FC29A708A8}" ProjectSection(ProjectDependencies) = postProject {485A65F0-51C9-4B95-A7A8-A4860C231E67} = {485A65F0-51C9-4B95-A7A8-A4860C231E67} @@ -17,6 +22,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime.Loader.RefEm {485A65F0-51C9-4B95-A7A8-A4860C231E67} = {485A65F0-51C9-4B95-A7A8-A4860C231E67} EndProjectSection EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ReferencedClassLib", "tests\ReferencedClassLib\ReferencedClassLib.csproj", "{2CD5A44C-65B4-4C51-AC7B-B2938307848A}" + ProjectSection(ProjectDependencies) = postProject + {485A65F0-51C9-4B95-A7A8-A4860C231E67} = {485A65F0-51C9-4B95-A7A8-A4860C231E67} + EndProjectSection +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ReferencedClassLibNeutralIsSatellite", "tests\ReferencedClassLibNeutralIsSatellite\ReferencedClassLibNeutralIsSatellite.csproj", "{7FA764E6-47A3-42B5-923B-7D5DBC611E8E}" + ProjectSection(ProjectDependencies) = postProject + {485A65F0-51C9-4B95-A7A8-A4860C231E67} = {485A65F0-51C9-4B95-A7A8-A4860C231E67} + EndProjectSection +EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime.Loader.Noop.Assembly", "tests\System.Runtime.Loader.Noop.Assembly\System.Runtime.Loader.Noop.Assembly.csproj", "{396D6EBF-60BD-4DAF-8783-FB403E070A57}" ProjectSection(ProjectDependencies) = postProject {485A65F0-51C9-4B95-A7A8-A4860C231E67} = {485A65F0-51C9-4B95-A7A8-A4860C231E67} @@ -60,6 +75,10 @@ Global {701CB3BC-00DC-435D-BDE4-C5FC29A708A7}.Debug|Any CPU.Build.0 = netcoreapp-Windows_NT-Debug|Any CPU {701CB3BC-00DC-435D-BDE4-C5FC29A708A7}.Release|Any CPU.ActiveCfg = netcoreapp-Windows_NT-Release|Any CPU {701CB3BC-00DC-435D-BDE4-C5FC29A708A7}.Release|Any CPU.Build.0 = netcoreapp-Windows_NT-Release|Any CPU + {95DBE3B0-AA86-4366-BB8A-E04B534365F3}.Debug|Any CPU.ActiveCfg = netcoreapp-Debug|Any CPU + {95DBE3B0-AA86-4366-BB8A-E04B534365F3}.Debug|Any CPU.Build.0 = netcoreapp-Debug|Any CPU + {95DBE3B0-AA86-4366-BB8A-E04B534365F3}.Release|Any CPU.ActiveCfg = netcoreapp-Release|Any CPU + {95DBE3B0-AA86-4366-BB8A-E04B534365F3}.Release|Any CPU.Build.0 = netcoreapp-Release|Any CPU {701CB3BC-00DC-435D-BDE4-C5FC29A708A8}.Debug|Any CPU.ActiveCfg = netcoreapp-Debug|Any CPU {701CB3BC-00DC-435D-BDE4-C5FC29A708A8}.Debug|Any CPU.Build.0 = netcoreapp-Debug|Any CPU {701CB3BC-00DC-435D-BDE4-C5FC29A708A8}.Release|Any CPU.ActiveCfg = netcoreapp-Release|Any CPU @@ -68,6 +87,14 @@ Global {701CB3BC-00DC-435D-BDE4-C5FC29A708A9}.Debug|Any CPU.Build.0 = netcoreapp-Debug|Any CPU {701CB3BC-00DC-435D-BDE4-C5FC29A708A9}.Release|Any CPU.ActiveCfg = netcoreapp-Release|Any CPU {701CB3BC-00DC-435D-BDE4-C5FC29A708A9}.Release|Any CPU.Build.0 = netcoreapp-Release|Any CPU + {2CD5A44C-65B4-4C51-AC7B-B2938307848A}.Debug|Any CPU.ActiveCfg = netcoreapp-Debug|Any CPU + {2CD5A44C-65B4-4C51-AC7B-B2938307848A}.Debug|Any CPU.Build.0 = netcoreapp-Debug|Any CPU + {2CD5A44C-65B4-4C51-AC7B-B2938307848A}.Release|Any CPU.ActiveCfg = netcoreapp-Release|Any CPU + {2CD5A44C-65B4-4C51-AC7B-B2938307848A}.Release|Any CPU.Build.0 = netcoreapp-Release|Any CPU + {7FA764E6-47A3-42B5-923B-7D5DBC611E8E}.Debug|Any CPU.ActiveCfg = netcoreapp-Debug|Any CPU + {7FA764E6-47A3-42B5-923B-7D5DBC611E8E}.Debug|Any CPU.Build.0 = netcoreapp-Debug|Any CPU + {7FA764E6-47A3-42B5-923B-7D5DBC611E8E}.Release|Any CPU.ActiveCfg = netcoreapp-Release|Any CPU + {7FA764E6-47A3-42B5-923B-7D5DBC611E8E}.Release|Any CPU.Build.0 = netcoreapp-Release|Any CPU {396D6EBF-60BD-4DAF-8783-FB403E070A57}.Debug|Any CPU.ActiveCfg = netcoreapp-Debug|Any CPU {396D6EBF-60BD-4DAF-8783-FB403E070A57}.Debug|Any CPU.Build.0 = netcoreapp-Debug|Any CPU {396D6EBF-60BD-4DAF-8783-FB403E070A57}.Release|Any CPU.ActiveCfg = netcoreapp-Release|Any CPU @@ -98,8 +125,11 @@ Global EndGlobalSection GlobalSection(NestedProjects) = preSolution {701CB3BC-00DC-435D-BDE4-C5FC29A708A7} = {1A2F9F4A-A032-433E-B914-ADD5992BB178} + {95DBE3B0-AA86-4366-BB8A-E04B534365F3} = {1A2F9F4A-A032-433E-B914-ADD5992BB178} {701CB3BC-00DC-435D-BDE4-C5FC29A708A8} = {1A2F9F4A-A032-433E-B914-ADD5992BB178} {701CB3BC-00DC-435D-BDE4-C5FC29A708A9} = {1A2F9F4A-A032-433E-B914-ADD5992BB178} + {2CD5A44C-65B4-4C51-AC7B-B2938307848A} = {1A2F9F4A-A032-433E-B914-ADD5992BB178} + {7FA764E6-47A3-42B5-923B-7D5DBC611E8E} = {1A2F9F4A-A032-433E-B914-ADD5992BB178} {396D6EBF-60BD-4DAF-8783-FB403E070A57} = {1A2F9F4A-A032-433E-B914-ADD5992BB178} {E3C33774-AA3D-4CED-A7A6-BDF9A7F100DF} = {1A2F9F4A-A032-433E-B914-ADD5992BB178} {FBF73A8E-7889-4C7D-AFC3-509B821D0FC6} = {1A2F9F4A-A032-433E-B914-ADD5992BB178} diff --git a/src/System.Runtime.Serialization.Formatters/System.Runtime.Serialization.Formatters.sln b/src/System.Runtime.Serialization.Formatters/System.Runtime.Serialization.Formatters.sln index a8af9c9fd604..88724a83cbd7 100644 --- a/src/System.Runtime.Serialization.Formatters/System.Runtime.Serialization.Formatters.sln +++ b/src/System.Runtime.Serialization.Formatters/System.Runtime.Serialization.Formatters.sln @@ -26,14 +26,14 @@ Global Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {13CE5E71-D373-4EA6-B3CB-166FF089A42A}.Debug|Any CPU.ActiveCfg = netstandard-Debug|Any CPU - {13CE5E71-D373-4EA6-B3CB-166FF089A42A}.Debug|Any CPU.Build.0 = netstandard-Debug|Any CPU - {13CE5E71-D373-4EA6-B3CB-166FF089A42A}.Release|Any CPU.ActiveCfg = netstandard-Release|Any CPU - {13CE5E71-D373-4EA6-B3CB-166FF089A42A}.Release|Any CPU.Build.0 = netstandard-Release|Any CPU - {CF80D24A-787A-43DB-B9E7-10BCA02D10EA}.Debug|Any CPU.ActiveCfg = netcoreapp-Debug|Any CPU - {CF80D24A-787A-43DB-B9E7-10BCA02D10EA}.Debug|Any CPU.Build.0 = netcoreapp-Debug|Any CPU - {CF80D24A-787A-43DB-B9E7-10BCA02D10EA}.Release|Any CPU.ActiveCfg = netcoreapp-Release|Any CPU - {CF80D24A-787A-43DB-B9E7-10BCA02D10EA}.Release|Any CPU.Build.0 = netcoreapp-Release|Any CPU + {13CE5E71-D373-4EA6-B3CB-166FF089A42A}.Debug|Any CPU.ActiveCfg = netcoreapp-Debug|Any CPU + {13CE5E71-D373-4EA6-B3CB-166FF089A42A}.Debug|Any CPU.Build.0 = netcoreapp-Debug|Any CPU + {13CE5E71-D373-4EA6-B3CB-166FF089A42A}.Release|Any CPU.ActiveCfg = netcoreapp-Release|Any CPU + {13CE5E71-D373-4EA6-B3CB-166FF089A42A}.Release|Any CPU.Build.0 = netcoreapp-Release|Any CPU + {CF80D24A-787A-43DB-B9E7-10BCA02D10EA}.Debug|Any CPU.ActiveCfg = netcoreapp-Windows_NT-Debug|Any CPU + {CF80D24A-787A-43DB-B9E7-10BCA02D10EA}.Debug|Any CPU.Build.0 = netcoreapp-Windows_NT-Debug|Any CPU + {CF80D24A-787A-43DB-B9E7-10BCA02D10EA}.Release|Any CPU.ActiveCfg = netcoreapp-Windows_NT-Release|Any CPU + {CF80D24A-787A-43DB-B9E7-10BCA02D10EA}.Release|Any CPU.Build.0 = netcoreapp-Windows_NT-Release|Any CPU {4413B319-3D48-4516-A45B-375F4650EF0D}.Debug|Any CPU.ActiveCfg = netcoreapp-Debug|Any CPU {4413B319-3D48-4516-A45B-375F4650EF0D}.Debug|Any CPU.Build.0 = netcoreapp-Debug|Any CPU {4413B319-3D48-4516-A45B-375F4650EF0D}.Release|Any CPU.ActiveCfg = netcoreapp-Release|Any CPU diff --git a/src/System.Runtime/System.Runtime.sln b/src/System.Runtime/System.Runtime.sln index 72bd9a8bc687..d3a46cdb7efa 100644 --- a/src/System.Runtime/System.Runtime.sln +++ b/src/System.Runtime/System.Runtime.sln @@ -7,12 +7,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime.Tests", "tes {56B9D0A9-44D3-488E-8B42-C14A6E30CAB2} = {56B9D0A9-44D3-488E-8B42-C14A6E30CAB2} EndProjectSection EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ForwardedTypesAssembly", "tests\ForwardedTypesAssembly\ForwardedTypesAssembly.csproj", "{3A3DE9F8-6295-4B68-BAAB-406F1CA0CD9C}" - ProjectSection(ProjectDependencies) = postProject - {56B9D0A9-44D3-488E-8B42-C14A6E30CAB2} = {56B9D0A9-44D3-488E-8B42-C14A6E30CAB2} - EndProjectSection -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestAssembly", "tests\TestAssembly\TestAssembly.csproj", "{2EF7D710-A7BD-4BB3-8EF6-3F0298CD4986}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestCollectibleAssembly", "tests\TestCollectibleAssembly\TestCollectibleAssembly.csproj", "{F9C30DC5-30C1-45DA-9336-F7BE358C367C}" ProjectSection(ProjectDependencies) = postProject {56B9D0A9-44D3-488E-8B42-C14A6E30CAB2} = {56B9D0A9-44D3-488E-8B42-C14A6E30CAB2} EndProjectSection @@ -27,11 +22,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Reflection.TestModul {56B9D0A9-44D3-488E-8B42-C14A6E30CAB2} = {56B9D0A9-44D3-488E-8B42-C14A6E30CAB2} EndProjectSection EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "UnloadableAssembly", "tests\UnloadableAssembly\UnloadableAssembly.csproj", "{CA43AAD6-59A6-4BEB-AC9E-52DC9FD04B8B}" - ProjectSection(ProjectDependencies) = postProject - {56B9D0A9-44D3-488E-8B42-C14A6E30CAB2} = {56B9D0A9-44D3-488E-8B42-C14A6E30CAB2} - EndProjectSection -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime", "src\System.Runtime.csproj", "{56B9D0A9-44D3-488E-8B42-C14A6E30CAB2}" ProjectSection(ProjectDependencies) = postProject {ADBCF120-3454-4A3C-9D1D-AC4293E795D6} = {ADBCF120-3454-4A3C-9D1D-AC4293E795D6} @@ -51,30 +41,22 @@ Global Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {B1BF7CE0-CAB5-4FA2-A39C-450B05D5DB1C}.Debug|Any CPU.ActiveCfg = netcoreapp-Debug|Any CPU - {B1BF7CE0-CAB5-4FA2-A39C-450B05D5DB1C}.Debug|Any CPU.Build.0 = netcoreapp-Debug|Any CPU - {B1BF7CE0-CAB5-4FA2-A39C-450B05D5DB1C}.Release|Any CPU.ActiveCfg = netcoreapp-Release|Any CPU - {B1BF7CE0-CAB5-4FA2-A39C-450B05D5DB1C}.Release|Any CPU.Build.0 = netcoreapp-Release|Any CPU - {3A3DE9F8-6295-4B68-BAAB-406F1CA0CD9C}.Debug|Any CPU.ActiveCfg = netstandard-Debug|Any CPU - {3A3DE9F8-6295-4B68-BAAB-406F1CA0CD9C}.Debug|Any CPU.Build.0 = netstandard-Debug|Any CPU - {3A3DE9F8-6295-4B68-BAAB-406F1CA0CD9C}.Release|Any CPU.ActiveCfg = netstandard-Release|Any CPU - {3A3DE9F8-6295-4B68-BAAB-406F1CA0CD9C}.Release|Any CPU.Build.0 = netstandard-Release|Any CPU - {2EF7D710-A7BD-4BB3-8EF6-3F0298CD4986}.Debug|Any CPU.ActiveCfg = netstandard-Debug|Any CPU - {2EF7D710-A7BD-4BB3-8EF6-3F0298CD4986}.Debug|Any CPU.Build.0 = netstandard-Debug|Any CPU - {2EF7D710-A7BD-4BB3-8EF6-3F0298CD4986}.Release|Any CPU.ActiveCfg = netstandard-Release|Any CPU - {2EF7D710-A7BD-4BB3-8EF6-3F0298CD4986}.Release|Any CPU.Build.0 = netstandard-Release|Any CPU + {B1BF7CE0-CAB5-4FA2-A39C-450B05D5DB1C}.Debug|Any CPU.ActiveCfg = netcoreapp-Windows_NT-Debug|Any CPU + {B1BF7CE0-CAB5-4FA2-A39C-450B05D5DB1C}.Debug|Any CPU.Build.0 = netcoreapp-Windows_NT-Debug|Any CPU + {B1BF7CE0-CAB5-4FA2-A39C-450B05D5DB1C}.Release|Any CPU.ActiveCfg = netcoreapp-Windows_NT-Release|Any CPU + {B1BF7CE0-CAB5-4FA2-A39C-450B05D5DB1C}.Release|Any CPU.Build.0 = netcoreapp-Windows_NT-Release|Any CPU + {F9C30DC5-30C1-45DA-9336-F7BE358C367C}.Debug|Any CPU.ActiveCfg = netstandard-Debug|Any CPU + {F9C30DC5-30C1-45DA-9336-F7BE358C367C}.Debug|Any CPU.Build.0 = netstandard-Debug|Any CPU + {F9C30DC5-30C1-45DA-9336-F7BE358C367C}.Release|Any CPU.ActiveCfg = netstandard-Release|Any CPU + {F9C30DC5-30C1-45DA-9336-F7BE358C367C}.Release|Any CPU.Build.0 = netstandard-Release|Any CPU {71DE1A1F-F8E2-452A-9D54-0385F6099DD3}.Debug|Any CPU.ActiveCfg = netstandard-Debug|Any CPU {71DE1A1F-F8E2-452A-9D54-0385F6099DD3}.Debug|Any CPU.Build.0 = netstandard-Debug|Any CPU {71DE1A1F-F8E2-452A-9D54-0385F6099DD3}.Release|Any CPU.ActiveCfg = netstandard-Release|Any CPU {71DE1A1F-F8E2-452A-9D54-0385F6099DD3}.Release|Any CPU.Build.0 = netstandard-Release|Any CPU - {3B7489C4-65DB-4E69-BE01-F6234133400C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {3B7489C4-65DB-4E69-BE01-F6234133400C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {3B7489C4-65DB-4E69-BE01-F6234133400C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {3B7489C4-65DB-4E69-BE01-F6234133400C}.Release|Any CPU.Build.0 = Release|Any CPU - {CA43AAD6-59A6-4BEB-AC9E-52DC9FD04B8B}.Debug|Any CPU.ActiveCfg = netstandard-Debug|Any CPU - {CA43AAD6-59A6-4BEB-AC9E-52DC9FD04B8B}.Debug|Any CPU.Build.0 = netstandard-Debug|Any CPU - {CA43AAD6-59A6-4BEB-AC9E-52DC9FD04B8B}.Release|Any CPU.ActiveCfg = netstandard-Release|Any CPU - {CA43AAD6-59A6-4BEB-AC9E-52DC9FD04B8B}.Release|Any CPU.Build.0 = netstandard-Release|Any CPU + {3B7489C4-65DB-4E69-BE01-F6234133400C}.Debug|Any CPU.ActiveCfg = netstandard-Debug|Any CPU + {3B7489C4-65DB-4E69-BE01-F6234133400C}.Debug|Any CPU.Build.0 = netstandard-Debug|Any CPU + {3B7489C4-65DB-4E69-BE01-F6234133400C}.Release|Any CPU.ActiveCfg = netstandard-Release|Any CPU + {3B7489C4-65DB-4E69-BE01-F6234133400C}.Release|Any CPU.Build.0 = netstandard-Release|Any CPU {56B9D0A9-44D3-488E-8B42-C14A6E30CAB2}.Debug|Any CPU.ActiveCfg = netcoreapp-Windows_NT-Debug|Any CPU {56B9D0A9-44D3-488E-8B42-C14A6E30CAB2}.Debug|Any CPU.Build.0 = netcoreapp-Windows_NT-Debug|Any CPU {56B9D0A9-44D3-488E-8B42-C14A6E30CAB2}.Release|Any CPU.ActiveCfg = netcoreapp-Windows_NT-Release|Any CPU @@ -89,11 +71,9 @@ Global EndGlobalSection GlobalSection(NestedProjects) = preSolution {B1BF7CE0-CAB5-4FA2-A39C-450B05D5DB1C} = {1A2F9F4A-A032-433E-B914-ADD5992BB178} - {3A3DE9F8-6295-4B68-BAAB-406F1CA0CD9C} = {1A2F9F4A-A032-433E-B914-ADD5992BB178} - {2EF7D710-A7BD-4BB3-8EF6-3F0298CD4986} = {1A2F9F4A-A032-433E-B914-ADD5992BB178} + {F9C30DC5-30C1-45DA-9336-F7BE358C367C} = {1A2F9F4A-A032-433E-B914-ADD5992BB178} {71DE1A1F-F8E2-452A-9D54-0385F6099DD3} = {1A2F9F4A-A032-433E-B914-ADD5992BB178} {3B7489C4-65DB-4E69-BE01-F6234133400C} = {1A2F9F4A-A032-433E-B914-ADD5992BB178} - {CA43AAD6-59A6-4BEB-AC9E-52DC9FD04B8B} = {1A2F9F4A-A032-433E-B914-ADD5992BB178} {56B9D0A9-44D3-488E-8B42-C14A6E30CAB2} = {E107E9C1-E893-4E87-987E-04EF0DCEAEFD} {ADBCF120-3454-4A3C-9D1D-AC4293E795D6} = {2E666815-2EDB-464B-9DF6-380BF4789AD4} EndGlobalSection diff --git a/src/System.Runtime/tests/System.Runtime.Tests.csproj b/src/System.Runtime/tests/System.Runtime.Tests.csproj index 53a45b1ba1de..b6bac3673ed2 100644 --- a/src/System.Runtime/tests/System.Runtime.Tests.csproj +++ b/src/System.Runtime/tests/System.Runtime.Tests.csproj @@ -5,7 +5,7 @@ 1718 true true - netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release;netstandard-Debug;netstandard-Release;uap-Debug;uap-Release;uapaot-Debug;uapaot-Release + netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netfx-Debug;netfx-Release;netstandard-Debug;netstandard-Release;uap-Debug;uap-Release;uapaot-Debug;uapaot-Release @@ -272,7 +272,8 @@ - + + diff --git a/src/System.Runtime/tests/TestCollectibleAssembly/TestCollectibleAssembly.csproj b/src/System.Runtime/tests/TestCollectibleAssembly/TestCollectibleAssembly.csproj index 4de809ee74c1..7b5a70d6cb9a 100644 --- a/src/System.Runtime/tests/TestCollectibleAssembly/TestCollectibleAssembly.csproj +++ b/src/System.Runtime/tests/TestCollectibleAssembly/TestCollectibleAssembly.csproj @@ -4,6 +4,9 @@ 1.0.0.0 netstandard-Debug;netstandard-Release + + {F9C30DC5-30C1-45DA-9336-F7BE358C367C} + diff --git a/src/System.Runtime/tests/TestModule/System.Reflection.TestModule.ilproj b/src/System.Runtime/tests/TestModule/System.Reflection.TestModule.ilproj index 9ddba33c62f4..d8853323ee55 100644 --- a/src/System.Runtime/tests/TestModule/System.Reflection.TestModule.ilproj +++ b/src/System.Runtime/tests/TestModule/System.Reflection.TestModule.ilproj @@ -2,7 +2,7 @@ 1.0.0.0 {3B7489C4-65DB-4E69-BE01-F6234133400C} - Debug;Release + netstandard-Debug;netstandard-Release Microsoft diff --git a/src/System.Security.AccessControl/System.Security.AccessControl.sln b/src/System.Security.AccessControl/System.Security.AccessControl.sln index b092b3c153ee..80ad7faee2f5 100644 --- a/src/System.Security.AccessControl/System.Security.AccessControl.sln +++ b/src/System.Security.AccessControl/System.Security.AccessControl.sln @@ -34,10 +34,10 @@ Global {D27FFA1F-B446-4D24-B60A-1F88385CDB6D}.Debug|Any CPU.Build.0 = netcoreapp-Windows_NT-Debug|Any CPU {D27FFA1F-B446-4D24-B60A-1F88385CDB6D}.Release|Any CPU.ActiveCfg = netcoreapp-Windows_NT-Release|Any CPU {D27FFA1F-B446-4D24-B60A-1F88385CDB6D}.Release|Any CPU.Build.0 = netcoreapp-Windows_NT-Release|Any CPU - {F80C478C-48EE-46A5-89C4-EE0CFB23A14F}.Debug|Any CPU.ActiveCfg = netstandard-Debug|Any CPU - {F80C478C-48EE-46A5-89C4-EE0CFB23A14F}.Debug|Any CPU.Build.0 = netstandard-Debug|Any CPU - {F80C478C-48EE-46A5-89C4-EE0CFB23A14F}.Release|Any CPU.ActiveCfg = netstandard-Release|Any CPU - {F80C478C-48EE-46A5-89C4-EE0CFB23A14F}.Release|Any CPU.Build.0 = netstandard-Release|Any CPU + {F80C478C-48EE-46A5-89C4-EE0CFB23A14F}.Debug|Any CPU.ActiveCfg = netcoreapp-Debug|Any CPU + {F80C478C-48EE-46A5-89C4-EE0CFB23A14F}.Debug|Any CPU.Build.0 = netcoreapp-Debug|Any CPU + {F80C478C-48EE-46A5-89C4-EE0CFB23A14F}.Release|Any CPU.ActiveCfg = netcoreapp-Release|Any CPU + {F80C478C-48EE-46A5-89C4-EE0CFB23A14F}.Release|Any CPU.Build.0 = netcoreapp-Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/src/System.Security.AccessControl/ref/System.Security.AccessControl.csproj b/src/System.Security.AccessControl/ref/System.Security.AccessControl.csproj index 4faf40299e14..8a150b127043 100644 --- a/src/System.Security.AccessControl/ref/System.Security.AccessControl.csproj +++ b/src/System.Security.AccessControl/ref/System.Security.AccessControl.csproj @@ -5,7 +5,7 @@ 4.1.1.0 - net461-Debug;net461-Release;netfx-Debug;netfx-Release;netstandard-Debug;netstandard-Release;netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release + net461-Debug;net461-Release;netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release;netstandard-Debug;netstandard-Release;uap-Debug;uap-Release diff --git a/src/System.Security.Permissions/System.Security.Permissions.sln b/src/System.Security.Permissions/System.Security.Permissions.sln index fb0de41fa900..a6f26421d191 100644 --- a/src/System.Security.Permissions/System.Security.Permissions.sln +++ b/src/System.Security.Permissions/System.Security.Permissions.sln @@ -30,14 +30,14 @@ Global {7517F1E9-EEB4-4676-A054-CE4A44A66B66}.Debug|Any CPU.Build.0 = netstandard-Debug|Any CPU {7517F1E9-EEB4-4676-A054-CE4A44A66B66}.Release|Any CPU.ActiveCfg = netstandard-Release|Any CPU {7517F1E9-EEB4-4676-A054-CE4A44A66B66}.Release|Any CPU.Build.0 = netstandard-Release|Any CPU - {07390899-C8F6-4E83-A3A9-6867B8CB46A0}.Debug|Any CPU.ActiveCfg = netstandard-Debug|Any CPU - {07390899-C8F6-4E83-A3A9-6867B8CB46A0}.Debug|Any CPU.Build.0 = netstandard-Debug|Any CPU - {07390899-C8F6-4E83-A3A9-6867B8CB46A0}.Release|Any CPU.ActiveCfg = netstandard-Release|Any CPU - {07390899-C8F6-4E83-A3A9-6867B8CB46A0}.Release|Any CPU.Build.0 = netstandard-Release|Any CPU - {07CAF142-B259-418E-86EF-C4BD8B50253E}.Debug|Any CPU.ActiveCfg = netstandard-Debug|Any CPU - {07CAF142-B259-418E-86EF-C4BD8B50253E}.Debug|Any CPU.Build.0 = netstandard-Debug|Any CPU - {07CAF142-B259-418E-86EF-C4BD8B50253E}.Release|Any CPU.ActiveCfg = netstandard-Release|Any CPU - {07CAF142-B259-418E-86EF-C4BD8B50253E}.Release|Any CPU.Build.0 = netstandard-Release|Any CPU + {07390899-C8F6-4E83-A3A9-6867B8CB46A0}.Debug|Any CPU.ActiveCfg = netcoreapp-Debug|Any CPU + {07390899-C8F6-4E83-A3A9-6867B8CB46A0}.Debug|Any CPU.Build.0 = netcoreapp-Debug|Any CPU + {07390899-C8F6-4E83-A3A9-6867B8CB46A0}.Release|Any CPU.ActiveCfg = netcoreapp-Release|Any CPU + {07390899-C8F6-4E83-A3A9-6867B8CB46A0}.Release|Any CPU.Build.0 = netcoreapp-Release|Any CPU + {07CAF142-B259-418E-86EF-C4BD8B50253E}.Debug|Any CPU.ActiveCfg = netcoreapp-Debug|Any CPU + {07CAF142-B259-418E-86EF-C4BD8B50253E}.Debug|Any CPU.Build.0 = netcoreapp-Debug|Any CPU + {07CAF142-B259-418E-86EF-C4BD8B50253E}.Release|Any CPU.ActiveCfg = netcoreapp-Release|Any CPU + {07CAF142-B259-418E-86EF-C4BD8B50253E}.Release|Any CPU.Build.0 = netcoreapp-Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/src/System.Security.Permissions/ref/System.Security.Permissions.csproj b/src/System.Security.Permissions/ref/System.Security.Permissions.csproj index bcce80b0f88c..b69ad780bb16 100644 --- a/src/System.Security.Permissions/ref/System.Security.Permissions.csproj +++ b/src/System.Security.Permissions/ref/System.Security.Permissions.csproj @@ -2,7 +2,7 @@ {07CAF142-B259-418E-86EF-C4BD8B50253E} true - net461-Debug;net461-Release;netfx-Debug;netfx-Release;netstandard-Debug;netstandard-Release;netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release + net461-Debug;net461-Release;netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release;netstandard-Debug;netstandard-Release;uap-Debug;uap-Release diff --git a/src/System.Security.Permissions/src/System.Security.Permissions.csproj b/src/System.Security.Permissions/src/System.Security.Permissions.csproj index a9de940dc6a5..f2eaa0334bf6 100644 --- a/src/System.Security.Permissions/src/System.Security.Permissions.csproj +++ b/src/System.Security.Permissions/src/System.Security.Permissions.csproj @@ -4,7 +4,7 @@ System.Security.Permissions System.Security.Permissions true - net461-Debug;net461-Release;netfx-Debug;netfx-Release;netstandard-Debug;netstandard-Release;netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release + net461-Debug;net461-Release;netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release;netstandard-Debug;netstandard-Release;uap-Debug;uap-Release diff --git a/src/System.Security.Principal.Windows/System.Security.Principal.Windows.sln b/src/System.Security.Principal.Windows/System.Security.Principal.Windows.sln index 1cc5f37b0570..c011887fed58 100644 --- a/src/System.Security.Principal.Windows/System.Security.Principal.Windows.sln +++ b/src/System.Security.Principal.Windows/System.Security.Principal.Windows.sln @@ -34,10 +34,10 @@ Global {F9E9894E-2513-4085-9046-311AD49D8AE6}.Debug|Any CPU.Build.0 = netcoreapp-Windows_NT-Debug|Any CPU {F9E9894E-2513-4085-9046-311AD49D8AE6}.Release|Any CPU.ActiveCfg = netcoreapp-Windows_NT-Release|Any CPU {F9E9894E-2513-4085-9046-311AD49D8AE6}.Release|Any CPU.Build.0 = netcoreapp-Windows_NT-Release|Any CPU - {25A02E40-D12C-4184-B599-E4F954D142DB}.Debug|Any CPU.ActiveCfg = netstandard-Debug|Any CPU - {25A02E40-D12C-4184-B599-E4F954D142DB}.Debug|Any CPU.Build.0 = netstandard-Debug|Any CPU - {25A02E40-D12C-4184-B599-E4F954D142DB}.Release|Any CPU.ActiveCfg = netstandard-Release|Any CPU - {25A02E40-D12C-4184-B599-E4F954D142DB}.Release|Any CPU.Build.0 = netstandard-Release|Any CPU + {25A02E40-D12C-4184-B599-E4F954D142DB}.Debug|Any CPU.ActiveCfg = netcoreapp-Debug|Any CPU + {25A02E40-D12C-4184-B599-E4F954D142DB}.Debug|Any CPU.Build.0 = netcoreapp-Debug|Any CPU + {25A02E40-D12C-4184-B599-E4F954D142DB}.Release|Any CPU.ActiveCfg = netcoreapp-Release|Any CPU + {25A02E40-D12C-4184-B599-E4F954D142DB}.Release|Any CPU.Build.0 = netcoreapp-Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/src/System.Security.Principal.Windows/ref/System.Security.Principal.Windows.csproj b/src/System.Security.Principal.Windows/ref/System.Security.Principal.Windows.csproj index 94176310f03d..a4ef0042bcf5 100644 --- a/src/System.Security.Principal.Windows/ref/System.Security.Principal.Windows.csproj +++ b/src/System.Security.Principal.Windows/ref/System.Security.Principal.Windows.csproj @@ -5,7 +5,7 @@ 4.1.1.0 - net461-Debug;net461-Release;netfx-Debug;netfx-Release;netstandard-Debug;netstandard-Release;netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release + net461-Debug;net461-Release;netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release;netstandard-Debug;netstandard-Release;uap-Debug;uap-Release diff --git a/src/System.Security.Principal/System.Security.Principal.sln b/src/System.Security.Principal/System.Security.Principal.sln index 9cd9b8e54e01..42f7fb562836 100644 --- a/src/System.Security.Principal/System.Security.Principal.sln +++ b/src/System.Security.Principal/System.Security.Principal.sln @@ -19,10 +19,10 @@ Global Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {FBE16BC8-AE2D-422C-861E-861814F53AF7}.Debug|Any CPU.ActiveCfg = netcoreapp-Debug|Any CPU - {FBE16BC8-AE2D-422C-861E-861814F53AF7}.Debug|Any CPU.Build.0 = netcoreapp-Debug|Any CPU - {FBE16BC8-AE2D-422C-861E-861814F53AF7}.Release|Any CPU.ActiveCfg = netcoreapp-Release|Any CPU - {FBE16BC8-AE2D-422C-861E-861814F53AF7}.Release|Any CPU.Build.0 = netcoreapp-Release|Any CPU + {FBE16BC8-AE2D-422C-861E-861814F53AF7}.Debug|Any CPU.ActiveCfg = netcoreapp-Windows_NT-Debug|Any CPU + {FBE16BC8-AE2D-422C-861E-861814F53AF7}.Debug|Any CPU.Build.0 = netcoreapp-Windows_NT-Debug|Any CPU + {FBE16BC8-AE2D-422C-861E-861814F53AF7}.Release|Any CPU.ActiveCfg = netcoreapp-Windows_NT-Release|Any CPU + {FBE16BC8-AE2D-422C-861E-861814F53AF7}.Release|Any CPU.Build.0 = netcoreapp-Windows_NT-Release|Any CPU {06ECBECD-4100-474D-8F3C-21A0F66A92A6}.Debug|Any CPU.ActiveCfg = netcoreapp-Debug|Any CPU {06ECBECD-4100-474D-8F3C-21A0F66A92A6}.Debug|Any CPU.Build.0 = netcoreapp-Debug|Any CPU {06ECBECD-4100-474D-8F3C-21A0F66A92A6}.Release|Any CPU.ActiveCfg = netcoreapp-Release|Any CPU diff --git a/src/System.Security.Principal/src/System.Security.Principal.csproj b/src/System.Security.Principal/src/System.Security.Principal.csproj index 2f42330e17da..c4d987339a3a 100644 --- a/src/System.Security.Principal/src/System.Security.Principal.csproj +++ b/src/System.Security.Principal/src/System.Security.Principal.csproj @@ -4,7 +4,7 @@ {FBE16BC8-AE2D-422C-861E-861814F53AF7} true true - netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netcoreapp-Unix-Debug;netcoreapp-Unix-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release;uapaot-Windows_NT-Debug;uapaot-Windows_NT-Release + netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release;uapaot-Windows_NT-Debug;uapaot-Windows_NT-Release @@ -14,4 +14,4 @@ - + \ No newline at end of file diff --git a/src/System.Text.Encoding.Extensions/src/System.Text.Encoding.Extensions.csproj b/src/System.Text.Encoding.Extensions/src/System.Text.Encoding.Extensions.csproj index 066bab06c9e0..d9f78d1f9b48 100644 --- a/src/System.Text.Encoding.Extensions/src/System.Text.Encoding.Extensions.csproj +++ b/src/System.Text.Encoding.Extensions/src/System.Text.Encoding.Extensions.csproj @@ -3,7 +3,7 @@ System.Text.Encoding.Extensions true {72BFA60D-4F91-4F84-AC6A-910B587DA1BF} - netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release + netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release;uapaot-Windows_NT-Debug;uapaot-Windows_NT-Release diff --git a/src/System.Text.Encodings.Web/System.Text.Encodings.Web.sln b/src/System.Text.Encodings.Web/System.Text.Encodings.Web.sln index 4e6317cc01ac..77828d5bd91d 100644 --- a/src/System.Text.Encodings.Web/System.Text.Encodings.Web.sln +++ b/src/System.Text.Encodings.Web/System.Text.Encodings.Web.sln @@ -1,6 +1,6 @@ Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.28829.227 +# Visual Studio 15 +VisualStudioVersion = 15.0.27213.1 MinimumVisualStudioVersion = 10.0.40219.1 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Encodings.Web.Tests", "tests\System.Text.Encodings.Web.Tests.csproj", "{2337A55E-7077-4FBE-8132-2CD8DDC18671}" ProjectSection(ProjectDependencies) = postProject @@ -8,14 +8,17 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Encodings.Web.T EndProjectSection EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Encodings.Web", "src\System.Text.Encodings.Web.csproj", "{B7EDBF00-765A-48E8-B593-CD668288E274}" + ProjectSection(ProjectDependencies) = postProject + {41648C6D-D431-478D-8228-7EB68714541C} = {41648C6D-D431-478D-8228-7EB68714541C} + EndProjectSection +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Encodings.Web", "ref\System.Text.Encodings.Web.csproj", "{41648C6D-D431-478D-8228-7EB68714541C}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{1A2F9F4A-A032-433E-B914-ADD5992BB178}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{E107E9C1-E893-4E87-987E-04EF0DCEAEFD}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{E70569F3-C1DA-4EDE-A850-328BDBFDC59A}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Encodings.Web", "ref\System.Text.Encodings.Web.csproj", "{41648C6D-D431-478D-8228-7EB68714541C}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{2E666815-2EDB-464B-9DF6-380BF4789AD4}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -42,7 +45,7 @@ Global GlobalSection(NestedProjects) = preSolution {2337A55E-7077-4FBE-8132-2CD8DDC18671} = {1A2F9F4A-A032-433E-B914-ADD5992BB178} {B7EDBF00-765A-48E8-B593-CD668288E274} = {E107E9C1-E893-4E87-987E-04EF0DCEAEFD} - {41648C6D-D431-478D-8228-7EB68714541C} = {E70569F3-C1DA-4EDE-A850-328BDBFDC59A} + {41648C6D-D431-478D-8228-7EB68714541C} = {2E666815-2EDB-464B-9DF6-380BF4789AD4} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {2EFFAFC0-87C3-45D1-88AF-35F0AC866D70} diff --git a/src/System.Text.Encodings.Web/src/System.Text.Encodings.Web.csproj b/src/System.Text.Encodings.Web/src/System.Text.Encodings.Web.csproj index d3ba7317ac24..14b954253e3e 100644 --- a/src/System.Text.Encodings.Web/src/System.Text.Encodings.Web.csproj +++ b/src/System.Text.Encodings.Web/src/System.Text.Encodings.Web.csproj @@ -3,7 +3,7 @@ {B7EDBF00-765A-48E8-B593-CD668288E274} System.Text.Encodings.Web true - netstandard-Debug;netstandard-Release;netcoreapp-Debug;netcoreapp-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release + netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release diff --git a/src/System.Text.Encodings.Web/tests/System.Text.Encodings.Web.Tests.csproj b/src/System.Text.Encodings.Web/tests/System.Text.Encodings.Web.Tests.csproj index cd7f153ceb55..7a3d6f4b7aa0 100644 --- a/src/System.Text.Encodings.Web/tests/System.Text.Encodings.Web.Tests.csproj +++ b/src/System.Text.Encodings.Web/tests/System.Text.Encodings.Web.Tests.csproj @@ -6,7 +6,7 @@ $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages ..\..\ true - netstandard-Debug;netstandard-Release;netcoreapp-Debug;netcoreapp-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release + netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release diff --git a/src/System.Text.Json/System.Text.Json.sln b/src/System.Text.Json/System.Text.Json.sln index 7519faffb15a..f6b7bc206d01 100644 --- a/src/System.Text.Json/System.Text.Json.sln +++ b/src/System.Text.Json/System.Text.Json.sln @@ -9,10 +9,10 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json.Tests", "t EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json", "src\System.Text.Json.csproj", "{79E7EE4E-E8DF-4D67-B103-6930DAAF6EF4}" ProjectSection(ProjectDependencies) = postProject - {6371299B-8F39-4A0A-A9CD-70F80FF205F6} = {6371299B-8F39-4A0A-A9CD-70F80FF205F6} + {9F155052-2DDE-4DBD-9F31-ADB45C9FE628} = {9F155052-2DDE-4DBD-9F31-ADB45C9FE628} EndProjectSection EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json", "ref\System.Text.Json.csproj", "{6371299B-8F39-4A0A-A9CD-70F80FF205F6}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json", "ref\System.Text.Json.csproj", "{9F155052-2DDE-4DBD-9F31-ADB45C9FE628}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{1A2F9F4A-A032-433E-B914-ADD5992BB178}" EndProject @@ -34,10 +34,10 @@ Global {79E7EE4E-E8DF-4D67-B103-6930DAAF6EF4}.Debug|Any CPU.Build.0 = netcoreapp-Debug|Any CPU {79E7EE4E-E8DF-4D67-B103-6930DAAF6EF4}.Release|Any CPU.ActiveCfg = netcoreapp-Release|Any CPU {79E7EE4E-E8DF-4D67-B103-6930DAAF6EF4}.Release|Any CPU.Build.0 = netcoreapp-Release|Any CPU - {6371299B-8F39-4A0A-A9CD-70F80FF205F6}.Debug|Any CPU.ActiveCfg = netcoreapp-Debug|Any CPU - {6371299B-8F39-4A0A-A9CD-70F80FF205F6}.Debug|Any CPU.Build.0 = netcoreapp-Debug|Any CPU - {6371299B-8F39-4A0A-A9CD-70F80FF205F6}.Release|Any CPU.ActiveCfg = netcoreapp-Release|Any CPU - {6371299B-8F39-4A0A-A9CD-70F80FF205F6}.Release|Any CPU.Build.0 = netcoreapp-Release|Any CPU + {9F155052-2DDE-4DBD-9F31-ADB45C9FE628}.Debug|Any CPU.ActiveCfg = netcoreapp-Debug|Any CPU + {9F155052-2DDE-4DBD-9F31-ADB45C9FE628}.Debug|Any CPU.Build.0 = netcoreapp-Debug|Any CPU + {9F155052-2DDE-4DBD-9F31-ADB45C9FE628}.Release|Any CPU.ActiveCfg = netcoreapp-Release|Any CPU + {9F155052-2DDE-4DBD-9F31-ADB45C9FE628}.Release|Any CPU.Build.0 = netcoreapp-Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -45,7 +45,7 @@ Global GlobalSection(NestedProjects) = preSolution {5F553243-042C-45C0-8E49-C739131E11C3} = {1A2F9F4A-A032-433E-B914-ADD5992BB178} {79E7EE4E-E8DF-4D67-B103-6930DAAF6EF4} = {E107E9C1-E893-4E87-987E-04EF0DCEAEFD} - {6371299B-8F39-4A0A-A9CD-70F80FF205F6} = {2E666815-2EDB-464B-9DF6-380BF4789AD4} + {9F155052-2DDE-4DBD-9F31-ADB45C9FE628} = {2E666815-2EDB-464B-9DF6-380BF4789AD4} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {F758B7B4-BD9F-4228-A700-5D94D738E7FE} diff --git a/src/System.Text.Json/ref/System.Text.Json.csproj b/src/System.Text.Json/ref/System.Text.Json.csproj index 60c31da2718b..8049bab3a71a 100644 --- a/src/System.Text.Json/ref/System.Text.Json.csproj +++ b/src/System.Text.Json/ref/System.Text.Json.csproj @@ -1,6 +1,6 @@  - {6371299B-8F39-4A0A-A9CD-70F80FF205F6} + {9F155052-2DDE-4DBD-9F31-ADB45C9FE628} netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release;uap-Debug;uap-Release diff --git a/src/System.Threading.Channels/System.Threading.Channels.sln b/src/System.Threading.Channels/System.Threading.Channels.sln index 93cfbdea9b0f..c3dffb24aeac 100644 --- a/src/System.Threading.Channels/System.Threading.Channels.sln +++ b/src/System.Threading.Channels/System.Threading.Channels.sln @@ -26,18 +26,18 @@ Global Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {1AF01469-DBFC-4BA1-9331-8E39AA639FEE}.Debug|Any CPU.ActiveCfg = netstandard-Debug|Any CPU - {1AF01469-DBFC-4BA1-9331-8E39AA639FEE}.Debug|Any CPU.Build.0 = netstandard-Debug|Any CPU - {1AF01469-DBFC-4BA1-9331-8E39AA639FEE}.Release|Any CPU.ActiveCfg = netstandard-Release|Any CPU - {1AF01469-DBFC-4BA1-9331-8E39AA639FEE}.Release|Any CPU.Build.0 = netstandard-Release|Any CPU + {1AF01469-DBFC-4BA1-9331-8E39AA639FEE}.Debug|Any CPU.ActiveCfg = netcoreapp-Debug|Any CPU + {1AF01469-DBFC-4BA1-9331-8E39AA639FEE}.Debug|Any CPU.Build.0 = netcoreapp-Debug|Any CPU + {1AF01469-DBFC-4BA1-9331-8E39AA639FEE}.Release|Any CPU.ActiveCfg = netcoreapp-Release|Any CPU + {1AF01469-DBFC-4BA1-9331-8E39AA639FEE}.Release|Any CPU.Build.0 = netcoreapp-Release|Any CPU {AAADA5D3-CF64-4E9D-943C-EFDC006D6366}.Debug|Any CPU.ActiveCfg = netcoreapp-Debug|Any CPU {AAADA5D3-CF64-4E9D-943C-EFDC006D6366}.Debug|Any CPU.Build.0 = netcoreapp-Debug|Any CPU {AAADA5D3-CF64-4E9D-943C-EFDC006D6366}.Release|Any CPU.ActiveCfg = netcoreapp-Release|Any CPU {AAADA5D3-CF64-4E9D-943C-EFDC006D6366}.Release|Any CPU.Build.0 = netcoreapp-Release|Any CPU - {97DB4782-7AB3-4F4C-B716-CF722A0E6066}.Debug|Any CPU.ActiveCfg = netstandard-Debug|Any CPU - {97DB4782-7AB3-4F4C-B716-CF722A0E6066}.Debug|Any CPU.Build.0 = netstandard-Debug|Any CPU - {97DB4782-7AB3-4F4C-B716-CF722A0E6066}.Release|Any CPU.ActiveCfg = netstandard-Release|Any CPU - {97DB4782-7AB3-4F4C-B716-CF722A0E6066}.Release|Any CPU.Build.0 = netstandard-Release|Any CPU + {97DB4782-7AB3-4F4C-B716-CF722A0E6066}.Debug|Any CPU.ActiveCfg = netcoreapp-Debug|Any CPU + {97DB4782-7AB3-4F4C-B716-CF722A0E6066}.Debug|Any CPU.Build.0 = netcoreapp-Debug|Any CPU + {97DB4782-7AB3-4F4C-B716-CF722A0E6066}.Release|Any CPU.ActiveCfg = netcoreapp-Release|Any CPU + {97DB4782-7AB3-4F4C-B716-CF722A0E6066}.Release|Any CPU.Build.0 = netcoreapp-Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/src/System.Threading.Channels/src/System.Threading.Channels.csproj b/src/System.Threading.Channels/src/System.Threading.Channels.csproj index b7fa28177d97..c5d800ebf5c6 100644 --- a/src/System.Threading.Channels/src/System.Threading.Channels.csproj +++ b/src/System.Threading.Channels/src/System.Threading.Channels.csproj @@ -2,7 +2,7 @@ {AAADA5D3-CF64-4E9D-943C-EFDC006D6366} System.Threading.Channels - netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release;netstandard1.3-Debug;netstandard1.3-Release + netcoreapp-Debug;netcoreapp-Debug;netcoreapp-Release;netcoreapp-Release;netstandard-Debug;netstandard-Release;netstandard1.3-Debug;netstandard1.3-Release @@ -40,7 +40,7 @@ - + diff --git a/src/System.Threading.Tasks.Dataflow/System.Threading.Tasks.Dataflow.sln b/src/System.Threading.Tasks.Dataflow/System.Threading.Tasks.Dataflow.sln index 67e4e0b4b329..e62ce557e9b8 100644 --- a/src/System.Threading.Tasks.Dataflow/System.Threading.Tasks.Dataflow.sln +++ b/src/System.Threading.Tasks.Dataflow/System.Threading.Tasks.Dataflow.sln @@ -2,7 +2,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 15 VisualStudioVersion = 15.0.27213.1 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Threading.Tasks.Dataflow.Tests", "tests\System.Threading.Tasks.Dataflow.Tests.csproj", "{72E21903-0FBA-444E-9855-3B4F05DFC1F9}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Threading.Tasks.Dataflow.Tests", "tests\System.Threading.Tasks.Dataflow.Tests.csproj", "{A7AA2FC3-855F-44BA-8735-AB2F43D118A5}" ProjectSection(ProjectDependencies) = postProject {2E2F7224-7C72-4A81-9625-A5241F8D836D} = {2E2F7224-7C72-4A81-9625-A5241F8D836D} EndProjectSection @@ -26,10 +26,10 @@ Global Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {72E21903-0FBA-444E-9855-3B4F05DFC1F9}.Debug|Any CPU.ActiveCfg = netstandard-Debug|Any CPU - {72E21903-0FBA-444E-9855-3B4F05DFC1F9}.Debug|Any CPU.Build.0 = netstandard-Debug|Any CPU - {72E21903-0FBA-444E-9855-3B4F05DFC1F9}.Release|Any CPU.ActiveCfg = netstandard-Release|Any CPU - {72E21903-0FBA-444E-9855-3B4F05DFC1F9}.Release|Any CPU.Build.0 = netstandard-Release|Any CPU + {A7AA2FC3-855F-44BA-8735-AB2F43D118A5}.Debug|Any CPU.ActiveCfg = netstandard-Debug|Any CPU + {A7AA2FC3-855F-44BA-8735-AB2F43D118A5}.Debug|Any CPU.Build.0 = netstandard-Debug|Any CPU + {A7AA2FC3-855F-44BA-8735-AB2F43D118A5}.Release|Any CPU.ActiveCfg = netstandard-Release|Any CPU + {A7AA2FC3-855F-44BA-8735-AB2F43D118A5}.Release|Any CPU.Build.0 = netstandard-Release|Any CPU {2E2F7224-7C72-4A81-9625-A5241F8D836D}.Debug|Any CPU.ActiveCfg = netstandard-Debug|Any CPU {2E2F7224-7C72-4A81-9625-A5241F8D836D}.Debug|Any CPU.Build.0 = netstandard-Debug|Any CPU {2E2F7224-7C72-4A81-9625-A5241F8D836D}.Release|Any CPU.ActiveCfg = netstandard-Release|Any CPU @@ -43,7 +43,7 @@ Global HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution - {72E21903-0FBA-444E-9855-3B4F05DFC1F9} = {1A2F9F4A-A032-433E-B914-ADD5992BB178} + {A7AA2FC3-855F-44BA-8735-AB2F43D118A5} = {1A2F9F4A-A032-433E-B914-ADD5992BB178} {2E2F7224-7C72-4A81-9625-A5241F8D836D} = {E107E9C1-E893-4E87-987E-04EF0DCEAEFD} {01F36E3F-7664-4A71-AE6E-B8B6BF724FD1} = {2E666815-2EDB-464B-9DF6-380BF4789AD4} EndGlobalSection diff --git a/src/System.Threading.Tasks.Dataflow/tests/System.Threading.Tasks.Dataflow.Tests.csproj b/src/System.Threading.Tasks.Dataflow/tests/System.Threading.Tasks.Dataflow.Tests.csproj index 4c5f28deb195..d8b9cbdfe9d8 100644 --- a/src/System.Threading.Tasks.Dataflow/tests/System.Threading.Tasks.Dataflow.Tests.csproj +++ b/src/System.Threading.Tasks.Dataflow/tests/System.Threading.Tasks.Dataflow.Tests.csproj @@ -1,6 +1,6 @@ - {72E21903-0FBA-444E-9855-3B4F05DFC1F9} + {A7AA2FC3-855F-44BA-8735-AB2F43D118A5} true netstandard-Debug;netstandard-Release diff --git a/src/System.Threading.Tasks.Extensions/System.Threading.Tasks.Extensions.sln b/src/System.Threading.Tasks.Extensions/System.Threading.Tasks.Extensions.sln index 19b2bfaad243..ded08fa5e585 100644 --- a/src/System.Threading.Tasks.Extensions/System.Threading.Tasks.Extensions.sln +++ b/src/System.Threading.Tasks.Extensions/System.Threading.Tasks.Extensions.sln @@ -7,7 +7,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Threading.Tasks.Exte {DE90AD0B-649D-4062-B8D9-9658DE140532} = {DE90AD0B-649D-4062-B8D9-9658DE140532} EndProjectSection EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Threading.Tasks.Extensions", "src\SystemThreading.Tasks.Extensions.csproj", "{DE90AD0B-649D-4062-B8D9-9658DE140532}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Threading.Tasks.Extensions", "src\System.Threading.Tasks.Extensions.csproj", "{DE90AD0B-649D-4062-B8D9-9658DE140532}" ProjectSection(ProjectDependencies) = postProject {0DF7FA9A-E7D3-4CEF-862B-A37F5BBBB54C} = {0DF7FA9A-E7D3-4CEF-862B-A37F5BBBB54C} EndProjectSection diff --git a/src/System.Threading.Tasks.Extensions/ref/System.Threading.Tasks.Extensions.csproj b/src/System.Threading.Tasks.Extensions/ref/System.Threading.Tasks.Extensions.csproj index 3b0341f9088a..70d4c915a662 100644 --- a/src/System.Threading.Tasks.Extensions/ref/System.Threading.Tasks.Extensions.csproj +++ b/src/System.Threading.Tasks.Extensions/ref/System.Threading.Tasks.Extensions.csproj @@ -2,7 +2,7 @@ {0DF7FA9A-E7D3-4CEF-862B-A37F5BBBB54C} true - netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release;netstandard1.0-Debug;netstandard1.0-Release;uap-Debug;uap-Release + netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release diff --git a/src/System.Threading.Tasks.Extensions/src/System.Threading.Tasks.Extensions.csproj b/src/System.Threading.Tasks.Extensions/src/System.Threading.Tasks.Extensions.csproj index 2771e416bb5f..c4ee7b91103e 100644 --- a/src/System.Threading.Tasks.Extensions/src/System.Threading.Tasks.Extensions.csproj +++ b/src/System.Threading.Tasks.Extensions/src/System.Threading.Tasks.Extensions.csproj @@ -2,7 +2,7 @@ {DE90AD0B-649D-4062-B8D9-9658DE140532} true - netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release + netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release;uapaot-Windows_NT-Debug;uapaot-Windows_NT-Release diff --git a/src/System.Threading.Timer/System.Threading.Timer.sln b/src/System.Threading.Timer/System.Threading.Timer.sln index 15795c151bc0..ba97f370efc0 100644 --- a/src/System.Threading.Timer/System.Threading.Timer.sln +++ b/src/System.Threading.Timer/System.Threading.Timer.sln @@ -26,10 +26,10 @@ Global Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {ac20a28f-fda8-45e8-8728-058ead16e44c}.Debug|Any CPU.ActiveCfg = netstandard-Debug|Any CPU - {ac20a28f-fda8-45e8-8728-058ead16e44c}.Debug|Any CPU.Build.0 = netstandard-Debug|Any CPU - {ac20a28f-fda8-45e8-8728-058ead16e44c}.Release|Any CPU.ActiveCfg = netstandard-Release|Any CPU - {ac20a28f-fda8-45e8-8728-058ead16e44c}.Release|Any CPU.Build.0 = netstandard-Release|Any CPU + {ac20a28f-fda8-45e8-8728-058ead16e44c}.Debug|Any CPU.ActiveCfg = netcoreapp-Debug|Any CPU + {ac20a28f-fda8-45e8-8728-058ead16e44c}.Debug|Any CPU.Build.0 = netcoreapp-Debug|Any CPU + {ac20a28f-fda8-45e8-8728-058ead16e44c}.Release|Any CPU.ActiveCfg = netcoreapp-Release|Any CPU + {ac20a28f-fda8-45e8-8728-058ead16e44c}.Release|Any CPU.Build.0 = netcoreapp-Release|Any CPU {0F8B87B4-0E61-4DC6-9E90-CD4863025272}.Debug|Any CPU.ActiveCfg = netcoreapp-Windows_NT-Debug|Any CPU {0F8B87B4-0E61-4DC6-9E90-CD4863025272}.Debug|Any CPU.Build.0 = netcoreapp-Windows_NT-Debug|Any CPU {0F8B87B4-0E61-4DC6-9E90-CD4863025272}.Release|Any CPU.ActiveCfg = netcoreapp-Windows_NT-Release|Any CPU diff --git a/src/System.Utf8String.Experimental/System.Utf8String.Experimental.sln b/src/System.Utf8String.Experimental/System.Utf8String.Experimental.sln index 2d4bdcc1c43a..a505334f7f3f 100644 --- a/src/System.Utf8String.Experimental/System.Utf8String.Experimental.sln +++ b/src/System.Utf8String.Experimental/System.Utf8String.Experimental.sln @@ -8,14 +8,17 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Utf8String.Experimen EndProjectSection EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Utf8String.Experimental", "src\System.Utf8String.Experimental.csproj", "{D4266847-6692-481B-9459-6141DB7DA339}" + ProjectSection(ProjectDependencies) = postProject + {7AF57E6B-2CED-45C9-8BCA-5BBA60D018E0} = {7AF57E6B-2CED-45C9-8BCA-5BBA60D018E0} + EndProjectSection EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Utf8String.Experimental", "ref\System.Utf8String.Experimental.csproj", "{7AF57E6B-2CED-45C9-8BCA-5BBA60D018E0}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{7EC8921F-E96F-445B-AA33-453515641D93}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{1A2F9F4A-A032-433E-B914-ADD5992BB178}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{8691446A-CA54-49FD-87B9-57A0C6B48095}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{E107E9C1-E893-4E87-987E-04EF0DCEAEFD}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{FEB087F5-EF72-429D-8A0E-7636B84A1537}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{2E666815-2EDB-464B-9DF6-380BF4789AD4}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -23,26 +26,26 @@ Global Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {D4266847-6692-481B-9459-6141DB7DA339}.Debug|Any CPU.ActiveCfg = netcoreapp-Debug|Any CPU - {D4266847-6692-481B-9459-6141DB7DA339}.Debug|Any CPU.Build.0 = netcoreapp-Debug|Any CPU - {D4266847-6692-481B-9459-6141DB7DA339}.Release|Any CPU.ActiveCfg = netcoreapp-Release|Any CPU - {D4266847-6692-481B-9459-6141DB7DA339}.Release|Any CPU.Build.0 = netcoreapp-Release|Any CPU - {7AF57E6B-2CED-45C9-8BCA-5BBA60D018E0}.Debug|Any CPU.ActiveCfg = netcoreapp-Debug|Any CPU - {7AF57E6B-2CED-45C9-8BCA-5BBA60D018E0}.Debug|Any CPU.Build.0 = netcoreapp-Debug|Any CPU - {7AF57E6B-2CED-45C9-8BCA-5BBA60D018E0}.Release|Any CPU.ActiveCfg = netcoreapp-Release|Any CPU - {7AF57E6B-2CED-45C9-8BCA-5BBA60D018E0}.Release|Any CPU.Build.0 = netcoreapp-Release|Any CPU {72E9FB32-4692-4692-A10B-9F053F8F1A88}.Debug|Any CPU.ActiveCfg = netcoreapp-Debug|Any CPU {72E9FB32-4692-4692-A10B-9F053F8F1A88}.Debug|Any CPU.Build.0 = netcoreapp-Debug|Any CPU {72E9FB32-4692-4692-A10B-9F053F8F1A88}.Release|Any CPU.ActiveCfg = netcoreapp-Release|Any CPU {72E9FB32-4692-4692-A10B-9F053F8F1A88}.Release|Any CPU.Build.0 = netcoreapp-Release|Any CPU + {D4266847-6692-481B-9459-6141DB7DA339}.Debug|Any CPU.ActiveCfg = netcoreapp-Windows_NT-Debug|Any CPU + {D4266847-6692-481B-9459-6141DB7DA339}.Debug|Any CPU.Build.0 = netcoreapp-Windows_NT-Debug|Any CPU + {D4266847-6692-481B-9459-6141DB7DA339}.Release|Any CPU.ActiveCfg = netcoreapp-Windows_NT-Release|Any CPU + {D4266847-6692-481B-9459-6141DB7DA339}.Release|Any CPU.Build.0 = netcoreapp-Windows_NT-Release|Any CPU + {7AF57E6B-2CED-45C9-8BCA-5BBA60D018E0}.Debug|Any CPU.ActiveCfg = netcoreapp-Debug|Any CPU + {7AF57E6B-2CED-45C9-8BCA-5BBA60D018E0}.Debug|Any CPU.Build.0 = netcoreapp-Debug|Any CPU + {7AF57E6B-2CED-45C9-8BCA-5BBA60D018E0}.Release|Any CPU.ActiveCfg = netcoreapp-Release|Any CPU + {7AF57E6B-2CED-45C9-8BCA-5BBA60D018E0}.Release|Any CPU.Build.0 = netcoreapp-Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution - {D4266847-6692-481B-9459-6141DB7DA339} = {7EC8921F-E96F-445B-AA33-453515641D93} - {7AF57E6B-2CED-45C9-8BCA-5BBA60D018E0} = {8691446A-CA54-49FD-87B9-57A0C6B48095} - {72E9FB32-4692-4692-A10B-9F053F8F1A88} = {FEB087F5-EF72-429D-8A0E-7636B84A1537} + {72E9FB32-4692-4692-A10B-9F053F8F1A88} = {1A2F9F4A-A032-433E-B914-ADD5992BB178} + {D4266847-6692-481B-9459-6141DB7DA339} = {E107E9C1-E893-4E87-987E-04EF0DCEAEFD} + {7AF57E6B-2CED-45C9-8BCA-5BBA60D018E0} = {2E666815-2EDB-464B-9DF6-380BF4789AD4} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {7196F6AB-8F22-4E4D-B6D1-3C2CFF86229C} diff --git a/src/System.Utf8String.Experimental/src/System.Utf8String.Experimental.csproj b/src/System.Utf8String.Experimental/src/System.Utf8String.Experimental.csproj index 5c6b5eb174fa..ca0a1806394f 100644 --- a/src/System.Utf8String.Experimental/src/System.Utf8String.Experimental.csproj +++ b/src/System.Utf8String.Experimental/src/System.Utf8String.Experimental.csproj @@ -3,7 +3,7 @@ {D4266847-6692-481B-9459-6141DB7DA339} true true - netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release; + netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release System @@ -16,4 +16,4 @@ - + \ No newline at end of file diff --git a/src/System.Utf8String.Experimental/tests/System.Utf8String.Experimental.Tests.csproj b/src/System.Utf8String.Experimental/tests/System.Utf8String.Experimental.Tests.csproj index 83d935cc9e05..3caef8d34001 100644 --- a/src/System.Utf8String.Experimental/tests/System.Utf8String.Experimental.Tests.csproj +++ b/src/System.Utf8String.Experimental/tests/System.Utf8String.Experimental.Tests.csproj @@ -3,7 +3,7 @@ true {72E9FB32-4692-4692-A10B-9F053F8F1A88} true - netcoreapp-Debug;netcoreapp-Release; + netcoreapp-Debug;netcoreapp-Release true System @@ -24,4 +24,4 @@ - + \ No newline at end of file diff --git a/src/System.ValueTuple/src/System.ValueTuple.csproj b/src/System.ValueTuple/src/System.ValueTuple.csproj index 87c0854c1e5e..d03127bc0b6a 100644 --- a/src/System.ValueTuple/src/System.ValueTuple.csproj +++ b/src/System.ValueTuple/src/System.ValueTuple.csproj @@ -3,7 +3,7 @@ {4C2655DB-BD9E-4C86-83A6-744ECDDBDF29} true - netcoreapp-Debug;netcoreapp-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release + netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release From 6704007591fa0e81bc81639616cb6aed9b56329d Mon Sep 17 00:00:00 2001 From: Eric StJohn Date: Mon, 6 May 2019 15:10:28 -0700 Subject: [PATCH 242/607] Remove runtime.json from Microsoft.NETCore.Targets (#37437) This supports functionality that is not present in MSBuild-based restore, it was only usable in project.json which we no longer support. We keep the package around so that it can replace a 1.0 era version that brings in runtime.* packages, should it be referenced. --- .../Microsoft.NETCore.Targets.pkgproj | 1 - pkg/Microsoft.NETCore.Targets/runtime.json | 92 ------------------- 2 files changed, 93 deletions(-) delete mode 100644 pkg/Microsoft.NETCore.Targets/runtime.json diff --git a/pkg/Microsoft.NETCore.Targets/Microsoft.NETCore.Targets.pkgproj b/pkg/Microsoft.NETCore.Targets/Microsoft.NETCore.Targets.pkgproj index d57412478ead..2c48d5fbe229 100644 --- a/pkg/Microsoft.NETCore.Targets/Microsoft.NETCore.Targets.pkgproj +++ b/pkg/Microsoft.NETCore.Targets/Microsoft.NETCore.Targets.pkgproj @@ -11,7 +11,6 @@ lib/netstandard1.0 - diff --git a/pkg/Microsoft.NETCore.Targets/runtime.json b/pkg/Microsoft.NETCore.Targets/runtime.json deleted file mode 100644 index 925514c3611f..000000000000 --- a/pkg/Microsoft.NETCore.Targets/runtime.json +++ /dev/null @@ -1,92 +0,0 @@ -{ - "supports": { - "uwp.10.0.app": { - "uap10.0": [ - "win10-x86", - "win10-x86-aot", - "win10-x64", - "win10-x64-aot", - "win10-arm", - "win10-arm-aot" - ] - }, - "net45.app": { - "net45": [ - "", - "win-x86", - "win-x64" - ] - }, - "net451.app": { - "net451": [ - "", - "win-x86", - "win-x64" - ] - }, - "net452.app": { - "net452": [ - "", - "win-x86", - "win-x64" - ] - }, - "net46.app": { - "net46": [ - "", - "win-x86", - "win-x64" - ] - }, - "net461.app": { - "net461": [ - "", - "win-x86", - "win-x64" - ] - }, - "net462.app": { - "net462": [ - "", - "win-x86", - "win-x64" - ] - }, - "netcoreapp1.0.app": { - "netcoreapp1.0": [ - "win7-x86", - "win7-x64", - "osx.10.11-x64", - "centos.7-x64", - "debian.8-x64", - "linuxmint.17-x64", - "opensuse.13.2-x64", - "rhel.7.2-x64", - "ubuntu.14.04-x64", - "ubuntu.16.04-x64" - ] - }, - "win8.app": { - "win8": "" - }, - "win81.app": { - "win81": "" - }, - "wp8.app": { - "wp8": "" - }, - "wp81.app": { - "wp81": "" - }, - "wpa81.app": { - "wpa81": "" - }, - "dnxcore50.app": { - "dnxcore50": [ - "win7-x86", - "win7-x64" - ] - } - } - } - From f6762c0e37641bf31b9957dc51e74089bac5a310 Mon Sep 17 00:00:00 2001 From: Steve Harter Date: Mon, 6 May 2019 18:00:49 -0700 Subject: [PATCH 243/607] Add JsonException and make JsonSerializationException derive from JsonException and be internal (#37275) --- .../tests/BinaryFormatterTestData.cs | 14 +- .../tests/EqualityExtensions.cs | 3 +- src/System.Text.Json/ref/System.Text.Json.cs | 17 +- .../src/Resources/Strings.resx | 5 +- .../src/System.Text.Json.csproj | 5 +- .../Text/Json/Document/JsonDocument.Parse.cs | 16 +- .../System/Text/Json/JsonCommentHandling.cs | 2 +- .../src/System/Text/Json/JsonException.cs | 86 +++++++++ .../Text/Json/Reader/JsonReaderException.cs | 51 +---- .../Text/Json/Reader/JsonReaderOptions.cs | 6 +- .../Reader/Utf8JsonReader.MultiSegment.cs | 2 +- .../System/Text/Json/Reader/Utf8JsonReader.cs | 4 +- .../Json/Serialization/JsonPropertyInfo.cs | 2 +- .../JsonPropertyInfoNotNullable.cs | 8 +- .../Serialization/JsonPropertyInfoNullable.cs | 10 +- .../JsonSerializer.Read.HandleArray.cs | 98 ++++++---- .../JsonSerializer.Read.HandleNull.cs | 6 +- .../JsonSerializer.Read.HandleObject.cs | 6 +- .../Serialization/JsonSerializer.Read.Span.cs | 7 +- .../JsonSerializer.Read.Stream.cs | 8 +- .../JsonSerializer.Read.String.cs | 8 +- .../Json/Serialization/JsonSerializer.Read.cs | 146 +++++++------- .../Serialization/JsonSerializerOptions.cs | 6 +- .../Text/Json/Serialization/ReadStackFrame.cs | 2 +- .../Text/Json/ThrowHelper.Serialization.cs | 49 ++++- .../src/System/Text/Json/ThrowHelper.cs | 2 +- .../tests/JsonDocumentTests.cs | 44 ++--- src/System.Text.Json/tests/JsonTestHelper.cs | 2 +- .../tests/Serialization/DictionaryTests.cs | 12 +- .../tests/Serialization/EnumTests.cs | 2 +- .../tests/Serialization/ExceptionTests.cs | 83 ++++++++ .../tests/Serialization/Object.ReadTests.cs | 14 +- .../tests/Serialization/OptionsTests.cs | 8 +- .../tests/Serialization/PolymorphicTests.cs | 4 +- .../tests/Serialization/PropertyNameTests.cs | 2 - .../tests/Serialization/TestClasses.cs | 40 ++-- .../tests/Serialization/Value.ReadTests.cs | 180 +++++++++--------- .../tests/System.Text.Json.Tests.csproj | 3 +- .../tests/Utf8JsonReaderTests.MultiSegment.cs | 20 +- .../tests/Utf8JsonReaderTests.cs | 74 +++---- 40 files changed, 638 insertions(+), 419 deletions(-) create mode 100644 src/System.Text.Json/src/System/Text/Json/JsonException.cs create mode 100644 src/System.Text.Json/tests/Serialization/ExceptionTests.cs diff --git a/src/System.Runtime.Serialization.Formatters/tests/BinaryFormatterTestData.cs b/src/System.Runtime.Serialization.Formatters/tests/BinaryFormatterTestData.cs index 57c2dc1d0fcf..ff40a8edcdd9 100644 --- a/src/System.Runtime.Serialization.Formatters/tests/BinaryFormatterTestData.cs +++ b/src/System.Runtime.Serialization.Formatters/tests/BinaryFormatterTestData.cs @@ -472,8 +472,18 @@ public static IEnumerable SerializableObjects() yield return new object[] { PopulateException(isolatedStorageException), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAEAQAAADJTeXN0ZW0uSU8uSXNvbGF0ZWRTdG9yYWdlLklzb2xhdGVkU3RvcmFnZUV4Y2VwdGlvbgwAAAAJQ2xhc3NOYW1lB01lc3NhZ2UERGF0YQ5Jbm5lckV4Y2VwdGlvbgdIZWxwVVJMEFN0YWNrVHJhY2VTdHJpbmcWUmVtb3RlU3RhY2tUcmFjZVN0cmluZxBSZW1vdGVTdGFja0luZGV4D0V4Y2VwdGlvbk1ldGhvZAdIUmVzdWx0BlNvdXJjZQ1XYXRzb25CdWNrZXRzAQEDAwEBAQABAAEHKVN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsEFN5c3RlbS5FeGNlcHRpb24ICAIGAgAAADJTeXN0ZW0uSU8uSXNvbGF0ZWRTdG9yYWdlLklzb2xhdGVkU3RvcmFnZUV4Y2VwdGlvbgYDAAAAB21lc3NhZ2UJBAAAAAkFAAAABgYAAAAZaHR0cDovL21zZG4ubWljcm9zb2Z0LmNvbQYHAAAAFFN0YWNrVHJhY2Ugc3RyaW5nLi4uBggAAAAbUmVtb3RlIFN0YWNrVHJhY2Ugc3RyaW5nLi4uAAAAAAroAwAABgkAAAAXRXhjZXB0aW9uX0NsYXNzX1NhbXBsZXMKBAQAAAApU3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwDAAAABGhlYWQHdmVyc2lvbgVjb3VudAMAADhTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbCtEaWN0aW9uYXJ5Tm9kZQgICQoAAAACAAAAAgAAAAQFAAAAEFN5c3RlbS5FeGNlcHRpb24MAAAACUNsYXNzTmFtZQdNZXNzYWdlBERhdGEOSW5uZXJFeGNlcHRpb24HSGVscFVSTBBTdGFja1RyYWNlU3RyaW5nFlJlbW90ZVN0YWNrVHJhY2VTdHJpbmcQUmVtb3RlU3RhY2tJbmRleA9FeGNlcHRpb25NZXRob2QHSFJlc3VsdAZTb3VyY2UNV2F0c29uQnVja2V0cwEBAwMBAQEAAQABBylTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbBBTeXN0ZW0uRXhjZXB0aW9uCAgCBgsAAAAQU3lzdGVtLkV4Y2VwdGlvbgkDAAAACQ0AAAAJDgAAAAkGAAAACQcAAAAJCAAAAAAAAAAK6AMAAAkJAAAACgQKAAAAOFN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsK0RpY3Rpb25hcnlOb2RlAwAAAANrZXkFdmFsdWUEbmV4dAICAzhTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbCtEaWN0aW9uYXJ5Tm9kZQYTAAAABnNlY3JldAgBAQkUAAAAAQ0AAAAEAAAACRUAAAACAAAAAgAAAAEOAAAABQAAAAkLAAAABhcAAAAXSW5uZXIgZXhjZXB0aW9uIG1lc3NhZ2UKCgoKCgAAAAAKABUTgAoKARQAAAAKAAAACAgBAAAABhgAAAADb25lCgEVAAAACgAAAAkTAAAACAEBCRoAAAABGgAAAAoAAAAICAEAAAAJGAAAAAoL", TargetFrameworkMoniker.netcoreapp20), new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAEAQAAADJTeXN0ZW0uSU8uSXNvbGF0ZWRTdG9yYWdlLklzb2xhdGVkU3RvcmFnZUV4Y2VwdGlvbgwAAAAJQ2xhc3NOYW1lB01lc3NhZ2UERGF0YQ5Jbm5lckV4Y2VwdGlvbgdIZWxwVVJMEFN0YWNrVHJhY2VTdHJpbmcWUmVtb3RlU3RhY2tUcmFjZVN0cmluZxBSZW1vdGVTdGFja0luZGV4D0V4Y2VwdGlvbk1ldGhvZAdIUmVzdWx0BlNvdXJjZQ1XYXRzb25CdWNrZXRzAQEDAwEBAQABAAEHKVN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsEFN5c3RlbS5FeGNlcHRpb24ICAIGAgAAADJTeXN0ZW0uSU8uSXNvbGF0ZWRTdG9yYWdlLklzb2xhdGVkU3RvcmFnZUV4Y2VwdGlvbgYDAAAAB21lc3NhZ2UJBAAAAAkFAAAABgYAAAAZaHR0cDovL21zZG4ubWljcm9zb2Z0LmNvbQYHAAAAFFN0YWNrVHJhY2Ugc3RyaW5nLi4uBggAAAAbUmVtb3RlIFN0YWNrVHJhY2Ugc3RyaW5nLi4uAAAAAAroAwAABgkAAAAXRXhjZXB0aW9uX0NsYXNzX1NhbXBsZXMKBAQAAAApU3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwDAAAABGhlYWQHdmVyc2lvbgVjb3VudAMAADhTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbCtEaWN0aW9uYXJ5Tm9kZQgICQoAAAACAAAAAgAAAAQFAAAAEFN5c3RlbS5FeGNlcHRpb24MAAAACUNsYXNzTmFtZQdNZXNzYWdlBERhdGEOSW5uZXJFeGNlcHRpb24HSGVscFVSTBBTdGFja1RyYWNlU3RyaW5nFlJlbW90ZVN0YWNrVHJhY2VTdHJpbmcQUmVtb3RlU3RhY2tJbmRleA9FeGNlcHRpb25NZXRob2QHSFJlc3VsdAZTb3VyY2UNV2F0c29uQnVja2V0cwEBAwMBAQEAAQABBylTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbBBTeXN0ZW0uRXhjZXB0aW9uCAgCBgsAAAAQU3lzdGVtLkV4Y2VwdGlvbgkDAAAACQ0AAAAJDgAAAAkGAAAACQcAAAAJCAAAAAAAAAAK6AMAAAkJAAAACgQKAAAAOFN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsK0RpY3Rpb25hcnlOb2RlAwAAAANrZXkFdmFsdWUEbmV4dAICAzhTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbCtEaWN0aW9uYXJ5Tm9kZQYTAAAABnNlY3JldAgBAQkUAAAAAQ0AAAAEAAAACRUAAAACAAAAAgAAAAEOAAAABQAAAAkLAAAABhcAAAAXSW5uZXIgZXhjZXB0aW9uIG1lc3NhZ2UKCgoKCgAAAAAKABUTgAoKARQAAAAKAAAACAgBAAAABhgAAAADb25lCgEVAAAACgAAAAkTAAAACAEBCRoAAAABGgAAAAoAAAAICAEAAAAJGAAAAAoL", TargetFrameworkMoniker.netfx461) } }; #if netcoreapp - var jsonReaderException = new JsonReaderException("message", lineNumber: 0, bytePositionInLine: 0); - yield return new object[] { PopulateException(jsonReaderException), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAFNTeXN0ZW0uVGV4dC5Kc29uLCBWZXJzaW9uPTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Y2M3YjEzZmZjZDJkZGQ1MQUBAAAAJFN5c3RlbS5UZXh0Lkpzb24uSnNvblJlYWRlckV4Y2VwdGlvbg4AAAAJQ2xhc3NOYW1lB01lc3NhZ2UERGF0YQ5Jbm5lckV4Y2VwdGlvbgdIZWxwVVJMEFN0YWNrVHJhY2VTdHJpbmcWUmVtb3RlU3RhY2tUcmFjZVN0cmluZxBSZW1vdGVTdGFja0luZGV4D0V4Y2VwdGlvbk1ldGhvZAdIUmVzdWx0BlNvdXJjZQ1XYXRzb25CdWNrZXRzCkxpbmVOdW1iZXISQnl0ZVBvc2l0aW9uSW5MaW5lAQEDAwEBAQABAAEHAAApU3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwQU3lzdGVtLkV4Y2VwdGlvbggIAgkJAgAAAAYDAAAAJFN5c3RlbS5UZXh0Lkpzb24uSnNvblJlYWRlckV4Y2VwdGlvbgYEAAAAB21lc3NhZ2UJBQAAAAoGBgAAABlodHRwOi8vbXNkbi5taWNyb3NvZnQuY29tBgcAAAAUU3RhY2tUcmFjZSBzdHJpbmcuLi4GCAAAABtSZW1vdGUgU3RhY2tUcmFjZSBzdHJpbmcuLi4AAAAACugDAAAGCQAAABdFeGNlcHRpb25fQ2xhc3NfU2FtcGxlcwoAAAAAAAAAAAAAAAAAAAAABAUAAAApU3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwDAAAABGhlYWQHdmVyc2lvbgVjb3VudAMAADhTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbCtEaWN0aW9uYXJ5Tm9kZQgICQoAAAACAAAAAgAAAAQKAAAAOFN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsK0RpY3Rpb25hcnlOb2RlAwAAAANrZXkFdmFsdWUEbmV4dAICAzhTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbCtEaWN0aW9uYXJ5Tm9kZQYLAAAABnNlY3JldAgBAQkMAAAAAQwAAAAKAAAACAgBAAAABg0AAAADb25lCgs=", TargetFrameworkMoniker.netcoreapp30) } }; + var jsonException = new JsonException("message", path: "path", lineNumber: 1, bytePositionInLine: 2, innerException: exception); + yield return new object[] { PopulateException(jsonException), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAFNTeXN0ZW0uVGV4dC5Kc29uLCBWZXJzaW9uPTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Y2M3YjEzZmZjZDJkZGQ1MQUBAAAAHlN5c3RlbS5UZXh0Lkpzb24uSnNvbkV4Y2VwdGlvbg8AAAAJQ2xhc3NOYW1lB01lc3NhZ2UERGF0YQ5Jbm5lckV4Y2VwdGlvbgdIZWxwVVJMEFN0YWNrVHJhY2VTdHJpbmcWUmVtb3RlU3RhY2tUcmFjZVN0cmluZxBSZW1vdGVTdGFja0luZGV4D0V4Y2VwdGlvbk1ldGhvZAdIUmVzdWx0BlNvdXJjZQ1XYXRzb25CdWNrZXRzCkxpbmVOdW1iZXISQnl0ZVBvc2l0aW9uSW5MaW5lBFBhdGgBAQMDAQEBAAEAAQcDAwEpU3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwQU3lzdGVtLkV4Y2VwdGlvbggIAgxTeXN0ZW0uSW50NjQMU3lzdGVtLkludDY0AgAAAAYDAAAAHlN5c3RlbS5UZXh0Lkpzb24uSnNvbkV4Y2VwdGlvbgYEAAAAB21lc3NhZ2UJBQAAAAkGAAAABgcAAAAZaHR0cDovL21zZG4ubWljcm9zb2Z0LmNvbQYIAAAAFFN0YWNrVHJhY2Ugc3RyaW5nLi4uBgkAAAAbUmVtb3RlIFN0YWNrVHJhY2Ugc3RyaW5nLi4uAAAAAAroAwAABgoAAAAXRXhjZXB0aW9uX0NsYXNzX1NhbXBsZXMKCAkBAAAAAAAAAAgJAgAAAAAAAAAGCwAAAARwYXRoBAUAAAApU3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwDAAAABGhlYWQHdmVyc2lvbgVjb3VudAMAADhTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbCtEaWN0aW9uYXJ5Tm9kZQgICQwAAAACAAAAAgAAAAQGAAAAEFN5c3RlbS5FeGNlcHRpb24MAAAACUNsYXNzTmFtZQdNZXNzYWdlBERhdGEOSW5uZXJFeGNlcHRpb24HSGVscFVSTBBTdGFja1RyYWNlU3RyaW5nFlJlbW90ZVN0YWNrVHJhY2VTdHJpbmcQUmVtb3RlU3RhY2tJbmRleA9FeGNlcHRpb25NZXRob2QHSFJlc3VsdAZTb3VyY2UNV2F0c29uQnVja2V0cwEBAwMBAQEAAQABBylTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbBBTeXN0ZW0uRXhjZXB0aW9uCAgCBg0AAAAQU3lzdGVtLkV4Y2VwdGlvbgkEAAAACQ8AAAAJEAAAAAkHAAAACQgAAAAJCQAAAAAAAAAK6AMAAAkKAAAACgQMAAAAOFN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsK0RpY3Rpb25hcnlOb2RlAwAAAANrZXkFdmFsdWUEbmV4dAICAzhTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbCtEaWN0aW9uYXJ5Tm9kZQYVAAAABnNlY3JldAgBAQkWAAAAAQ8AAAAFAAAACRcAAAACAAAAAgAAAAEQAAAABgAAAAkNAAAABhkAAAAXSW5uZXIgZXhjZXB0aW9uIG1lc3NhZ2UKCgoKCgAAAAAKABUTgAoKARYAAAAMAAAACAgBAAAABhoAAAADb25lCgEXAAAADAAAAAkVAAAACAEBCRwAAAABHAAAAAwAAAAICAEAAAAJGgAAAAoL", TargetFrameworkMoniker.netcoreapp30) } }; + + var jsonExceptionNulls = new JsonException("message", null, null, null); + yield return new object[] { PopulateException(jsonExceptionNulls), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAFNTeXN0ZW0uVGV4dC5Kc29uLCBWZXJzaW9uPTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Y2M3YjEzZmZjZDJkZGQ1MQUBAAAAHlN5c3RlbS5UZXh0Lkpzb24uSnNvbkV4Y2VwdGlvbg8AAAAJQ2xhc3NOYW1lB01lc3NhZ2UERGF0YQ5Jbm5lckV4Y2VwdGlvbgdIZWxwVVJMEFN0YWNrVHJhY2VTdHJpbmcWUmVtb3RlU3RhY2tUcmFjZVN0cmluZxBSZW1vdGVTdGFja0luZGV4D0V4Y2VwdGlvbk1ldGhvZAdIUmVzdWx0BlNvdXJjZQ1XYXRzb25CdWNrZXRzCkxpbmVOdW1iZXISQnl0ZVBvc2l0aW9uSW5MaW5lBFBhdGgBAQMDAQEBAAEAAQcDAwEpU3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwQU3lzdGVtLkV4Y2VwdGlvbggIAm5TeXN0ZW0uTnVsbGFibGVgMVtbU3lzdGVtLkludDY0LCBtc2NvcmxpYiwgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODldXW5TeXN0ZW0uTnVsbGFibGVgMVtbU3lzdGVtLkludDY0LCBtc2NvcmxpYiwgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODldXQIAAAAGAwAAAB5TeXN0ZW0uVGV4dC5Kc29uLkpzb25FeGNlcHRpb24GBAAAAAdtZXNzYWdlCQUAAAAKBgYAAAAZaHR0cDovL21zZG4ubWljcm9zb2Z0LmNvbQYHAAAAFFN0YWNrVHJhY2Ugc3RyaW5nLi4uBggAAAAbUmVtb3RlIFN0YWNrVHJhY2Ugc3RyaW5nLi4uAAAAAAroAwAABgkAAAAXRXhjZXB0aW9uX0NsYXNzX1NhbXBsZXMKCgoKBAUAAAApU3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwDAAAABGhlYWQHdmVyc2lvbgVjb3VudAMAADhTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbCtEaWN0aW9uYXJ5Tm9kZQgICQoAAAACAAAAAgAAAAQKAAAAOFN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsK0RpY3Rpb25hcnlOb2RlAwAAAANrZXkFdmFsdWUEbmV4dAICAzhTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbCtEaWN0aW9uYXJ5Tm9kZQYLAAAABnNlY3JldAgBAQkMAAAAAQwAAAAKAAAACAgBAAAABg0AAAADb25lCgs=", TargetFrameworkMoniker.netcoreapp30) } }; + + // The JsonReaderException is internal. + Exception jsonReaderException = (Exception)typeof(JsonException).Assembly.GetType("System.Text.Json.JsonReaderException", throwOnError: true) + .GetConstructor(BindingFlags.Public | BindingFlags.Instance, null, new Type[] { typeof(string), typeof(long), typeof(long) }, null ) + .Invoke(new object[] { "message", 1, 2 }); + + yield return new object[] { PopulateException(jsonReaderException), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAFNTeXN0ZW0uVGV4dC5Kc29uLCBWZXJzaW9uPTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Y2M3YjEzZmZjZDJkZGQ1MQUBAAAAJFN5c3RlbS5UZXh0Lkpzb24uSnNvblJlYWRlckV4Y2VwdGlvbg8AAAAJQ2xhc3NOYW1lB01lc3NhZ2UERGF0YQ5Jbm5lckV4Y2VwdGlvbgdIZWxwVVJMEFN0YWNrVHJhY2VTdHJpbmcWUmVtb3RlU3RhY2tUcmFjZVN0cmluZxBSZW1vdGVTdGFja0luZGV4D0V4Y2VwdGlvbk1ldGhvZAdIUmVzdWx0BlNvdXJjZQ1XYXRzb25CdWNrZXRzCkxpbmVOdW1iZXISQnl0ZVBvc2l0aW9uSW5MaW5lBFBhdGgBAQMDAQEBAAEAAQcDAwEpU3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwQU3lzdGVtLkV4Y2VwdGlvbggIAgxTeXN0ZW0uSW50NjQMU3lzdGVtLkludDY0AgAAAAYDAAAAJFN5c3RlbS5UZXh0Lkpzb24uSnNvblJlYWRlckV4Y2VwdGlvbgYEAAAAB21lc3NhZ2UJBQAAAAoGBgAAABlodHRwOi8vbXNkbi5taWNyb3NvZnQuY29tBgcAAAAUU3RhY2tUcmFjZSBzdHJpbmcuLi4GCAAAABtSZW1vdGUgU3RhY2tUcmFjZSBzdHJpbmcuLi4AAAAACugDAAAGCQAAABdFeGNlcHRpb25fQ2xhc3NfU2FtcGxlcwoICQEAAAAAAAAACAkCAAAAAAAAAAoEBQAAAClTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbAMAAAAEaGVhZAd2ZXJzaW9uBWNvdW50AwAAOFN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsK0RpY3Rpb25hcnlOb2RlCAgJCgAAAAIAAAACAAAABAoAAAA4U3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwrRGljdGlvbmFyeU5vZGUDAAAAA2tleQV2YWx1ZQRuZXh0AgIDOFN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsK0RpY3Rpb25hcnlOb2RlBgsAAAAGc2VjcmV0CAEBCQwAAAABDAAAAAoAAAAICAEAAAAGDQAAAANvbmUKCw==", TargetFrameworkMoniker.netcoreapp30) } }; #endif var keyNotFoundException = new KeyNotFoundException("message", exception); diff --git a/src/System.Runtime.Serialization.Formatters/tests/EqualityExtensions.cs b/src/System.Runtime.Serialization.Formatters/tests/EqualityExtensions.cs index 9b5386156c19..028610cec2c8 100644 --- a/src/System.Runtime.Serialization.Formatters/tests/EqualityExtensions.cs +++ b/src/System.Runtime.Serialization.Formatters/tests/EqualityExtensions.cs @@ -1202,7 +1202,7 @@ public static void IsEqual(this AggregateException @this, AggregateException oth } #if netcoreapp - public static void IsEqual(this JsonReaderException @this, JsonReaderException other, bool isSamePlatform) + public static void IsEqual(this JsonException @this, JsonException other, bool isSamePlatform) { if (@this == null && other == null) return; @@ -1210,6 +1210,7 @@ public static void IsEqual(this JsonReaderException @this, JsonReaderException o Assert.NotNull(@this); Assert.NotNull(other); IsEqual(@this as Exception, other as Exception, isSamePlatform); + Assert.Equal(@this.Path, other.Path); Assert.Equal(@this.LineNumber, other.LineNumber); Assert.Equal(@this.BytePositionInLine, other.BytePositionInLine); } diff --git a/src/System.Text.Json/ref/System.Text.Json.cs b/src/System.Text.Json/ref/System.Text.Json.cs index cb0b5a2f4509..fe1345d3610b 100644 --- a/src/System.Text.Json/ref/System.Text.Json.cs +++ b/src/System.Text.Json/ref/System.Text.Json.cs @@ -113,6 +113,16 @@ public void Reset() { } public override int GetHashCode() { throw null; } public override string ToString() { throw null; } } + public partial class JsonException : System.Exception + { + protected JsonException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } + public JsonException(string message, string path, long? lineNumber, long? bytePositionInLine) { } + public JsonException(string message, string path, long? lineNumber, long? bytePositionInLine, System.Exception innerException) { } + public long? BytePositionInLine { get { throw null; } } + public long? LineNumber { get { throw null; } } + public string Path { get { throw null; } } + public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } + } public readonly partial struct JsonProperty { private readonly object _dummy; @@ -120,13 +130,6 @@ public readonly partial struct JsonProperty public System.Text.Json.JsonElement Value { get { throw null; } } public override string ToString() { throw null; } } - public sealed partial class JsonReaderException : System.Exception - { - public JsonReaderException(string message, long lineNumber, long bytePositionInLine) { } - public long BytePositionInLine { get { throw null; } } - public long LineNumber { get { throw null; } } - public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } - } public partial struct JsonReaderOptions { private int _dummyPrimitive; diff --git a/src/System.Text.Json/src/Resources/Strings.resx b/src/System.Text.Json/src/Resources/Strings.resx index c7ac357f2416..c2a1da63c591 100644 --- a/src/System.Text.Json/src/Resources/Strings.resx +++ b/src/System.Text.Json/src/Resources/Strings.resx @@ -289,7 +289,7 @@ The provided data of length {0} has remaining bytes {1}. - The JSON value from {0} could not be converted to {1}. + The JSON value could not be converted to {0}. The specified type {0} must derive from the specific value's type {1}. @@ -336,4 +336,7 @@ The JSON property name for '{0}.{1}' cannot be null. + + An item with the same property name '{0}' has already been added. + \ No newline at end of file diff --git a/src/System.Text.Json/src/System.Text.Json.csproj b/src/System.Text.Json/src/System.Text.Json.csproj index 1bdb995f7797..99d08f729119 100644 --- a/src/System.Text.Json/src/System.Text.Json.csproj +++ b/src/System.Text.Json/src/System.Text.Json.csproj @@ -15,6 +15,7 @@ + @@ -34,9 +35,9 @@ - + @@ -166,4 +167,4 @@ - \ No newline at end of file + diff --git a/src/System.Text.Json/src/System/Text/Json/Document/JsonDocument.Parse.cs b/src/System.Text.Json/src/System/Text/Json/Document/JsonDocument.Parse.cs index 22f740107dc2..9c22f5322e04 100644 --- a/src/System.Text.Json/src/System/Text/Json/Document/JsonDocument.Parse.cs +++ b/src/System.Text.Json/src/System/Text/Json/Document/JsonDocument.Parse.cs @@ -33,7 +33,7 @@ public sealed partial class JsonDocument /// /// A JsonDocument representation of the JSON value. /// - /// + /// /// does not represent a valid single JSON value. /// /// @@ -65,7 +65,7 @@ public static JsonDocument Parse(ReadOnlyMemory utf8Json, JsonReaderOption /// /// A JsonDocument representation of the JSON value. /// - /// + /// /// does not represent a valid single JSON value. /// /// @@ -106,7 +106,7 @@ public static JsonDocument Parse(ReadOnlySequence utf8Json, JsonReaderOpti /// /// A JsonDocument representation of the JSON value. /// - /// + /// /// does not represent a valid single JSON value. /// /// @@ -146,7 +146,7 @@ public static JsonDocument Parse(Stream utf8Json, JsonReaderOptions readerOption /// /// A Task to produce a JsonDocument representation of the JSON value. /// - /// + /// /// does not represent a valid single JSON value. /// /// @@ -200,7 +200,7 @@ private static async Task ParseAsyncCore( /// /// A JsonDocument representation of the JSON value. /// - /// + /// /// does not represent a valid single JSON value. /// /// @@ -238,7 +238,7 @@ public static JsonDocument Parse(ReadOnlyMemory json, JsonReaderOptions re /// /// A JsonDocument representation of the JSON value. /// - /// + /// /// does not represent a valid single JSON value. /// /// @@ -291,7 +291,7 @@ public static JsonDocument Parse(string json, JsonReaderOptions readerOptions = /// /// The current token does not start or represent a value. /// - /// + /// /// A value could not be read from the reader. /// public static bool TryParseValue(ref Utf8JsonReader reader, out JsonDocument document) @@ -331,7 +331,7 @@ public static bool TryParseValue(ref Utf8JsonReader reader, out JsonDocument doc /// /// The current token does not start or represent a value. /// - /// + /// /// A value could not be read from the reader. /// public static JsonDocument ParseValue(ref Utf8JsonReader reader) diff --git a/src/System.Text.Json/src/System/Text/Json/JsonCommentHandling.cs b/src/System.Text.Json/src/System/Text/Json/JsonCommentHandling.cs index d5d8f8af4fcb..afe1fbffd911 100644 --- a/src/System.Text.Json/src/System/Text/Json/JsonCommentHandling.cs +++ b/src/System.Text.Json/src/System/Text/Json/JsonCommentHandling.cs @@ -12,7 +12,7 @@ public enum JsonCommentHandling : byte /// /// By default, do no allow comments within the JSON input. /// Comments are treated as invalid JSON if found and a - /// is thrown. + /// is thrown. /// Disallow = 0, /// diff --git a/src/System.Text.Json/src/System/Text/Json/JsonException.cs b/src/System.Text.Json/src/System/Text/Json/JsonException.cs new file mode 100644 index 000000000000..b7022d78b69d --- /dev/null +++ b/src/System.Text.Json/src/System/Text/Json/JsonException.cs @@ -0,0 +1,86 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Runtime.Serialization; + +namespace System.Text.Json +{ + /// + /// Defines a custom exception object that is thrown when invalid JSON text is encountered, when the defined maximum depth is passed, + /// or the JSON text is not compatible with the type of a property on an object. + /// + [Serializable] + public class JsonException : Exception + { + /// + /// Creates a new exception object to relay error information to the user. + /// + /// The context specific error message. + /// The line number at which the invalid JSON was encountered (starting at 0) when deserializing. + /// The byte count within the current line where the invalid JSON was encountered (starting at 0). + /// The object's property path where the invalid JSON was encountered. + /// The exception that caused the current exception. + /// + /// Note that the counts the number of bytes (i.e. UTF-8 code units) and not characters or scalars. + /// + public JsonException(string message, string path, long? lineNumber, long? bytePositionInLine, Exception innerException) : base(message, innerException) + { + LineNumber = lineNumber; + BytePositionInLine = bytePositionInLine; + Path = path; + } + + /// + /// Creates a new exception object to relay error information to the user. + /// + /// The context specific error message. + /// The object's property path where the invalid JSON was encountered. + /// The line number at which the invalid JSON was encountered (starting at 0) when deserializing. + /// The byte count within the current line where the invalid JSON was encountered (starting at 0). + /// + /// Note that the counts the number of bytes (i.e. UTF-8 code units) and not characters or scalars. + /// + public JsonException(string message, string path, long? lineNumber, long? bytePositionInLine) : base(message) + { + LineNumber = lineNumber; + BytePositionInLine = bytePositionInLine; + Path = path; + } + + protected JsonException(SerializationInfo info, StreamingContext context) : base(info, context) + { + LineNumber = (long?)info.GetValue("LineNumber", typeof(long?)); + BytePositionInLine = (long?)info.GetValue("BytePositionInLine", typeof(long?)); + Path = info.GetString("Path"); + } + + /// + /// Sets the with information about the exception. + /// + /// The that holds the serialized object data about the exception being thrown. + /// The that contains contextual information about the source or destination. + public override void GetObjectData(SerializationInfo info, StreamingContext context) + { + base.GetObjectData(info, context); + info.AddValue("LineNumber", LineNumber, typeof(long?)); + info.AddValue("BytePositionInLine", BytePositionInLine, typeof(long?)); + info.AddValue("Path", Path, typeof(string)); + } + + /// + /// The number of lines read so far before the exception (starting at 0). + /// + public long? LineNumber { get; private set; } + + /// + /// The number of bytes read within the current line before the exception (starting at 0). + /// + public long? BytePositionInLine { get; private set; } + + /// + /// The property path within the JSON where the exception was encountered. + /// + public string Path { get; private set; } + } +} diff --git a/src/System.Text.Json/src/System/Text/Json/Reader/JsonReaderException.cs b/src/System.Text.Json/src/System/Text/Json/Reader/JsonReaderException.cs index f724941e6d48..d0a90679d0d1 100644 --- a/src/System.Text.Json/src/System/Text/Json/Reader/JsonReaderException.cs +++ b/src/System.Text.Json/src/System/Text/Json/Reader/JsonReaderException.cs @@ -6,61 +6,16 @@ namespace System.Text.Json { - /// - /// Defines a custom exception object that is thrown by the whenever it - /// encounters an invalid JSON text while reading through it. This exception is also thrown - /// whenever you read past the defined maximum depth. - /// + // This class exists because the serializer needs to catch reader-originated exceptions in order to throw JsonException which has Path information. [Serializable] - public sealed class JsonReaderException : Exception + internal sealed class JsonReaderException : JsonException { - /// - /// Creates a new exception object to relay error information to the user. - /// - /// The context specific error message. - /// The line number at which the invalid JSON was encountered (starting at 0). - /// The byte count within the current line where the invalid JSON was encountered (starting at 0). - /// - /// Note that the counts the number of bytes (i.e. UTF-8 code units) and not characters or scalars. - /// - public JsonReaderException(string message, long lineNumber, long bytePositionInLine) : base(message) + public JsonReaderException(string message, long lineNumber, long bytePositionInLine) : base(message, path : null, lineNumber, bytePositionInLine) { - LineNumber = lineNumber; - BytePositionInLine = bytePositionInLine; - } - - internal JsonReaderException(string message, in JsonReaderState state) : base(message) - { - LineNumber = state._lineNumber; - BytePositionInLine = state._bytePositionInLine; } private JsonReaderException(SerializationInfo info, StreamingContext context) : base(info, context) { - LineNumber = info.GetInt64("LineNumber"); - BytePositionInLine = info.GetInt64("BytePositionInLine"); - } - - /// - /// Sets the with information about the exception. - /// - /// The that holds the serialized object data about the exception being thrown. - /// The that contains contextual information about the source or destination. - public override void GetObjectData(SerializationInfo info, StreamingContext context) - { - base.GetObjectData(info, context); - info.AddValue("LineNumber", LineNumber, typeof(long)); - info.AddValue("BytePositionInLine", BytePositionInLine, typeof(long)); } - - /// - /// The number of lines read so far before the exception (starting at 0). - /// - public long LineNumber { get; private set; } - - /// - /// The number of bytes read within the current line before the exception (starting at 0). - /// - public long BytePositionInLine { get; private set; } } } diff --git a/src/System.Text.Json/src/System/Text/Json/Reader/JsonReaderOptions.cs b/src/System.Text.Json/src/System/Text/Json/Reader/JsonReaderOptions.cs index e5d1b836e938..7e1fb7e50fb6 100644 --- a/src/System.Text.Json/src/System/Text/Json/Reader/JsonReaderOptions.cs +++ b/src/System.Text.Json/src/System/Text/Json/Reader/JsonReaderOptions.cs @@ -15,13 +15,13 @@ public struct JsonReaderOptions /// /// Defines how the should handle comments when reading through the JSON. - /// By default is thrown if a comment is encountered. + /// By default is thrown if a comment is encountered. /// public JsonCommentHandling CommentHandling { get; set; } /// /// Gets or sets the maximum depth allowed when reading JSON, with the default (i.e. 0) indicating a max depth of 64. - /// Reading past this depth will throw a . + /// Reading past this depth will throw a . /// public int MaxDepth { @@ -38,7 +38,7 @@ public int MaxDepth /// /// Defines whether an extra comma at the end of a list of JSON values in an object or array /// is allowed (and ignored) within the JSON payload being read. - /// By default, it's set to false, and is thrown if a trailing comma is encountered. + /// By default, it's set to false, and is thrown if a trailing comma is encountered. /// public bool AllowTrailingCommas { get; set; } } diff --git a/src/System.Text.Json/src/System/Text/Json/Reader/Utf8JsonReader.MultiSegment.cs b/src/System.Text.Json/src/System/Text/Json/Reader/Utf8JsonReader.MultiSegment.cs index e0680f803b96..bca3f5ae1fe0 100644 --- a/src/System.Text.Json/src/System/Text/Json/Reader/Utf8JsonReader.MultiSegment.cs +++ b/src/System.Text.Json/src/System/Text/Json/Reader/Utf8JsonReader.MultiSegment.cs @@ -622,7 +622,7 @@ private int FindMismatch(ReadOnlySpan span, ReadOnlySpan literal) return indexOfFirstMismatch; } - private JsonReaderException GetInvalidLiteralMultiSegment(ReadOnlySpan span) + private JsonException GetInvalidLiteralMultiSegment(ReadOnlySpan span) { byte firstByte = span[0]; diff --git a/src/System.Text.Json/src/System/Text/Json/Reader/Utf8JsonReader.cs b/src/System.Text.Json/src/System/Text/Json/Reader/Utf8JsonReader.cs index 0a36d7441f04..e2b5fa1301fa 100644 --- a/src/System.Text.Json/src/System/Text/Json/Reader/Utf8JsonReader.cs +++ b/src/System.Text.Json/src/System/Text/Json/Reader/Utf8JsonReader.cs @@ -13,7 +13,7 @@ namespace System.Text.Json /// Provides a high-performance API for forward-only, read-only access to the UTF-8 encoded JSON text. /// It processes the text sequentially with no caching and adheres strictly to the JSON RFC /// by default (https://tools.ietf.org/html/rfc8259). When it encounters invalid JSON, it throws - /// a JsonReaderException with basic error information like line number and byte position on the line. + /// a JsonException with basic error information like line number and byte position on the line. /// Since this type is a ref struct, it does not directly support async. However, it does provide /// support for reentrancy to read incomplete data, and continue reading once more data is presented. /// To be able to set max depth while reading OR allow skipping comments, create an instance of @@ -242,7 +242,7 @@ public Utf8JsonReader(ReadOnlySpan jsonData, bool isFinalBlock, JsonReader /// Read the next JSON token from input source. /// /// True if the token was read successfully, else false. - /// + /// /// Thrown when an invalid JSON token is encountered according to the JSON RFC /// or if the current depth exceeds the recursive limit set by the max depth. /// diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfo.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfo.cs index 81dedb60d03e..3849ba413ded 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfo.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfo.cs @@ -259,7 +259,7 @@ public TAttribute GetAttribute() where TAttribute : Attribute return (TAttribute)PropertyInfo?.GetCustomAttribute(typeof(TAttribute), inherit: false); } - public abstract void ApplyNullValue(JsonSerializerOptions options, ref ReadStack state); + public abstract void ApplyNullValue(JsonSerializerOptions options, ref ReadStack state, ref Utf8JsonReader reader); public abstract IList CreateConverterList(); diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfoNotNullable.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfoNotNullable.cs index 14c445c3e544..9c092163759f 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfoNotNullable.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfoNotNullable.cs @@ -59,7 +59,7 @@ public override void Read(JsonTokenType tokenType, JsonSerializerOptions options } } - ThrowHelper.ThrowJsonReaderException_DeserializeUnableToConvertValue(RuntimePropertyType, reader, state); + ThrowHelper.ThrowJsonException_DeserializeUnableToConvertValue(RuntimePropertyType, reader, state.PropertyPath); } } @@ -68,14 +68,14 @@ public override void ReadEnumerable(JsonTokenType tokenType, JsonSerializerOptio { if (ValueConverter == null || !ValueConverter.TryRead(RuntimePropertyType, ref reader, out TRuntimeProperty value)) { - ThrowHelper.ThrowJsonReaderException_DeserializeUnableToConvertValue(RuntimePropertyType, reader, state); + ThrowHelper.ThrowJsonException_DeserializeUnableToConvertValue(RuntimePropertyType, reader, state.PropertyPath); return; } - JsonSerializer.ApplyValueToEnumerable(ref value, options, ref state.Current); + JsonSerializer.ApplyValueToEnumerable(ref value, options, ref state, ref reader); } - public override void ApplyNullValue(JsonSerializerOptions options, ref ReadStack state) + public override void ApplyNullValue(JsonSerializerOptions options, ref ReadStack state, ref Utf8JsonReader reader) { Debug.Assert(state.Current.JsonPropertyInfo != null); state.Current.JsonPropertyInfo.SetValueAsObject(state.Current.ReturnValue, value : null); diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfoNullable.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfoNullable.cs index afdfcdc66e60..5a3ce959a90c 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfoNullable.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfoNullable.cs @@ -56,7 +56,7 @@ public override void Read(JsonTokenType tokenType, JsonSerializerOptions options } } - ThrowHelper.ThrowJsonReaderException_DeserializeUnableToConvertValue(RuntimePropertyType, reader, state); + ThrowHelper.ThrowJsonException_DeserializeUnableToConvertValue(RuntimePropertyType, reader, state.PropertyPath); } } @@ -64,19 +64,19 @@ public override void ReadEnumerable(JsonTokenType tokenType, JsonSerializerOptio { if (ValueConverter == null || !ValueConverter.TryRead(typeof(TProperty), ref reader, out TProperty value)) { - ThrowHelper.ThrowJsonReaderException_DeserializeUnableToConvertValue(RuntimePropertyType, reader, state); + ThrowHelper.ThrowJsonException_DeserializeUnableToConvertValue(RuntimePropertyType, reader, state.PropertyPath); return; } // Converting to TProperty? here lets us share a common ApplyValue() with ApplyNullValue(). TProperty? nullableValue = new TProperty?(value); - JsonSerializer.ApplyValueToEnumerable(ref nullableValue, options, ref state.Current); + JsonSerializer.ApplyValueToEnumerable(ref nullableValue, options, ref state, ref reader); } - public override void ApplyNullValue(JsonSerializerOptions options, ref ReadStack state) + public override void ApplyNullValue(JsonSerializerOptions options, ref ReadStack state, ref Utf8JsonReader reader) { TProperty? nullableValue = null; - JsonSerializer.ApplyValueToEnumerable(ref nullableValue, options, ref state.Current); + JsonSerializer.ApplyValueToEnumerable(ref nullableValue, options, ref state, ref reader); } // todo: have the caller check if current.Enumerator != null and call WriteEnumerable of the underlying property directly to avoid an extra virtual call. diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleArray.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleArray.cs index 9646ce37705c..d80b17330faf 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleArray.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleArray.cs @@ -41,7 +41,7 @@ private static void HandleStartArray( Type arrayType = jsonPropertyInfo.RuntimePropertyType; if (!typeof(IEnumerable).IsAssignableFrom(arrayType) || (arrayType.IsArray && arrayType.GetArrayRank() > 1)) { - ThrowHelper.ThrowJsonReaderException_DeserializeUnableToConvertValue(arrayType, reader, state); + ThrowHelper.ThrowJsonException_DeserializeUnableToConvertValue(arrayType, reader, state.PropertyPath); } Debug.Assert(state.Current.IsPropertyEnumerable || state.Current.IsDictionary); @@ -85,7 +85,8 @@ private static void HandleStartArray( private static bool HandleEndArray( JsonSerializerOptions options, - ref ReadStack state) + ref ReadStack state, + ref Utf8JsonReader reader) { bool lastFrame = state.IsLastFrame; @@ -142,7 +143,7 @@ private static bool HandleEndArray( // else there must be an outer object, so we'll return false here. } - ApplyObjectToEnumerable(value, options, ref state.Current, setPropertyDirectly: setPropertyDirectly); + ApplyObjectToEnumerable(value, options, ref state, ref reader, setPropertyDirectly: setPropertyDirectly); if (!valueReturning) { @@ -153,41 +154,56 @@ private static bool HandleEndArray( } // If this method is changed, also change ApplyValueToEnumerable. - internal static void ApplyObjectToEnumerable(object value, JsonSerializerOptions options, ref ReadStackFrame frame, bool setPropertyDirectly = false) + internal static void ApplyObjectToEnumerable( + object value, + JsonSerializerOptions options, + ref ReadStack state, + ref Utf8JsonReader reader, + bool setPropertyDirectly = false) { - if (frame.IsEnumerable) + if (state.Current.IsEnumerable) { - if (frame.TempEnumerableValues != null) + if (state.Current.TempEnumerableValues != null) { - frame.TempEnumerableValues.Add(value); + state.Current.TempEnumerableValues.Add(value); } else { - ((IList)frame.ReturnValue).Add(value); + ((IList)state.Current.ReturnValue).Add(value); } } - else if (!setPropertyDirectly && frame.IsPropertyEnumerable) + else if (!setPropertyDirectly && state.Current.IsPropertyEnumerable) { - Debug.Assert(frame.JsonPropertyInfo != null); - Debug.Assert(frame.ReturnValue != null); - if (frame.TempEnumerableValues != null) + Debug.Assert(state.Current.JsonPropertyInfo != null); + Debug.Assert(state.Current.ReturnValue != null); + if (state.Current.TempEnumerableValues != null) { - frame.TempEnumerableValues.Add(value); + state.Current.TempEnumerableValues.Add(value); } else { - ((IList)frame.JsonPropertyInfo.GetValueAsObject(frame.ReturnValue)).Add(value); + ((IList)state.Current.JsonPropertyInfo.GetValueAsObject(state.Current.ReturnValue)).Add(value); } } - else if (frame.IsDictionary) + else if (state.Current.IsDictionary) { - Debug.Assert(frame.ReturnValue != null); - ((IDictionary)frame.JsonPropertyInfo.GetValueAsObject(frame.ReturnValue)).Add(frame.KeyName, value); + Debug.Assert(state.Current.ReturnValue != null); + IDictionary dictionary = (IDictionary)state.Current.JsonPropertyInfo.GetValueAsObject(state.Current.ReturnValue); + string key = state.Current.KeyName; + Debug.Assert(!string.IsNullOrEmpty(key)); + if (!dictionary.Contains(key)) + { + dictionary.Add(key, value); + } + else + { + ThrowHelper.ThrowJsonException_DeserializeDuplicateKey(key, reader, state.PropertyPath); + } } else { - Debug.Assert(frame.JsonPropertyInfo != null); - frame.JsonPropertyInfo.SetValueAsObject(frame.ReturnValue, value); + Debug.Assert(state.Current.JsonPropertyInfo != null); + state.Current.JsonPropertyInfo.SetValueAsObject(state.Current.ReturnValue, value); } } @@ -195,41 +211,53 @@ internal static void ApplyObjectToEnumerable(object value, JsonSerializerOptions internal static void ApplyValueToEnumerable( ref TProperty value, JsonSerializerOptions options, - ref ReadStackFrame frame) + ref ReadStack state, + ref Utf8JsonReader reader) { - if (frame.IsEnumerable) + if (state.Current.IsEnumerable) { - if (frame.TempEnumerableValues != null) + if (state.Current.TempEnumerableValues != null) { - ((IList)frame.TempEnumerableValues).Add(value); + ((IList)state.Current.TempEnumerableValues).Add(value); } else { - ((IList)frame.ReturnValue).Add(value); + ((IList)state.Current.ReturnValue).Add(value); } } - else if (frame.IsPropertyEnumerable) + else if (state.Current.IsPropertyEnumerable) { - Debug.Assert(frame.JsonPropertyInfo != null); - Debug.Assert(frame.ReturnValue != null); - if (frame.TempEnumerableValues != null) + Debug.Assert(state.Current.JsonPropertyInfo != null); + Debug.Assert(state.Current.ReturnValue != null); + if (state.Current.TempEnumerableValues != null) { - ((IList)frame.TempEnumerableValues).Add(value); + ((IList)state.Current.TempEnumerableValues).Add(value); } else { - ((IList)frame.JsonPropertyInfo.GetValueAsObject(frame.ReturnValue)).Add(value); + ((IList)state.Current.JsonPropertyInfo.GetValueAsObject(state.Current.ReturnValue)).Add(value); } } - else if (frame.IsDictionary) + else if (state.Current.IsDictionary) { - Debug.Assert(frame.ReturnValue != null); - ((IDictionary)frame.JsonPropertyInfo.GetValueAsObject(frame.ReturnValue)).Add(frame.KeyName, value); + Debug.Assert(state.Current.ReturnValue != null); + IDictionary dictionary = (IDictionary)state.Current.JsonPropertyInfo.GetValueAsObject(state.Current.ReturnValue); + + string key = state.Current.KeyName; + Debug.Assert(!string.IsNullOrEmpty(key)); + if (!dictionary.ContainsKey(key)) // The IDictionary.TryAdd extension method is not available in netstandard. + { + dictionary.Add(key, value); + } + else + { + ThrowHelper.ThrowJsonException_DeserializeDuplicateKey(key, reader, state.PropertyPath); + } } else { - Debug.Assert(frame.JsonPropertyInfo != null); - frame.JsonPropertyInfo.SetValueAsObject(frame.ReturnValue, value); + Debug.Assert(state.Current.JsonPropertyInfo != null); + state.Current.JsonPropertyInfo.SetValueAsObject(state.Current.ReturnValue, value); } } } diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleNull.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleNull.cs index ad97372ffa1f..028c634242b9 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleNull.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleNull.cs @@ -27,18 +27,18 @@ private static bool HandleNull(ref Utf8JsonReader reader, ref ReadStack state, J JsonPropertyInfo propertyInfo = state.Current.JsonPropertyInfo; if (!propertyInfo.CanBeNull) { - ThrowHelper.ThrowJsonReaderException_DeserializeCannotBeNull(reader, state); + ThrowHelper.ThrowJsonException_DeserializeCannotBeNull(reader, state.PropertyPath); } if (state.Current.IsEnumerable || state.Current.IsDictionary) { - ApplyObjectToEnumerable(null, options, ref state.Current); + ApplyObjectToEnumerable(null, options, ref state, ref reader); return false; } if (state.Current.IsPropertyEnumerable) { - state.Current.JsonPropertyInfo.ApplyNullValue(options, ref state); + state.Current.JsonPropertyInfo.ApplyNullValue(options, ref state, ref reader); return false; } diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleObject.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleObject.cs index ae171280e465..cd7e02dd6575 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleObject.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleObject.cs @@ -31,7 +31,7 @@ private static void HandleStartObject(JsonSerializerOptions options, ref Utf8Jso Debug.Assert(state.Current.JsonClassInfo.Type.GetGenericArguments().Length >= 1); if (state.Current.JsonClassInfo.Type.GetGenericArguments()[0].UnderlyingSystemType != typeof(string)) { - ThrowHelper.ThrowJsonReaderException_DeserializeUnableToConvertValue(state.Current.JsonClassInfo.Type, reader, state); + ThrowHelper.ThrowJsonException_DeserializeUnableToConvertValue(state.Current.JsonClassInfo.Type, reader, state.PropertyPath); } ClassType classType = state.Current.JsonClassInfo.ElementClassInfo.ClassType; @@ -66,7 +66,7 @@ private static void HandleStartObject(JsonSerializerOptions options, ref Utf8Jso state.Current.ReturnValue = classInfo.CreateObject(); } - private static bool HandleEndObject(JsonSerializerOptions options, ref ReadStack state) + private static bool HandleEndObject(JsonSerializerOptions options, ref ReadStack state, ref Utf8JsonReader reader) { bool isLastFrame = state.IsLastFrame; if (state.Current.Drain) @@ -87,7 +87,7 @@ private static bool HandleEndObject(JsonSerializerOptions options, ref ReadStack } state.Pop(); - ApplyObjectToEnumerable(value, options, ref state.Current); + ApplyObjectToEnumerable(value, options, ref state, ref reader); return false; } } diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.Span.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.Span.cs index 8dd266a9fc48..3d2ebb6de47f 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.Span.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.Span.cs @@ -12,7 +12,7 @@ public static partial class JsonSerializer /// A representation of the JSON value. /// JSON text to parse. /// Options to control the behavior during parsing. - /// + /// /// Thrown when the JSON is invalid, /// is not compatible with the JSON, /// or when there is remaining data in the Stream. @@ -32,7 +32,7 @@ public static TValue Parse(ReadOnlySpan utf8Json, JsonSerializerOp /// /// Thrown if is null. /// - /// + /// /// Thrown when the JSON is invalid, /// is not compatible with the JSON, /// or when there is remaining data in the Stream. @@ -60,8 +60,7 @@ private static object ParseCore(ReadOnlySpan utf8Json, Type returnType, Js if (reader.BytesConsumed != utf8Json.Length) { readerState = reader.CurrentState; - throw new JsonReaderException(SR.Format(SR.DeserializeDataRemaining, - utf8Json.Length, utf8Json.Length - readerState.BytesConsumed), readerState); + ThrowHelper.ThrowJsonException_DeserializeDataRemaining(utf8Json.Length, utf8Json.Length - readerState.BytesConsumed); } return result; diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.Stream.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.Stream.cs index b067059f79cb..19fdc98562a0 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.Stream.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.Stream.cs @@ -22,7 +22,7 @@ public static partial class JsonSerializer /// /// The which may be used to cancel the read operation. /// - /// + /// /// Thrown when the JSON is invalid, /// is not compatible with the JSON, /// or when there is remaining data in the Stream. @@ -52,7 +52,7 @@ public static ValueTask ReadAsync( /// /// Thrown if or is null. /// - /// + /// /// Thrown when the JSON is invalid, /// the is not compatible with the JSON, /// or when there is remaining data in the Stream. @@ -180,9 +180,7 @@ private static async ValueTask ReadAsync( if (bytesInBuffer != 0) { - throw new JsonReaderException( - SR.Format(SR.DeserializeDataRemaining, totalBytesRead, bytesInBuffer), - readerState); + ThrowHelper.ThrowJsonException_DeserializeDataRemaining(totalBytesRead, bytesInBuffer); } return (TValue)state.Current.ReturnValue; diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.String.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.String.cs index 37aa8edf3b92..ad3133f1d494 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.String.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.String.cs @@ -15,7 +15,7 @@ public static partial class JsonSerializer /// /// Thrown if is null. /// - /// + /// /// Thrown when the JSON is invalid, /// is not compatible with the JSON, /// or when there is remaining data in the Stream. @@ -41,7 +41,7 @@ public static TValue Parse(string json, JsonSerializerOptions options = /// /// Thrown if or is null. /// - /// + /// /// Thrown when the JSON is invalid, /// the is not compatible with the JSON, /// or when there is remaining data in the Stream. @@ -76,8 +76,8 @@ private static object ParseCore(string json, Type returnType, JsonSerializerOpti if (reader.BytesConsumed != jsonBytes.Length) { readerState = reader.CurrentState; - throw new JsonReaderException(SR.Format(SR.DeserializeDataRemaining, - jsonBytes.Length, jsonBytes.Length - readerState.BytesConsumed), readerState); + ThrowHelper.ThrowJsonException_DeserializeDataRemaining( + jsonBytes.Length, jsonBytes.Length - readerState.BytesConsumed); } return result; diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.cs index b73e3a671520..69cd87d3cf4f 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.cs @@ -21,101 +21,109 @@ private static void ReadCore( ref Utf8JsonReader reader, ref ReadStack state) { - while (reader.Read()) + try { - JsonTokenType tokenType = reader.TokenType; - - if (JsonHelpers.IsInRangeInclusive(tokenType, JsonTokenType.String, JsonTokenType.False)) + while (reader.Read()) { - Debug.Assert(tokenType == JsonTokenType.String || tokenType == JsonTokenType.Number || tokenType == JsonTokenType.True || tokenType == JsonTokenType.False); + JsonTokenType tokenType = reader.TokenType; - if (HandleValue(tokenType, options, ref reader, ref state)) - { - return; - } - } - else if (tokenType == JsonTokenType.PropertyName) - { - if (!state.Current.Drain) + if (JsonHelpers.IsInRangeInclusive(tokenType, JsonTokenType.String, JsonTokenType.False)) { - Debug.Assert(state.Current.ReturnValue != default); - Debug.Assert(state.Current.JsonClassInfo != default); + Debug.Assert(tokenType == JsonTokenType.String || tokenType == JsonTokenType.Number || tokenType == JsonTokenType.True || tokenType == JsonTokenType.False); - if (state.Current.IsDictionary) + if (HandleValue(tokenType, options, ref reader, ref state)) { - string keyName = reader.GetString(); - if (options.DictionaryKeyPolicy != null) - { - keyName = options.DictionaryKeyPolicy.ConvertName(keyName); - } - - state.Current.JsonPropertyInfo = state.Current.JsonClassInfo.GetPolicyProperty(); - state.Current.KeyName = keyName; + return; } - else + } + else if (tokenType == JsonTokenType.PropertyName) + { + if (!state.Current.Drain) { - ReadOnlySpan propertyName = reader.HasValueSequence ? reader.ValueSequence.ToArray() : reader.ValueSpan; - if (reader._stringHasEscaping) - { - int idx = propertyName.IndexOf(JsonConstants.BackSlash); - Debug.Assert(idx != -1); - propertyName = GetUnescapedString(propertyName, idx); - } + Debug.Assert(state.Current.ReturnValue != default); + Debug.Assert(state.Current.JsonClassInfo != default); - state.Current.JsonPropertyInfo = state.Current.JsonClassInfo.GetProperty(options, propertyName, ref state.Current); - if (state.Current.JsonPropertyInfo == null) + if (state.Current.IsDictionary) { - state.Current.JsonPropertyInfo = s_missingProperty; + string keyName = reader.GetString(); + if (options.DictionaryKeyPolicy != null) + { + keyName = options.DictionaryKeyPolicy.ConvertName(keyName); + } + + state.Current.JsonPropertyInfo = state.Current.JsonClassInfo.GetPolicyProperty(); + state.Current.KeyName = keyName; } + else + { + ReadOnlySpan propertyName = reader.HasValueSequence ? reader.ValueSequence.ToArray() : reader.ValueSpan; + if (reader._stringHasEscaping) + { + int idx = propertyName.IndexOf(JsonConstants.BackSlash); + Debug.Assert(idx != -1); + propertyName = GetUnescapedString(propertyName, idx); + } + + state.Current.JsonPropertyInfo = state.Current.JsonClassInfo.GetProperty(options, propertyName, ref state.Current); + if (state.Current.JsonPropertyInfo == null) + { + state.Current.JsonPropertyInfo = s_missingProperty; + } - state.Current.PropertyIndex++; + state.Current.PropertyIndex++; + } } } - } - else if (tokenType == JsonTokenType.StartObject) - { - if (!state.Current.IsProcessingProperty) - { - HandleStartObject(options, ref reader, ref state); - } - else if (HandleValue(tokenType, options, ref reader, ref state)) - { - return; - } - } - else if (tokenType == JsonTokenType.EndObject) - { - if (HandleEndObject(options, ref state)) + else if (tokenType == JsonTokenType.StartObject) { - return; + if (!state.Current.IsProcessingProperty) + { + HandleStartObject(options, ref reader, ref state); + } + else if (HandleValue(tokenType, options, ref reader, ref state)) + { + return; + } } - } - else if (tokenType == JsonTokenType.StartArray) - { - if (!state.Current.IsProcessingProperty) + else if (tokenType == JsonTokenType.EndObject) { - HandleStartArray(options, ref reader, ref state); + if (HandleEndObject(options, ref state, ref reader)) + { + return; + } } - else if (HandleValue(tokenType, options, ref reader, ref state)) + else if (tokenType == JsonTokenType.StartArray) { - return; + if (!state.Current.IsProcessingProperty) + { + HandleStartArray(options, ref reader, ref state); + } + else if (HandleValue(tokenType, options, ref reader, ref state)) + { + return; + } } - } - else if (tokenType == JsonTokenType.EndArray) - { - if (HandleEndArray(options, ref state)) + else if (tokenType == JsonTokenType.EndArray) { - return; + if (HandleEndArray(options, ref state, ref reader)) + { + return; + } } - } - else if (tokenType == JsonTokenType.Null) - { - if (HandleNull(ref reader, ref state, options)) + else if (tokenType == JsonTokenType.Null) { - return; + if (HandleNull(ref reader, ref state, options)) + { + return; + } } } } + catch (JsonReaderException e) + { + // Re-throw with Path information. + ThrowHelper.ReThrowWithPath(e, state.PropertyPath); + } return; } diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializerOptions.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializerOptions.cs index 34129b53c4be..7f9938cf5547 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializerOptions.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializerOptions.cs @@ -38,7 +38,7 @@ public JsonSerializerOptions() { } /// /// Defines whether an extra comma at the end of a list of JSON values in an object or array /// is allowed (and ignored) within the JSON payload being deserialized. - /// By default, it's set to false, and is thrown if a trailing comma is encountered. + /// By default, it's set to false, and is thrown if a trailing comma is encountered. /// /// /// Thrown if this property is set after serialization or deserialization has occurred. @@ -145,7 +145,7 @@ public bool IgnoreReadOnlyProperties /// /// Gets or sets the maximum depth allowed when serializing or deserializing JSON, with the default (i.e. 0) indicating a max depth of 64. - /// Going past this depth will throw a . + /// Going past this depth will throw a . /// /// /// Thrown if this property is set after serialization or deserialization has occurred. @@ -205,7 +205,7 @@ public bool PropertyNameCaseInsensitive /// /// Defines how the comments are handled during deserialization. - /// By default is thrown if a comment is encountered. + /// By default is thrown if a comment is encountered. /// /// /// Thrown if this property is set after serialization or deserialization has occurred. diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/ReadStackFrame.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/ReadStackFrame.cs index dda53fcea721..5c3ab721c1a9 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/ReadStackFrame.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/ReadStackFrame.cs @@ -127,7 +127,7 @@ public static object CreateEnumerableValue(ref Utf8JsonReader reader, ref ReadSt } else { - ThrowHelper.ThrowJsonReaderException_DeserializeUnableToConvertValue(propType, reader, state); + ThrowHelper.ThrowJsonException_DeserializeUnableToConvertValue(propType, reader, state.PropertyPath); return null; } } diff --git a/src/System.Text.Json/src/System/Text/Json/ThrowHelper.Serialization.cs b/src/System.Text.Json/src/System/Text/Json/ThrowHelper.Serialization.cs index ac7f1f3d8d2a..c46ebbdfaf18 100644 --- a/src/System.Text.Json/src/System/Text/Json/ThrowHelper.Serialization.cs +++ b/src/System.Text.Json/src/System/Text/Json/ThrowHelper.Serialization.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Text.Json.Serialization; @@ -17,15 +18,15 @@ public static void ThrowArgumentException_DeserializeWrongType(Type type, object } [MethodImpl(MethodImplOptions.NoInlining)] - public static void ThrowJsonReaderException_DeserializeUnableToConvertValue(Type propertyType, in Utf8JsonReader reader, in ReadStack state) + public static void ThrowJsonException_DeserializeUnableToConvertValue(Type propertyType, in Utf8JsonReader reader, string path) { - throw new JsonReaderException(SR.Format(SR.DeserializeUnableToConvertValue, state.PropertyPath, propertyType.FullName), reader.CurrentState); + ThowJsonException(SR.Format(SR.DeserializeUnableToConvertValue, propertyType.FullName), in reader, path); } [MethodImpl(MethodImplOptions.NoInlining)] - public static void ThrowJsonReaderException_DeserializeCannotBeNull(in Utf8JsonReader reader, in ReadStack state) + public static void ThrowJsonException_DeserializeCannotBeNull(in Utf8JsonReader reader, string path) { - throw new JsonReaderException(SR.Format(SR.DeserializeCannotBeNull, state.PropertyPath), reader.CurrentState); + ThowJsonException(SR.DeserializeCannotBeNull, in reader, path); } [MethodImpl(MethodImplOptions.NoInlining)] @@ -51,5 +52,45 @@ public static void ThrowInvalidOperationException_SerializerPropertyNameNull(Jso { throw new InvalidOperationException(SR.Format(SR.SerializerPropertyNameNull, jsonClassInfo.Type.FullName, jsonPropertyInfo.PropertyInfo.Name)); } + + public static void ThrowJsonException_DeserializeDataRemaining(long length, long bytesRemaining) + { + throw new JsonException(SR.Format(SR.DeserializeDataRemaining, length, bytesRemaining), path: null, lineNumber: null, bytePositionInLine: null); + } + + public static void ThrowJsonException_DeserializeDuplicateKey(string key, in Utf8JsonReader reader, string path) + { + ThowJsonException(SR.Format(SR.DeserializeDuplicateKey, key), in reader, path); + } + + private static void ThowJsonException(string message, in Utf8JsonReader reader, string path) + { + long lineNumber = reader.CurrentState._lineNumber; + long bytePositionInLine = reader.CurrentState._bytePositionInLine; + + message += $" Path: {path} | LineNumber: {lineNumber} | BytePositionInLine: {bytePositionInLine}."; + throw new JsonException(message, path, lineNumber, bytePositionInLine); + } + + [MethodImpl(MethodImplOptions.NoInlining)] + public static void ReThrowWithPath(JsonException exception, string path) + { + Debug.Assert(exception.Path == null); + + string message = exception.Message; + + // Insert the "Path" portion before "LineNumber" and "BytePositionInLine". + int iPos = message.LastIndexOf(" LineNumber: ", StringComparison.InvariantCulture); + if (iPos >= 0) + { + message = $"{message.Substring(0, iPos)} Path: {path} |{message.Substring(iPos)}"; + } + else + { + message += $" Path: {path}."; + } + + throw new JsonException(message, path, exception.LineNumber, exception.BytePositionInLine, exception); + } } } diff --git a/src/System.Text.Json/src/System/Text/Json/ThrowHelper.cs b/src/System.Text.Json/src/System/Text/Json/ThrowHelper.cs index fd9485804200..a69e50424469 100644 --- a/src/System.Text.Json/src/System/Text/Json/ThrowHelper.cs +++ b/src/System.Text.Json/src/System/Text/Json/ThrowHelper.cs @@ -223,7 +223,7 @@ public static void ThrowJsonReaderException(ref Utf8JsonReader json, ExceptionRe } [MethodImpl(MethodImplOptions.NoInlining)] - public static JsonReaderException GetJsonReaderException(ref Utf8JsonReader json, ExceptionResource resource, byte nextByte, ReadOnlySpan bytes) + public static JsonException GetJsonReaderException(ref Utf8JsonReader json, ExceptionResource resource, byte nextByte, ReadOnlySpan bytes) { string message = GetResourceString(ref json, resource, nextByte, Encoding.UTF8.GetString(bytes.ToArray(), 0, bytes.Length)); diff --git a/src/System.Text.Json/tests/JsonDocumentTests.cs b/src/System.Text.Json/tests/JsonDocumentTests.cs index 469090efab85..36abf6bf0d70 100644 --- a/src/System.Text.Json/tests/JsonDocumentTests.cs +++ b/src/System.Text.Json/tests/JsonDocumentTests.cs @@ -416,7 +416,7 @@ public static void ParseJson_UnseekableStream_Async_WithBOM(bool compactData, Te public static void ParseJson_SeekableStream_BadBOM(string json) { byte[] data = Encoding.UTF8.GetBytes(json); - Assert.Throws(() => JsonDocument.Parse(new MemoryStream(data))); + Assert.ThrowsAny(() => JsonDocument.Parse(new MemoryStream(data))); } [Theory] @@ -424,7 +424,7 @@ public static void ParseJson_SeekableStream_BadBOM(string json) public static Task ParseJson_SeekableStream_Async_BadBOM(string json) { byte[] data = Encoding.UTF8.GetBytes(json); - return Assert.ThrowsAsync(() => JsonDocument.ParseAsync(new MemoryStream(data))); + return Assert.ThrowsAnyAsync(() => JsonDocument.ParseAsync(new MemoryStream(data))); } [Theory] @@ -433,7 +433,7 @@ public static void ParseJson_UnseekableStream_BadBOM(string json) { byte[] data = Encoding.UTF8.GetBytes(json); - Assert.Throws( + Assert.ThrowsAny( () => JsonDocument.Parse( new WrappedMemoryStream(canRead: true, canWrite: false, canSeek: false, data))); } @@ -444,7 +444,7 @@ public static Task ParseJson_UnseekableStream_Async_BadBOM(string json) { byte[] data = Encoding.UTF8.GetBytes(json); - return Assert.ThrowsAsync( + return Assert.ThrowsAnyAsync( () => JsonDocument.ParseAsync( new WrappedMemoryStream(canRead: true, canWrite: false, canSeek: false, data))); } @@ -1579,22 +1579,22 @@ void assertOdd(JsonElement elem) [InlineData("[ 1")] public static Task CheckUnparsable(string json) { - Assert.Throws(() => JsonDocument.Parse(json)); + Assert.ThrowsAny(() => JsonDocument.Parse(json)); byte[] utf8 = Encoding.UTF8.GetBytes(json); - Assert.Throws(() => JsonDocument.Parse(utf8)); + Assert.ThrowsAny(() => JsonDocument.Parse(utf8)); ReadOnlySequence singleSeq = new ReadOnlySequence(utf8); - Assert.Throws(() => JsonDocument.Parse(singleSeq)); + Assert.ThrowsAny(() => JsonDocument.Parse(singleSeq)); ReadOnlySequence multiSegment = JsonTestHelper.SegmentInto(utf8, 6); - Assert.Throws(() => JsonDocument.Parse(multiSegment)); + Assert.ThrowsAny(() => JsonDocument.Parse(multiSegment)); Stream stream = new MemoryStream(utf8); - Assert.Throws(() => JsonDocument.Parse(stream)); + Assert.ThrowsAny(() => JsonDocument.Parse(stream)); stream.Seek(0, SeekOrigin.Begin); - return Assert.ThrowsAsync(() => JsonDocument.ParseAsync(stream)); + return Assert.ThrowsAnyAsync(() => JsonDocument.ParseAsync(stream)); } [Fact] @@ -1625,7 +1625,7 @@ public static void CheckParseDepth() string badJson = $"[{okayJson}]"; - Assert.Throws(() => JsonDocument.Parse(badJson)); + Assert.ThrowsAny(() => JsonDocument.Parse(badJson)); } [Fact] @@ -1654,10 +1654,10 @@ public static void HonorReaderOptionsMaxDepth() Assert.Equal(OkayCount, depth); } - Assert.Throws(() => JsonDocument.Parse(okayJson, new JsonReaderOptions { MaxDepth = 32 })); - Assert.Throws(() => JsonDocument.Parse(okayJson)); - Assert.Throws(() => JsonDocument.Parse(okayJson, new JsonReaderOptions { MaxDepth = 0 })); - Assert.Throws(() => JsonDocument.Parse(okayJson, new JsonReaderOptions { MaxDepth = 64 })); + Assert.ThrowsAny(() => JsonDocument.Parse(okayJson, new JsonReaderOptions { MaxDepth = 32 })); + Assert.ThrowsAny(() => JsonDocument.Parse(okayJson)); + Assert.ThrowsAny(() => JsonDocument.Parse(okayJson, new JsonReaderOptions { MaxDepth = 0 })); + Assert.ThrowsAny(() => JsonDocument.Parse(okayJson, new JsonReaderOptions { MaxDepth = 64 })); } [Fact] @@ -2365,7 +2365,7 @@ public static void ParseNull() [Fact] public static void ParseDefaultReader() { - Assert.Throws(() => + Assert.ThrowsAny(() => { Utf8JsonReader reader = default; JsonDocument.ParseValue(ref reader); @@ -2504,7 +2504,7 @@ private static void ParseReaderAtStart( } Assert.NotNull(ex); - Assert.IsType(ex); + Assert.IsAssignableFrom(ex); BuildSegmentedReader(out reader, utf8.AsMemory((int)position), 0, state, true); @@ -2695,7 +2695,7 @@ public static void ParseReaderAtInvalidStart(JsonTokenType tokenType) } Assert.NotNull(ex); - Assert.IsType(ex); + Assert.IsAssignableFrom(ex); Assert.Equal(initialPosition, reader.BytesConsumed); @@ -2739,7 +2739,7 @@ public static void ParseReaderThrowsWhileReading(int segmentCount) } Assert.NotNull(ex); - Assert.IsType(ex); + Assert.IsAssignableFrom(ex); Assert.Equal(JsonTokenType.PropertyName, reader.TokenType); Assert.Equal(startPosition, reader.BytesConsumed); @@ -2757,7 +2757,7 @@ public static void ParseReaderThrowsWhileReading(int segmentCount) } Assert.NotNull(ex); - Assert.IsType(ex); + Assert.IsAssignableFrom(ex); Assert.Null(doc); Assert.Equal(JsonTokenType.PropertyName, reader.TokenType); @@ -2799,7 +2799,7 @@ public static void ParseReaderTerminatesWhileReading(int segmentCount) } Assert.NotNull(ex); - Assert.IsType(ex); + Assert.IsAssignableFrom(ex); Assert.Equal(JsonTokenType.PropertyName, reader.TokenType); Assert.Equal(startPosition, reader.BytesConsumed); @@ -2846,7 +2846,7 @@ public static void ParseReaderTerminatesAfterPropertyName(int segmentCount) } Assert.NotNull(ex); - Assert.IsType(ex); + Assert.IsAssignableFrom(ex); Assert.Equal(JsonTokenType.PropertyName, reader.TokenType); Assert.Equal(startPosition, reader.BytesConsumed); diff --git a/src/System.Text.Json/tests/JsonTestHelper.cs b/src/System.Text.Json/tests/JsonTestHelper.cs index 6c7cc0d91992..fa644da62dfa 100644 --- a/src/System.Text.Json/tests/JsonTestHelper.cs +++ b/src/System.Text.Json/tests/JsonTestHelper.cs @@ -603,7 +603,7 @@ public static void AssertThrows(Utf8JsonReader json, AssertThrowsActionUtf8Js throw new ThrowsException(typeof(E)); } - if (ex.GetType() != typeof(E)) + if (!(ex is E)) { throw new ThrowsException(typeof(E), ex); } diff --git a/src/System.Text.Json/tests/Serialization/DictionaryTests.cs b/src/System.Text.Json/tests/Serialization/DictionaryTests.cs index 92fdeaaf4398..eb232cba779a 100644 --- a/src/System.Text.Json/tests/Serialization/DictionaryTests.cs +++ b/src/System.Text.Json/tests/Serialization/DictionaryTests.cs @@ -54,21 +54,25 @@ public static void DictionaryOfString() [Fact] public static void DuplicateKeysFail() { - // todo: this should throw a JsonReaderException - Assert.Throws(() => JsonSerializer.Parse>( + // Strongly-typed IDictionary<,> case. + Assert.Throws(() => JsonSerializer.Parse>( @"{""Hello"":""World"", ""Hello"":""World""}")); + + // Weakly-typed IDictionary case. + Assert.Throws(() => JsonSerializer.Parse>( + @"{""Hello"":null, ""Hello"":null}")); } [Fact] public static void DictionaryOfObjectFail() { - Assert.Throws(() => JsonSerializer.Parse>(@"{""Key1"":1")); + Assert.Throws(() => JsonSerializer.Parse>(@"{""Key1"":1")); } [Fact] public static void FirstGenericArgNotStringFail() { - Assert.Throws(() => JsonSerializer.Parse>(@"{""Key1"":1}")); + Assert.Throws(() => JsonSerializer.Parse>(@"{""Key1"":1}")); } [Fact] diff --git a/src/System.Text.Json/tests/Serialization/EnumTests.cs b/src/System.Text.Json/tests/Serialization/EnumTests.cs index d8b6ea0c8b73..d541456155d3 100644 --- a/src/System.Text.Json/tests/Serialization/EnumTests.cs +++ b/src/System.Text.Json/tests/Serialization/EnumTests.cs @@ -21,7 +21,7 @@ public static class EnumTests [Fact] public static void EnumAsStringFail() { - Assert.Throws(() => JsonSerializer.Parse(s_jsonStringEnum)); + Assert.Throws(() => JsonSerializer.Parse(s_jsonStringEnum)); } [Fact] diff --git a/src/System.Text.Json/tests/Serialization/ExceptionTests.cs b/src/System.Text.Json/tests/Serialization/ExceptionTests.cs new file mode 100644 index 000000000000..ccb8fda44cff --- /dev/null +++ b/src/System.Text.Json/tests/Serialization/ExceptionTests.cs @@ -0,0 +1,83 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Collections.Generic; +using System.Reflection; +using Xunit; + +namespace System.Text.Json.Serialization.Tests +{ + public static partial class ExceptionTests + { + [Fact] + public static void RootThrownFromReader() + { + try + { + int i2 = JsonSerializer.Parse("12bad"); + Assert.True(false, "Expected JsonException was not thrown."); + } + catch (JsonException e) + { + Assert.Equal(0, e.LineNumber); + Assert.Equal(2, e.BytePositionInLine); + Assert.Equal("[System.Int32]", e.Path); + Assert.Contains("Path: [System.Int32] | LineNumber: 0 | BytePositionInLine: 2.", e.Message); + + // Verify Path is not repeated. + Assert.True(e.Message.IndexOf("Path:") == e.Message.LastIndexOf("Path:")); + } + } + + [Fact] + public static void ThrownFromSerializer() + { + try + { + JsonSerializer.Parse>(@"{""Key"":1, ""Key"":2}"); + Assert.True(false, "Expected JsonException was not thrown."); + } + catch (JsonException e) + { + Assert.Equal(0, e.LineNumber); + Assert.Equal(17, e.BytePositionInLine); + Assert.Contains("LineNumber: 0 | BytePositionInLine: 17.", e.Message); + Assert.Contains("[System.Collections.Generic.IDictionary`2", e.Path); + + // Verify Path is not repeated. + Assert.True(e.Message.IndexOf("Path:") == e.Message.LastIndexOf("Path:")); + } + } + + [Fact] + public static void ThrownFromReader() + { + string json = Encoding.UTF8.GetString(BasicCompany.s_data); + + json = json.Replace(@"""zip"" : 98052", @"""zip"" : bad"); + + try + { + JsonSerializer.Parse(json); + Assert.True(false, "Expected JsonException was not thrown."); + } + catch (JsonException e) + { + Assert.Equal(18, e.LineNumber); + Assert.Equal(8, e.BytePositionInLine); + Assert.Equal("[System.Text.Json.Serialization.Tests.BasicCompany].mainSite.zip", e.Path); + Assert.Contains("Path: [System.Text.Json.Serialization.Tests.BasicCompany].mainSite.zip | LineNumber: 18 | BytePositionInLine: 8.", + e.Message); + + // Verify Path is not repeated. + Assert.True(e.Message.IndexOf("Path:") == e.Message.LastIndexOf("Path:")); + + Assert.NotNull(e.InnerException); + JsonException inner = (JsonException)e.InnerException; + Assert.Equal(18, inner.LineNumber); + Assert.Equal(8, inner.BytePositionInLine); + } + } + } +} diff --git a/src/System.Text.Json/tests/Serialization/Object.ReadTests.cs b/src/System.Text.Json/tests/Serialization/Object.ReadTests.cs index 6e455d8ad0eb..bcc76b72396d 100644 --- a/src/System.Text.Json/tests/Serialization/Object.ReadTests.cs +++ b/src/System.Text.Json/tests/Serialization/Object.ReadTests.cs @@ -80,21 +80,21 @@ public static void EmptyClassWithRandomData() [Fact] public static void ReadObjectFail() { - Assert.Throws(() => JsonSerializer.Parse("blah")); - Assert.Throws(() => JsonSerializer.Parse("blah")); + Assert.Throws(() => JsonSerializer.Parse("blah")); + Assert.Throws(() => JsonSerializer.Parse("blah")); - Assert.Throws(() => JsonSerializer.Parse("true")); + Assert.Throws(() => JsonSerializer.Parse("true")); - Assert.Throws(() => JsonSerializer.Parse("null.")); - Assert.Throws(() => JsonSerializer.Parse("null.")); + Assert.Throws(() => JsonSerializer.Parse("null.")); + Assert.Throws(() => JsonSerializer.Parse("null.")); } [Fact] public static void ParseUntyped() { // Not supported until we are able to deserialize into JsonElement. - Assert.Throws(() => JsonSerializer.Parse("[]")); - Assert.Throws(() => JsonSerializer.Parse("[]")); + Assert.Throws(() => JsonSerializer.Parse("[]")); + Assert.Throws(() => JsonSerializer.Parse("[]")); } [Fact] diff --git a/src/System.Text.Json/tests/Serialization/OptionsTests.cs b/src/System.Text.Json/tests/Serialization/OptionsTests.cs index be416b02c6d2..2806ee5c1957 100644 --- a/src/System.Text.Json/tests/Serialization/OptionsTests.cs +++ b/src/System.Text.Json/tests/Serialization/OptionsTests.cs @@ -59,7 +59,7 @@ public static void DefaultBufferSize() [Fact] public static void AllowTrailingCommas() { - Assert.Throws(() => JsonSerializer.Parse("[1,]")); + Assert.Throws(() => JsonSerializer.Parse("[1,]")); var options = new JsonSerializerOptions(); options.AllowTrailingCommas = true; @@ -93,11 +93,11 @@ public static void WriteIndented() [Fact] public static void ReadCommentHandling() { - Assert.Throws(() => JsonSerializer.Parse("/* commment */")); + Assert.Throws(() => JsonSerializer.Parse("/* commment */")); var options = new JsonSerializerOptions(); - Assert.Throws(() => JsonSerializer.Parse("/* commment */", options)); + Assert.Throws(() => JsonSerializer.Parse("/* commment */", options)); options = new JsonSerializerOptions(); options.ReadCommentHandling = JsonCommentHandling.Allow; @@ -117,7 +117,7 @@ public static void MaxDepthRead() options = new JsonSerializerOptions(); options.MaxDepth = 1; - Assert.Throws(() => JsonSerializer.Parse(BasicCompany.s_data, options)); + Assert.Throws(() => JsonSerializer.Parse(BasicCompany.s_data, options)); } } } diff --git a/src/System.Text.Json/tests/Serialization/PolymorphicTests.cs b/src/System.Text.Json/tests/Serialization/PolymorphicTests.cs index 8f8a4d815c3f..eaa0cd58eb98 100644 --- a/src/System.Text.Json/tests/Serialization/PolymorphicTests.cs +++ b/src/System.Text.Json/tests/Serialization/PolymorphicTests.cs @@ -42,8 +42,8 @@ public static void PrimitivesAsRootObject() [Fact] public static void ReadPrimitivesFail() { - Assert.Throws(() => JsonSerializer.Parse(@"")); - Assert.Throws(() => JsonSerializer.Parse(@"a")); + Assert.Throws(() => JsonSerializer.Parse(@"")); + Assert.Throws(() => JsonSerializer.Parse(@"a")); } [Fact] diff --git a/src/System.Text.Json/tests/Serialization/PropertyNameTests.cs b/src/System.Text.Json/tests/Serialization/PropertyNameTests.cs index b9de228660fd..5f35532ead1b 100644 --- a/src/System.Text.Json/tests/Serialization/PropertyNameTests.cs +++ b/src/System.Text.Json/tests/Serialization/PropertyNameTests.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System.Collections.Generic; -using System.Text.Json.Tests; using Xunit; namespace System.Text.Json.Serialization.Tests diff --git a/src/System.Text.Json/tests/Serialization/TestClasses.cs b/src/System.Text.Json/tests/Serialization/TestClasses.cs index 1bc8df11ed95..919f18bd7912 100644 --- a/src/System.Text.Json/tests/Serialization/TestClasses.cs +++ b/src/System.Text.Json/tests/Serialization/TestClasses.cs @@ -898,26 +898,26 @@ public class BasicCompany : ITestClass public string name { get; set; } public static readonly byte[] s_data = Encoding.UTF8.GetBytes( - "{" + - @"""name"" : ""Microsoft""," + - @"""sites"" : [" + - "{" + - @"""street"" : ""1 Lone Tree Rd S""," + - @"""city"" : ""Fargo""," + - @"""zip"" : 58104" + - "}," + - "{" + - @"""street"" : ""8055 Microsoft Way""," + - @"""city"" : ""Charlotte""," + - @"""zip"" : 28273" + - "}" + - @"]," + - @"""mainSite"" : " + - "{" + - @"""street"" : ""1 Microsoft Way""," + - @"""city"" : ""Redmond""," + - @"""zip"" : 98052" + - "}" + + "{\n" + + @"""name"" : ""Microsoft""," + "\n" + + @"""sites"" :[" + "\n" + + "{\n" + + @"""street"" : ""1 Lone Tree Rd S""," + "\n" + + @"""city"" : ""Fargo""," + "\n" + + @"""zip"" : 58104" + "\n" + + "},\n" + + "{\n" + + @"""street"" : ""8055 Microsoft Way""," + "\n" + + @"""city"" : ""Charlotte""," + "\n" + + @"""zip"" : 28273" + "\n" + + "}\n" + + "],\n" + + @"""mainSite"":" + "\n" + + "{\n" + + @"""street"" : ""1 Microsoft Way""," + "\n" + + @"""city"" : ""Redmond""," + "\n" + + @"""zip"" : 98052" + "\n" + + "}\n" + "}"); public void Initialize() diff --git a/src/System.Text.Json/tests/Serialization/Value.ReadTests.cs b/src/System.Text.Json/tests/Serialization/Value.ReadTests.cs index cb5ee2e5020e..70722386de26 100644 --- a/src/System.Text.Json/tests/Serialization/Value.ReadTests.cs +++ b/src/System.Text.Json/tests/Serialization/Value.ReadTests.cs @@ -37,10 +37,10 @@ public static void ReadPrimitives() [Fact] public static void ReadPrimitivesFail() { - Assert.Throws(() => JsonSerializer.Parse(Encoding.UTF8.GetBytes(@"a"))); - Assert.Throws(() => JsonSerializer.Parse(Encoding.UTF8.GetBytes(@"[1,a]"))); - Assert.Throws(() => JsonSerializer.Parse(@"null")); - Assert.Throws(() => JsonSerializer.Parse(@"""""")); + Assert.Throws(() => JsonSerializer.Parse(Encoding.UTF8.GetBytes(@"a"))); + Assert.Throws(() => JsonSerializer.Parse(Encoding.UTF8.GetBytes(@"[1,a]"))); + Assert.Throws(() => JsonSerializer.Parse(@"null")); + Assert.Throws(() => JsonSerializer.Parse(@"""""")); } [Fact] @@ -70,80 +70,80 @@ public static void EmptyStringInput() public static void ReadPrimitiveArrayFail() { // Invalid data - Assert.Throws(() => JsonSerializer.Parse(Encoding.UTF8.GetBytes(@"[1,""a""]"))); + Assert.Throws(() => JsonSerializer.Parse(Encoding.UTF8.GetBytes(@"[1,""a""]"))); // Multidimensional arrays currently not supported - Assert.Throws(() => JsonSerializer.Parse(Encoding.UTF8.GetBytes(@"[[1,2],[3,4]]"))); + Assert.Throws(() => JsonSerializer.Parse(Encoding.UTF8.GetBytes(@"[[1,2],[3,4]]"))); } [Fact] public static void ReadPrimitiveExtraBytesFail() { - Assert.Throws(() => JsonSerializer.Parse("[2] {3}")); - Assert.Throws(() => JsonSerializer.Parse(Encoding.UTF8.GetBytes(@"[2] {3}"))); + Assert.Throws(() => JsonSerializer.Parse("[2] {3}")); + Assert.Throws(() => JsonSerializer.Parse(Encoding.UTF8.GetBytes(@"[2] {3}"))); } [Fact] public static void RangeFail() { // These have custom code because the reader doesn't natively support: - Assert.Throws(() => JsonSerializer.Parse((byte.MinValue - 1).ToString())); - Assert.Throws(() => JsonSerializer.Parse((byte.MaxValue + 1).ToString())); - Assert.Throws(() => JsonSerializer.Parse((byte.MinValue - 1).ToString())); - Assert.Throws(() => JsonSerializer.Parse((byte.MaxValue + 1).ToString())); - - Assert.Throws(() => JsonSerializer.Parse((sbyte.MinValue - 1).ToString())); - Assert.Throws(() => JsonSerializer.Parse((sbyte.MaxValue + 1).ToString())); - Assert.Throws(() => JsonSerializer.Parse((sbyte.MinValue - 1).ToString())); - Assert.Throws(() => JsonSerializer.Parse((sbyte.MaxValue + 1).ToString())); - - Assert.Throws(() => JsonSerializer.Parse((short.MinValue - 1).ToString())); - Assert.Throws(() => JsonSerializer.Parse((short.MaxValue + 1).ToString())); - Assert.Throws(() => JsonSerializer.Parse((short.MinValue - 1).ToString())); - Assert.Throws(() => JsonSerializer.Parse((short.MaxValue + 1).ToString())); - - Assert.Throws(() => JsonSerializer.Parse((ushort.MinValue - 1).ToString())); - Assert.Throws(() => JsonSerializer.Parse((ushort.MaxValue + 1).ToString())); - Assert.Throws(() => JsonSerializer.Parse((ushort.MinValue - 1).ToString())); - Assert.Throws(() => JsonSerializer.Parse((ushort.MaxValue + 1).ToString())); + Assert.Throws(() => JsonSerializer.Parse((byte.MinValue - 1).ToString())); + Assert.Throws(() => JsonSerializer.Parse((byte.MaxValue + 1).ToString())); + Assert.Throws(() => JsonSerializer.Parse((byte.MinValue - 1).ToString())); + Assert.Throws(() => JsonSerializer.Parse((byte.MaxValue + 1).ToString())); + + Assert.Throws(() => JsonSerializer.Parse((sbyte.MinValue - 1).ToString())); + Assert.Throws(() => JsonSerializer.Parse((sbyte.MaxValue + 1).ToString())); + Assert.Throws(() => JsonSerializer.Parse((sbyte.MinValue - 1).ToString())); + Assert.Throws(() => JsonSerializer.Parse((sbyte.MaxValue + 1).ToString())); + + Assert.Throws(() => JsonSerializer.Parse((short.MinValue - 1).ToString())); + Assert.Throws(() => JsonSerializer.Parse((short.MaxValue + 1).ToString())); + Assert.Throws(() => JsonSerializer.Parse((short.MinValue - 1).ToString())); + Assert.Throws(() => JsonSerializer.Parse((short.MaxValue + 1).ToString())); + + Assert.Throws(() => JsonSerializer.Parse((ushort.MinValue - 1).ToString())); + Assert.Throws(() => JsonSerializer.Parse((ushort.MaxValue + 1).ToString())); + Assert.Throws(() => JsonSerializer.Parse((ushort.MinValue - 1).ToString())); + Assert.Throws(() => JsonSerializer.Parse((ushort.MaxValue + 1).ToString())); // To ensure range failure, just use double's MinValue and MaxValue (instead of float.MinValue\MaxValue +-1) - Assert.Throws(() => JsonSerializer.Parse(double.MinValue.ToString())); - Assert.Throws(() => JsonSerializer.Parse(double.MaxValue.ToString())); - Assert.Throws(() => JsonSerializer.Parse(double.MinValue.ToString())); - Assert.Throws(() => JsonSerializer.Parse(double.MaxValue.ToString())); + Assert.Throws(() => JsonSerializer.Parse(double.MinValue.ToString())); + Assert.Throws(() => JsonSerializer.Parse(double.MaxValue.ToString())); + Assert.Throws(() => JsonSerializer.Parse(double.MinValue.ToString())); + Assert.Throws(() => JsonSerializer.Parse(double.MaxValue.ToString())); // These are natively supported by the reader: - Assert.Throws(() => JsonSerializer.Parse(((long)int.MinValue - 1).ToString())); - Assert.Throws(() => JsonSerializer.Parse(((long)int.MaxValue + 1).ToString())); - Assert.Throws(() => JsonSerializer.Parse(((long)int.MinValue - 1).ToString())); - Assert.Throws(() => JsonSerializer.Parse(((long)int.MaxValue + 1).ToString())); - - Assert.Throws(() => JsonSerializer.Parse(((long)uint.MinValue - 1).ToString())); - Assert.Throws(() => JsonSerializer.Parse(((long)uint.MaxValue + 1).ToString())); - Assert.Throws(() => JsonSerializer.Parse(((long)uint.MinValue - 1).ToString())); - Assert.Throws(() => JsonSerializer.Parse(((long)uint.MaxValue + 1).ToString())); - - Assert.Throws(() => JsonSerializer.Parse(long.MinValue.ToString() + "0")); - Assert.Throws(() => JsonSerializer.Parse(long.MaxValue.ToString() + "0")); - Assert.Throws(() => JsonSerializer.Parse(long.MinValue.ToString() + "0")); - Assert.Throws(() => JsonSerializer.Parse(long.MaxValue.ToString() + "0")); - - Assert.Throws(() => JsonSerializer.Parse(ulong.MinValue.ToString() + "0")); - Assert.Throws(() => JsonSerializer.Parse(ulong.MaxValue.ToString() + "0")); - Assert.Throws(() => JsonSerializer.Parse(ulong.MinValue.ToString() + "0")); - Assert.Throws(() => JsonSerializer.Parse(ulong.MaxValue.ToString() + "0")); - - Assert.Throws(() => JsonSerializer.Parse(decimal.MinValue.ToString() + "0")); - Assert.Throws(() => JsonSerializer.Parse(decimal.MaxValue.ToString() + "0")); - Assert.Throws(() => JsonSerializer.Parse(decimal.MinValue.ToString() + "0")); - Assert.Throws(() => JsonSerializer.Parse(decimal.MaxValue.ToString() + "0")); + Assert.Throws(() => JsonSerializer.Parse(((long)int.MinValue - 1).ToString())); + Assert.Throws(() => JsonSerializer.Parse(((long)int.MaxValue + 1).ToString())); + Assert.Throws(() => JsonSerializer.Parse(((long)int.MinValue - 1).ToString())); + Assert.Throws(() => JsonSerializer.Parse(((long)int.MaxValue + 1).ToString())); + + Assert.Throws(() => JsonSerializer.Parse(((long)uint.MinValue - 1).ToString())); + Assert.Throws(() => JsonSerializer.Parse(((long)uint.MaxValue + 1).ToString())); + Assert.Throws(() => JsonSerializer.Parse(((long)uint.MinValue - 1).ToString())); + Assert.Throws(() => JsonSerializer.Parse(((long)uint.MaxValue + 1).ToString())); + + Assert.Throws(() => JsonSerializer.Parse(long.MinValue.ToString() + "0")); + Assert.Throws(() => JsonSerializer.Parse(long.MaxValue.ToString() + "0")); + Assert.Throws(() => JsonSerializer.Parse(long.MinValue.ToString() + "0")); + Assert.Throws(() => JsonSerializer.Parse(long.MaxValue.ToString() + "0")); + + Assert.Throws(() => JsonSerializer.Parse(ulong.MinValue.ToString() + "0")); + Assert.Throws(() => JsonSerializer.Parse(ulong.MaxValue.ToString() + "0")); + Assert.Throws(() => JsonSerializer.Parse(ulong.MinValue.ToString() + "0")); + Assert.Throws(() => JsonSerializer.Parse(ulong.MaxValue.ToString() + "0")); + + Assert.Throws(() => JsonSerializer.Parse(decimal.MinValue.ToString() + "0")); + Assert.Throws(() => JsonSerializer.Parse(decimal.MaxValue.ToString() + "0")); + Assert.Throws(() => JsonSerializer.Parse(decimal.MinValue.ToString() + "0")); + Assert.Throws(() => JsonSerializer.Parse(decimal.MaxValue.ToString() + "0")); // todo: determine why these don't throw (issue with reader?) - //Assert.Throws(() => JsonSerializer.Parse(double.MinValue.ToString() + "0")); - //Assert.Throws(() => JsonSerializer.Parse(double.MaxValue.ToString() + "0")); - //Assert.Throws(() => JsonSerializer.Parse(double.MinValue.ToString() + "0")); - //Assert.Throws(() => JsonSerializer.Parse(double.MaxValue.ToString() + "0")); + //Assert.Throws(() => JsonSerializer.Parse(double.MinValue.ToString() + "0")); + //Assert.Throws(() => JsonSerializer.Parse(double.MaxValue.ToString() + "0")); + //Assert.Throws(() => JsonSerializer.Parse(double.MinValue.ToString() + "0")); + //Assert.Throws(() => JsonSerializer.Parse(double.MaxValue.ToString() + "0")); } [Fact] @@ -190,51 +190,51 @@ public static void ValueFail() { string unexpectedString = @"""unexpected string"""; - Assert.Throws(() => JsonSerializer.Parse(unexpectedString)); - Assert.Throws(() => JsonSerializer.Parse(unexpectedString)); + Assert.Throws(() => JsonSerializer.Parse(unexpectedString)); + Assert.Throws(() => JsonSerializer.Parse(unexpectedString)); - Assert.Throws(() => JsonSerializer.Parse(unexpectedString)); - Assert.Throws(() => JsonSerializer.Parse(unexpectedString)); + Assert.Throws(() => JsonSerializer.Parse(unexpectedString)); + Assert.Throws(() => JsonSerializer.Parse(unexpectedString)); - Assert.Throws(() => JsonSerializer.Parse(unexpectedString)); - Assert.Throws(() => JsonSerializer.Parse(unexpectedString)); + Assert.Throws(() => JsonSerializer.Parse(unexpectedString)); + Assert.Throws(() => JsonSerializer.Parse(unexpectedString)); - Assert.Throws(() => JsonSerializer.Parse(unexpectedString)); - Assert.Throws(() => JsonSerializer.Parse(unexpectedString)); + Assert.Throws(() => JsonSerializer.Parse(unexpectedString)); + Assert.Throws(() => JsonSerializer.Parse(unexpectedString)); - Assert.Throws(() => JsonSerializer.Parse(unexpectedString)); - Assert.Throws(() => JsonSerializer.Parse(unexpectedString)); + Assert.Throws(() => JsonSerializer.Parse(unexpectedString)); + Assert.Throws(() => JsonSerializer.Parse(unexpectedString)); - Assert.Throws(() => JsonSerializer.Parse(unexpectedString)); - Assert.Throws(() => JsonSerializer.Parse(unexpectedString)); + Assert.Throws(() => JsonSerializer.Parse(unexpectedString)); + Assert.Throws(() => JsonSerializer.Parse(unexpectedString)); - Assert.Throws(() => JsonSerializer.Parse(unexpectedString)); - Assert.Throws(() => JsonSerializer.Parse(unexpectedString)); + Assert.Throws(() => JsonSerializer.Parse(unexpectedString)); + Assert.Throws(() => JsonSerializer.Parse(unexpectedString)); - Assert.Throws(() => JsonSerializer.Parse(unexpectedString)); - Assert.Throws(() => JsonSerializer.Parse(unexpectedString)); + Assert.Throws(() => JsonSerializer.Parse(unexpectedString)); + Assert.Throws(() => JsonSerializer.Parse(unexpectedString)); - Assert.Throws(() => JsonSerializer.Parse(unexpectedString)); - Assert.Throws(() => JsonSerializer.Parse(unexpectedString)); + Assert.Throws(() => JsonSerializer.Parse(unexpectedString)); + Assert.Throws(() => JsonSerializer.Parse(unexpectedString)); - Assert.Throws(() => JsonSerializer.Parse(unexpectedString)); - Assert.Throws(() => JsonSerializer.Parse(unexpectedString)); + Assert.Throws(() => JsonSerializer.Parse(unexpectedString)); + Assert.Throws(() => JsonSerializer.Parse(unexpectedString)); - Assert.Throws(() => JsonSerializer.Parse(unexpectedString)); - Assert.Throws(() => JsonSerializer.Parse(unexpectedString)); + Assert.Throws(() => JsonSerializer.Parse(unexpectedString)); + Assert.Throws(() => JsonSerializer.Parse(unexpectedString)); - Assert.Throws(() => JsonSerializer.Parse(unexpectedString)); - Assert.Throws(() => JsonSerializer.Parse(unexpectedString)); + Assert.Throws(() => JsonSerializer.Parse(unexpectedString)); + Assert.Throws(() => JsonSerializer.Parse(unexpectedString)); - Assert.Throws(() => JsonSerializer.Parse(unexpectedString)); - Assert.Throws(() => JsonSerializer.Parse(unexpectedString)); + Assert.Throws(() => JsonSerializer.Parse(unexpectedString)); + Assert.Throws(() => JsonSerializer.Parse(unexpectedString)); - Assert.Throws(() => JsonSerializer.Parse("1")); + Assert.Throws(() => JsonSerializer.Parse("1")); - Assert.Throws(() => JsonSerializer.Parse("1")); - Assert.Throws(() => JsonSerializer.Parse("1")); + Assert.Throws(() => JsonSerializer.Parse("1")); + Assert.Throws(() => JsonSerializer.Parse("1")); - Assert.Throws(() => JsonSerializer.Parse(unexpectedString)); + Assert.Throws(() => JsonSerializer.Parse(unexpectedString)); } [Fact] @@ -623,7 +623,7 @@ public static void ReadConversionFails() { JsonSerializer.Parse(data); } - catch (JsonReaderException exception) + catch (JsonException exception) { exceptionThrown = true; diff --git a/src/System.Text.Json/tests/System.Text.Json.Tests.csproj b/src/System.Text.Json/tests/System.Text.Json.Tests.csproj index d371902ce363..1183e02082b6 100644 --- a/src/System.Text.Json/tests/System.Text.Json.Tests.csproj +++ b/src/System.Text.Json/tests/System.Text.Json.Tests.csproj @@ -30,6 +30,7 @@ + @@ -72,4 +73,4 @@ - \ No newline at end of file + diff --git a/src/System.Text.Json/tests/Utf8JsonReaderTests.MultiSegment.cs b/src/System.Text.Json/tests/Utf8JsonReaderTests.MultiSegment.cs index c945bdde728b..2c5eaf3324c0 100644 --- a/src/System.Text.Json/tests/Utf8JsonReaderTests.MultiSegment.cs +++ b/src/System.Text.Json/tests/Utf8JsonReaderTests.MultiSegment.cs @@ -280,9 +280,9 @@ public static void InvalidJsonMultiSegmentWithEmptyFirst(string jsonString, int { while (json.Read()) ; - Assert.True(false, "Expected JsonReaderException for multi-segment data was not thrown."); + Assert.True(false, "Expected JsonException for multi-segment data was not thrown."); } - catch (JsonReaderException ex) + catch (JsonException ex) { Assert.Equal(expectedlineNumber, ex.LineNumber); Assert.Equal(expectedBytePosition, ex.BytePositionInLine); @@ -308,9 +308,9 @@ public static void InvalidJsonMultiSegmentByOne(string jsonString, int expectedl { while (json.Read()) ; - Assert.True(false, "Expected JsonReaderException for multi-segment data was not thrown."); + Assert.True(false, "Expected JsonException for multi-segment data was not thrown."); } - catch (JsonReaderException ex) + catch (JsonException ex) { Assert.Equal(expectedlineNumber, ex.LineNumber); Assert.Equal(expectedBytePosition, ex.BytePositionInLine); @@ -328,9 +328,9 @@ public static void EmptyJsonWithinSequenceIsInvalid() { while (json.Read()) ; - Assert.True(false, "Expected JsonReaderException was not thrown with single-segment data."); + Assert.True(false, "Expected JsonException was not thrown with single-segment data."); } - catch (JsonReaderException ex) + catch (JsonException ex) { Assert.Equal(0, ex.LineNumber); Assert.Equal(0, ex.BytePositionInLine); @@ -422,9 +422,9 @@ private static void SpanSequenceStatesAreEqualInvalidJson(byte[] dataUtf8, ReadO break; } } - Assert.True(false, "Expected JsonReaderException due to invalid JSON."); + Assert.True(false, "Expected JsonException due to invalid JSON."); } - catch (JsonReaderException) + catch (JsonException) { } } @@ -829,7 +829,7 @@ private static void TestReadTokenWithExtra(ReadOnlySequence sequence, Json Assert.Contains(reader.TokenType, new[] { JsonTokenType.EndArray, JsonTokenType.EndObject }); } - JsonTestHelper.AssertThrows(reader, (jsonReader) => + JsonTestHelper.AssertThrows(reader, (jsonReader) => { jsonReader.Read(); if (commentHandling == JsonCommentHandling.Allow && jsonReader.TokenType == JsonTokenType.Comment) @@ -940,7 +940,7 @@ private static void TrailingCommasHelper(ReadOnlySequence utf8, JsonReader if (expectThrow) { - JsonTestHelper.AssertThrows(reader, (jsonReader) => + JsonTestHelper.AssertThrows(reader, (jsonReader) => { while (jsonReader.Read()) ; diff --git a/src/System.Text.Json/tests/Utf8JsonReaderTests.cs b/src/System.Text.Json/tests/Utf8JsonReaderTests.cs index f8c0dacad1af..ea7a44304a6c 100644 --- a/src/System.Text.Json/tests/Utf8JsonReaderTests.cs +++ b/src/System.Text.Json/tests/Utf8JsonReaderTests.cs @@ -862,9 +862,9 @@ public static void TestDepthBeyondLimit(int depth) if (maxDepth < json.CurrentDepth) maxDepth = json.CurrentDepth; } - Assert.True(false, $"Expected JsonReaderException was not thrown. Max depth allowed = {json.CurrentState.Options.MaxDepth} | Max depth reached = {maxDepth}"); + Assert.True(false, $"Expected JsonException was not thrown. Max depth allowed = {json.CurrentState.Options.MaxDepth} | Max depth reached = {maxDepth}"); } - catch (JsonReaderException) + catch (JsonException) { } jsonStr = JsonTestHelper.WriteDepthArray(depth - 1); @@ -881,9 +881,9 @@ public static void TestDepthBeyondLimit(int depth) if (maxDepth < json.CurrentDepth) maxDepth = json.CurrentDepth; } - Assert.True(false, $"Expected JsonReaderException was not thrown. Max depth allowed = {json.CurrentState.Options.MaxDepth} | Max depth reached = {maxDepth}"); + Assert.True(false, $"Expected JsonException was not thrown. Max depth allowed = {json.CurrentState.Options.MaxDepth} | Max depth reached = {maxDepth}"); } - catch (JsonReaderException) + catch (JsonException) { } } @@ -1029,9 +1029,9 @@ public static void InvalidJsonSplitRemainsInvalid(string jsonString, int splitLo { while (json.Read()) ; - Assert.True(false, "Expected JsonReaderException was not thrown."); + Assert.True(false, "Expected JsonException was not thrown."); } - catch (JsonReaderException ex) + catch (JsonException ex) { Assert.Equal(expectedlineNumber, ex.LineNumber); Assert.Equal(expectedBytePosition, ex.BytePositionInLine); @@ -1079,9 +1079,9 @@ public static void InvalidJsonWhenPartial(string jsonString, int expectedlineNum { while (json.Read()) ; - Assert.True(false, "Expected JsonReaderException was not thrown."); + Assert.True(false, "Expected JsonException was not thrown."); } - catch (JsonReaderException ex) + catch (JsonException ex) { Assert.Equal(expectedlineNumber, ex.LineNumber); Assert.Equal(expectedBytePosition, ex.BytePositionInLine); @@ -1105,9 +1105,9 @@ public static void PositionInCodeUnits(string jsonString, int expectedlineNumber { while (json.Read()) ; - Assert.True(false, "Expected JsonReaderException was not thrown."); + Assert.True(false, "Expected JsonException was not thrown."); } - catch (JsonReaderException ex) + catch (JsonException ex) { Assert.Equal(expectedlineNumber, ex.LineNumber); Assert.Equal(expectedBytePosition, ex.BytePositionInLine); @@ -1130,9 +1130,9 @@ public static void InvalidJson(string jsonString, int expectedlineNumber, int ex { while (json.Read()) ; - Assert.True(false, "Expected JsonReaderException was not thrown with single-segment data."); + Assert.True(false, "Expected JsonException was not thrown with single-segment data."); } - catch (JsonReaderException ex) + catch (JsonException ex) { Assert.Equal(expectedlineNumber, ex.LineNumber); Assert.Equal(expectedBytePosition, ex.BytePositionInLine); @@ -1157,9 +1157,9 @@ public static void InvalidJsonSingleSegment(string jsonString, int expectedlineN { while (json.Read()) ; - Assert.True(false, "Expected JsonReaderException was not thrown with single-segment data."); + Assert.True(false, "Expected JsonException was not thrown with single-segment data."); } - catch (JsonReaderException ex) + catch (JsonException ex) { Assert.Equal(expectedlineNumber, ex.LineNumber); Assert.Equal(expectedBytePosition, ex.BytePositionInLine); @@ -1186,9 +1186,9 @@ public static void InvalidJsonSingleSegment(string jsonString, int expectedlineN while (jsonSlice.Read()) ; - Assert.True(false, "Expected JsonReaderException was not thrown with multi-segment data."); + Assert.True(false, "Expected JsonException was not thrown with multi-segment data."); } - catch (JsonReaderException ex) + catch (JsonException ex) { string errorMessage = $"expectedLineNumber: {expectedlineNumber} | actual: {ex.LineNumber} | index: {i} | option: {commentHandling}"; string firstSegmentString = Encoding.UTF8.GetString(dataUtf8, 0, i); @@ -1589,9 +1589,9 @@ public static void CommentsAreInvalidByDefault(string jsonString, int expectedli break; } } - Assert.True(false, "Expected JsonReaderException was not thrown with single-segment data."); + Assert.True(false, "Expected JsonException was not thrown with single-segment data."); } - catch (JsonReaderException ex) + catch (JsonException ex) { Assert.Equal(expectedlineNumber, ex.LineNumber); Assert.Equal(expectedPosition, ex.BytePositionInLine); @@ -1649,9 +1649,9 @@ public static void CommentsAreInvalidByDefaultSingleSegment(string jsonString, i break; } } - Assert.True(false, "Expected JsonReaderException was not thrown with single-segment data."); + Assert.True(false, "Expected JsonException was not thrown with single-segment data."); } - catch (JsonReaderException ex) + catch (JsonException ex) { Assert.Equal(expectedlineNumber, ex.LineNumber); Assert.Equal(expectedPosition, ex.BytePositionInLine); @@ -1686,9 +1686,9 @@ public static void CommentsAreInvalidByDefaultSingleSegment(string jsonString, i } } - Assert.True(false, "Expected JsonReaderException was not thrown with multi-segment data."); + Assert.True(false, "Expected JsonException was not thrown with multi-segment data."); } - catch (JsonReaderException ex) + catch (JsonException ex) { Assert.Equal(expectedlineNumber, ex.LineNumber); Assert.Equal(expectedPosition, ex.BytePositionInLine); @@ -1763,9 +1763,9 @@ public static void InvalidJsonWithComments(string jsonString, int expectedlineNu { while (json.Read()) ; - Assert.True(false, "Expected JsonReaderException was not thrown with single-segment data."); + Assert.True(false, "Expected JsonException was not thrown with single-segment data."); } - catch (JsonReaderException ex) + catch (JsonException ex) { Assert.Equal(expectedlineNumber, ex.LineNumber); Assert.Equal(expectedPosition, ex.BytePositionInLine); @@ -1778,9 +1778,9 @@ public static void InvalidJsonWithComments(string jsonString, int expectedlineNu { while (json.Read()) ; - Assert.True(false, "Expected JsonReaderException was not thrown with single-segment data."); + Assert.True(false, "Expected JsonException was not thrown with single-segment data."); } - catch (JsonReaderException ex) + catch (JsonException ex) { Assert.Equal(expectedlineNumber, ex.LineNumber); Assert.Equal(expectedPosition, ex.BytePositionInLine); @@ -1849,9 +1849,9 @@ public static void InvalidJsonWithCommentsSingleSegment(string jsonString, int e { while (json.Read()) ; - Assert.True(false, "Expected JsonReaderException was not thrown with single-segment data."); + Assert.True(false, "Expected JsonException was not thrown with single-segment data."); } - catch (JsonReaderException ex) + catch (JsonException ex) { Assert.Equal(expectedlineNumber, ex.LineNumber); Assert.Equal(expectedPosition, ex.BytePositionInLine); @@ -1868,9 +1868,9 @@ public static void EmptyJsonIsInvalid() { while (json.Read()) ; - Assert.True(false, "Expected JsonReaderException was not thrown with single-segment data."); + Assert.True(false, "Expected JsonException was not thrown with single-segment data."); } - catch (JsonReaderException ex) + catch (JsonException ex) { Assert.Equal(0, ex.LineNumber); Assert.Equal(0, ex.BytePositionInLine); @@ -1887,9 +1887,9 @@ public static void JsonContainingOnlyWhitespaceIsInvalid() { while (json.Read()) ; - Assert.True(false, "Expected JsonReaderException was not thrown with single-segment data."); + Assert.True(false, "Expected JsonException was not thrown with single-segment data."); } - catch (JsonReaderException ex) + catch (JsonException ex) { Assert.Equal(0, ex.LineNumber); Assert.Equal(1, ex.BytePositionInLine); @@ -1913,9 +1913,9 @@ public static void JsonContainingOnlyCommentsIsInvalid(string jsonString, int ex { while (json.Read()) ; - Assert.True(false, "Expected JsonReaderException was not thrown with single-segment data."); + Assert.True(false, "Expected JsonException was not thrown with single-segment data."); } - catch (JsonReaderException ex) + catch (JsonException ex) { Assert.Equal(expectedLineNumber, ex.LineNumber); Assert.Equal(expectedConsumed, ex.BytePositionInLine); @@ -2218,7 +2218,7 @@ private static void TestReadTokenWithExtra(byte[] utf8, JsonCommentHandling comm Assert.Contains(reader.TokenType, new[] { JsonTokenType.EndArray, JsonTokenType.EndObject }); } - JsonTestHelper.AssertThrows(reader, (jsonReader) => + JsonTestHelper.AssertThrows(reader, (jsonReader) => { jsonReader.Read(); if (commentHandling == JsonCommentHandling.Allow && jsonReader.TokenType == JsonTokenType.Comment) @@ -2325,7 +2325,7 @@ private static void TrailingCommasHelper(byte[] utf8, JsonReaderState state, boo if (expectThrow) { - JsonTestHelper.AssertThrows(reader, (jsonReader) => + JsonTestHelper.AssertThrows(reader, (jsonReader) => { while (jsonReader.Read()) ; @@ -2426,7 +2426,7 @@ private static void TrailingCommasHelperPartial(byte[] utf8, JsonReaderState sta { if (expectThrow) { - Assert.Throws(() => PartialReaderLoop(utf8, state)); + Assert.ThrowsAny(() => PartialReaderLoop(utf8, state)); } else { From 556650604e1976e8b02002b22f0bb6aba149cdb3 Mon Sep 17 00:00:00 2001 From: Afsaneh Rafighi Date: Mon, 6 May 2019 19:58:03 -0700 Subject: [PATCH 244/607] update Area Owners (#37475) --- Documentation/project-docs/issue-guide.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/project-docs/issue-guide.md b/Documentation/project-docs/issue-guide.md index d53c79d494c0..fd6e4599f7d8 100644 --- a/Documentation/project-docs/issue-guide.md +++ b/Documentation/project-docs/issue-guide.md @@ -53,8 +53,8 @@ Areas are tracked by labels area-* (e.g. area-System.Collections). Each area | [System.Composition](https://github.com/dotnet/corefx/labels/area-System.Composition) | **[@maryamariyan](https://github.com/maryamariyan)**, [@ViktorHofer](https://github.com/ViktorHofer) | | | [System.Configuration](https://github.com/dotnet/corefx/labels/area-System.Configuration) | **[@maryamariyan](https://github.com/maryamariyan)**, [@safern](https://github.com/safern) | | | [System.Console](https://github.com/dotnet/corefx/labels/area-System.Console) | [@wtgodbe](https://github.com/wtgodbe) | | -| [System.Data](https://github.com/dotnet/corefx/labels/area-System.Data) | **[@divega](https://github.com/divega)**, [@ajcvickers](https://github.com/ajcvickers), [@afsanehr](https://github.com/afsanehr), [@david-engel](https://github.com/david-engel), [@tarikulsabbir](https://github.com/tarikulsabbir), [@Gary-Zh ](https://github.com/Gary-Zh) | | -| [System.Data.SqlClient](https://github.com/dotnet/corefx/labels/area-System.Data.SqlClient) | **[@afsanehr](https://github.com/afsanehr)**, [@tarikulsabbir](https://github.com/tarikulsabbir), [@Gary-Zh ](https://github.com/Gary-Zh), [@david-engel](https://github.com/david-engel) | | +| [System.Data](https://github.com/dotnet/corefx/labels/area-System.Data) | **[@divega](https://github.com/divega)**, [@ajcvickers](https://github.com/ajcvickers), [@afsanehr](https://github.com/afsanehr), [@david-engel](https://github.com/david-engel), [@Gary-Zh ](https://github.com/Gary-Zh) | | +| [System.Data.SqlClient](https://github.com/dotnet/corefx/labels/area-System.Data.SqlClient) | **[@afsanehr](https://github.com/afsanehr)**, [@Gary-Zh ](https://github.com/Gary-Zh), [@david-engel](https://github.com/david-engel) | | | [System.Diagnostics](https://github.com/dotnet/corefx/labels/area-System.Diagnostics) | **[@wtgodbe](https://github.com/wtgodbe)**, [@krwq](https://github.com/krwq) |
  • System.Diagnostics.EventLog - [@Anipik](https://github.com/Anipik)
| | [System.Diagnostics.Process](https://github.com/dotnet/corefx/labels/area-System.Diagnostics.Process) | **[@wtgodbe](https://github.com/wtgodbe)**, [@krwq](https://github.com/krwq) | | | [System.Diagnostics.Tracing](https://github.com/dotnet/corefx/labels/area-System.Diagnostics.Tracing) | [@noahfalk](https://github.com/noahfalk), [@tommcdon](https://github.com/tommcdon), [@Anipik](https://github.com/Anipik) | Packages:
  • System.Diagnostics.DiagnosticSource
  • System.Diagnostics.PerformanceCounter - [@Anipik](https://github.com/Anipik)
  • System.Diagnostics.Tracing
  • System.Diagnostics.TraceSource - [@Anipik](https://github.com/Anipik)

| From 28a926b5b38eefb18cd77b4cb0b74fdda99cdb26 Mon Sep 17 00:00:00 2001 From: Anirudh Agnihotry Date: Mon, 6 May 2019 21:27:07 -0700 Subject: [PATCH 245/607] Making ctors internal for types with internal abstract methods (#37479) * making ctors internal for types with internal abstract methods * fixing build error --- .../ref/System.Data.Common.cs | 2 +- .../src/System/Data/Constraint.cs | 2 + .../System.Diagnostics.Tracing.Counters.cs | 2 +- .../ref/System.Linq.Queryable.cs | 4 +- .../src/System/Linq/EnumerableExecutor.cs | 2 + .../src/System/Linq/EnumerableQuery.cs | 3 ++ .../System/Xml/Schema/XmlSchemaDataType.cs | 1 + .../System/Xml/Schema/XmlSchemaGroupBase.cs | 2 + .../ref/System.Security.AccessControl.cs | 2 +- .../AccessControl/SecurityDescriptor.cs | 2 +- .../ref/System.Xml.ReaderWriter.cs | 4 +- ...iCompatBaseline.netcoreapp.netstandard.txt | 37 ++++++++++++++++++- ...patBaseline.netcoreapp.netstandardOnly.txt | 34 ++++++++++++++++- .../ApiCompatBaseline.uap.netstandard.txt | 37 ++++++++++++++++++- .../ApiCompatBaseline.uap.netstandardOnly.txt | 34 ++++++++++++++++- .../ApiCompatBaseline.uapaot.netstandard.txt | 37 ++++++++++++++++++- ...iCompatBaseline.uapaot.netstandardOnly.txt | 34 ++++++++++++++++- 17 files changed, 225 insertions(+), 14 deletions(-) diff --git a/src/System.Data.Common/ref/System.Data.Common.cs b/src/System.Data.Common/ref/System.Data.Common.cs index 6a2b6a62cdf8..e5b687944da4 100644 --- a/src/System.Data.Common/ref/System.Data.Common.cs +++ b/src/System.Data.Common/ref/System.Data.Common.cs @@ -48,7 +48,7 @@ public enum ConnectionState [System.ComponentModel.DefaultPropertyAttribute("ConstraintName")] public abstract partial class Constraint { - protected Constraint() { } + internal Constraint() { } [System.ComponentModel.DefaultValueAttribute("")] public virtual string ConstraintName { get { throw null; } set { } } [System.ComponentModel.BrowsableAttribute(false)] diff --git a/src/System.Data.Common/src/System/Data/Constraint.cs b/src/System.Data.Common/src/System/Data/Constraint.cs index a5aa86c220f1..7fc5cdad3285 100644 --- a/src/System.Data.Common/src/System/Data/Constraint.cs +++ b/src/System.Data.Common/src/System/Data/Constraint.cs @@ -20,6 +20,8 @@ public abstract class Constraint internal string _name = string.Empty; internal PropertyCollection _extendedProperties = null; + internal Constraint() {} + /// /// The name of this constraint within the . /// diff --git a/src/System.Diagnostics.Tracing/ref/System.Diagnostics.Tracing.Counters.cs b/src/System.Diagnostics.Tracing/ref/System.Diagnostics.Tracing.Counters.cs index 9667593b63ab..b07e7004650f 100644 --- a/src/System.Diagnostics.Tracing/ref/System.Diagnostics.Tracing.Counters.cs +++ b/src/System.Diagnostics.Tracing/ref/System.Diagnostics.Tracing.Counters.cs @@ -2,7 +2,7 @@ namespace System.Diagnostics.Tracing { public abstract partial class DiagnosticCounter : System.IDisposable { - public DiagnosticCounter(string name, System.Diagnostics.Tracing.EventSource eventSource) { } + internal DiagnosticCounter(string name, System.Diagnostics.Tracing.EventSource eventSource) { } public void AddMetadata(string key, string value) { } public void Dispose() { } public string DisplayName { get { throw null; } set { } } diff --git a/src/System.Linq.Queryable/ref/System.Linq.Queryable.cs b/src/System.Linq.Queryable/ref/System.Linq.Queryable.cs index 47a135240c1b..4e552c7c3de1 100644 --- a/src/System.Linq.Queryable/ref/System.Linq.Queryable.cs +++ b/src/System.Linq.Queryable/ref/System.Linq.Queryable.cs @@ -9,7 +9,7 @@ namespace System.Linq { public abstract partial class EnumerableExecutor { - protected EnumerableExecutor() { } + internal EnumerableExecutor() { } } public partial class EnumerableExecutor : System.Linq.EnumerableExecutor { @@ -17,7 +17,7 @@ public EnumerableExecutor(System.Linq.Expressions.Expression expression) { } } public abstract partial class EnumerableQuery { - protected EnumerableQuery() { } + internal EnumerableQuery() { } } public partial class EnumerableQuery : System.Linq.EnumerableQuery, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable, System.Linq.IOrderedQueryable, System.Linq.IOrderedQueryable, System.Linq.IQueryable, System.Linq.IQueryable, System.Linq.IQueryProvider { diff --git a/src/System.Linq.Queryable/src/System/Linq/EnumerableExecutor.cs b/src/System.Linq.Queryable/src/System/Linq/EnumerableExecutor.cs index 06257313e058..92bf4717d442 100644 --- a/src/System.Linq.Queryable/src/System/Linq/EnumerableExecutor.cs +++ b/src/System.Linq.Queryable/src/System/Linq/EnumerableExecutor.cs @@ -11,6 +11,8 @@ public abstract class EnumerableExecutor { internal abstract object ExecuteBoxed(); + internal EnumerableExecutor() { } + internal static EnumerableExecutor Create(Expression expression) { Type execType = typeof(EnumerableExecutor<>).MakeGenericType(expression.Type); diff --git a/src/System.Linq.Queryable/src/System/Linq/EnumerableQuery.cs b/src/System.Linq.Queryable/src/System/Linq/EnumerableQuery.cs index 37c521d46bbf..369c71c75051 100644 --- a/src/System.Linq.Queryable/src/System/Linq/EnumerableQuery.cs +++ b/src/System.Linq.Queryable/src/System/Linq/EnumerableQuery.cs @@ -12,6 +12,9 @@ public abstract class EnumerableQuery { internal abstract Expression Expression { get; } internal abstract IEnumerable Enumerable { get; } + + internal EnumerableQuery() {} + internal static IQueryable Create(Type elementType, IEnumerable sequence) { Type seqType = typeof(EnumerableQuery<>).MakeGenericType(elementType); diff --git a/src/System.Private.Xml/src/System/Xml/Schema/XmlSchemaDataType.cs b/src/System.Private.Xml/src/System/Xml/Schema/XmlSchemaDataType.cs index 284021ca049a..f515a4a0adb7 100644 --- a/src/System.Private.Xml/src/System/Xml/Schema/XmlSchemaDataType.cs +++ b/src/System.Private.Xml/src/System/Xml/Schema/XmlSchemaDataType.cs @@ -22,6 +22,7 @@ public abstract class XmlSchemaDatatype public virtual XmlSchemaDatatypeVariety Variety { get { return XmlSchemaDatatypeVariety.Atomic; } } + internal XmlSchemaDatatype() {} public virtual object ChangeType(object value, Type targetType) { diff --git a/src/System.Private.Xml/src/System/Xml/Schema/XmlSchemaGroupBase.cs b/src/System.Private.Xml/src/System/Xml/Schema/XmlSchemaGroupBase.cs index 66ab4083fc42..f098702733cd 100644 --- a/src/System.Private.Xml/src/System/Xml/Schema/XmlSchemaGroupBase.cs +++ b/src/System.Private.Xml/src/System/Xml/Schema/XmlSchemaGroupBase.cs @@ -8,6 +8,8 @@ namespace System.Xml.Schema public abstract class XmlSchemaGroupBase : XmlSchemaParticle { + internal XmlSchemaGroupBase() {} + [XmlIgnore] public abstract XmlSchemaObjectCollection Items { get; } diff --git a/src/System.Security.AccessControl/ref/System.Security.AccessControl.cs b/src/System.Security.AccessControl/ref/System.Security.AccessControl.cs index 4d05cc2b4b7f..0e34e54d9a84 100644 --- a/src/System.Security.AccessControl/ref/System.Security.AccessControl.cs +++ b/src/System.Security.AccessControl/ref/System.Security.AccessControl.cs @@ -297,7 +297,7 @@ void System.Collections.ICollection.CopyTo(System.Array array, int index) { } } public abstract partial class GenericSecurityDescriptor { - protected GenericSecurityDescriptor() { } + internal GenericSecurityDescriptor() { } public int BinaryLength { get { throw null; } } public abstract System.Security.AccessControl.ControlFlags ControlFlags { get; } public abstract System.Security.Principal.SecurityIdentifier Group { get; set; } diff --git a/src/System.Security.AccessControl/src/System/Security/AccessControl/SecurityDescriptor.cs b/src/System.Security.AccessControl/src/System/Security/AccessControl/SecurityDescriptor.cs index 05b0e025a136..aa431a51e251 100644 --- a/src/System.Security.AccessControl/src/System/Security/AccessControl/SecurityDescriptor.cs +++ b/src/System.Security.AccessControl/src/System/Security/AccessControl/SecurityDescriptor.cs @@ -102,7 +102,7 @@ internal static int UnmarshalInt(byte[] binaryForm, int offset) #region Constructors - protected GenericSecurityDescriptor() + internal GenericSecurityDescriptor() { } #endregion diff --git a/src/System.Xml.ReaderWriter/ref/System.Xml.ReaderWriter.cs b/src/System.Xml.ReaderWriter/ref/System.Xml.ReaderWriter.cs index 6c474d760e5e..14c30dbb685f 100644 --- a/src/System.Xml.ReaderWriter/ref/System.Xml.ReaderWriter.cs +++ b/src/System.Xml.ReaderWriter/ref/System.Xml.ReaderWriter.cs @@ -1726,7 +1726,7 @@ public enum XmlSchemaContentType } public abstract partial class XmlSchemaDatatype { - protected XmlSchemaDatatype() { } + internal XmlSchemaDatatype() { } public abstract System.Xml.XmlTokenizedType TokenizedType { get; } public virtual System.Xml.Schema.XmlTypeCode TypeCode { get { throw null; } } public abstract System.Type ValueType { get; } @@ -1891,7 +1891,7 @@ public XmlSchemaGroup() { } } public abstract partial class XmlSchemaGroupBase : System.Xml.Schema.XmlSchemaParticle { - protected XmlSchemaGroupBase() { } + internal XmlSchemaGroupBase() { } [System.Xml.Serialization.XmlIgnoreAttribute] public abstract System.Xml.Schema.XmlSchemaObjectCollection Items { get; } } diff --git a/src/shims/ApiCompatBaseline.netcoreapp.netstandard.txt b/src/shims/ApiCompatBaseline.netcoreapp.netstandard.txt index 9b33da3ea6e7..7d9a9a731b88 100644 --- a/src/shims/ApiCompatBaseline.netcoreapp.netstandard.txt +++ b/src/shims/ApiCompatBaseline.netcoreapp.netstandard.txt @@ -33,4 +33,39 @@ CannotMakeMemberNonVirtual : Member 'System.ComponentModel.BaseNumberConverter.C CannotMakeMemberNonVirtual : Member 'System.ComponentModel.BaseNumberConverter.CanConvertTo(System.ComponentModel.ITypeDescriptorContext, System.Type)' is non-virtual in the implementation but is virtual in the contract. CannotMakeMemberNonVirtual : Member 'System.ComponentModel.BaseNumberConverter.ConvertFrom(System.ComponentModel.ITypeDescriptorContext, System.Globalization.CultureInfo, System.Object)' is non-virtual in the implementation but is virtual in the contract. CannotMakeMemberNonVirtual : Member 'System.ComponentModel.BaseNumberConverter.ConvertTo(System.ComponentModel.ITypeDescriptorContext, System.Globalization.CultureInfo, System.Object, System.Type)' is non-virtual in the implementation but is virtual in the contract. -Total Issues: 27 +Compat issues with assembly System.Xml.Schema: +CannotSealType : Type 'System.Xml.Schema.XmlSchemaDatatype' is effectively (has a private constructor) sealed in the implementation but not sealed in the contract. +MembersMustExist : Member 'System.Xml.Schema.XmlSchemaDatatype..ctor()' does not exist in the implementation but it does exist in the contract. +CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.TokenizedType' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.TypeCode' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.ValueType' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.Variety' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.ChangeType(System.Object, System.Type)' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.ChangeType(System.Object, System.Type, System.Xml.IXmlNamespaceResolver)' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.IsDerivedFrom(System.Xml.Schema.XmlSchemaDatatype)' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.ParseValue(System.String, System.Xml.XmlNameTable, System.Xml.IXmlNamespaceResolver)' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.TokenizedType.get()' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.TypeCode.get()' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.ValueType.get()' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.Variety.get()' is non-virtual in the implementation but is virtual in the contract. +Compat issues with assembly System.Xml.ReaderWriter: +CannotSealType : Type 'System.Xml.Schema.XmlSchemaGroupBase' is effectively (has a private constructor) sealed in the implementation but not sealed in the contract. +MembersMustExist : Member 'System.Xml.Schema.XmlSchemaGroupBase..ctor()' does not exist in the implementation but it does exist in the contract. +CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaGroupBase.Items' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaGroupBase.Items.get()' is non-virtual in the implementation but is virtual in the contract. +Compat issues with assembly System.Data.Constraint: +CannotSealType : Type 'System.Data.Constraint' is effectively (has a private constructor) sealed in the implementation but not sealed in the contract. +MembersMustExist : Member 'System.Data.Constraint..ctor()' does not exist in the implementation but it does exist in the contract. +CannotMakeMemberNonVirtual : Member 'System.Data.Constraint.ConstraintName' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.Data.Constraint.Table' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.Data.Constraint._DataSet' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.Data.Constraint.ConstraintName.get()' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.Data.Constraint.ConstraintName.set(System.String)' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.Data.Constraint.Table.get()' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.Data.Constraint.ToString()' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.Data.Constraint._DataSet.get()' is non-virtual in the implementation but is virtual in the contract. +CannotSealType : Type 'System.Linq.EnumerableExecutor' is effectively (has a private constructor) sealed in the implementation but not sealed in the contract. +MembersMustExist : Member 'System.Linq.EnumerableExecutor..ctor()' does not exist in the implementation but it does exist in the contract. +CannotSealType : Type 'System.Linq.EnumerableQuery' is effectively (has a private constructor) sealed in the implementation but not sealed in the contract. +MembersMustExist : Member 'System.Linq.EnumerableQuery..ctor()' does not exist in the implementation but it does exist in the contract. +Total Issues: 59 \ No newline at end of file diff --git a/src/shims/ApiCompatBaseline.netcoreapp.netstandardOnly.txt b/src/shims/ApiCompatBaseline.netcoreapp.netstandardOnly.txt index a5f2a50cd687..6bc6075ce54c 100644 --- a/src/shims/ApiCompatBaseline.netcoreapp.netstandardOnly.txt +++ b/src/shims/ApiCompatBaseline.netcoreapp.netstandardOnly.txt @@ -85,4 +85,36 @@ CannotMakeMemberNonVirtual : Member 'System.ComponentModel.BaseNumberConverter.C CannotMakeMemberNonVirtual : Member 'System.ComponentModel.BaseNumberConverter.CanConvertTo(System.ComponentModel.ITypeDescriptorContext, System.Type)' is non-virtual in the implementation but is virtual in the contract. CannotMakeMemberNonVirtual : Member 'System.ComponentModel.BaseNumberConverter.ConvertFrom(System.ComponentModel.ITypeDescriptorContext, System.Globalization.CultureInfo, System.Object)' is non-virtual in the implementation but is virtual in the contract. CannotMakeMemberNonVirtual : Member 'System.ComponentModel.BaseNumberConverter.ConvertTo(System.ComponentModel.ITypeDescriptorContext, System.Globalization.CultureInfo, System.Object, System.Type)' is non-virtual in the implementation but is virtual in the contract. -Total Issues: 86 +CannotSealType : Type 'System.Xml.Schema.XmlSchemaDatatype' is effectively (has a private constructor) sealed in the implementation but not sealed in the contract. +MembersMustExist : Member 'System.Xml.Schema.XmlSchemaDatatype..ctor()' does not exist in the implementation but it does exist in the contract. +CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.TokenizedType' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.TypeCode' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.ValueType' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.Variety' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.ChangeType(System.Object, System.Type)' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.ChangeType(System.Object, System.Type, System.Xml.IXmlNamespaceResolver)' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.IsDerivedFrom(System.Xml.Schema.XmlSchemaDatatype)' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.ParseValue(System.String, System.Xml.XmlNameTable, System.Xml.IXmlNamespaceResolver)' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.TokenizedType.get()' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.TypeCode.get()' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.ValueType.get()' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.Variety.get()' is non-virtual in the implementation but is virtual in the contract. +CannotSealType : Type 'System.Xml.Schema.XmlSchemaGroupBase' is effectively (has a private constructor) sealed in the implementation but not sealed in the contract. +MembersMustExist : Member 'System.Xml.Schema.XmlSchemaGroupBase..ctor()' does not exist in the implementation but it does exist in the contract. +CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaGroupBase.Items' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaGroupBase.Items.get()' is non-virtual in the implementation but is virtual in the contract. +CannotSealType : Type 'System.Data.Constraint' is effectively (has a private constructor) sealed in the implementation but not sealed in the contract. +MembersMustExist : Member 'System.Data.Constraint..ctor()' does not exist in the implementation but it does exist in the contract. +CannotMakeMemberNonVirtual : Member 'System.Data.Constraint.ConstraintName' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.Data.Constraint.Table' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.Data.Constraint._DataSet' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.Data.Constraint.ConstraintName.get()' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.Data.Constraint.ConstraintName.set(System.String)' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.Data.Constraint.Table.get()' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.Data.Constraint.ToString()' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.Data.Constraint._DataSet.get()' is non-virtual in the implementation but is virtual in the contract. +CannotSealType : Type 'System.Linq.EnumerableExecutor' is effectively (has a private constructor) sealed in the implementation but not sealed in the contract. +MembersMustExist : Member 'System.Linq.EnumerableExecutor..ctor()' does not exist in the implementation but it does exist in the contract. +CannotSealType : Type 'System.Linq.EnumerableQuery' is effectively (has a private constructor) sealed in the implementation but not sealed in the contract. +MembersMustExist : Member 'System.Linq.EnumerableQuery..ctor()' does not exist in the implementation but it does exist in the contract. +Total Issues: 118 diff --git a/src/shims/ApiCompatBaseline.uap.netstandard.txt b/src/shims/ApiCompatBaseline.uap.netstandard.txt index 2dc0f4c796a8..e16da4da5c2d 100644 --- a/src/shims/ApiCompatBaseline.uap.netstandard.txt +++ b/src/shims/ApiCompatBaseline.uap.netstandard.txt @@ -106,4 +106,39 @@ CannotMakeMemberNonVirtual : Member 'System.ComponentModel.BaseNumberConverter.C CannotMakeMemberNonVirtual : Member 'System.ComponentModel.BaseNumberConverter.CanConvertTo(System.ComponentModel.ITypeDescriptorContext, System.Type)' is non-virtual in the implementation but is virtual in the contract. CannotMakeMemberNonVirtual : Member 'System.ComponentModel.BaseNumberConverter.ConvertFrom(System.ComponentModel.ITypeDescriptorContext, System.Globalization.CultureInfo, System.Object)' is non-virtual in the implementation but is virtual in the contract. CannotMakeMemberNonVirtual : Member 'System.ComponentModel.BaseNumberConverter.ConvertTo(System.ComponentModel.ITypeDescriptorContext, System.Globalization.CultureInfo, System.Object, System.Type)' is non-virtual in the implementation but is virtual in the contract. -Total Issues: 92 \ No newline at end of file +Compat issues with assembly System.Xml.Schema: +CannotSealType : Type 'System.Xml.Schema.XmlSchemaDatatype' is effectively (has a private constructor) sealed in the implementation but not sealed in the contract. +MembersMustExist : Member 'System.Xml.Schema.XmlSchemaDatatype..ctor()' does not exist in the implementation but it does exist in the contract. +CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.TokenizedType' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.TypeCode' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.ValueType' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.Variety' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.ChangeType(System.Object, System.Type)' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.ChangeType(System.Object, System.Type, System.Xml.IXmlNamespaceResolver)' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.IsDerivedFrom(System.Xml.Schema.XmlSchemaDatatype)' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.ParseValue(System.String, System.Xml.XmlNameTable, System.Xml.IXmlNamespaceResolver)' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.TokenizedType.get()' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.TypeCode.get()' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.ValueType.get()' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.Variety.get()' is non-virtual in the implementation but is virtual in the contract. +Compat issues with assembly System.Xml.ReaderWriter: +CannotSealType : Type 'System.Xml.Schema.XmlSchemaGroupBase' is effectively (has a private constructor) sealed in the implementation but not sealed in the contract. +MembersMustExist : Member 'System.Xml.Schema.XmlSchemaGroupBase..ctor()' does not exist in the implementation but it does exist in the contract. +CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaGroupBase.Items' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaGroupBase.Items.get()' is non-virtual in the implementation but is virtual in the contract. +Compat issues with assembly System.Data.Constraint: +CannotSealType : Type 'System.Data.Constraint' is effectively (has a private constructor) sealed in the implementation but not sealed in the contract. +MembersMustExist : Member 'System.Data.Constraint..ctor()' does not exist in the implementation but it does exist in the contract. +CannotMakeMemberNonVirtual : Member 'System.Data.Constraint.ConstraintName' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.Data.Constraint.Table' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.Data.Constraint._DataSet' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.Data.Constraint.ConstraintName.get()' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.Data.Constraint.ConstraintName.set(System.String)' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.Data.Constraint.Table.get()' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.Data.Constraint.ToString()' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.Data.Constraint._DataSet.get()' is non-virtual in the implementation but is virtual in the contract. +CannotSealType : Type 'System.Linq.EnumerableExecutor' is effectively (has a private constructor) sealed in the implementation but not sealed in the contract. +MembersMustExist : Member 'System.Linq.EnumerableExecutor..ctor()' does not exist in the implementation but it does exist in the contract. +CannotSealType : Type 'System.Linq.EnumerableQuery' is effectively (has a private constructor) sealed in the implementation but not sealed in the contract. +MembersMustExist : Member 'System.Linq.EnumerableQuery..ctor()' does not exist in the implementation but it does exist in the contract. +Total Issues: 124 \ No newline at end of file diff --git a/src/shims/ApiCompatBaseline.uap.netstandardOnly.txt b/src/shims/ApiCompatBaseline.uap.netstandardOnly.txt index 5a7c8acf8d6b..3f505eb5231e 100644 --- a/src/shims/ApiCompatBaseline.uap.netstandardOnly.txt +++ b/src/shims/ApiCompatBaseline.uap.netstandardOnly.txt @@ -88,4 +88,36 @@ CannotMakeMemberNonVirtual : Member 'System.ComponentModel.BaseNumberConverter.C CannotMakeMemberNonVirtual : Member 'System.ComponentModel.BaseNumberConverter.CanConvertTo(System.ComponentModel.ITypeDescriptorContext, System.Type)' is non-virtual in the implementation but is virtual in the contract. CannotMakeMemberNonVirtual : Member 'System.ComponentModel.BaseNumberConverter.ConvertFrom(System.ComponentModel.ITypeDescriptorContext, System.Globalization.CultureInfo, System.Object)' is non-virtual in the implementation but is virtual in the contract. CannotMakeMemberNonVirtual : Member 'System.ComponentModel.BaseNumberConverter.ConvertTo(System.ComponentModel.ITypeDescriptorContext, System.Globalization.CultureInfo, System.Object, System.Type)' is non-virtual in the implementation but is virtual in the contract. -Total Issues: 89 +CannotSealType : Type 'System.Xml.Schema.XmlSchemaDatatype' is effectively (has a private constructor) sealed in the implementation but not sealed in the contract. +MembersMustExist : Member 'System.Xml.Schema.XmlSchemaDatatype..ctor()' does not exist in the implementation but it does exist in the contract. +CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.TokenizedType' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.TypeCode' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.ValueType' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.Variety' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.ChangeType(System.Object, System.Type)' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.ChangeType(System.Object, System.Type, System.Xml.IXmlNamespaceResolver)' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.IsDerivedFrom(System.Xml.Schema.XmlSchemaDatatype)' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.ParseValue(System.String, System.Xml.XmlNameTable, System.Xml.IXmlNamespaceResolver)' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.TokenizedType.get()' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.TypeCode.get()' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.ValueType.get()' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.Variety.get()' is non-virtual in the implementation but is virtual in the contract. +CannotSealType : Type 'System.Xml.Schema.XmlSchemaGroupBase' is effectively (has a private constructor) sealed in the implementation but not sealed in the contract. +MembersMustExist : Member 'System.Xml.Schema.XmlSchemaGroupBase..ctor()' does not exist in the implementation but it does exist in the contract. +CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaGroupBase.Items' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaGroupBase.Items.get()' is non-virtual in the implementation but is virtual in the contract. +CannotSealType : Type 'System.Data.Constraint' is effectively (has a private constructor) sealed in the implementation but not sealed in the contract. +MembersMustExist : Member 'System.Data.Constraint..ctor()' does not exist in the implementation but it does exist in the contract. +CannotMakeMemberNonVirtual : Member 'System.Data.Constraint.ConstraintName' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.Data.Constraint.Table' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.Data.Constraint._DataSet' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.Data.Constraint.ConstraintName.get()' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.Data.Constraint.ConstraintName.set(System.String)' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.Data.Constraint.Table.get()' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.Data.Constraint.ToString()' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.Data.Constraint._DataSet.get()' is non-virtual in the implementation but is virtual in the contract. +CannotSealType : Type 'System.Linq.EnumerableExecutor' is effectively (has a private constructor) sealed in the implementation but not sealed in the contract. +MembersMustExist : Member 'System.Linq.EnumerableExecutor..ctor()' does not exist in the implementation but it does exist in the contract. +CannotSealType : Type 'System.Linq.EnumerableQuery' is effectively (has a private constructor) sealed in the implementation but not sealed in the contract. +MembersMustExist : Member 'System.Linq.EnumerableQuery..ctor()' does not exist in the implementation but it does exist in the contract. +Total Issues: 121 diff --git a/src/shims/ApiCompatBaseline.uapaot.netstandard.txt b/src/shims/ApiCompatBaseline.uapaot.netstandard.txt index 4560b09ab757..285d6c34eb21 100644 --- a/src/shims/ApiCompatBaseline.uapaot.netstandard.txt +++ b/src/shims/ApiCompatBaseline.uapaot.netstandard.txt @@ -112,4 +112,39 @@ CannotMakeMemberNonVirtual : Member 'System.ComponentModel.BaseNumberConverter.C CannotMakeMemberNonVirtual : Member 'System.ComponentModel.BaseNumberConverter.CanConvertTo(System.ComponentModel.ITypeDescriptorContext, System.Type)' is non-virtual in the implementation but is virtual in the contract. CannotMakeMemberNonVirtual : Member 'System.ComponentModel.BaseNumberConverter.ConvertFrom(System.ComponentModel.ITypeDescriptorContext, System.Globalization.CultureInfo, System.Object)' is non-virtual in the implementation but is virtual in the contract. CannotMakeMemberNonVirtual : Member 'System.ComponentModel.BaseNumberConverter.ConvertTo(System.ComponentModel.ITypeDescriptorContext, System.Globalization.CultureInfo, System.Object, System.Type)' is non-virtual in the implementation but is virtual in the contract. -Total Issues: 98 \ No newline at end of file +Compat issues with assembly System.Xml.Schema: +CannotSealType : Type 'System.Xml.Schema.XmlSchemaDatatype' is effectively (has a private constructor) sealed in the implementation but not sealed in the contract. +MembersMustExist : Member 'System.Xml.Schema.XmlSchemaDatatype..ctor()' does not exist in the implementation but it does exist in the contract. +CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.TokenizedType' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.TypeCode' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.ValueType' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.Variety' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.ChangeType(System.Object, System.Type)' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.ChangeType(System.Object, System.Type, System.Xml.IXmlNamespaceResolver)' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.IsDerivedFrom(System.Xml.Schema.XmlSchemaDatatype)' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.ParseValue(System.String, System.Xml.XmlNameTable, System.Xml.IXmlNamespaceResolver)' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.TokenizedType.get()' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.TypeCode.get()' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.ValueType.get()' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.Variety.get()' is non-virtual in the implementation but is virtual in the contract. +Compat issues with assembly System.Xml.ReaderWriter: +CannotSealType : Type 'System.Xml.Schema.XmlSchemaGroupBase' is effectively (has a private constructor) sealed in the implementation but not sealed in the contract. +MembersMustExist : Member 'System.Xml.Schema.XmlSchemaGroupBase..ctor()' does not exist in the implementation but it does exist in the contract. +CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaGroupBase.Items' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaGroupBase.Items.get()' is non-virtual in the implementation but is virtual in the contract. +Compat issues with assembly System.Data.Constraint: +CannotSealType : Type 'System.Data.Constraint' is effectively (has a private constructor) sealed in the implementation but not sealed in the contract. +MembersMustExist : Member 'System.Data.Constraint..ctor()' does not exist in the implementation but it does exist in the contract. +CannotMakeMemberNonVirtual : Member 'System.Data.Constraint.ConstraintName' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.Data.Constraint.Table' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.Data.Constraint._DataSet' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.Data.Constraint.ConstraintName.get()' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.Data.Constraint.ConstraintName.set(System.String)' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.Data.Constraint.Table.get()' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.Data.Constraint.ToString()' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.Data.Constraint._DataSet.get()' is non-virtual in the implementation but is virtual in the contract. +CannotSealType : Type 'System.Linq.EnumerableExecutor' is effectively (has a private constructor) sealed in the implementation but not sealed in the contract. +MembersMustExist : Member 'System.Linq.EnumerableExecutor..ctor()' does not exist in the implementation but it does exist in the contract. +CannotSealType : Type 'System.Linq.EnumerableQuery' is effectively (has a private constructor) sealed in the implementation but not sealed in the contract. +MembersMustExist : Member 'System.Linq.EnumerableQuery..ctor()' does not exist in the implementation but it does exist in the contract. +Total Issues: 130 \ No newline at end of file diff --git a/src/shims/ApiCompatBaseline.uapaot.netstandardOnly.txt b/src/shims/ApiCompatBaseline.uapaot.netstandardOnly.txt index 6615b50b17f6..d00d2aaf0b6c 100644 --- a/src/shims/ApiCompatBaseline.uapaot.netstandardOnly.txt +++ b/src/shims/ApiCompatBaseline.uapaot.netstandardOnly.txt @@ -77,4 +77,36 @@ CannotMakeMemberNonVirtual : Member 'System.ComponentModel.BaseNumberConverter.C CannotMakeMemberNonVirtual : Member 'System.ComponentModel.BaseNumberConverter.CanConvertTo(System.ComponentModel.ITypeDescriptorContext, System.Type)' is non-virtual in the implementation but is virtual in the contract. CannotMakeMemberNonVirtual : Member 'System.ComponentModel.BaseNumberConverter.ConvertFrom(System.ComponentModel.ITypeDescriptorContext, System.Globalization.CultureInfo, System.Object)' is non-virtual in the implementation but is virtual in the contract. CannotMakeMemberNonVirtual : Member 'System.ComponentModel.BaseNumberConverter.ConvertTo(System.ComponentModel.ITypeDescriptorContext, System.Globalization.CultureInfo, System.Object, System.Type)' is non-virtual in the implementation but is virtual in the contract. -Total Issues: 77 +CannotSealType : Type 'System.Xml.Schema.XmlSchemaDatatype' is effectively (has a private constructor) sealed in the implementation but not sealed in the contract. +MembersMustExist : Member 'System.Xml.Schema.XmlSchemaDatatype..ctor()' does not exist in the implementation but it does exist in the contract. +CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.TokenizedType' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.TypeCode' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.ValueType' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.Variety' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.ChangeType(System.Object, System.Type)' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.ChangeType(System.Object, System.Type, System.Xml.IXmlNamespaceResolver)' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.IsDerivedFrom(System.Xml.Schema.XmlSchemaDatatype)' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.ParseValue(System.String, System.Xml.XmlNameTable, System.Xml.IXmlNamespaceResolver)' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.TokenizedType.get()' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.TypeCode.get()' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.ValueType.get()' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.Variety.get()' is non-virtual in the implementation but is virtual in the contract. +CannotSealType : Type 'System.Xml.Schema.XmlSchemaGroupBase' is effectively (has a private constructor) sealed in the implementation but not sealed in the contract. +MembersMustExist : Member 'System.Xml.Schema.XmlSchemaGroupBase..ctor()' does not exist in the implementation but it does exist in the contract. +CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaGroupBase.Items' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaGroupBase.Items.get()' is non-virtual in the implementation but is virtual in the contract. +CannotSealType : Type 'System.Data.Constraint' is effectively (has a private constructor) sealed in the implementation but not sealed in the contract. +MembersMustExist : Member 'System.Data.Constraint..ctor()' does not exist in the implementation but it does exist in the contract. +CannotMakeMemberNonVirtual : Member 'System.Data.Constraint.ConstraintName' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.Data.Constraint.Table' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.Data.Constraint._DataSet' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.Data.Constraint.ConstraintName.get()' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.Data.Constraint.ConstraintName.set(System.String)' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.Data.Constraint.Table.get()' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.Data.Constraint.ToString()' is non-virtual in the implementation but is virtual in the contract. +CannotMakeMemberNonVirtual : Member 'System.Data.Constraint._DataSet.get()' is non-virtual in the implementation but is virtual in the contract. +CannotSealType : Type 'System.Linq.EnumerableExecutor' is effectively (has a private constructor) sealed in the implementation but not sealed in the contract. +MembersMustExist : Member 'System.Linq.EnumerableExecutor..ctor()' does not exist in the implementation but it does exist in the contract. +CannotSealType : Type 'System.Linq.EnumerableQuery' is effectively (has a private constructor) sealed in the implementation but not sealed in the contract. +MembersMustExist : Member 'System.Linq.EnumerableQuery..ctor()' does not exist in the implementation but it does exist in the contract. +Total Issues: 109 From e1441472a05eb8539acfa432c9816ba8e9f0c55d Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Tue, 7 May 2019 12:32:57 +0000 Subject: [PATCH 246/607] Update dependencies from https://github.com/dotnet/core-setup build 20190506.03 (#37464) - Microsoft.NETCore.App - 3.0.0-preview6-27706-03 - Microsoft.NETCore.DotNetHostPolicy - 3.0.0-preview6-27706-03 - Microsoft.NETCore.DotNetHost - 3.0.0-preview6-27706-03 --- eng/Version.Details.xml | 12 ++++++------ eng/Versions.props | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 4e26dcc62810..7e3774e7cb0c 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -14,17 +14,17 @@ - + https://github.com/dotnet/core-setup - 71ef9eea28230688230124e49e6967bf2e2bbfbd + 66f7e1a107eceab2767369588e7309747a0d71f7 - + https://github.com/dotnet/core-setup - 71ef9eea28230688230124e49e6967bf2e2bbfbd + 66f7e1a107eceab2767369588e7309747a0d71f7 - + https://github.com/dotnet/core-setup - 71ef9eea28230688230124e49e6967bf2e2bbfbd + 66f7e1a107eceab2767369588e7309747a0d71f7 https://github.com/dotnet/corefx diff --git a/eng/Versions.props b/eng/Versions.props index 6633bea6a84a..8ace06ec12a8 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -36,9 +36,9 @@ 2.2.0-beta.19254.1 1.0.0-beta.19254.1 - 3.0.0-preview6-27705-02 - 3.0.0-preview6-27705-02 - 3.0.0-preview6-27705-02 + 3.0.0-preview6-27706-03 + 3.0.0-preview6-27706-03 + 3.0.0-preview6-27706-03 3.0.0-preview6-27705-72 3.0.0-preview6-27705-72 From 48109190e9099d7b3b089db58c1aa90a05ea7701 Mon Sep 17 00:00:00 2001 From: dotnet-maestro-bot Date: Tue, 7 May 2019 08:44:38 -0700 Subject: [PATCH 247/607] Update ProjectNTfs, ProjectNTfsTestILC to beta-27707-00, beta-27707-00, respectively (#37484) --- eng/dependencies.props | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/eng/dependencies.props b/eng/dependencies.props index a77374bff912..92f90f386b92 100644 --- a/eng/dependencies.props +++ b/eng/dependencies.props @@ -9,8 +9,8 @@ These ref versions are pulled from https://github.com/dotnet/versions. --> - 508d4062082351b8478804dda240e7a827f733db - 508d4062082351b8478804dda240e7a827f733db + 9726849820cbf275e71b9b9e99d874a257ed267a + 9726849820cbf275e71b9b9e99d874a257ed267a 8bd1ec5fac9f0eec34ff6b34b1d878b4359e02dd @@ -22,9 +22,9 @@ - beta-27706-00 - beta-27706-00 - 1.0.0-beta-27706-00 + beta-27707-00 + beta-27707-00 + 1.0.0-beta-27707-00 4.4.0 From f5ed5a82d8ae626bd756c225a25bf432b92ec472 Mon Sep 17 00:00:00 2001 From: Steve Harter Date: Tue, 7 May 2019 08:53:25 -0700 Subject: [PATCH 248/607] Refactor null handling and add tests (#37300) --- .../src/Resources/Strings.resx | 2 +- .../JsonClassInfo.AddProperty.cs | 10 +++-- .../Text/Json/Serialization/JsonClassInfo.cs | 3 +- .../Json/Serialization/JsonPropertyInfo.cs | 6 +-- .../Serialization/JsonPropertyInfoCommon.cs | 11 +---- .../JsonPropertyInfoNotNullable.cs | 26 +++-------- .../Serialization/JsonPropertyInfoNullable.cs | 31 +++---------- .../JsonSerializer.Read.HandleArray.cs | 31 ++++++++----- .../JsonSerializer.Read.HandleNull.cs | 3 +- .../JsonSerializer.Read.HandleObject.cs | 16 ++++--- .../JsonSerializer.Write.HandleDictionary.cs | 8 +++- .../JsonSerializer.Write.HandleEnumerable.cs | 8 +++- .../Text/Json/Serialization/WriteStack.cs | 37 +++++++++++++++ .../Text/Json/ThrowHelper.Serialization.cs | 10 ++--- .../tests/Serialization/Array.ReadTests.cs | 45 +++++++++++++++++++ .../tests/Serialization/DictionaryTests.cs | 41 +++++++++++++++++ .../tests/Serialization/Null.ReadTests.cs | 4 ++ .../tests/Serialization/Null.WriteTests.cs | 6 +++ .../TestClasses.SimpleTestClass.cs | 6 ++- ...estClasses.SimpleTestClassWithNullables.cs | 10 ++++- .../tests/Serialization/TestClasses.cs | 19 ++++---- .../tests/Serialization/Value.ReadTests.cs | 3 ++ .../tests/Serialization/Value.WriteTests.cs | 12 +++++ 23 files changed, 246 insertions(+), 102 deletions(-) diff --git a/src/System.Text.Json/src/Resources/Strings.resx b/src/System.Text.Json/src/Resources/Strings.resx index c2a1da63c591..f2f72cbc78fa 100644 --- a/src/System.Text.Json/src/Resources/Strings.resx +++ b/src/System.Text.Json/src/Resources/Strings.resx @@ -283,7 +283,7 @@ Expected depth to be zero at the end of the JSON payload. There is an open JSON object or array that should be closed. - The JSON value from {0} cannot be null. + The JSON value cannot be null. The provided data of length {0} has remaining bytes {1}. diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonClassInfo.AddProperty.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonClassInfo.AddProperty.cs index 08e1d9edc16a..8eaebc9f33d3 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonClassInfo.AddProperty.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonClassInfo.AddProperty.cs @@ -28,10 +28,14 @@ private JsonPropertyInfo AddProperty(Type propertyType, PropertyInfo propertyInf // Convert interfaces to concrete types. if (propertyType.IsInterface && jsonInfo.ClassType == ClassType.Dictionary) { - Type newPropertyType = jsonInfo.ElementClassInfo.GetPolicyProperty().GetConcreteType(propertyType); - if (propertyType != newPropertyType) + // If a polymorphic case, we have to wait until run-time values are processed. + if (jsonInfo.ElementClassInfo.ClassType != ClassType.Unknown) { - jsonInfo = CreateProperty(propertyType, newPropertyType, propertyInfo, classType, options); + Type newPropertyType = jsonInfo.ElementClassInfo.GetPolicyProperty().GetDictionaryConcreteType(); + if (propertyType != newPropertyType) + { + jsonInfo = CreateProperty(propertyType, newPropertyType, propertyInfo, classType, options); + } } } diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonClassInfo.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonClassInfo.cs index 5bcb5cc2ada0..769e5e220d0d 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonClassInfo.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonClassInfo.cs @@ -324,9 +324,8 @@ public static Type GetElementType(Type propertyType) { elementType = args[1]; } - else if (args.Length >= 1) // It is >= 1 in case there is an IEnumerable. + else if (GetClassType(propertyType) == ClassType.Enumerable && args.Length >= 1) // It is >= 1 in case there is an IEnumerable. { - Debug.Assert(GetClassType(propertyType) == ClassType.Enumerable); elementType = args[0]; } } diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfo.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfo.cs index 3849ba413ded..3702b018dca5 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfo.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfo.cs @@ -259,11 +259,9 @@ public TAttribute GetAttribute() where TAttribute : Attribute return (TAttribute)PropertyInfo?.GetCustomAttribute(typeof(TAttribute), inherit: false); } - public abstract void ApplyNullValue(JsonSerializerOptions options, ref ReadStack state, ref Utf8JsonReader reader); - public abstract IList CreateConverterList(); - public abstract Type GetConcreteType(Type interfaceType); + public abstract Type GetDictionaryConcreteType(); public abstract void Read(JsonTokenType tokenType, JsonSerializerOptions options, ref ReadStack state, ref Utf8JsonReader reader); public abstract void ReadEnumerable(JsonTokenType tokenType, JsonSerializerOptions options, ref ReadStack state, ref Utf8JsonReader reader); @@ -271,7 +269,7 @@ public TAttribute GetAttribute() where TAttribute : Attribute public abstract void Write(JsonSerializerOptions options, ref WriteStackFrame current, Utf8JsonWriter writer); - public abstract void WriteDictionary(JsonSerializerOptions options, ref WriteStackFrame current, Utf8JsonWriter writer); + public virtual void WriteDictionary(JsonSerializerOptions options, ref WriteStackFrame current, Utf8JsonWriter writer) { } public abstract void WriteEnumerable(JsonSerializerOptions options, ref WriteStackFrame current, Utf8JsonWriter writer); } } diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfoCommon.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfoCommon.cs index 12d1e3aa8c18..50f22bd92e68 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfoCommon.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfoCommon.cs @@ -92,16 +92,9 @@ public override IList CreateConverterList() return new List(); } - // Map interfaces to a well-known implementation. - public override Type GetConcreteType(Type interfaceType) + public override Type GetDictionaryConcreteType() { - if (interfaceType.IsAssignableFrom(typeof(IDictionary)) || - interfaceType.IsAssignableFrom(typeof(IReadOnlyDictionary))) - { - return typeof(Dictionary); - } - - return interfaceType; + return typeof(Dictionary); } } } diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfoNotNullable.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfoNotNullable.cs index 9c092163759f..9c95b56bb060 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfoNotNullable.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfoNotNullable.cs @@ -75,22 +75,11 @@ public override void ReadEnumerable(JsonTokenType tokenType, JsonSerializerOptio JsonSerializer.ApplyValueToEnumerable(ref value, options, ref state, ref reader); } - public override void ApplyNullValue(JsonSerializerOptions options, ref ReadStack state, ref Utf8JsonReader reader) - { - Debug.Assert(state.Current.JsonPropertyInfo != null); - state.Current.JsonPropertyInfo.SetValueAsObject(state.Current.ReturnValue, value : null); - } - - // todo: have the caller check if current.Enumerator != null and call WriteEnumerable of the underlying property directly to avoid an extra virtual call. public override void Write(JsonSerializerOptions options, ref WriteStackFrame current, Utf8JsonWriter writer) { - if (current.Enumerator != null) - { - // Forward the setter to the value-based JsonPropertyInfo. - JsonPropertyInfo propertyInfo = ElementClassInfo.GetPolicyProperty(); - propertyInfo.WriteEnumerable(options, ref current, writer); - } - else if (ShouldSerialize) + Debug.Assert(current.Enumerator == null); + + if (ShouldSerialize) { TRuntimeProperty value; if (_isPropertyPolicy) @@ -104,11 +93,9 @@ public override void Write(JsonSerializerOptions options, ref WriteStackFrame cu if (value == null) { - if (_escapedName == null) - { - writer.WriteNullValue(); - } - else if (!IgnoreNullValues) + Debug.Assert(_escapedName != null); + + if (!IgnoreNullValues) { writer.WriteNull(_escapedName); } @@ -132,7 +119,6 @@ public override void WriteDictionary(JsonSerializerOptions options, ref WriteSta JsonSerializer.WriteDictionary(ValueConverter, options, ref current, writer); } - public override void WriteEnumerable(JsonSerializerOptions options, ref WriteStackFrame current, Utf8JsonWriter writer) { if (ValueConverter != null) diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfoNullable.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfoNullable.cs index 5a3ce959a90c..e276e2942d6d 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfoNullable.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfoNullable.cs @@ -31,13 +31,9 @@ public JsonPropertyInfoNullable( public override void Read(JsonTokenType tokenType, JsonSerializerOptions options, ref ReadStack state, ref Utf8JsonReader reader) { - if (ElementClassInfo != null) - { - // Forward the setter to the value-based JsonPropertyInfo. - JsonPropertyInfo propertyInfo = ElementClassInfo.GetPolicyProperty(); - propertyInfo.ReadEnumerable(tokenType, options, ref state, ref reader); - } - else if (ShouldDeserialize) + Debug.Assert(ElementClassInfo == null); + + if (ShouldDeserialize) { if (ValueConverter != null) { @@ -68,18 +64,10 @@ public override void ReadEnumerable(JsonTokenType tokenType, JsonSerializerOptio return; } - // Converting to TProperty? here lets us share a common ApplyValue() with ApplyNullValue(). TProperty? nullableValue = new TProperty?(value); JsonSerializer.ApplyValueToEnumerable(ref nullableValue, options, ref state, ref reader); } - public override void ApplyNullValue(JsonSerializerOptions options, ref ReadStack state, ref Utf8JsonReader reader) - { - TProperty? nullableValue = null; - JsonSerializer.ApplyValueToEnumerable(ref nullableValue, options, ref state, ref reader); - } - - // todo: have the caller check if current.Enumerator != null and call WriteEnumerable of the underlying property directly to avoid an extra virtual call. public override void Write(JsonSerializerOptions options, ref WriteStackFrame current, Utf8JsonWriter writer) { if (current.Enumerator != null) @@ -102,11 +90,9 @@ public override void Write(JsonSerializerOptions options, ref WriteStackFrame cu if (value == null) { - if (_escapedName == null) - { - writer.WriteNullValue(); - } - else if (!IgnoreNullValues) + Debug.Assert(_escapedName != null); + + if (!IgnoreNullValues) { writer.WriteNull(_escapedName); } @@ -125,11 +111,6 @@ public override void Write(JsonSerializerOptions options, ref WriteStackFrame cu } } - public override void WriteDictionary(JsonSerializerOptions options, ref WriteStackFrame current, Utf8JsonWriter writer) - { - JsonSerializer.WriteDictionary(ValueConverter, options, ref current, writer); - } - public override void WriteEnumerable(JsonSerializerOptions options, ref WriteStackFrame current, Utf8JsonWriter writer) { if (ValueConverter != null) diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleArray.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleArray.cs index d80b17330faf..a19e02f4f2b8 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleArray.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleArray.cs @@ -98,14 +98,9 @@ private static bool HandleEndArray( } IEnumerable value = ReadStackFrame.GetEnumerableValue(state.Current); - if (value == null) - { - // We added the items to the list property already. - state.Current.ResetProperty(); - return false; - } - bool setPropertyDirectly; + bool popStackOnEnd = state.Current.PopStackOnEnd; + if (state.Current.TempEnumerableValues != null) { JsonEnumerableConverter converter = state.Current.JsonPropertyInfo.EnumerableConverter; @@ -115,13 +110,20 @@ private static bool HandleEndArray( value = converter.CreateFromList(elementType, (IList)value); setPropertyDirectly = true; } + else if (!popStackOnEnd) + { + Debug.Assert(state.Current.IsPropertyEnumerable); + + // We added the items to the list property already. + state.Current.ResetProperty(); + return false; + } else { setPropertyDirectly = false; } - bool valueReturning = state.Current.PopStackOnEnd; - if (state.Current.PopStackOnEnd) + if (popStackOnEnd) { state.Pop(); } @@ -145,8 +147,9 @@ private static bool HandleEndArray( ApplyObjectToEnumerable(value, options, ref state, ref reader, setPropertyDirectly: setPropertyDirectly); - if (!valueReturning) + if (!popStackOnEnd) { + Debug.Assert(state.Current.IsPropertyEnumerable); state.Current.ResetProperty(); } @@ -182,7 +185,9 @@ internal static void ApplyObjectToEnumerable( } else { - ((IList)state.Current.JsonPropertyInfo.GetValueAsObject(state.Current.ReturnValue)).Add(value); + IList list = (IList)state.Current.JsonPropertyInfo.GetValueAsObject(state.Current.ReturnValue); + Debug.Assert(list != null); + list.Add(value); } } else if (state.Current.IsDictionary) @@ -235,7 +240,9 @@ internal static void ApplyValueToEnumerable( } else { - ((IList)state.Current.JsonPropertyInfo.GetValueAsObject(state.Current.ReturnValue)).Add(value); + IList list = (IList)state.Current.JsonPropertyInfo.GetValueAsObject(state.Current.ReturnValue); + Debug.Assert(list != null); + list.Add(value); } } else if (state.Current.IsDictionary) diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleNull.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleNull.cs index 028c634242b9..80abfc4a631c 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleNull.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleNull.cs @@ -38,7 +38,8 @@ private static bool HandleNull(ref Utf8JsonReader reader, ref ReadStack state, J if (state.Current.IsPropertyEnumerable) { - state.Current.JsonPropertyInfo.ApplyNullValue(options, ref state, ref reader); + bool setPropertyToNull = !state.Current.EnumerableCreated; + ApplyObjectToEnumerable(null, options, ref state, ref reader, setPropertyDirectly: setPropertyToNull); return false; } diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleObject.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleObject.cs index cd7e02dd6575..425c4d78f65d 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleObject.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleObject.cs @@ -28,14 +28,12 @@ private static void HandleStartObject(JsonSerializerOptions options, ref Utf8Jso if (state.Current.IsDictionary) { // Verify that the Dictionary can be deserialized by having as first generic argument. - Debug.Assert(state.Current.JsonClassInfo.Type.GetGenericArguments().Length >= 1); - if (state.Current.JsonClassInfo.Type.GetGenericArguments()[0].UnderlyingSystemType != typeof(string)) + Type[] args = state.Current.JsonClassInfo.Type.GetGenericArguments(); + if (args.Length == 0 || args[0].UnderlyingSystemType != typeof(string)) { ThrowHelper.ThrowJsonException_DeserializeUnableToConvertValue(state.Current.JsonClassInfo.Type, reader, state.PropertyPath); } - ClassType classType = state.Current.JsonClassInfo.ElementClassInfo.ClassType; - if (state.Current.ReturnValue == null) { // The Dictionary created below will be returned to corresponding Parse() etc method. @@ -44,9 +42,15 @@ private static void HandleStartObject(JsonSerializerOptions options, ref Utf8Jso } else { - Debug.Assert(classType == ClassType.Object || classType == ClassType.Dictionary); + ClassType classType = state.Current.JsonClassInfo.ElementClassInfo.ClassType; + + // Verify that the second parameter is not a value. + if (state.Current.JsonClassInfo.ElementClassInfo.ClassType == ClassType.Value) + { + ThrowHelper.ThrowJsonException_DeserializeUnableToConvertValue(state.Current.JsonClassInfo.Type, reader, state.PropertyPath); + } - // A nested object or dictionary. + // A nested object, dictionary or enumerable. JsonClassInfo classInfoTemp = state.Current.JsonClassInfo; state.Push(); state.Current.JsonClassInfo = classInfoTemp.ElementClassInfo; diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.HandleDictionary.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.HandleDictionary.cs index bbba76969f0c..b816cae4fb6e 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.HandleDictionary.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.HandleDictionary.cs @@ -27,8 +27,14 @@ private static bool HandleDictionary( if (state.Current.Enumerator == null) { - IEnumerable enumerable = (IEnumerable)jsonPropertyInfo.GetValueAsObject(state.Current.CurrentValue); + // Verify that the Dictionary can be serialized by having as first generic argument. + Type[] args = jsonPropertyInfo.RuntimePropertyType.GetGenericArguments(); + if (args.Length == 0 || args[0].UnderlyingSystemType != typeof(string)) + { + ThrowHelper.ThrowJsonException_DeserializeUnableToConvertValue(state.Current.JsonClassInfo.Type, state.PropertyPath); + } + IEnumerable enumerable = (IEnumerable)jsonPropertyInfo.GetValueAsObject(state.Current.CurrentValue); if (enumerable == null) { // Write a null object or enumerable. diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.HandleEnumerable.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.HandleEnumerable.cs index 74d0ca5bd974..6f5109780f8c 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.HandleEnumerable.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.HandleEnumerable.cs @@ -30,8 +30,12 @@ private static bool HandleEnumerable( if (enumerable == null) { - // Write a null object or enumerable. - state.Current.WriteObjectOrArrayStart(ClassType.Enumerable, writer, writeNull: true); + if (!state.Current.JsonPropertyInfo.IgnoreNullValues) + { + // Write a null object or enumerable. + state.Current.WriteObjectOrArrayStart(ClassType.Enumerable, writer, writeNull: true); + } + return true; } diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/WriteStack.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/WriteStack.cs index 5cc3453eeec0..9f29f9700e59 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/WriteStack.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/WriteStack.cs @@ -63,5 +63,42 @@ public void Pop() Debug.Assert(_index > 0); Current = _previous[--_index]; } + + // Return a property path in the form of: [FullNameOfType].FirstProperty.SecondProperty.LastProperty + public string PropertyPath + { + get + { + StringBuilder path = new StringBuilder(); + + if (_previous == null || _index == 0) + { + path.Append($"[{Current.JsonClassInfo.Type.FullName}]"); + } + else + { + path.Append($"[{_previous[0].JsonClassInfo.Type.FullName}]"); + + for (int i = 0; i < _index; i++) + { + path.Append(GetPropertyName(_previous[i])); + } + } + + path.Append(GetPropertyName(Current)); + + return path.ToString(); + } + } + + private string GetPropertyName(in WriteStackFrame frame) + { + if (frame.JsonPropertyInfo != null && frame.JsonClassInfo.ClassType == ClassType.Object) + { + return $".{frame.JsonPropertyInfo.PropertyInfo.Name}"; + } + + return string.Empty; + } } } diff --git a/src/System.Text.Json/src/System/Text/Json/ThrowHelper.Serialization.cs b/src/System.Text.Json/src/System/Text/Json/ThrowHelper.Serialization.cs index c46ebbdfaf18..6bf5b59ab68e 100644 --- a/src/System.Text.Json/src/System/Text/Json/ThrowHelper.Serialization.cs +++ b/src/System.Text.Json/src/System/Text/Json/ThrowHelper.Serialization.cs @@ -3,7 +3,6 @@ // See the LICENSE file in the project root for more information. using System.Diagnostics; -using System.Reflection; using System.Runtime.CompilerServices; using System.Text.Json.Serialization; @@ -24,15 +23,16 @@ public static void ThrowJsonException_DeserializeUnableToConvertValue(Type prope } [MethodImpl(MethodImplOptions.NoInlining)] - public static void ThrowJsonException_DeserializeCannotBeNull(in Utf8JsonReader reader, string path) + public static void ThrowJsonException_DeserializeUnableToConvertValue(Type propertyType, string path) { - ThowJsonException(SR.DeserializeCannotBeNull, in reader, path); + string message = SR.Format(SR.DeserializeUnableToConvertValue, propertyType.FullName) + $" Path: {path}."; + throw new JsonException(message, path, null, null); } [MethodImpl(MethodImplOptions.NoInlining)] - public static void ThrowObjectDisposedException(string name) + public static void ThrowJsonException_DeserializeCannotBeNull(in Utf8JsonReader reader, string path) { - throw new ObjectDisposedException(name); + ThowJsonException(SR.DeserializeCannotBeNull, in reader, path); } [MethodImpl(MethodImplOptions.NoInlining)] diff --git a/src/System.Text.Json/tests/Serialization/Array.ReadTests.cs b/src/System.Text.Json/tests/Serialization/Array.ReadTests.cs index b60697653b4d..85fb64722025 100644 --- a/src/System.Text.Json/tests/Serialization/Array.ReadTests.cs +++ b/src/System.Text.Json/tests/Serialization/Array.ReadTests.cs @@ -19,6 +19,51 @@ public static void ReadEmpty() Assert.Equal(0, list.Count); } + + public static IEnumerable ReadNullJson + { + get + { + yield return new object[] { $"[null, null, null]", true, true, true }; + yield return new object[] { $"[null, null, {SimpleTestClass.s_json}]", true, true, false }; + yield return new object[] { $"[null, {SimpleTestClass.s_json}, null]", true, false, true }; + yield return new object[] { $"[null, {SimpleTestClass.s_json}, {SimpleTestClass.s_json}]", true, false, false }; + yield return new object[] { $"[{SimpleTestClass.s_json}, {SimpleTestClass.s_json}, {SimpleTestClass.s_json}]", false, false, false }; + yield return new object[] { $"[{SimpleTestClass.s_json}, {SimpleTestClass.s_json}, null]", false, false, true }; + yield return new object[] { $"[{SimpleTestClass.s_json}, null, {SimpleTestClass.s_json}]", false, true, false }; + yield return new object[] { $"[{SimpleTestClass.s_json}, null, null]", false, true, true }; + } + } + + private static void VerifyReadNull(SimpleTestClass obj, bool isNull) + { + if (isNull) + { + Assert.Null(obj); + } + else + { + obj.Verify(); + } + } + + [Theory] + [MemberData(nameof(ReadNullJson))] + public static void ReadNull(string json, bool element0Null, bool element1Null, bool element2Null) + { + SimpleTestClass[] arr = JsonSerializer.Parse(json); + Assert.Equal(3, arr.Length); + VerifyReadNull(arr[0], element0Null); + VerifyReadNull(arr[1], element1Null); + VerifyReadNull(arr[2], element2Null); + + List list = JsonSerializer.Parse>(json); + Assert.Equal(3, list.Count); + VerifyReadNull(list[0], element0Null); + VerifyReadNull(list[1], element1Null); + VerifyReadNull(list[2], element2Null); + } + [Fact] public static void ReadClassWithStringArray() { diff --git a/src/System.Text.Json/tests/Serialization/DictionaryTests.cs b/src/System.Text.Json/tests/Serialization/DictionaryTests.cs index eb232cba779a..b0386a2c3911 100644 --- a/src/System.Text.Json/tests/Serialization/DictionaryTests.cs +++ b/src/System.Text.Json/tests/Serialization/DictionaryTests.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System.Collections; using System.Collections.Generic; using Xunit; @@ -266,5 +267,45 @@ public static void UnicodePropertyNames() Assert.Equal(1, obj[longPropertyName]); } } + + [Fact] + public static void ObjectToStringFail() + { + string json = @"{""MyDictionary"":{""Key"":""Value""}}"; + Assert.Throws(() => JsonSerializer.Parse>(json)); + } + + [Fact] + public static void HashtableFail() + { + { + string json = @"{""Key"":""Value""}"; + + // Verify we can deserialize into Dictionary<,> + JsonSerializer.Parse>(json); + + // We don't support non-generic IDictionary + Assert.Throws(() => JsonSerializer.Parse(json)); + } + + { + Hashtable ht = new Hashtable(); + ht.Add("Key", "Value"); + Assert.Throws(() => JsonSerializer.ToString(ht)); + } + + { + string json = @"{""Key"":""Value""}"; + + // We don't support non-generic IDictionary + Assert.Throws(() => JsonSerializer.Parse(json)); + } + + { + IDictionary ht = new Hashtable(); + ht.Add("Key", "Value"); + Assert.Throws(() => JsonSerializer.ToString(ht)); + } + } } } diff --git a/src/System.Text.Json/tests/Serialization/Null.ReadTests.cs b/src/System.Text.Json/tests/Serialization/Null.ReadTests.cs index 13bb1d5335aa..c61dab68fb67 100644 --- a/src/System.Text.Json/tests/Serialization/Null.ReadTests.cs +++ b/src/System.Text.Json/tests/Serialization/Null.ReadTests.cs @@ -35,6 +35,8 @@ public static void DefaultIgnoreNullValuesOnRead() TestClassWithInitializedProperties obj = JsonSerializer.Parse(TestClassWithInitializedProperties.s_null_json); Assert.Equal(null, obj.MyString); Assert.Equal(null, obj.MyInt); + Assert.Equal(null, obj.MyIntArray); + Assert.Equal(null, obj.MyIntList); } [Fact] @@ -46,6 +48,8 @@ public static void EnableIgnoreNullValuesOnRead() TestClassWithInitializedProperties obj = JsonSerializer.Parse(TestClassWithInitializedProperties.s_null_json, options); Assert.Equal("Hello", obj.MyString); Assert.Equal(1, obj.MyInt); + Assert.Equal(1, obj.MyIntArray[0]); + Assert.Equal(1, obj.MyIntList[0]); } [Fact] diff --git a/src/System.Text.Json/tests/Serialization/Null.WriteTests.cs b/src/System.Text.Json/tests/Serialization/Null.WriteTests.cs index 8e72f1e5c6a8..20b1925e9986 100644 --- a/src/System.Text.Json/tests/Serialization/Null.WriteTests.cs +++ b/src/System.Text.Json/tests/Serialization/Null.WriteTests.cs @@ -14,10 +14,14 @@ public static void DefaultIgnoreNullValuesOnWrite() var obj = new TestClassWithInitializedProperties(); obj.MyString = null; obj.MyInt = null; + obj.MyIntArray = null; + obj.MyIntList = null; string json = JsonSerializer.ToString(obj); Assert.Contains(@"""MyString"":null", json); Assert.Contains(@"""MyInt"":null", json); + Assert.Contains(@"""MyIntArray"":null", json); + Assert.Contains(@"""MyIntList"":null", json); } [Fact] @@ -29,6 +33,8 @@ public static void EnableIgnoreNullValuesOnWrite() var obj = new TestClassWithInitializedProperties(); obj.MyString = null; obj.MyInt = null; + obj.MyIntArray = null; + obj.MyIntList = null; string json = JsonSerializer.ToString(obj, options); Assert.Equal(@"{}", json); diff --git a/src/System.Text.Json/tests/Serialization/TestClasses.SimpleTestClass.cs b/src/System.Text.Json/tests/Serialization/TestClasses.SimpleTestClass.cs index d5ed0cb6bfd7..d56864440eb3 100644 --- a/src/System.Text.Json/tests/Serialization/TestClasses.SimpleTestClass.cs +++ b/src/System.Text.Json/tests/Serialization/TestClasses.SimpleTestClass.cs @@ -55,6 +55,7 @@ public class SimpleTestClass : ITestClass public Dictionary MyStringToStringDict { get; set; } public IDictionary MyStringToStringIDict { get; set; } public IReadOnlyDictionary MyStringToStringIReadOnlyDict { get; set; } + public List MyListOfNullString { get; set; } public static readonly string s_json = $"{{{s_partialJsonProperties},{s_partialJsonArrays}}}"; public static readonly string s_json_flipped = $"{{{s_partialJsonArrays},{s_partialJsonProperties}}}"; @@ -106,7 +107,8 @@ public class SimpleTestClass : ITestClass @"""MyStringIListT"" : [""Hello""]," + @"""MyStringICollectionT"" : [""Hello""]," + @"""MyStringIReadOnlyCollectionT"" : [""Hello""]," + - @"""MyStringIReadOnlyListT"" : [""Hello""]"; + @"""MyStringIReadOnlyListT"" : [""Hello""]," + + @"""MyListOfNullString"" : [null]"; public static readonly byte[] s_data = Encoding.UTF8.GetBytes(s_json); @@ -160,6 +162,7 @@ public void Initialize() MyStringToStringDict = new Dictionary { { "key", "value" } }; MyStringToStringIDict = new Dictionary { { "key", "value" } }; MyStringToStringIReadOnlyDict = new Dictionary { { "key", "value" } }; + MyListOfNullString = new List { null }; } public void Verify() @@ -212,6 +215,7 @@ public void Verify() Assert.Equal("value", MyStringToStringDict["key"]); Assert.Equal("value", MyStringToStringIDict["key"]); Assert.Equal("value", MyStringToStringIReadOnlyDict["key"]); + Assert.Null(MyListOfNullString[0]); } } } diff --git a/src/System.Text.Json/tests/Serialization/TestClasses.SimpleTestClassWithNullables.cs b/src/System.Text.Json/tests/Serialization/TestClasses.SimpleTestClassWithNullables.cs index 698c0e6458d4..c61e99f41e0c 100644 --- a/src/System.Text.Json/tests/Serialization/TestClasses.SimpleTestClassWithNullables.cs +++ b/src/System.Text.Json/tests/Serialization/TestClasses.SimpleTestClassWithNullables.cs @@ -44,6 +44,7 @@ public abstract class SimpleBaseClassWithNullables public DateTimeOffset?[] MyDateTimeOffsetArray { get; set; } public SampleEnum?[] MyEnumArray { get; set; } public Dictionary MyStringToStringDict { get; set; } + public List MyListOfNullInt { get; set; } } public class SimpleTestClassWithNulls : SimpleBaseClassWithNullables, ITestClass @@ -90,6 +91,7 @@ public void Verify() Assert.Null(MyDateTimeOffsetArray); Assert.Null(MyEnumArray); Assert.Null(MyStringToStringDict); + Assert.Null(MyListOfNullInt); } public static readonly string s_json = @"{" + @@ -127,7 +129,8 @@ public void Verify() @"""MyDateTimeArray"" : null," + @"""MyDateTimeOffsetArray"" : null," + @"""MyEnumArray"" : null," + - @"""MyStringToStringDict"" : null" + + @"""MyStringToStringDict"" : null," + + @"""MyListOfNullInt"" : null" + @"}"; public static readonly byte[] s_data = Encoding.UTF8.GetBytes(s_json); @@ -171,7 +174,8 @@ public class SimpleTestClassWithNullables : SimpleBaseClassWithNullables, ITestC @"""MyDateTimeArray"" : [""2019-01-30T12:01:02.0000000Z""]," + @"""MyDateTimeOffsetArray"" : [""2019-01-30T12:01:02.0000000+01:00""]," + @"""MyEnumArray"" : [2]," + - @"""MyStringToStringDict"" : {""key"" : ""value""}" + + @"""MyStringToStringDict"" : {""key"" : ""value""}," + + @"""MyListOfNullInt"" : [null]" + @"}"; public static readonly byte[] s_data = Encoding.UTF8.GetBytes(s_json); @@ -214,6 +218,7 @@ public void Initialize() MyDateTimeOffsetArray = new DateTimeOffset?[] { new DateTimeOffset(2019, 1, 30, 12, 1, 2, new TimeSpan(1, 0, 0)) }; MyEnumArray = new SampleEnum?[] { SampleEnum.Two }; MyStringToStringDict = new Dictionary { { "key", "value" } }; + MyListOfNullInt = new List { null }; } public void Verify() @@ -254,6 +259,7 @@ public void Verify() Assert.Equal(new DateTimeOffset(2019, 1, 30, 12, 1, 2, new TimeSpan(1, 0, 0)), MyDateTimeOffsetArray[0]); Assert.Equal(SampleEnum.Two, MyEnumArray[0]); Assert.Equal("value", MyStringToStringDict["key"]); + Assert.Null(MyListOfNullInt[0]); } } } diff --git a/src/System.Text.Json/tests/Serialization/TestClasses.cs b/src/System.Text.Json/tests/Serialization/TestClasses.cs index 919f18bd7912..cb7c4e203b1c 100644 --- a/src/System.Text.Json/tests/Serialization/TestClasses.cs +++ b/src/System.Text.Json/tests/Serialization/TestClasses.cs @@ -30,11 +30,6 @@ public class TestClassWithNull public static readonly byte[] s_data = Encoding.UTF8.GetBytes(s_json); - public void Initialize() - { - MyString = null; - } - public void Verify() { Assert.Equal(MyString, null); @@ -45,10 +40,14 @@ public class TestClassWithInitializedProperties { public string MyString { get; set; } = "Hello"; public int? MyInt { get; set; } = 1; + public int[] MyIntArray { get; set; } = new int[] { 1 }; + public List MyIntList { get; set; } = new List { 1 }; public static readonly string s_null_json = @"{" + @"""MyString"" : null," + - @"""MyInt"" : null" + + @"""MyInt"" : null," + + @"""MyIntArray"" : null," + + @"""MyIntList"" : null" + @"}"; public static readonly byte[] s_data = Encoding.UTF8.GetBytes(s_null_json); @@ -108,6 +107,7 @@ public class TestClassWithObjectList : ITestClass @"{" + @"""MyData"":[" + SimpleTestClass.s_json + "," + + "null," + SimpleTestClass.s_json + @"]" + @"}"); @@ -122,6 +122,8 @@ public void Initialize() MyData.Add(obj); } + MyData.Add(null); + { SimpleTestClass obj = new SimpleTestClass(); obj.Initialize(); @@ -131,9 +133,10 @@ public void Initialize() public void Verify() { - Assert.Equal(2, MyData.Count); + Assert.Equal(3, MyData.Count); MyData[0].Verify(); - MyData[1].Verify(); + Assert.Null(MyData[1]); + MyData[2].Verify(); } } diff --git a/src/System.Text.Json/tests/Serialization/Value.ReadTests.cs b/src/System.Text.Json/tests/Serialization/Value.ReadTests.cs index 70722386de26..1fdd0b05977f 100644 --- a/src/System.Text.Json/tests/Serialization/Value.ReadTests.cs +++ b/src/System.Text.Json/tests/Serialization/Value.ReadTests.cs @@ -72,6 +72,9 @@ public static void ReadPrimitiveArrayFail() // Invalid data Assert.Throws(() => JsonSerializer.Parse(Encoding.UTF8.GetBytes(@"[1,""a""]"))); + // Invalid data + Assert.Throws(() => JsonSerializer.Parse>(Encoding.UTF8.GetBytes(@"[1,""a""]"))); + // Multidimensional arrays currently not supported Assert.Throws(() => JsonSerializer.Parse(Encoding.UTF8.GetBytes(@"[[1,2],[3,4]]"))); } diff --git a/src/System.Text.Json/tests/Serialization/Value.WriteTests.cs b/src/System.Text.Json/tests/Serialization/Value.WriteTests.cs index 0ff8dbe4443e..8a6c96000206 100644 --- a/src/System.Text.Json/tests/Serialization/Value.WriteTests.cs +++ b/src/System.Text.Json/tests/Serialization/Value.WriteTests.cs @@ -17,6 +17,18 @@ public static void WritePrimitives() Assert.Equal("1", json); } + { + int? value = 1; + string json = JsonSerializer.ToString(value); + Assert.Equal("1", json); + } + + { + int? value = null; + string json = JsonSerializer.ToString(value); + Assert.Equal("null", json); + } + { Span json = JsonSerializer.ToBytes(1); Assert.Equal(Encoding.UTF8.GetBytes("1"), json.ToArray()); From 53bf5f419d7b474293e5ec376feed8ef1223d614 Mon Sep 17 00:00:00 2001 From: Eric StJohn Date: Tue, 7 May 2019 09:59:33 -0700 Subject: [PATCH 249/607] Remove suppression for EventRegistrationToken now that it is no longer duplicated (#37481) --- pkg/test/frameworkSettings/netcoreapp3.0/settings.targets | 7 ------- 1 file changed, 7 deletions(-) diff --git a/pkg/test/frameworkSettings/netcoreapp3.0/settings.targets b/pkg/test/frameworkSettings/netcoreapp3.0/settings.targets index afde20c57942..4397153c29fa 100644 --- a/pkg/test/frameworkSettings/netcoreapp3.0/settings.targets +++ b/pkg/test/frameworkSettings/netcoreapp3.0/settings.targets @@ -15,11 +15,4 @@ - - - - - From 51478cf10e70e5bbb3577618452522d7f7a80e7b Mon Sep 17 00:00:00 2001 From: Stephen Toub Date: Tue, 7 May 2019 13:19:40 -0400 Subject: [PATCH 250/607] Move WithCancellation/ConfigureAwait extension methods (#37367) --- src/System.Threading.Tasks/ref/System.Threading.Tasks.cs | 7 +++++-- .../ConfiguredCancelableAsyncEnumerableTests.netcoreapp.cs | 4 ++-- src/shims/ApiCompatBaseline.netcoreapp.netstandard.txt | 5 ++++- src/shims/ApiCompatBaseline.netcoreapp.netstandardOnly.txt | 5 ++++- 4 files changed, 15 insertions(+), 6 deletions(-) diff --git a/src/System.Threading.Tasks/ref/System.Threading.Tasks.cs b/src/System.Threading.Tasks/ref/System.Threading.Tasks.cs index 1b2942e1a8e8..48fb188fadcd 100644 --- a/src/System.Threading.Tasks/ref/System.Threading.Tasks.cs +++ b/src/System.Threading.Tasks/ref/System.Threading.Tasks.cs @@ -144,13 +144,16 @@ public void SetResult(TResult result) { } public bool TrySetException(System.Exception exception) { throw null; } public bool TrySetResult(TResult result) { throw null; } } - public static partial class TaskExtensions + public static partial class TaskAsyncEnumerableExtensions { public static System.Runtime.CompilerServices.ConfiguredAsyncDisposable ConfigureAwait(this System.IAsyncDisposable source, bool continueOnCapturedContext) { throw null; } public static System.Runtime.CompilerServices.ConfiguredCancelableAsyncEnumerable ConfigureAwait(this System.Collections.Generic.IAsyncEnumerable source, bool continueOnCapturedContext) { throw null; } + public static System.Runtime.CompilerServices.ConfiguredCancelableAsyncEnumerable WithCancellation(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken) { throw null; } + } + public static partial class TaskExtensions + { public static System.Threading.Tasks.Task Unwrap(this System.Threading.Tasks.Task task) { throw null; } public static System.Threading.Tasks.Task Unwrap(this System.Threading.Tasks.Task> task) { throw null; } - public static System.Runtime.CompilerServices.ConfiguredCancelableAsyncEnumerable WithCancellation(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken) { throw null; } } public partial class TaskSchedulerException : System.Exception { diff --git a/src/System.Threading.Tasks/tests/System.Runtime.CompilerServices/ConfiguredCancelableAsyncEnumerableTests.netcoreapp.cs b/src/System.Threading.Tasks/tests/System.Runtime.CompilerServices/ConfiguredCancelableAsyncEnumerableTests.netcoreapp.cs index bc2661cd4c64..e692c59bc452 100644 --- a/src/System.Threading.Tasks/tests/System.Runtime.CompilerServices/ConfiguredCancelableAsyncEnumerableTests.netcoreapp.cs +++ b/src/System.Threading.Tasks/tests/System.Runtime.CompilerServices/ConfiguredCancelableAsyncEnumerableTests.netcoreapp.cs @@ -35,7 +35,7 @@ public void Default_EnumeratorMembers_Throws() [Fact] public void Default_WithCancellation_ConfigureAwait_NoThrow() { - ConfiguredCancelableAsyncEnumerable e = TaskExtensions.WithCancellation((IAsyncEnumerable)null, default); + ConfiguredCancelableAsyncEnumerable e = ((IAsyncEnumerable)null).WithCancellation(default); e = e.ConfigureAwait(false); e = e.WithCancellation(default); Assert.Throws(() => e.GetAsyncEnumerator()); @@ -44,7 +44,7 @@ public void Default_WithCancellation_ConfigureAwait_NoThrow() [Fact] public void Default_ConfigureAwait_WithCancellation_NoThrow() { - ConfiguredCancelableAsyncEnumerable e = TaskExtensions.ConfigureAwait((IAsyncEnumerable)null, false); + ConfiguredCancelableAsyncEnumerable e = ((IAsyncEnumerable)null).ConfigureAwait(false); e = e.WithCancellation(default); e = e.ConfigureAwait(false); Assert.Throws(() => e.GetAsyncEnumerator()); diff --git a/src/shims/ApiCompatBaseline.netcoreapp.netstandard.txt b/src/shims/ApiCompatBaseline.netcoreapp.netstandard.txt index 7d9a9a731b88..33b0f212b273 100644 --- a/src/shims/ApiCompatBaseline.netcoreapp.netstandard.txt +++ b/src/shims/ApiCompatBaseline.netcoreapp.netstandard.txt @@ -68,4 +68,7 @@ CannotSealType : Type 'System.Linq.EnumerableExecutor' is effectively (has a pri MembersMustExist : Member 'System.Linq.EnumerableExecutor..ctor()' does not exist in the implementation but it does exist in the contract. CannotSealType : Type 'System.Linq.EnumerableQuery' is effectively (has a private constructor) sealed in the implementation but not sealed in the contract. MembersMustExist : Member 'System.Linq.EnumerableQuery..ctor()' does not exist in the implementation but it does exist in the contract. -Total Issues: 59 \ No newline at end of file +MembersMustExist : Member 'System.Threading.Tasks.TaskExtensions.ConfigureAwait(System.IAsyncDisposable, System.Boolean)' does not exist in the implementation but it does exist in the contract. +MembersMustExist : Member 'System.Threading.Tasks.TaskExtensions.ConfigureAwait(System.Collections.Generic.IAsyncEnumerable, System.Boolean)' does not exist in the implementation but it does exist in the contract. +MembersMustExist : Member 'System.Threading.Tasks.TaskExtensions.WithCancellation(System.Collections.Generic.IAsyncEnumerable, System.Threading.CancellationToken)' does not exist in the implementation but it does exist in the contract. +Total Issues: 62 \ No newline at end of file diff --git a/src/shims/ApiCompatBaseline.netcoreapp.netstandardOnly.txt b/src/shims/ApiCompatBaseline.netcoreapp.netstandardOnly.txt index 6bc6075ce54c..e9bfcd79b73f 100644 --- a/src/shims/ApiCompatBaseline.netcoreapp.netstandardOnly.txt +++ b/src/shims/ApiCompatBaseline.netcoreapp.netstandardOnly.txt @@ -85,6 +85,9 @@ CannotMakeMemberNonVirtual : Member 'System.ComponentModel.BaseNumberConverter.C CannotMakeMemberNonVirtual : Member 'System.ComponentModel.BaseNumberConverter.CanConvertTo(System.ComponentModel.ITypeDescriptorContext, System.Type)' is non-virtual in the implementation but is virtual in the contract. CannotMakeMemberNonVirtual : Member 'System.ComponentModel.BaseNumberConverter.ConvertFrom(System.ComponentModel.ITypeDescriptorContext, System.Globalization.CultureInfo, System.Object)' is non-virtual in the implementation but is virtual in the contract. CannotMakeMemberNonVirtual : Member 'System.ComponentModel.BaseNumberConverter.ConvertTo(System.ComponentModel.ITypeDescriptorContext, System.Globalization.CultureInfo, System.Object, System.Type)' is non-virtual in the implementation but is virtual in the contract. +MembersMustExist : Member 'System.Threading.Tasks.TaskExtensions.ConfigureAwait(System.IAsyncDisposable, System.Boolean)' does not exist in the implementation but it does exist in the contract. +MembersMustExist : Member 'System.Threading.Tasks.TaskExtensions.ConfigureAwait(System.Collections.Generic.IAsyncEnumerable, System.Boolean)' does not exist in the implementation but it does exist in the contract. +MembersMustExist : Member 'System.Threading.Tasks.TaskExtensions.WithCancellation(System.Collections.Generic.IAsyncEnumerable, System.Threading.CancellationToken)' does not exist in the implementation but it does exist in the contract. CannotSealType : Type 'System.Xml.Schema.XmlSchemaDatatype' is effectively (has a private constructor) sealed in the implementation but not sealed in the contract. MembersMustExist : Member 'System.Xml.Schema.XmlSchemaDatatype..ctor()' does not exist in the implementation but it does exist in the contract. CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.TokenizedType' is non-virtual in the implementation but is virtual in the contract. @@ -117,4 +120,4 @@ CannotSealType : Type 'System.Linq.EnumerableExecutor' is effectively (has a pri MembersMustExist : Member 'System.Linq.EnumerableExecutor..ctor()' does not exist in the implementation but it does exist in the contract. CannotSealType : Type 'System.Linq.EnumerableQuery' is effectively (has a private constructor) sealed in the implementation but not sealed in the contract. MembersMustExist : Member 'System.Linq.EnumerableQuery..ctor()' does not exist in the implementation but it does exist in the contract. -Total Issues: 118 +Total Issues: 121 From cf15e0ad104b224f6e8bb50eb6588c3cb01f1368 Mon Sep 17 00:00:00 2001 From: Krzysztof Wicher Date: Mon, 6 May 2019 06:50:18 -0700 Subject: [PATCH 251/607] Nullable: System.Collections.Generic remainder (dotnet/coreclr#24340) * Nullable: System.Collections.Generic remainder * apply review feedback Signed-off-by: dotnet-bot --- .../Collections/Generic/IAsyncEnumerable.cs | 1 + .../Collections/Generic/IAsyncEnumerator.cs | 1 + .../System/Collections/Generic/ICollection.cs | 1 + .../Generic/ICollectionDebugView.cs | 1 + .../System/Collections/Generic/IComparer.cs | 3 +- .../System/Collections/Generic/IDictionary.cs | 5 +- .../Generic/IDictionaryDebugView.cs | 3 +- .../System/Collections/Generic/IEnumerator.cs | 1 + .../System/Collections/Generic/IList.cs | 1 + .../Generic/IReadOnlyCollection.cs | 1 + .../Generic/IReadOnlyDictionary.cs | 5 +- .../Collections/Generic/IReadOnlyList.cs | 1 + .../System/Collections/Generic/List.cs | 81 ++++++++++--------- .../NonRandomizedStringEqualityComparer.cs | 11 ++- .../Collections/Generic/ValueListBuilder.cs | 5 +- 15 files changed, 69 insertions(+), 52 deletions(-) diff --git a/src/Common/src/CoreLib/System/Collections/Generic/IAsyncEnumerable.cs b/src/Common/src/CoreLib/System/Collections/Generic/IAsyncEnumerable.cs index 302b96485506..3268c468b5b9 100644 --- a/src/Common/src/CoreLib/System/Collections/Generic/IAsyncEnumerable.cs +++ b/src/Common/src/CoreLib/System/Collections/Generic/IAsyncEnumerable.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable using System.Threading; namespace System.Collections.Generic diff --git a/src/Common/src/CoreLib/System/Collections/Generic/IAsyncEnumerator.cs b/src/Common/src/CoreLib/System/Collections/Generic/IAsyncEnumerator.cs index 0d9afc1914f9..f719a1c17163 100644 --- a/src/Common/src/CoreLib/System/Collections/Generic/IAsyncEnumerator.cs +++ b/src/Common/src/CoreLib/System/Collections/Generic/IAsyncEnumerator.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable using System.Threading.Tasks; namespace System.Collections.Generic diff --git a/src/Common/src/CoreLib/System/Collections/Generic/ICollection.cs b/src/Common/src/CoreLib/System/Collections/Generic/ICollection.cs index 78ee5cb1f55f..5780c7552b66 100644 --- a/src/Common/src/CoreLib/System/Collections/Generic/ICollection.cs +++ b/src/Common/src/CoreLib/System/Collections/Generic/ICollection.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable using System; using System.Runtime.CompilerServices; diff --git a/src/Common/src/CoreLib/System/Collections/Generic/ICollectionDebugView.cs b/src/Common/src/CoreLib/System/Collections/Generic/ICollectionDebugView.cs index 9916e857e2c0..cb4a4caf87c9 100644 --- a/src/Common/src/CoreLib/System/Collections/Generic/ICollectionDebugView.cs +++ b/src/Common/src/CoreLib/System/Collections/Generic/ICollectionDebugView.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable using System.Diagnostics; namespace System.Collections.Generic diff --git a/src/Common/src/CoreLib/System/Collections/Generic/IComparer.cs b/src/Common/src/CoreLib/System/Collections/Generic/IComparer.cs index 713d499cc846..74d721312fa2 100644 --- a/src/Common/src/CoreLib/System/Collections/Generic/IComparer.cs +++ b/src/Common/src/CoreLib/System/Collections/Generic/IComparer.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable using System; namespace System.Collections.Generic @@ -15,6 +16,6 @@ public interface IComparer // value less than zero if x is less than y, zero if x is equal to y, or a // value greater than zero if x is greater than y. // - int Compare(T x, T y); + int Compare(T x, T y); // TODO-NULLABLE-GENERIC: must work with nulls } } diff --git a/src/Common/src/CoreLib/System/Collections/Generic/IDictionary.cs b/src/Common/src/CoreLib/System/Collections/Generic/IDictionary.cs index 05677da3b2b7..8b38a91ce363 100644 --- a/src/Common/src/CoreLib/System/Collections/Generic/IDictionary.cs +++ b/src/Common/src/CoreLib/System/Collections/Generic/IDictionary.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable using System; namespace System.Collections.Generic @@ -10,7 +11,7 @@ namespace System.Collections.Generic // Keys can be any non-null object. Values can be any object. // You can look up a value in an IDictionary via the default indexed // property, Items. - public interface IDictionary : ICollection> + public interface IDictionary : ICollection> where TKey : object { // Interfaces are not serializable // The Item property provides methods to read and edit entries @@ -45,6 +46,6 @@ ICollection Values // bool Remove(TKey key); - bool TryGetValue(TKey key, out TValue value); + bool TryGetValue(TKey key, out TValue value); // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 } } diff --git a/src/Common/src/CoreLib/System/Collections/Generic/IDictionaryDebugView.cs b/src/Common/src/CoreLib/System/Collections/Generic/IDictionaryDebugView.cs index 4721642fee01..8e8dce7e4ae0 100644 --- a/src/Common/src/CoreLib/System/Collections/Generic/IDictionaryDebugView.cs +++ b/src/Common/src/CoreLib/System/Collections/Generic/IDictionaryDebugView.cs @@ -2,11 +2,12 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable using System.Diagnostics; namespace System.Collections.Generic { - internal sealed class IDictionaryDebugView + internal sealed class IDictionaryDebugView where K : object { private readonly IDictionary _dict; diff --git a/src/Common/src/CoreLib/System/Collections/Generic/IEnumerator.cs b/src/Common/src/CoreLib/System/Collections/Generic/IEnumerator.cs index ec05eaf9f66d..475b86f22558 100644 --- a/src/Common/src/CoreLib/System/Collections/Generic/IEnumerator.cs +++ b/src/Common/src/CoreLib/System/Collections/Generic/IEnumerator.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable using System; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/System/Collections/Generic/IList.cs b/src/Common/src/CoreLib/System/Collections/Generic/IList.cs index 2abc7b9142a0..eb753d0e4cb8 100644 --- a/src/Common/src/CoreLib/System/Collections/Generic/IList.cs +++ b/src/Common/src/CoreLib/System/Collections/Generic/IList.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable using System; using System.Collections; using System.Runtime.CompilerServices; diff --git a/src/Common/src/CoreLib/System/Collections/Generic/IReadOnlyCollection.cs b/src/Common/src/CoreLib/System/Collections/Generic/IReadOnlyCollection.cs index 9eea39de2233..c86a4a35973d 100644 --- a/src/Common/src/CoreLib/System/Collections/Generic/IReadOnlyCollection.cs +++ b/src/Common/src/CoreLib/System/Collections/Generic/IReadOnlyCollection.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable using System; using System.Runtime.CompilerServices; diff --git a/src/Common/src/CoreLib/System/Collections/Generic/IReadOnlyDictionary.cs b/src/Common/src/CoreLib/System/Collections/Generic/IReadOnlyDictionary.cs index 300b9966112b..1f37b7887072 100644 --- a/src/Common/src/CoreLib/System/Collections/Generic/IReadOnlyDictionary.cs +++ b/src/Common/src/CoreLib/System/Collections/Generic/IReadOnlyDictionary.cs @@ -2,15 +2,16 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable using System; namespace System.Collections.Generic { // Provides a read-only view of a generic dictionary. - public interface IReadOnlyDictionary : IReadOnlyCollection> + public interface IReadOnlyDictionary : IReadOnlyCollection> where TKey : object { bool ContainsKey(TKey key); - bool TryGetValue(TKey key, out TValue value); + bool TryGetValue(TKey key, out TValue value); // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 TValue this[TKey key] { get; } IEnumerable Keys { get; } diff --git a/src/Common/src/CoreLib/System/Collections/Generic/IReadOnlyList.cs b/src/Common/src/CoreLib/System/Collections/Generic/IReadOnlyList.cs index 7193805b068e..6a1e9bbf09f4 100644 --- a/src/Common/src/CoreLib/System/Collections/Generic/IReadOnlyList.cs +++ b/src/Common/src/CoreLib/System/Collections/Generic/IReadOnlyList.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable using System; using System.Runtime.CompilerServices; diff --git a/src/Common/src/CoreLib/System/Collections/Generic/List.cs b/src/Common/src/CoreLib/System/Collections/Generic/List.cs index 59dcd9344b6d..b9c5f428de14 100644 --- a/src/Common/src/CoreLib/System/Collections/Generic/List.cs +++ b/src/Common/src/CoreLib/System/Collections/Generic/List.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable using System.Collections.ObjectModel; using System.Diagnostics; using System.Runtime.CompilerServices; @@ -80,7 +81,7 @@ public List(IEnumerable collection) { _size = 0; _items = s_emptyArray; - using (IEnumerator en = collection.GetEnumerator()) + using (IEnumerator en = collection!.GetEnumerator()) { while (en.MoveNext()) { @@ -166,14 +167,14 @@ public T this[int index] } } - private static bool IsCompatibleObject(object value) + private static bool IsCompatibleObject(object? value) { // Non-null values are fine. Only accept nulls if T is a class or Nullable. // Note that default(T) is not equal to null for value types except when T is Nullable. - return ((value is T) || (value == null && default(T) == null)); + return ((value is T) || (value == null && default(T)! == null)); // https://github.com/dotnet/roslyn/issues/34757 } - object IList.this[int index] + object? IList.this[int index] // TODO-NULLABLE-GENERIC: nullability is the same as of T { get { @@ -185,7 +186,7 @@ object IList.this[int index] try { - this[index] = (T)value; + this[index] = (T)value!; } catch (InvalidCastException) { @@ -225,13 +226,13 @@ private void AddWithResize(T item) _items[size] = item; } - int IList.Add(object item) + int IList.Add(object? item) // TODO-NULLABLE-GENERIC: nullable if default(T) can be null { ThrowHelper.IfNullAndNullsAreIllegalThenThrow(item, ExceptionArgument.item); try { - Add((T)item); + Add((T)item!); } catch (InvalidCastException) { @@ -271,7 +272,7 @@ public ReadOnlyCollection AsReadOnly() // The method uses the Array.BinarySearch method to perform the // search. // - public int BinarySearch(int index, int count, T item, IComparer comparer) + public int BinarySearch(int index, int count, T item, IComparer? comparer) { if (index < 0) ThrowHelper.ThrowIndexArgumentOutOfRange_NeedNonNegNumException(); @@ -286,7 +287,7 @@ public int BinarySearch(int index, int count, T item, IComparer comparer) public int BinarySearch(T item) => BinarySearch(0, Count, item, null); - public int BinarySearch(T item, IComparer comparer) + public int BinarySearch(T item, IComparer? comparer) => BinarySearch(0, Count, item, comparer); // Clears the contents of List. @@ -326,11 +327,11 @@ public bool Contains(T item) return _size != 0 && IndexOf(item) != -1; } - bool IList.Contains(object item) + bool IList.Contains(object? item) { if (IsCompatibleObject(item)) { - return Contains((T)item); + return Contains((T)item!); } return false; } @@ -345,7 +346,7 @@ public List ConvertAll(Converter converter) List list = new List(_size); for (int i = 0; i < _size; i++) { - list._items[i] = converter(_items[i]); + list._items[i] = converter!(_items[i]); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 } list._size = _size; return list; @@ -368,7 +369,7 @@ void ICollection.CopyTo(Array array, int arrayIndex) try { // Array.Copy will check for NULL. - Array.Copy(_items, 0, array, arrayIndex, _size); + Array.Copy(_items, 0, array!, arrayIndex, _size); } catch (ArrayTypeMismatchException) { @@ -427,12 +428,12 @@ public T Find(Predicate match) for (int i = 0; i < _size; i++) { - if (match(_items[i])) + if (match!(_items[i])) { return _items[i]; } } - return default; + return default!; // TODO-NULLABLE-GENERIC: return value is nullable when T can be nullable } public List FindAll(Predicate match) @@ -445,7 +446,7 @@ public List FindAll(Predicate match) List list = new List(); for (int i = 0; i < _size; i++) { - if (match(_items[i])) + if (match!(_items[i])) // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 { list.Add(_items[i]); } @@ -479,7 +480,7 @@ public int FindIndex(int startIndex, int count, Predicate match) int endIndex = startIndex + count; for (int i = startIndex; i < endIndex; i++) { - if (match(_items[i])) return i; + if (match!(_items[i])) return i; } return -1; } @@ -493,12 +494,12 @@ public T FindLast(Predicate match) for (int i = _size - 1; i >= 0; i--) { - if (match(_items[i])) + if (match!(_items[i])) { return _items[i]; } } - return default; + return default!; // TODO-NULLABLE-GENERIC: return value is nullable when T can be nullable } public int FindLastIndex(Predicate match) @@ -540,7 +541,7 @@ public int FindLastIndex(int startIndex, int count, Predicate match) int endIndex = startIndex - count; for (int i = startIndex; i > endIndex; i--) { - if (match(_items[i])) + if (match!(_items[i])) // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 { return i; } @@ -563,7 +564,7 @@ public void ForEach(Action action) { break; } - action(_items[i]); + action!(_items[i]); } if (version != _version) @@ -619,11 +620,11 @@ public List GetRange(int index, int count) public int IndexOf(T item) => Array.IndexOf(_items, item, 0, _size); - int IList.IndexOf(object item) + int IList.IndexOf(object? item) // TODO-NULLABLE-GENERIC: nullability == nullability(T) { if (IsCompatibleObject(item)) { - return IndexOf((T)item); + return IndexOf((T)item!); } return -1; } @@ -685,13 +686,13 @@ public void Insert(int index, T item) _version++; } - void IList.Insert(int index, object item) + void IList.Insert(int index, object? item) // TODO-NULLABLE-GENERIC: nullable when T can be null { ThrowHelper.IfNullAndNullsAreIllegalThenThrow(item, ExceptionArgument.item); try { - Insert(index, (T)item); + Insert(index, (T)item!); } catch (InvalidCastException) { @@ -744,7 +745,7 @@ public void InsertRange(int index, IEnumerable collection) } else { - using (IEnumerator en = collection.GetEnumerator()) + using (IEnumerator en = collection!.GetEnumerator()) // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 { while (en.MoveNext()) { @@ -844,11 +845,11 @@ public bool Remove(T item) return false; } - void IList.Remove(object item) + void IList.Remove(object? item) // TODO-NULLABLE-GENERIC: nullable when T can be null { if (IsCompatibleObject(item)) { - Remove((T)item); + Remove((T)item!); } } @@ -864,14 +865,14 @@ public int RemoveAll(Predicate match) int freeIndex = 0; // the first free slot in items array // Find the first item which needs to be removed. - while (freeIndex < _size && !match(_items[freeIndex])) freeIndex++; + while (freeIndex < _size && !match!(_items[freeIndex])) freeIndex++; // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 if (freeIndex >= _size) return 0; int current = freeIndex + 1; while (current < _size) { // Find the first item which needs to be kept. - while (current < _size && match(_items[current])) current++; + while (current < _size && match!(_items[current])) current++; if (current < _size) { @@ -906,7 +907,7 @@ public void RemoveAt(int index) } if (RuntimeHelpers.IsReferenceOrContainsReferences()) { - _items[_size] = default; + _items[_size] = default!; } _version++; } @@ -981,7 +982,7 @@ public void Sort() // Sorts the elements in this list. Uses Array.Sort with the // provided comparer. - public void Sort(IComparer comparer) + public void Sort(IComparer? comparer) => Sort(0, Count, comparer); // Sorts the elements in a section of this list. The sort compares the @@ -992,7 +993,7 @@ public void Sort(IComparer comparer) // // This method uses the Array.Sort method to sort the elements. // - public void Sort(int index, int count, IComparer comparer) + public void Sort(int index, int count, IComparer? comparer) { if (index < 0) { @@ -1023,7 +1024,7 @@ public void Sort(Comparison comparison) if (_size > 1) { - ArraySortHelper.Sort(_items, 0, _size, comparison); + ArraySortHelper.Sort(_items, 0, _size, comparison!); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 } _version++; } @@ -1069,7 +1070,7 @@ public bool TrueForAll(Predicate match) for (int i = 0; i < _size; i++) { - if (!match(_items[i])) + if (!match!(_items[i])) { return false; } @@ -1082,14 +1083,14 @@ public struct Enumerator : IEnumerator, IEnumerator private readonly List _list; private int _index; private readonly int _version; - private T _current; + private T _current; // TODO-NULLABLE-GENERIC: nullable when T can be null internal Enumerator(List list) { _list = list; _index = 0; _version = list._version; - _current = default; + _current = default!; } public void Dispose() @@ -1117,13 +1118,13 @@ private bool MoveNextRare() } _index = _list._size + 1; - _current = default; + _current = default!; return false; } public T Current => _current; - object IEnumerator.Current + object? IEnumerator.Current { get { @@ -1143,7 +1144,7 @@ void IEnumerator.Reset() } _index = 0; - _current = default; + _current = default!; } } } diff --git a/src/Common/src/CoreLib/System/Collections/Generic/NonRandomizedStringEqualityComparer.cs b/src/Common/src/CoreLib/System/Collections/Generic/NonRandomizedStringEqualityComparer.cs index 91b782061761..89db7697e8ac 100644 --- a/src/Common/src/CoreLib/System/Collections/Generic/NonRandomizedStringEqualityComparer.cs +++ b/src/Common/src/CoreLib/System/Collections/Generic/NonRandomizedStringEqualityComparer.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable using System.Runtime.Serialization; namespace System.Collections.Generic @@ -12,23 +13,25 @@ namespace System.Collections.Generic // randomized string hashing. [Serializable] // Required for compatibility with .NET Core 2.0 as we exposed the NonRandomizedStringEqualityComparer inside the serialization blob // Needs to be public to support binary serialization compatibility - public sealed class NonRandomizedStringEqualityComparer : EqualityComparer, ISerializable + public sealed class NonRandomizedStringEqualityComparer : EqualityComparer, ISerializable { - internal static new IEqualityComparer Default { get; } = new NonRandomizedStringEqualityComparer(); + internal static new IEqualityComparer Default { get; } = new NonRandomizedStringEqualityComparer(); private NonRandomizedStringEqualityComparer() { } // This is used by the serialization engine. private NonRandomizedStringEqualityComparer(SerializationInfo information, StreamingContext context) { } - public sealed override bool Equals(string x, string y) => string.Equals(x, y); + public sealed override bool Equals(string? x, string? y) => string.Equals(x, y); - public sealed override int GetHashCode(string obj) => obj?.GetNonRandomizedHashCode() ?? 0; + public sealed override int GetHashCode(string? obj) => obj?.GetNonRandomizedHashCode() ?? 0; public void GetObjectData(SerializationInfo info, StreamingContext context) { // We are doing this to stay compatible with .NET Framework. +#pragma warning disable CS8631 // TODO-NULLABLE-GENERIC: https://github.com/dotnet/roslyn/issues/35406 info.SetType(typeof(GenericEqualityComparer)); +#pragma warning restore } } } diff --git a/src/Common/src/CoreLib/System/Collections/Generic/ValueListBuilder.cs b/src/Common/src/CoreLib/System/Collections/Generic/ValueListBuilder.cs index aea6052f030a..cce86c23e4ef 100644 --- a/src/Common/src/CoreLib/System/Collections/Generic/ValueListBuilder.cs +++ b/src/Common/src/CoreLib/System/Collections/Generic/ValueListBuilder.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable using System.Buffers; using System.Diagnostics; using System.Runtime.CompilerServices; @@ -11,7 +12,7 @@ namespace System.Collections.Generic internal ref partial struct ValueListBuilder { private Span _span; - private T[] _arrayFromPool; + private T[]? _arrayFromPool; private int _pos; public ValueListBuilder(Span initialSpan) @@ -74,7 +75,7 @@ private void Grow() bool success = _span.TryCopyTo(array); Debug.Assert(success); - T[] toReturn = _arrayFromPool; + T[]? toReturn = _arrayFromPool; _span = _arrayFromPool = array; if (toReturn != null) { From d81fc3589a166ab78096dee0a4ddf0cd2fbd17d7 Mon Sep 17 00:00:00 2001 From: Stephen Toub Date: Tue, 7 May 2019 12:10:47 -0400 Subject: [PATCH 252/607] Fix nullability mismatch on partial declarations --- .../src/System/Collections/Generic/ValueListBuilder.Pop.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/System.Text.RegularExpressions/src/System/Collections/Generic/ValueListBuilder.Pop.cs b/src/System.Text.RegularExpressions/src/System/Collections/Generic/ValueListBuilder.Pop.cs index 18075c02612f..f3e996008264 100644 --- a/src/System.Text.RegularExpressions/src/System/Collections/Generic/ValueListBuilder.Pop.cs +++ b/src/System.Text.RegularExpressions/src/System/Collections/Generic/ValueListBuilder.Pop.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable using System.Runtime.CompilerServices; namespace System.Collections.Generic From 4285e667694634d7c9e17880f911629e9e4b1686 Mon Sep 17 00:00:00 2001 From: Jeremy Koritzinsky Date: Tue, 7 May 2019 12:38:54 -0700 Subject: [PATCH 253/607] Propagate System.Runtime.WindowsRuntime package build targets though transitive references. (#37476) * Propagate System.Runtime.WindowsRuntime package build targets though transitive references. * PR Feedback. --- .../pkg/System.Runtime.WindowsRuntime.pkgproj | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/src/System.Runtime.WindowsRuntime/pkg/System.Runtime.WindowsRuntime.pkgproj b/src/System.Runtime.WindowsRuntime/pkg/System.Runtime.WindowsRuntime.pkgproj index 4559a092e762..8a189e7737e6 100644 --- a/src/System.Runtime.WindowsRuntime/pkg/System.Runtime.WindowsRuntime.pkgproj +++ b/src/System.Runtime.WindowsRuntime/pkg/System.Runtime.WindowsRuntime.pkgproj @@ -54,15 +54,11 @@ The included build targets explicitly reference System.Runtime and add the facade references to the compiler. --> - - \build\net45\ - - - \build\net451\ - - - \build\net461\ - + <_buildTargetsTFMs Include="net45;net451;net461" + TFM="%(Identity)" + SourceFile=".\build\%(TFM)\$(Id).targets" /> + + From 323e8365efd0843c7f1244f7cb4c6ee50fc08f15 Mon Sep 17 00:00:00 2001 From: Matt Galbraith Date: Tue, 7 May 2019 12:41:37 -0700 Subject: [PATCH 254/607] Update Helix SDK version Needed to not break test runs in the coming Python3 conversion. --- global.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/global.json b/global.json index f5752f4c55e4..7868a06abf40 100644 --- a/global.json +++ b/global.json @@ -4,7 +4,7 @@ }, "msbuild-sdks": { "Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19229.8", - "Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19229.8", + "Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19257.4", "Microsoft.NET.Sdk.IL": "3.0.0-preview6-27705-72" } } From a583808d9f0049860aa8ccaf419bb32afd23ea66 Mon Sep 17 00:00:00 2001 From: Matt Galbraith Date: Tue, 7 May 2019 13:00:48 -0700 Subject: [PATCH 255/607] Fall back .1 Looks like .4 isn't on the feeds yet, trying .3 --- global.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/global.json b/global.json index 7868a06abf40..e6d5bea83e75 100644 --- a/global.json +++ b/global.json @@ -4,7 +4,7 @@ }, "msbuild-sdks": { "Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19229.8", - "Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19257.4", + "Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19257.3", "Microsoft.NET.Sdk.IL": "3.0.0-preview6-27705-72" } } From 7890b88686e8592c19d1d055f229b699276e4f40 Mon Sep 17 00:00:00 2001 From: Tanner Gooding Date: Tue, 7 May 2019 13:17:47 -0700 Subject: [PATCH 256/607] Fixing SystemNative_GetTimestampResolution for CLOCK_MONOTONIC (#37494) --- src/Native/Unix/System.Native/pal_time.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/Native/Unix/System.Native/pal_time.c b/src/Native/Unix/System.Native/pal_time.c index 90665e7c9671..1b126678fe7c 100644 --- a/src/Native/Unix/System.Native/pal_time.c +++ b/src/Native/Unix/System.Native/pal_time.c @@ -68,15 +68,13 @@ uint64_t SystemNative_GetTimestampResolution() return (SecondsToNanoSeconds * (uint64_t)(mtid.denom)) / (uint64_t)(mtid.numer); #else - struct timespec ts; - - if (clock_getres(CLOCK_MONOTONIC, &ts) != 0) - { - return 0; - } + // clock_gettime() returns a result in terms of nanoseconds rather than a count. This + // means that we need to either always scale the result by the actual resolution (to + // get a count) or we need to say the resolution is in terms of nanoseconds. We prefer + // the latter since it allows the highest throughput and should minimize error propagated + // to the user. - uint64_t nanosecondsPerTick = ((uint64_t)(ts.tv_sec) * SecondsToNanoSeconds) + (uint64_t)(ts.tv_nsec); - return SecondsToNanoSeconds / nanosecondsPerTick; + return SecondsToNanoSeconds; #endif } From 035343743c5a7f67be8a2a2f36913a3c43893b76 Mon Sep 17 00:00:00 2001 From: Eric StJohn Date: Tue, 7 May 2019 19:46:58 -0700 Subject: [PATCH 257/607] React to APICompat changes enabling reverse APICompat for facades (#37375) * React to APICompat changes enabling reverse APICompat for facades * Fix UAP and NETFX reverse APICompat issues * Fix reverse APICompat baseline for allconfigurations build * Manually update to latest APICompat * Manually update to latest CoreCLR and fix issues * Baseline System.Threading.Tasks * Revert "Manually update to latest CoreCLR and fix issues" This partially reverts commit ee800617b6a52cc66ac3214717f34b8896320ef9. I'm keeping the baseline changes which will be needed when we get a new update. * Temporarily baseline DiagnosticCounter API gaps This can be removed when get a new CoreCLR That's currently blocked due to regressions in tests. --- Directory.Build.props | 5 +-- eng/Version.Details.xml | 4 +-- eng/Versions.props | 2 +- eng/references.targets | 6 ++-- eng/resolveContract.targets | 15 ++++++-- .../ref/CoreFx.Private.TestUtilities.cs | 4 ++- .../src/CoreFx.Private.TestUtilities.csproj | 1 + .../src/MatchingRefApiCompatBaseline.txt | 9 +++++ .../src/MatchingRefApiCompatBaseline.txt | 8 +++++ .../src/MatchingRefApiCompatBaseline.txt | 3 ++ .../src/ApiCompatBaseline.netfx.txt | 4 --- .../src/MatchingRefApiCompatBaseline.txt | 9 +++++ .../src/MatchingRefApiCompatBaseline.uap.txt | 8 +++++ .../src/MatchingRefApiCompatBaseline.txt | 18 ++++++++++ .../src/MatchingRefApiCompatBaseline.txt | 8 +++++ .../src/MatchingRefApiCompatBaseline.txt | 8 +++++ .../src/MatchingRefApiCompatBaseline.txt | 33 ++++++++++++++++++ ...hingRefApiCompatBaseline.uap10.0.16299.txt | 34 +++++++++++++++++++ .../src/MatchingRefApiCompatBaseline.txt | 7 ++++ .../src/MatchingRefApiCompatBaseline.txt | 4 +++ .../src/MatchingRefApiCompatBaseline.txt | 7 ++++ .../src/MatchingRefApiCompatBaseline.txt | 8 +++++ .../src/MatchingRefApiCompatBaseline.txt | 11 ++++++ .../src/MatchingRefApiCompatBaseline.txt | 7 ++++ .../src/MatchingRefApiCompatBaseline.txt | 17 ++++++++++ .../src/MatchingRefApiCompatBaseline.txt | 11 ++++++ .../src/MatchingRefApiCompatBaseline.txt | 6 ++++ .../src/MatchingRefApiCompatBaseline.txt | 5 +++ .../src/MatchingRefApiCompatBaseline.txt | 28 +++++++++++++++ .../src/MatchingRefApiCompatBaseline.txt | 5 +++ .../src/MatchingRefApiCompatBaseline.txt | 5 +++ .../src/MatchingRefApiCompatBaseline.txt | 3 ++ .../src/MatchingRefApiCompatBaseline.txt | 3 ++ 33 files changed, 290 insertions(+), 16 deletions(-) create mode 100644 src/System.AppContext/src/MatchingRefApiCompatBaseline.txt create mode 100644 src/System.Collections/src/MatchingRefApiCompatBaseline.txt create mode 100644 src/System.Diagnostics.Debug/src/MatchingRefApiCompatBaseline.txt delete mode 100644 src/System.Diagnostics.Tracing/src/ApiCompatBaseline.netfx.txt create mode 100644 src/System.Diagnostics.Tracing/src/MatchingRefApiCompatBaseline.txt create mode 100644 src/System.Diagnostics.Tracing/src/MatchingRefApiCompatBaseline.uap.txt create mode 100644 src/System.Linq.Expressions/src/MatchingRefApiCompatBaseline.txt create mode 100644 src/System.Numerics.Vectors/src/MatchingRefApiCompatBaseline.txt create mode 100644 src/System.Reflection.Emit.ILGeneration/src/MatchingRefApiCompatBaseline.txt create mode 100644 src/System.Reflection.Emit/src/MatchingRefApiCompatBaseline.txt create mode 100644 src/System.Reflection.Emit/src/MatchingRefApiCompatBaseline.uap10.0.16299.txt create mode 100644 src/System.Reflection/src/MatchingRefApiCompatBaseline.txt create mode 100644 src/System.Resources.ResourceManager/src/MatchingRefApiCompatBaseline.txt create mode 100644 src/System.Runtime.Extensions/src/MatchingRefApiCompatBaseline.txt create mode 100644 src/System.Runtime.InteropServices.WindowsRuntime/src/MatchingRefApiCompatBaseline.txt create mode 100644 src/System.Runtime.InteropServices/src/MatchingRefApiCompatBaseline.txt create mode 100644 src/System.Runtime.Intrinsics.Experimental/src/MatchingRefApiCompatBaseline.txt create mode 100644 src/System.Runtime.Intrinsics/src/MatchingRefApiCompatBaseline.txt create mode 100644 src/System.Runtime.Loader/src/MatchingRefApiCompatBaseline.txt create mode 100644 src/System.Runtime.WindowsRuntime/src/MatchingRefApiCompatBaseline.txt create mode 100644 src/System.Runtime/src/MatchingRefApiCompatBaseline.txt create mode 100644 src/System.Threading.Tasks/src/MatchingRefApiCompatBaseline.txt create mode 100644 src/System.Threading.ThreadPool/src/MatchingRefApiCompatBaseline.txt create mode 100644 src/System.Threading/src/MatchingRefApiCompatBaseline.txt create mode 100644 src/System.Utf8String.Experimental/src/MatchingRefApiCompatBaseline.txt diff --git a/Directory.Build.props b/Directory.Build.props index 986ca8080e66..20f6a94facb9 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -18,7 +18,7 @@ true $(MSBuildThisFileDirectory)artifacts\toolset\Common\ - true + $([System.Text.RegularExpressions.Regex]::IsMatch($(MSBuildProjectDirectory), 'src%24')) @@ -167,7 +167,8 @@ Library Open - true + $(IsSourceProject) + $(IsSourceProject) $(RepositoryEngineeringDir)DefaultGenApiDocIds.txt true diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 7e3774e7cb0c..a2cd2fb0468b 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -46,9 +46,9 @@ https://github.com/dotnet/arcade a7a250e9c13147134543c35fef2fb81f19592edf - + https://github.com/dotnet/arcade - 1b8589bbf53b9a5e819460798eff59830f39a3be + c31fac9f6899094226cb5cd77c85b8f60ecafa3d https://github.com/dotnet/arcade diff --git a/eng/Versions.props b/eng/Versions.props index 8ace06ec12a8..7048c7f59e43 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -23,7 +23,7 @@ - 1.0.0-beta.19229.8 + 1.0.0-beta.19256.12 1.0.0-beta.19254.1 1.0.0-beta.19254.1 1.0.0-beta.19254.1 diff --git a/eng/references.targets b/eng/references.targets index de6eccf63382..f559f1f8adeb 100644 --- a/eng/references.targets +++ b/eng/references.targets @@ -1,8 +1,8 @@ - $(RefPath) - $(ContractOutputPath) - $(AssemblySearchPaths);$(ContractOutputPath);{RawFileName} + $(RefPath) + $(RefPath) + $(AssemblySearchPaths);$(RefPath);{RawFileName} <_FindDependencies>false + false @@ -17,7 +20,13 @@ - - + + + + False + \ No newline at end of file diff --git a/src/CoreFx.Private.TestUtilities/ref/CoreFx.Private.TestUtilities.cs b/src/CoreFx.Private.TestUtilities/ref/CoreFx.Private.TestUtilities.cs index ff5dc9cf1e06..cf5b3ec4030d 100644 --- a/src/CoreFx.Private.TestUtilities/ref/CoreFx.Private.TestUtilities.cs +++ b/src/CoreFx.Private.TestUtilities/ref/CoreFx.Private.TestUtilities.cs @@ -27,6 +27,7 @@ public static void ThrowsAny(System.A public static void ThrowsAny(System.Action action) where TFirstExceptionType : System.Exception where TSecondExceptionType : System.Exception where TThirdExceptionType : System.Exception { } public static System.Threading.Tasks.Task ThrowsAsync(string paramName, System.Func testCode) where T : System.ArgumentException { throw null; } public static void ThrowsIf(bool condition, System.Action action) where T : System.Exception { } + public static T Throws(System.Action action) where T : System.Exception { throw null; } public static void Throws(System.Action action, string message) where T : System.Exception { } public static T Throws(string paramName, System.Action action) where T : System.ArgumentException { throw null; } public static T Throws(string paramName, System.Func testCode) where T : System.ArgumentException { throw null; } @@ -42,13 +43,13 @@ public static partial class PlatformDetection public static bool ClientWebSocketPartialMessagesSupported { get { throw null; } } public static bool HasWindowsShell { get { throw null; } } public static System.Version ICUVersion { get { throw null; } } + public static bool Is32BitProcess { get { throw null; } } public static bool IsAlpine { get { throw null; } } public static bool IsArgIteratorNotSupported { get { throw null; } } public static bool IsArgIteratorSupported { get { throw null; } } public static bool IsArm64Process { get { throw null; } } public static bool IsArmOrArm64Process { get { throw null; } } public static bool IsArmProcess { get { throw null; } } - public static bool Is32BitProcess { get { throw null; } } public static bool IsCentos6 { get { throw null; } } public static bool IsDebian { get { throw null; } } public static bool IsDebian8 { get { throw null; } } @@ -156,6 +157,7 @@ namespace System.IO public abstract partial class FileCleanupTestBase : System.IDisposable { protected FileCleanupTestBase() { } + protected static bool IsProcessElevated { get { throw null; } } protected string TestDirectory { get { throw null; } } public void Dispose() { } protected virtual void Dispose(bool disposing) { } diff --git a/src/CoreFx.Private.TestUtilities/src/CoreFx.Private.TestUtilities.csproj b/src/CoreFx.Private.TestUtilities/src/CoreFx.Private.TestUtilities.csproj index cda53cdc7c11..e63703f47645 100644 --- a/src/CoreFx.Private.TestUtilities/src/CoreFx.Private.TestUtilities.csproj +++ b/src/CoreFx.Private.TestUtilities/src/CoreFx.Private.TestUtilities.csproj @@ -8,6 +8,7 @@ true $(NoWarn);CS1573 false + false $(NoWarn);CS3021 Test Utilities are not supported on this platform netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netcoreapp2.0-Unix-Debug;netcoreapp2.0-Unix-Release;netcoreapp2.0-Windows_NT-Debug;netcoreapp2.0-Windows_NT-Release;netfx-Windows_NT-Debug;netfx-Windows_NT-Release;netstandard-Debug;netstandard-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release;uapaot-Windows_NT-Debug;uapaot-Windows_NT-Release diff --git a/src/System.AppContext/src/MatchingRefApiCompatBaseline.txt b/src/System.AppContext/src/MatchingRefApiCompatBaseline.txt new file mode 100644 index 000000000000..dd953933303e --- /dev/null +++ b/src/System.AppContext/src/MatchingRefApiCompatBaseline.txt @@ -0,0 +1,9 @@ +Compat issues with assembly System.AppContext: +MembersMustExist : Member 'System.AppContext.add_FirstChanceException(System.EventHandler)' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.AppContext.add_ProcessExit(System.EventHandler)' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.AppContext.add_UnhandledException(System.UnhandledExceptionEventHandler)' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.AppContext.remove_FirstChanceException(System.EventHandler)' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.AppContext.remove_ProcessExit(System.EventHandler)' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.AppContext.remove_UnhandledException(System.UnhandledExceptionEventHandler)' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.AppContext.SetData(System.String, System.Object)' does not exist in the reference but it does exist in the implementation. +Total Issues: 7 diff --git a/src/System.Collections/src/MatchingRefApiCompatBaseline.txt b/src/System.Collections/src/MatchingRefApiCompatBaseline.txt new file mode 100644 index 000000000000..a8dcfef40cbf --- /dev/null +++ b/src/System.Collections/src/MatchingRefApiCompatBaseline.txt @@ -0,0 +1,8 @@ +Compat issues with assembly System.Collections: +CannotRemoveAttribute : Attribute 'System.Runtime.CompilerServices.TypeDependencyAttribute' exists on 'System.Collections.Generic.Comparer' in the implementation but not the reference. +CannotRemoveAttribute : Attribute 'System.Runtime.CompilerServices.TypeDependencyAttribute' exists on 'System.Collections.Generic.EqualityComparer' in the implementation but not the reference. +TypesMustExist : Type 'System.Collections.Generic.SortedDictionary.KeyValuePairComparer' does not exist in the reference but it does exist in the implementation. +TypesMustExist : Type 'System.Collections.Generic.SortedList.KeyList' does not exist in the reference but it does exist in the implementation. +TypesMustExist : Type 'System.Collections.Generic.SortedList.ValueList' does not exist in the reference but it does exist in the implementation. +TypesMustExist : Type 'System.Collections.Generic.TreeSet' does not exist in the reference but it does exist in the implementation. +Total Issues: 6 diff --git a/src/System.Diagnostics.Debug/src/MatchingRefApiCompatBaseline.txt b/src/System.Diagnostics.Debug/src/MatchingRefApiCompatBaseline.txt new file mode 100644 index 000000000000..3e9e37ad238c --- /dev/null +++ b/src/System.Diagnostics.Debug/src/MatchingRefApiCompatBaseline.txt @@ -0,0 +1,3 @@ +Compat issues with assembly System.Diagnostics.Debug: +MembersMustExist : Member 'System.Diagnostics.Debug.SetProvider(System.Diagnostics.DebugProvider)' does not exist in the reference but it does exist in the implementation. +Total Issues: 1 diff --git a/src/System.Diagnostics.Tracing/src/ApiCompatBaseline.netfx.txt b/src/System.Diagnostics.Tracing/src/ApiCompatBaseline.netfx.txt deleted file mode 100644 index 4b84fdcc1ebd..000000000000 --- a/src/System.Diagnostics.Tracing/src/ApiCompatBaseline.netfx.txt +++ /dev/null @@ -1,4 +0,0 @@ -Compat issues with assembly System.Diagnostics.Tracing: -MembersMustExist : Member 'System.Diagnostics.Tracing.EventSource.add_EventCommandExecuted(System.EventHandler)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.Diagnostics.Tracing.EventSource.remove_EventCommandExecuted(System.EventHandler)' does not exist in the implementation but it does exist in the contract. -Total Issues: 2 diff --git a/src/System.Diagnostics.Tracing/src/MatchingRefApiCompatBaseline.txt b/src/System.Diagnostics.Tracing/src/MatchingRefApiCompatBaseline.txt new file mode 100644 index 000000000000..89761b80f299 --- /dev/null +++ b/src/System.Diagnostics.Tracing/src/MatchingRefApiCompatBaseline.txt @@ -0,0 +1,9 @@ +Compat issues with assembly System.Diagnostics.Tracing: +CannotSealType : Type 'System.Diagnostics.Tracing.DiagnosticCounter' is effectively (has a private constructor) sealed in the reference but not sealed in the implementation. +MembersMustExist : Member 'System.Diagnostics.Tracing.DiagnosticCounter..ctor(System.String, System.Diagnostics.Tracing.EventSource)' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Diagnostics.Tracing.DiagnosticCounter.WritePayload(System.Single, System.Int32)' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Diagnostics.Tracing.EventCounter.Flush()' does not exist in the reference but it does exist in the implementation. +CannotMakeTypeAbstract : Type 'System.Diagnostics.Tracing.EventListener' is abstract in the reference but is not abstract in the implementation. +CannotMakeMoreVisible : Visibility of member 'System.Diagnostics.Tracing.EventListener..ctor()' is 'Family' in the reference but 'Public' in the implementation. +CannotMakeMoreVisible : Visibility of member 'System.Diagnostics.Tracing.EventListener.EventSourceIndex(System.Diagnostics.Tracing.EventSource)' is 'Family' in the reference but 'Public' in the implementation. +Total Issues: 7 diff --git a/src/System.Diagnostics.Tracing/src/MatchingRefApiCompatBaseline.uap.txt b/src/System.Diagnostics.Tracing/src/MatchingRefApiCompatBaseline.uap.txt new file mode 100644 index 000000000000..412f738f161c --- /dev/null +++ b/src/System.Diagnostics.Tracing/src/MatchingRefApiCompatBaseline.uap.txt @@ -0,0 +1,8 @@ +Compat issues with assembly System.Diagnostics.Tracing: +CannotRemoveBaseTypeOrInterface : Type 'System.Diagnostics.Tracing.EventCounter' does not inherit from base type 'System.Diagnostics.Tracing.DiagnosticCounter' in the reference but it does in the implementation. +MembersMustExist : Member 'System.Diagnostics.Tracing.EventCounter.Flush()' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Diagnostics.Tracing.EventCounter.WriteMetric(System.Double)' does not exist in the reference but it does exist in the implementation. +CannotMakeTypeAbstract : Type 'System.Diagnostics.Tracing.EventListener' is abstract in the reference but is not abstract in the implementation. +CannotMakeMoreVisible : Visibility of member 'System.Diagnostics.Tracing.EventListener..ctor()' is 'Family' in the reference but 'Public' in the implementation. +CannotMakeMoreVisible : Visibility of member 'System.Diagnostics.Tracing.EventListener.EventSourceIndex(System.Diagnostics.Tracing.EventSource)' is 'Family' in the reference but 'Public' in the implementation. +Total Issues: 6 diff --git a/src/System.Linq.Expressions/src/MatchingRefApiCompatBaseline.txt b/src/System.Linq.Expressions/src/MatchingRefApiCompatBaseline.txt new file mode 100644 index 000000000000..ec58fb1024f0 --- /dev/null +++ b/src/System.Linq.Expressions/src/MatchingRefApiCompatBaseline.txt @@ -0,0 +1,18 @@ +Compat issues with assembly System.Linq.Expressions: +CannotMakeTypeAbstract : Type 'System.Linq.Expressions.DynamicExpressionVisitor' is abstract in the reference but is not abstract in the implementation. +CannotMakeMoreVisible : Visibility of member 'System.Linq.Expressions.DynamicExpressionVisitor..ctor()' is 'Family' in the reference but 'Public' in the implementation. +MembersMustExist : Member 'System.Linq.Expressions.ElementInit.ArgumentCount.get()' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Linq.Expressions.ElementInit.GetArgument(System.Int32)' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Linq.Expressions.IndexExpression.ArgumentCount.get()' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Linq.Expressions.IndexExpression.GetArgument(System.Int32)' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Linq.Expressions.InvocationExpression.ArgumentCount.get()' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Linq.Expressions.InvocationExpression.GetArgument(System.Int32)' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Linq.Expressions.MethodCallExpression.ArgumentCount.get()' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Linq.Expressions.MethodCallExpression.GetArgument(System.Int32)' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Linq.Expressions.NewExpression.ArgumentCount.get()' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Linq.Expressions.NewExpression.GetArgument(System.Int32)' does not exist in the reference but it does exist in the implementation. +TypesMustExist : Type 'System.Linq.Expressions.Interpreter.LightLambda' does not exist in the reference but it does exist in the implementation. +TypesMustExist : Type 'System.Runtime.CompilerServices.CallSiteOps' does not exist in the reference but it does exist in the implementation. +TypesMustExist : Type 'System.Runtime.CompilerServices.Closure' does not exist in the reference but it does exist in the implementation. +TypesMustExist : Type 'System.Runtime.CompilerServices.RuntimeOps' does not exist in the reference but it does exist in the implementation. +Total Issues: 16 diff --git a/src/System.Numerics.Vectors/src/MatchingRefApiCompatBaseline.txt b/src/System.Numerics.Vectors/src/MatchingRefApiCompatBaseline.txt new file mode 100644 index 000000000000..bcd55f2de339 --- /dev/null +++ b/src/System.Numerics.Vectors/src/MatchingRefApiCompatBaseline.txt @@ -0,0 +1,8 @@ +Compat issues with assembly System.Numerics.Vectors: +MembersMustExist : Member 'System.Numerics.Vector..ctor(System.ReadOnlySpan)' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Numerics.Vector..ctor(System.ReadOnlySpan)' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Numerics.Vector.CopyTo(System.Span)' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Numerics.Vector.CopyTo(System.Span)' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Numerics.Vector.TryCopyTo(System.Span)' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Numerics.Vector.TryCopyTo(System.Span)' does not exist in the reference but it does exist in the implementation. +Total Issues: 6 diff --git a/src/System.Reflection.Emit.ILGeneration/src/MatchingRefApiCompatBaseline.txt b/src/System.Reflection.Emit.ILGeneration/src/MatchingRefApiCompatBaseline.txt new file mode 100644 index 000000000000..ebd25c311bfa --- /dev/null +++ b/src/System.Reflection.Emit.ILGeneration/src/MatchingRefApiCompatBaseline.txt @@ -0,0 +1,8 @@ +Compat issues with assembly System.Reflection.Emit.ILGeneration: +MembersMustExist : Member 'System.Reflection.Emit.ILGenerator.MarkSequencePoint(System.Diagnostics.SymbolStore.ISymbolDocumentWriter, System.Int32, System.Int32, System.Int32, System.Int32)' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Reflection.Emit.LocalBuilder.SetLocalSymInfo(System.String)' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Reflection.Emit.LocalBuilder.SetLocalSymInfo(System.String, System.Int32, System.Int32)' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Reflection.Emit.ParameterBuilder.GetToken()' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Reflection.Emit.SignatureHelper.GetMethodSigHelper(System.Reflection.Module, System.Runtime.InteropServices.CallingConvention, System.Type)' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Reflection.Emit.SignatureHelper.GetMethodSigHelper(System.Runtime.InteropServices.CallingConvention, System.Type)' does not exist in the reference but it does exist in the implementation. +Total Issues: 6 diff --git a/src/System.Reflection.Emit/src/MatchingRefApiCompatBaseline.txt b/src/System.Reflection.Emit/src/MatchingRefApiCompatBaseline.txt new file mode 100644 index 000000000000..7d4ce4318cd5 --- /dev/null +++ b/src/System.Reflection.Emit/src/MatchingRefApiCompatBaseline.txt @@ -0,0 +1,33 @@ +Compat issues with assembly System.Reflection.Emit: +MembersMustExist : Member 'System.Reflection.Emit.AssemblyBuilder.DefineDynamicModule(System.String, System.Boolean)' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Reflection.Emit.ConstructorBuilder.GetModule()' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Reflection.Emit.ConstructorBuilder.GetToken()' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Reflection.Emit.ConstructorBuilder.Signature.get()' does not exist in the reference but it does exist in the implementation. +CannotRemoveBaseTypeOrInterface : Type 'System.Reflection.Emit.EnumBuilder' does not inherit from base type 'System.Reflection.TypeInfo' in the reference but it does in the implementation. +MembersMustExist : Member 'System.Reflection.Emit.EnumBuilder.CreateType()' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Reflection.Emit.EnumBuilder.IsAssignableFrom(System.Reflection.TypeInfo)' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Reflection.Emit.EnumBuilder.TypeToken.get()' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Reflection.Emit.EventBuilder.GetEventToken()' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Reflection.Emit.FieldBuilder.GetToken()' does not exist in the reference but it does exist in the implementation. +CannotRemoveBaseTypeOrInterface : Type 'System.Reflection.Emit.GenericTypeParameterBuilder' does not inherit from base type 'System.Reflection.TypeInfo' in the reference but it does in the implementation. +MembersMustExist : Member 'System.Reflection.Emit.GenericTypeParameterBuilder.IsAssignableFrom(System.Reflection.TypeInfo)' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Reflection.Emit.MethodBuilder.GetModule()' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Reflection.Emit.MethodBuilder.GetToken()' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Reflection.Emit.MethodBuilder.Signature.get()' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Reflection.Emit.ModuleBuilder.DefineDocument(System.String, System.Guid, System.Guid, System.Guid)' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Reflection.Emit.ModuleBuilder.GetArrayMethodToken(System.Type, System.String, System.Reflection.CallingConventions, System.Type, System.Type[])' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Reflection.Emit.ModuleBuilder.GetConstructorToken(System.Reflection.ConstructorInfo)' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Reflection.Emit.ModuleBuilder.GetFieldToken(System.Reflection.FieldInfo)' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Reflection.Emit.ModuleBuilder.GetMethodToken(System.Reflection.MethodInfo)' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Reflection.Emit.ModuleBuilder.GetModuleHandleImpl()' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Reflection.Emit.ModuleBuilder.GetSignatureToken(System.Byte[], System.Int32)' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Reflection.Emit.ModuleBuilder.GetSignatureToken(System.Reflection.Emit.SignatureHelper)' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Reflection.Emit.ModuleBuilder.GetStringConstant(System.String)' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Reflection.Emit.ModuleBuilder.GetTypeToken(System.String)' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Reflection.Emit.ModuleBuilder.GetTypeToken(System.Type)' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Reflection.Emit.ModuleBuilder.IsTransient()' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Reflection.Emit.PropertyBuilder.PropertyToken.get()' does not exist in the reference but it does exist in the implementation. +CannotRemoveBaseTypeOrInterface : Type 'System.Reflection.Emit.TypeBuilder' does not inherit from base type 'System.Reflection.TypeInfo' in the reference but it does in the implementation. +MembersMustExist : Member 'System.Reflection.Emit.TypeBuilder.IsAssignableFrom(System.Reflection.TypeInfo)' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Reflection.Emit.TypeBuilder.TypeToken.get()' does not exist in the reference but it does exist in the implementation. +Total Issues: 31 diff --git a/src/System.Reflection.Emit/src/MatchingRefApiCompatBaseline.uap10.0.16299.txt b/src/System.Reflection.Emit/src/MatchingRefApiCompatBaseline.uap10.0.16299.txt new file mode 100644 index 000000000000..ddc825d0d3d5 --- /dev/null +++ b/src/System.Reflection.Emit/src/MatchingRefApiCompatBaseline.uap10.0.16299.txt @@ -0,0 +1,34 @@ +Compat issues with assembly System.Reflection.Emit: +MembersMustExist : Member 'System.Reflection.Emit.AssemblyBuilder.DefineDynamicModule(System.String, System.Boolean)' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Reflection.Emit.ConstructorBuilder.GetModule()' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Reflection.Emit.ConstructorBuilder.GetToken()' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Reflection.Emit.ConstructorBuilder.Signature.get()' does not exist in the reference but it does exist in the implementation. +CannotRemoveBaseTypeOrInterface : Type 'System.Reflection.Emit.EnumBuilder' does not inherit from base type 'System.Reflection.TypeInfo' in the reference but it does in the implementation. +MembersMustExist : Member 'System.Reflection.Emit.EnumBuilder.CreateType()' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Reflection.Emit.EnumBuilder.IsAssignableFrom(System.Reflection.TypeInfo)' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Reflection.Emit.EnumBuilder.TypeToken.get()' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Reflection.Emit.EventBuilder.GetEventToken()' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Reflection.Emit.FieldBuilder.GetToken()' does not exist in the reference but it does exist in the implementation. +CannotRemoveBaseTypeOrInterface : Type 'System.Reflection.Emit.GenericTypeParameterBuilder' does not inherit from base type 'System.Reflection.TypeInfo' in the reference but it does in the implementation. +MembersMustExist : Member 'System.Reflection.Emit.GenericTypeParameterBuilder.IsAssignableFrom(System.Reflection.TypeInfo)' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Reflection.Emit.MethodBuilder.GetModule()' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Reflection.Emit.MethodBuilder.GetToken()' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Reflection.Emit.MethodBuilder.Signature.get()' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Reflection.Emit.ModuleBuilder.DefineDocument(System.String, System.Guid, System.Guid, System.Guid)' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Reflection.Emit.ModuleBuilder.GetArrayMethodToken(System.Type, System.String, System.Reflection.CallingConventions, System.Type, System.Type[])' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Reflection.Emit.ModuleBuilder.GetConstructorToken(System.Reflection.ConstructorInfo)' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Reflection.Emit.ModuleBuilder.GetFieldToken(System.Reflection.FieldInfo)' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Reflection.Emit.ModuleBuilder.GetMethodToken(System.Reflection.MethodInfo)' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Reflection.Emit.ModuleBuilder.GetModuleHandleImpl()' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Reflection.Emit.ModuleBuilder.GetSignatureToken(System.Byte[], System.Int32)' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Reflection.Emit.ModuleBuilder.GetSignatureToken(System.Reflection.Emit.SignatureHelper)' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Reflection.Emit.ModuleBuilder.GetStringConstant(System.String)' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Reflection.Emit.ModuleBuilder.GetTypeToken(System.String)' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Reflection.Emit.ModuleBuilder.GetTypeToken(System.Type)' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Reflection.Emit.ModuleBuilder.IsTransient()' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Reflection.Emit.PropertyBuilder.PropertyToken.get()' does not exist in the reference but it does exist in the implementation. +CannotRemoveBaseTypeOrInterface : Type 'System.Reflection.Emit.TypeBuilder' does not inherit from base type 'System.Reflection.TypeInfo' in the reference but it does in the implementation. +MembersMustExist : Member 'System.Reflection.Emit.TypeBuilder.CreateType()' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Reflection.Emit.TypeBuilder.IsAssignableFrom(System.Reflection.TypeInfo)' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Reflection.Emit.TypeBuilder.TypeToken.get()' does not exist in the reference but it does exist in the implementation. +Total Issues: 32 diff --git a/src/System.Reflection/src/MatchingRefApiCompatBaseline.txt b/src/System.Reflection/src/MatchingRefApiCompatBaseline.txt new file mode 100644 index 000000000000..30d13ded3202 --- /dev/null +++ b/src/System.Reflection/src/MatchingRefApiCompatBaseline.txt @@ -0,0 +1,7 @@ +Compat issues with assembly System.Reflection: +CannotRemoveAttribute : Attribute 'System.Runtime.CompilerServices.IsReadOnlyAttribute' exists on 'System.Reflection.CustomAttributeNamedArgument' in the implementation but not the reference. +TypeCannotChangeClassification : Type 'System.Reflection.CustomAttributeNamedArgument' is marked as readonly in the implementation so it must also be marked readonly in the reference. +CannotRemoveAttribute : Attribute 'System.Runtime.CompilerServices.IsReadOnlyAttribute' exists on 'System.Reflection.CustomAttributeTypedArgument' in the implementation but not the reference. +TypeCannotChangeClassification : Type 'System.Reflection.CustomAttributeTypedArgument' is marked as readonly in the implementation so it must also be marked readonly in the reference. +MembersMustExist : Member 'System.Reflection.Module.GetModuleHandleImpl()' does not exist in the reference but it does exist in the implementation. +Total Issues: 5 diff --git a/src/System.Resources.ResourceManager/src/MatchingRefApiCompatBaseline.txt b/src/System.Resources.ResourceManager/src/MatchingRefApiCompatBaseline.txt new file mode 100644 index 000000000000..fd033fc8f75d --- /dev/null +++ b/src/System.Resources.ResourceManager/src/MatchingRefApiCompatBaseline.txt @@ -0,0 +1,4 @@ +Compat issues with assembly System.Resources.ResourceManager: +MembersMustExist : Member 'System.String System.Resources.ResourceManager.BaseNameField' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Resources.IResourceReader System.Resources.ResourceSet.Reader' does not exist in the reference but it does exist in the implementation. +Total Issues: 2 diff --git a/src/System.Runtime.Extensions/src/MatchingRefApiCompatBaseline.txt b/src/System.Runtime.Extensions/src/MatchingRefApiCompatBaseline.txt new file mode 100644 index 000000000000..27384a19c04b --- /dev/null +++ b/src/System.Runtime.Extensions/src/MatchingRefApiCompatBaseline.txt @@ -0,0 +1,7 @@ +Compat issues with assembly System.Runtime.Extensions: +MembersMustExist : Member 'System.AppDomain.GetThreadPrincipal()' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Environment.FailFast(System.String, System.Exception, System.String)' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.IO.Path.Join(System.ReadOnlySpan, System.ReadOnlySpan, System.ReadOnlySpan, System.ReadOnlySpan)' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.IO.Path.Join(System.String, System.String, System.String, System.String)' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.IO.Path.Join(System.String[])' does not exist in the reference but it does exist in the implementation. +Total Issues: 5 diff --git a/src/System.Runtime.InteropServices.WindowsRuntime/src/MatchingRefApiCompatBaseline.txt b/src/System.Runtime.InteropServices.WindowsRuntime/src/MatchingRefApiCompatBaseline.txt new file mode 100644 index 000000000000..53ef929ef0fe --- /dev/null +++ b/src/System.Runtime.InteropServices.WindowsRuntime/src/MatchingRefApiCompatBaseline.txt @@ -0,0 +1,8 @@ +Compat issues with assembly System.Runtime.InteropServices.WindowsRuntime: +CannotRemoveBaseTypeOrInterface : Type 'System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken' does not implement interface 'System.IEquatable' in the reference but it does in the implementation. +MembersMustExist : Member 'System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken..ctor(System.UInt64)' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken.Equals(System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken)' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken.Value.get()' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Runtime.InteropServices.WindowsRuntime.EventRegistrationTokenTable.RemoveEventHandler(System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken, T)' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Runtime.InteropServices.WindowsRuntime.WindowsRuntimeMarshal.GetUniqueObjectForIUnknownWithoutUnboxing(System.IntPtr)' does not exist in the reference but it does exist in the implementation. +Total Issues: 6 diff --git a/src/System.Runtime.InteropServices/src/MatchingRefApiCompatBaseline.txt b/src/System.Runtime.InteropServices/src/MatchingRefApiCompatBaseline.txt new file mode 100644 index 000000000000..ef9f56a35e87 --- /dev/null +++ b/src/System.Runtime.InteropServices/src/MatchingRefApiCompatBaseline.txt @@ -0,0 +1,11 @@ +Compat issues with assembly System.Runtime.InteropServices: +TypesMustExist : Type 'System.Runtime.InteropServices.AssemblyRegistrationFlags' does not exist in the reference but it does exist in the implementation. +TypesMustExist : Type 'System.Runtime.InteropServices.ExporterEventKind' does not exist in the reference but it does exist in the implementation. +TypesMustExist : Type 'System.Runtime.InteropServices.IDispatchImplAttribute' does not exist in the reference but it does exist in the implementation. +TypesMustExist : Type 'System.Runtime.InteropServices.IDispatchImplType' does not exist in the reference but it does exist in the implementation. +TypesMustExist : Type 'System.Runtime.InteropServices.RegistrationClassContext' does not exist in the reference but it does exist in the implementation. +TypesMustExist : Type 'System.Runtime.InteropServices.RegistrationConnectionType' does not exist in the reference but it does exist in the implementation. +TypesMustExist : Type 'System.Runtime.InteropServices.SetWin32ContextInIDispatchAttribute' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Runtime.InteropServices.UnmanagedFunctionPointerAttribute..ctor()' does not exist in the reference but it does exist in the implementation. +CannotRemoveAttribute : Attribute 'System.CLSCompliantAttribute' exists on 'System.Runtime.InteropServices.ComTypes.IDataObject' in the implementation but not the reference. +Total Issues: 9 diff --git a/src/System.Runtime.Intrinsics.Experimental/src/MatchingRefApiCompatBaseline.txt b/src/System.Runtime.Intrinsics.Experimental/src/MatchingRefApiCompatBaseline.txt new file mode 100644 index 000000000000..5c4643f958f0 --- /dev/null +++ b/src/System.Runtime.Intrinsics.Experimental/src/MatchingRefApiCompatBaseline.txt @@ -0,0 +1,7 @@ +Compat issues with assembly System.Runtime.Intrinsics.Experimental: +CannotRemoveAttribute : Attribute 'System.CLSCompliantAttribute' exists on 'System.Runtime.Intrinsics.Arm.Arm64.Aes' in the implementation but not the reference. +CannotRemoveAttribute : Attribute 'System.CLSCompliantAttribute' exists on 'System.Runtime.Intrinsics.Arm.Arm64.Base' in the implementation but not the reference. +CannotRemoveAttribute : Attribute 'System.CLSCompliantAttribute' exists on 'System.Runtime.Intrinsics.Arm.Arm64.Sha1' in the implementation but not the reference. +CannotRemoveAttribute : Attribute 'System.CLSCompliantAttribute' exists on 'System.Runtime.Intrinsics.Arm.Arm64.Sha256' in the implementation but not the reference. +CannotRemoveAttribute : Attribute 'System.CLSCompliantAttribute' exists on 'System.Runtime.Intrinsics.Arm.Arm64.Simd' in the implementation but not the reference. +Total Issues: 5 diff --git a/src/System.Runtime.Intrinsics/src/MatchingRefApiCompatBaseline.txt b/src/System.Runtime.Intrinsics/src/MatchingRefApiCompatBaseline.txt new file mode 100644 index 000000000000..1fc4c505b55f --- /dev/null +++ b/src/System.Runtime.Intrinsics/src/MatchingRefApiCompatBaseline.txt @@ -0,0 +1,17 @@ +Compat issues with assembly System.Runtime.Intrinsics: +CannotRemoveAttribute : Attribute 'System.CLSCompliantAttribute' exists on 'System.Runtime.Intrinsics.X86.Aes' in the implementation but not the reference. +CannotRemoveAttribute : Attribute 'System.CLSCompliantAttribute' exists on 'System.Runtime.Intrinsics.X86.Avx' in the implementation but not the reference. +CannotRemoveAttribute : Attribute 'System.CLSCompliantAttribute' exists on 'System.Runtime.Intrinsics.X86.Avx2' in the implementation but not the reference. +CannotRemoveAttribute : Attribute 'System.CLSCompliantAttribute' exists on 'System.Runtime.Intrinsics.X86.Bmi1' in the implementation but not the reference. +CannotRemoveAttribute : Attribute 'System.CLSCompliantAttribute' exists on 'System.Runtime.Intrinsics.X86.Bmi2' in the implementation but not the reference. +CannotRemoveAttribute : Attribute 'System.CLSCompliantAttribute' exists on 'System.Runtime.Intrinsics.X86.Fma' in the implementation but not the reference. +CannotRemoveAttribute : Attribute 'System.CLSCompliantAttribute' exists on 'System.Runtime.Intrinsics.X86.Lzcnt' in the implementation but not the reference. +CannotRemoveAttribute : Attribute 'System.CLSCompliantAttribute' exists on 'System.Runtime.Intrinsics.X86.Pclmulqdq' in the implementation but not the reference. +CannotRemoveAttribute : Attribute 'System.CLSCompliantAttribute' exists on 'System.Runtime.Intrinsics.X86.Popcnt' in the implementation but not the reference. +CannotRemoveAttribute : Attribute 'System.CLSCompliantAttribute' exists on 'System.Runtime.Intrinsics.X86.Sse' in the implementation but not the reference. +CannotRemoveAttribute : Attribute 'System.CLSCompliantAttribute' exists on 'System.Runtime.Intrinsics.X86.Sse2' in the implementation but not the reference. +CannotRemoveAttribute : Attribute 'System.CLSCompliantAttribute' exists on 'System.Runtime.Intrinsics.X86.Sse3' in the implementation but not the reference. +CannotRemoveAttribute : Attribute 'System.CLSCompliantAttribute' exists on 'System.Runtime.Intrinsics.X86.Sse41' in the implementation but not the reference. +CannotRemoveAttribute : Attribute 'System.CLSCompliantAttribute' exists on 'System.Runtime.Intrinsics.X86.Sse42' in the implementation but not the reference. +CannotRemoveAttribute : Attribute 'System.CLSCompliantAttribute' exists on 'System.Runtime.Intrinsics.X86.Ssse3' in the implementation but not the reference. +Total Issues: 15 diff --git a/src/System.Runtime.Loader/src/MatchingRefApiCompatBaseline.txt b/src/System.Runtime.Loader/src/MatchingRefApiCompatBaseline.txt new file mode 100644 index 000000000000..2542d48576d2 --- /dev/null +++ b/src/System.Runtime.Loader/src/MatchingRefApiCompatBaseline.txt @@ -0,0 +1,11 @@ +Compat issues with assembly System.Runtime.Loader: +MembersMustExist : Member 'System.Runtime.Loader.AssemblyLoadContext.add_AssemblyLoad(System.AssemblyLoadEventHandler)' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Runtime.Loader.AssemblyLoadContext.add_AssemblyResolve(System.ResolveEventHandler)' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Runtime.Loader.AssemblyLoadContext.add_ResourceResolve(System.ResolveEventHandler)' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Runtime.Loader.AssemblyLoadContext.add_TypeResolve(System.ResolveEventHandler)' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Runtime.Loader.AssemblyLoadContext.GetLoadedAssemblies()' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Runtime.Loader.AssemblyLoadContext.remove_AssemblyLoad(System.AssemblyLoadEventHandler)' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Runtime.Loader.AssemblyLoadContext.remove_AssemblyResolve(System.ResolveEventHandler)' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Runtime.Loader.AssemblyLoadContext.remove_ResourceResolve(System.ResolveEventHandler)' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Runtime.Loader.AssemblyLoadContext.remove_TypeResolve(System.ResolveEventHandler)' does not exist in the reference but it does exist in the implementation. +Total Issues: 9 diff --git a/src/System.Runtime.Serialization.Formatters/src/MatchingRefApiCompatBaseline.txt b/src/System.Runtime.Serialization.Formatters/src/MatchingRefApiCompatBaseline.txt index cf2349a714ee..6317400ca1cb 100644 --- a/src/System.Runtime.Serialization.Formatters/src/MatchingRefApiCompatBaseline.txt +++ b/src/System.Runtime.Serialization.Formatters/src/MatchingRefApiCompatBaseline.txt @@ -1,3 +1,9 @@ # Exposed publicly only in implementation for serialization compat TypesMustExist : Type 'System.Runtime.Serialization.SerializationEventHandler' does not exist in the reference but it does exist in the implementation. TypesMustExist : Type 'System.Runtime.Serialization.TypeLoadExceptionHolder' does not exist in the reference but it does exist in the implementation. + +MembersMustExist : Member 'System.Runtime.Serialization.SerializationInfo.DeserializationInProgress.get()' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Runtime.Serialization.SerializationInfo.StartDeserialization()' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Runtime.Serialization.SerializationInfo.ThrowIfDeserializationInProgress()' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Runtime.Serialization.SerializationInfo.ThrowIfDeserializationInProgress(System.String, System.Int32)' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Runtime.Serialization.SerializationInfo.UpdateValue(System.String, System.Object, System.Type)' does not exist in the reference but it does exist in the implementation. \ No newline at end of file diff --git a/src/System.Runtime.WindowsRuntime/src/MatchingRefApiCompatBaseline.txt b/src/System.Runtime.WindowsRuntime/src/MatchingRefApiCompatBaseline.txt new file mode 100644 index 000000000000..95830eb9390f --- /dev/null +++ b/src/System.Runtime.WindowsRuntime/src/MatchingRefApiCompatBaseline.txt @@ -0,0 +1,5 @@ +Compat issues with assembly System.Runtime.WindowsRuntime: +CannotRemoveBaseTypeOrInterface : Type 'System.Runtime.InteropServices.WindowsRuntime.WindowsRuntimeBuffer' does not implement interface 'Windows.Storage.Streams.IBuffer' in the reference but it does in the implementation. +TypesMustExist : Type 'System.Threading.DispatcherQueueHandler' does not exist in the reference but it does exist in the implementation. +TypesMustExist : Type 'System.Threading.DispatcherQueuePriority' does not exist in the reference but it does exist in the implementation. +Total Issues: 3 diff --git a/src/System.Runtime/src/MatchingRefApiCompatBaseline.txt b/src/System.Runtime/src/MatchingRefApiCompatBaseline.txt new file mode 100644 index 000000000000..c508ef05699e --- /dev/null +++ b/src/System.Runtime/src/MatchingRefApiCompatBaseline.txt @@ -0,0 +1,28 @@ +Compat issues with assembly System.Runtime: +MembersMustExist : Member 'System.AppContext.add_FirstChanceException(System.EventHandler)' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.AppContext.add_ProcessExit(System.EventHandler)' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.AppContext.add_UnhandledException(System.UnhandledExceptionEventHandler)' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.AppContext.remove_FirstChanceException(System.EventHandler)' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.AppContext.remove_ProcessExit(System.EventHandler)' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.AppContext.remove_UnhandledException(System.UnhandledExceptionEventHandler)' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.AppContext.SetData(System.String, System.Object)' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.WeakReference..ctor()' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Collections.ObjectModel.Collection.AddRange(System.Collections.Generic.IEnumerable)' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Collections.ObjectModel.Collection.InsertItemsRange(System.Int32, System.Collections.Generic.IEnumerable)' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Collections.ObjectModel.Collection.InsertRange(System.Int32, System.Collections.Generic.IEnumerable)' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Collections.ObjectModel.Collection.RemoveItemsRange(System.Int32, System.Int32)' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Collections.ObjectModel.Collection.RemoveRange(System.Int32, System.Int32)' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Collections.ObjectModel.Collection.ReplaceItemsRange(System.Int32, System.Int32, System.Collections.Generic.IEnumerable)' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Collections.ObjectModel.Collection.ReplaceRange(System.Int32, System.Int32, System.Collections.Generic.IEnumerable)' does not exist in the reference but it does exist in the implementation. +CannotRemoveAttribute : Attribute 'System.Runtime.CompilerServices.IsReadOnlyAttribute' exists on 'System.Reflection.CustomAttributeNamedArgument' in the implementation but not the reference. +TypeCannotChangeClassification : Type 'System.Reflection.CustomAttributeNamedArgument' is marked as readonly in the implementation so it must also be marked readonly in the reference. +CannotRemoveAttribute : Attribute 'System.Runtime.CompilerServices.IsReadOnlyAttribute' exists on 'System.Reflection.CustomAttributeTypedArgument' in the implementation but not the reference. +TypeCannotChangeClassification : Type 'System.Reflection.CustomAttributeTypedArgument' is marked as readonly in the implementation so it must also be marked readonly in the reference. +MembersMustExist : Member 'System.Reflection.Module.GetModuleHandleImpl()' does not exist in the reference but it does exist in the implementation. +CannotRemoveBaseTypeOrInterface : Type 'System.Runtime.Serialization.DeserializationBlockedException' does not inherit from base type 'System.Runtime.Serialization.SerializationException' in the reference but it does in the implementation. +MembersMustExist : Member 'System.Runtime.Serialization.SerializationInfo.DeserializationInProgress.get()' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Runtime.Serialization.SerializationInfo.StartDeserialization()' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Runtime.Serialization.SerializationInfo.ThrowIfDeserializationInProgress()' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Runtime.Serialization.SerializationInfo.ThrowIfDeserializationInProgress(System.String, System.Int32)' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Runtime.Serialization.SerializationInfo.UpdateValue(System.String, System.Object, System.Type)' does not exist in the reference but it does exist in the implementation. +Total Issues: 26 diff --git a/src/System.Threading.Tasks/src/MatchingRefApiCompatBaseline.txt b/src/System.Threading.Tasks/src/MatchingRefApiCompatBaseline.txt new file mode 100644 index 000000000000..b45d5a789bee --- /dev/null +++ b/src/System.Threading.Tasks/src/MatchingRefApiCompatBaseline.txt @@ -0,0 +1,5 @@ +Compat issues with assembly System.Threading.Tasks: +MembersMustExist : Member 'System.Threading.Tasks.TaskExtensions.ConfigureAwait(System.IAsyncDisposable, System.Boolean)' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Threading.Tasks.TaskExtensions.ConfigureAwait(System.Collections.Generic.IAsyncEnumerable, System.Boolean)' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Threading.Tasks.TaskExtensions.WithCancellation(System.Collections.Generic.IAsyncEnumerable, System.Threading.CancellationToken)' does not exist in the reference but it does exist in the implementation. +Total Issues: 3 diff --git a/src/System.Threading.ThreadPool/src/MatchingRefApiCompatBaseline.txt b/src/System.Threading.ThreadPool/src/MatchingRefApiCompatBaseline.txt new file mode 100644 index 000000000000..90c412aa767d --- /dev/null +++ b/src/System.Threading.ThreadPool/src/MatchingRefApiCompatBaseline.txt @@ -0,0 +1,5 @@ +Compat issues with assembly System.Threading.ThreadPool: +MembersMustExist : Member 'System.Threading.ThreadPool.CompletedWorkItemCount.get()' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Threading.ThreadPool.PendingWorkItemCount.get()' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Threading.ThreadPool.ThreadCount.get()' does not exist in the reference but it does exist in the implementation. +Total Issues: 3 diff --git a/src/System.Threading/src/MatchingRefApiCompatBaseline.txt b/src/System.Threading/src/MatchingRefApiCompatBaseline.txt new file mode 100644 index 000000000000..25ebfb2eb7a6 --- /dev/null +++ b/src/System.Threading/src/MatchingRefApiCompatBaseline.txt @@ -0,0 +1,3 @@ +Compat issues with assembly System.Threading: +MembersMustExist : Member 'System.Threading.Monitor.LockContentionCount.get()' does not exist in the reference but it does exist in the implementation. +Total Issues: 1 diff --git a/src/System.Utf8String.Experimental/src/MatchingRefApiCompatBaseline.txt b/src/System.Utf8String.Experimental/src/MatchingRefApiCompatBaseline.txt new file mode 100644 index 000000000000..41838aab3e45 --- /dev/null +++ b/src/System.Utf8String.Experimental/src/MatchingRefApiCompatBaseline.txt @@ -0,0 +1,3 @@ +Compat issues with assembly System.Utf8String.Experimental: +MembersMustExist : Member 'System.Utf8String.Substring(System.Index)' does not exist in the reference but it does exist in the implementation. +Total Issues: 1 From 2c75f5a09f770f3118e09abc35bdf88c1c7120b0 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Tue, 7 May 2019 21:45:07 -0700 Subject: [PATCH 258/607] Update dependencies from https://github.com/dotnet/corefx build 20190506.13 (#37490) - runtime.native.System.IO.Ports - 4.6.0-preview6.19256.13 - Microsoft.NETCore.Platforms - 3.0.0-preview6.19256.13 --- eng/Version.Details.xml | 8 ++++---- eng/Versions.props | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index a2cd2fb0468b..d173ac3fa4e5 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -26,13 +26,13 @@ https://github.com/dotnet/core-setup 66f7e1a107eceab2767369588e7309747a0d71f7 - + https://github.com/dotnet/corefx - bd278630dd08914ef521e62658afb69845c5b93a + 28a926b5b38eefb18cd77b4cb0b74fdda99cdb26 - + https://github.com/dotnet/corefx - bd278630dd08914ef521e62658afb69845c5b93a + 28a926b5b38eefb18cd77b4cb0b74fdda99cdb26 https://github.com/dotnet/arcade diff --git a/eng/Versions.props b/eng/Versions.props index 7048c7f59e43..60705d488ece 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -43,8 +43,8 @@ 3.0.0-preview6-27705-72 3.0.0-preview6-27705-72 - 3.0.0-preview6.19256.1 - 4.6.0-preview6.19256.1 + 3.0.0-preview6.19256.13 + 4.6.0-preview6.19256.13 2.1.0-prerelease.19230.1 From 92d3f8dd3b3592b2442596ecf200ebd88c7409c3 Mon Sep 17 00:00:00 2001 From: dotnet-maestro-bot Date: Wed, 8 May 2019 05:50:27 -0700 Subject: [PATCH 259/607] Update ProjectNTfs, ProjectNTfsTestILC to beta-27708-01, beta-27708-01, respectively (#37507) --- eng/dependencies.props | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/eng/dependencies.props b/eng/dependencies.props index 92f90f386b92..c18345d5e200 100644 --- a/eng/dependencies.props +++ b/eng/dependencies.props @@ -9,8 +9,8 @@ These ref versions are pulled from https://github.com/dotnet/versions. --> - 9726849820cbf275e71b9b9e99d874a257ed267a - 9726849820cbf275e71b9b9e99d874a257ed267a + 9c86a09c302a6a20a67c9d299b587e8eb025eeba + 9c86a09c302a6a20a67c9d299b587e8eb025eeba 8bd1ec5fac9f0eec34ff6b34b1d878b4359e02dd @@ -22,9 +22,9 @@ - beta-27707-00 - beta-27707-00 - 1.0.0-beta-27707-00 + beta-27708-01 + beta-27708-01 + 1.0.0-beta-27708-01 4.4.0 From ec1b46cd8d2cae3d238bbcc3b204246f432d7ea6 Mon Sep 17 00:00:00 2001 From: Aaron Robinson Date: Mon, 6 May 2019 10:19:49 -0700 Subject: [PATCH 260/607] Port all managed product binaries to use SDK style projects (#24285) Convert managed product binary to use SDK project system. - Uses Arcade for versions strings - Overrides Arcade defined output paths - should change in the future Signed-off-by: dotnet-bot --- src/Common/src/CoreLib/System/Threading/Tasks/TplEventSource.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Common/src/CoreLib/System/Threading/Tasks/TplEventSource.cs b/src/Common/src/CoreLib/System/Threading/Tasks/TplEventSource.cs index 184cc3289002..44e5d0ad11a0 100644 --- a/src/Common/src/CoreLib/System/Threading/Tasks/TplEventSource.cs +++ b/src/Common/src/CoreLib/System/Threading/Tasks/TplEventSource.cs @@ -14,7 +14,7 @@ namespace System.Threading.Tasks Name = "System.Threading.Tasks.TplEventSource", Guid = "2e5dba47-a3d2-4d16-8ee0-6671ffdcd7b5" #if CORECLR - ,LocalizationResources = "FxResources.System.Private.CoreLib.SR" + ,LocalizationResources = "System.Private.CoreLib.Resources.Strings" #endif )] internal sealed class TplEventSource : EventSource From 0c006ec78d2563e57059e78a6766df8d357a9176 Mon Sep 17 00:00:00 2001 From: Anirudh Agnihotry Date: Mon, 6 May 2019 20:31:35 -0700 Subject: [PATCH 261/607] making DiagnosticCounter internal (dotnet/coreclr#24427) Signed-off-by: dotnet-bot --- .../src/CoreLib/System/Diagnostics/Tracing/DiagnosticCounter.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Common/src/CoreLib/System/Diagnostics/Tracing/DiagnosticCounter.cs b/src/Common/src/CoreLib/System/Diagnostics/Tracing/DiagnosticCounter.cs index c82ff3423dc7..29bcdb0fd85e 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/Tracing/DiagnosticCounter.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/Tracing/DiagnosticCounter.cs @@ -31,7 +31,7 @@ public abstract class DiagnosticCounter : IDisposable /// /// The name. /// The event source. - public DiagnosticCounter(string name, EventSource eventSource) + internal DiagnosticCounter(string name, EventSource eventSource) { if (name == null) { From c800e971c8d724ade4b16f3e98df41d0adbac5f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Divino=20C=C3=A9sar?= Date: Wed, 8 May 2019 13:41:18 -0700 Subject: [PATCH 262/607] Update Helix SDK Version (#37523) * Update Version.Details.xml * Update global.json --- eng/Version.Details.xml | 4 ++-- global.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index d173ac3fa4e5..4995ff1acc28 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -42,9 +42,9 @@ https://github.com/dotnet/standard e94d4263f03ced7269275c10a59d1dddb0c76b7c - + https://github.com/dotnet/arcade - a7a250e9c13147134543c35fef2fb81f19592edf + bda52d7619f9420de46f2c39ffc972864bbcab63 https://github.com/dotnet/arcade diff --git a/global.json b/global.json index e6d5bea83e75..bb9bf9f29cdf 100644 --- a/global.json +++ b/global.json @@ -4,7 +4,7 @@ }, "msbuild-sdks": { "Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19229.8", - "Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19257.3", + "Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19257.7", "Microsoft.NET.Sdk.IL": "3.0.0-preview6-27705-72" } } From 184bbc41f7e51b025e7a3c041895af8d83bc6864 Mon Sep 17 00:00:00 2001 From: Tomas Weinfurt Date: Wed, 8 May 2019 14:28:13 -0700 Subject: [PATCH 263/607] handle Http2Stream add/remove better (#37505) * handle sream add/remove better * abort connection only if it is not already disposed * feedback from review --- .../SocketsHttpHandler/Http2Connection.cs | 35 ++++++++++++------- 1 file changed, 23 insertions(+), 12 deletions(-) diff --git a/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http2Connection.cs b/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http2Connection.cs index 18ebd60ac4c4..b85233f76308 100644 --- a/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http2Connection.cs +++ b/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http2Connection.cs @@ -260,7 +260,12 @@ private async Task ProcessIncomingFramesAsync() } catch (Exception e) { - Abort(e); + if (NetEventSource.IsEnabled) Trace($"ProcessIncomingFramesAsync: {e.Message}"); + + if (!_disposed) + { + Abort(e); + } } } @@ -720,7 +725,7 @@ private async Task AcquireWriteLockAsync(CancellationToken cancellationToken) } // If the connection has been aborted, then fail now instead of trying to send more data. - if (IsAborted()) + if (_disposed) { throw new IOException(SR.net_http_request_aborted); } @@ -1120,22 +1125,18 @@ private void WriteFrameHeader(FrameHeader frameHeader) _outgoingBuffer.Commit(FrameHeader.Size); } + /// Abort all streams and cause further processing to fail. + /// Exception causing Abort to be called. private void Abort(Exception abortException) { // The connection has failed, e.g. failed IO or a connection-level frame error. - // Abort all streams and cause further processing to fail. - if (!IsAborted()) + if (_abortException == null) { _abortException = abortException; } AbortStreams(0, abortException); } - private bool IsAborted() - { - return _disposed; - } - /// Gets whether the connection exceeded any of the connection limits. /// The current tick count. Passed in to amortize the cost of calling Environment.TickCount. /// How long a connection can be open to be considered reusable. @@ -1323,7 +1324,7 @@ public void WriteTo(Span buffer) private enum FrameFlags : byte { None = 0, - + // Some frame types define bits differently. Define them all here for simplicity. EndStream = 0b00000001, @@ -1401,8 +1402,15 @@ private Http2Stream AddStream(HttpRequestMessage request) { lock (SyncObject) { - if (_disposed || _nextStream == MaxStreamId) + if (_nextStream == MaxStreamId || _disposed) { + if (_abortException != null) + { + // Aborted because protocol error or IO. + throw new ObjectDisposedException(nameof(Http2Connection)); + } + + // We run out of IDs or we have race condition between receiving GOAWAY and processing requests. // Throw a retryable request exception. This will cause retry logic to kick in // and perform another connection attempt. The user should never see this exception. throw new HttpRequestException(null, null, allowRetry: true); @@ -1427,7 +1435,10 @@ private void RemoveStream(Http2Stream http2Stream) { if (!_httpStreams.Remove(http2Stream.StreamId, out Http2Stream removed)) { - Debug.Fail("_httpStreams.Remove failed"); + // Stream can be removed from background ProcessIncomingFramesAsync() when endOfStream is set + // or when we hit various error conditions in SendAsync() call. + // Skip logic below if stream was already removed. + return; } _concurrentStreams.AdjustCredit(1); From d6c6eea2cb526224512e9f87a2bc0fbfbd912974 Mon Sep 17 00:00:00 2001 From: Maryam Ariyan Date: Wed, 8 May 2019 15:03:12 -0700 Subject: [PATCH 264/607] Update issue-guide.md --- Documentation/project-docs/issue-guide.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/project-docs/issue-guide.md b/Documentation/project-docs/issue-guide.md index fd6e4599f7d8..910974eb2565 100644 --- a/Documentation/project-docs/issue-guide.md +++ b/Documentation/project-docs/issue-guide.md @@ -54,6 +54,8 @@ Areas are tracked by labels area-* (e.g. area-System.Collections). Each area | [System.Configuration](https://github.com/dotnet/corefx/labels/area-System.Configuration) | **[@maryamariyan](https://github.com/maryamariyan)**, [@safern](https://github.com/safern) | | | [System.Console](https://github.com/dotnet/corefx/labels/area-System.Console) | [@wtgodbe](https://github.com/wtgodbe) | | | [System.Data](https://github.com/dotnet/corefx/labels/area-System.Data) | **[@divega](https://github.com/divega)**, [@ajcvickers](https://github.com/ajcvickers), [@afsanehr](https://github.com/afsanehr), [@david-engel](https://github.com/david-engel), [@Gary-Zh ](https://github.com/Gary-Zh) | | +| [System.Data.Odbc](https://github.com/dotnet/corefx/labels/area-System.Data.Odbc) | **[@saurabh](https://github.com/saurabh)** | | +| [System.Data.OleDb](https://github.com/dotnet/corefx/labels/area-System.Data.OleDb) | **[@saurabh](https://github.com/saurabh)** | | | [System.Data.SqlClient](https://github.com/dotnet/corefx/labels/area-System.Data.SqlClient) | **[@afsanehr](https://github.com/afsanehr)**, [@Gary-Zh ](https://github.com/Gary-Zh), [@david-engel](https://github.com/david-engel) | | | [System.Diagnostics](https://github.com/dotnet/corefx/labels/area-System.Diagnostics) | **[@wtgodbe](https://github.com/wtgodbe)**, [@krwq](https://github.com/krwq) |
  • System.Diagnostics.EventLog - [@Anipik](https://github.com/Anipik)
| | [System.Diagnostics.Process](https://github.com/dotnet/corefx/labels/area-System.Diagnostics.Process) | **[@wtgodbe](https://github.com/wtgodbe)**, [@krwq](https://github.com/krwq) | | From 24da9d731bb11b90cdd1f95a0b88965339f0271a Mon Sep 17 00:00:00 2001 From: Matt Galbraith Date: Wed, 8 May 2019 15:55:21 -0700 Subject: [PATCH 265/607] Update CI docker images @wfurt FYI; we may need to tweak permissions still on these images too. --- eng/pipelines/linux.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/pipelines/linux.yml b/eng/pipelines/linux.yml index a1d96b909035..f307d55b5258 100644 --- a/eng/pipelines/linux.yml +++ b/eng/pipelines/linux.yml @@ -110,10 +110,10 @@ jobs: - _outerloop: true - ${{ if eq(parameters.isOfficialBuild, 'false') }}: - - linuxDefaultQueues: Centos.7.Amd64.Open+RedHat.7.Amd64.Open+Debian.8.Amd64.Open+Ubuntu.1604.Amd64.Open+Ubuntu.1804.Amd64.Open+OpenSuse.42.Amd64.Open+\(Fedora.28.Amd64\)ubuntu.1604.amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-28-helix-45b1fa2-20190402012449 + - linuxDefaultQueues: Centos.7.Amd64.Open+RedHat.7.Amd64.Open+Debian.8.Amd64.Open+Ubuntu.1604.Amd64.Open+Ubuntu.1804.Amd64.Open+OpenSuse.42.Amd64.Open+\(Fedora.28.Amd64\)ubuntu.1604.amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-28-helix-98b4f89-20190506161422 - linuxArm64Queues: \(Ubuntu.1604.Arm64\)Ubuntu.1604.Arm64.Docker.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-16.04-helix-arm64v8-b049512-20190321153539 - - alpineQueues: \(Alpine.38.Amd64\)ubuntu.1604.amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.8-helix-45b1fa2-20190327215821 - + - alpineQueues: \(Alpine.38.Amd64\)ubuntu.1604.amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.8-helix-98b4f89-20190506161422 + - ${{ if eq(parameters.isOfficialBuild, 'true') }}: - linuxDefaultQueues: Centos.7.Amd64+RedHat.7.Amd64+Debian.8.Amd64+Debian.9.Amd64+Ubuntu.1604.Amd64+Ubuntu.1804.Amd64+Ubuntu.1810.Amd64+OpenSuse.42.Amd64+SLES.12.Amd64+SLES.15.Amd64+\(Fedora.28.Amd64\)ubuntu.1604.amd64@mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-28-helix-45b1fa2-20190402012449+\(Fedora.29.Amd64\)ubuntu.1604.amd64@mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-29-helix-c6dc5e6-20190402012449+\(Ubuntu.1904.Amd64\)ubuntu.1604.amd64@mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-19.04-helix-amd64-b43bf34-20190503204407 - linuxArm64Queues: \(Ubuntu.1604.Arm64\)Ubuntu.1604.Arm64.Docker@mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-16.04-helix-arm64v8-b049512-20190321153539 From 451379d814430af36f67cddd30d112f3fc39d705 Mon Sep 17 00:00:00 2001 From: Matt Galbraith Date: Wed, 8 May 2019 16:48:50 -0700 Subject: [PATCH 266/607] Update linux.yml Update to @wfurt 's latest images --- eng/pipelines/linux.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/eng/pipelines/linux.yml b/eng/pipelines/linux.yml index f307d55b5258..488bd28ec517 100644 --- a/eng/pipelines/linux.yml +++ b/eng/pipelines/linux.yml @@ -110,15 +110,15 @@ jobs: - _outerloop: true - ${{ if eq(parameters.isOfficialBuild, 'false') }}: - - linuxDefaultQueues: Centos.7.Amd64.Open+RedHat.7.Amd64.Open+Debian.8.Amd64.Open+Ubuntu.1604.Amd64.Open+Ubuntu.1804.Amd64.Open+OpenSuse.42.Amd64.Open+\(Fedora.28.Amd64\)ubuntu.1604.amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-28-helix-98b4f89-20190506161422 + - linuxDefaultQueues: Centos.7.Amd64.Open+RedHat.7.Amd64.Open+Debian.8.Amd64.Open+Ubuntu.1604.Amd64.Open+Ubuntu.1804.Amd64.Open+OpenSuse.42.Amd64.Open+\(Fedora.28.Amd64\)ubuntu.1604.amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-28-helix-09ca40b-20190508143249 - linuxArm64Queues: \(Ubuntu.1604.Arm64\)Ubuntu.1604.Arm64.Docker.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-16.04-helix-arm64v8-b049512-20190321153539 - - alpineQueues: \(Alpine.38.Amd64\)ubuntu.1604.amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.8-helix-98b4f89-20190506161422 - + - alpineQueues: \(Alpine.38.Amd64\)ubuntu.1604.amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.8-helix-09ca40b-20190508143246 + - ${{ if eq(parameters.isOfficialBuild, 'true') }}: - - linuxDefaultQueues: Centos.7.Amd64+RedHat.7.Amd64+Debian.8.Amd64+Debian.9.Amd64+Ubuntu.1604.Amd64+Ubuntu.1804.Amd64+Ubuntu.1810.Amd64+OpenSuse.42.Amd64+SLES.12.Amd64+SLES.15.Amd64+\(Fedora.28.Amd64\)ubuntu.1604.amd64@mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-28-helix-45b1fa2-20190402012449+\(Fedora.29.Amd64\)ubuntu.1604.amd64@mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-29-helix-c6dc5e6-20190402012449+\(Ubuntu.1904.Amd64\)ubuntu.1604.amd64@mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-19.04-helix-amd64-b43bf34-20190503204407 + - linuxDefaultQueues: Centos.7.Amd64+RedHat.7.Amd64+Debian.8.Amd64+Debian.9.Amd64+Ubuntu.1604.Amd64+Ubuntu.1804.Amd64+Ubuntu.1810.Amd64+OpenSuse.42.Amd64+SLES.12.Amd64+SLES.15.Amd64+\(Fedora.28.Amd64\)ubuntu.1604.amd64@mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-28-helix-09ca40b-20190508143249+\(Fedora.29.Amd64\)ubuntu.1604.amd64@mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-29-09ca40b-20190508143249+\(Ubuntu.1904.Amd64\)ubuntu.1604.amd64@mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-19.04-helix-amd64-09ca40b-20190508143257 - linuxArm64Queues: \(Ubuntu.1604.Arm64\)Ubuntu.1604.Arm64.Docker@mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-16.04-helix-arm64v8-b049512-20190321153539 - linuxArmQueues: \(Debian.9.Arm32\)Ubuntu.1604.Arm32@mcr.microsoft.com/dotnet-buildtools/prereqs:debian-9-helix-arm32v7-b049512-20190321153542 - - alpineQueues: \(Alpine.38.Amd64\)ubuntu.1604.amd64@mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.8-helix-45b1fa2-20190327215821+\(Alpine.39.Amd64\)ubuntu.1604.amd64@mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.9-helix-e4eaef4-20190228230637 + - alpineQueues: \(Alpine.38.Amd64\)ubuntu.1604.amd64@mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.8-helix-09ca40b-20190508143246+\(Alpine.39.Amd64\)ubuntu.1604.amd64@mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.9-helix-09ca40b-20190508143246 - alpineArm64Queues: \(Alpine.38.Arm64\)Ubuntu.1604.Arm64.Docker@mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.8-helix-arm64v8-46e69dd-20190327215724 # Legs without helix testing From 6acc044c36df2138d86620e2c27d3234c4fa0d3d Mon Sep 17 00:00:00 2001 From: Stephen Toub Date: Wed, 8 May 2019 20:24:41 -0400 Subject: [PATCH 267/607] Fix unnecessary culture-aware comparisons in System.Net (#37499) - string.IndexOf(string) and string.IndexOf(string, int) are culture-aware. For most situations in System.Net, that's undesirable and Ordinal is both more correct and faster. - string.IndexOf("c", StringComparison.Ordinal) is better off as string.IndexOf('c') for perf and simplicity. - string.IndexOf('c') >= 0 is better off as string.Contains('c') for perf and simplicity. --- .../CurlHandler/CurlResponseHeaderReader.cs | 2 +- .../Headers/ContentDispositionHeaderValue.cs | 2 +- .../src/System/Net/Http/MultipartContent.cs | 2 +- .../AuthenticationHelper.Digest.cs | 6 ++--- .../SocketsHttpHandler/HttpWindowsProxy.cs | 8 +++---- .../src/System/Net/ServiceNameStore.cs | 2 +- .../src/System/Net/FtpControlStream.cs | 22 +++++++++---------- .../src/System/Net/HttpWebRequest.cs | 13 ++++------- .../src/System/Net/HttpWebResponse.cs | 6 ++--- .../src/System/Net/WebProxy.cs | 2 +- 10 files changed, 30 insertions(+), 35 deletions(-) diff --git a/src/System.Net.Http/src/System/Net/Http/CurlHandler/CurlResponseHeaderReader.cs b/src/System.Net.Http/src/System/Net/Http/CurlHandler/CurlResponseHeaderReader.cs index 474e5d00533b..d6858362a143 100644 --- a/src/System.Net.Http/src/System/Net/Http/CurlHandler/CurlResponseHeaderReader.cs +++ b/src/System.Net.Http/src/System/Net/Http/CurlHandler/CurlResponseHeaderReader.cs @@ -123,7 +123,7 @@ private static void CheckResponseMsgFormat(bool condition) private static bool ValidHeaderNameChar(byte c) { const string invalidChars = "()<>@,;:\\\"/[]?={}"; - return c > ' ' && invalidChars.IndexOf((char)c) < 0; + return c > ' ' && !invalidChars.Contains((char)c); } internal static bool IsWhiteSpaceLatin1(byte c) diff --git a/src/System.Net.Http/src/System/Net/Http/Headers/ContentDispositionHeaderValue.cs b/src/System.Net.Http/src/System/Net/Http/Headers/ContentDispositionHeaderValue.cs index d38085a0e212..5d8afc51ff19 100644 --- a/src/System.Net.Http/src/System/Net/Http/Headers/ContentDispositionHeaderValue.cs +++ b/src/System.Net.Http/src/System/Net/Http/Headers/ContentDispositionHeaderValue.cs @@ -435,7 +435,7 @@ private static string EncodeAndQuoteMime(string input) needsQuotes = true; } - if (result.IndexOf("\"", 0, StringComparison.Ordinal) >= 0) // Only bounding quotes are allowed. + if (result.Contains('"')) // Only bounding quotes are allowed. { throw new ArgumentException(SR.Format(CultureInfo.InvariantCulture, SR.net_http_headers_invalid_value, input)); diff --git a/src/System.Net.Http/src/System/Net/Http/MultipartContent.cs b/src/System.Net.Http/src/System/Net/Http/MultipartContent.cs index fed41a4bee89..4cf988b0dc99 100644 --- a/src/System.Net.Http/src/System/Net/Http/MultipartContent.cs +++ b/src/System.Net.Http/src/System/Net/Http/MultipartContent.cs @@ -96,7 +96,7 @@ private static void ValidateBoundary(string boundary) if (('0' <= ch && ch <= '9') || // Digit. ('a' <= ch && ch <= 'z') || // alpha. ('A' <= ch && ch <= 'Z') || // ALPHA. - (AllowedMarks.IndexOf(ch) >= 0)) // Marks. + (AllowedMarks.Contains(ch))) // Marks. { // Valid. } diff --git a/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/AuthenticationHelper.Digest.cs b/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/AuthenticationHelper.Digest.cs index b65b240e80f6..10723cca3e11 100644 --- a/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/AuthenticationHelper.Digest.cs +++ b/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/AuthenticationHelper.Digest.cs @@ -117,17 +117,17 @@ public static async Task GetDigestTokenForCredential(NetworkCredential c if (digestResponse.Parameters.ContainsKey(Qop)) { // Check if auth-int present in qop string - int index1 = digestResponse.Parameters[Qop].IndexOf(AuthInt); + int index1 = digestResponse.Parameters[Qop].IndexOf(AuthInt, StringComparison.Ordinal); if (index1 != -1) { // Get index of auth if present in qop string - int index2 = digestResponse.Parameters[Qop].IndexOf(Auth); + int index2 = digestResponse.Parameters[Qop].IndexOf(Auth, StringComparison.Ordinal); // If index2 < index1, auth option is available // If index2 == index1, check if auth option available later in string after auth-int. if (index2 == index1) { - index2 = digestResponse.Parameters[Qop].IndexOf(Auth, index1 + AuthInt.Length); + index2 = digestResponse.Parameters[Qop].IndexOf(Auth, index1 + AuthInt.Length, StringComparison.Ordinal); if (index2 == -1) { qop = AuthInt; diff --git a/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpWindowsProxy.cs b/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpWindowsProxy.cs index 219a387c4380..68d1034f80ae 100644 --- a/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpWindowsProxy.cs +++ b/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpWindowsProxy.cs @@ -226,7 +226,7 @@ private static void ParseProxyConfig(string value, out Uri insecureProxy, out Ur return; } - int idx = value.IndexOf("http://"); + int idx = value.IndexOf("http://", StringComparison.Ordinal); if (idx >= 0) { int proxyLength = GetProxySubstringLength(value, idx); @@ -235,7 +235,7 @@ private static void ParseProxyConfig(string value, out Uri insecureProxy, out Ur if (insecureProxy == null) { - idx = value.IndexOf("http="); + idx = value.IndexOf("http=", StringComparison.Ordinal); if (idx >= 0) { idx += 5; // Skip "http=" so we can replace it with "http://" @@ -244,7 +244,7 @@ private static void ParseProxyConfig(string value, out Uri insecureProxy, out Ur } } - idx = value.IndexOf("https://"); + idx = value.IndexOf("https://", StringComparison.Ordinal); if (idx >= 0) { idx += 8; // Skip "https://" so we can replace it with "http://" @@ -254,7 +254,7 @@ private static void ParseProxyConfig(string value, out Uri insecureProxy, out Ur if (secureProxy == null) { - idx = value.IndexOf("https="); + idx = value.IndexOf("https=", StringComparison.Ordinal); if (idx >= 0) { idx += 6; // Skip "https=" so we can replace it with "http://" diff --git a/src/System.Net.HttpListener/src/System/Net/ServiceNameStore.cs b/src/System.Net.HttpListener/src/System/Net/ServiceNameStore.cs index 260955d55eaa..7eb26dc1d70f 100644 --- a/src/System.Net.HttpListener/src/System/Net/ServiceNameStore.cs +++ b/src/System.Net.HttpListener/src/System/Net/ServiceNameStore.cs @@ -237,7 +237,7 @@ private string ExtractHostname(string uriPrefix, bool allowInvalidUriStrings) } else if (allowInvalidUriStrings) { - int i = uriPrefix.IndexOf("://") + 3; + int i = uriPrefix.IndexOf("://", StringComparison.Ordinal) + 3; int j = i; bool inSquareBrackets = false; diff --git a/src/System.Net.Requests/src/System/Net/FtpControlStream.cs b/src/System.Net.Requests/src/System/Net/FtpControlStream.cs index 6539ade62970..3045ed1eb625 100644 --- a/src/System.Net.Requests/src/System/Net/FtpControlStream.cs +++ b/src/System.Net.Requests/src/System/Net/FtpControlStream.cs @@ -283,7 +283,7 @@ protected override PipelineInstruction PipelineCallback(PipelineEntry entry, Res // If we are already logged in and the server returns 530 then // the server does not support re-issuing a USER command, // tear down the connection and start all over again - if (entry.Command.IndexOf("USER") != -1) + if (entry.Command.IndexOf("USER", StringComparison.Ordinal) != -1) { // The server may not require a password for this user, so bypass the password command if (status == FtpStatusCode.LoggedInProceed) @@ -306,7 +306,7 @@ protected override PipelineInstruction PipelineCallback(PipelineEntry entry, Res } if (_loginState != FtpLoginState.LoggedIn - && entry.Command.IndexOf("PASS") != -1) + && entry.Command.IndexOf("PASS", StringComparison.Ordinal) != -1) { // Note the fact that we logged in if (status == FtpStatusCode.NeedLoginAccount || status == FtpStatusCode.LoggedInProceed) @@ -412,11 +412,11 @@ protected override PipelineInstruction PipelineCallback(PipelineEntry entry, Res else if (status == FtpStatusCode.FileStatus) { FtpWebRequest request = (FtpWebRequest)_request; - if (entry.Command.StartsWith("SIZE ")) + if (entry.Command.StartsWith("SIZE ", StringComparison.Ordinal)) { _contentLength = GetContentLengthFrom213Response(response.StatusDescription); } - else if (entry.Command.StartsWith("MDTM ")) + else if (entry.Command.StartsWith("MDTM ", StringComparison.Ordinal)) { _lastModified = GetLastModifiedFrom213Response(response.StatusDescription); } @@ -433,7 +433,7 @@ protected override PipelineInstruction PipelineCallback(PipelineEntry entry, Res else { // We only use CWD to reset ourselves back to the login directory. - if (entry.Command.IndexOf("CWD") != -1) + if (entry.Command.IndexOf("CWD", StringComparison.Ordinal) != -1) { _establishedServerDirectory = _requestedServerDirectory; } @@ -940,7 +940,7 @@ private void TryUpdateResponseUri(string str, FtpWebRequest request) // // Not sure what we are doing here but I guess the logic is IIS centric // - int start = str.IndexOf("for "); + int start = str.IndexOf("for ", StringComparison.Ordinal); if (start == -1) return; start += 4; @@ -991,10 +991,10 @@ private void TryUpdateResponseUri(string str, FtpWebRequest request) /// private void TryUpdateContentLength(string str) { - int pos1 = str.LastIndexOf("("); + int pos1 = str.LastIndexOf('('); if (pos1 != -1) { - int pos2 = str.IndexOf(" bytes)."); + int pos2 = str.IndexOf(" bytes).", StringComparison.Ordinal); if (pos2 != -1 && pos2 > pos1) { pos1++; @@ -1056,8 +1056,8 @@ private int GetPortV4(string responseString) /// private int GetPortV6(string responseString) { - int pos1 = responseString.LastIndexOf("("); - int pos2 = responseString.LastIndexOf(")"); + int pos1 = responseString.LastIndexOf('('); + int pos2 = responseString.LastIndexOf(')'); if (pos1 == -1 || pos2 <= pos1) throw new FormatException(SR.Format(SR.net_ftp_response_invalid_format, responseString)); @@ -1196,7 +1196,7 @@ protected override bool CheckValid(ResponseDescription response, ref int validTh // FTP protocol for multiline responses. // All other cases indicate that the response is not yet complete. int index = 0; - while ((index = responseString.IndexOf("\r\n", validThrough)) != -1) // gets the end line. + while ((index = responseString.IndexOf("\r\n", validThrough, StringComparison.Ordinal)) != -1) // gets the end line. { int lineStart = validThrough; validThrough = index + 2; // validThrough now marks the end of the line being examined. diff --git a/src/System.Net.Requests/src/System/Net/HttpWebRequest.cs b/src/System.Net.Requests/src/System/Net/HttpWebRequest.cs index bbe72db4d09c..77a31bf5d869 100644 --- a/src/System.Net.Requests/src/System/Net/HttpWebRequest.cs +++ b/src/System.Net.Requests/src/System/Net/HttpWebRequest.cs @@ -394,8 +394,7 @@ public string TransferEncoding // // if not check if the user is trying to set chunked: // - string newValue = value.ToLower(); - fChunked = (newValue.IndexOf(ChunkedHeader) != -1); + fChunked = (value.IndexOf(ChunkedHeader, StringComparison.OrdinalIgnoreCase) != -1); // // prevent them from adding chunked, or from adding an Encoding without @@ -539,10 +538,8 @@ public string Connection return; } - string newValue = value.ToLower(); - - fKeepAlive = (newValue.IndexOf("keep-alive") != -1); - fClose = (newValue.IndexOf("close") != -1); + fKeepAlive = (value.IndexOf("keep-alive", StringComparison.OrdinalIgnoreCase) != -1); + fClose = (value.IndexOf("close", StringComparison.OrdinalIgnoreCase) != -1); // // Prevent keep-alive and close from being added @@ -603,9 +600,7 @@ public string Expect // Prevent 100-continues from being added // - string newValue = value.ToLower(); - - fContinue100 = (newValue.IndexOf(ContinueHeader) != -1); + fContinue100 = (value.IndexOf(ContinueHeader, StringComparison.OrdinalIgnoreCase) != -1); if (fContinue100) { diff --git a/src/System.Net.Requests/src/System/Net/HttpWebResponse.cs b/src/System.Net.Requests/src/System/Net/HttpWebResponse.cs index 7b63ed4b3fb1..1bbb9960668d 100644 --- a/src/System.Net.Requests/src/System/Net/HttpWebResponse.cs +++ b/src/System.Net.Requests/src/System/Net/HttpWebResponse.cs @@ -275,18 +275,18 @@ public string CharacterSet string srchString = contentType.ToLower(); //media subtypes of text type has a default as specified by rfc 2616 - if (srchString.Trim().StartsWith("text/")) + if (srchString.Trim().StartsWith("text/", StringComparison.Ordinal)) { _characterSet = "ISO-8859-1"; } //one of the parameters may be the character set //there must be at least a mediatype for this to be valid - int i = srchString.IndexOf(";"); + int i = srchString.IndexOf(';'); if (i > 0) { //search the parameters - while ((i = srchString.IndexOf("charset", i)) >= 0) + while ((i = srchString.IndexOf("charset", i, StringComparison.Ordinal)) >= 0) { i += 7; diff --git a/src/System.Net.WebProxy/src/System/Net/WebProxy.cs b/src/System.Net.WebProxy/src/System/Net/WebProxy.cs index a97631f95356..686a1b90810f 100644 --- a/src/System.Net.WebProxy/src/System/Net/WebProxy.cs +++ b/src/System.Net.WebProxy/src/System/Net/WebProxy.cs @@ -96,7 +96,7 @@ public Uri GetProxy(Uri destination) private static Uri CreateProxyUri(string address) => address == null ? null : - address.IndexOf("://") == -1 ? new Uri("http://" + address) : + address.IndexOf("://", StringComparison.Ordinal) == -1 ? new Uri("http://" + address) : new Uri(address); private void UpdateRegExList(bool canThrow) From ca8981317f7e6246efcebc0673f681810d05fbdb Mon Sep 17 00:00:00 2001 From: Steve MacLean Date: Wed, 8 May 2019 22:35:40 -0400 Subject: [PATCH 268/607] Reenable tests (#37521) --- .../tests/SatelliteAssemblies.cs | 75 ++++++++----------- 1 file changed, 30 insertions(+), 45 deletions(-) diff --git a/src/System.Runtime.Loader/tests/SatelliteAssemblies.cs b/src/System.Runtime.Loader/tests/SatelliteAssemblies.cs index 28c05f7379fe..ef31fea3f146 100644 --- a/src/System.Runtime.Loader/tests/SatelliteAssemblies.cs +++ b/src/System.Runtime.Loader/tests/SatelliteAssemblies.cs @@ -102,6 +102,22 @@ public static string Describe(string lang) [InlineData("LoadFile", "System.Runtime.Loader.Tests.SatelliteAssembliesTests", "es-MX", "Spanish (Mexico) language Main description 1.0.0")] [InlineData("LoadFile", "System.Runtime.Loader.Tests.SatelliteAssembliesTests", "fr", "Neutral language Main description 1.0.0")] [InlineData("LoadFile", "System.Runtime.Loader.Tests.SatelliteAssembliesTests", "fr-FR", "Neutral language Main description 1.0.0")] + [InlineData("Default", "ReferencedClassLib.Program, ReferencedClassLib", "", "Neutral language ReferencedClassLib description 1.0.0")] + [InlineData("Default", "ReferencedClassLib.Program, ReferencedClassLib", "en", "English language ReferencedClassLib description 1.0.0")] + [InlineData("Default", "ReferencedClassLib.Program, ReferencedClassLib", "en-US", "English language ReferencedClassLib description 1.0.0")] + [InlineData("Default", "ReferencedClassLib.Program, ReferencedClassLib", "es", "Neutral language ReferencedClassLib description 1.0.0")] + [InlineData("Default", "ReferencedClassLibNeutralIsSatellite.Program, ReferencedClassLibNeutralIsSatellite", "", "Neutral (es) language ReferencedClassLibNeutralIsSatellite description 1.0.0")] + [InlineData("Default", "ReferencedClassLibNeutralIsSatellite.Program, ReferencedClassLibNeutralIsSatellite", "en", "English language ReferencedClassLibNeutralIsSatellite description 1.0.0")] + [InlineData("Default", "ReferencedClassLibNeutralIsSatellite.Program, ReferencedClassLibNeutralIsSatellite", "en-US", "English language ReferencedClassLibNeutralIsSatellite description 1.0.0")] + [InlineData("Default", "ReferencedClassLibNeutralIsSatellite.Program, ReferencedClassLibNeutralIsSatellite", "es", "Neutral (es) language ReferencedClassLibNeutralIsSatellite description 1.0.0")] + [InlineData("ReferencedClassLib", "ReferencedClassLib.Program, ReferencedClassLib", "", "Neutral language ReferencedClassLib description 1.0.0")] + [InlineData("ReferencedClassLib", "ReferencedClassLib.Program, ReferencedClassLib", "en", "English language ReferencedClassLib description 1.0.0")] + [InlineData("ReferencedClassLib", "ReferencedClassLib.Program, ReferencedClassLib", "en-US", "English language ReferencedClassLib description 1.0.0")] + [InlineData("ReferencedClassLib", "ReferencedClassLib.Program, ReferencedClassLib", "es", "Neutral language ReferencedClassLib description 1.0.0")] + [InlineData("ReferencedClassLibNeutralIsSatellite", "ReferencedClassLibNeutralIsSatellite.Program, ReferencedClassLibNeutralIsSatellite", "", "Neutral (es) language ReferencedClassLibNeutralIsSatellite description 1.0.0")] + [InlineData("ReferencedClassLibNeutralIsSatellite", "ReferencedClassLibNeutralIsSatellite.Program, ReferencedClassLibNeutralIsSatellite", "en", "English language ReferencedClassLibNeutralIsSatellite description 1.0.0")] + [InlineData("ReferencedClassLibNeutralIsSatellite", "ReferencedClassLibNeutralIsSatellite.Program, ReferencedClassLibNeutralIsSatellite", "en-US", "English language ReferencedClassLibNeutralIsSatellite description 1.0.0")] + [InlineData("ReferencedClassLibNeutralIsSatellite", "ReferencedClassLibNeutralIsSatellite.Program, ReferencedClassLibNeutralIsSatellite", "es", "Neutral (es) language ReferencedClassLibNeutralIsSatellite description 1.0.0")] public void describeLib(string alc, string type, string culture, string expected) { string result = "Oops"; @@ -123,30 +139,6 @@ public void describeLib(string alc, string type, string culture, string expected Assert.Equal(expected, result); } - - [Theory] - [ActiveIssue("dotnet/corefx#37246")] - [InlineData("Default", "ReferencedClassLib.Program, ReferencedClassLib", "", "Neutral language ReferencedClassLib description 1.0.0")] - [InlineData("Default", "ReferencedClassLib.Program, ReferencedClassLib", "en", "English language ReferencedClassLib description 1.0.0")] - [InlineData("Default", "ReferencedClassLib.Program, ReferencedClassLib", "en-US", "English language ReferencedClassLib description 1.0.0")] - [InlineData("Default", "ReferencedClassLib.Program, ReferencedClassLib", "es", "Neutral language ReferencedClassLib description 1.0.0")] - [InlineData("Default", "ReferencedClassLibNeutralIsSatellite.Program, ReferencedClassLibNeutralIsSatellite", "", "Neutral (es) language ReferencedClassLibNeutralIsSatellite description 1.0.0")] - [InlineData("Default", "ReferencedClassLibNeutralIsSatellite.Program, ReferencedClassLibNeutralIsSatellite", "en", "English language ReferencedClassLibNeutralIsSatellite description 1.0.0")] - [InlineData("Default", "ReferencedClassLibNeutralIsSatellite.Program, ReferencedClassLibNeutralIsSatellite", "en-US", "English language ReferencedClassLibNeutralIsSatellite description 1.0.0")] - [InlineData("Default", "ReferencedClassLibNeutralIsSatellite.Program, ReferencedClassLibNeutralIsSatellite", "es", "Neutral (es) language ReferencedClassLibNeutralIsSatellite description 1.0.0")] - [InlineData("ReferencedClassLib", "ReferencedClassLib.Program, ReferencedClassLib", "", "Neutral language ReferencedClassLib description 1.0.0")] - [InlineData("ReferencedClassLib", "ReferencedClassLib.Program, ReferencedClassLib", "en", "English language ReferencedClassLib description 1.0.0")] - [InlineData("ReferencedClassLib", "ReferencedClassLib.Program, ReferencedClassLib", "en-US", "English language ReferencedClassLib description 1.0.0")] - [InlineData("ReferencedClassLib", "ReferencedClassLib.Program, ReferencedClassLib", "es", "Neutral language ReferencedClassLib description 1.0.0")] - [InlineData("ReferencedClassLibNeutralIsSatellite", "ReferencedClassLibNeutralIsSatellite.Program, ReferencedClassLibNeutralIsSatellite", "", "Neutral (es) language ReferencedClassLibNeutralIsSatellite description 1.0.0")] - [InlineData("ReferencedClassLibNeutralIsSatellite", "ReferencedClassLibNeutralIsSatellite.Program, ReferencedClassLibNeutralIsSatellite", "en", "English language ReferencedClassLibNeutralIsSatellite description 1.0.0")] - [InlineData("ReferencedClassLibNeutralIsSatellite", "ReferencedClassLibNeutralIsSatellite.Program, ReferencedClassLibNeutralIsSatellite", "en-US", "English language ReferencedClassLibNeutralIsSatellite description 1.0.0")] - [InlineData("ReferencedClassLibNeutralIsSatellite", "ReferencedClassLibNeutralIsSatellite.Program, ReferencedClassLibNeutralIsSatellite", "es", "Neutral (es) language ReferencedClassLibNeutralIsSatellite description 1.0.0")] - public void describeLib37246(string alc, string type, string culture, string expected) - { - describeLib(alc, type, culture, expected); - } - #endregion [Theory] @@ -162,25 +154,6 @@ public void describeLib37246(string alc, string type, string culture, string exp [InlineData("SatelliteAssembliesTests", "System.Runtime.Loader.Tests", "es-MX")] [InlineData("LoadFile", "System.Runtime.Loader.Tests", "en")] [InlineData("LoadFile", "System.Runtime.Loader.Tests", "es-MX")] - public void SatelliteLoadsCorrectly(string alc, string assemblyName, string culture) - { - AssemblyName satelliteAssemblyName = new AssemblyName(assemblyName + ".resources"); - satelliteAssemblyName.CultureInfo = new CultureInfo(culture); - - AssemblyLoadContext assemblyLoadContext = contexts[alc]; - - Assembly satelliteAssembly = assemblyLoadContext.LoadFromAssemblyName(satelliteAssemblyName); - - Assert.NotNull(satelliteAssembly); - - AssemblyName parentAssemblyName = new AssemblyName(assemblyName); - Assembly parentAssembly = assemblyLoadContext.LoadFromAssemblyName(parentAssemblyName); - - Assert.Equal(AssemblyLoadContext.GetLoadContext(parentAssembly), AssemblyLoadContext.GetLoadContext(satelliteAssembly)); - } - - [Theory] - [ActiveIssue("dotnet/corefx#37246")] [InlineData("Default", "ReferencedClassLib", "en")] [InlineData("Default", "ReferencedClassLibNeutralIsSatellite", "en")] [InlineData("Default", "ReferencedClassLibNeutralIsSatellite", "es")] @@ -196,9 +169,21 @@ public void SatelliteLoadsCorrectly(string alc, string assemblyName, string cult [InlineData("ReferencedClassLib", "ReferencedClassLib", "en")] [InlineData("ReferencedClassLibNeutralIsSatellite", "ReferencedClassLibNeutralIsSatellite", "en")] [InlineData("ReferencedClassLibNeutralIsSatellite", "ReferencedClassLibNeutralIsSatellite", "es")] - public void SatelliteLoadsCorrectly37246(string alc, string assemblyName, string culture) + public void SatelliteLoadsCorrectly(string alc, string assemblyName, string culture) { - SatelliteLoadsCorrectly(alc, assemblyName, culture); + AssemblyName satelliteAssemblyName = new AssemblyName(assemblyName + ".resources"); + satelliteAssemblyName.CultureInfo = new CultureInfo(culture); + + AssemblyLoadContext assemblyLoadContext = contexts[alc]; + + Assembly satelliteAssembly = assemblyLoadContext.LoadFromAssemblyName(satelliteAssemblyName); + + Assert.NotNull(satelliteAssembly); + + AssemblyName parentAssemblyName = new AssemblyName(assemblyName); + Assembly parentAssembly = assemblyLoadContext.LoadFromAssemblyName(parentAssemblyName); + + Assert.Equal(AssemblyLoadContext.GetLoadContext(parentAssembly), AssemblyLoadContext.GetLoadContext(satelliteAssembly)); } } } From 870cb984d5e3024fcf6ad67ff363ec6be1bff476 Mon Sep 17 00:00:00 2001 From: Paul Buonopane Date: Wed, 8 May 2019 23:45:57 -0400 Subject: [PATCH 269/607] Fix #37506: System.Text.Json fails to parse enums with negative values (#37508) --- .../Converters/JsonValueConverterEnum.cs | 21 ++++++++--- .../tests/Serialization/EnumTests.cs | 36 +++++++++++++++++++ .../TestClasses.SimpleTestClass.cs | 2 ++ .../tests/Serialization/TestClasses.cs | 11 ++++++ 4 files changed, 66 insertions(+), 4 deletions(-) diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/JsonValueConverterEnum.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/JsonValueConverterEnum.cs index b99dcc905244..3778957f252e 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/JsonValueConverterEnum.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/JsonValueConverterEnum.cs @@ -33,15 +33,28 @@ public override bool TryRead(Type valueType, ref Utf8JsonReader reader, out TVal return Enum.TryParse(enumString, out value); } - if (reader.TokenType != JsonTokenType.Number || - !reader.TryGetUInt64(out ulong ulongValue)) + if (reader.TokenType != JsonTokenType.Number) { value = default; return false; } - value = (TValue)Enum.ToObject(valueType, ulongValue); - return true; + if (s_isUint64) + { + if (reader.TryGetUInt64(out ulong ulongValue)) + { + value = (TValue)Enum.ToObject(valueType, ulongValue); + return true; + } + } + else if (reader.TryGetInt64(out long longValue)) + { + value = (TValue)Enum.ToObject(valueType, longValue); + return true; + } + + value = default; + return false; } public override void Write(TValue value, Utf8JsonWriter writer) diff --git a/src/System.Text.Json/tests/Serialization/EnumTests.cs b/src/System.Text.Json/tests/Serialization/EnumTests.cs index d541456155d3..79a376af8108 100644 --- a/src/System.Text.Json/tests/Serialization/EnumTests.cs +++ b/src/System.Text.Json/tests/Serialization/EnumTests.cs @@ -18,6 +18,21 @@ public static class EnumTests @"""MyEnum"" : 2" + @"}"; + private static readonly string s_jsonInt64EnumMin = + @"{" + + @"""MyInt64Enum"" : " + long.MinValue + + @"}"; + + private static readonly string s_jsonInt64EnumMax = + @"{" + + @"""MyInt64Enum"" : " + long.MaxValue + + @"}"; + + private static readonly string s_jsonUInt64EnumMax = + @"{" + + @"""MyUInt64Enum"" : " + ulong.MaxValue + + @"}"; + [Fact] public static void EnumAsStringFail() { @@ -30,5 +45,26 @@ public static void EnumAsInt() SimpleTestClass obj = JsonSerializer.Parse(s_jsonIntEnum); Assert.Equal(SampleEnum.Two, obj.MyEnum); } + + [Fact] + public static void EnumAsInt64Min() + { + SimpleTestClass obj = JsonSerializer.Parse(s_jsonInt64EnumMin); + Assert.Equal(SampleInt64Enum.Min, obj.MyInt64Enum); + } + + [Fact] + public static void EnumAsInt64Max() + { + SimpleTestClass obj = JsonSerializer.Parse(s_jsonInt64EnumMax); + Assert.Equal(SampleInt64Enum.Max, obj.MyInt64Enum); + } + + [Fact] + public static void EnumAsUInt64Max() + { + SimpleTestClass obj = JsonSerializer.Parse(s_jsonUInt64EnumMax); + Assert.Equal(SampleUInt64Enum.Max, obj.MyUInt64Enum); + } } } diff --git a/src/System.Text.Json/tests/Serialization/TestClasses.SimpleTestClass.cs b/src/System.Text.Json/tests/Serialization/TestClasses.SimpleTestClass.cs index d56864440eb3..8edbc63bca44 100644 --- a/src/System.Text.Json/tests/Serialization/TestClasses.SimpleTestClass.cs +++ b/src/System.Text.Json/tests/Serialization/TestClasses.SimpleTestClass.cs @@ -28,6 +28,8 @@ public class SimpleTestClass : ITestClass public DateTime MyDateTime { get; set; } public DateTimeOffset MyDateTimeOffset { get; set; } public SampleEnum MyEnum { get; set; } + public SampleInt64Enum MyInt64Enum { get; set; } + public SampleUInt64Enum MyUInt64Enum { get; set; } public short[] MyInt16Array { get; set; } public int[] MyInt32Array { get; set; } public long[] MyInt64Array { get; set; } diff --git a/src/System.Text.Json/tests/Serialization/TestClasses.cs b/src/System.Text.Json/tests/Serialization/TestClasses.cs index cb7c4e203b1c..380fbab122ba 100644 --- a/src/System.Text.Json/tests/Serialization/TestClasses.cs +++ b/src/System.Text.Json/tests/Serialization/TestClasses.cs @@ -20,6 +20,17 @@ public enum SampleEnum Two = 2 } + public enum SampleInt64Enum : long + { + Min = long.MinValue, + Max = long.MaxValue + } + + public enum SampleUInt64Enum : ulong + { + Max = ulong.MaxValue + } + public class TestClassWithNull { public string MyString { get; set; } From f7cd353ab8b08ff45d45985851505e5f8f19f9ac Mon Sep 17 00:00:00 2001 From: Maryam Ariyan Date: Thu, 9 May 2019 02:17:53 -0700 Subject: [PATCH 270/607] skip all OleDb tests first to unblock other PRs. (#37539) --- src/System.Data.OleDb/tests/Helpers.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/System.Data.OleDb/tests/Helpers.cs b/src/System.Data.OleDb/tests/Helpers.cs index 60ebce81d490..fd2eaa351a36 100644 --- a/src/System.Data.OleDb/tests/Helpers.cs +++ b/src/System.Data.OleDb/tests/Helpers.cs @@ -11,7 +11,8 @@ namespace System.Data.OleDb.Tests public static class Helpers { public const string IsDriverAvailable = nameof(Helpers) + "." + nameof(GetIsDriverAvailable); - public static bool GetIsDriverAvailable() => Nested.IsAvailable; + private static readonly bool s_skipAllTemporarily = true; // [ActiveIssue(37538)] + public static bool GetIsDriverAvailable() => !s_skipAllTemporarily && Nested.IsAvailable; public static string ProviderName => Nested.ProviderName; public static string GetTableName(string memberName) => memberName + ".csv"; From abfc9d4fb689786537edb8660d43205a0f254f64 Mon Sep 17 00:00:00 2001 From: Stephen Toub Date: Wed, 17 Apr 2019 11:41:28 -0400 Subject: [PATCH 271/607] Nullable: System.Runtime.dll --- src/System.Runtime/src/System.Runtime.csproj | 1 + src/System.Runtime/src/System/LazyOfTTMetadata.cs | 2 -- .../Reflection/RuntimeReflectionExtensions.cs | 13 ++++++------- .../src/System/Runtime/NgenServicingAttributes.cs | 12 +++++------- .../src/System/System.Runtime.Typeforwards.cs | 6 +++++- .../src/System/Threading/WaitHandleExtensions.cs | 5 ++--- 6 files changed, 19 insertions(+), 20 deletions(-) diff --git a/src/System.Runtime/src/System.Runtime.csproj b/src/System.Runtime/src/System.Runtime.csproj index c623d29cfbad..ca18dcdcab47 100644 --- a/src/System.Runtime/src/System.Runtime.csproj +++ b/src/System.Runtime/src/System.Runtime.csproj @@ -5,6 +5,7 @@ true true netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release;uapaot-Windows_NT-Debug;uapaot-Windows_NT-Release + enable diff --git a/src/System.Runtime/src/System/LazyOfTTMetadata.cs b/src/System.Runtime/src/System/LazyOfTTMetadata.cs index 07bb02c1ff10..ae778bd7ba68 100644 --- a/src/System.Runtime/src/System/LazyOfTTMetadata.cs +++ b/src/System.Runtime/src/System/LazyOfTTMetadata.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System.Collections.Generic; -using System.Text; using System.Threading; namespace System diff --git a/src/System.Runtime/src/System/Reflection/RuntimeReflectionExtensions.cs b/src/System.Runtime/src/System/Reflection/RuntimeReflectionExtensions.cs index 441d8feee81f..02d742d787c0 100644 --- a/src/System.Runtime/src/System/Reflection/RuntimeReflectionExtensions.cs +++ b/src/System.Runtime/src/System/Reflection/RuntimeReflectionExtensions.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Collections.Generic; namespace System.Reflection @@ -47,7 +46,7 @@ public static IEnumerable GetRuntimeEvents(this Type type) return type.GetEvents(Everything); } - public static FieldInfo GetRuntimeField(this Type type, string name) + public static FieldInfo? GetRuntimeField(this Type type, string name) { if (type == null) { @@ -56,7 +55,7 @@ public static FieldInfo GetRuntimeField(this Type type, string name) return type.GetField(name); } - public static MethodInfo GetRuntimeMethod(this Type type, string name, Type[] parameters) + public static MethodInfo? GetRuntimeMethod(this Type type, string name, Type[] parameters) { if (type == null) { @@ -65,7 +64,7 @@ public static MethodInfo GetRuntimeMethod(this Type type, string name, Type[] pa return type.GetMethod(name, parameters); } - public static PropertyInfo GetRuntimeProperty(this Type type, string name) + public static PropertyInfo? GetRuntimeProperty(this Type type, string name) { if (type == null) { @@ -74,7 +73,7 @@ public static PropertyInfo GetRuntimeProperty(this Type type, string name) return type.GetProperty(name); } - public static EventInfo GetRuntimeEvent(this Type type, string name) + public static EventInfo? GetRuntimeEvent(this Type type, string name) { if (type == null) { @@ -83,7 +82,7 @@ public static EventInfo GetRuntimeEvent(this Type type, string name) return type.GetEvent(name); } - public static MethodInfo GetRuntimeBaseDefinition(this MethodInfo method) + public static MethodInfo? GetRuntimeBaseDefinition(this MethodInfo method) { if (method == null) { @@ -101,7 +100,7 @@ public static InterfaceMapping GetRuntimeInterfaceMap(this TypeInfo typeInfo, Ty return typeInfo.GetInterfaceMap(interfaceType); } - public static MethodInfo GetMethodInfo(this Delegate del) + public static MethodInfo? GetMethodInfo(this Delegate del) { if (del == null) { diff --git a/src/System.Runtime/src/System/Runtime/NgenServicingAttributes.cs b/src/System.Runtime/src/System/Runtime/NgenServicingAttributes.cs index 863720aad932..6d53595727b8 100644 --- a/src/System.Runtime/src/System/Runtime/NgenServicingAttributes.cs +++ b/src/System.Runtime/src/System/Runtime/NgenServicingAttributes.cs @@ -2,16 +2,14 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; - namespace System.Runtime { [AttributeUsage(AttributeTargets.Assembly, Inherited = false)] public sealed class AssemblyTargetedPatchBandAttribute : Attribute { - public string TargetedPatchBand { get; } + public string? TargetedPatchBand { get; } - public AssemblyTargetedPatchBandAttribute(string targetedPatchBand) + public AssemblyTargetedPatchBandAttribute(string? targetedPatchBand) { TargetedPatchBand = targetedPatchBand; } @@ -20,11 +18,11 @@ public AssemblyTargetedPatchBandAttribute(string targetedPatchBand) [AttributeUsage(AttributeTargets.Method | AttributeTargets.Constructor, AllowMultiple = false, Inherited = false)] public sealed class TargetedPatchingOptOutAttribute : Attribute { - public string Reason { get; } + public string? Reason { get; } - public TargetedPatchingOptOutAttribute(string reason) + public TargetedPatchingOptOutAttribute(string? reason) { Reason = reason; } } -} \ No newline at end of file +} diff --git a/src/System.Runtime/src/System/System.Runtime.Typeforwards.cs b/src/System.Runtime/src/System/System.Runtime.Typeforwards.cs index 16f969b9b326..0f65d106ad97 100644 --- a/src/System.Runtime/src/System/System.Runtime.Typeforwards.cs +++ b/src/System.Runtime/src/System/System.Runtime.Typeforwards.cs @@ -1 +1,5 @@ -[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(void))] \ No newline at end of file +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(void))] diff --git a/src/System.Runtime/src/System/Threading/WaitHandleExtensions.cs b/src/System.Runtime/src/System/Threading/WaitHandleExtensions.cs index 782c1dfe20fc..1b5e78039a82 100644 --- a/src/System.Runtime/src/System/Threading/WaitHandleExtensions.cs +++ b/src/System.Runtime/src/System/Threading/WaitHandleExtensions.cs @@ -3,7 +3,6 @@ // See the LICENSE file in the project root for more information. using Microsoft.Win32.SafeHandles; -using System.Security; namespace System.Threading { @@ -14,7 +13,7 @@ public static class WaitHandleExtensions /// /// The to operate on. /// A representing the native operating system handle. - public static SafeWaitHandle GetSafeWaitHandle(this WaitHandle waitHandle) + public static SafeWaitHandle? GetSafeWaitHandle(this WaitHandle waitHandle) { if (waitHandle == null) { @@ -29,7 +28,7 @@ public static SafeWaitHandle GetSafeWaitHandle(this WaitHandle waitHandle) /// /// The to operate on. /// A representing the native operating system handle. - public static void SetSafeWaitHandle(this WaitHandle waitHandle, SafeWaitHandle value) + public static void SetSafeWaitHandle(this WaitHandle waitHandle, SafeWaitHandle? value) { if (waitHandle == null) { From 9ed871ca7d963c3a03242c172082ed0099213860 Mon Sep 17 00:00:00 2001 From: Stephen Toub Date: Wed, 17 Apr 2019 15:21:35 -0400 Subject: [PATCH 272/607] Nullable: System.Runtime.Extensions.dll --- src/Common/src/System/HResults.cs | 2 - src/Common/src/System/SR.cs | 23 +++--- .../src/System.Runtime.Extensions.csproj | 1 + .../src/System/AppDomainUnloadedException.cs | 4 +- .../src/System/ApplicationId.cs | 17 +++-- .../CodeDom/Compiler/IndentedTextWriter.cs | 29 ++++---- .../src/System/Context.cs | 8 +-- .../src/System/IO/BufferedStream.cs | 70 +++++++++++-------- .../src/System/IO/InvalidDataException.cs | 4 +- .../src/System/IO/StringReader.cs | 13 ++-- .../src/System/IO/StringWriter.cs | 28 ++++---- .../src/System/Net/WebUtility.cs | 42 ++++++----- .../System/Reflection/AssemblyNameProxy.cs | 6 +- .../SwitchExpressionException.cs | 11 +-- .../Runtime/Versioning/FrameworkName.cs | 26 ++++--- .../Runtime/Versioning/VersioningHelper.cs | 10 +-- .../Security/Permissions/SecurityAttribute.cs | 2 +- .../SecurityPermissionAttribute.cs | 2 +- 18 files changed, 152 insertions(+), 146 deletions(-) diff --git a/src/Common/src/System/HResults.cs b/src/Common/src/System/HResults.cs index c578712f4468..1809df4bd1d7 100644 --- a/src/Common/src/System/HResults.cs +++ b/src/Common/src/System/HResults.cs @@ -10,8 +10,6 @@ // //===========================================================================*/ -using System; - namespace System { // Note: FACILITY_URT is defined as 0x13 (0x8013xxxx). Within that diff --git a/src/Common/src/System/SR.cs b/src/Common/src/System/SR.cs index fcccb944d870..8ab0ffa81d33 100644 --- a/src/Common/src/System/SR.cs +++ b/src/Common/src/System/SR.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable using System.Resources; using System.Runtime.CompilerServices; @@ -18,14 +19,14 @@ internal partial class SR [MethodImpl(MethodImplOptions.NoInlining)] private static bool UsingResourceKeys() => false; - internal static string GetResourceString(string resourceKey, string defaultString = null) + internal static string GetResourceString(string resourceKey, string? defaultString = null) { if (UsingResourceKeys()) { return defaultString ?? resourceKey; } - string resourceString = null; + string? resourceString = null; try { resourceString = ResourceManager.GetString(resourceKey); @@ -37,10 +38,10 @@ internal static string GetResourceString(string resourceKey, string defaultStrin return defaultString; } - return resourceString; + return resourceString!; // only null if missing resources } - internal static string Format(string resourceFormat, object p1) + internal static string Format(string resourceFormat, object? p1) { if (UsingResourceKeys()) { @@ -50,7 +51,7 @@ internal static string Format(string resourceFormat, object p1) return string.Format(resourceFormat, p1); } - internal static string Format(string resourceFormat, object p1, object p2) + internal static string Format(string resourceFormat, object? p1, object? p2) { if (UsingResourceKeys()) { @@ -60,7 +61,7 @@ internal static string Format(string resourceFormat, object p1, object p2) return string.Format(resourceFormat, p1, p2); } - internal static string Format(string resourceFormat, object p1, object p2, object p3) + internal static string Format(string resourceFormat, object? p1, object? p2, object? p3) { if (UsingResourceKeys()) { @@ -70,7 +71,7 @@ internal static string Format(string resourceFormat, object p1, object p2, objec return string.Format(resourceFormat, p1, p2, p3); } - internal static string Format(string resourceFormat, params object[] args) + internal static string Format(string resourceFormat, params object?[]? args) { if (args != null) { @@ -85,7 +86,7 @@ internal static string Format(string resourceFormat, params object[] args) return resourceFormat; } - internal static string Format(IFormatProvider provider, string resourceFormat, object p1) + internal static string Format(IFormatProvider? provider, string resourceFormat, object? p1) { if (UsingResourceKeys()) { @@ -95,7 +96,7 @@ internal static string Format(IFormatProvider provider, string resourceFormat, o return string.Format(provider, resourceFormat, p1); } - internal static string Format(IFormatProvider provider, string resourceFormat, object p1, object p2) + internal static string Format(IFormatProvider? provider, string resourceFormat, object? p1, object? p2) { if (UsingResourceKeys()) { @@ -105,7 +106,7 @@ internal static string Format(IFormatProvider provider, string resourceFormat, o return string.Format(provider, resourceFormat, p1, p2); } - internal static string Format(IFormatProvider provider, string resourceFormat, object p1, object p2, object p3) + internal static string Format(IFormatProvider? provider, string resourceFormat, object? p1, object? p2, object? p3) { if (UsingResourceKeys()) { @@ -115,7 +116,7 @@ internal static string Format(IFormatProvider provider, string resourceFormat, o return string.Format(provider, resourceFormat, p1, p2, p3); } - internal static string Format(IFormatProvider provider, string resourceFormat, params object[] args) + internal static string Format(IFormatProvider? provider, string resourceFormat, params object?[]? args) { if (args != null) { diff --git a/src/System.Runtime.Extensions/src/System.Runtime.Extensions.csproj b/src/System.Runtime.Extensions/src/System.Runtime.Extensions.csproj index 5aa1156a7162..416a49a49913 100644 --- a/src/System.Runtime.Extensions/src/System.Runtime.Extensions.csproj +++ b/src/System.Runtime.Extensions/src/System.Runtime.Extensions.csproj @@ -8,6 +8,7 @@ true true netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release;uapaot-Windows_NT-Debug;uapaot-Windows_NT-Release + enable diff --git a/src/System.Runtime.Extensions/src/System/AppDomainUnloadedException.cs b/src/System.Runtime.Extensions/src/System/AppDomainUnloadedException.cs index 60b471c704a9..d05bd970c8ad 100644 --- a/src/System.Runtime.Extensions/src/System/AppDomainUnloadedException.cs +++ b/src/System.Runtime.Extensions/src/System/AppDomainUnloadedException.cs @@ -17,13 +17,13 @@ public AppDomainUnloadedException() HResult = COR_E_APPDOMAINUNLOADED; } - public AppDomainUnloadedException(string message) + public AppDomainUnloadedException(string? message) : base(message) { HResult = COR_E_APPDOMAINUNLOADED; } - public AppDomainUnloadedException(string message, Exception innerException) + public AppDomainUnloadedException(string? message, Exception? innerException) : base(message, innerException) { HResult = COR_E_APPDOMAINUNLOADED; diff --git a/src/System.Runtime.Extensions/src/System/ApplicationId.cs b/src/System.Runtime.Extensions/src/System/ApplicationId.cs index d5a0decd84f6..540ac22ae143 100644 --- a/src/System.Runtime.Extensions/src/System/ApplicationId.cs +++ b/src/System.Runtime.Extensions/src/System/ApplicationId.cs @@ -2,9 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System.IO; -using System.Reflection; -using System.Runtime.ExceptionServices; using System.Text; namespace System @@ -13,7 +10,7 @@ public sealed class ApplicationId { private readonly byte[] _publicKeyToken; - public ApplicationId(byte[] publicKeyToken, string name, Version version, string processorArchitecture, string culture) + public ApplicationId(byte[] publicKeyToken, string name, Version version, string? processorArchitecture, string? culture) { if (name == null) throw new ArgumentNullException(nameof(name)); if (name.Length == 0) throw new ArgumentException(SR.Argument_EmptyApplicationName); @@ -27,11 +24,11 @@ public ApplicationId(byte[] publicKeyToken, string name, Version version, string Culture = culture; } - public string Culture { get; } + public string? Culture { get; } public string Name { get; } - public string ProcessorArchitecture { get; } + public string? ProcessorArchitecture { get; } public Version Version { get; } @@ -39,7 +36,9 @@ public ApplicationId(byte[] publicKeyToken, string name, Version version, string public ApplicationId Copy() => new ApplicationId(_publicKeyToken, Name, Version, ProcessorArchitecture, Culture); - public override string ToString () +#pragma warning disable CS8609 // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/23268 + public override string ToString() +#pragma warning restore CS8609 { Span charSpan = stackalloc char[128]; var sb = new ValueStringBuilder(charSpan); @@ -83,9 +82,9 @@ char HexDigit(int num) => (char)((num < 10) ? (num + '0') : (num + ('A' - 10))); } - public override bool Equals (object o) + public override bool Equals(object? o) { - ApplicationId other = (o as ApplicationId); + ApplicationId? other = o as ApplicationId; if (other == null) return false; diff --git a/src/System.Runtime.Extensions/src/System/CodeDom/Compiler/IndentedTextWriter.cs b/src/System.Runtime.Extensions/src/System/CodeDom/Compiler/IndentedTextWriter.cs index 16bb4d5b9ff2..160e059759a1 100644 --- a/src/System.Runtime.Extensions/src/System/CodeDom/Compiler/IndentedTextWriter.cs +++ b/src/System.Runtime.Extensions/src/System/CodeDom/Compiler/IndentedTextWriter.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System.Diagnostics; using System.IO; using System.Text; using System.Globalization; @@ -30,7 +29,7 @@ public IndentedTextWriter(TextWriter writer, string tabString) : base(CultureInf public override Encoding Encoding => _writer.Encoding; - public override string NewLine + public override string? NewLine // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/2384 { get { return _writer.NewLine; } set { _writer.NewLine = value; } @@ -60,7 +59,7 @@ protected virtual void OutputTabs() } } - public override void Write(string s) + public override void Write(string? s) { OutputTabs(); _writer.Write(s); @@ -78,7 +77,7 @@ public override void Write(char value) _writer.Write(value); } - public override void Write(char[] buffer) + public override void Write(char[]? buffer) { OutputTabs(); _writer.Write(buffer); @@ -114,36 +113,36 @@ public override void Write(long value) _writer.Write(value); } - public override void Write(object value) + public override void Write(object? value) { OutputTabs(); _writer.Write(value); } - public override void Write(string format, object arg0) + public override void Write(string format, object? arg0) { OutputTabs(); _writer.Write(format, arg0); } - public override void Write(string format, object arg0, object arg1) + public override void Write(string format, object? arg0, object? arg1) { OutputTabs(); _writer.Write(format, arg0, arg1); } - public override void Write(string format, params object[] arg) + public override void Write(string format, params object?[] arg) { OutputTabs(); _writer.Write(format, arg); } - public void WriteLineNoTabs(string s) + public void WriteLineNoTabs(string? s) { _writer.WriteLine(s); } - public override void WriteLine(string s) + public override void WriteLine(string? s) { OutputTabs(); _writer.WriteLine(s); @@ -171,7 +170,7 @@ public override void WriteLine(char value) _tabsPending = true; } - public override void WriteLine(char[] buffer) + public override void WriteLine(char[]? buffer) { OutputTabs(); _writer.WriteLine(buffer); @@ -213,28 +212,28 @@ public override void WriteLine(long value) _tabsPending = true; } - public override void WriteLine(object value) + public override void WriteLine(object? value) { OutputTabs(); _writer.WriteLine(value); _tabsPending = true; } - public override void WriteLine(string format, object arg0) + public override void WriteLine(string format, object? arg0) { OutputTabs(); _writer.WriteLine(format, arg0); _tabsPending = true; } - public override void WriteLine(string format, object arg0, object arg1) + public override void WriteLine(string format, object? arg0, object? arg1) { OutputTabs(); _writer.WriteLine(format, arg0, arg1); _tabsPending = true; } - public override void WriteLine(string format, params object[] arg) + public override void WriteLine(string format, params object?[] arg) { OutputTabs(); _writer.WriteLine(format, arg); diff --git a/src/System.Runtime.Extensions/src/System/Context.cs b/src/System.Runtime.Extensions/src/System/Context.cs index 737b01a06170..376198f1d538 100644 --- a/src/System.Runtime.Extensions/src/System/Context.cs +++ b/src/System.Runtime.Extensions/src/System/Context.cs @@ -6,7 +6,7 @@ namespace System { - public abstract class ContextBoundObject : System.MarshalByRefObject + public abstract class ContextBoundObject : MarshalByRefObject { protected ContextBoundObject() { } } @@ -19,11 +19,11 @@ public ContextMarshalException() : this(SR.Arg_ContextMarshalException, null) { } - public ContextMarshalException(string message) : this(message, null) + public ContextMarshalException(string? message) : this(message, null) { } - public ContextMarshalException(string message, Exception inner) : base(message, inner) + public ContextMarshalException(string? message, Exception? inner) : base(message, inner) { HResult = HResults.COR_E_CONTEXTMARSHAL; } @@ -34,7 +34,7 @@ protected ContextMarshalException(SerializationInfo info, StreamingContext conte } [AttributeUsage(AttributeTargets.Field, Inherited = false)] - public partial class ContextStaticAttribute : System.Attribute + public partial class ContextStaticAttribute : Attribute { public ContextStaticAttribute() { } } diff --git a/src/System.Runtime.Extensions/src/System/IO/BufferedStream.cs b/src/System.Runtime.Extensions/src/System/IO/BufferedStream.cs index 2c7f25af1dd9..259b3d1c71fb 100644 --- a/src/System.Runtime.Extensions/src/System/IO/BufferedStream.cs +++ b/src/System.Runtime.Extensions/src/System/IO/BufferedStream.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System.Runtime.InteropServices; using System.Diagnostics; using System.Threading; using System.Threading.Tasks; @@ -50,23 +49,23 @@ public sealed class BufferedStream : Stream private const int MaxShadowBufferSize = 81920; // Make sure not to get to the Large Object Heap. private const int DefaultBufferSize = 4096; - private Stream _stream; // Underlying stream. Close sets _stream to null. - private byte[] _buffer; // Shared read/write buffer. Alloc on first use. + private Stream? _stream; // Underlying stream. Close sets _stream to null. + private byte[]? _buffer; // Shared read/write buffer. Alloc on first use. private readonly int _bufferSize; // Length of internal buffer (not counting the shadow buffer). private int _readPos; // Read pointer within shared buffer. private int _readLen; // Number of bytes read in buffer from _stream. private int _writePos; // Write pointer within shared buffer. - private Task _lastSyncCompletedReadTask; // The last successful Task returned from ReadAsync + private Task? _lastSyncCompletedReadTask; // The last successful Task returned from ReadAsync // (perf optimization for successive reads of the same size) // Removing a private default constructor is a breaking change for the DataDebugSerializer. // Because this ctor was here previously we need to keep it around. - private SemaphoreSlim _asyncActiveSemaphore; + private SemaphoreSlim? _asyncActiveSemaphore; internal SemaphoreSlim LazyEnsureAsyncActiveSemaphoreInitialized() { // Lazily-initialize _asyncActiveSemaphore. As we're never accessing the SemaphoreSlim's // WaitHandle, we don't need to worry about Disposing it. - return LazyInitializer.EnsureInitialized(ref _asyncActiveSemaphore, () => new SemaphoreSlim(1, 1)); + return LazyInitializer.EnsureInitialized(ref _asyncActiveSemaphore, () => new SemaphoreSlim(1, 1))!; } public BufferedStream(Stream stream) @@ -146,7 +145,7 @@ private void EnsureBufferAllocated() _buffer = new byte[_bufferSize]; } - public Stream UnderlyingStream + public Stream? UnderlyingStream { get { @@ -195,7 +194,7 @@ public override long Length if (_writePos > 0) FlushWrite(); - return _stream.Length; + return _stream!.Length; } } @@ -207,7 +206,7 @@ public override long Position EnsureCanSeek(); Debug.Assert(!(_writePos > 0 && _readPos != _readLen), "Read and Write buffers cannot both have data in them at the same time."); - return _stream.Position + (_readPos - _readLen + _writePos); + return _stream!.Position + (_readPos - _readLen + _writePos); } set { @@ -222,7 +221,7 @@ public override long Position _readPos = 0; _readLen = 0; - _stream.Seek(value, SeekOrigin.Begin); + _stream!.Seek(value, SeekOrigin.Begin); } } @@ -293,7 +292,7 @@ public override void Flush() // If the underlying stream is not seekable AND we have something in the read buffer, then FlushRead would throw. // We can either throw away the buffer resulting in data loss (!) or ignore the Flush. // (We cannot throw because it would be a breaking change.) We opt into ignoring the Flush in that situation. - if (_stream.CanSeek) + if (_stream!.CanSeek) { FlushRead(); } @@ -310,7 +309,7 @@ public override void Flush() } // We had no data in the buffer, but we still need to tell the underlying stream to flush. - if (_stream.CanWrite) + if (_stream!.CanWrite) _stream.Flush(); _writePos = _readPos = _readLen = 0; @@ -381,6 +380,7 @@ private async Task FlushAsyncInternal(CancellationToken cancellationToken) // All write functions should call this function to ensure that the buffered data is not lost. private void FlushRead() { + Debug.Assert(_stream != null); Debug.Assert(_writePos == 0, "BufferedStream: Write buffer must be empty in FlushRead!"); if (_readPos - _readLen != 0) @@ -395,6 +395,7 @@ private void FlushRead() /// private void ClearReadBufferBeforeWrite() { + Debug.Assert(_stream != null); Debug.Assert(_readPos <= _readLen, "_readPos <= _readLen [" + _readPos + " <= " + _readLen + "]"); // No read data in the buffer: @@ -418,6 +419,7 @@ private void ClearReadBufferBeforeWrite() private void FlushWrite() { + Debug.Assert(_stream != null); Debug.Assert(_readPos == 0 && _readLen == 0, "BufferedStream: Read buffer must be empty in FlushWrite!"); Debug.Assert(_buffer != null && _bufferSize >= _writePos, @@ -430,7 +432,7 @@ private void FlushWrite() private async Task FlushWriteAsync(CancellationToken cancellationToken) { - + Debug.Assert(_stream != null); Debug.Assert(_readPos == 0 && _readLen == 0, "BufferedStream: Read buffer must be empty in FlushWrite!"); Debug.Assert(_buffer != null && _bufferSize >= _writePos, @@ -451,7 +453,7 @@ private int ReadFromBuffer(byte[] array, int offset, int count) if (readbytes > count) readbytes = count; - Buffer.BlockCopy(_buffer, _readPos, array, offset, readbytes); + Buffer.BlockCopy(_buffer!, _readPos, array, offset, readbytes); _readPos += readbytes; return readbytes; @@ -469,7 +471,7 @@ private int ReadFromBuffer(Span destination) return readbytes; } - private int ReadFromBuffer(byte[] array, int offset, int count, out Exception error) + private int ReadFromBuffer(byte[] array, int offset, int count, out Exception? error) { try { @@ -496,6 +498,7 @@ public override int Read(byte[] array, int offset, int count) EnsureNotClosed(); EnsureCanRead(); + Debug.Assert(_stream != null); int bytesFromBuffer = ReadFromBuffer(array, offset, count); @@ -533,7 +536,7 @@ public override int Read(byte[] array, int offset, int count) // Ok. We can fill the buffer: EnsureBufferAllocated(); - _readLen = _stream.Read(_buffer, 0, _bufferSize); + _readLen = _stream.Read(_buffer!, 0, _bufferSize); bytesFromBuffer = ReadFromBuffer(array, offset, count); @@ -551,6 +554,7 @@ public override int Read(Span destination) { EnsureNotClosed(); EnsureCanRead(); + Debug.Assert(_stream != null); // Try to read from the buffer. int bytesFromBuffer = ReadFromBuffer(destination); @@ -587,14 +591,14 @@ public override int Read(Span destination) { // Otherwise, fill the buffer, then read from that. EnsureBufferAllocated(); - _readLen = _stream.Read(_buffer, 0, _bufferSize); + _readLen = _stream.Read(_buffer!, 0, _bufferSize); return ReadFromBuffer(destination) + bytesFromBuffer; } } private Task LastSyncCompletedReadTask(int val) { - Task t = _lastSyncCompletedReadTask; + Task? t = _lastSyncCompletedReadTask; Debug.Assert(t == null || t.IsCompletedSuccessfully); if (t != null && t.Result == val) @@ -634,7 +638,7 @@ public override Task ReadAsync(byte[] buffer, int offset, int count, Cancel bool completeSynchronously = true; try { - Exception error; + Exception? error; bytesFromBuffer = ReadFromBuffer(buffer, offset, count, out error); // If we satisfied enough data from the buffer, we can complete synchronously. @@ -766,7 +770,7 @@ private async ValueTask ReadFromUnderlyingStreamAsync( } } - public override IAsyncResult BeginRead(byte[] buffer, int offset, int count, AsyncCallback callback, object state) => + public override IAsyncResult BeginRead(byte[] buffer, int offset, int count, AsyncCallback callback, object? state) => TaskToApm.Begin(ReadAsync(buffer, offset, count, CancellationToken.None), callback, state); public override int EndRead(IAsyncResult asyncResult) => @@ -775,7 +779,7 @@ public override int EndRead(IAsyncResult asyncResult) => public override int ReadByte() { return _readPos != _readLen ? - _buffer[_readPos++] : + _buffer![_readPos++] : ReadByteSlow(); } @@ -790,18 +794,19 @@ private int ReadByteSlow() // the stream is closed, its read buffer is flushed, so we'll take this slow path. EnsureNotClosed(); EnsureCanRead(); + Debug.Assert(_stream != null); if (_writePos > 0) FlushWrite(); EnsureBufferAllocated(); - _readLen = _stream.Read(_buffer, 0, _bufferSize); + _readLen = _stream.Read(_buffer!, 0, _bufferSize); _readPos = 0; if (_readLen == 0) return -1; - return _buffer[_readPos++]; + return _buffer![_readPos++]; } private void WriteToBuffer(byte[] array, ref int offset, ref int count) @@ -812,7 +817,7 @@ private void WriteToBuffer(byte[] array, ref int offset, ref int count) return; EnsureBufferAllocated(); - Buffer.BlockCopy(array, offset, _buffer, _writePos, bytesToWrite); + Buffer.BlockCopy(array, offset, _buffer!, _writePos, bytesToWrite); _writePos += bytesToWrite; count -= bytesToWrite; @@ -831,7 +836,7 @@ private int WriteToBuffer(ReadOnlySpan buffer) return bytesToWrite; } - private void WriteToBuffer(byte[] array, ref int offset, ref int count, out Exception error) + private void WriteToBuffer(byte[] array, ref int offset, ref int count, out Exception? error) { try { @@ -857,6 +862,7 @@ public override void Write(byte[] array, int offset, int count) EnsureNotClosed(); EnsureCanWrite(); + Debug.Assert(_stream != null); if (_writePos == 0) ClearReadBufferBeforeWrite(); @@ -984,6 +990,7 @@ public override void Write(ReadOnlySpan buffer) { EnsureNotClosed(); EnsureCanWrite(); + Debug.Assert(_stream != null); if (_writePos == 0) { @@ -1202,7 +1209,7 @@ private async Task WriteToUnderlyingStreamAsync( } } - public override IAsyncResult BeginWrite(byte[] buffer, int offset, int count, AsyncCallback callback, object state) => + public override IAsyncResult BeginWrite(byte[] buffer, int offset, int count, AsyncCallback callback, object? state) => TaskToApm.Begin(WriteAsync(buffer, offset, count, CancellationToken.None), callback, state); public override void EndWrite(IAsyncResult asyncResult) => @@ -1223,7 +1230,7 @@ public override void WriteByte(byte value) if (_writePos >= _bufferSize - 1) FlushWrite(); - _buffer[_writePos++] = value; + _buffer![_writePos++] = value; Debug.Assert(_writePos < _bufferSize); } @@ -1232,6 +1239,7 @@ public override long Seek(long offset, SeekOrigin origin) { EnsureNotClosed(); EnsureCanSeek(); + Debug.Assert(_stream != null); // If we have bytes in the write buffer, flush them out, seek and be done. if (_writePos > 0) @@ -1285,6 +1293,7 @@ public override void SetLength(long value) EnsureNotClosed(); EnsureCanSeek(); EnsureCanWrite(); + Debug.Assert(_stream != null); Flush(); _stream.SetLength(value); @@ -1293,6 +1302,7 @@ public override void SetLength(long value) public override void CopyTo(Stream destination, int bufferSize) { StreamHelpers.ValidateCopyToArgs(this, destination, bufferSize); + Debug.Assert(_stream != null); int readBytes = _readLen - _readPos; Debug.Assert(readBytes >= 0, $"Expected a non-negative number of bytes in buffer, got {readBytes}"); @@ -1301,7 +1311,7 @@ public override void CopyTo(Stream destination, int bufferSize) { // If there's any read data in the buffer, write it all to the destination stream. Debug.Assert(_writePos == 0, "Write buffer must be empty if there's data in the read buffer"); - destination.Write(_buffer, _readPos, readBytes); + destination.Write(_buffer!, _readPos, readBytes); _readPos = _readLen = 0; } else if (_writePos > 0) @@ -1324,6 +1334,8 @@ public override Task CopyToAsync(Stream destination, int bufferSize, Cancellatio private async Task CopyToAsyncCore(Stream destination, int bufferSize, CancellationToken cancellationToken) { + Debug.Assert(_stream != null); + // Synchronize async operations as does Read/WriteAsync. await LazyEnsureAsyncActiveSemaphoreInitialized().WaitAsync().ConfigureAwait(false); try @@ -1347,7 +1359,7 @@ private async Task CopyToAsyncCore(Stream destination, int bufferSize, Cancellat // Our buffer is now clear. Copy data directly from the source stream to the destination stream. await _stream.CopyToAsync(destination, bufferSize, cancellationToken).ConfigureAwait(false); } - finally { _asyncActiveSemaphore.Release(); } + finally { _asyncActiveSemaphore!.Release(); } } } // class BufferedStream } // namespace diff --git a/src/System.Runtime.Extensions/src/System/IO/InvalidDataException.cs b/src/System.Runtime.Extensions/src/System/IO/InvalidDataException.cs index cf43001aa784..5d380caff065 100644 --- a/src/System.Runtime.Extensions/src/System/IO/InvalidDataException.cs +++ b/src/System.Runtime.Extensions/src/System/IO/InvalidDataException.cs @@ -15,12 +15,12 @@ public InvalidDataException() { } - public InvalidDataException(string message) + public InvalidDataException(string? message) : base(message) { } - public InvalidDataException(string message, Exception innerException) + public InvalidDataException(string? message, Exception? innerException) : base(message, innerException) { } diff --git a/src/System.Runtime.Extensions/src/System/IO/StringReader.cs b/src/System.Runtime.Extensions/src/System/IO/StringReader.cs index be884994a9cd..cbaad153e4d3 100644 --- a/src/System.Runtime.Extensions/src/System/IO/StringReader.cs +++ b/src/System.Runtime.Extensions/src/System/IO/StringReader.cs @@ -10,18 +10,13 @@ namespace System.IO // This class implements a text reader that reads from a string. public class StringReader : TextReader { - private string _s; + private string? _s; private int _pos; private int _length; public StringReader(string s) { - if (s == null) - { - throw new ArgumentNullException(nameof(s)); - } - - _s = s; + _s = s ?? throw new ArgumentNullException(nameof(s)); _length = s.Length; } @@ -174,7 +169,7 @@ public override string ReadToEnd() // contain the terminating carriage return and/or line feed. The returned // value is null if the end of the underlying string has been reached. // - public override string ReadLine() + public override string? ReadLine() { if (_s == null) { @@ -211,7 +206,7 @@ public override string ReadLine() } #region Task based Async APIs - public override Task ReadLineAsync() + public override Task ReadLineAsync() { return Task.FromResult(ReadLine()); } diff --git a/src/System.Runtime.Extensions/src/System/IO/StringWriter.cs b/src/System.Runtime.Extensions/src/System/IO/StringWriter.cs index 98e79391c9da..cd885d8171f2 100644 --- a/src/System.Runtime.Extensions/src/System/IO/StringWriter.cs +++ b/src/System.Runtime.Extensions/src/System/IO/StringWriter.cs @@ -13,7 +13,7 @@ namespace System.IO // the resulting sequence of characters to be presented as a string. public class StringWriter : TextWriter { - private static volatile UnicodeEncoding s_encoding = null; + private static volatile UnicodeEncoding? s_encoding = null; private StringBuilder _sb; private bool _isOpen; @@ -25,7 +25,7 @@ public StringWriter() { } - public StringWriter(IFormatProvider formatProvider) + public StringWriter(IFormatProvider? formatProvider) : this(new StringBuilder(), formatProvider) { } @@ -36,7 +36,7 @@ public StringWriter(StringBuilder sb) : this(sb, CultureInfo.CurrentCulture) { } - public StringWriter(StringBuilder sb, IFormatProvider formatProvider) : base(formatProvider) + public StringWriter(StringBuilder sb, IFormatProvider? formatProvider) : base(formatProvider) { if (sb == null) { @@ -146,7 +146,7 @@ public override void Write(ReadOnlySpan buffer) // Writes a string to the underlying string buffer. If the given string is // null, nothing is written. // - public override void Write(string value) + public override void Write(string? value) { if (!_isOpen) { @@ -159,7 +159,7 @@ public override void Write(string value) } } - public override void Write(StringBuilder value) + public override void Write(StringBuilder? value) { if (GetType() != typeof(StringWriter)) { @@ -196,7 +196,7 @@ public override void WriteLine(ReadOnlySpan buffer) WriteLine(); } - public override void WriteLine(StringBuilder value) + public override void WriteLine(StringBuilder? value) { if (GetType() != typeof(StringWriter)) { @@ -223,7 +223,7 @@ public override Task WriteAsync(char value) return Task.CompletedTask; } - public override Task WriteAsync(string value) + public override Task WriteAsync(string? value) { Write(value); return Task.CompletedTask; @@ -246,7 +246,7 @@ public override Task WriteAsync(ReadOnlyMemory buffer, CancellationToken c return Task.CompletedTask; } - public override Task WriteAsync(StringBuilder value, CancellationToken cancellationToken = default) + public override Task WriteAsync(StringBuilder? value, CancellationToken cancellationToken = default) { if (GetType() != typeof(StringWriter)) { @@ -275,13 +275,13 @@ public override Task WriteLineAsync(char value) return Task.CompletedTask; } - public override Task WriteLineAsync(string value) + public override Task WriteLineAsync(string? value) { WriteLine(value); return Task.CompletedTask; } - public override Task WriteLineAsync(StringBuilder value, CancellationToken cancellationToken = default) + public override Task WriteLineAsync(StringBuilder? value, CancellationToken cancellationToken = default) { if (GetType() != typeof(StringWriter)) { @@ -326,13 +326,13 @@ public override Task FlushAsync() { return Task.CompletedTask; } - + #endregion - // Returns a string containing the characters written to this TextWriter - // so far. - // + // Returns a string containing the characters written to this TextWriter so far. +#pragma warning disable CS8609 // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/23268 public override string ToString() +#pragma warning restore CS8609 { return _sb.ToString(); } diff --git a/src/System.Runtime.Extensions/src/System/Net/WebUtility.cs b/src/System.Runtime.Extensions/src/System/Net/WebUtility.cs index e4c65d401a8a..ec35101cf3c6 100644 --- a/src/System.Runtime.Extensions/src/System/Net/WebUtility.cs +++ b/src/System.Runtime.Extensions/src/System/Net/WebUtility.cs @@ -5,8 +5,6 @@ // Don't entity encode high chars (160 to 256) #define ENTITY_ENCODE_HIGH_ASCII_CHARS -using System; -using System.Buffers; using System.Collections.Generic; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; @@ -32,7 +30,7 @@ public static class WebUtility #region HtmlEncode / HtmlDecode methods - public static string HtmlEncode(string value) + public static string? HtmlEncode(string? value) // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 { if (string.IsNullOrEmpty(value)) { @@ -66,7 +64,7 @@ public static string HtmlEncode(string value) return sb.ToString(); } - public static void HtmlEncode(string value, TextWriter output) + public static void HtmlEncode(string? value, TextWriter output) { if (output == null) { @@ -184,7 +182,7 @@ private static void HtmlEncode(ReadOnlySpan input, ref ValueStringBuilder } } - public static string HtmlDecode(string value) + public static string? HtmlDecode(string? value) // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 { if (string.IsNullOrEmpty(value)) { @@ -214,7 +212,7 @@ public static string HtmlDecode(string value) return sb.ToString(); } - public static void HtmlDecode(string value, TextWriter output) + public static void HtmlDecode(string? value, TextWriter output) { if (output == null) { @@ -405,7 +403,7 @@ private static void GetEncodedBytes(byte[] originalBytes, int offset, int count, #region UrlEncode public methods [SuppressMessage("Microsoft.Design", "CA1055:UriReturnValuesShouldNotBeStrings", Justification = "Already shipped public API; code moved here as part of API consolidation")] - public static string UrlEncode(string value) + public static string? UrlEncode(string? value) // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 { if (string.IsNullOrEmpty(value)) return value; @@ -456,7 +454,7 @@ public static string UrlEncode(string value) return Encoding.UTF8.GetString(newBytes); } - public static byte[] UrlEncodeToBytes(byte[] value, int offset, int count) + public static byte[]? UrlEncodeToBytes(byte[]? value, int offset, int count) // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 { if (!ValidateUrlEncodingParameters(value, offset, count)) { @@ -469,7 +467,7 @@ public static byte[] UrlEncodeToBytes(byte[] value, int offset, int count) // count them first for (int i = 0; i < count; i++) { - char ch = (char)value[offset + i]; + char ch = (char)value![offset + i]; if (ch == ' ') foundSpaces = true; @@ -481,13 +479,13 @@ public static byte[] UrlEncodeToBytes(byte[] value, int offset, int count) if (!foundSpaces && unsafeCount == 0) { var subarray = new byte[count]; - Buffer.BlockCopy(value, offset, subarray, 0, count); + Buffer.BlockCopy(value!, offset, subarray, 0, count); return subarray; } // expand not 'safe' characters into %XX, spaces to +s byte[] expandedBytes = new byte[count + unsafeCount * 2]; - GetEncodedBytes(value, offset, count, expandedBytes); + GetEncodedBytes(value!, offset, count, expandedBytes); return expandedBytes; } @@ -495,7 +493,7 @@ public static byte[] UrlEncodeToBytes(byte[] value, int offset, int count) #region UrlDecode implementation - private static string UrlDecodeInternal(string value, Encoding encoding) + private static string? UrlDecodeInternal(string? value, Encoding encoding) // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 { if (string.IsNullOrEmpty(value)) { @@ -557,7 +555,7 @@ private static string UrlDecodeInternal(string value, Encoding encoding) return helper.GetString(); } - private static byte[] UrlDecodeInternal(byte[] bytes, int offset, int count) + private static byte[]? UrlDecodeInternal(byte[]? bytes, int offset, int count) // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 { if (!ValidateUrlEncodingParameters(bytes, offset, count)) { @@ -570,7 +568,7 @@ private static byte[] UrlDecodeInternal(byte[] bytes, int offset, int count) for (int i = 0; i < count; i++) { int pos = offset + i; - byte b = bytes[pos]; + byte b = bytes![pos]; if (b == '+') { @@ -593,7 +591,7 @@ private static byte[] UrlDecodeInternal(byte[] bytes, int offset, int count) if (decodedBytesCount < decodedBytes.Length) { - Array.Resize(ref decodedBytes, decodedBytesCount); + Array.Resize(ref decodedBytes!, decodedBytesCount); // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 } return decodedBytes; @@ -605,12 +603,12 @@ private static byte[] UrlDecodeInternal(byte[] bytes, int offset, int count) [SuppressMessage("Microsoft.Design", "CA1055:UriReturnValuesShouldNotBeStrings", Justification = "Already shipped public API; code moved here as part of API consolidation")] - public static string UrlDecode(string encodedValue) + public static string? UrlDecode(string? encodedValue) // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 { return UrlDecodeInternal(encodedValue, Encoding.UTF8); } - public static byte[] UrlDecodeToBytes(byte[] encodedValue, int offset, int count) + public static byte[]? UrlDecodeToBytes(byte[]? encodedValue, int offset, int count) // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 { return UrlDecodeInternal(encodedValue, offset, count); } @@ -719,7 +717,7 @@ private static bool IsUrlSafeChar(char ch) } } - private static bool ValidateUrlEncodingParameters(byte[] bytes, int offset, int count) + private static bool ValidateUrlEncodingParameters(byte[]? bytes, int offset, int count) { if (bytes == null && count == 0) return false; @@ -763,11 +761,11 @@ private struct UrlDecoder // Accumulate characters in a special array private int _numChars; - private char[] _charBuffer; + private char[]? _charBuffer; // Accumulate bytes for decoding into characters in a special array private int _numBytes; - private byte[] _byteBuffer; + private byte[]? _byteBuffer; // Encoding to convert chars to bytes private Encoding _encoding; @@ -778,7 +776,7 @@ private void FlushBytes() if (_charBuffer == null) _charBuffer = new char[_bufferSize]; - _numChars += _encoding.GetChars(_byteBuffer, 0, _numBytes, _charBuffer, _numChars); + _numChars += _encoding.GetChars(_byteBuffer!, 0, _numBytes, _charBuffer, _numChars); _numBytes = 0; } @@ -819,7 +817,7 @@ internal string GetString() FlushBytes(); Debug.Assert(_numChars > 0); - return new string(_charBuffer, 0, _numChars); + return new string(_charBuffer!, 0, _numChars); } } diff --git a/src/System.Runtime.Extensions/src/System/Reflection/AssemblyNameProxy.cs b/src/System.Runtime.Extensions/src/System/Reflection/AssemblyNameProxy.cs index a9337af605f5..3a2e27aec191 100644 --- a/src/System.Runtime.Extensions/src/System/Reflection/AssemblyNameProxy.cs +++ b/src/System.Runtime.Extensions/src/System/Reflection/AssemblyNameProxy.cs @@ -2,10 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -namespace System.Reflection { - using System; - using System.Runtime.Versioning; - +namespace System.Reflection +{ public class AssemblyNameProxy : MarshalByRefObject { public AssemblyName GetAssemblyName(string assemblyFile) diff --git a/src/System.Runtime.Extensions/src/System/Runtime/CompilerServices/SwitchExpressionException.cs b/src/System.Runtime.Extensions/src/System/Runtime/CompilerServices/SwitchExpressionException.cs index b19af26cef90..51f4520a2f55 100644 --- a/src/System.Runtime.Extensions/src/System/Runtime/CompilerServices/SwitchExpressionException.cs +++ b/src/System.Runtime.Extensions/src/System/Runtime/CompilerServices/SwitchExpressionException.cs @@ -17,10 +17,10 @@ public sealed class SwitchExpressionException : InvalidOperationException public SwitchExpressionException() : base(SR.Arg_SwitchExpressionException) { } - public SwitchExpressionException(Exception innerException) : + public SwitchExpressionException(Exception? innerException) : base(SR.Arg_SwitchExpressionException, innerException) { } - public SwitchExpressionException(object unmatchedValue) : this() + public SwitchExpressionException(object? unmatchedValue) : this() { UnmatchedValue = unmatchedValue; } @@ -31,12 +31,12 @@ private SwitchExpressionException(SerializationInfo info, StreamingContext conte UnmatchedValue = info.GetValue(nameof(UnmatchedValue), typeof(object)); } - public SwitchExpressionException(string message) : base(message) { } + public SwitchExpressionException(string? message) : base(message) { } - public SwitchExpressionException(string message, Exception innerException) + public SwitchExpressionException(string? message, Exception? innerException) : base(message, innerException) { } - public object UnmatchedValue { get; } + public object? UnmatchedValue { get; } public override void GetObjectData(SerializationInfo info, StreamingContext context) { @@ -52,6 +52,7 @@ public override string Message { return base.Message; } + string valueMessage = SR.Format(SR.SwitchExpressionException_UnmatchedValue, UnmatchedValue); return base.Message + Environment.NewLine + valueMessage; } diff --git a/src/System.Runtime.Extensions/src/System/Runtime/Versioning/FrameworkName.cs b/src/System.Runtime.Extensions/src/System/Runtime/Versioning/FrameworkName.cs index 4bf249ff1d70..811d32df5e69 100644 --- a/src/System.Runtime.Extensions/src/System/Runtime/Versioning/FrameworkName.cs +++ b/src/System.Runtime.Extensions/src/System/Runtime/Versioning/FrameworkName.cs @@ -6,12 +6,12 @@ namespace System.Runtime.Versioning { - public sealed class FrameworkName : IEquatable + public sealed class FrameworkName : IEquatable { private readonly string _identifier; - private readonly Version _version; + private readonly Version _version = null!; private readonly string _profile; - private string _fullName; + private string? _fullName; private const char ComponentSeparator = ','; private const char KeyValueSeparator = '='; @@ -71,19 +71,20 @@ public string FullName Profile; } } + Debug.Assert(_fullName != null); return _fullName; } } - public override bool Equals(object obj) + public override bool Equals(object? obj) { return Equals(obj as FrameworkName); } - public bool Equals(FrameworkName other) + public bool Equals(FrameworkName? other) { - if (object.ReferenceEquals(other, null)) + if (other is null) { return false; } @@ -98,7 +99,9 @@ public override int GetHashCode() return Identifier.GetHashCode() ^ Version.GetHashCode() ^ Profile.GetHashCode(); } +#pragma warning disable CS8609 // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/23268 public override string ToString() +#pragma warning restore CS8609 { return FullName; } @@ -108,7 +111,7 @@ public FrameworkName(string identifier, Version version) { } - public FrameworkName(string identifier, Version version, string profile) + public FrameworkName(string identifier, Version version, string? profile) { if (identifier == null) { @@ -227,16 +230,17 @@ public FrameworkName(string frameworkName) } } - public static bool operator ==(FrameworkName left, FrameworkName right) + public static bool operator ==(FrameworkName? left, FrameworkName? right) { - if (object.ReferenceEquals(left, null)) + if (left is null) { - return object.ReferenceEquals(right, null); + return right is null; } + return left.Equals(right); } - public static bool operator !=(FrameworkName left, FrameworkName right) + public static bool operator !=(FrameworkName? left, FrameworkName? right) { return !(left == right); } diff --git a/src/System.Runtime.Extensions/src/System/Runtime/Versioning/VersioningHelper.cs b/src/System.Runtime.Extensions/src/System/Runtime/Versioning/VersioningHelper.cs index 42fc9d88f19c..bbebb8d5e316 100644 --- a/src/System.Runtime.Extensions/src/System/Runtime/Versioning/VersioningHelper.cs +++ b/src/System.Runtime.Extensions/src/System/Runtime/Versioning/VersioningHelper.cs @@ -25,12 +25,12 @@ public static partial class VersioningHelper private const ResourceScope ResTypeMask = ResourceScope.Machine | ResourceScope.Process | ResourceScope.AppDomain | ResourceScope.Library; private const ResourceScope VisibilityMask = ResourceScope.Private | ResourceScope.Assembly; - public static string MakeVersionSafeName(string name, ResourceScope from, ResourceScope to) + public static string MakeVersionSafeName(string? name, ResourceScope from, ResourceScope to) { - return MakeVersionSafeName(name, from, to, null); + return MakeVersionSafeName(name, from, to, type: null); } - public static string MakeVersionSafeName(string name, ResourceScope from, ResourceScope to, Type type) + public static string MakeVersionSafeName(string? name, ResourceScope from, ResourceScope to, Type? type) { ResourceScope fromResType = from & ResTypeMask; ResourceScope toResType = to & ResTypeMask; @@ -68,12 +68,12 @@ public static string MakeVersionSafeName(string name, ResourceScope from, Resour if ((requires & SxSRequirements.TypeName) != 0) { safeName.Append(separator); - safeName.Append(type.Name); + safeName.Append(type!.Name); } if ((requires & SxSRequirements.AssemblyName) != 0) { safeName.Append(separator); - safeName.Append(type.Assembly.FullName); + safeName.Append(type!.Assembly.FullName); } return safeName.ToString(); } diff --git a/src/System.Runtime.Extensions/src/System/Security/Permissions/SecurityAttribute.cs b/src/System.Runtime.Extensions/src/System/Security/Permissions/SecurityAttribute.cs index 73c0f891b882..090893761d6d 100644 --- a/src/System.Runtime.Extensions/src/System/Security/Permissions/SecurityAttribute.cs +++ b/src/System.Runtime.Extensions/src/System/Security/Permissions/SecurityAttribute.cs @@ -10,6 +10,6 @@ public abstract partial class SecurityAttribute : Attribute protected SecurityAttribute(SecurityAction action) { } public SecurityAction Action { get; set; } public bool Unrestricted { get; set; } - public abstract IPermission CreatePermission(); + public abstract IPermission? CreatePermission(); } } diff --git a/src/System.Runtime.Extensions/src/System/Security/Permissions/SecurityPermissionAttribute.cs b/src/System.Runtime.Extensions/src/System/Security/Permissions/SecurityPermissionAttribute.cs index d7a896ec0154..e1e74c4166a0 100644 --- a/src/System.Runtime.Extensions/src/System/Security/Permissions/SecurityPermissionAttribute.cs +++ b/src/System.Runtime.Extensions/src/System/Security/Permissions/SecurityPermissionAttribute.cs @@ -23,6 +23,6 @@ public SecurityPermissionAttribute(SecurityAction action) : base(default(Securit public bool SerializationFormatter { get; set; } public bool SkipVerification { get; set; } public bool UnmanagedCode { get; set; } - public override IPermission CreatePermission() { return default(IPermission); } + public override IPermission? CreatePermission() { return null; } } } From 789f770a67472896d69f77b9516dff12f8270eac Mon Sep 17 00:00:00 2001 From: Stephen Toub Date: Wed, 17 Apr 2019 17:25:55 -0400 Subject: [PATCH 273/607] Nullable: System.Memory.dll --- .../src/System/Buffers/ArrayBufferWriter.cs | 2 +- src/System.Memory/src/System.Memory.csproj | 1 + .../ArrayMemoryPool.ArrayMemoryPoolBuffer.cs | 8 +-- .../Buffers/ReadOnlySequence.Helpers.cs | 68 +++++++++---------- .../src/System/Buffers/ReadOnlySequence.cs | 62 ++++++++--------- .../System/Buffers/ReadOnlySequenceSegment.cs | 2 +- .../InteropServices/SequenceMarshal.cs | 8 +-- .../src/System/SequencePosition.cs | 8 +-- src/System.Memory/src/System/ThrowHelper.cs | 8 +-- 9 files changed, 84 insertions(+), 83 deletions(-) diff --git a/src/Common/src/System/Buffers/ArrayBufferWriter.cs b/src/Common/src/System/Buffers/ArrayBufferWriter.cs index 862092fd73b4..910b5421daa5 100644 --- a/src/Common/src/System/Buffers/ArrayBufferWriter.cs +++ b/src/Common/src/System/Buffers/ArrayBufferWriter.cs @@ -176,7 +176,7 @@ private void CheckAndResizeBuffer(int sizeHint) int newSize = checked(_buffer.Length + growBy); - Array.Resize(ref _buffer, newSize); + Array.Resize(ref _buffer!, newSize); // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 } Debug.Assert(FreeCapacity > 0 && FreeCapacity >= sizeHint); diff --git a/src/System.Memory/src/System.Memory.csproj b/src/System.Memory/src/System.Memory.csproj index f96c558a325d..e393188ac2c4 100644 --- a/src/System.Memory/src/System.Memory.csproj +++ b/src/System.Memory/src/System.Memory.csproj @@ -3,6 +3,7 @@ {4BBC8F69-D03E-4432-AA8A-D458FA5B235A} true true + enable netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release;uapaot-Windows_NT-Debug;uapaot-Windows_NT-Release $(DefineConstants);MAKE_ABW_PUBLIC diff --git a/src/System.Memory/src/System/Buffers/ArrayMemoryPool.ArrayMemoryPoolBuffer.cs b/src/System.Memory/src/System/Buffers/ArrayMemoryPool.ArrayMemoryPoolBuffer.cs index b3a28701b60d..b02a0994b816 100644 --- a/src/System.Memory/src/System/Buffers/ArrayMemoryPool.ArrayMemoryPoolBuffer.cs +++ b/src/System.Memory/src/System/Buffers/ArrayMemoryPool.ArrayMemoryPoolBuffer.cs @@ -8,7 +8,7 @@ internal sealed partial class ArrayMemoryPool : MemoryPool { private sealed class ArrayMemoryPoolBuffer : IMemoryOwner { - private T[] _array; + private T[]? _array; public ArrayMemoryPoolBuffer(int size) { @@ -19,19 +19,19 @@ public Memory Memory { get { - T[] array = _array; + T[]? array = _array; if (array == null) { ThrowHelper.ThrowObjectDisposedException_ArrayMemoryPoolBuffer(); } - return new Memory(array); + return new Memory(array!); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 } } public void Dispose() { - T[] array = _array; + T[]? array = _array; if (array != null) { _array = null; diff --git a/src/System.Memory/src/System/Buffers/ReadOnlySequence.Helpers.cs b/src/System.Memory/src/System/Buffers/ReadOnlySequence.Helpers.cs index 4612016a0b43..6b4331b43eb3 100644 --- a/src/System.Memory/src/System/Buffers/ReadOnlySequence.Helpers.cs +++ b/src/System.Memory/src/System/Buffers/ReadOnlySequence.Helpers.cs @@ -14,7 +14,7 @@ public readonly partial struct ReadOnlySequence [MethodImpl(MethodImplOptions.AggressiveInlining)] internal bool TryGetBuffer(in SequencePosition position, out ReadOnlyMemory memory, out SequencePosition next) { - object positionObject = position.GetObject(); + object? positionObject = position.GetObject(); next = default; if (positionObject == null) @@ -24,7 +24,7 @@ internal bool TryGetBuffer(in SequencePosition position, out ReadOnlyMemory m } SequenceType type = GetSequenceType(); - object endObject = _endObject; + object? endObject = _endObject; int startIndex = GetIndex(position); int endIndex = GetIndex(_endInteger); @@ -36,12 +36,12 @@ internal bool TryGetBuffer(in SequencePosition position, out ReadOnlyMemory m if (startSegment != endObject) { - ReadOnlySequenceSegment nextSegment = startSegment.Next; + ReadOnlySequenceSegment? nextSegment = startSegment.Next; if (nextSegment == null) ThrowHelper.ThrowInvalidOperationException_EndPositionNotReached(); - next = new SequencePosition(nextSegment, 0); + next = new SequencePosition(nextSegment!, 0); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 memory = startSegment.Memory.Slice(startIndex); } else @@ -81,7 +81,7 @@ internal bool TryGetBuffer(in SequencePosition position, out ReadOnlyMemory m [MethodImpl(MethodImplOptions.AggressiveInlining)] private ReadOnlyMemory GetFirstBuffer() { - object startObject = _startObject; + object? startObject = _startObject; if (startObject == null) return default; @@ -157,7 +157,7 @@ private ReadOnlyMemory GetFirstBufferSlow(object startObject, bool isMultiSeg [MethodImpl(MethodImplOptions.AggressiveInlining)] private ReadOnlySpan GetFirstSpan() { - object startObject = _startObject; + object? startObject = _startObject; if (startObject == null) return default; @@ -235,8 +235,8 @@ private ReadOnlySpan GetFirstSpanSlow(object startObject, bool isMultiSegment [MethodImpl(MethodImplOptions.AggressiveInlining)] internal SequencePosition Seek(long offset, ExceptionArgument exceptionArgument = ExceptionArgument.offset) { - object startObject = _startObject; - object endObject = _endObject; + object? startObject = _startObject; + object? endObject = _endObject; int startIndex = GetIndex(_startInteger); int endIndex = GetIndex(_endInteger); @@ -255,7 +255,7 @@ internal SequencePosition Seek(long offset, ExceptionArgument exceptionArgument ThrowHelper.ThrowArgumentOutOfRangeException_PositionOutOfRange(); // End of segment. Move to start of next. - return SeekMultiSegment(startSegment.Next, endObject, endIndex, offset - currentLength, exceptionArgument); + return SeekMultiSegment(startSegment.Next!, endObject!, endIndex, offset - currentLength, exceptionArgument); } Debug.Assert(startObject == endObject); @@ -271,8 +271,8 @@ internal SequencePosition Seek(long offset, ExceptionArgument exceptionArgument [MethodImpl(MethodImplOptions.AggressiveInlining)] private SequencePosition Seek(in SequencePosition start, long offset) { - object startObject = start.GetObject(); - object endObject = _endObject; + object? startObject = start.GetObject(); + object? endObject = _endObject; int startIndex = GetIndex(start); int endIndex = GetIndex(_endInteger); @@ -291,7 +291,7 @@ private SequencePosition Seek(in SequencePosition start, long offset) ThrowHelper.ThrowArgumentOutOfRangeException_PositionOutOfRange(); // End of segment. Move to start of next. - return SeekMultiSegment(startSegment.Next, endObject, endIndex, offset - currentLength, ExceptionArgument.offset); + return SeekMultiSegment(startSegment.Next!, endObject!, endIndex, offset - currentLength, ExceptionArgument.offset); } Debug.Assert(startObject == endObject); @@ -305,9 +305,9 @@ private SequencePosition Seek(in SequencePosition start, long offset) } [MethodImpl(MethodImplOptions.NoInlining)] - private static SequencePosition SeekMultiSegment(ReadOnlySequenceSegment currentSegment, object endObject, int endIndex, long offset, ExceptionArgument argument) + private static SequencePosition SeekMultiSegment(ReadOnlySequenceSegment? currentSegment, object endObject, int endIndex, long offset, ExceptionArgument argument) { - Debug.Assert(currentSegment != null); + Debug.Assert(currentSegment != null); // currentSegment parameter is marked as nullable as the parameter is reused/reassigned in the body Debug.Assert(offset >= 0); while (currentSegment != null && currentSegment != endObject) @@ -335,8 +335,8 @@ private void BoundsCheck(in SequencePosition position) { uint sliceStartIndex = (uint)GetIndex(position); - object startObject = _startObject; - object endObject = _endObject; + object? startObject = _startObject; + object? endObject = _endObject; uint startIndex = (uint)GetIndex(_startInteger); uint endIndex = (uint)GetIndex(_endInteger); @@ -353,21 +353,21 @@ private void BoundsCheck(in SequencePosition position) { // Multi-Segment Sequence // Storing this in a local since it is used twice within InRange() - ulong startRange = (ulong)(((ReadOnlySequenceSegment)startObject).RunningIndex + startIndex); + ulong startRange = (ulong)(((ReadOnlySequenceSegment)startObject!).RunningIndex + startIndex); if (!InRange( - (ulong)(((ReadOnlySequenceSegment)position.GetObject()).RunningIndex + sliceStartIndex), + (ulong)(((ReadOnlySequenceSegment)position.GetObject()!).RunningIndex + sliceStartIndex), startRange, - (ulong)(((ReadOnlySequenceSegment)endObject).RunningIndex + endIndex))) + (ulong)(((ReadOnlySequenceSegment)endObject!).RunningIndex + endIndex))) { ThrowHelper.ThrowArgumentOutOfRangeException_PositionOutOfRange(); } } } - private void BoundsCheck(uint sliceStartIndex, object sliceStartObject, uint sliceEndIndex, object sliceEndObject) + private void BoundsCheck(uint sliceStartIndex, object? sliceStartObject, uint sliceEndIndex, object? sliceEndObject) { - object startObject = _startObject; - object endObject = _endObject; + object? startObject = _startObject; + object? endObject = _endObject; uint startIndex = (uint)GetIndex(_startInteger); uint endIndex = (uint)GetIndex(_endInteger); @@ -390,14 +390,14 @@ private void BoundsCheck(uint sliceStartIndex, object sliceStartObject, uint sli // This optimization works because we know sliceStartIndex, sliceEndIndex, startIndex, and endIndex are all >= 0 Debug.Assert(sliceStartIndex >= 0 && startIndex >= 0 && endIndex >= 0); - ulong sliceStartRange = (ulong)(((ReadOnlySequenceSegment)sliceStartObject).RunningIndex + sliceStartIndex); - ulong sliceEndRange = (ulong)(((ReadOnlySequenceSegment)sliceEndObject).RunningIndex + sliceEndIndex); + ulong sliceStartRange = (ulong)(((ReadOnlySequenceSegment)sliceStartObject!).RunningIndex + sliceStartIndex); + ulong sliceEndRange = (ulong)(((ReadOnlySequenceSegment)sliceEndObject!).RunningIndex + sliceEndIndex); if (sliceStartRange > sliceEndRange) ThrowHelper.ThrowArgumentOutOfRangeException_PositionOutOfRange(); - if (sliceStartRange < (ulong)(((ReadOnlySequenceSegment)startObject).RunningIndex + startIndex) - || sliceEndRange > (ulong)(((ReadOnlySequenceSegment)endObject).RunningIndex + endIndex)) + if (sliceStartRange < (ulong)(((ReadOnlySequenceSegment)startObject!).RunningIndex + startIndex) + || sliceEndRange > (ulong)(((ReadOnlySequenceSegment)endObject!).RunningIndex + endIndex)) { ThrowHelper.ThrowArgumentOutOfRangeException_PositionOutOfRange(); } @@ -483,15 +483,15 @@ private ReadOnlySequence SliceImpl(in SequencePosition start) [MethodImpl(MethodImplOptions.AggressiveInlining)] private long GetLength() { - object startObject = _startObject; - object endObject = _endObject; + object? startObject = _startObject; + object? endObject = _endObject; int startIndex = GetIndex(_startInteger); int endIndex = GetIndex(_endInteger); if (startObject != endObject) { - var startSegment = (ReadOnlySequenceSegment)startObject; - var endSegment = (ReadOnlySequenceSegment)endObject; + var startSegment = (ReadOnlySequenceSegment)startObject!; + var endSegment = (ReadOnlySequenceSegment)endObject!; // (End offset) - (start offset) return (endSegment.RunningIndex + endIndex) - (startSegment.RunningIndex + startIndex); } @@ -500,9 +500,9 @@ private long GetLength() return endIndex - startIndex; } - internal bool TryGetReadOnlySequenceSegment(out ReadOnlySequenceSegment startSegment, out int startIndex, out ReadOnlySequenceSegment endSegment, out int endIndex) + internal bool TryGetReadOnlySequenceSegment(out ReadOnlySequenceSegment? startSegment, out int startIndex, out ReadOnlySequenceSegment? endSegment, out int endIndex) { - object startObject = _startObject; + object? startObject = _startObject; // Default or not MultiSegment if (startObject == null || GetSequenceType() != SequenceType.MultiSegment) @@ -538,7 +538,7 @@ internal bool TryGetArray(out ArraySegment segment) return true; } - internal bool TryGetString(out string text, out int start, out int length) + internal bool TryGetString(out string? text, out int start, out int length) { if (typeof(T) != typeof(char) || GetSequenceType() != SequenceType.String) { @@ -618,7 +618,7 @@ internal void GetFirstSpan(out ReadOnlySpan first, out SequencePosition next) { first = default; next = default; - object startObject = _startObject; + object? startObject = _startObject; int startIndex = _startInteger; if (startObject != null) diff --git a/src/System.Memory/src/System/Buffers/ReadOnlySequence.cs b/src/System.Memory/src/System/Buffers/ReadOnlySequence.cs index 1ade0921255a..5df271d36fad 100644 --- a/src/System.Memory/src/System/Buffers/ReadOnlySequence.cs +++ b/src/System.Memory/src/System/Buffers/ReadOnlySequence.cs @@ -17,8 +17,8 @@ namespace System.Buffers public readonly partial struct ReadOnlySequence { // The data is essentially two SequencePositions, however the Start and End SequencePositions are deconstructed to improve packing. - private readonly object _startObject; - private readonly object _endObject; + private readonly object? _startObject; + private readonly object? _endObject; private readonly int _startInteger; private readonly int _endInteger; @@ -75,7 +75,7 @@ public SequencePosition End } [MethodImpl(MethodImplOptions.AggressiveInlining)] - private ReadOnlySequence(object startSegment, int startIndexAndFlags, object endSegment, int endIndexAndFlags) + private ReadOnlySequence(object? startSegment, int startIndexAndFlags, object? endSegment, int endIndexAndFlags) { // Used by SliceImpl to create new ReadOnlySequence @@ -117,10 +117,10 @@ public ReadOnlySequence(T[] array) if (array == null) ThrowHelper.ThrowArgumentNullException(ExceptionArgument.array); - _startObject = array; - _endObject = array; + _startObject = array!; // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + _endObject = array!; // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 _startInteger = ReadOnlySequence.ArrayToSequenceStart(0); - _endInteger = ReadOnlySequence.ArrayToSequenceEnd(array.Length); + _endInteger = ReadOnlySequence.ArrayToSequenceEnd(array!.Length); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 } /// @@ -145,7 +145,7 @@ public ReadOnlySequence(T[] array, int start, int length) /// public ReadOnlySequence(ReadOnlyMemory memory) { - if (MemoryMarshal.TryGetMemoryManager(memory, out MemoryManager manager, out int index, out int length)) + if (MemoryMarshal.TryGetMemoryManager(memory, out MemoryManager? manager, out int index, out int length)) { _startObject = manager; _endObject = manager; @@ -154,7 +154,7 @@ public ReadOnlySequence(ReadOnlyMemory memory) } else if (MemoryMarshal.TryGetArray(memory, out ArraySegment segment)) { - T[] array = segment.Array; + T[]? array = segment.Array; int start = segment.Offset; _startObject = array; _endObject = array; @@ -163,7 +163,7 @@ public ReadOnlySequence(ReadOnlyMemory memory) } else if (typeof(T) == typeof(char)) { - if (!MemoryMarshal.TryGetString((ReadOnlyMemory)(object)memory, out string text, out int start, out length)) + if (!MemoryMarshal.TryGetString((ReadOnlyMemory)(object)memory, out string? text, out int start, out length)) ThrowHelper.ThrowInvalidOperationException(); _startObject = text; @@ -198,8 +198,8 @@ public ReadOnlySequence Slice(long start, long length) int startIndex = GetIndex(_startInteger); int endIndex = GetIndex(_endInteger); - object startObject = _startObject; - object endObject = _endObject; + object? startObject = _startObject; + object? endObject = _endObject; if (startObject != endObject) { @@ -214,22 +214,22 @@ public ReadOnlySequence Slice(long start, long length) startIndex += (int)start; begin = new SequencePosition(startObject, startIndex); - end = GetEndPosition(startSegment, startObject, startIndex, endObject, endIndex, length); + end = GetEndPosition(startSegment, startObject, startIndex, endObject!, endIndex, length); } else { if (currentLength < 0) ThrowHelper.ThrowArgumentOutOfRangeException_PositionOutOfRange(); - begin = SeekMultiSegment(startSegment.Next, endObject, endIndex, start - currentLength, ExceptionArgument.start); + begin = SeekMultiSegment(startSegment.Next!, endObject!, endIndex, start - currentLength, ExceptionArgument.start); int beginIndex = GetIndex(begin); - object beginObject = begin.GetObject(); + object beginObject = begin.GetObject()!; if (beginObject != endObject) { Debug.Assert(beginObject != null); - end = GetEndPosition((ReadOnlySequenceSegment)beginObject, beginObject, beginIndex, endObject, endIndex, length); + end = GetEndPosition((ReadOnlySequenceSegment)beginObject, beginObject, beginIndex, endObject!, endIndex, length); } else { @@ -268,13 +268,13 @@ public ReadOnlySequence Slice(long start, SequencePosition end) ThrowHelper.ThrowStartOrEndArgumentValidationException(start); uint sliceEndIndex = (uint)GetIndex(end); - object sliceEndObject = end.GetObject(); + object? sliceEndObject = end.GetObject(); uint startIndex = (uint)GetIndex(_startInteger); - object startObject = _startObject; + object? startObject = _startObject; uint endIndex = (uint)GetIndex(_endInteger); - object endObject = _endObject; + object? endObject = _endObject; // Single-Segment Sequence if (startObject == endObject) @@ -291,16 +291,16 @@ public ReadOnlySequence Slice(long start, SequencePosition end) } // Multi-Segment Sequence - var startSegment = (ReadOnlySequenceSegment)startObject; + var startSegment = (ReadOnlySequenceSegment)startObject!; ulong startRange = (ulong)(startSegment.RunningIndex + startIndex); - ulong sliceRange = (ulong)(((ReadOnlySequenceSegment)sliceEndObject).RunningIndex + sliceEndIndex); + ulong sliceRange = (ulong)(((ReadOnlySequenceSegment)sliceEndObject!).RunningIndex + sliceEndIndex); // This optimization works because we know sliceEndIndex, startIndex, and endIndex are all >= 0 Debug.Assert(sliceEndIndex >= 0 && startIndex >= 0 && endIndex >= 0); if (!InRange( sliceRange, startRange, - (ulong)(((ReadOnlySequenceSegment)endObject).RunningIndex + endIndex))) + (ulong)(((ReadOnlySequenceSegment)endObject!).RunningIndex + endIndex))) { ThrowHelper.ThrowArgumentOutOfRangeException_PositionOutOfRange(); } @@ -319,7 +319,7 @@ public ReadOnlySequence Slice(long start, SequencePosition end) ThrowHelper.ThrowArgumentOutOfRangeException_PositionOutOfRange(); // End of segment. Move to start of next. - SequencePosition begin = SeekMultiSegment(startSegment.Next, sliceEndObject, (int)sliceEndIndex, start - currentLength, ExceptionArgument.start); + SequencePosition begin = SeekMultiSegment(startSegment.Next!, sliceEndObject, (int)sliceEndIndex, start - currentLength, ExceptionArgument.start); return SliceImpl(begin, end); } @@ -338,13 +338,13 @@ public ReadOnlySequence Slice(SequencePosition start, long length) { // Check start before length uint sliceStartIndex = (uint)GetIndex(start); - object sliceStartObject = start.GetObject(); + object? sliceStartObject = start.GetObject(); uint startIndex = (uint)GetIndex(_startInteger); - object startObject = _startObject; + object? startObject = _startObject; uint endIndex = (uint)GetIndex(_endInteger); - object endObject = _endObject; + object? endObject = _endObject; // Single-Segment Sequence if (startObject == endObject) @@ -365,10 +365,10 @@ public ReadOnlySequence Slice(SequencePosition start, long length) } // Multi-Segment Sequence - var sliceStartSegment = (ReadOnlySequenceSegment)sliceStartObject; + var sliceStartSegment = (ReadOnlySequenceSegment)sliceStartObject!; ulong sliceRange = (ulong)((sliceStartSegment.RunningIndex + sliceStartIndex)); - ulong startRange = (ulong)(((ReadOnlySequenceSegment)startObject).RunningIndex + startIndex); - ulong endRange = (ulong)(((ReadOnlySequenceSegment)endObject).RunningIndex + endIndex); + ulong startRange = (ulong)(((ReadOnlySequenceSegment)startObject!).RunningIndex + startIndex); + ulong endRange = (ulong)(((ReadOnlySequenceSegment)endObject!).RunningIndex + endIndex); // This optimization works because we know sliceStartIndex, startIndex, and endIndex are all >= 0 Debug.Assert(sliceStartIndex >= 0 && startIndex >= 0 && endIndex >= 0); @@ -395,7 +395,7 @@ public ReadOnlySequence Slice(SequencePosition start, long length) ThrowHelper.ThrowArgumentOutOfRangeException_PositionOutOfRange(); // End of segment. Move to start of next. - SequencePosition end = SeekMultiSegment(sliceStartSegment.Next, endObject, (int)endIndex, length - currentLength, ExceptionArgument.length); + SequencePosition end = SeekMultiSegment(sliceStartSegment.Next!, endObject, (int)endIndex, length - currentLength, ExceptionArgument.length); return SliceImpl(start, end); } @@ -473,9 +473,9 @@ public override string ToString() ReadOnlySequence localThis = this; ReadOnlySequence charSequence = Unsafe.As, ReadOnlySequence>(ref localThis); - if (SequenceMarshal.TryGetString(charSequence, out string text, out int start, out int length)) + if (SequenceMarshal.TryGetString(charSequence, out string? text, out int start, out int length)) { - return text.Substring(start, length); + return text!.Substring(start, length); // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 } if (Length < int.MaxValue) diff --git a/src/System.Memory/src/System/Buffers/ReadOnlySequenceSegment.cs b/src/System.Memory/src/System/Buffers/ReadOnlySequenceSegment.cs index b04e84c6a526..9b26dd336ff7 100644 --- a/src/System.Memory/src/System/Buffers/ReadOnlySequenceSegment.cs +++ b/src/System.Memory/src/System/Buffers/ReadOnlySequenceSegment.cs @@ -17,7 +17,7 @@ public abstract class ReadOnlySequenceSegment /// /// The next node. /// - public ReadOnlySequenceSegment Next { get; protected set; } + public ReadOnlySequenceSegment? Next { get; protected set; } /// /// The sum of node length before current. diff --git a/src/System.Memory/src/System/Runtime/InteropServices/SequenceMarshal.cs b/src/System.Memory/src/System/Runtime/InteropServices/SequenceMarshal.cs index ded0b44d9d98..9384fba2b4f4 100644 --- a/src/System.Memory/src/System/Runtime/InteropServices/SequenceMarshal.cs +++ b/src/System.Memory/src/System/Runtime/InteropServices/SequenceMarshal.cs @@ -16,10 +16,10 @@ public static partial class SequenceMarshal /// If unable to get the , return false. /// public static bool TryGetReadOnlySequenceSegment(ReadOnlySequence sequence, - out ReadOnlySequenceSegment startSegment, + out ReadOnlySequenceSegment? startSegment, out int startIndex, - out ReadOnlySequenceSegment endSegment, - out int endIndex) + out ReadOnlySequenceSegment? endSegment, + out int endIndex) // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 { return sequence.TryGetReadOnlySequenceSegment(out startSegment, out startIndex, out endSegment, out endIndex); } @@ -53,7 +53,7 @@ public static bool TryGetReadOnlyMemory(ReadOnlySequence sequence, out Rea /// Get from the underlying . /// If unable to get the , return false. /// - internal static bool TryGetString(ReadOnlySequence sequence, out string text, out int start, out int length) + internal static bool TryGetString(ReadOnlySequence sequence, out string? text, out int start, out int length) // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 { return sequence.TryGetString(out text, out start, out length); } diff --git a/src/System.Memory/src/System/SequencePosition.cs b/src/System.Memory/src/System/SequencePosition.cs index 1c189774c233..6eedc0d7b660 100644 --- a/src/System.Memory/src/System/SequencePosition.cs +++ b/src/System.Memory/src/System/SequencePosition.cs @@ -13,13 +13,13 @@ namespace System /// public readonly struct SequencePosition : IEquatable { - private readonly object _object; + private readonly object? _object; private readonly int _integer; /// /// Creates new /// - public SequencePosition(object @object, int integer) + public SequencePosition(object? @object, int integer) { _object = @object; _integer = integer; @@ -29,7 +29,7 @@ public SequencePosition(object @object, int integer) /// Returns object part of this /// [EditorBrowsable(EditorBrowsableState.Never)] - public object GetObject() => _object; + public object? GetObject() => _object; /// /// Returns integer part of this @@ -48,7 +48,7 @@ public SequencePosition(object @object, int integer) /// equality does not guarantee that they point to the same location in /// [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is SequencePosition other && this.Equals(other); + public override bool Equals(object? obj) => obj is SequencePosition other && this.Equals(other); /// [EditorBrowsable(EditorBrowsableState.Never)] diff --git a/src/System.Memory/src/System/ThrowHelper.cs b/src/System.Memory/src/System/ThrowHelper.cs index e6ca9bd755d3..a4b606eed564 100644 --- a/src/System.Memory/src/System/ThrowHelper.cs +++ b/src/System.Memory/src/System/ThrowHelper.cs @@ -55,10 +55,10 @@ internal static class ThrowHelper // // ReadOnlySequence .ctor validation Throws coalesced to enable inlining of the .ctor // - public static void ThrowArgumentValidationException(ReadOnlySequenceSegment startSegment, int startIndex, ReadOnlySequenceSegment endSegment) + public static void ThrowArgumentValidationException(ReadOnlySequenceSegment? startSegment, int startIndex, ReadOnlySequenceSegment? endSegment) => throw CreateArgumentValidationException(startSegment, startIndex, endSegment); - private static Exception CreateArgumentValidationException(ReadOnlySequenceSegment startSegment, int startIndex, ReadOnlySequenceSegment endSegment) + private static Exception CreateArgumentValidationException(ReadOnlySequenceSegment? startSegment, int startIndex, ReadOnlySequenceSegment? endSegment) { if (startSegment == null) return CreateArgumentNullException(ExceptionArgument.startSegment); @@ -72,10 +72,10 @@ private static Exception CreateArgumentValidationException(ReadOnlySequenceSe return CreateArgumentOutOfRangeException(ExceptionArgument.endIndex); } - public static void ThrowArgumentValidationException(Array array, int start) + public static void ThrowArgumentValidationException(Array? array, int start) => throw CreateArgumentValidationException(array, start); - private static Exception CreateArgumentValidationException(Array array, int start) + private static Exception CreateArgumentValidationException(Array? array, int start) { if (array == null) return CreateArgumentNullException(ExceptionArgument.array); From 2f5cbfdbc6349e4df2a1e4f1ff69df3fbfd94c25 Mon Sep 17 00:00:00 2001 From: Stephen Toub Date: Wed, 17 Apr 2019 17:27:49 -0400 Subject: [PATCH 274/607] Nullable: System.Diagnostics.Tools.dll --- .../src/System.Diagnostics.Tools.csproj | 1 + .../System/CodeDom/Compiler/GeneratedCodeAttribute.cs | 10 +++++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/System.Diagnostics.Tools/src/System.Diagnostics.Tools.csproj b/src/System.Diagnostics.Tools/src/System.Diagnostics.Tools.csproj index b429a0b434d9..58278b77aa17 100644 --- a/src/System.Diagnostics.Tools/src/System.Diagnostics.Tools.csproj +++ b/src/System.Diagnostics.Tools/src/System.Diagnostics.Tools.csproj @@ -4,6 +4,7 @@ System.Diagnostics.Tools true $(DefineConstants);SYSTEM_DIAGNOSTICS_TOOLS + enable netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release;uapaot-Windows_NT-Debug;uapaot-Windows_NT-Release diff --git a/src/System.Diagnostics.Tools/src/System/CodeDom/Compiler/GeneratedCodeAttribute.cs b/src/System.Diagnostics.Tools/src/System/CodeDom/Compiler/GeneratedCodeAttribute.cs index e4772adfed42..ab8fec774b82 100644 --- a/src/System.Diagnostics.Tools/src/System/CodeDom/Compiler/GeneratedCodeAttribute.cs +++ b/src/System.Diagnostics.Tools/src/System/CodeDom/Compiler/GeneratedCodeAttribute.cs @@ -7,21 +7,21 @@ namespace System.CodeDom.Compiler [AttributeUsage(AttributeTargets.All, Inherited = false, AllowMultiple = false)] public sealed class GeneratedCodeAttribute : Attribute { - private readonly string _tool; - private readonly string _version; + private readonly string? _tool; + private readonly string? _version; - public GeneratedCodeAttribute(string tool, string version) + public GeneratedCodeAttribute(string? tool, string? version) { _tool = tool; _version = version; } - public string Tool + public string? Tool { get { return _tool; } } - public string Version + public string? Version { get { return _version; } } From b90aa1fa7648e221fda87ff5f90c5630dabd82da Mon Sep 17 00:00:00 2001 From: Stephen Toub Date: Wed, 17 Apr 2019 17:30:03 -0400 Subject: [PATCH 275/607] Nullable: System.Threading.Thread.dll --- src/System.Threading.Thread/src/System.Threading.Thread.csproj | 1 + 1 file changed, 1 insertion(+) diff --git a/src/System.Threading.Thread/src/System.Threading.Thread.csproj b/src/System.Threading.Thread/src/System.Threading.Thread.csproj index e8e088907edb..18cc3beab74e 100644 --- a/src/System.Threading.Thread/src/System.Threading.Thread.csproj +++ b/src/System.Threading.Thread/src/System.Threading.Thread.csproj @@ -4,6 +4,7 @@ Library true {06197EED-FF48-43F3-976D-463839D43E8C} + enable netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release;uapaot-Windows_NT-Debug;uapaot-Windows_NT-Release From 3353a2c6020b1ee8f026c08a04325ec3858cfa48 Mon Sep 17 00:00:00 2001 From: Stephen Toub Date: Wed, 17 Apr 2019 17:38:37 -0400 Subject: [PATCH 276/607] Nullable: System.Threading.dll --- .../src/System.Threading.csproj | 1 + .../src/System/Threading/Barrier.cs | 26 +++---- .../System/Threading/HostExecutionContext.cs | 4 +- .../Threading/HostExecutionContextManager.cs | 6 +- .../src/System/Threading/LockCookie.cs | 2 +- .../src/System/Threading/ReaderWriterLock.cs | 70 +++++++++---------- 6 files changed, 55 insertions(+), 54 deletions(-) diff --git a/src/System.Threading/src/System.Threading.csproj b/src/System.Threading/src/System.Threading.csproj index 68797bd1bc7d..5bda8c8372e5 100644 --- a/src/System.Threading/src/System.Threading.csproj +++ b/src/System.Threading/src/System.Threading.csproj @@ -5,6 +5,7 @@ true true netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release;uapaot-Windows_NT-Debug;uapaot-Windows_NT-Release + enable diff --git a/src/System.Threading/src/System/Threading/Barrier.cs b/src/System.Threading/src/System/Threading/Barrier.cs index 69b2a5f861ee..646846d421d8 100644 --- a/src/System.Threading/src/System/Threading/Barrier.cs +++ b/src/System.Threading/src/System/Threading/Barrier.cs @@ -28,7 +28,7 @@ public class BarrierPostPhaseException : Exception /// Initializes a new instance of the class. /// public BarrierPostPhaseException() - : this((string)null) + : this((string?)null) { } @@ -36,7 +36,7 @@ public BarrierPostPhaseException() /// Initializes a new instance of the class with the specified inner exception. /// /// The exception that is the cause of the current exception. - public BarrierPostPhaseException(Exception innerException) + public BarrierPostPhaseException(Exception? innerException) : this(null, innerException) { } @@ -45,7 +45,7 @@ public BarrierPostPhaseException(Exception innerException) /// Initializes a new instance of the class with a specified error message. /// /// A string that describes the exception. - public BarrierPostPhaseException(string message) + public BarrierPostPhaseException(string? message) : this(message, null) { } @@ -55,7 +55,7 @@ public BarrierPostPhaseException(string message) /// /// A string that describes the exception. /// The exception that is the cause of the current exception. - public BarrierPostPhaseException(string message, Exception innerException) + public BarrierPostPhaseException(string? message, Exception? innerException) : base(message == null ? SR.BarrierPostPhaseException : message, innerException) { } @@ -130,16 +130,16 @@ public class Barrier : IDisposable private ManualResetEventSlim _evenEvent; // The execution context of the creator thread - private ExecutionContext _ownerThreadContext; + private ExecutionContext? _ownerThreadContext; // The EC callback that invokes the post phase action - private static ContextCallback s_invokePostPhaseAction; + private static ContextCallback? s_invokePostPhaseAction; // Post phase action after each phase - private Action _postPhaseAction; + private Action? _postPhaseAction; // In case the post phase action throws an exception, wraps it in BarrierPostPhaseException - private Exception _exception; + private Exception? _exception; // This is the ManagedThreadID of the postPhaseAction caller thread, this is used to determine if the SignalAndWait, Dispose or Add/RemoveParticipant caller thread is // the same thread as the postPhaseAction thread which means this method was called from the postPhaseAction which is illegal. @@ -213,7 +213,7 @@ public Barrier(int participantCount) /// will not be released to the next phase until the postPhaseAction delegate /// has completed execution. /// - public Barrier(int participantCount, Action postPhaseAction) + public Barrier(int participantCount, Action? postPhaseAction) { // the count must be non negative value if (participantCount < 0 || participantCount > MAX_PARTICIPANTS) @@ -766,7 +766,7 @@ private void FinishPhase(bool observedSense) { var currentContext = _ownerThreadContext; - ContextCallback handler = s_invokePostPhaseAction; + ContextCallback? handler = s_invokePostPhaseAction; if (handler == null) { s_invokePostPhaseAction = handler = InvokePostPhaseAction; @@ -802,10 +802,10 @@ private void FinishPhase(bool observedSense) /// Helper method to call the post phase action /// /// - private static void InvokePostPhaseAction(object obj) + private static void InvokePostPhaseAction(object? obj) { - var thisBarrier = (Barrier)obj; - thisBarrier._postPhaseAction(thisBarrier); + var thisBarrier = (Barrier)obj!; + thisBarrier._postPhaseAction!(thisBarrier); } /// diff --git a/src/System.Threading/src/System/Threading/HostExecutionContext.cs b/src/System.Threading/src/System/Threading/HostExecutionContext.cs index f711a7d20ff3..d18cfeb39e10 100644 --- a/src/System.Threading/src/System/Threading/HostExecutionContext.cs +++ b/src/System.Threading/src/System/Threading/HostExecutionContext.cs @@ -10,12 +10,12 @@ public HostExecutionContext() { } - public HostExecutionContext(object state) + public HostExecutionContext(object? state) { State = state; } - protected internal object State + protected internal object? State { get; set; diff --git a/src/System.Threading/src/System/Threading/HostExecutionContextManager.cs b/src/System.Threading/src/System/Threading/HostExecutionContextManager.cs index 60a58fd92bd4..fa92751d8da9 100644 --- a/src/System.Threading/src/System/Threading/HostExecutionContextManager.cs +++ b/src/System.Threading/src/System/Threading/HostExecutionContextManager.cs @@ -12,9 +12,9 @@ public class HostExecutionContextManager /// separating itself from the to minimize unnecessary additions there. /// [ThreadStatic] - private static HostExecutionContext t_currentContext; + private static HostExecutionContext? t_currentContext; - public virtual HostExecutionContext Capture() + public virtual HostExecutionContext? Capture() { // Not hosted, so always capture null return null; @@ -55,7 +55,7 @@ public virtual void Revert(object previousState) private sealed class HostExecutionContextSwitcher { public readonly HostExecutionContext _currentContext; - public AsyncLocal _asyncLocal; + public AsyncLocal? _asyncLocal; public HostExecutionContextSwitcher(HostExecutionContext currentContext) { diff --git a/src/System.Threading/src/System/Threading/LockCookie.cs b/src/System.Threading/src/System/Threading/LockCookie.cs index d3d0ffd29cd7..e748f1b3badc 100644 --- a/src/System.Threading/src/System/Threading/LockCookie.cs +++ b/src/System.Threading/src/System/Threading/LockCookie.cs @@ -20,7 +20,7 @@ public override int GetHashCode() return (int)_flags + _readerLevel + _writerLevel + _threadID; } - public override bool Equals(object obj) + public override bool Equals(object? obj) { return obj is LockCookie && Equals((LockCookie)obj); } diff --git a/src/System.Threading/src/System/Threading/ReaderWriterLock.cs b/src/System.Threading/src/System/Threading/ReaderWriterLock.cs index 397346088ff8..82df1c4d3650 100644 --- a/src/System.Threading/src/System/Threading/ReaderWriterLock.cs +++ b/src/System.Threading/src/System/Threading/ReaderWriterLock.cs @@ -36,8 +36,8 @@ public sealed class ReaderWriterLock : CriticalFinalizerObject private static long s_mostRecentLockID; - private ManualResetEventSlim _readerEvent; - private AutoResetEvent _writerEvent; + private ManualResetEventSlim? _readerEvent; + private AutoResetEvent? _writerEvent; private long _lockID; private volatile int _state; private int _writerID = InvalidThreadID; @@ -53,7 +53,7 @@ public bool IsReaderLockHeld { get { - ThreadLocalLockEntry threadLocalLockEntry = ThreadLocalLockEntry.GetCurrent(_lockID); + ThreadLocalLockEntry? threadLocalLockEntry = ThreadLocalLockEntry.GetCurrent(_lockID); if (threadLocalLockEntry != null) { return threadLocalLockEntry._readerLevel > 0; @@ -192,7 +192,7 @@ public void AcquireReaderLock(int millisecondsTimeout) } int modifyState = -LockStates.WaitingReader; - ManualResetEventSlim readerEvent = null; + ManualResetEventSlim? readerEvent = null; bool waitSucceeded = false; try { @@ -262,7 +262,7 @@ public void AcquireReaderLock(int millisecondsTimeout) if ((knownState & LockStates.WaitingReadersMask) == LockStates.WaitingReader) { // Reset the event and the reader signaled flag - readerEvent.Reset(); + readerEvent!.Reset(); Interlocked.Add(ref _state, -LockStates.ReaderSignaled); } @@ -364,7 +364,7 @@ public void AcquireWriterLock(int millisecondsTimeout) } int modifyState = -LockStates.WaitingWriter; - AutoResetEvent writerEvent = null; + AutoResetEvent? writerEvent = null; bool waitSucceeded = false; try { @@ -453,7 +453,7 @@ public void ReleaseReaderLock() return; } - ThreadLocalLockEntry threadLocalLockEntry = ThreadLocalLockEntry.GetCurrent(_lockID); + ThreadLocalLockEntry? threadLocalLockEntry = ThreadLocalLockEntry.GetCurrent(_lockID); if (threadLocalLockEntry == null) { throw GetNotOwnerException(); @@ -472,8 +472,8 @@ public void ReleaseReaderLock() // Not a reader any more bool isLastReader; bool cacheEvents; - AutoResetEvent writerEvent = null; - ManualResetEventSlim readerEvent = null; + AutoResetEvent? writerEvent = null; + ManualResetEventSlim? readerEvent = null; int currentState = _state; int knownState; do @@ -585,8 +585,8 @@ public void ReleaseWriterLock() // Not a writer any more _writerID = InvalidThreadID; bool cacheEvents; - ManualResetEventSlim readerEvent = null; - AutoResetEvent writerEvent = null; + ManualResetEventSlim? readerEvent = null; + AutoResetEvent? writerEvent = null; int currentState = _state; int knownState; do @@ -689,7 +689,7 @@ public LockCookie UpgradeToWriterLock(int millisecondsTimeout) return lockCookie; } - ThreadLocalLockEntry threadLocalLockEntry = ThreadLocalLockEntry.GetCurrent(_lockID); + ThreadLocalLockEntry? threadLocalLockEntry = ThreadLocalLockEntry.GetCurrent(_lockID); if (threadLocalLockEntry == null) { lockCookie._flags = LockCookieFlags.Upgrade | LockCookieFlags.OwnedNone; @@ -779,7 +779,7 @@ public void DowngradeFromWriterLock(ref LockCookie lockCookie) // Downgrade to a reader _writerID = InvalidThreadID; _writerLevel = 0; - ManualResetEventSlim readerEvent = null; + ManualResetEventSlim? readerEvent = null; int currentState = _state; int knownState; do @@ -892,7 +892,7 @@ public LockCookie ReleaseLock() return lockCookie; } - ThreadLocalLockEntry threadLocalLockEntry = ThreadLocalLockEntry.GetCurrent(_lockID); + ThreadLocalLockEntry? threadLocalLockEntry = ThreadLocalLockEntry.GetCurrent(_lockID); if (threadLocalLockEntry == null) { lockCookie._flags = LockCookieFlags.Release | LockCookieFlags.OwnedNone; @@ -994,7 +994,7 @@ private void RecoverLock(ref LockCookie lockCookie, LockCookieFlags flags) else if ((flags & LockCookieFlags.OwnedReader) != 0) { AcquireReaderLock(Timeout.Infinite); - ThreadLocalLockEntry threadLocalLockEntry = ThreadLocalLockEntry.GetCurrent(_lockID); + ThreadLocalLockEntry? threadLocalLockEntry = ThreadLocalLockEntry.GetCurrent(_lockID); Debug.Assert(threadLocalLockEntry != null); threadLocalLockEntry._readerLevel = lockCookie._readerLevel; } @@ -1019,14 +1019,14 @@ private static bool YieldProcessor() /// Failed to allocate the event object private ManualResetEventSlim GetOrCreateReaderEvent() { - ManualResetEventSlim currentEvent = _readerEvent; + ManualResetEventSlim? currentEvent = _readerEvent; if (currentEvent != null) { return currentEvent; } currentEvent = new ManualResetEventSlim(false, 0); - ManualResetEventSlim previousEvent = Interlocked.CompareExchange(ref _readerEvent, currentEvent, null); + ManualResetEventSlim? previousEvent = Interlocked.CompareExchange(ref _readerEvent, currentEvent, null); if (previousEvent == null) { return currentEvent; @@ -1040,14 +1040,14 @@ private ManualResetEventSlim GetOrCreateReaderEvent() /// Failed to create the system event due to some system error private AutoResetEvent GetOrCreateWriterEvent() { - AutoResetEvent currentEvent = _writerEvent; + AutoResetEvent? currentEvent = _writerEvent; if (currentEvent != null) { return currentEvent; } currentEvent = new AutoResetEvent(false); - AutoResetEvent previousEvent = Interlocked.CompareExchange(ref _writerEvent, currentEvent, null); + AutoResetEvent? previousEvent = Interlocked.CompareExchange(ref _writerEvent, currentEvent, null); if (previousEvent == null) { return currentEvent; @@ -1057,7 +1057,7 @@ private AutoResetEvent GetOrCreateWriterEvent() return previousEvent; } - private ManualResetEventSlim TryGetOrCreateReaderEvent() + private ManualResetEventSlim? TryGetOrCreateReaderEvent() { // The intention is to catch all exceptions, so that the caller can try again. Typically, only OutOfMemoryException // would be thrown, but the idea is that any exception that may be thrown will propagate to the user on a different @@ -1072,7 +1072,7 @@ private ManualResetEventSlim TryGetOrCreateReaderEvent() } } - private AutoResetEvent TryGetOrCreateWriterEvent() + private AutoResetEvent? TryGetOrCreateWriterEvent() { // The intention is to catch all exceptions, so that the caller can try again. Typically, only OutOfMemoryException // or any SystemException would be thrown. For instance, the EventWaitHandle constructor may throw IOException if @@ -1093,9 +1093,9 @@ private void ReleaseEvents() Debug.Assert((_state & LockStates.CachingEvents) == LockStates.CachingEvents); // Save events - AutoResetEvent writerEvent = _writerEvent; + AutoResetEvent? writerEvent = _writerEvent; _writerEvent = null; - ManualResetEventSlim readerEvent = _readerEvent; + ManualResetEventSlim? readerEvent = _readerEvent; _readerEvent = null; // Allow readers and writers to continue @@ -1206,10 +1206,10 @@ private static class LockStates private sealed class ThreadLocalLockEntry { [ThreadStatic] - private static ThreadLocalLockEntry t_lockEntryHead; + private static ThreadLocalLockEntry? t_lockEntryHead; private long _lockID; - private ThreadLocalLockEntry _next; + private ThreadLocalLockEntry? _next; public ushort _readerLevel; private ThreadLocalLockEntry(long lockID) @@ -1226,7 +1226,7 @@ private static void VerifyNoNonemptyEntryInListAfter(long lockID, ThreadLocalLoc Debug.Assert(lockID != 0); Debug.Assert(afterEntry != null); - for (ThreadLocalLockEntry currentEntry = afterEntry._next; + for (ThreadLocalLockEntry? currentEntry = afterEntry._next; currentEntry != null; currentEntry = currentEntry._next) { @@ -1234,12 +1234,12 @@ private static void VerifyNoNonemptyEntryInListAfter(long lockID, ThreadLocalLoc } } - public static ThreadLocalLockEntry GetCurrent(long lockID) + public static ThreadLocalLockEntry? GetCurrent(long lockID) { Debug.Assert(lockID != 0); - ThreadLocalLockEntry headEntry = t_lockEntryHead; - for (ThreadLocalLockEntry currentEntry = headEntry; currentEntry != null; currentEntry = currentEntry._next) + ThreadLocalLockEntry? headEntry = t_lockEntryHead; + for (ThreadLocalLockEntry? currentEntry = headEntry; currentEntry != null; currentEntry = currentEntry._next) { if (currentEntry._lockID == lockID) { @@ -1257,7 +1257,7 @@ public static ThreadLocalLockEntry GetOrCreateCurrent(long lockID) { Debug.Assert(lockID != 0); - ThreadLocalLockEntry headEntry = t_lockEntryHead; + ThreadLocalLockEntry? headEntry = t_lockEntryHead; if (headEntry != null) { if (headEntry._lockID == lockID) @@ -1277,15 +1277,15 @@ public static ThreadLocalLockEntry GetOrCreateCurrent(long lockID) return GetOrCreateCurrentSlow(lockID, headEntry); } - private static ThreadLocalLockEntry GetOrCreateCurrentSlow(long lockID, ThreadLocalLockEntry headEntry) + private static ThreadLocalLockEntry GetOrCreateCurrentSlow(long lockID, ThreadLocalLockEntry? headEntry) { Debug.Assert(lockID != 0); Debug.Assert(headEntry == t_lockEntryHead); Debug.Assert(headEntry == null || headEntry._lockID != lockID); - ThreadLocalLockEntry entry = null; - ThreadLocalLockEntry emptyEntryPrevious = null; - ThreadLocalLockEntry emptyEntry = null; + ThreadLocalLockEntry? entry = null; + ThreadLocalLockEntry? emptyEntryPrevious = null; + ThreadLocalLockEntry? emptyEntry = null; if (headEntry != null) { @@ -1294,7 +1294,7 @@ private static ThreadLocalLockEntry GetOrCreateCurrentSlow(long lockID, ThreadLo emptyEntry = headEntry; } - for (ThreadLocalLockEntry previousEntry = headEntry, currentEntry = headEntry._next; + for (ThreadLocalLockEntry? previousEntry = headEntry, currentEntry = headEntry._next; currentEntry != null; previousEntry = currentEntry, currentEntry = currentEntry._next) { From 71a0946fe6894465684d4710031daeac1620e01c Mon Sep 17 00:00:00 2001 From: Stephen Toub Date: Wed, 17 Apr 2019 17:39:38 -0400 Subject: [PATCH 277/607] Nullable: System.Security.Principal.dll --- .../src/System.Security.Principal.csproj | 1 + 1 file changed, 1 insertion(+) diff --git a/src/System.Security.Principal/src/System.Security.Principal.csproj b/src/System.Security.Principal/src/System.Security.Principal.csproj index c4d987339a3a..e2b074dde904 100644 --- a/src/System.Security.Principal/src/System.Security.Principal.csproj +++ b/src/System.Security.Principal/src/System.Security.Principal.csproj @@ -4,6 +4,7 @@ {FBE16BC8-AE2D-422C-861E-861814F53AF7} true true + enable netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release;uapaot-Windows_NT-Debug;uapaot-Windows_NT-Release From b7617868a15031f2c5f5635864f32f68b3ddfa4b Mon Sep 17 00:00:00 2001 From: Stephen Toub Date: Wed, 17 Apr 2019 17:47:39 -0400 Subject: [PATCH 278/607] Nullable: System.Runtime.InteropServices.dll --- .../src/System.Runtime.InteropServices.csproj | 1 + .../IDispatchConstantAttribute.cs | 2 ++ .../IUnknownConstantAttribute.cs | 2 ++ .../InteropServices/ComAwareEventInfo.cs | 25 +++++++++++-------- .../InteropServices/ComTypes/IDataObject.cs | 2 +- .../InteropServices/ComTypes/STGMEDIUM.cs | 2 +- .../InteropServices/HandleCollector.cs | 4 +-- .../InteropServices/RuntimeEnvironment.cs | 2 +- 8 files changed, 24 insertions(+), 16 deletions(-) diff --git a/src/System.Runtime.InteropServices/src/System.Runtime.InteropServices.csproj b/src/System.Runtime.InteropServices/src/System.Runtime.InteropServices.csproj index 1c3011be333c..0e208b6e3bc5 100644 --- a/src/System.Runtime.InteropServices/src/System.Runtime.InteropServices.csproj +++ b/src/System.Runtime.InteropServices/src/System.Runtime.InteropServices.csproj @@ -7,6 +7,7 @@ true $(NoWarn);0436;3001 true + enable netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release;uapaot-Windows_NT-Debug;uapaot-Windows_NT-Release diff --git a/src/System.Runtime.InteropServices/src/System/Runtime/CompilerServices/IDispatchConstantAttribute.cs b/src/System.Runtime.InteropServices/src/System/Runtime/CompilerServices/IDispatchConstantAttribute.cs index 89338b705987..66e87d44ec25 100644 --- a/src/System.Runtime.InteropServices/src/System/Runtime/CompilerServices/IDispatchConstantAttribute.cs +++ b/src/System.Runtime.InteropServices/src/System/Runtime/CompilerServices/IDispatchConstantAttribute.cs @@ -11,6 +11,8 @@ public sealed partial class IDispatchConstantAttribute : CustomConstantAttribute { public IDispatchConstantAttribute() { } +#pragma warning disable CS8608 // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/23268 public override object Value => new DispatchWrapper(null); +#pragma warning restore CS8608 } } diff --git a/src/System.Runtime.InteropServices/src/System/Runtime/CompilerServices/IUnknownConstantAttribute.cs b/src/System.Runtime.InteropServices/src/System/Runtime/CompilerServices/IUnknownConstantAttribute.cs index 7b0f4b45160d..100131823fba 100644 --- a/src/System.Runtime.InteropServices/src/System/Runtime/CompilerServices/IUnknownConstantAttribute.cs +++ b/src/System.Runtime.InteropServices/src/System/Runtime/CompilerServices/IUnknownConstantAttribute.cs @@ -11,6 +11,8 @@ public sealed partial class IUnknownConstantAttribute : CustomConstantAttribute { public IUnknownConstantAttribute() { } +#pragma warning disable CS8608 // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/23268 public override object Value => new UnknownWrapper(null); +#pragma warning restore CS8608 } } diff --git a/src/System.Runtime.InteropServices/src/System/Runtime/InteropServices/ComAwareEventInfo.cs b/src/System.Runtime.InteropServices/src/System/Runtime/InteropServices/ComAwareEventInfo.cs index 016a1fe553ad..39a5ab9c0cca 100644 --- a/src/System.Runtime.InteropServices/src/System/Runtime/InteropServices/ComAwareEventInfo.cs +++ b/src/System.Runtime.InteropServices/src/System/Runtime/InteropServices/ComAwareEventInfo.cs @@ -4,7 +4,10 @@ using System.Collections.Generic; using System.Reflection; -using System.Security; + +// This type is obsolete, and is expected to be used in very specific ways or it may +// throw null reference exceptions. +#pragma warning disable CS8610 namespace System.Runtime.InteropServices { @@ -14,7 +17,7 @@ public class ComAwareEventInfo : EventInfo public ComAwareEventInfo(Type type, string eventName) { - _innerEventInfo = type.GetEvent(eventName); + _innerEventInfo = type.GetEvent(eventName)!; } public override void AddEventHandler(object target, Delegate handler) @@ -50,15 +53,15 @@ public override void RemoveEventHandler(object target, Delegate handler) public override EventAttributes Attributes => _innerEventInfo.Attributes; - public override MethodInfo GetAddMethod(bool nonPublic) => _innerEventInfo.GetAddMethod(nonPublic); + public override MethodInfo? GetAddMethod(bool nonPublic) => _innerEventInfo.GetAddMethod(nonPublic); - public override MethodInfo[] GetOtherMethods(bool nonPublic) => _innerEventInfo.GetOtherMethods(nonPublic); + public override MethodInfo[]? GetOtherMethods(bool nonPublic) => _innerEventInfo.GetOtherMethods(nonPublic); - public override MethodInfo GetRaiseMethod(bool nonPublic) => _innerEventInfo.GetRaiseMethod(nonPublic); + public override MethodInfo? GetRaiseMethod(bool nonPublic) => _innerEventInfo.GetRaiseMethod(nonPublic); - public override MethodInfo GetRemoveMethod(bool nonPublic) => _innerEventInfo.GetRemoveMethod(nonPublic); + public override MethodInfo? GetRemoveMethod(bool nonPublic) => _innerEventInfo.GetRemoveMethod(nonPublic); - public override Type DeclaringType => _innerEventInfo.DeclaringType; + public override Type? DeclaringType => _innerEventInfo.DeclaringType; public override object[] GetCustomAttributes(Type attributeType, bool inherit) { @@ -83,11 +86,11 @@ public override bool IsDefined(Type attributeType, bool inherit) public override string Name => _innerEventInfo.Name; - public override Type ReflectedType => _innerEventInfo.ReflectedType; + public override Type? ReflectedType => _innerEventInfo.ReflectedType; private static void GetDataForComInvocation(EventInfo eventInfo, out Guid sourceIid, out int dispid) { - object[] comEventInterfaces = eventInfo.DeclaringType.GetCustomAttributes(typeof(ComEventInterfaceAttribute), inherit: false); + object[] comEventInterfaces = eventInfo.DeclaringType!.GetCustomAttributes(typeof(ComEventInterfaceAttribute), inherit: false); if (comEventInterfaces == null || comEventInterfaces.Length == 0) { @@ -102,8 +105,8 @@ private static void GetDataForComInvocation(EventInfo eventInfo, out Guid source Type sourceInterface = ((ComEventInterfaceAttribute)comEventInterfaces[0]).SourceInterface; Guid guid = sourceInterface.GUID; - MethodInfo methodInfo = sourceInterface.GetMethod(eventInfo.Name); - Attribute dispIdAttribute = Attribute.GetCustomAttribute(methodInfo, typeof(DispIdAttribute)); + MethodInfo methodInfo = sourceInterface.GetMethod(eventInfo.Name)!; + Attribute? dispIdAttribute = Attribute.GetCustomAttribute(methodInfo, typeof(DispIdAttribute)); if (dispIdAttribute == null) { throw new InvalidOperationException(SR.InvalidOperation_NoDispIdAttribute); diff --git a/src/System.Runtime.InteropServices/src/System/Runtime/InteropServices/ComTypes/IDataObject.cs b/src/System.Runtime.InteropServices/src/System/Runtime/InteropServices/ComTypes/IDataObject.cs index 57c8bc9bed38..ece9f14073e6 100644 --- a/src/System.Runtime.InteropServices/src/System/Runtime/InteropServices/ComTypes/IDataObject.cs +++ b/src/System.Runtime.InteropServices/src/System/Runtime/InteropServices/ComTypes/IDataObject.cs @@ -83,6 +83,6 @@ public interface IDataObject { /// Creates an object that can be used to enumerate the current advisory connections. /// [PreserveSig] - int EnumDAdvise(out IEnumSTATDATA enumAdvise); + int EnumDAdvise(out IEnumSTATDATA? enumAdvise); } } diff --git a/src/System.Runtime.InteropServices/src/System/Runtime/InteropServices/ComTypes/STGMEDIUM.cs b/src/System.Runtime.InteropServices/src/System/Runtime/InteropServices/ComTypes/STGMEDIUM.cs index 7e63ccf15451..2e31b14c396e 100644 --- a/src/System.Runtime.InteropServices/src/System/Runtime/InteropServices/ComTypes/STGMEDIUM.cs +++ b/src/System.Runtime.InteropServices/src/System/Runtime/InteropServices/ComTypes/STGMEDIUM.cs @@ -9,6 +9,6 @@ public struct STGMEDIUM public TYMED tymed; public IntPtr unionmember; [MarshalAs(UnmanagedType.IUnknown)] - public object pUnkForRelease; + public object? pUnkForRelease; } } diff --git a/src/System.Runtime.InteropServices/src/System/Runtime/InteropServices/HandleCollector.cs b/src/System.Runtime.InteropServices/src/System/Runtime/InteropServices/HandleCollector.cs index 879843c0e033..61017cb91105 100644 --- a/src/System.Runtime.InteropServices/src/System/Runtime/InteropServices/HandleCollector.cs +++ b/src/System.Runtime.InteropServices/src/System/Runtime/InteropServices/HandleCollector.cs @@ -16,12 +16,12 @@ public sealed class HandleCollector private int[] _gcCounts = new int[3]; private int _gcGeneration = 0; - public HandleCollector(string name, int initialThreshold) : + public HandleCollector(string? name, int initialThreshold) : this(name, initialThreshold, int.MaxValue) { } - public HandleCollector(string name, int initialThreshold, int maximumThreshold) + public HandleCollector(string? name, int initialThreshold, int maximumThreshold) { if (initialThreshold < 0) { diff --git a/src/System.Runtime.InteropServices/src/System/Runtime/InteropServices/RuntimeEnvironment.cs b/src/System.Runtime.InteropServices/src/System/Runtime/InteropServices/RuntimeEnvironment.cs index b68f90baf5ea..57a988df111c 100644 --- a/src/System.Runtime.InteropServices/src/System/Runtime/InteropServices/RuntimeEnvironment.cs +++ b/src/System.Runtime.InteropServices/src/System/Runtime/InteropServices/RuntimeEnvironment.cs @@ -15,7 +15,7 @@ public static class RuntimeEnvironment public static string GetRuntimeDirectory() { - string runtimeDirectory = typeof(object).Assembly.Location; + string? runtimeDirectory = typeof(object).Assembly.Location; if (!Path.IsPathRooted(runtimeDirectory)) { runtimeDirectory = AppDomain.CurrentDomain.BaseDirectory; From d5cf97fcf466f45e2a7dfc6d0abead8d9ab341b8 Mon Sep 17 00:00:00 2001 From: Stephen Toub Date: Wed, 17 Apr 2019 21:54:15 -0400 Subject: [PATCH 279/607] Nullable: System.Numerics.Vectors.dll --- .../src/System.Numerics.Vectors.csproj | 1 + src/System.Numerics.Vectors/src/System/Numerics/Matrix3x2.cs | 2 +- src/System.Numerics.Vectors/src/System/Numerics/Matrix4x4.cs | 2 +- src/System.Numerics.Vectors/src/System/Numerics/Plane.cs | 2 +- src/System.Numerics.Vectors/src/System/Numerics/Quaternion.cs | 2 +- src/System.Numerics.Vectors/src/System/Numerics/Vector2.cs | 4 ++-- src/System.Numerics.Vectors/src/System/Numerics/Vector3.cs | 4 ++-- src/System.Numerics.Vectors/src/System/Numerics/Vector4.cs | 4 ++-- 8 files changed, 11 insertions(+), 10 deletions(-) diff --git a/src/System.Numerics.Vectors/src/System.Numerics.Vectors.csproj b/src/System.Numerics.Vectors/src/System.Numerics.Vectors.csproj index 66e40f18733e..29b641c1083f 100644 --- a/src/System.Numerics.Vectors/src/System.Numerics.Vectors.csproj +++ b/src/System.Numerics.Vectors/src/System.Numerics.Vectors.csproj @@ -7,6 +7,7 @@ true $(DefineConstants);HAS_INTRINSICS netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release;uapaot-Windows_NT-Debug;uapaot-Windows_NT-Release + enable diff --git a/src/System.Numerics.Vectors/src/System/Numerics/Matrix3x2.cs b/src/System.Numerics.Vectors/src/System/Numerics/Matrix3x2.cs index 8960138b5bef..9c9ab1eb1d53 100644 --- a/src/System.Numerics.Vectors/src/System/Numerics/Matrix3x2.cs +++ b/src/System.Numerics.Vectors/src/System/Numerics/Matrix3x2.cs @@ -771,7 +771,7 @@ public readonly bool Equals(Matrix3x2 other) /// /// The Object to compare against. /// True if the Object is equal to this matrix; False otherwise. - public override readonly bool Equals(object obj) + public override readonly bool Equals(object? obj) { if (obj is Matrix3x2) { diff --git a/src/System.Numerics.Vectors/src/System/Numerics/Matrix4x4.cs b/src/System.Numerics.Vectors/src/System/Numerics/Matrix4x4.cs index aedbc4a693ad..b7b25d9b34f4 100644 --- a/src/System.Numerics.Vectors/src/System/Numerics/Matrix4x4.cs +++ b/src/System.Numerics.Vectors/src/System/Numerics/Matrix4x4.cs @@ -2186,7 +2186,7 @@ public static unsafe Matrix4x4 Lerp(Matrix4x4 matrix1, Matrix4x4 matrix2, float /// /// The Object to compare against. /// True if the Object is equal to this matrix; False otherwise. - public override readonly bool Equals(object obj) => (obj is Matrix4x4 other) && (this == other); + public override readonly bool Equals(object? obj) => (obj is Matrix4x4 other) && (this == other); /// /// Returns a String representing this matrix instance. diff --git a/src/System.Numerics.Vectors/src/System/Numerics/Plane.cs b/src/System.Numerics.Vectors/src/System/Numerics/Plane.cs index 65b43604796c..aa6ab4ff3d02 100644 --- a/src/System.Numerics.Vectors/src/System/Numerics/Plane.cs +++ b/src/System.Numerics.Vectors/src/System/Numerics/Plane.cs @@ -335,7 +335,7 @@ public readonly bool Equals(Plane other) /// The Object to compare against. /// True if the Object is equal to this Plane; False otherwise. [MethodImpl(MethodImplOptions.AggressiveInlining)] - public override readonly bool Equals(object obj) + public override readonly bool Equals(object? obj) { if (obj is Plane) { diff --git a/src/System.Numerics.Vectors/src/System/Numerics/Quaternion.cs b/src/System.Numerics.Vectors/src/System/Numerics/Quaternion.cs index dd9ba1ae1b55..4a127c62d338 100644 --- a/src/System.Numerics.Vectors/src/System/Numerics/Quaternion.cs +++ b/src/System.Numerics.Vectors/src/System/Numerics/Quaternion.cs @@ -761,7 +761,7 @@ public readonly bool Equals(Quaternion other) /// /// The Object to compare against. /// True if the Object is equal to this Quaternion; False otherwise. - public override readonly bool Equals(object obj) + public override readonly bool Equals(object? obj) { if (obj is Quaternion) { diff --git a/src/System.Numerics.Vectors/src/System/Numerics/Vector2.cs b/src/System.Numerics.Vectors/src/System/Numerics/Vector2.cs index ac195d640067..1826d3902bb6 100644 --- a/src/System.Numerics.Vectors/src/System/Numerics/Vector2.cs +++ b/src/System.Numerics.Vectors/src/System/Numerics/Vector2.cs @@ -65,7 +65,7 @@ public override readonly int GetHashCode() /// The Object to compare against. /// True if the Object is equal to this Vector2; False otherwise. [MethodImpl(MethodImplOptions.AggressiveInlining)] - public override readonly bool Equals(object obj) + public override readonly bool Equals(object? obj) { if (!(obj is Vector2)) return false; @@ -98,7 +98,7 @@ public readonly string ToString(string format) /// The format of individual elements. /// The format provider to use when formatting elements. /// The string representation. - public readonly string ToString(string format, IFormatProvider formatProvider) + public readonly string ToString(string? format, IFormatProvider? formatProvider) { StringBuilder sb = new StringBuilder(); string separator = NumberFormatInfo.GetInstance(formatProvider).NumberGroupSeparator; diff --git a/src/System.Numerics.Vectors/src/System/Numerics/Vector3.cs b/src/System.Numerics.Vectors/src/System/Numerics/Vector3.cs index 105fce667207..19e62f456962 100644 --- a/src/System.Numerics.Vectors/src/System/Numerics/Vector3.cs +++ b/src/System.Numerics.Vectors/src/System/Numerics/Vector3.cs @@ -71,7 +71,7 @@ public override readonly int GetHashCode() /// The Object to compare against. /// True if the Object is equal to this Vector3; False otherwise. [MethodImpl(MethodImplOptions.AggressiveInlining)] - public override readonly bool Equals(object obj) + public override readonly bool Equals(object? obj) { if (!(obj is Vector3)) return false; @@ -104,7 +104,7 @@ public readonly string ToString(string format) /// The format of individual elements. /// The format provider to use when formatting elements. /// The string representation. - public readonly string ToString(string format, IFormatProvider formatProvider) + public readonly string ToString(string? format, IFormatProvider? formatProvider) { StringBuilder sb = new StringBuilder(); string separator = NumberFormatInfo.GetInstance(formatProvider).NumberGroupSeparator; diff --git a/src/System.Numerics.Vectors/src/System/Numerics/Vector4.cs b/src/System.Numerics.Vectors/src/System/Numerics/Vector4.cs index a65b72addcf0..cdabf678be60 100644 --- a/src/System.Numerics.Vectors/src/System/Numerics/Vector4.cs +++ b/src/System.Numerics.Vectors/src/System/Numerics/Vector4.cs @@ -75,7 +75,7 @@ public override readonly int GetHashCode() /// The Object to compare against. /// True if the Object is equal to this Vector4; False otherwise. [MethodImpl(MethodImplOptions.AggressiveInlining)] - public override readonly bool Equals(object obj) + public override readonly bool Equals(object? obj) { if (!(obj is Vector4)) return false; @@ -108,7 +108,7 @@ public readonly string ToString(string format) /// The format of individual elements. /// The format provider to use when formatting elements. /// The string representation. - public readonly string ToString(string format, IFormatProvider formatProvider) + public readonly string ToString(string? format, IFormatProvider? formatProvider) { StringBuilder sb = new StringBuilder(); string separator = NumberFormatInfo.GetInstance(formatProvider).NumberGroupSeparator; From 0c9b71cda7e14cdbac387750458280eabfb5bc23 Mon Sep 17 00:00:00 2001 From: Stephen Toub Date: Wed, 17 Apr 2019 22:11:11 -0400 Subject: [PATCH 280/607] Nullable: System.Diagnostics.StackTrace.dll --- .../src/System.Diagnostics.StackTrace.csproj | 1 + .../Diagnostics/StackTraceSymbols.CoreCLR.cs | 26 ++++++++++--------- .../Diagnostics/SymbolStore/ISymbolBinder.cs | 4 +-- .../Diagnostics/SymbolStore/ISymbolMethod.cs | 18 ++++++------- .../Diagnostics/SymbolStore/ISymbolReader.cs | 6 ++--- .../Diagnostics/SymbolStore/SymbolToken.cs | 2 +- 6 files changed, 30 insertions(+), 27 deletions(-) diff --git a/src/System.Diagnostics.StackTrace/src/System.Diagnostics.StackTrace.csproj b/src/System.Diagnostics.StackTrace/src/System.Diagnostics.StackTrace.csproj index dec6946da378..a7653f9c4ef4 100644 --- a/src/System.Diagnostics.StackTrace/src/System.Diagnostics.StackTrace.csproj +++ b/src/System.Diagnostics.StackTrace/src/System.Diagnostics.StackTrace.csproj @@ -4,6 +4,7 @@ {02304469-722E-4723-92A1-820B9A37D275} true true + enable $(NoWarn);1685 netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release;uapaot-Windows_NT-Debug;uapaot-Windows_NT-Release diff --git a/src/System.Diagnostics.StackTrace/src/System/Diagnostics/StackTraceSymbols.CoreCLR.cs b/src/System.Diagnostics.StackTrace/src/System/Diagnostics/StackTraceSymbols.CoreCLR.cs index 0073e7235b4d..8d6155e4f7a0 100644 --- a/src/System.Diagnostics.StackTrace/src/System/Diagnostics/StackTraceSymbols.CoreCLR.cs +++ b/src/System.Diagnostics.StackTrace/src/System/Diagnostics/StackTraceSymbols.CoreCLR.cs @@ -13,14 +13,14 @@ namespace System.Diagnostics { internal class StackTraceSymbols : IDisposable { - private readonly ConditionalWeakTable _metadataCache; + private readonly ConditionalWeakTable _metadataCache; /// /// Create an instance of this class. /// public StackTraceSymbols() { - _metadataCache = new ConditionalWeakTable(); + _metadataCache = new ConditionalWeakTable(); } /// @@ -28,7 +28,9 @@ public StackTraceSymbols() /// void IDisposable.Dispose() { - foreach ((Assembly _, MetadataReaderProvider provider) in _metadataCache) +#pragma warning disable CS8619 // TODO-NULLABLE: Compiler complains about `provider` + foreach ((Assembly _, MetadataReaderProvider? provider) in _metadataCache) +#pragma warning restore CS8619 { provider?.Dispose(); } @@ -52,13 +54,13 @@ void IDisposable.Dispose() /// column return internal void GetSourceLineInfo(Assembly assembly, string assemblyPath, IntPtr loadedPeAddress, int loadedPeSize, IntPtr inMemoryPdbAddress, int inMemoryPdbSize, int methodToken, int ilOffset, - out string sourceFile, out int sourceLine, out int sourceColumn) + out string? sourceFile, out int sourceLine, out int sourceColumn) { sourceFile = null; sourceLine = 0; sourceColumn = 0; - MetadataReader reader = TryGetReader(assembly, assemblyPath, loadedPeAddress, loadedPeSize, inMemoryPdbAddress, inMemoryPdbSize); + MetadataReader? reader = TryGetReader(assembly, assemblyPath, loadedPeAddress, loadedPeSize, inMemoryPdbAddress, inMemoryPdbSize); if (reader != null) { Handle handle = MetadataTokens.Handle(methodToken); @@ -114,7 +116,7 @@ internal void GetSourceLineInfo(Assembly assembly, string assemblyPath, IntPtr l /// underlying ConditionalWeakTable doesn't keep the assembly alive, so cached types will be /// correctly invalidated when the Assembly is unloaded by the GC. /// - private unsafe MetadataReader TryGetReader(Assembly assembly, string assemblyPath, IntPtr loadedPeAddress, int loadedPeSize, IntPtr inMemoryPdbAddress, int inMemoryPdbSize) + private unsafe MetadataReader? TryGetReader(Assembly assembly, string assemblyPath, IntPtr loadedPeAddress, int loadedPeSize, IntPtr inMemoryPdbAddress, int inMemoryPdbSize) { if ((loadedPeAddress == IntPtr.Zero || assemblyPath == null) && inMemoryPdbAddress == IntPtr.Zero) { @@ -124,7 +126,7 @@ private unsafe MetadataReader TryGetReader(Assembly assembly, string assemblyPat // The ConditionalWeakTable's GetValue + callback will atomically create the cache entry for us // so we are protected from multiple threads racing to get/create the same MetadataReaderProvider - MetadataReaderProvider provider = _metadataCache.GetValue(assembly, (assembly) => + MetadataReaderProvider? provider = _metadataCache.GetValue(assembly, (assembly) => { return (inMemoryPdbAddress != IntPtr.Zero) ? TryOpenReaderForInMemoryPdb(inMemoryPdbAddress, inMemoryPdbSize) : @@ -135,7 +137,7 @@ private unsafe MetadataReader TryGetReader(Assembly assembly, string assemblyPat return provider?.GetMetadataReader(); } - private static unsafe MetadataReaderProvider TryOpenReaderForInMemoryPdb(IntPtr inMemoryPdbAddress, int inMemoryPdbSize) + private static unsafe MetadataReaderProvider? TryOpenReaderForInMemoryPdb(IntPtr inMemoryPdbAddress, int inMemoryPdbSize) { Debug.Assert(inMemoryPdbAddress != IntPtr.Zero); @@ -161,7 +163,7 @@ private static unsafe MetadataReaderProvider TryOpenReaderForInMemoryPdb(IntPtr } } - private static unsafe PEReader TryGetPEReader(string assemblyPath, IntPtr loadedPeAddress, int loadedPeSize) + private static unsafe PEReader? TryGetPEReader(string? assemblyPath, IntPtr loadedPeAddress, int loadedPeSize) { // TODO: https://github.com/dotnet/corefx/issues/11406 //if (loadedPeAddress != IntPtr.Zero && loadedPeSize > 0) @@ -169,7 +171,7 @@ private static unsafe PEReader TryGetPEReader(string assemblyPath, IntPtr loaded // return new PEReader((byte*)loadedPeAddress, loadedPeSize, isLoadedImage: true); //} - Stream peStream = TryOpenFile(assemblyPath); + Stream? peStream = TryOpenFile(assemblyPath); if (peStream != null) { return new PEReader(peStream); @@ -178,7 +180,7 @@ private static unsafe PEReader TryGetPEReader(string assemblyPath, IntPtr loaded return null; } - private static MetadataReaderProvider TryOpenReaderFromAssemblyFile(string assemblyPath, IntPtr loadedPeAddress, int loadedPeSize) + private static MetadataReaderProvider? TryOpenReaderFromAssemblyFile(string? assemblyPath, IntPtr loadedPeAddress, int loadedPeSize) { using (var peReader = TryGetPEReader(assemblyPath, loadedPeAddress, loadedPeSize)) { @@ -201,7 +203,7 @@ private static MetadataReaderProvider TryOpenReaderFromAssemblyFile(string assem return null; } - private static Stream TryOpenFile(string path) + private static Stream? TryOpenFile(string? path) { if (!File.Exists(path)) { diff --git a/src/System.Diagnostics.StackTrace/src/System/Diagnostics/SymbolStore/ISymbolBinder.cs b/src/System.Diagnostics.StackTrace/src/System/Diagnostics/SymbolStore/ISymbolBinder.cs index c8e8d112459f..4a7b8492f507 100644 --- a/src/System.Diagnostics.StackTrace/src/System/Diagnostics/SymbolStore/ISymbolBinder.cs +++ b/src/System.Diagnostics.StackTrace/src/System/Diagnostics/SymbolStore/ISymbolBinder.cs @@ -9,11 +9,11 @@ public interface ISymbolBinder // The importer parameter should be an IntPtr, not an int. This interface can not be modified without // a breaking change, and so ISymbolBinderEx.GetReader() has been added with the correct marshalling layout. [Obsolete("The recommended alternative is ISymbolBinder1.GetReader. ISymbolBinder1.GetReader takes the importer interface pointer as an IntPtr instead of an Int32, and thus works on both 32-bit and 64-bit architectures. https://go.microsoft.com/fwlink/?linkid=14202=14202")] - ISymbolReader GetReader(int importer, string filename, string searchPath); + ISymbolReader? GetReader(int importer, string filename, string searchPath); } public interface ISymbolBinder1 { - ISymbolReader GetReader(IntPtr importer, string filename, string searchPath); + ISymbolReader? GetReader(IntPtr importer, string filename, string searchPath); } } diff --git a/src/System.Diagnostics.StackTrace/src/System/Diagnostics/SymbolStore/ISymbolMethod.cs b/src/System.Diagnostics.StackTrace/src/System/Diagnostics/SymbolStore/ISymbolMethod.cs index 15f642006324..3139bdc1e534 100644 --- a/src/System.Diagnostics.StackTrace/src/System/Diagnostics/SymbolStore/ISymbolMethod.cs +++ b/src/System.Diagnostics.StackTrace/src/System/Diagnostics/SymbolStore/ISymbolMethod.cs @@ -19,12 +19,12 @@ public interface ISymbolMethod // GetSequencePoints will verify the size of each array and place // the sequence point information into each. If any array is NULL, // then the data for that array is simply not returned. - void GetSequencePoints(int[] offsets, - ISymbolDocument[] documents, - int[] lines, - int[] columns, - int[] endLines, - int[] endColumns); + void GetSequencePoints(int[]? offsets, + ISymbolDocument[]? documents, + int[]? lines, + int[]? columns, + int[]? endLines, + int[]? endColumns); // Get the root lexical scope for this method. This scope encloses // the entire method. @@ -62,8 +62,8 @@ int[] GetRanges(ISymbolDocument document, // method. The first array position is the start while the second // is the end. Returns true if positions were defined, false // otherwise. - bool GetSourceStartEnd(ISymbolDocument[] docs, - int[] lines, - int[] columns); + bool GetSourceStartEnd(ISymbolDocument[]? docs, + int[]? lines, + int[]? columns); } } diff --git a/src/System.Diagnostics.StackTrace/src/System/Diagnostics/SymbolStore/ISymbolReader.cs b/src/System.Diagnostics.StackTrace/src/System/Diagnostics/SymbolStore/ISymbolReader.cs index 3b5b56105264..7b48bd4092b8 100644 --- a/src/System.Diagnostics.StackTrace/src/System/Diagnostics/SymbolStore/ISymbolReader.cs +++ b/src/System.Diagnostics.StackTrace/src/System/Diagnostics/SymbolStore/ISymbolReader.cs @@ -8,7 +8,7 @@ public interface ISymbolReader { // Find a document. Language, vendor, and document type are // optional. - ISymbolDocument GetDocument(string url, + ISymbolDocument? GetDocument(string url, Guid language, Guid languageVendor, Guid documentType); @@ -23,12 +23,12 @@ ISymbolDocument GetDocument(string url, SymbolToken UserEntryPoint { get; } // Get a symbol reader method given the id of a method. - ISymbolMethod GetMethod(SymbolToken method); + ISymbolMethod? GetMethod(SymbolToken method); // Get a symbol reader method given the id of a method and an E&C // version number. Version numbers start a 1 and are incremented // each time the method is changed due to an E&C operation. - ISymbolMethod GetMethod(SymbolToken method, int version); + ISymbolMethod? GetMethod(SymbolToken method, int version); // Return a non-local variable given its parent and name. ISymbolVariable[] GetVariables(SymbolToken parent); diff --git a/src/System.Diagnostics.StackTrace/src/System/Diagnostics/SymbolStore/SymbolToken.cs b/src/System.Diagnostics.StackTrace/src/System/Diagnostics/SymbolStore/SymbolToken.cs index 94badd217f3c..edc5a1b064fd 100644 --- a/src/System.Diagnostics.StackTrace/src/System/Diagnostics/SymbolStore/SymbolToken.cs +++ b/src/System.Diagnostics.StackTrace/src/System/Diagnostics/SymbolStore/SymbolToken.cs @@ -17,7 +17,7 @@ public SymbolToken(int val) public override int GetHashCode() => _token; - public override bool Equals(object obj) + public override bool Equals(object? obj) { if (obj is SymbolToken) return Equals((SymbolToken)obj); From 9cf92cbef7cf5fcf46a1b556f9c6250e67d421ab Mon Sep 17 00:00:00 2001 From: Stephen Toub Date: Wed, 17 Apr 2019 22:42:16 -0400 Subject: [PATCH 281/607] Nullable: System.Collections.Concurrent.dll --- .../src/System.Collections.Concurrent.csproj | 1 + .../Concurrent/BlockingCollection.cs | 55 ++++++------ .../Collections/Concurrent/ConcurrentBag.cs | 86 +++++++++---------- .../Concurrent/ConcurrentDictionary.cs | 63 +++++++------- .../Collections/Concurrent/ConcurrentStack.cs | 50 +++++------ .../Concurrent/OrderablePartitioner.cs | 4 +- .../Concurrent/PartitionerStatic.cs | 35 ++++---- 7 files changed, 148 insertions(+), 146 deletions(-) diff --git a/src/System.Collections.Concurrent/src/System.Collections.Concurrent.csproj b/src/System.Collections.Concurrent/src/System.Collections.Concurrent.csproj index 5abdb75d19c2..af4c27e3e44f 100644 --- a/src/System.Collections.Concurrent/src/System.Collections.Concurrent.csproj +++ b/src/System.Collections.Concurrent/src/System.Collections.Concurrent.csproj @@ -4,6 +4,7 @@ System.Collections.Concurrent System.Collections.Concurrent true + enable netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release;uapaot-Windows_NT-Debug;uapaot-Windows_NT-Release diff --git a/src/System.Collections.Concurrent/src/System/Collections/Concurrent/BlockingCollection.cs b/src/System.Collections.Concurrent/src/System/Collections/Concurrent/BlockingCollection.cs index e29f1f65f31c..ba0cf8bdfade 100644 --- a/src/System.Collections.Concurrent/src/System/Collections/Concurrent/BlockingCollection.cs +++ b/src/System.Collections.Concurrent/src/System/Collections/Concurrent/BlockingCollection.cs @@ -15,7 +15,6 @@ using System.Collections.Generic; using System.Diagnostics; using System.Globalization; -using System.Runtime.InteropServices; using System.Threading; namespace System.Collections.Concurrent @@ -43,14 +42,14 @@ namespace System.Collections.Concurrent [DebuggerDisplay("Count = {Count}, Type = {_collection}")] public class BlockingCollection : IEnumerable, ICollection, IDisposable, IReadOnlyCollection { - private IProducerConsumerCollection _collection; + private IProducerConsumerCollection _collection = null!; private int _boundedCapacity; private const int NON_BOUNDED = -1; - private SemaphoreSlim _freeNodes; - private SemaphoreSlim _occupiedNodes; + private SemaphoreSlim? _freeNodes; + private SemaphoreSlim _occupiedNodes = null!; private bool _isDisposed; - private CancellationTokenSource _consumersCancellationTokenSource; - private CancellationTokenSource _producersCancellationTokenSource; + private CancellationTokenSource _consumersCancellationTokenSource = null!; + private CancellationTokenSource _producersCancellationTokenSource = null!; private volatile int _currentAdders; private const int COMPLETE_ADDING_ON_MASK = unchecked((int)0x80000000); @@ -413,7 +412,7 @@ private bool TryAddWithNoTimeValidation(T item, int millisecondsTimeout, Cancell { //If the _freeNodes semaphore threw OperationCanceledException then this means that CompleteAdding() //was called concurrently with Adding which is not supported by BlockingCollection. - CancellationTokenSource linkedTokenSource = null; + CancellationTokenSource? linkedTokenSource = null; try { waitForSemaphoreWasSuccessful = _freeNodes.Wait(0); @@ -579,7 +578,7 @@ public T Take(CancellationToken cancellationToken) /// The underlying collection was modified /// outside of this instance. - public bool TryTake(out T item) + public bool TryTake(out T item) // TODO-NULLABLE-GENERIC { return TryTake(out item, 0, CancellationToken.None); } @@ -601,7 +600,7 @@ public bool TryTake(out T item) /// The underlying collection was modified /// outside of this instance. - public bool TryTake(out T item, TimeSpan timeout) + public bool TryTake(out T item, TimeSpan timeout) // TODO-NULLABLE-GENERIC { ValidateTimeout(timeout); return TryTakeWithNoTimeValidation(out item, (int)timeout.TotalMilliseconds, CancellationToken.None, null); @@ -622,7 +621,7 @@ public bool TryTake(out T item, TimeSpan timeout) /// The underlying collection was modified /// outside of this instance. - public bool TryTake(out T item, int millisecondsTimeout) + public bool TryTake(out T item, int millisecondsTimeout) // TODO-NULLABLE-GENERIC { ValidateMillisecondsTimeout(millisecondsTimeout); return TryTakeWithNoTimeValidation(out item, millisecondsTimeout, CancellationToken.None, null); @@ -647,7 +646,7 @@ public bool TryTake(out T item, int millisecondsTimeout) /// The underlying collection was modified /// outside of this instance. - public bool TryTake(out T item, int millisecondsTimeout, CancellationToken cancellationToken) + public bool TryTake(out T item, int millisecondsTimeout, CancellationToken cancellationToken) // TODO-NULLABLE-GENERIC { ValidateMillisecondsTimeout(millisecondsTimeout); return TryTakeWithNoTimeValidation(out item, millisecondsTimeout, cancellationToken, null); @@ -669,10 +668,10 @@ public bool TryTake(out T item, int millisecondsTimeout, CancellationToken cance /// False if the collection remained empty till the timeout period was exhausted. True otherwise. /// If the is canceled. /// If the collection has been disposed. - private bool TryTakeWithNoTimeValidation(out T item, int millisecondsTimeout, CancellationToken cancellationToken, CancellationTokenSource combinedTokenSource) + private bool TryTakeWithNoTimeValidation(out T item, int millisecondsTimeout, CancellationToken cancellationToken, CancellationTokenSource? combinedTokenSource) // TODO-NULLABLE-GENERIC { CheckDisposed(); - item = default(T); + item = default(T)!; // TODO-NULLABLE-GENERIC if (cancellationToken.IsCancellationRequested) throw new OperationCanceledException(SR.Common_OperationCanceled, cancellationToken); @@ -685,14 +684,14 @@ private bool TryTakeWithNoTimeValidation(out T item, int millisecondsTimeout, Ca bool waitForSemaphoreWasSuccessful = false; // set the combined token source to the combinedToken parameter if it is not null (came from GetConsumingEnumerable) - CancellationTokenSource linkedTokenSource = combinedTokenSource; + CancellationTokenSource? linkedTokenSource = combinedTokenSource; try { waitForSemaphoreWasSuccessful = _occupiedNodes.Wait(0); if (waitForSemaphoreWasSuccessful == false && millisecondsTimeout != 0) { // create the linked token if it is not created yet - if (combinedTokenSource == null) + if (linkedTokenSource == null) linkedTokenSource = CancellationTokenSource.CreateLinkedTokenSource(cancellationToken, _consumersCancellationTokenSource.Token); waitForSemaphoreWasSuccessful = _occupiedNodes.Wait(millisecondsTimeout, linkedTokenSource.Token); @@ -795,7 +794,7 @@ public static int AddToAny(BlockingCollection[] collections, T item) #else return #endif - TryAddToAny(collections, item, Timeout.Infinite, CancellationToken.None); + TryAddToAny(collections, item, Timeout.Infinite, CancellationToken.None); #if DEBUG Debug.Assert((tryAddAnyReturnValue >= 0 && tryAddAnyReturnValue < collections.Length) , "TryAddToAny() was expected to return an index within the bounds of the collections array."); @@ -837,7 +836,7 @@ public static int AddToAny(BlockingCollection[] collections, T item, Cancella #else return #endif - TryAddToAny(collections, item, Timeout.Infinite, cancellationToken); + TryAddToAny(collections, item, Timeout.Infinite, cancellationToken); #if DEBUG Debug.Assert((tryAddAnyReturnValue >= 0 && tryAddAnyReturnValue < collections.Length) , "TryAddToAny() was expected to return an index within the bounds of the collections array."); @@ -1094,7 +1093,7 @@ private static List GetHandles(BlockingCollection[] collections, { if (collections[i]._freeNodes != null) { - handlesList.Add(collections[i]._freeNodes.AvailableWaitHandle); + handlesList.Add(collections[i]._freeNodes!.AvailableWaitHandle); // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/34644 tokensList.Add(collections[i]._producersCancellationTokenSource.Token); } } @@ -1167,7 +1166,7 @@ private static int UpdateTimeOut(uint startTime, int originalWaitMillisecondsTim /// The count of is greater than the maximum size of /// 62 for STA and 63 for MTA. /// A call to TakeFromAny may block until an item is available to be removed. - public static int TakeFromAny(BlockingCollection[] collections, out T item) + public static int TakeFromAny(BlockingCollection[] collections, out T item) // TODO-NULLABLE-GENERIC { return TakeFromAny(collections, out item, CancellationToken.None); } @@ -1196,7 +1195,7 @@ public static int TakeFromAny(BlockingCollection[] collections, out T item) /// The count of is greater than the maximum size of /// 62 for STA and 63 for MTA. /// A call to TakeFromAny may block until an item is available to be removed. - public static int TakeFromAny(BlockingCollection[] collections, out T item, CancellationToken cancellationToken) + public static int TakeFromAny(BlockingCollection[] collections, out T item, CancellationToken cancellationToken) // TODO-NULLABLE-GENERIC { int returnValue = TryTakeFromAnyCore(collections, out item, Timeout.Infinite, true, cancellationToken); Debug.Assert((returnValue >= 0 && returnValue < collections.Length) @@ -1224,7 +1223,7 @@ public static int TakeFromAny(BlockingCollection[] collections, out T item, C /// The count of is greater than the maximum size of /// 62 for STA and 63 for MTA. /// A call to TryTakeFromAny may block until an item is available to be removed. - public static int TryTakeFromAny(BlockingCollection[] collections, out T item) + public static int TryTakeFromAny(BlockingCollection[] collections, out T item) // TODO-NULLABLE-GENERIC { return TryTakeFromAny(collections, out item, 0); } @@ -1255,7 +1254,7 @@ public static int TryTakeFromAny(BlockingCollection[] collections, out T item /// The count of is greater than the maximum size of /// 62 for STA and 63 for MTA. /// A call to TryTakeFromAny may block until an item is available to be removed. - public static int TryTakeFromAny(BlockingCollection[] collections, out T item, TimeSpan timeout) + public static int TryTakeFromAny(BlockingCollection[] collections, out T item, TimeSpan timeout) // TODO-NULLABLE-GENERIC { ValidateTimeout(timeout); return TryTakeFromAnyCore(collections, out item, (int)timeout.TotalMilliseconds, false, CancellationToken.None); @@ -1285,7 +1284,7 @@ public static int TryTakeFromAny(BlockingCollection[] collections, out T item /// The count of is greater than the maximum size of /// 62 for STA and 63 for MTA. /// A call to TryTakeFromAny may block until an item is available to be removed. - public static int TryTakeFromAny(BlockingCollection[] collections, out T item, int millisecondsTimeout) + public static int TryTakeFromAny(BlockingCollection[] collections, out T item, int millisecondsTimeout) // TODO-NULLABLE-GENERIC { ValidateMillisecondsTimeout(millisecondsTimeout); return TryTakeFromAnyCore(collections, out item, millisecondsTimeout, false, CancellationToken.None); @@ -1319,7 +1318,7 @@ public static int TryTakeFromAny(BlockingCollection[] collections, out T item /// The count of is greater than the maximum size of /// 62 for STA and 63 for MTA. /// A call to TryTakeFromAny may block until an item is available to be removed. - public static int TryTakeFromAny(BlockingCollection[] collections, out T item, int millisecondsTimeout, CancellationToken cancellationToken) + public static int TryTakeFromAny(BlockingCollection[] collections, out T item, int millisecondsTimeout, CancellationToken cancellationToken) // TODO-NULLABLE-GENERIC { ValidateMillisecondsTimeout(millisecondsTimeout); return TryTakeFromAnyCore(collections, out item, millisecondsTimeout, false, cancellationToken); @@ -1342,7 +1341,7 @@ public static int TryTakeFromAny(BlockingCollection[] collections, out T item /// If the collections argument is a 0-length array or contains a /// null element. Also, if at least one of the collections has been marked complete for adds. /// If at least one of the collections has been disposed. - private static int TryTakeFromAnyCore(BlockingCollection[] collections, out T item, int millisecondsTimeout, bool isTakeOperation, CancellationToken externalCancellationToken) + private static int TryTakeFromAnyCore(BlockingCollection[] collections, out T item, int millisecondsTimeout, bool isTakeOperation, CancellationToken externalCancellationToken) // TODO-NULLABLE-GENERIC { ValidateCollectionsArray(collections, false); @@ -1376,7 +1375,7 @@ private static int TryTakeFromAnyCore(BlockingCollection[] collections, out T /// If the collections argument is a 0-length array or contains a /// null element. Also, if at least one of the collections has been marked complete for adds. /// If at least one of the collections has been disposed. - private static int TryTakeFromAnyCoreSlow(BlockingCollection[] collections, out T item, int millisecondsTimeout, bool isTakeOperation, CancellationToken externalCancellationToken) + private static int TryTakeFromAnyCoreSlow(BlockingCollection[] collections, out T item, int millisecondsTimeout, bool isTakeOperation, CancellationToken externalCancellationToken) // TODO-NULLABLE-GENERIC { const int OPERATION_FAILED = -1; @@ -1454,7 +1453,7 @@ private static int TryTakeFromAnyCoreSlow(BlockingCollection[] collections, o timeout = UpdateTimeOut(startTime, millisecondsTimeout); } - item = default(T); //case#2 + item = default(T)!; //case#2 // TODO-NULLABLE-GENERIC return OPERATION_FAILED; } @@ -1649,7 +1648,7 @@ public IEnumerable GetConsumingEnumerable() /// If the is canceled. public IEnumerable GetConsumingEnumerable(CancellationToken cancellationToken) { - CancellationTokenSource linkedTokenSource = null; + CancellationTokenSource? linkedTokenSource = null; try { linkedTokenSource = CancellationTokenSource.CreateLinkedTokenSource(cancellationToken, _consumersCancellationTokenSource.Token); diff --git a/src/System.Collections.Concurrent/src/System/Collections/Concurrent/ConcurrentBag.cs b/src/System.Collections.Concurrent/src/System/Collections/Concurrent/ConcurrentBag.cs index 59f97570d4e2..7a18348770f4 100644 --- a/src/System.Collections.Concurrent/src/System/Collections/Concurrent/ConcurrentBag.cs +++ b/src/System.Collections.Concurrent/src/System/Collections/Concurrent/ConcurrentBag.cs @@ -34,7 +34,7 @@ public class ConcurrentBag : IProducerConsumerCollection, IReadOnlyCollect /// The per-bag, per-thread work-stealing queues. private readonly ThreadLocal _locals; /// The head work stealing queue in a linked list of queues. - private volatile WorkStealingQueue _workStealingQueues; + private volatile WorkStealingQueue? _workStealingQueues; /// Number of times any list transitions from empty to non-empty. private long _emptyToNonEmptyListTransitionCount; @@ -61,7 +61,7 @@ public ConcurrentBag(IEnumerable collection) _locals = new ThreadLocal(); - WorkStealingQueue queue = GetCurrentThreadWorkStealingQueue(forceCreate: true); + WorkStealingQueue queue = GetCurrentThreadWorkStealingQueue(forceCreate: true)!; foreach (T item in collection) { queue.LocalPush(item, ref _emptyToNonEmptyListTransitionCount); @@ -75,7 +75,7 @@ public ConcurrentBag(IEnumerable collection) /// . The value can be a null reference /// (Nothing in Visual Basic) for reference types. public void Add(T item) => - GetCurrentThreadWorkStealingQueue(forceCreate: true) + GetCurrentThreadWorkStealingQueue(forceCreate: true)! .LocalPush(item, ref _emptyToNonEmptyListTransitionCount); /// @@ -98,9 +98,9 @@ bool IProducerConsumerCollection.TryAdd(T item) /// removed from the or the default value /// of if the operation failed. /// true if an object was removed successfully; otherwise, false. - public bool TryTake(out T result) + public bool TryTake(out T result) // TODO-NULLABLE-GENERIC { - WorkStealingQueue queue = GetCurrentThreadWorkStealingQueue(forceCreate: false); + WorkStealingQueue? queue = GetCurrentThreadWorkStealingQueue(forceCreate: false); return (queue != null && queue.TryLocalPop(out result)) || TrySteal(out result, take: true); } @@ -111,16 +111,16 @@ public bool TryTake(out T result) /// the or the default value of /// if the operation failed. /// true if and object was returned successfully; otherwise, false. - public bool TryPeek(out T result) + public bool TryPeek(out T result) // TODO-NULLABLE-GENERIC { - WorkStealingQueue queue = GetCurrentThreadWorkStealingQueue(forceCreate: false); + WorkStealingQueue? queue = GetCurrentThreadWorkStealingQueue(forceCreate: false); return (queue != null && queue.TryLocalPeek(out result)) || TrySteal(out result, take: false); } /// Gets the work-stealing queue data structure for the current thread. /// Whether to create a new queue if this thread doesn't have one. /// The local queue object, or null if the thread doesn't have one. - private WorkStealingQueue GetCurrentThreadWorkStealingQueue(bool forceCreate) => + private WorkStealingQueue? GetCurrentThreadWorkStealingQueue(bool forceCreate) => // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 _locals.Value ?? (forceCreate ? CreateWorkStealingQueueForCurrentThread() : null); @@ -128,9 +128,9 @@ private WorkStealingQueue CreateWorkStealingQueueForCurrentThread() { lock (GlobalQueuesLock) // necessary to update _workStealingQueues, so as to synchronize with freezing operations { - WorkStealingQueue head = _workStealingQueues; + WorkStealingQueue? head = _workStealingQueues; - WorkStealingQueue queue = head != null ? GetUnownedWorkStealingQueue() : null; + WorkStealingQueue? queue = head != null ? GetUnownedWorkStealingQueue() : null; if (queue == null) { _workStealingQueues = queue = new WorkStealingQueue(head); @@ -146,7 +146,7 @@ private WorkStealingQueue CreateWorkStealingQueueForCurrentThread() /// the bag purposefully retains its queue, as it contains data associated with the bag. /// /// The queue object, or null if no unowned queue could be gathered. - private WorkStealingQueue GetUnownedWorkStealingQueue() + private WorkStealingQueue? GetUnownedWorkStealingQueue() { Debug.Assert(Monitor.IsEntered(GlobalQueuesLock)); @@ -154,7 +154,7 @@ private WorkStealingQueue GetUnownedWorkStealingQueue() // but if our thread ID is reused, we know that no other thread can have the same ID and thus // no other thread can be using this queue. int currentThreadId = Environment.CurrentManagedThreadId; - for (WorkStealingQueue queue = _workStealingQueues; queue != null; queue = queue._nextQueue) + for (WorkStealingQueue? queue = _workStealingQueues; queue != null; queue = queue._nextQueue) { if (queue._ownerThreadId == currentThreadId) { @@ -209,7 +209,7 @@ private bool TrySteal(out T result, bool take) // and try to steal from each queue until we get a result. If there is a local queue from this thread, // then start from the next queue after it, and then iterate around back from the head to this queue, // not including it. - WorkStealingQueue localQueue = GetCurrentThreadWorkStealingQueue(forceCreate: false); + WorkStealingQueue? localQueue = GetCurrentThreadWorkStealingQueue(forceCreate: false); bool gotItem = localQueue == null ? TryStealFromTo(_workStealingQueues, null, out result, take) : (TryStealFromTo(localQueue._nextQueue, null, out result, take) || TryStealFromTo(_workStealingQueues, localQueue, out result, take)); @@ -234,17 +234,17 @@ private bool TrySteal(out T result, bool take) /// /// Attempts to steal from each queue starting from to . /// - private bool TryStealFromTo(WorkStealingQueue startInclusive, WorkStealingQueue endExclusive, out T result, bool take) + private bool TryStealFromTo(WorkStealingQueue? startInclusive, WorkStealingQueue? endExclusive, out T result, bool take) // TODO-NULLABLE-GENERIC { - for (WorkStealingQueue queue = startInclusive; queue != endExclusive; queue = queue._nextQueue) + for (WorkStealingQueue? queue = startInclusive; queue != endExclusive; queue = queue._nextQueue) { - if (queue.TrySteal(out result, take)) + if (queue!.TrySteal(out result, take)) { return true; } } - result = default(T); + result = default(T)!; // TODO-NULLABLE-GENERIC return false; } @@ -321,7 +321,7 @@ private int CopyFromEachQueueToArray(T[] array, int index) Debug.Assert(Monitor.IsEntered(GlobalQueuesLock)); int i = index; - for (WorkStealingQueue queue = _workStealingQueues; queue != null; queue = queue._nextQueue) + for (WorkStealingQueue? queue = _workStealingQueues; queue != null; queue = queue._nextQueue) { i += queue.DangerousCopyTo(array, i); } @@ -357,7 +357,7 @@ void ICollection.CopyTo(Array array, int index) { // If the destination is actually a T[], use the strongly-typed // overload that doesn't allocate/copy an extra array. - T[] szArray = array as T[]; + T[]? szArray = array as T[]; if (szArray != null) { CopyTo(szArray, index); @@ -418,7 +418,7 @@ public void Clear() } // Clear the local queue. - WorkStealingQueue local = GetCurrentThreadWorkStealingQueue(forceCreate: false); + WorkStealingQueue? local = GetCurrentThreadWorkStealingQueue(forceCreate: false); if (local != null) { local.LocalClear(); @@ -438,7 +438,7 @@ public void Clear() try { FreezeBag(ref lockTaken); - for (WorkStealingQueue queue = _workStealingQueues; queue != null; queue = queue._nextQueue) + for (WorkStealingQueue? queue = _workStealingQueues; queue != null; queue = queue._nextQueue) { T ignored; while (queue.TrySteal(out ignored, take: true)); @@ -516,7 +516,7 @@ private int DangerousCount get { int count = 0; - for (WorkStealingQueue queue = _workStealingQueues; queue != null; queue = queue._nextQueue) + for (WorkStealingQueue? queue = _workStealingQueues; queue != null; queue = queue._nextQueue) { checked { count += queue.DangerousCount; } } @@ -535,7 +535,7 @@ public bool IsEmpty get { // Fast-path based on the current thread's local queue. - WorkStealingQueue local = GetCurrentThreadWorkStealingQueue(forceCreate: false); + WorkStealingQueue? local = GetCurrentThreadWorkStealingQueue(forceCreate: false); if (local != null) { // We don't need the lock to check the local queue, as no other thread @@ -563,7 +563,7 @@ public bool IsEmpty try { FreezeBag(ref lockTaken); - for (WorkStealingQueue queue = _workStealingQueues; queue != null; queue = queue._nextQueue) + for (WorkStealingQueue? queue = _workStealingQueues; queue != null; queue = queue._nextQueue) { if (!queue.IsEmpty) { @@ -619,17 +619,17 @@ private void FreezeBag(ref bool lockTaken) // while a global operation is in progress. Debug.Assert(!Monitor.IsEntered(GlobalQueuesLock)); Monitor.Enter(GlobalQueuesLock, ref lockTaken); - WorkStealingQueue head = _workStealingQueues; // stable at least until GlobalQueuesLock is released in UnfreezeBag + WorkStealingQueue? head = _workStealingQueues; // stable at least until GlobalQueuesLock is released in UnfreezeBag // Then acquire all local queue locks, noting on each that it's been taken. - for (WorkStealingQueue queue = head; queue != null; queue = queue._nextQueue) + for (WorkStealingQueue? queue = head; queue != null; queue = queue._nextQueue) { Monitor.Enter(queue, ref queue._frozen); } Interlocked.MemoryBarrier(); // prevent reads of _currentOp from moving before writes to _frozen // Finally, wait for all unsynchronized operations on each queue to be done. - for (WorkStealingQueue queue = head; queue != null; queue = queue._nextQueue) + for (WorkStealingQueue? queue = head; queue != null; queue = queue._nextQueue) { if (queue._currentOp != (int)Operation.None) { @@ -648,7 +648,7 @@ private void UnfreezeBag(bool lockTaken) if (lockTaken) { // Release all of the individual queue locks. - for (WorkStealingQueue queue = _workStealingQueues; queue != null; queue = queue._nextQueue) + for (WorkStealingQueue? queue = _workStealingQueues; queue != null; queue = queue._nextQueue) { if (queue._frozen) { @@ -691,13 +691,13 @@ private sealed class WorkStealingQueue /// true if this queue's lock is held as part of a global freeze. internal bool _frozen; /// Next queue in the 's set of thread-local queues. - internal readonly WorkStealingQueue _nextQueue; + internal readonly WorkStealingQueue? _nextQueue; /// Thread ID that owns this queue. internal readonly int _ownerThreadId; /// Initialize the WorkStealingQueue. /// The next queue in the linked list of work-stealing queues. - internal WorkStealingQueue(WorkStealingQueue nextQueue) + internal WorkStealingQueue(WorkStealingQueue? nextQueue) { _ownerThreadId = Environment.CurrentManagedThreadId; _nextQueue = nextQueue; @@ -859,14 +859,14 @@ internal void LocalClear() /// Remove an item from the tail of the queue. /// The removed item - internal bool TryLocalPop(out T result) + internal bool TryLocalPop(out T result) // TODO-NULLABLE-GENERIC { Debug.Assert(Environment.CurrentManagedThreadId == _ownerThreadId); int tail = _tailIndex; if (_headIndex >= tail) { - result = default(T); + result = default(T)!; return false; } @@ -888,7 +888,7 @@ internal bool TryLocalPop(out T result) { int idx = tail & _mask; result = _array[idx]; - _array[idx] = default(T); + _array[idx] = default(T)!; // TODO-NULLABLE-GENERIC _addTakeCount--; return true; } @@ -902,7 +902,7 @@ internal bool TryLocalPop(out T result) // Element still available. Take it. int idx = tail & _mask; result = _array[idx]; - _array[idx] = default(T); + _array[idx] = default(T)!; _addTakeCount--; return true; } @@ -910,7 +910,7 @@ internal bool TryLocalPop(out T result) { // We encountered a race condition and the element was stolen, restore the tail. _tailIndex = tail + 1; - result = default(T); + result = default(T)!; // TODO-NULLABLE-GENERIC return false; } } @@ -928,7 +928,7 @@ internal bool TryLocalPop(out T result) /// Peek an item from the tail of the queue. /// the peeked item /// True if succeeded, false otherwise - internal bool TryLocalPeek(out T result) + internal bool TryLocalPeek(out T result) // TODO-NULLABLE-GENERIC { Debug.Assert(Environment.CurrentManagedThreadId == _ownerThreadId); @@ -954,14 +954,14 @@ internal bool TryLocalPeek(out T result) } } - result = default(T); + result = default(T)!; // TODO-NULLABLE-GENERIC return false; } /// Steal an item from the head of the queue. /// the removed item /// true to take the item; false to simply peek at it - internal bool TrySteal(out T result, bool take) + internal bool TrySteal(out T result, bool take) // TODO-NULLABLE-GENERIC { lock (this) { @@ -992,7 +992,7 @@ internal bool TrySteal(out T result, bool take) { int idx = head & _mask; result = _array[idx]; - _array[idx] = default(T); + _array[idx] = default(T)!; // TODO-NULLABLE-GENERIC _stealCount++; return true; } @@ -1011,7 +1011,7 @@ internal bool TrySteal(out T result, bool take) } // The queue was empty. - result = default(T); + result = default(T)!; // TODO-NULLABLE-GENERIC return false; } @@ -1079,7 +1079,7 @@ internal enum Operation private sealed class Enumerator : IEnumerator { private readonly T[] _array; - private T _current; + private T _current = default!; private int _index; public Enumerator(T[] array) @@ -1102,7 +1102,7 @@ public bool MoveNext() public T Current => _current; - object IEnumerator.Current + object? IEnumerator.Current { get { @@ -1117,7 +1117,7 @@ object IEnumerator.Current public void Reset() { _index = 0; - _current = default(T); + _current = default(T)!; // TODO-NULLABLE-GENERIC } public void Dispose() { } diff --git a/src/System.Collections.Concurrent/src/System/Collections/Concurrent/ConcurrentDictionary.cs b/src/System.Collections.Concurrent/src/System/Collections/Concurrent/ConcurrentDictionary.cs index 528eaa1efad2..71fb8b6df46d 100644 --- a/src/System.Collections.Concurrent/src/System/Collections/Concurrent/ConcurrentDictionary.cs +++ b/src/System.Collections.Concurrent/src/System/Collections/Concurrent/ConcurrentDictionary.cs @@ -15,7 +15,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Diagnostics; -using System.Reflection; using System.Runtime.CompilerServices; using System.Threading; @@ -32,7 +31,7 @@ namespace System.Collections.Concurrent /// [DebuggerTypeProxy(typeof(IDictionaryDebugView<,>))] [DebuggerDisplay("Count = {Count}")] - public class ConcurrentDictionary : IDictionary, IDictionary, IReadOnlyDictionary + public class ConcurrentDictionary : IDictionary, IDictionary, IReadOnlyDictionary where TKey : object { /// /// Tables that hold the internal state of the ConcurrentDictionary @@ -158,7 +157,7 @@ public ConcurrentDictionary(IEnumerable> collection) /// /// The /// implementation to use when comparing keys. - public ConcurrentDictionary(IEqualityComparer comparer) : this(DefaultConcurrencyLevel, DefaultCapacity, true, comparer) { } + public ConcurrentDictionary(IEqualityComparer? comparer) : this(DefaultConcurrencyLevel, DefaultCapacity, true, comparer) { } /// /// Initializes a new instance of the @@ -175,7 +174,7 @@ public ConcurrentDictionary(IEqualityComparer comparer) : this(DefaultConc /// implementation to use when comparing keys. /// is a null reference /// (Nothing in Visual Basic). - public ConcurrentDictionary(IEnumerable> collection, IEqualityComparer comparer) + public ConcurrentDictionary(IEnumerable> collection, IEqualityComparer? comparer) : this(comparer) { if (collection == null) throw new ArgumentNullException(nameof(collection)); @@ -203,7 +202,7 @@ public ConcurrentDictionary(IEnumerable> collection, /// /// contains one or more duplicate keys. public ConcurrentDictionary( - int concurrencyLevel, IEnumerable> collection, IEqualityComparer comparer) + int concurrencyLevel, IEnumerable> collection, IEqualityComparer? comparer) : this(concurrencyLevel, DefaultCapacity, false, comparer) { if (collection == null) throw new ArgumentNullException(nameof(collection)); @@ -246,12 +245,12 @@ private void InitializeFromCollection(IEnumerable> co /// is less than 1. -or- /// is less than 0. /// - public ConcurrentDictionary(int concurrencyLevel, int capacity, IEqualityComparer comparer) + public ConcurrentDictionary(int concurrencyLevel, int capacity, IEqualityComparer? comparer) : this(concurrencyLevel, capacity, false, comparer) { } - internal ConcurrentDictionary(int concurrencyLevel, int capacity, bool growLockArray, IEqualityComparer comparer) + internal ConcurrentDictionary(int concurrencyLevel, int capacity, bool growLockArray, IEqualityComparer? comparer) { if (concurrencyLevel < 1) { @@ -335,11 +334,11 @@ public bool ContainsKey(TKey key) /// true if an object was removed successfully; otherwise, false. /// is a null reference /// (Nothing in Visual Basic). - public bool TryRemove(TKey key, out TValue value) + public bool TryRemove(TKey key, out TValue value) // TODO-NULLABLE-GENERIC { if (key == null) ThrowKeyNullException(); - return TryRemoveInternal(key, out value, false, default(TValue)); + return TryRemoveInternal(key, out value, false, default(TValue)!); // TODO-NULLABLE-GENERIC } /// @@ -352,7 +351,7 @@ public bool TryRemove(TKey key, out TValue value) /// Whether removal of the key is conditional on its value. /// The conditional value to compare against if is true /// - private bool TryRemoveInternal(TKey key, out TValue value, bool matchValue, TValue oldValue) + private bool TryRemoveInternal(TKey key, out TValue value, bool matchValue, TValue oldValue) // TODO-NULLABLE-GENERIC { int hashcode = _comparer.GetHashCode(key); while (true) @@ -371,10 +370,10 @@ private bool TryRemoveInternal(TKey key, out TValue value, bool matchValue, TVal continue; } - Node prev = null; + Node? prev = null; for (Node curr = tables._buckets[bucketNo]; curr != null; curr = curr._next) { - Debug.Assert((prev == null && curr == tables._buckets[bucketNo]) || prev._next == curr); + Debug.Assert((prev == null && curr == tables._buckets[bucketNo]) || prev!._next == curr); if (hashcode == curr._hashcode && _comparer.Equals(curr._key, key)) { @@ -383,7 +382,7 @@ private bool TryRemoveInternal(TKey key, out TValue value, bool matchValue, TVal bool valuesMatch = EqualityComparer.Default.Equals(oldValue, curr._value); if (!valuesMatch) { - value = default(TValue); + value = default(TValue)!; // TODO-NULLABLE-GENERIC return false; } } @@ -405,7 +404,7 @@ private bool TryRemoveInternal(TKey key, out TValue value, bool matchValue, TVal } } - value = default(TValue); + value = default(TValue)!; // TODO-NULLABLE-GENERIC return false; } } @@ -423,13 +422,13 @@ private bool TryRemoveInternal(TKey key, out TValue value, bool matchValue, TVal /// otherwise, false. /// is a null reference /// (Nothing in Visual Basic). - public bool TryGetValue(TKey key, out TValue value) + public bool TryGetValue(TKey key, out TValue value) // TODO-NULLABLE-GENERIC { if (key == null) ThrowKeyNullException(); return TryGetValueInternal(key, _comparer.GetHashCode(key), out value); } - private bool TryGetValueInternal(TKey key, int hashcode, out TValue value) + private bool TryGetValueInternal(TKey key, int hashcode, out TValue value) // TODO-NULLABLE-GENERIC { Debug.Assert(_comparer.GetHashCode(key) == hashcode); @@ -453,7 +452,7 @@ private bool TryGetValueInternal(TKey key, int hashcode, out TValue value) n = n._next; } - value = default(TValue); + value = default(TValue)!; // TODO-NULLABLE-GENERIC return false; } @@ -518,10 +517,10 @@ private bool TryUpdateInternal(TKey key, int hashcode, TValue newValue, TValue c } // Try to find this key in the bucket - Node prev = null; + Node? prev = null; for (Node node = tables._buckets[bucketNo]; node != null; node = node._next) { - Debug.Assert((prev == null && node == tables._buckets[bucketNo]) || prev._next == node); + Debug.Assert((prev == null && node == tables._buckets[bucketNo]) || prev!._next == node); if (hashcode == node._hashcode && _comparer.Equals(node._key, key)) { if (valueComparer.Equals(node._value, comparisonValue)) @@ -778,10 +777,10 @@ private bool TryAddInternal(TKey key, int hashcode, TValue value, bool updateIfE } // Try to find this key in the bucket - Node prev = null; + Node? prev = null; for (Node node = tables._buckets[bucketNo]; node != null; node = node._next) { - Debug.Assert((prev == null && node == tables._buckets[bucketNo]) || prev._next == node); + Debug.Assert((prev == null && node == tables._buckets[bucketNo]) || prev!._next == node); if (hashcode == node._hashcode && _comparer.Equals(node._key, key)) { // The key was found in the dictionary. If updates are allowed, update the value for that key. @@ -905,7 +904,7 @@ private static void ThrowKeyNullException() [MethodImpl(MethodImplOptions.AggressiveInlining)] - private static void ThrowIfInvalidObjectValue(object value) + private static void ThrowIfInvalidObjectValue(object? value) { if (value != null) { @@ -914,7 +913,7 @@ private static void ThrowIfInvalidObjectValue(object value) ThrowValueNullException(); } } - else if (default(TValue) != null) + else if (default(TValue)! != null) // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/34757 { ThrowValueNullException(); } @@ -1468,13 +1467,13 @@ IEnumerator IEnumerable.GetEnumerator() /// -or- A value with the same key already exists in the . /// - void IDictionary.Add(object key, object value) + void IDictionary.Add(object key, object? value) { if (key == null) ThrowKeyNullException(); if (!(key is TKey)) throw new ArgumentException(SR.ConcurrentDictionary_TypeOfKeyIncorrect); ThrowIfInvalidObjectValue(value); - ((IDictionary)this).Add((TKey)key, (TValue)value); + ((IDictionary)this).Add((TKey)key, (TValue)value!); } /// @@ -1587,7 +1586,7 @@ ICollection IDictionary.Values /// of the /// - object IDictionary.this[object key] + object? IDictionary.this[object key] { get { @@ -1608,7 +1607,7 @@ object IDictionary.this[object key] if (!(key is TKey)) throw new ArgumentException(SR.ConcurrentDictionary_TypeOfKeyIncorrect); ThrowIfInvalidObjectValue(value); - ((ConcurrentDictionary)this)[(TKey)key] = (TValue)value; + ((ConcurrentDictionary)this)[(TKey)key] = (TValue)value!; // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 } } @@ -1663,21 +1662,21 @@ void ICollection.CopyTo(Array array, int index) // - an array of DictionaryEntry structs // - an array of objects - KeyValuePair[] pairs = array as KeyValuePair[]; + KeyValuePair[]? pairs = array as KeyValuePair[]; if (pairs != null) { CopyToPairs(pairs, index); return; } - DictionaryEntry[] entries = array as DictionaryEntry[]; + DictionaryEntry[]? entries = array as DictionaryEntry[]; if (entries != null) { CopyToEntries(entries, index); return; } - object[] objects = array as object[]; + object[]? objects = array as object[]; if (objects != null) { CopyToObjects(objects, index); @@ -2058,12 +2057,14 @@ public object Key get { return _enumerator.Current.Key; } } - public object Value + public object? Value { get { return _enumerator.Current.Value; } } +#pragma warning disable CS8612 // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/23268 public object Current +#pragma warning restore CS8612 { get { return Entry; } } diff --git a/src/System.Collections.Concurrent/src/System/Collections/Concurrent/ConcurrentStack.cs b/src/System.Collections.Concurrent/src/System/Collections/Concurrent/ConcurrentStack.cs index cd5d92158d0e..afe9725c0fd4 100644 --- a/src/System.Collections.Concurrent/src/System/Collections/Concurrent/ConcurrentStack.cs +++ b/src/System.Collections.Concurrent/src/System/Collections/Concurrent/ConcurrentStack.cs @@ -44,7 +44,7 @@ public class ConcurrentStack : IProducerConsumerCollection, IReadOnlyColle private class Node { internal readonly T _value; // Value of the node. - internal Node _next; // Next pointer. + internal Node? _next; // Next pointer. /// /// Constructs a new node with the specified value and no next node. @@ -57,7 +57,7 @@ internal Node(T value) } } - private volatile Node _head; // The stack is a singly linked list, and only remembers the head. + private volatile Node? _head; // The stack is a singly linked list, and only remembers the head. private const int BACKOFF_MAX_YIELDS = 8; // Arbitrary number to cap backoff. /// @@ -92,7 +92,7 @@ public ConcurrentStack(IEnumerable collection) private void InitializeFromCollection(IEnumerable collection) { // We just copy the contents of the collection to our stack. - Node lastNode = null; + Node? lastNode = null; foreach (T element in collection) { Node newNode = new Node(element); @@ -148,7 +148,7 @@ public int Count // they are being dequeued. If we ever changed this (e.g. to pool nodes somehow), // we'd need to revisit this implementation. - for (Node curr = _head; curr != null; curr = curr._next) + for (Node? curr = _head; curr != null; curr = curr._next) { count++; //we don't handle overflow, to be consistent with existing generic collection types in CLR } @@ -446,14 +446,14 @@ bool IProducerConsumerCollection.TryAdd(T item) /// the top of the or an /// unspecified value if the operation failed. /// true if and object was returned successfully; otherwise, false. - public bool TryPeek(out T result) + public bool TryPeek(out T result) // TODO-NULLABLE-GENERIC { - Node head = _head; + Node? head = _head; // If the stack is empty, return false; else return the element and true. if (head == null) { - result = default(T); + result = default(T)!; // TODO-NULLABLE-GENERIC return false; } else @@ -473,13 +473,13 @@ public bool TryPeek(out T result) /// true if an element was removed and returned from the top of the /// successfully; otherwise, false. - public bool TryPop(out T result) + public bool TryPop(out T result) // TODO-NULLABLE-GENERIC { - Node head = _head; + Node? head = _head; //stack is empty if (head == null) { - result = default(T); + result = default(T)!; // TODO-NULLABLE-GENERIC return false; } if (Interlocked.CompareExchange(ref _head, head._next, head) == head) @@ -558,11 +558,11 @@ public int TryPopRange(T[] items, int startIndex, int count) if (count == 0) return 0; - Node poppedHead; + Node? poppedHead; int nodesCount = TryPopCore(count, out poppedHead); if (nodesCount > 0) { - CopyRemovedItems(poppedHead, items, startIndex, nodesCount); + CopyRemovedItems(poppedHead!, items, startIndex, nodesCount); } return nodesCount; } @@ -572,17 +572,17 @@ public int TryPopRange(T[] items, int startIndex, int count) /// /// The popped item /// True if succeeded, false otherwise - private bool TryPopCore(out T result) + private bool TryPopCore(out T result) // TODO-NULLABLE-GENERIC { - Node poppedNode; + Node? poppedNode; if (TryPopCore(1, out poppedNode) == 1) { - result = poppedNode._value; + result = poppedNode!._value; // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 return true; } - result = default(T); + result = default(T)!; // TODO-NULLABLE-GENERIC return false; } @@ -597,16 +597,16 @@ private bool TryPopCore(out T result) /// /// The number of objects successfully popped from the top of /// the . - private int TryPopCore(int count, out Node poppedHead) + private int TryPopCore(int count, out Node? poppedHead) // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 { SpinWait spin = new SpinWait(); // Try to CAS the head with its current next. We stop when we succeed or // when we notice that the stack is empty, whichever comes first. - Node head; + Node? head; Node next; int backoff = 1; - Random r = null; + Random? r = null; while (true) { head = _head; @@ -671,10 +671,10 @@ private int TryPopCore(int count, out Node poppedHead) /// The number of nodes. private static void CopyRemovedItems(Node head, T[] collection, int startIndex, int nodesCount) { - Node current = head; + Node? current = head; for (int i = startIndex; i < startIndex + nodesCount; i++) { - collection[i] = current._value; + collection[i] = current!._value; current = current._next; } } @@ -703,7 +703,7 @@ bool IProducerConsumerCollection.TryTake(out T item) /// cref="ConcurrentStack{T}"/>. public T[] ToArray() { - Node curr = _head; + Node? curr = _head; return curr == null ? Array.Empty() : ToList(curr).ToArray(); @@ -723,7 +723,7 @@ private List ToList() /// Returns an array containing a snapshot of the list's contents starting at the specified node. /// /// A list of the stack's contents starting at the specified node. - private List ToList(Node curr) + private List ToList(Node? curr) { List list = new List(); @@ -759,9 +759,9 @@ public IEnumerator GetEnumerator() return GetEnumerator(_head); } - private IEnumerator GetEnumerator(Node head) + private IEnumerator GetEnumerator(Node? head) { - Node current = head; + Node? current = head; while (current != null) { yield return current._value; diff --git a/src/System.Collections.Concurrent/src/System/Collections/Concurrent/OrderablePartitioner.cs b/src/System.Collections.Concurrent/src/System/Collections/Concurrent/OrderablePartitioner.cs index 1fa639f7f6e6..7135dcfa7406 100644 --- a/src/System.Collections.Concurrent/src/System/Collections/Concurrent/OrderablePartitioner.cs +++ b/src/System.Collections.Concurrent/src/System/Collections/Concurrent/OrderablePartitioner.cs @@ -230,7 +230,7 @@ IEnumerator IEnumerable.GetEnumerator() } public void Dispose() { - IDisposable d = _source as IDisposable; + IDisposable? d = _source as IDisposable; if (d != null) { d.Dispose(); @@ -256,7 +256,7 @@ public TSource Current return _source.Current.Value; } } - object IEnumerator.Current + object? IEnumerator.Current { get { diff --git a/src/System.Collections.Concurrent/src/System/Collections/Concurrent/PartitionerStatic.cs b/src/System.Collections.Concurrent/src/System/Collections/Concurrent/PartitionerStatic.cs index 4c8162a1abdc..952207c0fd64 100644 --- a/src/System.Collections.Concurrent/src/System/Collections/Concurrent/PartitionerStatic.cs +++ b/src/System.Collections.Concurrent/src/System/Collections/Concurrent/PartitionerStatic.cs @@ -321,10 +321,10 @@ private abstract class DynamicPartitionEnumerator_Abstract /// Get the current element in the current partition. Property required by IEnumerator interface /// - object IEnumerator.Current + object? IEnumerator.Current { get { @@ -429,6 +429,7 @@ public bool MoveNext() _currentChunkSize = new SharedInt(0); _doublingCountdown = CHUNK_DOUBLING_RATE; } + Debug.Assert(_currentChunkSize != null); if (_localOffset.Value < _currentChunkSize.Value - 1) //attempt to grab the next element from the local chunk @@ -553,7 +554,7 @@ private class InternalPartitionEnumerable : IEnumerable _sharedReader; private SharedLong _sharedIndex;//initial value -1 - private volatile KeyValuePair[] _fillBuffer; // intermediate buffer to reduce locking + private volatile KeyValuePair[]? _fillBuffer; // intermediate buffer to reduce locking private volatile int _fillBufferSize; // actual number of elements in _FillBuffer. Will start // at _FillBuffer.Length, and might be reduced during the last refill private volatile int _fillBufferCurrentPosition; //shared value to be accessed by Interlock.Increment only @@ -570,7 +571,7 @@ private class InternalPartitionEnumerable : IEnumerable[] destArray, // making a local defensive copy of the fill buffer reference, just in case it gets nulled out - KeyValuePair[] fillBufferLocalRef = _fillBuffer; + KeyValuePair[]? fillBufferLocalRef = _fillBuffer; if (fillBufferLocalRef == null) return; // first do a quick check, and give up if the current position is at the end @@ -885,12 +886,12 @@ private class InternalPartitionEnumerator : DynamicPartitionEnumerator_Abstract< { //---- fields ---- //cached local copy of the current chunk - private KeyValuePair[] _localList; //defer allocating to avoid false sharing + private KeyValuePair[]? _localList; //defer allocating to avoid false sharing // the values of the following two fields are passed in from // outside(already initialized) by the constructor, private readonly SharedBool _hasNoElementsLeft; - private readonly SharedInt _activePartitionCount; + private readonly SharedInt? _activePartitionCount; private InternalPartitionEnumerable _enumerable; //constructor @@ -898,7 +899,7 @@ internal InternalPartitionEnumerator( IEnumerator sharedReader, SharedLong sharedIndex, SharedBool hasNoElementsLeft, - SharedInt activePartitionCount, + SharedInt? activePartitionCount, InternalPartitionEnumerable enumerable, bool useSingleChunking) : base(sharedReader, sharedIndex, useSingleChunking) @@ -941,7 +942,7 @@ override protected bool GrabNextChunk(int requestedChunkSize) #pragma warning disable 0420 // TODO: https://github.com/dotnet/corefx/issues/35022 // make the actual call to the enumerable that grabs a chunk - return _enumerable.GrabChunk(_localList, requestedChunkSize, ref _currentChunkSize.Value); + return _enumerable.GrabChunk(_localList, requestedChunkSize, ref _currentChunkSize!.Value); #pragma warning restore 0420 } @@ -969,7 +970,7 @@ override public KeyValuePair Current throw new InvalidOperationException(SR.PartitionerStatic_CurrentCalledBeforeMoveNext); } Debug.Assert(_localList != null); - Debug.Assert(_localOffset.Value >= 0 && _localOffset.Value < _currentChunkSize.Value); + Debug.Assert(_localOffset!.Value >= 0 && _localOffset.Value < _currentChunkSize.Value); return (_localList[_localOffset.Value]); } } @@ -1133,8 +1134,8 @@ override protected bool GrabNextChunk(int requestedChunkSize) //set up local indexes. //_currentChunkSize is always set to requestedChunkSize when source data had //enough elements of what we requested - _currentChunkSize.Value = (int)(newSharedIndex - oldSharedIndex); - _localOffset.Value = -1; + _currentChunkSize!.Value = (int)(newSharedIndex - oldSharedIndex); + _localOffset!.Value = -1; _startIndex = (int)(oldSharedIndex + 1); return true; } @@ -1242,7 +1243,7 @@ override public KeyValuePair Current throw new InvalidOperationException(SR.PartitionerStatic_CurrentCalledBeforeMoveNext); } - Debug.Assert(_localOffset.Value >= 0 && _localOffset.Value < _currentChunkSize.Value); + Debug.Assert(_localOffset!.Value >= 0 && _localOffset.Value < _currentChunkSize.Value); return new KeyValuePair(_startIndex + _localOffset.Value, _sharedReader[_startIndex + _localOffset.Value]); } @@ -1326,7 +1327,7 @@ override public KeyValuePair Current throw new InvalidOperationException(SR.PartitionerStatic_CurrentCalledBeforeMoveNext); } - Debug.Assert(_localOffset.Value >= 0 && _localOffset.Value < _currentChunkSize.Value); + Debug.Assert(_localOffset!.Value >= 0 && _localOffset.Value < _currentChunkSize.Value); return new KeyValuePair(_startIndex + _localOffset.Value, _sharedReader[_startIndex + _localOffset.Value]); } @@ -1492,7 +1493,7 @@ public bool MoveNext() } } - object IEnumerator.Current + object? IEnumerator.Current { get { @@ -1676,7 +1677,7 @@ private static int GetDefaultChunkSize() // Because of the lack of typeof(T).IsValueType we need two pieces of information // to determine this. default(T) will return a non null for Value Types, except those // using Nullable<>, that is why we need a second condition. - if (default(TSource) != null || Nullable.GetUnderlyingType(typeof(TSource)) != null) + if (default(TSource)! != null || Nullable.GetUnderlyingType(typeof(TSource)) != null) // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/34757 { // Marshal.SizeOf fails for value types that don't have explicit layouts. We // just fall back to some arbitrary constant in that case. Is there a better way? From a18f321e75b0e7572c9a67bb7951b549dbd42c9e Mon Sep 17 00:00:00 2001 From: Stephen Toub Date: Wed, 1 May 2019 22:39:24 -0400 Subject: [PATCH 282/607] Nullable: System.Collections.dll --- .../Collections/Generic/EnumerableHelpers.cs | 3 +- .../src/System.Collections.csproj | 1 + .../src/System/Collections/BitArray.cs | 4 +- .../Generic/CollectionExtensions.cs | 12 +- .../src/System/Collections/Generic/HashSet.cs | 66 +++---- .../Generic/HashSetEqualityComparer.cs | 18 +- .../System/Collections/Generic/LinkedList.cs | 84 ++++---- .../src/System/Collections/Generic/Queue.cs | 26 +-- .../Collections/Generic/SortedDictionary.cs | 60 +++--- .../System/Collections/Generic/SortedList.cs | 80 ++++---- .../Generic/SortedSet.TreeSubSet.cs | 14 +- .../System/Collections/Generic/SortedSet.cs | 184 +++++++++--------- .../Generic/SortedSetEqualityComparer.cs | 8 +- .../src/System/Collections/Generic/Stack.cs | 24 +-- .../Collections/StructuralComparisons.cs | 18 +- 15 files changed, 300 insertions(+), 302 deletions(-) diff --git a/src/Common/src/System/Collections/Generic/EnumerableHelpers.cs b/src/Common/src/System/Collections/Generic/EnumerableHelpers.cs index c7a62a45212a..34227622b479 100644 --- a/src/Common/src/System/Collections/Generic/EnumerableHelpers.cs +++ b/src/Common/src/System/Collections/Generic/EnumerableHelpers.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable namespace System.Collections.Generic { /// @@ -73,7 +74,7 @@ internal static T[] ToArray(IEnumerable source, out int length) newLength = MaxArrayLength <= count ? count + 1 : MaxArrayLength; } - Array.Resize(ref arr, newLength); + Array.Resize(ref arr!, newLength); // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 } arr[count++] = en.Current; diff --git a/src/System.Collections/src/System.Collections.csproj b/src/System.Collections/src/System.Collections.csproj index c85db3f39ca3..8a1591262014 100644 --- a/src/System.Collections/src/System.Collections.csproj +++ b/src/System.Collections/src/System.Collections.csproj @@ -5,6 +5,7 @@ true true netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release;uapaot-Windows_NT-Debug;uapaot-Windows_NT-Release + enable diff --git a/src/System.Collections/src/System/Collections/BitArray.cs b/src/System.Collections/src/System/Collections/BitArray.cs index f778b03069eb..ecb0c214bdba 100644 --- a/src/System.Collections/src/System/Collections/BitArray.cs +++ b/src/System.Collections/src/System/Collections/BitArray.cs @@ -548,7 +548,7 @@ public int Length if (newints > m_array.Length || newints + _ShrinkThreshold < m_array.Length) { // grow or shrink (if wasting more than _ShrinkThreshold ints) - Array.Resize(ref m_array, newints); + Array.Resize(ref m_array!, newints); // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 } if (value > m_length) @@ -781,7 +781,9 @@ public virtual bool MoveNext() return false; } +#pragma warning disable CS8612 // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/23268 public virtual object Current +#pragma warning restore CS8612 { get { diff --git a/src/System.Collections/src/System/Collections/Generic/CollectionExtensions.cs b/src/System.Collections/src/System/Collections/Generic/CollectionExtensions.cs index b3ed9a6562b1..6b486a88e09f 100644 --- a/src/System.Collections/src/System/Collections/Generic/CollectionExtensions.cs +++ b/src/System.Collections/src/System/Collections/Generic/CollectionExtensions.cs @@ -6,12 +6,12 @@ namespace System.Collections.Generic { public static class CollectionExtensions { - public static TValue GetValueOrDefault(this IReadOnlyDictionary dictionary, TKey key) + public static TValue GetValueOrDefault(this IReadOnlyDictionary dictionary, TKey key) where TKey : object { - return dictionary.GetValueOrDefault(key, default(TValue)); + return dictionary.GetValueOrDefault(key, default(TValue)!); // TODO-NULLABLE-GENERIC } - public static TValue GetValueOrDefault(this IReadOnlyDictionary dictionary, TKey key, TValue defaultValue) + public static TValue GetValueOrDefault(this IReadOnlyDictionary dictionary, TKey key, TValue defaultValue) where TKey : object { if (dictionary == null) { @@ -22,7 +22,7 @@ public static TValue GetValueOrDefault(this IReadOnlyDictionary(this IDictionary dictionary, TKey key, TValue value) + public static bool TryAdd(this IDictionary dictionary, TKey key, TValue value) where TKey : object { if (dictionary == null) { @@ -38,7 +38,7 @@ public static bool TryAdd(this IDictionary dictionar return false; } - public static bool Remove(this IDictionary dictionary, TKey key, out TValue value) + public static bool Remove(this IDictionary dictionary, TKey key, out TValue value) where TKey : object // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 { if (dictionary == null) { @@ -51,7 +51,7 @@ public static bool Remove(this IDictionary dictionar return true; } - value = default(TValue); + value = default(TValue)!; // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 return false; } } diff --git a/src/System.Collections/src/System/Collections/Generic/HashSet.cs b/src/System.Collections/src/System/Collections/Generic/HashSet.cs index 3bba0a928bf6..47028fa681c4 100644 --- a/src/System.Collections/src/System/Collections/Generic/HashSet.cs +++ b/src/System.Collections/src/System/Collections/Generic/HashSet.cs @@ -69,15 +69,15 @@ public class HashSet : ICollection, ISet, IReadOnlyCollection, ISeri private const string ComparerName = "Comparer"; // Do not rename (binary serialization) private const string VersionName = "Version"; // Do not rename (binary serialization) - private int[] _buckets; - private Slot[] _slots; + private int[]? _buckets; + private Slot[] _slots = default!; // TODO-NULLABLE: This should be Slot[]?, but the resulting annotations causes GenPartialFacadeSource to blow up: error : Unable to cast object of type 'Microsoft.CodeAnalysis.CSharp.Syntax.CompilationUnitSyntax' to type 'Microsoft.CodeAnalysis.CSharp.Syntax.BaseTypeDeclarationSyntax' private int _count; private int _lastIndex; private int _freeList; - private IEqualityComparer _comparer; + private IEqualityComparer _comparer = default!; private int _version; - private SerializationInfo _siInfo; // temporary variable needed during deserialization + private SerializationInfo? _siInfo; // temporary variable needed during deserialization #region Constructors @@ -85,7 +85,7 @@ public HashSet() : this(EqualityComparer.Default) { } - public HashSet(IEqualityComparer comparer) + public HashSet(IEqualityComparer? comparer) { if (comparer == null) { @@ -114,7 +114,7 @@ public HashSet(IEnumerable collection) /// /// /// - public HashSet(IEnumerable collection, IEqualityComparer comparer) + public HashSet(IEnumerable collection, IEqualityComparer? comparer) : this(comparer) { if (collection == null) @@ -132,7 +132,7 @@ public HashSet(IEnumerable collection, IEqualityComparer comparer) // to avoid excess resizes, first set size based on collection's count. Collection // may contain duplicates, so call TrimExcess if resulting hashset is larger than // threshold - ICollection coll = collection as ICollection; + ICollection? coll = collection as ICollection; int suggestedCapacity = coll == null ? 0 : coll.Count; Initialize(suggestedCapacity); @@ -167,7 +167,7 @@ private void CopyFrom(HashSet source) return; } - int capacity = source._buckets.Length; + int capacity = source._buckets!.Length; int threshold = HashHelpers.ExpandPrime(count + 1); if (threshold >= capacity) @@ -321,7 +321,7 @@ public bool Remove(T item) slots[i].hashCode = -1; if (RuntimeHelpers.IsReferenceOrContainsReferences()) { - slots[i].value = default(T); + slots[i].value = default!; } slots[i].next = _freeList; @@ -424,7 +424,7 @@ public virtual void OnDeserialization(object sender) } int capacity = _siInfo.GetInt32(CapacityName); - _comparer = (IEqualityComparer)_siInfo.GetValue(ComparerName, typeof(IEqualityComparer)); + _comparer = (IEqualityComparer)_siInfo.GetValue(ComparerName, typeof(IEqualityComparer))!; _freeList = -1; if (capacity != 0) @@ -432,7 +432,7 @@ public virtual void OnDeserialization(object sender) _buckets = new int[capacity]; _slots = new Slot[capacity]; - T[] array = (T[])_siInfo.GetValue(ElementsName, typeof(T[])); + T[]? array = (T[]?)_siInfo.GetValue(ElementsName, typeof(T[])); if (array == null) { @@ -481,7 +481,7 @@ public bool Add(T item) /// a value that has more complete data than the value you currently have, although their /// comparer functions indicate they are equal. /// - public bool TryGetValue(T equalValue, out T actualValue) + public bool TryGetValue(T equalValue, out T actualValue) // TODO-NULLABLE-GENERIC { if (_buckets != null) { @@ -492,7 +492,7 @@ public bool TryGetValue(T equalValue, out T actualValue) return true; } } - actualValue = default(T); + actualValue = default!; // TODO-NULLABLE-GENERIC return false; } @@ -552,7 +552,7 @@ public void IntersectWith(IEnumerable other) // if other is empty, intersection is empty set; remove all elements and we're done // can only figure this out if implements ICollection. (IEnumerable has no count) - ICollection otherAsCollection = other as ICollection; + ICollection? otherAsCollection = other as ICollection; if (otherAsCollection != null) { if (otherAsCollection.Count == 0) @@ -561,7 +561,7 @@ public void IntersectWith(IEnumerable other) return; } - HashSet otherAsSet = other as HashSet; + HashSet? otherAsSet = other as HashSet; // faster if other is a hashset using same equality comparer; so check // that other is a hashset using the same equality comparer. if (otherAsSet != null && AreEqualityComparersEqual(this, otherAsSet)) @@ -630,7 +630,7 @@ public void SymmetricExceptWith(IEnumerable other) return; } - HashSet otherAsSet = other as HashSet; + HashSet? otherAsSet = other as HashSet; // If other is a HashSet, it has unique elements according to its equality comparer, // but if they're using different equality comparers, then assumption of uniqueness // will fail. So first check if other is a hashset using the same equality comparer; @@ -679,7 +679,7 @@ public bool IsSubsetOf(IEnumerable other) return true; } - HashSet otherAsSet = other as HashSet; + HashSet? otherAsSet = other as HashSet; // faster if other has unique elements according to this equality comparer; so check // that other is a hashset using the same equality comparer. if (otherAsSet != null && AreEqualityComparersEqual(this, otherAsSet)) @@ -729,7 +729,7 @@ public bool IsProperSubsetOf(IEnumerable other) return false; } - ICollection otherAsCollection = other as ICollection; + ICollection? otherAsCollection = other as ICollection; if (otherAsCollection != null) { // no set is a proper subset of an empty set @@ -743,7 +743,7 @@ public bool IsProperSubsetOf(IEnumerable other) { return otherAsCollection.Count > 0; } - HashSet otherAsSet = other as HashSet; + HashSet? otherAsSet = other as HashSet; // faster if other is a hashset (and we're using same equality comparer) if (otherAsSet != null && AreEqualityComparersEqual(this, otherAsSet)) { @@ -788,7 +788,7 @@ public bool IsSupersetOf(IEnumerable other) } // try to fall out early based on counts - ICollection otherAsCollection = other as ICollection; + ICollection? otherAsCollection = other as ICollection; if (otherAsCollection != null) { // if other is the empty set then this is a superset @@ -796,7 +796,7 @@ public bool IsSupersetOf(IEnumerable other) { return true; } - HashSet otherAsSet = other as HashSet; + HashSet? otherAsSet = other as HashSet; // try to compare based on counts alone if other is a hashset with // same equality comparer if (otherAsSet != null && AreEqualityComparersEqual(this, otherAsSet)) @@ -850,7 +850,7 @@ public bool IsProperSupersetOf(IEnumerable other) return false; } - ICollection otherAsCollection = other as ICollection; + ICollection? otherAsCollection = other as ICollection; if (otherAsCollection != null) { // if other is the empty set then this is a superset @@ -859,7 +859,7 @@ public bool IsProperSupersetOf(IEnumerable other) // note that this has at least one element, based on above check return true; } - HashSet otherAsSet = other as HashSet; + HashSet? otherAsSet = other as HashSet; // faster if other is a hashset with the same equality comparer if (otherAsSet != null && AreEqualityComparersEqual(this, otherAsSet)) { @@ -928,7 +928,7 @@ public bool SetEquals(IEnumerable other) return true; } - HashSet otherAsSet = other as HashSet; + HashSet? otherAsSet = other as HashSet; // faster if other is a hashset and we're using same equality comparer if (otherAsSet != null && AreEqualityComparersEqual(this, otherAsSet)) { @@ -945,7 +945,7 @@ public bool SetEquals(IEnumerable other) } else { - ICollection otherAsCollection = other as ICollection; + ICollection? otherAsCollection = other as ICollection; if (otherAsCollection != null) { // if this count is 0 but other contains at least one element, they can't be equal @@ -1083,7 +1083,7 @@ public void TrimExcess() { // if count is zero, clear references _buckets = null; - _slots = null; + _slots = null!; _version++; } else @@ -1213,7 +1213,7 @@ private bool AddIfNotPresent(T value) } int hashCode = InternalGetHashCode(value); - int bucket = hashCode % _buckets.Length; + int bucket = hashCode % _buckets!.Length; int collisionCount = 0; Slot[] slots = _slots; for (int i = _buckets[bucket] - 1; i >= 0; i = slots[i].next) @@ -1263,7 +1263,7 @@ private bool AddIfNotPresent(T value) // when constructing from another HashSet. private void AddValue(int index, int hashCode, T value) { - int bucket = hashCode % _buckets.Length; + int bucket = hashCode % _buckets!.Length; #if DEBUG Debug.Assert(InternalGetHashCode(value) == hashCode); @@ -1662,7 +1662,7 @@ private unsafe ElementCount CheckUniqueAndUnfoundElements(IEnumerable other, /// /// /// - internal static bool HashSetEquals(HashSet set1, HashSet set2, IEqualityComparer comparer) + internal static bool HashSetEquals(HashSet? set1, HashSet? set2, IEqualityComparer comparer) { // handle null cases first if (set1 == null) @@ -1769,7 +1769,7 @@ internal Enumerator(HashSet set) _set = set; _index = 0; _version = set._version; - _current = default(T); + _current = default!; // TODO-NULLABLE-GENERIC } public void Dispose() @@ -1794,7 +1794,7 @@ public bool MoveNext() _index++; } _index = _set._lastIndex + 1; - _current = default(T); + _current = default!; // TODO-NULLABLE-GENERIC return false; } @@ -1806,7 +1806,7 @@ public T Current } } - object IEnumerator.Current + object? IEnumerator.Current { get { @@ -1826,7 +1826,7 @@ void IEnumerator.Reset() } _index = 0; - _current = default(T); + _current = default!; // TODO-NULLABLE-GENERIC } } } diff --git a/src/System.Collections/src/System/Collections/Generic/HashSetEqualityComparer.cs b/src/System.Collections/src/System/Collections/Generic/HashSetEqualityComparer.cs index 1697cd674422..5cfae13f3f31 100644 --- a/src/System.Collections/src/System/Collections/Generic/HashSetEqualityComparer.cs +++ b/src/System.Collections/src/System/Collections/Generic/HashSetEqualityComparer.cs @@ -2,18 +2,13 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections; -using System.Collections.Generic; - namespace System.Collections.Generic { - /// /// Equality comparer for hashsets of hashsets /// /// - internal sealed class HashSetEqualityComparer : IEqualityComparer> + internal sealed class HashSetEqualityComparer : IEqualityComparer?> { private readonly IEqualityComparer _comparer; @@ -23,12 +18,12 @@ public HashSetEqualityComparer() } // using m_comparer to keep equals properties in tact; don't want to choose one of the comparers - public bool Equals(HashSet x, HashSet y) + public bool Equals(HashSet? x, HashSet? y) { return HashSet.HashSetEquals(x, y, _comparer); } - public int GetHashCode(HashSet obj) + public int GetHashCode(HashSet? obj) { int hashCode = 0; if (obj != null) @@ -41,10 +36,10 @@ public int GetHashCode(HashSet obj) return hashCode; } - // Equals method for the comparer itself. - public override bool Equals(object obj) + // Equals method for the comparer itself. + public override bool Equals(object? obj) { - HashSetEqualityComparer comparer = obj as HashSetEqualityComparer; + HashSetEqualityComparer? comparer = obj as HashSetEqualityComparer; if (comparer == null) { return false; @@ -58,4 +53,3 @@ public override int GetHashCode() } } } - diff --git a/src/System.Collections/src/System/Collections/Generic/LinkedList.cs b/src/System.Collections/src/System/Collections/Generic/LinkedList.cs index 4ba83f3eab6a..c363ca860f3c 100644 --- a/src/System.Collections/src/System/Collections/Generic/LinkedList.cs +++ b/src/System.Collections/src/System/Collections/Generic/LinkedList.cs @@ -15,10 +15,10 @@ namespace System.Collections.Generic public class LinkedList : ICollection, ICollection, IReadOnlyCollection, ISerializable, IDeserializationCallback { // This LinkedList is a doubly-Linked circular list. - internal LinkedListNode head; + internal LinkedListNode? head; internal int count; internal int version; - private SerializationInfo _siInfo; //A temporary variable which we need during deserialization. + private SerializationInfo? _siInfo; //A temporary variable which we need during deserialization. // names for serialization private const string VersionName = "Version"; // Do not rename (binary serialization) @@ -52,12 +52,12 @@ public int Count get { return count; } } - public LinkedListNode First + public LinkedListNode? First { get { return head; } } - public LinkedListNode Last + public LinkedListNode? Last { get { return head == null ? null : head.prev; } } @@ -75,8 +75,8 @@ void ICollection.Add(T value) public LinkedListNode AddAfter(LinkedListNode node, T value) { ValidateNode(node); - LinkedListNode result = new LinkedListNode(node.list, value); - InternalInsertNodeBefore(node.next, result); + LinkedListNode result = new LinkedListNode(node.list!, value); + InternalInsertNodeBefore(node.next!, result); return result; } @@ -84,14 +84,14 @@ public void AddAfter(LinkedListNode node, LinkedListNode newNode) { ValidateNode(node); ValidateNewNode(newNode); - InternalInsertNodeBefore(node.next, newNode); + InternalInsertNodeBefore(node.next!, newNode); newNode.list = this; } public LinkedListNode AddBefore(LinkedListNode node, T value) { ValidateNode(node); - LinkedListNode result = new LinkedListNode(node.list, value); + LinkedListNode result = new LinkedListNode(node.list!, value); InternalInsertNodeBefore(node, result); if (node == head) { @@ -174,7 +174,7 @@ public void AddLast(LinkedListNode node) public void Clear() { - LinkedListNode current = head; + LinkedListNode? current = head; while (current != null) { LinkedListNode temp = current; @@ -214,20 +214,20 @@ public void CopyTo(T[] array, int index) throw new ArgumentException(SR.Arg_InsufficientSpace); } - LinkedListNode node = head; + LinkedListNode? node = head; if (node != null) { do { - array[index++] = node.item; + array[index++] = node!.item; node = node.next; } while (node != head); } } - public LinkedListNode Find(T value) + public LinkedListNode? Find(T value) { - LinkedListNode node = head; + LinkedListNode? node = head; EqualityComparer c = EqualityComparer.Default; if (node != null) { @@ -235,7 +235,7 @@ public LinkedListNode Find(T value) { do { - if (c.Equals(node.item, value)) + if (c.Equals(node!.item, value)) { return node; } @@ -246,7 +246,7 @@ public LinkedListNode Find(T value) { do { - if (node.item == null) + if (node!.item == null) { return node; } @@ -257,12 +257,12 @@ public LinkedListNode Find(T value) return null; } - public LinkedListNode FindLast(T value) + public LinkedListNode? FindLast(T value) { if (head == null) return null; - LinkedListNode last = head.prev; - LinkedListNode node = last; + LinkedListNode? last = head.prev; + LinkedListNode? node = last; EqualityComparer c = EqualityComparer.Default; if (node != null) { @@ -270,7 +270,7 @@ public LinkedListNode FindLast(T value) { do { - if (c.Equals(node.item, value)) + if (c.Equals(node!.item, value)) { return node; } @@ -282,7 +282,7 @@ public LinkedListNode FindLast(T value) { do { - if (node.item == null) + if (node!.item == null) { return node; } @@ -305,7 +305,7 @@ IEnumerator IEnumerable.GetEnumerator() public bool Remove(T value) { - LinkedListNode node = Find(value); + LinkedListNode? node = Find(value); if (node != null) { InternalRemoveNode(node); @@ -329,7 +329,7 @@ public void RemoveFirst() public void RemoveLast() { if (head == null) { throw new InvalidOperationException(SR.LinkedListEmpty); } - InternalRemoveNode(head.prev); + InternalRemoveNode(head.prev!); } public virtual void GetObjectData(SerializationInfo info, StreamingContext context) @@ -365,7 +365,7 @@ public virtual void OnDeserialization(object sender) if (count != 0) { - T[] array = (T[])_siInfo.GetValue(ValuesName, typeof(T[])); + T[]? array = (T[]?)_siInfo.GetValue(ValuesName, typeof(T[])); if (array == null) { @@ -389,7 +389,7 @@ private void InternalInsertNodeBefore(LinkedListNode node, LinkedListNode { newNode.next = node; newNode.prev = node.prev; - node.prev.next = newNode; + node.prev!.next = newNode; node.prev = newNode; version++; count++; @@ -416,8 +416,8 @@ internal void InternalRemoveNode(LinkedListNode node) } else { - node.next.prev = node.prev; - node.prev.next = node.next; + node.next!.prev = node.prev; + node.prev!.next = node.next; if (head == node) { head = node.next; @@ -488,7 +488,7 @@ void ICollection.CopyTo(Array array, int index) throw new ArgumentException(SR.Arg_InsufficientSpace); } - T[] tArray = array as T[]; + T[]? tArray = array as T[]; if (tArray != null) { CopyTo(tArray, index); @@ -497,19 +497,19 @@ void ICollection.CopyTo(Array array, int index) { // No need to use reflection to verify that the types are compatible because it isn't 100% correct and we can rely // on the runtime validation during the cast that happens below (i.e. we will get an ArrayTypeMismatchException). - object[] objects = array as object[]; + object?[]? objects = array as object[]; if (objects == null) { throw new ArgumentException(SR.Argument_InvalidArrayType, nameof(array)); } - LinkedListNode node = head; + LinkedListNode? node = head; try { if (node != null) { do { - objects[index++] = node.item; + objects[index++] = node!.item; node = node.next; } while (node != head); } @@ -530,7 +530,7 @@ IEnumerator IEnumerable.GetEnumerator() public struct Enumerator : IEnumerator, IEnumerator, ISerializable, IDeserializationCallback { private LinkedList _list; - private LinkedListNode _node; + private LinkedListNode? _node; private int _version; private T _current; private int _index; @@ -545,7 +545,7 @@ internal Enumerator(LinkedList list) _list = list; _version = list.version; _node = list.head; - _current = default(T); + _current = default!; // TODO-NULLABLE-GENERIC _index = 0; } @@ -554,7 +554,7 @@ public T Current get { return _current; } } - object IEnumerator.Current + object? IEnumerator.Current { get { @@ -597,7 +597,7 @@ void IEnumerator.Reset() throw new InvalidOperationException(SR.InvalidOperation_EnumFailedVersion); } - _current = default(T); + _current = default!; // TODO-NULLABLE-GENERIC _node = _list.head; _index = 0; } @@ -621,9 +621,9 @@ void IDeserializationCallback.OnDeserialization(object sender) // Note following class is not serializable since we customized the serialization of LinkedList. public sealed class LinkedListNode { - internal LinkedList list; - internal LinkedListNode next; - internal LinkedListNode prev; + internal LinkedList? list; + internal LinkedListNode? next; + internal LinkedListNode? prev; internal T item; public LinkedListNode(T value) @@ -637,19 +637,19 @@ internal LinkedListNode(LinkedList list, T value) item = value; } - public LinkedList List + public LinkedList? List { get { return list; } } - public LinkedListNode Next + public LinkedListNode? Next { - get { return next == null || next == list.head ? null : next; } + get { return next == null || next == list!.head ? null : next; } } - public LinkedListNode Previous + public LinkedListNode? Previous { - get { return prev == null || this == list.head ? null : prev; } + get { return prev == null || this == list!.head ? null : prev; } } public T Value diff --git a/src/System.Collections/src/System/Collections/Generic/Queue.cs b/src/System.Collections/src/System/Collections/Generic/Queue.cs index 14b165dec2c5..e6eee941bfd2 100644 --- a/src/System.Collections/src/System/Collections/Generic/Queue.cs +++ b/src/System.Collections/src/System/Collections/Generic/Queue.cs @@ -233,7 +233,7 @@ public T Dequeue() T removed = array[head]; if (RuntimeHelpers.IsReferenceOrContainsReferences()) { - array[head] = default; + array[head] = default!; } MoveNext(ref _head); _size--; @@ -241,21 +241,21 @@ public T Dequeue() return removed; } - public bool TryDequeue(out T result) + public bool TryDequeue(out T result) // TODO-NULLABLE-GENERIC { int head = _head; T[] array = _array; if (_size == 0) { - result = default; - return false; + result = default!; // TODO-NULLABLE-GENERIC + return false; } result = array[head]; if (RuntimeHelpers.IsReferenceOrContainsReferences()) { - array[head] = default; + array[head] = default!; } MoveNext(ref _head); _size--; @@ -276,12 +276,12 @@ public T Peek() return _array[_head]; } - public bool TryPeek(out T result) + public bool TryPeek(out T result) // TODO-NULLABLE-GENERIC { if (_size == 0) { - result = default(T); - return false; + result = default!; // TODO-NULLABLE-GENERIC + return false; } result = _array[_head]; @@ -404,13 +404,13 @@ internal Enumerator(Queue q) _q = q; _version = q._version; _index = -1; - _currentElement = default(T); + _currentElement = default!; // TODO-NULLABLE-GENERIC } public void Dispose() { _index = -2; - _currentElement = default(T); + _currentElement = default!; // TODO-NULLABLE-GENERIC } public bool MoveNext() @@ -426,7 +426,7 @@ public bool MoveNext() { // We've run past the last element _index = -2; - _currentElement = default(T); + _currentElement = default!; // TODO-NULLABLE-GENERIC return false; } @@ -469,7 +469,7 @@ private void ThrowEnumerationNotStartedOrEnded() throw new InvalidOperationException(_index == -1 ? SR.InvalidOperation_EnumNotStarted : SR.InvalidOperation_EnumEnded); } - object IEnumerator.Current + object? IEnumerator.Current { get { return Current; } } @@ -478,7 +478,7 @@ void IEnumerator.Reset() { if (_version != _q._version) throw new InvalidOperationException(SR.InvalidOperation_EnumFailedVersion); _index = -1; - _currentElement = default(T); + _currentElement = default!; // TODO-NULLABLE-GENERIC } } } diff --git a/src/System.Collections/src/System/Collections/Generic/SortedDictionary.cs b/src/System.Collections/src/System/Collections/Generic/SortedDictionary.cs index 782a3dd25762..e9b54de60a3c 100644 --- a/src/System.Collections/src/System/Collections/Generic/SortedDictionary.cs +++ b/src/System.Collections/src/System/Collections/Generic/SortedDictionary.cs @@ -12,16 +12,16 @@ namespace System.Collections.Generic [DebuggerDisplay("Count = {Count}")] [Serializable] [System.Runtime.CompilerServices.TypeForwardedFrom("System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")] - public class SortedDictionary : IDictionary, IDictionary, IReadOnlyDictionary + public class SortedDictionary : IDictionary, IDictionary, IReadOnlyDictionary where TKey : object { [NonSerialized] - private KeyCollection _keys; + private KeyCollection? _keys; [NonSerialized] - private ValueCollection _values; + private ValueCollection? _values; private TreeSet> _set; // Do not rename (binary serialization) - public SortedDictionary() : this((IComparer)null) + public SortedDictionary() : this((IComparer?)null) { } @@ -29,7 +29,7 @@ public SortedDictionary(IDictionary dictionary) : this(dictionary, { } - public SortedDictionary(IDictionary dictionary, IComparer comparer) + public SortedDictionary(IDictionary dictionary, IComparer? comparer) { if (dictionary == null) { @@ -44,7 +44,7 @@ public SortedDictionary(IDictionary dictionary, IComparer co } } - public SortedDictionary(IComparer comparer) + public SortedDictionary(IComparer? comparer) { _set = new TreeSet>(new KeyValuePairComparer(comparer)); } @@ -56,7 +56,7 @@ void ICollection>.Add(KeyValuePair keyV bool ICollection>.Contains(KeyValuePair keyValuePair) { - TreeSet>.Node node = _set.FindNode(keyValuePair); + TreeSet>.Node? node = _set.FindNode(keyValuePair); if (node == null) { return false; @@ -74,7 +74,7 @@ bool ICollection>.Contains(KeyValuePair bool ICollection>.Remove(KeyValuePair keyValuePair) { - TreeSet>.Node node = _set.FindNode(keyValuePair); + TreeSet>.Node? node = _set.FindNode(keyValuePair); if (node == null) { return false; @@ -105,7 +105,7 @@ public TValue this[TKey key] throw new ArgumentNullException(nameof(key)); } - TreeSet>.Node node = _set.FindNode(new KeyValuePair(key, default(TValue))); + TreeSet>.Node? node = _set.FindNode(new KeyValuePair(key, default(TValue)!)); // TODO-NULLABLE-GENERIC if (node == null) { throw new KeyNotFoundException(SR.Format(SR.Arg_KeyNotFoundWithKey, key.ToString())); @@ -120,7 +120,7 @@ public TValue this[TKey key] throw new ArgumentNullException(nameof(key)); } - TreeSet>.Node node = _set.FindNode(new KeyValuePair(key, default(TValue))); + TreeSet>.Node? node = _set.FindNode(new KeyValuePair(key, default(TValue)!)); // TODO-NULLABLE-GENERIC if (node == null) { _set.Add(new KeyValuePair(key, value)); @@ -220,7 +220,7 @@ public bool ContainsKey(TKey key) throw new ArgumentNullException(nameof(key)); } - return _set.Contains(new KeyValuePair(key, default(TValue))); + return _set.Contains(new KeyValuePair(key, default(TValue)!)); // TODO-NULLABLE-GENERIC } public bool ContainsValue(TValue value) @@ -276,20 +276,20 @@ public bool Remove(TKey key) throw new ArgumentNullException(nameof(key)); } - return _set.Remove(new KeyValuePair(key, default(TValue))); + return _set.Remove(new KeyValuePair(key, default(TValue)!)); // TODO-NULLABLE-GENERIC } - public bool TryGetValue(TKey key, out TValue value) + public bool TryGetValue(TKey key, out TValue value) // TODO-NULLABLE-GENERIC { if (key == null) { throw new ArgumentNullException(nameof(key)); } - TreeSet>.Node node = _set.FindNode(new KeyValuePair(key, default(TValue))); + TreeSet>.Node? node = _set.FindNode(new KeyValuePair(key, default(TValue)!)); // TODO-NULLABLE-GENERIC if (node == null) { - value = default(TValue); + value = default(TValue)!; // TODO-NULLABLE-GENERIC return false; } value = node.Item.Value; @@ -321,7 +321,7 @@ ICollection IDictionary.Values get { return (ICollection)Values; } } - object IDictionary.this[object key] + object? IDictionary.this[object key] { get { @@ -343,7 +343,7 @@ object IDictionary.this[object key] throw new ArgumentNullException(nameof(key)); } - if (value == null && !(default(TValue) == null)) + if (value == null && !(default(TValue)! == null)) // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/34757 throw new ArgumentNullException(nameof(value)); try @@ -351,7 +351,7 @@ object IDictionary.this[object key] TKey tempKey = (TKey)key; try { - this[tempKey] = (TValue)value; + this[tempKey] = (TValue)value!; } catch (InvalidCastException) { @@ -365,14 +365,14 @@ object IDictionary.this[object key] } } - void IDictionary.Add(object key, object value) + void IDictionary.Add(object key, object? value) { if (key == null) { throw new ArgumentNullException(nameof(key)); } - if (value == null && !(default(TValue) == null)) + if (value == null && !(default(TValue)! == null)) // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/34757 throw new ArgumentNullException(nameof(value)); try @@ -381,7 +381,7 @@ void IDictionary.Add(object key, object value) try { - Add(tempKey, (TValue)value); + Add(tempKey, (TValue)value!); // TODO-NULLABLE-GENERIC } catch (InvalidCastException) { @@ -493,7 +493,7 @@ void IEnumerator.Reset() _treeEnum.Reset(); } - object IEnumerator.Current + object? IEnumerator.Current { get { @@ -526,7 +526,7 @@ object IDictionaryEnumerator.Key } } - object IDictionaryEnumerator.Value + object? IDictionaryEnumerator.Value { get { @@ -630,7 +630,7 @@ void ICollection.CopyTo(Array array, int index) throw new ArgumentException(SR.Arg_ArrayPlusOffTooSmall); } - TKey[] keys = array as TKey[]; + TKey[]? keys = array as TKey[]; if (keys != null) { CopyTo(keys, index); @@ -717,7 +717,7 @@ public TKey Current } } - object IEnumerator.Current + object? IEnumerator.Current { get { @@ -814,7 +814,7 @@ void ICollection.CopyTo(Array array, int index) throw new ArgumentException(SR.Arg_ArrayPlusOffTooSmall); } - TValue[] values = array as TValue[]; + TValue[]? values = array as TValue[]; if (values != null) { CopyTo(values, index); @@ -823,7 +823,7 @@ void ICollection.CopyTo(Array array, int index) { try { - object[] objects = (object[])array; + object?[] objects = (object?[])array; _dictionary._set.InOrderTreeWalk(delegate (TreeSet>.Node node) { objects[index++] = node.Item.Value; return true; }); } catch (ArrayTypeMismatchException) @@ -901,7 +901,7 @@ public TValue Current } } - object IEnumerator.Current + object? IEnumerator.Current { get { @@ -926,7 +926,7 @@ public sealed class KeyValuePairComparer : Comparer> { internal IComparer keyComparer; // Do not rename (binary serialization) - public KeyValuePairComparer(IComparer keyComparer) + public KeyValuePairComparer(IComparer? keyComparer) { if (keyComparer == null) { @@ -963,7 +963,7 @@ public TreeSet() : base() { } - public TreeSet(IComparer comparer) : base(comparer) { } + public TreeSet(IComparer? comparer) : base(comparer) { } private TreeSet(SerializationInfo siInfo, StreamingContext context) : base(siInfo, context) { } diff --git a/src/System.Collections/src/System/Collections/Generic/SortedList.cs b/src/System.Collections/src/System/Collections/Generic/SortedList.cs index 461da9071523..03c49b3eed30 100644 --- a/src/System.Collections/src/System/Collections/Generic/SortedList.cs +++ b/src/System.Collections/src/System/Collections/Generic/SortedList.cs @@ -52,15 +52,15 @@ namespace System.Collections.Generic [Serializable] [System.Runtime.CompilerServices.TypeForwardedFrom("System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")] public class SortedList : - IDictionary, IDictionary, IReadOnlyDictionary + IDictionary, IDictionary, IReadOnlyDictionary where TKey : object { private TKey[] keys; // Do not rename (binary serialization) private TValue[] values; // Do not rename (binary serialization) private int _size; // Do not rename (binary serialization) private int version; // Do not rename (binary serialization) private IComparer comparer; // Do not rename (binary serialization) - private KeyList keyList; // Do not rename (binary serialization) - private ValueList valueList; // Do not rename (binary serialization) + private KeyList? keyList; // Do not rename (binary serialization) + private ValueList? valueList; // Do not rename (binary serialization) private const int DefaultCapacity = 4; @@ -104,7 +104,7 @@ public SortedList(int capacity) // interface, which in that case must be implemented by the keys of all // entries added to the sorted list. // - public SortedList(IComparer comparer) + public SortedList(IComparer? comparer) : this() { if (comparer != null) @@ -122,7 +122,7 @@ public SortedList(IComparer comparer) // the IComparable interface, which in that case must be implemented // by the keys of all entries added to the sorted list. // - public SortedList(int capacity, IComparer comparer) + public SortedList(int capacity, IComparer? comparer) : this(comparer) { Capacity = capacity; @@ -147,7 +147,7 @@ public SortedList(IDictionary dictionary) // by the keys of all entries in the given dictionary as well as keys // subsequently added to the sorted list. // - public SortedList(IDictionary dictionary, IComparer comparer) + public SortedList(IDictionary dictionary, IComparer? comparer) : this((dictionary != null ? dictionary.Count : 0), comparer) { if (dictionary == null) @@ -265,12 +265,12 @@ public IComparer Comparer } } - void IDictionary.Add(object key, object value) + void IDictionary.Add(object key, object? value) { if (key == null) throw new ArgumentNullException(nameof(key)); - if (value == null && !(default(TValue) == null)) // null is an invalid value for Value types + if (value == null && !(default(TValue)! == null)) // null is an invalid value for Value types // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/34757 throw new ArgumentNullException(nameof(value)); if (!(key is TKey)) @@ -279,7 +279,7 @@ void IDictionary.Add(object key, object value) if (!(value is TValue) && value != null) // null is a valid value for Reference Types throw new ArgumentException(SR.Format(SR.Arg_WrongType, value, typeof(TValue)), nameof(value)); - Add((TKey)key, (TValue)value); + Add((TKey)key, (TValue)value!); } // Returns the number of entries in this sorted list. @@ -493,7 +493,7 @@ void ICollection.CopyTo(Array array, int index) throw new ArgumentException(SR.Arg_ArrayPlusOffTooSmall); } - KeyValuePair[] keyValuePairArray = array as KeyValuePair[]; + KeyValuePair[]? keyValuePairArray = array as KeyValuePair[]; if (keyValuePairArray != null) { for (int i = 0; i < Count; i++) @@ -503,7 +503,7 @@ void ICollection.CopyTo(Array array, int index) } else { - object[] objects = array as object[]; + object[]? objects = array as object[]; if (objects == null) { throw new ArgumentException(SR.Argument_InvalidArrayType, nameof(array)); @@ -601,7 +601,7 @@ public TValue this[TKey key] } } - object IDictionary.this[object key] + object? IDictionary.this[object key] { get { @@ -623,13 +623,13 @@ object IDictionary.this[object key] throw new ArgumentNullException(nameof(key)); } - if (value == null && !(default(TValue) == null)) + if (value == null && !(default(TValue)! == null)) // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/34757 throw new ArgumentNullException(nameof(value)); TKey tempKey = (TKey)key; try { - this[tempKey] = (TValue)value; + this[tempKey] = (TValue)value!; } catch (InvalidCastException) { @@ -677,7 +677,7 @@ private void Insert(int index, TKey key, TValue value) version++; } - public bool TryGetValue(TKey key, out TValue value) + public bool TryGetValue(TKey key, out TValue value) // TODO-NULLABLE-GENERIC { int i = IndexOfKey(key); if (i >= 0) @@ -686,7 +686,7 @@ public bool TryGetValue(TKey key, out TValue value) return true; } - value = default(TValue); + value = default(TValue)!; // TODO-NULLABLE-GENERIC return false; } @@ -704,11 +704,11 @@ public void RemoveAt(int index) } if (RuntimeHelpers.IsReferenceOrContainsReferences()) { - keys[_size] = default(TKey); + keys[_size] = default(TKey)!; } if (RuntimeHelpers.IsReferenceOrContainsReferences()) { - values[_size] = default(TValue); + values[_size] = default(TValue)!; } version++; } @@ -777,15 +777,15 @@ internal Enumerator(SortedList sortedList, int getEnumeratorRetTyp _index = 0; _version = _sortedList.version; _getEnumeratorRetType = getEnumeratorRetType; - _key = default(TKey); - _value = default(TValue); + _key = default(TKey)!; // TODO-NULLABLE-GENERIC + _value = default(TValue)!; // TODO-NULLABLE-GENERIC } public void Dispose() { _index = 0; - _key = default(TKey); - _value = default(TValue); + _key = default(TKey)!; // TODO-NULLABLE-GENERIC + _value = default(TValue)!; // TODO-NULLABLE-GENERIC } object IDictionaryEnumerator.Key @@ -814,8 +814,8 @@ public bool MoveNext() } _index = _sortedList.Count + 1; - _key = default(TKey); - _value = default(TValue); + _key = default(TKey)!; // TODO-NULLABLE-GENERIC + _value = default(TValue)!; // TODO-NULLABLE-GENERIC return false; } @@ -840,7 +840,7 @@ public KeyValuePair Current } } - object IEnumerator.Current + object? IEnumerator.Current { get { @@ -860,7 +860,7 @@ object IEnumerator.Current } } - object IDictionaryEnumerator.Value + object? IDictionaryEnumerator.Value { get { @@ -881,8 +881,8 @@ void IEnumerator.Reset() } _index = 0; - _key = default(TKey); - _value = default(TValue); + _key = default(TKey)!; // TODO-NULLABLE-GENERIC + _value = default(TValue)!; // TODO-NULLABLE-GENERIC } } @@ -891,7 +891,7 @@ private sealed class SortedListKeyEnumerator : IEnumerator, IEnumerator private SortedList _sortedList; private int _index; private int _version; - private TKey _currentKey; + private TKey _currentKey = default!; internal SortedListKeyEnumerator(SortedList sortedList) { @@ -902,7 +902,7 @@ internal SortedListKeyEnumerator(SortedList sortedList) public void Dispose() { _index = 0; - _currentKey = default(TKey); + _currentKey = default(TKey)!; // TODO-NULLABLE-GENERIC } public bool MoveNext() @@ -920,7 +920,7 @@ public bool MoveNext() } _index = _sortedList.Count + 1; - _currentKey = default(TKey); + _currentKey = default(TKey)!; // TODO-NULLABLE-GENERIC return false; } @@ -932,7 +932,7 @@ public TKey Current } } - object IEnumerator.Current + object? IEnumerator.Current { get { @@ -952,7 +952,7 @@ void IEnumerator.Reset() throw new InvalidOperationException(SR.InvalidOperation_EnumFailedVersion); } _index = 0; - _currentKey = default(TKey); + _currentKey = default(TKey)!; // TODO-NULLABLE-GENERIC } } @@ -961,7 +961,7 @@ private sealed class SortedListValueEnumerator : IEnumerator, IEnumerato private SortedList _sortedList; private int _index; private int _version; - private TValue _currentValue; + private TValue _currentValue = default!; internal SortedListValueEnumerator(SortedList sortedList) { @@ -972,7 +972,7 @@ internal SortedListValueEnumerator(SortedList sortedList) public void Dispose() { _index = 0; - _currentValue = default(TValue); + _currentValue = default(TValue)!; // TODO-NULLABLE-GENERIC } public bool MoveNext() @@ -990,7 +990,7 @@ public bool MoveNext() } _index = _sortedList.Count + 1; - _currentValue = default(TValue); + _currentValue = default(TValue)!; // TODO-NULLABLE-GENERIC return false; } @@ -1002,7 +1002,7 @@ public TValue Current } } - object IEnumerator.Current + object? IEnumerator.Current { get { @@ -1022,7 +1022,7 @@ void IEnumerator.Reset() throw new InvalidOperationException(SR.InvalidOperation_EnumFailedVersion); } _index = 0; - _currentValue = default(TValue); + _currentValue = default(TValue)!; // TODO-NULLABLE-GENERIC } } @@ -1087,7 +1087,7 @@ void ICollection.CopyTo(Array array, int arrayIndex) try { // defer error checking to Array.Copy - Array.Copy(_dict.keys, 0, array, arrayIndex, _dict.Count); + Array.Copy(_dict.keys, 0, array!, arrayIndex, _dict.Count); } catch (ArrayTypeMismatchException) { @@ -1206,7 +1206,7 @@ void ICollection.CopyTo(Array array, int index) try { // defer error checking to Array.Copy - Array.Copy(_dict.values, 0, array, index, _dict.Count); + Array.Copy(_dict.values, 0, array!, index, _dict.Count); } catch (ArrayTypeMismatchException) { diff --git a/src/System.Collections/src/System/Collections/Generic/SortedSet.TreeSubSet.cs b/src/System.Collections/src/System/Collections/Generic/SortedSet.TreeSubSet.cs index 4083142e1cd1..5f0199c9f285 100644 --- a/src/System.Collections/src/System/Collections/Generic/SortedSet.TreeSubSet.cs +++ b/src/System.Collections/src/System/Collections/Generic/SortedSet.TreeSubSet.cs @@ -125,8 +125,8 @@ internal override T MinInternal { get { - Node current = root; - T result = default(T); + Node? current = root; + T result = default(T)!; while (current != null) { @@ -155,8 +155,8 @@ internal override T MaxInternal { get { - Node current = root; - T result = default(T); + Node? current = root; + T result = default(T)!; while (current != null) { @@ -192,7 +192,7 @@ internal override bool InOrderTreeWalk(TreeWalkPredicate action) // The maximum height of a red-black tree is 2*lg(n+1). // See page 264 of "Introduction to algorithms" by Thomas H. Cormen Stack stack = new Stack(2 * (int)SortedSet.Log2(count + 1)); // this is not exactly right if count is out of date, but the stack can grow - Node current = root; + Node? current = root; while (current != null) { if (IsWithinRange(current.Item)) @@ -218,7 +218,7 @@ internal override bool InOrderTreeWalk(TreeWalkPredicate action) return false; } - Node node = current.Right; + Node? node = current.Right; while (node != null) { if (IsWithinRange(node.Item)) @@ -271,7 +271,7 @@ internal override bool BreadthFirstTreeWalk(TreeWalkPredicate action) return true; } - internal override SortedSet.Node FindNode(T item) + internal override SortedSet.Node? FindNode(T item) { if (!IsWithinRange(item)) { diff --git a/src/System.Collections/src/System/Collections/Generic/SortedSet.cs b/src/System.Collections/src/System/Collections/Generic/SortedSet.cs index a731422bdd8a..1d7107233567 100644 --- a/src/System.Collections/src/System/Collections/Generic/SortedSet.cs +++ b/src/System.Collections/src/System/Collections/Generic/SortedSet.cs @@ -50,12 +50,12 @@ public partial class SortedSet : ISet, ICollection, ICollection, IReadO { #region Local variables/constants - private Node root; - private IComparer comparer; + private Node? root; + private IComparer comparer = default!; private int count; private int version; - private SerializationInfo siInfo; // A temporary variable which we need during deserialization. + private SerializationInfo? siInfo; // A temporary variable which we need during deserialization. private const string ComparerName = "Comparer"; // Do not rename (binary serialization) private const string CountName = "Count"; // Do not rename (binary serialization) @@ -86,7 +86,7 @@ public SortedSet() comparer = Comparer.Default; } - public SortedSet(IComparer comparer) + public SortedSet(IComparer? comparer) { this.comparer = comparer ?? Comparer.Default; } @@ -94,7 +94,7 @@ public SortedSet(IComparer comparer) public SortedSet(IEnumerable collection) : this(collection, Comparer.Default) { } - public SortedSet(IEnumerable collection, IComparer comparer) + public SortedSet(IEnumerable collection, IComparer? comparer) : this(comparer) { if (collection == null) @@ -104,7 +104,7 @@ public SortedSet(IEnumerable collection, IComparer comparer) // These are explicit type checks in the mold of HashSet. It would have worked better with // something like an ISorted interface. (We could make this work for SortedList.Keys, etc.) - SortedSet sortedSet = collection as SortedSet; + SortedSet? sortedSet = collection as SortedSet; if (sortedSet != null && !(sortedSet is TreeSubSet) && HasEqualComparer(sortedSet)) { if (sortedSet.Count > 0) @@ -206,7 +206,7 @@ internal virtual bool InOrderTreeWalk(TreeWalkPredicate action) // want the stack to unnecessarily allocate arrays as it grows. var stack = new Stack(2 * (int)Log2(Count + 1)); - Node current = root; + Node? current = root; while (current != null) { @@ -222,7 +222,7 @@ internal virtual bool InOrderTreeWalk(TreeWalkPredicate action) return false; } - Node node = current.Right; + Node? node = current.Right; while (node != null) { stack.Push(node); @@ -328,10 +328,10 @@ internal virtual bool AddIfNotPresent(T item) // Search for a node at bottom to insert the new node. // If we can guarantee the node we found is not a 4-node, it would be easy to do insertion. // We split 4-nodes along the search path. - Node current = root; - Node parent = null; - Node grandParent = null; - Node greatGrandParent = null; + Node? current = root; + Node? parent = null; + Node? grandParent = null; + Node? greatGrandParent = null; // Even if we don't actually add to the set, we may be altering its structure (by doing rotations and such). // So update `_version` to disable any instances of Enumerator/TreeSubSet from working on it. @@ -356,7 +356,7 @@ internal virtual bool AddIfNotPresent(T item) // We could have introduced two consecutive red nodes after split. Fix that by rotation. if (Node.IsNonNullRed(parent)) { - InsertionBalance(current, ref parent, grandParent, greatGrandParent); + InsertionBalance(current, ref parent!, grandParent!, greatGrandParent!); } } @@ -381,7 +381,7 @@ internal virtual bool AddIfNotPresent(T item) // The new node will be red, so we will need to adjust colors if its parent is also red. if (parent.IsRed) { - InsertionBalance(node, ref parent, grandParent, greatGrandParent); + InsertionBalance(node, ref parent!, grandParent!, greatGrandParent!); } // The root node is always black. @@ -411,11 +411,11 @@ internal virtual bool DoRemove(T item) // and such). So update our version to disable any enumerators/subsets working on it. version++; - Node current = root; - Node parent = null; - Node grandParent = null; - Node match = null; - Node parentOfMatch = null; + Node? current = root; + Node? parent = null; + Node? grandParent = null; + Node? match = null; + Node? parentOfMatch = null; bool foundMatch = false; while (current != null) { @@ -469,7 +469,7 @@ internal virtual bool DoRemove(T item) { // `current` is a 2-node and `sibling` is either a 3-node or a 4-node. // We can change the color of `current` to red by some rotation. - Node newGrandParent = parent.Rotate(parent.GetRotation(current, sibling)); + Node newGrandParent = parent.Rotate(parent.GetRotation(current, sibling))!; newGrandParent.Color = parent.Color; parent.ColorBlack(); @@ -504,7 +504,7 @@ internal virtual bool DoRemove(T item) // Move successor to the matching node position and replace links. if (match != null) { - ReplaceNode(match, parentOfMatch, parent, grandParent); + ReplaceNode(match, parentOfMatch!, parent!, grandParent!); --count; } @@ -588,14 +588,14 @@ void ICollection.CopyTo(Array array, int index) throw new ArgumentException(SR.Arg_ArrayPlusOffTooSmall); } - T[] tarray = array as T[]; + T[]? tarray = array as T[]; if (tarray != null) { CopyTo(tarray, index); } else { - object[] objects = array as object[]; + object?[]? objects = array as object[]; if (objects == null) { throw new ArgumentException(SR.Argument_InvalidArrayType, nameof(array)); @@ -669,7 +669,7 @@ private void InsertionBalance(Node current, ref Node parent, Node grandParent, N /// The (possibly null) parent. /// The child node to replace. /// The node to replace with. - private void ReplaceChildOrRoot(Node parent, Node child, Node newChild) + private void ReplaceChildOrRoot(Node? parent, Node child, Node newChild) { if (parent != null) { @@ -692,13 +692,13 @@ private void ReplaceNode(Node match, Node parentOfMatch, Node successor, Node pa { // This node has no successor. This can only happen if the right child of the match is null. Debug.Assert(match.Right == null); - successor = match.Left; + successor = match.Left!; } else { Debug.Assert(parentOfSuccessor != null); Debug.Assert(successor.Left == null); - Debug.Assert((successor.Right == null && successor.IsRed) || (successor.Right.IsRed && successor.IsBlack)); + Debug.Assert((successor.Right == null && successor.IsRed) || (successor.Right!.IsRed && successor.IsBlack)); successor.Right?.ColorBlack(); @@ -717,12 +717,12 @@ private void ReplaceNode(Node match, Node parentOfMatch, Node successor, Node pa successor.Color = match.Color; } - ReplaceChildOrRoot(parentOfMatch, match, successor); + ReplaceChildOrRoot(parentOfMatch, match, successor!); } - internal virtual Node FindNode(T item) + internal virtual Node? FindNode(T item) { - Node current = root; + Node? current = root; while (current != null) { int order = comparer.Compare(item, current.Item); @@ -753,7 +753,7 @@ internal virtual Node FindNode(T item) /// internal virtual int InternalIndexOf(T item) { - Node current = root; + Node? current = root; int count = 0; while (current != null) { @@ -770,11 +770,11 @@ internal virtual int InternalIndexOf(T item) return -1; } - internal Node FindRange(T from, T to) => FindRange(from, to, lowerBoundActive: true, upperBoundActive: true); + internal Node? FindRange(T from, T to) => FindRange(from, to, lowerBoundActive: true, upperBoundActive: true); - internal Node FindRange(T from, T to, bool lowerBoundActive, bool upperBoundActive) + internal Node? FindRange(T from, T to, bool lowerBoundActive, bool upperBoundActive) { - Node current = root; + Node? current = root; while (current != null) { if (lowerBoundActive && comparer.Compare(from, current.Item) > 0) @@ -807,7 +807,7 @@ internal Node FindRange(T from, T to, bool lowerBoundActive, bool upperBoundActi /// /// Returns an object, according to a specified comparer, that can be used to create a collection that contains individual sets. /// - public static IEqualityComparer> CreateSetComparer(IEqualityComparer memberEqualityComparer) + public static IEqualityComparer> CreateSetComparer(IEqualityComparer? memberEqualityComparer) { return new SortedSetEqualityComparer(memberEqualityComparer); } @@ -880,8 +880,8 @@ public void UnionWith(IEnumerable other) throw new ArgumentNullException(nameof(other)); } - SortedSet asSorted = other as SortedSet; - TreeSubSet treeSubset = this as TreeSubSet; + SortedSet? asSorted = other as SortedSet; + TreeSubSet? treeSubset = this as TreeSubSet; if (treeSubset != null) VersionCheck(); @@ -950,7 +950,7 @@ public void UnionWith(IEnumerable other) } } - private static Node ConstructRootFromSortedArray(T[] arr, int startIndex, int endIndex, Node redNode) + private static Node? ConstructRootFromSortedArray(T[] arr, int startIndex, int endIndex, Node? redNode) { // You're given a sorted array... say 1 2 3 4 5 6 // There are 2 cases: @@ -1032,8 +1032,8 @@ public virtual void IntersectWith(IEnumerable other) // HashSet optimizations can't be done until equality comparers and comparers are related // Technically, this would work as well with an ISorted - SortedSet asSorted = other as SortedSet; - TreeSubSet treeSubset = this as TreeSubSet; + SortedSet? asSorted = other as SortedSet; + TreeSubSet? treeSubset = this as TreeSubSet; if (treeSubset != null) VersionCheck(); @@ -1118,7 +1118,7 @@ public void ExceptWith(IEnumerable other) return; } - SortedSet asSorted = other as SortedSet; + SortedSet? asSorted = other as SortedSet; if (asSorted != null && HasEqualComparer(asSorted)) { @@ -1162,7 +1162,7 @@ public void SymmetricExceptWith(IEnumerable other) return; } - SortedSet asSorted = other as SortedSet; + SortedSet? asSorted = other as SortedSet; if (asSorted != null && HasEqualComparer(asSorted)) { @@ -1225,7 +1225,7 @@ public bool IsSubsetOf(IEnumerable other) return true; } - SortedSet asSorted = other as SortedSet; + SortedSet? asSorted = other as SortedSet; if (asSorted != null && HasEqualComparer(asSorted)) { if (Count > asSorted.Count) @@ -1258,14 +1258,14 @@ public bool IsProperSubsetOf(IEnumerable other) throw new ArgumentNullException(nameof(other)); } - if ((other as ICollection) != null) + if (other is ICollection c) { if (Count == 0) - return (other as ICollection).Count > 0; + return c.Count > 0; } // another for sorted sets with the same comparer - SortedSet asSorted = other as SortedSet; + SortedSet? asSorted = other as SortedSet; if (asSorted != null && HasEqualComparer(asSorted)) { if (Count >= asSorted.Count) @@ -1285,12 +1285,12 @@ public bool IsSupersetOf(IEnumerable other) throw new ArgumentNullException(nameof(other)); } - if ((other as ICollection) != null && (other as ICollection).Count == 0) + if (other is ICollection c && c.Count == 0) return true; // do it one way for HashSets // another for sorted sets with the same comparer - SortedSet asSorted = other as SortedSet; + SortedSet? asSorted = other as SortedSet; if (asSorted != null && HasEqualComparer(asSorted)) { if (Count < asSorted.Count) @@ -1318,11 +1318,11 @@ public bool IsProperSupersetOf(IEnumerable other) if (Count == 0) return false; - if ((other as ICollection) != null && (other as ICollection).Count == 0) + if (other is ICollection c && c.Count == 0) return true; // another way for sorted sets - SortedSet asSorted = other as SortedSet; + SortedSet? asSorted = other as SortedSet; if (asSorted != null && HasEqualComparer(asSorted)) { if (asSorted.Count >= Count) @@ -1350,7 +1350,7 @@ public bool SetEquals(IEnumerable other) throw new ArgumentNullException(nameof(other)); } - SortedSet asSorted = other as SortedSet; + SortedSet? asSorted = other as SortedSet; if (asSorted != null && HasEqualComparer(asSorted)) { Enumerator mine = GetEnumerator(); @@ -1384,10 +1384,10 @@ public bool Overlaps(IEnumerable other) if (Count == 0) return false; - if ((other as ICollection != null) && (other as ICollection).Count == 0) + if (other is ICollection c && c.Count == 0) return false; - SortedSet asSorted = other as SortedSet; + SortedSet? asSorted = other as SortedSet; if (asSorted != null && HasEqualComparer(asSorted) && (comparer.Compare(Min, asSorted.Max) > 0 || comparer.Compare(Max, asSorted.Min) < 0)) { return false; @@ -1528,7 +1528,7 @@ internal virtual T MinInternal { if (root == null) { - return default(T); + return default(T)!; // TODO-NULLABLE-GENERIC } Node current = root; @@ -1549,7 +1549,7 @@ internal virtual T MaxInternal { if (root == null) { - return default(T); + return default(T)!; // TODO-NULLABLE-GENERIC } Node current = root; @@ -1626,12 +1626,12 @@ protected virtual void OnDeserialization(object sender) throw new SerializationException(SR.Serialization_InvalidOnDeser); } - comparer = (IComparer)siInfo.GetValue(ComparerName, typeof(IComparer)); + comparer = (IComparer)siInfo.GetValue(ComparerName, typeof(IComparer))!; int savedCount = siInfo.GetInt32(CountName); if (savedCount != 0) { - T[] items = (T[])siInfo.GetValue(ItemsName, typeof(T[])); + T[]? items = (T[]?)siInfo.GetValue(ItemsName, typeof(T[])); if (items == null) { @@ -1665,17 +1665,17 @@ public Node(T item, NodeColor color) Color = color; } - public static bool IsNonNullBlack(Node node) => node != null && node.IsBlack; + public static bool IsNonNullBlack(Node? node) => node != null && node.IsBlack; - public static bool IsNonNullRed(Node node) => node != null && node.IsRed; + public static bool IsNonNullRed(Node? node) => node != null && node.IsRed; - public static bool IsNullOrBlack(Node node) => node == null || node.IsBlack; + public static bool IsNullOrBlack(Node? node) => node == null || node.IsBlack; public T Item { get; set; } - public Node Left { get; set; } + public Node? Left { get; set; } - public Node Right { get; set; } + public Node? Right { get; set; } public NodeColor Color { get; set; } @@ -1703,7 +1703,7 @@ public Node DeepClone(int count) var newNodes = new Stack(2 * Log2(count) + 2); Node newRoot = ShallowClone(); - Node originalCurrent = this; + Node? originalCurrent = this; Node newCurrent = newRoot; while (originalCurrent != null) @@ -1712,7 +1712,7 @@ public Node DeepClone(int count) newNodes.Push(newCurrent); newCurrent.Left = originalCurrent.Left?.ShallowClone(); originalCurrent = originalCurrent.Left; - newCurrent = newCurrent.Left; + newCurrent = newCurrent.Left!; } while (originalNodes.Count != 0) @@ -1720,15 +1720,15 @@ public Node DeepClone(int count) originalCurrent = originalNodes.Pop(); newCurrent = newNodes.Pop(); - Node originalRight = originalCurrent.Right; - Node newRight = originalRight?.ShallowClone(); + Node? originalRight = originalCurrent.Right; + Node? newRight = originalRight?.ShallowClone(); newCurrent.Right = newRight; while (originalRight != null) { originalNodes.Push(originalRight); - newNodes.Push(newRight); - newRight.Left = originalRight.Left?.ShallowClone(); + newNodes.Push(newRight!); + newRight!.Left = originalRight.Left?.ShallowClone(); originalRight = originalRight.Left; newRight = newRight.Left; } @@ -1761,7 +1761,7 @@ public Node GetSibling(Node node) Debug.Assert(node != null); Debug.Assert(node == Left ^ node == Right); - return node == Left ? Right : Left; + return node == Left ? Right! : Left!; } public Node ShallowClone() => new Node(Item, Color); @@ -1779,26 +1779,26 @@ public void Split4Node() /// /// Does a rotation on this tree. May change the color of a grandchild from red to black. /// - public Node Rotate(TreeRotation rotation) + public Node? Rotate(TreeRotation rotation) { Node removeRed; switch (rotation) { case TreeRotation.Right: - removeRed = Left.Left; + removeRed = Left!.Left!; Debug.Assert(removeRed.IsRed); removeRed.ColorBlack(); return RotateRight(); case TreeRotation.Left: - removeRed = Right.Right; + removeRed = Right!.Right!; Debug.Assert(removeRed.IsRed); removeRed.ColorBlack(); return RotateLeft(); case TreeRotation.RightLeft: - Debug.Assert(Right.Left.IsRed); + Debug.Assert(Right!.Left!.IsRed); return RotateRightLeft(); case TreeRotation.LeftRight: - Debug.Assert(Left.Right.IsRed); + Debug.Assert(Left!.Right!.IsRed); return RotateLeftRight(); default: Debug.Fail($"{nameof(rotation)}: {rotation} is not a defined {nameof(TreeRotation)} value."); @@ -1811,7 +1811,7 @@ public Node Rotate(TreeRotation rotation) /// public Node RotateLeft() { - Node child = Right; + Node child = Right!; Right = child.Left; child.Left = this; return child; @@ -1822,8 +1822,8 @@ public Node RotateLeft() /// public Node RotateLeftRight() { - Node child = Left; - Node grandChild = child.Right; + Node child = Left!; + Node grandChild = child.Right!; Left = grandChild.Right; grandChild.Right = this; @@ -1837,7 +1837,7 @@ public Node RotateLeftRight() /// public Node RotateRight() { - Node child = Left; + Node child = Left!; Left = child.Right; child.Right = this; return child; @@ -1848,8 +1848,8 @@ public Node RotateRight() /// public Node RotateRightLeft() { - Node child = Right; - Node grandChild = child.Left; + Node child = Right!; + Node grandChild = child.Left!; Right = grandChild.Left; grandChild.Left = this; @@ -1864,8 +1864,8 @@ public Node RotateRightLeft() public void Merge2Nodes() { Debug.Assert(IsRed); - Debug.Assert(Left.Is2Node); - Debug.Assert(Right.Is2Node); + Debug.Assert(Left!.Is2Node); + Debug.Assert(Right!.Is2Node); // Combine two 2-nodes into a 4-node. ColorBlack(); @@ -1912,13 +1912,13 @@ private bool HasChildren(Node child1, Node child2) [SuppressMessage("Microsoft.Performance", "CA1815:OverrideEqualsAndOperatorEqualsOnValueTypes", Justification = "not an expected scenario")] public struct Enumerator : IEnumerator, IEnumerator, ISerializable, IDeserializationCallback { - private static readonly Node s_dummyNode = new Node(default(T), NodeColor.Red); + private static readonly Node s_dummyNode = new Node(default(T)!, NodeColor.Red); private SortedSet _tree; private int _version; private Stack _stack; - private Node _current; + private Node? _current; private bool _reverse; @@ -1954,8 +1954,8 @@ void IDeserializationCallback.OnDeserialization(object sender) private void Initialize() { _current = null; - Node node = _tree.root; - Node next = null, other = null; + Node? node = _tree.root; + Node? next = null, other = null; while (node != null) { next = (_reverse ? node.Right : node.Left); @@ -1993,8 +1993,8 @@ public bool MoveNext() } _current = _stack.Pop(); - Node node = (_reverse ? _current.Left : _current.Right); - Node next = null, other = null; + Node? node = (_reverse ? _current.Left : _current.Right); + Node? next = null, other = null; while (node != null) { next = (_reverse ? node.Right : node.Left); @@ -2026,11 +2026,11 @@ public T Current { return _current.Item; } - return default(T); + return default(T)!; // TODO-NULLABLE-GENERIC } } - object IEnumerator.Current + object? IEnumerator.Current { get { @@ -2081,15 +2081,15 @@ internal struct ElementCount /// a value that has more complete data than the value you currently have, although their /// comparer functions indicate they are equal. /// - public bool TryGetValue(T equalValue, out T actualValue) + public bool TryGetValue(T equalValue, out T actualValue) // TODO-NULLABLE-GENERIC { - Node node = FindNode(equalValue); + Node? node = FindNode(equalValue); if (node != null) { actualValue = node.Item; return true; } - actualValue = default(T); + actualValue = default(T)!; // TODO-NULLABLE-GENERIC return false; } diff --git a/src/System.Collections/src/System/Collections/Generic/SortedSetEqualityComparer.cs b/src/System.Collections/src/System/Collections/Generic/SortedSetEqualityComparer.cs index 8f4d821426cc..9ab12fae1936 100644 --- a/src/System.Collections/src/System/Collections/Generic/SortedSetEqualityComparer.cs +++ b/src/System.Collections/src/System/Collections/Generic/SortedSetEqualityComparer.cs @@ -12,7 +12,7 @@ internal sealed class SortedSetEqualityComparer : IEqualityComparer _comparer; private readonly IEqualityComparer _memberEqualityComparer; - public SortedSetEqualityComparer(IEqualityComparer memberEqualityComparer) + public SortedSetEqualityComparer(IEqualityComparer? memberEqualityComparer) : this(comparer: null, memberEqualityComparer: memberEqualityComparer) { } @@ -20,7 +20,7 @@ public SortedSetEqualityComparer(IEqualityComparer memberEqualityComparer) /// Create a new SetEqualityComparer, given a comparer for member order and another for member equality (these /// must be consistent in their definition of equality) /// - private SortedSetEqualityComparer(IComparer comparer, IEqualityComparer memberEqualityComparer) + private SortedSetEqualityComparer(IComparer? comparer, IEqualityComparer? memberEqualityComparer) { _comparer = comparer ?? Comparer.Default; _memberEqualityComparer = memberEqualityComparer ?? EqualityComparer.Default; @@ -45,9 +45,9 @@ public int GetHashCode(SortedSet obj) } // Equals method for the comparer itself. - public override bool Equals(object obj) + public override bool Equals(object? obj) { - SortedSetEqualityComparer comparer = obj as SortedSetEqualityComparer; + SortedSetEqualityComparer? comparer = obj as SortedSetEqualityComparer; return comparer != null && _comparer == comparer._comparer; } diff --git a/src/System.Collections/src/System/Collections/Generic/Stack.cs b/src/System.Collections/src/System/Collections/Generic/Stack.cs index 2baeaff8e19b..e696fde7de8e 100644 --- a/src/System.Collections/src/System/Collections/Generic/Stack.cs +++ b/src/System.Collections/src/System/Collections/Generic/Stack.cs @@ -181,7 +181,7 @@ public void TrimExcess() int threshold = (int)(((double)_array.Length) * 0.9); if (_size < threshold) { - Array.Resize(ref _array, _size); + Array.Resize(ref _array!, _size); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 _version++; } } @@ -201,14 +201,14 @@ public T Peek() return array[size]; } - public bool TryPeek(out T result) + public bool TryPeek(out T result) // TODO-NULLABLE-GENERIC { int size = _size - 1; T[] array = _array; if ((uint)size >= (uint)array.Length) { - result = default; + result = default!; // TODO-NULLABLE-GENERIC return false; } result = array[size]; @@ -235,19 +235,19 @@ public T Pop() T item = array[size]; if (RuntimeHelpers.IsReferenceOrContainsReferences()) { - array[size] = default; // Free memory quicker. + array[size] = default!; // Free memory quicker. } return item; } - public bool TryPop(out T result) + public bool TryPop(out T result) // TODO-NULLABLE-GENERIC { int size = _size - 1; T[] array = _array; if ((uint)size >= (uint)array.Length) { - result = default; + result = default!; // TODO-NULLABLE-GENERIC return false; } @@ -256,7 +256,7 @@ public bool TryPop(out T result) result = array[size]; if (RuntimeHelpers.IsReferenceOrContainsReferences()) { - array[size] = default; // Free memory quicker. + array[size] = default!; // Free memory quicker. } return true; } @@ -283,7 +283,7 @@ public void Push(T item) [MethodImpl(MethodImplOptions.NoInlining)] private void PushWithResize(T item) { - Array.Resize(ref _array, (_array.Length == 0) ? DefaultCapacity : 2 * _array.Length); + Array.Resize(ref _array!, (_array.Length == 0) ? DefaultCapacity : 2 * _array.Length); // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 _array[_size] = item; _version++; _size++; @@ -324,7 +324,7 @@ internal Enumerator(Stack stack) _stack = stack; _version = stack._version; _index = -2; - _currentElement = default(T); + _currentElement = default!; // TODO-NULLABLE-GENERIC } public void Dispose() @@ -353,7 +353,7 @@ public bool MoveNext() if (retval) _currentElement = _stack._array[_index]; else - _currentElement = default(T); + _currentElement = default!; // TODO-NULLABLE-GENERIC return retval; } @@ -373,7 +373,7 @@ private void ThrowEnumerationNotStartedOrEnded() throw new InvalidOperationException(_index == -2 ? SR.InvalidOperation_EnumNotStarted : SR.InvalidOperation_EnumEnded); } - object System.Collections.IEnumerator.Current + object? System.Collections.IEnumerator.Current { get { return Current; } } @@ -382,7 +382,7 @@ void IEnumerator.Reset() { if (_version != _stack._version) throw new InvalidOperationException(SR.InvalidOperation_EnumFailedVersion); _index = -2; - _currentElement = default(T); + _currentElement = default!; // TODO-NULLABLE-GENERIC } } } diff --git a/src/System.Collections/src/System/Collections/StructuralComparisons.cs b/src/System.Collections/src/System/Collections/StructuralComparisons.cs index a062acd5f8f7..4b73ef254800 100644 --- a/src/System.Collections/src/System/Collections/StructuralComparisons.cs +++ b/src/System.Collections/src/System/Collections/StructuralComparisons.cs @@ -8,14 +8,14 @@ namespace System.Collections { public static class StructuralComparisons { - private static volatile IComparer s_StructuralComparer; - private static volatile IEqualityComparer s_StructuralEqualityComparer; + private static volatile IComparer? s_StructuralComparer; + private static volatile IEqualityComparer? s_StructuralEqualityComparer; public static IComparer StructuralComparer { get { - IComparer comparer = s_StructuralComparer; + IComparer? comparer = s_StructuralComparer; if (comparer == null) { comparer = new StructuralComparer(); @@ -29,7 +29,7 @@ public static IEqualityComparer StructuralEqualityComparer { get { - IEqualityComparer comparer = s_StructuralEqualityComparer; + IEqualityComparer? comparer = s_StructuralEqualityComparer; if (comparer == null) { comparer = new StructuralEqualityComparer(); @@ -42,11 +42,11 @@ public static IEqualityComparer StructuralEqualityComparer internal sealed class StructuralEqualityComparer : IEqualityComparer { - public new bool Equals(object x, object y) + public new bool Equals(object? x, object? y) { if (x != null) { - IStructuralEquatable seObj = x as IStructuralEquatable; + IStructuralEquatable? seObj = x as IStructuralEquatable; if (seObj != null) { @@ -70,7 +70,7 @@ public int GetHashCode(object obj) { if (obj == null) return 0; - IStructuralEquatable seObj = obj as IStructuralEquatable; + IStructuralEquatable? seObj = obj as IStructuralEquatable; if (seObj != null) { @@ -83,12 +83,12 @@ public int GetHashCode(object obj) internal sealed class StructuralComparer : IComparer { - public int Compare(object x, object y) + public int Compare(object? x, object? y) { if (x == null) return y == null ? 0 : -1; if (y == null) return 1; - IStructuralComparable scX = x as IStructuralComparable; + IStructuralComparable? scX = x as IStructuralComparable; if (scX != null) { From cbb62e0e6ebdb10d5b2c6badb9245b4d28120131 Mon Sep 17 00:00:00 2001 From: Stephen Toub Date: Wed, 8 May 2019 17:26:44 -0400 Subject: [PATCH 283/607] Suppress NullableAttribute reverse API compat warnings --- eng/DefaultGenApiDocIds.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/eng/DefaultGenApiDocIds.txt b/eng/DefaultGenApiDocIds.txt index aa489e4a575b..2baff23ad3b2 100644 --- a/eng/DefaultGenApiDocIds.txt +++ b/eng/DefaultGenApiDocIds.txt @@ -20,8 +20,9 @@ T:System.IO.IODescriptionAttribute T:System.Runtime.CompilerServices.AsyncStateMachineAttribute T:System.Runtime.CompilerServices.CompilerGeneratedAttribute T:System.Runtime.CompilerServices.IteratorStateMachineAttribute -T:System.Runtime.CompilerServices.TypeForwardedFromAttribute T:System.Runtime.CompilerServices.MethodImpl +T:System.Runtime.CompilerServices.NullableAttribute +T:System.Runtime.CompilerServices.TypeForwardedFromAttribute T:System.Runtime.ConstrainedExecution.ReliabilityContractAttribute T:System.Runtime.InteropServices.ClassInterfaceAttribute T:System.Runtime.InteropServices.ComDefaultInterfaceAttribute From 34fe566b6f6bd739a876e7e1dc48cf631647e5d7 Mon Sep 17 00:00:00 2001 From: Koundinya Veluri Date: Thu, 9 May 2019 03:44:39 -0700 Subject: [PATCH 284/607] Expose and test APIs for some threading metrics (CoreFX) (#37401) * Expose and test APIs for some threading metrics (CoreFX) - API review: https://github.com/dotnet/corefx/issues/35500 - Depends on https://github.com/dotnet/coreclr/pull/22754, https://github.com/dotnet/corert/pull/7066 * Separate and expose pending local vs global work item count * Remove local/global variants of PendingWorkItemCount * Remove unrelated test * Add test for a fix to ThreadLocal.Values property throwing NullReferenceException when disposed Fix is in https://github.com/dotnet/corert/pull/7066 * Fix build * Fix test * Add API compat baselines for uapaot * Fix test * Use RemoteExecutor for MetricsTest * Address feedback --- .../System/Threading/ThreadTestHelpers.cs | 22 ++- .../tests/Configurations.props | 1 + .../System.Threading.Overlapped.Tests.csproj | 9 +- ...BoundHandle_IntegrationTests.netcoreapp.cs | 19 +++ .../System.Threading.Thread.Tests.csproj | 2 +- .../tests/ThreadTests.netcoreapp.cs | 1 + .../ref/System.Threading.ThreadPool.cs | 3 + .../src/ApiCompatBaseline.uapaot.txt | 4 + .../tests/Configurations.props | 1 + .../System.Threading.ThreadPool.Tests.csproj | 4 +- .../tests/ThreadPoolTests.netcoreapp.cs | 142 ++++++++++++++++++ .../tests/Configurations.props | 1 + .../tests/System.Threading.Timer.Tests.csproj | 9 +- .../tests/TimerFiringTests.cs | 54 ------- src/System.Threading/ref/System.Threading.cs | 1 + .../src/ApiCompatBaseline.uapaot.txt | 2 + .../tests/Configurations.props | 1 + src/System.Threading/tests/MonitorTests.cs | 2 +- .../tests/MonitorTests.netcoreapp.cs | 23 +++ .../tests/System.Threading.Tests.csproj | 7 +- .../tests/ThreadLocalTests.cs | 69 +++++++++ 21 files changed, 305 insertions(+), 72 deletions(-) create mode 100644 src/System.Threading.Overlapped/tests/ThreadPoolBoundHandle_IntegrationTests.netcoreapp.cs create mode 100644 src/System.Threading.ThreadPool/src/ApiCompatBaseline.uapaot.txt create mode 100644 src/System.Threading/src/ApiCompatBaseline.uapaot.txt create mode 100644 src/System.Threading/tests/MonitorTests.netcoreapp.cs diff --git a/src/Common/tests/System/Threading/ThreadTestHelpers.cs b/src/Common/tests/System/Threading/ThreadTestHelpers.cs index d5735754ff1b..4ebcdcb298b6 100644 --- a/src/Common/tests/System/Threading/ThreadTestHelpers.cs +++ b/src/Common/tests/System/Threading/ThreadTestHelpers.cs @@ -123,13 +123,29 @@ public static void WaitForConditionWithoutBlocking(Func condition) WaitForConditionWithCustomDelay(condition, () => Thread.Yield()); } + public static void WaitForConditionWithoutRelinquishingTimeSlice(Func condition) + { + WaitForConditionWithCustomDelay(condition, () => Thread.SpinWait(1)); + } + public static void WaitForConditionWithCustomDelay(Func condition, Action delay) { - var startTime = DateTime.Now; - while (!condition()) + if (condition()) + { + return; + } + + int startTimeMs = Environment.TickCount; + while (true) { - Assert.True((DateTime.Now - startTime).TotalMilliseconds < UnexpectedTimeoutMilliseconds); delay(); + + if (condition()) + { + return; + } + + Assert.InRange(Environment.TickCount - startTimeMs, 0, UnexpectedTimeoutMilliseconds); } } diff --git a/src/System.Threading.Overlapped/tests/Configurations.props b/src/System.Threading.Overlapped/tests/Configurations.props index e31e3bc489fb..ba03084f3192 100644 --- a/src/System.Threading.Overlapped/tests/Configurations.props +++ b/src/System.Threading.Overlapped/tests/Configurations.props @@ -1,6 +1,7 @@  + netcoreapp; netstandard; uap-Windows_NT; diff --git a/src/System.Threading.Overlapped/tests/System.Threading.Overlapped.Tests.csproj b/src/System.Threading.Overlapped/tests/System.Threading.Overlapped.Tests.csproj index 5fc24ef59604..f2cef71d179a 100644 --- a/src/System.Threading.Overlapped/tests/System.Threading.Overlapped.Tests.csproj +++ b/src/System.Threading.Overlapped/tests/System.Threading.Overlapped.Tests.csproj @@ -2,13 +2,15 @@ {861A3318-35AD-46ac-8257-8D5D2479BAD9} true - netstandard-Debug;netstandard-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release + true + netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release true + @@ -21,4 +23,9 @@ + + + CommonTest\System\Threading\ThreadTestHelpers.cs + + \ No newline at end of file diff --git a/src/System.Threading.Overlapped/tests/ThreadPoolBoundHandle_IntegrationTests.netcoreapp.cs b/src/System.Threading.Overlapped/tests/ThreadPoolBoundHandle_IntegrationTests.netcoreapp.cs new file mode 100644 index 000000000000..7b0aebbd4a53 --- /dev/null +++ b/src/System.Threading.Overlapped/tests/ThreadPoolBoundHandle_IntegrationTests.netcoreapp.cs @@ -0,0 +1,19 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Threading; +using System.Threading.Tests; +using Xunit; + +public partial class ThreadPoolBoundHandleTests +{ + [Fact] + [PlatformSpecific(TestPlatforms.Windows)] // ThreadPoolBoundHandle.BindHandle is not supported on Unix + public unsafe void MultipleOperationsOverSingleHandle_CompletedWorkItemCountTest() + { + long initialCompletedWorkItemCount = ThreadPool.CompletedWorkItemCount; + MultipleOperationsOverMultipleHandles(); + ThreadTestHelpers.WaitForCondition(() => ThreadPool.CompletedWorkItemCount - initialCompletedWorkItemCount >= 2); + } +} diff --git a/src/System.Threading.Thread/tests/System.Threading.Thread.Tests.csproj b/src/System.Threading.Thread/tests/System.Threading.Thread.Tests.csproj index 1b617e47d9e6..4cbbd6a58611 100644 --- a/src/System.Threading.Thread/tests/System.Threading.Thread.Tests.csproj +++ b/src/System.Threading.Thread/tests/System.Threading.Thread.Tests.csproj @@ -17,7 +17,7 @@ - CommonTest\System\Threading\ThreadPoolHelpers.cs + CommonTest\System\Threading\ThreadTestHelpers.cs STAMain diff --git a/src/System.Threading.Thread/tests/ThreadTests.netcoreapp.cs b/src/System.Threading.Thread/tests/ThreadTests.netcoreapp.cs index 79e306397a75..d8f9c84138e2 100644 --- a/src/System.Threading.Thread/tests/ThreadTests.netcoreapp.cs +++ b/src/System.Threading.Thread/tests/ThreadTests.netcoreapp.cs @@ -8,6 +8,7 @@ namespace System.Threading.Threads.Tests { public static partial class ThreadTests { + [Fact] public static void GetCurrentProcessorId() { Assert.True(Thread.GetCurrentProcessorId() >= 0); diff --git a/src/System.Threading.ThreadPool/ref/System.Threading.ThreadPool.cs b/src/System.Threading.ThreadPool/ref/System.Threading.ThreadPool.cs index ea6804807460..56fe570dd5de 100644 --- a/src/System.Threading.ThreadPool/ref/System.Threading.ThreadPool.cs +++ b/src/System.Threading.ThreadPool/ref/System.Threading.ThreadPool.cs @@ -21,9 +21,11 @@ public static partial class ThreadPool [System.ObsoleteAttribute("ThreadPool.BindHandle(IntPtr) has been deprecated. Please use ThreadPool.BindHandle(SafeHandle) instead.", false)] public static bool BindHandle(System.IntPtr osHandle) { throw null; } public static bool BindHandle(System.Runtime.InteropServices.SafeHandle osHandle) { throw null; } + public static long CompletedWorkItemCount { get { throw null; } } public static void GetAvailableThreads(out int workerThreads, out int completionPortThreads) { throw null; } public static void GetMaxThreads(out int workerThreads, out int completionPortThreads) { throw null; } public static void GetMinThreads(out int workerThreads, out int completionPortThreads) { throw null; } + public static long PendingWorkItemCount { get { throw null; } } public static bool QueueUserWorkItem(System.Threading.WaitCallback callBack) { throw null; } public static bool QueueUserWorkItem(System.Threading.WaitCallback callBack, object state) { throw null; } public static bool QueueUserWorkItem(System.Action callBack, TState state, bool preferLocal) { throw null; } @@ -34,6 +36,7 @@ public static partial class ThreadPool public static System.Threading.RegisteredWaitHandle RegisterWaitForSingleObject(System.Threading.WaitHandle waitObject, System.Threading.WaitOrTimerCallback callBack, object state, uint millisecondsTimeOutInterval, bool executeOnlyOnce) { throw null; } public static bool SetMaxThreads(int workerThreads, int completionPortThreads) { throw null; } public static bool SetMinThreads(int workerThreads, int completionPortThreads) { throw null; } + public static int ThreadCount { get { throw null; } } [System.CLSCompliantAttribute(false)] public unsafe static bool UnsafeQueueNativeOverlapped(System.Threading.NativeOverlapped* overlapped) { throw null; } public static bool UnsafeQueueUserWorkItem(System.Threading.IThreadPoolWorkItem callBack, bool preferLocal) { throw null; } diff --git a/src/System.Threading.ThreadPool/src/ApiCompatBaseline.uapaot.txt b/src/System.Threading.ThreadPool/src/ApiCompatBaseline.uapaot.txt new file mode 100644 index 000000000000..2aae58bf2cfd --- /dev/null +++ b/src/System.Threading.ThreadPool/src/ApiCompatBaseline.uapaot.txt @@ -0,0 +1,4 @@ +Compat issues with assembly System.Threading.ThreadPool: +MembersMustExist : Member 'System.Threading.ThreadPool.CompletedWorkItemCount.get()' does not exist in the implementation but it does exist in the contract. +MembersMustExist : Member 'System.Threading.ThreadPool.PendingWorkItemCount.get()' does not exist in the implementation but it does exist in the contract. +MembersMustExist : Member 'System.Threading.ThreadPool.ThreadCount.get()' does not exist in the implementation but it does exist in the contract. diff --git a/src/System.Threading.ThreadPool/tests/Configurations.props b/src/System.Threading.ThreadPool/tests/Configurations.props index f5d3d45ffbf4..2ae79c79febf 100644 --- a/src/System.Threading.ThreadPool/tests/Configurations.props +++ b/src/System.Threading.ThreadPool/tests/Configurations.props @@ -3,6 +3,7 @@ netcoreapp; netstandard; + uap; \ No newline at end of file diff --git a/src/System.Threading.ThreadPool/tests/System.Threading.ThreadPool.Tests.csproj b/src/System.Threading.ThreadPool/tests/System.Threading.ThreadPool.Tests.csproj index fe7245c4389a..1762ff82ddc8 100644 --- a/src/System.Threading.ThreadPool/tests/System.Threading.ThreadPool.Tests.csproj +++ b/src/System.Threading.ThreadPool/tests/System.Threading.ThreadPool.Tests.csproj @@ -2,12 +2,12 @@ {403AD1B8-6F95-4A2E-92A2-727606ABD866} true - netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release + netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release;uap-Debug;uap-Release true - + diff --git a/src/System.Threading.ThreadPool/tests/ThreadPoolTests.netcoreapp.cs b/src/System.Threading.ThreadPool/tests/ThreadPoolTests.netcoreapp.cs index 2ddd1f422bcc..567f69e50b1b 100644 --- a/src/System.Threading.ThreadPool/tests/ThreadPoolTests.netcoreapp.cs +++ b/src/System.Threading.ThreadPool/tests/ThreadPoolTests.netcoreapp.cs @@ -5,6 +5,8 @@ using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; +using System.Threading.Tests; +using Microsoft.DotNet.RemoteExecutor; using Xunit; namespace System.Threading.ThreadPools.Tests @@ -188,5 +190,145 @@ private sealed class InvalidWorkItemAndTask : Task, IThreadPoolWorkItem public InvalidWorkItemAndTask(Action action) : base(action) { } public void Execute() { } } + + [ConditionalFact(nameof(HasAtLeastThreeProcessors))] + public void MetricsTest() + { + RemoteExecutor.Invoke(() => + { + int processorCount = Environment.ProcessorCount; + if (processorCount <= 2) + { + return; + } + + bool waitForWorkStart = false; + var workStarted = new AutoResetEvent(false); + var localWorkScheduled = new AutoResetEvent(false); + int completeWork = 0; + int queuedWorkCount = 0; + var allWorkCompleted = new ManualResetEvent(false); + Exception backgroundEx = null; + Action work = () => + { + if (waitForWorkStart) + { + workStarted.Set(); + } + try + { + // Blocking can affect thread pool thread injection heuristics, so don't block, pretend like a + // long-running CPU-bound work item + ThreadTestHelpers.WaitForConditionWithoutRelinquishingTimeSlice( + () => Interlocked.CompareExchange(ref completeWork, 0, 0) != 0); + } + catch (Exception ex) + { + Interlocked.CompareExchange(ref backgroundEx, ex, null); + } + finally + { + if (Interlocked.Decrement(ref queuedWorkCount) == 0) + { + allWorkCompleted.Set(); + } + } + }; + WaitCallback threadPoolGlobalWork = data => work(); + Action threadPoolLocalWork = data => work(); + WaitCallback scheduleThreadPoolLocalWork = data => + { + try + { + int n = (int)data; + for (int i = 0; i < n; ++i) + { + ThreadPool.QueueUserWorkItem(threadPoolLocalWork, null, preferLocal: true); + if (waitForWorkStart) + { + workStarted.CheckedWait(); + } + } + } + catch (Exception ex) + { + Interlocked.CompareExchange(ref backgroundEx, ex, null); + } + finally + { + localWorkScheduled.Set(); + } + }; + + var signaledEvent = new ManualResetEvent(true); + var timers = new List(); + int totalWorkCountToQueue = 0; + Action scheduleWork = () => + { + Assert.True(queuedWorkCount < totalWorkCountToQueue); + + int workCount = (totalWorkCountToQueue - queuedWorkCount) / 2; + if (workCount > 0) + { + queuedWorkCount += workCount; + ThreadPool.QueueUserWorkItem(scheduleThreadPoolLocalWork, workCount); + localWorkScheduled.CheckedWait(); + } + + for (; queuedWorkCount < totalWorkCountToQueue; ++queuedWorkCount) + { + ThreadPool.QueueUserWorkItem(threadPoolGlobalWork); + if (waitForWorkStart) + { + workStarted.CheckedWait(); + } + } + }; + + Interlocked.MemoryBarrierProcessWide(); // get a reasonably accurate value for the following + long initialCompletedWorkItemCount = ThreadPool.CompletedWorkItemCount; + + try + { + // Schedule some simultaneous work that would all be scheduled and verify the thread count + totalWorkCountToQueue = processorCount - 2; + Assert.True(totalWorkCountToQueue >= 1); + waitForWorkStart = true; + scheduleWork(); + Assert.True(ThreadPool.ThreadCount >= totalWorkCountToQueue); + + int runningWorkItemCount = queuedWorkCount; + + // Schedule more work that would not all be scheduled and roughly verify the pending work item count + totalWorkCountToQueue = processorCount * 64; + waitForWorkStart = false; + scheduleWork(); + int minExpectedPendingWorkCount = Math.Max(1, queuedWorkCount - runningWorkItemCount * 8); + ThreadTestHelpers.WaitForCondition(() => ThreadPool.PendingWorkItemCount >= minExpectedPendingWorkCount); + } + finally + { + // Complete the work + Interlocked.Exchange(ref completeWork, 1); + } + + // Wait for work items to exit, for counting + allWorkCompleted.CheckedWait(); + backgroundEx = Interlocked.CompareExchange(ref backgroundEx, null, null); + if (backgroundEx != null) + { + throw new AggregateException(backgroundEx); + } + + // Verify the completed work item count + ThreadTestHelpers.WaitForCondition(() => + { + Interlocked.MemoryBarrierProcessWide(); // get a reasonably accurate value for the following + return ThreadPool.CompletedWorkItemCount - initialCompletedWorkItemCount >= totalWorkCountToQueue; + }); + }).Dispose(); + } + + public static bool HasAtLeastThreeProcessors => Environment.ProcessorCount >= 3; } } diff --git a/src/System.Threading.Timer/tests/Configurations.props b/src/System.Threading.Timer/tests/Configurations.props index f5d3d45ffbf4..2ae79c79febf 100644 --- a/src/System.Threading.Timer/tests/Configurations.props +++ b/src/System.Threading.Timer/tests/Configurations.props @@ -3,6 +3,7 @@ netcoreapp; netstandard; + uap; \ No newline at end of file diff --git a/src/System.Threading.Timer/tests/System.Threading.Timer.Tests.csproj b/src/System.Threading.Timer/tests/System.Threading.Timer.Tests.csproj index d4b83860cfa4..6575f1bfa4a0 100644 --- a/src/System.Threading.Timer/tests/System.Threading.Timer.Tests.csproj +++ b/src/System.Threading.Timer/tests/System.Threading.Timer.Tests.csproj @@ -1,7 +1,7 @@ {ac20a28f-fda8-45e8-8728-058ead16e44c} - netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release + netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release;uap-Debug;uap-Release true true @@ -10,12 +10,7 @@ - + - - - CommonTest\System\Threading\ThreadTestHelpers.cs - - \ No newline at end of file diff --git a/src/System.Threading.Timer/tests/TimerFiringTests.cs b/src/System.Threading.Timer/tests/TimerFiringTests.cs index 375df334653b..00006f68f0df 100644 --- a/src/System.Threading.Timer/tests/TimerFiringTests.cs +++ b/src/System.Threading.Timer/tests/TimerFiringTests.cs @@ -10,7 +10,6 @@ using System.Text; using System.Threading; using System.Threading.Tasks; -using System.Threading.Tests; using Xunit; using Xunit.Sdk; @@ -338,57 +337,4 @@ private static async Task PeriodAsync(int period, int iterations) await tcs.Task.ConfigureAwait(false); } } - - [Fact] - public void TimersCreatedConcurrentlyOnDifferentThreadsAllFire() - { - int processorCount = Environment.ProcessorCount; - - int timerTickCount = 0; - TimerCallback timerCallback = _ => Interlocked.Increment(ref timerTickCount); - - var threadStarted = new AutoResetEvent(false); - var createTimers = new ManualResetEvent(false); - var timers = new Timer[processorCount]; - Action createTimerThreadStart = data => - { - int i = (int)data; - var sw = new Stopwatch(); - threadStarted.Set(); - createTimers.WaitOne(); - - // Use the CPU a bit around creating the timer to try to have some of these threads run concurrently - sw.Restart(); - do - { - Thread.SpinWait(1000); - } while (sw.ElapsedMilliseconds < 10); - - timers[i] = new Timer(timerCallback, null, 1, Timeout.Infinite); - - // Use the CPU a bit around creating the timer to try to have some of these threads run concurrently - sw.Restart(); - do - { - Thread.SpinWait(1000); - } while (sw.ElapsedMilliseconds < 10); - }; - - var waitsForThread = new Action[timers.Length]; - for (int i = 0; i < timers.Length; ++i) - { - var t = ThreadTestHelpers.CreateGuardedThread(out waitsForThread[i], createTimerThreadStart); - t.IsBackground = true; - t.Start(i); - threadStarted.CheckedWait(); - } - - createTimers.Set(); - ThreadTestHelpers.WaitForCondition(() => timerTickCount == timers.Length); - - foreach (var waitForThread in waitsForThread) - { - waitForThread(); - } - } } diff --git a/src/System.Threading/ref/System.Threading.cs b/src/System.Threading/ref/System.Threading.cs index 66bb5f5f7b4f..b65709a4b442 100644 --- a/src/System.Threading/ref/System.Threading.cs +++ b/src/System.Threading/ref/System.Threading.cs @@ -228,6 +228,7 @@ public static void Enter(object obj) { } public static void Enter(object obj, ref bool lockTaken) { } public static void Exit(object obj) { } public static bool IsEntered(object obj) { throw null; } + public static long LockContentionCount { get { throw null; } } public static void Pulse(object obj) { } public static void PulseAll(object obj) { } public static bool TryEnter(object obj) { throw null; } diff --git a/src/System.Threading/src/ApiCompatBaseline.uapaot.txt b/src/System.Threading/src/ApiCompatBaseline.uapaot.txt new file mode 100644 index 000000000000..8db229d21609 --- /dev/null +++ b/src/System.Threading/src/ApiCompatBaseline.uapaot.txt @@ -0,0 +1,2 @@ +Compat issues with assembly System.Threading: +MembersMustExist : Member 'System.Threading.Monitor.LockContentionCount.get()' does not exist in the implementation but it does exist in the contract. diff --git a/src/System.Threading/tests/Configurations.props b/src/System.Threading/tests/Configurations.props index febffb03ac69..90185507ad77 100644 --- a/src/System.Threading/tests/Configurations.props +++ b/src/System.Threading/tests/Configurations.props @@ -3,6 +3,7 @@ netstandard; netcoreapp; + uap; \ No newline at end of file diff --git a/src/System.Threading/tests/MonitorTests.cs b/src/System.Threading/tests/MonitorTests.cs index 2d37c4b8c13b..f7fab6e40551 100644 --- a/src/System.Threading/tests/MonitorTests.cs +++ b/src/System.Threading/tests/MonitorTests.cs @@ -10,7 +10,7 @@ namespace System.Threading.Tests { - public static class MonitorTests + public static partial class MonitorTests { private const int FailTimeoutMilliseconds = 30000; diff --git a/src/System.Threading/tests/MonitorTests.netcoreapp.cs b/src/System.Threading/tests/MonitorTests.netcoreapp.cs new file mode 100644 index 000000000000..48eb758a3efc --- /dev/null +++ b/src/System.Threading/tests/MonitorTests.netcoreapp.cs @@ -0,0 +1,23 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; +using System.Collections.Generic; +using System.Threading; +using System.Threading.Tasks; +using Xunit; + +namespace System.Threading.Tests +{ + public static partial class MonitorTests + { + [Fact] + public static void Enter_HasToWait_LockContentionCountTest() + { + long initialLockContentionCount = Monitor.LockContentionCount; + Enter_HasToWait(); + Assert.True(Monitor.LockContentionCount - initialLockContentionCount >= 2); + } + } +} diff --git a/src/System.Threading/tests/System.Threading.Tests.csproj b/src/System.Threading/tests/System.Threading.Tests.csproj index 5054c23ddd63..d95b7b7599dc 100644 --- a/src/System.Threading/tests/System.Threading.Tests.csproj +++ b/src/System.Threading/tests/System.Threading.Tests.csproj @@ -3,7 +3,7 @@ {18EF66B3-51EE-46D8-B283-1CB6A1197813} true true - netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release + netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release;uap-Debug;uap-Release @@ -15,13 +15,14 @@ - + + @@ -30,7 +31,7 @@ - + diff --git a/src/System.Threading/tests/ThreadLocalTests.cs b/src/System.Threading/tests/ThreadLocalTests.cs index abf089a38003..f703ed341895 100644 --- a/src/System.Threading/tests/ThreadLocalTests.cs +++ b/src/System.Threading/tests/ThreadLocalTests.cs @@ -368,6 +368,75 @@ public static void RunThreadLocalTest9_Uninitialized() } } + [Fact] + [OuterLoop] + [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] + public static void ValuesGetterDoesNotThrowUnexpectedExceptionWhenDisposed() + { + var startTest = new ManualResetEvent(false); + var gotUnexpectedException = new ManualResetEvent(false); + ThreadLocal threadLocal = null; + bool stop = false; + + Action waitForCreatorDisposer; + Thread creatorDisposer = ThreadTestHelpers.CreateGuardedThread(out waitForCreatorDisposer, () => + { + startTest.CheckedWait(); + do + { + var tl = new ThreadLocal(trackAllValues: true); + Volatile.Write(ref threadLocal, tl); + tl.Value = 1; + tl.Dispose(); + } while (!Volatile.Read(ref stop)); + }); + creatorDisposer.IsBackground = true; + creatorDisposer.Start(); + + int readerCount = Math.Max(1, Environment.ProcessorCount - 1); + var waitsForReader = new Action[readerCount]; + for (int i = 0; i < readerCount; ++i) + { + Thread reader = ThreadTestHelpers.CreateGuardedThread(out waitsForReader[i], () => + { + startTest.CheckedWait(); + do + { + var tl = Volatile.Read(ref threadLocal); + if (tl == null) + { + continue; + } + + try + { + IList values = tl.Values; + } + catch (ObjectDisposedException) + { + } + catch + { + gotUnexpectedException.Set(); + throw; + } + } while (!Volatile.Read(ref stop)); + }); + reader.IsBackground = true; + reader.Start(); + } + + startTest.Set(); + bool failed = gotUnexpectedException.WaitOne(500); + Volatile.Write(ref stop, true); + foreach (Action waitForReader in waitsForReader) + { + waitForReader(); + } + waitForCreatorDisposer(); + Assert.False(failed); + } + private class SetMreOnFinalize { private ManualResetEventSlim _mres; From 6a9f9438df3a3410d6f10d2d71f5b375a5477838 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Thu, 9 May 2019 06:58:01 -0400 Subject: [PATCH 285/607] [master] Update dependencies from dotnet/core-setup (#37489) * Update dependencies from https://github.com/dotnet/core-setup build 20190506.21 - Microsoft.NETCore.App - 3.0.0-preview6-27706-21 - Microsoft.NETCore.DotNetHostPolicy - 3.0.0-preview6-27706-21 - Microsoft.NETCore.DotNetHost - 3.0.0-preview6-27706-21 * Update dependencies from https://github.com/dotnet/core-setup build 20190507.10 - Microsoft.NETCore.App - 3.0.0-preview6-27707-10 - Microsoft.NETCore.DotNetHostPolicy - 3.0.0-preview6-27707-10 - Microsoft.NETCore.DotNetHost - 3.0.0-preview6-27707-10 --- eng/Version.Details.xml | 12 ++++++------ eng/Versions.props | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 4995ff1acc28..73e9f2b72088 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -14,17 +14,17 @@ - + https://github.com/dotnet/core-setup - 66f7e1a107eceab2767369588e7309747a0d71f7 + 911b9999b1755450e774486e96f7e5517355f08d - + https://github.com/dotnet/core-setup - 66f7e1a107eceab2767369588e7309747a0d71f7 + 911b9999b1755450e774486e96f7e5517355f08d - + https://github.com/dotnet/core-setup - 66f7e1a107eceab2767369588e7309747a0d71f7 + 911b9999b1755450e774486e96f7e5517355f08d https://github.com/dotnet/corefx diff --git a/eng/Versions.props b/eng/Versions.props index 60705d488ece..2fad1a71bcd8 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -36,9 +36,9 @@ 2.2.0-beta.19254.1 1.0.0-beta.19254.1 - 3.0.0-preview6-27706-03 - 3.0.0-preview6-27706-03 - 3.0.0-preview6-27706-03 + 3.0.0-preview6-27707-10 + 3.0.0-preview6-27707-10 + 3.0.0-preview6-27707-10 3.0.0-preview6-27705-72 3.0.0-preview6-27705-72 From a3d47e2fdaaa9fd76cdcf5c9e311d1e82e4b5855 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Thu, 9 May 2019 06:59:59 -0400 Subject: [PATCH 286/607] [master] Update dependencies from dnceng/internal/dotnet-optimization (#37492) * Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-optimization build 20190507.1 - optimization.windows_nt-x64.IBC.CoreFx - 99.99.99-master-20190507.1 * Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-optimization build 20190508.1 - optimization.windows_nt-x64.IBC.CoreFx - 99.99.99-master-20190508.1 --- eng/Version.Details.xml | 4 ++-- eng/Versions.props | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 73e9f2b72088..99b32e3e1f20 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -94,9 +94,9 @@ https://github.com/dotnet/arcade 1b8589bbf53b9a5e819460798eff59830f39a3be - + https://dev.azure.com/dnceng/internal/_git/dotnet-optimization - 1c49409dc0cd36d049721c39b4f4013562a9625b + e8748bcc9e80a48d339d76dca39a758459faceff diff --git a/eng/Versions.props b/eng/Versions.props index 2fad1a71bcd8..2de54a6ef7b1 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -48,6 +48,6 @@ 2.1.0-prerelease.19230.1 - 99.99.99-master-20190506.1 + 99.99.99-master-20190508.1 From c7df52957d84adc4229114e7885f6c4f25abe13d Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Thu, 9 May 2019 07:01:03 -0400 Subject: [PATCH 287/607] Update dependencies from https://github.com/dotnet/corefx build 20190507.8 (#37513) - Microsoft.NETCore.Platforms - 3.0.0-preview6.19257.8 - runtime.native.System.IO.Ports - 4.6.0-preview6.19257.8 --- eng/Version.Details.xml | 8 ++++---- eng/Versions.props | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 99b32e3e1f20..ece2e8d69ded 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -26,13 +26,13 @@ https://github.com/dotnet/core-setup 911b9999b1755450e774486e96f7e5517355f08d - + https://github.com/dotnet/corefx - 28a926b5b38eefb18cd77b4cb0b74fdda99cdb26 + 2c75f5a09f770f3118e09abc35bdf88c1c7120b0 - + https://github.com/dotnet/corefx - 28a926b5b38eefb18cd77b4cb0b74fdda99cdb26 + 2c75f5a09f770f3118e09abc35bdf88c1c7120b0 https://github.com/dotnet/arcade diff --git a/eng/Versions.props b/eng/Versions.props index 2de54a6ef7b1..acf0768000c9 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -43,8 +43,8 @@ 3.0.0-preview6-27705-72 3.0.0-preview6-27705-72 - 3.0.0-preview6.19256.13 - 4.6.0-preview6.19256.13 + 3.0.0-preview6.19257.8 + 4.6.0-preview6.19257.8 2.1.0-prerelease.19230.1 From 5640cde41c872e03e6a8a751fac5092e3c68b2c6 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Thu, 9 May 2019 07:03:22 -0400 Subject: [PATCH 288/607] [master] Update dependencies from dotnet/coreclr (#37514) * Update dependencies from https://github.com/dotnet/coreclr build 20190507.72 - Microsoft.NET.Sdk.IL - 3.0.0-preview6-27707-72 - Microsoft.NETCore.ILAsm - 3.0.0-preview6-27707-72 - Microsoft.NETCore.Runtime.CoreCLR - 3.0.0-preview6-27707-72 * Update Microsoft.DotNet.XUnitConsoleRunner We need the fix which removes STAThread from the main routine of xunit.console. * Clean up the baseline for DiagnosticCounter * Update test baseline. --- eng/Version.Details.xml | 16 ++++----- eng/Versions.props | 6 ++-- global.json | 2 +- .../tests/ProcessStartInfoTests.cs | 5 ++- .../src/MatchingRefApiCompatBaseline.txt | 5 +-- .../tests/ThreadTests.cs | 35 +++++++++++++------ 6 files changed, 41 insertions(+), 28 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index ece2e8d69ded..2130c44840a4 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -1,16 +1,16 @@ - + https://github.com/dotnet/coreclr - 08136a667d1a30c242f40731b3b0b299e4167220 + 2e32f3b92f3a17b5821673babaa6883deb5ab209 - + https://github.com/dotnet/coreclr - 08136a667d1a30c242f40731b3b0b299e4167220 + 2e32f3b92f3a17b5821673babaa6883deb5ab209 - + https://github.com/dotnet/coreclr - 08136a667d1a30c242f40731b3b0b299e4167220 + 2e32f3b92f3a17b5821673babaa6883deb5ab209 @@ -62,9 +62,9 @@ https://github.com/dotnet/arcade 1b8589bbf53b9a5e819460798eff59830f39a3be - + https://github.com/dotnet/arcade - 1b8589bbf53b9a5e819460798eff59830f39a3be + bda52d7619f9420de46f2c39ffc972864bbcab63 https://github.com/dotnet/arcade diff --git a/eng/Versions.props b/eng/Versions.props index acf0768000c9..ce90c2579385 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -28,7 +28,7 @@ 1.0.0-beta.19254.1 1.0.0-beta.19254.1 2.4.0-beta.19254.1 - 2.5.1-beta.19254.1 + 2.5.1-beta.19257.7 1.0.0-beta.19254.1 1.0.0-beta.19254.1 1.0.0-beta.19254.1 @@ -40,8 +40,8 @@ 3.0.0-preview6-27707-10 3.0.0-preview6-27707-10 - 3.0.0-preview6-27705-72 - 3.0.0-preview6-27705-72 + 3.0.0-preview6-27707-72 + 3.0.0-preview6-27707-72 3.0.0-preview6.19257.8 4.6.0-preview6.19257.8 diff --git a/global.json b/global.json index bb9bf9f29cdf..ed09dd285716 100644 --- a/global.json +++ b/global.json @@ -5,6 +5,6 @@ "msbuild-sdks": { "Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19229.8", "Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19257.7", - "Microsoft.NET.Sdk.IL": "3.0.0-preview6-27705-72" + "Microsoft.NET.Sdk.IL": "3.0.0-preview6-27707-72" } } diff --git a/src/System.Diagnostics.Process/tests/ProcessStartInfoTests.cs b/src/System.Diagnostics.Process/tests/ProcessStartInfoTests.cs index 788c824f8e1e..13ff80ed680a 100644 --- a/src/System.Diagnostics.Process/tests/ProcessStartInfoTests.cs +++ b/src/System.Diagnostics.Process/tests/ProcessStartInfoTests.cs @@ -1106,7 +1106,10 @@ public void ShellExecute_Nano_Fails_Start() FileName = tempFile }; - Assert.Throws(() => Process.Start(info)); + // Nano does not support either the STA apartment or ShellExecute. + // Since we try to start an STA thread for ShellExecute, we hit a ThreadStartException + // before we get to the PlatformNotSupportedException. + Assert.Throws(() => Process.Start(info)); } public static TheoryData UseShellExecute diff --git a/src/System.Diagnostics.Tracing/src/MatchingRefApiCompatBaseline.txt b/src/System.Diagnostics.Tracing/src/MatchingRefApiCompatBaseline.txt index 89761b80f299..dc7d051bae0d 100644 --- a/src/System.Diagnostics.Tracing/src/MatchingRefApiCompatBaseline.txt +++ b/src/System.Diagnostics.Tracing/src/MatchingRefApiCompatBaseline.txt @@ -1,9 +1,6 @@ Compat issues with assembly System.Diagnostics.Tracing: -CannotSealType : Type 'System.Diagnostics.Tracing.DiagnosticCounter' is effectively (has a private constructor) sealed in the reference but not sealed in the implementation. -MembersMustExist : Member 'System.Diagnostics.Tracing.DiagnosticCounter..ctor(System.String, System.Diagnostics.Tracing.EventSource)' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'System.Diagnostics.Tracing.DiagnosticCounter.WritePayload(System.Single, System.Int32)' does not exist in the reference but it does exist in the implementation. MembersMustExist : Member 'System.Diagnostics.Tracing.EventCounter.Flush()' does not exist in the reference but it does exist in the implementation. CannotMakeTypeAbstract : Type 'System.Diagnostics.Tracing.EventListener' is abstract in the reference but is not abstract in the implementation. CannotMakeMoreVisible : Visibility of member 'System.Diagnostics.Tracing.EventListener..ctor()' is 'Family' in the reference but 'Public' in the implementation. CannotMakeMoreVisible : Visibility of member 'System.Diagnostics.Tracing.EventListener.EventSourceIndex(System.Diagnostics.Tracing.EventSource)' is 'Family' in the reference but 'Public' in the implementation. -Total Issues: 7 +Total Issues: 4 diff --git a/src/System.Threading.Thread/tests/ThreadTests.cs b/src/System.Threading.Thread/tests/ThreadTests.cs index 9e6f0563dff5..111afe89fb6e 100644 --- a/src/System.Threading.Thread/tests/ThreadTests.cs +++ b/src/System.Threading.Thread/tests/ThreadTests.cs @@ -272,7 +272,7 @@ public static void GetSetApartmentStateTest_ChangeAfterThreadStarted_Windows( }); } - [Theory] + [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindowsNanoServer))] [MemberData(nameof(ApartmentStateTest_MemberData))] [PlatformSpecific(TestPlatforms.Windows)] // Expected behavior differs on Unix and Windows [ActiveIssue(20766,TargetFrameworkMonikers.UapAot)] @@ -292,18 +292,31 @@ public static void ApartmentStateTest_ChangeBeforeThreadStarted_Windows( t.Start(); Assert.True(t.Join(UnexpectedTimeoutMilliseconds)); - if (PlatformDetection.IsWindowsNanoServer) - { - // Nano server threads are always MTA. If you set the thread to STA - // it will read back as STA but when the thread starts it will read back as MTA. - Assert.Equal(ApartmentState.MTA, apartmentStateInThread); - } - else - { - Assert.Equal(ApartmentState.STA, apartmentStateInThread); - } + Assert.Equal(ApartmentState.STA, apartmentStateInThread); + } + + + [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsWindowsNanoServer))] + [MemberData(nameof(ApartmentStateTest_MemberData))] + public static void ApartmentStateTest_ChangeBeforeThreadStarted_Windows_Nano_Server( + Func getApartmentState, + Func setApartmentState, + int setType /* 0 = ApartmentState setter, 1 = SetApartmentState, 2 = TrySetApartmentState */) + { + ApartmentState apartmentStateInThread = ApartmentState.Unknown; + Thread t = null; + t = new Thread(() => apartmentStateInThread = getApartmentState(t)); + t.IsBackground = true; + Assert.Equal(0, setApartmentState(t, ApartmentState.STA)); + Assert.Equal(ApartmentState.STA, getApartmentState(t)); + Assert.Equal(setType == 0 ? 0 : 2, setApartmentState(t, ApartmentState.MTA)); // cannot be changed more than once + Assert.Equal(ApartmentState.STA, getApartmentState(t)); + + Assert.Throws(() => t.Start()); // Windows Nano Server does not support starting threads in the STA. } + + [Theory] [MemberData(nameof(ApartmentStateTest_MemberData))] [PlatformSpecific(TestPlatforms.AnyUnix)] // Expected behavior differs on Unix and Windows From 3070e0484558aaaaf3547ede2f285544d0a3ed00 Mon Sep 17 00:00:00 2001 From: Maryam Ariyan Date: Thu, 9 May 2019 04:04:55 -0700 Subject: [PATCH 289/607] Adds more OleDb tests (#37509) --- .../src/System/Data/Common/FieldNameLookup.cs | 24 --- src/System.Data.OleDb/tests/Helpers.cs | 5 +- .../tests/OleDbCommandBuilderTests.cs | 77 ++++++-- .../tests/OleDbCommandTests.cs | 173 +++++++++++++++++- .../tests/OleDbConnectionTests.cs | 147 ++++++++++++++- .../tests/OleDbDataAdapterTests.cs | 8 +- .../tests/OleDbDataReaderTests.cs | 66 +++++-- .../tests/OleDbParameterTests.cs | 7 +- src/System.Data.OleDb/tests/OleDbTestBase.cs | 3 +- 9 files changed, 430 insertions(+), 80 deletions(-) diff --git a/src/System.Data.OleDb/src/System/Data/Common/FieldNameLookup.cs b/src/System.Data.OleDb/src/System/Data/Common/FieldNameLookup.cs index 9a59e8cbc5f8..f80e25f45705 100644 --- a/src/System.Data.OleDb/src/System/Data/Common/FieldNameLookup.cs +++ b/src/System.Data.OleDb/src/System/Data/Common/FieldNameLookup.cs @@ -23,30 +23,6 @@ internal sealed class FieldNameLookup private CompareInfo _compareInfo; private int _defaultLocaleID; - public FieldNameLookup(string[] fieldNames, int defaultLocaleID) - { // V1.2.3300 - if (null == fieldNames) - { - throw ADP.ArgumentNull("fieldNames"); - } - _fieldNames = fieldNames; - _defaultLocaleID = defaultLocaleID; - } - - public FieldNameLookup(System.Collections.ObjectModel.ReadOnlyCollection columnNames, int defaultLocaleID) - { - int length = columnNames.Count; - string[] fieldNames = new string[length]; - for (int i = 0; i < length; ++i) - { - fieldNames[i] = columnNames[i]; - Debug.Assert(null != fieldNames[i]); - } - _fieldNames = fieldNames; - _defaultLocaleID = defaultLocaleID; - GenerateLookup(); - } - public FieldNameLookup(IDataRecord reader, int defaultLocaleID) { // V1.2.3300 diff --git a/src/System.Data.OleDb/tests/Helpers.cs b/src/System.Data.OleDb/tests/Helpers.cs index fd2eaa351a36..19ffdc399e67 100644 --- a/src/System.Data.OleDb/tests/Helpers.cs +++ b/src/System.Data.OleDb/tests/Helpers.cs @@ -1,18 +1,17 @@ // Licensed to the .NET Foundation under one or more agreements. // See the LICENSE file in the project root for more information. -using System; using System.Collections.Generic; -using System.Runtime.InteropServices; -using Xunit; namespace System.Data.OleDb.Tests { public static class Helpers { public const string IsDriverAvailable = nameof(Helpers) + "." + nameof(GetIsDriverAvailable); + public const string IsAceDriverAvailable = nameof(Helpers) + "." + nameof(GetIsAceDriverAvailable); private static readonly bool s_skipAllTemporarily = true; // [ActiveIssue(37538)] public static bool GetIsDriverAvailable() => !s_skipAllTemporarily && Nested.IsAvailable; + public static bool GetIsAceDriverAvailable() => GetIsDriverAvailable() && !PlatformDetection.Is32BitProcess; public static string ProviderName => Nested.ProviderName; public static string GetTableName(string memberName) => memberName + ".csv"; diff --git a/src/System.Data.OleDb/tests/OleDbCommandBuilderTests.cs b/src/System.Data.OleDb/tests/OleDbCommandBuilderTests.cs index 680c95317b14..2c3ad23bf26c 100644 --- a/src/System.Data.OleDb/tests/OleDbCommandBuilderTests.cs +++ b/src/System.Data.OleDb/tests/OleDbCommandBuilderTests.cs @@ -2,13 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using Xunit; -using System.Collections.Generic; -using System.Data.OleDb; using System.IO; using System.Runtime.CompilerServices; -using System.Text.RegularExpressions; -using System.Transactions; +using Xunit; namespace System.Data.OleDb.Tests { @@ -86,6 +82,27 @@ public void DeriveParameters_ClosedConnection_Throws() }); } + [OuterLoop] + [ConditionalFact(Helpers.IsDriverAvailable)] + public void QuoteIdentifier_Null_Throws() + { + RunTest((command, tableName) => { + using (var cmd = (OleDbCommand)OleDbFactory.Instance.CreateCommand()) + { + cmd.CommandType = CommandType.StoredProcedure; + cmd.CommandText = @"SELECT * FROM " + tableName; + cmd.Connection = (OleDbConnection)OleDbFactory.Instance.CreateConnection(); + cmd.Transaction = transaction; + using (var builder = (OleDbCommandBuilder)OleDbFactory.Instance.CreateCommandBuilder()) + { + AssertExtensions.Throws( + () => builder.QuoteIdentifier(null, cmd.Connection), + $"Value cannot be null.\r\nParameter name: unquotedIdentifier"); + } + } + }); + } + [OuterLoop] [ConditionalFact(Helpers.IsDriverAvailable)] public void UnquoteIdentifier_Null_Throws() @@ -97,29 +114,61 @@ public void UnquoteIdentifier_Null_Throws() cmd.CommandText = @"SELECT * FROM " + tableName; cmd.Connection = (OleDbConnection)OleDbFactory.Instance.CreateConnection(); cmd.Transaction = transaction; - var builder = (OleDbCommandBuilder)OleDbFactory.Instance.CreateCommandBuilder(); - Assert.Throws(() => builder.UnquoteIdentifier(null, cmd.Connection)); + using (var builder = (OleDbCommandBuilder)OleDbFactory.Instance.CreateCommandBuilder()) + { + AssertExtensions.Throws( + () => builder.UnquoteIdentifier(null, cmd.Connection), + $"Value cannot be null.\r\nParameter name: quotedIdentifier"); + } } }); } [OuterLoop] [ConditionalFact(Helpers.IsDriverAvailable)] - public void Ctor_Defaults() + public void QuoteUnquote_CustomPrefixSuffix_Success() { RunTest((command, tableName) => { using (var cmd = (OleDbCommand)OleDbFactory.Instance.CreateCommand()) { + cmd.Transaction = transaction; cmd.CommandType = CommandType.StoredProcedure; cmd.CommandText = @"SELECT * FROM " + tableName; cmd.Connection = (OleDbConnection)OleDbFactory.Instance.CreateConnection(); cmd.Connection.ConnectionString = connection.ConnectionString; - cmd.Transaction = transaction; - DataSet ds = new DataSet(); - OleDbDataAdapter adapter = new OleDbDataAdapter(cmd); - OleDbCommandBuilder commandBuilder = new OleDbCommandBuilder(adapter); - Assert.Equal(adapter, commandBuilder.DataAdapter); + using (var adapter = new OleDbDataAdapter(cmd.CommandText, connection)) + using (var builder = new OleDbCommandBuilder(adapter)) + { + // Custom prefix & suffix + builder.QuotePrefix = "'"; + builder.QuoteSuffix = "'"; + + Assert.Equal(adapter, builder.DataAdapter); + Assert.Equal("'Test'", builder.QuoteIdentifier("Test", connection)); + Assert.Equal("'Te''st'", builder.QuoteIdentifier("Te'st", connection)); + Assert.Equal("Test", builder.UnquoteIdentifier("'Test'", connection)); + Assert.Equal("Te'st", builder.UnquoteIdentifier("'Te''st'", connection)); + + // Ensure we don't need active connection: + Assert.Equal("'Test'", builder.QuoteIdentifier("Test", null)); + Assert.Equal("Test", builder.UnquoteIdentifier("'Test'", null)); + + builder.QuotePrefix = string.Empty; + string quoteErrMsg = $"{nameof(builder.QuoteIdentifier)} requires open connection when the quote prefix has not been set."; + string unquoteErrMsg = $"{nameof(builder.UnquoteIdentifier)} requires open connection when the quote prefix has not been set."; + + Assert.Equal("`Test`", builder.QuoteIdentifier("Test", connection)); + Assert.Equal("Test", builder.UnquoteIdentifier("`Test`", connection)); + + Assert.NotNull(adapter.SelectCommand.Connection); + Assert.Equal("`Test`", builder.QuoteIdentifier("Test")); + Assert.Equal("Test", builder.UnquoteIdentifier("`Test`")); + + adapter.SelectCommand.Connection = null; + AssertExtensions.Throws(() => builder.QuoteIdentifier("Test"), quoteErrMsg); + AssertExtensions.Throws(() => builder.UnquoteIdentifier("'Test'"), unquoteErrMsg); + } } }); } @@ -150,4 +199,4 @@ Lastname NVARCHAR(40), command.ExecuteNonQuery(); } } -} \ No newline at end of file +} diff --git a/src/System.Data.OleDb/tests/OleDbCommandTests.cs b/src/System.Data.OleDb/tests/OleDbCommandTests.cs index d20f3396416d..26ef0e11ce99 100644 --- a/src/System.Data.OleDb/tests/OleDbCommandTests.cs +++ b/src/System.Data.OleDb/tests/OleDbCommandTests.cs @@ -2,29 +2,188 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using Xunit; -using System.Collections.Generic; -using System.Data.OleDb; +using System.Data; using System.IO; using System.Runtime.CompilerServices; -using System.Text.RegularExpressions; +using Xunit; namespace System.Data.OleDb.Tests { public class OleDbCommandTests : OleDbTestBase { + [ConditionalFact(Helpers.IsDriverAvailable)] + public void UpdatedRowSource_SetInvalidValue_Throws() + { + const int InvalidValue = 50; + using (var cmd = (OleDbCommand)OleDbFactory.Instance.CreateCommand()) + { + Assert.Equal(UpdateRowSource.Both, cmd.UpdatedRowSource); + cmd.UpdatedRowSource = UpdateRowSource.FirstReturnedRecord; + Assert.Equal(UpdateRowSource.FirstReturnedRecord, cmd.UpdatedRowSource); + AssertExtensions.Throws( + () => cmd.UpdatedRowSource = (UpdateRowSource)InvalidValue, + $"The {nameof(UpdateRowSource)} enumeration value, {InvalidValue}, is invalid.\r\nParameter name: {nameof(UpdateRowSource)}" + ); + } + } + + [ConditionalFact(Helpers.IsDriverAvailable)] + public void CommandTimeout_SetInvalidValue_Throws() + { + const int InvalidValue = -1; + using (var cmd = new OleDbCommand(default, connection, transaction)) + { + AssertExtensions.Throws( + () => cmd.CommandTimeout = InvalidValue, + $"Invalid CommandTimeout value {InvalidValue}; the value must be >= 0.\r\nParameter name: {nameof(cmd.CommandTimeout)}" + ); + } + } + + [ConditionalFact(Helpers.IsDriverAvailable)] + public void ResetCommandTimeout_ResetsToDefault() + { + using (var cmd = new OleDbCommand(default, connection, transaction)) + { + const int DefaultValue = 30; + Assert.Equal(DefaultValue, cmd.CommandTimeout); + cmd.CommandTimeout = DefaultValue + 50; + Assert.Equal(DefaultValue + 50, cmd.CommandTimeout); + cmd.ResetCommandTimeout(); + Assert.Equal(DefaultValue, cmd.CommandTimeout); + } + } + [ConditionalFact(Helpers.IsDriverAvailable)] public void CommandType_SetInvalidValue_Throws() { + const int InvalidValue = 0; using (var cmd = (OleDbCommand)OleDbFactory.Instance.CreateCommand()) { AssertExtensions.Throws( - () => cmd.CommandType = (CommandType)0, - $"The CommandType enumeration value, 0, is invalid.\r\nParameter name: {nameof(cmd.CommandType)}" + () => cmd.CommandType = (CommandType)InvalidValue, + $"The CommandType enumeration value, {InvalidValue}, is invalid.\r\nParameter name: {nameof(cmd.CommandType)}" ); } } + [OuterLoop] + [ConditionalFact(Helpers.IsDriverAvailable)] + public void Prepare_ClosedConnection_Throws() + { + RunTest((command, tableName) => { + command.CommandText = @"SELECT * FROM " + tableName; + var currentConnection = command.Connection; + var oleDbConnection = new OleDbConnection(ConnectionString); + oleDbConnection.Open(); + command.Connection = oleDbConnection; + oleDbConnection.Close(); + AssertExtensions.Throws( + () => command.Prepare(), + $"{nameof(command.Prepare)} requires an open and available Connection. The connection's current state is closed." + ); + command.Connection = currentConnection; + }); + } + + [OuterLoop] + [ConditionalFact(Helpers.IsDriverAvailable)] + public void Prepare_MultipleCases_ThrowsForInvalidQuery() + { + RunTest((command, tableName) => { + Assert.Equal(ConnectionState.Open, connection.State); + command.CommandText = "INVALID_STATEMENT"; + AssertExtensions.Throws( + () => command.Prepare(), + "Invalid SQL statement; expected 'DELETE', 'INSERT', 'PROCEDURE', 'SELECT', or 'UPDATE'." + ); + command.CommandText = @"UPDATE " + tableName + " SET NumPlants ? WHERE Firstname = ?"; + AssertExtensions.Throws( + () => command.Prepare(), + $"Syntax error in UPDATE statement." + ); + }); + } + + [OuterLoop] + [ConditionalFact(Helpers.IsDriverAvailable)] + public void Prepare_InsertMultipleItems_UseTableDirectToVerify() + { + RunTest((command, tableName) => { + command.CommandText = @"INSERT INTO " + tableName + " (Firstname, NumPlants) VALUES (?, ?)"; + command.Prepare(); // Good to use when command used multiple times + + command.Parameters.Add(command.CreateParameter()); + command.Parameters.Add(command.CreateParameter()); + + object[] newItems = new object[] { + new { Firstname = "John", NumPlants = 7 }, + new { Firstname = "Mark", NumPlants = 12 }, + new { Firstname = "Nick", NumPlants = 6 } + }; + foreach (dynamic item in newItems) + { + command.Parameters[0].Value = item.Firstname; + command.Parameters[1].Value = item.NumPlants; + command.ExecuteNonQuery(); + } + var currentCommandType = command.CommandType; + command.CommandType = CommandType.TableDirect; + command.CommandText = tableName; + using (OleDbDataReader reader = command.ExecuteReader()) + { + Assert.True(reader.Read(), "skip existing row"); + Assert.True(reader.Read(), "skip existing row"); + foreach (dynamic item in newItems) + { + Assert.True(reader.Read(), "validate new row"); + Assert.Equal(item.Firstname, reader["Firstname"]); + Assert.Equal(item.NumPlants, reader["NumPlants"]); + } + object x; + AssertExtensions.Throws(() => x = reader["MissingColumn"], "MissingColumn"); + } + command.CommandType = currentCommandType; + }); + } + + [OuterLoop] + [ConditionalFact(Helpers.IsDriverAvailable)] + public void Parameters_AddNullParameter_Throws() + { + RunTest((command, tableName) => { + AssertExtensions.Throws( + () => command.Parameters.Add(null), + $"The {nameof(OleDbParameterCollection)} only accepts non-null {nameof(OleDbParameter)} type objects.\r\nParameter name: value" + ); + command.CommandText = "SELECT * FROM " + tableName + " WHERE NumPlants = ?"; + command.Parameters.Add(new OleDbParameter("@p1", 7)); + using (OleDbDataReader reader = command.ExecuteReader()) + { + Assert.True(reader.Read()); + Assert.Equal("John", reader["Firstname"]); + Assert.Equal(7, reader["NumPlants"]); + Assert.False(reader.Read(), "Expected to find only one item"); + } + }); + } + + [OuterLoop] + [ConditionalFact(Helpers.IsDriverAvailable)] + public void ExecuteNonQuery_NullConnection_Throws() + { + RunTest((command, tableName) => { + command.CommandText = @"SELECT * FROM " + tableName; + var currentConnection = command.Connection; + command.Connection = null; + AssertExtensions.Throws( + () => command.ExecuteNonQuery(), + $"{nameof(command.ExecuteNonQuery)}: {nameof(command.Connection)} property has not been initialized." + ); + command.Connection = currentConnection; + }); + } + [OuterLoop] [ConditionalFact(Helpers.IsDriverAvailable)] public void CommandType_InvalidType_Throws() @@ -81,4 +240,4 @@ Firstname NVARCHAR(5), command.ExecuteNonQuery(); } } -} \ No newline at end of file +} diff --git a/src/System.Data.OleDb/tests/OleDbConnectionTests.cs b/src/System.Data.OleDb/tests/OleDbConnectionTests.cs index 259bdd2eb214..bcdb94e21cc6 100644 --- a/src/System.Data.OleDb/tests/OleDbConnectionTests.cs +++ b/src/System.Data.OleDb/tests/OleDbConnectionTests.cs @@ -2,13 +2,10 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using Xunit; using System.Collections.Generic; using System.Data.Common; -using System.Data.OleDb; using System.IO; -using System.Text; -using System.Text.RegularExpressions; +using Xunit; namespace System.Data.OleDb.Tests { @@ -93,6 +90,22 @@ public void BeginTransaction_SpecificIsolationLevel_Success(IsolationLevel isola } } + [ConditionalFact(Helpers.IsDriverAvailable)] + public void StateChange_ChangeState_TriggersEvent() + { + int timesCalled = 0; + Action OnStateChange = (sender, args) => { + timesCalled++; + }; + using (var oleDbConnection = new OleDbConnection(ConnectionString)) + { + oleDbConnection.StateChange += new StateChangeEventHandler(OnStateChange); + oleDbConnection.Open(); + oleDbConnection.Close(); + Assert.Equal(2, timesCalled); + } + } + [ConditionalFact(Helpers.IsDriverAvailable)] public void BeginTransaction_InvalidIsolationLevel_Throws() { @@ -103,6 +116,77 @@ public void BeginTransaction_InvalidIsolationLevel_Throws() } } + [ConditionalFact(Helpers.IsAceDriverAvailable)] + public void BeginTransaction_CallTwice_Throws() + { + using (var conn = new OleDbConnection(ConnectionString)) + { + conn.Open(); + using (var tx = conn.BeginTransaction()) + { + var cmd = conn.CreateCommand(); + cmd.CommandText = "CREATE TABLE table_x.csv (column_y NVARCHAR(40));"; + cmd.Transaction = tx; + cmd.ExecuteNonQuery(); + AssertExtensions.Throws( + () => conn.BeginTransaction(), + $"{nameof(OleDbConnection)} does not support parallel transactions." + ); + } + conn.Close(); + } + } + + [ConditionalFact(Helpers.IsAceDriverAvailable)] + public void CommitTransaction_AfterConnectionClosed_Throws() + { + using (var conn = new OleDbConnection(ConnectionString)) + { + conn.Open(); + using (var tx = conn.BeginTransaction()) + { + var cmd = conn.CreateCommand(); + cmd.CommandText = "CREATE TABLE table_x.csv (column_y NVARCHAR(40));"; + cmd.Transaction = tx; + cmd.ExecuteNonQuery(); + conn.Close(); + AssertExtensions.Throws( + () => tx.Commit(), + $"This {nameof(OleDbTransaction)} has completed; it is no longer usable." + ); + } + } + } + + [ConditionalFact(Helpers.IsDriverAvailable)] + public void GetDefaults_AnyGivenState_DoesNotThrow() + { + const int DefaultTimeout = 15; + Action VerifyDefaults = (conn) => { + Assert.Equal(DefaultTimeout, conn.ConnectionTimeout); + Assert.Contains(conn.DataSource, TestDirectory); + Assert.Empty(conn.Database); + }; + using (var oleDbConnection = new OleDbConnection()) + { + VerifyDefaults(oleDbConnection); + oleDbConnection.ConnectionString = ConnectionString; + oleDbConnection.Open(); + VerifyDefaults(oleDbConnection); + oleDbConnection.Close(); + VerifyDefaults(oleDbConnection); + } + } + + [ConditionalFact(Helpers.IsDriverAvailable)] + public void CreateCommand_AsDbConnection_IsOleDb() + { + DbConnection dbConnection = connection as DbConnection; + DbCommand dbCommand = dbConnection.CreateCommand(); + Assert.NotNull(dbCommand); + Assert.IsType(dbCommand); + } + [ConditionalFact(Helpers.IsDriverAvailable)] public void Provider_SetProperlyFromCtor() { @@ -113,6 +197,27 @@ public void Provider_SetProperlyFromCtor() } } + [ConditionalFact(Helpers.IsDriverAvailable)] + public void GetSchema_NoArgs_ReturnsMetaDataCollections() + { + if (PlatformDetection.IsWindows7) + { + return; // [ActiveIssue(37438)] + } + + DataTable t1 = connection.GetSchema(); + DataTable t2 = connection.GetSchema(DbMetaDataCollectionNames.MetaDataCollections); + Assert.Equal(t1.Rows.Count, t2.Rows.Count); + + foreach (DataColumn dc in t1.Columns) + { + for (int i = 0; i < t1.Rows.Count; i++) + { + Assert.Equal(t1.Rows[i][dc.ColumnName], t2.Rows[i][dc.ColumnName]); + } + } + } + [ConditionalTheory(Helpers.IsDriverAvailable)] [InlineData(nameof(DbMetaDataCollectionNames.MetaDataCollections), "CollectionName")] [InlineData(nameof(DbMetaDataCollectionNames.DataSourceInformation), "CompositeIdentifierSeparatorPattern")] @@ -139,13 +244,45 @@ public void GetSchema(string tableName, string columnName) $"Column '{MissingColumn}' does not belong to table {tableName}."); } + [OuterLoop] [ConditionalFact(Helpers.IsDriverAvailable)] + public void GetOleDbSchemaTable_ReturnsTableInfo() + { + string tableName = Helpers.GetTableName(nameof(GetOleDbSchemaTable_ReturnsTableInfo)); + command.CommandText = @"CREATE TABLE t1.csv (CustomerName NVARCHAR(40));"; + command.ExecuteNonQuery(); + command.CommandText = @"CREATE TABLE t2.csv (CustomerName NVARCHAR(40));"; + command.ExecuteNonQuery(); + DataTable listedTables = connection.GetOleDbSchemaTable( + OleDbSchemaGuid.Tables, new object[] {null, null, null, "Table"}); + + Assert.NotNull(listedTables); + Assert.Equal(2, listedTables.Rows.Count); + Assert.Equal("t1#csv", listedTables.Rows[0][2].ToString()); + Assert.Equal("t2#csv", listedTables.Rows[1][2].ToString()); + + command.CommandText = @"DROP TABLE t1.csv"; + command.ExecuteNonQuery(); + command.CommandText = @"DROP TABLE t2.csv"; + command.ExecuteNonQuery(); + } + + [ConditionalFact(Helpers.IsAceDriverAvailable)] public void ChangeDatabase_EmptyDatabase_Throws() { using (var oleDbConnection = new OleDbConnection(ConnectionString)) { oleDbConnection.Open(); + Assert.Throws(() => oleDbConnection.ChangeDatabase(null)); + Assert.Throws(() => oleDbConnection.ChangeDatabase(" ")); Assert.Throws(() => oleDbConnection.ChangeDatabase(string.Empty)); + AssertExtensions.Throws( + () => oleDbConnection.ChangeDatabase("ReadOnlyShouldThrow"), + "The 'current catalog' property was read-only, or the consumer attempted to set values of properties " + + "in the Initialization property group after the data source object was initialized. " + + "Consumers can set the value of a read-only property to its current value. " + + "This status is also returned if a settable column property could not be set for the particular column." + ); } } @@ -301,4 +438,4 @@ public void OleDbConnectionStringBuilder_Success() Assert.Empty(connectionStringBuilder.Provider); } } -} \ No newline at end of file +} diff --git a/src/System.Data.OleDb/tests/OleDbDataAdapterTests.cs b/src/System.Data.OleDb/tests/OleDbDataAdapterTests.cs index d564a81451c0..37195431e227 100644 --- a/src/System.Data.OleDb/tests/OleDbDataAdapterTests.cs +++ b/src/System.Data.OleDb/tests/OleDbDataAdapterTests.cs @@ -2,13 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using Xunit; -using System.Collections.Generic; -using System.Data.OleDb; using System.IO; using System.Runtime.CompilerServices; -using System.Text.RegularExpressions; -using System.Transactions; +using Xunit; namespace System.Data.OleDb.Tests { @@ -178,4 +174,4 @@ Lastname NVARCHAR(40), command.ExecuteNonQuery(); } } -} \ No newline at end of file +} diff --git a/src/System.Data.OleDb/tests/OleDbDataReaderTests.cs b/src/System.Data.OleDb/tests/OleDbDataReaderTests.cs index ca8ef4494fdb..426ed09100fb 100644 --- a/src/System.Data.OleDb/tests/OleDbDataReaderTests.cs +++ b/src/System.Data.OleDb/tests/OleDbDataReaderTests.cs @@ -2,17 +2,26 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using Xunit; -using System.Collections.Generic; -using System.Data.OleDb; using System.IO; using System.Runtime.CompilerServices; -using System.Text.RegularExpressions; +using Xunit; namespace System.Data.OleDb.Tests { public class OleDbDataReaderTests : OleDbTestBase { + [OuterLoop] + [ConditionalFact(Helpers.IsDriverAvailable)] + public void FieldCount_NoMetadata_ReturnsZero() + { + command.CommandText = @"CREATE TABLE sample.csv;"; + using (OleDbDataReader reader = command.ExecuteReader()) + { + Assert.Equal(0, reader.FieldCount); + Assert.Equal(0, reader.VisibleFieldCount); + } + } + [ConditionalFact(Helpers.IsDriverAvailable)] public void ExecuteNonQuery_TableNameWithoutCsvExtension_Throws() { @@ -31,9 +40,9 @@ public void InvalidRowIndex() reader.Read(); Assert.True(reader.HasRows); DataTable schema = reader.GetSchemaTable(); - Assert.Equal(4, schema.Rows.Count); + Assert.Equal(5, schema.Rows.Count); AssertExtensions.Throws( - () => reader.GetString(5), + () => reader.GetString(6), "Index was outside the bounds of the array."); }); } @@ -63,6 +72,7 @@ public void GetValues() Assert.Equal("XYZ", values[1]); Assert.Equal(42.2, values[2]); Assert.Equal(48.3f, values[3]); + Assert.Equal(new DateTime(2015, 1, 11, 12, 54, 1), values[4]); }); } @@ -86,7 +96,7 @@ public void GetSchemaTable_SchemaOnly_GetsColumnInfo() { RunTest((reader) => { DataTable schema = reader.GetSchemaTable(); - Assert.Equal(4, schema.Rows.Count); + Assert.Equal(5, schema.Rows.Count); Assert.Equal("CustomerName", schema.Rows[1].Field("ColumnName")); Assert.Equal(typeof(string), schema.Rows[1].Field("DataType")); Assert.Equal(40, schema.Rows[1].Field("ColumnSize")); @@ -99,11 +109,12 @@ public void GetSchemaTable_ColumnName_Success() { RunTest((reader) => { DataTable schema = reader.GetSchemaTable(); - Assert.Equal(4, schema.Rows.Count); + Assert.Equal(5, schema.Rows.Count); Assert.Equal("CustomerID", schema.Rows[0].Field("ColumnName")); Assert.Equal("CustomerName", schema.Rows[1].Field("ColumnName")); Assert.Equal("SingleAmount", schema.Rows[2].Field("ColumnName")); Assert.Equal("RealAmount", schema.Rows[3].Field("ColumnName")); + Assert.Equal("DateChecked", schema.Rows[4].Field("ColumnName")); }); } @@ -113,11 +124,12 @@ public void GetSchemaTable_DataType_Success() { RunTest((reader) => { DataTable schema = reader.GetSchemaTable(); - Assert.Equal(4, schema.Rows.Count); + Assert.Equal(5, schema.Rows.Count); Assert.Equal(typeof(int), schema.Rows[0].Field("DataType")); Assert.Equal(typeof(string), schema.Rows[1].Field("DataType")); Assert.Equal(typeof(double), schema.Rows[2].Field("DataType")); Assert.Equal(typeof(float), schema.Rows[3].Field("DataType")); + Assert.Equal(typeof(DateTime), schema.Rows[4].Field("DataType")); }); } @@ -169,6 +181,18 @@ public void Read_GetFloat_Success() }); } + [OuterLoop] + [ConditionalFact(Helpers.IsDriverAvailable)] + public void Read_GetDateTime_Success() + { + RunTest((reader) => { + Assert.True(reader.HasRows); + reader.Read(); + Assert.Throws(() => reader.GetFloat(2)); + Assert.Equal(new DateTime(2015, 1, 11, 12, 54, 1), reader.GetDateTime(4)); + }); + } + [OuterLoop] [ConditionalTheory(Helpers.IsDriverAvailable)] [InlineData(0)] @@ -204,6 +228,18 @@ public void IsClosed_CallReaderApis_Throws() }); } + [OuterLoop] + [ConditionalFact(Helpers.IsDriverAvailable)] + public void InnerReader_OpenReaderExists_Throws() + { + RunTest((reader) => { + AssertExtensions.Throws( + () => command.ExecuteReader(), + "There is already an open DataReader associated with this Command which must be closed first." + ); + }); + } + [ConditionalFact(Helpers.IsDriverAvailable)] public void GetEnumerator_BadType_Throws() { @@ -219,7 +255,8 @@ private void RunTest(Action testAction, bool schemaOnly = false CustomerID INT, CustomerName NVARCHAR(40), SingleAmount FLOAT, - RealAmount REAL);"; + RealAmount REAL, + DateChecked DATETIME);"; command.ExecuteNonQuery(); Assert.True(File.Exists(Path.Combine(TestDirectory, tableName))); @@ -230,8 +267,9 @@ CustomerName NVARCHAR(40), CustomerID, CustomerName, SingleAmount, - RealAmount) - VALUES ( 123, 'XYZ', @value, @realValue );"; + RealAmount, + DateChecked) + VALUES ( 123, 'XYZ', @value, @realValue, '01/11/2015 12:54:01' );"; #pragma warning disable 612,618 command.Parameters.Add("@value", 42.2); command.Parameters.Add("@realValue", 48.3); @@ -239,7 +277,7 @@ CustomerName NVARCHAR(40), command.ExecuteNonQuery(); } - command.CommandText = "SELECT CustomerID, CustomerName, SingleAmount, RealAmount FROM " + tableName; + command.CommandText = "SELECT CustomerID, CustomerName, SingleAmount, RealAmount, DateChecked FROM " + tableName; using (OleDbDataReader reader = schemaOnly ? command.ExecuteReader(CommandBehavior.SchemaOnly) : command.ExecuteReader()) { testAction(reader); @@ -248,4 +286,4 @@ CustomerName NVARCHAR(40), command.ExecuteNonQuery(); } } -} \ No newline at end of file +} diff --git a/src/System.Data.OleDb/tests/OleDbParameterTests.cs b/src/System.Data.OleDb/tests/OleDbParameterTests.cs index 76ef529e8602..32009698778b 100644 --- a/src/System.Data.OleDb/tests/OleDbParameterTests.cs +++ b/src/System.Data.OleDb/tests/OleDbParameterTests.cs @@ -2,12 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using Xunit; using System.Collections.Generic; -using System.Data.OleDb; -using System.IO; using System.Linq; -using System.Text.RegularExpressions; +using Xunit; namespace System.Data.OleDb.Tests { @@ -284,4 +281,4 @@ public static IEnumerable OleDbTypes } } } -} \ No newline at end of file +} diff --git a/src/System.Data.OleDb/tests/OleDbTestBase.cs b/src/System.Data.OleDb/tests/OleDbTestBase.cs index ef0353c2e381..4dee954003c3 100644 --- a/src/System.Data.OleDb/tests/OleDbTestBase.cs +++ b/src/System.Data.OleDb/tests/OleDbTestBase.cs @@ -2,9 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using Xunit; -using System.Data.OleDb; using System.IO; +using Xunit; namespace System.Data.OleDb.Tests { From e72c6c53baddb02a630e8e6592a59d89e30b856b Mon Sep 17 00:00:00 2001 From: Stephen Toub Date: Thu, 9 May 2019 12:43:45 -0400 Subject: [PATCH 290/607] Use better Array.Copy overload (#37548) Just a little cleanup. When we're working with T[]s, use Array.Copy that takes a lower bound, explicitly passing in 0, rather than forcing the implementation to query GetLowerBound() on each array. --- .../CSharp/RuntimeBinder/Semantics/Types/TypeManager.cs | 2 +- .../ComponentModel/Composition/Hosting/AtomicComposition.cs | 2 +- .../src/System/ComponentModel/CultureInfoConverter.cs | 2 +- .../src/System/ComponentModel/PropertyDescriptor.cs | 4 ++-- .../src/System/ComponentModel/TypeListConverter.cs | 2 +- .../src/System/Data/Common/DbConnectionStringBuilder.cs | 2 +- .../src/System/Diagnostics/EventLog.cs | 2 +- .../src/System/Diagnostics/PerformanceCounterLib.cs | 6 +++--- .../DirectoryServices/AccountManagement/AD/ADStoreKey.cs | 2 +- .../DirectoryServices/AccountManagement/SAM/SAMStoreKey.cs | 2 +- .../src/System/IO/Pipelines/PipeCompletion.cs | 2 +- .../src/System/Xml/XmlCanonicalWriter.cs | 6 +++--- src/System.Private.Xml/src/System/Xml/BitStack.cs | 2 +- .../src/System/Xml/Core/XmlEncodedRawTextWriter.cs | 2 +- src/System.Private.Xml/src/System/Xml/Core/XmlTextWriter.cs | 4 ++-- .../src/System/Xml/Core/XmlWellFormedWriter.cs | 6 +++--- .../src/System/Xml/Core/XmlWellFormedWriterAsync.cs | 2 +- .../src/System/Xml/Core/XmlWellFormedWriterHelpers.cs | 2 +- .../src/System/Xml/Resolvers/XmlPreloadedResolver.cs | 2 +- src/System.Private.Xml/src/System/Xml/Schema/BitSet.cs | 2 +- .../Xml/Serialization/XmlSerializationGeneratedCode.cs | 2 +- src/System.Private.Xml/src/System/Xml/Xsl/QIL/QilList.cs | 2 +- .../src/System/Xml/Xsl/Runtime/XmlAttributeCache.cs | 2 +- .../src/System/Xml/Xsl/Runtime/XmlNavigatorStack.cs | 2 +- src/System.Private.Xml/src/System/Xml/Xsl/Xslt/XsltInput.cs | 2 +- .../src/System/Xml/Xsl/XsltOld/BuilderInfo.cs | 2 +- .../Reflection/Context/Virtual/VirtualPropertyBase.cs | 2 +- .../src/System/Reflection/TypeLoading/General/Helpers.cs | 2 +- .../src/System/Runtime/Serialization/FormatterServices.cs | 2 +- .../src/System/Security/Cryptography/CryptoConfig.cs | 4 ++-- .../src/System/Transactions/Transaction.cs | 2 +- .../src/System/Transactions/TransactionInterop.cs | 2 +- .../src/System/Transactions/TransactionState.cs | 2 ++ .../src/System/Web/Util/HttpEncoder.cs | 2 +- .../src/System/Media/SoundPlayer.cs | 2 +- 35 files changed, 45 insertions(+), 43 deletions(-) diff --git a/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Types/TypeManager.cs b/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Types/TypeManager.cs index 6aa92d490652..1de413cbbaa0 100644 --- a/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Types/TypeManager.cs +++ b/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Types/TypeManager.cs @@ -212,7 +212,7 @@ public static TypeArray SubstTypeArray(TypeArray taSrc, SubstContext ctx) if (src != dst) { CType[] dsts = new CType[srcs.Length]; - Array.Copy(srcs, dsts, i); + Array.Copy(srcs, 0, dsts, 0, i); dsts[i] = dst; while (++i < srcs.Length) { diff --git a/src/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Hosting/AtomicComposition.cs b/src/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Hosting/AtomicComposition.cs index af55678cd90a..5f1b978b2896 100644 --- a/src/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Hosting/AtomicComposition.cs +++ b/src/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Hosting/AtomicComposition.cs @@ -319,7 +319,7 @@ private void SetValueInternal(object key, object value) var newQueries = new KeyValuePair[_valueCount == 0 ? 5 : _valueCount * 2]; if (_values != null) { - Array.Copy(_values, newQueries, _valueCount); + Array.Copy(_values, 0, newQueries, 0, _valueCount); } _values = newQueries; } diff --git a/src/System.ComponentModel.TypeConverter/src/System/ComponentModel/CultureInfoConverter.cs b/src/System.ComponentModel.TypeConverter/src/System/ComponentModel/CultureInfoConverter.cs index 2e1703f6fd98..7e4f5a7162a1 100644 --- a/src/System.ComponentModel.TypeConverter/src/System/ComponentModel/CultureInfoConverter.cs +++ b/src/System.ComponentModel.TypeConverter/src/System/ComponentModel/CultureInfoConverter.cs @@ -196,7 +196,7 @@ public override StandardValuesCollection GetStandardValues(ITypeDescriptorContex array = new CultureInfo[installedCultures.Length + 1]; } - Array.Copy(installedCultures, array, installedCultures.Length); + Array.Copy(installedCultures, 0, array, 0, installedCultures.Length); Array.Sort(array, new CultureComparer(this)); Debug.Assert(array[0] == null); if (array[0] == null) diff --git a/src/System.ComponentModel.TypeConverter/src/System/ComponentModel/PropertyDescriptor.cs b/src/System.ComponentModel.TypeConverter/src/System/ComponentModel/PropertyDescriptor.cs index 971ace5124d1..5de181238b17 100644 --- a/src/System.ComponentModel.TypeConverter/src/System/ComponentModel/PropertyDescriptor.cs +++ b/src/System.ComponentModel.TypeConverter/src/System/ComponentModel/PropertyDescriptor.cs @@ -299,8 +299,8 @@ public virtual object GetEditor(Type editorBaseType) { Type[] newTypes = new Type[_editorTypes.Length * 2]; object[] newEditors = new object[_editors.Length * 2]; - Array.Copy(_editorTypes, newTypes, _editorTypes.Length); - Array.Copy(_editors, newEditors, _editors.Length); + Array.Copy(_editorTypes, 0, newTypes, 0, _editorTypes.Length); + Array.Copy(_editors, 0, newEditors, 0, _editors.Length); _editorTypes = newTypes; _editors = newEditors; } diff --git a/src/System.ComponentModel.TypeConverter/src/System/ComponentModel/TypeListConverter.cs b/src/System.ComponentModel.TypeConverter/src/System/ComponentModel/TypeListConverter.cs index a63ec11f5027..f4b3640b0a9c 100644 --- a/src/System.ComponentModel.TypeConverter/src/System/ComponentModel/TypeListConverter.cs +++ b/src/System.ComponentModel.TypeConverter/src/System/ComponentModel/TypeListConverter.cs @@ -99,7 +99,7 @@ public override StandardValuesCollection GetStandardValues(ITypeDescriptorContex if (_types != null) { objTypes = new object[_types.Length]; - Array.Copy(_types, objTypes, _types.Length); + Array.Copy(_types, 0, objTypes, 0, _types.Length); } else { diff --git a/src/System.Data.Common/src/System/Data/Common/DbConnectionStringBuilder.cs b/src/System.Data.Common/src/System/Data/Common/DbConnectionStringBuilder.cs index a2ca62b1daf7..f67883a33f4e 100644 --- a/src/System.Data.Common/src/System/Data/Common/DbConnectionStringBuilder.cs +++ b/src/System.Data.Common/src/System/Data/Common/DbConnectionStringBuilder.cs @@ -548,7 +548,7 @@ private PropertyDescriptorCollection GetProperties(Attribute[] attributes) // Create a new array that only contains the filtered properties PropertyDescriptor[] filteredPropertiesArray = new PropertyDescriptor[index]; - Array.Copy(propertiesArray, filteredPropertiesArray, index); + Array.Copy(propertiesArray, 0, filteredPropertiesArray, 0, index); return new PropertyDescriptorCollection(filteredPropertiesArray); } diff --git a/src/System.Diagnostics.EventLog/src/System/Diagnostics/EventLog.cs b/src/System.Diagnostics.EventLog/src/System/Diagnostics/EventLog.cs index 9cb049e19454..730c11ccaa4e 100644 --- a/src/System.Diagnostics.EventLog/src/System/Diagnostics/EventLog.cs +++ b/src/System.Diagnostics.EventLog/src/System/Diagnostics/EventLog.cs @@ -832,7 +832,7 @@ internal static string TryFormatMessage(SafeLibraryHandle hModule, uint messageN if (largestNumber > insertionStrings.Length) { string[] newStrings = new string[largestNumber]; - Array.Copy(insertionStrings, newStrings, insertionStrings.Length); + Array.Copy(insertionStrings, 0, newStrings, 0, insertionStrings.Length); for (int i = insertionStrings.Length; i < newStrings.Length; i++) { newStrings[i] = "%" + (i + 1); diff --git a/src/System.Diagnostics.PerformanceCounter/src/System/Diagnostics/PerformanceCounterLib.cs b/src/System.Diagnostics.PerformanceCounter/src/System/Diagnostics/PerformanceCounterLib.cs index ed96bef2abdf..60a22d075942 100644 --- a/src/System.Diagnostics.PerformanceCounter/src/System/Diagnostics/PerformanceCounterLib.cs +++ b/src/System.Diagnostics.PerformanceCounter/src/System/Diagnostics/PerformanceCounterLib.cs @@ -167,8 +167,8 @@ private Hashtable CategoryTable { int[] adjustedCounterIndexes = new int[index3]; int[] adjustedHelpIndexes = new int[index3]; - Array.Copy(newCategoryEntry.CounterIndexes, adjustedCounterIndexes, index3); - Array.Copy(newCategoryEntry.HelpIndexes, adjustedHelpIndexes, index3); + Array.Copy(newCategoryEntry.CounterIndexes, 0, adjustedCounterIndexes, 0, index3); + Array.Copy(newCategoryEntry.HelpIndexes, 0, adjustedHelpIndexes, 0, index3); newCategoryEntry.CounterIndexes = adjustedCounterIndexes; newCategoryEntry.HelpIndexes = adjustedHelpIndexes; } @@ -896,7 +896,7 @@ private string[] GetCounters(string category, ref bool categoryExists) if (index2 < counters.Length) { string[] adjustedCounters = new string[index2]; - Array.Copy(counters, adjustedCounters, index2); + Array.Copy(counters, 0, adjustedCounters, 0, index2); counters = adjustedCounters; } diff --git a/src/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/AD/ADStoreKey.cs b/src/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/AD/ADStoreKey.cs index 93bd29b7b172..d8c520fdf0a4 100644 --- a/src/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/AD/ADStoreKey.cs +++ b/src/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/AD/ADStoreKey.cs @@ -39,7 +39,7 @@ public ADStoreKey(string domainName, byte[] sid) // Make a copy of the SID, since a byte[] is mutable _sid = new byte[sid.Length]; - Array.Copy(sid, _sid, sid.Length); + Array.Copy(sid, 0, _sid, 0, sid.Length); _domainName = domainName; _wellKnownSid = true; diff --git a/src/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/SAM/SAMStoreKey.cs b/src/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/SAM/SAMStoreKey.cs index 4ecaec913f83..024613263e6d 100644 --- a/src/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/SAM/SAMStoreKey.cs +++ b/src/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/SAM/SAMStoreKey.cs @@ -22,7 +22,7 @@ public SAMStoreKey(string machineName, byte[] sid) // Make a copy of the SID, since a byte[] is mutable _sid = new byte[sid.Length]; - Array.Copy(sid, _sid, sid.Length); + Array.Copy(sid, 0, _sid, 0, sid.Length); GlobalDebug.WriteLineIf( GlobalDebug.Info, diff --git a/src/System.IO.Pipelines/src/System/IO/Pipelines/PipeCompletion.cs b/src/System.IO.Pipelines/src/System/IO/Pipelines/PipeCompletion.cs index 2d29771e1527..ea3dfbe2c883 100644 --- a/src/System.IO.Pipelines/src/System/IO/Pipelines/PipeCompletion.cs +++ b/src/System.IO.Pipelines/src/System/IO/Pipelines/PipeCompletion.cs @@ -77,7 +77,7 @@ private void EnsureSpace() if (newLength == _callbacks.Length) { PipeCompletionCallback[] newArray = s_completionCallbackPool.Rent(_callbacks.Length * 2); - Array.Copy(_callbacks, newArray, _callbacks.Length); + Array.Copy(_callbacks, 0, newArray, 0, _callbacks.Length); s_completionCallbackPool.Return(_callbacks, clearArray: true); _callbacks = newArray; } diff --git a/src/System.Private.DataContractSerialization/src/System/Xml/XmlCanonicalWriter.cs b/src/System.Private.DataContractSerialization/src/System/Xml/XmlCanonicalWriter.cs index d8d9df00c7da..9968a0b339e9 100644 --- a/src/System.Private.DataContractSerialization/src/System/Xml/XmlCanonicalWriter.cs +++ b/src/System.Private.DataContractSerialization/src/System/Xml/XmlCanonicalWriter.cs @@ -164,7 +164,7 @@ private void StartElement() else if (_depth == _scopes.Length) { Scope[] newScopes = new Scope[_depth * 2]; - Array.Copy(_scopes, newScopes, _depth); + Array.Copy(_scopes, 0, newScopes, 0, _depth); _scopes = newScopes; } _scopes[_depth].xmlnsAttributeCount = _xmlnsAttributeCount; @@ -736,7 +736,7 @@ private void AddAttribute(ref Attribute attribute) else if (_attributeCount == _attributes.Length) { Attribute[] newAttributes = new Attribute[_attributeCount * 2]; - Array.Copy(_attributes, newAttributes, _attributeCount); + Array.Copy(_attributes, 0, newAttributes, 0, _attributeCount); _attributes = newAttributes; } @@ -756,7 +756,7 @@ private void AddXmlnsAttribute(ref XmlnsAttribute xmlnsAttribute) else if (_xmlnsAttributes.Length == _xmlnsAttributeCount) { XmlnsAttribute[] newXmlnsAttributes = new XmlnsAttribute[_xmlnsAttributeCount * 2]; - Array.Copy(_xmlnsAttributes, newXmlnsAttributes, _xmlnsAttributeCount); + Array.Copy(_xmlnsAttributes, 0, newXmlnsAttributes, 0, _xmlnsAttributeCount); _xmlnsAttributes = newXmlnsAttributes; } diff --git a/src/System.Private.Xml/src/System/Xml/BitStack.cs b/src/System.Private.Xml/src/System/Xml/BitStack.cs index 8330fcbdabf3..fd891b7c5fda 100644 --- a/src/System.Private.Xml/src/System/Xml/BitStack.cs +++ b/src/System.Private.Xml/src/System/Xml/BitStack.cs @@ -96,7 +96,7 @@ private void PushCurr() if (_stackPos >= len) { uint[] bitStackNew = new uint[2 * len]; - Array.Copy(_bitStack, bitStackNew, len); + Array.Copy(_bitStack, 0, bitStackNew, 0, len); _bitStack = bitStackNew; } } diff --git a/src/System.Private.Xml/src/System/Xml/Core/XmlEncodedRawTextWriter.cs b/src/System.Private.Xml/src/System/Xml/Core/XmlEncodedRawTextWriter.cs index 37b46927c1ef..5946daf1e43a 100644 --- a/src/System.Private.Xml/src/System/Xml/Core/XmlEncodedRawTextWriter.cs +++ b/src/System.Private.Xml/src/System/Xml/Core/XmlEncodedRawTextWriter.cs @@ -1706,7 +1706,7 @@ private void GrowTextContentMarks() { Debug.Assert(_lastMarkPos + 1 == _textContentMarks.Length); int[] newTextContentMarks = new int[_textContentMarks.Length * 2]; - Array.Copy(_textContentMarks, newTextContentMarks, _textContentMarks.Length); + Array.Copy(_textContentMarks, 0, newTextContentMarks, 0, _textContentMarks.Length); _textContentMarks = newTextContentMarks; } // Write NewLineChars to the specified buffer position and return an updated position. diff --git a/src/System.Private.Xml/src/System/Xml/Core/XmlTextWriter.cs b/src/System.Private.Xml/src/System/Xml/Core/XmlTextWriter.cs index 15adb55db598..88c283ab0254 100644 --- a/src/System.Private.Xml/src/System/Xml/Core/XmlTextWriter.cs +++ b/src/System.Private.Xml/src/System/Xml/Core/XmlTextWriter.cs @@ -1507,7 +1507,7 @@ private void AddNamespace(string prefix, string ns, bool declared) if (nsIndex == _nsStack.Length) { Namespace[] newStack = new Namespace[nsIndex * 2]; - Array.Copy(_nsStack, newStack, nsIndex); + Array.Copy(_nsStack, 0, newStack, 0, nsIndex); _nsStack = newStack; } _nsStack[nsIndex].Set(prefix, ns, declared); @@ -1767,7 +1767,7 @@ private void PushStack() if (_top == _stack.Length - 1) { TagInfo[] na = new TagInfo[_stack.Length + 10]; - if (_top > 0) Array.Copy(_stack, na, _top + 1); + if (_top > 0) Array.Copy(_stack, 0, na, 0, _top + 1); _stack = na; } diff --git a/src/System.Private.Xml/src/System/Xml/Core/XmlWellFormedWriter.cs b/src/System.Private.Xml/src/System/Xml/Core/XmlWellFormedWriter.cs index 0243b1489d22..da0aa2862fe4 100644 --- a/src/System.Private.Xml/src/System/Xml/Core/XmlWellFormedWriter.cs +++ b/src/System.Private.Xml/src/System/Xml/Core/XmlWellFormedWriter.cs @@ -494,7 +494,7 @@ public override void WriteStartElement(string prefix, string localName, string n if (top == _elemScopeStack.Length) { ElementScope[] newStack = new ElementScope[top * 2]; - Array.Copy(_elemScopeStack, newStack, top); + Array.Copy(_elemScopeStack, 0, newStack, 0, top); _elemScopeStack = newStack; } _elemScopeStack[top].Set(prefix, localName, ns, _nsTop); @@ -1835,7 +1835,7 @@ private void AddNamespace(string prefix, string ns, NamespaceKind kind) if (top == _nsStack.Length) { Namespace[] newStack = new Namespace[top * 2]; - Array.Copy(_nsStack, newStack, top); + Array.Copy(_nsStack, 0, newStack, 0, top); _nsStack = newStack; } _nsStack[top].Set(prefix, ns, kind); @@ -2206,7 +2206,7 @@ private void AddAttribute(string prefix, string localName, string namespaceName) if (top == _attrStack.Length) { AttrName[] newStack = new AttrName[top * 2]; - Array.Copy(_attrStack, newStack, top); + Array.Copy(_attrStack, 0, newStack, 0, top); _attrStack = newStack; } _attrStack[top].Set(prefix, localName, namespaceName); diff --git a/src/System.Private.Xml/src/System/Xml/Core/XmlWellFormedWriterAsync.cs b/src/System.Private.Xml/src/System/Xml/Core/XmlWellFormedWriterAsync.cs index dca7ec550e71..ed0a14826924 100644 --- a/src/System.Private.Xml/src/System/Xml/Core/XmlWellFormedWriterAsync.cs +++ b/src/System.Private.Xml/src/System/Xml/Core/XmlWellFormedWriterAsync.cs @@ -292,7 +292,7 @@ private void WriteStartElementAsync_FinishWrite(string prefix, string localName, if (top == _elemScopeStack.Length) { ElementScope[] newStack = new ElementScope[top * 2]; - Array.Copy(_elemScopeStack, newStack, top); + Array.Copy(_elemScopeStack, 0, newStack, 0, top); _elemScopeStack = newStack; } _elemScopeStack[top].Set(prefix, localName, ns, _nsTop); diff --git a/src/System.Private.Xml/src/System/Xml/Core/XmlWellFormedWriterHelpers.cs b/src/System.Private.Xml/src/System/Xml/Core/XmlWellFormedWriterHelpers.cs index 78703625c4ed..5dfeb2a408cb 100644 --- a/src/System.Private.Xml/src/System/Xml/Core/XmlWellFormedWriterHelpers.cs +++ b/src/System.Private.Xml/src/System/Xml/Core/XmlWellFormedWriterHelpers.cs @@ -511,7 +511,7 @@ private void AddItem(ItemType type, object data) else if (_items.Length == newItemIndex) { Item[] newItems = new Item[newItemIndex * 2]; - Array.Copy(_items, newItems, newItemIndex); + Array.Copy(_items, 0, newItems, 0, newItemIndex); _items = newItems; } if (_items[newItemIndex] == null) diff --git a/src/System.Private.Xml/src/System/Xml/Resolvers/XmlPreloadedResolver.cs b/src/System.Private.Xml/src/System/Xml/Resolvers/XmlPreloadedResolver.cs index b313a79d52d6..ebc3dbcd256d 100644 --- a/src/System.Private.Xml/src/System/Xml/Resolvers/XmlPreloadedResolver.cs +++ b/src/System.Private.Xml/src/System/Xml/Resolvers/XmlPreloadedResolver.cs @@ -351,7 +351,7 @@ public void Add(Uri uri, Stream value) } int size = checked((int)ms.Position); byte[] bytes = new byte[size]; - Array.Copy(ms.ToArray(), bytes, size); + Array.Copy(ms.ToArray(), 0, bytes, 0, size); Add(uri, new ByteArrayChunk(bytes)); } } diff --git a/src/System.Private.Xml/src/System/Xml/Schema/BitSet.cs b/src/System.Private.Xml/src/System/Xml/Schema/BitSet.cs index 445c474078e5..a3dac3ad1990 100644 --- a/src/System.Private.Xml/src/System/Xml/Schema/BitSet.cs +++ b/src/System.Private.Xml/src/System/Xml/Schema/BitSet.cs @@ -243,7 +243,7 @@ private void EnsureLength(int nRequiredLength) if (request < nRequiredLength) request = nRequiredLength; uint[] newBits = new uint[request]; - Array.Copy(_bits, newBits, _bits.Length); + Array.Copy(_bits, 0, newBits, 0, _bits.Length); _bits = newBits; } } diff --git a/src/System.Private.Xml/src/System/Xml/Serialization/XmlSerializationGeneratedCode.cs b/src/System.Private.Xml/src/System/Xml/Serialization/XmlSerializationGeneratedCode.cs index 8a453d464270..f511e98bd483 100644 --- a/src/System.Private.Xml/src/System/Xml/Serialization/XmlSerializationGeneratedCode.cs +++ b/src/System.Private.Xml/src/System/Xml/Serialization/XmlSerializationGeneratedCode.cs @@ -95,7 +95,7 @@ private TypeMapping[] EnsureArrayIndex(TypeMapping[] a, int index) if (a == null) return new TypeMapping[32]; if (index < a.Length) return a; TypeMapping[] b = new TypeMapping[a.Length + 32]; - Array.Copy(a, b, index); + Array.Copy(a, 0, b, 0, index); return b; } diff --git a/src/System.Private.Xml/src/System/Xml/Xsl/QIL/QilList.cs b/src/System.Private.Xml/src/System/Xml/Xsl/QIL/QilList.cs index b175f991a4b9..486d8b5ff426 100644 --- a/src/System.Private.Xml/src/System/Xml/Xsl/QIL/QilList.cs +++ b/src/System.Private.Xml/src/System/Xml/Xsl/QIL/QilList.cs @@ -123,7 +123,7 @@ public override void Insert(int index, QilNode node) if (_count == _members.Length) { QilNode[] membersNew = new QilNode[_count * 2]; - Array.Copy(_members, membersNew, _count); + Array.Copy(_members, 0, membersNew, 0, _count); _members = membersNew; } diff --git a/src/System.Private.Xml/src/System/Xml/Xsl/Runtime/XmlAttributeCache.cs b/src/System.Private.Xml/src/System/Xml/Xsl/Runtime/XmlAttributeCache.cs index 68b4492d7e63..be17b5522fc3 100644 --- a/src/System.Private.Xml/src/System/Xml/Xsl/Runtime/XmlAttributeCache.cs +++ b/src/System.Private.Xml/src/System/Xml/Xsl/Runtime/XmlAttributeCache.cs @@ -363,7 +363,7 @@ private void EnsureAttributeCache() // Resize caching array Debug.Assert(_numEntries == _arrAttrs.Length); AttrNameVal[] arrNew = new AttrNameVal[_numEntries * 2]; - Array.Copy(_arrAttrs, arrNew, _numEntries); + Array.Copy(_arrAttrs, 0, arrNew, 0, _numEntries); _arrAttrs = arrNew; } } diff --git a/src/System.Private.Xml/src/System/Xml/Xsl/Runtime/XmlNavigatorStack.cs b/src/System.Private.Xml/src/System/Xml/Xsl/Runtime/XmlNavigatorStack.cs index 0cd9bd413665..c3e79e1b0136 100644 --- a/src/System.Private.Xml/src/System/Xml/Xsl/Runtime/XmlNavigatorStack.cs +++ b/src/System.Private.Xml/src/System/Xml/Xsl/Runtime/XmlNavigatorStack.cs @@ -39,7 +39,7 @@ public void Push(XPathNavigator nav) // Resize the stack XPathNavigator[] stkOld = _stkNav; _stkNav = new XPathNavigator[2 * _sp]; - Array.Copy(stkOld, _stkNav, _sp); + Array.Copy(stkOld, 0, _stkNav, 0, _sp); } } diff --git a/src/System.Private.Xml/src/System/Xml/Xsl/Xslt/XsltInput.cs b/src/System.Private.Xml/src/System/Xml/Xsl/Xslt/XsltInput.cs index 2ecdd43497bd..d736e6335a0e 100644 --- a/src/System.Private.Xml/src/System/Xml/Xsl/Xslt/XsltInput.cs +++ b/src/System.Private.Xml/src/System/Xml/Xsl/Xslt/XsltInput.cs @@ -90,7 +90,7 @@ private void ExtendRecordBuffer(int position) newSize = position + 1; } Record[] tmp = new Record[newSize]; - Array.Copy(_records, tmp, _records.Length); + Array.Copy(_records, 0, tmp, 0, _records.Length); _records = tmp; } } diff --git a/src/System.Private.Xml/src/System/Xml/Xsl/XsltOld/BuilderInfo.cs b/src/System.Private.Xml/src/System/Xml/Xsl/XsltOld/BuilderInfo.cs index 7514e655c67c..b2a066d141ac 100644 --- a/src/System.Private.Xml/src/System/Xml/Xsl/XsltOld/BuilderInfo.cs +++ b/src/System.Private.Xml/src/System/Xml/Xsl/XsltOld/BuilderInfo.cs @@ -67,7 +67,7 @@ private void EnsureTextInfoSize(int newSize) if (this.TextInfo.Length < newSize) { string[] newArr = new string[newSize * 2]; - Array.Copy(this.TextInfo, newArr, this.TextInfoCount); + Array.Copy(this.TextInfo, 0, newArr, 0, this.TextInfoCount); this.TextInfo = newArr; } } diff --git a/src/System.Reflection.Context/src/System/Reflection/Context/Virtual/VirtualPropertyBase.cs b/src/System.Reflection.Context/src/System/Reflection/Context/Virtual/VirtualPropertyBase.cs index d032a367cb17..4f8e4dea85e3 100644 --- a/src/System.Reflection.Context/src/System/Reflection/Context/Virtual/VirtualPropertyBase.cs +++ b/src/System.Reflection.Context/src/System/Reflection/Context/Virtual/VirtualPropertyBase.cs @@ -122,7 +122,7 @@ public override sealed void SetValue(object obj, object value, BindingFlags invo { args = new object[index.Length + 1]; - Array.Copy(index, args, index.Length); + Array.Copy(index, 0, args, 0, index.Length); args[index.Length] = value; } diff --git a/src/System.Reflection.MetadataLoadContext/src/System/Reflection/TypeLoading/General/Helpers.cs b/src/System.Reflection.MetadataLoadContext/src/System/Reflection/TypeLoading/General/Helpers.cs index 900c2d5b461d..78f1e50174cf 100644 --- a/src/System.Reflection.MetadataLoadContext/src/System/Reflection/TypeLoading/General/Helpers.cs +++ b/src/System.Reflection.MetadataLoadContext/src/System/Reflection/TypeLoading/General/Helpers.cs @@ -22,7 +22,7 @@ public static T[] CloneArray(this T[] original) // We want to return the exact type of T[] even if "original" is a type of T2[] (due to array variance.) // The arrays produced by this helper are usually passed directly to app code. T[] copy = new T[original.Length]; - Array.Copy(sourceArray: original, destinationArray: copy, length: original.Length); + Array.Copy(sourceArray: original, sourceIndex: 0, destinationArray: copy, destinationIndex: 0, length: original.Length); return copy; } diff --git a/src/System.Runtime.Serialization.Formatters/src/System/Runtime/Serialization/FormatterServices.cs b/src/System.Runtime.Serialization.Formatters/src/System/Runtime/Serialization/FormatterServices.cs index 52e9dd60a74e..f8be53b545f8 100644 --- a/src/System.Runtime.Serialization.Formatters/src/System/Runtime/Serialization/FormatterServices.cs +++ b/src/System.Runtime.Serialization.Formatters/src/System/Runtime/Serialization/FormatterServices.cs @@ -71,7 +71,7 @@ private static FieldInfo[] InternalGetSerializableMembers(Type type) if (allMembers != null && allMembers.Count > 0) { var membersTemp = new FieldInfo[allMembers.Count + typeMembers.Length]; - Array.Copy(typeMembers, membersTemp, typeMembers.Length); + Array.Copy(typeMembers, 0, membersTemp, 0, typeMembers.Length); allMembers.CopyTo(membersTemp, typeMembers.Length); typeMembers = membersTemp; } diff --git a/src/System.Security.Cryptography.Algorithms/src/System/Security/Cryptography/CryptoConfig.cs b/src/System.Security.Cryptography.Algorithms/src/System/Security/Cryptography/CryptoConfig.cs index 9518ac0b1ea2..cac50ed6e4ff 100644 --- a/src/System.Security.Cryptography.Algorithms/src/System/Security/Cryptography/CryptoConfig.cs +++ b/src/System.Security.Cryptography.Algorithms/src/System/Security/Cryptography/CryptoConfig.cs @@ -303,7 +303,7 @@ public static void AddAlgorithm(Type algorithm, params string[] names) throw new ArgumentNullException(nameof(names)); string[] algorithmNames = new string[names.Length]; - Array.Copy(names, algorithmNames, algorithmNames.Length); + Array.Copy(names, 0, algorithmNames, 0, algorithmNames.Length); // Pre-check the algorithm names for validity so that we don't add a few of the names and then // throw an exception if we find an invalid name partway through the list. @@ -461,7 +461,7 @@ public static void AddOID(string oid, params string[] names) throw new ArgumentNullException(nameof(names)); string[] oidNames = new string[names.Length]; - Array.Copy(names, oidNames, oidNames.Length); + Array.Copy(names, 0, oidNames, 0, oidNames.Length); // Pre-check the input names for validity, so that we don't add a few of the names and throw an // exception if an invalid name is found further down the array. diff --git a/src/System.Transactions.Local/src/System/Transactions/Transaction.cs b/src/System.Transactions.Local/src/System/Transactions/Transaction.cs index 1835b27aaf97..69f79f0f7f75 100644 --- a/src/System.Transactions.Local/src/System/Transactions/Transaction.cs +++ b/src/System.Transactions.Local/src/System/Transactions/Transaction.cs @@ -487,7 +487,7 @@ public byte[] GetPromotedToken() } byte[] toReturn = new byte[internalPromotedToken.Length]; - Array.Copy(internalPromotedToken, toReturn, toReturn.Length); + Array.Copy(internalPromotedToken, 0, toReturn, 0, toReturn.Length); return toReturn; } diff --git a/src/System.Transactions.Local/src/System/Transactions/TransactionInterop.cs b/src/System.Transactions.Local/src/System/Transactions/TransactionInterop.cs index 28d67499dd14..37ea207793c3 100644 --- a/src/System.Transactions.Local/src/System/Transactions/TransactionInterop.cs +++ b/src/System.Transactions.Local/src/System/Transactions/TransactionInterop.cs @@ -305,7 +305,7 @@ internal static DistributedTransaction GetDistributedTransactionFromTransmitterP } byte[] propagationTokenCopy = new byte[propagationToken.Length]; - Array.Copy(propagationToken, propagationTokenCopy, propagationToken.Length); + Array.Copy(propagationToken, 0, propagationTokenCopy, 0, propagationToken.Length); return DistributedTransactionManager.GetDistributedTransactionFromTransmitterPropagationToken(propagationTokenCopy); } diff --git a/src/System.Transactions.Local/src/System/Transactions/TransactionState.cs b/src/System.Transactions.Local/src/System/Transactions/TransactionState.cs index 97cdd5f01a92..037e5acd84e6 100644 --- a/src/System.Transactions.Local/src/System/Transactions/TransactionState.cs +++ b/src/System.Transactions.Local/src/System/Transactions/TransactionState.cs @@ -492,7 +492,9 @@ protected void AddVolatileEnlistment(ref VolatileEnlistmentSet enlistments, Enli { Array.Copy( enlistments._volatileEnlistments, + 0, newEnlistments, + 0, enlistments._volatileEnlistmentSize ); } diff --git a/src/System.Web.HttpUtility/src/System/Web/Util/HttpEncoder.cs b/src/System.Web.HttpUtility/src/System/Web/Util/HttpEncoder.cs index 847e414910e7..65aebb296b23 100644 --- a/src/System.Web.HttpUtility/src/System/Web/Util/HttpEncoder.cs +++ b/src/System.Web.HttpUtility/src/System/Web/Util/HttpEncoder.cs @@ -283,7 +283,7 @@ internal static byte[] UrlDecode(byte[] bytes, int offset, int count) if (decodedBytesCount < decodedBytes.Length) { byte[] newDecodedBytes = new byte[decodedBytesCount]; - Array.Copy(decodedBytes, newDecodedBytes, decodedBytesCount); + Array.Copy(decodedBytes, 0, newDecodedBytes, 0, decodedBytesCount); decodedBytes = newDecodedBytes; } diff --git a/src/System.Windows.Extensions/src/System/Media/SoundPlayer.cs b/src/System.Windows.Extensions/src/System/Media/SoundPlayer.cs index d00bb2e5102b..6983397d3084 100644 --- a/src/System.Windows.Extensions/src/System/Media/SoundPlayer.cs +++ b/src/System.Windows.Extensions/src/System/Media/SoundPlayer.cs @@ -498,7 +498,7 @@ private async Task CopyStreamAsync(CancellationToken cancellationToken) if (_streamData.Length < _currentPos + BlockSize) { byte[] newData = new byte[_streamData.Length * 2]; - Array.Copy(_streamData, newData, _streamData.Length); + Array.Copy(_streamData, 0, newData, 0, _streamData.Length); _streamData = newData; } readBytes = await _stream.ReadAsync(_streamData, _currentPos, BlockSize, cancellationToken).ConfigureAwait(false); From a11f11a669865a07d8d6755a5ae3348c3a073e47 Mon Sep 17 00:00:00 2001 From: Stephen Toub Date: Thu, 9 May 2019 12:55:15 -0400 Subject: [PATCH 291/607] Make ZipFileUtils use of ArrayPool more reliable (#37547) If the Rent call tried to allocate and OOM'd, we would end up returning the same buffer to the pool twice, once here and once in the caller's finally. --- .../src/System/IO/Compression/ZipFile.Utils.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/System.IO.Compression.ZipFile/src/System/IO/Compression/ZipFile.Utils.cs b/src/System.IO.Compression.ZipFile/src/System/IO/Compression/ZipFile.Utils.cs index ee19c317ea3c..b3416d09c2d4 100644 --- a/src/System.IO.Compression.ZipFile/src/System/IO/Compression/ZipFile.Utils.cs +++ b/src/System.IO.Compression.ZipFile/src/System/IO/Compression/ZipFile.Utils.cs @@ -66,8 +66,10 @@ public static void EnsureCapacity(ref char[] buffer, int min) int newCapacity = buffer.Length * 2; if (newCapacity < min) newCapacity = min; - ArrayPool.Shared.Return(buffer); + + char[] oldBuffer = buffer; buffer = ArrayPool.Shared.Rent(newCapacity); + ArrayPool.Shared.Return(oldBuffer); } } From 2058d73e96992fefed0422c23cc72f7fde99e7ec Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Thu, 9 May 2019 12:57:25 -0400 Subject: [PATCH 292/607] Update dependencies from https://github.com/dotnet/coreclr build 20190508.71 (#37543) - Microsoft.NET.Sdk.IL - 3.0.0-preview6-27708-71 - Microsoft.NETCore.ILAsm - 3.0.0-preview6-27708-71 - Microsoft.NETCore.Runtime.CoreCLR - 3.0.0-preview6-27708-71 --- eng/Version.Details.xml | 12 ++++++------ eng/Versions.props | 4 ++-- global.json | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 2130c44840a4..7ce2c9865545 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -1,16 +1,16 @@ - + https://github.com/dotnet/coreclr - 2e32f3b92f3a17b5821673babaa6883deb5ab209 + 794f2f89399026246562181bc999a5027fb6583d - + https://github.com/dotnet/coreclr - 2e32f3b92f3a17b5821673babaa6883deb5ab209 + 794f2f89399026246562181bc999a5027fb6583d - + https://github.com/dotnet/coreclr - 2e32f3b92f3a17b5821673babaa6883deb5ab209 + 794f2f89399026246562181bc999a5027fb6583d diff --git a/eng/Versions.props b/eng/Versions.props index ce90c2579385..c024e0ab1d06 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -40,8 +40,8 @@ 3.0.0-preview6-27707-10 3.0.0-preview6-27707-10 - 3.0.0-preview6-27707-72 - 3.0.0-preview6-27707-72 + 3.0.0-preview6-27708-71 + 3.0.0-preview6-27708-71 3.0.0-preview6.19257.8 4.6.0-preview6.19257.8 diff --git a/global.json b/global.json index ed09dd285716..bab1fd8f4648 100644 --- a/global.json +++ b/global.json @@ -5,6 +5,6 @@ "msbuild-sdks": { "Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19229.8", "Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19257.7", - "Microsoft.NET.Sdk.IL": "3.0.0-preview6-27707-72" + "Microsoft.NET.Sdk.IL": "3.0.0-preview6-27708-71" } } From 4d6eaf802016395ff6a21a1f62d0d1353fb0d9a0 Mon Sep 17 00:00:00 2001 From: dotnet-maestro-bot Date: Thu, 9 May 2019 09:59:09 -0700 Subject: [PATCH 293/607] Update ProjectNTfs, ProjectNTfsTestILC to beta-27709-00, beta-27709-00, respectively (#37535) --- eng/dependencies.props | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/eng/dependencies.props b/eng/dependencies.props index c18345d5e200..61cf4bbf8827 100644 --- a/eng/dependencies.props +++ b/eng/dependencies.props @@ -9,8 +9,8 @@ These ref versions are pulled from https://github.com/dotnet/versions. --> - 9c86a09c302a6a20a67c9d299b587e8eb025eeba - 9c86a09c302a6a20a67c9d299b587e8eb025eeba + 4bccd47061726ce36a245c800a527ea03dbb64ae + 4bccd47061726ce36a245c800a527ea03dbb64ae 8bd1ec5fac9f0eec34ff6b34b1d878b4359e02dd @@ -22,9 +22,9 @@ - beta-27708-01 - beta-27708-01 - 1.0.0-beta-27708-01 + beta-27709-00 + beta-27709-00 + 1.0.0-beta-27709-00 4.4.0 From 93591c2b80662ab31c05995ff53c397db10c1bda Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Thu, 9 May 2019 12:59:49 -0400 Subject: [PATCH 294/607] Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-optimization build 20190509.1 (#37544) - optimization.windows_nt-x64.IBC.CoreFx - 99.99.99-master-20190509.1 --- eng/Version.Details.xml | 4 ++-- eng/Versions.props | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 7ce2c9865545..ca34370ced84 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -94,9 +94,9 @@ https://github.com/dotnet/arcade 1b8589bbf53b9a5e819460798eff59830f39a3be - + https://dev.azure.com/dnceng/internal/_git/dotnet-optimization - e8748bcc9e80a48d339d76dca39a758459faceff + db72bf1818ade45a480461868abd67ab2fe03c35 diff --git a/eng/Versions.props b/eng/Versions.props index c024e0ab1d06..a1cc6ee8bac6 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -48,6 +48,6 @@ 2.1.0-prerelease.19230.1 - 99.99.99-master-20190508.1 + 99.99.99-master-20190509.1 From 3c3ef5d118ffa4cf2e0b6119a144d2dba3a1e0e4 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Thu, 9 May 2019 13:05:12 -0400 Subject: [PATCH 295/607] Update dependencies from https://github.com/dotnet/corefx build 20190509.1 (#37542) - Microsoft.NETCore.Platforms - 3.0.0-preview6.19259.1 - runtime.native.System.IO.Ports - 4.6.0-preview6.19259.1 --- eng/Version.Details.xml | 8 ++++---- eng/Versions.props | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index ca34370ced84..6fe224dd8448 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -26,13 +26,13 @@ https://github.com/dotnet/core-setup 911b9999b1755450e774486e96f7e5517355f08d - + https://github.com/dotnet/corefx - 2c75f5a09f770f3118e09abc35bdf88c1c7120b0 + f7cd353ab8b08ff45d45985851505e5f8f19f9ac - + https://github.com/dotnet/corefx - 2c75f5a09f770f3118e09abc35bdf88c1c7120b0 + f7cd353ab8b08ff45d45985851505e5f8f19f9ac https://github.com/dotnet/arcade diff --git a/eng/Versions.props b/eng/Versions.props index a1cc6ee8bac6..e4d9c3a44cdb 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -43,8 +43,8 @@ 3.0.0-preview6-27708-71 3.0.0-preview6-27708-71 - 3.0.0-preview6.19257.8 - 4.6.0-preview6.19257.8 + 3.0.0-preview6.19259.1 + 4.6.0-preview6.19259.1 2.1.0-prerelease.19230.1 From 4d5bc3c992b417778c51fe66141b2e3aa3f92329 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Thu, 9 May 2019 13:05:20 -0400 Subject: [PATCH 296/607] Update dependencies from https://github.com/dotnet/core-setup build 20190508.04 (#37541) - Microsoft.NETCore.App - 3.0.0-preview6-27708-04 - Microsoft.NETCore.DotNetHostPolicy - 3.0.0-preview6-27708-04 - Microsoft.NETCore.DotNetHost - 3.0.0-preview6-27708-04 --- eng/Version.Details.xml | 12 ++++++------ eng/Versions.props | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 6fe224dd8448..c3712cdc23d6 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -14,17 +14,17 @@ - + https://github.com/dotnet/core-setup - 911b9999b1755450e774486e96f7e5517355f08d + 19ecb4847b57249bdee93d14eeea81bbc0174ff5 - + https://github.com/dotnet/core-setup - 911b9999b1755450e774486e96f7e5517355f08d + 19ecb4847b57249bdee93d14eeea81bbc0174ff5 - + https://github.com/dotnet/core-setup - 911b9999b1755450e774486e96f7e5517355f08d + 19ecb4847b57249bdee93d14eeea81bbc0174ff5 https://github.com/dotnet/corefx diff --git a/eng/Versions.props b/eng/Versions.props index e4d9c3a44cdb..09436bf81c31 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -36,9 +36,9 @@ 2.2.0-beta.19254.1 1.0.0-beta.19254.1 - 3.0.0-preview6-27707-10 - 3.0.0-preview6-27707-10 - 3.0.0-preview6-27707-10 + 3.0.0-preview6-27708-04 + 3.0.0-preview6-27708-04 + 3.0.0-preview6-27708-04 3.0.0-preview6-27708-71 3.0.0-preview6-27708-71 From 2392caee7354520d4f7c9663c052fa46d8b1fe10 Mon Sep 17 00:00:00 2001 From: Stephen Toub Date: Thu, 9 May 2019 14:33:20 -0400 Subject: [PATCH 297/607] Add TaskAsyncEnumerableExtensions to Microsoft.Bcl.AsyncInterfaces (#37379) * Add TaskAsyncEnumerableExtensions to Microsoft.Bcl.AsyncInterfaces * Adding baseline entry for the missing type on netstandard * Temporarily changing test configurations of AsyncInterfaces package so that all types are found. * Comment out AsyncEnumerable tests while the type makes its way to netstandard 2.1 --- .../ref/Microsoft.Bcl.AsyncInterfaces.Forwards.cs | 1 + .../ref/Microsoft.Bcl.AsyncInterfaces.cs | 9 +++++++++ .../src/Microsoft.Bcl.AsyncInterfaces.csproj | 3 +++ .../tests/Microsoft.Bcl.AsyncInterfaces.Tests.csproj | 4 ++++ src/shims/ApiCompatBaseline.netcoreapp.netstandard.txt | 3 ++- src/shims/ApiCompatBaseline.uap.netstandard.txt | 3 ++- src/shims/ApiCompatBaseline.uapaot.netstandard.txt | 3 ++- 7 files changed, 23 insertions(+), 3 deletions(-) diff --git a/src/Microsoft.Bcl.AsyncInterfaces/ref/Microsoft.Bcl.AsyncInterfaces.Forwards.cs b/src/Microsoft.Bcl.AsyncInterfaces/ref/Microsoft.Bcl.AsyncInterfaces.Forwards.cs index 6b61d3dc9c96..ec398f0ff1b5 100644 --- a/src/Microsoft.Bcl.AsyncInterfaces/ref/Microsoft.Bcl.AsyncInterfaces.Forwards.cs +++ b/src/Microsoft.Bcl.AsyncInterfaces/ref/Microsoft.Bcl.AsyncInterfaces.Forwards.cs @@ -9,4 +9,5 @@ [assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.CompilerServices.AsyncIteratorStateMachineAttribute))] [assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.CompilerServices.ConfiguredAsyncDisposable))] [assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.CompilerServices.ConfiguredCancelableAsyncEnumerable<>))] +//[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Threading.Tasks.TaskAsyncEnumerableExtensions))] // TODO #37354: Once .NET Standard 2.1 includes this type, uncomment this. [assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Threading.Tasks.Sources.ManualResetValueTaskSourceCore<>))] diff --git a/src/Microsoft.Bcl.AsyncInterfaces/ref/Microsoft.Bcl.AsyncInterfaces.cs b/src/Microsoft.Bcl.AsyncInterfaces/ref/Microsoft.Bcl.AsyncInterfaces.cs index caa86d3d82bf..2bcebe391eeb 100644 --- a/src/Microsoft.Bcl.AsyncInterfaces/ref/Microsoft.Bcl.AsyncInterfaces.cs +++ b/src/Microsoft.Bcl.AsyncInterfaces/ref/Microsoft.Bcl.AsyncInterfaces.cs @@ -63,6 +63,15 @@ public readonly partial struct Enumerator } } } +namespace System.Threading.Tasks +{ + public static partial class TaskAsyncEnumerableExtensions + { + public static System.Runtime.CompilerServices.ConfiguredAsyncDisposable ConfigureAwait(this System.IAsyncDisposable source, bool continueOnCapturedContext) { throw null; } + public static System.Runtime.CompilerServices.ConfiguredCancelableAsyncEnumerable ConfigureAwait(this System.Collections.Generic.IAsyncEnumerable source, bool continueOnCapturedContext) { throw null; } + public static System.Runtime.CompilerServices.ConfiguredCancelableAsyncEnumerable WithCancellation(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken) { throw null; } + } +} namespace System.Threading.Tasks.Sources { public partial struct ManualResetValueTaskSourceCore diff --git a/src/Microsoft.Bcl.AsyncInterfaces/src/Microsoft.Bcl.AsyncInterfaces.csproj b/src/Microsoft.Bcl.AsyncInterfaces/src/Microsoft.Bcl.AsyncInterfaces.csproj index 798c0e1c0f92..710329448ba4 100644 --- a/src/Microsoft.Bcl.AsyncInterfaces/src/Microsoft.Bcl.AsyncInterfaces.csproj +++ b/src/Microsoft.Bcl.AsyncInterfaces/src/Microsoft.Bcl.AsyncInterfaces.csproj @@ -25,6 +25,9 @@ ProductionCode\Common\CoreLib\System\Runtime\CompilerServices\ConfiguredCancelableAsyncEnumerable.cs + + ProductionCode\Common\CoreLib\System\Threading\Tasks\TaskAsyncEnumerableExtensions.cs + diff --git a/src/Microsoft.Bcl.AsyncInterfaces/tests/Microsoft.Bcl.AsyncInterfaces.Tests.csproj b/src/Microsoft.Bcl.AsyncInterfaces/tests/Microsoft.Bcl.AsyncInterfaces.Tests.csproj index 572955e4966a..4e7fff5e4626 100644 --- a/src/Microsoft.Bcl.AsyncInterfaces/tests/Microsoft.Bcl.AsyncInterfaces.Tests.csproj +++ b/src/Microsoft.Bcl.AsyncInterfaces/tests/Microsoft.Bcl.AsyncInterfaces.Tests.csproj @@ -7,6 +7,10 @@ Common\tests\System\Threading\Tasks\Sources\ManualResetValueTaskSource.cs + System.Threading.Tasks.Extensions\tests\ManualResetValueTaskSourceTests.cs diff --git a/src/shims/ApiCompatBaseline.netcoreapp.netstandard.txt b/src/shims/ApiCompatBaseline.netcoreapp.netstandard.txt index 33b0f212b273..9a3dc0f4baa6 100644 --- a/src/shims/ApiCompatBaseline.netcoreapp.netstandard.txt +++ b/src/shims/ApiCompatBaseline.netcoreapp.netstandard.txt @@ -71,4 +71,5 @@ MembersMustExist : Member 'System.Linq.EnumerableQuery..ctor()' does not exist i MembersMustExist : Member 'System.Threading.Tasks.TaskExtensions.ConfigureAwait(System.IAsyncDisposable, System.Boolean)' does not exist in the implementation but it does exist in the contract. MembersMustExist : Member 'System.Threading.Tasks.TaskExtensions.ConfigureAwait(System.Collections.Generic.IAsyncEnumerable, System.Boolean)' does not exist in the implementation but it does exist in the contract. MembersMustExist : Member 'System.Threading.Tasks.TaskExtensions.WithCancellation(System.Collections.Generic.IAsyncEnumerable, System.Threading.CancellationToken)' does not exist in the implementation but it does exist in the contract. -Total Issues: 62 \ No newline at end of file +TypesMustExist : Type 'System.Threading.Tasks.TaskAsyncEnumerableExtensions' does not exist in the implementation but it does exist in the contract. +Total Issues: 63 \ No newline at end of file diff --git a/src/shims/ApiCompatBaseline.uap.netstandard.txt b/src/shims/ApiCompatBaseline.uap.netstandard.txt index e16da4da5c2d..e350812b1e40 100644 --- a/src/shims/ApiCompatBaseline.uap.netstandard.txt +++ b/src/shims/ApiCompatBaseline.uap.netstandard.txt @@ -141,4 +141,5 @@ CannotSealType : Type 'System.Linq.EnumerableExecutor' is effectively (has a pri MembersMustExist : Member 'System.Linq.EnumerableExecutor..ctor()' does not exist in the implementation but it does exist in the contract. CannotSealType : Type 'System.Linq.EnumerableQuery' is effectively (has a private constructor) sealed in the implementation but not sealed in the contract. MembersMustExist : Member 'System.Linq.EnumerableQuery..ctor()' does not exist in the implementation but it does exist in the contract. -Total Issues: 124 \ No newline at end of file +TypesMustExist : Type 'System.Threading.Tasks.TaskAsyncEnumerableExtensions' does not exist in the implementation but it does exist in the contract. +Total Issues: 125 \ No newline at end of file diff --git a/src/shims/ApiCompatBaseline.uapaot.netstandard.txt b/src/shims/ApiCompatBaseline.uapaot.netstandard.txt index 285d6c34eb21..8a6df03d09e6 100644 --- a/src/shims/ApiCompatBaseline.uapaot.netstandard.txt +++ b/src/shims/ApiCompatBaseline.uapaot.netstandard.txt @@ -147,4 +147,5 @@ CannotSealType : Type 'System.Linq.EnumerableExecutor' is effectively (has a pri MembersMustExist : Member 'System.Linq.EnumerableExecutor..ctor()' does not exist in the implementation but it does exist in the contract. CannotSealType : Type 'System.Linq.EnumerableQuery' is effectively (has a private constructor) sealed in the implementation but not sealed in the contract. MembersMustExist : Member 'System.Linq.EnumerableQuery..ctor()' does not exist in the implementation but it does exist in the contract. -Total Issues: 130 \ No newline at end of file +TypesMustExist : Type 'System.Threading.Tasks.TaskAsyncEnumerableExtensions' does not exist in the implementation but it does exist in the contract. +Total Issues: 131 \ No newline at end of file From 5cc736198cd5d1663a4af6c4e31cccf06ab3735d Mon Sep 17 00:00:00 2001 From: Stephen Toub Date: Thu, 9 May 2019 15:39:39 -0400 Subject: [PATCH 298/607] Remove unnecessary string allocation from ZipFileUtils (#37546) --- .../src/System/IO/Compression/ZipFile.Utils.cs | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/System.IO.Compression.ZipFile/src/System/IO/Compression/ZipFile.Utils.cs b/src/System.IO.Compression.ZipFile/src/System/IO/Compression/ZipFile.Utils.cs index b3416d09c2d4..03d7f35b244a 100644 --- a/src/System.IO.Compression.ZipFile/src/System/IO/Compression/ZipFile.Utils.cs +++ b/src/System.IO.Compression.ZipFile/src/System/IO/Compression/ZipFile.Utils.cs @@ -2,20 +2,17 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Buffers; using System.Collections.Generic; using System.Diagnostics; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace System.IO.Compression { internal static partial class ZipFileUtils { // Per the .ZIP File Format Specification 4.4.17.1 all slashes should be forward slashes - public const char PathSeparator = '/'; + private const char PathSeparatorChar = '/'; + private const string PathSeparatorString = "/"; public static string EntryFromPath(string entry, int offset, int length, ref char[] buffer, bool appendPathSeparator = false) { @@ -34,7 +31,7 @@ public static string EntryFromPath(string entry, int offset, int length, ref cha } if (length == 0) - return appendPathSeparator ? PathSeparator.ToString() : string.Empty; + return appendPathSeparator ? PathSeparatorString : string.Empty; int resultLength = appendPathSeparator ? length + 1 : length; EnsureCapacity(ref buffer, resultLength); @@ -47,11 +44,11 @@ public static string EntryFromPath(string entry, int offset, int length, ref cha { char ch = buffer[i]; if (ch == Path.DirectorySeparatorChar || ch == Path.AltDirectorySeparatorChar) - buffer[i] = PathSeparator; + buffer[i] = PathSeparatorChar; } if (appendPathSeparator) - buffer[length] = PathSeparator; + buffer[length] = PathSeparatorChar; return new string(buffer, 0, resultLength); } From 25bf7f0654a8e35cc47ccc7ee7cb80e49c748e03 Mon Sep 17 00:00:00 2001 From: Stephen Toub Date: Thu, 9 May 2019 16:20:20 -0400 Subject: [PATCH 299/607] Tweak SendRecv_NoBuffering_Success test to gather more details (#37555) The test failed from the `Assert.Equal(sendBuffer.Length, totalReceived)` with `totalReceived == 0`. The only way that should happen, short of buggy product code, is if somehow the connection was torn down from the client side such that the server side read 0 bytes. Under the theory that maybe that was somehow caused by the send operation failing, we should wait on the send task from the client before doing the assert. --- src/System.Net.Sockets/tests/FunctionalTests/SendReceive.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/System.Net.Sockets/tests/FunctionalTests/SendReceive.cs b/src/System.Net.Sockets/tests/FunctionalTests/SendReceive.cs index 83fb63bee773..7541ae8a4e3d 100644 --- a/src/System.Net.Sockets/tests/FunctionalTests/SendReceive.cs +++ b/src/System.Net.Sockets/tests/FunctionalTests/SendReceive.cs @@ -798,8 +798,8 @@ await Task.WhenAll( if (received <= 0) break; totalReceived += received; } - Assert.Equal(sendBuffer.Length, totalReceived); await sendTask; + Assert.Equal(sendBuffer.Length, totalReceived); } } } From a010364670e9a5a8df39d3d7eac97f0e129aaaa1 Mon Sep 17 00:00:00 2001 From: Stephen Toub Date: Thu, 9 May 2019 17:24:31 -0400 Subject: [PATCH 300/607] Disable PostAsyncExpect100Continue_FailsAfterContentSendStarted_Throws on non-SocketsHttpHandler (#37553) --- .../tests/FunctionalTests/HttpRetryProtocolTests.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/System.Net.Http/tests/FunctionalTests/HttpRetryProtocolTests.cs b/src/System.Net.Http/tests/FunctionalTests/HttpRetryProtocolTests.cs index b17746038dd3..e069963d9f10 100644 --- a/src/System.Net.Http/tests/FunctionalTests/HttpRetryProtocolTests.cs +++ b/src/System.Net.Http/tests/FunctionalTests/HttpRetryProtocolTests.cs @@ -68,9 +68,11 @@ await server.AcceptConnectionAsync(async connection => [Fact] public async Task PostAsyncExpect100Continue_FailsAfterContentSendStarted_Throws() { - if (IsWinHttpHandler) + if (!UseSocketsHttpHandler) { // WinHttpHandler does not support Expect: 100-continue. + // And the test is expecting specific behaviors of how SocketsHttpHandler does pooling; + // it generally works on CurlHandler, but not always. return; } From ae3262aa29e860eaee9fc5d96eba539a3b4fe084 Mon Sep 17 00:00:00 2001 From: Stephen Toub Date: Thu, 9 May 2019 17:24:57 -0400 Subject: [PATCH 301/607] Move UseDefaultCredentials_SetToFalseAndServerNeedsAuth_StatusCodeUnauthorized test to OuterLoop (#37556) --- .../tests/FunctionalTests/HttpClientHandlerTest.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.cs b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.cs index 883db8bdb050..70ff0327f86b 100644 --- a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.cs +++ b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.cs @@ -183,6 +183,7 @@ public void MaxRequestContentBufferSize_SetInvalidValue_ThrowsArgumentOutOfRange } } + [OuterLoop("Uses external servers")] [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "UAP will send default credentials based on other criteria.")] [Theory] [InlineData(false)] From 7076e2b603c3ba8f22fdb802aa4b078296ecd6b3 Mon Sep 17 00:00:00 2001 From: Viktor Hofer Date: Thu, 9 May 2019 23:25:24 +0200 Subject: [PATCH 302/607] Use RetryHelper to harden flaky tests (#37560) --- .../tests/Helpers.cs | 27 +++++-------------- 1 file changed, 6 insertions(+), 21 deletions(-) diff --git a/src/System.Diagnostics.EventLog/tests/Helpers.cs b/src/System.Diagnostics.EventLog/tests/Helpers.cs index aa952343e487..183d29df9811 100644 --- a/src/System.Diagnostics.EventLog/tests/Helpers.cs +++ b/src/System.Diagnostics.EventLog/tests/Helpers.cs @@ -37,29 +37,14 @@ public static T RetryOnWin7(Func func) public static T RetryOnAllPlatforms(Func func) { - T entry = default(T); - int retries = 20; - while (retries > 0) + // Harden the tests increasing the retry count and the timeout. + T result = default; + RetryHelper.Execute(() => { - try - { - entry = func(); - retries = -1; - } - catch (Win32Exception) - { - Thread.Sleep(100); - retries--; - } - catch (ArgumentException) - { - Thread.Sleep(100); - retries--; - } - } + result = func(); + }, maxAttempts: 10, (iteration) => iteration * 300); - Assert.NotEqual(0, retries); - return entry; + return result; } public static void WaitForEventLog(EventLog eventLog, int entriesExpected) From f5bce3ac4ff76b0144571696cd3845d13adfce74 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Thu, 9 May 2019 15:12:56 -0700 Subject: [PATCH 303/607] [master] Update dependencies from dotnet/standard (#37571) * Update dependencies from https://github.com/dotnet/standard build 20190509.5 - NETStandard.Library - 2.1.0-prerelease.19259.5 * Update dependencies from https://github.com/dotnet/standard build 20190509.6 - NETStandard.Library - 2.1.0-prerelease.19259.6 --- eng/Version.Details.xml | 4 ++-- eng/Versions.props | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index c3712cdc23d6..4a8d28f1291e 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -38,9 +38,9 @@ https://github.com/dotnet/arcade a7a250e9c13147134543c35fef2fb81f19592edf - + https://github.com/dotnet/standard - e94d4263f03ced7269275c10a59d1dddb0c76b7c + a7b363dce648ea14f1b240b0253b7d944f4777e7 https://github.com/dotnet/arcade diff --git a/eng/Versions.props b/eng/Versions.props index 09436bf81c31..fbb1ee4f38c7 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -46,7 +46,7 @@ 3.0.0-preview6.19259.1 4.6.0-preview6.19259.1 - 2.1.0-prerelease.19230.1 + 2.1.0-prerelease.19259.6 99.99.99-master-20190509.1 From e3777f0513e9f1e4c26512f59e0d9bb9685679a7 Mon Sep 17 00:00:00 2001 From: dotnet-maestro <@dotnet-maestro> Date: Thu, 9 May 2019 22:53:03 +0000 Subject: [PATCH 304/607] Update dependencies from https://github.com/dotnet/standard build 20190509.7 - NETStandard.Library - 2.1.0-prerelease.19259.7 --- eng/Version.Details.xml | 4 ++-- eng/Versions.props | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 4a8d28f1291e..be321d910187 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -38,9 +38,9 @@ https://github.com/dotnet/arcade a7a250e9c13147134543c35fef2fb81f19592edf - + https://github.com/dotnet/standard - a7b363dce648ea14f1b240b0253b7d944f4777e7 + 013b89db06c1f331804d2c07c79c9b5192b3c5d7 https://github.com/dotnet/arcade diff --git a/eng/Versions.props b/eng/Versions.props index fbb1ee4f38c7..601d9958b524 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -46,7 +46,7 @@ 3.0.0-preview6.19259.1 4.6.0-preview6.19259.1 - 2.1.0-prerelease.19259.6 + 2.1.0-prerelease.19259.7 99.99.99-master-20190509.1 From 34a90650962f0a911b471584b5eeb9ba7de5581e Mon Sep 17 00:00:00 2001 From: Stephen Toub Date: Thu, 9 May 2019 12:40:16 -0400 Subject: [PATCH 305/607] Turn on nullability for all of Corelib (dotnet/coreclr#24497) * Enable nullable at the project level * Remove `#nullable enable` from individual files Removes `#nullable enable` from almost all .cs files in System.Private.CoreLib. I left it only in the ~30 files (out of ~1480 that had it) that are mirrored to corefx, that are built into projects by corefx that don't yet set NullableContextOptions at the project level, and that use nullable annotations; otherwise, they'd break the corefx build. Signed-off-by: dotnet-bot --- src/Common/src/CoreLib/Internal/IO/File.Unix.cs | 2 -- src/Common/src/CoreLib/Internal/IO/File.Windows.cs | 1 - src/Common/src/CoreLib/Internal/IO/File.cs | 1 - src/Common/src/CoreLib/Internal/Padding.cs | 1 - src/Common/src/CoreLib/Internal/Resources/PRIExceptionInfo.cs | 1 - .../Internal/Resources/WindowsRuntimeResourceManagerBase.cs | 1 - .../src/CoreLib/Internal/Runtime/CompilerServices/Unsafe.cs | 1 - .../CoreLib/Internal/Threading/Tasks/AsyncCausalitySupport.cs | 1 - src/Common/src/CoreLib/Internal/Win32/RegistryKey.cs | 1 - src/Common/src/CoreLib/Interop/Unix/Interop.Errors.cs | 1 - src/Common/src/CoreLib/Interop/Unix/Interop.Libraries.cs | 1 - .../Unix/System.Globalization.Native/Interop.Calendar.cs | 1 - .../Interop/Unix/System.Globalization.Native/Interop.Casing.cs | 1 - .../Unix/System.Globalization.Native/Interop.Collation.cs | 1 - .../Interop/Unix/System.Globalization.Native/Interop.ICU.cs | 1 - .../Interop/Unix/System.Globalization.Native/Interop.Idna.cs | 1 - .../Interop/Unix/System.Globalization.Native/Interop.Locale.cs | 1 - .../Unix/System.Globalization.Native/Interop.Normalization.cs | 1 - .../Unix/System.Globalization.Native/Interop.ResultCode.cs | 1 - .../Unix/System.Globalization.Native/Interop.TimeZoneInfo.cs | 1 - .../Interop/Unix/System.Globalization.Native/Interop.Utils.cs | 1 - .../src/CoreLib/Interop/Unix/System.Native/Interop.Access.cs | 1 - .../src/CoreLib/Interop/Unix/System.Native/Interop.ChDir.cs | 1 - .../src/CoreLib/Interop/Unix/System.Native/Interop.Close.cs | 1 - .../src/CoreLib/Interop/Unix/System.Native/Interop.FLock.cs | 1 - .../src/CoreLib/Interop/Unix/System.Native/Interop.FSync.cs | 1 - .../CoreLib/Interop/Unix/System.Native/Interop.FTruncate.cs | 1 - .../Interop/Unix/System.Native/Interop.GetCpuUtilization.cs | 1 - .../src/CoreLib/Interop/Unix/System.Native/Interop.GetCwd.cs | 1 - .../src/CoreLib/Interop/Unix/System.Native/Interop.GetEUid.cs | 1 - .../CoreLib/Interop/Unix/System.Native/Interop.GetHostName.cs | 1 - .../src/CoreLib/Interop/Unix/System.Native/Interop.GetPid.cs | 1 - .../src/CoreLib/Interop/Unix/System.Native/Interop.GetPwUid.cs | 1 - .../Interop/Unix/System.Native/Interop.GetRandomBytes.cs | 1 - .../Interop/Unix/System.Native/Interop.GetSystemTimeAsTicks.cs | 1 - .../CoreLib/Interop/Unix/System.Native/Interop.GetTimestamp.cs | 1 - .../CoreLib/Interop/Unix/System.Native/Interop.GetUnixName.cs | 1 - .../Interop/Unix/System.Native/Interop.GetUnixRelease.cs | 1 - .../src/CoreLib/Interop/Unix/System.Native/Interop.LSeek.cs | 1 - .../Interop/Unix/System.Native/Interop.LockFileRegion.cs | 1 - .../src/CoreLib/Interop/Unix/System.Native/Interop.MksTemps.cs | 1 - .../CoreLib/Interop/Unix/System.Native/Interop.MountPoints.cs | 1 - .../src/CoreLib/Interop/Unix/System.Native/Interop.Open.cs | 1 - .../CoreLib/Interop/Unix/System.Native/Interop.OpenFlags.cs | 1 - .../src/CoreLib/Interop/Unix/System.Native/Interop.PathConf.cs | 1 - .../CoreLib/Interop/Unix/System.Native/Interop.Permissions.cs | 1 - .../CoreLib/Interop/Unix/System.Native/Interop.PosixFAdvise.cs | 1 - .../src/CoreLib/Interop/Unix/System.Native/Interop.Read.cs | 1 - .../src/CoreLib/Interop/Unix/System.Native/Interop.ReadDir.cs | 1 - .../src/CoreLib/Interop/Unix/System.Native/Interop.ReadLink.cs | 2 +- .../src/CoreLib/Interop/Unix/System.Native/Interop.Stat.cs | 1 - .../src/CoreLib/Interop/Unix/System.Native/Interop.SysConf.cs | 1 - .../src/CoreLib/Interop/Unix/System.Native/Interop.SysLog.cs | 1 - .../src/CoreLib/Interop/Unix/System.Native/Interop.Unlink.cs | 1 - .../src/CoreLib/Interop/Unix/System.Native/Interop.Write.cs | 1 - .../Interop/Windows/Advapi32/Interop.ActivityControl.cs | 1 - .../Interop/Windows/Advapi32/Interop.EVENT_INFO_CLASS.cs | 1 - .../Interop/Windows/Advapi32/Interop.EtwEnableCallback.cs | 1 - .../Interop/Windows/Advapi32/Interop.EventActivityIdControl.cs | 1 - .../CoreLib/Interop/Windows/Advapi32/Interop.EventRegister.cs | 1 - .../Interop/Windows/Advapi32/Interop.EventSetInformation.cs | 1 - .../Interop/Windows/Advapi32/Interop.EventTraceGuidsEx.cs | 1 - .../Interop/Windows/Advapi32/Interop.EventUnregister.cs | 1 - .../Interop/Windows/Advapi32/Interop.EventWriteString.cs | 1 - .../Interop/Windows/Advapi32/Interop.EventWriteTransfer.cs | 1 - .../Interop/Windows/Advapi32/Interop.LookupAccountNameW.cs | 1 - .../CoreLib/Interop/Windows/Advapi32/Interop.RegCloseKey.cs | 1 - .../CoreLib/Interop/Windows/Advapi32/Interop.RegDeleteKeyEx.cs | 1 - .../CoreLib/Interop/Windows/Advapi32/Interop.RegFlushKey.cs | 1 - .../Interop/Windows/Advapi32/Interop.RegistryConstants.cs | 1 - .../Windows/BCrypt/Interop.BCryptGenRandom.GetRandomBytes.cs | 1 - .../CoreLib/Interop/Windows/BCrypt/Interop.BCryptGenRandom.cs | 1 - .../src/CoreLib/Interop/Windows/BCrypt/Interop.NTSTATUS.cs | 1 - .../Interop/Windows/Crypt32/Interop.CryptProtectMemory.cs | 1 - src/Common/src/CoreLib/Interop/Windows/Interop.BOOL.cs | 1 - src/Common/src/CoreLib/Interop/Windows/Interop.BOOLEAN.cs | 1 - src/Common/src/CoreLib/Interop/Windows/Interop.Errors.cs | 1 - src/Common/src/CoreLib/Interop/Windows/Interop.Libraries.cs | 1 - .../Kernel32/Interop.CREATEFILE2_EXTENDED_PARAMETERS.cs | 1 - .../src/CoreLib/Interop/Windows/Kernel32/Interop.CancelIoEx.cs | 1 - .../CoreLib/Interop/Windows/Kernel32/Interop.CloseHandle.cs | 1 - .../src/CoreLib/Interop/Windows/Kernel32/Interop.Constants.cs | 1 - .../src/CoreLib/Interop/Windows/Kernel32/Interop.CreateFile.cs | 1 - .../CoreLib/Interop/Windows/Kernel32/Interop.CreateFile2.cs | 1 - .../Interop/Windows/Kernel32/Interop.EventWaitHandle.cs | 1 - .../Windows/Kernel32/Interop.ExpandEnvironmentStrings.cs | 1 - .../Windows/Kernel32/Interop.FILE_INFO_BY_HANDLE_CLASS.cs | 1 - .../src/CoreLib/Interop/Windows/Kernel32/Interop.FILE_TIME.cs | 1 - .../CoreLib/Interop/Windows/Kernel32/Interop.FileAttributes.cs | 1 - .../Interop/Windows/Kernel32/Interop.FileTimeToSystemTime.cs | 1 - .../src/CoreLib/Interop/Windows/Kernel32/Interop.FileTypes.cs | 1 - .../src/CoreLib/Interop/Windows/Kernel32/Interop.FindClose.cs | 1 - .../Interop/Windows/Kernel32/Interop.FlushFileBuffers.cs | 1 - .../CoreLib/Interop/Windows/Kernel32/Interop.FormatMessage.cs | 1 - .../Interop/Windows/Kernel32/Interop.FreeEnvironmentStrings.cs | 1 - .../CoreLib/Interop/Windows/Kernel32/Interop.FreeLibrary.cs | 1 - .../Interop/Windows/Kernel32/Interop.GET_FILEEX_INFO_LEVELS.cs | 1 - .../src/CoreLib/Interop/Windows/Kernel32/Interop.GetCPInfo.cs | 1 - .../Interop/Windows/Kernel32/Interop.GetCurrentDirectory.cs | 1 - .../Interop/Windows/Kernel32/Interop.GetCurrentProcessId.cs | 1 - .../Windows/Kernel32/Interop.GetCurrentProcess_IntPtr.cs | 1 - .../Interop/Windows/Kernel32/Interop.GetCurrentThreadId.cs | 1 - .../Interop/Windows/Kernel32/Interop.GetEnvironmentStrings.cs | 1 - .../Interop/Windows/Kernel32/Interop.GetEnvironmentVariable.cs | 1 - .../Windows/Kernel32/Interop.GetFileInformationByHandleEx.cs | 1 - .../Interop/Windows/Kernel32/Interop.GetFileType_SafeHandle.cs | 1 - .../Interop/Windows/Kernel32/Interop.GetFullPathNameW.cs | 1 - .../Interop/Windows/Kernel32/Interop.GetLogicalDrives.cs | 1 - .../Interop/Windows/Kernel32/Interop.GetLongPathNameW.cs | 1 - .../Interop/Windows/Kernel32/Interop.GetProcessInformation.cs | 1 - .../Interop/Windows/Kernel32/Interop.GetProcessTimes.cs | 1 - .../CoreLib/Interop/Windows/Kernel32/Interop.GetStdHandle.cs | 1 - .../Interop/Windows/Kernel32/Interop.GetSystemDirectoryW.cs | 1 - .../CoreLib/Interop/Windows/Kernel32/Interop.GetSystemInfo.cs | 1 - .../CoreLib/Interop/Windows/Kernel32/Interop.GetSystemTime.cs | 1 - .../Windows/Kernel32/Interop.GetSystemTimeAsFileTime.cs | 1 - .../Windows/Kernel32/Interop.GetSystemTimePreciseAsFileTime.cs | 1 - .../CoreLib/Interop/Windows/Kernel32/Interop.GetSystemTimes.cs | 1 - .../Interop/Windows/Kernel32/Interop.GetTempFileNameW.cs | 1 - .../CoreLib/Interop/Windows/Kernel32/Interop.GetTempPathW.cs | 1 - .../CoreLib/Interop/Windows/Kernel32/Interop.GetVersionExW.cs | 1 - .../Interop/Windows/Kernel32/Interop.GlobalMemoryStatusEx.cs | 1 - .../CoreLib/Interop/Windows/Kernel32/Interop.Globalization.cs | 1 - .../CoreLib/Interop/Windows/Kernel32/Interop.HandleTypes.cs | 1 - .../Interop/Windows/Kernel32/Interop.IsWow64Process_IntPtr.cs | 1 - .../CoreLib/Interop/Windows/Kernel32/Interop.LoadLibraryEx.cs | 1 - .../src/CoreLib/Interop/Windows/Kernel32/Interop.LocalAlloc.cs | 1 - .../src/CoreLib/Interop/Windows/Kernel32/Interop.LockFile.cs | 1 - .../src/CoreLib/Interop/Windows/Kernel32/Interop.MAX_PATH.cs | 1 - .../CoreLib/Interop/Windows/Kernel32/Interop.MEMORYSTATUSEX.cs | 1 - .../Windows/Kernel32/Interop.MEMORY_BASIC_INFORMATION.cs | 1 - src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.MUI.cs | 1 - .../Interop/Windows/Kernel32/Interop.MultiByteToWideChar.cs | 1 - .../src/CoreLib/Interop/Windows/Kernel32/Interop.Mutex.cs | 1 - .../Interop/Windows/Kernel32/Interop.OSVERSIONINFOEX.cs | 1 - .../Interop/Windows/Kernel32/Interop.OutputDebugString.cs | 1 - .../Windows/Kernel32/Interop.QueryPerformanceCounter.cs | 1 - .../Windows/Kernel32/Interop.QueryPerformanceFrequency.cs | 1 - .../Windows/Kernel32/Interop.QueryUnbiasedInterruptTime.cs | 1 - .../Windows/Kernel32/Interop.ReadFile_SafeHandle_IntPtr.cs | 1 - .../Kernel32/Interop.ReadFile_SafeHandle_NativeOverlapped.cs | 1 - .../Interop/Windows/Kernel32/Interop.ResolveLocaleName.cs | 1 - .../Interop/Windows/Kernel32/Interop.SECURITY_ATTRIBUTES.cs | 1 - .../CoreLib/Interop/Windows/Kernel32/Interop.SYSTEM_INFO.cs | 1 - .../Interop/Windows/Kernel32/Interop.SecurityOptions.cs | 1 - .../src/CoreLib/Interop/Windows/Kernel32/Interop.Semaphore.cs | 1 - .../Interop/Windows/Kernel32/Interop.SetCurrentDirectory.cs | 1 - .../CoreLib/Interop/Windows/Kernel32/Interop.SetEndOfFile.cs | 1 - .../Interop/Windows/Kernel32/Interop.SetEnvironmentVariable.cs | 1 - .../Interop/Windows/Kernel32/Interop.SetFilePointerEx.cs | 1 - .../Interop/Windows/Kernel32/Interop.SetThreadErrorMode.cs | 1 - .../Interop/Windows/Kernel32/Interop.SystemTimeToFileTime.cs | 1 - .../Interop/Windows/Kernel32/Interop.TimeZone.Registry.cs | 1 - .../src/CoreLib/Interop/Windows/Kernel32/Interop.TimeZone.cs | 1 - .../Kernel32/Interop.TzSpecificLocalTimeToSystemTime.cs | 1 - .../Interop/Windows/Kernel32/Interop.VerSetConditionMask.cs | 1 - .../Interop/Windows/Kernel32/Interop.VerifyVersionExW.cs | 1 - .../CoreLib/Interop/Windows/Kernel32/Interop.VirtualAlloc.cs | 1 - .../CoreLib/Interop/Windows/Kernel32/Interop.VirtualFree.cs | 1 - .../CoreLib/Interop/Windows/Kernel32/Interop.VirtualQuery.cs | 1 - .../Windows/Kernel32/Interop.WIN32_FILE_ATTRIBUTE_DATA.cs | 1 - .../Interop/Windows/Kernel32/Interop.WIN32_FIND_DATA.cs | 1 - .../Interop/Windows/Kernel32/Interop.WideCharToMultiByte.cs | 1 - .../Windows/Kernel32/Interop.WriteFile_SafeHandle_IntPtr.cs | 1 - .../Kernel32/Interop.WriteFile_SafeHandle_NativeOverlapped.cs | 1 - .../src/CoreLib/Interop/Windows/Normaliz/Interop.Idna.cs | 1 - .../CoreLib/Interop/Windows/Normaliz/Interop.Normalization.cs | 1 - .../Interop/Windows/NtDll/Interop.NtQueryInformationFile.cs | 1 - .../Interop/Windows/NtDll/Interop.NtQuerySystemInformation.cs | 1 - .../src/CoreLib/Interop/Windows/Ole32/Interop.CoCreateGuid.cs | 1 - .../CoreLib/Interop/Windows/Ole32/Interop.CoTaskMemAlloc.cs | 1 - .../Interop/Windows/OleAut32/Interop.SysAllocStringByteLen.cs | 1 - .../Interop/Windows/OleAut32/Interop.SysAllocStringLen.cs | 1 - .../CoreLib/Interop/Windows/OleAut32/Interop.SysFreeString.cs | 1 - .../CoreLib/Interop/Windows/OleAut32/Interop.SysStringLen.cs | 1 - .../CoreLib/Interop/Windows/Secur32/Interop.GetUserNameExW.cs | 1 - .../Interop/Windows/Shell32/Interop.SHGetKnownFolderPath.cs | 1 - .../src/CoreLib/Interop/Windows/User32/Interop.Constants.cs | 1 - .../src/CoreLib/Interop/Windows/User32/Interop.LoadString.cs | 1 - .../Interop/Windows/User32/Interop.SendMessageTimeout.cs | 1 - .../Win32/SafeHandles/CriticalHandleMinusOneIsInvalid.cs | 1 - .../Win32/SafeHandles/CriticalHandleZeroOrMinusOneIsInvalid.cs | 1 - .../CoreLib/Microsoft/Win32/SafeHandles/SafeFileHandle.Unix.cs | 1 - .../Microsoft/Win32/SafeHandles/SafeFileHandle.Windows.cs | 1 - .../Microsoft/Win32/SafeHandles/SafeFindHandle.Windows.cs | 1 - .../Microsoft/Win32/SafeHandles/SafeHandleMinusOneIsInvalid.cs | 1 - .../Win32/SafeHandles/SafeHandleZeroOrMinusOneIsInvalid.cs | 1 - .../CoreLib/Microsoft/Win32/SafeHandles/SafeLibraryHandle.cs | 1 - .../Microsoft/Win32/SafeHandles/SafeRegistryHandle.Windows.cs | 1 - .../CoreLib/Microsoft/Win32/SafeHandles/SafeRegistryHandle.cs | 1 - .../Microsoft/Win32/SafeHandles/SafeWaitHandle.Windows.cs | 1 - .../src/CoreLib/Microsoft/Win32/SafeHandles/SafeWaitHandle.cs | 1 - src/Common/src/CoreLib/System.Private.CoreLib.Shared.projitems | 3 +++ src/Common/src/CoreLib/System/AccessViolationException.cs | 1 - src/Common/src/CoreLib/System/Action.cs | 1 - src/Common/src/CoreLib/System/Activator.RuntimeType.cs | 1 - src/Common/src/CoreLib/System/Activator.cs | 1 - src/Common/src/CoreLib/System/AggregateException.cs | 1 - src/Common/src/CoreLib/System/AppContext.cs | 1 - src/Common/src/CoreLib/System/AppDomain.cs | 1 - src/Common/src/CoreLib/System/AppDomainSetup.cs | 1 - src/Common/src/CoreLib/System/ApplicationException.cs | 1 - src/Common/src/CoreLib/System/ArgumentException.cs | 1 - src/Common/src/CoreLib/System/ArgumentNullException.cs | 1 - src/Common/src/CoreLib/System/ArgumentOutOfRangeException.cs | 1 - src/Common/src/CoreLib/System/ArithmeticException.cs | 1 - src/Common/src/CoreLib/System/Array.Enumerators.cs | 1 - src/Common/src/CoreLib/System/Array.cs | 1 - src/Common/src/CoreLib/System/ArraySegment.cs | 1 - src/Common/src/CoreLib/System/ArrayTypeMismatchException.cs | 1 - src/Common/src/CoreLib/System/AssemblyLoadEventArgs.cs | 1 - src/Common/src/CoreLib/System/AssemblyLoadEventHandler.cs | 1 - src/Common/src/CoreLib/System/AsyncCallback.cs | 1 - src/Common/src/CoreLib/System/Attribute.cs | 1 - src/Common/src/CoreLib/System/AttributeTargets.cs | 1 - src/Common/src/CoreLib/System/AttributeUsageAttribute.cs | 1 - src/Common/src/CoreLib/System/BadImageFormatException.cs | 1 - src/Common/src/CoreLib/System/BitConverter.cs | 1 - src/Common/src/CoreLib/System/Boolean.cs | 1 - src/Common/src/CoreLib/System/Buffer.Unix.cs | 1 - src/Common/src/CoreLib/System/Buffer.Windows.cs | 1 - src/Common/src/CoreLib/System/Buffer.cs | 1 - src/Common/src/CoreLib/System/Buffers/ArrayPool.cs | 1 - src/Common/src/CoreLib/System/Buffers/ArrayPoolEventSource.cs | 1 - src/Common/src/CoreLib/System/Buffers/Binary/Reader.cs | 1 - .../src/CoreLib/System/Buffers/Binary/ReaderBigEndian.cs | 1 - .../src/CoreLib/System/Buffers/Binary/ReaderLittleEndian.cs | 1 - .../src/CoreLib/System/Buffers/Binary/WriterBigEndian.cs | 1 - .../src/CoreLib/System/Buffers/Binary/WriterLittleEndian.cs | 1 - src/Common/src/CoreLib/System/Buffers/ConfigurableArrayPool.cs | 1 - src/Common/src/CoreLib/System/Buffers/IMemoryOwner.cs | 1 - src/Common/src/CoreLib/System/Buffers/IPinnable.cs | 1 - src/Common/src/CoreLib/System/Buffers/MemoryHandle.cs | 1 - src/Common/src/CoreLib/System/Buffers/MemoryManager.cs | 1 - src/Common/src/CoreLib/System/Buffers/OperationStatus.cs | 1 - src/Common/src/CoreLib/System/Buffers/StandardFormat.cs | 1 - .../System/Buffers/Text/FormattingHelpers.CountDigits.cs | 1 - src/Common/src/CoreLib/System/Buffers/Text/Utf8Constants.cs | 1 - .../System/Buffers/Text/Utf8Formatter/FormattingHelpers.cs | 1 - .../System/Buffers/Text/Utf8Formatter/Utf8Formatter.Boolean.cs | 1 - .../System/Buffers/Text/Utf8Formatter/Utf8Formatter.Date.G.cs | 1 - .../System/Buffers/Text/Utf8Formatter/Utf8Formatter.Date.L.cs | 1 - .../System/Buffers/Text/Utf8Formatter/Utf8Formatter.Date.O.cs | 1 - .../System/Buffers/Text/Utf8Formatter/Utf8Formatter.Date.R.cs | 1 - .../System/Buffers/Text/Utf8Formatter/Utf8Formatter.Date.cs | 1 - .../Buffers/Text/Utf8Formatter/Utf8Formatter.Decimal.E.cs | 1 - .../Buffers/Text/Utf8Formatter/Utf8Formatter.Decimal.F.cs | 1 - .../Buffers/Text/Utf8Formatter/Utf8Formatter.Decimal.G.cs | 1 - .../System/Buffers/Text/Utf8Formatter/Utf8Formatter.Decimal.cs | 1 - .../System/Buffers/Text/Utf8Formatter/Utf8Formatter.Float.cs | 1 - .../System/Buffers/Text/Utf8Formatter/Utf8Formatter.Guid.cs | 1 - .../Text/Utf8Formatter/Utf8Formatter.Integer.Signed.D.cs | 1 - .../Text/Utf8Formatter/Utf8Formatter.Integer.Signed.Default.cs | 1 - .../Text/Utf8Formatter/Utf8Formatter.Integer.Signed.N.cs | 1 - .../Buffers/Text/Utf8Formatter/Utf8Formatter.Integer.Signed.cs | 1 - .../Text/Utf8Formatter/Utf8Formatter.Integer.Unsigned.D.cs | 1 - .../Utf8Formatter/Utf8Formatter.Integer.Unsigned.Default.cs | 1 - .../Text/Utf8Formatter/Utf8Formatter.Integer.Unsigned.N.cs | 1 - .../Text/Utf8Formatter/Utf8Formatter.Integer.Unsigned.X.cs | 1 - .../Text/Utf8Formatter/Utf8Formatter.Integer.Unsigned.cs | 1 - .../System/Buffers/Text/Utf8Formatter/Utf8Formatter.Integer.cs | 1 - .../Buffers/Text/Utf8Formatter/Utf8Formatter.TimeSpan.cs | 1 - .../CoreLib/System/Buffers/Text/Utf8Parser/ParserHelpers.cs | 1 - .../System/Buffers/Text/Utf8Parser/Utf8Parser.Boolean.cs | 1 - .../System/Buffers/Text/Utf8Parser/Utf8Parser.Date.Default.cs | 1 - .../System/Buffers/Text/Utf8Parser/Utf8Parser.Date.G.cs | 1 - .../System/Buffers/Text/Utf8Parser/Utf8Parser.Date.Helpers.cs | 1 - .../System/Buffers/Text/Utf8Parser/Utf8Parser.Date.O.cs | 1 - .../System/Buffers/Text/Utf8Parser/Utf8Parser.Date.R.cs | 1 - .../CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Date.cs | 1 - .../System/Buffers/Text/Utf8Parser/Utf8Parser.Decimal.cs | 1 - .../CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Float.cs | 1 - .../CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Guid.cs | 1 - .../Buffers/Text/Utf8Parser/Utf8Parser.Integer.Signed.D.cs | 1 - .../Buffers/Text/Utf8Parser/Utf8Parser.Integer.Signed.N.cs | 1 - .../Buffers/Text/Utf8Parser/Utf8Parser.Integer.Signed.cs | 1 - .../Buffers/Text/Utf8Parser/Utf8Parser.Integer.Unsigned.D.cs | 1 - .../Buffers/Text/Utf8Parser/Utf8Parser.Integer.Unsigned.N.cs | 1 - .../Buffers/Text/Utf8Parser/Utf8Parser.Integer.Unsigned.X.cs | 1 - .../Buffers/Text/Utf8Parser/Utf8Parser.Integer.Unsigned.cs | 1 - .../System/Buffers/Text/Utf8Parser/Utf8Parser.Number.cs | 1 - .../System/Buffers/Text/Utf8Parser/Utf8Parser.TimeSpan.BigG.cs | 1 - .../System/Buffers/Text/Utf8Parser/Utf8Parser.TimeSpan.C.cs | 1 - .../Buffers/Text/Utf8Parser/Utf8Parser.TimeSpan.LittleG.cs | 1 - .../System/Buffers/Text/Utf8Parser/Utf8Parser.TimeSpan.cs | 1 - .../Buffers/Text/Utf8Parser/Utf8Parser.TimeSpanSplitter.cs | 1 - .../System/Buffers/TlsOverPerCoreLockedStacksArrayPool.cs | 1 - src/Common/src/CoreLib/System/Buffers/Utilities.cs | 1 - src/Common/src/CoreLib/System/ByReference.cs | 1 - src/Common/src/CoreLib/System/Byte.cs | 1 - src/Common/src/CoreLib/System/CLSCompliantAttribute.cs | 1 - .../src/CoreLib/System/CannotUnloadAppDomainException.cs | 1 - src/Common/src/CoreLib/System/Char.cs | 1 - src/Common/src/CoreLib/System/CharEnumerator.cs | 1 - src/Common/src/CoreLib/System/Collections/ArrayList.cs | 1 - src/Common/src/CoreLib/System/Collections/Comparer.cs | 1 - .../CoreLib/System/Collections/Concurrent/ConcurrentQueue.cs | 1 - .../Collections/Concurrent/IProducerConsumerCollection.cs | 1 - .../Concurrent/IProducerConsumerCollectionDebugView.cs | 1 - src/Common/src/CoreLib/System/Collections/DictionaryEntry.cs | 1 - .../src/CoreLib/System/Collections/Generic/ArraySortHelper.cs | 1 - src/Common/src/CoreLib/System/Collections/Generic/Comparer.cs | 1 - .../src/CoreLib/System/Collections/Generic/Dictionary.cs | 1 - .../src/CoreLib/System/Collections/Generic/EqualityComparer.cs | 1 - .../src/CoreLib/System/Collections/Generic/IAsyncEnumerable.cs | 1 - .../src/CoreLib/System/Collections/Generic/IAsyncEnumerator.cs | 1 - .../src/CoreLib/System/Collections/Generic/ICollection.cs | 1 - .../CoreLib/System/Collections/Generic/ICollectionDebugView.cs | 1 - src/Common/src/CoreLib/System/Collections/Generic/IComparer.cs | 1 - .../src/CoreLib/System/Collections/Generic/IDictionary.cs | 1 - .../CoreLib/System/Collections/Generic/IDictionaryDebugView.cs | 1 - .../src/CoreLib/System/Collections/Generic/IEnumerable.cs | 1 - .../src/CoreLib/System/Collections/Generic/IEnumerator.cs | 1 - .../CoreLib/System/Collections/Generic/IEqualityComparer.cs | 1 - src/Common/src/CoreLib/System/Collections/Generic/IList.cs | 1 - .../CoreLib/System/Collections/Generic/IReadOnlyCollection.cs | 1 - .../CoreLib/System/Collections/Generic/IReadOnlyDictionary.cs | 1 - .../src/CoreLib/System/Collections/Generic/IReadOnlyList.cs | 1 - .../CoreLib/System/Collections/Generic/KeyNotFoundException.cs | 1 - .../src/CoreLib/System/Collections/Generic/KeyValuePair.cs | 1 - src/Common/src/CoreLib/System/Collections/Generic/List.cs | 1 - .../Collections/Generic/NonRandomizedStringEqualityComparer.cs | 1 - .../System/Collections/HashHelpers.SerializationInfoTable.cs | 1 - src/Common/src/CoreLib/System/Collections/HashHelpers.cs | 1 - src/Common/src/CoreLib/System/Collections/Hashtable.cs | 1 - src/Common/src/CoreLib/System/Collections/ICollection.cs | 1 - src/Common/src/CoreLib/System/Collections/IComparer.cs | 1 - src/Common/src/CoreLib/System/Collections/IDictionary.cs | 2 -- .../src/CoreLib/System/Collections/IDictionaryEnumerator.cs | 1 - src/Common/src/CoreLib/System/Collections/IEnumerable.cs | 1 - src/Common/src/CoreLib/System/Collections/IEnumerator.cs | 1 - src/Common/src/CoreLib/System/Collections/IEqualityComparer.cs | 1 - src/Common/src/CoreLib/System/Collections/IHashCodeProvider.cs | 1 - src/Common/src/CoreLib/System/Collections/IList.cs | 1 - .../src/CoreLib/System/Collections/IStructuralComparable.cs | 1 - .../src/CoreLib/System/Collections/IStructuralEquatable.cs | 1 - src/Common/src/CoreLib/System/Collections/KeyValuePairs.cs | 2 +- .../src/CoreLib/System/Collections/ListDictionaryInternal.cs | 1 - .../src/CoreLib/System/Collections/ObjectModel/Collection.cs | 1 - .../System/Collections/ObjectModel/ReadOnlyCollection.cs | 1 - .../src/CoreLib/System/ComponentModel/DefaultValueAttribute.cs | 1 - .../CoreLib/System/ComponentModel/EditorBrowsableAttribute.cs | 1 - .../src/CoreLib/System/ComponentModel/EditorBrowsableState.cs | 1 - src/Common/src/CoreLib/System/Convert.Base64.cs | 1 - src/Common/src/CoreLib/System/Convert.cs | 1 - src/Common/src/CoreLib/System/CoreLib.cs | 1 - src/Common/src/CoreLib/System/CurrentSystemTimeZone.cs | 1 - src/Common/src/CoreLib/System/DBNull.cs | 1 - src/Common/src/CoreLib/System/DataMisalignedException.cs | 1 - src/Common/src/CoreLib/System/DateTime.Unix.cs | 1 - src/Common/src/CoreLib/System/DateTime.Win32.cs | 1 - src/Common/src/CoreLib/System/DateTime.WinRT.cs | 1 - src/Common/src/CoreLib/System/DateTime.Windows.cs | 1 - src/Common/src/CoreLib/System/DateTime.cs | 1 - src/Common/src/CoreLib/System/DateTimeKind.cs | 1 - src/Common/src/CoreLib/System/DateTimeOffset.cs | 1 - src/Common/src/CoreLib/System/DayOfWeek.cs | 1 - src/Common/src/CoreLib/System/Decimal.DecCalc.cs | 1 - src/Common/src/CoreLib/System/Decimal.cs | 1 - src/Common/src/CoreLib/System/DefaultBinder.cs | 1 - src/Common/src/CoreLib/System/Delegate.cs | 1 - .../Diagnostics/CodeAnalysis/SuppressMessageAttribute.cs | 1 - .../src/CoreLib/System/Diagnostics/ConditionalAttribute.cs | 1 - .../CoreLib/System/Diagnostics/Contracts/ContractException.cs | 1 - .../System/Diagnostics/Contracts/ContractFailedEventArgs.cs | 1 - .../src/CoreLib/System/Diagnostics/Contracts/Contracts.cs | 1 - src/Common/src/CoreLib/System/Diagnostics/Debug.cs | 1 - .../src/CoreLib/System/Diagnostics/DebugProvider.Unix.cs | 1 - .../src/CoreLib/System/Diagnostics/DebugProvider.Windows.cs | 2 -- src/Common/src/CoreLib/System/Diagnostics/DebugProvider.cs | 1 - .../src/CoreLib/System/Diagnostics/DebuggableAttribute.cs | 2 -- .../CoreLib/System/Diagnostics/DebuggerBrowsableAttribute.cs | 2 -- .../src/CoreLib/System/Diagnostics/DebuggerDisplayAttribute.cs | 2 -- .../src/CoreLib/System/Diagnostics/DebuggerHiddenAttribute.cs | 2 -- .../CoreLib/System/Diagnostics/DebuggerNonUserCodeAttribute.cs | 2 -- .../CoreLib/System/Diagnostics/DebuggerStepThroughAttribute.cs | 2 -- .../System/Diagnostics/DebuggerStepperBoundaryAttribute.cs | 2 -- .../CoreLib/System/Diagnostics/DebuggerTypeProxyAttribute.cs | 2 -- .../CoreLib/System/Diagnostics/DebuggerVisualizerAttribute.cs | 2 -- src/Common/src/CoreLib/System/Diagnostics/StackFrame.cs | 1 - src/Common/src/CoreLib/System/Diagnostics/StackTrace.cs | 1 - .../CoreLib/System/Diagnostics/StackTraceHiddenAttribute.cs | 2 -- .../System/Diagnostics/SymbolStore/ISymbolDocumentWriter.cs | 1 - .../src/CoreLib/System/Diagnostics/Tracing/ActivityTracker.cs | 1 - .../src/CoreLib/System/Diagnostics/Tracing/CounterGroup.cs | 1 - .../src/CoreLib/System/Diagnostics/Tracing/CounterPayload.cs | 1 - .../CoreLib/System/Diagnostics/Tracing/DiagnosticCounter.cs | 1 - .../src/CoreLib/System/Diagnostics/Tracing/EventCounter.cs | 1 - .../src/CoreLib/System/Diagnostics/Tracing/EventDescriptor.cs | 1 - .../src/CoreLib/System/Diagnostics/Tracing/EventProvider.cs | 1 - .../src/CoreLib/System/Diagnostics/Tracing/EventSource.cs | 1 - .../CoreLib/System/Diagnostics/Tracing/EventSourceException.cs | 1 - .../CoreLib/System/Diagnostics/Tracing/FrameworkEventSource.cs | 1 - .../src/CoreLib/System/Diagnostics/Tracing/IEventProvider.cs | 1 - .../System/Diagnostics/Tracing/IncrementingEventCounter.cs | 1 - .../System/Diagnostics/Tracing/IncrementingPollingCounter.cs | 1 - .../src/CoreLib/System/Diagnostics/Tracing/PollingCounter.cs | 1 - .../src/CoreLib/System/Diagnostics/Tracing/StubEnvironment.cs | 1 - .../System/Diagnostics/Tracing/TraceLogging/ArrayTypeInfo.cs | 1 - .../System/Diagnostics/Tracing/TraceLogging/ConcurrentSet.cs | 1 - .../Diagnostics/Tracing/TraceLogging/ConcurrentSetItem.cs | 1 - .../System/Diagnostics/Tracing/TraceLogging/DataCollector.cs | 1 - .../System/Diagnostics/Tracing/TraceLogging/EmptyStruct.cs | 1 - .../System/Diagnostics/Tracing/TraceLogging/EnumHelper.cs | 1 - .../Diagnostics/Tracing/TraceLogging/EnumerableTypeInfo.cs | 1 - .../Diagnostics/Tracing/TraceLogging/EventDataAttribute.cs | 1 - .../Diagnostics/Tracing/TraceLogging/EventFieldAttribute.cs | 1 - .../Diagnostics/Tracing/TraceLogging/EventIgnoreAttribute.cs | 1 - .../System/Diagnostics/Tracing/TraceLogging/EventPayload.cs | 1 - .../Diagnostics/Tracing/TraceLogging/EventSourceActivity.cs | 1 - .../Diagnostics/Tracing/TraceLogging/EventSourceOptions.cs | 1 - .../System/Diagnostics/Tracing/TraceLogging/FieldMetadata.cs | 1 - .../System/Diagnostics/Tracing/TraceLogging/InvokeTypeInfo.cs | 1 - .../System/Diagnostics/Tracing/TraceLogging/NameInfo.cs | 1 - .../Diagnostics/Tracing/TraceLogging/PropertyAnalysis.cs | 1 - .../System/Diagnostics/Tracing/TraceLogging/PropertyValue.cs | 1 - .../Diagnostics/Tracing/TraceLogging/SimpleEventTypes.cs | 1 - .../System/Diagnostics/Tracing/TraceLogging/SimpleTypeInfos.cs | 1 - .../CoreLib/System/Diagnostics/Tracing/TraceLogging/Statics.cs | 1 - .../Tracing/TraceLogging/TraceLoggingDataCollector.cs | 1 - .../Tracing/TraceLogging/TraceLoggingEventSource.cs | 1 - .../Diagnostics/Tracing/TraceLogging/TraceLoggingEventTypes.cs | 1 - .../Tracing/TraceLogging/TraceLoggingMetadataCollector.cs | 1 - .../Diagnostics/Tracing/TraceLogging/TraceLoggingTypeInfo.cs | 1 - .../System/Diagnostics/Tracing/TraceLogging/TypeAnalysis.cs | 1 - src/Common/src/CoreLib/System/Diagnostics/Tracing/Winmeta.cs | 1 - src/Common/src/CoreLib/System/DivideByZeroException.cs | 1 - src/Common/src/CoreLib/System/DllNotFoundException.cs | 1 - src/Common/src/CoreLib/System/Double.cs | 1 - src/Common/src/CoreLib/System/DuplicateWaitObjectException.cs | 1 - src/Common/src/CoreLib/System/Empty.cs | 1 - src/Common/src/CoreLib/System/EntryPointNotFoundException.cs | 1 - src/Common/src/CoreLib/System/Enum.cs | 1 - src/Common/src/CoreLib/System/Environment.NoRegistry.cs | 1 - src/Common/src/CoreLib/System/Environment.SpecialFolder.cs | 1 - .../src/CoreLib/System/Environment.SpecialFolderOption.cs | 1 - src/Common/src/CoreLib/System/Environment.Unix.cs | 1 - src/Common/src/CoreLib/System/Environment.Variables.Windows.cs | 1 - src/Common/src/CoreLib/System/Environment.Win32.cs | 1 - src/Common/src/CoreLib/System/Environment.WinRT.cs | 1 - src/Common/src/CoreLib/System/Environment.Windows.cs | 1 - src/Common/src/CoreLib/System/Environment.cs | 1 - src/Common/src/CoreLib/System/EnvironmentVariableTarget.cs | 1 - src/Common/src/CoreLib/System/EventArgs.cs | 1 - src/Common/src/CoreLib/System/EventHandler.cs | 1 - src/Common/src/CoreLib/System/Exception.cs | 1 - src/Common/src/CoreLib/System/ExecutionEngineException.cs | 1 - src/Common/src/CoreLib/System/FieldAccessException.cs | 1 - src/Common/src/CoreLib/System/FlagsAttribute.cs | 1 - src/Common/src/CoreLib/System/FormatException.cs | 1 - src/Common/src/CoreLib/System/FormattableString.cs | 1 - src/Common/src/CoreLib/System/GCMemoryInfo.cs | 1 - src/Common/src/CoreLib/System/Gen2GcCallback.cs | 1 - src/Common/src/CoreLib/System/Globalization/Calendar.cs | 1 - .../src/CoreLib/System/Globalization/CalendarData.Unix.cs | 1 - .../src/CoreLib/System/Globalization/CalendarData.Windows.cs | 1 - src/Common/src/CoreLib/System/Globalization/CalendarData.cs | 1 - .../System/Globalization/CalendricalCalculationsHelper.cs | 1 - src/Common/src/CoreLib/System/Globalization/CharUnicodeInfo.cs | 1 - .../src/CoreLib/System/Globalization/CharUnicodeInfoData.cs | 1 - .../CoreLib/System/Globalization/ChineseLunisolarCalendar.cs | 1 - .../src/CoreLib/System/Globalization/CompareInfo.Invariant.cs | 1 - .../src/CoreLib/System/Globalization/CompareInfo.Unix.cs | 1 - .../src/CoreLib/System/Globalization/CompareInfo.Windows.cs | 1 - src/Common/src/CoreLib/System/Globalization/CompareInfo.cs | 1 - .../src/CoreLib/System/Globalization/CultureData.Unix.cs | 1 - .../src/CoreLib/System/Globalization/CultureData.Windows.cs | 1 - src/Common/src/CoreLib/System/Globalization/CultureData.cs | 1 - .../src/CoreLib/System/Globalization/CultureInfo.Unix.cs | 1 - .../src/CoreLib/System/Globalization/CultureInfo.Windows.cs | 1 - src/Common/src/CoreLib/System/Globalization/CultureInfo.cs | 1 - .../CoreLib/System/Globalization/CultureNotFoundException.cs | 1 - src/Common/src/CoreLib/System/Globalization/DateTimeFormat.cs | 1 - .../src/CoreLib/System/Globalization/DateTimeFormatInfo.cs | 1 - .../CoreLib/System/Globalization/DateTimeFormatInfoScanner.cs | 1 - src/Common/src/CoreLib/System/Globalization/DateTimeParse.cs | 1 - src/Common/src/CoreLib/System/Globalization/DaylightTime.cs | 1 - .../CoreLib/System/Globalization/EastAsianLunisolarCalendar.cs | 1 - .../CoreLib/System/Globalization/GlobalizationExtensions.cs | 1 - .../src/CoreLib/System/Globalization/GregorianCalendar.cs | 1 - .../CoreLib/System/Globalization/GregorianCalendarHelper.cs | 1 - src/Common/src/CoreLib/System/Globalization/HebrewCalendar.cs | 1 - src/Common/src/CoreLib/System/Globalization/HebrewNumber.cs | 1 - .../src/CoreLib/System/Globalization/HijriCalendar.Unix.cs | 1 - .../src/CoreLib/System/Globalization/HijriCalendar.Win32.cs | 1 - .../src/CoreLib/System/Globalization/HijriCalendar.WinRT.cs | 1 - src/Common/src/CoreLib/System/Globalization/HijriCalendar.cs | 1 - src/Common/src/CoreLib/System/Globalization/ISOWeek.cs | 1 - src/Common/src/CoreLib/System/Globalization/IdnMapping.Unix.cs | 1 - .../src/CoreLib/System/Globalization/IdnMapping.Windows.cs | 1 - src/Common/src/CoreLib/System/Globalization/IdnMapping.cs | 1 - .../System/Globalization/InternalGlobalizationHelper.cs | 1 - .../src/CoreLib/System/Globalization/JapaneseCalendar.Unix.cs | 1 - .../src/CoreLib/System/Globalization/JapaneseCalendar.Win32.cs | 1 - .../src/CoreLib/System/Globalization/JapaneseCalendar.WinRT.cs | 1 - .../src/CoreLib/System/Globalization/JapaneseCalendar.cs | 1 - .../CoreLib/System/Globalization/JapaneseLunisolarCalendar.cs | 1 - src/Common/src/CoreLib/System/Globalization/JulianCalendar.cs | 1 - src/Common/src/CoreLib/System/Globalization/KoreanCalendar.cs | 1 - .../CoreLib/System/Globalization/KoreanLunisolarCalendar.cs | 1 - src/Common/src/CoreLib/System/Globalization/LocaleData.Unix.cs | 1 - .../src/CoreLib/System/Globalization/Normalization.Unix.cs | 1 - .../src/CoreLib/System/Globalization/Normalization.Windows.cs | 1 - .../src/CoreLib/System/Globalization/NumberFormatInfo.cs | 1 - src/Common/src/CoreLib/System/Globalization/PersianCalendar.cs | 1 - src/Common/src/CoreLib/System/Globalization/RegionInfo.cs | 1 - src/Common/src/CoreLib/System/Globalization/SortKey.cs | 1 - src/Common/src/CoreLib/System/Globalization/SortVersion.cs | 1 - src/Common/src/CoreLib/System/Globalization/StringInfo.cs | 1 - src/Common/src/CoreLib/System/Globalization/TaiwanCalendar.cs | 1 - .../CoreLib/System/Globalization/TaiwanLunisolarCalendar.cs | 1 - .../src/CoreLib/System/Globalization/TextElementEnumerator.cs | 1 - src/Common/src/CoreLib/System/Globalization/TextInfo.Unix.cs | 1 - .../src/CoreLib/System/Globalization/TextInfo.Windows.cs | 1 - src/Common/src/CoreLib/System/Globalization/TextInfo.cs | 1 - .../src/CoreLib/System/Globalization/ThaiBuddhistCalendar.cs | 1 - src/Common/src/CoreLib/System/Globalization/TimeSpanFormat.cs | 1 - src/Common/src/CoreLib/System/Globalization/TimeSpanParse.cs | 1 - .../src/CoreLib/System/Globalization/UmAlQuraCalendar.cs | 1 - src/Common/src/CoreLib/System/Guid.Unix.cs | 1 - src/Common/src/CoreLib/System/Guid.Windows.cs | 1 - src/Common/src/CoreLib/System/Guid.cs | 1 - src/Common/src/CoreLib/System/HResults.cs | 1 - src/Common/src/CoreLib/System/HashCode.cs | 1 - src/Common/src/CoreLib/System/IAsyncDisposable.cs | 1 - src/Common/src/CoreLib/System/IAsyncResult.cs | 1 - src/Common/src/CoreLib/System/ICloneable.cs | 1 - src/Common/src/CoreLib/System/IComparable.cs | 1 - src/Common/src/CoreLib/System/IConvertible.cs | 1 - src/Common/src/CoreLib/System/ICustomFormatter.cs | 1 - src/Common/src/CoreLib/System/IDisposable.cs | 1 - src/Common/src/CoreLib/System/IEquatable.cs | 1 - src/Common/src/CoreLib/System/IFormatProvider.cs | 1 - src/Common/src/CoreLib/System/IFormattable.cs | 1 - src/Common/src/CoreLib/System/IO/BinaryReader.cs | 1 - src/Common/src/CoreLib/System/IO/BinaryWriter.cs | 1 - src/Common/src/CoreLib/System/IO/DirectoryNotFoundException.cs | 1 - .../src/CoreLib/System/IO/DisableMediaInsertionPrompt.cs | 1 - src/Common/src/CoreLib/System/IO/DriveInfoInternal.Unix.cs | 1 - src/Common/src/CoreLib/System/IO/EncodingCache.cs | 1 - src/Common/src/CoreLib/System/IO/EndOfStreamException.cs | 1 - src/Common/src/CoreLib/System/IO/Error.cs | 1 - src/Common/src/CoreLib/System/IO/FileAccess.cs | 1 - src/Common/src/CoreLib/System/IO/FileLoadException.cs | 1 - src/Common/src/CoreLib/System/IO/FileMode.cs | 1 - src/Common/src/CoreLib/System/IO/FileNotFoundException.cs | 1 - src/Common/src/CoreLib/System/IO/FileOptions.cs | 1 - src/Common/src/CoreLib/System/IO/FileShare.cs | 1 - src/Common/src/CoreLib/System/IO/FileStream.Linux.cs | 1 - src/Common/src/CoreLib/System/IO/FileStream.OSX.cs | 1 - src/Common/src/CoreLib/System/IO/FileStream.Unix.cs | 1 - src/Common/src/CoreLib/System/IO/FileStream.Win32.cs | 1 - src/Common/src/CoreLib/System/IO/FileStream.WinRT.cs | 1 - src/Common/src/CoreLib/System/IO/FileStream.Windows.cs | 1 - src/Common/src/CoreLib/System/IO/FileStream.cs | 1 - .../src/CoreLib/System/IO/FileStreamCompletionSource.Win32.cs | 1 - src/Common/src/CoreLib/System/IO/IOException.cs | 1 - src/Common/src/CoreLib/System/IO/MemoryStream.cs | 1 - src/Common/src/CoreLib/System/IO/Path.Unix.cs | 1 - src/Common/src/CoreLib/System/IO/Path.Windows.cs | 1 - src/Common/src/CoreLib/System/IO/Path.cs | 1 - src/Common/src/CoreLib/System/IO/PathHelper.Windows.cs | 1 - src/Common/src/CoreLib/System/IO/PathInternal.cs | 1 - src/Common/src/CoreLib/System/IO/PathTooLongException.cs | 1 - src/Common/src/CoreLib/System/IO/PersistedFiles.Names.Unix.cs | 1 - src/Common/src/CoreLib/System/IO/PinnedBufferMemoryStream.cs | 1 - src/Common/src/CoreLib/System/IO/SeekOrigin.cs | 1 - src/Common/src/CoreLib/System/IO/Stream.cs | 1 - .../src/CoreLib/System/IO/StreamHelpers.CopyValidation.cs | 1 - src/Common/src/CoreLib/System/IO/StreamReader.cs | 1 - src/Common/src/CoreLib/System/IO/StreamWriter.cs | 1 - src/Common/src/CoreLib/System/IO/TextReader.cs | 1 - src/Common/src/CoreLib/System/IO/TextWriter.cs | 1 - src/Common/src/CoreLib/System/IO/UnmanagedMemoryAccessor.cs | 1 - src/Common/src/CoreLib/System/IO/UnmanagedMemoryStream.cs | 1 - .../src/CoreLib/System/IO/UnmanagedMemoryStreamWrapper.cs | 1 - src/Common/src/CoreLib/System/IObservable.cs | 1 - src/Common/src/CoreLib/System/IObserver.cs | 1 - src/Common/src/CoreLib/System/IProgress.cs | 1 - src/Common/src/CoreLib/System/ISpanFormattable.cs | 1 - src/Common/src/CoreLib/System/Index.cs | 1 - src/Common/src/CoreLib/System/IndexOutOfRangeException.cs | 1 - .../src/CoreLib/System/InsufficientExecutionStackException.cs | 1 - src/Common/src/CoreLib/System/InsufficientMemoryException.cs | 1 - src/Common/src/CoreLib/System/Int16.cs | 1 - src/Common/src/CoreLib/System/Int32.cs | 1 - src/Common/src/CoreLib/System/Int64.cs | 1 - src/Common/src/CoreLib/System/IntPtr.cs | 1 - src/Common/src/CoreLib/System/InvalidCastException.cs | 1 - src/Common/src/CoreLib/System/InvalidOperationException.cs | 1 - src/Common/src/CoreLib/System/InvalidProgramException.cs | 1 - src/Common/src/CoreLib/System/InvalidTimeZoneException.cs | 1 - src/Common/src/CoreLib/System/Lazy.cs | 1 - .../src/CoreLib/System/LocalAppContextSwitches.Common.cs | 1 - src/Common/src/CoreLib/System/LocalAppContextSwitches.cs | 1 - src/Common/src/CoreLib/System/LocalDataStoreSlot.cs | 1 - src/Common/src/CoreLib/System/MarshalByRefObject.cs | 1 - src/Common/src/CoreLib/System/Marvin.OrdinalIgnoreCase.cs | 1 - src/Common/src/CoreLib/System/Marvin.cs | 1 - src/Common/src/CoreLib/System/Math.cs | 1 - src/Common/src/CoreLib/System/MathF.cs | 1 - src/Common/src/CoreLib/System/MemberAccessException.cs | 1 - src/Common/src/CoreLib/System/Memory.cs | 1 - src/Common/src/CoreLib/System/MemoryDebugView.cs | 1 - src/Common/src/CoreLib/System/MemoryExtensions.Fast.cs | 1 - src/Common/src/CoreLib/System/MemoryExtensions.Trim.cs | 1 - src/Common/src/CoreLib/System/MemoryExtensions.cs | 1 - src/Common/src/CoreLib/System/MethodAccessException.cs | 1 - src/Common/src/CoreLib/System/MidpointRounding.cs | 1 - src/Common/src/CoreLib/System/MissingFieldException.cs | 1 - src/Common/src/CoreLib/System/MissingMemberException.cs | 1 - src/Common/src/CoreLib/System/MissingMethodException.cs | 1 - .../src/CoreLib/System/MulticastNotSupportedException.cs | 1 - src/Common/src/CoreLib/System/NonSerializedAttribute.cs | 1 - src/Common/src/CoreLib/System/NotFiniteNumberException.cs | 1 - src/Common/src/CoreLib/System/NotImplementedException.cs | 1 - src/Common/src/CoreLib/System/NotSupportedException.cs | 1 - src/Common/src/CoreLib/System/NullReferenceException.cs | 1 - src/Common/src/CoreLib/System/Nullable.cs | 1 - src/Common/src/CoreLib/System/Number.BigInteger.cs | 1 - src/Common/src/CoreLib/System/Number.DiyFp.cs | 1 - src/Common/src/CoreLib/System/Number.Dragon4.cs | 1 - src/Common/src/CoreLib/System/Number.Formatting.cs | 1 - src/Common/src/CoreLib/System/Number.Grisu3.cs | 1 - src/Common/src/CoreLib/System/Number.NumberBuffer.cs | 1 - .../src/CoreLib/System/Number.NumberToFloatingPointBits.cs | 1 - src/Common/src/CoreLib/System/Number.Parsing.cs | 1 - src/Common/src/CoreLib/System/Numerics/BitOperations.cs | 1 - src/Common/src/CoreLib/System/Numerics/ConstantHelper.cs | 1 - src/Common/src/CoreLib/System/Numerics/Hashing/HashHelpers.cs | 1 - src/Common/src/CoreLib/System/Numerics/Register.cs | 1 - src/Common/src/CoreLib/System/Numerics/Vector.cs | 1 - src/Common/src/CoreLib/System/Numerics/Vector_Operations.cs | 1 - src/Common/src/CoreLib/System/Object.cs | 1 - src/Common/src/CoreLib/System/ObjectDisposedException.cs | 1 - src/Common/src/CoreLib/System/ObsoleteAttribute.cs | 1 - src/Common/src/CoreLib/System/OperatingSystem.cs | 1 - src/Common/src/CoreLib/System/OperationCanceledException.cs | 1 - src/Common/src/CoreLib/System/OutOfMemoryException.cs | 1 - src/Common/src/CoreLib/System/OverflowException.cs | 1 - src/Common/src/CoreLib/System/ParamArrayAttribute.cs | 1 - src/Common/src/CoreLib/System/ParamsArray.cs | 1 - src/Common/src/CoreLib/System/ParseNumbers.cs | 1 - src/Common/src/CoreLib/System/PasteArguments.Unix.cs | 1 - src/Common/src/CoreLib/System/PasteArguments.Windows.cs | 1 - src/Common/src/CoreLib/System/PasteArguments.cs | 1 - src/Common/src/CoreLib/System/PlatformID.cs | 1 - src/Common/src/CoreLib/System/PlatformNotSupportedException.cs | 1 - src/Common/src/CoreLib/System/Progress.cs | 1 - src/Common/src/CoreLib/System/Random.cs | 1 - src/Common/src/CoreLib/System/Range.cs | 1 - src/Common/src/CoreLib/System/RankException.cs | 1 - src/Common/src/CoreLib/System/ReadOnlyMemory.cs | 1 - src/Common/src/CoreLib/System/ReadOnlySpan.Fast.cs | 1 - src/Common/src/CoreLib/System/ReadOnlySpan.cs | 1 - .../src/CoreLib/System/Reflection/AmbiguousMatchException.cs | 1 - src/Common/src/CoreLib/System/Reflection/Assembly.cs | 1 - .../CoreLib/System/Reflection/AssemblyAlgorithmIdAttribute.cs | 1 - .../src/CoreLib/System/Reflection/AssemblyCompanyAttribute.cs | 1 - .../System/Reflection/AssemblyConfigurationAttribute.cs | 1 - .../src/CoreLib/System/Reflection/AssemblyContentType.cs | 1 - .../CoreLib/System/Reflection/AssemblyCopyrightAttribute.cs | 1 - .../src/CoreLib/System/Reflection/AssemblyCultureAttribute.cs | 1 - .../CoreLib/System/Reflection/AssemblyDefaultAliasAttribute.cs | 1 - .../CoreLib/System/Reflection/AssemblyDelaySignAttribute.cs | 1 - .../CoreLib/System/Reflection/AssemblyDescriptionAttribute.cs | 1 - .../CoreLib/System/Reflection/AssemblyFileVersionAttribute.cs | 1 - .../src/CoreLib/System/Reflection/AssemblyFlagsAttribute.cs | 1 - .../System/Reflection/AssemblyInformationalVersionAttribute.cs | 1 - .../src/CoreLib/System/Reflection/AssemblyKeyFileAttribute.cs | 1 - .../src/CoreLib/System/Reflection/AssemblyKeyNameAttribute.cs | 1 - .../src/CoreLib/System/Reflection/AssemblyMetadataAttribute.cs | 1 - src/Common/src/CoreLib/System/Reflection/AssemblyName.cs | 1 - src/Common/src/CoreLib/System/Reflection/AssemblyNameFlags.cs | 1 - .../src/CoreLib/System/Reflection/AssemblyNameFormatter.cs | 1 - .../src/CoreLib/System/Reflection/AssemblyProductAttribute.cs | 1 - .../CoreLib/System/Reflection/AssemblySignatureKeyAttribute.cs | 1 - .../src/CoreLib/System/Reflection/AssemblyTitleAttribute.cs | 1 - .../CoreLib/System/Reflection/AssemblyTrademarkAttribute.cs | 1 - .../src/CoreLib/System/Reflection/AssemblyVersionAttribute.cs | 1 - src/Common/src/CoreLib/System/Reflection/Binder.cs | 1 - src/Common/src/CoreLib/System/Reflection/BindingFlags.cs | 1 - src/Common/src/CoreLib/System/Reflection/CallingConventions.cs | 1 - src/Common/src/CoreLib/System/Reflection/ConstructorInfo.cs | 1 - src/Common/src/CoreLib/System/Reflection/CorElementType.cs | 1 - .../System/Reflection/CustomAttributeFormatException.cs | 1 - .../src/CoreLib/System/Reflection/DefaultMemberAttribute.cs | 1 - .../CoreLib/System/Reflection/Emit/AssemblyBuilderAccess.cs | 1 - src/Common/src/CoreLib/System/Reflection/Emit/EventToken.cs | 1 - src/Common/src/CoreLib/System/Reflection/Emit/FieldToken.cs | 1 - src/Common/src/CoreLib/System/Reflection/Emit/FlowControl.cs | 1 - src/Common/src/CoreLib/System/Reflection/Emit/Label.cs | 1 - src/Common/src/CoreLib/System/Reflection/Emit/MethodToken.cs | 1 - src/Common/src/CoreLib/System/Reflection/Emit/OpCodeType.cs | 1 - src/Common/src/CoreLib/System/Reflection/Emit/OpCodes.cs | 1 - src/Common/src/CoreLib/System/Reflection/Emit/Opcode.cs | 1 - src/Common/src/CoreLib/System/Reflection/Emit/OperandType.cs | 1 - src/Common/src/CoreLib/System/Reflection/Emit/PEFileKinds.cs | 1 - src/Common/src/CoreLib/System/Reflection/Emit/PackingSize.cs | 1 - .../src/CoreLib/System/Reflection/Emit/ParameterToken.cs | 1 - src/Common/src/CoreLib/System/Reflection/Emit/PropertyToken.cs | 1 - .../src/CoreLib/System/Reflection/Emit/SignatureToken.cs | 1 - .../src/CoreLib/System/Reflection/Emit/StackBehaviour.cs | 1 - src/Common/src/CoreLib/System/Reflection/Emit/StringToken.cs | 1 - src/Common/src/CoreLib/System/Reflection/Emit/TypeToken.cs | 1 - src/Common/src/CoreLib/System/Reflection/EventAttributes.cs | 1 - src/Common/src/CoreLib/System/Reflection/EventInfo.cs | 1 - .../src/CoreLib/System/Reflection/ExceptionHandlingClause.cs | 1 - .../System/Reflection/ExceptionHandlingClauseOptions.cs | 1 - src/Common/src/CoreLib/System/Reflection/FieldAttributes.cs | 1 - src/Common/src/CoreLib/System/Reflection/FieldInfo.cs | 1 - .../CoreLib/System/Reflection/GenericParameterAttributes.cs | 1 - .../src/CoreLib/System/Reflection/ICustomAttributeProvider.cs | 1 - src/Common/src/CoreLib/System/Reflection/IReflect.cs | 1 - src/Common/src/CoreLib/System/Reflection/IReflectableType.cs | 1 - src/Common/src/CoreLib/System/Reflection/ImageFileMachine.cs | 1 - src/Common/src/CoreLib/System/Reflection/InterfaceMapping.cs | 1 - .../src/CoreLib/System/Reflection/IntrospectionExtensions.cs | 1 - .../System/Reflection/InvalidFilterCriteriaException.cs | 1 - src/Common/src/CoreLib/System/Reflection/LocalVariableInfo.cs | 1 - .../src/CoreLib/System/Reflection/ManifestResourceInfo.cs | 1 - src/Common/src/CoreLib/System/Reflection/MemberFilter.cs | 1 - src/Common/src/CoreLib/System/Reflection/MemberInfo.cs | 1 - src/Common/src/CoreLib/System/Reflection/MemberTypes.cs | 1 - src/Common/src/CoreLib/System/Reflection/MethodAttributes.cs | 1 - src/Common/src/CoreLib/System/Reflection/MethodBase.cs | 1 - src/Common/src/CoreLib/System/Reflection/MethodBody.cs | 1 - .../src/CoreLib/System/Reflection/MethodImplAttributes.cs | 1 - .../src/CoreLib/System/Reflection/MethodInfo.Internal.cs | 1 - src/Common/src/CoreLib/System/Reflection/MethodInfo.cs | 1 - src/Common/src/CoreLib/System/Reflection/Missing.cs | 1 - src/Common/src/CoreLib/System/Reflection/Module.cs | 1 - .../src/CoreLib/System/Reflection/ModuleResolveEventHandler.cs | 1 - .../CoreLib/System/Reflection/ObfuscateAssemblyAttribute.cs | 1 - .../src/CoreLib/System/Reflection/ObfuscationAttribute.cs | 1 - .../src/CoreLib/System/Reflection/ParameterAttributes.cs | 1 - src/Common/src/CoreLib/System/Reflection/ParameterInfo.cs | 1 - src/Common/src/CoreLib/System/Reflection/ParameterModifier.cs | 1 - src/Common/src/CoreLib/System/Reflection/Pointer.cs | 1 - .../src/CoreLib/System/Reflection/PortableExecutableKinds.cs | 1 - .../src/CoreLib/System/Reflection/ProcessorArchitecture.cs | 1 - src/Common/src/CoreLib/System/Reflection/PropertyAttributes.cs | 1 - src/Common/src/CoreLib/System/Reflection/PropertyInfo.cs | 1 - src/Common/src/CoreLib/System/Reflection/ReflectionContext.cs | 1 - .../CoreLib/System/Reflection/ReflectionTypeLoadException.cs | 1 - src/Common/src/CoreLib/System/Reflection/ResourceAttributes.cs | 1 - src/Common/src/CoreLib/System/Reflection/ResourceLocation.cs | 1 - src/Common/src/CoreLib/System/Reflection/SignatureArrayType.cs | 1 - src/Common/src/CoreLib/System/Reflection/SignatureByRefType.cs | 1 - .../System/Reflection/SignatureConstructedGenericType.cs | 1 - .../System/Reflection/SignatureGenericMethodParameterType.cs | 1 - .../CoreLib/System/Reflection/SignatureGenericParameterType.cs | 1 - .../src/CoreLib/System/Reflection/SignatureHasElementType.cs | 1 - .../src/CoreLib/System/Reflection/SignaturePointerType.cs | 1 - src/Common/src/CoreLib/System/Reflection/SignatureType.cs | 1 - .../src/CoreLib/System/Reflection/SignatureTypeExtensions.cs | 1 - src/Common/src/CoreLib/System/Reflection/StrongNameKeyPair.cs | 1 - src/Common/src/CoreLib/System/Reflection/TargetException.cs | 1 - .../src/CoreLib/System/Reflection/TargetInvocationException.cs | 1 - .../CoreLib/System/Reflection/TargetParameterCountException.cs | 1 - src/Common/src/CoreLib/System/Reflection/TypeAttributes.cs | 1 - src/Common/src/CoreLib/System/Reflection/TypeDelegator.cs | 1 - src/Common/src/CoreLib/System/Reflection/TypeFilter.cs | 1 - src/Common/src/CoreLib/System/Reflection/TypeInfo.cs | 1 - src/Common/src/CoreLib/System/ResolveEventArgs.cs | 1 - src/Common/src/CoreLib/System/ResolveEventHandler.cs | 1 - .../src/CoreLib/System/Resources/FastResourceComparer.cs | 2 +- .../src/CoreLib/System/Resources/FileBasedResourceGroveler.cs | 1 - src/Common/src/CoreLib/System/Resources/IResourceGroveler.cs | 1 - src/Common/src/CoreLib/System/Resources/IResourceReader.cs | 1 - .../CoreLib/System/Resources/ManifestBasedResourceGroveler.cs | 1 - .../System/Resources/MissingManifestResourceException.cs | 1 - .../System/Resources/MissingSatelliteAssemblyException.cs | 1 - .../System/Resources/NeutralResourcesLanguageAttribute.cs | 1 - .../src/CoreLib/System/Resources/ResourceFallbackManager.cs | 1 - src/Common/src/CoreLib/System/Resources/ResourceManager.Uap.cs | 1 - src/Common/src/CoreLib/System/Resources/ResourceManager.cs | 1 - src/Common/src/CoreLib/System/Resources/ResourceReader.Core.cs | 1 - src/Common/src/CoreLib/System/Resources/ResourceSet.cs | 1 - src/Common/src/CoreLib/System/Resources/RuntimeResourceSet.cs | 2 +- .../System/Resources/SatelliteContractVersionAttribute.cs | 2 -- .../CoreLib/System/Runtime/AmbiguousImplementationException.cs | 1 - .../CompilerServices/AccessedThroughPropertyAttribute.cs | 1 - .../Runtime/CompilerServices/AsyncIteratorMethodBuilder.cs | 1 - .../CompilerServices/AsyncIteratorStateMachineAttribute.cs | 1 - .../System/Runtime/CompilerServices/AsyncMethodBuilder.cs | 1 - .../Runtime/CompilerServices/AsyncMethodBuilderAttribute.cs | 1 - .../Runtime/CompilerServices/AsyncStateMachineAttribute.cs | 1 - .../Runtime/CompilerServices/AsyncValueTaskMethodBuilder.cs | 1 - .../CompilerServices/CallerArgumentExpressionAttribute.cs | 1 - .../System/Runtime/CompilerServices/CallerFilePathAttribute.cs | 1 - .../Runtime/CompilerServices/CallerLineNumberAttribute.cs | 1 - .../Runtime/CompilerServices/CallerMemberNameAttribute.cs | 1 - .../System/Runtime/CompilerServices/CompilationRelaxations.cs | 1 - .../CompilerServices/CompilationRelaxationsAttribute.cs | 1 - .../Runtime/CompilerServices/CompilerGeneratedAttribute.cs | 1 - .../Runtime/CompilerServices/CompilerGlobalScopeAttribute.cs | 1 - .../System/Runtime/CompilerServices/ConditionalWeakTable.cs | 1 - .../Runtime/CompilerServices/ConfiguredAsyncDisposable.cs | 1 - .../CompilerServices/ConfiguredCancelableAsyncEnumerable.cs | 1 - .../Runtime/CompilerServices/ConfiguredValueTaskAwaitable.cs | 1 - .../CoreLib/System/Runtime/CompilerServices/ContractHelper.cs | 1 - .../System/Runtime/CompilerServices/CustomConstantAttribute.cs | 1 - .../Runtime/CompilerServices/DateTimeConstantAttribute.cs | 1 - .../Runtime/CompilerServices/DecimalConstantAttribute.cs | 1 - .../Runtime/CompilerServices/DefaultDependencyAttribute.cs | 1 - .../System/Runtime/CompilerServices/DependencyAttribute.cs | 1 - .../CompilerServices/DisablePrivateReflectionAttribute.cs | 1 - .../System/Runtime/CompilerServices/DiscardableAttribute.cs | 1 - .../System/Runtime/CompilerServices/ExtensionAttribute.cs | 1 - .../Runtime/CompilerServices/FixedAddressValueTypeAttribute.cs | 1 - .../System/Runtime/CompilerServices/FixedBufferAttribute.cs | 1 - .../Runtime/CompilerServices/FormattableStringFactory.cs | 1 - .../System/Runtime/CompilerServices/IAsyncStateMachine.cs | 1 - .../src/CoreLib/System/Runtime/CompilerServices/ICastable.cs | 1 - .../System/Runtime/CompilerServices/INotifyCompletion.cs | 1 - .../src/CoreLib/System/Runtime/CompilerServices/ITuple.cs | 1 - .../System/Runtime/CompilerServices/IndexerNameAttribute.cs | 1 - .../Runtime/CompilerServices/InternalsVisibleToAttribute.cs | 1 - .../System/Runtime/CompilerServices/IntrinsicAttribute.cs | 1 - .../System/Runtime/CompilerServices/IsByRefLikeAttribute.cs | 1 - .../src/CoreLib/System/Runtime/CompilerServices/IsConst.cs | 1 - .../System/Runtime/CompilerServices/IsReadOnlyAttribute.cs | 1 - .../src/CoreLib/System/Runtime/CompilerServices/IsVolatile.cs | 1 - .../Runtime/CompilerServices/IteratorStateMachineAttribute.cs | 1 - .../src/CoreLib/System/Runtime/CompilerServices/LoadHint.cs | 1 - .../CoreLib/System/Runtime/CompilerServices/MethodCodeType.cs | 1 - .../System/Runtime/CompilerServices/MethodImplAttribute.cs | 1 - .../System/Runtime/CompilerServices/MethodImplOptions.cs | 1 - .../Runtime/CompilerServices/ReferenceAssemblyAttribute.cs | 1 - .../Runtime/CompilerServices/RuntimeCompatibilityAttribute.cs | 1 - .../CoreLib/System/Runtime/CompilerServices/RuntimeFeature.cs | 1 - .../CoreLib/System/Runtime/CompilerServices/RuntimeHelpers.cs | 1 - .../System/Runtime/CompilerServices/RuntimeWrappedException.cs | 1 - .../System/Runtime/CompilerServices/SpecialNameAttribute.cs | 1 - .../System/Runtime/CompilerServices/StateMachineAttribute.cs | 1 - .../System/Runtime/CompilerServices/StringFreezingAttribute.cs | 1 - .../src/CoreLib/System/Runtime/CompilerServices/StrongBox.cs | 1 - .../System/Runtime/CompilerServices/SuppressIldasmAttribute.cs | 1 - .../src/CoreLib/System/Runtime/CompilerServices/TaskAwaiter.cs | 1 - .../Runtime/CompilerServices/TupleElementNamesAttribute.cs | 1 - .../Runtime/CompilerServices/TypeForwardedFromAttribute.cs | 1 - .../Runtime/CompilerServices/TypeForwardedToAttribute.cs | 1 - .../Runtime/CompilerServices/UnsafeValueTypeAttribute.cs | 1 - .../System/Runtime/CompilerServices/ValueTaskAwaiter.cs | 1 - .../CoreLib/System/Runtime/CompilerServices/YieldAwaitable.cs | 1 - .../Runtime/ConstrainedExecution/CriticalFinalizerObject.cs | 1 - .../ConstrainedExecution/ReliabilityContractAttribute.cs | 1 - .../System/Runtime/ExceptionServices/ExceptionDispatchInfo.cs | 1 - .../System/Runtime/ExceptionServices/ExceptionNotification.cs | 1 - .../HandleProcessCorruptedStateExceptionsAttribute.cs | 1 - src/Common/src/CoreLib/System/Runtime/GCSettings.cs | 1 - .../InteropServices/AllowReversePInvokeCallsAttribute.cs | 1 - .../CoreLib/System/Runtime/InteropServices/ArrayWithOffset.cs | 1 - .../src/CoreLib/System/Runtime/InteropServices/BStrWrapper.cs | 1 - .../System/Runtime/InteropServices/BestFitMappingAttribute.cs | 1 - .../src/CoreLib/System/Runtime/InteropServices/COMException.cs | 1 - .../System/Runtime/InteropServices/ClassInterfaceAttribute.cs | 1 - .../CoreLib/System/Runtime/InteropServices/CoClassAttribute.cs | 1 - .../Runtime/InteropServices/ComDefaultInterfaceAttribute.cs | 1 - .../Runtime/InteropServices/ComEventInterfaceAttribute.cs | 1 - .../System/Runtime/InteropServices/ComEventsHelpers.NoCom.cs | 1 - .../System/Runtime/InteropServices/ComImportAttribute.cs | 1 - .../Runtime/InteropServices/ComSourceInterfacesAttribute.cs | 1 - .../System/Runtime/InteropServices/ComTypes/IBindCtx.cs | 1 - .../Runtime/InteropServices/ComTypes/IConnectionPoint.cs | 1 - .../InteropServices/ComTypes/IConnectionPointContainer.cs | 1 - .../Runtime/InteropServices/ComTypes/IEnumConnectionPoints.cs | 1 - .../Runtime/InteropServices/ComTypes/IEnumConnections.cs | 1 - .../System/Runtime/InteropServices/ComTypes/IEnumMoniker.cs | 1 - .../System/Runtime/InteropServices/ComTypes/IEnumString.cs | 1 - .../System/Runtime/InteropServices/ComTypes/IEnumVARIANT.cs | 1 - .../System/Runtime/InteropServices/ComTypes/IMoniker.cs | 1 - .../System/Runtime/InteropServices/ComTypes/IPersistFile.cs | 1 - .../Runtime/InteropServices/ComTypes/IRunningObjectTable.cs | 1 - .../CoreLib/System/Runtime/InteropServices/ComTypes/IStream.cs | 1 - .../System/Runtime/InteropServices/ComTypes/ITypeComp.cs | 1 - .../System/Runtime/InteropServices/ComTypes/ITypeInfo.cs | 1 - .../System/Runtime/InteropServices/ComTypes/ITypeInfo2.cs | 1 - .../System/Runtime/InteropServices/ComTypes/ITypeLib.cs | 1 - .../System/Runtime/InteropServices/ComTypes/ITypeLib2.cs | 1 - .../System/Runtime/InteropServices/ComVisibleAttribute.cs | 1 - .../CoreLib/System/Runtime/InteropServices/CriticalHandle.cs | 1 - .../CoreLib/System/Runtime/InteropServices/CurrencyWrapper.cs | 1 - .../System/Runtime/InteropServices/DefaultCharSetAttribute.cs | 1 - .../InteropServices/DefaultDllImportSearchPathsAttribute.cs | 1 - .../Runtime/InteropServices/DefaultParameterValueAttribute.cs | 1 - .../CoreLib/System/Runtime/InteropServices/DispIdAttribute.cs | 1 - .../CoreLib/System/Runtime/InteropServices/DispatchWrapper.cs | 1 - .../System/Runtime/InteropServices/DllImportAttribute.cs | 1 - .../src/CoreLib/System/Runtime/InteropServices/ErrorWrapper.cs | 1 - .../System/Runtime/InteropServices/ExternalException.cs | 1 - .../System/Runtime/InteropServices/FieldOffsetAttribute.cs | 1 - .../src/CoreLib/System/Runtime/InteropServices/GCHandle.cs | 1 - .../CoreLib/System/Runtime/InteropServices/GuidAttribute.cs | 1 - .../src/CoreLib/System/Runtime/InteropServices/HandleRef.cs | 1 - .../CoreLib/System/Runtime/InteropServices/ICustomAdapter.cs | 1 - .../CoreLib/System/Runtime/InteropServices/ICustomFactory.cs | 1 - .../CoreLib/System/Runtime/InteropServices/ICustomMarshaler.cs | 1 - .../System/Runtime/InteropServices/ICustomQueryInterface.cs | 1 - .../src/CoreLib/System/Runtime/InteropServices/InAttribute.cs | 1 - .../System/Runtime/InteropServices/InterfaceTypeAttribute.cs | 1 - .../Runtime/InteropServices/InvalidComObjectException.cs | 1 - .../Runtime/InteropServices/InvalidOleVariantTypeException.cs | 1 - .../System/Runtime/InteropServices/LCIDConversionAttribute.cs | 1 - .../CoreLib/System/Runtime/InteropServices/Marshal.NoCom.cs | 1 - .../src/CoreLib/System/Runtime/InteropServices/Marshal.Unix.cs | 1 - .../CoreLib/System/Runtime/InteropServices/Marshal.Windows.cs | 1 - .../src/CoreLib/System/Runtime/InteropServices/Marshal.cs | 1 - .../System/Runtime/InteropServices/MarshalAsAttribute.cs | 1 - .../Runtime/InteropServices/MarshalDirectiveException.cs | 1 - .../System/Runtime/InteropServices/MemoryMarshal.Fast.cs | 1 - .../CoreLib/System/Runtime/InteropServices/MemoryMarshal.cs | 1 - .../System/Runtime/InteropServices/NativeCallableAttribute.cs | 1 - .../CoreLib/System/Runtime/InteropServices/NativeLibrary.cs | 1 - .../System/Runtime/InteropServices/OptionalAttribute.cs | 1 - .../src/CoreLib/System/Runtime/InteropServices/OutAttribute.cs | 1 - .../System/Runtime/InteropServices/PreserveSigAttribute.cs | 1 - .../CoreLib/System/Runtime/InteropServices/ProgIdAttribute.cs | 1 - .../src/CoreLib/System/Runtime/InteropServices/SEHException.cs | 1 - .../Runtime/InteropServices/SafeArrayRankMismatchException.cs | 1 - .../Runtime/InteropServices/SafeArrayTypeMismatchException.cs | 1 - .../src/CoreLib/System/Runtime/InteropServices/SafeBuffer.cs | 1 - .../src/CoreLib/System/Runtime/InteropServices/SafeHandle.cs | 1 - .../System/Runtime/InteropServices/StructLayoutAttribute.cs | 1 - .../System/Runtime/InteropServices/TypeIdentifierAttribute.cs | 1 - .../CoreLib/System/Runtime/InteropServices/UnknownWrapper.cs | 1 - .../InteropServices/UnmanagedFunctionPointerAttribute.cs | 1 - .../CoreLib/System/Runtime/InteropServices/VariantWrapper.cs | 1 - .../InteropServices/WindowsRuntime/EventRegistrationToken.cs | 1 - .../Runtime/Intrinsics/Arm/Arm64/Aes.PlatformNotSupported.cs | 1 - .../src/CoreLib/System/Runtime/Intrinsics/Arm/Arm64/Aes.cs | 1 - .../Runtime/Intrinsics/Arm/Arm64/Base.PlatformNotSupported.cs | 1 - .../src/CoreLib/System/Runtime/Intrinsics/Arm/Arm64/Base.cs | 1 - .../Runtime/Intrinsics/Arm/Arm64/Sha1.PlatformNotSupported.cs | 1 - .../src/CoreLib/System/Runtime/Intrinsics/Arm/Arm64/Sha1.cs | 1 - .../Intrinsics/Arm/Arm64/Sha256.PlatformNotSupported.cs | 1 - .../src/CoreLib/System/Runtime/Intrinsics/Arm/Arm64/Sha256.cs | 1 - .../Runtime/Intrinsics/Arm/Arm64/Simd.PlatformNotSupported.cs | 1 - .../src/CoreLib/System/Runtime/Intrinsics/Arm/Arm64/Simd.cs | 1 - src/Common/src/CoreLib/System/Runtime/Intrinsics/Vector128.cs | 1 - .../CoreLib/System/Runtime/Intrinsics/Vector128DebugView_1.cs | 1 - .../src/CoreLib/System/Runtime/Intrinsics/Vector128_1.cs | 1 - src/Common/src/CoreLib/System/Runtime/Intrinsics/Vector256.cs | 1 - .../CoreLib/System/Runtime/Intrinsics/Vector256DebugView_1.cs | 1 - .../src/CoreLib/System/Runtime/Intrinsics/Vector256_1.cs | 1 - src/Common/src/CoreLib/System/Runtime/Intrinsics/Vector64.cs | 1 - .../CoreLib/System/Runtime/Intrinsics/Vector64DebugView_1.cs | 1 - src/Common/src/CoreLib/System/Runtime/Intrinsics/Vector64_1.cs | 1 - .../System/Runtime/Intrinsics/X86/Aes.PlatformNotSupported.cs | 1 - src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Aes.cs | 1 - .../System/Runtime/Intrinsics/X86/Avx.PlatformNotSupported.cs | 1 - src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Avx.cs | 1 - .../System/Runtime/Intrinsics/X86/Avx2.PlatformNotSupported.cs | 1 - src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Avx2.cs | 1 - .../System/Runtime/Intrinsics/X86/Bmi1.PlatformNotSupported.cs | 1 - src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Bmi1.cs | 1 - .../System/Runtime/Intrinsics/X86/Bmi2.PlatformNotSupported.cs | 1 - src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Bmi2.cs | 1 - src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Enums.cs | 1 - .../System/Runtime/Intrinsics/X86/Fma.PlatformNotSupported.cs | 1 - src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Fma.cs | 1 - .../Runtime/Intrinsics/X86/Lzcnt.PlatformNotSupported.cs | 1 - src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Lzcnt.cs | 1 - .../Runtime/Intrinsics/X86/Pclmulqdq.PlatformNotSupported.cs | 1 - .../src/CoreLib/System/Runtime/Intrinsics/X86/Pclmulqdq.cs | 1 - .../Runtime/Intrinsics/X86/Popcnt.PlatformNotSupported.cs | 1 - src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Popcnt.cs | 1 - .../System/Runtime/Intrinsics/X86/Sse.PlatformNotSupported.cs | 1 - src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Sse.cs | 1 - .../System/Runtime/Intrinsics/X86/Sse2.PlatformNotSupported.cs | 1 - src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Sse2.cs | 1 - .../System/Runtime/Intrinsics/X86/Sse3.PlatformNotSupported.cs | 1 - src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Sse3.cs | 1 - .../Runtime/Intrinsics/X86/Sse41.PlatformNotSupported.cs | 1 - src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Sse41.cs | 1 - .../Runtime/Intrinsics/X86/Sse42.PlatformNotSupported.cs | 1 - src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Sse42.cs | 1 - .../Runtime/Intrinsics/X86/Ssse3.PlatformNotSupported.cs | 1 - src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Ssse3.cs | 1 - .../src/CoreLib/System/Runtime/Loader/AssemblyLoadContext.cs | 1 - .../CoreLib/System/Runtime/Loader/LibraryNameVariation.Unix.cs | 1 - .../System/Runtime/Loader/LibraryNameVariation.Windows.cs | 1 - .../src/CoreLib/System/Runtime/Loader/LibraryNameVariation.cs | 2 -- src/Common/src/CoreLib/System/Runtime/MemoryFailPoint.Unix.cs | 1 - .../src/CoreLib/System/Runtime/MemoryFailPoint.Windows.cs | 1 - src/Common/src/CoreLib/System/Runtime/MemoryFailPoint.cs | 1 - src/Common/src/CoreLib/System/Runtime/Remoting/ObjectHandle.cs | 1 - .../Runtime/Serialization/DeserializationBlockedException.cs | 1 - .../System/Runtime/Serialization/DeserializationToken.cs | 1 - .../System/Runtime/Serialization/DeserializationTracker.cs | 1 - .../System/Runtime/Serialization/IDeserializationCallback.cs | 1 - .../System/Runtime/Serialization/IFormatterConverter.cs | 1 - .../CoreLib/System/Runtime/Serialization/IObjectReference.cs | 1 - .../System/Runtime/Serialization/ISafeSerializationData.cs | 1 - .../src/CoreLib/System/Runtime/Serialization/ISerializable.cs | 1 - .../System/Runtime/Serialization/OnDeserializedAttribute.cs | 1 - .../System/Runtime/Serialization/OnDeserializingAttribute.cs | 1 - .../System/Runtime/Serialization/OnSerializedAttribute.cs | 1 - .../System/Runtime/Serialization/OnSerializingAttribute.cs | 1 - .../System/Runtime/Serialization/OptionalFieldAttribute.cs | 1 - .../System/Runtime/Serialization/SafeSerializationEventArgs.cs | 1 - .../System/Runtime/Serialization/SerializationException.cs | 1 - .../CoreLib/System/Runtime/Serialization/SerializationInfo.cs | 1 - .../Runtime/Serialization/SerializationInfoEnumerator.cs | 1 - .../CoreLib/System/Runtime/Serialization/StreamingContext.cs | 1 - .../System/Runtime/Versioning/NonVersionableAttribute.cs | 1 - .../System/Runtime/Versioning/TargetFrameworkAttribute.cs | 1 - src/Common/src/CoreLib/System/SByte.cs | 1 - .../System/Security/AllowPartiallyTrustedCallersAttribute.cs | 1 - .../src/CoreLib/System/Security/CryptographicException.cs | 1 - src/Common/src/CoreLib/System/Security/IPermission.cs | 1 - src/Common/src/CoreLib/System/Security/ISecurityEncodable.cs | 1 - src/Common/src/CoreLib/System/Security/IStackWalk.cs | 1 - src/Common/src/CoreLib/System/Security/PermissionSet.cs | 1 - src/Common/src/CoreLib/System/Security/Principal/IIdentity.cs | 1 - src/Common/src/CoreLib/System/Security/Principal/IPrincipal.cs | 1 - src/Common/src/CoreLib/System/Security/SafeBSTRHandle.cs | 1 - src/Common/src/CoreLib/System/Security/SecureString.Unix.cs | 1 - src/Common/src/CoreLib/System/Security/SecureString.Windows.cs | 1 - src/Common/src/CoreLib/System/Security/SecureString.cs | 1 - .../src/CoreLib/System/Security/SecurityCriticalAttribute.cs | 1 - src/Common/src/CoreLib/System/Security/SecurityElement.cs | 1 - src/Common/src/CoreLib/System/Security/SecurityException.cs | 1 - .../src/CoreLib/System/Security/SecurityRulesAttribute.cs | 1 - .../CoreLib/System/Security/SecuritySafeCriticalAttribute.cs | 1 - .../CoreLib/System/Security/SecurityTransparentAttribute.cs | 1 - .../CoreLib/System/Security/SecurityTreatAsSafeAttribute.cs | 1 - .../System/Security/SuppressUnmanagedCodeSecurityAttribute.cs | 1 - .../src/CoreLib/System/Security/UnverifiableCodeAttribute.cs | 1 - .../src/CoreLib/System/Security/VerificationException.cs | 1 - src/Common/src/CoreLib/System/SerializableAttribute.cs | 1 - src/Common/src/CoreLib/System/Single.cs | 1 - src/Common/src/CoreLib/System/Span.Fast.cs | 1 - src/Common/src/CoreLib/System/Span.cs | 1 - src/Common/src/CoreLib/System/SpanDebugView.cs | 1 - src/Common/src/CoreLib/System/SpanHelpers.BinarySearch.cs | 1 - src/Common/src/CoreLib/System/SpanHelpers.Byte.cs | 1 - src/Common/src/CoreLib/System/SpanHelpers.Char.cs | 1 - src/Common/src/CoreLib/System/SpanHelpers.T.cs | 1 - src/Common/src/CoreLib/System/SpanHelpers.cs | 1 - src/Common/src/CoreLib/System/StackOverflowException.cs | 1 - src/Common/src/CoreLib/System/String.Comparison.cs | 1 - src/Common/src/CoreLib/System/String.Manipulation.cs | 1 - src/Common/src/CoreLib/System/String.Searching.cs | 1 - src/Common/src/CoreLib/System/String.cs | 1 - src/Common/src/CoreLib/System/StringComparer.cs | 1 - src/Common/src/CoreLib/System/StringComparison.cs | 1 - src/Common/src/CoreLib/System/StringSplitOptions.cs | 1 - src/Common/src/CoreLib/System/SystemException.cs | 1 - src/Common/src/CoreLib/System/Text/ASCIIEncoding.cs | 1 - src/Common/src/CoreLib/System/Text/ASCIIUtility.Helpers.cs | 1 - src/Common/src/CoreLib/System/Text/ASCIIUtility.cs | 1 - src/Common/src/CoreLib/System/Text/CodePageDataItem.cs | 1 - src/Common/src/CoreLib/System/Text/Decoder.cs | 1 - src/Common/src/CoreLib/System/Text/DecoderBestFitFallback.cs | 1 - src/Common/src/CoreLib/System/Text/DecoderExceptionFallback.cs | 1 - src/Common/src/CoreLib/System/Text/DecoderFallback.cs | 1 - src/Common/src/CoreLib/System/Text/DecoderNLS.cs | 1 - .../src/CoreLib/System/Text/DecoderReplacementFallback.cs | 1 - src/Common/src/CoreLib/System/Text/Encoder.cs | 1 - src/Common/src/CoreLib/System/Text/EncoderBestFitFallback.cs | 1 - src/Common/src/CoreLib/System/Text/EncoderExceptionFallback.cs | 1 - src/Common/src/CoreLib/System/Text/EncoderFallback.cs | 1 - src/Common/src/CoreLib/System/Text/EncoderNLS.cs | 1 - .../src/CoreLib/System/Text/EncoderReplacementFallback.cs | 1 - src/Common/src/CoreLib/System/Text/Encoding.Internal.cs | 1 - src/Common/src/CoreLib/System/Text/Encoding.cs | 1 - src/Common/src/CoreLib/System/Text/EncodingData.cs | 1 - src/Common/src/CoreLib/System/Text/EncodingInfo.cs | 1 - src/Common/src/CoreLib/System/Text/EncodingNLS.cs | 1 - src/Common/src/CoreLib/System/Text/EncodingProvider.cs | 1 - src/Common/src/CoreLib/System/Text/EncodingTable.cs | 1 - src/Common/src/CoreLib/System/Text/Latin1Encoding.cs | 1 - src/Common/src/CoreLib/System/Text/Rune.cs | 1 - src/Common/src/CoreLib/System/Text/SpanRuneEnumerator.cs | 1 - src/Common/src/CoreLib/System/Text/StringBuilder.Debug.cs | 1 - src/Common/src/CoreLib/System/Text/StringBuilder.cs | 1 - src/Common/src/CoreLib/System/Text/StringRuneEnumerator.cs | 1 - src/Common/src/CoreLib/System/Text/UTF32Encoding.cs | 1 - src/Common/src/CoreLib/System/Text/UTF7Encoding.cs | 1 - src/Common/src/CoreLib/System/Text/UTF8Encoding.cs | 1 - .../src/CoreLib/System/Text/Unicode/Utf16Utility.Validation.cs | 1 - src/Common/src/CoreLib/System/Text/Unicode/Utf16Utility.cs | 1 - src/Common/src/CoreLib/System/Text/Unicode/Utf8.cs | 1 - .../src/CoreLib/System/Text/Unicode/Utf8Utility.Helpers.cs | 1 - .../src/CoreLib/System/Text/Unicode/Utf8Utility.Transcoding.cs | 1 - .../src/CoreLib/System/Text/Unicode/Utf8Utility.Validation.cs | 1 - src/Common/src/CoreLib/System/Text/Unicode/Utf8Utility.cs | 1 - src/Common/src/CoreLib/System/Text/UnicodeDebug.cs | 1 - src/Common/src/CoreLib/System/Text/UnicodeEncoding.cs | 1 - src/Common/src/CoreLib/System/Text/UnicodeUtility.cs | 1 - src/Common/src/CoreLib/System/ThreadAttributes.cs | 1 - src/Common/src/CoreLib/System/ThreadStaticAttribute.cs | 1 - .../src/CoreLib/System/Threading/AbandonedMutexException.cs | 1 - src/Common/src/CoreLib/System/Threading/ApartmentState.cs | 1 - src/Common/src/CoreLib/System/Threading/AsyncLocal.cs | 1 - src/Common/src/CoreLib/System/Threading/AutoResetEvent.cs | 1 - src/Common/src/CoreLib/System/Threading/CancellationToken.cs | 1 - .../CoreLib/System/Threading/CancellationTokenRegistration.cs | 1 - .../src/CoreLib/System/Threading/CancellationTokenSource.cs | 1 - src/Common/src/CoreLib/System/Threading/CompressedStack.cs | 1 - .../src/CoreLib/System/Threading/DeferredDisposableLifetime.cs | 1 - src/Common/src/CoreLib/System/Threading/EventResetMode.cs | 1 - .../src/CoreLib/System/Threading/EventWaitHandle.Windows.cs | 1 - src/Common/src/CoreLib/System/Threading/EventWaitHandle.cs | 1 - src/Common/src/CoreLib/System/Threading/ExecutionContext.cs | 1 - .../src/CoreLib/System/Threading/IOCompletionCallback.cs | 1 - src/Common/src/CoreLib/System/Threading/IThreadPoolWorkItem.cs | 1 - src/Common/src/CoreLib/System/Threading/LazyInitializer.cs | 1 - .../src/CoreLib/System/Threading/LazyThreadSafetyMode.cs | 1 - .../src/CoreLib/System/Threading/LockRecursionException.cs | 1 - src/Common/src/CoreLib/System/Threading/ManualResetEvent.cs | 1 - .../src/CoreLib/System/Threading/ManualResetEventSlim.cs | 1 - src/Common/src/CoreLib/System/Threading/Mutex.Windows.cs | 1 - src/Common/src/CoreLib/System/Threading/Mutex.cs | 1 - src/Common/src/CoreLib/System/Threading/NativeOverlapped.cs | 1 - .../src/CoreLib/System/Threading/ParameterizedThreadStart.cs | 1 - .../src/CoreLib/System/Threading/ReaderWriterLockSlim.cs | 1 - src/Common/src/CoreLib/System/Threading/Semaphore.Windows.cs | 1 - src/Common/src/CoreLib/System/Threading/Semaphore.cs | 1 - .../src/CoreLib/System/Threading/SemaphoreFullException.cs | 1 - src/Common/src/CoreLib/System/Threading/SemaphoreSlim.cs | 1 - src/Common/src/CoreLib/System/Threading/SendOrPostCallback.cs | 1 - src/Common/src/CoreLib/System/Threading/SpinLock.cs | 1 - src/Common/src/CoreLib/System/Threading/SpinWait.cs | 1 - .../src/CoreLib/System/Threading/SynchronizationContext.cs | 1 - .../CoreLib/System/Threading/SynchronizationLockException.cs | 1 - .../System/Threading/Tasks/AsyncCausalityTracer.Noop.cs | 1 - .../System/Threading/Tasks/AsyncCausalityTracerConstants.cs | 1 - .../System/Threading/Tasks/ConcurrentExclusiveSchedulerPair.cs | 1 - src/Common/src/CoreLib/System/Threading/Tasks/Future.cs | 1 - src/Common/src/CoreLib/System/Threading/Tasks/FutureFactory.cs | 1 - .../CoreLib/System/Threading/Tasks/ProducerConsumerQueues.cs | 1 - .../CoreLib/System/Threading/Tasks/Sources/IValueTaskSource.cs | 1 - .../Threading/Tasks/Sources/ManualResetValueTaskSourceCore.cs | 1 - src/Common/src/CoreLib/System/Threading/Tasks/Task.cs | 1 - .../System/Threading/Tasks/TaskAsyncEnumerableExtensions.cs | 1 - .../CoreLib/System/Threading/Tasks/TaskCanceledException.cs | 1 - .../src/CoreLib/System/Threading/Tasks/TaskCompletionSource.cs | 1 - .../src/CoreLib/System/Threading/Tasks/TaskContinuation.cs | 1 - .../src/CoreLib/System/Threading/Tasks/TaskExceptionHolder.cs | 1 - .../src/CoreLib/System/Threading/Tasks/TaskExtensions.cs | 1 - src/Common/src/CoreLib/System/Threading/Tasks/TaskFactory.cs | 1 - src/Common/src/CoreLib/System/Threading/Tasks/TaskScheduler.cs | 1 - .../CoreLib/System/Threading/Tasks/TaskSchedulerException.cs | 1 - .../CoreLib/System/Threading/Tasks/ThreadPoolTaskScheduler.cs | 1 - .../src/CoreLib/System/Threading/Tasks/TplEventSource.cs | 1 - src/Common/src/CoreLib/System/Threading/Tasks/ValueTask.cs | 1 - src/Common/src/CoreLib/System/Threading/Thread.Unix.cs | 1 - src/Common/src/CoreLib/System/Threading/Thread.Windows.cs | 1 - src/Common/src/CoreLib/System/Threading/Thread.cs | 1 - .../src/CoreLib/System/Threading/ThreadAbortException.cs | 1 - .../src/CoreLib/System/Threading/ThreadInterruptedException.cs | 1 - src/Common/src/CoreLib/System/Threading/ThreadLocal.cs | 1 - src/Common/src/CoreLib/System/Threading/ThreadPool.cs | 1 - src/Common/src/CoreLib/System/Threading/ThreadPriority.cs | 1 - src/Common/src/CoreLib/System/Threading/ThreadStart.cs | 1 - .../src/CoreLib/System/Threading/ThreadStartException.cs | 1 - src/Common/src/CoreLib/System/Threading/ThreadState.cs | 1 - .../src/CoreLib/System/Threading/ThreadStateException.cs | 1 - src/Common/src/CoreLib/System/Threading/Timeout.cs | 1 - src/Common/src/CoreLib/System/Threading/TimeoutHelper.cs | 1 - src/Common/src/CoreLib/System/Threading/Timer.cs | 1 - src/Common/src/CoreLib/System/Threading/TimerQueue.Portable.cs | 1 - src/Common/src/CoreLib/System/Threading/TimerQueue.Unix.cs | 1 - src/Common/src/CoreLib/System/Threading/TimerQueue.Windows.cs | 1 - src/Common/src/CoreLib/System/Threading/Volatile.cs | 1 - src/Common/src/CoreLib/System/Threading/WaitHandle.cs | 1 - .../System/Threading/WaitHandleCannotBeOpenedException.cs | 1 - src/Common/src/CoreLib/System/ThrowHelper.cs | 1 - src/Common/src/CoreLib/System/TimeSpan.cs | 1 - src/Common/src/CoreLib/System/TimeZone.cs | 1 - src/Common/src/CoreLib/System/TimeZoneInfo.AdjustmentRule.cs | 1 - src/Common/src/CoreLib/System/TimeZoneInfo.StringSerializer.cs | 1 - src/Common/src/CoreLib/System/TimeZoneInfo.TransitionTime.cs | 1 - src/Common/src/CoreLib/System/TimeZoneInfo.Unix.cs | 1 - src/Common/src/CoreLib/System/TimeZoneInfo.Win32.cs | 1 - src/Common/src/CoreLib/System/TimeZoneInfo.cs | 1 - src/Common/src/CoreLib/System/TimeZoneNotFoundException.cs | 1 - src/Common/src/CoreLib/System/TimeoutException.cs | 1 - src/Common/src/CoreLib/System/Tuple.cs | 1 - src/Common/src/CoreLib/System/TupleExtensions.cs | 1 - src/Common/src/CoreLib/System/Type.Enum.cs | 1 - src/Common/src/CoreLib/System/Type.Helpers.cs | 1 - src/Common/src/CoreLib/System/Type.cs | 1 - src/Common/src/CoreLib/System/TypeAccessException.cs | 1 - src/Common/src/CoreLib/System/TypeCode.cs | 1 - src/Common/src/CoreLib/System/TypeInitializationException.cs | 1 - src/Common/src/CoreLib/System/TypeLoadException.cs | 1 - src/Common/src/CoreLib/System/TypeUnloadedException.cs | 1 - src/Common/src/CoreLib/System/UInt16.cs | 1 - src/Common/src/CoreLib/System/UInt32.cs | 1 - src/Common/src/CoreLib/System/UInt64.cs | 1 - src/Common/src/CoreLib/System/UIntPtr.cs | 1 - src/Common/src/CoreLib/System/UnauthorizedAccessException.cs | 1 - src/Common/src/CoreLib/System/UnhandledExceptionEventArgs.cs | 1 - .../src/CoreLib/System/UnhandledExceptionEventHandler.cs | 1 - src/Common/src/CoreLib/System/UnitySerializationHolder.cs | 1 - src/Common/src/CoreLib/System/ValueTuple.cs | 1 - src/Common/src/CoreLib/System/Version.cs | 1 - src/Common/src/CoreLib/System/Void.cs | 1 - src/Common/src/CoreLib/System/WinRTFolderPaths.cs | 1 - 1203 files changed, 7 insertions(+), 1217 deletions(-) diff --git a/src/Common/src/CoreLib/Internal/IO/File.Unix.cs b/src/Common/src/CoreLib/Internal/IO/File.Unix.cs index 25d62003de8c..50fa0f0d0c4b 100644 --- a/src/Common/src/CoreLib/Internal/IO/File.Unix.cs +++ b/src/Common/src/CoreLib/Internal/IO/File.Unix.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable - namespace Internal.IO { internal static partial class File diff --git a/src/Common/src/CoreLib/Internal/IO/File.Windows.cs b/src/Common/src/CoreLib/Internal/IO/File.Windows.cs index 28624bb95f32..0acae3b4577d 100644 --- a/src/Common/src/CoreLib/Internal/IO/File.Windows.cs +++ b/src/Common/src/CoreLib/Internal/IO/File.Windows.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using Microsoft.Win32; using Microsoft.Win32.SafeHandles; using System.IO; diff --git a/src/Common/src/CoreLib/Internal/IO/File.cs b/src/Common/src/CoreLib/Internal/IO/File.cs index a8439895b1bd..a21f4954d4de 100644 --- a/src/Common/src/CoreLib/Internal/IO/File.cs +++ b/src/Common/src/CoreLib/Internal/IO/File.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Diagnostics; using System.Security; diff --git a/src/Common/src/CoreLib/Internal/Padding.cs b/src/Common/src/CoreLib/Internal/Padding.cs index 86050b7fb75c..14bf998babaa 100644 --- a/src/Common/src/CoreLib/Internal/Padding.cs +++ b/src/Common/src/CoreLib/Internal/Padding.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.InteropServices; namespace Internal diff --git a/src/Common/src/CoreLib/Internal/Resources/PRIExceptionInfo.cs b/src/Common/src/CoreLib/Internal/Resources/PRIExceptionInfo.cs index 1ae4674a9813..2b097a9d939d 100644 --- a/src/Common/src/CoreLib/Internal/Resources/PRIExceptionInfo.cs +++ b/src/Common/src/CoreLib/Internal/Resources/PRIExceptionInfo.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace Internal.Resources { public class PRIExceptionInfo diff --git a/src/Common/src/CoreLib/Internal/Resources/WindowsRuntimeResourceManagerBase.cs b/src/Common/src/CoreLib/Internal/Resources/WindowsRuntimeResourceManagerBase.cs index 531b0fd4e602..173b2372c959 100644 --- a/src/Common/src/CoreLib/Internal/Resources/WindowsRuntimeResourceManagerBase.cs +++ b/src/Common/src/CoreLib/Internal/Resources/WindowsRuntimeResourceManagerBase.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Globalization; namespace Internal.Resources diff --git a/src/Common/src/CoreLib/Internal/Runtime/CompilerServices/Unsafe.cs b/src/Common/src/CoreLib/Internal/Runtime/CompilerServices/Unsafe.cs index 02092af2094d..4688933881af 100644 --- a/src/Common/src/CoreLib/Internal/Runtime/CompilerServices/Unsafe.cs +++ b/src/Common/src/CoreLib/Internal/Runtime/CompilerServices/Unsafe.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Runtime.CompilerServices; using System.Runtime.Versioning; diff --git a/src/Common/src/CoreLib/Internal/Threading/Tasks/AsyncCausalitySupport.cs b/src/Common/src/CoreLib/Internal/Threading/Tasks/AsyncCausalitySupport.cs index 54df96db664a..dcea41dbab22 100644 --- a/src/Common/src/CoreLib/Internal/Threading/Tasks/AsyncCausalitySupport.cs +++ b/src/Common/src/CoreLib/Internal/Threading/Tasks/AsyncCausalitySupport.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Threading.Tasks; using System.Runtime.CompilerServices; diff --git a/src/Common/src/CoreLib/Internal/Win32/RegistryKey.cs b/src/Common/src/CoreLib/Internal/Win32/RegistryKey.cs index 469d67866a17..6ea8cf9554cb 100644 --- a/src/Common/src/CoreLib/Internal/Win32/RegistryKey.cs +++ b/src/Common/src/CoreLib/Internal/Win32/RegistryKey.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Buffers; using System.Collections.Generic; diff --git a/src/Common/src/CoreLib/Interop/Unix/Interop.Errors.cs b/src/Common/src/CoreLib/Interop/Unix/Interop.Errors.cs index a4a7a4344aa3..30223299c171 100644 --- a/src/Common/src/CoreLib/Interop/Unix/Interop.Errors.cs +++ b/src/Common/src/CoreLib/Interop/Unix/Interop.Errors.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/Interop/Unix/Interop.Libraries.cs b/src/Common/src/CoreLib/Interop/Unix/Interop.Libraries.cs index 6c620bf03107..02d009244509 100644 --- a/src/Common/src/CoreLib/Interop/Unix/Interop.Libraries.cs +++ b/src/Common/src/CoreLib/Interop/Unix/Interop.Libraries.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable internal static partial class Interop { internal static partial class Libraries diff --git a/src/Common/src/CoreLib/Interop/Unix/System.Globalization.Native/Interop.Calendar.cs b/src/Common/src/CoreLib/Interop/Unix/System.Globalization.Native/Interop.Calendar.cs index c5ec71a73d2f..764bdaf85afe 100644 --- a/src/Common/src/CoreLib/Interop/Unix/System.Globalization.Native/Interop.Calendar.cs +++ b/src/Common/src/CoreLib/Interop/Unix/System.Globalization.Native/Interop.Calendar.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Globalization; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/Interop/Unix/System.Globalization.Native/Interop.Casing.cs b/src/Common/src/CoreLib/Interop/Unix/System.Globalization.Native/Interop.Casing.cs index 2878161c9910..503a864d693c 100644 --- a/src/Common/src/CoreLib/Interop/Unix/System.Globalization.Native/Interop.Casing.cs +++ b/src/Common/src/CoreLib/Interop/Unix/System.Globalization.Native/Interop.Casing.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Runtime.InteropServices; using System.Security; diff --git a/src/Common/src/CoreLib/Interop/Unix/System.Globalization.Native/Interop.Collation.cs b/src/Common/src/CoreLib/Interop/Unix/System.Globalization.Native/Interop.Collation.cs index 9d21d23acb08..aea7615e4e71 100644 --- a/src/Common/src/CoreLib/Interop/Unix/System.Globalization.Native/Interop.Collation.cs +++ b/src/Common/src/CoreLib/Interop/Unix/System.Globalization.Native/Interop.Collation.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Globalization; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/Interop/Unix/System.Globalization.Native/Interop.ICU.cs b/src/Common/src/CoreLib/Interop/Unix/System.Globalization.Native/Interop.ICU.cs index f122d519ba0d..a16c813b2f5a 100644 --- a/src/Common/src/CoreLib/Interop/Unix/System.Globalization.Native/Interop.ICU.cs +++ b/src/Common/src/CoreLib/Interop/Unix/System.Globalization.Native/Interop.ICU.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Runtime.InteropServices; using System.Runtime.CompilerServices; diff --git a/src/Common/src/CoreLib/Interop/Unix/System.Globalization.Native/Interop.Idna.cs b/src/Common/src/CoreLib/Interop/Unix/System.Globalization.Native/Interop.Idna.cs index 9a0cd923be01..89b6c3cebec0 100644 --- a/src/Common/src/CoreLib/Interop/Unix/System.Globalization.Native/Interop.Idna.cs +++ b/src/Common/src/CoreLib/Interop/Unix/System.Globalization.Native/Interop.Idna.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/Interop/Unix/System.Globalization.Native/Interop.Locale.cs b/src/Common/src/CoreLib/Interop/Unix/System.Globalization.Native/Interop.Locale.cs index 40de0991821a..b563752bc00d 100644 --- a/src/Common/src/CoreLib/Interop/Unix/System.Globalization.Native/Interop.Locale.cs +++ b/src/Common/src/CoreLib/Interop/Unix/System.Globalization.Native/Interop.Locale.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/Interop/Unix/System.Globalization.Native/Interop.Normalization.cs b/src/Common/src/CoreLib/Interop/Unix/System.Globalization.Native/Interop.Normalization.cs index 2cfc3746ba4b..d442da0ea137 100644 --- a/src/Common/src/CoreLib/Interop/Unix/System.Globalization.Native/Interop.Normalization.cs +++ b/src/Common/src/CoreLib/Interop/Unix/System.Globalization.Native/Interop.Normalization.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Runtime.InteropServices; using System.Text; diff --git a/src/Common/src/CoreLib/Interop/Unix/System.Globalization.Native/Interop.ResultCode.cs b/src/Common/src/CoreLib/Interop/Unix/System.Globalization.Native/Interop.ResultCode.cs index d5261ac6ca32..4a9933f9291f 100644 --- a/src/Common/src/CoreLib/Interop/Unix/System.Globalization.Native/Interop.ResultCode.cs +++ b/src/Common/src/CoreLib/Interop/Unix/System.Globalization.Native/Interop.ResultCode.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable internal static partial class Interop { internal static partial class Globalization diff --git a/src/Common/src/CoreLib/Interop/Unix/System.Globalization.Native/Interop.TimeZoneInfo.cs b/src/Common/src/CoreLib/Interop/Unix/System.Globalization.Native/Interop.TimeZoneInfo.cs index 583599fb1390..6c6926824621 100644 --- a/src/Common/src/CoreLib/Interop/Unix/System.Globalization.Native/Interop.TimeZoneInfo.cs +++ b/src/Common/src/CoreLib/Interop/Unix/System.Globalization.Native/Interop.TimeZoneInfo.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.InteropServices; using System.Text; diff --git a/src/Common/src/CoreLib/Interop/Unix/System.Globalization.Native/Interop.Utils.cs b/src/Common/src/CoreLib/Interop/Unix/System.Globalization.Native/Interop.Utils.cs index 058f07efe1ae..627ab56c9187 100644 --- a/src/Common/src/CoreLib/Interop/Unix/System.Globalization.Native/Interop.Utils.cs +++ b/src/Common/src/CoreLib/Interop/Unix/System.Globalization.Native/Interop.Utils.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Diagnostics; using System.Buffers; diff --git a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.Access.cs b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.Access.cs index 62b212b8074a..a723f572a5b0 100644 --- a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.Access.cs +++ b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.Access.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.ChDir.cs b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.ChDir.cs index ebfa8738c98c..3c66995182ac 100644 --- a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.ChDir.cs +++ b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.ChDir.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.Close.cs b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.Close.cs index 0c5ca55d8c06..8d192398a036 100644 --- a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.Close.cs +++ b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.Close.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.FLock.cs b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.FLock.cs index b4b5902920cd..22934a3e77d5 100644 --- a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.FLock.cs +++ b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.FLock.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Runtime.InteropServices; using Microsoft.Win32.SafeHandles; diff --git a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.FSync.cs b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.FSync.cs index 5660aecce5ee..e3ab97093135 100644 --- a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.FSync.cs +++ b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.FSync.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.InteropServices; using Microsoft.Win32.SafeHandles; diff --git a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.FTruncate.cs b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.FTruncate.cs index 6d6b36811193..5dad650362d0 100644 --- a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.FTruncate.cs +++ b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.FTruncate.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.InteropServices; using Microsoft.Win32.SafeHandles; diff --git a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.GetCpuUtilization.cs b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.GetCpuUtilization.cs index 701c01cd9cf3..35e77c454192 100644 --- a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.GetCpuUtilization.cs +++ b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.GetCpuUtilization.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.GetCwd.cs b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.GetCwd.cs index 2951d441d2d8..f6412992b130 100644 --- a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.GetCwd.cs +++ b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.GetCwd.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Buffers; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.GetEUid.cs b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.GetEUid.cs index 98f5545f902a..8b525fa32729 100644 --- a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.GetEUid.cs +++ b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.GetEUid.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.GetHostName.cs b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.GetHostName.cs index 34fa14f35256..f2555b0fc827 100644 --- a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.GetHostName.cs +++ b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.GetHostName.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Diagnostics; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.GetPid.cs b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.GetPid.cs index 2656753655e9..02d259db7d18 100644 --- a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.GetPid.cs +++ b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.GetPid.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.GetPwUid.cs b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.GetPwUid.cs index cbab70a97194..28b2309d03ec 100644 --- a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.GetPwUid.cs +++ b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.GetPwUid.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.GetRandomBytes.cs b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.GetRandomBytes.cs index 7956567e8ba1..e911b13583d7 100644 --- a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.GetRandomBytes.cs +++ b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.GetRandomBytes.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Diagnostics; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.GetSystemTimeAsTicks.cs b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.GetSystemTimeAsTicks.cs index 35e37834e10e..f02ecac13b91 100644 --- a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.GetSystemTimeAsTicks.cs +++ b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.GetSystemTimeAsTicks.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.InteropServices; internal static partial class Interop diff --git a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.GetTimestamp.cs b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.GetTimestamp.cs index d1669b60951e..b57c0cd175f0 100644 --- a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.GetTimestamp.cs +++ b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.GetTimestamp.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.InteropServices; internal static partial class Interop diff --git a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.GetUnixName.cs b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.GetUnixName.cs index 02e08fd447c1..fb925b9dca92 100644 --- a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.GetUnixName.cs +++ b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.GetUnixName.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.GetUnixRelease.cs b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.GetUnixRelease.cs index 5885de678fe5..5e41ae98046e 100644 --- a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.GetUnixRelease.cs +++ b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.GetUnixRelease.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.InteropServices; internal static partial class Interop diff --git a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.LSeek.cs b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.LSeek.cs index 3f93192422b1..7f8df7c6bf9f 100644 --- a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.LSeek.cs +++ b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.LSeek.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.InteropServices; using Microsoft.Win32.SafeHandles; diff --git a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.LockFileRegion.cs b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.LockFileRegion.cs index ecc95c4dc6a0..1deb9a431320 100644 --- a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.LockFileRegion.cs +++ b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.LockFileRegion.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.MksTemps.cs b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.MksTemps.cs index e9624591b31b..14c2d989130a 100644 --- a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.MksTemps.cs +++ b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.MksTemps.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.MountPoints.cs b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.MountPoints.cs index c2d1b7946672..212d515e8369 100644 --- a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.MountPoints.cs +++ b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.MountPoints.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Collections.Generic; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.Open.cs b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.Open.cs index e151c4cf75fd..a9a994c78c01 100644 --- a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.Open.cs +++ b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.Open.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.InteropServices; using Microsoft.Win32.SafeHandles; diff --git a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.OpenFlags.cs b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.OpenFlags.cs index ce5f9ad70fae..f9e54c3cbcf9 100644 --- a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.OpenFlags.cs +++ b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.OpenFlags.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; internal static partial class Interop diff --git a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.PathConf.cs b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.PathConf.cs index 27d5095a16b4..7213cb02640f 100644 --- a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.PathConf.cs +++ b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.PathConf.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.Permissions.cs b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.Permissions.cs index 5cddd425bcfb..f1d13787d257 100644 --- a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.Permissions.cs +++ b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.Permissions.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; internal static partial class Interop diff --git a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.PosixFAdvise.cs b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.PosixFAdvise.cs index 3035c5ecb420..ad8b73aed211 100644 --- a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.PosixFAdvise.cs +++ b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.PosixFAdvise.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.InteropServices; using Microsoft.Win32.SafeHandles; diff --git a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.Read.cs b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.Read.cs index e835b7ff6599..233feabdbb69 100644 --- a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.Read.cs +++ b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.Read.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.InteropServices; using Microsoft.Win32.SafeHandles; diff --git a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.ReadDir.cs b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.ReadDir.cs index a55ca83204ce..cacb3664db07 100644 --- a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.ReadDir.cs +++ b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.ReadDir.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Diagnostics; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.ReadLink.cs b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.ReadLink.cs index f78fd1a80692..9a2d7d1e79d9 100644 --- a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.ReadLink.cs +++ b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.ReadLink.cs @@ -61,4 +61,4 @@ internal static partial class Sys } while (true); } } -} \ No newline at end of file +} diff --git a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.Stat.cs b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.Stat.cs index ff4699c78288..d06fbda71852 100644 --- a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.Stat.cs +++ b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.Stat.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Runtime.InteropServices; using Microsoft.Win32.SafeHandles; diff --git a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.SysConf.cs b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.SysConf.cs index 1482b2861476..be0c0dee7bb6 100644 --- a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.SysConf.cs +++ b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.SysConf.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.InteropServices; internal static partial class Interop diff --git a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.SysLog.cs b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.SysLog.cs index 85eef433837f..6b6a74b7436b 100644 --- a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.SysLog.cs +++ b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.SysLog.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.InteropServices; internal static partial class Interop diff --git a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.Unlink.cs b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.Unlink.cs index bbeb8896e873..829210fa7e03 100644 --- a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.Unlink.cs +++ b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.Unlink.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.Write.cs b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.Write.cs index 761cd1635361..fb06d463beb7 100644 --- a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.Write.cs +++ b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.Write.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.InteropServices; using Microsoft.Win32.SafeHandles; diff --git a/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.ActivityControl.cs b/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.ActivityControl.cs index 670ac61334fb..27dce5853861 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.ActivityControl.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.ActivityControl.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable internal partial class Interop { internal partial class Advapi32 diff --git a/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.EVENT_INFO_CLASS.cs b/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.EVENT_INFO_CLASS.cs index 0b007d17a137..36abdb41905e 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.EVENT_INFO_CLASS.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.EVENT_INFO_CLASS.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable internal partial class Interop { internal partial class Advapi32 diff --git a/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.EtwEnableCallback.cs b/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.EtwEnableCallback.cs index 560b3ba5b1b9..6bb157520f35 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.EtwEnableCallback.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.EtwEnableCallback.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.EventActivityIdControl.cs b/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.EventActivityIdControl.cs index f041822c7bba..886ff37d19fe 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.EventActivityIdControl.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.EventActivityIdControl.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.EventRegister.cs b/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.EventRegister.cs index 436d8b731f87..f5d245ec5d68 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.EventRegister.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.EventRegister.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.EventSetInformation.cs b/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.EventSetInformation.cs index 919a868a8c23..90286b27be63 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.EventSetInformation.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.EventSetInformation.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.InteropServices; internal partial class Interop diff --git a/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.EventTraceGuidsEx.cs b/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.EventTraceGuidsEx.cs index 657611032d15..0e7c3cc64510 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.EventTraceGuidsEx.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.EventTraceGuidsEx.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.InteropServices; internal partial class Interop diff --git a/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.EventUnregister.cs b/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.EventUnregister.cs index 79f9e3a9d461..3fb5a75b1ae6 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.EventUnregister.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.EventUnregister.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.InteropServices; internal partial class Interop diff --git a/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.EventWriteString.cs b/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.EventWriteString.cs index 6e4fdaed45d2..4ee30f62de6e 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.EventWriteString.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.EventWriteString.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.InteropServices; internal partial class Interop diff --git a/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.EventWriteTransfer.cs b/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.EventWriteTransfer.cs index 2821fff278c3..2d3f45e839be 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.EventWriteTransfer.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.EventWriteTransfer.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Runtime.InteropServices; #if ES_BUILD_STANDALONE diff --git a/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.LookupAccountNameW.cs b/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.LookupAccountNameW.cs index bef8afa434bb..2aa5851a4aa2 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.LookupAccountNameW.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.LookupAccountNameW.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.InteropServices; internal partial class Interop diff --git a/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.RegCloseKey.cs b/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.RegCloseKey.cs index e27966978231..375376d52a01 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.RegCloseKey.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.RegCloseKey.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.RegDeleteKeyEx.cs b/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.RegDeleteKeyEx.cs index 01c4cea4086a..c949cc15ff1f 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.RegDeleteKeyEx.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.RegDeleteKeyEx.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable #if REGISTRY_ASSEMBLY using Microsoft.Win32.SafeHandles; #else diff --git a/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.RegFlushKey.cs b/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.RegFlushKey.cs index 3a867a2e31be..fa56f483990a 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.RegFlushKey.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.RegFlushKey.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable #if REGISTRY_ASSEMBLY using Microsoft.Win32.SafeHandles; #else diff --git a/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.RegistryConstants.cs b/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.RegistryConstants.cs index b358f9fee081..bdb89702f8c3 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.RegistryConstants.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Advapi32/Interop.RegistryConstants.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable internal partial class Interop { internal partial class Advapi32 diff --git a/src/Common/src/CoreLib/Interop/Windows/BCrypt/Interop.BCryptGenRandom.GetRandomBytes.cs b/src/Common/src/CoreLib/Interop/Windows/BCrypt/Interop.BCryptGenRandom.GetRandomBytes.cs index 50bc5281586c..4d75163d4b41 100644 --- a/src/Common/src/CoreLib/Interop/Windows/BCrypt/Interop.BCryptGenRandom.GetRandomBytes.cs +++ b/src/Common/src/CoreLib/Interop/Windows/BCrypt/Interop.BCryptGenRandom.GetRandomBytes.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Diagnostics; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/Interop/Windows/BCrypt/Interop.BCryptGenRandom.cs b/src/Common/src/CoreLib/Interop/Windows/BCrypt/Interop.BCryptGenRandom.cs index d877dd255ce1..9d072a3b01e6 100644 --- a/src/Common/src/CoreLib/Interop/Windows/BCrypt/Interop.BCryptGenRandom.cs +++ b/src/Common/src/CoreLib/Interop/Windows/BCrypt/Interop.BCryptGenRandom.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Diagnostics; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/Interop/Windows/BCrypt/Interop.NTSTATUS.cs b/src/Common/src/CoreLib/Interop/Windows/BCrypt/Interop.NTSTATUS.cs index 74079f8f80ad..29aaa2904bff 100644 --- a/src/Common/src/CoreLib/Interop/Windows/BCrypt/Interop.NTSTATUS.cs +++ b/src/Common/src/CoreLib/Interop/Windows/BCrypt/Interop.NTSTATUS.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; internal partial class Interop diff --git a/src/Common/src/CoreLib/Interop/Windows/Crypt32/Interop.CryptProtectMemory.cs b/src/Common/src/CoreLib/Interop/Windows/Crypt32/Interop.CryptProtectMemory.cs index a60dc8eeecac..b10cb6a0410b 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Crypt32/Interop.CryptProtectMemory.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Crypt32/Interop.CryptProtectMemory.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Runtime.InteropServices; using System.Security; diff --git a/src/Common/src/CoreLib/Interop/Windows/Interop.BOOL.cs b/src/Common/src/CoreLib/Interop/Windows/Interop.BOOL.cs index 8a89556e59b0..9f4dab8935d2 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Interop.BOOL.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Interop.BOOL.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable internal partial class Interop { /// diff --git a/src/Common/src/CoreLib/Interop/Windows/Interop.BOOLEAN.cs b/src/Common/src/CoreLib/Interop/Windows/Interop.BOOLEAN.cs index 154ecbec7275..4874734534df 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Interop.BOOLEAN.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Interop.BOOLEAN.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable internal partial class Interop { /// diff --git a/src/Common/src/CoreLib/Interop/Windows/Interop.Errors.cs b/src/Common/src/CoreLib/Interop/Windows/Interop.Errors.cs index ea9ce0b8a35a..2e4683dfd70a 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Interop.Errors.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Interop.Errors.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable internal partial class Interop { // As defined in winerror.h and https://msdn.microsoft.com/en-us/library/windows/desktop/ms681382.aspx diff --git a/src/Common/src/CoreLib/Interop/Windows/Interop.Libraries.cs b/src/Common/src/CoreLib/Interop/Windows/Interop.Libraries.cs index 80321fb07af8..8cbc8bfb266b 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Interop.Libraries.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Interop.Libraries.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable internal static partial class Interop { internal static partial class Libraries diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.CREATEFILE2_EXTENDED_PARAMETERS.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.CREATEFILE2_EXTENDED_PARAMETERS.cs index 3330d32f9a89..16365ee65119 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.CREATEFILE2_EXTENDED_PARAMETERS.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.CREATEFILE2_EXTENDED_PARAMETERS.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using Microsoft.Win32.SafeHandles; using System; using System.IO; diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.CancelIoEx.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.CancelIoEx.cs index 85809e1ed202..fc99e3052f6d 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.CancelIoEx.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.CancelIoEx.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using Microsoft.Win32.SafeHandles; using System.Runtime.InteropServices; using System.Threading; diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.CloseHandle.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.CloseHandle.cs index fd194166709f..ff41f939f1c6 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.CloseHandle.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.CloseHandle.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.Constants.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.Constants.cs index dc7dfef34e9e..b13cdfd03fed 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.Constants.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.Constants.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable internal static partial class Interop { internal static partial class Kernel32 diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.CreateFile.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.CreateFile.cs index 99ef2b28d792..d925be1c949a 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.CreateFile.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.CreateFile.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using Microsoft.Win32.SafeHandles; using System; using System.Diagnostics; diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.CreateFile2.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.CreateFile2.cs index f6fde1230e6a..886698255258 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.CreateFile2.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.CreateFile2.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using Microsoft.Win32.SafeHandles; using System.Diagnostics; using System.IO; diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.EventWaitHandle.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.EventWaitHandle.cs index 8ff166c95845..dabe8c2dc2bd 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.EventWaitHandle.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.EventWaitHandle.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using Microsoft.Win32.SafeHandles; using System; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.ExpandEnvironmentStrings.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.ExpandEnvironmentStrings.cs index 67804d4a737b..ce3db6f2b458 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.ExpandEnvironmentStrings.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.ExpandEnvironmentStrings.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.InteropServices; internal partial class Interop diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.FILE_INFO_BY_HANDLE_CLASS.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.FILE_INFO_BY_HANDLE_CLASS.cs index c619115fdd49..e31a453ba943 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.FILE_INFO_BY_HANDLE_CLASS.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.FILE_INFO_BY_HANDLE_CLASS.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using Microsoft.Win32.SafeHandles; using System; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.FILE_TIME.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.FILE_TIME.cs index 713e9577eda2..d3b055e287db 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.FILE_TIME.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.FILE_TIME.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; internal partial class Interop diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.FileAttributes.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.FileAttributes.cs index 8103870deae8..725a25a7193a 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.FileAttributes.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.FileAttributes.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable internal partial class Interop { internal partial class Kernel32 diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.FileTimeToSystemTime.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.FileTimeToSystemTime.cs index f8c1be93f5b7..067ee715870c 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.FileTimeToSystemTime.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.FileTimeToSystemTime.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.FileTypes.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.FileTypes.cs index a4330f53389b..9d52f1f4f42d 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.FileTypes.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.FileTypes.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable internal partial class Interop { internal partial class Kernel32 diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.FindClose.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.FindClose.cs index de11958fe369..fcf9254acaae 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.FindClose.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.FindClose.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using Microsoft.Win32.SafeHandles; using System; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.FlushFileBuffers.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.FlushFileBuffers.cs index 5d0f0dcea7cc..e10a2279cff1 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.FlushFileBuffers.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.FlushFileBuffers.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using Microsoft.Win32.SafeHandles; using System; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.FormatMessage.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.FormatMessage.cs index bfa40819a1e0..09001e81e064 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.FormatMessage.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.FormatMessage.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.FreeEnvironmentStrings.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.FreeEnvironmentStrings.cs index 7c317e2665a9..c372a8553ecb 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.FreeEnvironmentStrings.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.FreeEnvironmentStrings.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.InteropServices; internal partial class Interop diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.FreeLibrary.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.FreeLibrary.cs index b6b8ed670182..c70865350aeb 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.FreeLibrary.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.FreeLibrary.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GET_FILEEX_INFO_LEVELS.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GET_FILEEX_INFO_LEVELS.cs index 28c30d57b49a..76e43f64af77 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GET_FILEEX_INFO_LEVELS.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GET_FILEEX_INFO_LEVELS.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable internal partial class Interop { internal partial class Kernel32 diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetCPInfo.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetCPInfo.cs index 98537ec330b8..8d523e41e9ac 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetCPInfo.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetCPInfo.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.InteropServices; internal partial class Interop diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetCurrentDirectory.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetCurrentDirectory.cs index 2f2eb48bbd5e..611cc70d289d 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetCurrentDirectory.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetCurrentDirectory.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.InteropServices; internal partial class Interop diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetCurrentProcessId.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetCurrentProcessId.cs index b71fb4e6f22f..3a1a353d8620 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetCurrentProcessId.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetCurrentProcessId.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.InteropServices; internal partial class Interop diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetCurrentProcess_IntPtr.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetCurrentProcess_IntPtr.cs index 7b9ea6661897..c99351950a83 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetCurrentProcess_IntPtr.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetCurrentProcess_IntPtr.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetCurrentThreadId.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetCurrentThreadId.cs index 0599f4c59023..d456db752257 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetCurrentThreadId.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetCurrentThreadId.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetEnvironmentStrings.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetEnvironmentStrings.cs index 9d25bed4800e..29a686026a27 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetEnvironmentStrings.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetEnvironmentStrings.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.InteropServices; internal partial class Interop diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetEnvironmentVariable.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetEnvironmentVariable.cs index d591219b12ae..13adefc21634 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetEnvironmentVariable.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetEnvironmentVariable.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetFileInformationByHandleEx.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetFileInformationByHandleEx.cs index 78c9e7071fe0..1106cff1c58f 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetFileInformationByHandleEx.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetFileInformationByHandleEx.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using Microsoft.Win32.SafeHandles; using System; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetFileType_SafeHandle.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetFileType_SafeHandle.cs index 3f9e6271b5b5..faa57cc2f121 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetFileType_SafeHandle.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetFileType_SafeHandle.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using Microsoft.Win32.SafeHandles; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetFullPathNameW.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetFullPathNameW.cs index 38b7cdd2e63f..197b0a9be523 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetFullPathNameW.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetFullPathNameW.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetLogicalDrives.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetLogicalDrives.cs index c69f7d30c204..657188f255e2 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetLogicalDrives.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetLogicalDrives.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.InteropServices; internal partial class Interop diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetLongPathNameW.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetLongPathNameW.cs index dd497bf6d92c..81b4d096f564 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetLongPathNameW.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetLongPathNameW.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetProcessInformation.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetProcessInformation.cs index 76027483f23a..22e056937548 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetProcessInformation.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetProcessInformation.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetProcessTimes.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetProcessTimes.cs index 7b72ca773207..03c6c080c7d9 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetProcessTimes.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetProcessTimes.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetStdHandle.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetStdHandle.cs index ae54f641d60d..f2b54c9728a2 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetStdHandle.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetStdHandle.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetSystemDirectoryW.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetSystemDirectoryW.cs index a7cd273098c3..197f6f5eadcd 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetSystemDirectoryW.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetSystemDirectoryW.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.InteropServices; internal static partial class Interop diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetSystemInfo.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetSystemInfo.cs index 56210558d2d1..cbf07eae7ffa 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetSystemInfo.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetSystemInfo.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetSystemTime.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetSystemTime.cs index b51cfa396e1a..710db5e4b99f 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetSystemTime.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetSystemTime.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetSystemTimeAsFileTime.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetSystemTimeAsFileTime.cs index 70363ce6961f..e2dcd906c2ad 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetSystemTimeAsFileTime.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetSystemTimeAsFileTime.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetSystemTimePreciseAsFileTime.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetSystemTimePreciseAsFileTime.cs index 8c86d952870b..e3262799d132 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetSystemTimePreciseAsFileTime.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetSystemTimePreciseAsFileTime.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetSystemTimes.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetSystemTimes.cs index 12d5a4aa57d4..d9e858062c7d 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetSystemTimes.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetSystemTimes.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetTempFileNameW.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetTempFileNameW.cs index 0afc4481be75..97e1d82847a6 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetTempFileNameW.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetTempFileNameW.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.InteropServices; internal partial class Interop diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetTempPathW.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetTempPathW.cs index 68ff9aca40f8..7f7bb775c85a 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetTempPathW.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetTempPathW.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.InteropServices; internal partial class Interop diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetVersionExW.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetVersionExW.cs index ab79ed2ea4f7..13a997a34400 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetVersionExW.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetVersionExW.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.InteropServices; internal partial class Interop diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GlobalMemoryStatusEx.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GlobalMemoryStatusEx.cs index 99dde8581597..6a87ec370b24 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GlobalMemoryStatusEx.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GlobalMemoryStatusEx.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.Globalization.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.Globalization.cs index 1312454eabbd..cab7537ced53 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.Globalization.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.Globalization.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.HandleTypes.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.HandleTypes.cs index 51f7c92f024f..c2096aa62b75 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.HandleTypes.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.HandleTypes.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable internal partial class Interop { internal partial class Kernel32 diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.IsWow64Process_IntPtr.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.IsWow64Process_IntPtr.cs index 5d064780bfec..7953da68daa5 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.IsWow64Process_IntPtr.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.IsWow64Process_IntPtr.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.LoadLibraryEx.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.LoadLibraryEx.cs index c3c6fcc118d1..4eef5852fe7e 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.LoadLibraryEx.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.LoadLibraryEx.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using Microsoft.Win32.SafeHandles; using System; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.LocalAlloc.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.LocalAlloc.cs index 55f76b4403c5..9c74adbe01a5 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.LocalAlloc.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.LocalAlloc.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.LockFile.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.LockFile.cs index 7d0a55ce644f..a21d00f4f665 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.LockFile.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.LockFile.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using Microsoft.Win32.SafeHandles; using System; using System.IO; diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.MAX_PATH.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.MAX_PATH.cs index 0a05230f1328..f7fa32669bad 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.MAX_PATH.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.MAX_PATH.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable internal partial class Interop { internal partial class Kernel32 diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.MEMORYSTATUSEX.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.MEMORYSTATUSEX.cs index 8ddac8e64f48..45f57aa4d83b 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.MEMORYSTATUSEX.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.MEMORYSTATUSEX.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.MEMORY_BASIC_INFORMATION.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.MEMORY_BASIC_INFORMATION.cs index a14157fecc10..0744d53f66c5 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.MEMORY_BASIC_INFORMATION.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.MEMORY_BASIC_INFORMATION.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.MUI.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.MUI.cs index 024dd1fba49c..509d9a241107 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.MUI.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.MUI.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.MultiByteToWideChar.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.MultiByteToWideChar.cs index edabe9f9f6b9..158e4db3fd30 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.MultiByteToWideChar.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.MultiByteToWideChar.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.Mutex.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.Mutex.cs index ed25668a0001..46ddd12f9b43 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.Mutex.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.Mutex.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using Microsoft.Win32.SafeHandles; using System; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.OSVERSIONINFOEX.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.OSVERSIONINFOEX.cs index 19c32e07c183..1bfe00c57446 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.OSVERSIONINFOEX.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.OSVERSIONINFOEX.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.InteropServices; internal partial class Interop diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.OutputDebugString.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.OutputDebugString.cs index bc7c1c83be5a..8da50ff8ab3a 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.OutputDebugString.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.OutputDebugString.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.InteropServices; internal partial class Interop diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.QueryPerformanceCounter.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.QueryPerformanceCounter.cs index e0959f73daea..ddc9797e5f2a 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.QueryPerformanceCounter.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.QueryPerformanceCounter.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.InteropServices; internal partial class Interop diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.QueryPerformanceFrequency.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.QueryPerformanceFrequency.cs index 71fd3db6cb70..72a48ba208be 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.QueryPerformanceFrequency.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.QueryPerformanceFrequency.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.InteropServices; internal partial class Interop diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.QueryUnbiasedInterruptTime.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.QueryUnbiasedInterruptTime.cs index bdd77c180fb1..87ca7fd1d497 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.QueryUnbiasedInterruptTime.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.QueryUnbiasedInterruptTime.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.InteropServices; internal partial class Interop diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.ReadFile_SafeHandle_IntPtr.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.ReadFile_SafeHandle_IntPtr.cs index 67e317adf060..076f7f136fde 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.ReadFile_SafeHandle_IntPtr.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.ReadFile_SafeHandle_IntPtr.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using Microsoft.Win32.SafeHandles; using System; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.ReadFile_SafeHandle_NativeOverlapped.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.ReadFile_SafeHandle_NativeOverlapped.cs index 0687830057c1..3ae65a88069e 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.ReadFile_SafeHandle_NativeOverlapped.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.ReadFile_SafeHandle_NativeOverlapped.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using Microsoft.Win32.SafeHandles; using System; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.ResolveLocaleName.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.ResolveLocaleName.cs index 1a0e61317ceb..2d6b6c3c729e 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.ResolveLocaleName.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.ResolveLocaleName.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.SECURITY_ATTRIBUTES.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.SECURITY_ATTRIBUTES.cs index 16e9fec77394..8d31f8622ff4 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.SECURITY_ATTRIBUTES.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.SECURITY_ATTRIBUTES.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using Microsoft.Win32.SafeHandles; using System; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.SYSTEM_INFO.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.SYSTEM_INFO.cs index ab793a390b55..16e5bfd8da0c 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.SYSTEM_INFO.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.SYSTEM_INFO.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.SecurityOptions.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.SecurityOptions.cs index 4e94e3e5a856..4a4402484f2b 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.SecurityOptions.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.SecurityOptions.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable internal partial class Interop { internal partial class Kernel32 diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.Semaphore.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.Semaphore.cs index f453a255bdbf..cc2735945249 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.Semaphore.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.Semaphore.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using Microsoft.Win32.SafeHandles; using System; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.SetCurrentDirectory.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.SetCurrentDirectory.cs index 5cf23a8d471e..b30e5d765643 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.SetCurrentDirectory.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.SetCurrentDirectory.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.InteropServices; internal partial class Interop diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.SetEndOfFile.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.SetEndOfFile.cs index 2233e1f83815..e5d60041a8ed 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.SetEndOfFile.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.SetEndOfFile.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using Microsoft.Win32.SafeHandles; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.SetEnvironmentVariable.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.SetEnvironmentVariable.cs index 6a0fc1d4d96a..b94ec2111f5c 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.SetEnvironmentVariable.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.SetEnvironmentVariable.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.InteropServices; internal partial class Interop diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.SetFilePointerEx.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.SetFilePointerEx.cs index dbedf85cbead..c0e5247a5233 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.SetFilePointerEx.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.SetFilePointerEx.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using Microsoft.Win32.SafeHandles; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.SetThreadErrorMode.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.SetThreadErrorMode.cs index b5bd94508608..123eb75d7bee 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.SetThreadErrorMode.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.SetThreadErrorMode.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.InteropServices; internal partial class Interop diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.SystemTimeToFileTime.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.SystemTimeToFileTime.cs index cf81e3d29524..43db7b47164d 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.SystemTimeToFileTime.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.SystemTimeToFileTime.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.InteropServices; internal partial class Interop diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.TimeZone.Registry.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.TimeZone.Registry.cs index 30299ae709dd..062d1caebacc 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.TimeZone.Registry.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.TimeZone.Registry.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.TimeZone.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.TimeZone.cs index dc89af488a8c..68d4583b54a2 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.TimeZone.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.TimeZone.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.TzSpecificLocalTimeToSystemTime.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.TzSpecificLocalTimeToSystemTime.cs index e832e9341e6e..2cca7faed732 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.TzSpecificLocalTimeToSystemTime.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.TzSpecificLocalTimeToSystemTime.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.VerSetConditionMask.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.VerSetConditionMask.cs index 931faf5705da..385e48a43907 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.VerSetConditionMask.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.VerSetConditionMask.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.InteropServices; internal partial class Interop diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.VerifyVersionExW.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.VerifyVersionExW.cs index 90f5bdbe103f..5c2471cf4952 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.VerifyVersionExW.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.VerifyVersionExW.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.InteropServices; internal partial class Interop diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.VirtualAlloc.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.VirtualAlloc.cs index 944fb4e5eb62..a97dc1aec7bb 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.VirtualAlloc.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.VirtualAlloc.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.VirtualFree.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.VirtualFree.cs index 2b940a4210cf..574cd93a0a8f 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.VirtualFree.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.VirtualFree.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.VirtualQuery.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.VirtualQuery.cs index c7c02d687551..faab1cc81a61 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.VirtualQuery.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.VirtualQuery.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.WIN32_FILE_ATTRIBUTE_DATA.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.WIN32_FILE_ATTRIBUTE_DATA.cs index 1bd7ed084584..971b311244a7 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.WIN32_FILE_ATTRIBUTE_DATA.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.WIN32_FILE_ATTRIBUTE_DATA.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable internal partial class Interop { internal partial class Kernel32 diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.WIN32_FIND_DATA.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.WIN32_FIND_DATA.cs index f44400767885..c8d319d766d7 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.WIN32_FIND_DATA.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.WIN32_FIND_DATA.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.WideCharToMultiByte.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.WideCharToMultiByte.cs index 6e523e5b7b44..a06c9153f470 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.WideCharToMultiByte.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.WideCharToMultiByte.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.WriteFile_SafeHandle_IntPtr.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.WriteFile_SafeHandle_IntPtr.cs index 46948096ed72..69651ca1cab3 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.WriteFile_SafeHandle_IntPtr.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.WriteFile_SafeHandle_IntPtr.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using Microsoft.Win32.SafeHandles; using System; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.WriteFile_SafeHandle_NativeOverlapped.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.WriteFile_SafeHandle_NativeOverlapped.cs index 6816d59028ef..dc1e97555b89 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.WriteFile_SafeHandle_NativeOverlapped.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.WriteFile_SafeHandle_NativeOverlapped.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using Microsoft.Win32.SafeHandles; using System; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/Interop/Windows/Normaliz/Interop.Idna.cs b/src/Common/src/CoreLib/Interop/Windows/Normaliz/Interop.Idna.cs index 61b107bd5afc..f49ce8dd6170 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Normaliz/Interop.Idna.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Normaliz/Interop.Idna.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/Interop/Windows/Normaliz/Interop.Normalization.cs b/src/Common/src/CoreLib/Interop/Windows/Normaliz/Interop.Normalization.cs index d7f639b9653a..84664d51cb08 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Normaliz/Interop.Normalization.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Normaliz/Interop.Normalization.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/Interop/Windows/NtDll/Interop.NtQueryInformationFile.cs b/src/Common/src/CoreLib/Interop/Windows/NtDll/Interop.NtQueryInformationFile.cs index 96bc2986afa4..4ba39a74e2b2 100644 --- a/src/Common/src/CoreLib/Interop/Windows/NtDll/Interop.NtQueryInformationFile.cs +++ b/src/Common/src/CoreLib/Interop/Windows/NtDll/Interop.NtQueryInformationFile.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using Microsoft.Win32.SafeHandles; using System; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/Interop/Windows/NtDll/Interop.NtQuerySystemInformation.cs b/src/Common/src/CoreLib/Interop/Windows/NtDll/Interop.NtQuerySystemInformation.cs index 1115926bba43..16f05e338cd9 100644 --- a/src/Common/src/CoreLib/Interop/Windows/NtDll/Interop.NtQuerySystemInformation.cs +++ b/src/Common/src/CoreLib/Interop/Windows/NtDll/Interop.NtQuerySystemInformation.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/Interop/Windows/Ole32/Interop.CoCreateGuid.cs b/src/Common/src/CoreLib/Interop/Windows/Ole32/Interop.CoCreateGuid.cs index db5c04aeff03..57accbe7c008 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Ole32/Interop.CoCreateGuid.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Ole32/Interop.CoCreateGuid.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/Interop/Windows/Ole32/Interop.CoTaskMemAlloc.cs b/src/Common/src/CoreLib/Interop/Windows/Ole32/Interop.CoTaskMemAlloc.cs index 335531d77a54..9119ee774e5f 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Ole32/Interop.CoTaskMemAlloc.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Ole32/Interop.CoTaskMemAlloc.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/Interop/Windows/OleAut32/Interop.SysAllocStringByteLen.cs b/src/Common/src/CoreLib/Interop/Windows/OleAut32/Interop.SysAllocStringByteLen.cs index 6cec249eba59..846283a67420 100644 --- a/src/Common/src/CoreLib/Interop/Windows/OleAut32/Interop.SysAllocStringByteLen.cs +++ b/src/Common/src/CoreLib/Interop/Windows/OleAut32/Interop.SysAllocStringByteLen.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/Interop/Windows/OleAut32/Interop.SysAllocStringLen.cs b/src/Common/src/CoreLib/Interop/Windows/OleAut32/Interop.SysAllocStringLen.cs index 67bd4f0bc05a..4980844deaac 100644 --- a/src/Common/src/CoreLib/Interop/Windows/OleAut32/Interop.SysAllocStringLen.cs +++ b/src/Common/src/CoreLib/Interop/Windows/OleAut32/Interop.SysAllocStringLen.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Runtime.InteropServices; using System.Security; diff --git a/src/Common/src/CoreLib/Interop/Windows/OleAut32/Interop.SysFreeString.cs b/src/Common/src/CoreLib/Interop/Windows/OleAut32/Interop.SysFreeString.cs index 8e1c9d8f2e4c..8673cc672411 100644 --- a/src/Common/src/CoreLib/Interop/Windows/OleAut32/Interop.SysFreeString.cs +++ b/src/Common/src/CoreLib/Interop/Windows/OleAut32/Interop.SysFreeString.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/Interop/Windows/OleAut32/Interop.SysStringLen.cs b/src/Common/src/CoreLib/Interop/Windows/OleAut32/Interop.SysStringLen.cs index 7bd214ac6733..cf65d6b086cf 100644 --- a/src/Common/src/CoreLib/Interop/Windows/OleAut32/Interop.SysStringLen.cs +++ b/src/Common/src/CoreLib/Interop/Windows/OleAut32/Interop.SysStringLen.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Runtime.InteropServices; using System.Security; diff --git a/src/Common/src/CoreLib/Interop/Windows/Secur32/Interop.GetUserNameExW.cs b/src/Common/src/CoreLib/Interop/Windows/Secur32/Interop.GetUserNameExW.cs index e91506bf4e43..cf0dd5f698fb 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Secur32/Interop.GetUserNameExW.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Secur32/Interop.GetUserNameExW.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.InteropServices; internal partial class Interop diff --git a/src/Common/src/CoreLib/Interop/Windows/Shell32/Interop.SHGetKnownFolderPath.cs b/src/Common/src/CoreLib/Interop/Windows/Shell32/Interop.SHGetKnownFolderPath.cs index c6bc10a95f81..1090805c0e04 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Shell32/Interop.SHGetKnownFolderPath.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Shell32/Interop.SHGetKnownFolderPath.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/Interop/Windows/User32/Interop.Constants.cs b/src/Common/src/CoreLib/Interop/Windows/User32/Interop.Constants.cs index 2cc835fad951..f1f09740e90f 100644 --- a/src/Common/src/CoreLib/Interop/Windows/User32/Interop.Constants.cs +++ b/src/Common/src/CoreLib/Interop/Windows/User32/Interop.Constants.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable internal partial class Interop { internal partial class User32 diff --git a/src/Common/src/CoreLib/Interop/Windows/User32/Interop.LoadString.cs b/src/Common/src/CoreLib/Interop/Windows/User32/Interop.LoadString.cs index d7239a3c4ac0..078ebd481dd6 100644 --- a/src/Common/src/CoreLib/Interop/Windows/User32/Interop.LoadString.cs +++ b/src/Common/src/CoreLib/Interop/Windows/User32/Interop.LoadString.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.InteropServices; using Microsoft.Win32.SafeHandles; diff --git a/src/Common/src/CoreLib/Interop/Windows/User32/Interop.SendMessageTimeout.cs b/src/Common/src/CoreLib/Interop/Windows/User32/Interop.SendMessageTimeout.cs index 2c1bcc6c3222..c8a97e6b9dbf 100644 --- a/src/Common/src/CoreLib/Interop/Windows/User32/Interop.SendMessageTimeout.cs +++ b/src/Common/src/CoreLib/Interop/Windows/User32/Interop.SendMessageTimeout.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/Microsoft/Win32/SafeHandles/CriticalHandleMinusOneIsInvalid.cs b/src/Common/src/CoreLib/Microsoft/Win32/SafeHandles/CriticalHandleMinusOneIsInvalid.cs index 8576dacc3d0c..a76c51d96660 100644 --- a/src/Common/src/CoreLib/Microsoft/Win32/SafeHandles/CriticalHandleMinusOneIsInvalid.cs +++ b/src/Common/src/CoreLib/Microsoft/Win32/SafeHandles/CriticalHandleMinusOneIsInvalid.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/Microsoft/Win32/SafeHandles/CriticalHandleZeroOrMinusOneIsInvalid.cs b/src/Common/src/CoreLib/Microsoft/Win32/SafeHandles/CriticalHandleZeroOrMinusOneIsInvalid.cs index 2b61f6248ac0..28d021948962 100644 --- a/src/Common/src/CoreLib/Microsoft/Win32/SafeHandles/CriticalHandleZeroOrMinusOneIsInvalid.cs +++ b/src/Common/src/CoreLib/Microsoft/Win32/SafeHandles/CriticalHandleZeroOrMinusOneIsInvalid.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/Microsoft/Win32/SafeHandles/SafeFileHandle.Unix.cs b/src/Common/src/CoreLib/Microsoft/Win32/SafeHandles/SafeFileHandle.Unix.cs index ec99cbf17eb3..602537a30561 100644 --- a/src/Common/src/CoreLib/Microsoft/Win32/SafeHandles/SafeFileHandle.Unix.cs +++ b/src/Common/src/CoreLib/Microsoft/Win32/SafeHandles/SafeFileHandle.Unix.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Diagnostics; using System.IO; diff --git a/src/Common/src/CoreLib/Microsoft/Win32/SafeHandles/SafeFileHandle.Windows.cs b/src/Common/src/CoreLib/Microsoft/Win32/SafeHandles/SafeFileHandle.Windows.cs index db8482ed712c..a53046cc182a 100644 --- a/src/Common/src/CoreLib/Microsoft/Win32/SafeHandles/SafeFileHandle.Windows.cs +++ b/src/Common/src/CoreLib/Microsoft/Win32/SafeHandles/SafeFileHandle.Windows.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Security; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/Microsoft/Win32/SafeHandles/SafeFindHandle.Windows.cs b/src/Common/src/CoreLib/Microsoft/Win32/SafeHandles/SafeFindHandle.Windows.cs index 192f523ff162..4ba05409fd92 100644 --- a/src/Common/src/CoreLib/Microsoft/Win32/SafeHandles/SafeFindHandle.Windows.cs +++ b/src/Common/src/CoreLib/Microsoft/Win32/SafeHandles/SafeFindHandle.Windows.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Security; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/Microsoft/Win32/SafeHandles/SafeHandleMinusOneIsInvalid.cs b/src/Common/src/CoreLib/Microsoft/Win32/SafeHandles/SafeHandleMinusOneIsInvalid.cs index b146b5a68713..5415f2c35d31 100644 --- a/src/Common/src/CoreLib/Microsoft/Win32/SafeHandles/SafeHandleMinusOneIsInvalid.cs +++ b/src/Common/src/CoreLib/Microsoft/Win32/SafeHandles/SafeHandleMinusOneIsInvalid.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/Microsoft/Win32/SafeHandles/SafeHandleZeroOrMinusOneIsInvalid.cs b/src/Common/src/CoreLib/Microsoft/Win32/SafeHandles/SafeHandleZeroOrMinusOneIsInvalid.cs index 9a58aa29fed2..8d0220bf905e 100644 --- a/src/Common/src/CoreLib/Microsoft/Win32/SafeHandles/SafeHandleZeroOrMinusOneIsInvalid.cs +++ b/src/Common/src/CoreLib/Microsoft/Win32/SafeHandles/SafeHandleZeroOrMinusOneIsInvalid.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/Microsoft/Win32/SafeHandles/SafeLibraryHandle.cs b/src/Common/src/CoreLib/Microsoft/Win32/SafeHandles/SafeLibraryHandle.cs index dea7978ee8ec..3be2e354abf3 100644 --- a/src/Common/src/CoreLib/Microsoft/Win32/SafeHandles/SafeLibraryHandle.cs +++ b/src/Common/src/CoreLib/Microsoft/Win32/SafeHandles/SafeLibraryHandle.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace Microsoft.Win32.SafeHandles { sealed internal class SafeLibraryHandle : SafeHandleZeroOrMinusOneIsInvalid diff --git a/src/Common/src/CoreLib/Microsoft/Win32/SafeHandles/SafeRegistryHandle.Windows.cs b/src/Common/src/CoreLib/Microsoft/Win32/SafeHandles/SafeRegistryHandle.Windows.cs index 011aaeae662f..249f5e9f7c24 100644 --- a/src/Common/src/CoreLib/Microsoft/Win32/SafeHandles/SafeRegistryHandle.Windows.cs +++ b/src/Common/src/CoreLib/Microsoft/Win32/SafeHandles/SafeRegistryHandle.Windows.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using Microsoft.Win32.SafeHandles; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/Microsoft/Win32/SafeHandles/SafeRegistryHandle.cs b/src/Common/src/CoreLib/Microsoft/Win32/SafeHandles/SafeRegistryHandle.cs index c3a7fcad885d..37e350031b83 100644 --- a/src/Common/src/CoreLib/Microsoft/Win32/SafeHandles/SafeRegistryHandle.cs +++ b/src/Common/src/CoreLib/Microsoft/Win32/SafeHandles/SafeRegistryHandle.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using Microsoft.Win32.SafeHandles; using System; diff --git a/src/Common/src/CoreLib/Microsoft/Win32/SafeHandles/SafeWaitHandle.Windows.cs b/src/Common/src/CoreLib/Microsoft/Win32/SafeHandles/SafeWaitHandle.Windows.cs index e87fedd724a0..66f17f0af709 100644 --- a/src/Common/src/CoreLib/Microsoft/Win32/SafeHandles/SafeWaitHandle.Windows.cs +++ b/src/Common/src/CoreLib/Microsoft/Win32/SafeHandles/SafeWaitHandle.Windows.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace Microsoft.Win32.SafeHandles { public sealed partial class SafeWaitHandle : SafeHandleZeroOrMinusOneIsInvalid diff --git a/src/Common/src/CoreLib/Microsoft/Win32/SafeHandles/SafeWaitHandle.cs b/src/Common/src/CoreLib/Microsoft/Win32/SafeHandles/SafeWaitHandle.cs index f2e81eacd8c5..edb0cdfcafe7 100644 --- a/src/Common/src/CoreLib/Microsoft/Win32/SafeHandles/SafeWaitHandle.cs +++ b/src/Common/src/CoreLib/Microsoft/Win32/SafeHandles/SafeWaitHandle.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; namespace Microsoft.Win32.SafeHandles diff --git a/src/Common/src/CoreLib/System.Private.CoreLib.Shared.projitems b/src/Common/src/CoreLib/System.Private.CoreLib.Shared.projitems index dd58b4d94361..35b10dbdc2fe 100644 --- a/src/Common/src/CoreLib/System.Private.CoreLib.Shared.projitems +++ b/src/Common/src/CoreLib/System.Private.CoreLib.Shared.projitems @@ -7,6 +7,9 @@ + + enable + false false diff --git a/src/Common/src/CoreLib/System/AccessViolationException.cs b/src/Common/src/CoreLib/System/AccessViolationException.cs index 357930898ca7..11590028d5a8 100644 --- a/src/Common/src/CoreLib/System/AccessViolationException.cs +++ b/src/Common/src/CoreLib/System/AccessViolationException.cs @@ -11,7 +11,6 @@ ** =============================================================================*/ -#nullable enable using System; using System.Runtime.Serialization; diff --git a/src/Common/src/CoreLib/System/Action.cs b/src/Common/src/CoreLib/System/Action.cs index 4c840379c843..54ca7aaf5323 100644 --- a/src/Common/src/CoreLib/System/Action.cs +++ b/src/Common/src/CoreLib/System/Action.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System { public delegate void Action(); diff --git a/src/Common/src/CoreLib/System/Activator.RuntimeType.cs b/src/Common/src/CoreLib/System/Activator.RuntimeType.cs index 1db47eec2247..bd7670f9e312 100644 --- a/src/Common/src/CoreLib/System/Activator.RuntimeType.cs +++ b/src/Common/src/CoreLib/System/Activator.RuntimeType.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Reflection; using System.Globalization; using System.Runtime.Loader; diff --git a/src/Common/src/CoreLib/System/Activator.cs b/src/Common/src/CoreLib/System/Activator.cs index b4e5ddfeea24..8d6610f6a94f 100644 --- a/src/Common/src/CoreLib/System/Activator.cs +++ b/src/Common/src/CoreLib/System/Activator.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; using System.Globalization; using System.Reflection; diff --git a/src/Common/src/CoreLib/System/AggregateException.cs b/src/Common/src/CoreLib/System/AggregateException.cs index d0043cfc908a..08cda7c38834 100644 --- a/src/Common/src/CoreLib/System/AggregateException.cs +++ b/src/Common/src/CoreLib/System/AggregateException.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Collections.Generic; using System.Collections.ObjectModel; diff --git a/src/Common/src/CoreLib/System/AppContext.cs b/src/Common/src/CoreLib/System/AppContext.cs index fcda485fa149..15b735160c53 100644 --- a/src/Common/src/CoreLib/System/AppContext.cs +++ b/src/Common/src/CoreLib/System/AppContext.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Collections.Generic; using System.Reflection; using System.Runtime.ExceptionServices; diff --git a/src/Common/src/CoreLib/System/AppDomain.cs b/src/Common/src/CoreLib/System/AppDomain.cs index a5399178b156..34e26efc56b3 100644 --- a/src/Common/src/CoreLib/System/AppDomain.cs +++ b/src/Common/src/CoreLib/System/AppDomain.cs @@ -4,7 +4,6 @@ #pragma warning disable CS0067 // events are declared but not used -#nullable enable using System.Diagnostics; using System.IO; using System.Reflection; diff --git a/src/Common/src/CoreLib/System/AppDomainSetup.cs b/src/Common/src/CoreLib/System/AppDomainSetup.cs index e8d0b9fff4f3..4537dcdf94e5 100644 --- a/src/Common/src/CoreLib/System/AppDomainSetup.cs +++ b/src/Common/src/CoreLib/System/AppDomainSetup.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System { #if PROJECTN diff --git a/src/Common/src/CoreLib/System/ApplicationException.cs b/src/Common/src/CoreLib/System/ApplicationException.cs index 5042b112cdbd..875b54a2a6a2 100644 --- a/src/Common/src/CoreLib/System/ApplicationException.cs +++ b/src/Common/src/CoreLib/System/ApplicationException.cs @@ -12,7 +12,6 @@ ** =============================================================================*/ -#nullable enable using System.Runtime.Serialization; namespace System diff --git a/src/Common/src/CoreLib/System/ArgumentException.cs b/src/Common/src/CoreLib/System/ArgumentException.cs index be7ffbe7fa70..6e38c7b3f2d1 100644 --- a/src/Common/src/CoreLib/System/ArgumentException.cs +++ b/src/Common/src/CoreLib/System/ArgumentException.cs @@ -11,7 +11,6 @@ ** =============================================================================*/ -#nullable enable using System.Globalization; using System.Runtime.Serialization; diff --git a/src/Common/src/CoreLib/System/ArgumentNullException.cs b/src/Common/src/CoreLib/System/ArgumentNullException.cs index 206c1a055bed..bf0d205fe701 100644 --- a/src/Common/src/CoreLib/System/ArgumentNullException.cs +++ b/src/Common/src/CoreLib/System/ArgumentNullException.cs @@ -11,7 +11,6 @@ ** =============================================================================*/ -#nullable enable using System.Runtime.Serialization; namespace System diff --git a/src/Common/src/CoreLib/System/ArgumentOutOfRangeException.cs b/src/Common/src/CoreLib/System/ArgumentOutOfRangeException.cs index 7ca9085c6335..8c47541b10d4 100644 --- a/src/Common/src/CoreLib/System/ArgumentOutOfRangeException.cs +++ b/src/Common/src/CoreLib/System/ArgumentOutOfRangeException.cs @@ -11,7 +11,6 @@ ** =============================================================================*/ -#nullable enable using System.Globalization; using System.Runtime.Serialization; diff --git a/src/Common/src/CoreLib/System/ArithmeticException.cs b/src/Common/src/CoreLib/System/ArithmeticException.cs index 5521c39a2f5a..a5028dbd79b2 100644 --- a/src/Common/src/CoreLib/System/ArithmeticException.cs +++ b/src/Common/src/CoreLib/System/ArithmeticException.cs @@ -11,7 +11,6 @@ ** =============================================================================*/ -#nullable enable using System.Runtime.Serialization; namespace System diff --git a/src/Common/src/CoreLib/System/Array.Enumerators.cs b/src/Common/src/CoreLib/System/Array.Enumerators.cs index 4547af13dda5..dd46dc82d8d8 100644 --- a/src/Common/src/CoreLib/System/Array.Enumerators.cs +++ b/src/Common/src/CoreLib/System/Array.Enumerators.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Collections; using System.Collections.Generic; using System.Diagnostics; diff --git a/src/Common/src/CoreLib/System/Array.cs b/src/Common/src/CoreLib/System/Array.cs index 6bda3a65733b..0ce724a8e82c 100644 --- a/src/Common/src/CoreLib/System/Array.cs +++ b/src/Common/src/CoreLib/System/Array.cs @@ -10,7 +10,6 @@ using System.Runtime.InteropServices; using Internal.Runtime.CompilerServices; -#nullable enable namespace System { [Serializable] diff --git a/src/Common/src/CoreLib/System/ArraySegment.cs b/src/Common/src/CoreLib/System/ArraySegment.cs index 58eb506f67d6..8098d220db73 100644 --- a/src/Common/src/CoreLib/System/ArraySegment.cs +++ b/src/Common/src/CoreLib/System/ArraySegment.cs @@ -13,7 +13,6 @@ ** ===========================================================*/ -#nullable enable using System.Collections; using System.Collections.Generic; using System.Diagnostics; diff --git a/src/Common/src/CoreLib/System/ArrayTypeMismatchException.cs b/src/Common/src/CoreLib/System/ArrayTypeMismatchException.cs index c2a6244e5019..263b69e636cd 100644 --- a/src/Common/src/CoreLib/System/ArrayTypeMismatchException.cs +++ b/src/Common/src/CoreLib/System/ArrayTypeMismatchException.cs @@ -11,7 +11,6 @@ ** =============================================================================*/ -#nullable enable using System.Runtime.Serialization; namespace System diff --git a/src/Common/src/CoreLib/System/AssemblyLoadEventArgs.cs b/src/Common/src/CoreLib/System/AssemblyLoadEventArgs.cs index 43b32d74cfd5..d7e524969330 100644 --- a/src/Common/src/CoreLib/System/AssemblyLoadEventArgs.cs +++ b/src/Common/src/CoreLib/System/AssemblyLoadEventArgs.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Reflection; namespace System diff --git a/src/Common/src/CoreLib/System/AssemblyLoadEventHandler.cs b/src/Common/src/CoreLib/System/AssemblyLoadEventHandler.cs index af89e634b33a..0d5a2823c919 100644 --- a/src/Common/src/CoreLib/System/AssemblyLoadEventHandler.cs +++ b/src/Common/src/CoreLib/System/AssemblyLoadEventHandler.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System { public delegate void AssemblyLoadEventHandler(object? sender, AssemblyLoadEventArgs args); diff --git a/src/Common/src/CoreLib/System/AsyncCallback.cs b/src/Common/src/CoreLib/System/AsyncCallback.cs index f06749f60b21..036d44a4b97d 100644 --- a/src/Common/src/CoreLib/System/AsyncCallback.cs +++ b/src/Common/src/CoreLib/System/AsyncCallback.cs @@ -10,7 +10,6 @@ ** ===========================================================*/ -#nullable enable namespace System { public delegate void AsyncCallback(IAsyncResult ar); diff --git a/src/Common/src/CoreLib/System/Attribute.cs b/src/Common/src/CoreLib/System/Attribute.cs index 88e741c87b91..e24797563cff 100644 --- a/src/Common/src/CoreLib/System/Attribute.cs +++ b/src/Common/src/CoreLib/System/Attribute.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; using System.Reflection; diff --git a/src/Common/src/CoreLib/System/AttributeTargets.cs b/src/Common/src/CoreLib/System/AttributeTargets.cs index dbbade3a600e..c33d19e85ea3 100644 --- a/src/Common/src/CoreLib/System/AttributeTargets.cs +++ b/src/Common/src/CoreLib/System/AttributeTargets.cs @@ -5,7 +5,6 @@ //////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////// -#nullable enable namespace System { // Enum used to indicate all the elements of the diff --git a/src/Common/src/CoreLib/System/AttributeUsageAttribute.cs b/src/Common/src/CoreLib/System/AttributeUsageAttribute.cs index d96e4057cc36..8a4a0a661bf6 100644 --- a/src/Common/src/CoreLib/System/AttributeUsageAttribute.cs +++ b/src/Common/src/CoreLib/System/AttributeUsageAttribute.cs @@ -11,7 +11,6 @@ ** ===========================================================*/ -#nullable enable using System.Reflection; namespace System diff --git a/src/Common/src/CoreLib/System/BadImageFormatException.cs b/src/Common/src/CoreLib/System/BadImageFormatException.cs index 183923193268..23aa56453bc6 100644 --- a/src/Common/src/CoreLib/System/BadImageFormatException.cs +++ b/src/Common/src/CoreLib/System/BadImageFormatException.cs @@ -11,7 +11,6 @@ ** ===========================================================*/ -#nullable enable using System.Globalization; using System.IO; using System.Runtime.Serialization; diff --git a/src/Common/src/CoreLib/System/BitConverter.cs b/src/Common/src/CoreLib/System/BitConverter.cs index 196725ecebdb..129c0099a36c 100644 --- a/src/Common/src/CoreLib/System/BitConverter.cs +++ b/src/Common/src/CoreLib/System/BitConverter.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.CompilerServices; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/System/Boolean.cs b/src/Common/src/CoreLib/System/Boolean.cs index 33e11be0dcdf..a7ac01cd2e06 100644 --- a/src/Common/src/CoreLib/System/Boolean.cs +++ b/src/Common/src/CoreLib/System/Boolean.cs @@ -12,7 +12,6 @@ ** ===========================================================*/ -#nullable enable using System.Runtime.CompilerServices; using System.Runtime.Versioning; diff --git a/src/Common/src/CoreLib/System/Buffer.Unix.cs b/src/Common/src/CoreLib/System/Buffer.Unix.cs index 7de47fd6a21c..372cf92557d9 100644 --- a/src/Common/src/CoreLib/System/Buffer.Unix.cs +++ b/src/Common/src/CoreLib/System/Buffer.Unix.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable #if BIT64 using nuint = System.UInt64; #else diff --git a/src/Common/src/CoreLib/System/Buffer.Windows.cs b/src/Common/src/CoreLib/System/Buffer.Windows.cs index 2609e90ad997..ccb577a7e1b6 100644 --- a/src/Common/src/CoreLib/System/Buffer.Windows.cs +++ b/src/Common/src/CoreLib/System/Buffer.Windows.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable #if BIT64 using nuint = System.UInt64; #else diff --git a/src/Common/src/CoreLib/System/Buffer.cs b/src/Common/src/CoreLib/System/Buffer.cs index da62bc50b47b..f2ffaaea85dc 100644 --- a/src/Common/src/CoreLib/System/Buffer.cs +++ b/src/Common/src/CoreLib/System/Buffer.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable #if AMD64 || ARM64 || (BIT32 && !ARM) #define HAS_CUSTOM_BLOCKS #endif diff --git a/src/Common/src/CoreLib/System/Buffers/ArrayPool.cs b/src/Common/src/CoreLib/System/Buffers/ArrayPool.cs index 8e67e2259972..5e01399a3330 100644 --- a/src/Common/src/CoreLib/System/Buffers/ArrayPool.cs +++ b/src/Common/src/CoreLib/System/Buffers/ArrayPool.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Buffers { /// diff --git a/src/Common/src/CoreLib/System/Buffers/ArrayPoolEventSource.cs b/src/Common/src/CoreLib/System/Buffers/ArrayPoolEventSource.cs index 9ae0e3d913eb..d0563c4977d8 100644 --- a/src/Common/src/CoreLib/System/Buffers/ArrayPoolEventSource.cs +++ b/src/Common/src/CoreLib/System/Buffers/ArrayPoolEventSource.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics.Tracing; namespace System.Buffers diff --git a/src/Common/src/CoreLib/System/Buffers/Binary/Reader.cs b/src/Common/src/CoreLib/System/Buffers/Binary/Reader.cs index f4a8142731f4..49d0a2db4218 100644 --- a/src/Common/src/CoreLib/System/Buffers/Binary/Reader.cs +++ b/src/Common/src/CoreLib/System/Buffers/Binary/Reader.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Numerics; using System.Runtime.CompilerServices; diff --git a/src/Common/src/CoreLib/System/Buffers/Binary/ReaderBigEndian.cs b/src/Common/src/CoreLib/System/Buffers/Binary/ReaderBigEndian.cs index 31745dd3cc46..b45dd8913d34 100644 --- a/src/Common/src/CoreLib/System/Buffers/Binary/ReaderBigEndian.cs +++ b/src/Common/src/CoreLib/System/Buffers/Binary/ReaderBigEndian.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.CompilerServices; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/System/Buffers/Binary/ReaderLittleEndian.cs b/src/Common/src/CoreLib/System/Buffers/Binary/ReaderLittleEndian.cs index e4a03c013a42..bd832f8995aa 100644 --- a/src/Common/src/CoreLib/System/Buffers/Binary/ReaderLittleEndian.cs +++ b/src/Common/src/CoreLib/System/Buffers/Binary/ReaderLittleEndian.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.CompilerServices; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/System/Buffers/Binary/WriterBigEndian.cs b/src/Common/src/CoreLib/System/Buffers/Binary/WriterBigEndian.cs index ea56c78a4b36..78be9b5a0356 100644 --- a/src/Common/src/CoreLib/System/Buffers/Binary/WriterBigEndian.cs +++ b/src/Common/src/CoreLib/System/Buffers/Binary/WriterBigEndian.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.CompilerServices; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/System/Buffers/Binary/WriterLittleEndian.cs b/src/Common/src/CoreLib/System/Buffers/Binary/WriterLittleEndian.cs index 201ead0e9fb1..5d63ee5f0b43 100644 --- a/src/Common/src/CoreLib/System/Buffers/Binary/WriterLittleEndian.cs +++ b/src/Common/src/CoreLib/System/Buffers/Binary/WriterLittleEndian.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.CompilerServices; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/System/Buffers/ConfigurableArrayPool.cs b/src/Common/src/CoreLib/System/Buffers/ConfigurableArrayPool.cs index dd49d8a2501b..6dd306325819 100644 --- a/src/Common/src/CoreLib/System/Buffers/ConfigurableArrayPool.cs +++ b/src/Common/src/CoreLib/System/Buffers/ConfigurableArrayPool.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; using System.Threading; diff --git a/src/Common/src/CoreLib/System/Buffers/IMemoryOwner.cs b/src/Common/src/CoreLib/System/Buffers/IMemoryOwner.cs index 19d01166c640..44f16c58273f 100644 --- a/src/Common/src/CoreLib/System/Buffers/IMemoryOwner.cs +++ b/src/Common/src/CoreLib/System/Buffers/IMemoryOwner.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Buffers { /// diff --git a/src/Common/src/CoreLib/System/Buffers/IPinnable.cs b/src/Common/src/CoreLib/System/Buffers/IPinnable.cs index b8b49d4cd12d..623e716a053c 100644 --- a/src/Common/src/CoreLib/System/Buffers/IPinnable.cs +++ b/src/Common/src/CoreLib/System/Buffers/IPinnable.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Buffers { /// diff --git a/src/Common/src/CoreLib/System/Buffers/MemoryHandle.cs b/src/Common/src/CoreLib/System/Buffers/MemoryHandle.cs index 23325d5d6e86..9cefbc9158a0 100644 --- a/src/Common/src/CoreLib/System/Buffers/MemoryHandle.cs +++ b/src/Common/src/CoreLib/System/Buffers/MemoryHandle.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.InteropServices; namespace System.Buffers diff --git a/src/Common/src/CoreLib/System/Buffers/MemoryManager.cs b/src/Common/src/CoreLib/System/Buffers/MemoryManager.cs index 5c4061e9b4bd..1b235b538e47 100644 --- a/src/Common/src/CoreLib/System/Buffers/MemoryManager.cs +++ b/src/Common/src/CoreLib/System/Buffers/MemoryManager.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.CompilerServices; namespace System.Buffers diff --git a/src/Common/src/CoreLib/System/Buffers/OperationStatus.cs b/src/Common/src/CoreLib/System/Buffers/OperationStatus.cs index c8235f7cc49e..e9ddcab57148 100644 --- a/src/Common/src/CoreLib/System/Buffers/OperationStatus.cs +++ b/src/Common/src/CoreLib/System/Buffers/OperationStatus.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Buffers { /// diff --git a/src/Common/src/CoreLib/System/Buffers/StandardFormat.cs b/src/Common/src/CoreLib/System/Buffers/StandardFormat.cs index 5675f4ced34a..24a49838308d 100644 --- a/src/Common/src/CoreLib/System/Buffers/StandardFormat.cs +++ b/src/Common/src/CoreLib/System/Buffers/StandardFormat.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; namespace System.Buffers diff --git a/src/Common/src/CoreLib/System/Buffers/Text/FormattingHelpers.CountDigits.cs b/src/Common/src/CoreLib/System/Buffers/Text/FormattingHelpers.CountDigits.cs index a7a1fc24a826..ac45347a5edb 100644 --- a/src/Common/src/CoreLib/System/Buffers/Text/FormattingHelpers.CountDigits.cs +++ b/src/Common/src/CoreLib/System/Buffers/Text/FormattingHelpers.CountDigits.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; using System.Numerics; using System.Runtime.CompilerServices; diff --git a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Constants.cs b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Constants.cs index 25880fcf95ca..e2f70f0b10e9 100644 --- a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Constants.cs +++ b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Constants.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Buffers.Text { internal static partial class Utf8Constants diff --git a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/FormattingHelpers.cs b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/FormattingHelpers.cs index a9f185aae927..1b30d5f01336 100644 --- a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/FormattingHelpers.cs +++ b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/FormattingHelpers.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; using System.Runtime.CompilerServices; diff --git a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Boolean.cs b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Boolean.cs index bc6b894be7a1..31bb6cae5559 100644 --- a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Boolean.cs +++ b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Boolean.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Buffers.Binary; namespace System.Buffers.Text diff --git a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Date.G.cs b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Date.G.cs index 2290a107268d..7c4a2e342d89 100644 --- a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Date.G.cs +++ b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Date.G.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Buffers.Text { public static partial class Utf8Formatter diff --git a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Date.L.cs b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Date.L.cs index e817064bf8d1..699f91f39c8d 100644 --- a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Date.L.cs +++ b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Date.L.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Buffers.Text { public static partial class Utf8Formatter diff --git a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Date.O.cs b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Date.O.cs index 706c634dddad..d9b7b181bc44 100644 --- a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Date.O.cs +++ b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Date.O.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Buffers.Text { public static partial class Utf8Formatter diff --git a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Date.R.cs b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Date.R.cs index aed0795b39d7..dd9ec459b7b8 100644 --- a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Date.R.cs +++ b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Date.R.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Buffers.Text { public static partial class Utf8Formatter diff --git a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Date.cs b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Date.cs index 31da577c822e..046885d16270 100644 --- a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Date.cs +++ b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Date.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Buffers.Text { public static partial class Utf8Formatter diff --git a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Decimal.E.cs b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Decimal.E.cs index 859adea1ca9f..89b54f2fd59d 100644 --- a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Decimal.E.cs +++ b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Decimal.E.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; namespace System.Buffers.Text diff --git a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Decimal.F.cs b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Decimal.F.cs index 1efe257f541f..51bc20b8d2d1 100644 --- a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Decimal.F.cs +++ b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Decimal.F.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; namespace System.Buffers.Text diff --git a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Decimal.G.cs b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Decimal.G.cs index c73774939470..b867eaec1a1d 100644 --- a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Decimal.G.cs +++ b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Decimal.G.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; namespace System.Buffers.Text diff --git a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Decimal.cs b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Decimal.cs index 72b9fca51bf0..bb93b992efb9 100644 --- a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Decimal.cs +++ b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Decimal.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; namespace System.Buffers.Text diff --git a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Float.cs b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Float.cs index c4d70b4da981..96e70bada945 100644 --- a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Float.cs +++ b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Float.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; using System.Globalization; using System.Text; diff --git a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Guid.cs b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Guid.cs index 61085b892480..479f1dd1cb19 100644 --- a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Guid.cs +++ b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Guid.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.InteropServices; namespace System.Buffers.Text diff --git a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Integer.Signed.D.cs b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Integer.Signed.D.cs index 88f4c1602844..7532f0cf15ad 100644 --- a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Integer.Signed.D.cs +++ b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Integer.Signed.D.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.CompilerServices; namespace System.Buffers.Text diff --git a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Integer.Signed.Default.cs b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Integer.Signed.Default.cs index 1c213e38795d..046f5baf6644 100644 --- a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Integer.Signed.Default.cs +++ b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Integer.Signed.Default.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; using System.Runtime.CompilerServices; diff --git a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Integer.Signed.N.cs b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Integer.Signed.N.cs index 542bd1eeb79c..1c01b8d60d4b 100644 --- a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Integer.Signed.N.cs +++ b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Integer.Signed.N.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.CompilerServices; namespace System.Buffers.Text diff --git a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Integer.Signed.cs b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Integer.Signed.cs index 025fc8b45ec8..fcd20b312d79 100644 --- a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Integer.Signed.cs +++ b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Integer.Signed.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.CompilerServices; namespace System.Buffers.Text diff --git a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Integer.Unsigned.D.cs b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Integer.Unsigned.D.cs index 78542eb4cfb6..9cb8d64bc0c0 100644 --- a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Integer.Unsigned.D.cs +++ b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Integer.Unsigned.D.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Buffers.Text { /// diff --git a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Integer.Unsigned.Default.cs b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Integer.Unsigned.Default.cs index 5d8f1f01180c..d83591ed980e 100644 --- a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Integer.Unsigned.Default.cs +++ b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Integer.Unsigned.Default.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; using System.Runtime.CompilerServices; diff --git a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Integer.Unsigned.N.cs b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Integer.Unsigned.N.cs index b6caaa6cf923..ce21c0d3ddd6 100644 --- a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Integer.Unsigned.N.cs +++ b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Integer.Unsigned.N.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Buffers.Text { /// diff --git a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Integer.Unsigned.X.cs b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Integer.Unsigned.X.cs index 1db31dfe5925..4cf4d52b5c87 100644 --- a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Integer.Unsigned.X.cs +++ b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Integer.Unsigned.X.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Buffers.Text { /// diff --git a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Integer.Unsigned.cs b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Integer.Unsigned.cs index b531ba714d58..0040c5075a65 100644 --- a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Integer.Unsigned.cs +++ b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Integer.Unsigned.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.CompilerServices; namespace System.Buffers.Text diff --git a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Integer.cs b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Integer.cs index 2024551ff971..3b83fb75125f 100644 --- a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Integer.cs +++ b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Integer.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Buffers.Text { /// diff --git a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.TimeSpan.cs b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.TimeSpan.cs index b41cb75d0ef2..38bb35f7dfa6 100644 --- a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.TimeSpan.cs +++ b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Formatter/Utf8Formatter.TimeSpan.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; namespace System.Buffers.Text diff --git a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/ParserHelpers.cs b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/ParserHelpers.cs index 7630277464fd..1bdb01347182 100644 --- a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/ParserHelpers.cs +++ b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/ParserHelpers.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.CompilerServices; namespace System.Buffers.Text diff --git a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Boolean.cs b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Boolean.cs index 56d88e9d4679..3b039bae2509 100644 --- a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Boolean.cs +++ b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Boolean.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Buffers.Binary; namespace System.Buffers.Text diff --git a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Date.Default.cs b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Date.Default.cs index 4df370337d0a..77d7e1224bee 100644 --- a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Date.Default.cs +++ b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Date.Default.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Buffers.Text { public static partial class Utf8Parser diff --git a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Date.G.cs b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Date.G.cs index d930831b60c5..6e8edbcbdf85 100644 --- a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Date.G.cs +++ b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Date.G.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Buffers.Text { public static partial class Utf8Parser diff --git a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Date.Helpers.cs b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Date.Helpers.cs index 0d62d818830c..d2fb06829a6f 100644 --- a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Date.Helpers.cs +++ b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Date.Helpers.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; namespace System.Buffers.Text diff --git a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Date.O.cs b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Date.O.cs index 9ea3fa34f195..8d2c681f68e1 100644 --- a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Date.O.cs +++ b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Date.O.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; namespace System.Buffers.Text diff --git a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Date.R.cs b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Date.R.cs index 7a16b07e181a..316bee01b424 100644 --- a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Date.R.cs +++ b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Date.R.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Buffers.Text { public static partial class Utf8Parser diff --git a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Date.cs b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Date.cs index 37070ef5cf71..35ad71670595 100644 --- a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Date.cs +++ b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Date.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; namespace System.Buffers.Text diff --git a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Decimal.cs b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Decimal.cs index 84bc7797deb6..5ed385a71be9 100644 --- a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Decimal.cs +++ b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Decimal.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Buffers.Text { public static partial class Utf8Parser diff --git a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Float.cs b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Float.cs index c2f84dd2b45b..27780397e327 100644 --- a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Float.cs +++ b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Float.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Buffers.Binary; namespace System.Buffers.Text diff --git a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Guid.cs b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Guid.cs index 18aaf64212da..f0a99dd522f6 100644 --- a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Guid.cs +++ b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Guid.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Buffers.Text { public static partial class Utf8Parser diff --git a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Integer.Signed.D.cs b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Integer.Signed.D.cs index fc9eb5ea25a0..bf1871a1c94a 100644 --- a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Integer.Signed.D.cs +++ b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Integer.Signed.D.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Buffers.Text { public static partial class Utf8Parser diff --git a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Integer.Signed.N.cs b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Integer.Signed.N.cs index 8cf986b18ee8..fd8ce572f271 100644 --- a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Integer.Signed.N.cs +++ b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Integer.Signed.N.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Buffers.Text { public static partial class Utf8Parser diff --git a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Integer.Signed.cs b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Integer.Signed.cs index 0ee5b7e3f96c..2e861b1cfdd9 100644 --- a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Integer.Signed.cs +++ b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Integer.Signed.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using Internal.Runtime.CompilerServices; namespace System.Buffers.Text diff --git a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Integer.Unsigned.D.cs b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Integer.Unsigned.D.cs index 675231b26f43..46753f5c57d1 100644 --- a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Integer.Unsigned.D.cs +++ b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Integer.Unsigned.D.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Buffers.Text { public static partial class Utf8Parser diff --git a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Integer.Unsigned.N.cs b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Integer.Unsigned.N.cs index 72f2831e6219..2db20c127011 100644 --- a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Integer.Unsigned.N.cs +++ b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Integer.Unsigned.N.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Buffers.Text { // diff --git a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Integer.Unsigned.X.cs b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Integer.Unsigned.X.cs index 1042faece2f8..7e7867a56fd3 100644 --- a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Integer.Unsigned.X.cs +++ b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Integer.Unsigned.X.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Buffers.Text { public static partial class Utf8Parser diff --git a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Integer.Unsigned.cs b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Integer.Unsigned.cs index f420bf1818de..7c4e94e56f12 100644 --- a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Integer.Unsigned.cs +++ b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Integer.Unsigned.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Buffers.Text { public static partial class Utf8Parser diff --git a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Number.cs b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Number.cs index 2727747d34bf..799a3fe6a741 100644 --- a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Number.cs +++ b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Number.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; namespace System.Buffers.Text diff --git a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.TimeSpan.BigG.cs b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.TimeSpan.BigG.cs index e05523c45f92..6bcb4d527778 100644 --- a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.TimeSpan.BigG.cs +++ b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.TimeSpan.BigG.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Buffers.Text { public static partial class Utf8Parser diff --git a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.TimeSpan.C.cs b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.TimeSpan.C.cs index 94d539fa888a..d0a28969be8d 100644 --- a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.TimeSpan.C.cs +++ b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.TimeSpan.C.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Buffers.Text { public static partial class Utf8Parser diff --git a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.TimeSpan.LittleG.cs b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.TimeSpan.LittleG.cs index 7172da4e0c52..19208b9eaced 100644 --- a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.TimeSpan.LittleG.cs +++ b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.TimeSpan.LittleG.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Buffers.Text { public static partial class Utf8Parser diff --git a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.TimeSpan.cs b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.TimeSpan.cs index 641a0b3f0302..b49cccb6a2f5 100644 --- a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.TimeSpan.cs +++ b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.TimeSpan.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; namespace System.Buffers.Text diff --git a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.TimeSpanSplitter.cs b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.TimeSpanSplitter.cs index 4340399ec9b8..0c72d1f3a2d3 100644 --- a/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.TimeSpanSplitter.cs +++ b/src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.TimeSpanSplitter.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; namespace System.Buffers.Text diff --git a/src/Common/src/CoreLib/System/Buffers/TlsOverPerCoreLockedStacksArrayPool.cs b/src/Common/src/CoreLib/System/Buffers/TlsOverPerCoreLockedStacksArrayPool.cs index f49a1c9e057b..47470715ecf5 100644 --- a/src/Common/src/CoreLib/System/Buffers/TlsOverPerCoreLockedStacksArrayPool.cs +++ b/src/Common/src/CoreLib/System/Buffers/TlsOverPerCoreLockedStacksArrayPool.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Collections.Generic; using System.Diagnostics; diff --git a/src/Common/src/CoreLib/System/Buffers/Utilities.cs b/src/Common/src/CoreLib/System/Buffers/Utilities.cs index c49555a6e531..7e1caa039b36 100644 --- a/src/Common/src/CoreLib/System/Buffers/Utilities.cs +++ b/src/Common/src/CoreLib/System/Buffers/Utilities.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; using System.Numerics; using System.Runtime.CompilerServices; diff --git a/src/Common/src/CoreLib/System/ByReference.cs b/src/Common/src/CoreLib/System/ByReference.cs index bb75753f5be4..5da3c99f41b1 100644 --- a/src/Common/src/CoreLib/System/ByReference.cs +++ b/src/Common/src/CoreLib/System/ByReference.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.CompilerServices; using System.Runtime.Versioning; diff --git a/src/Common/src/CoreLib/System/Byte.cs b/src/Common/src/CoreLib/System/Byte.cs index de3eb7a7db0b..5370fec690e0 100644 --- a/src/Common/src/CoreLib/System/Byte.cs +++ b/src/Common/src/CoreLib/System/Byte.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Globalization; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/System/CLSCompliantAttribute.cs b/src/Common/src/CoreLib/System/CLSCompliantAttribute.cs index 9790e935f34e..d895b5ac7166 100644 --- a/src/Common/src/CoreLib/System/CLSCompliantAttribute.cs +++ b/src/Common/src/CoreLib/System/CLSCompliantAttribute.cs @@ -11,7 +11,6 @@ ** =============================================================================*/ -#nullable enable namespace System { [AttributeUsage(AttributeTargets.All, Inherited = true, AllowMultiple = false)] diff --git a/src/Common/src/CoreLib/System/CannotUnloadAppDomainException.cs b/src/Common/src/CoreLib/System/CannotUnloadAppDomainException.cs index 450a54c96b3a..6d68f08c5c52 100644 --- a/src/Common/src/CoreLib/System/CannotUnloadAppDomainException.cs +++ b/src/Common/src/CoreLib/System/CannotUnloadAppDomainException.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.Serialization; namespace System diff --git a/src/Common/src/CoreLib/System/Char.cs b/src/Common/src/CoreLib/System/Char.cs index 80dce56258b7..3835f8e99600 100644 --- a/src/Common/src/CoreLib/System/Char.cs +++ b/src/Common/src/CoreLib/System/Char.cs @@ -12,7 +12,6 @@ ** ===========================================================*/ -#nullable enable using System.Diagnostics; using System.Globalization; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/System/CharEnumerator.cs b/src/Common/src/CoreLib/System/CharEnumerator.cs index 0b2caefdfa32..3adf3b0d3add 100644 --- a/src/Common/src/CoreLib/System/CharEnumerator.cs +++ b/src/Common/src/CoreLib/System/CharEnumerator.cs @@ -12,7 +12,6 @@ ** ============================================================*/ -#nullable enable using System.Collections; using System.Collections.Generic; diff --git a/src/Common/src/CoreLib/System/Collections/ArrayList.cs b/src/Common/src/CoreLib/System/Collections/ArrayList.cs index 1f6c4906e8bc..c5f3abd1d2d6 100644 --- a/src/Common/src/CoreLib/System/Collections/ArrayList.cs +++ b/src/Common/src/CoreLib/System/Collections/ArrayList.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable /*============================================================ ** ** Class: ArrayList diff --git a/src/Common/src/CoreLib/System/Collections/Comparer.cs b/src/Common/src/CoreLib/System/Collections/Comparer.cs index 2b02433951c7..f74bd8577617 100644 --- a/src/Common/src/CoreLib/System/Collections/Comparer.cs +++ b/src/Common/src/CoreLib/System/Collections/Comparer.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable /*============================================================ ** ** Purpose: Default IComparer implementation. diff --git a/src/Common/src/CoreLib/System/Collections/Concurrent/ConcurrentQueue.cs b/src/Common/src/CoreLib/System/Collections/Concurrent/ConcurrentQueue.cs index 593e3a724aa2..f80f4d139420 100644 --- a/src/Common/src/CoreLib/System/Collections/Concurrent/ConcurrentQueue.cs +++ b/src/Common/src/CoreLib/System/Collections/Concurrent/ConcurrentQueue.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Collections.Generic; using System.Diagnostics; using System.Threading; diff --git a/src/Common/src/CoreLib/System/Collections/Concurrent/IProducerConsumerCollection.cs b/src/Common/src/CoreLib/System/Collections/Concurrent/IProducerConsumerCollection.cs index 797bb0863dba..3f7748388cfe 100644 --- a/src/Common/src/CoreLib/System/Collections/Concurrent/IProducerConsumerCollection.cs +++ b/src/Common/src/CoreLib/System/Collections/Concurrent/IProducerConsumerCollection.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Collections.Generic; namespace System.Collections.Concurrent diff --git a/src/Common/src/CoreLib/System/Collections/Concurrent/IProducerConsumerCollectionDebugView.cs b/src/Common/src/CoreLib/System/Collections/Concurrent/IProducerConsumerCollectionDebugView.cs index f30f8f66fcc6..e848b2fddd57 100644 --- a/src/Common/src/CoreLib/System/Collections/Concurrent/IProducerConsumerCollectionDebugView.cs +++ b/src/Common/src/CoreLib/System/Collections/Concurrent/IProducerConsumerCollectionDebugView.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; namespace System.Collections.Concurrent diff --git a/src/Common/src/CoreLib/System/Collections/DictionaryEntry.cs b/src/Common/src/CoreLib/System/Collections/DictionaryEntry.cs index b2070224ed07..7e86f388d0de 100644 --- a/src/Common/src/CoreLib/System/Collections/DictionaryEntry.cs +++ b/src/Common/src/CoreLib/System/Collections/DictionaryEntry.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.ComponentModel; namespace System.Collections diff --git a/src/Common/src/CoreLib/System/Collections/Generic/ArraySortHelper.cs b/src/Common/src/CoreLib/System/Collections/Generic/ArraySortHelper.cs index 7d7d94580a8c..084ecdf458dc 100644 --- a/src/Common/src/CoreLib/System/Collections/Generic/ArraySortHelper.cs +++ b/src/Common/src/CoreLib/System/Collections/Generic/ArraySortHelper.cs @@ -13,7 +13,6 @@ ** ===========================================================*/ -#nullable enable using System.Diagnostics; using System.Runtime.CompilerServices; diff --git a/src/Common/src/CoreLib/System/Collections/Generic/Comparer.cs b/src/Common/src/CoreLib/System/Collections/Generic/Comparer.cs index aa36769a4315..28cb0af9e4ea 100644 --- a/src/Common/src/CoreLib/System/Collections/Generic/Comparer.cs +++ b/src/Common/src/CoreLib/System/Collections/Generic/Comparer.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.CompilerServices; using System.Runtime.Serialization; diff --git a/src/Common/src/CoreLib/System/Collections/Generic/Dictionary.cs b/src/Common/src/CoreLib/System/Collections/Generic/Dictionary.cs index 27442029addb..296a607537e8 100644 --- a/src/Common/src/CoreLib/System/Collections/Generic/Dictionary.cs +++ b/src/Common/src/CoreLib/System/Collections/Generic/Dictionary.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; using System.Runtime.CompilerServices; using System.Runtime.Serialization; diff --git a/src/Common/src/CoreLib/System/Collections/Generic/EqualityComparer.cs b/src/Common/src/CoreLib/System/Collections/Generic/EqualityComparer.cs index fdaf3bc858ee..b6040adfccc0 100644 --- a/src/Common/src/CoreLib/System/Collections/Generic/EqualityComparer.cs +++ b/src/Common/src/CoreLib/System/Collections/Generic/EqualityComparer.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.CompilerServices; using System.Runtime.Serialization; diff --git a/src/Common/src/CoreLib/System/Collections/Generic/IAsyncEnumerable.cs b/src/Common/src/CoreLib/System/Collections/Generic/IAsyncEnumerable.cs index 3268c468b5b9..302b96485506 100644 --- a/src/Common/src/CoreLib/System/Collections/Generic/IAsyncEnumerable.cs +++ b/src/Common/src/CoreLib/System/Collections/Generic/IAsyncEnumerable.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Threading; namespace System.Collections.Generic diff --git a/src/Common/src/CoreLib/System/Collections/Generic/IAsyncEnumerator.cs b/src/Common/src/CoreLib/System/Collections/Generic/IAsyncEnumerator.cs index f719a1c17163..0d9afc1914f9 100644 --- a/src/Common/src/CoreLib/System/Collections/Generic/IAsyncEnumerator.cs +++ b/src/Common/src/CoreLib/System/Collections/Generic/IAsyncEnumerator.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Threading.Tasks; namespace System.Collections.Generic diff --git a/src/Common/src/CoreLib/System/Collections/Generic/ICollection.cs b/src/Common/src/CoreLib/System/Collections/Generic/ICollection.cs index 5780c7552b66..78ee5cb1f55f 100644 --- a/src/Common/src/CoreLib/System/Collections/Generic/ICollection.cs +++ b/src/Common/src/CoreLib/System/Collections/Generic/ICollection.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Runtime.CompilerServices; diff --git a/src/Common/src/CoreLib/System/Collections/Generic/ICollectionDebugView.cs b/src/Common/src/CoreLib/System/Collections/Generic/ICollectionDebugView.cs index cb4a4caf87c9..9916e857e2c0 100644 --- a/src/Common/src/CoreLib/System/Collections/Generic/ICollectionDebugView.cs +++ b/src/Common/src/CoreLib/System/Collections/Generic/ICollectionDebugView.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; namespace System.Collections.Generic diff --git a/src/Common/src/CoreLib/System/Collections/Generic/IComparer.cs b/src/Common/src/CoreLib/System/Collections/Generic/IComparer.cs index 74d721312fa2..200ce17769cb 100644 --- a/src/Common/src/CoreLib/System/Collections/Generic/IComparer.cs +++ b/src/Common/src/CoreLib/System/Collections/Generic/IComparer.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; namespace System.Collections.Generic diff --git a/src/Common/src/CoreLib/System/Collections/Generic/IDictionary.cs b/src/Common/src/CoreLib/System/Collections/Generic/IDictionary.cs index 8b38a91ce363..75bc1bc2a719 100644 --- a/src/Common/src/CoreLib/System/Collections/Generic/IDictionary.cs +++ b/src/Common/src/CoreLib/System/Collections/Generic/IDictionary.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; namespace System.Collections.Generic diff --git a/src/Common/src/CoreLib/System/Collections/Generic/IDictionaryDebugView.cs b/src/Common/src/CoreLib/System/Collections/Generic/IDictionaryDebugView.cs index 8e8dce7e4ae0..ff5b4ea5d1f8 100644 --- a/src/Common/src/CoreLib/System/Collections/Generic/IDictionaryDebugView.cs +++ b/src/Common/src/CoreLib/System/Collections/Generic/IDictionaryDebugView.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; namespace System.Collections.Generic diff --git a/src/Common/src/CoreLib/System/Collections/Generic/IEnumerable.cs b/src/Common/src/CoreLib/System/Collections/Generic/IEnumerable.cs index d3ef9e86f76d..5548ffc19db0 100644 --- a/src/Common/src/CoreLib/System/Collections/Generic/IEnumerable.cs +++ b/src/Common/src/CoreLib/System/Collections/Generic/IEnumerable.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Collections.Generic { // Implement this interface if you need to support foreach semantics. diff --git a/src/Common/src/CoreLib/System/Collections/Generic/IEnumerator.cs b/src/Common/src/CoreLib/System/Collections/Generic/IEnumerator.cs index 475b86f22558..ec05eaf9f66d 100644 --- a/src/Common/src/CoreLib/System/Collections/Generic/IEnumerator.cs +++ b/src/Common/src/CoreLib/System/Collections/Generic/IEnumerator.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/System/Collections/Generic/IEqualityComparer.cs b/src/Common/src/CoreLib/System/Collections/Generic/IEqualityComparer.cs index 7b983a9ccbe0..54925e995333 100644 --- a/src/Common/src/CoreLib/System/Collections/Generic/IEqualityComparer.cs +++ b/src/Common/src/CoreLib/System/Collections/Generic/IEqualityComparer.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Collections.Generic { // The generic IEqualityComparer interface implements methods to if check two objects are equal diff --git a/src/Common/src/CoreLib/System/Collections/Generic/IList.cs b/src/Common/src/CoreLib/System/Collections/Generic/IList.cs index eb753d0e4cb8..2abc7b9142a0 100644 --- a/src/Common/src/CoreLib/System/Collections/Generic/IList.cs +++ b/src/Common/src/CoreLib/System/Collections/Generic/IList.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Collections; using System.Runtime.CompilerServices; diff --git a/src/Common/src/CoreLib/System/Collections/Generic/IReadOnlyCollection.cs b/src/Common/src/CoreLib/System/Collections/Generic/IReadOnlyCollection.cs index c86a4a35973d..9eea39de2233 100644 --- a/src/Common/src/CoreLib/System/Collections/Generic/IReadOnlyCollection.cs +++ b/src/Common/src/CoreLib/System/Collections/Generic/IReadOnlyCollection.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Runtime.CompilerServices; diff --git a/src/Common/src/CoreLib/System/Collections/Generic/IReadOnlyDictionary.cs b/src/Common/src/CoreLib/System/Collections/Generic/IReadOnlyDictionary.cs index 1f37b7887072..1d57383b15a6 100644 --- a/src/Common/src/CoreLib/System/Collections/Generic/IReadOnlyDictionary.cs +++ b/src/Common/src/CoreLib/System/Collections/Generic/IReadOnlyDictionary.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; namespace System.Collections.Generic diff --git a/src/Common/src/CoreLib/System/Collections/Generic/IReadOnlyList.cs b/src/Common/src/CoreLib/System/Collections/Generic/IReadOnlyList.cs index 6a1e9bbf09f4..7193805b068e 100644 --- a/src/Common/src/CoreLib/System/Collections/Generic/IReadOnlyList.cs +++ b/src/Common/src/CoreLib/System/Collections/Generic/IReadOnlyList.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Runtime.CompilerServices; diff --git a/src/Common/src/CoreLib/System/Collections/Generic/KeyNotFoundException.cs b/src/Common/src/CoreLib/System/Collections/Generic/KeyNotFoundException.cs index 75f3e91c0739..35a81591b060 100644 --- a/src/Common/src/CoreLib/System/Collections/Generic/KeyNotFoundException.cs +++ b/src/Common/src/CoreLib/System/Collections/Generic/KeyNotFoundException.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.Serialization; namespace System.Collections.Generic diff --git a/src/Common/src/CoreLib/System/Collections/Generic/KeyValuePair.cs b/src/Common/src/CoreLib/System/Collections/Generic/KeyValuePair.cs index 18b3863e7856..8a35aa184781 100644 --- a/src/Common/src/CoreLib/System/Collections/Generic/KeyValuePair.cs +++ b/src/Common/src/CoreLib/System/Collections/Generic/KeyValuePair.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.ComponentModel; using System.Text; diff --git a/src/Common/src/CoreLib/System/Collections/Generic/List.cs b/src/Common/src/CoreLib/System/Collections/Generic/List.cs index b9c5f428de14..760220a99de1 100644 --- a/src/Common/src/CoreLib/System/Collections/Generic/List.cs +++ b/src/Common/src/CoreLib/System/Collections/Generic/List.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Collections.ObjectModel; using System.Diagnostics; using System.Runtime.CompilerServices; diff --git a/src/Common/src/CoreLib/System/Collections/Generic/NonRandomizedStringEqualityComparer.cs b/src/Common/src/CoreLib/System/Collections/Generic/NonRandomizedStringEqualityComparer.cs index 89db7697e8ac..26ffdf77f633 100644 --- a/src/Common/src/CoreLib/System/Collections/Generic/NonRandomizedStringEqualityComparer.cs +++ b/src/Common/src/CoreLib/System/Collections/Generic/NonRandomizedStringEqualityComparer.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.Serialization; namespace System.Collections.Generic diff --git a/src/Common/src/CoreLib/System/Collections/HashHelpers.SerializationInfoTable.cs b/src/Common/src/CoreLib/System/Collections/HashHelpers.SerializationInfoTable.cs index 5c627afb8fbf..b3aa57cae910 100644 --- a/src/Common/src/CoreLib/System/Collections/HashHelpers.SerializationInfoTable.cs +++ b/src/Common/src/CoreLib/System/Collections/HashHelpers.SerializationInfoTable.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable // Used by Hashtable and Dictionary's SeralizationInfo .ctor's to store the SeralizationInfo // object until OnDeserialization is called. diff --git a/src/Common/src/CoreLib/System/Collections/HashHelpers.cs b/src/Common/src/CoreLib/System/Collections/HashHelpers.cs index 9cb957e8f480..491a0ec6b9ab 100644 --- a/src/Common/src/CoreLib/System/Collections/HashHelpers.cs +++ b/src/Common/src/CoreLib/System/Collections/HashHelpers.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; namespace System.Collections diff --git a/src/Common/src/CoreLib/System/Collections/Hashtable.cs b/src/Common/src/CoreLib/System/Collections/Hashtable.cs index ae8f6d4de84c..06e57b7adaeb 100644 --- a/src/Common/src/CoreLib/System/Collections/Hashtable.cs +++ b/src/Common/src/CoreLib/System/Collections/Hashtable.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable /*============================================================ ** ** Class: Hashtable diff --git a/src/Common/src/CoreLib/System/Collections/ICollection.cs b/src/Common/src/CoreLib/System/Collections/ICollection.cs index 95ebb7e808d3..65e37c73813b 100644 --- a/src/Common/src/CoreLib/System/Collections/ICollection.cs +++ b/src/Common/src/CoreLib/System/Collections/ICollection.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; namespace System.Collections diff --git a/src/Common/src/CoreLib/System/Collections/IComparer.cs b/src/Common/src/CoreLib/System/Collections/IComparer.cs index 46c12ff46a9a..877e9b40e9f7 100644 --- a/src/Common/src/CoreLib/System/Collections/IComparer.cs +++ b/src/Common/src/CoreLib/System/Collections/IComparer.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Collections { // The IComparer interface implements a method that compares two objects. It is diff --git a/src/Common/src/CoreLib/System/Collections/IDictionary.cs b/src/Common/src/CoreLib/System/Collections/IDictionary.cs index 3ecf66992985..0389563b990b 100644 --- a/src/Common/src/CoreLib/System/Collections/IDictionary.cs +++ b/src/Common/src/CoreLib/System/Collections/IDictionary.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable - namespace System.Collections { // An IDictionary is a possibly unordered set of key-value pairs. diff --git a/src/Common/src/CoreLib/System/Collections/IDictionaryEnumerator.cs b/src/Common/src/CoreLib/System/Collections/IDictionaryEnumerator.cs index 59b6f7839a6f..2c4805ee3630 100644 --- a/src/Common/src/CoreLib/System/Collections/IDictionaryEnumerator.cs +++ b/src/Common/src/CoreLib/System/Collections/IDictionaryEnumerator.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Collections { // This interface represents an enumerator that allows sequential access to the diff --git a/src/Common/src/CoreLib/System/Collections/IEnumerable.cs b/src/Common/src/CoreLib/System/Collections/IEnumerable.cs index 5ca523f69249..e787bde2ee6b 100644 --- a/src/Common/src/CoreLib/System/Collections/IEnumerable.cs +++ b/src/Common/src/CoreLib/System/Collections/IEnumerable.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.InteropServices; namespace System.Collections diff --git a/src/Common/src/CoreLib/System/Collections/IEnumerator.cs b/src/Common/src/CoreLib/System/Collections/IEnumerator.cs index 83d2064dff8f..0d2ccb946635 100644 --- a/src/Common/src/CoreLib/System/Collections/IEnumerator.cs +++ b/src/Common/src/CoreLib/System/Collections/IEnumerator.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/System/Collections/IEqualityComparer.cs b/src/Common/src/CoreLib/System/Collections/IEqualityComparer.cs index c2c290c44b4e..cc60060279dd 100644 --- a/src/Common/src/CoreLib/System/Collections/IEqualityComparer.cs +++ b/src/Common/src/CoreLib/System/Collections/IEqualityComparer.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Collections { // An IEqualityComparer is a mechanism to consume custom performant comparison infrastructure diff --git a/src/Common/src/CoreLib/System/Collections/IHashCodeProvider.cs b/src/Common/src/CoreLib/System/Collections/IHashCodeProvider.cs index 260aab2acd50..7d6c63f9f1db 100644 --- a/src/Common/src/CoreLib/System/Collections/IHashCodeProvider.cs +++ b/src/Common/src/CoreLib/System/Collections/IHashCodeProvider.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Collections { /// diff --git a/src/Common/src/CoreLib/System/Collections/IList.cs b/src/Common/src/CoreLib/System/Collections/IList.cs index 0857885a973c..5a709e25d577 100644 --- a/src/Common/src/CoreLib/System/Collections/IList.cs +++ b/src/Common/src/CoreLib/System/Collections/IList.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; namespace System.Collections diff --git a/src/Common/src/CoreLib/System/Collections/IStructuralComparable.cs b/src/Common/src/CoreLib/System/Collections/IStructuralComparable.cs index b012618c89a7..1849e367c41e 100644 --- a/src/Common/src/CoreLib/System/Collections/IStructuralComparable.cs +++ b/src/Common/src/CoreLib/System/Collections/IStructuralComparable.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; namespace System.Collections diff --git a/src/Common/src/CoreLib/System/Collections/IStructuralEquatable.cs b/src/Common/src/CoreLib/System/Collections/IStructuralEquatable.cs index 9fba68377cc4..a244e8417a51 100644 --- a/src/Common/src/CoreLib/System/Collections/IStructuralEquatable.cs +++ b/src/Common/src/CoreLib/System/Collections/IStructuralEquatable.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Collections { public interface IStructuralEquatable diff --git a/src/Common/src/CoreLib/System/Collections/KeyValuePairs.cs b/src/Common/src/CoreLib/System/Collections/KeyValuePairs.cs index 26043311cdf2..4bbca18c54a8 100644 --- a/src/Common/src/CoreLib/System/Collections/KeyValuePairs.cs +++ b/src/Common/src/CoreLib/System/Collections/KeyValuePairs.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable /*============================================================ ** ** Class: KeyValuePairs @@ -12,6 +11,7 @@ ** ===========================================================*/ +#nullable enable using System.Diagnostics; namespace System.Collections diff --git a/src/Common/src/CoreLib/System/Collections/ListDictionaryInternal.cs b/src/Common/src/CoreLib/System/Collections/ListDictionaryInternal.cs index ce9caed784c0..13daac564b7c 100644 --- a/src/Common/src/CoreLib/System/Collections/ListDictionaryInternal.cs +++ b/src/Common/src/CoreLib/System/Collections/ListDictionaryInternal.cs @@ -12,7 +12,6 @@ ** ===========================================================*/ -#nullable enable namespace System.Collections { /// This is a simple implementation of IDictionary using a singly linked list. This diff --git a/src/Common/src/CoreLib/System/Collections/ObjectModel/Collection.cs b/src/Common/src/CoreLib/System/Collections/ObjectModel/Collection.cs index 93a048cebcdd..f8c9b87344f1 100644 --- a/src/Common/src/CoreLib/System/Collections/ObjectModel/Collection.cs +++ b/src/Common/src/CoreLib/System/Collections/ObjectModel/Collection.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Collections.Generic; using System.Diagnostics; diff --git a/src/Common/src/CoreLib/System/Collections/ObjectModel/ReadOnlyCollection.cs b/src/Common/src/CoreLib/System/Collections/ObjectModel/ReadOnlyCollection.cs index 9ab299bef991..c29d44945e83 100644 --- a/src/Common/src/CoreLib/System/Collections/ObjectModel/ReadOnlyCollection.cs +++ b/src/Common/src/CoreLib/System/Collections/ObjectModel/ReadOnlyCollection.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Collections.Generic; using System.Diagnostics; diff --git a/src/Common/src/CoreLib/System/ComponentModel/DefaultValueAttribute.cs b/src/Common/src/CoreLib/System/ComponentModel/DefaultValueAttribute.cs index fdf9e90fc4f2..97aceddb70f0 100644 --- a/src/Common/src/CoreLib/System/ComponentModel/DefaultValueAttribute.cs +++ b/src/Common/src/CoreLib/System/ComponentModel/DefaultValueAttribute.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Reflection; diff --git a/src/Common/src/CoreLib/System/ComponentModel/EditorBrowsableAttribute.cs b/src/Common/src/CoreLib/System/ComponentModel/EditorBrowsableAttribute.cs index 5ab2693eab24..050708661c12 100644 --- a/src/Common/src/CoreLib/System/ComponentModel/EditorBrowsableAttribute.cs +++ b/src/Common/src/CoreLib/System/ComponentModel/EditorBrowsableAttribute.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.ComponentModel { [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Enum | AttributeTargets.Constructor | AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Delegate | AttributeTargets.Interface)] diff --git a/src/Common/src/CoreLib/System/ComponentModel/EditorBrowsableState.cs b/src/Common/src/CoreLib/System/ComponentModel/EditorBrowsableState.cs index bb935e83c5e8..a98669c4e963 100644 --- a/src/Common/src/CoreLib/System/ComponentModel/EditorBrowsableState.cs +++ b/src/Common/src/CoreLib/System/ComponentModel/EditorBrowsableState.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.ComponentModel { public enum EditorBrowsableState diff --git a/src/Common/src/CoreLib/System/Convert.Base64.cs b/src/Common/src/CoreLib/System/Convert.Base64.cs index aef0cdeca3fc..332f3b9d8b16 100644 --- a/src/Common/src/CoreLib/System/Convert.Base64.cs +++ b/src/Common/src/CoreLib/System/Convert.Base64.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/System/Convert.cs b/src/Common/src/CoreLib/System/Convert.cs index 03b1bccede4b..46192a2c01a4 100644 --- a/src/Common/src/CoreLib/System/Convert.cs +++ b/src/Common/src/CoreLib/System/Convert.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Globalization; using System.Threading; diff --git a/src/Common/src/CoreLib/System/CoreLib.cs b/src/Common/src/CoreLib/System/CoreLib.cs index 9e18412742cf..9c5d1c1aa377 100644 --- a/src/Common/src/CoreLib/System/CoreLib.cs +++ b/src/Common/src/CoreLib/System/CoreLib.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System { // This class is used to define the name of the base class library diff --git a/src/Common/src/CoreLib/System/CurrentSystemTimeZone.cs b/src/Common/src/CoreLib/System/CurrentSystemTimeZone.cs index f88ea79738d3..6c52bf7b35b3 100644 --- a/src/Common/src/CoreLib/System/CurrentSystemTimeZone.cs +++ b/src/Common/src/CoreLib/System/CurrentSystemTimeZone.cs @@ -17,7 +17,6 @@ ** ============================================================*/ -#nullable enable using System.Collections; using System.Globalization; diff --git a/src/Common/src/CoreLib/System/DBNull.cs b/src/Common/src/CoreLib/System/DBNull.cs index 5d2a12e96e02..8e9f55a7729b 100644 --- a/src/Common/src/CoreLib/System/DBNull.cs +++ b/src/Common/src/CoreLib/System/DBNull.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.Serialization; namespace System diff --git a/src/Common/src/CoreLib/System/DataMisalignedException.cs b/src/Common/src/CoreLib/System/DataMisalignedException.cs index 8c2618458a90..2b49e5a98575 100644 --- a/src/Common/src/CoreLib/System/DataMisalignedException.cs +++ b/src/Common/src/CoreLib/System/DataMisalignedException.cs @@ -9,7 +9,6 @@ ** =============================================================================*/ -#nullable enable using System.Runtime.Serialization; namespace System diff --git a/src/Common/src/CoreLib/System/DateTime.Unix.cs b/src/Common/src/CoreLib/System/DateTime.Unix.cs index a8af81ffa72a..2c4de3e1a85e 100644 --- a/src/Common/src/CoreLib/System/DateTime.Unix.cs +++ b/src/Common/src/CoreLib/System/DateTime.Unix.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System { public readonly partial struct DateTime diff --git a/src/Common/src/CoreLib/System/DateTime.Win32.cs b/src/Common/src/CoreLib/System/DateTime.Win32.cs index 940d0922c026..2a054375a494 100644 --- a/src/Common/src/CoreLib/System/DateTime.Win32.cs +++ b/src/Common/src/CoreLib/System/DateTime.Win32.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System { public readonly partial struct DateTime diff --git a/src/Common/src/CoreLib/System/DateTime.WinRT.cs b/src/Common/src/CoreLib/System/DateTime.WinRT.cs index c0844358b376..30a9a61aa3da 100644 --- a/src/Common/src/CoreLib/System/DateTime.WinRT.cs +++ b/src/Common/src/CoreLib/System/DateTime.WinRT.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.CompilerServices; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/System/DateTime.Windows.cs b/src/Common/src/CoreLib/System/DateTime.Windows.cs index 7596ec1cb14a..ba9df5c4536b 100644 --- a/src/Common/src/CoreLib/System/DateTime.Windows.cs +++ b/src/Common/src/CoreLib/System/DateTime.Windows.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.CompilerServices; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/System/DateTime.cs b/src/Common/src/CoreLib/System/DateTime.cs index deb2da287693..2317221b5a78 100644 --- a/src/Common/src/CoreLib/System/DateTime.cs +++ b/src/Common/src/CoreLib/System/DateTime.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Diagnostics; using System.Threading; diff --git a/src/Common/src/CoreLib/System/DateTimeKind.cs b/src/Common/src/CoreLib/System/DateTimeKind.cs index 1f2ce006d88c..33c9bd925fe2 100644 --- a/src/Common/src/CoreLib/System/DateTimeKind.cs +++ b/src/Common/src/CoreLib/System/DateTimeKind.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System { // This enum is used to indentify DateTime instances in cases when they are known to be in local time, diff --git a/src/Common/src/CoreLib/System/DateTimeOffset.cs b/src/Common/src/CoreLib/System/DateTimeOffset.cs index 8b0ea368a67d..d2cb079f801b 100644 --- a/src/Common/src/CoreLib/System/DateTimeOffset.cs +++ b/src/Common/src/CoreLib/System/DateTimeOffset.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; using System.Globalization; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/System/DayOfWeek.cs b/src/Common/src/CoreLib/System/DayOfWeek.cs index 19cb69a796a4..f67d10e18150 100644 --- a/src/Common/src/CoreLib/System/DayOfWeek.cs +++ b/src/Common/src/CoreLib/System/DayOfWeek.cs @@ -11,7 +11,6 @@ ** ============================================================*/ -#nullable enable namespace System { public enum DayOfWeek diff --git a/src/Common/src/CoreLib/System/Decimal.DecCalc.cs b/src/Common/src/CoreLib/System/Decimal.DecCalc.cs index 04eb9aa09b32..342aec9a8acc 100644 --- a/src/Common/src/CoreLib/System/Decimal.DecCalc.cs +++ b/src/Common/src/CoreLib/System/Decimal.DecCalc.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; using System.Numerics; using System.Runtime.CompilerServices; diff --git a/src/Common/src/CoreLib/System/Decimal.cs b/src/Common/src/CoreLib/System/Decimal.cs index 6f2a0a15c63e..72ac754776e1 100644 --- a/src/Common/src/CoreLib/System/Decimal.cs +++ b/src/Common/src/CoreLib/System/Decimal.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Buffers.Binary; using System.Diagnostics; using System.Globalization; diff --git a/src/Common/src/CoreLib/System/DefaultBinder.cs b/src/Common/src/CoreLib/System/DefaultBinder.cs index 249f3b92f8e5..f911619ae619 100644 --- a/src/Common/src/CoreLib/System/DefaultBinder.cs +++ b/src/Common/src/CoreLib/System/DefaultBinder.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Reflection; using System.Diagnostics; using CultureInfo = System.Globalization.CultureInfo; diff --git a/src/Common/src/CoreLib/System/Delegate.cs b/src/Common/src/CoreLib/System/Delegate.cs index 79c12c137374..5c4def4b4301 100644 --- a/src/Common/src/CoreLib/System/Delegate.cs +++ b/src/Common/src/CoreLib/System/Delegate.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Serialization; diff --git a/src/Common/src/CoreLib/System/Diagnostics/CodeAnalysis/SuppressMessageAttribute.cs b/src/Common/src/CoreLib/System/Diagnostics/CodeAnalysis/SuppressMessageAttribute.cs index ae15b8ec6727..28208a379e3a 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/CodeAnalysis/SuppressMessageAttribute.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/CodeAnalysis/SuppressMessageAttribute.cs @@ -12,7 +12,6 @@ ** ===========================================================*/ -#nullable enable namespace System.Diagnostics.CodeAnalysis { [AttributeUsage( diff --git a/src/Common/src/CoreLib/System/Diagnostics/ConditionalAttribute.cs b/src/Common/src/CoreLib/System/Diagnostics/ConditionalAttribute.cs index 9af1e2b80db9..416625b779d7 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/ConditionalAttribute.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/ConditionalAttribute.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Diagnostics { [AttributeUsage(AttributeTargets.Method | AttributeTargets.Class, AllowMultiple = true)] diff --git a/src/Common/src/CoreLib/System/Diagnostics/Contracts/ContractException.cs b/src/Common/src/CoreLib/System/Diagnostics/Contracts/ContractException.cs index 9feaa2381275..96d6eccd9c38 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/Contracts/ContractException.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/Contracts/ContractException.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.Serialization; namespace System.Diagnostics.Contracts diff --git a/src/Common/src/CoreLib/System/Diagnostics/Contracts/ContractFailedEventArgs.cs b/src/Common/src/CoreLib/System/Diagnostics/Contracts/ContractFailedEventArgs.cs index ad19e849be5a..3c58ca10da5b 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/Contracts/ContractFailedEventArgs.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/Contracts/ContractFailedEventArgs.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Collections.Generic; using System.Diagnostics; diff --git a/src/Common/src/CoreLib/System/Diagnostics/Contracts/Contracts.cs b/src/Common/src/CoreLib/System/Diagnostics/Contracts/Contracts.cs index c5dc88798be1..13d13f12fac6 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/Contracts/Contracts.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/Contracts/Contracts.cs @@ -17,7 +17,6 @@ ===========================================================*/ #define DEBUG // The behavior of this contract library should be consistent regardless of build type. -#nullable enable using System.Collections.Generic; using System.Reflection; diff --git a/src/Common/src/CoreLib/System/Diagnostics/Debug.cs b/src/Common/src/CoreLib/System/Diagnostics/Debug.cs index 590588a27ed4..8d77fc27acf5 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/Debug.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/Debug.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable // Do not remove this, it is needed to retain calls to these conditional methods in release builds #define DEBUG using System.Threading; diff --git a/src/Common/src/CoreLib/System/Diagnostics/DebugProvider.Unix.cs b/src/Common/src/CoreLib/System/Diagnostics/DebugProvider.Unix.cs index bc3e86c9fc09..0799d0929de2 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/DebugProvider.Unix.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/DebugProvider.Unix.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using Microsoft.Win32.SafeHandles; namespace System.Diagnostics diff --git a/src/Common/src/CoreLib/System/Diagnostics/DebugProvider.Windows.cs b/src/Common/src/CoreLib/System/Diagnostics/DebugProvider.Windows.cs index 12ea0160a18f..e382e8130194 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/DebugProvider.Windows.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/DebugProvider.Windows.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable - namespace System.Diagnostics { public partial class DebugProvider diff --git a/src/Common/src/CoreLib/System/Diagnostics/DebugProvider.cs b/src/Common/src/CoreLib/System/Diagnostics/DebugProvider.cs index 3c762733c41c..2e828102d488 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/DebugProvider.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/DebugProvider.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable // Do not remove this, it is needed to retain calls to these conditional methods in release builds #define DEBUG diff --git a/src/Common/src/CoreLib/System/Diagnostics/DebuggableAttribute.cs b/src/Common/src/CoreLib/System/Diagnostics/DebuggableAttribute.cs index 308f6835b3e2..d05f8471b364 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/DebuggableAttribute.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/DebuggableAttribute.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable - namespace System.Diagnostics { // Attribute class used by the compiler to mark modules. diff --git a/src/Common/src/CoreLib/System/Diagnostics/DebuggerBrowsableAttribute.cs b/src/Common/src/CoreLib/System/Diagnostics/DebuggerBrowsableAttribute.cs index 4bd42caa927b..8a53052b6fca 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/DebuggerBrowsableAttribute.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/DebuggerBrowsableAttribute.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable - namespace System.Diagnostics { // DebuggerBrowsableState states are defined as follows: diff --git a/src/Common/src/CoreLib/System/Diagnostics/DebuggerDisplayAttribute.cs b/src/Common/src/CoreLib/System/Diagnostics/DebuggerDisplayAttribute.cs index 5f670852c4c7..c9738610d5d4 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/DebuggerDisplayAttribute.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/DebuggerDisplayAttribute.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable - namespace System.Diagnostics { // This attribute is used to control what is displayed for the given class or field diff --git a/src/Common/src/CoreLib/System/Diagnostics/DebuggerHiddenAttribute.cs b/src/Common/src/CoreLib/System/Diagnostics/DebuggerHiddenAttribute.cs index 4ee79302c053..ace452e911c3 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/DebuggerHiddenAttribute.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/DebuggerHiddenAttribute.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable - namespace System.Diagnostics { [AttributeUsage(AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Constructor, Inherited = false)] diff --git a/src/Common/src/CoreLib/System/Diagnostics/DebuggerNonUserCodeAttribute.cs b/src/Common/src/CoreLib/System/Diagnostics/DebuggerNonUserCodeAttribute.cs index c4e87ab8f4c2..1b61cb726285 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/DebuggerNonUserCodeAttribute.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/DebuggerNonUserCodeAttribute.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable - namespace System.Diagnostics { [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Constructor | AttributeTargets.Struct, Inherited = false)] diff --git a/src/Common/src/CoreLib/System/Diagnostics/DebuggerStepThroughAttribute.cs b/src/Common/src/CoreLib/System/Diagnostics/DebuggerStepThroughAttribute.cs index 633e38d1b9ca..82a164771e85 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/DebuggerStepThroughAttribute.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/DebuggerStepThroughAttribute.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable - namespace System.Diagnostics { #if PROJECTN diff --git a/src/Common/src/CoreLib/System/Diagnostics/DebuggerStepperBoundaryAttribute.cs b/src/Common/src/CoreLib/System/Diagnostics/DebuggerStepperBoundaryAttribute.cs index 1db7fba9a467..647f2fdb00a1 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/DebuggerStepperBoundaryAttribute.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/DebuggerStepperBoundaryAttribute.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable - namespace System.Diagnostics { /// Indicates the code following the attribute is to be executed in run, not step, mode. diff --git a/src/Common/src/CoreLib/System/Diagnostics/DebuggerTypeProxyAttribute.cs b/src/Common/src/CoreLib/System/Diagnostics/DebuggerTypeProxyAttribute.cs index 4795228dcbc7..5acc0185b03e 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/DebuggerTypeProxyAttribute.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/DebuggerTypeProxyAttribute.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable - namespace System.Diagnostics { [AttributeUsage(AttributeTargets.Struct | AttributeTargets.Class | AttributeTargets.Assembly, AllowMultiple = true)] diff --git a/src/Common/src/CoreLib/System/Diagnostics/DebuggerVisualizerAttribute.cs b/src/Common/src/CoreLib/System/Diagnostics/DebuggerVisualizerAttribute.cs index dc1fbd252343..b7f9e16c066d 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/DebuggerVisualizerAttribute.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/DebuggerVisualizerAttribute.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable - namespace System.Diagnostics { /// diff --git a/src/Common/src/CoreLib/System/Diagnostics/StackFrame.cs b/src/Common/src/CoreLib/System/Diagnostics/StackFrame.cs index a39c35a8a030..1683206bbce0 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/StackFrame.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/StackFrame.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Text; using System.Reflection; diff --git a/src/Common/src/CoreLib/System/Diagnostics/StackTrace.cs b/src/Common/src/CoreLib/System/Diagnostics/StackTrace.cs index 7b32f063f571..1e3e9f6f579b 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/StackTrace.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/StackTrace.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Collections; using System.Collections.Generic; using System.Globalization; diff --git a/src/Common/src/CoreLib/System/Diagnostics/StackTraceHiddenAttribute.cs b/src/Common/src/CoreLib/System/Diagnostics/StackTraceHiddenAttribute.cs index d12a08906d95..474274ac0851 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/StackTraceHiddenAttribute.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/StackTraceHiddenAttribute.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable - namespace System.Diagnostics { [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method | AttributeTargets.Constructor | AttributeTargets.Struct, Inherited = false)] diff --git a/src/Common/src/CoreLib/System/Diagnostics/SymbolStore/ISymbolDocumentWriter.cs b/src/Common/src/CoreLib/System/Diagnostics/SymbolStore/ISymbolDocumentWriter.cs index 1db401fcc15a..4980ed76f6cd 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/SymbolStore/ISymbolDocumentWriter.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/SymbolStore/ISymbolDocumentWriter.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Diagnostics.SymbolStore { public interface ISymbolDocumentWriter diff --git a/src/Common/src/CoreLib/System/Diagnostics/Tracing/ActivityTracker.cs b/src/Common/src/CoreLib/System/Diagnostics/Tracing/ActivityTracker.cs index c3d524276891..10c4add96348 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/Tracing/ActivityTracker.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/Tracing/ActivityTracker.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Diagnostics; using System.Threading; diff --git a/src/Common/src/CoreLib/System/Diagnostics/Tracing/CounterGroup.cs b/src/Common/src/CoreLib/System/Diagnostics/Tracing/CounterGroup.cs index 43dbd442aa95..d20abe8ced90 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/Tracing/CounterGroup.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/Tracing/CounterGroup.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Diagnostics; using System.Collections; diff --git a/src/Common/src/CoreLib/System/Diagnostics/Tracing/CounterPayload.cs b/src/Common/src/CoreLib/System/Diagnostics/Tracing/CounterPayload.cs index b44a856e187d..145dfbfc9267 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/Tracing/CounterPayload.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/Tracing/CounterPayload.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Diagnostics; using System.Collections; diff --git a/src/Common/src/CoreLib/System/Diagnostics/Tracing/DiagnosticCounter.cs b/src/Common/src/CoreLib/System/Diagnostics/Tracing/DiagnosticCounter.cs index 29bcdb0fd85e..84450ab11cb8 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/Tracing/DiagnosticCounter.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/Tracing/DiagnosticCounter.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Diagnostics; using System.Collections; diff --git a/src/Common/src/CoreLib/System/Diagnostics/Tracing/EventCounter.cs b/src/Common/src/CoreLib/System/Diagnostics/Tracing/EventCounter.cs index fae65ec40e61..bfe05525831e 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/Tracing/EventCounter.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/Tracing/EventCounter.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Diagnostics; using System.Collections; diff --git a/src/Common/src/CoreLib/System/Diagnostics/Tracing/EventDescriptor.cs b/src/Common/src/CoreLib/System/Diagnostics/Tracing/EventDescriptor.cs index cf269bc5a539..f3d4dbce3524 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/Tracing/EventDescriptor.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/Tracing/EventDescriptor.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/System/Diagnostics/Tracing/EventProvider.cs b/src/Common/src/CoreLib/System/Diagnostics/Tracing/EventProvider.cs index 2d4d68a436ce..caa7fae6e874 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/Tracing/EventProvider.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/Tracing/EventProvider.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using Microsoft.Win32; using System.Collections.Generic; using System.Diagnostics; diff --git a/src/Common/src/CoreLib/System/Diagnostics/Tracing/EventSource.cs b/src/Common/src/CoreLib/System/Diagnostics/Tracing/EventSource.cs index 7ea9be38fc73..e16a57f74347 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/Tracing/EventSource.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/Tracing/EventSource.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable // This program uses code hyperlinks available as part of the HyperAddin Visual Studio plug-in. // It is available from http://www.codeplex.com/hyperAddin #if ES_BUILD_STANDALONE diff --git a/src/Common/src/CoreLib/System/Diagnostics/Tracing/EventSourceException.cs b/src/Common/src/CoreLib/System/Diagnostics/Tracing/EventSourceException.cs index f5f9ba13b1a0..5786b38856bb 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/Tracing/EventSourceException.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/Tracing/EventSourceException.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Runtime.Serialization; diff --git a/src/Common/src/CoreLib/System/Diagnostics/Tracing/FrameworkEventSource.cs b/src/Common/src/CoreLib/System/Diagnostics/Tracing/FrameworkEventSource.cs index 7cd3c097eed6..680110f99cf0 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/Tracing/FrameworkEventSource.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/Tracing/FrameworkEventSource.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using Internal.Runtime.CompilerServices; namespace System.Diagnostics.Tracing diff --git a/src/Common/src/CoreLib/System/Diagnostics/Tracing/IEventProvider.cs b/src/Common/src/CoreLib/System/Diagnostics/Tracing/IEventProvider.cs index 010d9eaebabb..bc7ab9aee002 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/Tracing/IEventProvider.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/Tracing/IEventProvider.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using Microsoft.Win32; diff --git a/src/Common/src/CoreLib/System/Diagnostics/Tracing/IncrementingEventCounter.cs b/src/Common/src/CoreLib/System/Diagnostics/Tracing/IncrementingEventCounter.cs index d4efae8cc39e..e084bbb1c198 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/Tracing/IncrementingEventCounter.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/Tracing/IncrementingEventCounter.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Diagnostics; using System.Collections; diff --git a/src/Common/src/CoreLib/System/Diagnostics/Tracing/IncrementingPollingCounter.cs b/src/Common/src/CoreLib/System/Diagnostics/Tracing/IncrementingPollingCounter.cs index 2c93943f163d..116fbe8290d3 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/Tracing/IncrementingPollingCounter.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/Tracing/IncrementingPollingCounter.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Diagnostics; using System.Collections; diff --git a/src/Common/src/CoreLib/System/Diagnostics/Tracing/PollingCounter.cs b/src/Common/src/CoreLib/System/Diagnostics/Tracing/PollingCounter.cs index 6a0d3c0b5fde..abb472cd2ee9 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/Tracing/PollingCounter.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/Tracing/PollingCounter.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Diagnostics; using System.Collections; diff --git a/src/Common/src/CoreLib/System/Diagnostics/Tracing/StubEnvironment.cs b/src/Common/src/CoreLib/System/Diagnostics/Tracing/StubEnvironment.cs index dfb021747c3f..a719dc6bce73 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/Tracing/StubEnvironment.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/Tracing/StubEnvironment.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Collections.Generic; diff --git a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/ArrayTypeInfo.cs b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/ArrayTypeInfo.cs index f0db86229208..3a607d4b0d99 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/ArrayTypeInfo.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/ArrayTypeInfo.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Collections.Generic; using System.Diagnostics; diff --git a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/ConcurrentSet.cs b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/ConcurrentSet.cs index 32f4799d06de..a15dfaa79737 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/ConcurrentSet.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/ConcurrentSet.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using Interlocked = System.Threading.Interlocked; diff --git a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/ConcurrentSetItem.cs b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/ConcurrentSetItem.cs index 4dbd45ea1496..558dbf670b5c 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/ConcurrentSetItem.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/ConcurrentSetItem.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; #if ES_BUILD_STANDALONE diff --git a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/DataCollector.cs b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/DataCollector.cs index 4270914580cf..aa60ac8d0540 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/DataCollector.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/DataCollector.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Diagnostics; using System.Resources; diff --git a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/EmptyStruct.cs b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/EmptyStruct.cs index 38dd167a9fb2..bc7fb8c3462e 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/EmptyStruct.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/EmptyStruct.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable #if ES_BUILD_STANDALONE namespace Microsoft.Diagnostics.Tracing #else diff --git a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/EnumHelper.cs b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/EnumHelper.cs index 10cac0277094..33c085dcd17e 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/EnumHelper.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/EnumHelper.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable #if EVENTSOURCE_GENERICS ?using System; using System.Reflection; diff --git a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/EnumerableTypeInfo.cs b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/EnumerableTypeInfo.cs index 0d4245457217..c8ebdf8ab4d4 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/EnumerableTypeInfo.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/EnumerableTypeInfo.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Collections; using System.Collections.Generic; diff --git a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/EventDataAttribute.cs b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/EventDataAttribute.cs index 509f885b9d6a..bcfd34515f8a 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/EventDataAttribute.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/EventDataAttribute.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; #if ES_BUILD_STANDALONE diff --git a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/EventFieldAttribute.cs b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/EventFieldAttribute.cs index 3d9da9d99d5e..b3e4be4a7e43 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/EventFieldAttribute.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/EventFieldAttribute.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; #if ES_BUILD_STANDALONE diff --git a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/EventIgnoreAttribute.cs b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/EventIgnoreAttribute.cs index 51c457df2e65..769345f78e04 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/EventIgnoreAttribute.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/EventIgnoreAttribute.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; #if ES_BUILD_STANDALONE diff --git a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/EventPayload.cs b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/EventPayload.cs index 45a66a390bec..010d5127e598 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/EventPayload.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/EventPayload.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Collections.Generic; using System.Collections; diff --git a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/EventSourceActivity.cs b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/EventSourceActivity.cs index d45ae7d8f6f4..37763140159a 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/EventSourceActivity.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/EventSourceActivity.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Diagnostics; diff --git a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/EventSourceOptions.cs b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/EventSourceOptions.cs index 054fbb29c7e9..26305a570838 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/EventSourceOptions.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/EventSourceOptions.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; #if ES_BUILD_STANDALONE diff --git a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/FieldMetadata.cs b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/FieldMetadata.cs index 15ff780fbb67..2c50266134cb 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/FieldMetadata.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/FieldMetadata.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Diagnostics; using System.Resources; diff --git a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/InvokeTypeInfo.cs b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/InvokeTypeInfo.cs index 6b926ee9d1aa..34ca1447c386 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/InvokeTypeInfo.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/InvokeTypeInfo.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Collections.Generic; diff --git a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/NameInfo.cs b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/NameInfo.cs index 2f6d2f5deaf9..e1b0cf776e2e 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/NameInfo.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/NameInfo.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Collections.Generic; using System.Collections.Concurrent; diff --git a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/PropertyAnalysis.cs b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/PropertyAnalysis.cs index 05eac6dca047..aa79453177ce 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/PropertyAnalysis.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/PropertyAnalysis.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Reflection; diff --git a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/PropertyValue.cs b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/PropertyValue.cs index 0b3c67f79556..61ed20422542 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/PropertyValue.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/PropertyValue.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Reflection; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/SimpleEventTypes.cs b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/SimpleEventTypes.cs index 78fe98969845..74cde08e307f 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/SimpleEventTypes.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/SimpleEventTypes.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Diagnostics; using Interlocked = System.Threading.Interlocked; diff --git a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/SimpleTypeInfos.cs b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/SimpleTypeInfos.cs index aaa0a30d9387..b957de00eebb 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/SimpleTypeInfos.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/SimpleTypeInfos.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Collections.Generic; using System.Reflection; diff --git a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/Statics.cs b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/Statics.cs index 8fa50ac12820..379a67ad1e11 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/Statics.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/Statics.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Collections.Generic; using System.Reflection; diff --git a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/TraceLoggingDataCollector.cs b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/TraceLoggingDataCollector.cs index afa0e7140aa4..419f0f264787 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/TraceLoggingDataCollector.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/TraceLoggingDataCollector.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Security; diff --git a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/TraceLoggingEventSource.cs b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/TraceLoggingEventSource.cs index e49889dfe4d1..b737da4c1145 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/TraceLoggingEventSource.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/TraceLoggingEventSource.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable // This program uses code hyperlinks available as part of the HyperAddin Visual Studio plug-in. // It is available from http://www.codeplex.com/hyperAddin diff --git a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/TraceLoggingEventTypes.cs b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/TraceLoggingEventTypes.cs index 8963f5b91c51..9ff1ccaf53e9 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/TraceLoggingEventTypes.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/TraceLoggingEventTypes.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Collections.Generic; using Interlocked = System.Threading.Interlocked; diff --git a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/TraceLoggingMetadataCollector.cs b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/TraceLoggingMetadataCollector.cs index 7e39c966a460..8b522e85697b 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/TraceLoggingMetadataCollector.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/TraceLoggingMetadataCollector.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Collections.Generic; diff --git a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/TraceLoggingTypeInfo.cs b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/TraceLoggingTypeInfo.cs index 62dc932b2ee9..f31765c2f3aa 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/TraceLoggingTypeInfo.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/TraceLoggingTypeInfo.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Collections.Generic; diff --git a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/TypeAnalysis.cs b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/TypeAnalysis.cs index 83f76af888e8..3ade2b299227 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/TypeAnalysis.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/TypeAnalysis.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Collections.Generic; using System.Reflection; diff --git a/src/Common/src/CoreLib/System/Diagnostics/Tracing/Winmeta.cs b/src/Common/src/CoreLib/System/Diagnostics/Tracing/Winmeta.cs index 217500592c55..c60ca5b365c4 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/Tracing/Winmeta.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/Tracing/Winmeta.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable /*============================================================ ** ** diff --git a/src/Common/src/CoreLib/System/DivideByZeroException.cs b/src/Common/src/CoreLib/System/DivideByZeroException.cs index 8b04145eb330..8c079fb60463 100644 --- a/src/Common/src/CoreLib/System/DivideByZeroException.cs +++ b/src/Common/src/CoreLib/System/DivideByZeroException.cs @@ -11,7 +11,6 @@ ** =============================================================================*/ -#nullable enable using System.Runtime.Serialization; namespace System diff --git a/src/Common/src/CoreLib/System/DllNotFoundException.cs b/src/Common/src/CoreLib/System/DllNotFoundException.cs index 0165d1aa7c61..b9c3e05afaa8 100644 --- a/src/Common/src/CoreLib/System/DllNotFoundException.cs +++ b/src/Common/src/CoreLib/System/DllNotFoundException.cs @@ -12,7 +12,6 @@ ** =============================================================================*/ -#nullable enable using System.Runtime.Serialization; namespace System diff --git a/src/Common/src/CoreLib/System/Double.cs b/src/Common/src/CoreLib/System/Double.cs index 85b797ae8c4a..806add021ae5 100644 --- a/src/Common/src/CoreLib/System/Double.cs +++ b/src/Common/src/CoreLib/System/Double.cs @@ -12,7 +12,6 @@ ** ===========================================================*/ -#nullable enable using System.Globalization; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/System/DuplicateWaitObjectException.cs b/src/Common/src/CoreLib/System/DuplicateWaitObjectException.cs index 2fbe337f560f..0aef5d6bd7e9 100644 --- a/src/Common/src/CoreLib/System/DuplicateWaitObjectException.cs +++ b/src/Common/src/CoreLib/System/DuplicateWaitObjectException.cs @@ -11,7 +11,6 @@ ** =============================================================================*/ -#nullable enable using System.Runtime.Serialization; namespace System diff --git a/src/Common/src/CoreLib/System/Empty.cs b/src/Common/src/CoreLib/System/Empty.cs index 64c54dca029e..186b92078e87 100644 --- a/src/Common/src/CoreLib/System/Empty.cs +++ b/src/Common/src/CoreLib/System/Empty.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System { #if CORERT diff --git a/src/Common/src/CoreLib/System/EntryPointNotFoundException.cs b/src/Common/src/CoreLib/System/EntryPointNotFoundException.cs index f88e07b93fc8..e8b735c44b53 100644 --- a/src/Common/src/CoreLib/System/EntryPointNotFoundException.cs +++ b/src/Common/src/CoreLib/System/EntryPointNotFoundException.cs @@ -11,7 +11,6 @@ ** =============================================================================*/ -#nullable enable using System; using System.Runtime.Serialization; diff --git a/src/Common/src/CoreLib/System/Enum.cs b/src/Common/src/CoreLib/System/Enum.cs index d60be2c250a0..0f07c75bcf96 100644 --- a/src/Common/src/CoreLib/System/Enum.cs +++ b/src/Common/src/CoreLib/System/Enum.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; using System.Globalization; using System.Reflection; diff --git a/src/Common/src/CoreLib/System/Environment.NoRegistry.cs b/src/Common/src/CoreLib/System/Environment.NoRegistry.cs index 4ba66bdb03e4..6e699b1f3861 100644 --- a/src/Common/src/CoreLib/System/Environment.NoRegistry.cs +++ b/src/Common/src/CoreLib/System/Environment.NoRegistry.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; using System.Collections; using Microsoft.Win32; diff --git a/src/Common/src/CoreLib/System/Environment.SpecialFolder.cs b/src/Common/src/CoreLib/System/Environment.SpecialFolder.cs index 5e7d0549e49d..ae2add730d2b 100644 --- a/src/Common/src/CoreLib/System/Environment.SpecialFolder.cs +++ b/src/Common/src/CoreLib/System/Environment.SpecialFolder.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System { public static partial class Environment diff --git a/src/Common/src/CoreLib/System/Environment.SpecialFolderOption.cs b/src/Common/src/CoreLib/System/Environment.SpecialFolderOption.cs index 05972a701bf7..929e3d9036a1 100644 --- a/src/Common/src/CoreLib/System/Environment.SpecialFolderOption.cs +++ b/src/Common/src/CoreLib/System/Environment.SpecialFolderOption.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System { public static partial class Environment diff --git a/src/Common/src/CoreLib/System/Environment.Unix.cs b/src/Common/src/CoreLib/System/Environment.Unix.cs index 8f5fede529f4..fa343aca75ee 100644 --- a/src/Common/src/CoreLib/System/Environment.Unix.cs +++ b/src/Common/src/CoreLib/System/Environment.Unix.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Collections; using System.Collections.Generic; using System.Diagnostics; diff --git a/src/Common/src/CoreLib/System/Environment.Variables.Windows.cs b/src/Common/src/CoreLib/System/Environment.Variables.Windows.cs index c13410207f49..80c88d76701c 100644 --- a/src/Common/src/CoreLib/System/Environment.Variables.Windows.cs +++ b/src/Common/src/CoreLib/System/Environment.Variables.Windows.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Buffers; using System.Collections; using System.Diagnostics; diff --git a/src/Common/src/CoreLib/System/Environment.Win32.cs b/src/Common/src/CoreLib/System/Environment.Win32.cs index 2f2777363206..ca3b48c6078f 100644 --- a/src/Common/src/CoreLib/System/Environment.Win32.cs +++ b/src/Common/src/CoreLib/System/Environment.Win32.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Collections; using System.Diagnostics; using System.IO; diff --git a/src/Common/src/CoreLib/System/Environment.WinRT.cs b/src/Common/src/CoreLib/System/Environment.WinRT.cs index 1a22b7b32881..9a4bb8608a13 100644 --- a/src/Common/src/CoreLib/System/Environment.WinRT.cs +++ b/src/Common/src/CoreLib/System/Environment.WinRT.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.IO; using Internal.Runtime.Augments; diff --git a/src/Common/src/CoreLib/System/Environment.Windows.cs b/src/Common/src/CoreLib/System/Environment.Windows.cs index f60323b27d23..957d1894a2a8 100644 --- a/src/Common/src/CoreLib/System/Environment.Windows.cs +++ b/src/Common/src/CoreLib/System/Environment.Windows.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.IO; using System.Runtime.InteropServices; using System.Text; diff --git a/src/Common/src/CoreLib/System/Environment.cs b/src/Common/src/CoreLib/System/Environment.cs index 6e9a6bcf6dcb..dd3fc7f1d08b 100644 --- a/src/Common/src/CoreLib/System/Environment.cs +++ b/src/Common/src/CoreLib/System/Environment.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Collections; using System.Diagnostics; using System.Reflection; diff --git a/src/Common/src/CoreLib/System/EnvironmentVariableTarget.cs b/src/Common/src/CoreLib/System/EnvironmentVariableTarget.cs index 1f8213cb5645..a592832ce59c 100644 --- a/src/Common/src/CoreLib/System/EnvironmentVariableTarget.cs +++ b/src/Common/src/CoreLib/System/EnvironmentVariableTarget.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System { #if PROJECTN diff --git a/src/Common/src/CoreLib/System/EventArgs.cs b/src/Common/src/CoreLib/System/EventArgs.cs index 0d806c6312ac..f3561a8d0b14 100644 --- a/src/Common/src/CoreLib/System/EventArgs.cs +++ b/src/Common/src/CoreLib/System/EventArgs.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; namespace System diff --git a/src/Common/src/CoreLib/System/EventHandler.cs b/src/Common/src/CoreLib/System/EventHandler.cs index 7e0f183438f9..89c5de022bad 100644 --- a/src/Common/src/CoreLib/System/EventHandler.cs +++ b/src/Common/src/CoreLib/System/EventHandler.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; namespace System diff --git a/src/Common/src/CoreLib/System/Exception.cs b/src/Common/src/CoreLib/System/Exception.cs index 0fc37ee78bed..1148cdd2f331 100644 --- a/src/Common/src/CoreLib/System/Exception.cs +++ b/src/Common/src/CoreLib/System/Exception.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Collections; using System.Runtime.Serialization; diff --git a/src/Common/src/CoreLib/System/ExecutionEngineException.cs b/src/Common/src/CoreLib/System/ExecutionEngineException.cs index 30979888909a..2d6da9ca2f97 100644 --- a/src/Common/src/CoreLib/System/ExecutionEngineException.cs +++ b/src/Common/src/CoreLib/System/ExecutionEngineException.cs @@ -15,7 +15,6 @@ ** =============================================================================*/ -#nullable enable using System; using System.Runtime.Serialization; diff --git a/src/Common/src/CoreLib/System/FieldAccessException.cs b/src/Common/src/CoreLib/System/FieldAccessException.cs index c0b2bd663089..20b4bd95164f 100644 --- a/src/Common/src/CoreLib/System/FieldAccessException.cs +++ b/src/Common/src/CoreLib/System/FieldAccessException.cs @@ -9,7 +9,6 @@ ** =============================================================================*/ -#nullable enable using System.Runtime.Serialization; namespace System diff --git a/src/Common/src/CoreLib/System/FlagsAttribute.cs b/src/Common/src/CoreLib/System/FlagsAttribute.cs index 751f944f838d..4f3ab36bfd5a 100644 --- a/src/Common/src/CoreLib/System/FlagsAttribute.cs +++ b/src/Common/src/CoreLib/System/FlagsAttribute.cs @@ -5,7 +5,6 @@ //////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////// -#nullable enable namespace System { // Custom attribute to indicate that the enum diff --git a/src/Common/src/CoreLib/System/FormatException.cs b/src/Common/src/CoreLib/System/FormatException.cs index 9fefdca15ef3..f5639f2fc98f 100644 --- a/src/Common/src/CoreLib/System/FormatException.cs +++ b/src/Common/src/CoreLib/System/FormatException.cs @@ -11,7 +11,6 @@ ** ===========================================================*/ -#nullable enable using System.Runtime.Serialization; namespace System diff --git a/src/Common/src/CoreLib/System/FormattableString.cs b/src/Common/src/CoreLib/System/FormattableString.cs index 965a916bc3ec..73b1981cd718 100644 --- a/src/Common/src/CoreLib/System/FormattableString.cs +++ b/src/Common/src/CoreLib/System/FormattableString.cs @@ -11,7 +11,6 @@ ** ===========================================================*/ -#nullable enable namespace System { /// diff --git a/src/Common/src/CoreLib/System/GCMemoryInfo.cs b/src/Common/src/CoreLib/System/GCMemoryInfo.cs index ea1cd3c3820b..72c2aca14da2 100644 --- a/src/Common/src/CoreLib/System/GCMemoryInfo.cs +++ b/src/Common/src/CoreLib/System/GCMemoryInfo.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System { public readonly struct GCMemoryInfo diff --git a/src/Common/src/CoreLib/System/Gen2GcCallback.cs b/src/Common/src/CoreLib/System/Gen2GcCallback.cs index 88de270ad704..063c6ce0a0e6 100644 --- a/src/Common/src/CoreLib/System/Gen2GcCallback.cs +++ b/src/Common/src/CoreLib/System/Gen2GcCallback.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; using System.Runtime.ConstrainedExecution; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/System/Globalization/Calendar.cs b/src/Common/src/CoreLib/System/Globalization/Calendar.cs index aa9a07111dc9..4460d3d06a22 100644 --- a/src/Common/src/CoreLib/System/Globalization/Calendar.cs +++ b/src/Common/src/CoreLib/System/Globalization/Calendar.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; using System.Runtime.Serialization; diff --git a/src/Common/src/CoreLib/System/Globalization/CalendarData.Unix.cs b/src/Common/src/CoreLib/System/Globalization/CalendarData.Unix.cs index a8c69f86e644..61924a6a97b6 100644 --- a/src/Common/src/CoreLib/System/Globalization/CalendarData.Unix.cs +++ b/src/Common/src/CoreLib/System/Globalization/CalendarData.Unix.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Collections.Generic; using System.Diagnostics; using System.Security; diff --git a/src/Common/src/CoreLib/System/Globalization/CalendarData.Windows.cs b/src/Common/src/CoreLib/System/Globalization/CalendarData.Windows.cs index 84e4ddf5f2df..f8075d44700e 100644 --- a/src/Common/src/CoreLib/System/Globalization/CalendarData.Windows.cs +++ b/src/Common/src/CoreLib/System/Globalization/CalendarData.Windows.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Diagnostics; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/System/Globalization/CalendarData.cs b/src/Common/src/CoreLib/System/Globalization/CalendarData.cs index 93ec643b6725..6ca9e8d7f59a 100644 --- a/src/Common/src/CoreLib/System/Globalization/CalendarData.cs +++ b/src/Common/src/CoreLib/System/Globalization/CalendarData.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; namespace System.Globalization diff --git a/src/Common/src/CoreLib/System/Globalization/CalendricalCalculationsHelper.cs b/src/Common/src/CoreLib/System/Globalization/CalendricalCalculationsHelper.cs index a0fb75978a4f..241019a0bc31 100644 --- a/src/Common/src/CoreLib/System/Globalization/CalendricalCalculationsHelper.cs +++ b/src/Common/src/CoreLib/System/Globalization/CalendricalCalculationsHelper.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; namespace System.Globalization diff --git a/src/Common/src/CoreLib/System/Globalization/CharUnicodeInfo.cs b/src/Common/src/CoreLib/System/Globalization/CharUnicodeInfo.cs index a78965b3e23b..e627cc7483fd 100644 --- a/src/Common/src/CoreLib/System/Globalization/CharUnicodeInfo.cs +++ b/src/Common/src/CoreLib/System/Globalization/CharUnicodeInfo.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Buffers.Binary; using System.Diagnostics; using System.Text; diff --git a/src/Common/src/CoreLib/System/Globalization/CharUnicodeInfoData.cs b/src/Common/src/CoreLib/System/Globalization/CharUnicodeInfoData.cs index 1af4cfeb56cd..95aac2f35576 100644 --- a/src/Common/src/CoreLib/System/Globalization/CharUnicodeInfoData.cs +++ b/src/Common/src/CoreLib/System/Globalization/CharUnicodeInfoData.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Globalization { public static partial class CharUnicodeInfo diff --git a/src/Common/src/CoreLib/System/Globalization/ChineseLunisolarCalendar.cs b/src/Common/src/CoreLib/System/Globalization/ChineseLunisolarCalendar.cs index c7c129f338fc..b35508c5d039 100644 --- a/src/Common/src/CoreLib/System/Globalization/ChineseLunisolarCalendar.cs +++ b/src/Common/src/CoreLib/System/Globalization/ChineseLunisolarCalendar.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Globalization { /// diff --git a/src/Common/src/CoreLib/System/Globalization/CompareInfo.Invariant.cs b/src/Common/src/CoreLib/System/Globalization/CompareInfo.Invariant.cs index d579dbefcbb8..16201b8d1faa 100644 --- a/src/Common/src/CoreLib/System/Globalization/CompareInfo.Invariant.cs +++ b/src/Common/src/CoreLib/System/Globalization/CompareInfo.Invariant.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/System/Globalization/CompareInfo.Unix.cs b/src/Common/src/CoreLib/System/Globalization/CompareInfo.Unix.cs index bbb07a753552..c915c9d2275d 100644 --- a/src/Common/src/CoreLib/System/Globalization/CompareInfo.Unix.cs +++ b/src/Common/src/CoreLib/System/Globalization/CompareInfo.Unix.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Buffers; using System.Diagnostics; using System.Runtime.CompilerServices; diff --git a/src/Common/src/CoreLib/System/Globalization/CompareInfo.Windows.cs b/src/Common/src/CoreLib/System/Globalization/CompareInfo.Windows.cs index b706ad50e1de..7f1ba8ca917f 100644 --- a/src/Common/src/CoreLib/System/Globalization/CompareInfo.Windows.cs +++ b/src/Common/src/CoreLib/System/Globalization/CompareInfo.Windows.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Buffers; using System.Diagnostics; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/System/Globalization/CompareInfo.cs b/src/Common/src/CoreLib/System/Globalization/CompareInfo.cs index ef2eb4945afc..5cf1992bb37a 100644 --- a/src/Common/src/CoreLib/System/Globalization/CompareInfo.cs +++ b/src/Common/src/CoreLib/System/Globalization/CompareInfo.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; diff --git a/src/Common/src/CoreLib/System/Globalization/CultureData.Unix.cs b/src/Common/src/CoreLib/System/Globalization/CultureData.Unix.cs index f1a2669b9797..6546783af185 100644 --- a/src/Common/src/CoreLib/System/Globalization/CultureData.Unix.cs +++ b/src/Common/src/CoreLib/System/Globalization/CultureData.Unix.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Collections.Generic; using System.Diagnostics; diff --git a/src/Common/src/CoreLib/System/Globalization/CultureData.Windows.cs b/src/Common/src/CoreLib/System/Globalization/CultureData.Windows.cs index f92f119b4b3c..912fce6677a8 100644 --- a/src/Common/src/CoreLib/System/Globalization/CultureData.Windows.cs +++ b/src/Common/src/CoreLib/System/Globalization/CultureData.Windows.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Collections.Generic; using System.Diagnostics; using System.Runtime.CompilerServices; diff --git a/src/Common/src/CoreLib/System/Globalization/CultureData.cs b/src/Common/src/CoreLib/System/Globalization/CultureData.cs index c86bab5afacb..a5d2ef699da1 100644 --- a/src/Common/src/CoreLib/System/Globalization/CultureData.cs +++ b/src/Common/src/CoreLib/System/Globalization/CultureData.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Collections.Generic; using System.Diagnostics; using System.Text; diff --git a/src/Common/src/CoreLib/System/Globalization/CultureInfo.Unix.cs b/src/Common/src/CoreLib/System/Globalization/CultureInfo.Unix.cs index 0973ee0876d9..2a16ab6111f0 100644 --- a/src/Common/src/CoreLib/System/Globalization/CultureInfo.Unix.cs +++ b/src/Common/src/CoreLib/System/Globalization/CultureInfo.Unix.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; namespace System.Globalization diff --git a/src/Common/src/CoreLib/System/Globalization/CultureInfo.Windows.cs b/src/Common/src/CoreLib/System/Globalization/CultureInfo.Windows.cs index 8d312dfc5c49..67a70d8234a7 100644 --- a/src/Common/src/CoreLib/System/Globalization/CultureInfo.Windows.cs +++ b/src/Common/src/CoreLib/System/Globalization/CultureInfo.Windows.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable #if FEATURE_APPX using System.Resources; using Internal.Resources; diff --git a/src/Common/src/CoreLib/System/Globalization/CultureInfo.cs b/src/Common/src/CoreLib/System/Globalization/CultureInfo.cs index 643327ce12e7..76c966646e24 100644 --- a/src/Common/src/CoreLib/System/Globalization/CultureInfo.cs +++ b/src/Common/src/CoreLib/System/Globalization/CultureInfo.cs @@ -26,7 +26,6 @@ // //////////////////////////////////////////////////////////////////////////// -#nullable enable using System.Collections.Generic; using System.Diagnostics; using System.Threading; diff --git a/src/Common/src/CoreLib/System/Globalization/CultureNotFoundException.cs b/src/Common/src/CoreLib/System/Globalization/CultureNotFoundException.cs index 87d26f8a6735..e17385564b5c 100644 --- a/src/Common/src/CoreLib/System/Globalization/CultureNotFoundException.cs +++ b/src/Common/src/CoreLib/System/Globalization/CultureNotFoundException.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.Serialization; namespace System.Globalization diff --git a/src/Common/src/CoreLib/System/Globalization/DateTimeFormat.cs b/src/Common/src/CoreLib/System/Globalization/DateTimeFormat.cs index c2b20c46bfc9..6f6d10ab94a7 100644 --- a/src/Common/src/CoreLib/System/Globalization/DateTimeFormat.cs +++ b/src/Common/src/CoreLib/System/Globalization/DateTimeFormat.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Collections.Generic; using System.Diagnostics; using System.Globalization; diff --git a/src/Common/src/CoreLib/System/Globalization/DateTimeFormatInfo.cs b/src/Common/src/CoreLib/System/Globalization/DateTimeFormatInfo.cs index 78c97903ceda..b091f7a60364 100644 --- a/src/Common/src/CoreLib/System/Globalization/DateTimeFormatInfo.cs +++ b/src/Common/src/CoreLib/System/Globalization/DateTimeFormatInfo.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Collections.Generic; using System.Diagnostics; using System.Runtime.CompilerServices; diff --git a/src/Common/src/CoreLib/System/Globalization/DateTimeFormatInfoScanner.cs b/src/Common/src/CoreLib/System/Globalization/DateTimeFormatInfoScanner.cs index a43bfe777bd9..2005cf3b7341 100644 --- a/src/Common/src/CoreLib/System/Globalization/DateTimeFormatInfoScanner.cs +++ b/src/Common/src/CoreLib/System/Globalization/DateTimeFormatInfoScanner.cs @@ -19,7 +19,6 @@ // //////////////////////////////////////////////////////////////////////////// -#nullable enable using System.Collections.Generic; using System.Text; diff --git a/src/Common/src/CoreLib/System/Globalization/DateTimeParse.cs b/src/Common/src/CoreLib/System/Globalization/DateTimeParse.cs index 107fac5e6cd8..3bc6288e9a02 100644 --- a/src/Common/src/CoreLib/System/Globalization/DateTimeParse.cs +++ b/src/Common/src/CoreLib/System/Globalization/DateTimeParse.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; using System.Globalization; using System.Runtime.CompilerServices; diff --git a/src/Common/src/CoreLib/System/Globalization/DaylightTime.cs b/src/Common/src/CoreLib/System/Globalization/DaylightTime.cs index 0569b390c792..72a572c97de5 100644 --- a/src/Common/src/CoreLib/System/Globalization/DaylightTime.cs +++ b/src/Common/src/CoreLib/System/Globalization/DaylightTime.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Globalization { // This class represents a starting/ending time for a period of daylight saving time. diff --git a/src/Common/src/CoreLib/System/Globalization/EastAsianLunisolarCalendar.cs b/src/Common/src/CoreLib/System/Globalization/EastAsianLunisolarCalendar.cs index aa7d1fb0a35b..621524aaa819 100644 --- a/src/Common/src/CoreLib/System/Globalization/EastAsianLunisolarCalendar.cs +++ b/src/Common/src/CoreLib/System/Globalization/EastAsianLunisolarCalendar.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Globalization { public abstract class EastAsianLunisolarCalendar : Calendar diff --git a/src/Common/src/CoreLib/System/Globalization/GlobalizationExtensions.cs b/src/Common/src/CoreLib/System/Globalization/GlobalizationExtensions.cs index ed00cc58f6b9..007283aa6b10 100644 --- a/src/Common/src/CoreLib/System/Globalization/GlobalizationExtensions.cs +++ b/src/Common/src/CoreLib/System/Globalization/GlobalizationExtensions.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Diagnostics; diff --git a/src/Common/src/CoreLib/System/Globalization/GregorianCalendar.cs b/src/Common/src/CoreLib/System/Globalization/GregorianCalendar.cs index 68aba7e0352f..ebc5a54f4025 100644 --- a/src/Common/src/CoreLib/System/Globalization/GregorianCalendar.cs +++ b/src/Common/src/CoreLib/System/Globalization/GregorianCalendar.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Globalization { /// diff --git a/src/Common/src/CoreLib/System/Globalization/GregorianCalendarHelper.cs b/src/Common/src/CoreLib/System/Globalization/GregorianCalendarHelper.cs index 5889dcb2759a..efa47fe273b3 100644 --- a/src/Common/src/CoreLib/System/Globalization/GregorianCalendarHelper.cs +++ b/src/Common/src/CoreLib/System/Globalization/GregorianCalendarHelper.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Threading; diff --git a/src/Common/src/CoreLib/System/Globalization/HebrewCalendar.cs b/src/Common/src/CoreLib/System/Globalization/HebrewCalendar.cs index 314c99816dd0..d72e3817b19f 100644 --- a/src/Common/src/CoreLib/System/Globalization/HebrewCalendar.cs +++ b/src/Common/src/CoreLib/System/Globalization/HebrewCalendar.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; namespace System.Globalization diff --git a/src/Common/src/CoreLib/System/Globalization/HebrewNumber.cs b/src/Common/src/CoreLib/System/Globalization/HebrewNumber.cs index 1919e826773e..a2054377d5dd 100644 --- a/src/Common/src/CoreLib/System/Globalization/HebrewNumber.cs +++ b/src/Common/src/CoreLib/System/Globalization/HebrewNumber.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Text; using System.Diagnostics; diff --git a/src/Common/src/CoreLib/System/Globalization/HijriCalendar.Unix.cs b/src/Common/src/CoreLib/System/Globalization/HijriCalendar.Unix.cs index 2b7b35f2ea79..a6e8f73d3e44 100644 --- a/src/Common/src/CoreLib/System/Globalization/HijriCalendar.Unix.cs +++ b/src/Common/src/CoreLib/System/Globalization/HijriCalendar.Unix.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Globalization { public partial class HijriCalendar : Calendar diff --git a/src/Common/src/CoreLib/System/Globalization/HijriCalendar.Win32.cs b/src/Common/src/CoreLib/System/Globalization/HijriCalendar.Win32.cs index 1e8f7474d170..75988535e395 100644 --- a/src/Common/src/CoreLib/System/Globalization/HijriCalendar.Win32.cs +++ b/src/Common/src/CoreLib/System/Globalization/HijriCalendar.Win32.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using Internal.Win32; namespace System.Globalization diff --git a/src/Common/src/CoreLib/System/Globalization/HijriCalendar.WinRT.cs b/src/Common/src/CoreLib/System/Globalization/HijriCalendar.WinRT.cs index 85b9afef3051..fb91c27ef62a 100644 --- a/src/Common/src/CoreLib/System/Globalization/HijriCalendar.WinRT.cs +++ b/src/Common/src/CoreLib/System/Globalization/HijriCalendar.WinRT.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using Internal.Runtime.Augments; namespace System.Globalization diff --git a/src/Common/src/CoreLib/System/Globalization/HijriCalendar.cs b/src/Common/src/CoreLib/System/Globalization/HijriCalendar.cs index 41458c5a1251..910294eda277 100644 --- a/src/Common/src/CoreLib/System/Globalization/HijriCalendar.cs +++ b/src/Common/src/CoreLib/System/Globalization/HijriCalendar.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Globalization { /// diff --git a/src/Common/src/CoreLib/System/Globalization/ISOWeek.cs b/src/Common/src/CoreLib/System/Globalization/ISOWeek.cs index 89f5ca4a26cb..60715713b195 100644 --- a/src/Common/src/CoreLib/System/Globalization/ISOWeek.cs +++ b/src/Common/src/CoreLib/System/Globalization/ISOWeek.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using static System.Globalization.GregorianCalendar; namespace System.Globalization diff --git a/src/Common/src/CoreLib/System/Globalization/IdnMapping.Unix.cs b/src/Common/src/CoreLib/System/Globalization/IdnMapping.Unix.cs index 4c8dcb871991..ad15040cfc75 100644 --- a/src/Common/src/CoreLib/System/Globalization/IdnMapping.Unix.cs +++ b/src/Common/src/CoreLib/System/Globalization/IdnMapping.Unix.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; namespace System.Globalization diff --git a/src/Common/src/CoreLib/System/Globalization/IdnMapping.Windows.cs b/src/Common/src/CoreLib/System/Globalization/IdnMapping.Windows.cs index 696abbcde1f5..6622e643e0a4 100644 --- a/src/Common/src/CoreLib/System/Globalization/IdnMapping.Windows.cs +++ b/src/Common/src/CoreLib/System/Globalization/IdnMapping.Windows.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/System/Globalization/IdnMapping.cs b/src/Common/src/CoreLib/System/Globalization/IdnMapping.cs index 9da4411f10e2..63aa4e1097f1 100644 --- a/src/Common/src/CoreLib/System/Globalization/IdnMapping.cs +++ b/src/Common/src/CoreLib/System/Globalization/IdnMapping.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable // This file contains the IDN functions and implementation. // // This allows encoding of non-ASCII domain names in a "punycode" form, diff --git a/src/Common/src/CoreLib/System/Globalization/InternalGlobalizationHelper.cs b/src/Common/src/CoreLib/System/Globalization/InternalGlobalizationHelper.cs index 59fcd0f3c759..6dc2b1951561 100644 --- a/src/Common/src/CoreLib/System/Globalization/InternalGlobalizationHelper.cs +++ b/src/Common/src/CoreLib/System/Globalization/InternalGlobalizationHelper.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Globalization { internal class InternalGlobalizationHelper diff --git a/src/Common/src/CoreLib/System/Globalization/JapaneseCalendar.Unix.cs b/src/Common/src/CoreLib/System/Globalization/JapaneseCalendar.Unix.cs index 364eeef05971..0bbebba77428 100644 --- a/src/Common/src/CoreLib/System/Globalization/JapaneseCalendar.Unix.cs +++ b/src/Common/src/CoreLib/System/Globalization/JapaneseCalendar.Unix.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Collections.Generic; using System.Diagnostics; diff --git a/src/Common/src/CoreLib/System/Globalization/JapaneseCalendar.Win32.cs b/src/Common/src/CoreLib/System/Globalization/JapaneseCalendar.Win32.cs index 780b9533fd69..8e5941f3197d 100644 --- a/src/Common/src/CoreLib/System/Globalization/JapaneseCalendar.Win32.cs +++ b/src/Common/src/CoreLib/System/Globalization/JapaneseCalendar.Win32.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; using Internal.Win32; diff --git a/src/Common/src/CoreLib/System/Globalization/JapaneseCalendar.WinRT.cs b/src/Common/src/CoreLib/System/Globalization/JapaneseCalendar.WinRT.cs index ce770695f0be..15fe8984591e 100644 --- a/src/Common/src/CoreLib/System/Globalization/JapaneseCalendar.WinRT.cs +++ b/src/Common/src/CoreLib/System/Globalization/JapaneseCalendar.WinRT.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; using Internal.Runtime.Augments; diff --git a/src/Common/src/CoreLib/System/Globalization/JapaneseCalendar.cs b/src/Common/src/CoreLib/System/Globalization/JapaneseCalendar.cs index 90f03d561311..b0428db0a538 100644 --- a/src/Common/src/CoreLib/System/Globalization/JapaneseCalendar.cs +++ b/src/Common/src/CoreLib/System/Globalization/JapaneseCalendar.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Globalization { /// diff --git a/src/Common/src/CoreLib/System/Globalization/JapaneseLunisolarCalendar.cs b/src/Common/src/CoreLib/System/Globalization/JapaneseLunisolarCalendar.cs index ce1b941077b8..7190300116e0 100644 --- a/src/Common/src/CoreLib/System/Globalization/JapaneseLunisolarCalendar.cs +++ b/src/Common/src/CoreLib/System/Globalization/JapaneseLunisolarCalendar.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Globalization { /// diff --git a/src/Common/src/CoreLib/System/Globalization/JulianCalendar.cs b/src/Common/src/CoreLib/System/Globalization/JulianCalendar.cs index 782e197750c3..bba7f07053a9 100644 --- a/src/Common/src/CoreLib/System/Globalization/JulianCalendar.cs +++ b/src/Common/src/CoreLib/System/Globalization/JulianCalendar.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Globalization { /// diff --git a/src/Common/src/CoreLib/System/Globalization/KoreanCalendar.cs b/src/Common/src/CoreLib/System/Globalization/KoreanCalendar.cs index a29f4d25e4c6..699b484b24d3 100644 --- a/src/Common/src/CoreLib/System/Globalization/KoreanCalendar.cs +++ b/src/Common/src/CoreLib/System/Globalization/KoreanCalendar.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Globalization { /// diff --git a/src/Common/src/CoreLib/System/Globalization/KoreanLunisolarCalendar.cs b/src/Common/src/CoreLib/System/Globalization/KoreanLunisolarCalendar.cs index 5871436ee0cf..1204d722e2c7 100644 --- a/src/Common/src/CoreLib/System/Globalization/KoreanLunisolarCalendar.cs +++ b/src/Common/src/CoreLib/System/Globalization/KoreanLunisolarCalendar.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Globalization { /// diff --git a/src/Common/src/CoreLib/System/Globalization/LocaleData.Unix.cs b/src/Common/src/CoreLib/System/Globalization/LocaleData.Unix.cs index 6b5049c2baf1..aab78082dfa3 100644 --- a/src/Common/src/CoreLib/System/Globalization/LocaleData.Unix.cs +++ b/src/Common/src/CoreLib/System/Globalization/LocaleData.Unix.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; // This file contains the handling of Windows OS specific culture features. diff --git a/src/Common/src/CoreLib/System/Globalization/Normalization.Unix.cs b/src/Common/src/CoreLib/System/Globalization/Normalization.Unix.cs index 79a28322bc47..37c9024c33d4 100644 --- a/src/Common/src/CoreLib/System/Globalization/Normalization.Unix.cs +++ b/src/Common/src/CoreLib/System/Globalization/Normalization.Unix.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; using System.Text; diff --git a/src/Common/src/CoreLib/System/Globalization/Normalization.Windows.cs b/src/Common/src/CoreLib/System/Globalization/Normalization.Windows.cs index 0b3ce0ec86ae..b04a6729f213 100644 --- a/src/Common/src/CoreLib/System/Globalization/Normalization.Windows.cs +++ b/src/Common/src/CoreLib/System/Globalization/Normalization.Windows.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; using System.Runtime.InteropServices; using System.Text; diff --git a/src/Common/src/CoreLib/System/Globalization/NumberFormatInfo.cs b/src/Common/src/CoreLib/System/Globalization/NumberFormatInfo.cs index bd490e42adb9..3078c8e57625 100644 --- a/src/Common/src/CoreLib/System/Globalization/NumberFormatInfo.cs +++ b/src/Common/src/CoreLib/System/Globalization/NumberFormatInfo.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Globalization { /// diff --git a/src/Common/src/CoreLib/System/Globalization/PersianCalendar.cs b/src/Common/src/CoreLib/System/Globalization/PersianCalendar.cs index 0e43b15a1288..40f9c9c84616 100644 --- a/src/Common/src/CoreLib/System/Globalization/PersianCalendar.cs +++ b/src/Common/src/CoreLib/System/Globalization/PersianCalendar.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; namespace System.Globalization diff --git a/src/Common/src/CoreLib/System/Globalization/RegionInfo.cs b/src/Common/src/CoreLib/System/Globalization/RegionInfo.cs index 30471095f065..ccaa806adb69 100644 --- a/src/Common/src/CoreLib/System/Globalization/RegionInfo.cs +++ b/src/Common/src/CoreLib/System/Globalization/RegionInfo.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; namespace System.Globalization diff --git a/src/Common/src/CoreLib/System/Globalization/SortKey.cs b/src/Common/src/CoreLib/System/Globalization/SortKey.cs index f75b4f74ab9d..0b2a8a33ade0 100644 --- a/src/Common/src/CoreLib/System/Globalization/SortKey.cs +++ b/src/Common/src/CoreLib/System/Globalization/SortKey.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; namespace System.Globalization diff --git a/src/Common/src/CoreLib/System/Globalization/SortVersion.cs b/src/Common/src/CoreLib/System/Globalization/SortVersion.cs index 23cf8b37d79a..b76eeb1a4f82 100644 --- a/src/Common/src/CoreLib/System/Globalization/SortVersion.cs +++ b/src/Common/src/CoreLib/System/Globalization/SortVersion.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.CompilerServices; namespace System.Globalization diff --git a/src/Common/src/CoreLib/System/Globalization/StringInfo.cs b/src/Common/src/CoreLib/System/Globalization/StringInfo.cs index fe5db920ef4a..0e6a7cfdcad2 100644 --- a/src/Common/src/CoreLib/System/Globalization/StringInfo.cs +++ b/src/Common/src/CoreLib/System/Globalization/StringInfo.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; namespace System.Globalization diff --git a/src/Common/src/CoreLib/System/Globalization/TaiwanCalendar.cs b/src/Common/src/CoreLib/System/Globalization/TaiwanCalendar.cs index de541a30c4aa..e190f663775d 100644 --- a/src/Common/src/CoreLib/System/Globalization/TaiwanCalendar.cs +++ b/src/Common/src/CoreLib/System/Globalization/TaiwanCalendar.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics.CodeAnalysis; namespace System.Globalization diff --git a/src/Common/src/CoreLib/System/Globalization/TaiwanLunisolarCalendar.cs b/src/Common/src/CoreLib/System/Globalization/TaiwanLunisolarCalendar.cs index 47dbc3b0af23..13a2a635669d 100644 --- a/src/Common/src/CoreLib/System/Globalization/TaiwanLunisolarCalendar.cs +++ b/src/Common/src/CoreLib/System/Globalization/TaiwanLunisolarCalendar.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Globalization { /// diff --git a/src/Common/src/CoreLib/System/Globalization/TextElementEnumerator.cs b/src/Common/src/CoreLib/System/Globalization/TextElementEnumerator.cs index 4e34474f36fb..d896c7d99e93 100644 --- a/src/Common/src/CoreLib/System/Globalization/TextElementEnumerator.cs +++ b/src/Common/src/CoreLib/System/Globalization/TextElementEnumerator.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Collections; using System.Diagnostics; diff --git a/src/Common/src/CoreLib/System/Globalization/TextInfo.Unix.cs b/src/Common/src/CoreLib/System/Globalization/TextInfo.Unix.cs index 5f75e6c050d6..45cf55c56ebc 100644 --- a/src/Common/src/CoreLib/System/Globalization/TextInfo.Unix.cs +++ b/src/Common/src/CoreLib/System/Globalization/TextInfo.Unix.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; using System.Runtime.InteropServices; using System.Security; diff --git a/src/Common/src/CoreLib/System/Globalization/TextInfo.Windows.cs b/src/Common/src/CoreLib/System/Globalization/TextInfo.Windows.cs index b59648dae586..d0c859400b5d 100644 --- a/src/Common/src/CoreLib/System/Globalization/TextInfo.Windows.cs +++ b/src/Common/src/CoreLib/System/Globalization/TextInfo.Windows.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; namespace System.Globalization diff --git a/src/Common/src/CoreLib/System/Globalization/TextInfo.cs b/src/Common/src/CoreLib/System/Globalization/TextInfo.cs index 4391dec044fd..38005a0c6bb8 100644 --- a/src/Common/src/CoreLib/System/Globalization/TextInfo.cs +++ b/src/Common/src/CoreLib/System/Globalization/TextInfo.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/System/Globalization/ThaiBuddhistCalendar.cs b/src/Common/src/CoreLib/System/Globalization/ThaiBuddhistCalendar.cs index 8997f00f265d..8bc48db3f952 100644 --- a/src/Common/src/CoreLib/System/Globalization/ThaiBuddhistCalendar.cs +++ b/src/Common/src/CoreLib/System/Globalization/ThaiBuddhistCalendar.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Globalization { /// diff --git a/src/Common/src/CoreLib/System/Globalization/TimeSpanFormat.cs b/src/Common/src/CoreLib/System/Globalization/TimeSpanFormat.cs index 376827e6fd97..fe565435d85a 100644 --- a/src/Common/src/CoreLib/System/Globalization/TimeSpanFormat.cs +++ b/src/Common/src/CoreLib/System/Globalization/TimeSpanFormat.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Buffers.Text; using System.Diagnostics; using System.Runtime.CompilerServices; diff --git a/src/Common/src/CoreLib/System/Globalization/TimeSpanParse.cs b/src/Common/src/CoreLib/System/Globalization/TimeSpanParse.cs index a03a02c1f8b1..10665617223a 100644 --- a/src/Common/src/CoreLib/System/Globalization/TimeSpanParse.cs +++ b/src/Common/src/CoreLib/System/Globalization/TimeSpanParse.cs @@ -48,7 +48,6 @@ // //////////////////////////////////////////////////////////////////////////// -#nullable enable using System.Diagnostics; using System.Text; diff --git a/src/Common/src/CoreLib/System/Globalization/UmAlQuraCalendar.cs b/src/Common/src/CoreLib/System/Globalization/UmAlQuraCalendar.cs index 49d7e893ac90..7b52e833e90a 100644 --- a/src/Common/src/CoreLib/System/Globalization/UmAlQuraCalendar.cs +++ b/src/Common/src/CoreLib/System/Globalization/UmAlQuraCalendar.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; namespace System.Globalization diff --git a/src/Common/src/CoreLib/System/Guid.Unix.cs b/src/Common/src/CoreLib/System/Guid.Unix.cs index 113f76dfe396..1c39e112ed7e 100644 --- a/src/Common/src/CoreLib/System/Guid.Unix.cs +++ b/src/Common/src/CoreLib/System/Guid.Unix.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/System/Guid.Windows.cs b/src/Common/src/CoreLib/System/Guid.Windows.cs index 46bdec2c0f29..6a275084f938 100644 --- a/src/Common/src/CoreLib/System/Guid.Windows.cs +++ b/src/Common/src/CoreLib/System/Guid.Windows.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System { partial struct Guid diff --git a/src/Common/src/CoreLib/System/Guid.cs b/src/Common/src/CoreLib/System/Guid.cs index 6bcf48cf71c0..b27536c22549 100644 --- a/src/Common/src/CoreLib/System/Guid.cs +++ b/src/Common/src/CoreLib/System/Guid.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; using System.Globalization; using System.Runtime.CompilerServices; diff --git a/src/Common/src/CoreLib/System/HResults.cs b/src/Common/src/CoreLib/System/HResults.cs index df12ac3e4896..4da0e657a98e 100644 --- a/src/Common/src/CoreLib/System/HResults.cs +++ b/src/Common/src/CoreLib/System/HResults.cs @@ -18,7 +18,6 @@ // Reflection will use 0x1600 -> 0x161f. IO will use 0x1620 -> 0x163f. // Security will use 0x1640 -> 0x165f -#nullable enable using System; namespace System diff --git a/src/Common/src/CoreLib/System/HashCode.cs b/src/Common/src/CoreLib/System/HashCode.cs index 09fef5d95d3a..4d9dd6220575 100644 --- a/src/Common/src/CoreLib/System/HashCode.cs +++ b/src/Common/src/CoreLib/System/HashCode.cs @@ -41,7 +41,6 @@ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT */ -#nullable enable using System.Collections.Generic; using System.ComponentModel; using System.Numerics; diff --git a/src/Common/src/CoreLib/System/IAsyncDisposable.cs b/src/Common/src/CoreLib/System/IAsyncDisposable.cs index 3139b0051329..c29f549df294 100644 --- a/src/Common/src/CoreLib/System/IAsyncDisposable.cs +++ b/src/Common/src/CoreLib/System/IAsyncDisposable.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Threading.Tasks; namespace System diff --git a/src/Common/src/CoreLib/System/IAsyncResult.cs b/src/Common/src/CoreLib/System/IAsyncResult.cs index 8d7b32327e83..1caa724c8fd8 100644 --- a/src/Common/src/CoreLib/System/IAsyncResult.cs +++ b/src/Common/src/CoreLib/System/IAsyncResult.cs @@ -11,7 +11,6 @@ ** ===========================================================*/ -#nullable enable using System.Threading; namespace System diff --git a/src/Common/src/CoreLib/System/ICloneable.cs b/src/Common/src/CoreLib/System/ICloneable.cs index 325a367ba76e..9f123e45c849 100644 --- a/src/Common/src/CoreLib/System/ICloneable.cs +++ b/src/Common/src/CoreLib/System/ICloneable.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System { public interface ICloneable diff --git a/src/Common/src/CoreLib/System/IComparable.cs b/src/Common/src/CoreLib/System/IComparable.cs index 1a23580e324f..8c4f38ed9987 100644 --- a/src/Common/src/CoreLib/System/IComparable.cs +++ b/src/Common/src/CoreLib/System/IComparable.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System { // The IComparable interface is implemented by classes that support an diff --git a/src/Common/src/CoreLib/System/IConvertible.cs b/src/Common/src/CoreLib/System/IConvertible.cs index 2b0c13425b3e..0acfc9c84a4b 100644 --- a/src/Common/src/CoreLib/System/IConvertible.cs +++ b/src/Common/src/CoreLib/System/IConvertible.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System { // The IConvertible interface represents an object that contains a value. This diff --git a/src/Common/src/CoreLib/System/ICustomFormatter.cs b/src/Common/src/CoreLib/System/ICustomFormatter.cs index df5d9b8cf438..6911e8c56081 100644 --- a/src/Common/src/CoreLib/System/ICustomFormatter.cs +++ b/src/Common/src/CoreLib/System/ICustomFormatter.cs @@ -12,7 +12,6 @@ ** ===========================================================*/ -#nullable enable namespace System { public interface ICustomFormatter diff --git a/src/Common/src/CoreLib/System/IDisposable.cs b/src/Common/src/CoreLib/System/IDisposable.cs index fb89476b1529..24f0740edced 100644 --- a/src/Common/src/CoreLib/System/IDisposable.cs +++ b/src/Common/src/CoreLib/System/IDisposable.cs @@ -12,7 +12,6 @@ ** ===========================================================*/ -#nullable enable namespace System { // IDisposable is an attempt at helping to solve problems with deterministic diff --git a/src/Common/src/CoreLib/System/IEquatable.cs b/src/Common/src/CoreLib/System/IEquatable.cs index 482f467f8529..b2c96a9bb282 100644 --- a/src/Common/src/CoreLib/System/IEquatable.cs +++ b/src/Common/src/CoreLib/System/IEquatable.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System { public interface IEquatable diff --git a/src/Common/src/CoreLib/System/IFormatProvider.cs b/src/Common/src/CoreLib/System/IFormatProvider.cs index 706dea8cc688..f1e767f54372 100644 --- a/src/Common/src/CoreLib/System/IFormatProvider.cs +++ b/src/Common/src/CoreLib/System/IFormatProvider.cs @@ -11,7 +11,6 @@ ** ============================================================*/ -#nullable enable namespace System { public interface IFormatProvider diff --git a/src/Common/src/CoreLib/System/IFormattable.cs b/src/Common/src/CoreLib/System/IFormattable.cs index e3fa7c19f0a1..bb5aeae97aa6 100644 --- a/src/Common/src/CoreLib/System/IFormattable.cs +++ b/src/Common/src/CoreLib/System/IFormattable.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System { public interface IFormattable diff --git a/src/Common/src/CoreLib/System/IO/BinaryReader.cs b/src/Common/src/CoreLib/System/IO/BinaryReader.cs index 280afe6665f4..560c998a442e 100644 --- a/src/Common/src/CoreLib/System/IO/BinaryReader.cs +++ b/src/Common/src/CoreLib/System/IO/BinaryReader.cs @@ -14,7 +14,6 @@ ** ============================================================*/ -#nullable enable using System.Buffers.Binary; using System.Diagnostics; using System.Runtime.CompilerServices; diff --git a/src/Common/src/CoreLib/System/IO/BinaryWriter.cs b/src/Common/src/CoreLib/System/IO/BinaryWriter.cs index 89ebf98f4bd0..1e8f8bdb8cdd 100644 --- a/src/Common/src/CoreLib/System/IO/BinaryWriter.cs +++ b/src/Common/src/CoreLib/System/IO/BinaryWriter.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Text; using System.Diagnostics; using System.Buffers; diff --git a/src/Common/src/CoreLib/System/IO/DirectoryNotFoundException.cs b/src/Common/src/CoreLib/System/IO/DirectoryNotFoundException.cs index 58d4ee1a3f03..7fdf3bce29e3 100644 --- a/src/Common/src/CoreLib/System/IO/DirectoryNotFoundException.cs +++ b/src/Common/src/CoreLib/System/IO/DirectoryNotFoundException.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.Serialization; namespace System.IO diff --git a/src/Common/src/CoreLib/System/IO/DisableMediaInsertionPrompt.cs b/src/Common/src/CoreLib/System/IO/DisableMediaInsertionPrompt.cs index cfb4b6667a7f..a3a2d29837ca 100644 --- a/src/Common/src/CoreLib/System/IO/DisableMediaInsertionPrompt.cs +++ b/src/Common/src/CoreLib/System/IO/DisableMediaInsertionPrompt.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable #if MS_IO_REDIST using System; diff --git a/src/Common/src/CoreLib/System/IO/DriveInfoInternal.Unix.cs b/src/Common/src/CoreLib/System/IO/DriveInfoInternal.Unix.cs index c4eba1c24c5b..78ef95704fe9 100644 --- a/src/Common/src/CoreLib/System/IO/DriveInfoInternal.Unix.cs +++ b/src/Common/src/CoreLib/System/IO/DriveInfoInternal.Unix.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; using System.Text; diff --git a/src/Common/src/CoreLib/System/IO/EncodingCache.cs b/src/Common/src/CoreLib/System/IO/EncodingCache.cs index fb3795e5e266..53379bc77f38 100644 --- a/src/Common/src/CoreLib/System/IO/EncodingCache.cs +++ b/src/Common/src/CoreLib/System/IO/EncodingCache.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Text; namespace System.IO diff --git a/src/Common/src/CoreLib/System/IO/EndOfStreamException.cs b/src/Common/src/CoreLib/System/IO/EndOfStreamException.cs index 69759aac1b4e..c965b6a1c201 100644 --- a/src/Common/src/CoreLib/System/IO/EndOfStreamException.cs +++ b/src/Common/src/CoreLib/System/IO/EndOfStreamException.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.Serialization; namespace System.IO diff --git a/src/Common/src/CoreLib/System/IO/Error.cs b/src/Common/src/CoreLib/System/IO/Error.cs index db8095428ac8..fd39f166cf9c 100644 --- a/src/Common/src/CoreLib/System/IO/Error.cs +++ b/src/Common/src/CoreLib/System/IO/Error.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.IO { /// diff --git a/src/Common/src/CoreLib/System/IO/FileAccess.cs b/src/Common/src/CoreLib/System/IO/FileAccess.cs index 2fd7408b85f5..1b70bae17297 100644 --- a/src/Common/src/CoreLib/System/IO/FileAccess.cs +++ b/src/Common/src/CoreLib/System/IO/FileAccess.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; namespace System.IO diff --git a/src/Common/src/CoreLib/System/IO/FileLoadException.cs b/src/Common/src/CoreLib/System/IO/FileLoadException.cs index a893aca47b46..729d480d959c 100644 --- a/src/Common/src/CoreLib/System/IO/FileLoadException.cs +++ b/src/Common/src/CoreLib/System/IO/FileLoadException.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.Serialization; namespace System.IO diff --git a/src/Common/src/CoreLib/System/IO/FileMode.cs b/src/Common/src/CoreLib/System/IO/FileMode.cs index 39c74e50253f..77f2fe6f20fb 100644 --- a/src/Common/src/CoreLib/System/IO/FileMode.cs +++ b/src/Common/src/CoreLib/System/IO/FileMode.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.IO { // Contains constants for specifying how the OS should open a file. diff --git a/src/Common/src/CoreLib/System/IO/FileNotFoundException.cs b/src/Common/src/CoreLib/System/IO/FileNotFoundException.cs index 9ab3eb38e534..0ce1c74da349 100644 --- a/src/Common/src/CoreLib/System/IO/FileNotFoundException.cs +++ b/src/Common/src/CoreLib/System/IO/FileNotFoundException.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; using System.Runtime.Serialization; diff --git a/src/Common/src/CoreLib/System/IO/FileOptions.cs b/src/Common/src/CoreLib/System/IO/FileOptions.cs index b11b9bb14017..ae8396a588f8 100644 --- a/src/Common/src/CoreLib/System/IO/FileOptions.cs +++ b/src/Common/src/CoreLib/System/IO/FileOptions.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/System/IO/FileShare.cs b/src/Common/src/CoreLib/System/IO/FileShare.cs index 12dc6e64ebc2..e9b9b5e32f98 100644 --- a/src/Common/src/CoreLib/System/IO/FileShare.cs +++ b/src/Common/src/CoreLib/System/IO/FileShare.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; namespace System.IO diff --git a/src/Common/src/CoreLib/System/IO/FileStream.Linux.cs b/src/Common/src/CoreLib/System/IO/FileStream.Linux.cs index 33207fc6023e..873c4eb5599d 100644 --- a/src/Common/src/CoreLib/System/IO/FileStream.Linux.cs +++ b/src/Common/src/CoreLib/System/IO/FileStream.Linux.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using Microsoft.Win32.SafeHandles; using System.Diagnostics; using System.Threading; diff --git a/src/Common/src/CoreLib/System/IO/FileStream.OSX.cs b/src/Common/src/CoreLib/System/IO/FileStream.OSX.cs index c8e4c9086dc4..f29e92233736 100644 --- a/src/Common/src/CoreLib/System/IO/FileStream.OSX.cs +++ b/src/Common/src/CoreLib/System/IO/FileStream.OSX.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.IO { public partial class FileStream : Stream diff --git a/src/Common/src/CoreLib/System/IO/FileStream.Unix.cs b/src/Common/src/CoreLib/System/IO/FileStream.Unix.cs index f90b53c7d9c6..e3fe604f94ff 100644 --- a/src/Common/src/CoreLib/System/IO/FileStream.Unix.cs +++ b/src/Common/src/CoreLib/System/IO/FileStream.Unix.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using Microsoft.Win32.SafeHandles; using System.Diagnostics; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/System/IO/FileStream.Win32.cs b/src/Common/src/CoreLib/System/IO/FileStream.Win32.cs index f97f53153051..1f4f7fdb5dec 100644 --- a/src/Common/src/CoreLib/System/IO/FileStream.Win32.cs +++ b/src/Common/src/CoreLib/System/IO/FileStream.Win32.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; using Microsoft.Win32.SafeHandles; diff --git a/src/Common/src/CoreLib/System/IO/FileStream.WinRT.cs b/src/Common/src/CoreLib/System/IO/FileStream.WinRT.cs index 937316568be5..6266d5dc20f9 100644 --- a/src/Common/src/CoreLib/System/IO/FileStream.WinRT.cs +++ b/src/Common/src/CoreLib/System/IO/FileStream.WinRT.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using Microsoft.Win32.SafeHandles; using System.Diagnostics; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/System/IO/FileStream.Windows.cs b/src/Common/src/CoreLib/System/IO/FileStream.Windows.cs index 49e9812e0ae1..bfab0c1516a5 100644 --- a/src/Common/src/CoreLib/System/IO/FileStream.Windows.cs +++ b/src/Common/src/CoreLib/System/IO/FileStream.Windows.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Buffers; using System.Diagnostics; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/System/IO/FileStream.cs b/src/Common/src/CoreLib/System/IO/FileStream.cs index 0f75f369488b..4f4198330c20 100644 --- a/src/Common/src/CoreLib/System/IO/FileStream.cs +++ b/src/Common/src/CoreLib/System/IO/FileStream.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.Serialization; using System.Threading; using System.Threading.Tasks; diff --git a/src/Common/src/CoreLib/System/IO/FileStreamCompletionSource.Win32.cs b/src/Common/src/CoreLib/System/IO/FileStreamCompletionSource.Win32.cs index a1ad6291f736..837946e04f7d 100644 --- a/src/Common/src/CoreLib/System/IO/FileStreamCompletionSource.Win32.cs +++ b/src/Common/src/CoreLib/System/IO/FileStreamCompletionSource.Win32.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Buffers; using System.Diagnostics; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/System/IO/IOException.cs b/src/Common/src/CoreLib/System/IO/IOException.cs index ba8525f043c1..a22cc3bc48f8 100644 --- a/src/Common/src/CoreLib/System/IO/IOException.cs +++ b/src/Common/src/CoreLib/System/IO/IOException.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.Serialization; namespace System.IO diff --git a/src/Common/src/CoreLib/System/IO/MemoryStream.cs b/src/Common/src/CoreLib/System/IO/MemoryStream.cs index 7377271315c9..b8a11d98707b 100644 --- a/src/Common/src/CoreLib/System/IO/MemoryStream.cs +++ b/src/Common/src/CoreLib/System/IO/MemoryStream.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/System/IO/Path.Unix.cs b/src/Common/src/CoreLib/System/IO/Path.Unix.cs index f8c93d65160d..5bc727f45029 100644 --- a/src/Common/src/CoreLib/System/IO/Path.Unix.cs +++ b/src/Common/src/CoreLib/System/IO/Path.Unix.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; using System.Runtime.InteropServices; using System.Text; diff --git a/src/Common/src/CoreLib/System/IO/Path.Windows.cs b/src/Common/src/CoreLib/System/IO/Path.Windows.cs index 71a986eeef4a..fccd30c05237 100644 --- a/src/Common/src/CoreLib/System/IO/Path.Windows.cs +++ b/src/Common/src/CoreLib/System/IO/Path.Windows.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; using System.Text; diff --git a/src/Common/src/CoreLib/System/IO/Path.cs b/src/Common/src/CoreLib/System/IO/Path.cs index 27741b9248e9..61235e3375fd 100644 --- a/src/Common/src/CoreLib/System/IO/Path.cs +++ b/src/Common/src/CoreLib/System/IO/Path.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; using System.Runtime.InteropServices; using System.Text; diff --git a/src/Common/src/CoreLib/System/IO/PathHelper.Windows.cs b/src/Common/src/CoreLib/System/IO/PathHelper.Windows.cs index 83618cfa13c0..ae935158efe5 100644 --- a/src/Common/src/CoreLib/System/IO/PathHelper.Windows.cs +++ b/src/Common/src/CoreLib/System/IO/PathHelper.Windows.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; using System.Runtime.InteropServices; using System.Text; diff --git a/src/Common/src/CoreLib/System/IO/PathInternal.cs b/src/Common/src/CoreLib/System/IO/PathInternal.cs index 549a2d18b29e..c6e1de46c8d7 100644 --- a/src/Common/src/CoreLib/System/IO/PathInternal.cs +++ b/src/Common/src/CoreLib/System/IO/PathInternal.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; using System.Text; diff --git a/src/Common/src/CoreLib/System/IO/PathTooLongException.cs b/src/Common/src/CoreLib/System/IO/PathTooLongException.cs index e0a35f7c9ee1..3a69930a911f 100644 --- a/src/Common/src/CoreLib/System/IO/PathTooLongException.cs +++ b/src/Common/src/CoreLib/System/IO/PathTooLongException.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.Serialization; namespace System.IO diff --git a/src/Common/src/CoreLib/System/IO/PersistedFiles.Names.Unix.cs b/src/Common/src/CoreLib/System/IO/PersistedFiles.Names.Unix.cs index 03bfc0251009..8984f1aee32b 100644 --- a/src/Common/src/CoreLib/System/IO/PersistedFiles.Names.Unix.cs +++ b/src/Common/src/CoreLib/System/IO/PersistedFiles.Names.Unix.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.IO { internal static partial class PersistedFiles diff --git a/src/Common/src/CoreLib/System/IO/PinnedBufferMemoryStream.cs b/src/Common/src/CoreLib/System/IO/PinnedBufferMemoryStream.cs index 2589eee0e061..bcec1f33ac9f 100644 --- a/src/Common/src/CoreLib/System/IO/PinnedBufferMemoryStream.cs +++ b/src/Common/src/CoreLib/System/IO/PinnedBufferMemoryStream.cs @@ -14,7 +14,6 @@ ** ===========================================================*/ -#nullable enable using System; using System.Runtime.InteropServices; using System.Diagnostics; diff --git a/src/Common/src/CoreLib/System/IO/SeekOrigin.cs b/src/Common/src/CoreLib/System/IO/SeekOrigin.cs index e1da4d5853d3..3798a0ce7022 100644 --- a/src/Common/src/CoreLib/System/IO/SeekOrigin.cs +++ b/src/Common/src/CoreLib/System/IO/SeekOrigin.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.IO { // Provides seek reference points. To seek to the end of a stream, diff --git a/src/Common/src/CoreLib/System/IO/Stream.cs b/src/Common/src/CoreLib/System/IO/Stream.cs index 55ae9007c8b4..e6288cbef10b 100644 --- a/src/Common/src/CoreLib/System/IO/Stream.cs +++ b/src/Common/src/CoreLib/System/IO/Stream.cs @@ -15,7 +15,6 @@ ** ===========================================================*/ -#nullable enable using System.Buffers; using System.Diagnostics; using System.Runtime.ExceptionServices; diff --git a/src/Common/src/CoreLib/System/IO/StreamHelpers.CopyValidation.cs b/src/Common/src/CoreLib/System/IO/StreamHelpers.CopyValidation.cs index fe849fbef202..45bbd816df01 100644 --- a/src/Common/src/CoreLib/System/IO/StreamHelpers.CopyValidation.cs +++ b/src/Common/src/CoreLib/System/IO/StreamHelpers.CopyValidation.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.IO { /// Provides methods to help in the implementation of Stream-derived types. diff --git a/src/Common/src/CoreLib/System/IO/StreamReader.cs b/src/Common/src/CoreLib/System/IO/StreamReader.cs index 61accbf8996e..a59ac58445ea 100644 --- a/src/Common/src/CoreLib/System/IO/StreamReader.cs +++ b/src/Common/src/CoreLib/System/IO/StreamReader.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.Text; diff --git a/src/Common/src/CoreLib/System/IO/StreamWriter.cs b/src/Common/src/CoreLib/System/IO/StreamWriter.cs index 856dd27280de..87557e89b6dd 100644 --- a/src/Common/src/CoreLib/System/IO/StreamWriter.cs +++ b/src/Common/src/CoreLib/System/IO/StreamWriter.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/System/IO/TextReader.cs b/src/Common/src/CoreLib/System/IO/TextReader.cs index e2f0af91788d..a49463f086d5 100644 --- a/src/Common/src/CoreLib/System/IO/TextReader.cs +++ b/src/Common/src/CoreLib/System/IO/TextReader.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Text; using System.Threading; using System.Threading.Tasks; diff --git a/src/Common/src/CoreLib/System/IO/TextWriter.cs b/src/Common/src/CoreLib/System/IO/TextWriter.cs index f648df0ce60d..875eb5930307 100644 --- a/src/Common/src/CoreLib/System/IO/TextWriter.cs +++ b/src/Common/src/CoreLib/System/IO/TextWriter.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Text; using System.Threading; using System.Globalization; diff --git a/src/Common/src/CoreLib/System/IO/UnmanagedMemoryAccessor.cs b/src/Common/src/CoreLib/System/IO/UnmanagedMemoryAccessor.cs index 4e66b7cdec12..c9f43698705b 100644 --- a/src/Common/src/CoreLib/System/IO/UnmanagedMemoryAccessor.cs +++ b/src/Common/src/CoreLib/System/IO/UnmanagedMemoryAccessor.cs @@ -13,7 +13,6 @@ ** ===========================================================*/ -#nullable enable using System.Runtime.InteropServices; using Internal.Runtime.CompilerServices; diff --git a/src/Common/src/CoreLib/System/IO/UnmanagedMemoryStream.cs b/src/Common/src/CoreLib/System/IO/UnmanagedMemoryStream.cs index a42cdf918ced..eeaed0a3810b 100644 --- a/src/Common/src/CoreLib/System/IO/UnmanagedMemoryStream.cs +++ b/src/Common/src/CoreLib/System/IO/UnmanagedMemoryStream.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/System/IO/UnmanagedMemoryStreamWrapper.cs b/src/Common/src/CoreLib/System/IO/UnmanagedMemoryStreamWrapper.cs index d4a5f98255f7..a8c84da7adbf 100644 --- a/src/Common/src/CoreLib/System/IO/UnmanagedMemoryStreamWrapper.cs +++ b/src/Common/src/CoreLib/System/IO/UnmanagedMemoryStreamWrapper.cs @@ -11,7 +11,6 @@ ** ===========================================================*/ -#nullable enable using System.Threading; using System.Threading.Tasks; diff --git a/src/Common/src/CoreLib/System/IObservable.cs b/src/Common/src/CoreLib/System/IObservable.cs index c451a7b8ea26..aabb0b8fb426 100644 --- a/src/Common/src/CoreLib/System/IObservable.cs +++ b/src/Common/src/CoreLib/System/IObservable.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System { public interface IObservable diff --git a/src/Common/src/CoreLib/System/IObserver.cs b/src/Common/src/CoreLib/System/IObserver.cs index 35906682b320..39e123de8dbf 100644 --- a/src/Common/src/CoreLib/System/IObserver.cs +++ b/src/Common/src/CoreLib/System/IObserver.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System { public interface IObserver diff --git a/src/Common/src/CoreLib/System/IProgress.cs b/src/Common/src/CoreLib/System/IProgress.cs index e344c73afe28..724c7bdce9ae 100644 --- a/src/Common/src/CoreLib/System/IProgress.cs +++ b/src/Common/src/CoreLib/System/IProgress.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System { /// Defines a provider for progress updates. diff --git a/src/Common/src/CoreLib/System/ISpanFormattable.cs b/src/Common/src/CoreLib/System/ISpanFormattable.cs index d63e6ff8af21..d3744addcbdb 100644 --- a/src/Common/src/CoreLib/System/ISpanFormattable.cs +++ b/src/Common/src/CoreLib/System/ISpanFormattable.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System { internal interface ISpanFormattable diff --git a/src/Common/src/CoreLib/System/Index.cs b/src/Common/src/CoreLib/System/Index.cs index 9ed7ed1127be..0e4d8514dee0 100644 --- a/src/Common/src/CoreLib/System/Index.cs +++ b/src/Common/src/CoreLib/System/Index.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; using System.Runtime.CompilerServices; diff --git a/src/Common/src/CoreLib/System/IndexOutOfRangeException.cs b/src/Common/src/CoreLib/System/IndexOutOfRangeException.cs index 46d8e3869ef8..ec4195c23fbf 100644 --- a/src/Common/src/CoreLib/System/IndexOutOfRangeException.cs +++ b/src/Common/src/CoreLib/System/IndexOutOfRangeException.cs @@ -11,7 +11,6 @@ ** =============================================================================*/ -#nullable enable using System.Runtime.Serialization; namespace System diff --git a/src/Common/src/CoreLib/System/InsufficientExecutionStackException.cs b/src/Common/src/CoreLib/System/InsufficientExecutionStackException.cs index e6b71b9ac29b..bb60d533f0ae 100644 --- a/src/Common/src/CoreLib/System/InsufficientExecutionStackException.cs +++ b/src/Common/src/CoreLib/System/InsufficientExecutionStackException.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.Serialization; namespace System diff --git a/src/Common/src/CoreLib/System/InsufficientMemoryException.cs b/src/Common/src/CoreLib/System/InsufficientMemoryException.cs index 197bd166d556..b42f8c4ff998 100644 --- a/src/Common/src/CoreLib/System/InsufficientMemoryException.cs +++ b/src/Common/src/CoreLib/System/InsufficientMemoryException.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.Serialization; namespace System diff --git a/src/Common/src/CoreLib/System/Int16.cs b/src/Common/src/CoreLib/System/Int16.cs index e67225374f12..ed556eede405 100644 --- a/src/Common/src/CoreLib/System/Int16.cs +++ b/src/Common/src/CoreLib/System/Int16.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Globalization; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/System/Int32.cs b/src/Common/src/CoreLib/System/Int32.cs index 8fe2c96394da..daf1af53f1d3 100644 --- a/src/Common/src/CoreLib/System/Int32.cs +++ b/src/Common/src/CoreLib/System/Int32.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Globalization; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/System/Int64.cs b/src/Common/src/CoreLib/System/Int64.cs index 303e69b26dd2..c61a2f76ef36 100644 --- a/src/Common/src/CoreLib/System/Int64.cs +++ b/src/Common/src/CoreLib/System/Int64.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Globalization; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/System/IntPtr.cs b/src/Common/src/CoreLib/System/IntPtr.cs index 1aedd04bbe62..ee9da7ae7852 100644 --- a/src/Common/src/CoreLib/System/IntPtr.cs +++ b/src/Common/src/CoreLib/System/IntPtr.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Globalization; using System.Runtime.CompilerServices; using System.Runtime.Serialization; diff --git a/src/Common/src/CoreLib/System/InvalidCastException.cs b/src/Common/src/CoreLib/System/InvalidCastException.cs index 11c98ec05b39..c3b22167b1e6 100644 --- a/src/Common/src/CoreLib/System/InvalidCastException.cs +++ b/src/Common/src/CoreLib/System/InvalidCastException.cs @@ -8,7 +8,6 @@ ** =============================================================================*/ -#nullable enable using System.Runtime.Serialization; namespace System diff --git a/src/Common/src/CoreLib/System/InvalidOperationException.cs b/src/Common/src/CoreLib/System/InvalidOperationException.cs index aec2b07b5ec6..ac24a834ef57 100644 --- a/src/Common/src/CoreLib/System/InvalidOperationException.cs +++ b/src/Common/src/CoreLib/System/InvalidOperationException.cs @@ -12,7 +12,6 @@ ** =============================================================================*/ -#nullable enable using System.Runtime.Serialization; namespace System diff --git a/src/Common/src/CoreLib/System/InvalidProgramException.cs b/src/Common/src/CoreLib/System/InvalidProgramException.cs index 63f1bfee868c..236768e25ac7 100644 --- a/src/Common/src/CoreLib/System/InvalidProgramException.cs +++ b/src/Common/src/CoreLib/System/InvalidProgramException.cs @@ -11,7 +11,6 @@ ** =============================================================================*/ -#nullable enable using System.Runtime.Serialization; namespace System diff --git a/src/Common/src/CoreLib/System/InvalidTimeZoneException.cs b/src/Common/src/CoreLib/System/InvalidTimeZoneException.cs index cbf73c61eda0..165c25b15a21 100644 --- a/src/Common/src/CoreLib/System/InvalidTimeZoneException.cs +++ b/src/Common/src/CoreLib/System/InvalidTimeZoneException.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.Serialization; namespace System diff --git a/src/Common/src/CoreLib/System/Lazy.cs b/src/Common/src/CoreLib/System/Lazy.cs index d8e9a155fd5b..5bd3a9a56549 100644 --- a/src/Common/src/CoreLib/System/Lazy.cs +++ b/src/Common/src/CoreLib/System/Lazy.cs @@ -10,7 +10,6 @@ // // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- -#nullable enable using System.Diagnostics; using System.Runtime.ExceptionServices; using System.Threading; diff --git a/src/Common/src/CoreLib/System/LocalAppContextSwitches.Common.cs b/src/Common/src/CoreLib/System/LocalAppContextSwitches.Common.cs index a7c2436c6e88..e383092d0613 100644 --- a/src/Common/src/CoreLib/System/LocalAppContextSwitches.Common.cs +++ b/src/Common/src/CoreLib/System/LocalAppContextSwitches.Common.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.CompilerServices; namespace System diff --git a/src/Common/src/CoreLib/System/LocalAppContextSwitches.cs b/src/Common/src/CoreLib/System/LocalAppContextSwitches.cs index b63a98024970..a28535967593 100644 --- a/src/Common/src/CoreLib/System/LocalAppContextSwitches.cs +++ b/src/Common/src/CoreLib/System/LocalAppContextSwitches.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.CompilerServices; namespace System diff --git a/src/Common/src/CoreLib/System/LocalDataStoreSlot.cs b/src/Common/src/CoreLib/System/LocalDataStoreSlot.cs index 616967c9460b..41e384e90b22 100644 --- a/src/Common/src/CoreLib/System/LocalDataStoreSlot.cs +++ b/src/Common/src/CoreLib/System/LocalDataStoreSlot.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Threading; namespace System diff --git a/src/Common/src/CoreLib/System/MarshalByRefObject.cs b/src/Common/src/CoreLib/System/MarshalByRefObject.cs index 9ef86b4124e4..a083c97c9d75 100644 --- a/src/Common/src/CoreLib/System/MarshalByRefObject.cs +++ b/src/Common/src/CoreLib/System/MarshalByRefObject.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.InteropServices; namespace System diff --git a/src/Common/src/CoreLib/System/Marvin.OrdinalIgnoreCase.cs b/src/Common/src/CoreLib/System/Marvin.OrdinalIgnoreCase.cs index fa02f187e012..71f10b5e9786 100644 --- a/src/Common/src/CoreLib/System/Marvin.OrdinalIgnoreCase.cs +++ b/src/Common/src/CoreLib/System/Marvin.OrdinalIgnoreCase.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Buffers; using System.Diagnostics; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/System/Marvin.cs b/src/Common/src/CoreLib/System/Marvin.cs index c03ede43fbd9..832c84ba82dc 100644 --- a/src/Common/src/CoreLib/System/Marvin.cs +++ b/src/Common/src/CoreLib/System/Marvin.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; using System.Numerics; using System.Runtime.CompilerServices; diff --git a/src/Common/src/CoreLib/System/Math.cs b/src/Common/src/CoreLib/System/Math.cs index 2a9c828ce8d0..ac9be486734c 100644 --- a/src/Common/src/CoreLib/System/Math.cs +++ b/src/Common/src/CoreLib/System/Math.cs @@ -13,7 +13,6 @@ //This class contains only static members and doesn't require serialization. -#nullable enable using System.Diagnostics; using System.Runtime; using System.Runtime.CompilerServices; diff --git a/src/Common/src/CoreLib/System/MathF.cs b/src/Common/src/CoreLib/System/MathF.cs index a039bb9a390f..da710a1deae0 100644 --- a/src/Common/src/CoreLib/System/MathF.cs +++ b/src/Common/src/CoreLib/System/MathF.cs @@ -10,7 +10,6 @@ //This class contains only static members and doesn't require serialization. -#nullable enable using System.Runtime.CompilerServices; namespace System diff --git a/src/Common/src/CoreLib/System/MemberAccessException.cs b/src/Common/src/CoreLib/System/MemberAccessException.cs index 5d771ba8484b..41d00166dab6 100644 --- a/src/Common/src/CoreLib/System/MemberAccessException.cs +++ b/src/Common/src/CoreLib/System/MemberAccessException.cs @@ -8,7 +8,6 @@ // access, due to it being removed, private or something similar. //////////////////////////////////////////////////////////////////////////////// -#nullable enable using System.Runtime.Serialization; namespace System diff --git a/src/Common/src/CoreLib/System/Memory.cs b/src/Common/src/CoreLib/System/Memory.cs index 399c6f015146..c492e6e61202 100644 --- a/src/Common/src/CoreLib/System/Memory.cs +++ b/src/Common/src/CoreLib/System/Memory.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Buffers; using System.Diagnostics; using System.Runtime.CompilerServices; diff --git a/src/Common/src/CoreLib/System/MemoryDebugView.cs b/src/Common/src/CoreLib/System/MemoryDebugView.cs index 563d010d61e5..6ab6e5065cf3 100644 --- a/src/Common/src/CoreLib/System/MemoryDebugView.cs +++ b/src/Common/src/CoreLib/System/MemoryDebugView.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; namespace System diff --git a/src/Common/src/CoreLib/System/MemoryExtensions.Fast.cs b/src/Common/src/CoreLib/System/MemoryExtensions.Fast.cs index 82f3d2321ef9..4af49376fe0e 100644 --- a/src/Common/src/CoreLib/System/MemoryExtensions.Fast.cs +++ b/src/Common/src/CoreLib/System/MemoryExtensions.Fast.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; using System.Globalization; using System.Runtime.CompilerServices; diff --git a/src/Common/src/CoreLib/System/MemoryExtensions.Trim.cs b/src/Common/src/CoreLib/System/MemoryExtensions.Trim.cs index 5c776cd4ea45..96581c7c0183 100644 --- a/src/Common/src/CoreLib/System/MemoryExtensions.Trim.cs +++ b/src/Common/src/CoreLib/System/MemoryExtensions.Trim.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; namespace System diff --git a/src/Common/src/CoreLib/System/MemoryExtensions.cs b/src/Common/src/CoreLib/System/MemoryExtensions.cs index 50130974336d..5af2b0dfb31d 100644 --- a/src/Common/src/CoreLib/System/MemoryExtensions.cs +++ b/src/Common/src/CoreLib/System/MemoryExtensions.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Collections.Generic; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/System/MethodAccessException.cs b/src/Common/src/CoreLib/System/MethodAccessException.cs index 23625490f967..5a9445d0cca4 100644 --- a/src/Common/src/CoreLib/System/MethodAccessException.cs +++ b/src/Common/src/CoreLib/System/MethodAccessException.cs @@ -9,7 +9,6 @@ ** =============================================================================*/ -#nullable enable using System.Runtime.Serialization; namespace System diff --git a/src/Common/src/CoreLib/System/MidpointRounding.cs b/src/Common/src/CoreLib/System/MidpointRounding.cs index 146fed9bd6b0..835dafe7eeee 100644 --- a/src/Common/src/CoreLib/System/MidpointRounding.cs +++ b/src/Common/src/CoreLib/System/MidpointRounding.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System { public enum MidpointRounding diff --git a/src/Common/src/CoreLib/System/MissingFieldException.cs b/src/Common/src/CoreLib/System/MissingFieldException.cs index be41b3592cb6..6297177c1e40 100644 --- a/src/Common/src/CoreLib/System/MissingFieldException.cs +++ b/src/Common/src/CoreLib/System/MissingFieldException.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.Serialization; namespace System diff --git a/src/Common/src/CoreLib/System/MissingMemberException.cs b/src/Common/src/CoreLib/System/MissingMemberException.cs index cc8be87286c8..8ba7b53e311a 100644 --- a/src/Common/src/CoreLib/System/MissingMemberException.cs +++ b/src/Common/src/CoreLib/System/MissingMemberException.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.Serialization; namespace System diff --git a/src/Common/src/CoreLib/System/MissingMethodException.cs b/src/Common/src/CoreLib/System/MissingMethodException.cs index 8a94ac569614..81e54fb2b0c1 100644 --- a/src/Common/src/CoreLib/System/MissingMethodException.cs +++ b/src/Common/src/CoreLib/System/MissingMethodException.cs @@ -11,7 +11,6 @@ ** =============================================================================*/ -#nullable enable using System.Runtime.Serialization; namespace System diff --git a/src/Common/src/CoreLib/System/MulticastNotSupportedException.cs b/src/Common/src/CoreLib/System/MulticastNotSupportedException.cs index 912e569b2664..898b2ebd0dcb 100644 --- a/src/Common/src/CoreLib/System/MulticastNotSupportedException.cs +++ b/src/Common/src/CoreLib/System/MulticastNotSupportedException.cs @@ -7,7 +7,6 @@ // This is thrown when you add multiple callbacks to a non-multicast delegate. //////////////////////////////////////////////////////////////////////////////// -#nullable enable using System.Runtime.Serialization; namespace System diff --git a/src/Common/src/CoreLib/System/NonSerializedAttribute.cs b/src/Common/src/CoreLib/System/NonSerializedAttribute.cs index 2caa285a76a4..cabd5a2aa25a 100644 --- a/src/Common/src/CoreLib/System/NonSerializedAttribute.cs +++ b/src/Common/src/CoreLib/System/NonSerializedAttribute.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System { [AttributeUsage(AttributeTargets.Field, Inherited = false)] diff --git a/src/Common/src/CoreLib/System/NotFiniteNumberException.cs b/src/Common/src/CoreLib/System/NotFiniteNumberException.cs index af464124eb3b..53a5817a7dc7 100644 --- a/src/Common/src/CoreLib/System/NotFiniteNumberException.cs +++ b/src/Common/src/CoreLib/System/NotFiniteNumberException.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.Serialization; namespace System diff --git a/src/Common/src/CoreLib/System/NotImplementedException.cs b/src/Common/src/CoreLib/System/NotImplementedException.cs index 42d207459b44..808bc50a0c99 100644 --- a/src/Common/src/CoreLib/System/NotImplementedException.cs +++ b/src/Common/src/CoreLib/System/NotImplementedException.cs @@ -12,7 +12,6 @@ ** =============================================================================*/ -#nullable enable using System.Runtime.Serialization; namespace System diff --git a/src/Common/src/CoreLib/System/NotSupportedException.cs b/src/Common/src/CoreLib/System/NotSupportedException.cs index 2fabb8ea06eb..61c186844f33 100644 --- a/src/Common/src/CoreLib/System/NotSupportedException.cs +++ b/src/Common/src/CoreLib/System/NotSupportedException.cs @@ -11,7 +11,6 @@ ** =============================================================================*/ -#nullable enable using System.Runtime.Serialization; namespace System diff --git a/src/Common/src/CoreLib/System/NullReferenceException.cs b/src/Common/src/CoreLib/System/NullReferenceException.cs index f95a7699dd14..6b1a0350add7 100644 --- a/src/Common/src/CoreLib/System/NullReferenceException.cs +++ b/src/Common/src/CoreLib/System/NullReferenceException.cs @@ -11,7 +11,6 @@ ** =============================================================================*/ -#nullable enable using System.Runtime.Serialization; namespace System diff --git a/src/Common/src/CoreLib/System/Nullable.cs b/src/Common/src/CoreLib/System/Nullable.cs index 10df282d10fb..a34769645895 100644 --- a/src/Common/src/CoreLib/System/Nullable.cs +++ b/src/Common/src/CoreLib/System/Nullable.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Collections.Generic; using System.Runtime.Versioning; diff --git a/src/Common/src/CoreLib/System/Number.BigInteger.cs b/src/Common/src/CoreLib/System/Number.BigInteger.cs index 33ac49e62516..06ae1e7668cd 100644 --- a/src/Common/src/CoreLib/System/Number.BigInteger.cs +++ b/src/Common/src/CoreLib/System/Number.BigInteger.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; using System.Numerics; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/System/Number.DiyFp.cs b/src/Common/src/CoreLib/System/Number.DiyFp.cs index 5daf2f5d6a5e..bb9fc092bc20 100644 --- a/src/Common/src/CoreLib/System/Number.DiyFp.cs +++ b/src/Common/src/CoreLib/System/Number.DiyFp.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; using System.Numerics; diff --git a/src/Common/src/CoreLib/System/Number.Dragon4.cs b/src/Common/src/CoreLib/System/Number.Dragon4.cs index 0dc6c90858bd..30704975fbf3 100644 --- a/src/Common/src/CoreLib/System/Number.Dragon4.cs +++ b/src/Common/src/CoreLib/System/Number.Dragon4.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; using System.Numerics; using Internal.Runtime.CompilerServices; diff --git a/src/Common/src/CoreLib/System/Number.Formatting.cs b/src/Common/src/CoreLib/System/Number.Formatting.cs index 378832e5bc06..951d190d189d 100644 --- a/src/Common/src/CoreLib/System/Number.Formatting.cs +++ b/src/Common/src/CoreLib/System/Number.Formatting.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Buffers.Text; using System.Diagnostics; using System.Globalization; diff --git a/src/Common/src/CoreLib/System/Number.Grisu3.cs b/src/Common/src/CoreLib/System/Number.Grisu3.cs index 5ff8d466a34c..96ec7af2f87d 100644 --- a/src/Common/src/CoreLib/System/Number.Grisu3.cs +++ b/src/Common/src/CoreLib/System/Number.Grisu3.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; namespace System diff --git a/src/Common/src/CoreLib/System/Number.NumberBuffer.cs b/src/Common/src/CoreLib/System/Number.NumberBuffer.cs index ccedf417aa63..268bdc78b6cf 100644 --- a/src/Common/src/CoreLib/System/Number.NumberBuffer.cs +++ b/src/Common/src/CoreLib/System/Number.NumberBuffer.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; using System.Text; using Internal.Runtime.CompilerServices; diff --git a/src/Common/src/CoreLib/System/Number.NumberToFloatingPointBits.cs b/src/Common/src/CoreLib/System/Number.NumberToFloatingPointBits.cs index cfe8ce52011e..ac4c7727f323 100644 --- a/src/Common/src/CoreLib/System/Number.NumberToFloatingPointBits.cs +++ b/src/Common/src/CoreLib/System/Number.NumberToFloatingPointBits.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; namespace System diff --git a/src/Common/src/CoreLib/System/Number.Parsing.cs b/src/Common/src/CoreLib/System/Number.Parsing.cs index 3f9f5c1283aa..e304e4d6b4de 100644 --- a/src/Common/src/CoreLib/System/Number.Parsing.cs +++ b/src/Common/src/CoreLib/System/Number.Parsing.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; using System.Globalization; using System.Runtime.CompilerServices; diff --git a/src/Common/src/CoreLib/System/Numerics/BitOperations.cs b/src/Common/src/CoreLib/System/Numerics/BitOperations.cs index e2a6720ec68c..3813b9a68977 100644 --- a/src/Common/src/CoreLib/System/Numerics/BitOperations.cs +++ b/src/Common/src/CoreLib/System/Numerics/BitOperations.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Intrinsics.X86; diff --git a/src/Common/src/CoreLib/System/Numerics/ConstantHelper.cs b/src/Common/src/CoreLib/System/Numerics/ConstantHelper.cs index 4426c88cb3a8..33b935c2c895 100644 --- a/src/Common/src/CoreLib/System/Numerics/ConstantHelper.cs +++ b/src/Common/src/CoreLib/System/Numerics/ConstantHelper.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.CompilerServices; namespace System.Numerics diff --git a/src/Common/src/CoreLib/System/Numerics/Hashing/HashHelpers.cs b/src/Common/src/CoreLib/System/Numerics/Hashing/HashHelpers.cs index ed23f1cae746..fd9d708d3674 100644 --- a/src/Common/src/CoreLib/System/Numerics/Hashing/HashHelpers.cs +++ b/src/Common/src/CoreLib/System/Numerics/Hashing/HashHelpers.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Numerics.Hashing { internal static class HashHelpers diff --git a/src/Common/src/CoreLib/System/Numerics/Register.cs b/src/Common/src/CoreLib/System/Numerics/Register.cs index a5dfd5e1301a..70a881915726 100644 --- a/src/Common/src/CoreLib/System/Numerics/Register.cs +++ b/src/Common/src/CoreLib/System/Numerics/Register.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.InteropServices; namespace System.Numerics diff --git a/src/Common/src/CoreLib/System/Numerics/Vector.cs b/src/Common/src/CoreLib/System/Numerics/Vector.cs index 92b16a4e87e5..6ee98458d823 100644 --- a/src/Common/src/CoreLib/System/Numerics/Vector.cs +++ b/src/Common/src/CoreLib/System/Numerics/Vector.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable #if netcoreapp using Internal.Runtime.CompilerServices; #endif diff --git a/src/Common/src/CoreLib/System/Numerics/Vector_Operations.cs b/src/Common/src/CoreLib/System/Numerics/Vector_Operations.cs index 5e7bc607c733..567a0a78eb2e 100644 --- a/src/Common/src/CoreLib/System/Numerics/Vector_Operations.cs +++ b/src/Common/src/CoreLib/System/Numerics/Vector_Operations.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.CompilerServices; namespace System.Numerics diff --git a/src/Common/src/CoreLib/System/Object.cs b/src/Common/src/CoreLib/System/Object.cs index 2bdb5c545ab7..91370bbf64d8 100644 --- a/src/Common/src/CoreLib/System/Object.cs +++ b/src/Common/src/CoreLib/System/Object.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; diff --git a/src/Common/src/CoreLib/System/ObjectDisposedException.cs b/src/Common/src/CoreLib/System/ObjectDisposedException.cs index 450a9597e34a..f2bd7e7028f4 100644 --- a/src/Common/src/CoreLib/System/ObjectDisposedException.cs +++ b/src/Common/src/CoreLib/System/ObjectDisposedException.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Globalization; using System.Runtime.CompilerServices; using System.Runtime.Serialization; diff --git a/src/Common/src/CoreLib/System/ObsoleteAttribute.cs b/src/Common/src/CoreLib/System/ObsoleteAttribute.cs index dbad93f99347..16ad7ca9c0f0 100644 --- a/src/Common/src/CoreLib/System/ObsoleteAttribute.cs +++ b/src/Common/src/CoreLib/System/ObsoleteAttribute.cs @@ -11,7 +11,6 @@ ** ===========================================================*/ -#nullable enable namespace System { // This attribute is attached to members that are not to be used any longer. diff --git a/src/Common/src/CoreLib/System/OperatingSystem.cs b/src/Common/src/CoreLib/System/OperatingSystem.cs index 2e806de778dc..046ce263b40b 100644 --- a/src/Common/src/CoreLib/System/OperatingSystem.cs +++ b/src/Common/src/CoreLib/System/OperatingSystem.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; using System.Runtime.Serialization; diff --git a/src/Common/src/CoreLib/System/OperationCanceledException.cs b/src/Common/src/CoreLib/System/OperationCanceledException.cs index 029024603e3b..09e708b679ec 100644 --- a/src/Common/src/CoreLib/System/OperationCanceledException.cs +++ b/src/Common/src/CoreLib/System/OperationCanceledException.cs @@ -11,7 +11,6 @@ ** ===========================================================*/ -#nullable enable using System; using System.Runtime.Serialization; using System.Threading; diff --git a/src/Common/src/CoreLib/System/OutOfMemoryException.cs b/src/Common/src/CoreLib/System/OutOfMemoryException.cs index 336618c2a08e..0a079959343d 100644 --- a/src/Common/src/CoreLib/System/OutOfMemoryException.cs +++ b/src/Common/src/CoreLib/System/OutOfMemoryException.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.Serialization; namespace System diff --git a/src/Common/src/CoreLib/System/OverflowException.cs b/src/Common/src/CoreLib/System/OverflowException.cs index 172ecf0f6c01..34e63b8e7170 100644 --- a/src/Common/src/CoreLib/System/OverflowException.cs +++ b/src/Common/src/CoreLib/System/OverflowException.cs @@ -11,7 +11,6 @@ ** =============================================================================*/ -#nullable enable using System.Runtime.Serialization; namespace System diff --git a/src/Common/src/CoreLib/System/ParamArrayAttribute.cs b/src/Common/src/CoreLib/System/ParamArrayAttribute.cs index 8faffc4eeaab..d3c3d46d569a 100644 --- a/src/Common/src/CoreLib/System/ParamArrayAttribute.cs +++ b/src/Common/src/CoreLib/System/ParamArrayAttribute.cs @@ -11,7 +11,6 @@ ** =============================================================================*/ -#nullable enable namespace System { [AttributeUsage(AttributeTargets.Parameter, Inherited = true, AllowMultiple = false)] diff --git a/src/Common/src/CoreLib/System/ParamsArray.cs b/src/Common/src/CoreLib/System/ParamsArray.cs index 91b2bd1d8675..9114c281d639 100644 --- a/src/Common/src/CoreLib/System/ParamsArray.cs +++ b/src/Common/src/CoreLib/System/ParamsArray.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System { internal readonly struct ParamsArray diff --git a/src/Common/src/CoreLib/System/ParseNumbers.cs b/src/Common/src/CoreLib/System/ParseNumbers.cs index ab04cf6b8af2..0978186902d4 100644 --- a/src/Common/src/CoreLib/System/ParseNumbers.cs +++ b/src/Common/src/CoreLib/System/ParseNumbers.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; using System.Runtime.CompilerServices; diff --git a/src/Common/src/CoreLib/System/PasteArguments.Unix.cs b/src/Common/src/CoreLib/System/PasteArguments.Unix.cs index fdad698b95e9..1a4d92850f89 100644 --- a/src/Common/src/CoreLib/System/PasteArguments.Unix.cs +++ b/src/Common/src/CoreLib/System/PasteArguments.Unix.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Collections.Generic; using System.Runtime.CompilerServices; using System.Text; diff --git a/src/Common/src/CoreLib/System/PasteArguments.Windows.cs b/src/Common/src/CoreLib/System/PasteArguments.Windows.cs index 42a817b428e6..7cdcbc4533a0 100644 --- a/src/Common/src/CoreLib/System/PasteArguments.Windows.cs +++ b/src/Common/src/CoreLib/System/PasteArguments.Windows.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Collections.Generic; using System.Runtime.CompilerServices; using System.Text; diff --git a/src/Common/src/CoreLib/System/PasteArguments.cs b/src/Common/src/CoreLib/System/PasteArguments.cs index afa2e4419e0c..c088fd4eb737 100644 --- a/src/Common/src/CoreLib/System/PasteArguments.cs +++ b/src/Common/src/CoreLib/System/PasteArguments.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Text; namespace System diff --git a/src/Common/src/CoreLib/System/PlatformID.cs b/src/Common/src/CoreLib/System/PlatformID.cs index 0ec46f3d4372..2eda3c05f30e 100644 --- a/src/Common/src/CoreLib/System/PlatformID.cs +++ b/src/Common/src/CoreLib/System/PlatformID.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.ComponentModel; namespace System diff --git a/src/Common/src/CoreLib/System/PlatformNotSupportedException.cs b/src/Common/src/CoreLib/System/PlatformNotSupportedException.cs index ee953ce16bef..7e3f9ae01112 100644 --- a/src/Common/src/CoreLib/System/PlatformNotSupportedException.cs +++ b/src/Common/src/CoreLib/System/PlatformNotSupportedException.cs @@ -11,7 +11,6 @@ ** =============================================================================*/ -#nullable enable using System.Runtime.Serialization; namespace System diff --git a/src/Common/src/CoreLib/System/Progress.cs b/src/Common/src/CoreLib/System/Progress.cs index 4dae2b190831..c757da33dc5e 100644 --- a/src/Common/src/CoreLib/System/Progress.cs +++ b/src/Common/src/CoreLib/System/Progress.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Threading; using System.Diagnostics; diff --git a/src/Common/src/CoreLib/System/Random.cs b/src/Common/src/CoreLib/System/Random.cs index 92daa51aac8e..ed79732c25a1 100644 --- a/src/Common/src/CoreLib/System/Random.cs +++ b/src/Common/src/CoreLib/System/Random.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System { public class Random diff --git a/src/Common/src/CoreLib/System/Range.cs b/src/Common/src/CoreLib/System/Range.cs index 2a3379265af6..0a729b2a9ce0 100644 --- a/src/Common/src/CoreLib/System/Range.cs +++ b/src/Common/src/CoreLib/System/Range.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; using System.Runtime.CompilerServices; diff --git a/src/Common/src/CoreLib/System/RankException.cs b/src/Common/src/CoreLib/System/RankException.cs index 135a6c9d469a..0f6176252f72 100644 --- a/src/Common/src/CoreLib/System/RankException.cs +++ b/src/Common/src/CoreLib/System/RankException.cs @@ -12,7 +12,6 @@ ** =============================================================================*/ -#nullable enable using System.Runtime.Serialization; namespace System diff --git a/src/Common/src/CoreLib/System/ReadOnlyMemory.cs b/src/Common/src/CoreLib/System/ReadOnlyMemory.cs index 37008d7c158a..95134adab951 100644 --- a/src/Common/src/CoreLib/System/ReadOnlyMemory.cs +++ b/src/Common/src/CoreLib/System/ReadOnlyMemory.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Buffers; using System.Diagnostics; using System.Runtime.CompilerServices; diff --git a/src/Common/src/CoreLib/System/ReadOnlySpan.Fast.cs b/src/Common/src/CoreLib/System/ReadOnlySpan.Fast.cs index 1968a41d160e..d7e8c4f4676a 100644 --- a/src/Common/src/CoreLib/System/ReadOnlySpan.Fast.cs +++ b/src/Common/src/CoreLib/System/ReadOnlySpan.Fast.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; using System.Runtime.CompilerServices; using System.Runtime.Versioning; diff --git a/src/Common/src/CoreLib/System/ReadOnlySpan.cs b/src/Common/src/CoreLib/System/ReadOnlySpan.cs index 2533d1d8b878..e91ff7ea5f34 100644 --- a/src/Common/src/CoreLib/System/ReadOnlySpan.cs +++ b/src/Common/src/CoreLib/System/ReadOnlySpan.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.ComponentModel; using System.Diagnostics; using System.Runtime.CompilerServices; diff --git a/src/Common/src/CoreLib/System/Reflection/AmbiguousMatchException.cs b/src/Common/src/CoreLib/System/Reflection/AmbiguousMatchException.cs index aa321e99f185..7db74c65564b 100644 --- a/src/Common/src/CoreLib/System/Reflection/AmbiguousMatchException.cs +++ b/src/Common/src/CoreLib/System/Reflection/AmbiguousMatchException.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.Serialization; namespace System.Reflection diff --git a/src/Common/src/CoreLib/System/Reflection/Assembly.cs b/src/Common/src/CoreLib/System/Reflection/Assembly.cs index bb3dc2117a06..ecae2893b366 100644 --- a/src/Common/src/CoreLib/System/Reflection/Assembly.cs +++ b/src/Common/src/CoreLib/System/Reflection/Assembly.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.IO; using System.Globalization; using System.Collections.Generic; diff --git a/src/Common/src/CoreLib/System/Reflection/AssemblyAlgorithmIdAttribute.cs b/src/Common/src/CoreLib/System/Reflection/AssemblyAlgorithmIdAttribute.cs index df91553db0b2..fe24f353beb1 100644 --- a/src/Common/src/CoreLib/System/Reflection/AssemblyAlgorithmIdAttribute.cs +++ b/src/Common/src/CoreLib/System/Reflection/AssemblyAlgorithmIdAttribute.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Configuration.Assemblies; namespace System.Reflection diff --git a/src/Common/src/CoreLib/System/Reflection/AssemblyCompanyAttribute.cs b/src/Common/src/CoreLib/System/Reflection/AssemblyCompanyAttribute.cs index c1e7a82c578d..d986db60a341 100644 --- a/src/Common/src/CoreLib/System/Reflection/AssemblyCompanyAttribute.cs +++ b/src/Common/src/CoreLib/System/Reflection/AssemblyCompanyAttribute.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Reflection { [AttributeUsage(AttributeTargets.Assembly, Inherited = false)] diff --git a/src/Common/src/CoreLib/System/Reflection/AssemblyConfigurationAttribute.cs b/src/Common/src/CoreLib/System/Reflection/AssemblyConfigurationAttribute.cs index 4c6d367dace8..195c4d0ca60d 100644 --- a/src/Common/src/CoreLib/System/Reflection/AssemblyConfigurationAttribute.cs +++ b/src/Common/src/CoreLib/System/Reflection/AssemblyConfigurationAttribute.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Reflection { [AttributeUsage(AttributeTargets.Assembly, Inherited = false)] diff --git a/src/Common/src/CoreLib/System/Reflection/AssemblyContentType.cs b/src/Common/src/CoreLib/System/Reflection/AssemblyContentType.cs index 938ac26d653e..2ee1a008181c 100644 --- a/src/Common/src/CoreLib/System/Reflection/AssemblyContentType.cs +++ b/src/Common/src/CoreLib/System/Reflection/AssemblyContentType.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Reflection { public enum AssemblyContentType diff --git a/src/Common/src/CoreLib/System/Reflection/AssemblyCopyrightAttribute.cs b/src/Common/src/CoreLib/System/Reflection/AssemblyCopyrightAttribute.cs index fe06a4f5cc79..e50e19932b9b 100644 --- a/src/Common/src/CoreLib/System/Reflection/AssemblyCopyrightAttribute.cs +++ b/src/Common/src/CoreLib/System/Reflection/AssemblyCopyrightAttribute.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Reflection { [AttributeUsage(AttributeTargets.Assembly, Inherited = false)] diff --git a/src/Common/src/CoreLib/System/Reflection/AssemblyCultureAttribute.cs b/src/Common/src/CoreLib/System/Reflection/AssemblyCultureAttribute.cs index ee70784873b7..e31c6f9c1cbd 100644 --- a/src/Common/src/CoreLib/System/Reflection/AssemblyCultureAttribute.cs +++ b/src/Common/src/CoreLib/System/Reflection/AssemblyCultureAttribute.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Reflection { [AttributeUsage(AttributeTargets.Assembly, Inherited = false)] diff --git a/src/Common/src/CoreLib/System/Reflection/AssemblyDefaultAliasAttribute.cs b/src/Common/src/CoreLib/System/Reflection/AssemblyDefaultAliasAttribute.cs index 6a8e7c0aa63a..ced35ed3fd53 100644 --- a/src/Common/src/CoreLib/System/Reflection/AssemblyDefaultAliasAttribute.cs +++ b/src/Common/src/CoreLib/System/Reflection/AssemblyDefaultAliasAttribute.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Reflection { [AttributeUsage(AttributeTargets.Assembly, Inherited = false)] diff --git a/src/Common/src/CoreLib/System/Reflection/AssemblyDelaySignAttribute.cs b/src/Common/src/CoreLib/System/Reflection/AssemblyDelaySignAttribute.cs index 02acff9ed3a0..eae2cf613c7c 100644 --- a/src/Common/src/CoreLib/System/Reflection/AssemblyDelaySignAttribute.cs +++ b/src/Common/src/CoreLib/System/Reflection/AssemblyDelaySignAttribute.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Reflection { [AttributeUsage(AttributeTargets.Assembly, Inherited = false)] diff --git a/src/Common/src/CoreLib/System/Reflection/AssemblyDescriptionAttribute.cs b/src/Common/src/CoreLib/System/Reflection/AssemblyDescriptionAttribute.cs index 4348a78698cd..50f57c96a659 100644 --- a/src/Common/src/CoreLib/System/Reflection/AssemblyDescriptionAttribute.cs +++ b/src/Common/src/CoreLib/System/Reflection/AssemblyDescriptionAttribute.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Reflection { [AttributeUsage(AttributeTargets.Assembly, Inherited = false)] diff --git a/src/Common/src/CoreLib/System/Reflection/AssemblyFileVersionAttribute.cs b/src/Common/src/CoreLib/System/Reflection/AssemblyFileVersionAttribute.cs index 2bd76ceaa64c..b5b52c1897fc 100644 --- a/src/Common/src/CoreLib/System/Reflection/AssemblyFileVersionAttribute.cs +++ b/src/Common/src/CoreLib/System/Reflection/AssemblyFileVersionAttribute.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Reflection { [AttributeUsage(AttributeTargets.Assembly, Inherited = false)] diff --git a/src/Common/src/CoreLib/System/Reflection/AssemblyFlagsAttribute.cs b/src/Common/src/CoreLib/System/Reflection/AssemblyFlagsAttribute.cs index 6520831aa726..be35bc028933 100644 --- a/src/Common/src/CoreLib/System/Reflection/AssemblyFlagsAttribute.cs +++ b/src/Common/src/CoreLib/System/Reflection/AssemblyFlagsAttribute.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Reflection { [AttributeUsage(AttributeTargets.Assembly, Inherited = false)] diff --git a/src/Common/src/CoreLib/System/Reflection/AssemblyInformationalVersionAttribute.cs b/src/Common/src/CoreLib/System/Reflection/AssemblyInformationalVersionAttribute.cs index 29384a84517e..915b973ab94e 100644 --- a/src/Common/src/CoreLib/System/Reflection/AssemblyInformationalVersionAttribute.cs +++ b/src/Common/src/CoreLib/System/Reflection/AssemblyInformationalVersionAttribute.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Reflection { [AttributeUsage(AttributeTargets.Assembly, Inherited = false)] diff --git a/src/Common/src/CoreLib/System/Reflection/AssemblyKeyFileAttribute.cs b/src/Common/src/CoreLib/System/Reflection/AssemblyKeyFileAttribute.cs index 5bfcb170a404..9f7387d8af06 100644 --- a/src/Common/src/CoreLib/System/Reflection/AssemblyKeyFileAttribute.cs +++ b/src/Common/src/CoreLib/System/Reflection/AssemblyKeyFileAttribute.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Reflection { [AttributeUsage(AttributeTargets.Assembly, Inherited = false)] diff --git a/src/Common/src/CoreLib/System/Reflection/AssemblyKeyNameAttribute.cs b/src/Common/src/CoreLib/System/Reflection/AssemblyKeyNameAttribute.cs index 4a1dc4eb5969..4cf51754eaf2 100644 --- a/src/Common/src/CoreLib/System/Reflection/AssemblyKeyNameAttribute.cs +++ b/src/Common/src/CoreLib/System/Reflection/AssemblyKeyNameAttribute.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Reflection { [AttributeUsage(AttributeTargets.Assembly, Inherited = false)] diff --git a/src/Common/src/CoreLib/System/Reflection/AssemblyMetadataAttribute.cs b/src/Common/src/CoreLib/System/Reflection/AssemblyMetadataAttribute.cs index 3ca34e81fb33..be85ac48b77d 100644 --- a/src/Common/src/CoreLib/System/Reflection/AssemblyMetadataAttribute.cs +++ b/src/Common/src/CoreLib/System/Reflection/AssemblyMetadataAttribute.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Reflection { [AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true, Inherited = false)] diff --git a/src/Common/src/CoreLib/System/Reflection/AssemblyName.cs b/src/Common/src/CoreLib/System/Reflection/AssemblyName.cs index 8af4a9218024..ffdac5666525 100644 --- a/src/Common/src/CoreLib/System/Reflection/AssemblyName.cs +++ b/src/Common/src/CoreLib/System/Reflection/AssemblyName.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Configuration.Assemblies; using System.IO; using System.Runtime.Serialization; diff --git a/src/Common/src/CoreLib/System/Reflection/AssemblyNameFlags.cs b/src/Common/src/CoreLib/System/Reflection/AssemblyNameFlags.cs index 82f64c160aab..d32103203142 100644 --- a/src/Common/src/CoreLib/System/Reflection/AssemblyNameFlags.cs +++ b/src/Common/src/CoreLib/System/Reflection/AssemblyNameFlags.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Reflection { [Flags] diff --git a/src/Common/src/CoreLib/System/Reflection/AssemblyNameFormatter.cs b/src/Common/src/CoreLib/System/Reflection/AssemblyNameFormatter.cs index 063dfc7a4bf2..02f1752074f7 100644 --- a/src/Common/src/CoreLib/System/Reflection/AssemblyNameFormatter.cs +++ b/src/Common/src/CoreLib/System/Reflection/AssemblyNameFormatter.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.IO; using System.Text; using System.Globalization; diff --git a/src/Common/src/CoreLib/System/Reflection/AssemblyProductAttribute.cs b/src/Common/src/CoreLib/System/Reflection/AssemblyProductAttribute.cs index 9966d603cb46..43cb62df9978 100644 --- a/src/Common/src/CoreLib/System/Reflection/AssemblyProductAttribute.cs +++ b/src/Common/src/CoreLib/System/Reflection/AssemblyProductAttribute.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Reflection { [AttributeUsage(AttributeTargets.Assembly, Inherited = false)] diff --git a/src/Common/src/CoreLib/System/Reflection/AssemblySignatureKeyAttribute.cs b/src/Common/src/CoreLib/System/Reflection/AssemblySignatureKeyAttribute.cs index 8410b4f60267..e6ec8af1b389 100644 --- a/src/Common/src/CoreLib/System/Reflection/AssemblySignatureKeyAttribute.cs +++ b/src/Common/src/CoreLib/System/Reflection/AssemblySignatureKeyAttribute.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Reflection { [AttributeUsage(AttributeTargets.Assembly, Inherited = false, AllowMultiple = false)] diff --git a/src/Common/src/CoreLib/System/Reflection/AssemblyTitleAttribute.cs b/src/Common/src/CoreLib/System/Reflection/AssemblyTitleAttribute.cs index d03dad6440ac..26d7a2e66c0e 100644 --- a/src/Common/src/CoreLib/System/Reflection/AssemblyTitleAttribute.cs +++ b/src/Common/src/CoreLib/System/Reflection/AssemblyTitleAttribute.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Reflection { [AttributeUsage(AttributeTargets.Assembly, Inherited = false)] diff --git a/src/Common/src/CoreLib/System/Reflection/AssemblyTrademarkAttribute.cs b/src/Common/src/CoreLib/System/Reflection/AssemblyTrademarkAttribute.cs index 5b373193f6f3..1d3edf51d585 100644 --- a/src/Common/src/CoreLib/System/Reflection/AssemblyTrademarkAttribute.cs +++ b/src/Common/src/CoreLib/System/Reflection/AssemblyTrademarkAttribute.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Reflection { [AttributeUsage(AttributeTargets.Assembly, Inherited = false)] diff --git a/src/Common/src/CoreLib/System/Reflection/AssemblyVersionAttribute.cs b/src/Common/src/CoreLib/System/Reflection/AssemblyVersionAttribute.cs index 9cba8e3f9af4..b3557bac9739 100644 --- a/src/Common/src/CoreLib/System/Reflection/AssemblyVersionAttribute.cs +++ b/src/Common/src/CoreLib/System/Reflection/AssemblyVersionAttribute.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Reflection { [AttributeUsage(AttributeTargets.Assembly, Inherited = false)] diff --git a/src/Common/src/CoreLib/System/Reflection/Binder.cs b/src/Common/src/CoreLib/System/Reflection/Binder.cs index 03ff487c5b09..0784db0eee92 100644 --- a/src/Common/src/CoreLib/System/Reflection/Binder.cs +++ b/src/Common/src/CoreLib/System/Reflection/Binder.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Globalization; namespace System.Reflection diff --git a/src/Common/src/CoreLib/System/Reflection/BindingFlags.cs b/src/Common/src/CoreLib/System/Reflection/BindingFlags.cs index ac64814edd08..7ba83e20da63 100644 --- a/src/Common/src/CoreLib/System/Reflection/BindingFlags.cs +++ b/src/Common/src/CoreLib/System/Reflection/BindingFlags.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Reflection { [Flags] diff --git a/src/Common/src/CoreLib/System/Reflection/CallingConventions.cs b/src/Common/src/CoreLib/System/Reflection/CallingConventions.cs index 3bd060769bec..bb6d6cd80944 100644 --- a/src/Common/src/CoreLib/System/Reflection/CallingConventions.cs +++ b/src/Common/src/CoreLib/System/Reflection/CallingConventions.cs @@ -4,7 +4,6 @@ // CallingConventions is a set of Bits representing the calling conventions in the system. -#nullable enable namespace System.Reflection { [Flags] diff --git a/src/Common/src/CoreLib/System/Reflection/ConstructorInfo.cs b/src/Common/src/CoreLib/System/Reflection/ConstructorInfo.cs index 57bbe3326f21..8b376025659f 100644 --- a/src/Common/src/CoreLib/System/Reflection/ConstructorInfo.cs +++ b/src/Common/src/CoreLib/System/Reflection/ConstructorInfo.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; using System.Globalization; using System.Runtime.CompilerServices; diff --git a/src/Common/src/CoreLib/System/Reflection/CorElementType.cs b/src/Common/src/CoreLib/System/Reflection/CorElementType.cs index b6968f1f11d5..37ffcfa1e254 100644 --- a/src/Common/src/CoreLib/System/Reflection/CorElementType.cs +++ b/src/Common/src/CoreLib/System/Reflection/CorElementType.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Reflection { internal enum CorElementType : byte diff --git a/src/Common/src/CoreLib/System/Reflection/CustomAttributeFormatException.cs b/src/Common/src/CoreLib/System/Reflection/CustomAttributeFormatException.cs index 0d38eaaebcc5..8bdfb3e5d508 100644 --- a/src/Common/src/CoreLib/System/Reflection/CustomAttributeFormatException.cs +++ b/src/Common/src/CoreLib/System/Reflection/CustomAttributeFormatException.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.Serialization; namespace System.Reflection diff --git a/src/Common/src/CoreLib/System/Reflection/DefaultMemberAttribute.cs b/src/Common/src/CoreLib/System/Reflection/DefaultMemberAttribute.cs index 0667d34878d7..585fdb07cd0f 100644 --- a/src/Common/src/CoreLib/System/Reflection/DefaultMemberAttribute.cs +++ b/src/Common/src/CoreLib/System/Reflection/DefaultMemberAttribute.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Reflection { [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Interface)] diff --git a/src/Common/src/CoreLib/System/Reflection/Emit/AssemblyBuilderAccess.cs b/src/Common/src/CoreLib/System/Reflection/Emit/AssemblyBuilderAccess.cs index baac3a7a4101..8527463eec89 100644 --- a/src/Common/src/CoreLib/System/Reflection/Emit/AssemblyBuilderAccess.cs +++ b/src/Common/src/CoreLib/System/Reflection/Emit/AssemblyBuilderAccess.cs @@ -5,7 +5,6 @@ // This enumeration defines the access modes for a dynamic assembly. // EE uses these enum values..look for m_dwDynamicAssemblyAccess in Assembly.hpp -#nullable enable namespace System.Reflection.Emit { [Flags] diff --git a/src/Common/src/CoreLib/System/Reflection/Emit/EventToken.cs b/src/Common/src/CoreLib/System/Reflection/Emit/EventToken.cs index 85c917864f7a..302ea5653ba1 100644 --- a/src/Common/src/CoreLib/System/Reflection/Emit/EventToken.cs +++ b/src/Common/src/CoreLib/System/Reflection/Emit/EventToken.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Reflection.Emit { public struct EventToken diff --git a/src/Common/src/CoreLib/System/Reflection/Emit/FieldToken.cs b/src/Common/src/CoreLib/System/Reflection/Emit/FieldToken.cs index e0aba63ba134..cf11b8b6e679 100644 --- a/src/Common/src/CoreLib/System/Reflection/Emit/FieldToken.cs +++ b/src/Common/src/CoreLib/System/Reflection/Emit/FieldToken.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Reflection.Emit { /// diff --git a/src/Common/src/CoreLib/System/Reflection/Emit/FlowControl.cs b/src/Common/src/CoreLib/System/Reflection/Emit/FlowControl.cs index 0410cc915f40..9cb947ce5a92 100644 --- a/src/Common/src/CoreLib/System/Reflection/Emit/FlowControl.cs +++ b/src/Common/src/CoreLib/System/Reflection/Emit/FlowControl.cs @@ -12,7 +12,6 @@ ** See $(RepoRoot)\src\inc\OpCodeGen.pl for more information.** ==============================================================*/ -#nullable enable namespace System.Reflection.Emit { public enum FlowControl diff --git a/src/Common/src/CoreLib/System/Reflection/Emit/Label.cs b/src/Common/src/CoreLib/System/Reflection/Emit/Label.cs index 4aa5e7c9596b..676d926e0a1b 100644 --- a/src/Common/src/CoreLib/System/Reflection/Emit/Label.cs +++ b/src/Common/src/CoreLib/System/Reflection/Emit/Label.cs @@ -14,7 +14,6 @@ ** ===========================================================*/ -#nullable enable namespace System.Reflection.Emit { // The Label class is an opaque representation of a label used by the diff --git a/src/Common/src/CoreLib/System/Reflection/Emit/MethodToken.cs b/src/Common/src/CoreLib/System/Reflection/Emit/MethodToken.cs index 0ed6872e0bb9..f8cc7aa9cb4b 100644 --- a/src/Common/src/CoreLib/System/Reflection/Emit/MethodToken.cs +++ b/src/Common/src/CoreLib/System/Reflection/Emit/MethodToken.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Reflection.Emit { public struct MethodToken diff --git a/src/Common/src/CoreLib/System/Reflection/Emit/OpCodeType.cs b/src/Common/src/CoreLib/System/Reflection/Emit/OpCodeType.cs index 779aacaf6b0c..914b0374d557 100644 --- a/src/Common/src/CoreLib/System/Reflection/Emit/OpCodeType.cs +++ b/src/Common/src/CoreLib/System/Reflection/Emit/OpCodeType.cs @@ -12,7 +12,6 @@ ** See $(RepoRoot)\src\inc\OpCodeGen.pl for more information.** ==============================================================*/ -#nullable enable namespace System.Reflection.Emit { public enum OpCodeType diff --git a/src/Common/src/CoreLib/System/Reflection/Emit/OpCodes.cs b/src/Common/src/CoreLib/System/Reflection/Emit/OpCodes.cs index b4895938d49a..7690005e2f18 100644 --- a/src/Common/src/CoreLib/System/Reflection/Emit/OpCodes.cs +++ b/src/Common/src/CoreLib/System/Reflection/Emit/OpCodes.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Reflection.Emit { // diff --git a/src/Common/src/CoreLib/System/Reflection/Emit/Opcode.cs b/src/Common/src/CoreLib/System/Reflection/Emit/Opcode.cs index 6b191bfa00aa..c0e96e60894d 100644 --- a/src/Common/src/CoreLib/System/Reflection/Emit/Opcode.cs +++ b/src/Common/src/CoreLib/System/Reflection/Emit/Opcode.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Threading; namespace System.Reflection.Emit diff --git a/src/Common/src/CoreLib/System/Reflection/Emit/OperandType.cs b/src/Common/src/CoreLib/System/Reflection/Emit/OperandType.cs index 3bc5c7030817..8abf79b5d015 100644 --- a/src/Common/src/CoreLib/System/Reflection/Emit/OperandType.cs +++ b/src/Common/src/CoreLib/System/Reflection/Emit/OperandType.cs @@ -12,7 +12,6 @@ ** See $(RepoRoot)\src\inc\OpCodeGen.pl for more information.** ==============================================================*/ -#nullable enable namespace System.Reflection.Emit { public enum OperandType diff --git a/src/Common/src/CoreLib/System/Reflection/Emit/PEFileKinds.cs b/src/Common/src/CoreLib/System/Reflection/Emit/PEFileKinds.cs index d01e6bf34bdd..8a35a72a85de 100644 --- a/src/Common/src/CoreLib/System/Reflection/Emit/PEFileKinds.cs +++ b/src/Common/src/CoreLib/System/Reflection/Emit/PEFileKinds.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Reflection.Emit { // This Enum matchs the CorFieldAttr defined in CorHdr.h diff --git a/src/Common/src/CoreLib/System/Reflection/Emit/PackingSize.cs b/src/Common/src/CoreLib/System/Reflection/Emit/PackingSize.cs index d0bb0441899b..f734e1a3423c 100644 --- a/src/Common/src/CoreLib/System/Reflection/Emit/PackingSize.cs +++ b/src/Common/src/CoreLib/System/Reflection/Emit/PackingSize.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Reflection.Emit { public enum PackingSize diff --git a/src/Common/src/CoreLib/System/Reflection/Emit/ParameterToken.cs b/src/Common/src/CoreLib/System/Reflection/Emit/ParameterToken.cs index a0ce2eeb220c..ca1cacedfb64 100644 --- a/src/Common/src/CoreLib/System/Reflection/Emit/ParameterToken.cs +++ b/src/Common/src/CoreLib/System/Reflection/Emit/ParameterToken.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Reflection.Emit { /// diff --git a/src/Common/src/CoreLib/System/Reflection/Emit/PropertyToken.cs b/src/Common/src/CoreLib/System/Reflection/Emit/PropertyToken.cs index c116426e43ac..30daa09fe393 100644 --- a/src/Common/src/CoreLib/System/Reflection/Emit/PropertyToken.cs +++ b/src/Common/src/CoreLib/System/Reflection/Emit/PropertyToken.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Reflection.Emit { public struct PropertyToken diff --git a/src/Common/src/CoreLib/System/Reflection/Emit/SignatureToken.cs b/src/Common/src/CoreLib/System/Reflection/Emit/SignatureToken.cs index 5af7ca2b3528..31fddf6e4572 100644 --- a/src/Common/src/CoreLib/System/Reflection/Emit/SignatureToken.cs +++ b/src/Common/src/CoreLib/System/Reflection/Emit/SignatureToken.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Reflection.Emit { public struct SignatureToken diff --git a/src/Common/src/CoreLib/System/Reflection/Emit/StackBehaviour.cs b/src/Common/src/CoreLib/System/Reflection/Emit/StackBehaviour.cs index 6015da5efe0a..c3d27ad72be0 100644 --- a/src/Common/src/CoreLib/System/Reflection/Emit/StackBehaviour.cs +++ b/src/Common/src/CoreLib/System/Reflection/Emit/StackBehaviour.cs @@ -12,7 +12,6 @@ ** See $(RepoRoot)\src\inc\OpCodeGen.pl for more information.** ==============================================================*/ -#nullable enable namespace System.Reflection.Emit { public enum StackBehaviour diff --git a/src/Common/src/CoreLib/System/Reflection/Emit/StringToken.cs b/src/Common/src/CoreLib/System/Reflection/Emit/StringToken.cs index 02d3a87771de..9ab28cd00042 100644 --- a/src/Common/src/CoreLib/System/Reflection/Emit/StringToken.cs +++ b/src/Common/src/CoreLib/System/Reflection/Emit/StringToken.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Reflection.Emit { public struct StringToken diff --git a/src/Common/src/CoreLib/System/Reflection/Emit/TypeToken.cs b/src/Common/src/CoreLib/System/Reflection/Emit/TypeToken.cs index 303716b0d187..5586933c2316 100644 --- a/src/Common/src/CoreLib/System/Reflection/Emit/TypeToken.cs +++ b/src/Common/src/CoreLib/System/Reflection/Emit/TypeToken.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Reflection.Emit { public struct TypeToken diff --git a/src/Common/src/CoreLib/System/Reflection/EventAttributes.cs b/src/Common/src/CoreLib/System/Reflection/EventAttributes.cs index b41e84e787f6..fbc2972f697d 100644 --- a/src/Common/src/CoreLib/System/Reflection/EventAttributes.cs +++ b/src/Common/src/CoreLib/System/Reflection/EventAttributes.cs @@ -5,7 +5,6 @@ // EventAttributes are an enum defining the attributes associated with and Event. // These are defined in CorHdr.h and are a combination of bits and enums. -#nullable enable namespace System.Reflection { [Flags] diff --git a/src/Common/src/CoreLib/System/Reflection/EventInfo.cs b/src/Common/src/CoreLib/System/Reflection/EventInfo.cs index f4e689d7e8d8..789352a16c87 100644 --- a/src/Common/src/CoreLib/System/Reflection/EventInfo.cs +++ b/src/Common/src/CoreLib/System/Reflection/EventInfo.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; using System.Runtime.CompilerServices; diff --git a/src/Common/src/CoreLib/System/Reflection/ExceptionHandlingClause.cs b/src/Common/src/CoreLib/System/Reflection/ExceptionHandlingClause.cs index 5e753fdd8e3e..681b21c5f6ef 100644 --- a/src/Common/src/CoreLib/System/Reflection/ExceptionHandlingClause.cs +++ b/src/Common/src/CoreLib/System/Reflection/ExceptionHandlingClause.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Globalization; namespace System.Reflection diff --git a/src/Common/src/CoreLib/System/Reflection/ExceptionHandlingClauseOptions.cs b/src/Common/src/CoreLib/System/Reflection/ExceptionHandlingClauseOptions.cs index 30c72e593e9e..46285f7c8264 100644 --- a/src/Common/src/CoreLib/System/Reflection/ExceptionHandlingClauseOptions.cs +++ b/src/Common/src/CoreLib/System/Reflection/ExceptionHandlingClauseOptions.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Reflection { [Flags] diff --git a/src/Common/src/CoreLib/System/Reflection/FieldAttributes.cs b/src/Common/src/CoreLib/System/Reflection/FieldAttributes.cs index 90cc482eb4d7..048d0e70319a 100644 --- a/src/Common/src/CoreLib/System/Reflection/FieldAttributes.cs +++ b/src/Common/src/CoreLib/System/Reflection/FieldAttributes.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Reflection { // This Enum matchs the CorFieldAttr defined in CorHdr.h diff --git a/src/Common/src/CoreLib/System/Reflection/FieldInfo.cs b/src/Common/src/CoreLib/System/Reflection/FieldInfo.cs index a4875adb48ba..3ef9765a424c 100644 --- a/src/Common/src/CoreLib/System/Reflection/FieldInfo.cs +++ b/src/Common/src/CoreLib/System/Reflection/FieldInfo.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; using System.Globalization; using System.Runtime.CompilerServices; diff --git a/src/Common/src/CoreLib/System/Reflection/GenericParameterAttributes.cs b/src/Common/src/CoreLib/System/Reflection/GenericParameterAttributes.cs index 4cf14a5d016e..4b579d273ea2 100644 --- a/src/Common/src/CoreLib/System/Reflection/GenericParameterAttributes.cs +++ b/src/Common/src/CoreLib/System/Reflection/GenericParameterAttributes.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Reflection { [Flags] diff --git a/src/Common/src/CoreLib/System/Reflection/ICustomAttributeProvider.cs b/src/Common/src/CoreLib/System/Reflection/ICustomAttributeProvider.cs index 660765cd8cfe..3cae295bc49a 100644 --- a/src/Common/src/CoreLib/System/Reflection/ICustomAttributeProvider.cs +++ b/src/Common/src/CoreLib/System/Reflection/ICustomAttributeProvider.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Reflection { public interface ICustomAttributeProvider diff --git a/src/Common/src/CoreLib/System/Reflection/IReflect.cs b/src/Common/src/CoreLib/System/Reflection/IReflect.cs index 5099f8bd39cf..f37389c1cd92 100644 --- a/src/Common/src/CoreLib/System/Reflection/IReflect.cs +++ b/src/Common/src/CoreLib/System/Reflection/IReflect.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Globalization; namespace System.Reflection diff --git a/src/Common/src/CoreLib/System/Reflection/IReflectableType.cs b/src/Common/src/CoreLib/System/Reflection/IReflectableType.cs index 0264f6321e2a..5e2c0edab4b6 100644 --- a/src/Common/src/CoreLib/System/Reflection/IReflectableType.cs +++ b/src/Common/src/CoreLib/System/Reflection/IReflectableType.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Reflection { public interface IReflectableType diff --git a/src/Common/src/CoreLib/System/Reflection/ImageFileMachine.cs b/src/Common/src/CoreLib/System/Reflection/ImageFileMachine.cs index 425967a3b3fd..230bc952e5e9 100644 --- a/src/Common/src/CoreLib/System/Reflection/ImageFileMachine.cs +++ b/src/Common/src/CoreLib/System/Reflection/ImageFileMachine.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Reflection { public enum ImageFileMachine diff --git a/src/Common/src/CoreLib/System/Reflection/InterfaceMapping.cs b/src/Common/src/CoreLib/System/Reflection/InterfaceMapping.cs index ec8b1184ec32..2e0c0d8a28e6 100644 --- a/src/Common/src/CoreLib/System/Reflection/InterfaceMapping.cs +++ b/src/Common/src/CoreLib/System/Reflection/InterfaceMapping.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable // TODO-NULLABLE: Re-review namespace System.Reflection { public struct InterfaceMapping diff --git a/src/Common/src/CoreLib/System/Reflection/IntrospectionExtensions.cs b/src/Common/src/CoreLib/System/Reflection/IntrospectionExtensions.cs index cdf883601856..acf5987d448c 100644 --- a/src/Common/src/CoreLib/System/Reflection/IntrospectionExtensions.cs +++ b/src/Common/src/CoreLib/System/Reflection/IntrospectionExtensions.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; namespace System.Reflection diff --git a/src/Common/src/CoreLib/System/Reflection/InvalidFilterCriteriaException.cs b/src/Common/src/CoreLib/System/Reflection/InvalidFilterCriteriaException.cs index e6e6468b1b8f..7c9093b9559a 100644 --- a/src/Common/src/CoreLib/System/Reflection/InvalidFilterCriteriaException.cs +++ b/src/Common/src/CoreLib/System/Reflection/InvalidFilterCriteriaException.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.Serialization; namespace System.Reflection diff --git a/src/Common/src/CoreLib/System/Reflection/LocalVariableInfo.cs b/src/Common/src/CoreLib/System/Reflection/LocalVariableInfo.cs index 1040d50a585b..c9a1b22c8225 100644 --- a/src/Common/src/CoreLib/System/Reflection/LocalVariableInfo.cs +++ b/src/Common/src/CoreLib/System/Reflection/LocalVariableInfo.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; namespace System.Reflection diff --git a/src/Common/src/CoreLib/System/Reflection/ManifestResourceInfo.cs b/src/Common/src/CoreLib/System/Reflection/ManifestResourceInfo.cs index 02296da7b9aa..b9c56ab857ff 100644 --- a/src/Common/src/CoreLib/System/Reflection/ManifestResourceInfo.cs +++ b/src/Common/src/CoreLib/System/Reflection/ManifestResourceInfo.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Reflection { public class ManifestResourceInfo diff --git a/src/Common/src/CoreLib/System/Reflection/MemberFilter.cs b/src/Common/src/CoreLib/System/Reflection/MemberFilter.cs index 3f3282325eac..ae91b620a6a0 100644 --- a/src/Common/src/CoreLib/System/Reflection/MemberFilter.cs +++ b/src/Common/src/CoreLib/System/Reflection/MemberFilter.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Reflection { public delegate bool MemberFilter(MemberInfo m, object filterCriteria); diff --git a/src/Common/src/CoreLib/System/Reflection/MemberInfo.cs b/src/Common/src/CoreLib/System/Reflection/MemberInfo.cs index adf7bbaa8b65..cd0581235af6 100644 --- a/src/Common/src/CoreLib/System/Reflection/MemberInfo.cs +++ b/src/Common/src/CoreLib/System/Reflection/MemberInfo.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Collections.Generic; using System.Runtime.CompilerServices; diff --git a/src/Common/src/CoreLib/System/Reflection/MemberTypes.cs b/src/Common/src/CoreLib/System/Reflection/MemberTypes.cs index 06823b86de43..f73892e0a16a 100644 --- a/src/Common/src/CoreLib/System/Reflection/MemberTypes.cs +++ b/src/Common/src/CoreLib/System/Reflection/MemberTypes.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Reflection { [Flags] diff --git a/src/Common/src/CoreLib/System/Reflection/MethodAttributes.cs b/src/Common/src/CoreLib/System/Reflection/MethodAttributes.cs index 4448eb5a2382..1a7c7bf154e1 100644 --- a/src/Common/src/CoreLib/System/Reflection/MethodAttributes.cs +++ b/src/Common/src/CoreLib/System/Reflection/MethodAttributes.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Reflection { [Flags] diff --git a/src/Common/src/CoreLib/System/Reflection/MethodBase.cs b/src/Common/src/CoreLib/System/Reflection/MethodBase.cs index 551b78222f54..dcc268228e28 100644 --- a/src/Common/src/CoreLib/System/Reflection/MethodBase.cs +++ b/src/Common/src/CoreLib/System/Reflection/MethodBase.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Globalization; using System.Diagnostics; using System.Runtime.CompilerServices; diff --git a/src/Common/src/CoreLib/System/Reflection/MethodBody.cs b/src/Common/src/CoreLib/System/Reflection/MethodBody.cs index 745a9a0c60b8..11f65c64a8bd 100644 --- a/src/Common/src/CoreLib/System/Reflection/MethodBody.cs +++ b/src/Common/src/CoreLib/System/Reflection/MethodBody.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Collections.Generic; namespace System.Reflection diff --git a/src/Common/src/CoreLib/System/Reflection/MethodImplAttributes.cs b/src/Common/src/CoreLib/System/Reflection/MethodImplAttributes.cs index f46331b1f84b..b16f4a45756c 100644 --- a/src/Common/src/CoreLib/System/Reflection/MethodImplAttributes.cs +++ b/src/Common/src/CoreLib/System/Reflection/MethodImplAttributes.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Reflection { // This Enum matchs the CorMethodImpl defined in CorHdr.h diff --git a/src/Common/src/CoreLib/System/Reflection/MethodInfo.Internal.cs b/src/Common/src/CoreLib/System/Reflection/MethodInfo.Internal.cs index 273f1639d5dd..2806be639efd 100644 --- a/src/Common/src/CoreLib/System/Reflection/MethodInfo.Internal.cs +++ b/src/Common/src/CoreLib/System/Reflection/MethodInfo.Internal.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Reflection { public abstract partial class MethodInfo : MethodBase diff --git a/src/Common/src/CoreLib/System/Reflection/MethodInfo.cs b/src/Common/src/CoreLib/System/Reflection/MethodInfo.cs index 260e1338da09..ccc67f328caa 100644 --- a/src/Common/src/CoreLib/System/Reflection/MethodInfo.cs +++ b/src/Common/src/CoreLib/System/Reflection/MethodInfo.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.CompilerServices; namespace System.Reflection diff --git a/src/Common/src/CoreLib/System/Reflection/Missing.cs b/src/Common/src/CoreLib/System/Reflection/Missing.cs index 7f994f9895d7..46ab32fccf6b 100644 --- a/src/Common/src/CoreLib/System/Reflection/Missing.cs +++ b/src/Common/src/CoreLib/System/Reflection/Missing.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.Serialization; namespace System.Reflection diff --git a/src/Common/src/CoreLib/System/Reflection/Module.cs b/src/Common/src/CoreLib/System/Reflection/Module.cs index aac6a85d1f2e..72d49d50e25e 100644 --- a/src/Common/src/CoreLib/System/Reflection/Module.cs +++ b/src/Common/src/CoreLib/System/Reflection/Module.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Collections.Generic; using System.Runtime.CompilerServices; using System.Runtime.Serialization; diff --git a/src/Common/src/CoreLib/System/Reflection/ModuleResolveEventHandler.cs b/src/Common/src/CoreLib/System/Reflection/ModuleResolveEventHandler.cs index 6c52a2221496..eb8926b5db51 100644 --- a/src/Common/src/CoreLib/System/Reflection/ModuleResolveEventHandler.cs +++ b/src/Common/src/CoreLib/System/Reflection/ModuleResolveEventHandler.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Reflection { public delegate Module ModuleResolveEventHandler(object sender, ResolveEventArgs e); diff --git a/src/Common/src/CoreLib/System/Reflection/ObfuscateAssemblyAttribute.cs b/src/Common/src/CoreLib/System/Reflection/ObfuscateAssemblyAttribute.cs index f183b92e086a..f8f765ced2c3 100644 --- a/src/Common/src/CoreLib/System/Reflection/ObfuscateAssemblyAttribute.cs +++ b/src/Common/src/CoreLib/System/Reflection/ObfuscateAssemblyAttribute.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Reflection { [AttributeUsage(AttributeTargets.Assembly, AllowMultiple = false, Inherited = false)] diff --git a/src/Common/src/CoreLib/System/Reflection/ObfuscationAttribute.cs b/src/Common/src/CoreLib/System/Reflection/ObfuscationAttribute.cs index a28d41a1474f..bc8e6c0e07c1 100644 --- a/src/Common/src/CoreLib/System/Reflection/ObfuscationAttribute.cs +++ b/src/Common/src/CoreLib/System/Reflection/ObfuscationAttribute.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Reflection { [AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Parameter | AttributeTargets.Field | AttributeTargets.Property | AttributeTargets.Event | AttributeTargets.Interface | AttributeTargets.Enum | AttributeTargets.Delegate, diff --git a/src/Common/src/CoreLib/System/Reflection/ParameterAttributes.cs b/src/Common/src/CoreLib/System/Reflection/ParameterAttributes.cs index 12cd1f4980c9..ce195897c26b 100644 --- a/src/Common/src/CoreLib/System/Reflection/ParameterAttributes.cs +++ b/src/Common/src/CoreLib/System/Reflection/ParameterAttributes.cs @@ -5,7 +5,6 @@ // ParameterAttributes is an enum defining the attributes that may be // associated with a Parameter. These are defined in CorHdr.h. -#nullable enable namespace System.Reflection { // This Enum matchs the CorParamAttr defined in CorHdr.h diff --git a/src/Common/src/CoreLib/System/Reflection/ParameterInfo.cs b/src/Common/src/CoreLib/System/Reflection/ParameterInfo.cs index 3db4c5c1b9c2..4ad145d9e924 100644 --- a/src/Common/src/CoreLib/System/Reflection/ParameterInfo.cs +++ b/src/Common/src/CoreLib/System/Reflection/ParameterInfo.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Collections.Generic; using System.Runtime.Serialization; diff --git a/src/Common/src/CoreLib/System/Reflection/ParameterModifier.cs b/src/Common/src/CoreLib/System/Reflection/ParameterModifier.cs index 1b9cc08a0319..0fb75ffbd88f 100644 --- a/src/Common/src/CoreLib/System/Reflection/ParameterModifier.cs +++ b/src/Common/src/CoreLib/System/Reflection/ParameterModifier.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Reflection { public readonly struct ParameterModifier diff --git a/src/Common/src/CoreLib/System/Reflection/Pointer.cs b/src/Common/src/CoreLib/System/Reflection/Pointer.cs index 5761eabb443b..e1a9990cf0ee 100644 --- a/src/Common/src/CoreLib/System/Reflection/Pointer.cs +++ b/src/Common/src/CoreLib/System/Reflection/Pointer.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; using System.Runtime.Serialization; diff --git a/src/Common/src/CoreLib/System/Reflection/PortableExecutableKinds.cs b/src/Common/src/CoreLib/System/Reflection/PortableExecutableKinds.cs index b6427fd07c47..79be33868573 100644 --- a/src/Common/src/CoreLib/System/Reflection/PortableExecutableKinds.cs +++ b/src/Common/src/CoreLib/System/Reflection/PortableExecutableKinds.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Reflection { [Flags] diff --git a/src/Common/src/CoreLib/System/Reflection/ProcessorArchitecture.cs b/src/Common/src/CoreLib/System/Reflection/ProcessorArchitecture.cs index a90752110701..becb346c4fd8 100644 --- a/src/Common/src/CoreLib/System/Reflection/ProcessorArchitecture.cs +++ b/src/Common/src/CoreLib/System/Reflection/ProcessorArchitecture.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Reflection { public enum ProcessorArchitecture diff --git a/src/Common/src/CoreLib/System/Reflection/PropertyAttributes.cs b/src/Common/src/CoreLib/System/Reflection/PropertyAttributes.cs index 1722fb4dc61b..31e7a653bb07 100644 --- a/src/Common/src/CoreLib/System/Reflection/PropertyAttributes.cs +++ b/src/Common/src/CoreLib/System/Reflection/PropertyAttributes.cs @@ -5,7 +5,6 @@ // PropertyAttributes is an enum which defines the attributes that may be associated // with a property. The values here are defined in Corhdr.h. -#nullable enable namespace System.Reflection { // This Enum matchs the CorPropertyAttr defined in CorHdr.h diff --git a/src/Common/src/CoreLib/System/Reflection/PropertyInfo.cs b/src/Common/src/CoreLib/System/Reflection/PropertyInfo.cs index 6edfe7159c00..65697c1d756b 100644 --- a/src/Common/src/CoreLib/System/Reflection/PropertyInfo.cs +++ b/src/Common/src/CoreLib/System/Reflection/PropertyInfo.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; using System.Globalization; using System.Runtime.CompilerServices; diff --git a/src/Common/src/CoreLib/System/Reflection/ReflectionContext.cs b/src/Common/src/CoreLib/System/Reflection/ReflectionContext.cs index f7f9ce4f80ec..e9e93dab81b3 100644 --- a/src/Common/src/CoreLib/System/Reflection/ReflectionContext.cs +++ b/src/Common/src/CoreLib/System/Reflection/ReflectionContext.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Reflection { public abstract class ReflectionContext diff --git a/src/Common/src/CoreLib/System/Reflection/ReflectionTypeLoadException.cs b/src/Common/src/CoreLib/System/Reflection/ReflectionTypeLoadException.cs index c471fd9216ff..29a624e6cf51 100644 --- a/src/Common/src/CoreLib/System/Reflection/ReflectionTypeLoadException.cs +++ b/src/Common/src/CoreLib/System/Reflection/ReflectionTypeLoadException.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.Serialization; using System.Text; diff --git a/src/Common/src/CoreLib/System/Reflection/ResourceAttributes.cs b/src/Common/src/CoreLib/System/Reflection/ResourceAttributes.cs index 26f5e75749ef..2d03f42ba00f 100644 --- a/src/Common/src/CoreLib/System/Reflection/ResourceAttributes.cs +++ b/src/Common/src/CoreLib/System/Reflection/ResourceAttributes.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Reflection { [Flags] diff --git a/src/Common/src/CoreLib/System/Reflection/ResourceLocation.cs b/src/Common/src/CoreLib/System/Reflection/ResourceLocation.cs index 12d8928d5233..4902333ac0dc 100644 --- a/src/Common/src/CoreLib/System/Reflection/ResourceLocation.cs +++ b/src/Common/src/CoreLib/System/Reflection/ResourceLocation.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Reflection { [Flags] diff --git a/src/Common/src/CoreLib/System/Reflection/SignatureArrayType.cs b/src/Common/src/CoreLib/System/Reflection/SignatureArrayType.cs index 6a4b8f076b46..52011b8a9d1b 100644 --- a/src/Common/src/CoreLib/System/Reflection/SignatureArrayType.cs +++ b/src/Common/src/CoreLib/System/Reflection/SignatureArrayType.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; namespace System.Reflection diff --git a/src/Common/src/CoreLib/System/Reflection/SignatureByRefType.cs b/src/Common/src/CoreLib/System/Reflection/SignatureByRefType.cs index e0d0a3a47826..b8aef564369c 100644 --- a/src/Common/src/CoreLib/System/Reflection/SignatureByRefType.cs +++ b/src/Common/src/CoreLib/System/Reflection/SignatureByRefType.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Reflection { internal sealed class SignatureByRefType : SignatureHasElementType diff --git a/src/Common/src/CoreLib/System/Reflection/SignatureConstructedGenericType.cs b/src/Common/src/CoreLib/System/Reflection/SignatureConstructedGenericType.cs index 01408016bc29..0b92fd9827eb 100644 --- a/src/Common/src/CoreLib/System/Reflection/SignatureConstructedGenericType.cs +++ b/src/Common/src/CoreLib/System/Reflection/SignatureConstructedGenericType.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Text; namespace System.Reflection diff --git a/src/Common/src/CoreLib/System/Reflection/SignatureGenericMethodParameterType.cs b/src/Common/src/CoreLib/System/Reflection/SignatureGenericMethodParameterType.cs index 42ab16fe42de..76a13f504f42 100644 --- a/src/Common/src/CoreLib/System/Reflection/SignatureGenericMethodParameterType.cs +++ b/src/Common/src/CoreLib/System/Reflection/SignatureGenericMethodParameterType.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Reflection { internal sealed class SignatureGenericMethodParameterType : SignatureGenericParameterType diff --git a/src/Common/src/CoreLib/System/Reflection/SignatureGenericParameterType.cs b/src/Common/src/CoreLib/System/Reflection/SignatureGenericParameterType.cs index 15e5dfa7c254..e2c20238ed4a 100644 --- a/src/Common/src/CoreLib/System/Reflection/SignatureGenericParameterType.cs +++ b/src/Common/src/CoreLib/System/Reflection/SignatureGenericParameterType.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; namespace System.Reflection diff --git a/src/Common/src/CoreLib/System/Reflection/SignatureHasElementType.cs b/src/Common/src/CoreLib/System/Reflection/SignatureHasElementType.cs index f5c0a7878522..12360d247d7e 100644 --- a/src/Common/src/CoreLib/System/Reflection/SignatureHasElementType.cs +++ b/src/Common/src/CoreLib/System/Reflection/SignatureHasElementType.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; namespace System.Reflection diff --git a/src/Common/src/CoreLib/System/Reflection/SignaturePointerType.cs b/src/Common/src/CoreLib/System/Reflection/SignaturePointerType.cs index d7130850b498..4da3a25413c4 100644 --- a/src/Common/src/CoreLib/System/Reflection/SignaturePointerType.cs +++ b/src/Common/src/CoreLib/System/Reflection/SignaturePointerType.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Reflection { internal sealed class SignaturePointerType : SignatureHasElementType diff --git a/src/Common/src/CoreLib/System/Reflection/SignatureType.cs b/src/Common/src/CoreLib/System/Reflection/SignatureType.cs index c54e09c19d88..298ca51c2ab8 100644 --- a/src/Common/src/CoreLib/System/Reflection/SignatureType.cs +++ b/src/Common/src/CoreLib/System/Reflection/SignatureType.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Globalization; using System.Collections.Generic; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/System/Reflection/SignatureTypeExtensions.cs b/src/Common/src/CoreLib/System/Reflection/SignatureTypeExtensions.cs index 263dc50c7e1b..27664d6dbc44 100644 --- a/src/Common/src/CoreLib/System/Reflection/SignatureTypeExtensions.cs +++ b/src/Common/src/CoreLib/System/Reflection/SignatureTypeExtensions.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; namespace System.Reflection diff --git a/src/Common/src/CoreLib/System/Reflection/StrongNameKeyPair.cs b/src/Common/src/CoreLib/System/Reflection/StrongNameKeyPair.cs index 0f0abe57f6e5..a0ba97f835a7 100644 --- a/src/Common/src/CoreLib/System/Reflection/StrongNameKeyPair.cs +++ b/src/Common/src/CoreLib/System/Reflection/StrongNameKeyPair.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.IO; using System.Runtime.Serialization; diff --git a/src/Common/src/CoreLib/System/Reflection/TargetException.cs b/src/Common/src/CoreLib/System/Reflection/TargetException.cs index 7a1b90a5f1cd..45d36648ca13 100644 --- a/src/Common/src/CoreLib/System/Reflection/TargetException.cs +++ b/src/Common/src/CoreLib/System/Reflection/TargetException.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.Serialization; namespace System.Reflection diff --git a/src/Common/src/CoreLib/System/Reflection/TargetInvocationException.cs b/src/Common/src/CoreLib/System/Reflection/TargetInvocationException.cs index 61312f28eda7..9d9253202c78 100644 --- a/src/Common/src/CoreLib/System/Reflection/TargetInvocationException.cs +++ b/src/Common/src/CoreLib/System/Reflection/TargetInvocationException.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.Serialization; namespace System.Reflection diff --git a/src/Common/src/CoreLib/System/Reflection/TargetParameterCountException.cs b/src/Common/src/CoreLib/System/Reflection/TargetParameterCountException.cs index 72b667ed4690..aaf1c33476d7 100644 --- a/src/Common/src/CoreLib/System/Reflection/TargetParameterCountException.cs +++ b/src/Common/src/CoreLib/System/Reflection/TargetParameterCountException.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.Serialization; namespace System.Reflection diff --git a/src/Common/src/CoreLib/System/Reflection/TypeAttributes.cs b/src/Common/src/CoreLib/System/Reflection/TypeAttributes.cs index e164a2977f8d..3ae314299e81 100644 --- a/src/Common/src/CoreLib/System/Reflection/TypeAttributes.cs +++ b/src/Common/src/CoreLib/System/Reflection/TypeAttributes.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Reflection { // This Enum matchs the CorTypeAttr defined in CorHdr.h diff --git a/src/Common/src/CoreLib/System/Reflection/TypeDelegator.cs b/src/Common/src/CoreLib/System/Reflection/TypeDelegator.cs index f9df366879e8..8623dbd0dbea 100644 --- a/src/Common/src/CoreLib/System/Reflection/TypeDelegator.cs +++ b/src/Common/src/CoreLib/System/Reflection/TypeDelegator.cs @@ -6,7 +6,6 @@ // // This class wraps a Type object and delegates all methods to that Type. -#nullable enable using CultureInfo = System.Globalization.CultureInfo; namespace System.Reflection diff --git a/src/Common/src/CoreLib/System/Reflection/TypeFilter.cs b/src/Common/src/CoreLib/System/Reflection/TypeFilter.cs index ffb2f1fd1bde..eb049f81f902 100644 --- a/src/Common/src/CoreLib/System/Reflection/TypeFilter.cs +++ b/src/Common/src/CoreLib/System/Reflection/TypeFilter.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Reflection { public delegate bool TypeFilter(Type m, object filterCriteria); diff --git a/src/Common/src/CoreLib/System/Reflection/TypeInfo.cs b/src/Common/src/CoreLib/System/Reflection/TypeInfo.cs index 0a207fd6361e..e28087f11203 100644 --- a/src/Common/src/CoreLib/System/Reflection/TypeInfo.cs +++ b/src/Common/src/CoreLib/System/Reflection/TypeInfo.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Collections.Generic; namespace System.Reflection diff --git a/src/Common/src/CoreLib/System/ResolveEventArgs.cs b/src/Common/src/CoreLib/System/ResolveEventArgs.cs index 447d4343ef57..e455d58e6822 100644 --- a/src/Common/src/CoreLib/System/ResolveEventArgs.cs +++ b/src/Common/src/CoreLib/System/ResolveEventArgs.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Reflection; namespace System diff --git a/src/Common/src/CoreLib/System/ResolveEventHandler.cs b/src/Common/src/CoreLib/System/ResolveEventHandler.cs index 829b146993af..7cb2818dcf53 100644 --- a/src/Common/src/CoreLib/System/ResolveEventHandler.cs +++ b/src/Common/src/CoreLib/System/ResolveEventHandler.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Reflection; namespace System diff --git a/src/Common/src/CoreLib/System/Resources/FastResourceComparer.cs b/src/Common/src/CoreLib/System/Resources/FastResourceComparer.cs index 5f83b772a1a7..16c9fd0982ad 100644 --- a/src/Common/src/CoreLib/System/Resources/FastResourceComparer.cs +++ b/src/Common/src/CoreLib/System/Resources/FastResourceComparer.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable /*============================================================ ** ** @@ -15,6 +14,7 @@ ** ===========================================================*/ +#nullable enable using System.Collections; using System.Collections.Generic; using System.Diagnostics; diff --git a/src/Common/src/CoreLib/System/Resources/FileBasedResourceGroveler.cs b/src/Common/src/CoreLib/System/Resources/FileBasedResourceGroveler.cs index be44da2d628b..2fdeafa6e4ba 100644 --- a/src/Common/src/CoreLib/System/Resources/FileBasedResourceGroveler.cs +++ b/src/Common/src/CoreLib/System/Resources/FileBasedResourceGroveler.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable /*============================================================ ** ** diff --git a/src/Common/src/CoreLib/System/Resources/IResourceGroveler.cs b/src/Common/src/CoreLib/System/Resources/IResourceGroveler.cs index 8029e8e9b036..5a607d01aefc 100644 --- a/src/Common/src/CoreLib/System/Resources/IResourceGroveler.cs +++ b/src/Common/src/CoreLib/System/Resources/IResourceGroveler.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable /*============================================================ ** ** diff --git a/src/Common/src/CoreLib/System/Resources/IResourceReader.cs b/src/Common/src/CoreLib/System/Resources/IResourceReader.cs index 56b691fe6d55..543a5a67de8a 100644 --- a/src/Common/src/CoreLib/System/Resources/IResourceReader.cs +++ b/src/Common/src/CoreLib/System/Resources/IResourceReader.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable /*============================================================ ** ** diff --git a/src/Common/src/CoreLib/System/Resources/ManifestBasedResourceGroveler.cs b/src/Common/src/CoreLib/System/Resources/ManifestBasedResourceGroveler.cs index 39d4272aec0d..f37b506ee93d 100644 --- a/src/Common/src/CoreLib/System/Resources/ManifestBasedResourceGroveler.cs +++ b/src/Common/src/CoreLib/System/Resources/ManifestBasedResourceGroveler.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable /*============================================================ ** ** diff --git a/src/Common/src/CoreLib/System/Resources/MissingManifestResourceException.cs b/src/Common/src/CoreLib/System/Resources/MissingManifestResourceException.cs index 6f1499124917..217a142c70e5 100644 --- a/src/Common/src/CoreLib/System/Resources/MissingManifestResourceException.cs +++ b/src/Common/src/CoreLib/System/Resources/MissingManifestResourceException.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.Serialization; namespace System.Resources diff --git a/src/Common/src/CoreLib/System/Resources/MissingSatelliteAssemblyException.cs b/src/Common/src/CoreLib/System/Resources/MissingSatelliteAssemblyException.cs index a403379c36aa..ccd354ae5543 100644 --- a/src/Common/src/CoreLib/System/Resources/MissingSatelliteAssemblyException.cs +++ b/src/Common/src/CoreLib/System/Resources/MissingSatelliteAssemblyException.cs @@ -15,7 +15,6 @@ ** ===========================================================*/ -#nullable enable using System.Runtime.Serialization; namespace System.Resources diff --git a/src/Common/src/CoreLib/System/Resources/NeutralResourcesLanguageAttribute.cs b/src/Common/src/CoreLib/System/Resources/NeutralResourcesLanguageAttribute.cs index 3a1e8cf5cc92..495c5205b25d 100644 --- a/src/Common/src/CoreLib/System/Resources/NeutralResourcesLanguageAttribute.cs +++ b/src/Common/src/CoreLib/System/Resources/NeutralResourcesLanguageAttribute.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Resources { [AttributeUsage(AttributeTargets.Assembly, AllowMultiple = false)] diff --git a/src/Common/src/CoreLib/System/Resources/ResourceFallbackManager.cs b/src/Common/src/CoreLib/System/Resources/ResourceFallbackManager.cs index 731979313cfc..6a58fed98e09 100644 --- a/src/Common/src/CoreLib/System/Resources/ResourceFallbackManager.cs +++ b/src/Common/src/CoreLib/System/Resources/ResourceFallbackManager.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable /*============================================================ ** ** diff --git a/src/Common/src/CoreLib/System/Resources/ResourceManager.Uap.cs b/src/Common/src/CoreLib/System/Resources/ResourceManager.Uap.cs index 6488855b72cb..35ff81a78108 100644 --- a/src/Common/src/CoreLib/System/Resources/ResourceManager.Uap.cs +++ b/src/Common/src/CoreLib/System/Resources/ResourceManager.Uap.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.IO; using System.Globalization; diff --git a/src/Common/src/CoreLib/System/Resources/ResourceManager.cs b/src/Common/src/CoreLib/System/Resources/ResourceManager.cs index 713f4e600e64..6dcb475f25f5 100644 --- a/src/Common/src/CoreLib/System/Resources/ResourceManager.cs +++ b/src/Common/src/CoreLib/System/Resources/ResourceManager.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.IO; using System.Globalization; using System.Reflection; diff --git a/src/Common/src/CoreLib/System/Resources/ResourceReader.Core.cs b/src/Common/src/CoreLib/System/Resources/ResourceReader.Core.cs index 07f027947415..86e543b376e2 100644 --- a/src/Common/src/CoreLib/System/Resources/ResourceReader.Core.cs +++ b/src/Common/src/CoreLib/System/Resources/ResourceReader.Core.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Collections.Generic; using System.Diagnostics; using System.IO; diff --git a/src/Common/src/CoreLib/System/Resources/ResourceSet.cs b/src/Common/src/CoreLib/System/Resources/ResourceSet.cs index 05df000b7caf..936e43c4d750 100644 --- a/src/Common/src/CoreLib/System/Resources/ResourceSet.cs +++ b/src/Common/src/CoreLib/System/Resources/ResourceSet.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable /*============================================================ ** ** diff --git a/src/Common/src/CoreLib/System/Resources/RuntimeResourceSet.cs b/src/Common/src/CoreLib/System/Resources/RuntimeResourceSet.cs index 00793c3e2b99..0cb229d61a86 100644 --- a/src/Common/src/CoreLib/System/Resources/RuntimeResourceSet.cs +++ b/src/Common/src/CoreLib/System/Resources/RuntimeResourceSet.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable /*============================================================ ** ** @@ -14,6 +13,7 @@ ** ===========================================================*/ +#nullable enable using System.Collections; using System.Collections.Generic; using System.Diagnostics; diff --git a/src/Common/src/CoreLib/System/Resources/SatelliteContractVersionAttribute.cs b/src/Common/src/CoreLib/System/Resources/SatelliteContractVersionAttribute.cs index c11ec0a3f971..aeccadca99bb 100644 --- a/src/Common/src/CoreLib/System/Resources/SatelliteContractVersionAttribute.cs +++ b/src/Common/src/CoreLib/System/Resources/SatelliteContractVersionAttribute.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable /*============================================================ ** ** @@ -15,7 +14,6 @@ ** ===========================================================*/ -#nullable enable namespace System.Resources { [AttributeUsage(AttributeTargets.Assembly, AllowMultiple = false)] diff --git a/src/Common/src/CoreLib/System/Runtime/AmbiguousImplementationException.cs b/src/Common/src/CoreLib/System/Runtime/AmbiguousImplementationException.cs index 401a8fcb0e38..90f3d44f63dc 100644 --- a/src/Common/src/CoreLib/System/Runtime/AmbiguousImplementationException.cs +++ b/src/Common/src/CoreLib/System/Runtime/AmbiguousImplementationException.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.Serialization; namespace System.Runtime diff --git a/src/Common/src/CoreLib/System/Runtime/CompilerServices/AccessedThroughPropertyAttribute.cs b/src/Common/src/CoreLib/System/Runtime/CompilerServices/AccessedThroughPropertyAttribute.cs index 3a74d9bfa489..25efcafa3fd8 100644 --- a/src/Common/src/CoreLib/System/Runtime/CompilerServices/AccessedThroughPropertyAttribute.cs +++ b/src/Common/src/CoreLib/System/Runtime/CompilerServices/AccessedThroughPropertyAttribute.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Runtime.CompilerServices { [AttributeUsage(AttributeTargets.Field)] diff --git a/src/Common/src/CoreLib/System/Runtime/CompilerServices/AsyncIteratorMethodBuilder.cs b/src/Common/src/CoreLib/System/Runtime/CompilerServices/AsyncIteratorMethodBuilder.cs index b8c23aebc6ca..6fc5706897fe 100644 --- a/src/Common/src/CoreLib/System/Runtime/CompilerServices/AsyncIteratorMethodBuilder.cs +++ b/src/Common/src/CoreLib/System/Runtime/CompilerServices/AsyncIteratorMethodBuilder.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.InteropServices; using System.Threading; diff --git a/src/Common/src/CoreLib/System/Runtime/CompilerServices/AsyncIteratorStateMachineAttribute.cs b/src/Common/src/CoreLib/System/Runtime/CompilerServices/AsyncIteratorStateMachineAttribute.cs index 08cdcf0253c6..489195569de2 100644 --- a/src/Common/src/CoreLib/System/Runtime/CompilerServices/AsyncIteratorStateMachineAttribute.cs +++ b/src/Common/src/CoreLib/System/Runtime/CompilerServices/AsyncIteratorStateMachineAttribute.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Runtime.CompilerServices { /// Indicates whether a method is an asynchronous iterator. diff --git a/src/Common/src/CoreLib/System/Runtime/CompilerServices/AsyncMethodBuilder.cs b/src/Common/src/CoreLib/System/Runtime/CompilerServices/AsyncMethodBuilder.cs index fb6f2197c06a..f33f0c714837 100644 --- a/src/Common/src/CoreLib/System/Runtime/CompilerServices/AsyncMethodBuilder.cs +++ b/src/Common/src/CoreLib/System/Runtime/CompilerServices/AsyncMethodBuilder.cs @@ -10,7 +10,6 @@ // // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- -#nullable enable using System.Diagnostics; using System.Diagnostics.Tracing; using System.Reflection; diff --git a/src/Common/src/CoreLib/System/Runtime/CompilerServices/AsyncMethodBuilderAttribute.cs b/src/Common/src/CoreLib/System/Runtime/CompilerServices/AsyncMethodBuilderAttribute.cs index b8d9a37407b2..688a3a01ba72 100644 --- a/src/Common/src/CoreLib/System/Runtime/CompilerServices/AsyncMethodBuilderAttribute.cs +++ b/src/Common/src/CoreLib/System/Runtime/CompilerServices/AsyncMethodBuilderAttribute.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Runtime.CompilerServices { /// diff --git a/src/Common/src/CoreLib/System/Runtime/CompilerServices/AsyncStateMachineAttribute.cs b/src/Common/src/CoreLib/System/Runtime/CompilerServices/AsyncStateMachineAttribute.cs index 74bd1bdde236..66c9175ee75a 100644 --- a/src/Common/src/CoreLib/System/Runtime/CompilerServices/AsyncStateMachineAttribute.cs +++ b/src/Common/src/CoreLib/System/Runtime/CompilerServices/AsyncStateMachineAttribute.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Runtime.CompilerServices { [AttributeUsage(AttributeTargets.Method, Inherited = false, AllowMultiple = false)] diff --git a/src/Common/src/CoreLib/System/Runtime/CompilerServices/AsyncValueTaskMethodBuilder.cs b/src/Common/src/CoreLib/System/Runtime/CompilerServices/AsyncValueTaskMethodBuilder.cs index 7560e0fadf67..7ae8015326f1 100644 --- a/src/Common/src/CoreLib/System/Runtime/CompilerServices/AsyncValueTaskMethodBuilder.cs +++ b/src/Common/src/CoreLib/System/Runtime/CompilerServices/AsyncValueTaskMethodBuilder.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.InteropServices; using System.Security; using System.Threading.Tasks; diff --git a/src/Common/src/CoreLib/System/Runtime/CompilerServices/CallerArgumentExpressionAttribute.cs b/src/Common/src/CoreLib/System/Runtime/CompilerServices/CallerArgumentExpressionAttribute.cs index 1bf9fd7cd896..6e1c4c56cd05 100644 --- a/src/Common/src/CoreLib/System/Runtime/CompilerServices/CallerArgumentExpressionAttribute.cs +++ b/src/Common/src/CoreLib/System/Runtime/CompilerServices/CallerArgumentExpressionAttribute.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Runtime.CompilerServices { [AttributeUsage(AttributeTargets.Parameter, AllowMultiple = false, Inherited = false)] diff --git a/src/Common/src/CoreLib/System/Runtime/CompilerServices/CallerFilePathAttribute.cs b/src/Common/src/CoreLib/System/Runtime/CompilerServices/CallerFilePathAttribute.cs index 74782adf80b1..5858634b4274 100644 --- a/src/Common/src/CoreLib/System/Runtime/CompilerServices/CallerFilePathAttribute.cs +++ b/src/Common/src/CoreLib/System/Runtime/CompilerServices/CallerFilePathAttribute.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Runtime.CompilerServices { [AttributeUsage(AttributeTargets.Parameter, Inherited = false)] diff --git a/src/Common/src/CoreLib/System/Runtime/CompilerServices/CallerLineNumberAttribute.cs b/src/Common/src/CoreLib/System/Runtime/CompilerServices/CallerLineNumberAttribute.cs index f92ad55ef894..5bd2fcb91b94 100644 --- a/src/Common/src/CoreLib/System/Runtime/CompilerServices/CallerLineNumberAttribute.cs +++ b/src/Common/src/CoreLib/System/Runtime/CompilerServices/CallerLineNumberAttribute.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Runtime.CompilerServices { [AttributeUsage(AttributeTargets.Parameter, Inherited = false)] diff --git a/src/Common/src/CoreLib/System/Runtime/CompilerServices/CallerMemberNameAttribute.cs b/src/Common/src/CoreLib/System/Runtime/CompilerServices/CallerMemberNameAttribute.cs index 646036fc9cc8..8b046335b5a4 100644 --- a/src/Common/src/CoreLib/System/Runtime/CompilerServices/CallerMemberNameAttribute.cs +++ b/src/Common/src/CoreLib/System/Runtime/CompilerServices/CallerMemberNameAttribute.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Runtime.CompilerServices { [AttributeUsage(AttributeTargets.Parameter, Inherited = false)] diff --git a/src/Common/src/CoreLib/System/Runtime/CompilerServices/CompilationRelaxations.cs b/src/Common/src/CoreLib/System/Runtime/CompilerServices/CompilationRelaxations.cs index 422b82bd94f1..2d1763327acb 100644 --- a/src/Common/src/CoreLib/System/Runtime/CompilerServices/CompilationRelaxations.cs +++ b/src/Common/src/CoreLib/System/Runtime/CompilerServices/CompilationRelaxations.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Runtime.CompilerServices { /// IMPORTANT: Keep this in sync with corhdr.h diff --git a/src/Common/src/CoreLib/System/Runtime/CompilerServices/CompilationRelaxationsAttribute.cs b/src/Common/src/CoreLib/System/Runtime/CompilerServices/CompilationRelaxationsAttribute.cs index 71ccbd095255..d6da23fdf2a7 100644 --- a/src/Common/src/CoreLib/System/Runtime/CompilerServices/CompilationRelaxationsAttribute.cs +++ b/src/Common/src/CoreLib/System/Runtime/CompilerServices/CompilationRelaxationsAttribute.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Runtime.CompilerServices { [AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Module | AttributeTargets.Class | AttributeTargets.Method)] diff --git a/src/Common/src/CoreLib/System/Runtime/CompilerServices/CompilerGeneratedAttribute.cs b/src/Common/src/CoreLib/System/Runtime/CompilerServices/CompilerGeneratedAttribute.cs index d09282f53650..1c05abd1fec4 100644 --- a/src/Common/src/CoreLib/System/Runtime/CompilerServices/CompilerGeneratedAttribute.cs +++ b/src/Common/src/CoreLib/System/Runtime/CompilerServices/CompilerGeneratedAttribute.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Runtime.CompilerServices { [AttributeUsage(AttributeTargets.All, Inherited = true)] diff --git a/src/Common/src/CoreLib/System/Runtime/CompilerServices/CompilerGlobalScopeAttribute.cs b/src/Common/src/CoreLib/System/Runtime/CompilerServices/CompilerGlobalScopeAttribute.cs index 815d5f838b62..752295e87626 100644 --- a/src/Common/src/CoreLib/System/Runtime/CompilerServices/CompilerGlobalScopeAttribute.cs +++ b/src/Common/src/CoreLib/System/Runtime/CompilerServices/CompilerGlobalScopeAttribute.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Runtime.CompilerServices { // Attribute used to communicate to the VS7 debugger that a class should be treated as if it has global scope. diff --git a/src/Common/src/CoreLib/System/Runtime/CompilerServices/ConditionalWeakTable.cs b/src/Common/src/CoreLib/System/Runtime/CompilerServices/ConditionalWeakTable.cs index 4594e2d77c16..bbbf58d54537 100644 --- a/src/Common/src/CoreLib/System/Runtime/CompilerServices/ConditionalWeakTable.cs +++ b/src/Common/src/CoreLib/System/Runtime/CompilerServices/ConditionalWeakTable.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Collections; using System.Collections.Generic; using System.Diagnostics; diff --git a/src/Common/src/CoreLib/System/Runtime/CompilerServices/ConfiguredAsyncDisposable.cs b/src/Common/src/CoreLib/System/Runtime/CompilerServices/ConfiguredAsyncDisposable.cs index b5e5b9a38a15..aa5e882dc654 100644 --- a/src/Common/src/CoreLib/System/Runtime/CompilerServices/ConfiguredAsyncDisposable.cs +++ b/src/Common/src/CoreLib/System/Runtime/CompilerServices/ConfiguredAsyncDisposable.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.InteropServices; namespace System.Runtime.CompilerServices diff --git a/src/Common/src/CoreLib/System/Runtime/CompilerServices/ConfiguredCancelableAsyncEnumerable.cs b/src/Common/src/CoreLib/System/Runtime/CompilerServices/ConfiguredCancelableAsyncEnumerable.cs index c8d2cb29ea60..4f1bca71695e 100644 --- a/src/Common/src/CoreLib/System/Runtime/CompilerServices/ConfiguredCancelableAsyncEnumerable.cs +++ b/src/Common/src/CoreLib/System/Runtime/CompilerServices/ConfiguredCancelableAsyncEnumerable.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Collections.Generic; using System.Runtime.InteropServices; using System.Threading; diff --git a/src/Common/src/CoreLib/System/Runtime/CompilerServices/ConfiguredValueTaskAwaitable.cs b/src/Common/src/CoreLib/System/Runtime/CompilerServices/ConfiguredValueTaskAwaitable.cs index dedc16f98b84..9a153ae76791 100644 --- a/src/Common/src/CoreLib/System/Runtime/CompilerServices/ConfiguredValueTaskAwaitable.cs +++ b/src/Common/src/CoreLib/System/Runtime/CompilerServices/ConfiguredValueTaskAwaitable.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; using System.Runtime.InteropServices; using System.Threading; diff --git a/src/Common/src/CoreLib/System/Runtime/CompilerServices/ContractHelper.cs b/src/Common/src/CoreLib/System/Runtime/CompilerServices/ContractHelper.cs index f3104621eaa3..4cb70c052e03 100644 --- a/src/Common/src/CoreLib/System/Runtime/CompilerServices/ContractHelper.cs +++ b/src/Common/src/CoreLib/System/Runtime/CompilerServices/ContractHelper.cs @@ -4,7 +4,6 @@ #define DEBUG // The behavior of this contract library should be consistent regardless of build type. -#nullable enable using System.Diagnostics.Contracts; namespace System.Runtime.CompilerServices diff --git a/src/Common/src/CoreLib/System/Runtime/CompilerServices/CustomConstantAttribute.cs b/src/Common/src/CoreLib/System/Runtime/CompilerServices/CustomConstantAttribute.cs index 23c82aed9ddc..f3db0a276b5f 100644 --- a/src/Common/src/CoreLib/System/Runtime/CompilerServices/CustomConstantAttribute.cs +++ b/src/Common/src/CoreLib/System/Runtime/CompilerServices/CustomConstantAttribute.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Runtime.CompilerServices { [AttributeUsage(AttributeTargets.Field | AttributeTargets.Parameter, Inherited = false)] diff --git a/src/Common/src/CoreLib/System/Runtime/CompilerServices/DateTimeConstantAttribute.cs b/src/Common/src/CoreLib/System/Runtime/CompilerServices/DateTimeConstantAttribute.cs index 8c3179887b96..1b5bc375cddf 100644 --- a/src/Common/src/CoreLib/System/Runtime/CompilerServices/DateTimeConstantAttribute.cs +++ b/src/Common/src/CoreLib/System/Runtime/CompilerServices/DateTimeConstantAttribute.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Runtime.CompilerServices { [AttributeUsage(AttributeTargets.Field | AttributeTargets.Parameter, Inherited = false)] diff --git a/src/Common/src/CoreLib/System/Runtime/CompilerServices/DecimalConstantAttribute.cs b/src/Common/src/CoreLib/System/Runtime/CompilerServices/DecimalConstantAttribute.cs index 2f900f4220b3..521a3abe9cb6 100644 --- a/src/Common/src/CoreLib/System/Runtime/CompilerServices/DecimalConstantAttribute.cs +++ b/src/Common/src/CoreLib/System/Runtime/CompilerServices/DecimalConstantAttribute.cs @@ -4,7 +4,6 @@ // Note: If you add a new ctor overloads you need to update ParameterInfo.RawDefaultValue -#nullable enable namespace System.Runtime.CompilerServices { [AttributeUsage(AttributeTargets.Field | AttributeTargets.Parameter, Inherited = false)] diff --git a/src/Common/src/CoreLib/System/Runtime/CompilerServices/DefaultDependencyAttribute.cs b/src/Common/src/CoreLib/System/Runtime/CompilerServices/DefaultDependencyAttribute.cs index b225396b1338..31abdcbb3ecd 100644 --- a/src/Common/src/CoreLib/System/Runtime/CompilerServices/DefaultDependencyAttribute.cs +++ b/src/Common/src/CoreLib/System/Runtime/CompilerServices/DefaultDependencyAttribute.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Runtime.CompilerServices { [AttributeUsage(AttributeTargets.Assembly)] diff --git a/src/Common/src/CoreLib/System/Runtime/CompilerServices/DependencyAttribute.cs b/src/Common/src/CoreLib/System/Runtime/CompilerServices/DependencyAttribute.cs index b2e27f2d6c13..5b589fbde82c 100644 --- a/src/Common/src/CoreLib/System/Runtime/CompilerServices/DependencyAttribute.cs +++ b/src/Common/src/CoreLib/System/Runtime/CompilerServices/DependencyAttribute.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Runtime.CompilerServices { [AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)] diff --git a/src/Common/src/CoreLib/System/Runtime/CompilerServices/DisablePrivateReflectionAttribute.cs b/src/Common/src/CoreLib/System/Runtime/CompilerServices/DisablePrivateReflectionAttribute.cs index 8c56b80f1cfd..4fc00e10edeb 100644 --- a/src/Common/src/CoreLib/System/Runtime/CompilerServices/DisablePrivateReflectionAttribute.cs +++ b/src/Common/src/CoreLib/System/Runtime/CompilerServices/DisablePrivateReflectionAttribute.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Runtime.CompilerServices { [AttributeUsage(AttributeTargets.Assembly, AllowMultiple = false, Inherited = false)] diff --git a/src/Common/src/CoreLib/System/Runtime/CompilerServices/DiscardableAttribute.cs b/src/Common/src/CoreLib/System/Runtime/CompilerServices/DiscardableAttribute.cs index 861305e23b67..c88b3a7599e9 100644 --- a/src/Common/src/CoreLib/System/Runtime/CompilerServices/DiscardableAttribute.cs +++ b/src/Common/src/CoreLib/System/Runtime/CompilerServices/DiscardableAttribute.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Runtime.CompilerServices { // Custom attribute to indicating a TypeDef is a discardable attribute. diff --git a/src/Common/src/CoreLib/System/Runtime/CompilerServices/ExtensionAttribute.cs b/src/Common/src/CoreLib/System/Runtime/CompilerServices/ExtensionAttribute.cs index 7dfec4a409a3..92170880f1da 100644 --- a/src/Common/src/CoreLib/System/Runtime/CompilerServices/ExtensionAttribute.cs +++ b/src/Common/src/CoreLib/System/Runtime/CompilerServices/ExtensionAttribute.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; namespace System.Runtime.CompilerServices diff --git a/src/Common/src/CoreLib/System/Runtime/CompilerServices/FixedAddressValueTypeAttribute.cs b/src/Common/src/CoreLib/System/Runtime/CompilerServices/FixedAddressValueTypeAttribute.cs index ae70dc667e46..1810340f5456 100644 --- a/src/Common/src/CoreLib/System/Runtime/CompilerServices/FixedAddressValueTypeAttribute.cs +++ b/src/Common/src/CoreLib/System/Runtime/CompilerServices/FixedAddressValueTypeAttribute.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Runtime.CompilerServices { [AttributeUsage(AttributeTargets.Field)] diff --git a/src/Common/src/CoreLib/System/Runtime/CompilerServices/FixedBufferAttribute.cs b/src/Common/src/CoreLib/System/Runtime/CompilerServices/FixedBufferAttribute.cs index b98195a1f4eb..2215606c19db 100644 --- a/src/Common/src/CoreLib/System/Runtime/CompilerServices/FixedBufferAttribute.cs +++ b/src/Common/src/CoreLib/System/Runtime/CompilerServices/FixedBufferAttribute.cs @@ -13,7 +13,6 @@ ** ===========================================================*/ -#nullable enable namespace System.Runtime.CompilerServices { [AttributeUsage(AttributeTargets.Field, Inherited = false)] diff --git a/src/Common/src/CoreLib/System/Runtime/CompilerServices/FormattableStringFactory.cs b/src/Common/src/CoreLib/System/Runtime/CompilerServices/FormattableStringFactory.cs index 3e17cd0d4f8b..ae3339f29225 100644 --- a/src/Common/src/CoreLib/System/Runtime/CompilerServices/FormattableStringFactory.cs +++ b/src/Common/src/CoreLib/System/Runtime/CompilerServices/FormattableStringFactory.cs @@ -11,7 +11,6 @@ ** ===========================================================*/ -#nullable enable namespace System.Runtime.CompilerServices { /// diff --git a/src/Common/src/CoreLib/System/Runtime/CompilerServices/IAsyncStateMachine.cs b/src/Common/src/CoreLib/System/Runtime/CompilerServices/IAsyncStateMachine.cs index 8d5d0dad47d1..7fb7ea539529 100644 --- a/src/Common/src/CoreLib/System/Runtime/CompilerServices/IAsyncStateMachine.cs +++ b/src/Common/src/CoreLib/System/Runtime/CompilerServices/IAsyncStateMachine.cs @@ -10,7 +10,6 @@ // // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- -#nullable enable namespace System.Runtime.CompilerServices { /// diff --git a/src/Common/src/CoreLib/System/Runtime/CompilerServices/ICastable.cs b/src/Common/src/CoreLib/System/Runtime/CompilerServices/ICastable.cs index 3eabbc523af0..95c514953a9f 100644 --- a/src/Common/src/CoreLib/System/Runtime/CompilerServices/ICastable.cs +++ b/src/Common/src/CoreLib/System/Runtime/CompilerServices/ICastable.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Runtime.CompilerServices { /// diff --git a/src/Common/src/CoreLib/System/Runtime/CompilerServices/INotifyCompletion.cs b/src/Common/src/CoreLib/System/Runtime/CompilerServices/INotifyCompletion.cs index d1a64931f710..24f4f45cbeac 100644 --- a/src/Common/src/CoreLib/System/Runtime/CompilerServices/INotifyCompletion.cs +++ b/src/Common/src/CoreLib/System/Runtime/CompilerServices/INotifyCompletion.cs @@ -9,7 +9,6 @@ // Interfaces used to represent instances that notify listeners of their completion via continuations. // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -#nullable enable namespace System.Runtime.CompilerServices { /// diff --git a/src/Common/src/CoreLib/System/Runtime/CompilerServices/ITuple.cs b/src/Common/src/CoreLib/System/Runtime/CompilerServices/ITuple.cs index c78b65aa43f2..55b948b3e378 100644 --- a/src/Common/src/CoreLib/System/Runtime/CompilerServices/ITuple.cs +++ b/src/Common/src/CoreLib/System/Runtime/CompilerServices/ITuple.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Runtime.CompilerServices { /// diff --git a/src/Common/src/CoreLib/System/Runtime/CompilerServices/IndexerNameAttribute.cs b/src/Common/src/CoreLib/System/Runtime/CompilerServices/IndexerNameAttribute.cs index b4090e7e1505..bc76250adc82 100644 --- a/src/Common/src/CoreLib/System/Runtime/CompilerServices/IndexerNameAttribute.cs +++ b/src/Common/src/CoreLib/System/Runtime/CompilerServices/IndexerNameAttribute.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Runtime.CompilerServices { [AttributeUsage(AttributeTargets.Property, Inherited = true)] diff --git a/src/Common/src/CoreLib/System/Runtime/CompilerServices/InternalsVisibleToAttribute.cs b/src/Common/src/CoreLib/System/Runtime/CompilerServices/InternalsVisibleToAttribute.cs index 35fa95066761..c87e76c8e50d 100644 --- a/src/Common/src/CoreLib/System/Runtime/CompilerServices/InternalsVisibleToAttribute.cs +++ b/src/Common/src/CoreLib/System/Runtime/CompilerServices/InternalsVisibleToAttribute.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Runtime.CompilerServices { [AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true, Inherited = false)] diff --git a/src/Common/src/CoreLib/System/Runtime/CompilerServices/IntrinsicAttribute.cs b/src/Common/src/CoreLib/System/Runtime/CompilerServices/IntrinsicAttribute.cs index 9c76c65693d6..6bdd91d84487 100644 --- a/src/Common/src/CoreLib/System/Runtime/CompilerServices/IntrinsicAttribute.cs +++ b/src/Common/src/CoreLib/System/Runtime/CompilerServices/IntrinsicAttribute.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Runtime.CompilerServices { // Calls to methods or references to fields marked with this attribute may be replaced at diff --git a/src/Common/src/CoreLib/System/Runtime/CompilerServices/IsByRefLikeAttribute.cs b/src/Common/src/CoreLib/System/Runtime/CompilerServices/IsByRefLikeAttribute.cs index a5e7760feea0..90e49d2a4252 100644 --- a/src/Common/src/CoreLib/System/Runtime/CompilerServices/IsByRefLikeAttribute.cs +++ b/src/Common/src/CoreLib/System/Runtime/CompilerServices/IsByRefLikeAttribute.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.ComponentModel; namespace System.Runtime.CompilerServices diff --git a/src/Common/src/CoreLib/System/Runtime/CompilerServices/IsConst.cs b/src/Common/src/CoreLib/System/Runtime/CompilerServices/IsConst.cs index 036df6f4476c..7f948b608a14 100644 --- a/src/Common/src/CoreLib/System/Runtime/CompilerServices/IsConst.cs +++ b/src/Common/src/CoreLib/System/Runtime/CompilerServices/IsConst.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Runtime.CompilerServices { public static partial class IsConst diff --git a/src/Common/src/CoreLib/System/Runtime/CompilerServices/IsReadOnlyAttribute.cs b/src/Common/src/CoreLib/System/Runtime/CompilerServices/IsReadOnlyAttribute.cs index 186086c9f240..657df43957f5 100644 --- a/src/Common/src/CoreLib/System/Runtime/CompilerServices/IsReadOnlyAttribute.cs +++ b/src/Common/src/CoreLib/System/Runtime/CompilerServices/IsReadOnlyAttribute.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.ComponentModel; namespace System.Runtime.CompilerServices diff --git a/src/Common/src/CoreLib/System/Runtime/CompilerServices/IsVolatile.cs b/src/Common/src/CoreLib/System/Runtime/CompilerServices/IsVolatile.cs index a83cd2d0a10a..fd1c6a1b12b2 100644 --- a/src/Common/src/CoreLib/System/Runtime/CompilerServices/IsVolatile.cs +++ b/src/Common/src/CoreLib/System/Runtime/CompilerServices/IsVolatile.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Runtime.CompilerServices { public static class IsVolatile diff --git a/src/Common/src/CoreLib/System/Runtime/CompilerServices/IteratorStateMachineAttribute.cs b/src/Common/src/CoreLib/System/Runtime/CompilerServices/IteratorStateMachineAttribute.cs index f74c6bc54f78..53afc9566438 100644 --- a/src/Common/src/CoreLib/System/Runtime/CompilerServices/IteratorStateMachineAttribute.cs +++ b/src/Common/src/CoreLib/System/Runtime/CompilerServices/IteratorStateMachineAttribute.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Runtime.CompilerServices { [AttributeUsage(AttributeTargets.Method, Inherited = false, AllowMultiple = false)] diff --git a/src/Common/src/CoreLib/System/Runtime/CompilerServices/LoadHint.cs b/src/Common/src/CoreLib/System/Runtime/CompilerServices/LoadHint.cs index e924f57da724..fa490c2c9bb1 100644 --- a/src/Common/src/CoreLib/System/Runtime/CompilerServices/LoadHint.cs +++ b/src/Common/src/CoreLib/System/Runtime/CompilerServices/LoadHint.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Runtime.CompilerServices { public enum LoadHint diff --git a/src/Common/src/CoreLib/System/Runtime/CompilerServices/MethodCodeType.cs b/src/Common/src/CoreLib/System/Runtime/CompilerServices/MethodCodeType.cs index fa5d7aaf641d..841b6661989d 100644 --- a/src/Common/src/CoreLib/System/Runtime/CompilerServices/MethodCodeType.cs +++ b/src/Common/src/CoreLib/System/Runtime/CompilerServices/MethodCodeType.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Reflection; namespace System.Runtime.CompilerServices diff --git a/src/Common/src/CoreLib/System/Runtime/CompilerServices/MethodImplAttribute.cs b/src/Common/src/CoreLib/System/Runtime/CompilerServices/MethodImplAttribute.cs index 405ade1203f5..8e8f93c268de 100644 --- a/src/Common/src/CoreLib/System/Runtime/CompilerServices/MethodImplAttribute.cs +++ b/src/Common/src/CoreLib/System/Runtime/CompilerServices/MethodImplAttribute.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Runtime.CompilerServices { // Custom attribute to specify additional method properties. diff --git a/src/Common/src/CoreLib/System/Runtime/CompilerServices/MethodImplOptions.cs b/src/Common/src/CoreLib/System/Runtime/CompilerServices/MethodImplOptions.cs index 20d0b52e8d76..a2a2fb6122d5 100644 --- a/src/Common/src/CoreLib/System/Runtime/CompilerServices/MethodImplOptions.cs +++ b/src/Common/src/CoreLib/System/Runtime/CompilerServices/MethodImplOptions.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Runtime.CompilerServices { // This Enum matchs the miImpl flags defined in corhdr.h. It is used to specify diff --git a/src/Common/src/CoreLib/System/Runtime/CompilerServices/ReferenceAssemblyAttribute.cs b/src/Common/src/CoreLib/System/Runtime/CompilerServices/ReferenceAssemblyAttribute.cs index d8cf02be5b7e..48e799c50e04 100644 --- a/src/Common/src/CoreLib/System/Runtime/CompilerServices/ReferenceAssemblyAttribute.cs +++ b/src/Common/src/CoreLib/System/Runtime/CompilerServices/ReferenceAssemblyAttribute.cs @@ -13,7 +13,6 @@ ** ============================================================*/ -#nullable enable namespace System.Runtime.CompilerServices { [AttributeUsage(AttributeTargets.Assembly, AllowMultiple = false)] diff --git a/src/Common/src/CoreLib/System/Runtime/CompilerServices/RuntimeCompatibilityAttribute.cs b/src/Common/src/CoreLib/System/Runtime/CompilerServices/RuntimeCompatibilityAttribute.cs index f0844a001e92..609c5603300d 100644 --- a/src/Common/src/CoreLib/System/Runtime/CompilerServices/RuntimeCompatibilityAttribute.cs +++ b/src/Common/src/CoreLib/System/Runtime/CompilerServices/RuntimeCompatibilityAttribute.cs @@ -11,7 +11,6 @@ ** =============================================================================*/ -#nullable enable namespace System.Runtime.CompilerServices { [AttributeUsage(AttributeTargets.Assembly, Inherited = false, AllowMultiple = false)] diff --git a/src/Common/src/CoreLib/System/Runtime/CompilerServices/RuntimeFeature.cs b/src/Common/src/CoreLib/System/Runtime/CompilerServices/RuntimeFeature.cs index 7e8b2d0cd40b..b0cd9ddce26b 100644 --- a/src/Common/src/CoreLib/System/Runtime/CompilerServices/RuntimeFeature.cs +++ b/src/Common/src/CoreLib/System/Runtime/CompilerServices/RuntimeFeature.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Runtime.CompilerServices { public static partial class RuntimeFeature diff --git a/src/Common/src/CoreLib/System/Runtime/CompilerServices/RuntimeHelpers.cs b/src/Common/src/CoreLib/System/Runtime/CompilerServices/RuntimeHelpers.cs index f3fb361021ec..ab7b1d56553a 100644 --- a/src/Common/src/CoreLib/System/Runtime/CompilerServices/RuntimeHelpers.cs +++ b/src/Common/src/CoreLib/System/Runtime/CompilerServices/RuntimeHelpers.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.Serialization; using Internal.Runtime.CompilerServices; diff --git a/src/Common/src/CoreLib/System/Runtime/CompilerServices/RuntimeWrappedException.cs b/src/Common/src/CoreLib/System/Runtime/CompilerServices/RuntimeWrappedException.cs index 863de0705d9c..65fd6d24e648 100644 --- a/src/Common/src/CoreLib/System/Runtime/CompilerServices/RuntimeWrappedException.cs +++ b/src/Common/src/CoreLib/System/Runtime/CompilerServices/RuntimeWrappedException.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.Serialization; namespace System.Runtime.CompilerServices diff --git a/src/Common/src/CoreLib/System/Runtime/CompilerServices/SpecialNameAttribute.cs b/src/Common/src/CoreLib/System/Runtime/CompilerServices/SpecialNameAttribute.cs index a4246c2b697f..4cd78621cb5e 100644 --- a/src/Common/src/CoreLib/System/Runtime/CompilerServices/SpecialNameAttribute.cs +++ b/src/Common/src/CoreLib/System/Runtime/CompilerServices/SpecialNameAttribute.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Runtime.CompilerServices { [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Struct)] diff --git a/src/Common/src/CoreLib/System/Runtime/CompilerServices/StateMachineAttribute.cs b/src/Common/src/CoreLib/System/Runtime/CompilerServices/StateMachineAttribute.cs index 3f6400926a7d..d3522f5c470d 100644 --- a/src/Common/src/CoreLib/System/Runtime/CompilerServices/StateMachineAttribute.cs +++ b/src/Common/src/CoreLib/System/Runtime/CompilerServices/StateMachineAttribute.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Runtime.CompilerServices { [AttributeUsage(AttributeTargets.Method, Inherited = false, AllowMultiple = false)] diff --git a/src/Common/src/CoreLib/System/Runtime/CompilerServices/StringFreezingAttribute.cs b/src/Common/src/CoreLib/System/Runtime/CompilerServices/StringFreezingAttribute.cs index 473252a86352..25a8bfbc2647 100644 --- a/src/Common/src/CoreLib/System/Runtime/CompilerServices/StringFreezingAttribute.cs +++ b/src/Common/src/CoreLib/System/Runtime/CompilerServices/StringFreezingAttribute.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Runtime.CompilerServices { // Custom attribute to indicate that strings should be frozen. diff --git a/src/Common/src/CoreLib/System/Runtime/CompilerServices/StrongBox.cs b/src/Common/src/CoreLib/System/Runtime/CompilerServices/StrongBox.cs index e17f338952c0..c2f681e30c29 100644 --- a/src/Common/src/CoreLib/System/Runtime/CompilerServices/StrongBox.cs +++ b/src/Common/src/CoreLib/System/Runtime/CompilerServices/StrongBox.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Runtime.CompilerServices { /// diff --git a/src/Common/src/CoreLib/System/Runtime/CompilerServices/SuppressIldasmAttribute.cs b/src/Common/src/CoreLib/System/Runtime/CompilerServices/SuppressIldasmAttribute.cs index 04054d10a8cb..b4224b1c89a4 100644 --- a/src/Common/src/CoreLib/System/Runtime/CompilerServices/SuppressIldasmAttribute.cs +++ b/src/Common/src/CoreLib/System/Runtime/CompilerServices/SuppressIldasmAttribute.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Runtime.CompilerServices { [AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Module)] diff --git a/src/Common/src/CoreLib/System/Runtime/CompilerServices/TaskAwaiter.cs b/src/Common/src/CoreLib/System/Runtime/CompilerServices/TaskAwaiter.cs index 9124c6b8fbdf..e64750545e0e 100644 --- a/src/Common/src/CoreLib/System/Runtime/CompilerServices/TaskAwaiter.cs +++ b/src/Common/src/CoreLib/System/Runtime/CompilerServices/TaskAwaiter.cs @@ -37,7 +37,6 @@ // // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- -#nullable enable using System.Diagnostics; using System.Diagnostics.Tracing; using System.Threading; diff --git a/src/Common/src/CoreLib/System/Runtime/CompilerServices/TupleElementNamesAttribute.cs b/src/Common/src/CoreLib/System/Runtime/CompilerServices/TupleElementNamesAttribute.cs index 24d114d06901..d4bdcd1fa7ff 100644 --- a/src/Common/src/CoreLib/System/Runtime/CompilerServices/TupleElementNamesAttribute.cs +++ b/src/Common/src/CoreLib/System/Runtime/CompilerServices/TupleElementNamesAttribute.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Collections.Generic; namespace System.Runtime.CompilerServices diff --git a/src/Common/src/CoreLib/System/Runtime/CompilerServices/TypeForwardedFromAttribute.cs b/src/Common/src/CoreLib/System/Runtime/CompilerServices/TypeForwardedFromAttribute.cs index 401b02141f8a..27dd64575578 100644 --- a/src/Common/src/CoreLib/System/Runtime/CompilerServices/TypeForwardedFromAttribute.cs +++ b/src/Common/src/CoreLib/System/Runtime/CompilerServices/TypeForwardedFromAttribute.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Runtime.CompilerServices { [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Enum | AttributeTargets.Interface | AttributeTargets.Delegate, Inherited = false, AllowMultiple = false)] diff --git a/src/Common/src/CoreLib/System/Runtime/CompilerServices/TypeForwardedToAttribute.cs b/src/Common/src/CoreLib/System/Runtime/CompilerServices/TypeForwardedToAttribute.cs index 64107099dabc..85d5c030c19b 100644 --- a/src/Common/src/CoreLib/System/Runtime/CompilerServices/TypeForwardedToAttribute.cs +++ b/src/Common/src/CoreLib/System/Runtime/CompilerServices/TypeForwardedToAttribute.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Runtime.CompilerServices { [AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true, Inherited = false)] diff --git a/src/Common/src/CoreLib/System/Runtime/CompilerServices/UnsafeValueTypeAttribute.cs b/src/Common/src/CoreLib/System/Runtime/CompilerServices/UnsafeValueTypeAttribute.cs index ada7f0569867..f049c89b3f3e 100644 --- a/src/Common/src/CoreLib/System/Runtime/CompilerServices/UnsafeValueTypeAttribute.cs +++ b/src/Common/src/CoreLib/System/Runtime/CompilerServices/UnsafeValueTypeAttribute.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Runtime.CompilerServices { [AttributeUsage(AttributeTargets.Struct)] diff --git a/src/Common/src/CoreLib/System/Runtime/CompilerServices/ValueTaskAwaiter.cs b/src/Common/src/CoreLib/System/Runtime/CompilerServices/ValueTaskAwaiter.cs index 62860bd70e73..d7bc41b2783d 100644 --- a/src/Common/src/CoreLib/System/Runtime/CompilerServices/ValueTaskAwaiter.cs +++ b/src/Common/src/CoreLib/System/Runtime/CompilerServices/ValueTaskAwaiter.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; using System.Threading; using System.Threading.Tasks; diff --git a/src/Common/src/CoreLib/System/Runtime/CompilerServices/YieldAwaitable.cs b/src/Common/src/CoreLib/System/Runtime/CompilerServices/YieldAwaitable.cs index b7f7779a8099..c6b19d654e86 100644 --- a/src/Common/src/CoreLib/System/Runtime/CompilerServices/YieldAwaitable.cs +++ b/src/Common/src/CoreLib/System/Runtime/CompilerServices/YieldAwaitable.cs @@ -21,7 +21,6 @@ // // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- -#nullable enable using System.Diagnostics; using System.Diagnostics.Tracing; using System.Threading; diff --git a/src/Common/src/CoreLib/System/Runtime/ConstrainedExecution/CriticalFinalizerObject.cs b/src/Common/src/CoreLib/System/Runtime/ConstrainedExecution/CriticalFinalizerObject.cs index 60b36ad966fe..3f35f816a304 100644 --- a/src/Common/src/CoreLib/System/Runtime/ConstrainedExecution/CriticalFinalizerObject.cs +++ b/src/Common/src/CoreLib/System/Runtime/ConstrainedExecution/CriticalFinalizerObject.cs @@ -12,7 +12,6 @@ ** ===========================================================*/ -#nullable enable namespace System.Runtime.ConstrainedExecution { public abstract class CriticalFinalizerObject diff --git a/src/Common/src/CoreLib/System/Runtime/ConstrainedExecution/ReliabilityContractAttribute.cs b/src/Common/src/CoreLib/System/Runtime/ConstrainedExecution/ReliabilityContractAttribute.cs index 59ef5da2b98c..b3cb0143fa0f 100644 --- a/src/Common/src/CoreLib/System/Runtime/ConstrainedExecution/ReliabilityContractAttribute.cs +++ b/src/Common/src/CoreLib/System/Runtime/ConstrainedExecution/ReliabilityContractAttribute.cs @@ -16,7 +16,6 @@ ** ===========================================================*/ -#nullable enable namespace System.Runtime.ConstrainedExecution { [AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Constructor | AttributeTargets.Method | AttributeTargets.Interface /* | AttributeTargets.Delegate*/, Inherited = false)] diff --git a/src/Common/src/CoreLib/System/Runtime/ExceptionServices/ExceptionDispatchInfo.cs b/src/Common/src/CoreLib/System/Runtime/ExceptionServices/ExceptionDispatchInfo.cs index 57cbcf78c6f1..3578d43d9cfa 100644 --- a/src/Common/src/CoreLib/System/Runtime/ExceptionServices/ExceptionDispatchInfo.cs +++ b/src/Common/src/CoreLib/System/Runtime/ExceptionServices/ExceptionDispatchInfo.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; namespace System.Runtime.ExceptionServices diff --git a/src/Common/src/CoreLib/System/Runtime/ExceptionServices/ExceptionNotification.cs b/src/Common/src/CoreLib/System/Runtime/ExceptionServices/ExceptionNotification.cs index 9357e2fa5aa3..605588d657f8 100644 --- a/src/Common/src/CoreLib/System/Runtime/ExceptionServices/ExceptionNotification.cs +++ b/src/Common/src/CoreLib/System/Runtime/ExceptionServices/ExceptionNotification.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Runtime.ExceptionServices { // Definition of the argument-type passed to the FirstChanceException event handler diff --git a/src/Common/src/CoreLib/System/Runtime/ExceptionServices/HandleProcessCorruptedStateExceptionsAttribute.cs b/src/Common/src/CoreLib/System/Runtime/ExceptionServices/HandleProcessCorruptedStateExceptionsAttribute.cs index 61a4de616d1e..cc1bc81e5a65 100644 --- a/src/Common/src/CoreLib/System/Runtime/ExceptionServices/HandleProcessCorruptedStateExceptionsAttribute.cs +++ b/src/Common/src/CoreLib/System/Runtime/ExceptionServices/HandleProcessCorruptedStateExceptionsAttribute.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Runtime.ExceptionServices { // This attribute can be applied to methods to indicate that ProcessCorruptedState diff --git a/src/Common/src/CoreLib/System/Runtime/GCSettings.cs b/src/Common/src/CoreLib/System/Runtime/GCSettings.cs index cb25a1efe932..86d10f4b5345 100644 --- a/src/Common/src/CoreLib/System/Runtime/GCSettings.cs +++ b/src/Common/src/CoreLib/System/Runtime/GCSettings.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; namespace System.Runtime diff --git a/src/Common/src/CoreLib/System/Runtime/InteropServices/AllowReversePInvokeCallsAttribute.cs b/src/Common/src/CoreLib/System/Runtime/InteropServices/AllowReversePInvokeCallsAttribute.cs index 55d9ec0347a6..cb640a7a8c85 100644 --- a/src/Common/src/CoreLib/System/Runtime/InteropServices/AllowReversePInvokeCallsAttribute.cs +++ b/src/Common/src/CoreLib/System/Runtime/InteropServices/AllowReversePInvokeCallsAttribute.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Runtime.InteropServices { // To be used on methods that sink reverse P/Invoke calls. diff --git a/src/Common/src/CoreLib/System/Runtime/InteropServices/ArrayWithOffset.cs b/src/Common/src/CoreLib/System/Runtime/InteropServices/ArrayWithOffset.cs index 7e3e9a9f7272..7b5cd877abba 100644 --- a/src/Common/src/CoreLib/System/Runtime/InteropServices/ArrayWithOffset.cs +++ b/src/Common/src/CoreLib/System/Runtime/InteropServices/ArrayWithOffset.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable #if BIT64 using nuint = System.UInt64; #else diff --git a/src/Common/src/CoreLib/System/Runtime/InteropServices/BStrWrapper.cs b/src/Common/src/CoreLib/System/Runtime/InteropServices/BStrWrapper.cs index 02e6710fccdc..f6eee3426404 100644 --- a/src/Common/src/CoreLib/System/Runtime/InteropServices/BStrWrapper.cs +++ b/src/Common/src/CoreLib/System/Runtime/InteropServices/BStrWrapper.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Runtime.InteropServices { // Wrapper that is converted to a variant with VT_BSTR. diff --git a/src/Common/src/CoreLib/System/Runtime/InteropServices/BestFitMappingAttribute.cs b/src/Common/src/CoreLib/System/Runtime/InteropServices/BestFitMappingAttribute.cs index eea085208d00..4ebee1538ca4 100644 --- a/src/Common/src/CoreLib/System/Runtime/InteropServices/BestFitMappingAttribute.cs +++ b/src/Common/src/CoreLib/System/Runtime/InteropServices/BestFitMappingAttribute.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Runtime.InteropServices { [AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Interface | AttributeTargets.Class | AttributeTargets.Struct, Inherited = false)] diff --git a/src/Common/src/CoreLib/System/Runtime/InteropServices/COMException.cs b/src/Common/src/CoreLib/System/Runtime/InteropServices/COMException.cs index cc51358add34..2dec6b8ffbb9 100644 --- a/src/Common/src/CoreLib/System/Runtime/InteropServices/COMException.cs +++ b/src/Common/src/CoreLib/System/Runtime/InteropServices/COMException.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.Serialization; using System.Globalization; using System.Text; diff --git a/src/Common/src/CoreLib/System/Runtime/InteropServices/ClassInterfaceAttribute.cs b/src/Common/src/CoreLib/System/Runtime/InteropServices/ClassInterfaceAttribute.cs index 7bb699e8537a..59d79ff44383 100644 --- a/src/Common/src/CoreLib/System/Runtime/InteropServices/ClassInterfaceAttribute.cs +++ b/src/Common/src/CoreLib/System/Runtime/InteropServices/ClassInterfaceAttribute.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Runtime.InteropServices { [AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Class, Inherited = false)] diff --git a/src/Common/src/CoreLib/System/Runtime/InteropServices/CoClassAttribute.cs b/src/Common/src/CoreLib/System/Runtime/InteropServices/CoClassAttribute.cs index ccf5a928658c..4be6622c3da5 100644 --- a/src/Common/src/CoreLib/System/Runtime/InteropServices/CoClassAttribute.cs +++ b/src/Common/src/CoreLib/System/Runtime/InteropServices/CoClassAttribute.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Runtime.InteropServices { [AttributeUsage(AttributeTargets.Interface, Inherited = false)] diff --git a/src/Common/src/CoreLib/System/Runtime/InteropServices/ComDefaultInterfaceAttribute.cs b/src/Common/src/CoreLib/System/Runtime/InteropServices/ComDefaultInterfaceAttribute.cs index af980c2bcc22..1b84f5f561a3 100644 --- a/src/Common/src/CoreLib/System/Runtime/InteropServices/ComDefaultInterfaceAttribute.cs +++ b/src/Common/src/CoreLib/System/Runtime/InteropServices/ComDefaultInterfaceAttribute.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Runtime.InteropServices { [AttributeUsage(AttributeTargets.Class, Inherited = false)] diff --git a/src/Common/src/CoreLib/System/Runtime/InteropServices/ComEventInterfaceAttribute.cs b/src/Common/src/CoreLib/System/Runtime/InteropServices/ComEventInterfaceAttribute.cs index 01cddd63239d..d4ccc702e05e 100644 --- a/src/Common/src/CoreLib/System/Runtime/InteropServices/ComEventInterfaceAttribute.cs +++ b/src/Common/src/CoreLib/System/Runtime/InteropServices/ComEventInterfaceAttribute.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Runtime.InteropServices { [AttributeUsage(AttributeTargets.Interface, Inherited = false)] diff --git a/src/Common/src/CoreLib/System/Runtime/InteropServices/ComEventsHelpers.NoCom.cs b/src/Common/src/CoreLib/System/Runtime/InteropServices/ComEventsHelpers.NoCom.cs index 27ed5da8d1b1..7b29d6f9ad0e 100644 --- a/src/Common/src/CoreLib/System/Runtime/InteropServices/ComEventsHelpers.NoCom.cs +++ b/src/Common/src/CoreLib/System/Runtime/InteropServices/ComEventsHelpers.NoCom.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.InteropServices.ComTypes; namespace System.Runtime.InteropServices diff --git a/src/Common/src/CoreLib/System/Runtime/InteropServices/ComImportAttribute.cs b/src/Common/src/CoreLib/System/Runtime/InteropServices/ComImportAttribute.cs index 66663237b4ce..a290bf4510d2 100644 --- a/src/Common/src/CoreLib/System/Runtime/InteropServices/ComImportAttribute.cs +++ b/src/Common/src/CoreLib/System/Runtime/InteropServices/ComImportAttribute.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Runtime.InteropServices { [AttributeUsage(AttributeTargets.Class | AttributeTargets.Interface, Inherited = false)] diff --git a/src/Common/src/CoreLib/System/Runtime/InteropServices/ComSourceInterfacesAttribute.cs b/src/Common/src/CoreLib/System/Runtime/InteropServices/ComSourceInterfacesAttribute.cs index aa1a6a283cec..a62871a39977 100644 --- a/src/Common/src/CoreLib/System/Runtime/InteropServices/ComSourceInterfacesAttribute.cs +++ b/src/Common/src/CoreLib/System/Runtime/InteropServices/ComSourceInterfacesAttribute.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Runtime.InteropServices { [AttributeUsage(AttributeTargets.Class, Inherited = true)] diff --git a/src/Common/src/CoreLib/System/Runtime/InteropServices/ComTypes/IBindCtx.cs b/src/Common/src/CoreLib/System/Runtime/InteropServices/ComTypes/IBindCtx.cs index f662c639fff0..206c538e363a 100644 --- a/src/Common/src/CoreLib/System/Runtime/InteropServices/ComTypes/IBindCtx.cs +++ b/src/Common/src/CoreLib/System/Runtime/InteropServices/ComTypes/IBindCtx.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Runtime.InteropServices.ComTypes { [StructLayout(LayoutKind.Sequential)] diff --git a/src/Common/src/CoreLib/System/Runtime/InteropServices/ComTypes/IConnectionPoint.cs b/src/Common/src/CoreLib/System/Runtime/InteropServices/ComTypes/IConnectionPoint.cs index ab5cf2e3990b..b2ce1928a138 100644 --- a/src/Common/src/CoreLib/System/Runtime/InteropServices/ComTypes/IConnectionPoint.cs +++ b/src/Common/src/CoreLib/System/Runtime/InteropServices/ComTypes/IConnectionPoint.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Runtime.InteropServices.ComTypes { [Guid("B196B286-BAB4-101A-B69C-00AA00341D07")] diff --git a/src/Common/src/CoreLib/System/Runtime/InteropServices/ComTypes/IConnectionPointContainer.cs b/src/Common/src/CoreLib/System/Runtime/InteropServices/ComTypes/IConnectionPointContainer.cs index 9203b6780490..4dd08658a0d9 100644 --- a/src/Common/src/CoreLib/System/Runtime/InteropServices/ComTypes/IConnectionPointContainer.cs +++ b/src/Common/src/CoreLib/System/Runtime/InteropServices/ComTypes/IConnectionPointContainer.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Runtime.InteropServices.ComTypes { [Guid("B196B284-BAB4-101A-B69C-00AA00341D07")] diff --git a/src/Common/src/CoreLib/System/Runtime/InteropServices/ComTypes/IEnumConnectionPoints.cs b/src/Common/src/CoreLib/System/Runtime/InteropServices/ComTypes/IEnumConnectionPoints.cs index 8536c0f60704..99df6ac60e44 100644 --- a/src/Common/src/CoreLib/System/Runtime/InteropServices/ComTypes/IEnumConnectionPoints.cs +++ b/src/Common/src/CoreLib/System/Runtime/InteropServices/ComTypes/IEnumConnectionPoints.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Runtime.InteropServices.ComTypes { [Guid("B196B285-BAB4-101A-B69C-00AA00341D07")] diff --git a/src/Common/src/CoreLib/System/Runtime/InteropServices/ComTypes/IEnumConnections.cs b/src/Common/src/CoreLib/System/Runtime/InteropServices/ComTypes/IEnumConnections.cs index 6220c9bb2c6a..951685beff7e 100644 --- a/src/Common/src/CoreLib/System/Runtime/InteropServices/ComTypes/IEnumConnections.cs +++ b/src/Common/src/CoreLib/System/Runtime/InteropServices/ComTypes/IEnumConnections.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Runtime.InteropServices.ComTypes { [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)] diff --git a/src/Common/src/CoreLib/System/Runtime/InteropServices/ComTypes/IEnumMoniker.cs b/src/Common/src/CoreLib/System/Runtime/InteropServices/ComTypes/IEnumMoniker.cs index 514cb9489b77..9a63ba0a11a3 100644 --- a/src/Common/src/CoreLib/System/Runtime/InteropServices/ComTypes/IEnumMoniker.cs +++ b/src/Common/src/CoreLib/System/Runtime/InteropServices/ComTypes/IEnumMoniker.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Runtime.InteropServices.ComTypes { [Guid("00000102-0000-0000-C000-000000000046")] diff --git a/src/Common/src/CoreLib/System/Runtime/InteropServices/ComTypes/IEnumString.cs b/src/Common/src/CoreLib/System/Runtime/InteropServices/ComTypes/IEnumString.cs index ff050d419c63..57fc59121f00 100644 --- a/src/Common/src/CoreLib/System/Runtime/InteropServices/ComTypes/IEnumString.cs +++ b/src/Common/src/CoreLib/System/Runtime/InteropServices/ComTypes/IEnumString.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Runtime.InteropServices.ComTypes { [Guid("00000101-0000-0000-C000-000000000046")] diff --git a/src/Common/src/CoreLib/System/Runtime/InteropServices/ComTypes/IEnumVARIANT.cs b/src/Common/src/CoreLib/System/Runtime/InteropServices/ComTypes/IEnumVARIANT.cs index 6b970b886e2b..bb6688ee2c73 100644 --- a/src/Common/src/CoreLib/System/Runtime/InteropServices/ComTypes/IEnumVARIANT.cs +++ b/src/Common/src/CoreLib/System/Runtime/InteropServices/ComTypes/IEnumVARIANT.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Runtime.InteropServices.ComTypes { [Guid("00020404-0000-0000-C000-000000000046")] diff --git a/src/Common/src/CoreLib/System/Runtime/InteropServices/ComTypes/IMoniker.cs b/src/Common/src/CoreLib/System/Runtime/InteropServices/ComTypes/IMoniker.cs index 49cbe0577df1..e6b676f1dee0 100644 --- a/src/Common/src/CoreLib/System/Runtime/InteropServices/ComTypes/IMoniker.cs +++ b/src/Common/src/CoreLib/System/Runtime/InteropServices/ComTypes/IMoniker.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Runtime.InteropServices.ComTypes { [StructLayout(LayoutKind.Sequential)] diff --git a/src/Common/src/CoreLib/System/Runtime/InteropServices/ComTypes/IPersistFile.cs b/src/Common/src/CoreLib/System/Runtime/InteropServices/ComTypes/IPersistFile.cs index 6fa3f80d29d1..4ae9d127ea94 100644 --- a/src/Common/src/CoreLib/System/Runtime/InteropServices/ComTypes/IPersistFile.cs +++ b/src/Common/src/CoreLib/System/Runtime/InteropServices/ComTypes/IPersistFile.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Runtime.InteropServices.ComTypes { [Guid("0000010b-0000-0000-C000-000000000046")] diff --git a/src/Common/src/CoreLib/System/Runtime/InteropServices/ComTypes/IRunningObjectTable.cs b/src/Common/src/CoreLib/System/Runtime/InteropServices/ComTypes/IRunningObjectTable.cs index 49078daffceb..1884fcc99b50 100644 --- a/src/Common/src/CoreLib/System/Runtime/InteropServices/ComTypes/IRunningObjectTable.cs +++ b/src/Common/src/CoreLib/System/Runtime/InteropServices/ComTypes/IRunningObjectTable.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Runtime.InteropServices.ComTypes { [Guid("00000010-0000-0000-C000-000000000046")] diff --git a/src/Common/src/CoreLib/System/Runtime/InteropServices/ComTypes/IStream.cs b/src/Common/src/CoreLib/System/Runtime/InteropServices/ComTypes/IStream.cs index d15a09faa01b..09b284041e72 100644 --- a/src/Common/src/CoreLib/System/Runtime/InteropServices/ComTypes/IStream.cs +++ b/src/Common/src/CoreLib/System/Runtime/InteropServices/ComTypes/IStream.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Runtime.InteropServices.ComTypes { [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)] diff --git a/src/Common/src/CoreLib/System/Runtime/InteropServices/ComTypes/ITypeComp.cs b/src/Common/src/CoreLib/System/Runtime/InteropServices/ComTypes/ITypeComp.cs index aea9a8219f07..7e6379361518 100644 --- a/src/Common/src/CoreLib/System/Runtime/InteropServices/ComTypes/ITypeComp.cs +++ b/src/Common/src/CoreLib/System/Runtime/InteropServices/ComTypes/ITypeComp.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Runtime.InteropServices.ComTypes { public enum DESCKIND diff --git a/src/Common/src/CoreLib/System/Runtime/InteropServices/ComTypes/ITypeInfo.cs b/src/Common/src/CoreLib/System/Runtime/InteropServices/ComTypes/ITypeInfo.cs index a48d38d092a8..732f9403b35b 100644 --- a/src/Common/src/CoreLib/System/Runtime/InteropServices/ComTypes/ITypeInfo.cs +++ b/src/Common/src/CoreLib/System/Runtime/InteropServices/ComTypes/ITypeInfo.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Runtime.InteropServices.ComTypes { public enum TYPEKIND diff --git a/src/Common/src/CoreLib/System/Runtime/InteropServices/ComTypes/ITypeInfo2.cs b/src/Common/src/CoreLib/System/Runtime/InteropServices/ComTypes/ITypeInfo2.cs index e8918f52833f..e322f8a4f869 100644 --- a/src/Common/src/CoreLib/System/Runtime/InteropServices/ComTypes/ITypeInfo2.cs +++ b/src/Common/src/CoreLib/System/Runtime/InteropServices/ComTypes/ITypeInfo2.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Runtime.InteropServices.ComTypes { [Guid("00020412-0000-0000-C000-000000000046")] diff --git a/src/Common/src/CoreLib/System/Runtime/InteropServices/ComTypes/ITypeLib.cs b/src/Common/src/CoreLib/System/Runtime/InteropServices/ComTypes/ITypeLib.cs index 4e390c28ce56..6cab58e117dc 100644 --- a/src/Common/src/CoreLib/System/Runtime/InteropServices/ComTypes/ITypeLib.cs +++ b/src/Common/src/CoreLib/System/Runtime/InteropServices/ComTypes/ITypeLib.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Runtime.InteropServices.ComTypes { public enum SYSKIND diff --git a/src/Common/src/CoreLib/System/Runtime/InteropServices/ComTypes/ITypeLib2.cs b/src/Common/src/CoreLib/System/Runtime/InteropServices/ComTypes/ITypeLib2.cs index ba0d8f9f63f9..61703d1cfe36 100644 --- a/src/Common/src/CoreLib/System/Runtime/InteropServices/ComTypes/ITypeLib2.cs +++ b/src/Common/src/CoreLib/System/Runtime/InteropServices/ComTypes/ITypeLib2.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Runtime.InteropServices.ComTypes { [Guid("00020411-0000-0000-C000-000000000046")] diff --git a/src/Common/src/CoreLib/System/Runtime/InteropServices/ComVisibleAttribute.cs b/src/Common/src/CoreLib/System/Runtime/InteropServices/ComVisibleAttribute.cs index 3f9673f7ebf7..84b9505a5a47 100644 --- a/src/Common/src/CoreLib/System/Runtime/InteropServices/ComVisibleAttribute.cs +++ b/src/Common/src/CoreLib/System/Runtime/InteropServices/ComVisibleAttribute.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Runtime.InteropServices { [AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Interface | AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Delegate | AttributeTargets.Enum | AttributeTargets.Field | AttributeTargets.Method | AttributeTargets.Property, Inherited = false)] diff --git a/src/Common/src/CoreLib/System/Runtime/InteropServices/CriticalHandle.cs b/src/Common/src/CoreLib/System/Runtime/InteropServices/CriticalHandle.cs index 8048d7919ed7..7b8c4625e39b 100644 --- a/src/Common/src/CoreLib/System/Runtime/InteropServices/CriticalHandle.cs +++ b/src/Common/src/CoreLib/System/Runtime/InteropServices/CriticalHandle.cs @@ -45,7 +45,6 @@ ** ===========================================================*/ -#nullable enable using System.Runtime.ConstrainedExecution; /* diff --git a/src/Common/src/CoreLib/System/Runtime/InteropServices/CurrencyWrapper.cs b/src/Common/src/CoreLib/System/Runtime/InteropServices/CurrencyWrapper.cs index 7ea8a2370f8d..373f9bb9c5ea 100644 --- a/src/Common/src/CoreLib/System/Runtime/InteropServices/CurrencyWrapper.cs +++ b/src/Common/src/CoreLib/System/Runtime/InteropServices/CurrencyWrapper.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Runtime.InteropServices { // Wrapper that is converted to a variant with VT_CURRENCY. diff --git a/src/Common/src/CoreLib/System/Runtime/InteropServices/DefaultCharSetAttribute.cs b/src/Common/src/CoreLib/System/Runtime/InteropServices/DefaultCharSetAttribute.cs index cfddfb1d78bf..7a486f7017b7 100644 --- a/src/Common/src/CoreLib/System/Runtime/InteropServices/DefaultCharSetAttribute.cs +++ b/src/Common/src/CoreLib/System/Runtime/InteropServices/DefaultCharSetAttribute.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Runtime.InteropServices { [AttributeUsage(AttributeTargets.Module, Inherited = false)] diff --git a/src/Common/src/CoreLib/System/Runtime/InteropServices/DefaultDllImportSearchPathsAttribute.cs b/src/Common/src/CoreLib/System/Runtime/InteropServices/DefaultDllImportSearchPathsAttribute.cs index 1dc184d0106f..1ff27fbbd557 100644 --- a/src/Common/src/CoreLib/System/Runtime/InteropServices/DefaultDllImportSearchPathsAttribute.cs +++ b/src/Common/src/CoreLib/System/Runtime/InteropServices/DefaultDllImportSearchPathsAttribute.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Runtime.InteropServices { [AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Method, AllowMultiple = false)] diff --git a/src/Common/src/CoreLib/System/Runtime/InteropServices/DefaultParameterValueAttribute.cs b/src/Common/src/CoreLib/System/Runtime/InteropServices/DefaultParameterValueAttribute.cs index bc405bca2e29..e3c3ae275bce 100644 --- a/src/Common/src/CoreLib/System/Runtime/InteropServices/DefaultParameterValueAttribute.cs +++ b/src/Common/src/CoreLib/System/Runtime/InteropServices/DefaultParameterValueAttribute.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Runtime.InteropServices { // diff --git a/src/Common/src/CoreLib/System/Runtime/InteropServices/DispIdAttribute.cs b/src/Common/src/CoreLib/System/Runtime/InteropServices/DispIdAttribute.cs index e49cf7705321..1f147280c5c5 100644 --- a/src/Common/src/CoreLib/System/Runtime/InteropServices/DispIdAttribute.cs +++ b/src/Common/src/CoreLib/System/Runtime/InteropServices/DispIdAttribute.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Runtime.InteropServices { [AttributeUsage(AttributeTargets.Method | AttributeTargets.Field | AttributeTargets.Property | AttributeTargets.Event, Inherited = false)] diff --git a/src/Common/src/CoreLib/System/Runtime/InteropServices/DispatchWrapper.cs b/src/Common/src/CoreLib/System/Runtime/InteropServices/DispatchWrapper.cs index 1378347b6015..3bb1507203c8 100644 --- a/src/Common/src/CoreLib/System/Runtime/InteropServices/DispatchWrapper.cs +++ b/src/Common/src/CoreLib/System/Runtime/InteropServices/DispatchWrapper.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Runtime.InteropServices { // Wrapper that is converted to a variant with VT_DISPATCH diff --git a/src/Common/src/CoreLib/System/Runtime/InteropServices/DllImportAttribute.cs b/src/Common/src/CoreLib/System/Runtime/InteropServices/DllImportAttribute.cs index b18990bb095c..11e3deb21c35 100644 --- a/src/Common/src/CoreLib/System/Runtime/InteropServices/DllImportAttribute.cs +++ b/src/Common/src/CoreLib/System/Runtime/InteropServices/DllImportAttribute.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Runtime.InteropServices { [AttributeUsage(AttributeTargets.Method, Inherited = false)] diff --git a/src/Common/src/CoreLib/System/Runtime/InteropServices/ErrorWrapper.cs b/src/Common/src/CoreLib/System/Runtime/InteropServices/ErrorWrapper.cs index a68d6a3d171b..d25f0231a448 100644 --- a/src/Common/src/CoreLib/System/Runtime/InteropServices/ErrorWrapper.cs +++ b/src/Common/src/CoreLib/System/Runtime/InteropServices/ErrorWrapper.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Runtime.InteropServices { // Wrapper that is converted to a variant with VT_ERROR. diff --git a/src/Common/src/CoreLib/System/Runtime/InteropServices/ExternalException.cs b/src/Common/src/CoreLib/System/Runtime/InteropServices/ExternalException.cs index 0ac83759ded2..d587d820a7b7 100644 --- a/src/Common/src/CoreLib/System/Runtime/InteropServices/ExternalException.cs +++ b/src/Common/src/CoreLib/System/Runtime/InteropServices/ExternalException.cs @@ -12,7 +12,6 @@ ** =============================================================================*/ -#nullable enable using System.Globalization; using System.Runtime.Serialization; diff --git a/src/Common/src/CoreLib/System/Runtime/InteropServices/FieldOffsetAttribute.cs b/src/Common/src/CoreLib/System/Runtime/InteropServices/FieldOffsetAttribute.cs index 73f7c85faf8f..27e1097749f4 100644 --- a/src/Common/src/CoreLib/System/Runtime/InteropServices/FieldOffsetAttribute.cs +++ b/src/Common/src/CoreLib/System/Runtime/InteropServices/FieldOffsetAttribute.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Runtime.InteropServices { [AttributeUsage(AttributeTargets.Field, Inherited = false)] diff --git a/src/Common/src/CoreLib/System/Runtime/InteropServices/GCHandle.cs b/src/Common/src/CoreLib/System/Runtime/InteropServices/GCHandle.cs index 4418b3742cb6..15fa3e92348d 100644 --- a/src/Common/src/CoreLib/System/Runtime/InteropServices/GCHandle.cs +++ b/src/Common/src/CoreLib/System/Runtime/InteropServices/GCHandle.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; using System.Runtime.CompilerServices; using System.Threading; diff --git a/src/Common/src/CoreLib/System/Runtime/InteropServices/GuidAttribute.cs b/src/Common/src/CoreLib/System/Runtime/InteropServices/GuidAttribute.cs index dd8f6920764c..cf60b9bf70a3 100644 --- a/src/Common/src/CoreLib/System/Runtime/InteropServices/GuidAttribute.cs +++ b/src/Common/src/CoreLib/System/Runtime/InteropServices/GuidAttribute.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Runtime.InteropServices { [AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Interface | AttributeTargets.Class | AttributeTargets.Enum | AttributeTargets.Struct | AttributeTargets.Delegate, Inherited = false)] diff --git a/src/Common/src/CoreLib/System/Runtime/InteropServices/HandleRef.cs b/src/Common/src/CoreLib/System/Runtime/InteropServices/HandleRef.cs index 8ba7c41c8c6b..fa3208a59d79 100644 --- a/src/Common/src/CoreLib/System/Runtime/InteropServices/HandleRef.cs +++ b/src/Common/src/CoreLib/System/Runtime/InteropServices/HandleRef.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Runtime.InteropServices { public readonly struct HandleRef diff --git a/src/Common/src/CoreLib/System/Runtime/InteropServices/ICustomAdapter.cs b/src/Common/src/CoreLib/System/Runtime/InteropServices/ICustomAdapter.cs index 7a7a235d9ac8..6dd90e2dace4 100644 --- a/src/Common/src/CoreLib/System/Runtime/InteropServices/ICustomAdapter.cs +++ b/src/Common/src/CoreLib/System/Runtime/InteropServices/ICustomAdapter.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Runtime.InteropServices { // This the base interface that custom adapters can chose to implement when they want to expose the underlying object. diff --git a/src/Common/src/CoreLib/System/Runtime/InteropServices/ICustomFactory.cs b/src/Common/src/CoreLib/System/Runtime/InteropServices/ICustomFactory.cs index 41d4f6840e8d..799db6a2d3a6 100644 --- a/src/Common/src/CoreLib/System/Runtime/InteropServices/ICustomFactory.cs +++ b/src/Common/src/CoreLib/System/Runtime/InteropServices/ICustomFactory.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Runtime.InteropServices { public interface ICustomFactory diff --git a/src/Common/src/CoreLib/System/Runtime/InteropServices/ICustomMarshaler.cs b/src/Common/src/CoreLib/System/Runtime/InteropServices/ICustomMarshaler.cs index 6a5f5d89d3bc..cf442d4fde1f 100644 --- a/src/Common/src/CoreLib/System/Runtime/InteropServices/ICustomMarshaler.cs +++ b/src/Common/src/CoreLib/System/Runtime/InteropServices/ICustomMarshaler.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Runtime.InteropServices { // This the base interface that must be implemented by all custom marshalers. diff --git a/src/Common/src/CoreLib/System/Runtime/InteropServices/ICustomQueryInterface.cs b/src/Common/src/CoreLib/System/Runtime/InteropServices/ICustomQueryInterface.cs index 439fea4bb5de..a91fd7f5fbb7 100644 --- a/src/Common/src/CoreLib/System/Runtime/InteropServices/ICustomQueryInterface.cs +++ b/src/Common/src/CoreLib/System/Runtime/InteropServices/ICustomQueryInterface.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Runtime.InteropServices { // This the interface that be implemented by class that want to customize the behavior of QueryInterface. diff --git a/src/Common/src/CoreLib/System/Runtime/InteropServices/InAttribute.cs b/src/Common/src/CoreLib/System/Runtime/InteropServices/InAttribute.cs index f7da173ad3b8..39f5a958bc85 100644 --- a/src/Common/src/CoreLib/System/Runtime/InteropServices/InAttribute.cs +++ b/src/Common/src/CoreLib/System/Runtime/InteropServices/InAttribute.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Runtime.InteropServices { [AttributeUsage(AttributeTargets.Parameter, Inherited = false)] diff --git a/src/Common/src/CoreLib/System/Runtime/InteropServices/InterfaceTypeAttribute.cs b/src/Common/src/CoreLib/System/Runtime/InteropServices/InterfaceTypeAttribute.cs index 3ed8321dc72f..695faa793784 100644 --- a/src/Common/src/CoreLib/System/Runtime/InteropServices/InterfaceTypeAttribute.cs +++ b/src/Common/src/CoreLib/System/Runtime/InteropServices/InterfaceTypeAttribute.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Runtime.InteropServices { [AttributeUsage(AttributeTargets.Interface, Inherited = false)] diff --git a/src/Common/src/CoreLib/System/Runtime/InteropServices/InvalidComObjectException.cs b/src/Common/src/CoreLib/System/Runtime/InteropServices/InvalidComObjectException.cs index c2820f48ce97..5bc16e54b74b 100644 --- a/src/Common/src/CoreLib/System/Runtime/InteropServices/InvalidComObjectException.cs +++ b/src/Common/src/CoreLib/System/Runtime/InteropServices/InvalidComObjectException.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.Serialization; namespace System.Runtime.InteropServices diff --git a/src/Common/src/CoreLib/System/Runtime/InteropServices/InvalidOleVariantTypeException.cs b/src/Common/src/CoreLib/System/Runtime/InteropServices/InvalidOleVariantTypeException.cs index cde7b5d218e0..e5aedb000f9f 100644 --- a/src/Common/src/CoreLib/System/Runtime/InteropServices/InvalidOleVariantTypeException.cs +++ b/src/Common/src/CoreLib/System/Runtime/InteropServices/InvalidOleVariantTypeException.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.Serialization; namespace System.Runtime.InteropServices diff --git a/src/Common/src/CoreLib/System/Runtime/InteropServices/LCIDConversionAttribute.cs b/src/Common/src/CoreLib/System/Runtime/InteropServices/LCIDConversionAttribute.cs index 87424e11889e..75f8fcfc9149 100644 --- a/src/Common/src/CoreLib/System/Runtime/InteropServices/LCIDConversionAttribute.cs +++ b/src/Common/src/CoreLib/System/Runtime/InteropServices/LCIDConversionAttribute.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Runtime.InteropServices { [AttributeUsage(AttributeTargets.Method, Inherited = false)] diff --git a/src/Common/src/CoreLib/System/Runtime/InteropServices/Marshal.NoCom.cs b/src/Common/src/CoreLib/System/Runtime/InteropServices/Marshal.NoCom.cs index bab7d3454e34..896312f95ad3 100644 --- a/src/Common/src/CoreLib/System/Runtime/InteropServices/Marshal.NoCom.cs +++ b/src/Common/src/CoreLib/System/Runtime/InteropServices/Marshal.NoCom.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Reflection; using System.Runtime.InteropServices.ComTypes; diff --git a/src/Common/src/CoreLib/System/Runtime/InteropServices/Marshal.Unix.cs b/src/Common/src/CoreLib/System/Runtime/InteropServices/Marshal.Unix.cs index fbcc06626554..f4634fdab334 100644 --- a/src/Common/src/CoreLib/System/Runtime/InteropServices/Marshal.Unix.cs +++ b/src/Common/src/CoreLib/System/Runtime/InteropServices/Marshal.Unix.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; using System.Text; diff --git a/src/Common/src/CoreLib/System/Runtime/InteropServices/Marshal.Windows.cs b/src/Common/src/CoreLib/System/Runtime/InteropServices/Marshal.Windows.cs index 999624787e89..a7ee8b3548da 100644 --- a/src/Common/src/CoreLib/System/Runtime/InteropServices/Marshal.Windows.cs +++ b/src/Common/src/CoreLib/System/Runtime/InteropServices/Marshal.Windows.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; namespace System.Runtime.InteropServices diff --git a/src/Common/src/CoreLib/System/Runtime/InteropServices/Marshal.cs b/src/Common/src/CoreLib/System/Runtime/InteropServices/Marshal.cs index afe298e0b3b1..683468559fff 100644 --- a/src/Common/src/CoreLib/System/Runtime/InteropServices/Marshal.cs +++ b/src/Common/src/CoreLib/System/Runtime/InteropServices/Marshal.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Security; using System.Reflection; using System.Runtime.CompilerServices; diff --git a/src/Common/src/CoreLib/System/Runtime/InteropServices/MarshalAsAttribute.cs b/src/Common/src/CoreLib/System/Runtime/InteropServices/MarshalAsAttribute.cs index bf8bc04e4ba4..ae142a4323d5 100644 --- a/src/Common/src/CoreLib/System/Runtime/InteropServices/MarshalAsAttribute.cs +++ b/src/Common/src/CoreLib/System/Runtime/InteropServices/MarshalAsAttribute.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Runtime.InteropServices { [AttributeUsage(AttributeTargets.Parameter | AttributeTargets.Field | AttributeTargets.ReturnValue, Inherited = false)] diff --git a/src/Common/src/CoreLib/System/Runtime/InteropServices/MarshalDirectiveException.cs b/src/Common/src/CoreLib/System/Runtime/InteropServices/MarshalDirectiveException.cs index b827ee334436..1baae38e965f 100644 --- a/src/Common/src/CoreLib/System/Runtime/InteropServices/MarshalDirectiveException.cs +++ b/src/Common/src/CoreLib/System/Runtime/InteropServices/MarshalDirectiveException.cs @@ -11,7 +11,6 @@ ** =============================================================================*/ -#nullable enable using System.Runtime.Serialization; namespace System.Runtime.InteropServices diff --git a/src/Common/src/CoreLib/System/Runtime/InteropServices/MemoryMarshal.Fast.cs b/src/Common/src/CoreLib/System/Runtime/InteropServices/MemoryMarshal.Fast.cs index e653fc6d3613..e3cf0a84e248 100644 --- a/src/Common/src/CoreLib/System/Runtime/InteropServices/MemoryMarshal.Fast.cs +++ b/src/Common/src/CoreLib/System/Runtime/InteropServices/MemoryMarshal.Fast.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.CompilerServices; using Internal.Runtime.CompilerServices; diff --git a/src/Common/src/CoreLib/System/Runtime/InteropServices/MemoryMarshal.cs b/src/Common/src/CoreLib/System/Runtime/InteropServices/MemoryMarshal.cs index 0ddbdb26583b..6816d3c53183 100644 --- a/src/Common/src/CoreLib/System/Runtime/InteropServices/MemoryMarshal.cs +++ b/src/Common/src/CoreLib/System/Runtime/InteropServices/MemoryMarshal.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Buffers; using System.Runtime.CompilerServices; using System.Collections.Generic; diff --git a/src/Common/src/CoreLib/System/Runtime/InteropServices/NativeCallableAttribute.cs b/src/Common/src/CoreLib/System/Runtime/InteropServices/NativeCallableAttribute.cs index f6b151ebf5fb..5fa60f460f8b 100644 --- a/src/Common/src/CoreLib/System/Runtime/InteropServices/NativeCallableAttribute.cs +++ b/src/Common/src/CoreLib/System/Runtime/InteropServices/NativeCallableAttribute.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Runtime.InteropServices { /// diff --git a/src/Common/src/CoreLib/System/Runtime/InteropServices/NativeLibrary.cs b/src/Common/src/CoreLib/System/Runtime/InteropServices/NativeLibrary.cs index 8c410242cf6c..b50a2e6918d7 100644 --- a/src/Common/src/CoreLib/System/Runtime/InteropServices/NativeLibrary.cs +++ b/src/Common/src/CoreLib/System/Runtime/InteropServices/NativeLibrary.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Reflection; using System.Runtime.CompilerServices; using System.Threading; diff --git a/src/Common/src/CoreLib/System/Runtime/InteropServices/OptionalAttribute.cs b/src/Common/src/CoreLib/System/Runtime/InteropServices/OptionalAttribute.cs index 93ff349c3c9a..5ac75d7b3e95 100644 --- a/src/Common/src/CoreLib/System/Runtime/InteropServices/OptionalAttribute.cs +++ b/src/Common/src/CoreLib/System/Runtime/InteropServices/OptionalAttribute.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Runtime.InteropServices { [AttributeUsage(AttributeTargets.Parameter, Inherited = false)] diff --git a/src/Common/src/CoreLib/System/Runtime/InteropServices/OutAttribute.cs b/src/Common/src/CoreLib/System/Runtime/InteropServices/OutAttribute.cs index 841ffb3e5b53..338ceac91e13 100644 --- a/src/Common/src/CoreLib/System/Runtime/InteropServices/OutAttribute.cs +++ b/src/Common/src/CoreLib/System/Runtime/InteropServices/OutAttribute.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Runtime.InteropServices { [AttributeUsage(AttributeTargets.Parameter, Inherited = false)] diff --git a/src/Common/src/CoreLib/System/Runtime/InteropServices/PreserveSigAttribute.cs b/src/Common/src/CoreLib/System/Runtime/InteropServices/PreserveSigAttribute.cs index 50c066bbedff..464e1abcbeba 100644 --- a/src/Common/src/CoreLib/System/Runtime/InteropServices/PreserveSigAttribute.cs +++ b/src/Common/src/CoreLib/System/Runtime/InteropServices/PreserveSigAttribute.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Runtime.InteropServices { [AttributeUsage(AttributeTargets.Method, Inherited = false)] diff --git a/src/Common/src/CoreLib/System/Runtime/InteropServices/ProgIdAttribute.cs b/src/Common/src/CoreLib/System/Runtime/InteropServices/ProgIdAttribute.cs index 55476dac6cd2..bc4bd18bb1b4 100644 --- a/src/Common/src/CoreLib/System/Runtime/InteropServices/ProgIdAttribute.cs +++ b/src/Common/src/CoreLib/System/Runtime/InteropServices/ProgIdAttribute.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Runtime.InteropServices { [AttributeUsage(AttributeTargets.Class, Inherited = false)] diff --git a/src/Common/src/CoreLib/System/Runtime/InteropServices/SEHException.cs b/src/Common/src/CoreLib/System/Runtime/InteropServices/SEHException.cs index dd7b615db23b..48d4115a623c 100644 --- a/src/Common/src/CoreLib/System/Runtime/InteropServices/SEHException.cs +++ b/src/Common/src/CoreLib/System/Runtime/InteropServices/SEHException.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.Serialization; namespace System.Runtime.InteropServices diff --git a/src/Common/src/CoreLib/System/Runtime/InteropServices/SafeArrayRankMismatchException.cs b/src/Common/src/CoreLib/System/Runtime/InteropServices/SafeArrayRankMismatchException.cs index 98e4dcb2bf4e..1bd3fdd9f3d0 100644 --- a/src/Common/src/CoreLib/System/Runtime/InteropServices/SafeArrayRankMismatchException.cs +++ b/src/Common/src/CoreLib/System/Runtime/InteropServices/SafeArrayRankMismatchException.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.Serialization; namespace System.Runtime.InteropServices diff --git a/src/Common/src/CoreLib/System/Runtime/InteropServices/SafeArrayTypeMismatchException.cs b/src/Common/src/CoreLib/System/Runtime/InteropServices/SafeArrayTypeMismatchException.cs index 58bb3f87bbf1..2cb1fc475aec 100644 --- a/src/Common/src/CoreLib/System/Runtime/InteropServices/SafeArrayTypeMismatchException.cs +++ b/src/Common/src/CoreLib/System/Runtime/InteropServices/SafeArrayTypeMismatchException.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.Serialization; namespace System.Runtime.InteropServices diff --git a/src/Common/src/CoreLib/System/Runtime/InteropServices/SafeBuffer.cs b/src/Common/src/CoreLib/System/Runtime/InteropServices/SafeBuffer.cs index 41b1bad7b007..d55f35d16940 100644 --- a/src/Common/src/CoreLib/System/Runtime/InteropServices/SafeBuffer.cs +++ b/src/Common/src/CoreLib/System/Runtime/InteropServices/SafeBuffer.cs @@ -65,7 +65,6 @@ // static variable (perhaps using Interlocked.CompareExchange). Of course, // assignments in a static class constructor are under a lock implicitly. -#nullable enable using System.Runtime.CompilerServices; using Internal.Runtime.CompilerServices; using Microsoft.Win32.SafeHandles; diff --git a/src/Common/src/CoreLib/System/Runtime/InteropServices/SafeHandle.cs b/src/Common/src/CoreLib/System/Runtime/InteropServices/SafeHandle.cs index b0a7c02bd63a..72c8f66abf20 100644 --- a/src/Common/src/CoreLib/System/Runtime/InteropServices/SafeHandle.cs +++ b/src/Common/src/CoreLib/System/Runtime/InteropServices/SafeHandle.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.Runtime.ConstrainedExecution; diff --git a/src/Common/src/CoreLib/System/Runtime/InteropServices/StructLayoutAttribute.cs b/src/Common/src/CoreLib/System/Runtime/InteropServices/StructLayoutAttribute.cs index 216ed59abc98..c4cce9956e1d 100644 --- a/src/Common/src/CoreLib/System/Runtime/InteropServices/StructLayoutAttribute.cs +++ b/src/Common/src/CoreLib/System/Runtime/InteropServices/StructLayoutAttribute.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Runtime.InteropServices { [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct, Inherited = false)] diff --git a/src/Common/src/CoreLib/System/Runtime/InteropServices/TypeIdentifierAttribute.cs b/src/Common/src/CoreLib/System/Runtime/InteropServices/TypeIdentifierAttribute.cs index 16fa15649094..73069f365493 100644 --- a/src/Common/src/CoreLib/System/Runtime/InteropServices/TypeIdentifierAttribute.cs +++ b/src/Common/src/CoreLib/System/Runtime/InteropServices/TypeIdentifierAttribute.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Runtime.InteropServices { [AttributeUsage(AttributeTargets.Interface | AttributeTargets.Enum | AttributeTargets.Struct | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)] diff --git a/src/Common/src/CoreLib/System/Runtime/InteropServices/UnknownWrapper.cs b/src/Common/src/CoreLib/System/Runtime/InteropServices/UnknownWrapper.cs index 22dca1c021df..3581ca93a511 100644 --- a/src/Common/src/CoreLib/System/Runtime/InteropServices/UnknownWrapper.cs +++ b/src/Common/src/CoreLib/System/Runtime/InteropServices/UnknownWrapper.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Runtime.InteropServices { // Wrapper that is converted to a variant with VT_UNKNOWN. diff --git a/src/Common/src/CoreLib/System/Runtime/InteropServices/UnmanagedFunctionPointerAttribute.cs b/src/Common/src/CoreLib/System/Runtime/InteropServices/UnmanagedFunctionPointerAttribute.cs index f5edd8309a15..c4f96903ee2c 100644 --- a/src/Common/src/CoreLib/System/Runtime/InteropServices/UnmanagedFunctionPointerAttribute.cs +++ b/src/Common/src/CoreLib/System/Runtime/InteropServices/UnmanagedFunctionPointerAttribute.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Runtime.InteropServices { [AttributeUsage(AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)] diff --git a/src/Common/src/CoreLib/System/Runtime/InteropServices/VariantWrapper.cs b/src/Common/src/CoreLib/System/Runtime/InteropServices/VariantWrapper.cs index f93a16374c7f..74054d5dc9e8 100644 --- a/src/Common/src/CoreLib/System/Runtime/InteropServices/VariantWrapper.cs +++ b/src/Common/src/CoreLib/System/Runtime/InteropServices/VariantWrapper.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Runtime.InteropServices { // Wrapper that is converted to a variant with VT_BYREF | VT_VARIANT. diff --git a/src/Common/src/CoreLib/System/Runtime/InteropServices/WindowsRuntime/EventRegistrationToken.cs b/src/Common/src/CoreLib/System/Runtime/InteropServices/WindowsRuntime/EventRegistrationToken.cs index a6415f68ca28..15b4a8302e12 100644 --- a/src/Common/src/CoreLib/System/Runtime/InteropServices/WindowsRuntime/EventRegistrationToken.cs +++ b/src/Common/src/CoreLib/System/Runtime/InteropServices/WindowsRuntime/EventRegistrationToken.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Runtime.InteropServices.WindowsRuntime { // Event registration tokens are 64 bit opaque structures returned from WinRT style event adders, in order diff --git a/src/Common/src/CoreLib/System/Runtime/Intrinsics/Arm/Arm64/Aes.PlatformNotSupported.cs b/src/Common/src/CoreLib/System/Runtime/Intrinsics/Arm/Arm64/Aes.PlatformNotSupported.cs index 086589389f3a..631228719ab7 100644 --- a/src/Common/src/CoreLib/System/Runtime/Intrinsics/Arm/Arm64/Aes.PlatformNotSupported.cs +++ b/src/Common/src/CoreLib/System/Runtime/Intrinsics/Arm/Arm64/Aes.PlatformNotSupported.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.CompilerServices; using System.Runtime.Intrinsics; diff --git a/src/Common/src/CoreLib/System/Runtime/Intrinsics/Arm/Arm64/Aes.cs b/src/Common/src/CoreLib/System/Runtime/Intrinsics/Arm/Arm64/Aes.cs index 02829e4f994b..c4f2dc078f02 100644 --- a/src/Common/src/CoreLib/System/Runtime/Intrinsics/Arm/Arm64/Aes.cs +++ b/src/Common/src/CoreLib/System/Runtime/Intrinsics/Arm/Arm64/Aes.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.CompilerServices; using System.Runtime.Intrinsics; diff --git a/src/Common/src/CoreLib/System/Runtime/Intrinsics/Arm/Arm64/Base.PlatformNotSupported.cs b/src/Common/src/CoreLib/System/Runtime/Intrinsics/Arm/Arm64/Base.PlatformNotSupported.cs index 99fabb0a6a97..338c3249a7f9 100644 --- a/src/Common/src/CoreLib/System/Runtime/Intrinsics/Arm/Arm64/Base.PlatformNotSupported.cs +++ b/src/Common/src/CoreLib/System/Runtime/Intrinsics/Arm/Arm64/Base.PlatformNotSupported.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.CompilerServices; using System.Runtime.Intrinsics; diff --git a/src/Common/src/CoreLib/System/Runtime/Intrinsics/Arm/Arm64/Base.cs b/src/Common/src/CoreLib/System/Runtime/Intrinsics/Arm/Arm64/Base.cs index 3361fbe96f4f..c993c411d5c5 100644 --- a/src/Common/src/CoreLib/System/Runtime/Intrinsics/Arm/Arm64/Base.cs +++ b/src/Common/src/CoreLib/System/Runtime/Intrinsics/Arm/Arm64/Base.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.CompilerServices; using System.Runtime.Intrinsics; diff --git a/src/Common/src/CoreLib/System/Runtime/Intrinsics/Arm/Arm64/Sha1.PlatformNotSupported.cs b/src/Common/src/CoreLib/System/Runtime/Intrinsics/Arm/Arm64/Sha1.PlatformNotSupported.cs index 61474ea3826f..91ec5164cd8e 100644 --- a/src/Common/src/CoreLib/System/Runtime/Intrinsics/Arm/Arm64/Sha1.PlatformNotSupported.cs +++ b/src/Common/src/CoreLib/System/Runtime/Intrinsics/Arm/Arm64/Sha1.PlatformNotSupported.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.CompilerServices; using System.Runtime.Intrinsics; diff --git a/src/Common/src/CoreLib/System/Runtime/Intrinsics/Arm/Arm64/Sha1.cs b/src/Common/src/CoreLib/System/Runtime/Intrinsics/Arm/Arm64/Sha1.cs index 0c738e02476c..a6c190114259 100644 --- a/src/Common/src/CoreLib/System/Runtime/Intrinsics/Arm/Arm64/Sha1.cs +++ b/src/Common/src/CoreLib/System/Runtime/Intrinsics/Arm/Arm64/Sha1.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.CompilerServices; using System.Runtime.Intrinsics; diff --git a/src/Common/src/CoreLib/System/Runtime/Intrinsics/Arm/Arm64/Sha256.PlatformNotSupported.cs b/src/Common/src/CoreLib/System/Runtime/Intrinsics/Arm/Arm64/Sha256.PlatformNotSupported.cs index 2fbaf05eda84..f18d8bcd49a8 100644 --- a/src/Common/src/CoreLib/System/Runtime/Intrinsics/Arm/Arm64/Sha256.PlatformNotSupported.cs +++ b/src/Common/src/CoreLib/System/Runtime/Intrinsics/Arm/Arm64/Sha256.PlatformNotSupported.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.CompilerServices; using System.Runtime.Intrinsics; diff --git a/src/Common/src/CoreLib/System/Runtime/Intrinsics/Arm/Arm64/Sha256.cs b/src/Common/src/CoreLib/System/Runtime/Intrinsics/Arm/Arm64/Sha256.cs index 23007b405db5..4b4b16dff5e1 100644 --- a/src/Common/src/CoreLib/System/Runtime/Intrinsics/Arm/Arm64/Sha256.cs +++ b/src/Common/src/CoreLib/System/Runtime/Intrinsics/Arm/Arm64/Sha256.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.CompilerServices; using System.Runtime.Intrinsics; diff --git a/src/Common/src/CoreLib/System/Runtime/Intrinsics/Arm/Arm64/Simd.PlatformNotSupported.cs b/src/Common/src/CoreLib/System/Runtime/Intrinsics/Arm/Arm64/Simd.PlatformNotSupported.cs index e7184b5739f6..0d100c87012c 100644 --- a/src/Common/src/CoreLib/System/Runtime/Intrinsics/Arm/Arm64/Simd.PlatformNotSupported.cs +++ b/src/Common/src/CoreLib/System/Runtime/Intrinsics/Arm/Arm64/Simd.PlatformNotSupported.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.CompilerServices; using System.Runtime.Intrinsics; diff --git a/src/Common/src/CoreLib/System/Runtime/Intrinsics/Arm/Arm64/Simd.cs b/src/Common/src/CoreLib/System/Runtime/Intrinsics/Arm/Arm64/Simd.cs index 136ea1c71529..c71daf162dfb 100644 --- a/src/Common/src/CoreLib/System/Runtime/Intrinsics/Arm/Arm64/Simd.cs +++ b/src/Common/src/CoreLib/System/Runtime/Intrinsics/Arm/Arm64/Simd.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.CompilerServices; using System.Runtime.Intrinsics; diff --git a/src/Common/src/CoreLib/System/Runtime/Intrinsics/Vector128.cs b/src/Common/src/CoreLib/System/Runtime/Intrinsics/Vector128.cs index 70083395e6f1..4c3232693d14 100644 --- a/src/Common/src/CoreLib/System/Runtime/Intrinsics/Vector128.cs +++ b/src/Common/src/CoreLib/System/Runtime/Intrinsics/Vector128.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.CompilerServices; using System.Runtime.Intrinsics.X86; using Internal.Runtime.CompilerServices; diff --git a/src/Common/src/CoreLib/System/Runtime/Intrinsics/Vector128DebugView_1.cs b/src/Common/src/CoreLib/System/Runtime/Intrinsics/Vector128DebugView_1.cs index 7d5968bd4db2..ccdc655949c6 100644 --- a/src/Common/src/CoreLib/System/Runtime/Intrinsics/Vector128DebugView_1.cs +++ b/src/Common/src/CoreLib/System/Runtime/Intrinsics/Vector128DebugView_1.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using Internal.Runtime.CompilerServices; namespace System.Runtime.Intrinsics diff --git a/src/Common/src/CoreLib/System/Runtime/Intrinsics/Vector128_1.cs b/src/Common/src/CoreLib/System/Runtime/Intrinsics/Vector128_1.cs index 7f837c7fe4f4..cdcddcb49e26 100644 --- a/src/Common/src/CoreLib/System/Runtime/Intrinsics/Vector128_1.cs +++ b/src/Common/src/CoreLib/System/Runtime/Intrinsics/Vector128_1.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; using System.Globalization; using System.Runtime.CompilerServices; diff --git a/src/Common/src/CoreLib/System/Runtime/Intrinsics/Vector256.cs b/src/Common/src/CoreLib/System/Runtime/Intrinsics/Vector256.cs index 116b93a73dd8..adf8207babfb 100644 --- a/src/Common/src/CoreLib/System/Runtime/Intrinsics/Vector256.cs +++ b/src/Common/src/CoreLib/System/Runtime/Intrinsics/Vector256.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.CompilerServices; using System.Runtime.Intrinsics.X86; using Internal.Runtime.CompilerServices; diff --git a/src/Common/src/CoreLib/System/Runtime/Intrinsics/Vector256DebugView_1.cs b/src/Common/src/CoreLib/System/Runtime/Intrinsics/Vector256DebugView_1.cs index 488d6d2a88ca..5131341ad89e 100644 --- a/src/Common/src/CoreLib/System/Runtime/Intrinsics/Vector256DebugView_1.cs +++ b/src/Common/src/CoreLib/System/Runtime/Intrinsics/Vector256DebugView_1.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using Internal.Runtime.CompilerServices; namespace System.Runtime.Intrinsics diff --git a/src/Common/src/CoreLib/System/Runtime/Intrinsics/Vector256_1.cs b/src/Common/src/CoreLib/System/Runtime/Intrinsics/Vector256_1.cs index e0ab5c28bfec..2ed5516455f1 100644 --- a/src/Common/src/CoreLib/System/Runtime/Intrinsics/Vector256_1.cs +++ b/src/Common/src/CoreLib/System/Runtime/Intrinsics/Vector256_1.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; using System.Globalization; using System.Runtime.CompilerServices; diff --git a/src/Common/src/CoreLib/System/Runtime/Intrinsics/Vector64.cs b/src/Common/src/CoreLib/System/Runtime/Intrinsics/Vector64.cs index 30d5c4f6ee34..cb6810a65968 100644 --- a/src/Common/src/CoreLib/System/Runtime/Intrinsics/Vector64.cs +++ b/src/Common/src/CoreLib/System/Runtime/Intrinsics/Vector64.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.CompilerServices; using Internal.Runtime.CompilerServices; diff --git a/src/Common/src/CoreLib/System/Runtime/Intrinsics/Vector64DebugView_1.cs b/src/Common/src/CoreLib/System/Runtime/Intrinsics/Vector64DebugView_1.cs index 8afffca8a1ca..878e29949e38 100644 --- a/src/Common/src/CoreLib/System/Runtime/Intrinsics/Vector64DebugView_1.cs +++ b/src/Common/src/CoreLib/System/Runtime/Intrinsics/Vector64DebugView_1.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using Internal.Runtime.CompilerServices; namespace System.Runtime.Intrinsics diff --git a/src/Common/src/CoreLib/System/Runtime/Intrinsics/Vector64_1.cs b/src/Common/src/CoreLib/System/Runtime/Intrinsics/Vector64_1.cs index 04f26ec77216..7b8f75ad6640 100644 --- a/src/Common/src/CoreLib/System/Runtime/Intrinsics/Vector64_1.cs +++ b/src/Common/src/CoreLib/System/Runtime/Intrinsics/Vector64_1.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; using System.Globalization; using System.Runtime.CompilerServices; diff --git a/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Aes.PlatformNotSupported.cs b/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Aes.PlatformNotSupported.cs index 3d261d7c6698..e587c7c31d11 100644 --- a/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Aes.PlatformNotSupported.cs +++ b/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Aes.PlatformNotSupported.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Runtime.CompilerServices; using System.Runtime.Intrinsics; diff --git a/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Aes.cs b/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Aes.cs index c9a07dd5a2d5..45c028c35824 100644 --- a/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Aes.cs +++ b/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Aes.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Runtime.CompilerServices; using System.Runtime.Intrinsics; diff --git a/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Avx.PlatformNotSupported.cs b/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Avx.PlatformNotSupported.cs index a873913579d9..1a0f2bdd08f5 100644 --- a/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Avx.PlatformNotSupported.cs +++ b/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Avx.PlatformNotSupported.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Runtime.CompilerServices; using System.Runtime.Intrinsics; diff --git a/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Avx.cs b/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Avx.cs index 65e66f43972b..79c97b886dd6 100644 --- a/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Avx.cs +++ b/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Avx.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Runtime.CompilerServices; using System.Runtime.Intrinsics; diff --git a/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Avx2.PlatformNotSupported.cs b/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Avx2.PlatformNotSupported.cs index 2696c866b799..7232d49f898d 100644 --- a/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Avx2.PlatformNotSupported.cs +++ b/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Avx2.PlatformNotSupported.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Runtime.CompilerServices; using System.Runtime.Intrinsics; diff --git a/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Avx2.cs b/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Avx2.cs index 9b6f2a61622c..bf9a72e1d817 100644 --- a/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Avx2.cs +++ b/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Avx2.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Runtime.CompilerServices; using System.Runtime.Intrinsics; diff --git a/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Bmi1.PlatformNotSupported.cs b/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Bmi1.PlatformNotSupported.cs index 62c0dfd89414..204932af2299 100644 --- a/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Bmi1.PlatformNotSupported.cs +++ b/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Bmi1.PlatformNotSupported.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Runtime.CompilerServices; using System.Runtime.Intrinsics; diff --git a/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Bmi1.cs b/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Bmi1.cs index 0f77a1f440be..496b8aede503 100644 --- a/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Bmi1.cs +++ b/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Bmi1.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Runtime.CompilerServices; using System.Runtime.Intrinsics; diff --git a/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Bmi2.PlatformNotSupported.cs b/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Bmi2.PlatformNotSupported.cs index b78494e9c73b..6a6477ba4b11 100644 --- a/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Bmi2.PlatformNotSupported.cs +++ b/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Bmi2.PlatformNotSupported.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Runtime.CompilerServices; using System.Runtime.Intrinsics; diff --git a/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Bmi2.cs b/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Bmi2.cs index 6dd18b1b47f1..9b61441dda51 100644 --- a/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Bmi2.cs +++ b/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Bmi2.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Runtime.CompilerServices; using System.Runtime.Intrinsics; diff --git a/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Enums.cs b/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Enums.cs index 80aa680cc6e3..7098f813ff7f 100644 --- a/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Enums.cs +++ b/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Enums.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Runtime.Intrinsics.X86 { public enum FloatComparisonMode : byte diff --git a/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Fma.PlatformNotSupported.cs b/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Fma.PlatformNotSupported.cs index 760aa40a1753..ba97bbb053d6 100644 --- a/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Fma.PlatformNotSupported.cs +++ b/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Fma.PlatformNotSupported.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Runtime.CompilerServices; using System.Runtime.Intrinsics; diff --git a/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Fma.cs b/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Fma.cs index 917907c3d7f6..ed01805de7b1 100644 --- a/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Fma.cs +++ b/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Fma.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Runtime.CompilerServices; using System.Runtime.Intrinsics; diff --git a/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Lzcnt.PlatformNotSupported.cs b/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Lzcnt.PlatformNotSupported.cs index ce0086506321..43b6712970ab 100644 --- a/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Lzcnt.PlatformNotSupported.cs +++ b/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Lzcnt.PlatformNotSupported.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Runtime.CompilerServices; diff --git a/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Lzcnt.cs b/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Lzcnt.cs index 99d570e04dfd..ff1576e64596 100644 --- a/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Lzcnt.cs +++ b/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Lzcnt.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Runtime.CompilerServices; using System.Runtime.Intrinsics; diff --git a/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Pclmulqdq.PlatformNotSupported.cs b/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Pclmulqdq.PlatformNotSupported.cs index b2b4898d38ec..c32a7e7da2bb 100644 --- a/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Pclmulqdq.PlatformNotSupported.cs +++ b/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Pclmulqdq.PlatformNotSupported.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Runtime.CompilerServices; using System.Runtime.Intrinsics; diff --git a/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Pclmulqdq.cs b/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Pclmulqdq.cs index 682d7f9b2625..332934befc73 100644 --- a/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Pclmulqdq.cs +++ b/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Pclmulqdq.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Runtime.CompilerServices; using System.Runtime.Intrinsics; diff --git a/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Popcnt.PlatformNotSupported.cs b/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Popcnt.PlatformNotSupported.cs index 8fe62a1776eb..d39692432eb7 100644 --- a/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Popcnt.PlatformNotSupported.cs +++ b/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Popcnt.PlatformNotSupported.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Runtime.CompilerServices; diff --git a/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Popcnt.cs b/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Popcnt.cs index 687078e3e792..c262e996712c 100644 --- a/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Popcnt.cs +++ b/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Popcnt.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Runtime.CompilerServices; using System.Runtime.Intrinsics; diff --git a/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Sse.PlatformNotSupported.cs b/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Sse.PlatformNotSupported.cs index 44d7b1fa7947..23532b452978 100644 --- a/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Sse.PlatformNotSupported.cs +++ b/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Sse.PlatformNotSupported.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Runtime.CompilerServices; using System.Runtime.Intrinsics; diff --git a/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Sse.cs b/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Sse.cs index c9c2d7e139e9..0d2ba58dd1e8 100644 --- a/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Sse.cs +++ b/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Sse.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Runtime.CompilerServices; using System.Runtime.Intrinsics; diff --git a/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Sse2.PlatformNotSupported.cs b/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Sse2.PlatformNotSupported.cs index 57b3195e3f1b..6ccf7b0a6c16 100644 --- a/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Sse2.PlatformNotSupported.cs +++ b/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Sse2.PlatformNotSupported.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Runtime.CompilerServices; using System.Runtime.Intrinsics; diff --git a/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Sse2.cs b/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Sse2.cs index 3aff2b4d53a8..4d4de6e30beb 100644 --- a/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Sse2.cs +++ b/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Sse2.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Runtime.CompilerServices; using System.Runtime.Intrinsics; diff --git a/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Sse3.PlatformNotSupported.cs b/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Sse3.PlatformNotSupported.cs index 20bc6ae4cf19..40b810ddd9ef 100644 --- a/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Sse3.PlatformNotSupported.cs +++ b/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Sse3.PlatformNotSupported.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Runtime.CompilerServices; using System.Runtime.Intrinsics; diff --git a/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Sse3.cs b/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Sse3.cs index f7a710b4fc6f..9b971b83b3a0 100644 --- a/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Sse3.cs +++ b/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Sse3.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Runtime.CompilerServices; using System.Runtime.Intrinsics; diff --git a/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Sse41.PlatformNotSupported.cs b/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Sse41.PlatformNotSupported.cs index d9f67bcb6791..423850f3f31b 100644 --- a/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Sse41.PlatformNotSupported.cs +++ b/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Sse41.PlatformNotSupported.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Runtime.CompilerServices; using System.Runtime.Intrinsics; diff --git a/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Sse41.cs b/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Sse41.cs index 8fe0a3cf944f..5616bc97fb19 100644 --- a/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Sse41.cs +++ b/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Sse41.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Runtime.CompilerServices; using System.Runtime.Intrinsics; diff --git a/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Sse42.PlatformNotSupported.cs b/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Sse42.PlatformNotSupported.cs index ac4b45af018d..f07a79272525 100644 --- a/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Sse42.PlatformNotSupported.cs +++ b/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Sse42.PlatformNotSupported.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Runtime.CompilerServices; using System.Runtime.Intrinsics; diff --git a/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Sse42.cs b/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Sse42.cs index a5eafe353228..9db76c8916bf 100644 --- a/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Sse42.cs +++ b/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Sse42.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Runtime.CompilerServices; using System.Runtime.Intrinsics; diff --git a/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Ssse3.PlatformNotSupported.cs b/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Ssse3.PlatformNotSupported.cs index cd66c76161af..37c404b70183 100644 --- a/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Ssse3.PlatformNotSupported.cs +++ b/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Ssse3.PlatformNotSupported.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Runtime.CompilerServices; using System.Runtime.Intrinsics; diff --git a/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Ssse3.cs b/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Ssse3.cs index 27ffab0712e6..0cb59a2115b0 100644 --- a/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Ssse3.cs +++ b/src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Ssse3.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Runtime.CompilerServices; using System.Runtime.Intrinsics; diff --git a/src/Common/src/CoreLib/System/Runtime/Loader/AssemblyLoadContext.cs b/src/Common/src/CoreLib/System/Runtime/Loader/AssemblyLoadContext.cs index 9b7bfb45ed55..7ee3dfac7628 100644 --- a/src/Common/src/CoreLib/System/Runtime/Loader/AssemblyLoadContext.cs +++ b/src/Common/src/CoreLib/System/Runtime/Loader/AssemblyLoadContext.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Collections.Generic; using System.ComponentModel; using System.Diagnostics; diff --git a/src/Common/src/CoreLib/System/Runtime/Loader/LibraryNameVariation.Unix.cs b/src/Common/src/CoreLib/System/Runtime/Loader/LibraryNameVariation.Unix.cs index 4895dc86855a..f83ceae0dee7 100644 --- a/src/Common/src/CoreLib/System/Runtime/Loader/LibraryNameVariation.Unix.cs +++ b/src/Common/src/CoreLib/System/Runtime/Loader/LibraryNameVariation.Unix.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Collections.Generic; using System.IO; diff --git a/src/Common/src/CoreLib/System/Runtime/Loader/LibraryNameVariation.Windows.cs b/src/Common/src/CoreLib/System/Runtime/Loader/LibraryNameVariation.Windows.cs index 99ccb1e55f75..143e246ba06d 100644 --- a/src/Common/src/CoreLib/System/Runtime/Loader/LibraryNameVariation.Windows.cs +++ b/src/Common/src/CoreLib/System/Runtime/Loader/LibraryNameVariation.Windows.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Collections.Generic; namespace System.Runtime.Loader diff --git a/src/Common/src/CoreLib/System/Runtime/Loader/LibraryNameVariation.cs b/src/Common/src/CoreLib/System/Runtime/Loader/LibraryNameVariation.cs index 029e79a19169..2b11f8a9bef6 100644 --- a/src/Common/src/CoreLib/System/Runtime/Loader/LibraryNameVariation.cs +++ b/src/Common/src/CoreLib/System/Runtime/Loader/LibraryNameVariation.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable - namespace System.Runtime.Loader { internal partial struct LibraryNameVariation diff --git a/src/Common/src/CoreLib/System/Runtime/MemoryFailPoint.Unix.cs b/src/Common/src/CoreLib/System/Runtime/MemoryFailPoint.Unix.cs index 37575d0c7b3b..2f5305200198 100644 --- a/src/Common/src/CoreLib/System/Runtime/MemoryFailPoint.Unix.cs +++ b/src/Common/src/CoreLib/System/Runtime/MemoryFailPoint.Unix.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Runtime { public sealed partial class MemoryFailPoint diff --git a/src/Common/src/CoreLib/System/Runtime/MemoryFailPoint.Windows.cs b/src/Common/src/CoreLib/System/Runtime/MemoryFailPoint.Windows.cs index 5ab51a79c30e..966c3a278f38 100644 --- a/src/Common/src/CoreLib/System/Runtime/MemoryFailPoint.Windows.cs +++ b/src/Common/src/CoreLib/System/Runtime/MemoryFailPoint.Windows.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.IO; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/System/Runtime/MemoryFailPoint.cs b/src/Common/src/CoreLib/System/Runtime/MemoryFailPoint.cs index 4e4ed2920281..5209caac65a3 100644 --- a/src/Common/src/CoreLib/System/Runtime/MemoryFailPoint.cs +++ b/src/Common/src/CoreLib/System/Runtime/MemoryFailPoint.cs @@ -13,7 +13,6 @@ ** ===========================================================*/ -#nullable enable using System.Threading; using System.Runtime.CompilerServices; using System.Runtime.ConstrainedExecution; diff --git a/src/Common/src/CoreLib/System/Runtime/Remoting/ObjectHandle.cs b/src/Common/src/CoreLib/System/Runtime/Remoting/ObjectHandle.cs index e53aeb08f231..58e6646d1db9 100644 --- a/src/Common/src/CoreLib/System/Runtime/Remoting/ObjectHandle.cs +++ b/src/Common/src/CoreLib/System/Runtime/Remoting/ObjectHandle.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Runtime.Remoting { public class ObjectHandle : MarshalByRefObject diff --git a/src/Common/src/CoreLib/System/Runtime/Serialization/DeserializationBlockedException.cs b/src/Common/src/CoreLib/System/Runtime/Serialization/DeserializationBlockedException.cs index 82deb7d61414..232dc4da12cd 100644 --- a/src/Common/src/CoreLib/System/Runtime/Serialization/DeserializationBlockedException.cs +++ b/src/Common/src/CoreLib/System/Runtime/Serialization/DeserializationBlockedException.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Runtime.Serialization { // Thrown when a dangerous action would be performed during deserialization diff --git a/src/Common/src/CoreLib/System/Runtime/Serialization/DeserializationToken.cs b/src/Common/src/CoreLib/System/Runtime/Serialization/DeserializationToken.cs index 92e0fcb0b071..2be35a6553f1 100644 --- a/src/Common/src/CoreLib/System/Runtime/Serialization/DeserializationToken.cs +++ b/src/Common/src/CoreLib/System/Runtime/Serialization/DeserializationToken.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Runtime.Serialization { // Tracks whether deserialization is currently in progress diff --git a/src/Common/src/CoreLib/System/Runtime/Serialization/DeserializationTracker.cs b/src/Common/src/CoreLib/System/Runtime/Serialization/DeserializationTracker.cs index 04ea6bdaddcc..1662ee02d4a6 100644 --- a/src/Common/src/CoreLib/System/Runtime/Serialization/DeserializationTracker.cs +++ b/src/Common/src/CoreLib/System/Runtime/Serialization/DeserializationTracker.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Runtime.Serialization { // Tracks whether deserialization is currently in progress diff --git a/src/Common/src/CoreLib/System/Runtime/Serialization/IDeserializationCallback.cs b/src/Common/src/CoreLib/System/Runtime/Serialization/IDeserializationCallback.cs index 67628b464015..a1c1671a8b8b 100644 --- a/src/Common/src/CoreLib/System/Runtime/Serialization/IDeserializationCallback.cs +++ b/src/Common/src/CoreLib/System/Runtime/Serialization/IDeserializationCallback.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Runtime.Serialization { public interface IDeserializationCallback diff --git a/src/Common/src/CoreLib/System/Runtime/Serialization/IFormatterConverter.cs b/src/Common/src/CoreLib/System/Runtime/Serialization/IFormatterConverter.cs index d0e3d81d5b2c..663123b243b4 100644 --- a/src/Common/src/CoreLib/System/Runtime/Serialization/IFormatterConverter.cs +++ b/src/Common/src/CoreLib/System/Runtime/Serialization/IFormatterConverter.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Runtime.Serialization { [CLSCompliant(false)] diff --git a/src/Common/src/CoreLib/System/Runtime/Serialization/IObjectReference.cs b/src/Common/src/CoreLib/System/Runtime/Serialization/IObjectReference.cs index f232cf59fa85..d41bc50dde4e 100644 --- a/src/Common/src/CoreLib/System/Runtime/Serialization/IObjectReference.cs +++ b/src/Common/src/CoreLib/System/Runtime/Serialization/IObjectReference.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Runtime.Serialization { public interface IObjectReference diff --git a/src/Common/src/CoreLib/System/Runtime/Serialization/ISafeSerializationData.cs b/src/Common/src/CoreLib/System/Runtime/Serialization/ISafeSerializationData.cs index f4babe439711..5089d134c314 100644 --- a/src/Common/src/CoreLib/System/Runtime/Serialization/ISafeSerializationData.cs +++ b/src/Common/src/CoreLib/System/Runtime/Serialization/ISafeSerializationData.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Runtime.Serialization { // diff --git a/src/Common/src/CoreLib/System/Runtime/Serialization/ISerializable.cs b/src/Common/src/CoreLib/System/Runtime/Serialization/ISerializable.cs index 8edf62849387..383b3f07af35 100644 --- a/src/Common/src/CoreLib/System/Runtime/Serialization/ISerializable.cs +++ b/src/Common/src/CoreLib/System/Runtime/Serialization/ISerializable.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Runtime.Serialization { public interface ISerializable diff --git a/src/Common/src/CoreLib/System/Runtime/Serialization/OnDeserializedAttribute.cs b/src/Common/src/CoreLib/System/Runtime/Serialization/OnDeserializedAttribute.cs index d3273f467518..408a55ccf9e9 100644 --- a/src/Common/src/CoreLib/System/Runtime/Serialization/OnDeserializedAttribute.cs +++ b/src/Common/src/CoreLib/System/Runtime/Serialization/OnDeserializedAttribute.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Runtime.Serialization { [AttributeUsage(AttributeTargets.Method, Inherited = false)] diff --git a/src/Common/src/CoreLib/System/Runtime/Serialization/OnDeserializingAttribute.cs b/src/Common/src/CoreLib/System/Runtime/Serialization/OnDeserializingAttribute.cs index f2dec85cdf27..162857e8d3b8 100644 --- a/src/Common/src/CoreLib/System/Runtime/Serialization/OnDeserializingAttribute.cs +++ b/src/Common/src/CoreLib/System/Runtime/Serialization/OnDeserializingAttribute.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Runtime.Serialization { [AttributeUsage(AttributeTargets.Method, Inherited = false)] diff --git a/src/Common/src/CoreLib/System/Runtime/Serialization/OnSerializedAttribute.cs b/src/Common/src/CoreLib/System/Runtime/Serialization/OnSerializedAttribute.cs index 2b82dd7e3c01..020dd0257cac 100644 --- a/src/Common/src/CoreLib/System/Runtime/Serialization/OnSerializedAttribute.cs +++ b/src/Common/src/CoreLib/System/Runtime/Serialization/OnSerializedAttribute.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Runtime.Serialization { [AttributeUsage(AttributeTargets.Method, Inherited = false)] diff --git a/src/Common/src/CoreLib/System/Runtime/Serialization/OnSerializingAttribute.cs b/src/Common/src/CoreLib/System/Runtime/Serialization/OnSerializingAttribute.cs index 8c9c8a07a170..8dc8af3f2356 100644 --- a/src/Common/src/CoreLib/System/Runtime/Serialization/OnSerializingAttribute.cs +++ b/src/Common/src/CoreLib/System/Runtime/Serialization/OnSerializingAttribute.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Runtime.Serialization { [AttributeUsage(AttributeTargets.Method, Inherited = false)] diff --git a/src/Common/src/CoreLib/System/Runtime/Serialization/OptionalFieldAttribute.cs b/src/Common/src/CoreLib/System/Runtime/Serialization/OptionalFieldAttribute.cs index 48eca2821862..84daa539be2c 100644 --- a/src/Common/src/CoreLib/System/Runtime/Serialization/OptionalFieldAttribute.cs +++ b/src/Common/src/CoreLib/System/Runtime/Serialization/OptionalFieldAttribute.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Runtime.Serialization { [AttributeUsage(AttributeTargets.Field, Inherited = false)] diff --git a/src/Common/src/CoreLib/System/Runtime/Serialization/SafeSerializationEventArgs.cs b/src/Common/src/CoreLib/System/Runtime/Serialization/SafeSerializationEventArgs.cs index 19870425eac0..896b91fca026 100644 --- a/src/Common/src/CoreLib/System/Runtime/Serialization/SafeSerializationEventArgs.cs +++ b/src/Common/src/CoreLib/System/Runtime/Serialization/SafeSerializationEventArgs.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Collections.Generic; namespace System.Runtime.Serialization diff --git a/src/Common/src/CoreLib/System/Runtime/Serialization/SerializationException.cs b/src/Common/src/CoreLib/System/Runtime/Serialization/SerializationException.cs index 922a11e6ba08..e227d1b74730 100644 --- a/src/Common/src/CoreLib/System/Runtime/Serialization/SerializationException.cs +++ b/src/Common/src/CoreLib/System/Runtime/Serialization/SerializationException.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Runtime.Serialization { [Serializable] diff --git a/src/Common/src/CoreLib/System/Runtime/Serialization/SerializationInfo.cs b/src/Common/src/CoreLib/System/Runtime/Serialization/SerializationInfo.cs index e3e7c930d895..015fb0093b02 100644 --- a/src/Common/src/CoreLib/System/Runtime/Serialization/SerializationInfo.cs +++ b/src/Common/src/CoreLib/System/Runtime/Serialization/SerializationInfo.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Collections.Generic; using System.Diagnostics; using System.Security; diff --git a/src/Common/src/CoreLib/System/Runtime/Serialization/SerializationInfoEnumerator.cs b/src/Common/src/CoreLib/System/Runtime/Serialization/SerializationInfoEnumerator.cs index 9ce2080ac6e8..6712a3bc1f7d 100644 --- a/src/Common/src/CoreLib/System/Runtime/Serialization/SerializationInfoEnumerator.cs +++ b/src/Common/src/CoreLib/System/Runtime/Serialization/SerializationInfoEnumerator.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Collections; using System.Diagnostics; diff --git a/src/Common/src/CoreLib/System/Runtime/Serialization/StreamingContext.cs b/src/Common/src/CoreLib/System/Runtime/Serialization/StreamingContext.cs index e67f307ffdd2..f61366bd491f 100644 --- a/src/Common/src/CoreLib/System/Runtime/Serialization/StreamingContext.cs +++ b/src/Common/src/CoreLib/System/Runtime/Serialization/StreamingContext.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Runtime.Serialization { public readonly struct StreamingContext diff --git a/src/Common/src/CoreLib/System/Runtime/Versioning/NonVersionableAttribute.cs b/src/Common/src/CoreLib/System/Runtime/Versioning/NonVersionableAttribute.cs index b2d1d25ea504..e27bc9b6f83b 100644 --- a/src/Common/src/CoreLib/System/Runtime/Versioning/NonVersionableAttribute.cs +++ b/src/Common/src/CoreLib/System/Runtime/Versioning/NonVersionableAttribute.cs @@ -20,7 +20,6 @@ ** significantly extend its usage or allow 3rd parties to use it please discuss with the diagnostics team. ===========================================================*/ -#nullable enable namespace System.Runtime.Versioning { [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Constructor, diff --git a/src/Common/src/CoreLib/System/Runtime/Versioning/TargetFrameworkAttribute.cs b/src/Common/src/CoreLib/System/Runtime/Versioning/TargetFrameworkAttribute.cs index e3e6d60ff1e3..91b3df6ebe0c 100644 --- a/src/Common/src/CoreLib/System/Runtime/Versioning/TargetFrameworkAttribute.cs +++ b/src/Common/src/CoreLib/System/Runtime/Versioning/TargetFrameworkAttribute.cs @@ -12,7 +12,6 @@ ** ===========================================================*/ -#nullable enable namespace System.Runtime.Versioning { [AttributeUsageAttribute(AttributeTargets.Assembly, AllowMultiple = false, Inherited = false)] diff --git a/src/Common/src/CoreLib/System/SByte.cs b/src/Common/src/CoreLib/System/SByte.cs index 62db8812688b..9b12439e7394 100644 --- a/src/Common/src/CoreLib/System/SByte.cs +++ b/src/Common/src/CoreLib/System/SByte.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Globalization; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/System/Security/AllowPartiallyTrustedCallersAttribute.cs b/src/Common/src/CoreLib/System/Security/AllowPartiallyTrustedCallersAttribute.cs index dbdc8cf30202..2374ecdd414d 100644 --- a/src/Common/src/CoreLib/System/Security/AllowPartiallyTrustedCallersAttribute.cs +++ b/src/Common/src/CoreLib/System/Security/AllowPartiallyTrustedCallersAttribute.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Security { // AllowPartiallyTrustedCallersAttribute: diff --git a/src/Common/src/CoreLib/System/Security/CryptographicException.cs b/src/Common/src/CoreLib/System/Security/CryptographicException.cs index 6c97777f564b..b0793c8d2bc2 100644 --- a/src/Common/src/CoreLib/System/Security/CryptographicException.cs +++ b/src/Common/src/CoreLib/System/Security/CryptographicException.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Globalization; using System.Runtime.Serialization; diff --git a/src/Common/src/CoreLib/System/Security/IPermission.cs b/src/Common/src/CoreLib/System/Security/IPermission.cs index c5cf7f96e3ce..efb7e593c456 100644 --- a/src/Common/src/CoreLib/System/Security/IPermission.cs +++ b/src/Common/src/CoreLib/System/Security/IPermission.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Security { #if PROJECTN diff --git a/src/Common/src/CoreLib/System/Security/ISecurityEncodable.cs b/src/Common/src/CoreLib/System/Security/ISecurityEncodable.cs index 4fcec04299ee..64a968756652 100644 --- a/src/Common/src/CoreLib/System/Security/ISecurityEncodable.cs +++ b/src/Common/src/CoreLib/System/Security/ISecurityEncodable.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Security { #if PROJECTN diff --git a/src/Common/src/CoreLib/System/Security/IStackWalk.cs b/src/Common/src/CoreLib/System/Security/IStackWalk.cs index a3372bf6b155..9e6986a75206 100644 --- a/src/Common/src/CoreLib/System/Security/IStackWalk.cs +++ b/src/Common/src/CoreLib/System/Security/IStackWalk.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Security { #if PROJECTN diff --git a/src/Common/src/CoreLib/System/Security/PermissionSet.cs b/src/Common/src/CoreLib/System/Security/PermissionSet.cs index 7d1327df0a7e..9436b69585a7 100644 --- a/src/Common/src/CoreLib/System/Security/PermissionSet.cs +++ b/src/Common/src/CoreLib/System/Security/PermissionSet.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Security.Permissions; using System.Collections; using System.Runtime.Serialization; diff --git a/src/Common/src/CoreLib/System/Security/Principal/IIdentity.cs b/src/Common/src/CoreLib/System/Security/Principal/IIdentity.cs index 73a6f792a65e..cc6765c41f6e 100644 --- a/src/Common/src/CoreLib/System/Security/Principal/IIdentity.cs +++ b/src/Common/src/CoreLib/System/Security/Principal/IIdentity.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable // // All identities will implement this interface // diff --git a/src/Common/src/CoreLib/System/Security/Principal/IPrincipal.cs b/src/Common/src/CoreLib/System/Security/Principal/IPrincipal.cs index 511ed9bf41cb..03fffd6a41ab 100644 --- a/src/Common/src/CoreLib/System/Security/Principal/IPrincipal.cs +++ b/src/Common/src/CoreLib/System/Security/Principal/IPrincipal.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable // // All roles will implement this interface // diff --git a/src/Common/src/CoreLib/System/Security/SafeBSTRHandle.cs b/src/Common/src/CoreLib/System/Security/SafeBSTRHandle.cs index d5644598be9e..dd52f42cf734 100644 --- a/src/Common/src/CoreLib/System/Security/SafeBSTRHandle.cs +++ b/src/Common/src/CoreLib/System/Security/SafeBSTRHandle.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime; using System.Diagnostics; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/System/Security/SecureString.Unix.cs b/src/Common/src/CoreLib/System/Security/SecureString.Unix.cs index 6a5e351c5613..82b3833424f0 100644 --- a/src/Common/src/CoreLib/System/Security/SecureString.Unix.cs +++ b/src/Common/src/CoreLib/System/Security/SecureString.Unix.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; using System.Runtime; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/System/Security/SecureString.Windows.cs b/src/Common/src/CoreLib/System/Security/SecureString.Windows.cs index ddbbf4a962b1..a3bc273bb063 100644 --- a/src/Common/src/CoreLib/System/Security/SecureString.Windows.cs +++ b/src/Common/src/CoreLib/System/Security/SecureString.Windows.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; using System.Runtime; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/System/Security/SecureString.cs b/src/Common/src/CoreLib/System/Security/SecureString.cs index ece3ffa7c4bc..c9a1eba44304 100644 --- a/src/Common/src/CoreLib/System/Security/SecureString.cs +++ b/src/Common/src/CoreLib/System/Security/SecureString.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; using System.Runtime.InteropServices; using System.Threading; diff --git a/src/Common/src/CoreLib/System/Security/SecurityCriticalAttribute.cs b/src/Common/src/CoreLib/System/Security/SecurityCriticalAttribute.cs index 15c62e04dc5b..40012da06d1c 100644 --- a/src/Common/src/CoreLib/System/Security/SecurityCriticalAttribute.cs +++ b/src/Common/src/CoreLib/System/Security/SecurityCriticalAttribute.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Security { // SecurityCriticalAttribute diff --git a/src/Common/src/CoreLib/System/Security/SecurityElement.cs b/src/Common/src/CoreLib/System/Security/SecurityElement.cs index bdefc7d27275..a79616aa5e63 100644 --- a/src/Common/src/CoreLib/System/Security/SecurityElement.cs +++ b/src/Common/src/CoreLib/System/Security/SecurityElement.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information.s -#nullable enable using System.Collections; using System.Diagnostics; using System.Globalization; diff --git a/src/Common/src/CoreLib/System/Security/SecurityException.cs b/src/Common/src/CoreLib/System/Security/SecurityException.cs index b6156ca368b1..343736352411 100644 --- a/src/Common/src/CoreLib/System/Security/SecurityException.cs +++ b/src/Common/src/CoreLib/System/Security/SecurityException.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Reflection; using System.Runtime.Serialization; diff --git a/src/Common/src/CoreLib/System/Security/SecurityRulesAttribute.cs b/src/Common/src/CoreLib/System/Security/SecurityRulesAttribute.cs index d3f03089dc5c..dc12742fc8cb 100644 --- a/src/Common/src/CoreLib/System/Security/SecurityRulesAttribute.cs +++ b/src/Common/src/CoreLib/System/Security/SecurityRulesAttribute.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Security { // SecurityRulesAttribute diff --git a/src/Common/src/CoreLib/System/Security/SecuritySafeCriticalAttribute.cs b/src/Common/src/CoreLib/System/Security/SecuritySafeCriticalAttribute.cs index 2a2e8e194565..dd51857d1922 100644 --- a/src/Common/src/CoreLib/System/Security/SecuritySafeCriticalAttribute.cs +++ b/src/Common/src/CoreLib/System/Security/SecuritySafeCriticalAttribute.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Security { // SecuritySafeCriticalAttribute: diff --git a/src/Common/src/CoreLib/System/Security/SecurityTransparentAttribute.cs b/src/Common/src/CoreLib/System/Security/SecurityTransparentAttribute.cs index a53d61097d44..e9fd1bcb348c 100644 --- a/src/Common/src/CoreLib/System/Security/SecurityTransparentAttribute.cs +++ b/src/Common/src/CoreLib/System/Security/SecurityTransparentAttribute.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Security { // SecurityTransparentAttribute: diff --git a/src/Common/src/CoreLib/System/Security/SecurityTreatAsSafeAttribute.cs b/src/Common/src/CoreLib/System/Security/SecurityTreatAsSafeAttribute.cs index 85f7da59b969..450b7e46abeb 100644 --- a/src/Common/src/CoreLib/System/Security/SecurityTreatAsSafeAttribute.cs +++ b/src/Common/src/CoreLib/System/Security/SecurityTreatAsSafeAttribute.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Security { // SecurityTreatAsSafeAttribute: diff --git a/src/Common/src/CoreLib/System/Security/SuppressUnmanagedCodeSecurityAttribute.cs b/src/Common/src/CoreLib/System/Security/SuppressUnmanagedCodeSecurityAttribute.cs index 768943b1eb09..a45c212ca8f8 100644 --- a/src/Common/src/CoreLib/System/Security/SuppressUnmanagedCodeSecurityAttribute.cs +++ b/src/Common/src/CoreLib/System/Security/SuppressUnmanagedCodeSecurityAttribute.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Security { // SuppressUnmanagedCodeSecurityAttribute: diff --git a/src/Common/src/CoreLib/System/Security/UnverifiableCodeAttribute.cs b/src/Common/src/CoreLib/System/Security/UnverifiableCodeAttribute.cs index 4a5e0785c050..544b7c9d29e3 100644 --- a/src/Common/src/CoreLib/System/Security/UnverifiableCodeAttribute.cs +++ b/src/Common/src/CoreLib/System/Security/UnverifiableCodeAttribute.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Security { // UnverifiableCodeAttribute: diff --git a/src/Common/src/CoreLib/System/Security/VerificationException.cs b/src/Common/src/CoreLib/System/Security/VerificationException.cs index 7515f392352a..4cd9eeb2e865 100644 --- a/src/Common/src/CoreLib/System/Security/VerificationException.cs +++ b/src/Common/src/CoreLib/System/Security/VerificationException.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.Serialization; namespace System.Security diff --git a/src/Common/src/CoreLib/System/SerializableAttribute.cs b/src/Common/src/CoreLib/System/SerializableAttribute.cs index 9d21d39cc243..c25693137301 100644 --- a/src/Common/src/CoreLib/System/SerializableAttribute.cs +++ b/src/Common/src/CoreLib/System/SerializableAttribute.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System { [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Enum | AttributeTargets.Delegate, Inherited = false)] diff --git a/src/Common/src/CoreLib/System/Single.cs b/src/Common/src/CoreLib/System/Single.cs index 6374ecb33740..fe8e804e558d 100644 --- a/src/Common/src/CoreLib/System/Single.cs +++ b/src/Common/src/CoreLib/System/Single.cs @@ -11,7 +11,6 @@ ** ===========================================================*/ -#nullable enable using System.Globalization; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/System/Span.Fast.cs b/src/Common/src/CoreLib/System/Span.Fast.cs index 1bfa8eee5b54..94c6e06904cf 100644 --- a/src/Common/src/CoreLib/System/Span.Fast.cs +++ b/src/Common/src/CoreLib/System/Span.Fast.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; using System.Runtime.CompilerServices; using System.Runtime.Versioning; diff --git a/src/Common/src/CoreLib/System/Span.cs b/src/Common/src/CoreLib/System/Span.cs index 20bf8e20f806..afc6ba547e89 100644 --- a/src/Common/src/CoreLib/System/Span.cs +++ b/src/Common/src/CoreLib/System/Span.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.ComponentModel; using System.Diagnostics; using System.Runtime.CompilerServices; diff --git a/src/Common/src/CoreLib/System/SpanDebugView.cs b/src/Common/src/CoreLib/System/SpanDebugView.cs index b1613b462bf8..f79c67306cee 100644 --- a/src/Common/src/CoreLib/System/SpanDebugView.cs +++ b/src/Common/src/CoreLib/System/SpanDebugView.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; namespace System diff --git a/src/Common/src/CoreLib/System/SpanHelpers.BinarySearch.cs b/src/Common/src/CoreLib/System/SpanHelpers.BinarySearch.cs index 165b28fe701c..2aec70409696 100644 --- a/src/Common/src/CoreLib/System/SpanHelpers.BinarySearch.cs +++ b/src/Common/src/CoreLib/System/SpanHelpers.BinarySearch.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Collections.Generic; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/System/SpanHelpers.Byte.cs b/src/Common/src/CoreLib/System/SpanHelpers.Byte.cs index f13c0c650aa1..4104d93347c0 100644 --- a/src/Common/src/CoreLib/System/SpanHelpers.Byte.cs +++ b/src/Common/src/CoreLib/System/SpanHelpers.Byte.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; using System.Numerics; using System.Runtime.CompilerServices; diff --git a/src/Common/src/CoreLib/System/SpanHelpers.Char.cs b/src/Common/src/CoreLib/System/SpanHelpers.Char.cs index bfdbc46bfead..9bf1c57244a7 100644 --- a/src/Common/src/CoreLib/System/SpanHelpers.Char.cs +++ b/src/Common/src/CoreLib/System/SpanHelpers.Char.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; using System.Numerics; using System.Runtime.CompilerServices; diff --git a/src/Common/src/CoreLib/System/SpanHelpers.T.cs b/src/Common/src/CoreLib/System/SpanHelpers.T.cs index 49f4ff461b61..37bc43fb43d2 100644 --- a/src/Common/src/CoreLib/System/SpanHelpers.T.cs +++ b/src/Common/src/CoreLib/System/SpanHelpers.T.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; using System.Runtime.CompilerServices; // Do not remove. This is necessary for netstandard, since this file is mirrored into corefx diff --git a/src/Common/src/CoreLib/System/SpanHelpers.cs b/src/Common/src/CoreLib/System/SpanHelpers.cs index 12b8e26c720d..c919d6e63126 100644 --- a/src/Common/src/CoreLib/System/SpanHelpers.cs +++ b/src/Common/src/CoreLib/System/SpanHelpers.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; using System.Runtime; diff --git a/src/Common/src/CoreLib/System/StackOverflowException.cs b/src/Common/src/CoreLib/System/StackOverflowException.cs index 556c38dce7c3..0177b588170d 100644 --- a/src/Common/src/CoreLib/System/StackOverflowException.cs +++ b/src/Common/src/CoreLib/System/StackOverflowException.cs @@ -11,7 +11,6 @@ ** =============================================================================*/ -#nullable enable using System.Runtime.Serialization; namespace System diff --git a/src/Common/src/CoreLib/System/String.Comparison.cs b/src/Common/src/CoreLib/System/String.Comparison.cs index 23781b640397..a420fc814160 100644 --- a/src/Common/src/CoreLib/System/String.Comparison.cs +++ b/src/Common/src/CoreLib/System/String.Comparison.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; using System.Globalization; using System.Numerics; diff --git a/src/Common/src/CoreLib/System/String.Manipulation.cs b/src/Common/src/CoreLib/System/String.Manipulation.cs index 278a3b6b98a5..75d72dc50b19 100644 --- a/src/Common/src/CoreLib/System/String.Manipulation.cs +++ b/src/Common/src/CoreLib/System/String.Manipulation.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Buffers; using System.Collections.Generic; using System.Diagnostics; diff --git a/src/Common/src/CoreLib/System/String.Searching.cs b/src/Common/src/CoreLib/System/String.Searching.cs index 85b82da2a553..3d386b743205 100644 --- a/src/Common/src/CoreLib/System/String.Searching.cs +++ b/src/Common/src/CoreLib/System/String.Searching.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Globalization; using System.Runtime.InteropServices; using Internal.Runtime.CompilerServices; diff --git a/src/Common/src/CoreLib/System/String.cs b/src/Common/src/CoreLib/System/String.cs index d765bdd68410..60a82de5159e 100644 --- a/src/Common/src/CoreLib/System/String.cs +++ b/src/Common/src/CoreLib/System/String.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Buffers; using System.Collections; using System.Collections.Generic; diff --git a/src/Common/src/CoreLib/System/StringComparer.cs b/src/Common/src/CoreLib/System/StringComparer.cs index 4ffb83876d28..83c81aee96eb 100644 --- a/src/Common/src/CoreLib/System/StringComparer.cs +++ b/src/Common/src/CoreLib/System/StringComparer.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Collections; using System.Collections.Generic; using System.Globalization; diff --git a/src/Common/src/CoreLib/System/StringComparison.cs b/src/Common/src/CoreLib/System/StringComparison.cs index 3f31f33a41b3..d5c18c8021e5 100644 --- a/src/Common/src/CoreLib/System/StringComparison.cs +++ b/src/Common/src/CoreLib/System/StringComparison.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System { public enum StringComparison diff --git a/src/Common/src/CoreLib/System/StringSplitOptions.cs b/src/Common/src/CoreLib/System/StringSplitOptions.cs index 31328365b8f4..d7020559a1d1 100644 --- a/src/Common/src/CoreLib/System/StringSplitOptions.cs +++ b/src/Common/src/CoreLib/System/StringSplitOptions.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System { [Flags] diff --git a/src/Common/src/CoreLib/System/SystemException.cs b/src/Common/src/CoreLib/System/SystemException.cs index 8d8484de1671..faf05c68e710 100644 --- a/src/Common/src/CoreLib/System/SystemException.cs +++ b/src/Common/src/CoreLib/System/SystemException.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.Serialization; namespace System diff --git a/src/Common/src/CoreLib/System/Text/ASCIIEncoding.cs b/src/Common/src/CoreLib/System/Text/ASCIIEncoding.cs index 296e0ea09593..91868e000c61 100644 --- a/src/Common/src/CoreLib/System/Text/ASCIIEncoding.cs +++ b/src/Common/src/CoreLib/System/Text/ASCIIEncoding.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Buffers; using System.Diagnostics; using System.Runtime.CompilerServices; diff --git a/src/Common/src/CoreLib/System/Text/ASCIIUtility.Helpers.cs b/src/Common/src/CoreLib/System/Text/ASCIIUtility.Helpers.cs index 1b53d94aaa7f..731d52ab822c 100644 --- a/src/Common/src/CoreLib/System/Text/ASCIIUtility.Helpers.cs +++ b/src/Common/src/CoreLib/System/Text/ASCIIUtility.Helpers.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; using System.Numerics; using System.Runtime.CompilerServices; diff --git a/src/Common/src/CoreLib/System/Text/ASCIIUtility.cs b/src/Common/src/CoreLib/System/Text/ASCIIUtility.cs index 31e8ac1d5726..4f7f996e9ff7 100644 --- a/src/Common/src/CoreLib/System/Text/ASCIIUtility.cs +++ b/src/Common/src/CoreLib/System/Text/ASCIIUtility.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; using System.Numerics; using System.Runtime.CompilerServices; diff --git a/src/Common/src/CoreLib/System/Text/CodePageDataItem.cs b/src/Common/src/CoreLib/System/Text/CodePageDataItem.cs index cb796ff1a171..e2be2e3b7879 100644 --- a/src/Common/src/CoreLib/System/Text/CodePageDataItem.cs +++ b/src/Common/src/CoreLib/System/Text/CodePageDataItem.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Text { internal class CodePageDataItem diff --git a/src/Common/src/CoreLib/System/Text/Decoder.cs b/src/Common/src/CoreLib/System/Text/Decoder.cs index 9197e4c09ce3..e882e664cae9 100644 --- a/src/Common/src/CoreLib/System/Text/Decoder.cs +++ b/src/Common/src/CoreLib/System/Text/Decoder.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Text; using System; using System.Diagnostics; diff --git a/src/Common/src/CoreLib/System/Text/DecoderBestFitFallback.cs b/src/Common/src/CoreLib/System/Text/DecoderBestFitFallback.cs index 3387a091896b..98f3061fee11 100644 --- a/src/Common/src/CoreLib/System/Text/DecoderBestFitFallback.cs +++ b/src/Common/src/CoreLib/System/Text/DecoderBestFitFallback.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable // // This is used internally to create best fit behavior as per the original windows best fit behavior. // diff --git a/src/Common/src/CoreLib/System/Text/DecoderExceptionFallback.cs b/src/Common/src/CoreLib/System/Text/DecoderExceptionFallback.cs index 450ba3212acd..338724c61a9c 100644 --- a/src/Common/src/CoreLib/System/Text/DecoderExceptionFallback.cs +++ b/src/Common/src/CoreLib/System/Text/DecoderExceptionFallback.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Globalization; using System.Runtime.Serialization; diff --git a/src/Common/src/CoreLib/System/Text/DecoderFallback.cs b/src/Common/src/CoreLib/System/Text/DecoderFallback.cs index 77730c214c8c..4b4bcb635e4d 100644 --- a/src/Common/src/CoreLib/System/Text/DecoderFallback.cs +++ b/src/Common/src/CoreLib/System/Text/DecoderFallback.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; using System.Globalization; using System.Threading; diff --git a/src/Common/src/CoreLib/System/Text/DecoderNLS.cs b/src/Common/src/CoreLib/System/Text/DecoderNLS.cs index a84b607ea297..7e627fd0aa1e 100644 --- a/src/Common/src/CoreLib/System/Text/DecoderNLS.cs +++ b/src/Common/src/CoreLib/System/Text/DecoderNLS.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Buffers; using System.Diagnostics; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/System/Text/DecoderReplacementFallback.cs b/src/Common/src/CoreLib/System/Text/DecoderReplacementFallback.cs index 2bfb4b0e3201..57413ec69a2d 100644 --- a/src/Common/src/CoreLib/System/Text/DecoderReplacementFallback.cs +++ b/src/Common/src/CoreLib/System/Text/DecoderReplacementFallback.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; namespace System.Text diff --git a/src/Common/src/CoreLib/System/Text/Encoder.cs b/src/Common/src/CoreLib/System/Text/Encoder.cs index 77874ce7101e..f7efe24ea6a3 100644 --- a/src/Common/src/CoreLib/System/Text/Encoder.cs +++ b/src/Common/src/CoreLib/System/Text/Encoder.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Text; using System; using System.Diagnostics; diff --git a/src/Common/src/CoreLib/System/Text/EncoderBestFitFallback.cs b/src/Common/src/CoreLib/System/Text/EncoderBestFitFallback.cs index 363dd5e165f0..dddb1d5a880e 100644 --- a/src/Common/src/CoreLib/System/Text/EncoderBestFitFallback.cs +++ b/src/Common/src/CoreLib/System/Text/EncoderBestFitFallback.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable // // This is used internally to create best fit behavior as per the original windows best fit behavior. // diff --git a/src/Common/src/CoreLib/System/Text/EncoderExceptionFallback.cs b/src/Common/src/CoreLib/System/Text/EncoderExceptionFallback.cs index 37df57680446..e55cfb6c679e 100644 --- a/src/Common/src/CoreLib/System/Text/EncoderExceptionFallback.cs +++ b/src/Common/src/CoreLib/System/Text/EncoderExceptionFallback.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Runtime.Serialization; diff --git a/src/Common/src/CoreLib/System/Text/EncoderFallback.cs b/src/Common/src/CoreLib/System/Text/EncoderFallback.cs index b1c11270b616..c3a03ab16c2a 100644 --- a/src/Common/src/CoreLib/System/Text/EncoderFallback.cs +++ b/src/Common/src/CoreLib/System/Text/EncoderFallback.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Buffers; using System.Diagnostics; using System.Threading; diff --git a/src/Common/src/CoreLib/System/Text/EncoderNLS.cs b/src/Common/src/CoreLib/System/Text/EncoderNLS.cs index 41a249409fae..8ec3e333c086 100644 --- a/src/Common/src/CoreLib/System/Text/EncoderNLS.cs +++ b/src/Common/src/CoreLib/System/Text/EncoderNLS.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Buffers; using System.Diagnostics; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/System/Text/EncoderReplacementFallback.cs b/src/Common/src/CoreLib/System/Text/EncoderReplacementFallback.cs index 10e844b66c68..e124e41fd006 100644 --- a/src/Common/src/CoreLib/System/Text/EncoderReplacementFallback.cs +++ b/src/Common/src/CoreLib/System/Text/EncoderReplacementFallback.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Runtime; using System.Diagnostics; diff --git a/src/Common/src/CoreLib/System/Text/Encoding.Internal.cs b/src/Common/src/CoreLib/System/Text/Encoding.Internal.cs index cef00ea2b882..a033cdc3389b 100644 --- a/src/Common/src/CoreLib/System/Text/Encoding.Internal.cs +++ b/src/Common/src/CoreLib/System/Text/Encoding.Internal.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Buffers; using System.Diagnostics; using System.Runtime.CompilerServices; diff --git a/src/Common/src/CoreLib/System/Text/Encoding.cs b/src/Common/src/CoreLib/System/Text/Encoding.cs index fee129bac9ca..ef7ba7832ab7 100644 --- a/src/Common/src/CoreLib/System/Text/Encoding.cs +++ b/src/Common/src/CoreLib/System/Text/Encoding.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; using System.Runtime.InteropServices; using System.Runtime.Serialization; diff --git a/src/Common/src/CoreLib/System/Text/EncodingData.cs b/src/Common/src/CoreLib/System/Text/EncodingData.cs index a1b7c9278379..8a9d2a559f51 100644 --- a/src/Common/src/CoreLib/System/Text/EncodingData.cs +++ b/src/Common/src/CoreLib/System/Text/EncodingData.cs @@ -7,7 +7,6 @@ // // TODO-NULLABLE: We should edit original source instead: https://github.com/dotnet/buildtools/blob/master/src/Microsoft.DotNet.Build.Tasks/GenerateEncodingTable.cs#L235 -#nullable enable namespace System.Text { internal static partial class EncodingTable diff --git a/src/Common/src/CoreLib/System/Text/EncodingInfo.cs b/src/Common/src/CoreLib/System/Text/EncodingInfo.cs index cfffd3c3f5e1..febecfa6651f 100644 --- a/src/Common/src/CoreLib/System/Text/EncodingInfo.cs +++ b/src/Common/src/CoreLib/System/Text/EncodingInfo.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Text { public sealed class EncodingInfo diff --git a/src/Common/src/CoreLib/System/Text/EncodingNLS.cs b/src/Common/src/CoreLib/System/Text/EncodingNLS.cs index 0df2975dd293..f3d1e7817d1a 100644 --- a/src/Common/src/CoreLib/System/Text/EncodingNLS.cs +++ b/src/Common/src/CoreLib/System/Text/EncodingNLS.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Collections; using System.Diagnostics; diff --git a/src/Common/src/CoreLib/System/Text/EncodingProvider.cs b/src/Common/src/CoreLib/System/Text/EncodingProvider.cs index 47b7636acc04..d65dff932ff0 100644 --- a/src/Common/src/CoreLib/System/Text/EncodingProvider.cs +++ b/src/Common/src/CoreLib/System/Text/EncodingProvider.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Collections; using System.Collections.Generic; diff --git a/src/Common/src/CoreLib/System/Text/EncodingTable.cs b/src/Common/src/CoreLib/System/Text/EncodingTable.cs index 7f4d746f637e..661622707cc7 100644 --- a/src/Common/src/CoreLib/System/Text/EncodingTable.cs +++ b/src/Common/src/CoreLib/System/Text/EncodingTable.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Collections; using System.Diagnostics; using System.Threading; diff --git a/src/Common/src/CoreLib/System/Text/Latin1Encoding.cs b/src/Common/src/CoreLib/System/Text/Latin1Encoding.cs index 672348b54b9a..ce17f0aa3ff3 100644 --- a/src/Common/src/CoreLib/System/Text/Latin1Encoding.cs +++ b/src/Common/src/CoreLib/System/Text/Latin1Encoding.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.Diagnostics; diff --git a/src/Common/src/CoreLib/System/Text/Rune.cs b/src/Common/src/CoreLib/System/Text/Rune.cs index c743e213b8c2..da640969c003 100644 --- a/src/Common/src/CoreLib/System/Text/Rune.cs +++ b/src/Common/src/CoreLib/System/Text/Rune.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Buffers; using System.Diagnostics; using System.Globalization; diff --git a/src/Common/src/CoreLib/System/Text/SpanRuneEnumerator.cs b/src/Common/src/CoreLib/System/Text/SpanRuneEnumerator.cs index d650eb9d19fd..082a5108c140 100644 --- a/src/Common/src/CoreLib/System/Text/SpanRuneEnumerator.cs +++ b/src/Common/src/CoreLib/System/Text/SpanRuneEnumerator.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Text { // An enumerator for retrieving System.Text.Rune instances from a ROS. diff --git a/src/Common/src/CoreLib/System/Text/StringBuilder.Debug.cs b/src/Common/src/CoreLib/System/Text/StringBuilder.Debug.cs index a7681d071d99..d74bb67dce18 100644 --- a/src/Common/src/CoreLib/System/Text/StringBuilder.Debug.cs +++ b/src/Common/src/CoreLib/System/Text/StringBuilder.Debug.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; namespace System.Text diff --git a/src/Common/src/CoreLib/System/Text/StringBuilder.cs b/src/Common/src/CoreLib/System/Text/StringBuilder.cs index eee36e52ec1d..38d594507611 100644 --- a/src/Common/src/CoreLib/System/Text/StringBuilder.cs +++ b/src/Common/src/CoreLib/System/Text/StringBuilder.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Text; using System.Runtime; using System.Runtime.Serialization; diff --git a/src/Common/src/CoreLib/System/Text/StringRuneEnumerator.cs b/src/Common/src/CoreLib/System/Text/StringRuneEnumerator.cs index 3528884d3fd2..99001f75bddc 100644 --- a/src/Common/src/CoreLib/System/Text/StringRuneEnumerator.cs +++ b/src/Common/src/CoreLib/System/Text/StringRuneEnumerator.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Collections; using System.Collections.Generic; diff --git a/src/Common/src/CoreLib/System/Text/UTF32Encoding.cs b/src/Common/src/CoreLib/System/Text/UTF32Encoding.cs index 1b81f17a1d31..1fc50d24d07a 100644 --- a/src/Common/src/CoreLib/System/Text/UTF32Encoding.cs +++ b/src/Common/src/CoreLib/System/Text/UTF32Encoding.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable // // Don't override IsAlwaysNormalized because it is just a Unicode Transformation and could be confused. // diff --git a/src/Common/src/CoreLib/System/Text/UTF7Encoding.cs b/src/Common/src/CoreLib/System/Text/UTF7Encoding.cs index d398aec66b3b..1524b6f72c70 100644 --- a/src/Common/src/CoreLib/System/Text/UTF7Encoding.cs +++ b/src/Common/src/CoreLib/System/Text/UTF7Encoding.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable // // Don't override IsAlwaysNormalized because it is just a Unicode Transformation and could be confused. // diff --git a/src/Common/src/CoreLib/System/Text/UTF8Encoding.cs b/src/Common/src/CoreLib/System/Text/UTF8Encoding.cs index 688a431f055c..5a33c6d4e095 100644 --- a/src/Common/src/CoreLib/System/Text/UTF8Encoding.cs +++ b/src/Common/src/CoreLib/System/Text/UTF8Encoding.cs @@ -10,7 +10,6 @@ // The fast loops attempts to blaze through as fast as possible with optimistic range checks, // processing multiple characters at a time, and falling back to the slow loop for all special cases. -#nullable enable using System; using System.Buffers; using System.Diagnostics; diff --git a/src/Common/src/CoreLib/System/Text/Unicode/Utf16Utility.Validation.cs b/src/Common/src/CoreLib/System/Text/Unicode/Utf16Utility.Validation.cs index b1215f44a13e..0d66ae582431 100644 --- a/src/Common/src/CoreLib/System/Text/Unicode/Utf16Utility.Validation.cs +++ b/src/Common/src/CoreLib/System/Text/Unicode/Utf16Utility.Validation.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; using System.Runtime.Intrinsics; using System.Runtime.Intrinsics.X86; diff --git a/src/Common/src/CoreLib/System/Text/Unicode/Utf16Utility.cs b/src/Common/src/CoreLib/System/Text/Unicode/Utf16Utility.cs index 44d0316d280e..828776b4361c 100644 --- a/src/Common/src/CoreLib/System/Text/Unicode/Utf16Utility.cs +++ b/src/Common/src/CoreLib/System/Text/Unicode/Utf16Utility.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.CompilerServices; using System.Diagnostics; diff --git a/src/Common/src/CoreLib/System/Text/Unicode/Utf8.cs b/src/Common/src/CoreLib/System/Text/Unicode/Utf8.cs index 1badd7db1112..b4cae379e23a 100644 --- a/src/Common/src/CoreLib/System/Text/Unicode/Utf8.cs +++ b/src/Common/src/CoreLib/System/Text/Unicode/Utf8.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Buffers; using System.Diagnostics; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/System/Text/Unicode/Utf8Utility.Helpers.cs b/src/Common/src/CoreLib/System/Text/Unicode/Utf8Utility.Helpers.cs index 4bfc6158af29..ab29fbe7a61d 100644 --- a/src/Common/src/CoreLib/System/Text/Unicode/Utf8Utility.Helpers.cs +++ b/src/Common/src/CoreLib/System/Text/Unicode/Utf8Utility.Helpers.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Buffers.Binary; using System.Diagnostics; using System.Numerics; diff --git a/src/Common/src/CoreLib/System/Text/Unicode/Utf8Utility.Transcoding.cs b/src/Common/src/CoreLib/System/Text/Unicode/Utf8Utility.Transcoding.cs index 9536a77aea0d..3b83a2455914 100644 --- a/src/Common/src/CoreLib/System/Text/Unicode/Utf8Utility.Transcoding.cs +++ b/src/Common/src/CoreLib/System/Text/Unicode/Utf8Utility.Transcoding.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Buffers; using System.Buffers.Binary; using System.Diagnostics; diff --git a/src/Common/src/CoreLib/System/Text/Unicode/Utf8Utility.Validation.cs b/src/Common/src/CoreLib/System/Text/Unicode/Utf8Utility.Validation.cs index c7ef9a9d6b97..96e231082e8e 100644 --- a/src/Common/src/CoreLib/System/Text/Unicode/Utf8Utility.Validation.cs +++ b/src/Common/src/CoreLib/System/Text/Unicode/Utf8Utility.Validation.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; using System.Numerics; using System.Runtime.Intrinsics.X86; diff --git a/src/Common/src/CoreLib/System/Text/Unicode/Utf8Utility.cs b/src/Common/src/CoreLib/System/Text/Unicode/Utf8Utility.cs index 053c55efcfdd..7daf0cf80075 100644 --- a/src/Common/src/CoreLib/System/Text/Unicode/Utf8Utility.cs +++ b/src/Common/src/CoreLib/System/Text/Unicode/Utf8Utility.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Buffers; using System.Diagnostics; using System.IO; diff --git a/src/Common/src/CoreLib/System/Text/UnicodeDebug.cs b/src/Common/src/CoreLib/System/Text/UnicodeDebug.cs index be999212edf5..dedfbe2254cb 100644 --- a/src/Common/src/CoreLib/System/Text/UnicodeDebug.cs +++ b/src/Common/src/CoreLib/System/Text/UnicodeDebug.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/System/Text/UnicodeEncoding.cs b/src/Common/src/CoreLib/System/Text/UnicodeEncoding.cs index a652033cddc5..d541f65c9779 100644 --- a/src/Common/src/CoreLib/System/Text/UnicodeEncoding.cs +++ b/src/Common/src/CoreLib/System/Text/UnicodeEncoding.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable // // Don't override IsAlwaysNormalized because it is just a Unicode Transformation and could be confused. // diff --git a/src/Common/src/CoreLib/System/Text/UnicodeUtility.cs b/src/Common/src/CoreLib/System/Text/UnicodeUtility.cs index acd92473ca29..065c938d81e9 100644 --- a/src/Common/src/CoreLib/System/Text/UnicodeUtility.cs +++ b/src/Common/src/CoreLib/System/Text/UnicodeUtility.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.CompilerServices; namespace System.Text diff --git a/src/Common/src/CoreLib/System/ThreadAttributes.cs b/src/Common/src/CoreLib/System/ThreadAttributes.cs index 33dd50a6a7a7..624873610778 100644 --- a/src/Common/src/CoreLib/System/ThreadAttributes.cs +++ b/src/Common/src/CoreLib/System/ThreadAttributes.cs @@ -8,7 +8,6 @@ ** =============================================================================*/ -#nullable enable namespace System { [AttributeUsage(AttributeTargets.Method)] diff --git a/src/Common/src/CoreLib/System/ThreadStaticAttribute.cs b/src/Common/src/CoreLib/System/ThreadStaticAttribute.cs index f237ad17e8d0..c12ac1c18da2 100644 --- a/src/Common/src/CoreLib/System/ThreadStaticAttribute.cs +++ b/src/Common/src/CoreLib/System/ThreadStaticAttribute.cs @@ -13,7 +13,6 @@ ** ===========================================================*/ -#nullable enable using System; namespace System diff --git a/src/Common/src/CoreLib/System/Threading/AbandonedMutexException.cs b/src/Common/src/CoreLib/System/Threading/AbandonedMutexException.cs index 1517c7e06eaf..c2e5f0014da2 100644 --- a/src/Common/src/CoreLib/System/Threading/AbandonedMutexException.cs +++ b/src/Common/src/CoreLib/System/Threading/AbandonedMutexException.cs @@ -7,7 +7,6 @@ // AbandonedMutexs indicate serious error in user code or machine state. //////////////////////////////////////////////////////////////////////////////// -#nullable enable using System.Runtime.Serialization; namespace System.Threading diff --git a/src/Common/src/CoreLib/System/Threading/ApartmentState.cs b/src/Common/src/CoreLib/System/Threading/ApartmentState.cs index 961979282f1b..47c1677cb599 100644 --- a/src/Common/src/CoreLib/System/Threading/ApartmentState.cs +++ b/src/Common/src/CoreLib/System/Threading/ApartmentState.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Threading { public enum ApartmentState diff --git a/src/Common/src/CoreLib/System/Threading/AsyncLocal.cs b/src/Common/src/CoreLib/System/Threading/AsyncLocal.cs index 6ecf6c72cb02..a61af6d66891 100644 --- a/src/Common/src/CoreLib/System/Threading/AsyncLocal.cs +++ b/src/Common/src/CoreLib/System/Threading/AsyncLocal.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Collections.Generic; using System.Diagnostics; diff --git a/src/Common/src/CoreLib/System/Threading/AutoResetEvent.cs b/src/Common/src/CoreLib/System/Threading/AutoResetEvent.cs index b8418a94bba9..8320d7ad5ad8 100644 --- a/src/Common/src/CoreLib/System/Threading/AutoResetEvent.cs +++ b/src/Common/src/CoreLib/System/Threading/AutoResetEvent.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Threading { public sealed class AutoResetEvent : EventWaitHandle diff --git a/src/Common/src/CoreLib/System/Threading/CancellationToken.cs b/src/Common/src/CoreLib/System/Threading/CancellationToken.cs index 98b3ba2bb4db..769b4e0d8bc5 100644 --- a/src/Common/src/CoreLib/System/Threading/CancellationToken.cs +++ b/src/Common/src/CoreLib/System/Threading/CancellationToken.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; namespace System.Threading diff --git a/src/Common/src/CoreLib/System/Threading/CancellationTokenRegistration.cs b/src/Common/src/CoreLib/System/Threading/CancellationTokenRegistration.cs index edb29e03aa24..e309f3e0d584 100644 --- a/src/Common/src/CoreLib/System/Threading/CancellationTokenRegistration.cs +++ b/src/Common/src/CoreLib/System/Threading/CancellationTokenRegistration.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Threading.Tasks; namespace System.Threading diff --git a/src/Common/src/CoreLib/System/Threading/CancellationTokenSource.cs b/src/Common/src/CoreLib/System/Threading/CancellationTokenSource.cs index 4d01cd09ffab..02ab1c423d82 100644 --- a/src/Common/src/CoreLib/System/Threading/CancellationTokenSource.cs +++ b/src/Common/src/CoreLib/System/Threading/CancellationTokenSource.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Collections.Generic; using System.Diagnostics; using System.Threading.Tasks; diff --git a/src/Common/src/CoreLib/System/Threading/CompressedStack.cs b/src/Common/src/CoreLib/System/Threading/CompressedStack.cs index 32861df822f2..6faa326e473f 100644 --- a/src/Common/src/CoreLib/System/Threading/CompressedStack.cs +++ b/src/Common/src/CoreLib/System/Threading/CompressedStack.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.Serialization; namespace System.Threading diff --git a/src/Common/src/CoreLib/System/Threading/DeferredDisposableLifetime.cs b/src/Common/src/CoreLib/System/Threading/DeferredDisposableLifetime.cs index 6038a3e752e1..fe06560e1b52 100644 --- a/src/Common/src/CoreLib/System/Threading/DeferredDisposableLifetime.cs +++ b/src/Common/src/CoreLib/System/Threading/DeferredDisposableLifetime.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; namespace System.Threading diff --git a/src/Common/src/CoreLib/System/Threading/EventResetMode.cs b/src/Common/src/CoreLib/System/Threading/EventResetMode.cs index 5de3cb5763ae..7aac0f51eb88 100644 --- a/src/Common/src/CoreLib/System/Threading/EventResetMode.cs +++ b/src/Common/src/CoreLib/System/Threading/EventResetMode.cs @@ -12,7 +12,6 @@ ** =============================================================================*/ -#nullable enable namespace System.Threading { public enum EventResetMode diff --git a/src/Common/src/CoreLib/System/Threading/EventWaitHandle.Windows.cs b/src/Common/src/CoreLib/System/Threading/EventWaitHandle.Windows.cs index 6c7b7155ac46..7241d61b8802 100644 --- a/src/Common/src/CoreLib/System/Threading/EventWaitHandle.Windows.cs +++ b/src/Common/src/CoreLib/System/Threading/EventWaitHandle.Windows.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System; using System.IO; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/System/Threading/EventWaitHandle.cs b/src/Common/src/CoreLib/System/Threading/EventWaitHandle.cs index b01bfb2131fe..bafa7360f789 100644 --- a/src/Common/src/CoreLib/System/Threading/EventWaitHandle.cs +++ b/src/Common/src/CoreLib/System/Threading/EventWaitHandle.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; using System.IO; diff --git a/src/Common/src/CoreLib/System/Threading/ExecutionContext.cs b/src/Common/src/CoreLib/System/Threading/ExecutionContext.cs index fb9790d69bb8..64f2f1820eda 100644 --- a/src/Common/src/CoreLib/System/Threading/ExecutionContext.cs +++ b/src/Common/src/CoreLib/System/Threading/ExecutionContext.cs @@ -11,7 +11,6 @@ ** ===========================================================*/ -#nullable enable using System.Diagnostics; using System.Runtime.CompilerServices; using System.Runtime.ExceptionServices; diff --git a/src/Common/src/CoreLib/System/Threading/IOCompletionCallback.cs b/src/Common/src/CoreLib/System/Threading/IOCompletionCallback.cs index f2ad77439533..571ce467eb5b 100644 --- a/src/Common/src/CoreLib/System/Threading/IOCompletionCallback.cs +++ b/src/Common/src/CoreLib/System/Threading/IOCompletionCallback.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Threading { [CLSCompliant(false)] diff --git a/src/Common/src/CoreLib/System/Threading/IThreadPoolWorkItem.cs b/src/Common/src/CoreLib/System/Threading/IThreadPoolWorkItem.cs index 1b79a1175894..301c39e30b37 100644 --- a/src/Common/src/CoreLib/System/Threading/IThreadPoolWorkItem.cs +++ b/src/Common/src/CoreLib/System/Threading/IThreadPoolWorkItem.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Threading { /// Represents a work item that can be executed by the ThreadPool. diff --git a/src/Common/src/CoreLib/System/Threading/LazyInitializer.cs b/src/Common/src/CoreLib/System/Threading/LazyInitializer.cs index b25db6afaf60..5ae8415722c8 100644 --- a/src/Common/src/CoreLib/System/Threading/LazyInitializer.cs +++ b/src/Common/src/CoreLib/System/Threading/LazyInitializer.cs @@ -8,7 +8,6 @@ // // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- -#nullable enable using System.Diagnostics; namespace System.Threading diff --git a/src/Common/src/CoreLib/System/Threading/LazyThreadSafetyMode.cs b/src/Common/src/CoreLib/System/Threading/LazyThreadSafetyMode.cs index ae650824d736..2d13f2376248 100644 --- a/src/Common/src/CoreLib/System/Threading/LazyThreadSafetyMode.cs +++ b/src/Common/src/CoreLib/System/Threading/LazyThreadSafetyMode.cs @@ -8,7 +8,6 @@ // // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- -#nullable enable namespace System.Threading { /// diff --git a/src/Common/src/CoreLib/System/Threading/LockRecursionException.cs b/src/Common/src/CoreLib/System/Threading/LockRecursionException.cs index 52d45af90b0c..849417256e63 100644 --- a/src/Common/src/CoreLib/System/Threading/LockRecursionException.cs +++ b/src/Common/src/CoreLib/System/Threading/LockRecursionException.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.Serialization; namespace System.Threading diff --git a/src/Common/src/CoreLib/System/Threading/ManualResetEvent.cs b/src/Common/src/CoreLib/System/Threading/ManualResetEvent.cs index 4b7442ffaa06..4b8d61f9604f 100644 --- a/src/Common/src/CoreLib/System/Threading/ManualResetEvent.cs +++ b/src/Common/src/CoreLib/System/Threading/ManualResetEvent.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Threading { public sealed class ManualResetEvent : EventWaitHandle diff --git a/src/Common/src/CoreLib/System/Threading/ManualResetEventSlim.cs b/src/Common/src/CoreLib/System/Threading/ManualResetEventSlim.cs index 0361327279df..2024332b9daf 100644 --- a/src/Common/src/CoreLib/System/Threading/ManualResetEventSlim.cs +++ b/src/Common/src/CoreLib/System/Threading/ManualResetEventSlim.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; namespace System.Threading diff --git a/src/Common/src/CoreLib/System/Threading/Mutex.Windows.cs b/src/Common/src/CoreLib/System/Threading/Mutex.Windows.cs index 1d14037cc32c..6d89a5e54600 100644 --- a/src/Common/src/CoreLib/System/Threading/Mutex.Windows.cs +++ b/src/Common/src/CoreLib/System/Threading/Mutex.Windows.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.IO; using Microsoft.Win32.SafeHandles; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/System/Threading/Mutex.cs b/src/Common/src/CoreLib/System/Threading/Mutex.cs index 45c0c30943e9..50cd42a07e26 100644 --- a/src/Common/src/CoreLib/System/Threading/Mutex.cs +++ b/src/Common/src/CoreLib/System/Threading/Mutex.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.IO; using Microsoft.Win32; using Microsoft.Win32.SafeHandles; diff --git a/src/Common/src/CoreLib/System/Threading/NativeOverlapped.cs b/src/Common/src/CoreLib/System/Threading/NativeOverlapped.cs index 7e9d29775dba..933cb81ecc69 100644 --- a/src/Common/src/CoreLib/System/Threading/NativeOverlapped.cs +++ b/src/Common/src/CoreLib/System/Threading/NativeOverlapped.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.InteropServices; namespace System.Threading diff --git a/src/Common/src/CoreLib/System/Threading/ParameterizedThreadStart.cs b/src/Common/src/CoreLib/System/Threading/ParameterizedThreadStart.cs index 4f49fc1aa71c..124840a3bf72 100644 --- a/src/Common/src/CoreLib/System/Threading/ParameterizedThreadStart.cs +++ b/src/Common/src/CoreLib/System/Threading/ParameterizedThreadStart.cs @@ -12,7 +12,6 @@ ** =============================================================================*/ -#nullable enable namespace System.Threading { public delegate void ParameterizedThreadStart(object? obj); diff --git a/src/Common/src/CoreLib/System/Threading/ReaderWriterLockSlim.cs b/src/Common/src/CoreLib/System/Threading/ReaderWriterLockSlim.cs index f25c08d64bd5..f05ef52a7fc3 100644 --- a/src/Common/src/CoreLib/System/Threading/ReaderWriterLockSlim.cs +++ b/src/Common/src/CoreLib/System/Threading/ReaderWriterLockSlim.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; // for TraceInformation using System.Runtime.CompilerServices; diff --git a/src/Common/src/CoreLib/System/Threading/Semaphore.Windows.cs b/src/Common/src/CoreLib/System/Threading/Semaphore.Windows.cs index f5c2610e1055..7a21b5a85491 100644 --- a/src/Common/src/CoreLib/System/Threading/Semaphore.Windows.cs +++ b/src/Common/src/CoreLib/System/Threading/Semaphore.Windows.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using Microsoft.Win32.SafeHandles; using System.Diagnostics; using System.IO; diff --git a/src/Common/src/CoreLib/System/Threading/Semaphore.cs b/src/Common/src/CoreLib/System/Threading/Semaphore.cs index 7c75db3c1be7..a87405f4f43c 100644 --- a/src/Common/src/CoreLib/System/Threading/Semaphore.cs +++ b/src/Common/src/CoreLib/System/Threading/Semaphore.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using Microsoft.Win32; using Microsoft.Win32.SafeHandles; using System.Diagnostics; diff --git a/src/Common/src/CoreLib/System/Threading/SemaphoreFullException.cs b/src/Common/src/CoreLib/System/Threading/SemaphoreFullException.cs index 5bee6108c083..f79cdb8927f3 100644 --- a/src/Common/src/CoreLib/System/Threading/SemaphoreFullException.cs +++ b/src/Common/src/CoreLib/System/Threading/SemaphoreFullException.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.Serialization; namespace System.Threading diff --git a/src/Common/src/CoreLib/System/Threading/SemaphoreSlim.cs b/src/Common/src/CoreLib/System/Threading/SemaphoreSlim.cs index ea5bc4de7be8..64379666712e 100644 --- a/src/Common/src/CoreLib/System/Threading/SemaphoreSlim.cs +++ b/src/Common/src/CoreLib/System/Threading/SemaphoreSlim.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; using System.Threading.Tasks; diff --git a/src/Common/src/CoreLib/System/Threading/SendOrPostCallback.cs b/src/Common/src/CoreLib/System/Threading/SendOrPostCallback.cs index 2257ad6b032f..bf8decf4920b 100644 --- a/src/Common/src/CoreLib/System/Threading/SendOrPostCallback.cs +++ b/src/Common/src/CoreLib/System/Threading/SendOrPostCallback.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Threading { public delegate void SendOrPostCallback(object? state); diff --git a/src/Common/src/CoreLib/System/Threading/SpinLock.cs b/src/Common/src/CoreLib/System/Threading/SpinLock.cs index 1e6bcc511062..f167d0676888 100644 --- a/src/Common/src/CoreLib/System/Threading/SpinLock.cs +++ b/src/Common/src/CoreLib/System/Threading/SpinLock.cs @@ -11,7 +11,6 @@ // // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- -#nullable enable using System.Diagnostics; using System.Runtime.CompilerServices; diff --git a/src/Common/src/CoreLib/System/Threading/SpinWait.cs b/src/Common/src/CoreLib/System/Threading/SpinWait.cs index 412496535e72..6fa99e15c1d5 100644 --- a/src/Common/src/CoreLib/System/Threading/SpinWait.cs +++ b/src/Common/src/CoreLib/System/Threading/SpinWait.cs @@ -8,7 +8,6 @@ // // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- -#nullable enable using System.Diagnostics; namespace System.Threading diff --git a/src/Common/src/CoreLib/System/Threading/SynchronizationContext.cs b/src/Common/src/CoreLib/System/Threading/SynchronizationContext.cs index 3f9a2bec2fb0..eb7fe288290b 100644 --- a/src/Common/src/CoreLib/System/Threading/SynchronizationContext.cs +++ b/src/Common/src/CoreLib/System/Threading/SynchronizationContext.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Threading { public partial class SynchronizationContext diff --git a/src/Common/src/CoreLib/System/Threading/SynchronizationLockException.cs b/src/Common/src/CoreLib/System/Threading/SynchronizationLockException.cs index fbd685afc9d3..2762a8e503a4 100644 --- a/src/Common/src/CoreLib/System/Threading/SynchronizationLockException.cs +++ b/src/Common/src/CoreLib/System/Threading/SynchronizationLockException.cs @@ -12,7 +12,6 @@ ** =============================================================================*/ -#nullable enable using System.Runtime.Serialization; namespace System.Threading diff --git a/src/Common/src/CoreLib/System/Threading/Tasks/AsyncCausalityTracer.Noop.cs b/src/Common/src/CoreLib/System/Threading/Tasks/AsyncCausalityTracer.Noop.cs index 927b8fa1e4d3..b00d5d675619 100644 --- a/src/Common/src/CoreLib/System/Threading/Tasks/AsyncCausalityTracer.Noop.cs +++ b/src/Common/src/CoreLib/System/Threading/Tasks/AsyncCausalityTracer.Noop.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; namespace System.Threading.Tasks diff --git a/src/Common/src/CoreLib/System/Threading/Tasks/AsyncCausalityTracerConstants.cs b/src/Common/src/CoreLib/System/Threading/Tasks/AsyncCausalityTracerConstants.cs index 7e710677cead..3677051f058e 100644 --- a/src/Common/src/CoreLib/System/Threading/Tasks/AsyncCausalityTracerConstants.cs +++ b/src/Common/src/CoreLib/System/Threading/Tasks/AsyncCausalityTracerConstants.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Threading.Tasks { internal enum AsyncCausalityStatus diff --git a/src/Common/src/CoreLib/System/Threading/Tasks/ConcurrentExclusiveSchedulerPair.cs b/src/Common/src/CoreLib/System/Threading/Tasks/ConcurrentExclusiveSchedulerPair.cs index 155b00a2f42e..9065ae166688 100644 --- a/src/Common/src/CoreLib/System/Threading/Tasks/ConcurrentExclusiveSchedulerPair.cs +++ b/src/Common/src/CoreLib/System/Threading/Tasks/ConcurrentExclusiveSchedulerPair.cs @@ -14,7 +14,6 @@ // // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- -#nullable enable using System.Collections.Generic; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; diff --git a/src/Common/src/CoreLib/System/Threading/Tasks/Future.cs b/src/Common/src/CoreLib/System/Threading/Tasks/Future.cs index 9e562e3c46f7..c82372c00017 100644 --- a/src/Common/src/CoreLib/System/Threading/Tasks/Future.cs +++ b/src/Common/src/CoreLib/System/Threading/Tasks/Future.cs @@ -10,7 +10,6 @@ // // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- -#nullable enable using System.Collections.Generic; using System.Diagnostics; using System.Runtime.CompilerServices; diff --git a/src/Common/src/CoreLib/System/Threading/Tasks/FutureFactory.cs b/src/Common/src/CoreLib/System/Threading/Tasks/FutureFactory.cs index e96fe14b3432..b00b623c2734 100644 --- a/src/Common/src/CoreLib/System/Threading/Tasks/FutureFactory.cs +++ b/src/Common/src/CoreLib/System/Threading/Tasks/FutureFactory.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; namespace System.Threading.Tasks diff --git a/src/Common/src/CoreLib/System/Threading/Tasks/ProducerConsumerQueues.cs b/src/Common/src/CoreLib/System/Threading/Tasks/ProducerConsumerQueues.cs index 21214e85a8d8..157ad5d666a5 100644 --- a/src/Common/src/CoreLib/System/Threading/Tasks/ProducerConsumerQueues.cs +++ b/src/Common/src/CoreLib/System/Threading/Tasks/ProducerConsumerQueues.cs @@ -21,7 +21,6 @@ // ************************* // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- -#nullable enable using System.Collections; using System.Collections.Concurrent; using System.Collections.Generic; diff --git a/src/Common/src/CoreLib/System/Threading/Tasks/Sources/IValueTaskSource.cs b/src/Common/src/CoreLib/System/Threading/Tasks/Sources/IValueTaskSource.cs index 6181ab2bf02f..8f460370c0a1 100644 --- a/src/Common/src/CoreLib/System/Threading/Tasks/Sources/IValueTaskSource.cs +++ b/src/Common/src/CoreLib/System/Threading/Tasks/Sources/IValueTaskSource.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Threading.Tasks.Sources { /// diff --git a/src/Common/src/CoreLib/System/Threading/Tasks/Sources/ManualResetValueTaskSourceCore.cs b/src/Common/src/CoreLib/System/Threading/Tasks/Sources/ManualResetValueTaskSourceCore.cs index 967cbbeadfb3..fd68a4985a7b 100644 --- a/src/Common/src/CoreLib/System/Threading/Tasks/Sources/ManualResetValueTaskSourceCore.cs +++ b/src/Common/src/CoreLib/System/Threading/Tasks/Sources/ManualResetValueTaskSourceCore.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; using System.Runtime.ExceptionServices; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/System/Threading/Tasks/Task.cs b/src/Common/src/CoreLib/System/Threading/Tasks/Task.cs index 2c35214248ff..a4a65922ccde 100644 --- a/src/Common/src/CoreLib/System/Threading/Tasks/Task.cs +++ b/src/Common/src/CoreLib/System/Threading/Tasks/Task.cs @@ -10,7 +10,6 @@ // // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- -#nullable enable using System.Collections.Generic; using System.Collections.ObjectModel; using System.Diagnostics; diff --git a/src/Common/src/CoreLib/System/Threading/Tasks/TaskAsyncEnumerableExtensions.cs b/src/Common/src/CoreLib/System/Threading/Tasks/TaskAsyncEnumerableExtensions.cs index 6411bb21347d..57aab5244857 100644 --- a/src/Common/src/CoreLib/System/Threading/Tasks/TaskAsyncEnumerableExtensions.cs +++ b/src/Common/src/CoreLib/System/Threading/Tasks/TaskAsyncEnumerableExtensions.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Collections.Generic; using System.Runtime.CompilerServices; diff --git a/src/Common/src/CoreLib/System/Threading/Tasks/TaskCanceledException.cs b/src/Common/src/CoreLib/System/Threading/Tasks/TaskCanceledException.cs index 5147f116eb30..67d985e0a679 100644 --- a/src/Common/src/CoreLib/System/Threading/Tasks/TaskCanceledException.cs +++ b/src/Common/src/CoreLib/System/Threading/Tasks/TaskCanceledException.cs @@ -10,7 +10,6 @@ // // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- -#nullable enable using System.Runtime.Serialization; namespace System.Threading.Tasks diff --git a/src/Common/src/CoreLib/System/Threading/Tasks/TaskCompletionSource.cs b/src/Common/src/CoreLib/System/Threading/Tasks/TaskCompletionSource.cs index 045486a6a180..8773eb415943 100644 --- a/src/Common/src/CoreLib/System/Threading/Tasks/TaskCompletionSource.cs +++ b/src/Common/src/CoreLib/System/Threading/Tasks/TaskCompletionSource.cs @@ -11,7 +11,6 @@ // // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- -#nullable enable using System; using System.Diagnostics; using System.Collections.Generic; diff --git a/src/Common/src/CoreLib/System/Threading/Tasks/TaskContinuation.cs b/src/Common/src/CoreLib/System/Threading/Tasks/TaskContinuation.cs index 0968a747b1e5..65547fb45247 100644 --- a/src/Common/src/CoreLib/System/Threading/Tasks/TaskContinuation.cs +++ b/src/Common/src/CoreLib/System/Threading/Tasks/TaskContinuation.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; using System.Runtime.CompilerServices; diff --git a/src/Common/src/CoreLib/System/Threading/Tasks/TaskExceptionHolder.cs b/src/Common/src/CoreLib/System/Threading/Tasks/TaskExceptionHolder.cs index d35e6a2e673f..7ed04ad76e68 100644 --- a/src/Common/src/CoreLib/System/Threading/Tasks/TaskExceptionHolder.cs +++ b/src/Common/src/CoreLib/System/Threading/Tasks/TaskExceptionHolder.cs @@ -10,7 +10,6 @@ // // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- -#nullable enable using System.Collections.Generic; using System.Collections.ObjectModel; using System.Diagnostics; diff --git a/src/Common/src/CoreLib/System/Threading/Tasks/TaskExtensions.cs b/src/Common/src/CoreLib/System/Threading/Tasks/TaskExtensions.cs index cbe8d6745401..52e44815d184 100644 --- a/src/Common/src/CoreLib/System/Threading/Tasks/TaskExtensions.cs +++ b/src/Common/src/CoreLib/System/Threading/Tasks/TaskExtensions.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Collections.Generic; using System.Runtime.CompilerServices; diff --git a/src/Common/src/CoreLib/System/Threading/Tasks/TaskFactory.cs b/src/Common/src/CoreLib/System/Threading/Tasks/TaskFactory.cs index cc5a5a1aa11b..3929a08589a5 100644 --- a/src/Common/src/CoreLib/System/Threading/Tasks/TaskFactory.cs +++ b/src/Common/src/CoreLib/System/Threading/Tasks/TaskFactory.cs @@ -12,7 +12,6 @@ // // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- -#nullable enable using System; using System.Collections.Generic; using System.Security; diff --git a/src/Common/src/CoreLib/System/Threading/Tasks/TaskScheduler.cs b/src/Common/src/CoreLib/System/Threading/Tasks/TaskScheduler.cs index d8940044dae2..b6afade5a553 100644 --- a/src/Common/src/CoreLib/System/Threading/Tasks/TaskScheduler.cs +++ b/src/Common/src/CoreLib/System/Threading/Tasks/TaskScheduler.cs @@ -10,7 +10,6 @@ // // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- -#nullable enable using System.Collections.Generic; using System.Diagnostics; using System.Runtime.CompilerServices; diff --git a/src/Common/src/CoreLib/System/Threading/Tasks/TaskSchedulerException.cs b/src/Common/src/CoreLib/System/Threading/Tasks/TaskSchedulerException.cs index c68469c5cde9..2dd209de9e5d 100644 --- a/src/Common/src/CoreLib/System/Threading/Tasks/TaskSchedulerException.cs +++ b/src/Common/src/CoreLib/System/Threading/Tasks/TaskSchedulerException.cs @@ -10,7 +10,6 @@ // // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- -#nullable enable using System.Runtime.Serialization; namespace System.Threading.Tasks diff --git a/src/Common/src/CoreLib/System/Threading/Tasks/ThreadPoolTaskScheduler.cs b/src/Common/src/CoreLib/System/Threading/Tasks/ThreadPoolTaskScheduler.cs index 05cb75bcbcf0..2473df26d09d 100644 --- a/src/Common/src/CoreLib/System/Threading/Tasks/ThreadPoolTaskScheduler.cs +++ b/src/Common/src/CoreLib/System/Threading/Tasks/ThreadPoolTaskScheduler.cs @@ -11,7 +11,6 @@ // // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- -#nullable enable using System.Collections.Generic; using System.Diagnostics; diff --git a/src/Common/src/CoreLib/System/Threading/Tasks/TplEventSource.cs b/src/Common/src/CoreLib/System/Threading/Tasks/TplEventSource.cs index 44e5d0ad11a0..a842fa830857 100644 --- a/src/Common/src/CoreLib/System/Threading/Tasks/TplEventSource.cs +++ b/src/Common/src/CoreLib/System/Threading/Tasks/TplEventSource.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.CompilerServices; using System.Diagnostics.Tracing; using Internal.Runtime.CompilerServices; diff --git a/src/Common/src/CoreLib/System/Threading/Tasks/ValueTask.cs b/src/Common/src/CoreLib/System/Threading/Tasks/ValueTask.cs index 1b175614e260..884ae0b009e1 100644 --- a/src/Common/src/CoreLib/System/Threading/Tasks/ValueTask.cs +++ b/src/Common/src/CoreLib/System/Threading/Tasks/ValueTask.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Collections.Generic; using System.Diagnostics; using System.Runtime.CompilerServices; diff --git a/src/Common/src/CoreLib/System/Threading/Thread.Unix.cs b/src/Common/src/CoreLib/System/Threading/Thread.Unix.cs index e3ee7133da9a..902fcf2650e1 100644 --- a/src/Common/src/CoreLib/System/Threading/Thread.Unix.cs +++ b/src/Common/src/CoreLib/System/Threading/Thread.Unix.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.ConstrainedExecution; namespace System.Threading diff --git a/src/Common/src/CoreLib/System/Threading/Thread.Windows.cs b/src/Common/src/CoreLib/System/Threading/Thread.Windows.cs index b0bae93da647..18882091ab6a 100644 --- a/src/Common/src/CoreLib/System/Threading/Thread.Windows.cs +++ b/src/Common/src/CoreLib/System/Threading/Thread.Windows.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Threading { public sealed partial class Thread diff --git a/src/Common/src/CoreLib/System/Threading/Thread.cs b/src/Common/src/CoreLib/System/Threading/Thread.cs index 183f5b206d4b..39f0f63db8a6 100644 --- a/src/Common/src/CoreLib/System/Threading/Thread.cs +++ b/src/Common/src/CoreLib/System/Threading/Thread.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Collections.Generic; using System.Diagnostics; using System.Globalization; diff --git a/src/Common/src/CoreLib/System/Threading/ThreadAbortException.cs b/src/Common/src/CoreLib/System/Threading/ThreadAbortException.cs index aa4cb299a8f9..9391bb4e0a4c 100644 --- a/src/Common/src/CoreLib/System/Threading/ThreadAbortException.cs +++ b/src/Common/src/CoreLib/System/Threading/ThreadAbortException.cs @@ -14,7 +14,6 @@ ** =============================================================================*/ -#nullable enable using System.Runtime.Serialization; namespace System.Threading diff --git a/src/Common/src/CoreLib/System/Threading/ThreadInterruptedException.cs b/src/Common/src/CoreLib/System/Threading/ThreadInterruptedException.cs index 01ff40d838ad..af80bb620f9c 100644 --- a/src/Common/src/CoreLib/System/Threading/ThreadInterruptedException.cs +++ b/src/Common/src/CoreLib/System/Threading/ThreadInterruptedException.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.Serialization; namespace System.Threading diff --git a/src/Common/src/CoreLib/System/Threading/ThreadLocal.cs b/src/Common/src/CoreLib/System/Threading/ThreadLocal.cs index 276caed6213c..f57afb9d77e1 100644 --- a/src/Common/src/CoreLib/System/Threading/ThreadLocal.cs +++ b/src/Common/src/CoreLib/System/Threading/ThreadLocal.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Collections.Generic; using System.Diagnostics; diff --git a/src/Common/src/CoreLib/System/Threading/ThreadPool.cs b/src/Common/src/CoreLib/System/Threading/ThreadPool.cs index fc53fc158fe8..da4df11e4f6e 100644 --- a/src/Common/src/CoreLib/System/Threading/ThreadPool.cs +++ b/src/Common/src/CoreLib/System/Threading/ThreadPool.cs @@ -11,7 +11,6 @@ ** =============================================================================*/ -#nullable enable using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics; diff --git a/src/Common/src/CoreLib/System/Threading/ThreadPriority.cs b/src/Common/src/CoreLib/System/Threading/ThreadPriority.cs index 9ef95a1042d8..3b34bd5eac82 100644 --- a/src/Common/src/CoreLib/System/Threading/ThreadPriority.cs +++ b/src/Common/src/CoreLib/System/Threading/ThreadPriority.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Threading { public enum ThreadPriority diff --git a/src/Common/src/CoreLib/System/Threading/ThreadStart.cs b/src/Common/src/CoreLib/System/Threading/ThreadStart.cs index 11310ac296ca..5532539fc779 100644 --- a/src/Common/src/CoreLib/System/Threading/ThreadStart.cs +++ b/src/Common/src/CoreLib/System/Threading/ThreadStart.cs @@ -12,7 +12,6 @@ ** =============================================================================*/ -#nullable enable namespace System.Threading { public delegate void ThreadStart(); diff --git a/src/Common/src/CoreLib/System/Threading/ThreadStartException.cs b/src/Common/src/CoreLib/System/Threading/ThreadStartException.cs index b22396bccc16..51725554183b 100644 --- a/src/Common/src/CoreLib/System/Threading/ThreadStartException.cs +++ b/src/Common/src/CoreLib/System/Threading/ThreadStartException.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.Serialization; namespace System.Threading diff --git a/src/Common/src/CoreLib/System/Threading/ThreadState.cs b/src/Common/src/CoreLib/System/Threading/ThreadState.cs index 9d0f374e226e..4bf3b5184d68 100644 --- a/src/Common/src/CoreLib/System/Threading/ThreadState.cs +++ b/src/Common/src/CoreLib/System/Threading/ThreadState.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Threading { [Flags] diff --git a/src/Common/src/CoreLib/System/Threading/ThreadStateException.cs b/src/Common/src/CoreLib/System/Threading/ThreadStateException.cs index 9e0f26e9f5be..2c1a5c97a3f7 100644 --- a/src/Common/src/CoreLib/System/Threading/ThreadStateException.cs +++ b/src/Common/src/CoreLib/System/Threading/ThreadStateException.cs @@ -12,7 +12,6 @@ ** =============================================================================*/ -#nullable enable using System.Runtime.Serialization; namespace System.Threading diff --git a/src/Common/src/CoreLib/System/Threading/Timeout.cs b/src/Common/src/CoreLib/System/Threading/Timeout.cs index 85151291f7d7..995ca4ef8135 100644 --- a/src/Common/src/CoreLib/System/Threading/Timeout.cs +++ b/src/Common/src/CoreLib/System/Threading/Timeout.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Threading { // A constant used by methods that take a timeout (Object.Wait, Thread.Sleep diff --git a/src/Common/src/CoreLib/System/Threading/TimeoutHelper.cs b/src/Common/src/CoreLib/System/Threading/TimeoutHelper.cs index 524fb2b52a4b..dd3291281eb6 100644 --- a/src/Common/src/CoreLib/System/Threading/TimeoutHelper.cs +++ b/src/Common/src/CoreLib/System/Threading/TimeoutHelper.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; namespace System.Threading diff --git a/src/Common/src/CoreLib/System/Threading/Timer.cs b/src/Common/src/CoreLib/System/Threading/Timer.cs index 0f027778faa3..8789065390a6 100644 --- a/src/Common/src/CoreLib/System/Threading/Timer.cs +++ b/src/Common/src/CoreLib/System/Threading/Timer.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; using System.Diagnostics.Tracing; using System.Threading.Tasks; diff --git a/src/Common/src/CoreLib/System/Threading/TimerQueue.Portable.cs b/src/Common/src/CoreLib/System/Threading/TimerQueue.Portable.cs index ed6e90f915d2..7fa4f2241ccd 100644 --- a/src/Common/src/CoreLib/System/Threading/TimerQueue.Portable.cs +++ b/src/Common/src/CoreLib/System/Threading/TimerQueue.Portable.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Collections.Generic; using System.Diagnostics; diff --git a/src/Common/src/CoreLib/System/Threading/TimerQueue.Unix.cs b/src/Common/src/CoreLib/System/Threading/TimerQueue.Unix.cs index d89a8f6a2623..7c45637c492c 100644 --- a/src/Common/src/CoreLib/System/Threading/TimerQueue.Unix.cs +++ b/src/Common/src/CoreLib/System/Threading/TimerQueue.Unix.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System.Threading { internal partial class TimerQueue diff --git a/src/Common/src/CoreLib/System/Threading/TimerQueue.Windows.cs b/src/Common/src/CoreLib/System/Threading/TimerQueue.Windows.cs index 5421b9f43bfe..0bd0cc49cf70 100644 --- a/src/Common/src/CoreLib/System/Threading/TimerQueue.Windows.cs +++ b/src/Common/src/CoreLib/System/Threading/TimerQueue.Windows.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.InteropServices; namespace System.Threading diff --git a/src/Common/src/CoreLib/System/Threading/Volatile.cs b/src/Common/src/CoreLib/System/Threading/Volatile.cs index 4ace8f994f0e..26d33a40a747 100644 --- a/src/Common/src/CoreLib/System/Threading/Volatile.cs +++ b/src/Common/src/CoreLib/System/Threading/Volatile.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.CompilerServices; using System.Runtime.Versioning; using Internal.Runtime.CompilerServices; diff --git a/src/Common/src/CoreLib/System/Threading/WaitHandle.cs b/src/Common/src/CoreLib/System/Threading/WaitHandle.cs index b2aeae863955..20aa3f76c20b 100644 --- a/src/Common/src/CoreLib/System/Threading/WaitHandle.cs +++ b/src/Common/src/CoreLib/System/Threading/WaitHandle.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Diagnostics; using Microsoft.Win32.SafeHandles; diff --git a/src/Common/src/CoreLib/System/Threading/WaitHandleCannotBeOpenedException.cs b/src/Common/src/CoreLib/System/Threading/WaitHandleCannotBeOpenedException.cs index f54e013413ff..f273456e49dc 100644 --- a/src/Common/src/CoreLib/System/Threading/WaitHandleCannotBeOpenedException.cs +++ b/src/Common/src/CoreLib/System/Threading/WaitHandleCannotBeOpenedException.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.Serialization; namespace System.Threading diff --git a/src/Common/src/CoreLib/System/ThrowHelper.cs b/src/Common/src/CoreLib/System/ThrowHelper.cs index 8b460975c22d..f6805d8a3aaa 100644 --- a/src/Common/src/CoreLib/System/ThrowHelper.cs +++ b/src/Common/src/CoreLib/System/ThrowHelper.cs @@ -35,7 +35,6 @@ // multiple times for different instantiation. // -#nullable enable using System.Buffers; using System.Collections.Generic; using System.Diagnostics; diff --git a/src/Common/src/CoreLib/System/TimeSpan.cs b/src/Common/src/CoreLib/System/TimeSpan.cs index be5654ef7bb5..3c1d5ebe7511 100644 --- a/src/Common/src/CoreLib/System/TimeSpan.cs +++ b/src/Common/src/CoreLib/System/TimeSpan.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Globalization; namespace System diff --git a/src/Common/src/CoreLib/System/TimeZone.cs b/src/Common/src/CoreLib/System/TimeZone.cs index 20d2b613ab93..b9dc233a62cb 100644 --- a/src/Common/src/CoreLib/System/TimeZone.cs +++ b/src/Common/src/CoreLib/System/TimeZone.cs @@ -18,7 +18,6 @@ ** ============================================================*/ -#nullable enable using System; using System.Text; using System.Threading; diff --git a/src/Common/src/CoreLib/System/TimeZoneInfo.AdjustmentRule.cs b/src/Common/src/CoreLib/System/TimeZoneInfo.AdjustmentRule.cs index 7d046bdc1015..4ba7f28d91a9 100644 --- a/src/Common/src/CoreLib/System/TimeZoneInfo.AdjustmentRule.cs +++ b/src/Common/src/CoreLib/System/TimeZoneInfo.AdjustmentRule.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.Serialization; namespace System diff --git a/src/Common/src/CoreLib/System/TimeZoneInfo.StringSerializer.cs b/src/Common/src/CoreLib/System/TimeZoneInfo.StringSerializer.cs index 7ccdc7cba8de..218cb0effce9 100644 --- a/src/Common/src/CoreLib/System/TimeZoneInfo.StringSerializer.cs +++ b/src/Common/src/CoreLib/System/TimeZoneInfo.StringSerializer.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Collections.Generic; using System.Globalization; using System.Runtime.Serialization; diff --git a/src/Common/src/CoreLib/System/TimeZoneInfo.TransitionTime.cs b/src/Common/src/CoreLib/System/TimeZoneInfo.TransitionTime.cs index 86e7002d7c2b..4b0abe8e6eb2 100644 --- a/src/Common/src/CoreLib/System/TimeZoneInfo.TransitionTime.cs +++ b/src/Common/src/CoreLib/System/TimeZoneInfo.TransitionTime.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.Serialization; namespace System diff --git a/src/Common/src/CoreLib/System/TimeZoneInfo.Unix.cs b/src/Common/src/CoreLib/System/TimeZoneInfo.Unix.cs index 02543cca1126..bc6ac4107b63 100644 --- a/src/Common/src/CoreLib/System/TimeZoneInfo.Unix.cs +++ b/src/Common/src/CoreLib/System/TimeZoneInfo.Unix.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Buffers; using System.Collections.Generic; using System.Diagnostics; diff --git a/src/Common/src/CoreLib/System/TimeZoneInfo.Win32.cs b/src/Common/src/CoreLib/System/TimeZoneInfo.Win32.cs index 8fe5f56fb0c0..27fa6aba7ba3 100644 --- a/src/Common/src/CoreLib/System/TimeZoneInfo.Win32.cs +++ b/src/Common/src/CoreLib/System/TimeZoneInfo.Win32.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Collections.Generic; using System.Diagnostics; using System.Globalization; diff --git a/src/Common/src/CoreLib/System/TimeZoneInfo.cs b/src/Common/src/CoreLib/System/TimeZoneInfo.cs index 0783f9bdba2e..3e87c36eff1f 100644 --- a/src/Common/src/CoreLib/System/TimeZoneInfo.cs +++ b/src/Common/src/CoreLib/System/TimeZoneInfo.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Collections.Generic; using System.Collections.ObjectModel; using System.Diagnostics; diff --git a/src/Common/src/CoreLib/System/TimeZoneNotFoundException.cs b/src/Common/src/CoreLib/System/TimeZoneNotFoundException.cs index c28edaa2a9dc..40bd636be944 100644 --- a/src/Common/src/CoreLib/System/TimeZoneNotFoundException.cs +++ b/src/Common/src/CoreLib/System/TimeZoneNotFoundException.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.Serialization; namespace System diff --git a/src/Common/src/CoreLib/System/TimeoutException.cs b/src/Common/src/CoreLib/System/TimeoutException.cs index 7bb41e34f6ae..3e96cb8e3c9b 100644 --- a/src/Common/src/CoreLib/System/TimeoutException.cs +++ b/src/Common/src/CoreLib/System/TimeoutException.cs @@ -11,7 +11,6 @@ ** =============================================================================*/ -#nullable enable using System.Runtime.Serialization; namespace System diff --git a/src/Common/src/CoreLib/System/Tuple.cs b/src/Common/src/CoreLib/System/Tuple.cs index d3f0a91e394c..6439720da756 100644 --- a/src/Common/src/CoreLib/System/Tuple.cs +++ b/src/Common/src/CoreLib/System/Tuple.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Collections; using System.Collections.Generic; using System.Diagnostics; diff --git a/src/Common/src/CoreLib/System/TupleExtensions.cs b/src/Common/src/CoreLib/System/TupleExtensions.cs index bf1aa07f9bbd..106a88a08b6e 100644 --- a/src/Common/src/CoreLib/System/TupleExtensions.cs +++ b/src/Common/src/CoreLib/System/TupleExtensions.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.ComponentModel; using System.Runtime.CompilerServices; diff --git a/src/Common/src/CoreLib/System/Type.Enum.cs b/src/Common/src/CoreLib/System/Type.Enum.cs index 006f8e94cffe..ac610e848437 100644 --- a/src/Common/src/CoreLib/System/Type.Enum.cs +++ b/src/Common/src/CoreLib/System/Type.Enum.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Reflection; using System.Collections; using System.Collections.Generic; diff --git a/src/Common/src/CoreLib/System/Type.Helpers.cs b/src/Common/src/CoreLib/System/Type.Helpers.cs index c83b8f844987..0e871c675517 100644 --- a/src/Common/src/CoreLib/System/Type.Helpers.cs +++ b/src/Common/src/CoreLib/System/Type.Helpers.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Reflection; namespace System diff --git a/src/Common/src/CoreLib/System/Type.cs b/src/Common/src/CoreLib/System/Type.cs index 6162e12383f5..830cbd9d5004 100644 --- a/src/Common/src/CoreLib/System/Type.cs +++ b/src/Common/src/CoreLib/System/Type.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Threading; using System.Reflection; using System.Diagnostics; diff --git a/src/Common/src/CoreLib/System/TypeAccessException.cs b/src/Common/src/CoreLib/System/TypeAccessException.cs index 3cbeb02c2656..d804b408d6cc 100644 --- a/src/Common/src/CoreLib/System/TypeAccessException.cs +++ b/src/Common/src/CoreLib/System/TypeAccessException.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.Serialization; namespace System diff --git a/src/Common/src/CoreLib/System/TypeCode.cs b/src/Common/src/CoreLib/System/TypeCode.cs index 08216dc33bfa..296198656b77 100644 --- a/src/Common/src/CoreLib/System/TypeCode.cs +++ b/src/Common/src/CoreLib/System/TypeCode.cs @@ -21,7 +21,6 @@ // of an object is TypeCode.Object, a further instance-of check can be used to // determine if the object is one of these values. -#nullable enable namespace System { public enum TypeCode diff --git a/src/Common/src/CoreLib/System/TypeInitializationException.cs b/src/Common/src/CoreLib/System/TypeInitializationException.cs index c3aeb61036bf..45867464f974 100644 --- a/src/Common/src/CoreLib/System/TypeInitializationException.cs +++ b/src/Common/src/CoreLib/System/TypeInitializationException.cs @@ -14,7 +14,6 @@ ** =============================================================================*/ -#nullable enable using System.Globalization; using System.Runtime.Serialization; diff --git a/src/Common/src/CoreLib/System/TypeLoadException.cs b/src/Common/src/CoreLib/System/TypeLoadException.cs index 92afe347e24f..d18c84aa9644 100644 --- a/src/Common/src/CoreLib/System/TypeLoadException.cs +++ b/src/Common/src/CoreLib/System/TypeLoadException.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.Serialization; namespace System diff --git a/src/Common/src/CoreLib/System/TypeUnloadedException.cs b/src/Common/src/CoreLib/System/TypeUnloadedException.cs index cbdb816246b3..792f16ce0a08 100644 --- a/src/Common/src/CoreLib/System/TypeUnloadedException.cs +++ b/src/Common/src/CoreLib/System/TypeUnloadedException.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.Serialization; namespace System diff --git a/src/Common/src/CoreLib/System/UInt16.cs b/src/Common/src/CoreLib/System/UInt16.cs index 10fd7033bbc0..89e5703bb850 100644 --- a/src/Common/src/CoreLib/System/UInt16.cs +++ b/src/Common/src/CoreLib/System/UInt16.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Globalization; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/System/UInt32.cs b/src/Common/src/CoreLib/System/UInt32.cs index 400c45b9bcb4..b9cff281b9cd 100644 --- a/src/Common/src/CoreLib/System/UInt32.cs +++ b/src/Common/src/CoreLib/System/UInt32.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Globalization; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/System/UInt64.cs b/src/Common/src/CoreLib/System/UInt64.cs index 049068eaa7b1..58e06360bf23 100644 --- a/src/Common/src/CoreLib/System/UInt64.cs +++ b/src/Common/src/CoreLib/System/UInt64.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Globalization; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; diff --git a/src/Common/src/CoreLib/System/UIntPtr.cs b/src/Common/src/CoreLib/System/UIntPtr.cs index c6372f0ee327..28d7ffb15f8d 100644 --- a/src/Common/src/CoreLib/System/UIntPtr.cs +++ b/src/Common/src/CoreLib/System/UIntPtr.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Globalization; using System.Runtime.CompilerServices; using System.Runtime.Serialization; diff --git a/src/Common/src/CoreLib/System/UnauthorizedAccessException.cs b/src/Common/src/CoreLib/System/UnauthorizedAccessException.cs index 46d9446c357e..415ab422cade 100644 --- a/src/Common/src/CoreLib/System/UnauthorizedAccessException.cs +++ b/src/Common/src/CoreLib/System/UnauthorizedAccessException.cs @@ -13,7 +13,6 @@ ** ===========================================================*/ -#nullable enable using System.Runtime.Serialization; namespace System diff --git a/src/Common/src/CoreLib/System/UnhandledExceptionEventArgs.cs b/src/Common/src/CoreLib/System/UnhandledExceptionEventArgs.cs index 5f4e0109c639..c214afdc7113 100644 --- a/src/Common/src/CoreLib/System/UnhandledExceptionEventArgs.cs +++ b/src/Common/src/CoreLib/System/UnhandledExceptionEventArgs.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System { public class UnhandledExceptionEventArgs : EventArgs diff --git a/src/Common/src/CoreLib/System/UnhandledExceptionEventHandler.cs b/src/Common/src/CoreLib/System/UnhandledExceptionEventHandler.cs index 36ce061a409d..58f1eb5145d2 100644 --- a/src/Common/src/CoreLib/System/UnhandledExceptionEventHandler.cs +++ b/src/Common/src/CoreLib/System/UnhandledExceptionEventHandler.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable namespace System { public delegate void UnhandledExceptionEventHandler(object sender, UnhandledExceptionEventArgs e); diff --git a/src/Common/src/CoreLib/System/UnitySerializationHolder.cs b/src/Common/src/CoreLib/System/UnitySerializationHolder.cs index 6ebbb8af421d..a95c1123ad3f 100644 --- a/src/Common/src/CoreLib/System/UnitySerializationHolder.cs +++ b/src/Common/src/CoreLib/System/UnitySerializationHolder.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Runtime.Serialization; namespace System diff --git a/src/Common/src/CoreLib/System/ValueTuple.cs b/src/Common/src/CoreLib/System/ValueTuple.cs index 663c1ae96711..72c13b530749 100644 --- a/src/Common/src/CoreLib/System/ValueTuple.cs +++ b/src/Common/src/CoreLib/System/ValueTuple.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Collections; using System.Collections.Generic; using System.Diagnostics; diff --git a/src/Common/src/CoreLib/System/Version.cs b/src/Common/src/CoreLib/System/Version.cs index 67ddf8597f3f..3b8d1cbae01c 100644 --- a/src/Common/src/CoreLib/System/Version.cs +++ b/src/Common/src/CoreLib/System/Version.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using System.Globalization; using System.Diagnostics; using System.Text; diff --git a/src/Common/src/CoreLib/System/Void.cs b/src/Common/src/CoreLib/System/Void.cs index f0a7ddd3a025..5162e6ad02ad 100644 --- a/src/Common/src/CoreLib/System/Void.cs +++ b/src/Common/src/CoreLib/System/Void.cs @@ -7,7 +7,6 @@ // This class represents the void return type //////////////////////////////////////////////////////////////////////////////// -#nullable enable namespace System { // This class represents the void return type diff --git a/src/Common/src/CoreLib/System/WinRTFolderPaths.cs b/src/Common/src/CoreLib/System/WinRTFolderPaths.cs index c76f8afc7c89..a833f55f79ff 100644 --- a/src/Common/src/CoreLib/System/WinRTFolderPaths.cs +++ b/src/Common/src/CoreLib/System/WinRTFolderPaths.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#nullable enable using Windows.Foundation.Metadata; using Windows.Storage; using System.IO; From 068bb40c724e92ee289e6c2eb44b9ac5432b643a Mon Sep 17 00:00:00 2001 From: Stephen Toub Date: Thu, 9 May 2019 15:25:49 -0400 Subject: [PATCH 306/607] Fix netfx build with nullable annotations --- src/Common/src/CoreLib/System/IO/Path.Windows.cs | 1 + src/Common/src/CoreLib/System/IO/Path.cs | 1 + src/Common/src/CoreLib/System/IO/PathHelper.Windows.cs | 1 + src/Microsoft.Bcl.HashCode/src/Microsoft.Bcl.HashCode.csproj | 1 + .../src/Microsoft.Diagnostics.Tracing.EventSource.Redist.csproj | 1 + 5 files changed, 5 insertions(+) diff --git a/src/Common/src/CoreLib/System/IO/Path.Windows.cs b/src/Common/src/CoreLib/System/IO/Path.Windows.cs index fccd30c05237..71a986eeef4a 100644 --- a/src/Common/src/CoreLib/System/IO/Path.Windows.cs +++ b/src/Common/src/CoreLib/System/IO/Path.Windows.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable using System.Diagnostics; using System.Text; diff --git a/src/Common/src/CoreLib/System/IO/Path.cs b/src/Common/src/CoreLib/System/IO/Path.cs index 61235e3375fd..27741b9248e9 100644 --- a/src/Common/src/CoreLib/System/IO/Path.cs +++ b/src/Common/src/CoreLib/System/IO/Path.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable using System.Diagnostics; using System.Runtime.InteropServices; using System.Text; diff --git a/src/Common/src/CoreLib/System/IO/PathHelper.Windows.cs b/src/Common/src/CoreLib/System/IO/PathHelper.Windows.cs index ae935158efe5..83618cfa13c0 100644 --- a/src/Common/src/CoreLib/System/IO/PathHelper.Windows.cs +++ b/src/Common/src/CoreLib/System/IO/PathHelper.Windows.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable using System.Diagnostics; using System.Runtime.InteropServices; using System.Text; diff --git a/src/Microsoft.Bcl.HashCode/src/Microsoft.Bcl.HashCode.csproj b/src/Microsoft.Bcl.HashCode/src/Microsoft.Bcl.HashCode.csproj index bc1975586b6f..ffe0e66ed1c6 100644 --- a/src/Microsoft.Bcl.HashCode/src/Microsoft.Bcl.HashCode.csproj +++ b/src/Microsoft.Bcl.HashCode/src/Microsoft.Bcl.HashCode.csproj @@ -5,6 +5,7 @@ true $(IsPartialFacadeAssembly) netcoreapp-Debug;netcoreapp-Release;netcoreapp2.1-Debug;netcoreapp2.1-Release;netstandard-Debug;netstandard-Release;netstandard2.1-Debug;netstandard2.1-Release + enable diff --git a/src/Microsoft.Diagnostics.Tracing.EventSource.Redist/src/Microsoft.Diagnostics.Tracing.EventSource.Redist.csproj b/src/Microsoft.Diagnostics.Tracing.EventSource.Redist/src/Microsoft.Diagnostics.Tracing.EventSource.Redist.csproj index 4507b8a0da2e..3082af3c9b4b 100644 --- a/src/Microsoft.Diagnostics.Tracing.EventSource.Redist/src/Microsoft.Diagnostics.Tracing.EventSource.Redist.csproj +++ b/src/Microsoft.Diagnostics.Tracing.EventSource.Redist/src/Microsoft.Diagnostics.Tracing.EventSource.Redist.csproj @@ -5,6 +5,7 @@ $(NoWarn);CS1573 $(DefineConstants);NO_EVENTCOMMANDEXECUTED_SUPPORT;ES_BUILD_STANDALONE;FEATURE_MANAGED_ETW;PLATFORM_WINDOWS net461-Windows_NT-Debug;net461-Windows_NT-Release;netfx-Windows_NT-Debug;netfx-Windows_NT-Release + enable true From b86783ef9525f22b0576278939264897464f9bbd Mon Sep 17 00:00:00 2001 From: Stephen Toub Date: Thu, 9 May 2019 17:21:48 -0400 Subject: [PATCH 307/607] Fix netstandard build for nullable annotations --- src/Common/src/CoreLib/System/Security/PermissionSet.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Common/src/CoreLib/System/Security/PermissionSet.cs b/src/Common/src/CoreLib/System/Security/PermissionSet.cs index 9436b69585a7..7d1327df0a7e 100644 --- a/src/Common/src/CoreLib/System/Security/PermissionSet.cs +++ b/src/Common/src/CoreLib/System/Security/PermissionSet.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable using System.Security.Permissions; using System.Collections; using System.Runtime.Serialization; From 6803f28cae60b0f7f92ac70e4e57c1f0583adffd Mon Sep 17 00:00:00 2001 From: Hugh Bellamy Date: Thu, 9 May 2019 17:15:11 -0700 Subject: [PATCH 308/607] Add ServiceContainer tests and fix bugs (#37519) * Add ServiceContainer tests and fix bugs * Fix .NET Framework tests * Dummy change for CI --- .../ComponentModel/Design/ServiceContainer.cs | 44 +- .../tests/Design/ServiceContainerTests.cs | 760 ++++++++++++++++++ .../tests/Mocks/MockServiceProvider.cs | 25 + ....ComponentModel.TypeConverter.Tests.csproj | 2 + 4 files changed, 804 insertions(+), 27 deletions(-) create mode 100644 src/System.ComponentModel.TypeConverter/tests/Design/ServiceContainerTests.cs create mode 100644 src/System.ComponentModel.TypeConverter/tests/Mocks/MockServiceProvider.cs diff --git a/src/System.ComponentModel.TypeConverter/src/System/ComponentModel/Design/ServiceContainer.cs b/src/System.ComponentModel.TypeConverter/src/System/ComponentModel/Design/ServiceContainer.cs index ced7e82088bf..764e01648d59 100644 --- a/src/System.ComponentModel.TypeConverter/src/System/ComponentModel/Design/ServiceContainer.cs +++ b/src/System.ComponentModel.TypeConverter/src/System/ComponentModel/Design/ServiceContainer.cs @@ -16,7 +16,7 @@ public class ServiceContainer : IServiceContainer, IDisposable private IServiceProvider _parentProvider; private static readonly Type[] s_defaultServices = new Type[] { typeof(IServiceContainer), typeof(ServiceContainer) }; - private static TraceSwitch s_TRACESERVICE = new TraceSwitch("TRACESERVICE", "ServiceProvider: Trace service provider requests."); + private static TraceSwitch s_traceSwitch = new TraceSwitch("TRACESERVICE", "ServiceProvider: Trace service provider requests."); /// /// Creates a new service object container. @@ -34,20 +34,11 @@ public ServiceContainer(IServiceProvider parentProvider) } /// - /// Retrieves the parent service container, or null - /// if there is no parent container. + /// Retrieves the parent service container, or null if there is no parent container. /// private IServiceContainer Container { - get - { - IServiceContainer container = null; - if (_parentProvider != null) - { - container = (IServiceContainer)_parentProvider.GetService(typeof(IServiceContainer)); - } - return container; - } + get => _parentProvider?.GetService(typeof(IServiceContainer)) as IServiceContainer; } /// @@ -77,13 +68,13 @@ public void AddService(Type serviceType, object serviceInstance) /// public virtual void AddService(Type serviceType, object serviceInstance, bool promote) { - Debug.WriteLineIf(s_TRACESERVICE.TraceVerbose, $"Adding service (instance) {serviceType.Name}. Promoting: {promote.ToString()}"); + Debug.WriteLineIf(s_traceSwitch.TraceVerbose, $"Adding service (instance) {serviceType?.Name}. Promoting: {promote}"); if (promote) { IServiceContainer container = Container; if (container != null) { - Debug.WriteLineIf(s_TRACESERVICE.TraceVerbose, "Promoting to container"); + Debug.WriteLineIf(s_traceSwitch.TraceVerbose, "Promoting to container"); container.AddService(serviceType, serviceInstance, promote); return; } @@ -120,13 +111,13 @@ public void AddService(Type serviceType, ServiceCreatorCallback callback) /// public virtual void AddService(Type serviceType, ServiceCreatorCallback callback, bool promote) { - Debug.WriteLineIf(s_TRACESERVICE.TraceVerbose, $"Adding service (callback) {serviceType.Name}. Promoting: {promote.ToString()}"); + Debug.WriteLineIf(s_traceSwitch.TraceVerbose, $"Adding service (callback) {serviceType?.Name}. Promoting: {promote}"); if (promote) { IServiceContainer container = Container; if (container != null) { - Debug.WriteLineIf(s_TRACESERVICE.TraceVerbose, "Promoting to container"); + Debug.WriteLineIf(s_traceSwitch.TraceVerbose, "Promoting to container"); container.AddService(serviceType, callback, promote); return; } @@ -185,21 +176,21 @@ public virtual object GetService(Type serviceType) { object service = null; - Debug.WriteLineIf(s_TRACESERVICE.TraceVerbose, $"Searching for service {serviceType.Name}"); + Debug.WriteLineIf(s_traceSwitch.TraceVerbose, $"Searching for service {serviceType?.Name}"); // Try locally. We first test for services we // implement and then look in our service collection. Type[] defaults = DefaultServices; for (int idx = 0; idx < defaults.Length; idx++) { - if (serviceType.IsEquivalentTo(defaults[idx])) + if (serviceType != null && serviceType.IsEquivalentTo(defaults[idx])) { service = this; break; } } - if (service == null) + if (service == null && serviceType != null) { Services.TryGetValue(serviceType, out service); } @@ -207,15 +198,14 @@ public virtual object GetService(Type serviceType) // Is the service a creator delegate? if (service is ServiceCreatorCallback) { - Debug.WriteLineIf(s_TRACESERVICE.TraceVerbose, "Encountered a callback. Invoking it"); + Debug.WriteLineIf(s_traceSwitch.TraceVerbose, "Encountered a callback. Invoking it"); service = ((ServiceCreatorCallback)service)(this, serviceType); - Debug.WriteLineIf(s_TRACESERVICE.TraceVerbose, $"Callback return object: {(service == null ? "(null)" : service.ToString())}"); + Debug.WriteLineIf(s_traceSwitch.TraceVerbose, $"Callback return object: {(service == null ? "(null)" : service.ToString())}"); if (service != null && !service.GetType().IsCOMObject && !serviceType.IsInstanceOfType(service)) { // Callback passed us a bad service. NULL it, rather than throwing an exception. // Callers here do not need to be prepared to handle bad callback implemetations. - Debug.Fail($"Object {service.GetType().Name} was returned from a service creator callback but it does not implement the registered type of {serviceType.Name}"); - Debug.WriteLineIf(s_TRACESERVICE.TraceVerbose, "**** Object does not implement service interface"); + Debug.WriteLineIf(s_traceSwitch.TraceVerbose, "**** Object does not implement service interface"); service = null; } @@ -225,12 +215,12 @@ public virtual object GetService(Type serviceType) if (service == null && _parentProvider != null) { - Debug.WriteLineIf(s_TRACESERVICE.TraceVerbose, "Service unresolved. Trying parent"); + Debug.WriteLineIf(s_traceSwitch.TraceVerbose, "Service unresolved. Trying parent"); service = _parentProvider.GetService(serviceType); } #if DEBUG - if (s_TRACESERVICE.TraceVerbose && service == null) + if (s_traceSwitch.TraceVerbose && service == null) { Debug.WriteLine("******************************************"); Debug.WriteLine("FAILED to resolve service " + serviceType.Name); @@ -255,13 +245,13 @@ public void RemoveService(Type serviceType) /// public virtual void RemoveService(Type serviceType, bool promote) { - Debug.WriteLineIf(s_TRACESERVICE.TraceVerbose, $"Removing service: {serviceType.Name}, Promote: {promote.ToString()}"); + Debug.WriteLineIf(s_traceSwitch.TraceVerbose, $"Removing service: {serviceType?.Name}, Promote: {promote}"); if (promote) { IServiceContainer container = Container; if (container != null) { - Debug.WriteLineIf(s_TRACESERVICE.TraceVerbose, "Invoking parent container"); + Debug.WriteLineIf(s_traceSwitch.TraceVerbose, "Invoking parent container"); container.RemoveService(serviceType, promote); return; } diff --git a/src/System.ComponentModel.TypeConverter/tests/Design/ServiceContainerTests.cs b/src/System.ComponentModel.TypeConverter/tests/Design/ServiceContainerTests.cs new file mode 100644 index 000000000000..63bd9950607c --- /dev/null +++ b/src/System.ComponentModel.TypeConverter/tests/Design/ServiceContainerTests.cs @@ -0,0 +1,760 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Collections.Generic; +using System.ComponentModel.Tests; +using Xunit; + +namespace System.ComponentModel.Design.Tests +{ + public class ServiceContainerTests + { + [Fact] + public void Ctor_Default() + { + var container = new SubServiceContainer(); + Assert.Equal(new Type[] { typeof(IServiceContainer), typeof(ServiceContainer) }, container.DefaultServices); + Assert.Same(container.DefaultServices, container.DefaultServices); + } + + public static IEnumerable Ctor_IServiceProvider_TestData() + { + yield return new object[] { null }; + yield return new object[] { new MockServiceProvider() }; + } + + [Theory] + [MemberData(nameof(Ctor_IServiceProvider_TestData))] + public void Ctor_IServiceProvider(IServiceProvider parentProvider) + { + var container = new SubServiceContainer(parentProvider); + Assert.Equal(new Type[] { typeof(IServiceContainer), typeof(ServiceContainer) }, container.DefaultServices); + Assert.Same(container.DefaultServices, container.DefaultServices); + } + + public static IEnumerable AddService_TypeObject_TestData() + { + var nullServiceProvider = new MockServiceProvider(); + nullServiceProvider.Setup(typeof(IServiceContainer), null); + nullServiceProvider.Setup(typeof(int), null); + + var invalidServiceProvider = new MockServiceProvider(); + invalidServiceProvider.Setup(typeof(IServiceContainer), new object()); + invalidServiceProvider.Setup(typeof(int), null); + + var validServiceProvider = new MockServiceProvider(); + validServiceProvider.Setup(typeof(IServiceContainer), new ServiceContainer()); + validServiceProvider.Setup(typeof(int), null); + + var o = new object(); + foreach (IServiceProvider parentProvider in new object[] { null, nullServiceProvider, invalidServiceProvider, validServiceProvider }) + { + // .NET Core fixes an InvalidCastException bug. + if (PlatformDetection.IsFullFramework && parentProvider == invalidServiceProvider) + { + continue; + } + + yield return new object[] { parentProvider, typeof(object), o, o }; + yield return new object[] { parentProvider, typeof(object), "abc", "abc" }; + yield return new object[] { parentProvider, typeof(string), "abc", "abc" }; + } + } + + [Theory] + [MemberData(nameof(AddService_TypeObject_TestData))] + [MemberData(nameof(AddService_TypeServiceCreatorCallback_TestData))] + public void AddService_InvokeTypeObject_GetServiceReturnsExpected(IServiceProvider parentProvider, Type serviceType, object serviceInstance, object expected) + { + var container = new ServiceContainer(parentProvider); + container.AddService(serviceType, serviceInstance); + Assert.Same(expected, container.GetService(serviceType)); + } + + public static IEnumerable AddService_TypeObjectBool_TestData() + { + var nullServiceProvider = new MockServiceProvider(); + nullServiceProvider.Setup(typeof(IServiceContainer), null); + nullServiceProvider.Setup(typeof(int), null); + + var invalidServiceProvider = new MockServiceProvider(); + invalidServiceProvider.Setup(typeof(IServiceContainer), new object()); + invalidServiceProvider.Setup(typeof(int), null); + + var validServiceProvider = new MockServiceProvider(); + validServiceProvider.Setup(typeof(IServiceContainer), new ServiceContainer()); + validServiceProvider.Setup(typeof(int), null); + + var o = new object(); + foreach (bool promote in new bool[] { true, false }) + { + foreach (IServiceProvider parentProvider in new object[] { null, nullServiceProvider, invalidServiceProvider, validServiceProvider }) + { + if (promote && parentProvider == validServiceProvider) + { + continue; + } + + // .NET Core fixes an InvalidCastException bug. + if (PlatformDetection.IsFullFramework && parentProvider == invalidServiceProvider) + { + continue; + } + + yield return new object[] { parentProvider, typeof(object), o, promote, o }; + yield return new object[] { parentProvider, typeof(object), "abc", promote, "abc" }; + yield return new object[] { parentProvider, typeof(string), "abc", promote, "abc" }; + } + } + } + + [Theory] + [MemberData(nameof(AddService_TypeObjectBool_TestData))] + [MemberData(nameof(AddService_TypeServiceCreatorCallbackBool_TestData))] + public void AddService_InvokeTypeObjectBool_GetServiceReturnsExpected(IServiceProvider parentProvider, Type serviceType, object serviceInstance, bool promote, object expected) + { + var container = new ServiceContainer(parentProvider); + container.AddService(serviceType, serviceInstance, promote); + Assert.Same(expected, container.GetService(serviceType)); + } + + [Fact] + public void AddService_PromoteServiceInstanceWithValidParentProvider_AddsToParent() + { + var serviceInstance = new object(); + var parentContainer = new ServiceContainer(); + var parentProvider = new MockServiceProvider(); + parentProvider.Setup(typeof(IServiceContainer), parentContainer); + parentProvider.Setup(typeof(object), null); + var container = new ServiceContainer(parentProvider); + + container.AddService(typeof(object), serviceInstance, promote: true); + Assert.Null(container.GetService(typeof(object))); + Assert.Same(serviceInstance, parentContainer.GetService(typeof(object))); + } + + [Fact] + public void AddService_PromoteServiceInstanceWithValidGrandParentProvider_AddsToGrandParent() + { + var serviceInstance = new object(); + var grandparentContainer = new ServiceContainer(); + var grandparentProvider = new MockServiceProvider(); + grandparentProvider.Setup(typeof(IServiceContainer), grandparentContainer); + grandparentProvider.Setup(typeof(object), null); + var parentContainer = new ServiceContainer(grandparentProvider); + var parentProvider = new MockServiceProvider(); + parentProvider.Setup(typeof(IServiceContainer), parentContainer); + parentProvider.Setup(typeof(object), null); + var container = new ServiceContainer(parentProvider); + + container.AddService(typeof(object), serviceInstance, promote: true); + Assert.Null(container.GetService(typeof(object))); + Assert.Null(parentContainer.GetService(typeof(object))); + Assert.Same(serviceInstance, grandparentContainer.GetService(typeof(object))); + } + + public static IEnumerable AddService_PromoteObject_TestData() + { + ServiceCreatorCallback callback = (container, serviceType) => "abc"; + yield return new object[] { null, null }; + yield return new object[] { typeof(int), new object() }; + yield return new object[] { typeof(int), callback }; + } + + [Theory] + [MemberData(nameof(AddService_PromoteObject_TestData))] + public void AddService_PromoteObject_Success(Type serviceType, object serviceInstance) + { + var parentContainer = new CustomServiceContainer(); + int addServiceCallCount = 0; + parentContainer.AddServiceObjectAction = (callbackServiceType, callbackServiceInstance, callbackPromote) => + { + Assert.Same(serviceType, callbackServiceType); + Assert.Same(serviceInstance, callbackServiceInstance); + Assert.True(callbackPromote); + addServiceCallCount++; + }; + var parentProvider = new MockServiceProvider(); + parentProvider.Setup(typeof(IServiceContainer), parentContainer); + var container = new ServiceContainer(parentProvider); + + container.AddService(serviceType, serviceInstance, promote: true); + Assert.Equal(1, addServiceCallCount); + } + + public static IEnumerable AddService_PromoteCallback_TestData() + { + ServiceCreatorCallback callback = (container, serviceType) => "abc"; + yield return new object[] { null, null }; + yield return new object[] { typeof(int), callback }; + } + + [Theory] + [MemberData(nameof(AddService_PromoteCallback_TestData))] + public void AddService_PromoteCallback_Success(Type serviceType, ServiceCreatorCallback callback) + { + var parentContainer = new CustomServiceContainer(); + int addServiceCallCount = 0; + parentContainer.AddServiceCallbackAction = (callbackServiceType, callbackCallback, callbackPromote) => + { + Assert.Same(serviceType, callbackServiceType); + Assert.Same(callback, callbackCallback); + Assert.True(callbackPromote); + addServiceCallCount++; + }; + var parentProvider = new MockServiceProvider(); + parentProvider.Setup(typeof(IServiceContainer), parentContainer); + var container = new ServiceContainer(parentProvider); + + container.AddService(serviceType, callback, promote: true); + Assert.Equal(1, addServiceCallCount); + } + + [Fact] + public void AddService_NullServiceType_ThrowsArgumentNullException() + { + var container = new ServiceContainer(); + ServiceCreatorCallback callback = (container, serviceType) => "abc"; + Assert.Throws("serviceType", () => container.AddService(null, new object())); + Assert.Throws("serviceType", () => container.AddService(null, new object(), true)); + Assert.Throws("serviceType", () => container.AddService(null, new object(), false)); + Assert.Throws("serviceType", () => container.AddService(null, callback)); + Assert.Throws("serviceType", () => container.AddService(null, callback, true)); + Assert.Throws("serviceType", () => container.AddService(null, callback, false)); + } + + [Fact] + public void AddService_NullServiceInstance_ThrowsArgumentNullException() + { + var container = new ServiceContainer(); + Assert.Throws("serviceInstance", () => container.AddService(typeof(object), (object)null)); + Assert.Throws("serviceInstance", () => container.AddService(typeof(object), (object)null, true)); + Assert.Throws("serviceInstance", () => container.AddService(typeof(object), (object)null, false)); + } + + [Fact] + public void AddService_ServiceInstanceNotInstanceOfType_ThrowsArgumentException() + { + var container = new ServiceContainer(); + Assert.Throws(null, () => container.AddService(typeof(int), new object())); + Assert.Throws(null, () => container.AddService(typeof(int), new object(), true)); + Assert.Throws(null, () => container.AddService(typeof(int), new object(), false)); + } + + [Fact] + public void AddService_AlreadyAddedServiceInstance_ThrowsArgumentException() + { + var container = new ServiceContainer(); + var serviceInstance = new object(); + ServiceCreatorCallback callback = (container, serviceType) => "abc"; + container.AddService(typeof(object), serviceInstance); + Assert.Throws("serviceType", () => container.AddService(typeof(object), new object())); + Assert.Throws("serviceType", () => container.AddService(typeof(object), new object(), true)); + Assert.Throws("serviceType", () => container.AddService(typeof(object), new object(), false)); + Assert.Throws("serviceType", () => container.AddService(typeof(object), callback)); + Assert.Throws("serviceType", () => container.AddService(typeof(object), callback, true)); + Assert.Throws("serviceType", () => container.AddService(typeof(object), callback, false)); + } + + public static IEnumerable AddService_TypeServiceCreatorCallback_TestData() + { + var nullServiceProvider = new MockServiceProvider(); + nullServiceProvider.Setup(typeof(IServiceContainer), null); + nullServiceProvider.Setup(typeof(object), null); + nullServiceProvider.Setup(typeof(int), null); + + var invalidServiceProvider = new MockServiceProvider(); + invalidServiceProvider.Setup(typeof(IServiceContainer), new object()); + invalidServiceProvider.Setup(typeof(object), null); + invalidServiceProvider.Setup(typeof(int), null); + + var validServiceProvider = new MockServiceProvider(); + validServiceProvider.Setup(typeof(IServiceContainer), new ServiceContainer()); + validServiceProvider.Setup(typeof(object), null); + validServiceProvider.Setup(typeof(int), null); + + var o = new object(); + ServiceCreatorCallback callback = (container, serviceType) => "abc"; + ServiceCreatorCallback nullCallback = (container, serviceType) => null; + foreach (IServiceProvider parentProvider in new object[] { null, nullServiceProvider, invalidServiceProvider, validServiceProvider }) + { + // .NET Core fixes an InvalidCastException bug. + if (PlatformDetection.IsFullFramework && parentProvider == invalidServiceProvider) + { + continue; + } + + yield return new object[] { parentProvider, typeof(object), callback, "abc" }; + yield return new object[] { parentProvider, typeof(string), callback, "abc" }; + yield return new object[] { parentProvider, typeof(int), callback, null }; + + yield return new object[] { parentProvider, typeof(object), nullCallback, null }; + yield return new object[] { parentProvider, typeof(int), nullCallback, null }; + } + + var customServiceProvider = new MockServiceProvider(); + customServiceProvider.Setup(typeof(int), o); + yield return new object[] { customServiceProvider, typeof(int), callback, o }; + } + + [Theory] + [MemberData(nameof(AddService_TypeServiceCreatorCallback_TestData))] + public void AddService_TypeServiceCreatorCallback_GetServiceReturnsExpected(IServiceProvider parentProvider, Type serviceType, ServiceCreatorCallback callback, object expected) + { + var container = new ServiceContainer(parentProvider); + container.AddService(serviceType, callback); + Assert.Same(expected, container.GetService(serviceType)); + } + + public static IEnumerable AddService_TypeServiceCreatorCallbackBool_TestData() + { + var nullServiceProvider = new MockServiceProvider(); + nullServiceProvider.Setup(typeof(IServiceContainer), null); + nullServiceProvider.Setup(typeof(object), null); + nullServiceProvider.Setup(typeof(int), null); + + var invalidServiceProvider = new MockServiceProvider(); + invalidServiceProvider.Setup(typeof(IServiceContainer), new object()); + invalidServiceProvider.Setup(typeof(object), null); + invalidServiceProvider.Setup(typeof(int), null); + + var validServiceProvider = new MockServiceProvider(); + validServiceProvider.Setup(typeof(IServiceContainer), new ServiceContainer()); + validServiceProvider.Setup(typeof(object), null); + validServiceProvider.Setup(typeof(int), null); + + var o = new object(); + ServiceCreatorCallback callback = (container, serviceType) => "abc"; + ServiceCreatorCallback nullCallback = (container, serviceType) => null; + foreach (bool promote in new bool[] { true, false }) + { + foreach (IServiceProvider parentProvider in new object[] { null, nullServiceProvider, invalidServiceProvider, validServiceProvider }) + { + if (promote && parentProvider == validServiceProvider) + { + continue; + } + + // .NET Core fixes an InvalidCastException bug. + if (PlatformDetection.IsFullFramework && parentProvider == invalidServiceProvider) + { + continue; + } + + yield return new object[] { parentProvider, typeof(object), callback, promote, "abc" }; + yield return new object[] { parentProvider, typeof(string), callback, promote, "abc" }; + yield return new object[] { parentProvider, typeof(int), callback, promote, null }; + + yield return new object[] { parentProvider, typeof(object), nullCallback, promote, null }; + yield return new object[] { parentProvider, typeof(int), nullCallback, promote, null }; + } + + var customServiceProvider = new MockServiceProvider(); + customServiceProvider.Setup(typeof(IServiceContainer), null); + customServiceProvider.Setup(typeof(int), o); + yield return new object[] { customServiceProvider, typeof(int), callback, promote, o }; + } + } + + [Theory] + [MemberData(nameof(AddService_TypeServiceCreatorCallbackBool_TestData))] + public void AddService_InvokeTypeServiceCreatorCallbackBool_GetServiceReturnsExpected(IServiceProvider parentProvider, Type serviceType, ServiceCreatorCallback callback, bool promote, object expected) + { + var container = new ServiceContainer(parentProvider); + container.AddService(serviceType, callback, promote); + Assert.Same(expected, container.GetService(serviceType)); + } + + [Fact] + public void AddService_PromoteCallbackWithNoParentProvider_AddsToCurrent() + { + var serviceInstance = new object(); + var container = new ServiceContainer(); + ServiceCreatorCallback callback = (c, serviceType) => + { + Assert.Same(container, c); + Assert.Equal(typeof(object), serviceType); + return serviceInstance; + }; + container.AddService(typeof(object), callback, promote: true); + Assert.Same(serviceInstance, container.GetService(typeof(object))); + } + + [Fact] + public void AddService_PromoteCallbackWithValidParentProvider_AddsToParent() + { + var serviceInstance = new object(); + var parentContainer = new ServiceContainer(); + var parentProvider = new MockServiceProvider(); + parentProvider.Setup(typeof(IServiceContainer), parentContainer); + parentProvider.Setup(typeof(object), null); + var container = new ServiceContainer(parentProvider); + + ServiceCreatorCallback callback = (c, serviceType) => + { + Assert.Same(parentContainer, c); + Assert.Equal(typeof(object), serviceType); + return serviceInstance; + }; + container.AddService(typeof(object), callback, promote: true); + Assert.Null(container.GetService(typeof(object))); + Assert.Same(serviceInstance, parentContainer.GetService(typeof(object))); + } + + [Fact] + public void AddService_PromoteServiceCallbackithValidGrandParentProvider_AddsToGrandParent() + { + var serviceInstance = new object(); + var grandparentContainer = new ServiceContainer(); + var grandparentProvider = new MockServiceProvider(); + grandparentProvider.Setup(typeof(IServiceContainer), grandparentContainer); + grandparentProvider.Setup(typeof(object), null); + var parentContainer = new ServiceContainer(grandparentProvider); + var parentProvider = new MockServiceProvider(); + parentProvider.Setup(typeof(IServiceContainer), parentContainer); + parentProvider.Setup(typeof(object), null); + var container = new ServiceContainer(parentProvider); + + ServiceCreatorCallback callback = (c, serviceType) => + { + Assert.Same(grandparentContainer, c); + Assert.Equal(typeof(object), serviceType); + return serviceInstance; + }; + container.AddService(typeof(object), callback, promote: true); + Assert.Null(container.GetService(typeof(object))); + Assert.Null(parentContainer.GetService(typeof(object))); + Assert.Same(serviceInstance, grandparentContainer.GetService(typeof(object))); + } + + [Fact] + public void AddService_NullCallback_ThrowsArgumentNullException() + { + var container = new ServiceContainer(); + Assert.Throws("callback", () => container.AddService(typeof(object), null)); + Assert.Throws("callback", () => container.AddService(typeof(object), null, true)); + Assert.Throws("callback", () => container.AddService(typeof(object), null, false)); + } + + [Fact] + public void AddService_AlreadyAddedCallback_ThrowsArgumentException() + { + var container = new ServiceContainer(); + var serviceInstance = new object(); + ServiceCreatorCallback callback = (container, serviceType) => "abc"; + container.AddService(typeof(object), callback); + Assert.Throws("serviceType", () => container.AddService(typeof(object), new object())); + Assert.Throws("serviceType", () => container.AddService(typeof(object), new object(), true)); + Assert.Throws("serviceType", () => container.AddService(typeof(object), new object(), false)); + Assert.Throws("serviceType", () => container.AddService(typeof(object), callback)); + Assert.Throws("serviceType", () => container.AddService(typeof(object), callback, true)); + Assert.Throws("serviceType", () => container.AddService(typeof(object), callback, false)); + } + + [Fact] + public void Dispose_Invoke_ClearsServices() + { + var container = new ServiceContainer(); + container.AddService(typeof(object), new object()); + container.Dispose(); + Assert.Null(container.GetService(typeof(object))); + + // Dispose again. + container.Dispose(); + Assert.Null(container.GetService(typeof(object))); + } + + [Fact] + public void Dispose_InvokeWithDisposableObject_CallsDispose() + { + var componentContainer = new Container(); + var component = new Component(); + componentContainer.Add(component); + Assert.Same(componentContainer, component.Container); + + var container = new ServiceContainer(); + container.AddService(typeof(object), component); + container.Dispose(); + Assert.Null(component.Container); + Assert.Null(container.GetService(typeof(object))); + + // Dispose again. + container.Dispose(); + Assert.Null(component.Container); + Assert.Null(container.GetService(typeof(object))); + } + + [Fact] + public void Dispose_InvokeDisposing_ClearsServices() + { + var container = new SubServiceContainer(); + var serviceInstance = new object(); + container.AddService(typeof(object), serviceInstance); + + container.Dispose(disposing: false); + Assert.Same(serviceInstance, container.GetService(typeof(object))); + + container.Dispose(disposing: true); + Assert.Null(container.GetService(typeof(object))); + + // Dispose again. + container.Dispose(disposing: true); + Assert.Null(container.GetService(typeof(object))); + } + + [Fact] + public void Dispose_InvokeDisposingWithDisposableObject_CallsDispose() + { + var componentContainer = new Container(); + var component = new Component(); + componentContainer.Add(component); + Assert.Same(componentContainer, component.Container); + + var container = new SubServiceContainer(); + container.AddService(typeof(object), component); + + container.Dispose(disposing: false); + Assert.Same(componentContainer, component.Container); + Assert.Same(component, container.GetService(typeof(object))); + + container.Dispose(disposing: true); + Assert.Null(component.Container); + Assert.Null(container.GetService(typeof(object))); + + // Dispose again. + container.Dispose(disposing: true); + Assert.Null(component.Container); + Assert.Null(container.GetService(typeof(object))); + } + + [Theory] + [InlineData(typeof(IServiceContainer))] + [InlineData(typeof(ServiceContainer))] + public void GetService_DefaultService_ReturnsExpected(Type serviceType) + { + var container = new ServiceContainer(); + Assert.Same(container, container.GetService(serviceType)); + + // Should return the container even if overriden. + container.AddService(serviceType, new ServiceContainer()); + Assert.Same(container, container.GetService(serviceType)); + } + + [Theory] + [InlineData(null)] + [InlineData(typeof(int))] + [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, ".NET Core fixes a NRE bug.")] + public void GetService_NoSuchService_ReturnsNull(Type serviceType) + { + var container = new ServiceContainer(); + Assert.Null(container.GetService(serviceType)); + } + + public static IEnumerable RemoveService_Type_TestData() + { + var nullServiceProvider = new MockServiceProvider(); + nullServiceProvider.Setup(typeof(IServiceContainer), null); + nullServiceProvider.Setup(typeof(int), null); + yield return new object[] { nullServiceProvider }; + + // .NET Core fixes an InvalidCastException bug. + if (!PlatformDetection.IsFullFramework) + { + var invalidServiceProvider = new MockServiceProvider(); + invalidServiceProvider.Setup(typeof(IServiceContainer), new object()); + invalidServiceProvider.Setup(typeof(int), null); + yield return new object[] { invalidServiceProvider }; + } + + var validServiceProvider = new MockServiceProvider(); + validServiceProvider.Setup(typeof(IServiceContainer), new ServiceContainer()); + validServiceProvider.Setup(typeof(int), null); + yield return new object[] { validServiceProvider }; + } + + [Theory] + [MemberData(nameof(RemoveService_Type_TestData))] + public void RemoveService_InvokeType_GetServiceReturnsNull(IServiceProvider parentProvider) + { + var container = new ServiceContainer(parentProvider); + container.AddService(typeof(int), 1); + container.RemoveService(typeof(int)); + Assert.Null(container.GetService(typeof(int))); + } + + public static IEnumerable RemoveService_TypeBool_TestData() + { + var nullServiceProvider = new MockServiceProvider(); + nullServiceProvider.Setup(typeof(IServiceContainer), null); + nullServiceProvider.Setup(typeof(int), null); + yield return new object[] { nullServiceProvider, true }; + yield return new object[] { nullServiceProvider, false }; + + // .NET Core fixes an InvalidCastException bug. + if (!PlatformDetection.IsFullFramework) + { + var invalidServiceProvider = new MockServiceProvider(); + invalidServiceProvider.Setup(typeof(IServiceContainer), new object()); + invalidServiceProvider.Setup(typeof(int), null); + yield return new object[] { invalidServiceProvider, true }; + yield return new object[] { invalidServiceProvider, false }; + } + + var validServiceProvider = new MockServiceProvider(); + validServiceProvider.Setup(typeof(IServiceContainer), new ServiceContainer()); + validServiceProvider.Setup(typeof(int), null); + yield return new object[] { validServiceProvider, false }; + } + + [Theory] + [MemberData(nameof(RemoveService_TypeBool_TestData))] + public void RemoveService_InvokeTypeBool_GetServiceReturnsNull(IServiceProvider parentProvider, bool promote) + { + var container = new ServiceContainer(parentProvider); + container.AddService(typeof(int), 1); + container.RemoveService(typeof(int), promote); + Assert.Null(container.GetService(typeof(int))); + } + + [Fact] + public void RemoveService_PromoteServiceInstanceWithValidParentProvider_RemovesFromParent() + { + var serviceInstance = new object(); + var parentContainer = new ServiceContainer(); + var parentProvider = new MockServiceProvider(); + parentProvider.Setup(typeof(IServiceContainer), parentContainer); + parentProvider.Setup(typeof(object), null); + var container = new ServiceContainer(parentProvider); + + container.AddService(typeof(object), serviceInstance, promote: true); + container.RemoveService(typeof(object), promote: true); + Assert.Null(container.GetService(typeof(object))); + Assert.Null(parentContainer.GetService(typeof(object))); + } + + [Fact] + public void RemoveService_PromoteServiceInstanceWithValidGrandParentProvider_RemovesFromGrandParent() + { + var serviceInstance = new object(); + var grandparentContainer = new ServiceContainer(); + var grandparentProvider = new MockServiceProvider(); + grandparentProvider.Setup(typeof(IServiceContainer), grandparentContainer); + grandparentProvider.Setup(typeof(object), null); + var parentContainer = new ServiceContainer(grandparentProvider); + var parentProvider = new MockServiceProvider(); + parentProvider.Setup(typeof(IServiceContainer), parentContainer); + parentProvider.Setup(typeof(object), null); + var container = new ServiceContainer(parentProvider); + + container.AddService(typeof(object), serviceInstance, promote: true); + container.RemoveService(typeof(object), promote: true); + Assert.Null(container.GetService(typeof(object))); + Assert.Null(parentContainer.GetService(typeof(object))); + Assert.Null(grandparentContainer.GetService(typeof(object))); + } + + public static IEnumerable RemoveService_Promote_TestData() + { + yield return new object[] { null }; + yield return new object[] { typeof(int) }; + } + + [Theory] + [MemberData(nameof(RemoveService_Promote_TestData))] + public void RemoveService_Promote_Success(Type serviceType) + { + var parentContainer = new CustomServiceContainer(); + int removeServiceCallCount = 0; + parentContainer.RemoveServiceAction = (callbackServiceType, callbackPromote) => + { + Assert.Same(serviceType, callbackServiceType); + Assert.True(callbackPromote); + removeServiceCallCount++; + }; + var parentProvider = new MockServiceProvider(); + parentProvider.Setup(typeof(IServiceContainer), parentContainer); + var container = new ServiceContainer(parentProvider); + + container.RemoveService(serviceType, promote: true); + Assert.Equal(1, removeServiceCallCount); + } + + [Fact] + public void RemoveService_NoSuchService_Nop() + { + var container = new ServiceContainer(); + container.RemoveService(typeof(int)); + container.RemoveService(typeof(int), promote: true); + container.RemoveService(typeof(int), false); + } + + [Fact] + public void RemoveService_NullServiceType_ThrowsArgumentNullException() + { + var container = new ServiceContainer(); + Assert.Throws("serviceType", () => container.RemoveService(null)); + Assert.Throws("serviceType", () => container.RemoveService(null, true)); + Assert.Throws("serviceType", () => container.RemoveService(null, false)); + } + + private class SubServiceContainer : ServiceContainer + { + public SubServiceContainer() : base() + { + } + + public SubServiceContainer(IServiceProvider parentProvider) : base(parentProvider) + { + } + + public new Type[] DefaultServices => base.DefaultServices; + + public new void Dispose(bool disposing) => base.Dispose(disposing); + } + + private class CustomServiceContainer : IServiceContainer + { + public void AddService(Type serviceType, object serviceInstance) + { + throw new NotImplementedException(); + } + + public Action AddServiceObjectAction { get; set; } + + public void AddService(Type serviceType, object serviceInstance, bool promote) + { + AddServiceObjectAction(serviceType, serviceInstance, promote); + } + + public void AddService(Type serviceType, ServiceCreatorCallback callback) + { + throw new NotImplementedException(); + } + + public Action AddServiceCallbackAction { get; set; } + + public void AddService(Type serviceType, ServiceCreatorCallback callback, bool promote) + { + AddServiceCallbackAction(serviceType, callback, promote); + } + + public object GetService(Type serviceType) + { + throw new NotImplementedException(); + } + + public void RemoveService(Type serviceType) + { + throw new NotImplementedException(); + } + + public Action RemoveServiceAction { get; set; } + + public void RemoveService(Type serviceType, bool promote) + { + RemoveServiceAction(serviceType, promote); + } + } + } +} diff --git a/src/System.ComponentModel.TypeConverter/tests/Mocks/MockServiceProvider.cs b/src/System.ComponentModel.TypeConverter/tests/Mocks/MockServiceProvider.cs new file mode 100644 index 000000000000..da563fd72d03 --- /dev/null +++ b/src/System.ComponentModel.TypeConverter/tests/Mocks/MockServiceProvider.cs @@ -0,0 +1,25 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Collections.Generic; + +namespace System.ComponentModel.Tests +{ + public class MockServiceProvider : IServiceProvider + { + private Dictionary Services { get; } = new Dictionary(); + + public void Setup(Type serviceType, object service) => Services.Add(serviceType, service); + + public object GetService(Type serviceType) + { + if (!Services.TryGetValue(serviceType, out object value)) + { + throw new NotImplementedException("Unrecognized service: " + serviceType.ToString()); + } + + return value; + } + } +} diff --git a/src/System.ComponentModel.TypeConverter/tests/System.ComponentModel.TypeConverter.Tests.csproj b/src/System.ComponentModel.TypeConverter/tests/System.ComponentModel.TypeConverter.Tests.csproj index 27fa5d36bb71..50be0858b3fc 100644 --- a/src/System.ComponentModel.TypeConverter/tests/System.ComponentModel.TypeConverter.Tests.csproj +++ b/src/System.ComponentModel.TypeConverter/tests/System.ComponentModel.TypeConverter.Tests.csproj @@ -76,6 +76,7 @@ + @@ -100,6 +101,7 @@ + From 441238d5a50ee3cb19179e93c2b94ec7b09ca214 Mon Sep 17 00:00:00 2001 From: Jose Perez Rodriguez Date: Thu, 9 May 2019 20:01:57 -0700 Subject: [PATCH 309/607] Adding typeforward to AsyncInterfaces now that the type has been added to netstandard (#37575) * Adding typeforward to AsyncInterfaces now that the type has been added to netstandard * Remove baseline entry for missing type --- eng/Version.Details.xml | 40 +++++++++---------- eng/Versions.props | 18 ++++----- global.json | 2 +- .../Microsoft.Bcl.AsyncInterfaces.Forwards.cs | 2 +- ...Microsoft.Bcl.AsyncInterfaces.Tests.csproj | 3 +- ...iCompatBaseline.netcoreapp.netstandard.txt | 3 +- .../ApiCompatBaseline.uap.netstandard.txt | 3 +- .../ApiCompatBaseline.uapaot.netstandard.txt | 3 +- 8 files changed, 35 insertions(+), 39 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 4a8d28f1291e..898b3b0f0436 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -1,46 +1,46 @@ - + https://github.com/dotnet/coreclr - 794f2f89399026246562181bc999a5027fb6583d + a086fa2466d601fed6d2f4fb029b78613bf4ec7a - + https://github.com/dotnet/coreclr - 794f2f89399026246562181bc999a5027fb6583d + a086fa2466d601fed6d2f4fb029b78613bf4ec7a - + https://github.com/dotnet/coreclr - 794f2f89399026246562181bc999a5027fb6583d + a086fa2466d601fed6d2f4fb029b78613bf4ec7a - + https://github.com/dotnet/core-setup - 19ecb4847b57249bdee93d14eeea81bbc0174ff5 + a8478dda1140e055651636fe35cad036f2585edd - + https://github.com/dotnet/core-setup - 19ecb4847b57249bdee93d14eeea81bbc0174ff5 + a8478dda1140e055651636fe35cad036f2585edd - + https://github.com/dotnet/core-setup - 19ecb4847b57249bdee93d14eeea81bbc0174ff5 + a8478dda1140e055651636fe35cad036f2585edd - + https://github.com/dotnet/corefx - f7cd353ab8b08ff45d45985851505e5f8f19f9ac + 7076e2b603c3ba8f22fdb802aa4b078296ecd6b3 - + https://github.com/dotnet/corefx - f7cd353ab8b08ff45d45985851505e5f8f19f9ac + 7076e2b603c3ba8f22fdb802aa4b078296ecd6b3 https://github.com/dotnet/arcade a7a250e9c13147134543c35fef2fb81f19592edf - + https://github.com/dotnet/standard - a7b363dce648ea14f1b240b0253b7d944f4777e7 + 013b89db06c1f331804d2c07c79c9b5192b3c5d7 https://github.com/dotnet/arcade @@ -94,9 +94,9 @@ https://github.com/dotnet/arcade 1b8589bbf53b9a5e819460798eff59830f39a3be - + https://dev.azure.com/dnceng/internal/_git/dotnet-optimization - db72bf1818ade45a480461868abd67ab2fe03c35 + d2be6e027cb7d128e710a8f2efa97fff82ecff20 diff --git a/eng/Versions.props b/eng/Versions.props index fbb1ee4f38c7..97aed519d273 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -36,18 +36,18 @@ 2.2.0-beta.19254.1 1.0.0-beta.19254.1 - 3.0.0-preview6-27708-04 - 3.0.0-preview6-27708-04 - 3.0.0-preview6-27708-04 + 3.0.0-preview6-27709-05 + 3.0.0-preview6-27709-05 + 3.0.0-preview6-27709-05 - 3.0.0-preview6-27708-71 - 3.0.0-preview6-27708-71 + 3.0.0-preview6-27709-73 + 3.0.0-preview6-27709-73 - 3.0.0-preview6.19259.1 - 4.6.0-preview6.19259.1 + 3.0.0-preview6.19259.7 + 4.6.0-preview6.19259.7 - 2.1.0-prerelease.19259.6 + 2.1.0-prerelease.19259.7 - 99.99.99-master-20190509.1 + 99.99.99-master-20190509.3 diff --git a/global.json b/global.json index bab1fd8f4648..2f309a320edb 100644 --- a/global.json +++ b/global.json @@ -5,6 +5,6 @@ "msbuild-sdks": { "Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19229.8", "Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19257.7", - "Microsoft.NET.Sdk.IL": "3.0.0-preview6-27708-71" + "Microsoft.NET.Sdk.IL": "3.0.0-preview6-27709-73" } } diff --git a/src/Microsoft.Bcl.AsyncInterfaces/ref/Microsoft.Bcl.AsyncInterfaces.Forwards.cs b/src/Microsoft.Bcl.AsyncInterfaces/ref/Microsoft.Bcl.AsyncInterfaces.Forwards.cs index ec398f0ff1b5..11b154948a4a 100644 --- a/src/Microsoft.Bcl.AsyncInterfaces/ref/Microsoft.Bcl.AsyncInterfaces.Forwards.cs +++ b/src/Microsoft.Bcl.AsyncInterfaces/ref/Microsoft.Bcl.AsyncInterfaces.Forwards.cs @@ -9,5 +9,5 @@ [assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.CompilerServices.AsyncIteratorStateMachineAttribute))] [assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.CompilerServices.ConfiguredAsyncDisposable))] [assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.CompilerServices.ConfiguredCancelableAsyncEnumerable<>))] -//[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Threading.Tasks.TaskAsyncEnumerableExtensions))] // TODO #37354: Once .NET Standard 2.1 includes this type, uncomment this. +[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Threading.Tasks.TaskAsyncEnumerableExtensions))] [assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Threading.Tasks.Sources.ManualResetValueTaskSourceCore<>))] diff --git a/src/Microsoft.Bcl.AsyncInterfaces/tests/Microsoft.Bcl.AsyncInterfaces.Tests.csproj b/src/Microsoft.Bcl.AsyncInterfaces/tests/Microsoft.Bcl.AsyncInterfaces.Tests.csproj index 4e7fff5e4626..371802d7ba75 100644 --- a/src/Microsoft.Bcl.AsyncInterfaces/tests/Microsoft.Bcl.AsyncInterfaces.Tests.csproj +++ b/src/Microsoft.Bcl.AsyncInterfaces/tests/Microsoft.Bcl.AsyncInterfaces.Tests.csproj @@ -7,10 +7,9 @@ Common\tests\System\Threading\Tasks\Sources\ManualResetValueTaskSource.cs - + System.Threading.Tasks.Extensions\tests\ManualResetValueTaskSourceTests.cs diff --git a/src/shims/ApiCompatBaseline.netcoreapp.netstandard.txt b/src/shims/ApiCompatBaseline.netcoreapp.netstandard.txt index 9a3dc0f4baa6..33b0f212b273 100644 --- a/src/shims/ApiCompatBaseline.netcoreapp.netstandard.txt +++ b/src/shims/ApiCompatBaseline.netcoreapp.netstandard.txt @@ -71,5 +71,4 @@ MembersMustExist : Member 'System.Linq.EnumerableQuery..ctor()' does not exist i MembersMustExist : Member 'System.Threading.Tasks.TaskExtensions.ConfigureAwait(System.IAsyncDisposable, System.Boolean)' does not exist in the implementation but it does exist in the contract. MembersMustExist : Member 'System.Threading.Tasks.TaskExtensions.ConfigureAwait(System.Collections.Generic.IAsyncEnumerable, System.Boolean)' does not exist in the implementation but it does exist in the contract. MembersMustExist : Member 'System.Threading.Tasks.TaskExtensions.WithCancellation(System.Collections.Generic.IAsyncEnumerable, System.Threading.CancellationToken)' does not exist in the implementation but it does exist in the contract. -TypesMustExist : Type 'System.Threading.Tasks.TaskAsyncEnumerableExtensions' does not exist in the implementation but it does exist in the contract. -Total Issues: 63 \ No newline at end of file +Total Issues: 62 \ No newline at end of file diff --git a/src/shims/ApiCompatBaseline.uap.netstandard.txt b/src/shims/ApiCompatBaseline.uap.netstandard.txt index e350812b1e40..e16da4da5c2d 100644 --- a/src/shims/ApiCompatBaseline.uap.netstandard.txt +++ b/src/shims/ApiCompatBaseline.uap.netstandard.txt @@ -141,5 +141,4 @@ CannotSealType : Type 'System.Linq.EnumerableExecutor' is effectively (has a pri MembersMustExist : Member 'System.Linq.EnumerableExecutor..ctor()' does not exist in the implementation but it does exist in the contract. CannotSealType : Type 'System.Linq.EnumerableQuery' is effectively (has a private constructor) sealed in the implementation but not sealed in the contract. MembersMustExist : Member 'System.Linq.EnumerableQuery..ctor()' does not exist in the implementation but it does exist in the contract. -TypesMustExist : Type 'System.Threading.Tasks.TaskAsyncEnumerableExtensions' does not exist in the implementation but it does exist in the contract. -Total Issues: 125 \ No newline at end of file +Total Issues: 124 \ No newline at end of file diff --git a/src/shims/ApiCompatBaseline.uapaot.netstandard.txt b/src/shims/ApiCompatBaseline.uapaot.netstandard.txt index 8a6df03d09e6..285d6c34eb21 100644 --- a/src/shims/ApiCompatBaseline.uapaot.netstandard.txt +++ b/src/shims/ApiCompatBaseline.uapaot.netstandard.txt @@ -147,5 +147,4 @@ CannotSealType : Type 'System.Linq.EnumerableExecutor' is effectively (has a pri MembersMustExist : Member 'System.Linq.EnumerableExecutor..ctor()' does not exist in the implementation but it does exist in the contract. CannotSealType : Type 'System.Linq.EnumerableQuery' is effectively (has a private constructor) sealed in the implementation but not sealed in the contract. MembersMustExist : Member 'System.Linq.EnumerableQuery..ctor()' does not exist in the implementation but it does exist in the contract. -TypesMustExist : Type 'System.Threading.Tasks.TaskAsyncEnumerableExtensions' does not exist in the implementation but it does exist in the contract. -Total Issues: 131 \ No newline at end of file +Total Issues: 130 \ No newline at end of file From 9d02eb96686c32ae131ab14c9d08a12bacb89979 Mon Sep 17 00:00:00 2001 From: Tanner Gooding Date: Fri, 10 May 2019 08:01:26 -0700 Subject: [PATCH 310/607] Fixing the ApCompatBaselines for System.Runtime.Intrinsics and System.Numerics.Vectors (#37568) * Ensure that the System.Numerics.Vectors implementation and ref match. * Ensure that the System.Runtime.Intrinsics implementation and ref match. * Ensure that the System.Runtime.Intrinsics.Experimental implementation and ref match. --- .../src/ApiCompatBaseline.uapaot.txt | 7 -- .../src/MatchingRefApiCompatBaseline.txt | 8 -- .../System.Runtime.Intrinsics.Experimental.cs | 5 ++ ...tem.Runtime.Intrinsics.Experimental.csproj | 1 - .../src/MatchingRefApiCompatBaseline.txt | 7 -- ...tem.Runtime.Intrinsics.Experimental.csproj | 1 - .../ref/System.Runtime.Intrinsics.cs | 80 +++++++++++++++++++ .../ref/System.Runtime.Intrinsics.csproj | 3 +- .../src/MatchingRefApiCompatBaseline.txt | 17 ---- .../src/System.Runtime.Intrinsics.csproj | 3 +- 10 files changed, 87 insertions(+), 45 deletions(-) delete mode 100644 src/System.Numerics.Vectors/src/ApiCompatBaseline.uapaot.txt delete mode 100644 src/System.Numerics.Vectors/src/MatchingRefApiCompatBaseline.txt delete mode 100644 src/System.Runtime.Intrinsics.Experimental/src/MatchingRefApiCompatBaseline.txt delete mode 100644 src/System.Runtime.Intrinsics/src/MatchingRefApiCompatBaseline.txt diff --git a/src/System.Numerics.Vectors/src/ApiCompatBaseline.uapaot.txt b/src/System.Numerics.Vectors/src/ApiCompatBaseline.uapaot.txt deleted file mode 100644 index ccf8db70f13e..000000000000 --- a/src/System.Numerics.Vectors/src/ApiCompatBaseline.uapaot.txt +++ /dev/null @@ -1,7 +0,0 @@ -Compat issues with assembly System.Numerics.Vectors: -MembersMustExist : Member 'System.Numerics.Vector..ctor(System.ReadOnlySpan)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.Numerics.Vector..ctor(System.ReadOnlySpan)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.Numerics.Vector.CopyTo(System.Span)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.Numerics.Vector.CopyTo(System.Span)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.Numerics.Vector.TryCopyTo(System.Span)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.Numerics.Vector.TryCopyTo(System.Span)' does not exist in the implementation but it does exist in the contract. diff --git a/src/System.Numerics.Vectors/src/MatchingRefApiCompatBaseline.txt b/src/System.Numerics.Vectors/src/MatchingRefApiCompatBaseline.txt deleted file mode 100644 index bcd55f2de339..000000000000 --- a/src/System.Numerics.Vectors/src/MatchingRefApiCompatBaseline.txt +++ /dev/null @@ -1,8 +0,0 @@ -Compat issues with assembly System.Numerics.Vectors: -MembersMustExist : Member 'System.Numerics.Vector..ctor(System.ReadOnlySpan)' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'System.Numerics.Vector..ctor(System.ReadOnlySpan)' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'System.Numerics.Vector.CopyTo(System.Span)' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'System.Numerics.Vector.CopyTo(System.Span)' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'System.Numerics.Vector.TryCopyTo(System.Span)' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'System.Numerics.Vector.TryCopyTo(System.Span)' does not exist in the reference but it does exist in the implementation. -Total Issues: 6 diff --git a/src/System.Runtime.Intrinsics.Experimental/ref/System.Runtime.Intrinsics.Experimental.cs b/src/System.Runtime.Intrinsics.Experimental/ref/System.Runtime.Intrinsics.Experimental.cs index 7c25ca2a268e..4210250eda15 100644 --- a/src/System.Runtime.Intrinsics.Experimental/ref/System.Runtime.Intrinsics.Experimental.cs +++ b/src/System.Runtime.Intrinsics.Experimental/ref/System.Runtime.Intrinsics.Experimental.cs @@ -7,6 +7,7 @@ namespace System.Runtime.Intrinsics.Arm.Arm64 { + [System.CLSCompliantAttribute(false)] public static partial class Aes { public static bool IsSupported { get { throw null; } } @@ -15,6 +16,7 @@ public static partial class Aes public static System.Runtime.Intrinsics.Vector128 InverseMixColumns(System.Runtime.Intrinsics.Vector128 value) { throw null; } public static System.Runtime.Intrinsics.Vector128 MixColumns(System.Runtime.Intrinsics.Vector128 value) { throw null; } } + [System.CLSCompliantAttribute(false)] public static partial class Base { public static bool IsSupported { get { throw null; } } @@ -25,6 +27,7 @@ public static partial class Base public static int LeadingZeroCount(uint value) { throw null; } public static int LeadingZeroCount(ulong value) { throw null; } } + [System.CLSCompliantAttribute(false)] public static partial class Sha1 { public static bool IsSupported { get { throw null; } } @@ -35,6 +38,7 @@ public static partial class Sha1 public static System.Runtime.Intrinsics.Vector128 SchedulePart1(System.Runtime.Intrinsics.Vector128 w0_3, System.Runtime.Intrinsics.Vector128 w4_7, System.Runtime.Intrinsics.Vector128 w8_11) { throw null; } public static System.Runtime.Intrinsics.Vector128 SchedulePart2(System.Runtime.Intrinsics.Vector128 tw0_3, System.Runtime.Intrinsics.Vector128 w12_15) { throw null; } } + [System.CLSCompliantAttribute(false)] public static partial class Sha256 { public static bool IsSupported { get { throw null; } } @@ -43,6 +47,7 @@ public static partial class Sha256 public static System.Runtime.Intrinsics.Vector128 SchedulePart1(System.Runtime.Intrinsics.Vector128 w0_3, System.Runtime.Intrinsics.Vector128 w4_7) { throw null; } public static System.Runtime.Intrinsics.Vector128 SchedulePart2(System.Runtime.Intrinsics.Vector128 w0_3, System.Runtime.Intrinsics.Vector128 w8_11, System.Runtime.Intrinsics.Vector128 w12_15) { throw null; } } + [System.CLSCompliantAttribute(false)] public static partial class Simd { public static bool IsSupported { get { throw null; } } diff --git a/src/System.Runtime.Intrinsics.Experimental/ref/System.Runtime.Intrinsics.Experimental.csproj b/src/System.Runtime.Intrinsics.Experimental/ref/System.Runtime.Intrinsics.Experimental.csproj index 3372317eda19..d99b9ec2d761 100644 --- a/src/System.Runtime.Intrinsics.Experimental/ref/System.Runtime.Intrinsics.Experimental.csproj +++ b/src/System.Runtime.Intrinsics.Experimental/ref/System.Runtime.Intrinsics.Experimental.csproj @@ -1,7 +1,6 @@ true - false {4074AF8C-8C65-486C-960E-F45DAAB0BE0D} netcoreapp-Debug;netcoreapp-Release diff --git a/src/System.Runtime.Intrinsics.Experimental/src/MatchingRefApiCompatBaseline.txt b/src/System.Runtime.Intrinsics.Experimental/src/MatchingRefApiCompatBaseline.txt deleted file mode 100644 index 5c4643f958f0..000000000000 --- a/src/System.Runtime.Intrinsics.Experimental/src/MatchingRefApiCompatBaseline.txt +++ /dev/null @@ -1,7 +0,0 @@ -Compat issues with assembly System.Runtime.Intrinsics.Experimental: -CannotRemoveAttribute : Attribute 'System.CLSCompliantAttribute' exists on 'System.Runtime.Intrinsics.Arm.Arm64.Aes' in the implementation but not the reference. -CannotRemoveAttribute : Attribute 'System.CLSCompliantAttribute' exists on 'System.Runtime.Intrinsics.Arm.Arm64.Base' in the implementation but not the reference. -CannotRemoveAttribute : Attribute 'System.CLSCompliantAttribute' exists on 'System.Runtime.Intrinsics.Arm.Arm64.Sha1' in the implementation but not the reference. -CannotRemoveAttribute : Attribute 'System.CLSCompliantAttribute' exists on 'System.Runtime.Intrinsics.Arm.Arm64.Sha256' in the implementation but not the reference. -CannotRemoveAttribute : Attribute 'System.CLSCompliantAttribute' exists on 'System.Runtime.Intrinsics.Arm.Arm64.Simd' in the implementation but not the reference. -Total Issues: 5 diff --git a/src/System.Runtime.Intrinsics.Experimental/src/System.Runtime.Intrinsics.Experimental.csproj b/src/System.Runtime.Intrinsics.Experimental/src/System.Runtime.Intrinsics.Experimental.csproj index 524b52493bc0..b86335064fdd 100644 --- a/src/System.Runtime.Intrinsics.Experimental/src/System.Runtime.Intrinsics.Experimental.csproj +++ b/src/System.Runtime.Intrinsics.Experimental/src/System.Runtime.Intrinsics.Experimental.csproj @@ -2,7 +2,6 @@ System.Runtime.Intrinsics.Experimental true - false {543FBFE5-E9E4-4631-8242-911A707FE818} netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release diff --git a/src/System.Runtime.Intrinsics/ref/System.Runtime.Intrinsics.cs b/src/System.Runtime.Intrinsics/ref/System.Runtime.Intrinsics.cs index a2b43196d816..7a1f7d718eaa 100644 --- a/src/System.Runtime.Intrinsics/ref/System.Runtime.Intrinsics.cs +++ b/src/System.Runtime.Intrinsics/ref/System.Runtime.Intrinsics.cs @@ -14,10 +14,14 @@ public static partial class Vector128 public static System.Runtime.Intrinsics.Vector128 AsInt16(this System.Runtime.Intrinsics.Vector128 vector) where T : struct { throw null; } public static System.Runtime.Intrinsics.Vector128 AsInt32(this System.Runtime.Intrinsics.Vector128 vector) where T : struct { throw null; } public static System.Runtime.Intrinsics.Vector128 AsInt64(this System.Runtime.Intrinsics.Vector128 vector) where T : struct { throw null; } + [System.CLSCompliantAttribute(false)] public static System.Runtime.Intrinsics.Vector128 AsSByte(this System.Runtime.Intrinsics.Vector128 vector) where T : struct { throw null; } public static System.Runtime.Intrinsics.Vector128 AsSingle(this System.Runtime.Intrinsics.Vector128 vector) where T : struct { throw null; } + [System.CLSCompliantAttribute(false)] public static System.Runtime.Intrinsics.Vector128 AsUInt16(this System.Runtime.Intrinsics.Vector128 vector) where T : struct { throw null; } + [System.CLSCompliantAttribute(false)] public static System.Runtime.Intrinsics.Vector128 AsUInt32(this System.Runtime.Intrinsics.Vector128 vector) where T : struct { throw null; } + [System.CLSCompliantAttribute(false)] public static System.Runtime.Intrinsics.Vector128 AsUInt64(this System.Runtime.Intrinsics.Vector128 vector) where T : struct { throw null; } public static System.Runtime.Intrinsics.Vector128 As(this System.Runtime.Intrinsics.Vector128 vector) where T : struct where U : struct { throw null; } public static System.Runtime.Intrinsics.Vector128 Create(byte value) { throw null; } @@ -35,40 +39,60 @@ public static partial class Vector128 public static System.Runtime.Intrinsics.Vector128 Create(System.Runtime.Intrinsics.Vector64 lower, System.Runtime.Intrinsics.Vector64 upper) { throw null; } public static System.Runtime.Intrinsics.Vector128 Create(System.Runtime.Intrinsics.Vector64 lower, System.Runtime.Intrinsics.Vector64 upper) { throw null; } public static System.Runtime.Intrinsics.Vector128 Create(System.Runtime.Intrinsics.Vector64 lower, System.Runtime.Intrinsics.Vector64 upper) { throw null; } + [System.CLSCompliantAttribute(false)] public static System.Runtime.Intrinsics.Vector128 Create(System.Runtime.Intrinsics.Vector64 lower, System.Runtime.Intrinsics.Vector64 upper) { throw null; } public static System.Runtime.Intrinsics.Vector128 Create(System.Runtime.Intrinsics.Vector64 lower, System.Runtime.Intrinsics.Vector64 upper) { throw null; } + [System.CLSCompliantAttribute(false)] public static System.Runtime.Intrinsics.Vector128 Create(System.Runtime.Intrinsics.Vector64 lower, System.Runtime.Intrinsics.Vector64 upper) { throw null; } + [System.CLSCompliantAttribute(false)] public static System.Runtime.Intrinsics.Vector128 Create(System.Runtime.Intrinsics.Vector64 lower, System.Runtime.Intrinsics.Vector64 upper) { throw null; } + [System.CLSCompliantAttribute(false)] public static System.Runtime.Intrinsics.Vector128 Create(System.Runtime.Intrinsics.Vector64 lower, System.Runtime.Intrinsics.Vector64 upper) { throw null; } + [System.CLSCompliantAttribute(false)] public static System.Runtime.Intrinsics.Vector128 Create(sbyte value) { throw null; } + [System.CLSCompliantAttribute(false)] public static System.Runtime.Intrinsics.Vector128 Create(sbyte e0, sbyte e1, sbyte e2, sbyte e3, sbyte e4, sbyte e5, sbyte e6, sbyte e7, sbyte e8, sbyte e9, sbyte e10, sbyte e11, sbyte e12, sbyte e13, sbyte e14, sbyte e15) { throw null; } public static System.Runtime.Intrinsics.Vector128 Create(float value) { throw null; } public static System.Runtime.Intrinsics.Vector128 Create(float e0, float e1, float e2, float e3) { throw null; } + [System.CLSCompliantAttribute(false)] public static System.Runtime.Intrinsics.Vector128 Create(ushort value) { throw null; } + [System.CLSCompliantAttribute(false)] public static System.Runtime.Intrinsics.Vector128 Create(ushort e0, ushort e1, ushort e2, ushort e3, ushort e4, ushort e5, ushort e6, ushort e7) { throw null; } + [System.CLSCompliantAttribute(false)] public static System.Runtime.Intrinsics.Vector128 Create(uint value) { throw null; } + [System.CLSCompliantAttribute(false)] public static System.Runtime.Intrinsics.Vector128 Create(uint e0, uint e1, uint e2, uint e3) { throw null; } + [System.CLSCompliantAttribute(false)] public static System.Runtime.Intrinsics.Vector128 Create(ulong value) { throw null; } + [System.CLSCompliantAttribute(false)] public static System.Runtime.Intrinsics.Vector128 Create(ulong e0, ulong e1) { throw null; } public static System.Runtime.Intrinsics.Vector128 CreateScalar(byte value) { throw null; } public static System.Runtime.Intrinsics.Vector128 CreateScalar(double value) { throw null; } public static System.Runtime.Intrinsics.Vector128 CreateScalar(short value) { throw null; } public static System.Runtime.Intrinsics.Vector128 CreateScalar(int value) { throw null; } public static System.Runtime.Intrinsics.Vector128 CreateScalar(long value) { throw null; } + [System.CLSCompliantAttribute(false)] public static System.Runtime.Intrinsics.Vector128 CreateScalar(sbyte value) { throw null; } public static System.Runtime.Intrinsics.Vector128 CreateScalar(float value) { throw null; } + [System.CLSCompliantAttribute(false)] public static System.Runtime.Intrinsics.Vector128 CreateScalar(ushort value) { throw null; } + [System.CLSCompliantAttribute(false)] public static System.Runtime.Intrinsics.Vector128 CreateScalar(uint value) { throw null; } + [System.CLSCompliantAttribute(false)] public static System.Runtime.Intrinsics.Vector128 CreateScalar(ulong value) { throw null; } public static System.Runtime.Intrinsics.Vector128 CreateScalarUnsafe(byte value) { throw null; } public static System.Runtime.Intrinsics.Vector128 CreateScalarUnsafe(double value) { throw null; } public static System.Runtime.Intrinsics.Vector128 CreateScalarUnsafe(short value) { throw null; } public static System.Runtime.Intrinsics.Vector128 CreateScalarUnsafe(int value) { throw null; } public static System.Runtime.Intrinsics.Vector128 CreateScalarUnsafe(long value) { throw null; } + [System.CLSCompliantAttribute(false)] public static System.Runtime.Intrinsics.Vector128 CreateScalarUnsafe(sbyte value) { throw null; } public static System.Runtime.Intrinsics.Vector128 CreateScalarUnsafe(float value) { throw null; } + [System.CLSCompliantAttribute(false)] public static System.Runtime.Intrinsics.Vector128 CreateScalarUnsafe(ushort value) { throw null; } + [System.CLSCompliantAttribute(false)] public static System.Runtime.Intrinsics.Vector128 CreateScalarUnsafe(uint value) { throw null; } + [System.CLSCompliantAttribute(false)] public static System.Runtime.Intrinsics.Vector128 CreateScalarUnsafe(ulong value) { throw null; } public static T GetElement(this System.Runtime.Intrinsics.Vector128 vector, int index) where T : struct { throw null; } public static System.Runtime.Intrinsics.Vector64 GetLower(this System.Runtime.Intrinsics.Vector128 vector) where T : struct { throw null; } @@ -99,10 +123,14 @@ public static partial class Vector256 public static System.Runtime.Intrinsics.Vector256 AsInt16(this System.Runtime.Intrinsics.Vector256 vector) where T : struct { throw null; } public static System.Runtime.Intrinsics.Vector256 AsInt32(this System.Runtime.Intrinsics.Vector256 vector) where T : struct { throw null; } public static System.Runtime.Intrinsics.Vector256 AsInt64(this System.Runtime.Intrinsics.Vector256 vector) where T : struct { throw null; } + [System.CLSCompliantAttribute(false)] public static System.Runtime.Intrinsics.Vector256 AsSByte(this System.Runtime.Intrinsics.Vector256 vector) where T : struct { throw null; } public static System.Runtime.Intrinsics.Vector256 AsSingle(this System.Runtime.Intrinsics.Vector256 vector) where T : struct { throw null; } + [System.CLSCompliantAttribute(false)] public static System.Runtime.Intrinsics.Vector256 AsUInt16(this System.Runtime.Intrinsics.Vector256 vector) where T : struct { throw null; } + [System.CLSCompliantAttribute(false)] public static System.Runtime.Intrinsics.Vector256 AsUInt32(this System.Runtime.Intrinsics.Vector256 vector) where T : struct { throw null; } + [System.CLSCompliantAttribute(false)] public static System.Runtime.Intrinsics.Vector256 AsUInt64(this System.Runtime.Intrinsics.Vector256 vector) where T : struct { throw null; } public static System.Runtime.Intrinsics.Vector256 As(this System.Runtime.Intrinsics.Vector256 vector) where T : struct where U : struct { throw null; } public static System.Runtime.Intrinsics.Vector256 Create(byte value) { throw null; } @@ -120,40 +148,60 @@ public static partial class Vector256 public static System.Runtime.Intrinsics.Vector256 Create(System.Runtime.Intrinsics.Vector128 lower, System.Runtime.Intrinsics.Vector128 upper) { throw null; } public static System.Runtime.Intrinsics.Vector256 Create(System.Runtime.Intrinsics.Vector128 lower, System.Runtime.Intrinsics.Vector128 upper) { throw null; } public static System.Runtime.Intrinsics.Vector256 Create(System.Runtime.Intrinsics.Vector128 lower, System.Runtime.Intrinsics.Vector128 upper) { throw null; } + [System.CLSCompliantAttribute(false)] public static System.Runtime.Intrinsics.Vector256 Create(System.Runtime.Intrinsics.Vector128 lower, System.Runtime.Intrinsics.Vector128 upper) { throw null; } public static System.Runtime.Intrinsics.Vector256 Create(System.Runtime.Intrinsics.Vector128 lower, System.Runtime.Intrinsics.Vector128 upper) { throw null; } + [System.CLSCompliantAttribute(false)] public static System.Runtime.Intrinsics.Vector256 Create(System.Runtime.Intrinsics.Vector128 lower, System.Runtime.Intrinsics.Vector128 upper) { throw null; } + [System.CLSCompliantAttribute(false)] public static System.Runtime.Intrinsics.Vector256 Create(System.Runtime.Intrinsics.Vector128 lower, System.Runtime.Intrinsics.Vector128 upper) { throw null; } + [System.CLSCompliantAttribute(false)] public static System.Runtime.Intrinsics.Vector256 Create(System.Runtime.Intrinsics.Vector128 lower, System.Runtime.Intrinsics.Vector128 upper) { throw null; } + [System.CLSCompliantAttribute(false)] public static System.Runtime.Intrinsics.Vector256 Create(sbyte value) { throw null; } + [System.CLSCompliantAttribute(false)] public static System.Runtime.Intrinsics.Vector256 Create(sbyte e0, sbyte e1, sbyte e2, sbyte e3, sbyte e4, sbyte e5, sbyte e6, sbyte e7, sbyte e8, sbyte e9, sbyte e10, sbyte e11, sbyte e12, sbyte e13, sbyte e14, sbyte e15, sbyte e16, sbyte e17, sbyte e18, sbyte e19, sbyte e20, sbyte e21, sbyte e22, sbyte e23, sbyte e24, sbyte e25, sbyte e26, sbyte e27, sbyte e28, sbyte e29, sbyte e30, sbyte e31) { throw null; } public static System.Runtime.Intrinsics.Vector256 Create(float value) { throw null; } public static System.Runtime.Intrinsics.Vector256 Create(float e0, float e1, float e2, float e3, float e4, float e5, float e6, float e7) { throw null; } + [System.CLSCompliantAttribute(false)] public static System.Runtime.Intrinsics.Vector256 Create(ushort value) { throw null; } + [System.CLSCompliantAttribute(false)] public static System.Runtime.Intrinsics.Vector256 Create(ushort e0, ushort e1, ushort e2, ushort e3, ushort e4, ushort e5, ushort e6, ushort e7, ushort e8, ushort e9, ushort e10, ushort e11, ushort e12, ushort e13, ushort e14, ushort e15) { throw null; } + [System.CLSCompliantAttribute(false)] public static System.Runtime.Intrinsics.Vector256 Create(uint value) { throw null; } + [System.CLSCompliantAttribute(false)] public static System.Runtime.Intrinsics.Vector256 Create(uint e0, uint e1, uint e2, uint e3, uint e4, uint e5, uint e6, uint e7) { throw null; } + [System.CLSCompliantAttribute(false)] public static System.Runtime.Intrinsics.Vector256 Create(ulong value) { throw null; } + [System.CLSCompliantAttribute(false)] public static System.Runtime.Intrinsics.Vector256 Create(ulong e0, ulong e1, ulong e2, ulong e3) { throw null; } public static System.Runtime.Intrinsics.Vector256 CreateScalar(byte value) { throw null; } public static System.Runtime.Intrinsics.Vector256 CreateScalar(double value) { throw null; } public static System.Runtime.Intrinsics.Vector256 CreateScalar(short value) { throw null; } public static System.Runtime.Intrinsics.Vector256 CreateScalar(int value) { throw null; } public static System.Runtime.Intrinsics.Vector256 CreateScalar(long value) { throw null; } + [System.CLSCompliantAttribute(false)] public static System.Runtime.Intrinsics.Vector256 CreateScalar(sbyte value) { throw null; } public static System.Runtime.Intrinsics.Vector256 CreateScalar(float value) { throw null; } + [System.CLSCompliantAttribute(false)] public static System.Runtime.Intrinsics.Vector256 CreateScalar(ushort value) { throw null; } + [System.CLSCompliantAttribute(false)] public static System.Runtime.Intrinsics.Vector256 CreateScalar(uint value) { throw null; } + [System.CLSCompliantAttribute(false)] public static System.Runtime.Intrinsics.Vector256 CreateScalar(ulong value) { throw null; } public static System.Runtime.Intrinsics.Vector256 CreateScalarUnsafe(byte value) { throw null; } public static System.Runtime.Intrinsics.Vector256 CreateScalarUnsafe(double value) { throw null; } public static System.Runtime.Intrinsics.Vector256 CreateScalarUnsafe(short value) { throw null; } public static System.Runtime.Intrinsics.Vector256 CreateScalarUnsafe(int value) { throw null; } public static System.Runtime.Intrinsics.Vector256 CreateScalarUnsafe(long value) { throw null; } + [System.CLSCompliantAttribute(false)] public static System.Runtime.Intrinsics.Vector256 CreateScalarUnsafe(sbyte value) { throw null; } public static System.Runtime.Intrinsics.Vector256 CreateScalarUnsafe(float value) { throw null; } + [System.CLSCompliantAttribute(false)] public static System.Runtime.Intrinsics.Vector256 CreateScalarUnsafe(ushort value) { throw null; } + [System.CLSCompliantAttribute(false)] public static System.Runtime.Intrinsics.Vector256 CreateScalarUnsafe(uint value) { throw null; } + [System.CLSCompliantAttribute(false)] public static System.Runtime.Intrinsics.Vector256 CreateScalarUnsafe(ulong value) { throw null; } public static T GetElement(this System.Runtime.Intrinsics.Vector256 vector, int index) where T : struct { throw null; } public static System.Runtime.Intrinsics.Vector128 GetLower(this System.Runtime.Intrinsics.Vector256 vector) where T : struct { throw null; } @@ -182,10 +230,14 @@ public static partial class Vector64 public static System.Runtime.Intrinsics.Vector64 AsInt16(this System.Runtime.Intrinsics.Vector64 vector) where T : struct { throw null; } public static System.Runtime.Intrinsics.Vector64 AsInt32(this System.Runtime.Intrinsics.Vector64 vector) where T : struct { throw null; } public static System.Runtime.Intrinsics.Vector64 AsInt64(this System.Runtime.Intrinsics.Vector64 vector) where T : struct { throw null; } + [System.CLSCompliantAttribute(false)] public static System.Runtime.Intrinsics.Vector64 AsSByte(this System.Runtime.Intrinsics.Vector64 vector) where T : struct { throw null; } public static System.Runtime.Intrinsics.Vector64 AsSingle(this System.Runtime.Intrinsics.Vector64 vector) where T : struct { throw null; } + [System.CLSCompliantAttribute(false)] public static System.Runtime.Intrinsics.Vector64 AsUInt16(this System.Runtime.Intrinsics.Vector64 vector) where T : struct { throw null; } + [System.CLSCompliantAttribute(false)] public static System.Runtime.Intrinsics.Vector64 AsUInt32(this System.Runtime.Intrinsics.Vector64 vector) where T : struct { throw null; } + [System.CLSCompliantAttribute(false)] public static System.Runtime.Intrinsics.Vector64 AsUInt64(this System.Runtime.Intrinsics.Vector64 vector) where T : struct { throw null; } public static System.Runtime.Intrinsics.Vector64 As(this System.Runtime.Intrinsics.Vector64 vector) where T : struct where U : struct { throw null; } public static System.Runtime.Intrinsics.Vector64 Create(byte value) { throw null; } @@ -196,28 +248,41 @@ public static partial class Vector64 public static System.Runtime.Intrinsics.Vector64 Create(int value) { throw null; } public static System.Runtime.Intrinsics.Vector64 Create(int e0, int e1) { throw null; } public static System.Runtime.Intrinsics.Vector64 Create(long value) { throw null; } + [System.CLSCompliantAttribute(false)] public static System.Runtime.Intrinsics.Vector64 Create(sbyte value) { throw null; } + [System.CLSCompliantAttribute(false)] public static System.Runtime.Intrinsics.Vector64 Create(sbyte e0, sbyte e1, sbyte e2, sbyte e3, sbyte e4, sbyte e5, sbyte e6, sbyte e7) { throw null; } public static System.Runtime.Intrinsics.Vector64 Create(float value) { throw null; } public static System.Runtime.Intrinsics.Vector64 Create(float e0, float e1) { throw null; } + [System.CLSCompliantAttribute(false)] public static System.Runtime.Intrinsics.Vector64 Create(ushort value) { throw null; } + [System.CLSCompliantAttribute(false)] public static System.Runtime.Intrinsics.Vector64 Create(ushort e0, ushort e1, ushort e2, ushort e3) { throw null; } + [System.CLSCompliantAttribute(false)] public static System.Runtime.Intrinsics.Vector64 Create(uint value) { throw null; } + [System.CLSCompliantAttribute(false)] public static System.Runtime.Intrinsics.Vector64 Create(uint e0, uint e1) { throw null; } + [System.CLSCompliantAttribute(false)] public static System.Runtime.Intrinsics.Vector64 Create(ulong value) { throw null; } public static System.Runtime.Intrinsics.Vector64 CreateScalar(byte value) { throw null; } public static System.Runtime.Intrinsics.Vector64 CreateScalar(short value) { throw null; } public static System.Runtime.Intrinsics.Vector64 CreateScalar(int value) { throw null; } + [System.CLSCompliantAttribute(false)] public static System.Runtime.Intrinsics.Vector64 CreateScalar(sbyte value) { throw null; } public static System.Runtime.Intrinsics.Vector64 CreateScalar(float value) { throw null; } + [System.CLSCompliantAttribute(false)] public static System.Runtime.Intrinsics.Vector64 CreateScalar(ushort value) { throw null; } + [System.CLSCompliantAttribute(false)] public static System.Runtime.Intrinsics.Vector64 CreateScalar(uint value) { throw null; } public static System.Runtime.Intrinsics.Vector64 CreateScalarUnsafe(byte value) { throw null; } public static System.Runtime.Intrinsics.Vector64 CreateScalarUnsafe(short value) { throw null; } public static System.Runtime.Intrinsics.Vector64 CreateScalarUnsafe(int value) { throw null; } + [System.CLSCompliantAttribute(false)] public static System.Runtime.Intrinsics.Vector64 CreateScalarUnsafe(sbyte value) { throw null; } public static System.Runtime.Intrinsics.Vector64 CreateScalarUnsafe(float value) { throw null; } + [System.CLSCompliantAttribute(false)] public static System.Runtime.Intrinsics.Vector64 CreateScalarUnsafe(ushort value) { throw null; } + [System.CLSCompliantAttribute(false)] public static System.Runtime.Intrinsics.Vector64 CreateScalarUnsafe(uint value) { throw null; } public static T GetElement(this System.Runtime.Intrinsics.Vector64 vector, int index) where T : struct { throw null; } public static T ToScalar(this System.Runtime.Intrinsics.Vector64 vector) where T : struct { throw null; } @@ -240,6 +305,7 @@ public static partial class Vector64 } namespace System.Runtime.Intrinsics.X86 { + [System.CLSCompliantAttribute(false)] public abstract partial class Aes : System.Runtime.Intrinsics.X86.Sse2 { internal Aes() { } @@ -251,6 +317,7 @@ internal Aes() { } public static System.Runtime.Intrinsics.Vector128 InverseMixColumns(System.Runtime.Intrinsics.Vector128 value) { throw null; } public static System.Runtime.Intrinsics.Vector128 KeygenAssist(System.Runtime.Intrinsics.Vector128 value, byte control) { throw null; } } + [System.CLSCompliantAttribute(false)] public abstract partial class Avx : System.Runtime.Intrinsics.X86.Sse42 { internal Avx() { } @@ -475,6 +542,7 @@ public unsafe static void StoreAlignedNonTemporal(ulong* address, System.Runtime public static System.Runtime.Intrinsics.Vector256 Xor(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) { throw null; } public static System.Runtime.Intrinsics.Vector256 Xor(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) { throw null; } } + [System.CLSCompliantAttribute(false)] public abstract partial class Avx2 : System.Runtime.Intrinsics.X86.Avx { internal Avx2() { } @@ -873,6 +941,7 @@ public unsafe static void MaskStore(ulong* address, System.Runtime.Intrinsics.Ve public static System.Runtime.Intrinsics.Vector256 Xor(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) { throw null; } public static System.Runtime.Intrinsics.Vector256 Xor(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) { throw null; } } + [System.CLSCompliantAttribute(false)] public abstract partial class Bmi1 { internal Bmi1() { } @@ -897,6 +966,7 @@ internal X64() { } public static ulong TrailingZeroCount(ulong value) { throw null; } } } + [System.CLSCompliantAttribute(false)] public abstract partial class Bmi2 { internal Bmi2() { } @@ -952,6 +1022,7 @@ public enum FloatComparisonMode : byte OrderedGreaterThanNonSignaling = (byte)30, UnorderedTrueSignaling = (byte)31, } + [System.CLSCompliantAttribute(false)] public abstract partial class Fma : System.Runtime.Intrinsics.X86.Avx { internal Fma() { } @@ -989,6 +1060,7 @@ internal Fma() { } public static System.Runtime.Intrinsics.Vector128 MultiplySubtractScalar(System.Runtime.Intrinsics.Vector128 a, System.Runtime.Intrinsics.Vector128 b, System.Runtime.Intrinsics.Vector128 c) { throw null; } public static System.Runtime.Intrinsics.Vector128 MultiplySubtractScalar(System.Runtime.Intrinsics.Vector128 a, System.Runtime.Intrinsics.Vector128 b, System.Runtime.Intrinsics.Vector128 c) { throw null; } } + [System.CLSCompliantAttribute(false)] public abstract partial class Lzcnt { internal Lzcnt() { } @@ -1001,6 +1073,7 @@ internal X64() { } public static ulong LeadingZeroCount(ulong value) { throw null; } } } + [System.CLSCompliantAttribute(false)] public abstract partial class Pclmulqdq : System.Runtime.Intrinsics.X86.Sse2 { internal Pclmulqdq() { } @@ -1008,6 +1081,7 @@ internal Pclmulqdq() { } public static System.Runtime.Intrinsics.Vector128 CarrylessMultiply(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right, byte control) { throw null; } public static System.Runtime.Intrinsics.Vector128 CarrylessMultiply(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right, byte control) { throw null; } } + [System.CLSCompliantAttribute(false)] public abstract partial class Popcnt : System.Runtime.Intrinsics.X86.Sse42 { internal Popcnt() { } @@ -1020,6 +1094,7 @@ internal X64() { } public static ulong PopCount(ulong value) { throw null; } } } + [System.CLSCompliantAttribute(false)] public abstract partial class Sse { internal Sse() { } @@ -1120,6 +1195,7 @@ internal X64() { } public static long ConvertToInt64WithTruncation(System.Runtime.Intrinsics.Vector128 value) { throw null; } } } + [System.CLSCompliantAttribute(false)] public abstract partial class Sse2 : System.Runtime.Intrinsics.X86.Sse { internal Sse2() { } @@ -1436,6 +1512,7 @@ public unsafe static void StoreNonTemporal(long* address, long value) { } public unsafe static void StoreNonTemporal(ulong* address, ulong value) { } } } + [System.CLSCompliantAttribute(false)] public abstract partial class Sse3 : System.Runtime.Intrinsics.X86.Sse2 { internal Sse3() { } @@ -1459,6 +1536,7 @@ internal Sse3() { } public static System.Runtime.Intrinsics.Vector128 MoveHighAndDuplicate(System.Runtime.Intrinsics.Vector128 source) { throw null; } public static System.Runtime.Intrinsics.Vector128 MoveLowAndDuplicate(System.Runtime.Intrinsics.Vector128 source) { throw null; } } + [System.CLSCompliantAttribute(false)] public abstract partial class Sse41 : System.Runtime.Intrinsics.X86.Ssse3 { internal Sse41() { } @@ -1636,6 +1714,7 @@ internal X64() { } public static System.Runtime.Intrinsics.Vector128 Insert(System.Runtime.Intrinsics.Vector128 value, ulong data, byte index) { throw null; } } } + [System.CLSCompliantAttribute(false)] public abstract partial class Sse42 : System.Runtime.Intrinsics.X86.Sse41 { internal Sse42() { } @@ -1651,6 +1730,7 @@ internal X64() { } public static ulong Crc32(ulong crc, ulong data) { throw null; } } } + [System.CLSCompliantAttribute(false)] public abstract partial class Ssse3 : System.Runtime.Intrinsics.X86.Sse3 { internal Ssse3() { } diff --git a/src/System.Runtime.Intrinsics/ref/System.Runtime.Intrinsics.csproj b/src/System.Runtime.Intrinsics/ref/System.Runtime.Intrinsics.csproj index e41aed2a41f9..878c747ee6a7 100644 --- a/src/System.Runtime.Intrinsics/ref/System.Runtime.Intrinsics.csproj +++ b/src/System.Runtime.Intrinsics/ref/System.Runtime.Intrinsics.csproj @@ -1,7 +1,6 @@ true - false {F9097917-AFA3-4E3E-A592-BFA2C483C7E2} netcoreapp-Debug;netcoreapp-Release @@ -11,4 +10,4 @@ - \ No newline at end of file + diff --git a/src/System.Runtime.Intrinsics/src/MatchingRefApiCompatBaseline.txt b/src/System.Runtime.Intrinsics/src/MatchingRefApiCompatBaseline.txt deleted file mode 100644 index 1fc4c505b55f..000000000000 --- a/src/System.Runtime.Intrinsics/src/MatchingRefApiCompatBaseline.txt +++ /dev/null @@ -1,17 +0,0 @@ -Compat issues with assembly System.Runtime.Intrinsics: -CannotRemoveAttribute : Attribute 'System.CLSCompliantAttribute' exists on 'System.Runtime.Intrinsics.X86.Aes' in the implementation but not the reference. -CannotRemoveAttribute : Attribute 'System.CLSCompliantAttribute' exists on 'System.Runtime.Intrinsics.X86.Avx' in the implementation but not the reference. -CannotRemoveAttribute : Attribute 'System.CLSCompliantAttribute' exists on 'System.Runtime.Intrinsics.X86.Avx2' in the implementation but not the reference. -CannotRemoveAttribute : Attribute 'System.CLSCompliantAttribute' exists on 'System.Runtime.Intrinsics.X86.Bmi1' in the implementation but not the reference. -CannotRemoveAttribute : Attribute 'System.CLSCompliantAttribute' exists on 'System.Runtime.Intrinsics.X86.Bmi2' in the implementation but not the reference. -CannotRemoveAttribute : Attribute 'System.CLSCompliantAttribute' exists on 'System.Runtime.Intrinsics.X86.Fma' in the implementation but not the reference. -CannotRemoveAttribute : Attribute 'System.CLSCompliantAttribute' exists on 'System.Runtime.Intrinsics.X86.Lzcnt' in the implementation but not the reference. -CannotRemoveAttribute : Attribute 'System.CLSCompliantAttribute' exists on 'System.Runtime.Intrinsics.X86.Pclmulqdq' in the implementation but not the reference. -CannotRemoveAttribute : Attribute 'System.CLSCompliantAttribute' exists on 'System.Runtime.Intrinsics.X86.Popcnt' in the implementation but not the reference. -CannotRemoveAttribute : Attribute 'System.CLSCompliantAttribute' exists on 'System.Runtime.Intrinsics.X86.Sse' in the implementation but not the reference. -CannotRemoveAttribute : Attribute 'System.CLSCompliantAttribute' exists on 'System.Runtime.Intrinsics.X86.Sse2' in the implementation but not the reference. -CannotRemoveAttribute : Attribute 'System.CLSCompliantAttribute' exists on 'System.Runtime.Intrinsics.X86.Sse3' in the implementation but not the reference. -CannotRemoveAttribute : Attribute 'System.CLSCompliantAttribute' exists on 'System.Runtime.Intrinsics.X86.Sse41' in the implementation but not the reference. -CannotRemoveAttribute : Attribute 'System.CLSCompliantAttribute' exists on 'System.Runtime.Intrinsics.X86.Sse42' in the implementation but not the reference. -CannotRemoveAttribute : Attribute 'System.CLSCompliantAttribute' exists on 'System.Runtime.Intrinsics.X86.Ssse3' in the implementation but not the reference. -Total Issues: 15 diff --git a/src/System.Runtime.Intrinsics/src/System.Runtime.Intrinsics.csproj b/src/System.Runtime.Intrinsics/src/System.Runtime.Intrinsics.csproj index 2200dd72f6cb..de34b22d477e 100644 --- a/src/System.Runtime.Intrinsics/src/System.Runtime.Intrinsics.csproj +++ b/src/System.Runtime.Intrinsics/src/System.Runtime.Intrinsics.csproj @@ -2,11 +2,10 @@ System.Runtime.Intrinsics true - false {315E3C60-A5D9-4F47-A940-D57395EED606} netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release - \ No newline at end of file + From 87b2e237fafbdfb01f03f16558f3fa17f8288f91 Mon Sep 17 00:00:00 2001 From: dotnet-maestro-bot Date: Fri, 10 May 2019 09:08:19 -0700 Subject: [PATCH 311/607] Update ProjectNTfs, ProjectNTfsTestILC to beta-27710-00, beta-27710-00, respectively (#37581) --- eng/dependencies.props | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/eng/dependencies.props b/eng/dependencies.props index 61cf4bbf8827..777a1bdc89d7 100644 --- a/eng/dependencies.props +++ b/eng/dependencies.props @@ -9,8 +9,8 @@ These ref versions are pulled from https://github.com/dotnet/versions. --> - 4bccd47061726ce36a245c800a527ea03dbb64ae - 4bccd47061726ce36a245c800a527ea03dbb64ae + a777ed5ef3be177ea9001e3c106a07fd2d0e99f4 + a777ed5ef3be177ea9001e3c106a07fd2d0e99f4 8bd1ec5fac9f0eec34ff6b34b1d878b4359e02dd @@ -22,9 +22,9 @@ - beta-27709-00 - beta-27709-00 - 1.0.0-beta-27709-00 + beta-27710-00 + beta-27710-00 + 1.0.0-beta-27710-00 4.4.0 From 2c64705c1aa8ecd9278ac8b8f692bf980d3b3fd3 Mon Sep 17 00:00:00 2001 From: Maryam Ariyan Date: Fri, 10 May 2019 14:06:16 -0700 Subject: [PATCH 312/607] Re-enables OLEDB tests and Fixes SEHException (#37540) Fixes: #37538 --- src/System.Data.OleDb/tests/Helpers.cs | 3 +- .../tests/OleDbCommandBuilderTests.cs | 140 ++++++-------- .../tests/OleDbCommandTests.cs | 9 +- .../tests/OleDbConnectionTests.cs | 176 +++++------------- .../tests/OleDbDataAdapterTests.cs | 145 ++++++++------- .../tests/OleDbDataReaderTests.cs | 11 +- .../tests/OleDbParameterTests.cs | 3 +- src/System.Data.OleDb/tests/OleDbTestBase.cs | 41 +++- 8 files changed, 223 insertions(+), 305 deletions(-) diff --git a/src/System.Data.OleDb/tests/Helpers.cs b/src/System.Data.OleDb/tests/Helpers.cs index 19ffdc399e67..2443967426e9 100644 --- a/src/System.Data.OleDb/tests/Helpers.cs +++ b/src/System.Data.OleDb/tests/Helpers.cs @@ -9,8 +9,7 @@ public static class Helpers { public const string IsDriverAvailable = nameof(Helpers) + "." + nameof(GetIsDriverAvailable); public const string IsAceDriverAvailable = nameof(Helpers) + "." + nameof(GetIsAceDriverAvailable); - private static readonly bool s_skipAllTemporarily = true; // [ActiveIssue(37538)] - public static bool GetIsDriverAvailable() => !s_skipAllTemporarily && Nested.IsAvailable; + public static bool GetIsDriverAvailable() => Nested.IsAvailable; public static bool GetIsAceDriverAvailable() => GetIsDriverAvailable() && !PlatformDetection.Is32BitProcess; public static string ProviderName => Nested.ProviderName; public static string GetTableName(string memberName) => memberName + ".csv"; diff --git a/src/System.Data.OleDb/tests/OleDbCommandBuilderTests.cs b/src/System.Data.OleDb/tests/OleDbCommandBuilderTests.cs index 2c3ad23bf26c..9759e41a9452 100644 --- a/src/System.Data.OleDb/tests/OleDbCommandBuilderTests.cs +++ b/src/System.Data.OleDb/tests/OleDbCommandBuilderTests.cs @@ -8,6 +8,7 @@ namespace System.Data.OleDb.Tests { + [Collection("System.Data.OleDb")] // not let tests run in parallel public class OleDbCommandBuilderTests : OleDbTestBase { [ConditionalFact(Helpers.IsDriverAvailable)] @@ -31,7 +32,7 @@ public void DeriveParameters_NullCommand_Throws(CommandType commandType) } [ConditionalFact(Helpers.IsDriverAvailable)] - public void DeriveParameters_NulllCommandText_Throws() + public void DeriveParameters_NullCommandText_Throws() { using (var cmd = (OleDbCommand)OleDbFactory.Instance.CreateCommand()) { @@ -66,61 +67,38 @@ public void DeriveParameters_NullConnection_Throws() public void DeriveParameters_ClosedConnection_Throws() { RunTest((command, tableName) => { - using (var cmd = (OleDbCommand)OleDbFactory.Instance.CreateCommand()) - { - cmd.CommandType = CommandType.StoredProcedure; - cmd.CommandText = @"SELECT * FROM " + tableName; - cmd.Connection = (OleDbConnection)OleDbFactory.Instance.CreateConnection(); - cmd.Connection.Close(); - var exception = Record.Exception(() => OleDbCommandBuilder.DeriveParameters(cmd)); - Assert.NotNull(exception); - Assert.IsType(exception); - Assert.Contains( - $"{nameof(OleDbCommandBuilder.DeriveParameters)} requires an open and available Connection.", - exception.Message); - } + command.CommandType = CommandType.StoredProcedure; + command.CommandText = @"SELECT * FROM " + tableName; + connection.Close(); + var exception = Record.Exception(() => OleDbCommandBuilder.DeriveParameters(command)); + Assert.NotNull(exception); + Assert.IsType(exception); + Assert.Contains( + $"{nameof(OleDbCommandBuilder.DeriveParameters)} requires an open and available Connection.", + exception.Message); + command.CommandType = CommandType.Text; + connection.Open(); // reopen when done }); } [OuterLoop] [ConditionalFact(Helpers.IsDriverAvailable)] - public void QuoteIdentifier_Null_Throws() + public void QuoteUnquoteIdentifier_Null_Throws() { RunTest((command, tableName) => { - using (var cmd = (OleDbCommand)OleDbFactory.Instance.CreateCommand()) + command.CommandType = CommandType.StoredProcedure; + command.CommandText = @"SELECT * FROM " + tableName; + using (var builder = (OleDbCommandBuilder)OleDbFactory.Instance.CreateCommandBuilder()) { - cmd.CommandType = CommandType.StoredProcedure; - cmd.CommandText = @"SELECT * FROM " + tableName; - cmd.Connection = (OleDbConnection)OleDbFactory.Instance.CreateConnection(); - cmd.Transaction = transaction; - using (var builder = (OleDbCommandBuilder)OleDbFactory.Instance.CreateCommandBuilder()) - { - AssertExtensions.Throws( - () => builder.QuoteIdentifier(null, cmd.Connection), - $"Value cannot be null.\r\nParameter name: unquotedIdentifier"); - } - } - }); - } + AssertExtensions.Throws( + () => builder.QuoteIdentifier(null, command.Connection), + $"Value cannot be null.\r\nParameter name: unquotedIdentifier"); - [OuterLoop] - [ConditionalFact(Helpers.IsDriverAvailable)] - public void UnquoteIdentifier_Null_Throws() - { - RunTest((command, tableName) => { - using (var cmd = (OleDbCommand)OleDbFactory.Instance.CreateCommand()) - { - cmd.CommandType = CommandType.StoredProcedure; - cmd.CommandText = @"SELECT * FROM " + tableName; - cmd.Connection = (OleDbConnection)OleDbFactory.Instance.CreateConnection(); - cmd.Transaction = transaction; - using (var builder = (OleDbCommandBuilder)OleDbFactory.Instance.CreateCommandBuilder()) - { - AssertExtensions.Throws( - () => builder.UnquoteIdentifier(null, cmd.Connection), - $"Value cannot be null.\r\nParameter name: quotedIdentifier"); - } + AssertExtensions.Throws( + () => builder.UnquoteIdentifier(null, command.Connection), + $"Value cannot be null.\r\nParameter name: quotedIdentifier"); } + command.CommandType = CommandType.Text; }); } @@ -129,47 +107,41 @@ public void UnquoteIdentifier_Null_Throws() public void QuoteUnquote_CustomPrefixSuffix_Success() { RunTest((command, tableName) => { - using (var cmd = (OleDbCommand)OleDbFactory.Instance.CreateCommand()) + command.CommandType = CommandType.StoredProcedure; + command.CommandText = @"SELECT * FROM " + tableName; + using (var adapter = new OleDbDataAdapter(command.CommandText, connection)) + using (var builder = new OleDbCommandBuilder(adapter)) { - cmd.Transaction = transaction; - cmd.CommandType = CommandType.StoredProcedure; - cmd.CommandText = @"SELECT * FROM " + tableName; - cmd.Connection = (OleDbConnection)OleDbFactory.Instance.CreateConnection(); - cmd.Connection.ConnectionString = connection.ConnectionString; + // Custom prefix & suffix + builder.QuotePrefix = "'"; + builder.QuoteSuffix = "'"; + + Assert.Equal(adapter, builder.DataAdapter); + Assert.Equal("'Test'", builder.QuoteIdentifier("Test", connection)); + Assert.Equal("'Te''st'", builder.QuoteIdentifier("Te'st", connection)); + Assert.Equal("Test", builder.UnquoteIdentifier("'Test'", connection)); + Assert.Equal("Te'st", builder.UnquoteIdentifier("'Te''st'", connection)); - using (var adapter = new OleDbDataAdapter(cmd.CommandText, connection)) - using (var builder = new OleDbCommandBuilder(adapter)) - { - // Custom prefix & suffix - builder.QuotePrefix = "'"; - builder.QuoteSuffix = "'"; - - Assert.Equal(adapter, builder.DataAdapter); - Assert.Equal("'Test'", builder.QuoteIdentifier("Test", connection)); - Assert.Equal("'Te''st'", builder.QuoteIdentifier("Te'st", connection)); - Assert.Equal("Test", builder.UnquoteIdentifier("'Test'", connection)); - Assert.Equal("Te'st", builder.UnquoteIdentifier("'Te''st'", connection)); - - // Ensure we don't need active connection: - Assert.Equal("'Test'", builder.QuoteIdentifier("Test", null)); - Assert.Equal("Test", builder.UnquoteIdentifier("'Test'", null)); - - builder.QuotePrefix = string.Empty; - string quoteErrMsg = $"{nameof(builder.QuoteIdentifier)} requires open connection when the quote prefix has not been set."; - string unquoteErrMsg = $"{nameof(builder.UnquoteIdentifier)} requires open connection when the quote prefix has not been set."; - - Assert.Equal("`Test`", builder.QuoteIdentifier("Test", connection)); - Assert.Equal("Test", builder.UnquoteIdentifier("`Test`", connection)); - - Assert.NotNull(adapter.SelectCommand.Connection); - Assert.Equal("`Test`", builder.QuoteIdentifier("Test")); - Assert.Equal("Test", builder.UnquoteIdentifier("`Test`")); - - adapter.SelectCommand.Connection = null; - AssertExtensions.Throws(() => builder.QuoteIdentifier("Test"), quoteErrMsg); - AssertExtensions.Throws(() => builder.UnquoteIdentifier("'Test'"), unquoteErrMsg); - } + // Ensure we don't need active connection: + Assert.Equal("'Test'", builder.QuoteIdentifier("Test", null)); + Assert.Equal("Test", builder.UnquoteIdentifier("'Test'", null)); + + builder.QuotePrefix = string.Empty; + string quoteErrMsg = $"{nameof(builder.QuoteIdentifier)} requires open connection when the quote prefix has not been set."; + string unquoteErrMsg = $"{nameof(builder.UnquoteIdentifier)} requires open connection when the quote prefix has not been set."; + + Assert.Equal("`Test`", builder.QuoteIdentifier("Test", connection)); + Assert.Equal("Test", builder.UnquoteIdentifier("`Test`", connection)); + + Assert.NotNull(adapter.SelectCommand.Connection); + Assert.Equal("`Test`", builder.QuoteIdentifier("Test")); + Assert.Equal("Test", builder.UnquoteIdentifier("`Test`")); + + adapter.SelectCommand.Connection = null; + AssertExtensions.Throws(() => builder.QuoteIdentifier("Test"), quoteErrMsg); + AssertExtensions.Throws(() => builder.UnquoteIdentifier("'Test'"), unquoteErrMsg); } + command.CommandType = CommandType.Text; }); } diff --git a/src/System.Data.OleDb/tests/OleDbCommandTests.cs b/src/System.Data.OleDb/tests/OleDbCommandTests.cs index 26ef0e11ce99..4493ec09b009 100644 --- a/src/System.Data.OleDb/tests/OleDbCommandTests.cs +++ b/src/System.Data.OleDb/tests/OleDbCommandTests.cs @@ -9,6 +9,7 @@ namespace System.Data.OleDb.Tests { + [Collection("System.Data.OleDb")] // not let tests run in parallel public class OleDbCommandTests : OleDbTestBase { [ConditionalFact(Helpers.IsDriverAvailable)] @@ -73,16 +74,12 @@ public void Prepare_ClosedConnection_Throws() { RunTest((command, tableName) => { command.CommandText = @"SELECT * FROM " + tableName; - var currentConnection = command.Connection; - var oleDbConnection = new OleDbConnection(ConnectionString); - oleDbConnection.Open(); - command.Connection = oleDbConnection; - oleDbConnection.Close(); + connection.Close(); AssertExtensions.Throws( () => command.Prepare(), $"{nameof(command.Prepare)} requires an open and available Connection. The connection's current state is closed." ); - command.Connection = currentConnection; + connection.Open(); // reopen when done }); } diff --git a/src/System.Data.OleDb/tests/OleDbConnectionTests.cs b/src/System.Data.OleDb/tests/OleDbConnectionTests.cs index bcdb94e21cc6..95ee63c413a7 100644 --- a/src/System.Data.OleDb/tests/OleDbConnectionTests.cs +++ b/src/System.Data.OleDb/tests/OleDbConnectionTests.cs @@ -9,6 +9,7 @@ namespace System.Data.OleDb.Tests { + [Collection("System.Data.OleDb")] // not let tests run in parallel public class OleDbConnectionTests : OleDbTestBase { [ConditionalFact(Helpers.IsDriverAvailable)] @@ -52,42 +53,28 @@ public void Ctor_InvalidConnectTimeout_Throws() [ConditionalFact(Helpers.IsDriverAvailable)] public void Open_NoConnectionString_Throws() { - using (var innerConnection = (OleDbConnection)OleDbFactory.Instance.CreateConnection()) - { - innerConnection.ConnectionString = null; - Assert.Throws(() => innerConnection.Open()); - } + connection.Dispose(); + connection = (OleDbConnection)OleDbFactory.Instance.CreateConnection(); + connection.ConnectionString = null; + Assert.Throws(() => connection.Open()); } [ConditionalFact(Helpers.IsDriverAvailable)] public void BeginTransaction_IsolationLevelIsUnspecified_SetsReadCommitted() { - using (var oleDbConnection = new OleDbConnection(ConnectionString)) - { - oleDbConnection.Open(); - using (OleDbTransaction transaction = oleDbConnection.BeginTransaction()) - { - Assert.Equal(IsolationLevel.ReadCommitted, transaction.IsolationLevel); - } - using (OleDbTransaction transaction = oleDbConnection.BeginTransaction(IsolationLevel.Unspecified)) - { - Assert.Equal(IsolationLevel.ReadCommitted, transaction.IsolationLevel); - } - } + Assert.Equal(IsolationLevel.ReadCommitted, transaction.IsolationLevel); + transaction.Dispose(); + transaction = connection.BeginTransaction(IsolationLevel.Unspecified); + Assert.Equal(IsolationLevel.ReadCommitted, transaction.IsolationLevel); } [ConditionalTheory(Helpers.IsDriverAvailable)] [MemberData(nameof(IsolationLevelsExceptUnspecified))] public void BeginTransaction_SpecificIsolationLevel_Success(IsolationLevel isolationLevel) { - using (var oleDbConnection = new OleDbConnection(ConnectionString)) - { - oleDbConnection.Open(); - using (OleDbTransaction transaction = oleDbConnection.BeginTransaction(isolationLevel)) - { - Assert.Equal(isolationLevel, transaction.IsolationLevel); - } - } + transaction.Dispose(); + transaction = connection.BeginTransaction(isolationLevel); + Assert.Equal(isolationLevel, transaction.IsolationLevel); } [ConditionalFact(Helpers.IsDriverAvailable)] @@ -97,85 +84,41 @@ public void StateChange_ChangeState_TriggersEvent() Action OnStateChange = (sender, args) => { timesCalled++; }; - using (var oleDbConnection = new OleDbConnection(ConnectionString)) - { - oleDbConnection.StateChange += new StateChangeEventHandler(OnStateChange); - oleDbConnection.Open(); - oleDbConnection.Close(); - Assert.Equal(2, timesCalled); - } + connection.StateChange += new StateChangeEventHandler(OnStateChange); + connection.Close(); + connection.Open(); + Assert.Equal(2, timesCalled); } [ConditionalFact(Helpers.IsDriverAvailable)] public void BeginTransaction_InvalidIsolationLevel_Throws() { - using (var oleDbConnection = new OleDbConnection(ConnectionString)) - { - oleDbConnection.Open(); - Assert.Throws(() => oleDbConnection.BeginTransaction((IsolationLevel)0)); - } + transaction.Dispose(); + Assert.Throws(() => connection.BeginTransaction((IsolationLevel)0)); } [ConditionalFact(Helpers.IsAceDriverAvailable)] public void BeginTransaction_CallTwice_Throws() { - using (var conn = new OleDbConnection(ConnectionString)) - { - conn.Open(); - using (var tx = conn.BeginTransaction()) - { - var cmd = conn.CreateCommand(); - cmd.CommandText = "CREATE TABLE table_x.csv (column_y NVARCHAR(40));"; - cmd.Transaction = tx; - cmd.ExecuteNonQuery(); - AssertExtensions.Throws( - () => conn.BeginTransaction(), - $"{nameof(OleDbConnection)} does not support parallel transactions." - ); - } - conn.Close(); - } - } - - [ConditionalFact(Helpers.IsAceDriverAvailable)] - public void CommitTransaction_AfterConnectionClosed_Throws() - { - using (var conn = new OleDbConnection(ConnectionString)) - { - conn.Open(); - using (var tx = conn.BeginTransaction()) - { - var cmd = conn.CreateCommand(); - cmd.CommandText = "CREATE TABLE table_x.csv (column_y NVARCHAR(40));"; - cmd.Transaction = tx; - cmd.ExecuteNonQuery(); - conn.Close(); - AssertExtensions.Throws( - () => tx.Commit(), - $"This {nameof(OleDbTransaction)} has completed; it is no longer usable." - ); - } - } + // ctor in OleDbTestBase already called BeginTransaction once + AssertExtensions.Throws( + () => connection.BeginTransaction(), + $"{nameof(OleDbConnection)} does not support parallel transactions." + ); } [ConditionalFact(Helpers.IsDriverAvailable)] public void GetDefaults_AnyGivenState_DoesNotThrow() { const int DefaultTimeout = 15; - Action VerifyDefaults = (conn) => { - Assert.Equal(DefaultTimeout, conn.ConnectionTimeout); - Assert.Contains(conn.DataSource, TestDirectory); - Assert.Empty(conn.Database); + Action VerifyDefaults = () => { + Assert.Equal(DefaultTimeout, connection.ConnectionTimeout); + Assert.Contains(connection.DataSource, TestDirectory); + Assert.Empty(connection.Database); }; - using (var oleDbConnection = new OleDbConnection()) - { - VerifyDefaults(oleDbConnection); - oleDbConnection.ConnectionString = ConnectionString; - oleDbConnection.Open(); - VerifyDefaults(oleDbConnection); - oleDbConnection.Close(); - VerifyDefaults(oleDbConnection); - } + VerifyDefaults(); + connection.Close(); + VerifyDefaults(); } [ConditionalFact(Helpers.IsDriverAvailable)] @@ -187,16 +130,6 @@ public void CreateCommand_AsDbConnection_IsOleDb() Assert.IsType(dbCommand); } - [ConditionalFact(Helpers.IsDriverAvailable)] - public void Provider_SetProperlyFromCtor() - { - using (var oleDbConnection = new OleDbConnection(ConnectionString)) - { - oleDbConnection.Open(); - Assert.Equal(Helpers.ProviderName, oleDbConnection.Provider); - } - } - [ConditionalFact(Helpers.IsDriverAvailable)] public void GetSchema_NoArgs_ReturnsMetaDataCollections() { @@ -270,32 +203,23 @@ public void GetOleDbSchemaTable_ReturnsTableInfo() [ConditionalFact(Helpers.IsAceDriverAvailable)] public void ChangeDatabase_EmptyDatabase_Throws() { - using (var oleDbConnection = new OleDbConnection(ConnectionString)) - { - oleDbConnection.Open(); - Assert.Throws(() => oleDbConnection.ChangeDatabase(null)); - Assert.Throws(() => oleDbConnection.ChangeDatabase(" ")); - Assert.Throws(() => oleDbConnection.ChangeDatabase(string.Empty)); - AssertExtensions.Throws( - () => oleDbConnection.ChangeDatabase("ReadOnlyShouldThrow"), - "The 'current catalog' property was read-only, or the consumer attempted to set values of properties " + - "in the Initialization property group after the data source object was initialized. " + - "Consumers can set the value of a read-only property to its current value. " + - "This status is also returned if a settable column property could not be set for the particular column." - ); - } + Assert.Throws(() => connection.ChangeDatabase(null)); + Assert.Throws(() => connection.ChangeDatabase(" ")); + Assert.Throws(() => connection.ChangeDatabase(string.Empty)); + AssertExtensions.Throws( + () => connection.ChangeDatabase("ReadOnlyShouldThrow"), + "The 'current catalog' property was read-only, or the consumer attempted to set values of properties " + + "in the Initialization property group after the data source object was initialized. " + + "Consumers can set the value of a read-only property to its current value. " + + "This status is also returned if a settable column property could not be set for the particular column." + ); } [ConditionalTheory(Helpers.IsDriverAvailable)] [MemberData(nameof(ManufacturedOleDbSchemaGuids))] public void GetOleDbSchemaTable_NoRestrictions_Success(Guid oleDbSchemaGuid) { - DataTable oleDbSchemaTable = null; - using (var oleDbConnection = new OleDbConnection(ConnectionString)) - { - oleDbConnection.Open(); - oleDbSchemaTable = oleDbConnection.GetOleDbSchemaTable(oleDbSchemaGuid, restrictions: null); - } + DataTable oleDbSchemaTable = connection.GetOleDbSchemaTable(oleDbSchemaGuid, restrictions: null); Assert.NotNull(oleDbSchemaTable); Assert.NotNull(oleDbSchemaTable.Rows); foreach (DataRow dataRow in oleDbSchemaTable.Rows) @@ -309,12 +233,7 @@ public void GetOleDbSchemaTable_NoRestrictions_Success(Guid oleDbSchemaGuid) public void GetOleDbSchemaTable_SomeRestrictions_Throws(Guid oleDbSchemaGuid) { object[] restrictions = new object[] { null }; - using (var oleDbConnection = new OleDbConnection(ConnectionString)) - { - oleDbConnection.Open(); - Assert.Throws(() => - oleDbConnection.GetOleDbSchemaTable(oleDbSchemaGuid, restrictions)); - } + Assert.Throws(() => connection.GetOleDbSchemaTable(oleDbSchemaGuid, restrictions)); } public static IEnumerable ManufacturedOleDbSchemaGuids @@ -368,11 +287,12 @@ public void Ctor_ValidUdlFile_Success() "; Everything after this line is an OLE DB initstring", ConnectionString }, System.Text.Encoding.Unicode); - var oleDbConnection = new OleDbConnection(@"file name = " + udlFile); - Assert.NotNull(oleDbConnection); - oleDbConnection.Open(); - Assert.Equal(Helpers.ProviderName, oleDbConnection.Provider); - oleDbConnection.Dispose(); + connection.Dispose(); + connection = new OleDbConnection(@"file name = " + udlFile); + Assert.NotNull(connection); + connection.Open(); + Assert.Equal(Helpers.ProviderName, connection.Provider); + connection.Dispose(); } [ConditionalFact(Helpers.IsDriverAvailable)] diff --git a/src/System.Data.OleDb/tests/OleDbDataAdapterTests.cs b/src/System.Data.OleDb/tests/OleDbDataAdapterTests.cs index 37195431e227..469dbb24c925 100644 --- a/src/System.Data.OleDb/tests/OleDbDataAdapterTests.cs +++ b/src/System.Data.OleDb/tests/OleDbDataAdapterTests.cs @@ -8,13 +8,16 @@ namespace System.Data.OleDb.Tests { + [Collection("System.Data.OleDb")] // not let tests run in parallel public class OleDbDataAdapterTests : OleDbTestBase { [ConditionalFact(Helpers.IsDriverAvailable)] public void Fill_NullDataTable_Throws() { - var adapter = (OleDbDataAdapter)OleDbFactory.Instance.CreateDataAdapter(); - Assert.Throws(() => adapter.Fill(null, new object())); + using (var adapter = (OleDbDataAdapter)OleDbFactory.Instance.CreateDataAdapter()) + { + Assert.Throws(() => adapter.Fill(null, new object())); + } } [OuterLoop] @@ -22,8 +25,10 @@ public void Fill_NullDataTable_Throws() public void Fill_NoSelectCommand_Throws() { RunTest((command, tableName) => { - var adapter = new OleDbDataAdapter(); - Assert.Throws(() => adapter.Fill(new DataSet())); + using (var adapter = new OleDbDataAdapter()) + { + Assert.Throws(() => adapter.Fill(new DataSet())); + } }); } @@ -34,14 +39,16 @@ public void DefaultCommandValues() RunTest((command, tableName) => { string commandText = @"SELECT * FROM " + tableName; var dataTable = new DataTable(); - var adapter = new OleDbDataAdapter(commandText, connection); - Assert.Null(adapter.InsertCommand); - Assert.Null(adapter.UpdateCommand); - Assert.Null(adapter.DeleteCommand); - Assert.NotNull(adapter.SelectCommand); - Assert.Equal(commandText, adapter.SelectCommand.CommandText); - - adapter.SelectCommand.Dispose(); + using (var adapter = new OleDbDataAdapter(commandText, connection)) + { + Assert.Null(adapter.InsertCommand); + Assert.Null(adapter.UpdateCommand); + Assert.Null(adapter.DeleteCommand); + Assert.NotNull(adapter.SelectCommand); + Assert.Equal(commandText, adapter.SelectCommand.CommandText); + + adapter.SelectCommand.Dispose(); // bug? OleDbDataAdapter is not disposing of SelectCommand + } }); } @@ -50,17 +57,18 @@ public void DefaultCommandValues() public void Fill_Select_Success() { RunTest((command, tableName) => { - OleDbDataAdapter adapter = new OleDbDataAdapter(@"SELECT * FROM " + tableName, ConnectionString); - - DataSet ds = new DataSet(); - adapter.Fill(ds); - Assert.Equal(1, ds.Tables.Count); - Assert.Equal(1, ds.Tables[0].Rows.Count); - - string[] expectedValues = { "Foo", "Bar", "John" }; - for (int i = 0; i < expectedValues.Length; i++) + using (var adapter = new OleDbDataAdapter(@"SELECT * FROM " + tableName, ConnectionString)) { - Assert.Equal(expectedValues[i], ds.Tables[0].Rows[0][i]); + DataSet ds = new DataSet(); + adapter.Fill(ds); + Assert.Equal(1, ds.Tables.Count); + Assert.Equal(1, ds.Tables[0].Rows.Count); + + string[] expectedValues = { "Foo", "Bar", "John" }; + for (int i = 0; i < expectedValues.Length; i++) + { + Assert.Equal(expectedValues[i], ds.Tables[0].Rows[0][i]); + } } }); } @@ -70,14 +78,13 @@ public void Fill_Select_Success() public void Fill_Select_NullDataTable_Throws() { RunTest((command, tableName) => { - var adapter = new OleDbDataAdapter(@"SELECT * FROM " + tableName, connection); - - Assert.Throws(() => adapter.Fill(null)); - Assert.Throws(() => adapter.Fill(new DataTable(), null)); - Assert.Throws(() => adapter.Fill(null, null, null)); - Assert.Throws(() => adapter.Fill(new DataSet(), null, null)); - - adapter.SelectCommand.Dispose(); + using (var adapter = new OleDbDataAdapter(@"SELECT * FROM " + tableName, connection)) + { + Assert.Throws(() => adapter.Fill(null)); + Assert.Throws(() => adapter.Fill(new DataTable(), null)); + Assert.Throws(() => adapter.Fill(null, null, null)); + Assert.Throws(() => adapter.Fill(new DataSet(), null, null)); + } }); } @@ -87,35 +94,35 @@ public void Update_Success() { RunTest((command, tableName) => { var dataTable = new DataTable(); - var adapter = new OleDbDataAdapter(); - - adapter.SelectCommand = new OleDbCommand(@"SELECT * FROM " + tableName + @" WHERE Nickname = @Nickname", connection); - var selectParam = new OleDbParameter("@Nickname", OleDbType.VarWChar, 30, ParameterDirection.Input, true, 0, 0, "Nickname", DataRowVersion.Current, "John"); - adapter.SelectCommand.Parameters.Add(selectParam); - adapter.SelectCommand.Transaction = transaction; - - adapter.UpdateCommand = new OleDbCommand(@"UPDATE " + tableName + @" SET Nickname = @Nickname WHERE Firstname = @Firstname", connection); - OleDbParameter[] parameters = new OleDbParameter[] { - new OleDbParameter("@Nickname", OleDbType.WChar, 30, ParameterDirection.Input, true, 0, 0, "Nickname", DataRowVersion.Current, null), - new OleDbParameter("@Firstname", OleDbType.WChar, 5, ParameterDirection.Input, false, 0, 0, "Firstname", DataRowVersion.Current, null) - }; - adapter.UpdateCommand.Parameters.AddRange(parameters); - adapter.UpdateCommand.Transaction = transaction; - - adapter.Fill(dataTable); - object titleData = dataTable.Rows[0]["Nickname"]; - Assert.Equal("John", (string)titleData); - - titleData = "Sam"; - adapter.Update(dataTable); - adapter.Fill(dataTable); - Assert.Equal("Sam", (string)titleData); - - titleData = "John"; - adapter.Update(dataTable); - - adapter.SelectCommand.Dispose(); - adapter.UpdateCommand.Dispose(); + using (var adapter = new OleDbDataAdapter()) + using (var cmd = new OleDbCommand(@"SELECT * FROM " + tableName + @" WHERE Nickname = @Nickname", connection)) + using (var updateCmd = new OleDbCommand(@"UPDATE " + tableName + @" SET Nickname = @Nickname WHERE Firstname = @Firstname", connection)) + { + adapter.SelectCommand = cmd; + var selectParam = new OleDbParameter("@Nickname", OleDbType.VarWChar, 30, ParameterDirection.Input, true, 0, 0, "Nickname", DataRowVersion.Current, "John"); + adapter.SelectCommand.Parameters.Add(selectParam); + adapter.SelectCommand.Transaction = transaction; + + adapter.UpdateCommand = updateCmd; + OleDbParameter[] parameters = new OleDbParameter[] { + new OleDbParameter("@Nickname", OleDbType.WChar, 30, ParameterDirection.Input, true, 0, 0, "Nickname", DataRowVersion.Current, null), + new OleDbParameter("@Firstname", OleDbType.WChar, 5, ParameterDirection.Input, false, 0, 0, "Firstname", DataRowVersion.Current, null) + }; + adapter.UpdateCommand.Parameters.AddRange(parameters); + adapter.UpdateCommand.Transaction = transaction; + + adapter.Fill(dataTable); + object titleData = dataTable.Rows[0]["Nickname"]; + Assert.Equal("John", (string)titleData); + + titleData = "Sam"; + adapter.Update(dataTable); + adapter.Fill(dataTable); + Assert.Equal("Sam", (string)titleData); + + titleData = "John"; + adapter.Update(dataTable); + } }); } @@ -127,16 +134,18 @@ public void Fill_OpenDataReader_Throws() command.CommandText = @"SELECT * FROM " + tableName; Action FillShouldThrow = (shouldFail) => { DataSet ds = new DataSet(); - OleDbDataAdapter adapter = new OleDbDataAdapter(command); - if (shouldFail) - { - AssertExtensions.Throws( - () => adapter.Fill(ds, tableName), - "There is already an open DataReader associated with this Command which must be closed first."); - } - else + using(var adapter = new OleDbDataAdapter(command)) { - Assert.NotNull(adapter.Fill(ds, tableName)); + if (shouldFail) + { + AssertExtensions.Throws( + () => adapter.Fill(ds, tableName), + "There is already an open DataReader associated with this Command which must be closed first."); + } + else + { + Assert.NotNull(adapter.Fill(ds, tableName)); + } } }; using (var reader = command.ExecuteReader()) diff --git a/src/System.Data.OleDb/tests/OleDbDataReaderTests.cs b/src/System.Data.OleDb/tests/OleDbDataReaderTests.cs index 426ed09100fb..ec6380d2a6b4 100644 --- a/src/System.Data.OleDb/tests/OleDbDataReaderTests.cs +++ b/src/System.Data.OleDb/tests/OleDbDataReaderTests.cs @@ -8,6 +8,7 @@ namespace System.Data.OleDb.Tests { + [Collection("System.Data.OleDb")] // not let tests run in parallel public class OleDbDataReaderTests : OleDbTestBase { [OuterLoop] @@ -22,16 +23,6 @@ public void FieldCount_NoMetadata_ReturnsZero() } } - [ConditionalFact(Helpers.IsDriverAvailable)] - public void ExecuteNonQuery_TableNameWithoutCsvExtension_Throws() - { - command.CommandText = - @"CREATE TABLE TableNameWithoutCsvExtension ( - SomeInt32 INT, - SomeString NVARCHAR(100))"; - Assert.Throws(() => command.ExecuteNonQuery()); - } - [OuterLoop] [ConditionalFact(Helpers.IsDriverAvailable)] public void InvalidRowIndex() diff --git a/src/System.Data.OleDb/tests/OleDbParameterTests.cs b/src/System.Data.OleDb/tests/OleDbParameterTests.cs index 32009698778b..5496ce200d9e 100644 --- a/src/System.Data.OleDb/tests/OleDbParameterTests.cs +++ b/src/System.Data.OleDb/tests/OleDbParameterTests.cs @@ -8,12 +8,13 @@ namespace System.Data.OleDb.Tests { + [Collection("System.Data.OleDb")] // not let tests run in parallel public class OleDbParameterTests : OleDbTestBase { [ConditionalFact(Helpers.IsDriverAvailable)] public void OleDbParameterCollection_MultipleScenarios_Success() { - OleDbParameterCollection opc = new OleDbCommand().Parameters; + OleDbParameterCollection opc = command.Parameters; Assert.True(opc.Count == 0); Assert.False(((Collections.IList)opc).IsReadOnly); diff --git a/src/System.Data.OleDb/tests/OleDbTestBase.cs b/src/System.Data.OleDb/tests/OleDbTestBase.cs index 4dee954003c3..e045b03b1c06 100644 --- a/src/System.Data.OleDb/tests/OleDbTestBase.cs +++ b/src/System.Data.OleDb/tests/OleDbTestBase.cs @@ -3,15 +3,16 @@ // See the LICENSE file in the project root for more information. using System.IO; +using System.Threading; using Xunit; namespace System.Data.OleDb.Tests { public abstract class OleDbTestBase : FileCleanupTestBase, IDisposable { - protected readonly OleDbConnection connection; - protected readonly OleDbTransaction transaction; - protected readonly OleDbCommand command; + protected OleDbConnection connection; + protected OleDbTransaction transaction; + protected OleDbCommand command; private bool _disposed; @@ -19,7 +20,22 @@ public OleDbTestBase() { _disposed = false; connection = new OleDbConnection(ConnectionString); - connection.Open(); + // Make 3 attempts + string failure = string.Empty; + for (int i = 0; i <= 2; i++) + { + try + { + connection.Open(); + break; + } + catch (Exception ex) + { + failure += ex.ToString() + Environment.NewLine; + Thread.Sleep(10); // Give a transient condition like antivirus/indexing a chance to go away + } + } + Assert.True(ConnectionState.Open == connection.State, $"{nameof(OleDbTestBase)} failed to open {nameof(OleDbConnection)}. {failure}"); transaction = connection.BeginTransaction(); command = connection.CreateCommand(); command.Transaction = transaction; @@ -27,13 +43,26 @@ public OleDbTestBase() protected override void Dispose(bool disposing) { - if (!_disposed) + if (_disposed) + return; + + if (disposing) { - if (disposing) + if (command != null) { command.Dispose(); + command = null; + } + if (transaction != null) + { transaction.Dispose(); + transaction = null; + } + if (connection != null) + { + connection.Close(); connection.Dispose(); + connection = null; } _disposed = true; } From 185e0302830ed4e304c197e5e31270a9abccb3e2 Mon Sep 17 00:00:00 2001 From: Levi Broderick Date: Sat, 4 May 2019 20:56:47 -0700 Subject: [PATCH 313/607] Refactoring and code cleanup for System.Text.Encodings.Web - Don't use embedded resources for the mapping of defined characters - Rename source files to better reflect actual namespace layouts - Add tools for generating the list of defined characters and Unicode ranges - Add instructions on how to update the underlying Unicode data --- src/Common/tests/Data/UnicodeReadme.txt | 4 + .../pkg/System.Text.Encodings.Web.pkgproj | 5 + .../ref/System.Text.Encodings.Web.csproj | 11 +- .../Resources/unicode8definedcharacters.bin | Bin 8192 -> 0 bytes .../src/System.Text.Encodings.Web.csproj | 19 +- .../AllowedCharactersBitmap.cs | 7 +- .../Web => Unicode}/UnicodeHelpers.cs | 80 ++- .../Text/Unicode/UnicodeHelpers.generated.cs | 528 ++++++++++++++++++ .../Web => Unicode}/UnicodeRange.cs | 0 .../Web => Unicode}/UnicodeRanges.cs | 10 +- .../UnicodeRanges.generated.cs | 0 .../System.Text.Encodings.Web.Tests.csproj | 6 +- .../tests/UnicodeHelpersTests.cs | 7 +- .../tests/UnicodeRangesTests.cs | 170 +----- .../tests/UnicodeRangesTests.generated.cs | 171 ++++++ .../tools/Directory.Build.props | 3 + .../tools/Directory.Build.targets | 3 + .../GenDefinedCharList.csproj | 13 + .../GenDefinedCharList/GenDefinedCharList.sln | 25 + .../tools/GenDefinedCharList/Program.cs | 218 ++++++++ .../GenUnicodeRanges/GenUnicodeRanges.csproj | 13 + .../GenUnicodeRanges/GenUnicodeRanges.sln | 25 + .../tools/GenUnicodeRanges/Program.cs | 181 ++++++ .../tools/updating-encodings.md | 37 ++ src/dirs.proj | 7 +- 25 files changed, 1297 insertions(+), 246 deletions(-) create mode 100644 src/Common/tests/Data/UnicodeReadme.txt delete mode 100644 src/System.Text.Encodings.Web/src/Resources/unicode8definedcharacters.bin rename src/System.Text.Encodings.Web/src/System/Text/{Encodings/Web => Internal}/AllowedCharactersBitmap.cs (94%) rename src/System.Text.Encodings.Web/src/System/Text/{Encodings/Web => Unicode}/UnicodeHelpers.cs (82%) create mode 100644 src/System.Text.Encodings.Web/src/System/Text/Unicode/UnicodeHelpers.generated.cs rename src/System.Text.Encodings.Web/src/System/Text/{Encodings/Web => Unicode}/UnicodeRange.cs (100%) rename src/System.Text.Encodings.Web/src/System/Text/{Encodings/Web => Unicode}/UnicodeRanges.cs (83%) rename src/System.Text.Encodings.Web/src/System/Text/{Encodings/Web => Unicode}/UnicodeRanges.generated.cs (100%) create mode 100644 src/System.Text.Encodings.Web/tests/UnicodeRangesTests.generated.cs create mode 100644 src/System.Text.Encodings.Web/tools/Directory.Build.props create mode 100644 src/System.Text.Encodings.Web/tools/Directory.Build.targets create mode 100644 src/System.Text.Encodings.Web/tools/GenDefinedCharList/GenDefinedCharList.csproj create mode 100644 src/System.Text.Encodings.Web/tools/GenDefinedCharList/GenDefinedCharList.sln create mode 100644 src/System.Text.Encodings.Web/tools/GenDefinedCharList/Program.cs create mode 100644 src/System.Text.Encodings.Web/tools/GenUnicodeRanges/GenUnicodeRanges.csproj create mode 100644 src/System.Text.Encodings.Web/tools/GenUnicodeRanges/GenUnicodeRanges.sln create mode 100644 src/System.Text.Encodings.Web/tools/GenUnicodeRanges/Program.cs create mode 100644 src/System.Text.Encodings.Web/tools/updating-encodings.md diff --git a/src/Common/tests/Data/UnicodeReadme.txt b/src/Common/tests/Data/UnicodeReadme.txt new file mode 100644 index 000000000000..40d305bd3e44 --- /dev/null +++ b/src/Common/tests/Data/UnicodeReadme.txt @@ -0,0 +1,4 @@ +This directory contains Unicode data files consumed by build tooling +and by our unit test projects. The latest version of these data files +can be found at https://www.unicode.org/Public/UCD/latest/. Archived +versions can be found at https://www.unicode.org/Public/. diff --git a/src/System.Text.Encodings.Web/pkg/System.Text.Encodings.Web.pkgproj b/src/System.Text.Encodings.Web/pkg/System.Text.Encodings.Web.pkgproj index 9fbfdd61a8b7..16bb080f394b 100644 --- a/src/System.Text.Encodings.Web/pkg/System.Text.Encodings.Web.pkgproj +++ b/src/System.Text.Encodings.Web/pkg/System.Text.Encodings.Web.pkgproj @@ -15,5 +15,10 @@ .NETCoreApp;UAP + + + true + \ No newline at end of file diff --git a/src/System.Text.Encodings.Web/ref/System.Text.Encodings.Web.csproj b/src/System.Text.Encodings.Web/ref/System.Text.Encodings.Web.csproj index eb9b554c7317..b442e4c84763 100644 --- a/src/System.Text.Encodings.Web/ref/System.Text.Encodings.Web.csproj +++ b/src/System.Text.Encodings.Web/ref/System.Text.Encodings.Web.csproj @@ -7,17 +7,12 @@ - + - - - - - - - + + \ No newline at end of file diff --git a/src/System.Text.Encodings.Web/src/Resources/unicode8definedcharacters.bin b/src/System.Text.Encodings.Web/src/Resources/unicode8definedcharacters.bin deleted file mode 100644 index 48fa163f088cc88591c84b3e962c82fbfac136db..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8192 zcmeHMv2GJV5MAdaT%l_zA{`AibrhN95BLMj5AXp<;4u=C|A5v#1>z5EDMBu!cbIt;gI{)H0!dCSw<2PP9I&Hu3tbf6l!8ocCXK zKc&p^v?unw;I>6|br}^NpVN#CvrW${m_YZ~=ZziMG*9Rj$8nxb1Nd9ik_-Byjk zC6&G!oXHv?T(RNoe#r;3MJ5r_tmK0U5OJ#liWQqU=J=Q3R{Da(xFQ~@&WveQA(VaX z6YEL16>%<<(q=O^0q2S`pYhmft`*v8ORDDPL#vftx37X*y5kt-2RN*A%Jio*<{xBa zk-t`yGR|eR2`uC0sUXPN??cy32x}H zUw59`Q@iXy1qloU1_A?tf&a#U>|2uTdt*1-{}F^LFc26B4AdC7){m0ih{gerF*sm5 z#;;BL`-Th0hkEd~1@17*CtMu=ifE>KnB<=!e>26Ix++D#a&l9FafrNF>=T(Me*n(= Bra=Gz diff --git a/src/System.Text.Encodings.Web/src/System.Text.Encodings.Web.csproj b/src/System.Text.Encodings.Web/src/System.Text.Encodings.Web.csproj index 14b954253e3e..d918978e9a67 100644 --- a/src/System.Text.Encodings.Web/src/System.Text.Encodings.Web.csproj +++ b/src/System.Text.Encodings.Web/src/System.Text.Encodings.Web.csproj @@ -6,27 +6,24 @@ netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release - - - - - + + + + + + - + - + - - - - diff --git a/src/System.Text.Encodings.Web/src/System/Text/Encodings/Web/AllowedCharactersBitmap.cs b/src/System.Text.Encodings.Web/src/System/Text/Internal/AllowedCharactersBitmap.cs similarity index 94% rename from src/System.Text.Encodings.Web/src/System/Text/Encodings/Web/AllowedCharactersBitmap.cs rename to src/System.Text.Encodings.Web/src/System/Text/Internal/AllowedCharactersBitmap.cs index a5878cfb32bc..cb752838a190 100644 --- a/src/System.Text.Encodings.Web/src/System/Text/Encodings/Web/AllowedCharactersBitmap.cs +++ b/src/System.Text.Encodings.Web/src/System/Text/Internal/AllowedCharactersBitmap.cs @@ -21,7 +21,7 @@ public static AllowedCharactersBitmap CreateNew() private AllowedCharactersBitmap(uint[] allowedCharacters) { - if(allowedCharacters == null) + if (allowedCharacters == null) { throw new ArgumentNullException(nameof(allowedCharacters)); } @@ -50,7 +50,7 @@ public void ForbidCharacter(char character) // (includes categories Cc, Cs, Co, Cn, Zs [except U+0020 SPACE], Zl, Zp) public void ForbidUndefinedCharacters() { - uint[] definedCharactersBitmap = UnicodeHelpers.GetDefinedCharacterBitmap(); + ReadOnlySpan definedCharactersBitmap = UnicodeHelpers.GetDefinedCharacterBitmap(); Debug.Assert(definedCharactersBitmap.Length == _allowedCharacters.Length); for (int i = 0; i < _allowedCharacters.Length; i++) { @@ -93,7 +93,8 @@ public unsafe int FindFirstCharacterToEncode(char* text, int textLength) { for (int i = 0; i < textLength; i++) { - if (!IsCharacterAllowed(text[i])) { return i; } + if (!IsCharacterAllowed(text[i])) + { return i; } } return -1; } diff --git a/src/System.Text.Encodings.Web/src/System/Text/Encodings/Web/UnicodeHelpers.cs b/src/System.Text.Encodings.Web/src/System/Text/Unicode/UnicodeHelpers.cs similarity index 82% rename from src/System.Text.Encodings.Web/src/System/Text/Encodings/Web/UnicodeHelpers.cs rename to src/System.Text.Encodings.Web/src/System/Text/Unicode/UnicodeHelpers.cs index 2e486becfae1..aa66f92ebe0c 100644 --- a/src/System.Text.Encodings.Web/src/System/Text/Encodings/Web/UnicodeHelpers.cs +++ b/src/System.Text.Encodings.Web/src/System/Text/Unicode/UnicodeHelpers.cs @@ -2,18 +2,17 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; +using System.Buffers.Binary; using System.Diagnostics; -using System.Reflection; using System.Runtime.CompilerServices; -using System.Threading; +using System.Runtime.InteropServices; namespace System.Text.Unicode { /// /// Contains helpers for dealing with Unicode code points. /// - internal static unsafe class UnicodeHelpers + internal static unsafe partial class UnicodeHelpers { /// /// Used for invalid Unicode sequences or other unrepresentable values. @@ -25,64 +24,49 @@ internal static unsafe class UnicodeHelpers /// internal const int UNICODE_LAST_CODEPOINT = 0x10FFFF; - private static uint[] _definedCharacterBitmap; + // This field is only used on big-endian architectures. We don't + // bother computing it on little-endian architectures. + private static uint[] _definedCharacterBitmapBigEndian = (BitConverter.IsLittleEndian) ? null : CreateDefinedCharacterBitmapMachineEndian(); - /// - /// Helper method which creates a bitmap of all characters which are - /// defined per the Unicode specification. - /// - [MethodImpl(MethodImplOptions.NoInlining)] - private static uint[] CreateDefinedCharacterBitmap() + private static uint[] CreateDefinedCharacterBitmapMachineEndian() { - // The stream should be exactly 8KB in size. - var stream = typeof(UnicodeRange).GetTypeInfo().Assembly.GetManifestResourceStream("System.Text.Encodings.Web.Resources.unicode8definedcharacters.bin"); + Debug.Assert(!BitConverter.IsLittleEndian); - if (stream == null) - { - throw new BadImageFormatException(); - } + // We need to convert little-endian to machine-endian. - if (stream.Length != 8 * 1024) - { - Environment.FailFast("Corrupt data detected."); - } - - // Read everything in as raw bytes. - byte[] rawData = new byte[8 * 1024]; - for (int numBytesReadTotal = 0; numBytesReadTotal < rawData.Length;) - { - int numBytesReadThisIteration = stream.Read(rawData, numBytesReadTotal, rawData.Length - numBytesReadTotal); - if (numBytesReadThisIteration == 0) - { - Environment.FailFast("Corrupt data detected."); - } - numBytesReadTotal += numBytesReadThisIteration; - } + ReadOnlySpan remainingBitmap = DefinedCharsBitmapSpan; + uint[] bigEndianData = new uint[remainingBitmap.Length / sizeof(uint)]; - // Finally, convert the byte[] to a uint[]. - // The incoming bytes are little-endian. - uint[] retVal = new uint[2 * 1024]; - for (int i = 0; i < retVal.Length; i++) + for (int i = 0; i < bigEndianData.Length; i++) { - retVal[i] = (((uint)rawData[4 * i + 3]) << 24) - | (((uint)rawData[4 * i + 2]) << 16) - | (((uint)rawData[4 * i + 1]) << 8) - | (uint)rawData[4 * i]; + bigEndianData[i] = BinaryPrimitives.ReadUInt32LittleEndian(remainingBitmap); + remainingBitmap = remainingBitmap.Slice(sizeof(uint)); } - // And we're done! - Volatile.Write(ref _definedCharacterBitmap, retVal); - return retVal; + return bigEndianData; } /// - /// Returns a bitmap of all characters which are defined per version 7.0.0 + /// Returns a bitmap of all characters which are defined per the checked-in version /// of the Unicode specification. /// [MethodImpl(MethodImplOptions.AggressiveInlining)] - internal static uint[] GetDefinedCharacterBitmap() + internal static ReadOnlySpan GetDefinedCharacterBitmap() { - return Volatile.Read(ref _definedCharacterBitmap) ?? CreateDefinedCharacterBitmap(); + if (BitConverter.IsLittleEndian) + { + // Underlying data is a series of 32-bit little-endian values and is guaranteed + // properly aligned by the compiler, so we know this is a valid cast byte -> uint. + + return MemoryMarshal.Cast(DefinedCharsBitmapSpan); + } + else + { + // Static compiled data was little-endian; we had to create a big-endian + // representation at runtime. + + return _definedCharacterBitmapBigEndian; + } } /// @@ -266,7 +250,7 @@ internal static int GetUtf8RepresentationForScalarValue(uint scalar) } /// - /// Returns a value stating whether a character is defined per version 7.0.0 + /// Returns a value stating whether a character is defined per the checked-in version /// of the Unicode specification. Certain classes of characters (control chars, /// private use, surrogates, some whitespace) are considered "undefined" for /// our purposes. diff --git a/src/System.Text.Encodings.Web/src/System/Text/Unicode/UnicodeHelpers.generated.cs b/src/System.Text.Encodings.Web/src/System/Text/Unicode/UnicodeHelpers.generated.cs new file mode 100644 index 000000000000..2f8347c20243 --- /dev/null +++ b/src/System.Text.Encodings.Web/src/System/Text/Unicode/UnicodeHelpers.generated.cs @@ -0,0 +1,528 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +// This file was generated by a tool. +// See src/System.Text.Encodings.Web/tools/GenDefinedCharList + +namespace System.Text.Unicode +{ + internal static partial class UnicodeHelpers + { + private static ReadOnlySpan DefinedCharsBitmapSpan => new byte[0x2000] + { + 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, // U+0000..U+007F + 0x00, 0x00, 0x00, 0x00, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+0080..U+00FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+0100..U+017F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+0180..U+01FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+0200..U+027F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+0280..U+02FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, // U+0300..U+037F + 0xF0, 0xD7, 0xFF, 0xFF, 0xFB, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+0380..U+03FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+0400..U+047F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+0480..U+04FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xFF, 0xFF, 0xFF, 0x7F, 0xFE, 0xFE, 0xFF, 0xFF, 0xFF, // U+0500..U+057F + 0xFF, 0xE6, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0xFF, 0xFF, 0xFF, 0x07, 0x1F, 0x00, // U+0580..U+05FF + 0xFF, 0xFF, 0xFF, 0xDF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+0600..U+067F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+0680..U+06FF + 0xFF, 0xBF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xE7, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+0700..U+077F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x03, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x07, // U+0780..U+07FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0xFF, 0x7F, 0xFF, 0xFF, 0xFF, 0x4F, 0x00, 0x00, 0x00, 0x00, // U+0800..U+087F + 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xFF, 0xFF, 0xFF, // U+0880..U+08FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+0900..U+097F + 0xEF, 0x9F, 0xF9, 0xFF, 0xFF, 0xFD, 0xC5, 0xF3, 0x9F, 0x79, 0x80, 0xB0, 0xCF, 0xFF, 0xFF, 0x0F, // U+0980..U+09FF + 0xEE, 0x87, 0xF9, 0xFF, 0xFF, 0xFD, 0x6D, 0xD3, 0x87, 0x39, 0x02, 0x5E, 0xC0, 0xFF, 0x3F, 0x00, // U+0A00..U+0A7F + 0xEE, 0xBF, 0xFB, 0xFF, 0xFF, 0xFD, 0xED, 0xF3, 0xBF, 0x3B, 0x01, 0x00, 0xCF, 0xFF, 0x03, 0x02, // U+0A80..U+0AFF + 0xEE, 0x9F, 0xF9, 0xFF, 0xFF, 0xFD, 0xED, 0xF3, 0x9F, 0x39, 0xC0, 0xB0, 0xCF, 0xFF, 0xFF, 0x00, // U+0B00..U+0B7F + 0xEC, 0xC7, 0x3D, 0xD6, 0x18, 0xC7, 0xFF, 0xC3, 0xC7, 0x3D, 0x81, 0x00, 0xC0, 0xFF, 0xFF, 0x07, // U+0B80..U+0BFF + 0xEF, 0xDF, 0xFD, 0xFF, 0xFF, 0xFD, 0xFF, 0xE3, 0xDF, 0x3D, 0x60, 0x07, 0xCF, 0xFF, 0x00, 0xFF, // U+0C00..U+0C7F + 0xEE, 0xDF, 0xFD, 0xFF, 0xFF, 0xFD, 0xEF, 0xF3, 0xDF, 0x3D, 0x60, 0x40, 0xCF, 0xFF, 0x06, 0x00, // U+0C80..U+0CFF + 0xEE, 0xDF, 0xFD, 0xFF, 0xFF, 0xFF, 0xFF, 0xE7, 0xDF, 0x7D, 0x80, 0x80, 0xCF, 0xFF, 0x3F, 0xFE, // U+0D00..U+0D7F + 0xEC, 0xFF, 0x7F, 0xFC, 0xFF, 0xFF, 0xFB, 0x2F, 0x7F, 0x84, 0x5F, 0xFF, 0xC0, 0xFF, 0x1C, 0x00, // U+0D80..U+0DFF + 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x87, 0xFF, 0xFF, 0xFF, 0x0F, 0x00, 0x00, 0x00, 0x00, // U+0E00..U+0E7F + 0x96, 0x25, 0xF0, 0xFE, 0xAE, 0xEC, 0xFF, 0x3B, 0x5F, 0x3F, 0xFF, 0xF3, 0x00, 0x00, 0x00, 0x00, // U+0E80..U+0EFF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xFF, 0xFF, 0xFF, 0x1F, 0xFE, 0xFF, // U+0F00..U+0F7F + 0xFF, 0xFF, 0xFF, 0xFE, 0xFF, 0xFF, 0xFF, 0xDF, 0xFF, 0xDF, 0xFF, 0x07, 0x00, 0x00, 0x00, 0x00, // U+0F80..U+0FFF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+1000..U+107F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xBF, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+1080..U+10FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+1100..U+117F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+1180..U+11FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x3D, 0x7F, 0x3D, 0xFF, 0xFF, 0xFF, 0xFF, // U+1200..U+127F + 0xFF, 0x3D, 0xFF, 0xFF, 0xFF, 0xFF, 0x3D, 0x7F, 0x3D, 0xFF, 0x7F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+1280..U+12FF + 0xFF, 0xFF, 0x3D, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xE7, 0xFF, 0xFF, 0xFF, 0x1F, // U+1300..U+137F + 0xFF, 0xFF, 0xFF, 0x03, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0x3F, // U+1380..U+13FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+1400..U+147F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+1480..U+14FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+1500..U+157F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+1580..U+15FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+1600..U+167F + 0xFE, 0xFF, 0xFF, 0x1F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, // U+1680..U+16FF + 0xFF, 0xDF, 0x1F, 0x00, 0xFF, 0xFF, 0x7F, 0x00, 0xFF, 0xFF, 0x0F, 0x00, 0xFF, 0xDF, 0x0D, 0x00, // U+1700..U+177F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0xFF, 0x03, 0xFF, 0x03, // U+1780..U+17FF + 0xFF, 0x7F, 0xFF, 0x03, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, // U+1800..U+187F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x07, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0x00, // U+1880..U+18FF + 0xFF, 0xFF, 0xFF, 0x7F, 0xFF, 0x0F, 0xFF, 0x0F, 0xF1, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0x1F, 0x00, // U+1900..U+197F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x0F, 0xFF, 0xFF, 0xFF, 0x03, 0xFF, 0xC7, 0xFF, 0xFF, 0xFF, 0xFF, // U+1980..U+19FF + 0xFF, 0xFF, 0xFF, 0xCF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0xFF, 0xFF, 0xFF, 0x9F, // U+1A00..U+1A7F + 0xFF, 0x03, 0xFF, 0x03, 0xFF, 0x3F, 0xFF, 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // U+1A80..U+1AFF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x0F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x1F, // U+1B00..U+1B7F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x0F, 0xF0, // U+1B80..U+1BFF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0xFF, 0xE3, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+1C00..U+1C7F + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0x03, // U+1C80..U+1CFF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+1D00..U+1D7F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0xF0, // U+1D80..U+1DFF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+1E00..U+1E7F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+1E80..U+1EFF + 0xFF, 0xFF, 0x3F, 0x3F, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0x3F, 0xFF, 0xAA, 0xFF, 0xFF, 0xFF, 0x3F, // U+1F00..U+1F7F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xDF, 0xFF, 0xDF, 0xFF, 0xCF, 0xEF, 0xFF, 0xFF, 0xDC, 0x7F, // U+1F80..U+1FFF + 0x00, 0xF8, 0xFF, 0xFF, 0xFF, 0x7C, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0xDF, 0xFF, 0xF3, 0xFF, // U+2000..U+207F + 0xFF, 0x7F, 0xFF, 0x1F, 0xFF, 0xFF, 0xFF, 0x7F, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x00, // U+2080..U+20FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+2100..U+217F + 0xFF, 0x0F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+2180..U+21FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+2200..U+227F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+2280..U+22FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+2300..U+237F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x07, // U+2380..U+23FF + 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0x00, 0x00, 0x00, 0xFF, 0x07, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, // U+2400..U+247F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+2480..U+24FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+2500..U+257F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+2580..U+25FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+2600..U+267F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+2680..U+26FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+2700..U+277F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+2780..U+27FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+2800..U+287F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+2880..U+28FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+2900..U+297F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+2980..U+29FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+2A00..U+2A7F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+2A80..U+2AFF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0xFF, // U+2B00..U+2B7F + 0xFF, 0xFF, 0x3F, 0xFF, 0xFF, 0xFF, 0xFF, 0xE3, 0xFF, 0xFD, 0x03, 0x00, 0x00, 0xF0, 0x00, 0x00, // U+2B80..U+2BFF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0xFF, 0xFF, 0xFF, 0xFF, // U+2C00..U+2C7F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x0F, 0xFE, // U+2C80..U+2CFF + 0xFF, 0xFF, 0xFF, 0xFF, 0xBF, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x80, 0x01, 0x80, // U+2D00..U+2D7F + 0xFF, 0xFF, 0x7F, 0x00, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0xFF, 0xFF, 0xFF, 0xFF, // U+2D80..U+2DFF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // U+2E00..U+2E7F + 0xFF, 0xFF, 0xFF, 0xFB, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x0F, 0x00, // U+2E80..U+2EFF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+2F00..U+2F7F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0x00, 0x00, 0x00, 0xFF, 0x0F, // U+2F80..U+2FFF + 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+3000..U+307F + 0xFF, 0xFF, 0x7F, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+3080..U+30FF + 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+3100..U+317F + 0xFF, 0x7F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x07, 0xFF, 0xFF, 0xFF, 0xFF, 0x0F, 0x00, 0xFF, 0xFF, // U+3180..U+31FF + 0xFF, 0xFF, 0xFF, 0x7F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+3200..U+327F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, // U+3280..U+32FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+3300..U+337F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+3380..U+33FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+3400..U+347F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+3480..U+34FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+3500..U+357F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+3580..U+35FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+3600..U+367F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+3680..U+36FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+3700..U+377F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+3780..U+37FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+3800..U+387F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+3880..U+38FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+3900..U+397F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+3980..U+39FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+3A00..U+3A7F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+3A80..U+3AFF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+3B00..U+3B7F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+3B80..U+3BFF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+3C00..U+3C7F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+3C80..U+3CFF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+3D00..U+3D7F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+3D80..U+3DFF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+3E00..U+3E7F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+3E80..U+3EFF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+3F00..U+3F7F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+3F80..U+3FFF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+4000..U+407F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+4080..U+40FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+4100..U+417F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+4180..U+41FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+4200..U+427F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+4280..U+42FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+4300..U+437F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+4380..U+43FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+4400..U+447F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+4480..U+44FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+4500..U+457F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+4580..U+45FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+4600..U+467F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+4680..U+46FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+4700..U+477F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+4780..U+47FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+4800..U+487F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+4880..U+48FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+4900..U+497F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+4980..U+49FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+4A00..U+4A7F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+4A80..U+4AFF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+4B00..U+4B7F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+4B80..U+4BFF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+4C00..U+4C7F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+4C80..U+4CFF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+4D00..U+4D7F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+4D80..U+4DFF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+4E00..U+4E7F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+4E80..U+4EFF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+4F00..U+4F7F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+4F80..U+4FFF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+5000..U+507F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+5080..U+50FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+5100..U+517F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+5180..U+51FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+5200..U+527F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+5280..U+52FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+5300..U+537F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+5380..U+53FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+5400..U+547F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+5480..U+54FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+5500..U+557F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+5580..U+55FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+5600..U+567F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+5680..U+56FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+5700..U+577F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+5780..U+57FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+5800..U+587F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+5880..U+58FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+5900..U+597F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+5980..U+59FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+5A00..U+5A7F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+5A80..U+5AFF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+5B00..U+5B7F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+5B80..U+5BFF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+5C00..U+5C7F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+5C80..U+5CFF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+5D00..U+5D7F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+5D80..U+5DFF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+5E00..U+5E7F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+5E80..U+5EFF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+5F00..U+5F7F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+5F80..U+5FFF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+6000..U+607F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+6080..U+60FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+6100..U+617F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+6180..U+61FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+6200..U+627F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+6280..U+62FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+6300..U+637F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+6380..U+63FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+6400..U+647F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+6480..U+64FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+6500..U+657F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+6580..U+65FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+6600..U+667F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+6680..U+66FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+6700..U+677F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+6780..U+67FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+6800..U+687F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+6880..U+68FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+6900..U+697F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+6980..U+69FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+6A00..U+6A7F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+6A80..U+6AFF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+6B00..U+6B7F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+6B80..U+6BFF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+6C00..U+6C7F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+6C80..U+6CFF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+6D00..U+6D7F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+6D80..U+6DFF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+6E00..U+6E7F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+6E80..U+6EFF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+6F00..U+6F7F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+6F80..U+6FFF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+7000..U+707F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+7080..U+70FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+7100..U+717F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+7180..U+71FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+7200..U+727F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+7280..U+72FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+7300..U+737F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+7380..U+73FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+7400..U+747F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+7480..U+74FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+7500..U+757F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+7580..U+75FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+7600..U+767F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+7680..U+76FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+7700..U+777F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+7780..U+77FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+7800..U+787F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+7880..U+78FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+7900..U+797F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+7980..U+79FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+7A00..U+7A7F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+7A80..U+7AFF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+7B00..U+7B7F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+7B80..U+7BFF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+7C00..U+7C7F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+7C80..U+7CFF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+7D00..U+7D7F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+7D80..U+7DFF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+7E00..U+7E7F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+7E80..U+7EFF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+7F00..U+7F7F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+7F80..U+7FFF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+8000..U+807F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+8080..U+80FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+8100..U+817F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+8180..U+81FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+8200..U+827F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+8280..U+82FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+8300..U+837F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+8380..U+83FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+8400..U+847F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+8480..U+84FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+8500..U+857F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+8580..U+85FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+8600..U+867F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+8680..U+86FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+8700..U+877F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+8780..U+87FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+8800..U+887F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+8880..U+88FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+8900..U+897F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+8980..U+89FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+8A00..U+8A7F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+8A80..U+8AFF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+8B00..U+8B7F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+8B80..U+8BFF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+8C00..U+8C7F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+8C80..U+8CFF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+8D00..U+8D7F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+8D80..U+8DFF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+8E00..U+8E7F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+8E80..U+8EFF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+8F00..U+8F7F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+8F80..U+8FFF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+9000..U+907F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+9080..U+90FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+9100..U+917F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+9180..U+91FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+9200..U+927F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+9280..U+92FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+9300..U+937F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+9380..U+93FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+9400..U+947F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+9480..U+94FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+9500..U+957F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+9580..U+95FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+9600..U+967F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+9680..U+96FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+9700..U+977F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+9780..U+97FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+9800..U+987F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+9880..U+98FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+9900..U+997F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+9980..U+99FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+9A00..U+9A7F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+9A80..U+9AFF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+9B00..U+9B7F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+9B80..U+9BFF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+9C00..U+9C7F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+9C80..U+9CFF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+9D00..U+9D7F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+9D80..U+9DFF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+9E00..U+9E7F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+9E80..U+9EFF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+9F00..U+9F7F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, // U+9F80..U+9FFF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+A000..U+A07F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+A080..U+A0FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+A100..U+A17F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+A180..U+A1FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+A200..U+A27F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+A280..U+A2FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+A300..U+A37F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+A380..U+A3FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+A400..U+A47F + 0xFF, 0x1F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+A480..U+A4FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+A500..U+A57F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+A580..U+A5FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x0F, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+A600..U+A67F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, // U+A680..U+A6FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+A700..U+A77F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xFF, // U+A780..U+A7FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x0F, 0xFF, 0x03, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, // U+A800..U+A87F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x1F, 0xC0, 0xFF, 0x03, 0xFF, 0xFF, 0xFF, 0x3F, // U+A880..U+A8FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x0F, 0x80, 0xFF, 0xFF, 0xFF, 0x1F, // U+A900..U+A97F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xBF, 0xFF, 0xC3, 0xFF, 0xFF, 0xFF, 0x7F, // U+A980..U+A9FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0x00, 0xFF, 0x3F, 0xFF, 0xF3, 0xFF, 0xFF, 0xFF, 0xFF, // U+AA00..U+AA7F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x07, 0x00, 0x00, 0xF8, 0xFF, 0xFF, 0x7F, 0x00, // U+AA80..U+AAFF + 0x7E, 0x7E, 0x7E, 0x00, 0x7F, 0x7F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0x00, 0xFF, 0xFF, // U+AB00..U+AB7F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0xFF, 0x03, // U+AB80..U+ABFF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+AC00..U+AC7F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+AC80..U+ACFF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+AD00..U+AD7F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+AD80..U+ADFF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+AE00..U+AE7F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+AE80..U+AEFF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+AF00..U+AF7F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+AF80..U+AFFF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+B000..U+B07F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+B080..U+B0FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+B100..U+B17F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+B180..U+B1FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+B200..U+B27F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+B280..U+B2FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+B300..U+B37F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+B380..U+B3FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+B400..U+B47F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+B480..U+B4FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+B500..U+B57F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+B580..U+B5FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+B600..U+B67F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+B680..U+B6FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+B700..U+B77F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+B780..U+B7FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+B800..U+B87F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+B880..U+B8FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+B900..U+B97F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+B980..U+B9FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+BA00..U+BA7F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+BA80..U+BAFF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+BB00..U+BB7F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+BB80..U+BBFF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+BC00..U+BC7F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+BC80..U+BCFF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+BD00..U+BD7F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+BD80..U+BDFF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+BE00..U+BE7F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+BE80..U+BEFF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+BF00..U+BF7F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+BF80..U+BFFF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+C000..U+C07F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+C080..U+C0FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+C100..U+C17F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+C180..U+C1FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+C200..U+C27F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+C280..U+C2FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+C300..U+C37F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+C380..U+C3FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+C400..U+C47F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+C480..U+C4FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+C500..U+C57F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+C580..U+C5FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+C600..U+C67F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+C680..U+C6FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+C700..U+C77F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+C780..U+C7FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+C800..U+C87F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+C880..U+C8FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+C900..U+C97F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+C980..U+C9FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+CA00..U+CA7F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+CA80..U+CAFF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+CB00..U+CB7F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+CB80..U+CBFF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+CC00..U+CC7F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+CC80..U+CCFF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+CD00..U+CD7F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+CD80..U+CDFF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+CE00..U+CE7F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+CE80..U+CEFF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+CF00..U+CF7F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+CF80..U+CFFF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+D000..U+D07F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+D080..U+D0FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+D100..U+D17F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+D180..U+D1FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+D200..U+D27F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+D280..U+D2FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+D300..U+D37F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+D380..U+D3FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+D400..U+D47F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+D480..U+D4FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+D500..U+D57F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+D580..U+D5FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+D600..U+D67F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+D680..U+D6FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+D700..U+D77F + 0xFF, 0xFF, 0xFF, 0xFF, 0x0F, 0x00, 0xFF, 0xFF, 0x7F, 0xF8, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x0F, // U+D780..U+D7FF + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // U+D800..U+D87F + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // U+D880..U+D8FF + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // U+D900..U+D97F + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // U+D980..U+D9FF + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // U+DA00..U+DA7F + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // U+DA80..U+DAFF + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // U+DB00..U+DB7F + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // U+DB80..U+DBFF + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // U+DC00..U+DC7F + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // U+DC80..U+DCFF + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // U+DD00..U+DD7F + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // U+DD80..U+DDFF + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // U+DE00..U+DE7F + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // U+DE80..U+DEFF + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // U+DF00..U+DF7F + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // U+DF80..U+DFFF + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // U+E000..U+E07F + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // U+E080..U+E0FF + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // U+E100..U+E17F + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // U+E180..U+E1FF + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // U+E200..U+E27F + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // U+E280..U+E2FF + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // U+E300..U+E37F + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // U+E380..U+E3FF + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // U+E400..U+E47F + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // U+E480..U+E4FF + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // U+E500..U+E57F + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // U+E580..U+E5FF + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // U+E600..U+E67F + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // U+E680..U+E6FF + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // U+E700..U+E77F + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // U+E780..U+E7FF + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // U+E800..U+E87F + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // U+E880..U+E8FF + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // U+E900..U+E97F + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // U+E980..U+E9FF + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // U+EA00..U+EA7F + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // U+EA80..U+EAFF + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // U+EB00..U+EB7F + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // U+EB80..U+EBFF + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // U+EC00..U+EC7F + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // U+EC80..U+ECFF + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // U+ED00..U+ED7F + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // U+ED80..U+EDFF + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // U+EE00..U+EE7F + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // U+EE80..U+EEFF + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // U+EF00..U+EF7F + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // U+EF80..U+EFFF + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // U+F000..U+F07F + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // U+F080..U+F0FF + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // U+F100..U+F17F + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // U+F180..U+F1FF + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // U+F200..U+F27F + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // U+F280..U+F2FF + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // U+F300..U+F37F + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // U+F380..U+F3FF + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // U+F400..U+F47F + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // U+F480..U+F4FF + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // U+F500..U+F57F + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // U+F580..U+F5FF + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // U+F600..U+F67F + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // U+F680..U+F6FF + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // U+F700..U+F77F + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // U+F780..U+F7FF + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // U+F800..U+F87F + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // U+F880..U+F8FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+F900..U+F97F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+F980..U+F9FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0xFF, 0xFF, // U+FA00..U+FA7F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x03, 0x00, 0x00, 0x00, 0x00, // U+FA80..U+FAFF + 0x7F, 0x00, 0xF8, 0xE0, 0xFF, 0xFF, 0x7F, 0x5F, 0xDB, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+FB00..U+FB7F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x03, 0x00, 0xF8, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+FB80..U+FBFF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+FC00..U+FC7F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+FC80..U+FCFF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+FD00..U+FD7F + 0xFF, 0xFF, 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x3F, // U+FD80..U+FDFF + 0xFF, 0xFF, 0xFF, 0x03, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0xFF, 0x7F, 0x0F, 0xDF, 0xFF, // U+FE00..U+FE7F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, // U+FE80..U+FEFF + 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+FF00..U+FF7F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0xFC, 0xFC, 0xFC, 0x1C, 0x7F, 0x7F, 0x00, 0x3E, // U+FF80..U+FFFF + }; + } +} diff --git a/src/System.Text.Encodings.Web/src/System/Text/Encodings/Web/UnicodeRange.cs b/src/System.Text.Encodings.Web/src/System/Text/Unicode/UnicodeRange.cs similarity index 100% rename from src/System.Text.Encodings.Web/src/System/Text/Encodings/Web/UnicodeRange.cs rename to src/System.Text.Encodings.Web/src/System/Text/Unicode/UnicodeRange.cs diff --git a/src/System.Text.Encodings.Web/src/System/Text/Encodings/Web/UnicodeRanges.cs b/src/System.Text.Encodings.Web/src/System/Text/Unicode/UnicodeRanges.cs similarity index 83% rename from src/System.Text.Encodings.Web/src/System/Text/Encodings/Web/UnicodeRanges.cs rename to src/System.Text.Encodings.Web/src/System/Text/Unicode/UnicodeRanges.cs index c7586d69b615..e940bef8a9a9 100644 --- a/src/System.Text.Encodings.Web/src/System/Text/Encodings/Web/UnicodeRanges.cs +++ b/src/System.Text.Encodings.Web/src/System/Text/Unicode/UnicodeRanges.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Diagnostics; using System.Runtime.CompilerServices; using System.Threading; @@ -18,14 +16,14 @@ public static partial class UnicodeRanges /// /// An empty . This range contains no code points. /// - public static UnicodeRange None { get { return _none ?? CreateEmptyRange(ref _none); } } + public static UnicodeRange None => _none ?? CreateEmptyRange(ref _none); private static UnicodeRange _none; /// /// A which contains all characters in the Unicode Basic /// Multilingual Plane (U+0000..U+FFFF). /// - public static UnicodeRange All { get { return _all ?? CreateRange(ref _all, '\u0000', '\uFFFF'); } } + public static UnicodeRange All => _all ?? CreateRange(ref _all, '\u0000', '\uFFFF'); private static UnicodeRange _all; [MethodImpl(MethodImplOptions.NoInlining)] // the caller should be inlined, not this method @@ -33,7 +31,7 @@ private static UnicodeRange CreateEmptyRange(ref UnicodeRange range) { // If the range hasn't been created, create it now. // It's ok if two threads race and one overwrites the other's 'range' value. - range = new UnicodeRange(0, 0); + Volatile.Write(ref range, new UnicodeRange(0, 0)); return range; } @@ -42,7 +40,7 @@ private static UnicodeRange CreateRange(ref UnicodeRange range, char first, char { // If the range hasn't been created, create it now. // It's ok if two threads race and one overwrites the other's 'range' value. - range = UnicodeRange.Create(first, last); + Volatile.Write(ref range, UnicodeRange.Create(first, last)); return range; } } diff --git a/src/System.Text.Encodings.Web/src/System/Text/Encodings/Web/UnicodeRanges.generated.cs b/src/System.Text.Encodings.Web/src/System/Text/Unicode/UnicodeRanges.generated.cs similarity index 100% rename from src/System.Text.Encodings.Web/src/System/Text/Encodings/Web/UnicodeRanges.generated.cs rename to src/System.Text.Encodings.Web/src/System/Text/Unicode/UnicodeRanges.generated.cs diff --git a/src/System.Text.Encodings.Web/tests/System.Text.Encodings.Web.Tests.csproj b/src/System.Text.Encodings.Web/tests/System.Text.Encodings.Web.Tests.csproj index 7a3d6f4b7aa0..849bf48203eb 100644 --- a/src/System.Text.Encodings.Web/tests/System.Text.Encodings.Web.Tests.csproj +++ b/src/System.Text.Encodings.Web/tests/System.Text.Encodings.Web.Tests.csproj @@ -14,9 +14,10 @@ - - + + + @@ -39,6 +40,7 @@ + diff --git a/src/System.Text.Encodings.Web/tests/UnicodeHelpersTests.cs b/src/System.Text.Encodings.Web/tests/UnicodeHelpersTests.cs index 2b22d4fd6dfe..1a61732525a5 100644 --- a/src/System.Text.Encodings.Web/tests/UnicodeHelpersTests.cs +++ b/src/System.Text.Encodings.Web/tests/UnicodeHelpersTests.cs @@ -2,14 +2,12 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Linq; using System.Reflection; using System.Text; -using System.Text.Encodings.Web; using System.Text.Unicode; using Xunit; @@ -17,6 +15,9 @@ namespace Microsoft.Framework.WebEncoders { public unsafe class UnicodeHelpersTests { + // If updating the version of UnicodeData.txt, update the below string with the new file name. + private const string UnicodeDataFileName = "UnicodeData.8.0.txt"; + private const int UnicodeReplacementChar = '\uFFFD'; private static readonly UTF8Encoding _utf8EncodingThrowOnInvalidBytes = new UTF8Encoding(encoderShouldEmitUTF8Identifier: false, throwOnInvalidBytes: true); @@ -161,7 +162,7 @@ private static bool[] ReadListOfDefinedCharacters() HashSet seenCategories = new HashSet(); bool[] retVal = new bool[0x10000]; - string[] allLines = new StreamReader(typeof(UnicodeHelpersTests).GetTypeInfo().Assembly.GetManifestResourceStream("UnicodeData.8.0.txt")).ReadAllLines(); + string[] allLines = new StreamReader(typeof(UnicodeHelpersTests).GetTypeInfo().Assembly.GetManifestResourceStream(UnicodeDataFileName)).ReadAllLines(); uint startSpanCodepoint = 0; foreach (string line in allLines) diff --git a/src/System.Text.Encodings.Web/tests/UnicodeRangesTests.cs b/src/System.Text.Encodings.Web/tests/UnicodeRangesTests.cs index dfa9fd634b3b..e893b91c92b0 100644 --- a/src/System.Text.Encodings.Web/tests/UnicodeRangesTests.cs +++ b/src/System.Text.Encodings.Web/tests/UnicodeRangesTests.cs @@ -2,18 +2,15 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Reflection; -using System.Text.Encodings.Web; -using System.Text.Unicode; using Xunit; -namespace Microsoft.Framework.WebEncoders +namespace System.Text.Unicode.Tests { - public class UnicodeRangesTests + public static partial class UnicodeRangesTests { [Fact] - public void Range_None() + public static void Range_None() { UnicodeRange range = UnicodeRanges.None; Assert.NotNull(range); @@ -24,169 +21,14 @@ public void Range_None() } [Fact] - public void Range_All() + public static void Range_All() { Range_Unicode('\u0000', '\uFFFF', "All"); } [Theory] - [InlineData('\u0000', '\u007F', "BasicLatin")] - [InlineData('\u0080', '\u00FF', "Latin1Supplement")] - [InlineData('\u0100', '\u017F', "LatinExtendedA")] - [InlineData('\u0180', '\u024F', "LatinExtendedB")] - [InlineData('\u0250', '\u02AF', "IpaExtensions")] - [InlineData('\u02B0', '\u02FF', "SpacingModifierLetters")] - [InlineData('\u0300', '\u036F', "CombiningDiacriticalMarks")] - [InlineData('\u0370', '\u03FF', "GreekandCoptic")] - [InlineData('\u0400', '\u04FF', "Cyrillic")] - [InlineData('\u0500', '\u052F', "CyrillicSupplement")] - [InlineData('\u0530', '\u058F', "Armenian")] - [InlineData('\u0590', '\u05FF', "Hebrew")] - [InlineData('\u0600', '\u06FF', "Arabic")] - [InlineData('\u0700', '\u074F', "Syriac")] - [InlineData('\u0750', '\u077F', "ArabicSupplement")] - [InlineData('\u0780', '\u07BF', "Thaana")] - [InlineData('\u07C0', '\u07FF', "NKo")] - [InlineData('\u0800', '\u083F', "Samaritan")] - [InlineData('\u0840', '\u085F', "Mandaic")] - [InlineData('\u08A0', '\u08FF', "ArabicExtendedA")] - [InlineData('\u0900', '\u097F', "Devanagari")] - [InlineData('\u0980', '\u09FF', "Bengali")] - [InlineData('\u0A00', '\u0A7F', "Gurmukhi")] - [InlineData('\u0A80', '\u0AFF', "Gujarati")] - [InlineData('\u0B00', '\u0B7F', "Oriya")] - [InlineData('\u0B80', '\u0BFF', "Tamil")] - [InlineData('\u0C00', '\u0C7F', "Telugu")] - [InlineData('\u0C80', '\u0CFF', "Kannada")] - [InlineData('\u0D00', '\u0D7F', "Malayalam")] - [InlineData('\u0D80', '\u0DFF', "Sinhala")] - [InlineData('\u0E00', '\u0E7F', "Thai")] - [InlineData('\u0E80', '\u0EFF', "Lao")] - [InlineData('\u0F00', '\u0FFF', "Tibetan")] - [InlineData('\u1000', '\u109F', "Myanmar")] - [InlineData('\u10A0', '\u10FF', "Georgian")] - [InlineData('\u1100', '\u11FF', "HangulJamo")] - [InlineData('\u1200', '\u137F', "Ethiopic")] - [InlineData('\u1380', '\u139F', "EthiopicSupplement")] - [InlineData('\u13A0', '\u13FF', "Cherokee")] - [InlineData('\u1400', '\u167F', "UnifiedCanadianAboriginalSyllabics")] - [InlineData('\u1680', '\u169F', "Ogham")] - [InlineData('\u16A0', '\u16FF', "Runic")] - [InlineData('\u1700', '\u171F', "Tagalog")] - [InlineData('\u1720', '\u173F', "Hanunoo")] - [InlineData('\u1740', '\u175F', "Buhid")] - [InlineData('\u1760', '\u177F', "Tagbanwa")] - [InlineData('\u1780', '\u17FF', "Khmer")] - [InlineData('\u1800', '\u18AF', "Mongolian")] - [InlineData('\u18B0', '\u18FF', "UnifiedCanadianAboriginalSyllabicsExtended")] - [InlineData('\u1900', '\u194F', "Limbu")] - [InlineData('\u1950', '\u197F', "TaiLe")] - [InlineData('\u1980', '\u19DF', "NewTaiLue")] - [InlineData('\u19E0', '\u19FF', "KhmerSymbols")] - [InlineData('\u1A00', '\u1A1F', "Buginese")] - [InlineData('\u1A20', '\u1AAF', "TaiTham")] - [InlineData('\u1AB0', '\u1AFF', "CombiningDiacriticalMarksExtended")] - [InlineData('\u1B00', '\u1B7F', "Balinese")] - [InlineData('\u1B80', '\u1BBF', "Sundanese")] - [InlineData('\u1BC0', '\u1BFF', "Batak")] - [InlineData('\u1C00', '\u1C4F', "Lepcha")] - [InlineData('\u1C50', '\u1C7F', "OlChiki")] - [InlineData('\u1CC0', '\u1CCF', "SundaneseSupplement")] - [InlineData('\u1CD0', '\u1CFF', "VedicExtensions")] - [InlineData('\u1D00', '\u1D7F', "PhoneticExtensions")] - [InlineData('\u1D80', '\u1DBF', "PhoneticExtensionsSupplement")] - [InlineData('\u1DC0', '\u1DFF', "CombiningDiacriticalMarksSupplement")] - [InlineData('\u1E00', '\u1EFF', "LatinExtendedAdditional")] - [InlineData('\u1F00', '\u1FFF', "GreekExtended")] - [InlineData('\u2000', '\u206F', "GeneralPunctuation")] - [InlineData('\u2070', '\u209F', "SuperscriptsandSubscripts")] - [InlineData('\u20A0', '\u20CF', "CurrencySymbols")] - [InlineData('\u20D0', '\u20FF', "CombiningDiacriticalMarksforSymbols")] - [InlineData('\u2100', '\u214F', "LetterlikeSymbols")] - [InlineData('\u2150', '\u218F', "NumberForms")] - [InlineData('\u2190', '\u21FF', "Arrows")] - [InlineData('\u2200', '\u22FF', "MathematicalOperators")] - [InlineData('\u2300', '\u23FF', "MiscellaneousTechnical")] - [InlineData('\u2400', '\u243F', "ControlPictures")] - [InlineData('\u2440', '\u245F', "OpticalCharacterRecognition")] - [InlineData('\u2460', '\u24FF', "EnclosedAlphanumerics")] - [InlineData('\u2500', '\u257F', "BoxDrawing")] - [InlineData('\u2580', '\u259F', "BlockElements")] - [InlineData('\u25A0', '\u25FF', "GeometricShapes")] - [InlineData('\u2600', '\u26FF', "MiscellaneousSymbols")] - [InlineData('\u2700', '\u27BF', "Dingbats")] - [InlineData('\u27C0', '\u27EF', "MiscellaneousMathematicalSymbolsA")] - [InlineData('\u27F0', '\u27FF', "SupplementalArrowsA")] - [InlineData('\u2800', '\u28FF', "BraillePatterns")] - [InlineData('\u2900', '\u297F', "SupplementalArrowsB")] - [InlineData('\u2980', '\u29FF', "MiscellaneousMathematicalSymbolsB")] - [InlineData('\u2A00', '\u2AFF', "SupplementalMathematicalOperators")] - [InlineData('\u2B00', '\u2BFF', "MiscellaneousSymbolsandArrows")] - [InlineData('\u2C00', '\u2C5F', "Glagolitic")] - [InlineData('\u2C60', '\u2C7F', "LatinExtendedC")] - [InlineData('\u2C80', '\u2CFF', "Coptic")] - [InlineData('\u2D00', '\u2D2F', "GeorgianSupplement")] - [InlineData('\u2D30', '\u2D7F', "Tifinagh")] - [InlineData('\u2D80', '\u2DDF', "EthiopicExtended")] - [InlineData('\u2DE0', '\u2DFF', "CyrillicExtendedA")] - [InlineData('\u2E00', '\u2E7F', "SupplementalPunctuation")] - [InlineData('\u2E80', '\u2EFF', "CjkRadicalsSupplement")] - [InlineData('\u2F00', '\u2FDF', "KangxiRadicals")] - [InlineData('\u2FF0', '\u2FFF', "IdeographicDescriptionCharacters")] - [InlineData('\u3000', '\u303F', "CjkSymbolsandPunctuation")] - [InlineData('\u3040', '\u309F', "Hiragana")] - [InlineData('\u30A0', '\u30FF', "Katakana")] - [InlineData('\u3100', '\u312F', "Bopomofo")] - [InlineData('\u3130', '\u318F', "HangulCompatibilityJamo")] - [InlineData('\u3190', '\u319F', "Kanbun")] - [InlineData('\u31A0', '\u31BF', "BopomofoExtended")] - [InlineData('\u31C0', '\u31EF', "CjkStrokes")] - [InlineData('\u31F0', '\u31FF', "KatakanaPhoneticExtensions")] - [InlineData('\u3200', '\u32FF', "EnclosedCjkLettersandMonths")] - [InlineData('\u3300', '\u33FF', "CjkCompatibility")] - [InlineData('\u3400', '\u4DBF', "CjkUnifiedIdeographsExtensionA")] - [InlineData('\u4DC0', '\u4DFF', "YijingHexagramSymbols")] - [InlineData('\u4E00', '\u9FFF', "CjkUnifiedIdeographs")] - [InlineData('\uA000', '\uA48F', "YiSyllables")] - [InlineData('\uA490', '\uA4CF', "YiRadicals")] - [InlineData('\uA4D0', '\uA4FF', "Lisu")] - [InlineData('\uA500', '\uA63F', "Vai")] - [InlineData('\uA640', '\uA69F', "CyrillicExtendedB")] - [InlineData('\uA6A0', '\uA6FF', "Bamum")] - [InlineData('\uA700', '\uA71F', "ModifierToneLetters")] - [InlineData('\uA720', '\uA7FF', "LatinExtendedD")] - [InlineData('\uA800', '\uA82F', "SylotiNagri")] - [InlineData('\uA830', '\uA83F', "CommonIndicNumberForms")] - [InlineData('\uA840', '\uA87F', "Phagspa")] - [InlineData('\uA880', '\uA8DF', "Saurashtra")] - [InlineData('\uA8E0', '\uA8FF', "DevanagariExtended")] - [InlineData('\uA900', '\uA92F', "KayahLi")] - [InlineData('\uA930', '\uA95F', "Rejang")] - [InlineData('\uA960', '\uA97F', "HangulJamoExtendedA")] - [InlineData('\uA980', '\uA9DF', "Javanese")] - [InlineData('\uA9E0', '\uA9FF', "MyanmarExtendedB")] - [InlineData('\uAA00', '\uAA5F', "Cham")] - [InlineData('\uAA60', '\uAA7F', "MyanmarExtendedA")] - [InlineData('\uAA80', '\uAADF', "TaiViet")] - [InlineData('\uAAE0', '\uAAFF', "MeeteiMayekExtensions")] - [InlineData('\uAB00', '\uAB2F', "EthiopicExtendedA")] - [InlineData('\uAB30', '\uAB6F', "LatinExtendedE")] - [InlineData('\uAB70', '\uABBF', "CherokeeSupplement")] - [InlineData('\uABC0', '\uABFF', "MeeteiMayek")] - [InlineData('\uAC00', '\uD7AF', "HangulSyllables")] - [InlineData('\uD7B0', '\uD7FF', "HangulJamoExtendedB")] - [InlineData('\uF900', '\uFAFF', "CjkCompatibilityIdeographs")] - [InlineData('\uFB00', '\uFB4F', "AlphabeticPresentationForms")] - [InlineData('\uFB50', '\uFDFF', "ArabicPresentationFormsA")] - [InlineData('\uFE00', '\uFE0F', "VariationSelectors")] - [InlineData('\uFE10', '\uFE1F', "VerticalForms")] - [InlineData('\uFE20', '\uFE2F', "CombiningHalfMarks")] - [InlineData('\uFE30', '\uFE4F', "CjkCompatibilityForms")] - [InlineData('\uFE50', '\uFE6F', "SmallFormVariants")] - [InlineData('\uFE70', '\uFEFF', "ArabicPresentationFormsB")] - [InlineData('\uFF00', '\uFFEF', "HalfwidthandFullwidthForms")] - [InlineData('\uFFF0', '\uFFFF', "Specials")] - public void Range_Unicode(ushort first, ushort last, string blockName) + [MemberData(nameof(UnicodeRanges_GeneratedData))] + public static void Range_Unicode(ushort first, ushort last, string blockName) { Assert.Equal(0x0, first & 0xF); // first char in any block should be U+nnn0 Assert.Equal(0xF, last & 0xF); // last char in any block should be U+nnnF diff --git a/src/System.Text.Encodings.Web/tests/UnicodeRangesTests.generated.cs b/src/System.Text.Encodings.Web/tests/UnicodeRangesTests.generated.cs new file mode 100644 index 000000000000..ba9194b92e46 --- /dev/null +++ b/src/System.Text.Encodings.Web/tests/UnicodeRangesTests.generated.cs @@ -0,0 +1,171 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Collections.Generic; + +namespace System.Text.Unicode.Tests +{ + public static partial class UnicodeRangesTests + { + public static IEnumerable UnicodeRanges_GeneratedData => new[] + { + new object[] { '\u0000', '\u007F', "BasicLatin" }, + new object[] { '\u0080', '\u00FF', "Latin1Supplement" }, + new object[] { '\u0100', '\u017F', "LatinExtendedA" }, + new object[] { '\u0180', '\u024F', "LatinExtendedB" }, + new object[] { '\u0250', '\u02AF', "IpaExtensions" }, + new object[] { '\u02B0', '\u02FF', "SpacingModifierLetters" }, + new object[] { '\u0300', '\u036F', "CombiningDiacriticalMarks" }, + new object[] { '\u0370', '\u03FF', "GreekandCoptic" }, + new object[] { '\u0400', '\u04FF', "Cyrillic" }, + new object[] { '\u0500', '\u052F', "CyrillicSupplement" }, + new object[] { '\u0530', '\u058F', "Armenian" }, + new object[] { '\u0590', '\u05FF', "Hebrew" }, + new object[] { '\u0600', '\u06FF', "Arabic" }, + new object[] { '\u0700', '\u074F', "Syriac" }, + new object[] { '\u0750', '\u077F', "ArabicSupplement" }, + new object[] { '\u0780', '\u07BF', "Thaana" }, + new object[] { '\u07C0', '\u07FF', "NKo" }, + new object[] { '\u0800', '\u083F', "Samaritan" }, + new object[] { '\u0840', '\u085F', "Mandaic" }, + new object[] { '\u08A0', '\u08FF', "ArabicExtendedA" }, + new object[] { '\u0900', '\u097F', "Devanagari" }, + new object[] { '\u0980', '\u09FF', "Bengali" }, + new object[] { '\u0A00', '\u0A7F', "Gurmukhi" }, + new object[] { '\u0A80', '\u0AFF', "Gujarati" }, + new object[] { '\u0B00', '\u0B7F', "Oriya" }, + new object[] { '\u0B80', '\u0BFF', "Tamil" }, + new object[] { '\u0C00', '\u0C7F', "Telugu" }, + new object[] { '\u0C80', '\u0CFF', "Kannada" }, + new object[] { '\u0D00', '\u0D7F', "Malayalam" }, + new object[] { '\u0D80', '\u0DFF', "Sinhala" }, + new object[] { '\u0E00', '\u0E7F', "Thai" }, + new object[] { '\u0E80', '\u0EFF', "Lao" }, + new object[] { '\u0F00', '\u0FFF', "Tibetan" }, + new object[] { '\u1000', '\u109F', "Myanmar" }, + new object[] { '\u10A0', '\u10FF', "Georgian" }, + new object[] { '\u1100', '\u11FF', "HangulJamo" }, + new object[] { '\u1200', '\u137F', "Ethiopic" }, + new object[] { '\u1380', '\u139F', "EthiopicSupplement" }, + new object[] { '\u13A0', '\u13FF', "Cherokee" }, + new object[] { '\u1400', '\u167F', "UnifiedCanadianAboriginalSyllabics" }, + new object[] { '\u1680', '\u169F', "Ogham" }, + new object[] { '\u16A0', '\u16FF', "Runic" }, + new object[] { '\u1700', '\u171F', "Tagalog" }, + new object[] { '\u1720', '\u173F', "Hanunoo" }, + new object[] { '\u1740', '\u175F', "Buhid" }, + new object[] { '\u1760', '\u177F', "Tagbanwa" }, + new object[] { '\u1780', '\u17FF', "Khmer" }, + new object[] { '\u1800', '\u18AF', "Mongolian" }, + new object[] { '\u18B0', '\u18FF', "UnifiedCanadianAboriginalSyllabicsExtended" }, + new object[] { '\u1900', '\u194F', "Limbu" }, + new object[] { '\u1950', '\u197F', "TaiLe" }, + new object[] { '\u1980', '\u19DF', "NewTaiLue" }, + new object[] { '\u19E0', '\u19FF', "KhmerSymbols" }, + new object[] { '\u1A00', '\u1A1F', "Buginese" }, + new object[] { '\u1A20', '\u1AAF', "TaiTham" }, + new object[] { '\u1AB0', '\u1AFF', "CombiningDiacriticalMarksExtended" }, + new object[] { '\u1B00', '\u1B7F', "Balinese" }, + new object[] { '\u1B80', '\u1BBF', "Sundanese" }, + new object[] { '\u1BC0', '\u1BFF', "Batak" }, + new object[] { '\u1C00', '\u1C4F', "Lepcha" }, + new object[] { '\u1C50', '\u1C7F', "OlChiki" }, + new object[] { '\u1CC0', '\u1CCF', "SundaneseSupplement" }, + new object[] { '\u1CD0', '\u1CFF', "VedicExtensions" }, + new object[] { '\u1D00', '\u1D7F', "PhoneticExtensions" }, + new object[] { '\u1D80', '\u1DBF', "PhoneticExtensionsSupplement" }, + new object[] { '\u1DC0', '\u1DFF', "CombiningDiacriticalMarksSupplement" }, + new object[] { '\u1E00', '\u1EFF', "LatinExtendedAdditional" }, + new object[] { '\u1F00', '\u1FFF', "GreekExtended" }, + new object[] { '\u2000', '\u206F', "GeneralPunctuation" }, + new object[] { '\u2070', '\u209F', "SuperscriptsandSubscripts" }, + new object[] { '\u20A0', '\u20CF', "CurrencySymbols" }, + new object[] { '\u20D0', '\u20FF', "CombiningDiacriticalMarksforSymbols" }, + new object[] { '\u2100', '\u214F', "LetterlikeSymbols" }, + new object[] { '\u2150', '\u218F', "NumberForms" }, + new object[] { '\u2190', '\u21FF', "Arrows" }, + new object[] { '\u2200', '\u22FF', "MathematicalOperators" }, + new object[] { '\u2300', '\u23FF', "MiscellaneousTechnical" }, + new object[] { '\u2400', '\u243F', "ControlPictures" }, + new object[] { '\u2440', '\u245F', "OpticalCharacterRecognition" }, + new object[] { '\u2460', '\u24FF', "EnclosedAlphanumerics" }, + new object[] { '\u2500', '\u257F', "BoxDrawing" }, + new object[] { '\u2580', '\u259F', "BlockElements" }, + new object[] { '\u25A0', '\u25FF', "GeometricShapes" }, + new object[] { '\u2600', '\u26FF', "MiscellaneousSymbols" }, + new object[] { '\u2700', '\u27BF', "Dingbats" }, + new object[] { '\u27C0', '\u27EF', "MiscellaneousMathematicalSymbolsA" }, + new object[] { '\u27F0', '\u27FF', "SupplementalArrowsA" }, + new object[] { '\u2800', '\u28FF', "BraillePatterns" }, + new object[] { '\u2900', '\u297F', "SupplementalArrowsB" }, + new object[] { '\u2980', '\u29FF', "MiscellaneousMathematicalSymbolsB" }, + new object[] { '\u2A00', '\u2AFF', "SupplementalMathematicalOperators" }, + new object[] { '\u2B00', '\u2BFF', "MiscellaneousSymbolsandArrows" }, + new object[] { '\u2C00', '\u2C5F', "Glagolitic" }, + new object[] { '\u2C60', '\u2C7F', "LatinExtendedC" }, + new object[] { '\u2C80', '\u2CFF', "Coptic" }, + new object[] { '\u2D00', '\u2D2F', "GeorgianSupplement" }, + new object[] { '\u2D30', '\u2D7F', "Tifinagh" }, + new object[] { '\u2D80', '\u2DDF', "EthiopicExtended" }, + new object[] { '\u2DE0', '\u2DFF', "CyrillicExtendedA" }, + new object[] { '\u2E00', '\u2E7F', "SupplementalPunctuation" }, + new object[] { '\u2E80', '\u2EFF', "CjkRadicalsSupplement" }, + new object[] { '\u2F00', '\u2FDF', "KangxiRadicals" }, + new object[] { '\u2FF0', '\u2FFF', "IdeographicDescriptionCharacters" }, + new object[] { '\u3000', '\u303F', "CjkSymbolsandPunctuation" }, + new object[] { '\u3040', '\u309F', "Hiragana" }, + new object[] { '\u30A0', '\u30FF', "Katakana" }, + new object[] { '\u3100', '\u312F', "Bopomofo" }, + new object[] { '\u3130', '\u318F', "HangulCompatibilityJamo" }, + new object[] { '\u3190', '\u319F', "Kanbun" }, + new object[] { '\u31A0', '\u31BF', "BopomofoExtended" }, + new object[] { '\u31C0', '\u31EF', "CjkStrokes" }, + new object[] { '\u31F0', '\u31FF', "KatakanaPhoneticExtensions" }, + new object[] { '\u3200', '\u32FF', "EnclosedCjkLettersandMonths" }, + new object[] { '\u3300', '\u33FF', "CjkCompatibility" }, + new object[] { '\u3400', '\u4DBF', "CjkUnifiedIdeographsExtensionA" }, + new object[] { '\u4DC0', '\u4DFF', "YijingHexagramSymbols" }, + new object[] { '\u4E00', '\u9FFF', "CjkUnifiedIdeographs" }, + new object[] { '\uA000', '\uA48F', "YiSyllables" }, + new object[] { '\uA490', '\uA4CF', "YiRadicals" }, + new object[] { '\uA4D0', '\uA4FF', "Lisu" }, + new object[] { '\uA500', '\uA63F', "Vai" }, + new object[] { '\uA640', '\uA69F', "CyrillicExtendedB" }, + new object[] { '\uA6A0', '\uA6FF', "Bamum" }, + new object[] { '\uA700', '\uA71F', "ModifierToneLetters" }, + new object[] { '\uA720', '\uA7FF', "LatinExtendedD" }, + new object[] { '\uA800', '\uA82F', "SylotiNagri" }, + new object[] { '\uA830', '\uA83F', "CommonIndicNumberForms" }, + new object[] { '\uA840', '\uA87F', "Phagspa" }, + new object[] { '\uA880', '\uA8DF', "Saurashtra" }, + new object[] { '\uA8E0', '\uA8FF', "DevanagariExtended" }, + new object[] { '\uA900', '\uA92F', "KayahLi" }, + new object[] { '\uA930', '\uA95F', "Rejang" }, + new object[] { '\uA960', '\uA97F', "HangulJamoExtendedA" }, + new object[] { '\uA980', '\uA9DF', "Javanese" }, + new object[] { '\uA9E0', '\uA9FF', "MyanmarExtendedB" }, + new object[] { '\uAA00', '\uAA5F', "Cham" }, + new object[] { '\uAA60', '\uAA7F', "MyanmarExtendedA" }, + new object[] { '\uAA80', '\uAADF', "TaiViet" }, + new object[] { '\uAAE0', '\uAAFF', "MeeteiMayekExtensions" }, + new object[] { '\uAB00', '\uAB2F', "EthiopicExtendedA" }, + new object[] { '\uAB30', '\uAB6F', "LatinExtendedE" }, + new object[] { '\uAB70', '\uABBF', "CherokeeSupplement" }, + new object[] { '\uABC0', '\uABFF', "MeeteiMayek" }, + new object[] { '\uAC00', '\uD7AF', "HangulSyllables" }, + new object[] { '\uD7B0', '\uD7FF', "HangulJamoExtendedB" }, + new object[] { '\uF900', '\uFAFF', "CjkCompatibilityIdeographs" }, + new object[] { '\uFB00', '\uFB4F', "AlphabeticPresentationForms" }, + new object[] { '\uFB50', '\uFDFF', "ArabicPresentationFormsA" }, + new object[] { '\uFE00', '\uFE0F', "VariationSelectors" }, + new object[] { '\uFE10', '\uFE1F', "VerticalForms" }, + new object[] { '\uFE20', '\uFE2F', "CombiningHalfMarks" }, + new object[] { '\uFE30', '\uFE4F', "CjkCompatibilityForms" }, + new object[] { '\uFE50', '\uFE6F', "SmallFormVariants" }, + new object[] { '\uFE70', '\uFEFF', "ArabicPresentationFormsB" }, + new object[] { '\uFF00', '\uFFEF', "HalfwidthandFullwidthForms" }, + new object[] { '\uFFF0', '\uFFFF', "Specials" }, + }; + } +} diff --git a/src/System.Text.Encodings.Web/tools/Directory.Build.props b/src/System.Text.Encodings.Web/tools/Directory.Build.props new file mode 100644 index 000000000000..bf6c6715bd10 --- /dev/null +++ b/src/System.Text.Encodings.Web/tools/Directory.Build.props @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/src/System.Text.Encodings.Web/tools/Directory.Build.targets b/src/System.Text.Encodings.Web/tools/Directory.Build.targets new file mode 100644 index 000000000000..d30bb1fb8cb2 --- /dev/null +++ b/src/System.Text.Encodings.Web/tools/Directory.Build.targets @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/src/System.Text.Encodings.Web/tools/GenDefinedCharList/GenDefinedCharList.csproj b/src/System.Text.Encodings.Web/tools/GenDefinedCharList/GenDefinedCharList.csproj new file mode 100644 index 000000000000..01b5f79da322 --- /dev/null +++ b/src/System.Text.Encodings.Web/tools/GenDefinedCharList/GenDefinedCharList.csproj @@ -0,0 +1,13 @@ + + + + Exe + netcoreapp3.0 + false + + + + + + + diff --git a/src/System.Text.Encodings.Web/tools/GenDefinedCharList/GenDefinedCharList.sln b/src/System.Text.Encodings.Web/tools/GenDefinedCharList/GenDefinedCharList.sln new file mode 100644 index 000000000000..ae2160aa0d8a --- /dev/null +++ b/src/System.Text.Encodings.Web/tools/GenDefinedCharList/GenDefinedCharList.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.28902.138 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GenDefinedCharList", "GenDefinedCharList.csproj", "{9C3E71F5-F8BD-41BA-8196-2705599AEE00}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {9C3E71F5-F8BD-41BA-8196-2705599AEE00}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9C3E71F5-F8BD-41BA-8196-2705599AEE00}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9C3E71F5-F8BD-41BA-8196-2705599AEE00}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9C3E71F5-F8BD-41BA-8196-2705599AEE00}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {AE8C9C7C-D2DB-4708-AD44-2F97AE0D592F} + EndGlobalSection +EndGlobal diff --git a/src/System.Text.Encodings.Web/tools/GenDefinedCharList/Program.cs b/src/System.Text.Encodings.Web/tools/GenDefinedCharList/Program.cs new file mode 100644 index 000000000000..8ce5d6f0dd50 --- /dev/null +++ b/src/System.Text.Encodings.Web/tools/GenDefinedCharList/Program.cs @@ -0,0 +1,218 @@ +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Globalization; +using System.IO; +using System.Text; + +namespace GenDefinedCharList +{ + /// + /// This program outputs the 'UnicodeHelpers.generated.cs' bitmap file. + /// + class Program + { + static void Main(string[] args) + { + if (args.Length < 2) + { + Console.WriteLine("Usage: dotnet run -- "); + return; + } + + // The input file should be UnicodeData.txt from the UCD corresponding to the + // version of the Unicode spec we're consuming. + // More info: http://www.unicode.org/reports/tr44/tr44-14.html#UCD_Files + // Latest UnicodeData.txt: http://www.unicode.org/Public/UCD/latest/ucd/UnicodeData.txt + + const uint MAX_UNICODE_CHAR = 0x10FFFF; // Unicode range is U+0000 .. U+10FFFF + bool[] definedChars = new bool[MAX_UNICODE_CHAR + 1]; + Dictionary ranges = new Dictionary(); + + // Read all defined characters from the input file. + string[] allLines = File.ReadAllLines(args[0]); + + // Each line is a semicolon-delimited list of information: + // ;;;... + foreach (string line in allLines) + { + string[] splitLine = line.Split(new char[] { ';' }, 4); + uint codepoint = uint.Parse(splitLine[0], NumberStyles.AllowHexSpecifier, CultureInfo.InvariantCulture); + string rawName = splitLine[1]; + string category = splitLine[2]; + + // ranges go into their own dictionary for later processing + string rangeName; + bool isStartOfRange; + if (IsRangeDefinition(rawName, out rangeName, out isStartOfRange)) + { + if (isStartOfRange) + { + ranges.Add(rangeName, new UnicodeRange() { FirstCodePoint = codepoint, Category = category }); + } + else + { + var existingRange = ranges[rangeName]; + Debug.Assert(existingRange.FirstCodePoint != 0, "We should've seen the start of this range already."); + Debug.Assert(existingRange.LastCodePoint == 0, "We shouldn't have seen the end of this range already."); + Debug.Assert(existingRange.Category == category, "Range start Unicode category doesn't match range end Unicode category."); + existingRange.LastCodePoint = codepoint; + } + continue; + } + + // We only allow certain categories of code points. + // Zs (space separators) aren't included, but we allow U+0020 SPACE as a special case + + if (!(codepoint == (uint)' ' || IsAllowedUnicodeCategory(category))) + { + continue; + } + + Debug.Assert(codepoint <= MAX_UNICODE_CHAR); + definedChars[codepoint] = true; + } + + // Next, populate characters that weren't defined on their own lines + // but which are instead defined as members of a range. + foreach (var range in ranges.Values) + { + if (IsAllowedUnicodeCategory(range.Category)) + { + Debug.Assert(range.FirstCodePoint <= MAX_UNICODE_CHAR); + Debug.Assert(range.LastCodePoint <= MAX_UNICODE_CHAR); + for (uint i = range.FirstCodePoint; i <= range.LastCodePoint; i++) + { + definedChars[i] = true; + } + } + } + + // Finally, write the list of defined characters out as a bitmap. The list + // will be divided into groups of 32, with each group being represented as + // a little-endian 32-bit integer. Within each group, the least significant + // bit will represent the first member of the group, and the most significant + // bit will represent the last member of the group. + // + // Example: To look up the character U+0123, + // a) First read the 32-bit value at offset 0x0120 (group #9) as little-endian, + // b) then AND with the value 0x0008 (1 << 3) and see if the result is non-zero. + // + // We're only concerned about the BMP (U+0000 .. U+FFFF) for now. + + StringBuilder builder = new StringBuilder(); + + builder.AppendLine("// Licensed to the .NET Foundation under one or more agreements."); + builder.AppendLine("// The .NET Foundation licenses this file to you under the MIT license."); + builder.AppendLine("// See the LICENSE file in the project root for more information."); + builder.AppendLine(); + builder.AppendLine("// This file was generated by a tool."); + builder.AppendLine("// See src/System.Text.Encodings.Web/tools/GenDefinedCharList"); + builder.AppendLine(); + builder.AppendLine("namespace System.Text.Unicode"); + builder.AppendLine("{"); + builder.AppendLine(" internal static partial class UnicodeHelpers"); + builder.AppendLine(" {"); + builder.AppendLine(" private static ReadOnlySpan DefinedCharsBitmapSpan => new byte[0x2000]"); + builder.AppendLine(" {"); + + for (int i = 0; i < 0x10000; i += 8) + { + int thisByte = 0; + for (int j = 7; j >= 0; j--) + { + thisByte <<= 1; + if (definedChars[i + j]) + { + thisByte |= 0x1; + } + } + + if ((i % 0x80) == 0) + { + builder.Append(" "); + } + + builder.Append("0x"); + builder.AppendFormat(CultureInfo.InvariantCulture, "{0:X2}", thisByte); + builder.Append(", "); + + if (((i + 8) % 0x80) == 0) + { + builder.AppendFormat(CultureInfo.InvariantCulture, "// U+{0:X4}..U+{1:X4}", i - 0x78, i + 7); + builder.AppendLine(); + } + } + + builder.AppendLine(" };"); + builder.AppendLine(" }"); + builder.AppendLine("}"); + + File.WriteAllText(args[1], builder.ToString()); + } + + private static bool IsAllowedUnicodeCategory(string category) + { + // We only allow certain classes of characters + return category == "Lu" /* letters */ + || category == "Ll" + || category == "Lt" + || category == "Lm" + || category == "Lo" + || category == "Mn" /* marks */ + || category == "Mc" + || category == "Me" + || category == "Nd" /* numbers */ + || category == "Nl" + || category == "No" + || category == "Pc" /* punctuation */ + || category == "Pd" + || category == "Ps" + || category == "Pe" + || category == "Pi" + || category == "Pf" + || category == "Po" + || category == "Sm" /* symbols */ + || category == "Sc" + || category == "Sk" + || category == "So" + || category == "Cf"; /* other */ + } + + private static bool IsRangeDefinition(string rawName, out string rangeName, out bool isStartOfRange) + { + // Ranges are represented within angle brackets, such as the following: + // DC00;;Cs;0;L;;;;;N;;;;; + // DFFF;;Cs;0;L;;;;;N;;;;; + if (rawName.StartsWith("<", StringComparison.Ordinal)) + { + if (rawName.EndsWith(", First>", StringComparison.Ordinal)) + { + rangeName = rawName.Substring(1, rawName.Length - 1 - ", First>".Length); + isStartOfRange = true; + return true; + } + else if (rawName.EndsWith(", Last>", StringComparison.Ordinal)) + { + rangeName = rawName.Substring(1, rawName.Length - 1 - ", Last>".Length); + isStartOfRange = false; + return true; + } + } + + // not surrounded by <>, or or some other non-range + rangeName = null; + isStartOfRange = false; + return false; + } + + // Represents a range of Unicode code points which are all members of a single category. + // More info: http://www.unicode.org/faq/blocks_ranges.html + private class UnicodeRange + { + public uint FirstCodePoint; + public uint LastCodePoint; + public string Category; + } + } +} diff --git a/src/System.Text.Encodings.Web/tools/GenUnicodeRanges/GenUnicodeRanges.csproj b/src/System.Text.Encodings.Web/tools/GenUnicodeRanges/GenUnicodeRanges.csproj new file mode 100644 index 000000000000..01b5f79da322 --- /dev/null +++ b/src/System.Text.Encodings.Web/tools/GenUnicodeRanges/GenUnicodeRanges.csproj @@ -0,0 +1,13 @@ + + + + Exe + netcoreapp3.0 + false + + + + + + + diff --git a/src/System.Text.Encodings.Web/tools/GenUnicodeRanges/GenUnicodeRanges.sln b/src/System.Text.Encodings.Web/tools/GenUnicodeRanges/GenUnicodeRanges.sln new file mode 100644 index 000000000000..5411c5554590 --- /dev/null +++ b/src/System.Text.Encodings.Web/tools/GenUnicodeRanges/GenUnicodeRanges.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.28902.138 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GenUnicodeRanges", "GenUnicodeRanges.csproj", "{F09DDDFC-03EC-48F0-A425-B9DDE3EE1C66}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {F09DDDFC-03EC-48F0-A425-B9DDE3EE1C66}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F09DDDFC-03EC-48F0-A425-B9DDE3EE1C66}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F09DDDFC-03EC-48F0-A425-B9DDE3EE1C66}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F09DDDFC-03EC-48F0-A425-B9DDE3EE1C66}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {39BB5EEC-F6D8-419B-B2B8-36C3A09BE254} + EndGlobalSection +EndGlobal diff --git a/src/System.Text.Encodings.Web/tools/GenUnicodeRanges/Program.cs b/src/System.Text.Encodings.Web/tools/GenUnicodeRanges/Program.cs new file mode 100644 index 000000000000..83a5e6d0dadd --- /dev/null +++ b/src/System.Text.Encodings.Web/tools/GenUnicodeRanges/Program.cs @@ -0,0 +1,181 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; +using System.Globalization; +using System.IO; +using System.Linq; +using System.Text; +using System.Text.RegularExpressions; + +using static System.FormattableString; + +namespace GenDefinedCharList +{ + /// + /// This program outputs the 'UnicodeBlocks.generated.cs' and 'UnicodeBlocksTests.generated.cs' source files. + /// + class Program + { + private const string _codePointFiltersTestsGeneratedFormat = @"[InlineData('\u{1}', '\u{2}', nameof(UnicodeRanges.{0}))]"; + + static void Main(string[] args) + { + if (args.Length < 3) + { + Console.WriteLine("Usage: dotnet run -- "); + return; + } + + // The input file should be Blocks.txt from the UCD corresponding to the + // version of the Unicode spec we're consuming. + // More info: http://www.unicode.org/reports/tr44/ + // Latest Blocks.txt: http://www.unicode.org/Public/UCD/latest/ucd/Blocks.txt + + StringBuilder runtimeCodeBuilder = new StringBuilder(); + WriteCopyrightAndHeader(runtimeCodeBuilder); + runtimeCodeBuilder.AppendLine(); + runtimeCodeBuilder.AppendLine("namespace System.Text.Unicode"); + runtimeCodeBuilder.AppendLine("{"); + runtimeCodeBuilder.AppendLine(" public static partial class UnicodeRanges"); + runtimeCodeBuilder.AppendLine(" {"); + + StringBuilder testCodeBuilder = new StringBuilder(); + WriteCopyrightAndHeader(testCodeBuilder); + testCodeBuilder.AppendLine(); + testCodeBuilder.AppendLine("using System.Collections.Generic;"); + testCodeBuilder.AppendLine(); + testCodeBuilder.AppendLine("namespace System.Text.Unicode.Tests"); + testCodeBuilder.AppendLine("{"); + testCodeBuilder.AppendLine(" public static partial class UnicodeRangesTests"); + testCodeBuilder.AppendLine(" {"); + testCodeBuilder.AppendLine(" public static IEnumerable UnicodeRanges_GeneratedData => new[]"); + testCodeBuilder.AppendLine(" {"); + + string[] allInputLines = File.ReadAllLines(args[0]); + + Regex inputLineRegex = new Regex(@"^(?[0-9A-F]{4})\.\.(?[0-9A-F]{4}); (?.+)$"); + bool isFirstLine = true; + + foreach (string inputLine in allInputLines) + { + // We only care about lines of the form "XXXX..XXXX; Block name" + var match = inputLineRegex.Match(inputLine); + if (match == null || !match.Success) + { + continue; + } + + string startCode = match.Groups["startCode"].Value; + string endCode = match.Groups["endCode"].Value; + string blockName = match.Groups["blockName"].Value; + string blockNameAsProperty = WithDotNetPropertyCasing(RemoveAllNonAlphanumeric(blockName)); + string blockNameAsField = Invariant($"_u{startCode}"); + + // Exclude the surrogate range and everything outside the BMP. + + uint startCodeAsInt = uint.Parse(startCode, NumberStyles.HexNumber, CultureInfo.InvariantCulture); + if (startCodeAsInt >= 0x10000 || (startCodeAsInt >= 0xD800 && startCodeAsInt <= 0xDFFF)) + { + continue; + } + + // Exclude any private use areas + + if (blockName.Contains("Private Use", StringComparison.OrdinalIgnoreCase)) + { + continue; + } + + if (!isFirstLine) + { + runtimeCodeBuilder.AppendLine(); + } + + isFirstLine = false; + + runtimeCodeBuilder.AppendLine(Invariant($" /// ")); + runtimeCodeBuilder.AppendLine(Invariant($" /// A corresponding to the '{blockName}' Unicode block (U+{startCode}..U+{endCode}).")); + runtimeCodeBuilder.AppendLine(Invariant($" /// ")); + runtimeCodeBuilder.AppendLine(Invariant($" /// ")); + runtimeCodeBuilder.AppendLine(Invariant($" /// See http://www.unicode.org/charts/PDF/U{startCode}.pdf for the full set of characters in this block.")); + runtimeCodeBuilder.AppendLine(Invariant($" /// ")); + runtimeCodeBuilder.AppendLine(Invariant($" public static UnicodeRange {blockNameAsProperty} => {blockNameAsField} ?? CreateRange(ref {blockNameAsField}, first: '\\u{startCode}', last: '\\u{endCode}');")); + runtimeCodeBuilder.AppendLine(Invariant($" private static UnicodeRange {blockNameAsField};")); + + testCodeBuilder.AppendLine(Invariant($" new object[] {{ '\\u{startCode}', '\\u{endCode}', nameof(UnicodeRanges.{blockNameAsProperty}) }},")); + } + + runtimeCodeBuilder.AppendLine(" }"); + runtimeCodeBuilder.AppendLine("}"); + + testCodeBuilder.AppendLine(" };"); + testCodeBuilder.AppendLine(" }"); + testCodeBuilder.AppendLine("}"); + + File.WriteAllText(args[1], runtimeCodeBuilder.ToString()); + File.WriteAllText(args[2], testCodeBuilder.ToString()); + } + + private static string RemoveAllNonAlphanumeric(string blockName) + { + // Allow only A-Z 0-9 + return new String(blockName.ToCharArray().Where(c => ('A' <= c && c <= 'Z') || ('a' <= c && c <= 'z') || ('0' <= c && c <= '9')).ToArray()); + } + + private static string WithDotNetPropertyCasing(string originalInput) + { + // Converts "CJKSymbolsandPunctuation" to "CjkSymbolsandPunctunation" + // (n.b. We don't uppercase 'and' for compatibility with existing property names.) + + char[] chars = originalInput.ToCharArray(); + for (int i = 0; i < chars.Length; i++) + { + if (char.IsUpper(chars[i])) + { + // Found an uppercase char - is it followed by a string of uppercase chars + // that needs to be converted to lowercase? + + Span remaining = chars.AsSpan(i + 1); + if (remaining.Length < 2) + { + break; + } + + if (char.IsUpper(remaining[0]) && char.IsUpper(remaining[1])) + { + int j = i + 1; + for (; j < chars.Length; j++) + { + if (char.IsLower(chars[j])) + { + chars[j - 1] = originalInput[j - 1]; // restore original case of immediately preceding char + break; + } + else + { + chars[j] = char.ToLowerInvariant(chars[j]); + } + } + + i = j - 1; // found a lowercase char or reached the end of the string + continue; + } + } + } + + return new string(chars); + } + + private static void WriteCopyrightAndHeader(StringBuilder builder) + { + builder.AppendLine("// Licensed to the .NET Foundation under one or more agreements."); + builder.AppendLine("// The .NET Foundation licenses this file to you under the MIT license."); + builder.AppendLine("// See the LICENSE file in the project root for more information."); + builder.AppendLine(); + builder.AppendLine("// This file was generated by a tool."); + builder.AppendLine("// See src/System.Text.Encodings.Web/tools/GenUnicodeRanges"); + } + } +} diff --git a/src/System.Text.Encodings.Web/tools/updating-encodings.md b/src/System.Text.Encodings.Web/tools/updating-encodings.md new file mode 100644 index 000000000000..55dfa4201bb8 --- /dev/null +++ b/src/System.Text.Encodings.Web/tools/updating-encodings.md @@ -0,0 +1,37 @@ +### Introduction + +This folder contains tools which allow updating the Unicode data within the __System.Text.Encodings.Web__ package. These data files come from the Unicode Consortium's web site (see https://www.unicode.org/Public/UCD/latest/) and are used to generate the `UnicodeRanges` class and the internal "defined characters" bitmap against which charaters to be escaped are checked. + +### Current implementation + +The current version of the Unicode data checked in is __8.0.0__. The archived files can be found at https://unicode.org/Public/8.0.0/. + +### Updating the implementation + +Updating the implementation consists of three steps: checking in a new version of the Unicode data files, generating the shared files used by the runtime and the unit tests, and pointing the unit test files to the correct version of the data files. + +As a prerequisite for updating the tools, you will need the _dotnet_ tool (version 3.0 or above) available from your local command prompt. + +1. Get the latest __UnicodeData.txt__ and __Blocks.txt__ files from the Unicode Consortium web site. Drop __UnicodeData.txt__ into the __src/Common/tests/Data__ folder, rename it so that the file name contains the Unicode version it represents (e.g., _UnicodeData.11.0.txt_) and submit it to the Git repo. Place the __Blocks.txt__ in a temporary location; it will not be submitted to the Git repo. + +2. Open a command prompt and navigate to the __src/System.Text.Encodings.Web/tools/GenDefinedCharList__ directory, then run the following command, replacing the first parameter with the path to the _UnicodeData.txt_ file you downloaded in the previous step. This command will update the "defined characters" bitmap within the runtime folder. The test project also consumes the file from the _src_ folder, so running this command will update both the runtime and the test project. + +```txt +dotnet run -- "path_to_UnicodeData.txt" ../../src/System/Text/Unicode/UnicodeHelpers.generated.cs +``` + +3. Open a command prompt and navigate to the __src/System.Text.Encodings.Web/tools/GenUnicodeRanges__ directory, then run the following command, replacing the first parameter with the path to the _Blocks.txt_ file you downloaded in the first step. This command will update the `UnicodeRanges` type in the runtime folder and update the unit tests to exercise the new APIs. + +```txt +dotnet run -- "path_to_Blocks.txt" ../../src/System/Text/Unicode/UnicodeRanges.generated.cs ../../tests/UnicodeRangesTests.generated.cs +``` + +4. Update the __ref__ APIs to reflect any new `UnicodeRanges` static properties which were added in the previous step, otherwise the unit test project will not be able to reference them. See https://github.com/dotnet/corefx/blob/master/Documentation/coding-guidelines/updating-ref-source.md for instructions on how to update the reference assemblies. + +5. Update the __src/System.Text.Encodings.Web/tests/System.Text.Encodings.Web.Tests.csproj__ file to reference the new file that you dropped into the __src/Common/tests/data__ folder in the first step above. Open the .csproj file in a text editor, and replace both the `` and the `` elements at the end of the document to reference the new file name. + +6. In the file __src/System.Text.Encodings.Web/tests/UnicodeHelpersTests.cs__, update the _UnicodeDataFileName_ const string at the top of the file to reflect the new file name for _UnicodeData.x.y.txt_. + +7. Finally, update the _Current implementation_ section at the beginning of this markdown file to reflect the version of the Unicode data files which were given to the tools. Remember also to update the URL within that section so that these data files can be easily accessed in the future. + +8. Commit to Git the __UnicodeData.x.y.txt__ file added to the _Common_ folder earlier, along with all files modified as part of following the above steps. diff --git a/src/dirs.proj b/src/dirs.proj index fceca3f2dc14..3dc753472852 100644 --- a/src/dirs.proj +++ b/src/dirs.proj @@ -15,9 +15,14 @@ + + + + + - + From ea5a6589ca24c3d38e3ff0f995a4df6c79b889c6 Mon Sep 17 00:00:00 2001 From: Levi Broderick Date: Thu, 9 May 2019 16:27:15 -0700 Subject: [PATCH 314/607] Update System.Text.Encodings.Web Unicode data to 12.1 --- src/Common/tests/Data/UnicodeData.12.1.txt | 32841 ++++++++++++++++ .../ref/System.Text.Encodings.Web.cs | 3 + .../Text/Unicode/UnicodeHelpers.generated.cs | 50 +- .../Text/Unicode/UnicodeRanges.generated.cs | 657 +- .../System.Text.Encodings.Web.Tests.csproj | 4 +- .../tests/UnicodeHelpersTests.cs | 2 +- .../tests/UnicodeRangesTests.generated.cs | 318 +- .../tools/updating-encodings.md | 2 +- 8 files changed, 33377 insertions(+), 500 deletions(-) create mode 100644 src/Common/tests/Data/UnicodeData.12.1.txt diff --git a/src/Common/tests/Data/UnicodeData.12.1.txt b/src/Common/tests/Data/UnicodeData.12.1.txt new file mode 100644 index 000000000000..e65aec52f71e --- /dev/null +++ b/src/Common/tests/Data/UnicodeData.12.1.txt @@ -0,0 +1,32841 @@ +0000;;Cc;0;BN;;;;;N;NULL;;;; +0001;;Cc;0;BN;;;;;N;START OF HEADING;;;; +0002;;Cc;0;BN;;;;;N;START OF TEXT;;;; +0003;;Cc;0;BN;;;;;N;END OF TEXT;;;; +0004;;Cc;0;BN;;;;;N;END OF TRANSMISSION;;;; +0005;;Cc;0;BN;;;;;N;ENQUIRY;;;; +0006;;Cc;0;BN;;;;;N;ACKNOWLEDGE;;;; +0007;;Cc;0;BN;;;;;N;BELL;;;; +0008;;Cc;0;BN;;;;;N;BACKSPACE;;;; +0009;;Cc;0;S;;;;;N;CHARACTER TABULATION;;;; +000A;;Cc;0;B;;;;;N;LINE FEED (LF);;;; +000B;;Cc;0;S;;;;;N;LINE TABULATION;;;; +000C;;Cc;0;WS;;;;;N;FORM FEED (FF);;;; +000D;;Cc;0;B;;;;;N;CARRIAGE RETURN (CR);;;; +000E;;Cc;0;BN;;;;;N;SHIFT OUT;;;; +000F;;Cc;0;BN;;;;;N;SHIFT IN;;;; +0010;;Cc;0;BN;;;;;N;DATA LINK ESCAPE;;;; +0011;;Cc;0;BN;;;;;N;DEVICE CONTROL ONE;;;; +0012;;Cc;0;BN;;;;;N;DEVICE CONTROL TWO;;;; +0013;;Cc;0;BN;;;;;N;DEVICE CONTROL THREE;;;; +0014;;Cc;0;BN;;;;;N;DEVICE CONTROL FOUR;;;; +0015;;Cc;0;BN;;;;;N;NEGATIVE ACKNOWLEDGE;;;; +0016;;Cc;0;BN;;;;;N;SYNCHRONOUS IDLE;;;; +0017;;Cc;0;BN;;;;;N;END OF TRANSMISSION BLOCK;;;; +0018;;Cc;0;BN;;;;;N;CANCEL;;;; +0019;;Cc;0;BN;;;;;N;END OF MEDIUM;;;; +001A;;Cc;0;BN;;;;;N;SUBSTITUTE;;;; +001B;;Cc;0;BN;;;;;N;ESCAPE;;;; +001C;;Cc;0;B;;;;;N;INFORMATION SEPARATOR FOUR;;;; +001D;;Cc;0;B;;;;;N;INFORMATION SEPARATOR THREE;;;; +001E;;Cc;0;B;;;;;N;INFORMATION SEPARATOR TWO;;;; +001F;;Cc;0;S;;;;;N;INFORMATION SEPARATOR ONE;;;; +0020;SPACE;Zs;0;WS;;;;;N;;;;; +0021;EXCLAMATION MARK;Po;0;ON;;;;;N;;;;; +0022;QUOTATION MARK;Po;0;ON;;;;;N;;;;; +0023;NUMBER SIGN;Po;0;ET;;;;;N;;;;; +0024;DOLLAR SIGN;Sc;0;ET;;;;;N;;;;; +0025;PERCENT SIGN;Po;0;ET;;;;;N;;;;; +0026;AMPERSAND;Po;0;ON;;;;;N;;;;; +0027;APOSTROPHE;Po;0;ON;;;;;N;APOSTROPHE-QUOTE;;;; +0028;LEFT PARENTHESIS;Ps;0;ON;;;;;Y;OPENING PARENTHESIS;;;; +0029;RIGHT PARENTHESIS;Pe;0;ON;;;;;Y;CLOSING PARENTHESIS;;;; +002A;ASTERISK;Po;0;ON;;;;;N;;;;; +002B;PLUS SIGN;Sm;0;ES;;;;;N;;;;; +002C;COMMA;Po;0;CS;;;;;N;;;;; +002D;HYPHEN-MINUS;Pd;0;ES;;;;;N;;;;; +002E;FULL STOP;Po;0;CS;;;;;N;PERIOD;;;; +002F;SOLIDUS;Po;0;CS;;;;;N;SLASH;;;; +0030;DIGIT ZERO;Nd;0;EN;;0;0;0;N;;;;; +0031;DIGIT ONE;Nd;0;EN;;1;1;1;N;;;;; +0032;DIGIT TWO;Nd;0;EN;;2;2;2;N;;;;; +0033;DIGIT THREE;Nd;0;EN;;3;3;3;N;;;;; +0034;DIGIT FOUR;Nd;0;EN;;4;4;4;N;;;;; +0035;DIGIT FIVE;Nd;0;EN;;5;5;5;N;;;;; +0036;DIGIT SIX;Nd;0;EN;;6;6;6;N;;;;; +0037;DIGIT SEVEN;Nd;0;EN;;7;7;7;N;;;;; +0038;DIGIT EIGHT;Nd;0;EN;;8;8;8;N;;;;; +0039;DIGIT NINE;Nd;0;EN;;9;9;9;N;;;;; +003A;COLON;Po;0;CS;;;;;N;;;;; +003B;SEMICOLON;Po;0;ON;;;;;N;;;;; +003C;LESS-THAN SIGN;Sm;0;ON;;;;;Y;;;;; +003D;EQUALS SIGN;Sm;0;ON;;;;;N;;;;; +003E;GREATER-THAN SIGN;Sm;0;ON;;;;;Y;;;;; +003F;QUESTION MARK;Po;0;ON;;;;;N;;;;; +0040;COMMERCIAL AT;Po;0;ON;;;;;N;;;;; +0041;LATIN CAPITAL LETTER A;Lu;0;L;;;;;N;;;;0061; +0042;LATIN CAPITAL LETTER B;Lu;0;L;;;;;N;;;;0062; +0043;LATIN CAPITAL LETTER C;Lu;0;L;;;;;N;;;;0063; +0044;LATIN CAPITAL LETTER D;Lu;0;L;;;;;N;;;;0064; +0045;LATIN CAPITAL LETTER E;Lu;0;L;;;;;N;;;;0065; +0046;LATIN CAPITAL LETTER F;Lu;0;L;;;;;N;;;;0066; +0047;LATIN CAPITAL LETTER G;Lu;0;L;;;;;N;;;;0067; +0048;LATIN CAPITAL LETTER H;Lu;0;L;;;;;N;;;;0068; +0049;LATIN CAPITAL LETTER I;Lu;0;L;;;;;N;;;;0069; +004A;LATIN CAPITAL LETTER J;Lu;0;L;;;;;N;;;;006A; +004B;LATIN CAPITAL LETTER K;Lu;0;L;;;;;N;;;;006B; +004C;LATIN CAPITAL LETTER L;Lu;0;L;;;;;N;;;;006C; +004D;LATIN CAPITAL LETTER M;Lu;0;L;;;;;N;;;;006D; +004E;LATIN CAPITAL LETTER N;Lu;0;L;;;;;N;;;;006E; +004F;LATIN CAPITAL LETTER O;Lu;0;L;;;;;N;;;;006F; +0050;LATIN CAPITAL LETTER P;Lu;0;L;;;;;N;;;;0070; +0051;LATIN CAPITAL LETTER Q;Lu;0;L;;;;;N;;;;0071; +0052;LATIN CAPITAL LETTER R;Lu;0;L;;;;;N;;;;0072; +0053;LATIN CAPITAL LETTER S;Lu;0;L;;;;;N;;;;0073; +0054;LATIN CAPITAL LETTER T;Lu;0;L;;;;;N;;;;0074; +0055;LATIN CAPITAL LETTER U;Lu;0;L;;;;;N;;;;0075; +0056;LATIN CAPITAL LETTER V;Lu;0;L;;;;;N;;;;0076; +0057;LATIN CAPITAL LETTER W;Lu;0;L;;;;;N;;;;0077; +0058;LATIN CAPITAL LETTER X;Lu;0;L;;;;;N;;;;0078; +0059;LATIN CAPITAL LETTER Y;Lu;0;L;;;;;N;;;;0079; +005A;LATIN CAPITAL LETTER Z;Lu;0;L;;;;;N;;;;007A; +005B;LEFT SQUARE BRACKET;Ps;0;ON;;;;;Y;OPENING SQUARE BRACKET;;;; +005C;REVERSE SOLIDUS;Po;0;ON;;;;;N;BACKSLASH;;;; +005D;RIGHT SQUARE BRACKET;Pe;0;ON;;;;;Y;CLOSING SQUARE BRACKET;;;; +005E;CIRCUMFLEX ACCENT;Sk;0;ON;;;;;N;SPACING CIRCUMFLEX;;;; +005F;LOW LINE;Pc;0;ON;;;;;N;SPACING UNDERSCORE;;;; +0060;GRAVE ACCENT;Sk;0;ON;;;;;N;SPACING GRAVE;;;; +0061;LATIN SMALL LETTER A;Ll;0;L;;;;;N;;;0041;;0041 +0062;LATIN SMALL LETTER B;Ll;0;L;;;;;N;;;0042;;0042 +0063;LATIN SMALL LETTER C;Ll;0;L;;;;;N;;;0043;;0043 +0064;LATIN SMALL LETTER D;Ll;0;L;;;;;N;;;0044;;0044 +0065;LATIN SMALL LETTER E;Ll;0;L;;;;;N;;;0045;;0045 +0066;LATIN SMALL LETTER F;Ll;0;L;;;;;N;;;0046;;0046 +0067;LATIN SMALL LETTER G;Ll;0;L;;;;;N;;;0047;;0047 +0068;LATIN SMALL LETTER H;Ll;0;L;;;;;N;;;0048;;0048 +0069;LATIN SMALL LETTER I;Ll;0;L;;;;;N;;;0049;;0049 +006A;LATIN SMALL LETTER J;Ll;0;L;;;;;N;;;004A;;004A +006B;LATIN SMALL LETTER K;Ll;0;L;;;;;N;;;004B;;004B +006C;LATIN SMALL LETTER L;Ll;0;L;;;;;N;;;004C;;004C +006D;LATIN SMALL LETTER M;Ll;0;L;;;;;N;;;004D;;004D +006E;LATIN SMALL LETTER N;Ll;0;L;;;;;N;;;004E;;004E +006F;LATIN SMALL LETTER O;Ll;0;L;;;;;N;;;004F;;004F +0070;LATIN SMALL LETTER P;Ll;0;L;;;;;N;;;0050;;0050 +0071;LATIN SMALL LETTER Q;Ll;0;L;;;;;N;;;0051;;0051 +0072;LATIN SMALL LETTER R;Ll;0;L;;;;;N;;;0052;;0052 +0073;LATIN SMALL LETTER S;Ll;0;L;;;;;N;;;0053;;0053 +0074;LATIN SMALL LETTER T;Ll;0;L;;;;;N;;;0054;;0054 +0075;LATIN SMALL LETTER U;Ll;0;L;;;;;N;;;0055;;0055 +0076;LATIN SMALL LETTER V;Ll;0;L;;;;;N;;;0056;;0056 +0077;LATIN SMALL LETTER W;Ll;0;L;;;;;N;;;0057;;0057 +0078;LATIN SMALL LETTER X;Ll;0;L;;;;;N;;;0058;;0058 +0079;LATIN SMALL LETTER Y;Ll;0;L;;;;;N;;;0059;;0059 +007A;LATIN SMALL LETTER Z;Ll;0;L;;;;;N;;;005A;;005A +007B;LEFT CURLY BRACKET;Ps;0;ON;;;;;Y;OPENING CURLY BRACKET;;;; +007C;VERTICAL LINE;Sm;0;ON;;;;;N;VERTICAL BAR;;;; +007D;RIGHT CURLY BRACKET;Pe;0;ON;;;;;Y;CLOSING CURLY BRACKET;;;; +007E;TILDE;Sm;0;ON;;;;;N;;;;; +007F;;Cc;0;BN;;;;;N;DELETE;;;; +0080;;Cc;0;BN;;;;;N;;;;; +0081;;Cc;0;BN;;;;;N;;;;; +0082;;Cc;0;BN;;;;;N;BREAK PERMITTED HERE;;;; +0083;;Cc;0;BN;;;;;N;NO BREAK HERE;;;; +0084;;Cc;0;BN;;;;;N;;;;; +0085;;Cc;0;B;;;;;N;NEXT LINE (NEL);;;; +0086;;Cc;0;BN;;;;;N;START OF SELECTED AREA;;;; +0087;;Cc;0;BN;;;;;N;END OF SELECTED AREA;;;; +0088;;Cc;0;BN;;;;;N;CHARACTER TABULATION SET;;;; +0089;;Cc;0;BN;;;;;N;CHARACTER TABULATION WITH JUSTIFICATION;;;; +008A;;Cc;0;BN;;;;;N;LINE TABULATION SET;;;; +008B;;Cc;0;BN;;;;;N;PARTIAL LINE FORWARD;;;; +008C;;Cc;0;BN;;;;;N;PARTIAL LINE BACKWARD;;;; +008D;;Cc;0;BN;;;;;N;REVERSE LINE FEED;;;; +008E;;Cc;0;BN;;;;;N;SINGLE SHIFT TWO;;;; +008F;;Cc;0;BN;;;;;N;SINGLE SHIFT THREE;;;; +0090;;Cc;0;BN;;;;;N;DEVICE CONTROL STRING;;;; +0091;;Cc;0;BN;;;;;N;PRIVATE USE ONE;;;; +0092;;Cc;0;BN;;;;;N;PRIVATE USE TWO;;;; +0093;;Cc;0;BN;;;;;N;SET TRANSMIT STATE;;;; +0094;;Cc;0;BN;;;;;N;CANCEL CHARACTER;;;; +0095;;Cc;0;BN;;;;;N;MESSAGE WAITING;;;; +0096;;Cc;0;BN;;;;;N;START OF GUARDED AREA;;;; +0097;;Cc;0;BN;;;;;N;END OF GUARDED AREA;;;; +0098;;Cc;0;BN;;;;;N;START OF STRING;;;; +0099;;Cc;0;BN;;;;;N;;;;; +009A;;Cc;0;BN;;;;;N;SINGLE CHARACTER INTRODUCER;;;; +009B;;Cc;0;BN;;;;;N;CONTROL SEQUENCE INTRODUCER;;;; +009C;;Cc;0;BN;;;;;N;STRING TERMINATOR;;;; +009D;;Cc;0;BN;;;;;N;OPERATING SYSTEM COMMAND;;;; +009E;;Cc;0;BN;;;;;N;PRIVACY MESSAGE;;;; +009F;;Cc;0;BN;;;;;N;APPLICATION PROGRAM COMMAND;;;; +00A0;NO-BREAK SPACE;Zs;0;CS; 0020;;;;N;NON-BREAKING SPACE;;;; +00A1;INVERTED EXCLAMATION MARK;Po;0;ON;;;;;N;;;;; +00A2;CENT SIGN;Sc;0;ET;;;;;N;;;;; +00A3;POUND SIGN;Sc;0;ET;;;;;N;;;;; +00A4;CURRENCY SIGN;Sc;0;ET;;;;;N;;;;; +00A5;YEN SIGN;Sc;0;ET;;;;;N;;;;; +00A6;BROKEN BAR;So;0;ON;;;;;N;BROKEN VERTICAL BAR;;;; +00A7;SECTION SIGN;Po;0;ON;;;;;N;;;;; +00A8;DIAERESIS;Sk;0;ON; 0020 0308;;;;N;SPACING DIAERESIS;;;; +00A9;COPYRIGHT SIGN;So;0;ON;;;;;N;;;;; +00AA;FEMININE ORDINAL INDICATOR;Lo;0;L; 0061;;;;N;;;;; +00AB;LEFT-POINTING DOUBLE ANGLE QUOTATION MARK;Pi;0;ON;;;;;Y;LEFT POINTING GUILLEMET;;;; +00AC;NOT SIGN;Sm;0;ON;;;;;N;;;;; +00AD;SOFT HYPHEN;Cf;0;BN;;;;;N;;;;; +00AE;REGISTERED SIGN;So;0;ON;;;;;N;REGISTERED TRADE MARK SIGN;;;; +00AF;MACRON;Sk;0;ON; 0020 0304;;;;N;SPACING MACRON;;;; +00B0;DEGREE SIGN;So;0;ET;;;;;N;;;;; +00B1;PLUS-MINUS SIGN;Sm;0;ET;;;;;N;PLUS-OR-MINUS SIGN;;;; +00B2;SUPERSCRIPT TWO;No;0;EN; 0032;;2;2;N;SUPERSCRIPT DIGIT TWO;;;; +00B3;SUPERSCRIPT THREE;No;0;EN; 0033;;3;3;N;SUPERSCRIPT DIGIT THREE;;;; +00B4;ACUTE ACCENT;Sk;0;ON; 0020 0301;;;;N;SPACING ACUTE;;;; +00B5;MICRO SIGN;Ll;0;L; 03BC;;;;N;;;039C;;039C +00B6;PILCROW SIGN;Po;0;ON;;;;;N;PARAGRAPH SIGN;;;; +00B7;MIDDLE DOT;Po;0;ON;;;;;N;;;;; +00B8;CEDILLA;Sk;0;ON; 0020 0327;;;;N;SPACING CEDILLA;;;; +00B9;SUPERSCRIPT ONE;No;0;EN; 0031;;1;1;N;SUPERSCRIPT DIGIT ONE;;;; +00BA;MASCULINE ORDINAL INDICATOR;Lo;0;L; 006F;;;;N;;;;; +00BB;RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK;Pf;0;ON;;;;;Y;RIGHT POINTING GUILLEMET;;;; +00BC;VULGAR FRACTION ONE QUARTER;No;0;ON; 0031 2044 0034;;;1/4;N;FRACTION ONE QUARTER;;;; +00BD;VULGAR FRACTION ONE HALF;No;0;ON; 0031 2044 0032;;;1/2;N;FRACTION ONE HALF;;;; +00BE;VULGAR FRACTION THREE QUARTERS;No;0;ON; 0033 2044 0034;;;3/4;N;FRACTION THREE QUARTERS;;;; +00BF;INVERTED QUESTION MARK;Po;0;ON;;;;;N;;;;; +00C0;LATIN CAPITAL LETTER A WITH GRAVE;Lu;0;L;0041 0300;;;;N;LATIN CAPITAL LETTER A GRAVE;;;00E0; +00C1;LATIN CAPITAL LETTER A WITH ACUTE;Lu;0;L;0041 0301;;;;N;LATIN CAPITAL LETTER A ACUTE;;;00E1; +00C2;LATIN CAPITAL LETTER A WITH CIRCUMFLEX;Lu;0;L;0041 0302;;;;N;LATIN CAPITAL LETTER A CIRCUMFLEX;;;00E2; +00C3;LATIN CAPITAL LETTER A WITH TILDE;Lu;0;L;0041 0303;;;;N;LATIN CAPITAL LETTER A TILDE;;;00E3; +00C4;LATIN CAPITAL LETTER A WITH DIAERESIS;Lu;0;L;0041 0308;;;;N;LATIN CAPITAL LETTER A DIAERESIS;;;00E4; +00C5;LATIN CAPITAL LETTER A WITH RING ABOVE;Lu;0;L;0041 030A;;;;N;LATIN CAPITAL LETTER A RING;;;00E5; +00C6;LATIN CAPITAL LETTER AE;Lu;0;L;;;;;N;LATIN CAPITAL LETTER A E;;;00E6; +00C7;LATIN CAPITAL LETTER C WITH CEDILLA;Lu;0;L;0043 0327;;;;N;LATIN CAPITAL LETTER C CEDILLA;;;00E7; +00C8;LATIN CAPITAL LETTER E WITH GRAVE;Lu;0;L;0045 0300;;;;N;LATIN CAPITAL LETTER E GRAVE;;;00E8; +00C9;LATIN CAPITAL LETTER E WITH ACUTE;Lu;0;L;0045 0301;;;;N;LATIN CAPITAL LETTER E ACUTE;;;00E9; +00CA;LATIN CAPITAL LETTER E WITH CIRCUMFLEX;Lu;0;L;0045 0302;;;;N;LATIN CAPITAL LETTER E CIRCUMFLEX;;;00EA; +00CB;LATIN CAPITAL LETTER E WITH DIAERESIS;Lu;0;L;0045 0308;;;;N;LATIN CAPITAL LETTER E DIAERESIS;;;00EB; +00CC;LATIN CAPITAL LETTER I WITH GRAVE;Lu;0;L;0049 0300;;;;N;LATIN CAPITAL LETTER I GRAVE;;;00EC; +00CD;LATIN CAPITAL LETTER I WITH ACUTE;Lu;0;L;0049 0301;;;;N;LATIN CAPITAL LETTER I ACUTE;;;00ED; +00CE;LATIN CAPITAL LETTER I WITH CIRCUMFLEX;Lu;0;L;0049 0302;;;;N;LATIN CAPITAL LETTER I CIRCUMFLEX;;;00EE; +00CF;LATIN CAPITAL LETTER I WITH DIAERESIS;Lu;0;L;0049 0308;;;;N;LATIN CAPITAL LETTER I DIAERESIS;;;00EF; +00D0;LATIN CAPITAL LETTER ETH;Lu;0;L;;;;;N;;;;00F0; +00D1;LATIN CAPITAL LETTER N WITH TILDE;Lu;0;L;004E 0303;;;;N;LATIN CAPITAL LETTER N TILDE;;;00F1; +00D2;LATIN CAPITAL LETTER O WITH GRAVE;Lu;0;L;004F 0300;;;;N;LATIN CAPITAL LETTER O GRAVE;;;00F2; +00D3;LATIN CAPITAL LETTER O WITH ACUTE;Lu;0;L;004F 0301;;;;N;LATIN CAPITAL LETTER O ACUTE;;;00F3; +00D4;LATIN CAPITAL LETTER O WITH CIRCUMFLEX;Lu;0;L;004F 0302;;;;N;LATIN CAPITAL LETTER O CIRCUMFLEX;;;00F4; +00D5;LATIN CAPITAL LETTER O WITH TILDE;Lu;0;L;004F 0303;;;;N;LATIN CAPITAL LETTER O TILDE;;;00F5; +00D6;LATIN CAPITAL LETTER O WITH DIAERESIS;Lu;0;L;004F 0308;;;;N;LATIN CAPITAL LETTER O DIAERESIS;;;00F6; +00D7;MULTIPLICATION SIGN;Sm;0;ON;;;;;N;;;;; +00D8;LATIN CAPITAL LETTER O WITH STROKE;Lu;0;L;;;;;N;LATIN CAPITAL LETTER O SLASH;;;00F8; +00D9;LATIN CAPITAL LETTER U WITH GRAVE;Lu;0;L;0055 0300;;;;N;LATIN CAPITAL LETTER U GRAVE;;;00F9; +00DA;LATIN CAPITAL LETTER U WITH ACUTE;Lu;0;L;0055 0301;;;;N;LATIN CAPITAL LETTER U ACUTE;;;00FA; +00DB;LATIN CAPITAL LETTER U WITH CIRCUMFLEX;Lu;0;L;0055 0302;;;;N;LATIN CAPITAL LETTER U CIRCUMFLEX;;;00FB; +00DC;LATIN CAPITAL LETTER U WITH DIAERESIS;Lu;0;L;0055 0308;;;;N;LATIN CAPITAL LETTER U DIAERESIS;;;00FC; +00DD;LATIN CAPITAL LETTER Y WITH ACUTE;Lu;0;L;0059 0301;;;;N;LATIN CAPITAL LETTER Y ACUTE;;;00FD; +00DE;LATIN CAPITAL LETTER THORN;Lu;0;L;;;;;N;;;;00FE; +00DF;LATIN SMALL LETTER SHARP S;Ll;0;L;;;;;N;;;;; +00E0;LATIN SMALL LETTER A WITH GRAVE;Ll;0;L;0061 0300;;;;N;LATIN SMALL LETTER A GRAVE;;00C0;;00C0 +00E1;LATIN SMALL LETTER A WITH ACUTE;Ll;0;L;0061 0301;;;;N;LATIN SMALL LETTER A ACUTE;;00C1;;00C1 +00E2;LATIN SMALL LETTER A WITH CIRCUMFLEX;Ll;0;L;0061 0302;;;;N;LATIN SMALL LETTER A CIRCUMFLEX;;00C2;;00C2 +00E3;LATIN SMALL LETTER A WITH TILDE;Ll;0;L;0061 0303;;;;N;LATIN SMALL LETTER A TILDE;;00C3;;00C3 +00E4;LATIN SMALL LETTER A WITH DIAERESIS;Ll;0;L;0061 0308;;;;N;LATIN SMALL LETTER A DIAERESIS;;00C4;;00C4 +00E5;LATIN SMALL LETTER A WITH RING ABOVE;Ll;0;L;0061 030A;;;;N;LATIN SMALL LETTER A RING;;00C5;;00C5 +00E6;LATIN SMALL LETTER AE;Ll;0;L;;;;;N;LATIN SMALL LETTER A E;;00C6;;00C6 +00E7;LATIN SMALL LETTER C WITH CEDILLA;Ll;0;L;0063 0327;;;;N;LATIN SMALL LETTER C CEDILLA;;00C7;;00C7 +00E8;LATIN SMALL LETTER E WITH GRAVE;Ll;0;L;0065 0300;;;;N;LATIN SMALL LETTER E GRAVE;;00C8;;00C8 +00E9;LATIN SMALL LETTER E WITH ACUTE;Ll;0;L;0065 0301;;;;N;LATIN SMALL LETTER E ACUTE;;00C9;;00C9 +00EA;LATIN SMALL LETTER E WITH CIRCUMFLEX;Ll;0;L;0065 0302;;;;N;LATIN SMALL LETTER E CIRCUMFLEX;;00CA;;00CA +00EB;LATIN SMALL LETTER E WITH DIAERESIS;Ll;0;L;0065 0308;;;;N;LATIN SMALL LETTER E DIAERESIS;;00CB;;00CB +00EC;LATIN SMALL LETTER I WITH GRAVE;Ll;0;L;0069 0300;;;;N;LATIN SMALL LETTER I GRAVE;;00CC;;00CC +00ED;LATIN SMALL LETTER I WITH ACUTE;Ll;0;L;0069 0301;;;;N;LATIN SMALL LETTER I ACUTE;;00CD;;00CD +00EE;LATIN SMALL LETTER I WITH CIRCUMFLEX;Ll;0;L;0069 0302;;;;N;LATIN SMALL LETTER I CIRCUMFLEX;;00CE;;00CE +00EF;LATIN SMALL LETTER I WITH DIAERESIS;Ll;0;L;0069 0308;;;;N;LATIN SMALL LETTER I DIAERESIS;;00CF;;00CF +00F0;LATIN SMALL LETTER ETH;Ll;0;L;;;;;N;;;00D0;;00D0 +00F1;LATIN SMALL LETTER N WITH TILDE;Ll;0;L;006E 0303;;;;N;LATIN SMALL LETTER N TILDE;;00D1;;00D1 +00F2;LATIN SMALL LETTER O WITH GRAVE;Ll;0;L;006F 0300;;;;N;LATIN SMALL LETTER O GRAVE;;00D2;;00D2 +00F3;LATIN SMALL LETTER O WITH ACUTE;Ll;0;L;006F 0301;;;;N;LATIN SMALL LETTER O ACUTE;;00D3;;00D3 +00F4;LATIN SMALL LETTER O WITH CIRCUMFLEX;Ll;0;L;006F 0302;;;;N;LATIN SMALL LETTER O CIRCUMFLEX;;00D4;;00D4 +00F5;LATIN SMALL LETTER O WITH TILDE;Ll;0;L;006F 0303;;;;N;LATIN SMALL LETTER O TILDE;;00D5;;00D5 +00F6;LATIN SMALL LETTER O WITH DIAERESIS;Ll;0;L;006F 0308;;;;N;LATIN SMALL LETTER O DIAERESIS;;00D6;;00D6 +00F7;DIVISION SIGN;Sm;0;ON;;;;;N;;;;; +00F8;LATIN SMALL LETTER O WITH STROKE;Ll;0;L;;;;;N;LATIN SMALL LETTER O SLASH;;00D8;;00D8 +00F9;LATIN SMALL LETTER U WITH GRAVE;Ll;0;L;0075 0300;;;;N;LATIN SMALL LETTER U GRAVE;;00D9;;00D9 +00FA;LATIN SMALL LETTER U WITH ACUTE;Ll;0;L;0075 0301;;;;N;LATIN SMALL LETTER U ACUTE;;00DA;;00DA +00FB;LATIN SMALL LETTER U WITH CIRCUMFLEX;Ll;0;L;0075 0302;;;;N;LATIN SMALL LETTER U CIRCUMFLEX;;00DB;;00DB +00FC;LATIN SMALL LETTER U WITH DIAERESIS;Ll;0;L;0075 0308;;;;N;LATIN SMALL LETTER U DIAERESIS;;00DC;;00DC +00FD;LATIN SMALL LETTER Y WITH ACUTE;Ll;0;L;0079 0301;;;;N;LATIN SMALL LETTER Y ACUTE;;00DD;;00DD +00FE;LATIN SMALL LETTER THORN;Ll;0;L;;;;;N;;;00DE;;00DE +00FF;LATIN SMALL LETTER Y WITH DIAERESIS;Ll;0;L;0079 0308;;;;N;LATIN SMALL LETTER Y DIAERESIS;;0178;;0178 +0100;LATIN CAPITAL LETTER A WITH MACRON;Lu;0;L;0041 0304;;;;N;LATIN CAPITAL LETTER A MACRON;;;0101; +0101;LATIN SMALL LETTER A WITH MACRON;Ll;0;L;0061 0304;;;;N;LATIN SMALL LETTER A MACRON;;0100;;0100 +0102;LATIN CAPITAL LETTER A WITH BREVE;Lu;0;L;0041 0306;;;;N;LATIN CAPITAL LETTER A BREVE;;;0103; +0103;LATIN SMALL LETTER A WITH BREVE;Ll;0;L;0061 0306;;;;N;LATIN SMALL LETTER A BREVE;;0102;;0102 +0104;LATIN CAPITAL LETTER A WITH OGONEK;Lu;0;L;0041 0328;;;;N;LATIN CAPITAL LETTER A OGONEK;;;0105; +0105;LATIN SMALL LETTER A WITH OGONEK;Ll;0;L;0061 0328;;;;N;LATIN SMALL LETTER A OGONEK;;0104;;0104 +0106;LATIN CAPITAL LETTER C WITH ACUTE;Lu;0;L;0043 0301;;;;N;LATIN CAPITAL LETTER C ACUTE;;;0107; +0107;LATIN SMALL LETTER C WITH ACUTE;Ll;0;L;0063 0301;;;;N;LATIN SMALL LETTER C ACUTE;;0106;;0106 +0108;LATIN CAPITAL LETTER C WITH CIRCUMFLEX;Lu;0;L;0043 0302;;;;N;LATIN CAPITAL LETTER C CIRCUMFLEX;;;0109; +0109;LATIN SMALL LETTER C WITH CIRCUMFLEX;Ll;0;L;0063 0302;;;;N;LATIN SMALL LETTER C CIRCUMFLEX;;0108;;0108 +010A;LATIN CAPITAL LETTER C WITH DOT ABOVE;Lu;0;L;0043 0307;;;;N;LATIN CAPITAL LETTER C DOT;;;010B; +010B;LATIN SMALL LETTER C WITH DOT ABOVE;Ll;0;L;0063 0307;;;;N;LATIN SMALL LETTER C DOT;;010A;;010A +010C;LATIN CAPITAL LETTER C WITH CARON;Lu;0;L;0043 030C;;;;N;LATIN CAPITAL LETTER C HACEK;;;010D; +010D;LATIN SMALL LETTER C WITH CARON;Ll;0;L;0063 030C;;;;N;LATIN SMALL LETTER C HACEK;;010C;;010C +010E;LATIN CAPITAL LETTER D WITH CARON;Lu;0;L;0044 030C;;;;N;LATIN CAPITAL LETTER D HACEK;;;010F; +010F;LATIN SMALL LETTER D WITH CARON;Ll;0;L;0064 030C;;;;N;LATIN SMALL LETTER D HACEK;;010E;;010E +0110;LATIN CAPITAL LETTER D WITH STROKE;Lu;0;L;;;;;N;LATIN CAPITAL LETTER D BAR;;;0111; +0111;LATIN SMALL LETTER D WITH STROKE;Ll;0;L;;;;;N;LATIN SMALL LETTER D BAR;;0110;;0110 +0112;LATIN CAPITAL LETTER E WITH MACRON;Lu;0;L;0045 0304;;;;N;LATIN CAPITAL LETTER E MACRON;;;0113; +0113;LATIN SMALL LETTER E WITH MACRON;Ll;0;L;0065 0304;;;;N;LATIN SMALL LETTER E MACRON;;0112;;0112 +0114;LATIN CAPITAL LETTER E WITH BREVE;Lu;0;L;0045 0306;;;;N;LATIN CAPITAL LETTER E BREVE;;;0115; +0115;LATIN SMALL LETTER E WITH BREVE;Ll;0;L;0065 0306;;;;N;LATIN SMALL LETTER E BREVE;;0114;;0114 +0116;LATIN CAPITAL LETTER E WITH DOT ABOVE;Lu;0;L;0045 0307;;;;N;LATIN CAPITAL LETTER E DOT;;;0117; +0117;LATIN SMALL LETTER E WITH DOT ABOVE;Ll;0;L;0065 0307;;;;N;LATIN SMALL LETTER E DOT;;0116;;0116 +0118;LATIN CAPITAL LETTER E WITH OGONEK;Lu;0;L;0045 0328;;;;N;LATIN CAPITAL LETTER E OGONEK;;;0119; +0119;LATIN SMALL LETTER E WITH OGONEK;Ll;0;L;0065 0328;;;;N;LATIN SMALL LETTER E OGONEK;;0118;;0118 +011A;LATIN CAPITAL LETTER E WITH CARON;Lu;0;L;0045 030C;;;;N;LATIN CAPITAL LETTER E HACEK;;;011B; +011B;LATIN SMALL LETTER E WITH CARON;Ll;0;L;0065 030C;;;;N;LATIN SMALL LETTER E HACEK;;011A;;011A +011C;LATIN CAPITAL LETTER G WITH CIRCUMFLEX;Lu;0;L;0047 0302;;;;N;LATIN CAPITAL LETTER G CIRCUMFLEX;;;011D; +011D;LATIN SMALL LETTER G WITH CIRCUMFLEX;Ll;0;L;0067 0302;;;;N;LATIN SMALL LETTER G CIRCUMFLEX;;011C;;011C +011E;LATIN CAPITAL LETTER G WITH BREVE;Lu;0;L;0047 0306;;;;N;LATIN CAPITAL LETTER G BREVE;;;011F; +011F;LATIN SMALL LETTER G WITH BREVE;Ll;0;L;0067 0306;;;;N;LATIN SMALL LETTER G BREVE;;011E;;011E +0120;LATIN CAPITAL LETTER G WITH DOT ABOVE;Lu;0;L;0047 0307;;;;N;LATIN CAPITAL LETTER G DOT;;;0121; +0121;LATIN SMALL LETTER G WITH DOT ABOVE;Ll;0;L;0067 0307;;;;N;LATIN SMALL LETTER G DOT;;0120;;0120 +0122;LATIN CAPITAL LETTER G WITH CEDILLA;Lu;0;L;0047 0327;;;;N;LATIN CAPITAL LETTER G CEDILLA;;;0123; +0123;LATIN SMALL LETTER G WITH CEDILLA;Ll;0;L;0067 0327;;;;N;LATIN SMALL LETTER G CEDILLA;;0122;;0122 +0124;LATIN CAPITAL LETTER H WITH CIRCUMFLEX;Lu;0;L;0048 0302;;;;N;LATIN CAPITAL LETTER H CIRCUMFLEX;;;0125; +0125;LATIN SMALL LETTER H WITH CIRCUMFLEX;Ll;0;L;0068 0302;;;;N;LATIN SMALL LETTER H CIRCUMFLEX;;0124;;0124 +0126;LATIN CAPITAL LETTER H WITH STROKE;Lu;0;L;;;;;N;LATIN CAPITAL LETTER H BAR;;;0127; +0127;LATIN SMALL LETTER H WITH STROKE;Ll;0;L;;;;;N;LATIN SMALL LETTER H BAR;;0126;;0126 +0128;LATIN CAPITAL LETTER I WITH TILDE;Lu;0;L;0049 0303;;;;N;LATIN CAPITAL LETTER I TILDE;;;0129; +0129;LATIN SMALL LETTER I WITH TILDE;Ll;0;L;0069 0303;;;;N;LATIN SMALL LETTER I TILDE;;0128;;0128 +012A;LATIN CAPITAL LETTER I WITH MACRON;Lu;0;L;0049 0304;;;;N;LATIN CAPITAL LETTER I MACRON;;;012B; +012B;LATIN SMALL LETTER I WITH MACRON;Ll;0;L;0069 0304;;;;N;LATIN SMALL LETTER I MACRON;;012A;;012A +012C;LATIN CAPITAL LETTER I WITH BREVE;Lu;0;L;0049 0306;;;;N;LATIN CAPITAL LETTER I BREVE;;;012D; +012D;LATIN SMALL LETTER I WITH BREVE;Ll;0;L;0069 0306;;;;N;LATIN SMALL LETTER I BREVE;;012C;;012C +012E;LATIN CAPITAL LETTER I WITH OGONEK;Lu;0;L;0049 0328;;;;N;LATIN CAPITAL LETTER I OGONEK;;;012F; +012F;LATIN SMALL LETTER I WITH OGONEK;Ll;0;L;0069 0328;;;;N;LATIN SMALL LETTER I OGONEK;;012E;;012E +0130;LATIN CAPITAL LETTER I WITH DOT ABOVE;Lu;0;L;0049 0307;;;;N;LATIN CAPITAL LETTER I DOT;;;0069; +0131;LATIN SMALL LETTER DOTLESS I;Ll;0;L;;;;;N;;;0049;;0049 +0132;LATIN CAPITAL LIGATURE IJ;Lu;0;L; 0049 004A;;;;N;LATIN CAPITAL LETTER I J;;;0133; +0133;LATIN SMALL LIGATURE IJ;Ll;0;L; 0069 006A;;;;N;LATIN SMALL LETTER I J;;0132;;0132 +0134;LATIN CAPITAL LETTER J WITH CIRCUMFLEX;Lu;0;L;004A 0302;;;;N;LATIN CAPITAL LETTER J CIRCUMFLEX;;;0135; +0135;LATIN SMALL LETTER J WITH CIRCUMFLEX;Ll;0;L;006A 0302;;;;N;LATIN SMALL LETTER J CIRCUMFLEX;;0134;;0134 +0136;LATIN CAPITAL LETTER K WITH CEDILLA;Lu;0;L;004B 0327;;;;N;LATIN CAPITAL LETTER K CEDILLA;;;0137; +0137;LATIN SMALL LETTER K WITH CEDILLA;Ll;0;L;006B 0327;;;;N;LATIN SMALL LETTER K CEDILLA;;0136;;0136 +0138;LATIN SMALL LETTER KRA;Ll;0;L;;;;;N;;;;; +0139;LATIN CAPITAL LETTER L WITH ACUTE;Lu;0;L;004C 0301;;;;N;LATIN CAPITAL LETTER L ACUTE;;;013A; +013A;LATIN SMALL LETTER L WITH ACUTE;Ll;0;L;006C 0301;;;;N;LATIN SMALL LETTER L ACUTE;;0139;;0139 +013B;LATIN CAPITAL LETTER L WITH CEDILLA;Lu;0;L;004C 0327;;;;N;LATIN CAPITAL LETTER L CEDILLA;;;013C; +013C;LATIN SMALL LETTER L WITH CEDILLA;Ll;0;L;006C 0327;;;;N;LATIN SMALL LETTER L CEDILLA;;013B;;013B +013D;LATIN CAPITAL LETTER L WITH CARON;Lu;0;L;004C 030C;;;;N;LATIN CAPITAL LETTER L HACEK;;;013E; +013E;LATIN SMALL LETTER L WITH CARON;Ll;0;L;006C 030C;;;;N;LATIN SMALL LETTER L HACEK;;013D;;013D +013F;LATIN CAPITAL LETTER L WITH MIDDLE DOT;Lu;0;L; 004C 00B7;;;;N;;;;0140; +0140;LATIN SMALL LETTER L WITH MIDDLE DOT;Ll;0;L; 006C 00B7;;;;N;;;013F;;013F +0141;LATIN CAPITAL LETTER L WITH STROKE;Lu;0;L;;;;;N;LATIN CAPITAL LETTER L SLASH;;;0142; +0142;LATIN SMALL LETTER L WITH STROKE;Ll;0;L;;;;;N;LATIN SMALL LETTER L SLASH;;0141;;0141 +0143;LATIN CAPITAL LETTER N WITH ACUTE;Lu;0;L;004E 0301;;;;N;LATIN CAPITAL LETTER N ACUTE;;;0144; +0144;LATIN SMALL LETTER N WITH ACUTE;Ll;0;L;006E 0301;;;;N;LATIN SMALL LETTER N ACUTE;;0143;;0143 +0145;LATIN CAPITAL LETTER N WITH CEDILLA;Lu;0;L;004E 0327;;;;N;LATIN CAPITAL LETTER N CEDILLA;;;0146; +0146;LATIN SMALL LETTER N WITH CEDILLA;Ll;0;L;006E 0327;;;;N;LATIN SMALL LETTER N CEDILLA;;0145;;0145 +0147;LATIN CAPITAL LETTER N WITH CARON;Lu;0;L;004E 030C;;;;N;LATIN CAPITAL LETTER N HACEK;;;0148; +0148;LATIN SMALL LETTER N WITH CARON;Ll;0;L;006E 030C;;;;N;LATIN SMALL LETTER N HACEK;;0147;;0147 +0149;LATIN SMALL LETTER N PRECEDED BY APOSTROPHE;Ll;0;L; 02BC 006E;;;;N;LATIN SMALL LETTER APOSTROPHE N;;;; +014A;LATIN CAPITAL LETTER ENG;Lu;0;L;;;;;N;;;;014B; +014B;LATIN SMALL LETTER ENG;Ll;0;L;;;;;N;;;014A;;014A +014C;LATIN CAPITAL LETTER O WITH MACRON;Lu;0;L;004F 0304;;;;N;LATIN CAPITAL LETTER O MACRON;;;014D; +014D;LATIN SMALL LETTER O WITH MACRON;Ll;0;L;006F 0304;;;;N;LATIN SMALL LETTER O MACRON;;014C;;014C +014E;LATIN CAPITAL LETTER O WITH BREVE;Lu;0;L;004F 0306;;;;N;LATIN CAPITAL LETTER O BREVE;;;014F; +014F;LATIN SMALL LETTER O WITH BREVE;Ll;0;L;006F 0306;;;;N;LATIN SMALL LETTER O BREVE;;014E;;014E +0150;LATIN CAPITAL LETTER O WITH DOUBLE ACUTE;Lu;0;L;004F 030B;;;;N;LATIN CAPITAL LETTER O DOUBLE ACUTE;;;0151; +0151;LATIN SMALL LETTER O WITH DOUBLE ACUTE;Ll;0;L;006F 030B;;;;N;LATIN SMALL LETTER O DOUBLE ACUTE;;0150;;0150 +0152;LATIN CAPITAL LIGATURE OE;Lu;0;L;;;;;N;LATIN CAPITAL LETTER O E;;;0153; +0153;LATIN SMALL LIGATURE OE;Ll;0;L;;;;;N;LATIN SMALL LETTER O E;;0152;;0152 +0154;LATIN CAPITAL LETTER R WITH ACUTE;Lu;0;L;0052 0301;;;;N;LATIN CAPITAL LETTER R ACUTE;;;0155; +0155;LATIN SMALL LETTER R WITH ACUTE;Ll;0;L;0072 0301;;;;N;LATIN SMALL LETTER R ACUTE;;0154;;0154 +0156;LATIN CAPITAL LETTER R WITH CEDILLA;Lu;0;L;0052 0327;;;;N;LATIN CAPITAL LETTER R CEDILLA;;;0157; +0157;LATIN SMALL LETTER R WITH CEDILLA;Ll;0;L;0072 0327;;;;N;LATIN SMALL LETTER R CEDILLA;;0156;;0156 +0158;LATIN CAPITAL LETTER R WITH CARON;Lu;0;L;0052 030C;;;;N;LATIN CAPITAL LETTER R HACEK;;;0159; +0159;LATIN SMALL LETTER R WITH CARON;Ll;0;L;0072 030C;;;;N;LATIN SMALL LETTER R HACEK;;0158;;0158 +015A;LATIN CAPITAL LETTER S WITH ACUTE;Lu;0;L;0053 0301;;;;N;LATIN CAPITAL LETTER S ACUTE;;;015B; +015B;LATIN SMALL LETTER S WITH ACUTE;Ll;0;L;0073 0301;;;;N;LATIN SMALL LETTER S ACUTE;;015A;;015A +015C;LATIN CAPITAL LETTER S WITH CIRCUMFLEX;Lu;0;L;0053 0302;;;;N;LATIN CAPITAL LETTER S CIRCUMFLEX;;;015D; +015D;LATIN SMALL LETTER S WITH CIRCUMFLEX;Ll;0;L;0073 0302;;;;N;LATIN SMALL LETTER S CIRCUMFLEX;;015C;;015C +015E;LATIN CAPITAL LETTER S WITH CEDILLA;Lu;0;L;0053 0327;;;;N;LATIN CAPITAL LETTER S CEDILLA;;;015F; +015F;LATIN SMALL LETTER S WITH CEDILLA;Ll;0;L;0073 0327;;;;N;LATIN SMALL LETTER S CEDILLA;;015E;;015E +0160;LATIN CAPITAL LETTER S WITH CARON;Lu;0;L;0053 030C;;;;N;LATIN CAPITAL LETTER S HACEK;;;0161; +0161;LATIN SMALL LETTER S WITH CARON;Ll;0;L;0073 030C;;;;N;LATIN SMALL LETTER S HACEK;;0160;;0160 +0162;LATIN CAPITAL LETTER T WITH CEDILLA;Lu;0;L;0054 0327;;;;N;LATIN CAPITAL LETTER T CEDILLA;;;0163; +0163;LATIN SMALL LETTER T WITH CEDILLA;Ll;0;L;0074 0327;;;;N;LATIN SMALL LETTER T CEDILLA;;0162;;0162 +0164;LATIN CAPITAL LETTER T WITH CARON;Lu;0;L;0054 030C;;;;N;LATIN CAPITAL LETTER T HACEK;;;0165; +0165;LATIN SMALL LETTER T WITH CARON;Ll;0;L;0074 030C;;;;N;LATIN SMALL LETTER T HACEK;;0164;;0164 +0166;LATIN CAPITAL LETTER T WITH STROKE;Lu;0;L;;;;;N;LATIN CAPITAL LETTER T BAR;;;0167; +0167;LATIN SMALL LETTER T WITH STROKE;Ll;0;L;;;;;N;LATIN SMALL LETTER T BAR;;0166;;0166 +0168;LATIN CAPITAL LETTER U WITH TILDE;Lu;0;L;0055 0303;;;;N;LATIN CAPITAL LETTER U TILDE;;;0169; +0169;LATIN SMALL LETTER U WITH TILDE;Ll;0;L;0075 0303;;;;N;LATIN SMALL LETTER U TILDE;;0168;;0168 +016A;LATIN CAPITAL LETTER U WITH MACRON;Lu;0;L;0055 0304;;;;N;LATIN CAPITAL LETTER U MACRON;;;016B; +016B;LATIN SMALL LETTER U WITH MACRON;Ll;0;L;0075 0304;;;;N;LATIN SMALL LETTER U MACRON;;016A;;016A +016C;LATIN CAPITAL LETTER U WITH BREVE;Lu;0;L;0055 0306;;;;N;LATIN CAPITAL LETTER U BREVE;;;016D; +016D;LATIN SMALL LETTER U WITH BREVE;Ll;0;L;0075 0306;;;;N;LATIN SMALL LETTER U BREVE;;016C;;016C +016E;LATIN CAPITAL LETTER U WITH RING ABOVE;Lu;0;L;0055 030A;;;;N;LATIN CAPITAL LETTER U RING;;;016F; +016F;LATIN SMALL LETTER U WITH RING ABOVE;Ll;0;L;0075 030A;;;;N;LATIN SMALL LETTER U RING;;016E;;016E +0170;LATIN CAPITAL LETTER U WITH DOUBLE ACUTE;Lu;0;L;0055 030B;;;;N;LATIN CAPITAL LETTER U DOUBLE ACUTE;;;0171; +0171;LATIN SMALL LETTER U WITH DOUBLE ACUTE;Ll;0;L;0075 030B;;;;N;LATIN SMALL LETTER U DOUBLE ACUTE;;0170;;0170 +0172;LATIN CAPITAL LETTER U WITH OGONEK;Lu;0;L;0055 0328;;;;N;LATIN CAPITAL LETTER U OGONEK;;;0173; +0173;LATIN SMALL LETTER U WITH OGONEK;Ll;0;L;0075 0328;;;;N;LATIN SMALL LETTER U OGONEK;;0172;;0172 +0174;LATIN CAPITAL LETTER W WITH CIRCUMFLEX;Lu;0;L;0057 0302;;;;N;LATIN CAPITAL LETTER W CIRCUMFLEX;;;0175; +0175;LATIN SMALL LETTER W WITH CIRCUMFLEX;Ll;0;L;0077 0302;;;;N;LATIN SMALL LETTER W CIRCUMFLEX;;0174;;0174 +0176;LATIN CAPITAL LETTER Y WITH CIRCUMFLEX;Lu;0;L;0059 0302;;;;N;LATIN CAPITAL LETTER Y CIRCUMFLEX;;;0177; +0177;LATIN SMALL LETTER Y WITH CIRCUMFLEX;Ll;0;L;0079 0302;;;;N;LATIN SMALL LETTER Y CIRCUMFLEX;;0176;;0176 +0178;LATIN CAPITAL LETTER Y WITH DIAERESIS;Lu;0;L;0059 0308;;;;N;LATIN CAPITAL LETTER Y DIAERESIS;;;00FF; +0179;LATIN CAPITAL LETTER Z WITH ACUTE;Lu;0;L;005A 0301;;;;N;LATIN CAPITAL LETTER Z ACUTE;;;017A; +017A;LATIN SMALL LETTER Z WITH ACUTE;Ll;0;L;007A 0301;;;;N;LATIN SMALL LETTER Z ACUTE;;0179;;0179 +017B;LATIN CAPITAL LETTER Z WITH DOT ABOVE;Lu;0;L;005A 0307;;;;N;LATIN CAPITAL LETTER Z DOT;;;017C; +017C;LATIN SMALL LETTER Z WITH DOT ABOVE;Ll;0;L;007A 0307;;;;N;LATIN SMALL LETTER Z DOT;;017B;;017B +017D;LATIN CAPITAL LETTER Z WITH CARON;Lu;0;L;005A 030C;;;;N;LATIN CAPITAL LETTER Z HACEK;;;017E; +017E;LATIN SMALL LETTER Z WITH CARON;Ll;0;L;007A 030C;;;;N;LATIN SMALL LETTER Z HACEK;;017D;;017D +017F;LATIN SMALL LETTER LONG S;Ll;0;L; 0073;;;;N;;;0053;;0053 +0180;LATIN SMALL LETTER B WITH STROKE;Ll;0;L;;;;;N;LATIN SMALL LETTER B BAR;;0243;;0243 +0181;LATIN CAPITAL LETTER B WITH HOOK;Lu;0;L;;;;;N;LATIN CAPITAL LETTER B HOOK;;;0253; +0182;LATIN CAPITAL LETTER B WITH TOPBAR;Lu;0;L;;;;;N;LATIN CAPITAL LETTER B TOPBAR;;;0183; +0183;LATIN SMALL LETTER B WITH TOPBAR;Ll;0;L;;;;;N;LATIN SMALL LETTER B TOPBAR;;0182;;0182 +0184;LATIN CAPITAL LETTER TONE SIX;Lu;0;L;;;;;N;;;;0185; +0185;LATIN SMALL LETTER TONE SIX;Ll;0;L;;;;;N;;;0184;;0184 +0186;LATIN CAPITAL LETTER OPEN O;Lu;0;L;;;;;N;;;;0254; +0187;LATIN CAPITAL LETTER C WITH HOOK;Lu;0;L;;;;;N;LATIN CAPITAL LETTER C HOOK;;;0188; +0188;LATIN SMALL LETTER C WITH HOOK;Ll;0;L;;;;;N;LATIN SMALL LETTER C HOOK;;0187;;0187 +0189;LATIN CAPITAL LETTER AFRICAN D;Lu;0;L;;;;;N;;;;0256; +018A;LATIN CAPITAL LETTER D WITH HOOK;Lu;0;L;;;;;N;LATIN CAPITAL LETTER D HOOK;;;0257; +018B;LATIN CAPITAL LETTER D WITH TOPBAR;Lu;0;L;;;;;N;LATIN CAPITAL LETTER D TOPBAR;;;018C; +018C;LATIN SMALL LETTER D WITH TOPBAR;Ll;0;L;;;;;N;LATIN SMALL LETTER D TOPBAR;;018B;;018B +018D;LATIN SMALL LETTER TURNED DELTA;Ll;0;L;;;;;N;;;;; +018E;LATIN CAPITAL LETTER REVERSED E;Lu;0;L;;;;;N;LATIN CAPITAL LETTER TURNED E;;;01DD; +018F;LATIN CAPITAL LETTER SCHWA;Lu;0;L;;;;;N;;;;0259; +0190;LATIN CAPITAL LETTER OPEN E;Lu;0;L;;;;;N;LATIN CAPITAL LETTER EPSILON;;;025B; +0191;LATIN CAPITAL LETTER F WITH HOOK;Lu;0;L;;;;;N;LATIN CAPITAL LETTER F HOOK;;;0192; +0192;LATIN SMALL LETTER F WITH HOOK;Ll;0;L;;;;;N;LATIN SMALL LETTER SCRIPT F;;0191;;0191 +0193;LATIN CAPITAL LETTER G WITH HOOK;Lu;0;L;;;;;N;LATIN CAPITAL LETTER G HOOK;;;0260; +0194;LATIN CAPITAL LETTER GAMMA;Lu;0;L;;;;;N;;;;0263; +0195;LATIN SMALL LETTER HV;Ll;0;L;;;;;N;LATIN SMALL LETTER H V;;01F6;;01F6 +0196;LATIN CAPITAL LETTER IOTA;Lu;0;L;;;;;N;;;;0269; +0197;LATIN CAPITAL LETTER I WITH STROKE;Lu;0;L;;;;;N;LATIN CAPITAL LETTER BARRED I;;;0268; +0198;LATIN CAPITAL LETTER K WITH HOOK;Lu;0;L;;;;;N;LATIN CAPITAL LETTER K HOOK;;;0199; +0199;LATIN SMALL LETTER K WITH HOOK;Ll;0;L;;;;;N;LATIN SMALL LETTER K HOOK;;0198;;0198 +019A;LATIN SMALL LETTER L WITH BAR;Ll;0;L;;;;;N;LATIN SMALL LETTER BARRED L;;023D;;023D +019B;LATIN SMALL LETTER LAMBDA WITH STROKE;Ll;0;L;;;;;N;LATIN SMALL LETTER BARRED LAMBDA;;;; +019C;LATIN CAPITAL LETTER TURNED M;Lu;0;L;;;;;N;;;;026F; +019D;LATIN CAPITAL LETTER N WITH LEFT HOOK;Lu;0;L;;;;;N;LATIN CAPITAL LETTER N HOOK;;;0272; +019E;LATIN SMALL LETTER N WITH LONG RIGHT LEG;Ll;0;L;;;;;N;;;0220;;0220 +019F;LATIN CAPITAL LETTER O WITH MIDDLE TILDE;Lu;0;L;;;;;N;LATIN CAPITAL LETTER BARRED O;;;0275; +01A0;LATIN CAPITAL LETTER O WITH HORN;Lu;0;L;004F 031B;;;;N;LATIN CAPITAL LETTER O HORN;;;01A1; +01A1;LATIN SMALL LETTER O WITH HORN;Ll;0;L;006F 031B;;;;N;LATIN SMALL LETTER O HORN;;01A0;;01A0 +01A2;LATIN CAPITAL LETTER OI;Lu;0;L;;;;;N;LATIN CAPITAL LETTER O I;;;01A3; +01A3;LATIN SMALL LETTER OI;Ll;0;L;;;;;N;LATIN SMALL LETTER O I;;01A2;;01A2 +01A4;LATIN CAPITAL LETTER P WITH HOOK;Lu;0;L;;;;;N;LATIN CAPITAL LETTER P HOOK;;;01A5; +01A5;LATIN SMALL LETTER P WITH HOOK;Ll;0;L;;;;;N;LATIN SMALL LETTER P HOOK;;01A4;;01A4 +01A6;LATIN LETTER YR;Lu;0;L;;;;;N;LATIN LETTER Y R;;;0280; +01A7;LATIN CAPITAL LETTER TONE TWO;Lu;0;L;;;;;N;;;;01A8; +01A8;LATIN SMALL LETTER TONE TWO;Ll;0;L;;;;;N;;;01A7;;01A7 +01A9;LATIN CAPITAL LETTER ESH;Lu;0;L;;;;;N;;;;0283; +01AA;LATIN LETTER REVERSED ESH LOOP;Ll;0;L;;;;;N;;;;; +01AB;LATIN SMALL LETTER T WITH PALATAL HOOK;Ll;0;L;;;;;N;LATIN SMALL LETTER T PALATAL HOOK;;;; +01AC;LATIN CAPITAL LETTER T WITH HOOK;Lu;0;L;;;;;N;LATIN CAPITAL LETTER T HOOK;;;01AD; +01AD;LATIN SMALL LETTER T WITH HOOK;Ll;0;L;;;;;N;LATIN SMALL LETTER T HOOK;;01AC;;01AC +01AE;LATIN CAPITAL LETTER T WITH RETROFLEX HOOK;Lu;0;L;;;;;N;LATIN CAPITAL LETTER T RETROFLEX HOOK;;;0288; +01AF;LATIN CAPITAL LETTER U WITH HORN;Lu;0;L;0055 031B;;;;N;LATIN CAPITAL LETTER U HORN;;;01B0; +01B0;LATIN SMALL LETTER U WITH HORN;Ll;0;L;0075 031B;;;;N;LATIN SMALL LETTER U HORN;;01AF;;01AF +01B1;LATIN CAPITAL LETTER UPSILON;Lu;0;L;;;;;N;;;;028A; +01B2;LATIN CAPITAL LETTER V WITH HOOK;Lu;0;L;;;;;N;LATIN CAPITAL LETTER SCRIPT V;;;028B; +01B3;LATIN CAPITAL LETTER Y WITH HOOK;Lu;0;L;;;;;N;LATIN CAPITAL LETTER Y HOOK;;;01B4; +01B4;LATIN SMALL LETTER Y WITH HOOK;Ll;0;L;;;;;N;LATIN SMALL LETTER Y HOOK;;01B3;;01B3 +01B5;LATIN CAPITAL LETTER Z WITH STROKE;Lu;0;L;;;;;N;LATIN CAPITAL LETTER Z BAR;;;01B6; +01B6;LATIN SMALL LETTER Z WITH STROKE;Ll;0;L;;;;;N;LATIN SMALL LETTER Z BAR;;01B5;;01B5 +01B7;LATIN CAPITAL LETTER EZH;Lu;0;L;;;;;N;LATIN CAPITAL LETTER YOGH;;;0292; +01B8;LATIN CAPITAL LETTER EZH REVERSED;Lu;0;L;;;;;N;LATIN CAPITAL LETTER REVERSED YOGH;;;01B9; +01B9;LATIN SMALL LETTER EZH REVERSED;Ll;0;L;;;;;N;LATIN SMALL LETTER REVERSED YOGH;;01B8;;01B8 +01BA;LATIN SMALL LETTER EZH WITH TAIL;Ll;0;L;;;;;N;LATIN SMALL LETTER YOGH WITH TAIL;;;; +01BB;LATIN LETTER TWO WITH STROKE;Lo;0;L;;;;;N;LATIN LETTER TWO BAR;;;; +01BC;LATIN CAPITAL LETTER TONE FIVE;Lu;0;L;;;;;N;;;;01BD; +01BD;LATIN SMALL LETTER TONE FIVE;Ll;0;L;;;;;N;;;01BC;;01BC +01BE;LATIN LETTER INVERTED GLOTTAL STOP WITH STROKE;Ll;0;L;;;;;N;LATIN LETTER INVERTED GLOTTAL STOP BAR;;;; +01BF;LATIN LETTER WYNN;Ll;0;L;;;;;N;;;01F7;;01F7 +01C0;LATIN LETTER DENTAL CLICK;Lo;0;L;;;;;N;LATIN LETTER PIPE;;;; +01C1;LATIN LETTER LATERAL CLICK;Lo;0;L;;;;;N;LATIN LETTER DOUBLE PIPE;;;; +01C2;LATIN LETTER ALVEOLAR CLICK;Lo;0;L;;;;;N;LATIN LETTER PIPE DOUBLE BAR;;;; +01C3;LATIN LETTER RETROFLEX CLICK;Lo;0;L;;;;;N;LATIN LETTER EXCLAMATION MARK;;;; +01C4;LATIN CAPITAL LETTER DZ WITH CARON;Lu;0;L; 0044 017D;;;;N;LATIN CAPITAL LETTER D Z HACEK;;;01C6;01C5 +01C5;LATIN CAPITAL LETTER D WITH SMALL LETTER Z WITH CARON;Lt;0;L; 0044 017E;;;;N;LATIN LETTER CAPITAL D SMALL Z HACEK;;01C4;01C6;01C5 +01C6;LATIN SMALL LETTER DZ WITH CARON;Ll;0;L; 0064 017E;;;;N;LATIN SMALL LETTER D Z HACEK;;01C4;;01C5 +01C7;LATIN CAPITAL LETTER LJ;Lu;0;L; 004C 004A;;;;N;LATIN CAPITAL LETTER L J;;;01C9;01C8 +01C8;LATIN CAPITAL LETTER L WITH SMALL LETTER J;Lt;0;L; 004C 006A;;;;N;LATIN LETTER CAPITAL L SMALL J;;01C7;01C9;01C8 +01C9;LATIN SMALL LETTER LJ;Ll;0;L; 006C 006A;;;;N;LATIN SMALL LETTER L J;;01C7;;01C8 +01CA;LATIN CAPITAL LETTER NJ;Lu;0;L; 004E 004A;;;;N;LATIN CAPITAL LETTER N J;;;01CC;01CB +01CB;LATIN CAPITAL LETTER N WITH SMALL LETTER J;Lt;0;L; 004E 006A;;;;N;LATIN LETTER CAPITAL N SMALL J;;01CA;01CC;01CB +01CC;LATIN SMALL LETTER NJ;Ll;0;L; 006E 006A;;;;N;LATIN SMALL LETTER N J;;01CA;;01CB +01CD;LATIN CAPITAL LETTER A WITH CARON;Lu;0;L;0041 030C;;;;N;LATIN CAPITAL LETTER A HACEK;;;01CE; +01CE;LATIN SMALL LETTER A WITH CARON;Ll;0;L;0061 030C;;;;N;LATIN SMALL LETTER A HACEK;;01CD;;01CD +01CF;LATIN CAPITAL LETTER I WITH CARON;Lu;0;L;0049 030C;;;;N;LATIN CAPITAL LETTER I HACEK;;;01D0; +01D0;LATIN SMALL LETTER I WITH CARON;Ll;0;L;0069 030C;;;;N;LATIN SMALL LETTER I HACEK;;01CF;;01CF +01D1;LATIN CAPITAL LETTER O WITH CARON;Lu;0;L;004F 030C;;;;N;LATIN CAPITAL LETTER O HACEK;;;01D2; +01D2;LATIN SMALL LETTER O WITH CARON;Ll;0;L;006F 030C;;;;N;LATIN SMALL LETTER O HACEK;;01D1;;01D1 +01D3;LATIN CAPITAL LETTER U WITH CARON;Lu;0;L;0055 030C;;;;N;LATIN CAPITAL LETTER U HACEK;;;01D4; +01D4;LATIN SMALL LETTER U WITH CARON;Ll;0;L;0075 030C;;;;N;LATIN SMALL LETTER U HACEK;;01D3;;01D3 +01D5;LATIN CAPITAL LETTER U WITH DIAERESIS AND MACRON;Lu;0;L;00DC 0304;;;;N;LATIN CAPITAL LETTER U DIAERESIS MACRON;;;01D6; +01D6;LATIN SMALL LETTER U WITH DIAERESIS AND MACRON;Ll;0;L;00FC 0304;;;;N;LATIN SMALL LETTER U DIAERESIS MACRON;;01D5;;01D5 +01D7;LATIN CAPITAL LETTER U WITH DIAERESIS AND ACUTE;Lu;0;L;00DC 0301;;;;N;LATIN CAPITAL LETTER U DIAERESIS ACUTE;;;01D8; +01D8;LATIN SMALL LETTER U WITH DIAERESIS AND ACUTE;Ll;0;L;00FC 0301;;;;N;LATIN SMALL LETTER U DIAERESIS ACUTE;;01D7;;01D7 +01D9;LATIN CAPITAL LETTER U WITH DIAERESIS AND CARON;Lu;0;L;00DC 030C;;;;N;LATIN CAPITAL LETTER U DIAERESIS HACEK;;;01DA; +01DA;LATIN SMALL LETTER U WITH DIAERESIS AND CARON;Ll;0;L;00FC 030C;;;;N;LATIN SMALL LETTER U DIAERESIS HACEK;;01D9;;01D9 +01DB;LATIN CAPITAL LETTER U WITH DIAERESIS AND GRAVE;Lu;0;L;00DC 0300;;;;N;LATIN CAPITAL LETTER U DIAERESIS GRAVE;;;01DC; +01DC;LATIN SMALL LETTER U WITH DIAERESIS AND GRAVE;Ll;0;L;00FC 0300;;;;N;LATIN SMALL LETTER U DIAERESIS GRAVE;;01DB;;01DB +01DD;LATIN SMALL LETTER TURNED E;Ll;0;L;;;;;N;;;018E;;018E +01DE;LATIN CAPITAL LETTER A WITH DIAERESIS AND MACRON;Lu;0;L;00C4 0304;;;;N;LATIN CAPITAL LETTER A DIAERESIS MACRON;;;01DF; +01DF;LATIN SMALL LETTER A WITH DIAERESIS AND MACRON;Ll;0;L;00E4 0304;;;;N;LATIN SMALL LETTER A DIAERESIS MACRON;;01DE;;01DE +01E0;LATIN CAPITAL LETTER A WITH DOT ABOVE AND MACRON;Lu;0;L;0226 0304;;;;N;LATIN CAPITAL LETTER A DOT MACRON;;;01E1; +01E1;LATIN SMALL LETTER A WITH DOT ABOVE AND MACRON;Ll;0;L;0227 0304;;;;N;LATIN SMALL LETTER A DOT MACRON;;01E0;;01E0 +01E2;LATIN CAPITAL LETTER AE WITH MACRON;Lu;0;L;00C6 0304;;;;N;LATIN CAPITAL LETTER A E MACRON;;;01E3; +01E3;LATIN SMALL LETTER AE WITH MACRON;Ll;0;L;00E6 0304;;;;N;LATIN SMALL LETTER A E MACRON;;01E2;;01E2 +01E4;LATIN CAPITAL LETTER G WITH STROKE;Lu;0;L;;;;;N;LATIN CAPITAL LETTER G BAR;;;01E5; +01E5;LATIN SMALL LETTER G WITH STROKE;Ll;0;L;;;;;N;LATIN SMALL LETTER G BAR;;01E4;;01E4 +01E6;LATIN CAPITAL LETTER G WITH CARON;Lu;0;L;0047 030C;;;;N;LATIN CAPITAL LETTER G HACEK;;;01E7; +01E7;LATIN SMALL LETTER G WITH CARON;Ll;0;L;0067 030C;;;;N;LATIN SMALL LETTER G HACEK;;01E6;;01E6 +01E8;LATIN CAPITAL LETTER K WITH CARON;Lu;0;L;004B 030C;;;;N;LATIN CAPITAL LETTER K HACEK;;;01E9; +01E9;LATIN SMALL LETTER K WITH CARON;Ll;0;L;006B 030C;;;;N;LATIN SMALL LETTER K HACEK;;01E8;;01E8 +01EA;LATIN CAPITAL LETTER O WITH OGONEK;Lu;0;L;004F 0328;;;;N;LATIN CAPITAL LETTER O OGONEK;;;01EB; +01EB;LATIN SMALL LETTER O WITH OGONEK;Ll;0;L;006F 0328;;;;N;LATIN SMALL LETTER O OGONEK;;01EA;;01EA +01EC;LATIN CAPITAL LETTER O WITH OGONEK AND MACRON;Lu;0;L;01EA 0304;;;;N;LATIN CAPITAL LETTER O OGONEK MACRON;;;01ED; +01ED;LATIN SMALL LETTER O WITH OGONEK AND MACRON;Ll;0;L;01EB 0304;;;;N;LATIN SMALL LETTER O OGONEK MACRON;;01EC;;01EC +01EE;LATIN CAPITAL LETTER EZH WITH CARON;Lu;0;L;01B7 030C;;;;N;LATIN CAPITAL LETTER YOGH HACEK;;;01EF; +01EF;LATIN SMALL LETTER EZH WITH CARON;Ll;0;L;0292 030C;;;;N;LATIN SMALL LETTER YOGH HACEK;;01EE;;01EE +01F0;LATIN SMALL LETTER J WITH CARON;Ll;0;L;006A 030C;;;;N;LATIN SMALL LETTER J HACEK;;;; +01F1;LATIN CAPITAL LETTER DZ;Lu;0;L; 0044 005A;;;;N;;;;01F3;01F2 +01F2;LATIN CAPITAL LETTER D WITH SMALL LETTER Z;Lt;0;L; 0044 007A;;;;N;;;01F1;01F3;01F2 +01F3;LATIN SMALL LETTER DZ;Ll;0;L; 0064 007A;;;;N;;;01F1;;01F2 +01F4;LATIN CAPITAL LETTER G WITH ACUTE;Lu;0;L;0047 0301;;;;N;;;;01F5; +01F5;LATIN SMALL LETTER G WITH ACUTE;Ll;0;L;0067 0301;;;;N;;;01F4;;01F4 +01F6;LATIN CAPITAL LETTER HWAIR;Lu;0;L;;;;;N;;;;0195; +01F7;LATIN CAPITAL LETTER WYNN;Lu;0;L;;;;;N;;;;01BF; +01F8;LATIN CAPITAL LETTER N WITH GRAVE;Lu;0;L;004E 0300;;;;N;;;;01F9; +01F9;LATIN SMALL LETTER N WITH GRAVE;Ll;0;L;006E 0300;;;;N;;;01F8;;01F8 +01FA;LATIN CAPITAL LETTER A WITH RING ABOVE AND ACUTE;Lu;0;L;00C5 0301;;;;N;;;;01FB; +01FB;LATIN SMALL LETTER A WITH RING ABOVE AND ACUTE;Ll;0;L;00E5 0301;;;;N;;;01FA;;01FA +01FC;LATIN CAPITAL LETTER AE WITH ACUTE;Lu;0;L;00C6 0301;;;;N;;;;01FD; +01FD;LATIN SMALL LETTER AE WITH ACUTE;Ll;0;L;00E6 0301;;;;N;;;01FC;;01FC +01FE;LATIN CAPITAL LETTER O WITH STROKE AND ACUTE;Lu;0;L;00D8 0301;;;;N;;;;01FF; +01FF;LATIN SMALL LETTER O WITH STROKE AND ACUTE;Ll;0;L;00F8 0301;;;;N;;;01FE;;01FE +0200;LATIN CAPITAL LETTER A WITH DOUBLE GRAVE;Lu;0;L;0041 030F;;;;N;;;;0201; +0201;LATIN SMALL LETTER A WITH DOUBLE GRAVE;Ll;0;L;0061 030F;;;;N;;;0200;;0200 +0202;LATIN CAPITAL LETTER A WITH INVERTED BREVE;Lu;0;L;0041 0311;;;;N;;;;0203; +0203;LATIN SMALL LETTER A WITH INVERTED BREVE;Ll;0;L;0061 0311;;;;N;;;0202;;0202 +0204;LATIN CAPITAL LETTER E WITH DOUBLE GRAVE;Lu;0;L;0045 030F;;;;N;;;;0205; +0205;LATIN SMALL LETTER E WITH DOUBLE GRAVE;Ll;0;L;0065 030F;;;;N;;;0204;;0204 +0206;LATIN CAPITAL LETTER E WITH INVERTED BREVE;Lu;0;L;0045 0311;;;;N;;;;0207; +0207;LATIN SMALL LETTER E WITH INVERTED BREVE;Ll;0;L;0065 0311;;;;N;;;0206;;0206 +0208;LATIN CAPITAL LETTER I WITH DOUBLE GRAVE;Lu;0;L;0049 030F;;;;N;;;;0209; +0209;LATIN SMALL LETTER I WITH DOUBLE GRAVE;Ll;0;L;0069 030F;;;;N;;;0208;;0208 +020A;LATIN CAPITAL LETTER I WITH INVERTED BREVE;Lu;0;L;0049 0311;;;;N;;;;020B; +020B;LATIN SMALL LETTER I WITH INVERTED BREVE;Ll;0;L;0069 0311;;;;N;;;020A;;020A +020C;LATIN CAPITAL LETTER O WITH DOUBLE GRAVE;Lu;0;L;004F 030F;;;;N;;;;020D; +020D;LATIN SMALL LETTER O WITH DOUBLE GRAVE;Ll;0;L;006F 030F;;;;N;;;020C;;020C +020E;LATIN CAPITAL LETTER O WITH INVERTED BREVE;Lu;0;L;004F 0311;;;;N;;;;020F; +020F;LATIN SMALL LETTER O WITH INVERTED BREVE;Ll;0;L;006F 0311;;;;N;;;020E;;020E +0210;LATIN CAPITAL LETTER R WITH DOUBLE GRAVE;Lu;0;L;0052 030F;;;;N;;;;0211; +0211;LATIN SMALL LETTER R WITH DOUBLE GRAVE;Ll;0;L;0072 030F;;;;N;;;0210;;0210 +0212;LATIN CAPITAL LETTER R WITH INVERTED BREVE;Lu;0;L;0052 0311;;;;N;;;;0213; +0213;LATIN SMALL LETTER R WITH INVERTED BREVE;Ll;0;L;0072 0311;;;;N;;;0212;;0212 +0214;LATIN CAPITAL LETTER U WITH DOUBLE GRAVE;Lu;0;L;0055 030F;;;;N;;;;0215; +0215;LATIN SMALL LETTER U WITH DOUBLE GRAVE;Ll;0;L;0075 030F;;;;N;;;0214;;0214 +0216;LATIN CAPITAL LETTER U WITH INVERTED BREVE;Lu;0;L;0055 0311;;;;N;;;;0217; +0217;LATIN SMALL LETTER U WITH INVERTED BREVE;Ll;0;L;0075 0311;;;;N;;;0216;;0216 +0218;LATIN CAPITAL LETTER S WITH COMMA BELOW;Lu;0;L;0053 0326;;;;N;;;;0219; +0219;LATIN SMALL LETTER S WITH COMMA BELOW;Ll;0;L;0073 0326;;;;N;;;0218;;0218 +021A;LATIN CAPITAL LETTER T WITH COMMA BELOW;Lu;0;L;0054 0326;;;;N;;;;021B; +021B;LATIN SMALL LETTER T WITH COMMA BELOW;Ll;0;L;0074 0326;;;;N;;;021A;;021A +021C;LATIN CAPITAL LETTER YOGH;Lu;0;L;;;;;N;;;;021D; +021D;LATIN SMALL LETTER YOGH;Ll;0;L;;;;;N;;;021C;;021C +021E;LATIN CAPITAL LETTER H WITH CARON;Lu;0;L;0048 030C;;;;N;;;;021F; +021F;LATIN SMALL LETTER H WITH CARON;Ll;0;L;0068 030C;;;;N;;;021E;;021E +0220;LATIN CAPITAL LETTER N WITH LONG RIGHT LEG;Lu;0;L;;;;;N;;;;019E; +0221;LATIN SMALL LETTER D WITH CURL;Ll;0;L;;;;;N;;;;; +0222;LATIN CAPITAL LETTER OU;Lu;0;L;;;;;N;;;;0223; +0223;LATIN SMALL LETTER OU;Ll;0;L;;;;;N;;;0222;;0222 +0224;LATIN CAPITAL LETTER Z WITH HOOK;Lu;0;L;;;;;N;;;;0225; +0225;LATIN SMALL LETTER Z WITH HOOK;Ll;0;L;;;;;N;;;0224;;0224 +0226;LATIN CAPITAL LETTER A WITH DOT ABOVE;Lu;0;L;0041 0307;;;;N;;;;0227; +0227;LATIN SMALL LETTER A WITH DOT ABOVE;Ll;0;L;0061 0307;;;;N;;;0226;;0226 +0228;LATIN CAPITAL LETTER E WITH CEDILLA;Lu;0;L;0045 0327;;;;N;;;;0229; +0229;LATIN SMALL LETTER E WITH CEDILLA;Ll;0;L;0065 0327;;;;N;;;0228;;0228 +022A;LATIN CAPITAL LETTER O WITH DIAERESIS AND MACRON;Lu;0;L;00D6 0304;;;;N;;;;022B; +022B;LATIN SMALL LETTER O WITH DIAERESIS AND MACRON;Ll;0;L;00F6 0304;;;;N;;;022A;;022A +022C;LATIN CAPITAL LETTER O WITH TILDE AND MACRON;Lu;0;L;00D5 0304;;;;N;;;;022D; +022D;LATIN SMALL LETTER O WITH TILDE AND MACRON;Ll;0;L;00F5 0304;;;;N;;;022C;;022C +022E;LATIN CAPITAL LETTER O WITH DOT ABOVE;Lu;0;L;004F 0307;;;;N;;;;022F; +022F;LATIN SMALL LETTER O WITH DOT ABOVE;Ll;0;L;006F 0307;;;;N;;;022E;;022E +0230;LATIN CAPITAL LETTER O WITH DOT ABOVE AND MACRON;Lu;0;L;022E 0304;;;;N;;;;0231; +0231;LATIN SMALL LETTER O WITH DOT ABOVE AND MACRON;Ll;0;L;022F 0304;;;;N;;;0230;;0230 +0232;LATIN CAPITAL LETTER Y WITH MACRON;Lu;0;L;0059 0304;;;;N;;;;0233; +0233;LATIN SMALL LETTER Y WITH MACRON;Ll;0;L;0079 0304;;;;N;;;0232;;0232 +0234;LATIN SMALL LETTER L WITH CURL;Ll;0;L;;;;;N;;;;; +0235;LATIN SMALL LETTER N WITH CURL;Ll;0;L;;;;;N;;;;; +0236;LATIN SMALL LETTER T WITH CURL;Ll;0;L;;;;;N;;;;; +0237;LATIN SMALL LETTER DOTLESS J;Ll;0;L;;;;;N;;;;; +0238;LATIN SMALL LETTER DB DIGRAPH;Ll;0;L;;;;;N;;;;; +0239;LATIN SMALL LETTER QP DIGRAPH;Ll;0;L;;;;;N;;;;; +023A;LATIN CAPITAL LETTER A WITH STROKE;Lu;0;L;;;;;N;;;;2C65; +023B;LATIN CAPITAL LETTER C WITH STROKE;Lu;0;L;;;;;N;;;;023C; +023C;LATIN SMALL LETTER C WITH STROKE;Ll;0;L;;;;;N;;;023B;;023B +023D;LATIN CAPITAL LETTER L WITH BAR;Lu;0;L;;;;;N;;;;019A; +023E;LATIN CAPITAL LETTER T WITH DIAGONAL STROKE;Lu;0;L;;;;;N;;;;2C66; +023F;LATIN SMALL LETTER S WITH SWASH TAIL;Ll;0;L;;;;;N;;;2C7E;;2C7E +0240;LATIN SMALL LETTER Z WITH SWASH TAIL;Ll;0;L;;;;;N;;;2C7F;;2C7F +0241;LATIN CAPITAL LETTER GLOTTAL STOP;Lu;0;L;;;;;N;;;;0242; +0242;LATIN SMALL LETTER GLOTTAL STOP;Ll;0;L;;;;;N;;;0241;;0241 +0243;LATIN CAPITAL LETTER B WITH STROKE;Lu;0;L;;;;;N;;;;0180; +0244;LATIN CAPITAL LETTER U BAR;Lu;0;L;;;;;N;;;;0289; +0245;LATIN CAPITAL LETTER TURNED V;Lu;0;L;;;;;N;;;;028C; +0246;LATIN CAPITAL LETTER E WITH STROKE;Lu;0;L;;;;;N;;;;0247; +0247;LATIN SMALL LETTER E WITH STROKE;Ll;0;L;;;;;N;;;0246;;0246 +0248;LATIN CAPITAL LETTER J WITH STROKE;Lu;0;L;;;;;N;;;;0249; +0249;LATIN SMALL LETTER J WITH STROKE;Ll;0;L;;;;;N;;;0248;;0248 +024A;LATIN CAPITAL LETTER SMALL Q WITH HOOK TAIL;Lu;0;L;;;;;N;;;;024B; +024B;LATIN SMALL LETTER Q WITH HOOK TAIL;Ll;0;L;;;;;N;;;024A;;024A +024C;LATIN CAPITAL LETTER R WITH STROKE;Lu;0;L;;;;;N;;;;024D; +024D;LATIN SMALL LETTER R WITH STROKE;Ll;0;L;;;;;N;;;024C;;024C +024E;LATIN CAPITAL LETTER Y WITH STROKE;Lu;0;L;;;;;N;;;;024F; +024F;LATIN SMALL LETTER Y WITH STROKE;Ll;0;L;;;;;N;;;024E;;024E +0250;LATIN SMALL LETTER TURNED A;Ll;0;L;;;;;N;;;2C6F;;2C6F +0251;LATIN SMALL LETTER ALPHA;Ll;0;L;;;;;N;LATIN SMALL LETTER SCRIPT A;;2C6D;;2C6D +0252;LATIN SMALL LETTER TURNED ALPHA;Ll;0;L;;;;;N;LATIN SMALL LETTER TURNED SCRIPT A;;2C70;;2C70 +0253;LATIN SMALL LETTER B WITH HOOK;Ll;0;L;;;;;N;LATIN SMALL LETTER B HOOK;;0181;;0181 +0254;LATIN SMALL LETTER OPEN O;Ll;0;L;;;;;N;;;0186;;0186 +0255;LATIN SMALL LETTER C WITH CURL;Ll;0;L;;;;;N;LATIN SMALL LETTER C CURL;;;; +0256;LATIN SMALL LETTER D WITH TAIL;Ll;0;L;;;;;N;LATIN SMALL LETTER D RETROFLEX HOOK;;0189;;0189 +0257;LATIN SMALL LETTER D WITH HOOK;Ll;0;L;;;;;N;LATIN SMALL LETTER D HOOK;;018A;;018A +0258;LATIN SMALL LETTER REVERSED E;Ll;0;L;;;;;N;;;;; +0259;LATIN SMALL LETTER SCHWA;Ll;0;L;;;;;N;;;018F;;018F +025A;LATIN SMALL LETTER SCHWA WITH HOOK;Ll;0;L;;;;;N;LATIN SMALL LETTER SCHWA HOOK;;;; +025B;LATIN SMALL LETTER OPEN E;Ll;0;L;;;;;N;LATIN SMALL LETTER EPSILON;;0190;;0190 +025C;LATIN SMALL LETTER REVERSED OPEN E;Ll;0;L;;;;;N;LATIN SMALL LETTER REVERSED EPSILON;;A7AB;;A7AB +025D;LATIN SMALL LETTER REVERSED OPEN E WITH HOOK;Ll;0;L;;;;;N;LATIN SMALL LETTER REVERSED EPSILON HOOK;;;; +025E;LATIN SMALL LETTER CLOSED REVERSED OPEN E;Ll;0;L;;;;;N;LATIN SMALL LETTER CLOSED REVERSED EPSILON;;;; +025F;LATIN SMALL LETTER DOTLESS J WITH STROKE;Ll;0;L;;;;;N;LATIN SMALL LETTER DOTLESS J BAR;;;; +0260;LATIN SMALL LETTER G WITH HOOK;Ll;0;L;;;;;N;LATIN SMALL LETTER G HOOK;;0193;;0193 +0261;LATIN SMALL LETTER SCRIPT G;Ll;0;L;;;;;N;;;A7AC;;A7AC +0262;LATIN LETTER SMALL CAPITAL G;Ll;0;L;;;;;N;;;;; +0263;LATIN SMALL LETTER GAMMA;Ll;0;L;;;;;N;;;0194;;0194 +0264;LATIN SMALL LETTER RAMS HORN;Ll;0;L;;;;;N;LATIN SMALL LETTER BABY GAMMA;;;; +0265;LATIN SMALL LETTER TURNED H;Ll;0;L;;;;;N;;;A78D;;A78D +0266;LATIN SMALL LETTER H WITH HOOK;Ll;0;L;;;;;N;LATIN SMALL LETTER H HOOK;;A7AA;;A7AA +0267;LATIN SMALL LETTER HENG WITH HOOK;Ll;0;L;;;;;N;LATIN SMALL LETTER HENG HOOK;;;; +0268;LATIN SMALL LETTER I WITH STROKE;Ll;0;L;;;;;N;LATIN SMALL LETTER BARRED I;;0197;;0197 +0269;LATIN SMALL LETTER IOTA;Ll;0;L;;;;;N;;;0196;;0196 +026A;LATIN LETTER SMALL CAPITAL I;Ll;0;L;;;;;N;;;A7AE;;A7AE +026B;LATIN SMALL LETTER L WITH MIDDLE TILDE;Ll;0;L;;;;;N;;;2C62;;2C62 +026C;LATIN SMALL LETTER L WITH BELT;Ll;0;L;;;;;N;LATIN SMALL LETTER L BELT;;A7AD;;A7AD +026D;LATIN SMALL LETTER L WITH RETROFLEX HOOK;Ll;0;L;;;;;N;LATIN SMALL LETTER L RETROFLEX HOOK;;;; +026E;LATIN SMALL LETTER LEZH;Ll;0;L;;;;;N;LATIN SMALL LETTER L YOGH;;;; +026F;LATIN SMALL LETTER TURNED M;Ll;0;L;;;;;N;;;019C;;019C +0270;LATIN SMALL LETTER TURNED M WITH LONG LEG;Ll;0;L;;;;;N;;;;; +0271;LATIN SMALL LETTER M WITH HOOK;Ll;0;L;;;;;N;LATIN SMALL LETTER M HOOK;;2C6E;;2C6E +0272;LATIN SMALL LETTER N WITH LEFT HOOK;Ll;0;L;;;;;N;LATIN SMALL LETTER N HOOK;;019D;;019D +0273;LATIN SMALL LETTER N WITH RETROFLEX HOOK;Ll;0;L;;;;;N;LATIN SMALL LETTER N RETROFLEX HOOK;;;; +0274;LATIN LETTER SMALL CAPITAL N;Ll;0;L;;;;;N;;;;; +0275;LATIN SMALL LETTER BARRED O;Ll;0;L;;;;;N;;;019F;;019F +0276;LATIN LETTER SMALL CAPITAL OE;Ll;0;L;;;;;N;LATIN LETTER SMALL CAPITAL O E;;;; +0277;LATIN SMALL LETTER CLOSED OMEGA;Ll;0;L;;;;;N;;;;; +0278;LATIN SMALL LETTER PHI;Ll;0;L;;;;;N;;;;; +0279;LATIN SMALL LETTER TURNED R;Ll;0;L;;;;;N;;;;; +027A;LATIN SMALL LETTER TURNED R WITH LONG LEG;Ll;0;L;;;;;N;;;;; +027B;LATIN SMALL LETTER TURNED R WITH HOOK;Ll;0;L;;;;;N;LATIN SMALL LETTER TURNED R HOOK;;;; +027C;LATIN SMALL LETTER R WITH LONG LEG;Ll;0;L;;;;;N;;;;; +027D;LATIN SMALL LETTER R WITH TAIL;Ll;0;L;;;;;N;LATIN SMALL LETTER R HOOK;;2C64;;2C64 +027E;LATIN SMALL LETTER R WITH FISHHOOK;Ll;0;L;;;;;N;LATIN SMALL LETTER FISHHOOK R;;;; +027F;LATIN SMALL LETTER REVERSED R WITH FISHHOOK;Ll;0;L;;;;;N;LATIN SMALL LETTER REVERSED FISHHOOK R;;;; +0280;LATIN LETTER SMALL CAPITAL R;Ll;0;L;;;;;N;;;01A6;;01A6 +0281;LATIN LETTER SMALL CAPITAL INVERTED R;Ll;0;L;;;;;N;;;;; +0282;LATIN SMALL LETTER S WITH HOOK;Ll;0;L;;;;;N;LATIN SMALL LETTER S HOOK;;A7C5;;A7C5 +0283;LATIN SMALL LETTER ESH;Ll;0;L;;;;;N;;;01A9;;01A9 +0284;LATIN SMALL LETTER DOTLESS J WITH STROKE AND HOOK;Ll;0;L;;;;;N;LATIN SMALL LETTER DOTLESS J BAR HOOK;;;; +0285;LATIN SMALL LETTER SQUAT REVERSED ESH;Ll;0;L;;;;;N;;;;; +0286;LATIN SMALL LETTER ESH WITH CURL;Ll;0;L;;;;;N;LATIN SMALL LETTER ESH CURL;;;; +0287;LATIN SMALL LETTER TURNED T;Ll;0;L;;;;;N;;;A7B1;;A7B1 +0288;LATIN SMALL LETTER T WITH RETROFLEX HOOK;Ll;0;L;;;;;N;LATIN SMALL LETTER T RETROFLEX HOOK;;01AE;;01AE +0289;LATIN SMALL LETTER U BAR;Ll;0;L;;;;;N;;;0244;;0244 +028A;LATIN SMALL LETTER UPSILON;Ll;0;L;;;;;N;;;01B1;;01B1 +028B;LATIN SMALL LETTER V WITH HOOK;Ll;0;L;;;;;N;LATIN SMALL LETTER SCRIPT V;;01B2;;01B2 +028C;LATIN SMALL LETTER TURNED V;Ll;0;L;;;;;N;;;0245;;0245 +028D;LATIN SMALL LETTER TURNED W;Ll;0;L;;;;;N;;;;; +028E;LATIN SMALL LETTER TURNED Y;Ll;0;L;;;;;N;;;;; +028F;LATIN LETTER SMALL CAPITAL Y;Ll;0;L;;;;;N;;;;; +0290;LATIN SMALL LETTER Z WITH RETROFLEX HOOK;Ll;0;L;;;;;N;LATIN SMALL LETTER Z RETROFLEX HOOK;;;; +0291;LATIN SMALL LETTER Z WITH CURL;Ll;0;L;;;;;N;LATIN SMALL LETTER Z CURL;;;; +0292;LATIN SMALL LETTER EZH;Ll;0;L;;;;;N;LATIN SMALL LETTER YOGH;;01B7;;01B7 +0293;LATIN SMALL LETTER EZH WITH CURL;Ll;0;L;;;;;N;LATIN SMALL LETTER YOGH CURL;;;; +0294;LATIN LETTER GLOTTAL STOP;Lo;0;L;;;;;N;;;;; +0295;LATIN LETTER PHARYNGEAL VOICED FRICATIVE;Ll;0;L;;;;;N;LATIN LETTER REVERSED GLOTTAL STOP;;;; +0296;LATIN LETTER INVERTED GLOTTAL STOP;Ll;0;L;;;;;N;;;;; +0297;LATIN LETTER STRETCHED C;Ll;0;L;;;;;N;;;;; +0298;LATIN LETTER BILABIAL CLICK;Ll;0;L;;;;;N;LATIN LETTER BULLSEYE;;;; +0299;LATIN LETTER SMALL CAPITAL B;Ll;0;L;;;;;N;;;;; +029A;LATIN SMALL LETTER CLOSED OPEN E;Ll;0;L;;;;;N;LATIN SMALL LETTER CLOSED EPSILON;;;; +029B;LATIN LETTER SMALL CAPITAL G WITH HOOK;Ll;0;L;;;;;N;LATIN LETTER SMALL CAPITAL G HOOK;;;; +029C;LATIN LETTER SMALL CAPITAL H;Ll;0;L;;;;;N;;;;; +029D;LATIN SMALL LETTER J WITH CROSSED-TAIL;Ll;0;L;;;;;N;LATIN SMALL LETTER CROSSED-TAIL J;;A7B2;;A7B2 +029E;LATIN SMALL LETTER TURNED K;Ll;0;L;;;;;N;;;A7B0;;A7B0 +029F;LATIN LETTER SMALL CAPITAL L;Ll;0;L;;;;;N;;;;; +02A0;LATIN SMALL LETTER Q WITH HOOK;Ll;0;L;;;;;N;LATIN SMALL LETTER Q HOOK;;;; +02A1;LATIN LETTER GLOTTAL STOP WITH STROKE;Ll;0;L;;;;;N;LATIN LETTER GLOTTAL STOP BAR;;;; +02A2;LATIN LETTER REVERSED GLOTTAL STOP WITH STROKE;Ll;0;L;;;;;N;LATIN LETTER REVERSED GLOTTAL STOP BAR;;;; +02A3;LATIN SMALL LETTER DZ DIGRAPH;Ll;0;L;;;;;N;LATIN SMALL LETTER D Z;;;; +02A4;LATIN SMALL LETTER DEZH DIGRAPH;Ll;0;L;;;;;N;LATIN SMALL LETTER D YOGH;;;; +02A5;LATIN SMALL LETTER DZ DIGRAPH WITH CURL;Ll;0;L;;;;;N;LATIN SMALL LETTER D Z CURL;;;; +02A6;LATIN SMALL LETTER TS DIGRAPH;Ll;0;L;;;;;N;LATIN SMALL LETTER T S;;;; +02A7;LATIN SMALL LETTER TESH DIGRAPH;Ll;0;L;;;;;N;LATIN SMALL LETTER T ESH;;;; +02A8;LATIN SMALL LETTER TC DIGRAPH WITH CURL;Ll;0;L;;;;;N;LATIN SMALL LETTER T C CURL;;;; +02A9;LATIN SMALL LETTER FENG DIGRAPH;Ll;0;L;;;;;N;;;;; +02AA;LATIN SMALL LETTER LS DIGRAPH;Ll;0;L;;;;;N;;;;; +02AB;LATIN SMALL LETTER LZ DIGRAPH;Ll;0;L;;;;;N;;;;; +02AC;LATIN LETTER BILABIAL PERCUSSIVE;Ll;0;L;;;;;N;;;;; +02AD;LATIN LETTER BIDENTAL PERCUSSIVE;Ll;0;L;;;;;N;;;;; +02AE;LATIN SMALL LETTER TURNED H WITH FISHHOOK;Ll;0;L;;;;;N;;;;; +02AF;LATIN SMALL LETTER TURNED H WITH FISHHOOK AND TAIL;Ll;0;L;;;;;N;;;;; +02B0;MODIFIER LETTER SMALL H;Lm;0;L; 0068;;;;N;;;;; +02B1;MODIFIER LETTER SMALL H WITH HOOK;Lm;0;L; 0266;;;;N;MODIFIER LETTER SMALL H HOOK;;;; +02B2;MODIFIER LETTER SMALL J;Lm;0;L; 006A;;;;N;;;;; +02B3;MODIFIER LETTER SMALL R;Lm;0;L; 0072;;;;N;;;;; +02B4;MODIFIER LETTER SMALL TURNED R;Lm;0;L; 0279;;;;N;;;;; +02B5;MODIFIER LETTER SMALL TURNED R WITH HOOK;Lm;0;L; 027B;;;;N;MODIFIER LETTER SMALL TURNED R HOOK;;;; +02B6;MODIFIER LETTER SMALL CAPITAL INVERTED R;Lm;0;L; 0281;;;;N;;;;; +02B7;MODIFIER LETTER SMALL W;Lm;0;L; 0077;;;;N;;;;; +02B8;MODIFIER LETTER SMALL Y;Lm;0;L; 0079;;;;N;;;;; +02B9;MODIFIER LETTER PRIME;Lm;0;ON;;;;;N;;;;; +02BA;MODIFIER LETTER DOUBLE PRIME;Lm;0;ON;;;;;N;;;;; +02BB;MODIFIER LETTER TURNED COMMA;Lm;0;L;;;;;N;;;;; +02BC;MODIFIER LETTER APOSTROPHE;Lm;0;L;;;;;N;;;;; +02BD;MODIFIER LETTER REVERSED COMMA;Lm;0;L;;;;;N;;;;; +02BE;MODIFIER LETTER RIGHT HALF RING;Lm;0;L;;;;;N;;;;; +02BF;MODIFIER LETTER LEFT HALF RING;Lm;0;L;;;;;N;;;;; +02C0;MODIFIER LETTER GLOTTAL STOP;Lm;0;L;;;;;N;;;;; +02C1;MODIFIER LETTER REVERSED GLOTTAL STOP;Lm;0;L;;;;;N;;;;; +02C2;MODIFIER LETTER LEFT ARROWHEAD;Sk;0;ON;;;;;N;;;;; +02C3;MODIFIER LETTER RIGHT ARROWHEAD;Sk;0;ON;;;;;N;;;;; +02C4;MODIFIER LETTER UP ARROWHEAD;Sk;0;ON;;;;;N;;;;; +02C5;MODIFIER LETTER DOWN ARROWHEAD;Sk;0;ON;;;;;N;;;;; +02C6;MODIFIER LETTER CIRCUMFLEX ACCENT;Lm;0;ON;;;;;N;MODIFIER LETTER CIRCUMFLEX;;;; +02C7;CARON;Lm;0;ON;;;;;N;MODIFIER LETTER HACEK;;;; +02C8;MODIFIER LETTER VERTICAL LINE;Lm;0;ON;;;;;N;;;;; +02C9;MODIFIER LETTER MACRON;Lm;0;ON;;;;;N;;;;; +02CA;MODIFIER LETTER ACUTE ACCENT;Lm;0;ON;;;;;N;MODIFIER LETTER ACUTE;;;; +02CB;MODIFIER LETTER GRAVE ACCENT;Lm;0;ON;;;;;N;MODIFIER LETTER GRAVE;;;; +02CC;MODIFIER LETTER LOW VERTICAL LINE;Lm;0;ON;;;;;N;;;;; +02CD;MODIFIER LETTER LOW MACRON;Lm;0;ON;;;;;N;;;;; +02CE;MODIFIER LETTER LOW GRAVE ACCENT;Lm;0;ON;;;;;N;MODIFIER LETTER LOW GRAVE;;;; +02CF;MODIFIER LETTER LOW ACUTE ACCENT;Lm;0;ON;;;;;N;MODIFIER LETTER LOW ACUTE;;;; +02D0;MODIFIER LETTER TRIANGULAR COLON;Lm;0;L;;;;;N;;;;; +02D1;MODIFIER LETTER HALF TRIANGULAR COLON;Lm;0;L;;;;;N;;;;; +02D2;MODIFIER LETTER CENTRED RIGHT HALF RING;Sk;0;ON;;;;;N;MODIFIER LETTER CENTERED RIGHT HALF RING;;;; +02D3;MODIFIER LETTER CENTRED LEFT HALF RING;Sk;0;ON;;;;;N;MODIFIER LETTER CENTERED LEFT HALF RING;;;; +02D4;MODIFIER LETTER UP TACK;Sk;0;ON;;;;;N;;;;; +02D5;MODIFIER LETTER DOWN TACK;Sk;0;ON;;;;;N;;;;; +02D6;MODIFIER LETTER PLUS SIGN;Sk;0;ON;;;;;N;;;;; +02D7;MODIFIER LETTER MINUS SIGN;Sk;0;ON;;;;;N;;;;; +02D8;BREVE;Sk;0;ON; 0020 0306;;;;N;SPACING BREVE;;;; +02D9;DOT ABOVE;Sk;0;ON; 0020 0307;;;;N;SPACING DOT ABOVE;;;; +02DA;RING ABOVE;Sk;0;ON; 0020 030A;;;;N;SPACING RING ABOVE;;;; +02DB;OGONEK;Sk;0;ON; 0020 0328;;;;N;SPACING OGONEK;;;; +02DC;SMALL TILDE;Sk;0;ON; 0020 0303;;;;N;SPACING TILDE;;;; +02DD;DOUBLE ACUTE ACCENT;Sk;0;ON; 0020 030B;;;;N;SPACING DOUBLE ACUTE;;;; +02DE;MODIFIER LETTER RHOTIC HOOK;Sk;0;ON;;;;;N;;;;; +02DF;MODIFIER LETTER CROSS ACCENT;Sk;0;ON;;;;;N;;;;; +02E0;MODIFIER LETTER SMALL GAMMA;Lm;0;L; 0263;;;;N;;;;; +02E1;MODIFIER LETTER SMALL L;Lm;0;L; 006C;;;;N;;;;; +02E2;MODIFIER LETTER SMALL S;Lm;0;L; 0073;;;;N;;;;; +02E3;MODIFIER LETTER SMALL X;Lm;0;L; 0078;;;;N;;;;; +02E4;MODIFIER LETTER SMALL REVERSED GLOTTAL STOP;Lm;0;L; 0295;;;;N;;;;; +02E5;MODIFIER LETTER EXTRA-HIGH TONE BAR;Sk;0;ON;;;;;N;;;;; +02E6;MODIFIER LETTER HIGH TONE BAR;Sk;0;ON;;;;;N;;;;; +02E7;MODIFIER LETTER MID TONE BAR;Sk;0;ON;;;;;N;;;;; +02E8;MODIFIER LETTER LOW TONE BAR;Sk;0;ON;;;;;N;;;;; +02E9;MODIFIER LETTER EXTRA-LOW TONE BAR;Sk;0;ON;;;;;N;;;;; +02EA;MODIFIER LETTER YIN DEPARTING TONE MARK;Sk;0;ON;;;;;N;;;;; +02EB;MODIFIER LETTER YANG DEPARTING TONE MARK;Sk;0;ON;;;;;N;;;;; +02EC;MODIFIER LETTER VOICING;Lm;0;ON;;;;;N;;;;; +02ED;MODIFIER LETTER UNASPIRATED;Sk;0;ON;;;;;N;;;;; +02EE;MODIFIER LETTER DOUBLE APOSTROPHE;Lm;0;L;;;;;N;;;;; +02EF;MODIFIER LETTER LOW DOWN ARROWHEAD;Sk;0;ON;;;;;N;;;;; +02F0;MODIFIER LETTER LOW UP ARROWHEAD;Sk;0;ON;;;;;N;;;;; +02F1;MODIFIER LETTER LOW LEFT ARROWHEAD;Sk;0;ON;;;;;N;;;;; +02F2;MODIFIER LETTER LOW RIGHT ARROWHEAD;Sk;0;ON;;;;;N;;;;; +02F3;MODIFIER LETTER LOW RING;Sk;0;ON;;;;;N;;;;; +02F4;MODIFIER LETTER MIDDLE GRAVE ACCENT;Sk;0;ON;;;;;N;;;;; +02F5;MODIFIER LETTER MIDDLE DOUBLE GRAVE ACCENT;Sk;0;ON;;;;;N;;;;; +02F6;MODIFIER LETTER MIDDLE DOUBLE ACUTE ACCENT;Sk;0;ON;;;;;N;;;;; +02F7;MODIFIER LETTER LOW TILDE;Sk;0;ON;;;;;N;;;;; +02F8;MODIFIER LETTER RAISED COLON;Sk;0;ON;;;;;N;;;;; +02F9;MODIFIER LETTER BEGIN HIGH TONE;Sk;0;ON;;;;;N;;;;; +02FA;MODIFIER LETTER END HIGH TONE;Sk;0;ON;;;;;N;;;;; +02FB;MODIFIER LETTER BEGIN LOW TONE;Sk;0;ON;;;;;N;;;;; +02FC;MODIFIER LETTER END LOW TONE;Sk;0;ON;;;;;N;;;;; +02FD;MODIFIER LETTER SHELF;Sk;0;ON;;;;;N;;;;; +02FE;MODIFIER LETTER OPEN SHELF;Sk;0;ON;;;;;N;;;;; +02FF;MODIFIER LETTER LOW LEFT ARROW;Sk;0;ON;;;;;N;;;;; +0300;COMBINING GRAVE ACCENT;Mn;230;NSM;;;;;N;NON-SPACING GRAVE;;;; +0301;COMBINING ACUTE ACCENT;Mn;230;NSM;;;;;N;NON-SPACING ACUTE;;;; +0302;COMBINING CIRCUMFLEX ACCENT;Mn;230;NSM;;;;;N;NON-SPACING CIRCUMFLEX;;;; +0303;COMBINING TILDE;Mn;230;NSM;;;;;N;NON-SPACING TILDE;;;; +0304;COMBINING MACRON;Mn;230;NSM;;;;;N;NON-SPACING MACRON;;;; +0305;COMBINING OVERLINE;Mn;230;NSM;;;;;N;NON-SPACING OVERSCORE;;;; +0306;COMBINING BREVE;Mn;230;NSM;;;;;N;NON-SPACING BREVE;;;; +0307;COMBINING DOT ABOVE;Mn;230;NSM;;;;;N;NON-SPACING DOT ABOVE;;;; +0308;COMBINING DIAERESIS;Mn;230;NSM;;;;;N;NON-SPACING DIAERESIS;;;; +0309;COMBINING HOOK ABOVE;Mn;230;NSM;;;;;N;NON-SPACING HOOK ABOVE;;;; +030A;COMBINING RING ABOVE;Mn;230;NSM;;;;;N;NON-SPACING RING ABOVE;;;; +030B;COMBINING DOUBLE ACUTE ACCENT;Mn;230;NSM;;;;;N;NON-SPACING DOUBLE ACUTE;;;; +030C;COMBINING CARON;Mn;230;NSM;;;;;N;NON-SPACING HACEK;;;; +030D;COMBINING VERTICAL LINE ABOVE;Mn;230;NSM;;;;;N;NON-SPACING VERTICAL LINE ABOVE;;;; +030E;COMBINING DOUBLE VERTICAL LINE ABOVE;Mn;230;NSM;;;;;N;NON-SPACING DOUBLE VERTICAL LINE ABOVE;;;; +030F;COMBINING DOUBLE GRAVE ACCENT;Mn;230;NSM;;;;;N;NON-SPACING DOUBLE GRAVE;;;; +0310;COMBINING CANDRABINDU;Mn;230;NSM;;;;;N;NON-SPACING CANDRABINDU;;;; +0311;COMBINING INVERTED BREVE;Mn;230;NSM;;;;;N;NON-SPACING INVERTED BREVE;;;; +0312;COMBINING TURNED COMMA ABOVE;Mn;230;NSM;;;;;N;NON-SPACING TURNED COMMA ABOVE;;;; +0313;COMBINING COMMA ABOVE;Mn;230;NSM;;;;;N;NON-SPACING COMMA ABOVE;;;; +0314;COMBINING REVERSED COMMA ABOVE;Mn;230;NSM;;;;;N;NON-SPACING REVERSED COMMA ABOVE;;;; +0315;COMBINING COMMA ABOVE RIGHT;Mn;232;NSM;;;;;N;NON-SPACING COMMA ABOVE RIGHT;;;; +0316;COMBINING GRAVE ACCENT BELOW;Mn;220;NSM;;;;;N;NON-SPACING GRAVE BELOW;;;; +0317;COMBINING ACUTE ACCENT BELOW;Mn;220;NSM;;;;;N;NON-SPACING ACUTE BELOW;;;; +0318;COMBINING LEFT TACK BELOW;Mn;220;NSM;;;;;N;NON-SPACING LEFT TACK BELOW;;;; +0319;COMBINING RIGHT TACK BELOW;Mn;220;NSM;;;;;N;NON-SPACING RIGHT TACK BELOW;;;; +031A;COMBINING LEFT ANGLE ABOVE;Mn;232;NSM;;;;;N;NON-SPACING LEFT ANGLE ABOVE;;;; +031B;COMBINING HORN;Mn;216;NSM;;;;;N;NON-SPACING HORN;;;; +031C;COMBINING LEFT HALF RING BELOW;Mn;220;NSM;;;;;N;NON-SPACING LEFT HALF RING BELOW;;;; +031D;COMBINING UP TACK BELOW;Mn;220;NSM;;;;;N;NON-SPACING UP TACK BELOW;;;; +031E;COMBINING DOWN TACK BELOW;Mn;220;NSM;;;;;N;NON-SPACING DOWN TACK BELOW;;;; +031F;COMBINING PLUS SIGN BELOW;Mn;220;NSM;;;;;N;NON-SPACING PLUS SIGN BELOW;;;; +0320;COMBINING MINUS SIGN BELOW;Mn;220;NSM;;;;;N;NON-SPACING MINUS SIGN BELOW;;;; +0321;COMBINING PALATALIZED HOOK BELOW;Mn;202;NSM;;;;;N;NON-SPACING PALATALIZED HOOK BELOW;;;; +0322;COMBINING RETROFLEX HOOK BELOW;Mn;202;NSM;;;;;N;NON-SPACING RETROFLEX HOOK BELOW;;;; +0323;COMBINING DOT BELOW;Mn;220;NSM;;;;;N;NON-SPACING DOT BELOW;;;; +0324;COMBINING DIAERESIS BELOW;Mn;220;NSM;;;;;N;NON-SPACING DOUBLE DOT BELOW;;;; +0325;COMBINING RING BELOW;Mn;220;NSM;;;;;N;NON-SPACING RING BELOW;;;; +0326;COMBINING COMMA BELOW;Mn;220;NSM;;;;;N;NON-SPACING COMMA BELOW;;;; +0327;COMBINING CEDILLA;Mn;202;NSM;;;;;N;NON-SPACING CEDILLA;;;; +0328;COMBINING OGONEK;Mn;202;NSM;;;;;N;NON-SPACING OGONEK;;;; +0329;COMBINING VERTICAL LINE BELOW;Mn;220;NSM;;;;;N;NON-SPACING VERTICAL LINE BELOW;;;; +032A;COMBINING BRIDGE BELOW;Mn;220;NSM;;;;;N;NON-SPACING BRIDGE BELOW;;;; +032B;COMBINING INVERTED DOUBLE ARCH BELOW;Mn;220;NSM;;;;;N;NON-SPACING INVERTED DOUBLE ARCH BELOW;;;; +032C;COMBINING CARON BELOW;Mn;220;NSM;;;;;N;NON-SPACING HACEK BELOW;;;; +032D;COMBINING CIRCUMFLEX ACCENT BELOW;Mn;220;NSM;;;;;N;NON-SPACING CIRCUMFLEX BELOW;;;; +032E;COMBINING BREVE BELOW;Mn;220;NSM;;;;;N;NON-SPACING BREVE BELOW;;;; +032F;COMBINING INVERTED BREVE BELOW;Mn;220;NSM;;;;;N;NON-SPACING INVERTED BREVE BELOW;;;; +0330;COMBINING TILDE BELOW;Mn;220;NSM;;;;;N;NON-SPACING TILDE BELOW;;;; +0331;COMBINING MACRON BELOW;Mn;220;NSM;;;;;N;NON-SPACING MACRON BELOW;;;; +0332;COMBINING LOW LINE;Mn;220;NSM;;;;;N;NON-SPACING UNDERSCORE;;;; +0333;COMBINING DOUBLE LOW LINE;Mn;220;NSM;;;;;N;NON-SPACING DOUBLE UNDERSCORE;;;; +0334;COMBINING TILDE OVERLAY;Mn;1;NSM;;;;;N;NON-SPACING TILDE OVERLAY;;;; +0335;COMBINING SHORT STROKE OVERLAY;Mn;1;NSM;;;;;N;NON-SPACING SHORT BAR OVERLAY;;;; +0336;COMBINING LONG STROKE OVERLAY;Mn;1;NSM;;;;;N;NON-SPACING LONG BAR OVERLAY;;;; +0337;COMBINING SHORT SOLIDUS OVERLAY;Mn;1;NSM;;;;;N;NON-SPACING SHORT SLASH OVERLAY;;;; +0338;COMBINING LONG SOLIDUS OVERLAY;Mn;1;NSM;;;;;N;NON-SPACING LONG SLASH OVERLAY;;;; +0339;COMBINING RIGHT HALF RING BELOW;Mn;220;NSM;;;;;N;NON-SPACING RIGHT HALF RING BELOW;;;; +033A;COMBINING INVERTED BRIDGE BELOW;Mn;220;NSM;;;;;N;NON-SPACING INVERTED BRIDGE BELOW;;;; +033B;COMBINING SQUARE BELOW;Mn;220;NSM;;;;;N;NON-SPACING SQUARE BELOW;;;; +033C;COMBINING SEAGULL BELOW;Mn;220;NSM;;;;;N;NON-SPACING SEAGULL BELOW;;;; +033D;COMBINING X ABOVE;Mn;230;NSM;;;;;N;NON-SPACING X ABOVE;;;; +033E;COMBINING VERTICAL TILDE;Mn;230;NSM;;;;;N;NON-SPACING VERTICAL TILDE;;;; +033F;COMBINING DOUBLE OVERLINE;Mn;230;NSM;;;;;N;NON-SPACING DOUBLE OVERSCORE;;;; +0340;COMBINING GRAVE TONE MARK;Mn;230;NSM;0300;;;;N;NON-SPACING GRAVE TONE MARK;;;; +0341;COMBINING ACUTE TONE MARK;Mn;230;NSM;0301;;;;N;NON-SPACING ACUTE TONE MARK;;;; +0342;COMBINING GREEK PERISPOMENI;Mn;230;NSM;;;;;N;;;;; +0343;COMBINING GREEK KORONIS;Mn;230;NSM;0313;;;;N;;;;; +0344;COMBINING GREEK DIALYTIKA TONOS;Mn;230;NSM;0308 0301;;;;N;GREEK NON-SPACING DIAERESIS TONOS;;;; +0345;COMBINING GREEK YPOGEGRAMMENI;Mn;240;NSM;;;;;N;GREEK NON-SPACING IOTA BELOW;;0399;;0399 +0346;COMBINING BRIDGE ABOVE;Mn;230;NSM;;;;;N;;;;; +0347;COMBINING EQUALS SIGN BELOW;Mn;220;NSM;;;;;N;;;;; +0348;COMBINING DOUBLE VERTICAL LINE BELOW;Mn;220;NSM;;;;;N;;;;; +0349;COMBINING LEFT ANGLE BELOW;Mn;220;NSM;;;;;N;;;;; +034A;COMBINING NOT TILDE ABOVE;Mn;230;NSM;;;;;N;;;;; +034B;COMBINING HOMOTHETIC ABOVE;Mn;230;NSM;;;;;N;;;;; +034C;COMBINING ALMOST EQUAL TO ABOVE;Mn;230;NSM;;;;;N;;;;; +034D;COMBINING LEFT RIGHT ARROW BELOW;Mn;220;NSM;;;;;N;;;;; +034E;COMBINING UPWARDS ARROW BELOW;Mn;220;NSM;;;;;N;;;;; +034F;COMBINING GRAPHEME JOINER;Mn;0;NSM;;;;;N;;;;; +0350;COMBINING RIGHT ARROWHEAD ABOVE;Mn;230;NSM;;;;;N;;;;; +0351;COMBINING LEFT HALF RING ABOVE;Mn;230;NSM;;;;;N;;;;; +0352;COMBINING FERMATA;Mn;230;NSM;;;;;N;;;;; +0353;COMBINING X BELOW;Mn;220;NSM;;;;;N;;;;; +0354;COMBINING LEFT ARROWHEAD BELOW;Mn;220;NSM;;;;;N;;;;; +0355;COMBINING RIGHT ARROWHEAD BELOW;Mn;220;NSM;;;;;N;;;;; +0356;COMBINING RIGHT ARROWHEAD AND UP ARROWHEAD BELOW;Mn;220;NSM;;;;;N;;;;; +0357;COMBINING RIGHT HALF RING ABOVE;Mn;230;NSM;;;;;N;;;;; +0358;COMBINING DOT ABOVE RIGHT;Mn;232;NSM;;;;;N;;;;; +0359;COMBINING ASTERISK BELOW;Mn;220;NSM;;;;;N;;;;; +035A;COMBINING DOUBLE RING BELOW;Mn;220;NSM;;;;;N;;;;; +035B;COMBINING ZIGZAG ABOVE;Mn;230;NSM;;;;;N;;;;; +035C;COMBINING DOUBLE BREVE BELOW;Mn;233;NSM;;;;;N;;;;; +035D;COMBINING DOUBLE BREVE;Mn;234;NSM;;;;;N;;;;; +035E;COMBINING DOUBLE MACRON;Mn;234;NSM;;;;;N;;;;; +035F;COMBINING DOUBLE MACRON BELOW;Mn;233;NSM;;;;;N;;;;; +0360;COMBINING DOUBLE TILDE;Mn;234;NSM;;;;;N;;;;; +0361;COMBINING DOUBLE INVERTED BREVE;Mn;234;NSM;;;;;N;;;;; +0362;COMBINING DOUBLE RIGHTWARDS ARROW BELOW;Mn;233;NSM;;;;;N;;;;; +0363;COMBINING LATIN SMALL LETTER A;Mn;230;NSM;;;;;N;;;;; +0364;COMBINING LATIN SMALL LETTER E;Mn;230;NSM;;;;;N;;;;; +0365;COMBINING LATIN SMALL LETTER I;Mn;230;NSM;;;;;N;;;;; +0366;COMBINING LATIN SMALL LETTER O;Mn;230;NSM;;;;;N;;;;; +0367;COMBINING LATIN SMALL LETTER U;Mn;230;NSM;;;;;N;;;;; +0368;COMBINING LATIN SMALL LETTER C;Mn;230;NSM;;;;;N;;;;; +0369;COMBINING LATIN SMALL LETTER D;Mn;230;NSM;;;;;N;;;;; +036A;COMBINING LATIN SMALL LETTER H;Mn;230;NSM;;;;;N;;;;; +036B;COMBINING LATIN SMALL LETTER M;Mn;230;NSM;;;;;N;;;;; +036C;COMBINING LATIN SMALL LETTER R;Mn;230;NSM;;;;;N;;;;; +036D;COMBINING LATIN SMALL LETTER T;Mn;230;NSM;;;;;N;;;;; +036E;COMBINING LATIN SMALL LETTER V;Mn;230;NSM;;;;;N;;;;; +036F;COMBINING LATIN SMALL LETTER X;Mn;230;NSM;;;;;N;;;;; +0370;GREEK CAPITAL LETTER HETA;Lu;0;L;;;;;N;;;;0371; +0371;GREEK SMALL LETTER HETA;Ll;0;L;;;;;N;;;0370;;0370 +0372;GREEK CAPITAL LETTER ARCHAIC SAMPI;Lu;0;L;;;;;N;;;;0373; +0373;GREEK SMALL LETTER ARCHAIC SAMPI;Ll;0;L;;;;;N;;;0372;;0372 +0374;GREEK NUMERAL SIGN;Lm;0;ON;02B9;;;;N;GREEK UPPER NUMERAL SIGN;;;; +0375;GREEK LOWER NUMERAL SIGN;Sk;0;ON;;;;;N;;;;; +0376;GREEK CAPITAL LETTER PAMPHYLIAN DIGAMMA;Lu;0;L;;;;;N;;;;0377; +0377;GREEK SMALL LETTER PAMPHYLIAN DIGAMMA;Ll;0;L;;;;;N;;;0376;;0376 +037A;GREEK YPOGEGRAMMENI;Lm;0;L; 0020 0345;;;;N;GREEK SPACING IOTA BELOW;;;; +037B;GREEK SMALL REVERSED LUNATE SIGMA SYMBOL;Ll;0;L;;;;;N;;;03FD;;03FD +037C;GREEK SMALL DOTTED LUNATE SIGMA SYMBOL;Ll;0;L;;;;;N;;;03FE;;03FE +037D;GREEK SMALL REVERSED DOTTED LUNATE SIGMA SYMBOL;Ll;0;L;;;;;N;;;03FF;;03FF +037E;GREEK QUESTION MARK;Po;0;ON;003B;;;;N;;;;; +037F;GREEK CAPITAL LETTER YOT;Lu;0;L;;;;;N;;;;03F3; +0384;GREEK TONOS;Sk;0;ON; 0020 0301;;;;N;GREEK SPACING TONOS;;;; +0385;GREEK DIALYTIKA TONOS;Sk;0;ON;00A8 0301;;;;N;GREEK SPACING DIAERESIS TONOS;;;; +0386;GREEK CAPITAL LETTER ALPHA WITH TONOS;Lu;0;L;0391 0301;;;;N;GREEK CAPITAL LETTER ALPHA TONOS;;;03AC; +0387;GREEK ANO TELEIA;Po;0;ON;00B7;;;;N;;;;; +0388;GREEK CAPITAL LETTER EPSILON WITH TONOS;Lu;0;L;0395 0301;;;;N;GREEK CAPITAL LETTER EPSILON TONOS;;;03AD; +0389;GREEK CAPITAL LETTER ETA WITH TONOS;Lu;0;L;0397 0301;;;;N;GREEK CAPITAL LETTER ETA TONOS;;;03AE; +038A;GREEK CAPITAL LETTER IOTA WITH TONOS;Lu;0;L;0399 0301;;;;N;GREEK CAPITAL LETTER IOTA TONOS;;;03AF; +038C;GREEK CAPITAL LETTER OMICRON WITH TONOS;Lu;0;L;039F 0301;;;;N;GREEK CAPITAL LETTER OMICRON TONOS;;;03CC; +038E;GREEK CAPITAL LETTER UPSILON WITH TONOS;Lu;0;L;03A5 0301;;;;N;GREEK CAPITAL LETTER UPSILON TONOS;;;03CD; +038F;GREEK CAPITAL LETTER OMEGA WITH TONOS;Lu;0;L;03A9 0301;;;;N;GREEK CAPITAL LETTER OMEGA TONOS;;;03CE; +0390;GREEK SMALL LETTER IOTA WITH DIALYTIKA AND TONOS;Ll;0;L;03CA 0301;;;;N;GREEK SMALL LETTER IOTA DIAERESIS TONOS;;;; +0391;GREEK CAPITAL LETTER ALPHA;Lu;0;L;;;;;N;;;;03B1; +0392;GREEK CAPITAL LETTER BETA;Lu;0;L;;;;;N;;;;03B2; +0393;GREEK CAPITAL LETTER GAMMA;Lu;0;L;;;;;N;;;;03B3; +0394;GREEK CAPITAL LETTER DELTA;Lu;0;L;;;;;N;;;;03B4; +0395;GREEK CAPITAL LETTER EPSILON;Lu;0;L;;;;;N;;;;03B5; +0396;GREEK CAPITAL LETTER ZETA;Lu;0;L;;;;;N;;;;03B6; +0397;GREEK CAPITAL LETTER ETA;Lu;0;L;;;;;N;;;;03B7; +0398;GREEK CAPITAL LETTER THETA;Lu;0;L;;;;;N;;;;03B8; +0399;GREEK CAPITAL LETTER IOTA;Lu;0;L;;;;;N;;;;03B9; +039A;GREEK CAPITAL LETTER KAPPA;Lu;0;L;;;;;N;;;;03BA; +039B;GREEK CAPITAL LETTER LAMDA;Lu;0;L;;;;;N;GREEK CAPITAL LETTER LAMBDA;;;03BB; +039C;GREEK CAPITAL LETTER MU;Lu;0;L;;;;;N;;;;03BC; +039D;GREEK CAPITAL LETTER NU;Lu;0;L;;;;;N;;;;03BD; +039E;GREEK CAPITAL LETTER XI;Lu;0;L;;;;;N;;;;03BE; +039F;GREEK CAPITAL LETTER OMICRON;Lu;0;L;;;;;N;;;;03BF; +03A0;GREEK CAPITAL LETTER PI;Lu;0;L;;;;;N;;;;03C0; +03A1;GREEK CAPITAL LETTER RHO;Lu;0;L;;;;;N;;;;03C1; +03A3;GREEK CAPITAL LETTER SIGMA;Lu;0;L;;;;;N;;;;03C3; +03A4;GREEK CAPITAL LETTER TAU;Lu;0;L;;;;;N;;;;03C4; +03A5;GREEK CAPITAL LETTER UPSILON;Lu;0;L;;;;;N;;;;03C5; +03A6;GREEK CAPITAL LETTER PHI;Lu;0;L;;;;;N;;;;03C6; +03A7;GREEK CAPITAL LETTER CHI;Lu;0;L;;;;;N;;;;03C7; +03A8;GREEK CAPITAL LETTER PSI;Lu;0;L;;;;;N;;;;03C8; +03A9;GREEK CAPITAL LETTER OMEGA;Lu;0;L;;;;;N;;;;03C9; +03AA;GREEK CAPITAL LETTER IOTA WITH DIALYTIKA;Lu;0;L;0399 0308;;;;N;GREEK CAPITAL LETTER IOTA DIAERESIS;;;03CA; +03AB;GREEK CAPITAL LETTER UPSILON WITH DIALYTIKA;Lu;0;L;03A5 0308;;;;N;GREEK CAPITAL LETTER UPSILON DIAERESIS;;;03CB; +03AC;GREEK SMALL LETTER ALPHA WITH TONOS;Ll;0;L;03B1 0301;;;;N;GREEK SMALL LETTER ALPHA TONOS;;0386;;0386 +03AD;GREEK SMALL LETTER EPSILON WITH TONOS;Ll;0;L;03B5 0301;;;;N;GREEK SMALL LETTER EPSILON TONOS;;0388;;0388 +03AE;GREEK SMALL LETTER ETA WITH TONOS;Ll;0;L;03B7 0301;;;;N;GREEK SMALL LETTER ETA TONOS;;0389;;0389 +03AF;GREEK SMALL LETTER IOTA WITH TONOS;Ll;0;L;03B9 0301;;;;N;GREEK SMALL LETTER IOTA TONOS;;038A;;038A +03B0;GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND TONOS;Ll;0;L;03CB 0301;;;;N;GREEK SMALL LETTER UPSILON DIAERESIS TONOS;;;; +03B1;GREEK SMALL LETTER ALPHA;Ll;0;L;;;;;N;;;0391;;0391 +03B2;GREEK SMALL LETTER BETA;Ll;0;L;;;;;N;;;0392;;0392 +03B3;GREEK SMALL LETTER GAMMA;Ll;0;L;;;;;N;;;0393;;0393 +03B4;GREEK SMALL LETTER DELTA;Ll;0;L;;;;;N;;;0394;;0394 +03B5;GREEK SMALL LETTER EPSILON;Ll;0;L;;;;;N;;;0395;;0395 +03B6;GREEK SMALL LETTER ZETA;Ll;0;L;;;;;N;;;0396;;0396 +03B7;GREEK SMALL LETTER ETA;Ll;0;L;;;;;N;;;0397;;0397 +03B8;GREEK SMALL LETTER THETA;Ll;0;L;;;;;N;;;0398;;0398 +03B9;GREEK SMALL LETTER IOTA;Ll;0;L;;;;;N;;;0399;;0399 +03BA;GREEK SMALL LETTER KAPPA;Ll;0;L;;;;;N;;;039A;;039A +03BB;GREEK SMALL LETTER LAMDA;Ll;0;L;;;;;N;GREEK SMALL LETTER LAMBDA;;039B;;039B +03BC;GREEK SMALL LETTER MU;Ll;0;L;;;;;N;;;039C;;039C +03BD;GREEK SMALL LETTER NU;Ll;0;L;;;;;N;;;039D;;039D +03BE;GREEK SMALL LETTER XI;Ll;0;L;;;;;N;;;039E;;039E +03BF;GREEK SMALL LETTER OMICRON;Ll;0;L;;;;;N;;;039F;;039F +03C0;GREEK SMALL LETTER PI;Ll;0;L;;;;;N;;;03A0;;03A0 +03C1;GREEK SMALL LETTER RHO;Ll;0;L;;;;;N;;;03A1;;03A1 +03C2;GREEK SMALL LETTER FINAL SIGMA;Ll;0;L;;;;;N;;;03A3;;03A3 +03C3;GREEK SMALL LETTER SIGMA;Ll;0;L;;;;;N;;;03A3;;03A3 +03C4;GREEK SMALL LETTER TAU;Ll;0;L;;;;;N;;;03A4;;03A4 +03C5;GREEK SMALL LETTER UPSILON;Ll;0;L;;;;;N;;;03A5;;03A5 +03C6;GREEK SMALL LETTER PHI;Ll;0;L;;;;;N;;;03A6;;03A6 +03C7;GREEK SMALL LETTER CHI;Ll;0;L;;;;;N;;;03A7;;03A7 +03C8;GREEK SMALL LETTER PSI;Ll;0;L;;;;;N;;;03A8;;03A8 +03C9;GREEK SMALL LETTER OMEGA;Ll;0;L;;;;;N;;;03A9;;03A9 +03CA;GREEK SMALL LETTER IOTA WITH DIALYTIKA;Ll;0;L;03B9 0308;;;;N;GREEK SMALL LETTER IOTA DIAERESIS;;03AA;;03AA +03CB;GREEK SMALL LETTER UPSILON WITH DIALYTIKA;Ll;0;L;03C5 0308;;;;N;GREEK SMALL LETTER UPSILON DIAERESIS;;03AB;;03AB +03CC;GREEK SMALL LETTER OMICRON WITH TONOS;Ll;0;L;03BF 0301;;;;N;GREEK SMALL LETTER OMICRON TONOS;;038C;;038C +03CD;GREEK SMALL LETTER UPSILON WITH TONOS;Ll;0;L;03C5 0301;;;;N;GREEK SMALL LETTER UPSILON TONOS;;038E;;038E +03CE;GREEK SMALL LETTER OMEGA WITH TONOS;Ll;0;L;03C9 0301;;;;N;GREEK SMALL LETTER OMEGA TONOS;;038F;;038F +03CF;GREEK CAPITAL KAI SYMBOL;Lu;0;L;;;;;N;;;;03D7; +03D0;GREEK BETA SYMBOL;Ll;0;L; 03B2;;;;N;GREEK SMALL LETTER CURLED BETA;;0392;;0392 +03D1;GREEK THETA SYMBOL;Ll;0;L; 03B8;;;;N;GREEK SMALL LETTER SCRIPT THETA;;0398;;0398 +03D2;GREEK UPSILON WITH HOOK SYMBOL;Lu;0;L; 03A5;;;;N;GREEK CAPITAL LETTER UPSILON HOOK;;;; +03D3;GREEK UPSILON WITH ACUTE AND HOOK SYMBOL;Lu;0;L;03D2 0301;;;;N;GREEK CAPITAL LETTER UPSILON HOOK TONOS;;;; +03D4;GREEK UPSILON WITH DIAERESIS AND HOOK SYMBOL;Lu;0;L;03D2 0308;;;;N;GREEK CAPITAL LETTER UPSILON HOOK DIAERESIS;;;; +03D5;GREEK PHI SYMBOL;Ll;0;L; 03C6;;;;N;GREEK SMALL LETTER SCRIPT PHI;;03A6;;03A6 +03D6;GREEK PI SYMBOL;Ll;0;L; 03C0;;;;N;GREEK SMALL LETTER OMEGA PI;;03A0;;03A0 +03D7;GREEK KAI SYMBOL;Ll;0;L;;;;;N;;;03CF;;03CF +03D8;GREEK LETTER ARCHAIC KOPPA;Lu;0;L;;;;;N;;;;03D9; +03D9;GREEK SMALL LETTER ARCHAIC KOPPA;Ll;0;L;;;;;N;;;03D8;;03D8 +03DA;GREEK LETTER STIGMA;Lu;0;L;;;;;N;GREEK CAPITAL LETTER STIGMA;;;03DB; +03DB;GREEK SMALL LETTER STIGMA;Ll;0;L;;;;;N;;;03DA;;03DA +03DC;GREEK LETTER DIGAMMA;Lu;0;L;;;;;N;GREEK CAPITAL LETTER DIGAMMA;;;03DD; +03DD;GREEK SMALL LETTER DIGAMMA;Ll;0;L;;;;;N;;;03DC;;03DC +03DE;GREEK LETTER KOPPA;Lu;0;L;;;;;N;GREEK CAPITAL LETTER KOPPA;;;03DF; +03DF;GREEK SMALL LETTER KOPPA;Ll;0;L;;;;;N;;;03DE;;03DE +03E0;GREEK LETTER SAMPI;Lu;0;L;;;;;N;GREEK CAPITAL LETTER SAMPI;;;03E1; +03E1;GREEK SMALL LETTER SAMPI;Ll;0;L;;;;;N;;;03E0;;03E0 +03E2;COPTIC CAPITAL LETTER SHEI;Lu;0;L;;;;;N;GREEK CAPITAL LETTER SHEI;;;03E3; +03E3;COPTIC SMALL LETTER SHEI;Ll;0;L;;;;;N;GREEK SMALL LETTER SHEI;;03E2;;03E2 +03E4;COPTIC CAPITAL LETTER FEI;Lu;0;L;;;;;N;GREEK CAPITAL LETTER FEI;;;03E5; +03E5;COPTIC SMALL LETTER FEI;Ll;0;L;;;;;N;GREEK SMALL LETTER FEI;;03E4;;03E4 +03E6;COPTIC CAPITAL LETTER KHEI;Lu;0;L;;;;;N;GREEK CAPITAL LETTER KHEI;;;03E7; +03E7;COPTIC SMALL LETTER KHEI;Ll;0;L;;;;;N;GREEK SMALL LETTER KHEI;;03E6;;03E6 +03E8;COPTIC CAPITAL LETTER HORI;Lu;0;L;;;;;N;GREEK CAPITAL LETTER HORI;;;03E9; +03E9;COPTIC SMALL LETTER HORI;Ll;0;L;;;;;N;GREEK SMALL LETTER HORI;;03E8;;03E8 +03EA;COPTIC CAPITAL LETTER GANGIA;Lu;0;L;;;;;N;GREEK CAPITAL LETTER GANGIA;;;03EB; +03EB;COPTIC SMALL LETTER GANGIA;Ll;0;L;;;;;N;GREEK SMALL LETTER GANGIA;;03EA;;03EA +03EC;COPTIC CAPITAL LETTER SHIMA;Lu;0;L;;;;;N;GREEK CAPITAL LETTER SHIMA;;;03ED; +03ED;COPTIC SMALL LETTER SHIMA;Ll;0;L;;;;;N;GREEK SMALL LETTER SHIMA;;03EC;;03EC +03EE;COPTIC CAPITAL LETTER DEI;Lu;0;L;;;;;N;GREEK CAPITAL LETTER DEI;;;03EF; +03EF;COPTIC SMALL LETTER DEI;Ll;0;L;;;;;N;GREEK SMALL LETTER DEI;;03EE;;03EE +03F0;GREEK KAPPA SYMBOL;Ll;0;L; 03BA;;;;N;GREEK SMALL LETTER SCRIPT KAPPA;;039A;;039A +03F1;GREEK RHO SYMBOL;Ll;0;L; 03C1;;;;N;GREEK SMALL LETTER TAILED RHO;;03A1;;03A1 +03F2;GREEK LUNATE SIGMA SYMBOL;Ll;0;L; 03C2;;;;N;GREEK SMALL LETTER LUNATE SIGMA;;03F9;;03F9 +03F3;GREEK LETTER YOT;Ll;0;L;;;;;N;;;037F;;037F +03F4;GREEK CAPITAL THETA SYMBOL;Lu;0;L; 0398;;;;N;;;;03B8; +03F5;GREEK LUNATE EPSILON SYMBOL;Ll;0;L; 03B5;;;;N;;;0395;;0395 +03F6;GREEK REVERSED LUNATE EPSILON SYMBOL;Sm;0;ON;;;;;N;;;;; +03F7;GREEK CAPITAL LETTER SHO;Lu;0;L;;;;;N;;;;03F8; +03F8;GREEK SMALL LETTER SHO;Ll;0;L;;;;;N;;;03F7;;03F7 +03F9;GREEK CAPITAL LUNATE SIGMA SYMBOL;Lu;0;L; 03A3;;;;N;;;;03F2; +03FA;GREEK CAPITAL LETTER SAN;Lu;0;L;;;;;N;;;;03FB; +03FB;GREEK SMALL LETTER SAN;Ll;0;L;;;;;N;;;03FA;;03FA +03FC;GREEK RHO WITH STROKE SYMBOL;Ll;0;L;;;;;N;;;;; +03FD;GREEK CAPITAL REVERSED LUNATE SIGMA SYMBOL;Lu;0;L;;;;;N;;;;037B; +03FE;GREEK CAPITAL DOTTED LUNATE SIGMA SYMBOL;Lu;0;L;;;;;N;;;;037C; +03FF;GREEK CAPITAL REVERSED DOTTED LUNATE SIGMA SYMBOL;Lu;0;L;;;;;N;;;;037D; +0400;CYRILLIC CAPITAL LETTER IE WITH GRAVE;Lu;0;L;0415 0300;;;;N;;;;0450; +0401;CYRILLIC CAPITAL LETTER IO;Lu;0;L;0415 0308;;;;N;;;;0451; +0402;CYRILLIC CAPITAL LETTER DJE;Lu;0;L;;;;;N;;;;0452; +0403;CYRILLIC CAPITAL LETTER GJE;Lu;0;L;0413 0301;;;;N;;;;0453; +0404;CYRILLIC CAPITAL LETTER UKRAINIAN IE;Lu;0;L;;;;;N;CYRILLIC CAPITAL LETTER E;;;0454; +0405;CYRILLIC CAPITAL LETTER DZE;Lu;0;L;;;;;N;;;;0455; +0406;CYRILLIC CAPITAL LETTER BYELORUSSIAN-UKRAINIAN I;Lu;0;L;;;;;N;CYRILLIC CAPITAL LETTER I;;;0456; +0407;CYRILLIC CAPITAL LETTER YI;Lu;0;L;0406 0308;;;;N;;;;0457; +0408;CYRILLIC CAPITAL LETTER JE;Lu;0;L;;;;;N;;;;0458; +0409;CYRILLIC CAPITAL LETTER LJE;Lu;0;L;;;;;N;;;;0459; +040A;CYRILLIC CAPITAL LETTER NJE;Lu;0;L;;;;;N;;;;045A; +040B;CYRILLIC CAPITAL LETTER TSHE;Lu;0;L;;;;;N;;;;045B; +040C;CYRILLIC CAPITAL LETTER KJE;Lu;0;L;041A 0301;;;;N;;;;045C; +040D;CYRILLIC CAPITAL LETTER I WITH GRAVE;Lu;0;L;0418 0300;;;;N;;;;045D; +040E;CYRILLIC CAPITAL LETTER SHORT U;Lu;0;L;0423 0306;;;;N;;;;045E; +040F;CYRILLIC CAPITAL LETTER DZHE;Lu;0;L;;;;;N;;;;045F; +0410;CYRILLIC CAPITAL LETTER A;Lu;0;L;;;;;N;;;;0430; +0411;CYRILLIC CAPITAL LETTER BE;Lu;0;L;;;;;N;;;;0431; +0412;CYRILLIC CAPITAL LETTER VE;Lu;0;L;;;;;N;;;;0432; +0413;CYRILLIC CAPITAL LETTER GHE;Lu;0;L;;;;;N;CYRILLIC CAPITAL LETTER GE;;;0433; +0414;CYRILLIC CAPITAL LETTER DE;Lu;0;L;;;;;N;;;;0434; +0415;CYRILLIC CAPITAL LETTER IE;Lu;0;L;;;;;N;;;;0435; +0416;CYRILLIC CAPITAL LETTER ZHE;Lu;0;L;;;;;N;;;;0436; +0417;CYRILLIC CAPITAL LETTER ZE;Lu;0;L;;;;;N;;;;0437; +0418;CYRILLIC CAPITAL LETTER I;Lu;0;L;;;;;N;CYRILLIC CAPITAL LETTER II;;;0438; +0419;CYRILLIC CAPITAL LETTER SHORT I;Lu;0;L;0418 0306;;;;N;CYRILLIC CAPITAL LETTER SHORT II;;;0439; +041A;CYRILLIC CAPITAL LETTER KA;Lu;0;L;;;;;N;;;;043A; +041B;CYRILLIC CAPITAL LETTER EL;Lu;0;L;;;;;N;;;;043B; +041C;CYRILLIC CAPITAL LETTER EM;Lu;0;L;;;;;N;;;;043C; +041D;CYRILLIC CAPITAL LETTER EN;Lu;0;L;;;;;N;;;;043D; +041E;CYRILLIC CAPITAL LETTER O;Lu;0;L;;;;;N;;;;043E; +041F;CYRILLIC CAPITAL LETTER PE;Lu;0;L;;;;;N;;;;043F; +0420;CYRILLIC CAPITAL LETTER ER;Lu;0;L;;;;;N;;;;0440; +0421;CYRILLIC CAPITAL LETTER ES;Lu;0;L;;;;;N;;;;0441; +0422;CYRILLIC CAPITAL LETTER TE;Lu;0;L;;;;;N;;;;0442; +0423;CYRILLIC CAPITAL LETTER U;Lu;0;L;;;;;N;;;;0443; +0424;CYRILLIC CAPITAL LETTER EF;Lu;0;L;;;;;N;;;;0444; +0425;CYRILLIC CAPITAL LETTER HA;Lu;0;L;;;;;N;CYRILLIC CAPITAL LETTER KHA;;;0445; +0426;CYRILLIC CAPITAL LETTER TSE;Lu;0;L;;;;;N;;;;0446; +0427;CYRILLIC CAPITAL LETTER CHE;Lu;0;L;;;;;N;;;;0447; +0428;CYRILLIC CAPITAL LETTER SHA;Lu;0;L;;;;;N;;;;0448; +0429;CYRILLIC CAPITAL LETTER SHCHA;Lu;0;L;;;;;N;;;;0449; +042A;CYRILLIC CAPITAL LETTER HARD SIGN;Lu;0;L;;;;;N;;;;044A; +042B;CYRILLIC CAPITAL LETTER YERU;Lu;0;L;;;;;N;CYRILLIC CAPITAL LETTER YERI;;;044B; +042C;CYRILLIC CAPITAL LETTER SOFT SIGN;Lu;0;L;;;;;N;;;;044C; +042D;CYRILLIC CAPITAL LETTER E;Lu;0;L;;;;;N;CYRILLIC CAPITAL LETTER REVERSED E;;;044D; +042E;CYRILLIC CAPITAL LETTER YU;Lu;0;L;;;;;N;CYRILLIC CAPITAL LETTER IU;;;044E; +042F;CYRILLIC CAPITAL LETTER YA;Lu;0;L;;;;;N;CYRILLIC CAPITAL LETTER IA;;;044F; +0430;CYRILLIC SMALL LETTER A;Ll;0;L;;;;;N;;;0410;;0410 +0431;CYRILLIC SMALL LETTER BE;Ll;0;L;;;;;N;;;0411;;0411 +0432;CYRILLIC SMALL LETTER VE;Ll;0;L;;;;;N;;;0412;;0412 +0433;CYRILLIC SMALL LETTER GHE;Ll;0;L;;;;;N;CYRILLIC SMALL LETTER GE;;0413;;0413 +0434;CYRILLIC SMALL LETTER DE;Ll;0;L;;;;;N;;;0414;;0414 +0435;CYRILLIC SMALL LETTER IE;Ll;0;L;;;;;N;;;0415;;0415 +0436;CYRILLIC SMALL LETTER ZHE;Ll;0;L;;;;;N;;;0416;;0416 +0437;CYRILLIC SMALL LETTER ZE;Ll;0;L;;;;;N;;;0417;;0417 +0438;CYRILLIC SMALL LETTER I;Ll;0;L;;;;;N;CYRILLIC SMALL LETTER II;;0418;;0418 +0439;CYRILLIC SMALL LETTER SHORT I;Ll;0;L;0438 0306;;;;N;CYRILLIC SMALL LETTER SHORT II;;0419;;0419 +043A;CYRILLIC SMALL LETTER KA;Ll;0;L;;;;;N;;;041A;;041A +043B;CYRILLIC SMALL LETTER EL;Ll;0;L;;;;;N;;;041B;;041B +043C;CYRILLIC SMALL LETTER EM;Ll;0;L;;;;;N;;;041C;;041C +043D;CYRILLIC SMALL LETTER EN;Ll;0;L;;;;;N;;;041D;;041D +043E;CYRILLIC SMALL LETTER O;Ll;0;L;;;;;N;;;041E;;041E +043F;CYRILLIC SMALL LETTER PE;Ll;0;L;;;;;N;;;041F;;041F +0440;CYRILLIC SMALL LETTER ER;Ll;0;L;;;;;N;;;0420;;0420 +0441;CYRILLIC SMALL LETTER ES;Ll;0;L;;;;;N;;;0421;;0421 +0442;CYRILLIC SMALL LETTER TE;Ll;0;L;;;;;N;;;0422;;0422 +0443;CYRILLIC SMALL LETTER U;Ll;0;L;;;;;N;;;0423;;0423 +0444;CYRILLIC SMALL LETTER EF;Ll;0;L;;;;;N;;;0424;;0424 +0445;CYRILLIC SMALL LETTER HA;Ll;0;L;;;;;N;CYRILLIC SMALL LETTER KHA;;0425;;0425 +0446;CYRILLIC SMALL LETTER TSE;Ll;0;L;;;;;N;;;0426;;0426 +0447;CYRILLIC SMALL LETTER CHE;Ll;0;L;;;;;N;;;0427;;0427 +0448;CYRILLIC SMALL LETTER SHA;Ll;0;L;;;;;N;;;0428;;0428 +0449;CYRILLIC SMALL LETTER SHCHA;Ll;0;L;;;;;N;;;0429;;0429 +044A;CYRILLIC SMALL LETTER HARD SIGN;Ll;0;L;;;;;N;;;042A;;042A +044B;CYRILLIC SMALL LETTER YERU;Ll;0;L;;;;;N;CYRILLIC SMALL LETTER YERI;;042B;;042B +044C;CYRILLIC SMALL LETTER SOFT SIGN;Ll;0;L;;;;;N;;;042C;;042C +044D;CYRILLIC SMALL LETTER E;Ll;0;L;;;;;N;CYRILLIC SMALL LETTER REVERSED E;;042D;;042D +044E;CYRILLIC SMALL LETTER YU;Ll;0;L;;;;;N;CYRILLIC SMALL LETTER IU;;042E;;042E +044F;CYRILLIC SMALL LETTER YA;Ll;0;L;;;;;N;CYRILLIC SMALL LETTER IA;;042F;;042F +0450;CYRILLIC SMALL LETTER IE WITH GRAVE;Ll;0;L;0435 0300;;;;N;;;0400;;0400 +0451;CYRILLIC SMALL LETTER IO;Ll;0;L;0435 0308;;;;N;;;0401;;0401 +0452;CYRILLIC SMALL LETTER DJE;Ll;0;L;;;;;N;;;0402;;0402 +0453;CYRILLIC SMALL LETTER GJE;Ll;0;L;0433 0301;;;;N;;;0403;;0403 +0454;CYRILLIC SMALL LETTER UKRAINIAN IE;Ll;0;L;;;;;N;CYRILLIC SMALL LETTER E;;0404;;0404 +0455;CYRILLIC SMALL LETTER DZE;Ll;0;L;;;;;N;;;0405;;0405 +0456;CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I;Ll;0;L;;;;;N;CYRILLIC SMALL LETTER I;;0406;;0406 +0457;CYRILLIC SMALL LETTER YI;Ll;0;L;0456 0308;;;;N;;;0407;;0407 +0458;CYRILLIC SMALL LETTER JE;Ll;0;L;;;;;N;;;0408;;0408 +0459;CYRILLIC SMALL LETTER LJE;Ll;0;L;;;;;N;;;0409;;0409 +045A;CYRILLIC SMALL LETTER NJE;Ll;0;L;;;;;N;;;040A;;040A +045B;CYRILLIC SMALL LETTER TSHE;Ll;0;L;;;;;N;;;040B;;040B +045C;CYRILLIC SMALL LETTER KJE;Ll;0;L;043A 0301;;;;N;;;040C;;040C +045D;CYRILLIC SMALL LETTER I WITH GRAVE;Ll;0;L;0438 0300;;;;N;;;040D;;040D +045E;CYRILLIC SMALL LETTER SHORT U;Ll;0;L;0443 0306;;;;N;;;040E;;040E +045F;CYRILLIC SMALL LETTER DZHE;Ll;0;L;;;;;N;;;040F;;040F +0460;CYRILLIC CAPITAL LETTER OMEGA;Lu;0;L;;;;;N;;;;0461; +0461;CYRILLIC SMALL LETTER OMEGA;Ll;0;L;;;;;N;;;0460;;0460 +0462;CYRILLIC CAPITAL LETTER YAT;Lu;0;L;;;;;N;;;;0463; +0463;CYRILLIC SMALL LETTER YAT;Ll;0;L;;;;;N;;;0462;;0462 +0464;CYRILLIC CAPITAL LETTER IOTIFIED E;Lu;0;L;;;;;N;;;;0465; +0465;CYRILLIC SMALL LETTER IOTIFIED E;Ll;0;L;;;;;N;;;0464;;0464 +0466;CYRILLIC CAPITAL LETTER LITTLE YUS;Lu;0;L;;;;;N;;;;0467; +0467;CYRILLIC SMALL LETTER LITTLE YUS;Ll;0;L;;;;;N;;;0466;;0466 +0468;CYRILLIC CAPITAL LETTER IOTIFIED LITTLE YUS;Lu;0;L;;;;;N;;;;0469; +0469;CYRILLIC SMALL LETTER IOTIFIED LITTLE YUS;Ll;0;L;;;;;N;;;0468;;0468 +046A;CYRILLIC CAPITAL LETTER BIG YUS;Lu;0;L;;;;;N;;;;046B; +046B;CYRILLIC SMALL LETTER BIG YUS;Ll;0;L;;;;;N;;;046A;;046A +046C;CYRILLIC CAPITAL LETTER IOTIFIED BIG YUS;Lu;0;L;;;;;N;;;;046D; +046D;CYRILLIC SMALL LETTER IOTIFIED BIG YUS;Ll;0;L;;;;;N;;;046C;;046C +046E;CYRILLIC CAPITAL LETTER KSI;Lu;0;L;;;;;N;;;;046F; +046F;CYRILLIC SMALL LETTER KSI;Ll;0;L;;;;;N;;;046E;;046E +0470;CYRILLIC CAPITAL LETTER PSI;Lu;0;L;;;;;N;;;;0471; +0471;CYRILLIC SMALL LETTER PSI;Ll;0;L;;;;;N;;;0470;;0470 +0472;CYRILLIC CAPITAL LETTER FITA;Lu;0;L;;;;;N;;;;0473; +0473;CYRILLIC SMALL LETTER FITA;Ll;0;L;;;;;N;;;0472;;0472 +0474;CYRILLIC CAPITAL LETTER IZHITSA;Lu;0;L;;;;;N;;;;0475; +0475;CYRILLIC SMALL LETTER IZHITSA;Ll;0;L;;;;;N;;;0474;;0474 +0476;CYRILLIC CAPITAL LETTER IZHITSA WITH DOUBLE GRAVE ACCENT;Lu;0;L;0474 030F;;;;N;CYRILLIC CAPITAL LETTER IZHITSA DOUBLE GRAVE;;;0477; +0477;CYRILLIC SMALL LETTER IZHITSA WITH DOUBLE GRAVE ACCENT;Ll;0;L;0475 030F;;;;N;CYRILLIC SMALL LETTER IZHITSA DOUBLE GRAVE;;0476;;0476 +0478;CYRILLIC CAPITAL LETTER UK;Lu;0;L;;;;;N;CYRILLIC CAPITAL LETTER UK DIGRAPH;;;0479; +0479;CYRILLIC SMALL LETTER UK;Ll;0;L;;;;;N;CYRILLIC SMALL LETTER UK DIGRAPH;;0478;;0478 +047A;CYRILLIC CAPITAL LETTER ROUND OMEGA;Lu;0;L;;;;;N;;;;047B; +047B;CYRILLIC SMALL LETTER ROUND OMEGA;Ll;0;L;;;;;N;;;047A;;047A +047C;CYRILLIC CAPITAL LETTER OMEGA WITH TITLO;Lu;0;L;;;;;N;CYRILLIC CAPITAL LETTER OMEGA TITLO;;;047D; +047D;CYRILLIC SMALL LETTER OMEGA WITH TITLO;Ll;0;L;;;;;N;CYRILLIC SMALL LETTER OMEGA TITLO;;047C;;047C +047E;CYRILLIC CAPITAL LETTER OT;Lu;0;L;;;;;N;;;;047F; +047F;CYRILLIC SMALL LETTER OT;Ll;0;L;;;;;N;;;047E;;047E +0480;CYRILLIC CAPITAL LETTER KOPPA;Lu;0;L;;;;;N;;;;0481; +0481;CYRILLIC SMALL LETTER KOPPA;Ll;0;L;;;;;N;;;0480;;0480 +0482;CYRILLIC THOUSANDS SIGN;So;0;L;;;;;N;;;;; +0483;COMBINING CYRILLIC TITLO;Mn;230;NSM;;;;;N;CYRILLIC NON-SPACING TITLO;;;; +0484;COMBINING CYRILLIC PALATALIZATION;Mn;230;NSM;;;;;N;CYRILLIC NON-SPACING PALATALIZATION;;;; +0485;COMBINING CYRILLIC DASIA PNEUMATA;Mn;230;NSM;;;;;N;CYRILLIC NON-SPACING DASIA PNEUMATA;;;; +0486;COMBINING CYRILLIC PSILI PNEUMATA;Mn;230;NSM;;;;;N;CYRILLIC NON-SPACING PSILI PNEUMATA;;;; +0487;COMBINING CYRILLIC POKRYTIE;Mn;230;NSM;;;;;N;;;;; +0488;COMBINING CYRILLIC HUNDRED THOUSANDS SIGN;Me;0;NSM;;;;;N;;;;; +0489;COMBINING CYRILLIC MILLIONS SIGN;Me;0;NSM;;;;;N;;;;; +048A;CYRILLIC CAPITAL LETTER SHORT I WITH TAIL;Lu;0;L;;;;;N;;;;048B; +048B;CYRILLIC SMALL LETTER SHORT I WITH TAIL;Ll;0;L;;;;;N;;;048A;;048A +048C;CYRILLIC CAPITAL LETTER SEMISOFT SIGN;Lu;0;L;;;;;N;;;;048D; +048D;CYRILLIC SMALL LETTER SEMISOFT SIGN;Ll;0;L;;;;;N;;;048C;;048C +048E;CYRILLIC CAPITAL LETTER ER WITH TICK;Lu;0;L;;;;;N;;;;048F; +048F;CYRILLIC SMALL LETTER ER WITH TICK;Ll;0;L;;;;;N;;;048E;;048E +0490;CYRILLIC CAPITAL LETTER GHE WITH UPTURN;Lu;0;L;;;;;N;CYRILLIC CAPITAL LETTER GE WITH UPTURN;;;0491; +0491;CYRILLIC SMALL LETTER GHE WITH UPTURN;Ll;0;L;;;;;N;CYRILLIC SMALL LETTER GE WITH UPTURN;;0490;;0490 +0492;CYRILLIC CAPITAL LETTER GHE WITH STROKE;Lu;0;L;;;;;N;CYRILLIC CAPITAL LETTER GE BAR;;;0493; +0493;CYRILLIC SMALL LETTER GHE WITH STROKE;Ll;0;L;;;;;N;CYRILLIC SMALL LETTER GE BAR;;0492;;0492 +0494;CYRILLIC CAPITAL LETTER GHE WITH MIDDLE HOOK;Lu;0;L;;;;;N;CYRILLIC CAPITAL LETTER GE HOOK;;;0495; +0495;CYRILLIC SMALL LETTER GHE WITH MIDDLE HOOK;Ll;0;L;;;;;N;CYRILLIC SMALL LETTER GE HOOK;;0494;;0494 +0496;CYRILLIC CAPITAL LETTER ZHE WITH DESCENDER;Lu;0;L;;;;;N;CYRILLIC CAPITAL LETTER ZHE WITH RIGHT DESCENDER;;;0497; +0497;CYRILLIC SMALL LETTER ZHE WITH DESCENDER;Ll;0;L;;;;;N;CYRILLIC SMALL LETTER ZHE WITH RIGHT DESCENDER;;0496;;0496 +0498;CYRILLIC CAPITAL LETTER ZE WITH DESCENDER;Lu;0;L;;;;;N;CYRILLIC CAPITAL LETTER ZE CEDILLA;;;0499; +0499;CYRILLIC SMALL LETTER ZE WITH DESCENDER;Ll;0;L;;;;;N;CYRILLIC SMALL LETTER ZE CEDILLA;;0498;;0498 +049A;CYRILLIC CAPITAL LETTER KA WITH DESCENDER;Lu;0;L;;;;;N;CYRILLIC CAPITAL LETTER KA WITH RIGHT DESCENDER;;;049B; +049B;CYRILLIC SMALL LETTER KA WITH DESCENDER;Ll;0;L;;;;;N;CYRILLIC SMALL LETTER KA WITH RIGHT DESCENDER;;049A;;049A +049C;CYRILLIC CAPITAL LETTER KA WITH VERTICAL STROKE;Lu;0;L;;;;;N;CYRILLIC CAPITAL LETTER KA VERTICAL BAR;;;049D; +049D;CYRILLIC SMALL LETTER KA WITH VERTICAL STROKE;Ll;0;L;;;;;N;CYRILLIC SMALL LETTER KA VERTICAL BAR;;049C;;049C +049E;CYRILLIC CAPITAL LETTER KA WITH STROKE;Lu;0;L;;;;;N;CYRILLIC CAPITAL LETTER KA BAR;;;049F; +049F;CYRILLIC SMALL LETTER KA WITH STROKE;Ll;0;L;;;;;N;CYRILLIC SMALL LETTER KA BAR;;049E;;049E +04A0;CYRILLIC CAPITAL LETTER BASHKIR KA;Lu;0;L;;;;;N;CYRILLIC CAPITAL LETTER REVERSED GE KA;;;04A1; +04A1;CYRILLIC SMALL LETTER BASHKIR KA;Ll;0;L;;;;;N;CYRILLIC SMALL LETTER REVERSED GE KA;;04A0;;04A0 +04A2;CYRILLIC CAPITAL LETTER EN WITH DESCENDER;Lu;0;L;;;;;N;CYRILLIC CAPITAL LETTER EN WITH RIGHT DESCENDER;;;04A3; +04A3;CYRILLIC SMALL LETTER EN WITH DESCENDER;Ll;0;L;;;;;N;CYRILLIC SMALL LETTER EN WITH RIGHT DESCENDER;;04A2;;04A2 +04A4;CYRILLIC CAPITAL LIGATURE EN GHE;Lu;0;L;;;;;N;CYRILLIC CAPITAL LETTER EN GE;;;04A5; +04A5;CYRILLIC SMALL LIGATURE EN GHE;Ll;0;L;;;;;N;CYRILLIC SMALL LETTER EN GE;;04A4;;04A4 +04A6;CYRILLIC CAPITAL LETTER PE WITH MIDDLE HOOK;Lu;0;L;;;;;N;CYRILLIC CAPITAL LETTER PE HOOK;;;04A7; +04A7;CYRILLIC SMALL LETTER PE WITH MIDDLE HOOK;Ll;0;L;;;;;N;CYRILLIC SMALL LETTER PE HOOK;;04A6;;04A6 +04A8;CYRILLIC CAPITAL LETTER ABKHASIAN HA;Lu;0;L;;;;;N;CYRILLIC CAPITAL LETTER O HOOK;;;04A9; +04A9;CYRILLIC SMALL LETTER ABKHASIAN HA;Ll;0;L;;;;;N;CYRILLIC SMALL LETTER O HOOK;;04A8;;04A8 +04AA;CYRILLIC CAPITAL LETTER ES WITH DESCENDER;Lu;0;L;;;;;N;CYRILLIC CAPITAL LETTER ES CEDILLA;;;04AB; +04AB;CYRILLIC SMALL LETTER ES WITH DESCENDER;Ll;0;L;;;;;N;CYRILLIC SMALL LETTER ES CEDILLA;;04AA;;04AA +04AC;CYRILLIC CAPITAL LETTER TE WITH DESCENDER;Lu;0;L;;;;;N;CYRILLIC CAPITAL LETTER TE WITH RIGHT DESCENDER;;;04AD; +04AD;CYRILLIC SMALL LETTER TE WITH DESCENDER;Ll;0;L;;;;;N;CYRILLIC SMALL LETTER TE WITH RIGHT DESCENDER;;04AC;;04AC +04AE;CYRILLIC CAPITAL LETTER STRAIGHT U;Lu;0;L;;;;;N;;;;04AF; +04AF;CYRILLIC SMALL LETTER STRAIGHT U;Ll;0;L;;;;;N;;;04AE;;04AE +04B0;CYRILLIC CAPITAL LETTER STRAIGHT U WITH STROKE;Lu;0;L;;;;;N;CYRILLIC CAPITAL LETTER STRAIGHT U BAR;;;04B1; +04B1;CYRILLIC SMALL LETTER STRAIGHT U WITH STROKE;Ll;0;L;;;;;N;CYRILLIC SMALL LETTER STRAIGHT U BAR;;04B0;;04B0 +04B2;CYRILLIC CAPITAL LETTER HA WITH DESCENDER;Lu;0;L;;;;;N;CYRILLIC CAPITAL LETTER KHA WITH RIGHT DESCENDER;;;04B3; +04B3;CYRILLIC SMALL LETTER HA WITH DESCENDER;Ll;0;L;;;;;N;CYRILLIC SMALL LETTER KHA WITH RIGHT DESCENDER;;04B2;;04B2 +04B4;CYRILLIC CAPITAL LIGATURE TE TSE;Lu;0;L;;;;;N;CYRILLIC CAPITAL LETTER TE TSE;;;04B5; +04B5;CYRILLIC SMALL LIGATURE TE TSE;Ll;0;L;;;;;N;CYRILLIC SMALL LETTER TE TSE;;04B4;;04B4 +04B6;CYRILLIC CAPITAL LETTER CHE WITH DESCENDER;Lu;0;L;;;;;N;CYRILLIC CAPITAL LETTER CHE WITH RIGHT DESCENDER;;;04B7; +04B7;CYRILLIC SMALL LETTER CHE WITH DESCENDER;Ll;0;L;;;;;N;CYRILLIC SMALL LETTER CHE WITH RIGHT DESCENDER;;04B6;;04B6 +04B8;CYRILLIC CAPITAL LETTER CHE WITH VERTICAL STROKE;Lu;0;L;;;;;N;CYRILLIC CAPITAL LETTER CHE VERTICAL BAR;;;04B9; +04B9;CYRILLIC SMALL LETTER CHE WITH VERTICAL STROKE;Ll;0;L;;;;;N;CYRILLIC SMALL LETTER CHE VERTICAL BAR;;04B8;;04B8 +04BA;CYRILLIC CAPITAL LETTER SHHA;Lu;0;L;;;;;N;CYRILLIC CAPITAL LETTER H;;;04BB; +04BB;CYRILLIC SMALL LETTER SHHA;Ll;0;L;;;;;N;CYRILLIC SMALL LETTER H;;04BA;;04BA +04BC;CYRILLIC CAPITAL LETTER ABKHASIAN CHE;Lu;0;L;;;;;N;CYRILLIC CAPITAL LETTER IE HOOK;;;04BD; +04BD;CYRILLIC SMALL LETTER ABKHASIAN CHE;Ll;0;L;;;;;N;CYRILLIC SMALL LETTER IE HOOK;;04BC;;04BC +04BE;CYRILLIC CAPITAL LETTER ABKHASIAN CHE WITH DESCENDER;Lu;0;L;;;;;N;CYRILLIC CAPITAL LETTER IE HOOK OGONEK;;;04BF; +04BF;CYRILLIC SMALL LETTER ABKHASIAN CHE WITH DESCENDER;Ll;0;L;;;;;N;CYRILLIC SMALL LETTER IE HOOK OGONEK;;04BE;;04BE +04C0;CYRILLIC LETTER PALOCHKA;Lu;0;L;;;;;N;CYRILLIC LETTER I;;;04CF; +04C1;CYRILLIC CAPITAL LETTER ZHE WITH BREVE;Lu;0;L;0416 0306;;;;N;CYRILLIC CAPITAL LETTER SHORT ZHE;;;04C2; +04C2;CYRILLIC SMALL LETTER ZHE WITH BREVE;Ll;0;L;0436 0306;;;;N;CYRILLIC SMALL LETTER SHORT ZHE;;04C1;;04C1 +04C3;CYRILLIC CAPITAL LETTER KA WITH HOOK;Lu;0;L;;;;;N;CYRILLIC CAPITAL LETTER KA HOOK;;;04C4; +04C4;CYRILLIC SMALL LETTER KA WITH HOOK;Ll;0;L;;;;;N;CYRILLIC SMALL LETTER KA HOOK;;04C3;;04C3 +04C5;CYRILLIC CAPITAL LETTER EL WITH TAIL;Lu;0;L;;;;;N;;;;04C6; +04C6;CYRILLIC SMALL LETTER EL WITH TAIL;Ll;0;L;;;;;N;;;04C5;;04C5 +04C7;CYRILLIC CAPITAL LETTER EN WITH HOOK;Lu;0;L;;;;;N;CYRILLIC CAPITAL LETTER EN HOOK;;;04C8; +04C8;CYRILLIC SMALL LETTER EN WITH HOOK;Ll;0;L;;;;;N;CYRILLIC SMALL LETTER EN HOOK;;04C7;;04C7 +04C9;CYRILLIC CAPITAL LETTER EN WITH TAIL;Lu;0;L;;;;;N;;;;04CA; +04CA;CYRILLIC SMALL LETTER EN WITH TAIL;Ll;0;L;;;;;N;;;04C9;;04C9 +04CB;CYRILLIC CAPITAL LETTER KHAKASSIAN CHE;Lu;0;L;;;;;N;CYRILLIC CAPITAL LETTER CHE WITH LEFT DESCENDER;;;04CC; +04CC;CYRILLIC SMALL LETTER KHAKASSIAN CHE;Ll;0;L;;;;;N;CYRILLIC SMALL LETTER CHE WITH LEFT DESCENDER;;04CB;;04CB +04CD;CYRILLIC CAPITAL LETTER EM WITH TAIL;Lu;0;L;;;;;N;;;;04CE; +04CE;CYRILLIC SMALL LETTER EM WITH TAIL;Ll;0;L;;;;;N;;;04CD;;04CD +04CF;CYRILLIC SMALL LETTER PALOCHKA;Ll;0;L;;;;;N;;;04C0;;04C0 +04D0;CYRILLIC CAPITAL LETTER A WITH BREVE;Lu;0;L;0410 0306;;;;N;;;;04D1; +04D1;CYRILLIC SMALL LETTER A WITH BREVE;Ll;0;L;0430 0306;;;;N;;;04D0;;04D0 +04D2;CYRILLIC CAPITAL LETTER A WITH DIAERESIS;Lu;0;L;0410 0308;;;;N;;;;04D3; +04D3;CYRILLIC SMALL LETTER A WITH DIAERESIS;Ll;0;L;0430 0308;;;;N;;;04D2;;04D2 +04D4;CYRILLIC CAPITAL LIGATURE A IE;Lu;0;L;;;;;N;;;;04D5; +04D5;CYRILLIC SMALL LIGATURE A IE;Ll;0;L;;;;;N;;;04D4;;04D4 +04D6;CYRILLIC CAPITAL LETTER IE WITH BREVE;Lu;0;L;0415 0306;;;;N;;;;04D7; +04D7;CYRILLIC SMALL LETTER IE WITH BREVE;Ll;0;L;0435 0306;;;;N;;;04D6;;04D6 +04D8;CYRILLIC CAPITAL LETTER SCHWA;Lu;0;L;;;;;N;;;;04D9; +04D9;CYRILLIC SMALL LETTER SCHWA;Ll;0;L;;;;;N;;;04D8;;04D8 +04DA;CYRILLIC CAPITAL LETTER SCHWA WITH DIAERESIS;Lu;0;L;04D8 0308;;;;N;;;;04DB; +04DB;CYRILLIC SMALL LETTER SCHWA WITH DIAERESIS;Ll;0;L;04D9 0308;;;;N;;;04DA;;04DA +04DC;CYRILLIC CAPITAL LETTER ZHE WITH DIAERESIS;Lu;0;L;0416 0308;;;;N;;;;04DD; +04DD;CYRILLIC SMALL LETTER ZHE WITH DIAERESIS;Ll;0;L;0436 0308;;;;N;;;04DC;;04DC +04DE;CYRILLIC CAPITAL LETTER ZE WITH DIAERESIS;Lu;0;L;0417 0308;;;;N;;;;04DF; +04DF;CYRILLIC SMALL LETTER ZE WITH DIAERESIS;Ll;0;L;0437 0308;;;;N;;;04DE;;04DE +04E0;CYRILLIC CAPITAL LETTER ABKHASIAN DZE;Lu;0;L;;;;;N;;;;04E1; +04E1;CYRILLIC SMALL LETTER ABKHASIAN DZE;Ll;0;L;;;;;N;;;04E0;;04E0 +04E2;CYRILLIC CAPITAL LETTER I WITH MACRON;Lu;0;L;0418 0304;;;;N;;;;04E3; +04E3;CYRILLIC SMALL LETTER I WITH MACRON;Ll;0;L;0438 0304;;;;N;;;04E2;;04E2 +04E4;CYRILLIC CAPITAL LETTER I WITH DIAERESIS;Lu;0;L;0418 0308;;;;N;;;;04E5; +04E5;CYRILLIC SMALL LETTER I WITH DIAERESIS;Ll;0;L;0438 0308;;;;N;;;04E4;;04E4 +04E6;CYRILLIC CAPITAL LETTER O WITH DIAERESIS;Lu;0;L;041E 0308;;;;N;;;;04E7; +04E7;CYRILLIC SMALL LETTER O WITH DIAERESIS;Ll;0;L;043E 0308;;;;N;;;04E6;;04E6 +04E8;CYRILLIC CAPITAL LETTER BARRED O;Lu;0;L;;;;;N;;;;04E9; +04E9;CYRILLIC SMALL LETTER BARRED O;Ll;0;L;;;;;N;;;04E8;;04E8 +04EA;CYRILLIC CAPITAL LETTER BARRED O WITH DIAERESIS;Lu;0;L;04E8 0308;;;;N;;;;04EB; +04EB;CYRILLIC SMALL LETTER BARRED O WITH DIAERESIS;Ll;0;L;04E9 0308;;;;N;;;04EA;;04EA +04EC;CYRILLIC CAPITAL LETTER E WITH DIAERESIS;Lu;0;L;042D 0308;;;;N;;;;04ED; +04ED;CYRILLIC SMALL LETTER E WITH DIAERESIS;Ll;0;L;044D 0308;;;;N;;;04EC;;04EC +04EE;CYRILLIC CAPITAL LETTER U WITH MACRON;Lu;0;L;0423 0304;;;;N;;;;04EF; +04EF;CYRILLIC SMALL LETTER U WITH MACRON;Ll;0;L;0443 0304;;;;N;;;04EE;;04EE +04F0;CYRILLIC CAPITAL LETTER U WITH DIAERESIS;Lu;0;L;0423 0308;;;;N;;;;04F1; +04F1;CYRILLIC SMALL LETTER U WITH DIAERESIS;Ll;0;L;0443 0308;;;;N;;;04F0;;04F0 +04F2;CYRILLIC CAPITAL LETTER U WITH DOUBLE ACUTE;Lu;0;L;0423 030B;;;;N;;;;04F3; +04F3;CYRILLIC SMALL LETTER U WITH DOUBLE ACUTE;Ll;0;L;0443 030B;;;;N;;;04F2;;04F2 +04F4;CYRILLIC CAPITAL LETTER CHE WITH DIAERESIS;Lu;0;L;0427 0308;;;;N;;;;04F5; +04F5;CYRILLIC SMALL LETTER CHE WITH DIAERESIS;Ll;0;L;0447 0308;;;;N;;;04F4;;04F4 +04F6;CYRILLIC CAPITAL LETTER GHE WITH DESCENDER;Lu;0;L;;;;;N;;;;04F7; +04F7;CYRILLIC SMALL LETTER GHE WITH DESCENDER;Ll;0;L;;;;;N;;;04F6;;04F6 +04F8;CYRILLIC CAPITAL LETTER YERU WITH DIAERESIS;Lu;0;L;042B 0308;;;;N;;;;04F9; +04F9;CYRILLIC SMALL LETTER YERU WITH DIAERESIS;Ll;0;L;044B 0308;;;;N;;;04F8;;04F8 +04FA;CYRILLIC CAPITAL LETTER GHE WITH STROKE AND HOOK;Lu;0;L;;;;;N;;;;04FB; +04FB;CYRILLIC SMALL LETTER GHE WITH STROKE AND HOOK;Ll;0;L;;;;;N;;;04FA;;04FA +04FC;CYRILLIC CAPITAL LETTER HA WITH HOOK;Lu;0;L;;;;;N;;;;04FD; +04FD;CYRILLIC SMALL LETTER HA WITH HOOK;Ll;0;L;;;;;N;;;04FC;;04FC +04FE;CYRILLIC CAPITAL LETTER HA WITH STROKE;Lu;0;L;;;;;N;;;;04FF; +04FF;CYRILLIC SMALL LETTER HA WITH STROKE;Ll;0;L;;;;;N;;;04FE;;04FE +0500;CYRILLIC CAPITAL LETTER KOMI DE;Lu;0;L;;;;;N;;;;0501; +0501;CYRILLIC SMALL LETTER KOMI DE;Ll;0;L;;;;;N;;;0500;;0500 +0502;CYRILLIC CAPITAL LETTER KOMI DJE;Lu;0;L;;;;;N;;;;0503; +0503;CYRILLIC SMALL LETTER KOMI DJE;Ll;0;L;;;;;N;;;0502;;0502 +0504;CYRILLIC CAPITAL LETTER KOMI ZJE;Lu;0;L;;;;;N;;;;0505; +0505;CYRILLIC SMALL LETTER KOMI ZJE;Ll;0;L;;;;;N;;;0504;;0504 +0506;CYRILLIC CAPITAL LETTER KOMI DZJE;Lu;0;L;;;;;N;;;;0507; +0507;CYRILLIC SMALL LETTER KOMI DZJE;Ll;0;L;;;;;N;;;0506;;0506 +0508;CYRILLIC CAPITAL LETTER KOMI LJE;Lu;0;L;;;;;N;;;;0509; +0509;CYRILLIC SMALL LETTER KOMI LJE;Ll;0;L;;;;;N;;;0508;;0508 +050A;CYRILLIC CAPITAL LETTER KOMI NJE;Lu;0;L;;;;;N;;;;050B; +050B;CYRILLIC SMALL LETTER KOMI NJE;Ll;0;L;;;;;N;;;050A;;050A +050C;CYRILLIC CAPITAL LETTER KOMI SJE;Lu;0;L;;;;;N;;;;050D; +050D;CYRILLIC SMALL LETTER KOMI SJE;Ll;0;L;;;;;N;;;050C;;050C +050E;CYRILLIC CAPITAL LETTER KOMI TJE;Lu;0;L;;;;;N;;;;050F; +050F;CYRILLIC SMALL LETTER KOMI TJE;Ll;0;L;;;;;N;;;050E;;050E +0510;CYRILLIC CAPITAL LETTER REVERSED ZE;Lu;0;L;;;;;N;;;;0511; +0511;CYRILLIC SMALL LETTER REVERSED ZE;Ll;0;L;;;;;N;;;0510;;0510 +0512;CYRILLIC CAPITAL LETTER EL WITH HOOK;Lu;0;L;;;;;N;;;;0513; +0513;CYRILLIC SMALL LETTER EL WITH HOOK;Ll;0;L;;;;;N;;;0512;;0512 +0514;CYRILLIC CAPITAL LETTER LHA;Lu;0;L;;;;;N;;;;0515; +0515;CYRILLIC SMALL LETTER LHA;Ll;0;L;;;;;N;;;0514;;0514 +0516;CYRILLIC CAPITAL LETTER RHA;Lu;0;L;;;;;N;;;;0517; +0517;CYRILLIC SMALL LETTER RHA;Ll;0;L;;;;;N;;;0516;;0516 +0518;CYRILLIC CAPITAL LETTER YAE;Lu;0;L;;;;;N;;;;0519; +0519;CYRILLIC SMALL LETTER YAE;Ll;0;L;;;;;N;;;0518;;0518 +051A;CYRILLIC CAPITAL LETTER QA;Lu;0;L;;;;;N;;;;051B; +051B;CYRILLIC SMALL LETTER QA;Ll;0;L;;;;;N;;;051A;;051A +051C;CYRILLIC CAPITAL LETTER WE;Lu;0;L;;;;;N;;;;051D; +051D;CYRILLIC SMALL LETTER WE;Ll;0;L;;;;;N;;;051C;;051C +051E;CYRILLIC CAPITAL LETTER ALEUT KA;Lu;0;L;;;;;N;;;;051F; +051F;CYRILLIC SMALL LETTER ALEUT KA;Ll;0;L;;;;;N;;;051E;;051E +0520;CYRILLIC CAPITAL LETTER EL WITH MIDDLE HOOK;Lu;0;L;;;;;N;;;;0521; +0521;CYRILLIC SMALL LETTER EL WITH MIDDLE HOOK;Ll;0;L;;;;;N;;;0520;;0520 +0522;CYRILLIC CAPITAL LETTER EN WITH MIDDLE HOOK;Lu;0;L;;;;;N;;;;0523; +0523;CYRILLIC SMALL LETTER EN WITH MIDDLE HOOK;Ll;0;L;;;;;N;;;0522;;0522 +0524;CYRILLIC CAPITAL LETTER PE WITH DESCENDER;Lu;0;L;;;;;N;;;;0525; +0525;CYRILLIC SMALL LETTER PE WITH DESCENDER;Ll;0;L;;;;;N;;;0524;;0524 +0526;CYRILLIC CAPITAL LETTER SHHA WITH DESCENDER;Lu;0;L;;;;;N;;;;0527; +0527;CYRILLIC SMALL LETTER SHHA WITH DESCENDER;Ll;0;L;;;;;N;;;0526;;0526 +0528;CYRILLIC CAPITAL LETTER EN WITH LEFT HOOK;Lu;0;L;;;;;N;;;;0529; +0529;CYRILLIC SMALL LETTER EN WITH LEFT HOOK;Ll;0;L;;;;;N;;;0528;;0528 +052A;CYRILLIC CAPITAL LETTER DZZHE;Lu;0;L;;;;;N;;;;052B; +052B;CYRILLIC SMALL LETTER DZZHE;Ll;0;L;;;;;N;;;052A;;052A +052C;CYRILLIC CAPITAL LETTER DCHE;Lu;0;L;;;;;N;;;;052D; +052D;CYRILLIC SMALL LETTER DCHE;Ll;0;L;;;;;N;;;052C;;052C +052E;CYRILLIC CAPITAL LETTER EL WITH DESCENDER;Lu;0;L;;;;;N;;;;052F; +052F;CYRILLIC SMALL LETTER EL WITH DESCENDER;Ll;0;L;;;;;N;;;052E;;052E +0531;ARMENIAN CAPITAL LETTER AYB;Lu;0;L;;;;;N;;;;0561; +0532;ARMENIAN CAPITAL LETTER BEN;Lu;0;L;;;;;N;;;;0562; +0533;ARMENIAN CAPITAL LETTER GIM;Lu;0;L;;;;;N;;;;0563; +0534;ARMENIAN CAPITAL LETTER DA;Lu;0;L;;;;;N;;;;0564; +0535;ARMENIAN CAPITAL LETTER ECH;Lu;0;L;;;;;N;;;;0565; +0536;ARMENIAN CAPITAL LETTER ZA;Lu;0;L;;;;;N;;;;0566; +0537;ARMENIAN CAPITAL LETTER EH;Lu;0;L;;;;;N;;;;0567; +0538;ARMENIAN CAPITAL LETTER ET;Lu;0;L;;;;;N;;;;0568; +0539;ARMENIAN CAPITAL LETTER TO;Lu;0;L;;;;;N;;;;0569; +053A;ARMENIAN CAPITAL LETTER ZHE;Lu;0;L;;;;;N;;;;056A; +053B;ARMENIAN CAPITAL LETTER INI;Lu;0;L;;;;;N;;;;056B; +053C;ARMENIAN CAPITAL LETTER LIWN;Lu;0;L;;;;;N;;;;056C; +053D;ARMENIAN CAPITAL LETTER XEH;Lu;0;L;;;;;N;;;;056D; +053E;ARMENIAN CAPITAL LETTER CA;Lu;0;L;;;;;N;;;;056E; +053F;ARMENIAN CAPITAL LETTER KEN;Lu;0;L;;;;;N;;;;056F; +0540;ARMENIAN CAPITAL LETTER HO;Lu;0;L;;;;;N;;;;0570; +0541;ARMENIAN CAPITAL LETTER JA;Lu;0;L;;;;;N;;;;0571; +0542;ARMENIAN CAPITAL LETTER GHAD;Lu;0;L;;;;;N;ARMENIAN CAPITAL LETTER LAD;;;0572; +0543;ARMENIAN CAPITAL LETTER CHEH;Lu;0;L;;;;;N;;;;0573; +0544;ARMENIAN CAPITAL LETTER MEN;Lu;0;L;;;;;N;;;;0574; +0545;ARMENIAN CAPITAL LETTER YI;Lu;0;L;;;;;N;;;;0575; +0546;ARMENIAN CAPITAL LETTER NOW;Lu;0;L;;;;;N;;;;0576; +0547;ARMENIAN CAPITAL LETTER SHA;Lu;0;L;;;;;N;;;;0577; +0548;ARMENIAN CAPITAL LETTER VO;Lu;0;L;;;;;N;;;;0578; +0549;ARMENIAN CAPITAL LETTER CHA;Lu;0;L;;;;;N;;;;0579; +054A;ARMENIAN CAPITAL LETTER PEH;Lu;0;L;;;;;N;;;;057A; +054B;ARMENIAN CAPITAL LETTER JHEH;Lu;0;L;;;;;N;;;;057B; +054C;ARMENIAN CAPITAL LETTER RA;Lu;0;L;;;;;N;;;;057C; +054D;ARMENIAN CAPITAL LETTER SEH;Lu;0;L;;;;;N;;;;057D; +054E;ARMENIAN CAPITAL LETTER VEW;Lu;0;L;;;;;N;;;;057E; +054F;ARMENIAN CAPITAL LETTER TIWN;Lu;0;L;;;;;N;;;;057F; +0550;ARMENIAN CAPITAL LETTER REH;Lu;0;L;;;;;N;;;;0580; +0551;ARMENIAN CAPITAL LETTER CO;Lu;0;L;;;;;N;;;;0581; +0552;ARMENIAN CAPITAL LETTER YIWN;Lu;0;L;;;;;N;;;;0582; +0553;ARMENIAN CAPITAL LETTER PIWR;Lu;0;L;;;;;N;;;;0583; +0554;ARMENIAN CAPITAL LETTER KEH;Lu;0;L;;;;;N;;;;0584; +0555;ARMENIAN CAPITAL LETTER OH;Lu;0;L;;;;;N;;;;0585; +0556;ARMENIAN CAPITAL LETTER FEH;Lu;0;L;;;;;N;;;;0586; +0559;ARMENIAN MODIFIER LETTER LEFT HALF RING;Lm;0;L;;;;;N;;;;; +055A;ARMENIAN APOSTROPHE;Po;0;L;;;;;N;ARMENIAN MODIFIER LETTER RIGHT HALF RING;;;; +055B;ARMENIAN EMPHASIS MARK;Po;0;L;;;;;N;;;;; +055C;ARMENIAN EXCLAMATION MARK;Po;0;L;;;;;N;;;;; +055D;ARMENIAN COMMA;Po;0;L;;;;;N;;;;; +055E;ARMENIAN QUESTION MARK;Po;0;L;;;;;N;;;;; +055F;ARMENIAN ABBREVIATION MARK;Po;0;L;;;;;N;;;;; +0560;ARMENIAN SMALL LETTER TURNED AYB;Ll;0;L;;;;;N;;;;; +0561;ARMENIAN SMALL LETTER AYB;Ll;0;L;;;;;N;;;0531;;0531 +0562;ARMENIAN SMALL LETTER BEN;Ll;0;L;;;;;N;;;0532;;0532 +0563;ARMENIAN SMALL LETTER GIM;Ll;0;L;;;;;N;;;0533;;0533 +0564;ARMENIAN SMALL LETTER DA;Ll;0;L;;;;;N;;;0534;;0534 +0565;ARMENIAN SMALL LETTER ECH;Ll;0;L;;;;;N;;;0535;;0535 +0566;ARMENIAN SMALL LETTER ZA;Ll;0;L;;;;;N;;;0536;;0536 +0567;ARMENIAN SMALL LETTER EH;Ll;0;L;;;;;N;;;0537;;0537 +0568;ARMENIAN SMALL LETTER ET;Ll;0;L;;;;;N;;;0538;;0538 +0569;ARMENIAN SMALL LETTER TO;Ll;0;L;;;;;N;;;0539;;0539 +056A;ARMENIAN SMALL LETTER ZHE;Ll;0;L;;;;;N;;;053A;;053A +056B;ARMENIAN SMALL LETTER INI;Ll;0;L;;;;;N;;;053B;;053B +056C;ARMENIAN SMALL LETTER LIWN;Ll;0;L;;;;;N;;;053C;;053C +056D;ARMENIAN SMALL LETTER XEH;Ll;0;L;;;;;N;;;053D;;053D +056E;ARMENIAN SMALL LETTER CA;Ll;0;L;;;;;N;;;053E;;053E +056F;ARMENIAN SMALL LETTER KEN;Ll;0;L;;;;;N;;;053F;;053F +0570;ARMENIAN SMALL LETTER HO;Ll;0;L;;;;;N;;;0540;;0540 +0571;ARMENIAN SMALL LETTER JA;Ll;0;L;;;;;N;;;0541;;0541 +0572;ARMENIAN SMALL LETTER GHAD;Ll;0;L;;;;;N;ARMENIAN SMALL LETTER LAD;;0542;;0542 +0573;ARMENIAN SMALL LETTER CHEH;Ll;0;L;;;;;N;;;0543;;0543 +0574;ARMENIAN SMALL LETTER MEN;Ll;0;L;;;;;N;;;0544;;0544 +0575;ARMENIAN SMALL LETTER YI;Ll;0;L;;;;;N;;;0545;;0545 +0576;ARMENIAN SMALL LETTER NOW;Ll;0;L;;;;;N;;;0546;;0546 +0577;ARMENIAN SMALL LETTER SHA;Ll;0;L;;;;;N;;;0547;;0547 +0578;ARMENIAN SMALL LETTER VO;Ll;0;L;;;;;N;;;0548;;0548 +0579;ARMENIAN SMALL LETTER CHA;Ll;0;L;;;;;N;;;0549;;0549 +057A;ARMENIAN SMALL LETTER PEH;Ll;0;L;;;;;N;;;054A;;054A +057B;ARMENIAN SMALL LETTER JHEH;Ll;0;L;;;;;N;;;054B;;054B +057C;ARMENIAN SMALL LETTER RA;Ll;0;L;;;;;N;;;054C;;054C +057D;ARMENIAN SMALL LETTER SEH;Ll;0;L;;;;;N;;;054D;;054D +057E;ARMENIAN SMALL LETTER VEW;Ll;0;L;;;;;N;;;054E;;054E +057F;ARMENIAN SMALL LETTER TIWN;Ll;0;L;;;;;N;;;054F;;054F +0580;ARMENIAN SMALL LETTER REH;Ll;0;L;;;;;N;;;0550;;0550 +0581;ARMENIAN SMALL LETTER CO;Ll;0;L;;;;;N;;;0551;;0551 +0582;ARMENIAN SMALL LETTER YIWN;Ll;0;L;;;;;N;;;0552;;0552 +0583;ARMENIAN SMALL LETTER PIWR;Ll;0;L;;;;;N;;;0553;;0553 +0584;ARMENIAN SMALL LETTER KEH;Ll;0;L;;;;;N;;;0554;;0554 +0585;ARMENIAN SMALL LETTER OH;Ll;0;L;;;;;N;;;0555;;0555 +0586;ARMENIAN SMALL LETTER FEH;Ll;0;L;;;;;N;;;0556;;0556 +0587;ARMENIAN SMALL LIGATURE ECH YIWN;Ll;0;L; 0565 0582;;;;N;;;;; +0588;ARMENIAN SMALL LETTER YI WITH STROKE;Ll;0;L;;;;;N;;;;; +0589;ARMENIAN FULL STOP;Po;0;L;;;;;N;ARMENIAN PERIOD;;;; +058A;ARMENIAN HYPHEN;Pd;0;ON;;;;;N;;;;; +058D;RIGHT-FACING ARMENIAN ETERNITY SIGN;So;0;ON;;;;;N;;;;; +058E;LEFT-FACING ARMENIAN ETERNITY SIGN;So;0;ON;;;;;N;;;;; +058F;ARMENIAN DRAM SIGN;Sc;0;ET;;;;;N;;;;; +0591;HEBREW ACCENT ETNAHTA;Mn;220;NSM;;;;;N;;;;; +0592;HEBREW ACCENT SEGOL;Mn;230;NSM;;;;;N;;;;; +0593;HEBREW ACCENT SHALSHELET;Mn;230;NSM;;;;;N;;;;; +0594;HEBREW ACCENT ZAQEF QATAN;Mn;230;NSM;;;;;N;;;;; +0595;HEBREW ACCENT ZAQEF GADOL;Mn;230;NSM;;;;;N;;;;; +0596;HEBREW ACCENT TIPEHA;Mn;220;NSM;;;;;N;;;;; +0597;HEBREW ACCENT REVIA;Mn;230;NSM;;;;;N;;;;; +0598;HEBREW ACCENT ZARQA;Mn;230;NSM;;;;;N;;;;; +0599;HEBREW ACCENT PASHTA;Mn;230;NSM;;;;;N;;;;; +059A;HEBREW ACCENT YETIV;Mn;222;NSM;;;;;N;;;;; +059B;HEBREW ACCENT TEVIR;Mn;220;NSM;;;;;N;;;;; +059C;HEBREW ACCENT GERESH;Mn;230;NSM;;;;;N;;;;; +059D;HEBREW ACCENT GERESH MUQDAM;Mn;230;NSM;;;;;N;;;;; +059E;HEBREW ACCENT GERSHAYIM;Mn;230;NSM;;;;;N;;;;; +059F;HEBREW ACCENT QARNEY PARA;Mn;230;NSM;;;;;N;;;;; +05A0;HEBREW ACCENT TELISHA GEDOLA;Mn;230;NSM;;;;;N;;;;; +05A1;HEBREW ACCENT PAZER;Mn;230;NSM;;;;;N;;;;; +05A2;HEBREW ACCENT ATNAH HAFUKH;Mn;220;NSM;;;;;N;;;;; +05A3;HEBREW ACCENT MUNAH;Mn;220;NSM;;;;;N;;;;; +05A4;HEBREW ACCENT MAHAPAKH;Mn;220;NSM;;;;;N;;;;; +05A5;HEBREW ACCENT MERKHA;Mn;220;NSM;;;;;N;;;;; +05A6;HEBREW ACCENT MERKHA KEFULA;Mn;220;NSM;;;;;N;;;;; +05A7;HEBREW ACCENT DARGA;Mn;220;NSM;;;;;N;;;;; +05A8;HEBREW ACCENT QADMA;Mn;230;NSM;;;;;N;;;;; +05A9;HEBREW ACCENT TELISHA QETANA;Mn;230;NSM;;;;;N;;;;; +05AA;HEBREW ACCENT YERAH BEN YOMO;Mn;220;NSM;;;;;N;;;;; +05AB;HEBREW ACCENT OLE;Mn;230;NSM;;;;;N;;;;; +05AC;HEBREW ACCENT ILUY;Mn;230;NSM;;;;;N;;;;; +05AD;HEBREW ACCENT DEHI;Mn;222;NSM;;;;;N;;;;; +05AE;HEBREW ACCENT ZINOR;Mn;228;NSM;;;;;N;;;;; +05AF;HEBREW MARK MASORA CIRCLE;Mn;230;NSM;;;;;N;;;;; +05B0;HEBREW POINT SHEVA;Mn;10;NSM;;;;;N;;;;; +05B1;HEBREW POINT HATAF SEGOL;Mn;11;NSM;;;;;N;;;;; +05B2;HEBREW POINT HATAF PATAH;Mn;12;NSM;;;;;N;;;;; +05B3;HEBREW POINT HATAF QAMATS;Mn;13;NSM;;;;;N;;;;; +05B4;HEBREW POINT HIRIQ;Mn;14;NSM;;;;;N;;;;; +05B5;HEBREW POINT TSERE;Mn;15;NSM;;;;;N;;;;; +05B6;HEBREW POINT SEGOL;Mn;16;NSM;;;;;N;;;;; +05B7;HEBREW POINT PATAH;Mn;17;NSM;;;;;N;;;;; +05B8;HEBREW POINT QAMATS;Mn;18;NSM;;;;;N;;;;; +05B9;HEBREW POINT HOLAM;Mn;19;NSM;;;;;N;;;;; +05BA;HEBREW POINT HOLAM HASER FOR VAV;Mn;19;NSM;;;;;N;;;;; +05BB;HEBREW POINT QUBUTS;Mn;20;NSM;;;;;N;;;;; +05BC;HEBREW POINT DAGESH OR MAPIQ;Mn;21;NSM;;;;;N;HEBREW POINT DAGESH;;;; +05BD;HEBREW POINT METEG;Mn;22;NSM;;;;;N;;;;; +05BE;HEBREW PUNCTUATION MAQAF;Pd;0;R;;;;;N;;;;; +05BF;HEBREW POINT RAFE;Mn;23;NSM;;;;;N;;;;; +05C0;HEBREW PUNCTUATION PASEQ;Po;0;R;;;;;N;HEBREW POINT PASEQ;;;; +05C1;HEBREW POINT SHIN DOT;Mn;24;NSM;;;;;N;;;;; +05C2;HEBREW POINT SIN DOT;Mn;25;NSM;;;;;N;;;;; +05C3;HEBREW PUNCTUATION SOF PASUQ;Po;0;R;;;;;N;;;;; +05C4;HEBREW MARK UPPER DOT;Mn;230;NSM;;;;;N;;;;; +05C5;HEBREW MARK LOWER DOT;Mn;220;NSM;;;;;N;;;;; +05C6;HEBREW PUNCTUATION NUN HAFUKHA;Po;0;R;;;;;N;;;;; +05C7;HEBREW POINT QAMATS QATAN;Mn;18;NSM;;;;;N;;;;; +05D0;HEBREW LETTER ALEF;Lo;0;R;;;;;N;;;;; +05D1;HEBREW LETTER BET;Lo;0;R;;;;;N;;;;; +05D2;HEBREW LETTER GIMEL;Lo;0;R;;;;;N;;;;; +05D3;HEBREW LETTER DALET;Lo;0;R;;;;;N;;;;; +05D4;HEBREW LETTER HE;Lo;0;R;;;;;N;;;;; +05D5;HEBREW LETTER VAV;Lo;0;R;;;;;N;;;;; +05D6;HEBREW LETTER ZAYIN;Lo;0;R;;;;;N;;;;; +05D7;HEBREW LETTER HET;Lo;0;R;;;;;N;;;;; +05D8;HEBREW LETTER TET;Lo;0;R;;;;;N;;;;; +05D9;HEBREW LETTER YOD;Lo;0;R;;;;;N;;;;; +05DA;HEBREW LETTER FINAL KAF;Lo;0;R;;;;;N;;;;; +05DB;HEBREW LETTER KAF;Lo;0;R;;;;;N;;;;; +05DC;HEBREW LETTER LAMED;Lo;0;R;;;;;N;;;;; +05DD;HEBREW LETTER FINAL MEM;Lo;0;R;;;;;N;;;;; +05DE;HEBREW LETTER MEM;Lo;0;R;;;;;N;;;;; +05DF;HEBREW LETTER FINAL NUN;Lo;0;R;;;;;N;;;;; +05E0;HEBREW LETTER NUN;Lo;0;R;;;;;N;;;;; +05E1;HEBREW LETTER SAMEKH;Lo;0;R;;;;;N;;;;; +05E2;HEBREW LETTER AYIN;Lo;0;R;;;;;N;;;;; +05E3;HEBREW LETTER FINAL PE;Lo;0;R;;;;;N;;;;; +05E4;HEBREW LETTER PE;Lo;0;R;;;;;N;;;;; +05E5;HEBREW LETTER FINAL TSADI;Lo;0;R;;;;;N;;;;; +05E6;HEBREW LETTER TSADI;Lo;0;R;;;;;N;;;;; +05E7;HEBREW LETTER QOF;Lo;0;R;;;;;N;;;;; +05E8;HEBREW LETTER RESH;Lo;0;R;;;;;N;;;;; +05E9;HEBREW LETTER SHIN;Lo;0;R;;;;;N;;;;; +05EA;HEBREW LETTER TAV;Lo;0;R;;;;;N;;;;; +05EF;HEBREW YOD TRIANGLE;Lo;0;R;;;;;N;;;;; +05F0;HEBREW LIGATURE YIDDISH DOUBLE VAV;Lo;0;R;;;;;N;HEBREW LETTER DOUBLE VAV;;;; +05F1;HEBREW LIGATURE YIDDISH VAV YOD;Lo;0;R;;;;;N;HEBREW LETTER VAV YOD;;;; +05F2;HEBREW LIGATURE YIDDISH DOUBLE YOD;Lo;0;R;;;;;N;HEBREW LETTER DOUBLE YOD;;;; +05F3;HEBREW PUNCTUATION GERESH;Po;0;R;;;;;N;;;;; +05F4;HEBREW PUNCTUATION GERSHAYIM;Po;0;R;;;;;N;;;;; +0600;ARABIC NUMBER SIGN;Cf;0;AN;;;;;N;;;;; +0601;ARABIC SIGN SANAH;Cf;0;AN;;;;;N;;;;; +0602;ARABIC FOOTNOTE MARKER;Cf;0;AN;;;;;N;;;;; +0603;ARABIC SIGN SAFHA;Cf;0;AN;;;;;N;;;;; +0604;ARABIC SIGN SAMVAT;Cf;0;AN;;;;;N;;;;; +0605;ARABIC NUMBER MARK ABOVE;Cf;0;AN;;;;;N;;;;; +0606;ARABIC-INDIC CUBE ROOT;Sm;0;ON;;;;;N;;;;; +0607;ARABIC-INDIC FOURTH ROOT;Sm;0;ON;;;;;N;;;;; +0608;ARABIC RAY;Sm;0;AL;;;;;N;;;;; +0609;ARABIC-INDIC PER MILLE SIGN;Po;0;ET;;;;;N;;;;; +060A;ARABIC-INDIC PER TEN THOUSAND SIGN;Po;0;ET;;;;;N;;;;; +060B;AFGHANI SIGN;Sc;0;AL;;;;;N;;;;; +060C;ARABIC COMMA;Po;0;CS;;;;;N;;;;; +060D;ARABIC DATE SEPARATOR;Po;0;AL;;;;;N;;;;; +060E;ARABIC POETIC VERSE SIGN;So;0;ON;;;;;N;;;;; +060F;ARABIC SIGN MISRA;So;0;ON;;;;;N;;;;; +0610;ARABIC SIGN SALLALLAHOU ALAYHE WASSALLAM;Mn;230;NSM;;;;;N;;;;; +0611;ARABIC SIGN ALAYHE ASSALLAM;Mn;230;NSM;;;;;N;;;;; +0612;ARABIC SIGN RAHMATULLAH ALAYHE;Mn;230;NSM;;;;;N;;;;; +0613;ARABIC SIGN RADI ALLAHOU ANHU;Mn;230;NSM;;;;;N;;;;; +0614;ARABIC SIGN TAKHALLUS;Mn;230;NSM;;;;;N;;;;; +0615;ARABIC SMALL HIGH TAH;Mn;230;NSM;;;;;N;;;;; +0616;ARABIC SMALL HIGH LIGATURE ALEF WITH LAM WITH YEH;Mn;230;NSM;;;;;N;;;;; +0617;ARABIC SMALL HIGH ZAIN;Mn;230;NSM;;;;;N;;;;; +0618;ARABIC SMALL FATHA;Mn;30;NSM;;;;;N;;;;; +0619;ARABIC SMALL DAMMA;Mn;31;NSM;;;;;N;;;;; +061A;ARABIC SMALL KASRA;Mn;32;NSM;;;;;N;;;;; +061B;ARABIC SEMICOLON;Po;0;AL;;;;;N;;;;; +061C;ARABIC LETTER MARK;Cf;0;AL;;;;;N;;;;; +061E;ARABIC TRIPLE DOT PUNCTUATION MARK;Po;0;AL;;;;;N;;;;; +061F;ARABIC QUESTION MARK;Po;0;AL;;;;;N;;;;; +0620;ARABIC LETTER KASHMIRI YEH;Lo;0;AL;;;;;N;;;;; +0621;ARABIC LETTER HAMZA;Lo;0;AL;;;;;N;ARABIC LETTER HAMZAH;;;; +0622;ARABIC LETTER ALEF WITH MADDA ABOVE;Lo;0;AL;0627 0653;;;;N;ARABIC LETTER MADDAH ON ALEF;;;; +0623;ARABIC LETTER ALEF WITH HAMZA ABOVE;Lo;0;AL;0627 0654;;;;N;ARABIC LETTER HAMZAH ON ALEF;;;; +0624;ARABIC LETTER WAW WITH HAMZA ABOVE;Lo;0;AL;0648 0654;;;;N;ARABIC LETTER HAMZAH ON WAW;;;; +0625;ARABIC LETTER ALEF WITH HAMZA BELOW;Lo;0;AL;0627 0655;;;;N;ARABIC LETTER HAMZAH UNDER ALEF;;;; +0626;ARABIC LETTER YEH WITH HAMZA ABOVE;Lo;0;AL;064A 0654;;;;N;ARABIC LETTER HAMZAH ON YA;;;; +0627;ARABIC LETTER ALEF;Lo;0;AL;;;;;N;;;;; +0628;ARABIC LETTER BEH;Lo;0;AL;;;;;N;ARABIC LETTER BAA;;;; +0629;ARABIC LETTER TEH MARBUTA;Lo;0;AL;;;;;N;ARABIC LETTER TAA MARBUTAH;;;; +062A;ARABIC LETTER TEH;Lo;0;AL;;;;;N;ARABIC LETTER TAA;;;; +062B;ARABIC LETTER THEH;Lo;0;AL;;;;;N;ARABIC LETTER THAA;;;; +062C;ARABIC LETTER JEEM;Lo;0;AL;;;;;N;;;;; +062D;ARABIC LETTER HAH;Lo;0;AL;;;;;N;ARABIC LETTER HAA;;;; +062E;ARABIC LETTER KHAH;Lo;0;AL;;;;;N;ARABIC LETTER KHAA;;;; +062F;ARABIC LETTER DAL;Lo;0;AL;;;;;N;;;;; +0630;ARABIC LETTER THAL;Lo;0;AL;;;;;N;;;;; +0631;ARABIC LETTER REH;Lo;0;AL;;;;;N;ARABIC LETTER RA;;;; +0632;ARABIC LETTER ZAIN;Lo;0;AL;;;;;N;;;;; +0633;ARABIC LETTER SEEN;Lo;0;AL;;;;;N;;;;; +0634;ARABIC LETTER SHEEN;Lo;0;AL;;;;;N;;;;; +0635;ARABIC LETTER SAD;Lo;0;AL;;;;;N;;;;; +0636;ARABIC LETTER DAD;Lo;0;AL;;;;;N;;;;; +0637;ARABIC LETTER TAH;Lo;0;AL;;;;;N;;;;; +0638;ARABIC LETTER ZAH;Lo;0;AL;;;;;N;ARABIC LETTER DHAH;;;; +0639;ARABIC LETTER AIN;Lo;0;AL;;;;;N;;;;; +063A;ARABIC LETTER GHAIN;Lo;0;AL;;;;;N;;;;; +063B;ARABIC LETTER KEHEH WITH TWO DOTS ABOVE;Lo;0;AL;;;;;N;;;;; +063C;ARABIC LETTER KEHEH WITH THREE DOTS BELOW;Lo;0;AL;;;;;N;;;;; +063D;ARABIC LETTER FARSI YEH WITH INVERTED V;Lo;0;AL;;;;;N;;;;; +063E;ARABIC LETTER FARSI YEH WITH TWO DOTS ABOVE;Lo;0;AL;;;;;N;;;;; +063F;ARABIC LETTER FARSI YEH WITH THREE DOTS ABOVE;Lo;0;AL;;;;;N;;;;; +0640;ARABIC TATWEEL;Lm;0;AL;;;;;N;;;;; +0641;ARABIC LETTER FEH;Lo;0;AL;;;;;N;ARABIC LETTER FA;;;; +0642;ARABIC LETTER QAF;Lo;0;AL;;;;;N;;;;; +0643;ARABIC LETTER KAF;Lo;0;AL;;;;;N;ARABIC LETTER CAF;;;; +0644;ARABIC LETTER LAM;Lo;0;AL;;;;;N;;;;; +0645;ARABIC LETTER MEEM;Lo;0;AL;;;;;N;;;;; +0646;ARABIC LETTER NOON;Lo;0;AL;;;;;N;;;;; +0647;ARABIC LETTER HEH;Lo;0;AL;;;;;N;ARABIC LETTER HA;;;; +0648;ARABIC LETTER WAW;Lo;0;AL;;;;;N;;;;; +0649;ARABIC LETTER ALEF MAKSURA;Lo;0;AL;;;;;N;ARABIC LETTER ALEF MAQSURAH;;;; +064A;ARABIC LETTER YEH;Lo;0;AL;;;;;N;ARABIC LETTER YA;;;; +064B;ARABIC FATHATAN;Mn;27;NSM;;;;;N;;;;; +064C;ARABIC DAMMATAN;Mn;28;NSM;;;;;N;;;;; +064D;ARABIC KASRATAN;Mn;29;NSM;;;;;N;;;;; +064E;ARABIC FATHA;Mn;30;NSM;;;;;N;ARABIC FATHAH;;;; +064F;ARABIC DAMMA;Mn;31;NSM;;;;;N;ARABIC DAMMAH;;;; +0650;ARABIC KASRA;Mn;32;NSM;;;;;N;ARABIC KASRAH;;;; +0651;ARABIC SHADDA;Mn;33;NSM;;;;;N;ARABIC SHADDAH;;;; +0652;ARABIC SUKUN;Mn;34;NSM;;;;;N;;;;; +0653;ARABIC MADDAH ABOVE;Mn;230;NSM;;;;;N;;;;; +0654;ARABIC HAMZA ABOVE;Mn;230;NSM;;;;;N;;;;; +0655;ARABIC HAMZA BELOW;Mn;220;NSM;;;;;N;;;;; +0656;ARABIC SUBSCRIPT ALEF;Mn;220;NSM;;;;;N;;;;; +0657;ARABIC INVERTED DAMMA;Mn;230;NSM;;;;;N;;;;; +0658;ARABIC MARK NOON GHUNNA;Mn;230;NSM;;;;;N;;;;; +0659;ARABIC ZWARAKAY;Mn;230;NSM;;;;;N;;;;; +065A;ARABIC VOWEL SIGN SMALL V ABOVE;Mn;230;NSM;;;;;N;;;;; +065B;ARABIC VOWEL SIGN INVERTED SMALL V ABOVE;Mn;230;NSM;;;;;N;;;;; +065C;ARABIC VOWEL SIGN DOT BELOW;Mn;220;NSM;;;;;N;;;;; +065D;ARABIC REVERSED DAMMA;Mn;230;NSM;;;;;N;;;;; +065E;ARABIC FATHA WITH TWO DOTS;Mn;230;NSM;;;;;N;;;;; +065F;ARABIC WAVY HAMZA BELOW;Mn;220;NSM;;;;;N;;;;; +0660;ARABIC-INDIC DIGIT ZERO;Nd;0;AN;;0;0;0;N;;;;; +0661;ARABIC-INDIC DIGIT ONE;Nd;0;AN;;1;1;1;N;;;;; +0662;ARABIC-INDIC DIGIT TWO;Nd;0;AN;;2;2;2;N;;;;; +0663;ARABIC-INDIC DIGIT THREE;Nd;0;AN;;3;3;3;N;;;;; +0664;ARABIC-INDIC DIGIT FOUR;Nd;0;AN;;4;4;4;N;;;;; +0665;ARABIC-INDIC DIGIT FIVE;Nd;0;AN;;5;5;5;N;;;;; +0666;ARABIC-INDIC DIGIT SIX;Nd;0;AN;;6;6;6;N;;;;; +0667;ARABIC-INDIC DIGIT SEVEN;Nd;0;AN;;7;7;7;N;;;;; +0668;ARABIC-INDIC DIGIT EIGHT;Nd;0;AN;;8;8;8;N;;;;; +0669;ARABIC-INDIC DIGIT NINE;Nd;0;AN;;9;9;9;N;;;;; +066A;ARABIC PERCENT SIGN;Po;0;ET;;;;;N;;;;; +066B;ARABIC DECIMAL SEPARATOR;Po;0;AN;;;;;N;;;;; +066C;ARABIC THOUSANDS SEPARATOR;Po;0;AN;;;;;N;;;;; +066D;ARABIC FIVE POINTED STAR;Po;0;AL;;;;;N;;;;; +066E;ARABIC LETTER DOTLESS BEH;Lo;0;AL;;;;;N;;;;; +066F;ARABIC LETTER DOTLESS QAF;Lo;0;AL;;;;;N;;;;; +0670;ARABIC LETTER SUPERSCRIPT ALEF;Mn;35;NSM;;;;;N;ARABIC ALEF ABOVE;;;; +0671;ARABIC LETTER ALEF WASLA;Lo;0;AL;;;;;N;ARABIC LETTER HAMZAT WASL ON ALEF;;;; +0672;ARABIC LETTER ALEF WITH WAVY HAMZA ABOVE;Lo;0;AL;;;;;N;ARABIC LETTER WAVY HAMZAH ON ALEF;;;; +0673;ARABIC LETTER ALEF WITH WAVY HAMZA BELOW;Lo;0;AL;;;;;N;ARABIC LETTER WAVY HAMZAH UNDER ALEF;;;; +0674;ARABIC LETTER HIGH HAMZA;Lo;0;AL;;;;;N;ARABIC LETTER HIGH HAMZAH;;;; +0675;ARABIC LETTER HIGH HAMZA ALEF;Lo;0;AL; 0627 0674;;;;N;ARABIC LETTER HIGH HAMZAH ALEF;;;; +0676;ARABIC LETTER HIGH HAMZA WAW;Lo;0;AL; 0648 0674;;;;N;ARABIC LETTER HIGH HAMZAH WAW;;;; +0677;ARABIC LETTER U WITH HAMZA ABOVE;Lo;0;AL; 06C7 0674;;;;N;ARABIC LETTER HIGH HAMZAH WAW WITH DAMMAH;;;; +0678;ARABIC LETTER HIGH HAMZA YEH;Lo;0;AL; 064A 0674;;;;N;ARABIC LETTER HIGH HAMZAH YA;;;; +0679;ARABIC LETTER TTEH;Lo;0;AL;;;;;N;ARABIC LETTER TAA WITH SMALL TAH;;;; +067A;ARABIC LETTER TTEHEH;Lo;0;AL;;;;;N;ARABIC LETTER TAA WITH TWO DOTS VERTICAL ABOVE;;;; +067B;ARABIC LETTER BEEH;Lo;0;AL;;;;;N;ARABIC LETTER BAA WITH TWO DOTS VERTICAL BELOW;;;; +067C;ARABIC LETTER TEH WITH RING;Lo;0;AL;;;;;N;ARABIC LETTER TAA WITH RING;;;; +067D;ARABIC LETTER TEH WITH THREE DOTS ABOVE DOWNWARDS;Lo;0;AL;;;;;N;ARABIC LETTER TAA WITH THREE DOTS ABOVE DOWNWARD;;;; +067E;ARABIC LETTER PEH;Lo;0;AL;;;;;N;ARABIC LETTER TAA WITH THREE DOTS BELOW;;;; +067F;ARABIC LETTER TEHEH;Lo;0;AL;;;;;N;ARABIC LETTER TAA WITH FOUR DOTS ABOVE;;;; +0680;ARABIC LETTER BEHEH;Lo;0;AL;;;;;N;ARABIC LETTER BAA WITH FOUR DOTS BELOW;;;; +0681;ARABIC LETTER HAH WITH HAMZA ABOVE;Lo;0;AL;;;;;N;ARABIC LETTER HAMZAH ON HAA;;;; +0682;ARABIC LETTER HAH WITH TWO DOTS VERTICAL ABOVE;Lo;0;AL;;;;;N;ARABIC LETTER HAA WITH TWO DOTS VERTICAL ABOVE;;;; +0683;ARABIC LETTER NYEH;Lo;0;AL;;;;;N;ARABIC LETTER HAA WITH MIDDLE TWO DOTS;;;; +0684;ARABIC LETTER DYEH;Lo;0;AL;;;;;N;ARABIC LETTER HAA WITH MIDDLE TWO DOTS VERTICAL;;;; +0685;ARABIC LETTER HAH WITH THREE DOTS ABOVE;Lo;0;AL;;;;;N;ARABIC LETTER HAA WITH THREE DOTS ABOVE;;;; +0686;ARABIC LETTER TCHEH;Lo;0;AL;;;;;N;ARABIC LETTER HAA WITH MIDDLE THREE DOTS DOWNWARD;;;; +0687;ARABIC LETTER TCHEHEH;Lo;0;AL;;;;;N;ARABIC LETTER HAA WITH MIDDLE FOUR DOTS;;;; +0688;ARABIC LETTER DDAL;Lo;0;AL;;;;;N;ARABIC LETTER DAL WITH SMALL TAH;;;; +0689;ARABIC LETTER DAL WITH RING;Lo;0;AL;;;;;N;;;;; +068A;ARABIC LETTER DAL WITH DOT BELOW;Lo;0;AL;;;;;N;;;;; +068B;ARABIC LETTER DAL WITH DOT BELOW AND SMALL TAH;Lo;0;AL;;;;;N;;;;; +068C;ARABIC LETTER DAHAL;Lo;0;AL;;;;;N;ARABIC LETTER DAL WITH TWO DOTS ABOVE;;;; +068D;ARABIC LETTER DDAHAL;Lo;0;AL;;;;;N;ARABIC LETTER DAL WITH TWO DOTS BELOW;;;; +068E;ARABIC LETTER DUL;Lo;0;AL;;;;;N;ARABIC LETTER DAL WITH THREE DOTS ABOVE;;;; +068F;ARABIC LETTER DAL WITH THREE DOTS ABOVE DOWNWARDS;Lo;0;AL;;;;;N;ARABIC LETTER DAL WITH THREE DOTS ABOVE DOWNWARD;;;; +0690;ARABIC LETTER DAL WITH FOUR DOTS ABOVE;Lo;0;AL;;;;;N;;;;; +0691;ARABIC LETTER RREH;Lo;0;AL;;;;;N;ARABIC LETTER RA WITH SMALL TAH;;;; +0692;ARABIC LETTER REH WITH SMALL V;Lo;0;AL;;;;;N;ARABIC LETTER RA WITH SMALL V;;;; +0693;ARABIC LETTER REH WITH RING;Lo;0;AL;;;;;N;ARABIC LETTER RA WITH RING;;;; +0694;ARABIC LETTER REH WITH DOT BELOW;Lo;0;AL;;;;;N;ARABIC LETTER RA WITH DOT BELOW;;;; +0695;ARABIC LETTER REH WITH SMALL V BELOW;Lo;0;AL;;;;;N;ARABIC LETTER RA WITH SMALL V BELOW;;;; +0696;ARABIC LETTER REH WITH DOT BELOW AND DOT ABOVE;Lo;0;AL;;;;;N;ARABIC LETTER RA WITH DOT BELOW AND DOT ABOVE;;;; +0697;ARABIC LETTER REH WITH TWO DOTS ABOVE;Lo;0;AL;;;;;N;ARABIC LETTER RA WITH TWO DOTS ABOVE;;;; +0698;ARABIC LETTER JEH;Lo;0;AL;;;;;N;ARABIC LETTER RA WITH THREE DOTS ABOVE;;;; +0699;ARABIC LETTER REH WITH FOUR DOTS ABOVE;Lo;0;AL;;;;;N;ARABIC LETTER RA WITH FOUR DOTS ABOVE;;;; +069A;ARABIC LETTER SEEN WITH DOT BELOW AND DOT ABOVE;Lo;0;AL;;;;;N;;;;; +069B;ARABIC LETTER SEEN WITH THREE DOTS BELOW;Lo;0;AL;;;;;N;;;;; +069C;ARABIC LETTER SEEN WITH THREE DOTS BELOW AND THREE DOTS ABOVE;Lo;0;AL;;;;;N;;;;; +069D;ARABIC LETTER SAD WITH TWO DOTS BELOW;Lo;0;AL;;;;;N;;;;; +069E;ARABIC LETTER SAD WITH THREE DOTS ABOVE;Lo;0;AL;;;;;N;;;;; +069F;ARABIC LETTER TAH WITH THREE DOTS ABOVE;Lo;0;AL;;;;;N;;;;; +06A0;ARABIC LETTER AIN WITH THREE DOTS ABOVE;Lo;0;AL;;;;;N;;;;; +06A1;ARABIC LETTER DOTLESS FEH;Lo;0;AL;;;;;N;ARABIC LETTER DOTLESS FA;;;; +06A2;ARABIC LETTER FEH WITH DOT MOVED BELOW;Lo;0;AL;;;;;N;ARABIC LETTER FA WITH DOT MOVED BELOW;;;; +06A3;ARABIC LETTER FEH WITH DOT BELOW;Lo;0;AL;;;;;N;ARABIC LETTER FA WITH DOT BELOW;;;; +06A4;ARABIC LETTER VEH;Lo;0;AL;;;;;N;ARABIC LETTER FA WITH THREE DOTS ABOVE;;;; +06A5;ARABIC LETTER FEH WITH THREE DOTS BELOW;Lo;0;AL;;;;;N;ARABIC LETTER FA WITH THREE DOTS BELOW;;;; +06A6;ARABIC LETTER PEHEH;Lo;0;AL;;;;;N;ARABIC LETTER FA WITH FOUR DOTS ABOVE;;;; +06A7;ARABIC LETTER QAF WITH DOT ABOVE;Lo;0;AL;;;;;N;;;;; +06A8;ARABIC LETTER QAF WITH THREE DOTS ABOVE;Lo;0;AL;;;;;N;;;;; +06A9;ARABIC LETTER KEHEH;Lo;0;AL;;;;;N;ARABIC LETTER OPEN CAF;;;; +06AA;ARABIC LETTER SWASH KAF;Lo;0;AL;;;;;N;ARABIC LETTER SWASH CAF;;;; +06AB;ARABIC LETTER KAF WITH RING;Lo;0;AL;;;;;N;ARABIC LETTER CAF WITH RING;;;; +06AC;ARABIC LETTER KAF WITH DOT ABOVE;Lo;0;AL;;;;;N;ARABIC LETTER CAF WITH DOT ABOVE;;;; +06AD;ARABIC LETTER NG;Lo;0;AL;;;;;N;ARABIC LETTER CAF WITH THREE DOTS ABOVE;;;; +06AE;ARABIC LETTER KAF WITH THREE DOTS BELOW;Lo;0;AL;;;;;N;ARABIC LETTER CAF WITH THREE DOTS BELOW;;;; +06AF;ARABIC LETTER GAF;Lo;0;AL;;;;;N;;;;; +06B0;ARABIC LETTER GAF WITH RING;Lo;0;AL;;;;;N;;;;; +06B1;ARABIC LETTER NGOEH;Lo;0;AL;;;;;N;ARABIC LETTER GAF WITH TWO DOTS ABOVE;;;; +06B2;ARABIC LETTER GAF WITH TWO DOTS BELOW;Lo;0;AL;;;;;N;;;;; +06B3;ARABIC LETTER GUEH;Lo;0;AL;;;;;N;ARABIC LETTER GAF WITH TWO DOTS VERTICAL BELOW;;;; +06B4;ARABIC LETTER GAF WITH THREE DOTS ABOVE;Lo;0;AL;;;;;N;;;;; +06B5;ARABIC LETTER LAM WITH SMALL V;Lo;0;AL;;;;;N;;;;; +06B6;ARABIC LETTER LAM WITH DOT ABOVE;Lo;0;AL;;;;;N;;;;; +06B7;ARABIC LETTER LAM WITH THREE DOTS ABOVE;Lo;0;AL;;;;;N;;;;; +06B8;ARABIC LETTER LAM WITH THREE DOTS BELOW;Lo;0;AL;;;;;N;;;;; +06B9;ARABIC LETTER NOON WITH DOT BELOW;Lo;0;AL;;;;;N;;;;; +06BA;ARABIC LETTER NOON GHUNNA;Lo;0;AL;;;;;N;ARABIC LETTER DOTLESS NOON;;;; +06BB;ARABIC LETTER RNOON;Lo;0;AL;;;;;N;ARABIC LETTER DOTLESS NOON WITH SMALL TAH;;;; +06BC;ARABIC LETTER NOON WITH RING;Lo;0;AL;;;;;N;;;;; +06BD;ARABIC LETTER NOON WITH THREE DOTS ABOVE;Lo;0;AL;;;;;N;;;;; +06BE;ARABIC LETTER HEH DOACHASHMEE;Lo;0;AL;;;;;N;ARABIC LETTER KNOTTED HA;;;; +06BF;ARABIC LETTER TCHEH WITH DOT ABOVE;Lo;0;AL;;;;;N;;;;; +06C0;ARABIC LETTER HEH WITH YEH ABOVE;Lo;0;AL;06D5 0654;;;;N;ARABIC LETTER HAMZAH ON HA;;;; +06C1;ARABIC LETTER HEH GOAL;Lo;0;AL;;;;;N;ARABIC LETTER HA GOAL;;;; +06C2;ARABIC LETTER HEH GOAL WITH HAMZA ABOVE;Lo;0;AL;06C1 0654;;;;N;ARABIC LETTER HAMZAH ON HA GOAL;;;; +06C3;ARABIC LETTER TEH MARBUTA GOAL;Lo;0;AL;;;;;N;ARABIC LETTER TAA MARBUTAH GOAL;;;; +06C4;ARABIC LETTER WAW WITH RING;Lo;0;AL;;;;;N;;;;; +06C5;ARABIC LETTER KIRGHIZ OE;Lo;0;AL;;;;;N;ARABIC LETTER WAW WITH BAR;;;; +06C6;ARABIC LETTER OE;Lo;0;AL;;;;;N;ARABIC LETTER WAW WITH SMALL V;;;; +06C7;ARABIC LETTER U;Lo;0;AL;;;;;N;ARABIC LETTER WAW WITH DAMMAH;;;; +06C8;ARABIC LETTER YU;Lo;0;AL;;;;;N;ARABIC LETTER WAW WITH ALEF ABOVE;;;; +06C9;ARABIC LETTER KIRGHIZ YU;Lo;0;AL;;;;;N;ARABIC LETTER WAW WITH INVERTED SMALL V;;;; +06CA;ARABIC LETTER WAW WITH TWO DOTS ABOVE;Lo;0;AL;;;;;N;;;;; +06CB;ARABIC LETTER VE;Lo;0;AL;;;;;N;ARABIC LETTER WAW WITH THREE DOTS ABOVE;;;; +06CC;ARABIC LETTER FARSI YEH;Lo;0;AL;;;;;N;ARABIC LETTER DOTLESS YA;;;; +06CD;ARABIC LETTER YEH WITH TAIL;Lo;0;AL;;;;;N;ARABIC LETTER YA WITH TAIL;;;; +06CE;ARABIC LETTER YEH WITH SMALL V;Lo;0;AL;;;;;N;ARABIC LETTER YA WITH SMALL V;;;; +06CF;ARABIC LETTER WAW WITH DOT ABOVE;Lo;0;AL;;;;;N;;;;; +06D0;ARABIC LETTER E;Lo;0;AL;;;;;N;ARABIC LETTER YA WITH TWO DOTS VERTICAL BELOW;;;; +06D1;ARABIC LETTER YEH WITH THREE DOTS BELOW;Lo;0;AL;;;;;N;ARABIC LETTER YA WITH THREE DOTS BELOW;;;; +06D2;ARABIC LETTER YEH BARREE;Lo;0;AL;;;;;N;ARABIC LETTER YA BARREE;;;; +06D3;ARABIC LETTER YEH BARREE WITH HAMZA ABOVE;Lo;0;AL;06D2 0654;;;;N;ARABIC LETTER HAMZAH ON YA BARREE;;;; +06D4;ARABIC FULL STOP;Po;0;AL;;;;;N;ARABIC PERIOD;;;; +06D5;ARABIC LETTER AE;Lo;0;AL;;;;;N;;;;; +06D6;ARABIC SMALL HIGH LIGATURE SAD WITH LAM WITH ALEF MAKSURA;Mn;230;NSM;;;;;N;;;;; +06D7;ARABIC SMALL HIGH LIGATURE QAF WITH LAM WITH ALEF MAKSURA;Mn;230;NSM;;;;;N;;;;; +06D8;ARABIC SMALL HIGH MEEM INITIAL FORM;Mn;230;NSM;;;;;N;;;;; +06D9;ARABIC SMALL HIGH LAM ALEF;Mn;230;NSM;;;;;N;;;;; +06DA;ARABIC SMALL HIGH JEEM;Mn;230;NSM;;;;;N;;;;; +06DB;ARABIC SMALL HIGH THREE DOTS;Mn;230;NSM;;;;;N;;;;; +06DC;ARABIC SMALL HIGH SEEN;Mn;230;NSM;;;;;N;;;;; +06DD;ARABIC END OF AYAH;Cf;0;AN;;;;;N;;;;; +06DE;ARABIC START OF RUB EL HIZB;So;0;ON;;;;;N;;;;; +06DF;ARABIC SMALL HIGH ROUNDED ZERO;Mn;230;NSM;;;;;N;;;;; +06E0;ARABIC SMALL HIGH UPRIGHT RECTANGULAR ZERO;Mn;230;NSM;;;;;N;;;;; +06E1;ARABIC SMALL HIGH DOTLESS HEAD OF KHAH;Mn;230;NSM;;;;;N;;;;; +06E2;ARABIC SMALL HIGH MEEM ISOLATED FORM;Mn;230;NSM;;;;;N;;;;; +06E3;ARABIC SMALL LOW SEEN;Mn;220;NSM;;;;;N;;;;; +06E4;ARABIC SMALL HIGH MADDA;Mn;230;NSM;;;;;N;;;;; +06E5;ARABIC SMALL WAW;Lm;0;AL;;;;;N;;;;; +06E6;ARABIC SMALL YEH;Lm;0;AL;;;;;N;;;;; +06E7;ARABIC SMALL HIGH YEH;Mn;230;NSM;;;;;N;;;;; +06E8;ARABIC SMALL HIGH NOON;Mn;230;NSM;;;;;N;;;;; +06E9;ARABIC PLACE OF SAJDAH;So;0;ON;;;;;N;;;;; +06EA;ARABIC EMPTY CENTRE LOW STOP;Mn;220;NSM;;;;;N;;;;; +06EB;ARABIC EMPTY CENTRE HIGH STOP;Mn;230;NSM;;;;;N;;;;; +06EC;ARABIC ROUNDED HIGH STOP WITH FILLED CENTRE;Mn;230;NSM;;;;;N;;;;; +06ED;ARABIC SMALL LOW MEEM;Mn;220;NSM;;;;;N;;;;; +06EE;ARABIC LETTER DAL WITH INVERTED V;Lo;0;AL;;;;;N;;;;; +06EF;ARABIC LETTER REH WITH INVERTED V;Lo;0;AL;;;;;N;;;;; +06F0;EXTENDED ARABIC-INDIC DIGIT ZERO;Nd;0;EN;;0;0;0;N;EASTERN ARABIC-INDIC DIGIT ZERO;;;; +06F1;EXTENDED ARABIC-INDIC DIGIT ONE;Nd;0;EN;;1;1;1;N;EASTERN ARABIC-INDIC DIGIT ONE;;;; +06F2;EXTENDED ARABIC-INDIC DIGIT TWO;Nd;0;EN;;2;2;2;N;EASTERN ARABIC-INDIC DIGIT TWO;;;; +06F3;EXTENDED ARABIC-INDIC DIGIT THREE;Nd;0;EN;;3;3;3;N;EASTERN ARABIC-INDIC DIGIT THREE;;;; +06F4;EXTENDED ARABIC-INDIC DIGIT FOUR;Nd;0;EN;;4;4;4;N;EASTERN ARABIC-INDIC DIGIT FOUR;;;; +06F5;EXTENDED ARABIC-INDIC DIGIT FIVE;Nd;0;EN;;5;5;5;N;EASTERN ARABIC-INDIC DIGIT FIVE;;;; +06F6;EXTENDED ARABIC-INDIC DIGIT SIX;Nd;0;EN;;6;6;6;N;EASTERN ARABIC-INDIC DIGIT SIX;;;; +06F7;EXTENDED ARABIC-INDIC DIGIT SEVEN;Nd;0;EN;;7;7;7;N;EASTERN ARABIC-INDIC DIGIT SEVEN;;;; +06F8;EXTENDED ARABIC-INDIC DIGIT EIGHT;Nd;0;EN;;8;8;8;N;EASTERN ARABIC-INDIC DIGIT EIGHT;;;; +06F9;EXTENDED ARABIC-INDIC DIGIT NINE;Nd;0;EN;;9;9;9;N;EASTERN ARABIC-INDIC DIGIT NINE;;;; +06FA;ARABIC LETTER SHEEN WITH DOT BELOW;Lo;0;AL;;;;;N;;;;; +06FB;ARABIC LETTER DAD WITH DOT BELOW;Lo;0;AL;;;;;N;;;;; +06FC;ARABIC LETTER GHAIN WITH DOT BELOW;Lo;0;AL;;;;;N;;;;; +06FD;ARABIC SIGN SINDHI AMPERSAND;So;0;AL;;;;;N;;;;; +06FE;ARABIC SIGN SINDHI POSTPOSITION MEN;So;0;AL;;;;;N;;;;; +06FF;ARABIC LETTER HEH WITH INVERTED V;Lo;0;AL;;;;;N;;;;; +0700;SYRIAC END OF PARAGRAPH;Po;0;AL;;;;;N;;;;; +0701;SYRIAC SUPRALINEAR FULL STOP;Po;0;AL;;;;;N;;;;; +0702;SYRIAC SUBLINEAR FULL STOP;Po;0;AL;;;;;N;;;;; +0703;SYRIAC SUPRALINEAR COLON;Po;0;AL;;;;;N;;;;; +0704;SYRIAC SUBLINEAR COLON;Po;0;AL;;;;;N;;;;; +0705;SYRIAC HORIZONTAL COLON;Po;0;AL;;;;;N;;;;; +0706;SYRIAC COLON SKEWED LEFT;Po;0;AL;;;;;N;;;;; +0707;SYRIAC COLON SKEWED RIGHT;Po;0;AL;;;;;N;;;;; +0708;SYRIAC SUPRALINEAR COLON SKEWED LEFT;Po;0;AL;;;;;N;;;;; +0709;SYRIAC SUBLINEAR COLON SKEWED RIGHT;Po;0;AL;;;;;N;;;;; +070A;SYRIAC CONTRACTION;Po;0;AL;;;;;N;;;;; +070B;SYRIAC HARKLEAN OBELUS;Po;0;AL;;;;;N;;;;; +070C;SYRIAC HARKLEAN METOBELUS;Po;0;AL;;;;;N;;;;; +070D;SYRIAC HARKLEAN ASTERISCUS;Po;0;AL;;;;;N;;;;; +070F;SYRIAC ABBREVIATION MARK;Cf;0;AL;;;;;N;;;;; +0710;SYRIAC LETTER ALAPH;Lo;0;AL;;;;;N;;;;; +0711;SYRIAC LETTER SUPERSCRIPT ALAPH;Mn;36;NSM;;;;;N;;;;; +0712;SYRIAC LETTER BETH;Lo;0;AL;;;;;N;;;;; +0713;SYRIAC LETTER GAMAL;Lo;0;AL;;;;;N;;;;; +0714;SYRIAC LETTER GAMAL GARSHUNI;Lo;0;AL;;;;;N;;;;; +0715;SYRIAC LETTER DALATH;Lo;0;AL;;;;;N;;;;; +0716;SYRIAC LETTER DOTLESS DALATH RISH;Lo;0;AL;;;;;N;;;;; +0717;SYRIAC LETTER HE;Lo;0;AL;;;;;N;;;;; +0718;SYRIAC LETTER WAW;Lo;0;AL;;;;;N;;;;; +0719;SYRIAC LETTER ZAIN;Lo;0;AL;;;;;N;;;;; +071A;SYRIAC LETTER HETH;Lo;0;AL;;;;;N;;;;; +071B;SYRIAC LETTER TETH;Lo;0;AL;;;;;N;;;;; +071C;SYRIAC LETTER TETH GARSHUNI;Lo;0;AL;;;;;N;;;;; +071D;SYRIAC LETTER YUDH;Lo;0;AL;;;;;N;;;;; +071E;SYRIAC LETTER YUDH HE;Lo;0;AL;;;;;N;;;;; +071F;SYRIAC LETTER KAPH;Lo;0;AL;;;;;N;;;;; +0720;SYRIAC LETTER LAMADH;Lo;0;AL;;;;;N;;;;; +0721;SYRIAC LETTER MIM;Lo;0;AL;;;;;N;;;;; +0722;SYRIAC LETTER NUN;Lo;0;AL;;;;;N;;;;; +0723;SYRIAC LETTER SEMKATH;Lo;0;AL;;;;;N;;;;; +0724;SYRIAC LETTER FINAL SEMKATH;Lo;0;AL;;;;;N;;;;; +0725;SYRIAC LETTER E;Lo;0;AL;;;;;N;;;;; +0726;SYRIAC LETTER PE;Lo;0;AL;;;;;N;;;;; +0727;SYRIAC LETTER REVERSED PE;Lo;0;AL;;;;;N;;;;; +0728;SYRIAC LETTER SADHE;Lo;0;AL;;;;;N;;;;; +0729;SYRIAC LETTER QAPH;Lo;0;AL;;;;;N;;;;; +072A;SYRIAC LETTER RISH;Lo;0;AL;;;;;N;;;;; +072B;SYRIAC LETTER SHIN;Lo;0;AL;;;;;N;;;;; +072C;SYRIAC LETTER TAW;Lo;0;AL;;;;;N;;;;; +072D;SYRIAC LETTER PERSIAN BHETH;Lo;0;AL;;;;;N;;;;; +072E;SYRIAC LETTER PERSIAN GHAMAL;Lo;0;AL;;;;;N;;;;; +072F;SYRIAC LETTER PERSIAN DHALATH;Lo;0;AL;;;;;N;;;;; +0730;SYRIAC PTHAHA ABOVE;Mn;230;NSM;;;;;N;;;;; +0731;SYRIAC PTHAHA BELOW;Mn;220;NSM;;;;;N;;;;; +0732;SYRIAC PTHAHA DOTTED;Mn;230;NSM;;;;;N;;;;; +0733;SYRIAC ZQAPHA ABOVE;Mn;230;NSM;;;;;N;;;;; +0734;SYRIAC ZQAPHA BELOW;Mn;220;NSM;;;;;N;;;;; +0735;SYRIAC ZQAPHA DOTTED;Mn;230;NSM;;;;;N;;;;; +0736;SYRIAC RBASA ABOVE;Mn;230;NSM;;;;;N;;;;; +0737;SYRIAC RBASA BELOW;Mn;220;NSM;;;;;N;;;;; +0738;SYRIAC DOTTED ZLAMA HORIZONTAL;Mn;220;NSM;;;;;N;;;;; +0739;SYRIAC DOTTED ZLAMA ANGULAR;Mn;220;NSM;;;;;N;;;;; +073A;SYRIAC HBASA ABOVE;Mn;230;NSM;;;;;N;;;;; +073B;SYRIAC HBASA BELOW;Mn;220;NSM;;;;;N;;;;; +073C;SYRIAC HBASA-ESASA DOTTED;Mn;220;NSM;;;;;N;;;;; +073D;SYRIAC ESASA ABOVE;Mn;230;NSM;;;;;N;;;;; +073E;SYRIAC ESASA BELOW;Mn;220;NSM;;;;;N;;;;; +073F;SYRIAC RWAHA;Mn;230;NSM;;;;;N;;;;; +0740;SYRIAC FEMININE DOT;Mn;230;NSM;;;;;N;;;;; +0741;SYRIAC QUSHSHAYA;Mn;230;NSM;;;;;N;;;;; +0742;SYRIAC RUKKAKHA;Mn;220;NSM;;;;;N;;;;; +0743;SYRIAC TWO VERTICAL DOTS ABOVE;Mn;230;NSM;;;;;N;;;;; +0744;SYRIAC TWO VERTICAL DOTS BELOW;Mn;220;NSM;;;;;N;;;;; +0745;SYRIAC THREE DOTS ABOVE;Mn;230;NSM;;;;;N;;;;; +0746;SYRIAC THREE DOTS BELOW;Mn;220;NSM;;;;;N;;;;; +0747;SYRIAC OBLIQUE LINE ABOVE;Mn;230;NSM;;;;;N;;;;; +0748;SYRIAC OBLIQUE LINE BELOW;Mn;220;NSM;;;;;N;;;;; +0749;SYRIAC MUSIC;Mn;230;NSM;;;;;N;;;;; +074A;SYRIAC BARREKH;Mn;230;NSM;;;;;N;;;;; +074D;SYRIAC LETTER SOGDIAN ZHAIN;Lo;0;AL;;;;;N;;;;; +074E;SYRIAC LETTER SOGDIAN KHAPH;Lo;0;AL;;;;;N;;;;; +074F;SYRIAC LETTER SOGDIAN FE;Lo;0;AL;;;;;N;;;;; +0750;ARABIC LETTER BEH WITH THREE DOTS HORIZONTALLY BELOW;Lo;0;AL;;;;;N;;;;; +0751;ARABIC LETTER BEH WITH DOT BELOW AND THREE DOTS ABOVE;Lo;0;AL;;;;;N;;;;; +0752;ARABIC LETTER BEH WITH THREE DOTS POINTING UPWARDS BELOW;Lo;0;AL;;;;;N;;;;; +0753;ARABIC LETTER BEH WITH THREE DOTS POINTING UPWARDS BELOW AND TWO DOTS ABOVE;Lo;0;AL;;;;;N;;;;; +0754;ARABIC LETTER BEH WITH TWO DOTS BELOW AND DOT ABOVE;Lo;0;AL;;;;;N;;;;; +0755;ARABIC LETTER BEH WITH INVERTED SMALL V BELOW;Lo;0;AL;;;;;N;;;;; +0756;ARABIC LETTER BEH WITH SMALL V;Lo;0;AL;;;;;N;;;;; +0757;ARABIC LETTER HAH WITH TWO DOTS ABOVE;Lo;0;AL;;;;;N;;;;; +0758;ARABIC LETTER HAH WITH THREE DOTS POINTING UPWARDS BELOW;Lo;0;AL;;;;;N;;;;; +0759;ARABIC LETTER DAL WITH TWO DOTS VERTICALLY BELOW AND SMALL TAH;Lo;0;AL;;;;;N;;;;; +075A;ARABIC LETTER DAL WITH INVERTED SMALL V BELOW;Lo;0;AL;;;;;N;;;;; +075B;ARABIC LETTER REH WITH STROKE;Lo;0;AL;;;;;N;;;;; +075C;ARABIC LETTER SEEN WITH FOUR DOTS ABOVE;Lo;0;AL;;;;;N;;;;; +075D;ARABIC LETTER AIN WITH TWO DOTS ABOVE;Lo;0;AL;;;;;N;;;;; +075E;ARABIC LETTER AIN WITH THREE DOTS POINTING DOWNWARDS ABOVE;Lo;0;AL;;;;;N;;;;; +075F;ARABIC LETTER AIN WITH TWO DOTS VERTICALLY ABOVE;Lo;0;AL;;;;;N;;;;; +0760;ARABIC LETTER FEH WITH TWO DOTS BELOW;Lo;0;AL;;;;;N;;;;; +0761;ARABIC LETTER FEH WITH THREE DOTS POINTING UPWARDS BELOW;Lo;0;AL;;;;;N;;;;; +0762;ARABIC LETTER KEHEH WITH DOT ABOVE;Lo;0;AL;;;;;N;;;;; +0763;ARABIC LETTER KEHEH WITH THREE DOTS ABOVE;Lo;0;AL;;;;;N;;;;; +0764;ARABIC LETTER KEHEH WITH THREE DOTS POINTING UPWARDS BELOW;Lo;0;AL;;;;;N;;;;; +0765;ARABIC LETTER MEEM WITH DOT ABOVE;Lo;0;AL;;;;;N;;;;; +0766;ARABIC LETTER MEEM WITH DOT BELOW;Lo;0;AL;;;;;N;;;;; +0767;ARABIC LETTER NOON WITH TWO DOTS BELOW;Lo;0;AL;;;;;N;;;;; +0768;ARABIC LETTER NOON WITH SMALL TAH;Lo;0;AL;;;;;N;;;;; +0769;ARABIC LETTER NOON WITH SMALL V;Lo;0;AL;;;;;N;;;;; +076A;ARABIC LETTER LAM WITH BAR;Lo;0;AL;;;;;N;;;;; +076B;ARABIC LETTER REH WITH TWO DOTS VERTICALLY ABOVE;Lo;0;AL;;;;;N;;;;; +076C;ARABIC LETTER REH WITH HAMZA ABOVE;Lo;0;AL;;;;;N;;;;; +076D;ARABIC LETTER SEEN WITH TWO DOTS VERTICALLY ABOVE;Lo;0;AL;;;;;N;;;;; +076E;ARABIC LETTER HAH WITH SMALL ARABIC LETTER TAH BELOW;Lo;0;AL;;;;;N;;;;; +076F;ARABIC LETTER HAH WITH SMALL ARABIC LETTER TAH AND TWO DOTS;Lo;0;AL;;;;;N;;;;; +0770;ARABIC LETTER SEEN WITH SMALL ARABIC LETTER TAH AND TWO DOTS;Lo;0;AL;;;;;N;;;;; +0771;ARABIC LETTER REH WITH SMALL ARABIC LETTER TAH AND TWO DOTS;Lo;0;AL;;;;;N;;;;; +0772;ARABIC LETTER HAH WITH SMALL ARABIC LETTER TAH ABOVE;Lo;0;AL;;;;;N;;;;; +0773;ARABIC LETTER ALEF WITH EXTENDED ARABIC-INDIC DIGIT TWO ABOVE;Lo;0;AL;;;;;N;;;;; +0774;ARABIC LETTER ALEF WITH EXTENDED ARABIC-INDIC DIGIT THREE ABOVE;Lo;0;AL;;;;;N;;;;; +0775;ARABIC LETTER FARSI YEH WITH EXTENDED ARABIC-INDIC DIGIT TWO ABOVE;Lo;0;AL;;;;;N;;;;; +0776;ARABIC LETTER FARSI YEH WITH EXTENDED ARABIC-INDIC DIGIT THREE ABOVE;Lo;0;AL;;;;;N;;;;; +0777;ARABIC LETTER FARSI YEH WITH EXTENDED ARABIC-INDIC DIGIT FOUR BELOW;Lo;0;AL;;;;;N;;;;; +0778;ARABIC LETTER WAW WITH EXTENDED ARABIC-INDIC DIGIT TWO ABOVE;Lo;0;AL;;;;;N;;;;; +0779;ARABIC LETTER WAW WITH EXTENDED ARABIC-INDIC DIGIT THREE ABOVE;Lo;0;AL;;;;;N;;;;; +077A;ARABIC LETTER YEH BARREE WITH EXTENDED ARABIC-INDIC DIGIT TWO ABOVE;Lo;0;AL;;;;;N;;;;; +077B;ARABIC LETTER YEH BARREE WITH EXTENDED ARABIC-INDIC DIGIT THREE ABOVE;Lo;0;AL;;;;;N;;;;; +077C;ARABIC LETTER HAH WITH EXTENDED ARABIC-INDIC DIGIT FOUR BELOW;Lo;0;AL;;;;;N;;;;; +077D;ARABIC LETTER SEEN WITH EXTENDED ARABIC-INDIC DIGIT FOUR ABOVE;Lo;0;AL;;;;;N;;;;; +077E;ARABIC LETTER SEEN WITH INVERTED V;Lo;0;AL;;;;;N;;;;; +077F;ARABIC LETTER KAF WITH TWO DOTS ABOVE;Lo;0;AL;;;;;N;;;;; +0780;THAANA LETTER HAA;Lo;0;AL;;;;;N;;;;; +0781;THAANA LETTER SHAVIYANI;Lo;0;AL;;;;;N;;;;; +0782;THAANA LETTER NOONU;Lo;0;AL;;;;;N;;;;; +0783;THAANA LETTER RAA;Lo;0;AL;;;;;N;;;;; +0784;THAANA LETTER BAA;Lo;0;AL;;;;;N;;;;; +0785;THAANA LETTER LHAVIYANI;Lo;0;AL;;;;;N;;;;; +0786;THAANA LETTER KAAFU;Lo;0;AL;;;;;N;;;;; +0787;THAANA LETTER ALIFU;Lo;0;AL;;;;;N;;;;; +0788;THAANA LETTER VAAVU;Lo;0;AL;;;;;N;;;;; +0789;THAANA LETTER MEEMU;Lo;0;AL;;;;;N;;;;; +078A;THAANA LETTER FAAFU;Lo;0;AL;;;;;N;;;;; +078B;THAANA LETTER DHAALU;Lo;0;AL;;;;;N;;;;; +078C;THAANA LETTER THAA;Lo;0;AL;;;;;N;;;;; +078D;THAANA LETTER LAAMU;Lo;0;AL;;;;;N;;;;; +078E;THAANA LETTER GAAFU;Lo;0;AL;;;;;N;;;;; +078F;THAANA LETTER GNAVIYANI;Lo;0;AL;;;;;N;;;;; +0790;THAANA LETTER SEENU;Lo;0;AL;;;;;N;;;;; +0791;THAANA LETTER DAVIYANI;Lo;0;AL;;;;;N;;;;; +0792;THAANA LETTER ZAVIYANI;Lo;0;AL;;;;;N;;;;; +0793;THAANA LETTER TAVIYANI;Lo;0;AL;;;;;N;;;;; +0794;THAANA LETTER YAA;Lo;0;AL;;;;;N;;;;; +0795;THAANA LETTER PAVIYANI;Lo;0;AL;;;;;N;;;;; +0796;THAANA LETTER JAVIYANI;Lo;0;AL;;;;;N;;;;; +0797;THAANA LETTER CHAVIYANI;Lo;0;AL;;;;;N;;;;; +0798;THAANA LETTER TTAA;Lo;0;AL;;;;;N;;;;; +0799;THAANA LETTER HHAA;Lo;0;AL;;;;;N;;;;; +079A;THAANA LETTER KHAA;Lo;0;AL;;;;;N;;;;; +079B;THAANA LETTER THAALU;Lo;0;AL;;;;;N;;;;; +079C;THAANA LETTER ZAA;Lo;0;AL;;;;;N;;;;; +079D;THAANA LETTER SHEENU;Lo;0;AL;;;;;N;;;;; +079E;THAANA LETTER SAADHU;Lo;0;AL;;;;;N;;;;; +079F;THAANA LETTER DAADHU;Lo;0;AL;;;;;N;;;;; +07A0;THAANA LETTER TO;Lo;0;AL;;;;;N;;;;; +07A1;THAANA LETTER ZO;Lo;0;AL;;;;;N;;;;; +07A2;THAANA LETTER AINU;Lo;0;AL;;;;;N;;;;; +07A3;THAANA LETTER GHAINU;Lo;0;AL;;;;;N;;;;; +07A4;THAANA LETTER QAAFU;Lo;0;AL;;;;;N;;;;; +07A5;THAANA LETTER WAAVU;Lo;0;AL;;;;;N;;;;; +07A6;THAANA ABAFILI;Mn;0;NSM;;;;;N;;;;; +07A7;THAANA AABAAFILI;Mn;0;NSM;;;;;N;;;;; +07A8;THAANA IBIFILI;Mn;0;NSM;;;;;N;;;;; +07A9;THAANA EEBEEFILI;Mn;0;NSM;;;;;N;;;;; +07AA;THAANA UBUFILI;Mn;0;NSM;;;;;N;;;;; +07AB;THAANA OOBOOFILI;Mn;0;NSM;;;;;N;;;;; +07AC;THAANA EBEFILI;Mn;0;NSM;;;;;N;;;;; +07AD;THAANA EYBEYFILI;Mn;0;NSM;;;;;N;;;;; +07AE;THAANA OBOFILI;Mn;0;NSM;;;;;N;;;;; +07AF;THAANA OABOAFILI;Mn;0;NSM;;;;;N;;;;; +07B0;THAANA SUKUN;Mn;0;NSM;;;;;N;;;;; +07B1;THAANA LETTER NAA;Lo;0;AL;;;;;N;;;;; +07C0;NKO DIGIT ZERO;Nd;0;R;;0;0;0;N;;;;; +07C1;NKO DIGIT ONE;Nd;0;R;;1;1;1;N;;;;; +07C2;NKO DIGIT TWO;Nd;0;R;;2;2;2;N;;;;; +07C3;NKO DIGIT THREE;Nd;0;R;;3;3;3;N;;;;; +07C4;NKO DIGIT FOUR;Nd;0;R;;4;4;4;N;;;;; +07C5;NKO DIGIT FIVE;Nd;0;R;;5;5;5;N;;;;; +07C6;NKO DIGIT SIX;Nd;0;R;;6;6;6;N;;;;; +07C7;NKO DIGIT SEVEN;Nd;0;R;;7;7;7;N;;;;; +07C8;NKO DIGIT EIGHT;Nd;0;R;;8;8;8;N;;;;; +07C9;NKO DIGIT NINE;Nd;0;R;;9;9;9;N;;;;; +07CA;NKO LETTER A;Lo;0;R;;;;;N;;;;; +07CB;NKO LETTER EE;Lo;0;R;;;;;N;;;;; +07CC;NKO LETTER I;Lo;0;R;;;;;N;;;;; +07CD;NKO LETTER E;Lo;0;R;;;;;N;;;;; +07CE;NKO LETTER U;Lo;0;R;;;;;N;;;;; +07CF;NKO LETTER OO;Lo;0;R;;;;;N;;;;; +07D0;NKO LETTER O;Lo;0;R;;;;;N;;;;; +07D1;NKO LETTER DAGBASINNA;Lo;0;R;;;;;N;;;;; +07D2;NKO LETTER N;Lo;0;R;;;;;N;;;;; +07D3;NKO LETTER BA;Lo;0;R;;;;;N;;;;; +07D4;NKO LETTER PA;Lo;0;R;;;;;N;;;;; +07D5;NKO LETTER TA;Lo;0;R;;;;;N;;;;; +07D6;NKO LETTER JA;Lo;0;R;;;;;N;;;;; +07D7;NKO LETTER CHA;Lo;0;R;;;;;N;;;;; +07D8;NKO LETTER DA;Lo;0;R;;;;;N;;;;; +07D9;NKO LETTER RA;Lo;0;R;;;;;N;;;;; +07DA;NKO LETTER RRA;Lo;0;R;;;;;N;;;;; +07DB;NKO LETTER SA;Lo;0;R;;;;;N;;;;; +07DC;NKO LETTER GBA;Lo;0;R;;;;;N;;;;; +07DD;NKO LETTER FA;Lo;0;R;;;;;N;;;;; +07DE;NKO LETTER KA;Lo;0;R;;;;;N;;;;; +07DF;NKO LETTER LA;Lo;0;R;;;;;N;;;;; +07E0;NKO LETTER NA WOLOSO;Lo;0;R;;;;;N;;;;; +07E1;NKO LETTER MA;Lo;0;R;;;;;N;;;;; +07E2;NKO LETTER NYA;Lo;0;R;;;;;N;;;;; +07E3;NKO LETTER NA;Lo;0;R;;;;;N;;;;; +07E4;NKO LETTER HA;Lo;0;R;;;;;N;;;;; +07E5;NKO LETTER WA;Lo;0;R;;;;;N;;;;; +07E6;NKO LETTER YA;Lo;0;R;;;;;N;;;;; +07E7;NKO LETTER NYA WOLOSO;Lo;0;R;;;;;N;;;;; +07E8;NKO LETTER JONA JA;Lo;0;R;;;;;N;;;;; +07E9;NKO LETTER JONA CHA;Lo;0;R;;;;;N;;;;; +07EA;NKO LETTER JONA RA;Lo;0;R;;;;;N;;;;; +07EB;NKO COMBINING SHORT HIGH TONE;Mn;230;NSM;;;;;N;;;;; +07EC;NKO COMBINING SHORT LOW TONE;Mn;230;NSM;;;;;N;;;;; +07ED;NKO COMBINING SHORT RISING TONE;Mn;230;NSM;;;;;N;;;;; +07EE;NKO COMBINING LONG DESCENDING TONE;Mn;230;NSM;;;;;N;;;;; +07EF;NKO COMBINING LONG HIGH TONE;Mn;230;NSM;;;;;N;;;;; +07F0;NKO COMBINING LONG LOW TONE;Mn;230;NSM;;;;;N;;;;; +07F1;NKO COMBINING LONG RISING TONE;Mn;230;NSM;;;;;N;;;;; +07F2;NKO COMBINING NASALIZATION MARK;Mn;220;NSM;;;;;N;;;;; +07F3;NKO COMBINING DOUBLE DOT ABOVE;Mn;230;NSM;;;;;N;;;;; +07F4;NKO HIGH TONE APOSTROPHE;Lm;0;R;;;;;N;;;;; +07F5;NKO LOW TONE APOSTROPHE;Lm;0;R;;;;;N;;;;; +07F6;NKO SYMBOL OO DENNEN;So;0;ON;;;;;N;;;;; +07F7;NKO SYMBOL GBAKURUNEN;Po;0;ON;;;;;N;;;;; +07F8;NKO COMMA;Po;0;ON;;;;;N;;;;; +07F9;NKO EXCLAMATION MARK;Po;0;ON;;;;;N;;;;; +07FA;NKO LAJANYALAN;Lm;0;R;;;;;N;;;;; +07FD;NKO DANTAYALAN;Mn;220;NSM;;;;;N;;;;; +07FE;NKO DOROME SIGN;Sc;0;R;;;;;N;;;;; +07FF;NKO TAMAN SIGN;Sc;0;R;;;;;N;;;;; +0800;SAMARITAN LETTER ALAF;Lo;0;R;;;;;N;;;;; +0801;SAMARITAN LETTER BIT;Lo;0;R;;;;;N;;;;; +0802;SAMARITAN LETTER GAMAN;Lo;0;R;;;;;N;;;;; +0803;SAMARITAN LETTER DALAT;Lo;0;R;;;;;N;;;;; +0804;SAMARITAN LETTER IY;Lo;0;R;;;;;N;;;;; +0805;SAMARITAN LETTER BAA;Lo;0;R;;;;;N;;;;; +0806;SAMARITAN LETTER ZEN;Lo;0;R;;;;;N;;;;; +0807;SAMARITAN LETTER IT;Lo;0;R;;;;;N;;;;; +0808;SAMARITAN LETTER TIT;Lo;0;R;;;;;N;;;;; +0809;SAMARITAN LETTER YUT;Lo;0;R;;;;;N;;;;; +080A;SAMARITAN LETTER KAAF;Lo;0;R;;;;;N;;;;; +080B;SAMARITAN LETTER LABAT;Lo;0;R;;;;;N;;;;; +080C;SAMARITAN LETTER MIM;Lo;0;R;;;;;N;;;;; +080D;SAMARITAN LETTER NUN;Lo;0;R;;;;;N;;;;; +080E;SAMARITAN LETTER SINGAAT;Lo;0;R;;;;;N;;;;; +080F;SAMARITAN LETTER IN;Lo;0;R;;;;;N;;;;; +0810;SAMARITAN LETTER FI;Lo;0;R;;;;;N;;;;; +0811;SAMARITAN LETTER TSAADIY;Lo;0;R;;;;;N;;;;; +0812;SAMARITAN LETTER QUF;Lo;0;R;;;;;N;;;;; +0813;SAMARITAN LETTER RISH;Lo;0;R;;;;;N;;;;; +0814;SAMARITAN LETTER SHAN;Lo;0;R;;;;;N;;;;; +0815;SAMARITAN LETTER TAAF;Lo;0;R;;;;;N;;;;; +0816;SAMARITAN MARK IN;Mn;230;NSM;;;;;N;;;;; +0817;SAMARITAN MARK IN-ALAF;Mn;230;NSM;;;;;N;;;;; +0818;SAMARITAN MARK OCCLUSION;Mn;230;NSM;;;;;N;;;;; +0819;SAMARITAN MARK DAGESH;Mn;230;NSM;;;;;N;;;;; +081A;SAMARITAN MODIFIER LETTER EPENTHETIC YUT;Lm;0;R;;;;;N;;;;; +081B;SAMARITAN MARK EPENTHETIC YUT;Mn;230;NSM;;;;;N;;;;; +081C;SAMARITAN VOWEL SIGN LONG E;Mn;230;NSM;;;;;N;;;;; +081D;SAMARITAN VOWEL SIGN E;Mn;230;NSM;;;;;N;;;;; +081E;SAMARITAN VOWEL SIGN OVERLONG AA;Mn;230;NSM;;;;;N;;;;; +081F;SAMARITAN VOWEL SIGN LONG AA;Mn;230;NSM;;;;;N;;;;; +0820;SAMARITAN VOWEL SIGN AA;Mn;230;NSM;;;;;N;;;;; +0821;SAMARITAN VOWEL SIGN OVERLONG A;Mn;230;NSM;;;;;N;;;;; +0822;SAMARITAN VOWEL SIGN LONG A;Mn;230;NSM;;;;;N;;;;; +0823;SAMARITAN VOWEL SIGN A;Mn;230;NSM;;;;;N;;;;; +0824;SAMARITAN MODIFIER LETTER SHORT A;Lm;0;R;;;;;N;;;;; +0825;SAMARITAN VOWEL SIGN SHORT A;Mn;230;NSM;;;;;N;;;;; +0826;SAMARITAN VOWEL SIGN LONG U;Mn;230;NSM;;;;;N;;;;; +0827;SAMARITAN VOWEL SIGN U;Mn;230;NSM;;;;;N;;;;; +0828;SAMARITAN MODIFIER LETTER I;Lm;0;R;;;;;N;;;;; +0829;SAMARITAN VOWEL SIGN LONG I;Mn;230;NSM;;;;;N;;;;; +082A;SAMARITAN VOWEL SIGN I;Mn;230;NSM;;;;;N;;;;; +082B;SAMARITAN VOWEL SIGN O;Mn;230;NSM;;;;;N;;;;; +082C;SAMARITAN VOWEL SIGN SUKUN;Mn;230;NSM;;;;;N;;;;; +082D;SAMARITAN MARK NEQUDAA;Mn;230;NSM;;;;;N;;;;; +0830;SAMARITAN PUNCTUATION NEQUDAA;Po;0;R;;;;;N;;;;; +0831;SAMARITAN PUNCTUATION AFSAAQ;Po;0;R;;;;;N;;;;; +0832;SAMARITAN PUNCTUATION ANGED;Po;0;R;;;;;N;;;;; +0833;SAMARITAN PUNCTUATION BAU;Po;0;R;;;;;N;;;;; +0834;SAMARITAN PUNCTUATION ATMAAU;Po;0;R;;;;;N;;;;; +0835;SAMARITAN PUNCTUATION SHIYYAALAA;Po;0;R;;;;;N;;;;; +0836;SAMARITAN ABBREVIATION MARK;Po;0;R;;;;;N;;;;; +0837;SAMARITAN PUNCTUATION MELODIC QITSA;Po;0;R;;;;;N;;;;; +0838;SAMARITAN PUNCTUATION ZIQAA;Po;0;R;;;;;N;;;;; +0839;SAMARITAN PUNCTUATION QITSA;Po;0;R;;;;;N;;;;; +083A;SAMARITAN PUNCTUATION ZAEF;Po;0;R;;;;;N;;;;; +083B;SAMARITAN PUNCTUATION TURU;Po;0;R;;;;;N;;;;; +083C;SAMARITAN PUNCTUATION ARKAANU;Po;0;R;;;;;N;;;;; +083D;SAMARITAN PUNCTUATION SOF MASHFAAT;Po;0;R;;;;;N;;;;; +083E;SAMARITAN PUNCTUATION ANNAAU;Po;0;R;;;;;N;;;;; +0840;MANDAIC LETTER HALQA;Lo;0;R;;;;;N;;;;; +0841;MANDAIC LETTER AB;Lo;0;R;;;;;N;;;;; +0842;MANDAIC LETTER AG;Lo;0;R;;;;;N;;;;; +0843;MANDAIC LETTER AD;Lo;0;R;;;;;N;;;;; +0844;MANDAIC LETTER AH;Lo;0;R;;;;;N;;;;; +0845;MANDAIC LETTER USHENNA;Lo;0;R;;;;;N;;;;; +0846;MANDAIC LETTER AZ;Lo;0;R;;;;;N;;;;; +0847;MANDAIC LETTER IT;Lo;0;R;;;;;N;;;;; +0848;MANDAIC LETTER ATT;Lo;0;R;;;;;N;;;;; +0849;MANDAIC LETTER AKSA;Lo;0;R;;;;;N;;;;; +084A;MANDAIC LETTER AK;Lo;0;R;;;;;N;;;;; +084B;MANDAIC LETTER AL;Lo;0;R;;;;;N;;;;; +084C;MANDAIC LETTER AM;Lo;0;R;;;;;N;;;;; +084D;MANDAIC LETTER AN;Lo;0;R;;;;;N;;;;; +084E;MANDAIC LETTER AS;Lo;0;R;;;;;N;;;;; +084F;MANDAIC LETTER IN;Lo;0;R;;;;;N;;;;; +0850;MANDAIC LETTER AP;Lo;0;R;;;;;N;;;;; +0851;MANDAIC LETTER ASZ;Lo;0;R;;;;;N;;;;; +0852;MANDAIC LETTER AQ;Lo;0;R;;;;;N;;;;; +0853;MANDAIC LETTER AR;Lo;0;R;;;;;N;;;;; +0854;MANDAIC LETTER ASH;Lo;0;R;;;;;N;;;;; +0855;MANDAIC LETTER AT;Lo;0;R;;;;;N;;;;; +0856;MANDAIC LETTER DUSHENNA;Lo;0;R;;;;;N;;;;; +0857;MANDAIC LETTER KAD;Lo;0;R;;;;;N;;;;; +0858;MANDAIC LETTER AIN;Lo;0;R;;;;;N;;;;; +0859;MANDAIC AFFRICATION MARK;Mn;220;NSM;;;;;N;;;;; +085A;MANDAIC VOCALIZATION MARK;Mn;220;NSM;;;;;N;;;;; +085B;MANDAIC GEMINATION MARK;Mn;220;NSM;;;;;N;;;;; +085E;MANDAIC PUNCTUATION;Po;0;R;;;;;N;;;;; +0860;SYRIAC LETTER MALAYALAM NGA;Lo;0;AL;;;;;N;;;;; +0861;SYRIAC LETTER MALAYALAM JA;Lo;0;AL;;;;;N;;;;; +0862;SYRIAC LETTER MALAYALAM NYA;Lo;0;AL;;;;;N;;;;; +0863;SYRIAC LETTER MALAYALAM TTA;Lo;0;AL;;;;;N;;;;; +0864;SYRIAC LETTER MALAYALAM NNA;Lo;0;AL;;;;;N;;;;; +0865;SYRIAC LETTER MALAYALAM NNNA;Lo;0;AL;;;;;N;;;;; +0866;SYRIAC LETTER MALAYALAM BHA;Lo;0;AL;;;;;N;;;;; +0867;SYRIAC LETTER MALAYALAM RA;Lo;0;AL;;;;;N;;;;; +0868;SYRIAC LETTER MALAYALAM LLA;Lo;0;AL;;;;;N;;;;; +0869;SYRIAC LETTER MALAYALAM LLLA;Lo;0;AL;;;;;N;;;;; +086A;SYRIAC LETTER MALAYALAM SSA;Lo;0;AL;;;;;N;;;;; +08A0;ARABIC LETTER BEH WITH SMALL V BELOW;Lo;0;AL;;;;;N;;;;; +08A1;ARABIC LETTER BEH WITH HAMZA ABOVE;Lo;0;AL;;;;;N;;;;; +08A2;ARABIC LETTER JEEM WITH TWO DOTS ABOVE;Lo;0;AL;;;;;N;;;;; +08A3;ARABIC LETTER TAH WITH TWO DOTS ABOVE;Lo;0;AL;;;;;N;;;;; +08A4;ARABIC LETTER FEH WITH DOT BELOW AND THREE DOTS ABOVE;Lo;0;AL;;;;;N;;;;; +08A5;ARABIC LETTER QAF WITH DOT BELOW;Lo;0;AL;;;;;N;;;;; +08A6;ARABIC LETTER LAM WITH DOUBLE BAR;Lo;0;AL;;;;;N;;;;; +08A7;ARABIC LETTER MEEM WITH THREE DOTS ABOVE;Lo;0;AL;;;;;N;;;;; +08A8;ARABIC LETTER YEH WITH TWO DOTS BELOW AND HAMZA ABOVE;Lo;0;AL;;;;;N;;;;; +08A9;ARABIC LETTER YEH WITH TWO DOTS BELOW AND DOT ABOVE;Lo;0;AL;;;;;N;;;;; +08AA;ARABIC LETTER REH WITH LOOP;Lo;0;AL;;;;;N;;;;; +08AB;ARABIC LETTER WAW WITH DOT WITHIN;Lo;0;AL;;;;;N;;;;; +08AC;ARABIC LETTER ROHINGYA YEH;Lo;0;AL;;;;;N;;;;; +08AD;ARABIC LETTER LOW ALEF;Lo;0;AL;;;;;N;;;;; +08AE;ARABIC LETTER DAL WITH THREE DOTS BELOW;Lo;0;AL;;;;;N;;;;; +08AF;ARABIC LETTER SAD WITH THREE DOTS BELOW;Lo;0;AL;;;;;N;;;;; +08B0;ARABIC LETTER GAF WITH INVERTED STROKE;Lo;0;AL;;;;;N;;;;; +08B1;ARABIC LETTER STRAIGHT WAW;Lo;0;AL;;;;;N;;;;; +08B2;ARABIC LETTER ZAIN WITH INVERTED V ABOVE;Lo;0;AL;;;;;N;;;;; +08B3;ARABIC LETTER AIN WITH THREE DOTS BELOW;Lo;0;AL;;;;;N;;;;; +08B4;ARABIC LETTER KAF WITH DOT BELOW;Lo;0;AL;;;;;N;;;;; +08B6;ARABIC LETTER BEH WITH SMALL MEEM ABOVE;Lo;0;AL;;;;;N;;;;; +08B7;ARABIC LETTER PEH WITH SMALL MEEM ABOVE;Lo;0;AL;;;;;N;;;;; +08B8;ARABIC LETTER TEH WITH SMALL TEH ABOVE;Lo;0;AL;;;;;N;;;;; +08B9;ARABIC LETTER REH WITH SMALL NOON ABOVE;Lo;0;AL;;;;;N;;;;; +08BA;ARABIC LETTER YEH WITH TWO DOTS BELOW AND SMALL NOON ABOVE;Lo;0;AL;;;;;N;;;;; +08BB;ARABIC LETTER AFRICAN FEH;Lo;0;AL;;;;;N;;;;; +08BC;ARABIC LETTER AFRICAN QAF;Lo;0;AL;;;;;N;;;;; +08BD;ARABIC LETTER AFRICAN NOON;Lo;0;AL;;;;;N;;;;; +08D3;ARABIC SMALL LOW WAW;Mn;220;NSM;;;;;N;;;;; +08D4;ARABIC SMALL HIGH WORD AR-RUB;Mn;230;NSM;;;;;N;;;;; +08D5;ARABIC SMALL HIGH SAD;Mn;230;NSM;;;;;N;;;;; +08D6;ARABIC SMALL HIGH AIN;Mn;230;NSM;;;;;N;;;;; +08D7;ARABIC SMALL HIGH QAF;Mn;230;NSM;;;;;N;;;;; +08D8;ARABIC SMALL HIGH NOON WITH KASRA;Mn;230;NSM;;;;;N;;;;; +08D9;ARABIC SMALL LOW NOON WITH KASRA;Mn;230;NSM;;;;;N;;;;; +08DA;ARABIC SMALL HIGH WORD ATH-THALATHA;Mn;230;NSM;;;;;N;;;;; +08DB;ARABIC SMALL HIGH WORD AS-SAJDA;Mn;230;NSM;;;;;N;;;;; +08DC;ARABIC SMALL HIGH WORD AN-NISF;Mn;230;NSM;;;;;N;;;;; +08DD;ARABIC SMALL HIGH WORD SAKTA;Mn;230;NSM;;;;;N;;;;; +08DE;ARABIC SMALL HIGH WORD QIF;Mn;230;NSM;;;;;N;;;;; +08DF;ARABIC SMALL HIGH WORD WAQFA;Mn;230;NSM;;;;;N;;;;; +08E0;ARABIC SMALL HIGH FOOTNOTE MARKER;Mn;230;NSM;;;;;N;;;;; +08E1;ARABIC SMALL HIGH SIGN SAFHA;Mn;230;NSM;;;;;N;;;;; +08E2;ARABIC DISPUTED END OF AYAH;Cf;0;AN;;;;;N;;;;; +08E3;ARABIC TURNED DAMMA BELOW;Mn;220;NSM;;;;;N;;;;; +08E4;ARABIC CURLY FATHA;Mn;230;NSM;;;;;N;;;;; +08E5;ARABIC CURLY DAMMA;Mn;230;NSM;;;;;N;;;;; +08E6;ARABIC CURLY KASRA;Mn;220;NSM;;;;;N;;;;; +08E7;ARABIC CURLY FATHATAN;Mn;230;NSM;;;;;N;;;;; +08E8;ARABIC CURLY DAMMATAN;Mn;230;NSM;;;;;N;;;;; +08E9;ARABIC CURLY KASRATAN;Mn;220;NSM;;;;;N;;;;; +08EA;ARABIC TONE ONE DOT ABOVE;Mn;230;NSM;;;;;N;;;;; +08EB;ARABIC TONE TWO DOTS ABOVE;Mn;230;NSM;;;;;N;;;;; +08EC;ARABIC TONE LOOP ABOVE;Mn;230;NSM;;;;;N;;;;; +08ED;ARABIC TONE ONE DOT BELOW;Mn;220;NSM;;;;;N;;;;; +08EE;ARABIC TONE TWO DOTS BELOW;Mn;220;NSM;;;;;N;;;;; +08EF;ARABIC TONE LOOP BELOW;Mn;220;NSM;;;;;N;;;;; +08F0;ARABIC OPEN FATHATAN;Mn;27;NSM;;;;;N;;;;; +08F1;ARABIC OPEN DAMMATAN;Mn;28;NSM;;;;;N;;;;; +08F2;ARABIC OPEN KASRATAN;Mn;29;NSM;;;;;N;;;;; +08F3;ARABIC SMALL HIGH WAW;Mn;230;NSM;;;;;N;;;;; +08F4;ARABIC FATHA WITH RING;Mn;230;NSM;;;;;N;;;;; +08F5;ARABIC FATHA WITH DOT ABOVE;Mn;230;NSM;;;;;N;;;;; +08F6;ARABIC KASRA WITH DOT BELOW;Mn;220;NSM;;;;;N;;;;; +08F7;ARABIC LEFT ARROWHEAD ABOVE;Mn;230;NSM;;;;;N;;;;; +08F8;ARABIC RIGHT ARROWHEAD ABOVE;Mn;230;NSM;;;;;N;;;;; +08F9;ARABIC LEFT ARROWHEAD BELOW;Mn;220;NSM;;;;;N;;;;; +08FA;ARABIC RIGHT ARROWHEAD BELOW;Mn;220;NSM;;;;;N;;;;; +08FB;ARABIC DOUBLE RIGHT ARROWHEAD ABOVE;Mn;230;NSM;;;;;N;;;;; +08FC;ARABIC DOUBLE RIGHT ARROWHEAD ABOVE WITH DOT;Mn;230;NSM;;;;;N;;;;; +08FD;ARABIC RIGHT ARROWHEAD ABOVE WITH DOT;Mn;230;NSM;;;;;N;;;;; +08FE;ARABIC DAMMA WITH DOT;Mn;230;NSM;;;;;N;;;;; +08FF;ARABIC MARK SIDEWAYS NOON GHUNNA;Mn;230;NSM;;;;;N;;;;; +0900;DEVANAGARI SIGN INVERTED CANDRABINDU;Mn;0;NSM;;;;;N;;;;; +0901;DEVANAGARI SIGN CANDRABINDU;Mn;0;NSM;;;;;N;;;;; +0902;DEVANAGARI SIGN ANUSVARA;Mn;0;NSM;;;;;N;;;;; +0903;DEVANAGARI SIGN VISARGA;Mc;0;L;;;;;N;;;;; +0904;DEVANAGARI LETTER SHORT A;Lo;0;L;;;;;N;;;;; +0905;DEVANAGARI LETTER A;Lo;0;L;;;;;N;;;;; +0906;DEVANAGARI LETTER AA;Lo;0;L;;;;;N;;;;; +0907;DEVANAGARI LETTER I;Lo;0;L;;;;;N;;;;; +0908;DEVANAGARI LETTER II;Lo;0;L;;;;;N;;;;; +0909;DEVANAGARI LETTER U;Lo;0;L;;;;;N;;;;; +090A;DEVANAGARI LETTER UU;Lo;0;L;;;;;N;;;;; +090B;DEVANAGARI LETTER VOCALIC R;Lo;0;L;;;;;N;;;;; +090C;DEVANAGARI LETTER VOCALIC L;Lo;0;L;;;;;N;;;;; +090D;DEVANAGARI LETTER CANDRA E;Lo;0;L;;;;;N;;;;; +090E;DEVANAGARI LETTER SHORT E;Lo;0;L;;;;;N;;;;; +090F;DEVANAGARI LETTER E;Lo;0;L;;;;;N;;;;; +0910;DEVANAGARI LETTER AI;Lo;0;L;;;;;N;;;;; +0911;DEVANAGARI LETTER CANDRA O;Lo;0;L;;;;;N;;;;; +0912;DEVANAGARI LETTER SHORT O;Lo;0;L;;;;;N;;;;; +0913;DEVANAGARI LETTER O;Lo;0;L;;;;;N;;;;; +0914;DEVANAGARI LETTER AU;Lo;0;L;;;;;N;;;;; +0915;DEVANAGARI LETTER KA;Lo;0;L;;;;;N;;;;; +0916;DEVANAGARI LETTER KHA;Lo;0;L;;;;;N;;;;; +0917;DEVANAGARI LETTER GA;Lo;0;L;;;;;N;;;;; +0918;DEVANAGARI LETTER GHA;Lo;0;L;;;;;N;;;;; +0919;DEVANAGARI LETTER NGA;Lo;0;L;;;;;N;;;;; +091A;DEVANAGARI LETTER CA;Lo;0;L;;;;;N;;;;; +091B;DEVANAGARI LETTER CHA;Lo;0;L;;;;;N;;;;; +091C;DEVANAGARI LETTER JA;Lo;0;L;;;;;N;;;;; +091D;DEVANAGARI LETTER JHA;Lo;0;L;;;;;N;;;;; +091E;DEVANAGARI LETTER NYA;Lo;0;L;;;;;N;;;;; +091F;DEVANAGARI LETTER TTA;Lo;0;L;;;;;N;;;;; +0920;DEVANAGARI LETTER TTHA;Lo;0;L;;;;;N;;;;; +0921;DEVANAGARI LETTER DDA;Lo;0;L;;;;;N;;;;; +0922;DEVANAGARI LETTER DDHA;Lo;0;L;;;;;N;;;;; +0923;DEVANAGARI LETTER NNA;Lo;0;L;;;;;N;;;;; +0924;DEVANAGARI LETTER TA;Lo;0;L;;;;;N;;;;; +0925;DEVANAGARI LETTER THA;Lo;0;L;;;;;N;;;;; +0926;DEVANAGARI LETTER DA;Lo;0;L;;;;;N;;;;; +0927;DEVANAGARI LETTER DHA;Lo;0;L;;;;;N;;;;; +0928;DEVANAGARI LETTER NA;Lo;0;L;;;;;N;;;;; +0929;DEVANAGARI LETTER NNNA;Lo;0;L;0928 093C;;;;N;;;;; +092A;DEVANAGARI LETTER PA;Lo;0;L;;;;;N;;;;; +092B;DEVANAGARI LETTER PHA;Lo;0;L;;;;;N;;;;; +092C;DEVANAGARI LETTER BA;Lo;0;L;;;;;N;;;;; +092D;DEVANAGARI LETTER BHA;Lo;0;L;;;;;N;;;;; +092E;DEVANAGARI LETTER MA;Lo;0;L;;;;;N;;;;; +092F;DEVANAGARI LETTER YA;Lo;0;L;;;;;N;;;;; +0930;DEVANAGARI LETTER RA;Lo;0;L;;;;;N;;;;; +0931;DEVANAGARI LETTER RRA;Lo;0;L;0930 093C;;;;N;;;;; +0932;DEVANAGARI LETTER LA;Lo;0;L;;;;;N;;;;; +0933;DEVANAGARI LETTER LLA;Lo;0;L;;;;;N;;;;; +0934;DEVANAGARI LETTER LLLA;Lo;0;L;0933 093C;;;;N;;;;; +0935;DEVANAGARI LETTER VA;Lo;0;L;;;;;N;;;;; +0936;DEVANAGARI LETTER SHA;Lo;0;L;;;;;N;;;;; +0937;DEVANAGARI LETTER SSA;Lo;0;L;;;;;N;;;;; +0938;DEVANAGARI LETTER SA;Lo;0;L;;;;;N;;;;; +0939;DEVANAGARI LETTER HA;Lo;0;L;;;;;N;;;;; +093A;DEVANAGARI VOWEL SIGN OE;Mn;0;NSM;;;;;N;;;;; +093B;DEVANAGARI VOWEL SIGN OOE;Mc;0;L;;;;;N;;;;; +093C;DEVANAGARI SIGN NUKTA;Mn;7;NSM;;;;;N;;;;; +093D;DEVANAGARI SIGN AVAGRAHA;Lo;0;L;;;;;N;;;;; +093E;DEVANAGARI VOWEL SIGN AA;Mc;0;L;;;;;N;;;;; +093F;DEVANAGARI VOWEL SIGN I;Mc;0;L;;;;;N;;;;; +0940;DEVANAGARI VOWEL SIGN II;Mc;0;L;;;;;N;;;;; +0941;DEVANAGARI VOWEL SIGN U;Mn;0;NSM;;;;;N;;;;; +0942;DEVANAGARI VOWEL SIGN UU;Mn;0;NSM;;;;;N;;;;; +0943;DEVANAGARI VOWEL SIGN VOCALIC R;Mn;0;NSM;;;;;N;;;;; +0944;DEVANAGARI VOWEL SIGN VOCALIC RR;Mn;0;NSM;;;;;N;;;;; +0945;DEVANAGARI VOWEL SIGN CANDRA E;Mn;0;NSM;;;;;N;;;;; +0946;DEVANAGARI VOWEL SIGN SHORT E;Mn;0;NSM;;;;;N;;;;; +0947;DEVANAGARI VOWEL SIGN E;Mn;0;NSM;;;;;N;;;;; +0948;DEVANAGARI VOWEL SIGN AI;Mn;0;NSM;;;;;N;;;;; +0949;DEVANAGARI VOWEL SIGN CANDRA O;Mc;0;L;;;;;N;;;;; +094A;DEVANAGARI VOWEL SIGN SHORT O;Mc;0;L;;;;;N;;;;; +094B;DEVANAGARI VOWEL SIGN O;Mc;0;L;;;;;N;;;;; +094C;DEVANAGARI VOWEL SIGN AU;Mc;0;L;;;;;N;;;;; +094D;DEVANAGARI SIGN VIRAMA;Mn;9;NSM;;;;;N;;;;; +094E;DEVANAGARI VOWEL SIGN PRISHTHAMATRA E;Mc;0;L;;;;;N;;;;; +094F;DEVANAGARI VOWEL SIGN AW;Mc;0;L;;;;;N;;;;; +0950;DEVANAGARI OM;Lo;0;L;;;;;N;;;;; +0951;DEVANAGARI STRESS SIGN UDATTA;Mn;230;NSM;;;;;N;;;;; +0952;DEVANAGARI STRESS SIGN ANUDATTA;Mn;220;NSM;;;;;N;;;;; +0953;DEVANAGARI GRAVE ACCENT;Mn;230;NSM;;;;;N;;;;; +0954;DEVANAGARI ACUTE ACCENT;Mn;230;NSM;;;;;N;;;;; +0955;DEVANAGARI VOWEL SIGN CANDRA LONG E;Mn;0;NSM;;;;;N;;;;; +0956;DEVANAGARI VOWEL SIGN UE;Mn;0;NSM;;;;;N;;;;; +0957;DEVANAGARI VOWEL SIGN UUE;Mn;0;NSM;;;;;N;;;;; +0958;DEVANAGARI LETTER QA;Lo;0;L;0915 093C;;;;N;;;;; +0959;DEVANAGARI LETTER KHHA;Lo;0;L;0916 093C;;;;N;;;;; +095A;DEVANAGARI LETTER GHHA;Lo;0;L;0917 093C;;;;N;;;;; +095B;DEVANAGARI LETTER ZA;Lo;0;L;091C 093C;;;;N;;;;; +095C;DEVANAGARI LETTER DDDHA;Lo;0;L;0921 093C;;;;N;;;;; +095D;DEVANAGARI LETTER RHA;Lo;0;L;0922 093C;;;;N;;;;; +095E;DEVANAGARI LETTER FA;Lo;0;L;092B 093C;;;;N;;;;; +095F;DEVANAGARI LETTER YYA;Lo;0;L;092F 093C;;;;N;;;;; +0960;DEVANAGARI LETTER VOCALIC RR;Lo;0;L;;;;;N;;;;; +0961;DEVANAGARI LETTER VOCALIC LL;Lo;0;L;;;;;N;;;;; +0962;DEVANAGARI VOWEL SIGN VOCALIC L;Mn;0;NSM;;;;;N;;;;; +0963;DEVANAGARI VOWEL SIGN VOCALIC LL;Mn;0;NSM;;;;;N;;;;; +0964;DEVANAGARI DANDA;Po;0;L;;;;;N;;;;; +0965;DEVANAGARI DOUBLE DANDA;Po;0;L;;;;;N;;;;; +0966;DEVANAGARI DIGIT ZERO;Nd;0;L;;0;0;0;N;;;;; +0967;DEVANAGARI DIGIT ONE;Nd;0;L;;1;1;1;N;;;;; +0968;DEVANAGARI DIGIT TWO;Nd;0;L;;2;2;2;N;;;;; +0969;DEVANAGARI DIGIT THREE;Nd;0;L;;3;3;3;N;;;;; +096A;DEVANAGARI DIGIT FOUR;Nd;0;L;;4;4;4;N;;;;; +096B;DEVANAGARI DIGIT FIVE;Nd;0;L;;5;5;5;N;;;;; +096C;DEVANAGARI DIGIT SIX;Nd;0;L;;6;6;6;N;;;;; +096D;DEVANAGARI DIGIT SEVEN;Nd;0;L;;7;7;7;N;;;;; +096E;DEVANAGARI DIGIT EIGHT;Nd;0;L;;8;8;8;N;;;;; +096F;DEVANAGARI DIGIT NINE;Nd;0;L;;9;9;9;N;;;;; +0970;DEVANAGARI ABBREVIATION SIGN;Po;0;L;;;;;N;;;;; +0971;DEVANAGARI SIGN HIGH SPACING DOT;Lm;0;L;;;;;N;;;;; +0972;DEVANAGARI LETTER CANDRA A;Lo;0;L;;;;;N;;;;; +0973;DEVANAGARI LETTER OE;Lo;0;L;;;;;N;;;;; +0974;DEVANAGARI LETTER OOE;Lo;0;L;;;;;N;;;;; +0975;DEVANAGARI LETTER AW;Lo;0;L;;;;;N;;;;; +0976;DEVANAGARI LETTER UE;Lo;0;L;;;;;N;;;;; +0977;DEVANAGARI LETTER UUE;Lo;0;L;;;;;N;;;;; +0978;DEVANAGARI LETTER MARWARI DDA;Lo;0;L;;;;;N;;;;; +0979;DEVANAGARI LETTER ZHA;Lo;0;L;;;;;N;;;;; +097A;DEVANAGARI LETTER HEAVY YA;Lo;0;L;;;;;N;;;;; +097B;DEVANAGARI LETTER GGA;Lo;0;L;;;;;N;;;;; +097C;DEVANAGARI LETTER JJA;Lo;0;L;;;;;N;;;;; +097D;DEVANAGARI LETTER GLOTTAL STOP;Lo;0;L;;;;;N;;;;; +097E;DEVANAGARI LETTER DDDA;Lo;0;L;;;;;N;;;;; +097F;DEVANAGARI LETTER BBA;Lo;0;L;;;;;N;;;;; +0980;BENGALI ANJI;Lo;0;L;;;;;N;;;;; +0981;BENGALI SIGN CANDRABINDU;Mn;0;NSM;;;;;N;;;;; +0982;BENGALI SIGN ANUSVARA;Mc;0;L;;;;;N;;;;; +0983;BENGALI SIGN VISARGA;Mc;0;L;;;;;N;;;;; +0985;BENGALI LETTER A;Lo;0;L;;;;;N;;;;; +0986;BENGALI LETTER AA;Lo;0;L;;;;;N;;;;; +0987;BENGALI LETTER I;Lo;0;L;;;;;N;;;;; +0988;BENGALI LETTER II;Lo;0;L;;;;;N;;;;; +0989;BENGALI LETTER U;Lo;0;L;;;;;N;;;;; +098A;BENGALI LETTER UU;Lo;0;L;;;;;N;;;;; +098B;BENGALI LETTER VOCALIC R;Lo;0;L;;;;;N;;;;; +098C;BENGALI LETTER VOCALIC L;Lo;0;L;;;;;N;;;;; +098F;BENGALI LETTER E;Lo;0;L;;;;;N;;;;; +0990;BENGALI LETTER AI;Lo;0;L;;;;;N;;;;; +0993;BENGALI LETTER O;Lo;0;L;;;;;N;;;;; +0994;BENGALI LETTER AU;Lo;0;L;;;;;N;;;;; +0995;BENGALI LETTER KA;Lo;0;L;;;;;N;;;;; +0996;BENGALI LETTER KHA;Lo;0;L;;;;;N;;;;; +0997;BENGALI LETTER GA;Lo;0;L;;;;;N;;;;; +0998;BENGALI LETTER GHA;Lo;0;L;;;;;N;;;;; +0999;BENGALI LETTER NGA;Lo;0;L;;;;;N;;;;; +099A;BENGALI LETTER CA;Lo;0;L;;;;;N;;;;; +099B;BENGALI LETTER CHA;Lo;0;L;;;;;N;;;;; +099C;BENGALI LETTER JA;Lo;0;L;;;;;N;;;;; +099D;BENGALI LETTER JHA;Lo;0;L;;;;;N;;;;; +099E;BENGALI LETTER NYA;Lo;0;L;;;;;N;;;;; +099F;BENGALI LETTER TTA;Lo;0;L;;;;;N;;;;; +09A0;BENGALI LETTER TTHA;Lo;0;L;;;;;N;;;;; +09A1;BENGALI LETTER DDA;Lo;0;L;;;;;N;;;;; +09A2;BENGALI LETTER DDHA;Lo;0;L;;;;;N;;;;; +09A3;BENGALI LETTER NNA;Lo;0;L;;;;;N;;;;; +09A4;BENGALI LETTER TA;Lo;0;L;;;;;N;;;;; +09A5;BENGALI LETTER THA;Lo;0;L;;;;;N;;;;; +09A6;BENGALI LETTER DA;Lo;0;L;;;;;N;;;;; +09A7;BENGALI LETTER DHA;Lo;0;L;;;;;N;;;;; +09A8;BENGALI LETTER NA;Lo;0;L;;;;;N;;;;; +09AA;BENGALI LETTER PA;Lo;0;L;;;;;N;;;;; +09AB;BENGALI LETTER PHA;Lo;0;L;;;;;N;;;;; +09AC;BENGALI LETTER BA;Lo;0;L;;;;;N;;;;; +09AD;BENGALI LETTER BHA;Lo;0;L;;;;;N;;;;; +09AE;BENGALI LETTER MA;Lo;0;L;;;;;N;;;;; +09AF;BENGALI LETTER YA;Lo;0;L;;;;;N;;;;; +09B0;BENGALI LETTER RA;Lo;0;L;;;;;N;;;;; +09B2;BENGALI LETTER LA;Lo;0;L;;;;;N;;;;; +09B6;BENGALI LETTER SHA;Lo;0;L;;;;;N;;;;; +09B7;BENGALI LETTER SSA;Lo;0;L;;;;;N;;;;; +09B8;BENGALI LETTER SA;Lo;0;L;;;;;N;;;;; +09B9;BENGALI LETTER HA;Lo;0;L;;;;;N;;;;; +09BC;BENGALI SIGN NUKTA;Mn;7;NSM;;;;;N;;;;; +09BD;BENGALI SIGN AVAGRAHA;Lo;0;L;;;;;N;;;;; +09BE;BENGALI VOWEL SIGN AA;Mc;0;L;;;;;N;;;;; +09BF;BENGALI VOWEL SIGN I;Mc;0;L;;;;;N;;;;; +09C0;BENGALI VOWEL SIGN II;Mc;0;L;;;;;N;;;;; +09C1;BENGALI VOWEL SIGN U;Mn;0;NSM;;;;;N;;;;; +09C2;BENGALI VOWEL SIGN UU;Mn;0;NSM;;;;;N;;;;; +09C3;BENGALI VOWEL SIGN VOCALIC R;Mn;0;NSM;;;;;N;;;;; +09C4;BENGALI VOWEL SIGN VOCALIC RR;Mn;0;NSM;;;;;N;;;;; +09C7;BENGALI VOWEL SIGN E;Mc;0;L;;;;;N;;;;; +09C8;BENGALI VOWEL SIGN AI;Mc;0;L;;;;;N;;;;; +09CB;BENGALI VOWEL SIGN O;Mc;0;L;09C7 09BE;;;;N;;;;; +09CC;BENGALI VOWEL SIGN AU;Mc;0;L;09C7 09D7;;;;N;;;;; +09CD;BENGALI SIGN VIRAMA;Mn;9;NSM;;;;;N;;;;; +09CE;BENGALI LETTER KHANDA TA;Lo;0;L;;;;;N;;;;; +09D7;BENGALI AU LENGTH MARK;Mc;0;L;;;;;N;;;;; +09DC;BENGALI LETTER RRA;Lo;0;L;09A1 09BC;;;;N;;;;; +09DD;BENGALI LETTER RHA;Lo;0;L;09A2 09BC;;;;N;;;;; +09DF;BENGALI LETTER YYA;Lo;0;L;09AF 09BC;;;;N;;;;; +09E0;BENGALI LETTER VOCALIC RR;Lo;0;L;;;;;N;;;;; +09E1;BENGALI LETTER VOCALIC LL;Lo;0;L;;;;;N;;;;; +09E2;BENGALI VOWEL SIGN VOCALIC L;Mn;0;NSM;;;;;N;;;;; +09E3;BENGALI VOWEL SIGN VOCALIC LL;Mn;0;NSM;;;;;N;;;;; +09E6;BENGALI DIGIT ZERO;Nd;0;L;;0;0;0;N;;;;; +09E7;BENGALI DIGIT ONE;Nd;0;L;;1;1;1;N;;;;; +09E8;BENGALI DIGIT TWO;Nd;0;L;;2;2;2;N;;;;; +09E9;BENGALI DIGIT THREE;Nd;0;L;;3;3;3;N;;;;; +09EA;BENGALI DIGIT FOUR;Nd;0;L;;4;4;4;N;;;;; +09EB;BENGALI DIGIT FIVE;Nd;0;L;;5;5;5;N;;;;; +09EC;BENGALI DIGIT SIX;Nd;0;L;;6;6;6;N;;;;; +09ED;BENGALI DIGIT SEVEN;Nd;0;L;;7;7;7;N;;;;; +09EE;BENGALI DIGIT EIGHT;Nd;0;L;;8;8;8;N;;;;; +09EF;BENGALI DIGIT NINE;Nd;0;L;;9;9;9;N;;;;; +09F0;BENGALI LETTER RA WITH MIDDLE DIAGONAL;Lo;0;L;;;;;N;;;;; +09F1;BENGALI LETTER RA WITH LOWER DIAGONAL;Lo;0;L;;;;;N;BENGALI LETTER VA WITH LOWER DIAGONAL;;;; +09F2;BENGALI RUPEE MARK;Sc;0;ET;;;;;N;;;;; +09F3;BENGALI RUPEE SIGN;Sc;0;ET;;;;;N;;;;; +09F4;BENGALI CURRENCY NUMERATOR ONE;No;0;L;;;;1/16;N;;;;; +09F5;BENGALI CURRENCY NUMERATOR TWO;No;0;L;;;;1/8;N;;;;; +09F6;BENGALI CURRENCY NUMERATOR THREE;No;0;L;;;;3/16;N;;;;; +09F7;BENGALI CURRENCY NUMERATOR FOUR;No;0;L;;;;1/4;N;;;;; +09F8;BENGALI CURRENCY NUMERATOR ONE LESS THAN THE DENOMINATOR;No;0;L;;;;3/4;N;;;;; +09F9;BENGALI CURRENCY DENOMINATOR SIXTEEN;No;0;L;;;;16;N;;;;; +09FA;BENGALI ISSHAR;So;0;L;;;;;N;;;;; +09FB;BENGALI GANDA MARK;Sc;0;ET;;;;;N;;;;; +09FC;BENGALI LETTER VEDIC ANUSVARA;Lo;0;L;;;;;N;;;;; +09FD;BENGALI ABBREVIATION SIGN;Po;0;L;;;;;N;;;;; +09FE;BENGALI SANDHI MARK;Mn;230;NSM;;;;;N;;;;; +0A01;GURMUKHI SIGN ADAK BINDI;Mn;0;NSM;;;;;N;;;;; +0A02;GURMUKHI SIGN BINDI;Mn;0;NSM;;;;;N;;;;; +0A03;GURMUKHI SIGN VISARGA;Mc;0;L;;;;;N;;;;; +0A05;GURMUKHI LETTER A;Lo;0;L;;;;;N;;;;; +0A06;GURMUKHI LETTER AA;Lo;0;L;;;;;N;;;;; +0A07;GURMUKHI LETTER I;Lo;0;L;;;;;N;;;;; +0A08;GURMUKHI LETTER II;Lo;0;L;;;;;N;;;;; +0A09;GURMUKHI LETTER U;Lo;0;L;;;;;N;;;;; +0A0A;GURMUKHI LETTER UU;Lo;0;L;;;;;N;;;;; +0A0F;GURMUKHI LETTER EE;Lo;0;L;;;;;N;;;;; +0A10;GURMUKHI LETTER AI;Lo;0;L;;;;;N;;;;; +0A13;GURMUKHI LETTER OO;Lo;0;L;;;;;N;;;;; +0A14;GURMUKHI LETTER AU;Lo;0;L;;;;;N;;;;; +0A15;GURMUKHI LETTER KA;Lo;0;L;;;;;N;;;;; +0A16;GURMUKHI LETTER KHA;Lo;0;L;;;;;N;;;;; +0A17;GURMUKHI LETTER GA;Lo;0;L;;;;;N;;;;; +0A18;GURMUKHI LETTER GHA;Lo;0;L;;;;;N;;;;; +0A19;GURMUKHI LETTER NGA;Lo;0;L;;;;;N;;;;; +0A1A;GURMUKHI LETTER CA;Lo;0;L;;;;;N;;;;; +0A1B;GURMUKHI LETTER CHA;Lo;0;L;;;;;N;;;;; +0A1C;GURMUKHI LETTER JA;Lo;0;L;;;;;N;;;;; +0A1D;GURMUKHI LETTER JHA;Lo;0;L;;;;;N;;;;; +0A1E;GURMUKHI LETTER NYA;Lo;0;L;;;;;N;;;;; +0A1F;GURMUKHI LETTER TTA;Lo;0;L;;;;;N;;;;; +0A20;GURMUKHI LETTER TTHA;Lo;0;L;;;;;N;;;;; +0A21;GURMUKHI LETTER DDA;Lo;0;L;;;;;N;;;;; +0A22;GURMUKHI LETTER DDHA;Lo;0;L;;;;;N;;;;; +0A23;GURMUKHI LETTER NNA;Lo;0;L;;;;;N;;;;; +0A24;GURMUKHI LETTER TA;Lo;0;L;;;;;N;;;;; +0A25;GURMUKHI LETTER THA;Lo;0;L;;;;;N;;;;; +0A26;GURMUKHI LETTER DA;Lo;0;L;;;;;N;;;;; +0A27;GURMUKHI LETTER DHA;Lo;0;L;;;;;N;;;;; +0A28;GURMUKHI LETTER NA;Lo;0;L;;;;;N;;;;; +0A2A;GURMUKHI LETTER PA;Lo;0;L;;;;;N;;;;; +0A2B;GURMUKHI LETTER PHA;Lo;0;L;;;;;N;;;;; +0A2C;GURMUKHI LETTER BA;Lo;0;L;;;;;N;;;;; +0A2D;GURMUKHI LETTER BHA;Lo;0;L;;;;;N;;;;; +0A2E;GURMUKHI LETTER MA;Lo;0;L;;;;;N;;;;; +0A2F;GURMUKHI LETTER YA;Lo;0;L;;;;;N;;;;; +0A30;GURMUKHI LETTER RA;Lo;0;L;;;;;N;;;;; +0A32;GURMUKHI LETTER LA;Lo;0;L;;;;;N;;;;; +0A33;GURMUKHI LETTER LLA;Lo;0;L;0A32 0A3C;;;;N;;;;; +0A35;GURMUKHI LETTER VA;Lo;0;L;;;;;N;;;;; +0A36;GURMUKHI LETTER SHA;Lo;0;L;0A38 0A3C;;;;N;;;;; +0A38;GURMUKHI LETTER SA;Lo;0;L;;;;;N;;;;; +0A39;GURMUKHI LETTER HA;Lo;0;L;;;;;N;;;;; +0A3C;GURMUKHI SIGN NUKTA;Mn;7;NSM;;;;;N;;;;; +0A3E;GURMUKHI VOWEL SIGN AA;Mc;0;L;;;;;N;;;;; +0A3F;GURMUKHI VOWEL SIGN I;Mc;0;L;;;;;N;;;;; +0A40;GURMUKHI VOWEL SIGN II;Mc;0;L;;;;;N;;;;; +0A41;GURMUKHI VOWEL SIGN U;Mn;0;NSM;;;;;N;;;;; +0A42;GURMUKHI VOWEL SIGN UU;Mn;0;NSM;;;;;N;;;;; +0A47;GURMUKHI VOWEL SIGN EE;Mn;0;NSM;;;;;N;;;;; +0A48;GURMUKHI VOWEL SIGN AI;Mn;0;NSM;;;;;N;;;;; +0A4B;GURMUKHI VOWEL SIGN OO;Mn;0;NSM;;;;;N;;;;; +0A4C;GURMUKHI VOWEL SIGN AU;Mn;0;NSM;;;;;N;;;;; +0A4D;GURMUKHI SIGN VIRAMA;Mn;9;NSM;;;;;N;;;;; +0A51;GURMUKHI SIGN UDAAT;Mn;0;NSM;;;;;N;;;;; +0A59;GURMUKHI LETTER KHHA;Lo;0;L;0A16 0A3C;;;;N;;;;; +0A5A;GURMUKHI LETTER GHHA;Lo;0;L;0A17 0A3C;;;;N;;;;; +0A5B;GURMUKHI LETTER ZA;Lo;0;L;0A1C 0A3C;;;;N;;;;; +0A5C;GURMUKHI LETTER RRA;Lo;0;L;;;;;N;;;;; +0A5E;GURMUKHI LETTER FA;Lo;0;L;0A2B 0A3C;;;;N;;;;; +0A66;GURMUKHI DIGIT ZERO;Nd;0;L;;0;0;0;N;;;;; +0A67;GURMUKHI DIGIT ONE;Nd;0;L;;1;1;1;N;;;;; +0A68;GURMUKHI DIGIT TWO;Nd;0;L;;2;2;2;N;;;;; +0A69;GURMUKHI DIGIT THREE;Nd;0;L;;3;3;3;N;;;;; +0A6A;GURMUKHI DIGIT FOUR;Nd;0;L;;4;4;4;N;;;;; +0A6B;GURMUKHI DIGIT FIVE;Nd;0;L;;5;5;5;N;;;;; +0A6C;GURMUKHI DIGIT SIX;Nd;0;L;;6;6;6;N;;;;; +0A6D;GURMUKHI DIGIT SEVEN;Nd;0;L;;7;7;7;N;;;;; +0A6E;GURMUKHI DIGIT EIGHT;Nd;0;L;;8;8;8;N;;;;; +0A6F;GURMUKHI DIGIT NINE;Nd;0;L;;9;9;9;N;;;;; +0A70;GURMUKHI TIPPI;Mn;0;NSM;;;;;N;;;;; +0A71;GURMUKHI ADDAK;Mn;0;NSM;;;;;N;;;;; +0A72;GURMUKHI IRI;Lo;0;L;;;;;N;;;;; +0A73;GURMUKHI URA;Lo;0;L;;;;;N;;;;; +0A74;GURMUKHI EK ONKAR;Lo;0;L;;;;;N;;;;; +0A75;GURMUKHI SIGN YAKASH;Mn;0;NSM;;;;;N;;;;; +0A76;GURMUKHI ABBREVIATION SIGN;Po;0;L;;;;;N;;;;; +0A81;GUJARATI SIGN CANDRABINDU;Mn;0;NSM;;;;;N;;;;; +0A82;GUJARATI SIGN ANUSVARA;Mn;0;NSM;;;;;N;;;;; +0A83;GUJARATI SIGN VISARGA;Mc;0;L;;;;;N;;;;; +0A85;GUJARATI LETTER A;Lo;0;L;;;;;N;;;;; +0A86;GUJARATI LETTER AA;Lo;0;L;;;;;N;;;;; +0A87;GUJARATI LETTER I;Lo;0;L;;;;;N;;;;; +0A88;GUJARATI LETTER II;Lo;0;L;;;;;N;;;;; +0A89;GUJARATI LETTER U;Lo;0;L;;;;;N;;;;; +0A8A;GUJARATI LETTER UU;Lo;0;L;;;;;N;;;;; +0A8B;GUJARATI LETTER VOCALIC R;Lo;0;L;;;;;N;;;;; +0A8C;GUJARATI LETTER VOCALIC L;Lo;0;L;;;;;N;;;;; +0A8D;GUJARATI VOWEL CANDRA E;Lo;0;L;;;;;N;;;;; +0A8F;GUJARATI LETTER E;Lo;0;L;;;;;N;;;;; +0A90;GUJARATI LETTER AI;Lo;0;L;;;;;N;;;;; +0A91;GUJARATI VOWEL CANDRA O;Lo;0;L;;;;;N;;;;; +0A93;GUJARATI LETTER O;Lo;0;L;;;;;N;;;;; +0A94;GUJARATI LETTER AU;Lo;0;L;;;;;N;;;;; +0A95;GUJARATI LETTER KA;Lo;0;L;;;;;N;;;;; +0A96;GUJARATI LETTER KHA;Lo;0;L;;;;;N;;;;; +0A97;GUJARATI LETTER GA;Lo;0;L;;;;;N;;;;; +0A98;GUJARATI LETTER GHA;Lo;0;L;;;;;N;;;;; +0A99;GUJARATI LETTER NGA;Lo;0;L;;;;;N;;;;; +0A9A;GUJARATI LETTER CA;Lo;0;L;;;;;N;;;;; +0A9B;GUJARATI LETTER CHA;Lo;0;L;;;;;N;;;;; +0A9C;GUJARATI LETTER JA;Lo;0;L;;;;;N;;;;; +0A9D;GUJARATI LETTER JHA;Lo;0;L;;;;;N;;;;; +0A9E;GUJARATI LETTER NYA;Lo;0;L;;;;;N;;;;; +0A9F;GUJARATI LETTER TTA;Lo;0;L;;;;;N;;;;; +0AA0;GUJARATI LETTER TTHA;Lo;0;L;;;;;N;;;;; +0AA1;GUJARATI LETTER DDA;Lo;0;L;;;;;N;;;;; +0AA2;GUJARATI LETTER DDHA;Lo;0;L;;;;;N;;;;; +0AA3;GUJARATI LETTER NNA;Lo;0;L;;;;;N;;;;; +0AA4;GUJARATI LETTER TA;Lo;0;L;;;;;N;;;;; +0AA5;GUJARATI LETTER THA;Lo;0;L;;;;;N;;;;; +0AA6;GUJARATI LETTER DA;Lo;0;L;;;;;N;;;;; +0AA7;GUJARATI LETTER DHA;Lo;0;L;;;;;N;;;;; +0AA8;GUJARATI LETTER NA;Lo;0;L;;;;;N;;;;; +0AAA;GUJARATI LETTER PA;Lo;0;L;;;;;N;;;;; +0AAB;GUJARATI LETTER PHA;Lo;0;L;;;;;N;;;;; +0AAC;GUJARATI LETTER BA;Lo;0;L;;;;;N;;;;; +0AAD;GUJARATI LETTER BHA;Lo;0;L;;;;;N;;;;; +0AAE;GUJARATI LETTER MA;Lo;0;L;;;;;N;;;;; +0AAF;GUJARATI LETTER YA;Lo;0;L;;;;;N;;;;; +0AB0;GUJARATI LETTER RA;Lo;0;L;;;;;N;;;;; +0AB2;GUJARATI LETTER LA;Lo;0;L;;;;;N;;;;; +0AB3;GUJARATI LETTER LLA;Lo;0;L;;;;;N;;;;; +0AB5;GUJARATI LETTER VA;Lo;0;L;;;;;N;;;;; +0AB6;GUJARATI LETTER SHA;Lo;0;L;;;;;N;;;;; +0AB7;GUJARATI LETTER SSA;Lo;0;L;;;;;N;;;;; +0AB8;GUJARATI LETTER SA;Lo;0;L;;;;;N;;;;; +0AB9;GUJARATI LETTER HA;Lo;0;L;;;;;N;;;;; +0ABC;GUJARATI SIGN NUKTA;Mn;7;NSM;;;;;N;;;;; +0ABD;GUJARATI SIGN AVAGRAHA;Lo;0;L;;;;;N;;;;; +0ABE;GUJARATI VOWEL SIGN AA;Mc;0;L;;;;;N;;;;; +0ABF;GUJARATI VOWEL SIGN I;Mc;0;L;;;;;N;;;;; +0AC0;GUJARATI VOWEL SIGN II;Mc;0;L;;;;;N;;;;; +0AC1;GUJARATI VOWEL SIGN U;Mn;0;NSM;;;;;N;;;;; +0AC2;GUJARATI VOWEL SIGN UU;Mn;0;NSM;;;;;N;;;;; +0AC3;GUJARATI VOWEL SIGN VOCALIC R;Mn;0;NSM;;;;;N;;;;; +0AC4;GUJARATI VOWEL SIGN VOCALIC RR;Mn;0;NSM;;;;;N;;;;; +0AC5;GUJARATI VOWEL SIGN CANDRA E;Mn;0;NSM;;;;;N;;;;; +0AC7;GUJARATI VOWEL SIGN E;Mn;0;NSM;;;;;N;;;;; +0AC8;GUJARATI VOWEL SIGN AI;Mn;0;NSM;;;;;N;;;;; +0AC9;GUJARATI VOWEL SIGN CANDRA O;Mc;0;L;;;;;N;;;;; +0ACB;GUJARATI VOWEL SIGN O;Mc;0;L;;;;;N;;;;; +0ACC;GUJARATI VOWEL SIGN AU;Mc;0;L;;;;;N;;;;; +0ACD;GUJARATI SIGN VIRAMA;Mn;9;NSM;;;;;N;;;;; +0AD0;GUJARATI OM;Lo;0;L;;;;;N;;;;; +0AE0;GUJARATI LETTER VOCALIC RR;Lo;0;L;;;;;N;;;;; +0AE1;GUJARATI LETTER VOCALIC LL;Lo;0;L;;;;;N;;;;; +0AE2;GUJARATI VOWEL SIGN VOCALIC L;Mn;0;NSM;;;;;N;;;;; +0AE3;GUJARATI VOWEL SIGN VOCALIC LL;Mn;0;NSM;;;;;N;;;;; +0AE6;GUJARATI DIGIT ZERO;Nd;0;L;;0;0;0;N;;;;; +0AE7;GUJARATI DIGIT ONE;Nd;0;L;;1;1;1;N;;;;; +0AE8;GUJARATI DIGIT TWO;Nd;0;L;;2;2;2;N;;;;; +0AE9;GUJARATI DIGIT THREE;Nd;0;L;;3;3;3;N;;;;; +0AEA;GUJARATI DIGIT FOUR;Nd;0;L;;4;4;4;N;;;;; +0AEB;GUJARATI DIGIT FIVE;Nd;0;L;;5;5;5;N;;;;; +0AEC;GUJARATI DIGIT SIX;Nd;0;L;;6;6;6;N;;;;; +0AED;GUJARATI DIGIT SEVEN;Nd;0;L;;7;7;7;N;;;;; +0AEE;GUJARATI DIGIT EIGHT;Nd;0;L;;8;8;8;N;;;;; +0AEF;GUJARATI DIGIT NINE;Nd;0;L;;9;9;9;N;;;;; +0AF0;GUJARATI ABBREVIATION SIGN;Po;0;L;;;;;N;;;;; +0AF1;GUJARATI RUPEE SIGN;Sc;0;ET;;;;;N;;;;; +0AF9;GUJARATI LETTER ZHA;Lo;0;L;;;;;N;;;;; +0AFA;GUJARATI SIGN SUKUN;Mn;0;NSM;;;;;N;;;;; +0AFB;GUJARATI SIGN SHADDA;Mn;0;NSM;;;;;N;;;;; +0AFC;GUJARATI SIGN MADDAH;Mn;0;NSM;;;;;N;;;;; +0AFD;GUJARATI SIGN THREE-DOT NUKTA ABOVE;Mn;0;NSM;;;;;N;;;;; +0AFE;GUJARATI SIGN CIRCLE NUKTA ABOVE;Mn;0;NSM;;;;;N;;;;; +0AFF;GUJARATI SIGN TWO-CIRCLE NUKTA ABOVE;Mn;0;NSM;;;;;N;;;;; +0B01;ORIYA SIGN CANDRABINDU;Mn;0;NSM;;;;;N;;;;; +0B02;ORIYA SIGN ANUSVARA;Mc;0;L;;;;;N;;;;; +0B03;ORIYA SIGN VISARGA;Mc;0;L;;;;;N;;;;; +0B05;ORIYA LETTER A;Lo;0;L;;;;;N;;;;; +0B06;ORIYA LETTER AA;Lo;0;L;;;;;N;;;;; +0B07;ORIYA LETTER I;Lo;0;L;;;;;N;;;;; +0B08;ORIYA LETTER II;Lo;0;L;;;;;N;;;;; +0B09;ORIYA LETTER U;Lo;0;L;;;;;N;;;;; +0B0A;ORIYA LETTER UU;Lo;0;L;;;;;N;;;;; +0B0B;ORIYA LETTER VOCALIC R;Lo;0;L;;;;;N;;;;; +0B0C;ORIYA LETTER VOCALIC L;Lo;0;L;;;;;N;;;;; +0B0F;ORIYA LETTER E;Lo;0;L;;;;;N;;;;; +0B10;ORIYA LETTER AI;Lo;0;L;;;;;N;;;;; +0B13;ORIYA LETTER O;Lo;0;L;;;;;N;;;;; +0B14;ORIYA LETTER AU;Lo;0;L;;;;;N;;;;; +0B15;ORIYA LETTER KA;Lo;0;L;;;;;N;;;;; +0B16;ORIYA LETTER KHA;Lo;0;L;;;;;N;;;;; +0B17;ORIYA LETTER GA;Lo;0;L;;;;;N;;;;; +0B18;ORIYA LETTER GHA;Lo;0;L;;;;;N;;;;; +0B19;ORIYA LETTER NGA;Lo;0;L;;;;;N;;;;; +0B1A;ORIYA LETTER CA;Lo;0;L;;;;;N;;;;; +0B1B;ORIYA LETTER CHA;Lo;0;L;;;;;N;;;;; +0B1C;ORIYA LETTER JA;Lo;0;L;;;;;N;;;;; +0B1D;ORIYA LETTER JHA;Lo;0;L;;;;;N;;;;; +0B1E;ORIYA LETTER NYA;Lo;0;L;;;;;N;;;;; +0B1F;ORIYA LETTER TTA;Lo;0;L;;;;;N;;;;; +0B20;ORIYA LETTER TTHA;Lo;0;L;;;;;N;;;;; +0B21;ORIYA LETTER DDA;Lo;0;L;;;;;N;;;;; +0B22;ORIYA LETTER DDHA;Lo;0;L;;;;;N;;;;; +0B23;ORIYA LETTER NNA;Lo;0;L;;;;;N;;;;; +0B24;ORIYA LETTER TA;Lo;0;L;;;;;N;;;;; +0B25;ORIYA LETTER THA;Lo;0;L;;;;;N;;;;; +0B26;ORIYA LETTER DA;Lo;0;L;;;;;N;;;;; +0B27;ORIYA LETTER DHA;Lo;0;L;;;;;N;;;;; +0B28;ORIYA LETTER NA;Lo;0;L;;;;;N;;;;; +0B2A;ORIYA LETTER PA;Lo;0;L;;;;;N;;;;; +0B2B;ORIYA LETTER PHA;Lo;0;L;;;;;N;;;;; +0B2C;ORIYA LETTER BA;Lo;0;L;;;;;N;;;;; +0B2D;ORIYA LETTER BHA;Lo;0;L;;;;;N;;;;; +0B2E;ORIYA LETTER MA;Lo;0;L;;;;;N;;;;; +0B2F;ORIYA LETTER YA;Lo;0;L;;;;;N;;;;; +0B30;ORIYA LETTER RA;Lo;0;L;;;;;N;;;;; +0B32;ORIYA LETTER LA;Lo;0;L;;;;;N;;;;; +0B33;ORIYA LETTER LLA;Lo;0;L;;;;;N;;;;; +0B35;ORIYA LETTER VA;Lo;0;L;;;;;N;;;;; +0B36;ORIYA LETTER SHA;Lo;0;L;;;;;N;;;;; +0B37;ORIYA LETTER SSA;Lo;0;L;;;;;N;;;;; +0B38;ORIYA LETTER SA;Lo;0;L;;;;;N;;;;; +0B39;ORIYA LETTER HA;Lo;0;L;;;;;N;;;;; +0B3C;ORIYA SIGN NUKTA;Mn;7;NSM;;;;;N;;;;; +0B3D;ORIYA SIGN AVAGRAHA;Lo;0;L;;;;;N;;;;; +0B3E;ORIYA VOWEL SIGN AA;Mc;0;L;;;;;N;;;;; +0B3F;ORIYA VOWEL SIGN I;Mn;0;NSM;;;;;N;;;;; +0B40;ORIYA VOWEL SIGN II;Mc;0;L;;;;;N;;;;; +0B41;ORIYA VOWEL SIGN U;Mn;0;NSM;;;;;N;;;;; +0B42;ORIYA VOWEL SIGN UU;Mn;0;NSM;;;;;N;;;;; +0B43;ORIYA VOWEL SIGN VOCALIC R;Mn;0;NSM;;;;;N;;;;; +0B44;ORIYA VOWEL SIGN VOCALIC RR;Mn;0;NSM;;;;;N;;;;; +0B47;ORIYA VOWEL SIGN E;Mc;0;L;;;;;N;;;;; +0B48;ORIYA VOWEL SIGN AI;Mc;0;L;0B47 0B56;;;;N;;;;; +0B4B;ORIYA VOWEL SIGN O;Mc;0;L;0B47 0B3E;;;;N;;;;; +0B4C;ORIYA VOWEL SIGN AU;Mc;0;L;0B47 0B57;;;;N;;;;; +0B4D;ORIYA SIGN VIRAMA;Mn;9;NSM;;;;;N;;;;; +0B56;ORIYA AI LENGTH MARK;Mn;0;NSM;;;;;N;;;;; +0B57;ORIYA AU LENGTH MARK;Mc;0;L;;;;;N;;;;; +0B5C;ORIYA LETTER RRA;Lo;0;L;0B21 0B3C;;;;N;;;;; +0B5D;ORIYA LETTER RHA;Lo;0;L;0B22 0B3C;;;;N;;;;; +0B5F;ORIYA LETTER YYA;Lo;0;L;;;;;N;;;;; +0B60;ORIYA LETTER VOCALIC RR;Lo;0;L;;;;;N;;;;; +0B61;ORIYA LETTER VOCALIC LL;Lo;0;L;;;;;N;;;;; +0B62;ORIYA VOWEL SIGN VOCALIC L;Mn;0;NSM;;;;;N;;;;; +0B63;ORIYA VOWEL SIGN VOCALIC LL;Mn;0;NSM;;;;;N;;;;; +0B66;ORIYA DIGIT ZERO;Nd;0;L;;0;0;0;N;;;;; +0B67;ORIYA DIGIT ONE;Nd;0;L;;1;1;1;N;;;;; +0B68;ORIYA DIGIT TWO;Nd;0;L;;2;2;2;N;;;;; +0B69;ORIYA DIGIT THREE;Nd;0;L;;3;3;3;N;;;;; +0B6A;ORIYA DIGIT FOUR;Nd;0;L;;4;4;4;N;;;;; +0B6B;ORIYA DIGIT FIVE;Nd;0;L;;5;5;5;N;;;;; +0B6C;ORIYA DIGIT SIX;Nd;0;L;;6;6;6;N;;;;; +0B6D;ORIYA DIGIT SEVEN;Nd;0;L;;7;7;7;N;;;;; +0B6E;ORIYA DIGIT EIGHT;Nd;0;L;;8;8;8;N;;;;; +0B6F;ORIYA DIGIT NINE;Nd;0;L;;9;9;9;N;;;;; +0B70;ORIYA ISSHAR;So;0;L;;;;;N;;;;; +0B71;ORIYA LETTER WA;Lo;0;L;;;;;N;;;;; +0B72;ORIYA FRACTION ONE QUARTER;No;0;L;;;;1/4;N;;;;; +0B73;ORIYA FRACTION ONE HALF;No;0;L;;;;1/2;N;;;;; +0B74;ORIYA FRACTION THREE QUARTERS;No;0;L;;;;3/4;N;;;;; +0B75;ORIYA FRACTION ONE SIXTEENTH;No;0;L;;;;1/16;N;;;;; +0B76;ORIYA FRACTION ONE EIGHTH;No;0;L;;;;1/8;N;;;;; +0B77;ORIYA FRACTION THREE SIXTEENTHS;No;0;L;;;;3/16;N;;;;; +0B82;TAMIL SIGN ANUSVARA;Mn;0;NSM;;;;;N;;;;; +0B83;TAMIL SIGN VISARGA;Lo;0;L;;;;;N;;;;; +0B85;TAMIL LETTER A;Lo;0;L;;;;;N;;;;; +0B86;TAMIL LETTER AA;Lo;0;L;;;;;N;;;;; +0B87;TAMIL LETTER I;Lo;0;L;;;;;N;;;;; +0B88;TAMIL LETTER II;Lo;0;L;;;;;N;;;;; +0B89;TAMIL LETTER U;Lo;0;L;;;;;N;;;;; +0B8A;TAMIL LETTER UU;Lo;0;L;;;;;N;;;;; +0B8E;TAMIL LETTER E;Lo;0;L;;;;;N;;;;; +0B8F;TAMIL LETTER EE;Lo;0;L;;;;;N;;;;; +0B90;TAMIL LETTER AI;Lo;0;L;;;;;N;;;;; +0B92;TAMIL LETTER O;Lo;0;L;;;;;N;;;;; +0B93;TAMIL LETTER OO;Lo;0;L;;;;;N;;;;; +0B94;TAMIL LETTER AU;Lo;0;L;0B92 0BD7;;;;N;;;;; +0B95;TAMIL LETTER KA;Lo;0;L;;;;;N;;;;; +0B99;TAMIL LETTER NGA;Lo;0;L;;;;;N;;;;; +0B9A;TAMIL LETTER CA;Lo;0;L;;;;;N;;;;; +0B9C;TAMIL LETTER JA;Lo;0;L;;;;;N;;;;; +0B9E;TAMIL LETTER NYA;Lo;0;L;;;;;N;;;;; +0B9F;TAMIL LETTER TTA;Lo;0;L;;;;;N;;;;; +0BA3;TAMIL LETTER NNA;Lo;0;L;;;;;N;;;;; +0BA4;TAMIL LETTER TA;Lo;0;L;;;;;N;;;;; +0BA8;TAMIL LETTER NA;Lo;0;L;;;;;N;;;;; +0BA9;TAMIL LETTER NNNA;Lo;0;L;;;;;N;;;;; +0BAA;TAMIL LETTER PA;Lo;0;L;;;;;N;;;;; +0BAE;TAMIL LETTER MA;Lo;0;L;;;;;N;;;;; +0BAF;TAMIL LETTER YA;Lo;0;L;;;;;N;;;;; +0BB0;TAMIL LETTER RA;Lo;0;L;;;;;N;;;;; +0BB1;TAMIL LETTER RRA;Lo;0;L;;;;;N;;;;; +0BB2;TAMIL LETTER LA;Lo;0;L;;;;;N;;;;; +0BB3;TAMIL LETTER LLA;Lo;0;L;;;;;N;;;;; +0BB4;TAMIL LETTER LLLA;Lo;0;L;;;;;N;;;;; +0BB5;TAMIL LETTER VA;Lo;0;L;;;;;N;;;;; +0BB6;TAMIL LETTER SHA;Lo;0;L;;;;;N;;;;; +0BB7;TAMIL LETTER SSA;Lo;0;L;;;;;N;;;;; +0BB8;TAMIL LETTER SA;Lo;0;L;;;;;N;;;;; +0BB9;TAMIL LETTER HA;Lo;0;L;;;;;N;;;;; +0BBE;TAMIL VOWEL SIGN AA;Mc;0;L;;;;;N;;;;; +0BBF;TAMIL VOWEL SIGN I;Mc;0;L;;;;;N;;;;; +0BC0;TAMIL VOWEL SIGN II;Mn;0;NSM;;;;;N;;;;; +0BC1;TAMIL VOWEL SIGN U;Mc;0;L;;;;;N;;;;; +0BC2;TAMIL VOWEL SIGN UU;Mc;0;L;;;;;N;;;;; +0BC6;TAMIL VOWEL SIGN E;Mc;0;L;;;;;N;;;;; +0BC7;TAMIL VOWEL SIGN EE;Mc;0;L;;;;;N;;;;; +0BC8;TAMIL VOWEL SIGN AI;Mc;0;L;;;;;N;;;;; +0BCA;TAMIL VOWEL SIGN O;Mc;0;L;0BC6 0BBE;;;;N;;;;; +0BCB;TAMIL VOWEL SIGN OO;Mc;0;L;0BC7 0BBE;;;;N;;;;; +0BCC;TAMIL VOWEL SIGN AU;Mc;0;L;0BC6 0BD7;;;;N;;;;; +0BCD;TAMIL SIGN VIRAMA;Mn;9;NSM;;;;;N;;;;; +0BD0;TAMIL OM;Lo;0;L;;;;;N;;;;; +0BD7;TAMIL AU LENGTH MARK;Mc;0;L;;;;;N;;;;; +0BE6;TAMIL DIGIT ZERO;Nd;0;L;;0;0;0;N;;;;; +0BE7;TAMIL DIGIT ONE;Nd;0;L;;1;1;1;N;;;;; +0BE8;TAMIL DIGIT TWO;Nd;0;L;;2;2;2;N;;;;; +0BE9;TAMIL DIGIT THREE;Nd;0;L;;3;3;3;N;;;;; +0BEA;TAMIL DIGIT FOUR;Nd;0;L;;4;4;4;N;;;;; +0BEB;TAMIL DIGIT FIVE;Nd;0;L;;5;5;5;N;;;;; +0BEC;TAMIL DIGIT SIX;Nd;0;L;;6;6;6;N;;;;; +0BED;TAMIL DIGIT SEVEN;Nd;0;L;;7;7;7;N;;;;; +0BEE;TAMIL DIGIT EIGHT;Nd;0;L;;8;8;8;N;;;;; +0BEF;TAMIL DIGIT NINE;Nd;0;L;;9;9;9;N;;;;; +0BF0;TAMIL NUMBER TEN;No;0;L;;;;10;N;;;;; +0BF1;TAMIL NUMBER ONE HUNDRED;No;0;L;;;;100;N;;;;; +0BF2;TAMIL NUMBER ONE THOUSAND;No;0;L;;;;1000;N;;;;; +0BF3;TAMIL DAY SIGN;So;0;ON;;;;;N;;;;; +0BF4;TAMIL MONTH SIGN;So;0;ON;;;;;N;;;;; +0BF5;TAMIL YEAR SIGN;So;0;ON;;;;;N;;;;; +0BF6;TAMIL DEBIT SIGN;So;0;ON;;;;;N;;;;; +0BF7;TAMIL CREDIT SIGN;So;0;ON;;;;;N;;;;; +0BF8;TAMIL AS ABOVE SIGN;So;0;ON;;;;;N;;;;; +0BF9;TAMIL RUPEE SIGN;Sc;0;ET;;;;;N;;;;; +0BFA;TAMIL NUMBER SIGN;So;0;ON;;;;;N;;;;; +0C00;TELUGU SIGN COMBINING CANDRABINDU ABOVE;Mn;0;NSM;;;;;N;;;;; +0C01;TELUGU SIGN CANDRABINDU;Mc;0;L;;;;;N;;;;; +0C02;TELUGU SIGN ANUSVARA;Mc;0;L;;;;;N;;;;; +0C03;TELUGU SIGN VISARGA;Mc;0;L;;;;;N;;;;; +0C04;TELUGU SIGN COMBINING ANUSVARA ABOVE;Mn;0;NSM;;;;;N;;;;; +0C05;TELUGU LETTER A;Lo;0;L;;;;;N;;;;; +0C06;TELUGU LETTER AA;Lo;0;L;;;;;N;;;;; +0C07;TELUGU LETTER I;Lo;0;L;;;;;N;;;;; +0C08;TELUGU LETTER II;Lo;0;L;;;;;N;;;;; +0C09;TELUGU LETTER U;Lo;0;L;;;;;N;;;;; +0C0A;TELUGU LETTER UU;Lo;0;L;;;;;N;;;;; +0C0B;TELUGU LETTER VOCALIC R;Lo;0;L;;;;;N;;;;; +0C0C;TELUGU LETTER VOCALIC L;Lo;0;L;;;;;N;;;;; +0C0E;TELUGU LETTER E;Lo;0;L;;;;;N;;;;; +0C0F;TELUGU LETTER EE;Lo;0;L;;;;;N;;;;; +0C10;TELUGU LETTER AI;Lo;0;L;;;;;N;;;;; +0C12;TELUGU LETTER O;Lo;0;L;;;;;N;;;;; +0C13;TELUGU LETTER OO;Lo;0;L;;;;;N;;;;; +0C14;TELUGU LETTER AU;Lo;0;L;;;;;N;;;;; +0C15;TELUGU LETTER KA;Lo;0;L;;;;;N;;;;; +0C16;TELUGU LETTER KHA;Lo;0;L;;;;;N;;;;; +0C17;TELUGU LETTER GA;Lo;0;L;;;;;N;;;;; +0C18;TELUGU LETTER GHA;Lo;0;L;;;;;N;;;;; +0C19;TELUGU LETTER NGA;Lo;0;L;;;;;N;;;;; +0C1A;TELUGU LETTER CA;Lo;0;L;;;;;N;;;;; +0C1B;TELUGU LETTER CHA;Lo;0;L;;;;;N;;;;; +0C1C;TELUGU LETTER JA;Lo;0;L;;;;;N;;;;; +0C1D;TELUGU LETTER JHA;Lo;0;L;;;;;N;;;;; +0C1E;TELUGU LETTER NYA;Lo;0;L;;;;;N;;;;; +0C1F;TELUGU LETTER TTA;Lo;0;L;;;;;N;;;;; +0C20;TELUGU LETTER TTHA;Lo;0;L;;;;;N;;;;; +0C21;TELUGU LETTER DDA;Lo;0;L;;;;;N;;;;; +0C22;TELUGU LETTER DDHA;Lo;0;L;;;;;N;;;;; +0C23;TELUGU LETTER NNA;Lo;0;L;;;;;N;;;;; +0C24;TELUGU LETTER TA;Lo;0;L;;;;;N;;;;; +0C25;TELUGU LETTER THA;Lo;0;L;;;;;N;;;;; +0C26;TELUGU LETTER DA;Lo;0;L;;;;;N;;;;; +0C27;TELUGU LETTER DHA;Lo;0;L;;;;;N;;;;; +0C28;TELUGU LETTER NA;Lo;0;L;;;;;N;;;;; +0C2A;TELUGU LETTER PA;Lo;0;L;;;;;N;;;;; +0C2B;TELUGU LETTER PHA;Lo;0;L;;;;;N;;;;; +0C2C;TELUGU LETTER BA;Lo;0;L;;;;;N;;;;; +0C2D;TELUGU LETTER BHA;Lo;0;L;;;;;N;;;;; +0C2E;TELUGU LETTER MA;Lo;0;L;;;;;N;;;;; +0C2F;TELUGU LETTER YA;Lo;0;L;;;;;N;;;;; +0C30;TELUGU LETTER RA;Lo;0;L;;;;;N;;;;; +0C31;TELUGU LETTER RRA;Lo;0;L;;;;;N;;;;; +0C32;TELUGU LETTER LA;Lo;0;L;;;;;N;;;;; +0C33;TELUGU LETTER LLA;Lo;0;L;;;;;N;;;;; +0C34;TELUGU LETTER LLLA;Lo;0;L;;;;;N;;;;; +0C35;TELUGU LETTER VA;Lo;0;L;;;;;N;;;;; +0C36;TELUGU LETTER SHA;Lo;0;L;;;;;N;;;;; +0C37;TELUGU LETTER SSA;Lo;0;L;;;;;N;;;;; +0C38;TELUGU LETTER SA;Lo;0;L;;;;;N;;;;; +0C39;TELUGU LETTER HA;Lo;0;L;;;;;N;;;;; +0C3D;TELUGU SIGN AVAGRAHA;Lo;0;L;;;;;N;;;;; +0C3E;TELUGU VOWEL SIGN AA;Mn;0;NSM;;;;;N;;;;; +0C3F;TELUGU VOWEL SIGN I;Mn;0;NSM;;;;;N;;;;; +0C40;TELUGU VOWEL SIGN II;Mn;0;NSM;;;;;N;;;;; +0C41;TELUGU VOWEL SIGN U;Mc;0;L;;;;;N;;;;; +0C42;TELUGU VOWEL SIGN UU;Mc;0;L;;;;;N;;;;; +0C43;TELUGU VOWEL SIGN VOCALIC R;Mc;0;L;;;;;N;;;;; +0C44;TELUGU VOWEL SIGN VOCALIC RR;Mc;0;L;;;;;N;;;;; +0C46;TELUGU VOWEL SIGN E;Mn;0;NSM;;;;;N;;;;; +0C47;TELUGU VOWEL SIGN EE;Mn;0;NSM;;;;;N;;;;; +0C48;TELUGU VOWEL SIGN AI;Mn;0;NSM;0C46 0C56;;;;N;;;;; +0C4A;TELUGU VOWEL SIGN O;Mn;0;NSM;;;;;N;;;;; +0C4B;TELUGU VOWEL SIGN OO;Mn;0;NSM;;;;;N;;;;; +0C4C;TELUGU VOWEL SIGN AU;Mn;0;NSM;;;;;N;;;;; +0C4D;TELUGU SIGN VIRAMA;Mn;9;NSM;;;;;N;;;;; +0C55;TELUGU LENGTH MARK;Mn;84;NSM;;;;;N;;;;; +0C56;TELUGU AI LENGTH MARK;Mn;91;NSM;;;;;N;;;;; +0C58;TELUGU LETTER TSA;Lo;0;L;;;;;N;;;;; +0C59;TELUGU LETTER DZA;Lo;0;L;;;;;N;;;;; +0C5A;TELUGU LETTER RRRA;Lo;0;L;;;;;N;;;;; +0C60;TELUGU LETTER VOCALIC RR;Lo;0;L;;;;;N;;;;; +0C61;TELUGU LETTER VOCALIC LL;Lo;0;L;;;;;N;;;;; +0C62;TELUGU VOWEL SIGN VOCALIC L;Mn;0;NSM;;;;;N;;;;; +0C63;TELUGU VOWEL SIGN VOCALIC LL;Mn;0;NSM;;;;;N;;;;; +0C66;TELUGU DIGIT ZERO;Nd;0;L;;0;0;0;N;;;;; +0C67;TELUGU DIGIT ONE;Nd;0;L;;1;1;1;N;;;;; +0C68;TELUGU DIGIT TWO;Nd;0;L;;2;2;2;N;;;;; +0C69;TELUGU DIGIT THREE;Nd;0;L;;3;3;3;N;;;;; +0C6A;TELUGU DIGIT FOUR;Nd;0;L;;4;4;4;N;;;;; +0C6B;TELUGU DIGIT FIVE;Nd;0;L;;5;5;5;N;;;;; +0C6C;TELUGU DIGIT SIX;Nd;0;L;;6;6;6;N;;;;; +0C6D;TELUGU DIGIT SEVEN;Nd;0;L;;7;7;7;N;;;;; +0C6E;TELUGU DIGIT EIGHT;Nd;0;L;;8;8;8;N;;;;; +0C6F;TELUGU DIGIT NINE;Nd;0;L;;9;9;9;N;;;;; +0C77;TELUGU SIGN SIDDHAM;Po;0;L;;;;;N;;;;; +0C78;TELUGU FRACTION DIGIT ZERO FOR ODD POWERS OF FOUR;No;0;ON;;;;0;N;;;;; +0C79;TELUGU FRACTION DIGIT ONE FOR ODD POWERS OF FOUR;No;0;ON;;;;1;N;;;;; +0C7A;TELUGU FRACTION DIGIT TWO FOR ODD POWERS OF FOUR;No;0;ON;;;;2;N;;;;; +0C7B;TELUGU FRACTION DIGIT THREE FOR ODD POWERS OF FOUR;No;0;ON;;;;3;N;;;;; +0C7C;TELUGU FRACTION DIGIT ONE FOR EVEN POWERS OF FOUR;No;0;ON;;;;1;N;;;;; +0C7D;TELUGU FRACTION DIGIT TWO FOR EVEN POWERS OF FOUR;No;0;ON;;;;2;N;;;;; +0C7E;TELUGU FRACTION DIGIT THREE FOR EVEN POWERS OF FOUR;No;0;ON;;;;3;N;;;;; +0C7F;TELUGU SIGN TUUMU;So;0;L;;;;;N;;;;; +0C80;KANNADA SIGN SPACING CANDRABINDU;Lo;0;L;;;;;N;;;;; +0C81;KANNADA SIGN CANDRABINDU;Mn;0;NSM;;;;;N;;;;; +0C82;KANNADA SIGN ANUSVARA;Mc;0;L;;;;;N;;;;; +0C83;KANNADA SIGN VISARGA;Mc;0;L;;;;;N;;;;; +0C84;KANNADA SIGN SIDDHAM;Po;0;L;;;;;N;;;;; +0C85;KANNADA LETTER A;Lo;0;L;;;;;N;;;;; +0C86;KANNADA LETTER AA;Lo;0;L;;;;;N;;;;; +0C87;KANNADA LETTER I;Lo;0;L;;;;;N;;;;; +0C88;KANNADA LETTER II;Lo;0;L;;;;;N;;;;; +0C89;KANNADA LETTER U;Lo;0;L;;;;;N;;;;; +0C8A;KANNADA LETTER UU;Lo;0;L;;;;;N;;;;; +0C8B;KANNADA LETTER VOCALIC R;Lo;0;L;;;;;N;;;;; +0C8C;KANNADA LETTER VOCALIC L;Lo;0;L;;;;;N;;;;; +0C8E;KANNADA LETTER E;Lo;0;L;;;;;N;;;;; +0C8F;KANNADA LETTER EE;Lo;0;L;;;;;N;;;;; +0C90;KANNADA LETTER AI;Lo;0;L;;;;;N;;;;; +0C92;KANNADA LETTER O;Lo;0;L;;;;;N;;;;; +0C93;KANNADA LETTER OO;Lo;0;L;;;;;N;;;;; +0C94;KANNADA LETTER AU;Lo;0;L;;;;;N;;;;; +0C95;KANNADA LETTER KA;Lo;0;L;;;;;N;;;;; +0C96;KANNADA LETTER KHA;Lo;0;L;;;;;N;;;;; +0C97;KANNADA LETTER GA;Lo;0;L;;;;;N;;;;; +0C98;KANNADA LETTER GHA;Lo;0;L;;;;;N;;;;; +0C99;KANNADA LETTER NGA;Lo;0;L;;;;;N;;;;; +0C9A;KANNADA LETTER CA;Lo;0;L;;;;;N;;;;; +0C9B;KANNADA LETTER CHA;Lo;0;L;;;;;N;;;;; +0C9C;KANNADA LETTER JA;Lo;0;L;;;;;N;;;;; +0C9D;KANNADA LETTER JHA;Lo;0;L;;;;;N;;;;; +0C9E;KANNADA LETTER NYA;Lo;0;L;;;;;N;;;;; +0C9F;KANNADA LETTER TTA;Lo;0;L;;;;;N;;;;; +0CA0;KANNADA LETTER TTHA;Lo;0;L;;;;;N;;;;; +0CA1;KANNADA LETTER DDA;Lo;0;L;;;;;N;;;;; +0CA2;KANNADA LETTER DDHA;Lo;0;L;;;;;N;;;;; +0CA3;KANNADA LETTER NNA;Lo;0;L;;;;;N;;;;; +0CA4;KANNADA LETTER TA;Lo;0;L;;;;;N;;;;; +0CA5;KANNADA LETTER THA;Lo;0;L;;;;;N;;;;; +0CA6;KANNADA LETTER DA;Lo;0;L;;;;;N;;;;; +0CA7;KANNADA LETTER DHA;Lo;0;L;;;;;N;;;;; +0CA8;KANNADA LETTER NA;Lo;0;L;;;;;N;;;;; +0CAA;KANNADA LETTER PA;Lo;0;L;;;;;N;;;;; +0CAB;KANNADA LETTER PHA;Lo;0;L;;;;;N;;;;; +0CAC;KANNADA LETTER BA;Lo;0;L;;;;;N;;;;; +0CAD;KANNADA LETTER BHA;Lo;0;L;;;;;N;;;;; +0CAE;KANNADA LETTER MA;Lo;0;L;;;;;N;;;;; +0CAF;KANNADA LETTER YA;Lo;0;L;;;;;N;;;;; +0CB0;KANNADA LETTER RA;Lo;0;L;;;;;N;;;;; +0CB1;KANNADA LETTER RRA;Lo;0;L;;;;;N;;;;; +0CB2;KANNADA LETTER LA;Lo;0;L;;;;;N;;;;; +0CB3;KANNADA LETTER LLA;Lo;0;L;;;;;N;;;;; +0CB5;KANNADA LETTER VA;Lo;0;L;;;;;N;;;;; +0CB6;KANNADA LETTER SHA;Lo;0;L;;;;;N;;;;; +0CB7;KANNADA LETTER SSA;Lo;0;L;;;;;N;;;;; +0CB8;KANNADA LETTER SA;Lo;0;L;;;;;N;;;;; +0CB9;KANNADA LETTER HA;Lo;0;L;;;;;N;;;;; +0CBC;KANNADA SIGN NUKTA;Mn;7;NSM;;;;;N;;;;; +0CBD;KANNADA SIGN AVAGRAHA;Lo;0;L;;;;;N;;;;; +0CBE;KANNADA VOWEL SIGN AA;Mc;0;L;;;;;N;;;;; +0CBF;KANNADA VOWEL SIGN I;Mn;0;L;;;;;N;;;;; +0CC0;KANNADA VOWEL SIGN II;Mc;0;L;0CBF 0CD5;;;;N;;;;; +0CC1;KANNADA VOWEL SIGN U;Mc;0;L;;;;;N;;;;; +0CC2;KANNADA VOWEL SIGN UU;Mc;0;L;;;;;N;;;;; +0CC3;KANNADA VOWEL SIGN VOCALIC R;Mc;0;L;;;;;N;;;;; +0CC4;KANNADA VOWEL SIGN VOCALIC RR;Mc;0;L;;;;;N;;;;; +0CC6;KANNADA VOWEL SIGN E;Mn;0;L;;;;;N;;;;; +0CC7;KANNADA VOWEL SIGN EE;Mc;0;L;0CC6 0CD5;;;;N;;;;; +0CC8;KANNADA VOWEL SIGN AI;Mc;0;L;0CC6 0CD6;;;;N;;;;; +0CCA;KANNADA VOWEL SIGN O;Mc;0;L;0CC6 0CC2;;;;N;;;;; +0CCB;KANNADA VOWEL SIGN OO;Mc;0;L;0CCA 0CD5;;;;N;;;;; +0CCC;KANNADA VOWEL SIGN AU;Mn;0;NSM;;;;;N;;;;; +0CCD;KANNADA SIGN VIRAMA;Mn;9;NSM;;;;;N;;;;; +0CD5;KANNADA LENGTH MARK;Mc;0;L;;;;;N;;;;; +0CD6;KANNADA AI LENGTH MARK;Mc;0;L;;;;;N;;;;; +0CDE;KANNADA LETTER FA;Lo;0;L;;;;;N;;;;; +0CE0;KANNADA LETTER VOCALIC RR;Lo;0;L;;;;;N;;;;; +0CE1;KANNADA LETTER VOCALIC LL;Lo;0;L;;;;;N;;;;; +0CE2;KANNADA VOWEL SIGN VOCALIC L;Mn;0;NSM;;;;;N;;;;; +0CE3;KANNADA VOWEL SIGN VOCALIC LL;Mn;0;NSM;;;;;N;;;;; +0CE6;KANNADA DIGIT ZERO;Nd;0;L;;0;0;0;N;;;;; +0CE7;KANNADA DIGIT ONE;Nd;0;L;;1;1;1;N;;;;; +0CE8;KANNADA DIGIT TWO;Nd;0;L;;2;2;2;N;;;;; +0CE9;KANNADA DIGIT THREE;Nd;0;L;;3;3;3;N;;;;; +0CEA;KANNADA DIGIT FOUR;Nd;0;L;;4;4;4;N;;;;; +0CEB;KANNADA DIGIT FIVE;Nd;0;L;;5;5;5;N;;;;; +0CEC;KANNADA DIGIT SIX;Nd;0;L;;6;6;6;N;;;;; +0CED;KANNADA DIGIT SEVEN;Nd;0;L;;7;7;7;N;;;;; +0CEE;KANNADA DIGIT EIGHT;Nd;0;L;;8;8;8;N;;;;; +0CEF;KANNADA DIGIT NINE;Nd;0;L;;9;9;9;N;;;;; +0CF1;KANNADA SIGN JIHVAMULIYA;Lo;0;L;;;;;N;;;;; +0CF2;KANNADA SIGN UPADHMANIYA;Lo;0;L;;;;;N;;;;; +0D00;MALAYALAM SIGN COMBINING ANUSVARA ABOVE;Mn;0;NSM;;;;;N;;;;; +0D01;MALAYALAM SIGN CANDRABINDU;Mn;0;NSM;;;;;N;;;;; +0D02;MALAYALAM SIGN ANUSVARA;Mc;0;L;;;;;N;;;;; +0D03;MALAYALAM SIGN VISARGA;Mc;0;L;;;;;N;;;;; +0D05;MALAYALAM LETTER A;Lo;0;L;;;;;N;;;;; +0D06;MALAYALAM LETTER AA;Lo;0;L;;;;;N;;;;; +0D07;MALAYALAM LETTER I;Lo;0;L;;;;;N;;;;; +0D08;MALAYALAM LETTER II;Lo;0;L;;;;;N;;;;; +0D09;MALAYALAM LETTER U;Lo;0;L;;;;;N;;;;; +0D0A;MALAYALAM LETTER UU;Lo;0;L;;;;;N;;;;; +0D0B;MALAYALAM LETTER VOCALIC R;Lo;0;L;;;;;N;;;;; +0D0C;MALAYALAM LETTER VOCALIC L;Lo;0;L;;;;;N;;;;; +0D0E;MALAYALAM LETTER E;Lo;0;L;;;;;N;;;;; +0D0F;MALAYALAM LETTER EE;Lo;0;L;;;;;N;;;;; +0D10;MALAYALAM LETTER AI;Lo;0;L;;;;;N;;;;; +0D12;MALAYALAM LETTER O;Lo;0;L;;;;;N;;;;; +0D13;MALAYALAM LETTER OO;Lo;0;L;;;;;N;;;;; +0D14;MALAYALAM LETTER AU;Lo;0;L;;;;;N;;;;; +0D15;MALAYALAM LETTER KA;Lo;0;L;;;;;N;;;;; +0D16;MALAYALAM LETTER KHA;Lo;0;L;;;;;N;;;;; +0D17;MALAYALAM LETTER GA;Lo;0;L;;;;;N;;;;; +0D18;MALAYALAM LETTER GHA;Lo;0;L;;;;;N;;;;; +0D19;MALAYALAM LETTER NGA;Lo;0;L;;;;;N;;;;; +0D1A;MALAYALAM LETTER CA;Lo;0;L;;;;;N;;;;; +0D1B;MALAYALAM LETTER CHA;Lo;0;L;;;;;N;;;;; +0D1C;MALAYALAM LETTER JA;Lo;0;L;;;;;N;;;;; +0D1D;MALAYALAM LETTER JHA;Lo;0;L;;;;;N;;;;; +0D1E;MALAYALAM LETTER NYA;Lo;0;L;;;;;N;;;;; +0D1F;MALAYALAM LETTER TTA;Lo;0;L;;;;;N;;;;; +0D20;MALAYALAM LETTER TTHA;Lo;0;L;;;;;N;;;;; +0D21;MALAYALAM LETTER DDA;Lo;0;L;;;;;N;;;;; +0D22;MALAYALAM LETTER DDHA;Lo;0;L;;;;;N;;;;; +0D23;MALAYALAM LETTER NNA;Lo;0;L;;;;;N;;;;; +0D24;MALAYALAM LETTER TA;Lo;0;L;;;;;N;;;;; +0D25;MALAYALAM LETTER THA;Lo;0;L;;;;;N;;;;; +0D26;MALAYALAM LETTER DA;Lo;0;L;;;;;N;;;;; +0D27;MALAYALAM LETTER DHA;Lo;0;L;;;;;N;;;;; +0D28;MALAYALAM LETTER NA;Lo;0;L;;;;;N;;;;; +0D29;MALAYALAM LETTER NNNA;Lo;0;L;;;;;N;;;;; +0D2A;MALAYALAM LETTER PA;Lo;0;L;;;;;N;;;;; +0D2B;MALAYALAM LETTER PHA;Lo;0;L;;;;;N;;;;; +0D2C;MALAYALAM LETTER BA;Lo;0;L;;;;;N;;;;; +0D2D;MALAYALAM LETTER BHA;Lo;0;L;;;;;N;;;;; +0D2E;MALAYALAM LETTER MA;Lo;0;L;;;;;N;;;;; +0D2F;MALAYALAM LETTER YA;Lo;0;L;;;;;N;;;;; +0D30;MALAYALAM LETTER RA;Lo;0;L;;;;;N;;;;; +0D31;MALAYALAM LETTER RRA;Lo;0;L;;;;;N;;;;; +0D32;MALAYALAM LETTER LA;Lo;0;L;;;;;N;;;;; +0D33;MALAYALAM LETTER LLA;Lo;0;L;;;;;N;;;;; +0D34;MALAYALAM LETTER LLLA;Lo;0;L;;;;;N;;;;; +0D35;MALAYALAM LETTER VA;Lo;0;L;;;;;N;;;;; +0D36;MALAYALAM LETTER SHA;Lo;0;L;;;;;N;;;;; +0D37;MALAYALAM LETTER SSA;Lo;0;L;;;;;N;;;;; +0D38;MALAYALAM LETTER SA;Lo;0;L;;;;;N;;;;; +0D39;MALAYALAM LETTER HA;Lo;0;L;;;;;N;;;;; +0D3A;MALAYALAM LETTER TTTA;Lo;0;L;;;;;N;;;;; +0D3B;MALAYALAM SIGN VERTICAL BAR VIRAMA;Mn;9;NSM;;;;;N;;;;; +0D3C;MALAYALAM SIGN CIRCULAR VIRAMA;Mn;9;NSM;;;;;N;;;;; +0D3D;MALAYALAM SIGN AVAGRAHA;Lo;0;L;;;;;N;;;;; +0D3E;MALAYALAM VOWEL SIGN AA;Mc;0;L;;;;;N;;;;; +0D3F;MALAYALAM VOWEL SIGN I;Mc;0;L;;;;;N;;;;; +0D40;MALAYALAM VOWEL SIGN II;Mc;0;L;;;;;N;;;;; +0D41;MALAYALAM VOWEL SIGN U;Mn;0;NSM;;;;;N;;;;; +0D42;MALAYALAM VOWEL SIGN UU;Mn;0;NSM;;;;;N;;;;; +0D43;MALAYALAM VOWEL SIGN VOCALIC R;Mn;0;NSM;;;;;N;;;;; +0D44;MALAYALAM VOWEL SIGN VOCALIC RR;Mn;0;NSM;;;;;N;;;;; +0D46;MALAYALAM VOWEL SIGN E;Mc;0;L;;;;;N;;;;; +0D47;MALAYALAM VOWEL SIGN EE;Mc;0;L;;;;;N;;;;; +0D48;MALAYALAM VOWEL SIGN AI;Mc;0;L;;;;;N;;;;; +0D4A;MALAYALAM VOWEL SIGN O;Mc;0;L;0D46 0D3E;;;;N;;;;; +0D4B;MALAYALAM VOWEL SIGN OO;Mc;0;L;0D47 0D3E;;;;N;;;;; +0D4C;MALAYALAM VOWEL SIGN AU;Mc;0;L;0D46 0D57;;;;N;;;;; +0D4D;MALAYALAM SIGN VIRAMA;Mn;9;NSM;;;;;N;;;;; +0D4E;MALAYALAM LETTER DOT REPH;Lo;0;L;;;;;N;;;;; +0D4F;MALAYALAM SIGN PARA;So;0;L;;;;;N;;;;; +0D54;MALAYALAM LETTER CHILLU M;Lo;0;L;;;;;N;;;;; +0D55;MALAYALAM LETTER CHILLU Y;Lo;0;L;;;;;N;;;;; +0D56;MALAYALAM LETTER CHILLU LLL;Lo;0;L;;;;;N;;;;; +0D57;MALAYALAM AU LENGTH MARK;Mc;0;L;;;;;N;;;;; +0D58;MALAYALAM FRACTION ONE ONE-HUNDRED-AND-SIXTIETH;No;0;L;;;;1/160;N;;;;; +0D59;MALAYALAM FRACTION ONE FORTIETH;No;0;L;;;;1/40;N;;;;; +0D5A;MALAYALAM FRACTION THREE EIGHTIETHS;No;0;L;;;;3/80;N;;;;; +0D5B;MALAYALAM FRACTION ONE TWENTIETH;No;0;L;;;;1/20;N;;;;; +0D5C;MALAYALAM FRACTION ONE TENTH;No;0;L;;;;1/10;N;;;;; +0D5D;MALAYALAM FRACTION THREE TWENTIETHS;No;0;L;;;;3/20;N;;;;; +0D5E;MALAYALAM FRACTION ONE FIFTH;No;0;L;;;;1/5;N;;;;; +0D5F;MALAYALAM LETTER ARCHAIC II;Lo;0;L;;;;;N;;;;; +0D60;MALAYALAM LETTER VOCALIC RR;Lo;0;L;;;;;N;;;;; +0D61;MALAYALAM LETTER VOCALIC LL;Lo;0;L;;;;;N;;;;; +0D62;MALAYALAM VOWEL SIGN VOCALIC L;Mn;0;NSM;;;;;N;;;;; +0D63;MALAYALAM VOWEL SIGN VOCALIC LL;Mn;0;NSM;;;;;N;;;;; +0D66;MALAYALAM DIGIT ZERO;Nd;0;L;;0;0;0;N;;;;; +0D67;MALAYALAM DIGIT ONE;Nd;0;L;;1;1;1;N;;;;; +0D68;MALAYALAM DIGIT TWO;Nd;0;L;;2;2;2;N;;;;; +0D69;MALAYALAM DIGIT THREE;Nd;0;L;;3;3;3;N;;;;; +0D6A;MALAYALAM DIGIT FOUR;Nd;0;L;;4;4;4;N;;;;; +0D6B;MALAYALAM DIGIT FIVE;Nd;0;L;;5;5;5;N;;;;; +0D6C;MALAYALAM DIGIT SIX;Nd;0;L;;6;6;6;N;;;;; +0D6D;MALAYALAM DIGIT SEVEN;Nd;0;L;;7;7;7;N;;;;; +0D6E;MALAYALAM DIGIT EIGHT;Nd;0;L;;8;8;8;N;;;;; +0D6F;MALAYALAM DIGIT NINE;Nd;0;L;;9;9;9;N;;;;; +0D70;MALAYALAM NUMBER TEN;No;0;L;;;;10;N;;;;; +0D71;MALAYALAM NUMBER ONE HUNDRED;No;0;L;;;;100;N;;;;; +0D72;MALAYALAM NUMBER ONE THOUSAND;No;0;L;;;;1000;N;;;;; +0D73;MALAYALAM FRACTION ONE QUARTER;No;0;L;;;;1/4;N;;;;; +0D74;MALAYALAM FRACTION ONE HALF;No;0;L;;;;1/2;N;;;;; +0D75;MALAYALAM FRACTION THREE QUARTERS;No;0;L;;;;3/4;N;;;;; +0D76;MALAYALAM FRACTION ONE SIXTEENTH;No;0;L;;;;1/16;N;;;;; +0D77;MALAYALAM FRACTION ONE EIGHTH;No;0;L;;;;1/8;N;;;;; +0D78;MALAYALAM FRACTION THREE SIXTEENTHS;No;0;L;;;;3/16;N;;;;; +0D79;MALAYALAM DATE MARK;So;0;L;;;;;N;;;;; +0D7A;MALAYALAM LETTER CHILLU NN;Lo;0;L;;;;;N;;;;; +0D7B;MALAYALAM LETTER CHILLU N;Lo;0;L;;;;;N;;;;; +0D7C;MALAYALAM LETTER CHILLU RR;Lo;0;L;;;;;N;;;;; +0D7D;MALAYALAM LETTER CHILLU L;Lo;0;L;;;;;N;;;;; +0D7E;MALAYALAM LETTER CHILLU LL;Lo;0;L;;;;;N;;;;; +0D7F;MALAYALAM LETTER CHILLU K;Lo;0;L;;;;;N;;;;; +0D82;SINHALA SIGN ANUSVARAYA;Mc;0;L;;;;;N;;;;; +0D83;SINHALA SIGN VISARGAYA;Mc;0;L;;;;;N;;;;; +0D85;SINHALA LETTER AYANNA;Lo;0;L;;;;;N;;;;; +0D86;SINHALA LETTER AAYANNA;Lo;0;L;;;;;N;;;;; +0D87;SINHALA LETTER AEYANNA;Lo;0;L;;;;;N;;;;; +0D88;SINHALA LETTER AEEYANNA;Lo;0;L;;;;;N;;;;; +0D89;SINHALA LETTER IYANNA;Lo;0;L;;;;;N;;;;; +0D8A;SINHALA LETTER IIYANNA;Lo;0;L;;;;;N;;;;; +0D8B;SINHALA LETTER UYANNA;Lo;0;L;;;;;N;;;;; +0D8C;SINHALA LETTER UUYANNA;Lo;0;L;;;;;N;;;;; +0D8D;SINHALA LETTER IRUYANNA;Lo;0;L;;;;;N;;;;; +0D8E;SINHALA LETTER IRUUYANNA;Lo;0;L;;;;;N;;;;; +0D8F;SINHALA LETTER ILUYANNA;Lo;0;L;;;;;N;;;;; +0D90;SINHALA LETTER ILUUYANNA;Lo;0;L;;;;;N;;;;; +0D91;SINHALA LETTER EYANNA;Lo;0;L;;;;;N;;;;; +0D92;SINHALA LETTER EEYANNA;Lo;0;L;;;;;N;;;;; +0D93;SINHALA LETTER AIYANNA;Lo;0;L;;;;;N;;;;; +0D94;SINHALA LETTER OYANNA;Lo;0;L;;;;;N;;;;; +0D95;SINHALA LETTER OOYANNA;Lo;0;L;;;;;N;;;;; +0D96;SINHALA LETTER AUYANNA;Lo;0;L;;;;;N;;;;; +0D9A;SINHALA LETTER ALPAPRAANA KAYANNA;Lo;0;L;;;;;N;;;;; +0D9B;SINHALA LETTER MAHAAPRAANA KAYANNA;Lo;0;L;;;;;N;;;;; +0D9C;SINHALA LETTER ALPAPRAANA GAYANNA;Lo;0;L;;;;;N;;;;; +0D9D;SINHALA LETTER MAHAAPRAANA GAYANNA;Lo;0;L;;;;;N;;;;; +0D9E;SINHALA LETTER KANTAJA NAASIKYAYA;Lo;0;L;;;;;N;;;;; +0D9F;SINHALA LETTER SANYAKA GAYANNA;Lo;0;L;;;;;N;;;;; +0DA0;SINHALA LETTER ALPAPRAANA CAYANNA;Lo;0;L;;;;;N;;;;; +0DA1;SINHALA LETTER MAHAAPRAANA CAYANNA;Lo;0;L;;;;;N;;;;; +0DA2;SINHALA LETTER ALPAPRAANA JAYANNA;Lo;0;L;;;;;N;;;;; +0DA3;SINHALA LETTER MAHAAPRAANA JAYANNA;Lo;0;L;;;;;N;;;;; +0DA4;SINHALA LETTER TAALUJA NAASIKYAYA;Lo;0;L;;;;;N;;;;; +0DA5;SINHALA LETTER TAALUJA SANYOOGA NAAKSIKYAYA;Lo;0;L;;;;;N;;;;; +0DA6;SINHALA LETTER SANYAKA JAYANNA;Lo;0;L;;;;;N;;;;; +0DA7;SINHALA LETTER ALPAPRAANA TTAYANNA;Lo;0;L;;;;;N;;;;; +0DA8;SINHALA LETTER MAHAAPRAANA TTAYANNA;Lo;0;L;;;;;N;;;;; +0DA9;SINHALA LETTER ALPAPRAANA DDAYANNA;Lo;0;L;;;;;N;;;;; +0DAA;SINHALA LETTER MAHAAPRAANA DDAYANNA;Lo;0;L;;;;;N;;;;; +0DAB;SINHALA LETTER MUURDHAJA NAYANNA;Lo;0;L;;;;;N;;;;; +0DAC;SINHALA LETTER SANYAKA DDAYANNA;Lo;0;L;;;;;N;;;;; +0DAD;SINHALA LETTER ALPAPRAANA TAYANNA;Lo;0;L;;;;;N;;;;; +0DAE;SINHALA LETTER MAHAAPRAANA TAYANNA;Lo;0;L;;;;;N;;;;; +0DAF;SINHALA LETTER ALPAPRAANA DAYANNA;Lo;0;L;;;;;N;;;;; +0DB0;SINHALA LETTER MAHAAPRAANA DAYANNA;Lo;0;L;;;;;N;;;;; +0DB1;SINHALA LETTER DANTAJA NAYANNA;Lo;0;L;;;;;N;;;;; +0DB3;SINHALA LETTER SANYAKA DAYANNA;Lo;0;L;;;;;N;;;;; +0DB4;SINHALA LETTER ALPAPRAANA PAYANNA;Lo;0;L;;;;;N;;;;; +0DB5;SINHALA LETTER MAHAAPRAANA PAYANNA;Lo;0;L;;;;;N;;;;; +0DB6;SINHALA LETTER ALPAPRAANA BAYANNA;Lo;0;L;;;;;N;;;;; +0DB7;SINHALA LETTER MAHAAPRAANA BAYANNA;Lo;0;L;;;;;N;;;;; +0DB8;SINHALA LETTER MAYANNA;Lo;0;L;;;;;N;;;;; +0DB9;SINHALA LETTER AMBA BAYANNA;Lo;0;L;;;;;N;;;;; +0DBA;SINHALA LETTER YAYANNA;Lo;0;L;;;;;N;;;;; +0DBB;SINHALA LETTER RAYANNA;Lo;0;L;;;;;N;;;;; +0DBD;SINHALA LETTER DANTAJA LAYANNA;Lo;0;L;;;;;N;;;;; +0DC0;SINHALA LETTER VAYANNA;Lo;0;L;;;;;N;;;;; +0DC1;SINHALA LETTER TAALUJA SAYANNA;Lo;0;L;;;;;N;;;;; +0DC2;SINHALA LETTER MUURDHAJA SAYANNA;Lo;0;L;;;;;N;;;;; +0DC3;SINHALA LETTER DANTAJA SAYANNA;Lo;0;L;;;;;N;;;;; +0DC4;SINHALA LETTER HAYANNA;Lo;0;L;;;;;N;;;;; +0DC5;SINHALA LETTER MUURDHAJA LAYANNA;Lo;0;L;;;;;N;;;;; +0DC6;SINHALA LETTER FAYANNA;Lo;0;L;;;;;N;;;;; +0DCA;SINHALA SIGN AL-LAKUNA;Mn;9;NSM;;;;;N;;;;; +0DCF;SINHALA VOWEL SIGN AELA-PILLA;Mc;0;L;;;;;N;;;;; +0DD0;SINHALA VOWEL SIGN KETTI AEDA-PILLA;Mc;0;L;;;;;N;;;;; +0DD1;SINHALA VOWEL SIGN DIGA AEDA-PILLA;Mc;0;L;;;;;N;;;;; +0DD2;SINHALA VOWEL SIGN KETTI IS-PILLA;Mn;0;NSM;;;;;N;;;;; +0DD3;SINHALA VOWEL SIGN DIGA IS-PILLA;Mn;0;NSM;;;;;N;;;;; +0DD4;SINHALA VOWEL SIGN KETTI PAA-PILLA;Mn;0;NSM;;;;;N;;;;; +0DD6;SINHALA VOWEL SIGN DIGA PAA-PILLA;Mn;0;NSM;;;;;N;;;;; +0DD8;SINHALA VOWEL SIGN GAETTA-PILLA;Mc;0;L;;;;;N;;;;; +0DD9;SINHALA VOWEL SIGN KOMBUVA;Mc;0;L;;;;;N;;;;; +0DDA;SINHALA VOWEL SIGN DIGA KOMBUVA;Mc;0;L;0DD9 0DCA;;;;N;;;;; +0DDB;SINHALA VOWEL SIGN KOMBU DEKA;Mc;0;L;;;;;N;;;;; +0DDC;SINHALA VOWEL SIGN KOMBUVA HAA AELA-PILLA;Mc;0;L;0DD9 0DCF;;;;N;;;;; +0DDD;SINHALA VOWEL SIGN KOMBUVA HAA DIGA AELA-PILLA;Mc;0;L;0DDC 0DCA;;;;N;;;;; +0DDE;SINHALA VOWEL SIGN KOMBUVA HAA GAYANUKITTA;Mc;0;L;0DD9 0DDF;;;;N;;;;; +0DDF;SINHALA VOWEL SIGN GAYANUKITTA;Mc;0;L;;;;;N;;;;; +0DE6;SINHALA LITH DIGIT ZERO;Nd;0;L;;0;0;0;N;;;;; +0DE7;SINHALA LITH DIGIT ONE;Nd;0;L;;1;1;1;N;;;;; +0DE8;SINHALA LITH DIGIT TWO;Nd;0;L;;2;2;2;N;;;;; +0DE9;SINHALA LITH DIGIT THREE;Nd;0;L;;3;3;3;N;;;;; +0DEA;SINHALA LITH DIGIT FOUR;Nd;0;L;;4;4;4;N;;;;; +0DEB;SINHALA LITH DIGIT FIVE;Nd;0;L;;5;5;5;N;;;;; +0DEC;SINHALA LITH DIGIT SIX;Nd;0;L;;6;6;6;N;;;;; +0DED;SINHALA LITH DIGIT SEVEN;Nd;0;L;;7;7;7;N;;;;; +0DEE;SINHALA LITH DIGIT EIGHT;Nd;0;L;;8;8;8;N;;;;; +0DEF;SINHALA LITH DIGIT NINE;Nd;0;L;;9;9;9;N;;;;; +0DF2;SINHALA VOWEL SIGN DIGA GAETTA-PILLA;Mc;0;L;;;;;N;;;;; +0DF3;SINHALA VOWEL SIGN DIGA GAYANUKITTA;Mc;0;L;;;;;N;;;;; +0DF4;SINHALA PUNCTUATION KUNDDALIYA;Po;0;L;;;;;N;;;;; +0E01;THAI CHARACTER KO KAI;Lo;0;L;;;;;N;THAI LETTER KO KAI;;;; +0E02;THAI CHARACTER KHO KHAI;Lo;0;L;;;;;N;THAI LETTER KHO KHAI;;;; +0E03;THAI CHARACTER KHO KHUAT;Lo;0;L;;;;;N;THAI LETTER KHO KHUAT;;;; +0E04;THAI CHARACTER KHO KHWAI;Lo;0;L;;;;;N;THAI LETTER KHO KHWAI;;;; +0E05;THAI CHARACTER KHO KHON;Lo;0;L;;;;;N;THAI LETTER KHO KHON;;;; +0E06;THAI CHARACTER KHO RAKHANG;Lo;0;L;;;;;N;THAI LETTER KHO RAKHANG;;;; +0E07;THAI CHARACTER NGO NGU;Lo;0;L;;;;;N;THAI LETTER NGO NGU;;;; +0E08;THAI CHARACTER CHO CHAN;Lo;0;L;;;;;N;THAI LETTER CHO CHAN;;;; +0E09;THAI CHARACTER CHO CHING;Lo;0;L;;;;;N;THAI LETTER CHO CHING;;;; +0E0A;THAI CHARACTER CHO CHANG;Lo;0;L;;;;;N;THAI LETTER CHO CHANG;;;; +0E0B;THAI CHARACTER SO SO;Lo;0;L;;;;;N;THAI LETTER SO SO;;;; +0E0C;THAI CHARACTER CHO CHOE;Lo;0;L;;;;;N;THAI LETTER CHO CHOE;;;; +0E0D;THAI CHARACTER YO YING;Lo;0;L;;;;;N;THAI LETTER YO YING;;;; +0E0E;THAI CHARACTER DO CHADA;Lo;0;L;;;;;N;THAI LETTER DO CHADA;;;; +0E0F;THAI CHARACTER TO PATAK;Lo;0;L;;;;;N;THAI LETTER TO PATAK;;;; +0E10;THAI CHARACTER THO THAN;Lo;0;L;;;;;N;THAI LETTER THO THAN;;;; +0E11;THAI CHARACTER THO NANGMONTHO;Lo;0;L;;;;;N;THAI LETTER THO NANGMONTHO;;;; +0E12;THAI CHARACTER THO PHUTHAO;Lo;0;L;;;;;N;THAI LETTER THO PHUTHAO;;;; +0E13;THAI CHARACTER NO NEN;Lo;0;L;;;;;N;THAI LETTER NO NEN;;;; +0E14;THAI CHARACTER DO DEK;Lo;0;L;;;;;N;THAI LETTER DO DEK;;;; +0E15;THAI CHARACTER TO TAO;Lo;0;L;;;;;N;THAI LETTER TO TAO;;;; +0E16;THAI CHARACTER THO THUNG;Lo;0;L;;;;;N;THAI LETTER THO THUNG;;;; +0E17;THAI CHARACTER THO THAHAN;Lo;0;L;;;;;N;THAI LETTER THO THAHAN;;;; +0E18;THAI CHARACTER THO THONG;Lo;0;L;;;;;N;THAI LETTER THO THONG;;;; +0E19;THAI CHARACTER NO NU;Lo;0;L;;;;;N;THAI LETTER NO NU;;;; +0E1A;THAI CHARACTER BO BAIMAI;Lo;0;L;;;;;N;THAI LETTER BO BAIMAI;;;; +0E1B;THAI CHARACTER PO PLA;Lo;0;L;;;;;N;THAI LETTER PO PLA;;;; +0E1C;THAI CHARACTER PHO PHUNG;Lo;0;L;;;;;N;THAI LETTER PHO PHUNG;;;; +0E1D;THAI CHARACTER FO FA;Lo;0;L;;;;;N;THAI LETTER FO FA;;;; +0E1E;THAI CHARACTER PHO PHAN;Lo;0;L;;;;;N;THAI LETTER PHO PHAN;;;; +0E1F;THAI CHARACTER FO FAN;Lo;0;L;;;;;N;THAI LETTER FO FAN;;;; +0E20;THAI CHARACTER PHO SAMPHAO;Lo;0;L;;;;;N;THAI LETTER PHO SAMPHAO;;;; +0E21;THAI CHARACTER MO MA;Lo;0;L;;;;;N;THAI LETTER MO MA;;;; +0E22;THAI CHARACTER YO YAK;Lo;0;L;;;;;N;THAI LETTER YO YAK;;;; +0E23;THAI CHARACTER RO RUA;Lo;0;L;;;;;N;THAI LETTER RO RUA;;;; +0E24;THAI CHARACTER RU;Lo;0;L;;;;;N;THAI LETTER RU;;;; +0E25;THAI CHARACTER LO LING;Lo;0;L;;;;;N;THAI LETTER LO LING;;;; +0E26;THAI CHARACTER LU;Lo;0;L;;;;;N;THAI LETTER LU;;;; +0E27;THAI CHARACTER WO WAEN;Lo;0;L;;;;;N;THAI LETTER WO WAEN;;;; +0E28;THAI CHARACTER SO SALA;Lo;0;L;;;;;N;THAI LETTER SO SALA;;;; +0E29;THAI CHARACTER SO RUSI;Lo;0;L;;;;;N;THAI LETTER SO RUSI;;;; +0E2A;THAI CHARACTER SO SUA;Lo;0;L;;;;;N;THAI LETTER SO SUA;;;; +0E2B;THAI CHARACTER HO HIP;Lo;0;L;;;;;N;THAI LETTER HO HIP;;;; +0E2C;THAI CHARACTER LO CHULA;Lo;0;L;;;;;N;THAI LETTER LO CHULA;;;; +0E2D;THAI CHARACTER O ANG;Lo;0;L;;;;;N;THAI LETTER O ANG;;;; +0E2E;THAI CHARACTER HO NOKHUK;Lo;0;L;;;;;N;THAI LETTER HO NOK HUK;;;; +0E2F;THAI CHARACTER PAIYANNOI;Lo;0;L;;;;;N;THAI PAI YAN NOI;;;; +0E30;THAI CHARACTER SARA A;Lo;0;L;;;;;N;THAI VOWEL SIGN SARA A;;;; +0E31;THAI CHARACTER MAI HAN-AKAT;Mn;0;NSM;;;;;N;THAI VOWEL SIGN MAI HAN-AKAT;;;; +0E32;THAI CHARACTER SARA AA;Lo;0;L;;;;;N;THAI VOWEL SIGN SARA AA;;;; +0E33;THAI CHARACTER SARA AM;Lo;0;L; 0E4D 0E32;;;;N;THAI VOWEL SIGN SARA AM;;;; +0E34;THAI CHARACTER SARA I;Mn;0;NSM;;;;;N;THAI VOWEL SIGN SARA I;;;; +0E35;THAI CHARACTER SARA II;Mn;0;NSM;;;;;N;THAI VOWEL SIGN SARA II;;;; +0E36;THAI CHARACTER SARA UE;Mn;0;NSM;;;;;N;THAI VOWEL SIGN SARA UE;;;; +0E37;THAI CHARACTER SARA UEE;Mn;0;NSM;;;;;N;THAI VOWEL SIGN SARA UEE;;;; +0E38;THAI CHARACTER SARA U;Mn;103;NSM;;;;;N;THAI VOWEL SIGN SARA U;;;; +0E39;THAI CHARACTER SARA UU;Mn;103;NSM;;;;;N;THAI VOWEL SIGN SARA UU;;;; +0E3A;THAI CHARACTER PHINTHU;Mn;9;NSM;;;;;N;THAI VOWEL SIGN PHINTHU;;;; +0E3F;THAI CURRENCY SYMBOL BAHT;Sc;0;ET;;;;;N;THAI BAHT SIGN;;;; +0E40;THAI CHARACTER SARA E;Lo;0;L;;;;;N;THAI VOWEL SIGN SARA E;;;; +0E41;THAI CHARACTER SARA AE;Lo;0;L;;;;;N;THAI VOWEL SIGN SARA AE;;;; +0E42;THAI CHARACTER SARA O;Lo;0;L;;;;;N;THAI VOWEL SIGN SARA O;;;; +0E43;THAI CHARACTER SARA AI MAIMUAN;Lo;0;L;;;;;N;THAI VOWEL SIGN SARA MAI MUAN;;;; +0E44;THAI CHARACTER SARA AI MAIMALAI;Lo;0;L;;;;;N;THAI VOWEL SIGN SARA MAI MALAI;;;; +0E45;THAI CHARACTER LAKKHANGYAO;Lo;0;L;;;;;N;THAI LAK KHANG YAO;;;; +0E46;THAI CHARACTER MAIYAMOK;Lm;0;L;;;;;N;THAI MAI YAMOK;;;; +0E47;THAI CHARACTER MAITAIKHU;Mn;0;NSM;;;;;N;THAI VOWEL SIGN MAI TAI KHU;;;; +0E48;THAI CHARACTER MAI EK;Mn;107;NSM;;;;;N;THAI TONE MAI EK;;;; +0E49;THAI CHARACTER MAI THO;Mn;107;NSM;;;;;N;THAI TONE MAI THO;;;; +0E4A;THAI CHARACTER MAI TRI;Mn;107;NSM;;;;;N;THAI TONE MAI TRI;;;; +0E4B;THAI CHARACTER MAI CHATTAWA;Mn;107;NSM;;;;;N;THAI TONE MAI CHATTAWA;;;; +0E4C;THAI CHARACTER THANTHAKHAT;Mn;0;NSM;;;;;N;THAI THANTHAKHAT;;;; +0E4D;THAI CHARACTER NIKHAHIT;Mn;0;NSM;;;;;N;THAI NIKKHAHIT;;;; +0E4E;THAI CHARACTER YAMAKKAN;Mn;0;NSM;;;;;N;THAI YAMAKKAN;;;; +0E4F;THAI CHARACTER FONGMAN;Po;0;L;;;;;N;THAI FONGMAN;;;; +0E50;THAI DIGIT ZERO;Nd;0;L;;0;0;0;N;;;;; +0E51;THAI DIGIT ONE;Nd;0;L;;1;1;1;N;;;;; +0E52;THAI DIGIT TWO;Nd;0;L;;2;2;2;N;;;;; +0E53;THAI DIGIT THREE;Nd;0;L;;3;3;3;N;;;;; +0E54;THAI DIGIT FOUR;Nd;0;L;;4;4;4;N;;;;; +0E55;THAI DIGIT FIVE;Nd;0;L;;5;5;5;N;;;;; +0E56;THAI DIGIT SIX;Nd;0;L;;6;6;6;N;;;;; +0E57;THAI DIGIT SEVEN;Nd;0;L;;7;7;7;N;;;;; +0E58;THAI DIGIT EIGHT;Nd;0;L;;8;8;8;N;;;;; +0E59;THAI DIGIT NINE;Nd;0;L;;9;9;9;N;;;;; +0E5A;THAI CHARACTER ANGKHANKHU;Po;0;L;;;;;N;THAI ANGKHANKHU;;;; +0E5B;THAI CHARACTER KHOMUT;Po;0;L;;;;;N;THAI KHOMUT;;;; +0E81;LAO LETTER KO;Lo;0;L;;;;;N;;;;; +0E82;LAO LETTER KHO SUNG;Lo;0;L;;;;;N;;;;; +0E84;LAO LETTER KHO TAM;Lo;0;L;;;;;N;;;;; +0E86;LAO LETTER PALI GHA;Lo;0;L;;;;;N;;;;; +0E87;LAO LETTER NGO;Lo;0;L;;;;;N;;;;; +0E88;LAO LETTER CO;Lo;0;L;;;;;N;;;;; +0E89;LAO LETTER PALI CHA;Lo;0;L;;;;;N;;;;; +0E8A;LAO LETTER SO TAM;Lo;0;L;;;;;N;;;;; +0E8C;LAO LETTER PALI JHA;Lo;0;L;;;;;N;;;;; +0E8D;LAO LETTER NYO;Lo;0;L;;;;;N;;;;; +0E8E;LAO LETTER PALI NYA;Lo;0;L;;;;;N;;;;; +0E8F;LAO LETTER PALI TTA;Lo;0;L;;;;;N;;;;; +0E90;LAO LETTER PALI TTHA;Lo;0;L;;;;;N;;;;; +0E91;LAO LETTER PALI DDA;Lo;0;L;;;;;N;;;;; +0E92;LAO LETTER PALI DDHA;Lo;0;L;;;;;N;;;;; +0E93;LAO LETTER PALI NNA;Lo;0;L;;;;;N;;;;; +0E94;LAO LETTER DO;Lo;0;L;;;;;N;;;;; +0E95;LAO LETTER TO;Lo;0;L;;;;;N;;;;; +0E96;LAO LETTER THO SUNG;Lo;0;L;;;;;N;;;;; +0E97;LAO LETTER THO TAM;Lo;0;L;;;;;N;;;;; +0E98;LAO LETTER PALI DHA;Lo;0;L;;;;;N;;;;; +0E99;LAO LETTER NO;Lo;0;L;;;;;N;;;;; +0E9A;LAO LETTER BO;Lo;0;L;;;;;N;;;;; +0E9B;LAO LETTER PO;Lo;0;L;;;;;N;;;;; +0E9C;LAO LETTER PHO SUNG;Lo;0;L;;;;;N;;;;; +0E9D;LAO LETTER FO TAM;Lo;0;L;;;;;N;;;;; +0E9E;LAO LETTER PHO TAM;Lo;0;L;;;;;N;;;;; +0E9F;LAO LETTER FO SUNG;Lo;0;L;;;;;N;;;;; +0EA0;LAO LETTER PALI BHA;Lo;0;L;;;;;N;;;;; +0EA1;LAO LETTER MO;Lo;0;L;;;;;N;;;;; +0EA2;LAO LETTER YO;Lo;0;L;;;;;N;;;;; +0EA3;LAO LETTER LO LING;Lo;0;L;;;;;N;;;;; +0EA5;LAO LETTER LO LOOT;Lo;0;L;;;;;N;;;;; +0EA7;LAO LETTER WO;Lo;0;L;;;;;N;;;;; +0EA8;LAO LETTER SANSKRIT SHA;Lo;0;L;;;;;N;;;;; +0EA9;LAO LETTER SANSKRIT SSA;Lo;0;L;;;;;N;;;;; +0EAA;LAO LETTER SO SUNG;Lo;0;L;;;;;N;;;;; +0EAB;LAO LETTER HO SUNG;Lo;0;L;;;;;N;;;;; +0EAC;LAO LETTER PALI LLA;Lo;0;L;;;;;N;;;;; +0EAD;LAO LETTER O;Lo;0;L;;;;;N;;;;; +0EAE;LAO LETTER HO TAM;Lo;0;L;;;;;N;;;;; +0EAF;LAO ELLIPSIS;Lo;0;L;;;;;N;;;;; +0EB0;LAO VOWEL SIGN A;Lo;0;L;;;;;N;;;;; +0EB1;LAO VOWEL SIGN MAI KAN;Mn;0;NSM;;;;;N;;;;; +0EB2;LAO VOWEL SIGN AA;Lo;0;L;;;;;N;;;;; +0EB3;LAO VOWEL SIGN AM;Lo;0;L; 0ECD 0EB2;;;;N;;;;; +0EB4;LAO VOWEL SIGN I;Mn;0;NSM;;;;;N;;;;; +0EB5;LAO VOWEL SIGN II;Mn;0;NSM;;;;;N;;;;; +0EB6;LAO VOWEL SIGN Y;Mn;0;NSM;;;;;N;;;;; +0EB7;LAO VOWEL SIGN YY;Mn;0;NSM;;;;;N;;;;; +0EB8;LAO VOWEL SIGN U;Mn;118;NSM;;;;;N;;;;; +0EB9;LAO VOWEL SIGN UU;Mn;118;NSM;;;;;N;;;;; +0EBA;LAO SIGN PALI VIRAMA;Mn;9;NSM;;;;;N;;;;; +0EBB;LAO VOWEL SIGN MAI KON;Mn;0;NSM;;;;;N;;;;; +0EBC;LAO SEMIVOWEL SIGN LO;Mn;0;NSM;;;;;N;;;;; +0EBD;LAO SEMIVOWEL SIGN NYO;Lo;0;L;;;;;N;;;;; +0EC0;LAO VOWEL SIGN E;Lo;0;L;;;;;N;;;;; +0EC1;LAO VOWEL SIGN EI;Lo;0;L;;;;;N;;;;; +0EC2;LAO VOWEL SIGN O;Lo;0;L;;;;;N;;;;; +0EC3;LAO VOWEL SIGN AY;Lo;0;L;;;;;N;;;;; +0EC4;LAO VOWEL SIGN AI;Lo;0;L;;;;;N;;;;; +0EC6;LAO KO LA;Lm;0;L;;;;;N;;;;; +0EC8;LAO TONE MAI EK;Mn;122;NSM;;;;;N;;;;; +0EC9;LAO TONE MAI THO;Mn;122;NSM;;;;;N;;;;; +0ECA;LAO TONE MAI TI;Mn;122;NSM;;;;;N;;;;; +0ECB;LAO TONE MAI CATAWA;Mn;122;NSM;;;;;N;;;;; +0ECC;LAO CANCELLATION MARK;Mn;0;NSM;;;;;N;;;;; +0ECD;LAO NIGGAHITA;Mn;0;NSM;;;;;N;;;;; +0ED0;LAO DIGIT ZERO;Nd;0;L;;0;0;0;N;;;;; +0ED1;LAO DIGIT ONE;Nd;0;L;;1;1;1;N;;;;; +0ED2;LAO DIGIT TWO;Nd;0;L;;2;2;2;N;;;;; +0ED3;LAO DIGIT THREE;Nd;0;L;;3;3;3;N;;;;; +0ED4;LAO DIGIT FOUR;Nd;0;L;;4;4;4;N;;;;; +0ED5;LAO DIGIT FIVE;Nd;0;L;;5;5;5;N;;;;; +0ED6;LAO DIGIT SIX;Nd;0;L;;6;6;6;N;;;;; +0ED7;LAO DIGIT SEVEN;Nd;0;L;;7;7;7;N;;;;; +0ED8;LAO DIGIT EIGHT;Nd;0;L;;8;8;8;N;;;;; +0ED9;LAO DIGIT NINE;Nd;0;L;;9;9;9;N;;;;; +0EDC;LAO HO NO;Lo;0;L; 0EAB 0E99;;;;N;;;;; +0EDD;LAO HO MO;Lo;0;L; 0EAB 0EA1;;;;N;;;;; +0EDE;LAO LETTER KHMU GO;Lo;0;L;;;;;N;;;;; +0EDF;LAO LETTER KHMU NYO;Lo;0;L;;;;;N;;;;; +0F00;TIBETAN SYLLABLE OM;Lo;0;L;;;;;N;;;;; +0F01;TIBETAN MARK GTER YIG MGO TRUNCATED A;So;0;L;;;;;N;;;;; +0F02;TIBETAN MARK GTER YIG MGO -UM RNAM BCAD MA;So;0;L;;;;;N;;;;; +0F03;TIBETAN MARK GTER YIG MGO -UM GTER TSHEG MA;So;0;L;;;;;N;;;;; +0F04;TIBETAN MARK INITIAL YIG MGO MDUN MA;Po;0;L;;;;;N;TIBETAN SINGLE ORNAMENT;;;; +0F05;TIBETAN MARK CLOSING YIG MGO SGAB MA;Po;0;L;;;;;N;;;;; +0F06;TIBETAN MARK CARET YIG MGO PHUR SHAD MA;Po;0;L;;;;;N;;;;; +0F07;TIBETAN MARK YIG MGO TSHEG SHAD MA;Po;0;L;;;;;N;;;;; +0F08;TIBETAN MARK SBRUL SHAD;Po;0;L;;;;;N;TIBETAN RGYANSHAD;;;; +0F09;TIBETAN MARK BSKUR YIG MGO;Po;0;L;;;;;N;;;;; +0F0A;TIBETAN MARK BKA- SHOG YIG MGO;Po;0;L;;;;;N;;;;; +0F0B;TIBETAN MARK INTERSYLLABIC TSHEG;Po;0;L;;;;;N;TIBETAN TSEG;;;; +0F0C;TIBETAN MARK DELIMITER TSHEG BSTAR;Po;0;L; 0F0B;;;;N;;;;; +0F0D;TIBETAN MARK SHAD;Po;0;L;;;;;N;TIBETAN SHAD;;;; +0F0E;TIBETAN MARK NYIS SHAD;Po;0;L;;;;;N;TIBETAN DOUBLE SHAD;;;; +0F0F;TIBETAN MARK TSHEG SHAD;Po;0;L;;;;;N;;;;; +0F10;TIBETAN MARK NYIS TSHEG SHAD;Po;0;L;;;;;N;;;;; +0F11;TIBETAN MARK RIN CHEN SPUNGS SHAD;Po;0;L;;;;;N;TIBETAN RINCHANPHUNGSHAD;;;; +0F12;TIBETAN MARK RGYA GRAM SHAD;Po;0;L;;;;;N;;;;; +0F13;TIBETAN MARK CARET -DZUD RTAGS ME LONG CAN;So;0;L;;;;;N;;;;; +0F14;TIBETAN MARK GTER TSHEG;Po;0;L;;;;;N;TIBETAN COMMA;;;; +0F15;TIBETAN LOGOTYPE SIGN CHAD RTAGS;So;0;L;;;;;N;;;;; +0F16;TIBETAN LOGOTYPE SIGN LHAG RTAGS;So;0;L;;;;;N;;;;; +0F17;TIBETAN ASTROLOGICAL SIGN SGRA GCAN -CHAR RTAGS;So;0;L;;;;;N;;;;; +0F18;TIBETAN ASTROLOGICAL SIGN -KHYUD PA;Mn;220;NSM;;;;;N;;;;; +0F19;TIBETAN ASTROLOGICAL SIGN SDONG TSHUGS;Mn;220;NSM;;;;;N;;;;; +0F1A;TIBETAN SIGN RDEL DKAR GCIG;So;0;L;;;;;N;;;;; +0F1B;TIBETAN SIGN RDEL DKAR GNYIS;So;0;L;;;;;N;;;;; +0F1C;TIBETAN SIGN RDEL DKAR GSUM;So;0;L;;;;;N;;;;; +0F1D;TIBETAN SIGN RDEL NAG GCIG;So;0;L;;;;;N;;;;; +0F1E;TIBETAN SIGN RDEL NAG GNYIS;So;0;L;;;;;N;;;;; +0F1F;TIBETAN SIGN RDEL DKAR RDEL NAG;So;0;L;;;;;N;;;;; +0F20;TIBETAN DIGIT ZERO;Nd;0;L;;0;0;0;N;;;;; +0F21;TIBETAN DIGIT ONE;Nd;0;L;;1;1;1;N;;;;; +0F22;TIBETAN DIGIT TWO;Nd;0;L;;2;2;2;N;;;;; +0F23;TIBETAN DIGIT THREE;Nd;0;L;;3;3;3;N;;;;; +0F24;TIBETAN DIGIT FOUR;Nd;0;L;;4;4;4;N;;;;; +0F25;TIBETAN DIGIT FIVE;Nd;0;L;;5;5;5;N;;;;; +0F26;TIBETAN DIGIT SIX;Nd;0;L;;6;6;6;N;;;;; +0F27;TIBETAN DIGIT SEVEN;Nd;0;L;;7;7;7;N;;;;; +0F28;TIBETAN DIGIT EIGHT;Nd;0;L;;8;8;8;N;;;;; +0F29;TIBETAN DIGIT NINE;Nd;0;L;;9;9;9;N;;;;; +0F2A;TIBETAN DIGIT HALF ONE;No;0;L;;;;1/2;N;;;;; +0F2B;TIBETAN DIGIT HALF TWO;No;0;L;;;;3/2;N;;;;; +0F2C;TIBETAN DIGIT HALF THREE;No;0;L;;;;5/2;N;;;;; +0F2D;TIBETAN DIGIT HALF FOUR;No;0;L;;;;7/2;N;;;;; +0F2E;TIBETAN DIGIT HALF FIVE;No;0;L;;;;9/2;N;;;;; +0F2F;TIBETAN DIGIT HALF SIX;No;0;L;;;;11/2;N;;;;; +0F30;TIBETAN DIGIT HALF SEVEN;No;0;L;;;;13/2;N;;;;; +0F31;TIBETAN DIGIT HALF EIGHT;No;0;L;;;;15/2;N;;;;; +0F32;TIBETAN DIGIT HALF NINE;No;0;L;;;;17/2;N;;;;; +0F33;TIBETAN DIGIT HALF ZERO;No;0;L;;;;-1/2;N;;;;; +0F34;TIBETAN MARK BSDUS RTAGS;So;0;L;;;;;N;;;;; +0F35;TIBETAN MARK NGAS BZUNG NYI ZLA;Mn;220;NSM;;;;;N;TIBETAN HONORIFIC UNDER RING;;;; +0F36;TIBETAN MARK CARET -DZUD RTAGS BZHI MIG CAN;So;0;L;;;;;N;;;;; +0F37;TIBETAN MARK NGAS BZUNG SGOR RTAGS;Mn;220;NSM;;;;;N;TIBETAN UNDER RING;;;; +0F38;TIBETAN MARK CHE MGO;So;0;L;;;;;N;;;;; +0F39;TIBETAN MARK TSA -PHRU;Mn;216;NSM;;;;;N;TIBETAN LENITION MARK;;;; +0F3A;TIBETAN MARK GUG RTAGS GYON;Ps;0;ON;;;;;Y;;;;; +0F3B;TIBETAN MARK GUG RTAGS GYAS;Pe;0;ON;;;;;Y;;;;; +0F3C;TIBETAN MARK ANG KHANG GYON;Ps;0;ON;;;;;Y;TIBETAN LEFT BRACE;;;; +0F3D;TIBETAN MARK ANG KHANG GYAS;Pe;0;ON;;;;;Y;TIBETAN RIGHT BRACE;;;; +0F3E;TIBETAN SIGN YAR TSHES;Mc;0;L;;;;;N;;;;; +0F3F;TIBETAN SIGN MAR TSHES;Mc;0;L;;;;;N;;;;; +0F40;TIBETAN LETTER KA;Lo;0;L;;;;;N;;;;; +0F41;TIBETAN LETTER KHA;Lo;0;L;;;;;N;;;;; +0F42;TIBETAN LETTER GA;Lo;0;L;;;;;N;;;;; +0F43;TIBETAN LETTER GHA;Lo;0;L;0F42 0FB7;;;;N;;;;; +0F44;TIBETAN LETTER NGA;Lo;0;L;;;;;N;;;;; +0F45;TIBETAN LETTER CA;Lo;0;L;;;;;N;;;;; +0F46;TIBETAN LETTER CHA;Lo;0;L;;;;;N;;;;; +0F47;TIBETAN LETTER JA;Lo;0;L;;;;;N;;;;; +0F49;TIBETAN LETTER NYA;Lo;0;L;;;;;N;;;;; +0F4A;TIBETAN LETTER TTA;Lo;0;L;;;;;N;TIBETAN LETTER REVERSED TA;;;; +0F4B;TIBETAN LETTER TTHA;Lo;0;L;;;;;N;TIBETAN LETTER REVERSED THA;;;; +0F4C;TIBETAN LETTER DDA;Lo;0;L;;;;;N;TIBETAN LETTER REVERSED DA;;;; +0F4D;TIBETAN LETTER DDHA;Lo;0;L;0F4C 0FB7;;;;N;;;;; +0F4E;TIBETAN LETTER NNA;Lo;0;L;;;;;N;TIBETAN LETTER REVERSED NA;;;; +0F4F;TIBETAN LETTER TA;Lo;0;L;;;;;N;;;;; +0F50;TIBETAN LETTER THA;Lo;0;L;;;;;N;;;;; +0F51;TIBETAN LETTER DA;Lo;0;L;;;;;N;;;;; +0F52;TIBETAN LETTER DHA;Lo;0;L;0F51 0FB7;;;;N;;;;; +0F53;TIBETAN LETTER NA;Lo;0;L;;;;;N;;;;; +0F54;TIBETAN LETTER PA;Lo;0;L;;;;;N;;;;; +0F55;TIBETAN LETTER PHA;Lo;0;L;;;;;N;;;;; +0F56;TIBETAN LETTER BA;Lo;0;L;;;;;N;;;;; +0F57;TIBETAN LETTER BHA;Lo;0;L;0F56 0FB7;;;;N;;;;; +0F58;TIBETAN LETTER MA;Lo;0;L;;;;;N;;;;; +0F59;TIBETAN LETTER TSA;Lo;0;L;;;;;N;;;;; +0F5A;TIBETAN LETTER TSHA;Lo;0;L;;;;;N;;;;; +0F5B;TIBETAN LETTER DZA;Lo;0;L;;;;;N;;;;; +0F5C;TIBETAN LETTER DZHA;Lo;0;L;0F5B 0FB7;;;;N;;;;; +0F5D;TIBETAN LETTER WA;Lo;0;L;;;;;N;;;;; +0F5E;TIBETAN LETTER ZHA;Lo;0;L;;;;;N;;;;; +0F5F;TIBETAN LETTER ZA;Lo;0;L;;;;;N;;;;; +0F60;TIBETAN LETTER -A;Lo;0;L;;;;;N;TIBETAN LETTER AA;;;; +0F61;TIBETAN LETTER YA;Lo;0;L;;;;;N;;;;; +0F62;TIBETAN LETTER RA;Lo;0;L;;;;;N;;;;; +0F63;TIBETAN LETTER LA;Lo;0;L;;;;;N;;;;; +0F64;TIBETAN LETTER SHA;Lo;0;L;;;;;N;;;;; +0F65;TIBETAN LETTER SSA;Lo;0;L;;;;;N;TIBETAN LETTER REVERSED SHA;;;; +0F66;TIBETAN LETTER SA;Lo;0;L;;;;;N;;;;; +0F67;TIBETAN LETTER HA;Lo;0;L;;;;;N;;;;; +0F68;TIBETAN LETTER A;Lo;0;L;;;;;N;;;;; +0F69;TIBETAN LETTER KSSA;Lo;0;L;0F40 0FB5;;;;N;;;;; +0F6A;TIBETAN LETTER FIXED-FORM RA;Lo;0;L;;;;;N;;;;; +0F6B;TIBETAN LETTER KKA;Lo;0;L;;;;;N;;;;; +0F6C;TIBETAN LETTER RRA;Lo;0;L;;;;;N;;;;; +0F71;TIBETAN VOWEL SIGN AA;Mn;129;NSM;;;;;N;;;;; +0F72;TIBETAN VOWEL SIGN I;Mn;130;NSM;;;;;N;;;;; +0F73;TIBETAN VOWEL SIGN II;Mn;0;NSM;0F71 0F72;;;;N;;;;; +0F74;TIBETAN VOWEL SIGN U;Mn;132;NSM;;;;;N;;;;; +0F75;TIBETAN VOWEL SIGN UU;Mn;0;NSM;0F71 0F74;;;;N;;;;; +0F76;TIBETAN VOWEL SIGN VOCALIC R;Mn;0;NSM;0FB2 0F80;;;;N;;;;; +0F77;TIBETAN VOWEL SIGN VOCALIC RR;Mn;0;NSM; 0FB2 0F81;;;;N;;;;; +0F78;TIBETAN VOWEL SIGN VOCALIC L;Mn;0;NSM;0FB3 0F80;;;;N;;;;; +0F79;TIBETAN VOWEL SIGN VOCALIC LL;Mn;0;NSM; 0FB3 0F81;;;;N;;;;; +0F7A;TIBETAN VOWEL SIGN E;Mn;130;NSM;;;;;N;;;;; +0F7B;TIBETAN VOWEL SIGN EE;Mn;130;NSM;;;;;N;TIBETAN VOWEL SIGN AI;;;; +0F7C;TIBETAN VOWEL SIGN O;Mn;130;NSM;;;;;N;;;;; +0F7D;TIBETAN VOWEL SIGN OO;Mn;130;NSM;;;;;N;TIBETAN VOWEL SIGN AU;;;; +0F7E;TIBETAN SIGN RJES SU NGA RO;Mn;0;NSM;;;;;N;TIBETAN ANUSVARA;;;; +0F7F;TIBETAN SIGN RNAM BCAD;Mc;0;L;;;;;N;TIBETAN VISARGA;;;; +0F80;TIBETAN VOWEL SIGN REVERSED I;Mn;130;NSM;;;;;N;TIBETAN VOWEL SIGN SHORT I;;;; +0F81;TIBETAN VOWEL SIGN REVERSED II;Mn;0;NSM;0F71 0F80;;;;N;;;;; +0F82;TIBETAN SIGN NYI ZLA NAA DA;Mn;230;NSM;;;;;N;TIBETAN CANDRABINDU WITH ORNAMENT;;;; +0F83;TIBETAN SIGN SNA LDAN;Mn;230;NSM;;;;;N;TIBETAN CANDRABINDU;;;; +0F84;TIBETAN MARK HALANTA;Mn;9;NSM;;;;;N;TIBETAN VIRAMA;;;; +0F85;TIBETAN MARK PALUTA;Po;0;L;;;;;N;TIBETAN CHUCHENYIGE;;;; +0F86;TIBETAN SIGN LCI RTAGS;Mn;230;NSM;;;;;N;;;;; +0F87;TIBETAN SIGN YANG RTAGS;Mn;230;NSM;;;;;N;;;;; +0F88;TIBETAN SIGN LCE TSA CAN;Lo;0;L;;;;;N;;;;; +0F89;TIBETAN SIGN MCHU CAN;Lo;0;L;;;;;N;;;;; +0F8A;TIBETAN SIGN GRU CAN RGYINGS;Lo;0;L;;;;;N;;;;; +0F8B;TIBETAN SIGN GRU MED RGYINGS;Lo;0;L;;;;;N;;;;; +0F8C;TIBETAN SIGN INVERTED MCHU CAN;Lo;0;L;;;;;N;;;;; +0F8D;TIBETAN SUBJOINED SIGN LCE TSA CAN;Mn;0;NSM;;;;;N;;;;; +0F8E;TIBETAN SUBJOINED SIGN MCHU CAN;Mn;0;NSM;;;;;N;;;;; +0F8F;TIBETAN SUBJOINED SIGN INVERTED MCHU CAN;Mn;0;NSM;;;;;N;;;;; +0F90;TIBETAN SUBJOINED LETTER KA;Mn;0;NSM;;;;;N;;;;; +0F91;TIBETAN SUBJOINED LETTER KHA;Mn;0;NSM;;;;;N;;;;; +0F92;TIBETAN SUBJOINED LETTER GA;Mn;0;NSM;;;;;N;;;;; +0F93;TIBETAN SUBJOINED LETTER GHA;Mn;0;NSM;0F92 0FB7;;;;N;;;;; +0F94;TIBETAN SUBJOINED LETTER NGA;Mn;0;NSM;;;;;N;;;;; +0F95;TIBETAN SUBJOINED LETTER CA;Mn;0;NSM;;;;;N;;;;; +0F96;TIBETAN SUBJOINED LETTER CHA;Mn;0;NSM;;;;;N;;;;; +0F97;TIBETAN SUBJOINED LETTER JA;Mn;0;NSM;;;;;N;;;;; +0F99;TIBETAN SUBJOINED LETTER NYA;Mn;0;NSM;;;;;N;;;;; +0F9A;TIBETAN SUBJOINED LETTER TTA;Mn;0;NSM;;;;;N;;;;; +0F9B;TIBETAN SUBJOINED LETTER TTHA;Mn;0;NSM;;;;;N;;;;; +0F9C;TIBETAN SUBJOINED LETTER DDA;Mn;0;NSM;;;;;N;;;;; +0F9D;TIBETAN SUBJOINED LETTER DDHA;Mn;0;NSM;0F9C 0FB7;;;;N;;;;; +0F9E;TIBETAN SUBJOINED LETTER NNA;Mn;0;NSM;;;;;N;;;;; +0F9F;TIBETAN SUBJOINED LETTER TA;Mn;0;NSM;;;;;N;;;;; +0FA0;TIBETAN SUBJOINED LETTER THA;Mn;0;NSM;;;;;N;;;;; +0FA1;TIBETAN SUBJOINED LETTER DA;Mn;0;NSM;;;;;N;;;;; +0FA2;TIBETAN SUBJOINED LETTER DHA;Mn;0;NSM;0FA1 0FB7;;;;N;;;;; +0FA3;TIBETAN SUBJOINED LETTER NA;Mn;0;NSM;;;;;N;;;;; +0FA4;TIBETAN SUBJOINED LETTER PA;Mn;0;NSM;;;;;N;;;;; +0FA5;TIBETAN SUBJOINED LETTER PHA;Mn;0;NSM;;;;;N;;;;; +0FA6;TIBETAN SUBJOINED LETTER BA;Mn;0;NSM;;;;;N;;;;; +0FA7;TIBETAN SUBJOINED LETTER BHA;Mn;0;NSM;0FA6 0FB7;;;;N;;;;; +0FA8;TIBETAN SUBJOINED LETTER MA;Mn;0;NSM;;;;;N;;;;; +0FA9;TIBETAN SUBJOINED LETTER TSA;Mn;0;NSM;;;;;N;;;;; +0FAA;TIBETAN SUBJOINED LETTER TSHA;Mn;0;NSM;;;;;N;;;;; +0FAB;TIBETAN SUBJOINED LETTER DZA;Mn;0;NSM;;;;;N;;;;; +0FAC;TIBETAN SUBJOINED LETTER DZHA;Mn;0;NSM;0FAB 0FB7;;;;N;;;;; +0FAD;TIBETAN SUBJOINED LETTER WA;Mn;0;NSM;;;;;N;;;;; +0FAE;TIBETAN SUBJOINED LETTER ZHA;Mn;0;NSM;;;;;N;;;;; +0FAF;TIBETAN SUBJOINED LETTER ZA;Mn;0;NSM;;;;;N;;;;; +0FB0;TIBETAN SUBJOINED LETTER -A;Mn;0;NSM;;;;;N;;;;; +0FB1;TIBETAN SUBJOINED LETTER YA;Mn;0;NSM;;;;;N;;;;; +0FB2;TIBETAN SUBJOINED LETTER RA;Mn;0;NSM;;;;;N;;;;; +0FB3;TIBETAN SUBJOINED LETTER LA;Mn;0;NSM;;;;;N;;;;; +0FB4;TIBETAN SUBJOINED LETTER SHA;Mn;0;NSM;;;;;N;;;;; +0FB5;TIBETAN SUBJOINED LETTER SSA;Mn;0;NSM;;;;;N;;;;; +0FB6;TIBETAN SUBJOINED LETTER SA;Mn;0;NSM;;;;;N;;;;; +0FB7;TIBETAN SUBJOINED LETTER HA;Mn;0;NSM;;;;;N;;;;; +0FB8;TIBETAN SUBJOINED LETTER A;Mn;0;NSM;;;;;N;;;;; +0FB9;TIBETAN SUBJOINED LETTER KSSA;Mn;0;NSM;0F90 0FB5;;;;N;;;;; +0FBA;TIBETAN SUBJOINED LETTER FIXED-FORM WA;Mn;0;NSM;;;;;N;;;;; +0FBB;TIBETAN SUBJOINED LETTER FIXED-FORM YA;Mn;0;NSM;;;;;N;;;;; +0FBC;TIBETAN SUBJOINED LETTER FIXED-FORM RA;Mn;0;NSM;;;;;N;;;;; +0FBE;TIBETAN KU RU KHA;So;0;L;;;;;N;;;;; +0FBF;TIBETAN KU RU KHA BZHI MIG CAN;So;0;L;;;;;N;;;;; +0FC0;TIBETAN CANTILLATION SIGN HEAVY BEAT;So;0;L;;;;;N;;;;; +0FC1;TIBETAN CANTILLATION SIGN LIGHT BEAT;So;0;L;;;;;N;;;;; +0FC2;TIBETAN CANTILLATION SIGN CANG TE-U;So;0;L;;;;;N;;;;; +0FC3;TIBETAN CANTILLATION SIGN SBUB -CHAL;So;0;L;;;;;N;;;;; +0FC4;TIBETAN SYMBOL DRIL BU;So;0;L;;;;;N;;;;; +0FC5;TIBETAN SYMBOL RDO RJE;So;0;L;;;;;N;;;;; +0FC6;TIBETAN SYMBOL PADMA GDAN;Mn;220;NSM;;;;;N;;;;; +0FC7;TIBETAN SYMBOL RDO RJE RGYA GRAM;So;0;L;;;;;N;;;;; +0FC8;TIBETAN SYMBOL PHUR PA;So;0;L;;;;;N;;;;; +0FC9;TIBETAN SYMBOL NOR BU;So;0;L;;;;;N;;;;; +0FCA;TIBETAN SYMBOL NOR BU NYIS -KHYIL;So;0;L;;;;;N;;;;; +0FCB;TIBETAN SYMBOL NOR BU GSUM -KHYIL;So;0;L;;;;;N;;;;; +0FCC;TIBETAN SYMBOL NOR BU BZHI -KHYIL;So;0;L;;;;;N;;;;; +0FCE;TIBETAN SIGN RDEL NAG RDEL DKAR;So;0;L;;;;;N;;;;; +0FCF;TIBETAN SIGN RDEL NAG GSUM;So;0;L;;;;;N;;;;; +0FD0;TIBETAN MARK BSKA- SHOG GI MGO RGYAN;Po;0;L;;;;;N;;;;; +0FD1;TIBETAN MARK MNYAM YIG GI MGO RGYAN;Po;0;L;;;;;N;;;;; +0FD2;TIBETAN MARK NYIS TSHEG;Po;0;L;;;;;N;;;;; +0FD3;TIBETAN MARK INITIAL BRDA RNYING YIG MGO MDUN MA;Po;0;L;;;;;N;;;;; +0FD4;TIBETAN MARK CLOSING BRDA RNYING YIG MGO SGAB MA;Po;0;L;;;;;N;;;;; +0FD5;RIGHT-FACING SVASTI SIGN;So;0;L;;;;;N;;;;; +0FD6;LEFT-FACING SVASTI SIGN;So;0;L;;;;;N;;;;; +0FD7;RIGHT-FACING SVASTI SIGN WITH DOTS;So;0;L;;;;;N;;;;; +0FD8;LEFT-FACING SVASTI SIGN WITH DOTS;So;0;L;;;;;N;;;;; +0FD9;TIBETAN MARK LEADING MCHAN RTAGS;Po;0;L;;;;;N;;;;; +0FDA;TIBETAN MARK TRAILING MCHAN RTAGS;Po;0;L;;;;;N;;;;; +1000;MYANMAR LETTER KA;Lo;0;L;;;;;N;;;;; +1001;MYANMAR LETTER KHA;Lo;0;L;;;;;N;;;;; +1002;MYANMAR LETTER GA;Lo;0;L;;;;;N;;;;; +1003;MYANMAR LETTER GHA;Lo;0;L;;;;;N;;;;; +1004;MYANMAR LETTER NGA;Lo;0;L;;;;;N;;;;; +1005;MYANMAR LETTER CA;Lo;0;L;;;;;N;;;;; +1006;MYANMAR LETTER CHA;Lo;0;L;;;;;N;;;;; +1007;MYANMAR LETTER JA;Lo;0;L;;;;;N;;;;; +1008;MYANMAR LETTER JHA;Lo;0;L;;;;;N;;;;; +1009;MYANMAR LETTER NYA;Lo;0;L;;;;;N;;;;; +100A;MYANMAR LETTER NNYA;Lo;0;L;;;;;N;;;;; +100B;MYANMAR LETTER TTA;Lo;0;L;;;;;N;;;;; +100C;MYANMAR LETTER TTHA;Lo;0;L;;;;;N;;;;; +100D;MYANMAR LETTER DDA;Lo;0;L;;;;;N;;;;; +100E;MYANMAR LETTER DDHA;Lo;0;L;;;;;N;;;;; +100F;MYANMAR LETTER NNA;Lo;0;L;;;;;N;;;;; +1010;MYANMAR LETTER TA;Lo;0;L;;;;;N;;;;; +1011;MYANMAR LETTER THA;Lo;0;L;;;;;N;;;;; +1012;MYANMAR LETTER DA;Lo;0;L;;;;;N;;;;; +1013;MYANMAR LETTER DHA;Lo;0;L;;;;;N;;;;; +1014;MYANMAR LETTER NA;Lo;0;L;;;;;N;;;;; +1015;MYANMAR LETTER PA;Lo;0;L;;;;;N;;;;; +1016;MYANMAR LETTER PHA;Lo;0;L;;;;;N;;;;; +1017;MYANMAR LETTER BA;Lo;0;L;;;;;N;;;;; +1018;MYANMAR LETTER BHA;Lo;0;L;;;;;N;;;;; +1019;MYANMAR LETTER MA;Lo;0;L;;;;;N;;;;; +101A;MYANMAR LETTER YA;Lo;0;L;;;;;N;;;;; +101B;MYANMAR LETTER RA;Lo;0;L;;;;;N;;;;; +101C;MYANMAR LETTER LA;Lo;0;L;;;;;N;;;;; +101D;MYANMAR LETTER WA;Lo;0;L;;;;;N;;;;; +101E;MYANMAR LETTER SA;Lo;0;L;;;;;N;;;;; +101F;MYANMAR LETTER HA;Lo;0;L;;;;;N;;;;; +1020;MYANMAR LETTER LLA;Lo;0;L;;;;;N;;;;; +1021;MYANMAR LETTER A;Lo;0;L;;;;;N;;;;; +1022;MYANMAR LETTER SHAN A;Lo;0;L;;;;;N;;;;; +1023;MYANMAR LETTER I;Lo;0;L;;;;;N;;;;; +1024;MYANMAR LETTER II;Lo;0;L;;;;;N;;;;; +1025;MYANMAR LETTER U;Lo;0;L;;;;;N;;;;; +1026;MYANMAR LETTER UU;Lo;0;L;1025 102E;;;;N;;;;; +1027;MYANMAR LETTER E;Lo;0;L;;;;;N;;;;; +1028;MYANMAR LETTER MON E;Lo;0;L;;;;;N;;;;; +1029;MYANMAR LETTER O;Lo;0;L;;;;;N;;;;; +102A;MYANMAR LETTER AU;Lo;0;L;;;;;N;;;;; +102B;MYANMAR VOWEL SIGN TALL AA;Mc;0;L;;;;;N;;;;; +102C;MYANMAR VOWEL SIGN AA;Mc;0;L;;;;;N;;;;; +102D;MYANMAR VOWEL SIGN I;Mn;0;NSM;;;;;N;;;;; +102E;MYANMAR VOWEL SIGN II;Mn;0;NSM;;;;;N;;;;; +102F;MYANMAR VOWEL SIGN U;Mn;0;NSM;;;;;N;;;;; +1030;MYANMAR VOWEL SIGN UU;Mn;0;NSM;;;;;N;;;;; +1031;MYANMAR VOWEL SIGN E;Mc;0;L;;;;;N;;;;; +1032;MYANMAR VOWEL SIGN AI;Mn;0;NSM;;;;;N;;;;; +1033;MYANMAR VOWEL SIGN MON II;Mn;0;NSM;;;;;N;;;;; +1034;MYANMAR VOWEL SIGN MON O;Mn;0;NSM;;;;;N;;;;; +1035;MYANMAR VOWEL SIGN E ABOVE;Mn;0;NSM;;;;;N;;;;; +1036;MYANMAR SIGN ANUSVARA;Mn;0;NSM;;;;;N;;;;; +1037;MYANMAR SIGN DOT BELOW;Mn;7;NSM;;;;;N;;;;; +1038;MYANMAR SIGN VISARGA;Mc;0;L;;;;;N;;;;; +1039;MYANMAR SIGN VIRAMA;Mn;9;NSM;;;;;N;;;;; +103A;MYANMAR SIGN ASAT;Mn;9;NSM;;;;;N;;;;; +103B;MYANMAR CONSONANT SIGN MEDIAL YA;Mc;0;L;;;;;N;;;;; +103C;MYANMAR CONSONANT SIGN MEDIAL RA;Mc;0;L;;;;;N;;;;; +103D;MYANMAR CONSONANT SIGN MEDIAL WA;Mn;0;NSM;;;;;N;;;;; +103E;MYANMAR CONSONANT SIGN MEDIAL HA;Mn;0;NSM;;;;;N;;;;; +103F;MYANMAR LETTER GREAT SA;Lo;0;L;;;;;N;;;;; +1040;MYANMAR DIGIT ZERO;Nd;0;L;;0;0;0;N;;;;; +1041;MYANMAR DIGIT ONE;Nd;0;L;;1;1;1;N;;;;; +1042;MYANMAR DIGIT TWO;Nd;0;L;;2;2;2;N;;;;; +1043;MYANMAR DIGIT THREE;Nd;0;L;;3;3;3;N;;;;; +1044;MYANMAR DIGIT FOUR;Nd;0;L;;4;4;4;N;;;;; +1045;MYANMAR DIGIT FIVE;Nd;0;L;;5;5;5;N;;;;; +1046;MYANMAR DIGIT SIX;Nd;0;L;;6;6;6;N;;;;; +1047;MYANMAR DIGIT SEVEN;Nd;0;L;;7;7;7;N;;;;; +1048;MYANMAR DIGIT EIGHT;Nd;0;L;;8;8;8;N;;;;; +1049;MYANMAR DIGIT NINE;Nd;0;L;;9;9;9;N;;;;; +104A;MYANMAR SIGN LITTLE SECTION;Po;0;L;;;;;N;;;;; +104B;MYANMAR SIGN SECTION;Po;0;L;;;;;N;;;;; +104C;MYANMAR SYMBOL LOCATIVE;Po;0;L;;;;;N;;;;; +104D;MYANMAR SYMBOL COMPLETED;Po;0;L;;;;;N;;;;; +104E;MYANMAR SYMBOL AFOREMENTIONED;Po;0;L;;;;;N;;;;; +104F;MYANMAR SYMBOL GENITIVE;Po;0;L;;;;;N;;;;; +1050;MYANMAR LETTER SHA;Lo;0;L;;;;;N;;;;; +1051;MYANMAR LETTER SSA;Lo;0;L;;;;;N;;;;; +1052;MYANMAR LETTER VOCALIC R;Lo;0;L;;;;;N;;;;; +1053;MYANMAR LETTER VOCALIC RR;Lo;0;L;;;;;N;;;;; +1054;MYANMAR LETTER VOCALIC L;Lo;0;L;;;;;N;;;;; +1055;MYANMAR LETTER VOCALIC LL;Lo;0;L;;;;;N;;;;; +1056;MYANMAR VOWEL SIGN VOCALIC R;Mc;0;L;;;;;N;;;;; +1057;MYANMAR VOWEL SIGN VOCALIC RR;Mc;0;L;;;;;N;;;;; +1058;MYANMAR VOWEL SIGN VOCALIC L;Mn;0;NSM;;;;;N;;;;; +1059;MYANMAR VOWEL SIGN VOCALIC LL;Mn;0;NSM;;;;;N;;;;; +105A;MYANMAR LETTER MON NGA;Lo;0;L;;;;;N;;;;; +105B;MYANMAR LETTER MON JHA;Lo;0;L;;;;;N;;;;; +105C;MYANMAR LETTER MON BBA;Lo;0;L;;;;;N;;;;; +105D;MYANMAR LETTER MON BBE;Lo;0;L;;;;;N;;;;; +105E;MYANMAR CONSONANT SIGN MON MEDIAL NA;Mn;0;NSM;;;;;N;;;;; +105F;MYANMAR CONSONANT SIGN MON MEDIAL MA;Mn;0;NSM;;;;;N;;;;; +1060;MYANMAR CONSONANT SIGN MON MEDIAL LA;Mn;0;NSM;;;;;N;;;;; +1061;MYANMAR LETTER SGAW KAREN SHA;Lo;0;L;;;;;N;;;;; +1062;MYANMAR VOWEL SIGN SGAW KAREN EU;Mc;0;L;;;;;N;;;;; +1063;MYANMAR TONE MARK SGAW KAREN HATHI;Mc;0;L;;;;;N;;;;; +1064;MYANMAR TONE MARK SGAW KAREN KE PHO;Mc;0;L;;;;;N;;;;; +1065;MYANMAR LETTER WESTERN PWO KAREN THA;Lo;0;L;;;;;N;;;;; +1066;MYANMAR LETTER WESTERN PWO KAREN PWA;Lo;0;L;;;;;N;;;;; +1067;MYANMAR VOWEL SIGN WESTERN PWO KAREN EU;Mc;0;L;;;;;N;;;;; +1068;MYANMAR VOWEL SIGN WESTERN PWO KAREN UE;Mc;0;L;;;;;N;;;;; +1069;MYANMAR SIGN WESTERN PWO KAREN TONE-1;Mc;0;L;;;;;N;;;;; +106A;MYANMAR SIGN WESTERN PWO KAREN TONE-2;Mc;0;L;;;;;N;;;;; +106B;MYANMAR SIGN WESTERN PWO KAREN TONE-3;Mc;0;L;;;;;N;;;;; +106C;MYANMAR SIGN WESTERN PWO KAREN TONE-4;Mc;0;L;;;;;N;;;;; +106D;MYANMAR SIGN WESTERN PWO KAREN TONE-5;Mc;0;L;;;;;N;;;;; +106E;MYANMAR LETTER EASTERN PWO KAREN NNA;Lo;0;L;;;;;N;;;;; +106F;MYANMAR LETTER EASTERN PWO KAREN YWA;Lo;0;L;;;;;N;;;;; +1070;MYANMAR LETTER EASTERN PWO KAREN GHWA;Lo;0;L;;;;;N;;;;; +1071;MYANMAR VOWEL SIGN GEBA KAREN I;Mn;0;NSM;;;;;N;;;;; +1072;MYANMAR VOWEL SIGN KAYAH OE;Mn;0;NSM;;;;;N;;;;; +1073;MYANMAR VOWEL SIGN KAYAH U;Mn;0;NSM;;;;;N;;;;; +1074;MYANMAR VOWEL SIGN KAYAH EE;Mn;0;NSM;;;;;N;;;;; +1075;MYANMAR LETTER SHAN KA;Lo;0;L;;;;;N;;;;; +1076;MYANMAR LETTER SHAN KHA;Lo;0;L;;;;;N;;;;; +1077;MYANMAR LETTER SHAN GA;Lo;0;L;;;;;N;;;;; +1078;MYANMAR LETTER SHAN CA;Lo;0;L;;;;;N;;;;; +1079;MYANMAR LETTER SHAN ZA;Lo;0;L;;;;;N;;;;; +107A;MYANMAR LETTER SHAN NYA;Lo;0;L;;;;;N;;;;; +107B;MYANMAR LETTER SHAN DA;Lo;0;L;;;;;N;;;;; +107C;MYANMAR LETTER SHAN NA;Lo;0;L;;;;;N;;;;; +107D;MYANMAR LETTER SHAN PHA;Lo;0;L;;;;;N;;;;; +107E;MYANMAR LETTER SHAN FA;Lo;0;L;;;;;N;;;;; +107F;MYANMAR LETTER SHAN BA;Lo;0;L;;;;;N;;;;; +1080;MYANMAR LETTER SHAN THA;Lo;0;L;;;;;N;;;;; +1081;MYANMAR LETTER SHAN HA;Lo;0;L;;;;;N;;;;; +1082;MYANMAR CONSONANT SIGN SHAN MEDIAL WA;Mn;0;NSM;;;;;N;;;;; +1083;MYANMAR VOWEL SIGN SHAN AA;Mc;0;L;;;;;N;;;;; +1084;MYANMAR VOWEL SIGN SHAN E;Mc;0;L;;;;;N;;;;; +1085;MYANMAR VOWEL SIGN SHAN E ABOVE;Mn;0;NSM;;;;;N;;;;; +1086;MYANMAR VOWEL SIGN SHAN FINAL Y;Mn;0;NSM;;;;;N;;;;; +1087;MYANMAR SIGN SHAN TONE-2;Mc;0;L;;;;;N;;;;; +1088;MYANMAR SIGN SHAN TONE-3;Mc;0;L;;;;;N;;;;; +1089;MYANMAR SIGN SHAN TONE-5;Mc;0;L;;;;;N;;;;; +108A;MYANMAR SIGN SHAN TONE-6;Mc;0;L;;;;;N;;;;; +108B;MYANMAR SIGN SHAN COUNCIL TONE-2;Mc;0;L;;;;;N;;;;; +108C;MYANMAR SIGN SHAN COUNCIL TONE-3;Mc;0;L;;;;;N;;;;; +108D;MYANMAR SIGN SHAN COUNCIL EMPHATIC TONE;Mn;220;NSM;;;;;N;;;;; +108E;MYANMAR LETTER RUMAI PALAUNG FA;Lo;0;L;;;;;N;;;;; +108F;MYANMAR SIGN RUMAI PALAUNG TONE-5;Mc;0;L;;;;;N;;;;; +1090;MYANMAR SHAN DIGIT ZERO;Nd;0;L;;0;0;0;N;;;;; +1091;MYANMAR SHAN DIGIT ONE;Nd;0;L;;1;1;1;N;;;;; +1092;MYANMAR SHAN DIGIT TWO;Nd;0;L;;2;2;2;N;;;;; +1093;MYANMAR SHAN DIGIT THREE;Nd;0;L;;3;3;3;N;;;;; +1094;MYANMAR SHAN DIGIT FOUR;Nd;0;L;;4;4;4;N;;;;; +1095;MYANMAR SHAN DIGIT FIVE;Nd;0;L;;5;5;5;N;;;;; +1096;MYANMAR SHAN DIGIT SIX;Nd;0;L;;6;6;6;N;;;;; +1097;MYANMAR SHAN DIGIT SEVEN;Nd;0;L;;7;7;7;N;;;;; +1098;MYANMAR SHAN DIGIT EIGHT;Nd;0;L;;8;8;8;N;;;;; +1099;MYANMAR SHAN DIGIT NINE;Nd;0;L;;9;9;9;N;;;;; +109A;MYANMAR SIGN KHAMTI TONE-1;Mc;0;L;;;;;N;;;;; +109B;MYANMAR SIGN KHAMTI TONE-3;Mc;0;L;;;;;N;;;;; +109C;MYANMAR VOWEL SIGN AITON A;Mc;0;L;;;;;N;;;;; +109D;MYANMAR VOWEL SIGN AITON AI;Mn;0;NSM;;;;;N;;;;; +109E;MYANMAR SYMBOL SHAN ONE;So;0;L;;;;;N;;;;; +109F;MYANMAR SYMBOL SHAN EXCLAMATION;So;0;L;;;;;N;;;;; +10A0;GEORGIAN CAPITAL LETTER AN;Lu;0;L;;;;;N;;;;2D00; +10A1;GEORGIAN CAPITAL LETTER BAN;Lu;0;L;;;;;N;;;;2D01; +10A2;GEORGIAN CAPITAL LETTER GAN;Lu;0;L;;;;;N;;;;2D02; +10A3;GEORGIAN CAPITAL LETTER DON;Lu;0;L;;;;;N;;;;2D03; +10A4;GEORGIAN CAPITAL LETTER EN;Lu;0;L;;;;;N;;;;2D04; +10A5;GEORGIAN CAPITAL LETTER VIN;Lu;0;L;;;;;N;;;;2D05; +10A6;GEORGIAN CAPITAL LETTER ZEN;Lu;0;L;;;;;N;;;;2D06; +10A7;GEORGIAN CAPITAL LETTER TAN;Lu;0;L;;;;;N;;;;2D07; +10A8;GEORGIAN CAPITAL LETTER IN;Lu;0;L;;;;;N;;;;2D08; +10A9;GEORGIAN CAPITAL LETTER KAN;Lu;0;L;;;;;N;;;;2D09; +10AA;GEORGIAN CAPITAL LETTER LAS;Lu;0;L;;;;;N;;;;2D0A; +10AB;GEORGIAN CAPITAL LETTER MAN;Lu;0;L;;;;;N;;;;2D0B; +10AC;GEORGIAN CAPITAL LETTER NAR;Lu;0;L;;;;;N;;;;2D0C; +10AD;GEORGIAN CAPITAL LETTER ON;Lu;0;L;;;;;N;;;;2D0D; +10AE;GEORGIAN CAPITAL LETTER PAR;Lu;0;L;;;;;N;;;;2D0E; +10AF;GEORGIAN CAPITAL LETTER ZHAR;Lu;0;L;;;;;N;;;;2D0F; +10B0;GEORGIAN CAPITAL LETTER RAE;Lu;0;L;;;;;N;;;;2D10; +10B1;GEORGIAN CAPITAL LETTER SAN;Lu;0;L;;;;;N;;;;2D11; +10B2;GEORGIAN CAPITAL LETTER TAR;Lu;0;L;;;;;N;;;;2D12; +10B3;GEORGIAN CAPITAL LETTER UN;Lu;0;L;;;;;N;;;;2D13; +10B4;GEORGIAN CAPITAL LETTER PHAR;Lu;0;L;;;;;N;;;;2D14; +10B5;GEORGIAN CAPITAL LETTER KHAR;Lu;0;L;;;;;N;;;;2D15; +10B6;GEORGIAN CAPITAL LETTER GHAN;Lu;0;L;;;;;N;;;;2D16; +10B7;GEORGIAN CAPITAL LETTER QAR;Lu;0;L;;;;;N;;;;2D17; +10B8;GEORGIAN CAPITAL LETTER SHIN;Lu;0;L;;;;;N;;;;2D18; +10B9;GEORGIAN CAPITAL LETTER CHIN;Lu;0;L;;;;;N;;;;2D19; +10BA;GEORGIAN CAPITAL LETTER CAN;Lu;0;L;;;;;N;;;;2D1A; +10BB;GEORGIAN CAPITAL LETTER JIL;Lu;0;L;;;;;N;;;;2D1B; +10BC;GEORGIAN CAPITAL LETTER CIL;Lu;0;L;;;;;N;;;;2D1C; +10BD;GEORGIAN CAPITAL LETTER CHAR;Lu;0;L;;;;;N;;;;2D1D; +10BE;GEORGIAN CAPITAL LETTER XAN;Lu;0;L;;;;;N;;;;2D1E; +10BF;GEORGIAN CAPITAL LETTER JHAN;Lu;0;L;;;;;N;;;;2D1F; +10C0;GEORGIAN CAPITAL LETTER HAE;Lu;0;L;;;;;N;;;;2D20; +10C1;GEORGIAN CAPITAL LETTER HE;Lu;0;L;;;;;N;;;;2D21; +10C2;GEORGIAN CAPITAL LETTER HIE;Lu;0;L;;;;;N;;;;2D22; +10C3;GEORGIAN CAPITAL LETTER WE;Lu;0;L;;;;;N;;;;2D23; +10C4;GEORGIAN CAPITAL LETTER HAR;Lu;0;L;;;;;N;;;;2D24; +10C5;GEORGIAN CAPITAL LETTER HOE;Lu;0;L;;;;;N;;;;2D25; +10C7;GEORGIAN CAPITAL LETTER YN;Lu;0;L;;;;;N;;;;2D27; +10CD;GEORGIAN CAPITAL LETTER AEN;Lu;0;L;;;;;N;;;;2D2D; +10D0;GEORGIAN LETTER AN;Ll;0;L;;;;;N;GEORGIAN SMALL LETTER AN;;1C90;;10D0 +10D1;GEORGIAN LETTER BAN;Ll;0;L;;;;;N;GEORGIAN SMALL LETTER BAN;;1C91;;10D1 +10D2;GEORGIAN LETTER GAN;Ll;0;L;;;;;N;GEORGIAN SMALL LETTER GAN;;1C92;;10D2 +10D3;GEORGIAN LETTER DON;Ll;0;L;;;;;N;GEORGIAN SMALL LETTER DON;;1C93;;10D3 +10D4;GEORGIAN LETTER EN;Ll;0;L;;;;;N;GEORGIAN SMALL LETTER EN;;1C94;;10D4 +10D5;GEORGIAN LETTER VIN;Ll;0;L;;;;;N;GEORGIAN SMALL LETTER VIN;;1C95;;10D5 +10D6;GEORGIAN LETTER ZEN;Ll;0;L;;;;;N;GEORGIAN SMALL LETTER ZEN;;1C96;;10D6 +10D7;GEORGIAN LETTER TAN;Ll;0;L;;;;;N;GEORGIAN SMALL LETTER TAN;;1C97;;10D7 +10D8;GEORGIAN LETTER IN;Ll;0;L;;;;;N;GEORGIAN SMALL LETTER IN;;1C98;;10D8 +10D9;GEORGIAN LETTER KAN;Ll;0;L;;;;;N;GEORGIAN SMALL LETTER KAN;;1C99;;10D9 +10DA;GEORGIAN LETTER LAS;Ll;0;L;;;;;N;GEORGIAN SMALL LETTER LAS;;1C9A;;10DA +10DB;GEORGIAN LETTER MAN;Ll;0;L;;;;;N;GEORGIAN SMALL LETTER MAN;;1C9B;;10DB +10DC;GEORGIAN LETTER NAR;Ll;0;L;;;;;N;GEORGIAN SMALL LETTER NAR;;1C9C;;10DC +10DD;GEORGIAN LETTER ON;Ll;0;L;;;;;N;GEORGIAN SMALL LETTER ON;;1C9D;;10DD +10DE;GEORGIAN LETTER PAR;Ll;0;L;;;;;N;GEORGIAN SMALL LETTER PAR;;1C9E;;10DE +10DF;GEORGIAN LETTER ZHAR;Ll;0;L;;;;;N;GEORGIAN SMALL LETTER ZHAR;;1C9F;;10DF +10E0;GEORGIAN LETTER RAE;Ll;0;L;;;;;N;GEORGIAN SMALL LETTER RAE;;1CA0;;10E0 +10E1;GEORGIAN LETTER SAN;Ll;0;L;;;;;N;GEORGIAN SMALL LETTER SAN;;1CA1;;10E1 +10E2;GEORGIAN LETTER TAR;Ll;0;L;;;;;N;GEORGIAN SMALL LETTER TAR;;1CA2;;10E2 +10E3;GEORGIAN LETTER UN;Ll;0;L;;;;;N;GEORGIAN SMALL LETTER UN;;1CA3;;10E3 +10E4;GEORGIAN LETTER PHAR;Ll;0;L;;;;;N;GEORGIAN SMALL LETTER PHAR;;1CA4;;10E4 +10E5;GEORGIAN LETTER KHAR;Ll;0;L;;;;;N;GEORGIAN SMALL LETTER KHAR;;1CA5;;10E5 +10E6;GEORGIAN LETTER GHAN;Ll;0;L;;;;;N;GEORGIAN SMALL LETTER GHAN;;1CA6;;10E6 +10E7;GEORGIAN LETTER QAR;Ll;0;L;;;;;N;GEORGIAN SMALL LETTER QAR;;1CA7;;10E7 +10E8;GEORGIAN LETTER SHIN;Ll;0;L;;;;;N;GEORGIAN SMALL LETTER SHIN;;1CA8;;10E8 +10E9;GEORGIAN LETTER CHIN;Ll;0;L;;;;;N;GEORGIAN SMALL LETTER CHIN;;1CA9;;10E9 +10EA;GEORGIAN LETTER CAN;Ll;0;L;;;;;N;GEORGIAN SMALL LETTER CAN;;1CAA;;10EA +10EB;GEORGIAN LETTER JIL;Ll;0;L;;;;;N;GEORGIAN SMALL LETTER JIL;;1CAB;;10EB +10EC;GEORGIAN LETTER CIL;Ll;0;L;;;;;N;GEORGIAN SMALL LETTER CIL;;1CAC;;10EC +10ED;GEORGIAN LETTER CHAR;Ll;0;L;;;;;N;GEORGIAN SMALL LETTER CHAR;;1CAD;;10ED +10EE;GEORGIAN LETTER XAN;Ll;0;L;;;;;N;GEORGIAN SMALL LETTER XAN;;1CAE;;10EE +10EF;GEORGIAN LETTER JHAN;Ll;0;L;;;;;N;GEORGIAN SMALL LETTER JHAN;;1CAF;;10EF +10F0;GEORGIAN LETTER HAE;Ll;0;L;;;;;N;GEORGIAN SMALL LETTER HAE;;1CB0;;10F0 +10F1;GEORGIAN LETTER HE;Ll;0;L;;;;;N;GEORGIAN SMALL LETTER HE;;1CB1;;10F1 +10F2;GEORGIAN LETTER HIE;Ll;0;L;;;;;N;GEORGIAN SMALL LETTER HIE;;1CB2;;10F2 +10F3;GEORGIAN LETTER WE;Ll;0;L;;;;;N;GEORGIAN SMALL LETTER WE;;1CB3;;10F3 +10F4;GEORGIAN LETTER HAR;Ll;0;L;;;;;N;GEORGIAN SMALL LETTER HAR;;1CB4;;10F4 +10F5;GEORGIAN LETTER HOE;Ll;0;L;;;;;N;GEORGIAN SMALL LETTER HOE;;1CB5;;10F5 +10F6;GEORGIAN LETTER FI;Ll;0;L;;;;;N;GEORGIAN SMALL LETTER FI;;1CB6;;10F6 +10F7;GEORGIAN LETTER YN;Ll;0;L;;;;;N;;;1CB7;;10F7 +10F8;GEORGIAN LETTER ELIFI;Ll;0;L;;;;;N;;;1CB8;;10F8 +10F9;GEORGIAN LETTER TURNED GAN;Ll;0;L;;;;;N;;;1CB9;;10F9 +10FA;GEORGIAN LETTER AIN;Ll;0;L;;;;;N;;;1CBA;;10FA +10FB;GEORGIAN PARAGRAPH SEPARATOR;Po;0;L;;;;;N;;;;; +10FC;MODIFIER LETTER GEORGIAN NAR;Lm;0;L; 10DC;;;;N;;;;; +10FD;GEORGIAN LETTER AEN;Ll;0;L;;;;;N;;;1CBD;;10FD +10FE;GEORGIAN LETTER HARD SIGN;Ll;0;L;;;;;N;;;1CBE;;10FE +10FF;GEORGIAN LETTER LABIAL SIGN;Ll;0;L;;;;;N;;;1CBF;;10FF +1100;HANGUL CHOSEONG KIYEOK;Lo;0;L;;;;;N;;;;; +1101;HANGUL CHOSEONG SSANGKIYEOK;Lo;0;L;;;;;N;;;;; +1102;HANGUL CHOSEONG NIEUN;Lo;0;L;;;;;N;;;;; +1103;HANGUL CHOSEONG TIKEUT;Lo;0;L;;;;;N;;;;; +1104;HANGUL CHOSEONG SSANGTIKEUT;Lo;0;L;;;;;N;;;;; +1105;HANGUL CHOSEONG RIEUL;Lo;0;L;;;;;N;;;;; +1106;HANGUL CHOSEONG MIEUM;Lo;0;L;;;;;N;;;;; +1107;HANGUL CHOSEONG PIEUP;Lo;0;L;;;;;N;;;;; +1108;HANGUL CHOSEONG SSANGPIEUP;Lo;0;L;;;;;N;;;;; +1109;HANGUL CHOSEONG SIOS;Lo;0;L;;;;;N;;;;; +110A;HANGUL CHOSEONG SSANGSIOS;Lo;0;L;;;;;N;;;;; +110B;HANGUL CHOSEONG IEUNG;Lo;0;L;;;;;N;;;;; +110C;HANGUL CHOSEONG CIEUC;Lo;0;L;;;;;N;;;;; +110D;HANGUL CHOSEONG SSANGCIEUC;Lo;0;L;;;;;N;;;;; +110E;HANGUL CHOSEONG CHIEUCH;Lo;0;L;;;;;N;;;;; +110F;HANGUL CHOSEONG KHIEUKH;Lo;0;L;;;;;N;;;;; +1110;HANGUL CHOSEONG THIEUTH;Lo;0;L;;;;;N;;;;; +1111;HANGUL CHOSEONG PHIEUPH;Lo;0;L;;;;;N;;;;; +1112;HANGUL CHOSEONG HIEUH;Lo;0;L;;;;;N;;;;; +1113;HANGUL CHOSEONG NIEUN-KIYEOK;Lo;0;L;;;;;N;;;;; +1114;HANGUL CHOSEONG SSANGNIEUN;Lo;0;L;;;;;N;;;;; +1115;HANGUL CHOSEONG NIEUN-TIKEUT;Lo;0;L;;;;;N;;;;; +1116;HANGUL CHOSEONG NIEUN-PIEUP;Lo;0;L;;;;;N;;;;; +1117;HANGUL CHOSEONG TIKEUT-KIYEOK;Lo;0;L;;;;;N;;;;; +1118;HANGUL CHOSEONG RIEUL-NIEUN;Lo;0;L;;;;;N;;;;; +1119;HANGUL CHOSEONG SSANGRIEUL;Lo;0;L;;;;;N;;;;; +111A;HANGUL CHOSEONG RIEUL-HIEUH;Lo;0;L;;;;;N;;;;; +111B;HANGUL CHOSEONG KAPYEOUNRIEUL;Lo;0;L;;;;;N;;;;; +111C;HANGUL CHOSEONG MIEUM-PIEUP;Lo;0;L;;;;;N;;;;; +111D;HANGUL CHOSEONG KAPYEOUNMIEUM;Lo;0;L;;;;;N;;;;; +111E;HANGUL CHOSEONG PIEUP-KIYEOK;Lo;0;L;;;;;N;;;;; +111F;HANGUL CHOSEONG PIEUP-NIEUN;Lo;0;L;;;;;N;;;;; +1120;HANGUL CHOSEONG PIEUP-TIKEUT;Lo;0;L;;;;;N;;;;; +1121;HANGUL CHOSEONG PIEUP-SIOS;Lo;0;L;;;;;N;;;;; +1122;HANGUL CHOSEONG PIEUP-SIOS-KIYEOK;Lo;0;L;;;;;N;;;;; +1123;HANGUL CHOSEONG PIEUP-SIOS-TIKEUT;Lo;0;L;;;;;N;;;;; +1124;HANGUL CHOSEONG PIEUP-SIOS-PIEUP;Lo;0;L;;;;;N;;;;; +1125;HANGUL CHOSEONG PIEUP-SSANGSIOS;Lo;0;L;;;;;N;;;;; +1126;HANGUL CHOSEONG PIEUP-SIOS-CIEUC;Lo;0;L;;;;;N;;;;; +1127;HANGUL CHOSEONG PIEUP-CIEUC;Lo;0;L;;;;;N;;;;; +1128;HANGUL CHOSEONG PIEUP-CHIEUCH;Lo;0;L;;;;;N;;;;; +1129;HANGUL CHOSEONG PIEUP-THIEUTH;Lo;0;L;;;;;N;;;;; +112A;HANGUL CHOSEONG PIEUP-PHIEUPH;Lo;0;L;;;;;N;;;;; +112B;HANGUL CHOSEONG KAPYEOUNPIEUP;Lo;0;L;;;;;N;;;;; +112C;HANGUL CHOSEONG KAPYEOUNSSANGPIEUP;Lo;0;L;;;;;N;;;;; +112D;HANGUL CHOSEONG SIOS-KIYEOK;Lo;0;L;;;;;N;;;;; +112E;HANGUL CHOSEONG SIOS-NIEUN;Lo;0;L;;;;;N;;;;; +112F;HANGUL CHOSEONG SIOS-TIKEUT;Lo;0;L;;;;;N;;;;; +1130;HANGUL CHOSEONG SIOS-RIEUL;Lo;0;L;;;;;N;;;;; +1131;HANGUL CHOSEONG SIOS-MIEUM;Lo;0;L;;;;;N;;;;; +1132;HANGUL CHOSEONG SIOS-PIEUP;Lo;0;L;;;;;N;;;;; +1133;HANGUL CHOSEONG SIOS-PIEUP-KIYEOK;Lo;0;L;;;;;N;;;;; +1134;HANGUL CHOSEONG SIOS-SSANGSIOS;Lo;0;L;;;;;N;;;;; +1135;HANGUL CHOSEONG SIOS-IEUNG;Lo;0;L;;;;;N;;;;; +1136;HANGUL CHOSEONG SIOS-CIEUC;Lo;0;L;;;;;N;;;;; +1137;HANGUL CHOSEONG SIOS-CHIEUCH;Lo;0;L;;;;;N;;;;; +1138;HANGUL CHOSEONG SIOS-KHIEUKH;Lo;0;L;;;;;N;;;;; +1139;HANGUL CHOSEONG SIOS-THIEUTH;Lo;0;L;;;;;N;;;;; +113A;HANGUL CHOSEONG SIOS-PHIEUPH;Lo;0;L;;;;;N;;;;; +113B;HANGUL CHOSEONG SIOS-HIEUH;Lo;0;L;;;;;N;;;;; +113C;HANGUL CHOSEONG CHITUEUMSIOS;Lo;0;L;;;;;N;;;;; +113D;HANGUL CHOSEONG CHITUEUMSSANGSIOS;Lo;0;L;;;;;N;;;;; +113E;HANGUL CHOSEONG CEONGCHIEUMSIOS;Lo;0;L;;;;;N;;;;; +113F;HANGUL CHOSEONG CEONGCHIEUMSSANGSIOS;Lo;0;L;;;;;N;;;;; +1140;HANGUL CHOSEONG PANSIOS;Lo;0;L;;;;;N;;;;; +1141;HANGUL CHOSEONG IEUNG-KIYEOK;Lo;0;L;;;;;N;;;;; +1142;HANGUL CHOSEONG IEUNG-TIKEUT;Lo;0;L;;;;;N;;;;; +1143;HANGUL CHOSEONG IEUNG-MIEUM;Lo;0;L;;;;;N;;;;; +1144;HANGUL CHOSEONG IEUNG-PIEUP;Lo;0;L;;;;;N;;;;; +1145;HANGUL CHOSEONG IEUNG-SIOS;Lo;0;L;;;;;N;;;;; +1146;HANGUL CHOSEONG IEUNG-PANSIOS;Lo;0;L;;;;;N;;;;; +1147;HANGUL CHOSEONG SSANGIEUNG;Lo;0;L;;;;;N;;;;; +1148;HANGUL CHOSEONG IEUNG-CIEUC;Lo;0;L;;;;;N;;;;; +1149;HANGUL CHOSEONG IEUNG-CHIEUCH;Lo;0;L;;;;;N;;;;; +114A;HANGUL CHOSEONG IEUNG-THIEUTH;Lo;0;L;;;;;N;;;;; +114B;HANGUL CHOSEONG IEUNG-PHIEUPH;Lo;0;L;;;;;N;;;;; +114C;HANGUL CHOSEONG YESIEUNG;Lo;0;L;;;;;N;;;;; +114D;HANGUL CHOSEONG CIEUC-IEUNG;Lo;0;L;;;;;N;;;;; +114E;HANGUL CHOSEONG CHITUEUMCIEUC;Lo;0;L;;;;;N;;;;; +114F;HANGUL CHOSEONG CHITUEUMSSANGCIEUC;Lo;0;L;;;;;N;;;;; +1150;HANGUL CHOSEONG CEONGCHIEUMCIEUC;Lo;0;L;;;;;N;;;;; +1151;HANGUL CHOSEONG CEONGCHIEUMSSANGCIEUC;Lo;0;L;;;;;N;;;;; +1152;HANGUL CHOSEONG CHIEUCH-KHIEUKH;Lo;0;L;;;;;N;;;;; +1153;HANGUL CHOSEONG CHIEUCH-HIEUH;Lo;0;L;;;;;N;;;;; +1154;HANGUL CHOSEONG CHITUEUMCHIEUCH;Lo;0;L;;;;;N;;;;; +1155;HANGUL CHOSEONG CEONGCHIEUMCHIEUCH;Lo;0;L;;;;;N;;;;; +1156;HANGUL CHOSEONG PHIEUPH-PIEUP;Lo;0;L;;;;;N;;;;; +1157;HANGUL CHOSEONG KAPYEOUNPHIEUPH;Lo;0;L;;;;;N;;;;; +1158;HANGUL CHOSEONG SSANGHIEUH;Lo;0;L;;;;;N;;;;; +1159;HANGUL CHOSEONG YEORINHIEUH;Lo;0;L;;;;;N;;;;; +115A;HANGUL CHOSEONG KIYEOK-TIKEUT;Lo;0;L;;;;;N;;;;; +115B;HANGUL CHOSEONG NIEUN-SIOS;Lo;0;L;;;;;N;;;;; +115C;HANGUL CHOSEONG NIEUN-CIEUC;Lo;0;L;;;;;N;;;;; +115D;HANGUL CHOSEONG NIEUN-HIEUH;Lo;0;L;;;;;N;;;;; +115E;HANGUL CHOSEONG TIKEUT-RIEUL;Lo;0;L;;;;;N;;;;; +115F;HANGUL CHOSEONG FILLER;Lo;0;L;;;;;N;;;;; +1160;HANGUL JUNGSEONG FILLER;Lo;0;L;;;;;N;;;;; +1161;HANGUL JUNGSEONG A;Lo;0;L;;;;;N;;;;; +1162;HANGUL JUNGSEONG AE;Lo;0;L;;;;;N;;;;; +1163;HANGUL JUNGSEONG YA;Lo;0;L;;;;;N;;;;; +1164;HANGUL JUNGSEONG YAE;Lo;0;L;;;;;N;;;;; +1165;HANGUL JUNGSEONG EO;Lo;0;L;;;;;N;;;;; +1166;HANGUL JUNGSEONG E;Lo;0;L;;;;;N;;;;; +1167;HANGUL JUNGSEONG YEO;Lo;0;L;;;;;N;;;;; +1168;HANGUL JUNGSEONG YE;Lo;0;L;;;;;N;;;;; +1169;HANGUL JUNGSEONG O;Lo;0;L;;;;;N;;;;; +116A;HANGUL JUNGSEONG WA;Lo;0;L;;;;;N;;;;; +116B;HANGUL JUNGSEONG WAE;Lo;0;L;;;;;N;;;;; +116C;HANGUL JUNGSEONG OE;Lo;0;L;;;;;N;;;;; +116D;HANGUL JUNGSEONG YO;Lo;0;L;;;;;N;;;;; +116E;HANGUL JUNGSEONG U;Lo;0;L;;;;;N;;;;; +116F;HANGUL JUNGSEONG WEO;Lo;0;L;;;;;N;;;;; +1170;HANGUL JUNGSEONG WE;Lo;0;L;;;;;N;;;;; +1171;HANGUL JUNGSEONG WI;Lo;0;L;;;;;N;;;;; +1172;HANGUL JUNGSEONG YU;Lo;0;L;;;;;N;;;;; +1173;HANGUL JUNGSEONG EU;Lo;0;L;;;;;N;;;;; +1174;HANGUL JUNGSEONG YI;Lo;0;L;;;;;N;;;;; +1175;HANGUL JUNGSEONG I;Lo;0;L;;;;;N;;;;; +1176;HANGUL JUNGSEONG A-O;Lo;0;L;;;;;N;;;;; +1177;HANGUL JUNGSEONG A-U;Lo;0;L;;;;;N;;;;; +1178;HANGUL JUNGSEONG YA-O;Lo;0;L;;;;;N;;;;; +1179;HANGUL JUNGSEONG YA-YO;Lo;0;L;;;;;N;;;;; +117A;HANGUL JUNGSEONG EO-O;Lo;0;L;;;;;N;;;;; +117B;HANGUL JUNGSEONG EO-U;Lo;0;L;;;;;N;;;;; +117C;HANGUL JUNGSEONG EO-EU;Lo;0;L;;;;;N;;;;; +117D;HANGUL JUNGSEONG YEO-O;Lo;0;L;;;;;N;;;;; +117E;HANGUL JUNGSEONG YEO-U;Lo;0;L;;;;;N;;;;; +117F;HANGUL JUNGSEONG O-EO;Lo;0;L;;;;;N;;;;; +1180;HANGUL JUNGSEONG O-E;Lo;0;L;;;;;N;;;;; +1181;HANGUL JUNGSEONG O-YE;Lo;0;L;;;;;N;;;;; +1182;HANGUL JUNGSEONG O-O;Lo;0;L;;;;;N;;;;; +1183;HANGUL JUNGSEONG O-U;Lo;0;L;;;;;N;;;;; +1184;HANGUL JUNGSEONG YO-YA;Lo;0;L;;;;;N;;;;; +1185;HANGUL JUNGSEONG YO-YAE;Lo;0;L;;;;;N;;;;; +1186;HANGUL JUNGSEONG YO-YEO;Lo;0;L;;;;;N;;;;; +1187;HANGUL JUNGSEONG YO-O;Lo;0;L;;;;;N;;;;; +1188;HANGUL JUNGSEONG YO-I;Lo;0;L;;;;;N;;;;; +1189;HANGUL JUNGSEONG U-A;Lo;0;L;;;;;N;;;;; +118A;HANGUL JUNGSEONG U-AE;Lo;0;L;;;;;N;;;;; +118B;HANGUL JUNGSEONG U-EO-EU;Lo;0;L;;;;;N;;;;; +118C;HANGUL JUNGSEONG U-YE;Lo;0;L;;;;;N;;;;; +118D;HANGUL JUNGSEONG U-U;Lo;0;L;;;;;N;;;;; +118E;HANGUL JUNGSEONG YU-A;Lo;0;L;;;;;N;;;;; +118F;HANGUL JUNGSEONG YU-EO;Lo;0;L;;;;;N;;;;; +1190;HANGUL JUNGSEONG YU-E;Lo;0;L;;;;;N;;;;; +1191;HANGUL JUNGSEONG YU-YEO;Lo;0;L;;;;;N;;;;; +1192;HANGUL JUNGSEONG YU-YE;Lo;0;L;;;;;N;;;;; +1193;HANGUL JUNGSEONG YU-U;Lo;0;L;;;;;N;;;;; +1194;HANGUL JUNGSEONG YU-I;Lo;0;L;;;;;N;;;;; +1195;HANGUL JUNGSEONG EU-U;Lo;0;L;;;;;N;;;;; +1196;HANGUL JUNGSEONG EU-EU;Lo;0;L;;;;;N;;;;; +1197;HANGUL JUNGSEONG YI-U;Lo;0;L;;;;;N;;;;; +1198;HANGUL JUNGSEONG I-A;Lo;0;L;;;;;N;;;;; +1199;HANGUL JUNGSEONG I-YA;Lo;0;L;;;;;N;;;;; +119A;HANGUL JUNGSEONG I-O;Lo;0;L;;;;;N;;;;; +119B;HANGUL JUNGSEONG I-U;Lo;0;L;;;;;N;;;;; +119C;HANGUL JUNGSEONG I-EU;Lo;0;L;;;;;N;;;;; +119D;HANGUL JUNGSEONG I-ARAEA;Lo;0;L;;;;;N;;;;; +119E;HANGUL JUNGSEONG ARAEA;Lo;0;L;;;;;N;;;;; +119F;HANGUL JUNGSEONG ARAEA-EO;Lo;0;L;;;;;N;;;;; +11A0;HANGUL JUNGSEONG ARAEA-U;Lo;0;L;;;;;N;;;;; +11A1;HANGUL JUNGSEONG ARAEA-I;Lo;0;L;;;;;N;;;;; +11A2;HANGUL JUNGSEONG SSANGARAEA;Lo;0;L;;;;;N;;;;; +11A3;HANGUL JUNGSEONG A-EU;Lo;0;L;;;;;N;;;;; +11A4;HANGUL JUNGSEONG YA-U;Lo;0;L;;;;;N;;;;; +11A5;HANGUL JUNGSEONG YEO-YA;Lo;0;L;;;;;N;;;;; +11A6;HANGUL JUNGSEONG O-YA;Lo;0;L;;;;;N;;;;; +11A7;HANGUL JUNGSEONG O-YAE;Lo;0;L;;;;;N;;;;; +11A8;HANGUL JONGSEONG KIYEOK;Lo;0;L;;;;;N;;;;; +11A9;HANGUL JONGSEONG SSANGKIYEOK;Lo;0;L;;;;;N;;;;; +11AA;HANGUL JONGSEONG KIYEOK-SIOS;Lo;0;L;;;;;N;;;;; +11AB;HANGUL JONGSEONG NIEUN;Lo;0;L;;;;;N;;;;; +11AC;HANGUL JONGSEONG NIEUN-CIEUC;Lo;0;L;;;;;N;;;;; +11AD;HANGUL JONGSEONG NIEUN-HIEUH;Lo;0;L;;;;;N;;;;; +11AE;HANGUL JONGSEONG TIKEUT;Lo;0;L;;;;;N;;;;; +11AF;HANGUL JONGSEONG RIEUL;Lo;0;L;;;;;N;;;;; +11B0;HANGUL JONGSEONG RIEUL-KIYEOK;Lo;0;L;;;;;N;;;;; +11B1;HANGUL JONGSEONG RIEUL-MIEUM;Lo;0;L;;;;;N;;;;; +11B2;HANGUL JONGSEONG RIEUL-PIEUP;Lo;0;L;;;;;N;;;;; +11B3;HANGUL JONGSEONG RIEUL-SIOS;Lo;0;L;;;;;N;;;;; +11B4;HANGUL JONGSEONG RIEUL-THIEUTH;Lo;0;L;;;;;N;;;;; +11B5;HANGUL JONGSEONG RIEUL-PHIEUPH;Lo;0;L;;;;;N;;;;; +11B6;HANGUL JONGSEONG RIEUL-HIEUH;Lo;0;L;;;;;N;;;;; +11B7;HANGUL JONGSEONG MIEUM;Lo;0;L;;;;;N;;;;; +11B8;HANGUL JONGSEONG PIEUP;Lo;0;L;;;;;N;;;;; +11B9;HANGUL JONGSEONG PIEUP-SIOS;Lo;0;L;;;;;N;;;;; +11BA;HANGUL JONGSEONG SIOS;Lo;0;L;;;;;N;;;;; +11BB;HANGUL JONGSEONG SSANGSIOS;Lo;0;L;;;;;N;;;;; +11BC;HANGUL JONGSEONG IEUNG;Lo;0;L;;;;;N;;;;; +11BD;HANGUL JONGSEONG CIEUC;Lo;0;L;;;;;N;;;;; +11BE;HANGUL JONGSEONG CHIEUCH;Lo;0;L;;;;;N;;;;; +11BF;HANGUL JONGSEONG KHIEUKH;Lo;0;L;;;;;N;;;;; +11C0;HANGUL JONGSEONG THIEUTH;Lo;0;L;;;;;N;;;;; +11C1;HANGUL JONGSEONG PHIEUPH;Lo;0;L;;;;;N;;;;; +11C2;HANGUL JONGSEONG HIEUH;Lo;0;L;;;;;N;;;;; +11C3;HANGUL JONGSEONG KIYEOK-RIEUL;Lo;0;L;;;;;N;;;;; +11C4;HANGUL JONGSEONG KIYEOK-SIOS-KIYEOK;Lo;0;L;;;;;N;;;;; +11C5;HANGUL JONGSEONG NIEUN-KIYEOK;Lo;0;L;;;;;N;;;;; +11C6;HANGUL JONGSEONG NIEUN-TIKEUT;Lo;0;L;;;;;N;;;;; +11C7;HANGUL JONGSEONG NIEUN-SIOS;Lo;0;L;;;;;N;;;;; +11C8;HANGUL JONGSEONG NIEUN-PANSIOS;Lo;0;L;;;;;N;;;;; +11C9;HANGUL JONGSEONG NIEUN-THIEUTH;Lo;0;L;;;;;N;;;;; +11CA;HANGUL JONGSEONG TIKEUT-KIYEOK;Lo;0;L;;;;;N;;;;; +11CB;HANGUL JONGSEONG TIKEUT-RIEUL;Lo;0;L;;;;;N;;;;; +11CC;HANGUL JONGSEONG RIEUL-KIYEOK-SIOS;Lo;0;L;;;;;N;;;;; +11CD;HANGUL JONGSEONG RIEUL-NIEUN;Lo;0;L;;;;;N;;;;; +11CE;HANGUL JONGSEONG RIEUL-TIKEUT;Lo;0;L;;;;;N;;;;; +11CF;HANGUL JONGSEONG RIEUL-TIKEUT-HIEUH;Lo;0;L;;;;;N;;;;; +11D0;HANGUL JONGSEONG SSANGRIEUL;Lo;0;L;;;;;N;;;;; +11D1;HANGUL JONGSEONG RIEUL-MIEUM-KIYEOK;Lo;0;L;;;;;N;;;;; +11D2;HANGUL JONGSEONG RIEUL-MIEUM-SIOS;Lo;0;L;;;;;N;;;;; +11D3;HANGUL JONGSEONG RIEUL-PIEUP-SIOS;Lo;0;L;;;;;N;;;;; +11D4;HANGUL JONGSEONG RIEUL-PIEUP-HIEUH;Lo;0;L;;;;;N;;;;; +11D5;HANGUL JONGSEONG RIEUL-KAPYEOUNPIEUP;Lo;0;L;;;;;N;;;;; +11D6;HANGUL JONGSEONG RIEUL-SSANGSIOS;Lo;0;L;;;;;N;;;;; +11D7;HANGUL JONGSEONG RIEUL-PANSIOS;Lo;0;L;;;;;N;;;;; +11D8;HANGUL JONGSEONG RIEUL-KHIEUKH;Lo;0;L;;;;;N;;;;; +11D9;HANGUL JONGSEONG RIEUL-YEORINHIEUH;Lo;0;L;;;;;N;;;;; +11DA;HANGUL JONGSEONG MIEUM-KIYEOK;Lo;0;L;;;;;N;;;;; +11DB;HANGUL JONGSEONG MIEUM-RIEUL;Lo;0;L;;;;;N;;;;; +11DC;HANGUL JONGSEONG MIEUM-PIEUP;Lo;0;L;;;;;N;;;;; +11DD;HANGUL JONGSEONG MIEUM-SIOS;Lo;0;L;;;;;N;;;;; +11DE;HANGUL JONGSEONG MIEUM-SSANGSIOS;Lo;0;L;;;;;N;;;;; +11DF;HANGUL JONGSEONG MIEUM-PANSIOS;Lo;0;L;;;;;N;;;;; +11E0;HANGUL JONGSEONG MIEUM-CHIEUCH;Lo;0;L;;;;;N;;;;; +11E1;HANGUL JONGSEONG MIEUM-HIEUH;Lo;0;L;;;;;N;;;;; +11E2;HANGUL JONGSEONG KAPYEOUNMIEUM;Lo;0;L;;;;;N;;;;; +11E3;HANGUL JONGSEONG PIEUP-RIEUL;Lo;0;L;;;;;N;;;;; +11E4;HANGUL JONGSEONG PIEUP-PHIEUPH;Lo;0;L;;;;;N;;;;; +11E5;HANGUL JONGSEONG PIEUP-HIEUH;Lo;0;L;;;;;N;;;;; +11E6;HANGUL JONGSEONG KAPYEOUNPIEUP;Lo;0;L;;;;;N;;;;; +11E7;HANGUL JONGSEONG SIOS-KIYEOK;Lo;0;L;;;;;N;;;;; +11E8;HANGUL JONGSEONG SIOS-TIKEUT;Lo;0;L;;;;;N;;;;; +11E9;HANGUL JONGSEONG SIOS-RIEUL;Lo;0;L;;;;;N;;;;; +11EA;HANGUL JONGSEONG SIOS-PIEUP;Lo;0;L;;;;;N;;;;; +11EB;HANGUL JONGSEONG PANSIOS;Lo;0;L;;;;;N;;;;; +11EC;HANGUL JONGSEONG IEUNG-KIYEOK;Lo;0;L;;;;;N;;;;; +11ED;HANGUL JONGSEONG IEUNG-SSANGKIYEOK;Lo;0;L;;;;;N;;;;; +11EE;HANGUL JONGSEONG SSANGIEUNG;Lo;0;L;;;;;N;;;;; +11EF;HANGUL JONGSEONG IEUNG-KHIEUKH;Lo;0;L;;;;;N;;;;; +11F0;HANGUL JONGSEONG YESIEUNG;Lo;0;L;;;;;N;;;;; +11F1;HANGUL JONGSEONG YESIEUNG-SIOS;Lo;0;L;;;;;N;;;;; +11F2;HANGUL JONGSEONG YESIEUNG-PANSIOS;Lo;0;L;;;;;N;;;;; +11F3;HANGUL JONGSEONG PHIEUPH-PIEUP;Lo;0;L;;;;;N;;;;; +11F4;HANGUL JONGSEONG KAPYEOUNPHIEUPH;Lo;0;L;;;;;N;;;;; +11F5;HANGUL JONGSEONG HIEUH-NIEUN;Lo;0;L;;;;;N;;;;; +11F6;HANGUL JONGSEONG HIEUH-RIEUL;Lo;0;L;;;;;N;;;;; +11F7;HANGUL JONGSEONG HIEUH-MIEUM;Lo;0;L;;;;;N;;;;; +11F8;HANGUL JONGSEONG HIEUH-PIEUP;Lo;0;L;;;;;N;;;;; +11F9;HANGUL JONGSEONG YEORINHIEUH;Lo;0;L;;;;;N;;;;; +11FA;HANGUL JONGSEONG KIYEOK-NIEUN;Lo;0;L;;;;;N;;;;; +11FB;HANGUL JONGSEONG KIYEOK-PIEUP;Lo;0;L;;;;;N;;;;; +11FC;HANGUL JONGSEONG KIYEOK-CHIEUCH;Lo;0;L;;;;;N;;;;; +11FD;HANGUL JONGSEONG KIYEOK-KHIEUKH;Lo;0;L;;;;;N;;;;; +11FE;HANGUL JONGSEONG KIYEOK-HIEUH;Lo;0;L;;;;;N;;;;; +11FF;HANGUL JONGSEONG SSANGNIEUN;Lo;0;L;;;;;N;;;;; +1200;ETHIOPIC SYLLABLE HA;Lo;0;L;;;;;N;;;;; +1201;ETHIOPIC SYLLABLE HU;Lo;0;L;;;;;N;;;;; +1202;ETHIOPIC SYLLABLE HI;Lo;0;L;;;;;N;;;;; +1203;ETHIOPIC SYLLABLE HAA;Lo;0;L;;;;;N;;;;; +1204;ETHIOPIC SYLLABLE HEE;Lo;0;L;;;;;N;;;;; +1205;ETHIOPIC SYLLABLE HE;Lo;0;L;;;;;N;;;;; +1206;ETHIOPIC SYLLABLE HO;Lo;0;L;;;;;N;;;;; +1207;ETHIOPIC SYLLABLE HOA;Lo;0;L;;;;;N;;;;; +1208;ETHIOPIC SYLLABLE LA;Lo;0;L;;;;;N;;;;; +1209;ETHIOPIC SYLLABLE LU;Lo;0;L;;;;;N;;;;; +120A;ETHIOPIC SYLLABLE LI;Lo;0;L;;;;;N;;;;; +120B;ETHIOPIC SYLLABLE LAA;Lo;0;L;;;;;N;;;;; +120C;ETHIOPIC SYLLABLE LEE;Lo;0;L;;;;;N;;;;; +120D;ETHIOPIC SYLLABLE LE;Lo;0;L;;;;;N;;;;; +120E;ETHIOPIC SYLLABLE LO;Lo;0;L;;;;;N;;;;; +120F;ETHIOPIC SYLLABLE LWA;Lo;0;L;;;;;N;;;;; +1210;ETHIOPIC SYLLABLE HHA;Lo;0;L;;;;;N;;;;; +1211;ETHIOPIC SYLLABLE HHU;Lo;0;L;;;;;N;;;;; +1212;ETHIOPIC SYLLABLE HHI;Lo;0;L;;;;;N;;;;; +1213;ETHIOPIC SYLLABLE HHAA;Lo;0;L;;;;;N;;;;; +1214;ETHIOPIC SYLLABLE HHEE;Lo;0;L;;;;;N;;;;; +1215;ETHIOPIC SYLLABLE HHE;Lo;0;L;;;;;N;;;;; +1216;ETHIOPIC SYLLABLE HHO;Lo;0;L;;;;;N;;;;; +1217;ETHIOPIC SYLLABLE HHWA;Lo;0;L;;;;;N;;;;; +1218;ETHIOPIC SYLLABLE MA;Lo;0;L;;;;;N;;;;; +1219;ETHIOPIC SYLLABLE MU;Lo;0;L;;;;;N;;;;; +121A;ETHIOPIC SYLLABLE MI;Lo;0;L;;;;;N;;;;; +121B;ETHIOPIC SYLLABLE MAA;Lo;0;L;;;;;N;;;;; +121C;ETHIOPIC SYLLABLE MEE;Lo;0;L;;;;;N;;;;; +121D;ETHIOPIC SYLLABLE ME;Lo;0;L;;;;;N;;;;; +121E;ETHIOPIC SYLLABLE MO;Lo;0;L;;;;;N;;;;; +121F;ETHIOPIC SYLLABLE MWA;Lo;0;L;;;;;N;;;;; +1220;ETHIOPIC SYLLABLE SZA;Lo;0;L;;;;;N;;;;; +1221;ETHIOPIC SYLLABLE SZU;Lo;0;L;;;;;N;;;;; +1222;ETHIOPIC SYLLABLE SZI;Lo;0;L;;;;;N;;;;; +1223;ETHIOPIC SYLLABLE SZAA;Lo;0;L;;;;;N;;;;; +1224;ETHIOPIC SYLLABLE SZEE;Lo;0;L;;;;;N;;;;; +1225;ETHIOPIC SYLLABLE SZE;Lo;0;L;;;;;N;;;;; +1226;ETHIOPIC SYLLABLE SZO;Lo;0;L;;;;;N;;;;; +1227;ETHIOPIC SYLLABLE SZWA;Lo;0;L;;;;;N;;;;; +1228;ETHIOPIC SYLLABLE RA;Lo;0;L;;;;;N;;;;; +1229;ETHIOPIC SYLLABLE RU;Lo;0;L;;;;;N;;;;; +122A;ETHIOPIC SYLLABLE RI;Lo;0;L;;;;;N;;;;; +122B;ETHIOPIC SYLLABLE RAA;Lo;0;L;;;;;N;;;;; +122C;ETHIOPIC SYLLABLE REE;Lo;0;L;;;;;N;;;;; +122D;ETHIOPIC SYLLABLE RE;Lo;0;L;;;;;N;;;;; +122E;ETHIOPIC SYLLABLE RO;Lo;0;L;;;;;N;;;;; +122F;ETHIOPIC SYLLABLE RWA;Lo;0;L;;;;;N;;;;; +1230;ETHIOPIC SYLLABLE SA;Lo;0;L;;;;;N;;;;; +1231;ETHIOPIC SYLLABLE SU;Lo;0;L;;;;;N;;;;; +1232;ETHIOPIC SYLLABLE SI;Lo;0;L;;;;;N;;;;; +1233;ETHIOPIC SYLLABLE SAA;Lo;0;L;;;;;N;;;;; +1234;ETHIOPIC SYLLABLE SEE;Lo;0;L;;;;;N;;;;; +1235;ETHIOPIC SYLLABLE SE;Lo;0;L;;;;;N;;;;; +1236;ETHIOPIC SYLLABLE SO;Lo;0;L;;;;;N;;;;; +1237;ETHIOPIC SYLLABLE SWA;Lo;0;L;;;;;N;;;;; +1238;ETHIOPIC SYLLABLE SHA;Lo;0;L;;;;;N;;;;; +1239;ETHIOPIC SYLLABLE SHU;Lo;0;L;;;;;N;;;;; +123A;ETHIOPIC SYLLABLE SHI;Lo;0;L;;;;;N;;;;; +123B;ETHIOPIC SYLLABLE SHAA;Lo;0;L;;;;;N;;;;; +123C;ETHIOPIC SYLLABLE SHEE;Lo;0;L;;;;;N;;;;; +123D;ETHIOPIC SYLLABLE SHE;Lo;0;L;;;;;N;;;;; +123E;ETHIOPIC SYLLABLE SHO;Lo;0;L;;;;;N;;;;; +123F;ETHIOPIC SYLLABLE SHWA;Lo;0;L;;;;;N;;;;; +1240;ETHIOPIC SYLLABLE QA;Lo;0;L;;;;;N;;;;; +1241;ETHIOPIC SYLLABLE QU;Lo;0;L;;;;;N;;;;; +1242;ETHIOPIC SYLLABLE QI;Lo;0;L;;;;;N;;;;; +1243;ETHIOPIC SYLLABLE QAA;Lo;0;L;;;;;N;;;;; +1244;ETHIOPIC SYLLABLE QEE;Lo;0;L;;;;;N;;;;; +1245;ETHIOPIC SYLLABLE QE;Lo;0;L;;;;;N;;;;; +1246;ETHIOPIC SYLLABLE QO;Lo;0;L;;;;;N;;;;; +1247;ETHIOPIC SYLLABLE QOA;Lo;0;L;;;;;N;;;;; +1248;ETHIOPIC SYLLABLE QWA;Lo;0;L;;;;;N;;;;; +124A;ETHIOPIC SYLLABLE QWI;Lo;0;L;;;;;N;;;;; +124B;ETHIOPIC SYLLABLE QWAA;Lo;0;L;;;;;N;;;;; +124C;ETHIOPIC SYLLABLE QWEE;Lo;0;L;;;;;N;;;;; +124D;ETHIOPIC SYLLABLE QWE;Lo;0;L;;;;;N;;;;; +1250;ETHIOPIC SYLLABLE QHA;Lo;0;L;;;;;N;;;;; +1251;ETHIOPIC SYLLABLE QHU;Lo;0;L;;;;;N;;;;; +1252;ETHIOPIC SYLLABLE QHI;Lo;0;L;;;;;N;;;;; +1253;ETHIOPIC SYLLABLE QHAA;Lo;0;L;;;;;N;;;;; +1254;ETHIOPIC SYLLABLE QHEE;Lo;0;L;;;;;N;;;;; +1255;ETHIOPIC SYLLABLE QHE;Lo;0;L;;;;;N;;;;; +1256;ETHIOPIC SYLLABLE QHO;Lo;0;L;;;;;N;;;;; +1258;ETHIOPIC SYLLABLE QHWA;Lo;0;L;;;;;N;;;;; +125A;ETHIOPIC SYLLABLE QHWI;Lo;0;L;;;;;N;;;;; +125B;ETHIOPIC SYLLABLE QHWAA;Lo;0;L;;;;;N;;;;; +125C;ETHIOPIC SYLLABLE QHWEE;Lo;0;L;;;;;N;;;;; +125D;ETHIOPIC SYLLABLE QHWE;Lo;0;L;;;;;N;;;;; +1260;ETHIOPIC SYLLABLE BA;Lo;0;L;;;;;N;;;;; +1261;ETHIOPIC SYLLABLE BU;Lo;0;L;;;;;N;;;;; +1262;ETHIOPIC SYLLABLE BI;Lo;0;L;;;;;N;;;;; +1263;ETHIOPIC SYLLABLE BAA;Lo;0;L;;;;;N;;;;; +1264;ETHIOPIC SYLLABLE BEE;Lo;0;L;;;;;N;;;;; +1265;ETHIOPIC SYLLABLE BE;Lo;0;L;;;;;N;;;;; +1266;ETHIOPIC SYLLABLE BO;Lo;0;L;;;;;N;;;;; +1267;ETHIOPIC SYLLABLE BWA;Lo;0;L;;;;;N;;;;; +1268;ETHIOPIC SYLLABLE VA;Lo;0;L;;;;;N;;;;; +1269;ETHIOPIC SYLLABLE VU;Lo;0;L;;;;;N;;;;; +126A;ETHIOPIC SYLLABLE VI;Lo;0;L;;;;;N;;;;; +126B;ETHIOPIC SYLLABLE VAA;Lo;0;L;;;;;N;;;;; +126C;ETHIOPIC SYLLABLE VEE;Lo;0;L;;;;;N;;;;; +126D;ETHIOPIC SYLLABLE VE;Lo;0;L;;;;;N;;;;; +126E;ETHIOPIC SYLLABLE VO;Lo;0;L;;;;;N;;;;; +126F;ETHIOPIC SYLLABLE VWA;Lo;0;L;;;;;N;;;;; +1270;ETHIOPIC SYLLABLE TA;Lo;0;L;;;;;N;;;;; +1271;ETHIOPIC SYLLABLE TU;Lo;0;L;;;;;N;;;;; +1272;ETHIOPIC SYLLABLE TI;Lo;0;L;;;;;N;;;;; +1273;ETHIOPIC SYLLABLE TAA;Lo;0;L;;;;;N;;;;; +1274;ETHIOPIC SYLLABLE TEE;Lo;0;L;;;;;N;;;;; +1275;ETHIOPIC SYLLABLE TE;Lo;0;L;;;;;N;;;;; +1276;ETHIOPIC SYLLABLE TO;Lo;0;L;;;;;N;;;;; +1277;ETHIOPIC SYLLABLE TWA;Lo;0;L;;;;;N;;;;; +1278;ETHIOPIC SYLLABLE CA;Lo;0;L;;;;;N;;;;; +1279;ETHIOPIC SYLLABLE CU;Lo;0;L;;;;;N;;;;; +127A;ETHIOPIC SYLLABLE CI;Lo;0;L;;;;;N;;;;; +127B;ETHIOPIC SYLLABLE CAA;Lo;0;L;;;;;N;;;;; +127C;ETHIOPIC SYLLABLE CEE;Lo;0;L;;;;;N;;;;; +127D;ETHIOPIC SYLLABLE CE;Lo;0;L;;;;;N;;;;; +127E;ETHIOPIC SYLLABLE CO;Lo;0;L;;;;;N;;;;; +127F;ETHIOPIC SYLLABLE CWA;Lo;0;L;;;;;N;;;;; +1280;ETHIOPIC SYLLABLE XA;Lo;0;L;;;;;N;;;;; +1281;ETHIOPIC SYLLABLE XU;Lo;0;L;;;;;N;;;;; +1282;ETHIOPIC SYLLABLE XI;Lo;0;L;;;;;N;;;;; +1283;ETHIOPIC SYLLABLE XAA;Lo;0;L;;;;;N;;;;; +1284;ETHIOPIC SYLLABLE XEE;Lo;0;L;;;;;N;;;;; +1285;ETHIOPIC SYLLABLE XE;Lo;0;L;;;;;N;;;;; +1286;ETHIOPIC SYLLABLE XO;Lo;0;L;;;;;N;;;;; +1287;ETHIOPIC SYLLABLE XOA;Lo;0;L;;;;;N;;;;; +1288;ETHIOPIC SYLLABLE XWA;Lo;0;L;;;;;N;;;;; +128A;ETHIOPIC SYLLABLE XWI;Lo;0;L;;;;;N;;;;; +128B;ETHIOPIC SYLLABLE XWAA;Lo;0;L;;;;;N;;;;; +128C;ETHIOPIC SYLLABLE XWEE;Lo;0;L;;;;;N;;;;; +128D;ETHIOPIC SYLLABLE XWE;Lo;0;L;;;;;N;;;;; +1290;ETHIOPIC SYLLABLE NA;Lo;0;L;;;;;N;;;;; +1291;ETHIOPIC SYLLABLE NU;Lo;0;L;;;;;N;;;;; +1292;ETHIOPIC SYLLABLE NI;Lo;0;L;;;;;N;;;;; +1293;ETHIOPIC SYLLABLE NAA;Lo;0;L;;;;;N;;;;; +1294;ETHIOPIC SYLLABLE NEE;Lo;0;L;;;;;N;;;;; +1295;ETHIOPIC SYLLABLE NE;Lo;0;L;;;;;N;;;;; +1296;ETHIOPIC SYLLABLE NO;Lo;0;L;;;;;N;;;;; +1297;ETHIOPIC SYLLABLE NWA;Lo;0;L;;;;;N;;;;; +1298;ETHIOPIC SYLLABLE NYA;Lo;0;L;;;;;N;;;;; +1299;ETHIOPIC SYLLABLE NYU;Lo;0;L;;;;;N;;;;; +129A;ETHIOPIC SYLLABLE NYI;Lo;0;L;;;;;N;;;;; +129B;ETHIOPIC SYLLABLE NYAA;Lo;0;L;;;;;N;;;;; +129C;ETHIOPIC SYLLABLE NYEE;Lo;0;L;;;;;N;;;;; +129D;ETHIOPIC SYLLABLE NYE;Lo;0;L;;;;;N;;;;; +129E;ETHIOPIC SYLLABLE NYO;Lo;0;L;;;;;N;;;;; +129F;ETHIOPIC SYLLABLE NYWA;Lo;0;L;;;;;N;;;;; +12A0;ETHIOPIC SYLLABLE GLOTTAL A;Lo;0;L;;;;;N;;;;; +12A1;ETHIOPIC SYLLABLE GLOTTAL U;Lo;0;L;;;;;N;;;;; +12A2;ETHIOPIC SYLLABLE GLOTTAL I;Lo;0;L;;;;;N;;;;; +12A3;ETHIOPIC SYLLABLE GLOTTAL AA;Lo;0;L;;;;;N;;;;; +12A4;ETHIOPIC SYLLABLE GLOTTAL EE;Lo;0;L;;;;;N;;;;; +12A5;ETHIOPIC SYLLABLE GLOTTAL E;Lo;0;L;;;;;N;;;;; +12A6;ETHIOPIC SYLLABLE GLOTTAL O;Lo;0;L;;;;;N;;;;; +12A7;ETHIOPIC SYLLABLE GLOTTAL WA;Lo;0;L;;;;;N;;;;; +12A8;ETHIOPIC SYLLABLE KA;Lo;0;L;;;;;N;;;;; +12A9;ETHIOPIC SYLLABLE KU;Lo;0;L;;;;;N;;;;; +12AA;ETHIOPIC SYLLABLE KI;Lo;0;L;;;;;N;;;;; +12AB;ETHIOPIC SYLLABLE KAA;Lo;0;L;;;;;N;;;;; +12AC;ETHIOPIC SYLLABLE KEE;Lo;0;L;;;;;N;;;;; +12AD;ETHIOPIC SYLLABLE KE;Lo;0;L;;;;;N;;;;; +12AE;ETHIOPIC SYLLABLE KO;Lo;0;L;;;;;N;;;;; +12AF;ETHIOPIC SYLLABLE KOA;Lo;0;L;;;;;N;;;;; +12B0;ETHIOPIC SYLLABLE KWA;Lo;0;L;;;;;N;;;;; +12B2;ETHIOPIC SYLLABLE KWI;Lo;0;L;;;;;N;;;;; +12B3;ETHIOPIC SYLLABLE KWAA;Lo;0;L;;;;;N;;;;; +12B4;ETHIOPIC SYLLABLE KWEE;Lo;0;L;;;;;N;;;;; +12B5;ETHIOPIC SYLLABLE KWE;Lo;0;L;;;;;N;;;;; +12B8;ETHIOPIC SYLLABLE KXA;Lo;0;L;;;;;N;;;;; +12B9;ETHIOPIC SYLLABLE KXU;Lo;0;L;;;;;N;;;;; +12BA;ETHIOPIC SYLLABLE KXI;Lo;0;L;;;;;N;;;;; +12BB;ETHIOPIC SYLLABLE KXAA;Lo;0;L;;;;;N;;;;; +12BC;ETHIOPIC SYLLABLE KXEE;Lo;0;L;;;;;N;;;;; +12BD;ETHIOPIC SYLLABLE KXE;Lo;0;L;;;;;N;;;;; +12BE;ETHIOPIC SYLLABLE KXO;Lo;0;L;;;;;N;;;;; +12C0;ETHIOPIC SYLLABLE KXWA;Lo;0;L;;;;;N;;;;; +12C2;ETHIOPIC SYLLABLE KXWI;Lo;0;L;;;;;N;;;;; +12C3;ETHIOPIC SYLLABLE KXWAA;Lo;0;L;;;;;N;;;;; +12C4;ETHIOPIC SYLLABLE KXWEE;Lo;0;L;;;;;N;;;;; +12C5;ETHIOPIC SYLLABLE KXWE;Lo;0;L;;;;;N;;;;; +12C8;ETHIOPIC SYLLABLE WA;Lo;0;L;;;;;N;;;;; +12C9;ETHIOPIC SYLLABLE WU;Lo;0;L;;;;;N;;;;; +12CA;ETHIOPIC SYLLABLE WI;Lo;0;L;;;;;N;;;;; +12CB;ETHIOPIC SYLLABLE WAA;Lo;0;L;;;;;N;;;;; +12CC;ETHIOPIC SYLLABLE WEE;Lo;0;L;;;;;N;;;;; +12CD;ETHIOPIC SYLLABLE WE;Lo;0;L;;;;;N;;;;; +12CE;ETHIOPIC SYLLABLE WO;Lo;0;L;;;;;N;;;;; +12CF;ETHIOPIC SYLLABLE WOA;Lo;0;L;;;;;N;;;;; +12D0;ETHIOPIC SYLLABLE PHARYNGEAL A;Lo;0;L;;;;;N;;;;; +12D1;ETHIOPIC SYLLABLE PHARYNGEAL U;Lo;0;L;;;;;N;;;;; +12D2;ETHIOPIC SYLLABLE PHARYNGEAL I;Lo;0;L;;;;;N;;;;; +12D3;ETHIOPIC SYLLABLE PHARYNGEAL AA;Lo;0;L;;;;;N;;;;; +12D4;ETHIOPIC SYLLABLE PHARYNGEAL EE;Lo;0;L;;;;;N;;;;; +12D5;ETHIOPIC SYLLABLE PHARYNGEAL E;Lo;0;L;;;;;N;;;;; +12D6;ETHIOPIC SYLLABLE PHARYNGEAL O;Lo;0;L;;;;;N;;;;; +12D8;ETHIOPIC SYLLABLE ZA;Lo;0;L;;;;;N;;;;; +12D9;ETHIOPIC SYLLABLE ZU;Lo;0;L;;;;;N;;;;; +12DA;ETHIOPIC SYLLABLE ZI;Lo;0;L;;;;;N;;;;; +12DB;ETHIOPIC SYLLABLE ZAA;Lo;0;L;;;;;N;;;;; +12DC;ETHIOPIC SYLLABLE ZEE;Lo;0;L;;;;;N;;;;; +12DD;ETHIOPIC SYLLABLE ZE;Lo;0;L;;;;;N;;;;; +12DE;ETHIOPIC SYLLABLE ZO;Lo;0;L;;;;;N;;;;; +12DF;ETHIOPIC SYLLABLE ZWA;Lo;0;L;;;;;N;;;;; +12E0;ETHIOPIC SYLLABLE ZHA;Lo;0;L;;;;;N;;;;; +12E1;ETHIOPIC SYLLABLE ZHU;Lo;0;L;;;;;N;;;;; +12E2;ETHIOPIC SYLLABLE ZHI;Lo;0;L;;;;;N;;;;; +12E3;ETHIOPIC SYLLABLE ZHAA;Lo;0;L;;;;;N;;;;; +12E4;ETHIOPIC SYLLABLE ZHEE;Lo;0;L;;;;;N;;;;; +12E5;ETHIOPIC SYLLABLE ZHE;Lo;0;L;;;;;N;;;;; +12E6;ETHIOPIC SYLLABLE ZHO;Lo;0;L;;;;;N;;;;; +12E7;ETHIOPIC SYLLABLE ZHWA;Lo;0;L;;;;;N;;;;; +12E8;ETHIOPIC SYLLABLE YA;Lo;0;L;;;;;N;;;;; +12E9;ETHIOPIC SYLLABLE YU;Lo;0;L;;;;;N;;;;; +12EA;ETHIOPIC SYLLABLE YI;Lo;0;L;;;;;N;;;;; +12EB;ETHIOPIC SYLLABLE YAA;Lo;0;L;;;;;N;;;;; +12EC;ETHIOPIC SYLLABLE YEE;Lo;0;L;;;;;N;;;;; +12ED;ETHIOPIC SYLLABLE YE;Lo;0;L;;;;;N;;;;; +12EE;ETHIOPIC SYLLABLE YO;Lo;0;L;;;;;N;;;;; +12EF;ETHIOPIC SYLLABLE YOA;Lo;0;L;;;;;N;;;;; +12F0;ETHIOPIC SYLLABLE DA;Lo;0;L;;;;;N;;;;; +12F1;ETHIOPIC SYLLABLE DU;Lo;0;L;;;;;N;;;;; +12F2;ETHIOPIC SYLLABLE DI;Lo;0;L;;;;;N;;;;; +12F3;ETHIOPIC SYLLABLE DAA;Lo;0;L;;;;;N;;;;; +12F4;ETHIOPIC SYLLABLE DEE;Lo;0;L;;;;;N;;;;; +12F5;ETHIOPIC SYLLABLE DE;Lo;0;L;;;;;N;;;;; +12F6;ETHIOPIC SYLLABLE DO;Lo;0;L;;;;;N;;;;; +12F7;ETHIOPIC SYLLABLE DWA;Lo;0;L;;;;;N;;;;; +12F8;ETHIOPIC SYLLABLE DDA;Lo;0;L;;;;;N;;;;; +12F9;ETHIOPIC SYLLABLE DDU;Lo;0;L;;;;;N;;;;; +12FA;ETHIOPIC SYLLABLE DDI;Lo;0;L;;;;;N;;;;; +12FB;ETHIOPIC SYLLABLE DDAA;Lo;0;L;;;;;N;;;;; +12FC;ETHIOPIC SYLLABLE DDEE;Lo;0;L;;;;;N;;;;; +12FD;ETHIOPIC SYLLABLE DDE;Lo;0;L;;;;;N;;;;; +12FE;ETHIOPIC SYLLABLE DDO;Lo;0;L;;;;;N;;;;; +12FF;ETHIOPIC SYLLABLE DDWA;Lo;0;L;;;;;N;;;;; +1300;ETHIOPIC SYLLABLE JA;Lo;0;L;;;;;N;;;;; +1301;ETHIOPIC SYLLABLE JU;Lo;0;L;;;;;N;;;;; +1302;ETHIOPIC SYLLABLE JI;Lo;0;L;;;;;N;;;;; +1303;ETHIOPIC SYLLABLE JAA;Lo;0;L;;;;;N;;;;; +1304;ETHIOPIC SYLLABLE JEE;Lo;0;L;;;;;N;;;;; +1305;ETHIOPIC SYLLABLE JE;Lo;0;L;;;;;N;;;;; +1306;ETHIOPIC SYLLABLE JO;Lo;0;L;;;;;N;;;;; +1307;ETHIOPIC SYLLABLE JWA;Lo;0;L;;;;;N;;;;; +1308;ETHIOPIC SYLLABLE GA;Lo;0;L;;;;;N;;;;; +1309;ETHIOPIC SYLLABLE GU;Lo;0;L;;;;;N;;;;; +130A;ETHIOPIC SYLLABLE GI;Lo;0;L;;;;;N;;;;; +130B;ETHIOPIC SYLLABLE GAA;Lo;0;L;;;;;N;;;;; +130C;ETHIOPIC SYLLABLE GEE;Lo;0;L;;;;;N;;;;; +130D;ETHIOPIC SYLLABLE GE;Lo;0;L;;;;;N;;;;; +130E;ETHIOPIC SYLLABLE GO;Lo;0;L;;;;;N;;;;; +130F;ETHIOPIC SYLLABLE GOA;Lo;0;L;;;;;N;;;;; +1310;ETHIOPIC SYLLABLE GWA;Lo;0;L;;;;;N;;;;; +1312;ETHIOPIC SYLLABLE GWI;Lo;0;L;;;;;N;;;;; +1313;ETHIOPIC SYLLABLE GWAA;Lo;0;L;;;;;N;;;;; +1314;ETHIOPIC SYLLABLE GWEE;Lo;0;L;;;;;N;;;;; +1315;ETHIOPIC SYLLABLE GWE;Lo;0;L;;;;;N;;;;; +1318;ETHIOPIC SYLLABLE GGA;Lo;0;L;;;;;N;;;;; +1319;ETHIOPIC SYLLABLE GGU;Lo;0;L;;;;;N;;;;; +131A;ETHIOPIC SYLLABLE GGI;Lo;0;L;;;;;N;;;;; +131B;ETHIOPIC SYLLABLE GGAA;Lo;0;L;;;;;N;;;;; +131C;ETHIOPIC SYLLABLE GGEE;Lo;0;L;;;;;N;;;;; +131D;ETHIOPIC SYLLABLE GGE;Lo;0;L;;;;;N;;;;; +131E;ETHIOPIC SYLLABLE GGO;Lo;0;L;;;;;N;;;;; +131F;ETHIOPIC SYLLABLE GGWAA;Lo;0;L;;;;;N;;;;; +1320;ETHIOPIC SYLLABLE THA;Lo;0;L;;;;;N;;;;; +1321;ETHIOPIC SYLLABLE THU;Lo;0;L;;;;;N;;;;; +1322;ETHIOPIC SYLLABLE THI;Lo;0;L;;;;;N;;;;; +1323;ETHIOPIC SYLLABLE THAA;Lo;0;L;;;;;N;;;;; +1324;ETHIOPIC SYLLABLE THEE;Lo;0;L;;;;;N;;;;; +1325;ETHIOPIC SYLLABLE THE;Lo;0;L;;;;;N;;;;; +1326;ETHIOPIC SYLLABLE THO;Lo;0;L;;;;;N;;;;; +1327;ETHIOPIC SYLLABLE THWA;Lo;0;L;;;;;N;;;;; +1328;ETHIOPIC SYLLABLE CHA;Lo;0;L;;;;;N;;;;; +1329;ETHIOPIC SYLLABLE CHU;Lo;0;L;;;;;N;;;;; +132A;ETHIOPIC SYLLABLE CHI;Lo;0;L;;;;;N;;;;; +132B;ETHIOPIC SYLLABLE CHAA;Lo;0;L;;;;;N;;;;; +132C;ETHIOPIC SYLLABLE CHEE;Lo;0;L;;;;;N;;;;; +132D;ETHIOPIC SYLLABLE CHE;Lo;0;L;;;;;N;;;;; +132E;ETHIOPIC SYLLABLE CHO;Lo;0;L;;;;;N;;;;; +132F;ETHIOPIC SYLLABLE CHWA;Lo;0;L;;;;;N;;;;; +1330;ETHIOPIC SYLLABLE PHA;Lo;0;L;;;;;N;;;;; +1331;ETHIOPIC SYLLABLE PHU;Lo;0;L;;;;;N;;;;; +1332;ETHIOPIC SYLLABLE PHI;Lo;0;L;;;;;N;;;;; +1333;ETHIOPIC SYLLABLE PHAA;Lo;0;L;;;;;N;;;;; +1334;ETHIOPIC SYLLABLE PHEE;Lo;0;L;;;;;N;;;;; +1335;ETHIOPIC SYLLABLE PHE;Lo;0;L;;;;;N;;;;; +1336;ETHIOPIC SYLLABLE PHO;Lo;0;L;;;;;N;;;;; +1337;ETHIOPIC SYLLABLE PHWA;Lo;0;L;;;;;N;;;;; +1338;ETHIOPIC SYLLABLE TSA;Lo;0;L;;;;;N;;;;; +1339;ETHIOPIC SYLLABLE TSU;Lo;0;L;;;;;N;;;;; +133A;ETHIOPIC SYLLABLE TSI;Lo;0;L;;;;;N;;;;; +133B;ETHIOPIC SYLLABLE TSAA;Lo;0;L;;;;;N;;;;; +133C;ETHIOPIC SYLLABLE TSEE;Lo;0;L;;;;;N;;;;; +133D;ETHIOPIC SYLLABLE TSE;Lo;0;L;;;;;N;;;;; +133E;ETHIOPIC SYLLABLE TSO;Lo;0;L;;;;;N;;;;; +133F;ETHIOPIC SYLLABLE TSWA;Lo;0;L;;;;;N;;;;; +1340;ETHIOPIC SYLLABLE TZA;Lo;0;L;;;;;N;;;;; +1341;ETHIOPIC SYLLABLE TZU;Lo;0;L;;;;;N;;;;; +1342;ETHIOPIC SYLLABLE TZI;Lo;0;L;;;;;N;;;;; +1343;ETHIOPIC SYLLABLE TZAA;Lo;0;L;;;;;N;;;;; +1344;ETHIOPIC SYLLABLE TZEE;Lo;0;L;;;;;N;;;;; +1345;ETHIOPIC SYLLABLE TZE;Lo;0;L;;;;;N;;;;; +1346;ETHIOPIC SYLLABLE TZO;Lo;0;L;;;;;N;;;;; +1347;ETHIOPIC SYLLABLE TZOA;Lo;0;L;;;;;N;;;;; +1348;ETHIOPIC SYLLABLE FA;Lo;0;L;;;;;N;;;;; +1349;ETHIOPIC SYLLABLE FU;Lo;0;L;;;;;N;;;;; +134A;ETHIOPIC SYLLABLE FI;Lo;0;L;;;;;N;;;;; +134B;ETHIOPIC SYLLABLE FAA;Lo;0;L;;;;;N;;;;; +134C;ETHIOPIC SYLLABLE FEE;Lo;0;L;;;;;N;;;;; +134D;ETHIOPIC SYLLABLE FE;Lo;0;L;;;;;N;;;;; +134E;ETHIOPIC SYLLABLE FO;Lo;0;L;;;;;N;;;;; +134F;ETHIOPIC SYLLABLE FWA;Lo;0;L;;;;;N;;;;; +1350;ETHIOPIC SYLLABLE PA;Lo;0;L;;;;;N;;;;; +1351;ETHIOPIC SYLLABLE PU;Lo;0;L;;;;;N;;;;; +1352;ETHIOPIC SYLLABLE PI;Lo;0;L;;;;;N;;;;; +1353;ETHIOPIC SYLLABLE PAA;Lo;0;L;;;;;N;;;;; +1354;ETHIOPIC SYLLABLE PEE;Lo;0;L;;;;;N;;;;; +1355;ETHIOPIC SYLLABLE PE;Lo;0;L;;;;;N;;;;; +1356;ETHIOPIC SYLLABLE PO;Lo;0;L;;;;;N;;;;; +1357;ETHIOPIC SYLLABLE PWA;Lo;0;L;;;;;N;;;;; +1358;ETHIOPIC SYLLABLE RYA;Lo;0;L;;;;;N;;;;; +1359;ETHIOPIC SYLLABLE MYA;Lo;0;L;;;;;N;;;;; +135A;ETHIOPIC SYLLABLE FYA;Lo;0;L;;;;;N;;;;; +135D;ETHIOPIC COMBINING GEMINATION AND VOWEL LENGTH MARK;Mn;230;NSM;;;;;N;;;;; +135E;ETHIOPIC COMBINING VOWEL LENGTH MARK;Mn;230;NSM;;;;;N;;;;; +135F;ETHIOPIC COMBINING GEMINATION MARK;Mn;230;NSM;;;;;N;;;;; +1360;ETHIOPIC SECTION MARK;Po;0;L;;;;;N;;;;; +1361;ETHIOPIC WORDSPACE;Po;0;L;;;;;N;;;;; +1362;ETHIOPIC FULL STOP;Po;0;L;;;;;N;;;;; +1363;ETHIOPIC COMMA;Po;0;L;;;;;N;;;;; +1364;ETHIOPIC SEMICOLON;Po;0;L;;;;;N;;;;; +1365;ETHIOPIC COLON;Po;0;L;;;;;N;;;;; +1366;ETHIOPIC PREFACE COLON;Po;0;L;;;;;N;;;;; +1367;ETHIOPIC QUESTION MARK;Po;0;L;;;;;N;;;;; +1368;ETHIOPIC PARAGRAPH SEPARATOR;Po;0;L;;;;;N;;;;; +1369;ETHIOPIC DIGIT ONE;No;0;L;;;1;1;N;;;;; +136A;ETHIOPIC DIGIT TWO;No;0;L;;;2;2;N;;;;; +136B;ETHIOPIC DIGIT THREE;No;0;L;;;3;3;N;;;;; +136C;ETHIOPIC DIGIT FOUR;No;0;L;;;4;4;N;;;;; +136D;ETHIOPIC DIGIT FIVE;No;0;L;;;5;5;N;;;;; +136E;ETHIOPIC DIGIT SIX;No;0;L;;;6;6;N;;;;; +136F;ETHIOPIC DIGIT SEVEN;No;0;L;;;7;7;N;;;;; +1370;ETHIOPIC DIGIT EIGHT;No;0;L;;;8;8;N;;;;; +1371;ETHIOPIC DIGIT NINE;No;0;L;;;9;9;N;;;;; +1372;ETHIOPIC NUMBER TEN;No;0;L;;;;10;N;;;;; +1373;ETHIOPIC NUMBER TWENTY;No;0;L;;;;20;N;;;;; +1374;ETHIOPIC NUMBER THIRTY;No;0;L;;;;30;N;;;;; +1375;ETHIOPIC NUMBER FORTY;No;0;L;;;;40;N;;;;; +1376;ETHIOPIC NUMBER FIFTY;No;0;L;;;;50;N;;;;; +1377;ETHIOPIC NUMBER SIXTY;No;0;L;;;;60;N;;;;; +1378;ETHIOPIC NUMBER SEVENTY;No;0;L;;;;70;N;;;;; +1379;ETHIOPIC NUMBER EIGHTY;No;0;L;;;;80;N;;;;; +137A;ETHIOPIC NUMBER NINETY;No;0;L;;;;90;N;;;;; +137B;ETHIOPIC NUMBER HUNDRED;No;0;L;;;;100;N;;;;; +137C;ETHIOPIC NUMBER TEN THOUSAND;No;0;L;;;;10000;N;;;;; +1380;ETHIOPIC SYLLABLE SEBATBEIT MWA;Lo;0;L;;;;;N;;;;; +1381;ETHIOPIC SYLLABLE MWI;Lo;0;L;;;;;N;;;;; +1382;ETHIOPIC SYLLABLE MWEE;Lo;0;L;;;;;N;;;;; +1383;ETHIOPIC SYLLABLE MWE;Lo;0;L;;;;;N;;;;; +1384;ETHIOPIC SYLLABLE SEBATBEIT BWA;Lo;0;L;;;;;N;;;;; +1385;ETHIOPIC SYLLABLE BWI;Lo;0;L;;;;;N;;;;; +1386;ETHIOPIC SYLLABLE BWEE;Lo;0;L;;;;;N;;;;; +1387;ETHIOPIC SYLLABLE BWE;Lo;0;L;;;;;N;;;;; +1388;ETHIOPIC SYLLABLE SEBATBEIT FWA;Lo;0;L;;;;;N;;;;; +1389;ETHIOPIC SYLLABLE FWI;Lo;0;L;;;;;N;;;;; +138A;ETHIOPIC SYLLABLE FWEE;Lo;0;L;;;;;N;;;;; +138B;ETHIOPIC SYLLABLE FWE;Lo;0;L;;;;;N;;;;; +138C;ETHIOPIC SYLLABLE SEBATBEIT PWA;Lo;0;L;;;;;N;;;;; +138D;ETHIOPIC SYLLABLE PWI;Lo;0;L;;;;;N;;;;; +138E;ETHIOPIC SYLLABLE PWEE;Lo;0;L;;;;;N;;;;; +138F;ETHIOPIC SYLLABLE PWE;Lo;0;L;;;;;N;;;;; +1390;ETHIOPIC TONAL MARK YIZET;So;0;ON;;;;;N;;;;; +1391;ETHIOPIC TONAL MARK DERET;So;0;ON;;;;;N;;;;; +1392;ETHIOPIC TONAL MARK RIKRIK;So;0;ON;;;;;N;;;;; +1393;ETHIOPIC TONAL MARK SHORT RIKRIK;So;0;ON;;;;;N;;;;; +1394;ETHIOPIC TONAL MARK DIFAT;So;0;ON;;;;;N;;;;; +1395;ETHIOPIC TONAL MARK KENAT;So;0;ON;;;;;N;;;;; +1396;ETHIOPIC TONAL MARK CHIRET;So;0;ON;;;;;N;;;;; +1397;ETHIOPIC TONAL MARK HIDET;So;0;ON;;;;;N;;;;; +1398;ETHIOPIC TONAL MARK DERET-HIDET;So;0;ON;;;;;N;;;;; +1399;ETHIOPIC TONAL MARK KURT;So;0;ON;;;;;N;;;;; +13A0;CHEROKEE LETTER A;Lu;0;L;;;;;N;;;;AB70; +13A1;CHEROKEE LETTER E;Lu;0;L;;;;;N;;;;AB71; +13A2;CHEROKEE LETTER I;Lu;0;L;;;;;N;;;;AB72; +13A3;CHEROKEE LETTER O;Lu;0;L;;;;;N;;;;AB73; +13A4;CHEROKEE LETTER U;Lu;0;L;;;;;N;;;;AB74; +13A5;CHEROKEE LETTER V;Lu;0;L;;;;;N;;;;AB75; +13A6;CHEROKEE LETTER GA;Lu;0;L;;;;;N;;;;AB76; +13A7;CHEROKEE LETTER KA;Lu;0;L;;;;;N;;;;AB77; +13A8;CHEROKEE LETTER GE;Lu;0;L;;;;;N;;;;AB78; +13A9;CHEROKEE LETTER GI;Lu;0;L;;;;;N;;;;AB79; +13AA;CHEROKEE LETTER GO;Lu;0;L;;;;;N;;;;AB7A; +13AB;CHEROKEE LETTER GU;Lu;0;L;;;;;N;;;;AB7B; +13AC;CHEROKEE LETTER GV;Lu;0;L;;;;;N;;;;AB7C; +13AD;CHEROKEE LETTER HA;Lu;0;L;;;;;N;;;;AB7D; +13AE;CHEROKEE LETTER HE;Lu;0;L;;;;;N;;;;AB7E; +13AF;CHEROKEE LETTER HI;Lu;0;L;;;;;N;;;;AB7F; +13B0;CHEROKEE LETTER HO;Lu;0;L;;;;;N;;;;AB80; +13B1;CHEROKEE LETTER HU;Lu;0;L;;;;;N;;;;AB81; +13B2;CHEROKEE LETTER HV;Lu;0;L;;;;;N;;;;AB82; +13B3;CHEROKEE LETTER LA;Lu;0;L;;;;;N;;;;AB83; +13B4;CHEROKEE LETTER LE;Lu;0;L;;;;;N;;;;AB84; +13B5;CHEROKEE LETTER LI;Lu;0;L;;;;;N;;;;AB85; +13B6;CHEROKEE LETTER LO;Lu;0;L;;;;;N;;;;AB86; +13B7;CHEROKEE LETTER LU;Lu;0;L;;;;;N;;;;AB87; +13B8;CHEROKEE LETTER LV;Lu;0;L;;;;;N;;;;AB88; +13B9;CHEROKEE LETTER MA;Lu;0;L;;;;;N;;;;AB89; +13BA;CHEROKEE LETTER ME;Lu;0;L;;;;;N;;;;AB8A; +13BB;CHEROKEE LETTER MI;Lu;0;L;;;;;N;;;;AB8B; +13BC;CHEROKEE LETTER MO;Lu;0;L;;;;;N;;;;AB8C; +13BD;CHEROKEE LETTER MU;Lu;0;L;;;;;N;;;;AB8D; +13BE;CHEROKEE LETTER NA;Lu;0;L;;;;;N;;;;AB8E; +13BF;CHEROKEE LETTER HNA;Lu;0;L;;;;;N;;;;AB8F; +13C0;CHEROKEE LETTER NAH;Lu;0;L;;;;;N;;;;AB90; +13C1;CHEROKEE LETTER NE;Lu;0;L;;;;;N;;;;AB91; +13C2;CHEROKEE LETTER NI;Lu;0;L;;;;;N;;;;AB92; +13C3;CHEROKEE LETTER NO;Lu;0;L;;;;;N;;;;AB93; +13C4;CHEROKEE LETTER NU;Lu;0;L;;;;;N;;;;AB94; +13C5;CHEROKEE LETTER NV;Lu;0;L;;;;;N;;;;AB95; +13C6;CHEROKEE LETTER QUA;Lu;0;L;;;;;N;;;;AB96; +13C7;CHEROKEE LETTER QUE;Lu;0;L;;;;;N;;;;AB97; +13C8;CHEROKEE LETTER QUI;Lu;0;L;;;;;N;;;;AB98; +13C9;CHEROKEE LETTER QUO;Lu;0;L;;;;;N;;;;AB99; +13CA;CHEROKEE LETTER QUU;Lu;0;L;;;;;N;;;;AB9A; +13CB;CHEROKEE LETTER QUV;Lu;0;L;;;;;N;;;;AB9B; +13CC;CHEROKEE LETTER SA;Lu;0;L;;;;;N;;;;AB9C; +13CD;CHEROKEE LETTER S;Lu;0;L;;;;;N;;;;AB9D; +13CE;CHEROKEE LETTER SE;Lu;0;L;;;;;N;;;;AB9E; +13CF;CHEROKEE LETTER SI;Lu;0;L;;;;;N;;;;AB9F; +13D0;CHEROKEE LETTER SO;Lu;0;L;;;;;N;;;;ABA0; +13D1;CHEROKEE LETTER SU;Lu;0;L;;;;;N;;;;ABA1; +13D2;CHEROKEE LETTER SV;Lu;0;L;;;;;N;;;;ABA2; +13D3;CHEROKEE LETTER DA;Lu;0;L;;;;;N;;;;ABA3; +13D4;CHEROKEE LETTER TA;Lu;0;L;;;;;N;;;;ABA4; +13D5;CHEROKEE LETTER DE;Lu;0;L;;;;;N;;;;ABA5; +13D6;CHEROKEE LETTER TE;Lu;0;L;;;;;N;;;;ABA6; +13D7;CHEROKEE LETTER DI;Lu;0;L;;;;;N;;;;ABA7; +13D8;CHEROKEE LETTER TI;Lu;0;L;;;;;N;;;;ABA8; +13D9;CHEROKEE LETTER DO;Lu;0;L;;;;;N;;;;ABA9; +13DA;CHEROKEE LETTER DU;Lu;0;L;;;;;N;;;;ABAA; +13DB;CHEROKEE LETTER DV;Lu;0;L;;;;;N;;;;ABAB; +13DC;CHEROKEE LETTER DLA;Lu;0;L;;;;;N;;;;ABAC; +13DD;CHEROKEE LETTER TLA;Lu;0;L;;;;;N;;;;ABAD; +13DE;CHEROKEE LETTER TLE;Lu;0;L;;;;;N;;;;ABAE; +13DF;CHEROKEE LETTER TLI;Lu;0;L;;;;;N;;;;ABAF; +13E0;CHEROKEE LETTER TLO;Lu;0;L;;;;;N;;;;ABB0; +13E1;CHEROKEE LETTER TLU;Lu;0;L;;;;;N;;;;ABB1; +13E2;CHEROKEE LETTER TLV;Lu;0;L;;;;;N;;;;ABB2; +13E3;CHEROKEE LETTER TSA;Lu;0;L;;;;;N;;;;ABB3; +13E4;CHEROKEE LETTER TSE;Lu;0;L;;;;;N;;;;ABB4; +13E5;CHEROKEE LETTER TSI;Lu;0;L;;;;;N;;;;ABB5; +13E6;CHEROKEE LETTER TSO;Lu;0;L;;;;;N;;;;ABB6; +13E7;CHEROKEE LETTER TSU;Lu;0;L;;;;;N;;;;ABB7; +13E8;CHEROKEE LETTER TSV;Lu;0;L;;;;;N;;;;ABB8; +13E9;CHEROKEE LETTER WA;Lu;0;L;;;;;N;;;;ABB9; +13EA;CHEROKEE LETTER WE;Lu;0;L;;;;;N;;;;ABBA; +13EB;CHEROKEE LETTER WI;Lu;0;L;;;;;N;;;;ABBB; +13EC;CHEROKEE LETTER WO;Lu;0;L;;;;;N;;;;ABBC; +13ED;CHEROKEE LETTER WU;Lu;0;L;;;;;N;;;;ABBD; +13EE;CHEROKEE LETTER WV;Lu;0;L;;;;;N;;;;ABBE; +13EF;CHEROKEE LETTER YA;Lu;0;L;;;;;N;;;;ABBF; +13F0;CHEROKEE LETTER YE;Lu;0;L;;;;;N;;;;13F8; +13F1;CHEROKEE LETTER YI;Lu;0;L;;;;;N;;;;13F9; +13F2;CHEROKEE LETTER YO;Lu;0;L;;;;;N;;;;13FA; +13F3;CHEROKEE LETTER YU;Lu;0;L;;;;;N;;;;13FB; +13F4;CHEROKEE LETTER YV;Lu;0;L;;;;;N;;;;13FC; +13F5;CHEROKEE LETTER MV;Lu;0;L;;;;;N;;;;13FD; +13F8;CHEROKEE SMALL LETTER YE;Ll;0;L;;;;;N;;;13F0;;13F0 +13F9;CHEROKEE SMALL LETTER YI;Ll;0;L;;;;;N;;;13F1;;13F1 +13FA;CHEROKEE SMALL LETTER YO;Ll;0;L;;;;;N;;;13F2;;13F2 +13FB;CHEROKEE SMALL LETTER YU;Ll;0;L;;;;;N;;;13F3;;13F3 +13FC;CHEROKEE SMALL LETTER YV;Ll;0;L;;;;;N;;;13F4;;13F4 +13FD;CHEROKEE SMALL LETTER MV;Ll;0;L;;;;;N;;;13F5;;13F5 +1400;CANADIAN SYLLABICS HYPHEN;Pd;0;ON;;;;;N;;;;; +1401;CANADIAN SYLLABICS E;Lo;0;L;;;;;N;;;;; +1402;CANADIAN SYLLABICS AAI;Lo;0;L;;;;;N;;;;; +1403;CANADIAN SYLLABICS I;Lo;0;L;;;;;N;;;;; +1404;CANADIAN SYLLABICS II;Lo;0;L;;;;;N;;;;; +1405;CANADIAN SYLLABICS O;Lo;0;L;;;;;N;;;;; +1406;CANADIAN SYLLABICS OO;Lo;0;L;;;;;N;;;;; +1407;CANADIAN SYLLABICS Y-CREE OO;Lo;0;L;;;;;N;;;;; +1408;CANADIAN SYLLABICS CARRIER EE;Lo;0;L;;;;;N;;;;; +1409;CANADIAN SYLLABICS CARRIER I;Lo;0;L;;;;;N;;;;; +140A;CANADIAN SYLLABICS A;Lo;0;L;;;;;N;;;;; +140B;CANADIAN SYLLABICS AA;Lo;0;L;;;;;N;;;;; +140C;CANADIAN SYLLABICS WE;Lo;0;L;;;;;N;;;;; +140D;CANADIAN SYLLABICS WEST-CREE WE;Lo;0;L;;;;;N;;;;; +140E;CANADIAN SYLLABICS WI;Lo;0;L;;;;;N;;;;; +140F;CANADIAN SYLLABICS WEST-CREE WI;Lo;0;L;;;;;N;;;;; +1410;CANADIAN SYLLABICS WII;Lo;0;L;;;;;N;;;;; +1411;CANADIAN SYLLABICS WEST-CREE WII;Lo;0;L;;;;;N;;;;; +1412;CANADIAN SYLLABICS WO;Lo;0;L;;;;;N;;;;; +1413;CANADIAN SYLLABICS WEST-CREE WO;Lo;0;L;;;;;N;;;;; +1414;CANADIAN SYLLABICS WOO;Lo;0;L;;;;;N;;;;; +1415;CANADIAN SYLLABICS WEST-CREE WOO;Lo;0;L;;;;;N;;;;; +1416;CANADIAN SYLLABICS NASKAPI WOO;Lo;0;L;;;;;N;;;;; +1417;CANADIAN SYLLABICS WA;Lo;0;L;;;;;N;;;;; +1418;CANADIAN SYLLABICS WEST-CREE WA;Lo;0;L;;;;;N;;;;; +1419;CANADIAN SYLLABICS WAA;Lo;0;L;;;;;N;;;;; +141A;CANADIAN SYLLABICS WEST-CREE WAA;Lo;0;L;;;;;N;;;;; +141B;CANADIAN SYLLABICS NASKAPI WAA;Lo;0;L;;;;;N;;;;; +141C;CANADIAN SYLLABICS AI;Lo;0;L;;;;;N;;;;; +141D;CANADIAN SYLLABICS Y-CREE W;Lo;0;L;;;;;N;;;;; +141E;CANADIAN SYLLABICS GLOTTAL STOP;Lo;0;L;;;;;N;;;;; +141F;CANADIAN SYLLABICS FINAL ACUTE;Lo;0;L;;;;;N;;;;; +1420;CANADIAN SYLLABICS FINAL GRAVE;Lo;0;L;;;;;N;;;;; +1421;CANADIAN SYLLABICS FINAL BOTTOM HALF RING;Lo;0;L;;;;;N;;;;; +1422;CANADIAN SYLLABICS FINAL TOP HALF RING;Lo;0;L;;;;;N;;;;; +1423;CANADIAN SYLLABICS FINAL RIGHT HALF RING;Lo;0;L;;;;;N;;;;; +1424;CANADIAN SYLLABICS FINAL RING;Lo;0;L;;;;;N;;;;; +1425;CANADIAN SYLLABICS FINAL DOUBLE ACUTE;Lo;0;L;;;;;N;;;;; +1426;CANADIAN SYLLABICS FINAL DOUBLE SHORT VERTICAL STROKES;Lo;0;L;;;;;N;;;;; +1427;CANADIAN SYLLABICS FINAL MIDDLE DOT;Lo;0;L;;;;;N;;;;; +1428;CANADIAN SYLLABICS FINAL SHORT HORIZONTAL STROKE;Lo;0;L;;;;;N;;;;; +1429;CANADIAN SYLLABICS FINAL PLUS;Lo;0;L;;;;;N;;;;; +142A;CANADIAN SYLLABICS FINAL DOWN TACK;Lo;0;L;;;;;N;;;;; +142B;CANADIAN SYLLABICS EN;Lo;0;L;;;;;N;;;;; +142C;CANADIAN SYLLABICS IN;Lo;0;L;;;;;N;;;;; +142D;CANADIAN SYLLABICS ON;Lo;0;L;;;;;N;;;;; +142E;CANADIAN SYLLABICS AN;Lo;0;L;;;;;N;;;;; +142F;CANADIAN SYLLABICS PE;Lo;0;L;;;;;N;;;;; +1430;CANADIAN SYLLABICS PAAI;Lo;0;L;;;;;N;;;;; +1431;CANADIAN SYLLABICS PI;Lo;0;L;;;;;N;;;;; +1432;CANADIAN SYLLABICS PII;Lo;0;L;;;;;N;;;;; +1433;CANADIAN SYLLABICS PO;Lo;0;L;;;;;N;;;;; +1434;CANADIAN SYLLABICS POO;Lo;0;L;;;;;N;;;;; +1435;CANADIAN SYLLABICS Y-CREE POO;Lo;0;L;;;;;N;;;;; +1436;CANADIAN SYLLABICS CARRIER HEE;Lo;0;L;;;;;N;;;;; +1437;CANADIAN SYLLABICS CARRIER HI;Lo;0;L;;;;;N;;;;; +1438;CANADIAN SYLLABICS PA;Lo;0;L;;;;;N;;;;; +1439;CANADIAN SYLLABICS PAA;Lo;0;L;;;;;N;;;;; +143A;CANADIAN SYLLABICS PWE;Lo;0;L;;;;;N;;;;; +143B;CANADIAN SYLLABICS WEST-CREE PWE;Lo;0;L;;;;;N;;;;; +143C;CANADIAN SYLLABICS PWI;Lo;0;L;;;;;N;;;;; +143D;CANADIAN SYLLABICS WEST-CREE PWI;Lo;0;L;;;;;N;;;;; +143E;CANADIAN SYLLABICS PWII;Lo;0;L;;;;;N;;;;; +143F;CANADIAN SYLLABICS WEST-CREE PWII;Lo;0;L;;;;;N;;;;; +1440;CANADIAN SYLLABICS PWO;Lo;0;L;;;;;N;;;;; +1441;CANADIAN SYLLABICS WEST-CREE PWO;Lo;0;L;;;;;N;;;;; +1442;CANADIAN SYLLABICS PWOO;Lo;0;L;;;;;N;;;;; +1443;CANADIAN SYLLABICS WEST-CREE PWOO;Lo;0;L;;;;;N;;;;; +1444;CANADIAN SYLLABICS PWA;Lo;0;L;;;;;N;;;;; +1445;CANADIAN SYLLABICS WEST-CREE PWA;Lo;0;L;;;;;N;;;;; +1446;CANADIAN SYLLABICS PWAA;Lo;0;L;;;;;N;;;;; +1447;CANADIAN SYLLABICS WEST-CREE PWAA;Lo;0;L;;;;;N;;;;; +1448;CANADIAN SYLLABICS Y-CREE PWAA;Lo;0;L;;;;;N;;;;; +1449;CANADIAN SYLLABICS P;Lo;0;L;;;;;N;;;;; +144A;CANADIAN SYLLABICS WEST-CREE P;Lo;0;L;;;;;N;;;;; +144B;CANADIAN SYLLABICS CARRIER H;Lo;0;L;;;;;N;;;;; +144C;CANADIAN SYLLABICS TE;Lo;0;L;;;;;N;;;;; +144D;CANADIAN SYLLABICS TAAI;Lo;0;L;;;;;N;;;;; +144E;CANADIAN SYLLABICS TI;Lo;0;L;;;;;N;;;;; +144F;CANADIAN SYLLABICS TII;Lo;0;L;;;;;N;;;;; +1450;CANADIAN SYLLABICS TO;Lo;0;L;;;;;N;;;;; +1451;CANADIAN SYLLABICS TOO;Lo;0;L;;;;;N;;;;; +1452;CANADIAN SYLLABICS Y-CREE TOO;Lo;0;L;;;;;N;;;;; +1453;CANADIAN SYLLABICS CARRIER DEE;Lo;0;L;;;;;N;;;;; +1454;CANADIAN SYLLABICS CARRIER DI;Lo;0;L;;;;;N;;;;; +1455;CANADIAN SYLLABICS TA;Lo;0;L;;;;;N;;;;; +1456;CANADIAN SYLLABICS TAA;Lo;0;L;;;;;N;;;;; +1457;CANADIAN SYLLABICS TWE;Lo;0;L;;;;;N;;;;; +1458;CANADIAN SYLLABICS WEST-CREE TWE;Lo;0;L;;;;;N;;;;; +1459;CANADIAN SYLLABICS TWI;Lo;0;L;;;;;N;;;;; +145A;CANADIAN SYLLABICS WEST-CREE TWI;Lo;0;L;;;;;N;;;;; +145B;CANADIAN SYLLABICS TWII;Lo;0;L;;;;;N;;;;; +145C;CANADIAN SYLLABICS WEST-CREE TWII;Lo;0;L;;;;;N;;;;; +145D;CANADIAN SYLLABICS TWO;Lo;0;L;;;;;N;;;;; +145E;CANADIAN SYLLABICS WEST-CREE TWO;Lo;0;L;;;;;N;;;;; +145F;CANADIAN SYLLABICS TWOO;Lo;0;L;;;;;N;;;;; +1460;CANADIAN SYLLABICS WEST-CREE TWOO;Lo;0;L;;;;;N;;;;; +1461;CANADIAN SYLLABICS TWA;Lo;0;L;;;;;N;;;;; +1462;CANADIAN SYLLABICS WEST-CREE TWA;Lo;0;L;;;;;N;;;;; +1463;CANADIAN SYLLABICS TWAA;Lo;0;L;;;;;N;;;;; +1464;CANADIAN SYLLABICS WEST-CREE TWAA;Lo;0;L;;;;;N;;;;; +1465;CANADIAN SYLLABICS NASKAPI TWAA;Lo;0;L;;;;;N;;;;; +1466;CANADIAN SYLLABICS T;Lo;0;L;;;;;N;;;;; +1467;CANADIAN SYLLABICS TTE;Lo;0;L;;;;;N;;;;; +1468;CANADIAN SYLLABICS TTI;Lo;0;L;;;;;N;;;;; +1469;CANADIAN SYLLABICS TTO;Lo;0;L;;;;;N;;;;; +146A;CANADIAN SYLLABICS TTA;Lo;0;L;;;;;N;;;;; +146B;CANADIAN SYLLABICS KE;Lo;0;L;;;;;N;;;;; +146C;CANADIAN SYLLABICS KAAI;Lo;0;L;;;;;N;;;;; +146D;CANADIAN SYLLABICS KI;Lo;0;L;;;;;N;;;;; +146E;CANADIAN SYLLABICS KII;Lo;0;L;;;;;N;;;;; +146F;CANADIAN SYLLABICS KO;Lo;0;L;;;;;N;;;;; +1470;CANADIAN SYLLABICS KOO;Lo;0;L;;;;;N;;;;; +1471;CANADIAN SYLLABICS Y-CREE KOO;Lo;0;L;;;;;N;;;;; +1472;CANADIAN SYLLABICS KA;Lo;0;L;;;;;N;;;;; +1473;CANADIAN SYLLABICS KAA;Lo;0;L;;;;;N;;;;; +1474;CANADIAN SYLLABICS KWE;Lo;0;L;;;;;N;;;;; +1475;CANADIAN SYLLABICS WEST-CREE KWE;Lo;0;L;;;;;N;;;;; +1476;CANADIAN SYLLABICS KWI;Lo;0;L;;;;;N;;;;; +1477;CANADIAN SYLLABICS WEST-CREE KWI;Lo;0;L;;;;;N;;;;; +1478;CANADIAN SYLLABICS KWII;Lo;0;L;;;;;N;;;;; +1479;CANADIAN SYLLABICS WEST-CREE KWII;Lo;0;L;;;;;N;;;;; +147A;CANADIAN SYLLABICS KWO;Lo;0;L;;;;;N;;;;; +147B;CANADIAN SYLLABICS WEST-CREE KWO;Lo;0;L;;;;;N;;;;; +147C;CANADIAN SYLLABICS KWOO;Lo;0;L;;;;;N;;;;; +147D;CANADIAN SYLLABICS WEST-CREE KWOO;Lo;0;L;;;;;N;;;;; +147E;CANADIAN SYLLABICS KWA;Lo;0;L;;;;;N;;;;; +147F;CANADIAN SYLLABICS WEST-CREE KWA;Lo;0;L;;;;;N;;;;; +1480;CANADIAN SYLLABICS KWAA;Lo;0;L;;;;;N;;;;; +1481;CANADIAN SYLLABICS WEST-CREE KWAA;Lo;0;L;;;;;N;;;;; +1482;CANADIAN SYLLABICS NASKAPI KWAA;Lo;0;L;;;;;N;;;;; +1483;CANADIAN SYLLABICS K;Lo;0;L;;;;;N;;;;; +1484;CANADIAN SYLLABICS KW;Lo;0;L;;;;;N;;;;; +1485;CANADIAN SYLLABICS SOUTH-SLAVEY KEH;Lo;0;L;;;;;N;;;;; +1486;CANADIAN SYLLABICS SOUTH-SLAVEY KIH;Lo;0;L;;;;;N;;;;; +1487;CANADIAN SYLLABICS SOUTH-SLAVEY KOH;Lo;0;L;;;;;N;;;;; +1488;CANADIAN SYLLABICS SOUTH-SLAVEY KAH;Lo;0;L;;;;;N;;;;; +1489;CANADIAN SYLLABICS CE;Lo;0;L;;;;;N;;;;; +148A;CANADIAN SYLLABICS CAAI;Lo;0;L;;;;;N;;;;; +148B;CANADIAN SYLLABICS CI;Lo;0;L;;;;;N;;;;; +148C;CANADIAN SYLLABICS CII;Lo;0;L;;;;;N;;;;; +148D;CANADIAN SYLLABICS CO;Lo;0;L;;;;;N;;;;; +148E;CANADIAN SYLLABICS COO;Lo;0;L;;;;;N;;;;; +148F;CANADIAN SYLLABICS Y-CREE COO;Lo;0;L;;;;;N;;;;; +1490;CANADIAN SYLLABICS CA;Lo;0;L;;;;;N;;;;; +1491;CANADIAN SYLLABICS CAA;Lo;0;L;;;;;N;;;;; +1492;CANADIAN SYLLABICS CWE;Lo;0;L;;;;;N;;;;; +1493;CANADIAN SYLLABICS WEST-CREE CWE;Lo;0;L;;;;;N;;;;; +1494;CANADIAN SYLLABICS CWI;Lo;0;L;;;;;N;;;;; +1495;CANADIAN SYLLABICS WEST-CREE CWI;Lo;0;L;;;;;N;;;;; +1496;CANADIAN SYLLABICS CWII;Lo;0;L;;;;;N;;;;; +1497;CANADIAN SYLLABICS WEST-CREE CWII;Lo;0;L;;;;;N;;;;; +1498;CANADIAN SYLLABICS CWO;Lo;0;L;;;;;N;;;;; +1499;CANADIAN SYLLABICS WEST-CREE CWO;Lo;0;L;;;;;N;;;;; +149A;CANADIAN SYLLABICS CWOO;Lo;0;L;;;;;N;;;;; +149B;CANADIAN SYLLABICS WEST-CREE CWOO;Lo;0;L;;;;;N;;;;; +149C;CANADIAN SYLLABICS CWA;Lo;0;L;;;;;N;;;;; +149D;CANADIAN SYLLABICS WEST-CREE CWA;Lo;0;L;;;;;N;;;;; +149E;CANADIAN SYLLABICS CWAA;Lo;0;L;;;;;N;;;;; +149F;CANADIAN SYLLABICS WEST-CREE CWAA;Lo;0;L;;;;;N;;;;; +14A0;CANADIAN SYLLABICS NASKAPI CWAA;Lo;0;L;;;;;N;;;;; +14A1;CANADIAN SYLLABICS C;Lo;0;L;;;;;N;;;;; +14A2;CANADIAN SYLLABICS SAYISI TH;Lo;0;L;;;;;N;;;;; +14A3;CANADIAN SYLLABICS ME;Lo;0;L;;;;;N;;;;; +14A4;CANADIAN SYLLABICS MAAI;Lo;0;L;;;;;N;;;;; +14A5;CANADIAN SYLLABICS MI;Lo;0;L;;;;;N;;;;; +14A6;CANADIAN SYLLABICS MII;Lo;0;L;;;;;N;;;;; +14A7;CANADIAN SYLLABICS MO;Lo;0;L;;;;;N;;;;; +14A8;CANADIAN SYLLABICS MOO;Lo;0;L;;;;;N;;;;; +14A9;CANADIAN SYLLABICS Y-CREE MOO;Lo;0;L;;;;;N;;;;; +14AA;CANADIAN SYLLABICS MA;Lo;0;L;;;;;N;;;;; +14AB;CANADIAN SYLLABICS MAA;Lo;0;L;;;;;N;;;;; +14AC;CANADIAN SYLLABICS MWE;Lo;0;L;;;;;N;;;;; +14AD;CANADIAN SYLLABICS WEST-CREE MWE;Lo;0;L;;;;;N;;;;; +14AE;CANADIAN SYLLABICS MWI;Lo;0;L;;;;;N;;;;; +14AF;CANADIAN SYLLABICS WEST-CREE MWI;Lo;0;L;;;;;N;;;;; +14B0;CANADIAN SYLLABICS MWII;Lo;0;L;;;;;N;;;;; +14B1;CANADIAN SYLLABICS WEST-CREE MWII;Lo;0;L;;;;;N;;;;; +14B2;CANADIAN SYLLABICS MWO;Lo;0;L;;;;;N;;;;; +14B3;CANADIAN SYLLABICS WEST-CREE MWO;Lo;0;L;;;;;N;;;;; +14B4;CANADIAN SYLLABICS MWOO;Lo;0;L;;;;;N;;;;; +14B5;CANADIAN SYLLABICS WEST-CREE MWOO;Lo;0;L;;;;;N;;;;; +14B6;CANADIAN SYLLABICS MWA;Lo;0;L;;;;;N;;;;; +14B7;CANADIAN SYLLABICS WEST-CREE MWA;Lo;0;L;;;;;N;;;;; +14B8;CANADIAN SYLLABICS MWAA;Lo;0;L;;;;;N;;;;; +14B9;CANADIAN SYLLABICS WEST-CREE MWAA;Lo;0;L;;;;;N;;;;; +14BA;CANADIAN SYLLABICS NASKAPI MWAA;Lo;0;L;;;;;N;;;;; +14BB;CANADIAN SYLLABICS M;Lo;0;L;;;;;N;;;;; +14BC;CANADIAN SYLLABICS WEST-CREE M;Lo;0;L;;;;;N;;;;; +14BD;CANADIAN SYLLABICS MH;Lo;0;L;;;;;N;;;;; +14BE;CANADIAN SYLLABICS ATHAPASCAN M;Lo;0;L;;;;;N;;;;; +14BF;CANADIAN SYLLABICS SAYISI M;Lo;0;L;;;;;N;;;;; +14C0;CANADIAN SYLLABICS NE;Lo;0;L;;;;;N;;;;; +14C1;CANADIAN SYLLABICS NAAI;Lo;0;L;;;;;N;;;;; +14C2;CANADIAN SYLLABICS NI;Lo;0;L;;;;;N;;;;; +14C3;CANADIAN SYLLABICS NII;Lo;0;L;;;;;N;;;;; +14C4;CANADIAN SYLLABICS NO;Lo;0;L;;;;;N;;;;; +14C5;CANADIAN SYLLABICS NOO;Lo;0;L;;;;;N;;;;; +14C6;CANADIAN SYLLABICS Y-CREE NOO;Lo;0;L;;;;;N;;;;; +14C7;CANADIAN SYLLABICS NA;Lo;0;L;;;;;N;;;;; +14C8;CANADIAN SYLLABICS NAA;Lo;0;L;;;;;N;;;;; +14C9;CANADIAN SYLLABICS NWE;Lo;0;L;;;;;N;;;;; +14CA;CANADIAN SYLLABICS WEST-CREE NWE;Lo;0;L;;;;;N;;;;; +14CB;CANADIAN SYLLABICS NWA;Lo;0;L;;;;;N;;;;; +14CC;CANADIAN SYLLABICS WEST-CREE NWA;Lo;0;L;;;;;N;;;;; +14CD;CANADIAN SYLLABICS NWAA;Lo;0;L;;;;;N;;;;; +14CE;CANADIAN SYLLABICS WEST-CREE NWAA;Lo;0;L;;;;;N;;;;; +14CF;CANADIAN SYLLABICS NASKAPI NWAA;Lo;0;L;;;;;N;;;;; +14D0;CANADIAN SYLLABICS N;Lo;0;L;;;;;N;;;;; +14D1;CANADIAN SYLLABICS CARRIER NG;Lo;0;L;;;;;N;;;;; +14D2;CANADIAN SYLLABICS NH;Lo;0;L;;;;;N;;;;; +14D3;CANADIAN SYLLABICS LE;Lo;0;L;;;;;N;;;;; +14D4;CANADIAN SYLLABICS LAAI;Lo;0;L;;;;;N;;;;; +14D5;CANADIAN SYLLABICS LI;Lo;0;L;;;;;N;;;;; +14D6;CANADIAN SYLLABICS LII;Lo;0;L;;;;;N;;;;; +14D7;CANADIAN SYLLABICS LO;Lo;0;L;;;;;N;;;;; +14D8;CANADIAN SYLLABICS LOO;Lo;0;L;;;;;N;;;;; +14D9;CANADIAN SYLLABICS Y-CREE LOO;Lo;0;L;;;;;N;;;;; +14DA;CANADIAN SYLLABICS LA;Lo;0;L;;;;;N;;;;; +14DB;CANADIAN SYLLABICS LAA;Lo;0;L;;;;;N;;;;; +14DC;CANADIAN SYLLABICS LWE;Lo;0;L;;;;;N;;;;; +14DD;CANADIAN SYLLABICS WEST-CREE LWE;Lo;0;L;;;;;N;;;;; +14DE;CANADIAN SYLLABICS LWI;Lo;0;L;;;;;N;;;;; +14DF;CANADIAN SYLLABICS WEST-CREE LWI;Lo;0;L;;;;;N;;;;; +14E0;CANADIAN SYLLABICS LWII;Lo;0;L;;;;;N;;;;; +14E1;CANADIAN SYLLABICS WEST-CREE LWII;Lo;0;L;;;;;N;;;;; +14E2;CANADIAN SYLLABICS LWO;Lo;0;L;;;;;N;;;;; +14E3;CANADIAN SYLLABICS WEST-CREE LWO;Lo;0;L;;;;;N;;;;; +14E4;CANADIAN SYLLABICS LWOO;Lo;0;L;;;;;N;;;;; +14E5;CANADIAN SYLLABICS WEST-CREE LWOO;Lo;0;L;;;;;N;;;;; +14E6;CANADIAN SYLLABICS LWA;Lo;0;L;;;;;N;;;;; +14E7;CANADIAN SYLLABICS WEST-CREE LWA;Lo;0;L;;;;;N;;;;; +14E8;CANADIAN SYLLABICS LWAA;Lo;0;L;;;;;N;;;;; +14E9;CANADIAN SYLLABICS WEST-CREE LWAA;Lo;0;L;;;;;N;;;;; +14EA;CANADIAN SYLLABICS L;Lo;0;L;;;;;N;;;;; +14EB;CANADIAN SYLLABICS WEST-CREE L;Lo;0;L;;;;;N;;;;; +14EC;CANADIAN SYLLABICS MEDIAL L;Lo;0;L;;;;;N;;;;; +14ED;CANADIAN SYLLABICS SE;Lo;0;L;;;;;N;;;;; +14EE;CANADIAN SYLLABICS SAAI;Lo;0;L;;;;;N;;;;; +14EF;CANADIAN SYLLABICS SI;Lo;0;L;;;;;N;;;;; +14F0;CANADIAN SYLLABICS SII;Lo;0;L;;;;;N;;;;; +14F1;CANADIAN SYLLABICS SO;Lo;0;L;;;;;N;;;;; +14F2;CANADIAN SYLLABICS SOO;Lo;0;L;;;;;N;;;;; +14F3;CANADIAN SYLLABICS Y-CREE SOO;Lo;0;L;;;;;N;;;;; +14F4;CANADIAN SYLLABICS SA;Lo;0;L;;;;;N;;;;; +14F5;CANADIAN SYLLABICS SAA;Lo;0;L;;;;;N;;;;; +14F6;CANADIAN SYLLABICS SWE;Lo;0;L;;;;;N;;;;; +14F7;CANADIAN SYLLABICS WEST-CREE SWE;Lo;0;L;;;;;N;;;;; +14F8;CANADIAN SYLLABICS SWI;Lo;0;L;;;;;N;;;;; +14F9;CANADIAN SYLLABICS WEST-CREE SWI;Lo;0;L;;;;;N;;;;; +14FA;CANADIAN SYLLABICS SWII;Lo;0;L;;;;;N;;;;; +14FB;CANADIAN SYLLABICS WEST-CREE SWII;Lo;0;L;;;;;N;;;;; +14FC;CANADIAN SYLLABICS SWO;Lo;0;L;;;;;N;;;;; +14FD;CANADIAN SYLLABICS WEST-CREE SWO;Lo;0;L;;;;;N;;;;; +14FE;CANADIAN SYLLABICS SWOO;Lo;0;L;;;;;N;;;;; +14FF;CANADIAN SYLLABICS WEST-CREE SWOO;Lo;0;L;;;;;N;;;;; +1500;CANADIAN SYLLABICS SWA;Lo;0;L;;;;;N;;;;; +1501;CANADIAN SYLLABICS WEST-CREE SWA;Lo;0;L;;;;;N;;;;; +1502;CANADIAN SYLLABICS SWAA;Lo;0;L;;;;;N;;;;; +1503;CANADIAN SYLLABICS WEST-CREE SWAA;Lo;0;L;;;;;N;;;;; +1504;CANADIAN SYLLABICS NASKAPI SWAA;Lo;0;L;;;;;N;;;;; +1505;CANADIAN SYLLABICS S;Lo;0;L;;;;;N;;;;; +1506;CANADIAN SYLLABICS ATHAPASCAN S;Lo;0;L;;;;;N;;;;; +1507;CANADIAN SYLLABICS SW;Lo;0;L;;;;;N;;;;; +1508;CANADIAN SYLLABICS BLACKFOOT S;Lo;0;L;;;;;N;;;;; +1509;CANADIAN SYLLABICS MOOSE-CREE SK;Lo;0;L;;;;;N;;;;; +150A;CANADIAN SYLLABICS NASKAPI SKW;Lo;0;L;;;;;N;;;;; +150B;CANADIAN SYLLABICS NASKAPI S-W;Lo;0;L;;;;;N;;;;; +150C;CANADIAN SYLLABICS NASKAPI SPWA;Lo;0;L;;;;;N;;;;; +150D;CANADIAN SYLLABICS NASKAPI STWA;Lo;0;L;;;;;N;;;;; +150E;CANADIAN SYLLABICS NASKAPI SKWA;Lo;0;L;;;;;N;;;;; +150F;CANADIAN SYLLABICS NASKAPI SCWA;Lo;0;L;;;;;N;;;;; +1510;CANADIAN SYLLABICS SHE;Lo;0;L;;;;;N;;;;; +1511;CANADIAN SYLLABICS SHI;Lo;0;L;;;;;N;;;;; +1512;CANADIAN SYLLABICS SHII;Lo;0;L;;;;;N;;;;; +1513;CANADIAN SYLLABICS SHO;Lo;0;L;;;;;N;;;;; +1514;CANADIAN SYLLABICS SHOO;Lo;0;L;;;;;N;;;;; +1515;CANADIAN SYLLABICS SHA;Lo;0;L;;;;;N;;;;; +1516;CANADIAN SYLLABICS SHAA;Lo;0;L;;;;;N;;;;; +1517;CANADIAN SYLLABICS SHWE;Lo;0;L;;;;;N;;;;; +1518;CANADIAN SYLLABICS WEST-CREE SHWE;Lo;0;L;;;;;N;;;;; +1519;CANADIAN SYLLABICS SHWI;Lo;0;L;;;;;N;;;;; +151A;CANADIAN SYLLABICS WEST-CREE SHWI;Lo;0;L;;;;;N;;;;; +151B;CANADIAN SYLLABICS SHWII;Lo;0;L;;;;;N;;;;; +151C;CANADIAN SYLLABICS WEST-CREE SHWII;Lo;0;L;;;;;N;;;;; +151D;CANADIAN SYLLABICS SHWO;Lo;0;L;;;;;N;;;;; +151E;CANADIAN SYLLABICS WEST-CREE SHWO;Lo;0;L;;;;;N;;;;; +151F;CANADIAN SYLLABICS SHWOO;Lo;0;L;;;;;N;;;;; +1520;CANADIAN SYLLABICS WEST-CREE SHWOO;Lo;0;L;;;;;N;;;;; +1521;CANADIAN SYLLABICS SHWA;Lo;0;L;;;;;N;;;;; +1522;CANADIAN SYLLABICS WEST-CREE SHWA;Lo;0;L;;;;;N;;;;; +1523;CANADIAN SYLLABICS SHWAA;Lo;0;L;;;;;N;;;;; +1524;CANADIAN SYLLABICS WEST-CREE SHWAA;Lo;0;L;;;;;N;;;;; +1525;CANADIAN SYLLABICS SH;Lo;0;L;;;;;N;;;;; +1526;CANADIAN SYLLABICS YE;Lo;0;L;;;;;N;;;;; +1527;CANADIAN SYLLABICS YAAI;Lo;0;L;;;;;N;;;;; +1528;CANADIAN SYLLABICS YI;Lo;0;L;;;;;N;;;;; +1529;CANADIAN SYLLABICS YII;Lo;0;L;;;;;N;;;;; +152A;CANADIAN SYLLABICS YO;Lo;0;L;;;;;N;;;;; +152B;CANADIAN SYLLABICS YOO;Lo;0;L;;;;;N;;;;; +152C;CANADIAN SYLLABICS Y-CREE YOO;Lo;0;L;;;;;N;;;;; +152D;CANADIAN SYLLABICS YA;Lo;0;L;;;;;N;;;;; +152E;CANADIAN SYLLABICS YAA;Lo;0;L;;;;;N;;;;; +152F;CANADIAN SYLLABICS YWE;Lo;0;L;;;;;N;;;;; +1530;CANADIAN SYLLABICS WEST-CREE YWE;Lo;0;L;;;;;N;;;;; +1531;CANADIAN SYLLABICS YWI;Lo;0;L;;;;;N;;;;; +1532;CANADIAN SYLLABICS WEST-CREE YWI;Lo;0;L;;;;;N;;;;; +1533;CANADIAN SYLLABICS YWII;Lo;0;L;;;;;N;;;;; +1534;CANADIAN SYLLABICS WEST-CREE YWII;Lo;0;L;;;;;N;;;;; +1535;CANADIAN SYLLABICS YWO;Lo;0;L;;;;;N;;;;; +1536;CANADIAN SYLLABICS WEST-CREE YWO;Lo;0;L;;;;;N;;;;; +1537;CANADIAN SYLLABICS YWOO;Lo;0;L;;;;;N;;;;; +1538;CANADIAN SYLLABICS WEST-CREE YWOO;Lo;0;L;;;;;N;;;;; +1539;CANADIAN SYLLABICS YWA;Lo;0;L;;;;;N;;;;; +153A;CANADIAN SYLLABICS WEST-CREE YWA;Lo;0;L;;;;;N;;;;; +153B;CANADIAN SYLLABICS YWAA;Lo;0;L;;;;;N;;;;; +153C;CANADIAN SYLLABICS WEST-CREE YWAA;Lo;0;L;;;;;N;;;;; +153D;CANADIAN SYLLABICS NASKAPI YWAA;Lo;0;L;;;;;N;;;;; +153E;CANADIAN SYLLABICS Y;Lo;0;L;;;;;N;;;;; +153F;CANADIAN SYLLABICS BIBLE-CREE Y;Lo;0;L;;;;;N;;;;; +1540;CANADIAN SYLLABICS WEST-CREE Y;Lo;0;L;;;;;N;;;;; +1541;CANADIAN SYLLABICS SAYISI YI;Lo;0;L;;;;;N;;;;; +1542;CANADIAN SYLLABICS RE;Lo;0;L;;;;;N;;;;; +1543;CANADIAN SYLLABICS R-CREE RE;Lo;0;L;;;;;N;;;;; +1544;CANADIAN SYLLABICS WEST-CREE LE;Lo;0;L;;;;;N;;;;; +1545;CANADIAN SYLLABICS RAAI;Lo;0;L;;;;;N;;;;; +1546;CANADIAN SYLLABICS RI;Lo;0;L;;;;;N;;;;; +1547;CANADIAN SYLLABICS RII;Lo;0;L;;;;;N;;;;; +1548;CANADIAN SYLLABICS RO;Lo;0;L;;;;;N;;;;; +1549;CANADIAN SYLLABICS ROO;Lo;0;L;;;;;N;;;;; +154A;CANADIAN SYLLABICS WEST-CREE LO;Lo;0;L;;;;;N;;;;; +154B;CANADIAN SYLLABICS RA;Lo;0;L;;;;;N;;;;; +154C;CANADIAN SYLLABICS RAA;Lo;0;L;;;;;N;;;;; +154D;CANADIAN SYLLABICS WEST-CREE LA;Lo;0;L;;;;;N;;;;; +154E;CANADIAN SYLLABICS RWAA;Lo;0;L;;;;;N;;;;; +154F;CANADIAN SYLLABICS WEST-CREE RWAA;Lo;0;L;;;;;N;;;;; +1550;CANADIAN SYLLABICS R;Lo;0;L;;;;;N;;;;; +1551;CANADIAN SYLLABICS WEST-CREE R;Lo;0;L;;;;;N;;;;; +1552;CANADIAN SYLLABICS MEDIAL R;Lo;0;L;;;;;N;;;;; +1553;CANADIAN SYLLABICS FE;Lo;0;L;;;;;N;;;;; +1554;CANADIAN SYLLABICS FAAI;Lo;0;L;;;;;N;;;;; +1555;CANADIAN SYLLABICS FI;Lo;0;L;;;;;N;;;;; +1556;CANADIAN SYLLABICS FII;Lo;0;L;;;;;N;;;;; +1557;CANADIAN SYLLABICS FO;Lo;0;L;;;;;N;;;;; +1558;CANADIAN SYLLABICS FOO;Lo;0;L;;;;;N;;;;; +1559;CANADIAN SYLLABICS FA;Lo;0;L;;;;;N;;;;; +155A;CANADIAN SYLLABICS FAA;Lo;0;L;;;;;N;;;;; +155B;CANADIAN SYLLABICS FWAA;Lo;0;L;;;;;N;;;;; +155C;CANADIAN SYLLABICS WEST-CREE FWAA;Lo;0;L;;;;;N;;;;; +155D;CANADIAN SYLLABICS F;Lo;0;L;;;;;N;;;;; +155E;CANADIAN SYLLABICS THE;Lo;0;L;;;;;N;;;;; +155F;CANADIAN SYLLABICS N-CREE THE;Lo;0;L;;;;;N;;;;; +1560;CANADIAN SYLLABICS THI;Lo;0;L;;;;;N;;;;; +1561;CANADIAN SYLLABICS N-CREE THI;Lo;0;L;;;;;N;;;;; +1562;CANADIAN SYLLABICS THII;Lo;0;L;;;;;N;;;;; +1563;CANADIAN SYLLABICS N-CREE THII;Lo;0;L;;;;;N;;;;; +1564;CANADIAN SYLLABICS THO;Lo;0;L;;;;;N;;;;; +1565;CANADIAN SYLLABICS THOO;Lo;0;L;;;;;N;;;;; +1566;CANADIAN SYLLABICS THA;Lo;0;L;;;;;N;;;;; +1567;CANADIAN SYLLABICS THAA;Lo;0;L;;;;;N;;;;; +1568;CANADIAN SYLLABICS THWAA;Lo;0;L;;;;;N;;;;; +1569;CANADIAN SYLLABICS WEST-CREE THWAA;Lo;0;L;;;;;N;;;;; +156A;CANADIAN SYLLABICS TH;Lo;0;L;;;;;N;;;;; +156B;CANADIAN SYLLABICS TTHE;Lo;0;L;;;;;N;;;;; +156C;CANADIAN SYLLABICS TTHI;Lo;0;L;;;;;N;;;;; +156D;CANADIAN SYLLABICS TTHO;Lo;0;L;;;;;N;;;;; +156E;CANADIAN SYLLABICS TTHA;Lo;0;L;;;;;N;;;;; +156F;CANADIAN SYLLABICS TTH;Lo;0;L;;;;;N;;;;; +1570;CANADIAN SYLLABICS TYE;Lo;0;L;;;;;N;;;;; +1571;CANADIAN SYLLABICS TYI;Lo;0;L;;;;;N;;;;; +1572;CANADIAN SYLLABICS TYO;Lo;0;L;;;;;N;;;;; +1573;CANADIAN SYLLABICS TYA;Lo;0;L;;;;;N;;;;; +1574;CANADIAN SYLLABICS NUNAVIK HE;Lo;0;L;;;;;N;;;;; +1575;CANADIAN SYLLABICS NUNAVIK HI;Lo;0;L;;;;;N;;;;; +1576;CANADIAN SYLLABICS NUNAVIK HII;Lo;0;L;;;;;N;;;;; +1577;CANADIAN SYLLABICS NUNAVIK HO;Lo;0;L;;;;;N;;;;; +1578;CANADIAN SYLLABICS NUNAVIK HOO;Lo;0;L;;;;;N;;;;; +1579;CANADIAN SYLLABICS NUNAVIK HA;Lo;0;L;;;;;N;;;;; +157A;CANADIAN SYLLABICS NUNAVIK HAA;Lo;0;L;;;;;N;;;;; +157B;CANADIAN SYLLABICS NUNAVIK H;Lo;0;L;;;;;N;;;;; +157C;CANADIAN SYLLABICS NUNAVUT H;Lo;0;L;;;;;N;;;;; +157D;CANADIAN SYLLABICS HK;Lo;0;L;;;;;N;;;;; +157E;CANADIAN SYLLABICS QAAI;Lo;0;L;;;;;N;;;;; +157F;CANADIAN SYLLABICS QI;Lo;0;L;;;;;N;;;;; +1580;CANADIAN SYLLABICS QII;Lo;0;L;;;;;N;;;;; +1581;CANADIAN SYLLABICS QO;Lo;0;L;;;;;N;;;;; +1582;CANADIAN SYLLABICS QOO;Lo;0;L;;;;;N;;;;; +1583;CANADIAN SYLLABICS QA;Lo;0;L;;;;;N;;;;; +1584;CANADIAN SYLLABICS QAA;Lo;0;L;;;;;N;;;;; +1585;CANADIAN SYLLABICS Q;Lo;0;L;;;;;N;;;;; +1586;CANADIAN SYLLABICS TLHE;Lo;0;L;;;;;N;;;;; +1587;CANADIAN SYLLABICS TLHI;Lo;0;L;;;;;N;;;;; +1588;CANADIAN SYLLABICS TLHO;Lo;0;L;;;;;N;;;;; +1589;CANADIAN SYLLABICS TLHA;Lo;0;L;;;;;N;;;;; +158A;CANADIAN SYLLABICS WEST-CREE RE;Lo;0;L;;;;;N;;;;; +158B;CANADIAN SYLLABICS WEST-CREE RI;Lo;0;L;;;;;N;;;;; +158C;CANADIAN SYLLABICS WEST-CREE RO;Lo;0;L;;;;;N;;;;; +158D;CANADIAN SYLLABICS WEST-CREE RA;Lo;0;L;;;;;N;;;;; +158E;CANADIAN SYLLABICS NGAAI;Lo;0;L;;;;;N;;;;; +158F;CANADIAN SYLLABICS NGI;Lo;0;L;;;;;N;;;;; +1590;CANADIAN SYLLABICS NGII;Lo;0;L;;;;;N;;;;; +1591;CANADIAN SYLLABICS NGO;Lo;0;L;;;;;N;;;;; +1592;CANADIAN SYLLABICS NGOO;Lo;0;L;;;;;N;;;;; +1593;CANADIAN SYLLABICS NGA;Lo;0;L;;;;;N;;;;; +1594;CANADIAN SYLLABICS NGAA;Lo;0;L;;;;;N;;;;; +1595;CANADIAN SYLLABICS NG;Lo;0;L;;;;;N;;;;; +1596;CANADIAN SYLLABICS NNG;Lo;0;L;;;;;N;;;;; +1597;CANADIAN SYLLABICS SAYISI SHE;Lo;0;L;;;;;N;;;;; +1598;CANADIAN SYLLABICS SAYISI SHI;Lo;0;L;;;;;N;;;;; +1599;CANADIAN SYLLABICS SAYISI SHO;Lo;0;L;;;;;N;;;;; +159A;CANADIAN SYLLABICS SAYISI SHA;Lo;0;L;;;;;N;;;;; +159B;CANADIAN SYLLABICS WOODS-CREE THE;Lo;0;L;;;;;N;;;;; +159C;CANADIAN SYLLABICS WOODS-CREE THI;Lo;0;L;;;;;N;;;;; +159D;CANADIAN SYLLABICS WOODS-CREE THO;Lo;0;L;;;;;N;;;;; +159E;CANADIAN SYLLABICS WOODS-CREE THA;Lo;0;L;;;;;N;;;;; +159F;CANADIAN SYLLABICS WOODS-CREE TH;Lo;0;L;;;;;N;;;;; +15A0;CANADIAN SYLLABICS LHI;Lo;0;L;;;;;N;;;;; +15A1;CANADIAN SYLLABICS LHII;Lo;0;L;;;;;N;;;;; +15A2;CANADIAN SYLLABICS LHO;Lo;0;L;;;;;N;;;;; +15A3;CANADIAN SYLLABICS LHOO;Lo;0;L;;;;;N;;;;; +15A4;CANADIAN SYLLABICS LHA;Lo;0;L;;;;;N;;;;; +15A5;CANADIAN SYLLABICS LHAA;Lo;0;L;;;;;N;;;;; +15A6;CANADIAN SYLLABICS LH;Lo;0;L;;;;;N;;;;; +15A7;CANADIAN SYLLABICS TH-CREE THE;Lo;0;L;;;;;N;;;;; +15A8;CANADIAN SYLLABICS TH-CREE THI;Lo;0;L;;;;;N;;;;; +15A9;CANADIAN SYLLABICS TH-CREE THII;Lo;0;L;;;;;N;;;;; +15AA;CANADIAN SYLLABICS TH-CREE THO;Lo;0;L;;;;;N;;;;; +15AB;CANADIAN SYLLABICS TH-CREE THOO;Lo;0;L;;;;;N;;;;; +15AC;CANADIAN SYLLABICS TH-CREE THA;Lo;0;L;;;;;N;;;;; +15AD;CANADIAN SYLLABICS TH-CREE THAA;Lo;0;L;;;;;N;;;;; +15AE;CANADIAN SYLLABICS TH-CREE TH;Lo;0;L;;;;;N;;;;; +15AF;CANADIAN SYLLABICS AIVILIK B;Lo;0;L;;;;;N;;;;; +15B0;CANADIAN SYLLABICS BLACKFOOT E;Lo;0;L;;;;;N;;;;; +15B1;CANADIAN SYLLABICS BLACKFOOT I;Lo;0;L;;;;;N;;;;; +15B2;CANADIAN SYLLABICS BLACKFOOT O;Lo;0;L;;;;;N;;;;; +15B3;CANADIAN SYLLABICS BLACKFOOT A;Lo;0;L;;;;;N;;;;; +15B4;CANADIAN SYLLABICS BLACKFOOT WE;Lo;0;L;;;;;N;;;;; +15B5;CANADIAN SYLLABICS BLACKFOOT WI;Lo;0;L;;;;;N;;;;; +15B6;CANADIAN SYLLABICS BLACKFOOT WO;Lo;0;L;;;;;N;;;;; +15B7;CANADIAN SYLLABICS BLACKFOOT WA;Lo;0;L;;;;;N;;;;; +15B8;CANADIAN SYLLABICS BLACKFOOT NE;Lo;0;L;;;;;N;;;;; +15B9;CANADIAN SYLLABICS BLACKFOOT NI;Lo;0;L;;;;;N;;;;; +15BA;CANADIAN SYLLABICS BLACKFOOT NO;Lo;0;L;;;;;N;;;;; +15BB;CANADIAN SYLLABICS BLACKFOOT NA;Lo;0;L;;;;;N;;;;; +15BC;CANADIAN SYLLABICS BLACKFOOT KE;Lo;0;L;;;;;N;;;;; +15BD;CANADIAN SYLLABICS BLACKFOOT KI;Lo;0;L;;;;;N;;;;; +15BE;CANADIAN SYLLABICS BLACKFOOT KO;Lo;0;L;;;;;N;;;;; +15BF;CANADIAN SYLLABICS BLACKFOOT KA;Lo;0;L;;;;;N;;;;; +15C0;CANADIAN SYLLABICS SAYISI HE;Lo;0;L;;;;;N;;;;; +15C1;CANADIAN SYLLABICS SAYISI HI;Lo;0;L;;;;;N;;;;; +15C2;CANADIAN SYLLABICS SAYISI HO;Lo;0;L;;;;;N;;;;; +15C3;CANADIAN SYLLABICS SAYISI HA;Lo;0;L;;;;;N;;;;; +15C4;CANADIAN SYLLABICS CARRIER GHU;Lo;0;L;;;;;N;;;;; +15C5;CANADIAN SYLLABICS CARRIER GHO;Lo;0;L;;;;;N;;;;; +15C6;CANADIAN SYLLABICS CARRIER GHE;Lo;0;L;;;;;N;;;;; +15C7;CANADIAN SYLLABICS CARRIER GHEE;Lo;0;L;;;;;N;;;;; +15C8;CANADIAN SYLLABICS CARRIER GHI;Lo;0;L;;;;;N;;;;; +15C9;CANADIAN SYLLABICS CARRIER GHA;Lo;0;L;;;;;N;;;;; +15CA;CANADIAN SYLLABICS CARRIER RU;Lo;0;L;;;;;N;;;;; +15CB;CANADIAN SYLLABICS CARRIER RO;Lo;0;L;;;;;N;;;;; +15CC;CANADIAN SYLLABICS CARRIER RE;Lo;0;L;;;;;N;;;;; +15CD;CANADIAN SYLLABICS CARRIER REE;Lo;0;L;;;;;N;;;;; +15CE;CANADIAN SYLLABICS CARRIER RI;Lo;0;L;;;;;N;;;;; +15CF;CANADIAN SYLLABICS CARRIER RA;Lo;0;L;;;;;N;;;;; +15D0;CANADIAN SYLLABICS CARRIER WU;Lo;0;L;;;;;N;;;;; +15D1;CANADIAN SYLLABICS CARRIER WO;Lo;0;L;;;;;N;;;;; +15D2;CANADIAN SYLLABICS CARRIER WE;Lo;0;L;;;;;N;;;;; +15D3;CANADIAN SYLLABICS CARRIER WEE;Lo;0;L;;;;;N;;;;; +15D4;CANADIAN SYLLABICS CARRIER WI;Lo;0;L;;;;;N;;;;; +15D5;CANADIAN SYLLABICS CARRIER WA;Lo;0;L;;;;;N;;;;; +15D6;CANADIAN SYLLABICS CARRIER HWU;Lo;0;L;;;;;N;;;;; +15D7;CANADIAN SYLLABICS CARRIER HWO;Lo;0;L;;;;;N;;;;; +15D8;CANADIAN SYLLABICS CARRIER HWE;Lo;0;L;;;;;N;;;;; +15D9;CANADIAN SYLLABICS CARRIER HWEE;Lo;0;L;;;;;N;;;;; +15DA;CANADIAN SYLLABICS CARRIER HWI;Lo;0;L;;;;;N;;;;; +15DB;CANADIAN SYLLABICS CARRIER HWA;Lo;0;L;;;;;N;;;;; +15DC;CANADIAN SYLLABICS CARRIER THU;Lo;0;L;;;;;N;;;;; +15DD;CANADIAN SYLLABICS CARRIER THO;Lo;0;L;;;;;N;;;;; +15DE;CANADIAN SYLLABICS CARRIER THE;Lo;0;L;;;;;N;;;;; +15DF;CANADIAN SYLLABICS CARRIER THEE;Lo;0;L;;;;;N;;;;; +15E0;CANADIAN SYLLABICS CARRIER THI;Lo;0;L;;;;;N;;;;; +15E1;CANADIAN SYLLABICS CARRIER THA;Lo;0;L;;;;;N;;;;; +15E2;CANADIAN SYLLABICS CARRIER TTU;Lo;0;L;;;;;N;;;;; +15E3;CANADIAN SYLLABICS CARRIER TTO;Lo;0;L;;;;;N;;;;; +15E4;CANADIAN SYLLABICS CARRIER TTE;Lo;0;L;;;;;N;;;;; +15E5;CANADIAN SYLLABICS CARRIER TTEE;Lo;0;L;;;;;N;;;;; +15E6;CANADIAN SYLLABICS CARRIER TTI;Lo;0;L;;;;;N;;;;; +15E7;CANADIAN SYLLABICS CARRIER TTA;Lo;0;L;;;;;N;;;;; +15E8;CANADIAN SYLLABICS CARRIER PU;Lo;0;L;;;;;N;;;;; +15E9;CANADIAN SYLLABICS CARRIER PO;Lo;0;L;;;;;N;;;;; +15EA;CANADIAN SYLLABICS CARRIER PE;Lo;0;L;;;;;N;;;;; +15EB;CANADIAN SYLLABICS CARRIER PEE;Lo;0;L;;;;;N;;;;; +15EC;CANADIAN SYLLABICS CARRIER PI;Lo;0;L;;;;;N;;;;; +15ED;CANADIAN SYLLABICS CARRIER PA;Lo;0;L;;;;;N;;;;; +15EE;CANADIAN SYLLABICS CARRIER P;Lo;0;L;;;;;N;;;;; +15EF;CANADIAN SYLLABICS CARRIER GU;Lo;0;L;;;;;N;;;;; +15F0;CANADIAN SYLLABICS CARRIER GO;Lo;0;L;;;;;N;;;;; +15F1;CANADIAN SYLLABICS CARRIER GE;Lo;0;L;;;;;N;;;;; +15F2;CANADIAN SYLLABICS CARRIER GEE;Lo;0;L;;;;;N;;;;; +15F3;CANADIAN SYLLABICS CARRIER GI;Lo;0;L;;;;;N;;;;; +15F4;CANADIAN SYLLABICS CARRIER GA;Lo;0;L;;;;;N;;;;; +15F5;CANADIAN SYLLABICS CARRIER KHU;Lo;0;L;;;;;N;;;;; +15F6;CANADIAN SYLLABICS CARRIER KHO;Lo;0;L;;;;;N;;;;; +15F7;CANADIAN SYLLABICS CARRIER KHE;Lo;0;L;;;;;N;;;;; +15F8;CANADIAN SYLLABICS CARRIER KHEE;Lo;0;L;;;;;N;;;;; +15F9;CANADIAN SYLLABICS CARRIER KHI;Lo;0;L;;;;;N;;;;; +15FA;CANADIAN SYLLABICS CARRIER KHA;Lo;0;L;;;;;N;;;;; +15FB;CANADIAN SYLLABICS CARRIER KKU;Lo;0;L;;;;;N;;;;; +15FC;CANADIAN SYLLABICS CARRIER KKO;Lo;0;L;;;;;N;;;;; +15FD;CANADIAN SYLLABICS CARRIER KKE;Lo;0;L;;;;;N;;;;; +15FE;CANADIAN SYLLABICS CARRIER KKEE;Lo;0;L;;;;;N;;;;; +15FF;CANADIAN SYLLABICS CARRIER KKI;Lo;0;L;;;;;N;;;;; +1600;CANADIAN SYLLABICS CARRIER KKA;Lo;0;L;;;;;N;;;;; +1601;CANADIAN SYLLABICS CARRIER KK;Lo;0;L;;;;;N;;;;; +1602;CANADIAN SYLLABICS CARRIER NU;Lo;0;L;;;;;N;;;;; +1603;CANADIAN SYLLABICS CARRIER NO;Lo;0;L;;;;;N;;;;; +1604;CANADIAN SYLLABICS CARRIER NE;Lo;0;L;;;;;N;;;;; +1605;CANADIAN SYLLABICS CARRIER NEE;Lo;0;L;;;;;N;;;;; +1606;CANADIAN SYLLABICS CARRIER NI;Lo;0;L;;;;;N;;;;; +1607;CANADIAN SYLLABICS CARRIER NA;Lo;0;L;;;;;N;;;;; +1608;CANADIAN SYLLABICS CARRIER MU;Lo;0;L;;;;;N;;;;; +1609;CANADIAN SYLLABICS CARRIER MO;Lo;0;L;;;;;N;;;;; +160A;CANADIAN SYLLABICS CARRIER ME;Lo;0;L;;;;;N;;;;; +160B;CANADIAN SYLLABICS CARRIER MEE;Lo;0;L;;;;;N;;;;; +160C;CANADIAN SYLLABICS CARRIER MI;Lo;0;L;;;;;N;;;;; +160D;CANADIAN SYLLABICS CARRIER MA;Lo;0;L;;;;;N;;;;; +160E;CANADIAN SYLLABICS CARRIER YU;Lo;0;L;;;;;N;;;;; +160F;CANADIAN SYLLABICS CARRIER YO;Lo;0;L;;;;;N;;;;; +1610;CANADIAN SYLLABICS CARRIER YE;Lo;0;L;;;;;N;;;;; +1611;CANADIAN SYLLABICS CARRIER YEE;Lo;0;L;;;;;N;;;;; +1612;CANADIAN SYLLABICS CARRIER YI;Lo;0;L;;;;;N;;;;; +1613;CANADIAN SYLLABICS CARRIER YA;Lo;0;L;;;;;N;;;;; +1614;CANADIAN SYLLABICS CARRIER JU;Lo;0;L;;;;;N;;;;; +1615;CANADIAN SYLLABICS SAYISI JU;Lo;0;L;;;;;N;;;;; +1616;CANADIAN SYLLABICS CARRIER JO;Lo;0;L;;;;;N;;;;; +1617;CANADIAN SYLLABICS CARRIER JE;Lo;0;L;;;;;N;;;;; +1618;CANADIAN SYLLABICS CARRIER JEE;Lo;0;L;;;;;N;;;;; +1619;CANADIAN SYLLABICS CARRIER JI;Lo;0;L;;;;;N;;;;; +161A;CANADIAN SYLLABICS SAYISI JI;Lo;0;L;;;;;N;;;;; +161B;CANADIAN SYLLABICS CARRIER JA;Lo;0;L;;;;;N;;;;; +161C;CANADIAN SYLLABICS CARRIER JJU;Lo;0;L;;;;;N;;;;; +161D;CANADIAN SYLLABICS CARRIER JJO;Lo;0;L;;;;;N;;;;; +161E;CANADIAN SYLLABICS CARRIER JJE;Lo;0;L;;;;;N;;;;; +161F;CANADIAN SYLLABICS CARRIER JJEE;Lo;0;L;;;;;N;;;;; +1620;CANADIAN SYLLABICS CARRIER JJI;Lo;0;L;;;;;N;;;;; +1621;CANADIAN SYLLABICS CARRIER JJA;Lo;0;L;;;;;N;;;;; +1622;CANADIAN SYLLABICS CARRIER LU;Lo;0;L;;;;;N;;;;; +1623;CANADIAN SYLLABICS CARRIER LO;Lo;0;L;;;;;N;;;;; +1624;CANADIAN SYLLABICS CARRIER LE;Lo;0;L;;;;;N;;;;; +1625;CANADIAN SYLLABICS CARRIER LEE;Lo;0;L;;;;;N;;;;; +1626;CANADIAN SYLLABICS CARRIER LI;Lo;0;L;;;;;N;;;;; +1627;CANADIAN SYLLABICS CARRIER LA;Lo;0;L;;;;;N;;;;; +1628;CANADIAN SYLLABICS CARRIER DLU;Lo;0;L;;;;;N;;;;; +1629;CANADIAN SYLLABICS CARRIER DLO;Lo;0;L;;;;;N;;;;; +162A;CANADIAN SYLLABICS CARRIER DLE;Lo;0;L;;;;;N;;;;; +162B;CANADIAN SYLLABICS CARRIER DLEE;Lo;0;L;;;;;N;;;;; +162C;CANADIAN SYLLABICS CARRIER DLI;Lo;0;L;;;;;N;;;;; +162D;CANADIAN SYLLABICS CARRIER DLA;Lo;0;L;;;;;N;;;;; +162E;CANADIAN SYLLABICS CARRIER LHU;Lo;0;L;;;;;N;;;;; +162F;CANADIAN SYLLABICS CARRIER LHO;Lo;0;L;;;;;N;;;;; +1630;CANADIAN SYLLABICS CARRIER LHE;Lo;0;L;;;;;N;;;;; +1631;CANADIAN SYLLABICS CARRIER LHEE;Lo;0;L;;;;;N;;;;; +1632;CANADIAN SYLLABICS CARRIER LHI;Lo;0;L;;;;;N;;;;; +1633;CANADIAN SYLLABICS CARRIER LHA;Lo;0;L;;;;;N;;;;; +1634;CANADIAN SYLLABICS CARRIER TLHU;Lo;0;L;;;;;N;;;;; +1635;CANADIAN SYLLABICS CARRIER TLHO;Lo;0;L;;;;;N;;;;; +1636;CANADIAN SYLLABICS CARRIER TLHE;Lo;0;L;;;;;N;;;;; +1637;CANADIAN SYLLABICS CARRIER TLHEE;Lo;0;L;;;;;N;;;;; +1638;CANADIAN SYLLABICS CARRIER TLHI;Lo;0;L;;;;;N;;;;; +1639;CANADIAN SYLLABICS CARRIER TLHA;Lo;0;L;;;;;N;;;;; +163A;CANADIAN SYLLABICS CARRIER TLU;Lo;0;L;;;;;N;;;;; +163B;CANADIAN SYLLABICS CARRIER TLO;Lo;0;L;;;;;N;;;;; +163C;CANADIAN SYLLABICS CARRIER TLE;Lo;0;L;;;;;N;;;;; +163D;CANADIAN SYLLABICS CARRIER TLEE;Lo;0;L;;;;;N;;;;; +163E;CANADIAN SYLLABICS CARRIER TLI;Lo;0;L;;;;;N;;;;; +163F;CANADIAN SYLLABICS CARRIER TLA;Lo;0;L;;;;;N;;;;; +1640;CANADIAN SYLLABICS CARRIER ZU;Lo;0;L;;;;;N;;;;; +1641;CANADIAN SYLLABICS CARRIER ZO;Lo;0;L;;;;;N;;;;; +1642;CANADIAN SYLLABICS CARRIER ZE;Lo;0;L;;;;;N;;;;; +1643;CANADIAN SYLLABICS CARRIER ZEE;Lo;0;L;;;;;N;;;;; +1644;CANADIAN SYLLABICS CARRIER ZI;Lo;0;L;;;;;N;;;;; +1645;CANADIAN SYLLABICS CARRIER ZA;Lo;0;L;;;;;N;;;;; +1646;CANADIAN SYLLABICS CARRIER Z;Lo;0;L;;;;;N;;;;; +1647;CANADIAN SYLLABICS CARRIER INITIAL Z;Lo;0;L;;;;;N;;;;; +1648;CANADIAN SYLLABICS CARRIER DZU;Lo;0;L;;;;;N;;;;; +1649;CANADIAN SYLLABICS CARRIER DZO;Lo;0;L;;;;;N;;;;; +164A;CANADIAN SYLLABICS CARRIER DZE;Lo;0;L;;;;;N;;;;; +164B;CANADIAN SYLLABICS CARRIER DZEE;Lo;0;L;;;;;N;;;;; +164C;CANADIAN SYLLABICS CARRIER DZI;Lo;0;L;;;;;N;;;;; +164D;CANADIAN SYLLABICS CARRIER DZA;Lo;0;L;;;;;N;;;;; +164E;CANADIAN SYLLABICS CARRIER SU;Lo;0;L;;;;;N;;;;; +164F;CANADIAN SYLLABICS CARRIER SO;Lo;0;L;;;;;N;;;;; +1650;CANADIAN SYLLABICS CARRIER SE;Lo;0;L;;;;;N;;;;; +1651;CANADIAN SYLLABICS CARRIER SEE;Lo;0;L;;;;;N;;;;; +1652;CANADIAN SYLLABICS CARRIER SI;Lo;0;L;;;;;N;;;;; +1653;CANADIAN SYLLABICS CARRIER SA;Lo;0;L;;;;;N;;;;; +1654;CANADIAN SYLLABICS CARRIER SHU;Lo;0;L;;;;;N;;;;; +1655;CANADIAN SYLLABICS CARRIER SHO;Lo;0;L;;;;;N;;;;; +1656;CANADIAN SYLLABICS CARRIER SHE;Lo;0;L;;;;;N;;;;; +1657;CANADIAN SYLLABICS CARRIER SHEE;Lo;0;L;;;;;N;;;;; +1658;CANADIAN SYLLABICS CARRIER SHI;Lo;0;L;;;;;N;;;;; +1659;CANADIAN SYLLABICS CARRIER SHA;Lo;0;L;;;;;N;;;;; +165A;CANADIAN SYLLABICS CARRIER SH;Lo;0;L;;;;;N;;;;; +165B;CANADIAN SYLLABICS CARRIER TSU;Lo;0;L;;;;;N;;;;; +165C;CANADIAN SYLLABICS CARRIER TSO;Lo;0;L;;;;;N;;;;; +165D;CANADIAN SYLLABICS CARRIER TSE;Lo;0;L;;;;;N;;;;; +165E;CANADIAN SYLLABICS CARRIER TSEE;Lo;0;L;;;;;N;;;;; +165F;CANADIAN SYLLABICS CARRIER TSI;Lo;0;L;;;;;N;;;;; +1660;CANADIAN SYLLABICS CARRIER TSA;Lo;0;L;;;;;N;;;;; +1661;CANADIAN SYLLABICS CARRIER CHU;Lo;0;L;;;;;N;;;;; +1662;CANADIAN SYLLABICS CARRIER CHO;Lo;0;L;;;;;N;;;;; +1663;CANADIAN SYLLABICS CARRIER CHE;Lo;0;L;;;;;N;;;;; +1664;CANADIAN SYLLABICS CARRIER CHEE;Lo;0;L;;;;;N;;;;; +1665;CANADIAN SYLLABICS CARRIER CHI;Lo;0;L;;;;;N;;;;; +1666;CANADIAN SYLLABICS CARRIER CHA;Lo;0;L;;;;;N;;;;; +1667;CANADIAN SYLLABICS CARRIER TTSU;Lo;0;L;;;;;N;;;;; +1668;CANADIAN SYLLABICS CARRIER TTSO;Lo;0;L;;;;;N;;;;; +1669;CANADIAN SYLLABICS CARRIER TTSE;Lo;0;L;;;;;N;;;;; +166A;CANADIAN SYLLABICS CARRIER TTSEE;Lo;0;L;;;;;N;;;;; +166B;CANADIAN SYLLABICS CARRIER TTSI;Lo;0;L;;;;;N;;;;; +166C;CANADIAN SYLLABICS CARRIER TTSA;Lo;0;L;;;;;N;;;;; +166D;CANADIAN SYLLABICS CHI SIGN;So;0;L;;;;;N;;;;; +166E;CANADIAN SYLLABICS FULL STOP;Po;0;L;;;;;N;;;;; +166F;CANADIAN SYLLABICS QAI;Lo;0;L;;;;;N;;;;; +1670;CANADIAN SYLLABICS NGAI;Lo;0;L;;;;;N;;;;; +1671;CANADIAN SYLLABICS NNGI;Lo;0;L;;;;;N;;;;; +1672;CANADIAN SYLLABICS NNGII;Lo;0;L;;;;;N;;;;; +1673;CANADIAN SYLLABICS NNGO;Lo;0;L;;;;;N;;;;; +1674;CANADIAN SYLLABICS NNGOO;Lo;0;L;;;;;N;;;;; +1675;CANADIAN SYLLABICS NNGA;Lo;0;L;;;;;N;;;;; +1676;CANADIAN SYLLABICS NNGAA;Lo;0;L;;;;;N;;;;; +1677;CANADIAN SYLLABICS WOODS-CREE THWEE;Lo;0;L;;;;;N;;;;; +1678;CANADIAN SYLLABICS WOODS-CREE THWI;Lo;0;L;;;;;N;;;;; +1679;CANADIAN SYLLABICS WOODS-CREE THWII;Lo;0;L;;;;;N;;;;; +167A;CANADIAN SYLLABICS WOODS-CREE THWO;Lo;0;L;;;;;N;;;;; +167B;CANADIAN SYLLABICS WOODS-CREE THWOO;Lo;0;L;;;;;N;;;;; +167C;CANADIAN SYLLABICS WOODS-CREE THWA;Lo;0;L;;;;;N;;;;; +167D;CANADIAN SYLLABICS WOODS-CREE THWAA;Lo;0;L;;;;;N;;;;; +167E;CANADIAN SYLLABICS WOODS-CREE FINAL TH;Lo;0;L;;;;;N;;;;; +167F;CANADIAN SYLLABICS BLACKFOOT W;Lo;0;L;;;;;N;;;;; +1680;OGHAM SPACE MARK;Zs;0;WS;;;;;N;;;;; +1681;OGHAM LETTER BEITH;Lo;0;L;;;;;N;;;;; +1682;OGHAM LETTER LUIS;Lo;0;L;;;;;N;;;;; +1683;OGHAM LETTER FEARN;Lo;0;L;;;;;N;;;;; +1684;OGHAM LETTER SAIL;Lo;0;L;;;;;N;;;;; +1685;OGHAM LETTER NION;Lo;0;L;;;;;N;;;;; +1686;OGHAM LETTER UATH;Lo;0;L;;;;;N;;;;; +1687;OGHAM LETTER DAIR;Lo;0;L;;;;;N;;;;; +1688;OGHAM LETTER TINNE;Lo;0;L;;;;;N;;;;; +1689;OGHAM LETTER COLL;Lo;0;L;;;;;N;;;;; +168A;OGHAM LETTER CEIRT;Lo;0;L;;;;;N;;;;; +168B;OGHAM LETTER MUIN;Lo;0;L;;;;;N;;;;; +168C;OGHAM LETTER GORT;Lo;0;L;;;;;N;;;;; +168D;OGHAM LETTER NGEADAL;Lo;0;L;;;;;N;;;;; +168E;OGHAM LETTER STRAIF;Lo;0;L;;;;;N;;;;; +168F;OGHAM LETTER RUIS;Lo;0;L;;;;;N;;;;; +1690;OGHAM LETTER AILM;Lo;0;L;;;;;N;;;;; +1691;OGHAM LETTER ONN;Lo;0;L;;;;;N;;;;; +1692;OGHAM LETTER UR;Lo;0;L;;;;;N;;;;; +1693;OGHAM LETTER EADHADH;Lo;0;L;;;;;N;;;;; +1694;OGHAM LETTER IODHADH;Lo;0;L;;;;;N;;;;; +1695;OGHAM LETTER EABHADH;Lo;0;L;;;;;N;;;;; +1696;OGHAM LETTER OR;Lo;0;L;;;;;N;;;;; +1697;OGHAM LETTER UILLEANN;Lo;0;L;;;;;N;;;;; +1698;OGHAM LETTER IFIN;Lo;0;L;;;;;N;;;;; +1699;OGHAM LETTER EAMHANCHOLL;Lo;0;L;;;;;N;;;;; +169A;OGHAM LETTER PEITH;Lo;0;L;;;;;N;;;;; +169B;OGHAM FEATHER MARK;Ps;0;ON;;;;;Y;;;;; +169C;OGHAM REVERSED FEATHER MARK;Pe;0;ON;;;;;Y;;;;; +16A0;RUNIC LETTER FEHU FEOH FE F;Lo;0;L;;;;;N;;;;; +16A1;RUNIC LETTER V;Lo;0;L;;;;;N;;;;; +16A2;RUNIC LETTER URUZ UR U;Lo;0;L;;;;;N;;;;; +16A3;RUNIC LETTER YR;Lo;0;L;;;;;N;;;;; +16A4;RUNIC LETTER Y;Lo;0;L;;;;;N;;;;; +16A5;RUNIC LETTER W;Lo;0;L;;;;;N;;;;; +16A6;RUNIC LETTER THURISAZ THURS THORN;Lo;0;L;;;;;N;;;;; +16A7;RUNIC LETTER ETH;Lo;0;L;;;;;N;;;;; +16A8;RUNIC LETTER ANSUZ A;Lo;0;L;;;;;N;;;;; +16A9;RUNIC LETTER OS O;Lo;0;L;;;;;N;;;;; +16AA;RUNIC LETTER AC A;Lo;0;L;;;;;N;;;;; +16AB;RUNIC LETTER AESC;Lo;0;L;;;;;N;;;;; +16AC;RUNIC LETTER LONG-BRANCH-OSS O;Lo;0;L;;;;;N;;;;; +16AD;RUNIC LETTER SHORT-TWIG-OSS O;Lo;0;L;;;;;N;;;;; +16AE;RUNIC LETTER O;Lo;0;L;;;;;N;;;;; +16AF;RUNIC LETTER OE;Lo;0;L;;;;;N;;;;; +16B0;RUNIC LETTER ON;Lo;0;L;;;;;N;;;;; +16B1;RUNIC LETTER RAIDO RAD REID R;Lo;0;L;;;;;N;;;;; +16B2;RUNIC LETTER KAUNA;Lo;0;L;;;;;N;;;;; +16B3;RUNIC LETTER CEN;Lo;0;L;;;;;N;;;;; +16B4;RUNIC LETTER KAUN K;Lo;0;L;;;;;N;;;;; +16B5;RUNIC LETTER G;Lo;0;L;;;;;N;;;;; +16B6;RUNIC LETTER ENG;Lo;0;L;;;;;N;;;;; +16B7;RUNIC LETTER GEBO GYFU G;Lo;0;L;;;;;N;;;;; +16B8;RUNIC LETTER GAR;Lo;0;L;;;;;N;;;;; +16B9;RUNIC LETTER WUNJO WYNN W;Lo;0;L;;;;;N;;;;; +16BA;RUNIC LETTER HAGLAZ H;Lo;0;L;;;;;N;;;;; +16BB;RUNIC LETTER HAEGL H;Lo;0;L;;;;;N;;;;; +16BC;RUNIC LETTER LONG-BRANCH-HAGALL H;Lo;0;L;;;;;N;;;;; +16BD;RUNIC LETTER SHORT-TWIG-HAGALL H;Lo;0;L;;;;;N;;;;; +16BE;RUNIC LETTER NAUDIZ NYD NAUD N;Lo;0;L;;;;;N;;;;; +16BF;RUNIC LETTER SHORT-TWIG-NAUD N;Lo;0;L;;;;;N;;;;; +16C0;RUNIC LETTER DOTTED-N;Lo;0;L;;;;;N;;;;; +16C1;RUNIC LETTER ISAZ IS ISS I;Lo;0;L;;;;;N;;;;; +16C2;RUNIC LETTER E;Lo;0;L;;;;;N;;;;; +16C3;RUNIC LETTER JERAN J;Lo;0;L;;;;;N;;;;; +16C4;RUNIC LETTER GER;Lo;0;L;;;;;N;;;;; +16C5;RUNIC LETTER LONG-BRANCH-AR AE;Lo;0;L;;;;;N;;;;; +16C6;RUNIC LETTER SHORT-TWIG-AR A;Lo;0;L;;;;;N;;;;; +16C7;RUNIC LETTER IWAZ EOH;Lo;0;L;;;;;N;;;;; +16C8;RUNIC LETTER PERTHO PEORTH P;Lo;0;L;;;;;N;;;;; +16C9;RUNIC LETTER ALGIZ EOLHX;Lo;0;L;;;;;N;;;;; +16CA;RUNIC LETTER SOWILO S;Lo;0;L;;;;;N;;;;; +16CB;RUNIC LETTER SIGEL LONG-BRANCH-SOL S;Lo;0;L;;;;;N;;;;; +16CC;RUNIC LETTER SHORT-TWIG-SOL S;Lo;0;L;;;;;N;;;;; +16CD;RUNIC LETTER C;Lo;0;L;;;;;N;;;;; +16CE;RUNIC LETTER Z;Lo;0;L;;;;;N;;;;; +16CF;RUNIC LETTER TIWAZ TIR TYR T;Lo;0;L;;;;;N;;;;; +16D0;RUNIC LETTER SHORT-TWIG-TYR T;Lo;0;L;;;;;N;;;;; +16D1;RUNIC LETTER D;Lo;0;L;;;;;N;;;;; +16D2;RUNIC LETTER BERKANAN BEORC BJARKAN B;Lo;0;L;;;;;N;;;;; +16D3;RUNIC LETTER SHORT-TWIG-BJARKAN B;Lo;0;L;;;;;N;;;;; +16D4;RUNIC LETTER DOTTED-P;Lo;0;L;;;;;N;;;;; +16D5;RUNIC LETTER OPEN-P;Lo;0;L;;;;;N;;;;; +16D6;RUNIC LETTER EHWAZ EH E;Lo;0;L;;;;;N;;;;; +16D7;RUNIC LETTER MANNAZ MAN M;Lo;0;L;;;;;N;;;;; +16D8;RUNIC LETTER LONG-BRANCH-MADR M;Lo;0;L;;;;;N;;;;; +16D9;RUNIC LETTER SHORT-TWIG-MADR M;Lo;0;L;;;;;N;;;;; +16DA;RUNIC LETTER LAUKAZ LAGU LOGR L;Lo;0;L;;;;;N;;;;; +16DB;RUNIC LETTER DOTTED-L;Lo;0;L;;;;;N;;;;; +16DC;RUNIC LETTER INGWAZ;Lo;0;L;;;;;N;;;;; +16DD;RUNIC LETTER ING;Lo;0;L;;;;;N;;;;; +16DE;RUNIC LETTER DAGAZ DAEG D;Lo;0;L;;;;;N;;;;; +16DF;RUNIC LETTER OTHALAN ETHEL O;Lo;0;L;;;;;N;;;;; +16E0;RUNIC LETTER EAR;Lo;0;L;;;;;N;;;;; +16E1;RUNIC LETTER IOR;Lo;0;L;;;;;N;;;;; +16E2;RUNIC LETTER CWEORTH;Lo;0;L;;;;;N;;;;; +16E3;RUNIC LETTER CALC;Lo;0;L;;;;;N;;;;; +16E4;RUNIC LETTER CEALC;Lo;0;L;;;;;N;;;;; +16E5;RUNIC LETTER STAN;Lo;0;L;;;;;N;;;;; +16E6;RUNIC LETTER LONG-BRANCH-YR;Lo;0;L;;;;;N;;;;; +16E7;RUNIC LETTER SHORT-TWIG-YR;Lo;0;L;;;;;N;;;;; +16E8;RUNIC LETTER ICELANDIC-YR;Lo;0;L;;;;;N;;;;; +16E9;RUNIC LETTER Q;Lo;0;L;;;;;N;;;;; +16EA;RUNIC LETTER X;Lo;0;L;;;;;N;;;;; +16EB;RUNIC SINGLE PUNCTUATION;Po;0;L;;;;;N;;;;; +16EC;RUNIC MULTIPLE PUNCTUATION;Po;0;L;;;;;N;;;;; +16ED;RUNIC CROSS PUNCTUATION;Po;0;L;;;;;N;;;;; +16EE;RUNIC ARLAUG SYMBOL;Nl;0;L;;;;17;N;;;;; +16EF;RUNIC TVIMADUR SYMBOL;Nl;0;L;;;;18;N;;;;; +16F0;RUNIC BELGTHOR SYMBOL;Nl;0;L;;;;19;N;;;;; +16F1;RUNIC LETTER K;Lo;0;L;;;;;N;;;;; +16F2;RUNIC LETTER SH;Lo;0;L;;;;;N;;;;; +16F3;RUNIC LETTER OO;Lo;0;L;;;;;N;;;;; +16F4;RUNIC LETTER FRANKS CASKET OS;Lo;0;L;;;;;N;;;;; +16F5;RUNIC LETTER FRANKS CASKET IS;Lo;0;L;;;;;N;;;;; +16F6;RUNIC LETTER FRANKS CASKET EH;Lo;0;L;;;;;N;;;;; +16F7;RUNIC LETTER FRANKS CASKET AC;Lo;0;L;;;;;N;;;;; +16F8;RUNIC LETTER FRANKS CASKET AESC;Lo;0;L;;;;;N;;;;; +1700;TAGALOG LETTER A;Lo;0;L;;;;;N;;;;; +1701;TAGALOG LETTER I;Lo;0;L;;;;;N;;;;; +1702;TAGALOG LETTER U;Lo;0;L;;;;;N;;;;; +1703;TAGALOG LETTER KA;Lo;0;L;;;;;N;;;;; +1704;TAGALOG LETTER GA;Lo;0;L;;;;;N;;;;; +1705;TAGALOG LETTER NGA;Lo;0;L;;;;;N;;;;; +1706;TAGALOG LETTER TA;Lo;0;L;;;;;N;;;;; +1707;TAGALOG LETTER DA;Lo;0;L;;;;;N;;;;; +1708;TAGALOG LETTER NA;Lo;0;L;;;;;N;;;;; +1709;TAGALOG LETTER PA;Lo;0;L;;;;;N;;;;; +170A;TAGALOG LETTER BA;Lo;0;L;;;;;N;;;;; +170B;TAGALOG LETTER MA;Lo;0;L;;;;;N;;;;; +170C;TAGALOG LETTER YA;Lo;0;L;;;;;N;;;;; +170E;TAGALOG LETTER LA;Lo;0;L;;;;;N;;;;; +170F;TAGALOG LETTER WA;Lo;0;L;;;;;N;;;;; +1710;TAGALOG LETTER SA;Lo;0;L;;;;;N;;;;; +1711;TAGALOG LETTER HA;Lo;0;L;;;;;N;;;;; +1712;TAGALOG VOWEL SIGN I;Mn;0;NSM;;;;;N;;;;; +1713;TAGALOG VOWEL SIGN U;Mn;0;NSM;;;;;N;;;;; +1714;TAGALOG SIGN VIRAMA;Mn;9;NSM;;;;;N;;;;; +1720;HANUNOO LETTER A;Lo;0;L;;;;;N;;;;; +1721;HANUNOO LETTER I;Lo;0;L;;;;;N;;;;; +1722;HANUNOO LETTER U;Lo;0;L;;;;;N;;;;; +1723;HANUNOO LETTER KA;Lo;0;L;;;;;N;;;;; +1724;HANUNOO LETTER GA;Lo;0;L;;;;;N;;;;; +1725;HANUNOO LETTER NGA;Lo;0;L;;;;;N;;;;; +1726;HANUNOO LETTER TA;Lo;0;L;;;;;N;;;;; +1727;HANUNOO LETTER DA;Lo;0;L;;;;;N;;;;; +1728;HANUNOO LETTER NA;Lo;0;L;;;;;N;;;;; +1729;HANUNOO LETTER PA;Lo;0;L;;;;;N;;;;; +172A;HANUNOO LETTER BA;Lo;0;L;;;;;N;;;;; +172B;HANUNOO LETTER MA;Lo;0;L;;;;;N;;;;; +172C;HANUNOO LETTER YA;Lo;0;L;;;;;N;;;;; +172D;HANUNOO LETTER RA;Lo;0;L;;;;;N;;;;; +172E;HANUNOO LETTER LA;Lo;0;L;;;;;N;;;;; +172F;HANUNOO LETTER WA;Lo;0;L;;;;;N;;;;; +1730;HANUNOO LETTER SA;Lo;0;L;;;;;N;;;;; +1731;HANUNOO LETTER HA;Lo;0;L;;;;;N;;;;; +1732;HANUNOO VOWEL SIGN I;Mn;0;NSM;;;;;N;;;;; +1733;HANUNOO VOWEL SIGN U;Mn;0;NSM;;;;;N;;;;; +1734;HANUNOO SIGN PAMUDPOD;Mn;9;NSM;;;;;N;;;;; +1735;PHILIPPINE SINGLE PUNCTUATION;Po;0;L;;;;;N;;;;; +1736;PHILIPPINE DOUBLE PUNCTUATION;Po;0;L;;;;;N;;;;; +1740;BUHID LETTER A;Lo;0;L;;;;;N;;;;; +1741;BUHID LETTER I;Lo;0;L;;;;;N;;;;; +1742;BUHID LETTER U;Lo;0;L;;;;;N;;;;; +1743;BUHID LETTER KA;Lo;0;L;;;;;N;;;;; +1744;BUHID LETTER GA;Lo;0;L;;;;;N;;;;; +1745;BUHID LETTER NGA;Lo;0;L;;;;;N;;;;; +1746;BUHID LETTER TA;Lo;0;L;;;;;N;;;;; +1747;BUHID LETTER DA;Lo;0;L;;;;;N;;;;; +1748;BUHID LETTER NA;Lo;0;L;;;;;N;;;;; +1749;BUHID LETTER PA;Lo;0;L;;;;;N;;;;; +174A;BUHID LETTER BA;Lo;0;L;;;;;N;;;;; +174B;BUHID LETTER MA;Lo;0;L;;;;;N;;;;; +174C;BUHID LETTER YA;Lo;0;L;;;;;N;;;;; +174D;BUHID LETTER RA;Lo;0;L;;;;;N;;;;; +174E;BUHID LETTER LA;Lo;0;L;;;;;N;;;;; +174F;BUHID LETTER WA;Lo;0;L;;;;;N;;;;; +1750;BUHID LETTER SA;Lo;0;L;;;;;N;;;;; +1751;BUHID LETTER HA;Lo;0;L;;;;;N;;;;; +1752;BUHID VOWEL SIGN I;Mn;0;NSM;;;;;N;;;;; +1753;BUHID VOWEL SIGN U;Mn;0;NSM;;;;;N;;;;; +1760;TAGBANWA LETTER A;Lo;0;L;;;;;N;;;;; +1761;TAGBANWA LETTER I;Lo;0;L;;;;;N;;;;; +1762;TAGBANWA LETTER U;Lo;0;L;;;;;N;;;;; +1763;TAGBANWA LETTER KA;Lo;0;L;;;;;N;;;;; +1764;TAGBANWA LETTER GA;Lo;0;L;;;;;N;;;;; +1765;TAGBANWA LETTER NGA;Lo;0;L;;;;;N;;;;; +1766;TAGBANWA LETTER TA;Lo;0;L;;;;;N;;;;; +1767;TAGBANWA LETTER DA;Lo;0;L;;;;;N;;;;; +1768;TAGBANWA LETTER NA;Lo;0;L;;;;;N;;;;; +1769;TAGBANWA LETTER PA;Lo;0;L;;;;;N;;;;; +176A;TAGBANWA LETTER BA;Lo;0;L;;;;;N;;;;; +176B;TAGBANWA LETTER MA;Lo;0;L;;;;;N;;;;; +176C;TAGBANWA LETTER YA;Lo;0;L;;;;;N;;;;; +176E;TAGBANWA LETTER LA;Lo;0;L;;;;;N;;;;; +176F;TAGBANWA LETTER WA;Lo;0;L;;;;;N;;;;; +1770;TAGBANWA LETTER SA;Lo;0;L;;;;;N;;;;; +1772;TAGBANWA VOWEL SIGN I;Mn;0;NSM;;;;;N;;;;; +1773;TAGBANWA VOWEL SIGN U;Mn;0;NSM;;;;;N;;;;; +1780;KHMER LETTER KA;Lo;0;L;;;;;N;;;;; +1781;KHMER LETTER KHA;Lo;0;L;;;;;N;;;;; +1782;KHMER LETTER KO;Lo;0;L;;;;;N;;;;; +1783;KHMER LETTER KHO;Lo;0;L;;;;;N;;;;; +1784;KHMER LETTER NGO;Lo;0;L;;;;;N;;;;; +1785;KHMER LETTER CA;Lo;0;L;;;;;N;;;;; +1786;KHMER LETTER CHA;Lo;0;L;;;;;N;;;;; +1787;KHMER LETTER CO;Lo;0;L;;;;;N;;;;; +1788;KHMER LETTER CHO;Lo;0;L;;;;;N;;;;; +1789;KHMER LETTER NYO;Lo;0;L;;;;;N;;;;; +178A;KHMER LETTER DA;Lo;0;L;;;;;N;;;;; +178B;KHMER LETTER TTHA;Lo;0;L;;;;;N;;;;; +178C;KHMER LETTER DO;Lo;0;L;;;;;N;;;;; +178D;KHMER LETTER TTHO;Lo;0;L;;;;;N;;;;; +178E;KHMER LETTER NNO;Lo;0;L;;;;;N;;;;; +178F;KHMER LETTER TA;Lo;0;L;;;;;N;;;;; +1790;KHMER LETTER THA;Lo;0;L;;;;;N;;;;; +1791;KHMER LETTER TO;Lo;0;L;;;;;N;;;;; +1792;KHMER LETTER THO;Lo;0;L;;;;;N;;;;; +1793;KHMER LETTER NO;Lo;0;L;;;;;N;;;;; +1794;KHMER LETTER BA;Lo;0;L;;;;;N;;;;; +1795;KHMER LETTER PHA;Lo;0;L;;;;;N;;;;; +1796;KHMER LETTER PO;Lo;0;L;;;;;N;;;;; +1797;KHMER LETTER PHO;Lo;0;L;;;;;N;;;;; +1798;KHMER LETTER MO;Lo;0;L;;;;;N;;;;; +1799;KHMER LETTER YO;Lo;0;L;;;;;N;;;;; +179A;KHMER LETTER RO;Lo;0;L;;;;;N;;;;; +179B;KHMER LETTER LO;Lo;0;L;;;;;N;;;;; +179C;KHMER LETTER VO;Lo;0;L;;;;;N;;;;; +179D;KHMER LETTER SHA;Lo;0;L;;;;;N;;;;; +179E;KHMER LETTER SSO;Lo;0;L;;;;;N;;;;; +179F;KHMER LETTER SA;Lo;0;L;;;;;N;;;;; +17A0;KHMER LETTER HA;Lo;0;L;;;;;N;;;;; +17A1;KHMER LETTER LA;Lo;0;L;;;;;N;;;;; +17A2;KHMER LETTER QA;Lo;0;L;;;;;N;;;;; +17A3;KHMER INDEPENDENT VOWEL QAQ;Lo;0;L;;;;;N;;;;; +17A4;KHMER INDEPENDENT VOWEL QAA;Lo;0;L;;;;;N;;;;; +17A5;KHMER INDEPENDENT VOWEL QI;Lo;0;L;;;;;N;;;;; +17A6;KHMER INDEPENDENT VOWEL QII;Lo;0;L;;;;;N;;;;; +17A7;KHMER INDEPENDENT VOWEL QU;Lo;0;L;;;;;N;;;;; +17A8;KHMER INDEPENDENT VOWEL QUK;Lo;0;L;;;;;N;;;;; +17A9;KHMER INDEPENDENT VOWEL QUU;Lo;0;L;;;;;N;;;;; +17AA;KHMER INDEPENDENT VOWEL QUUV;Lo;0;L;;;;;N;;;;; +17AB;KHMER INDEPENDENT VOWEL RY;Lo;0;L;;;;;N;;;;; +17AC;KHMER INDEPENDENT VOWEL RYY;Lo;0;L;;;;;N;;;;; +17AD;KHMER INDEPENDENT VOWEL LY;Lo;0;L;;;;;N;;;;; +17AE;KHMER INDEPENDENT VOWEL LYY;Lo;0;L;;;;;N;;;;; +17AF;KHMER INDEPENDENT VOWEL QE;Lo;0;L;;;;;N;;;;; +17B0;KHMER INDEPENDENT VOWEL QAI;Lo;0;L;;;;;N;;;;; +17B1;KHMER INDEPENDENT VOWEL QOO TYPE ONE;Lo;0;L;;;;;N;;;;; +17B2;KHMER INDEPENDENT VOWEL QOO TYPE TWO;Lo;0;L;;;;;N;;;;; +17B3;KHMER INDEPENDENT VOWEL QAU;Lo;0;L;;;;;N;;;;; +17B4;KHMER VOWEL INHERENT AQ;Mn;0;NSM;;;;;N;;;;; +17B5;KHMER VOWEL INHERENT AA;Mn;0;NSM;;;;;N;;;;; +17B6;KHMER VOWEL SIGN AA;Mc;0;L;;;;;N;;;;; +17B7;KHMER VOWEL SIGN I;Mn;0;NSM;;;;;N;;;;; +17B8;KHMER VOWEL SIGN II;Mn;0;NSM;;;;;N;;;;; +17B9;KHMER VOWEL SIGN Y;Mn;0;NSM;;;;;N;;;;; +17BA;KHMER VOWEL SIGN YY;Mn;0;NSM;;;;;N;;;;; +17BB;KHMER VOWEL SIGN U;Mn;0;NSM;;;;;N;;;;; +17BC;KHMER VOWEL SIGN UU;Mn;0;NSM;;;;;N;;;;; +17BD;KHMER VOWEL SIGN UA;Mn;0;NSM;;;;;N;;;;; +17BE;KHMER VOWEL SIGN OE;Mc;0;L;;;;;N;;;;; +17BF;KHMER VOWEL SIGN YA;Mc;0;L;;;;;N;;;;; +17C0;KHMER VOWEL SIGN IE;Mc;0;L;;;;;N;;;;; +17C1;KHMER VOWEL SIGN E;Mc;0;L;;;;;N;;;;; +17C2;KHMER VOWEL SIGN AE;Mc;0;L;;;;;N;;;;; +17C3;KHMER VOWEL SIGN AI;Mc;0;L;;;;;N;;;;; +17C4;KHMER VOWEL SIGN OO;Mc;0;L;;;;;N;;;;; +17C5;KHMER VOWEL SIGN AU;Mc;0;L;;;;;N;;;;; +17C6;KHMER SIGN NIKAHIT;Mn;0;NSM;;;;;N;;;;; +17C7;KHMER SIGN REAHMUK;Mc;0;L;;;;;N;;;;; +17C8;KHMER SIGN YUUKALEAPINTU;Mc;0;L;;;;;N;;;;; +17C9;KHMER SIGN MUUSIKATOAN;Mn;0;NSM;;;;;N;;;;; +17CA;KHMER SIGN TRIISAP;Mn;0;NSM;;;;;N;;;;; +17CB;KHMER SIGN BANTOC;Mn;0;NSM;;;;;N;;;;; +17CC;KHMER SIGN ROBAT;Mn;0;NSM;;;;;N;;;;; +17CD;KHMER SIGN TOANDAKHIAT;Mn;0;NSM;;;;;N;;;;; +17CE;KHMER SIGN KAKABAT;Mn;0;NSM;;;;;N;;;;; +17CF;KHMER SIGN AHSDA;Mn;0;NSM;;;;;N;;;;; +17D0;KHMER SIGN SAMYOK SANNYA;Mn;0;NSM;;;;;N;;;;; +17D1;KHMER SIGN VIRIAM;Mn;0;NSM;;;;;N;;;;; +17D2;KHMER SIGN COENG;Mn;9;NSM;;;;;N;;;;; +17D3;KHMER SIGN BATHAMASAT;Mn;0;NSM;;;;;N;;;;; +17D4;KHMER SIGN KHAN;Po;0;L;;;;;N;;;;; +17D5;KHMER SIGN BARIYOOSAN;Po;0;L;;;;;N;;;;; +17D6;KHMER SIGN CAMNUC PII KUUH;Po;0;L;;;;;N;;;;; +17D7;KHMER SIGN LEK TOO;Lm;0;L;;;;;N;;;;; +17D8;KHMER SIGN BEYYAL;Po;0;L;;;;;N;;;;; +17D9;KHMER SIGN PHNAEK MUAN;Po;0;L;;;;;N;;;;; +17DA;KHMER SIGN KOOMUUT;Po;0;L;;;;;N;;;;; +17DB;KHMER CURRENCY SYMBOL RIEL;Sc;0;ET;;;;;N;;;;; +17DC;KHMER SIGN AVAKRAHASANYA;Lo;0;L;;;;;N;;;;; +17DD;KHMER SIGN ATTHACAN;Mn;230;NSM;;;;;N;;;;; +17E0;KHMER DIGIT ZERO;Nd;0;L;;0;0;0;N;;;;; +17E1;KHMER DIGIT ONE;Nd;0;L;;1;1;1;N;;;;; +17E2;KHMER DIGIT TWO;Nd;0;L;;2;2;2;N;;;;; +17E3;KHMER DIGIT THREE;Nd;0;L;;3;3;3;N;;;;; +17E4;KHMER DIGIT FOUR;Nd;0;L;;4;4;4;N;;;;; +17E5;KHMER DIGIT FIVE;Nd;0;L;;5;5;5;N;;;;; +17E6;KHMER DIGIT SIX;Nd;0;L;;6;6;6;N;;;;; +17E7;KHMER DIGIT SEVEN;Nd;0;L;;7;7;7;N;;;;; +17E8;KHMER DIGIT EIGHT;Nd;0;L;;8;8;8;N;;;;; +17E9;KHMER DIGIT NINE;Nd;0;L;;9;9;9;N;;;;; +17F0;KHMER SYMBOL LEK ATTAK SON;No;0;ON;;;;0;N;;;;; +17F1;KHMER SYMBOL LEK ATTAK MUOY;No;0;ON;;;;1;N;;;;; +17F2;KHMER SYMBOL LEK ATTAK PII;No;0;ON;;;;2;N;;;;; +17F3;KHMER SYMBOL LEK ATTAK BEI;No;0;ON;;;;3;N;;;;; +17F4;KHMER SYMBOL LEK ATTAK BUON;No;0;ON;;;;4;N;;;;; +17F5;KHMER SYMBOL LEK ATTAK PRAM;No;0;ON;;;;5;N;;;;; +17F6;KHMER SYMBOL LEK ATTAK PRAM-MUOY;No;0;ON;;;;6;N;;;;; +17F7;KHMER SYMBOL LEK ATTAK PRAM-PII;No;0;ON;;;;7;N;;;;; +17F8;KHMER SYMBOL LEK ATTAK PRAM-BEI;No;0;ON;;;;8;N;;;;; +17F9;KHMER SYMBOL LEK ATTAK PRAM-BUON;No;0;ON;;;;9;N;;;;; +1800;MONGOLIAN BIRGA;Po;0;ON;;;;;N;;;;; +1801;MONGOLIAN ELLIPSIS;Po;0;ON;;;;;N;;;;; +1802;MONGOLIAN COMMA;Po;0;ON;;;;;N;;;;; +1803;MONGOLIAN FULL STOP;Po;0;ON;;;;;N;;;;; +1804;MONGOLIAN COLON;Po;0;ON;;;;;N;;;;; +1805;MONGOLIAN FOUR DOTS;Po;0;ON;;;;;N;;;;; +1806;MONGOLIAN TODO SOFT HYPHEN;Pd;0;ON;;;;;N;;;;; +1807;MONGOLIAN SIBE SYLLABLE BOUNDARY MARKER;Po;0;ON;;;;;N;;;;; +1808;MONGOLIAN MANCHU COMMA;Po;0;ON;;;;;N;;;;; +1809;MONGOLIAN MANCHU FULL STOP;Po;0;ON;;;;;N;;;;; +180A;MONGOLIAN NIRUGU;Po;0;ON;;;;;N;;;;; +180B;MONGOLIAN FREE VARIATION SELECTOR ONE;Mn;0;NSM;;;;;N;;;;; +180C;MONGOLIAN FREE VARIATION SELECTOR TWO;Mn;0;NSM;;;;;N;;;;; +180D;MONGOLIAN FREE VARIATION SELECTOR THREE;Mn;0;NSM;;;;;N;;;;; +180E;MONGOLIAN VOWEL SEPARATOR;Cf;0;BN;;;;;N;;;;; +1810;MONGOLIAN DIGIT ZERO;Nd;0;L;;0;0;0;N;;;;; +1811;MONGOLIAN DIGIT ONE;Nd;0;L;;1;1;1;N;;;;; +1812;MONGOLIAN DIGIT TWO;Nd;0;L;;2;2;2;N;;;;; +1813;MONGOLIAN DIGIT THREE;Nd;0;L;;3;3;3;N;;;;; +1814;MONGOLIAN DIGIT FOUR;Nd;0;L;;4;4;4;N;;;;; +1815;MONGOLIAN DIGIT FIVE;Nd;0;L;;5;5;5;N;;;;; +1816;MONGOLIAN DIGIT SIX;Nd;0;L;;6;6;6;N;;;;; +1817;MONGOLIAN DIGIT SEVEN;Nd;0;L;;7;7;7;N;;;;; +1818;MONGOLIAN DIGIT EIGHT;Nd;0;L;;8;8;8;N;;;;; +1819;MONGOLIAN DIGIT NINE;Nd;0;L;;9;9;9;N;;;;; +1820;MONGOLIAN LETTER A;Lo;0;L;;;;;N;;;;; +1821;MONGOLIAN LETTER E;Lo;0;L;;;;;N;;;;; +1822;MONGOLIAN LETTER I;Lo;0;L;;;;;N;;;;; +1823;MONGOLIAN LETTER O;Lo;0;L;;;;;N;;;;; +1824;MONGOLIAN LETTER U;Lo;0;L;;;;;N;;;;; +1825;MONGOLIAN LETTER OE;Lo;0;L;;;;;N;;;;; +1826;MONGOLIAN LETTER UE;Lo;0;L;;;;;N;;;;; +1827;MONGOLIAN LETTER EE;Lo;0;L;;;;;N;;;;; +1828;MONGOLIAN LETTER NA;Lo;0;L;;;;;N;;;;; +1829;MONGOLIAN LETTER ANG;Lo;0;L;;;;;N;;;;; +182A;MONGOLIAN LETTER BA;Lo;0;L;;;;;N;;;;; +182B;MONGOLIAN LETTER PA;Lo;0;L;;;;;N;;;;; +182C;MONGOLIAN LETTER QA;Lo;0;L;;;;;N;;;;; +182D;MONGOLIAN LETTER GA;Lo;0;L;;;;;N;;;;; +182E;MONGOLIAN LETTER MA;Lo;0;L;;;;;N;;;;; +182F;MONGOLIAN LETTER LA;Lo;0;L;;;;;N;;;;; +1830;MONGOLIAN LETTER SA;Lo;0;L;;;;;N;;;;; +1831;MONGOLIAN LETTER SHA;Lo;0;L;;;;;N;;;;; +1832;MONGOLIAN LETTER TA;Lo;0;L;;;;;N;;;;; +1833;MONGOLIAN LETTER DA;Lo;0;L;;;;;N;;;;; +1834;MONGOLIAN LETTER CHA;Lo;0;L;;;;;N;;;;; +1835;MONGOLIAN LETTER JA;Lo;0;L;;;;;N;;;;; +1836;MONGOLIAN LETTER YA;Lo;0;L;;;;;N;;;;; +1837;MONGOLIAN LETTER RA;Lo;0;L;;;;;N;;;;; +1838;MONGOLIAN LETTER WA;Lo;0;L;;;;;N;;;;; +1839;MONGOLIAN LETTER FA;Lo;0;L;;;;;N;;;;; +183A;MONGOLIAN LETTER KA;Lo;0;L;;;;;N;;;;; +183B;MONGOLIAN LETTER KHA;Lo;0;L;;;;;N;;;;; +183C;MONGOLIAN LETTER TSA;Lo;0;L;;;;;N;;;;; +183D;MONGOLIAN LETTER ZA;Lo;0;L;;;;;N;;;;; +183E;MONGOLIAN LETTER HAA;Lo;0;L;;;;;N;;;;; +183F;MONGOLIAN LETTER ZRA;Lo;0;L;;;;;N;;;;; +1840;MONGOLIAN LETTER LHA;Lo;0;L;;;;;N;;;;; +1841;MONGOLIAN LETTER ZHI;Lo;0;L;;;;;N;;;;; +1842;MONGOLIAN LETTER CHI;Lo;0;L;;;;;N;;;;; +1843;MONGOLIAN LETTER TODO LONG VOWEL SIGN;Lm;0;L;;;;;N;;;;; +1844;MONGOLIAN LETTER TODO E;Lo;0;L;;;;;N;;;;; +1845;MONGOLIAN LETTER TODO I;Lo;0;L;;;;;N;;;;; +1846;MONGOLIAN LETTER TODO O;Lo;0;L;;;;;N;;;;; +1847;MONGOLIAN LETTER TODO U;Lo;0;L;;;;;N;;;;; +1848;MONGOLIAN LETTER TODO OE;Lo;0;L;;;;;N;;;;; +1849;MONGOLIAN LETTER TODO UE;Lo;0;L;;;;;N;;;;; +184A;MONGOLIAN LETTER TODO ANG;Lo;0;L;;;;;N;;;;; +184B;MONGOLIAN LETTER TODO BA;Lo;0;L;;;;;N;;;;; +184C;MONGOLIAN LETTER TODO PA;Lo;0;L;;;;;N;;;;; +184D;MONGOLIAN LETTER TODO QA;Lo;0;L;;;;;N;;;;; +184E;MONGOLIAN LETTER TODO GA;Lo;0;L;;;;;N;;;;; +184F;MONGOLIAN LETTER TODO MA;Lo;0;L;;;;;N;;;;; +1850;MONGOLIAN LETTER TODO TA;Lo;0;L;;;;;N;;;;; +1851;MONGOLIAN LETTER TODO DA;Lo;0;L;;;;;N;;;;; +1852;MONGOLIAN LETTER TODO CHA;Lo;0;L;;;;;N;;;;; +1853;MONGOLIAN LETTER TODO JA;Lo;0;L;;;;;N;;;;; +1854;MONGOLIAN LETTER TODO TSA;Lo;0;L;;;;;N;;;;; +1855;MONGOLIAN LETTER TODO YA;Lo;0;L;;;;;N;;;;; +1856;MONGOLIAN LETTER TODO WA;Lo;0;L;;;;;N;;;;; +1857;MONGOLIAN LETTER TODO KA;Lo;0;L;;;;;N;;;;; +1858;MONGOLIAN LETTER TODO GAA;Lo;0;L;;;;;N;;;;; +1859;MONGOLIAN LETTER TODO HAA;Lo;0;L;;;;;N;;;;; +185A;MONGOLIAN LETTER TODO JIA;Lo;0;L;;;;;N;;;;; +185B;MONGOLIAN LETTER TODO NIA;Lo;0;L;;;;;N;;;;; +185C;MONGOLIAN LETTER TODO DZA;Lo;0;L;;;;;N;;;;; +185D;MONGOLIAN LETTER SIBE E;Lo;0;L;;;;;N;;;;; +185E;MONGOLIAN LETTER SIBE I;Lo;0;L;;;;;N;;;;; +185F;MONGOLIAN LETTER SIBE IY;Lo;0;L;;;;;N;;;;; +1860;MONGOLIAN LETTER SIBE UE;Lo;0;L;;;;;N;;;;; +1861;MONGOLIAN LETTER SIBE U;Lo;0;L;;;;;N;;;;; +1862;MONGOLIAN LETTER SIBE ANG;Lo;0;L;;;;;N;;;;; +1863;MONGOLIAN LETTER SIBE KA;Lo;0;L;;;;;N;;;;; +1864;MONGOLIAN LETTER SIBE GA;Lo;0;L;;;;;N;;;;; +1865;MONGOLIAN LETTER SIBE HA;Lo;0;L;;;;;N;;;;; +1866;MONGOLIAN LETTER SIBE PA;Lo;0;L;;;;;N;;;;; +1867;MONGOLIAN LETTER SIBE SHA;Lo;0;L;;;;;N;;;;; +1868;MONGOLIAN LETTER SIBE TA;Lo;0;L;;;;;N;;;;; +1869;MONGOLIAN LETTER SIBE DA;Lo;0;L;;;;;N;;;;; +186A;MONGOLIAN LETTER SIBE JA;Lo;0;L;;;;;N;;;;; +186B;MONGOLIAN LETTER SIBE FA;Lo;0;L;;;;;N;;;;; +186C;MONGOLIAN LETTER SIBE GAA;Lo;0;L;;;;;N;;;;; +186D;MONGOLIAN LETTER SIBE HAA;Lo;0;L;;;;;N;;;;; +186E;MONGOLIAN LETTER SIBE TSA;Lo;0;L;;;;;N;;;;; +186F;MONGOLIAN LETTER SIBE ZA;Lo;0;L;;;;;N;;;;; +1870;MONGOLIAN LETTER SIBE RAA;Lo;0;L;;;;;N;;;;; +1871;MONGOLIAN LETTER SIBE CHA;Lo;0;L;;;;;N;;;;; +1872;MONGOLIAN LETTER SIBE ZHA;Lo;0;L;;;;;N;;;;; +1873;MONGOLIAN LETTER MANCHU I;Lo;0;L;;;;;N;;;;; +1874;MONGOLIAN LETTER MANCHU KA;Lo;0;L;;;;;N;;;;; +1875;MONGOLIAN LETTER MANCHU RA;Lo;0;L;;;;;N;;;;; +1876;MONGOLIAN LETTER MANCHU FA;Lo;0;L;;;;;N;;;;; +1877;MONGOLIAN LETTER MANCHU ZHA;Lo;0;L;;;;;N;;;;; +1878;MONGOLIAN LETTER CHA WITH TWO DOTS;Lo;0;L;;;;;N;;;;; +1880;MONGOLIAN LETTER ALI GALI ANUSVARA ONE;Lo;0;L;;;;;N;;;;; +1881;MONGOLIAN LETTER ALI GALI VISARGA ONE;Lo;0;L;;;;;N;;;;; +1882;MONGOLIAN LETTER ALI GALI DAMARU;Lo;0;L;;;;;N;;;;; +1883;MONGOLIAN LETTER ALI GALI UBADAMA;Lo;0;L;;;;;N;;;;; +1884;MONGOLIAN LETTER ALI GALI INVERTED UBADAMA;Lo;0;L;;;;;N;;;;; +1885;MONGOLIAN LETTER ALI GALI BALUDA;Mn;0;NSM;;;;;N;;;;; +1886;MONGOLIAN LETTER ALI GALI THREE BALUDA;Mn;0;NSM;;;;;N;;;;; +1887;MONGOLIAN LETTER ALI GALI A;Lo;0;L;;;;;N;;;;; +1888;MONGOLIAN LETTER ALI GALI I;Lo;0;L;;;;;N;;;;; +1889;MONGOLIAN LETTER ALI GALI KA;Lo;0;L;;;;;N;;;;; +188A;MONGOLIAN LETTER ALI GALI NGA;Lo;0;L;;;;;N;;;;; +188B;MONGOLIAN LETTER ALI GALI CA;Lo;0;L;;;;;N;;;;; +188C;MONGOLIAN LETTER ALI GALI TTA;Lo;0;L;;;;;N;;;;; +188D;MONGOLIAN LETTER ALI GALI TTHA;Lo;0;L;;;;;N;;;;; +188E;MONGOLIAN LETTER ALI GALI DDA;Lo;0;L;;;;;N;;;;; +188F;MONGOLIAN LETTER ALI GALI NNA;Lo;0;L;;;;;N;;;;; +1890;MONGOLIAN LETTER ALI GALI TA;Lo;0;L;;;;;N;;;;; +1891;MONGOLIAN LETTER ALI GALI DA;Lo;0;L;;;;;N;;;;; +1892;MONGOLIAN LETTER ALI GALI PA;Lo;0;L;;;;;N;;;;; +1893;MONGOLIAN LETTER ALI GALI PHA;Lo;0;L;;;;;N;;;;; +1894;MONGOLIAN LETTER ALI GALI SSA;Lo;0;L;;;;;N;;;;; +1895;MONGOLIAN LETTER ALI GALI ZHA;Lo;0;L;;;;;N;;;;; +1896;MONGOLIAN LETTER ALI GALI ZA;Lo;0;L;;;;;N;;;;; +1897;MONGOLIAN LETTER ALI GALI AH;Lo;0;L;;;;;N;;;;; +1898;MONGOLIAN LETTER TODO ALI GALI TA;Lo;0;L;;;;;N;;;;; +1899;MONGOLIAN LETTER TODO ALI GALI ZHA;Lo;0;L;;;;;N;;;;; +189A;MONGOLIAN LETTER MANCHU ALI GALI GHA;Lo;0;L;;;;;N;;;;; +189B;MONGOLIAN LETTER MANCHU ALI GALI NGA;Lo;0;L;;;;;N;;;;; +189C;MONGOLIAN LETTER MANCHU ALI GALI CA;Lo;0;L;;;;;N;;;;; +189D;MONGOLIAN LETTER MANCHU ALI GALI JHA;Lo;0;L;;;;;N;;;;; +189E;MONGOLIAN LETTER MANCHU ALI GALI TTA;Lo;0;L;;;;;N;;;;; +189F;MONGOLIAN LETTER MANCHU ALI GALI DDHA;Lo;0;L;;;;;N;;;;; +18A0;MONGOLIAN LETTER MANCHU ALI GALI TA;Lo;0;L;;;;;N;;;;; +18A1;MONGOLIAN LETTER MANCHU ALI GALI DHA;Lo;0;L;;;;;N;;;;; +18A2;MONGOLIAN LETTER MANCHU ALI GALI SSA;Lo;0;L;;;;;N;;;;; +18A3;MONGOLIAN LETTER MANCHU ALI GALI CYA;Lo;0;L;;;;;N;;;;; +18A4;MONGOLIAN LETTER MANCHU ALI GALI ZHA;Lo;0;L;;;;;N;;;;; +18A5;MONGOLIAN LETTER MANCHU ALI GALI ZA;Lo;0;L;;;;;N;;;;; +18A6;MONGOLIAN LETTER ALI GALI HALF U;Lo;0;L;;;;;N;;;;; +18A7;MONGOLIAN LETTER ALI GALI HALF YA;Lo;0;L;;;;;N;;;;; +18A8;MONGOLIAN LETTER MANCHU ALI GALI BHA;Lo;0;L;;;;;N;;;;; +18A9;MONGOLIAN LETTER ALI GALI DAGALGA;Mn;228;NSM;;;;;N;;;;; +18AA;MONGOLIAN LETTER MANCHU ALI GALI LHA;Lo;0;L;;;;;N;;;;; +18B0;CANADIAN SYLLABICS OY;Lo;0;L;;;;;N;;;;; +18B1;CANADIAN SYLLABICS AY;Lo;0;L;;;;;N;;;;; +18B2;CANADIAN SYLLABICS AAY;Lo;0;L;;;;;N;;;;; +18B3;CANADIAN SYLLABICS WAY;Lo;0;L;;;;;N;;;;; +18B4;CANADIAN SYLLABICS POY;Lo;0;L;;;;;N;;;;; +18B5;CANADIAN SYLLABICS PAY;Lo;0;L;;;;;N;;;;; +18B6;CANADIAN SYLLABICS PWOY;Lo;0;L;;;;;N;;;;; +18B7;CANADIAN SYLLABICS TAY;Lo;0;L;;;;;N;;;;; +18B8;CANADIAN SYLLABICS KAY;Lo;0;L;;;;;N;;;;; +18B9;CANADIAN SYLLABICS KWAY;Lo;0;L;;;;;N;;;;; +18BA;CANADIAN SYLLABICS MAY;Lo;0;L;;;;;N;;;;; +18BB;CANADIAN SYLLABICS NOY;Lo;0;L;;;;;N;;;;; +18BC;CANADIAN SYLLABICS NAY;Lo;0;L;;;;;N;;;;; +18BD;CANADIAN SYLLABICS LAY;Lo;0;L;;;;;N;;;;; +18BE;CANADIAN SYLLABICS SOY;Lo;0;L;;;;;N;;;;; +18BF;CANADIAN SYLLABICS SAY;Lo;0;L;;;;;N;;;;; +18C0;CANADIAN SYLLABICS SHOY;Lo;0;L;;;;;N;;;;; +18C1;CANADIAN SYLLABICS SHAY;Lo;0;L;;;;;N;;;;; +18C2;CANADIAN SYLLABICS SHWOY;Lo;0;L;;;;;N;;;;; +18C3;CANADIAN SYLLABICS YOY;Lo;0;L;;;;;N;;;;; +18C4;CANADIAN SYLLABICS YAY;Lo;0;L;;;;;N;;;;; +18C5;CANADIAN SYLLABICS RAY;Lo;0;L;;;;;N;;;;; +18C6;CANADIAN SYLLABICS NWI;Lo;0;L;;;;;N;;;;; +18C7;CANADIAN SYLLABICS OJIBWAY NWI;Lo;0;L;;;;;N;;;;; +18C8;CANADIAN SYLLABICS NWII;Lo;0;L;;;;;N;;;;; +18C9;CANADIAN SYLLABICS OJIBWAY NWII;Lo;0;L;;;;;N;;;;; +18CA;CANADIAN SYLLABICS NWO;Lo;0;L;;;;;N;;;;; +18CB;CANADIAN SYLLABICS OJIBWAY NWO;Lo;0;L;;;;;N;;;;; +18CC;CANADIAN SYLLABICS NWOO;Lo;0;L;;;;;N;;;;; +18CD;CANADIAN SYLLABICS OJIBWAY NWOO;Lo;0;L;;;;;N;;;;; +18CE;CANADIAN SYLLABICS RWEE;Lo;0;L;;;;;N;;;;; +18CF;CANADIAN SYLLABICS RWI;Lo;0;L;;;;;N;;;;; +18D0;CANADIAN SYLLABICS RWII;Lo;0;L;;;;;N;;;;; +18D1;CANADIAN SYLLABICS RWO;Lo;0;L;;;;;N;;;;; +18D2;CANADIAN SYLLABICS RWOO;Lo;0;L;;;;;N;;;;; +18D3;CANADIAN SYLLABICS RWA;Lo;0;L;;;;;N;;;;; +18D4;CANADIAN SYLLABICS OJIBWAY P;Lo;0;L;;;;;N;;;;; +18D5;CANADIAN SYLLABICS OJIBWAY T;Lo;0;L;;;;;N;;;;; +18D6;CANADIAN SYLLABICS OJIBWAY K;Lo;0;L;;;;;N;;;;; +18D7;CANADIAN SYLLABICS OJIBWAY C;Lo;0;L;;;;;N;;;;; +18D8;CANADIAN SYLLABICS OJIBWAY M;Lo;0;L;;;;;N;;;;; +18D9;CANADIAN SYLLABICS OJIBWAY N;Lo;0;L;;;;;N;;;;; +18DA;CANADIAN SYLLABICS OJIBWAY S;Lo;0;L;;;;;N;;;;; +18DB;CANADIAN SYLLABICS OJIBWAY SH;Lo;0;L;;;;;N;;;;; +18DC;CANADIAN SYLLABICS EASTERN W;Lo;0;L;;;;;N;;;;; +18DD;CANADIAN SYLLABICS WESTERN W;Lo;0;L;;;;;N;;;;; +18DE;CANADIAN SYLLABICS FINAL SMALL RING;Lo;0;L;;;;;N;;;;; +18DF;CANADIAN SYLLABICS FINAL RAISED DOT;Lo;0;L;;;;;N;;;;; +18E0;CANADIAN SYLLABICS R-CREE RWE;Lo;0;L;;;;;N;;;;; +18E1;CANADIAN SYLLABICS WEST-CREE LOO;Lo;0;L;;;;;N;;;;; +18E2;CANADIAN SYLLABICS WEST-CREE LAA;Lo;0;L;;;;;N;;;;; +18E3;CANADIAN SYLLABICS THWE;Lo;0;L;;;;;N;;;;; +18E4;CANADIAN SYLLABICS THWA;Lo;0;L;;;;;N;;;;; +18E5;CANADIAN SYLLABICS TTHWE;Lo;0;L;;;;;N;;;;; +18E6;CANADIAN SYLLABICS TTHOO;Lo;0;L;;;;;N;;;;; +18E7;CANADIAN SYLLABICS TTHAA;Lo;0;L;;;;;N;;;;; +18E8;CANADIAN SYLLABICS TLHWE;Lo;0;L;;;;;N;;;;; +18E9;CANADIAN SYLLABICS TLHOO;Lo;0;L;;;;;N;;;;; +18EA;CANADIAN SYLLABICS SAYISI SHWE;Lo;0;L;;;;;N;;;;; +18EB;CANADIAN SYLLABICS SAYISI SHOO;Lo;0;L;;;;;N;;;;; +18EC;CANADIAN SYLLABICS SAYISI HOO;Lo;0;L;;;;;N;;;;; +18ED;CANADIAN SYLLABICS CARRIER GWU;Lo;0;L;;;;;N;;;;; +18EE;CANADIAN SYLLABICS CARRIER DENE GEE;Lo;0;L;;;;;N;;;;; +18EF;CANADIAN SYLLABICS CARRIER GAA;Lo;0;L;;;;;N;;;;; +18F0;CANADIAN SYLLABICS CARRIER GWA;Lo;0;L;;;;;N;;;;; +18F1;CANADIAN SYLLABICS SAYISI JUU;Lo;0;L;;;;;N;;;;; +18F2;CANADIAN SYLLABICS CARRIER JWA;Lo;0;L;;;;;N;;;;; +18F3;CANADIAN SYLLABICS BEAVER DENE L;Lo;0;L;;;;;N;;;;; +18F4;CANADIAN SYLLABICS BEAVER DENE R;Lo;0;L;;;;;N;;;;; +18F5;CANADIAN SYLLABICS CARRIER DENTAL S;Lo;0;L;;;;;N;;;;; +1900;LIMBU VOWEL-CARRIER LETTER;Lo;0;L;;;;;N;;;;; +1901;LIMBU LETTER KA;Lo;0;L;;;;;N;;;;; +1902;LIMBU LETTER KHA;Lo;0;L;;;;;N;;;;; +1903;LIMBU LETTER GA;Lo;0;L;;;;;N;;;;; +1904;LIMBU LETTER GHA;Lo;0;L;;;;;N;;;;; +1905;LIMBU LETTER NGA;Lo;0;L;;;;;N;;;;; +1906;LIMBU LETTER CA;Lo;0;L;;;;;N;;;;; +1907;LIMBU LETTER CHA;Lo;0;L;;;;;N;;;;; +1908;LIMBU LETTER JA;Lo;0;L;;;;;N;;;;; +1909;LIMBU LETTER JHA;Lo;0;L;;;;;N;;;;; +190A;LIMBU LETTER YAN;Lo;0;L;;;;;N;;;;; +190B;LIMBU LETTER TA;Lo;0;L;;;;;N;;;;; +190C;LIMBU LETTER THA;Lo;0;L;;;;;N;;;;; +190D;LIMBU LETTER DA;Lo;0;L;;;;;N;;;;; +190E;LIMBU LETTER DHA;Lo;0;L;;;;;N;;;;; +190F;LIMBU LETTER NA;Lo;0;L;;;;;N;;;;; +1910;LIMBU LETTER PA;Lo;0;L;;;;;N;;;;; +1911;LIMBU LETTER PHA;Lo;0;L;;;;;N;;;;; +1912;LIMBU LETTER BA;Lo;0;L;;;;;N;;;;; +1913;LIMBU LETTER BHA;Lo;0;L;;;;;N;;;;; +1914;LIMBU LETTER MA;Lo;0;L;;;;;N;;;;; +1915;LIMBU LETTER YA;Lo;0;L;;;;;N;;;;; +1916;LIMBU LETTER RA;Lo;0;L;;;;;N;;;;; +1917;LIMBU LETTER LA;Lo;0;L;;;;;N;;;;; +1918;LIMBU LETTER WA;Lo;0;L;;;;;N;;;;; +1919;LIMBU LETTER SHA;Lo;0;L;;;;;N;;;;; +191A;LIMBU LETTER SSA;Lo;0;L;;;;;N;;;;; +191B;LIMBU LETTER SA;Lo;0;L;;;;;N;;;;; +191C;LIMBU LETTER HA;Lo;0;L;;;;;N;;;;; +191D;LIMBU LETTER GYAN;Lo;0;L;;;;;N;;;;; +191E;LIMBU LETTER TRA;Lo;0;L;;;;;N;;;;; +1920;LIMBU VOWEL SIGN A;Mn;0;NSM;;;;;N;;;;; +1921;LIMBU VOWEL SIGN I;Mn;0;NSM;;;;;N;;;;; +1922;LIMBU VOWEL SIGN U;Mn;0;NSM;;;;;N;;;;; +1923;LIMBU VOWEL SIGN EE;Mc;0;L;;;;;N;;;;; +1924;LIMBU VOWEL SIGN AI;Mc;0;L;;;;;N;;;;; +1925;LIMBU VOWEL SIGN OO;Mc;0;L;;;;;N;;;;; +1926;LIMBU VOWEL SIGN AU;Mc;0;L;;;;;N;;;;; +1927;LIMBU VOWEL SIGN E;Mn;0;NSM;;;;;N;;;;; +1928;LIMBU VOWEL SIGN O;Mn;0;NSM;;;;;N;;;;; +1929;LIMBU SUBJOINED LETTER YA;Mc;0;L;;;;;N;;;;; +192A;LIMBU SUBJOINED LETTER RA;Mc;0;L;;;;;N;;;;; +192B;LIMBU SUBJOINED LETTER WA;Mc;0;L;;;;;N;;;;; +1930;LIMBU SMALL LETTER KA;Mc;0;L;;;;;N;;;;; +1931;LIMBU SMALL LETTER NGA;Mc;0;L;;;;;N;;;;; +1932;LIMBU SMALL LETTER ANUSVARA;Mn;0;NSM;;;;;N;;;;; +1933;LIMBU SMALL LETTER TA;Mc;0;L;;;;;N;;;;; +1934;LIMBU SMALL LETTER NA;Mc;0;L;;;;;N;;;;; +1935;LIMBU SMALL LETTER PA;Mc;0;L;;;;;N;;;;; +1936;LIMBU SMALL LETTER MA;Mc;0;L;;;;;N;;;;; +1937;LIMBU SMALL LETTER RA;Mc;0;L;;;;;N;;;;; +1938;LIMBU SMALL LETTER LA;Mc;0;L;;;;;N;;;;; +1939;LIMBU SIGN MUKPHRENG;Mn;222;NSM;;;;;N;;;;; +193A;LIMBU SIGN KEMPHRENG;Mn;230;NSM;;;;;N;;;;; +193B;LIMBU SIGN SA-I;Mn;220;NSM;;;;;N;;;;; +1940;LIMBU SIGN LOO;So;0;ON;;;;;N;;;;; +1944;LIMBU EXCLAMATION MARK;Po;0;ON;;;;;N;;;;; +1945;LIMBU QUESTION MARK;Po;0;ON;;;;;N;;;;; +1946;LIMBU DIGIT ZERO;Nd;0;L;;0;0;0;N;;;;; +1947;LIMBU DIGIT ONE;Nd;0;L;;1;1;1;N;;;;; +1948;LIMBU DIGIT TWO;Nd;0;L;;2;2;2;N;;;;; +1949;LIMBU DIGIT THREE;Nd;0;L;;3;3;3;N;;;;; +194A;LIMBU DIGIT FOUR;Nd;0;L;;4;4;4;N;;;;; +194B;LIMBU DIGIT FIVE;Nd;0;L;;5;5;5;N;;;;; +194C;LIMBU DIGIT SIX;Nd;0;L;;6;6;6;N;;;;; +194D;LIMBU DIGIT SEVEN;Nd;0;L;;7;7;7;N;;;;; +194E;LIMBU DIGIT EIGHT;Nd;0;L;;8;8;8;N;;;;; +194F;LIMBU DIGIT NINE;Nd;0;L;;9;9;9;N;;;;; +1950;TAI LE LETTER KA;Lo;0;L;;;;;N;;;;; +1951;TAI LE LETTER XA;Lo;0;L;;;;;N;;;;; +1952;TAI LE LETTER NGA;Lo;0;L;;;;;N;;;;; +1953;TAI LE LETTER TSA;Lo;0;L;;;;;N;;;;; +1954;TAI LE LETTER SA;Lo;0;L;;;;;N;;;;; +1955;TAI LE LETTER YA;Lo;0;L;;;;;N;;;;; +1956;TAI LE LETTER TA;Lo;0;L;;;;;N;;;;; +1957;TAI LE LETTER THA;Lo;0;L;;;;;N;;;;; +1958;TAI LE LETTER LA;Lo;0;L;;;;;N;;;;; +1959;TAI LE LETTER PA;Lo;0;L;;;;;N;;;;; +195A;TAI LE LETTER PHA;Lo;0;L;;;;;N;;;;; +195B;TAI LE LETTER MA;Lo;0;L;;;;;N;;;;; +195C;TAI LE LETTER FA;Lo;0;L;;;;;N;;;;; +195D;TAI LE LETTER VA;Lo;0;L;;;;;N;;;;; +195E;TAI LE LETTER HA;Lo;0;L;;;;;N;;;;; +195F;TAI LE LETTER QA;Lo;0;L;;;;;N;;;;; +1960;TAI LE LETTER KHA;Lo;0;L;;;;;N;;;;; +1961;TAI LE LETTER TSHA;Lo;0;L;;;;;N;;;;; +1962;TAI LE LETTER NA;Lo;0;L;;;;;N;;;;; +1963;TAI LE LETTER A;Lo;0;L;;;;;N;;;;; +1964;TAI LE LETTER I;Lo;0;L;;;;;N;;;;; +1965;TAI LE LETTER EE;Lo;0;L;;;;;N;;;;; +1966;TAI LE LETTER EH;Lo;0;L;;;;;N;;;;; +1967;TAI LE LETTER U;Lo;0;L;;;;;N;;;;; +1968;TAI LE LETTER OO;Lo;0;L;;;;;N;;;;; +1969;TAI LE LETTER O;Lo;0;L;;;;;N;;;;; +196A;TAI LE LETTER UE;Lo;0;L;;;;;N;;;;; +196B;TAI LE LETTER E;Lo;0;L;;;;;N;;;;; +196C;TAI LE LETTER AUE;Lo;0;L;;;;;N;;;;; +196D;TAI LE LETTER AI;Lo;0;L;;;;;N;;;;; +1970;TAI LE LETTER TONE-2;Lo;0;L;;;;;N;;;;; +1971;TAI LE LETTER TONE-3;Lo;0;L;;;;;N;;;;; +1972;TAI LE LETTER TONE-4;Lo;0;L;;;;;N;;;;; +1973;TAI LE LETTER TONE-5;Lo;0;L;;;;;N;;;;; +1974;TAI LE LETTER TONE-6;Lo;0;L;;;;;N;;;;; +1980;NEW TAI LUE LETTER HIGH QA;Lo;0;L;;;;;N;;;;; +1981;NEW TAI LUE LETTER LOW QA;Lo;0;L;;;;;N;;;;; +1982;NEW TAI LUE LETTER HIGH KA;Lo;0;L;;;;;N;;;;; +1983;NEW TAI LUE LETTER HIGH XA;Lo;0;L;;;;;N;;;;; +1984;NEW TAI LUE LETTER HIGH NGA;Lo;0;L;;;;;N;;;;; +1985;NEW TAI LUE LETTER LOW KA;Lo;0;L;;;;;N;;;;; +1986;NEW TAI LUE LETTER LOW XA;Lo;0;L;;;;;N;;;;; +1987;NEW TAI LUE LETTER LOW NGA;Lo;0;L;;;;;N;;;;; +1988;NEW TAI LUE LETTER HIGH TSA;Lo;0;L;;;;;N;;;;; +1989;NEW TAI LUE LETTER HIGH SA;Lo;0;L;;;;;N;;;;; +198A;NEW TAI LUE LETTER HIGH YA;Lo;0;L;;;;;N;;;;; +198B;NEW TAI LUE LETTER LOW TSA;Lo;0;L;;;;;N;;;;; +198C;NEW TAI LUE LETTER LOW SA;Lo;0;L;;;;;N;;;;; +198D;NEW TAI LUE LETTER LOW YA;Lo;0;L;;;;;N;;;;; +198E;NEW TAI LUE LETTER HIGH TA;Lo;0;L;;;;;N;;;;; +198F;NEW TAI LUE LETTER HIGH THA;Lo;0;L;;;;;N;;;;; +1990;NEW TAI LUE LETTER HIGH NA;Lo;0;L;;;;;N;;;;; +1991;NEW TAI LUE LETTER LOW TA;Lo;0;L;;;;;N;;;;; +1992;NEW TAI LUE LETTER LOW THA;Lo;0;L;;;;;N;;;;; +1993;NEW TAI LUE LETTER LOW NA;Lo;0;L;;;;;N;;;;; +1994;NEW TAI LUE LETTER HIGH PA;Lo;0;L;;;;;N;;;;; +1995;NEW TAI LUE LETTER HIGH PHA;Lo;0;L;;;;;N;;;;; +1996;NEW TAI LUE LETTER HIGH MA;Lo;0;L;;;;;N;;;;; +1997;NEW TAI LUE LETTER LOW PA;Lo;0;L;;;;;N;;;;; +1998;NEW TAI LUE LETTER LOW PHA;Lo;0;L;;;;;N;;;;; +1999;NEW TAI LUE LETTER LOW MA;Lo;0;L;;;;;N;;;;; +199A;NEW TAI LUE LETTER HIGH FA;Lo;0;L;;;;;N;;;;; +199B;NEW TAI LUE LETTER HIGH VA;Lo;0;L;;;;;N;;;;; +199C;NEW TAI LUE LETTER HIGH LA;Lo;0;L;;;;;N;;;;; +199D;NEW TAI LUE LETTER LOW FA;Lo;0;L;;;;;N;;;;; +199E;NEW TAI LUE LETTER LOW VA;Lo;0;L;;;;;N;;;;; +199F;NEW TAI LUE LETTER LOW LA;Lo;0;L;;;;;N;;;;; +19A0;NEW TAI LUE LETTER HIGH HA;Lo;0;L;;;;;N;;;;; +19A1;NEW TAI LUE LETTER HIGH DA;Lo;0;L;;;;;N;;;;; +19A2;NEW TAI LUE LETTER HIGH BA;Lo;0;L;;;;;N;;;;; +19A3;NEW TAI LUE LETTER LOW HA;Lo;0;L;;;;;N;;;;; +19A4;NEW TAI LUE LETTER LOW DA;Lo;0;L;;;;;N;;;;; +19A5;NEW TAI LUE LETTER LOW BA;Lo;0;L;;;;;N;;;;; +19A6;NEW TAI LUE LETTER HIGH KVA;Lo;0;L;;;;;N;;;;; +19A7;NEW TAI LUE LETTER HIGH XVA;Lo;0;L;;;;;N;;;;; +19A8;NEW TAI LUE LETTER LOW KVA;Lo;0;L;;;;;N;;;;; +19A9;NEW TAI LUE LETTER LOW XVA;Lo;0;L;;;;;N;;;;; +19AA;NEW TAI LUE LETTER HIGH SUA;Lo;0;L;;;;;N;;;;; +19AB;NEW TAI LUE LETTER LOW SUA;Lo;0;L;;;;;N;;;;; +19B0;NEW TAI LUE VOWEL SIGN VOWEL SHORTENER;Lo;0;L;;;;;N;;;;; +19B1;NEW TAI LUE VOWEL SIGN AA;Lo;0;L;;;;;N;;;;; +19B2;NEW TAI LUE VOWEL SIGN II;Lo;0;L;;;;;N;;;;; +19B3;NEW TAI LUE VOWEL SIGN U;Lo;0;L;;;;;N;;;;; +19B4;NEW TAI LUE VOWEL SIGN UU;Lo;0;L;;;;;N;;;;; +19B5;NEW TAI LUE VOWEL SIGN E;Lo;0;L;;;;;N;;;;; +19B6;NEW TAI LUE VOWEL SIGN AE;Lo;0;L;;;;;N;;;;; +19B7;NEW TAI LUE VOWEL SIGN O;Lo;0;L;;;;;N;;;;; +19B8;NEW TAI LUE VOWEL SIGN OA;Lo;0;L;;;;;N;;;;; +19B9;NEW TAI LUE VOWEL SIGN UE;Lo;0;L;;;;;N;;;;; +19BA;NEW TAI LUE VOWEL SIGN AY;Lo;0;L;;;;;N;;;;; +19BB;NEW TAI LUE VOWEL SIGN AAY;Lo;0;L;;;;;N;;;;; +19BC;NEW TAI LUE VOWEL SIGN UY;Lo;0;L;;;;;N;;;;; +19BD;NEW TAI LUE VOWEL SIGN OY;Lo;0;L;;;;;N;;;;; +19BE;NEW TAI LUE VOWEL SIGN OAY;Lo;0;L;;;;;N;;;;; +19BF;NEW TAI LUE VOWEL SIGN UEY;Lo;0;L;;;;;N;;;;; +19C0;NEW TAI LUE VOWEL SIGN IY;Lo;0;L;;;;;N;;;;; +19C1;NEW TAI LUE LETTER FINAL V;Lo;0;L;;;;;N;;;;; +19C2;NEW TAI LUE LETTER FINAL NG;Lo;0;L;;;;;N;;;;; +19C3;NEW TAI LUE LETTER FINAL N;Lo;0;L;;;;;N;;;;; +19C4;NEW TAI LUE LETTER FINAL M;Lo;0;L;;;;;N;;;;; +19C5;NEW TAI LUE LETTER FINAL K;Lo;0;L;;;;;N;;;;; +19C6;NEW TAI LUE LETTER FINAL D;Lo;0;L;;;;;N;;;;; +19C7;NEW TAI LUE LETTER FINAL B;Lo;0;L;;;;;N;;;;; +19C8;NEW TAI LUE TONE MARK-1;Lo;0;L;;;;;N;;;;; +19C9;NEW TAI LUE TONE MARK-2;Lo;0;L;;;;;N;;;;; +19D0;NEW TAI LUE DIGIT ZERO;Nd;0;L;;0;0;0;N;;;;; +19D1;NEW TAI LUE DIGIT ONE;Nd;0;L;;1;1;1;N;;;;; +19D2;NEW TAI LUE DIGIT TWO;Nd;0;L;;2;2;2;N;;;;; +19D3;NEW TAI LUE DIGIT THREE;Nd;0;L;;3;3;3;N;;;;; +19D4;NEW TAI LUE DIGIT FOUR;Nd;0;L;;4;4;4;N;;;;; +19D5;NEW TAI LUE DIGIT FIVE;Nd;0;L;;5;5;5;N;;;;; +19D6;NEW TAI LUE DIGIT SIX;Nd;0;L;;6;6;6;N;;;;; +19D7;NEW TAI LUE DIGIT SEVEN;Nd;0;L;;7;7;7;N;;;;; +19D8;NEW TAI LUE DIGIT EIGHT;Nd;0;L;;8;8;8;N;;;;; +19D9;NEW TAI LUE DIGIT NINE;Nd;0;L;;9;9;9;N;;;;; +19DA;NEW TAI LUE THAM DIGIT ONE;No;0;L;;;1;1;N;;;;; +19DE;NEW TAI LUE SIGN LAE;So;0;ON;;;;;N;;;;; +19DF;NEW TAI LUE SIGN LAEV;So;0;ON;;;;;N;;;;; +19E0;KHMER SYMBOL PATHAMASAT;So;0;ON;;;;;N;;;;; +19E1;KHMER SYMBOL MUOY KOET;So;0;ON;;;;;N;;;;; +19E2;KHMER SYMBOL PII KOET;So;0;ON;;;;;N;;;;; +19E3;KHMER SYMBOL BEI KOET;So;0;ON;;;;;N;;;;; +19E4;KHMER SYMBOL BUON KOET;So;0;ON;;;;;N;;;;; +19E5;KHMER SYMBOL PRAM KOET;So;0;ON;;;;;N;;;;; +19E6;KHMER SYMBOL PRAM-MUOY KOET;So;0;ON;;;;;N;;;;; +19E7;KHMER SYMBOL PRAM-PII KOET;So;0;ON;;;;;N;;;;; +19E8;KHMER SYMBOL PRAM-BEI KOET;So;0;ON;;;;;N;;;;; +19E9;KHMER SYMBOL PRAM-BUON KOET;So;0;ON;;;;;N;;;;; +19EA;KHMER SYMBOL DAP KOET;So;0;ON;;;;;N;;;;; +19EB;KHMER SYMBOL DAP-MUOY KOET;So;0;ON;;;;;N;;;;; +19EC;KHMER SYMBOL DAP-PII KOET;So;0;ON;;;;;N;;;;; +19ED;KHMER SYMBOL DAP-BEI KOET;So;0;ON;;;;;N;;;;; +19EE;KHMER SYMBOL DAP-BUON KOET;So;0;ON;;;;;N;;;;; +19EF;KHMER SYMBOL DAP-PRAM KOET;So;0;ON;;;;;N;;;;; +19F0;KHMER SYMBOL TUTEYASAT;So;0;ON;;;;;N;;;;; +19F1;KHMER SYMBOL MUOY ROC;So;0;ON;;;;;N;;;;; +19F2;KHMER SYMBOL PII ROC;So;0;ON;;;;;N;;;;; +19F3;KHMER SYMBOL BEI ROC;So;0;ON;;;;;N;;;;; +19F4;KHMER SYMBOL BUON ROC;So;0;ON;;;;;N;;;;; +19F5;KHMER SYMBOL PRAM ROC;So;0;ON;;;;;N;;;;; +19F6;KHMER SYMBOL PRAM-MUOY ROC;So;0;ON;;;;;N;;;;; +19F7;KHMER SYMBOL PRAM-PII ROC;So;0;ON;;;;;N;;;;; +19F8;KHMER SYMBOL PRAM-BEI ROC;So;0;ON;;;;;N;;;;; +19F9;KHMER SYMBOL PRAM-BUON ROC;So;0;ON;;;;;N;;;;; +19FA;KHMER SYMBOL DAP ROC;So;0;ON;;;;;N;;;;; +19FB;KHMER SYMBOL DAP-MUOY ROC;So;0;ON;;;;;N;;;;; +19FC;KHMER SYMBOL DAP-PII ROC;So;0;ON;;;;;N;;;;; +19FD;KHMER SYMBOL DAP-BEI ROC;So;0;ON;;;;;N;;;;; +19FE;KHMER SYMBOL DAP-BUON ROC;So;0;ON;;;;;N;;;;; +19FF;KHMER SYMBOL DAP-PRAM ROC;So;0;ON;;;;;N;;;;; +1A00;BUGINESE LETTER KA;Lo;0;L;;;;;N;;;;; +1A01;BUGINESE LETTER GA;Lo;0;L;;;;;N;;;;; +1A02;BUGINESE LETTER NGA;Lo;0;L;;;;;N;;;;; +1A03;BUGINESE LETTER NGKA;Lo;0;L;;;;;N;;;;; +1A04;BUGINESE LETTER PA;Lo;0;L;;;;;N;;;;; +1A05;BUGINESE LETTER BA;Lo;0;L;;;;;N;;;;; +1A06;BUGINESE LETTER MA;Lo;0;L;;;;;N;;;;; +1A07;BUGINESE LETTER MPA;Lo;0;L;;;;;N;;;;; +1A08;BUGINESE LETTER TA;Lo;0;L;;;;;N;;;;; +1A09;BUGINESE LETTER DA;Lo;0;L;;;;;N;;;;; +1A0A;BUGINESE LETTER NA;Lo;0;L;;;;;N;;;;; +1A0B;BUGINESE LETTER NRA;Lo;0;L;;;;;N;;;;; +1A0C;BUGINESE LETTER CA;Lo;0;L;;;;;N;;;;; +1A0D;BUGINESE LETTER JA;Lo;0;L;;;;;N;;;;; +1A0E;BUGINESE LETTER NYA;Lo;0;L;;;;;N;;;;; +1A0F;BUGINESE LETTER NYCA;Lo;0;L;;;;;N;;;;; +1A10;BUGINESE LETTER YA;Lo;0;L;;;;;N;;;;; +1A11;BUGINESE LETTER RA;Lo;0;L;;;;;N;;;;; +1A12;BUGINESE LETTER LA;Lo;0;L;;;;;N;;;;; +1A13;BUGINESE LETTER VA;Lo;0;L;;;;;N;;;;; +1A14;BUGINESE LETTER SA;Lo;0;L;;;;;N;;;;; +1A15;BUGINESE LETTER A;Lo;0;L;;;;;N;;;;; +1A16;BUGINESE LETTER HA;Lo;0;L;;;;;N;;;;; +1A17;BUGINESE VOWEL SIGN I;Mn;230;NSM;;;;;N;;;;; +1A18;BUGINESE VOWEL SIGN U;Mn;220;NSM;;;;;N;;;;; +1A19;BUGINESE VOWEL SIGN E;Mc;0;L;;;;;N;;;;; +1A1A;BUGINESE VOWEL SIGN O;Mc;0;L;;;;;N;;;;; +1A1B;BUGINESE VOWEL SIGN AE;Mn;0;NSM;;;;;N;;;;; +1A1E;BUGINESE PALLAWA;Po;0;L;;;;;N;;;;; +1A1F;BUGINESE END OF SECTION;Po;0;L;;;;;N;;;;; +1A20;TAI THAM LETTER HIGH KA;Lo;0;L;;;;;N;;;;; +1A21;TAI THAM LETTER HIGH KHA;Lo;0;L;;;;;N;;;;; +1A22;TAI THAM LETTER HIGH KXA;Lo;0;L;;;;;N;;;;; +1A23;TAI THAM LETTER LOW KA;Lo;0;L;;;;;N;;;;; +1A24;TAI THAM LETTER LOW KXA;Lo;0;L;;;;;N;;;;; +1A25;TAI THAM LETTER LOW KHA;Lo;0;L;;;;;N;;;;; +1A26;TAI THAM LETTER NGA;Lo;0;L;;;;;N;;;;; +1A27;TAI THAM LETTER HIGH CA;Lo;0;L;;;;;N;;;;; +1A28;TAI THAM LETTER HIGH CHA;Lo;0;L;;;;;N;;;;; +1A29;TAI THAM LETTER LOW CA;Lo;0;L;;;;;N;;;;; +1A2A;TAI THAM LETTER LOW SA;Lo;0;L;;;;;N;;;;; +1A2B;TAI THAM LETTER LOW CHA;Lo;0;L;;;;;N;;;;; +1A2C;TAI THAM LETTER NYA;Lo;0;L;;;;;N;;;;; +1A2D;TAI THAM LETTER RATA;Lo;0;L;;;;;N;;;;; +1A2E;TAI THAM LETTER HIGH RATHA;Lo;0;L;;;;;N;;;;; +1A2F;TAI THAM LETTER DA;Lo;0;L;;;;;N;;;;; +1A30;TAI THAM LETTER LOW RATHA;Lo;0;L;;;;;N;;;;; +1A31;TAI THAM LETTER RANA;Lo;0;L;;;;;N;;;;; +1A32;TAI THAM LETTER HIGH TA;Lo;0;L;;;;;N;;;;; +1A33;TAI THAM LETTER HIGH THA;Lo;0;L;;;;;N;;;;; +1A34;TAI THAM LETTER LOW TA;Lo;0;L;;;;;N;;;;; +1A35;TAI THAM LETTER LOW THA;Lo;0;L;;;;;N;;;;; +1A36;TAI THAM LETTER NA;Lo;0;L;;;;;N;;;;; +1A37;TAI THAM LETTER BA;Lo;0;L;;;;;N;;;;; +1A38;TAI THAM LETTER HIGH PA;Lo;0;L;;;;;N;;;;; +1A39;TAI THAM LETTER HIGH PHA;Lo;0;L;;;;;N;;;;; +1A3A;TAI THAM LETTER HIGH FA;Lo;0;L;;;;;N;;;;; +1A3B;TAI THAM LETTER LOW PA;Lo;0;L;;;;;N;;;;; +1A3C;TAI THAM LETTER LOW FA;Lo;0;L;;;;;N;;;;; +1A3D;TAI THAM LETTER LOW PHA;Lo;0;L;;;;;N;;;;; +1A3E;TAI THAM LETTER MA;Lo;0;L;;;;;N;;;;; +1A3F;TAI THAM LETTER LOW YA;Lo;0;L;;;;;N;;;;; +1A40;TAI THAM LETTER HIGH YA;Lo;0;L;;;;;N;;;;; +1A41;TAI THAM LETTER RA;Lo;0;L;;;;;N;;;;; +1A42;TAI THAM LETTER RUE;Lo;0;L;;;;;N;;;;; +1A43;TAI THAM LETTER LA;Lo;0;L;;;;;N;;;;; +1A44;TAI THAM LETTER LUE;Lo;0;L;;;;;N;;;;; +1A45;TAI THAM LETTER WA;Lo;0;L;;;;;N;;;;; +1A46;TAI THAM LETTER HIGH SHA;Lo;0;L;;;;;N;;;;; +1A47;TAI THAM LETTER HIGH SSA;Lo;0;L;;;;;N;;;;; +1A48;TAI THAM LETTER HIGH SA;Lo;0;L;;;;;N;;;;; +1A49;TAI THAM LETTER HIGH HA;Lo;0;L;;;;;N;;;;; +1A4A;TAI THAM LETTER LLA;Lo;0;L;;;;;N;;;;; +1A4B;TAI THAM LETTER A;Lo;0;L;;;;;N;;;;; +1A4C;TAI THAM LETTER LOW HA;Lo;0;L;;;;;N;;;;; +1A4D;TAI THAM LETTER I;Lo;0;L;;;;;N;;;;; +1A4E;TAI THAM LETTER II;Lo;0;L;;;;;N;;;;; +1A4F;TAI THAM LETTER U;Lo;0;L;;;;;N;;;;; +1A50;TAI THAM LETTER UU;Lo;0;L;;;;;N;;;;; +1A51;TAI THAM LETTER EE;Lo;0;L;;;;;N;;;;; +1A52;TAI THAM LETTER OO;Lo;0;L;;;;;N;;;;; +1A53;TAI THAM LETTER LAE;Lo;0;L;;;;;N;;;;; +1A54;TAI THAM LETTER GREAT SA;Lo;0;L;;;;;N;;;;; +1A55;TAI THAM CONSONANT SIGN MEDIAL RA;Mc;0;L;;;;;N;;;;; +1A56;TAI THAM CONSONANT SIGN MEDIAL LA;Mn;0;NSM;;;;;N;;;;; +1A57;TAI THAM CONSONANT SIGN LA TANG LAI;Mc;0;L;;;;;N;;;;; +1A58;TAI THAM SIGN MAI KANG LAI;Mn;0;NSM;;;;;N;;;;; +1A59;TAI THAM CONSONANT SIGN FINAL NGA;Mn;0;NSM;;;;;N;;;;; +1A5A;TAI THAM CONSONANT SIGN LOW PA;Mn;0;NSM;;;;;N;;;;; +1A5B;TAI THAM CONSONANT SIGN HIGH RATHA OR LOW PA;Mn;0;NSM;;;;;N;;;;; +1A5C;TAI THAM CONSONANT SIGN MA;Mn;0;NSM;;;;;N;;;;; +1A5D;TAI THAM CONSONANT SIGN BA;Mn;0;NSM;;;;;N;;;;; +1A5E;TAI THAM CONSONANT SIGN SA;Mn;0;NSM;;;;;N;;;;; +1A60;TAI THAM SIGN SAKOT;Mn;9;NSM;;;;;N;;;;; +1A61;TAI THAM VOWEL SIGN A;Mc;0;L;;;;;N;;;;; +1A62;TAI THAM VOWEL SIGN MAI SAT;Mn;0;NSM;;;;;N;;;;; +1A63;TAI THAM VOWEL SIGN AA;Mc;0;L;;;;;N;;;;; +1A64;TAI THAM VOWEL SIGN TALL AA;Mc;0;L;;;;;N;;;;; +1A65;TAI THAM VOWEL SIGN I;Mn;0;NSM;;;;;N;;;;; +1A66;TAI THAM VOWEL SIGN II;Mn;0;NSM;;;;;N;;;;; +1A67;TAI THAM VOWEL SIGN UE;Mn;0;NSM;;;;;N;;;;; +1A68;TAI THAM VOWEL SIGN UUE;Mn;0;NSM;;;;;N;;;;; +1A69;TAI THAM VOWEL SIGN U;Mn;0;NSM;;;;;N;;;;; +1A6A;TAI THAM VOWEL SIGN UU;Mn;0;NSM;;;;;N;;;;; +1A6B;TAI THAM VOWEL SIGN O;Mn;0;NSM;;;;;N;;;;; +1A6C;TAI THAM VOWEL SIGN OA BELOW;Mn;0;NSM;;;;;N;;;;; +1A6D;TAI THAM VOWEL SIGN OY;Mc;0;L;;;;;N;;;;; +1A6E;TAI THAM VOWEL SIGN E;Mc;0;L;;;;;N;;;;; +1A6F;TAI THAM VOWEL SIGN AE;Mc;0;L;;;;;N;;;;; +1A70;TAI THAM VOWEL SIGN OO;Mc;0;L;;;;;N;;;;; +1A71;TAI THAM VOWEL SIGN AI;Mc;0;L;;;;;N;;;;; +1A72;TAI THAM VOWEL SIGN THAM AI;Mc;0;L;;;;;N;;;;; +1A73;TAI THAM VOWEL SIGN OA ABOVE;Mn;0;NSM;;;;;N;;;;; +1A74;TAI THAM SIGN MAI KANG;Mn;0;NSM;;;;;N;;;;; +1A75;TAI THAM SIGN TONE-1;Mn;230;NSM;;;;;N;;;;; +1A76;TAI THAM SIGN TONE-2;Mn;230;NSM;;;;;N;;;;; +1A77;TAI THAM SIGN KHUEN TONE-3;Mn;230;NSM;;;;;N;;;;; +1A78;TAI THAM SIGN KHUEN TONE-4;Mn;230;NSM;;;;;N;;;;; +1A79;TAI THAM SIGN KHUEN TONE-5;Mn;230;NSM;;;;;N;;;;; +1A7A;TAI THAM SIGN RA HAAM;Mn;230;NSM;;;;;N;;;;; +1A7B;TAI THAM SIGN MAI SAM;Mn;230;NSM;;;;;N;;;;; +1A7C;TAI THAM SIGN KHUEN-LUE KARAN;Mn;230;NSM;;;;;N;;;;; +1A7F;TAI THAM COMBINING CRYPTOGRAMMIC DOT;Mn;220;NSM;;;;;N;;;;; +1A80;TAI THAM HORA DIGIT ZERO;Nd;0;L;;0;0;0;N;;;;; +1A81;TAI THAM HORA DIGIT ONE;Nd;0;L;;1;1;1;N;;;;; +1A82;TAI THAM HORA DIGIT TWO;Nd;0;L;;2;2;2;N;;;;; +1A83;TAI THAM HORA DIGIT THREE;Nd;0;L;;3;3;3;N;;;;; +1A84;TAI THAM HORA DIGIT FOUR;Nd;0;L;;4;4;4;N;;;;; +1A85;TAI THAM HORA DIGIT FIVE;Nd;0;L;;5;5;5;N;;;;; +1A86;TAI THAM HORA DIGIT SIX;Nd;0;L;;6;6;6;N;;;;; +1A87;TAI THAM HORA DIGIT SEVEN;Nd;0;L;;7;7;7;N;;;;; +1A88;TAI THAM HORA DIGIT EIGHT;Nd;0;L;;8;8;8;N;;;;; +1A89;TAI THAM HORA DIGIT NINE;Nd;0;L;;9;9;9;N;;;;; +1A90;TAI THAM THAM DIGIT ZERO;Nd;0;L;;0;0;0;N;;;;; +1A91;TAI THAM THAM DIGIT ONE;Nd;0;L;;1;1;1;N;;;;; +1A92;TAI THAM THAM DIGIT TWO;Nd;0;L;;2;2;2;N;;;;; +1A93;TAI THAM THAM DIGIT THREE;Nd;0;L;;3;3;3;N;;;;; +1A94;TAI THAM THAM DIGIT FOUR;Nd;0;L;;4;4;4;N;;;;; +1A95;TAI THAM THAM DIGIT FIVE;Nd;0;L;;5;5;5;N;;;;; +1A96;TAI THAM THAM DIGIT SIX;Nd;0;L;;6;6;6;N;;;;; +1A97;TAI THAM THAM DIGIT SEVEN;Nd;0;L;;7;7;7;N;;;;; +1A98;TAI THAM THAM DIGIT EIGHT;Nd;0;L;;8;8;8;N;;;;; +1A99;TAI THAM THAM DIGIT NINE;Nd;0;L;;9;9;9;N;;;;; +1AA0;TAI THAM SIGN WIANG;Po;0;L;;;;;N;;;;; +1AA1;TAI THAM SIGN WIANGWAAK;Po;0;L;;;;;N;;;;; +1AA2;TAI THAM SIGN SAWAN;Po;0;L;;;;;N;;;;; +1AA3;TAI THAM SIGN KEOW;Po;0;L;;;;;N;;;;; +1AA4;TAI THAM SIGN HOY;Po;0;L;;;;;N;;;;; +1AA5;TAI THAM SIGN DOKMAI;Po;0;L;;;;;N;;;;; +1AA6;TAI THAM SIGN REVERSED ROTATED RANA;Po;0;L;;;;;N;;;;; +1AA7;TAI THAM SIGN MAI YAMOK;Lm;0;L;;;;;N;;;;; +1AA8;TAI THAM SIGN KAAN;Po;0;L;;;;;N;;;;; +1AA9;TAI THAM SIGN KAANKUU;Po;0;L;;;;;N;;;;; +1AAA;TAI THAM SIGN SATKAAN;Po;0;L;;;;;N;;;;; +1AAB;TAI THAM SIGN SATKAANKUU;Po;0;L;;;;;N;;;;; +1AAC;TAI THAM SIGN HANG;Po;0;L;;;;;N;;;;; +1AAD;TAI THAM SIGN CAANG;Po;0;L;;;;;N;;;;; +1AB0;COMBINING DOUBLED CIRCUMFLEX ACCENT;Mn;230;NSM;;;;;N;;;;; +1AB1;COMBINING DIAERESIS-RING;Mn;230;NSM;;;;;N;;;;; +1AB2;COMBINING INFINITY;Mn;230;NSM;;;;;N;;;;; +1AB3;COMBINING DOWNWARDS ARROW;Mn;230;NSM;;;;;N;;;;; +1AB4;COMBINING TRIPLE DOT;Mn;230;NSM;;;;;N;;;;; +1AB5;COMBINING X-X BELOW;Mn;220;NSM;;;;;N;;;;; +1AB6;COMBINING WIGGLY LINE BELOW;Mn;220;NSM;;;;;N;;;;; +1AB7;COMBINING OPEN MARK BELOW;Mn;220;NSM;;;;;N;;;;; +1AB8;COMBINING DOUBLE OPEN MARK BELOW;Mn;220;NSM;;;;;N;;;;; +1AB9;COMBINING LIGHT CENTRALIZATION STROKE BELOW;Mn;220;NSM;;;;;N;;;;; +1ABA;COMBINING STRONG CENTRALIZATION STROKE BELOW;Mn;220;NSM;;;;;N;;;;; +1ABB;COMBINING PARENTHESES ABOVE;Mn;230;NSM;;;;;N;;;;; +1ABC;COMBINING DOUBLE PARENTHESES ABOVE;Mn;230;NSM;;;;;N;;;;; +1ABD;COMBINING PARENTHESES BELOW;Mn;220;NSM;;;;;N;;;;; +1ABE;COMBINING PARENTHESES OVERLAY;Me;0;NSM;;;;;N;;;;; +1B00;BALINESE SIGN ULU RICEM;Mn;0;NSM;;;;;N;;;;; +1B01;BALINESE SIGN ULU CANDRA;Mn;0;NSM;;;;;N;;;;; +1B02;BALINESE SIGN CECEK;Mn;0;NSM;;;;;N;;;;; +1B03;BALINESE SIGN SURANG;Mn;0;NSM;;;;;N;;;;; +1B04;BALINESE SIGN BISAH;Mc;0;L;;;;;N;;;;; +1B05;BALINESE LETTER AKARA;Lo;0;L;;;;;N;;;;; +1B06;BALINESE LETTER AKARA TEDUNG;Lo;0;L;1B05 1B35;;;;N;;;;; +1B07;BALINESE LETTER IKARA;Lo;0;L;;;;;N;;;;; +1B08;BALINESE LETTER IKARA TEDUNG;Lo;0;L;1B07 1B35;;;;N;;;;; +1B09;BALINESE LETTER UKARA;Lo;0;L;;;;;N;;;;; +1B0A;BALINESE LETTER UKARA TEDUNG;Lo;0;L;1B09 1B35;;;;N;;;;; +1B0B;BALINESE LETTER RA REPA;Lo;0;L;;;;;N;;;;; +1B0C;BALINESE LETTER RA REPA TEDUNG;Lo;0;L;1B0B 1B35;;;;N;;;;; +1B0D;BALINESE LETTER LA LENGA;Lo;0;L;;;;;N;;;;; +1B0E;BALINESE LETTER LA LENGA TEDUNG;Lo;0;L;1B0D 1B35;;;;N;;;;; +1B0F;BALINESE LETTER EKARA;Lo;0;L;;;;;N;;;;; +1B10;BALINESE LETTER AIKARA;Lo;0;L;;;;;N;;;;; +1B11;BALINESE LETTER OKARA;Lo;0;L;;;;;N;;;;; +1B12;BALINESE LETTER OKARA TEDUNG;Lo;0;L;1B11 1B35;;;;N;;;;; +1B13;BALINESE LETTER KA;Lo;0;L;;;;;N;;;;; +1B14;BALINESE LETTER KA MAHAPRANA;Lo;0;L;;;;;N;;;;; +1B15;BALINESE LETTER GA;Lo;0;L;;;;;N;;;;; +1B16;BALINESE LETTER GA GORA;Lo;0;L;;;;;N;;;;; +1B17;BALINESE LETTER NGA;Lo;0;L;;;;;N;;;;; +1B18;BALINESE LETTER CA;Lo;0;L;;;;;N;;;;; +1B19;BALINESE LETTER CA LACA;Lo;0;L;;;;;N;;;;; +1B1A;BALINESE LETTER JA;Lo;0;L;;;;;N;;;;; +1B1B;BALINESE LETTER JA JERA;Lo;0;L;;;;;N;;;;; +1B1C;BALINESE LETTER NYA;Lo;0;L;;;;;N;;;;; +1B1D;BALINESE LETTER TA LATIK;Lo;0;L;;;;;N;;;;; +1B1E;BALINESE LETTER TA MURDA MAHAPRANA;Lo;0;L;;;;;N;;;;; +1B1F;BALINESE LETTER DA MURDA ALPAPRANA;Lo;0;L;;;;;N;;;;; +1B20;BALINESE LETTER DA MURDA MAHAPRANA;Lo;0;L;;;;;N;;;;; +1B21;BALINESE LETTER NA RAMBAT;Lo;0;L;;;;;N;;;;; +1B22;BALINESE LETTER TA;Lo;0;L;;;;;N;;;;; +1B23;BALINESE LETTER TA TAWA;Lo;0;L;;;;;N;;;;; +1B24;BALINESE LETTER DA;Lo;0;L;;;;;N;;;;; +1B25;BALINESE LETTER DA MADU;Lo;0;L;;;;;N;;;;; +1B26;BALINESE LETTER NA;Lo;0;L;;;;;N;;;;; +1B27;BALINESE LETTER PA;Lo;0;L;;;;;N;;;;; +1B28;BALINESE LETTER PA KAPAL;Lo;0;L;;;;;N;;;;; +1B29;BALINESE LETTER BA;Lo;0;L;;;;;N;;;;; +1B2A;BALINESE LETTER BA KEMBANG;Lo;0;L;;;;;N;;;;; +1B2B;BALINESE LETTER MA;Lo;0;L;;;;;N;;;;; +1B2C;BALINESE LETTER YA;Lo;0;L;;;;;N;;;;; +1B2D;BALINESE LETTER RA;Lo;0;L;;;;;N;;;;; +1B2E;BALINESE LETTER LA;Lo;0;L;;;;;N;;;;; +1B2F;BALINESE LETTER WA;Lo;0;L;;;;;N;;;;; +1B30;BALINESE LETTER SA SAGA;Lo;0;L;;;;;N;;;;; +1B31;BALINESE LETTER SA SAPA;Lo;0;L;;;;;N;;;;; +1B32;BALINESE LETTER SA;Lo;0;L;;;;;N;;;;; +1B33;BALINESE LETTER HA;Lo;0;L;;;;;N;;;;; +1B34;BALINESE SIGN REREKAN;Mn;7;NSM;;;;;N;;;;; +1B35;BALINESE VOWEL SIGN TEDUNG;Mc;0;L;;;;;N;;;;; +1B36;BALINESE VOWEL SIGN ULU;Mn;0;NSM;;;;;N;;;;; +1B37;BALINESE VOWEL SIGN ULU SARI;Mn;0;NSM;;;;;N;;;;; +1B38;BALINESE VOWEL SIGN SUKU;Mn;0;NSM;;;;;N;;;;; +1B39;BALINESE VOWEL SIGN SUKU ILUT;Mn;0;NSM;;;;;N;;;;; +1B3A;BALINESE VOWEL SIGN RA REPA;Mn;0;NSM;;;;;N;;;;; +1B3B;BALINESE VOWEL SIGN RA REPA TEDUNG;Mc;0;L;1B3A 1B35;;;;N;;;;; +1B3C;BALINESE VOWEL SIGN LA LENGA;Mn;0;NSM;;;;;N;;;;; +1B3D;BALINESE VOWEL SIGN LA LENGA TEDUNG;Mc;0;L;1B3C 1B35;;;;N;;;;; +1B3E;BALINESE VOWEL SIGN TALING;Mc;0;L;;;;;N;;;;; +1B3F;BALINESE VOWEL SIGN TALING REPA;Mc;0;L;;;;;N;;;;; +1B40;BALINESE VOWEL SIGN TALING TEDUNG;Mc;0;L;1B3E 1B35;;;;N;;;;; +1B41;BALINESE VOWEL SIGN TALING REPA TEDUNG;Mc;0;L;1B3F 1B35;;;;N;;;;; +1B42;BALINESE VOWEL SIGN PEPET;Mn;0;NSM;;;;;N;;;;; +1B43;BALINESE VOWEL SIGN PEPET TEDUNG;Mc;0;L;1B42 1B35;;;;N;;;;; +1B44;BALINESE ADEG ADEG;Mc;9;L;;;;;N;;;;; +1B45;BALINESE LETTER KAF SASAK;Lo;0;L;;;;;N;;;;; +1B46;BALINESE LETTER KHOT SASAK;Lo;0;L;;;;;N;;;;; +1B47;BALINESE LETTER TZIR SASAK;Lo;0;L;;;;;N;;;;; +1B48;BALINESE LETTER EF SASAK;Lo;0;L;;;;;N;;;;; +1B49;BALINESE LETTER VE SASAK;Lo;0;L;;;;;N;;;;; +1B4A;BALINESE LETTER ZAL SASAK;Lo;0;L;;;;;N;;;;; +1B4B;BALINESE LETTER ASYURA SASAK;Lo;0;L;;;;;N;;;;; +1B50;BALINESE DIGIT ZERO;Nd;0;L;;0;0;0;N;;;;; +1B51;BALINESE DIGIT ONE;Nd;0;L;;1;1;1;N;;;;; +1B52;BALINESE DIGIT TWO;Nd;0;L;;2;2;2;N;;;;; +1B53;BALINESE DIGIT THREE;Nd;0;L;;3;3;3;N;;;;; +1B54;BALINESE DIGIT FOUR;Nd;0;L;;4;4;4;N;;;;; +1B55;BALINESE DIGIT FIVE;Nd;0;L;;5;5;5;N;;;;; +1B56;BALINESE DIGIT SIX;Nd;0;L;;6;6;6;N;;;;; +1B57;BALINESE DIGIT SEVEN;Nd;0;L;;7;7;7;N;;;;; +1B58;BALINESE DIGIT EIGHT;Nd;0;L;;8;8;8;N;;;;; +1B59;BALINESE DIGIT NINE;Nd;0;L;;9;9;9;N;;;;; +1B5A;BALINESE PANTI;Po;0;L;;;;;N;;;;; +1B5B;BALINESE PAMADA;Po;0;L;;;;;N;;;;; +1B5C;BALINESE WINDU;Po;0;L;;;;;N;;;;; +1B5D;BALINESE CARIK PAMUNGKAH;Po;0;L;;;;;N;;;;; +1B5E;BALINESE CARIK SIKI;Po;0;L;;;;;N;;;;; +1B5F;BALINESE CARIK PAREREN;Po;0;L;;;;;N;;;;; +1B60;BALINESE PAMENENG;Po;0;L;;;;;N;;;;; +1B61;BALINESE MUSICAL SYMBOL DONG;So;0;L;;;;;N;;;;; +1B62;BALINESE MUSICAL SYMBOL DENG;So;0;L;;;;;N;;;;; +1B63;BALINESE MUSICAL SYMBOL DUNG;So;0;L;;;;;N;;;;; +1B64;BALINESE MUSICAL SYMBOL DANG;So;0;L;;;;;N;;;;; +1B65;BALINESE MUSICAL SYMBOL DANG SURANG;So;0;L;;;;;N;;;;; +1B66;BALINESE MUSICAL SYMBOL DING;So;0;L;;;;;N;;;;; +1B67;BALINESE MUSICAL SYMBOL DAENG;So;0;L;;;;;N;;;;; +1B68;BALINESE MUSICAL SYMBOL DEUNG;So;0;L;;;;;N;;;;; +1B69;BALINESE MUSICAL SYMBOL DAING;So;0;L;;;;;N;;;;; +1B6A;BALINESE MUSICAL SYMBOL DANG GEDE;So;0;L;;;;;N;;;;; +1B6B;BALINESE MUSICAL SYMBOL COMBINING TEGEH;Mn;230;NSM;;;;;N;;;;; +1B6C;BALINESE MUSICAL SYMBOL COMBINING ENDEP;Mn;220;NSM;;;;;N;;;;; +1B6D;BALINESE MUSICAL SYMBOL COMBINING KEMPUL;Mn;230;NSM;;;;;N;;;;; +1B6E;BALINESE MUSICAL SYMBOL COMBINING KEMPLI;Mn;230;NSM;;;;;N;;;;; +1B6F;BALINESE MUSICAL SYMBOL COMBINING JEGOGAN;Mn;230;NSM;;;;;N;;;;; +1B70;BALINESE MUSICAL SYMBOL COMBINING KEMPUL WITH JEGOGAN;Mn;230;NSM;;;;;N;;;;; +1B71;BALINESE MUSICAL SYMBOL COMBINING KEMPLI WITH JEGOGAN;Mn;230;NSM;;;;;N;;;;; +1B72;BALINESE MUSICAL SYMBOL COMBINING BENDE;Mn;230;NSM;;;;;N;;;;; +1B73;BALINESE MUSICAL SYMBOL COMBINING GONG;Mn;230;NSM;;;;;N;;;;; +1B74;BALINESE MUSICAL SYMBOL RIGHT-HAND OPEN DUG;So;0;L;;;;;N;;;;; +1B75;BALINESE MUSICAL SYMBOL RIGHT-HAND OPEN DAG;So;0;L;;;;;N;;;;; +1B76;BALINESE MUSICAL SYMBOL RIGHT-HAND CLOSED TUK;So;0;L;;;;;N;;;;; +1B77;BALINESE MUSICAL SYMBOL RIGHT-HAND CLOSED TAK;So;0;L;;;;;N;;;;; +1B78;BALINESE MUSICAL SYMBOL LEFT-HAND OPEN PANG;So;0;L;;;;;N;;;;; +1B79;BALINESE MUSICAL SYMBOL LEFT-HAND OPEN PUNG;So;0;L;;;;;N;;;;; +1B7A;BALINESE MUSICAL SYMBOL LEFT-HAND CLOSED PLAK;So;0;L;;;;;N;;;;; +1B7B;BALINESE MUSICAL SYMBOL LEFT-HAND CLOSED PLUK;So;0;L;;;;;N;;;;; +1B7C;BALINESE MUSICAL SYMBOL LEFT-HAND OPEN PING;So;0;L;;;;;N;;;;; +1B80;SUNDANESE SIGN PANYECEK;Mn;0;NSM;;;;;N;;;;; +1B81;SUNDANESE SIGN PANGLAYAR;Mn;0;NSM;;;;;N;;;;; +1B82;SUNDANESE SIGN PANGWISAD;Mc;0;L;;;;;N;;;;; +1B83;SUNDANESE LETTER A;Lo;0;L;;;;;N;;;;; +1B84;SUNDANESE LETTER I;Lo;0;L;;;;;N;;;;; +1B85;SUNDANESE LETTER U;Lo;0;L;;;;;N;;;;; +1B86;SUNDANESE LETTER AE;Lo;0;L;;;;;N;;;;; +1B87;SUNDANESE LETTER O;Lo;0;L;;;;;N;;;;; +1B88;SUNDANESE LETTER E;Lo;0;L;;;;;N;;;;; +1B89;SUNDANESE LETTER EU;Lo;0;L;;;;;N;;;;; +1B8A;SUNDANESE LETTER KA;Lo;0;L;;;;;N;;;;; +1B8B;SUNDANESE LETTER QA;Lo;0;L;;;;;N;;;;; +1B8C;SUNDANESE LETTER GA;Lo;0;L;;;;;N;;;;; +1B8D;SUNDANESE LETTER NGA;Lo;0;L;;;;;N;;;;; +1B8E;SUNDANESE LETTER CA;Lo;0;L;;;;;N;;;;; +1B8F;SUNDANESE LETTER JA;Lo;0;L;;;;;N;;;;; +1B90;SUNDANESE LETTER ZA;Lo;0;L;;;;;N;;;;; +1B91;SUNDANESE LETTER NYA;Lo;0;L;;;;;N;;;;; +1B92;SUNDANESE LETTER TA;Lo;0;L;;;;;N;;;;; +1B93;SUNDANESE LETTER DA;Lo;0;L;;;;;N;;;;; +1B94;SUNDANESE LETTER NA;Lo;0;L;;;;;N;;;;; +1B95;SUNDANESE LETTER PA;Lo;0;L;;;;;N;;;;; +1B96;SUNDANESE LETTER FA;Lo;0;L;;;;;N;;;;; +1B97;SUNDANESE LETTER VA;Lo;0;L;;;;;N;;;;; +1B98;SUNDANESE LETTER BA;Lo;0;L;;;;;N;;;;; +1B99;SUNDANESE LETTER MA;Lo;0;L;;;;;N;;;;; +1B9A;SUNDANESE LETTER YA;Lo;0;L;;;;;N;;;;; +1B9B;SUNDANESE LETTER RA;Lo;0;L;;;;;N;;;;; +1B9C;SUNDANESE LETTER LA;Lo;0;L;;;;;N;;;;; +1B9D;SUNDANESE LETTER WA;Lo;0;L;;;;;N;;;;; +1B9E;SUNDANESE LETTER SA;Lo;0;L;;;;;N;;;;; +1B9F;SUNDANESE LETTER XA;Lo;0;L;;;;;N;;;;; +1BA0;SUNDANESE LETTER HA;Lo;0;L;;;;;N;;;;; +1BA1;SUNDANESE CONSONANT SIGN PAMINGKAL;Mc;0;L;;;;;N;;;;; +1BA2;SUNDANESE CONSONANT SIGN PANYAKRA;Mn;0;NSM;;;;;N;;;;; +1BA3;SUNDANESE CONSONANT SIGN PANYIKU;Mn;0;NSM;;;;;N;;;;; +1BA4;SUNDANESE VOWEL SIGN PANGHULU;Mn;0;NSM;;;;;N;;;;; +1BA5;SUNDANESE VOWEL SIGN PANYUKU;Mn;0;NSM;;;;;N;;;;; +1BA6;SUNDANESE VOWEL SIGN PANAELAENG;Mc;0;L;;;;;N;;;;; +1BA7;SUNDANESE VOWEL SIGN PANOLONG;Mc;0;L;;;;;N;;;;; +1BA8;SUNDANESE VOWEL SIGN PAMEPET;Mn;0;NSM;;;;;N;;;;; +1BA9;SUNDANESE VOWEL SIGN PANEULEUNG;Mn;0;NSM;;;;;N;;;;; +1BAA;SUNDANESE SIGN PAMAAEH;Mc;9;L;;;;;N;;;;; +1BAB;SUNDANESE SIGN VIRAMA;Mn;9;NSM;;;;;N;;;;; +1BAC;SUNDANESE CONSONANT SIGN PASANGAN MA;Mn;0;NSM;;;;;N;;;;; +1BAD;SUNDANESE CONSONANT SIGN PASANGAN WA;Mn;0;NSM;;;;;N;;;;; +1BAE;SUNDANESE LETTER KHA;Lo;0;L;;;;;N;;;;; +1BAF;SUNDANESE LETTER SYA;Lo;0;L;;;;;N;;;;; +1BB0;SUNDANESE DIGIT ZERO;Nd;0;L;;0;0;0;N;;;;; +1BB1;SUNDANESE DIGIT ONE;Nd;0;L;;1;1;1;N;;;;; +1BB2;SUNDANESE DIGIT TWO;Nd;0;L;;2;2;2;N;;;;; +1BB3;SUNDANESE DIGIT THREE;Nd;0;L;;3;3;3;N;;;;; +1BB4;SUNDANESE DIGIT FOUR;Nd;0;L;;4;4;4;N;;;;; +1BB5;SUNDANESE DIGIT FIVE;Nd;0;L;;5;5;5;N;;;;; +1BB6;SUNDANESE DIGIT SIX;Nd;0;L;;6;6;6;N;;;;; +1BB7;SUNDANESE DIGIT SEVEN;Nd;0;L;;7;7;7;N;;;;; +1BB8;SUNDANESE DIGIT EIGHT;Nd;0;L;;8;8;8;N;;;;; +1BB9;SUNDANESE DIGIT NINE;Nd;0;L;;9;9;9;N;;;;; +1BBA;SUNDANESE AVAGRAHA;Lo;0;L;;;;;N;;;;; +1BBB;SUNDANESE LETTER REU;Lo;0;L;;;;;N;;;;; +1BBC;SUNDANESE LETTER LEU;Lo;0;L;;;;;N;;;;; +1BBD;SUNDANESE LETTER BHA;Lo;0;L;;;;;N;;;;; +1BBE;SUNDANESE LETTER FINAL K;Lo;0;L;;;;;N;;;;; +1BBF;SUNDANESE LETTER FINAL M;Lo;0;L;;;;;N;;;;; +1BC0;BATAK LETTER A;Lo;0;L;;;;;N;;;;; +1BC1;BATAK LETTER SIMALUNGUN A;Lo;0;L;;;;;N;;;;; +1BC2;BATAK LETTER HA;Lo;0;L;;;;;N;;;;; +1BC3;BATAK LETTER SIMALUNGUN HA;Lo;0;L;;;;;N;;;;; +1BC4;BATAK LETTER MANDAILING HA;Lo;0;L;;;;;N;;;;; +1BC5;BATAK LETTER BA;Lo;0;L;;;;;N;;;;; +1BC6;BATAK LETTER KARO BA;Lo;0;L;;;;;N;;;;; +1BC7;BATAK LETTER PA;Lo;0;L;;;;;N;;;;; +1BC8;BATAK LETTER SIMALUNGUN PA;Lo;0;L;;;;;N;;;;; +1BC9;BATAK LETTER NA;Lo;0;L;;;;;N;;;;; +1BCA;BATAK LETTER MANDAILING NA;Lo;0;L;;;;;N;;;;; +1BCB;BATAK LETTER WA;Lo;0;L;;;;;N;;;;; +1BCC;BATAK LETTER SIMALUNGUN WA;Lo;0;L;;;;;N;;;;; +1BCD;BATAK LETTER PAKPAK WA;Lo;0;L;;;;;N;;;;; +1BCE;BATAK LETTER GA;Lo;0;L;;;;;N;;;;; +1BCF;BATAK LETTER SIMALUNGUN GA;Lo;0;L;;;;;N;;;;; +1BD0;BATAK LETTER JA;Lo;0;L;;;;;N;;;;; +1BD1;BATAK LETTER DA;Lo;0;L;;;;;N;;;;; +1BD2;BATAK LETTER RA;Lo;0;L;;;;;N;;;;; +1BD3;BATAK LETTER SIMALUNGUN RA;Lo;0;L;;;;;N;;;;; +1BD4;BATAK LETTER MA;Lo;0;L;;;;;N;;;;; +1BD5;BATAK LETTER SIMALUNGUN MA;Lo;0;L;;;;;N;;;;; +1BD6;BATAK LETTER SOUTHERN TA;Lo;0;L;;;;;N;;;;; +1BD7;BATAK LETTER NORTHERN TA;Lo;0;L;;;;;N;;;;; +1BD8;BATAK LETTER SA;Lo;0;L;;;;;N;;;;; +1BD9;BATAK LETTER SIMALUNGUN SA;Lo;0;L;;;;;N;;;;; +1BDA;BATAK LETTER MANDAILING SA;Lo;0;L;;;;;N;;;;; +1BDB;BATAK LETTER YA;Lo;0;L;;;;;N;;;;; +1BDC;BATAK LETTER SIMALUNGUN YA;Lo;0;L;;;;;N;;;;; +1BDD;BATAK LETTER NGA;Lo;0;L;;;;;N;;;;; +1BDE;BATAK LETTER LA;Lo;0;L;;;;;N;;;;; +1BDF;BATAK LETTER SIMALUNGUN LA;Lo;0;L;;;;;N;;;;; +1BE0;BATAK LETTER NYA;Lo;0;L;;;;;N;;;;; +1BE1;BATAK LETTER CA;Lo;0;L;;;;;N;;;;; +1BE2;BATAK LETTER NDA;Lo;0;L;;;;;N;;;;; +1BE3;BATAK LETTER MBA;Lo;0;L;;;;;N;;;;; +1BE4;BATAK LETTER I;Lo;0;L;;;;;N;;;;; +1BE5;BATAK LETTER U;Lo;0;L;;;;;N;;;;; +1BE6;BATAK SIGN TOMPI;Mn;7;NSM;;;;;N;;;;; +1BE7;BATAK VOWEL SIGN E;Mc;0;L;;;;;N;;;;; +1BE8;BATAK VOWEL SIGN PAKPAK E;Mn;0;NSM;;;;;N;;;;; +1BE9;BATAK VOWEL SIGN EE;Mn;0;NSM;;;;;N;;;;; +1BEA;BATAK VOWEL SIGN I;Mc;0;L;;;;;N;;;;; +1BEB;BATAK VOWEL SIGN KARO I;Mc;0;L;;;;;N;;;;; +1BEC;BATAK VOWEL SIGN O;Mc;0;L;;;;;N;;;;; +1BED;BATAK VOWEL SIGN KARO O;Mn;0;NSM;;;;;N;;;;; +1BEE;BATAK VOWEL SIGN U;Mc;0;L;;;;;N;;;;; +1BEF;BATAK VOWEL SIGN U FOR SIMALUNGUN SA;Mn;0;NSM;;;;;N;;;;; +1BF0;BATAK CONSONANT SIGN NG;Mn;0;NSM;;;;;N;;;;; +1BF1;BATAK CONSONANT SIGN H;Mn;0;NSM;;;;;N;;;;; +1BF2;BATAK PANGOLAT;Mc;9;L;;;;;N;;;;; +1BF3;BATAK PANONGONAN;Mc;9;L;;;;;N;;;;; +1BFC;BATAK SYMBOL BINDU NA METEK;Po;0;L;;;;;N;;;;; +1BFD;BATAK SYMBOL BINDU PINARBORAS;Po;0;L;;;;;N;;;;; +1BFE;BATAK SYMBOL BINDU JUDUL;Po;0;L;;;;;N;;;;; +1BFF;BATAK SYMBOL BINDU PANGOLAT;Po;0;L;;;;;N;;;;; +1C00;LEPCHA LETTER KA;Lo;0;L;;;;;N;;;;; +1C01;LEPCHA LETTER KLA;Lo;0;L;;;;;N;;;;; +1C02;LEPCHA LETTER KHA;Lo;0;L;;;;;N;;;;; +1C03;LEPCHA LETTER GA;Lo;0;L;;;;;N;;;;; +1C04;LEPCHA LETTER GLA;Lo;0;L;;;;;N;;;;; +1C05;LEPCHA LETTER NGA;Lo;0;L;;;;;N;;;;; +1C06;LEPCHA LETTER CA;Lo;0;L;;;;;N;;;;; +1C07;LEPCHA LETTER CHA;Lo;0;L;;;;;N;;;;; +1C08;LEPCHA LETTER JA;Lo;0;L;;;;;N;;;;; +1C09;LEPCHA LETTER NYA;Lo;0;L;;;;;N;;;;; +1C0A;LEPCHA LETTER TA;Lo;0;L;;;;;N;;;;; +1C0B;LEPCHA LETTER THA;Lo;0;L;;;;;N;;;;; +1C0C;LEPCHA LETTER DA;Lo;0;L;;;;;N;;;;; +1C0D;LEPCHA LETTER NA;Lo;0;L;;;;;N;;;;; +1C0E;LEPCHA LETTER PA;Lo;0;L;;;;;N;;;;; +1C0F;LEPCHA LETTER PLA;Lo;0;L;;;;;N;;;;; +1C10;LEPCHA LETTER PHA;Lo;0;L;;;;;N;;;;; +1C11;LEPCHA LETTER FA;Lo;0;L;;;;;N;;;;; +1C12;LEPCHA LETTER FLA;Lo;0;L;;;;;N;;;;; +1C13;LEPCHA LETTER BA;Lo;0;L;;;;;N;;;;; +1C14;LEPCHA LETTER BLA;Lo;0;L;;;;;N;;;;; +1C15;LEPCHA LETTER MA;Lo;0;L;;;;;N;;;;; +1C16;LEPCHA LETTER MLA;Lo;0;L;;;;;N;;;;; +1C17;LEPCHA LETTER TSA;Lo;0;L;;;;;N;;;;; +1C18;LEPCHA LETTER TSHA;Lo;0;L;;;;;N;;;;; +1C19;LEPCHA LETTER DZA;Lo;0;L;;;;;N;;;;; +1C1A;LEPCHA LETTER YA;Lo;0;L;;;;;N;;;;; +1C1B;LEPCHA LETTER RA;Lo;0;L;;;;;N;;;;; +1C1C;LEPCHA LETTER LA;Lo;0;L;;;;;N;;;;; +1C1D;LEPCHA LETTER HA;Lo;0;L;;;;;N;;;;; +1C1E;LEPCHA LETTER HLA;Lo;0;L;;;;;N;;;;; +1C1F;LEPCHA LETTER VA;Lo;0;L;;;;;N;;;;; +1C20;LEPCHA LETTER SA;Lo;0;L;;;;;N;;;;; +1C21;LEPCHA LETTER SHA;Lo;0;L;;;;;N;;;;; +1C22;LEPCHA LETTER WA;Lo;0;L;;;;;N;;;;; +1C23;LEPCHA LETTER A;Lo;0;L;;;;;N;;;;; +1C24;LEPCHA SUBJOINED LETTER YA;Mc;0;L;;;;;N;;;;; +1C25;LEPCHA SUBJOINED LETTER RA;Mc;0;L;;;;;N;;;;; +1C26;LEPCHA VOWEL SIGN AA;Mc;0;L;;;;;N;;;;; +1C27;LEPCHA VOWEL SIGN I;Mc;0;L;;;;;N;;;;; +1C28;LEPCHA VOWEL SIGN O;Mc;0;L;;;;;N;;;;; +1C29;LEPCHA VOWEL SIGN OO;Mc;0;L;;;;;N;;;;; +1C2A;LEPCHA VOWEL SIGN U;Mc;0;L;;;;;N;;;;; +1C2B;LEPCHA VOWEL SIGN UU;Mc;0;L;;;;;N;;;;; +1C2C;LEPCHA VOWEL SIGN E;Mn;0;NSM;;;;;N;;;;; +1C2D;LEPCHA CONSONANT SIGN K;Mn;0;NSM;;;;;N;;;;; +1C2E;LEPCHA CONSONANT SIGN M;Mn;0;NSM;;;;;N;;;;; +1C2F;LEPCHA CONSONANT SIGN L;Mn;0;NSM;;;;;N;;;;; +1C30;LEPCHA CONSONANT SIGN N;Mn;0;NSM;;;;;N;;;;; +1C31;LEPCHA CONSONANT SIGN P;Mn;0;NSM;;;;;N;;;;; +1C32;LEPCHA CONSONANT SIGN R;Mn;0;NSM;;;;;N;;;;; +1C33;LEPCHA CONSONANT SIGN T;Mn;0;NSM;;;;;N;;;;; +1C34;LEPCHA CONSONANT SIGN NYIN-DO;Mc;0;L;;;;;N;;;;; +1C35;LEPCHA CONSONANT SIGN KANG;Mc;0;L;;;;;N;;;;; +1C36;LEPCHA SIGN RAN;Mn;0;NSM;;;;;N;;;;; +1C37;LEPCHA SIGN NUKTA;Mn;7;NSM;;;;;N;;;;; +1C3B;LEPCHA PUNCTUATION TA-ROL;Po;0;L;;;;;N;;;;; +1C3C;LEPCHA PUNCTUATION NYET THYOOM TA-ROL;Po;0;L;;;;;N;;;;; +1C3D;LEPCHA PUNCTUATION CER-WA;Po;0;L;;;;;N;;;;; +1C3E;LEPCHA PUNCTUATION TSHOOK CER-WA;Po;0;L;;;;;N;;;;; +1C3F;LEPCHA PUNCTUATION TSHOOK;Po;0;L;;;;;N;;;;; +1C40;LEPCHA DIGIT ZERO;Nd;0;L;;0;0;0;N;;;;; +1C41;LEPCHA DIGIT ONE;Nd;0;L;;1;1;1;N;;;;; +1C42;LEPCHA DIGIT TWO;Nd;0;L;;2;2;2;N;;;;; +1C43;LEPCHA DIGIT THREE;Nd;0;L;;3;3;3;N;;;;; +1C44;LEPCHA DIGIT FOUR;Nd;0;L;;4;4;4;N;;;;; +1C45;LEPCHA DIGIT FIVE;Nd;0;L;;5;5;5;N;;;;; +1C46;LEPCHA DIGIT SIX;Nd;0;L;;6;6;6;N;;;;; +1C47;LEPCHA DIGIT SEVEN;Nd;0;L;;7;7;7;N;;;;; +1C48;LEPCHA DIGIT EIGHT;Nd;0;L;;8;8;8;N;;;;; +1C49;LEPCHA DIGIT NINE;Nd;0;L;;9;9;9;N;;;;; +1C4D;LEPCHA LETTER TTA;Lo;0;L;;;;;N;;;;; +1C4E;LEPCHA LETTER TTHA;Lo;0;L;;;;;N;;;;; +1C4F;LEPCHA LETTER DDA;Lo;0;L;;;;;N;;;;; +1C50;OL CHIKI DIGIT ZERO;Nd;0;L;;0;0;0;N;;;;; +1C51;OL CHIKI DIGIT ONE;Nd;0;L;;1;1;1;N;;;;; +1C52;OL CHIKI DIGIT TWO;Nd;0;L;;2;2;2;N;;;;; +1C53;OL CHIKI DIGIT THREE;Nd;0;L;;3;3;3;N;;;;; +1C54;OL CHIKI DIGIT FOUR;Nd;0;L;;4;4;4;N;;;;; +1C55;OL CHIKI DIGIT FIVE;Nd;0;L;;5;5;5;N;;;;; +1C56;OL CHIKI DIGIT SIX;Nd;0;L;;6;6;6;N;;;;; +1C57;OL CHIKI DIGIT SEVEN;Nd;0;L;;7;7;7;N;;;;; +1C58;OL CHIKI DIGIT EIGHT;Nd;0;L;;8;8;8;N;;;;; +1C59;OL CHIKI DIGIT NINE;Nd;0;L;;9;9;9;N;;;;; +1C5A;OL CHIKI LETTER LA;Lo;0;L;;;;;N;;;;; +1C5B;OL CHIKI LETTER AT;Lo;0;L;;;;;N;;;;; +1C5C;OL CHIKI LETTER AG;Lo;0;L;;;;;N;;;;; +1C5D;OL CHIKI LETTER ANG;Lo;0;L;;;;;N;;;;; +1C5E;OL CHIKI LETTER AL;Lo;0;L;;;;;N;;;;; +1C5F;OL CHIKI LETTER LAA;Lo;0;L;;;;;N;;;;; +1C60;OL CHIKI LETTER AAK;Lo;0;L;;;;;N;;;;; +1C61;OL CHIKI LETTER AAJ;Lo;0;L;;;;;N;;;;; +1C62;OL CHIKI LETTER AAM;Lo;0;L;;;;;N;;;;; +1C63;OL CHIKI LETTER AAW;Lo;0;L;;;;;N;;;;; +1C64;OL CHIKI LETTER LI;Lo;0;L;;;;;N;;;;; +1C65;OL CHIKI LETTER IS;Lo;0;L;;;;;N;;;;; +1C66;OL CHIKI LETTER IH;Lo;0;L;;;;;N;;;;; +1C67;OL CHIKI LETTER INY;Lo;0;L;;;;;N;;;;; +1C68;OL CHIKI LETTER IR;Lo;0;L;;;;;N;;;;; +1C69;OL CHIKI LETTER LU;Lo;0;L;;;;;N;;;;; +1C6A;OL CHIKI LETTER UC;Lo;0;L;;;;;N;;;;; +1C6B;OL CHIKI LETTER UD;Lo;0;L;;;;;N;;;;; +1C6C;OL CHIKI LETTER UNN;Lo;0;L;;;;;N;;;;; +1C6D;OL CHIKI LETTER UY;Lo;0;L;;;;;N;;;;; +1C6E;OL CHIKI LETTER LE;Lo;0;L;;;;;N;;;;; +1C6F;OL CHIKI LETTER EP;Lo;0;L;;;;;N;;;;; +1C70;OL CHIKI LETTER EDD;Lo;0;L;;;;;N;;;;; +1C71;OL CHIKI LETTER EN;Lo;0;L;;;;;N;;;;; +1C72;OL CHIKI LETTER ERR;Lo;0;L;;;;;N;;;;; +1C73;OL CHIKI LETTER LO;Lo;0;L;;;;;N;;;;; +1C74;OL CHIKI LETTER OTT;Lo;0;L;;;;;N;;;;; +1C75;OL CHIKI LETTER OB;Lo;0;L;;;;;N;;;;; +1C76;OL CHIKI LETTER OV;Lo;0;L;;;;;N;;;;; +1C77;OL CHIKI LETTER OH;Lo;0;L;;;;;N;;;;; +1C78;OL CHIKI MU TTUDDAG;Lm;0;L;;;;;N;;;;; +1C79;OL CHIKI GAAHLAA TTUDDAAG;Lm;0;L;;;;;N;;;;; +1C7A;OL CHIKI MU-GAAHLAA TTUDDAAG;Lm;0;L;;;;;N;;;;; +1C7B;OL CHIKI RELAA;Lm;0;L;;;;;N;;;;; +1C7C;OL CHIKI PHAARKAA;Lm;0;L;;;;;N;;;;; +1C7D;OL CHIKI AHAD;Lm;0;L;;;;;N;;;;; +1C7E;OL CHIKI PUNCTUATION MUCAAD;Po;0;L;;;;;N;;;;; +1C7F;OL CHIKI PUNCTUATION DOUBLE MUCAAD;Po;0;L;;;;;N;;;;; +1C80;CYRILLIC SMALL LETTER ROUNDED VE;Ll;0;L;;;;;N;;;0412;;0412 +1C81;CYRILLIC SMALL LETTER LONG-LEGGED DE;Ll;0;L;;;;;N;;;0414;;0414 +1C82;CYRILLIC SMALL LETTER NARROW O;Ll;0;L;;;;;N;;;041E;;041E +1C83;CYRILLIC SMALL LETTER WIDE ES;Ll;0;L;;;;;N;;;0421;;0421 +1C84;CYRILLIC SMALL LETTER TALL TE;Ll;0;L;;;;;N;;;0422;;0422 +1C85;CYRILLIC SMALL LETTER THREE-LEGGED TE;Ll;0;L;;;;;N;;;0422;;0422 +1C86;CYRILLIC SMALL LETTER TALL HARD SIGN;Ll;0;L;;;;;N;;;042A;;042A +1C87;CYRILLIC SMALL LETTER TALL YAT;Ll;0;L;;;;;N;;;0462;;0462 +1C88;CYRILLIC SMALL LETTER UNBLENDED UK;Ll;0;L;;;;;N;;;A64A;;A64A +1C90;GEORGIAN MTAVRULI CAPITAL LETTER AN;Lu;0;L;;;;;N;;;;10D0; +1C91;GEORGIAN MTAVRULI CAPITAL LETTER BAN;Lu;0;L;;;;;N;;;;10D1; +1C92;GEORGIAN MTAVRULI CAPITAL LETTER GAN;Lu;0;L;;;;;N;;;;10D2; +1C93;GEORGIAN MTAVRULI CAPITAL LETTER DON;Lu;0;L;;;;;N;;;;10D3; +1C94;GEORGIAN MTAVRULI CAPITAL LETTER EN;Lu;0;L;;;;;N;;;;10D4; +1C95;GEORGIAN MTAVRULI CAPITAL LETTER VIN;Lu;0;L;;;;;N;;;;10D5; +1C96;GEORGIAN MTAVRULI CAPITAL LETTER ZEN;Lu;0;L;;;;;N;;;;10D6; +1C97;GEORGIAN MTAVRULI CAPITAL LETTER TAN;Lu;0;L;;;;;N;;;;10D7; +1C98;GEORGIAN MTAVRULI CAPITAL LETTER IN;Lu;0;L;;;;;N;;;;10D8; +1C99;GEORGIAN MTAVRULI CAPITAL LETTER KAN;Lu;0;L;;;;;N;;;;10D9; +1C9A;GEORGIAN MTAVRULI CAPITAL LETTER LAS;Lu;0;L;;;;;N;;;;10DA; +1C9B;GEORGIAN MTAVRULI CAPITAL LETTER MAN;Lu;0;L;;;;;N;;;;10DB; +1C9C;GEORGIAN MTAVRULI CAPITAL LETTER NAR;Lu;0;L;;;;;N;;;;10DC; +1C9D;GEORGIAN MTAVRULI CAPITAL LETTER ON;Lu;0;L;;;;;N;;;;10DD; +1C9E;GEORGIAN MTAVRULI CAPITAL LETTER PAR;Lu;0;L;;;;;N;;;;10DE; +1C9F;GEORGIAN MTAVRULI CAPITAL LETTER ZHAR;Lu;0;L;;;;;N;;;;10DF; +1CA0;GEORGIAN MTAVRULI CAPITAL LETTER RAE;Lu;0;L;;;;;N;;;;10E0; +1CA1;GEORGIAN MTAVRULI CAPITAL LETTER SAN;Lu;0;L;;;;;N;;;;10E1; +1CA2;GEORGIAN MTAVRULI CAPITAL LETTER TAR;Lu;0;L;;;;;N;;;;10E2; +1CA3;GEORGIAN MTAVRULI CAPITAL LETTER UN;Lu;0;L;;;;;N;;;;10E3; +1CA4;GEORGIAN MTAVRULI CAPITAL LETTER PHAR;Lu;0;L;;;;;N;;;;10E4; +1CA5;GEORGIAN MTAVRULI CAPITAL LETTER KHAR;Lu;0;L;;;;;N;;;;10E5; +1CA6;GEORGIAN MTAVRULI CAPITAL LETTER GHAN;Lu;0;L;;;;;N;;;;10E6; +1CA7;GEORGIAN MTAVRULI CAPITAL LETTER QAR;Lu;0;L;;;;;N;;;;10E7; +1CA8;GEORGIAN MTAVRULI CAPITAL LETTER SHIN;Lu;0;L;;;;;N;;;;10E8; +1CA9;GEORGIAN MTAVRULI CAPITAL LETTER CHIN;Lu;0;L;;;;;N;;;;10E9; +1CAA;GEORGIAN MTAVRULI CAPITAL LETTER CAN;Lu;0;L;;;;;N;;;;10EA; +1CAB;GEORGIAN MTAVRULI CAPITAL LETTER JIL;Lu;0;L;;;;;N;;;;10EB; +1CAC;GEORGIAN MTAVRULI CAPITAL LETTER CIL;Lu;0;L;;;;;N;;;;10EC; +1CAD;GEORGIAN MTAVRULI CAPITAL LETTER CHAR;Lu;0;L;;;;;N;;;;10ED; +1CAE;GEORGIAN MTAVRULI CAPITAL LETTER XAN;Lu;0;L;;;;;N;;;;10EE; +1CAF;GEORGIAN MTAVRULI CAPITAL LETTER JHAN;Lu;0;L;;;;;N;;;;10EF; +1CB0;GEORGIAN MTAVRULI CAPITAL LETTER HAE;Lu;0;L;;;;;N;;;;10F0; +1CB1;GEORGIAN MTAVRULI CAPITAL LETTER HE;Lu;0;L;;;;;N;;;;10F1; +1CB2;GEORGIAN MTAVRULI CAPITAL LETTER HIE;Lu;0;L;;;;;N;;;;10F2; +1CB3;GEORGIAN MTAVRULI CAPITAL LETTER WE;Lu;0;L;;;;;N;;;;10F3; +1CB4;GEORGIAN MTAVRULI CAPITAL LETTER HAR;Lu;0;L;;;;;N;;;;10F4; +1CB5;GEORGIAN MTAVRULI CAPITAL LETTER HOE;Lu;0;L;;;;;N;;;;10F5; +1CB6;GEORGIAN MTAVRULI CAPITAL LETTER FI;Lu;0;L;;;;;N;;;;10F6; +1CB7;GEORGIAN MTAVRULI CAPITAL LETTER YN;Lu;0;L;;;;;N;;;;10F7; +1CB8;GEORGIAN MTAVRULI CAPITAL LETTER ELIFI;Lu;0;L;;;;;N;;;;10F8; +1CB9;GEORGIAN MTAVRULI CAPITAL LETTER TURNED GAN;Lu;0;L;;;;;N;;;;10F9; +1CBA;GEORGIAN MTAVRULI CAPITAL LETTER AIN;Lu;0;L;;;;;N;;;;10FA; +1CBD;GEORGIAN MTAVRULI CAPITAL LETTER AEN;Lu;0;L;;;;;N;;;;10FD; +1CBE;GEORGIAN MTAVRULI CAPITAL LETTER HARD SIGN;Lu;0;L;;;;;N;;;;10FE; +1CBF;GEORGIAN MTAVRULI CAPITAL LETTER LABIAL SIGN;Lu;0;L;;;;;N;;;;10FF; +1CC0;SUNDANESE PUNCTUATION BINDU SURYA;Po;0;L;;;;;N;;;;; +1CC1;SUNDANESE PUNCTUATION BINDU PANGLONG;Po;0;L;;;;;N;;;;; +1CC2;SUNDANESE PUNCTUATION BINDU PURNAMA;Po;0;L;;;;;N;;;;; +1CC3;SUNDANESE PUNCTUATION BINDU CAKRA;Po;0;L;;;;;N;;;;; +1CC4;SUNDANESE PUNCTUATION BINDU LEU SATANGA;Po;0;L;;;;;N;;;;; +1CC5;SUNDANESE PUNCTUATION BINDU KA SATANGA;Po;0;L;;;;;N;;;;; +1CC6;SUNDANESE PUNCTUATION BINDU DA SATANGA;Po;0;L;;;;;N;;;;; +1CC7;SUNDANESE PUNCTUATION BINDU BA SATANGA;Po;0;L;;;;;N;;;;; +1CD0;VEDIC TONE KARSHANA;Mn;230;NSM;;;;;N;;;;; +1CD1;VEDIC TONE SHARA;Mn;230;NSM;;;;;N;;;;; +1CD2;VEDIC TONE PRENKHA;Mn;230;NSM;;;;;N;;;;; +1CD3;VEDIC SIGN NIHSHVASA;Po;0;L;;;;;N;;;;; +1CD4;VEDIC SIGN YAJURVEDIC MIDLINE SVARITA;Mn;1;NSM;;;;;N;;;;; +1CD5;VEDIC TONE YAJURVEDIC AGGRAVATED INDEPENDENT SVARITA;Mn;220;NSM;;;;;N;;;;; +1CD6;VEDIC TONE YAJURVEDIC INDEPENDENT SVARITA;Mn;220;NSM;;;;;N;;;;; +1CD7;VEDIC TONE YAJURVEDIC KATHAKA INDEPENDENT SVARITA;Mn;220;NSM;;;;;N;;;;; +1CD8;VEDIC TONE CANDRA BELOW;Mn;220;NSM;;;;;N;;;;; +1CD9;VEDIC TONE YAJURVEDIC KATHAKA INDEPENDENT SVARITA SCHROEDER;Mn;220;NSM;;;;;N;;;;; +1CDA;VEDIC TONE DOUBLE SVARITA;Mn;230;NSM;;;;;N;;;;; +1CDB;VEDIC TONE TRIPLE SVARITA;Mn;230;NSM;;;;;N;;;;; +1CDC;VEDIC TONE KATHAKA ANUDATTA;Mn;220;NSM;;;;;N;;;;; +1CDD;VEDIC TONE DOT BELOW;Mn;220;NSM;;;;;N;;;;; +1CDE;VEDIC TONE TWO DOTS BELOW;Mn;220;NSM;;;;;N;;;;; +1CDF;VEDIC TONE THREE DOTS BELOW;Mn;220;NSM;;;;;N;;;;; +1CE0;VEDIC TONE RIGVEDIC KASHMIRI INDEPENDENT SVARITA;Mn;230;NSM;;;;;N;;;;; +1CE1;VEDIC TONE ATHARVAVEDIC INDEPENDENT SVARITA;Mc;0;L;;;;;N;;;;; +1CE2;VEDIC SIGN VISARGA SVARITA;Mn;1;NSM;;;;;N;;;;; +1CE3;VEDIC SIGN VISARGA UDATTA;Mn;1;NSM;;;;;N;;;;; +1CE4;VEDIC SIGN REVERSED VISARGA UDATTA;Mn;1;NSM;;;;;N;;;;; +1CE5;VEDIC SIGN VISARGA ANUDATTA;Mn;1;NSM;;;;;N;;;;; +1CE6;VEDIC SIGN REVERSED VISARGA ANUDATTA;Mn;1;NSM;;;;;N;;;;; +1CE7;VEDIC SIGN VISARGA UDATTA WITH TAIL;Mn;1;NSM;;;;;N;;;;; +1CE8;VEDIC SIGN VISARGA ANUDATTA WITH TAIL;Mn;1;NSM;;;;;N;;;;; +1CE9;VEDIC SIGN ANUSVARA ANTARGOMUKHA;Lo;0;L;;;;;N;;;;; +1CEA;VEDIC SIGN ANUSVARA BAHIRGOMUKHA;Lo;0;L;;;;;N;;;;; +1CEB;VEDIC SIGN ANUSVARA VAMAGOMUKHA;Lo;0;L;;;;;N;;;;; +1CEC;VEDIC SIGN ANUSVARA VAMAGOMUKHA WITH TAIL;Lo;0;L;;;;;N;;;;; +1CED;VEDIC SIGN TIRYAK;Mn;220;NSM;;;;;N;;;;; +1CEE;VEDIC SIGN HEXIFORM LONG ANUSVARA;Lo;0;L;;;;;N;;;;; +1CEF;VEDIC SIGN LONG ANUSVARA;Lo;0;L;;;;;N;;;;; +1CF0;VEDIC SIGN RTHANG LONG ANUSVARA;Lo;0;L;;;;;N;;;;; +1CF1;VEDIC SIGN ANUSVARA UBHAYATO MUKHA;Lo;0;L;;;;;N;;;;; +1CF2;VEDIC SIGN ARDHAVISARGA;Lo;0;L;;;;;N;;;;; +1CF3;VEDIC SIGN ROTATED ARDHAVISARGA;Lo;0;L;;;;;N;;;;; +1CF4;VEDIC TONE CANDRA ABOVE;Mn;230;NSM;;;;;N;;;;; +1CF5;VEDIC SIGN JIHVAMULIYA;Lo;0;L;;;;;N;;;;; +1CF6;VEDIC SIGN UPADHMANIYA;Lo;0;L;;;;;N;;;;; +1CF7;VEDIC SIGN ATIKRAMA;Mc;0;L;;;;;N;;;;; +1CF8;VEDIC TONE RING ABOVE;Mn;230;NSM;;;;;N;;;;; +1CF9;VEDIC TONE DOUBLE RING ABOVE;Mn;230;NSM;;;;;N;;;;; +1CFA;VEDIC SIGN DOUBLE ANUSVARA ANTARGOMUKHA;Lo;0;L;;;;;N;;;;; +1D00;LATIN LETTER SMALL CAPITAL A;Ll;0;L;;;;;N;;;;; +1D01;LATIN LETTER SMALL CAPITAL AE;Ll;0;L;;;;;N;;;;; +1D02;LATIN SMALL LETTER TURNED AE;Ll;0;L;;;;;N;;;;; +1D03;LATIN LETTER SMALL CAPITAL BARRED B;Ll;0;L;;;;;N;;;;; +1D04;LATIN LETTER SMALL CAPITAL C;Ll;0;L;;;;;N;;;;; +1D05;LATIN LETTER SMALL CAPITAL D;Ll;0;L;;;;;N;;;;; +1D06;LATIN LETTER SMALL CAPITAL ETH;Ll;0;L;;;;;N;;;;; +1D07;LATIN LETTER SMALL CAPITAL E;Ll;0;L;;;;;N;;;;; +1D08;LATIN SMALL LETTER TURNED OPEN E;Ll;0;L;;;;;N;;;;; +1D09;LATIN SMALL LETTER TURNED I;Ll;0;L;;;;;N;;;;; +1D0A;LATIN LETTER SMALL CAPITAL J;Ll;0;L;;;;;N;;;;; +1D0B;LATIN LETTER SMALL CAPITAL K;Ll;0;L;;;;;N;;;;; +1D0C;LATIN LETTER SMALL CAPITAL L WITH STROKE;Ll;0;L;;;;;N;;;;; +1D0D;LATIN LETTER SMALL CAPITAL M;Ll;0;L;;;;;N;;;;; +1D0E;LATIN LETTER SMALL CAPITAL REVERSED N;Ll;0;L;;;;;N;;;;; +1D0F;LATIN LETTER SMALL CAPITAL O;Ll;0;L;;;;;N;;;;; +1D10;LATIN LETTER SMALL CAPITAL OPEN O;Ll;0;L;;;;;N;;;;; +1D11;LATIN SMALL LETTER SIDEWAYS O;Ll;0;L;;;;;N;;;;; +1D12;LATIN SMALL LETTER SIDEWAYS OPEN O;Ll;0;L;;;;;N;;;;; +1D13;LATIN SMALL LETTER SIDEWAYS O WITH STROKE;Ll;0;L;;;;;N;;;;; +1D14;LATIN SMALL LETTER TURNED OE;Ll;0;L;;;;;N;;;;; +1D15;LATIN LETTER SMALL CAPITAL OU;Ll;0;L;;;;;N;;;;; +1D16;LATIN SMALL LETTER TOP HALF O;Ll;0;L;;;;;N;;;;; +1D17;LATIN SMALL LETTER BOTTOM HALF O;Ll;0;L;;;;;N;;;;; +1D18;LATIN LETTER SMALL CAPITAL P;Ll;0;L;;;;;N;;;;; +1D19;LATIN LETTER SMALL CAPITAL REVERSED R;Ll;0;L;;;;;N;;;;; +1D1A;LATIN LETTER SMALL CAPITAL TURNED R;Ll;0;L;;;;;N;;;;; +1D1B;LATIN LETTER SMALL CAPITAL T;Ll;0;L;;;;;N;;;;; +1D1C;LATIN LETTER SMALL CAPITAL U;Ll;0;L;;;;;N;;;;; +1D1D;LATIN SMALL LETTER SIDEWAYS U;Ll;0;L;;;;;N;;;;; +1D1E;LATIN SMALL LETTER SIDEWAYS DIAERESIZED U;Ll;0;L;;;;;N;;;;; +1D1F;LATIN SMALL LETTER SIDEWAYS TURNED M;Ll;0;L;;;;;N;;;;; +1D20;LATIN LETTER SMALL CAPITAL V;Ll;0;L;;;;;N;;;;; +1D21;LATIN LETTER SMALL CAPITAL W;Ll;0;L;;;;;N;;;;; +1D22;LATIN LETTER SMALL CAPITAL Z;Ll;0;L;;;;;N;;;;; +1D23;LATIN LETTER SMALL CAPITAL EZH;Ll;0;L;;;;;N;;;;; +1D24;LATIN LETTER VOICED LARYNGEAL SPIRANT;Ll;0;L;;;;;N;;;;; +1D25;LATIN LETTER AIN;Ll;0;L;;;;;N;;;;; +1D26;GREEK LETTER SMALL CAPITAL GAMMA;Ll;0;L;;;;;N;;;;; +1D27;GREEK LETTER SMALL CAPITAL LAMDA;Ll;0;L;;;;;N;;;;; +1D28;GREEK LETTER SMALL CAPITAL PI;Ll;0;L;;;;;N;;;;; +1D29;GREEK LETTER SMALL CAPITAL RHO;Ll;0;L;;;;;N;;;;; +1D2A;GREEK LETTER SMALL CAPITAL PSI;Ll;0;L;;;;;N;;;;; +1D2B;CYRILLIC LETTER SMALL CAPITAL EL;Ll;0;L;;;;;N;;;;; +1D2C;MODIFIER LETTER CAPITAL A;Lm;0;L; 0041;;;;N;;;;; +1D2D;MODIFIER LETTER CAPITAL AE;Lm;0;L; 00C6;;;;N;;;;; +1D2E;MODIFIER LETTER CAPITAL B;Lm;0;L; 0042;;;;N;;;;; +1D2F;MODIFIER LETTER CAPITAL BARRED B;Lm;0;L;;;;;N;;;;; +1D30;MODIFIER LETTER CAPITAL D;Lm;0;L; 0044;;;;N;;;;; +1D31;MODIFIER LETTER CAPITAL E;Lm;0;L; 0045;;;;N;;;;; +1D32;MODIFIER LETTER CAPITAL REVERSED E;Lm;0;L; 018E;;;;N;;;;; +1D33;MODIFIER LETTER CAPITAL G;Lm;0;L; 0047;;;;N;;;;; +1D34;MODIFIER LETTER CAPITAL H;Lm;0;L; 0048;;;;N;;;;; +1D35;MODIFIER LETTER CAPITAL I;Lm;0;L; 0049;;;;N;;;;; +1D36;MODIFIER LETTER CAPITAL J;Lm;0;L; 004A;;;;N;;;;; +1D37;MODIFIER LETTER CAPITAL K;Lm;0;L; 004B;;;;N;;;;; +1D38;MODIFIER LETTER CAPITAL L;Lm;0;L; 004C;;;;N;;;;; +1D39;MODIFIER LETTER CAPITAL M;Lm;0;L; 004D;;;;N;;;;; +1D3A;MODIFIER LETTER CAPITAL N;Lm;0;L; 004E;;;;N;;;;; +1D3B;MODIFIER LETTER CAPITAL REVERSED N;Lm;0;L;;;;;N;;;;; +1D3C;MODIFIER LETTER CAPITAL O;Lm;0;L; 004F;;;;N;;;;; +1D3D;MODIFIER LETTER CAPITAL OU;Lm;0;L; 0222;;;;N;;;;; +1D3E;MODIFIER LETTER CAPITAL P;Lm;0;L; 0050;;;;N;;;;; +1D3F;MODIFIER LETTER CAPITAL R;Lm;0;L; 0052;;;;N;;;;; +1D40;MODIFIER LETTER CAPITAL T;Lm;0;L; 0054;;;;N;;;;; +1D41;MODIFIER LETTER CAPITAL U;Lm;0;L; 0055;;;;N;;;;; +1D42;MODIFIER LETTER CAPITAL W;Lm;0;L; 0057;;;;N;;;;; +1D43;MODIFIER LETTER SMALL A;Lm;0;L; 0061;;;;N;;;;; +1D44;MODIFIER LETTER SMALL TURNED A;Lm;0;L; 0250;;;;N;;;;; +1D45;MODIFIER LETTER SMALL ALPHA;Lm;0;L; 0251;;;;N;;;;; +1D46;MODIFIER LETTER SMALL TURNED AE;Lm;0;L; 1D02;;;;N;;;;; +1D47;MODIFIER LETTER SMALL B;Lm;0;L; 0062;;;;N;;;;; +1D48;MODIFIER LETTER SMALL D;Lm;0;L; 0064;;;;N;;;;; +1D49;MODIFIER LETTER SMALL E;Lm;0;L; 0065;;;;N;;;;; +1D4A;MODIFIER LETTER SMALL SCHWA;Lm;0;L; 0259;;;;N;;;;; +1D4B;MODIFIER LETTER SMALL OPEN E;Lm;0;L; 025B;;;;N;;;;; +1D4C;MODIFIER LETTER SMALL TURNED OPEN E;Lm;0;L; 025C;;;;N;;;;; +1D4D;MODIFIER LETTER SMALL G;Lm;0;L; 0067;;;;N;;;;; +1D4E;MODIFIER LETTER SMALL TURNED I;Lm;0;L;;;;;N;;;;; +1D4F;MODIFIER LETTER SMALL K;Lm;0;L; 006B;;;;N;;;;; +1D50;MODIFIER LETTER SMALL M;Lm;0;L; 006D;;;;N;;;;; +1D51;MODIFIER LETTER SMALL ENG;Lm;0;L; 014B;;;;N;;;;; +1D52;MODIFIER LETTER SMALL O;Lm;0;L; 006F;;;;N;;;;; +1D53;MODIFIER LETTER SMALL OPEN O;Lm;0;L; 0254;;;;N;;;;; +1D54;MODIFIER LETTER SMALL TOP HALF O;Lm;0;L; 1D16;;;;N;;;;; +1D55;MODIFIER LETTER SMALL BOTTOM HALF O;Lm;0;L; 1D17;;;;N;;;;; +1D56;MODIFIER LETTER SMALL P;Lm;0;L; 0070;;;;N;;;;; +1D57;MODIFIER LETTER SMALL T;Lm;0;L; 0074;;;;N;;;;; +1D58;MODIFIER LETTER SMALL U;Lm;0;L; 0075;;;;N;;;;; +1D59;MODIFIER LETTER SMALL SIDEWAYS U;Lm;0;L; 1D1D;;;;N;;;;; +1D5A;MODIFIER LETTER SMALL TURNED M;Lm;0;L; 026F;;;;N;;;;; +1D5B;MODIFIER LETTER SMALL V;Lm;0;L; 0076;;;;N;;;;; +1D5C;MODIFIER LETTER SMALL AIN;Lm;0;L; 1D25;;;;N;;;;; +1D5D;MODIFIER LETTER SMALL BETA;Lm;0;L; 03B2;;;;N;;;;; +1D5E;MODIFIER LETTER SMALL GREEK GAMMA;Lm;0;L; 03B3;;;;N;;;;; +1D5F;MODIFIER LETTER SMALL DELTA;Lm;0;L; 03B4;;;;N;;;;; +1D60;MODIFIER LETTER SMALL GREEK PHI;Lm;0;L; 03C6;;;;N;;;;; +1D61;MODIFIER LETTER SMALL CHI;Lm;0;L; 03C7;;;;N;;;;; +1D62;LATIN SUBSCRIPT SMALL LETTER I;Lm;0;L; 0069;;;;N;;;;; +1D63;LATIN SUBSCRIPT SMALL LETTER R;Lm;0;L; 0072;;;;N;;;;; +1D64;LATIN SUBSCRIPT SMALL LETTER U;Lm;0;L; 0075;;;;N;;;;; +1D65;LATIN SUBSCRIPT SMALL LETTER V;Lm;0;L; 0076;;;;N;;;;; +1D66;GREEK SUBSCRIPT SMALL LETTER BETA;Lm;0;L; 03B2;;;;N;;;;; +1D67;GREEK SUBSCRIPT SMALL LETTER GAMMA;Lm;0;L; 03B3;;;;N;;;;; +1D68;GREEK SUBSCRIPT SMALL LETTER RHO;Lm;0;L; 03C1;;;;N;;;;; +1D69;GREEK SUBSCRIPT SMALL LETTER PHI;Lm;0;L; 03C6;;;;N;;;;; +1D6A;GREEK SUBSCRIPT SMALL LETTER CHI;Lm;0;L; 03C7;;;;N;;;;; +1D6B;LATIN SMALL LETTER UE;Ll;0;L;;;;;N;;;;; +1D6C;LATIN SMALL LETTER B WITH MIDDLE TILDE;Ll;0;L;;;;;N;;;;; +1D6D;LATIN SMALL LETTER D WITH MIDDLE TILDE;Ll;0;L;;;;;N;;;;; +1D6E;LATIN SMALL LETTER F WITH MIDDLE TILDE;Ll;0;L;;;;;N;;;;; +1D6F;LATIN SMALL LETTER M WITH MIDDLE TILDE;Ll;0;L;;;;;N;;;;; +1D70;LATIN SMALL LETTER N WITH MIDDLE TILDE;Ll;0;L;;;;;N;;;;; +1D71;LATIN SMALL LETTER P WITH MIDDLE TILDE;Ll;0;L;;;;;N;;;;; +1D72;LATIN SMALL LETTER R WITH MIDDLE TILDE;Ll;0;L;;;;;N;;;;; +1D73;LATIN SMALL LETTER R WITH FISHHOOK AND MIDDLE TILDE;Ll;0;L;;;;;N;;;;; +1D74;LATIN SMALL LETTER S WITH MIDDLE TILDE;Ll;0;L;;;;;N;;;;; +1D75;LATIN SMALL LETTER T WITH MIDDLE TILDE;Ll;0;L;;;;;N;;;;; +1D76;LATIN SMALL LETTER Z WITH MIDDLE TILDE;Ll;0;L;;;;;N;;;;; +1D77;LATIN SMALL LETTER TURNED G;Ll;0;L;;;;;N;;;;; +1D78;MODIFIER LETTER CYRILLIC EN;Lm;0;L; 043D;;;;N;;;;; +1D79;LATIN SMALL LETTER INSULAR G;Ll;0;L;;;;;N;;;A77D;;A77D +1D7A;LATIN SMALL LETTER TH WITH STRIKETHROUGH;Ll;0;L;;;;;N;;;;; +1D7B;LATIN SMALL CAPITAL LETTER I WITH STROKE;Ll;0;L;;;;;N;;;;; +1D7C;LATIN SMALL LETTER IOTA WITH STROKE;Ll;0;L;;;;;N;;;;; +1D7D;LATIN SMALL LETTER P WITH STROKE;Ll;0;L;;;;;N;;;2C63;;2C63 +1D7E;LATIN SMALL CAPITAL LETTER U WITH STROKE;Ll;0;L;;;;;N;;;;; +1D7F;LATIN SMALL LETTER UPSILON WITH STROKE;Ll;0;L;;;;;N;;;;; +1D80;LATIN SMALL LETTER B WITH PALATAL HOOK;Ll;0;L;;;;;N;;;;; +1D81;LATIN SMALL LETTER D WITH PALATAL HOOK;Ll;0;L;;;;;N;;;;; +1D82;LATIN SMALL LETTER F WITH PALATAL HOOK;Ll;0;L;;;;;N;;;;; +1D83;LATIN SMALL LETTER G WITH PALATAL HOOK;Ll;0;L;;;;;N;;;;; +1D84;LATIN SMALL LETTER K WITH PALATAL HOOK;Ll;0;L;;;;;N;;;;; +1D85;LATIN SMALL LETTER L WITH PALATAL HOOK;Ll;0;L;;;;;N;;;;; +1D86;LATIN SMALL LETTER M WITH PALATAL HOOK;Ll;0;L;;;;;N;;;;; +1D87;LATIN SMALL LETTER N WITH PALATAL HOOK;Ll;0;L;;;;;N;;;;; +1D88;LATIN SMALL LETTER P WITH PALATAL HOOK;Ll;0;L;;;;;N;;;;; +1D89;LATIN SMALL LETTER R WITH PALATAL HOOK;Ll;0;L;;;;;N;;;;; +1D8A;LATIN SMALL LETTER S WITH PALATAL HOOK;Ll;0;L;;;;;N;;;;; +1D8B;LATIN SMALL LETTER ESH WITH PALATAL HOOK;Ll;0;L;;;;;N;;;;; +1D8C;LATIN SMALL LETTER V WITH PALATAL HOOK;Ll;0;L;;;;;N;;;;; +1D8D;LATIN SMALL LETTER X WITH PALATAL HOOK;Ll;0;L;;;;;N;;;;; +1D8E;LATIN SMALL LETTER Z WITH PALATAL HOOK;Ll;0;L;;;;;N;;;A7C6;;A7C6 +1D8F;LATIN SMALL LETTER A WITH RETROFLEX HOOK;Ll;0;L;;;;;N;;;;; +1D90;LATIN SMALL LETTER ALPHA WITH RETROFLEX HOOK;Ll;0;L;;;;;N;;;;; +1D91;LATIN SMALL LETTER D WITH HOOK AND TAIL;Ll;0;L;;;;;N;;;;; +1D92;LATIN SMALL LETTER E WITH RETROFLEX HOOK;Ll;0;L;;;;;N;;;;; +1D93;LATIN SMALL LETTER OPEN E WITH RETROFLEX HOOK;Ll;0;L;;;;;N;;;;; +1D94;LATIN SMALL LETTER REVERSED OPEN E WITH RETROFLEX HOOK;Ll;0;L;;;;;N;;;;; +1D95;LATIN SMALL LETTER SCHWA WITH RETROFLEX HOOK;Ll;0;L;;;;;N;;;;; +1D96;LATIN SMALL LETTER I WITH RETROFLEX HOOK;Ll;0;L;;;;;N;;;;; +1D97;LATIN SMALL LETTER OPEN O WITH RETROFLEX HOOK;Ll;0;L;;;;;N;;;;; +1D98;LATIN SMALL LETTER ESH WITH RETROFLEX HOOK;Ll;0;L;;;;;N;;;;; +1D99;LATIN SMALL LETTER U WITH RETROFLEX HOOK;Ll;0;L;;;;;N;;;;; +1D9A;LATIN SMALL LETTER EZH WITH RETROFLEX HOOK;Ll;0;L;;;;;N;;;;; +1D9B;MODIFIER LETTER SMALL TURNED ALPHA;Lm;0;L; 0252;;;;N;;;;; +1D9C;MODIFIER LETTER SMALL C;Lm;0;L; 0063;;;;N;;;;; +1D9D;MODIFIER LETTER SMALL C WITH CURL;Lm;0;L; 0255;;;;N;;;;; +1D9E;MODIFIER LETTER SMALL ETH;Lm;0;L; 00F0;;;;N;;;;; +1D9F;MODIFIER LETTER SMALL REVERSED OPEN E;Lm;0;L; 025C;;;;N;;;;; +1DA0;MODIFIER LETTER SMALL F;Lm;0;L; 0066;;;;N;;;;; +1DA1;MODIFIER LETTER SMALL DOTLESS J WITH STROKE;Lm;0;L; 025F;;;;N;;;;; +1DA2;MODIFIER LETTER SMALL SCRIPT G;Lm;0;L; 0261;;;;N;;;;; +1DA3;MODIFIER LETTER SMALL TURNED H;Lm;0;L; 0265;;;;N;;;;; +1DA4;MODIFIER LETTER SMALL I WITH STROKE;Lm;0;L; 0268;;;;N;;;;; +1DA5;MODIFIER LETTER SMALL IOTA;Lm;0;L; 0269;;;;N;;;;; +1DA6;MODIFIER LETTER SMALL CAPITAL I;Lm;0;L; 026A;;;;N;;;;; +1DA7;MODIFIER LETTER SMALL CAPITAL I WITH STROKE;Lm;0;L; 1D7B;;;;N;;;;; +1DA8;MODIFIER LETTER SMALL J WITH CROSSED-TAIL;Lm;0;L; 029D;;;;N;;;;; +1DA9;MODIFIER LETTER SMALL L WITH RETROFLEX HOOK;Lm;0;L; 026D;;;;N;;;;; +1DAA;MODIFIER LETTER SMALL L WITH PALATAL HOOK;Lm;0;L; 1D85;;;;N;;;;; +1DAB;MODIFIER LETTER SMALL CAPITAL L;Lm;0;L; 029F;;;;N;;;;; +1DAC;MODIFIER LETTER SMALL M WITH HOOK;Lm;0;L; 0271;;;;N;;;;; +1DAD;MODIFIER LETTER SMALL TURNED M WITH LONG LEG;Lm;0;L; 0270;;;;N;;;;; +1DAE;MODIFIER LETTER SMALL N WITH LEFT HOOK;Lm;0;L; 0272;;;;N;;;;; +1DAF;MODIFIER LETTER SMALL N WITH RETROFLEX HOOK;Lm;0;L; 0273;;;;N;;;;; +1DB0;MODIFIER LETTER SMALL CAPITAL N;Lm;0;L; 0274;;;;N;;;;; +1DB1;MODIFIER LETTER SMALL BARRED O;Lm;0;L; 0275;;;;N;;;;; +1DB2;MODIFIER LETTER SMALL PHI;Lm;0;L; 0278;;;;N;;;;; +1DB3;MODIFIER LETTER SMALL S WITH HOOK;Lm;0;L; 0282;;;;N;;;;; +1DB4;MODIFIER LETTER SMALL ESH;Lm;0;L; 0283;;;;N;;;;; +1DB5;MODIFIER LETTER SMALL T WITH PALATAL HOOK;Lm;0;L; 01AB;;;;N;;;;; +1DB6;MODIFIER LETTER SMALL U BAR;Lm;0;L; 0289;;;;N;;;;; +1DB7;MODIFIER LETTER SMALL UPSILON;Lm;0;L; 028A;;;;N;;;;; +1DB8;MODIFIER LETTER SMALL CAPITAL U;Lm;0;L; 1D1C;;;;N;;;;; +1DB9;MODIFIER LETTER SMALL V WITH HOOK;Lm;0;L; 028B;;;;N;;;;; +1DBA;MODIFIER LETTER SMALL TURNED V;Lm;0;L; 028C;;;;N;;;;; +1DBB;MODIFIER LETTER SMALL Z;Lm;0;L; 007A;;;;N;;;;; +1DBC;MODIFIER LETTER SMALL Z WITH RETROFLEX HOOK;Lm;0;L; 0290;;;;N;;;;; +1DBD;MODIFIER LETTER SMALL Z WITH CURL;Lm;0;L; 0291;;;;N;;;;; +1DBE;MODIFIER LETTER SMALL EZH;Lm;0;L; 0292;;;;N;;;;; +1DBF;MODIFIER LETTER SMALL THETA;Lm;0;L; 03B8;;;;N;;;;; +1DC0;COMBINING DOTTED GRAVE ACCENT;Mn;230;NSM;;;;;N;;;;; +1DC1;COMBINING DOTTED ACUTE ACCENT;Mn;230;NSM;;;;;N;;;;; +1DC2;COMBINING SNAKE BELOW;Mn;220;NSM;;;;;N;;;;; +1DC3;COMBINING SUSPENSION MARK;Mn;230;NSM;;;;;N;;;;; +1DC4;COMBINING MACRON-ACUTE;Mn;230;NSM;;;;;N;;;;; +1DC5;COMBINING GRAVE-MACRON;Mn;230;NSM;;;;;N;;;;; +1DC6;COMBINING MACRON-GRAVE;Mn;230;NSM;;;;;N;;;;; +1DC7;COMBINING ACUTE-MACRON;Mn;230;NSM;;;;;N;;;;; +1DC8;COMBINING GRAVE-ACUTE-GRAVE;Mn;230;NSM;;;;;N;;;;; +1DC9;COMBINING ACUTE-GRAVE-ACUTE;Mn;230;NSM;;;;;N;;;;; +1DCA;COMBINING LATIN SMALL LETTER R BELOW;Mn;220;NSM;;;;;N;;;;; +1DCB;COMBINING BREVE-MACRON;Mn;230;NSM;;;;;N;;;;; +1DCC;COMBINING MACRON-BREVE;Mn;230;NSM;;;;;N;;;;; +1DCD;COMBINING DOUBLE CIRCUMFLEX ABOVE;Mn;234;NSM;;;;;N;;;;; +1DCE;COMBINING OGONEK ABOVE;Mn;214;NSM;;;;;N;;;;; +1DCF;COMBINING ZIGZAG BELOW;Mn;220;NSM;;;;;N;;;;; +1DD0;COMBINING IS BELOW;Mn;202;NSM;;;;;N;;;;; +1DD1;COMBINING UR ABOVE;Mn;230;NSM;;;;;N;;;;; +1DD2;COMBINING US ABOVE;Mn;230;NSM;;;;;N;;;;; +1DD3;COMBINING LATIN SMALL LETTER FLATTENED OPEN A ABOVE;Mn;230;NSM;;;;;N;;;;; +1DD4;COMBINING LATIN SMALL LETTER AE;Mn;230;NSM;;;;;N;;;;; +1DD5;COMBINING LATIN SMALL LETTER AO;Mn;230;NSM;;;;;N;;;;; +1DD6;COMBINING LATIN SMALL LETTER AV;Mn;230;NSM;;;;;N;;;;; +1DD7;COMBINING LATIN SMALL LETTER C CEDILLA;Mn;230;NSM;;;;;N;;;;; +1DD8;COMBINING LATIN SMALL LETTER INSULAR D;Mn;230;NSM;;;;;N;;;;; +1DD9;COMBINING LATIN SMALL LETTER ETH;Mn;230;NSM;;;;;N;;;;; +1DDA;COMBINING LATIN SMALL LETTER G;Mn;230;NSM;;;;;N;;;;; +1DDB;COMBINING LATIN LETTER SMALL CAPITAL G;Mn;230;NSM;;;;;N;;;;; +1DDC;COMBINING LATIN SMALL LETTER K;Mn;230;NSM;;;;;N;;;;; +1DDD;COMBINING LATIN SMALL LETTER L;Mn;230;NSM;;;;;N;;;;; +1DDE;COMBINING LATIN LETTER SMALL CAPITAL L;Mn;230;NSM;;;;;N;;;;; +1DDF;COMBINING LATIN LETTER SMALL CAPITAL M;Mn;230;NSM;;;;;N;;;;; +1DE0;COMBINING LATIN SMALL LETTER N;Mn;230;NSM;;;;;N;;;;; +1DE1;COMBINING LATIN LETTER SMALL CAPITAL N;Mn;230;NSM;;;;;N;;;;; +1DE2;COMBINING LATIN LETTER SMALL CAPITAL R;Mn;230;NSM;;;;;N;;;;; +1DE3;COMBINING LATIN SMALL LETTER R ROTUNDA;Mn;230;NSM;;;;;N;;;;; +1DE4;COMBINING LATIN SMALL LETTER S;Mn;230;NSM;;;;;N;;;;; +1DE5;COMBINING LATIN SMALL LETTER LONG S;Mn;230;NSM;;;;;N;;;;; +1DE6;COMBINING LATIN SMALL LETTER Z;Mn;230;NSM;;;;;N;;;;; +1DE7;COMBINING LATIN SMALL LETTER ALPHA;Mn;230;NSM;;;;;N;;;;; +1DE8;COMBINING LATIN SMALL LETTER B;Mn;230;NSM;;;;;N;;;;; +1DE9;COMBINING LATIN SMALL LETTER BETA;Mn;230;NSM;;;;;N;;;;; +1DEA;COMBINING LATIN SMALL LETTER SCHWA;Mn;230;NSM;;;;;N;;;;; +1DEB;COMBINING LATIN SMALL LETTER F;Mn;230;NSM;;;;;N;;;;; +1DEC;COMBINING LATIN SMALL LETTER L WITH DOUBLE MIDDLE TILDE;Mn;230;NSM;;;;;N;;;;; +1DED;COMBINING LATIN SMALL LETTER O WITH LIGHT CENTRALIZATION STROKE;Mn;230;NSM;;;;;N;;;;; +1DEE;COMBINING LATIN SMALL LETTER P;Mn;230;NSM;;;;;N;;;;; +1DEF;COMBINING LATIN SMALL LETTER ESH;Mn;230;NSM;;;;;N;;;;; +1DF0;COMBINING LATIN SMALL LETTER U WITH LIGHT CENTRALIZATION STROKE;Mn;230;NSM;;;;;N;;;;; +1DF1;COMBINING LATIN SMALL LETTER W;Mn;230;NSM;;;;;N;;;;; +1DF2;COMBINING LATIN SMALL LETTER A WITH DIAERESIS;Mn;230;NSM;;;;;N;;;;; +1DF3;COMBINING LATIN SMALL LETTER O WITH DIAERESIS;Mn;230;NSM;;;;;N;;;;; +1DF4;COMBINING LATIN SMALL LETTER U WITH DIAERESIS;Mn;230;NSM;;;;;N;;;;; +1DF5;COMBINING UP TACK ABOVE;Mn;230;NSM;;;;;N;;;;; +1DF6;COMBINING KAVYKA ABOVE RIGHT;Mn;232;NSM;;;;;N;;;;; +1DF7;COMBINING KAVYKA ABOVE LEFT;Mn;228;NSM;;;;;N;;;;; +1DF8;COMBINING DOT ABOVE LEFT;Mn;228;NSM;;;;;N;;;;; +1DF9;COMBINING WIDE INVERTED BRIDGE BELOW;Mn;220;NSM;;;;;N;;;;; +1DFB;COMBINING DELETION MARK;Mn;230;NSM;;;;;N;;;;; +1DFC;COMBINING DOUBLE INVERTED BREVE BELOW;Mn;233;NSM;;;;;N;;;;; +1DFD;COMBINING ALMOST EQUAL TO BELOW;Mn;220;NSM;;;;;N;;;;; +1DFE;COMBINING LEFT ARROWHEAD ABOVE;Mn;230;NSM;;;;;N;;;;; +1DFF;COMBINING RIGHT ARROWHEAD AND DOWN ARROWHEAD BELOW;Mn;220;NSM;;;;;N;;;;; +1E00;LATIN CAPITAL LETTER A WITH RING BELOW;Lu;0;L;0041 0325;;;;N;;;;1E01; +1E01;LATIN SMALL LETTER A WITH RING BELOW;Ll;0;L;0061 0325;;;;N;;;1E00;;1E00 +1E02;LATIN CAPITAL LETTER B WITH DOT ABOVE;Lu;0;L;0042 0307;;;;N;;;;1E03; +1E03;LATIN SMALL LETTER B WITH DOT ABOVE;Ll;0;L;0062 0307;;;;N;;;1E02;;1E02 +1E04;LATIN CAPITAL LETTER B WITH DOT BELOW;Lu;0;L;0042 0323;;;;N;;;;1E05; +1E05;LATIN SMALL LETTER B WITH DOT BELOW;Ll;0;L;0062 0323;;;;N;;;1E04;;1E04 +1E06;LATIN CAPITAL LETTER B WITH LINE BELOW;Lu;0;L;0042 0331;;;;N;;;;1E07; +1E07;LATIN SMALL LETTER B WITH LINE BELOW;Ll;0;L;0062 0331;;;;N;;;1E06;;1E06 +1E08;LATIN CAPITAL LETTER C WITH CEDILLA AND ACUTE;Lu;0;L;00C7 0301;;;;N;;;;1E09; +1E09;LATIN SMALL LETTER C WITH CEDILLA AND ACUTE;Ll;0;L;00E7 0301;;;;N;;;1E08;;1E08 +1E0A;LATIN CAPITAL LETTER D WITH DOT ABOVE;Lu;0;L;0044 0307;;;;N;;;;1E0B; +1E0B;LATIN SMALL LETTER D WITH DOT ABOVE;Ll;0;L;0064 0307;;;;N;;;1E0A;;1E0A +1E0C;LATIN CAPITAL LETTER D WITH DOT BELOW;Lu;0;L;0044 0323;;;;N;;;;1E0D; +1E0D;LATIN SMALL LETTER D WITH DOT BELOW;Ll;0;L;0064 0323;;;;N;;;1E0C;;1E0C +1E0E;LATIN CAPITAL LETTER D WITH LINE BELOW;Lu;0;L;0044 0331;;;;N;;;;1E0F; +1E0F;LATIN SMALL LETTER D WITH LINE BELOW;Ll;0;L;0064 0331;;;;N;;;1E0E;;1E0E +1E10;LATIN CAPITAL LETTER D WITH CEDILLA;Lu;0;L;0044 0327;;;;N;;;;1E11; +1E11;LATIN SMALL LETTER D WITH CEDILLA;Ll;0;L;0064 0327;;;;N;;;1E10;;1E10 +1E12;LATIN CAPITAL LETTER D WITH CIRCUMFLEX BELOW;Lu;0;L;0044 032D;;;;N;;;;1E13; +1E13;LATIN SMALL LETTER D WITH CIRCUMFLEX BELOW;Ll;0;L;0064 032D;;;;N;;;1E12;;1E12 +1E14;LATIN CAPITAL LETTER E WITH MACRON AND GRAVE;Lu;0;L;0112 0300;;;;N;;;;1E15; +1E15;LATIN SMALL LETTER E WITH MACRON AND GRAVE;Ll;0;L;0113 0300;;;;N;;;1E14;;1E14 +1E16;LATIN CAPITAL LETTER E WITH MACRON AND ACUTE;Lu;0;L;0112 0301;;;;N;;;;1E17; +1E17;LATIN SMALL LETTER E WITH MACRON AND ACUTE;Ll;0;L;0113 0301;;;;N;;;1E16;;1E16 +1E18;LATIN CAPITAL LETTER E WITH CIRCUMFLEX BELOW;Lu;0;L;0045 032D;;;;N;;;;1E19; +1E19;LATIN SMALL LETTER E WITH CIRCUMFLEX BELOW;Ll;0;L;0065 032D;;;;N;;;1E18;;1E18 +1E1A;LATIN CAPITAL LETTER E WITH TILDE BELOW;Lu;0;L;0045 0330;;;;N;;;;1E1B; +1E1B;LATIN SMALL LETTER E WITH TILDE BELOW;Ll;0;L;0065 0330;;;;N;;;1E1A;;1E1A +1E1C;LATIN CAPITAL LETTER E WITH CEDILLA AND BREVE;Lu;0;L;0228 0306;;;;N;;;;1E1D; +1E1D;LATIN SMALL LETTER E WITH CEDILLA AND BREVE;Ll;0;L;0229 0306;;;;N;;;1E1C;;1E1C +1E1E;LATIN CAPITAL LETTER F WITH DOT ABOVE;Lu;0;L;0046 0307;;;;N;;;;1E1F; +1E1F;LATIN SMALL LETTER F WITH DOT ABOVE;Ll;0;L;0066 0307;;;;N;;;1E1E;;1E1E +1E20;LATIN CAPITAL LETTER G WITH MACRON;Lu;0;L;0047 0304;;;;N;;;;1E21; +1E21;LATIN SMALL LETTER G WITH MACRON;Ll;0;L;0067 0304;;;;N;;;1E20;;1E20 +1E22;LATIN CAPITAL LETTER H WITH DOT ABOVE;Lu;0;L;0048 0307;;;;N;;;;1E23; +1E23;LATIN SMALL LETTER H WITH DOT ABOVE;Ll;0;L;0068 0307;;;;N;;;1E22;;1E22 +1E24;LATIN CAPITAL LETTER H WITH DOT BELOW;Lu;0;L;0048 0323;;;;N;;;;1E25; +1E25;LATIN SMALL LETTER H WITH DOT BELOW;Ll;0;L;0068 0323;;;;N;;;1E24;;1E24 +1E26;LATIN CAPITAL LETTER H WITH DIAERESIS;Lu;0;L;0048 0308;;;;N;;;;1E27; +1E27;LATIN SMALL LETTER H WITH DIAERESIS;Ll;0;L;0068 0308;;;;N;;;1E26;;1E26 +1E28;LATIN CAPITAL LETTER H WITH CEDILLA;Lu;0;L;0048 0327;;;;N;;;;1E29; +1E29;LATIN SMALL LETTER H WITH CEDILLA;Ll;0;L;0068 0327;;;;N;;;1E28;;1E28 +1E2A;LATIN CAPITAL LETTER H WITH BREVE BELOW;Lu;0;L;0048 032E;;;;N;;;;1E2B; +1E2B;LATIN SMALL LETTER H WITH BREVE BELOW;Ll;0;L;0068 032E;;;;N;;;1E2A;;1E2A +1E2C;LATIN CAPITAL LETTER I WITH TILDE BELOW;Lu;0;L;0049 0330;;;;N;;;;1E2D; +1E2D;LATIN SMALL LETTER I WITH TILDE BELOW;Ll;0;L;0069 0330;;;;N;;;1E2C;;1E2C +1E2E;LATIN CAPITAL LETTER I WITH DIAERESIS AND ACUTE;Lu;0;L;00CF 0301;;;;N;;;;1E2F; +1E2F;LATIN SMALL LETTER I WITH DIAERESIS AND ACUTE;Ll;0;L;00EF 0301;;;;N;;;1E2E;;1E2E +1E30;LATIN CAPITAL LETTER K WITH ACUTE;Lu;0;L;004B 0301;;;;N;;;;1E31; +1E31;LATIN SMALL LETTER K WITH ACUTE;Ll;0;L;006B 0301;;;;N;;;1E30;;1E30 +1E32;LATIN CAPITAL LETTER K WITH DOT BELOW;Lu;0;L;004B 0323;;;;N;;;;1E33; +1E33;LATIN SMALL LETTER K WITH DOT BELOW;Ll;0;L;006B 0323;;;;N;;;1E32;;1E32 +1E34;LATIN CAPITAL LETTER K WITH LINE BELOW;Lu;0;L;004B 0331;;;;N;;;;1E35; +1E35;LATIN SMALL LETTER K WITH LINE BELOW;Ll;0;L;006B 0331;;;;N;;;1E34;;1E34 +1E36;LATIN CAPITAL LETTER L WITH DOT BELOW;Lu;0;L;004C 0323;;;;N;;;;1E37; +1E37;LATIN SMALL LETTER L WITH DOT BELOW;Ll;0;L;006C 0323;;;;N;;;1E36;;1E36 +1E38;LATIN CAPITAL LETTER L WITH DOT BELOW AND MACRON;Lu;0;L;1E36 0304;;;;N;;;;1E39; +1E39;LATIN SMALL LETTER L WITH DOT BELOW AND MACRON;Ll;0;L;1E37 0304;;;;N;;;1E38;;1E38 +1E3A;LATIN CAPITAL LETTER L WITH LINE BELOW;Lu;0;L;004C 0331;;;;N;;;;1E3B; +1E3B;LATIN SMALL LETTER L WITH LINE BELOW;Ll;0;L;006C 0331;;;;N;;;1E3A;;1E3A +1E3C;LATIN CAPITAL LETTER L WITH CIRCUMFLEX BELOW;Lu;0;L;004C 032D;;;;N;;;;1E3D; +1E3D;LATIN SMALL LETTER L WITH CIRCUMFLEX BELOW;Ll;0;L;006C 032D;;;;N;;;1E3C;;1E3C +1E3E;LATIN CAPITAL LETTER M WITH ACUTE;Lu;0;L;004D 0301;;;;N;;;;1E3F; +1E3F;LATIN SMALL LETTER M WITH ACUTE;Ll;0;L;006D 0301;;;;N;;;1E3E;;1E3E +1E40;LATIN CAPITAL LETTER M WITH DOT ABOVE;Lu;0;L;004D 0307;;;;N;;;;1E41; +1E41;LATIN SMALL LETTER M WITH DOT ABOVE;Ll;0;L;006D 0307;;;;N;;;1E40;;1E40 +1E42;LATIN CAPITAL LETTER M WITH DOT BELOW;Lu;0;L;004D 0323;;;;N;;;;1E43; +1E43;LATIN SMALL LETTER M WITH DOT BELOW;Ll;0;L;006D 0323;;;;N;;;1E42;;1E42 +1E44;LATIN CAPITAL LETTER N WITH DOT ABOVE;Lu;0;L;004E 0307;;;;N;;;;1E45; +1E45;LATIN SMALL LETTER N WITH DOT ABOVE;Ll;0;L;006E 0307;;;;N;;;1E44;;1E44 +1E46;LATIN CAPITAL LETTER N WITH DOT BELOW;Lu;0;L;004E 0323;;;;N;;;;1E47; +1E47;LATIN SMALL LETTER N WITH DOT BELOW;Ll;0;L;006E 0323;;;;N;;;1E46;;1E46 +1E48;LATIN CAPITAL LETTER N WITH LINE BELOW;Lu;0;L;004E 0331;;;;N;;;;1E49; +1E49;LATIN SMALL LETTER N WITH LINE BELOW;Ll;0;L;006E 0331;;;;N;;;1E48;;1E48 +1E4A;LATIN CAPITAL LETTER N WITH CIRCUMFLEX BELOW;Lu;0;L;004E 032D;;;;N;;;;1E4B; +1E4B;LATIN SMALL LETTER N WITH CIRCUMFLEX BELOW;Ll;0;L;006E 032D;;;;N;;;1E4A;;1E4A +1E4C;LATIN CAPITAL LETTER O WITH TILDE AND ACUTE;Lu;0;L;00D5 0301;;;;N;;;;1E4D; +1E4D;LATIN SMALL LETTER O WITH TILDE AND ACUTE;Ll;0;L;00F5 0301;;;;N;;;1E4C;;1E4C +1E4E;LATIN CAPITAL LETTER O WITH TILDE AND DIAERESIS;Lu;0;L;00D5 0308;;;;N;;;;1E4F; +1E4F;LATIN SMALL LETTER O WITH TILDE AND DIAERESIS;Ll;0;L;00F5 0308;;;;N;;;1E4E;;1E4E +1E50;LATIN CAPITAL LETTER O WITH MACRON AND GRAVE;Lu;0;L;014C 0300;;;;N;;;;1E51; +1E51;LATIN SMALL LETTER O WITH MACRON AND GRAVE;Ll;0;L;014D 0300;;;;N;;;1E50;;1E50 +1E52;LATIN CAPITAL LETTER O WITH MACRON AND ACUTE;Lu;0;L;014C 0301;;;;N;;;;1E53; +1E53;LATIN SMALL LETTER O WITH MACRON AND ACUTE;Ll;0;L;014D 0301;;;;N;;;1E52;;1E52 +1E54;LATIN CAPITAL LETTER P WITH ACUTE;Lu;0;L;0050 0301;;;;N;;;;1E55; +1E55;LATIN SMALL LETTER P WITH ACUTE;Ll;0;L;0070 0301;;;;N;;;1E54;;1E54 +1E56;LATIN CAPITAL LETTER P WITH DOT ABOVE;Lu;0;L;0050 0307;;;;N;;;;1E57; +1E57;LATIN SMALL LETTER P WITH DOT ABOVE;Ll;0;L;0070 0307;;;;N;;;1E56;;1E56 +1E58;LATIN CAPITAL LETTER R WITH DOT ABOVE;Lu;0;L;0052 0307;;;;N;;;;1E59; +1E59;LATIN SMALL LETTER R WITH DOT ABOVE;Ll;0;L;0072 0307;;;;N;;;1E58;;1E58 +1E5A;LATIN CAPITAL LETTER R WITH DOT BELOW;Lu;0;L;0052 0323;;;;N;;;;1E5B; +1E5B;LATIN SMALL LETTER R WITH DOT BELOW;Ll;0;L;0072 0323;;;;N;;;1E5A;;1E5A +1E5C;LATIN CAPITAL LETTER R WITH DOT BELOW AND MACRON;Lu;0;L;1E5A 0304;;;;N;;;;1E5D; +1E5D;LATIN SMALL LETTER R WITH DOT BELOW AND MACRON;Ll;0;L;1E5B 0304;;;;N;;;1E5C;;1E5C +1E5E;LATIN CAPITAL LETTER R WITH LINE BELOW;Lu;0;L;0052 0331;;;;N;;;;1E5F; +1E5F;LATIN SMALL LETTER R WITH LINE BELOW;Ll;0;L;0072 0331;;;;N;;;1E5E;;1E5E +1E60;LATIN CAPITAL LETTER S WITH DOT ABOVE;Lu;0;L;0053 0307;;;;N;;;;1E61; +1E61;LATIN SMALL LETTER S WITH DOT ABOVE;Ll;0;L;0073 0307;;;;N;;;1E60;;1E60 +1E62;LATIN CAPITAL LETTER S WITH DOT BELOW;Lu;0;L;0053 0323;;;;N;;;;1E63; +1E63;LATIN SMALL LETTER S WITH DOT BELOW;Ll;0;L;0073 0323;;;;N;;;1E62;;1E62 +1E64;LATIN CAPITAL LETTER S WITH ACUTE AND DOT ABOVE;Lu;0;L;015A 0307;;;;N;;;;1E65; +1E65;LATIN SMALL LETTER S WITH ACUTE AND DOT ABOVE;Ll;0;L;015B 0307;;;;N;;;1E64;;1E64 +1E66;LATIN CAPITAL LETTER S WITH CARON AND DOT ABOVE;Lu;0;L;0160 0307;;;;N;;;;1E67; +1E67;LATIN SMALL LETTER S WITH CARON AND DOT ABOVE;Ll;0;L;0161 0307;;;;N;;;1E66;;1E66 +1E68;LATIN CAPITAL LETTER S WITH DOT BELOW AND DOT ABOVE;Lu;0;L;1E62 0307;;;;N;;;;1E69; +1E69;LATIN SMALL LETTER S WITH DOT BELOW AND DOT ABOVE;Ll;0;L;1E63 0307;;;;N;;;1E68;;1E68 +1E6A;LATIN CAPITAL LETTER T WITH DOT ABOVE;Lu;0;L;0054 0307;;;;N;;;;1E6B; +1E6B;LATIN SMALL LETTER T WITH DOT ABOVE;Ll;0;L;0074 0307;;;;N;;;1E6A;;1E6A +1E6C;LATIN CAPITAL LETTER T WITH DOT BELOW;Lu;0;L;0054 0323;;;;N;;;;1E6D; +1E6D;LATIN SMALL LETTER T WITH DOT BELOW;Ll;0;L;0074 0323;;;;N;;;1E6C;;1E6C +1E6E;LATIN CAPITAL LETTER T WITH LINE BELOW;Lu;0;L;0054 0331;;;;N;;;;1E6F; +1E6F;LATIN SMALL LETTER T WITH LINE BELOW;Ll;0;L;0074 0331;;;;N;;;1E6E;;1E6E +1E70;LATIN CAPITAL LETTER T WITH CIRCUMFLEX BELOW;Lu;0;L;0054 032D;;;;N;;;;1E71; +1E71;LATIN SMALL LETTER T WITH CIRCUMFLEX BELOW;Ll;0;L;0074 032D;;;;N;;;1E70;;1E70 +1E72;LATIN CAPITAL LETTER U WITH DIAERESIS BELOW;Lu;0;L;0055 0324;;;;N;;;;1E73; +1E73;LATIN SMALL LETTER U WITH DIAERESIS BELOW;Ll;0;L;0075 0324;;;;N;;;1E72;;1E72 +1E74;LATIN CAPITAL LETTER U WITH TILDE BELOW;Lu;0;L;0055 0330;;;;N;;;;1E75; +1E75;LATIN SMALL LETTER U WITH TILDE BELOW;Ll;0;L;0075 0330;;;;N;;;1E74;;1E74 +1E76;LATIN CAPITAL LETTER U WITH CIRCUMFLEX BELOW;Lu;0;L;0055 032D;;;;N;;;;1E77; +1E77;LATIN SMALL LETTER U WITH CIRCUMFLEX BELOW;Ll;0;L;0075 032D;;;;N;;;1E76;;1E76 +1E78;LATIN CAPITAL LETTER U WITH TILDE AND ACUTE;Lu;0;L;0168 0301;;;;N;;;;1E79; +1E79;LATIN SMALL LETTER U WITH TILDE AND ACUTE;Ll;0;L;0169 0301;;;;N;;;1E78;;1E78 +1E7A;LATIN CAPITAL LETTER U WITH MACRON AND DIAERESIS;Lu;0;L;016A 0308;;;;N;;;;1E7B; +1E7B;LATIN SMALL LETTER U WITH MACRON AND DIAERESIS;Ll;0;L;016B 0308;;;;N;;;1E7A;;1E7A +1E7C;LATIN CAPITAL LETTER V WITH TILDE;Lu;0;L;0056 0303;;;;N;;;;1E7D; +1E7D;LATIN SMALL LETTER V WITH TILDE;Ll;0;L;0076 0303;;;;N;;;1E7C;;1E7C +1E7E;LATIN CAPITAL LETTER V WITH DOT BELOW;Lu;0;L;0056 0323;;;;N;;;;1E7F; +1E7F;LATIN SMALL LETTER V WITH DOT BELOW;Ll;0;L;0076 0323;;;;N;;;1E7E;;1E7E +1E80;LATIN CAPITAL LETTER W WITH GRAVE;Lu;0;L;0057 0300;;;;N;;;;1E81; +1E81;LATIN SMALL LETTER W WITH GRAVE;Ll;0;L;0077 0300;;;;N;;;1E80;;1E80 +1E82;LATIN CAPITAL LETTER W WITH ACUTE;Lu;0;L;0057 0301;;;;N;;;;1E83; +1E83;LATIN SMALL LETTER W WITH ACUTE;Ll;0;L;0077 0301;;;;N;;;1E82;;1E82 +1E84;LATIN CAPITAL LETTER W WITH DIAERESIS;Lu;0;L;0057 0308;;;;N;;;;1E85; +1E85;LATIN SMALL LETTER W WITH DIAERESIS;Ll;0;L;0077 0308;;;;N;;;1E84;;1E84 +1E86;LATIN CAPITAL LETTER W WITH DOT ABOVE;Lu;0;L;0057 0307;;;;N;;;;1E87; +1E87;LATIN SMALL LETTER W WITH DOT ABOVE;Ll;0;L;0077 0307;;;;N;;;1E86;;1E86 +1E88;LATIN CAPITAL LETTER W WITH DOT BELOW;Lu;0;L;0057 0323;;;;N;;;;1E89; +1E89;LATIN SMALL LETTER W WITH DOT BELOW;Ll;0;L;0077 0323;;;;N;;;1E88;;1E88 +1E8A;LATIN CAPITAL LETTER X WITH DOT ABOVE;Lu;0;L;0058 0307;;;;N;;;;1E8B; +1E8B;LATIN SMALL LETTER X WITH DOT ABOVE;Ll;0;L;0078 0307;;;;N;;;1E8A;;1E8A +1E8C;LATIN CAPITAL LETTER X WITH DIAERESIS;Lu;0;L;0058 0308;;;;N;;;;1E8D; +1E8D;LATIN SMALL LETTER X WITH DIAERESIS;Ll;0;L;0078 0308;;;;N;;;1E8C;;1E8C +1E8E;LATIN CAPITAL LETTER Y WITH DOT ABOVE;Lu;0;L;0059 0307;;;;N;;;;1E8F; +1E8F;LATIN SMALL LETTER Y WITH DOT ABOVE;Ll;0;L;0079 0307;;;;N;;;1E8E;;1E8E +1E90;LATIN CAPITAL LETTER Z WITH CIRCUMFLEX;Lu;0;L;005A 0302;;;;N;;;;1E91; +1E91;LATIN SMALL LETTER Z WITH CIRCUMFLEX;Ll;0;L;007A 0302;;;;N;;;1E90;;1E90 +1E92;LATIN CAPITAL LETTER Z WITH DOT BELOW;Lu;0;L;005A 0323;;;;N;;;;1E93; +1E93;LATIN SMALL LETTER Z WITH DOT BELOW;Ll;0;L;007A 0323;;;;N;;;1E92;;1E92 +1E94;LATIN CAPITAL LETTER Z WITH LINE BELOW;Lu;0;L;005A 0331;;;;N;;;;1E95; +1E95;LATIN SMALL LETTER Z WITH LINE BELOW;Ll;0;L;007A 0331;;;;N;;;1E94;;1E94 +1E96;LATIN SMALL LETTER H WITH LINE BELOW;Ll;0;L;0068 0331;;;;N;;;;; +1E97;LATIN SMALL LETTER T WITH DIAERESIS;Ll;0;L;0074 0308;;;;N;;;;; +1E98;LATIN SMALL LETTER W WITH RING ABOVE;Ll;0;L;0077 030A;;;;N;;;;; +1E99;LATIN SMALL LETTER Y WITH RING ABOVE;Ll;0;L;0079 030A;;;;N;;;;; +1E9A;LATIN SMALL LETTER A WITH RIGHT HALF RING;Ll;0;L; 0061 02BE;;;;N;;;;; +1E9B;LATIN SMALL LETTER LONG S WITH DOT ABOVE;Ll;0;L;017F 0307;;;;N;;;1E60;;1E60 +1E9C;LATIN SMALL LETTER LONG S WITH DIAGONAL STROKE;Ll;0;L;;;;;N;;;;; +1E9D;LATIN SMALL LETTER LONG S WITH HIGH STROKE;Ll;0;L;;;;;N;;;;; +1E9E;LATIN CAPITAL LETTER SHARP S;Lu;0;L;;;;;N;;;;00DF; +1E9F;LATIN SMALL LETTER DELTA;Ll;0;L;;;;;N;;;;; +1EA0;LATIN CAPITAL LETTER A WITH DOT BELOW;Lu;0;L;0041 0323;;;;N;;;;1EA1; +1EA1;LATIN SMALL LETTER A WITH DOT BELOW;Ll;0;L;0061 0323;;;;N;;;1EA0;;1EA0 +1EA2;LATIN CAPITAL LETTER A WITH HOOK ABOVE;Lu;0;L;0041 0309;;;;N;;;;1EA3; +1EA3;LATIN SMALL LETTER A WITH HOOK ABOVE;Ll;0;L;0061 0309;;;;N;;;1EA2;;1EA2 +1EA4;LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND ACUTE;Lu;0;L;00C2 0301;;;;N;;;;1EA5; +1EA5;LATIN SMALL LETTER A WITH CIRCUMFLEX AND ACUTE;Ll;0;L;00E2 0301;;;;N;;;1EA4;;1EA4 +1EA6;LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND GRAVE;Lu;0;L;00C2 0300;;;;N;;;;1EA7; +1EA7;LATIN SMALL LETTER A WITH CIRCUMFLEX AND GRAVE;Ll;0;L;00E2 0300;;;;N;;;1EA6;;1EA6 +1EA8;LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND HOOK ABOVE;Lu;0;L;00C2 0309;;;;N;;;;1EA9; +1EA9;LATIN SMALL LETTER A WITH CIRCUMFLEX AND HOOK ABOVE;Ll;0;L;00E2 0309;;;;N;;;1EA8;;1EA8 +1EAA;LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND TILDE;Lu;0;L;00C2 0303;;;;N;;;;1EAB; +1EAB;LATIN SMALL LETTER A WITH CIRCUMFLEX AND TILDE;Ll;0;L;00E2 0303;;;;N;;;1EAA;;1EAA +1EAC;LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND DOT BELOW;Lu;0;L;1EA0 0302;;;;N;;;;1EAD; +1EAD;LATIN SMALL LETTER A WITH CIRCUMFLEX AND DOT BELOW;Ll;0;L;1EA1 0302;;;;N;;;1EAC;;1EAC +1EAE;LATIN CAPITAL LETTER A WITH BREVE AND ACUTE;Lu;0;L;0102 0301;;;;N;;;;1EAF; +1EAF;LATIN SMALL LETTER A WITH BREVE AND ACUTE;Ll;0;L;0103 0301;;;;N;;;1EAE;;1EAE +1EB0;LATIN CAPITAL LETTER A WITH BREVE AND GRAVE;Lu;0;L;0102 0300;;;;N;;;;1EB1; +1EB1;LATIN SMALL LETTER A WITH BREVE AND GRAVE;Ll;0;L;0103 0300;;;;N;;;1EB0;;1EB0 +1EB2;LATIN CAPITAL LETTER A WITH BREVE AND HOOK ABOVE;Lu;0;L;0102 0309;;;;N;;;;1EB3; +1EB3;LATIN SMALL LETTER A WITH BREVE AND HOOK ABOVE;Ll;0;L;0103 0309;;;;N;;;1EB2;;1EB2 +1EB4;LATIN CAPITAL LETTER A WITH BREVE AND TILDE;Lu;0;L;0102 0303;;;;N;;;;1EB5; +1EB5;LATIN SMALL LETTER A WITH BREVE AND TILDE;Ll;0;L;0103 0303;;;;N;;;1EB4;;1EB4 +1EB6;LATIN CAPITAL LETTER A WITH BREVE AND DOT BELOW;Lu;0;L;1EA0 0306;;;;N;;;;1EB7; +1EB7;LATIN SMALL LETTER A WITH BREVE AND DOT BELOW;Ll;0;L;1EA1 0306;;;;N;;;1EB6;;1EB6 +1EB8;LATIN CAPITAL LETTER E WITH DOT BELOW;Lu;0;L;0045 0323;;;;N;;;;1EB9; +1EB9;LATIN SMALL LETTER E WITH DOT BELOW;Ll;0;L;0065 0323;;;;N;;;1EB8;;1EB8 +1EBA;LATIN CAPITAL LETTER E WITH HOOK ABOVE;Lu;0;L;0045 0309;;;;N;;;;1EBB; +1EBB;LATIN SMALL LETTER E WITH HOOK ABOVE;Ll;0;L;0065 0309;;;;N;;;1EBA;;1EBA +1EBC;LATIN CAPITAL LETTER E WITH TILDE;Lu;0;L;0045 0303;;;;N;;;;1EBD; +1EBD;LATIN SMALL LETTER E WITH TILDE;Ll;0;L;0065 0303;;;;N;;;1EBC;;1EBC +1EBE;LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND ACUTE;Lu;0;L;00CA 0301;;;;N;;;;1EBF; +1EBF;LATIN SMALL LETTER E WITH CIRCUMFLEX AND ACUTE;Ll;0;L;00EA 0301;;;;N;;;1EBE;;1EBE +1EC0;LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND GRAVE;Lu;0;L;00CA 0300;;;;N;;;;1EC1; +1EC1;LATIN SMALL LETTER E WITH CIRCUMFLEX AND GRAVE;Ll;0;L;00EA 0300;;;;N;;;1EC0;;1EC0 +1EC2;LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND HOOK ABOVE;Lu;0;L;00CA 0309;;;;N;;;;1EC3; +1EC3;LATIN SMALL LETTER E WITH CIRCUMFLEX AND HOOK ABOVE;Ll;0;L;00EA 0309;;;;N;;;1EC2;;1EC2 +1EC4;LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND TILDE;Lu;0;L;00CA 0303;;;;N;;;;1EC5; +1EC5;LATIN SMALL LETTER E WITH CIRCUMFLEX AND TILDE;Ll;0;L;00EA 0303;;;;N;;;1EC4;;1EC4 +1EC6;LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND DOT BELOW;Lu;0;L;1EB8 0302;;;;N;;;;1EC7; +1EC7;LATIN SMALL LETTER E WITH CIRCUMFLEX AND DOT BELOW;Ll;0;L;1EB9 0302;;;;N;;;1EC6;;1EC6 +1EC8;LATIN CAPITAL LETTER I WITH HOOK ABOVE;Lu;0;L;0049 0309;;;;N;;;;1EC9; +1EC9;LATIN SMALL LETTER I WITH HOOK ABOVE;Ll;0;L;0069 0309;;;;N;;;1EC8;;1EC8 +1ECA;LATIN CAPITAL LETTER I WITH DOT BELOW;Lu;0;L;0049 0323;;;;N;;;;1ECB; +1ECB;LATIN SMALL LETTER I WITH DOT BELOW;Ll;0;L;0069 0323;;;;N;;;1ECA;;1ECA +1ECC;LATIN CAPITAL LETTER O WITH DOT BELOW;Lu;0;L;004F 0323;;;;N;;;;1ECD; +1ECD;LATIN SMALL LETTER O WITH DOT BELOW;Ll;0;L;006F 0323;;;;N;;;1ECC;;1ECC +1ECE;LATIN CAPITAL LETTER O WITH HOOK ABOVE;Lu;0;L;004F 0309;;;;N;;;;1ECF; +1ECF;LATIN SMALL LETTER O WITH HOOK ABOVE;Ll;0;L;006F 0309;;;;N;;;1ECE;;1ECE +1ED0;LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND ACUTE;Lu;0;L;00D4 0301;;;;N;;;;1ED1; +1ED1;LATIN SMALL LETTER O WITH CIRCUMFLEX AND ACUTE;Ll;0;L;00F4 0301;;;;N;;;1ED0;;1ED0 +1ED2;LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND GRAVE;Lu;0;L;00D4 0300;;;;N;;;;1ED3; +1ED3;LATIN SMALL LETTER O WITH CIRCUMFLEX AND GRAVE;Ll;0;L;00F4 0300;;;;N;;;1ED2;;1ED2 +1ED4;LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND HOOK ABOVE;Lu;0;L;00D4 0309;;;;N;;;;1ED5; +1ED5;LATIN SMALL LETTER O WITH CIRCUMFLEX AND HOOK ABOVE;Ll;0;L;00F4 0309;;;;N;;;1ED4;;1ED4 +1ED6;LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND TILDE;Lu;0;L;00D4 0303;;;;N;;;;1ED7; +1ED7;LATIN SMALL LETTER O WITH CIRCUMFLEX AND TILDE;Ll;0;L;00F4 0303;;;;N;;;1ED6;;1ED6 +1ED8;LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND DOT BELOW;Lu;0;L;1ECC 0302;;;;N;;;;1ED9; +1ED9;LATIN SMALL LETTER O WITH CIRCUMFLEX AND DOT BELOW;Ll;0;L;1ECD 0302;;;;N;;;1ED8;;1ED8 +1EDA;LATIN CAPITAL LETTER O WITH HORN AND ACUTE;Lu;0;L;01A0 0301;;;;N;;;;1EDB; +1EDB;LATIN SMALL LETTER O WITH HORN AND ACUTE;Ll;0;L;01A1 0301;;;;N;;;1EDA;;1EDA +1EDC;LATIN CAPITAL LETTER O WITH HORN AND GRAVE;Lu;0;L;01A0 0300;;;;N;;;;1EDD; +1EDD;LATIN SMALL LETTER O WITH HORN AND GRAVE;Ll;0;L;01A1 0300;;;;N;;;1EDC;;1EDC +1EDE;LATIN CAPITAL LETTER O WITH HORN AND HOOK ABOVE;Lu;0;L;01A0 0309;;;;N;;;;1EDF; +1EDF;LATIN SMALL LETTER O WITH HORN AND HOOK ABOVE;Ll;0;L;01A1 0309;;;;N;;;1EDE;;1EDE +1EE0;LATIN CAPITAL LETTER O WITH HORN AND TILDE;Lu;0;L;01A0 0303;;;;N;;;;1EE1; +1EE1;LATIN SMALL LETTER O WITH HORN AND TILDE;Ll;0;L;01A1 0303;;;;N;;;1EE0;;1EE0 +1EE2;LATIN CAPITAL LETTER O WITH HORN AND DOT BELOW;Lu;0;L;01A0 0323;;;;N;;;;1EE3; +1EE3;LATIN SMALL LETTER O WITH HORN AND DOT BELOW;Ll;0;L;01A1 0323;;;;N;;;1EE2;;1EE2 +1EE4;LATIN CAPITAL LETTER U WITH DOT BELOW;Lu;0;L;0055 0323;;;;N;;;;1EE5; +1EE5;LATIN SMALL LETTER U WITH DOT BELOW;Ll;0;L;0075 0323;;;;N;;;1EE4;;1EE4 +1EE6;LATIN CAPITAL LETTER U WITH HOOK ABOVE;Lu;0;L;0055 0309;;;;N;;;;1EE7; +1EE7;LATIN SMALL LETTER U WITH HOOK ABOVE;Ll;0;L;0075 0309;;;;N;;;1EE6;;1EE6 +1EE8;LATIN CAPITAL LETTER U WITH HORN AND ACUTE;Lu;0;L;01AF 0301;;;;N;;;;1EE9; +1EE9;LATIN SMALL LETTER U WITH HORN AND ACUTE;Ll;0;L;01B0 0301;;;;N;;;1EE8;;1EE8 +1EEA;LATIN CAPITAL LETTER U WITH HORN AND GRAVE;Lu;0;L;01AF 0300;;;;N;;;;1EEB; +1EEB;LATIN SMALL LETTER U WITH HORN AND GRAVE;Ll;0;L;01B0 0300;;;;N;;;1EEA;;1EEA +1EEC;LATIN CAPITAL LETTER U WITH HORN AND HOOK ABOVE;Lu;0;L;01AF 0309;;;;N;;;;1EED; +1EED;LATIN SMALL LETTER U WITH HORN AND HOOK ABOVE;Ll;0;L;01B0 0309;;;;N;;;1EEC;;1EEC +1EEE;LATIN CAPITAL LETTER U WITH HORN AND TILDE;Lu;0;L;01AF 0303;;;;N;;;;1EEF; +1EEF;LATIN SMALL LETTER U WITH HORN AND TILDE;Ll;0;L;01B0 0303;;;;N;;;1EEE;;1EEE +1EF0;LATIN CAPITAL LETTER U WITH HORN AND DOT BELOW;Lu;0;L;01AF 0323;;;;N;;;;1EF1; +1EF1;LATIN SMALL LETTER U WITH HORN AND DOT BELOW;Ll;0;L;01B0 0323;;;;N;;;1EF0;;1EF0 +1EF2;LATIN CAPITAL LETTER Y WITH GRAVE;Lu;0;L;0059 0300;;;;N;;;;1EF3; +1EF3;LATIN SMALL LETTER Y WITH GRAVE;Ll;0;L;0079 0300;;;;N;;;1EF2;;1EF2 +1EF4;LATIN CAPITAL LETTER Y WITH DOT BELOW;Lu;0;L;0059 0323;;;;N;;;;1EF5; +1EF5;LATIN SMALL LETTER Y WITH DOT BELOW;Ll;0;L;0079 0323;;;;N;;;1EF4;;1EF4 +1EF6;LATIN CAPITAL LETTER Y WITH HOOK ABOVE;Lu;0;L;0059 0309;;;;N;;;;1EF7; +1EF7;LATIN SMALL LETTER Y WITH HOOK ABOVE;Ll;0;L;0079 0309;;;;N;;;1EF6;;1EF6 +1EF8;LATIN CAPITAL LETTER Y WITH TILDE;Lu;0;L;0059 0303;;;;N;;;;1EF9; +1EF9;LATIN SMALL LETTER Y WITH TILDE;Ll;0;L;0079 0303;;;;N;;;1EF8;;1EF8 +1EFA;LATIN CAPITAL LETTER MIDDLE-WELSH LL;Lu;0;L;;;;;N;;;;1EFB; +1EFB;LATIN SMALL LETTER MIDDLE-WELSH LL;Ll;0;L;;;;;N;;;1EFA;;1EFA +1EFC;LATIN CAPITAL LETTER MIDDLE-WELSH V;Lu;0;L;;;;;N;;;;1EFD; +1EFD;LATIN SMALL LETTER MIDDLE-WELSH V;Ll;0;L;;;;;N;;;1EFC;;1EFC +1EFE;LATIN CAPITAL LETTER Y WITH LOOP;Lu;0;L;;;;;N;;;;1EFF; +1EFF;LATIN SMALL LETTER Y WITH LOOP;Ll;0;L;;;;;N;;;1EFE;;1EFE +1F00;GREEK SMALL LETTER ALPHA WITH PSILI;Ll;0;L;03B1 0313;;;;N;;;1F08;;1F08 +1F01;GREEK SMALL LETTER ALPHA WITH DASIA;Ll;0;L;03B1 0314;;;;N;;;1F09;;1F09 +1F02;GREEK SMALL LETTER ALPHA WITH PSILI AND VARIA;Ll;0;L;1F00 0300;;;;N;;;1F0A;;1F0A +1F03;GREEK SMALL LETTER ALPHA WITH DASIA AND VARIA;Ll;0;L;1F01 0300;;;;N;;;1F0B;;1F0B +1F04;GREEK SMALL LETTER ALPHA WITH PSILI AND OXIA;Ll;0;L;1F00 0301;;;;N;;;1F0C;;1F0C +1F05;GREEK SMALL LETTER ALPHA WITH DASIA AND OXIA;Ll;0;L;1F01 0301;;;;N;;;1F0D;;1F0D +1F06;GREEK SMALL LETTER ALPHA WITH PSILI AND PERISPOMENI;Ll;0;L;1F00 0342;;;;N;;;1F0E;;1F0E +1F07;GREEK SMALL LETTER ALPHA WITH DASIA AND PERISPOMENI;Ll;0;L;1F01 0342;;;;N;;;1F0F;;1F0F +1F08;GREEK CAPITAL LETTER ALPHA WITH PSILI;Lu;0;L;0391 0313;;;;N;;;;1F00; +1F09;GREEK CAPITAL LETTER ALPHA WITH DASIA;Lu;0;L;0391 0314;;;;N;;;;1F01; +1F0A;GREEK CAPITAL LETTER ALPHA WITH PSILI AND VARIA;Lu;0;L;1F08 0300;;;;N;;;;1F02; +1F0B;GREEK CAPITAL LETTER ALPHA WITH DASIA AND VARIA;Lu;0;L;1F09 0300;;;;N;;;;1F03; +1F0C;GREEK CAPITAL LETTER ALPHA WITH PSILI AND OXIA;Lu;0;L;1F08 0301;;;;N;;;;1F04; +1F0D;GREEK CAPITAL LETTER ALPHA WITH DASIA AND OXIA;Lu;0;L;1F09 0301;;;;N;;;;1F05; +1F0E;GREEK CAPITAL LETTER ALPHA WITH PSILI AND PERISPOMENI;Lu;0;L;1F08 0342;;;;N;;;;1F06; +1F0F;GREEK CAPITAL LETTER ALPHA WITH DASIA AND PERISPOMENI;Lu;0;L;1F09 0342;;;;N;;;;1F07; +1F10;GREEK SMALL LETTER EPSILON WITH PSILI;Ll;0;L;03B5 0313;;;;N;;;1F18;;1F18 +1F11;GREEK SMALL LETTER EPSILON WITH DASIA;Ll;0;L;03B5 0314;;;;N;;;1F19;;1F19 +1F12;GREEK SMALL LETTER EPSILON WITH PSILI AND VARIA;Ll;0;L;1F10 0300;;;;N;;;1F1A;;1F1A +1F13;GREEK SMALL LETTER EPSILON WITH DASIA AND VARIA;Ll;0;L;1F11 0300;;;;N;;;1F1B;;1F1B +1F14;GREEK SMALL LETTER EPSILON WITH PSILI AND OXIA;Ll;0;L;1F10 0301;;;;N;;;1F1C;;1F1C +1F15;GREEK SMALL LETTER EPSILON WITH DASIA AND OXIA;Ll;0;L;1F11 0301;;;;N;;;1F1D;;1F1D +1F18;GREEK CAPITAL LETTER EPSILON WITH PSILI;Lu;0;L;0395 0313;;;;N;;;;1F10; +1F19;GREEK CAPITAL LETTER EPSILON WITH DASIA;Lu;0;L;0395 0314;;;;N;;;;1F11; +1F1A;GREEK CAPITAL LETTER EPSILON WITH PSILI AND VARIA;Lu;0;L;1F18 0300;;;;N;;;;1F12; +1F1B;GREEK CAPITAL LETTER EPSILON WITH DASIA AND VARIA;Lu;0;L;1F19 0300;;;;N;;;;1F13; +1F1C;GREEK CAPITAL LETTER EPSILON WITH PSILI AND OXIA;Lu;0;L;1F18 0301;;;;N;;;;1F14; +1F1D;GREEK CAPITAL LETTER EPSILON WITH DASIA AND OXIA;Lu;0;L;1F19 0301;;;;N;;;;1F15; +1F20;GREEK SMALL LETTER ETA WITH PSILI;Ll;0;L;03B7 0313;;;;N;;;1F28;;1F28 +1F21;GREEK SMALL LETTER ETA WITH DASIA;Ll;0;L;03B7 0314;;;;N;;;1F29;;1F29 +1F22;GREEK SMALL LETTER ETA WITH PSILI AND VARIA;Ll;0;L;1F20 0300;;;;N;;;1F2A;;1F2A +1F23;GREEK SMALL LETTER ETA WITH DASIA AND VARIA;Ll;0;L;1F21 0300;;;;N;;;1F2B;;1F2B +1F24;GREEK SMALL LETTER ETA WITH PSILI AND OXIA;Ll;0;L;1F20 0301;;;;N;;;1F2C;;1F2C +1F25;GREEK SMALL LETTER ETA WITH DASIA AND OXIA;Ll;0;L;1F21 0301;;;;N;;;1F2D;;1F2D +1F26;GREEK SMALL LETTER ETA WITH PSILI AND PERISPOMENI;Ll;0;L;1F20 0342;;;;N;;;1F2E;;1F2E +1F27;GREEK SMALL LETTER ETA WITH DASIA AND PERISPOMENI;Ll;0;L;1F21 0342;;;;N;;;1F2F;;1F2F +1F28;GREEK CAPITAL LETTER ETA WITH PSILI;Lu;0;L;0397 0313;;;;N;;;;1F20; +1F29;GREEK CAPITAL LETTER ETA WITH DASIA;Lu;0;L;0397 0314;;;;N;;;;1F21; +1F2A;GREEK CAPITAL LETTER ETA WITH PSILI AND VARIA;Lu;0;L;1F28 0300;;;;N;;;;1F22; +1F2B;GREEK CAPITAL LETTER ETA WITH DASIA AND VARIA;Lu;0;L;1F29 0300;;;;N;;;;1F23; +1F2C;GREEK CAPITAL LETTER ETA WITH PSILI AND OXIA;Lu;0;L;1F28 0301;;;;N;;;;1F24; +1F2D;GREEK CAPITAL LETTER ETA WITH DASIA AND OXIA;Lu;0;L;1F29 0301;;;;N;;;;1F25; +1F2E;GREEK CAPITAL LETTER ETA WITH PSILI AND PERISPOMENI;Lu;0;L;1F28 0342;;;;N;;;;1F26; +1F2F;GREEK CAPITAL LETTER ETA WITH DASIA AND PERISPOMENI;Lu;0;L;1F29 0342;;;;N;;;;1F27; +1F30;GREEK SMALL LETTER IOTA WITH PSILI;Ll;0;L;03B9 0313;;;;N;;;1F38;;1F38 +1F31;GREEK SMALL LETTER IOTA WITH DASIA;Ll;0;L;03B9 0314;;;;N;;;1F39;;1F39 +1F32;GREEK SMALL LETTER IOTA WITH PSILI AND VARIA;Ll;0;L;1F30 0300;;;;N;;;1F3A;;1F3A +1F33;GREEK SMALL LETTER IOTA WITH DASIA AND VARIA;Ll;0;L;1F31 0300;;;;N;;;1F3B;;1F3B +1F34;GREEK SMALL LETTER IOTA WITH PSILI AND OXIA;Ll;0;L;1F30 0301;;;;N;;;1F3C;;1F3C +1F35;GREEK SMALL LETTER IOTA WITH DASIA AND OXIA;Ll;0;L;1F31 0301;;;;N;;;1F3D;;1F3D +1F36;GREEK SMALL LETTER IOTA WITH PSILI AND PERISPOMENI;Ll;0;L;1F30 0342;;;;N;;;1F3E;;1F3E +1F37;GREEK SMALL LETTER IOTA WITH DASIA AND PERISPOMENI;Ll;0;L;1F31 0342;;;;N;;;1F3F;;1F3F +1F38;GREEK CAPITAL LETTER IOTA WITH PSILI;Lu;0;L;0399 0313;;;;N;;;;1F30; +1F39;GREEK CAPITAL LETTER IOTA WITH DASIA;Lu;0;L;0399 0314;;;;N;;;;1F31; +1F3A;GREEK CAPITAL LETTER IOTA WITH PSILI AND VARIA;Lu;0;L;1F38 0300;;;;N;;;;1F32; +1F3B;GREEK CAPITAL LETTER IOTA WITH DASIA AND VARIA;Lu;0;L;1F39 0300;;;;N;;;;1F33; +1F3C;GREEK CAPITAL LETTER IOTA WITH PSILI AND OXIA;Lu;0;L;1F38 0301;;;;N;;;;1F34; +1F3D;GREEK CAPITAL LETTER IOTA WITH DASIA AND OXIA;Lu;0;L;1F39 0301;;;;N;;;;1F35; +1F3E;GREEK CAPITAL LETTER IOTA WITH PSILI AND PERISPOMENI;Lu;0;L;1F38 0342;;;;N;;;;1F36; +1F3F;GREEK CAPITAL LETTER IOTA WITH DASIA AND PERISPOMENI;Lu;0;L;1F39 0342;;;;N;;;;1F37; +1F40;GREEK SMALL LETTER OMICRON WITH PSILI;Ll;0;L;03BF 0313;;;;N;;;1F48;;1F48 +1F41;GREEK SMALL LETTER OMICRON WITH DASIA;Ll;0;L;03BF 0314;;;;N;;;1F49;;1F49 +1F42;GREEK SMALL LETTER OMICRON WITH PSILI AND VARIA;Ll;0;L;1F40 0300;;;;N;;;1F4A;;1F4A +1F43;GREEK SMALL LETTER OMICRON WITH DASIA AND VARIA;Ll;0;L;1F41 0300;;;;N;;;1F4B;;1F4B +1F44;GREEK SMALL LETTER OMICRON WITH PSILI AND OXIA;Ll;0;L;1F40 0301;;;;N;;;1F4C;;1F4C +1F45;GREEK SMALL LETTER OMICRON WITH DASIA AND OXIA;Ll;0;L;1F41 0301;;;;N;;;1F4D;;1F4D +1F48;GREEK CAPITAL LETTER OMICRON WITH PSILI;Lu;0;L;039F 0313;;;;N;;;;1F40; +1F49;GREEK CAPITAL LETTER OMICRON WITH DASIA;Lu;0;L;039F 0314;;;;N;;;;1F41; +1F4A;GREEK CAPITAL LETTER OMICRON WITH PSILI AND VARIA;Lu;0;L;1F48 0300;;;;N;;;;1F42; +1F4B;GREEK CAPITAL LETTER OMICRON WITH DASIA AND VARIA;Lu;0;L;1F49 0300;;;;N;;;;1F43; +1F4C;GREEK CAPITAL LETTER OMICRON WITH PSILI AND OXIA;Lu;0;L;1F48 0301;;;;N;;;;1F44; +1F4D;GREEK CAPITAL LETTER OMICRON WITH DASIA AND OXIA;Lu;0;L;1F49 0301;;;;N;;;;1F45; +1F50;GREEK SMALL LETTER UPSILON WITH PSILI;Ll;0;L;03C5 0313;;;;N;;;;; +1F51;GREEK SMALL LETTER UPSILON WITH DASIA;Ll;0;L;03C5 0314;;;;N;;;1F59;;1F59 +1F52;GREEK SMALL LETTER UPSILON WITH PSILI AND VARIA;Ll;0;L;1F50 0300;;;;N;;;;; +1F53;GREEK SMALL LETTER UPSILON WITH DASIA AND VARIA;Ll;0;L;1F51 0300;;;;N;;;1F5B;;1F5B +1F54;GREEK SMALL LETTER UPSILON WITH PSILI AND OXIA;Ll;0;L;1F50 0301;;;;N;;;;; +1F55;GREEK SMALL LETTER UPSILON WITH DASIA AND OXIA;Ll;0;L;1F51 0301;;;;N;;;1F5D;;1F5D +1F56;GREEK SMALL LETTER UPSILON WITH PSILI AND PERISPOMENI;Ll;0;L;1F50 0342;;;;N;;;;; +1F57;GREEK SMALL LETTER UPSILON WITH DASIA AND PERISPOMENI;Ll;0;L;1F51 0342;;;;N;;;1F5F;;1F5F +1F59;GREEK CAPITAL LETTER UPSILON WITH DASIA;Lu;0;L;03A5 0314;;;;N;;;;1F51; +1F5B;GREEK CAPITAL LETTER UPSILON WITH DASIA AND VARIA;Lu;0;L;1F59 0300;;;;N;;;;1F53; +1F5D;GREEK CAPITAL LETTER UPSILON WITH DASIA AND OXIA;Lu;0;L;1F59 0301;;;;N;;;;1F55; +1F5F;GREEK CAPITAL LETTER UPSILON WITH DASIA AND PERISPOMENI;Lu;0;L;1F59 0342;;;;N;;;;1F57; +1F60;GREEK SMALL LETTER OMEGA WITH PSILI;Ll;0;L;03C9 0313;;;;N;;;1F68;;1F68 +1F61;GREEK SMALL LETTER OMEGA WITH DASIA;Ll;0;L;03C9 0314;;;;N;;;1F69;;1F69 +1F62;GREEK SMALL LETTER OMEGA WITH PSILI AND VARIA;Ll;0;L;1F60 0300;;;;N;;;1F6A;;1F6A +1F63;GREEK SMALL LETTER OMEGA WITH DASIA AND VARIA;Ll;0;L;1F61 0300;;;;N;;;1F6B;;1F6B +1F64;GREEK SMALL LETTER OMEGA WITH PSILI AND OXIA;Ll;0;L;1F60 0301;;;;N;;;1F6C;;1F6C +1F65;GREEK SMALL LETTER OMEGA WITH DASIA AND OXIA;Ll;0;L;1F61 0301;;;;N;;;1F6D;;1F6D +1F66;GREEK SMALL LETTER OMEGA WITH PSILI AND PERISPOMENI;Ll;0;L;1F60 0342;;;;N;;;1F6E;;1F6E +1F67;GREEK SMALL LETTER OMEGA WITH DASIA AND PERISPOMENI;Ll;0;L;1F61 0342;;;;N;;;1F6F;;1F6F +1F68;GREEK CAPITAL LETTER OMEGA WITH PSILI;Lu;0;L;03A9 0313;;;;N;;;;1F60; +1F69;GREEK CAPITAL LETTER OMEGA WITH DASIA;Lu;0;L;03A9 0314;;;;N;;;;1F61; +1F6A;GREEK CAPITAL LETTER OMEGA WITH PSILI AND VARIA;Lu;0;L;1F68 0300;;;;N;;;;1F62; +1F6B;GREEK CAPITAL LETTER OMEGA WITH DASIA AND VARIA;Lu;0;L;1F69 0300;;;;N;;;;1F63; +1F6C;GREEK CAPITAL LETTER OMEGA WITH PSILI AND OXIA;Lu;0;L;1F68 0301;;;;N;;;;1F64; +1F6D;GREEK CAPITAL LETTER OMEGA WITH DASIA AND OXIA;Lu;0;L;1F69 0301;;;;N;;;;1F65; +1F6E;GREEK CAPITAL LETTER OMEGA WITH PSILI AND PERISPOMENI;Lu;0;L;1F68 0342;;;;N;;;;1F66; +1F6F;GREEK CAPITAL LETTER OMEGA WITH DASIA AND PERISPOMENI;Lu;0;L;1F69 0342;;;;N;;;;1F67; +1F70;GREEK SMALL LETTER ALPHA WITH VARIA;Ll;0;L;03B1 0300;;;;N;;;1FBA;;1FBA +1F71;GREEK SMALL LETTER ALPHA WITH OXIA;Ll;0;L;03AC;;;;N;;;1FBB;;1FBB +1F72;GREEK SMALL LETTER EPSILON WITH VARIA;Ll;0;L;03B5 0300;;;;N;;;1FC8;;1FC8 +1F73;GREEK SMALL LETTER EPSILON WITH OXIA;Ll;0;L;03AD;;;;N;;;1FC9;;1FC9 +1F74;GREEK SMALL LETTER ETA WITH VARIA;Ll;0;L;03B7 0300;;;;N;;;1FCA;;1FCA +1F75;GREEK SMALL LETTER ETA WITH OXIA;Ll;0;L;03AE;;;;N;;;1FCB;;1FCB +1F76;GREEK SMALL LETTER IOTA WITH VARIA;Ll;0;L;03B9 0300;;;;N;;;1FDA;;1FDA +1F77;GREEK SMALL LETTER IOTA WITH OXIA;Ll;0;L;03AF;;;;N;;;1FDB;;1FDB +1F78;GREEK SMALL LETTER OMICRON WITH VARIA;Ll;0;L;03BF 0300;;;;N;;;1FF8;;1FF8 +1F79;GREEK SMALL LETTER OMICRON WITH OXIA;Ll;0;L;03CC;;;;N;;;1FF9;;1FF9 +1F7A;GREEK SMALL LETTER UPSILON WITH VARIA;Ll;0;L;03C5 0300;;;;N;;;1FEA;;1FEA +1F7B;GREEK SMALL LETTER UPSILON WITH OXIA;Ll;0;L;03CD;;;;N;;;1FEB;;1FEB +1F7C;GREEK SMALL LETTER OMEGA WITH VARIA;Ll;0;L;03C9 0300;;;;N;;;1FFA;;1FFA +1F7D;GREEK SMALL LETTER OMEGA WITH OXIA;Ll;0;L;03CE;;;;N;;;1FFB;;1FFB +1F80;GREEK SMALL LETTER ALPHA WITH PSILI AND YPOGEGRAMMENI;Ll;0;L;1F00 0345;;;;N;;;1F88;;1F88 +1F81;GREEK SMALL LETTER ALPHA WITH DASIA AND YPOGEGRAMMENI;Ll;0;L;1F01 0345;;;;N;;;1F89;;1F89 +1F82;GREEK SMALL LETTER ALPHA WITH PSILI AND VARIA AND YPOGEGRAMMENI;Ll;0;L;1F02 0345;;;;N;;;1F8A;;1F8A +1F83;GREEK SMALL LETTER ALPHA WITH DASIA AND VARIA AND YPOGEGRAMMENI;Ll;0;L;1F03 0345;;;;N;;;1F8B;;1F8B +1F84;GREEK SMALL LETTER ALPHA WITH PSILI AND OXIA AND YPOGEGRAMMENI;Ll;0;L;1F04 0345;;;;N;;;1F8C;;1F8C +1F85;GREEK SMALL LETTER ALPHA WITH DASIA AND OXIA AND YPOGEGRAMMENI;Ll;0;L;1F05 0345;;;;N;;;1F8D;;1F8D +1F86;GREEK SMALL LETTER ALPHA WITH PSILI AND PERISPOMENI AND YPOGEGRAMMENI;Ll;0;L;1F06 0345;;;;N;;;1F8E;;1F8E +1F87;GREEK SMALL LETTER ALPHA WITH DASIA AND PERISPOMENI AND YPOGEGRAMMENI;Ll;0;L;1F07 0345;;;;N;;;1F8F;;1F8F +1F88;GREEK CAPITAL LETTER ALPHA WITH PSILI AND PROSGEGRAMMENI;Lt;0;L;1F08 0345;;;;N;;;;1F80; +1F89;GREEK CAPITAL LETTER ALPHA WITH DASIA AND PROSGEGRAMMENI;Lt;0;L;1F09 0345;;;;N;;;;1F81; +1F8A;GREEK CAPITAL LETTER ALPHA WITH PSILI AND VARIA AND PROSGEGRAMMENI;Lt;0;L;1F0A 0345;;;;N;;;;1F82; +1F8B;GREEK CAPITAL LETTER ALPHA WITH DASIA AND VARIA AND PROSGEGRAMMENI;Lt;0;L;1F0B 0345;;;;N;;;;1F83; +1F8C;GREEK CAPITAL LETTER ALPHA WITH PSILI AND OXIA AND PROSGEGRAMMENI;Lt;0;L;1F0C 0345;;;;N;;;;1F84; +1F8D;GREEK CAPITAL LETTER ALPHA WITH DASIA AND OXIA AND PROSGEGRAMMENI;Lt;0;L;1F0D 0345;;;;N;;;;1F85; +1F8E;GREEK CAPITAL LETTER ALPHA WITH PSILI AND PERISPOMENI AND PROSGEGRAMMENI;Lt;0;L;1F0E 0345;;;;N;;;;1F86; +1F8F;GREEK CAPITAL LETTER ALPHA WITH DASIA AND PERISPOMENI AND PROSGEGRAMMENI;Lt;0;L;1F0F 0345;;;;N;;;;1F87; +1F90;GREEK SMALL LETTER ETA WITH PSILI AND YPOGEGRAMMENI;Ll;0;L;1F20 0345;;;;N;;;1F98;;1F98 +1F91;GREEK SMALL LETTER ETA WITH DASIA AND YPOGEGRAMMENI;Ll;0;L;1F21 0345;;;;N;;;1F99;;1F99 +1F92;GREEK SMALL LETTER ETA WITH PSILI AND VARIA AND YPOGEGRAMMENI;Ll;0;L;1F22 0345;;;;N;;;1F9A;;1F9A +1F93;GREEK SMALL LETTER ETA WITH DASIA AND VARIA AND YPOGEGRAMMENI;Ll;0;L;1F23 0345;;;;N;;;1F9B;;1F9B +1F94;GREEK SMALL LETTER ETA WITH PSILI AND OXIA AND YPOGEGRAMMENI;Ll;0;L;1F24 0345;;;;N;;;1F9C;;1F9C +1F95;GREEK SMALL LETTER ETA WITH DASIA AND OXIA AND YPOGEGRAMMENI;Ll;0;L;1F25 0345;;;;N;;;1F9D;;1F9D +1F96;GREEK SMALL LETTER ETA WITH PSILI AND PERISPOMENI AND YPOGEGRAMMENI;Ll;0;L;1F26 0345;;;;N;;;1F9E;;1F9E +1F97;GREEK SMALL LETTER ETA WITH DASIA AND PERISPOMENI AND YPOGEGRAMMENI;Ll;0;L;1F27 0345;;;;N;;;1F9F;;1F9F +1F98;GREEK CAPITAL LETTER ETA WITH PSILI AND PROSGEGRAMMENI;Lt;0;L;1F28 0345;;;;N;;;;1F90; +1F99;GREEK CAPITAL LETTER ETA WITH DASIA AND PROSGEGRAMMENI;Lt;0;L;1F29 0345;;;;N;;;;1F91; +1F9A;GREEK CAPITAL LETTER ETA WITH PSILI AND VARIA AND PROSGEGRAMMENI;Lt;0;L;1F2A 0345;;;;N;;;;1F92; +1F9B;GREEK CAPITAL LETTER ETA WITH DASIA AND VARIA AND PROSGEGRAMMENI;Lt;0;L;1F2B 0345;;;;N;;;;1F93; +1F9C;GREEK CAPITAL LETTER ETA WITH PSILI AND OXIA AND PROSGEGRAMMENI;Lt;0;L;1F2C 0345;;;;N;;;;1F94; +1F9D;GREEK CAPITAL LETTER ETA WITH DASIA AND OXIA AND PROSGEGRAMMENI;Lt;0;L;1F2D 0345;;;;N;;;;1F95; +1F9E;GREEK CAPITAL LETTER ETA WITH PSILI AND PERISPOMENI AND PROSGEGRAMMENI;Lt;0;L;1F2E 0345;;;;N;;;;1F96; +1F9F;GREEK CAPITAL LETTER ETA WITH DASIA AND PERISPOMENI AND PROSGEGRAMMENI;Lt;0;L;1F2F 0345;;;;N;;;;1F97; +1FA0;GREEK SMALL LETTER OMEGA WITH PSILI AND YPOGEGRAMMENI;Ll;0;L;1F60 0345;;;;N;;;1FA8;;1FA8 +1FA1;GREEK SMALL LETTER OMEGA WITH DASIA AND YPOGEGRAMMENI;Ll;0;L;1F61 0345;;;;N;;;1FA9;;1FA9 +1FA2;GREEK SMALL LETTER OMEGA WITH PSILI AND VARIA AND YPOGEGRAMMENI;Ll;0;L;1F62 0345;;;;N;;;1FAA;;1FAA +1FA3;GREEK SMALL LETTER OMEGA WITH DASIA AND VARIA AND YPOGEGRAMMENI;Ll;0;L;1F63 0345;;;;N;;;1FAB;;1FAB +1FA4;GREEK SMALL LETTER OMEGA WITH PSILI AND OXIA AND YPOGEGRAMMENI;Ll;0;L;1F64 0345;;;;N;;;1FAC;;1FAC +1FA5;GREEK SMALL LETTER OMEGA WITH DASIA AND OXIA AND YPOGEGRAMMENI;Ll;0;L;1F65 0345;;;;N;;;1FAD;;1FAD +1FA6;GREEK SMALL LETTER OMEGA WITH PSILI AND PERISPOMENI AND YPOGEGRAMMENI;Ll;0;L;1F66 0345;;;;N;;;1FAE;;1FAE +1FA7;GREEK SMALL LETTER OMEGA WITH DASIA AND PERISPOMENI AND YPOGEGRAMMENI;Ll;0;L;1F67 0345;;;;N;;;1FAF;;1FAF +1FA8;GREEK CAPITAL LETTER OMEGA WITH PSILI AND PROSGEGRAMMENI;Lt;0;L;1F68 0345;;;;N;;;;1FA0; +1FA9;GREEK CAPITAL LETTER OMEGA WITH DASIA AND PROSGEGRAMMENI;Lt;0;L;1F69 0345;;;;N;;;;1FA1; +1FAA;GREEK CAPITAL LETTER OMEGA WITH PSILI AND VARIA AND PROSGEGRAMMENI;Lt;0;L;1F6A 0345;;;;N;;;;1FA2; +1FAB;GREEK CAPITAL LETTER OMEGA WITH DASIA AND VARIA AND PROSGEGRAMMENI;Lt;0;L;1F6B 0345;;;;N;;;;1FA3; +1FAC;GREEK CAPITAL LETTER OMEGA WITH PSILI AND OXIA AND PROSGEGRAMMENI;Lt;0;L;1F6C 0345;;;;N;;;;1FA4; +1FAD;GREEK CAPITAL LETTER OMEGA WITH DASIA AND OXIA AND PROSGEGRAMMENI;Lt;0;L;1F6D 0345;;;;N;;;;1FA5; +1FAE;GREEK CAPITAL LETTER OMEGA WITH PSILI AND PERISPOMENI AND PROSGEGRAMMENI;Lt;0;L;1F6E 0345;;;;N;;;;1FA6; +1FAF;GREEK CAPITAL LETTER OMEGA WITH DASIA AND PERISPOMENI AND PROSGEGRAMMENI;Lt;0;L;1F6F 0345;;;;N;;;;1FA7; +1FB0;GREEK SMALL LETTER ALPHA WITH VRACHY;Ll;0;L;03B1 0306;;;;N;;;1FB8;;1FB8 +1FB1;GREEK SMALL LETTER ALPHA WITH MACRON;Ll;0;L;03B1 0304;;;;N;;;1FB9;;1FB9 +1FB2;GREEK SMALL LETTER ALPHA WITH VARIA AND YPOGEGRAMMENI;Ll;0;L;1F70 0345;;;;N;;;;; +1FB3;GREEK SMALL LETTER ALPHA WITH YPOGEGRAMMENI;Ll;0;L;03B1 0345;;;;N;;;1FBC;;1FBC +1FB4;GREEK SMALL LETTER ALPHA WITH OXIA AND YPOGEGRAMMENI;Ll;0;L;03AC 0345;;;;N;;;;; +1FB6;GREEK SMALL LETTER ALPHA WITH PERISPOMENI;Ll;0;L;03B1 0342;;;;N;;;;; +1FB7;GREEK SMALL LETTER ALPHA WITH PERISPOMENI AND YPOGEGRAMMENI;Ll;0;L;1FB6 0345;;;;N;;;;; +1FB8;GREEK CAPITAL LETTER ALPHA WITH VRACHY;Lu;0;L;0391 0306;;;;N;;;;1FB0; +1FB9;GREEK CAPITAL LETTER ALPHA WITH MACRON;Lu;0;L;0391 0304;;;;N;;;;1FB1; +1FBA;GREEK CAPITAL LETTER ALPHA WITH VARIA;Lu;0;L;0391 0300;;;;N;;;;1F70; +1FBB;GREEK CAPITAL LETTER ALPHA WITH OXIA;Lu;0;L;0386;;;;N;;;;1F71; +1FBC;GREEK CAPITAL LETTER ALPHA WITH PROSGEGRAMMENI;Lt;0;L;0391 0345;;;;N;;;;1FB3; +1FBD;GREEK KORONIS;Sk;0;ON; 0020 0313;;;;N;;;;; +1FBE;GREEK PROSGEGRAMMENI;Ll;0;L;03B9;;;;N;;;0399;;0399 +1FBF;GREEK PSILI;Sk;0;ON; 0020 0313;;;;N;;;;; +1FC0;GREEK PERISPOMENI;Sk;0;ON; 0020 0342;;;;N;;;;; +1FC1;GREEK DIALYTIKA AND PERISPOMENI;Sk;0;ON;00A8 0342;;;;N;;;;; +1FC2;GREEK SMALL LETTER ETA WITH VARIA AND YPOGEGRAMMENI;Ll;0;L;1F74 0345;;;;N;;;;; +1FC3;GREEK SMALL LETTER ETA WITH YPOGEGRAMMENI;Ll;0;L;03B7 0345;;;;N;;;1FCC;;1FCC +1FC4;GREEK SMALL LETTER ETA WITH OXIA AND YPOGEGRAMMENI;Ll;0;L;03AE 0345;;;;N;;;;; +1FC6;GREEK SMALL LETTER ETA WITH PERISPOMENI;Ll;0;L;03B7 0342;;;;N;;;;; +1FC7;GREEK SMALL LETTER ETA WITH PERISPOMENI AND YPOGEGRAMMENI;Ll;0;L;1FC6 0345;;;;N;;;;; +1FC8;GREEK CAPITAL LETTER EPSILON WITH VARIA;Lu;0;L;0395 0300;;;;N;;;;1F72; +1FC9;GREEK CAPITAL LETTER EPSILON WITH OXIA;Lu;0;L;0388;;;;N;;;;1F73; +1FCA;GREEK CAPITAL LETTER ETA WITH VARIA;Lu;0;L;0397 0300;;;;N;;;;1F74; +1FCB;GREEK CAPITAL LETTER ETA WITH OXIA;Lu;0;L;0389;;;;N;;;;1F75; +1FCC;GREEK CAPITAL LETTER ETA WITH PROSGEGRAMMENI;Lt;0;L;0397 0345;;;;N;;;;1FC3; +1FCD;GREEK PSILI AND VARIA;Sk;0;ON;1FBF 0300;;;;N;;;;; +1FCE;GREEK PSILI AND OXIA;Sk;0;ON;1FBF 0301;;;;N;;;;; +1FCF;GREEK PSILI AND PERISPOMENI;Sk;0;ON;1FBF 0342;;;;N;;;;; +1FD0;GREEK SMALL LETTER IOTA WITH VRACHY;Ll;0;L;03B9 0306;;;;N;;;1FD8;;1FD8 +1FD1;GREEK SMALL LETTER IOTA WITH MACRON;Ll;0;L;03B9 0304;;;;N;;;1FD9;;1FD9 +1FD2;GREEK SMALL LETTER IOTA WITH DIALYTIKA AND VARIA;Ll;0;L;03CA 0300;;;;N;;;;; +1FD3;GREEK SMALL LETTER IOTA WITH DIALYTIKA AND OXIA;Ll;0;L;0390;;;;N;;;;; +1FD6;GREEK SMALL LETTER IOTA WITH PERISPOMENI;Ll;0;L;03B9 0342;;;;N;;;;; +1FD7;GREEK SMALL LETTER IOTA WITH DIALYTIKA AND PERISPOMENI;Ll;0;L;03CA 0342;;;;N;;;;; +1FD8;GREEK CAPITAL LETTER IOTA WITH VRACHY;Lu;0;L;0399 0306;;;;N;;;;1FD0; +1FD9;GREEK CAPITAL LETTER IOTA WITH MACRON;Lu;0;L;0399 0304;;;;N;;;;1FD1; +1FDA;GREEK CAPITAL LETTER IOTA WITH VARIA;Lu;0;L;0399 0300;;;;N;;;;1F76; +1FDB;GREEK CAPITAL LETTER IOTA WITH OXIA;Lu;0;L;038A;;;;N;;;;1F77; +1FDD;GREEK DASIA AND VARIA;Sk;0;ON;1FFE 0300;;;;N;;;;; +1FDE;GREEK DASIA AND OXIA;Sk;0;ON;1FFE 0301;;;;N;;;;; +1FDF;GREEK DASIA AND PERISPOMENI;Sk;0;ON;1FFE 0342;;;;N;;;;; +1FE0;GREEK SMALL LETTER UPSILON WITH VRACHY;Ll;0;L;03C5 0306;;;;N;;;1FE8;;1FE8 +1FE1;GREEK SMALL LETTER UPSILON WITH MACRON;Ll;0;L;03C5 0304;;;;N;;;1FE9;;1FE9 +1FE2;GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND VARIA;Ll;0;L;03CB 0300;;;;N;;;;; +1FE3;GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND OXIA;Ll;0;L;03B0;;;;N;;;;; +1FE4;GREEK SMALL LETTER RHO WITH PSILI;Ll;0;L;03C1 0313;;;;N;;;;; +1FE5;GREEK SMALL LETTER RHO WITH DASIA;Ll;0;L;03C1 0314;;;;N;;;1FEC;;1FEC +1FE6;GREEK SMALL LETTER UPSILON WITH PERISPOMENI;Ll;0;L;03C5 0342;;;;N;;;;; +1FE7;GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND PERISPOMENI;Ll;0;L;03CB 0342;;;;N;;;;; +1FE8;GREEK CAPITAL LETTER UPSILON WITH VRACHY;Lu;0;L;03A5 0306;;;;N;;;;1FE0; +1FE9;GREEK CAPITAL LETTER UPSILON WITH MACRON;Lu;0;L;03A5 0304;;;;N;;;;1FE1; +1FEA;GREEK CAPITAL LETTER UPSILON WITH VARIA;Lu;0;L;03A5 0300;;;;N;;;;1F7A; +1FEB;GREEK CAPITAL LETTER UPSILON WITH OXIA;Lu;0;L;038E;;;;N;;;;1F7B; +1FEC;GREEK CAPITAL LETTER RHO WITH DASIA;Lu;0;L;03A1 0314;;;;N;;;;1FE5; +1FED;GREEK DIALYTIKA AND VARIA;Sk;0;ON;00A8 0300;;;;N;;;;; +1FEE;GREEK DIALYTIKA AND OXIA;Sk;0;ON;0385;;;;N;;;;; +1FEF;GREEK VARIA;Sk;0;ON;0060;;;;N;;;;; +1FF2;GREEK SMALL LETTER OMEGA WITH VARIA AND YPOGEGRAMMENI;Ll;0;L;1F7C 0345;;;;N;;;;; +1FF3;GREEK SMALL LETTER OMEGA WITH YPOGEGRAMMENI;Ll;0;L;03C9 0345;;;;N;;;1FFC;;1FFC +1FF4;GREEK SMALL LETTER OMEGA WITH OXIA AND YPOGEGRAMMENI;Ll;0;L;03CE 0345;;;;N;;;;; +1FF6;GREEK SMALL LETTER OMEGA WITH PERISPOMENI;Ll;0;L;03C9 0342;;;;N;;;;; +1FF7;GREEK SMALL LETTER OMEGA WITH PERISPOMENI AND YPOGEGRAMMENI;Ll;0;L;1FF6 0345;;;;N;;;;; +1FF8;GREEK CAPITAL LETTER OMICRON WITH VARIA;Lu;0;L;039F 0300;;;;N;;;;1F78; +1FF9;GREEK CAPITAL LETTER OMICRON WITH OXIA;Lu;0;L;038C;;;;N;;;;1F79; +1FFA;GREEK CAPITAL LETTER OMEGA WITH VARIA;Lu;0;L;03A9 0300;;;;N;;;;1F7C; +1FFB;GREEK CAPITAL LETTER OMEGA WITH OXIA;Lu;0;L;038F;;;;N;;;;1F7D; +1FFC;GREEK CAPITAL LETTER OMEGA WITH PROSGEGRAMMENI;Lt;0;L;03A9 0345;;;;N;;;;1FF3; +1FFD;GREEK OXIA;Sk;0;ON;00B4;;;;N;;;;; +1FFE;GREEK DASIA;Sk;0;ON; 0020 0314;;;;N;;;;; +2000;EN QUAD;Zs;0;WS;2002;;;;N;;;;; +2001;EM QUAD;Zs;0;WS;2003;;;;N;;;;; +2002;EN SPACE;Zs;0;WS; 0020;;;;N;;;;; +2003;EM SPACE;Zs;0;WS; 0020;;;;N;;;;; +2004;THREE-PER-EM SPACE;Zs;0;WS; 0020;;;;N;;;;; +2005;FOUR-PER-EM SPACE;Zs;0;WS; 0020;;;;N;;;;; +2006;SIX-PER-EM SPACE;Zs;0;WS; 0020;;;;N;;;;; +2007;FIGURE SPACE;Zs;0;WS; 0020;;;;N;;;;; +2008;PUNCTUATION SPACE;Zs;0;WS; 0020;;;;N;;;;; +2009;THIN SPACE;Zs;0;WS; 0020;;;;N;;;;; +200A;HAIR SPACE;Zs;0;WS; 0020;;;;N;;;;; +200B;ZERO WIDTH SPACE;Cf;0;BN;;;;;N;;;;; +200C;ZERO WIDTH NON-JOINER;Cf;0;BN;;;;;N;;;;; +200D;ZERO WIDTH JOINER;Cf;0;BN;;;;;N;;;;; +200E;LEFT-TO-RIGHT MARK;Cf;0;L;;;;;N;;;;; +200F;RIGHT-TO-LEFT MARK;Cf;0;R;;;;;N;;;;; +2010;HYPHEN;Pd;0;ON;;;;;N;;;;; +2011;NON-BREAKING HYPHEN;Pd;0;ON; 2010;;;;N;;;;; +2012;FIGURE DASH;Pd;0;ON;;;;;N;;;;; +2013;EN DASH;Pd;0;ON;;;;;N;;;;; +2014;EM DASH;Pd;0;ON;;;;;N;;;;; +2015;HORIZONTAL BAR;Pd;0;ON;;;;;N;QUOTATION DASH;;;; +2016;DOUBLE VERTICAL LINE;Po;0;ON;;;;;N;DOUBLE VERTICAL BAR;;;; +2017;DOUBLE LOW LINE;Po;0;ON; 0020 0333;;;;N;SPACING DOUBLE UNDERSCORE;;;; +2018;LEFT SINGLE QUOTATION MARK;Pi;0;ON;;;;;N;SINGLE TURNED COMMA QUOTATION MARK;;;; +2019;RIGHT SINGLE QUOTATION MARK;Pf;0;ON;;;;;N;SINGLE COMMA QUOTATION MARK;;;; +201A;SINGLE LOW-9 QUOTATION MARK;Ps;0;ON;;;;;N;LOW SINGLE COMMA QUOTATION MARK;;;; +201B;SINGLE HIGH-REVERSED-9 QUOTATION MARK;Pi;0;ON;;;;;N;SINGLE REVERSED COMMA QUOTATION MARK;;;; +201C;LEFT DOUBLE QUOTATION MARK;Pi;0;ON;;;;;N;DOUBLE TURNED COMMA QUOTATION MARK;;;; +201D;RIGHT DOUBLE QUOTATION MARK;Pf;0;ON;;;;;N;DOUBLE COMMA QUOTATION MARK;;;; +201E;DOUBLE LOW-9 QUOTATION MARK;Ps;0;ON;;;;;N;LOW DOUBLE COMMA QUOTATION MARK;;;; +201F;DOUBLE HIGH-REVERSED-9 QUOTATION MARK;Pi;0;ON;;;;;N;DOUBLE REVERSED COMMA QUOTATION MARK;;;; +2020;DAGGER;Po;0;ON;;;;;N;;;;; +2021;DOUBLE DAGGER;Po;0;ON;;;;;N;;;;; +2022;BULLET;Po;0;ON;;;;;N;;;;; +2023;TRIANGULAR BULLET;Po;0;ON;;;;;N;;;;; +2024;ONE DOT LEADER;Po;0;ON; 002E;;;;N;;;;; +2025;TWO DOT LEADER;Po;0;ON; 002E 002E;;;;N;;;;; +2026;HORIZONTAL ELLIPSIS;Po;0;ON; 002E 002E 002E;;;;N;;;;; +2027;HYPHENATION POINT;Po;0;ON;;;;;N;;;;; +2028;LINE SEPARATOR;Zl;0;WS;;;;;N;;;;; +2029;PARAGRAPH SEPARATOR;Zp;0;B;;;;;N;;;;; +202A;LEFT-TO-RIGHT EMBEDDING;Cf;0;LRE;;;;;N;;;;; +202B;RIGHT-TO-LEFT EMBEDDING;Cf;0;RLE;;;;;N;;;;; +202C;POP DIRECTIONAL FORMATTING;Cf;0;PDF;;;;;N;;;;; +202D;LEFT-TO-RIGHT OVERRIDE;Cf;0;LRO;;;;;N;;;;; +202E;RIGHT-TO-LEFT OVERRIDE;Cf;0;RLO;;;;;N;;;;; +202F;NARROW NO-BREAK SPACE;Zs;0;CS; 0020;;;;N;;;;; +2030;PER MILLE SIGN;Po;0;ET;;;;;N;;;;; +2031;PER TEN THOUSAND SIGN;Po;0;ET;;;;;N;;;;; +2032;PRIME;Po;0;ET;;;;;N;;;;; +2033;DOUBLE PRIME;Po;0;ET; 2032 2032;;;;N;;;;; +2034;TRIPLE PRIME;Po;0;ET; 2032 2032 2032;;;;N;;;;; +2035;REVERSED PRIME;Po;0;ON;;;;;N;;;;; +2036;REVERSED DOUBLE PRIME;Po;0;ON; 2035 2035;;;;N;;;;; +2037;REVERSED TRIPLE PRIME;Po;0;ON; 2035 2035 2035;;;;N;;;;; +2038;CARET;Po;0;ON;;;;;N;;;;; +2039;SINGLE LEFT-POINTING ANGLE QUOTATION MARK;Pi;0;ON;;;;;Y;LEFT POINTING SINGLE GUILLEMET;;;; +203A;SINGLE RIGHT-POINTING ANGLE QUOTATION MARK;Pf;0;ON;;;;;Y;RIGHT POINTING SINGLE GUILLEMET;;;; +203B;REFERENCE MARK;Po;0;ON;;;;;N;;;;; +203C;DOUBLE EXCLAMATION MARK;Po;0;ON; 0021 0021;;;;N;;;;; +203D;INTERROBANG;Po;0;ON;;;;;N;;;;; +203E;OVERLINE;Po;0;ON; 0020 0305;;;;N;SPACING OVERSCORE;;;; +203F;UNDERTIE;Pc;0;ON;;;;;N;;;;; +2040;CHARACTER TIE;Pc;0;ON;;;;;N;;;;; +2041;CARET INSERTION POINT;Po;0;ON;;;;;N;;;;; +2042;ASTERISM;Po;0;ON;;;;;N;;;;; +2043;HYPHEN BULLET;Po;0;ON;;;;;N;;;;; +2044;FRACTION SLASH;Sm;0;CS;;;;;N;;;;; +2045;LEFT SQUARE BRACKET WITH QUILL;Ps;0;ON;;;;;Y;;;;; +2046;RIGHT SQUARE BRACKET WITH QUILL;Pe;0;ON;;;;;Y;;;;; +2047;DOUBLE QUESTION MARK;Po;0;ON; 003F 003F;;;;N;;;;; +2048;QUESTION EXCLAMATION MARK;Po;0;ON; 003F 0021;;;;N;;;;; +2049;EXCLAMATION QUESTION MARK;Po;0;ON; 0021 003F;;;;N;;;;; +204A;TIRONIAN SIGN ET;Po;0;ON;;;;;N;;;;; +204B;REVERSED PILCROW SIGN;Po;0;ON;;;;;N;;;;; +204C;BLACK LEFTWARDS BULLET;Po;0;ON;;;;;N;;;;; +204D;BLACK RIGHTWARDS BULLET;Po;0;ON;;;;;N;;;;; +204E;LOW ASTERISK;Po;0;ON;;;;;N;;;;; +204F;REVERSED SEMICOLON;Po;0;ON;;;;;N;;;;; +2050;CLOSE UP;Po;0;ON;;;;;N;;;;; +2051;TWO ASTERISKS ALIGNED VERTICALLY;Po;0;ON;;;;;N;;;;; +2052;COMMERCIAL MINUS SIGN;Sm;0;ON;;;;;N;;;;; +2053;SWUNG DASH;Po;0;ON;;;;;N;;;;; +2054;INVERTED UNDERTIE;Pc;0;ON;;;;;N;;;;; +2055;FLOWER PUNCTUATION MARK;Po;0;ON;;;;;N;;;;; +2056;THREE DOT PUNCTUATION;Po;0;ON;;;;;N;;;;; +2057;QUADRUPLE PRIME;Po;0;ON; 2032 2032 2032 2032;;;;N;;;;; +2058;FOUR DOT PUNCTUATION;Po;0;ON;;;;;N;;;;; +2059;FIVE DOT PUNCTUATION;Po;0;ON;;;;;N;;;;; +205A;TWO DOT PUNCTUATION;Po;0;ON;;;;;N;;;;; +205B;FOUR DOT MARK;Po;0;ON;;;;;N;;;;; +205C;DOTTED CROSS;Po;0;ON;;;;;N;;;;; +205D;TRICOLON;Po;0;ON;;;;;N;;;;; +205E;VERTICAL FOUR DOTS;Po;0;ON;;;;;N;;;;; +205F;MEDIUM MATHEMATICAL SPACE;Zs;0;WS; 0020;;;;N;;;;; +2060;WORD JOINER;Cf;0;BN;;;;;N;;;;; +2061;FUNCTION APPLICATION;Cf;0;BN;;;;;N;;;;; +2062;INVISIBLE TIMES;Cf;0;BN;;;;;N;;;;; +2063;INVISIBLE SEPARATOR;Cf;0;BN;;;;;N;;;;; +2064;INVISIBLE PLUS;Cf;0;BN;;;;;N;;;;; +2066;LEFT-TO-RIGHT ISOLATE;Cf;0;LRI;;;;;N;;;;; +2067;RIGHT-TO-LEFT ISOLATE;Cf;0;RLI;;;;;N;;;;; +2068;FIRST STRONG ISOLATE;Cf;0;FSI;;;;;N;;;;; +2069;POP DIRECTIONAL ISOLATE;Cf;0;PDI;;;;;N;;;;; +206A;INHIBIT SYMMETRIC SWAPPING;Cf;0;BN;;;;;N;;;;; +206B;ACTIVATE SYMMETRIC SWAPPING;Cf;0;BN;;;;;N;;;;; +206C;INHIBIT ARABIC FORM SHAPING;Cf;0;BN;;;;;N;;;;; +206D;ACTIVATE ARABIC FORM SHAPING;Cf;0;BN;;;;;N;;;;; +206E;NATIONAL DIGIT SHAPES;Cf;0;BN;;;;;N;;;;; +206F;NOMINAL DIGIT SHAPES;Cf;0;BN;;;;;N;;;;; +2070;SUPERSCRIPT ZERO;No;0;EN; 0030;;0;0;N;SUPERSCRIPT DIGIT ZERO;;;; +2071;SUPERSCRIPT LATIN SMALL LETTER I;Lm;0;L; 0069;;;;N;;;;; +2074;SUPERSCRIPT FOUR;No;0;EN; 0034;;4;4;N;SUPERSCRIPT DIGIT FOUR;;;; +2075;SUPERSCRIPT FIVE;No;0;EN; 0035;;5;5;N;SUPERSCRIPT DIGIT FIVE;;;; +2076;SUPERSCRIPT SIX;No;0;EN; 0036;;6;6;N;SUPERSCRIPT DIGIT SIX;;;; +2077;SUPERSCRIPT SEVEN;No;0;EN; 0037;;7;7;N;SUPERSCRIPT DIGIT SEVEN;;;; +2078;SUPERSCRIPT EIGHT;No;0;EN; 0038;;8;8;N;SUPERSCRIPT DIGIT EIGHT;;;; +2079;SUPERSCRIPT NINE;No;0;EN; 0039;;9;9;N;SUPERSCRIPT DIGIT NINE;;;; +207A;SUPERSCRIPT PLUS SIGN;Sm;0;ES; 002B;;;;N;;;;; +207B;SUPERSCRIPT MINUS;Sm;0;ES; 2212;;;;N;SUPERSCRIPT HYPHEN-MINUS;;;; +207C;SUPERSCRIPT EQUALS SIGN;Sm;0;ON; 003D;;;;N;;;;; +207D;SUPERSCRIPT LEFT PARENTHESIS;Ps;0;ON; 0028;;;;Y;SUPERSCRIPT OPENING PARENTHESIS;;;; +207E;SUPERSCRIPT RIGHT PARENTHESIS;Pe;0;ON; 0029;;;;Y;SUPERSCRIPT CLOSING PARENTHESIS;;;; +207F;SUPERSCRIPT LATIN SMALL LETTER N;Lm;0;L; 006E;;;;N;;;;; +2080;SUBSCRIPT ZERO;No;0;EN; 0030;;0;0;N;SUBSCRIPT DIGIT ZERO;;;; +2081;SUBSCRIPT ONE;No;0;EN; 0031;;1;1;N;SUBSCRIPT DIGIT ONE;;;; +2082;SUBSCRIPT TWO;No;0;EN; 0032;;2;2;N;SUBSCRIPT DIGIT TWO;;;; +2083;SUBSCRIPT THREE;No;0;EN; 0033;;3;3;N;SUBSCRIPT DIGIT THREE;;;; +2084;SUBSCRIPT FOUR;No;0;EN; 0034;;4;4;N;SUBSCRIPT DIGIT FOUR;;;; +2085;SUBSCRIPT FIVE;No;0;EN; 0035;;5;5;N;SUBSCRIPT DIGIT FIVE;;;; +2086;SUBSCRIPT SIX;No;0;EN; 0036;;6;6;N;SUBSCRIPT DIGIT SIX;;;; +2087;SUBSCRIPT SEVEN;No;0;EN; 0037;;7;7;N;SUBSCRIPT DIGIT SEVEN;;;; +2088;SUBSCRIPT EIGHT;No;0;EN; 0038;;8;8;N;SUBSCRIPT DIGIT EIGHT;;;; +2089;SUBSCRIPT NINE;No;0;EN; 0039;;9;9;N;SUBSCRIPT DIGIT NINE;;;; +208A;SUBSCRIPT PLUS SIGN;Sm;0;ES; 002B;;;;N;;;;; +208B;SUBSCRIPT MINUS;Sm;0;ES; 2212;;;;N;SUBSCRIPT HYPHEN-MINUS;;;; +208C;SUBSCRIPT EQUALS SIGN;Sm;0;ON; 003D;;;;N;;;;; +208D;SUBSCRIPT LEFT PARENTHESIS;Ps;0;ON; 0028;;;;Y;SUBSCRIPT OPENING PARENTHESIS;;;; +208E;SUBSCRIPT RIGHT PARENTHESIS;Pe;0;ON; 0029;;;;Y;SUBSCRIPT CLOSING PARENTHESIS;;;; +2090;LATIN SUBSCRIPT SMALL LETTER A;Lm;0;L; 0061;;;;N;;;;; +2091;LATIN SUBSCRIPT SMALL LETTER E;Lm;0;L; 0065;;;;N;;;;; +2092;LATIN SUBSCRIPT SMALL LETTER O;Lm;0;L; 006F;;;;N;;;;; +2093;LATIN SUBSCRIPT SMALL LETTER X;Lm;0;L; 0078;;;;N;;;;; +2094;LATIN SUBSCRIPT SMALL LETTER SCHWA;Lm;0;L; 0259;;;;N;;;;; +2095;LATIN SUBSCRIPT SMALL LETTER H;Lm;0;L; 0068;;;;N;;;;; +2096;LATIN SUBSCRIPT SMALL LETTER K;Lm;0;L; 006B;;;;N;;;;; +2097;LATIN SUBSCRIPT SMALL LETTER L;Lm;0;L; 006C;;;;N;;;;; +2098;LATIN SUBSCRIPT SMALL LETTER M;Lm;0;L; 006D;;;;N;;;;; +2099;LATIN SUBSCRIPT SMALL LETTER N;Lm;0;L; 006E;;;;N;;;;; +209A;LATIN SUBSCRIPT SMALL LETTER P;Lm;0;L; 0070;;;;N;;;;; +209B;LATIN SUBSCRIPT SMALL LETTER S;Lm;0;L; 0073;;;;N;;;;; +209C;LATIN SUBSCRIPT SMALL LETTER T;Lm;0;L; 0074;;;;N;;;;; +20A0;EURO-CURRENCY SIGN;Sc;0;ET;;;;;N;;;;; +20A1;COLON SIGN;Sc;0;ET;;;;;N;;;;; +20A2;CRUZEIRO SIGN;Sc;0;ET;;;;;N;;;;; +20A3;FRENCH FRANC SIGN;Sc;0;ET;;;;;N;;;;; +20A4;LIRA SIGN;Sc;0;ET;;;;;N;;;;; +20A5;MILL SIGN;Sc;0;ET;;;;;N;;;;; +20A6;NAIRA SIGN;Sc;0;ET;;;;;N;;;;; +20A7;PESETA SIGN;Sc;0;ET;;;;;N;;;;; +20A8;RUPEE SIGN;Sc;0;ET; 0052 0073;;;;N;;;;; +20A9;WON SIGN;Sc;0;ET;;;;;N;;;;; +20AA;NEW SHEQEL SIGN;Sc;0;ET;;;;;N;;;;; +20AB;DONG SIGN;Sc;0;ET;;;;;N;;;;; +20AC;EURO SIGN;Sc;0;ET;;;;;N;;;;; +20AD;KIP SIGN;Sc;0;ET;;;;;N;;;;; +20AE;TUGRIK SIGN;Sc;0;ET;;;;;N;;;;; +20AF;DRACHMA SIGN;Sc;0;ET;;;;;N;;;;; +20B0;GERMAN PENNY SIGN;Sc;0;ET;;;;;N;;;;; +20B1;PESO SIGN;Sc;0;ET;;;;;N;;;;; +20B2;GUARANI SIGN;Sc;0;ET;;;;;N;;;;; +20B3;AUSTRAL SIGN;Sc;0;ET;;;;;N;;;;; +20B4;HRYVNIA SIGN;Sc;0;ET;;;;;N;;;;; +20B5;CEDI SIGN;Sc;0;ET;;;;;N;;;;; +20B6;LIVRE TOURNOIS SIGN;Sc;0;ET;;;;;N;;;;; +20B7;SPESMILO SIGN;Sc;0;ET;;;;;N;;;;; +20B8;TENGE SIGN;Sc;0;ET;;;;;N;;;;; +20B9;INDIAN RUPEE SIGN;Sc;0;ET;;;;;N;;;;; +20BA;TURKISH LIRA SIGN;Sc;0;ET;;;;;N;;;;; +20BB;NORDIC MARK SIGN;Sc;0;ET;;;;;N;;;;; +20BC;MANAT SIGN;Sc;0;ET;;;;;N;;;;; +20BD;RUBLE SIGN;Sc;0;ET;;;;;N;;;;; +20BE;LARI SIGN;Sc;0;ET;;;;;N;;;;; +20BF;BITCOIN SIGN;Sc;0;ET;;;;;N;;;;; +20D0;COMBINING LEFT HARPOON ABOVE;Mn;230;NSM;;;;;N;NON-SPACING LEFT HARPOON ABOVE;;;; +20D1;COMBINING RIGHT HARPOON ABOVE;Mn;230;NSM;;;;;N;NON-SPACING RIGHT HARPOON ABOVE;;;; +20D2;COMBINING LONG VERTICAL LINE OVERLAY;Mn;1;NSM;;;;;N;NON-SPACING LONG VERTICAL BAR OVERLAY;;;; +20D3;COMBINING SHORT VERTICAL LINE OVERLAY;Mn;1;NSM;;;;;N;NON-SPACING SHORT VERTICAL BAR OVERLAY;;;; +20D4;COMBINING ANTICLOCKWISE ARROW ABOVE;Mn;230;NSM;;;;;N;NON-SPACING ANTICLOCKWISE ARROW ABOVE;;;; +20D5;COMBINING CLOCKWISE ARROW ABOVE;Mn;230;NSM;;;;;N;NON-SPACING CLOCKWISE ARROW ABOVE;;;; +20D6;COMBINING LEFT ARROW ABOVE;Mn;230;NSM;;;;;N;NON-SPACING LEFT ARROW ABOVE;;;; +20D7;COMBINING RIGHT ARROW ABOVE;Mn;230;NSM;;;;;N;NON-SPACING RIGHT ARROW ABOVE;;;; +20D8;COMBINING RING OVERLAY;Mn;1;NSM;;;;;N;NON-SPACING RING OVERLAY;;;; +20D9;COMBINING CLOCKWISE RING OVERLAY;Mn;1;NSM;;;;;N;NON-SPACING CLOCKWISE RING OVERLAY;;;; +20DA;COMBINING ANTICLOCKWISE RING OVERLAY;Mn;1;NSM;;;;;N;NON-SPACING ANTICLOCKWISE RING OVERLAY;;;; +20DB;COMBINING THREE DOTS ABOVE;Mn;230;NSM;;;;;N;NON-SPACING THREE DOTS ABOVE;;;; +20DC;COMBINING FOUR DOTS ABOVE;Mn;230;NSM;;;;;N;NON-SPACING FOUR DOTS ABOVE;;;; +20DD;COMBINING ENCLOSING CIRCLE;Me;0;NSM;;;;;N;ENCLOSING CIRCLE;;;; +20DE;COMBINING ENCLOSING SQUARE;Me;0;NSM;;;;;N;ENCLOSING SQUARE;;;; +20DF;COMBINING ENCLOSING DIAMOND;Me;0;NSM;;;;;N;ENCLOSING DIAMOND;;;; +20E0;COMBINING ENCLOSING CIRCLE BACKSLASH;Me;0;NSM;;;;;N;ENCLOSING CIRCLE SLASH;;;; +20E1;COMBINING LEFT RIGHT ARROW ABOVE;Mn;230;NSM;;;;;N;NON-SPACING LEFT RIGHT ARROW ABOVE;;;; +20E2;COMBINING ENCLOSING SCREEN;Me;0;NSM;;;;;N;;;;; +20E3;COMBINING ENCLOSING KEYCAP;Me;0;NSM;;;;;N;;;;; +20E4;COMBINING ENCLOSING UPWARD POINTING TRIANGLE;Me;0;NSM;;;;;N;;;;; +20E5;COMBINING REVERSE SOLIDUS OVERLAY;Mn;1;NSM;;;;;N;;;;; +20E6;COMBINING DOUBLE VERTICAL STROKE OVERLAY;Mn;1;NSM;;;;;N;;;;; +20E7;COMBINING ANNUITY SYMBOL;Mn;230;NSM;;;;;N;;;;; +20E8;COMBINING TRIPLE UNDERDOT;Mn;220;NSM;;;;;N;;;;; +20E9;COMBINING WIDE BRIDGE ABOVE;Mn;230;NSM;;;;;N;;;;; +20EA;COMBINING LEFTWARDS ARROW OVERLAY;Mn;1;NSM;;;;;N;;;;; +20EB;COMBINING LONG DOUBLE SOLIDUS OVERLAY;Mn;1;NSM;;;;;N;;;;; +20EC;COMBINING RIGHTWARDS HARPOON WITH BARB DOWNWARDS;Mn;220;NSM;;;;;N;;;;; +20ED;COMBINING LEFTWARDS HARPOON WITH BARB DOWNWARDS;Mn;220;NSM;;;;;N;;;;; +20EE;COMBINING LEFT ARROW BELOW;Mn;220;NSM;;;;;N;;;;; +20EF;COMBINING RIGHT ARROW BELOW;Mn;220;NSM;;;;;N;;;;; +20F0;COMBINING ASTERISK ABOVE;Mn;230;NSM;;;;;N;;;;; +2100;ACCOUNT OF;So;0;ON; 0061 002F 0063;;;;N;;;;; +2101;ADDRESSED TO THE SUBJECT;So;0;ON; 0061 002F 0073;;;;N;;;;; +2102;DOUBLE-STRUCK CAPITAL C;Lu;0;L; 0043;;;;N;DOUBLE-STRUCK C;;;; +2103;DEGREE CELSIUS;So;0;ON; 00B0 0043;;;;N;DEGREES CENTIGRADE;;;; +2104;CENTRE LINE SYMBOL;So;0;ON;;;;;N;C L SYMBOL;;;; +2105;CARE OF;So;0;ON; 0063 002F 006F;;;;N;;;;; +2106;CADA UNA;So;0;ON; 0063 002F 0075;;;;N;;;;; +2107;EULER CONSTANT;Lu;0;L; 0190;;;;N;EULERS;;;; +2108;SCRUPLE;So;0;ON;;;;;N;;;;; +2109;DEGREE FAHRENHEIT;So;0;ON; 00B0 0046;;;;N;DEGREES FAHRENHEIT;;;; +210A;SCRIPT SMALL G;Ll;0;L; 0067;;;;N;;;;; +210B;SCRIPT CAPITAL H;Lu;0;L; 0048;;;;N;SCRIPT H;;;; +210C;BLACK-LETTER CAPITAL H;Lu;0;L; 0048;;;;N;BLACK-LETTER H;;;; +210D;DOUBLE-STRUCK CAPITAL H;Lu;0;L; 0048;;;;N;DOUBLE-STRUCK H;;;; +210E;PLANCK CONSTANT;Ll;0;L; 0068;;;;N;;;;; +210F;PLANCK CONSTANT OVER TWO PI;Ll;0;L; 0127;;;;N;PLANCK CONSTANT OVER 2 PI;;;; +2110;SCRIPT CAPITAL I;Lu;0;L; 0049;;;;N;SCRIPT I;;;; +2111;BLACK-LETTER CAPITAL I;Lu;0;L; 0049;;;;N;BLACK-LETTER I;;;; +2112;SCRIPT CAPITAL L;Lu;0;L; 004C;;;;N;SCRIPT L;;;; +2113;SCRIPT SMALL L;Ll;0;L; 006C;;;;N;;;;; +2114;L B BAR SYMBOL;So;0;ON;;;;;N;;;;; +2115;DOUBLE-STRUCK CAPITAL N;Lu;0;L; 004E;;;;N;DOUBLE-STRUCK N;;;; +2116;NUMERO SIGN;So;0;ON; 004E 006F;;;;N;NUMERO;;;; +2117;SOUND RECORDING COPYRIGHT;So;0;ON;;;;;N;;;;; +2118;SCRIPT CAPITAL P;Sm;0;ON;;;;;N;SCRIPT P;;;; +2119;DOUBLE-STRUCK CAPITAL P;Lu;0;L; 0050;;;;N;DOUBLE-STRUCK P;;;; +211A;DOUBLE-STRUCK CAPITAL Q;Lu;0;L; 0051;;;;N;DOUBLE-STRUCK Q;;;; +211B;SCRIPT CAPITAL R;Lu;0;L; 0052;;;;N;SCRIPT R;;;; +211C;BLACK-LETTER CAPITAL R;Lu;0;L; 0052;;;;N;BLACK-LETTER R;;;; +211D;DOUBLE-STRUCK CAPITAL R;Lu;0;L; 0052;;;;N;DOUBLE-STRUCK R;;;; +211E;PRESCRIPTION TAKE;So;0;ON;;;;;N;;;;; +211F;RESPONSE;So;0;ON;;;;;N;;;;; +2120;SERVICE MARK;So;0;ON; 0053 004D;;;;N;;;;; +2121;TELEPHONE SIGN;So;0;ON; 0054 0045 004C;;;;N;T E L SYMBOL;;;; +2122;TRADE MARK SIGN;So;0;ON; 0054 004D;;;;N;TRADEMARK;;;; +2123;VERSICLE;So;0;ON;;;;;N;;;;; +2124;DOUBLE-STRUCK CAPITAL Z;Lu;0;L; 005A;;;;N;DOUBLE-STRUCK Z;;;; +2125;OUNCE SIGN;So;0;ON;;;;;N;OUNCE;;;; +2126;OHM SIGN;Lu;0;L;03A9;;;;N;OHM;;;03C9; +2127;INVERTED OHM SIGN;So;0;ON;;;;;N;MHO;;;; +2128;BLACK-LETTER CAPITAL Z;Lu;0;L; 005A;;;;N;BLACK-LETTER Z;;;; +2129;TURNED GREEK SMALL LETTER IOTA;So;0;ON;;;;;N;;;;; +212A;KELVIN SIGN;Lu;0;L;004B;;;;N;DEGREES KELVIN;;;006B; +212B;ANGSTROM SIGN;Lu;0;L;00C5;;;;N;ANGSTROM UNIT;;;00E5; +212C;SCRIPT CAPITAL B;Lu;0;L; 0042;;;;N;SCRIPT B;;;; +212D;BLACK-LETTER CAPITAL C;Lu;0;L; 0043;;;;N;BLACK-LETTER C;;;; +212E;ESTIMATED SYMBOL;So;0;ET;;;;;N;;;;; +212F;SCRIPT SMALL E;Ll;0;L; 0065;;;;N;;;;; +2130;SCRIPT CAPITAL E;Lu;0;L; 0045;;;;N;SCRIPT E;;;; +2131;SCRIPT CAPITAL F;Lu;0;L; 0046;;;;N;SCRIPT F;;;; +2132;TURNED CAPITAL F;Lu;0;L;;;;;N;TURNED F;;;214E; +2133;SCRIPT CAPITAL M;Lu;0;L; 004D;;;;N;SCRIPT M;;;; +2134;SCRIPT SMALL O;Ll;0;L; 006F;;;;N;;;;; +2135;ALEF SYMBOL;Lo;0;L; 05D0;;;;N;FIRST TRANSFINITE CARDINAL;;;; +2136;BET SYMBOL;Lo;0;L; 05D1;;;;N;SECOND TRANSFINITE CARDINAL;;;; +2137;GIMEL SYMBOL;Lo;0;L; 05D2;;;;N;THIRD TRANSFINITE CARDINAL;;;; +2138;DALET SYMBOL;Lo;0;L; 05D3;;;;N;FOURTH TRANSFINITE CARDINAL;;;; +2139;INFORMATION SOURCE;Ll;0;L; 0069;;;;N;;;;; +213A;ROTATED CAPITAL Q;So;0;ON;;;;;N;;;;; +213B;FACSIMILE SIGN;So;0;ON; 0046 0041 0058;;;;N;;;;; +213C;DOUBLE-STRUCK SMALL PI;Ll;0;L; 03C0;;;;N;;;;; +213D;DOUBLE-STRUCK SMALL GAMMA;Ll;0;L; 03B3;;;;N;;;;; +213E;DOUBLE-STRUCK CAPITAL GAMMA;Lu;0;L; 0393;;;;N;;;;; +213F;DOUBLE-STRUCK CAPITAL PI;Lu;0;L; 03A0;;;;N;;;;; +2140;DOUBLE-STRUCK N-ARY SUMMATION;Sm;0;ON; 2211;;;;Y;;;;; +2141;TURNED SANS-SERIF CAPITAL G;Sm;0;ON;;;;;N;;;;; +2142;TURNED SANS-SERIF CAPITAL L;Sm;0;ON;;;;;N;;;;; +2143;REVERSED SANS-SERIF CAPITAL L;Sm;0;ON;;;;;N;;;;; +2144;TURNED SANS-SERIF CAPITAL Y;Sm;0;ON;;;;;N;;;;; +2145;DOUBLE-STRUCK ITALIC CAPITAL D;Lu;0;L; 0044;;;;N;;;;; +2146;DOUBLE-STRUCK ITALIC SMALL D;Ll;0;L; 0064;;;;N;;;;; +2147;DOUBLE-STRUCK ITALIC SMALL E;Ll;0;L; 0065;;;;N;;;;; +2148;DOUBLE-STRUCK ITALIC SMALL I;Ll;0;L; 0069;;;;N;;;;; +2149;DOUBLE-STRUCK ITALIC SMALL J;Ll;0;L; 006A;;;;N;;;;; +214A;PROPERTY LINE;So;0;ON;;;;;N;;;;; +214B;TURNED AMPERSAND;Sm;0;ON;;;;;N;;;;; +214C;PER SIGN;So;0;ON;;;;;N;;;;; +214D;AKTIESELSKAB;So;0;ON;;;;;N;;;;; +214E;TURNED SMALL F;Ll;0;L;;;;;N;;;2132;;2132 +214F;SYMBOL FOR SAMARITAN SOURCE;So;0;L;;;;;N;;;;; +2150;VULGAR FRACTION ONE SEVENTH;No;0;ON; 0031 2044 0037;;;1/7;N;;;;; +2151;VULGAR FRACTION ONE NINTH;No;0;ON; 0031 2044 0039;;;1/9;N;;;;; +2152;VULGAR FRACTION ONE TENTH;No;0;ON; 0031 2044 0031 0030;;;1/10;N;;;;; +2153;VULGAR FRACTION ONE THIRD;No;0;ON; 0031 2044 0033;;;1/3;N;FRACTION ONE THIRD;;;; +2154;VULGAR FRACTION TWO THIRDS;No;0;ON; 0032 2044 0033;;;2/3;N;FRACTION TWO THIRDS;;;; +2155;VULGAR FRACTION ONE FIFTH;No;0;ON; 0031 2044 0035;;;1/5;N;FRACTION ONE FIFTH;;;; +2156;VULGAR FRACTION TWO FIFTHS;No;0;ON; 0032 2044 0035;;;2/5;N;FRACTION TWO FIFTHS;;;; +2157;VULGAR FRACTION THREE FIFTHS;No;0;ON; 0033 2044 0035;;;3/5;N;FRACTION THREE FIFTHS;;;; +2158;VULGAR FRACTION FOUR FIFTHS;No;0;ON; 0034 2044 0035;;;4/5;N;FRACTION FOUR FIFTHS;;;; +2159;VULGAR FRACTION ONE SIXTH;No;0;ON; 0031 2044 0036;;;1/6;N;FRACTION ONE SIXTH;;;; +215A;VULGAR FRACTION FIVE SIXTHS;No;0;ON; 0035 2044 0036;;;5/6;N;FRACTION FIVE SIXTHS;;;; +215B;VULGAR FRACTION ONE EIGHTH;No;0;ON; 0031 2044 0038;;;1/8;N;FRACTION ONE EIGHTH;;;; +215C;VULGAR FRACTION THREE EIGHTHS;No;0;ON; 0033 2044 0038;;;3/8;N;FRACTION THREE EIGHTHS;;;; +215D;VULGAR FRACTION FIVE EIGHTHS;No;0;ON; 0035 2044 0038;;;5/8;N;FRACTION FIVE EIGHTHS;;;; +215E;VULGAR FRACTION SEVEN EIGHTHS;No;0;ON; 0037 2044 0038;;;7/8;N;FRACTION SEVEN EIGHTHS;;;; +215F;FRACTION NUMERATOR ONE;No;0;ON; 0031 2044;;;1;N;;;;; +2160;ROMAN NUMERAL ONE;Nl;0;L; 0049;;;1;N;;;;2170; +2161;ROMAN NUMERAL TWO;Nl;0;L; 0049 0049;;;2;N;;;;2171; +2162;ROMAN NUMERAL THREE;Nl;0;L; 0049 0049 0049;;;3;N;;;;2172; +2163;ROMAN NUMERAL FOUR;Nl;0;L; 0049 0056;;;4;N;;;;2173; +2164;ROMAN NUMERAL FIVE;Nl;0;L; 0056;;;5;N;;;;2174; +2165;ROMAN NUMERAL SIX;Nl;0;L; 0056 0049;;;6;N;;;;2175; +2166;ROMAN NUMERAL SEVEN;Nl;0;L; 0056 0049 0049;;;7;N;;;;2176; +2167;ROMAN NUMERAL EIGHT;Nl;0;L; 0056 0049 0049 0049;;;8;N;;;;2177; +2168;ROMAN NUMERAL NINE;Nl;0;L; 0049 0058;;;9;N;;;;2178; +2169;ROMAN NUMERAL TEN;Nl;0;L; 0058;;;10;N;;;;2179; +216A;ROMAN NUMERAL ELEVEN;Nl;0;L; 0058 0049;;;11;N;;;;217A; +216B;ROMAN NUMERAL TWELVE;Nl;0;L; 0058 0049 0049;;;12;N;;;;217B; +216C;ROMAN NUMERAL FIFTY;Nl;0;L; 004C;;;50;N;;;;217C; +216D;ROMAN NUMERAL ONE HUNDRED;Nl;0;L; 0043;;;100;N;;;;217D; +216E;ROMAN NUMERAL FIVE HUNDRED;Nl;0;L; 0044;;;500;N;;;;217E; +216F;ROMAN NUMERAL ONE THOUSAND;Nl;0;L; 004D;;;1000;N;;;;217F; +2170;SMALL ROMAN NUMERAL ONE;Nl;0;L; 0069;;;1;N;;;2160;;2160 +2171;SMALL ROMAN NUMERAL TWO;Nl;0;L; 0069 0069;;;2;N;;;2161;;2161 +2172;SMALL ROMAN NUMERAL THREE;Nl;0;L; 0069 0069 0069;;;3;N;;;2162;;2162 +2173;SMALL ROMAN NUMERAL FOUR;Nl;0;L; 0069 0076;;;4;N;;;2163;;2163 +2174;SMALL ROMAN NUMERAL FIVE;Nl;0;L; 0076;;;5;N;;;2164;;2164 +2175;SMALL ROMAN NUMERAL SIX;Nl;0;L; 0076 0069;;;6;N;;;2165;;2165 +2176;SMALL ROMAN NUMERAL SEVEN;Nl;0;L; 0076 0069 0069;;;7;N;;;2166;;2166 +2177;SMALL ROMAN NUMERAL EIGHT;Nl;0;L; 0076 0069 0069 0069;;;8;N;;;2167;;2167 +2178;SMALL ROMAN NUMERAL NINE;Nl;0;L; 0069 0078;;;9;N;;;2168;;2168 +2179;SMALL ROMAN NUMERAL TEN;Nl;0;L; 0078;;;10;N;;;2169;;2169 +217A;SMALL ROMAN NUMERAL ELEVEN;Nl;0;L; 0078 0069;;;11;N;;;216A;;216A +217B;SMALL ROMAN NUMERAL TWELVE;Nl;0;L; 0078 0069 0069;;;12;N;;;216B;;216B +217C;SMALL ROMAN NUMERAL FIFTY;Nl;0;L; 006C;;;50;N;;;216C;;216C +217D;SMALL ROMAN NUMERAL ONE HUNDRED;Nl;0;L; 0063;;;100;N;;;216D;;216D +217E;SMALL ROMAN NUMERAL FIVE HUNDRED;Nl;0;L; 0064;;;500;N;;;216E;;216E +217F;SMALL ROMAN NUMERAL ONE THOUSAND;Nl;0;L; 006D;;;1000;N;;;216F;;216F +2180;ROMAN NUMERAL ONE THOUSAND C D;Nl;0;L;;;;1000;N;;;;; +2181;ROMAN NUMERAL FIVE THOUSAND;Nl;0;L;;;;5000;N;;;;; +2182;ROMAN NUMERAL TEN THOUSAND;Nl;0;L;;;;10000;N;;;;; +2183;ROMAN NUMERAL REVERSED ONE HUNDRED;Lu;0;L;;;;;N;;;;2184; +2184;LATIN SMALL LETTER REVERSED C;Ll;0;L;;;;;N;;;2183;;2183 +2185;ROMAN NUMERAL SIX LATE FORM;Nl;0;L;;;;6;N;;;;; +2186;ROMAN NUMERAL FIFTY EARLY FORM;Nl;0;L;;;;50;N;;;;; +2187;ROMAN NUMERAL FIFTY THOUSAND;Nl;0;L;;;;50000;N;;;;; +2188;ROMAN NUMERAL ONE HUNDRED THOUSAND;Nl;0;L;;;;100000;N;;;;; +2189;VULGAR FRACTION ZERO THIRDS;No;0;ON; 0030 2044 0033;;;0;N;;;;; +218A;TURNED DIGIT TWO;So;0;ON;;;;;N;;;;; +218B;TURNED DIGIT THREE;So;0;ON;;;;;N;;;;; +2190;LEFTWARDS ARROW;Sm;0;ON;;;;;N;LEFT ARROW;;;; +2191;UPWARDS ARROW;Sm;0;ON;;;;;N;UP ARROW;;;; +2192;RIGHTWARDS ARROW;Sm;0;ON;;;;;N;RIGHT ARROW;;;; +2193;DOWNWARDS ARROW;Sm;0;ON;;;;;N;DOWN ARROW;;;; +2194;LEFT RIGHT ARROW;Sm;0;ON;;;;;N;;;;; +2195;UP DOWN ARROW;So;0;ON;;;;;N;;;;; +2196;NORTH WEST ARROW;So;0;ON;;;;;N;UPPER LEFT ARROW;;;; +2197;NORTH EAST ARROW;So;0;ON;;;;;N;UPPER RIGHT ARROW;;;; +2198;SOUTH EAST ARROW;So;0;ON;;;;;N;LOWER RIGHT ARROW;;;; +2199;SOUTH WEST ARROW;So;0;ON;;;;;N;LOWER LEFT ARROW;;;; +219A;LEFTWARDS ARROW WITH STROKE;Sm;0;ON;2190 0338;;;;N;LEFT ARROW WITH STROKE;;;; +219B;RIGHTWARDS ARROW WITH STROKE;Sm;0;ON;2192 0338;;;;N;RIGHT ARROW WITH STROKE;;;; +219C;LEFTWARDS WAVE ARROW;So;0;ON;;;;;N;LEFT WAVE ARROW;;;; +219D;RIGHTWARDS WAVE ARROW;So;0;ON;;;;;N;RIGHT WAVE ARROW;;;; +219E;LEFTWARDS TWO HEADED ARROW;So;0;ON;;;;;N;LEFT TWO HEADED ARROW;;;; +219F;UPWARDS TWO HEADED ARROW;So;0;ON;;;;;N;UP TWO HEADED ARROW;;;; +21A0;RIGHTWARDS TWO HEADED ARROW;Sm;0;ON;;;;;N;RIGHT TWO HEADED ARROW;;;; +21A1;DOWNWARDS TWO HEADED ARROW;So;0;ON;;;;;N;DOWN TWO HEADED ARROW;;;; +21A2;LEFTWARDS ARROW WITH TAIL;So;0;ON;;;;;N;LEFT ARROW WITH TAIL;;;; +21A3;RIGHTWARDS ARROW WITH TAIL;Sm;0;ON;;;;;N;RIGHT ARROW WITH TAIL;;;; +21A4;LEFTWARDS ARROW FROM BAR;So;0;ON;;;;;N;LEFT ARROW FROM BAR;;;; +21A5;UPWARDS ARROW FROM BAR;So;0;ON;;;;;N;UP ARROW FROM BAR;;;; +21A6;RIGHTWARDS ARROW FROM BAR;Sm;0;ON;;;;;N;RIGHT ARROW FROM BAR;;;; +21A7;DOWNWARDS ARROW FROM BAR;So;0;ON;;;;;N;DOWN ARROW FROM BAR;;;; +21A8;UP DOWN ARROW WITH BASE;So;0;ON;;;;;N;;;;; +21A9;LEFTWARDS ARROW WITH HOOK;So;0;ON;;;;;N;LEFT ARROW WITH HOOK;;;; +21AA;RIGHTWARDS ARROW WITH HOOK;So;0;ON;;;;;N;RIGHT ARROW WITH HOOK;;;; +21AB;LEFTWARDS ARROW WITH LOOP;So;0;ON;;;;;N;LEFT ARROW WITH LOOP;;;; +21AC;RIGHTWARDS ARROW WITH LOOP;So;0;ON;;;;;N;RIGHT ARROW WITH LOOP;;;; +21AD;LEFT RIGHT WAVE ARROW;So;0;ON;;;;;N;;;;; +21AE;LEFT RIGHT ARROW WITH STROKE;Sm;0;ON;2194 0338;;;;N;;;;; +21AF;DOWNWARDS ZIGZAG ARROW;So;0;ON;;;;;N;DOWN ZIGZAG ARROW;;;; +21B0;UPWARDS ARROW WITH TIP LEFTWARDS;So;0;ON;;;;;N;UP ARROW WITH TIP LEFT;;;; +21B1;UPWARDS ARROW WITH TIP RIGHTWARDS;So;0;ON;;;;;N;UP ARROW WITH TIP RIGHT;;;; +21B2;DOWNWARDS ARROW WITH TIP LEFTWARDS;So;0;ON;;;;;N;DOWN ARROW WITH TIP LEFT;;;; +21B3;DOWNWARDS ARROW WITH TIP RIGHTWARDS;So;0;ON;;;;;N;DOWN ARROW WITH TIP RIGHT;;;; +21B4;RIGHTWARDS ARROW WITH CORNER DOWNWARDS;So;0;ON;;;;;N;RIGHT ARROW WITH CORNER DOWN;;;; +21B5;DOWNWARDS ARROW WITH CORNER LEFTWARDS;So;0;ON;;;;;N;DOWN ARROW WITH CORNER LEFT;;;; +21B6;ANTICLOCKWISE TOP SEMICIRCLE ARROW;So;0;ON;;;;;N;;;;; +21B7;CLOCKWISE TOP SEMICIRCLE ARROW;So;0;ON;;;;;N;;;;; +21B8;NORTH WEST ARROW TO LONG BAR;So;0;ON;;;;;N;UPPER LEFT ARROW TO LONG BAR;;;; +21B9;LEFTWARDS ARROW TO BAR OVER RIGHTWARDS ARROW TO BAR;So;0;ON;;;;;N;LEFT ARROW TO BAR OVER RIGHT ARROW TO BAR;;;; +21BA;ANTICLOCKWISE OPEN CIRCLE ARROW;So;0;ON;;;;;N;;;;; +21BB;CLOCKWISE OPEN CIRCLE ARROW;So;0;ON;;;;;N;;;;; +21BC;LEFTWARDS HARPOON WITH BARB UPWARDS;So;0;ON;;;;;N;LEFT HARPOON WITH BARB UP;;;; +21BD;LEFTWARDS HARPOON WITH BARB DOWNWARDS;So;0;ON;;;;;N;LEFT HARPOON WITH BARB DOWN;;;; +21BE;UPWARDS HARPOON WITH BARB RIGHTWARDS;So;0;ON;;;;;N;UP HARPOON WITH BARB RIGHT;;;; +21BF;UPWARDS HARPOON WITH BARB LEFTWARDS;So;0;ON;;;;;N;UP HARPOON WITH BARB LEFT;;;; +21C0;RIGHTWARDS HARPOON WITH BARB UPWARDS;So;0;ON;;;;;N;RIGHT HARPOON WITH BARB UP;;;; +21C1;RIGHTWARDS HARPOON WITH BARB DOWNWARDS;So;0;ON;;;;;N;RIGHT HARPOON WITH BARB DOWN;;;; +21C2;DOWNWARDS HARPOON WITH BARB RIGHTWARDS;So;0;ON;;;;;N;DOWN HARPOON WITH BARB RIGHT;;;; +21C3;DOWNWARDS HARPOON WITH BARB LEFTWARDS;So;0;ON;;;;;N;DOWN HARPOON WITH BARB LEFT;;;; +21C4;RIGHTWARDS ARROW OVER LEFTWARDS ARROW;So;0;ON;;;;;N;RIGHT ARROW OVER LEFT ARROW;;;; +21C5;UPWARDS ARROW LEFTWARDS OF DOWNWARDS ARROW;So;0;ON;;;;;N;UP ARROW LEFT OF DOWN ARROW;;;; +21C6;LEFTWARDS ARROW OVER RIGHTWARDS ARROW;So;0;ON;;;;;N;LEFT ARROW OVER RIGHT ARROW;;;; +21C7;LEFTWARDS PAIRED ARROWS;So;0;ON;;;;;N;LEFT PAIRED ARROWS;;;; +21C8;UPWARDS PAIRED ARROWS;So;0;ON;;;;;N;UP PAIRED ARROWS;;;; +21C9;RIGHTWARDS PAIRED ARROWS;So;0;ON;;;;;N;RIGHT PAIRED ARROWS;;;; +21CA;DOWNWARDS PAIRED ARROWS;So;0;ON;;;;;N;DOWN PAIRED ARROWS;;;; +21CB;LEFTWARDS HARPOON OVER RIGHTWARDS HARPOON;So;0;ON;;;;;N;LEFT HARPOON OVER RIGHT HARPOON;;;; +21CC;RIGHTWARDS HARPOON OVER LEFTWARDS HARPOON;So;0;ON;;;;;N;RIGHT HARPOON OVER LEFT HARPOON;;;; +21CD;LEFTWARDS DOUBLE ARROW WITH STROKE;So;0;ON;21D0 0338;;;;N;LEFT DOUBLE ARROW WITH STROKE;;;; +21CE;LEFT RIGHT DOUBLE ARROW WITH STROKE;Sm;0;ON;21D4 0338;;;;N;;;;; +21CF;RIGHTWARDS DOUBLE ARROW WITH STROKE;Sm;0;ON;21D2 0338;;;;N;RIGHT DOUBLE ARROW WITH STROKE;;;; +21D0;LEFTWARDS DOUBLE ARROW;So;0;ON;;;;;N;LEFT DOUBLE ARROW;;;; +21D1;UPWARDS DOUBLE ARROW;So;0;ON;;;;;N;UP DOUBLE ARROW;;;; +21D2;RIGHTWARDS DOUBLE ARROW;Sm;0;ON;;;;;N;RIGHT DOUBLE ARROW;;;; +21D3;DOWNWARDS DOUBLE ARROW;So;0;ON;;;;;N;DOWN DOUBLE ARROW;;;; +21D4;LEFT RIGHT DOUBLE ARROW;Sm;0;ON;;;;;N;;;;; +21D5;UP DOWN DOUBLE ARROW;So;0;ON;;;;;N;;;;; +21D6;NORTH WEST DOUBLE ARROW;So;0;ON;;;;;N;UPPER LEFT DOUBLE ARROW;;;; +21D7;NORTH EAST DOUBLE ARROW;So;0;ON;;;;;N;UPPER RIGHT DOUBLE ARROW;;;; +21D8;SOUTH EAST DOUBLE ARROW;So;0;ON;;;;;N;LOWER RIGHT DOUBLE ARROW;;;; +21D9;SOUTH WEST DOUBLE ARROW;So;0;ON;;;;;N;LOWER LEFT DOUBLE ARROW;;;; +21DA;LEFTWARDS TRIPLE ARROW;So;0;ON;;;;;N;LEFT TRIPLE ARROW;;;; +21DB;RIGHTWARDS TRIPLE ARROW;So;0;ON;;;;;N;RIGHT TRIPLE ARROW;;;; +21DC;LEFTWARDS SQUIGGLE ARROW;So;0;ON;;;;;N;LEFT SQUIGGLE ARROW;;;; +21DD;RIGHTWARDS SQUIGGLE ARROW;So;0;ON;;;;;N;RIGHT SQUIGGLE ARROW;;;; +21DE;UPWARDS ARROW WITH DOUBLE STROKE;So;0;ON;;;;;N;UP ARROW WITH DOUBLE STROKE;;;; +21DF;DOWNWARDS ARROW WITH DOUBLE STROKE;So;0;ON;;;;;N;DOWN ARROW WITH DOUBLE STROKE;;;; +21E0;LEFTWARDS DASHED ARROW;So;0;ON;;;;;N;LEFT DASHED ARROW;;;; +21E1;UPWARDS DASHED ARROW;So;0;ON;;;;;N;UP DASHED ARROW;;;; +21E2;RIGHTWARDS DASHED ARROW;So;0;ON;;;;;N;RIGHT DASHED ARROW;;;; +21E3;DOWNWARDS DASHED ARROW;So;0;ON;;;;;N;DOWN DASHED ARROW;;;; +21E4;LEFTWARDS ARROW TO BAR;So;0;ON;;;;;N;LEFT ARROW TO BAR;;;; +21E5;RIGHTWARDS ARROW TO BAR;So;0;ON;;;;;N;RIGHT ARROW TO BAR;;;; +21E6;LEFTWARDS WHITE ARROW;So;0;ON;;;;;N;WHITE LEFT ARROW;;;; +21E7;UPWARDS WHITE ARROW;So;0;ON;;;;;N;WHITE UP ARROW;;;; +21E8;RIGHTWARDS WHITE ARROW;So;0;ON;;;;;N;WHITE RIGHT ARROW;;;; +21E9;DOWNWARDS WHITE ARROW;So;0;ON;;;;;N;WHITE DOWN ARROW;;;; +21EA;UPWARDS WHITE ARROW FROM BAR;So;0;ON;;;;;N;WHITE UP ARROW FROM BAR;;;; +21EB;UPWARDS WHITE ARROW ON PEDESTAL;So;0;ON;;;;;N;;;;; +21EC;UPWARDS WHITE ARROW ON PEDESTAL WITH HORIZONTAL BAR;So;0;ON;;;;;N;;;;; +21ED;UPWARDS WHITE ARROW ON PEDESTAL WITH VERTICAL BAR;So;0;ON;;;;;N;;;;; +21EE;UPWARDS WHITE DOUBLE ARROW;So;0;ON;;;;;N;;;;; +21EF;UPWARDS WHITE DOUBLE ARROW ON PEDESTAL;So;0;ON;;;;;N;;;;; +21F0;RIGHTWARDS WHITE ARROW FROM WALL;So;0;ON;;;;;N;;;;; +21F1;NORTH WEST ARROW TO CORNER;So;0;ON;;;;;N;;;;; +21F2;SOUTH EAST ARROW TO CORNER;So;0;ON;;;;;N;;;;; +21F3;UP DOWN WHITE ARROW;So;0;ON;;;;;N;;;;; +21F4;RIGHT ARROW WITH SMALL CIRCLE;Sm;0;ON;;;;;N;;;;; +21F5;DOWNWARDS ARROW LEFTWARDS OF UPWARDS ARROW;Sm;0;ON;;;;;N;;;;; +21F6;THREE RIGHTWARDS ARROWS;Sm;0;ON;;;;;N;;;;; +21F7;LEFTWARDS ARROW WITH VERTICAL STROKE;Sm;0;ON;;;;;N;;;;; +21F8;RIGHTWARDS ARROW WITH VERTICAL STROKE;Sm;0;ON;;;;;N;;;;; +21F9;LEFT RIGHT ARROW WITH VERTICAL STROKE;Sm;0;ON;;;;;N;;;;; +21FA;LEFTWARDS ARROW WITH DOUBLE VERTICAL STROKE;Sm;0;ON;;;;;N;;;;; +21FB;RIGHTWARDS ARROW WITH DOUBLE VERTICAL STROKE;Sm;0;ON;;;;;N;;;;; +21FC;LEFT RIGHT ARROW WITH DOUBLE VERTICAL STROKE;Sm;0;ON;;;;;N;;;;; +21FD;LEFTWARDS OPEN-HEADED ARROW;Sm;0;ON;;;;;N;;;;; +21FE;RIGHTWARDS OPEN-HEADED ARROW;Sm;0;ON;;;;;N;;;;; +21FF;LEFT RIGHT OPEN-HEADED ARROW;Sm;0;ON;;;;;N;;;;; +2200;FOR ALL;Sm;0;ON;;;;;N;;;;; +2201;COMPLEMENT;Sm;0;ON;;;;;Y;;;;; +2202;PARTIAL DIFFERENTIAL;Sm;0;ON;;;;;Y;;;;; +2203;THERE EXISTS;Sm;0;ON;;;;;Y;;;;; +2204;THERE DOES NOT EXIST;Sm;0;ON;2203 0338;;;;Y;;;;; +2205;EMPTY SET;Sm;0;ON;;;;;N;;;;; +2206;INCREMENT;Sm;0;ON;;;;;N;;;;; +2207;NABLA;Sm;0;ON;;;;;N;;;;; +2208;ELEMENT OF;Sm;0;ON;;;;;Y;;;;; +2209;NOT AN ELEMENT OF;Sm;0;ON;2208 0338;;;;Y;;;;; +220A;SMALL ELEMENT OF;Sm;0;ON;;;;;Y;;;;; +220B;CONTAINS AS MEMBER;Sm;0;ON;;;;;Y;;;;; +220C;DOES NOT CONTAIN AS MEMBER;Sm;0;ON;220B 0338;;;;Y;;;;; +220D;SMALL CONTAINS AS MEMBER;Sm;0;ON;;;;;Y;;;;; +220E;END OF PROOF;Sm;0;ON;;;;;N;;;;; +220F;N-ARY PRODUCT;Sm;0;ON;;;;;N;;;;; +2210;N-ARY COPRODUCT;Sm;0;ON;;;;;N;;;;; +2211;N-ARY SUMMATION;Sm;0;ON;;;;;Y;;;;; +2212;MINUS SIGN;Sm;0;ES;;;;;N;;;;; +2213;MINUS-OR-PLUS SIGN;Sm;0;ET;;;;;N;;;;; +2214;DOT PLUS;Sm;0;ON;;;;;N;;;;; +2215;DIVISION SLASH;Sm;0;ON;;;;;Y;;;;; +2216;SET MINUS;Sm;0;ON;;;;;Y;;;;; +2217;ASTERISK OPERATOR;Sm;0;ON;;;;;N;;;;; +2218;RING OPERATOR;Sm;0;ON;;;;;N;;;;; +2219;BULLET OPERATOR;Sm;0;ON;;;;;N;;;;; +221A;SQUARE ROOT;Sm;0;ON;;;;;Y;;;;; +221B;CUBE ROOT;Sm;0;ON;;;;;Y;;;;; +221C;FOURTH ROOT;Sm;0;ON;;;;;Y;;;;; +221D;PROPORTIONAL TO;Sm;0;ON;;;;;Y;;;;; +221E;INFINITY;Sm;0;ON;;;;;N;;;;; +221F;RIGHT ANGLE;Sm;0;ON;;;;;Y;;;;; +2220;ANGLE;Sm;0;ON;;;;;Y;;;;; +2221;MEASURED ANGLE;Sm;0;ON;;;;;Y;;;;; +2222;SPHERICAL ANGLE;Sm;0;ON;;;;;Y;;;;; +2223;DIVIDES;Sm;0;ON;;;;;N;;;;; +2224;DOES NOT DIVIDE;Sm;0;ON;2223 0338;;;;Y;;;;; +2225;PARALLEL TO;Sm;0;ON;;;;;N;;;;; +2226;NOT PARALLEL TO;Sm;0;ON;2225 0338;;;;Y;;;;; +2227;LOGICAL AND;Sm;0;ON;;;;;N;;;;; +2228;LOGICAL OR;Sm;0;ON;;;;;N;;;;; +2229;INTERSECTION;Sm;0;ON;;;;;N;;;;; +222A;UNION;Sm;0;ON;;;;;N;;;;; +222B;INTEGRAL;Sm;0;ON;;;;;Y;;;;; +222C;DOUBLE INTEGRAL;Sm;0;ON; 222B 222B;;;;Y;;;;; +222D;TRIPLE INTEGRAL;Sm;0;ON; 222B 222B 222B;;;;Y;;;;; +222E;CONTOUR INTEGRAL;Sm;0;ON;;;;;Y;;;;; +222F;SURFACE INTEGRAL;Sm;0;ON; 222E 222E;;;;Y;;;;; +2230;VOLUME INTEGRAL;Sm;0;ON; 222E 222E 222E;;;;Y;;;;; +2231;CLOCKWISE INTEGRAL;Sm;0;ON;;;;;Y;;;;; +2232;CLOCKWISE CONTOUR INTEGRAL;Sm;0;ON;;;;;Y;;;;; +2233;ANTICLOCKWISE CONTOUR INTEGRAL;Sm;0;ON;;;;;Y;;;;; +2234;THEREFORE;Sm;0;ON;;;;;N;;;;; +2235;BECAUSE;Sm;0;ON;;;;;N;;;;; +2236;RATIO;Sm;0;ON;;;;;N;;;;; +2237;PROPORTION;Sm;0;ON;;;;;N;;;;; +2238;DOT MINUS;Sm;0;ON;;;;;N;;;;; +2239;EXCESS;Sm;0;ON;;;;;Y;;;;; +223A;GEOMETRIC PROPORTION;Sm;0;ON;;;;;N;;;;; +223B;HOMOTHETIC;Sm;0;ON;;;;;Y;;;;; +223C;TILDE OPERATOR;Sm;0;ON;;;;;Y;;;;; +223D;REVERSED TILDE;Sm;0;ON;;;;;Y;;;;; +223E;INVERTED LAZY S;Sm;0;ON;;;;;Y;;;;; +223F;SINE WAVE;Sm;0;ON;;;;;Y;;;;; +2240;WREATH PRODUCT;Sm;0;ON;;;;;Y;;;;; +2241;NOT TILDE;Sm;0;ON;223C 0338;;;;Y;;;;; +2242;MINUS TILDE;Sm;0;ON;;;;;Y;;;;; +2243;ASYMPTOTICALLY EQUAL TO;Sm;0;ON;;;;;Y;;;;; +2244;NOT ASYMPTOTICALLY EQUAL TO;Sm;0;ON;2243 0338;;;;Y;;;;; +2245;APPROXIMATELY EQUAL TO;Sm;0;ON;;;;;Y;;;;; +2246;APPROXIMATELY BUT NOT ACTUALLY EQUAL TO;Sm;0;ON;;;;;Y;;;;; +2247;NEITHER APPROXIMATELY NOR ACTUALLY EQUAL TO;Sm;0;ON;2245 0338;;;;Y;;;;; +2248;ALMOST EQUAL TO;Sm;0;ON;;;;;Y;;;;; +2249;NOT ALMOST EQUAL TO;Sm;0;ON;2248 0338;;;;Y;;;;; +224A;ALMOST EQUAL OR EQUAL TO;Sm;0;ON;;;;;Y;;;;; +224B;TRIPLE TILDE;Sm;0;ON;;;;;Y;;;;; +224C;ALL EQUAL TO;Sm;0;ON;;;;;Y;;;;; +224D;EQUIVALENT TO;Sm;0;ON;;;;;N;;;;; +224E;GEOMETRICALLY EQUIVALENT TO;Sm;0;ON;;;;;N;;;;; +224F;DIFFERENCE BETWEEN;Sm;0;ON;;;;;N;;;;; +2250;APPROACHES THE LIMIT;Sm;0;ON;;;;;N;;;;; +2251;GEOMETRICALLY EQUAL TO;Sm;0;ON;;;;;N;;;;; +2252;APPROXIMATELY EQUAL TO OR THE IMAGE OF;Sm;0;ON;;;;;Y;;;;; +2253;IMAGE OF OR APPROXIMATELY EQUAL TO;Sm;0;ON;;;;;Y;;;;; +2254;COLON EQUALS;Sm;0;ON;;;;;Y;COLON EQUAL;;;; +2255;EQUALS COLON;Sm;0;ON;;;;;Y;EQUAL COLON;;;; +2256;RING IN EQUAL TO;Sm;0;ON;;;;;N;;;;; +2257;RING EQUAL TO;Sm;0;ON;;;;;N;;;;; +2258;CORRESPONDS TO;Sm;0;ON;;;;;N;;;;; +2259;ESTIMATES;Sm;0;ON;;;;;N;;;;; +225A;EQUIANGULAR TO;Sm;0;ON;;;;;N;;;;; +225B;STAR EQUALS;Sm;0;ON;;;;;N;;;;; +225C;DELTA EQUAL TO;Sm;0;ON;;;;;N;;;;; +225D;EQUAL TO BY DEFINITION;Sm;0;ON;;;;;N;;;;; +225E;MEASURED BY;Sm;0;ON;;;;;N;;;;; +225F;QUESTIONED EQUAL TO;Sm;0;ON;;;;;Y;;;;; +2260;NOT EQUAL TO;Sm;0;ON;003D 0338;;;;Y;;;;; +2261;IDENTICAL TO;Sm;0;ON;;;;;N;;;;; +2262;NOT IDENTICAL TO;Sm;0;ON;2261 0338;;;;Y;;;;; +2263;STRICTLY EQUIVALENT TO;Sm;0;ON;;;;;N;;;;; +2264;LESS-THAN OR EQUAL TO;Sm;0;ON;;;;;Y;LESS THAN OR EQUAL TO;;;; +2265;GREATER-THAN OR EQUAL TO;Sm;0;ON;;;;;Y;GREATER THAN OR EQUAL TO;;;; +2266;LESS-THAN OVER EQUAL TO;Sm;0;ON;;;;;Y;LESS THAN OVER EQUAL TO;;;; +2267;GREATER-THAN OVER EQUAL TO;Sm;0;ON;;;;;Y;GREATER THAN OVER EQUAL TO;;;; +2268;LESS-THAN BUT NOT EQUAL TO;Sm;0;ON;;;;;Y;LESS THAN BUT NOT EQUAL TO;;;; +2269;GREATER-THAN BUT NOT EQUAL TO;Sm;0;ON;;;;;Y;GREATER THAN BUT NOT EQUAL TO;;;; +226A;MUCH LESS-THAN;Sm;0;ON;;;;;Y;MUCH LESS THAN;;;; +226B;MUCH GREATER-THAN;Sm;0;ON;;;;;Y;MUCH GREATER THAN;;;; +226C;BETWEEN;Sm;0;ON;;;;;N;;;;; +226D;NOT EQUIVALENT TO;Sm;0;ON;224D 0338;;;;N;;;;; +226E;NOT LESS-THAN;Sm;0;ON;003C 0338;;;;Y;NOT LESS THAN;;;; +226F;NOT GREATER-THAN;Sm;0;ON;003E 0338;;;;Y;NOT GREATER THAN;;;; +2270;NEITHER LESS-THAN NOR EQUAL TO;Sm;0;ON;2264 0338;;;;Y;NEITHER LESS THAN NOR EQUAL TO;;;; +2271;NEITHER GREATER-THAN NOR EQUAL TO;Sm;0;ON;2265 0338;;;;Y;NEITHER GREATER THAN NOR EQUAL TO;;;; +2272;LESS-THAN OR EQUIVALENT TO;Sm;0;ON;;;;;Y;LESS THAN OR EQUIVALENT TO;;;; +2273;GREATER-THAN OR EQUIVALENT TO;Sm;0;ON;;;;;Y;GREATER THAN OR EQUIVALENT TO;;;; +2274;NEITHER LESS-THAN NOR EQUIVALENT TO;Sm;0;ON;2272 0338;;;;Y;NEITHER LESS THAN NOR EQUIVALENT TO;;;; +2275;NEITHER GREATER-THAN NOR EQUIVALENT TO;Sm;0;ON;2273 0338;;;;Y;NEITHER GREATER THAN NOR EQUIVALENT TO;;;; +2276;LESS-THAN OR GREATER-THAN;Sm;0;ON;;;;;Y;LESS THAN OR GREATER THAN;;;; +2277;GREATER-THAN OR LESS-THAN;Sm;0;ON;;;;;Y;GREATER THAN OR LESS THAN;;;; +2278;NEITHER LESS-THAN NOR GREATER-THAN;Sm;0;ON;2276 0338;;;;Y;NEITHER LESS THAN NOR GREATER THAN;;;; +2279;NEITHER GREATER-THAN NOR LESS-THAN;Sm;0;ON;2277 0338;;;;Y;NEITHER GREATER THAN NOR LESS THAN;;;; +227A;PRECEDES;Sm;0;ON;;;;;Y;;;;; +227B;SUCCEEDS;Sm;0;ON;;;;;Y;;;;; +227C;PRECEDES OR EQUAL TO;Sm;0;ON;;;;;Y;;;;; +227D;SUCCEEDS OR EQUAL TO;Sm;0;ON;;;;;Y;;;;; +227E;PRECEDES OR EQUIVALENT TO;Sm;0;ON;;;;;Y;;;;; +227F;SUCCEEDS OR EQUIVALENT TO;Sm;0;ON;;;;;Y;;;;; +2280;DOES NOT PRECEDE;Sm;0;ON;227A 0338;;;;Y;;;;; +2281;DOES NOT SUCCEED;Sm;0;ON;227B 0338;;;;Y;;;;; +2282;SUBSET OF;Sm;0;ON;;;;;Y;;;;; +2283;SUPERSET OF;Sm;0;ON;;;;;Y;;;;; +2284;NOT A SUBSET OF;Sm;0;ON;2282 0338;;;;Y;;;;; +2285;NOT A SUPERSET OF;Sm;0;ON;2283 0338;;;;Y;;;;; +2286;SUBSET OF OR EQUAL TO;Sm;0;ON;;;;;Y;;;;; +2287;SUPERSET OF OR EQUAL TO;Sm;0;ON;;;;;Y;;;;; +2288;NEITHER A SUBSET OF NOR EQUAL TO;Sm;0;ON;2286 0338;;;;Y;;;;; +2289;NEITHER A SUPERSET OF NOR EQUAL TO;Sm;0;ON;2287 0338;;;;Y;;;;; +228A;SUBSET OF WITH NOT EQUAL TO;Sm;0;ON;;;;;Y;SUBSET OF OR NOT EQUAL TO;;;; +228B;SUPERSET OF WITH NOT EQUAL TO;Sm;0;ON;;;;;Y;SUPERSET OF OR NOT EQUAL TO;;;; +228C;MULTISET;Sm;0;ON;;;;;Y;;;;; +228D;MULTISET MULTIPLICATION;Sm;0;ON;;;;;N;;;;; +228E;MULTISET UNION;Sm;0;ON;;;;;N;;;;; +228F;SQUARE IMAGE OF;Sm;0;ON;;;;;Y;;;;; +2290;SQUARE ORIGINAL OF;Sm;0;ON;;;;;Y;;;;; +2291;SQUARE IMAGE OF OR EQUAL TO;Sm;0;ON;;;;;Y;;;;; +2292;SQUARE ORIGINAL OF OR EQUAL TO;Sm;0;ON;;;;;Y;;;;; +2293;SQUARE CAP;Sm;0;ON;;;;;N;;;;; +2294;SQUARE CUP;Sm;0;ON;;;;;N;;;;; +2295;CIRCLED PLUS;Sm;0;ON;;;;;N;;;;; +2296;CIRCLED MINUS;Sm;0;ON;;;;;N;;;;; +2297;CIRCLED TIMES;Sm;0;ON;;;;;N;;;;; +2298;CIRCLED DIVISION SLASH;Sm;0;ON;;;;;Y;;;;; +2299;CIRCLED DOT OPERATOR;Sm;0;ON;;;;;N;;;;; +229A;CIRCLED RING OPERATOR;Sm;0;ON;;;;;N;;;;; +229B;CIRCLED ASTERISK OPERATOR;Sm;0;ON;;;;;N;;;;; +229C;CIRCLED EQUALS;Sm;0;ON;;;;;N;;;;; +229D;CIRCLED DASH;Sm;0;ON;;;;;N;;;;; +229E;SQUARED PLUS;Sm;0;ON;;;;;N;;;;; +229F;SQUARED MINUS;Sm;0;ON;;;;;N;;;;; +22A0;SQUARED TIMES;Sm;0;ON;;;;;N;;;;; +22A1;SQUARED DOT OPERATOR;Sm;0;ON;;;;;N;;;;; +22A2;RIGHT TACK;Sm;0;ON;;;;;Y;;;;; +22A3;LEFT TACK;Sm;0;ON;;;;;Y;;;;; +22A4;DOWN TACK;Sm;0;ON;;;;;N;;;;; +22A5;UP TACK;Sm;0;ON;;;;;N;;;;; +22A6;ASSERTION;Sm;0;ON;;;;;Y;;;;; +22A7;MODELS;Sm;0;ON;;;;;Y;;;;; +22A8;TRUE;Sm;0;ON;;;;;Y;;;;; +22A9;FORCES;Sm;0;ON;;;;;Y;;;;; +22AA;TRIPLE VERTICAL BAR RIGHT TURNSTILE;Sm;0;ON;;;;;Y;;;;; +22AB;DOUBLE VERTICAL BAR DOUBLE RIGHT TURNSTILE;Sm;0;ON;;;;;Y;;;;; +22AC;DOES NOT PROVE;Sm;0;ON;22A2 0338;;;;Y;;;;; +22AD;NOT TRUE;Sm;0;ON;22A8 0338;;;;Y;;;;; +22AE;DOES NOT FORCE;Sm;0;ON;22A9 0338;;;;Y;;;;; +22AF;NEGATED DOUBLE VERTICAL BAR DOUBLE RIGHT TURNSTILE;Sm;0;ON;22AB 0338;;;;Y;;;;; +22B0;PRECEDES UNDER RELATION;Sm;0;ON;;;;;Y;;;;; +22B1;SUCCEEDS UNDER RELATION;Sm;0;ON;;;;;Y;;;;; +22B2;NORMAL SUBGROUP OF;Sm;0;ON;;;;;Y;;;;; +22B3;CONTAINS AS NORMAL SUBGROUP;Sm;0;ON;;;;;Y;;;;; +22B4;NORMAL SUBGROUP OF OR EQUAL TO;Sm;0;ON;;;;;Y;;;;; +22B5;CONTAINS AS NORMAL SUBGROUP OR EQUAL TO;Sm;0;ON;;;;;Y;;;;; +22B6;ORIGINAL OF;Sm;0;ON;;;;;Y;;;;; +22B7;IMAGE OF;Sm;0;ON;;;;;Y;;;;; +22B8;MULTIMAP;Sm;0;ON;;;;;Y;;;;; +22B9;HERMITIAN CONJUGATE MATRIX;Sm;0;ON;;;;;N;;;;; +22BA;INTERCALATE;Sm;0;ON;;;;;N;;;;; +22BB;XOR;Sm;0;ON;;;;;N;;;;; +22BC;NAND;Sm;0;ON;;;;;N;;;;; +22BD;NOR;Sm;0;ON;;;;;N;;;;; +22BE;RIGHT ANGLE WITH ARC;Sm;0;ON;;;;;Y;;;;; +22BF;RIGHT TRIANGLE;Sm;0;ON;;;;;Y;;;;; +22C0;N-ARY LOGICAL AND;Sm;0;ON;;;;;N;;;;; +22C1;N-ARY LOGICAL OR;Sm;0;ON;;;;;N;;;;; +22C2;N-ARY INTERSECTION;Sm;0;ON;;;;;N;;;;; +22C3;N-ARY UNION;Sm;0;ON;;;;;N;;;;; +22C4;DIAMOND OPERATOR;Sm;0;ON;;;;;N;;;;; +22C5;DOT OPERATOR;Sm;0;ON;;;;;N;;;;; +22C6;STAR OPERATOR;Sm;0;ON;;;;;N;;;;; +22C7;DIVISION TIMES;Sm;0;ON;;;;;N;;;;; +22C8;BOWTIE;Sm;0;ON;;;;;N;;;;; +22C9;LEFT NORMAL FACTOR SEMIDIRECT PRODUCT;Sm;0;ON;;;;;Y;;;;; +22CA;RIGHT NORMAL FACTOR SEMIDIRECT PRODUCT;Sm;0;ON;;;;;Y;;;;; +22CB;LEFT SEMIDIRECT PRODUCT;Sm;0;ON;;;;;Y;;;;; +22CC;RIGHT SEMIDIRECT PRODUCT;Sm;0;ON;;;;;Y;;;;; +22CD;REVERSED TILDE EQUALS;Sm;0;ON;;;;;Y;;;;; +22CE;CURLY LOGICAL OR;Sm;0;ON;;;;;N;;;;; +22CF;CURLY LOGICAL AND;Sm;0;ON;;;;;N;;;;; +22D0;DOUBLE SUBSET;Sm;0;ON;;;;;Y;;;;; +22D1;DOUBLE SUPERSET;Sm;0;ON;;;;;Y;;;;; +22D2;DOUBLE INTERSECTION;Sm;0;ON;;;;;N;;;;; +22D3;DOUBLE UNION;Sm;0;ON;;;;;N;;;;; +22D4;PITCHFORK;Sm;0;ON;;;;;N;;;;; +22D5;EQUAL AND PARALLEL TO;Sm;0;ON;;;;;N;;;;; +22D6;LESS-THAN WITH DOT;Sm;0;ON;;;;;Y;LESS THAN WITH DOT;;;; +22D7;GREATER-THAN WITH DOT;Sm;0;ON;;;;;Y;GREATER THAN WITH DOT;;;; +22D8;VERY MUCH LESS-THAN;Sm;0;ON;;;;;Y;VERY MUCH LESS THAN;;;; +22D9;VERY MUCH GREATER-THAN;Sm;0;ON;;;;;Y;VERY MUCH GREATER THAN;;;; +22DA;LESS-THAN EQUAL TO OR GREATER-THAN;Sm;0;ON;;;;;Y;LESS THAN EQUAL TO OR GREATER THAN;;;; +22DB;GREATER-THAN EQUAL TO OR LESS-THAN;Sm;0;ON;;;;;Y;GREATER THAN EQUAL TO OR LESS THAN;;;; +22DC;EQUAL TO OR LESS-THAN;Sm;0;ON;;;;;Y;EQUAL TO OR LESS THAN;;;; +22DD;EQUAL TO OR GREATER-THAN;Sm;0;ON;;;;;Y;EQUAL TO OR GREATER THAN;;;; +22DE;EQUAL TO OR PRECEDES;Sm;0;ON;;;;;Y;;;;; +22DF;EQUAL TO OR SUCCEEDS;Sm;0;ON;;;;;Y;;;;; +22E0;DOES NOT PRECEDE OR EQUAL;Sm;0;ON;227C 0338;;;;Y;;;;; +22E1;DOES NOT SUCCEED OR EQUAL;Sm;0;ON;227D 0338;;;;Y;;;;; +22E2;NOT SQUARE IMAGE OF OR EQUAL TO;Sm;0;ON;2291 0338;;;;Y;;;;; +22E3;NOT SQUARE ORIGINAL OF OR EQUAL TO;Sm;0;ON;2292 0338;;;;Y;;;;; +22E4;SQUARE IMAGE OF OR NOT EQUAL TO;Sm;0;ON;;;;;Y;;;;; +22E5;SQUARE ORIGINAL OF OR NOT EQUAL TO;Sm;0;ON;;;;;Y;;;;; +22E6;LESS-THAN BUT NOT EQUIVALENT TO;Sm;0;ON;;;;;Y;LESS THAN BUT NOT EQUIVALENT TO;;;; +22E7;GREATER-THAN BUT NOT EQUIVALENT TO;Sm;0;ON;;;;;Y;GREATER THAN BUT NOT EQUIVALENT TO;;;; +22E8;PRECEDES BUT NOT EQUIVALENT TO;Sm;0;ON;;;;;Y;;;;; +22E9;SUCCEEDS BUT NOT EQUIVALENT TO;Sm;0;ON;;;;;Y;;;;; +22EA;NOT NORMAL SUBGROUP OF;Sm;0;ON;22B2 0338;;;;Y;;;;; +22EB;DOES NOT CONTAIN AS NORMAL SUBGROUP;Sm;0;ON;22B3 0338;;;;Y;;;;; +22EC;NOT NORMAL SUBGROUP OF OR EQUAL TO;Sm;0;ON;22B4 0338;;;;Y;;;;; +22ED;DOES NOT CONTAIN AS NORMAL SUBGROUP OR EQUAL;Sm;0;ON;22B5 0338;;;;Y;;;;; +22EE;VERTICAL ELLIPSIS;Sm;0;ON;;;;;N;;;;; +22EF;MIDLINE HORIZONTAL ELLIPSIS;Sm;0;ON;;;;;N;;;;; +22F0;UP RIGHT DIAGONAL ELLIPSIS;Sm;0;ON;;;;;Y;;;;; +22F1;DOWN RIGHT DIAGONAL ELLIPSIS;Sm;0;ON;;;;;Y;;;;; +22F2;ELEMENT OF WITH LONG HORIZONTAL STROKE;Sm;0;ON;;;;;Y;;;;; +22F3;ELEMENT OF WITH VERTICAL BAR AT END OF HORIZONTAL STROKE;Sm;0;ON;;;;;Y;;;;; +22F4;SMALL ELEMENT OF WITH VERTICAL BAR AT END OF HORIZONTAL STROKE;Sm;0;ON;;;;;Y;;;;; +22F5;ELEMENT OF WITH DOT ABOVE;Sm;0;ON;;;;;Y;;;;; +22F6;ELEMENT OF WITH OVERBAR;Sm;0;ON;;;;;Y;;;;; +22F7;SMALL ELEMENT OF WITH OVERBAR;Sm;0;ON;;;;;Y;;;;; +22F8;ELEMENT OF WITH UNDERBAR;Sm;0;ON;;;;;Y;;;;; +22F9;ELEMENT OF WITH TWO HORIZONTAL STROKES;Sm;0;ON;;;;;Y;;;;; +22FA;CONTAINS WITH LONG HORIZONTAL STROKE;Sm;0;ON;;;;;Y;;;;; +22FB;CONTAINS WITH VERTICAL BAR AT END OF HORIZONTAL STROKE;Sm;0;ON;;;;;Y;;;;; +22FC;SMALL CONTAINS WITH VERTICAL BAR AT END OF HORIZONTAL STROKE;Sm;0;ON;;;;;Y;;;;; +22FD;CONTAINS WITH OVERBAR;Sm;0;ON;;;;;Y;;;;; +22FE;SMALL CONTAINS WITH OVERBAR;Sm;0;ON;;;;;Y;;;;; +22FF;Z NOTATION BAG MEMBERSHIP;Sm;0;ON;;;;;Y;;;;; +2300;DIAMETER SIGN;So;0;ON;;;;;N;;;;; +2301;ELECTRIC ARROW;So;0;ON;;;;;N;;;;; +2302;HOUSE;So;0;ON;;;;;N;;;;; +2303;UP ARROWHEAD;So;0;ON;;;;;N;;;;; +2304;DOWN ARROWHEAD;So;0;ON;;;;;N;;;;; +2305;PROJECTIVE;So;0;ON;;;;;N;;;;; +2306;PERSPECTIVE;So;0;ON;;;;;N;;;;; +2307;WAVY LINE;So;0;ON;;;;;N;;;;; +2308;LEFT CEILING;Ps;0;ON;;;;;Y;;;;; +2309;RIGHT CEILING;Pe;0;ON;;;;;Y;;;;; +230A;LEFT FLOOR;Ps;0;ON;;;;;Y;;;;; +230B;RIGHT FLOOR;Pe;0;ON;;;;;Y;;;;; +230C;BOTTOM RIGHT CROP;So;0;ON;;;;;N;;;;; +230D;BOTTOM LEFT CROP;So;0;ON;;;;;N;;;;; +230E;TOP RIGHT CROP;So;0;ON;;;;;N;;;;; +230F;TOP LEFT CROP;So;0;ON;;;;;N;;;;; +2310;REVERSED NOT SIGN;So;0;ON;;;;;N;;;;; +2311;SQUARE LOZENGE;So;0;ON;;;;;N;;;;; +2312;ARC;So;0;ON;;;;;N;;;;; +2313;SEGMENT;So;0;ON;;;;;N;;;;; +2314;SECTOR;So;0;ON;;;;;N;;;;; +2315;TELEPHONE RECORDER;So;0;ON;;;;;N;;;;; +2316;POSITION INDICATOR;So;0;ON;;;;;N;;;;; +2317;VIEWDATA SQUARE;So;0;ON;;;;;N;;;;; +2318;PLACE OF INTEREST SIGN;So;0;ON;;;;;N;COMMAND KEY;;;; +2319;TURNED NOT SIGN;So;0;ON;;;;;N;;;;; +231A;WATCH;So;0;ON;;;;;N;;;;; +231B;HOURGLASS;So;0;ON;;;;;N;;;;; +231C;TOP LEFT CORNER;So;0;ON;;;;;N;;;;; +231D;TOP RIGHT CORNER;So;0;ON;;;;;N;;;;; +231E;BOTTOM LEFT CORNER;So;0;ON;;;;;N;;;;; +231F;BOTTOM RIGHT CORNER;So;0;ON;;;;;N;;;;; +2320;TOP HALF INTEGRAL;Sm;0;ON;;;;;Y;;;;; +2321;BOTTOM HALF INTEGRAL;Sm;0;ON;;;;;Y;;;;; +2322;FROWN;So;0;ON;;;;;N;;;;; +2323;SMILE;So;0;ON;;;;;N;;;;; +2324;UP ARROWHEAD BETWEEN TWO HORIZONTAL BARS;So;0;ON;;;;;N;ENTER KEY;;;; +2325;OPTION KEY;So;0;ON;;;;;N;;;;; +2326;ERASE TO THE RIGHT;So;0;ON;;;;;N;DELETE TO THE RIGHT KEY;;;; +2327;X IN A RECTANGLE BOX;So;0;ON;;;;;N;CLEAR KEY;;;; +2328;KEYBOARD;So;0;ON;;;;;N;;;;; +2329;LEFT-POINTING ANGLE BRACKET;Ps;0;ON;3008;;;;Y;BRA;;;; +232A;RIGHT-POINTING ANGLE BRACKET;Pe;0;ON;3009;;;;Y;KET;;;; +232B;ERASE TO THE LEFT;So;0;ON;;;;;N;DELETE TO THE LEFT KEY;;;; +232C;BENZENE RING;So;0;ON;;;;;N;;;;; +232D;CYLINDRICITY;So;0;ON;;;;;N;;;;; +232E;ALL AROUND-PROFILE;So;0;ON;;;;;N;;;;; +232F;SYMMETRY;So;0;ON;;;;;N;;;;; +2330;TOTAL RUNOUT;So;0;ON;;;;;N;;;;; +2331;DIMENSION ORIGIN;So;0;ON;;;;;N;;;;; +2332;CONICAL TAPER;So;0;ON;;;;;N;;;;; +2333;SLOPE;So;0;ON;;;;;N;;;;; +2334;COUNTERBORE;So;0;ON;;;;;N;;;;; +2335;COUNTERSINK;So;0;ON;;;;;N;;;;; +2336;APL FUNCTIONAL SYMBOL I-BEAM;So;0;L;;;;;N;;;;; +2337;APL FUNCTIONAL SYMBOL SQUISH QUAD;So;0;L;;;;;N;;;;; +2338;APL FUNCTIONAL SYMBOL QUAD EQUAL;So;0;L;;;;;N;;;;; +2339;APL FUNCTIONAL SYMBOL QUAD DIVIDE;So;0;L;;;;;N;;;;; +233A;APL FUNCTIONAL SYMBOL QUAD DIAMOND;So;0;L;;;;;N;;;;; +233B;APL FUNCTIONAL SYMBOL QUAD JOT;So;0;L;;;;;N;;;;; +233C;APL FUNCTIONAL SYMBOL QUAD CIRCLE;So;0;L;;;;;N;;;;; +233D;APL FUNCTIONAL SYMBOL CIRCLE STILE;So;0;L;;;;;N;;;;; +233E;APL FUNCTIONAL SYMBOL CIRCLE JOT;So;0;L;;;;;N;;;;; +233F;APL FUNCTIONAL SYMBOL SLASH BAR;So;0;L;;;;;N;;;;; +2340;APL FUNCTIONAL SYMBOL BACKSLASH BAR;So;0;L;;;;;N;;;;; +2341;APL FUNCTIONAL SYMBOL QUAD SLASH;So;0;L;;;;;N;;;;; +2342;APL FUNCTIONAL SYMBOL QUAD BACKSLASH;So;0;L;;;;;N;;;;; +2343;APL FUNCTIONAL SYMBOL QUAD LESS-THAN;So;0;L;;;;;N;;;;; +2344;APL FUNCTIONAL SYMBOL QUAD GREATER-THAN;So;0;L;;;;;N;;;;; +2345;APL FUNCTIONAL SYMBOL LEFTWARDS VANE;So;0;L;;;;;N;;;;; +2346;APL FUNCTIONAL SYMBOL RIGHTWARDS VANE;So;0;L;;;;;N;;;;; +2347;APL FUNCTIONAL SYMBOL QUAD LEFTWARDS ARROW;So;0;L;;;;;N;;;;; +2348;APL FUNCTIONAL SYMBOL QUAD RIGHTWARDS ARROW;So;0;L;;;;;N;;;;; +2349;APL FUNCTIONAL SYMBOL CIRCLE BACKSLASH;So;0;L;;;;;N;;;;; +234A;APL FUNCTIONAL SYMBOL DOWN TACK UNDERBAR;So;0;L;;;;;N;;;;; +234B;APL FUNCTIONAL SYMBOL DELTA STILE;So;0;L;;;;;N;;;;; +234C;APL FUNCTIONAL SYMBOL QUAD DOWN CARET;So;0;L;;;;;N;;;;; +234D;APL FUNCTIONAL SYMBOL QUAD DELTA;So;0;L;;;;;N;;;;; +234E;APL FUNCTIONAL SYMBOL DOWN TACK JOT;So;0;L;;;;;N;;;;; +234F;APL FUNCTIONAL SYMBOL UPWARDS VANE;So;0;L;;;;;N;;;;; +2350;APL FUNCTIONAL SYMBOL QUAD UPWARDS ARROW;So;0;L;;;;;N;;;;; +2351;APL FUNCTIONAL SYMBOL UP TACK OVERBAR;So;0;L;;;;;N;;;;; +2352;APL FUNCTIONAL SYMBOL DEL STILE;So;0;L;;;;;N;;;;; +2353;APL FUNCTIONAL SYMBOL QUAD UP CARET;So;0;L;;;;;N;;;;; +2354;APL FUNCTIONAL SYMBOL QUAD DEL;So;0;L;;;;;N;;;;; +2355;APL FUNCTIONAL SYMBOL UP TACK JOT;So;0;L;;;;;N;;;;; +2356;APL FUNCTIONAL SYMBOL DOWNWARDS VANE;So;0;L;;;;;N;;;;; +2357;APL FUNCTIONAL SYMBOL QUAD DOWNWARDS ARROW;So;0;L;;;;;N;;;;; +2358;APL FUNCTIONAL SYMBOL QUOTE UNDERBAR;So;0;L;;;;;N;;;;; +2359;APL FUNCTIONAL SYMBOL DELTA UNDERBAR;So;0;L;;;;;N;;;;; +235A;APL FUNCTIONAL SYMBOL DIAMOND UNDERBAR;So;0;L;;;;;N;;;;; +235B;APL FUNCTIONAL SYMBOL JOT UNDERBAR;So;0;L;;;;;N;;;;; +235C;APL FUNCTIONAL SYMBOL CIRCLE UNDERBAR;So;0;L;;;;;N;;;;; +235D;APL FUNCTIONAL SYMBOL UP SHOE JOT;So;0;L;;;;;N;;;;; +235E;APL FUNCTIONAL SYMBOL QUOTE QUAD;So;0;L;;;;;N;;;;; +235F;APL FUNCTIONAL SYMBOL CIRCLE STAR;So;0;L;;;;;N;;;;; +2360;APL FUNCTIONAL SYMBOL QUAD COLON;So;0;L;;;;;N;;;;; +2361;APL FUNCTIONAL SYMBOL UP TACK DIAERESIS;So;0;L;;;;;N;;;;; +2362;APL FUNCTIONAL SYMBOL DEL DIAERESIS;So;0;L;;;;;N;;;;; +2363;APL FUNCTIONAL SYMBOL STAR DIAERESIS;So;0;L;;;;;N;;;;; +2364;APL FUNCTIONAL SYMBOL JOT DIAERESIS;So;0;L;;;;;N;;;;; +2365;APL FUNCTIONAL SYMBOL CIRCLE DIAERESIS;So;0;L;;;;;N;;;;; +2366;APL FUNCTIONAL SYMBOL DOWN SHOE STILE;So;0;L;;;;;N;;;;; +2367;APL FUNCTIONAL SYMBOL LEFT SHOE STILE;So;0;L;;;;;N;;;;; +2368;APL FUNCTIONAL SYMBOL TILDE DIAERESIS;So;0;L;;;;;N;;;;; +2369;APL FUNCTIONAL SYMBOL GREATER-THAN DIAERESIS;So;0;L;;;;;N;;;;; +236A;APL FUNCTIONAL SYMBOL COMMA BAR;So;0;L;;;;;N;;;;; +236B;APL FUNCTIONAL SYMBOL DEL TILDE;So;0;L;;;;;N;;;;; +236C;APL FUNCTIONAL SYMBOL ZILDE;So;0;L;;;;;N;;;;; +236D;APL FUNCTIONAL SYMBOL STILE TILDE;So;0;L;;;;;N;;;;; +236E;APL FUNCTIONAL SYMBOL SEMICOLON UNDERBAR;So;0;L;;;;;N;;;;; +236F;APL FUNCTIONAL SYMBOL QUAD NOT EQUAL;So;0;L;;;;;N;;;;; +2370;APL FUNCTIONAL SYMBOL QUAD QUESTION;So;0;L;;;;;N;;;;; +2371;APL FUNCTIONAL SYMBOL DOWN CARET TILDE;So;0;L;;;;;N;;;;; +2372;APL FUNCTIONAL SYMBOL UP CARET TILDE;So;0;L;;;;;N;;;;; +2373;APL FUNCTIONAL SYMBOL IOTA;So;0;L;;;;;N;;;;; +2374;APL FUNCTIONAL SYMBOL RHO;So;0;L;;;;;N;;;;; +2375;APL FUNCTIONAL SYMBOL OMEGA;So;0;L;;;;;N;;;;; +2376;APL FUNCTIONAL SYMBOL ALPHA UNDERBAR;So;0;L;;;;;N;;;;; +2377;APL FUNCTIONAL SYMBOL EPSILON UNDERBAR;So;0;L;;;;;N;;;;; +2378;APL FUNCTIONAL SYMBOL IOTA UNDERBAR;So;0;L;;;;;N;;;;; +2379;APL FUNCTIONAL SYMBOL OMEGA UNDERBAR;So;0;L;;;;;N;;;;; +237A;APL FUNCTIONAL SYMBOL ALPHA;So;0;L;;;;;N;;;;; +237B;NOT CHECK MARK;So;0;ON;;;;;N;;;;; +237C;RIGHT ANGLE WITH DOWNWARDS ZIGZAG ARROW;Sm;0;ON;;;;;N;;;;; +237D;SHOULDERED OPEN BOX;So;0;ON;;;;;N;;;;; +237E;BELL SYMBOL;So;0;ON;;;;;N;;;;; +237F;VERTICAL LINE WITH MIDDLE DOT;So;0;ON;;;;;N;;;;; +2380;INSERTION SYMBOL;So;0;ON;;;;;N;;;;; +2381;CONTINUOUS UNDERLINE SYMBOL;So;0;ON;;;;;N;;;;; +2382;DISCONTINUOUS UNDERLINE SYMBOL;So;0;ON;;;;;N;;;;; +2383;EMPHASIS SYMBOL;So;0;ON;;;;;N;;;;; +2384;COMPOSITION SYMBOL;So;0;ON;;;;;N;;;;; +2385;WHITE SQUARE WITH CENTRE VERTICAL LINE;So;0;ON;;;;;N;;;;; +2386;ENTER SYMBOL;So;0;ON;;;;;N;;;;; +2387;ALTERNATIVE KEY SYMBOL;So;0;ON;;;;;N;;;;; +2388;HELM SYMBOL;So;0;ON;;;;;N;;;;; +2389;CIRCLED HORIZONTAL BAR WITH NOTCH;So;0;ON;;;;;N;;;;; +238A;CIRCLED TRIANGLE DOWN;So;0;ON;;;;;N;;;;; +238B;BROKEN CIRCLE WITH NORTHWEST ARROW;So;0;ON;;;;;N;;;;; +238C;UNDO SYMBOL;So;0;ON;;;;;N;;;;; +238D;MONOSTABLE SYMBOL;So;0;ON;;;;;N;;;;; +238E;HYSTERESIS SYMBOL;So;0;ON;;;;;N;;;;; +238F;OPEN-CIRCUIT-OUTPUT H-TYPE SYMBOL;So;0;ON;;;;;N;;;;; +2390;OPEN-CIRCUIT-OUTPUT L-TYPE SYMBOL;So;0;ON;;;;;N;;;;; +2391;PASSIVE-PULL-DOWN-OUTPUT SYMBOL;So;0;ON;;;;;N;;;;; +2392;PASSIVE-PULL-UP-OUTPUT SYMBOL;So;0;ON;;;;;N;;;;; +2393;DIRECT CURRENT SYMBOL FORM TWO;So;0;ON;;;;;N;;;;; +2394;SOFTWARE-FUNCTION SYMBOL;So;0;ON;;;;;N;;;;; +2395;APL FUNCTIONAL SYMBOL QUAD;So;0;L;;;;;N;;;;; +2396;DECIMAL SEPARATOR KEY SYMBOL;So;0;ON;;;;;N;;;;; +2397;PREVIOUS PAGE;So;0;ON;;;;;N;;;;; +2398;NEXT PAGE;So;0;ON;;;;;N;;;;; +2399;PRINT SCREEN SYMBOL;So;0;ON;;;;;N;;;;; +239A;CLEAR SCREEN SYMBOL;So;0;ON;;;;;N;;;;; +239B;LEFT PARENTHESIS UPPER HOOK;Sm;0;ON;;;;;N;;;;; +239C;LEFT PARENTHESIS EXTENSION;Sm;0;ON;;;;;N;;;;; +239D;LEFT PARENTHESIS LOWER HOOK;Sm;0;ON;;;;;N;;;;; +239E;RIGHT PARENTHESIS UPPER HOOK;Sm;0;ON;;;;;N;;;;; +239F;RIGHT PARENTHESIS EXTENSION;Sm;0;ON;;;;;N;;;;; +23A0;RIGHT PARENTHESIS LOWER HOOK;Sm;0;ON;;;;;N;;;;; +23A1;LEFT SQUARE BRACKET UPPER CORNER;Sm;0;ON;;;;;N;;;;; +23A2;LEFT SQUARE BRACKET EXTENSION;Sm;0;ON;;;;;N;;;;; +23A3;LEFT SQUARE BRACKET LOWER CORNER;Sm;0;ON;;;;;N;;;;; +23A4;RIGHT SQUARE BRACKET UPPER CORNER;Sm;0;ON;;;;;N;;;;; +23A5;RIGHT SQUARE BRACKET EXTENSION;Sm;0;ON;;;;;N;;;;; +23A6;RIGHT SQUARE BRACKET LOWER CORNER;Sm;0;ON;;;;;N;;;;; +23A7;LEFT CURLY BRACKET UPPER HOOK;Sm;0;ON;;;;;N;;;;; +23A8;LEFT CURLY BRACKET MIDDLE PIECE;Sm;0;ON;;;;;N;;;;; +23A9;LEFT CURLY BRACKET LOWER HOOK;Sm;0;ON;;;;;N;;;;; +23AA;CURLY BRACKET EXTENSION;Sm;0;ON;;;;;N;;;;; +23AB;RIGHT CURLY BRACKET UPPER HOOK;Sm;0;ON;;;;;N;;;;; +23AC;RIGHT CURLY BRACKET MIDDLE PIECE;Sm;0;ON;;;;;N;;;;; +23AD;RIGHT CURLY BRACKET LOWER HOOK;Sm;0;ON;;;;;N;;;;; +23AE;INTEGRAL EXTENSION;Sm;0;ON;;;;;N;;;;; +23AF;HORIZONTAL LINE EXTENSION;Sm;0;ON;;;;;N;;;;; +23B0;UPPER LEFT OR LOWER RIGHT CURLY BRACKET SECTION;Sm;0;ON;;;;;N;;;;; +23B1;UPPER RIGHT OR LOWER LEFT CURLY BRACKET SECTION;Sm;0;ON;;;;;N;;;;; +23B2;SUMMATION TOP;Sm;0;ON;;;;;N;;;;; +23B3;SUMMATION BOTTOM;Sm;0;ON;;;;;N;;;;; +23B4;TOP SQUARE BRACKET;So;0;ON;;;;;N;;;;; +23B5;BOTTOM SQUARE BRACKET;So;0;ON;;;;;N;;;;; +23B6;BOTTOM SQUARE BRACKET OVER TOP SQUARE BRACKET;So;0;ON;;;;;N;;;;; +23B7;RADICAL SYMBOL BOTTOM;So;0;ON;;;;;N;;;;; +23B8;LEFT VERTICAL BOX LINE;So;0;ON;;;;;N;;;;; +23B9;RIGHT VERTICAL BOX LINE;So;0;ON;;;;;N;;;;; +23BA;HORIZONTAL SCAN LINE-1;So;0;ON;;;;;N;;;;; +23BB;HORIZONTAL SCAN LINE-3;So;0;ON;;;;;N;;;;; +23BC;HORIZONTAL SCAN LINE-7;So;0;ON;;;;;N;;;;; +23BD;HORIZONTAL SCAN LINE-9;So;0;ON;;;;;N;;;;; +23BE;DENTISTRY SYMBOL LIGHT VERTICAL AND TOP RIGHT;So;0;ON;;;;;N;;;;; +23BF;DENTISTRY SYMBOL LIGHT VERTICAL AND BOTTOM RIGHT;So;0;ON;;;;;N;;;;; +23C0;DENTISTRY SYMBOL LIGHT VERTICAL WITH CIRCLE;So;0;ON;;;;;N;;;;; +23C1;DENTISTRY SYMBOL LIGHT DOWN AND HORIZONTAL WITH CIRCLE;So;0;ON;;;;;N;;;;; +23C2;DENTISTRY SYMBOL LIGHT UP AND HORIZONTAL WITH CIRCLE;So;0;ON;;;;;N;;;;; +23C3;DENTISTRY SYMBOL LIGHT VERTICAL WITH TRIANGLE;So;0;ON;;;;;N;;;;; +23C4;DENTISTRY SYMBOL LIGHT DOWN AND HORIZONTAL WITH TRIANGLE;So;0;ON;;;;;N;;;;; +23C5;DENTISTRY SYMBOL LIGHT UP AND HORIZONTAL WITH TRIANGLE;So;0;ON;;;;;N;;;;; +23C6;DENTISTRY SYMBOL LIGHT VERTICAL AND WAVE;So;0;ON;;;;;N;;;;; +23C7;DENTISTRY SYMBOL LIGHT DOWN AND HORIZONTAL WITH WAVE;So;0;ON;;;;;N;;;;; +23C8;DENTISTRY SYMBOL LIGHT UP AND HORIZONTAL WITH WAVE;So;0;ON;;;;;N;;;;; +23C9;DENTISTRY SYMBOL LIGHT DOWN AND HORIZONTAL;So;0;ON;;;;;N;;;;; +23CA;DENTISTRY SYMBOL LIGHT UP AND HORIZONTAL;So;0;ON;;;;;N;;;;; +23CB;DENTISTRY SYMBOL LIGHT VERTICAL AND TOP LEFT;So;0;ON;;;;;N;;;;; +23CC;DENTISTRY SYMBOL LIGHT VERTICAL AND BOTTOM LEFT;So;0;ON;;;;;N;;;;; +23CD;SQUARE FOOT;So;0;ON;;;;;N;;;;; +23CE;RETURN SYMBOL;So;0;ON;;;;;N;;;;; +23CF;EJECT SYMBOL;So;0;ON;;;;;N;;;;; +23D0;VERTICAL LINE EXTENSION;So;0;ON;;;;;N;;;;; +23D1;METRICAL BREVE;So;0;ON;;;;;N;;;;; +23D2;METRICAL LONG OVER SHORT;So;0;ON;;;;;N;;;;; +23D3;METRICAL SHORT OVER LONG;So;0;ON;;;;;N;;;;; +23D4;METRICAL LONG OVER TWO SHORTS;So;0;ON;;;;;N;;;;; +23D5;METRICAL TWO SHORTS OVER LONG;So;0;ON;;;;;N;;;;; +23D6;METRICAL TWO SHORTS JOINED;So;0;ON;;;;;N;;;;; +23D7;METRICAL TRISEME;So;0;ON;;;;;N;;;;; +23D8;METRICAL TETRASEME;So;0;ON;;;;;N;;;;; +23D9;METRICAL PENTASEME;So;0;ON;;;;;N;;;;; +23DA;EARTH GROUND;So;0;ON;;;;;N;;;;; +23DB;FUSE;So;0;ON;;;;;N;;;;; +23DC;TOP PARENTHESIS;Sm;0;ON;;;;;N;;;;; +23DD;BOTTOM PARENTHESIS;Sm;0;ON;;;;;N;;;;; +23DE;TOP CURLY BRACKET;Sm;0;ON;;;;;N;;;;; +23DF;BOTTOM CURLY BRACKET;Sm;0;ON;;;;;N;;;;; +23E0;TOP TORTOISE SHELL BRACKET;Sm;0;ON;;;;;N;;;;; +23E1;BOTTOM TORTOISE SHELL BRACKET;Sm;0;ON;;;;;N;;;;; +23E2;WHITE TRAPEZIUM;So;0;ON;;;;;N;;;;; +23E3;BENZENE RING WITH CIRCLE;So;0;ON;;;;;N;;;;; +23E4;STRAIGHTNESS;So;0;ON;;;;;N;;;;; +23E5;FLATNESS;So;0;ON;;;;;N;;;;; +23E6;AC CURRENT;So;0;ON;;;;;N;;;;; +23E7;ELECTRICAL INTERSECTION;So;0;ON;;;;;N;;;;; +23E8;DECIMAL EXPONENT SYMBOL;So;0;ON;;;;;N;;;;; +23E9;BLACK RIGHT-POINTING DOUBLE TRIANGLE;So;0;ON;;;;;N;;;;; +23EA;BLACK LEFT-POINTING DOUBLE TRIANGLE;So;0;ON;;;;;N;;;;; +23EB;BLACK UP-POINTING DOUBLE TRIANGLE;So;0;ON;;;;;N;;;;; +23EC;BLACK DOWN-POINTING DOUBLE TRIANGLE;So;0;ON;;;;;N;;;;; +23ED;BLACK RIGHT-POINTING DOUBLE TRIANGLE WITH VERTICAL BAR;So;0;ON;;;;;N;;;;; +23EE;BLACK LEFT-POINTING DOUBLE TRIANGLE WITH VERTICAL BAR;So;0;ON;;;;;N;;;;; +23EF;BLACK RIGHT-POINTING TRIANGLE WITH DOUBLE VERTICAL BAR;So;0;ON;;;;;N;;;;; +23F0;ALARM CLOCK;So;0;ON;;;;;N;;;;; +23F1;STOPWATCH;So;0;ON;;;;;N;;;;; +23F2;TIMER CLOCK;So;0;ON;;;;;N;;;;; +23F3;HOURGLASS WITH FLOWING SAND;So;0;ON;;;;;N;;;;; +23F4;BLACK MEDIUM LEFT-POINTING TRIANGLE;So;0;ON;;;;;N;;;;; +23F5;BLACK MEDIUM RIGHT-POINTING TRIANGLE;So;0;ON;;;;;N;;;;; +23F6;BLACK MEDIUM UP-POINTING TRIANGLE;So;0;ON;;;;;N;;;;; +23F7;BLACK MEDIUM DOWN-POINTING TRIANGLE;So;0;ON;;;;;N;;;;; +23F8;DOUBLE VERTICAL BAR;So;0;ON;;;;;N;;;;; +23F9;BLACK SQUARE FOR STOP;So;0;ON;;;;;N;;;;; +23FA;BLACK CIRCLE FOR RECORD;So;0;ON;;;;;N;;;;; +23FB;POWER SYMBOL;So;0;ON;;;;;N;;;;; +23FC;POWER ON-OFF SYMBOL;So;0;ON;;;;;N;;;;; +23FD;POWER ON SYMBOL;So;0;ON;;;;;N;;;;; +23FE;POWER SLEEP SYMBOL;So;0;ON;;;;;N;;;;; +23FF;OBSERVER EYE SYMBOL;So;0;ON;;;;;N;;;;; +2400;SYMBOL FOR NULL;So;0;ON;;;;;N;GRAPHIC FOR NULL;;;; +2401;SYMBOL FOR START OF HEADING;So;0;ON;;;;;N;GRAPHIC FOR START OF HEADING;;;; +2402;SYMBOL FOR START OF TEXT;So;0;ON;;;;;N;GRAPHIC FOR START OF TEXT;;;; +2403;SYMBOL FOR END OF TEXT;So;0;ON;;;;;N;GRAPHIC FOR END OF TEXT;;;; +2404;SYMBOL FOR END OF TRANSMISSION;So;0;ON;;;;;N;GRAPHIC FOR END OF TRANSMISSION;;;; +2405;SYMBOL FOR ENQUIRY;So;0;ON;;;;;N;GRAPHIC FOR ENQUIRY;;;; +2406;SYMBOL FOR ACKNOWLEDGE;So;0;ON;;;;;N;GRAPHIC FOR ACKNOWLEDGE;;;; +2407;SYMBOL FOR BELL;So;0;ON;;;;;N;GRAPHIC FOR BELL;;;; +2408;SYMBOL FOR BACKSPACE;So;0;ON;;;;;N;GRAPHIC FOR BACKSPACE;;;; +2409;SYMBOL FOR HORIZONTAL TABULATION;So;0;ON;;;;;N;GRAPHIC FOR HORIZONTAL TABULATION;;;; +240A;SYMBOL FOR LINE FEED;So;0;ON;;;;;N;GRAPHIC FOR LINE FEED;;;; +240B;SYMBOL FOR VERTICAL TABULATION;So;0;ON;;;;;N;GRAPHIC FOR VERTICAL TABULATION;;;; +240C;SYMBOL FOR FORM FEED;So;0;ON;;;;;N;GRAPHIC FOR FORM FEED;;;; +240D;SYMBOL FOR CARRIAGE RETURN;So;0;ON;;;;;N;GRAPHIC FOR CARRIAGE RETURN;;;; +240E;SYMBOL FOR SHIFT OUT;So;0;ON;;;;;N;GRAPHIC FOR SHIFT OUT;;;; +240F;SYMBOL FOR SHIFT IN;So;0;ON;;;;;N;GRAPHIC FOR SHIFT IN;;;; +2410;SYMBOL FOR DATA LINK ESCAPE;So;0;ON;;;;;N;GRAPHIC FOR DATA LINK ESCAPE;;;; +2411;SYMBOL FOR DEVICE CONTROL ONE;So;0;ON;;;;;N;GRAPHIC FOR DEVICE CONTROL ONE;;;; +2412;SYMBOL FOR DEVICE CONTROL TWO;So;0;ON;;;;;N;GRAPHIC FOR DEVICE CONTROL TWO;;;; +2413;SYMBOL FOR DEVICE CONTROL THREE;So;0;ON;;;;;N;GRAPHIC FOR DEVICE CONTROL THREE;;;; +2414;SYMBOL FOR DEVICE CONTROL FOUR;So;0;ON;;;;;N;GRAPHIC FOR DEVICE CONTROL FOUR;;;; +2415;SYMBOL FOR NEGATIVE ACKNOWLEDGE;So;0;ON;;;;;N;GRAPHIC FOR NEGATIVE ACKNOWLEDGE;;;; +2416;SYMBOL FOR SYNCHRONOUS IDLE;So;0;ON;;;;;N;GRAPHIC FOR SYNCHRONOUS IDLE;;;; +2417;SYMBOL FOR END OF TRANSMISSION BLOCK;So;0;ON;;;;;N;GRAPHIC FOR END OF TRANSMISSION BLOCK;;;; +2418;SYMBOL FOR CANCEL;So;0;ON;;;;;N;GRAPHIC FOR CANCEL;;;; +2419;SYMBOL FOR END OF MEDIUM;So;0;ON;;;;;N;GRAPHIC FOR END OF MEDIUM;;;; +241A;SYMBOL FOR SUBSTITUTE;So;0;ON;;;;;N;GRAPHIC FOR SUBSTITUTE;;;; +241B;SYMBOL FOR ESCAPE;So;0;ON;;;;;N;GRAPHIC FOR ESCAPE;;;; +241C;SYMBOL FOR FILE SEPARATOR;So;0;ON;;;;;N;GRAPHIC FOR FILE SEPARATOR;;;; +241D;SYMBOL FOR GROUP SEPARATOR;So;0;ON;;;;;N;GRAPHIC FOR GROUP SEPARATOR;;;; +241E;SYMBOL FOR RECORD SEPARATOR;So;0;ON;;;;;N;GRAPHIC FOR RECORD SEPARATOR;;;; +241F;SYMBOL FOR UNIT SEPARATOR;So;0;ON;;;;;N;GRAPHIC FOR UNIT SEPARATOR;;;; +2420;SYMBOL FOR SPACE;So;0;ON;;;;;N;GRAPHIC FOR SPACE;;;; +2421;SYMBOL FOR DELETE;So;0;ON;;;;;N;GRAPHIC FOR DELETE;;;; +2422;BLANK SYMBOL;So;0;ON;;;;;N;BLANK;;;; +2423;OPEN BOX;So;0;ON;;;;;N;;;;; +2424;SYMBOL FOR NEWLINE;So;0;ON;;;;;N;GRAPHIC FOR NEWLINE;;;; +2425;SYMBOL FOR DELETE FORM TWO;So;0;ON;;;;;N;;;;; +2426;SYMBOL FOR SUBSTITUTE FORM TWO;So;0;ON;;;;;N;;;;; +2440;OCR HOOK;So;0;ON;;;;;N;;;;; +2441;OCR CHAIR;So;0;ON;;;;;N;;;;; +2442;OCR FORK;So;0;ON;;;;;N;;;;; +2443;OCR INVERTED FORK;So;0;ON;;;;;N;;;;; +2444;OCR BELT BUCKLE;So;0;ON;;;;;N;;;;; +2445;OCR BOW TIE;So;0;ON;;;;;N;;;;; +2446;OCR BRANCH BANK IDENTIFICATION;So;0;ON;;;;;N;;;;; +2447;OCR AMOUNT OF CHECK;So;0;ON;;;;;N;;;;; +2448;OCR DASH;So;0;ON;;;;;N;;;;; +2449;OCR CUSTOMER ACCOUNT NUMBER;So;0;ON;;;;;N;;;;; +244A;OCR DOUBLE BACKSLASH;So;0;ON;;;;;N;;;;; +2460;CIRCLED DIGIT ONE;No;0;ON; 0031;;1;1;N;;;;; +2461;CIRCLED DIGIT TWO;No;0;ON; 0032;;2;2;N;;;;; +2462;CIRCLED DIGIT THREE;No;0;ON; 0033;;3;3;N;;;;; +2463;CIRCLED DIGIT FOUR;No;0;ON; 0034;;4;4;N;;;;; +2464;CIRCLED DIGIT FIVE;No;0;ON; 0035;;5;5;N;;;;; +2465;CIRCLED DIGIT SIX;No;0;ON; 0036;;6;6;N;;;;; +2466;CIRCLED DIGIT SEVEN;No;0;ON; 0037;;7;7;N;;;;; +2467;CIRCLED DIGIT EIGHT;No;0;ON; 0038;;8;8;N;;;;; +2468;CIRCLED DIGIT NINE;No;0;ON; 0039;;9;9;N;;;;; +2469;CIRCLED NUMBER TEN;No;0;ON; 0031 0030;;;10;N;;;;; +246A;CIRCLED NUMBER ELEVEN;No;0;ON; 0031 0031;;;11;N;;;;; +246B;CIRCLED NUMBER TWELVE;No;0;ON; 0031 0032;;;12;N;;;;; +246C;CIRCLED NUMBER THIRTEEN;No;0;ON; 0031 0033;;;13;N;;;;; +246D;CIRCLED NUMBER FOURTEEN;No;0;ON; 0031 0034;;;14;N;;;;; +246E;CIRCLED NUMBER FIFTEEN;No;0;ON; 0031 0035;;;15;N;;;;; +246F;CIRCLED NUMBER SIXTEEN;No;0;ON; 0031 0036;;;16;N;;;;; +2470;CIRCLED NUMBER SEVENTEEN;No;0;ON; 0031 0037;;;17;N;;;;; +2471;CIRCLED NUMBER EIGHTEEN;No;0;ON; 0031 0038;;;18;N;;;;; +2472;CIRCLED NUMBER NINETEEN;No;0;ON; 0031 0039;;;19;N;;;;; +2473;CIRCLED NUMBER TWENTY;No;0;ON; 0032 0030;;;20;N;;;;; +2474;PARENTHESIZED DIGIT ONE;No;0;ON; 0028 0031 0029;;1;1;N;;;;; +2475;PARENTHESIZED DIGIT TWO;No;0;ON; 0028 0032 0029;;2;2;N;;;;; +2476;PARENTHESIZED DIGIT THREE;No;0;ON; 0028 0033 0029;;3;3;N;;;;; +2477;PARENTHESIZED DIGIT FOUR;No;0;ON; 0028 0034 0029;;4;4;N;;;;; +2478;PARENTHESIZED DIGIT FIVE;No;0;ON; 0028 0035 0029;;5;5;N;;;;; +2479;PARENTHESIZED DIGIT SIX;No;0;ON; 0028 0036 0029;;6;6;N;;;;; +247A;PARENTHESIZED DIGIT SEVEN;No;0;ON; 0028 0037 0029;;7;7;N;;;;; +247B;PARENTHESIZED DIGIT EIGHT;No;0;ON; 0028 0038 0029;;8;8;N;;;;; +247C;PARENTHESIZED DIGIT NINE;No;0;ON; 0028 0039 0029;;9;9;N;;;;; +247D;PARENTHESIZED NUMBER TEN;No;0;ON; 0028 0031 0030 0029;;;10;N;;;;; +247E;PARENTHESIZED NUMBER ELEVEN;No;0;ON; 0028 0031 0031 0029;;;11;N;;;;; +247F;PARENTHESIZED NUMBER TWELVE;No;0;ON; 0028 0031 0032 0029;;;12;N;;;;; +2480;PARENTHESIZED NUMBER THIRTEEN;No;0;ON; 0028 0031 0033 0029;;;13;N;;;;; +2481;PARENTHESIZED NUMBER FOURTEEN;No;0;ON; 0028 0031 0034 0029;;;14;N;;;;; +2482;PARENTHESIZED NUMBER FIFTEEN;No;0;ON; 0028 0031 0035 0029;;;15;N;;;;; +2483;PARENTHESIZED NUMBER SIXTEEN;No;0;ON; 0028 0031 0036 0029;;;16;N;;;;; +2484;PARENTHESIZED NUMBER SEVENTEEN;No;0;ON; 0028 0031 0037 0029;;;17;N;;;;; +2485;PARENTHESIZED NUMBER EIGHTEEN;No;0;ON; 0028 0031 0038 0029;;;18;N;;;;; +2486;PARENTHESIZED NUMBER NINETEEN;No;0;ON; 0028 0031 0039 0029;;;19;N;;;;; +2487;PARENTHESIZED NUMBER TWENTY;No;0;ON; 0028 0032 0030 0029;;;20;N;;;;; +2488;DIGIT ONE FULL STOP;No;0;EN; 0031 002E;;1;1;N;DIGIT ONE PERIOD;;;; +2489;DIGIT TWO FULL STOP;No;0;EN; 0032 002E;;2;2;N;DIGIT TWO PERIOD;;;; +248A;DIGIT THREE FULL STOP;No;0;EN; 0033 002E;;3;3;N;DIGIT THREE PERIOD;;;; +248B;DIGIT FOUR FULL STOP;No;0;EN; 0034 002E;;4;4;N;DIGIT FOUR PERIOD;;;; +248C;DIGIT FIVE FULL STOP;No;0;EN; 0035 002E;;5;5;N;DIGIT FIVE PERIOD;;;; +248D;DIGIT SIX FULL STOP;No;0;EN; 0036 002E;;6;6;N;DIGIT SIX PERIOD;;;; +248E;DIGIT SEVEN FULL STOP;No;0;EN; 0037 002E;;7;7;N;DIGIT SEVEN PERIOD;;;; +248F;DIGIT EIGHT FULL STOP;No;0;EN; 0038 002E;;8;8;N;DIGIT EIGHT PERIOD;;;; +2490;DIGIT NINE FULL STOP;No;0;EN; 0039 002E;;9;9;N;DIGIT NINE PERIOD;;;; +2491;NUMBER TEN FULL STOP;No;0;EN; 0031 0030 002E;;;10;N;NUMBER TEN PERIOD;;;; +2492;NUMBER ELEVEN FULL STOP;No;0;EN; 0031 0031 002E;;;11;N;NUMBER ELEVEN PERIOD;;;; +2493;NUMBER TWELVE FULL STOP;No;0;EN; 0031 0032 002E;;;12;N;NUMBER TWELVE PERIOD;;;; +2494;NUMBER THIRTEEN FULL STOP;No;0;EN; 0031 0033 002E;;;13;N;NUMBER THIRTEEN PERIOD;;;; +2495;NUMBER FOURTEEN FULL STOP;No;0;EN; 0031 0034 002E;;;14;N;NUMBER FOURTEEN PERIOD;;;; +2496;NUMBER FIFTEEN FULL STOP;No;0;EN; 0031 0035 002E;;;15;N;NUMBER FIFTEEN PERIOD;;;; +2497;NUMBER SIXTEEN FULL STOP;No;0;EN; 0031 0036 002E;;;16;N;NUMBER SIXTEEN PERIOD;;;; +2498;NUMBER SEVENTEEN FULL STOP;No;0;EN; 0031 0037 002E;;;17;N;NUMBER SEVENTEEN PERIOD;;;; +2499;NUMBER EIGHTEEN FULL STOP;No;0;EN; 0031 0038 002E;;;18;N;NUMBER EIGHTEEN PERIOD;;;; +249A;NUMBER NINETEEN FULL STOP;No;0;EN; 0031 0039 002E;;;19;N;NUMBER NINETEEN PERIOD;;;; +249B;NUMBER TWENTY FULL STOP;No;0;EN; 0032 0030 002E;;;20;N;NUMBER TWENTY PERIOD;;;; +249C;PARENTHESIZED LATIN SMALL LETTER A;So;0;L; 0028 0061 0029;;;;N;;;;; +249D;PARENTHESIZED LATIN SMALL LETTER B;So;0;L; 0028 0062 0029;;;;N;;;;; +249E;PARENTHESIZED LATIN SMALL LETTER C;So;0;L; 0028 0063 0029;;;;N;;;;; +249F;PARENTHESIZED LATIN SMALL LETTER D;So;0;L; 0028 0064 0029;;;;N;;;;; +24A0;PARENTHESIZED LATIN SMALL LETTER E;So;0;L; 0028 0065 0029;;;;N;;;;; +24A1;PARENTHESIZED LATIN SMALL LETTER F;So;0;L; 0028 0066 0029;;;;N;;;;; +24A2;PARENTHESIZED LATIN SMALL LETTER G;So;0;L; 0028 0067 0029;;;;N;;;;; +24A3;PARENTHESIZED LATIN SMALL LETTER H;So;0;L; 0028 0068 0029;;;;N;;;;; +24A4;PARENTHESIZED LATIN SMALL LETTER I;So;0;L; 0028 0069 0029;;;;N;;;;; +24A5;PARENTHESIZED LATIN SMALL LETTER J;So;0;L; 0028 006A 0029;;;;N;;;;; +24A6;PARENTHESIZED LATIN SMALL LETTER K;So;0;L; 0028 006B 0029;;;;N;;;;; +24A7;PARENTHESIZED LATIN SMALL LETTER L;So;0;L; 0028 006C 0029;;;;N;;;;; +24A8;PARENTHESIZED LATIN SMALL LETTER M;So;0;L; 0028 006D 0029;;;;N;;;;; +24A9;PARENTHESIZED LATIN SMALL LETTER N;So;0;L; 0028 006E 0029;;;;N;;;;; +24AA;PARENTHESIZED LATIN SMALL LETTER O;So;0;L; 0028 006F 0029;;;;N;;;;; +24AB;PARENTHESIZED LATIN SMALL LETTER P;So;0;L; 0028 0070 0029;;;;N;;;;; +24AC;PARENTHESIZED LATIN SMALL LETTER Q;So;0;L; 0028 0071 0029;;;;N;;;;; +24AD;PARENTHESIZED LATIN SMALL LETTER R;So;0;L; 0028 0072 0029;;;;N;;;;; +24AE;PARENTHESIZED LATIN SMALL LETTER S;So;0;L; 0028 0073 0029;;;;N;;;;; +24AF;PARENTHESIZED LATIN SMALL LETTER T;So;0;L; 0028 0074 0029;;;;N;;;;; +24B0;PARENTHESIZED LATIN SMALL LETTER U;So;0;L; 0028 0075 0029;;;;N;;;;; +24B1;PARENTHESIZED LATIN SMALL LETTER V;So;0;L; 0028 0076 0029;;;;N;;;;; +24B2;PARENTHESIZED LATIN SMALL LETTER W;So;0;L; 0028 0077 0029;;;;N;;;;; +24B3;PARENTHESIZED LATIN SMALL LETTER X;So;0;L; 0028 0078 0029;;;;N;;;;; +24B4;PARENTHESIZED LATIN SMALL LETTER Y;So;0;L; 0028 0079 0029;;;;N;;;;; +24B5;PARENTHESIZED LATIN SMALL LETTER Z;So;0;L; 0028 007A 0029;;;;N;;;;; +24B6;CIRCLED LATIN CAPITAL LETTER A;So;0;L; 0041;;;;N;;;;24D0; +24B7;CIRCLED LATIN CAPITAL LETTER B;So;0;L; 0042;;;;N;;;;24D1; +24B8;CIRCLED LATIN CAPITAL LETTER C;So;0;L; 0043;;;;N;;;;24D2; +24B9;CIRCLED LATIN CAPITAL LETTER D;So;0;L; 0044;;;;N;;;;24D3; +24BA;CIRCLED LATIN CAPITAL LETTER E;So;0;L; 0045;;;;N;;;;24D4; +24BB;CIRCLED LATIN CAPITAL LETTER F;So;0;L; 0046;;;;N;;;;24D5; +24BC;CIRCLED LATIN CAPITAL LETTER G;So;0;L; 0047;;;;N;;;;24D6; +24BD;CIRCLED LATIN CAPITAL LETTER H;So;0;L; 0048;;;;N;;;;24D7; +24BE;CIRCLED LATIN CAPITAL LETTER I;So;0;L; 0049;;;;N;;;;24D8; +24BF;CIRCLED LATIN CAPITAL LETTER J;So;0;L; 004A;;;;N;;;;24D9; +24C0;CIRCLED LATIN CAPITAL LETTER K;So;0;L; 004B;;;;N;;;;24DA; +24C1;CIRCLED LATIN CAPITAL LETTER L;So;0;L; 004C;;;;N;;;;24DB; +24C2;CIRCLED LATIN CAPITAL LETTER M;So;0;L; 004D;;;;N;;;;24DC; +24C3;CIRCLED LATIN CAPITAL LETTER N;So;0;L; 004E;;;;N;;;;24DD; +24C4;CIRCLED LATIN CAPITAL LETTER O;So;0;L; 004F;;;;N;;;;24DE; +24C5;CIRCLED LATIN CAPITAL LETTER P;So;0;L; 0050;;;;N;;;;24DF; +24C6;CIRCLED LATIN CAPITAL LETTER Q;So;0;L; 0051;;;;N;;;;24E0; +24C7;CIRCLED LATIN CAPITAL LETTER R;So;0;L; 0052;;;;N;;;;24E1; +24C8;CIRCLED LATIN CAPITAL LETTER S;So;0;L; 0053;;;;N;;;;24E2; +24C9;CIRCLED LATIN CAPITAL LETTER T;So;0;L; 0054;;;;N;;;;24E3; +24CA;CIRCLED LATIN CAPITAL LETTER U;So;0;L; 0055;;;;N;;;;24E4; +24CB;CIRCLED LATIN CAPITAL LETTER V;So;0;L; 0056;;;;N;;;;24E5; +24CC;CIRCLED LATIN CAPITAL LETTER W;So;0;L; 0057;;;;N;;;;24E6; +24CD;CIRCLED LATIN CAPITAL LETTER X;So;0;L; 0058;;;;N;;;;24E7; +24CE;CIRCLED LATIN CAPITAL LETTER Y;So;0;L; 0059;;;;N;;;;24E8; +24CF;CIRCLED LATIN CAPITAL LETTER Z;So;0;L; 005A;;;;N;;;;24E9; +24D0;CIRCLED LATIN SMALL LETTER A;So;0;L; 0061;;;;N;;;24B6;;24B6 +24D1;CIRCLED LATIN SMALL LETTER B;So;0;L; 0062;;;;N;;;24B7;;24B7 +24D2;CIRCLED LATIN SMALL LETTER C;So;0;L; 0063;;;;N;;;24B8;;24B8 +24D3;CIRCLED LATIN SMALL LETTER D;So;0;L; 0064;;;;N;;;24B9;;24B9 +24D4;CIRCLED LATIN SMALL LETTER E;So;0;L; 0065;;;;N;;;24BA;;24BA +24D5;CIRCLED LATIN SMALL LETTER F;So;0;L; 0066;;;;N;;;24BB;;24BB +24D6;CIRCLED LATIN SMALL LETTER G;So;0;L; 0067;;;;N;;;24BC;;24BC +24D7;CIRCLED LATIN SMALL LETTER H;So;0;L; 0068;;;;N;;;24BD;;24BD +24D8;CIRCLED LATIN SMALL LETTER I;So;0;L; 0069;;;;N;;;24BE;;24BE +24D9;CIRCLED LATIN SMALL LETTER J;So;0;L; 006A;;;;N;;;24BF;;24BF +24DA;CIRCLED LATIN SMALL LETTER K;So;0;L; 006B;;;;N;;;24C0;;24C0 +24DB;CIRCLED LATIN SMALL LETTER L;So;0;L; 006C;;;;N;;;24C1;;24C1 +24DC;CIRCLED LATIN SMALL LETTER M;So;0;L; 006D;;;;N;;;24C2;;24C2 +24DD;CIRCLED LATIN SMALL LETTER N;So;0;L; 006E;;;;N;;;24C3;;24C3 +24DE;CIRCLED LATIN SMALL LETTER O;So;0;L; 006F;;;;N;;;24C4;;24C4 +24DF;CIRCLED LATIN SMALL LETTER P;So;0;L; 0070;;;;N;;;24C5;;24C5 +24E0;CIRCLED LATIN SMALL LETTER Q;So;0;L; 0071;;;;N;;;24C6;;24C6 +24E1;CIRCLED LATIN SMALL LETTER R;So;0;L; 0072;;;;N;;;24C7;;24C7 +24E2;CIRCLED LATIN SMALL LETTER S;So;0;L; 0073;;;;N;;;24C8;;24C8 +24E3;CIRCLED LATIN SMALL LETTER T;So;0;L; 0074;;;;N;;;24C9;;24C9 +24E4;CIRCLED LATIN SMALL LETTER U;So;0;L; 0075;;;;N;;;24CA;;24CA +24E5;CIRCLED LATIN SMALL LETTER V;So;0;L; 0076;;;;N;;;24CB;;24CB +24E6;CIRCLED LATIN SMALL LETTER W;So;0;L; 0077;;;;N;;;24CC;;24CC +24E7;CIRCLED LATIN SMALL LETTER X;So;0;L; 0078;;;;N;;;24CD;;24CD +24E8;CIRCLED LATIN SMALL LETTER Y;So;0;L; 0079;;;;N;;;24CE;;24CE +24E9;CIRCLED LATIN SMALL LETTER Z;So;0;L; 007A;;;;N;;;24CF;;24CF +24EA;CIRCLED DIGIT ZERO;No;0;ON; 0030;;0;0;N;;;;; +24EB;NEGATIVE CIRCLED NUMBER ELEVEN;No;0;ON;;;;11;N;;;;; +24EC;NEGATIVE CIRCLED NUMBER TWELVE;No;0;ON;;;;12;N;;;;; +24ED;NEGATIVE CIRCLED NUMBER THIRTEEN;No;0;ON;;;;13;N;;;;; +24EE;NEGATIVE CIRCLED NUMBER FOURTEEN;No;0;ON;;;;14;N;;;;; +24EF;NEGATIVE CIRCLED NUMBER FIFTEEN;No;0;ON;;;;15;N;;;;; +24F0;NEGATIVE CIRCLED NUMBER SIXTEEN;No;0;ON;;;;16;N;;;;; +24F1;NEGATIVE CIRCLED NUMBER SEVENTEEN;No;0;ON;;;;17;N;;;;; +24F2;NEGATIVE CIRCLED NUMBER EIGHTEEN;No;0;ON;;;;18;N;;;;; +24F3;NEGATIVE CIRCLED NUMBER NINETEEN;No;0;ON;;;;19;N;;;;; +24F4;NEGATIVE CIRCLED NUMBER TWENTY;No;0;ON;;;;20;N;;;;; +24F5;DOUBLE CIRCLED DIGIT ONE;No;0;ON;;;1;1;N;;;;; +24F6;DOUBLE CIRCLED DIGIT TWO;No;0;ON;;;2;2;N;;;;; +24F7;DOUBLE CIRCLED DIGIT THREE;No;0;ON;;;3;3;N;;;;; +24F8;DOUBLE CIRCLED DIGIT FOUR;No;0;ON;;;4;4;N;;;;; +24F9;DOUBLE CIRCLED DIGIT FIVE;No;0;ON;;;5;5;N;;;;; +24FA;DOUBLE CIRCLED DIGIT SIX;No;0;ON;;;6;6;N;;;;; +24FB;DOUBLE CIRCLED DIGIT SEVEN;No;0;ON;;;7;7;N;;;;; +24FC;DOUBLE CIRCLED DIGIT EIGHT;No;0;ON;;;8;8;N;;;;; +24FD;DOUBLE CIRCLED DIGIT NINE;No;0;ON;;;9;9;N;;;;; +24FE;DOUBLE CIRCLED NUMBER TEN;No;0;ON;;;;10;N;;;;; +24FF;NEGATIVE CIRCLED DIGIT ZERO;No;0;ON;;;0;0;N;;;;; +2500;BOX DRAWINGS LIGHT HORIZONTAL;So;0;ON;;;;;N;FORMS LIGHT HORIZONTAL;;;; +2501;BOX DRAWINGS HEAVY HORIZONTAL;So;0;ON;;;;;N;FORMS HEAVY HORIZONTAL;;;; +2502;BOX DRAWINGS LIGHT VERTICAL;So;0;ON;;;;;N;FORMS LIGHT VERTICAL;;;; +2503;BOX DRAWINGS HEAVY VERTICAL;So;0;ON;;;;;N;FORMS HEAVY VERTICAL;;;; +2504;BOX DRAWINGS LIGHT TRIPLE DASH HORIZONTAL;So;0;ON;;;;;N;FORMS LIGHT TRIPLE DASH HORIZONTAL;;;; +2505;BOX DRAWINGS HEAVY TRIPLE DASH HORIZONTAL;So;0;ON;;;;;N;FORMS HEAVY TRIPLE DASH HORIZONTAL;;;; +2506;BOX DRAWINGS LIGHT TRIPLE DASH VERTICAL;So;0;ON;;;;;N;FORMS LIGHT TRIPLE DASH VERTICAL;;;; +2507;BOX DRAWINGS HEAVY TRIPLE DASH VERTICAL;So;0;ON;;;;;N;FORMS HEAVY TRIPLE DASH VERTICAL;;;; +2508;BOX DRAWINGS LIGHT QUADRUPLE DASH HORIZONTAL;So;0;ON;;;;;N;FORMS LIGHT QUADRUPLE DASH HORIZONTAL;;;; +2509;BOX DRAWINGS HEAVY QUADRUPLE DASH HORIZONTAL;So;0;ON;;;;;N;FORMS HEAVY QUADRUPLE DASH HORIZONTAL;;;; +250A;BOX DRAWINGS LIGHT QUADRUPLE DASH VERTICAL;So;0;ON;;;;;N;FORMS LIGHT QUADRUPLE DASH VERTICAL;;;; +250B;BOX DRAWINGS HEAVY QUADRUPLE DASH VERTICAL;So;0;ON;;;;;N;FORMS HEAVY QUADRUPLE DASH VERTICAL;;;; +250C;BOX DRAWINGS LIGHT DOWN AND RIGHT;So;0;ON;;;;;N;FORMS LIGHT DOWN AND RIGHT;;;; +250D;BOX DRAWINGS DOWN LIGHT AND RIGHT HEAVY;So;0;ON;;;;;N;FORMS DOWN LIGHT AND RIGHT HEAVY;;;; +250E;BOX DRAWINGS DOWN HEAVY AND RIGHT LIGHT;So;0;ON;;;;;N;FORMS DOWN HEAVY AND RIGHT LIGHT;;;; +250F;BOX DRAWINGS HEAVY DOWN AND RIGHT;So;0;ON;;;;;N;FORMS HEAVY DOWN AND RIGHT;;;; +2510;BOX DRAWINGS LIGHT DOWN AND LEFT;So;0;ON;;;;;N;FORMS LIGHT DOWN AND LEFT;;;; +2511;BOX DRAWINGS DOWN LIGHT AND LEFT HEAVY;So;0;ON;;;;;N;FORMS DOWN LIGHT AND LEFT HEAVY;;;; +2512;BOX DRAWINGS DOWN HEAVY AND LEFT LIGHT;So;0;ON;;;;;N;FORMS DOWN HEAVY AND LEFT LIGHT;;;; +2513;BOX DRAWINGS HEAVY DOWN AND LEFT;So;0;ON;;;;;N;FORMS HEAVY DOWN AND LEFT;;;; +2514;BOX DRAWINGS LIGHT UP AND RIGHT;So;0;ON;;;;;N;FORMS LIGHT UP AND RIGHT;;;; +2515;BOX DRAWINGS UP LIGHT AND RIGHT HEAVY;So;0;ON;;;;;N;FORMS UP LIGHT AND RIGHT HEAVY;;;; +2516;BOX DRAWINGS UP HEAVY AND RIGHT LIGHT;So;0;ON;;;;;N;FORMS UP HEAVY AND RIGHT LIGHT;;;; +2517;BOX DRAWINGS HEAVY UP AND RIGHT;So;0;ON;;;;;N;FORMS HEAVY UP AND RIGHT;;;; +2518;BOX DRAWINGS LIGHT UP AND LEFT;So;0;ON;;;;;N;FORMS LIGHT UP AND LEFT;;;; +2519;BOX DRAWINGS UP LIGHT AND LEFT HEAVY;So;0;ON;;;;;N;FORMS UP LIGHT AND LEFT HEAVY;;;; +251A;BOX DRAWINGS UP HEAVY AND LEFT LIGHT;So;0;ON;;;;;N;FORMS UP HEAVY AND LEFT LIGHT;;;; +251B;BOX DRAWINGS HEAVY UP AND LEFT;So;0;ON;;;;;N;FORMS HEAVY UP AND LEFT;;;; +251C;BOX DRAWINGS LIGHT VERTICAL AND RIGHT;So;0;ON;;;;;N;FORMS LIGHT VERTICAL AND RIGHT;;;; +251D;BOX DRAWINGS VERTICAL LIGHT AND RIGHT HEAVY;So;0;ON;;;;;N;FORMS VERTICAL LIGHT AND RIGHT HEAVY;;;; +251E;BOX DRAWINGS UP HEAVY AND RIGHT DOWN LIGHT;So;0;ON;;;;;N;FORMS UP HEAVY AND RIGHT DOWN LIGHT;;;; +251F;BOX DRAWINGS DOWN HEAVY AND RIGHT UP LIGHT;So;0;ON;;;;;N;FORMS DOWN HEAVY AND RIGHT UP LIGHT;;;; +2520;BOX DRAWINGS VERTICAL HEAVY AND RIGHT LIGHT;So;0;ON;;;;;N;FORMS VERTICAL HEAVY AND RIGHT LIGHT;;;; +2521;BOX DRAWINGS DOWN LIGHT AND RIGHT UP HEAVY;So;0;ON;;;;;N;FORMS DOWN LIGHT AND RIGHT UP HEAVY;;;; +2522;BOX DRAWINGS UP LIGHT AND RIGHT DOWN HEAVY;So;0;ON;;;;;N;FORMS UP LIGHT AND RIGHT DOWN HEAVY;;;; +2523;BOX DRAWINGS HEAVY VERTICAL AND RIGHT;So;0;ON;;;;;N;FORMS HEAVY VERTICAL AND RIGHT;;;; +2524;BOX DRAWINGS LIGHT VERTICAL AND LEFT;So;0;ON;;;;;N;FORMS LIGHT VERTICAL AND LEFT;;;; +2525;BOX DRAWINGS VERTICAL LIGHT AND LEFT HEAVY;So;0;ON;;;;;N;FORMS VERTICAL LIGHT AND LEFT HEAVY;;;; +2526;BOX DRAWINGS UP HEAVY AND LEFT DOWN LIGHT;So;0;ON;;;;;N;FORMS UP HEAVY AND LEFT DOWN LIGHT;;;; +2527;BOX DRAWINGS DOWN HEAVY AND LEFT UP LIGHT;So;0;ON;;;;;N;FORMS DOWN HEAVY AND LEFT UP LIGHT;;;; +2528;BOX DRAWINGS VERTICAL HEAVY AND LEFT LIGHT;So;0;ON;;;;;N;FORMS VERTICAL HEAVY AND LEFT LIGHT;;;; +2529;BOX DRAWINGS DOWN LIGHT AND LEFT UP HEAVY;So;0;ON;;;;;N;FORMS DOWN LIGHT AND LEFT UP HEAVY;;;; +252A;BOX DRAWINGS UP LIGHT AND LEFT DOWN HEAVY;So;0;ON;;;;;N;FORMS UP LIGHT AND LEFT DOWN HEAVY;;;; +252B;BOX DRAWINGS HEAVY VERTICAL AND LEFT;So;0;ON;;;;;N;FORMS HEAVY VERTICAL AND LEFT;;;; +252C;BOX DRAWINGS LIGHT DOWN AND HORIZONTAL;So;0;ON;;;;;N;FORMS LIGHT DOWN AND HORIZONTAL;;;; +252D;BOX DRAWINGS LEFT HEAVY AND RIGHT DOWN LIGHT;So;0;ON;;;;;N;FORMS LEFT HEAVY AND RIGHT DOWN LIGHT;;;; +252E;BOX DRAWINGS RIGHT HEAVY AND LEFT DOWN LIGHT;So;0;ON;;;;;N;FORMS RIGHT HEAVY AND LEFT DOWN LIGHT;;;; +252F;BOX DRAWINGS DOWN LIGHT AND HORIZONTAL HEAVY;So;0;ON;;;;;N;FORMS DOWN LIGHT AND HORIZONTAL HEAVY;;;; +2530;BOX DRAWINGS DOWN HEAVY AND HORIZONTAL LIGHT;So;0;ON;;;;;N;FORMS DOWN HEAVY AND HORIZONTAL LIGHT;;;; +2531;BOX DRAWINGS RIGHT LIGHT AND LEFT DOWN HEAVY;So;0;ON;;;;;N;FORMS RIGHT LIGHT AND LEFT DOWN HEAVY;;;; +2532;BOX DRAWINGS LEFT LIGHT AND RIGHT DOWN HEAVY;So;0;ON;;;;;N;FORMS LEFT LIGHT AND RIGHT DOWN HEAVY;;;; +2533;BOX DRAWINGS HEAVY DOWN AND HORIZONTAL;So;0;ON;;;;;N;FORMS HEAVY DOWN AND HORIZONTAL;;;; +2534;BOX DRAWINGS LIGHT UP AND HORIZONTAL;So;0;ON;;;;;N;FORMS LIGHT UP AND HORIZONTAL;;;; +2535;BOX DRAWINGS LEFT HEAVY AND RIGHT UP LIGHT;So;0;ON;;;;;N;FORMS LEFT HEAVY AND RIGHT UP LIGHT;;;; +2536;BOX DRAWINGS RIGHT HEAVY AND LEFT UP LIGHT;So;0;ON;;;;;N;FORMS RIGHT HEAVY AND LEFT UP LIGHT;;;; +2537;BOX DRAWINGS UP LIGHT AND HORIZONTAL HEAVY;So;0;ON;;;;;N;FORMS UP LIGHT AND HORIZONTAL HEAVY;;;; +2538;BOX DRAWINGS UP HEAVY AND HORIZONTAL LIGHT;So;0;ON;;;;;N;FORMS UP HEAVY AND HORIZONTAL LIGHT;;;; +2539;BOX DRAWINGS RIGHT LIGHT AND LEFT UP HEAVY;So;0;ON;;;;;N;FORMS RIGHT LIGHT AND LEFT UP HEAVY;;;; +253A;BOX DRAWINGS LEFT LIGHT AND RIGHT UP HEAVY;So;0;ON;;;;;N;FORMS LEFT LIGHT AND RIGHT UP HEAVY;;;; +253B;BOX DRAWINGS HEAVY UP AND HORIZONTAL;So;0;ON;;;;;N;FORMS HEAVY UP AND HORIZONTAL;;;; +253C;BOX DRAWINGS LIGHT VERTICAL AND HORIZONTAL;So;0;ON;;;;;N;FORMS LIGHT VERTICAL AND HORIZONTAL;;;; +253D;BOX DRAWINGS LEFT HEAVY AND RIGHT VERTICAL LIGHT;So;0;ON;;;;;N;FORMS LEFT HEAVY AND RIGHT VERTICAL LIGHT;;;; +253E;BOX DRAWINGS RIGHT HEAVY AND LEFT VERTICAL LIGHT;So;0;ON;;;;;N;FORMS RIGHT HEAVY AND LEFT VERTICAL LIGHT;;;; +253F;BOX DRAWINGS VERTICAL LIGHT AND HORIZONTAL HEAVY;So;0;ON;;;;;N;FORMS VERTICAL LIGHT AND HORIZONTAL HEAVY;;;; +2540;BOX DRAWINGS UP HEAVY AND DOWN HORIZONTAL LIGHT;So;0;ON;;;;;N;FORMS UP HEAVY AND DOWN HORIZONTAL LIGHT;;;; +2541;BOX DRAWINGS DOWN HEAVY AND UP HORIZONTAL LIGHT;So;0;ON;;;;;N;FORMS DOWN HEAVY AND UP HORIZONTAL LIGHT;;;; +2542;BOX DRAWINGS VERTICAL HEAVY AND HORIZONTAL LIGHT;So;0;ON;;;;;N;FORMS VERTICAL HEAVY AND HORIZONTAL LIGHT;;;; +2543;BOX DRAWINGS LEFT UP HEAVY AND RIGHT DOWN LIGHT;So;0;ON;;;;;N;FORMS LEFT UP HEAVY AND RIGHT DOWN LIGHT;;;; +2544;BOX DRAWINGS RIGHT UP HEAVY AND LEFT DOWN LIGHT;So;0;ON;;;;;N;FORMS RIGHT UP HEAVY AND LEFT DOWN LIGHT;;;; +2545;BOX DRAWINGS LEFT DOWN HEAVY AND RIGHT UP LIGHT;So;0;ON;;;;;N;FORMS LEFT DOWN HEAVY AND RIGHT UP LIGHT;;;; +2546;BOX DRAWINGS RIGHT DOWN HEAVY AND LEFT UP LIGHT;So;0;ON;;;;;N;FORMS RIGHT DOWN HEAVY AND LEFT UP LIGHT;;;; +2547;BOX DRAWINGS DOWN LIGHT AND UP HORIZONTAL HEAVY;So;0;ON;;;;;N;FORMS DOWN LIGHT AND UP HORIZONTAL HEAVY;;;; +2548;BOX DRAWINGS UP LIGHT AND DOWN HORIZONTAL HEAVY;So;0;ON;;;;;N;FORMS UP LIGHT AND DOWN HORIZONTAL HEAVY;;;; +2549;BOX DRAWINGS RIGHT LIGHT AND LEFT VERTICAL HEAVY;So;0;ON;;;;;N;FORMS RIGHT LIGHT AND LEFT VERTICAL HEAVY;;;; +254A;BOX DRAWINGS LEFT LIGHT AND RIGHT VERTICAL HEAVY;So;0;ON;;;;;N;FORMS LEFT LIGHT AND RIGHT VERTICAL HEAVY;;;; +254B;BOX DRAWINGS HEAVY VERTICAL AND HORIZONTAL;So;0;ON;;;;;N;FORMS HEAVY VERTICAL AND HORIZONTAL;;;; +254C;BOX DRAWINGS LIGHT DOUBLE DASH HORIZONTAL;So;0;ON;;;;;N;FORMS LIGHT DOUBLE DASH HORIZONTAL;;;; +254D;BOX DRAWINGS HEAVY DOUBLE DASH HORIZONTAL;So;0;ON;;;;;N;FORMS HEAVY DOUBLE DASH HORIZONTAL;;;; +254E;BOX DRAWINGS LIGHT DOUBLE DASH VERTICAL;So;0;ON;;;;;N;FORMS LIGHT DOUBLE DASH VERTICAL;;;; +254F;BOX DRAWINGS HEAVY DOUBLE DASH VERTICAL;So;0;ON;;;;;N;FORMS HEAVY DOUBLE DASH VERTICAL;;;; +2550;BOX DRAWINGS DOUBLE HORIZONTAL;So;0;ON;;;;;N;FORMS DOUBLE HORIZONTAL;;;; +2551;BOX DRAWINGS DOUBLE VERTICAL;So;0;ON;;;;;N;FORMS DOUBLE VERTICAL;;;; +2552;BOX DRAWINGS DOWN SINGLE AND RIGHT DOUBLE;So;0;ON;;;;;N;FORMS DOWN SINGLE AND RIGHT DOUBLE;;;; +2553;BOX DRAWINGS DOWN DOUBLE AND RIGHT SINGLE;So;0;ON;;;;;N;FORMS DOWN DOUBLE AND RIGHT SINGLE;;;; +2554;BOX DRAWINGS DOUBLE DOWN AND RIGHT;So;0;ON;;;;;N;FORMS DOUBLE DOWN AND RIGHT;;;; +2555;BOX DRAWINGS DOWN SINGLE AND LEFT DOUBLE;So;0;ON;;;;;N;FORMS DOWN SINGLE AND LEFT DOUBLE;;;; +2556;BOX DRAWINGS DOWN DOUBLE AND LEFT SINGLE;So;0;ON;;;;;N;FORMS DOWN DOUBLE AND LEFT SINGLE;;;; +2557;BOX DRAWINGS DOUBLE DOWN AND LEFT;So;0;ON;;;;;N;FORMS DOUBLE DOWN AND LEFT;;;; +2558;BOX DRAWINGS UP SINGLE AND RIGHT DOUBLE;So;0;ON;;;;;N;FORMS UP SINGLE AND RIGHT DOUBLE;;;; +2559;BOX DRAWINGS UP DOUBLE AND RIGHT SINGLE;So;0;ON;;;;;N;FORMS UP DOUBLE AND RIGHT SINGLE;;;; +255A;BOX DRAWINGS DOUBLE UP AND RIGHT;So;0;ON;;;;;N;FORMS DOUBLE UP AND RIGHT;;;; +255B;BOX DRAWINGS UP SINGLE AND LEFT DOUBLE;So;0;ON;;;;;N;FORMS UP SINGLE AND LEFT DOUBLE;;;; +255C;BOX DRAWINGS UP DOUBLE AND LEFT SINGLE;So;0;ON;;;;;N;FORMS UP DOUBLE AND LEFT SINGLE;;;; +255D;BOX DRAWINGS DOUBLE UP AND LEFT;So;0;ON;;;;;N;FORMS DOUBLE UP AND LEFT;;;; +255E;BOX DRAWINGS VERTICAL SINGLE AND RIGHT DOUBLE;So;0;ON;;;;;N;FORMS VERTICAL SINGLE AND RIGHT DOUBLE;;;; +255F;BOX DRAWINGS VERTICAL DOUBLE AND RIGHT SINGLE;So;0;ON;;;;;N;FORMS VERTICAL DOUBLE AND RIGHT SINGLE;;;; +2560;BOX DRAWINGS DOUBLE VERTICAL AND RIGHT;So;0;ON;;;;;N;FORMS DOUBLE VERTICAL AND RIGHT;;;; +2561;BOX DRAWINGS VERTICAL SINGLE AND LEFT DOUBLE;So;0;ON;;;;;N;FORMS VERTICAL SINGLE AND LEFT DOUBLE;;;; +2562;BOX DRAWINGS VERTICAL DOUBLE AND LEFT SINGLE;So;0;ON;;;;;N;FORMS VERTICAL DOUBLE AND LEFT SINGLE;;;; +2563;BOX DRAWINGS DOUBLE VERTICAL AND LEFT;So;0;ON;;;;;N;FORMS DOUBLE VERTICAL AND LEFT;;;; +2564;BOX DRAWINGS DOWN SINGLE AND HORIZONTAL DOUBLE;So;0;ON;;;;;N;FORMS DOWN SINGLE AND HORIZONTAL DOUBLE;;;; +2565;BOX DRAWINGS DOWN DOUBLE AND HORIZONTAL SINGLE;So;0;ON;;;;;N;FORMS DOWN DOUBLE AND HORIZONTAL SINGLE;;;; +2566;BOX DRAWINGS DOUBLE DOWN AND HORIZONTAL;So;0;ON;;;;;N;FORMS DOUBLE DOWN AND HORIZONTAL;;;; +2567;BOX DRAWINGS UP SINGLE AND HORIZONTAL DOUBLE;So;0;ON;;;;;N;FORMS UP SINGLE AND HORIZONTAL DOUBLE;;;; +2568;BOX DRAWINGS UP DOUBLE AND HORIZONTAL SINGLE;So;0;ON;;;;;N;FORMS UP DOUBLE AND HORIZONTAL SINGLE;;;; +2569;BOX DRAWINGS DOUBLE UP AND HORIZONTAL;So;0;ON;;;;;N;FORMS DOUBLE UP AND HORIZONTAL;;;; +256A;BOX DRAWINGS VERTICAL SINGLE AND HORIZONTAL DOUBLE;So;0;ON;;;;;N;FORMS VERTICAL SINGLE AND HORIZONTAL DOUBLE;;;; +256B;BOX DRAWINGS VERTICAL DOUBLE AND HORIZONTAL SINGLE;So;0;ON;;;;;N;FORMS VERTICAL DOUBLE AND HORIZONTAL SINGLE;;;; +256C;BOX DRAWINGS DOUBLE VERTICAL AND HORIZONTAL;So;0;ON;;;;;N;FORMS DOUBLE VERTICAL AND HORIZONTAL;;;; +256D;BOX DRAWINGS LIGHT ARC DOWN AND RIGHT;So;0;ON;;;;;N;FORMS LIGHT ARC DOWN AND RIGHT;;;; +256E;BOX DRAWINGS LIGHT ARC DOWN AND LEFT;So;0;ON;;;;;N;FORMS LIGHT ARC DOWN AND LEFT;;;; +256F;BOX DRAWINGS LIGHT ARC UP AND LEFT;So;0;ON;;;;;N;FORMS LIGHT ARC UP AND LEFT;;;; +2570;BOX DRAWINGS LIGHT ARC UP AND RIGHT;So;0;ON;;;;;N;FORMS LIGHT ARC UP AND RIGHT;;;; +2571;BOX DRAWINGS LIGHT DIAGONAL UPPER RIGHT TO LOWER LEFT;So;0;ON;;;;;N;FORMS LIGHT DIAGONAL UPPER RIGHT TO LOWER LEFT;;;; +2572;BOX DRAWINGS LIGHT DIAGONAL UPPER LEFT TO LOWER RIGHT;So;0;ON;;;;;N;FORMS LIGHT DIAGONAL UPPER LEFT TO LOWER RIGHT;;;; +2573;BOX DRAWINGS LIGHT DIAGONAL CROSS;So;0;ON;;;;;N;FORMS LIGHT DIAGONAL CROSS;;;; +2574;BOX DRAWINGS LIGHT LEFT;So;0;ON;;;;;N;FORMS LIGHT LEFT;;;; +2575;BOX DRAWINGS LIGHT UP;So;0;ON;;;;;N;FORMS LIGHT UP;;;; +2576;BOX DRAWINGS LIGHT RIGHT;So;0;ON;;;;;N;FORMS LIGHT RIGHT;;;; +2577;BOX DRAWINGS LIGHT DOWN;So;0;ON;;;;;N;FORMS LIGHT DOWN;;;; +2578;BOX DRAWINGS HEAVY LEFT;So;0;ON;;;;;N;FORMS HEAVY LEFT;;;; +2579;BOX DRAWINGS HEAVY UP;So;0;ON;;;;;N;FORMS HEAVY UP;;;; +257A;BOX DRAWINGS HEAVY RIGHT;So;0;ON;;;;;N;FORMS HEAVY RIGHT;;;; +257B;BOX DRAWINGS HEAVY DOWN;So;0;ON;;;;;N;FORMS HEAVY DOWN;;;; +257C;BOX DRAWINGS LIGHT LEFT AND HEAVY RIGHT;So;0;ON;;;;;N;FORMS LIGHT LEFT AND HEAVY RIGHT;;;; +257D;BOX DRAWINGS LIGHT UP AND HEAVY DOWN;So;0;ON;;;;;N;FORMS LIGHT UP AND HEAVY DOWN;;;; +257E;BOX DRAWINGS HEAVY LEFT AND LIGHT RIGHT;So;0;ON;;;;;N;FORMS HEAVY LEFT AND LIGHT RIGHT;;;; +257F;BOX DRAWINGS HEAVY UP AND LIGHT DOWN;So;0;ON;;;;;N;FORMS HEAVY UP AND LIGHT DOWN;;;; +2580;UPPER HALF BLOCK;So;0;ON;;;;;N;;;;; +2581;LOWER ONE EIGHTH BLOCK;So;0;ON;;;;;N;;;;; +2582;LOWER ONE QUARTER BLOCK;So;0;ON;;;;;N;;;;; +2583;LOWER THREE EIGHTHS BLOCK;So;0;ON;;;;;N;;;;; +2584;LOWER HALF BLOCK;So;0;ON;;;;;N;;;;; +2585;LOWER FIVE EIGHTHS BLOCK;So;0;ON;;;;;N;;;;; +2586;LOWER THREE QUARTERS BLOCK;So;0;ON;;;;;N;LOWER THREE QUARTER BLOCK;;;; +2587;LOWER SEVEN EIGHTHS BLOCK;So;0;ON;;;;;N;;;;; +2588;FULL BLOCK;So;0;ON;;;;;N;;;;; +2589;LEFT SEVEN EIGHTHS BLOCK;So;0;ON;;;;;N;;;;; +258A;LEFT THREE QUARTERS BLOCK;So;0;ON;;;;;N;LEFT THREE QUARTER BLOCK;;;; +258B;LEFT FIVE EIGHTHS BLOCK;So;0;ON;;;;;N;;;;; +258C;LEFT HALF BLOCK;So;0;ON;;;;;N;;;;; +258D;LEFT THREE EIGHTHS BLOCK;So;0;ON;;;;;N;;;;; +258E;LEFT ONE QUARTER BLOCK;So;0;ON;;;;;N;;;;; +258F;LEFT ONE EIGHTH BLOCK;So;0;ON;;;;;N;;;;; +2590;RIGHT HALF BLOCK;So;0;ON;;;;;N;;;;; +2591;LIGHT SHADE;So;0;ON;;;;;N;;;;; +2592;MEDIUM SHADE;So;0;ON;;;;;N;;;;; +2593;DARK SHADE;So;0;ON;;;;;N;;;;; +2594;UPPER ONE EIGHTH BLOCK;So;0;ON;;;;;N;;;;; +2595;RIGHT ONE EIGHTH BLOCK;So;0;ON;;;;;N;;;;; +2596;QUADRANT LOWER LEFT;So;0;ON;;;;;N;;;;; +2597;QUADRANT LOWER RIGHT;So;0;ON;;;;;N;;;;; +2598;QUADRANT UPPER LEFT;So;0;ON;;;;;N;;;;; +2599;QUADRANT UPPER LEFT AND LOWER LEFT AND LOWER RIGHT;So;0;ON;;;;;N;;;;; +259A;QUADRANT UPPER LEFT AND LOWER RIGHT;So;0;ON;;;;;N;;;;; +259B;QUADRANT UPPER LEFT AND UPPER RIGHT AND LOWER LEFT;So;0;ON;;;;;N;;;;; +259C;QUADRANT UPPER LEFT AND UPPER RIGHT AND LOWER RIGHT;So;0;ON;;;;;N;;;;; +259D;QUADRANT UPPER RIGHT;So;0;ON;;;;;N;;;;; +259E;QUADRANT UPPER RIGHT AND LOWER LEFT;So;0;ON;;;;;N;;;;; +259F;QUADRANT UPPER RIGHT AND LOWER LEFT AND LOWER RIGHT;So;0;ON;;;;;N;;;;; +25A0;BLACK SQUARE;So;0;ON;;;;;N;;;;; +25A1;WHITE SQUARE;So;0;ON;;;;;N;;;;; +25A2;WHITE SQUARE WITH ROUNDED CORNERS;So;0;ON;;;;;N;;;;; +25A3;WHITE SQUARE CONTAINING BLACK SMALL SQUARE;So;0;ON;;;;;N;;;;; +25A4;SQUARE WITH HORIZONTAL FILL;So;0;ON;;;;;N;;;;; +25A5;SQUARE WITH VERTICAL FILL;So;0;ON;;;;;N;;;;; +25A6;SQUARE WITH ORTHOGONAL CROSSHATCH FILL;So;0;ON;;;;;N;;;;; +25A7;SQUARE WITH UPPER LEFT TO LOWER RIGHT FILL;So;0;ON;;;;;N;;;;; +25A8;SQUARE WITH UPPER RIGHT TO LOWER LEFT FILL;So;0;ON;;;;;N;;;;; +25A9;SQUARE WITH DIAGONAL CROSSHATCH FILL;So;0;ON;;;;;N;;;;; +25AA;BLACK SMALL SQUARE;So;0;ON;;;;;N;;;;; +25AB;WHITE SMALL SQUARE;So;0;ON;;;;;N;;;;; +25AC;BLACK RECTANGLE;So;0;ON;;;;;N;;;;; +25AD;WHITE RECTANGLE;So;0;ON;;;;;N;;;;; +25AE;BLACK VERTICAL RECTANGLE;So;0;ON;;;;;N;;;;; +25AF;WHITE VERTICAL RECTANGLE;So;0;ON;;;;;N;;;;; +25B0;BLACK PARALLELOGRAM;So;0;ON;;;;;N;;;;; +25B1;WHITE PARALLELOGRAM;So;0;ON;;;;;N;;;;; +25B2;BLACK UP-POINTING TRIANGLE;So;0;ON;;;;;N;BLACK UP POINTING TRIANGLE;;;; +25B3;WHITE UP-POINTING TRIANGLE;So;0;ON;;;;;N;WHITE UP POINTING TRIANGLE;;;; +25B4;BLACK UP-POINTING SMALL TRIANGLE;So;0;ON;;;;;N;BLACK UP POINTING SMALL TRIANGLE;;;; +25B5;WHITE UP-POINTING SMALL TRIANGLE;So;0;ON;;;;;N;WHITE UP POINTING SMALL TRIANGLE;;;; +25B6;BLACK RIGHT-POINTING TRIANGLE;So;0;ON;;;;;N;BLACK RIGHT POINTING TRIANGLE;;;; +25B7;WHITE RIGHT-POINTING TRIANGLE;Sm;0;ON;;;;;N;WHITE RIGHT POINTING TRIANGLE;;;; +25B8;BLACK RIGHT-POINTING SMALL TRIANGLE;So;0;ON;;;;;N;BLACK RIGHT POINTING SMALL TRIANGLE;;;; +25B9;WHITE RIGHT-POINTING SMALL TRIANGLE;So;0;ON;;;;;N;WHITE RIGHT POINTING SMALL TRIANGLE;;;; +25BA;BLACK RIGHT-POINTING POINTER;So;0;ON;;;;;N;BLACK RIGHT POINTING POINTER;;;; +25BB;WHITE RIGHT-POINTING POINTER;So;0;ON;;;;;N;WHITE RIGHT POINTING POINTER;;;; +25BC;BLACK DOWN-POINTING TRIANGLE;So;0;ON;;;;;N;BLACK DOWN POINTING TRIANGLE;;;; +25BD;WHITE DOWN-POINTING TRIANGLE;So;0;ON;;;;;N;WHITE DOWN POINTING TRIANGLE;;;; +25BE;BLACK DOWN-POINTING SMALL TRIANGLE;So;0;ON;;;;;N;BLACK DOWN POINTING SMALL TRIANGLE;;;; +25BF;WHITE DOWN-POINTING SMALL TRIANGLE;So;0;ON;;;;;N;WHITE DOWN POINTING SMALL TRIANGLE;;;; +25C0;BLACK LEFT-POINTING TRIANGLE;So;0;ON;;;;;N;BLACK LEFT POINTING TRIANGLE;;;; +25C1;WHITE LEFT-POINTING TRIANGLE;Sm;0;ON;;;;;N;WHITE LEFT POINTING TRIANGLE;;;; +25C2;BLACK LEFT-POINTING SMALL TRIANGLE;So;0;ON;;;;;N;BLACK LEFT POINTING SMALL TRIANGLE;;;; +25C3;WHITE LEFT-POINTING SMALL TRIANGLE;So;0;ON;;;;;N;WHITE LEFT POINTING SMALL TRIANGLE;;;; +25C4;BLACK LEFT-POINTING POINTER;So;0;ON;;;;;N;BLACK LEFT POINTING POINTER;;;; +25C5;WHITE LEFT-POINTING POINTER;So;0;ON;;;;;N;WHITE LEFT POINTING POINTER;;;; +25C6;BLACK DIAMOND;So;0;ON;;;;;N;;;;; +25C7;WHITE DIAMOND;So;0;ON;;;;;N;;;;; +25C8;WHITE DIAMOND CONTAINING BLACK SMALL DIAMOND;So;0;ON;;;;;N;;;;; +25C9;FISHEYE;So;0;ON;;;;;N;;;;; +25CA;LOZENGE;So;0;ON;;;;;N;;;;; +25CB;WHITE CIRCLE;So;0;ON;;;;;N;;;;; +25CC;DOTTED CIRCLE;So;0;ON;;;;;N;;;;; +25CD;CIRCLE WITH VERTICAL FILL;So;0;ON;;;;;N;;;;; +25CE;BULLSEYE;So;0;ON;;;;;N;;;;; +25CF;BLACK CIRCLE;So;0;ON;;;;;N;;;;; +25D0;CIRCLE WITH LEFT HALF BLACK;So;0;ON;;;;;N;;;;; +25D1;CIRCLE WITH RIGHT HALF BLACK;So;0;ON;;;;;N;;;;; +25D2;CIRCLE WITH LOWER HALF BLACK;So;0;ON;;;;;N;;;;; +25D3;CIRCLE WITH UPPER HALF BLACK;So;0;ON;;;;;N;;;;; +25D4;CIRCLE WITH UPPER RIGHT QUADRANT BLACK;So;0;ON;;;;;N;;;;; +25D5;CIRCLE WITH ALL BUT UPPER LEFT QUADRANT BLACK;So;0;ON;;;;;N;;;;; +25D6;LEFT HALF BLACK CIRCLE;So;0;ON;;;;;N;;;;; +25D7;RIGHT HALF BLACK CIRCLE;So;0;ON;;;;;N;;;;; +25D8;INVERSE BULLET;So;0;ON;;;;;N;;;;; +25D9;INVERSE WHITE CIRCLE;So;0;ON;;;;;N;;;;; +25DA;UPPER HALF INVERSE WHITE CIRCLE;So;0;ON;;;;;N;;;;; +25DB;LOWER HALF INVERSE WHITE CIRCLE;So;0;ON;;;;;N;;;;; +25DC;UPPER LEFT QUADRANT CIRCULAR ARC;So;0;ON;;;;;N;;;;; +25DD;UPPER RIGHT QUADRANT CIRCULAR ARC;So;0;ON;;;;;N;;;;; +25DE;LOWER RIGHT QUADRANT CIRCULAR ARC;So;0;ON;;;;;N;;;;; +25DF;LOWER LEFT QUADRANT CIRCULAR ARC;So;0;ON;;;;;N;;;;; +25E0;UPPER HALF CIRCLE;So;0;ON;;;;;N;;;;; +25E1;LOWER HALF CIRCLE;So;0;ON;;;;;N;;;;; +25E2;BLACK LOWER RIGHT TRIANGLE;So;0;ON;;;;;N;;;;; +25E3;BLACK LOWER LEFT TRIANGLE;So;0;ON;;;;;N;;;;; +25E4;BLACK UPPER LEFT TRIANGLE;So;0;ON;;;;;N;;;;; +25E5;BLACK UPPER RIGHT TRIANGLE;So;0;ON;;;;;N;;;;; +25E6;WHITE BULLET;So;0;ON;;;;;N;;;;; +25E7;SQUARE WITH LEFT HALF BLACK;So;0;ON;;;;;N;;;;; +25E8;SQUARE WITH RIGHT HALF BLACK;So;0;ON;;;;;N;;;;; +25E9;SQUARE WITH UPPER LEFT DIAGONAL HALF BLACK;So;0;ON;;;;;N;;;;; +25EA;SQUARE WITH LOWER RIGHT DIAGONAL HALF BLACK;So;0;ON;;;;;N;;;;; +25EB;WHITE SQUARE WITH VERTICAL BISECTING LINE;So;0;ON;;;;;N;;;;; +25EC;WHITE UP-POINTING TRIANGLE WITH DOT;So;0;ON;;;;;N;WHITE UP POINTING TRIANGLE WITH DOT;;;; +25ED;UP-POINTING TRIANGLE WITH LEFT HALF BLACK;So;0;ON;;;;;N;UP POINTING TRIANGLE WITH LEFT HALF BLACK;;;; +25EE;UP-POINTING TRIANGLE WITH RIGHT HALF BLACK;So;0;ON;;;;;N;UP POINTING TRIANGLE WITH RIGHT HALF BLACK;;;; +25EF;LARGE CIRCLE;So;0;ON;;;;;N;;;;; +25F0;WHITE SQUARE WITH UPPER LEFT QUADRANT;So;0;ON;;;;;N;;;;; +25F1;WHITE SQUARE WITH LOWER LEFT QUADRANT;So;0;ON;;;;;N;;;;; +25F2;WHITE SQUARE WITH LOWER RIGHT QUADRANT;So;0;ON;;;;;N;;;;; +25F3;WHITE SQUARE WITH UPPER RIGHT QUADRANT;So;0;ON;;;;;N;;;;; +25F4;WHITE CIRCLE WITH UPPER LEFT QUADRANT;So;0;ON;;;;;N;;;;; +25F5;WHITE CIRCLE WITH LOWER LEFT QUADRANT;So;0;ON;;;;;N;;;;; +25F6;WHITE CIRCLE WITH LOWER RIGHT QUADRANT;So;0;ON;;;;;N;;;;; +25F7;WHITE CIRCLE WITH UPPER RIGHT QUADRANT;So;0;ON;;;;;N;;;;; +25F8;UPPER LEFT TRIANGLE;Sm;0;ON;;;;;N;;;;; +25F9;UPPER RIGHT TRIANGLE;Sm;0;ON;;;;;N;;;;; +25FA;LOWER LEFT TRIANGLE;Sm;0;ON;;;;;N;;;;; +25FB;WHITE MEDIUM SQUARE;Sm;0;ON;;;;;N;;;;; +25FC;BLACK MEDIUM SQUARE;Sm;0;ON;;;;;N;;;;; +25FD;WHITE MEDIUM SMALL SQUARE;Sm;0;ON;;;;;N;;;;; +25FE;BLACK MEDIUM SMALL SQUARE;Sm;0;ON;;;;;N;;;;; +25FF;LOWER RIGHT TRIANGLE;Sm;0;ON;;;;;N;;;;; +2600;BLACK SUN WITH RAYS;So;0;ON;;;;;N;;;;; +2601;CLOUD;So;0;ON;;;;;N;;;;; +2602;UMBRELLA;So;0;ON;;;;;N;;;;; +2603;SNOWMAN;So;0;ON;;;;;N;;;;; +2604;COMET;So;0;ON;;;;;N;;;;; +2605;BLACK STAR;So;0;ON;;;;;N;;;;; +2606;WHITE STAR;So;0;ON;;;;;N;;;;; +2607;LIGHTNING;So;0;ON;;;;;N;;;;; +2608;THUNDERSTORM;So;0;ON;;;;;N;;;;; +2609;SUN;So;0;ON;;;;;N;;;;; +260A;ASCENDING NODE;So;0;ON;;;;;N;;;;; +260B;DESCENDING NODE;So;0;ON;;;;;N;;;;; +260C;CONJUNCTION;So;0;ON;;;;;N;;;;; +260D;OPPOSITION;So;0;ON;;;;;N;;;;; +260E;BLACK TELEPHONE;So;0;ON;;;;;N;;;;; +260F;WHITE TELEPHONE;So;0;ON;;;;;N;;;;; +2610;BALLOT BOX;So;0;ON;;;;;N;;;;; +2611;BALLOT BOX WITH CHECK;So;0;ON;;;;;N;;;;; +2612;BALLOT BOX WITH X;So;0;ON;;;;;N;;;;; +2613;SALTIRE;So;0;ON;;;;;N;;;;; +2614;UMBRELLA WITH RAIN DROPS;So;0;ON;;;;;N;;;;; +2615;HOT BEVERAGE;So;0;ON;;;;;N;;;;; +2616;WHITE SHOGI PIECE;So;0;ON;;;;;N;;;;; +2617;BLACK SHOGI PIECE;So;0;ON;;;;;N;;;;; +2618;SHAMROCK;So;0;ON;;;;;N;;;;; +2619;REVERSED ROTATED FLORAL HEART BULLET;So;0;ON;;;;;N;;;;; +261A;BLACK LEFT POINTING INDEX;So;0;ON;;;;;N;;;;; +261B;BLACK RIGHT POINTING INDEX;So;0;ON;;;;;N;;;;; +261C;WHITE LEFT POINTING INDEX;So;0;ON;;;;;N;;;;; +261D;WHITE UP POINTING INDEX;So;0;ON;;;;;N;;;;; +261E;WHITE RIGHT POINTING INDEX;So;0;ON;;;;;N;;;;; +261F;WHITE DOWN POINTING INDEX;So;0;ON;;;;;N;;;;; +2620;SKULL AND CROSSBONES;So;0;ON;;;;;N;;;;; +2621;CAUTION SIGN;So;0;ON;;;;;N;;;;; +2622;RADIOACTIVE SIGN;So;0;ON;;;;;N;;;;; +2623;BIOHAZARD SIGN;So;0;ON;;;;;N;;;;; +2624;CADUCEUS;So;0;ON;;;;;N;;;;; +2625;ANKH;So;0;ON;;;;;N;;;;; +2626;ORTHODOX CROSS;So;0;ON;;;;;N;;;;; +2627;CHI RHO;So;0;ON;;;;;N;;;;; +2628;CROSS OF LORRAINE;So;0;ON;;;;;N;;;;; +2629;CROSS OF JERUSALEM;So;0;ON;;;;;N;;;;; +262A;STAR AND CRESCENT;So;0;ON;;;;;N;;;;; +262B;FARSI SYMBOL;So;0;ON;;;;;N;SYMBOL OF IRAN;;;; +262C;ADI SHAKTI;So;0;ON;;;;;N;;;;; +262D;HAMMER AND SICKLE;So;0;ON;;;;;N;;;;; +262E;PEACE SYMBOL;So;0;ON;;;;;N;;;;; +262F;YIN YANG;So;0;ON;;;;;N;;;;; +2630;TRIGRAM FOR HEAVEN;So;0;ON;;;;;N;;;;; +2631;TRIGRAM FOR LAKE;So;0;ON;;;;;N;;;;; +2632;TRIGRAM FOR FIRE;So;0;ON;;;;;N;;;;; +2633;TRIGRAM FOR THUNDER;So;0;ON;;;;;N;;;;; +2634;TRIGRAM FOR WIND;So;0;ON;;;;;N;;;;; +2635;TRIGRAM FOR WATER;So;0;ON;;;;;N;;;;; +2636;TRIGRAM FOR MOUNTAIN;So;0;ON;;;;;N;;;;; +2637;TRIGRAM FOR EARTH;So;0;ON;;;;;N;;;;; +2638;WHEEL OF DHARMA;So;0;ON;;;;;N;;;;; +2639;WHITE FROWNING FACE;So;0;ON;;;;;N;;;;; +263A;WHITE SMILING FACE;So;0;ON;;;;;N;;;;; +263B;BLACK SMILING FACE;So;0;ON;;;;;N;;;;; +263C;WHITE SUN WITH RAYS;So;0;ON;;;;;N;;;;; +263D;FIRST QUARTER MOON;So;0;ON;;;;;N;;;;; +263E;LAST QUARTER MOON;So;0;ON;;;;;N;;;;; +263F;MERCURY;So;0;ON;;;;;N;;;;; +2640;FEMALE SIGN;So;0;ON;;;;;N;;;;; +2641;EARTH;So;0;ON;;;;;N;;;;; +2642;MALE SIGN;So;0;ON;;;;;N;;;;; +2643;JUPITER;So;0;ON;;;;;N;;;;; +2644;SATURN;So;0;ON;;;;;N;;;;; +2645;URANUS;So;0;ON;;;;;N;;;;; +2646;NEPTUNE;So;0;ON;;;;;N;;;;; +2647;PLUTO;So;0;ON;;;;;N;;;;; +2648;ARIES;So;0;ON;;;;;N;;;;; +2649;TAURUS;So;0;ON;;;;;N;;;;; +264A;GEMINI;So;0;ON;;;;;N;;;;; +264B;CANCER;So;0;ON;;;;;N;;;;; +264C;LEO;So;0;ON;;;;;N;;;;; +264D;VIRGO;So;0;ON;;;;;N;;;;; +264E;LIBRA;So;0;ON;;;;;N;;;;; +264F;SCORPIUS;So;0;ON;;;;;N;;;;; +2650;SAGITTARIUS;So;0;ON;;;;;N;;;;; +2651;CAPRICORN;So;0;ON;;;;;N;;;;; +2652;AQUARIUS;So;0;ON;;;;;N;;;;; +2653;PISCES;So;0;ON;;;;;N;;;;; +2654;WHITE CHESS KING;So;0;ON;;;;;N;;;;; +2655;WHITE CHESS QUEEN;So;0;ON;;;;;N;;;;; +2656;WHITE CHESS ROOK;So;0;ON;;;;;N;;;;; +2657;WHITE CHESS BISHOP;So;0;ON;;;;;N;;;;; +2658;WHITE CHESS KNIGHT;So;0;ON;;;;;N;;;;; +2659;WHITE CHESS PAWN;So;0;ON;;;;;N;;;;; +265A;BLACK CHESS KING;So;0;ON;;;;;N;;;;; +265B;BLACK CHESS QUEEN;So;0;ON;;;;;N;;;;; +265C;BLACK CHESS ROOK;So;0;ON;;;;;N;;;;; +265D;BLACK CHESS BISHOP;So;0;ON;;;;;N;;;;; +265E;BLACK CHESS KNIGHT;So;0;ON;;;;;N;;;;; +265F;BLACK CHESS PAWN;So;0;ON;;;;;N;;;;; +2660;BLACK SPADE SUIT;So;0;ON;;;;;N;;;;; +2661;WHITE HEART SUIT;So;0;ON;;;;;N;;;;; +2662;WHITE DIAMOND SUIT;So;0;ON;;;;;N;;;;; +2663;BLACK CLUB SUIT;So;0;ON;;;;;N;;;;; +2664;WHITE SPADE SUIT;So;0;ON;;;;;N;;;;; +2665;BLACK HEART SUIT;So;0;ON;;;;;N;;;;; +2666;BLACK DIAMOND SUIT;So;0;ON;;;;;N;;;;; +2667;WHITE CLUB SUIT;So;0;ON;;;;;N;;;;; +2668;HOT SPRINGS;So;0;ON;;;;;N;;;;; +2669;QUARTER NOTE;So;0;ON;;;;;N;;;;; +266A;EIGHTH NOTE;So;0;ON;;;;;N;;;;; +266B;BEAMED EIGHTH NOTES;So;0;ON;;;;;N;BARRED EIGHTH NOTES;;;; +266C;BEAMED SIXTEENTH NOTES;So;0;ON;;;;;N;BARRED SIXTEENTH NOTES;;;; +266D;MUSIC FLAT SIGN;So;0;ON;;;;;N;FLAT;;;; +266E;MUSIC NATURAL SIGN;So;0;ON;;;;;N;NATURAL;;;; +266F;MUSIC SHARP SIGN;Sm;0;ON;;;;;N;SHARP;;;; +2670;WEST SYRIAC CROSS;So;0;ON;;;;;N;;;;; +2671;EAST SYRIAC CROSS;So;0;ON;;;;;N;;;;; +2672;UNIVERSAL RECYCLING SYMBOL;So;0;ON;;;;;N;;;;; +2673;RECYCLING SYMBOL FOR TYPE-1 PLASTICS;So;0;ON;;;;;N;;;;; +2674;RECYCLING SYMBOL FOR TYPE-2 PLASTICS;So;0;ON;;;;;N;;;;; +2675;RECYCLING SYMBOL FOR TYPE-3 PLASTICS;So;0;ON;;;;;N;;;;; +2676;RECYCLING SYMBOL FOR TYPE-4 PLASTICS;So;0;ON;;;;;N;;;;; +2677;RECYCLING SYMBOL FOR TYPE-5 PLASTICS;So;0;ON;;;;;N;;;;; +2678;RECYCLING SYMBOL FOR TYPE-6 PLASTICS;So;0;ON;;;;;N;;;;; +2679;RECYCLING SYMBOL FOR TYPE-7 PLASTICS;So;0;ON;;;;;N;;;;; +267A;RECYCLING SYMBOL FOR GENERIC MATERIALS;So;0;ON;;;;;N;;;;; +267B;BLACK UNIVERSAL RECYCLING SYMBOL;So;0;ON;;;;;N;;;;; +267C;RECYCLED PAPER SYMBOL;So;0;ON;;;;;N;;;;; +267D;PARTIALLY-RECYCLED PAPER SYMBOL;So;0;ON;;;;;N;;;;; +267E;PERMANENT PAPER SIGN;So;0;ON;;;;;N;;;;; +267F;WHEELCHAIR SYMBOL;So;0;ON;;;;;N;;;;; +2680;DIE FACE-1;So;0;ON;;;;;N;;;;; +2681;DIE FACE-2;So;0;ON;;;;;N;;;;; +2682;DIE FACE-3;So;0;ON;;;;;N;;;;; +2683;DIE FACE-4;So;0;ON;;;;;N;;;;; +2684;DIE FACE-5;So;0;ON;;;;;N;;;;; +2685;DIE FACE-6;So;0;ON;;;;;N;;;;; +2686;WHITE CIRCLE WITH DOT RIGHT;So;0;ON;;;;;N;;;;; +2687;WHITE CIRCLE WITH TWO DOTS;So;0;ON;;;;;N;;;;; +2688;BLACK CIRCLE WITH WHITE DOT RIGHT;So;0;ON;;;;;N;;;;; +2689;BLACK CIRCLE WITH TWO WHITE DOTS;So;0;ON;;;;;N;;;;; +268A;MONOGRAM FOR YANG;So;0;ON;;;;;N;;;;; +268B;MONOGRAM FOR YIN;So;0;ON;;;;;N;;;;; +268C;DIGRAM FOR GREATER YANG;So;0;ON;;;;;N;;;;; +268D;DIGRAM FOR LESSER YIN;So;0;ON;;;;;N;;;;; +268E;DIGRAM FOR LESSER YANG;So;0;ON;;;;;N;;;;; +268F;DIGRAM FOR GREATER YIN;So;0;ON;;;;;N;;;;; +2690;WHITE FLAG;So;0;ON;;;;;N;;;;; +2691;BLACK FLAG;So;0;ON;;;;;N;;;;; +2692;HAMMER AND PICK;So;0;ON;;;;;N;;;;; +2693;ANCHOR;So;0;ON;;;;;N;;;;; +2694;CROSSED SWORDS;So;0;ON;;;;;N;;;;; +2695;STAFF OF AESCULAPIUS;So;0;ON;;;;;N;;;;; +2696;SCALES;So;0;ON;;;;;N;;;;; +2697;ALEMBIC;So;0;ON;;;;;N;;;;; +2698;FLOWER;So;0;ON;;;;;N;;;;; +2699;GEAR;So;0;ON;;;;;N;;;;; +269A;STAFF OF HERMES;So;0;ON;;;;;N;;;;; +269B;ATOM SYMBOL;So;0;ON;;;;;N;;;;; +269C;FLEUR-DE-LIS;So;0;ON;;;;;N;;;;; +269D;OUTLINED WHITE STAR;So;0;ON;;;;;N;;;;; +269E;THREE LINES CONVERGING RIGHT;So;0;ON;;;;;N;;;;; +269F;THREE LINES CONVERGING LEFT;So;0;ON;;;;;N;;;;; +26A0;WARNING SIGN;So;0;ON;;;;;N;;;;; +26A1;HIGH VOLTAGE SIGN;So;0;ON;;;;;N;;;;; +26A2;DOUBLED FEMALE SIGN;So;0;ON;;;;;N;;;;; +26A3;DOUBLED MALE SIGN;So;0;ON;;;;;N;;;;; +26A4;INTERLOCKED FEMALE AND MALE SIGN;So;0;ON;;;;;N;;;;; +26A5;MALE AND FEMALE SIGN;So;0;ON;;;;;N;;;;; +26A6;MALE WITH STROKE SIGN;So;0;ON;;;;;N;;;;; +26A7;MALE WITH STROKE AND MALE AND FEMALE SIGN;So;0;ON;;;;;N;;;;; +26A8;VERTICAL MALE WITH STROKE SIGN;So;0;ON;;;;;N;;;;; +26A9;HORIZONTAL MALE WITH STROKE SIGN;So;0;ON;;;;;N;;;;; +26AA;MEDIUM WHITE CIRCLE;So;0;ON;;;;;N;;;;; +26AB;MEDIUM BLACK CIRCLE;So;0;ON;;;;;N;;;;; +26AC;MEDIUM SMALL WHITE CIRCLE;So;0;L;;;;;N;;;;; +26AD;MARRIAGE SYMBOL;So;0;ON;;;;;N;;;;; +26AE;DIVORCE SYMBOL;So;0;ON;;;;;N;;;;; +26AF;UNMARRIED PARTNERSHIP SYMBOL;So;0;ON;;;;;N;;;;; +26B0;COFFIN;So;0;ON;;;;;N;;;;; +26B1;FUNERAL URN;So;0;ON;;;;;N;;;;; +26B2;NEUTER;So;0;ON;;;;;N;;;;; +26B3;CERES;So;0;ON;;;;;N;;;;; +26B4;PALLAS;So;0;ON;;;;;N;;;;; +26B5;JUNO;So;0;ON;;;;;N;;;;; +26B6;VESTA;So;0;ON;;;;;N;;;;; +26B7;CHIRON;So;0;ON;;;;;N;;;;; +26B8;BLACK MOON LILITH;So;0;ON;;;;;N;;;;; +26B9;SEXTILE;So;0;ON;;;;;N;;;;; +26BA;SEMISEXTILE;So;0;ON;;;;;N;;;;; +26BB;QUINCUNX;So;0;ON;;;;;N;;;;; +26BC;SESQUIQUADRATE;So;0;ON;;;;;N;;;;; +26BD;SOCCER BALL;So;0;ON;;;;;N;;;;; +26BE;BASEBALL;So;0;ON;;;;;N;;;;; +26BF;SQUARED KEY;So;0;ON;;;;;N;;;;; +26C0;WHITE DRAUGHTS MAN;So;0;ON;;;;;N;;;;; +26C1;WHITE DRAUGHTS KING;So;0;ON;;;;;N;;;;; +26C2;BLACK DRAUGHTS MAN;So;0;ON;;;;;N;;;;; +26C3;BLACK DRAUGHTS KING;So;0;ON;;;;;N;;;;; +26C4;SNOWMAN WITHOUT SNOW;So;0;ON;;;;;N;;;;; +26C5;SUN BEHIND CLOUD;So;0;ON;;;;;N;;;;; +26C6;RAIN;So;0;ON;;;;;N;;;;; +26C7;BLACK SNOWMAN;So;0;ON;;;;;N;;;;; +26C8;THUNDER CLOUD AND RAIN;So;0;ON;;;;;N;;;;; +26C9;TURNED WHITE SHOGI PIECE;So;0;ON;;;;;N;;;;; +26CA;TURNED BLACK SHOGI PIECE;So;0;ON;;;;;N;;;;; +26CB;WHITE DIAMOND IN SQUARE;So;0;ON;;;;;N;;;;; +26CC;CROSSING LANES;So;0;ON;;;;;N;;;;; +26CD;DISABLED CAR;So;0;ON;;;;;N;;;;; +26CE;OPHIUCHUS;So;0;ON;;;;;N;;;;; +26CF;PICK;So;0;ON;;;;;N;;;;; +26D0;CAR SLIDING;So;0;ON;;;;;N;;;;; +26D1;HELMET WITH WHITE CROSS;So;0;ON;;;;;N;;;;; +26D2;CIRCLED CROSSING LANES;So;0;ON;;;;;N;;;;; +26D3;CHAINS;So;0;ON;;;;;N;;;;; +26D4;NO ENTRY;So;0;ON;;;;;N;;;;; +26D5;ALTERNATE ONE-WAY LEFT WAY TRAFFIC;So;0;ON;;;;;N;;;;; +26D6;BLACK TWO-WAY LEFT WAY TRAFFIC;So;0;ON;;;;;N;;;;; +26D7;WHITE TWO-WAY LEFT WAY TRAFFIC;So;0;ON;;;;;N;;;;; +26D8;BLACK LEFT LANE MERGE;So;0;ON;;;;;N;;;;; +26D9;WHITE LEFT LANE MERGE;So;0;ON;;;;;N;;;;; +26DA;DRIVE SLOW SIGN;So;0;ON;;;;;N;;;;; +26DB;HEAVY WHITE DOWN-POINTING TRIANGLE;So;0;ON;;;;;N;;;;; +26DC;LEFT CLOSED ENTRY;So;0;ON;;;;;N;;;;; +26DD;SQUARED SALTIRE;So;0;ON;;;;;N;;;;; +26DE;FALLING DIAGONAL IN WHITE CIRCLE IN BLACK SQUARE;So;0;ON;;;;;N;;;;; +26DF;BLACK TRUCK;So;0;ON;;;;;N;;;;; +26E0;RESTRICTED LEFT ENTRY-1;So;0;ON;;;;;N;;;;; +26E1;RESTRICTED LEFT ENTRY-2;So;0;ON;;;;;N;;;;; +26E2;ASTRONOMICAL SYMBOL FOR URANUS;So;0;ON;;;;;N;;;;; +26E3;HEAVY CIRCLE WITH STROKE AND TWO DOTS ABOVE;So;0;ON;;;;;N;;;;; +26E4;PENTAGRAM;So;0;ON;;;;;N;;;;; +26E5;RIGHT-HANDED INTERLACED PENTAGRAM;So;0;ON;;;;;N;;;;; +26E6;LEFT-HANDED INTERLACED PENTAGRAM;So;0;ON;;;;;N;;;;; +26E7;INVERTED PENTAGRAM;So;0;ON;;;;;N;;;;; +26E8;BLACK CROSS ON SHIELD;So;0;ON;;;;;N;;;;; +26E9;SHINTO SHRINE;So;0;ON;;;;;N;;;;; +26EA;CHURCH;So;0;ON;;;;;N;;;;; +26EB;CASTLE;So;0;ON;;;;;N;;;;; +26EC;HISTORIC SITE;So;0;ON;;;;;N;;;;; +26ED;GEAR WITHOUT HUB;So;0;ON;;;;;N;;;;; +26EE;GEAR WITH HANDLES;So;0;ON;;;;;N;;;;; +26EF;MAP SYMBOL FOR LIGHTHOUSE;So;0;ON;;;;;N;;;;; +26F0;MOUNTAIN;So;0;ON;;;;;N;;;;; +26F1;UMBRELLA ON GROUND;So;0;ON;;;;;N;;;;; +26F2;FOUNTAIN;So;0;ON;;;;;N;;;;; +26F3;FLAG IN HOLE;So;0;ON;;;;;N;;;;; +26F4;FERRY;So;0;ON;;;;;N;;;;; +26F5;SAILBOAT;So;0;ON;;;;;N;;;;; +26F6;SQUARE FOUR CORNERS;So;0;ON;;;;;N;;;;; +26F7;SKIER;So;0;ON;;;;;N;;;;; +26F8;ICE SKATE;So;0;ON;;;;;N;;;;; +26F9;PERSON WITH BALL;So;0;ON;;;;;N;;;;; +26FA;TENT;So;0;ON;;;;;N;;;;; +26FB;JAPANESE BANK SYMBOL;So;0;ON;;;;;N;;;;; +26FC;HEADSTONE GRAVEYARD SYMBOL;So;0;ON;;;;;N;;;;; +26FD;FUEL PUMP;So;0;ON;;;;;N;;;;; +26FE;CUP ON BLACK SQUARE;So;0;ON;;;;;N;;;;; +26FF;WHITE FLAG WITH HORIZONTAL MIDDLE BLACK STRIPE;So;0;ON;;;;;N;;;;; +2700;BLACK SAFETY SCISSORS;So;0;ON;;;;;N;;;;; +2701;UPPER BLADE SCISSORS;So;0;ON;;;;;N;;;;; +2702;BLACK SCISSORS;So;0;ON;;;;;N;;;;; +2703;LOWER BLADE SCISSORS;So;0;ON;;;;;N;;;;; +2704;WHITE SCISSORS;So;0;ON;;;;;N;;;;; +2705;WHITE HEAVY CHECK MARK;So;0;ON;;;;;N;;;;; +2706;TELEPHONE LOCATION SIGN;So;0;ON;;;;;N;;;;; +2707;TAPE DRIVE;So;0;ON;;;;;N;;;;; +2708;AIRPLANE;So;0;ON;;;;;N;;;;; +2709;ENVELOPE;So;0;ON;;;;;N;;;;; +270A;RAISED FIST;So;0;ON;;;;;N;;;;; +270B;RAISED HAND;So;0;ON;;;;;N;;;;; +270C;VICTORY HAND;So;0;ON;;;;;N;;;;; +270D;WRITING HAND;So;0;ON;;;;;N;;;;; +270E;LOWER RIGHT PENCIL;So;0;ON;;;;;N;;;;; +270F;PENCIL;So;0;ON;;;;;N;;;;; +2710;UPPER RIGHT PENCIL;So;0;ON;;;;;N;;;;; +2711;WHITE NIB;So;0;ON;;;;;N;;;;; +2712;BLACK NIB;So;0;ON;;;;;N;;;;; +2713;CHECK MARK;So;0;ON;;;;;N;;;;; +2714;HEAVY CHECK MARK;So;0;ON;;;;;N;;;;; +2715;MULTIPLICATION X;So;0;ON;;;;;N;;;;; +2716;HEAVY MULTIPLICATION X;So;0;ON;;;;;N;;;;; +2717;BALLOT X;So;0;ON;;;;;N;;;;; +2718;HEAVY BALLOT X;So;0;ON;;;;;N;;;;; +2719;OUTLINED GREEK CROSS;So;0;ON;;;;;N;;;;; +271A;HEAVY GREEK CROSS;So;0;ON;;;;;N;;;;; +271B;OPEN CENTRE CROSS;So;0;ON;;;;;N;OPEN CENTER CROSS;;;; +271C;HEAVY OPEN CENTRE CROSS;So;0;ON;;;;;N;HEAVY OPEN CENTER CROSS;;;; +271D;LATIN CROSS;So;0;ON;;;;;N;;;;; +271E;SHADOWED WHITE LATIN CROSS;So;0;ON;;;;;N;;;;; +271F;OUTLINED LATIN CROSS;So;0;ON;;;;;N;;;;; +2720;MALTESE CROSS;So;0;ON;;;;;N;;;;; +2721;STAR OF DAVID;So;0;ON;;;;;N;;;;; +2722;FOUR TEARDROP-SPOKED ASTERISK;So;0;ON;;;;;N;;;;; +2723;FOUR BALLOON-SPOKED ASTERISK;So;0;ON;;;;;N;;;;; +2724;HEAVY FOUR BALLOON-SPOKED ASTERISK;So;0;ON;;;;;N;;;;; +2725;FOUR CLUB-SPOKED ASTERISK;So;0;ON;;;;;N;;;;; +2726;BLACK FOUR POINTED STAR;So;0;ON;;;;;N;;;;; +2727;WHITE FOUR POINTED STAR;So;0;ON;;;;;N;;;;; +2728;SPARKLES;So;0;ON;;;;;N;;;;; +2729;STRESS OUTLINED WHITE STAR;So;0;ON;;;;;N;;;;; +272A;CIRCLED WHITE STAR;So;0;ON;;;;;N;;;;; +272B;OPEN CENTRE BLACK STAR;So;0;ON;;;;;N;OPEN CENTER BLACK STAR;;;; +272C;BLACK CENTRE WHITE STAR;So;0;ON;;;;;N;BLACK CENTER WHITE STAR;;;; +272D;OUTLINED BLACK STAR;So;0;ON;;;;;N;;;;; +272E;HEAVY OUTLINED BLACK STAR;So;0;ON;;;;;N;;;;; +272F;PINWHEEL STAR;So;0;ON;;;;;N;;;;; +2730;SHADOWED WHITE STAR;So;0;ON;;;;;N;;;;; +2731;HEAVY ASTERISK;So;0;ON;;;;;N;;;;; +2732;OPEN CENTRE ASTERISK;So;0;ON;;;;;N;OPEN CENTER ASTERISK;;;; +2733;EIGHT SPOKED ASTERISK;So;0;ON;;;;;N;;;;; +2734;EIGHT POINTED BLACK STAR;So;0;ON;;;;;N;;;;; +2735;EIGHT POINTED PINWHEEL STAR;So;0;ON;;;;;N;;;;; +2736;SIX POINTED BLACK STAR;So;0;ON;;;;;N;;;;; +2737;EIGHT POINTED RECTILINEAR BLACK STAR;So;0;ON;;;;;N;;;;; +2738;HEAVY EIGHT POINTED RECTILINEAR BLACK STAR;So;0;ON;;;;;N;;;;; +2739;TWELVE POINTED BLACK STAR;So;0;ON;;;;;N;;;;; +273A;SIXTEEN POINTED ASTERISK;So;0;ON;;;;;N;;;;; +273B;TEARDROP-SPOKED ASTERISK;So;0;ON;;;;;N;;;;; +273C;OPEN CENTRE TEARDROP-SPOKED ASTERISK;So;0;ON;;;;;N;OPEN CENTER TEARDROP-SPOKED ASTERISK;;;; +273D;HEAVY TEARDROP-SPOKED ASTERISK;So;0;ON;;;;;N;;;;; +273E;SIX PETALLED BLACK AND WHITE FLORETTE;So;0;ON;;;;;N;;;;; +273F;BLACK FLORETTE;So;0;ON;;;;;N;;;;; +2740;WHITE FLORETTE;So;0;ON;;;;;N;;;;; +2741;EIGHT PETALLED OUTLINED BLACK FLORETTE;So;0;ON;;;;;N;;;;; +2742;CIRCLED OPEN CENTRE EIGHT POINTED STAR;So;0;ON;;;;;N;CIRCLED OPEN CENTER EIGHT POINTED STAR;;;; +2743;HEAVY TEARDROP-SPOKED PINWHEEL ASTERISK;So;0;ON;;;;;N;;;;; +2744;SNOWFLAKE;So;0;ON;;;;;N;;;;; +2745;TIGHT TRIFOLIATE SNOWFLAKE;So;0;ON;;;;;N;;;;; +2746;HEAVY CHEVRON SNOWFLAKE;So;0;ON;;;;;N;;;;; +2747;SPARKLE;So;0;ON;;;;;N;;;;; +2748;HEAVY SPARKLE;So;0;ON;;;;;N;;;;; +2749;BALLOON-SPOKED ASTERISK;So;0;ON;;;;;N;;;;; +274A;EIGHT TEARDROP-SPOKED PROPELLER ASTERISK;So;0;ON;;;;;N;;;;; +274B;HEAVY EIGHT TEARDROP-SPOKED PROPELLER ASTERISK;So;0;ON;;;;;N;;;;; +274C;CROSS MARK;So;0;ON;;;;;N;;;;; +274D;SHADOWED WHITE CIRCLE;So;0;ON;;;;;N;;;;; +274E;NEGATIVE SQUARED CROSS MARK;So;0;ON;;;;;N;;;;; +274F;LOWER RIGHT DROP-SHADOWED WHITE SQUARE;So;0;ON;;;;;N;;;;; +2750;UPPER RIGHT DROP-SHADOWED WHITE SQUARE;So;0;ON;;;;;N;;;;; +2751;LOWER RIGHT SHADOWED WHITE SQUARE;So;0;ON;;;;;N;;;;; +2752;UPPER RIGHT SHADOWED WHITE SQUARE;So;0;ON;;;;;N;;;;; +2753;BLACK QUESTION MARK ORNAMENT;So;0;ON;;;;;N;;;;; +2754;WHITE QUESTION MARK ORNAMENT;So;0;ON;;;;;N;;;;; +2755;WHITE EXCLAMATION MARK ORNAMENT;So;0;ON;;;;;N;;;;; +2756;BLACK DIAMOND MINUS WHITE X;So;0;ON;;;;;N;;;;; +2757;HEAVY EXCLAMATION MARK SYMBOL;So;0;ON;;;;;N;;;;; +2758;LIGHT VERTICAL BAR;So;0;ON;;;;;N;;;;; +2759;MEDIUM VERTICAL BAR;So;0;ON;;;;;N;;;;; +275A;HEAVY VERTICAL BAR;So;0;ON;;;;;N;;;;; +275B;HEAVY SINGLE TURNED COMMA QUOTATION MARK ORNAMENT;So;0;ON;;;;;N;;;;; +275C;HEAVY SINGLE COMMA QUOTATION MARK ORNAMENT;So;0;ON;;;;;N;;;;; +275D;HEAVY DOUBLE TURNED COMMA QUOTATION MARK ORNAMENT;So;0;ON;;;;;N;;;;; +275E;HEAVY DOUBLE COMMA QUOTATION MARK ORNAMENT;So;0;ON;;;;;N;;;;; +275F;HEAVY LOW SINGLE COMMA QUOTATION MARK ORNAMENT;So;0;ON;;;;;N;;;;; +2760;HEAVY LOW DOUBLE COMMA QUOTATION MARK ORNAMENT;So;0;ON;;;;;N;;;;; +2761;CURVED STEM PARAGRAPH SIGN ORNAMENT;So;0;ON;;;;;N;;;;; +2762;HEAVY EXCLAMATION MARK ORNAMENT;So;0;ON;;;;;N;;;;; +2763;HEAVY HEART EXCLAMATION MARK ORNAMENT;So;0;ON;;;;;N;;;;; +2764;HEAVY BLACK HEART;So;0;ON;;;;;N;;;;; +2765;ROTATED HEAVY BLACK HEART BULLET;So;0;ON;;;;;N;;;;; +2766;FLORAL HEART;So;0;ON;;;;;N;;;;; +2767;ROTATED FLORAL HEART BULLET;So;0;ON;;;;;N;;;;; +2768;MEDIUM LEFT PARENTHESIS ORNAMENT;Ps;0;ON;;;;;Y;;;;; +2769;MEDIUM RIGHT PARENTHESIS ORNAMENT;Pe;0;ON;;;;;Y;;;;; +276A;MEDIUM FLATTENED LEFT PARENTHESIS ORNAMENT;Ps;0;ON;;;;;Y;;;;; +276B;MEDIUM FLATTENED RIGHT PARENTHESIS ORNAMENT;Pe;0;ON;;;;;Y;;;;; +276C;MEDIUM LEFT-POINTING ANGLE BRACKET ORNAMENT;Ps;0;ON;;;;;Y;;;;; +276D;MEDIUM RIGHT-POINTING ANGLE BRACKET ORNAMENT;Pe;0;ON;;;;;Y;;;;; +276E;HEAVY LEFT-POINTING ANGLE QUOTATION MARK ORNAMENT;Ps;0;ON;;;;;Y;;;;; +276F;HEAVY RIGHT-POINTING ANGLE QUOTATION MARK ORNAMENT;Pe;0;ON;;;;;Y;;;;; +2770;HEAVY LEFT-POINTING ANGLE BRACKET ORNAMENT;Ps;0;ON;;;;;Y;;;;; +2771;HEAVY RIGHT-POINTING ANGLE BRACKET ORNAMENT;Pe;0;ON;;;;;Y;;;;; +2772;LIGHT LEFT TORTOISE SHELL BRACKET ORNAMENT;Ps;0;ON;;;;;Y;;;;; +2773;LIGHT RIGHT TORTOISE SHELL BRACKET ORNAMENT;Pe;0;ON;;;;;Y;;;;; +2774;MEDIUM LEFT CURLY BRACKET ORNAMENT;Ps;0;ON;;;;;Y;;;;; +2775;MEDIUM RIGHT CURLY BRACKET ORNAMENT;Pe;0;ON;;;;;Y;;;;; +2776;DINGBAT NEGATIVE CIRCLED DIGIT ONE;No;0;ON;;;1;1;N;INVERSE CIRCLED DIGIT ONE;;;; +2777;DINGBAT NEGATIVE CIRCLED DIGIT TWO;No;0;ON;;;2;2;N;INVERSE CIRCLED DIGIT TWO;;;; +2778;DINGBAT NEGATIVE CIRCLED DIGIT THREE;No;0;ON;;;3;3;N;INVERSE CIRCLED DIGIT THREE;;;; +2779;DINGBAT NEGATIVE CIRCLED DIGIT FOUR;No;0;ON;;;4;4;N;INVERSE CIRCLED DIGIT FOUR;;;; +277A;DINGBAT NEGATIVE CIRCLED DIGIT FIVE;No;0;ON;;;5;5;N;INVERSE CIRCLED DIGIT FIVE;;;; +277B;DINGBAT NEGATIVE CIRCLED DIGIT SIX;No;0;ON;;;6;6;N;INVERSE CIRCLED DIGIT SIX;;;; +277C;DINGBAT NEGATIVE CIRCLED DIGIT SEVEN;No;0;ON;;;7;7;N;INVERSE CIRCLED DIGIT SEVEN;;;; +277D;DINGBAT NEGATIVE CIRCLED DIGIT EIGHT;No;0;ON;;;8;8;N;INVERSE CIRCLED DIGIT EIGHT;;;; +277E;DINGBAT NEGATIVE CIRCLED DIGIT NINE;No;0;ON;;;9;9;N;INVERSE CIRCLED DIGIT NINE;;;; +277F;DINGBAT NEGATIVE CIRCLED NUMBER TEN;No;0;ON;;;;10;N;INVERSE CIRCLED NUMBER TEN;;;; +2780;DINGBAT CIRCLED SANS-SERIF DIGIT ONE;No;0;ON;;;1;1;N;CIRCLED SANS-SERIF DIGIT ONE;;;; +2781;DINGBAT CIRCLED SANS-SERIF DIGIT TWO;No;0;ON;;;2;2;N;CIRCLED SANS-SERIF DIGIT TWO;;;; +2782;DINGBAT CIRCLED SANS-SERIF DIGIT THREE;No;0;ON;;;3;3;N;CIRCLED SANS-SERIF DIGIT THREE;;;; +2783;DINGBAT CIRCLED SANS-SERIF DIGIT FOUR;No;0;ON;;;4;4;N;CIRCLED SANS-SERIF DIGIT FOUR;;;; +2784;DINGBAT CIRCLED SANS-SERIF DIGIT FIVE;No;0;ON;;;5;5;N;CIRCLED SANS-SERIF DIGIT FIVE;;;; +2785;DINGBAT CIRCLED SANS-SERIF DIGIT SIX;No;0;ON;;;6;6;N;CIRCLED SANS-SERIF DIGIT SIX;;;; +2786;DINGBAT CIRCLED SANS-SERIF DIGIT SEVEN;No;0;ON;;;7;7;N;CIRCLED SANS-SERIF DIGIT SEVEN;;;; +2787;DINGBAT CIRCLED SANS-SERIF DIGIT EIGHT;No;0;ON;;;8;8;N;CIRCLED SANS-SERIF DIGIT EIGHT;;;; +2788;DINGBAT CIRCLED SANS-SERIF DIGIT NINE;No;0;ON;;;9;9;N;CIRCLED SANS-SERIF DIGIT NINE;;;; +2789;DINGBAT CIRCLED SANS-SERIF NUMBER TEN;No;0;ON;;;;10;N;CIRCLED SANS-SERIF NUMBER TEN;;;; +278A;DINGBAT NEGATIVE CIRCLED SANS-SERIF DIGIT ONE;No;0;ON;;;1;1;N;INVERSE CIRCLED SANS-SERIF DIGIT ONE;;;; +278B;DINGBAT NEGATIVE CIRCLED SANS-SERIF DIGIT TWO;No;0;ON;;;2;2;N;INVERSE CIRCLED SANS-SERIF DIGIT TWO;;;; +278C;DINGBAT NEGATIVE CIRCLED SANS-SERIF DIGIT THREE;No;0;ON;;;3;3;N;INVERSE CIRCLED SANS-SERIF DIGIT THREE;;;; +278D;DINGBAT NEGATIVE CIRCLED SANS-SERIF DIGIT FOUR;No;0;ON;;;4;4;N;INVERSE CIRCLED SANS-SERIF DIGIT FOUR;;;; +278E;DINGBAT NEGATIVE CIRCLED SANS-SERIF DIGIT FIVE;No;0;ON;;;5;5;N;INVERSE CIRCLED SANS-SERIF DIGIT FIVE;;;; +278F;DINGBAT NEGATIVE CIRCLED SANS-SERIF DIGIT SIX;No;0;ON;;;6;6;N;INVERSE CIRCLED SANS-SERIF DIGIT SIX;;;; +2790;DINGBAT NEGATIVE CIRCLED SANS-SERIF DIGIT SEVEN;No;0;ON;;;7;7;N;INVERSE CIRCLED SANS-SERIF DIGIT SEVEN;;;; +2791;DINGBAT NEGATIVE CIRCLED SANS-SERIF DIGIT EIGHT;No;0;ON;;;8;8;N;INVERSE CIRCLED SANS-SERIF DIGIT EIGHT;;;; +2792;DINGBAT NEGATIVE CIRCLED SANS-SERIF DIGIT NINE;No;0;ON;;;9;9;N;INVERSE CIRCLED SANS-SERIF DIGIT NINE;;;; +2793;DINGBAT NEGATIVE CIRCLED SANS-SERIF NUMBER TEN;No;0;ON;;;;10;N;INVERSE CIRCLED SANS-SERIF NUMBER TEN;;;; +2794;HEAVY WIDE-HEADED RIGHTWARDS ARROW;So;0;ON;;;;;N;HEAVY WIDE-HEADED RIGHT ARROW;;;; +2795;HEAVY PLUS SIGN;So;0;ON;;;;;N;;;;; +2796;HEAVY MINUS SIGN;So;0;ON;;;;;N;;;;; +2797;HEAVY DIVISION SIGN;So;0;ON;;;;;N;;;;; +2798;HEAVY SOUTH EAST ARROW;So;0;ON;;;;;N;HEAVY LOWER RIGHT ARROW;;;; +2799;HEAVY RIGHTWARDS ARROW;So;0;ON;;;;;N;HEAVY RIGHT ARROW;;;; +279A;HEAVY NORTH EAST ARROW;So;0;ON;;;;;N;HEAVY UPPER RIGHT ARROW;;;; +279B;DRAFTING POINT RIGHTWARDS ARROW;So;0;ON;;;;;N;DRAFTING POINT RIGHT ARROW;;;; +279C;HEAVY ROUND-TIPPED RIGHTWARDS ARROW;So;0;ON;;;;;N;HEAVY ROUND-TIPPED RIGHT ARROW;;;; +279D;TRIANGLE-HEADED RIGHTWARDS ARROW;So;0;ON;;;;;N;TRIANGLE-HEADED RIGHT ARROW;;;; +279E;HEAVY TRIANGLE-HEADED RIGHTWARDS ARROW;So;0;ON;;;;;N;HEAVY TRIANGLE-HEADED RIGHT ARROW;;;; +279F;DASHED TRIANGLE-HEADED RIGHTWARDS ARROW;So;0;ON;;;;;N;DASHED TRIANGLE-HEADED RIGHT ARROW;;;; +27A0;HEAVY DASHED TRIANGLE-HEADED RIGHTWARDS ARROW;So;0;ON;;;;;N;HEAVY DASHED TRIANGLE-HEADED RIGHT ARROW;;;; +27A1;BLACK RIGHTWARDS ARROW;So;0;ON;;;;;N;BLACK RIGHT ARROW;;;; +27A2;THREE-D TOP-LIGHTED RIGHTWARDS ARROWHEAD;So;0;ON;;;;;N;THREE-D TOP-LIGHTED RIGHT ARROWHEAD;;;; +27A3;THREE-D BOTTOM-LIGHTED RIGHTWARDS ARROWHEAD;So;0;ON;;;;;N;THREE-D BOTTOM-LIGHTED RIGHT ARROWHEAD;;;; +27A4;BLACK RIGHTWARDS ARROWHEAD;So;0;ON;;;;;N;BLACK RIGHT ARROWHEAD;;;; +27A5;HEAVY BLACK CURVED DOWNWARDS AND RIGHTWARDS ARROW;So;0;ON;;;;;N;HEAVY BLACK CURVED DOWN AND RIGHT ARROW;;;; +27A6;HEAVY BLACK CURVED UPWARDS AND RIGHTWARDS ARROW;So;0;ON;;;;;N;HEAVY BLACK CURVED UP AND RIGHT ARROW;;;; +27A7;SQUAT BLACK RIGHTWARDS ARROW;So;0;ON;;;;;N;SQUAT BLACK RIGHT ARROW;;;; +27A8;HEAVY CONCAVE-POINTED BLACK RIGHTWARDS ARROW;So;0;ON;;;;;N;HEAVY CONCAVE-POINTED BLACK RIGHT ARROW;;;; +27A9;RIGHT-SHADED WHITE RIGHTWARDS ARROW;So;0;ON;;;;;N;RIGHT-SHADED WHITE RIGHT ARROW;;;; +27AA;LEFT-SHADED WHITE RIGHTWARDS ARROW;So;0;ON;;;;;N;LEFT-SHADED WHITE RIGHT ARROW;;;; +27AB;BACK-TILTED SHADOWED WHITE RIGHTWARDS ARROW;So;0;ON;;;;;N;BACK-TILTED SHADOWED WHITE RIGHT ARROW;;;; +27AC;FRONT-TILTED SHADOWED WHITE RIGHTWARDS ARROW;So;0;ON;;;;;N;FRONT-TILTED SHADOWED WHITE RIGHT ARROW;;;; +27AD;HEAVY LOWER RIGHT-SHADOWED WHITE RIGHTWARDS ARROW;So;0;ON;;;;;N;HEAVY LOWER RIGHT-SHADOWED WHITE RIGHT ARROW;;;; +27AE;HEAVY UPPER RIGHT-SHADOWED WHITE RIGHTWARDS ARROW;So;0;ON;;;;;N;HEAVY UPPER RIGHT-SHADOWED WHITE RIGHT ARROW;;;; +27AF;NOTCHED LOWER RIGHT-SHADOWED WHITE RIGHTWARDS ARROW;So;0;ON;;;;;N;NOTCHED LOWER RIGHT-SHADOWED WHITE RIGHT ARROW;;;; +27B0;CURLY LOOP;So;0;ON;;;;;N;;;;; +27B1;NOTCHED UPPER RIGHT-SHADOWED WHITE RIGHTWARDS ARROW;So;0;ON;;;;;N;NOTCHED UPPER RIGHT-SHADOWED WHITE RIGHT ARROW;;;; +27B2;CIRCLED HEAVY WHITE RIGHTWARDS ARROW;So;0;ON;;;;;N;CIRCLED HEAVY WHITE RIGHT ARROW;;;; +27B3;WHITE-FEATHERED RIGHTWARDS ARROW;So;0;ON;;;;;N;WHITE-FEATHERED RIGHT ARROW;;;; +27B4;BLACK-FEATHERED SOUTH EAST ARROW;So;0;ON;;;;;N;BLACK-FEATHERED LOWER RIGHT ARROW;;;; +27B5;BLACK-FEATHERED RIGHTWARDS ARROW;So;0;ON;;;;;N;BLACK-FEATHERED RIGHT ARROW;;;; +27B6;BLACK-FEATHERED NORTH EAST ARROW;So;0;ON;;;;;N;BLACK-FEATHERED UPPER RIGHT ARROW;;;; +27B7;HEAVY BLACK-FEATHERED SOUTH EAST ARROW;So;0;ON;;;;;N;HEAVY BLACK-FEATHERED LOWER RIGHT ARROW;;;; +27B8;HEAVY BLACK-FEATHERED RIGHTWARDS ARROW;So;0;ON;;;;;N;HEAVY BLACK-FEATHERED RIGHT ARROW;;;; +27B9;HEAVY BLACK-FEATHERED NORTH EAST ARROW;So;0;ON;;;;;N;HEAVY BLACK-FEATHERED UPPER RIGHT ARROW;;;; +27BA;TEARDROP-BARBED RIGHTWARDS ARROW;So;0;ON;;;;;N;TEARDROP-BARBED RIGHT ARROW;;;; +27BB;HEAVY TEARDROP-SHANKED RIGHTWARDS ARROW;So;0;ON;;;;;N;HEAVY TEARDROP-SHANKED RIGHT ARROW;;;; +27BC;WEDGE-TAILED RIGHTWARDS ARROW;So;0;ON;;;;;N;WEDGE-TAILED RIGHT ARROW;;;; +27BD;HEAVY WEDGE-TAILED RIGHTWARDS ARROW;So;0;ON;;;;;N;HEAVY WEDGE-TAILED RIGHT ARROW;;;; +27BE;OPEN-OUTLINED RIGHTWARDS ARROW;So;0;ON;;;;;N;OPEN-OUTLINED RIGHT ARROW;;;; +27BF;DOUBLE CURLY LOOP;So;0;ON;;;;;N;;;;; +27C0;THREE DIMENSIONAL ANGLE;Sm;0;ON;;;;;Y;;;;; +27C1;WHITE TRIANGLE CONTAINING SMALL WHITE TRIANGLE;Sm;0;ON;;;;;N;;;;; +27C2;PERPENDICULAR;Sm;0;ON;;;;;N;;;;; +27C3;OPEN SUBSET;Sm;0;ON;;;;;Y;;;;; +27C4;OPEN SUPERSET;Sm;0;ON;;;;;Y;;;;; +27C5;LEFT S-SHAPED BAG DELIMITER;Ps;0;ON;;;;;Y;;;;; +27C6;RIGHT S-SHAPED BAG DELIMITER;Pe;0;ON;;;;;Y;;;;; +27C7;OR WITH DOT INSIDE;Sm;0;ON;;;;;N;;;;; +27C8;REVERSE SOLIDUS PRECEDING SUBSET;Sm;0;ON;;;;;Y;;;;; +27C9;SUPERSET PRECEDING SOLIDUS;Sm;0;ON;;;;;Y;;;;; +27CA;VERTICAL BAR WITH HORIZONTAL STROKE;Sm;0;ON;;;;;N;;;;; +27CB;MATHEMATICAL RISING DIAGONAL;Sm;0;ON;;;;;Y;;;;; +27CC;LONG DIVISION;Sm;0;ON;;;;;Y;;;;; +27CD;MATHEMATICAL FALLING DIAGONAL;Sm;0;ON;;;;;Y;;;;; +27CE;SQUARED LOGICAL AND;Sm;0;ON;;;;;N;;;;; +27CF;SQUARED LOGICAL OR;Sm;0;ON;;;;;N;;;;; +27D0;WHITE DIAMOND WITH CENTRED DOT;Sm;0;ON;;;;;N;;;;; +27D1;AND WITH DOT;Sm;0;ON;;;;;N;;;;; +27D2;ELEMENT OF OPENING UPWARDS;Sm;0;ON;;;;;N;;;;; +27D3;LOWER RIGHT CORNER WITH DOT;Sm;0;ON;;;;;Y;;;;; +27D4;UPPER LEFT CORNER WITH DOT;Sm;0;ON;;;;;Y;;;;; +27D5;LEFT OUTER JOIN;Sm;0;ON;;;;;Y;;;;; +27D6;RIGHT OUTER JOIN;Sm;0;ON;;;;;Y;;;;; +27D7;FULL OUTER JOIN;Sm;0;ON;;;;;N;;;;; +27D8;LARGE UP TACK;Sm;0;ON;;;;;N;;;;; +27D9;LARGE DOWN TACK;Sm;0;ON;;;;;N;;;;; +27DA;LEFT AND RIGHT DOUBLE TURNSTILE;Sm;0;ON;;;;;N;;;;; +27DB;LEFT AND RIGHT TACK;Sm;0;ON;;;;;N;;;;; +27DC;LEFT MULTIMAP;Sm;0;ON;;;;;Y;;;;; +27DD;LONG RIGHT TACK;Sm;0;ON;;;;;Y;;;;; +27DE;LONG LEFT TACK;Sm;0;ON;;;;;Y;;;;; +27DF;UP TACK WITH CIRCLE ABOVE;Sm;0;ON;;;;;N;;;;; +27E0;LOZENGE DIVIDED BY HORIZONTAL RULE;Sm;0;ON;;;;;N;;;;; +27E1;WHITE CONCAVE-SIDED DIAMOND;Sm;0;ON;;;;;N;;;;; +27E2;WHITE CONCAVE-SIDED DIAMOND WITH LEFTWARDS TICK;Sm;0;ON;;;;;Y;;;;; +27E3;WHITE CONCAVE-SIDED DIAMOND WITH RIGHTWARDS TICK;Sm;0;ON;;;;;Y;;;;; +27E4;WHITE SQUARE WITH LEFTWARDS TICK;Sm;0;ON;;;;;Y;;;;; +27E5;WHITE SQUARE WITH RIGHTWARDS TICK;Sm;0;ON;;;;;Y;;;;; +27E6;MATHEMATICAL LEFT WHITE SQUARE BRACKET;Ps;0;ON;;;;;Y;;;;; +27E7;MATHEMATICAL RIGHT WHITE SQUARE BRACKET;Pe;0;ON;;;;;Y;;;;; +27E8;MATHEMATICAL LEFT ANGLE BRACKET;Ps;0;ON;;;;;Y;;;;; +27E9;MATHEMATICAL RIGHT ANGLE BRACKET;Pe;0;ON;;;;;Y;;;;; +27EA;MATHEMATICAL LEFT DOUBLE ANGLE BRACKET;Ps;0;ON;;;;;Y;;;;; +27EB;MATHEMATICAL RIGHT DOUBLE ANGLE BRACKET;Pe;0;ON;;;;;Y;;;;; +27EC;MATHEMATICAL LEFT WHITE TORTOISE SHELL BRACKET;Ps;0;ON;;;;;Y;;;;; +27ED;MATHEMATICAL RIGHT WHITE TORTOISE SHELL BRACKET;Pe;0;ON;;;;;Y;;;;; +27EE;MATHEMATICAL LEFT FLATTENED PARENTHESIS;Ps;0;ON;;;;;Y;;;;; +27EF;MATHEMATICAL RIGHT FLATTENED PARENTHESIS;Pe;0;ON;;;;;Y;;;;; +27F0;UPWARDS QUADRUPLE ARROW;Sm;0;ON;;;;;N;;;;; +27F1;DOWNWARDS QUADRUPLE ARROW;Sm;0;ON;;;;;N;;;;; +27F2;ANTICLOCKWISE GAPPED CIRCLE ARROW;Sm;0;ON;;;;;N;;;;; +27F3;CLOCKWISE GAPPED CIRCLE ARROW;Sm;0;ON;;;;;N;;;;; +27F4;RIGHT ARROW WITH CIRCLED PLUS;Sm;0;ON;;;;;N;;;;; +27F5;LONG LEFTWARDS ARROW;Sm;0;ON;;;;;N;;;;; +27F6;LONG RIGHTWARDS ARROW;Sm;0;ON;;;;;N;;;;; +27F7;LONG LEFT RIGHT ARROW;Sm;0;ON;;;;;N;;;;; +27F8;LONG LEFTWARDS DOUBLE ARROW;Sm;0;ON;;;;;N;;;;; +27F9;LONG RIGHTWARDS DOUBLE ARROW;Sm;0;ON;;;;;N;;;;; +27FA;LONG LEFT RIGHT DOUBLE ARROW;Sm;0;ON;;;;;N;;;;; +27FB;LONG LEFTWARDS ARROW FROM BAR;Sm;0;ON;;;;;N;;;;; +27FC;LONG RIGHTWARDS ARROW FROM BAR;Sm;0;ON;;;;;N;;;;; +27FD;LONG LEFTWARDS DOUBLE ARROW FROM BAR;Sm;0;ON;;;;;N;;;;; +27FE;LONG RIGHTWARDS DOUBLE ARROW FROM BAR;Sm;0;ON;;;;;N;;;;; +27FF;LONG RIGHTWARDS SQUIGGLE ARROW;Sm;0;ON;;;;;N;;;;; +2800;BRAILLE PATTERN BLANK;So;0;L;;;;;N;;;;; +2801;BRAILLE PATTERN DOTS-1;So;0;L;;;;;N;;;;; +2802;BRAILLE PATTERN DOTS-2;So;0;L;;;;;N;;;;; +2803;BRAILLE PATTERN DOTS-12;So;0;L;;;;;N;;;;; +2804;BRAILLE PATTERN DOTS-3;So;0;L;;;;;N;;;;; +2805;BRAILLE PATTERN DOTS-13;So;0;L;;;;;N;;;;; +2806;BRAILLE PATTERN DOTS-23;So;0;L;;;;;N;;;;; +2807;BRAILLE PATTERN DOTS-123;So;0;L;;;;;N;;;;; +2808;BRAILLE PATTERN DOTS-4;So;0;L;;;;;N;;;;; +2809;BRAILLE PATTERN DOTS-14;So;0;L;;;;;N;;;;; +280A;BRAILLE PATTERN DOTS-24;So;0;L;;;;;N;;;;; +280B;BRAILLE PATTERN DOTS-124;So;0;L;;;;;N;;;;; +280C;BRAILLE PATTERN DOTS-34;So;0;L;;;;;N;;;;; +280D;BRAILLE PATTERN DOTS-134;So;0;L;;;;;N;;;;; +280E;BRAILLE PATTERN DOTS-234;So;0;L;;;;;N;;;;; +280F;BRAILLE PATTERN DOTS-1234;So;0;L;;;;;N;;;;; +2810;BRAILLE PATTERN DOTS-5;So;0;L;;;;;N;;;;; +2811;BRAILLE PATTERN DOTS-15;So;0;L;;;;;N;;;;; +2812;BRAILLE PATTERN DOTS-25;So;0;L;;;;;N;;;;; +2813;BRAILLE PATTERN DOTS-125;So;0;L;;;;;N;;;;; +2814;BRAILLE PATTERN DOTS-35;So;0;L;;;;;N;;;;; +2815;BRAILLE PATTERN DOTS-135;So;0;L;;;;;N;;;;; +2816;BRAILLE PATTERN DOTS-235;So;0;L;;;;;N;;;;; +2817;BRAILLE PATTERN DOTS-1235;So;0;L;;;;;N;;;;; +2818;BRAILLE PATTERN DOTS-45;So;0;L;;;;;N;;;;; +2819;BRAILLE PATTERN DOTS-145;So;0;L;;;;;N;;;;; +281A;BRAILLE PATTERN DOTS-245;So;0;L;;;;;N;;;;; +281B;BRAILLE PATTERN DOTS-1245;So;0;L;;;;;N;;;;; +281C;BRAILLE PATTERN DOTS-345;So;0;L;;;;;N;;;;; +281D;BRAILLE PATTERN DOTS-1345;So;0;L;;;;;N;;;;; +281E;BRAILLE PATTERN DOTS-2345;So;0;L;;;;;N;;;;; +281F;BRAILLE PATTERN DOTS-12345;So;0;L;;;;;N;;;;; +2820;BRAILLE PATTERN DOTS-6;So;0;L;;;;;N;;;;; +2821;BRAILLE PATTERN DOTS-16;So;0;L;;;;;N;;;;; +2822;BRAILLE PATTERN DOTS-26;So;0;L;;;;;N;;;;; +2823;BRAILLE PATTERN DOTS-126;So;0;L;;;;;N;;;;; +2824;BRAILLE PATTERN DOTS-36;So;0;L;;;;;N;;;;; +2825;BRAILLE PATTERN DOTS-136;So;0;L;;;;;N;;;;; +2826;BRAILLE PATTERN DOTS-236;So;0;L;;;;;N;;;;; +2827;BRAILLE PATTERN DOTS-1236;So;0;L;;;;;N;;;;; +2828;BRAILLE PATTERN DOTS-46;So;0;L;;;;;N;;;;; +2829;BRAILLE PATTERN DOTS-146;So;0;L;;;;;N;;;;; +282A;BRAILLE PATTERN DOTS-246;So;0;L;;;;;N;;;;; +282B;BRAILLE PATTERN DOTS-1246;So;0;L;;;;;N;;;;; +282C;BRAILLE PATTERN DOTS-346;So;0;L;;;;;N;;;;; +282D;BRAILLE PATTERN DOTS-1346;So;0;L;;;;;N;;;;; +282E;BRAILLE PATTERN DOTS-2346;So;0;L;;;;;N;;;;; +282F;BRAILLE PATTERN DOTS-12346;So;0;L;;;;;N;;;;; +2830;BRAILLE PATTERN DOTS-56;So;0;L;;;;;N;;;;; +2831;BRAILLE PATTERN DOTS-156;So;0;L;;;;;N;;;;; +2832;BRAILLE PATTERN DOTS-256;So;0;L;;;;;N;;;;; +2833;BRAILLE PATTERN DOTS-1256;So;0;L;;;;;N;;;;; +2834;BRAILLE PATTERN DOTS-356;So;0;L;;;;;N;;;;; +2835;BRAILLE PATTERN DOTS-1356;So;0;L;;;;;N;;;;; +2836;BRAILLE PATTERN DOTS-2356;So;0;L;;;;;N;;;;; +2837;BRAILLE PATTERN DOTS-12356;So;0;L;;;;;N;;;;; +2838;BRAILLE PATTERN DOTS-456;So;0;L;;;;;N;;;;; +2839;BRAILLE PATTERN DOTS-1456;So;0;L;;;;;N;;;;; +283A;BRAILLE PATTERN DOTS-2456;So;0;L;;;;;N;;;;; +283B;BRAILLE PATTERN DOTS-12456;So;0;L;;;;;N;;;;; +283C;BRAILLE PATTERN DOTS-3456;So;0;L;;;;;N;;;;; +283D;BRAILLE PATTERN DOTS-13456;So;0;L;;;;;N;;;;; +283E;BRAILLE PATTERN DOTS-23456;So;0;L;;;;;N;;;;; +283F;BRAILLE PATTERN DOTS-123456;So;0;L;;;;;N;;;;; +2840;BRAILLE PATTERN DOTS-7;So;0;L;;;;;N;;;;; +2841;BRAILLE PATTERN DOTS-17;So;0;L;;;;;N;;;;; +2842;BRAILLE PATTERN DOTS-27;So;0;L;;;;;N;;;;; +2843;BRAILLE PATTERN DOTS-127;So;0;L;;;;;N;;;;; +2844;BRAILLE PATTERN DOTS-37;So;0;L;;;;;N;;;;; +2845;BRAILLE PATTERN DOTS-137;So;0;L;;;;;N;;;;; +2846;BRAILLE PATTERN DOTS-237;So;0;L;;;;;N;;;;; +2847;BRAILLE PATTERN DOTS-1237;So;0;L;;;;;N;;;;; +2848;BRAILLE PATTERN DOTS-47;So;0;L;;;;;N;;;;; +2849;BRAILLE PATTERN DOTS-147;So;0;L;;;;;N;;;;; +284A;BRAILLE PATTERN DOTS-247;So;0;L;;;;;N;;;;; +284B;BRAILLE PATTERN DOTS-1247;So;0;L;;;;;N;;;;; +284C;BRAILLE PATTERN DOTS-347;So;0;L;;;;;N;;;;; +284D;BRAILLE PATTERN DOTS-1347;So;0;L;;;;;N;;;;; +284E;BRAILLE PATTERN DOTS-2347;So;0;L;;;;;N;;;;; +284F;BRAILLE PATTERN DOTS-12347;So;0;L;;;;;N;;;;; +2850;BRAILLE PATTERN DOTS-57;So;0;L;;;;;N;;;;; +2851;BRAILLE PATTERN DOTS-157;So;0;L;;;;;N;;;;; +2852;BRAILLE PATTERN DOTS-257;So;0;L;;;;;N;;;;; +2853;BRAILLE PATTERN DOTS-1257;So;0;L;;;;;N;;;;; +2854;BRAILLE PATTERN DOTS-357;So;0;L;;;;;N;;;;; +2855;BRAILLE PATTERN DOTS-1357;So;0;L;;;;;N;;;;; +2856;BRAILLE PATTERN DOTS-2357;So;0;L;;;;;N;;;;; +2857;BRAILLE PATTERN DOTS-12357;So;0;L;;;;;N;;;;; +2858;BRAILLE PATTERN DOTS-457;So;0;L;;;;;N;;;;; +2859;BRAILLE PATTERN DOTS-1457;So;0;L;;;;;N;;;;; +285A;BRAILLE PATTERN DOTS-2457;So;0;L;;;;;N;;;;; +285B;BRAILLE PATTERN DOTS-12457;So;0;L;;;;;N;;;;; +285C;BRAILLE PATTERN DOTS-3457;So;0;L;;;;;N;;;;; +285D;BRAILLE PATTERN DOTS-13457;So;0;L;;;;;N;;;;; +285E;BRAILLE PATTERN DOTS-23457;So;0;L;;;;;N;;;;; +285F;BRAILLE PATTERN DOTS-123457;So;0;L;;;;;N;;;;; +2860;BRAILLE PATTERN DOTS-67;So;0;L;;;;;N;;;;; +2861;BRAILLE PATTERN DOTS-167;So;0;L;;;;;N;;;;; +2862;BRAILLE PATTERN DOTS-267;So;0;L;;;;;N;;;;; +2863;BRAILLE PATTERN DOTS-1267;So;0;L;;;;;N;;;;; +2864;BRAILLE PATTERN DOTS-367;So;0;L;;;;;N;;;;; +2865;BRAILLE PATTERN DOTS-1367;So;0;L;;;;;N;;;;; +2866;BRAILLE PATTERN DOTS-2367;So;0;L;;;;;N;;;;; +2867;BRAILLE PATTERN DOTS-12367;So;0;L;;;;;N;;;;; +2868;BRAILLE PATTERN DOTS-467;So;0;L;;;;;N;;;;; +2869;BRAILLE PATTERN DOTS-1467;So;0;L;;;;;N;;;;; +286A;BRAILLE PATTERN DOTS-2467;So;0;L;;;;;N;;;;; +286B;BRAILLE PATTERN DOTS-12467;So;0;L;;;;;N;;;;; +286C;BRAILLE PATTERN DOTS-3467;So;0;L;;;;;N;;;;; +286D;BRAILLE PATTERN DOTS-13467;So;0;L;;;;;N;;;;; +286E;BRAILLE PATTERN DOTS-23467;So;0;L;;;;;N;;;;; +286F;BRAILLE PATTERN DOTS-123467;So;0;L;;;;;N;;;;; +2870;BRAILLE PATTERN DOTS-567;So;0;L;;;;;N;;;;; +2871;BRAILLE PATTERN DOTS-1567;So;0;L;;;;;N;;;;; +2872;BRAILLE PATTERN DOTS-2567;So;0;L;;;;;N;;;;; +2873;BRAILLE PATTERN DOTS-12567;So;0;L;;;;;N;;;;; +2874;BRAILLE PATTERN DOTS-3567;So;0;L;;;;;N;;;;; +2875;BRAILLE PATTERN DOTS-13567;So;0;L;;;;;N;;;;; +2876;BRAILLE PATTERN DOTS-23567;So;0;L;;;;;N;;;;; +2877;BRAILLE PATTERN DOTS-123567;So;0;L;;;;;N;;;;; +2878;BRAILLE PATTERN DOTS-4567;So;0;L;;;;;N;;;;; +2879;BRAILLE PATTERN DOTS-14567;So;0;L;;;;;N;;;;; +287A;BRAILLE PATTERN DOTS-24567;So;0;L;;;;;N;;;;; +287B;BRAILLE PATTERN DOTS-124567;So;0;L;;;;;N;;;;; +287C;BRAILLE PATTERN DOTS-34567;So;0;L;;;;;N;;;;; +287D;BRAILLE PATTERN DOTS-134567;So;0;L;;;;;N;;;;; +287E;BRAILLE PATTERN DOTS-234567;So;0;L;;;;;N;;;;; +287F;BRAILLE PATTERN DOTS-1234567;So;0;L;;;;;N;;;;; +2880;BRAILLE PATTERN DOTS-8;So;0;L;;;;;N;;;;; +2881;BRAILLE PATTERN DOTS-18;So;0;L;;;;;N;;;;; +2882;BRAILLE PATTERN DOTS-28;So;0;L;;;;;N;;;;; +2883;BRAILLE PATTERN DOTS-128;So;0;L;;;;;N;;;;; +2884;BRAILLE PATTERN DOTS-38;So;0;L;;;;;N;;;;; +2885;BRAILLE PATTERN DOTS-138;So;0;L;;;;;N;;;;; +2886;BRAILLE PATTERN DOTS-238;So;0;L;;;;;N;;;;; +2887;BRAILLE PATTERN DOTS-1238;So;0;L;;;;;N;;;;; +2888;BRAILLE PATTERN DOTS-48;So;0;L;;;;;N;;;;; +2889;BRAILLE PATTERN DOTS-148;So;0;L;;;;;N;;;;; +288A;BRAILLE PATTERN DOTS-248;So;0;L;;;;;N;;;;; +288B;BRAILLE PATTERN DOTS-1248;So;0;L;;;;;N;;;;; +288C;BRAILLE PATTERN DOTS-348;So;0;L;;;;;N;;;;; +288D;BRAILLE PATTERN DOTS-1348;So;0;L;;;;;N;;;;; +288E;BRAILLE PATTERN DOTS-2348;So;0;L;;;;;N;;;;; +288F;BRAILLE PATTERN DOTS-12348;So;0;L;;;;;N;;;;; +2890;BRAILLE PATTERN DOTS-58;So;0;L;;;;;N;;;;; +2891;BRAILLE PATTERN DOTS-158;So;0;L;;;;;N;;;;; +2892;BRAILLE PATTERN DOTS-258;So;0;L;;;;;N;;;;; +2893;BRAILLE PATTERN DOTS-1258;So;0;L;;;;;N;;;;; +2894;BRAILLE PATTERN DOTS-358;So;0;L;;;;;N;;;;; +2895;BRAILLE PATTERN DOTS-1358;So;0;L;;;;;N;;;;; +2896;BRAILLE PATTERN DOTS-2358;So;0;L;;;;;N;;;;; +2897;BRAILLE PATTERN DOTS-12358;So;0;L;;;;;N;;;;; +2898;BRAILLE PATTERN DOTS-458;So;0;L;;;;;N;;;;; +2899;BRAILLE PATTERN DOTS-1458;So;0;L;;;;;N;;;;; +289A;BRAILLE PATTERN DOTS-2458;So;0;L;;;;;N;;;;; +289B;BRAILLE PATTERN DOTS-12458;So;0;L;;;;;N;;;;; +289C;BRAILLE PATTERN DOTS-3458;So;0;L;;;;;N;;;;; +289D;BRAILLE PATTERN DOTS-13458;So;0;L;;;;;N;;;;; +289E;BRAILLE PATTERN DOTS-23458;So;0;L;;;;;N;;;;; +289F;BRAILLE PATTERN DOTS-123458;So;0;L;;;;;N;;;;; +28A0;BRAILLE PATTERN DOTS-68;So;0;L;;;;;N;;;;; +28A1;BRAILLE PATTERN DOTS-168;So;0;L;;;;;N;;;;; +28A2;BRAILLE PATTERN DOTS-268;So;0;L;;;;;N;;;;; +28A3;BRAILLE PATTERN DOTS-1268;So;0;L;;;;;N;;;;; +28A4;BRAILLE PATTERN DOTS-368;So;0;L;;;;;N;;;;; +28A5;BRAILLE PATTERN DOTS-1368;So;0;L;;;;;N;;;;; +28A6;BRAILLE PATTERN DOTS-2368;So;0;L;;;;;N;;;;; +28A7;BRAILLE PATTERN DOTS-12368;So;0;L;;;;;N;;;;; +28A8;BRAILLE PATTERN DOTS-468;So;0;L;;;;;N;;;;; +28A9;BRAILLE PATTERN DOTS-1468;So;0;L;;;;;N;;;;; +28AA;BRAILLE PATTERN DOTS-2468;So;0;L;;;;;N;;;;; +28AB;BRAILLE PATTERN DOTS-12468;So;0;L;;;;;N;;;;; +28AC;BRAILLE PATTERN DOTS-3468;So;0;L;;;;;N;;;;; +28AD;BRAILLE PATTERN DOTS-13468;So;0;L;;;;;N;;;;; +28AE;BRAILLE PATTERN DOTS-23468;So;0;L;;;;;N;;;;; +28AF;BRAILLE PATTERN DOTS-123468;So;0;L;;;;;N;;;;; +28B0;BRAILLE PATTERN DOTS-568;So;0;L;;;;;N;;;;; +28B1;BRAILLE PATTERN DOTS-1568;So;0;L;;;;;N;;;;; +28B2;BRAILLE PATTERN DOTS-2568;So;0;L;;;;;N;;;;; +28B3;BRAILLE PATTERN DOTS-12568;So;0;L;;;;;N;;;;; +28B4;BRAILLE PATTERN DOTS-3568;So;0;L;;;;;N;;;;; +28B5;BRAILLE PATTERN DOTS-13568;So;0;L;;;;;N;;;;; +28B6;BRAILLE PATTERN DOTS-23568;So;0;L;;;;;N;;;;; +28B7;BRAILLE PATTERN DOTS-123568;So;0;L;;;;;N;;;;; +28B8;BRAILLE PATTERN DOTS-4568;So;0;L;;;;;N;;;;; +28B9;BRAILLE PATTERN DOTS-14568;So;0;L;;;;;N;;;;; +28BA;BRAILLE PATTERN DOTS-24568;So;0;L;;;;;N;;;;; +28BB;BRAILLE PATTERN DOTS-124568;So;0;L;;;;;N;;;;; +28BC;BRAILLE PATTERN DOTS-34568;So;0;L;;;;;N;;;;; +28BD;BRAILLE PATTERN DOTS-134568;So;0;L;;;;;N;;;;; +28BE;BRAILLE PATTERN DOTS-234568;So;0;L;;;;;N;;;;; +28BF;BRAILLE PATTERN DOTS-1234568;So;0;L;;;;;N;;;;; +28C0;BRAILLE PATTERN DOTS-78;So;0;L;;;;;N;;;;; +28C1;BRAILLE PATTERN DOTS-178;So;0;L;;;;;N;;;;; +28C2;BRAILLE PATTERN DOTS-278;So;0;L;;;;;N;;;;; +28C3;BRAILLE PATTERN DOTS-1278;So;0;L;;;;;N;;;;; +28C4;BRAILLE PATTERN DOTS-378;So;0;L;;;;;N;;;;; +28C5;BRAILLE PATTERN DOTS-1378;So;0;L;;;;;N;;;;; +28C6;BRAILLE PATTERN DOTS-2378;So;0;L;;;;;N;;;;; +28C7;BRAILLE PATTERN DOTS-12378;So;0;L;;;;;N;;;;; +28C8;BRAILLE PATTERN DOTS-478;So;0;L;;;;;N;;;;; +28C9;BRAILLE PATTERN DOTS-1478;So;0;L;;;;;N;;;;; +28CA;BRAILLE PATTERN DOTS-2478;So;0;L;;;;;N;;;;; +28CB;BRAILLE PATTERN DOTS-12478;So;0;L;;;;;N;;;;; +28CC;BRAILLE PATTERN DOTS-3478;So;0;L;;;;;N;;;;; +28CD;BRAILLE PATTERN DOTS-13478;So;0;L;;;;;N;;;;; +28CE;BRAILLE PATTERN DOTS-23478;So;0;L;;;;;N;;;;; +28CF;BRAILLE PATTERN DOTS-123478;So;0;L;;;;;N;;;;; +28D0;BRAILLE PATTERN DOTS-578;So;0;L;;;;;N;;;;; +28D1;BRAILLE PATTERN DOTS-1578;So;0;L;;;;;N;;;;; +28D2;BRAILLE PATTERN DOTS-2578;So;0;L;;;;;N;;;;; +28D3;BRAILLE PATTERN DOTS-12578;So;0;L;;;;;N;;;;; +28D4;BRAILLE PATTERN DOTS-3578;So;0;L;;;;;N;;;;; +28D5;BRAILLE PATTERN DOTS-13578;So;0;L;;;;;N;;;;; +28D6;BRAILLE PATTERN DOTS-23578;So;0;L;;;;;N;;;;; +28D7;BRAILLE PATTERN DOTS-123578;So;0;L;;;;;N;;;;; +28D8;BRAILLE PATTERN DOTS-4578;So;0;L;;;;;N;;;;; +28D9;BRAILLE PATTERN DOTS-14578;So;0;L;;;;;N;;;;; +28DA;BRAILLE PATTERN DOTS-24578;So;0;L;;;;;N;;;;; +28DB;BRAILLE PATTERN DOTS-124578;So;0;L;;;;;N;;;;; +28DC;BRAILLE PATTERN DOTS-34578;So;0;L;;;;;N;;;;; +28DD;BRAILLE PATTERN DOTS-134578;So;0;L;;;;;N;;;;; +28DE;BRAILLE PATTERN DOTS-234578;So;0;L;;;;;N;;;;; +28DF;BRAILLE PATTERN DOTS-1234578;So;0;L;;;;;N;;;;; +28E0;BRAILLE PATTERN DOTS-678;So;0;L;;;;;N;;;;; +28E1;BRAILLE PATTERN DOTS-1678;So;0;L;;;;;N;;;;; +28E2;BRAILLE PATTERN DOTS-2678;So;0;L;;;;;N;;;;; +28E3;BRAILLE PATTERN DOTS-12678;So;0;L;;;;;N;;;;; +28E4;BRAILLE PATTERN DOTS-3678;So;0;L;;;;;N;;;;; +28E5;BRAILLE PATTERN DOTS-13678;So;0;L;;;;;N;;;;; +28E6;BRAILLE PATTERN DOTS-23678;So;0;L;;;;;N;;;;; +28E7;BRAILLE PATTERN DOTS-123678;So;0;L;;;;;N;;;;; +28E8;BRAILLE PATTERN DOTS-4678;So;0;L;;;;;N;;;;; +28E9;BRAILLE PATTERN DOTS-14678;So;0;L;;;;;N;;;;; +28EA;BRAILLE PATTERN DOTS-24678;So;0;L;;;;;N;;;;; +28EB;BRAILLE PATTERN DOTS-124678;So;0;L;;;;;N;;;;; +28EC;BRAILLE PATTERN DOTS-34678;So;0;L;;;;;N;;;;; +28ED;BRAILLE PATTERN DOTS-134678;So;0;L;;;;;N;;;;; +28EE;BRAILLE PATTERN DOTS-234678;So;0;L;;;;;N;;;;; +28EF;BRAILLE PATTERN DOTS-1234678;So;0;L;;;;;N;;;;; +28F0;BRAILLE PATTERN DOTS-5678;So;0;L;;;;;N;;;;; +28F1;BRAILLE PATTERN DOTS-15678;So;0;L;;;;;N;;;;; +28F2;BRAILLE PATTERN DOTS-25678;So;0;L;;;;;N;;;;; +28F3;BRAILLE PATTERN DOTS-125678;So;0;L;;;;;N;;;;; +28F4;BRAILLE PATTERN DOTS-35678;So;0;L;;;;;N;;;;; +28F5;BRAILLE PATTERN DOTS-135678;So;0;L;;;;;N;;;;; +28F6;BRAILLE PATTERN DOTS-235678;So;0;L;;;;;N;;;;; +28F7;BRAILLE PATTERN DOTS-1235678;So;0;L;;;;;N;;;;; +28F8;BRAILLE PATTERN DOTS-45678;So;0;L;;;;;N;;;;; +28F9;BRAILLE PATTERN DOTS-145678;So;0;L;;;;;N;;;;; +28FA;BRAILLE PATTERN DOTS-245678;So;0;L;;;;;N;;;;; +28FB;BRAILLE PATTERN DOTS-1245678;So;0;L;;;;;N;;;;; +28FC;BRAILLE PATTERN DOTS-345678;So;0;L;;;;;N;;;;; +28FD;BRAILLE PATTERN DOTS-1345678;So;0;L;;;;;N;;;;; +28FE;BRAILLE PATTERN DOTS-2345678;So;0;L;;;;;N;;;;; +28FF;BRAILLE PATTERN DOTS-12345678;So;0;L;;;;;N;;;;; +2900;RIGHTWARDS TWO-HEADED ARROW WITH VERTICAL STROKE;Sm;0;ON;;;;;N;;;;; +2901;RIGHTWARDS TWO-HEADED ARROW WITH DOUBLE VERTICAL STROKE;Sm;0;ON;;;;;N;;;;; +2902;LEFTWARDS DOUBLE ARROW WITH VERTICAL STROKE;Sm;0;ON;;;;;N;;;;; +2903;RIGHTWARDS DOUBLE ARROW WITH VERTICAL STROKE;Sm;0;ON;;;;;N;;;;; +2904;LEFT RIGHT DOUBLE ARROW WITH VERTICAL STROKE;Sm;0;ON;;;;;N;;;;; +2905;RIGHTWARDS TWO-HEADED ARROW FROM BAR;Sm;0;ON;;;;;N;;;;; +2906;LEFTWARDS DOUBLE ARROW FROM BAR;Sm;0;ON;;;;;N;;;;; +2907;RIGHTWARDS DOUBLE ARROW FROM BAR;Sm;0;ON;;;;;N;;;;; +2908;DOWNWARDS ARROW WITH HORIZONTAL STROKE;Sm;0;ON;;;;;N;;;;; +2909;UPWARDS ARROW WITH HORIZONTAL STROKE;Sm;0;ON;;;;;N;;;;; +290A;UPWARDS TRIPLE ARROW;Sm;0;ON;;;;;N;;;;; +290B;DOWNWARDS TRIPLE ARROW;Sm;0;ON;;;;;N;;;;; +290C;LEFTWARDS DOUBLE DASH ARROW;Sm;0;ON;;;;;N;;;;; +290D;RIGHTWARDS DOUBLE DASH ARROW;Sm;0;ON;;;;;N;;;;; +290E;LEFTWARDS TRIPLE DASH ARROW;Sm;0;ON;;;;;N;;;;; +290F;RIGHTWARDS TRIPLE DASH ARROW;Sm;0;ON;;;;;N;;;;; +2910;RIGHTWARDS TWO-HEADED TRIPLE DASH ARROW;Sm;0;ON;;;;;N;;;;; +2911;RIGHTWARDS ARROW WITH DOTTED STEM;Sm;0;ON;;;;;N;;;;; +2912;UPWARDS ARROW TO BAR;Sm;0;ON;;;;;N;;;;; +2913;DOWNWARDS ARROW TO BAR;Sm;0;ON;;;;;N;;;;; +2914;RIGHTWARDS ARROW WITH TAIL WITH VERTICAL STROKE;Sm;0;ON;;;;;N;;;;; +2915;RIGHTWARDS ARROW WITH TAIL WITH DOUBLE VERTICAL STROKE;Sm;0;ON;;;;;N;;;;; +2916;RIGHTWARDS TWO-HEADED ARROW WITH TAIL;Sm;0;ON;;;;;N;;;;; +2917;RIGHTWARDS TWO-HEADED ARROW WITH TAIL WITH VERTICAL STROKE;Sm;0;ON;;;;;N;;;;; +2918;RIGHTWARDS TWO-HEADED ARROW WITH TAIL WITH DOUBLE VERTICAL STROKE;Sm;0;ON;;;;;N;;;;; +2919;LEFTWARDS ARROW-TAIL;Sm;0;ON;;;;;N;;;;; +291A;RIGHTWARDS ARROW-TAIL;Sm;0;ON;;;;;N;;;;; +291B;LEFTWARDS DOUBLE ARROW-TAIL;Sm;0;ON;;;;;N;;;;; +291C;RIGHTWARDS DOUBLE ARROW-TAIL;Sm;0;ON;;;;;N;;;;; +291D;LEFTWARDS ARROW TO BLACK DIAMOND;Sm;0;ON;;;;;N;;;;; +291E;RIGHTWARDS ARROW TO BLACK DIAMOND;Sm;0;ON;;;;;N;;;;; +291F;LEFTWARDS ARROW FROM BAR TO BLACK DIAMOND;Sm;0;ON;;;;;N;;;;; +2920;RIGHTWARDS ARROW FROM BAR TO BLACK DIAMOND;Sm;0;ON;;;;;N;;;;; +2921;NORTH WEST AND SOUTH EAST ARROW;Sm;0;ON;;;;;N;;;;; +2922;NORTH EAST AND SOUTH WEST ARROW;Sm;0;ON;;;;;N;;;;; +2923;NORTH WEST ARROW WITH HOOK;Sm;0;ON;;;;;N;;;;; +2924;NORTH EAST ARROW WITH HOOK;Sm;0;ON;;;;;N;;;;; +2925;SOUTH EAST ARROW WITH HOOK;Sm;0;ON;;;;;N;;;;; +2926;SOUTH WEST ARROW WITH HOOK;Sm;0;ON;;;;;N;;;;; +2927;NORTH WEST ARROW AND NORTH EAST ARROW;Sm;0;ON;;;;;N;;;;; +2928;NORTH EAST ARROW AND SOUTH EAST ARROW;Sm;0;ON;;;;;N;;;;; +2929;SOUTH EAST ARROW AND SOUTH WEST ARROW;Sm;0;ON;;;;;N;;;;; +292A;SOUTH WEST ARROW AND NORTH WEST ARROW;Sm;0;ON;;;;;N;;;;; +292B;RISING DIAGONAL CROSSING FALLING DIAGONAL;Sm;0;ON;;;;;N;;;;; +292C;FALLING DIAGONAL CROSSING RISING DIAGONAL;Sm;0;ON;;;;;N;;;;; +292D;SOUTH EAST ARROW CROSSING NORTH EAST ARROW;Sm;0;ON;;;;;N;;;;; +292E;NORTH EAST ARROW CROSSING SOUTH EAST ARROW;Sm;0;ON;;;;;N;;;;; +292F;FALLING DIAGONAL CROSSING NORTH EAST ARROW;Sm;0;ON;;;;;N;;;;; +2930;RISING DIAGONAL CROSSING SOUTH EAST ARROW;Sm;0;ON;;;;;N;;;;; +2931;NORTH EAST ARROW CROSSING NORTH WEST ARROW;Sm;0;ON;;;;;N;;;;; +2932;NORTH WEST ARROW CROSSING NORTH EAST ARROW;Sm;0;ON;;;;;N;;;;; +2933;WAVE ARROW POINTING DIRECTLY RIGHT;Sm;0;ON;;;;;N;;;;; +2934;ARROW POINTING RIGHTWARDS THEN CURVING UPWARDS;Sm;0;ON;;;;;N;;;;; +2935;ARROW POINTING RIGHTWARDS THEN CURVING DOWNWARDS;Sm;0;ON;;;;;N;;;;; +2936;ARROW POINTING DOWNWARDS THEN CURVING LEFTWARDS;Sm;0;ON;;;;;N;;;;; +2937;ARROW POINTING DOWNWARDS THEN CURVING RIGHTWARDS;Sm;0;ON;;;;;N;;;;; +2938;RIGHT-SIDE ARC CLOCKWISE ARROW;Sm;0;ON;;;;;N;;;;; +2939;LEFT-SIDE ARC ANTICLOCKWISE ARROW;Sm;0;ON;;;;;N;;;;; +293A;TOP ARC ANTICLOCKWISE ARROW;Sm;0;ON;;;;;N;;;;; +293B;BOTTOM ARC ANTICLOCKWISE ARROW;Sm;0;ON;;;;;N;;;;; +293C;TOP ARC CLOCKWISE ARROW WITH MINUS;Sm;0;ON;;;;;N;;;;; +293D;TOP ARC ANTICLOCKWISE ARROW WITH PLUS;Sm;0;ON;;;;;N;;;;; +293E;LOWER RIGHT SEMICIRCULAR CLOCKWISE ARROW;Sm;0;ON;;;;;N;;;;; +293F;LOWER LEFT SEMICIRCULAR ANTICLOCKWISE ARROW;Sm;0;ON;;;;;N;;;;; +2940;ANTICLOCKWISE CLOSED CIRCLE ARROW;Sm;0;ON;;;;;N;;;;; +2941;CLOCKWISE CLOSED CIRCLE ARROW;Sm;0;ON;;;;;N;;;;; +2942;RIGHTWARDS ARROW ABOVE SHORT LEFTWARDS ARROW;Sm;0;ON;;;;;N;;;;; +2943;LEFTWARDS ARROW ABOVE SHORT RIGHTWARDS ARROW;Sm;0;ON;;;;;N;;;;; +2944;SHORT RIGHTWARDS ARROW ABOVE LEFTWARDS ARROW;Sm;0;ON;;;;;N;;;;; +2945;RIGHTWARDS ARROW WITH PLUS BELOW;Sm;0;ON;;;;;N;;;;; +2946;LEFTWARDS ARROW WITH PLUS BELOW;Sm;0;ON;;;;;N;;;;; +2947;RIGHTWARDS ARROW THROUGH X;Sm;0;ON;;;;;N;;;;; +2948;LEFT RIGHT ARROW THROUGH SMALL CIRCLE;Sm;0;ON;;;;;N;;;;; +2949;UPWARDS TWO-HEADED ARROW FROM SMALL CIRCLE;Sm;0;ON;;;;;N;;;;; +294A;LEFT BARB UP RIGHT BARB DOWN HARPOON;Sm;0;ON;;;;;N;;;;; +294B;LEFT BARB DOWN RIGHT BARB UP HARPOON;Sm;0;ON;;;;;N;;;;; +294C;UP BARB RIGHT DOWN BARB LEFT HARPOON;Sm;0;ON;;;;;N;;;;; +294D;UP BARB LEFT DOWN BARB RIGHT HARPOON;Sm;0;ON;;;;;N;;;;; +294E;LEFT BARB UP RIGHT BARB UP HARPOON;Sm;0;ON;;;;;N;;;;; +294F;UP BARB RIGHT DOWN BARB RIGHT HARPOON;Sm;0;ON;;;;;N;;;;; +2950;LEFT BARB DOWN RIGHT BARB DOWN HARPOON;Sm;0;ON;;;;;N;;;;; +2951;UP BARB LEFT DOWN BARB LEFT HARPOON;Sm;0;ON;;;;;N;;;;; +2952;LEFTWARDS HARPOON WITH BARB UP TO BAR;Sm;0;ON;;;;;N;;;;; +2953;RIGHTWARDS HARPOON WITH BARB UP TO BAR;Sm;0;ON;;;;;N;;;;; +2954;UPWARDS HARPOON WITH BARB RIGHT TO BAR;Sm;0;ON;;;;;N;;;;; +2955;DOWNWARDS HARPOON WITH BARB RIGHT TO BAR;Sm;0;ON;;;;;N;;;;; +2956;LEFTWARDS HARPOON WITH BARB DOWN TO BAR;Sm;0;ON;;;;;N;;;;; +2957;RIGHTWARDS HARPOON WITH BARB DOWN TO BAR;Sm;0;ON;;;;;N;;;;; +2958;UPWARDS HARPOON WITH BARB LEFT TO BAR;Sm;0;ON;;;;;N;;;;; +2959;DOWNWARDS HARPOON WITH BARB LEFT TO BAR;Sm;0;ON;;;;;N;;;;; +295A;LEFTWARDS HARPOON WITH BARB UP FROM BAR;Sm;0;ON;;;;;N;;;;; +295B;RIGHTWARDS HARPOON WITH BARB UP FROM BAR;Sm;0;ON;;;;;N;;;;; +295C;UPWARDS HARPOON WITH BARB RIGHT FROM BAR;Sm;0;ON;;;;;N;;;;; +295D;DOWNWARDS HARPOON WITH BARB RIGHT FROM BAR;Sm;0;ON;;;;;N;;;;; +295E;LEFTWARDS HARPOON WITH BARB DOWN FROM BAR;Sm;0;ON;;;;;N;;;;; +295F;RIGHTWARDS HARPOON WITH BARB DOWN FROM BAR;Sm;0;ON;;;;;N;;;;; +2960;UPWARDS HARPOON WITH BARB LEFT FROM BAR;Sm;0;ON;;;;;N;;;;; +2961;DOWNWARDS HARPOON WITH BARB LEFT FROM BAR;Sm;0;ON;;;;;N;;;;; +2962;LEFTWARDS HARPOON WITH BARB UP ABOVE LEFTWARDS HARPOON WITH BARB DOWN;Sm;0;ON;;;;;N;;;;; +2963;UPWARDS HARPOON WITH BARB LEFT BESIDE UPWARDS HARPOON WITH BARB RIGHT;Sm;0;ON;;;;;N;;;;; +2964;RIGHTWARDS HARPOON WITH BARB UP ABOVE RIGHTWARDS HARPOON WITH BARB DOWN;Sm;0;ON;;;;;N;;;;; +2965;DOWNWARDS HARPOON WITH BARB LEFT BESIDE DOWNWARDS HARPOON WITH BARB RIGHT;Sm;0;ON;;;;;N;;;;; +2966;LEFTWARDS HARPOON WITH BARB UP ABOVE RIGHTWARDS HARPOON WITH BARB UP;Sm;0;ON;;;;;N;;;;; +2967;LEFTWARDS HARPOON WITH BARB DOWN ABOVE RIGHTWARDS HARPOON WITH BARB DOWN;Sm;0;ON;;;;;N;;;;; +2968;RIGHTWARDS HARPOON WITH BARB UP ABOVE LEFTWARDS HARPOON WITH BARB UP;Sm;0;ON;;;;;N;;;;; +2969;RIGHTWARDS HARPOON WITH BARB DOWN ABOVE LEFTWARDS HARPOON WITH BARB DOWN;Sm;0;ON;;;;;N;;;;; +296A;LEFTWARDS HARPOON WITH BARB UP ABOVE LONG DASH;Sm;0;ON;;;;;N;;;;; +296B;LEFTWARDS HARPOON WITH BARB DOWN BELOW LONG DASH;Sm;0;ON;;;;;N;;;;; +296C;RIGHTWARDS HARPOON WITH BARB UP ABOVE LONG DASH;Sm;0;ON;;;;;N;;;;; +296D;RIGHTWARDS HARPOON WITH BARB DOWN BELOW LONG DASH;Sm;0;ON;;;;;N;;;;; +296E;UPWARDS HARPOON WITH BARB LEFT BESIDE DOWNWARDS HARPOON WITH BARB RIGHT;Sm;0;ON;;;;;N;;;;; +296F;DOWNWARDS HARPOON WITH BARB LEFT BESIDE UPWARDS HARPOON WITH BARB RIGHT;Sm;0;ON;;;;;N;;;;; +2970;RIGHT DOUBLE ARROW WITH ROUNDED HEAD;Sm;0;ON;;;;;N;;;;; +2971;EQUALS SIGN ABOVE RIGHTWARDS ARROW;Sm;0;ON;;;;;N;;;;; +2972;TILDE OPERATOR ABOVE RIGHTWARDS ARROW;Sm;0;ON;;;;;N;;;;; +2973;LEFTWARDS ARROW ABOVE TILDE OPERATOR;Sm;0;ON;;;;;N;;;;; +2974;RIGHTWARDS ARROW ABOVE TILDE OPERATOR;Sm;0;ON;;;;;N;;;;; +2975;RIGHTWARDS ARROW ABOVE ALMOST EQUAL TO;Sm;0;ON;;;;;N;;;;; +2976;LESS-THAN ABOVE LEFTWARDS ARROW;Sm;0;ON;;;;;N;;;;; +2977;LEFTWARDS ARROW THROUGH LESS-THAN;Sm;0;ON;;;;;N;;;;; +2978;GREATER-THAN ABOVE RIGHTWARDS ARROW;Sm;0;ON;;;;;N;;;;; +2979;SUBSET ABOVE RIGHTWARDS ARROW;Sm;0;ON;;;;;N;;;;; +297A;LEFTWARDS ARROW THROUGH SUBSET;Sm;0;ON;;;;;N;;;;; +297B;SUPERSET ABOVE LEFTWARDS ARROW;Sm;0;ON;;;;;N;;;;; +297C;LEFT FISH TAIL;Sm;0;ON;;;;;N;;;;; +297D;RIGHT FISH TAIL;Sm;0;ON;;;;;N;;;;; +297E;UP FISH TAIL;Sm;0;ON;;;;;N;;;;; +297F;DOWN FISH TAIL;Sm;0;ON;;;;;N;;;;; +2980;TRIPLE VERTICAL BAR DELIMITER;Sm;0;ON;;;;;N;;;;; +2981;Z NOTATION SPOT;Sm;0;ON;;;;;N;;;;; +2982;Z NOTATION TYPE COLON;Sm;0;ON;;;;;N;;;;; +2983;LEFT WHITE CURLY BRACKET;Ps;0;ON;;;;;Y;;;;; +2984;RIGHT WHITE CURLY BRACKET;Pe;0;ON;;;;;Y;;;;; +2985;LEFT WHITE PARENTHESIS;Ps;0;ON;;;;;Y;;;;; +2986;RIGHT WHITE PARENTHESIS;Pe;0;ON;;;;;Y;;;;; +2987;Z NOTATION LEFT IMAGE BRACKET;Ps;0;ON;;;;;Y;;;;; +2988;Z NOTATION RIGHT IMAGE BRACKET;Pe;0;ON;;;;;Y;;;;; +2989;Z NOTATION LEFT BINDING BRACKET;Ps;0;ON;;;;;Y;;;;; +298A;Z NOTATION RIGHT BINDING BRACKET;Pe;0;ON;;;;;Y;;;;; +298B;LEFT SQUARE BRACKET WITH UNDERBAR;Ps;0;ON;;;;;Y;;;;; +298C;RIGHT SQUARE BRACKET WITH UNDERBAR;Pe;0;ON;;;;;Y;;;;; +298D;LEFT SQUARE BRACKET WITH TICK IN TOP CORNER;Ps;0;ON;;;;;Y;;;;; +298E;RIGHT SQUARE BRACKET WITH TICK IN BOTTOM CORNER;Pe;0;ON;;;;;Y;;;;; +298F;LEFT SQUARE BRACKET WITH TICK IN BOTTOM CORNER;Ps;0;ON;;;;;Y;;;;; +2990;RIGHT SQUARE BRACKET WITH TICK IN TOP CORNER;Pe;0;ON;;;;;Y;;;;; +2991;LEFT ANGLE BRACKET WITH DOT;Ps;0;ON;;;;;Y;;;;; +2992;RIGHT ANGLE BRACKET WITH DOT;Pe;0;ON;;;;;Y;;;;; +2993;LEFT ARC LESS-THAN BRACKET;Ps;0;ON;;;;;Y;;;;; +2994;RIGHT ARC GREATER-THAN BRACKET;Pe;0;ON;;;;;Y;;;;; +2995;DOUBLE LEFT ARC GREATER-THAN BRACKET;Ps;0;ON;;;;;Y;;;;; +2996;DOUBLE RIGHT ARC LESS-THAN BRACKET;Pe;0;ON;;;;;Y;;;;; +2997;LEFT BLACK TORTOISE SHELL BRACKET;Ps;0;ON;;;;;Y;;;;; +2998;RIGHT BLACK TORTOISE SHELL BRACKET;Pe;0;ON;;;;;Y;;;;; +2999;DOTTED FENCE;Sm;0;ON;;;;;N;;;;; +299A;VERTICAL ZIGZAG LINE;Sm;0;ON;;;;;N;;;;; +299B;MEASURED ANGLE OPENING LEFT;Sm;0;ON;;;;;Y;;;;; +299C;RIGHT ANGLE VARIANT WITH SQUARE;Sm;0;ON;;;;;Y;;;;; +299D;MEASURED RIGHT ANGLE WITH DOT;Sm;0;ON;;;;;Y;;;;; +299E;ANGLE WITH S INSIDE;Sm;0;ON;;;;;Y;;;;; +299F;ACUTE ANGLE;Sm;0;ON;;;;;Y;;;;; +29A0;SPHERICAL ANGLE OPENING LEFT;Sm;0;ON;;;;;Y;;;;; +29A1;SPHERICAL ANGLE OPENING UP;Sm;0;ON;;;;;N;;;;; +29A2;TURNED ANGLE;Sm;0;ON;;;;;Y;;;;; +29A3;REVERSED ANGLE;Sm;0;ON;;;;;Y;;;;; +29A4;ANGLE WITH UNDERBAR;Sm;0;ON;;;;;Y;;;;; +29A5;REVERSED ANGLE WITH UNDERBAR;Sm;0;ON;;;;;Y;;;;; +29A6;OBLIQUE ANGLE OPENING UP;Sm;0;ON;;;;;Y;;;;; +29A7;OBLIQUE ANGLE OPENING DOWN;Sm;0;ON;;;;;Y;;;;; +29A8;MEASURED ANGLE WITH OPEN ARM ENDING IN ARROW POINTING UP AND RIGHT;Sm;0;ON;;;;;Y;;;;; +29A9;MEASURED ANGLE WITH OPEN ARM ENDING IN ARROW POINTING UP AND LEFT;Sm;0;ON;;;;;Y;;;;; +29AA;MEASURED ANGLE WITH OPEN ARM ENDING IN ARROW POINTING DOWN AND RIGHT;Sm;0;ON;;;;;Y;;;;; +29AB;MEASURED ANGLE WITH OPEN ARM ENDING IN ARROW POINTING DOWN AND LEFT;Sm;0;ON;;;;;Y;;;;; +29AC;MEASURED ANGLE WITH OPEN ARM ENDING IN ARROW POINTING RIGHT AND UP;Sm;0;ON;;;;;Y;;;;; +29AD;MEASURED ANGLE WITH OPEN ARM ENDING IN ARROW POINTING LEFT AND UP;Sm;0;ON;;;;;Y;;;;; +29AE;MEASURED ANGLE WITH OPEN ARM ENDING IN ARROW POINTING RIGHT AND DOWN;Sm;0;ON;;;;;Y;;;;; +29AF;MEASURED ANGLE WITH OPEN ARM ENDING IN ARROW POINTING LEFT AND DOWN;Sm;0;ON;;;;;Y;;;;; +29B0;REVERSED EMPTY SET;Sm;0;ON;;;;;N;;;;; +29B1;EMPTY SET WITH OVERBAR;Sm;0;ON;;;;;N;;;;; +29B2;EMPTY SET WITH SMALL CIRCLE ABOVE;Sm;0;ON;;;;;N;;;;; +29B3;EMPTY SET WITH RIGHT ARROW ABOVE;Sm;0;ON;;;;;N;;;;; +29B4;EMPTY SET WITH LEFT ARROW ABOVE;Sm;0;ON;;;;;N;;;;; +29B5;CIRCLE WITH HORIZONTAL BAR;Sm;0;ON;;;;;N;;;;; +29B6;CIRCLED VERTICAL BAR;Sm;0;ON;;;;;N;;;;; +29B7;CIRCLED PARALLEL;Sm;0;ON;;;;;N;;;;; +29B8;CIRCLED REVERSE SOLIDUS;Sm;0;ON;;;;;Y;;;;; +29B9;CIRCLED PERPENDICULAR;Sm;0;ON;;;;;N;;;;; +29BA;CIRCLE DIVIDED BY HORIZONTAL BAR AND TOP HALF DIVIDED BY VERTICAL BAR;Sm;0;ON;;;;;N;;;;; +29BB;CIRCLE WITH SUPERIMPOSED X;Sm;0;ON;;;;;N;;;;; +29BC;CIRCLED ANTICLOCKWISE-ROTATED DIVISION SIGN;Sm;0;ON;;;;;N;;;;; +29BD;UP ARROW THROUGH CIRCLE;Sm;0;ON;;;;;N;;;;; +29BE;CIRCLED WHITE BULLET;Sm;0;ON;;;;;N;;;;; +29BF;CIRCLED BULLET;Sm;0;ON;;;;;N;;;;; +29C0;CIRCLED LESS-THAN;Sm;0;ON;;;;;Y;;;;; +29C1;CIRCLED GREATER-THAN;Sm;0;ON;;;;;Y;;;;; +29C2;CIRCLE WITH SMALL CIRCLE TO THE RIGHT;Sm;0;ON;;;;;Y;;;;; +29C3;CIRCLE WITH TWO HORIZONTAL STROKES TO THE RIGHT;Sm;0;ON;;;;;Y;;;;; +29C4;SQUARED RISING DIAGONAL SLASH;Sm;0;ON;;;;;Y;;;;; +29C5;SQUARED FALLING DIAGONAL SLASH;Sm;0;ON;;;;;Y;;;;; +29C6;SQUARED ASTERISK;Sm;0;ON;;;;;N;;;;; +29C7;SQUARED SMALL CIRCLE;Sm;0;ON;;;;;N;;;;; +29C8;SQUARED SQUARE;Sm;0;ON;;;;;N;;;;; +29C9;TWO JOINED SQUARES;Sm;0;ON;;;;;Y;;;;; +29CA;TRIANGLE WITH DOT ABOVE;Sm;0;ON;;;;;N;;;;; +29CB;TRIANGLE WITH UNDERBAR;Sm;0;ON;;;;;N;;;;; +29CC;S IN TRIANGLE;Sm;0;ON;;;;;N;;;;; +29CD;TRIANGLE WITH SERIFS AT BOTTOM;Sm;0;ON;;;;;N;;;;; +29CE;RIGHT TRIANGLE ABOVE LEFT TRIANGLE;Sm;0;ON;;;;;Y;;;;; +29CF;LEFT TRIANGLE BESIDE VERTICAL BAR;Sm;0;ON;;;;;Y;;;;; +29D0;VERTICAL BAR BESIDE RIGHT TRIANGLE;Sm;0;ON;;;;;Y;;;;; +29D1;BOWTIE WITH LEFT HALF BLACK;Sm;0;ON;;;;;Y;;;;; +29D2;BOWTIE WITH RIGHT HALF BLACK;Sm;0;ON;;;;;Y;;;;; +29D3;BLACK BOWTIE;Sm;0;ON;;;;;N;;;;; +29D4;TIMES WITH LEFT HALF BLACK;Sm;0;ON;;;;;Y;;;;; +29D5;TIMES WITH RIGHT HALF BLACK;Sm;0;ON;;;;;Y;;;;; +29D6;WHITE HOURGLASS;Sm;0;ON;;;;;N;;;;; +29D7;BLACK HOURGLASS;Sm;0;ON;;;;;N;;;;; +29D8;LEFT WIGGLY FENCE;Ps;0;ON;;;;;Y;;;;; +29D9;RIGHT WIGGLY FENCE;Pe;0;ON;;;;;Y;;;;; +29DA;LEFT DOUBLE WIGGLY FENCE;Ps;0;ON;;;;;Y;;;;; +29DB;RIGHT DOUBLE WIGGLY FENCE;Pe;0;ON;;;;;Y;;;;; +29DC;INCOMPLETE INFINITY;Sm;0;ON;;;;;Y;;;;; +29DD;TIE OVER INFINITY;Sm;0;ON;;;;;N;;;;; +29DE;INFINITY NEGATED WITH VERTICAL BAR;Sm;0;ON;;;;;N;;;;; +29DF;DOUBLE-ENDED MULTIMAP;Sm;0;ON;;;;;N;;;;; +29E0;SQUARE WITH CONTOURED OUTLINE;Sm;0;ON;;;;;N;;;;; +29E1;INCREASES AS;Sm;0;ON;;;;;Y;;;;; +29E2;SHUFFLE PRODUCT;Sm;0;ON;;;;;N;;;;; +29E3;EQUALS SIGN AND SLANTED PARALLEL;Sm;0;ON;;;;;Y;;;;; +29E4;EQUALS SIGN AND SLANTED PARALLEL WITH TILDE ABOVE;Sm;0;ON;;;;;Y;;;;; +29E5;IDENTICAL TO AND SLANTED PARALLEL;Sm;0;ON;;;;;Y;;;;; +29E6;GLEICH STARK;Sm;0;ON;;;;;N;;;;; +29E7;THERMODYNAMIC;Sm;0;ON;;;;;N;;;;; +29E8;DOWN-POINTING TRIANGLE WITH LEFT HALF BLACK;Sm;0;ON;;;;;Y;;;;; +29E9;DOWN-POINTING TRIANGLE WITH RIGHT HALF BLACK;Sm;0;ON;;;;;Y;;;;; +29EA;BLACK DIAMOND WITH DOWN ARROW;Sm;0;ON;;;;;N;;;;; +29EB;BLACK LOZENGE;Sm;0;ON;;;;;N;;;;; +29EC;WHITE CIRCLE WITH DOWN ARROW;Sm;0;ON;;;;;N;;;;; +29ED;BLACK CIRCLE WITH DOWN ARROW;Sm;0;ON;;;;;N;;;;; +29EE;ERROR-BARRED WHITE SQUARE;Sm;0;ON;;;;;N;;;;; +29EF;ERROR-BARRED BLACK SQUARE;Sm;0;ON;;;;;N;;;;; +29F0;ERROR-BARRED WHITE DIAMOND;Sm;0;ON;;;;;N;;;;; +29F1;ERROR-BARRED BLACK DIAMOND;Sm;0;ON;;;;;N;;;;; +29F2;ERROR-BARRED WHITE CIRCLE;Sm;0;ON;;;;;N;;;;; +29F3;ERROR-BARRED BLACK CIRCLE;Sm;0;ON;;;;;N;;;;; +29F4;RULE-DELAYED;Sm;0;ON;;;;;Y;;;;; +29F5;REVERSE SOLIDUS OPERATOR;Sm;0;ON;;;;;Y;;;;; +29F6;SOLIDUS WITH OVERBAR;Sm;0;ON;;;;;Y;;;;; +29F7;REVERSE SOLIDUS WITH HORIZONTAL STROKE;Sm;0;ON;;;;;Y;;;;; +29F8;BIG SOLIDUS;Sm;0;ON;;;;;Y;;;;; +29F9;BIG REVERSE SOLIDUS;Sm;0;ON;;;;;Y;;;;; +29FA;DOUBLE PLUS;Sm;0;ON;;;;;N;;;;; +29FB;TRIPLE PLUS;Sm;0;ON;;;;;N;;;;; +29FC;LEFT-POINTING CURVED ANGLE BRACKET;Ps;0;ON;;;;;Y;;;;; +29FD;RIGHT-POINTING CURVED ANGLE BRACKET;Pe;0;ON;;;;;Y;;;;; +29FE;TINY;Sm;0;ON;;;;;N;;;;; +29FF;MINY;Sm;0;ON;;;;;N;;;;; +2A00;N-ARY CIRCLED DOT OPERATOR;Sm;0;ON;;;;;N;;;;; +2A01;N-ARY CIRCLED PLUS OPERATOR;Sm;0;ON;;;;;N;;;;; +2A02;N-ARY CIRCLED TIMES OPERATOR;Sm;0;ON;;;;;N;;;;; +2A03;N-ARY UNION OPERATOR WITH DOT;Sm;0;ON;;;;;N;;;;; +2A04;N-ARY UNION OPERATOR WITH PLUS;Sm;0;ON;;;;;N;;;;; +2A05;N-ARY SQUARE INTERSECTION OPERATOR;Sm;0;ON;;;;;N;;;;; +2A06;N-ARY SQUARE UNION OPERATOR;Sm;0;ON;;;;;N;;;;; +2A07;TWO LOGICAL AND OPERATOR;Sm;0;ON;;;;;N;;;;; +2A08;TWO LOGICAL OR OPERATOR;Sm;0;ON;;;;;N;;;;; +2A09;N-ARY TIMES OPERATOR;Sm;0;ON;;;;;N;;;;; +2A0A;MODULO TWO SUM;Sm;0;ON;;;;;Y;;;;; +2A0B;SUMMATION WITH INTEGRAL;Sm;0;ON;;;;;Y;;;;; +2A0C;QUADRUPLE INTEGRAL OPERATOR;Sm;0;ON; 222B 222B 222B 222B;;;;Y;;;;; +2A0D;FINITE PART INTEGRAL;Sm;0;ON;;;;;Y;;;;; +2A0E;INTEGRAL WITH DOUBLE STROKE;Sm;0;ON;;;;;Y;;;;; +2A0F;INTEGRAL AVERAGE WITH SLASH;Sm;0;ON;;;;;Y;;;;; +2A10;CIRCULATION FUNCTION;Sm;0;ON;;;;;Y;;;;; +2A11;ANTICLOCKWISE INTEGRATION;Sm;0;ON;;;;;Y;;;;; +2A12;LINE INTEGRATION WITH RECTANGULAR PATH AROUND POLE;Sm;0;ON;;;;;Y;;;;; +2A13;LINE INTEGRATION WITH SEMICIRCULAR PATH AROUND POLE;Sm;0;ON;;;;;Y;;;;; +2A14;LINE INTEGRATION NOT INCLUDING THE POLE;Sm;0;ON;;;;;Y;;;;; +2A15;INTEGRAL AROUND A POINT OPERATOR;Sm;0;ON;;;;;Y;;;;; +2A16;QUATERNION INTEGRAL OPERATOR;Sm;0;ON;;;;;Y;;;;; +2A17;INTEGRAL WITH LEFTWARDS ARROW WITH HOOK;Sm;0;ON;;;;;Y;;;;; +2A18;INTEGRAL WITH TIMES SIGN;Sm;0;ON;;;;;Y;;;;; +2A19;INTEGRAL WITH INTERSECTION;Sm;0;ON;;;;;Y;;;;; +2A1A;INTEGRAL WITH UNION;Sm;0;ON;;;;;Y;;;;; +2A1B;INTEGRAL WITH OVERBAR;Sm;0;ON;;;;;Y;;;;; +2A1C;INTEGRAL WITH UNDERBAR;Sm;0;ON;;;;;Y;;;;; +2A1D;JOIN;Sm;0;ON;;;;;N;;;;; +2A1E;LARGE LEFT TRIANGLE OPERATOR;Sm;0;ON;;;;;Y;;;;; +2A1F;Z NOTATION SCHEMA COMPOSITION;Sm;0;ON;;;;;Y;;;;; +2A20;Z NOTATION SCHEMA PIPING;Sm;0;ON;;;;;Y;;;;; +2A21;Z NOTATION SCHEMA PROJECTION;Sm;0;ON;;;;;Y;;;;; +2A22;PLUS SIGN WITH SMALL CIRCLE ABOVE;Sm;0;ON;;;;;N;;;;; +2A23;PLUS SIGN WITH CIRCUMFLEX ACCENT ABOVE;Sm;0;ON;;;;;N;;;;; +2A24;PLUS SIGN WITH TILDE ABOVE;Sm;0;ON;;;;;Y;;;;; +2A25;PLUS SIGN WITH DOT BELOW;Sm;0;ON;;;;;N;;;;; +2A26;PLUS SIGN WITH TILDE BELOW;Sm;0;ON;;;;;Y;;;;; +2A27;PLUS SIGN WITH SUBSCRIPT TWO;Sm;0;ON;;;;;N;;;;; +2A28;PLUS SIGN WITH BLACK TRIANGLE;Sm;0;ON;;;;;N;;;;; +2A29;MINUS SIGN WITH COMMA ABOVE;Sm;0;ON;;;;;Y;;;;; +2A2A;MINUS SIGN WITH DOT BELOW;Sm;0;ON;;;;;N;;;;; +2A2B;MINUS SIGN WITH FALLING DOTS;Sm;0;ON;;;;;Y;;;;; +2A2C;MINUS SIGN WITH RISING DOTS;Sm;0;ON;;;;;Y;;;;; +2A2D;PLUS SIGN IN LEFT HALF CIRCLE;Sm;0;ON;;;;;Y;;;;; +2A2E;PLUS SIGN IN RIGHT HALF CIRCLE;Sm;0;ON;;;;;Y;;;;; +2A2F;VECTOR OR CROSS PRODUCT;Sm;0;ON;;;;;N;;;;; +2A30;MULTIPLICATION SIGN WITH DOT ABOVE;Sm;0;ON;;;;;N;;;;; +2A31;MULTIPLICATION SIGN WITH UNDERBAR;Sm;0;ON;;;;;N;;;;; +2A32;SEMIDIRECT PRODUCT WITH BOTTOM CLOSED;Sm;0;ON;;;;;N;;;;; +2A33;SMASH PRODUCT;Sm;0;ON;;;;;N;;;;; +2A34;MULTIPLICATION SIGN IN LEFT HALF CIRCLE;Sm;0;ON;;;;;Y;;;;; +2A35;MULTIPLICATION SIGN IN RIGHT HALF CIRCLE;Sm;0;ON;;;;;Y;;;;; +2A36;CIRCLED MULTIPLICATION SIGN WITH CIRCUMFLEX ACCENT;Sm;0;ON;;;;;N;;;;; +2A37;MULTIPLICATION SIGN IN DOUBLE CIRCLE;Sm;0;ON;;;;;N;;;;; +2A38;CIRCLED DIVISION SIGN;Sm;0;ON;;;;;N;;;;; +2A39;PLUS SIGN IN TRIANGLE;Sm;0;ON;;;;;N;;;;; +2A3A;MINUS SIGN IN TRIANGLE;Sm;0;ON;;;;;N;;;;; +2A3B;MULTIPLICATION SIGN IN TRIANGLE;Sm;0;ON;;;;;N;;;;; +2A3C;INTERIOR PRODUCT;Sm;0;ON;;;;;Y;;;;; +2A3D;RIGHTHAND INTERIOR PRODUCT;Sm;0;ON;;;;;Y;;;;; +2A3E;Z NOTATION RELATIONAL COMPOSITION;Sm;0;ON;;;;;Y;;;;; +2A3F;AMALGAMATION OR COPRODUCT;Sm;0;ON;;;;;N;;;;; +2A40;INTERSECTION WITH DOT;Sm;0;ON;;;;;N;;;;; +2A41;UNION WITH MINUS SIGN;Sm;0;ON;;;;;N;;;;; +2A42;UNION WITH OVERBAR;Sm;0;ON;;;;;N;;;;; +2A43;INTERSECTION WITH OVERBAR;Sm;0;ON;;;;;N;;;;; +2A44;INTERSECTION WITH LOGICAL AND;Sm;0;ON;;;;;N;;;;; +2A45;UNION WITH LOGICAL OR;Sm;0;ON;;;;;N;;;;; +2A46;UNION ABOVE INTERSECTION;Sm;0;ON;;;;;N;;;;; +2A47;INTERSECTION ABOVE UNION;Sm;0;ON;;;;;N;;;;; +2A48;UNION ABOVE BAR ABOVE INTERSECTION;Sm;0;ON;;;;;N;;;;; +2A49;INTERSECTION ABOVE BAR ABOVE UNION;Sm;0;ON;;;;;N;;;;; +2A4A;UNION BESIDE AND JOINED WITH UNION;Sm;0;ON;;;;;N;;;;; +2A4B;INTERSECTION BESIDE AND JOINED WITH INTERSECTION;Sm;0;ON;;;;;N;;;;; +2A4C;CLOSED UNION WITH SERIFS;Sm;0;ON;;;;;N;;;;; +2A4D;CLOSED INTERSECTION WITH SERIFS;Sm;0;ON;;;;;N;;;;; +2A4E;DOUBLE SQUARE INTERSECTION;Sm;0;ON;;;;;N;;;;; +2A4F;DOUBLE SQUARE UNION;Sm;0;ON;;;;;N;;;;; +2A50;CLOSED UNION WITH SERIFS AND SMASH PRODUCT;Sm;0;ON;;;;;N;;;;; +2A51;LOGICAL AND WITH DOT ABOVE;Sm;0;ON;;;;;N;;;;; +2A52;LOGICAL OR WITH DOT ABOVE;Sm;0;ON;;;;;N;;;;; +2A53;DOUBLE LOGICAL AND;Sm;0;ON;;;;;N;;;;; +2A54;DOUBLE LOGICAL OR;Sm;0;ON;;;;;N;;;;; +2A55;TWO INTERSECTING LOGICAL AND;Sm;0;ON;;;;;N;;;;; +2A56;TWO INTERSECTING LOGICAL OR;Sm;0;ON;;;;;N;;;;; +2A57;SLOPING LARGE OR;Sm;0;ON;;;;;Y;;;;; +2A58;SLOPING LARGE AND;Sm;0;ON;;;;;Y;;;;; +2A59;LOGICAL OR OVERLAPPING LOGICAL AND;Sm;0;ON;;;;;N;;;;; +2A5A;LOGICAL AND WITH MIDDLE STEM;Sm;0;ON;;;;;N;;;;; +2A5B;LOGICAL OR WITH MIDDLE STEM;Sm;0;ON;;;;;N;;;;; +2A5C;LOGICAL AND WITH HORIZONTAL DASH;Sm;0;ON;;;;;N;;;;; +2A5D;LOGICAL OR WITH HORIZONTAL DASH;Sm;0;ON;;;;;N;;;;; +2A5E;LOGICAL AND WITH DOUBLE OVERBAR;Sm;0;ON;;;;;N;;;;; +2A5F;LOGICAL AND WITH UNDERBAR;Sm;0;ON;;;;;N;;;;; +2A60;LOGICAL AND WITH DOUBLE UNDERBAR;Sm;0;ON;;;;;N;;;;; +2A61;SMALL VEE WITH UNDERBAR;Sm;0;ON;;;;;N;;;;; +2A62;LOGICAL OR WITH DOUBLE OVERBAR;Sm;0;ON;;;;;N;;;;; +2A63;LOGICAL OR WITH DOUBLE UNDERBAR;Sm;0;ON;;;;;N;;;;; +2A64;Z NOTATION DOMAIN ANTIRESTRICTION;Sm;0;ON;;;;;Y;;;;; +2A65;Z NOTATION RANGE ANTIRESTRICTION;Sm;0;ON;;;;;Y;;;;; +2A66;EQUALS SIGN WITH DOT BELOW;Sm;0;ON;;;;;N;;;;; +2A67;IDENTICAL WITH DOT ABOVE;Sm;0;ON;;;;;N;;;;; +2A68;TRIPLE HORIZONTAL BAR WITH DOUBLE VERTICAL STROKE;Sm;0;ON;;;;;N;;;;; +2A69;TRIPLE HORIZONTAL BAR WITH TRIPLE VERTICAL STROKE;Sm;0;ON;;;;;N;;;;; +2A6A;TILDE OPERATOR WITH DOT ABOVE;Sm;0;ON;;;;;Y;;;;; +2A6B;TILDE OPERATOR WITH RISING DOTS;Sm;0;ON;;;;;Y;;;;; +2A6C;SIMILAR MINUS SIMILAR;Sm;0;ON;;;;;Y;;;;; +2A6D;CONGRUENT WITH DOT ABOVE;Sm;0;ON;;;;;Y;;;;; +2A6E;EQUALS WITH ASTERISK;Sm;0;ON;;;;;N;;;;; +2A6F;ALMOST EQUAL TO WITH CIRCUMFLEX ACCENT;Sm;0;ON;;;;;Y;;;;; +2A70;APPROXIMATELY EQUAL OR EQUAL TO;Sm;0;ON;;;;;Y;;;;; +2A71;EQUALS SIGN ABOVE PLUS SIGN;Sm;0;ON;;;;;N;;;;; +2A72;PLUS SIGN ABOVE EQUALS SIGN;Sm;0;ON;;;;;N;;;;; +2A73;EQUALS SIGN ABOVE TILDE OPERATOR;Sm;0;ON;;;;;Y;;;;; +2A74;DOUBLE COLON EQUAL;Sm;0;ON; 003A 003A 003D;;;;Y;;;;; +2A75;TWO CONSECUTIVE EQUALS SIGNS;Sm;0;ON; 003D 003D;;;;N;;;;; +2A76;THREE CONSECUTIVE EQUALS SIGNS;Sm;0;ON; 003D 003D 003D;;;;N;;;;; +2A77;EQUALS SIGN WITH TWO DOTS ABOVE AND TWO DOTS BELOW;Sm;0;ON;;;;;N;;;;; +2A78;EQUIVALENT WITH FOUR DOTS ABOVE;Sm;0;ON;;;;;N;;;;; +2A79;LESS-THAN WITH CIRCLE INSIDE;Sm;0;ON;;;;;Y;;;;; +2A7A;GREATER-THAN WITH CIRCLE INSIDE;Sm;0;ON;;;;;Y;;;;; +2A7B;LESS-THAN WITH QUESTION MARK ABOVE;Sm;0;ON;;;;;Y;;;;; +2A7C;GREATER-THAN WITH QUESTION MARK ABOVE;Sm;0;ON;;;;;Y;;;;; +2A7D;LESS-THAN OR SLANTED EQUAL TO;Sm;0;ON;;;;;Y;;;;; +2A7E;GREATER-THAN OR SLANTED EQUAL TO;Sm;0;ON;;;;;Y;;;;; +2A7F;LESS-THAN OR SLANTED EQUAL TO WITH DOT INSIDE;Sm;0;ON;;;;;Y;;;;; +2A80;GREATER-THAN OR SLANTED EQUAL TO WITH DOT INSIDE;Sm;0;ON;;;;;Y;;;;; +2A81;LESS-THAN OR SLANTED EQUAL TO WITH DOT ABOVE;Sm;0;ON;;;;;Y;;;;; +2A82;GREATER-THAN OR SLANTED EQUAL TO WITH DOT ABOVE;Sm;0;ON;;;;;Y;;;;; +2A83;LESS-THAN OR SLANTED EQUAL TO WITH DOT ABOVE RIGHT;Sm;0;ON;;;;;Y;;;;; +2A84;GREATER-THAN OR SLANTED EQUAL TO WITH DOT ABOVE LEFT;Sm;0;ON;;;;;Y;;;;; +2A85;LESS-THAN OR APPROXIMATE;Sm;0;ON;;;;;Y;;;;; +2A86;GREATER-THAN OR APPROXIMATE;Sm;0;ON;;;;;Y;;;;; +2A87;LESS-THAN AND SINGLE-LINE NOT EQUAL TO;Sm;0;ON;;;;;Y;;;;; +2A88;GREATER-THAN AND SINGLE-LINE NOT EQUAL TO;Sm;0;ON;;;;;Y;;;;; +2A89;LESS-THAN AND NOT APPROXIMATE;Sm;0;ON;;;;;Y;;;;; +2A8A;GREATER-THAN AND NOT APPROXIMATE;Sm;0;ON;;;;;Y;;;;; +2A8B;LESS-THAN ABOVE DOUBLE-LINE EQUAL ABOVE GREATER-THAN;Sm;0;ON;;;;;Y;;;;; +2A8C;GREATER-THAN ABOVE DOUBLE-LINE EQUAL ABOVE LESS-THAN;Sm;0;ON;;;;;Y;;;;; +2A8D;LESS-THAN ABOVE SIMILAR OR EQUAL;Sm;0;ON;;;;;Y;;;;; +2A8E;GREATER-THAN ABOVE SIMILAR OR EQUAL;Sm;0;ON;;;;;Y;;;;; +2A8F;LESS-THAN ABOVE SIMILAR ABOVE GREATER-THAN;Sm;0;ON;;;;;Y;;;;; +2A90;GREATER-THAN ABOVE SIMILAR ABOVE LESS-THAN;Sm;0;ON;;;;;Y;;;;; +2A91;LESS-THAN ABOVE GREATER-THAN ABOVE DOUBLE-LINE EQUAL;Sm;0;ON;;;;;Y;;;;; +2A92;GREATER-THAN ABOVE LESS-THAN ABOVE DOUBLE-LINE EQUAL;Sm;0;ON;;;;;Y;;;;; +2A93;LESS-THAN ABOVE SLANTED EQUAL ABOVE GREATER-THAN ABOVE SLANTED EQUAL;Sm;0;ON;;;;;Y;;;;; +2A94;GREATER-THAN ABOVE SLANTED EQUAL ABOVE LESS-THAN ABOVE SLANTED EQUAL;Sm;0;ON;;;;;Y;;;;; +2A95;SLANTED EQUAL TO OR LESS-THAN;Sm;0;ON;;;;;Y;;;;; +2A96;SLANTED EQUAL TO OR GREATER-THAN;Sm;0;ON;;;;;Y;;;;; +2A97;SLANTED EQUAL TO OR LESS-THAN WITH DOT INSIDE;Sm;0;ON;;;;;Y;;;;; +2A98;SLANTED EQUAL TO OR GREATER-THAN WITH DOT INSIDE;Sm;0;ON;;;;;Y;;;;; +2A99;DOUBLE-LINE EQUAL TO OR LESS-THAN;Sm;0;ON;;;;;Y;;;;; +2A9A;DOUBLE-LINE EQUAL TO OR GREATER-THAN;Sm;0;ON;;;;;Y;;;;; +2A9B;DOUBLE-LINE SLANTED EQUAL TO OR LESS-THAN;Sm;0;ON;;;;;Y;;;;; +2A9C;DOUBLE-LINE SLANTED EQUAL TO OR GREATER-THAN;Sm;0;ON;;;;;Y;;;;; +2A9D;SIMILAR OR LESS-THAN;Sm;0;ON;;;;;Y;;;;; +2A9E;SIMILAR OR GREATER-THAN;Sm;0;ON;;;;;Y;;;;; +2A9F;SIMILAR ABOVE LESS-THAN ABOVE EQUALS SIGN;Sm;0;ON;;;;;Y;;;;; +2AA0;SIMILAR ABOVE GREATER-THAN ABOVE EQUALS SIGN;Sm;0;ON;;;;;Y;;;;; +2AA1;DOUBLE NESTED LESS-THAN;Sm;0;ON;;;;;Y;;;;; +2AA2;DOUBLE NESTED GREATER-THAN;Sm;0;ON;;;;;Y;;;;; +2AA3;DOUBLE NESTED LESS-THAN WITH UNDERBAR;Sm;0;ON;;;;;Y;;;;; +2AA4;GREATER-THAN OVERLAPPING LESS-THAN;Sm;0;ON;;;;;N;;;;; +2AA5;GREATER-THAN BESIDE LESS-THAN;Sm;0;ON;;;;;N;;;;; +2AA6;LESS-THAN CLOSED BY CURVE;Sm;0;ON;;;;;Y;;;;; +2AA7;GREATER-THAN CLOSED BY CURVE;Sm;0;ON;;;;;Y;;;;; +2AA8;LESS-THAN CLOSED BY CURVE ABOVE SLANTED EQUAL;Sm;0;ON;;;;;Y;;;;; +2AA9;GREATER-THAN CLOSED BY CURVE ABOVE SLANTED EQUAL;Sm;0;ON;;;;;Y;;;;; +2AAA;SMALLER THAN;Sm;0;ON;;;;;Y;;;;; +2AAB;LARGER THAN;Sm;0;ON;;;;;Y;;;;; +2AAC;SMALLER THAN OR EQUAL TO;Sm;0;ON;;;;;Y;;;;; +2AAD;LARGER THAN OR EQUAL TO;Sm;0;ON;;;;;Y;;;;; +2AAE;EQUALS SIGN WITH BUMPY ABOVE;Sm;0;ON;;;;;N;;;;; +2AAF;PRECEDES ABOVE SINGLE-LINE EQUALS SIGN;Sm;0;ON;;;;;Y;;;;; +2AB0;SUCCEEDS ABOVE SINGLE-LINE EQUALS SIGN;Sm;0;ON;;;;;Y;;;;; +2AB1;PRECEDES ABOVE SINGLE-LINE NOT EQUAL TO;Sm;0;ON;;;;;Y;;;;; +2AB2;SUCCEEDS ABOVE SINGLE-LINE NOT EQUAL TO;Sm;0;ON;;;;;Y;;;;; +2AB3;PRECEDES ABOVE EQUALS SIGN;Sm;0;ON;;;;;Y;;;;; +2AB4;SUCCEEDS ABOVE EQUALS SIGN;Sm;0;ON;;;;;Y;;;;; +2AB5;PRECEDES ABOVE NOT EQUAL TO;Sm;0;ON;;;;;Y;;;;; +2AB6;SUCCEEDS ABOVE NOT EQUAL TO;Sm;0;ON;;;;;Y;;;;; +2AB7;PRECEDES ABOVE ALMOST EQUAL TO;Sm;0;ON;;;;;Y;;;;; +2AB8;SUCCEEDS ABOVE ALMOST EQUAL TO;Sm;0;ON;;;;;Y;;;;; +2AB9;PRECEDES ABOVE NOT ALMOST EQUAL TO;Sm;0;ON;;;;;Y;;;;; +2ABA;SUCCEEDS ABOVE NOT ALMOST EQUAL TO;Sm;0;ON;;;;;Y;;;;; +2ABB;DOUBLE PRECEDES;Sm;0;ON;;;;;Y;;;;; +2ABC;DOUBLE SUCCEEDS;Sm;0;ON;;;;;Y;;;;; +2ABD;SUBSET WITH DOT;Sm;0;ON;;;;;Y;;;;; +2ABE;SUPERSET WITH DOT;Sm;0;ON;;;;;Y;;;;; +2ABF;SUBSET WITH PLUS SIGN BELOW;Sm;0;ON;;;;;Y;;;;; +2AC0;SUPERSET WITH PLUS SIGN BELOW;Sm;0;ON;;;;;Y;;;;; +2AC1;SUBSET WITH MULTIPLICATION SIGN BELOW;Sm;0;ON;;;;;Y;;;;; +2AC2;SUPERSET WITH MULTIPLICATION SIGN BELOW;Sm;0;ON;;;;;Y;;;;; +2AC3;SUBSET OF OR EQUAL TO WITH DOT ABOVE;Sm;0;ON;;;;;Y;;;;; +2AC4;SUPERSET OF OR EQUAL TO WITH DOT ABOVE;Sm;0;ON;;;;;Y;;;;; +2AC5;SUBSET OF ABOVE EQUALS SIGN;Sm;0;ON;;;;;Y;;;;; +2AC6;SUPERSET OF ABOVE EQUALS SIGN;Sm;0;ON;;;;;Y;;;;; +2AC7;SUBSET OF ABOVE TILDE OPERATOR;Sm;0;ON;;;;;Y;;;;; +2AC8;SUPERSET OF ABOVE TILDE OPERATOR;Sm;0;ON;;;;;Y;;;;; +2AC9;SUBSET OF ABOVE ALMOST EQUAL TO;Sm;0;ON;;;;;Y;;;;; +2ACA;SUPERSET OF ABOVE ALMOST EQUAL TO;Sm;0;ON;;;;;Y;;;;; +2ACB;SUBSET OF ABOVE NOT EQUAL TO;Sm;0;ON;;;;;Y;;;;; +2ACC;SUPERSET OF ABOVE NOT EQUAL TO;Sm;0;ON;;;;;Y;;;;; +2ACD;SQUARE LEFT OPEN BOX OPERATOR;Sm;0;ON;;;;;Y;;;;; +2ACE;SQUARE RIGHT OPEN BOX OPERATOR;Sm;0;ON;;;;;Y;;;;; +2ACF;CLOSED SUBSET;Sm;0;ON;;;;;Y;;;;; +2AD0;CLOSED SUPERSET;Sm;0;ON;;;;;Y;;;;; +2AD1;CLOSED SUBSET OR EQUAL TO;Sm;0;ON;;;;;Y;;;;; +2AD2;CLOSED SUPERSET OR EQUAL TO;Sm;0;ON;;;;;Y;;;;; +2AD3;SUBSET ABOVE SUPERSET;Sm;0;ON;;;;;Y;;;;; +2AD4;SUPERSET ABOVE SUBSET;Sm;0;ON;;;;;Y;;;;; +2AD5;SUBSET ABOVE SUBSET;Sm;0;ON;;;;;Y;;;;; +2AD6;SUPERSET ABOVE SUPERSET;Sm;0;ON;;;;;Y;;;;; +2AD7;SUPERSET BESIDE SUBSET;Sm;0;ON;;;;;N;;;;; +2AD8;SUPERSET BESIDE AND JOINED BY DASH WITH SUBSET;Sm;0;ON;;;;;N;;;;; +2AD9;ELEMENT OF OPENING DOWNWARDS;Sm;0;ON;;;;;N;;;;; +2ADA;PITCHFORK WITH TEE TOP;Sm;0;ON;;;;;N;;;;; +2ADB;TRANSVERSAL INTERSECTION;Sm;0;ON;;;;;N;;;;; +2ADC;FORKING;Sm;0;ON;2ADD 0338;;;;Y;;;;; +2ADD;NONFORKING;Sm;0;ON;;;;;N;;;;; +2ADE;SHORT LEFT TACK;Sm;0;ON;;;;;Y;;;;; +2ADF;SHORT DOWN TACK;Sm;0;ON;;;;;N;;;;; +2AE0;SHORT UP TACK;Sm;0;ON;;;;;N;;;;; +2AE1;PERPENDICULAR WITH S;Sm;0;ON;;;;;N;;;;; +2AE2;VERTICAL BAR TRIPLE RIGHT TURNSTILE;Sm;0;ON;;;;;Y;;;;; +2AE3;DOUBLE VERTICAL BAR LEFT TURNSTILE;Sm;0;ON;;;;;Y;;;;; +2AE4;VERTICAL BAR DOUBLE LEFT TURNSTILE;Sm;0;ON;;;;;Y;;;;; +2AE5;DOUBLE VERTICAL BAR DOUBLE LEFT TURNSTILE;Sm;0;ON;;;;;Y;;;;; +2AE6;LONG DASH FROM LEFT MEMBER OF DOUBLE VERTICAL;Sm;0;ON;;;;;Y;;;;; +2AE7;SHORT DOWN TACK WITH OVERBAR;Sm;0;ON;;;;;N;;;;; +2AE8;SHORT UP TACK WITH UNDERBAR;Sm;0;ON;;;;;N;;;;; +2AE9;SHORT UP TACK ABOVE SHORT DOWN TACK;Sm;0;ON;;;;;N;;;;; +2AEA;DOUBLE DOWN TACK;Sm;0;ON;;;;;N;;;;; +2AEB;DOUBLE UP TACK;Sm;0;ON;;;;;N;;;;; +2AEC;DOUBLE STROKE NOT SIGN;Sm;0;ON;;;;;Y;;;;; +2AED;REVERSED DOUBLE STROKE NOT SIGN;Sm;0;ON;;;;;Y;;;;; +2AEE;DOES NOT DIVIDE WITH REVERSED NEGATION SLASH;Sm;0;ON;;;;;Y;;;;; +2AEF;VERTICAL LINE WITH CIRCLE ABOVE;Sm;0;ON;;;;;N;;;;; +2AF0;VERTICAL LINE WITH CIRCLE BELOW;Sm;0;ON;;;;;N;;;;; +2AF1;DOWN TACK WITH CIRCLE BELOW;Sm;0;ON;;;;;N;;;;; +2AF2;PARALLEL WITH HORIZONTAL STROKE;Sm;0;ON;;;;;N;;;;; +2AF3;PARALLEL WITH TILDE OPERATOR;Sm;0;ON;;;;;Y;;;;; +2AF4;TRIPLE VERTICAL BAR BINARY RELATION;Sm;0;ON;;;;;N;;;;; +2AF5;TRIPLE VERTICAL BAR WITH HORIZONTAL STROKE;Sm;0;ON;;;;;N;;;;; +2AF6;TRIPLE COLON OPERATOR;Sm;0;ON;;;;;N;;;;; +2AF7;TRIPLE NESTED LESS-THAN;Sm;0;ON;;;;;Y;;;;; +2AF8;TRIPLE NESTED GREATER-THAN;Sm;0;ON;;;;;Y;;;;; +2AF9;DOUBLE-LINE SLANTED LESS-THAN OR EQUAL TO;Sm;0;ON;;;;;Y;;;;; +2AFA;DOUBLE-LINE SLANTED GREATER-THAN OR EQUAL TO;Sm;0;ON;;;;;Y;;;;; +2AFB;TRIPLE SOLIDUS BINARY RELATION;Sm;0;ON;;;;;Y;;;;; +2AFC;LARGE TRIPLE VERTICAL BAR OPERATOR;Sm;0;ON;;;;;N;;;;; +2AFD;DOUBLE SOLIDUS OPERATOR;Sm;0;ON;;;;;Y;;;;; +2AFE;WHITE VERTICAL BAR;Sm;0;ON;;;;;N;;;;; +2AFF;N-ARY WHITE VERTICAL BAR;Sm;0;ON;;;;;N;;;;; +2B00;NORTH EAST WHITE ARROW;So;0;ON;;;;;N;;;;; +2B01;NORTH WEST WHITE ARROW;So;0;ON;;;;;N;;;;; +2B02;SOUTH EAST WHITE ARROW;So;0;ON;;;;;N;;;;; +2B03;SOUTH WEST WHITE ARROW;So;0;ON;;;;;N;;;;; +2B04;LEFT RIGHT WHITE ARROW;So;0;ON;;;;;N;;;;; +2B05;LEFTWARDS BLACK ARROW;So;0;ON;;;;;N;;;;; +2B06;UPWARDS BLACK ARROW;So;0;ON;;;;;N;;;;; +2B07;DOWNWARDS BLACK ARROW;So;0;ON;;;;;N;;;;; +2B08;NORTH EAST BLACK ARROW;So;0;ON;;;;;N;;;;; +2B09;NORTH WEST BLACK ARROW;So;0;ON;;;;;N;;;;; +2B0A;SOUTH EAST BLACK ARROW;So;0;ON;;;;;N;;;;; +2B0B;SOUTH WEST BLACK ARROW;So;0;ON;;;;;N;;;;; +2B0C;LEFT RIGHT BLACK ARROW;So;0;ON;;;;;N;;;;; +2B0D;UP DOWN BLACK ARROW;So;0;ON;;;;;N;;;;; +2B0E;RIGHTWARDS ARROW WITH TIP DOWNWARDS;So;0;ON;;;;;N;;;;; +2B0F;RIGHTWARDS ARROW WITH TIP UPWARDS;So;0;ON;;;;;N;;;;; +2B10;LEFTWARDS ARROW WITH TIP DOWNWARDS;So;0;ON;;;;;N;;;;; +2B11;LEFTWARDS ARROW WITH TIP UPWARDS;So;0;ON;;;;;N;;;;; +2B12;SQUARE WITH TOP HALF BLACK;So;0;ON;;;;;N;;;;; +2B13;SQUARE WITH BOTTOM HALF BLACK;So;0;ON;;;;;N;;;;; +2B14;SQUARE WITH UPPER RIGHT DIAGONAL HALF BLACK;So;0;ON;;;;;N;;;;; +2B15;SQUARE WITH LOWER LEFT DIAGONAL HALF BLACK;So;0;ON;;;;;N;;;;; +2B16;DIAMOND WITH LEFT HALF BLACK;So;0;ON;;;;;N;;;;; +2B17;DIAMOND WITH RIGHT HALF BLACK;So;0;ON;;;;;N;;;;; +2B18;DIAMOND WITH TOP HALF BLACK;So;0;ON;;;;;N;;;;; +2B19;DIAMOND WITH BOTTOM HALF BLACK;So;0;ON;;;;;N;;;;; +2B1A;DOTTED SQUARE;So;0;ON;;;;;N;;;;; +2B1B;BLACK LARGE SQUARE;So;0;ON;;;;;N;;;;; +2B1C;WHITE LARGE SQUARE;So;0;ON;;;;;N;;;;; +2B1D;BLACK VERY SMALL SQUARE;So;0;ON;;;;;N;;;;; +2B1E;WHITE VERY SMALL SQUARE;So;0;ON;;;;;N;;;;; +2B1F;BLACK PENTAGON;So;0;ON;;;;;N;;;;; +2B20;WHITE PENTAGON;So;0;ON;;;;;N;;;;; +2B21;WHITE HEXAGON;So;0;ON;;;;;N;;;;; +2B22;BLACK HEXAGON;So;0;ON;;;;;N;;;;; +2B23;HORIZONTAL BLACK HEXAGON;So;0;ON;;;;;N;;;;; +2B24;BLACK LARGE CIRCLE;So;0;ON;;;;;N;;;;; +2B25;BLACK MEDIUM DIAMOND;So;0;ON;;;;;N;;;;; +2B26;WHITE MEDIUM DIAMOND;So;0;ON;;;;;N;;;;; +2B27;BLACK MEDIUM LOZENGE;So;0;ON;;;;;N;;;;; +2B28;WHITE MEDIUM LOZENGE;So;0;ON;;;;;N;;;;; +2B29;BLACK SMALL DIAMOND;So;0;ON;;;;;N;;;;; +2B2A;BLACK SMALL LOZENGE;So;0;ON;;;;;N;;;;; +2B2B;WHITE SMALL LOZENGE;So;0;ON;;;;;N;;;;; +2B2C;BLACK HORIZONTAL ELLIPSE;So;0;ON;;;;;N;;;;; +2B2D;WHITE HORIZONTAL ELLIPSE;So;0;ON;;;;;N;;;;; +2B2E;BLACK VERTICAL ELLIPSE;So;0;ON;;;;;N;;;;; +2B2F;WHITE VERTICAL ELLIPSE;So;0;ON;;;;;N;;;;; +2B30;LEFT ARROW WITH SMALL CIRCLE;Sm;0;ON;;;;;N;;;;; +2B31;THREE LEFTWARDS ARROWS;Sm;0;ON;;;;;N;;;;; +2B32;LEFT ARROW WITH CIRCLED PLUS;Sm;0;ON;;;;;N;;;;; +2B33;LONG LEFTWARDS SQUIGGLE ARROW;Sm;0;ON;;;;;N;;;;; +2B34;LEFTWARDS TWO-HEADED ARROW WITH VERTICAL STROKE;Sm;0;ON;;;;;N;;;;; +2B35;LEFTWARDS TWO-HEADED ARROW WITH DOUBLE VERTICAL STROKE;Sm;0;ON;;;;;N;;;;; +2B36;LEFTWARDS TWO-HEADED ARROW FROM BAR;Sm;0;ON;;;;;N;;;;; +2B37;LEFTWARDS TWO-HEADED TRIPLE DASH ARROW;Sm;0;ON;;;;;N;;;;; +2B38;LEFTWARDS ARROW WITH DOTTED STEM;Sm;0;ON;;;;;N;;;;; +2B39;LEFTWARDS ARROW WITH TAIL WITH VERTICAL STROKE;Sm;0;ON;;;;;N;;;;; +2B3A;LEFTWARDS ARROW WITH TAIL WITH DOUBLE VERTICAL STROKE;Sm;0;ON;;;;;N;;;;; +2B3B;LEFTWARDS TWO-HEADED ARROW WITH TAIL;Sm;0;ON;;;;;N;;;;; +2B3C;LEFTWARDS TWO-HEADED ARROW WITH TAIL WITH VERTICAL STROKE;Sm;0;ON;;;;;N;;;;; +2B3D;LEFTWARDS TWO-HEADED ARROW WITH TAIL WITH DOUBLE VERTICAL STROKE;Sm;0;ON;;;;;N;;;;; +2B3E;LEFTWARDS ARROW THROUGH X;Sm;0;ON;;;;;N;;;;; +2B3F;WAVE ARROW POINTING DIRECTLY LEFT;Sm;0;ON;;;;;N;;;;; +2B40;EQUALS SIGN ABOVE LEFTWARDS ARROW;Sm;0;ON;;;;;N;;;;; +2B41;REVERSE TILDE OPERATOR ABOVE LEFTWARDS ARROW;Sm;0;ON;;;;;N;;;;; +2B42;LEFTWARDS ARROW ABOVE REVERSE ALMOST EQUAL TO;Sm;0;ON;;;;;N;;;;; +2B43;RIGHTWARDS ARROW THROUGH GREATER-THAN;Sm;0;ON;;;;;N;;;;; +2B44;RIGHTWARDS ARROW THROUGH SUPERSET;Sm;0;ON;;;;;N;;;;; +2B45;LEFTWARDS QUADRUPLE ARROW;So;0;ON;;;;;N;;;;; +2B46;RIGHTWARDS QUADRUPLE ARROW;So;0;ON;;;;;N;;;;; +2B47;REVERSE TILDE OPERATOR ABOVE RIGHTWARDS ARROW;Sm;0;ON;;;;;N;;;;; +2B48;RIGHTWARDS ARROW ABOVE REVERSE ALMOST EQUAL TO;Sm;0;ON;;;;;N;;;;; +2B49;TILDE OPERATOR ABOVE LEFTWARDS ARROW;Sm;0;ON;;;;;N;;;;; +2B4A;LEFTWARDS ARROW ABOVE ALMOST EQUAL TO;Sm;0;ON;;;;;N;;;;; +2B4B;LEFTWARDS ARROW ABOVE REVERSE TILDE OPERATOR;Sm;0;ON;;;;;N;;;;; +2B4C;RIGHTWARDS ARROW ABOVE REVERSE TILDE OPERATOR;Sm;0;ON;;;;;N;;;;; +2B4D;DOWNWARDS TRIANGLE-HEADED ZIGZAG ARROW;So;0;ON;;;;;N;;;;; +2B4E;SHORT SLANTED NORTH ARROW;So;0;ON;;;;;N;;;;; +2B4F;SHORT BACKSLANTED SOUTH ARROW;So;0;ON;;;;;N;;;;; +2B50;WHITE MEDIUM STAR;So;0;ON;;;;;N;;;;; +2B51;BLACK SMALL STAR;So;0;ON;;;;;N;;;;; +2B52;WHITE SMALL STAR;So;0;ON;;;;;N;;;;; +2B53;BLACK RIGHT-POINTING PENTAGON;So;0;ON;;;;;N;;;;; +2B54;WHITE RIGHT-POINTING PENTAGON;So;0;ON;;;;;N;;;;; +2B55;HEAVY LARGE CIRCLE;So;0;ON;;;;;N;;;;; +2B56;HEAVY OVAL WITH OVAL INSIDE;So;0;ON;;;;;N;;;;; +2B57;HEAVY CIRCLE WITH CIRCLE INSIDE;So;0;ON;;;;;N;;;;; +2B58;HEAVY CIRCLE;So;0;ON;;;;;N;;;;; +2B59;HEAVY CIRCLED SALTIRE;So;0;ON;;;;;N;;;;; +2B5A;SLANTED NORTH ARROW WITH HOOKED HEAD;So;0;ON;;;;;N;;;;; +2B5B;BACKSLANTED SOUTH ARROW WITH HOOKED TAIL;So;0;ON;;;;;N;;;;; +2B5C;SLANTED NORTH ARROW WITH HORIZONTAL TAIL;So;0;ON;;;;;N;;;;; +2B5D;BACKSLANTED SOUTH ARROW WITH HORIZONTAL TAIL;So;0;ON;;;;;N;;;;; +2B5E;BENT ARROW POINTING DOWNWARDS THEN NORTH EAST;So;0;ON;;;;;N;;;;; +2B5F;SHORT BENT ARROW POINTING DOWNWARDS THEN NORTH EAST;So;0;ON;;;;;N;;;;; +2B60;LEFTWARDS TRIANGLE-HEADED ARROW;So;0;ON;;;;;N;;;;; +2B61;UPWARDS TRIANGLE-HEADED ARROW;So;0;ON;;;;;N;;;;; +2B62;RIGHTWARDS TRIANGLE-HEADED ARROW;So;0;ON;;;;;N;;;;; +2B63;DOWNWARDS TRIANGLE-HEADED ARROW;So;0;ON;;;;;N;;;;; +2B64;LEFT RIGHT TRIANGLE-HEADED ARROW;So;0;ON;;;;;N;;;;; +2B65;UP DOWN TRIANGLE-HEADED ARROW;So;0;ON;;;;;N;;;;; +2B66;NORTH WEST TRIANGLE-HEADED ARROW;So;0;ON;;;;;N;;;;; +2B67;NORTH EAST TRIANGLE-HEADED ARROW;So;0;ON;;;;;N;;;;; +2B68;SOUTH EAST TRIANGLE-HEADED ARROW;So;0;ON;;;;;N;;;;; +2B69;SOUTH WEST TRIANGLE-HEADED ARROW;So;0;ON;;;;;N;;;;; +2B6A;LEFTWARDS TRIANGLE-HEADED DASHED ARROW;So;0;ON;;;;;N;;;;; +2B6B;UPWARDS TRIANGLE-HEADED DASHED ARROW;So;0;ON;;;;;N;;;;; +2B6C;RIGHTWARDS TRIANGLE-HEADED DASHED ARROW;So;0;ON;;;;;N;;;;; +2B6D;DOWNWARDS TRIANGLE-HEADED DASHED ARROW;So;0;ON;;;;;N;;;;; +2B6E;CLOCKWISE TRIANGLE-HEADED OPEN CIRCLE ARROW;So;0;ON;;;;;N;;;;; +2B6F;ANTICLOCKWISE TRIANGLE-HEADED OPEN CIRCLE ARROW;So;0;ON;;;;;N;;;;; +2B70;LEFTWARDS TRIANGLE-HEADED ARROW TO BAR;So;0;ON;;;;;N;;;;; +2B71;UPWARDS TRIANGLE-HEADED ARROW TO BAR;So;0;ON;;;;;N;;;;; +2B72;RIGHTWARDS TRIANGLE-HEADED ARROW TO BAR;So;0;ON;;;;;N;;;;; +2B73;DOWNWARDS TRIANGLE-HEADED ARROW TO BAR;So;0;ON;;;;;N;;;;; +2B76;NORTH WEST TRIANGLE-HEADED ARROW TO BAR;So;0;ON;;;;;N;;;;; +2B77;NORTH EAST TRIANGLE-HEADED ARROW TO BAR;So;0;ON;;;;;N;;;;; +2B78;SOUTH EAST TRIANGLE-HEADED ARROW TO BAR;So;0;ON;;;;;N;;;;; +2B79;SOUTH WEST TRIANGLE-HEADED ARROW TO BAR;So;0;ON;;;;;N;;;;; +2B7A;LEFTWARDS TRIANGLE-HEADED ARROW WITH DOUBLE HORIZONTAL STROKE;So;0;ON;;;;;N;;;;; +2B7B;UPWARDS TRIANGLE-HEADED ARROW WITH DOUBLE HORIZONTAL STROKE;So;0;ON;;;;;N;;;;; +2B7C;RIGHTWARDS TRIANGLE-HEADED ARROW WITH DOUBLE HORIZONTAL STROKE;So;0;ON;;;;;N;;;;; +2B7D;DOWNWARDS TRIANGLE-HEADED ARROW WITH DOUBLE HORIZONTAL STROKE;So;0;ON;;;;;N;;;;; +2B7E;HORIZONTAL TAB KEY;So;0;ON;;;;;N;;;;; +2B7F;VERTICAL TAB KEY;So;0;ON;;;;;N;;;;; +2B80;LEFTWARDS TRIANGLE-HEADED ARROW OVER RIGHTWARDS TRIANGLE-HEADED ARROW;So;0;ON;;;;;N;;;;; +2B81;UPWARDS TRIANGLE-HEADED ARROW LEFTWARDS OF DOWNWARDS TRIANGLE-HEADED ARROW;So;0;ON;;;;;N;;;;; +2B82;RIGHTWARDS TRIANGLE-HEADED ARROW OVER LEFTWARDS TRIANGLE-HEADED ARROW;So;0;ON;;;;;N;;;;; +2B83;DOWNWARDS TRIANGLE-HEADED ARROW LEFTWARDS OF UPWARDS TRIANGLE-HEADED ARROW;So;0;ON;;;;;N;;;;; +2B84;LEFTWARDS TRIANGLE-HEADED PAIRED ARROWS;So;0;ON;;;;;N;;;;; +2B85;UPWARDS TRIANGLE-HEADED PAIRED ARROWS;So;0;ON;;;;;N;;;;; +2B86;RIGHTWARDS TRIANGLE-HEADED PAIRED ARROWS;So;0;ON;;;;;N;;;;; +2B87;DOWNWARDS TRIANGLE-HEADED PAIRED ARROWS;So;0;ON;;;;;N;;;;; +2B88;LEFTWARDS BLACK CIRCLED WHITE ARROW;So;0;ON;;;;;N;;;;; +2B89;UPWARDS BLACK CIRCLED WHITE ARROW;So;0;ON;;;;;N;;;;; +2B8A;RIGHTWARDS BLACK CIRCLED WHITE ARROW;So;0;ON;;;;;N;;;;; +2B8B;DOWNWARDS BLACK CIRCLED WHITE ARROW;So;0;ON;;;;;N;;;;; +2B8C;ANTICLOCKWISE TRIANGLE-HEADED RIGHT U-SHAPED ARROW;So;0;ON;;;;;N;;;;; +2B8D;ANTICLOCKWISE TRIANGLE-HEADED BOTTOM U-SHAPED ARROW;So;0;ON;;;;;N;;;;; +2B8E;ANTICLOCKWISE TRIANGLE-HEADED LEFT U-SHAPED ARROW;So;0;ON;;;;;N;;;;; +2B8F;ANTICLOCKWISE TRIANGLE-HEADED TOP U-SHAPED ARROW;So;0;ON;;;;;N;;;;; +2B90;RETURN LEFT;So;0;ON;;;;;N;;;;; +2B91;RETURN RIGHT;So;0;ON;;;;;N;;;;; +2B92;NEWLINE LEFT;So;0;ON;;;;;N;;;;; +2B93;NEWLINE RIGHT;So;0;ON;;;;;N;;;;; +2B94;FOUR CORNER ARROWS CIRCLING ANTICLOCKWISE;So;0;ON;;;;;N;;;;; +2B95;RIGHTWARDS BLACK ARROW;So;0;ON;;;;;N;;;;; +2B98;THREE-D TOP-LIGHTED LEFTWARDS EQUILATERAL ARROWHEAD;So;0;ON;;;;;N;;;;; +2B99;THREE-D RIGHT-LIGHTED UPWARDS EQUILATERAL ARROWHEAD;So;0;ON;;;;;N;;;;; +2B9A;THREE-D TOP-LIGHTED RIGHTWARDS EQUILATERAL ARROWHEAD;So;0;ON;;;;;N;;;;; +2B9B;THREE-D LEFT-LIGHTED DOWNWARDS EQUILATERAL ARROWHEAD;So;0;ON;;;;;N;;;;; +2B9C;BLACK LEFTWARDS EQUILATERAL ARROWHEAD;So;0;ON;;;;;N;;;;; +2B9D;BLACK UPWARDS EQUILATERAL ARROWHEAD;So;0;ON;;;;;N;;;;; +2B9E;BLACK RIGHTWARDS EQUILATERAL ARROWHEAD;So;0;ON;;;;;N;;;;; +2B9F;BLACK DOWNWARDS EQUILATERAL ARROWHEAD;So;0;ON;;;;;N;;;;; +2BA0;DOWNWARDS TRIANGLE-HEADED ARROW WITH LONG TIP LEFTWARDS;So;0;ON;;;;;N;;;;; +2BA1;DOWNWARDS TRIANGLE-HEADED ARROW WITH LONG TIP RIGHTWARDS;So;0;ON;;;;;N;;;;; +2BA2;UPWARDS TRIANGLE-HEADED ARROW WITH LONG TIP LEFTWARDS;So;0;ON;;;;;N;;;;; +2BA3;UPWARDS TRIANGLE-HEADED ARROW WITH LONG TIP RIGHTWARDS;So;0;ON;;;;;N;;;;; +2BA4;LEFTWARDS TRIANGLE-HEADED ARROW WITH LONG TIP UPWARDS;So;0;ON;;;;;N;;;;; +2BA5;RIGHTWARDS TRIANGLE-HEADED ARROW WITH LONG TIP UPWARDS;So;0;ON;;;;;N;;;;; +2BA6;LEFTWARDS TRIANGLE-HEADED ARROW WITH LONG TIP DOWNWARDS;So;0;ON;;;;;N;;;;; +2BA7;RIGHTWARDS TRIANGLE-HEADED ARROW WITH LONG TIP DOWNWARDS;So;0;ON;;;;;N;;;;; +2BA8;BLACK CURVED DOWNWARDS AND LEFTWARDS ARROW;So;0;ON;;;;;N;;;;; +2BA9;BLACK CURVED DOWNWARDS AND RIGHTWARDS ARROW;So;0;ON;;;;;N;;;;; +2BAA;BLACK CURVED UPWARDS AND LEFTWARDS ARROW;So;0;ON;;;;;N;;;;; +2BAB;BLACK CURVED UPWARDS AND RIGHTWARDS ARROW;So;0;ON;;;;;N;;;;; +2BAC;BLACK CURVED LEFTWARDS AND UPWARDS ARROW;So;0;ON;;;;;N;;;;; +2BAD;BLACK CURVED RIGHTWARDS AND UPWARDS ARROW;So;0;ON;;;;;N;;;;; +2BAE;BLACK CURVED LEFTWARDS AND DOWNWARDS ARROW;So;0;ON;;;;;N;;;;; +2BAF;BLACK CURVED RIGHTWARDS AND DOWNWARDS ARROW;So;0;ON;;;;;N;;;;; +2BB0;RIBBON ARROW DOWN LEFT;So;0;ON;;;;;N;;;;; +2BB1;RIBBON ARROW DOWN RIGHT;So;0;ON;;;;;N;;;;; +2BB2;RIBBON ARROW UP LEFT;So;0;ON;;;;;N;;;;; +2BB3;RIBBON ARROW UP RIGHT;So;0;ON;;;;;N;;;;; +2BB4;RIBBON ARROW LEFT UP;So;0;ON;;;;;N;;;;; +2BB5;RIBBON ARROW RIGHT UP;So;0;ON;;;;;N;;;;; +2BB6;RIBBON ARROW LEFT DOWN;So;0;ON;;;;;N;;;;; +2BB7;RIBBON ARROW RIGHT DOWN;So;0;ON;;;;;N;;;;; +2BB8;UPWARDS WHITE ARROW FROM BAR WITH HORIZONTAL BAR;So;0;ON;;;;;N;;;;; +2BB9;UP ARROWHEAD IN A RECTANGLE BOX;So;0;ON;;;;;N;;;;; +2BBA;OVERLAPPING WHITE SQUARES;So;0;ON;;;;;N;;;;; +2BBB;OVERLAPPING WHITE AND BLACK SQUARES;So;0;ON;;;;;N;;;;; +2BBC;OVERLAPPING BLACK SQUARES;So;0;ON;;;;;N;;;;; +2BBD;BALLOT BOX WITH LIGHT X;So;0;ON;;;;;N;;;;; +2BBE;CIRCLED X;So;0;ON;;;;;N;;;;; +2BBF;CIRCLED BOLD X;So;0;ON;;;;;N;;;;; +2BC0;BLACK SQUARE CENTRED;So;0;ON;;;;;N;;;;; +2BC1;BLACK DIAMOND CENTRED;So;0;ON;;;;;N;;;;; +2BC2;TURNED BLACK PENTAGON;So;0;ON;;;;;N;;;;; +2BC3;HORIZONTAL BLACK OCTAGON;So;0;ON;;;;;N;;;;; +2BC4;BLACK OCTAGON;So;0;ON;;;;;N;;;;; +2BC5;BLACK MEDIUM UP-POINTING TRIANGLE CENTRED;So;0;ON;;;;;N;;;;; +2BC6;BLACK MEDIUM DOWN-POINTING TRIANGLE CENTRED;So;0;ON;;;;;N;;;;; +2BC7;BLACK MEDIUM LEFT-POINTING TRIANGLE CENTRED;So;0;ON;;;;;N;;;;; +2BC8;BLACK MEDIUM RIGHT-POINTING TRIANGLE CENTRED;So;0;ON;;;;;N;;;;; +2BC9;NEPTUNE FORM TWO;So;0;ON;;;;;N;;;;; +2BCA;TOP HALF BLACK CIRCLE;So;0;ON;;;;;N;;;;; +2BCB;BOTTOM HALF BLACK CIRCLE;So;0;ON;;;;;N;;;;; +2BCC;LIGHT FOUR POINTED BLACK CUSP;So;0;ON;;;;;N;;;;; +2BCD;ROTATED LIGHT FOUR POINTED BLACK CUSP;So;0;ON;;;;;N;;;;; +2BCE;WHITE FOUR POINTED CUSP;So;0;ON;;;;;N;;;;; +2BCF;ROTATED WHITE FOUR POINTED CUSP;So;0;ON;;;;;N;;;;; +2BD0;SQUARE POSITION INDICATOR;So;0;ON;;;;;N;;;;; +2BD1;UNCERTAINTY SIGN;So;0;ON;;;;;N;;;;; +2BD2;GROUP MARK;So;0;ON;;;;;N;;;;; +2BD3;PLUTO FORM TWO;So;0;ON;;;;;N;;;;; +2BD4;PLUTO FORM THREE;So;0;ON;;;;;N;;;;; +2BD5;PLUTO FORM FOUR;So;0;ON;;;;;N;;;;; +2BD6;PLUTO FORM FIVE;So;0;ON;;;;;N;;;;; +2BD7;TRANSPLUTO;So;0;ON;;;;;N;;;;; +2BD8;PROSERPINA;So;0;ON;;;;;N;;;;; +2BD9;ASTRAEA;So;0;ON;;;;;N;;;;; +2BDA;HYGIEA;So;0;ON;;;;;N;;;;; +2BDB;PHOLUS;So;0;ON;;;;;N;;;;; +2BDC;NESSUS;So;0;ON;;;;;N;;;;; +2BDD;WHITE MOON SELENA;So;0;ON;;;;;N;;;;; +2BDE;BLACK DIAMOND ON CROSS;So;0;ON;;;;;N;;;;; +2BDF;TRUE LIGHT MOON ARTA;So;0;ON;;;;;N;;;;; +2BE0;CUPIDO;So;0;ON;;;;;N;;;;; +2BE1;HADES;So;0;ON;;;;;N;;;;; +2BE2;ZEUS;So;0;ON;;;;;N;;;;; +2BE3;KRONOS;So;0;ON;;;;;N;;;;; +2BE4;APOLLON;So;0;ON;;;;;N;;;;; +2BE5;ADMETOS;So;0;ON;;;;;N;;;;; +2BE6;VULCANUS;So;0;ON;;;;;N;;;;; +2BE7;POSEIDON;So;0;ON;;;;;N;;;;; +2BE8;LEFT HALF BLACK STAR;So;0;ON;;;;;N;;;;; +2BE9;RIGHT HALF BLACK STAR;So;0;ON;;;;;N;;;;; +2BEA;STAR WITH LEFT HALF BLACK;So;0;ON;;;;;N;;;;; +2BEB;STAR WITH RIGHT HALF BLACK;So;0;ON;;;;;N;;;;; +2BEC;LEFTWARDS TWO-HEADED ARROW WITH TRIANGLE ARROWHEADS;So;0;ON;;;;;N;;;;; +2BED;UPWARDS TWO-HEADED ARROW WITH TRIANGLE ARROWHEADS;So;0;ON;;;;;N;;;;; +2BEE;RIGHTWARDS TWO-HEADED ARROW WITH TRIANGLE ARROWHEADS;So;0;ON;;;;;N;;;;; +2BEF;DOWNWARDS TWO-HEADED ARROW WITH TRIANGLE ARROWHEADS;So;0;ON;;;;;N;;;;; +2BF0;ERIS FORM ONE;So;0;ON;;;;;N;;;;; +2BF1;ERIS FORM TWO;So;0;ON;;;;;N;;;;; +2BF2;SEDNA;So;0;ON;;;;;N;;;;; +2BF3;RUSSIAN ASTROLOGICAL SYMBOL VIGINTILE;So;0;ON;;;;;N;;;;; +2BF4;RUSSIAN ASTROLOGICAL SYMBOL NOVILE;So;0;ON;;;;;N;;;;; +2BF5;RUSSIAN ASTROLOGICAL SYMBOL QUINTILE;So;0;ON;;;;;N;;;;; +2BF6;RUSSIAN ASTROLOGICAL SYMBOL BINOVILE;So;0;ON;;;;;N;;;;; +2BF7;RUSSIAN ASTROLOGICAL SYMBOL SENTAGON;So;0;ON;;;;;N;;;;; +2BF8;RUSSIAN ASTROLOGICAL SYMBOL TREDECILE;So;0;ON;;;;;N;;;;; +2BF9;EQUALS SIGN WITH INFINITY BELOW;So;0;ON;;;;;N;;;;; +2BFA;UNITED SYMBOL;So;0;ON;;;;;N;;;;; +2BFB;SEPARATED SYMBOL;So;0;ON;;;;;N;;;;; +2BFC;DOUBLED SYMBOL;So;0;ON;;;;;N;;;;; +2BFD;PASSED SYMBOL;So;0;ON;;;;;N;;;;; +2BFE;REVERSED RIGHT ANGLE;So;0;ON;;;;;Y;;;;; +2BFF;HELLSCHREIBER PAUSE SYMBOL;So;0;ON;;;;;N;;;;; +2C00;GLAGOLITIC CAPITAL LETTER AZU;Lu;0;L;;;;;N;;;;2C30; +2C01;GLAGOLITIC CAPITAL LETTER BUKY;Lu;0;L;;;;;N;;;;2C31; +2C02;GLAGOLITIC CAPITAL LETTER VEDE;Lu;0;L;;;;;N;;;;2C32; +2C03;GLAGOLITIC CAPITAL LETTER GLAGOLI;Lu;0;L;;;;;N;;;;2C33; +2C04;GLAGOLITIC CAPITAL LETTER DOBRO;Lu;0;L;;;;;N;;;;2C34; +2C05;GLAGOLITIC CAPITAL LETTER YESTU;Lu;0;L;;;;;N;;;;2C35; +2C06;GLAGOLITIC CAPITAL LETTER ZHIVETE;Lu;0;L;;;;;N;;;;2C36; +2C07;GLAGOLITIC CAPITAL LETTER DZELO;Lu;0;L;;;;;N;;;;2C37; +2C08;GLAGOLITIC CAPITAL LETTER ZEMLJA;Lu;0;L;;;;;N;;;;2C38; +2C09;GLAGOLITIC CAPITAL LETTER IZHE;Lu;0;L;;;;;N;;;;2C39; +2C0A;GLAGOLITIC CAPITAL LETTER INITIAL IZHE;Lu;0;L;;;;;N;;;;2C3A; +2C0B;GLAGOLITIC CAPITAL LETTER I;Lu;0;L;;;;;N;;;;2C3B; +2C0C;GLAGOLITIC CAPITAL LETTER DJERVI;Lu;0;L;;;;;N;;;;2C3C; +2C0D;GLAGOLITIC CAPITAL LETTER KAKO;Lu;0;L;;;;;N;;;;2C3D; +2C0E;GLAGOLITIC CAPITAL LETTER LJUDIJE;Lu;0;L;;;;;N;;;;2C3E; +2C0F;GLAGOLITIC CAPITAL LETTER MYSLITE;Lu;0;L;;;;;N;;;;2C3F; +2C10;GLAGOLITIC CAPITAL LETTER NASHI;Lu;0;L;;;;;N;;;;2C40; +2C11;GLAGOLITIC CAPITAL LETTER ONU;Lu;0;L;;;;;N;;;;2C41; +2C12;GLAGOLITIC CAPITAL LETTER POKOJI;Lu;0;L;;;;;N;;;;2C42; +2C13;GLAGOLITIC CAPITAL LETTER RITSI;Lu;0;L;;;;;N;;;;2C43; +2C14;GLAGOLITIC CAPITAL LETTER SLOVO;Lu;0;L;;;;;N;;;;2C44; +2C15;GLAGOLITIC CAPITAL LETTER TVRIDO;Lu;0;L;;;;;N;;;;2C45; +2C16;GLAGOLITIC CAPITAL LETTER UKU;Lu;0;L;;;;;N;;;;2C46; +2C17;GLAGOLITIC CAPITAL LETTER FRITU;Lu;0;L;;;;;N;;;;2C47; +2C18;GLAGOLITIC CAPITAL LETTER HERU;Lu;0;L;;;;;N;;;;2C48; +2C19;GLAGOLITIC CAPITAL LETTER OTU;Lu;0;L;;;;;N;;;;2C49; +2C1A;GLAGOLITIC CAPITAL LETTER PE;Lu;0;L;;;;;N;;;;2C4A; +2C1B;GLAGOLITIC CAPITAL LETTER SHTA;Lu;0;L;;;;;N;;;;2C4B; +2C1C;GLAGOLITIC CAPITAL LETTER TSI;Lu;0;L;;;;;N;;;;2C4C; +2C1D;GLAGOLITIC CAPITAL LETTER CHRIVI;Lu;0;L;;;;;N;;;;2C4D; +2C1E;GLAGOLITIC CAPITAL LETTER SHA;Lu;0;L;;;;;N;;;;2C4E; +2C1F;GLAGOLITIC CAPITAL LETTER YERU;Lu;0;L;;;;;N;;;;2C4F; +2C20;GLAGOLITIC CAPITAL LETTER YERI;Lu;0;L;;;;;N;;;;2C50; +2C21;GLAGOLITIC CAPITAL LETTER YATI;Lu;0;L;;;;;N;;;;2C51; +2C22;GLAGOLITIC CAPITAL LETTER SPIDERY HA;Lu;0;L;;;;;N;;;;2C52; +2C23;GLAGOLITIC CAPITAL LETTER YU;Lu;0;L;;;;;N;;;;2C53; +2C24;GLAGOLITIC CAPITAL LETTER SMALL YUS;Lu;0;L;;;;;N;;;;2C54; +2C25;GLAGOLITIC CAPITAL LETTER SMALL YUS WITH TAIL;Lu;0;L;;;;;N;;;;2C55; +2C26;GLAGOLITIC CAPITAL LETTER YO;Lu;0;L;;;;;N;;;;2C56; +2C27;GLAGOLITIC CAPITAL LETTER IOTATED SMALL YUS;Lu;0;L;;;;;N;;;;2C57; +2C28;GLAGOLITIC CAPITAL LETTER BIG YUS;Lu;0;L;;;;;N;;;;2C58; +2C29;GLAGOLITIC CAPITAL LETTER IOTATED BIG YUS;Lu;0;L;;;;;N;;;;2C59; +2C2A;GLAGOLITIC CAPITAL LETTER FITA;Lu;0;L;;;;;N;;;;2C5A; +2C2B;GLAGOLITIC CAPITAL LETTER IZHITSA;Lu;0;L;;;;;N;;;;2C5B; +2C2C;GLAGOLITIC CAPITAL LETTER SHTAPIC;Lu;0;L;;;;;N;;;;2C5C; +2C2D;GLAGOLITIC CAPITAL LETTER TROKUTASTI A;Lu;0;L;;;;;N;;;;2C5D; +2C2E;GLAGOLITIC CAPITAL LETTER LATINATE MYSLITE;Lu;0;L;;;;;N;;;;2C5E; +2C30;GLAGOLITIC SMALL LETTER AZU;Ll;0;L;;;;;N;;;2C00;;2C00 +2C31;GLAGOLITIC SMALL LETTER BUKY;Ll;0;L;;;;;N;;;2C01;;2C01 +2C32;GLAGOLITIC SMALL LETTER VEDE;Ll;0;L;;;;;N;;;2C02;;2C02 +2C33;GLAGOLITIC SMALL LETTER GLAGOLI;Ll;0;L;;;;;N;;;2C03;;2C03 +2C34;GLAGOLITIC SMALL LETTER DOBRO;Ll;0;L;;;;;N;;;2C04;;2C04 +2C35;GLAGOLITIC SMALL LETTER YESTU;Ll;0;L;;;;;N;;;2C05;;2C05 +2C36;GLAGOLITIC SMALL LETTER ZHIVETE;Ll;0;L;;;;;N;;;2C06;;2C06 +2C37;GLAGOLITIC SMALL LETTER DZELO;Ll;0;L;;;;;N;;;2C07;;2C07 +2C38;GLAGOLITIC SMALL LETTER ZEMLJA;Ll;0;L;;;;;N;;;2C08;;2C08 +2C39;GLAGOLITIC SMALL LETTER IZHE;Ll;0;L;;;;;N;;;2C09;;2C09 +2C3A;GLAGOLITIC SMALL LETTER INITIAL IZHE;Ll;0;L;;;;;N;;;2C0A;;2C0A +2C3B;GLAGOLITIC SMALL LETTER I;Ll;0;L;;;;;N;;;2C0B;;2C0B +2C3C;GLAGOLITIC SMALL LETTER DJERVI;Ll;0;L;;;;;N;;;2C0C;;2C0C +2C3D;GLAGOLITIC SMALL LETTER KAKO;Ll;0;L;;;;;N;;;2C0D;;2C0D +2C3E;GLAGOLITIC SMALL LETTER LJUDIJE;Ll;0;L;;;;;N;;;2C0E;;2C0E +2C3F;GLAGOLITIC SMALL LETTER MYSLITE;Ll;0;L;;;;;N;;;2C0F;;2C0F +2C40;GLAGOLITIC SMALL LETTER NASHI;Ll;0;L;;;;;N;;;2C10;;2C10 +2C41;GLAGOLITIC SMALL LETTER ONU;Ll;0;L;;;;;N;;;2C11;;2C11 +2C42;GLAGOLITIC SMALL LETTER POKOJI;Ll;0;L;;;;;N;;;2C12;;2C12 +2C43;GLAGOLITIC SMALL LETTER RITSI;Ll;0;L;;;;;N;;;2C13;;2C13 +2C44;GLAGOLITIC SMALL LETTER SLOVO;Ll;0;L;;;;;N;;;2C14;;2C14 +2C45;GLAGOLITIC SMALL LETTER TVRIDO;Ll;0;L;;;;;N;;;2C15;;2C15 +2C46;GLAGOLITIC SMALL LETTER UKU;Ll;0;L;;;;;N;;;2C16;;2C16 +2C47;GLAGOLITIC SMALL LETTER FRITU;Ll;0;L;;;;;N;;;2C17;;2C17 +2C48;GLAGOLITIC SMALL LETTER HERU;Ll;0;L;;;;;N;;;2C18;;2C18 +2C49;GLAGOLITIC SMALL LETTER OTU;Ll;0;L;;;;;N;;;2C19;;2C19 +2C4A;GLAGOLITIC SMALL LETTER PE;Ll;0;L;;;;;N;;;2C1A;;2C1A +2C4B;GLAGOLITIC SMALL LETTER SHTA;Ll;0;L;;;;;N;;;2C1B;;2C1B +2C4C;GLAGOLITIC SMALL LETTER TSI;Ll;0;L;;;;;N;;;2C1C;;2C1C +2C4D;GLAGOLITIC SMALL LETTER CHRIVI;Ll;0;L;;;;;N;;;2C1D;;2C1D +2C4E;GLAGOLITIC SMALL LETTER SHA;Ll;0;L;;;;;N;;;2C1E;;2C1E +2C4F;GLAGOLITIC SMALL LETTER YERU;Ll;0;L;;;;;N;;;2C1F;;2C1F +2C50;GLAGOLITIC SMALL LETTER YERI;Ll;0;L;;;;;N;;;2C20;;2C20 +2C51;GLAGOLITIC SMALL LETTER YATI;Ll;0;L;;;;;N;;;2C21;;2C21 +2C52;GLAGOLITIC SMALL LETTER SPIDERY HA;Ll;0;L;;;;;N;;;2C22;;2C22 +2C53;GLAGOLITIC SMALL LETTER YU;Ll;0;L;;;;;N;;;2C23;;2C23 +2C54;GLAGOLITIC SMALL LETTER SMALL YUS;Ll;0;L;;;;;N;;;2C24;;2C24 +2C55;GLAGOLITIC SMALL LETTER SMALL YUS WITH TAIL;Ll;0;L;;;;;N;;;2C25;;2C25 +2C56;GLAGOLITIC SMALL LETTER YO;Ll;0;L;;;;;N;;;2C26;;2C26 +2C57;GLAGOLITIC SMALL LETTER IOTATED SMALL YUS;Ll;0;L;;;;;N;;;2C27;;2C27 +2C58;GLAGOLITIC SMALL LETTER BIG YUS;Ll;0;L;;;;;N;;;2C28;;2C28 +2C59;GLAGOLITIC SMALL LETTER IOTATED BIG YUS;Ll;0;L;;;;;N;;;2C29;;2C29 +2C5A;GLAGOLITIC SMALL LETTER FITA;Ll;0;L;;;;;N;;;2C2A;;2C2A +2C5B;GLAGOLITIC SMALL LETTER IZHITSA;Ll;0;L;;;;;N;;;2C2B;;2C2B +2C5C;GLAGOLITIC SMALL LETTER SHTAPIC;Ll;0;L;;;;;N;;;2C2C;;2C2C +2C5D;GLAGOLITIC SMALL LETTER TROKUTASTI A;Ll;0;L;;;;;N;;;2C2D;;2C2D +2C5E;GLAGOLITIC SMALL LETTER LATINATE MYSLITE;Ll;0;L;;;;;N;;;2C2E;;2C2E +2C60;LATIN CAPITAL LETTER L WITH DOUBLE BAR;Lu;0;L;;;;;N;;;;2C61; +2C61;LATIN SMALL LETTER L WITH DOUBLE BAR;Ll;0;L;;;;;N;;;2C60;;2C60 +2C62;LATIN CAPITAL LETTER L WITH MIDDLE TILDE;Lu;0;L;;;;;N;;;;026B; +2C63;LATIN CAPITAL LETTER P WITH STROKE;Lu;0;L;;;;;N;;;;1D7D; +2C64;LATIN CAPITAL LETTER R WITH TAIL;Lu;0;L;;;;;N;;;;027D; +2C65;LATIN SMALL LETTER A WITH STROKE;Ll;0;L;;;;;N;;;023A;;023A +2C66;LATIN SMALL LETTER T WITH DIAGONAL STROKE;Ll;0;L;;;;;N;;;023E;;023E +2C67;LATIN CAPITAL LETTER H WITH DESCENDER;Lu;0;L;;;;;N;;;;2C68; +2C68;LATIN SMALL LETTER H WITH DESCENDER;Ll;0;L;;;;;N;;;2C67;;2C67 +2C69;LATIN CAPITAL LETTER K WITH DESCENDER;Lu;0;L;;;;;N;;;;2C6A; +2C6A;LATIN SMALL LETTER K WITH DESCENDER;Ll;0;L;;;;;N;;;2C69;;2C69 +2C6B;LATIN CAPITAL LETTER Z WITH DESCENDER;Lu;0;L;;;;;N;;;;2C6C; +2C6C;LATIN SMALL LETTER Z WITH DESCENDER;Ll;0;L;;;;;N;;;2C6B;;2C6B +2C6D;LATIN CAPITAL LETTER ALPHA;Lu;0;L;;;;;N;;;;0251; +2C6E;LATIN CAPITAL LETTER M WITH HOOK;Lu;0;L;;;;;N;;;;0271; +2C6F;LATIN CAPITAL LETTER TURNED A;Lu;0;L;;;;;N;;;;0250; +2C70;LATIN CAPITAL LETTER TURNED ALPHA;Lu;0;L;;;;;N;;;;0252; +2C71;LATIN SMALL LETTER V WITH RIGHT HOOK;Ll;0;L;;;;;N;;;;; +2C72;LATIN CAPITAL LETTER W WITH HOOK;Lu;0;L;;;;;N;;;;2C73; +2C73;LATIN SMALL LETTER W WITH HOOK;Ll;0;L;;;;;N;;;2C72;;2C72 +2C74;LATIN SMALL LETTER V WITH CURL;Ll;0;L;;;;;N;;;;; +2C75;LATIN CAPITAL LETTER HALF H;Lu;0;L;;;;;N;;;;2C76; +2C76;LATIN SMALL LETTER HALF H;Ll;0;L;;;;;N;;;2C75;;2C75 +2C77;LATIN SMALL LETTER TAILLESS PHI;Ll;0;L;;;;;N;;;;; +2C78;LATIN SMALL LETTER E WITH NOTCH;Ll;0;L;;;;;N;;;;; +2C79;LATIN SMALL LETTER TURNED R WITH TAIL;Ll;0;L;;;;;N;;;;; +2C7A;LATIN SMALL LETTER O WITH LOW RING INSIDE;Ll;0;L;;;;;N;;;;; +2C7B;LATIN LETTER SMALL CAPITAL TURNED E;Ll;0;L;;;;;N;;;;; +2C7C;LATIN SUBSCRIPT SMALL LETTER J;Lm;0;L; 006A;;;;N;;;;; +2C7D;MODIFIER LETTER CAPITAL V;Lm;0;L; 0056;;;;N;;;;; +2C7E;LATIN CAPITAL LETTER S WITH SWASH TAIL;Lu;0;L;;;;;N;;;;023F; +2C7F;LATIN CAPITAL LETTER Z WITH SWASH TAIL;Lu;0;L;;;;;N;;;;0240; +2C80;COPTIC CAPITAL LETTER ALFA;Lu;0;L;;;;;N;;;;2C81; +2C81;COPTIC SMALL LETTER ALFA;Ll;0;L;;;;;N;;;2C80;;2C80 +2C82;COPTIC CAPITAL LETTER VIDA;Lu;0;L;;;;;N;;;;2C83; +2C83;COPTIC SMALL LETTER VIDA;Ll;0;L;;;;;N;;;2C82;;2C82 +2C84;COPTIC CAPITAL LETTER GAMMA;Lu;0;L;;;;;N;;;;2C85; +2C85;COPTIC SMALL LETTER GAMMA;Ll;0;L;;;;;N;;;2C84;;2C84 +2C86;COPTIC CAPITAL LETTER DALDA;Lu;0;L;;;;;N;;;;2C87; +2C87;COPTIC SMALL LETTER DALDA;Ll;0;L;;;;;N;;;2C86;;2C86 +2C88;COPTIC CAPITAL LETTER EIE;Lu;0;L;;;;;N;;;;2C89; +2C89;COPTIC SMALL LETTER EIE;Ll;0;L;;;;;N;;;2C88;;2C88 +2C8A;COPTIC CAPITAL LETTER SOU;Lu;0;L;;;;;N;;;;2C8B; +2C8B;COPTIC SMALL LETTER SOU;Ll;0;L;;;;;N;;;2C8A;;2C8A +2C8C;COPTIC CAPITAL LETTER ZATA;Lu;0;L;;;;;N;;;;2C8D; +2C8D;COPTIC SMALL LETTER ZATA;Ll;0;L;;;;;N;;;2C8C;;2C8C +2C8E;COPTIC CAPITAL LETTER HATE;Lu;0;L;;;;;N;;;;2C8F; +2C8F;COPTIC SMALL LETTER HATE;Ll;0;L;;;;;N;;;2C8E;;2C8E +2C90;COPTIC CAPITAL LETTER THETHE;Lu;0;L;;;;;N;;;;2C91; +2C91;COPTIC SMALL LETTER THETHE;Ll;0;L;;;;;N;;;2C90;;2C90 +2C92;COPTIC CAPITAL LETTER IAUDA;Lu;0;L;;;;;N;;;;2C93; +2C93;COPTIC SMALL LETTER IAUDA;Ll;0;L;;;;;N;;;2C92;;2C92 +2C94;COPTIC CAPITAL LETTER KAPA;Lu;0;L;;;;;N;;;;2C95; +2C95;COPTIC SMALL LETTER KAPA;Ll;0;L;;;;;N;;;2C94;;2C94 +2C96;COPTIC CAPITAL LETTER LAULA;Lu;0;L;;;;;N;;;;2C97; +2C97;COPTIC SMALL LETTER LAULA;Ll;0;L;;;;;N;;;2C96;;2C96 +2C98;COPTIC CAPITAL LETTER MI;Lu;0;L;;;;;N;;;;2C99; +2C99;COPTIC SMALL LETTER MI;Ll;0;L;;;;;N;;;2C98;;2C98 +2C9A;COPTIC CAPITAL LETTER NI;Lu;0;L;;;;;N;;;;2C9B; +2C9B;COPTIC SMALL LETTER NI;Ll;0;L;;;;;N;;;2C9A;;2C9A +2C9C;COPTIC CAPITAL LETTER KSI;Lu;0;L;;;;;N;;;;2C9D; +2C9D;COPTIC SMALL LETTER KSI;Ll;0;L;;;;;N;;;2C9C;;2C9C +2C9E;COPTIC CAPITAL LETTER O;Lu;0;L;;;;;N;;;;2C9F; +2C9F;COPTIC SMALL LETTER O;Ll;0;L;;;;;N;;;2C9E;;2C9E +2CA0;COPTIC CAPITAL LETTER PI;Lu;0;L;;;;;N;;;;2CA1; +2CA1;COPTIC SMALL LETTER PI;Ll;0;L;;;;;N;;;2CA0;;2CA0 +2CA2;COPTIC CAPITAL LETTER RO;Lu;0;L;;;;;N;;;;2CA3; +2CA3;COPTIC SMALL LETTER RO;Ll;0;L;;;;;N;;;2CA2;;2CA2 +2CA4;COPTIC CAPITAL LETTER SIMA;Lu;0;L;;;;;N;;;;2CA5; +2CA5;COPTIC SMALL LETTER SIMA;Ll;0;L;;;;;N;;;2CA4;;2CA4 +2CA6;COPTIC CAPITAL LETTER TAU;Lu;0;L;;;;;N;;;;2CA7; +2CA7;COPTIC SMALL LETTER TAU;Ll;0;L;;;;;N;;;2CA6;;2CA6 +2CA8;COPTIC CAPITAL LETTER UA;Lu;0;L;;;;;N;;;;2CA9; +2CA9;COPTIC SMALL LETTER UA;Ll;0;L;;;;;N;;;2CA8;;2CA8 +2CAA;COPTIC CAPITAL LETTER FI;Lu;0;L;;;;;N;;;;2CAB; +2CAB;COPTIC SMALL LETTER FI;Ll;0;L;;;;;N;;;2CAA;;2CAA +2CAC;COPTIC CAPITAL LETTER KHI;Lu;0;L;;;;;N;;;;2CAD; +2CAD;COPTIC SMALL LETTER KHI;Ll;0;L;;;;;N;;;2CAC;;2CAC +2CAE;COPTIC CAPITAL LETTER PSI;Lu;0;L;;;;;N;;;;2CAF; +2CAF;COPTIC SMALL LETTER PSI;Ll;0;L;;;;;N;;;2CAE;;2CAE +2CB0;COPTIC CAPITAL LETTER OOU;Lu;0;L;;;;;N;;;;2CB1; +2CB1;COPTIC SMALL LETTER OOU;Ll;0;L;;;;;N;;;2CB0;;2CB0 +2CB2;COPTIC CAPITAL LETTER DIALECT-P ALEF;Lu;0;L;;;;;N;;;;2CB3; +2CB3;COPTIC SMALL LETTER DIALECT-P ALEF;Ll;0;L;;;;;N;;;2CB2;;2CB2 +2CB4;COPTIC CAPITAL LETTER OLD COPTIC AIN;Lu;0;L;;;;;N;;;;2CB5; +2CB5;COPTIC SMALL LETTER OLD COPTIC AIN;Ll;0;L;;;;;N;;;2CB4;;2CB4 +2CB6;COPTIC CAPITAL LETTER CRYPTOGRAMMIC EIE;Lu;0;L;;;;;N;;;;2CB7; +2CB7;COPTIC SMALL LETTER CRYPTOGRAMMIC EIE;Ll;0;L;;;;;N;;;2CB6;;2CB6 +2CB8;COPTIC CAPITAL LETTER DIALECT-P KAPA;Lu;0;L;;;;;N;;;;2CB9; +2CB9;COPTIC SMALL LETTER DIALECT-P KAPA;Ll;0;L;;;;;N;;;2CB8;;2CB8 +2CBA;COPTIC CAPITAL LETTER DIALECT-P NI;Lu;0;L;;;;;N;;;;2CBB; +2CBB;COPTIC SMALL LETTER DIALECT-P NI;Ll;0;L;;;;;N;;;2CBA;;2CBA +2CBC;COPTIC CAPITAL LETTER CRYPTOGRAMMIC NI;Lu;0;L;;;;;N;;;;2CBD; +2CBD;COPTIC SMALL LETTER CRYPTOGRAMMIC NI;Ll;0;L;;;;;N;;;2CBC;;2CBC +2CBE;COPTIC CAPITAL LETTER OLD COPTIC OOU;Lu;0;L;;;;;N;;;;2CBF; +2CBF;COPTIC SMALL LETTER OLD COPTIC OOU;Ll;0;L;;;;;N;;;2CBE;;2CBE +2CC0;COPTIC CAPITAL LETTER SAMPI;Lu;0;L;;;;;N;;;;2CC1; +2CC1;COPTIC SMALL LETTER SAMPI;Ll;0;L;;;;;N;;;2CC0;;2CC0 +2CC2;COPTIC CAPITAL LETTER CROSSED SHEI;Lu;0;L;;;;;N;;;;2CC3; +2CC3;COPTIC SMALL LETTER CROSSED SHEI;Ll;0;L;;;;;N;;;2CC2;;2CC2 +2CC4;COPTIC CAPITAL LETTER OLD COPTIC SHEI;Lu;0;L;;;;;N;;;;2CC5; +2CC5;COPTIC SMALL LETTER OLD COPTIC SHEI;Ll;0;L;;;;;N;;;2CC4;;2CC4 +2CC6;COPTIC CAPITAL LETTER OLD COPTIC ESH;Lu;0;L;;;;;N;;;;2CC7; +2CC7;COPTIC SMALL LETTER OLD COPTIC ESH;Ll;0;L;;;;;N;;;2CC6;;2CC6 +2CC8;COPTIC CAPITAL LETTER AKHMIMIC KHEI;Lu;0;L;;;;;N;;;;2CC9; +2CC9;COPTIC SMALL LETTER AKHMIMIC KHEI;Ll;0;L;;;;;N;;;2CC8;;2CC8 +2CCA;COPTIC CAPITAL LETTER DIALECT-P HORI;Lu;0;L;;;;;N;;;;2CCB; +2CCB;COPTIC SMALL LETTER DIALECT-P HORI;Ll;0;L;;;;;N;;;2CCA;;2CCA +2CCC;COPTIC CAPITAL LETTER OLD COPTIC HORI;Lu;0;L;;;;;N;;;;2CCD; +2CCD;COPTIC SMALL LETTER OLD COPTIC HORI;Ll;0;L;;;;;N;;;2CCC;;2CCC +2CCE;COPTIC CAPITAL LETTER OLD COPTIC HA;Lu;0;L;;;;;N;;;;2CCF; +2CCF;COPTIC SMALL LETTER OLD COPTIC HA;Ll;0;L;;;;;N;;;2CCE;;2CCE +2CD0;COPTIC CAPITAL LETTER L-SHAPED HA;Lu;0;L;;;;;N;;;;2CD1; +2CD1;COPTIC SMALL LETTER L-SHAPED HA;Ll;0;L;;;;;N;;;2CD0;;2CD0 +2CD2;COPTIC CAPITAL LETTER OLD COPTIC HEI;Lu;0;L;;;;;N;;;;2CD3; +2CD3;COPTIC SMALL LETTER OLD COPTIC HEI;Ll;0;L;;;;;N;;;2CD2;;2CD2 +2CD4;COPTIC CAPITAL LETTER OLD COPTIC HAT;Lu;0;L;;;;;N;;;;2CD5; +2CD5;COPTIC SMALL LETTER OLD COPTIC HAT;Ll;0;L;;;;;N;;;2CD4;;2CD4 +2CD6;COPTIC CAPITAL LETTER OLD COPTIC GANGIA;Lu;0;L;;;;;N;;;;2CD7; +2CD7;COPTIC SMALL LETTER OLD COPTIC GANGIA;Ll;0;L;;;;;N;;;2CD6;;2CD6 +2CD8;COPTIC CAPITAL LETTER OLD COPTIC DJA;Lu;0;L;;;;;N;;;;2CD9; +2CD9;COPTIC SMALL LETTER OLD COPTIC DJA;Ll;0;L;;;;;N;;;2CD8;;2CD8 +2CDA;COPTIC CAPITAL LETTER OLD COPTIC SHIMA;Lu;0;L;;;;;N;;;;2CDB; +2CDB;COPTIC SMALL LETTER OLD COPTIC SHIMA;Ll;0;L;;;;;N;;;2CDA;;2CDA +2CDC;COPTIC CAPITAL LETTER OLD NUBIAN SHIMA;Lu;0;L;;;;;N;;;;2CDD; +2CDD;COPTIC SMALL LETTER OLD NUBIAN SHIMA;Ll;0;L;;;;;N;;;2CDC;;2CDC +2CDE;COPTIC CAPITAL LETTER OLD NUBIAN NGI;Lu;0;L;;;;;N;;;;2CDF; +2CDF;COPTIC SMALL LETTER OLD NUBIAN NGI;Ll;0;L;;;;;N;;;2CDE;;2CDE +2CE0;COPTIC CAPITAL LETTER OLD NUBIAN NYI;Lu;0;L;;;;;N;;;;2CE1; +2CE1;COPTIC SMALL LETTER OLD NUBIAN NYI;Ll;0;L;;;;;N;;;2CE0;;2CE0 +2CE2;COPTIC CAPITAL LETTER OLD NUBIAN WAU;Lu;0;L;;;;;N;;;;2CE3; +2CE3;COPTIC SMALL LETTER OLD NUBIAN WAU;Ll;0;L;;;;;N;;;2CE2;;2CE2 +2CE4;COPTIC SYMBOL KAI;Ll;0;L;;;;;N;;;;; +2CE5;COPTIC SYMBOL MI RO;So;0;ON;;;;;N;;;;; +2CE6;COPTIC SYMBOL PI RO;So;0;ON;;;;;N;;;;; +2CE7;COPTIC SYMBOL STAUROS;So;0;ON;;;;;N;;;;; +2CE8;COPTIC SYMBOL TAU RO;So;0;ON;;;;;N;;;;; +2CE9;COPTIC SYMBOL KHI RO;So;0;ON;;;;;N;;;;; +2CEA;COPTIC SYMBOL SHIMA SIMA;So;0;ON;;;;;N;;;;; +2CEB;COPTIC CAPITAL LETTER CRYPTOGRAMMIC SHEI;Lu;0;L;;;;;N;;;;2CEC; +2CEC;COPTIC SMALL LETTER CRYPTOGRAMMIC SHEI;Ll;0;L;;;;;N;;;2CEB;;2CEB +2CED;COPTIC CAPITAL LETTER CRYPTOGRAMMIC GANGIA;Lu;0;L;;;;;N;;;;2CEE; +2CEE;COPTIC SMALL LETTER CRYPTOGRAMMIC GANGIA;Ll;0;L;;;;;N;;;2CED;;2CED +2CEF;COPTIC COMBINING NI ABOVE;Mn;230;NSM;;;;;N;;;;; +2CF0;COPTIC COMBINING SPIRITUS ASPER;Mn;230;NSM;;;;;N;;;;; +2CF1;COPTIC COMBINING SPIRITUS LENIS;Mn;230;NSM;;;;;N;;;;; +2CF2;COPTIC CAPITAL LETTER BOHAIRIC KHEI;Lu;0;L;;;;;N;;;;2CF3; +2CF3;COPTIC SMALL LETTER BOHAIRIC KHEI;Ll;0;L;;;;;N;;;2CF2;;2CF2 +2CF9;COPTIC OLD NUBIAN FULL STOP;Po;0;ON;;;;;N;;;;; +2CFA;COPTIC OLD NUBIAN DIRECT QUESTION MARK;Po;0;ON;;;;;N;;;;; +2CFB;COPTIC OLD NUBIAN INDIRECT QUESTION MARK;Po;0;ON;;;;;N;;;;; +2CFC;COPTIC OLD NUBIAN VERSE DIVIDER;Po;0;ON;;;;;N;;;;; +2CFD;COPTIC FRACTION ONE HALF;No;0;ON;;;;1/2;N;;;;; +2CFE;COPTIC FULL STOP;Po;0;ON;;;;;N;;;;; +2CFF;COPTIC MORPHOLOGICAL DIVIDER;Po;0;ON;;;;;N;;;;; +2D00;GEORGIAN SMALL LETTER AN;Ll;0;L;;;;;N;;;10A0;;10A0 +2D01;GEORGIAN SMALL LETTER BAN;Ll;0;L;;;;;N;;;10A1;;10A1 +2D02;GEORGIAN SMALL LETTER GAN;Ll;0;L;;;;;N;;;10A2;;10A2 +2D03;GEORGIAN SMALL LETTER DON;Ll;0;L;;;;;N;;;10A3;;10A3 +2D04;GEORGIAN SMALL LETTER EN;Ll;0;L;;;;;N;;;10A4;;10A4 +2D05;GEORGIAN SMALL LETTER VIN;Ll;0;L;;;;;N;;;10A5;;10A5 +2D06;GEORGIAN SMALL LETTER ZEN;Ll;0;L;;;;;N;;;10A6;;10A6 +2D07;GEORGIAN SMALL LETTER TAN;Ll;0;L;;;;;N;;;10A7;;10A7 +2D08;GEORGIAN SMALL LETTER IN;Ll;0;L;;;;;N;;;10A8;;10A8 +2D09;GEORGIAN SMALL LETTER KAN;Ll;0;L;;;;;N;;;10A9;;10A9 +2D0A;GEORGIAN SMALL LETTER LAS;Ll;0;L;;;;;N;;;10AA;;10AA +2D0B;GEORGIAN SMALL LETTER MAN;Ll;0;L;;;;;N;;;10AB;;10AB +2D0C;GEORGIAN SMALL LETTER NAR;Ll;0;L;;;;;N;;;10AC;;10AC +2D0D;GEORGIAN SMALL LETTER ON;Ll;0;L;;;;;N;;;10AD;;10AD +2D0E;GEORGIAN SMALL LETTER PAR;Ll;0;L;;;;;N;;;10AE;;10AE +2D0F;GEORGIAN SMALL LETTER ZHAR;Ll;0;L;;;;;N;;;10AF;;10AF +2D10;GEORGIAN SMALL LETTER RAE;Ll;0;L;;;;;N;;;10B0;;10B0 +2D11;GEORGIAN SMALL LETTER SAN;Ll;0;L;;;;;N;;;10B1;;10B1 +2D12;GEORGIAN SMALL LETTER TAR;Ll;0;L;;;;;N;;;10B2;;10B2 +2D13;GEORGIAN SMALL LETTER UN;Ll;0;L;;;;;N;;;10B3;;10B3 +2D14;GEORGIAN SMALL LETTER PHAR;Ll;0;L;;;;;N;;;10B4;;10B4 +2D15;GEORGIAN SMALL LETTER KHAR;Ll;0;L;;;;;N;;;10B5;;10B5 +2D16;GEORGIAN SMALL LETTER GHAN;Ll;0;L;;;;;N;;;10B6;;10B6 +2D17;GEORGIAN SMALL LETTER QAR;Ll;0;L;;;;;N;;;10B7;;10B7 +2D18;GEORGIAN SMALL LETTER SHIN;Ll;0;L;;;;;N;;;10B8;;10B8 +2D19;GEORGIAN SMALL LETTER CHIN;Ll;0;L;;;;;N;;;10B9;;10B9 +2D1A;GEORGIAN SMALL LETTER CAN;Ll;0;L;;;;;N;;;10BA;;10BA +2D1B;GEORGIAN SMALL LETTER JIL;Ll;0;L;;;;;N;;;10BB;;10BB +2D1C;GEORGIAN SMALL LETTER CIL;Ll;0;L;;;;;N;;;10BC;;10BC +2D1D;GEORGIAN SMALL LETTER CHAR;Ll;0;L;;;;;N;;;10BD;;10BD +2D1E;GEORGIAN SMALL LETTER XAN;Ll;0;L;;;;;N;;;10BE;;10BE +2D1F;GEORGIAN SMALL LETTER JHAN;Ll;0;L;;;;;N;;;10BF;;10BF +2D20;GEORGIAN SMALL LETTER HAE;Ll;0;L;;;;;N;;;10C0;;10C0 +2D21;GEORGIAN SMALL LETTER HE;Ll;0;L;;;;;N;;;10C1;;10C1 +2D22;GEORGIAN SMALL LETTER HIE;Ll;0;L;;;;;N;;;10C2;;10C2 +2D23;GEORGIAN SMALL LETTER WE;Ll;0;L;;;;;N;;;10C3;;10C3 +2D24;GEORGIAN SMALL LETTER HAR;Ll;0;L;;;;;N;;;10C4;;10C4 +2D25;GEORGIAN SMALL LETTER HOE;Ll;0;L;;;;;N;;;10C5;;10C5 +2D27;GEORGIAN SMALL LETTER YN;Ll;0;L;;;;;N;;;10C7;;10C7 +2D2D;GEORGIAN SMALL LETTER AEN;Ll;0;L;;;;;N;;;10CD;;10CD +2D30;TIFINAGH LETTER YA;Lo;0;L;;;;;N;;;;; +2D31;TIFINAGH LETTER YAB;Lo;0;L;;;;;N;;;;; +2D32;TIFINAGH LETTER YABH;Lo;0;L;;;;;N;;;;; +2D33;TIFINAGH LETTER YAG;Lo;0;L;;;;;N;;;;; +2D34;TIFINAGH LETTER YAGHH;Lo;0;L;;;;;N;;;;; +2D35;TIFINAGH LETTER BERBER ACADEMY YAJ;Lo;0;L;;;;;N;;;;; +2D36;TIFINAGH LETTER YAJ;Lo;0;L;;;;;N;;;;; +2D37;TIFINAGH LETTER YAD;Lo;0;L;;;;;N;;;;; +2D38;TIFINAGH LETTER YADH;Lo;0;L;;;;;N;;;;; +2D39;TIFINAGH LETTER YADD;Lo;0;L;;;;;N;;;;; +2D3A;TIFINAGH LETTER YADDH;Lo;0;L;;;;;N;;;;; +2D3B;TIFINAGH LETTER YEY;Lo;0;L;;;;;N;;;;; +2D3C;TIFINAGH LETTER YAF;Lo;0;L;;;;;N;;;;; +2D3D;TIFINAGH LETTER YAK;Lo;0;L;;;;;N;;;;; +2D3E;TIFINAGH LETTER TUAREG YAK;Lo;0;L;;;;;N;;;;; +2D3F;TIFINAGH LETTER YAKHH;Lo;0;L;;;;;N;;;;; +2D40;TIFINAGH LETTER YAH;Lo;0;L;;;;;N;;;;; +2D41;TIFINAGH LETTER BERBER ACADEMY YAH;Lo;0;L;;;;;N;;;;; +2D42;TIFINAGH LETTER TUAREG YAH;Lo;0;L;;;;;N;;;;; +2D43;TIFINAGH LETTER YAHH;Lo;0;L;;;;;N;;;;; +2D44;TIFINAGH LETTER YAA;Lo;0;L;;;;;N;;;;; +2D45;TIFINAGH LETTER YAKH;Lo;0;L;;;;;N;;;;; +2D46;TIFINAGH LETTER TUAREG YAKH;Lo;0;L;;;;;N;;;;; +2D47;TIFINAGH LETTER YAQ;Lo;0;L;;;;;N;;;;; +2D48;TIFINAGH LETTER TUAREG YAQ;Lo;0;L;;;;;N;;;;; +2D49;TIFINAGH LETTER YI;Lo;0;L;;;;;N;;;;; +2D4A;TIFINAGH LETTER YAZH;Lo;0;L;;;;;N;;;;; +2D4B;TIFINAGH LETTER AHAGGAR YAZH;Lo;0;L;;;;;N;;;;; +2D4C;TIFINAGH LETTER TUAREG YAZH;Lo;0;L;;;;;N;;;;; +2D4D;TIFINAGH LETTER YAL;Lo;0;L;;;;;N;;;;; +2D4E;TIFINAGH LETTER YAM;Lo;0;L;;;;;N;;;;; +2D4F;TIFINAGH LETTER YAN;Lo;0;L;;;;;N;;;;; +2D50;TIFINAGH LETTER TUAREG YAGN;Lo;0;L;;;;;N;;;;; +2D51;TIFINAGH LETTER TUAREG YANG;Lo;0;L;;;;;N;;;;; +2D52;TIFINAGH LETTER YAP;Lo;0;L;;;;;N;;;;; +2D53;TIFINAGH LETTER YU;Lo;0;L;;;;;N;;;;; +2D54;TIFINAGH LETTER YAR;Lo;0;L;;;;;N;;;;; +2D55;TIFINAGH LETTER YARR;Lo;0;L;;;;;N;;;;; +2D56;TIFINAGH LETTER YAGH;Lo;0;L;;;;;N;;;;; +2D57;TIFINAGH LETTER TUAREG YAGH;Lo;0;L;;;;;N;;;;; +2D58;TIFINAGH LETTER AYER YAGH;Lo;0;L;;;;;N;;;;; +2D59;TIFINAGH LETTER YAS;Lo;0;L;;;;;N;;;;; +2D5A;TIFINAGH LETTER YASS;Lo;0;L;;;;;N;;;;; +2D5B;TIFINAGH LETTER YASH;Lo;0;L;;;;;N;;;;; +2D5C;TIFINAGH LETTER YAT;Lo;0;L;;;;;N;;;;; +2D5D;TIFINAGH LETTER YATH;Lo;0;L;;;;;N;;;;; +2D5E;TIFINAGH LETTER YACH;Lo;0;L;;;;;N;;;;; +2D5F;TIFINAGH LETTER YATT;Lo;0;L;;;;;N;;;;; +2D60;TIFINAGH LETTER YAV;Lo;0;L;;;;;N;;;;; +2D61;TIFINAGH LETTER YAW;Lo;0;L;;;;;N;;;;; +2D62;TIFINAGH LETTER YAY;Lo;0;L;;;;;N;;;;; +2D63;TIFINAGH LETTER YAZ;Lo;0;L;;;;;N;;;;; +2D64;TIFINAGH LETTER TAWELLEMET YAZ;Lo;0;L;;;;;N;;;;; +2D65;TIFINAGH LETTER YAZZ;Lo;0;L;;;;;N;;;;; +2D66;TIFINAGH LETTER YE;Lo;0;L;;;;;N;;;;; +2D67;TIFINAGH LETTER YO;Lo;0;L;;;;;N;;;;; +2D6F;TIFINAGH MODIFIER LETTER LABIALIZATION MARK;Lm;0;L; 2D61;;;;N;;;;; +2D70;TIFINAGH SEPARATOR MARK;Po;0;L;;;;;N;;;;; +2D7F;TIFINAGH CONSONANT JOINER;Mn;9;NSM;;;;;N;;;;; +2D80;ETHIOPIC SYLLABLE LOA;Lo;0;L;;;;;N;;;;; +2D81;ETHIOPIC SYLLABLE MOA;Lo;0;L;;;;;N;;;;; +2D82;ETHIOPIC SYLLABLE ROA;Lo;0;L;;;;;N;;;;; +2D83;ETHIOPIC SYLLABLE SOA;Lo;0;L;;;;;N;;;;; +2D84;ETHIOPIC SYLLABLE SHOA;Lo;0;L;;;;;N;;;;; +2D85;ETHIOPIC SYLLABLE BOA;Lo;0;L;;;;;N;;;;; +2D86;ETHIOPIC SYLLABLE TOA;Lo;0;L;;;;;N;;;;; +2D87;ETHIOPIC SYLLABLE COA;Lo;0;L;;;;;N;;;;; +2D88;ETHIOPIC SYLLABLE NOA;Lo;0;L;;;;;N;;;;; +2D89;ETHIOPIC SYLLABLE NYOA;Lo;0;L;;;;;N;;;;; +2D8A;ETHIOPIC SYLLABLE GLOTTAL OA;Lo;0;L;;;;;N;;;;; +2D8B;ETHIOPIC SYLLABLE ZOA;Lo;0;L;;;;;N;;;;; +2D8C;ETHIOPIC SYLLABLE DOA;Lo;0;L;;;;;N;;;;; +2D8D;ETHIOPIC SYLLABLE DDOA;Lo;0;L;;;;;N;;;;; +2D8E;ETHIOPIC SYLLABLE JOA;Lo;0;L;;;;;N;;;;; +2D8F;ETHIOPIC SYLLABLE THOA;Lo;0;L;;;;;N;;;;; +2D90;ETHIOPIC SYLLABLE CHOA;Lo;0;L;;;;;N;;;;; +2D91;ETHIOPIC SYLLABLE PHOA;Lo;0;L;;;;;N;;;;; +2D92;ETHIOPIC SYLLABLE POA;Lo;0;L;;;;;N;;;;; +2D93;ETHIOPIC SYLLABLE GGWA;Lo;0;L;;;;;N;;;;; +2D94;ETHIOPIC SYLLABLE GGWI;Lo;0;L;;;;;N;;;;; +2D95;ETHIOPIC SYLLABLE GGWEE;Lo;0;L;;;;;N;;;;; +2D96;ETHIOPIC SYLLABLE GGWE;Lo;0;L;;;;;N;;;;; +2DA0;ETHIOPIC SYLLABLE SSA;Lo;0;L;;;;;N;;;;; +2DA1;ETHIOPIC SYLLABLE SSU;Lo;0;L;;;;;N;;;;; +2DA2;ETHIOPIC SYLLABLE SSI;Lo;0;L;;;;;N;;;;; +2DA3;ETHIOPIC SYLLABLE SSAA;Lo;0;L;;;;;N;;;;; +2DA4;ETHIOPIC SYLLABLE SSEE;Lo;0;L;;;;;N;;;;; +2DA5;ETHIOPIC SYLLABLE SSE;Lo;0;L;;;;;N;;;;; +2DA6;ETHIOPIC SYLLABLE SSO;Lo;0;L;;;;;N;;;;; +2DA8;ETHIOPIC SYLLABLE CCA;Lo;0;L;;;;;N;;;;; +2DA9;ETHIOPIC SYLLABLE CCU;Lo;0;L;;;;;N;;;;; +2DAA;ETHIOPIC SYLLABLE CCI;Lo;0;L;;;;;N;;;;; +2DAB;ETHIOPIC SYLLABLE CCAA;Lo;0;L;;;;;N;;;;; +2DAC;ETHIOPIC SYLLABLE CCEE;Lo;0;L;;;;;N;;;;; +2DAD;ETHIOPIC SYLLABLE CCE;Lo;0;L;;;;;N;;;;; +2DAE;ETHIOPIC SYLLABLE CCO;Lo;0;L;;;;;N;;;;; +2DB0;ETHIOPIC SYLLABLE ZZA;Lo;0;L;;;;;N;;;;; +2DB1;ETHIOPIC SYLLABLE ZZU;Lo;0;L;;;;;N;;;;; +2DB2;ETHIOPIC SYLLABLE ZZI;Lo;0;L;;;;;N;;;;; +2DB3;ETHIOPIC SYLLABLE ZZAA;Lo;0;L;;;;;N;;;;; +2DB4;ETHIOPIC SYLLABLE ZZEE;Lo;0;L;;;;;N;;;;; +2DB5;ETHIOPIC SYLLABLE ZZE;Lo;0;L;;;;;N;;;;; +2DB6;ETHIOPIC SYLLABLE ZZO;Lo;0;L;;;;;N;;;;; +2DB8;ETHIOPIC SYLLABLE CCHA;Lo;0;L;;;;;N;;;;; +2DB9;ETHIOPIC SYLLABLE CCHU;Lo;0;L;;;;;N;;;;; +2DBA;ETHIOPIC SYLLABLE CCHI;Lo;0;L;;;;;N;;;;; +2DBB;ETHIOPIC SYLLABLE CCHAA;Lo;0;L;;;;;N;;;;; +2DBC;ETHIOPIC SYLLABLE CCHEE;Lo;0;L;;;;;N;;;;; +2DBD;ETHIOPIC SYLLABLE CCHE;Lo;0;L;;;;;N;;;;; +2DBE;ETHIOPIC SYLLABLE CCHO;Lo;0;L;;;;;N;;;;; +2DC0;ETHIOPIC SYLLABLE QYA;Lo;0;L;;;;;N;;;;; +2DC1;ETHIOPIC SYLLABLE QYU;Lo;0;L;;;;;N;;;;; +2DC2;ETHIOPIC SYLLABLE QYI;Lo;0;L;;;;;N;;;;; +2DC3;ETHIOPIC SYLLABLE QYAA;Lo;0;L;;;;;N;;;;; +2DC4;ETHIOPIC SYLLABLE QYEE;Lo;0;L;;;;;N;;;;; +2DC5;ETHIOPIC SYLLABLE QYE;Lo;0;L;;;;;N;;;;; +2DC6;ETHIOPIC SYLLABLE QYO;Lo;0;L;;;;;N;;;;; +2DC8;ETHIOPIC SYLLABLE KYA;Lo;0;L;;;;;N;;;;; +2DC9;ETHIOPIC SYLLABLE KYU;Lo;0;L;;;;;N;;;;; +2DCA;ETHIOPIC SYLLABLE KYI;Lo;0;L;;;;;N;;;;; +2DCB;ETHIOPIC SYLLABLE KYAA;Lo;0;L;;;;;N;;;;; +2DCC;ETHIOPIC SYLLABLE KYEE;Lo;0;L;;;;;N;;;;; +2DCD;ETHIOPIC SYLLABLE KYE;Lo;0;L;;;;;N;;;;; +2DCE;ETHIOPIC SYLLABLE KYO;Lo;0;L;;;;;N;;;;; +2DD0;ETHIOPIC SYLLABLE XYA;Lo;0;L;;;;;N;;;;; +2DD1;ETHIOPIC SYLLABLE XYU;Lo;0;L;;;;;N;;;;; +2DD2;ETHIOPIC SYLLABLE XYI;Lo;0;L;;;;;N;;;;; +2DD3;ETHIOPIC SYLLABLE XYAA;Lo;0;L;;;;;N;;;;; +2DD4;ETHIOPIC SYLLABLE XYEE;Lo;0;L;;;;;N;;;;; +2DD5;ETHIOPIC SYLLABLE XYE;Lo;0;L;;;;;N;;;;; +2DD6;ETHIOPIC SYLLABLE XYO;Lo;0;L;;;;;N;;;;; +2DD8;ETHIOPIC SYLLABLE GYA;Lo;0;L;;;;;N;;;;; +2DD9;ETHIOPIC SYLLABLE GYU;Lo;0;L;;;;;N;;;;; +2DDA;ETHIOPIC SYLLABLE GYI;Lo;0;L;;;;;N;;;;; +2DDB;ETHIOPIC SYLLABLE GYAA;Lo;0;L;;;;;N;;;;; +2DDC;ETHIOPIC SYLLABLE GYEE;Lo;0;L;;;;;N;;;;; +2DDD;ETHIOPIC SYLLABLE GYE;Lo;0;L;;;;;N;;;;; +2DDE;ETHIOPIC SYLLABLE GYO;Lo;0;L;;;;;N;;;;; +2DE0;COMBINING CYRILLIC LETTER BE;Mn;230;NSM;;;;;N;;;;; +2DE1;COMBINING CYRILLIC LETTER VE;Mn;230;NSM;;;;;N;;;;; +2DE2;COMBINING CYRILLIC LETTER GHE;Mn;230;NSM;;;;;N;;;;; +2DE3;COMBINING CYRILLIC LETTER DE;Mn;230;NSM;;;;;N;;;;; +2DE4;COMBINING CYRILLIC LETTER ZHE;Mn;230;NSM;;;;;N;;;;; +2DE5;COMBINING CYRILLIC LETTER ZE;Mn;230;NSM;;;;;N;;;;; +2DE6;COMBINING CYRILLIC LETTER KA;Mn;230;NSM;;;;;N;;;;; +2DE7;COMBINING CYRILLIC LETTER EL;Mn;230;NSM;;;;;N;;;;; +2DE8;COMBINING CYRILLIC LETTER EM;Mn;230;NSM;;;;;N;;;;; +2DE9;COMBINING CYRILLIC LETTER EN;Mn;230;NSM;;;;;N;;;;; +2DEA;COMBINING CYRILLIC LETTER O;Mn;230;NSM;;;;;N;;;;; +2DEB;COMBINING CYRILLIC LETTER PE;Mn;230;NSM;;;;;N;;;;; +2DEC;COMBINING CYRILLIC LETTER ER;Mn;230;NSM;;;;;N;;;;; +2DED;COMBINING CYRILLIC LETTER ES;Mn;230;NSM;;;;;N;;;;; +2DEE;COMBINING CYRILLIC LETTER TE;Mn;230;NSM;;;;;N;;;;; +2DEF;COMBINING CYRILLIC LETTER HA;Mn;230;NSM;;;;;N;;;;; +2DF0;COMBINING CYRILLIC LETTER TSE;Mn;230;NSM;;;;;N;;;;; +2DF1;COMBINING CYRILLIC LETTER CHE;Mn;230;NSM;;;;;N;;;;; +2DF2;COMBINING CYRILLIC LETTER SHA;Mn;230;NSM;;;;;N;;;;; +2DF3;COMBINING CYRILLIC LETTER SHCHA;Mn;230;NSM;;;;;N;;;;; +2DF4;COMBINING CYRILLIC LETTER FITA;Mn;230;NSM;;;;;N;;;;; +2DF5;COMBINING CYRILLIC LETTER ES-TE;Mn;230;NSM;;;;;N;;;;; +2DF6;COMBINING CYRILLIC LETTER A;Mn;230;NSM;;;;;N;;;;; +2DF7;COMBINING CYRILLIC LETTER IE;Mn;230;NSM;;;;;N;;;;; +2DF8;COMBINING CYRILLIC LETTER DJERV;Mn;230;NSM;;;;;N;;;;; +2DF9;COMBINING CYRILLIC LETTER MONOGRAPH UK;Mn;230;NSM;;;;;N;;;;; +2DFA;COMBINING CYRILLIC LETTER YAT;Mn;230;NSM;;;;;N;;;;; +2DFB;COMBINING CYRILLIC LETTER YU;Mn;230;NSM;;;;;N;;;;; +2DFC;COMBINING CYRILLIC LETTER IOTIFIED A;Mn;230;NSM;;;;;N;;;;; +2DFD;COMBINING CYRILLIC LETTER LITTLE YUS;Mn;230;NSM;;;;;N;;;;; +2DFE;COMBINING CYRILLIC LETTER BIG YUS;Mn;230;NSM;;;;;N;;;;; +2DFF;COMBINING CYRILLIC LETTER IOTIFIED BIG YUS;Mn;230;NSM;;;;;N;;;;; +2E00;RIGHT ANGLE SUBSTITUTION MARKER;Po;0;ON;;;;;N;;;;; +2E01;RIGHT ANGLE DOTTED SUBSTITUTION MARKER;Po;0;ON;;;;;N;;;;; +2E02;LEFT SUBSTITUTION BRACKET;Pi;0;ON;;;;;Y;;;;; +2E03;RIGHT SUBSTITUTION BRACKET;Pf;0;ON;;;;;Y;;;;; +2E04;LEFT DOTTED SUBSTITUTION BRACKET;Pi;0;ON;;;;;Y;;;;; +2E05;RIGHT DOTTED SUBSTITUTION BRACKET;Pf;0;ON;;;;;Y;;;;; +2E06;RAISED INTERPOLATION MARKER;Po;0;ON;;;;;N;;;;; +2E07;RAISED DOTTED INTERPOLATION MARKER;Po;0;ON;;;;;N;;;;; +2E08;DOTTED TRANSPOSITION MARKER;Po;0;ON;;;;;N;;;;; +2E09;LEFT TRANSPOSITION BRACKET;Pi;0;ON;;;;;Y;;;;; +2E0A;RIGHT TRANSPOSITION BRACKET;Pf;0;ON;;;;;Y;;;;; +2E0B;RAISED SQUARE;Po;0;ON;;;;;N;;;;; +2E0C;LEFT RAISED OMISSION BRACKET;Pi;0;ON;;;;;Y;;;;; +2E0D;RIGHT RAISED OMISSION BRACKET;Pf;0;ON;;;;;Y;;;;; +2E0E;EDITORIAL CORONIS;Po;0;ON;;;;;N;;;;; +2E0F;PARAGRAPHOS;Po;0;ON;;;;;N;;;;; +2E10;FORKED PARAGRAPHOS;Po;0;ON;;;;;N;;;;; +2E11;REVERSED FORKED PARAGRAPHOS;Po;0;ON;;;;;N;;;;; +2E12;HYPODIASTOLE;Po;0;ON;;;;;N;;;;; +2E13;DOTTED OBELOS;Po;0;ON;;;;;N;;;;; +2E14;DOWNWARDS ANCORA;Po;0;ON;;;;;N;;;;; +2E15;UPWARDS ANCORA;Po;0;ON;;;;;N;;;;; +2E16;DOTTED RIGHT-POINTING ANGLE;Po;0;ON;;;;;N;;;;; +2E17;DOUBLE OBLIQUE HYPHEN;Pd;0;ON;;;;;N;;;;; +2E18;INVERTED INTERROBANG;Po;0;ON;;;;;N;;;;; +2E19;PALM BRANCH;Po;0;ON;;;;;N;;;;; +2E1A;HYPHEN WITH DIAERESIS;Pd;0;ON;;;;;N;;;;; +2E1B;TILDE WITH RING ABOVE;Po;0;ON;;;;;N;;;;; +2E1C;LEFT LOW PARAPHRASE BRACKET;Pi;0;ON;;;;;Y;;;;; +2E1D;RIGHT LOW PARAPHRASE BRACKET;Pf;0;ON;;;;;Y;;;;; +2E1E;TILDE WITH DOT ABOVE;Po;0;ON;;;;;N;;;;; +2E1F;TILDE WITH DOT BELOW;Po;0;ON;;;;;N;;;;; +2E20;LEFT VERTICAL BAR WITH QUILL;Pi;0;ON;;;;;Y;;;;; +2E21;RIGHT VERTICAL BAR WITH QUILL;Pf;0;ON;;;;;Y;;;;; +2E22;TOP LEFT HALF BRACKET;Ps;0;ON;;;;;Y;;;;; +2E23;TOP RIGHT HALF BRACKET;Pe;0;ON;;;;;Y;;;;; +2E24;BOTTOM LEFT HALF BRACKET;Ps;0;ON;;;;;Y;;;;; +2E25;BOTTOM RIGHT HALF BRACKET;Pe;0;ON;;;;;Y;;;;; +2E26;LEFT SIDEWAYS U BRACKET;Ps;0;ON;;;;;Y;;;;; +2E27;RIGHT SIDEWAYS U BRACKET;Pe;0;ON;;;;;Y;;;;; +2E28;LEFT DOUBLE PARENTHESIS;Ps;0;ON;;;;;Y;;;;; +2E29;RIGHT DOUBLE PARENTHESIS;Pe;0;ON;;;;;Y;;;;; +2E2A;TWO DOTS OVER ONE DOT PUNCTUATION;Po;0;ON;;;;;N;;;;; +2E2B;ONE DOT OVER TWO DOTS PUNCTUATION;Po;0;ON;;;;;N;;;;; +2E2C;SQUARED FOUR DOT PUNCTUATION;Po;0;ON;;;;;N;;;;; +2E2D;FIVE DOT MARK;Po;0;ON;;;;;N;;;;; +2E2E;REVERSED QUESTION MARK;Po;0;ON;;;;;N;;;;; +2E2F;VERTICAL TILDE;Lm;0;ON;;;;;N;;;;; +2E30;RING POINT;Po;0;ON;;;;;N;;;;; +2E31;WORD SEPARATOR MIDDLE DOT;Po;0;ON;;;;;N;;;;; +2E32;TURNED COMMA;Po;0;ON;;;;;N;;;;; +2E33;RAISED DOT;Po;0;ON;;;;;N;;;;; +2E34;RAISED COMMA;Po;0;ON;;;;;N;;;;; +2E35;TURNED SEMICOLON;Po;0;ON;;;;;N;;;;; +2E36;DAGGER WITH LEFT GUARD;Po;0;ON;;;;;N;;;;; +2E37;DAGGER WITH RIGHT GUARD;Po;0;ON;;;;;N;;;;; +2E38;TURNED DAGGER;Po;0;ON;;;;;N;;;;; +2E39;TOP HALF SECTION SIGN;Po;0;ON;;;;;N;;;;; +2E3A;TWO-EM DASH;Pd;0;ON;;;;;N;;;;; +2E3B;THREE-EM DASH;Pd;0;ON;;;;;N;;;;; +2E3C;STENOGRAPHIC FULL STOP;Po;0;ON;;;;;N;;;;; +2E3D;VERTICAL SIX DOTS;Po;0;ON;;;;;N;;;;; +2E3E;WIGGLY VERTICAL LINE;Po;0;ON;;;;;N;;;;; +2E3F;CAPITULUM;Po;0;ON;;;;;N;;;;; +2E40;DOUBLE HYPHEN;Pd;0;ON;;;;;N;;;;; +2E41;REVERSED COMMA;Po;0;ON;;;;;N;;;;; +2E42;DOUBLE LOW-REVERSED-9 QUOTATION MARK;Ps;0;ON;;;;;N;;;;; +2E43;DASH WITH LEFT UPTURN;Po;0;ON;;;;;N;;;;; +2E44;DOUBLE SUSPENSION MARK;Po;0;ON;;;;;N;;;;; +2E45;INVERTED LOW KAVYKA;Po;0;ON;;;;;N;;;;; +2E46;INVERTED LOW KAVYKA WITH KAVYKA ABOVE;Po;0;ON;;;;;N;;;;; +2E47;LOW KAVYKA;Po;0;ON;;;;;N;;;;; +2E48;LOW KAVYKA WITH DOT;Po;0;ON;;;;;N;;;;; +2E49;DOUBLE STACKED COMMA;Po;0;ON;;;;;N;;;;; +2E4A;DOTTED SOLIDUS;Po;0;ON;;;;;N;;;;; +2E4B;TRIPLE DAGGER;Po;0;ON;;;;;N;;;;; +2E4C;MEDIEVAL COMMA;Po;0;ON;;;;;N;;;;; +2E4D;PARAGRAPHUS MARK;Po;0;ON;;;;;N;;;;; +2E4E;PUNCTUS ELEVATUS MARK;Po;0;ON;;;;;N;;;;; +2E4F;CORNISH VERSE DIVIDER;Po;0;ON;;;;;N;;;;; +2E80;CJK RADICAL REPEAT;So;0;ON;;;;;N;;;;; +2E81;CJK RADICAL CLIFF;So;0;ON;;;;;N;;;;; +2E82;CJK RADICAL SECOND ONE;So;0;ON;;;;;N;;;;; +2E83;CJK RADICAL SECOND TWO;So;0;ON;;;;;N;;;;; +2E84;CJK RADICAL SECOND THREE;So;0;ON;;;;;N;;;;; +2E85;CJK RADICAL PERSON;So;0;ON;;;;;N;;;;; +2E86;CJK RADICAL BOX;So;0;ON;;;;;N;;;;; +2E87;CJK RADICAL TABLE;So;0;ON;;;;;N;;;;; +2E88;CJK RADICAL KNIFE ONE;So;0;ON;;;;;N;;;;; +2E89;CJK RADICAL KNIFE TWO;So;0;ON;;;;;N;;;;; +2E8A;CJK RADICAL DIVINATION;So;0;ON;;;;;N;;;;; +2E8B;CJK RADICAL SEAL;So;0;ON;;;;;N;;;;; +2E8C;CJK RADICAL SMALL ONE;So;0;ON;;;;;N;;;;; +2E8D;CJK RADICAL SMALL TWO;So;0;ON;;;;;N;;;;; +2E8E;CJK RADICAL LAME ONE;So;0;ON;;;;;N;;;;; +2E8F;CJK RADICAL LAME TWO;So;0;ON;;;;;N;;;;; +2E90;CJK RADICAL LAME THREE;So;0;ON;;;;;N;;;;; +2E91;CJK RADICAL LAME FOUR;So;0;ON;;;;;N;;;;; +2E92;CJK RADICAL SNAKE;So;0;ON;;;;;N;;;;; +2E93;CJK RADICAL THREAD;So;0;ON;;;;;N;;;;; +2E94;CJK RADICAL SNOUT ONE;So;0;ON;;;;;N;;;;; +2E95;CJK RADICAL SNOUT TWO;So;0;ON;;;;;N;;;;; +2E96;CJK RADICAL HEART ONE;So;0;ON;;;;;N;;;;; +2E97;CJK RADICAL HEART TWO;So;0;ON;;;;;N;;;;; +2E98;CJK RADICAL HAND;So;0;ON;;;;;N;;;;; +2E99;CJK RADICAL RAP;So;0;ON;;;;;N;;;;; +2E9B;CJK RADICAL CHOKE;So;0;ON;;;;;N;;;;; +2E9C;CJK RADICAL SUN;So;0;ON;;;;;N;;;;; +2E9D;CJK RADICAL MOON;So;0;ON;;;;;N;;;;; +2E9E;CJK RADICAL DEATH;So;0;ON;;;;;N;;;;; +2E9F;CJK RADICAL MOTHER;So;0;ON; 6BCD;;;;N;;;;; +2EA0;CJK RADICAL CIVILIAN;So;0;ON;;;;;N;;;;; +2EA1;CJK RADICAL WATER ONE;So;0;ON;;;;;N;;;;; +2EA2;CJK RADICAL WATER TWO;So;0;ON;;;;;N;;;;; +2EA3;CJK RADICAL FIRE;So;0;ON;;;;;N;;;;; +2EA4;CJK RADICAL PAW ONE;So;0;ON;;;;;N;;;;; +2EA5;CJK RADICAL PAW TWO;So;0;ON;;;;;N;;;;; +2EA6;CJK RADICAL SIMPLIFIED HALF TREE TRUNK;So;0;ON;;;;;N;;;;; +2EA7;CJK RADICAL COW;So;0;ON;;;;;N;;;;; +2EA8;CJK RADICAL DOG;So;0;ON;;;;;N;;;;; +2EA9;CJK RADICAL JADE;So;0;ON;;;;;N;;;;; +2EAA;CJK RADICAL BOLT OF CLOTH;So;0;ON;;;;;N;;;;; +2EAB;CJK RADICAL EYE;So;0;ON;;;;;N;;;;; +2EAC;CJK RADICAL SPIRIT ONE;So;0;ON;;;;;N;;;;; +2EAD;CJK RADICAL SPIRIT TWO;So;0;ON;;;;;N;;;;; +2EAE;CJK RADICAL BAMBOO;So;0;ON;;;;;N;;;;; +2EAF;CJK RADICAL SILK;So;0;ON;;;;;N;;;;; +2EB0;CJK RADICAL C-SIMPLIFIED SILK;So;0;ON;;;;;N;;;;; +2EB1;CJK RADICAL NET ONE;So;0;ON;;;;;N;;;;; +2EB2;CJK RADICAL NET TWO;So;0;ON;;;;;N;;;;; +2EB3;CJK RADICAL NET THREE;So;0;ON;;;;;N;;;;; +2EB4;CJK RADICAL NET FOUR;So;0;ON;;;;;N;;;;; +2EB5;CJK RADICAL MESH;So;0;ON;;;;;N;;;;; +2EB6;CJK RADICAL SHEEP;So;0;ON;;;;;N;;;;; +2EB7;CJK RADICAL RAM;So;0;ON;;;;;N;;;;; +2EB8;CJK RADICAL EWE;So;0;ON;;;;;N;;;;; +2EB9;CJK RADICAL OLD;So;0;ON;;;;;N;;;;; +2EBA;CJK RADICAL BRUSH ONE;So;0;ON;;;;;N;;;;; +2EBB;CJK RADICAL BRUSH TWO;So;0;ON;;;;;N;;;;; +2EBC;CJK RADICAL MEAT;So;0;ON;;;;;N;;;;; +2EBD;CJK RADICAL MORTAR;So;0;ON;;;;;N;;;;; +2EBE;CJK RADICAL GRASS ONE;So;0;ON;;;;;N;;;;; +2EBF;CJK RADICAL GRASS TWO;So;0;ON;;;;;N;;;;; +2EC0;CJK RADICAL GRASS THREE;So;0;ON;;;;;N;;;;; +2EC1;CJK RADICAL TIGER;So;0;ON;;;;;N;;;;; +2EC2;CJK RADICAL CLOTHES;So;0;ON;;;;;N;;;;; +2EC3;CJK RADICAL WEST ONE;So;0;ON;;;;;N;;;;; +2EC4;CJK RADICAL WEST TWO;So;0;ON;;;;;N;;;;; +2EC5;CJK RADICAL C-SIMPLIFIED SEE;So;0;ON;;;;;N;;;;; +2EC6;CJK RADICAL SIMPLIFIED HORN;So;0;ON;;;;;N;;;;; +2EC7;CJK RADICAL HORN;So;0;ON;;;;;N;;;;; +2EC8;CJK RADICAL C-SIMPLIFIED SPEECH;So;0;ON;;;;;N;;;;; +2EC9;CJK RADICAL C-SIMPLIFIED SHELL;So;0;ON;;;;;N;;;;; +2ECA;CJK RADICAL FOOT;So;0;ON;;;;;N;;;;; +2ECB;CJK RADICAL C-SIMPLIFIED CART;So;0;ON;;;;;N;;;;; +2ECC;CJK RADICAL SIMPLIFIED WALK;So;0;ON;;;;;N;;;;; +2ECD;CJK RADICAL WALK ONE;So;0;ON;;;;;N;;;;; +2ECE;CJK RADICAL WALK TWO;So;0;ON;;;;;N;;;;; +2ECF;CJK RADICAL CITY;So;0;ON;;;;;N;;;;; +2ED0;CJK RADICAL C-SIMPLIFIED GOLD;So;0;ON;;;;;N;;;;; +2ED1;CJK RADICAL LONG ONE;So;0;ON;;;;;N;;;;; +2ED2;CJK RADICAL LONG TWO;So;0;ON;;;;;N;;;;; +2ED3;CJK RADICAL C-SIMPLIFIED LONG;So;0;ON;;;;;N;;;;; +2ED4;CJK RADICAL C-SIMPLIFIED GATE;So;0;ON;;;;;N;;;;; +2ED5;CJK RADICAL MOUND ONE;So;0;ON;;;;;N;;;;; +2ED6;CJK RADICAL MOUND TWO;So;0;ON;;;;;N;;;;; +2ED7;CJK RADICAL RAIN;So;0;ON;;;;;N;;;;; +2ED8;CJK RADICAL BLUE;So;0;ON;;;;;N;;;;; +2ED9;CJK RADICAL C-SIMPLIFIED TANNED LEATHER;So;0;ON;;;;;N;;;;; +2EDA;CJK RADICAL C-SIMPLIFIED LEAF;So;0;ON;;;;;N;;;;; +2EDB;CJK RADICAL C-SIMPLIFIED WIND;So;0;ON;;;;;N;;;;; +2EDC;CJK RADICAL C-SIMPLIFIED FLY;So;0;ON;;;;;N;;;;; +2EDD;CJK RADICAL EAT ONE;So;0;ON;;;;;N;;;;; +2EDE;CJK RADICAL EAT TWO;So;0;ON;;;;;N;;;;; +2EDF;CJK RADICAL EAT THREE;So;0;ON;;;;;N;;;;; +2EE0;CJK RADICAL C-SIMPLIFIED EAT;So;0;ON;;;;;N;;;;; +2EE1;CJK RADICAL HEAD;So;0;ON;;;;;N;;;;; +2EE2;CJK RADICAL C-SIMPLIFIED HORSE;So;0;ON;;;;;N;;;;; +2EE3;CJK RADICAL BONE;So;0;ON;;;;;N;;;;; +2EE4;CJK RADICAL GHOST;So;0;ON;;;;;N;;;;; +2EE5;CJK RADICAL C-SIMPLIFIED FISH;So;0;ON;;;;;N;;;;; +2EE6;CJK RADICAL C-SIMPLIFIED BIRD;So;0;ON;;;;;N;;;;; +2EE7;CJK RADICAL C-SIMPLIFIED SALT;So;0;ON;;;;;N;;;;; +2EE8;CJK RADICAL SIMPLIFIED WHEAT;So;0;ON;;;;;N;;;;; +2EE9;CJK RADICAL SIMPLIFIED YELLOW;So;0;ON;;;;;N;;;;; +2EEA;CJK RADICAL C-SIMPLIFIED FROG;So;0;ON;;;;;N;;;;; +2EEB;CJK RADICAL J-SIMPLIFIED EVEN;So;0;ON;;;;;N;;;;; +2EEC;CJK RADICAL C-SIMPLIFIED EVEN;So;0;ON;;;;;N;;;;; +2EED;CJK RADICAL J-SIMPLIFIED TOOTH;So;0;ON;;;;;N;;;;; +2EEE;CJK RADICAL C-SIMPLIFIED TOOTH;So;0;ON;;;;;N;;;;; +2EEF;CJK RADICAL J-SIMPLIFIED DRAGON;So;0;ON;;;;;N;;;;; +2EF0;CJK RADICAL C-SIMPLIFIED DRAGON;So;0;ON;;;;;N;;;;; +2EF1;CJK RADICAL TURTLE;So;0;ON;;;;;N;;;;; +2EF2;CJK RADICAL J-SIMPLIFIED TURTLE;So;0;ON;;;;;N;;;;; +2EF3;CJK RADICAL C-SIMPLIFIED TURTLE;So;0;ON; 9F9F;;;;N;;;;; +2F00;KANGXI RADICAL ONE;So;0;ON; 4E00;;;;N;;;;; +2F01;KANGXI RADICAL LINE;So;0;ON; 4E28;;;;N;;;;; +2F02;KANGXI RADICAL DOT;So;0;ON; 4E36;;;;N;;;;; +2F03;KANGXI RADICAL SLASH;So;0;ON; 4E3F;;;;N;;;;; +2F04;KANGXI RADICAL SECOND;So;0;ON; 4E59;;;;N;;;;; +2F05;KANGXI RADICAL HOOK;So;0;ON; 4E85;;;;N;;;;; +2F06;KANGXI RADICAL TWO;So;0;ON; 4E8C;;;;N;;;;; +2F07;KANGXI RADICAL LID;So;0;ON; 4EA0;;;;N;;;;; +2F08;KANGXI RADICAL MAN;So;0;ON; 4EBA;;;;N;;;;; +2F09;KANGXI RADICAL LEGS;So;0;ON; 513F;;;;N;;;;; +2F0A;KANGXI RADICAL ENTER;So;0;ON; 5165;;;;N;;;;; +2F0B;KANGXI RADICAL EIGHT;So;0;ON; 516B;;;;N;;;;; +2F0C;KANGXI RADICAL DOWN BOX;So;0;ON; 5182;;;;N;;;;; +2F0D;KANGXI RADICAL COVER;So;0;ON; 5196;;;;N;;;;; +2F0E;KANGXI RADICAL ICE;So;0;ON; 51AB;;;;N;;;;; +2F0F;KANGXI RADICAL TABLE;So;0;ON; 51E0;;;;N;;;;; +2F10;KANGXI RADICAL OPEN BOX;So;0;ON; 51F5;;;;N;;;;; +2F11;KANGXI RADICAL KNIFE;So;0;ON; 5200;;;;N;;;;; +2F12;KANGXI RADICAL POWER;So;0;ON; 529B;;;;N;;;;; +2F13;KANGXI RADICAL WRAP;So;0;ON; 52F9;;;;N;;;;; +2F14;KANGXI RADICAL SPOON;So;0;ON; 5315;;;;N;;;;; +2F15;KANGXI RADICAL RIGHT OPEN BOX;So;0;ON; 531A;;;;N;;;;; +2F16;KANGXI RADICAL HIDING ENCLOSURE;So;0;ON; 5338;;;;N;;;;; +2F17;KANGXI RADICAL TEN;So;0;ON; 5341;;;;N;;;;; +2F18;KANGXI RADICAL DIVINATION;So;0;ON; 535C;;;;N;;;;; +2F19;KANGXI RADICAL SEAL;So;0;ON; 5369;;;;N;;;;; +2F1A;KANGXI RADICAL CLIFF;So;0;ON; 5382;;;;N;;;;; +2F1B;KANGXI RADICAL PRIVATE;So;0;ON; 53B6;;;;N;;;;; +2F1C;KANGXI RADICAL AGAIN;So;0;ON; 53C8;;;;N;;;;; +2F1D;KANGXI RADICAL MOUTH;So;0;ON; 53E3;;;;N;;;;; +2F1E;KANGXI RADICAL ENCLOSURE;So;0;ON; 56D7;;;;N;;;;; +2F1F;KANGXI RADICAL EARTH;So;0;ON; 571F;;;;N;;;;; +2F20;KANGXI RADICAL SCHOLAR;So;0;ON; 58EB;;;;N;;;;; +2F21;KANGXI RADICAL GO;So;0;ON; 5902;;;;N;;;;; +2F22;KANGXI RADICAL GO SLOWLY;So;0;ON; 590A;;;;N;;;;; +2F23;KANGXI RADICAL EVENING;So;0;ON; 5915;;;;N;;;;; +2F24;KANGXI RADICAL BIG;So;0;ON; 5927;;;;N;;;;; +2F25;KANGXI RADICAL WOMAN;So;0;ON; 5973;;;;N;;;;; +2F26;KANGXI RADICAL CHILD;So;0;ON; 5B50;;;;N;;;;; +2F27;KANGXI RADICAL ROOF;So;0;ON; 5B80;;;;N;;;;; +2F28;KANGXI RADICAL INCH;So;0;ON; 5BF8;;;;N;;;;; +2F29;KANGXI RADICAL SMALL;So;0;ON; 5C0F;;;;N;;;;; +2F2A;KANGXI RADICAL LAME;So;0;ON; 5C22;;;;N;;;;; +2F2B;KANGXI RADICAL CORPSE;So;0;ON; 5C38;;;;N;;;;; +2F2C;KANGXI RADICAL SPROUT;So;0;ON; 5C6E;;;;N;;;;; +2F2D;KANGXI RADICAL MOUNTAIN;So;0;ON; 5C71;;;;N;;;;; +2F2E;KANGXI RADICAL RIVER;So;0;ON; 5DDB;;;;N;;;;; +2F2F;KANGXI RADICAL WORK;So;0;ON; 5DE5;;;;N;;;;; +2F30;KANGXI RADICAL ONESELF;So;0;ON; 5DF1;;;;N;;;;; +2F31;KANGXI RADICAL TURBAN;So;0;ON; 5DFE;;;;N;;;;; +2F32;KANGXI RADICAL DRY;So;0;ON; 5E72;;;;N;;;;; +2F33;KANGXI RADICAL SHORT THREAD;So;0;ON; 5E7A;;;;N;;;;; +2F34;KANGXI RADICAL DOTTED CLIFF;So;0;ON; 5E7F;;;;N;;;;; +2F35;KANGXI RADICAL LONG STRIDE;So;0;ON; 5EF4;;;;N;;;;; +2F36;KANGXI RADICAL TWO HANDS;So;0;ON; 5EFE;;;;N;;;;; +2F37;KANGXI RADICAL SHOOT;So;0;ON; 5F0B;;;;N;;;;; +2F38;KANGXI RADICAL BOW;So;0;ON; 5F13;;;;N;;;;; +2F39;KANGXI RADICAL SNOUT;So;0;ON; 5F50;;;;N;;;;; +2F3A;KANGXI RADICAL BRISTLE;So;0;ON; 5F61;;;;N;;;;; +2F3B;KANGXI RADICAL STEP;So;0;ON; 5F73;;;;N;;;;; +2F3C;KANGXI RADICAL HEART;So;0;ON; 5FC3;;;;N;;;;; +2F3D;KANGXI RADICAL HALBERD;So;0;ON; 6208;;;;N;;;;; +2F3E;KANGXI RADICAL DOOR;So;0;ON; 6236;;;;N;;;;; +2F3F;KANGXI RADICAL HAND;So;0;ON; 624B;;;;N;;;;; +2F40;KANGXI RADICAL BRANCH;So;0;ON; 652F;;;;N;;;;; +2F41;KANGXI RADICAL RAP;So;0;ON; 6534;;;;N;;;;; +2F42;KANGXI RADICAL SCRIPT;So;0;ON; 6587;;;;N;;;;; +2F43;KANGXI RADICAL DIPPER;So;0;ON; 6597;;;;N;;;;; +2F44;KANGXI RADICAL AXE;So;0;ON; 65A4;;;;N;;;;; +2F45;KANGXI RADICAL SQUARE;So;0;ON; 65B9;;;;N;;;;; +2F46;KANGXI RADICAL NOT;So;0;ON; 65E0;;;;N;;;;; +2F47;KANGXI RADICAL SUN;So;0;ON; 65E5;;;;N;;;;; +2F48;KANGXI RADICAL SAY;So;0;ON; 66F0;;;;N;;;;; +2F49;KANGXI RADICAL MOON;So;0;ON; 6708;;;;N;;;;; +2F4A;KANGXI RADICAL TREE;So;0;ON; 6728;;;;N;;;;; +2F4B;KANGXI RADICAL LACK;So;0;ON; 6B20;;;;N;;;;; +2F4C;KANGXI RADICAL STOP;So;0;ON; 6B62;;;;N;;;;; +2F4D;KANGXI RADICAL DEATH;So;0;ON; 6B79;;;;N;;;;; +2F4E;KANGXI RADICAL WEAPON;So;0;ON; 6BB3;;;;N;;;;; +2F4F;KANGXI RADICAL DO NOT;So;0;ON; 6BCB;;;;N;;;;; +2F50;KANGXI RADICAL COMPARE;So;0;ON; 6BD4;;;;N;;;;; +2F51;KANGXI RADICAL FUR;So;0;ON; 6BDB;;;;N;;;;; +2F52;KANGXI RADICAL CLAN;So;0;ON; 6C0F;;;;N;;;;; +2F53;KANGXI RADICAL STEAM;So;0;ON; 6C14;;;;N;;;;; +2F54;KANGXI RADICAL WATER;So;0;ON; 6C34;;;;N;;;;; +2F55;KANGXI RADICAL FIRE;So;0;ON; 706B;;;;N;;;;; +2F56;KANGXI RADICAL CLAW;So;0;ON; 722A;;;;N;;;;; +2F57;KANGXI RADICAL FATHER;So;0;ON; 7236;;;;N;;;;; +2F58;KANGXI RADICAL DOUBLE X;So;0;ON; 723B;;;;N;;;;; +2F59;KANGXI RADICAL HALF TREE TRUNK;So;0;ON; 723F;;;;N;;;;; +2F5A;KANGXI RADICAL SLICE;So;0;ON; 7247;;;;N;;;;; +2F5B;KANGXI RADICAL FANG;So;0;ON; 7259;;;;N;;;;; +2F5C;KANGXI RADICAL COW;So;0;ON; 725B;;;;N;;;;; +2F5D;KANGXI RADICAL DOG;So;0;ON; 72AC;;;;N;;;;; +2F5E;KANGXI RADICAL PROFOUND;So;0;ON; 7384;;;;N;;;;; +2F5F;KANGXI RADICAL JADE;So;0;ON; 7389;;;;N;;;;; +2F60;KANGXI RADICAL MELON;So;0;ON; 74DC;;;;N;;;;; +2F61;KANGXI RADICAL TILE;So;0;ON; 74E6;;;;N;;;;; +2F62;KANGXI RADICAL SWEET;So;0;ON; 7518;;;;N;;;;; +2F63;KANGXI RADICAL LIFE;So;0;ON; 751F;;;;N;;;;; +2F64;KANGXI RADICAL USE;So;0;ON; 7528;;;;N;;;;; +2F65;KANGXI RADICAL FIELD;So;0;ON; 7530;;;;N;;;;; +2F66;KANGXI RADICAL BOLT OF CLOTH;So;0;ON; 758B;;;;N;;;;; +2F67;KANGXI RADICAL SICKNESS;So;0;ON; 7592;;;;N;;;;; +2F68;KANGXI RADICAL DOTTED TENT;So;0;ON; 7676;;;;N;;;;; +2F69;KANGXI RADICAL WHITE;So;0;ON; 767D;;;;N;;;;; +2F6A;KANGXI RADICAL SKIN;So;0;ON; 76AE;;;;N;;;;; +2F6B;KANGXI RADICAL DISH;So;0;ON; 76BF;;;;N;;;;; +2F6C;KANGXI RADICAL EYE;So;0;ON; 76EE;;;;N;;;;; +2F6D;KANGXI RADICAL SPEAR;So;0;ON; 77DB;;;;N;;;;; +2F6E;KANGXI RADICAL ARROW;So;0;ON; 77E2;;;;N;;;;; +2F6F;KANGXI RADICAL STONE;So;0;ON; 77F3;;;;N;;;;; +2F70;KANGXI RADICAL SPIRIT;So;0;ON; 793A;;;;N;;;;; +2F71;KANGXI RADICAL TRACK;So;0;ON; 79B8;;;;N;;;;; +2F72;KANGXI RADICAL GRAIN;So;0;ON; 79BE;;;;N;;;;; +2F73;KANGXI RADICAL CAVE;So;0;ON; 7A74;;;;N;;;;; +2F74;KANGXI RADICAL STAND;So;0;ON; 7ACB;;;;N;;;;; +2F75;KANGXI RADICAL BAMBOO;So;0;ON; 7AF9;;;;N;;;;; +2F76;KANGXI RADICAL RICE;So;0;ON; 7C73;;;;N;;;;; +2F77;KANGXI RADICAL SILK;So;0;ON; 7CF8;;;;N;;;;; +2F78;KANGXI RADICAL JAR;So;0;ON; 7F36;;;;N;;;;; +2F79;KANGXI RADICAL NET;So;0;ON; 7F51;;;;N;;;;; +2F7A;KANGXI RADICAL SHEEP;So;0;ON; 7F8A;;;;N;;;;; +2F7B;KANGXI RADICAL FEATHER;So;0;ON; 7FBD;;;;N;;;;; +2F7C;KANGXI RADICAL OLD;So;0;ON; 8001;;;;N;;;;; +2F7D;KANGXI RADICAL AND;So;0;ON; 800C;;;;N;;;;; +2F7E;KANGXI RADICAL PLOW;So;0;ON; 8012;;;;N;;;;; +2F7F;KANGXI RADICAL EAR;So;0;ON; 8033;;;;N;;;;; +2F80;KANGXI RADICAL BRUSH;So;0;ON; 807F;;;;N;;;;; +2F81;KANGXI RADICAL MEAT;So;0;ON; 8089;;;;N;;;;; +2F82;KANGXI RADICAL MINISTER;So;0;ON; 81E3;;;;N;;;;; +2F83;KANGXI RADICAL SELF;So;0;ON; 81EA;;;;N;;;;; +2F84;KANGXI RADICAL ARRIVE;So;0;ON; 81F3;;;;N;;;;; +2F85;KANGXI RADICAL MORTAR;So;0;ON; 81FC;;;;N;;;;; +2F86;KANGXI RADICAL TONGUE;So;0;ON; 820C;;;;N;;;;; +2F87;KANGXI RADICAL OPPOSE;So;0;ON; 821B;;;;N;;;;; +2F88;KANGXI RADICAL BOAT;So;0;ON; 821F;;;;N;;;;; +2F89;KANGXI RADICAL STOPPING;So;0;ON; 826E;;;;N;;;;; +2F8A;KANGXI RADICAL COLOR;So;0;ON; 8272;;;;N;;;;; +2F8B;KANGXI RADICAL GRASS;So;0;ON; 8278;;;;N;;;;; +2F8C;KANGXI RADICAL TIGER;So;0;ON; 864D;;;;N;;;;; +2F8D;KANGXI RADICAL INSECT;So;0;ON; 866B;;;;N;;;;; +2F8E;KANGXI RADICAL BLOOD;So;0;ON; 8840;;;;N;;;;; +2F8F;KANGXI RADICAL WALK ENCLOSURE;So;0;ON; 884C;;;;N;;;;; +2F90;KANGXI RADICAL CLOTHES;So;0;ON; 8863;;;;N;;;;; +2F91;KANGXI RADICAL WEST;So;0;ON; 897E;;;;N;;;;; +2F92;KANGXI RADICAL SEE;So;0;ON; 898B;;;;N;;;;; +2F93;KANGXI RADICAL HORN;So;0;ON; 89D2;;;;N;;;;; +2F94;KANGXI RADICAL SPEECH;So;0;ON; 8A00;;;;N;;;;; +2F95;KANGXI RADICAL VALLEY;So;0;ON; 8C37;;;;N;;;;; +2F96;KANGXI RADICAL BEAN;So;0;ON; 8C46;;;;N;;;;; +2F97;KANGXI RADICAL PIG;So;0;ON; 8C55;;;;N;;;;; +2F98;KANGXI RADICAL BADGER;So;0;ON; 8C78;;;;N;;;;; +2F99;KANGXI RADICAL SHELL;So;0;ON; 8C9D;;;;N;;;;; +2F9A;KANGXI RADICAL RED;So;0;ON; 8D64;;;;N;;;;; +2F9B;KANGXI RADICAL RUN;So;0;ON; 8D70;;;;N;;;;; +2F9C;KANGXI RADICAL FOOT;So;0;ON; 8DB3;;;;N;;;;; +2F9D;KANGXI RADICAL BODY;So;0;ON; 8EAB;;;;N;;;;; +2F9E;KANGXI RADICAL CART;So;0;ON; 8ECA;;;;N;;;;; +2F9F;KANGXI RADICAL BITTER;So;0;ON; 8F9B;;;;N;;;;; +2FA0;KANGXI RADICAL MORNING;So;0;ON; 8FB0;;;;N;;;;; +2FA1;KANGXI RADICAL WALK;So;0;ON; 8FB5;;;;N;;;;; +2FA2;KANGXI RADICAL CITY;So;0;ON; 9091;;;;N;;;;; +2FA3;KANGXI RADICAL WINE;So;0;ON; 9149;;;;N;;;;; +2FA4;KANGXI RADICAL DISTINGUISH;So;0;ON; 91C6;;;;N;;;;; +2FA5;KANGXI RADICAL VILLAGE;So;0;ON; 91CC;;;;N;;;;; +2FA6;KANGXI RADICAL GOLD;So;0;ON; 91D1;;;;N;;;;; +2FA7;KANGXI RADICAL LONG;So;0;ON; 9577;;;;N;;;;; +2FA8;KANGXI RADICAL GATE;So;0;ON; 9580;;;;N;;;;; +2FA9;KANGXI RADICAL MOUND;So;0;ON; 961C;;;;N;;;;; +2FAA;KANGXI RADICAL SLAVE;So;0;ON; 96B6;;;;N;;;;; +2FAB;KANGXI RADICAL SHORT TAILED BIRD;So;0;ON; 96B9;;;;N;;;;; +2FAC;KANGXI RADICAL RAIN;So;0;ON; 96E8;;;;N;;;;; +2FAD;KANGXI RADICAL BLUE;So;0;ON; 9751;;;;N;;;;; +2FAE;KANGXI RADICAL WRONG;So;0;ON; 975E;;;;N;;;;; +2FAF;KANGXI RADICAL FACE;So;0;ON; 9762;;;;N;;;;; +2FB0;KANGXI RADICAL LEATHER;So;0;ON; 9769;;;;N;;;;; +2FB1;KANGXI RADICAL TANNED LEATHER;So;0;ON; 97CB;;;;N;;;;; +2FB2;KANGXI RADICAL LEEK;So;0;ON; 97ED;;;;N;;;;; +2FB3;KANGXI RADICAL SOUND;So;0;ON; 97F3;;;;N;;;;; +2FB4;KANGXI RADICAL LEAF;So;0;ON; 9801;;;;N;;;;; +2FB5;KANGXI RADICAL WIND;So;0;ON; 98A8;;;;N;;;;; +2FB6;KANGXI RADICAL FLY;So;0;ON; 98DB;;;;N;;;;; +2FB7;KANGXI RADICAL EAT;So;0;ON; 98DF;;;;N;;;;; +2FB8;KANGXI RADICAL HEAD;So;0;ON; 9996;;;;N;;;;; +2FB9;KANGXI RADICAL FRAGRANT;So;0;ON; 9999;;;;N;;;;; +2FBA;KANGXI RADICAL HORSE;So;0;ON; 99AC;;;;N;;;;; +2FBB;KANGXI RADICAL BONE;So;0;ON; 9AA8;;;;N;;;;; +2FBC;KANGXI RADICAL TALL;So;0;ON; 9AD8;;;;N;;;;; +2FBD;KANGXI RADICAL HAIR;So;0;ON; 9ADF;;;;N;;;;; +2FBE;KANGXI RADICAL FIGHT;So;0;ON; 9B25;;;;N;;;;; +2FBF;KANGXI RADICAL SACRIFICIAL WINE;So;0;ON; 9B2F;;;;N;;;;; +2FC0;KANGXI RADICAL CAULDRON;So;0;ON; 9B32;;;;N;;;;; +2FC1;KANGXI RADICAL GHOST;So;0;ON; 9B3C;;;;N;;;;; +2FC2;KANGXI RADICAL FISH;So;0;ON; 9B5A;;;;N;;;;; +2FC3;KANGXI RADICAL BIRD;So;0;ON; 9CE5;;;;N;;;;; +2FC4;KANGXI RADICAL SALT;So;0;ON; 9E75;;;;N;;;;; +2FC5;KANGXI RADICAL DEER;So;0;ON; 9E7F;;;;N;;;;; +2FC6;KANGXI RADICAL WHEAT;So;0;ON; 9EA5;;;;N;;;;; +2FC7;KANGXI RADICAL HEMP;So;0;ON; 9EBB;;;;N;;;;; +2FC8;KANGXI RADICAL YELLOW;So;0;ON; 9EC3;;;;N;;;;; +2FC9;KANGXI RADICAL MILLET;So;0;ON; 9ECD;;;;N;;;;; +2FCA;KANGXI RADICAL BLACK;So;0;ON; 9ED1;;;;N;;;;; +2FCB;KANGXI RADICAL EMBROIDERY;So;0;ON; 9EF9;;;;N;;;;; +2FCC;KANGXI RADICAL FROG;So;0;ON; 9EFD;;;;N;;;;; +2FCD;KANGXI RADICAL TRIPOD;So;0;ON; 9F0E;;;;N;;;;; +2FCE;KANGXI RADICAL DRUM;So;0;ON; 9F13;;;;N;;;;; +2FCF;KANGXI RADICAL RAT;So;0;ON; 9F20;;;;N;;;;; +2FD0;KANGXI RADICAL NOSE;So;0;ON; 9F3B;;;;N;;;;; +2FD1;KANGXI RADICAL EVEN;So;0;ON; 9F4A;;;;N;;;;; +2FD2;KANGXI RADICAL TOOTH;So;0;ON; 9F52;;;;N;;;;; +2FD3;KANGXI RADICAL DRAGON;So;0;ON; 9F8D;;;;N;;;;; +2FD4;KANGXI RADICAL TURTLE;So;0;ON; 9F9C;;;;N;;;;; +2FD5;KANGXI RADICAL FLUTE;So;0;ON; 9FA0;;;;N;;;;; +2FF0;IDEOGRAPHIC DESCRIPTION CHARACTER LEFT TO RIGHT;So;0;ON;;;;;N;;;;; +2FF1;IDEOGRAPHIC DESCRIPTION CHARACTER ABOVE TO BELOW;So;0;ON;;;;;N;;;;; +2FF2;IDEOGRAPHIC DESCRIPTION CHARACTER LEFT TO MIDDLE AND RIGHT;So;0;ON;;;;;N;;;;; +2FF3;IDEOGRAPHIC DESCRIPTION CHARACTER ABOVE TO MIDDLE AND BELOW;So;0;ON;;;;;N;;;;; +2FF4;IDEOGRAPHIC DESCRIPTION CHARACTER FULL SURROUND;So;0;ON;;;;;N;;;;; +2FF5;IDEOGRAPHIC DESCRIPTION CHARACTER SURROUND FROM ABOVE;So;0;ON;;;;;N;;;;; +2FF6;IDEOGRAPHIC DESCRIPTION CHARACTER SURROUND FROM BELOW;So;0;ON;;;;;N;;;;; +2FF7;IDEOGRAPHIC DESCRIPTION CHARACTER SURROUND FROM LEFT;So;0;ON;;;;;N;;;;; +2FF8;IDEOGRAPHIC DESCRIPTION CHARACTER SURROUND FROM UPPER LEFT;So;0;ON;;;;;N;;;;; +2FF9;IDEOGRAPHIC DESCRIPTION CHARACTER SURROUND FROM UPPER RIGHT;So;0;ON;;;;;N;;;;; +2FFA;IDEOGRAPHIC DESCRIPTION CHARACTER SURROUND FROM LOWER LEFT;So;0;ON;;;;;N;;;;; +2FFB;IDEOGRAPHIC DESCRIPTION CHARACTER OVERLAID;So;0;ON;;;;;N;;;;; +3000;IDEOGRAPHIC SPACE;Zs;0;WS; 0020;;;;N;;;;; +3001;IDEOGRAPHIC COMMA;Po;0;ON;;;;;N;;;;; +3002;IDEOGRAPHIC FULL STOP;Po;0;ON;;;;;N;IDEOGRAPHIC PERIOD;;;; +3003;DITTO MARK;Po;0;ON;;;;;N;;;;; +3004;JAPANESE INDUSTRIAL STANDARD SYMBOL;So;0;ON;;;;;N;;;;; +3005;IDEOGRAPHIC ITERATION MARK;Lm;0;L;;;;;N;;;;; +3006;IDEOGRAPHIC CLOSING MARK;Lo;0;L;;;;;N;;;;; +3007;IDEOGRAPHIC NUMBER ZERO;Nl;0;L;;;;0;N;;;;; +3008;LEFT ANGLE BRACKET;Ps;0;ON;;;;;Y;OPENING ANGLE BRACKET;;;; +3009;RIGHT ANGLE BRACKET;Pe;0;ON;;;;;Y;CLOSING ANGLE BRACKET;;;; +300A;LEFT DOUBLE ANGLE BRACKET;Ps;0;ON;;;;;Y;OPENING DOUBLE ANGLE BRACKET;;;; +300B;RIGHT DOUBLE ANGLE BRACKET;Pe;0;ON;;;;;Y;CLOSING DOUBLE ANGLE BRACKET;;;; +300C;LEFT CORNER BRACKET;Ps;0;ON;;;;;Y;OPENING CORNER BRACKET;;;; +300D;RIGHT CORNER BRACKET;Pe;0;ON;;;;;Y;CLOSING CORNER BRACKET;;;; +300E;LEFT WHITE CORNER BRACKET;Ps;0;ON;;;;;Y;OPENING WHITE CORNER BRACKET;;;; +300F;RIGHT WHITE CORNER BRACKET;Pe;0;ON;;;;;Y;CLOSING WHITE CORNER BRACKET;;;; +3010;LEFT BLACK LENTICULAR BRACKET;Ps;0;ON;;;;;Y;OPENING BLACK LENTICULAR BRACKET;;;; +3011;RIGHT BLACK LENTICULAR BRACKET;Pe;0;ON;;;;;Y;CLOSING BLACK LENTICULAR BRACKET;;;; +3012;POSTAL MARK;So;0;ON;;;;;N;;;;; +3013;GETA MARK;So;0;ON;;;;;N;;;;; +3014;LEFT TORTOISE SHELL BRACKET;Ps;0;ON;;;;;Y;OPENING TORTOISE SHELL BRACKET;;;; +3015;RIGHT TORTOISE SHELL BRACKET;Pe;0;ON;;;;;Y;CLOSING TORTOISE SHELL BRACKET;;;; +3016;LEFT WHITE LENTICULAR BRACKET;Ps;0;ON;;;;;Y;OPENING WHITE LENTICULAR BRACKET;;;; +3017;RIGHT WHITE LENTICULAR BRACKET;Pe;0;ON;;;;;Y;CLOSING WHITE LENTICULAR BRACKET;;;; +3018;LEFT WHITE TORTOISE SHELL BRACKET;Ps;0;ON;;;;;Y;OPENING WHITE TORTOISE SHELL BRACKET;;;; +3019;RIGHT WHITE TORTOISE SHELL BRACKET;Pe;0;ON;;;;;Y;CLOSING WHITE TORTOISE SHELL BRACKET;;;; +301A;LEFT WHITE SQUARE BRACKET;Ps;0;ON;;;;;Y;OPENING WHITE SQUARE BRACKET;;;; +301B;RIGHT WHITE SQUARE BRACKET;Pe;0;ON;;;;;Y;CLOSING WHITE SQUARE BRACKET;;;; +301C;WAVE DASH;Pd;0;ON;;;;;N;;;;; +301D;REVERSED DOUBLE PRIME QUOTATION MARK;Ps;0;ON;;;;;N;;;;; +301E;DOUBLE PRIME QUOTATION MARK;Pe;0;ON;;;;;N;;;;; +301F;LOW DOUBLE PRIME QUOTATION MARK;Pe;0;ON;;;;;N;;;;; +3020;POSTAL MARK FACE;So;0;ON;;;;;N;;;;; +3021;HANGZHOU NUMERAL ONE;Nl;0;L;;;;1;N;;;;; +3022;HANGZHOU NUMERAL TWO;Nl;0;L;;;;2;N;;;;; +3023;HANGZHOU NUMERAL THREE;Nl;0;L;;;;3;N;;;;; +3024;HANGZHOU NUMERAL FOUR;Nl;0;L;;;;4;N;;;;; +3025;HANGZHOU NUMERAL FIVE;Nl;0;L;;;;5;N;;;;; +3026;HANGZHOU NUMERAL SIX;Nl;0;L;;;;6;N;;;;; +3027;HANGZHOU NUMERAL SEVEN;Nl;0;L;;;;7;N;;;;; +3028;HANGZHOU NUMERAL EIGHT;Nl;0;L;;;;8;N;;;;; +3029;HANGZHOU NUMERAL NINE;Nl;0;L;;;;9;N;;;;; +302A;IDEOGRAPHIC LEVEL TONE MARK;Mn;218;NSM;;;;;N;;;;; +302B;IDEOGRAPHIC RISING TONE MARK;Mn;228;NSM;;;;;N;;;;; +302C;IDEOGRAPHIC DEPARTING TONE MARK;Mn;232;NSM;;;;;N;;;;; +302D;IDEOGRAPHIC ENTERING TONE MARK;Mn;222;NSM;;;;;N;;;;; +302E;HANGUL SINGLE DOT TONE MARK;Mc;224;L;;;;;N;;;;; +302F;HANGUL DOUBLE DOT TONE MARK;Mc;224;L;;;;;N;;;;; +3030;WAVY DASH;Pd;0;ON;;;;;N;;;;; +3031;VERTICAL KANA REPEAT MARK;Lm;0;L;;;;;N;;;;; +3032;VERTICAL KANA REPEAT WITH VOICED SOUND MARK;Lm;0;L;;;;;N;;;;; +3033;VERTICAL KANA REPEAT MARK UPPER HALF;Lm;0;L;;;;;N;;;;; +3034;VERTICAL KANA REPEAT WITH VOICED SOUND MARK UPPER HALF;Lm;0;L;;;;;N;;;;; +3035;VERTICAL KANA REPEAT MARK LOWER HALF;Lm;0;L;;;;;N;;;;; +3036;CIRCLED POSTAL MARK;So;0;ON; 3012;;;;N;;;;; +3037;IDEOGRAPHIC TELEGRAPH LINE FEED SEPARATOR SYMBOL;So;0;ON;;;;;N;;;;; +3038;HANGZHOU NUMERAL TEN;Nl;0;L; 5341;;;10;N;;;;; +3039;HANGZHOU NUMERAL TWENTY;Nl;0;L; 5344;;;20;N;;;;; +303A;HANGZHOU NUMERAL THIRTY;Nl;0;L; 5345;;;30;N;;;;; +303B;VERTICAL IDEOGRAPHIC ITERATION MARK;Lm;0;L;;;;;N;;;;; +303C;MASU MARK;Lo;0;L;;;;;N;;;;; +303D;PART ALTERNATION MARK;Po;0;ON;;;;;N;;;;; +303E;IDEOGRAPHIC VARIATION INDICATOR;So;0;ON;;;;;N;;;;; +303F;IDEOGRAPHIC HALF FILL SPACE;So;0;ON;;;;;N;;;;; +3041;HIRAGANA LETTER SMALL A;Lo;0;L;;;;;N;;;;; +3042;HIRAGANA LETTER A;Lo;0;L;;;;;N;;;;; +3043;HIRAGANA LETTER SMALL I;Lo;0;L;;;;;N;;;;; +3044;HIRAGANA LETTER I;Lo;0;L;;;;;N;;;;; +3045;HIRAGANA LETTER SMALL U;Lo;0;L;;;;;N;;;;; +3046;HIRAGANA LETTER U;Lo;0;L;;;;;N;;;;; +3047;HIRAGANA LETTER SMALL E;Lo;0;L;;;;;N;;;;; +3048;HIRAGANA LETTER E;Lo;0;L;;;;;N;;;;; +3049;HIRAGANA LETTER SMALL O;Lo;0;L;;;;;N;;;;; +304A;HIRAGANA LETTER O;Lo;0;L;;;;;N;;;;; +304B;HIRAGANA LETTER KA;Lo;0;L;;;;;N;;;;; +304C;HIRAGANA LETTER GA;Lo;0;L;304B 3099;;;;N;;;;; +304D;HIRAGANA LETTER KI;Lo;0;L;;;;;N;;;;; +304E;HIRAGANA LETTER GI;Lo;0;L;304D 3099;;;;N;;;;; +304F;HIRAGANA LETTER KU;Lo;0;L;;;;;N;;;;; +3050;HIRAGANA LETTER GU;Lo;0;L;304F 3099;;;;N;;;;; +3051;HIRAGANA LETTER KE;Lo;0;L;;;;;N;;;;; +3052;HIRAGANA LETTER GE;Lo;0;L;3051 3099;;;;N;;;;; +3053;HIRAGANA LETTER KO;Lo;0;L;;;;;N;;;;; +3054;HIRAGANA LETTER GO;Lo;0;L;3053 3099;;;;N;;;;; +3055;HIRAGANA LETTER SA;Lo;0;L;;;;;N;;;;; +3056;HIRAGANA LETTER ZA;Lo;0;L;3055 3099;;;;N;;;;; +3057;HIRAGANA LETTER SI;Lo;0;L;;;;;N;;;;; +3058;HIRAGANA LETTER ZI;Lo;0;L;3057 3099;;;;N;;;;; +3059;HIRAGANA LETTER SU;Lo;0;L;;;;;N;;;;; +305A;HIRAGANA LETTER ZU;Lo;0;L;3059 3099;;;;N;;;;; +305B;HIRAGANA LETTER SE;Lo;0;L;;;;;N;;;;; +305C;HIRAGANA LETTER ZE;Lo;0;L;305B 3099;;;;N;;;;; +305D;HIRAGANA LETTER SO;Lo;0;L;;;;;N;;;;; +305E;HIRAGANA LETTER ZO;Lo;0;L;305D 3099;;;;N;;;;; +305F;HIRAGANA LETTER TA;Lo;0;L;;;;;N;;;;; +3060;HIRAGANA LETTER DA;Lo;0;L;305F 3099;;;;N;;;;; +3061;HIRAGANA LETTER TI;Lo;0;L;;;;;N;;;;; +3062;HIRAGANA LETTER DI;Lo;0;L;3061 3099;;;;N;;;;; +3063;HIRAGANA LETTER SMALL TU;Lo;0;L;;;;;N;;;;; +3064;HIRAGANA LETTER TU;Lo;0;L;;;;;N;;;;; +3065;HIRAGANA LETTER DU;Lo;0;L;3064 3099;;;;N;;;;; +3066;HIRAGANA LETTER TE;Lo;0;L;;;;;N;;;;; +3067;HIRAGANA LETTER DE;Lo;0;L;3066 3099;;;;N;;;;; +3068;HIRAGANA LETTER TO;Lo;0;L;;;;;N;;;;; +3069;HIRAGANA LETTER DO;Lo;0;L;3068 3099;;;;N;;;;; +306A;HIRAGANA LETTER NA;Lo;0;L;;;;;N;;;;; +306B;HIRAGANA LETTER NI;Lo;0;L;;;;;N;;;;; +306C;HIRAGANA LETTER NU;Lo;0;L;;;;;N;;;;; +306D;HIRAGANA LETTER NE;Lo;0;L;;;;;N;;;;; +306E;HIRAGANA LETTER NO;Lo;0;L;;;;;N;;;;; +306F;HIRAGANA LETTER HA;Lo;0;L;;;;;N;;;;; +3070;HIRAGANA LETTER BA;Lo;0;L;306F 3099;;;;N;;;;; +3071;HIRAGANA LETTER PA;Lo;0;L;306F 309A;;;;N;;;;; +3072;HIRAGANA LETTER HI;Lo;0;L;;;;;N;;;;; +3073;HIRAGANA LETTER BI;Lo;0;L;3072 3099;;;;N;;;;; +3074;HIRAGANA LETTER PI;Lo;0;L;3072 309A;;;;N;;;;; +3075;HIRAGANA LETTER HU;Lo;0;L;;;;;N;;;;; +3076;HIRAGANA LETTER BU;Lo;0;L;3075 3099;;;;N;;;;; +3077;HIRAGANA LETTER PU;Lo;0;L;3075 309A;;;;N;;;;; +3078;HIRAGANA LETTER HE;Lo;0;L;;;;;N;;;;; +3079;HIRAGANA LETTER BE;Lo;0;L;3078 3099;;;;N;;;;; +307A;HIRAGANA LETTER PE;Lo;0;L;3078 309A;;;;N;;;;; +307B;HIRAGANA LETTER HO;Lo;0;L;;;;;N;;;;; +307C;HIRAGANA LETTER BO;Lo;0;L;307B 3099;;;;N;;;;; +307D;HIRAGANA LETTER PO;Lo;0;L;307B 309A;;;;N;;;;; +307E;HIRAGANA LETTER MA;Lo;0;L;;;;;N;;;;; +307F;HIRAGANA LETTER MI;Lo;0;L;;;;;N;;;;; +3080;HIRAGANA LETTER MU;Lo;0;L;;;;;N;;;;; +3081;HIRAGANA LETTER ME;Lo;0;L;;;;;N;;;;; +3082;HIRAGANA LETTER MO;Lo;0;L;;;;;N;;;;; +3083;HIRAGANA LETTER SMALL YA;Lo;0;L;;;;;N;;;;; +3084;HIRAGANA LETTER YA;Lo;0;L;;;;;N;;;;; +3085;HIRAGANA LETTER SMALL YU;Lo;0;L;;;;;N;;;;; +3086;HIRAGANA LETTER YU;Lo;0;L;;;;;N;;;;; +3087;HIRAGANA LETTER SMALL YO;Lo;0;L;;;;;N;;;;; +3088;HIRAGANA LETTER YO;Lo;0;L;;;;;N;;;;; +3089;HIRAGANA LETTER RA;Lo;0;L;;;;;N;;;;; +308A;HIRAGANA LETTER RI;Lo;0;L;;;;;N;;;;; +308B;HIRAGANA LETTER RU;Lo;0;L;;;;;N;;;;; +308C;HIRAGANA LETTER RE;Lo;0;L;;;;;N;;;;; +308D;HIRAGANA LETTER RO;Lo;0;L;;;;;N;;;;; +308E;HIRAGANA LETTER SMALL WA;Lo;0;L;;;;;N;;;;; +308F;HIRAGANA LETTER WA;Lo;0;L;;;;;N;;;;; +3090;HIRAGANA LETTER WI;Lo;0;L;;;;;N;;;;; +3091;HIRAGANA LETTER WE;Lo;0;L;;;;;N;;;;; +3092;HIRAGANA LETTER WO;Lo;0;L;;;;;N;;;;; +3093;HIRAGANA LETTER N;Lo;0;L;;;;;N;;;;; +3094;HIRAGANA LETTER VU;Lo;0;L;3046 3099;;;;N;;;;; +3095;HIRAGANA LETTER SMALL KA;Lo;0;L;;;;;N;;;;; +3096;HIRAGANA LETTER SMALL KE;Lo;0;L;;;;;N;;;;; +3099;COMBINING KATAKANA-HIRAGANA VOICED SOUND MARK;Mn;8;NSM;;;;;N;NON-SPACING KATAKANA-HIRAGANA VOICED SOUND MARK;;;; +309A;COMBINING KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK;Mn;8;NSM;;;;;N;NON-SPACING KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK;;;; +309B;KATAKANA-HIRAGANA VOICED SOUND MARK;Sk;0;ON; 0020 3099;;;;N;;;;; +309C;KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK;Sk;0;ON; 0020 309A;;;;N;;;;; +309D;HIRAGANA ITERATION MARK;Lm;0;L;;;;;N;;;;; +309E;HIRAGANA VOICED ITERATION MARK;Lm;0;L;309D 3099;;;;N;;;;; +309F;HIRAGANA DIGRAPH YORI;Lo;0;L; 3088 308A;;;;N;;;;; +30A0;KATAKANA-HIRAGANA DOUBLE HYPHEN;Pd;0;ON;;;;;N;;;;; +30A1;KATAKANA LETTER SMALL A;Lo;0;L;;;;;N;;;;; +30A2;KATAKANA LETTER A;Lo;0;L;;;;;N;;;;; +30A3;KATAKANA LETTER SMALL I;Lo;0;L;;;;;N;;;;; +30A4;KATAKANA LETTER I;Lo;0;L;;;;;N;;;;; +30A5;KATAKANA LETTER SMALL U;Lo;0;L;;;;;N;;;;; +30A6;KATAKANA LETTER U;Lo;0;L;;;;;N;;;;; +30A7;KATAKANA LETTER SMALL E;Lo;0;L;;;;;N;;;;; +30A8;KATAKANA LETTER E;Lo;0;L;;;;;N;;;;; +30A9;KATAKANA LETTER SMALL O;Lo;0;L;;;;;N;;;;; +30AA;KATAKANA LETTER O;Lo;0;L;;;;;N;;;;; +30AB;KATAKANA LETTER KA;Lo;0;L;;;;;N;;;;; +30AC;KATAKANA LETTER GA;Lo;0;L;30AB 3099;;;;N;;;;; +30AD;KATAKANA LETTER KI;Lo;0;L;;;;;N;;;;; +30AE;KATAKANA LETTER GI;Lo;0;L;30AD 3099;;;;N;;;;; +30AF;KATAKANA LETTER KU;Lo;0;L;;;;;N;;;;; +30B0;KATAKANA LETTER GU;Lo;0;L;30AF 3099;;;;N;;;;; +30B1;KATAKANA LETTER KE;Lo;0;L;;;;;N;;;;; +30B2;KATAKANA LETTER GE;Lo;0;L;30B1 3099;;;;N;;;;; +30B3;KATAKANA LETTER KO;Lo;0;L;;;;;N;;;;; +30B4;KATAKANA LETTER GO;Lo;0;L;30B3 3099;;;;N;;;;; +30B5;KATAKANA LETTER SA;Lo;0;L;;;;;N;;;;; +30B6;KATAKANA LETTER ZA;Lo;0;L;30B5 3099;;;;N;;;;; +30B7;KATAKANA LETTER SI;Lo;0;L;;;;;N;;;;; +30B8;KATAKANA LETTER ZI;Lo;0;L;30B7 3099;;;;N;;;;; +30B9;KATAKANA LETTER SU;Lo;0;L;;;;;N;;;;; +30BA;KATAKANA LETTER ZU;Lo;0;L;30B9 3099;;;;N;;;;; +30BB;KATAKANA LETTER SE;Lo;0;L;;;;;N;;;;; +30BC;KATAKANA LETTER ZE;Lo;0;L;30BB 3099;;;;N;;;;; +30BD;KATAKANA LETTER SO;Lo;0;L;;;;;N;;;;; +30BE;KATAKANA LETTER ZO;Lo;0;L;30BD 3099;;;;N;;;;; +30BF;KATAKANA LETTER TA;Lo;0;L;;;;;N;;;;; +30C0;KATAKANA LETTER DA;Lo;0;L;30BF 3099;;;;N;;;;; +30C1;KATAKANA LETTER TI;Lo;0;L;;;;;N;;;;; +30C2;KATAKANA LETTER DI;Lo;0;L;30C1 3099;;;;N;;;;; +30C3;KATAKANA LETTER SMALL TU;Lo;0;L;;;;;N;;;;; +30C4;KATAKANA LETTER TU;Lo;0;L;;;;;N;;;;; +30C5;KATAKANA LETTER DU;Lo;0;L;30C4 3099;;;;N;;;;; +30C6;KATAKANA LETTER TE;Lo;0;L;;;;;N;;;;; +30C7;KATAKANA LETTER DE;Lo;0;L;30C6 3099;;;;N;;;;; +30C8;KATAKANA LETTER TO;Lo;0;L;;;;;N;;;;; +30C9;KATAKANA LETTER DO;Lo;0;L;30C8 3099;;;;N;;;;; +30CA;KATAKANA LETTER NA;Lo;0;L;;;;;N;;;;; +30CB;KATAKANA LETTER NI;Lo;0;L;;;;;N;;;;; +30CC;KATAKANA LETTER NU;Lo;0;L;;;;;N;;;;; +30CD;KATAKANA LETTER NE;Lo;0;L;;;;;N;;;;; +30CE;KATAKANA LETTER NO;Lo;0;L;;;;;N;;;;; +30CF;KATAKANA LETTER HA;Lo;0;L;;;;;N;;;;; +30D0;KATAKANA LETTER BA;Lo;0;L;30CF 3099;;;;N;;;;; +30D1;KATAKANA LETTER PA;Lo;0;L;30CF 309A;;;;N;;;;; +30D2;KATAKANA LETTER HI;Lo;0;L;;;;;N;;;;; +30D3;KATAKANA LETTER BI;Lo;0;L;30D2 3099;;;;N;;;;; +30D4;KATAKANA LETTER PI;Lo;0;L;30D2 309A;;;;N;;;;; +30D5;KATAKANA LETTER HU;Lo;0;L;;;;;N;;;;; +30D6;KATAKANA LETTER BU;Lo;0;L;30D5 3099;;;;N;;;;; +30D7;KATAKANA LETTER PU;Lo;0;L;30D5 309A;;;;N;;;;; +30D8;KATAKANA LETTER HE;Lo;0;L;;;;;N;;;;; +30D9;KATAKANA LETTER BE;Lo;0;L;30D8 3099;;;;N;;;;; +30DA;KATAKANA LETTER PE;Lo;0;L;30D8 309A;;;;N;;;;; +30DB;KATAKANA LETTER HO;Lo;0;L;;;;;N;;;;; +30DC;KATAKANA LETTER BO;Lo;0;L;30DB 3099;;;;N;;;;; +30DD;KATAKANA LETTER PO;Lo;0;L;30DB 309A;;;;N;;;;; +30DE;KATAKANA LETTER MA;Lo;0;L;;;;;N;;;;; +30DF;KATAKANA LETTER MI;Lo;0;L;;;;;N;;;;; +30E0;KATAKANA LETTER MU;Lo;0;L;;;;;N;;;;; +30E1;KATAKANA LETTER ME;Lo;0;L;;;;;N;;;;; +30E2;KATAKANA LETTER MO;Lo;0;L;;;;;N;;;;; +30E3;KATAKANA LETTER SMALL YA;Lo;0;L;;;;;N;;;;; +30E4;KATAKANA LETTER YA;Lo;0;L;;;;;N;;;;; +30E5;KATAKANA LETTER SMALL YU;Lo;0;L;;;;;N;;;;; +30E6;KATAKANA LETTER YU;Lo;0;L;;;;;N;;;;; +30E7;KATAKANA LETTER SMALL YO;Lo;0;L;;;;;N;;;;; +30E8;KATAKANA LETTER YO;Lo;0;L;;;;;N;;;;; +30E9;KATAKANA LETTER RA;Lo;0;L;;;;;N;;;;; +30EA;KATAKANA LETTER RI;Lo;0;L;;;;;N;;;;; +30EB;KATAKANA LETTER RU;Lo;0;L;;;;;N;;;;; +30EC;KATAKANA LETTER RE;Lo;0;L;;;;;N;;;;; +30ED;KATAKANA LETTER RO;Lo;0;L;;;;;N;;;;; +30EE;KATAKANA LETTER SMALL WA;Lo;0;L;;;;;N;;;;; +30EF;KATAKANA LETTER WA;Lo;0;L;;;;;N;;;;; +30F0;KATAKANA LETTER WI;Lo;0;L;;;;;N;;;;; +30F1;KATAKANA LETTER WE;Lo;0;L;;;;;N;;;;; +30F2;KATAKANA LETTER WO;Lo;0;L;;;;;N;;;;; +30F3;KATAKANA LETTER N;Lo;0;L;;;;;N;;;;; +30F4;KATAKANA LETTER VU;Lo;0;L;30A6 3099;;;;N;;;;; +30F5;KATAKANA LETTER SMALL KA;Lo;0;L;;;;;N;;;;; +30F6;KATAKANA LETTER SMALL KE;Lo;0;L;;;;;N;;;;; +30F7;KATAKANA LETTER VA;Lo;0;L;30EF 3099;;;;N;;;;; +30F8;KATAKANA LETTER VI;Lo;0;L;30F0 3099;;;;N;;;;; +30F9;KATAKANA LETTER VE;Lo;0;L;30F1 3099;;;;N;;;;; +30FA;KATAKANA LETTER VO;Lo;0;L;30F2 3099;;;;N;;;;; +30FB;KATAKANA MIDDLE DOT;Po;0;ON;;;;;N;;;;; +30FC;KATAKANA-HIRAGANA PROLONGED SOUND MARK;Lm;0;L;;;;;N;;;;; +30FD;KATAKANA ITERATION MARK;Lm;0;L;;;;;N;;;;; +30FE;KATAKANA VOICED ITERATION MARK;Lm;0;L;30FD 3099;;;;N;;;;; +30FF;KATAKANA DIGRAPH KOTO;Lo;0;L; 30B3 30C8;;;;N;;;;; +3105;BOPOMOFO LETTER B;Lo;0;L;;;;;N;;;;; +3106;BOPOMOFO LETTER P;Lo;0;L;;;;;N;;;;; +3107;BOPOMOFO LETTER M;Lo;0;L;;;;;N;;;;; +3108;BOPOMOFO LETTER F;Lo;0;L;;;;;N;;;;; +3109;BOPOMOFO LETTER D;Lo;0;L;;;;;N;;;;; +310A;BOPOMOFO LETTER T;Lo;0;L;;;;;N;;;;; +310B;BOPOMOFO LETTER N;Lo;0;L;;;;;N;;;;; +310C;BOPOMOFO LETTER L;Lo;0;L;;;;;N;;;;; +310D;BOPOMOFO LETTER G;Lo;0;L;;;;;N;;;;; +310E;BOPOMOFO LETTER K;Lo;0;L;;;;;N;;;;; +310F;BOPOMOFO LETTER H;Lo;0;L;;;;;N;;;;; +3110;BOPOMOFO LETTER J;Lo;0;L;;;;;N;;;;; +3111;BOPOMOFO LETTER Q;Lo;0;L;;;;;N;;;;; +3112;BOPOMOFO LETTER X;Lo;0;L;;;;;N;;;;; +3113;BOPOMOFO LETTER ZH;Lo;0;L;;;;;N;;;;; +3114;BOPOMOFO LETTER CH;Lo;0;L;;;;;N;;;;; +3115;BOPOMOFO LETTER SH;Lo;0;L;;;;;N;;;;; +3116;BOPOMOFO LETTER R;Lo;0;L;;;;;N;;;;; +3117;BOPOMOFO LETTER Z;Lo;0;L;;;;;N;;;;; +3118;BOPOMOFO LETTER C;Lo;0;L;;;;;N;;;;; +3119;BOPOMOFO LETTER S;Lo;0;L;;;;;N;;;;; +311A;BOPOMOFO LETTER A;Lo;0;L;;;;;N;;;;; +311B;BOPOMOFO LETTER O;Lo;0;L;;;;;N;;;;; +311C;BOPOMOFO LETTER E;Lo;0;L;;;;;N;;;;; +311D;BOPOMOFO LETTER EH;Lo;0;L;;;;;N;;;;; +311E;BOPOMOFO LETTER AI;Lo;0;L;;;;;N;;;;; +311F;BOPOMOFO LETTER EI;Lo;0;L;;;;;N;;;;; +3120;BOPOMOFO LETTER AU;Lo;0;L;;;;;N;;;;; +3121;BOPOMOFO LETTER OU;Lo;0;L;;;;;N;;;;; +3122;BOPOMOFO LETTER AN;Lo;0;L;;;;;N;;;;; +3123;BOPOMOFO LETTER EN;Lo;0;L;;;;;N;;;;; +3124;BOPOMOFO LETTER ANG;Lo;0;L;;;;;N;;;;; +3125;BOPOMOFO LETTER ENG;Lo;0;L;;;;;N;;;;; +3126;BOPOMOFO LETTER ER;Lo;0;L;;;;;N;;;;; +3127;BOPOMOFO LETTER I;Lo;0;L;;;;;N;;;;; +3128;BOPOMOFO LETTER U;Lo;0;L;;;;;N;;;;; +3129;BOPOMOFO LETTER IU;Lo;0;L;;;;;N;;;;; +312A;BOPOMOFO LETTER V;Lo;0;L;;;;;N;;;;; +312B;BOPOMOFO LETTER NG;Lo;0;L;;;;;N;;;;; +312C;BOPOMOFO LETTER GN;Lo;0;L;;;;;N;;;;; +312D;BOPOMOFO LETTER IH;Lo;0;L;;;;;N;;;;; +312E;BOPOMOFO LETTER O WITH DOT ABOVE;Lo;0;L;;;;;N;;;;; +312F;BOPOMOFO LETTER NN;Lo;0;L;;;;;N;;;;; +3131;HANGUL LETTER KIYEOK;Lo;0;L; 1100;;;;N;HANGUL LETTER GIYEOG;;;; +3132;HANGUL LETTER SSANGKIYEOK;Lo;0;L; 1101;;;;N;HANGUL LETTER SSANG GIYEOG;;;; +3133;HANGUL LETTER KIYEOK-SIOS;Lo;0;L; 11AA;;;;N;HANGUL LETTER GIYEOG SIOS;;;; +3134;HANGUL LETTER NIEUN;Lo;0;L; 1102;;;;N;;;;; +3135;HANGUL LETTER NIEUN-CIEUC;Lo;0;L; 11AC;;;;N;HANGUL LETTER NIEUN JIEUJ;;;; +3136;HANGUL LETTER NIEUN-HIEUH;Lo;0;L; 11AD;;;;N;HANGUL LETTER NIEUN HIEUH;;;; +3137;HANGUL LETTER TIKEUT;Lo;0;L; 1103;;;;N;HANGUL LETTER DIGEUD;;;; +3138;HANGUL LETTER SSANGTIKEUT;Lo;0;L; 1104;;;;N;HANGUL LETTER SSANG DIGEUD;;;; +3139;HANGUL LETTER RIEUL;Lo;0;L; 1105;;;;N;HANGUL LETTER LIEUL;;;; +313A;HANGUL LETTER RIEUL-KIYEOK;Lo;0;L; 11B0;;;;N;HANGUL LETTER LIEUL GIYEOG;;;; +313B;HANGUL LETTER RIEUL-MIEUM;Lo;0;L; 11B1;;;;N;HANGUL LETTER LIEUL MIEUM;;;; +313C;HANGUL LETTER RIEUL-PIEUP;Lo;0;L; 11B2;;;;N;HANGUL LETTER LIEUL BIEUB;;;; +313D;HANGUL LETTER RIEUL-SIOS;Lo;0;L; 11B3;;;;N;HANGUL LETTER LIEUL SIOS;;;; +313E;HANGUL LETTER RIEUL-THIEUTH;Lo;0;L; 11B4;;;;N;HANGUL LETTER LIEUL TIEUT;;;; +313F;HANGUL LETTER RIEUL-PHIEUPH;Lo;0;L; 11B5;;;;N;HANGUL LETTER LIEUL PIEUP;;;; +3140;HANGUL LETTER RIEUL-HIEUH;Lo;0;L; 111A;;;;N;HANGUL LETTER LIEUL HIEUH;;;; +3141;HANGUL LETTER MIEUM;Lo;0;L; 1106;;;;N;;;;; +3142;HANGUL LETTER PIEUP;Lo;0;L; 1107;;;;N;HANGUL LETTER BIEUB;;;; +3143;HANGUL LETTER SSANGPIEUP;Lo;0;L; 1108;;;;N;HANGUL LETTER SSANG BIEUB;;;; +3144;HANGUL LETTER PIEUP-SIOS;Lo;0;L; 1121;;;;N;HANGUL LETTER BIEUB SIOS;;;; +3145;HANGUL LETTER SIOS;Lo;0;L; 1109;;;;N;;;;; +3146;HANGUL LETTER SSANGSIOS;Lo;0;L; 110A;;;;N;HANGUL LETTER SSANG SIOS;;;; +3147;HANGUL LETTER IEUNG;Lo;0;L; 110B;;;;N;;;;; +3148;HANGUL LETTER CIEUC;Lo;0;L; 110C;;;;N;HANGUL LETTER JIEUJ;;;; +3149;HANGUL LETTER SSANGCIEUC;Lo;0;L; 110D;;;;N;HANGUL LETTER SSANG JIEUJ;;;; +314A;HANGUL LETTER CHIEUCH;Lo;0;L; 110E;;;;N;HANGUL LETTER CIEUC;;;; +314B;HANGUL LETTER KHIEUKH;Lo;0;L; 110F;;;;N;HANGUL LETTER KIYEOK;;;; +314C;HANGUL LETTER THIEUTH;Lo;0;L; 1110;;;;N;HANGUL LETTER TIEUT;;;; +314D;HANGUL LETTER PHIEUPH;Lo;0;L; 1111;;;;N;HANGUL LETTER PIEUP;;;; +314E;HANGUL LETTER HIEUH;Lo;0;L; 1112;;;;N;;;;; +314F;HANGUL LETTER A;Lo;0;L; 1161;;;;N;;;;; +3150;HANGUL LETTER AE;Lo;0;L; 1162;;;;N;;;;; +3151;HANGUL LETTER YA;Lo;0;L; 1163;;;;N;;;;; +3152;HANGUL LETTER YAE;Lo;0;L; 1164;;;;N;;;;; +3153;HANGUL LETTER EO;Lo;0;L; 1165;;;;N;;;;; +3154;HANGUL LETTER E;Lo;0;L; 1166;;;;N;;;;; +3155;HANGUL LETTER YEO;Lo;0;L; 1167;;;;N;;;;; +3156;HANGUL LETTER YE;Lo;0;L; 1168;;;;N;;;;; +3157;HANGUL LETTER O;Lo;0;L; 1169;;;;N;;;;; +3158;HANGUL LETTER WA;Lo;0;L; 116A;;;;N;;;;; +3159;HANGUL LETTER WAE;Lo;0;L; 116B;;;;N;;;;; +315A;HANGUL LETTER OE;Lo;0;L; 116C;;;;N;;;;; +315B;HANGUL LETTER YO;Lo;0;L; 116D;;;;N;;;;; +315C;HANGUL LETTER U;Lo;0;L; 116E;;;;N;;;;; +315D;HANGUL LETTER WEO;Lo;0;L; 116F;;;;N;;;;; +315E;HANGUL LETTER WE;Lo;0;L; 1170;;;;N;;;;; +315F;HANGUL LETTER WI;Lo;0;L; 1171;;;;N;;;;; +3160;HANGUL LETTER YU;Lo;0;L; 1172;;;;N;;;;; +3161;HANGUL LETTER EU;Lo;0;L; 1173;;;;N;;;;; +3162;HANGUL LETTER YI;Lo;0;L; 1174;;;;N;;;;; +3163;HANGUL LETTER I;Lo;0;L; 1175;;;;N;;;;; +3164;HANGUL FILLER;Lo;0;L; 1160;;;;N;HANGUL CAE OM;;;; +3165;HANGUL LETTER SSANGNIEUN;Lo;0;L; 1114;;;;N;HANGUL LETTER SSANG NIEUN;;;; +3166;HANGUL LETTER NIEUN-TIKEUT;Lo;0;L; 1115;;;;N;HANGUL LETTER NIEUN DIGEUD;;;; +3167;HANGUL LETTER NIEUN-SIOS;Lo;0;L; 11C7;;;;N;HANGUL LETTER NIEUN SIOS;;;; +3168;HANGUL LETTER NIEUN-PANSIOS;Lo;0;L; 11C8;;;;N;HANGUL LETTER NIEUN BAN CHI EUM;;;; +3169;HANGUL LETTER RIEUL-KIYEOK-SIOS;Lo;0;L; 11CC;;;;N;HANGUL LETTER LIEUL GIYEOG SIOS;;;; +316A;HANGUL LETTER RIEUL-TIKEUT;Lo;0;L; 11CE;;;;N;HANGUL LETTER LIEUL DIGEUD;;;; +316B;HANGUL LETTER RIEUL-PIEUP-SIOS;Lo;0;L; 11D3;;;;N;HANGUL LETTER LIEUL BIEUB SIOS;;;; +316C;HANGUL LETTER RIEUL-PANSIOS;Lo;0;L; 11D7;;;;N;HANGUL LETTER LIEUL BAN CHI EUM;;;; +316D;HANGUL LETTER RIEUL-YEORINHIEUH;Lo;0;L; 11D9;;;;N;HANGUL LETTER LIEUL YEOLIN HIEUH;;;; +316E;HANGUL LETTER MIEUM-PIEUP;Lo;0;L; 111C;;;;N;HANGUL LETTER MIEUM BIEUB;;;; +316F;HANGUL LETTER MIEUM-SIOS;Lo;0;L; 11DD;;;;N;HANGUL LETTER MIEUM SIOS;;;; +3170;HANGUL LETTER MIEUM-PANSIOS;Lo;0;L; 11DF;;;;N;HANGUL LETTER BIEUB BAN CHI EUM;;;; +3171;HANGUL LETTER KAPYEOUNMIEUM;Lo;0;L; 111D;;;;N;HANGUL LETTER MIEUM SUN GYEONG EUM;;;; +3172;HANGUL LETTER PIEUP-KIYEOK;Lo;0;L; 111E;;;;N;HANGUL LETTER BIEUB GIYEOG;;;; +3173;HANGUL LETTER PIEUP-TIKEUT;Lo;0;L; 1120;;;;N;HANGUL LETTER BIEUB DIGEUD;;;; +3174;HANGUL LETTER PIEUP-SIOS-KIYEOK;Lo;0;L; 1122;;;;N;HANGUL LETTER BIEUB SIOS GIYEOG;;;; +3175;HANGUL LETTER PIEUP-SIOS-TIKEUT;Lo;0;L; 1123;;;;N;HANGUL LETTER BIEUB SIOS DIGEUD;;;; +3176;HANGUL LETTER PIEUP-CIEUC;Lo;0;L; 1127;;;;N;HANGUL LETTER BIEUB JIEUJ;;;; +3177;HANGUL LETTER PIEUP-THIEUTH;Lo;0;L; 1129;;;;N;HANGUL LETTER BIEUB TIEUT;;;; +3178;HANGUL LETTER KAPYEOUNPIEUP;Lo;0;L; 112B;;;;N;HANGUL LETTER BIEUB SUN GYEONG EUM;;;; +3179;HANGUL LETTER KAPYEOUNSSANGPIEUP;Lo;0;L; 112C;;;;N;HANGUL LETTER SSANG BIEUB SUN GYEONG EUM;;;; +317A;HANGUL LETTER SIOS-KIYEOK;Lo;0;L; 112D;;;;N;HANGUL LETTER SIOS GIYEOG;;;; +317B;HANGUL LETTER SIOS-NIEUN;Lo;0;L; 112E;;;;N;HANGUL LETTER SIOS NIEUN;;;; +317C;HANGUL LETTER SIOS-TIKEUT;Lo;0;L; 112F;;;;N;HANGUL LETTER SIOS DIGEUD;;;; +317D;HANGUL LETTER SIOS-PIEUP;Lo;0;L; 1132;;;;N;HANGUL LETTER SIOS BIEUB;;;; +317E;HANGUL LETTER SIOS-CIEUC;Lo;0;L; 1136;;;;N;HANGUL LETTER SIOS JIEUJ;;;; +317F;HANGUL LETTER PANSIOS;Lo;0;L; 1140;;;;N;HANGUL LETTER BAN CHI EUM;;;; +3180;HANGUL LETTER SSANGIEUNG;Lo;0;L; 1147;;;;N;HANGUL LETTER SSANG IEUNG;;;; +3181;HANGUL LETTER YESIEUNG;Lo;0;L; 114C;;;;N;HANGUL LETTER NGIEUNG;;;; +3182;HANGUL LETTER YESIEUNG-SIOS;Lo;0;L; 11F1;;;;N;HANGUL LETTER NGIEUNG SIOS;;;; +3183;HANGUL LETTER YESIEUNG-PANSIOS;Lo;0;L; 11F2;;;;N;HANGUL LETTER NGIEUNG BAN CHI EUM;;;; +3184;HANGUL LETTER KAPYEOUNPHIEUPH;Lo;0;L; 1157;;;;N;HANGUL LETTER PIEUP SUN GYEONG EUM;;;; +3185;HANGUL LETTER SSANGHIEUH;Lo;0;L; 1158;;;;N;HANGUL LETTER SSANG HIEUH;;;; +3186;HANGUL LETTER YEORINHIEUH;Lo;0;L; 1159;;;;N;HANGUL LETTER YEOLIN HIEUH;;;; +3187;HANGUL LETTER YO-YA;Lo;0;L; 1184;;;;N;HANGUL LETTER YOYA;;;; +3188;HANGUL LETTER YO-YAE;Lo;0;L; 1185;;;;N;HANGUL LETTER YOYAE;;;; +3189;HANGUL LETTER YO-I;Lo;0;L; 1188;;;;N;HANGUL LETTER YOI;;;; +318A;HANGUL LETTER YU-YEO;Lo;0;L; 1191;;;;N;HANGUL LETTER YUYEO;;;; +318B;HANGUL LETTER YU-YE;Lo;0;L; 1192;;;;N;HANGUL LETTER YUYE;;;; +318C;HANGUL LETTER YU-I;Lo;0;L; 1194;;;;N;HANGUL LETTER YUI;;;; +318D;HANGUL LETTER ARAEA;Lo;0;L; 119E;;;;N;HANGUL LETTER ALAE A;;;; +318E;HANGUL LETTER ARAEAE;Lo;0;L; 11A1;;;;N;HANGUL LETTER ALAE AE;;;; +3190;IDEOGRAPHIC ANNOTATION LINKING MARK;So;0;L;;;;;N;KANBUN TATETEN;;;; +3191;IDEOGRAPHIC ANNOTATION REVERSE MARK;So;0;L;;;;;N;KAERITEN RE;;;; +3192;IDEOGRAPHIC ANNOTATION ONE MARK;No;0;L; 4E00;;;1;N;KAERITEN ITI;;;; +3193;IDEOGRAPHIC ANNOTATION TWO MARK;No;0;L; 4E8C;;;2;N;KAERITEN NI;;;; +3194;IDEOGRAPHIC ANNOTATION THREE MARK;No;0;L; 4E09;;;3;N;KAERITEN SAN;;;; +3195;IDEOGRAPHIC ANNOTATION FOUR MARK;No;0;L; 56DB;;;4;N;KAERITEN SI;;;; +3196;IDEOGRAPHIC ANNOTATION TOP MARK;So;0;L; 4E0A;;;;N;KAERITEN ZYOU;;;; +3197;IDEOGRAPHIC ANNOTATION MIDDLE MARK;So;0;L; 4E2D;;;;N;KAERITEN TYUU;;;; +3198;IDEOGRAPHIC ANNOTATION BOTTOM MARK;So;0;L; 4E0B;;;;N;KAERITEN GE;;;; +3199;IDEOGRAPHIC ANNOTATION FIRST MARK;So;0;L; 7532;;;;N;KAERITEN KOU;;;; +319A;IDEOGRAPHIC ANNOTATION SECOND MARK;So;0;L; 4E59;;;;N;KAERITEN OTU;;;; +319B;IDEOGRAPHIC ANNOTATION THIRD MARK;So;0;L; 4E19;;;;N;KAERITEN HEI;;;; +319C;IDEOGRAPHIC ANNOTATION FOURTH MARK;So;0;L; 4E01;;;;N;KAERITEN TEI;;;; +319D;IDEOGRAPHIC ANNOTATION HEAVEN MARK;So;0;L; 5929;;;;N;KAERITEN TEN;;;; +319E;IDEOGRAPHIC ANNOTATION EARTH MARK;So;0;L; 5730;;;;N;KAERITEN TI;;;; +319F;IDEOGRAPHIC ANNOTATION MAN MARK;So;0;L; 4EBA;;;;N;KAERITEN ZIN;;;; +31A0;BOPOMOFO LETTER BU;Lo;0;L;;;;;N;;;;; +31A1;BOPOMOFO LETTER ZI;Lo;0;L;;;;;N;;;;; +31A2;BOPOMOFO LETTER JI;Lo;0;L;;;;;N;;;;; +31A3;BOPOMOFO LETTER GU;Lo;0;L;;;;;N;;;;; +31A4;BOPOMOFO LETTER EE;Lo;0;L;;;;;N;;;;; +31A5;BOPOMOFO LETTER ENN;Lo;0;L;;;;;N;;;;; +31A6;BOPOMOFO LETTER OO;Lo;0;L;;;;;N;;;;; +31A7;BOPOMOFO LETTER ONN;Lo;0;L;;;;;N;;;;; +31A8;BOPOMOFO LETTER IR;Lo;0;L;;;;;N;;;;; +31A9;BOPOMOFO LETTER ANN;Lo;0;L;;;;;N;;;;; +31AA;BOPOMOFO LETTER INN;Lo;0;L;;;;;N;;;;; +31AB;BOPOMOFO LETTER UNN;Lo;0;L;;;;;N;;;;; +31AC;BOPOMOFO LETTER IM;Lo;0;L;;;;;N;;;;; +31AD;BOPOMOFO LETTER NGG;Lo;0;L;;;;;N;;;;; +31AE;BOPOMOFO LETTER AINN;Lo;0;L;;;;;N;;;;; +31AF;BOPOMOFO LETTER AUNN;Lo;0;L;;;;;N;;;;; +31B0;BOPOMOFO LETTER AM;Lo;0;L;;;;;N;;;;; +31B1;BOPOMOFO LETTER OM;Lo;0;L;;;;;N;;;;; +31B2;BOPOMOFO LETTER ONG;Lo;0;L;;;;;N;;;;; +31B3;BOPOMOFO LETTER INNN;Lo;0;L;;;;;N;;;;; +31B4;BOPOMOFO FINAL LETTER P;Lo;0;L;;;;;N;;;;; +31B5;BOPOMOFO FINAL LETTER T;Lo;0;L;;;;;N;;;;; +31B6;BOPOMOFO FINAL LETTER K;Lo;0;L;;;;;N;;;;; +31B7;BOPOMOFO FINAL LETTER H;Lo;0;L;;;;;N;;;;; +31B8;BOPOMOFO LETTER GH;Lo;0;L;;;;;N;;;;; +31B9;BOPOMOFO LETTER LH;Lo;0;L;;;;;N;;;;; +31BA;BOPOMOFO LETTER ZY;Lo;0;L;;;;;N;;;;; +31C0;CJK STROKE T;So;0;ON;;;;;N;;;;; +31C1;CJK STROKE WG;So;0;ON;;;;;N;;;;; +31C2;CJK STROKE XG;So;0;ON;;;;;N;;;;; +31C3;CJK STROKE BXG;So;0;ON;;;;;N;;;;; +31C4;CJK STROKE SW;So;0;ON;;;;;N;;;;; +31C5;CJK STROKE HZZ;So;0;ON;;;;;N;;;;; +31C6;CJK STROKE HZG;So;0;ON;;;;;N;;;;; +31C7;CJK STROKE HP;So;0;ON;;;;;N;;;;; +31C8;CJK STROKE HZWG;So;0;ON;;;;;N;;;;; +31C9;CJK STROKE SZWG;So;0;ON;;;;;N;;;;; +31CA;CJK STROKE HZT;So;0;ON;;;;;N;;;;; +31CB;CJK STROKE HZZP;So;0;ON;;;;;N;;;;; +31CC;CJK STROKE HPWG;So;0;ON;;;;;N;;;;; +31CD;CJK STROKE HZW;So;0;ON;;;;;N;;;;; +31CE;CJK STROKE HZZZ;So;0;ON;;;;;N;;;;; +31CF;CJK STROKE N;So;0;ON;;;;;N;;;;; +31D0;CJK STROKE H;So;0;ON;;;;;N;;;;; +31D1;CJK STROKE S;So;0;ON;;;;;N;;;;; +31D2;CJK STROKE P;So;0;ON;;;;;N;;;;; +31D3;CJK STROKE SP;So;0;ON;;;;;N;;;;; +31D4;CJK STROKE D;So;0;ON;;;;;N;;;;; +31D5;CJK STROKE HZ;So;0;ON;;;;;N;;;;; +31D6;CJK STROKE HG;So;0;ON;;;;;N;;;;; +31D7;CJK STROKE SZ;So;0;ON;;;;;N;;;;; +31D8;CJK STROKE SWZ;So;0;ON;;;;;N;;;;; +31D9;CJK STROKE ST;So;0;ON;;;;;N;;;;; +31DA;CJK STROKE SG;So;0;ON;;;;;N;;;;; +31DB;CJK STROKE PD;So;0;ON;;;;;N;;;;; +31DC;CJK STROKE PZ;So;0;ON;;;;;N;;;;; +31DD;CJK STROKE TN;So;0;ON;;;;;N;;;;; +31DE;CJK STROKE SZZ;So;0;ON;;;;;N;;;;; +31DF;CJK STROKE SWG;So;0;ON;;;;;N;;;;; +31E0;CJK STROKE HXWG;So;0;ON;;;;;N;;;;; +31E1;CJK STROKE HZZZG;So;0;ON;;;;;N;;;;; +31E2;CJK STROKE PG;So;0;ON;;;;;N;;;;; +31E3;CJK STROKE Q;So;0;ON;;;;;N;;;;; +31F0;KATAKANA LETTER SMALL KU;Lo;0;L;;;;;N;;;;; +31F1;KATAKANA LETTER SMALL SI;Lo;0;L;;;;;N;;;;; +31F2;KATAKANA LETTER SMALL SU;Lo;0;L;;;;;N;;;;; +31F3;KATAKANA LETTER SMALL TO;Lo;0;L;;;;;N;;;;; +31F4;KATAKANA LETTER SMALL NU;Lo;0;L;;;;;N;;;;; +31F5;KATAKANA LETTER SMALL HA;Lo;0;L;;;;;N;;;;; +31F6;KATAKANA LETTER SMALL HI;Lo;0;L;;;;;N;;;;; +31F7;KATAKANA LETTER SMALL HU;Lo;0;L;;;;;N;;;;; +31F8;KATAKANA LETTER SMALL HE;Lo;0;L;;;;;N;;;;; +31F9;KATAKANA LETTER SMALL HO;Lo;0;L;;;;;N;;;;; +31FA;KATAKANA LETTER SMALL MU;Lo;0;L;;;;;N;;;;; +31FB;KATAKANA LETTER SMALL RA;Lo;0;L;;;;;N;;;;; +31FC;KATAKANA LETTER SMALL RI;Lo;0;L;;;;;N;;;;; +31FD;KATAKANA LETTER SMALL RU;Lo;0;L;;;;;N;;;;; +31FE;KATAKANA LETTER SMALL RE;Lo;0;L;;;;;N;;;;; +31FF;KATAKANA LETTER SMALL RO;Lo;0;L;;;;;N;;;;; +3200;PARENTHESIZED HANGUL KIYEOK;So;0;L; 0028 1100 0029;;;;N;PARENTHESIZED HANGUL GIYEOG;;;; +3201;PARENTHESIZED HANGUL NIEUN;So;0;L; 0028 1102 0029;;;;N;;;;; +3202;PARENTHESIZED HANGUL TIKEUT;So;0;L; 0028 1103 0029;;;;N;PARENTHESIZED HANGUL DIGEUD;;;; +3203;PARENTHESIZED HANGUL RIEUL;So;0;L; 0028 1105 0029;;;;N;PARENTHESIZED HANGUL LIEUL;;;; +3204;PARENTHESIZED HANGUL MIEUM;So;0;L; 0028 1106 0029;;;;N;;;;; +3205;PARENTHESIZED HANGUL PIEUP;So;0;L; 0028 1107 0029;;;;N;PARENTHESIZED HANGUL BIEUB;;;; +3206;PARENTHESIZED HANGUL SIOS;So;0;L; 0028 1109 0029;;;;N;;;;; +3207;PARENTHESIZED HANGUL IEUNG;So;0;L; 0028 110B 0029;;;;N;;;;; +3208;PARENTHESIZED HANGUL CIEUC;So;0;L; 0028 110C 0029;;;;N;PARENTHESIZED HANGUL JIEUJ;;;; +3209;PARENTHESIZED HANGUL CHIEUCH;So;0;L; 0028 110E 0029;;;;N;PARENTHESIZED HANGUL CIEUC;;;; +320A;PARENTHESIZED HANGUL KHIEUKH;So;0;L; 0028 110F 0029;;;;N;PARENTHESIZED HANGUL KIYEOK;;;; +320B;PARENTHESIZED HANGUL THIEUTH;So;0;L; 0028 1110 0029;;;;N;PARENTHESIZED HANGUL TIEUT;;;; +320C;PARENTHESIZED HANGUL PHIEUPH;So;0;L; 0028 1111 0029;;;;N;PARENTHESIZED HANGUL PIEUP;;;; +320D;PARENTHESIZED HANGUL HIEUH;So;0;L; 0028 1112 0029;;;;N;;;;; +320E;PARENTHESIZED HANGUL KIYEOK A;So;0;L; 0028 1100 1161 0029;;;;N;PARENTHESIZED HANGUL GA;;;; +320F;PARENTHESIZED HANGUL NIEUN A;So;0;L; 0028 1102 1161 0029;;;;N;PARENTHESIZED HANGUL NA;;;; +3210;PARENTHESIZED HANGUL TIKEUT A;So;0;L; 0028 1103 1161 0029;;;;N;PARENTHESIZED HANGUL DA;;;; +3211;PARENTHESIZED HANGUL RIEUL A;So;0;L; 0028 1105 1161 0029;;;;N;PARENTHESIZED HANGUL LA;;;; +3212;PARENTHESIZED HANGUL MIEUM A;So;0;L; 0028 1106 1161 0029;;;;N;PARENTHESIZED HANGUL MA;;;; +3213;PARENTHESIZED HANGUL PIEUP A;So;0;L; 0028 1107 1161 0029;;;;N;PARENTHESIZED HANGUL BA;;;; +3214;PARENTHESIZED HANGUL SIOS A;So;0;L; 0028 1109 1161 0029;;;;N;PARENTHESIZED HANGUL SA;;;; +3215;PARENTHESIZED HANGUL IEUNG A;So;0;L; 0028 110B 1161 0029;;;;N;PARENTHESIZED HANGUL A;;;; +3216;PARENTHESIZED HANGUL CIEUC A;So;0;L; 0028 110C 1161 0029;;;;N;PARENTHESIZED HANGUL JA;;;; +3217;PARENTHESIZED HANGUL CHIEUCH A;So;0;L; 0028 110E 1161 0029;;;;N;PARENTHESIZED HANGUL CA;;;; +3218;PARENTHESIZED HANGUL KHIEUKH A;So;0;L; 0028 110F 1161 0029;;;;N;PARENTHESIZED HANGUL KA;;;; +3219;PARENTHESIZED HANGUL THIEUTH A;So;0;L; 0028 1110 1161 0029;;;;N;PARENTHESIZED HANGUL TA;;;; +321A;PARENTHESIZED HANGUL PHIEUPH A;So;0;L; 0028 1111 1161 0029;;;;N;PARENTHESIZED HANGUL PA;;;; +321B;PARENTHESIZED HANGUL HIEUH A;So;0;L; 0028 1112 1161 0029;;;;N;PARENTHESIZED HANGUL HA;;;; +321C;PARENTHESIZED HANGUL CIEUC U;So;0;L; 0028 110C 116E 0029;;;;N;PARENTHESIZED HANGUL JU;;;; +321D;PARENTHESIZED KOREAN CHARACTER OJEON;So;0;ON; 0028 110B 1169 110C 1165 11AB 0029;;;;N;;;;; +321E;PARENTHESIZED KOREAN CHARACTER O HU;So;0;ON; 0028 110B 1169 1112 116E 0029;;;;N;;;;; +3220;PARENTHESIZED IDEOGRAPH ONE;No;0;L; 0028 4E00 0029;;;1;N;;;;; +3221;PARENTHESIZED IDEOGRAPH TWO;No;0;L; 0028 4E8C 0029;;;2;N;;;;; +3222;PARENTHESIZED IDEOGRAPH THREE;No;0;L; 0028 4E09 0029;;;3;N;;;;; +3223;PARENTHESIZED IDEOGRAPH FOUR;No;0;L; 0028 56DB 0029;;;4;N;;;;; +3224;PARENTHESIZED IDEOGRAPH FIVE;No;0;L; 0028 4E94 0029;;;5;N;;;;; +3225;PARENTHESIZED IDEOGRAPH SIX;No;0;L; 0028 516D 0029;;;6;N;;;;; +3226;PARENTHESIZED IDEOGRAPH SEVEN;No;0;L; 0028 4E03 0029;;;7;N;;;;; +3227;PARENTHESIZED IDEOGRAPH EIGHT;No;0;L; 0028 516B 0029;;;8;N;;;;; +3228;PARENTHESIZED IDEOGRAPH NINE;No;0;L; 0028 4E5D 0029;;;9;N;;;;; +3229;PARENTHESIZED IDEOGRAPH TEN;No;0;L; 0028 5341 0029;;;10;N;;;;; +322A;PARENTHESIZED IDEOGRAPH MOON;So;0;L; 0028 6708 0029;;;;N;;;;; +322B;PARENTHESIZED IDEOGRAPH FIRE;So;0;L; 0028 706B 0029;;;;N;;;;; +322C;PARENTHESIZED IDEOGRAPH WATER;So;0;L; 0028 6C34 0029;;;;N;;;;; +322D;PARENTHESIZED IDEOGRAPH WOOD;So;0;L; 0028 6728 0029;;;;N;;;;; +322E;PARENTHESIZED IDEOGRAPH METAL;So;0;L; 0028 91D1 0029;;;;N;;;;; +322F;PARENTHESIZED IDEOGRAPH EARTH;So;0;L; 0028 571F 0029;;;;N;;;;; +3230;PARENTHESIZED IDEOGRAPH SUN;So;0;L; 0028 65E5 0029;;;;N;;;;; +3231;PARENTHESIZED IDEOGRAPH STOCK;So;0;L; 0028 682A 0029;;;;N;;;;; +3232;PARENTHESIZED IDEOGRAPH HAVE;So;0;L; 0028 6709 0029;;;;N;;;;; +3233;PARENTHESIZED IDEOGRAPH SOCIETY;So;0;L; 0028 793E 0029;;;;N;;;;; +3234;PARENTHESIZED IDEOGRAPH NAME;So;0;L; 0028 540D 0029;;;;N;;;;; +3235;PARENTHESIZED IDEOGRAPH SPECIAL;So;0;L; 0028 7279 0029;;;;N;;;;; +3236;PARENTHESIZED IDEOGRAPH FINANCIAL;So;0;L; 0028 8CA1 0029;;;;N;;;;; +3237;PARENTHESIZED IDEOGRAPH CONGRATULATION;So;0;L; 0028 795D 0029;;;;N;;;;; +3238;PARENTHESIZED IDEOGRAPH LABOR;So;0;L; 0028 52B4 0029;;;;N;;;;; +3239;PARENTHESIZED IDEOGRAPH REPRESENT;So;0;L; 0028 4EE3 0029;;;;N;;;;; +323A;PARENTHESIZED IDEOGRAPH CALL;So;0;L; 0028 547C 0029;;;;N;;;;; +323B;PARENTHESIZED IDEOGRAPH STUDY;So;0;L; 0028 5B66 0029;;;;N;;;;; +323C;PARENTHESIZED IDEOGRAPH SUPERVISE;So;0;L; 0028 76E3 0029;;;;N;;;;; +323D;PARENTHESIZED IDEOGRAPH ENTERPRISE;So;0;L; 0028 4F01 0029;;;;N;;;;; +323E;PARENTHESIZED IDEOGRAPH RESOURCE;So;0;L; 0028 8CC7 0029;;;;N;;;;; +323F;PARENTHESIZED IDEOGRAPH ALLIANCE;So;0;L; 0028 5354 0029;;;;N;;;;; +3240;PARENTHESIZED IDEOGRAPH FESTIVAL;So;0;L; 0028 796D 0029;;;;N;;;;; +3241;PARENTHESIZED IDEOGRAPH REST;So;0;L; 0028 4F11 0029;;;;N;;;;; +3242;PARENTHESIZED IDEOGRAPH SELF;So;0;L; 0028 81EA 0029;;;;N;;;;; +3243;PARENTHESIZED IDEOGRAPH REACH;So;0;L; 0028 81F3 0029;;;;N;;;;; +3244;CIRCLED IDEOGRAPH QUESTION;So;0;L; 554F;;;;N;;;;; +3245;CIRCLED IDEOGRAPH KINDERGARTEN;So;0;L; 5E7C;;;;N;;;;; +3246;CIRCLED IDEOGRAPH SCHOOL;So;0;L; 6587;;;;N;;;;; +3247;CIRCLED IDEOGRAPH KOTO;So;0;L; 7B8F;;;;N;;;;; +3248;CIRCLED NUMBER TEN ON BLACK SQUARE;No;0;L;;;;10;N;;;;; +3249;CIRCLED NUMBER TWENTY ON BLACK SQUARE;No;0;L;;;;20;N;;;;; +324A;CIRCLED NUMBER THIRTY ON BLACK SQUARE;No;0;L;;;;30;N;;;;; +324B;CIRCLED NUMBER FORTY ON BLACK SQUARE;No;0;L;;;;40;N;;;;; +324C;CIRCLED NUMBER FIFTY ON BLACK SQUARE;No;0;L;;;;50;N;;;;; +324D;CIRCLED NUMBER SIXTY ON BLACK SQUARE;No;0;L;;;;60;N;;;;; +324E;CIRCLED NUMBER SEVENTY ON BLACK SQUARE;No;0;L;;;;70;N;;;;; +324F;CIRCLED NUMBER EIGHTY ON BLACK SQUARE;No;0;L;;;;80;N;;;;; +3250;PARTNERSHIP SIGN;So;0;ON; 0050 0054 0045;;;;N;;;;; +3251;CIRCLED NUMBER TWENTY ONE;No;0;ON; 0032 0031;;;21;N;;;;; +3252;CIRCLED NUMBER TWENTY TWO;No;0;ON; 0032 0032;;;22;N;;;;; +3253;CIRCLED NUMBER TWENTY THREE;No;0;ON; 0032 0033;;;23;N;;;;; +3254;CIRCLED NUMBER TWENTY FOUR;No;0;ON; 0032 0034;;;24;N;;;;; +3255;CIRCLED NUMBER TWENTY FIVE;No;0;ON; 0032 0035;;;25;N;;;;; +3256;CIRCLED NUMBER TWENTY SIX;No;0;ON; 0032 0036;;;26;N;;;;; +3257;CIRCLED NUMBER TWENTY SEVEN;No;0;ON; 0032 0037;;;27;N;;;;; +3258;CIRCLED NUMBER TWENTY EIGHT;No;0;ON; 0032 0038;;;28;N;;;;; +3259;CIRCLED NUMBER TWENTY NINE;No;0;ON; 0032 0039;;;29;N;;;;; +325A;CIRCLED NUMBER THIRTY;No;0;ON; 0033 0030;;;30;N;;;;; +325B;CIRCLED NUMBER THIRTY ONE;No;0;ON; 0033 0031;;;31;N;;;;; +325C;CIRCLED NUMBER THIRTY TWO;No;0;ON; 0033 0032;;;32;N;;;;; +325D;CIRCLED NUMBER THIRTY THREE;No;0;ON; 0033 0033;;;33;N;;;;; +325E;CIRCLED NUMBER THIRTY FOUR;No;0;ON; 0033 0034;;;34;N;;;;; +325F;CIRCLED NUMBER THIRTY FIVE;No;0;ON; 0033 0035;;;35;N;;;;; +3260;CIRCLED HANGUL KIYEOK;So;0;L; 1100;;;;N;CIRCLED HANGUL GIYEOG;;;; +3261;CIRCLED HANGUL NIEUN;So;0;L; 1102;;;;N;;;;; +3262;CIRCLED HANGUL TIKEUT;So;0;L; 1103;;;;N;CIRCLED HANGUL DIGEUD;;;; +3263;CIRCLED HANGUL RIEUL;So;0;L; 1105;;;;N;CIRCLED HANGUL LIEUL;;;; +3264;CIRCLED HANGUL MIEUM;So;0;L; 1106;;;;N;;;;; +3265;CIRCLED HANGUL PIEUP;So;0;L; 1107;;;;N;CIRCLED HANGUL BIEUB;;;; +3266;CIRCLED HANGUL SIOS;So;0;L; 1109;;;;N;;;;; +3267;CIRCLED HANGUL IEUNG;So;0;L; 110B;;;;N;;;;; +3268;CIRCLED HANGUL CIEUC;So;0;L; 110C;;;;N;CIRCLED HANGUL JIEUJ;;;; +3269;CIRCLED HANGUL CHIEUCH;So;0;L; 110E;;;;N;CIRCLED HANGUL CIEUC;;;; +326A;CIRCLED HANGUL KHIEUKH;So;0;L; 110F;;;;N;CIRCLED HANGUL KIYEOK;;;; +326B;CIRCLED HANGUL THIEUTH;So;0;L; 1110;;;;N;CIRCLED HANGUL TIEUT;;;; +326C;CIRCLED HANGUL PHIEUPH;So;0;L; 1111;;;;N;CIRCLED HANGUL PIEUP;;;; +326D;CIRCLED HANGUL HIEUH;So;0;L; 1112;;;;N;;;;; +326E;CIRCLED HANGUL KIYEOK A;So;0;L; 1100 1161;;;;N;CIRCLED HANGUL GA;;;; +326F;CIRCLED HANGUL NIEUN A;So;0;L; 1102 1161;;;;N;CIRCLED HANGUL NA;;;; +3270;CIRCLED HANGUL TIKEUT A;So;0;L; 1103 1161;;;;N;CIRCLED HANGUL DA;;;; +3271;CIRCLED HANGUL RIEUL A;So;0;L; 1105 1161;;;;N;CIRCLED HANGUL LA;;;; +3272;CIRCLED HANGUL MIEUM A;So;0;L; 1106 1161;;;;N;CIRCLED HANGUL MA;;;; +3273;CIRCLED HANGUL PIEUP A;So;0;L; 1107 1161;;;;N;CIRCLED HANGUL BA;;;; +3274;CIRCLED HANGUL SIOS A;So;0;L; 1109 1161;;;;N;CIRCLED HANGUL SA;;;; +3275;CIRCLED HANGUL IEUNG A;So;0;L; 110B 1161;;;;N;CIRCLED HANGUL A;;;; +3276;CIRCLED HANGUL CIEUC A;So;0;L; 110C 1161;;;;N;CIRCLED HANGUL JA;;;; +3277;CIRCLED HANGUL CHIEUCH A;So;0;L; 110E 1161;;;;N;CIRCLED HANGUL CA;;;; +3278;CIRCLED HANGUL KHIEUKH A;So;0;L; 110F 1161;;;;N;CIRCLED HANGUL KA;;;; +3279;CIRCLED HANGUL THIEUTH A;So;0;L; 1110 1161;;;;N;CIRCLED HANGUL TA;;;; +327A;CIRCLED HANGUL PHIEUPH A;So;0;L; 1111 1161;;;;N;CIRCLED HANGUL PA;;;; +327B;CIRCLED HANGUL HIEUH A;So;0;L; 1112 1161;;;;N;CIRCLED HANGUL HA;;;; +327C;CIRCLED KOREAN CHARACTER CHAMKO;So;0;ON; 110E 1161 11B7 1100 1169;;;;N;;;;; +327D;CIRCLED KOREAN CHARACTER JUEUI;So;0;ON; 110C 116E 110B 1174;;;;N;;;;; +327E;CIRCLED HANGUL IEUNG U;So;0;ON; 110B 116E;;;;N;;;;; +327F;KOREAN STANDARD SYMBOL;So;0;L;;;;;N;;;;; +3280;CIRCLED IDEOGRAPH ONE;No;0;L; 4E00;;;1;N;;;;; +3281;CIRCLED IDEOGRAPH TWO;No;0;L; 4E8C;;;2;N;;;;; +3282;CIRCLED IDEOGRAPH THREE;No;0;L; 4E09;;;3;N;;;;; +3283;CIRCLED IDEOGRAPH FOUR;No;0;L; 56DB;;;4;N;;;;; +3284;CIRCLED IDEOGRAPH FIVE;No;0;L; 4E94;;;5;N;;;;; +3285;CIRCLED IDEOGRAPH SIX;No;0;L; 516D;;;6;N;;;;; +3286;CIRCLED IDEOGRAPH SEVEN;No;0;L; 4E03;;;7;N;;;;; +3287;CIRCLED IDEOGRAPH EIGHT;No;0;L; 516B;;;8;N;;;;; +3288;CIRCLED IDEOGRAPH NINE;No;0;L; 4E5D;;;9;N;;;;; +3289;CIRCLED IDEOGRAPH TEN;No;0;L; 5341;;;10;N;;;;; +328A;CIRCLED IDEOGRAPH MOON;So;0;L; 6708;;;;N;;;;; +328B;CIRCLED IDEOGRAPH FIRE;So;0;L; 706B;;;;N;;;;; +328C;CIRCLED IDEOGRAPH WATER;So;0;L; 6C34;;;;N;;;;; +328D;CIRCLED IDEOGRAPH WOOD;So;0;L; 6728;;;;N;;;;; +328E;CIRCLED IDEOGRAPH METAL;So;0;L; 91D1;;;;N;;;;; +328F;CIRCLED IDEOGRAPH EARTH;So;0;L; 571F;;;;N;;;;; +3290;CIRCLED IDEOGRAPH SUN;So;0;L; 65E5;;;;N;;;;; +3291;CIRCLED IDEOGRAPH STOCK;So;0;L; 682A;;;;N;;;;; +3292;CIRCLED IDEOGRAPH HAVE;So;0;L; 6709;;;;N;;;;; +3293;CIRCLED IDEOGRAPH SOCIETY;So;0;L; 793E;;;;N;;;;; +3294;CIRCLED IDEOGRAPH NAME;So;0;L; 540D;;;;N;;;;; +3295;CIRCLED IDEOGRAPH SPECIAL;So;0;L; 7279;;;;N;;;;; +3296;CIRCLED IDEOGRAPH FINANCIAL;So;0;L; 8CA1;;;;N;;;;; +3297;CIRCLED IDEOGRAPH CONGRATULATION;So;0;L; 795D;;;;N;;;;; +3298;CIRCLED IDEOGRAPH LABOR;So;0;L; 52B4;;;;N;;;;; +3299;CIRCLED IDEOGRAPH SECRET;So;0;L; 79D8;;;;N;;;;; +329A;CIRCLED IDEOGRAPH MALE;So;0;L; 7537;;;;N;;;;; +329B;CIRCLED IDEOGRAPH FEMALE;So;0;L; 5973;;;;N;;;;; +329C;CIRCLED IDEOGRAPH SUITABLE;So;0;L; 9069;;;;N;;;;; +329D;CIRCLED IDEOGRAPH EXCELLENT;So;0;L; 512A;;;;N;;;;; +329E;CIRCLED IDEOGRAPH PRINT;So;0;L; 5370;;;;N;;;;; +329F;CIRCLED IDEOGRAPH ATTENTION;So;0;L; 6CE8;;;;N;;;;; +32A0;CIRCLED IDEOGRAPH ITEM;So;0;L; 9805;;;;N;;;;; +32A1;CIRCLED IDEOGRAPH REST;So;0;L; 4F11;;;;N;;;;; +32A2;CIRCLED IDEOGRAPH COPY;So;0;L; 5199;;;;N;;;;; +32A3;CIRCLED IDEOGRAPH CORRECT;So;0;L; 6B63;;;;N;;;;; +32A4;CIRCLED IDEOGRAPH HIGH;So;0;L; 4E0A;;;;N;;;;; +32A5;CIRCLED IDEOGRAPH CENTRE;So;0;L; 4E2D;;;;N;CIRCLED IDEOGRAPH CENTER;;;; +32A6;CIRCLED IDEOGRAPH LOW;So;0;L; 4E0B;;;;N;;;;; +32A7;CIRCLED IDEOGRAPH LEFT;So;0;L; 5DE6;;;;N;;;;; +32A8;CIRCLED IDEOGRAPH RIGHT;So;0;L; 53F3;;;;N;;;;; +32A9;CIRCLED IDEOGRAPH MEDICINE;So;0;L; 533B;;;;N;;;;; +32AA;CIRCLED IDEOGRAPH RELIGION;So;0;L; 5B97;;;;N;;;;; +32AB;CIRCLED IDEOGRAPH STUDY;So;0;L; 5B66;;;;N;;;;; +32AC;CIRCLED IDEOGRAPH SUPERVISE;So;0;L; 76E3;;;;N;;;;; +32AD;CIRCLED IDEOGRAPH ENTERPRISE;So;0;L; 4F01;;;;N;;;;; +32AE;CIRCLED IDEOGRAPH RESOURCE;So;0;L; 8CC7;;;;N;;;;; +32AF;CIRCLED IDEOGRAPH ALLIANCE;So;0;L; 5354;;;;N;;;;; +32B0;CIRCLED IDEOGRAPH NIGHT;So;0;L; 591C;;;;N;;;;; +32B1;CIRCLED NUMBER THIRTY SIX;No;0;ON; 0033 0036;;;36;N;;;;; +32B2;CIRCLED NUMBER THIRTY SEVEN;No;0;ON; 0033 0037;;;37;N;;;;; +32B3;CIRCLED NUMBER THIRTY EIGHT;No;0;ON; 0033 0038;;;38;N;;;;; +32B4;CIRCLED NUMBER THIRTY NINE;No;0;ON; 0033 0039;;;39;N;;;;; +32B5;CIRCLED NUMBER FORTY;No;0;ON; 0034 0030;;;40;N;;;;; +32B6;CIRCLED NUMBER FORTY ONE;No;0;ON; 0034 0031;;;41;N;;;;; +32B7;CIRCLED NUMBER FORTY TWO;No;0;ON; 0034 0032;;;42;N;;;;; +32B8;CIRCLED NUMBER FORTY THREE;No;0;ON; 0034 0033;;;43;N;;;;; +32B9;CIRCLED NUMBER FORTY FOUR;No;0;ON; 0034 0034;;;44;N;;;;; +32BA;CIRCLED NUMBER FORTY FIVE;No;0;ON; 0034 0035;;;45;N;;;;; +32BB;CIRCLED NUMBER FORTY SIX;No;0;ON; 0034 0036;;;46;N;;;;; +32BC;CIRCLED NUMBER FORTY SEVEN;No;0;ON; 0034 0037;;;47;N;;;;; +32BD;CIRCLED NUMBER FORTY EIGHT;No;0;ON; 0034 0038;;;48;N;;;;; +32BE;CIRCLED NUMBER FORTY NINE;No;0;ON; 0034 0039;;;49;N;;;;; +32BF;CIRCLED NUMBER FIFTY;No;0;ON; 0035 0030;;;50;N;;;;; +32C0;IDEOGRAPHIC TELEGRAPH SYMBOL FOR JANUARY;So;0;L; 0031 6708;;;;N;;;;; +32C1;IDEOGRAPHIC TELEGRAPH SYMBOL FOR FEBRUARY;So;0;L; 0032 6708;;;;N;;;;; +32C2;IDEOGRAPHIC TELEGRAPH SYMBOL FOR MARCH;So;0;L; 0033 6708;;;;N;;;;; +32C3;IDEOGRAPHIC TELEGRAPH SYMBOL FOR APRIL;So;0;L; 0034 6708;;;;N;;;;; +32C4;IDEOGRAPHIC TELEGRAPH SYMBOL FOR MAY;So;0;L; 0035 6708;;;;N;;;;; +32C5;IDEOGRAPHIC TELEGRAPH SYMBOL FOR JUNE;So;0;L; 0036 6708;;;;N;;;;; +32C6;IDEOGRAPHIC TELEGRAPH SYMBOL FOR JULY;So;0;L; 0037 6708;;;;N;;;;; +32C7;IDEOGRAPHIC TELEGRAPH SYMBOL FOR AUGUST;So;0;L; 0038 6708;;;;N;;;;; +32C8;IDEOGRAPHIC TELEGRAPH SYMBOL FOR SEPTEMBER;So;0;L; 0039 6708;;;;N;;;;; +32C9;IDEOGRAPHIC TELEGRAPH SYMBOL FOR OCTOBER;So;0;L; 0031 0030 6708;;;;N;;;;; +32CA;IDEOGRAPHIC TELEGRAPH SYMBOL FOR NOVEMBER;So;0;L; 0031 0031 6708;;;;N;;;;; +32CB;IDEOGRAPHIC TELEGRAPH SYMBOL FOR DECEMBER;So;0;L; 0031 0032 6708;;;;N;;;;; +32CC;SQUARE HG;So;0;ON; 0048 0067;;;;N;;;;; +32CD;SQUARE ERG;So;0;ON; 0065 0072 0067;;;;N;;;;; +32CE;SQUARE EV;So;0;ON; 0065 0056;;;;N;;;;; +32CF;LIMITED LIABILITY SIGN;So;0;ON; 004C 0054 0044;;;;N;;;;; +32D0;CIRCLED KATAKANA A;So;0;L; 30A2;;;;N;;;;; +32D1;CIRCLED KATAKANA I;So;0;L; 30A4;;;;N;;;;; +32D2;CIRCLED KATAKANA U;So;0;L; 30A6;;;;N;;;;; +32D3;CIRCLED KATAKANA E;So;0;L; 30A8;;;;N;;;;; +32D4;CIRCLED KATAKANA O;So;0;L; 30AA;;;;N;;;;; +32D5;CIRCLED KATAKANA KA;So;0;L; 30AB;;;;N;;;;; +32D6;CIRCLED KATAKANA KI;So;0;L; 30AD;;;;N;;;;; +32D7;CIRCLED KATAKANA KU;So;0;L; 30AF;;;;N;;;;; +32D8;CIRCLED KATAKANA KE;So;0;L; 30B1;;;;N;;;;; +32D9;CIRCLED KATAKANA KO;So;0;L; 30B3;;;;N;;;;; +32DA;CIRCLED KATAKANA SA;So;0;L; 30B5;;;;N;;;;; +32DB;CIRCLED KATAKANA SI;So;0;L; 30B7;;;;N;;;;; +32DC;CIRCLED KATAKANA SU;So;0;L; 30B9;;;;N;;;;; +32DD;CIRCLED KATAKANA SE;So;0;L; 30BB;;;;N;;;;; +32DE;CIRCLED KATAKANA SO;So;0;L; 30BD;;;;N;;;;; +32DF;CIRCLED KATAKANA TA;So;0;L; 30BF;;;;N;;;;; +32E0;CIRCLED KATAKANA TI;So;0;L; 30C1;;;;N;;;;; +32E1;CIRCLED KATAKANA TU;So;0;L; 30C4;;;;N;;;;; +32E2;CIRCLED KATAKANA TE;So;0;L; 30C6;;;;N;;;;; +32E3;CIRCLED KATAKANA TO;So;0;L; 30C8;;;;N;;;;; +32E4;CIRCLED KATAKANA NA;So;0;L; 30CA;;;;N;;;;; +32E5;CIRCLED KATAKANA NI;So;0;L; 30CB;;;;N;;;;; +32E6;CIRCLED KATAKANA NU;So;0;L; 30CC;;;;N;;;;; +32E7;CIRCLED KATAKANA NE;So;0;L; 30CD;;;;N;;;;; +32E8;CIRCLED KATAKANA NO;So;0;L; 30CE;;;;N;;;;; +32E9;CIRCLED KATAKANA HA;So;0;L; 30CF;;;;N;;;;; +32EA;CIRCLED KATAKANA HI;So;0;L; 30D2;;;;N;;;;; +32EB;CIRCLED KATAKANA HU;So;0;L; 30D5;;;;N;;;;; +32EC;CIRCLED KATAKANA HE;So;0;L; 30D8;;;;N;;;;; +32ED;CIRCLED KATAKANA HO;So;0;L; 30DB;;;;N;;;;; +32EE;CIRCLED KATAKANA MA;So;0;L; 30DE;;;;N;;;;; +32EF;CIRCLED KATAKANA MI;So;0;L; 30DF;;;;N;;;;; +32F0;CIRCLED KATAKANA MU;So;0;L; 30E0;;;;N;;;;; +32F1;CIRCLED KATAKANA ME;So;0;L; 30E1;;;;N;;;;; +32F2;CIRCLED KATAKANA MO;So;0;L; 30E2;;;;N;;;;; +32F3;CIRCLED KATAKANA YA;So;0;L; 30E4;;;;N;;;;; +32F4;CIRCLED KATAKANA YU;So;0;L; 30E6;;;;N;;;;; +32F5;CIRCLED KATAKANA YO;So;0;L; 30E8;;;;N;;;;; +32F6;CIRCLED KATAKANA RA;So;0;L; 30E9;;;;N;;;;; +32F7;CIRCLED KATAKANA RI;So;0;L; 30EA;;;;N;;;;; +32F8;CIRCLED KATAKANA RU;So;0;L; 30EB;;;;N;;;;; +32F9;CIRCLED KATAKANA RE;So;0;L; 30EC;;;;N;;;;; +32FA;CIRCLED KATAKANA RO;So;0;L; 30ED;;;;N;;;;; +32FB;CIRCLED KATAKANA WA;So;0;L; 30EF;;;;N;;;;; +32FC;CIRCLED KATAKANA WI;So;0;L; 30F0;;;;N;;;;; +32FD;CIRCLED KATAKANA WE;So;0;L; 30F1;;;;N;;;;; +32FE;CIRCLED KATAKANA WO;So;0;L; 30F2;;;;N;;;;; +32FF;SQUARE ERA NAME REIWA;So;0;L; 4EE4 548C;;;;N;;;;; +3300;SQUARE APAATO;So;0;L; 30A2 30D1 30FC 30C8;;;;N;SQUARED APAATO;;;; +3301;SQUARE ARUHUA;So;0;L; 30A2 30EB 30D5 30A1;;;;N;SQUARED ARUHUA;;;; +3302;SQUARE ANPEA;So;0;L; 30A2 30F3 30DA 30A2;;;;N;SQUARED ANPEA;;;; +3303;SQUARE AARU;So;0;L; 30A2 30FC 30EB;;;;N;SQUARED AARU;;;; +3304;SQUARE ININGU;So;0;L; 30A4 30CB 30F3 30B0;;;;N;SQUARED ININGU;;;; +3305;SQUARE INTI;So;0;L; 30A4 30F3 30C1;;;;N;SQUARED INTI;;;; +3306;SQUARE UON;So;0;L; 30A6 30A9 30F3;;;;N;SQUARED UON;;;; +3307;SQUARE ESUKUUDO;So;0;L; 30A8 30B9 30AF 30FC 30C9;;;;N;SQUARED ESUKUUDO;;;; +3308;SQUARE EEKAA;So;0;L; 30A8 30FC 30AB 30FC;;;;N;SQUARED EEKAA;;;; +3309;SQUARE ONSU;So;0;L; 30AA 30F3 30B9;;;;N;SQUARED ONSU;;;; +330A;SQUARE OOMU;So;0;L; 30AA 30FC 30E0;;;;N;SQUARED OOMU;;;; +330B;SQUARE KAIRI;So;0;L; 30AB 30A4 30EA;;;;N;SQUARED KAIRI;;;; +330C;SQUARE KARATTO;So;0;L; 30AB 30E9 30C3 30C8;;;;N;SQUARED KARATTO;;;; +330D;SQUARE KARORII;So;0;L; 30AB 30ED 30EA 30FC;;;;N;SQUARED KARORII;;;; +330E;SQUARE GARON;So;0;L; 30AC 30ED 30F3;;;;N;SQUARED GARON;;;; +330F;SQUARE GANMA;So;0;L; 30AC 30F3 30DE;;;;N;SQUARED GANMA;;;; +3310;SQUARE GIGA;So;0;L; 30AE 30AC;;;;N;SQUARED GIGA;;;; +3311;SQUARE GINII;So;0;L; 30AE 30CB 30FC;;;;N;SQUARED GINII;;;; +3312;SQUARE KYURII;So;0;L; 30AD 30E5 30EA 30FC;;;;N;SQUARED KYURII;;;; +3313;SQUARE GIRUDAA;So;0;L; 30AE 30EB 30C0 30FC;;;;N;SQUARED GIRUDAA;;;; +3314;SQUARE KIRO;So;0;L; 30AD 30ED;;;;N;SQUARED KIRO;;;; +3315;SQUARE KIROGURAMU;So;0;L; 30AD 30ED 30B0 30E9 30E0;;;;N;SQUARED KIROGURAMU;;;; +3316;SQUARE KIROMEETORU;So;0;L; 30AD 30ED 30E1 30FC 30C8 30EB;;;;N;SQUARED KIROMEETORU;;;; +3317;SQUARE KIROWATTO;So;0;L; 30AD 30ED 30EF 30C3 30C8;;;;N;SQUARED KIROWATTO;;;; +3318;SQUARE GURAMU;So;0;L; 30B0 30E9 30E0;;;;N;SQUARED GURAMU;;;; +3319;SQUARE GURAMUTON;So;0;L; 30B0 30E9 30E0 30C8 30F3;;;;N;SQUARED GURAMUTON;;;; +331A;SQUARE KURUZEIRO;So;0;L; 30AF 30EB 30BC 30A4 30ED;;;;N;SQUARED KURUZEIRO;;;; +331B;SQUARE KUROONE;So;0;L; 30AF 30ED 30FC 30CD;;;;N;SQUARED KUROONE;;;; +331C;SQUARE KEESU;So;0;L; 30B1 30FC 30B9;;;;N;SQUARED KEESU;;;; +331D;SQUARE KORUNA;So;0;L; 30B3 30EB 30CA;;;;N;SQUARED KORUNA;;;; +331E;SQUARE KOOPO;So;0;L; 30B3 30FC 30DD;;;;N;SQUARED KOOPO;;;; +331F;SQUARE SAIKURU;So;0;L; 30B5 30A4 30AF 30EB;;;;N;SQUARED SAIKURU;;;; +3320;SQUARE SANTIIMU;So;0;L; 30B5 30F3 30C1 30FC 30E0;;;;N;SQUARED SANTIIMU;;;; +3321;SQUARE SIRINGU;So;0;L; 30B7 30EA 30F3 30B0;;;;N;SQUARED SIRINGU;;;; +3322;SQUARE SENTI;So;0;L; 30BB 30F3 30C1;;;;N;SQUARED SENTI;;;; +3323;SQUARE SENTO;So;0;L; 30BB 30F3 30C8;;;;N;SQUARED SENTO;;;; +3324;SQUARE DAASU;So;0;L; 30C0 30FC 30B9;;;;N;SQUARED DAASU;;;; +3325;SQUARE DESI;So;0;L; 30C7 30B7;;;;N;SQUARED DESI;;;; +3326;SQUARE DORU;So;0;L; 30C9 30EB;;;;N;SQUARED DORU;;;; +3327;SQUARE TON;So;0;L; 30C8 30F3;;;;N;SQUARED TON;;;; +3328;SQUARE NANO;So;0;L; 30CA 30CE;;;;N;SQUARED NANO;;;; +3329;SQUARE NOTTO;So;0;L; 30CE 30C3 30C8;;;;N;SQUARED NOTTO;;;; +332A;SQUARE HAITU;So;0;L; 30CF 30A4 30C4;;;;N;SQUARED HAITU;;;; +332B;SQUARE PAASENTO;So;0;L; 30D1 30FC 30BB 30F3 30C8;;;;N;SQUARED PAASENTO;;;; +332C;SQUARE PAATU;So;0;L; 30D1 30FC 30C4;;;;N;SQUARED PAATU;;;; +332D;SQUARE BAARERU;So;0;L; 30D0 30FC 30EC 30EB;;;;N;SQUARED BAARERU;;;; +332E;SQUARE PIASUTORU;So;0;L; 30D4 30A2 30B9 30C8 30EB;;;;N;SQUARED PIASUTORU;;;; +332F;SQUARE PIKURU;So;0;L; 30D4 30AF 30EB;;;;N;SQUARED PIKURU;;;; +3330;SQUARE PIKO;So;0;L; 30D4 30B3;;;;N;SQUARED PIKO;;;; +3331;SQUARE BIRU;So;0;L; 30D3 30EB;;;;N;SQUARED BIRU;;;; +3332;SQUARE HUARADDO;So;0;L; 30D5 30A1 30E9 30C3 30C9;;;;N;SQUARED HUARADDO;;;; +3333;SQUARE HUIITO;So;0;L; 30D5 30A3 30FC 30C8;;;;N;SQUARED HUIITO;;;; +3334;SQUARE BUSSYERU;So;0;L; 30D6 30C3 30B7 30A7 30EB;;;;N;SQUARED BUSSYERU;;;; +3335;SQUARE HURAN;So;0;L; 30D5 30E9 30F3;;;;N;SQUARED HURAN;;;; +3336;SQUARE HEKUTAARU;So;0;L; 30D8 30AF 30BF 30FC 30EB;;;;N;SQUARED HEKUTAARU;;;; +3337;SQUARE PESO;So;0;L; 30DA 30BD;;;;N;SQUARED PESO;;;; +3338;SQUARE PENIHI;So;0;L; 30DA 30CB 30D2;;;;N;SQUARED PENIHI;;;; +3339;SQUARE HERUTU;So;0;L; 30D8 30EB 30C4;;;;N;SQUARED HERUTU;;;; +333A;SQUARE PENSU;So;0;L; 30DA 30F3 30B9;;;;N;SQUARED PENSU;;;; +333B;SQUARE PEEZI;So;0;L; 30DA 30FC 30B8;;;;N;SQUARED PEEZI;;;; +333C;SQUARE BEETA;So;0;L; 30D9 30FC 30BF;;;;N;SQUARED BEETA;;;; +333D;SQUARE POINTO;So;0;L; 30DD 30A4 30F3 30C8;;;;N;SQUARED POINTO;;;; +333E;SQUARE BORUTO;So;0;L; 30DC 30EB 30C8;;;;N;SQUARED BORUTO;;;; +333F;SQUARE HON;So;0;L; 30DB 30F3;;;;N;SQUARED HON;;;; +3340;SQUARE PONDO;So;0;L; 30DD 30F3 30C9;;;;N;SQUARED PONDO;;;; +3341;SQUARE HOORU;So;0;L; 30DB 30FC 30EB;;;;N;SQUARED HOORU;;;; +3342;SQUARE HOON;So;0;L; 30DB 30FC 30F3;;;;N;SQUARED HOON;;;; +3343;SQUARE MAIKURO;So;0;L; 30DE 30A4 30AF 30ED;;;;N;SQUARED MAIKURO;;;; +3344;SQUARE MAIRU;So;0;L; 30DE 30A4 30EB;;;;N;SQUARED MAIRU;;;; +3345;SQUARE MAHHA;So;0;L; 30DE 30C3 30CF;;;;N;SQUARED MAHHA;;;; +3346;SQUARE MARUKU;So;0;L; 30DE 30EB 30AF;;;;N;SQUARED MARUKU;;;; +3347;SQUARE MANSYON;So;0;L; 30DE 30F3 30B7 30E7 30F3;;;;N;SQUARED MANSYON;;;; +3348;SQUARE MIKURON;So;0;L; 30DF 30AF 30ED 30F3;;;;N;SQUARED MIKURON;;;; +3349;SQUARE MIRI;So;0;L; 30DF 30EA;;;;N;SQUARED MIRI;;;; +334A;SQUARE MIRIBAARU;So;0;L; 30DF 30EA 30D0 30FC 30EB;;;;N;SQUARED MIRIBAARU;;;; +334B;SQUARE MEGA;So;0;L; 30E1 30AC;;;;N;SQUARED MEGA;;;; +334C;SQUARE MEGATON;So;0;L; 30E1 30AC 30C8 30F3;;;;N;SQUARED MEGATON;;;; +334D;SQUARE MEETORU;So;0;L; 30E1 30FC 30C8 30EB;;;;N;SQUARED MEETORU;;;; +334E;SQUARE YAADO;So;0;L; 30E4 30FC 30C9;;;;N;SQUARED YAADO;;;; +334F;SQUARE YAARU;So;0;L; 30E4 30FC 30EB;;;;N;SQUARED YAARU;;;; +3350;SQUARE YUAN;So;0;L; 30E6 30A2 30F3;;;;N;SQUARED YUAN;;;; +3351;SQUARE RITTORU;So;0;L; 30EA 30C3 30C8 30EB;;;;N;SQUARED RITTORU;;;; +3352;SQUARE RIRA;So;0;L; 30EA 30E9;;;;N;SQUARED RIRA;;;; +3353;SQUARE RUPII;So;0;L; 30EB 30D4 30FC;;;;N;SQUARED RUPII;;;; +3354;SQUARE RUUBURU;So;0;L; 30EB 30FC 30D6 30EB;;;;N;SQUARED RUUBURU;;;; +3355;SQUARE REMU;So;0;L; 30EC 30E0;;;;N;SQUARED REMU;;;; +3356;SQUARE RENTOGEN;So;0;L; 30EC 30F3 30C8 30B2 30F3;;;;N;SQUARED RENTOGEN;;;; +3357;SQUARE WATTO;So;0;L; 30EF 30C3 30C8;;;;N;SQUARED WATTO;;;; +3358;IDEOGRAPHIC TELEGRAPH SYMBOL FOR HOUR ZERO;So;0;L; 0030 70B9;;;;N;;;;; +3359;IDEOGRAPHIC TELEGRAPH SYMBOL FOR HOUR ONE;So;0;L; 0031 70B9;;;;N;;;;; +335A;IDEOGRAPHIC TELEGRAPH SYMBOL FOR HOUR TWO;So;0;L; 0032 70B9;;;;N;;;;; +335B;IDEOGRAPHIC TELEGRAPH SYMBOL FOR HOUR THREE;So;0;L; 0033 70B9;;;;N;;;;; +335C;IDEOGRAPHIC TELEGRAPH SYMBOL FOR HOUR FOUR;So;0;L; 0034 70B9;;;;N;;;;; +335D;IDEOGRAPHIC TELEGRAPH SYMBOL FOR HOUR FIVE;So;0;L; 0035 70B9;;;;N;;;;; +335E;IDEOGRAPHIC TELEGRAPH SYMBOL FOR HOUR SIX;So;0;L; 0036 70B9;;;;N;;;;; +335F;IDEOGRAPHIC TELEGRAPH SYMBOL FOR HOUR SEVEN;So;0;L; 0037 70B9;;;;N;;;;; +3360;IDEOGRAPHIC TELEGRAPH SYMBOL FOR HOUR EIGHT;So;0;L; 0038 70B9;;;;N;;;;; +3361;IDEOGRAPHIC TELEGRAPH SYMBOL FOR HOUR NINE;So;0;L; 0039 70B9;;;;N;;;;; +3362;IDEOGRAPHIC TELEGRAPH SYMBOL FOR HOUR TEN;So;0;L; 0031 0030 70B9;;;;N;;;;; +3363;IDEOGRAPHIC TELEGRAPH SYMBOL FOR HOUR ELEVEN;So;0;L; 0031 0031 70B9;;;;N;;;;; +3364;IDEOGRAPHIC TELEGRAPH SYMBOL FOR HOUR TWELVE;So;0;L; 0031 0032 70B9;;;;N;;;;; +3365;IDEOGRAPHIC TELEGRAPH SYMBOL FOR HOUR THIRTEEN;So;0;L; 0031 0033 70B9;;;;N;;;;; +3366;IDEOGRAPHIC TELEGRAPH SYMBOL FOR HOUR FOURTEEN;So;0;L; 0031 0034 70B9;;;;N;;;;; +3367;IDEOGRAPHIC TELEGRAPH SYMBOL FOR HOUR FIFTEEN;So;0;L; 0031 0035 70B9;;;;N;;;;; +3368;IDEOGRAPHIC TELEGRAPH SYMBOL FOR HOUR SIXTEEN;So;0;L; 0031 0036 70B9;;;;N;;;;; +3369;IDEOGRAPHIC TELEGRAPH SYMBOL FOR HOUR SEVENTEEN;So;0;L; 0031 0037 70B9;;;;N;;;;; +336A;IDEOGRAPHIC TELEGRAPH SYMBOL FOR HOUR EIGHTEEN;So;0;L; 0031 0038 70B9;;;;N;;;;; +336B;IDEOGRAPHIC TELEGRAPH SYMBOL FOR HOUR NINETEEN;So;0;L; 0031 0039 70B9;;;;N;;;;; +336C;IDEOGRAPHIC TELEGRAPH SYMBOL FOR HOUR TWENTY;So;0;L; 0032 0030 70B9;;;;N;;;;; +336D;IDEOGRAPHIC TELEGRAPH SYMBOL FOR HOUR TWENTY-ONE;So;0;L; 0032 0031 70B9;;;;N;;;;; +336E;IDEOGRAPHIC TELEGRAPH SYMBOL FOR HOUR TWENTY-TWO;So;0;L; 0032 0032 70B9;;;;N;;;;; +336F;IDEOGRAPHIC TELEGRAPH SYMBOL FOR HOUR TWENTY-THREE;So;0;L; 0032 0033 70B9;;;;N;;;;; +3370;IDEOGRAPHIC TELEGRAPH SYMBOL FOR HOUR TWENTY-FOUR;So;0;L; 0032 0034 70B9;;;;N;;;;; +3371;SQUARE HPA;So;0;L; 0068 0050 0061;;;;N;;;;; +3372;SQUARE DA;So;0;L; 0064 0061;;;;N;;;;; +3373;SQUARE AU;So;0;L; 0041 0055;;;;N;;;;; +3374;SQUARE BAR;So;0;L; 0062 0061 0072;;;;N;;;;; +3375;SQUARE OV;So;0;L; 006F 0056;;;;N;;;;; +3376;SQUARE PC;So;0;L; 0070 0063;;;;N;;;;; +3377;SQUARE DM;So;0;ON; 0064 006D;;;;N;;;;; +3378;SQUARE DM SQUARED;So;0;ON; 0064 006D 00B2;;;;N;;;;; +3379;SQUARE DM CUBED;So;0;ON; 0064 006D 00B3;;;;N;;;;; +337A;SQUARE IU;So;0;ON; 0049 0055;;;;N;;;;; +337B;SQUARE ERA NAME HEISEI;So;0;L; 5E73 6210;;;;N;SQUARED TWO IDEOGRAPHS ERA NAME HEISEI;;;; +337C;SQUARE ERA NAME SYOUWA;So;0;L; 662D 548C;;;;N;SQUARED TWO IDEOGRAPHS ERA NAME SYOUWA;;;; +337D;SQUARE ERA NAME TAISYOU;So;0;L; 5927 6B63;;;;N;SQUARED TWO IDEOGRAPHS ERA NAME TAISYOU;;;; +337E;SQUARE ERA NAME MEIZI;So;0;L; 660E 6CBB;;;;N;SQUARED TWO IDEOGRAPHS ERA NAME MEIZI;;;; +337F;SQUARE CORPORATION;So;0;L; 682A 5F0F 4F1A 793E;;;;N;SQUARED FOUR IDEOGRAPHS CORPORATION;;;; +3380;SQUARE PA AMPS;So;0;L; 0070 0041;;;;N;SQUARED PA AMPS;;;; +3381;SQUARE NA;So;0;L; 006E 0041;;;;N;SQUARED NA;;;; +3382;SQUARE MU A;So;0;L; 03BC 0041;;;;N;SQUARED MU A;;;; +3383;SQUARE MA;So;0;L; 006D 0041;;;;N;SQUARED MA;;;; +3384;SQUARE KA;So;0;L; 006B 0041;;;;N;SQUARED KA;;;; +3385;SQUARE KB;So;0;L; 004B 0042;;;;N;SQUARED KB;;;; +3386;SQUARE MB;So;0;L; 004D 0042;;;;N;SQUARED MB;;;; +3387;SQUARE GB;So;0;L; 0047 0042;;;;N;SQUARED GB;;;; +3388;SQUARE CAL;So;0;L; 0063 0061 006C;;;;N;SQUARED CAL;;;; +3389;SQUARE KCAL;So;0;L; 006B 0063 0061 006C;;;;N;SQUARED KCAL;;;; +338A;SQUARE PF;So;0;L; 0070 0046;;;;N;SQUARED PF;;;; +338B;SQUARE NF;So;0;L; 006E 0046;;;;N;SQUARED NF;;;; +338C;SQUARE MU F;So;0;L; 03BC 0046;;;;N;SQUARED MU F;;;; +338D;SQUARE MU G;So;0;L; 03BC 0067;;;;N;SQUARED MU G;;;; +338E;SQUARE MG;So;0;L; 006D 0067;;;;N;SQUARED MG;;;; +338F;SQUARE KG;So;0;L; 006B 0067;;;;N;SQUARED KG;;;; +3390;SQUARE HZ;So;0;L; 0048 007A;;;;N;SQUARED HZ;;;; +3391;SQUARE KHZ;So;0;L; 006B 0048 007A;;;;N;SQUARED KHZ;;;; +3392;SQUARE MHZ;So;0;L; 004D 0048 007A;;;;N;SQUARED MHZ;;;; +3393;SQUARE GHZ;So;0;L; 0047 0048 007A;;;;N;SQUARED GHZ;;;; +3394;SQUARE THZ;So;0;L; 0054 0048 007A;;;;N;SQUARED THZ;;;; +3395;SQUARE MU L;So;0;L; 03BC 2113;;;;N;SQUARED MU L;;;; +3396;SQUARE ML;So;0;L; 006D 2113;;;;N;SQUARED ML;;;; +3397;SQUARE DL;So;0;L; 0064 2113;;;;N;SQUARED DL;;;; +3398;SQUARE KL;So;0;L; 006B 2113;;;;N;SQUARED KL;;;; +3399;SQUARE FM;So;0;L; 0066 006D;;;;N;SQUARED FM;;;; +339A;SQUARE NM;So;0;L; 006E 006D;;;;N;SQUARED NM;;;; +339B;SQUARE MU M;So;0;L; 03BC 006D;;;;N;SQUARED MU M;;;; +339C;SQUARE MM;So;0;L; 006D 006D;;;;N;SQUARED MM;;;; +339D;SQUARE CM;So;0;L; 0063 006D;;;;N;SQUARED CM;;;; +339E;SQUARE KM;So;0;L; 006B 006D;;;;N;SQUARED KM;;;; +339F;SQUARE MM SQUARED;So;0;L; 006D 006D 00B2;;;;N;SQUARED MM SQUARED;;;; +33A0;SQUARE CM SQUARED;So;0;L; 0063 006D 00B2;;;;N;SQUARED CM SQUARED;;;; +33A1;SQUARE M SQUARED;So;0;L; 006D 00B2;;;;N;SQUARED M SQUARED;;;; +33A2;SQUARE KM SQUARED;So;0;L; 006B 006D 00B2;;;;N;SQUARED KM SQUARED;;;; +33A3;SQUARE MM CUBED;So;0;L; 006D 006D 00B3;;;;N;SQUARED MM CUBED;;;; +33A4;SQUARE CM CUBED;So;0;L; 0063 006D 00B3;;;;N;SQUARED CM CUBED;;;; +33A5;SQUARE M CUBED;So;0;L; 006D 00B3;;;;N;SQUARED M CUBED;;;; +33A6;SQUARE KM CUBED;So;0;L; 006B 006D 00B3;;;;N;SQUARED KM CUBED;;;; +33A7;SQUARE M OVER S;So;0;L; 006D 2215 0073;;;;N;SQUARED M OVER S;;;; +33A8;SQUARE M OVER S SQUARED;So;0;L; 006D 2215 0073 00B2;;;;N;SQUARED M OVER S SQUARED;;;; +33A9;SQUARE PA;So;0;L; 0050 0061;;;;N;SQUARED PA;;;; +33AA;SQUARE KPA;So;0;L; 006B 0050 0061;;;;N;SQUARED KPA;;;; +33AB;SQUARE MPA;So;0;L; 004D 0050 0061;;;;N;SQUARED MPA;;;; +33AC;SQUARE GPA;So;0;L; 0047 0050 0061;;;;N;SQUARED GPA;;;; +33AD;SQUARE RAD;So;0;L; 0072 0061 0064;;;;N;SQUARED RAD;;;; +33AE;SQUARE RAD OVER S;So;0;L; 0072 0061 0064 2215 0073;;;;N;SQUARED RAD OVER S;;;; +33AF;SQUARE RAD OVER S SQUARED;So;0;L; 0072 0061 0064 2215 0073 00B2;;;;N;SQUARED RAD OVER S SQUARED;;;; +33B0;SQUARE PS;So;0;L; 0070 0073;;;;N;SQUARED PS;;;; +33B1;SQUARE NS;So;0;L; 006E 0073;;;;N;SQUARED NS;;;; +33B2;SQUARE MU S;So;0;L; 03BC 0073;;;;N;SQUARED MU S;;;; +33B3;SQUARE MS;So;0;L; 006D 0073;;;;N;SQUARED MS;;;; +33B4;SQUARE PV;So;0;L; 0070 0056;;;;N;SQUARED PV;;;; +33B5;SQUARE NV;So;0;L; 006E 0056;;;;N;SQUARED NV;;;; +33B6;SQUARE MU V;So;0;L; 03BC 0056;;;;N;SQUARED MU V;;;; +33B7;SQUARE MV;So;0;L; 006D 0056;;;;N;SQUARED MV;;;; +33B8;SQUARE KV;So;0;L; 006B 0056;;;;N;SQUARED KV;;;; +33B9;SQUARE MV MEGA;So;0;L; 004D 0056;;;;N;SQUARED MV MEGA;;;; +33BA;SQUARE PW;So;0;L; 0070 0057;;;;N;SQUARED PW;;;; +33BB;SQUARE NW;So;0;L; 006E 0057;;;;N;SQUARED NW;;;; +33BC;SQUARE MU W;So;0;L; 03BC 0057;;;;N;SQUARED MU W;;;; +33BD;SQUARE MW;So;0;L; 006D 0057;;;;N;SQUARED MW;;;; +33BE;SQUARE KW;So;0;L; 006B 0057;;;;N;SQUARED KW;;;; +33BF;SQUARE MW MEGA;So;0;L; 004D 0057;;;;N;SQUARED MW MEGA;;;; +33C0;SQUARE K OHM;So;0;L; 006B 03A9;;;;N;SQUARED K OHM;;;; +33C1;SQUARE M OHM;So;0;L; 004D 03A9;;;;N;SQUARED M OHM;;;; +33C2;SQUARE AM;So;0;L; 0061 002E 006D 002E;;;;N;SQUARED AM;;;; +33C3;SQUARE BQ;So;0;L; 0042 0071;;;;N;SQUARED BQ;;;; +33C4;SQUARE CC;So;0;L; 0063 0063;;;;N;SQUARED CC;;;; +33C5;SQUARE CD;So;0;L; 0063 0064;;;;N;SQUARED CD;;;; +33C6;SQUARE C OVER KG;So;0;L; 0043 2215 006B 0067;;;;N;SQUARED C OVER KG;;;; +33C7;SQUARE CO;So;0;L; 0043 006F 002E;;;;N;SQUARED CO;;;; +33C8;SQUARE DB;So;0;L; 0064 0042;;;;N;SQUARED DB;;;; +33C9;SQUARE GY;So;0;L; 0047 0079;;;;N;SQUARED GY;;;; +33CA;SQUARE HA;So;0;L; 0068 0061;;;;N;SQUARED HA;;;; +33CB;SQUARE HP;So;0;L; 0048 0050;;;;N;SQUARED HP;;;; +33CC;SQUARE IN;So;0;L; 0069 006E;;;;N;SQUARED IN;;;; +33CD;SQUARE KK;So;0;L; 004B 004B;;;;N;SQUARED KK;;;; +33CE;SQUARE KM CAPITAL;So;0;L; 004B 004D;;;;N;SQUARED KM CAPITAL;;;; +33CF;SQUARE KT;So;0;L; 006B 0074;;;;N;SQUARED KT;;;; +33D0;SQUARE LM;So;0;L; 006C 006D;;;;N;SQUARED LM;;;; +33D1;SQUARE LN;So;0;L; 006C 006E;;;;N;SQUARED LN;;;; +33D2;SQUARE LOG;So;0;L; 006C 006F 0067;;;;N;SQUARED LOG;;;; +33D3;SQUARE LX;So;0;L; 006C 0078;;;;N;SQUARED LX;;;; +33D4;SQUARE MB SMALL;So;0;L; 006D 0062;;;;N;SQUARED MB SMALL;;;; +33D5;SQUARE MIL;So;0;L; 006D 0069 006C;;;;N;SQUARED MIL;;;; +33D6;SQUARE MOL;So;0;L; 006D 006F 006C;;;;N;SQUARED MOL;;;; +33D7;SQUARE PH;So;0;L; 0050 0048;;;;N;SQUARED PH;;;; +33D8;SQUARE PM;So;0;L; 0070 002E 006D 002E;;;;N;SQUARED PM;;;; +33D9;SQUARE PPM;So;0;L; 0050 0050 004D;;;;N;SQUARED PPM;;;; +33DA;SQUARE PR;So;0;L; 0050 0052;;;;N;SQUARED PR;;;; +33DB;SQUARE SR;So;0;L; 0073 0072;;;;N;SQUARED SR;;;; +33DC;SQUARE SV;So;0;L; 0053 0076;;;;N;SQUARED SV;;;; +33DD;SQUARE WB;So;0;L; 0057 0062;;;;N;SQUARED WB;;;; +33DE;SQUARE V OVER M;So;0;ON; 0056 2215 006D;;;;N;;;;; +33DF;SQUARE A OVER M;So;0;ON; 0041 2215 006D;;;;N;;;;; +33E0;IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY ONE;So;0;L; 0031 65E5;;;;N;;;;; +33E1;IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY TWO;So;0;L; 0032 65E5;;;;N;;;;; +33E2;IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY THREE;So;0;L; 0033 65E5;;;;N;;;;; +33E3;IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY FOUR;So;0;L; 0034 65E5;;;;N;;;;; +33E4;IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY FIVE;So;0;L; 0035 65E5;;;;N;;;;; +33E5;IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY SIX;So;0;L; 0036 65E5;;;;N;;;;; +33E6;IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY SEVEN;So;0;L; 0037 65E5;;;;N;;;;; +33E7;IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY EIGHT;So;0;L; 0038 65E5;;;;N;;;;; +33E8;IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY NINE;So;0;L; 0039 65E5;;;;N;;;;; +33E9;IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY TEN;So;0;L; 0031 0030 65E5;;;;N;;;;; +33EA;IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY ELEVEN;So;0;L; 0031 0031 65E5;;;;N;;;;; +33EB;IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY TWELVE;So;0;L; 0031 0032 65E5;;;;N;;;;; +33EC;IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY THIRTEEN;So;0;L; 0031 0033 65E5;;;;N;;;;; +33ED;IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY FOURTEEN;So;0;L; 0031 0034 65E5;;;;N;;;;; +33EE;IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY FIFTEEN;So;0;L; 0031 0035 65E5;;;;N;;;;; +33EF;IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY SIXTEEN;So;0;L; 0031 0036 65E5;;;;N;;;;; +33F0;IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY SEVENTEEN;So;0;L; 0031 0037 65E5;;;;N;;;;; +33F1;IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY EIGHTEEN;So;0;L; 0031 0038 65E5;;;;N;;;;; +33F2;IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY NINETEEN;So;0;L; 0031 0039 65E5;;;;N;;;;; +33F3;IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY TWENTY;So;0;L; 0032 0030 65E5;;;;N;;;;; +33F4;IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY TWENTY-ONE;So;0;L; 0032 0031 65E5;;;;N;;;;; +33F5;IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY TWENTY-TWO;So;0;L; 0032 0032 65E5;;;;N;;;;; +33F6;IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY TWENTY-THREE;So;0;L; 0032 0033 65E5;;;;N;;;;; +33F7;IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY TWENTY-FOUR;So;0;L; 0032 0034 65E5;;;;N;;;;; +33F8;IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY TWENTY-FIVE;So;0;L; 0032 0035 65E5;;;;N;;;;; +33F9;IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY TWENTY-SIX;So;0;L; 0032 0036 65E5;;;;N;;;;; +33FA;IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY TWENTY-SEVEN;So;0;L; 0032 0037 65E5;;;;N;;;;; +33FB;IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY TWENTY-EIGHT;So;0;L; 0032 0038 65E5;;;;N;;;;; +33FC;IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY TWENTY-NINE;So;0;L; 0032 0039 65E5;;;;N;;;;; +33FD;IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY THIRTY;So;0;L; 0033 0030 65E5;;;;N;;;;; +33FE;IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY THIRTY-ONE;So;0;L; 0033 0031 65E5;;;;N;;;;; +33FF;SQUARE GAL;So;0;ON; 0067 0061 006C;;;;N;;;;; +3400;;Lo;0;L;;;;;N;;;;; +4DB5;;Lo;0;L;;;;;N;;;;; +4DC0;HEXAGRAM FOR THE CREATIVE HEAVEN;So;0;ON;;;;;N;;;;; +4DC1;HEXAGRAM FOR THE RECEPTIVE EARTH;So;0;ON;;;;;N;;;;; +4DC2;HEXAGRAM FOR DIFFICULTY AT THE BEGINNING;So;0;ON;;;;;N;;;;; +4DC3;HEXAGRAM FOR YOUTHFUL FOLLY;So;0;ON;;;;;N;;;;; +4DC4;HEXAGRAM FOR WAITING;So;0;ON;;;;;N;;;;; +4DC5;HEXAGRAM FOR CONFLICT;So;0;ON;;;;;N;;;;; +4DC6;HEXAGRAM FOR THE ARMY;So;0;ON;;;;;N;;;;; +4DC7;HEXAGRAM FOR HOLDING TOGETHER;So;0;ON;;;;;N;;;;; +4DC8;HEXAGRAM FOR SMALL TAMING;So;0;ON;;;;;N;;;;; +4DC9;HEXAGRAM FOR TREADING;So;0;ON;;;;;N;;;;; +4DCA;HEXAGRAM FOR PEACE;So;0;ON;;;;;N;;;;; +4DCB;HEXAGRAM FOR STANDSTILL;So;0;ON;;;;;N;;;;; +4DCC;HEXAGRAM FOR FELLOWSHIP;So;0;ON;;;;;N;;;;; +4DCD;HEXAGRAM FOR GREAT POSSESSION;So;0;ON;;;;;N;;;;; +4DCE;HEXAGRAM FOR MODESTY;So;0;ON;;;;;N;;;;; +4DCF;HEXAGRAM FOR ENTHUSIASM;So;0;ON;;;;;N;;;;; +4DD0;HEXAGRAM FOR FOLLOWING;So;0;ON;;;;;N;;;;; +4DD1;HEXAGRAM FOR WORK ON THE DECAYED;So;0;ON;;;;;N;;;;; +4DD2;HEXAGRAM FOR APPROACH;So;0;ON;;;;;N;;;;; +4DD3;HEXAGRAM FOR CONTEMPLATION;So;0;ON;;;;;N;;;;; +4DD4;HEXAGRAM FOR BITING THROUGH;So;0;ON;;;;;N;;;;; +4DD5;HEXAGRAM FOR GRACE;So;0;ON;;;;;N;;;;; +4DD6;HEXAGRAM FOR SPLITTING APART;So;0;ON;;;;;N;;;;; +4DD7;HEXAGRAM FOR RETURN;So;0;ON;;;;;N;;;;; +4DD8;HEXAGRAM FOR INNOCENCE;So;0;ON;;;;;N;;;;; +4DD9;HEXAGRAM FOR GREAT TAMING;So;0;ON;;;;;N;;;;; +4DDA;HEXAGRAM FOR MOUTH CORNERS;So;0;ON;;;;;N;;;;; +4DDB;HEXAGRAM FOR GREAT PREPONDERANCE;So;0;ON;;;;;N;;;;; +4DDC;HEXAGRAM FOR THE ABYSMAL WATER;So;0;ON;;;;;N;;;;; +4DDD;HEXAGRAM FOR THE CLINGING FIRE;So;0;ON;;;;;N;;;;; +4DDE;HEXAGRAM FOR INFLUENCE;So;0;ON;;;;;N;;;;; +4DDF;HEXAGRAM FOR DURATION;So;0;ON;;;;;N;;;;; +4DE0;HEXAGRAM FOR RETREAT;So;0;ON;;;;;N;;;;; +4DE1;HEXAGRAM FOR GREAT POWER;So;0;ON;;;;;N;;;;; +4DE2;HEXAGRAM FOR PROGRESS;So;0;ON;;;;;N;;;;; +4DE3;HEXAGRAM FOR DARKENING OF THE LIGHT;So;0;ON;;;;;N;;;;; +4DE4;HEXAGRAM FOR THE FAMILY;So;0;ON;;;;;N;;;;; +4DE5;HEXAGRAM FOR OPPOSITION;So;0;ON;;;;;N;;;;; +4DE6;HEXAGRAM FOR OBSTRUCTION;So;0;ON;;;;;N;;;;; +4DE7;HEXAGRAM FOR DELIVERANCE;So;0;ON;;;;;N;;;;; +4DE8;HEXAGRAM FOR DECREASE;So;0;ON;;;;;N;;;;; +4DE9;HEXAGRAM FOR INCREASE;So;0;ON;;;;;N;;;;; +4DEA;HEXAGRAM FOR BREAKTHROUGH;So;0;ON;;;;;N;;;;; +4DEB;HEXAGRAM FOR COMING TO MEET;So;0;ON;;;;;N;;;;; +4DEC;HEXAGRAM FOR GATHERING TOGETHER;So;0;ON;;;;;N;;;;; +4DED;HEXAGRAM FOR PUSHING UPWARD;So;0;ON;;;;;N;;;;; +4DEE;HEXAGRAM FOR OPPRESSION;So;0;ON;;;;;N;;;;; +4DEF;HEXAGRAM FOR THE WELL;So;0;ON;;;;;N;;;;; +4DF0;HEXAGRAM FOR REVOLUTION;So;0;ON;;;;;N;;;;; +4DF1;HEXAGRAM FOR THE CAULDRON;So;0;ON;;;;;N;;;;; +4DF2;HEXAGRAM FOR THE AROUSING THUNDER;So;0;ON;;;;;N;;;;; +4DF3;HEXAGRAM FOR THE KEEPING STILL MOUNTAIN;So;0;ON;;;;;N;;;;; +4DF4;HEXAGRAM FOR DEVELOPMENT;So;0;ON;;;;;N;;;;; +4DF5;HEXAGRAM FOR THE MARRYING MAIDEN;So;0;ON;;;;;N;;;;; +4DF6;HEXAGRAM FOR ABUNDANCE;So;0;ON;;;;;N;;;;; +4DF7;HEXAGRAM FOR THE WANDERER;So;0;ON;;;;;N;;;;; +4DF8;HEXAGRAM FOR THE GENTLE WIND;So;0;ON;;;;;N;;;;; +4DF9;HEXAGRAM FOR THE JOYOUS LAKE;So;0;ON;;;;;N;;;;; +4DFA;HEXAGRAM FOR DISPERSION;So;0;ON;;;;;N;;;;; +4DFB;HEXAGRAM FOR LIMITATION;So;0;ON;;;;;N;;;;; +4DFC;HEXAGRAM FOR INNER TRUTH;So;0;ON;;;;;N;;;;; +4DFD;HEXAGRAM FOR SMALL PREPONDERANCE;So;0;ON;;;;;N;;;;; +4DFE;HEXAGRAM FOR AFTER COMPLETION;So;0;ON;;;;;N;;;;; +4DFF;HEXAGRAM FOR BEFORE COMPLETION;So;0;ON;;;;;N;;;;; +4E00;;Lo;0;L;;;;;N;;;;; +9FEF;;Lo;0;L;;;;;N;;;;; +A000;YI SYLLABLE IT;Lo;0;L;;;;;N;;;;; +A001;YI SYLLABLE IX;Lo;0;L;;;;;N;;;;; +A002;YI SYLLABLE I;Lo;0;L;;;;;N;;;;; +A003;YI SYLLABLE IP;Lo;0;L;;;;;N;;;;; +A004;YI SYLLABLE IET;Lo;0;L;;;;;N;;;;; +A005;YI SYLLABLE IEX;Lo;0;L;;;;;N;;;;; +A006;YI SYLLABLE IE;Lo;0;L;;;;;N;;;;; +A007;YI SYLLABLE IEP;Lo;0;L;;;;;N;;;;; +A008;YI SYLLABLE AT;Lo;0;L;;;;;N;;;;; +A009;YI SYLLABLE AX;Lo;0;L;;;;;N;;;;; +A00A;YI SYLLABLE A;Lo;0;L;;;;;N;;;;; +A00B;YI SYLLABLE AP;Lo;0;L;;;;;N;;;;; +A00C;YI SYLLABLE UOX;Lo;0;L;;;;;N;;;;; +A00D;YI SYLLABLE UO;Lo;0;L;;;;;N;;;;; +A00E;YI SYLLABLE UOP;Lo;0;L;;;;;N;;;;; +A00F;YI SYLLABLE OT;Lo;0;L;;;;;N;;;;; +A010;YI SYLLABLE OX;Lo;0;L;;;;;N;;;;; +A011;YI SYLLABLE O;Lo;0;L;;;;;N;;;;; +A012;YI SYLLABLE OP;Lo;0;L;;;;;N;;;;; +A013;YI SYLLABLE EX;Lo;0;L;;;;;N;;;;; +A014;YI SYLLABLE E;Lo;0;L;;;;;N;;;;; +A015;YI SYLLABLE WU;Lm;0;L;;;;;N;;;;; +A016;YI SYLLABLE BIT;Lo;0;L;;;;;N;;;;; +A017;YI SYLLABLE BIX;Lo;0;L;;;;;N;;;;; +A018;YI SYLLABLE BI;Lo;0;L;;;;;N;;;;; +A019;YI SYLLABLE BIP;Lo;0;L;;;;;N;;;;; +A01A;YI SYLLABLE BIET;Lo;0;L;;;;;N;;;;; +A01B;YI SYLLABLE BIEX;Lo;0;L;;;;;N;;;;; +A01C;YI SYLLABLE BIE;Lo;0;L;;;;;N;;;;; +A01D;YI SYLLABLE BIEP;Lo;0;L;;;;;N;;;;; +A01E;YI SYLLABLE BAT;Lo;0;L;;;;;N;;;;; +A01F;YI SYLLABLE BAX;Lo;0;L;;;;;N;;;;; +A020;YI SYLLABLE BA;Lo;0;L;;;;;N;;;;; +A021;YI SYLLABLE BAP;Lo;0;L;;;;;N;;;;; +A022;YI SYLLABLE BUOX;Lo;0;L;;;;;N;;;;; +A023;YI SYLLABLE BUO;Lo;0;L;;;;;N;;;;; +A024;YI SYLLABLE BUOP;Lo;0;L;;;;;N;;;;; +A025;YI SYLLABLE BOT;Lo;0;L;;;;;N;;;;; +A026;YI SYLLABLE BOX;Lo;0;L;;;;;N;;;;; +A027;YI SYLLABLE BO;Lo;0;L;;;;;N;;;;; +A028;YI SYLLABLE BOP;Lo;0;L;;;;;N;;;;; +A029;YI SYLLABLE BEX;Lo;0;L;;;;;N;;;;; +A02A;YI SYLLABLE BE;Lo;0;L;;;;;N;;;;; +A02B;YI SYLLABLE BEP;Lo;0;L;;;;;N;;;;; +A02C;YI SYLLABLE BUT;Lo;0;L;;;;;N;;;;; +A02D;YI SYLLABLE BUX;Lo;0;L;;;;;N;;;;; +A02E;YI SYLLABLE BU;Lo;0;L;;;;;N;;;;; +A02F;YI SYLLABLE BUP;Lo;0;L;;;;;N;;;;; +A030;YI SYLLABLE BURX;Lo;0;L;;;;;N;;;;; +A031;YI SYLLABLE BUR;Lo;0;L;;;;;N;;;;; +A032;YI SYLLABLE BYT;Lo;0;L;;;;;N;;;;; +A033;YI SYLLABLE BYX;Lo;0;L;;;;;N;;;;; +A034;YI SYLLABLE BY;Lo;0;L;;;;;N;;;;; +A035;YI SYLLABLE BYP;Lo;0;L;;;;;N;;;;; +A036;YI SYLLABLE BYRX;Lo;0;L;;;;;N;;;;; +A037;YI SYLLABLE BYR;Lo;0;L;;;;;N;;;;; +A038;YI SYLLABLE PIT;Lo;0;L;;;;;N;;;;; +A039;YI SYLLABLE PIX;Lo;0;L;;;;;N;;;;; +A03A;YI SYLLABLE PI;Lo;0;L;;;;;N;;;;; +A03B;YI SYLLABLE PIP;Lo;0;L;;;;;N;;;;; +A03C;YI SYLLABLE PIEX;Lo;0;L;;;;;N;;;;; +A03D;YI SYLLABLE PIE;Lo;0;L;;;;;N;;;;; +A03E;YI SYLLABLE PIEP;Lo;0;L;;;;;N;;;;; +A03F;YI SYLLABLE PAT;Lo;0;L;;;;;N;;;;; +A040;YI SYLLABLE PAX;Lo;0;L;;;;;N;;;;; +A041;YI SYLLABLE PA;Lo;0;L;;;;;N;;;;; +A042;YI SYLLABLE PAP;Lo;0;L;;;;;N;;;;; +A043;YI SYLLABLE PUOX;Lo;0;L;;;;;N;;;;; +A044;YI SYLLABLE PUO;Lo;0;L;;;;;N;;;;; +A045;YI SYLLABLE PUOP;Lo;0;L;;;;;N;;;;; +A046;YI SYLLABLE POT;Lo;0;L;;;;;N;;;;; +A047;YI SYLLABLE POX;Lo;0;L;;;;;N;;;;; +A048;YI SYLLABLE PO;Lo;0;L;;;;;N;;;;; +A049;YI SYLLABLE POP;Lo;0;L;;;;;N;;;;; +A04A;YI SYLLABLE PUT;Lo;0;L;;;;;N;;;;; +A04B;YI SYLLABLE PUX;Lo;0;L;;;;;N;;;;; +A04C;YI SYLLABLE PU;Lo;0;L;;;;;N;;;;; +A04D;YI SYLLABLE PUP;Lo;0;L;;;;;N;;;;; +A04E;YI SYLLABLE PURX;Lo;0;L;;;;;N;;;;; +A04F;YI SYLLABLE PUR;Lo;0;L;;;;;N;;;;; +A050;YI SYLLABLE PYT;Lo;0;L;;;;;N;;;;; +A051;YI SYLLABLE PYX;Lo;0;L;;;;;N;;;;; +A052;YI SYLLABLE PY;Lo;0;L;;;;;N;;;;; +A053;YI SYLLABLE PYP;Lo;0;L;;;;;N;;;;; +A054;YI SYLLABLE PYRX;Lo;0;L;;;;;N;;;;; +A055;YI SYLLABLE PYR;Lo;0;L;;;;;N;;;;; +A056;YI SYLLABLE BBIT;Lo;0;L;;;;;N;;;;; +A057;YI SYLLABLE BBIX;Lo;0;L;;;;;N;;;;; +A058;YI SYLLABLE BBI;Lo;0;L;;;;;N;;;;; +A059;YI SYLLABLE BBIP;Lo;0;L;;;;;N;;;;; +A05A;YI SYLLABLE BBIET;Lo;0;L;;;;;N;;;;; +A05B;YI SYLLABLE BBIEX;Lo;0;L;;;;;N;;;;; +A05C;YI SYLLABLE BBIE;Lo;0;L;;;;;N;;;;; +A05D;YI SYLLABLE BBIEP;Lo;0;L;;;;;N;;;;; +A05E;YI SYLLABLE BBAT;Lo;0;L;;;;;N;;;;; +A05F;YI SYLLABLE BBAX;Lo;0;L;;;;;N;;;;; +A060;YI SYLLABLE BBA;Lo;0;L;;;;;N;;;;; +A061;YI SYLLABLE BBAP;Lo;0;L;;;;;N;;;;; +A062;YI SYLLABLE BBUOX;Lo;0;L;;;;;N;;;;; +A063;YI SYLLABLE BBUO;Lo;0;L;;;;;N;;;;; +A064;YI SYLLABLE BBUOP;Lo;0;L;;;;;N;;;;; +A065;YI SYLLABLE BBOT;Lo;0;L;;;;;N;;;;; +A066;YI SYLLABLE BBOX;Lo;0;L;;;;;N;;;;; +A067;YI SYLLABLE BBO;Lo;0;L;;;;;N;;;;; +A068;YI SYLLABLE BBOP;Lo;0;L;;;;;N;;;;; +A069;YI SYLLABLE BBEX;Lo;0;L;;;;;N;;;;; +A06A;YI SYLLABLE BBE;Lo;0;L;;;;;N;;;;; +A06B;YI SYLLABLE BBEP;Lo;0;L;;;;;N;;;;; +A06C;YI SYLLABLE BBUT;Lo;0;L;;;;;N;;;;; +A06D;YI SYLLABLE BBUX;Lo;0;L;;;;;N;;;;; +A06E;YI SYLLABLE BBU;Lo;0;L;;;;;N;;;;; +A06F;YI SYLLABLE BBUP;Lo;0;L;;;;;N;;;;; +A070;YI SYLLABLE BBURX;Lo;0;L;;;;;N;;;;; +A071;YI SYLLABLE BBUR;Lo;0;L;;;;;N;;;;; +A072;YI SYLLABLE BBYT;Lo;0;L;;;;;N;;;;; +A073;YI SYLLABLE BBYX;Lo;0;L;;;;;N;;;;; +A074;YI SYLLABLE BBY;Lo;0;L;;;;;N;;;;; +A075;YI SYLLABLE BBYP;Lo;0;L;;;;;N;;;;; +A076;YI SYLLABLE NBIT;Lo;0;L;;;;;N;;;;; +A077;YI SYLLABLE NBIX;Lo;0;L;;;;;N;;;;; +A078;YI SYLLABLE NBI;Lo;0;L;;;;;N;;;;; +A079;YI SYLLABLE NBIP;Lo;0;L;;;;;N;;;;; +A07A;YI SYLLABLE NBIEX;Lo;0;L;;;;;N;;;;; +A07B;YI SYLLABLE NBIE;Lo;0;L;;;;;N;;;;; +A07C;YI SYLLABLE NBIEP;Lo;0;L;;;;;N;;;;; +A07D;YI SYLLABLE NBAT;Lo;0;L;;;;;N;;;;; +A07E;YI SYLLABLE NBAX;Lo;0;L;;;;;N;;;;; +A07F;YI SYLLABLE NBA;Lo;0;L;;;;;N;;;;; +A080;YI SYLLABLE NBAP;Lo;0;L;;;;;N;;;;; +A081;YI SYLLABLE NBOT;Lo;0;L;;;;;N;;;;; +A082;YI SYLLABLE NBOX;Lo;0;L;;;;;N;;;;; +A083;YI SYLLABLE NBO;Lo;0;L;;;;;N;;;;; +A084;YI SYLLABLE NBOP;Lo;0;L;;;;;N;;;;; +A085;YI SYLLABLE NBUT;Lo;0;L;;;;;N;;;;; +A086;YI SYLLABLE NBUX;Lo;0;L;;;;;N;;;;; +A087;YI SYLLABLE NBU;Lo;0;L;;;;;N;;;;; +A088;YI SYLLABLE NBUP;Lo;0;L;;;;;N;;;;; +A089;YI SYLLABLE NBURX;Lo;0;L;;;;;N;;;;; +A08A;YI SYLLABLE NBUR;Lo;0;L;;;;;N;;;;; +A08B;YI SYLLABLE NBYT;Lo;0;L;;;;;N;;;;; +A08C;YI SYLLABLE NBYX;Lo;0;L;;;;;N;;;;; +A08D;YI SYLLABLE NBY;Lo;0;L;;;;;N;;;;; +A08E;YI SYLLABLE NBYP;Lo;0;L;;;;;N;;;;; +A08F;YI SYLLABLE NBYRX;Lo;0;L;;;;;N;;;;; +A090;YI SYLLABLE NBYR;Lo;0;L;;;;;N;;;;; +A091;YI SYLLABLE HMIT;Lo;0;L;;;;;N;;;;; +A092;YI SYLLABLE HMIX;Lo;0;L;;;;;N;;;;; +A093;YI SYLLABLE HMI;Lo;0;L;;;;;N;;;;; +A094;YI SYLLABLE HMIP;Lo;0;L;;;;;N;;;;; +A095;YI SYLLABLE HMIEX;Lo;0;L;;;;;N;;;;; +A096;YI SYLLABLE HMIE;Lo;0;L;;;;;N;;;;; +A097;YI SYLLABLE HMIEP;Lo;0;L;;;;;N;;;;; +A098;YI SYLLABLE HMAT;Lo;0;L;;;;;N;;;;; +A099;YI SYLLABLE HMAX;Lo;0;L;;;;;N;;;;; +A09A;YI SYLLABLE HMA;Lo;0;L;;;;;N;;;;; +A09B;YI SYLLABLE HMAP;Lo;0;L;;;;;N;;;;; +A09C;YI SYLLABLE HMUOX;Lo;0;L;;;;;N;;;;; +A09D;YI SYLLABLE HMUO;Lo;0;L;;;;;N;;;;; +A09E;YI SYLLABLE HMUOP;Lo;0;L;;;;;N;;;;; +A09F;YI SYLLABLE HMOT;Lo;0;L;;;;;N;;;;; +A0A0;YI SYLLABLE HMOX;Lo;0;L;;;;;N;;;;; +A0A1;YI SYLLABLE HMO;Lo;0;L;;;;;N;;;;; +A0A2;YI SYLLABLE HMOP;Lo;0;L;;;;;N;;;;; +A0A3;YI SYLLABLE HMUT;Lo;0;L;;;;;N;;;;; +A0A4;YI SYLLABLE HMUX;Lo;0;L;;;;;N;;;;; +A0A5;YI SYLLABLE HMU;Lo;0;L;;;;;N;;;;; +A0A6;YI SYLLABLE HMUP;Lo;0;L;;;;;N;;;;; +A0A7;YI SYLLABLE HMURX;Lo;0;L;;;;;N;;;;; +A0A8;YI SYLLABLE HMUR;Lo;0;L;;;;;N;;;;; +A0A9;YI SYLLABLE HMYX;Lo;0;L;;;;;N;;;;; +A0AA;YI SYLLABLE HMY;Lo;0;L;;;;;N;;;;; +A0AB;YI SYLLABLE HMYP;Lo;0;L;;;;;N;;;;; +A0AC;YI SYLLABLE HMYRX;Lo;0;L;;;;;N;;;;; +A0AD;YI SYLLABLE HMYR;Lo;0;L;;;;;N;;;;; +A0AE;YI SYLLABLE MIT;Lo;0;L;;;;;N;;;;; +A0AF;YI SYLLABLE MIX;Lo;0;L;;;;;N;;;;; +A0B0;YI SYLLABLE MI;Lo;0;L;;;;;N;;;;; +A0B1;YI SYLLABLE MIP;Lo;0;L;;;;;N;;;;; +A0B2;YI SYLLABLE MIEX;Lo;0;L;;;;;N;;;;; +A0B3;YI SYLLABLE MIE;Lo;0;L;;;;;N;;;;; +A0B4;YI SYLLABLE MIEP;Lo;0;L;;;;;N;;;;; +A0B5;YI SYLLABLE MAT;Lo;0;L;;;;;N;;;;; +A0B6;YI SYLLABLE MAX;Lo;0;L;;;;;N;;;;; +A0B7;YI SYLLABLE MA;Lo;0;L;;;;;N;;;;; +A0B8;YI SYLLABLE MAP;Lo;0;L;;;;;N;;;;; +A0B9;YI SYLLABLE MUOT;Lo;0;L;;;;;N;;;;; +A0BA;YI SYLLABLE MUOX;Lo;0;L;;;;;N;;;;; +A0BB;YI SYLLABLE MUO;Lo;0;L;;;;;N;;;;; +A0BC;YI SYLLABLE MUOP;Lo;0;L;;;;;N;;;;; +A0BD;YI SYLLABLE MOT;Lo;0;L;;;;;N;;;;; +A0BE;YI SYLLABLE MOX;Lo;0;L;;;;;N;;;;; +A0BF;YI SYLLABLE MO;Lo;0;L;;;;;N;;;;; +A0C0;YI SYLLABLE MOP;Lo;0;L;;;;;N;;;;; +A0C1;YI SYLLABLE MEX;Lo;0;L;;;;;N;;;;; +A0C2;YI SYLLABLE ME;Lo;0;L;;;;;N;;;;; +A0C3;YI SYLLABLE MUT;Lo;0;L;;;;;N;;;;; +A0C4;YI SYLLABLE MUX;Lo;0;L;;;;;N;;;;; +A0C5;YI SYLLABLE MU;Lo;0;L;;;;;N;;;;; +A0C6;YI SYLLABLE MUP;Lo;0;L;;;;;N;;;;; +A0C7;YI SYLLABLE MURX;Lo;0;L;;;;;N;;;;; +A0C8;YI SYLLABLE MUR;Lo;0;L;;;;;N;;;;; +A0C9;YI SYLLABLE MYT;Lo;0;L;;;;;N;;;;; +A0CA;YI SYLLABLE MYX;Lo;0;L;;;;;N;;;;; +A0CB;YI SYLLABLE MY;Lo;0;L;;;;;N;;;;; +A0CC;YI SYLLABLE MYP;Lo;0;L;;;;;N;;;;; +A0CD;YI SYLLABLE FIT;Lo;0;L;;;;;N;;;;; +A0CE;YI SYLLABLE FIX;Lo;0;L;;;;;N;;;;; +A0CF;YI SYLLABLE FI;Lo;0;L;;;;;N;;;;; +A0D0;YI SYLLABLE FIP;Lo;0;L;;;;;N;;;;; +A0D1;YI SYLLABLE FAT;Lo;0;L;;;;;N;;;;; +A0D2;YI SYLLABLE FAX;Lo;0;L;;;;;N;;;;; +A0D3;YI SYLLABLE FA;Lo;0;L;;;;;N;;;;; +A0D4;YI SYLLABLE FAP;Lo;0;L;;;;;N;;;;; +A0D5;YI SYLLABLE FOX;Lo;0;L;;;;;N;;;;; +A0D6;YI SYLLABLE FO;Lo;0;L;;;;;N;;;;; +A0D7;YI SYLLABLE FOP;Lo;0;L;;;;;N;;;;; +A0D8;YI SYLLABLE FUT;Lo;0;L;;;;;N;;;;; +A0D9;YI SYLLABLE FUX;Lo;0;L;;;;;N;;;;; +A0DA;YI SYLLABLE FU;Lo;0;L;;;;;N;;;;; +A0DB;YI SYLLABLE FUP;Lo;0;L;;;;;N;;;;; +A0DC;YI SYLLABLE FURX;Lo;0;L;;;;;N;;;;; +A0DD;YI SYLLABLE FUR;Lo;0;L;;;;;N;;;;; +A0DE;YI SYLLABLE FYT;Lo;0;L;;;;;N;;;;; +A0DF;YI SYLLABLE FYX;Lo;0;L;;;;;N;;;;; +A0E0;YI SYLLABLE FY;Lo;0;L;;;;;N;;;;; +A0E1;YI SYLLABLE FYP;Lo;0;L;;;;;N;;;;; +A0E2;YI SYLLABLE VIT;Lo;0;L;;;;;N;;;;; +A0E3;YI SYLLABLE VIX;Lo;0;L;;;;;N;;;;; +A0E4;YI SYLLABLE VI;Lo;0;L;;;;;N;;;;; +A0E5;YI SYLLABLE VIP;Lo;0;L;;;;;N;;;;; +A0E6;YI SYLLABLE VIET;Lo;0;L;;;;;N;;;;; +A0E7;YI SYLLABLE VIEX;Lo;0;L;;;;;N;;;;; +A0E8;YI SYLLABLE VIE;Lo;0;L;;;;;N;;;;; +A0E9;YI SYLLABLE VIEP;Lo;0;L;;;;;N;;;;; +A0EA;YI SYLLABLE VAT;Lo;0;L;;;;;N;;;;; +A0EB;YI SYLLABLE VAX;Lo;0;L;;;;;N;;;;; +A0EC;YI SYLLABLE VA;Lo;0;L;;;;;N;;;;; +A0ED;YI SYLLABLE VAP;Lo;0;L;;;;;N;;;;; +A0EE;YI SYLLABLE VOT;Lo;0;L;;;;;N;;;;; +A0EF;YI SYLLABLE VOX;Lo;0;L;;;;;N;;;;; +A0F0;YI SYLLABLE VO;Lo;0;L;;;;;N;;;;; +A0F1;YI SYLLABLE VOP;Lo;0;L;;;;;N;;;;; +A0F2;YI SYLLABLE VEX;Lo;0;L;;;;;N;;;;; +A0F3;YI SYLLABLE VEP;Lo;0;L;;;;;N;;;;; +A0F4;YI SYLLABLE VUT;Lo;0;L;;;;;N;;;;; +A0F5;YI SYLLABLE VUX;Lo;0;L;;;;;N;;;;; +A0F6;YI SYLLABLE VU;Lo;0;L;;;;;N;;;;; +A0F7;YI SYLLABLE VUP;Lo;0;L;;;;;N;;;;; +A0F8;YI SYLLABLE VURX;Lo;0;L;;;;;N;;;;; +A0F9;YI SYLLABLE VUR;Lo;0;L;;;;;N;;;;; +A0FA;YI SYLLABLE VYT;Lo;0;L;;;;;N;;;;; +A0FB;YI SYLLABLE VYX;Lo;0;L;;;;;N;;;;; +A0FC;YI SYLLABLE VY;Lo;0;L;;;;;N;;;;; +A0FD;YI SYLLABLE VYP;Lo;0;L;;;;;N;;;;; +A0FE;YI SYLLABLE VYRX;Lo;0;L;;;;;N;;;;; +A0FF;YI SYLLABLE VYR;Lo;0;L;;;;;N;;;;; +A100;YI SYLLABLE DIT;Lo;0;L;;;;;N;;;;; +A101;YI SYLLABLE DIX;Lo;0;L;;;;;N;;;;; +A102;YI SYLLABLE DI;Lo;0;L;;;;;N;;;;; +A103;YI SYLLABLE DIP;Lo;0;L;;;;;N;;;;; +A104;YI SYLLABLE DIEX;Lo;0;L;;;;;N;;;;; +A105;YI SYLLABLE DIE;Lo;0;L;;;;;N;;;;; +A106;YI SYLLABLE DIEP;Lo;0;L;;;;;N;;;;; +A107;YI SYLLABLE DAT;Lo;0;L;;;;;N;;;;; +A108;YI SYLLABLE DAX;Lo;0;L;;;;;N;;;;; +A109;YI SYLLABLE DA;Lo;0;L;;;;;N;;;;; +A10A;YI SYLLABLE DAP;Lo;0;L;;;;;N;;;;; +A10B;YI SYLLABLE DUOX;Lo;0;L;;;;;N;;;;; +A10C;YI SYLLABLE DUO;Lo;0;L;;;;;N;;;;; +A10D;YI SYLLABLE DOT;Lo;0;L;;;;;N;;;;; +A10E;YI SYLLABLE DOX;Lo;0;L;;;;;N;;;;; +A10F;YI SYLLABLE DO;Lo;0;L;;;;;N;;;;; +A110;YI SYLLABLE DOP;Lo;0;L;;;;;N;;;;; +A111;YI SYLLABLE DEX;Lo;0;L;;;;;N;;;;; +A112;YI SYLLABLE DE;Lo;0;L;;;;;N;;;;; +A113;YI SYLLABLE DEP;Lo;0;L;;;;;N;;;;; +A114;YI SYLLABLE DUT;Lo;0;L;;;;;N;;;;; +A115;YI SYLLABLE DUX;Lo;0;L;;;;;N;;;;; +A116;YI SYLLABLE DU;Lo;0;L;;;;;N;;;;; +A117;YI SYLLABLE DUP;Lo;0;L;;;;;N;;;;; +A118;YI SYLLABLE DURX;Lo;0;L;;;;;N;;;;; +A119;YI SYLLABLE DUR;Lo;0;L;;;;;N;;;;; +A11A;YI SYLLABLE TIT;Lo;0;L;;;;;N;;;;; +A11B;YI SYLLABLE TIX;Lo;0;L;;;;;N;;;;; +A11C;YI SYLLABLE TI;Lo;0;L;;;;;N;;;;; +A11D;YI SYLLABLE TIP;Lo;0;L;;;;;N;;;;; +A11E;YI SYLLABLE TIEX;Lo;0;L;;;;;N;;;;; +A11F;YI SYLLABLE TIE;Lo;0;L;;;;;N;;;;; +A120;YI SYLLABLE TIEP;Lo;0;L;;;;;N;;;;; +A121;YI SYLLABLE TAT;Lo;0;L;;;;;N;;;;; +A122;YI SYLLABLE TAX;Lo;0;L;;;;;N;;;;; +A123;YI SYLLABLE TA;Lo;0;L;;;;;N;;;;; +A124;YI SYLLABLE TAP;Lo;0;L;;;;;N;;;;; +A125;YI SYLLABLE TUOT;Lo;0;L;;;;;N;;;;; +A126;YI SYLLABLE TUOX;Lo;0;L;;;;;N;;;;; +A127;YI SYLLABLE TUO;Lo;0;L;;;;;N;;;;; +A128;YI SYLLABLE TUOP;Lo;0;L;;;;;N;;;;; +A129;YI SYLLABLE TOT;Lo;0;L;;;;;N;;;;; +A12A;YI SYLLABLE TOX;Lo;0;L;;;;;N;;;;; +A12B;YI SYLLABLE TO;Lo;0;L;;;;;N;;;;; +A12C;YI SYLLABLE TOP;Lo;0;L;;;;;N;;;;; +A12D;YI SYLLABLE TEX;Lo;0;L;;;;;N;;;;; +A12E;YI SYLLABLE TE;Lo;0;L;;;;;N;;;;; +A12F;YI SYLLABLE TEP;Lo;0;L;;;;;N;;;;; +A130;YI SYLLABLE TUT;Lo;0;L;;;;;N;;;;; +A131;YI SYLLABLE TUX;Lo;0;L;;;;;N;;;;; +A132;YI SYLLABLE TU;Lo;0;L;;;;;N;;;;; +A133;YI SYLLABLE TUP;Lo;0;L;;;;;N;;;;; +A134;YI SYLLABLE TURX;Lo;0;L;;;;;N;;;;; +A135;YI SYLLABLE TUR;Lo;0;L;;;;;N;;;;; +A136;YI SYLLABLE DDIT;Lo;0;L;;;;;N;;;;; +A137;YI SYLLABLE DDIX;Lo;0;L;;;;;N;;;;; +A138;YI SYLLABLE DDI;Lo;0;L;;;;;N;;;;; +A139;YI SYLLABLE DDIP;Lo;0;L;;;;;N;;;;; +A13A;YI SYLLABLE DDIEX;Lo;0;L;;;;;N;;;;; +A13B;YI SYLLABLE DDIE;Lo;0;L;;;;;N;;;;; +A13C;YI SYLLABLE DDIEP;Lo;0;L;;;;;N;;;;; +A13D;YI SYLLABLE DDAT;Lo;0;L;;;;;N;;;;; +A13E;YI SYLLABLE DDAX;Lo;0;L;;;;;N;;;;; +A13F;YI SYLLABLE DDA;Lo;0;L;;;;;N;;;;; +A140;YI SYLLABLE DDAP;Lo;0;L;;;;;N;;;;; +A141;YI SYLLABLE DDUOX;Lo;0;L;;;;;N;;;;; +A142;YI SYLLABLE DDUO;Lo;0;L;;;;;N;;;;; +A143;YI SYLLABLE DDUOP;Lo;0;L;;;;;N;;;;; +A144;YI SYLLABLE DDOT;Lo;0;L;;;;;N;;;;; +A145;YI SYLLABLE DDOX;Lo;0;L;;;;;N;;;;; +A146;YI SYLLABLE DDO;Lo;0;L;;;;;N;;;;; +A147;YI SYLLABLE DDOP;Lo;0;L;;;;;N;;;;; +A148;YI SYLLABLE DDEX;Lo;0;L;;;;;N;;;;; +A149;YI SYLLABLE DDE;Lo;0;L;;;;;N;;;;; +A14A;YI SYLLABLE DDEP;Lo;0;L;;;;;N;;;;; +A14B;YI SYLLABLE DDUT;Lo;0;L;;;;;N;;;;; +A14C;YI SYLLABLE DDUX;Lo;0;L;;;;;N;;;;; +A14D;YI SYLLABLE DDU;Lo;0;L;;;;;N;;;;; +A14E;YI SYLLABLE DDUP;Lo;0;L;;;;;N;;;;; +A14F;YI SYLLABLE DDURX;Lo;0;L;;;;;N;;;;; +A150;YI SYLLABLE DDUR;Lo;0;L;;;;;N;;;;; +A151;YI SYLLABLE NDIT;Lo;0;L;;;;;N;;;;; +A152;YI SYLLABLE NDIX;Lo;0;L;;;;;N;;;;; +A153;YI SYLLABLE NDI;Lo;0;L;;;;;N;;;;; +A154;YI SYLLABLE NDIP;Lo;0;L;;;;;N;;;;; +A155;YI SYLLABLE NDIEX;Lo;0;L;;;;;N;;;;; +A156;YI SYLLABLE NDIE;Lo;0;L;;;;;N;;;;; +A157;YI SYLLABLE NDAT;Lo;0;L;;;;;N;;;;; +A158;YI SYLLABLE NDAX;Lo;0;L;;;;;N;;;;; +A159;YI SYLLABLE NDA;Lo;0;L;;;;;N;;;;; +A15A;YI SYLLABLE NDAP;Lo;0;L;;;;;N;;;;; +A15B;YI SYLLABLE NDOT;Lo;0;L;;;;;N;;;;; +A15C;YI SYLLABLE NDOX;Lo;0;L;;;;;N;;;;; +A15D;YI SYLLABLE NDO;Lo;0;L;;;;;N;;;;; +A15E;YI SYLLABLE NDOP;Lo;0;L;;;;;N;;;;; +A15F;YI SYLLABLE NDEX;Lo;0;L;;;;;N;;;;; +A160;YI SYLLABLE NDE;Lo;0;L;;;;;N;;;;; +A161;YI SYLLABLE NDEP;Lo;0;L;;;;;N;;;;; +A162;YI SYLLABLE NDUT;Lo;0;L;;;;;N;;;;; +A163;YI SYLLABLE NDUX;Lo;0;L;;;;;N;;;;; +A164;YI SYLLABLE NDU;Lo;0;L;;;;;N;;;;; +A165;YI SYLLABLE NDUP;Lo;0;L;;;;;N;;;;; +A166;YI SYLLABLE NDURX;Lo;0;L;;;;;N;;;;; +A167;YI SYLLABLE NDUR;Lo;0;L;;;;;N;;;;; +A168;YI SYLLABLE HNIT;Lo;0;L;;;;;N;;;;; +A169;YI SYLLABLE HNIX;Lo;0;L;;;;;N;;;;; +A16A;YI SYLLABLE HNI;Lo;0;L;;;;;N;;;;; +A16B;YI SYLLABLE HNIP;Lo;0;L;;;;;N;;;;; +A16C;YI SYLLABLE HNIET;Lo;0;L;;;;;N;;;;; +A16D;YI SYLLABLE HNIEX;Lo;0;L;;;;;N;;;;; +A16E;YI SYLLABLE HNIE;Lo;0;L;;;;;N;;;;; +A16F;YI SYLLABLE HNIEP;Lo;0;L;;;;;N;;;;; +A170;YI SYLLABLE HNAT;Lo;0;L;;;;;N;;;;; +A171;YI SYLLABLE HNAX;Lo;0;L;;;;;N;;;;; +A172;YI SYLLABLE HNA;Lo;0;L;;;;;N;;;;; +A173;YI SYLLABLE HNAP;Lo;0;L;;;;;N;;;;; +A174;YI SYLLABLE HNUOX;Lo;0;L;;;;;N;;;;; +A175;YI SYLLABLE HNUO;Lo;0;L;;;;;N;;;;; +A176;YI SYLLABLE HNOT;Lo;0;L;;;;;N;;;;; +A177;YI SYLLABLE HNOX;Lo;0;L;;;;;N;;;;; +A178;YI SYLLABLE HNOP;Lo;0;L;;;;;N;;;;; +A179;YI SYLLABLE HNEX;Lo;0;L;;;;;N;;;;; +A17A;YI SYLLABLE HNE;Lo;0;L;;;;;N;;;;; +A17B;YI SYLLABLE HNEP;Lo;0;L;;;;;N;;;;; +A17C;YI SYLLABLE HNUT;Lo;0;L;;;;;N;;;;; +A17D;YI SYLLABLE NIT;Lo;0;L;;;;;N;;;;; +A17E;YI SYLLABLE NIX;Lo;0;L;;;;;N;;;;; +A17F;YI SYLLABLE NI;Lo;0;L;;;;;N;;;;; +A180;YI SYLLABLE NIP;Lo;0;L;;;;;N;;;;; +A181;YI SYLLABLE NIEX;Lo;0;L;;;;;N;;;;; +A182;YI SYLLABLE NIE;Lo;0;L;;;;;N;;;;; +A183;YI SYLLABLE NIEP;Lo;0;L;;;;;N;;;;; +A184;YI SYLLABLE NAX;Lo;0;L;;;;;N;;;;; +A185;YI SYLLABLE NA;Lo;0;L;;;;;N;;;;; +A186;YI SYLLABLE NAP;Lo;0;L;;;;;N;;;;; +A187;YI SYLLABLE NUOX;Lo;0;L;;;;;N;;;;; +A188;YI SYLLABLE NUO;Lo;0;L;;;;;N;;;;; +A189;YI SYLLABLE NUOP;Lo;0;L;;;;;N;;;;; +A18A;YI SYLLABLE NOT;Lo;0;L;;;;;N;;;;; +A18B;YI SYLLABLE NOX;Lo;0;L;;;;;N;;;;; +A18C;YI SYLLABLE NO;Lo;0;L;;;;;N;;;;; +A18D;YI SYLLABLE NOP;Lo;0;L;;;;;N;;;;; +A18E;YI SYLLABLE NEX;Lo;0;L;;;;;N;;;;; +A18F;YI SYLLABLE NE;Lo;0;L;;;;;N;;;;; +A190;YI SYLLABLE NEP;Lo;0;L;;;;;N;;;;; +A191;YI SYLLABLE NUT;Lo;0;L;;;;;N;;;;; +A192;YI SYLLABLE NUX;Lo;0;L;;;;;N;;;;; +A193;YI SYLLABLE NU;Lo;0;L;;;;;N;;;;; +A194;YI SYLLABLE NUP;Lo;0;L;;;;;N;;;;; +A195;YI SYLLABLE NURX;Lo;0;L;;;;;N;;;;; +A196;YI SYLLABLE NUR;Lo;0;L;;;;;N;;;;; +A197;YI SYLLABLE HLIT;Lo;0;L;;;;;N;;;;; +A198;YI SYLLABLE HLIX;Lo;0;L;;;;;N;;;;; +A199;YI SYLLABLE HLI;Lo;0;L;;;;;N;;;;; +A19A;YI SYLLABLE HLIP;Lo;0;L;;;;;N;;;;; +A19B;YI SYLLABLE HLIEX;Lo;0;L;;;;;N;;;;; +A19C;YI SYLLABLE HLIE;Lo;0;L;;;;;N;;;;; +A19D;YI SYLLABLE HLIEP;Lo;0;L;;;;;N;;;;; +A19E;YI SYLLABLE HLAT;Lo;0;L;;;;;N;;;;; +A19F;YI SYLLABLE HLAX;Lo;0;L;;;;;N;;;;; +A1A0;YI SYLLABLE HLA;Lo;0;L;;;;;N;;;;; +A1A1;YI SYLLABLE HLAP;Lo;0;L;;;;;N;;;;; +A1A2;YI SYLLABLE HLUOX;Lo;0;L;;;;;N;;;;; +A1A3;YI SYLLABLE HLUO;Lo;0;L;;;;;N;;;;; +A1A4;YI SYLLABLE HLUOP;Lo;0;L;;;;;N;;;;; +A1A5;YI SYLLABLE HLOX;Lo;0;L;;;;;N;;;;; +A1A6;YI SYLLABLE HLO;Lo;0;L;;;;;N;;;;; +A1A7;YI SYLLABLE HLOP;Lo;0;L;;;;;N;;;;; +A1A8;YI SYLLABLE HLEX;Lo;0;L;;;;;N;;;;; +A1A9;YI SYLLABLE HLE;Lo;0;L;;;;;N;;;;; +A1AA;YI SYLLABLE HLEP;Lo;0;L;;;;;N;;;;; +A1AB;YI SYLLABLE HLUT;Lo;0;L;;;;;N;;;;; +A1AC;YI SYLLABLE HLUX;Lo;0;L;;;;;N;;;;; +A1AD;YI SYLLABLE HLU;Lo;0;L;;;;;N;;;;; +A1AE;YI SYLLABLE HLUP;Lo;0;L;;;;;N;;;;; +A1AF;YI SYLLABLE HLURX;Lo;0;L;;;;;N;;;;; +A1B0;YI SYLLABLE HLUR;Lo;0;L;;;;;N;;;;; +A1B1;YI SYLLABLE HLYT;Lo;0;L;;;;;N;;;;; +A1B2;YI SYLLABLE HLYX;Lo;0;L;;;;;N;;;;; +A1B3;YI SYLLABLE HLY;Lo;0;L;;;;;N;;;;; +A1B4;YI SYLLABLE HLYP;Lo;0;L;;;;;N;;;;; +A1B5;YI SYLLABLE HLYRX;Lo;0;L;;;;;N;;;;; +A1B6;YI SYLLABLE HLYR;Lo;0;L;;;;;N;;;;; +A1B7;YI SYLLABLE LIT;Lo;0;L;;;;;N;;;;; +A1B8;YI SYLLABLE LIX;Lo;0;L;;;;;N;;;;; +A1B9;YI SYLLABLE LI;Lo;0;L;;;;;N;;;;; +A1BA;YI SYLLABLE LIP;Lo;0;L;;;;;N;;;;; +A1BB;YI SYLLABLE LIET;Lo;0;L;;;;;N;;;;; +A1BC;YI SYLLABLE LIEX;Lo;0;L;;;;;N;;;;; +A1BD;YI SYLLABLE LIE;Lo;0;L;;;;;N;;;;; +A1BE;YI SYLLABLE LIEP;Lo;0;L;;;;;N;;;;; +A1BF;YI SYLLABLE LAT;Lo;0;L;;;;;N;;;;; +A1C0;YI SYLLABLE LAX;Lo;0;L;;;;;N;;;;; +A1C1;YI SYLLABLE LA;Lo;0;L;;;;;N;;;;; +A1C2;YI SYLLABLE LAP;Lo;0;L;;;;;N;;;;; +A1C3;YI SYLLABLE LUOT;Lo;0;L;;;;;N;;;;; +A1C4;YI SYLLABLE LUOX;Lo;0;L;;;;;N;;;;; +A1C5;YI SYLLABLE LUO;Lo;0;L;;;;;N;;;;; +A1C6;YI SYLLABLE LUOP;Lo;0;L;;;;;N;;;;; +A1C7;YI SYLLABLE LOT;Lo;0;L;;;;;N;;;;; +A1C8;YI SYLLABLE LOX;Lo;0;L;;;;;N;;;;; +A1C9;YI SYLLABLE LO;Lo;0;L;;;;;N;;;;; +A1CA;YI SYLLABLE LOP;Lo;0;L;;;;;N;;;;; +A1CB;YI SYLLABLE LEX;Lo;0;L;;;;;N;;;;; +A1CC;YI SYLLABLE LE;Lo;0;L;;;;;N;;;;; +A1CD;YI SYLLABLE LEP;Lo;0;L;;;;;N;;;;; +A1CE;YI SYLLABLE LUT;Lo;0;L;;;;;N;;;;; +A1CF;YI SYLLABLE LUX;Lo;0;L;;;;;N;;;;; +A1D0;YI SYLLABLE LU;Lo;0;L;;;;;N;;;;; +A1D1;YI SYLLABLE LUP;Lo;0;L;;;;;N;;;;; +A1D2;YI SYLLABLE LURX;Lo;0;L;;;;;N;;;;; +A1D3;YI SYLLABLE LUR;Lo;0;L;;;;;N;;;;; +A1D4;YI SYLLABLE LYT;Lo;0;L;;;;;N;;;;; +A1D5;YI SYLLABLE LYX;Lo;0;L;;;;;N;;;;; +A1D6;YI SYLLABLE LY;Lo;0;L;;;;;N;;;;; +A1D7;YI SYLLABLE LYP;Lo;0;L;;;;;N;;;;; +A1D8;YI SYLLABLE LYRX;Lo;0;L;;;;;N;;;;; +A1D9;YI SYLLABLE LYR;Lo;0;L;;;;;N;;;;; +A1DA;YI SYLLABLE GIT;Lo;0;L;;;;;N;;;;; +A1DB;YI SYLLABLE GIX;Lo;0;L;;;;;N;;;;; +A1DC;YI SYLLABLE GI;Lo;0;L;;;;;N;;;;; +A1DD;YI SYLLABLE GIP;Lo;0;L;;;;;N;;;;; +A1DE;YI SYLLABLE GIET;Lo;0;L;;;;;N;;;;; +A1DF;YI SYLLABLE GIEX;Lo;0;L;;;;;N;;;;; +A1E0;YI SYLLABLE GIE;Lo;0;L;;;;;N;;;;; +A1E1;YI SYLLABLE GIEP;Lo;0;L;;;;;N;;;;; +A1E2;YI SYLLABLE GAT;Lo;0;L;;;;;N;;;;; +A1E3;YI SYLLABLE GAX;Lo;0;L;;;;;N;;;;; +A1E4;YI SYLLABLE GA;Lo;0;L;;;;;N;;;;; +A1E5;YI SYLLABLE GAP;Lo;0;L;;;;;N;;;;; +A1E6;YI SYLLABLE GUOT;Lo;0;L;;;;;N;;;;; +A1E7;YI SYLLABLE GUOX;Lo;0;L;;;;;N;;;;; +A1E8;YI SYLLABLE GUO;Lo;0;L;;;;;N;;;;; +A1E9;YI SYLLABLE GUOP;Lo;0;L;;;;;N;;;;; +A1EA;YI SYLLABLE GOT;Lo;0;L;;;;;N;;;;; +A1EB;YI SYLLABLE GOX;Lo;0;L;;;;;N;;;;; +A1EC;YI SYLLABLE GO;Lo;0;L;;;;;N;;;;; +A1ED;YI SYLLABLE GOP;Lo;0;L;;;;;N;;;;; +A1EE;YI SYLLABLE GET;Lo;0;L;;;;;N;;;;; +A1EF;YI SYLLABLE GEX;Lo;0;L;;;;;N;;;;; +A1F0;YI SYLLABLE GE;Lo;0;L;;;;;N;;;;; +A1F1;YI SYLLABLE GEP;Lo;0;L;;;;;N;;;;; +A1F2;YI SYLLABLE GUT;Lo;0;L;;;;;N;;;;; +A1F3;YI SYLLABLE GUX;Lo;0;L;;;;;N;;;;; +A1F4;YI SYLLABLE GU;Lo;0;L;;;;;N;;;;; +A1F5;YI SYLLABLE GUP;Lo;0;L;;;;;N;;;;; +A1F6;YI SYLLABLE GURX;Lo;0;L;;;;;N;;;;; +A1F7;YI SYLLABLE GUR;Lo;0;L;;;;;N;;;;; +A1F8;YI SYLLABLE KIT;Lo;0;L;;;;;N;;;;; +A1F9;YI SYLLABLE KIX;Lo;0;L;;;;;N;;;;; +A1FA;YI SYLLABLE KI;Lo;0;L;;;;;N;;;;; +A1FB;YI SYLLABLE KIP;Lo;0;L;;;;;N;;;;; +A1FC;YI SYLLABLE KIEX;Lo;0;L;;;;;N;;;;; +A1FD;YI SYLLABLE KIE;Lo;0;L;;;;;N;;;;; +A1FE;YI SYLLABLE KIEP;Lo;0;L;;;;;N;;;;; +A1FF;YI SYLLABLE KAT;Lo;0;L;;;;;N;;;;; +A200;YI SYLLABLE KAX;Lo;0;L;;;;;N;;;;; +A201;YI SYLLABLE KA;Lo;0;L;;;;;N;;;;; +A202;YI SYLLABLE KAP;Lo;0;L;;;;;N;;;;; +A203;YI SYLLABLE KUOX;Lo;0;L;;;;;N;;;;; +A204;YI SYLLABLE KUO;Lo;0;L;;;;;N;;;;; +A205;YI SYLLABLE KUOP;Lo;0;L;;;;;N;;;;; +A206;YI SYLLABLE KOT;Lo;0;L;;;;;N;;;;; +A207;YI SYLLABLE KOX;Lo;0;L;;;;;N;;;;; +A208;YI SYLLABLE KO;Lo;0;L;;;;;N;;;;; +A209;YI SYLLABLE KOP;Lo;0;L;;;;;N;;;;; +A20A;YI SYLLABLE KET;Lo;0;L;;;;;N;;;;; +A20B;YI SYLLABLE KEX;Lo;0;L;;;;;N;;;;; +A20C;YI SYLLABLE KE;Lo;0;L;;;;;N;;;;; +A20D;YI SYLLABLE KEP;Lo;0;L;;;;;N;;;;; +A20E;YI SYLLABLE KUT;Lo;0;L;;;;;N;;;;; +A20F;YI SYLLABLE KUX;Lo;0;L;;;;;N;;;;; +A210;YI SYLLABLE KU;Lo;0;L;;;;;N;;;;; +A211;YI SYLLABLE KUP;Lo;0;L;;;;;N;;;;; +A212;YI SYLLABLE KURX;Lo;0;L;;;;;N;;;;; +A213;YI SYLLABLE KUR;Lo;0;L;;;;;N;;;;; +A214;YI SYLLABLE GGIT;Lo;0;L;;;;;N;;;;; +A215;YI SYLLABLE GGIX;Lo;0;L;;;;;N;;;;; +A216;YI SYLLABLE GGI;Lo;0;L;;;;;N;;;;; +A217;YI SYLLABLE GGIEX;Lo;0;L;;;;;N;;;;; +A218;YI SYLLABLE GGIE;Lo;0;L;;;;;N;;;;; +A219;YI SYLLABLE GGIEP;Lo;0;L;;;;;N;;;;; +A21A;YI SYLLABLE GGAT;Lo;0;L;;;;;N;;;;; +A21B;YI SYLLABLE GGAX;Lo;0;L;;;;;N;;;;; +A21C;YI SYLLABLE GGA;Lo;0;L;;;;;N;;;;; +A21D;YI SYLLABLE GGAP;Lo;0;L;;;;;N;;;;; +A21E;YI SYLLABLE GGUOT;Lo;0;L;;;;;N;;;;; +A21F;YI SYLLABLE GGUOX;Lo;0;L;;;;;N;;;;; +A220;YI SYLLABLE GGUO;Lo;0;L;;;;;N;;;;; +A221;YI SYLLABLE GGUOP;Lo;0;L;;;;;N;;;;; +A222;YI SYLLABLE GGOT;Lo;0;L;;;;;N;;;;; +A223;YI SYLLABLE GGOX;Lo;0;L;;;;;N;;;;; +A224;YI SYLLABLE GGO;Lo;0;L;;;;;N;;;;; +A225;YI SYLLABLE GGOP;Lo;0;L;;;;;N;;;;; +A226;YI SYLLABLE GGET;Lo;0;L;;;;;N;;;;; +A227;YI SYLLABLE GGEX;Lo;0;L;;;;;N;;;;; +A228;YI SYLLABLE GGE;Lo;0;L;;;;;N;;;;; +A229;YI SYLLABLE GGEP;Lo;0;L;;;;;N;;;;; +A22A;YI SYLLABLE GGUT;Lo;0;L;;;;;N;;;;; +A22B;YI SYLLABLE GGUX;Lo;0;L;;;;;N;;;;; +A22C;YI SYLLABLE GGU;Lo;0;L;;;;;N;;;;; +A22D;YI SYLLABLE GGUP;Lo;0;L;;;;;N;;;;; +A22E;YI SYLLABLE GGURX;Lo;0;L;;;;;N;;;;; +A22F;YI SYLLABLE GGUR;Lo;0;L;;;;;N;;;;; +A230;YI SYLLABLE MGIEX;Lo;0;L;;;;;N;;;;; +A231;YI SYLLABLE MGIE;Lo;0;L;;;;;N;;;;; +A232;YI SYLLABLE MGAT;Lo;0;L;;;;;N;;;;; +A233;YI SYLLABLE MGAX;Lo;0;L;;;;;N;;;;; +A234;YI SYLLABLE MGA;Lo;0;L;;;;;N;;;;; +A235;YI SYLLABLE MGAP;Lo;0;L;;;;;N;;;;; +A236;YI SYLLABLE MGUOX;Lo;0;L;;;;;N;;;;; +A237;YI SYLLABLE MGUO;Lo;0;L;;;;;N;;;;; +A238;YI SYLLABLE MGUOP;Lo;0;L;;;;;N;;;;; +A239;YI SYLLABLE MGOT;Lo;0;L;;;;;N;;;;; +A23A;YI SYLLABLE MGOX;Lo;0;L;;;;;N;;;;; +A23B;YI SYLLABLE MGO;Lo;0;L;;;;;N;;;;; +A23C;YI SYLLABLE MGOP;Lo;0;L;;;;;N;;;;; +A23D;YI SYLLABLE MGEX;Lo;0;L;;;;;N;;;;; +A23E;YI SYLLABLE MGE;Lo;0;L;;;;;N;;;;; +A23F;YI SYLLABLE MGEP;Lo;0;L;;;;;N;;;;; +A240;YI SYLLABLE MGUT;Lo;0;L;;;;;N;;;;; +A241;YI SYLLABLE MGUX;Lo;0;L;;;;;N;;;;; +A242;YI SYLLABLE MGU;Lo;0;L;;;;;N;;;;; +A243;YI SYLLABLE MGUP;Lo;0;L;;;;;N;;;;; +A244;YI SYLLABLE MGURX;Lo;0;L;;;;;N;;;;; +A245;YI SYLLABLE MGUR;Lo;0;L;;;;;N;;;;; +A246;YI SYLLABLE HXIT;Lo;0;L;;;;;N;;;;; +A247;YI SYLLABLE HXIX;Lo;0;L;;;;;N;;;;; +A248;YI SYLLABLE HXI;Lo;0;L;;;;;N;;;;; +A249;YI SYLLABLE HXIP;Lo;0;L;;;;;N;;;;; +A24A;YI SYLLABLE HXIET;Lo;0;L;;;;;N;;;;; +A24B;YI SYLLABLE HXIEX;Lo;0;L;;;;;N;;;;; +A24C;YI SYLLABLE HXIE;Lo;0;L;;;;;N;;;;; +A24D;YI SYLLABLE HXIEP;Lo;0;L;;;;;N;;;;; +A24E;YI SYLLABLE HXAT;Lo;0;L;;;;;N;;;;; +A24F;YI SYLLABLE HXAX;Lo;0;L;;;;;N;;;;; +A250;YI SYLLABLE HXA;Lo;0;L;;;;;N;;;;; +A251;YI SYLLABLE HXAP;Lo;0;L;;;;;N;;;;; +A252;YI SYLLABLE HXUOT;Lo;0;L;;;;;N;;;;; +A253;YI SYLLABLE HXUOX;Lo;0;L;;;;;N;;;;; +A254;YI SYLLABLE HXUO;Lo;0;L;;;;;N;;;;; +A255;YI SYLLABLE HXUOP;Lo;0;L;;;;;N;;;;; +A256;YI SYLLABLE HXOT;Lo;0;L;;;;;N;;;;; +A257;YI SYLLABLE HXOX;Lo;0;L;;;;;N;;;;; +A258;YI SYLLABLE HXO;Lo;0;L;;;;;N;;;;; +A259;YI SYLLABLE HXOP;Lo;0;L;;;;;N;;;;; +A25A;YI SYLLABLE HXEX;Lo;0;L;;;;;N;;;;; +A25B;YI SYLLABLE HXE;Lo;0;L;;;;;N;;;;; +A25C;YI SYLLABLE HXEP;Lo;0;L;;;;;N;;;;; +A25D;YI SYLLABLE NGIEX;Lo;0;L;;;;;N;;;;; +A25E;YI SYLLABLE NGIE;Lo;0;L;;;;;N;;;;; +A25F;YI SYLLABLE NGIEP;Lo;0;L;;;;;N;;;;; +A260;YI SYLLABLE NGAT;Lo;0;L;;;;;N;;;;; +A261;YI SYLLABLE NGAX;Lo;0;L;;;;;N;;;;; +A262;YI SYLLABLE NGA;Lo;0;L;;;;;N;;;;; +A263;YI SYLLABLE NGAP;Lo;0;L;;;;;N;;;;; +A264;YI SYLLABLE NGUOT;Lo;0;L;;;;;N;;;;; +A265;YI SYLLABLE NGUOX;Lo;0;L;;;;;N;;;;; +A266;YI SYLLABLE NGUO;Lo;0;L;;;;;N;;;;; +A267;YI SYLLABLE NGOT;Lo;0;L;;;;;N;;;;; +A268;YI SYLLABLE NGOX;Lo;0;L;;;;;N;;;;; +A269;YI SYLLABLE NGO;Lo;0;L;;;;;N;;;;; +A26A;YI SYLLABLE NGOP;Lo;0;L;;;;;N;;;;; +A26B;YI SYLLABLE NGEX;Lo;0;L;;;;;N;;;;; +A26C;YI SYLLABLE NGE;Lo;0;L;;;;;N;;;;; +A26D;YI SYLLABLE NGEP;Lo;0;L;;;;;N;;;;; +A26E;YI SYLLABLE HIT;Lo;0;L;;;;;N;;;;; +A26F;YI SYLLABLE HIEX;Lo;0;L;;;;;N;;;;; +A270;YI SYLLABLE HIE;Lo;0;L;;;;;N;;;;; +A271;YI SYLLABLE HAT;Lo;0;L;;;;;N;;;;; +A272;YI SYLLABLE HAX;Lo;0;L;;;;;N;;;;; +A273;YI SYLLABLE HA;Lo;0;L;;;;;N;;;;; +A274;YI SYLLABLE HAP;Lo;0;L;;;;;N;;;;; +A275;YI SYLLABLE HUOT;Lo;0;L;;;;;N;;;;; +A276;YI SYLLABLE HUOX;Lo;0;L;;;;;N;;;;; +A277;YI SYLLABLE HUO;Lo;0;L;;;;;N;;;;; +A278;YI SYLLABLE HUOP;Lo;0;L;;;;;N;;;;; +A279;YI SYLLABLE HOT;Lo;0;L;;;;;N;;;;; +A27A;YI SYLLABLE HOX;Lo;0;L;;;;;N;;;;; +A27B;YI SYLLABLE HO;Lo;0;L;;;;;N;;;;; +A27C;YI SYLLABLE HOP;Lo;0;L;;;;;N;;;;; +A27D;YI SYLLABLE HEX;Lo;0;L;;;;;N;;;;; +A27E;YI SYLLABLE HE;Lo;0;L;;;;;N;;;;; +A27F;YI SYLLABLE HEP;Lo;0;L;;;;;N;;;;; +A280;YI SYLLABLE WAT;Lo;0;L;;;;;N;;;;; +A281;YI SYLLABLE WAX;Lo;0;L;;;;;N;;;;; +A282;YI SYLLABLE WA;Lo;0;L;;;;;N;;;;; +A283;YI SYLLABLE WAP;Lo;0;L;;;;;N;;;;; +A284;YI SYLLABLE WUOX;Lo;0;L;;;;;N;;;;; +A285;YI SYLLABLE WUO;Lo;0;L;;;;;N;;;;; +A286;YI SYLLABLE WUOP;Lo;0;L;;;;;N;;;;; +A287;YI SYLLABLE WOX;Lo;0;L;;;;;N;;;;; +A288;YI SYLLABLE WO;Lo;0;L;;;;;N;;;;; +A289;YI SYLLABLE WOP;Lo;0;L;;;;;N;;;;; +A28A;YI SYLLABLE WEX;Lo;0;L;;;;;N;;;;; +A28B;YI SYLLABLE WE;Lo;0;L;;;;;N;;;;; +A28C;YI SYLLABLE WEP;Lo;0;L;;;;;N;;;;; +A28D;YI SYLLABLE ZIT;Lo;0;L;;;;;N;;;;; +A28E;YI SYLLABLE ZIX;Lo;0;L;;;;;N;;;;; +A28F;YI SYLLABLE ZI;Lo;0;L;;;;;N;;;;; +A290;YI SYLLABLE ZIP;Lo;0;L;;;;;N;;;;; +A291;YI SYLLABLE ZIEX;Lo;0;L;;;;;N;;;;; +A292;YI SYLLABLE ZIE;Lo;0;L;;;;;N;;;;; +A293;YI SYLLABLE ZIEP;Lo;0;L;;;;;N;;;;; +A294;YI SYLLABLE ZAT;Lo;0;L;;;;;N;;;;; +A295;YI SYLLABLE ZAX;Lo;0;L;;;;;N;;;;; +A296;YI SYLLABLE ZA;Lo;0;L;;;;;N;;;;; +A297;YI SYLLABLE ZAP;Lo;0;L;;;;;N;;;;; +A298;YI SYLLABLE ZUOX;Lo;0;L;;;;;N;;;;; +A299;YI SYLLABLE ZUO;Lo;0;L;;;;;N;;;;; +A29A;YI SYLLABLE ZUOP;Lo;0;L;;;;;N;;;;; +A29B;YI SYLLABLE ZOT;Lo;0;L;;;;;N;;;;; +A29C;YI SYLLABLE ZOX;Lo;0;L;;;;;N;;;;; +A29D;YI SYLLABLE ZO;Lo;0;L;;;;;N;;;;; +A29E;YI SYLLABLE ZOP;Lo;0;L;;;;;N;;;;; +A29F;YI SYLLABLE ZEX;Lo;0;L;;;;;N;;;;; +A2A0;YI SYLLABLE ZE;Lo;0;L;;;;;N;;;;; +A2A1;YI SYLLABLE ZEP;Lo;0;L;;;;;N;;;;; +A2A2;YI SYLLABLE ZUT;Lo;0;L;;;;;N;;;;; +A2A3;YI SYLLABLE ZUX;Lo;0;L;;;;;N;;;;; +A2A4;YI SYLLABLE ZU;Lo;0;L;;;;;N;;;;; +A2A5;YI SYLLABLE ZUP;Lo;0;L;;;;;N;;;;; +A2A6;YI SYLLABLE ZURX;Lo;0;L;;;;;N;;;;; +A2A7;YI SYLLABLE ZUR;Lo;0;L;;;;;N;;;;; +A2A8;YI SYLLABLE ZYT;Lo;0;L;;;;;N;;;;; +A2A9;YI SYLLABLE ZYX;Lo;0;L;;;;;N;;;;; +A2AA;YI SYLLABLE ZY;Lo;0;L;;;;;N;;;;; +A2AB;YI SYLLABLE ZYP;Lo;0;L;;;;;N;;;;; +A2AC;YI SYLLABLE ZYRX;Lo;0;L;;;;;N;;;;; +A2AD;YI SYLLABLE ZYR;Lo;0;L;;;;;N;;;;; +A2AE;YI SYLLABLE CIT;Lo;0;L;;;;;N;;;;; +A2AF;YI SYLLABLE CIX;Lo;0;L;;;;;N;;;;; +A2B0;YI SYLLABLE CI;Lo;0;L;;;;;N;;;;; +A2B1;YI SYLLABLE CIP;Lo;0;L;;;;;N;;;;; +A2B2;YI SYLLABLE CIET;Lo;0;L;;;;;N;;;;; +A2B3;YI SYLLABLE CIEX;Lo;0;L;;;;;N;;;;; +A2B4;YI SYLLABLE CIE;Lo;0;L;;;;;N;;;;; +A2B5;YI SYLLABLE CIEP;Lo;0;L;;;;;N;;;;; +A2B6;YI SYLLABLE CAT;Lo;0;L;;;;;N;;;;; +A2B7;YI SYLLABLE CAX;Lo;0;L;;;;;N;;;;; +A2B8;YI SYLLABLE CA;Lo;0;L;;;;;N;;;;; +A2B9;YI SYLLABLE CAP;Lo;0;L;;;;;N;;;;; +A2BA;YI SYLLABLE CUOX;Lo;0;L;;;;;N;;;;; +A2BB;YI SYLLABLE CUO;Lo;0;L;;;;;N;;;;; +A2BC;YI SYLLABLE CUOP;Lo;0;L;;;;;N;;;;; +A2BD;YI SYLLABLE COT;Lo;0;L;;;;;N;;;;; +A2BE;YI SYLLABLE COX;Lo;0;L;;;;;N;;;;; +A2BF;YI SYLLABLE CO;Lo;0;L;;;;;N;;;;; +A2C0;YI SYLLABLE COP;Lo;0;L;;;;;N;;;;; +A2C1;YI SYLLABLE CEX;Lo;0;L;;;;;N;;;;; +A2C2;YI SYLLABLE CE;Lo;0;L;;;;;N;;;;; +A2C3;YI SYLLABLE CEP;Lo;0;L;;;;;N;;;;; +A2C4;YI SYLLABLE CUT;Lo;0;L;;;;;N;;;;; +A2C5;YI SYLLABLE CUX;Lo;0;L;;;;;N;;;;; +A2C6;YI SYLLABLE CU;Lo;0;L;;;;;N;;;;; +A2C7;YI SYLLABLE CUP;Lo;0;L;;;;;N;;;;; +A2C8;YI SYLLABLE CURX;Lo;0;L;;;;;N;;;;; +A2C9;YI SYLLABLE CUR;Lo;0;L;;;;;N;;;;; +A2CA;YI SYLLABLE CYT;Lo;0;L;;;;;N;;;;; +A2CB;YI SYLLABLE CYX;Lo;0;L;;;;;N;;;;; +A2CC;YI SYLLABLE CY;Lo;0;L;;;;;N;;;;; +A2CD;YI SYLLABLE CYP;Lo;0;L;;;;;N;;;;; +A2CE;YI SYLLABLE CYRX;Lo;0;L;;;;;N;;;;; +A2CF;YI SYLLABLE CYR;Lo;0;L;;;;;N;;;;; +A2D0;YI SYLLABLE ZZIT;Lo;0;L;;;;;N;;;;; +A2D1;YI SYLLABLE ZZIX;Lo;0;L;;;;;N;;;;; +A2D2;YI SYLLABLE ZZI;Lo;0;L;;;;;N;;;;; +A2D3;YI SYLLABLE ZZIP;Lo;0;L;;;;;N;;;;; +A2D4;YI SYLLABLE ZZIET;Lo;0;L;;;;;N;;;;; +A2D5;YI SYLLABLE ZZIEX;Lo;0;L;;;;;N;;;;; +A2D6;YI SYLLABLE ZZIE;Lo;0;L;;;;;N;;;;; +A2D7;YI SYLLABLE ZZIEP;Lo;0;L;;;;;N;;;;; +A2D8;YI SYLLABLE ZZAT;Lo;0;L;;;;;N;;;;; +A2D9;YI SYLLABLE ZZAX;Lo;0;L;;;;;N;;;;; +A2DA;YI SYLLABLE ZZA;Lo;0;L;;;;;N;;;;; +A2DB;YI SYLLABLE ZZAP;Lo;0;L;;;;;N;;;;; +A2DC;YI SYLLABLE ZZOX;Lo;0;L;;;;;N;;;;; +A2DD;YI SYLLABLE ZZO;Lo;0;L;;;;;N;;;;; +A2DE;YI SYLLABLE ZZOP;Lo;0;L;;;;;N;;;;; +A2DF;YI SYLLABLE ZZEX;Lo;0;L;;;;;N;;;;; +A2E0;YI SYLLABLE ZZE;Lo;0;L;;;;;N;;;;; +A2E1;YI SYLLABLE ZZEP;Lo;0;L;;;;;N;;;;; +A2E2;YI SYLLABLE ZZUX;Lo;0;L;;;;;N;;;;; +A2E3;YI SYLLABLE ZZU;Lo;0;L;;;;;N;;;;; +A2E4;YI SYLLABLE ZZUP;Lo;0;L;;;;;N;;;;; +A2E5;YI SYLLABLE ZZURX;Lo;0;L;;;;;N;;;;; +A2E6;YI SYLLABLE ZZUR;Lo;0;L;;;;;N;;;;; +A2E7;YI SYLLABLE ZZYT;Lo;0;L;;;;;N;;;;; +A2E8;YI SYLLABLE ZZYX;Lo;0;L;;;;;N;;;;; +A2E9;YI SYLLABLE ZZY;Lo;0;L;;;;;N;;;;; +A2EA;YI SYLLABLE ZZYP;Lo;0;L;;;;;N;;;;; +A2EB;YI SYLLABLE ZZYRX;Lo;0;L;;;;;N;;;;; +A2EC;YI SYLLABLE ZZYR;Lo;0;L;;;;;N;;;;; +A2ED;YI SYLLABLE NZIT;Lo;0;L;;;;;N;;;;; +A2EE;YI SYLLABLE NZIX;Lo;0;L;;;;;N;;;;; +A2EF;YI SYLLABLE NZI;Lo;0;L;;;;;N;;;;; +A2F0;YI SYLLABLE NZIP;Lo;0;L;;;;;N;;;;; +A2F1;YI SYLLABLE NZIEX;Lo;0;L;;;;;N;;;;; +A2F2;YI SYLLABLE NZIE;Lo;0;L;;;;;N;;;;; +A2F3;YI SYLLABLE NZIEP;Lo;0;L;;;;;N;;;;; +A2F4;YI SYLLABLE NZAT;Lo;0;L;;;;;N;;;;; +A2F5;YI SYLLABLE NZAX;Lo;0;L;;;;;N;;;;; +A2F6;YI SYLLABLE NZA;Lo;0;L;;;;;N;;;;; +A2F7;YI SYLLABLE NZAP;Lo;0;L;;;;;N;;;;; +A2F8;YI SYLLABLE NZUOX;Lo;0;L;;;;;N;;;;; +A2F9;YI SYLLABLE NZUO;Lo;0;L;;;;;N;;;;; +A2FA;YI SYLLABLE NZOX;Lo;0;L;;;;;N;;;;; +A2FB;YI SYLLABLE NZOP;Lo;0;L;;;;;N;;;;; +A2FC;YI SYLLABLE NZEX;Lo;0;L;;;;;N;;;;; +A2FD;YI SYLLABLE NZE;Lo;0;L;;;;;N;;;;; +A2FE;YI SYLLABLE NZUX;Lo;0;L;;;;;N;;;;; +A2FF;YI SYLLABLE NZU;Lo;0;L;;;;;N;;;;; +A300;YI SYLLABLE NZUP;Lo;0;L;;;;;N;;;;; +A301;YI SYLLABLE NZURX;Lo;0;L;;;;;N;;;;; +A302;YI SYLLABLE NZUR;Lo;0;L;;;;;N;;;;; +A303;YI SYLLABLE NZYT;Lo;0;L;;;;;N;;;;; +A304;YI SYLLABLE NZYX;Lo;0;L;;;;;N;;;;; +A305;YI SYLLABLE NZY;Lo;0;L;;;;;N;;;;; +A306;YI SYLLABLE NZYP;Lo;0;L;;;;;N;;;;; +A307;YI SYLLABLE NZYRX;Lo;0;L;;;;;N;;;;; +A308;YI SYLLABLE NZYR;Lo;0;L;;;;;N;;;;; +A309;YI SYLLABLE SIT;Lo;0;L;;;;;N;;;;; +A30A;YI SYLLABLE SIX;Lo;0;L;;;;;N;;;;; +A30B;YI SYLLABLE SI;Lo;0;L;;;;;N;;;;; +A30C;YI SYLLABLE SIP;Lo;0;L;;;;;N;;;;; +A30D;YI SYLLABLE SIEX;Lo;0;L;;;;;N;;;;; +A30E;YI SYLLABLE SIE;Lo;0;L;;;;;N;;;;; +A30F;YI SYLLABLE SIEP;Lo;0;L;;;;;N;;;;; +A310;YI SYLLABLE SAT;Lo;0;L;;;;;N;;;;; +A311;YI SYLLABLE SAX;Lo;0;L;;;;;N;;;;; +A312;YI SYLLABLE SA;Lo;0;L;;;;;N;;;;; +A313;YI SYLLABLE SAP;Lo;0;L;;;;;N;;;;; +A314;YI SYLLABLE SUOX;Lo;0;L;;;;;N;;;;; +A315;YI SYLLABLE SUO;Lo;0;L;;;;;N;;;;; +A316;YI SYLLABLE SUOP;Lo;0;L;;;;;N;;;;; +A317;YI SYLLABLE SOT;Lo;0;L;;;;;N;;;;; +A318;YI SYLLABLE SOX;Lo;0;L;;;;;N;;;;; +A319;YI SYLLABLE SO;Lo;0;L;;;;;N;;;;; +A31A;YI SYLLABLE SOP;Lo;0;L;;;;;N;;;;; +A31B;YI SYLLABLE SEX;Lo;0;L;;;;;N;;;;; +A31C;YI SYLLABLE SE;Lo;0;L;;;;;N;;;;; +A31D;YI SYLLABLE SEP;Lo;0;L;;;;;N;;;;; +A31E;YI SYLLABLE SUT;Lo;0;L;;;;;N;;;;; +A31F;YI SYLLABLE SUX;Lo;0;L;;;;;N;;;;; +A320;YI SYLLABLE SU;Lo;0;L;;;;;N;;;;; +A321;YI SYLLABLE SUP;Lo;0;L;;;;;N;;;;; +A322;YI SYLLABLE SURX;Lo;0;L;;;;;N;;;;; +A323;YI SYLLABLE SUR;Lo;0;L;;;;;N;;;;; +A324;YI SYLLABLE SYT;Lo;0;L;;;;;N;;;;; +A325;YI SYLLABLE SYX;Lo;0;L;;;;;N;;;;; +A326;YI SYLLABLE SY;Lo;0;L;;;;;N;;;;; +A327;YI SYLLABLE SYP;Lo;0;L;;;;;N;;;;; +A328;YI SYLLABLE SYRX;Lo;0;L;;;;;N;;;;; +A329;YI SYLLABLE SYR;Lo;0;L;;;;;N;;;;; +A32A;YI SYLLABLE SSIT;Lo;0;L;;;;;N;;;;; +A32B;YI SYLLABLE SSIX;Lo;0;L;;;;;N;;;;; +A32C;YI SYLLABLE SSI;Lo;0;L;;;;;N;;;;; +A32D;YI SYLLABLE SSIP;Lo;0;L;;;;;N;;;;; +A32E;YI SYLLABLE SSIEX;Lo;0;L;;;;;N;;;;; +A32F;YI SYLLABLE SSIE;Lo;0;L;;;;;N;;;;; +A330;YI SYLLABLE SSIEP;Lo;0;L;;;;;N;;;;; +A331;YI SYLLABLE SSAT;Lo;0;L;;;;;N;;;;; +A332;YI SYLLABLE SSAX;Lo;0;L;;;;;N;;;;; +A333;YI SYLLABLE SSA;Lo;0;L;;;;;N;;;;; +A334;YI SYLLABLE SSAP;Lo;0;L;;;;;N;;;;; +A335;YI SYLLABLE SSOT;Lo;0;L;;;;;N;;;;; +A336;YI SYLLABLE SSOX;Lo;0;L;;;;;N;;;;; +A337;YI SYLLABLE SSO;Lo;0;L;;;;;N;;;;; +A338;YI SYLLABLE SSOP;Lo;0;L;;;;;N;;;;; +A339;YI SYLLABLE SSEX;Lo;0;L;;;;;N;;;;; +A33A;YI SYLLABLE SSE;Lo;0;L;;;;;N;;;;; +A33B;YI SYLLABLE SSEP;Lo;0;L;;;;;N;;;;; +A33C;YI SYLLABLE SSUT;Lo;0;L;;;;;N;;;;; +A33D;YI SYLLABLE SSUX;Lo;0;L;;;;;N;;;;; +A33E;YI SYLLABLE SSU;Lo;0;L;;;;;N;;;;; +A33F;YI SYLLABLE SSUP;Lo;0;L;;;;;N;;;;; +A340;YI SYLLABLE SSYT;Lo;0;L;;;;;N;;;;; +A341;YI SYLLABLE SSYX;Lo;0;L;;;;;N;;;;; +A342;YI SYLLABLE SSY;Lo;0;L;;;;;N;;;;; +A343;YI SYLLABLE SSYP;Lo;0;L;;;;;N;;;;; +A344;YI SYLLABLE SSYRX;Lo;0;L;;;;;N;;;;; +A345;YI SYLLABLE SSYR;Lo;0;L;;;;;N;;;;; +A346;YI SYLLABLE ZHAT;Lo;0;L;;;;;N;;;;; +A347;YI SYLLABLE ZHAX;Lo;0;L;;;;;N;;;;; +A348;YI SYLLABLE ZHA;Lo;0;L;;;;;N;;;;; +A349;YI SYLLABLE ZHAP;Lo;0;L;;;;;N;;;;; +A34A;YI SYLLABLE ZHUOX;Lo;0;L;;;;;N;;;;; +A34B;YI SYLLABLE ZHUO;Lo;0;L;;;;;N;;;;; +A34C;YI SYLLABLE ZHUOP;Lo;0;L;;;;;N;;;;; +A34D;YI SYLLABLE ZHOT;Lo;0;L;;;;;N;;;;; +A34E;YI SYLLABLE ZHOX;Lo;0;L;;;;;N;;;;; +A34F;YI SYLLABLE ZHO;Lo;0;L;;;;;N;;;;; +A350;YI SYLLABLE ZHOP;Lo;0;L;;;;;N;;;;; +A351;YI SYLLABLE ZHET;Lo;0;L;;;;;N;;;;; +A352;YI SYLLABLE ZHEX;Lo;0;L;;;;;N;;;;; +A353;YI SYLLABLE ZHE;Lo;0;L;;;;;N;;;;; +A354;YI SYLLABLE ZHEP;Lo;0;L;;;;;N;;;;; +A355;YI SYLLABLE ZHUT;Lo;0;L;;;;;N;;;;; +A356;YI SYLLABLE ZHUX;Lo;0;L;;;;;N;;;;; +A357;YI SYLLABLE ZHU;Lo;0;L;;;;;N;;;;; +A358;YI SYLLABLE ZHUP;Lo;0;L;;;;;N;;;;; +A359;YI SYLLABLE ZHURX;Lo;0;L;;;;;N;;;;; +A35A;YI SYLLABLE ZHUR;Lo;0;L;;;;;N;;;;; +A35B;YI SYLLABLE ZHYT;Lo;0;L;;;;;N;;;;; +A35C;YI SYLLABLE ZHYX;Lo;0;L;;;;;N;;;;; +A35D;YI SYLLABLE ZHY;Lo;0;L;;;;;N;;;;; +A35E;YI SYLLABLE ZHYP;Lo;0;L;;;;;N;;;;; +A35F;YI SYLLABLE ZHYRX;Lo;0;L;;;;;N;;;;; +A360;YI SYLLABLE ZHYR;Lo;0;L;;;;;N;;;;; +A361;YI SYLLABLE CHAT;Lo;0;L;;;;;N;;;;; +A362;YI SYLLABLE CHAX;Lo;0;L;;;;;N;;;;; +A363;YI SYLLABLE CHA;Lo;0;L;;;;;N;;;;; +A364;YI SYLLABLE CHAP;Lo;0;L;;;;;N;;;;; +A365;YI SYLLABLE CHUOT;Lo;0;L;;;;;N;;;;; +A366;YI SYLLABLE CHUOX;Lo;0;L;;;;;N;;;;; +A367;YI SYLLABLE CHUO;Lo;0;L;;;;;N;;;;; +A368;YI SYLLABLE CHUOP;Lo;0;L;;;;;N;;;;; +A369;YI SYLLABLE CHOT;Lo;0;L;;;;;N;;;;; +A36A;YI SYLLABLE CHOX;Lo;0;L;;;;;N;;;;; +A36B;YI SYLLABLE CHO;Lo;0;L;;;;;N;;;;; +A36C;YI SYLLABLE CHOP;Lo;0;L;;;;;N;;;;; +A36D;YI SYLLABLE CHET;Lo;0;L;;;;;N;;;;; +A36E;YI SYLLABLE CHEX;Lo;0;L;;;;;N;;;;; +A36F;YI SYLLABLE CHE;Lo;0;L;;;;;N;;;;; +A370;YI SYLLABLE CHEP;Lo;0;L;;;;;N;;;;; +A371;YI SYLLABLE CHUX;Lo;0;L;;;;;N;;;;; +A372;YI SYLLABLE CHU;Lo;0;L;;;;;N;;;;; +A373;YI SYLLABLE CHUP;Lo;0;L;;;;;N;;;;; +A374;YI SYLLABLE CHURX;Lo;0;L;;;;;N;;;;; +A375;YI SYLLABLE CHUR;Lo;0;L;;;;;N;;;;; +A376;YI SYLLABLE CHYT;Lo;0;L;;;;;N;;;;; +A377;YI SYLLABLE CHYX;Lo;0;L;;;;;N;;;;; +A378;YI SYLLABLE CHY;Lo;0;L;;;;;N;;;;; +A379;YI SYLLABLE CHYP;Lo;0;L;;;;;N;;;;; +A37A;YI SYLLABLE CHYRX;Lo;0;L;;;;;N;;;;; +A37B;YI SYLLABLE CHYR;Lo;0;L;;;;;N;;;;; +A37C;YI SYLLABLE RRAX;Lo;0;L;;;;;N;;;;; +A37D;YI SYLLABLE RRA;Lo;0;L;;;;;N;;;;; +A37E;YI SYLLABLE RRUOX;Lo;0;L;;;;;N;;;;; +A37F;YI SYLLABLE RRUO;Lo;0;L;;;;;N;;;;; +A380;YI SYLLABLE RROT;Lo;0;L;;;;;N;;;;; +A381;YI SYLLABLE RROX;Lo;0;L;;;;;N;;;;; +A382;YI SYLLABLE RRO;Lo;0;L;;;;;N;;;;; +A383;YI SYLLABLE RROP;Lo;0;L;;;;;N;;;;; +A384;YI SYLLABLE RRET;Lo;0;L;;;;;N;;;;; +A385;YI SYLLABLE RREX;Lo;0;L;;;;;N;;;;; +A386;YI SYLLABLE RRE;Lo;0;L;;;;;N;;;;; +A387;YI SYLLABLE RREP;Lo;0;L;;;;;N;;;;; +A388;YI SYLLABLE RRUT;Lo;0;L;;;;;N;;;;; +A389;YI SYLLABLE RRUX;Lo;0;L;;;;;N;;;;; +A38A;YI SYLLABLE RRU;Lo;0;L;;;;;N;;;;; +A38B;YI SYLLABLE RRUP;Lo;0;L;;;;;N;;;;; +A38C;YI SYLLABLE RRURX;Lo;0;L;;;;;N;;;;; +A38D;YI SYLLABLE RRUR;Lo;0;L;;;;;N;;;;; +A38E;YI SYLLABLE RRYT;Lo;0;L;;;;;N;;;;; +A38F;YI SYLLABLE RRYX;Lo;0;L;;;;;N;;;;; +A390;YI SYLLABLE RRY;Lo;0;L;;;;;N;;;;; +A391;YI SYLLABLE RRYP;Lo;0;L;;;;;N;;;;; +A392;YI SYLLABLE RRYRX;Lo;0;L;;;;;N;;;;; +A393;YI SYLLABLE RRYR;Lo;0;L;;;;;N;;;;; +A394;YI SYLLABLE NRAT;Lo;0;L;;;;;N;;;;; +A395;YI SYLLABLE NRAX;Lo;0;L;;;;;N;;;;; +A396;YI SYLLABLE NRA;Lo;0;L;;;;;N;;;;; +A397;YI SYLLABLE NRAP;Lo;0;L;;;;;N;;;;; +A398;YI SYLLABLE NROX;Lo;0;L;;;;;N;;;;; +A399;YI SYLLABLE NRO;Lo;0;L;;;;;N;;;;; +A39A;YI SYLLABLE NROP;Lo;0;L;;;;;N;;;;; +A39B;YI SYLLABLE NRET;Lo;0;L;;;;;N;;;;; +A39C;YI SYLLABLE NREX;Lo;0;L;;;;;N;;;;; +A39D;YI SYLLABLE NRE;Lo;0;L;;;;;N;;;;; +A39E;YI SYLLABLE NREP;Lo;0;L;;;;;N;;;;; +A39F;YI SYLLABLE NRUT;Lo;0;L;;;;;N;;;;; +A3A0;YI SYLLABLE NRUX;Lo;0;L;;;;;N;;;;; +A3A1;YI SYLLABLE NRU;Lo;0;L;;;;;N;;;;; +A3A2;YI SYLLABLE NRUP;Lo;0;L;;;;;N;;;;; +A3A3;YI SYLLABLE NRURX;Lo;0;L;;;;;N;;;;; +A3A4;YI SYLLABLE NRUR;Lo;0;L;;;;;N;;;;; +A3A5;YI SYLLABLE NRYT;Lo;0;L;;;;;N;;;;; +A3A6;YI SYLLABLE NRYX;Lo;0;L;;;;;N;;;;; +A3A7;YI SYLLABLE NRY;Lo;0;L;;;;;N;;;;; +A3A8;YI SYLLABLE NRYP;Lo;0;L;;;;;N;;;;; +A3A9;YI SYLLABLE NRYRX;Lo;0;L;;;;;N;;;;; +A3AA;YI SYLLABLE NRYR;Lo;0;L;;;;;N;;;;; +A3AB;YI SYLLABLE SHAT;Lo;0;L;;;;;N;;;;; +A3AC;YI SYLLABLE SHAX;Lo;0;L;;;;;N;;;;; +A3AD;YI SYLLABLE SHA;Lo;0;L;;;;;N;;;;; +A3AE;YI SYLLABLE SHAP;Lo;0;L;;;;;N;;;;; +A3AF;YI SYLLABLE SHUOX;Lo;0;L;;;;;N;;;;; +A3B0;YI SYLLABLE SHUO;Lo;0;L;;;;;N;;;;; +A3B1;YI SYLLABLE SHUOP;Lo;0;L;;;;;N;;;;; +A3B2;YI SYLLABLE SHOT;Lo;0;L;;;;;N;;;;; +A3B3;YI SYLLABLE SHOX;Lo;0;L;;;;;N;;;;; +A3B4;YI SYLLABLE SHO;Lo;0;L;;;;;N;;;;; +A3B5;YI SYLLABLE SHOP;Lo;0;L;;;;;N;;;;; +A3B6;YI SYLLABLE SHET;Lo;0;L;;;;;N;;;;; +A3B7;YI SYLLABLE SHEX;Lo;0;L;;;;;N;;;;; +A3B8;YI SYLLABLE SHE;Lo;0;L;;;;;N;;;;; +A3B9;YI SYLLABLE SHEP;Lo;0;L;;;;;N;;;;; +A3BA;YI SYLLABLE SHUT;Lo;0;L;;;;;N;;;;; +A3BB;YI SYLLABLE SHUX;Lo;0;L;;;;;N;;;;; +A3BC;YI SYLLABLE SHU;Lo;0;L;;;;;N;;;;; +A3BD;YI SYLLABLE SHUP;Lo;0;L;;;;;N;;;;; +A3BE;YI SYLLABLE SHURX;Lo;0;L;;;;;N;;;;; +A3BF;YI SYLLABLE SHUR;Lo;0;L;;;;;N;;;;; +A3C0;YI SYLLABLE SHYT;Lo;0;L;;;;;N;;;;; +A3C1;YI SYLLABLE SHYX;Lo;0;L;;;;;N;;;;; +A3C2;YI SYLLABLE SHY;Lo;0;L;;;;;N;;;;; +A3C3;YI SYLLABLE SHYP;Lo;0;L;;;;;N;;;;; +A3C4;YI SYLLABLE SHYRX;Lo;0;L;;;;;N;;;;; +A3C5;YI SYLLABLE SHYR;Lo;0;L;;;;;N;;;;; +A3C6;YI SYLLABLE RAT;Lo;0;L;;;;;N;;;;; +A3C7;YI SYLLABLE RAX;Lo;0;L;;;;;N;;;;; +A3C8;YI SYLLABLE RA;Lo;0;L;;;;;N;;;;; +A3C9;YI SYLLABLE RAP;Lo;0;L;;;;;N;;;;; +A3CA;YI SYLLABLE RUOX;Lo;0;L;;;;;N;;;;; +A3CB;YI SYLLABLE RUO;Lo;0;L;;;;;N;;;;; +A3CC;YI SYLLABLE RUOP;Lo;0;L;;;;;N;;;;; +A3CD;YI SYLLABLE ROT;Lo;0;L;;;;;N;;;;; +A3CE;YI SYLLABLE ROX;Lo;0;L;;;;;N;;;;; +A3CF;YI SYLLABLE RO;Lo;0;L;;;;;N;;;;; +A3D0;YI SYLLABLE ROP;Lo;0;L;;;;;N;;;;; +A3D1;YI SYLLABLE REX;Lo;0;L;;;;;N;;;;; +A3D2;YI SYLLABLE RE;Lo;0;L;;;;;N;;;;; +A3D3;YI SYLLABLE REP;Lo;0;L;;;;;N;;;;; +A3D4;YI SYLLABLE RUT;Lo;0;L;;;;;N;;;;; +A3D5;YI SYLLABLE RUX;Lo;0;L;;;;;N;;;;; +A3D6;YI SYLLABLE RU;Lo;0;L;;;;;N;;;;; +A3D7;YI SYLLABLE RUP;Lo;0;L;;;;;N;;;;; +A3D8;YI SYLLABLE RURX;Lo;0;L;;;;;N;;;;; +A3D9;YI SYLLABLE RUR;Lo;0;L;;;;;N;;;;; +A3DA;YI SYLLABLE RYT;Lo;0;L;;;;;N;;;;; +A3DB;YI SYLLABLE RYX;Lo;0;L;;;;;N;;;;; +A3DC;YI SYLLABLE RY;Lo;0;L;;;;;N;;;;; +A3DD;YI SYLLABLE RYP;Lo;0;L;;;;;N;;;;; +A3DE;YI SYLLABLE RYRX;Lo;0;L;;;;;N;;;;; +A3DF;YI SYLLABLE RYR;Lo;0;L;;;;;N;;;;; +A3E0;YI SYLLABLE JIT;Lo;0;L;;;;;N;;;;; +A3E1;YI SYLLABLE JIX;Lo;0;L;;;;;N;;;;; +A3E2;YI SYLLABLE JI;Lo;0;L;;;;;N;;;;; +A3E3;YI SYLLABLE JIP;Lo;0;L;;;;;N;;;;; +A3E4;YI SYLLABLE JIET;Lo;0;L;;;;;N;;;;; +A3E5;YI SYLLABLE JIEX;Lo;0;L;;;;;N;;;;; +A3E6;YI SYLLABLE JIE;Lo;0;L;;;;;N;;;;; +A3E7;YI SYLLABLE JIEP;Lo;0;L;;;;;N;;;;; +A3E8;YI SYLLABLE JUOT;Lo;0;L;;;;;N;;;;; +A3E9;YI SYLLABLE JUOX;Lo;0;L;;;;;N;;;;; +A3EA;YI SYLLABLE JUO;Lo;0;L;;;;;N;;;;; +A3EB;YI SYLLABLE JUOP;Lo;0;L;;;;;N;;;;; +A3EC;YI SYLLABLE JOT;Lo;0;L;;;;;N;;;;; +A3ED;YI SYLLABLE JOX;Lo;0;L;;;;;N;;;;; +A3EE;YI SYLLABLE JO;Lo;0;L;;;;;N;;;;; +A3EF;YI SYLLABLE JOP;Lo;0;L;;;;;N;;;;; +A3F0;YI SYLLABLE JUT;Lo;0;L;;;;;N;;;;; +A3F1;YI SYLLABLE JUX;Lo;0;L;;;;;N;;;;; +A3F2;YI SYLLABLE JU;Lo;0;L;;;;;N;;;;; +A3F3;YI SYLLABLE JUP;Lo;0;L;;;;;N;;;;; +A3F4;YI SYLLABLE JURX;Lo;0;L;;;;;N;;;;; +A3F5;YI SYLLABLE JUR;Lo;0;L;;;;;N;;;;; +A3F6;YI SYLLABLE JYT;Lo;0;L;;;;;N;;;;; +A3F7;YI SYLLABLE JYX;Lo;0;L;;;;;N;;;;; +A3F8;YI SYLLABLE JY;Lo;0;L;;;;;N;;;;; +A3F9;YI SYLLABLE JYP;Lo;0;L;;;;;N;;;;; +A3FA;YI SYLLABLE JYRX;Lo;0;L;;;;;N;;;;; +A3FB;YI SYLLABLE JYR;Lo;0;L;;;;;N;;;;; +A3FC;YI SYLLABLE QIT;Lo;0;L;;;;;N;;;;; +A3FD;YI SYLLABLE QIX;Lo;0;L;;;;;N;;;;; +A3FE;YI SYLLABLE QI;Lo;0;L;;;;;N;;;;; +A3FF;YI SYLLABLE QIP;Lo;0;L;;;;;N;;;;; +A400;YI SYLLABLE QIET;Lo;0;L;;;;;N;;;;; +A401;YI SYLLABLE QIEX;Lo;0;L;;;;;N;;;;; +A402;YI SYLLABLE QIE;Lo;0;L;;;;;N;;;;; +A403;YI SYLLABLE QIEP;Lo;0;L;;;;;N;;;;; +A404;YI SYLLABLE QUOT;Lo;0;L;;;;;N;;;;; +A405;YI SYLLABLE QUOX;Lo;0;L;;;;;N;;;;; +A406;YI SYLLABLE QUO;Lo;0;L;;;;;N;;;;; +A407;YI SYLLABLE QUOP;Lo;0;L;;;;;N;;;;; +A408;YI SYLLABLE QOT;Lo;0;L;;;;;N;;;;; +A409;YI SYLLABLE QOX;Lo;0;L;;;;;N;;;;; +A40A;YI SYLLABLE QO;Lo;0;L;;;;;N;;;;; +A40B;YI SYLLABLE QOP;Lo;0;L;;;;;N;;;;; +A40C;YI SYLLABLE QUT;Lo;0;L;;;;;N;;;;; +A40D;YI SYLLABLE QUX;Lo;0;L;;;;;N;;;;; +A40E;YI SYLLABLE QU;Lo;0;L;;;;;N;;;;; +A40F;YI SYLLABLE QUP;Lo;0;L;;;;;N;;;;; +A410;YI SYLLABLE QURX;Lo;0;L;;;;;N;;;;; +A411;YI SYLLABLE QUR;Lo;0;L;;;;;N;;;;; +A412;YI SYLLABLE QYT;Lo;0;L;;;;;N;;;;; +A413;YI SYLLABLE QYX;Lo;0;L;;;;;N;;;;; +A414;YI SYLLABLE QY;Lo;0;L;;;;;N;;;;; +A415;YI SYLLABLE QYP;Lo;0;L;;;;;N;;;;; +A416;YI SYLLABLE QYRX;Lo;0;L;;;;;N;;;;; +A417;YI SYLLABLE QYR;Lo;0;L;;;;;N;;;;; +A418;YI SYLLABLE JJIT;Lo;0;L;;;;;N;;;;; +A419;YI SYLLABLE JJIX;Lo;0;L;;;;;N;;;;; +A41A;YI SYLLABLE JJI;Lo;0;L;;;;;N;;;;; +A41B;YI SYLLABLE JJIP;Lo;0;L;;;;;N;;;;; +A41C;YI SYLLABLE JJIET;Lo;0;L;;;;;N;;;;; +A41D;YI SYLLABLE JJIEX;Lo;0;L;;;;;N;;;;; +A41E;YI SYLLABLE JJIE;Lo;0;L;;;;;N;;;;; +A41F;YI SYLLABLE JJIEP;Lo;0;L;;;;;N;;;;; +A420;YI SYLLABLE JJUOX;Lo;0;L;;;;;N;;;;; +A421;YI SYLLABLE JJUO;Lo;0;L;;;;;N;;;;; +A422;YI SYLLABLE JJUOP;Lo;0;L;;;;;N;;;;; +A423;YI SYLLABLE JJOT;Lo;0;L;;;;;N;;;;; +A424;YI SYLLABLE JJOX;Lo;0;L;;;;;N;;;;; +A425;YI SYLLABLE JJO;Lo;0;L;;;;;N;;;;; +A426;YI SYLLABLE JJOP;Lo;0;L;;;;;N;;;;; +A427;YI SYLLABLE JJUT;Lo;0;L;;;;;N;;;;; +A428;YI SYLLABLE JJUX;Lo;0;L;;;;;N;;;;; +A429;YI SYLLABLE JJU;Lo;0;L;;;;;N;;;;; +A42A;YI SYLLABLE JJUP;Lo;0;L;;;;;N;;;;; +A42B;YI SYLLABLE JJURX;Lo;0;L;;;;;N;;;;; +A42C;YI SYLLABLE JJUR;Lo;0;L;;;;;N;;;;; +A42D;YI SYLLABLE JJYT;Lo;0;L;;;;;N;;;;; +A42E;YI SYLLABLE JJYX;Lo;0;L;;;;;N;;;;; +A42F;YI SYLLABLE JJY;Lo;0;L;;;;;N;;;;; +A430;YI SYLLABLE JJYP;Lo;0;L;;;;;N;;;;; +A431;YI SYLLABLE NJIT;Lo;0;L;;;;;N;;;;; +A432;YI SYLLABLE NJIX;Lo;0;L;;;;;N;;;;; +A433;YI SYLLABLE NJI;Lo;0;L;;;;;N;;;;; +A434;YI SYLLABLE NJIP;Lo;0;L;;;;;N;;;;; +A435;YI SYLLABLE NJIET;Lo;0;L;;;;;N;;;;; +A436;YI SYLLABLE NJIEX;Lo;0;L;;;;;N;;;;; +A437;YI SYLLABLE NJIE;Lo;0;L;;;;;N;;;;; +A438;YI SYLLABLE NJIEP;Lo;0;L;;;;;N;;;;; +A439;YI SYLLABLE NJUOX;Lo;0;L;;;;;N;;;;; +A43A;YI SYLLABLE NJUO;Lo;0;L;;;;;N;;;;; +A43B;YI SYLLABLE NJOT;Lo;0;L;;;;;N;;;;; +A43C;YI SYLLABLE NJOX;Lo;0;L;;;;;N;;;;; +A43D;YI SYLLABLE NJO;Lo;0;L;;;;;N;;;;; +A43E;YI SYLLABLE NJOP;Lo;0;L;;;;;N;;;;; +A43F;YI SYLLABLE NJUX;Lo;0;L;;;;;N;;;;; +A440;YI SYLLABLE NJU;Lo;0;L;;;;;N;;;;; +A441;YI SYLLABLE NJUP;Lo;0;L;;;;;N;;;;; +A442;YI SYLLABLE NJURX;Lo;0;L;;;;;N;;;;; +A443;YI SYLLABLE NJUR;Lo;0;L;;;;;N;;;;; +A444;YI SYLLABLE NJYT;Lo;0;L;;;;;N;;;;; +A445;YI SYLLABLE NJYX;Lo;0;L;;;;;N;;;;; +A446;YI SYLLABLE NJY;Lo;0;L;;;;;N;;;;; +A447;YI SYLLABLE NJYP;Lo;0;L;;;;;N;;;;; +A448;YI SYLLABLE NJYRX;Lo;0;L;;;;;N;;;;; +A449;YI SYLLABLE NJYR;Lo;0;L;;;;;N;;;;; +A44A;YI SYLLABLE NYIT;Lo;0;L;;;;;N;;;;; +A44B;YI SYLLABLE NYIX;Lo;0;L;;;;;N;;;;; +A44C;YI SYLLABLE NYI;Lo;0;L;;;;;N;;;;; +A44D;YI SYLLABLE NYIP;Lo;0;L;;;;;N;;;;; +A44E;YI SYLLABLE NYIET;Lo;0;L;;;;;N;;;;; +A44F;YI SYLLABLE NYIEX;Lo;0;L;;;;;N;;;;; +A450;YI SYLLABLE NYIE;Lo;0;L;;;;;N;;;;; +A451;YI SYLLABLE NYIEP;Lo;0;L;;;;;N;;;;; +A452;YI SYLLABLE NYUOX;Lo;0;L;;;;;N;;;;; +A453;YI SYLLABLE NYUO;Lo;0;L;;;;;N;;;;; +A454;YI SYLLABLE NYUOP;Lo;0;L;;;;;N;;;;; +A455;YI SYLLABLE NYOT;Lo;0;L;;;;;N;;;;; +A456;YI SYLLABLE NYOX;Lo;0;L;;;;;N;;;;; +A457;YI SYLLABLE NYO;Lo;0;L;;;;;N;;;;; +A458;YI SYLLABLE NYOP;Lo;0;L;;;;;N;;;;; +A459;YI SYLLABLE NYUT;Lo;0;L;;;;;N;;;;; +A45A;YI SYLLABLE NYUX;Lo;0;L;;;;;N;;;;; +A45B;YI SYLLABLE NYU;Lo;0;L;;;;;N;;;;; +A45C;YI SYLLABLE NYUP;Lo;0;L;;;;;N;;;;; +A45D;YI SYLLABLE XIT;Lo;0;L;;;;;N;;;;; +A45E;YI SYLLABLE XIX;Lo;0;L;;;;;N;;;;; +A45F;YI SYLLABLE XI;Lo;0;L;;;;;N;;;;; +A460;YI SYLLABLE XIP;Lo;0;L;;;;;N;;;;; +A461;YI SYLLABLE XIET;Lo;0;L;;;;;N;;;;; +A462;YI SYLLABLE XIEX;Lo;0;L;;;;;N;;;;; +A463;YI SYLLABLE XIE;Lo;0;L;;;;;N;;;;; +A464;YI SYLLABLE XIEP;Lo;0;L;;;;;N;;;;; +A465;YI SYLLABLE XUOX;Lo;0;L;;;;;N;;;;; +A466;YI SYLLABLE XUO;Lo;0;L;;;;;N;;;;; +A467;YI SYLLABLE XOT;Lo;0;L;;;;;N;;;;; +A468;YI SYLLABLE XOX;Lo;0;L;;;;;N;;;;; +A469;YI SYLLABLE XO;Lo;0;L;;;;;N;;;;; +A46A;YI SYLLABLE XOP;Lo;0;L;;;;;N;;;;; +A46B;YI SYLLABLE XYT;Lo;0;L;;;;;N;;;;; +A46C;YI SYLLABLE XYX;Lo;0;L;;;;;N;;;;; +A46D;YI SYLLABLE XY;Lo;0;L;;;;;N;;;;; +A46E;YI SYLLABLE XYP;Lo;0;L;;;;;N;;;;; +A46F;YI SYLLABLE XYRX;Lo;0;L;;;;;N;;;;; +A470;YI SYLLABLE XYR;Lo;0;L;;;;;N;;;;; +A471;YI SYLLABLE YIT;Lo;0;L;;;;;N;;;;; +A472;YI SYLLABLE YIX;Lo;0;L;;;;;N;;;;; +A473;YI SYLLABLE YI;Lo;0;L;;;;;N;;;;; +A474;YI SYLLABLE YIP;Lo;0;L;;;;;N;;;;; +A475;YI SYLLABLE YIET;Lo;0;L;;;;;N;;;;; +A476;YI SYLLABLE YIEX;Lo;0;L;;;;;N;;;;; +A477;YI SYLLABLE YIE;Lo;0;L;;;;;N;;;;; +A478;YI SYLLABLE YIEP;Lo;0;L;;;;;N;;;;; +A479;YI SYLLABLE YUOT;Lo;0;L;;;;;N;;;;; +A47A;YI SYLLABLE YUOX;Lo;0;L;;;;;N;;;;; +A47B;YI SYLLABLE YUO;Lo;0;L;;;;;N;;;;; +A47C;YI SYLLABLE YUOP;Lo;0;L;;;;;N;;;;; +A47D;YI SYLLABLE YOT;Lo;0;L;;;;;N;;;;; +A47E;YI SYLLABLE YOX;Lo;0;L;;;;;N;;;;; +A47F;YI SYLLABLE YO;Lo;0;L;;;;;N;;;;; +A480;YI SYLLABLE YOP;Lo;0;L;;;;;N;;;;; +A481;YI SYLLABLE YUT;Lo;0;L;;;;;N;;;;; +A482;YI SYLLABLE YUX;Lo;0;L;;;;;N;;;;; +A483;YI SYLLABLE YU;Lo;0;L;;;;;N;;;;; +A484;YI SYLLABLE YUP;Lo;0;L;;;;;N;;;;; +A485;YI SYLLABLE YURX;Lo;0;L;;;;;N;;;;; +A486;YI SYLLABLE YUR;Lo;0;L;;;;;N;;;;; +A487;YI SYLLABLE YYT;Lo;0;L;;;;;N;;;;; +A488;YI SYLLABLE YYX;Lo;0;L;;;;;N;;;;; +A489;YI SYLLABLE YY;Lo;0;L;;;;;N;;;;; +A48A;YI SYLLABLE YYP;Lo;0;L;;;;;N;;;;; +A48B;YI SYLLABLE YYRX;Lo;0;L;;;;;N;;;;; +A48C;YI SYLLABLE YYR;Lo;0;L;;;;;N;;;;; +A490;YI RADICAL QOT;So;0;ON;;;;;N;;;;; +A491;YI RADICAL LI;So;0;ON;;;;;N;;;;; +A492;YI RADICAL KIT;So;0;ON;;;;;N;;;;; +A493;YI RADICAL NYIP;So;0;ON;;;;;N;;;;; +A494;YI RADICAL CYP;So;0;ON;;;;;N;;;;; +A495;YI RADICAL SSI;So;0;ON;;;;;N;;;;; +A496;YI RADICAL GGOP;So;0;ON;;;;;N;;;;; +A497;YI RADICAL GEP;So;0;ON;;;;;N;;;;; +A498;YI RADICAL MI;So;0;ON;;;;;N;;;;; +A499;YI RADICAL HXIT;So;0;ON;;;;;N;;;;; +A49A;YI RADICAL LYR;So;0;ON;;;;;N;;;;; +A49B;YI RADICAL BBUT;So;0;ON;;;;;N;;;;; +A49C;YI RADICAL MOP;So;0;ON;;;;;N;;;;; +A49D;YI RADICAL YO;So;0;ON;;;;;N;;;;; +A49E;YI RADICAL PUT;So;0;ON;;;;;N;;;;; +A49F;YI RADICAL HXUO;So;0;ON;;;;;N;;;;; +A4A0;YI RADICAL TAT;So;0;ON;;;;;N;;;;; +A4A1;YI RADICAL GA;So;0;ON;;;;;N;;;;; +A4A2;YI RADICAL ZUP;So;0;ON;;;;;N;;;;; +A4A3;YI RADICAL CYT;So;0;ON;;;;;N;;;;; +A4A4;YI RADICAL DDUR;So;0;ON;;;;;N;;;;; +A4A5;YI RADICAL BUR;So;0;ON;;;;;N;;;;; +A4A6;YI RADICAL GGUO;So;0;ON;;;;;N;;;;; +A4A7;YI RADICAL NYOP;So;0;ON;;;;;N;;;;; +A4A8;YI RADICAL TU;So;0;ON;;;;;N;;;;; +A4A9;YI RADICAL OP;So;0;ON;;;;;N;;;;; +A4AA;YI RADICAL JJUT;So;0;ON;;;;;N;;;;; +A4AB;YI RADICAL ZOT;So;0;ON;;;;;N;;;;; +A4AC;YI RADICAL PYT;So;0;ON;;;;;N;;;;; +A4AD;YI RADICAL HMO;So;0;ON;;;;;N;;;;; +A4AE;YI RADICAL YIT;So;0;ON;;;;;N;;;;; +A4AF;YI RADICAL VUR;So;0;ON;;;;;N;;;;; +A4B0;YI RADICAL SHY;So;0;ON;;;;;N;;;;; +A4B1;YI RADICAL VEP;So;0;ON;;;;;N;;;;; +A4B2;YI RADICAL ZA;So;0;ON;;;;;N;;;;; +A4B3;YI RADICAL JO;So;0;ON;;;;;N;;;;; +A4B4;YI RADICAL NZUP;So;0;ON;;;;;N;;;;; +A4B5;YI RADICAL JJY;So;0;ON;;;;;N;;;;; +A4B6;YI RADICAL GOT;So;0;ON;;;;;N;;;;; +A4B7;YI RADICAL JJIE;So;0;ON;;;;;N;;;;; +A4B8;YI RADICAL WO;So;0;ON;;;;;N;;;;; +A4B9;YI RADICAL DU;So;0;ON;;;;;N;;;;; +A4BA;YI RADICAL SHUR;So;0;ON;;;;;N;;;;; +A4BB;YI RADICAL LIE;So;0;ON;;;;;N;;;;; +A4BC;YI RADICAL CY;So;0;ON;;;;;N;;;;; +A4BD;YI RADICAL CUOP;So;0;ON;;;;;N;;;;; +A4BE;YI RADICAL CIP;So;0;ON;;;;;N;;;;; +A4BF;YI RADICAL HXOP;So;0;ON;;;;;N;;;;; +A4C0;YI RADICAL SHAT;So;0;ON;;;;;N;;;;; +A4C1;YI RADICAL ZUR;So;0;ON;;;;;N;;;;; +A4C2;YI RADICAL SHOP;So;0;ON;;;;;N;;;;; +A4C3;YI RADICAL CHE;So;0;ON;;;;;N;;;;; +A4C4;YI RADICAL ZZIET;So;0;ON;;;;;N;;;;; +A4C5;YI RADICAL NBIE;So;0;ON;;;;;N;;;;; +A4C6;YI RADICAL KE;So;0;ON;;;;;N;;;;; +A4D0;LISU LETTER BA;Lo;0;L;;;;;N;;;;; +A4D1;LISU LETTER PA;Lo;0;L;;;;;N;;;;; +A4D2;LISU LETTER PHA;Lo;0;L;;;;;N;;;;; +A4D3;LISU LETTER DA;Lo;0;L;;;;;N;;;;; +A4D4;LISU LETTER TA;Lo;0;L;;;;;N;;;;; +A4D5;LISU LETTER THA;Lo;0;L;;;;;N;;;;; +A4D6;LISU LETTER GA;Lo;0;L;;;;;N;;;;; +A4D7;LISU LETTER KA;Lo;0;L;;;;;N;;;;; +A4D8;LISU LETTER KHA;Lo;0;L;;;;;N;;;;; +A4D9;LISU LETTER JA;Lo;0;L;;;;;N;;;;; +A4DA;LISU LETTER CA;Lo;0;L;;;;;N;;;;; +A4DB;LISU LETTER CHA;Lo;0;L;;;;;N;;;;; +A4DC;LISU LETTER DZA;Lo;0;L;;;;;N;;;;; +A4DD;LISU LETTER TSA;Lo;0;L;;;;;N;;;;; +A4DE;LISU LETTER TSHA;Lo;0;L;;;;;N;;;;; +A4DF;LISU LETTER MA;Lo;0;L;;;;;N;;;;; +A4E0;LISU LETTER NA;Lo;0;L;;;;;N;;;;; +A4E1;LISU LETTER LA;Lo;0;L;;;;;N;;;;; +A4E2;LISU LETTER SA;Lo;0;L;;;;;N;;;;; +A4E3;LISU LETTER ZHA;Lo;0;L;;;;;N;;;;; +A4E4;LISU LETTER ZA;Lo;0;L;;;;;N;;;;; +A4E5;LISU LETTER NGA;Lo;0;L;;;;;N;;;;; +A4E6;LISU LETTER HA;Lo;0;L;;;;;N;;;;; +A4E7;LISU LETTER XA;Lo;0;L;;;;;N;;;;; +A4E8;LISU LETTER HHA;Lo;0;L;;;;;N;;;;; +A4E9;LISU LETTER FA;Lo;0;L;;;;;N;;;;; +A4EA;LISU LETTER WA;Lo;0;L;;;;;N;;;;; +A4EB;LISU LETTER SHA;Lo;0;L;;;;;N;;;;; +A4EC;LISU LETTER YA;Lo;0;L;;;;;N;;;;; +A4ED;LISU LETTER GHA;Lo;0;L;;;;;N;;;;; +A4EE;LISU LETTER A;Lo;0;L;;;;;N;;;;; +A4EF;LISU LETTER AE;Lo;0;L;;;;;N;;;;; +A4F0;LISU LETTER E;Lo;0;L;;;;;N;;;;; +A4F1;LISU LETTER EU;Lo;0;L;;;;;N;;;;; +A4F2;LISU LETTER I;Lo;0;L;;;;;N;;;;; +A4F3;LISU LETTER O;Lo;0;L;;;;;N;;;;; +A4F4;LISU LETTER U;Lo;0;L;;;;;N;;;;; +A4F5;LISU LETTER UE;Lo;0;L;;;;;N;;;;; +A4F6;LISU LETTER UH;Lo;0;L;;;;;N;;;;; +A4F7;LISU LETTER OE;Lo;0;L;;;;;N;;;;; +A4F8;LISU LETTER TONE MYA TI;Lm;0;L;;;;;N;;;;; +A4F9;LISU LETTER TONE NA PO;Lm;0;L;;;;;N;;;;; +A4FA;LISU LETTER TONE MYA CYA;Lm;0;L;;;;;N;;;;; +A4FB;LISU LETTER TONE MYA BO;Lm;0;L;;;;;N;;;;; +A4FC;LISU LETTER TONE MYA NA;Lm;0;L;;;;;N;;;;; +A4FD;LISU LETTER TONE MYA JEU;Lm;0;L;;;;;N;;;;; +A4FE;LISU PUNCTUATION COMMA;Po;0;L;;;;;N;;;;; +A4FF;LISU PUNCTUATION FULL STOP;Po;0;L;;;;;N;;;;; +A500;VAI SYLLABLE EE;Lo;0;L;;;;;N;;;;; +A501;VAI SYLLABLE EEN;Lo;0;L;;;;;N;;;;; +A502;VAI SYLLABLE HEE;Lo;0;L;;;;;N;;;;; +A503;VAI SYLLABLE WEE;Lo;0;L;;;;;N;;;;; +A504;VAI SYLLABLE WEEN;Lo;0;L;;;;;N;;;;; +A505;VAI SYLLABLE PEE;Lo;0;L;;;;;N;;;;; +A506;VAI SYLLABLE BHEE;Lo;0;L;;;;;N;;;;; +A507;VAI SYLLABLE BEE;Lo;0;L;;;;;N;;;;; +A508;VAI SYLLABLE MBEE;Lo;0;L;;;;;N;;;;; +A509;VAI SYLLABLE KPEE;Lo;0;L;;;;;N;;;;; +A50A;VAI SYLLABLE MGBEE;Lo;0;L;;;;;N;;;;; +A50B;VAI SYLLABLE GBEE;Lo;0;L;;;;;N;;;;; +A50C;VAI SYLLABLE FEE;Lo;0;L;;;;;N;;;;; +A50D;VAI SYLLABLE VEE;Lo;0;L;;;;;N;;;;; +A50E;VAI SYLLABLE TEE;Lo;0;L;;;;;N;;;;; +A50F;VAI SYLLABLE THEE;Lo;0;L;;;;;N;;;;; +A510;VAI SYLLABLE DHEE;Lo;0;L;;;;;N;;;;; +A511;VAI SYLLABLE DHHEE;Lo;0;L;;;;;N;;;;; +A512;VAI SYLLABLE LEE;Lo;0;L;;;;;N;;;;; +A513;VAI SYLLABLE REE;Lo;0;L;;;;;N;;;;; +A514;VAI SYLLABLE DEE;Lo;0;L;;;;;N;;;;; +A515;VAI SYLLABLE NDEE;Lo;0;L;;;;;N;;;;; +A516;VAI SYLLABLE SEE;Lo;0;L;;;;;N;;;;; +A517;VAI SYLLABLE SHEE;Lo;0;L;;;;;N;;;;; +A518;VAI SYLLABLE ZEE;Lo;0;L;;;;;N;;;;; +A519;VAI SYLLABLE ZHEE;Lo;0;L;;;;;N;;;;; +A51A;VAI SYLLABLE CEE;Lo;0;L;;;;;N;;;;; +A51B;VAI SYLLABLE JEE;Lo;0;L;;;;;N;;;;; +A51C;VAI SYLLABLE NJEE;Lo;0;L;;;;;N;;;;; +A51D;VAI SYLLABLE YEE;Lo;0;L;;;;;N;;;;; +A51E;VAI SYLLABLE KEE;Lo;0;L;;;;;N;;;;; +A51F;VAI SYLLABLE NGGEE;Lo;0;L;;;;;N;;;;; +A520;VAI SYLLABLE GEE;Lo;0;L;;;;;N;;;;; +A521;VAI SYLLABLE MEE;Lo;0;L;;;;;N;;;;; +A522;VAI SYLLABLE NEE;Lo;0;L;;;;;N;;;;; +A523;VAI SYLLABLE NYEE;Lo;0;L;;;;;N;;;;; +A524;VAI SYLLABLE I;Lo;0;L;;;;;N;;;;; +A525;VAI SYLLABLE IN;Lo;0;L;;;;;N;;;;; +A526;VAI SYLLABLE HI;Lo;0;L;;;;;N;;;;; +A527;VAI SYLLABLE HIN;Lo;0;L;;;;;N;;;;; +A528;VAI SYLLABLE WI;Lo;0;L;;;;;N;;;;; +A529;VAI SYLLABLE WIN;Lo;0;L;;;;;N;;;;; +A52A;VAI SYLLABLE PI;Lo;0;L;;;;;N;;;;; +A52B;VAI SYLLABLE BHI;Lo;0;L;;;;;N;;;;; +A52C;VAI SYLLABLE BI;Lo;0;L;;;;;N;;;;; +A52D;VAI SYLLABLE MBI;Lo;0;L;;;;;N;;;;; +A52E;VAI SYLLABLE KPI;Lo;0;L;;;;;N;;;;; +A52F;VAI SYLLABLE MGBI;Lo;0;L;;;;;N;;;;; +A530;VAI SYLLABLE GBI;Lo;0;L;;;;;N;;;;; +A531;VAI SYLLABLE FI;Lo;0;L;;;;;N;;;;; +A532;VAI SYLLABLE VI;Lo;0;L;;;;;N;;;;; +A533;VAI SYLLABLE TI;Lo;0;L;;;;;N;;;;; +A534;VAI SYLLABLE THI;Lo;0;L;;;;;N;;;;; +A535;VAI SYLLABLE DHI;Lo;0;L;;;;;N;;;;; +A536;VAI SYLLABLE DHHI;Lo;0;L;;;;;N;;;;; +A537;VAI SYLLABLE LI;Lo;0;L;;;;;N;;;;; +A538;VAI SYLLABLE RI;Lo;0;L;;;;;N;;;;; +A539;VAI SYLLABLE DI;Lo;0;L;;;;;N;;;;; +A53A;VAI SYLLABLE NDI;Lo;0;L;;;;;N;;;;; +A53B;VAI SYLLABLE SI;Lo;0;L;;;;;N;;;;; +A53C;VAI SYLLABLE SHI;Lo;0;L;;;;;N;;;;; +A53D;VAI SYLLABLE ZI;Lo;0;L;;;;;N;;;;; +A53E;VAI SYLLABLE ZHI;Lo;0;L;;;;;N;;;;; +A53F;VAI SYLLABLE CI;Lo;0;L;;;;;N;;;;; +A540;VAI SYLLABLE JI;Lo;0;L;;;;;N;;;;; +A541;VAI SYLLABLE NJI;Lo;0;L;;;;;N;;;;; +A542;VAI SYLLABLE YI;Lo;0;L;;;;;N;;;;; +A543;VAI SYLLABLE KI;Lo;0;L;;;;;N;;;;; +A544;VAI SYLLABLE NGGI;Lo;0;L;;;;;N;;;;; +A545;VAI SYLLABLE GI;Lo;0;L;;;;;N;;;;; +A546;VAI SYLLABLE MI;Lo;0;L;;;;;N;;;;; +A547;VAI SYLLABLE NI;Lo;0;L;;;;;N;;;;; +A548;VAI SYLLABLE NYI;Lo;0;L;;;;;N;;;;; +A549;VAI SYLLABLE A;Lo;0;L;;;;;N;;;;; +A54A;VAI SYLLABLE AN;Lo;0;L;;;;;N;;;;; +A54B;VAI SYLLABLE NGAN;Lo;0;L;;;;;N;;;;; +A54C;VAI SYLLABLE HA;Lo;0;L;;;;;N;;;;; +A54D;VAI SYLLABLE HAN;Lo;0;L;;;;;N;;;;; +A54E;VAI SYLLABLE WA;Lo;0;L;;;;;N;;;;; +A54F;VAI SYLLABLE WAN;Lo;0;L;;;;;N;;;;; +A550;VAI SYLLABLE PA;Lo;0;L;;;;;N;;;;; +A551;VAI SYLLABLE BHA;Lo;0;L;;;;;N;;;;; +A552;VAI SYLLABLE BA;Lo;0;L;;;;;N;;;;; +A553;VAI SYLLABLE MBA;Lo;0;L;;;;;N;;;;; +A554;VAI SYLLABLE KPA;Lo;0;L;;;;;N;;;;; +A555;VAI SYLLABLE KPAN;Lo;0;L;;;;;N;;;;; +A556;VAI SYLLABLE MGBA;Lo;0;L;;;;;N;;;;; +A557;VAI SYLLABLE GBA;Lo;0;L;;;;;N;;;;; +A558;VAI SYLLABLE FA;Lo;0;L;;;;;N;;;;; +A559;VAI SYLLABLE VA;Lo;0;L;;;;;N;;;;; +A55A;VAI SYLLABLE TA;Lo;0;L;;;;;N;;;;; +A55B;VAI SYLLABLE THA;Lo;0;L;;;;;N;;;;; +A55C;VAI SYLLABLE DHA;Lo;0;L;;;;;N;;;;; +A55D;VAI SYLLABLE DHHA;Lo;0;L;;;;;N;;;;; +A55E;VAI SYLLABLE LA;Lo;0;L;;;;;N;;;;; +A55F;VAI SYLLABLE RA;Lo;0;L;;;;;N;;;;; +A560;VAI SYLLABLE DA;Lo;0;L;;;;;N;;;;; +A561;VAI SYLLABLE NDA;Lo;0;L;;;;;N;;;;; +A562;VAI SYLLABLE SA;Lo;0;L;;;;;N;;;;; +A563;VAI SYLLABLE SHA;Lo;0;L;;;;;N;;;;; +A564;VAI SYLLABLE ZA;Lo;0;L;;;;;N;;;;; +A565;VAI SYLLABLE ZHA;Lo;0;L;;;;;N;;;;; +A566;VAI SYLLABLE CA;Lo;0;L;;;;;N;;;;; +A567;VAI SYLLABLE JA;Lo;0;L;;;;;N;;;;; +A568;VAI SYLLABLE NJA;Lo;0;L;;;;;N;;;;; +A569;VAI SYLLABLE YA;Lo;0;L;;;;;N;;;;; +A56A;VAI SYLLABLE KA;Lo;0;L;;;;;N;;;;; +A56B;VAI SYLLABLE KAN;Lo;0;L;;;;;N;;;;; +A56C;VAI SYLLABLE NGGA;Lo;0;L;;;;;N;;;;; +A56D;VAI SYLLABLE GA;Lo;0;L;;;;;N;;;;; +A56E;VAI SYLLABLE MA;Lo;0;L;;;;;N;;;;; +A56F;VAI SYLLABLE NA;Lo;0;L;;;;;N;;;;; +A570;VAI SYLLABLE NYA;Lo;0;L;;;;;N;;;;; +A571;VAI SYLLABLE OO;Lo;0;L;;;;;N;;;;; +A572;VAI SYLLABLE OON;Lo;0;L;;;;;N;;;;; +A573;VAI SYLLABLE HOO;Lo;0;L;;;;;N;;;;; +A574;VAI SYLLABLE WOO;Lo;0;L;;;;;N;;;;; +A575;VAI SYLLABLE WOON;Lo;0;L;;;;;N;;;;; +A576;VAI SYLLABLE POO;Lo;0;L;;;;;N;;;;; +A577;VAI SYLLABLE BHOO;Lo;0;L;;;;;N;;;;; +A578;VAI SYLLABLE BOO;Lo;0;L;;;;;N;;;;; +A579;VAI SYLLABLE MBOO;Lo;0;L;;;;;N;;;;; +A57A;VAI SYLLABLE KPOO;Lo;0;L;;;;;N;;;;; +A57B;VAI SYLLABLE MGBOO;Lo;0;L;;;;;N;;;;; +A57C;VAI SYLLABLE GBOO;Lo;0;L;;;;;N;;;;; +A57D;VAI SYLLABLE FOO;Lo;0;L;;;;;N;;;;; +A57E;VAI SYLLABLE VOO;Lo;0;L;;;;;N;;;;; +A57F;VAI SYLLABLE TOO;Lo;0;L;;;;;N;;;;; +A580;VAI SYLLABLE THOO;Lo;0;L;;;;;N;;;;; +A581;VAI SYLLABLE DHOO;Lo;0;L;;;;;N;;;;; +A582;VAI SYLLABLE DHHOO;Lo;0;L;;;;;N;;;;; +A583;VAI SYLLABLE LOO;Lo;0;L;;;;;N;;;;; +A584;VAI SYLLABLE ROO;Lo;0;L;;;;;N;;;;; +A585;VAI SYLLABLE DOO;Lo;0;L;;;;;N;;;;; +A586;VAI SYLLABLE NDOO;Lo;0;L;;;;;N;;;;; +A587;VAI SYLLABLE SOO;Lo;0;L;;;;;N;;;;; +A588;VAI SYLLABLE SHOO;Lo;0;L;;;;;N;;;;; +A589;VAI SYLLABLE ZOO;Lo;0;L;;;;;N;;;;; +A58A;VAI SYLLABLE ZHOO;Lo;0;L;;;;;N;;;;; +A58B;VAI SYLLABLE COO;Lo;0;L;;;;;N;;;;; +A58C;VAI SYLLABLE JOO;Lo;0;L;;;;;N;;;;; +A58D;VAI SYLLABLE NJOO;Lo;0;L;;;;;N;;;;; +A58E;VAI SYLLABLE YOO;Lo;0;L;;;;;N;;;;; +A58F;VAI SYLLABLE KOO;Lo;0;L;;;;;N;;;;; +A590;VAI SYLLABLE NGGOO;Lo;0;L;;;;;N;;;;; +A591;VAI SYLLABLE GOO;Lo;0;L;;;;;N;;;;; +A592;VAI SYLLABLE MOO;Lo;0;L;;;;;N;;;;; +A593;VAI SYLLABLE NOO;Lo;0;L;;;;;N;;;;; +A594;VAI SYLLABLE NYOO;Lo;0;L;;;;;N;;;;; +A595;VAI SYLLABLE U;Lo;0;L;;;;;N;;;;; +A596;VAI SYLLABLE UN;Lo;0;L;;;;;N;;;;; +A597;VAI SYLLABLE HU;Lo;0;L;;;;;N;;;;; +A598;VAI SYLLABLE HUN;Lo;0;L;;;;;N;;;;; +A599;VAI SYLLABLE WU;Lo;0;L;;;;;N;;;;; +A59A;VAI SYLLABLE WUN;Lo;0;L;;;;;N;;;;; +A59B;VAI SYLLABLE PU;Lo;0;L;;;;;N;;;;; +A59C;VAI SYLLABLE BHU;Lo;0;L;;;;;N;;;;; +A59D;VAI SYLLABLE BU;Lo;0;L;;;;;N;;;;; +A59E;VAI SYLLABLE MBU;Lo;0;L;;;;;N;;;;; +A59F;VAI SYLLABLE KPU;Lo;0;L;;;;;N;;;;; +A5A0;VAI SYLLABLE MGBU;Lo;0;L;;;;;N;;;;; +A5A1;VAI SYLLABLE GBU;Lo;0;L;;;;;N;;;;; +A5A2;VAI SYLLABLE FU;Lo;0;L;;;;;N;;;;; +A5A3;VAI SYLLABLE VU;Lo;0;L;;;;;N;;;;; +A5A4;VAI SYLLABLE TU;Lo;0;L;;;;;N;;;;; +A5A5;VAI SYLLABLE THU;Lo;0;L;;;;;N;;;;; +A5A6;VAI SYLLABLE DHU;Lo;0;L;;;;;N;;;;; +A5A7;VAI SYLLABLE DHHU;Lo;0;L;;;;;N;;;;; +A5A8;VAI SYLLABLE LU;Lo;0;L;;;;;N;;;;; +A5A9;VAI SYLLABLE RU;Lo;0;L;;;;;N;;;;; +A5AA;VAI SYLLABLE DU;Lo;0;L;;;;;N;;;;; +A5AB;VAI SYLLABLE NDU;Lo;0;L;;;;;N;;;;; +A5AC;VAI SYLLABLE SU;Lo;0;L;;;;;N;;;;; +A5AD;VAI SYLLABLE SHU;Lo;0;L;;;;;N;;;;; +A5AE;VAI SYLLABLE ZU;Lo;0;L;;;;;N;;;;; +A5AF;VAI SYLLABLE ZHU;Lo;0;L;;;;;N;;;;; +A5B0;VAI SYLLABLE CU;Lo;0;L;;;;;N;;;;; +A5B1;VAI SYLLABLE JU;Lo;0;L;;;;;N;;;;; +A5B2;VAI SYLLABLE NJU;Lo;0;L;;;;;N;;;;; +A5B3;VAI SYLLABLE YU;Lo;0;L;;;;;N;;;;; +A5B4;VAI SYLLABLE KU;Lo;0;L;;;;;N;;;;; +A5B5;VAI SYLLABLE NGGU;Lo;0;L;;;;;N;;;;; +A5B6;VAI SYLLABLE GU;Lo;0;L;;;;;N;;;;; +A5B7;VAI SYLLABLE MU;Lo;0;L;;;;;N;;;;; +A5B8;VAI SYLLABLE NU;Lo;0;L;;;;;N;;;;; +A5B9;VAI SYLLABLE NYU;Lo;0;L;;;;;N;;;;; +A5BA;VAI SYLLABLE O;Lo;0;L;;;;;N;;;;; +A5BB;VAI SYLLABLE ON;Lo;0;L;;;;;N;;;;; +A5BC;VAI SYLLABLE NGON;Lo;0;L;;;;;N;;;;; +A5BD;VAI SYLLABLE HO;Lo;0;L;;;;;N;;;;; +A5BE;VAI SYLLABLE HON;Lo;0;L;;;;;N;;;;; +A5BF;VAI SYLLABLE WO;Lo;0;L;;;;;N;;;;; +A5C0;VAI SYLLABLE WON;Lo;0;L;;;;;N;;;;; +A5C1;VAI SYLLABLE PO;Lo;0;L;;;;;N;;;;; +A5C2;VAI SYLLABLE BHO;Lo;0;L;;;;;N;;;;; +A5C3;VAI SYLLABLE BO;Lo;0;L;;;;;N;;;;; +A5C4;VAI SYLLABLE MBO;Lo;0;L;;;;;N;;;;; +A5C5;VAI SYLLABLE KPO;Lo;0;L;;;;;N;;;;; +A5C6;VAI SYLLABLE MGBO;Lo;0;L;;;;;N;;;;; +A5C7;VAI SYLLABLE GBO;Lo;0;L;;;;;N;;;;; +A5C8;VAI SYLLABLE GBON;Lo;0;L;;;;;N;;;;; +A5C9;VAI SYLLABLE FO;Lo;0;L;;;;;N;;;;; +A5CA;VAI SYLLABLE VO;Lo;0;L;;;;;N;;;;; +A5CB;VAI SYLLABLE TO;Lo;0;L;;;;;N;;;;; +A5CC;VAI SYLLABLE THO;Lo;0;L;;;;;N;;;;; +A5CD;VAI SYLLABLE DHO;Lo;0;L;;;;;N;;;;; +A5CE;VAI SYLLABLE DHHO;Lo;0;L;;;;;N;;;;; +A5CF;VAI SYLLABLE LO;Lo;0;L;;;;;N;;;;; +A5D0;VAI SYLLABLE RO;Lo;0;L;;;;;N;;;;; +A5D1;VAI SYLLABLE DO;Lo;0;L;;;;;N;;;;; +A5D2;VAI SYLLABLE NDO;Lo;0;L;;;;;N;;;;; +A5D3;VAI SYLLABLE SO;Lo;0;L;;;;;N;;;;; +A5D4;VAI SYLLABLE SHO;Lo;0;L;;;;;N;;;;; +A5D5;VAI SYLLABLE ZO;Lo;0;L;;;;;N;;;;; +A5D6;VAI SYLLABLE ZHO;Lo;0;L;;;;;N;;;;; +A5D7;VAI SYLLABLE CO;Lo;0;L;;;;;N;;;;; +A5D8;VAI SYLLABLE JO;Lo;0;L;;;;;N;;;;; +A5D9;VAI SYLLABLE NJO;Lo;0;L;;;;;N;;;;; +A5DA;VAI SYLLABLE YO;Lo;0;L;;;;;N;;;;; +A5DB;VAI SYLLABLE KO;Lo;0;L;;;;;N;;;;; +A5DC;VAI SYLLABLE NGGO;Lo;0;L;;;;;N;;;;; +A5DD;VAI SYLLABLE GO;Lo;0;L;;;;;N;;;;; +A5DE;VAI SYLLABLE MO;Lo;0;L;;;;;N;;;;; +A5DF;VAI SYLLABLE NO;Lo;0;L;;;;;N;;;;; +A5E0;VAI SYLLABLE NYO;Lo;0;L;;;;;N;;;;; +A5E1;VAI SYLLABLE E;Lo;0;L;;;;;N;;;;; +A5E2;VAI SYLLABLE EN;Lo;0;L;;;;;N;;;;; +A5E3;VAI SYLLABLE NGEN;Lo;0;L;;;;;N;;;;; +A5E4;VAI SYLLABLE HE;Lo;0;L;;;;;N;;;;; +A5E5;VAI SYLLABLE HEN;Lo;0;L;;;;;N;;;;; +A5E6;VAI SYLLABLE WE;Lo;0;L;;;;;N;;;;; +A5E7;VAI SYLLABLE WEN;Lo;0;L;;;;;N;;;;; +A5E8;VAI SYLLABLE PE;Lo;0;L;;;;;N;;;;; +A5E9;VAI SYLLABLE BHE;Lo;0;L;;;;;N;;;;; +A5EA;VAI SYLLABLE BE;Lo;0;L;;;;;N;;;;; +A5EB;VAI SYLLABLE MBE;Lo;0;L;;;;;N;;;;; +A5EC;VAI SYLLABLE KPE;Lo;0;L;;;;;N;;;;; +A5ED;VAI SYLLABLE KPEN;Lo;0;L;;;;;N;;;;; +A5EE;VAI SYLLABLE MGBE;Lo;0;L;;;;;N;;;;; +A5EF;VAI SYLLABLE GBE;Lo;0;L;;;;;N;;;;; +A5F0;VAI SYLLABLE GBEN;Lo;0;L;;;;;N;;;;; +A5F1;VAI SYLLABLE FE;Lo;0;L;;;;;N;;;;; +A5F2;VAI SYLLABLE VE;Lo;0;L;;;;;N;;;;; +A5F3;VAI SYLLABLE TE;Lo;0;L;;;;;N;;;;; +A5F4;VAI SYLLABLE THE;Lo;0;L;;;;;N;;;;; +A5F5;VAI SYLLABLE DHE;Lo;0;L;;;;;N;;;;; +A5F6;VAI SYLLABLE DHHE;Lo;0;L;;;;;N;;;;; +A5F7;VAI SYLLABLE LE;Lo;0;L;;;;;N;;;;; +A5F8;VAI SYLLABLE RE;Lo;0;L;;;;;N;;;;; +A5F9;VAI SYLLABLE DE;Lo;0;L;;;;;N;;;;; +A5FA;VAI SYLLABLE NDE;Lo;0;L;;;;;N;;;;; +A5FB;VAI SYLLABLE SE;Lo;0;L;;;;;N;;;;; +A5FC;VAI SYLLABLE SHE;Lo;0;L;;;;;N;;;;; +A5FD;VAI SYLLABLE ZE;Lo;0;L;;;;;N;;;;; +A5FE;VAI SYLLABLE ZHE;Lo;0;L;;;;;N;;;;; +A5FF;VAI SYLLABLE CE;Lo;0;L;;;;;N;;;;; +A600;VAI SYLLABLE JE;Lo;0;L;;;;;N;;;;; +A601;VAI SYLLABLE NJE;Lo;0;L;;;;;N;;;;; +A602;VAI SYLLABLE YE;Lo;0;L;;;;;N;;;;; +A603;VAI SYLLABLE KE;Lo;0;L;;;;;N;;;;; +A604;VAI SYLLABLE NGGE;Lo;0;L;;;;;N;;;;; +A605;VAI SYLLABLE NGGEN;Lo;0;L;;;;;N;;;;; +A606;VAI SYLLABLE GE;Lo;0;L;;;;;N;;;;; +A607;VAI SYLLABLE GEN;Lo;0;L;;;;;N;;;;; +A608;VAI SYLLABLE ME;Lo;0;L;;;;;N;;;;; +A609;VAI SYLLABLE NE;Lo;0;L;;;;;N;;;;; +A60A;VAI SYLLABLE NYE;Lo;0;L;;;;;N;;;;; +A60B;VAI SYLLABLE NG;Lo;0;L;;;;;N;;;;; +A60C;VAI SYLLABLE LENGTHENER;Lm;0;L;;;;;N;;;;; +A60D;VAI COMMA;Po;0;ON;;;;;N;;;;; +A60E;VAI FULL STOP;Po;0;ON;;;;;N;;;;; +A60F;VAI QUESTION MARK;Po;0;ON;;;;;N;;;;; +A610;VAI SYLLABLE NDOLE FA;Lo;0;L;;;;;N;;;;; +A611;VAI SYLLABLE NDOLE KA;Lo;0;L;;;;;N;;;;; +A612;VAI SYLLABLE NDOLE SOO;Lo;0;L;;;;;N;;;;; +A613;VAI SYMBOL FEENG;Lo;0;L;;;;;N;;;;; +A614;VAI SYMBOL KEENG;Lo;0;L;;;;;N;;;;; +A615;VAI SYMBOL TING;Lo;0;L;;;;;N;;;;; +A616;VAI SYMBOL NII;Lo;0;L;;;;;N;;;;; +A617;VAI SYMBOL BANG;Lo;0;L;;;;;N;;;;; +A618;VAI SYMBOL FAA;Lo;0;L;;;;;N;;;;; +A619;VAI SYMBOL TAA;Lo;0;L;;;;;N;;;;; +A61A;VAI SYMBOL DANG;Lo;0;L;;;;;N;;;;; +A61B;VAI SYMBOL DOONG;Lo;0;L;;;;;N;;;;; +A61C;VAI SYMBOL KUNG;Lo;0;L;;;;;N;;;;; +A61D;VAI SYMBOL TONG;Lo;0;L;;;;;N;;;;; +A61E;VAI SYMBOL DO-O;Lo;0;L;;;;;N;;;;; +A61F;VAI SYMBOL JONG;Lo;0;L;;;;;N;;;;; +A620;VAI DIGIT ZERO;Nd;0;L;;0;0;0;N;;;;; +A621;VAI DIGIT ONE;Nd;0;L;;1;1;1;N;;;;; +A622;VAI DIGIT TWO;Nd;0;L;;2;2;2;N;;;;; +A623;VAI DIGIT THREE;Nd;0;L;;3;3;3;N;;;;; +A624;VAI DIGIT FOUR;Nd;0;L;;4;4;4;N;;;;; +A625;VAI DIGIT FIVE;Nd;0;L;;5;5;5;N;;;;; +A626;VAI DIGIT SIX;Nd;0;L;;6;6;6;N;;;;; +A627;VAI DIGIT SEVEN;Nd;0;L;;7;7;7;N;;;;; +A628;VAI DIGIT EIGHT;Nd;0;L;;8;8;8;N;;;;; +A629;VAI DIGIT NINE;Nd;0;L;;9;9;9;N;;;;; +A62A;VAI SYLLABLE NDOLE MA;Lo;0;L;;;;;N;;;;; +A62B;VAI SYLLABLE NDOLE DO;Lo;0;L;;;;;N;;;;; +A640;CYRILLIC CAPITAL LETTER ZEMLYA;Lu;0;L;;;;;N;;;;A641; +A641;CYRILLIC SMALL LETTER ZEMLYA;Ll;0;L;;;;;N;;;A640;;A640 +A642;CYRILLIC CAPITAL LETTER DZELO;Lu;0;L;;;;;N;;;;A643; +A643;CYRILLIC SMALL LETTER DZELO;Ll;0;L;;;;;N;;;A642;;A642 +A644;CYRILLIC CAPITAL LETTER REVERSED DZE;Lu;0;L;;;;;N;;;;A645; +A645;CYRILLIC SMALL LETTER REVERSED DZE;Ll;0;L;;;;;N;;;A644;;A644 +A646;CYRILLIC CAPITAL LETTER IOTA;Lu;0;L;;;;;N;;;;A647; +A647;CYRILLIC SMALL LETTER IOTA;Ll;0;L;;;;;N;;;A646;;A646 +A648;CYRILLIC CAPITAL LETTER DJERV;Lu;0;L;;;;;N;;;;A649; +A649;CYRILLIC SMALL LETTER DJERV;Ll;0;L;;;;;N;;;A648;;A648 +A64A;CYRILLIC CAPITAL LETTER MONOGRAPH UK;Lu;0;L;;;;;N;;;;A64B; +A64B;CYRILLIC SMALL LETTER MONOGRAPH UK;Ll;0;L;;;;;N;;;A64A;;A64A +A64C;CYRILLIC CAPITAL LETTER BROAD OMEGA;Lu;0;L;;;;;N;;;;A64D; +A64D;CYRILLIC SMALL LETTER BROAD OMEGA;Ll;0;L;;;;;N;;;A64C;;A64C +A64E;CYRILLIC CAPITAL LETTER NEUTRAL YER;Lu;0;L;;;;;N;;;;A64F; +A64F;CYRILLIC SMALL LETTER NEUTRAL YER;Ll;0;L;;;;;N;;;A64E;;A64E +A650;CYRILLIC CAPITAL LETTER YERU WITH BACK YER;Lu;0;L;;;;;N;;;;A651; +A651;CYRILLIC SMALL LETTER YERU WITH BACK YER;Ll;0;L;;;;;N;;;A650;;A650 +A652;CYRILLIC CAPITAL LETTER IOTIFIED YAT;Lu;0;L;;;;;N;;;;A653; +A653;CYRILLIC SMALL LETTER IOTIFIED YAT;Ll;0;L;;;;;N;;;A652;;A652 +A654;CYRILLIC CAPITAL LETTER REVERSED YU;Lu;0;L;;;;;N;;;;A655; +A655;CYRILLIC SMALL LETTER REVERSED YU;Ll;0;L;;;;;N;;;A654;;A654 +A656;CYRILLIC CAPITAL LETTER IOTIFIED A;Lu;0;L;;;;;N;;;;A657; +A657;CYRILLIC SMALL LETTER IOTIFIED A;Ll;0;L;;;;;N;;;A656;;A656 +A658;CYRILLIC CAPITAL LETTER CLOSED LITTLE YUS;Lu;0;L;;;;;N;;;;A659; +A659;CYRILLIC SMALL LETTER CLOSED LITTLE YUS;Ll;0;L;;;;;N;;;A658;;A658 +A65A;CYRILLIC CAPITAL LETTER BLENDED YUS;Lu;0;L;;;;;N;;;;A65B; +A65B;CYRILLIC SMALL LETTER BLENDED YUS;Ll;0;L;;;;;N;;;A65A;;A65A +A65C;CYRILLIC CAPITAL LETTER IOTIFIED CLOSED LITTLE YUS;Lu;0;L;;;;;N;;;;A65D; +A65D;CYRILLIC SMALL LETTER IOTIFIED CLOSED LITTLE YUS;Ll;0;L;;;;;N;;;A65C;;A65C +A65E;CYRILLIC CAPITAL LETTER YN;Lu;0;L;;;;;N;;;;A65F; +A65F;CYRILLIC SMALL LETTER YN;Ll;0;L;;;;;N;;;A65E;;A65E +A660;CYRILLIC CAPITAL LETTER REVERSED TSE;Lu;0;L;;;;;N;;;;A661; +A661;CYRILLIC SMALL LETTER REVERSED TSE;Ll;0;L;;;;;N;;;A660;;A660 +A662;CYRILLIC CAPITAL LETTER SOFT DE;Lu;0;L;;;;;N;;;;A663; +A663;CYRILLIC SMALL LETTER SOFT DE;Ll;0;L;;;;;N;;;A662;;A662 +A664;CYRILLIC CAPITAL LETTER SOFT EL;Lu;0;L;;;;;N;;;;A665; +A665;CYRILLIC SMALL LETTER SOFT EL;Ll;0;L;;;;;N;;;A664;;A664 +A666;CYRILLIC CAPITAL LETTER SOFT EM;Lu;0;L;;;;;N;;;;A667; +A667;CYRILLIC SMALL LETTER SOFT EM;Ll;0;L;;;;;N;;;A666;;A666 +A668;CYRILLIC CAPITAL LETTER MONOCULAR O;Lu;0;L;;;;;N;;;;A669; +A669;CYRILLIC SMALL LETTER MONOCULAR O;Ll;0;L;;;;;N;;;A668;;A668 +A66A;CYRILLIC CAPITAL LETTER BINOCULAR O;Lu;0;L;;;;;N;;;;A66B; +A66B;CYRILLIC SMALL LETTER BINOCULAR O;Ll;0;L;;;;;N;;;A66A;;A66A +A66C;CYRILLIC CAPITAL LETTER DOUBLE MONOCULAR O;Lu;0;L;;;;;N;;;;A66D; +A66D;CYRILLIC SMALL LETTER DOUBLE MONOCULAR O;Ll;0;L;;;;;N;;;A66C;;A66C +A66E;CYRILLIC LETTER MULTIOCULAR O;Lo;0;L;;;;;N;;;;; +A66F;COMBINING CYRILLIC VZMET;Mn;230;NSM;;;;;N;;;;; +A670;COMBINING CYRILLIC TEN MILLIONS SIGN;Me;0;NSM;;;;;N;;;;; +A671;COMBINING CYRILLIC HUNDRED MILLIONS SIGN;Me;0;NSM;;;;;N;;;;; +A672;COMBINING CYRILLIC THOUSAND MILLIONS SIGN;Me;0;NSM;;;;;N;;;;; +A673;SLAVONIC ASTERISK;Po;0;ON;;;;;N;;;;; +A674;COMBINING CYRILLIC LETTER UKRAINIAN IE;Mn;230;NSM;;;;;N;;;;; +A675;COMBINING CYRILLIC LETTER I;Mn;230;NSM;;;;;N;;;;; +A676;COMBINING CYRILLIC LETTER YI;Mn;230;NSM;;;;;N;;;;; +A677;COMBINING CYRILLIC LETTER U;Mn;230;NSM;;;;;N;;;;; +A678;COMBINING CYRILLIC LETTER HARD SIGN;Mn;230;NSM;;;;;N;;;;; +A679;COMBINING CYRILLIC LETTER YERU;Mn;230;NSM;;;;;N;;;;; +A67A;COMBINING CYRILLIC LETTER SOFT SIGN;Mn;230;NSM;;;;;N;;;;; +A67B;COMBINING CYRILLIC LETTER OMEGA;Mn;230;NSM;;;;;N;;;;; +A67C;COMBINING CYRILLIC KAVYKA;Mn;230;NSM;;;;;N;;;;; +A67D;COMBINING CYRILLIC PAYEROK;Mn;230;NSM;;;;;N;;;;; +A67E;CYRILLIC KAVYKA;Po;0;ON;;;;;N;;;;; +A67F;CYRILLIC PAYEROK;Lm;0;ON;;;;;N;;;;; +A680;CYRILLIC CAPITAL LETTER DWE;Lu;0;L;;;;;N;;;;A681; +A681;CYRILLIC SMALL LETTER DWE;Ll;0;L;;;;;N;;;A680;;A680 +A682;CYRILLIC CAPITAL LETTER DZWE;Lu;0;L;;;;;N;;;;A683; +A683;CYRILLIC SMALL LETTER DZWE;Ll;0;L;;;;;N;;;A682;;A682 +A684;CYRILLIC CAPITAL LETTER ZHWE;Lu;0;L;;;;;N;;;;A685; +A685;CYRILLIC SMALL LETTER ZHWE;Ll;0;L;;;;;N;;;A684;;A684 +A686;CYRILLIC CAPITAL LETTER CCHE;Lu;0;L;;;;;N;;;;A687; +A687;CYRILLIC SMALL LETTER CCHE;Ll;0;L;;;;;N;;;A686;;A686 +A688;CYRILLIC CAPITAL LETTER DZZE;Lu;0;L;;;;;N;;;;A689; +A689;CYRILLIC SMALL LETTER DZZE;Ll;0;L;;;;;N;;;A688;;A688 +A68A;CYRILLIC CAPITAL LETTER TE WITH MIDDLE HOOK;Lu;0;L;;;;;N;;;;A68B; +A68B;CYRILLIC SMALL LETTER TE WITH MIDDLE HOOK;Ll;0;L;;;;;N;;;A68A;;A68A +A68C;CYRILLIC CAPITAL LETTER TWE;Lu;0;L;;;;;N;;;;A68D; +A68D;CYRILLIC SMALL LETTER TWE;Ll;0;L;;;;;N;;;A68C;;A68C +A68E;CYRILLIC CAPITAL LETTER TSWE;Lu;0;L;;;;;N;;;;A68F; +A68F;CYRILLIC SMALL LETTER TSWE;Ll;0;L;;;;;N;;;A68E;;A68E +A690;CYRILLIC CAPITAL LETTER TSSE;Lu;0;L;;;;;N;;;;A691; +A691;CYRILLIC SMALL LETTER TSSE;Ll;0;L;;;;;N;;;A690;;A690 +A692;CYRILLIC CAPITAL LETTER TCHE;Lu;0;L;;;;;N;;;;A693; +A693;CYRILLIC SMALL LETTER TCHE;Ll;0;L;;;;;N;;;A692;;A692 +A694;CYRILLIC CAPITAL LETTER HWE;Lu;0;L;;;;;N;;;;A695; +A695;CYRILLIC SMALL LETTER HWE;Ll;0;L;;;;;N;;;A694;;A694 +A696;CYRILLIC CAPITAL LETTER SHWE;Lu;0;L;;;;;N;;;;A697; +A697;CYRILLIC SMALL LETTER SHWE;Ll;0;L;;;;;N;;;A696;;A696 +A698;CYRILLIC CAPITAL LETTER DOUBLE O;Lu;0;L;;;;;N;;;;A699; +A699;CYRILLIC SMALL LETTER DOUBLE O;Ll;0;L;;;;;N;;;A698;;A698 +A69A;CYRILLIC CAPITAL LETTER CROSSED O;Lu;0;L;;;;;N;;;;A69B; +A69B;CYRILLIC SMALL LETTER CROSSED O;Ll;0;L;;;;;N;;;A69A;;A69A +A69C;MODIFIER LETTER CYRILLIC HARD SIGN;Lm;0;L; 044A;;;;N;;;;; +A69D;MODIFIER LETTER CYRILLIC SOFT SIGN;Lm;0;L; 044C;;;;N;;;;; +A69E;COMBINING CYRILLIC LETTER EF;Mn;230;NSM;;;;;N;;;;; +A69F;COMBINING CYRILLIC LETTER IOTIFIED E;Mn;230;NSM;;;;;N;;;;; +A6A0;BAMUM LETTER A;Lo;0;L;;;;;N;;;;; +A6A1;BAMUM LETTER KA;Lo;0;L;;;;;N;;;;; +A6A2;BAMUM LETTER U;Lo;0;L;;;;;N;;;;; +A6A3;BAMUM LETTER KU;Lo;0;L;;;;;N;;;;; +A6A4;BAMUM LETTER EE;Lo;0;L;;;;;N;;;;; +A6A5;BAMUM LETTER REE;Lo;0;L;;;;;N;;;;; +A6A6;BAMUM LETTER TAE;Lo;0;L;;;;;N;;;;; +A6A7;BAMUM LETTER O;Lo;0;L;;;;;N;;;;; +A6A8;BAMUM LETTER NYI;Lo;0;L;;;;;N;;;;; +A6A9;BAMUM LETTER I;Lo;0;L;;;;;N;;;;; +A6AA;BAMUM LETTER LA;Lo;0;L;;;;;N;;;;; +A6AB;BAMUM LETTER PA;Lo;0;L;;;;;N;;;;; +A6AC;BAMUM LETTER RII;Lo;0;L;;;;;N;;;;; +A6AD;BAMUM LETTER RIEE;Lo;0;L;;;;;N;;;;; +A6AE;BAMUM LETTER LEEEE;Lo;0;L;;;;;N;;;;; +A6AF;BAMUM LETTER MEEEE;Lo;0;L;;;;;N;;;;; +A6B0;BAMUM LETTER TAA;Lo;0;L;;;;;N;;;;; +A6B1;BAMUM LETTER NDAA;Lo;0;L;;;;;N;;;;; +A6B2;BAMUM LETTER NJAEM;Lo;0;L;;;;;N;;;;; +A6B3;BAMUM LETTER M;Lo;0;L;;;;;N;;;;; +A6B4;BAMUM LETTER SUU;Lo;0;L;;;;;N;;;;; +A6B5;BAMUM LETTER MU;Lo;0;L;;;;;N;;;;; +A6B6;BAMUM LETTER SHII;Lo;0;L;;;;;N;;;;; +A6B7;BAMUM LETTER SI;Lo;0;L;;;;;N;;;;; +A6B8;BAMUM LETTER SHEUX;Lo;0;L;;;;;N;;;;; +A6B9;BAMUM LETTER SEUX;Lo;0;L;;;;;N;;;;; +A6BA;BAMUM LETTER KYEE;Lo;0;L;;;;;N;;;;; +A6BB;BAMUM LETTER KET;Lo;0;L;;;;;N;;;;; +A6BC;BAMUM LETTER NUAE;Lo;0;L;;;;;N;;;;; +A6BD;BAMUM LETTER NU;Lo;0;L;;;;;N;;;;; +A6BE;BAMUM LETTER NJUAE;Lo;0;L;;;;;N;;;;; +A6BF;BAMUM LETTER YOQ;Lo;0;L;;;;;N;;;;; +A6C0;BAMUM LETTER SHU;Lo;0;L;;;;;N;;;;; +A6C1;BAMUM LETTER YUQ;Lo;0;L;;;;;N;;;;; +A6C2;BAMUM LETTER YA;Lo;0;L;;;;;N;;;;; +A6C3;BAMUM LETTER NSHA;Lo;0;L;;;;;N;;;;; +A6C4;BAMUM LETTER KEUX;Lo;0;L;;;;;N;;;;; +A6C5;BAMUM LETTER PEUX;Lo;0;L;;;;;N;;;;; +A6C6;BAMUM LETTER NJEE;Lo;0;L;;;;;N;;;;; +A6C7;BAMUM LETTER NTEE;Lo;0;L;;;;;N;;;;; +A6C8;BAMUM LETTER PUE;Lo;0;L;;;;;N;;;;; +A6C9;BAMUM LETTER WUE;Lo;0;L;;;;;N;;;;; +A6CA;BAMUM LETTER PEE;Lo;0;L;;;;;N;;;;; +A6CB;BAMUM LETTER FEE;Lo;0;L;;;;;N;;;;; +A6CC;BAMUM LETTER RU;Lo;0;L;;;;;N;;;;; +A6CD;BAMUM LETTER LU;Lo;0;L;;;;;N;;;;; +A6CE;BAMUM LETTER MI;Lo;0;L;;;;;N;;;;; +A6CF;BAMUM LETTER NI;Lo;0;L;;;;;N;;;;; +A6D0;BAMUM LETTER REUX;Lo;0;L;;;;;N;;;;; +A6D1;BAMUM LETTER RAE;Lo;0;L;;;;;N;;;;; +A6D2;BAMUM LETTER KEN;Lo;0;L;;;;;N;;;;; +A6D3;BAMUM LETTER NGKWAEN;Lo;0;L;;;;;N;;;;; +A6D4;BAMUM LETTER NGGA;Lo;0;L;;;;;N;;;;; +A6D5;BAMUM LETTER NGA;Lo;0;L;;;;;N;;;;; +A6D6;BAMUM LETTER SHO;Lo;0;L;;;;;N;;;;; +A6D7;BAMUM LETTER PUAE;Lo;0;L;;;;;N;;;;; +A6D8;BAMUM LETTER FU;Lo;0;L;;;;;N;;;;; +A6D9;BAMUM LETTER FOM;Lo;0;L;;;;;N;;;;; +A6DA;BAMUM LETTER WA;Lo;0;L;;;;;N;;;;; +A6DB;BAMUM LETTER NA;Lo;0;L;;;;;N;;;;; +A6DC;BAMUM LETTER LI;Lo;0;L;;;;;N;;;;; +A6DD;BAMUM LETTER PI;Lo;0;L;;;;;N;;;;; +A6DE;BAMUM LETTER LOQ;Lo;0;L;;;;;N;;;;; +A6DF;BAMUM LETTER KO;Lo;0;L;;;;;N;;;;; +A6E0;BAMUM LETTER MBEN;Lo;0;L;;;;;N;;;;; +A6E1;BAMUM LETTER REN;Lo;0;L;;;;;N;;;;; +A6E2;BAMUM LETTER MEN;Lo;0;L;;;;;N;;;;; +A6E3;BAMUM LETTER MA;Lo;0;L;;;;;N;;;;; +A6E4;BAMUM LETTER TI;Lo;0;L;;;;;N;;;;; +A6E5;BAMUM LETTER KI;Lo;0;L;;;;;N;;;;; +A6E6;BAMUM LETTER MO;Nl;0;L;;;;1;N;;;;; +A6E7;BAMUM LETTER MBAA;Nl;0;L;;;;2;N;;;;; +A6E8;BAMUM LETTER TET;Nl;0;L;;;;3;N;;;;; +A6E9;BAMUM LETTER KPA;Nl;0;L;;;;4;N;;;;; +A6EA;BAMUM LETTER TEN;Nl;0;L;;;;5;N;;;;; +A6EB;BAMUM LETTER NTUU;Nl;0;L;;;;6;N;;;;; +A6EC;BAMUM LETTER SAMBA;Nl;0;L;;;;7;N;;;;; +A6ED;BAMUM LETTER FAAMAE;Nl;0;L;;;;8;N;;;;; +A6EE;BAMUM LETTER KOVUU;Nl;0;L;;;;9;N;;;;; +A6EF;BAMUM LETTER KOGHOM;Nl;0;L;;;;0;N;;;;; +A6F0;BAMUM COMBINING MARK KOQNDON;Mn;230;NSM;;;;;N;;;;; +A6F1;BAMUM COMBINING MARK TUKWENTIS;Mn;230;NSM;;;;;N;;;;; +A6F2;BAMUM NJAEMLI;Po;0;L;;;;;N;;;;; +A6F3;BAMUM FULL STOP;Po;0;L;;;;;N;;;;; +A6F4;BAMUM COLON;Po;0;L;;;;;N;;;;; +A6F5;BAMUM COMMA;Po;0;L;;;;;N;;;;; +A6F6;BAMUM SEMICOLON;Po;0;L;;;;;N;;;;; +A6F7;BAMUM QUESTION MARK;Po;0;L;;;;;N;;;;; +A700;MODIFIER LETTER CHINESE TONE YIN PING;Sk;0;ON;;;;;N;;;;; +A701;MODIFIER LETTER CHINESE TONE YANG PING;Sk;0;ON;;;;;N;;;;; +A702;MODIFIER LETTER CHINESE TONE YIN SHANG;Sk;0;ON;;;;;N;;;;; +A703;MODIFIER LETTER CHINESE TONE YANG SHANG;Sk;0;ON;;;;;N;;;;; +A704;MODIFIER LETTER CHINESE TONE YIN QU;Sk;0;ON;;;;;N;;;;; +A705;MODIFIER LETTER CHINESE TONE YANG QU;Sk;0;ON;;;;;N;;;;; +A706;MODIFIER LETTER CHINESE TONE YIN RU;Sk;0;ON;;;;;N;;;;; +A707;MODIFIER LETTER CHINESE TONE YANG RU;Sk;0;ON;;;;;N;;;;; +A708;MODIFIER LETTER EXTRA-HIGH DOTTED TONE BAR;Sk;0;ON;;;;;N;;;;; +A709;MODIFIER LETTER HIGH DOTTED TONE BAR;Sk;0;ON;;;;;N;;;;; +A70A;MODIFIER LETTER MID DOTTED TONE BAR;Sk;0;ON;;;;;N;;;;; +A70B;MODIFIER LETTER LOW DOTTED TONE BAR;Sk;0;ON;;;;;N;;;;; +A70C;MODIFIER LETTER EXTRA-LOW DOTTED TONE BAR;Sk;0;ON;;;;;N;;;;; +A70D;MODIFIER LETTER EXTRA-HIGH DOTTED LEFT-STEM TONE BAR;Sk;0;ON;;;;;N;;;;; +A70E;MODIFIER LETTER HIGH DOTTED LEFT-STEM TONE BAR;Sk;0;ON;;;;;N;;;;; +A70F;MODIFIER LETTER MID DOTTED LEFT-STEM TONE BAR;Sk;0;ON;;;;;N;;;;; +A710;MODIFIER LETTER LOW DOTTED LEFT-STEM TONE BAR;Sk;0;ON;;;;;N;;;;; +A711;MODIFIER LETTER EXTRA-LOW DOTTED LEFT-STEM TONE BAR;Sk;0;ON;;;;;N;;;;; +A712;MODIFIER LETTER EXTRA-HIGH LEFT-STEM TONE BAR;Sk;0;ON;;;;;N;;;;; +A713;MODIFIER LETTER HIGH LEFT-STEM TONE BAR;Sk;0;ON;;;;;N;;;;; +A714;MODIFIER LETTER MID LEFT-STEM TONE BAR;Sk;0;ON;;;;;N;;;;; +A715;MODIFIER LETTER LOW LEFT-STEM TONE BAR;Sk;0;ON;;;;;N;;;;; +A716;MODIFIER LETTER EXTRA-LOW LEFT-STEM TONE BAR;Sk;0;ON;;;;;N;;;;; +A717;MODIFIER LETTER DOT VERTICAL BAR;Lm;0;ON;;;;;N;;;;; +A718;MODIFIER LETTER DOT SLASH;Lm;0;ON;;;;;N;;;;; +A719;MODIFIER LETTER DOT HORIZONTAL BAR;Lm;0;ON;;;;;N;;;;; +A71A;MODIFIER LETTER LOWER RIGHT CORNER ANGLE;Lm;0;ON;;;;;N;;;;; +A71B;MODIFIER LETTER RAISED UP ARROW;Lm;0;ON;;;;;N;;;;; +A71C;MODIFIER LETTER RAISED DOWN ARROW;Lm;0;ON;;;;;N;;;;; +A71D;MODIFIER LETTER RAISED EXCLAMATION MARK;Lm;0;ON;;;;;N;;;;; +A71E;MODIFIER LETTER RAISED INVERTED EXCLAMATION MARK;Lm;0;ON;;;;;N;;;;; +A71F;MODIFIER LETTER LOW INVERTED EXCLAMATION MARK;Lm;0;ON;;;;;N;;;;; +A720;MODIFIER LETTER STRESS AND HIGH TONE;Sk;0;ON;;;;;N;;;;; +A721;MODIFIER LETTER STRESS AND LOW TONE;Sk;0;ON;;;;;N;;;;; +A722;LATIN CAPITAL LETTER EGYPTOLOGICAL ALEF;Lu;0;L;;;;;N;;;;A723; +A723;LATIN SMALL LETTER EGYPTOLOGICAL ALEF;Ll;0;L;;;;;N;;;A722;;A722 +A724;LATIN CAPITAL LETTER EGYPTOLOGICAL AIN;Lu;0;L;;;;;N;;;;A725; +A725;LATIN SMALL LETTER EGYPTOLOGICAL AIN;Ll;0;L;;;;;N;;;A724;;A724 +A726;LATIN CAPITAL LETTER HENG;Lu;0;L;;;;;N;;;;A727; +A727;LATIN SMALL LETTER HENG;Ll;0;L;;;;;N;;;A726;;A726 +A728;LATIN CAPITAL LETTER TZ;Lu;0;L;;;;;N;;;;A729; +A729;LATIN SMALL LETTER TZ;Ll;0;L;;;;;N;;;A728;;A728 +A72A;LATIN CAPITAL LETTER TRESILLO;Lu;0;L;;;;;N;;;;A72B; +A72B;LATIN SMALL LETTER TRESILLO;Ll;0;L;;;;;N;;;A72A;;A72A +A72C;LATIN CAPITAL LETTER CUATRILLO;Lu;0;L;;;;;N;;;;A72D; +A72D;LATIN SMALL LETTER CUATRILLO;Ll;0;L;;;;;N;;;A72C;;A72C +A72E;LATIN CAPITAL LETTER CUATRILLO WITH COMMA;Lu;0;L;;;;;N;;;;A72F; +A72F;LATIN SMALL LETTER CUATRILLO WITH COMMA;Ll;0;L;;;;;N;;;A72E;;A72E +A730;LATIN LETTER SMALL CAPITAL F;Ll;0;L;;;;;N;;;;; +A731;LATIN LETTER SMALL CAPITAL S;Ll;0;L;;;;;N;;;;; +A732;LATIN CAPITAL LETTER AA;Lu;0;L;;;;;N;;;;A733; +A733;LATIN SMALL LETTER AA;Ll;0;L;;;;;N;;;A732;;A732 +A734;LATIN CAPITAL LETTER AO;Lu;0;L;;;;;N;;;;A735; +A735;LATIN SMALL LETTER AO;Ll;0;L;;;;;N;;;A734;;A734 +A736;LATIN CAPITAL LETTER AU;Lu;0;L;;;;;N;;;;A737; +A737;LATIN SMALL LETTER AU;Ll;0;L;;;;;N;;;A736;;A736 +A738;LATIN CAPITAL LETTER AV;Lu;0;L;;;;;N;;;;A739; +A739;LATIN SMALL LETTER AV;Ll;0;L;;;;;N;;;A738;;A738 +A73A;LATIN CAPITAL LETTER AV WITH HORIZONTAL BAR;Lu;0;L;;;;;N;;;;A73B; +A73B;LATIN SMALL LETTER AV WITH HORIZONTAL BAR;Ll;0;L;;;;;N;;;A73A;;A73A +A73C;LATIN CAPITAL LETTER AY;Lu;0;L;;;;;N;;;;A73D; +A73D;LATIN SMALL LETTER AY;Ll;0;L;;;;;N;;;A73C;;A73C +A73E;LATIN CAPITAL LETTER REVERSED C WITH DOT;Lu;0;L;;;;;N;;;;A73F; +A73F;LATIN SMALL LETTER REVERSED C WITH DOT;Ll;0;L;;;;;N;;;A73E;;A73E +A740;LATIN CAPITAL LETTER K WITH STROKE;Lu;0;L;;;;;N;;;;A741; +A741;LATIN SMALL LETTER K WITH STROKE;Ll;0;L;;;;;N;;;A740;;A740 +A742;LATIN CAPITAL LETTER K WITH DIAGONAL STROKE;Lu;0;L;;;;;N;;;;A743; +A743;LATIN SMALL LETTER K WITH DIAGONAL STROKE;Ll;0;L;;;;;N;;;A742;;A742 +A744;LATIN CAPITAL LETTER K WITH STROKE AND DIAGONAL STROKE;Lu;0;L;;;;;N;;;;A745; +A745;LATIN SMALL LETTER K WITH STROKE AND DIAGONAL STROKE;Ll;0;L;;;;;N;;;A744;;A744 +A746;LATIN CAPITAL LETTER BROKEN L;Lu;0;L;;;;;N;;;;A747; +A747;LATIN SMALL LETTER BROKEN L;Ll;0;L;;;;;N;;;A746;;A746 +A748;LATIN CAPITAL LETTER L WITH HIGH STROKE;Lu;0;L;;;;;N;;;;A749; +A749;LATIN SMALL LETTER L WITH HIGH STROKE;Ll;0;L;;;;;N;;;A748;;A748 +A74A;LATIN CAPITAL LETTER O WITH LONG STROKE OVERLAY;Lu;0;L;;;;;N;;;;A74B; +A74B;LATIN SMALL LETTER O WITH LONG STROKE OVERLAY;Ll;0;L;;;;;N;;;A74A;;A74A +A74C;LATIN CAPITAL LETTER O WITH LOOP;Lu;0;L;;;;;N;;;;A74D; +A74D;LATIN SMALL LETTER O WITH LOOP;Ll;0;L;;;;;N;;;A74C;;A74C +A74E;LATIN CAPITAL LETTER OO;Lu;0;L;;;;;N;;;;A74F; +A74F;LATIN SMALL LETTER OO;Ll;0;L;;;;;N;;;A74E;;A74E +A750;LATIN CAPITAL LETTER P WITH STROKE THROUGH DESCENDER;Lu;0;L;;;;;N;;;;A751; +A751;LATIN SMALL LETTER P WITH STROKE THROUGH DESCENDER;Ll;0;L;;;;;N;;;A750;;A750 +A752;LATIN CAPITAL LETTER P WITH FLOURISH;Lu;0;L;;;;;N;;;;A753; +A753;LATIN SMALL LETTER P WITH FLOURISH;Ll;0;L;;;;;N;;;A752;;A752 +A754;LATIN CAPITAL LETTER P WITH SQUIRREL TAIL;Lu;0;L;;;;;N;;;;A755; +A755;LATIN SMALL LETTER P WITH SQUIRREL TAIL;Ll;0;L;;;;;N;;;A754;;A754 +A756;LATIN CAPITAL LETTER Q WITH STROKE THROUGH DESCENDER;Lu;0;L;;;;;N;;;;A757; +A757;LATIN SMALL LETTER Q WITH STROKE THROUGH DESCENDER;Ll;0;L;;;;;N;;;A756;;A756 +A758;LATIN CAPITAL LETTER Q WITH DIAGONAL STROKE;Lu;0;L;;;;;N;;;;A759; +A759;LATIN SMALL LETTER Q WITH DIAGONAL STROKE;Ll;0;L;;;;;N;;;A758;;A758 +A75A;LATIN CAPITAL LETTER R ROTUNDA;Lu;0;L;;;;;N;;;;A75B; +A75B;LATIN SMALL LETTER R ROTUNDA;Ll;0;L;;;;;N;;;A75A;;A75A +A75C;LATIN CAPITAL LETTER RUM ROTUNDA;Lu;0;L;;;;;N;;;;A75D; +A75D;LATIN SMALL LETTER RUM ROTUNDA;Ll;0;L;;;;;N;;;A75C;;A75C +A75E;LATIN CAPITAL LETTER V WITH DIAGONAL STROKE;Lu;0;L;;;;;N;;;;A75F; +A75F;LATIN SMALL LETTER V WITH DIAGONAL STROKE;Ll;0;L;;;;;N;;;A75E;;A75E +A760;LATIN CAPITAL LETTER VY;Lu;0;L;;;;;N;;;;A761; +A761;LATIN SMALL LETTER VY;Ll;0;L;;;;;N;;;A760;;A760 +A762;LATIN CAPITAL LETTER VISIGOTHIC Z;Lu;0;L;;;;;N;;;;A763; +A763;LATIN SMALL LETTER VISIGOTHIC Z;Ll;0;L;;;;;N;;;A762;;A762 +A764;LATIN CAPITAL LETTER THORN WITH STROKE;Lu;0;L;;;;;N;;;;A765; +A765;LATIN SMALL LETTER THORN WITH STROKE;Ll;0;L;;;;;N;;;A764;;A764 +A766;LATIN CAPITAL LETTER THORN WITH STROKE THROUGH DESCENDER;Lu;0;L;;;;;N;;;;A767; +A767;LATIN SMALL LETTER THORN WITH STROKE THROUGH DESCENDER;Ll;0;L;;;;;N;;;A766;;A766 +A768;LATIN CAPITAL LETTER VEND;Lu;0;L;;;;;N;;;;A769; +A769;LATIN SMALL LETTER VEND;Ll;0;L;;;;;N;;;A768;;A768 +A76A;LATIN CAPITAL LETTER ET;Lu;0;L;;;;;N;;;;A76B; +A76B;LATIN SMALL LETTER ET;Ll;0;L;;;;;N;;;A76A;;A76A +A76C;LATIN CAPITAL LETTER IS;Lu;0;L;;;;;N;;;;A76D; +A76D;LATIN SMALL LETTER IS;Ll;0;L;;;;;N;;;A76C;;A76C +A76E;LATIN CAPITAL LETTER CON;Lu;0;L;;;;;N;;;;A76F; +A76F;LATIN SMALL LETTER CON;Ll;0;L;;;;;N;;;A76E;;A76E +A770;MODIFIER LETTER US;Lm;0;L; A76F;;;;N;;;;; +A771;LATIN SMALL LETTER DUM;Ll;0;L;;;;;N;;;;; +A772;LATIN SMALL LETTER LUM;Ll;0;L;;;;;N;;;;; +A773;LATIN SMALL LETTER MUM;Ll;0;L;;;;;N;;;;; +A774;LATIN SMALL LETTER NUM;Ll;0;L;;;;;N;;;;; +A775;LATIN SMALL LETTER RUM;Ll;0;L;;;;;N;;;;; +A776;LATIN LETTER SMALL CAPITAL RUM;Ll;0;L;;;;;N;;;;; +A777;LATIN SMALL LETTER TUM;Ll;0;L;;;;;N;;;;; +A778;LATIN SMALL LETTER UM;Ll;0;L;;;;;N;;;;; +A779;LATIN CAPITAL LETTER INSULAR D;Lu;0;L;;;;;N;;;;A77A; +A77A;LATIN SMALL LETTER INSULAR D;Ll;0;L;;;;;N;;;A779;;A779 +A77B;LATIN CAPITAL LETTER INSULAR F;Lu;0;L;;;;;N;;;;A77C; +A77C;LATIN SMALL LETTER INSULAR F;Ll;0;L;;;;;N;;;A77B;;A77B +A77D;LATIN CAPITAL LETTER INSULAR G;Lu;0;L;;;;;N;;;;1D79; +A77E;LATIN CAPITAL LETTER TURNED INSULAR G;Lu;0;L;;;;;N;;;;A77F; +A77F;LATIN SMALL LETTER TURNED INSULAR G;Ll;0;L;;;;;N;;;A77E;;A77E +A780;LATIN CAPITAL LETTER TURNED L;Lu;0;L;;;;;N;;;;A781; +A781;LATIN SMALL LETTER TURNED L;Ll;0;L;;;;;N;;;A780;;A780 +A782;LATIN CAPITAL LETTER INSULAR R;Lu;0;L;;;;;N;;;;A783; +A783;LATIN SMALL LETTER INSULAR R;Ll;0;L;;;;;N;;;A782;;A782 +A784;LATIN CAPITAL LETTER INSULAR S;Lu;0;L;;;;;N;;;;A785; +A785;LATIN SMALL LETTER INSULAR S;Ll;0;L;;;;;N;;;A784;;A784 +A786;LATIN CAPITAL LETTER INSULAR T;Lu;0;L;;;;;N;;;;A787; +A787;LATIN SMALL LETTER INSULAR T;Ll;0;L;;;;;N;;;A786;;A786 +A788;MODIFIER LETTER LOW CIRCUMFLEX ACCENT;Lm;0;ON;;;;;N;;;;; +A789;MODIFIER LETTER COLON;Sk;0;L;;;;;N;;;;; +A78A;MODIFIER LETTER SHORT EQUALS SIGN;Sk;0;L;;;;;N;;;;; +A78B;LATIN CAPITAL LETTER SALTILLO;Lu;0;L;;;;;N;;;;A78C; +A78C;LATIN SMALL LETTER SALTILLO;Ll;0;L;;;;;N;;;A78B;;A78B +A78D;LATIN CAPITAL LETTER TURNED H;Lu;0;L;;;;;N;;;;0265; +A78E;LATIN SMALL LETTER L WITH RETROFLEX HOOK AND BELT;Ll;0;L;;;;;N;;;;; +A78F;LATIN LETTER SINOLOGICAL DOT;Lo;0;L;;;;;N;;;;; +A790;LATIN CAPITAL LETTER N WITH DESCENDER;Lu;0;L;;;;;N;;;;A791; +A791;LATIN SMALL LETTER N WITH DESCENDER;Ll;0;L;;;;;N;;;A790;;A790 +A792;LATIN CAPITAL LETTER C WITH BAR;Lu;0;L;;;;;N;;;;A793; +A793;LATIN SMALL LETTER C WITH BAR;Ll;0;L;;;;;N;;;A792;;A792 +A794;LATIN SMALL LETTER C WITH PALATAL HOOK;Ll;0;L;;;;;N;;;A7C4;;A7C4 +A795;LATIN SMALL LETTER H WITH PALATAL HOOK;Ll;0;L;;;;;N;;;;; +A796;LATIN CAPITAL LETTER B WITH FLOURISH;Lu;0;L;;;;;N;;;;A797; +A797;LATIN SMALL LETTER B WITH FLOURISH;Ll;0;L;;;;;N;;;A796;;A796 +A798;LATIN CAPITAL LETTER F WITH STROKE;Lu;0;L;;;;;N;;;;A799; +A799;LATIN SMALL LETTER F WITH STROKE;Ll;0;L;;;;;N;;;A798;;A798 +A79A;LATIN CAPITAL LETTER VOLAPUK AE;Lu;0;L;;;;;N;;;;A79B; +A79B;LATIN SMALL LETTER VOLAPUK AE;Ll;0;L;;;;;N;;;A79A;;A79A +A79C;LATIN CAPITAL LETTER VOLAPUK OE;Lu;0;L;;;;;N;;;;A79D; +A79D;LATIN SMALL LETTER VOLAPUK OE;Ll;0;L;;;;;N;;;A79C;;A79C +A79E;LATIN CAPITAL LETTER VOLAPUK UE;Lu;0;L;;;;;N;;;;A79F; +A79F;LATIN SMALL LETTER VOLAPUK UE;Ll;0;L;;;;;N;;;A79E;;A79E +A7A0;LATIN CAPITAL LETTER G WITH OBLIQUE STROKE;Lu;0;L;;;;;N;;;;A7A1; +A7A1;LATIN SMALL LETTER G WITH OBLIQUE STROKE;Ll;0;L;;;;;N;;;A7A0;;A7A0 +A7A2;LATIN CAPITAL LETTER K WITH OBLIQUE STROKE;Lu;0;L;;;;;N;;;;A7A3; +A7A3;LATIN SMALL LETTER K WITH OBLIQUE STROKE;Ll;0;L;;;;;N;;;A7A2;;A7A2 +A7A4;LATIN CAPITAL LETTER N WITH OBLIQUE STROKE;Lu;0;L;;;;;N;;;;A7A5; +A7A5;LATIN SMALL LETTER N WITH OBLIQUE STROKE;Ll;0;L;;;;;N;;;A7A4;;A7A4 +A7A6;LATIN CAPITAL LETTER R WITH OBLIQUE STROKE;Lu;0;L;;;;;N;;;;A7A7; +A7A7;LATIN SMALL LETTER R WITH OBLIQUE STROKE;Ll;0;L;;;;;N;;;A7A6;;A7A6 +A7A8;LATIN CAPITAL LETTER S WITH OBLIQUE STROKE;Lu;0;L;;;;;N;;;;A7A9; +A7A9;LATIN SMALL LETTER S WITH OBLIQUE STROKE;Ll;0;L;;;;;N;;;A7A8;;A7A8 +A7AA;LATIN CAPITAL LETTER H WITH HOOK;Lu;0;L;;;;;N;;;;0266; +A7AB;LATIN CAPITAL LETTER REVERSED OPEN E;Lu;0;L;;;;;N;;;;025C; +A7AC;LATIN CAPITAL LETTER SCRIPT G;Lu;0;L;;;;;N;;;;0261; +A7AD;LATIN CAPITAL LETTER L WITH BELT;Lu;0;L;;;;;N;;;;026C; +A7AE;LATIN CAPITAL LETTER SMALL CAPITAL I;Lu;0;L;;;;;N;;;;026A; +A7AF;LATIN LETTER SMALL CAPITAL Q;Ll;0;L;;;;;N;;;;; +A7B0;LATIN CAPITAL LETTER TURNED K;Lu;0;L;;;;;N;;;;029E; +A7B1;LATIN CAPITAL LETTER TURNED T;Lu;0;L;;;;;N;;;;0287; +A7B2;LATIN CAPITAL LETTER J WITH CROSSED-TAIL;Lu;0;L;;;;;N;;;;029D; +A7B3;LATIN CAPITAL LETTER CHI;Lu;0;L;;;;;N;;;;AB53; +A7B4;LATIN CAPITAL LETTER BETA;Lu;0;L;;;;;N;;;;A7B5; +A7B5;LATIN SMALL LETTER BETA;Ll;0;L;;;;;N;;;A7B4;;A7B4 +A7B6;LATIN CAPITAL LETTER OMEGA;Lu;0;L;;;;;N;;;;A7B7; +A7B7;LATIN SMALL LETTER OMEGA;Ll;0;L;;;;;N;;;A7B6;;A7B6 +A7B8;LATIN CAPITAL LETTER U WITH STROKE;Lu;0;L;;;;;N;;;;A7B9; +A7B9;LATIN SMALL LETTER U WITH STROKE;Ll;0;L;;;;;N;;;A7B8;;A7B8 +A7BA;LATIN CAPITAL LETTER GLOTTAL A;Lu;0;L;;;;;N;;;;A7BB; +A7BB;LATIN SMALL LETTER GLOTTAL A;Ll;0;L;;;;;N;;;A7BA;;A7BA +A7BC;LATIN CAPITAL LETTER GLOTTAL I;Lu;0;L;;;;;N;;;;A7BD; +A7BD;LATIN SMALL LETTER GLOTTAL I;Ll;0;L;;;;;N;;;A7BC;;A7BC +A7BE;LATIN CAPITAL LETTER GLOTTAL U;Lu;0;L;;;;;N;;;;A7BF; +A7BF;LATIN SMALL LETTER GLOTTAL U;Ll;0;L;;;;;N;;;A7BE;;A7BE +A7C2;LATIN CAPITAL LETTER ANGLICANA W;Lu;0;L;;;;;N;;;;A7C3; +A7C3;LATIN SMALL LETTER ANGLICANA W;Ll;0;L;;;;;N;;;A7C2;;A7C2 +A7C4;LATIN CAPITAL LETTER C WITH PALATAL HOOK;Lu;0;L;;;;;N;;;;A794; +A7C5;LATIN CAPITAL LETTER S WITH HOOK;Lu;0;L;;;;;N;;;;0282; +A7C6;LATIN CAPITAL LETTER Z WITH PALATAL HOOK;Lu;0;L;;;;;N;;;;1D8E; +A7F7;LATIN EPIGRAPHIC LETTER SIDEWAYS I;Lo;0;L;;;;;N;;;;; +A7F8;MODIFIER LETTER CAPITAL H WITH STROKE;Lm;0;L; 0126;;;;N;;;;; +A7F9;MODIFIER LETTER SMALL LIGATURE OE;Lm;0;L; 0153;;;;N;;;;; +A7FA;LATIN LETTER SMALL CAPITAL TURNED M;Ll;0;L;;;;;N;;;;; +A7FB;LATIN EPIGRAPHIC LETTER REVERSED F;Lo;0;L;;;;;N;;;;; +A7FC;LATIN EPIGRAPHIC LETTER REVERSED P;Lo;0;L;;;;;N;;;;; +A7FD;LATIN EPIGRAPHIC LETTER INVERTED M;Lo;0;L;;;;;N;;;;; +A7FE;LATIN EPIGRAPHIC LETTER I LONGA;Lo;0;L;;;;;N;;;;; +A7FF;LATIN EPIGRAPHIC LETTER ARCHAIC M;Lo;0;L;;;;;N;;;;; +A800;SYLOTI NAGRI LETTER A;Lo;0;L;;;;;N;;;;; +A801;SYLOTI NAGRI LETTER I;Lo;0;L;;;;;N;;;;; +A802;SYLOTI NAGRI SIGN DVISVARA;Mn;0;NSM;;;;;N;;;;; +A803;SYLOTI NAGRI LETTER U;Lo;0;L;;;;;N;;;;; +A804;SYLOTI NAGRI LETTER E;Lo;0;L;;;;;N;;;;; +A805;SYLOTI NAGRI LETTER O;Lo;0;L;;;;;N;;;;; +A806;SYLOTI NAGRI SIGN HASANTA;Mn;9;NSM;;;;;N;;;;; +A807;SYLOTI NAGRI LETTER KO;Lo;0;L;;;;;N;;;;; +A808;SYLOTI NAGRI LETTER KHO;Lo;0;L;;;;;N;;;;; +A809;SYLOTI NAGRI LETTER GO;Lo;0;L;;;;;N;;;;; +A80A;SYLOTI NAGRI LETTER GHO;Lo;0;L;;;;;N;;;;; +A80B;SYLOTI NAGRI SIGN ANUSVARA;Mn;0;NSM;;;;;N;;;;; +A80C;SYLOTI NAGRI LETTER CO;Lo;0;L;;;;;N;;;;; +A80D;SYLOTI NAGRI LETTER CHO;Lo;0;L;;;;;N;;;;; +A80E;SYLOTI NAGRI LETTER JO;Lo;0;L;;;;;N;;;;; +A80F;SYLOTI NAGRI LETTER JHO;Lo;0;L;;;;;N;;;;; +A810;SYLOTI NAGRI LETTER TTO;Lo;0;L;;;;;N;;;;; +A811;SYLOTI NAGRI LETTER TTHO;Lo;0;L;;;;;N;;;;; +A812;SYLOTI NAGRI LETTER DDO;Lo;0;L;;;;;N;;;;; +A813;SYLOTI NAGRI LETTER DDHO;Lo;0;L;;;;;N;;;;; +A814;SYLOTI NAGRI LETTER TO;Lo;0;L;;;;;N;;;;; +A815;SYLOTI NAGRI LETTER THO;Lo;0;L;;;;;N;;;;; +A816;SYLOTI NAGRI LETTER DO;Lo;0;L;;;;;N;;;;; +A817;SYLOTI NAGRI LETTER DHO;Lo;0;L;;;;;N;;;;; +A818;SYLOTI NAGRI LETTER NO;Lo;0;L;;;;;N;;;;; +A819;SYLOTI NAGRI LETTER PO;Lo;0;L;;;;;N;;;;; +A81A;SYLOTI NAGRI LETTER PHO;Lo;0;L;;;;;N;;;;; +A81B;SYLOTI NAGRI LETTER BO;Lo;0;L;;;;;N;;;;; +A81C;SYLOTI NAGRI LETTER BHO;Lo;0;L;;;;;N;;;;; +A81D;SYLOTI NAGRI LETTER MO;Lo;0;L;;;;;N;;;;; +A81E;SYLOTI NAGRI LETTER RO;Lo;0;L;;;;;N;;;;; +A81F;SYLOTI NAGRI LETTER LO;Lo;0;L;;;;;N;;;;; +A820;SYLOTI NAGRI LETTER RRO;Lo;0;L;;;;;N;;;;; +A821;SYLOTI NAGRI LETTER SO;Lo;0;L;;;;;N;;;;; +A822;SYLOTI NAGRI LETTER HO;Lo;0;L;;;;;N;;;;; +A823;SYLOTI NAGRI VOWEL SIGN A;Mc;0;L;;;;;N;;;;; +A824;SYLOTI NAGRI VOWEL SIGN I;Mc;0;L;;;;;N;;;;; +A825;SYLOTI NAGRI VOWEL SIGN U;Mn;0;NSM;;;;;N;;;;; +A826;SYLOTI NAGRI VOWEL SIGN E;Mn;0;NSM;;;;;N;;;;; +A827;SYLOTI NAGRI VOWEL SIGN OO;Mc;0;L;;;;;N;;;;; +A828;SYLOTI NAGRI POETRY MARK-1;So;0;ON;;;;;N;;;;; +A829;SYLOTI NAGRI POETRY MARK-2;So;0;ON;;;;;N;;;;; +A82A;SYLOTI NAGRI POETRY MARK-3;So;0;ON;;;;;N;;;;; +A82B;SYLOTI NAGRI POETRY MARK-4;So;0;ON;;;;;N;;;;; +A830;NORTH INDIC FRACTION ONE QUARTER;No;0;L;;;;1/4;N;;;;; +A831;NORTH INDIC FRACTION ONE HALF;No;0;L;;;;1/2;N;;;;; +A832;NORTH INDIC FRACTION THREE QUARTERS;No;0;L;;;;3/4;N;;;;; +A833;NORTH INDIC FRACTION ONE SIXTEENTH;No;0;L;;;;1/16;N;;;;; +A834;NORTH INDIC FRACTION ONE EIGHTH;No;0;L;;;;1/8;N;;;;; +A835;NORTH INDIC FRACTION THREE SIXTEENTHS;No;0;L;;;;3/16;N;;;;; +A836;NORTH INDIC QUARTER MARK;So;0;L;;;;;N;;;;; +A837;NORTH INDIC PLACEHOLDER MARK;So;0;L;;;;;N;;;;; +A838;NORTH INDIC RUPEE MARK;Sc;0;ET;;;;;N;;;;; +A839;NORTH INDIC QUANTITY MARK;So;0;ET;;;;;N;;;;; +A840;PHAGS-PA LETTER KA;Lo;0;L;;;;;N;;;;; +A841;PHAGS-PA LETTER KHA;Lo;0;L;;;;;N;;;;; +A842;PHAGS-PA LETTER GA;Lo;0;L;;;;;N;;;;; +A843;PHAGS-PA LETTER NGA;Lo;0;L;;;;;N;;;;; +A844;PHAGS-PA LETTER CA;Lo;0;L;;;;;N;;;;; +A845;PHAGS-PA LETTER CHA;Lo;0;L;;;;;N;;;;; +A846;PHAGS-PA LETTER JA;Lo;0;L;;;;;N;;;;; +A847;PHAGS-PA LETTER NYA;Lo;0;L;;;;;N;;;;; +A848;PHAGS-PA LETTER TA;Lo;0;L;;;;;N;;;;; +A849;PHAGS-PA LETTER THA;Lo;0;L;;;;;N;;;;; +A84A;PHAGS-PA LETTER DA;Lo;0;L;;;;;N;;;;; +A84B;PHAGS-PA LETTER NA;Lo;0;L;;;;;N;;;;; +A84C;PHAGS-PA LETTER PA;Lo;0;L;;;;;N;;;;; +A84D;PHAGS-PA LETTER PHA;Lo;0;L;;;;;N;;;;; +A84E;PHAGS-PA LETTER BA;Lo;0;L;;;;;N;;;;; +A84F;PHAGS-PA LETTER MA;Lo;0;L;;;;;N;;;;; +A850;PHAGS-PA LETTER TSA;Lo;0;L;;;;;N;;;;; +A851;PHAGS-PA LETTER TSHA;Lo;0;L;;;;;N;;;;; +A852;PHAGS-PA LETTER DZA;Lo;0;L;;;;;N;;;;; +A853;PHAGS-PA LETTER WA;Lo;0;L;;;;;N;;;;; +A854;PHAGS-PA LETTER ZHA;Lo;0;L;;;;;N;;;;; +A855;PHAGS-PA LETTER ZA;Lo;0;L;;;;;N;;;;; +A856;PHAGS-PA LETTER SMALL A;Lo;0;L;;;;;N;;;;; +A857;PHAGS-PA LETTER YA;Lo;0;L;;;;;N;;;;; +A858;PHAGS-PA LETTER RA;Lo;0;L;;;;;N;;;;; +A859;PHAGS-PA LETTER LA;Lo;0;L;;;;;N;;;;; +A85A;PHAGS-PA LETTER SHA;Lo;0;L;;;;;N;;;;; +A85B;PHAGS-PA LETTER SA;Lo;0;L;;;;;N;;;;; +A85C;PHAGS-PA LETTER HA;Lo;0;L;;;;;N;;;;; +A85D;PHAGS-PA LETTER A;Lo;0;L;;;;;N;;;;; +A85E;PHAGS-PA LETTER I;Lo;0;L;;;;;N;;;;; +A85F;PHAGS-PA LETTER U;Lo;0;L;;;;;N;;;;; +A860;PHAGS-PA LETTER E;Lo;0;L;;;;;N;;;;; +A861;PHAGS-PA LETTER O;Lo;0;L;;;;;N;;;;; +A862;PHAGS-PA LETTER QA;Lo;0;L;;;;;N;;;;; +A863;PHAGS-PA LETTER XA;Lo;0;L;;;;;N;;;;; +A864;PHAGS-PA LETTER FA;Lo;0;L;;;;;N;;;;; +A865;PHAGS-PA LETTER GGA;Lo;0;L;;;;;N;;;;; +A866;PHAGS-PA LETTER EE;Lo;0;L;;;;;N;;;;; +A867;PHAGS-PA SUBJOINED LETTER WA;Lo;0;L;;;;;N;;;;; +A868;PHAGS-PA SUBJOINED LETTER YA;Lo;0;L;;;;;N;;;;; +A869;PHAGS-PA LETTER TTA;Lo;0;L;;;;;N;;;;; +A86A;PHAGS-PA LETTER TTHA;Lo;0;L;;;;;N;;;;; +A86B;PHAGS-PA LETTER DDA;Lo;0;L;;;;;N;;;;; +A86C;PHAGS-PA LETTER NNA;Lo;0;L;;;;;N;;;;; +A86D;PHAGS-PA LETTER ALTERNATE YA;Lo;0;L;;;;;N;;;;; +A86E;PHAGS-PA LETTER VOICELESS SHA;Lo;0;L;;;;;N;;;;; +A86F;PHAGS-PA LETTER VOICED HA;Lo;0;L;;;;;N;;;;; +A870;PHAGS-PA LETTER ASPIRATED FA;Lo;0;L;;;;;N;;;;; +A871;PHAGS-PA SUBJOINED LETTER RA;Lo;0;L;;;;;N;;;;; +A872;PHAGS-PA SUPERFIXED LETTER RA;Lo;0;L;;;;;N;;;;; +A873;PHAGS-PA LETTER CANDRABINDU;Lo;0;L;;;;;N;;;;; +A874;PHAGS-PA SINGLE HEAD MARK;Po;0;ON;;;;;N;;;;; +A875;PHAGS-PA DOUBLE HEAD MARK;Po;0;ON;;;;;N;;;;; +A876;PHAGS-PA MARK SHAD;Po;0;ON;;;;;N;;;;; +A877;PHAGS-PA MARK DOUBLE SHAD;Po;0;ON;;;;;N;;;;; +A880;SAURASHTRA SIGN ANUSVARA;Mc;0;L;;;;;N;;;;; +A881;SAURASHTRA SIGN VISARGA;Mc;0;L;;;;;N;;;;; +A882;SAURASHTRA LETTER A;Lo;0;L;;;;;N;;;;; +A883;SAURASHTRA LETTER AA;Lo;0;L;;;;;N;;;;; +A884;SAURASHTRA LETTER I;Lo;0;L;;;;;N;;;;; +A885;SAURASHTRA LETTER II;Lo;0;L;;;;;N;;;;; +A886;SAURASHTRA LETTER U;Lo;0;L;;;;;N;;;;; +A887;SAURASHTRA LETTER UU;Lo;0;L;;;;;N;;;;; +A888;SAURASHTRA LETTER VOCALIC R;Lo;0;L;;;;;N;;;;; +A889;SAURASHTRA LETTER VOCALIC RR;Lo;0;L;;;;;N;;;;; +A88A;SAURASHTRA LETTER VOCALIC L;Lo;0;L;;;;;N;;;;; +A88B;SAURASHTRA LETTER VOCALIC LL;Lo;0;L;;;;;N;;;;; +A88C;SAURASHTRA LETTER E;Lo;0;L;;;;;N;;;;; +A88D;SAURASHTRA LETTER EE;Lo;0;L;;;;;N;;;;; +A88E;SAURASHTRA LETTER AI;Lo;0;L;;;;;N;;;;; +A88F;SAURASHTRA LETTER O;Lo;0;L;;;;;N;;;;; +A890;SAURASHTRA LETTER OO;Lo;0;L;;;;;N;;;;; +A891;SAURASHTRA LETTER AU;Lo;0;L;;;;;N;;;;; +A892;SAURASHTRA LETTER KA;Lo;0;L;;;;;N;;;;; +A893;SAURASHTRA LETTER KHA;Lo;0;L;;;;;N;;;;; +A894;SAURASHTRA LETTER GA;Lo;0;L;;;;;N;;;;; +A895;SAURASHTRA LETTER GHA;Lo;0;L;;;;;N;;;;; +A896;SAURASHTRA LETTER NGA;Lo;0;L;;;;;N;;;;; +A897;SAURASHTRA LETTER CA;Lo;0;L;;;;;N;;;;; +A898;SAURASHTRA LETTER CHA;Lo;0;L;;;;;N;;;;; +A899;SAURASHTRA LETTER JA;Lo;0;L;;;;;N;;;;; +A89A;SAURASHTRA LETTER JHA;Lo;0;L;;;;;N;;;;; +A89B;SAURASHTRA LETTER NYA;Lo;0;L;;;;;N;;;;; +A89C;SAURASHTRA LETTER TTA;Lo;0;L;;;;;N;;;;; +A89D;SAURASHTRA LETTER TTHA;Lo;0;L;;;;;N;;;;; +A89E;SAURASHTRA LETTER DDA;Lo;0;L;;;;;N;;;;; +A89F;SAURASHTRA LETTER DDHA;Lo;0;L;;;;;N;;;;; +A8A0;SAURASHTRA LETTER NNA;Lo;0;L;;;;;N;;;;; +A8A1;SAURASHTRA LETTER TA;Lo;0;L;;;;;N;;;;; +A8A2;SAURASHTRA LETTER THA;Lo;0;L;;;;;N;;;;; +A8A3;SAURASHTRA LETTER DA;Lo;0;L;;;;;N;;;;; +A8A4;SAURASHTRA LETTER DHA;Lo;0;L;;;;;N;;;;; +A8A5;SAURASHTRA LETTER NA;Lo;0;L;;;;;N;;;;; +A8A6;SAURASHTRA LETTER PA;Lo;0;L;;;;;N;;;;; +A8A7;SAURASHTRA LETTER PHA;Lo;0;L;;;;;N;;;;; +A8A8;SAURASHTRA LETTER BA;Lo;0;L;;;;;N;;;;; +A8A9;SAURASHTRA LETTER BHA;Lo;0;L;;;;;N;;;;; +A8AA;SAURASHTRA LETTER MA;Lo;0;L;;;;;N;;;;; +A8AB;SAURASHTRA LETTER YA;Lo;0;L;;;;;N;;;;; +A8AC;SAURASHTRA LETTER RA;Lo;0;L;;;;;N;;;;; +A8AD;SAURASHTRA LETTER LA;Lo;0;L;;;;;N;;;;; +A8AE;SAURASHTRA LETTER VA;Lo;0;L;;;;;N;;;;; +A8AF;SAURASHTRA LETTER SHA;Lo;0;L;;;;;N;;;;; +A8B0;SAURASHTRA LETTER SSA;Lo;0;L;;;;;N;;;;; +A8B1;SAURASHTRA LETTER SA;Lo;0;L;;;;;N;;;;; +A8B2;SAURASHTRA LETTER HA;Lo;0;L;;;;;N;;;;; +A8B3;SAURASHTRA LETTER LLA;Lo;0;L;;;;;N;;;;; +A8B4;SAURASHTRA CONSONANT SIGN HAARU;Mc;0;L;;;;;N;;;;; +A8B5;SAURASHTRA VOWEL SIGN AA;Mc;0;L;;;;;N;;;;; +A8B6;SAURASHTRA VOWEL SIGN I;Mc;0;L;;;;;N;;;;; +A8B7;SAURASHTRA VOWEL SIGN II;Mc;0;L;;;;;N;;;;; +A8B8;SAURASHTRA VOWEL SIGN U;Mc;0;L;;;;;N;;;;; +A8B9;SAURASHTRA VOWEL SIGN UU;Mc;0;L;;;;;N;;;;; +A8BA;SAURASHTRA VOWEL SIGN VOCALIC R;Mc;0;L;;;;;N;;;;; +A8BB;SAURASHTRA VOWEL SIGN VOCALIC RR;Mc;0;L;;;;;N;;;;; +A8BC;SAURASHTRA VOWEL SIGN VOCALIC L;Mc;0;L;;;;;N;;;;; +A8BD;SAURASHTRA VOWEL SIGN VOCALIC LL;Mc;0;L;;;;;N;;;;; +A8BE;SAURASHTRA VOWEL SIGN E;Mc;0;L;;;;;N;;;;; +A8BF;SAURASHTRA VOWEL SIGN EE;Mc;0;L;;;;;N;;;;; +A8C0;SAURASHTRA VOWEL SIGN AI;Mc;0;L;;;;;N;;;;; +A8C1;SAURASHTRA VOWEL SIGN O;Mc;0;L;;;;;N;;;;; +A8C2;SAURASHTRA VOWEL SIGN OO;Mc;0;L;;;;;N;;;;; +A8C3;SAURASHTRA VOWEL SIGN AU;Mc;0;L;;;;;N;;;;; +A8C4;SAURASHTRA SIGN VIRAMA;Mn;9;NSM;;;;;N;;;;; +A8C5;SAURASHTRA SIGN CANDRABINDU;Mn;0;NSM;;;;;N;;;;; +A8CE;SAURASHTRA DANDA;Po;0;L;;;;;N;;;;; +A8CF;SAURASHTRA DOUBLE DANDA;Po;0;L;;;;;N;;;;; +A8D0;SAURASHTRA DIGIT ZERO;Nd;0;L;;0;0;0;N;;;;; +A8D1;SAURASHTRA DIGIT ONE;Nd;0;L;;1;1;1;N;;;;; +A8D2;SAURASHTRA DIGIT TWO;Nd;0;L;;2;2;2;N;;;;; +A8D3;SAURASHTRA DIGIT THREE;Nd;0;L;;3;3;3;N;;;;; +A8D4;SAURASHTRA DIGIT FOUR;Nd;0;L;;4;4;4;N;;;;; +A8D5;SAURASHTRA DIGIT FIVE;Nd;0;L;;5;5;5;N;;;;; +A8D6;SAURASHTRA DIGIT SIX;Nd;0;L;;6;6;6;N;;;;; +A8D7;SAURASHTRA DIGIT SEVEN;Nd;0;L;;7;7;7;N;;;;; +A8D8;SAURASHTRA DIGIT EIGHT;Nd;0;L;;8;8;8;N;;;;; +A8D9;SAURASHTRA DIGIT NINE;Nd;0;L;;9;9;9;N;;;;; +A8E0;COMBINING DEVANAGARI DIGIT ZERO;Mn;230;NSM;;;;;N;;;;; +A8E1;COMBINING DEVANAGARI DIGIT ONE;Mn;230;NSM;;;;;N;;;;; +A8E2;COMBINING DEVANAGARI DIGIT TWO;Mn;230;NSM;;;;;N;;;;; +A8E3;COMBINING DEVANAGARI DIGIT THREE;Mn;230;NSM;;;;;N;;;;; +A8E4;COMBINING DEVANAGARI DIGIT FOUR;Mn;230;NSM;;;;;N;;;;; +A8E5;COMBINING DEVANAGARI DIGIT FIVE;Mn;230;NSM;;;;;N;;;;; +A8E6;COMBINING DEVANAGARI DIGIT SIX;Mn;230;NSM;;;;;N;;;;; +A8E7;COMBINING DEVANAGARI DIGIT SEVEN;Mn;230;NSM;;;;;N;;;;; +A8E8;COMBINING DEVANAGARI DIGIT EIGHT;Mn;230;NSM;;;;;N;;;;; +A8E9;COMBINING DEVANAGARI DIGIT NINE;Mn;230;NSM;;;;;N;;;;; +A8EA;COMBINING DEVANAGARI LETTER A;Mn;230;NSM;;;;;N;;;;; +A8EB;COMBINING DEVANAGARI LETTER U;Mn;230;NSM;;;;;N;;;;; +A8EC;COMBINING DEVANAGARI LETTER KA;Mn;230;NSM;;;;;N;;;;; +A8ED;COMBINING DEVANAGARI LETTER NA;Mn;230;NSM;;;;;N;;;;; +A8EE;COMBINING DEVANAGARI LETTER PA;Mn;230;NSM;;;;;N;;;;; +A8EF;COMBINING DEVANAGARI LETTER RA;Mn;230;NSM;;;;;N;;;;; +A8F0;COMBINING DEVANAGARI LETTER VI;Mn;230;NSM;;;;;N;;;;; +A8F1;COMBINING DEVANAGARI SIGN AVAGRAHA;Mn;230;NSM;;;;;N;;;;; +A8F2;DEVANAGARI SIGN SPACING CANDRABINDU;Lo;0;L;;;;;N;;;;; +A8F3;DEVANAGARI SIGN CANDRABINDU VIRAMA;Lo;0;L;;;;;N;;;;; +A8F4;DEVANAGARI SIGN DOUBLE CANDRABINDU VIRAMA;Lo;0;L;;;;;N;;;;; +A8F5;DEVANAGARI SIGN CANDRABINDU TWO;Lo;0;L;;;;;N;;;;; +A8F6;DEVANAGARI SIGN CANDRABINDU THREE;Lo;0;L;;;;;N;;;;; +A8F7;DEVANAGARI SIGN CANDRABINDU AVAGRAHA;Lo;0;L;;;;;N;;;;; +A8F8;DEVANAGARI SIGN PUSHPIKA;Po;0;L;;;;;N;;;;; +A8F9;DEVANAGARI GAP FILLER;Po;0;L;;;;;N;;;;; +A8FA;DEVANAGARI CARET;Po;0;L;;;;;N;;;;; +A8FB;DEVANAGARI HEADSTROKE;Lo;0;L;;;;;N;;;;; +A8FC;DEVANAGARI SIGN SIDDHAM;Po;0;L;;;;;N;;;;; +A8FD;DEVANAGARI JAIN OM;Lo;0;L;;;;;N;;;;; +A8FE;DEVANAGARI LETTER AY;Lo;0;L;;;;;N;;;;; +A8FF;DEVANAGARI VOWEL SIGN AY;Mn;0;NSM;;;;;N;;;;; +A900;KAYAH LI DIGIT ZERO;Nd;0;L;;0;0;0;N;;;;; +A901;KAYAH LI DIGIT ONE;Nd;0;L;;1;1;1;N;;;;; +A902;KAYAH LI DIGIT TWO;Nd;0;L;;2;2;2;N;;;;; +A903;KAYAH LI DIGIT THREE;Nd;0;L;;3;3;3;N;;;;; +A904;KAYAH LI DIGIT FOUR;Nd;0;L;;4;4;4;N;;;;; +A905;KAYAH LI DIGIT FIVE;Nd;0;L;;5;5;5;N;;;;; +A906;KAYAH LI DIGIT SIX;Nd;0;L;;6;6;6;N;;;;; +A907;KAYAH LI DIGIT SEVEN;Nd;0;L;;7;7;7;N;;;;; +A908;KAYAH LI DIGIT EIGHT;Nd;0;L;;8;8;8;N;;;;; +A909;KAYAH LI DIGIT NINE;Nd;0;L;;9;9;9;N;;;;; +A90A;KAYAH LI LETTER KA;Lo;0;L;;;;;N;;;;; +A90B;KAYAH LI LETTER KHA;Lo;0;L;;;;;N;;;;; +A90C;KAYAH LI LETTER GA;Lo;0;L;;;;;N;;;;; +A90D;KAYAH LI LETTER NGA;Lo;0;L;;;;;N;;;;; +A90E;KAYAH LI LETTER SA;Lo;0;L;;;;;N;;;;; +A90F;KAYAH LI LETTER SHA;Lo;0;L;;;;;N;;;;; +A910;KAYAH LI LETTER ZA;Lo;0;L;;;;;N;;;;; +A911;KAYAH LI LETTER NYA;Lo;0;L;;;;;N;;;;; +A912;KAYAH LI LETTER TA;Lo;0;L;;;;;N;;;;; +A913;KAYAH LI LETTER HTA;Lo;0;L;;;;;N;;;;; +A914;KAYAH LI LETTER NA;Lo;0;L;;;;;N;;;;; +A915;KAYAH LI LETTER PA;Lo;0;L;;;;;N;;;;; +A916;KAYAH LI LETTER PHA;Lo;0;L;;;;;N;;;;; +A917;KAYAH LI LETTER MA;Lo;0;L;;;;;N;;;;; +A918;KAYAH LI LETTER DA;Lo;0;L;;;;;N;;;;; +A919;KAYAH LI LETTER BA;Lo;0;L;;;;;N;;;;; +A91A;KAYAH LI LETTER RA;Lo;0;L;;;;;N;;;;; +A91B;KAYAH LI LETTER YA;Lo;0;L;;;;;N;;;;; +A91C;KAYAH LI LETTER LA;Lo;0;L;;;;;N;;;;; +A91D;KAYAH LI LETTER WA;Lo;0;L;;;;;N;;;;; +A91E;KAYAH LI LETTER THA;Lo;0;L;;;;;N;;;;; +A91F;KAYAH LI LETTER HA;Lo;0;L;;;;;N;;;;; +A920;KAYAH LI LETTER VA;Lo;0;L;;;;;N;;;;; +A921;KAYAH LI LETTER CA;Lo;0;L;;;;;N;;;;; +A922;KAYAH LI LETTER A;Lo;0;L;;;;;N;;;;; +A923;KAYAH LI LETTER OE;Lo;0;L;;;;;N;;;;; +A924;KAYAH LI LETTER I;Lo;0;L;;;;;N;;;;; +A925;KAYAH LI LETTER OO;Lo;0;L;;;;;N;;;;; +A926;KAYAH LI VOWEL UE;Mn;0;NSM;;;;;N;;;;; +A927;KAYAH LI VOWEL E;Mn;0;NSM;;;;;N;;;;; +A928;KAYAH LI VOWEL U;Mn;0;NSM;;;;;N;;;;; +A929;KAYAH LI VOWEL EE;Mn;0;NSM;;;;;N;;;;; +A92A;KAYAH LI VOWEL O;Mn;0;NSM;;;;;N;;;;; +A92B;KAYAH LI TONE PLOPHU;Mn;220;NSM;;;;;N;;;;; +A92C;KAYAH LI TONE CALYA;Mn;220;NSM;;;;;N;;;;; +A92D;KAYAH LI TONE CALYA PLOPHU;Mn;220;NSM;;;;;N;;;;; +A92E;KAYAH LI SIGN CWI;Po;0;L;;;;;N;;;;; +A92F;KAYAH LI SIGN SHYA;Po;0;L;;;;;N;;;;; +A930;REJANG LETTER KA;Lo;0;L;;;;;N;;;;; +A931;REJANG LETTER GA;Lo;0;L;;;;;N;;;;; +A932;REJANG LETTER NGA;Lo;0;L;;;;;N;;;;; +A933;REJANG LETTER TA;Lo;0;L;;;;;N;;;;; +A934;REJANG LETTER DA;Lo;0;L;;;;;N;;;;; +A935;REJANG LETTER NA;Lo;0;L;;;;;N;;;;; +A936;REJANG LETTER PA;Lo;0;L;;;;;N;;;;; +A937;REJANG LETTER BA;Lo;0;L;;;;;N;;;;; +A938;REJANG LETTER MA;Lo;0;L;;;;;N;;;;; +A939;REJANG LETTER CA;Lo;0;L;;;;;N;;;;; +A93A;REJANG LETTER JA;Lo;0;L;;;;;N;;;;; +A93B;REJANG LETTER NYA;Lo;0;L;;;;;N;;;;; +A93C;REJANG LETTER SA;Lo;0;L;;;;;N;;;;; +A93D;REJANG LETTER RA;Lo;0;L;;;;;N;;;;; +A93E;REJANG LETTER LA;Lo;0;L;;;;;N;;;;; +A93F;REJANG LETTER YA;Lo;0;L;;;;;N;;;;; +A940;REJANG LETTER WA;Lo;0;L;;;;;N;;;;; +A941;REJANG LETTER HA;Lo;0;L;;;;;N;;;;; +A942;REJANG LETTER MBA;Lo;0;L;;;;;N;;;;; +A943;REJANG LETTER NGGA;Lo;0;L;;;;;N;;;;; +A944;REJANG LETTER NDA;Lo;0;L;;;;;N;;;;; +A945;REJANG LETTER NYJA;Lo;0;L;;;;;N;;;;; +A946;REJANG LETTER A;Lo;0;L;;;;;N;;;;; +A947;REJANG VOWEL SIGN I;Mn;0;NSM;;;;;N;;;;; +A948;REJANG VOWEL SIGN U;Mn;0;NSM;;;;;N;;;;; +A949;REJANG VOWEL SIGN E;Mn;0;NSM;;;;;N;;;;; +A94A;REJANG VOWEL SIGN AI;Mn;0;NSM;;;;;N;;;;; +A94B;REJANG VOWEL SIGN O;Mn;0;NSM;;;;;N;;;;; +A94C;REJANG VOWEL SIGN AU;Mn;0;NSM;;;;;N;;;;; +A94D;REJANG VOWEL SIGN EU;Mn;0;NSM;;;;;N;;;;; +A94E;REJANG VOWEL SIGN EA;Mn;0;NSM;;;;;N;;;;; +A94F;REJANG CONSONANT SIGN NG;Mn;0;NSM;;;;;N;;;;; +A950;REJANG CONSONANT SIGN N;Mn;0;NSM;;;;;N;;;;; +A951;REJANG CONSONANT SIGN R;Mn;0;NSM;;;;;N;;;;; +A952;REJANG CONSONANT SIGN H;Mc;0;L;;;;;N;;;;; +A953;REJANG VIRAMA;Mc;9;L;;;;;N;;;;; +A95F;REJANG SECTION MARK;Po;0;L;;;;;N;;;;; +A960;HANGUL CHOSEONG TIKEUT-MIEUM;Lo;0;L;;;;;N;;;;; +A961;HANGUL CHOSEONG TIKEUT-PIEUP;Lo;0;L;;;;;N;;;;; +A962;HANGUL CHOSEONG TIKEUT-SIOS;Lo;0;L;;;;;N;;;;; +A963;HANGUL CHOSEONG TIKEUT-CIEUC;Lo;0;L;;;;;N;;;;; +A964;HANGUL CHOSEONG RIEUL-KIYEOK;Lo;0;L;;;;;N;;;;; +A965;HANGUL CHOSEONG RIEUL-SSANGKIYEOK;Lo;0;L;;;;;N;;;;; +A966;HANGUL CHOSEONG RIEUL-TIKEUT;Lo;0;L;;;;;N;;;;; +A967;HANGUL CHOSEONG RIEUL-SSANGTIKEUT;Lo;0;L;;;;;N;;;;; +A968;HANGUL CHOSEONG RIEUL-MIEUM;Lo;0;L;;;;;N;;;;; +A969;HANGUL CHOSEONG RIEUL-PIEUP;Lo;0;L;;;;;N;;;;; +A96A;HANGUL CHOSEONG RIEUL-SSANGPIEUP;Lo;0;L;;;;;N;;;;; +A96B;HANGUL CHOSEONG RIEUL-KAPYEOUNPIEUP;Lo;0;L;;;;;N;;;;; +A96C;HANGUL CHOSEONG RIEUL-SIOS;Lo;0;L;;;;;N;;;;; +A96D;HANGUL CHOSEONG RIEUL-CIEUC;Lo;0;L;;;;;N;;;;; +A96E;HANGUL CHOSEONG RIEUL-KHIEUKH;Lo;0;L;;;;;N;;;;; +A96F;HANGUL CHOSEONG MIEUM-KIYEOK;Lo;0;L;;;;;N;;;;; +A970;HANGUL CHOSEONG MIEUM-TIKEUT;Lo;0;L;;;;;N;;;;; +A971;HANGUL CHOSEONG MIEUM-SIOS;Lo;0;L;;;;;N;;;;; +A972;HANGUL CHOSEONG PIEUP-SIOS-THIEUTH;Lo;0;L;;;;;N;;;;; +A973;HANGUL CHOSEONG PIEUP-KHIEUKH;Lo;0;L;;;;;N;;;;; +A974;HANGUL CHOSEONG PIEUP-HIEUH;Lo;0;L;;;;;N;;;;; +A975;HANGUL CHOSEONG SSANGSIOS-PIEUP;Lo;0;L;;;;;N;;;;; +A976;HANGUL CHOSEONG IEUNG-RIEUL;Lo;0;L;;;;;N;;;;; +A977;HANGUL CHOSEONG IEUNG-HIEUH;Lo;0;L;;;;;N;;;;; +A978;HANGUL CHOSEONG SSANGCIEUC-HIEUH;Lo;0;L;;;;;N;;;;; +A979;HANGUL CHOSEONG SSANGTHIEUTH;Lo;0;L;;;;;N;;;;; +A97A;HANGUL CHOSEONG PHIEUPH-HIEUH;Lo;0;L;;;;;N;;;;; +A97B;HANGUL CHOSEONG HIEUH-SIOS;Lo;0;L;;;;;N;;;;; +A97C;HANGUL CHOSEONG SSANGYEORINHIEUH;Lo;0;L;;;;;N;;;;; +A980;JAVANESE SIGN PANYANGGA;Mn;0;NSM;;;;;N;;;;; +A981;JAVANESE SIGN CECAK;Mn;0;NSM;;;;;N;;;;; +A982;JAVANESE SIGN LAYAR;Mn;0;NSM;;;;;N;;;;; +A983;JAVANESE SIGN WIGNYAN;Mc;0;L;;;;;N;;;;; +A984;JAVANESE LETTER A;Lo;0;L;;;;;N;;;;; +A985;JAVANESE LETTER I KAWI;Lo;0;L;;;;;N;;;;; +A986;JAVANESE LETTER I;Lo;0;L;;;;;N;;;;; +A987;JAVANESE LETTER II;Lo;0;L;;;;;N;;;;; +A988;JAVANESE LETTER U;Lo;0;L;;;;;N;;;;; +A989;JAVANESE LETTER PA CEREK;Lo;0;L;;;;;N;;;;; +A98A;JAVANESE LETTER NGA LELET;Lo;0;L;;;;;N;;;;; +A98B;JAVANESE LETTER NGA LELET RASWADI;Lo;0;L;;;;;N;;;;; +A98C;JAVANESE LETTER E;Lo;0;L;;;;;N;;;;; +A98D;JAVANESE LETTER AI;Lo;0;L;;;;;N;;;;; +A98E;JAVANESE LETTER O;Lo;0;L;;;;;N;;;;; +A98F;JAVANESE LETTER KA;Lo;0;L;;;;;N;;;;; +A990;JAVANESE LETTER KA SASAK;Lo;0;L;;;;;N;;;;; +A991;JAVANESE LETTER KA MURDA;Lo;0;L;;;;;N;;;;; +A992;JAVANESE LETTER GA;Lo;0;L;;;;;N;;;;; +A993;JAVANESE LETTER GA MURDA;Lo;0;L;;;;;N;;;;; +A994;JAVANESE LETTER NGA;Lo;0;L;;;;;N;;;;; +A995;JAVANESE LETTER CA;Lo;0;L;;;;;N;;;;; +A996;JAVANESE LETTER CA MURDA;Lo;0;L;;;;;N;;;;; +A997;JAVANESE LETTER JA;Lo;0;L;;;;;N;;;;; +A998;JAVANESE LETTER NYA MURDA;Lo;0;L;;;;;N;;;;; +A999;JAVANESE LETTER JA MAHAPRANA;Lo;0;L;;;;;N;;;;; +A99A;JAVANESE LETTER NYA;Lo;0;L;;;;;N;;;;; +A99B;JAVANESE LETTER TTA;Lo;0;L;;;;;N;;;;; +A99C;JAVANESE LETTER TTA MAHAPRANA;Lo;0;L;;;;;N;;;;; +A99D;JAVANESE LETTER DDA;Lo;0;L;;;;;N;;;;; +A99E;JAVANESE LETTER DDA MAHAPRANA;Lo;0;L;;;;;N;;;;; +A99F;JAVANESE LETTER NA MURDA;Lo;0;L;;;;;N;;;;; +A9A0;JAVANESE LETTER TA;Lo;0;L;;;;;N;;;;; +A9A1;JAVANESE LETTER TA MURDA;Lo;0;L;;;;;N;;;;; +A9A2;JAVANESE LETTER DA;Lo;0;L;;;;;N;;;;; +A9A3;JAVANESE LETTER DA MAHAPRANA;Lo;0;L;;;;;N;;;;; +A9A4;JAVANESE LETTER NA;Lo;0;L;;;;;N;;;;; +A9A5;JAVANESE LETTER PA;Lo;0;L;;;;;N;;;;; +A9A6;JAVANESE LETTER PA MURDA;Lo;0;L;;;;;N;;;;; +A9A7;JAVANESE LETTER BA;Lo;0;L;;;;;N;;;;; +A9A8;JAVANESE LETTER BA MURDA;Lo;0;L;;;;;N;;;;; +A9A9;JAVANESE LETTER MA;Lo;0;L;;;;;N;;;;; +A9AA;JAVANESE LETTER YA;Lo;0;L;;;;;N;;;;; +A9AB;JAVANESE LETTER RA;Lo;0;L;;;;;N;;;;; +A9AC;JAVANESE LETTER RA AGUNG;Lo;0;L;;;;;N;;;;; +A9AD;JAVANESE LETTER LA;Lo;0;L;;;;;N;;;;; +A9AE;JAVANESE LETTER WA;Lo;0;L;;;;;N;;;;; +A9AF;JAVANESE LETTER SA MURDA;Lo;0;L;;;;;N;;;;; +A9B0;JAVANESE LETTER SA MAHAPRANA;Lo;0;L;;;;;N;;;;; +A9B1;JAVANESE LETTER SA;Lo;0;L;;;;;N;;;;; +A9B2;JAVANESE LETTER HA;Lo;0;L;;;;;N;;;;; +A9B3;JAVANESE SIGN CECAK TELU;Mn;7;NSM;;;;;N;;;;; +A9B4;JAVANESE VOWEL SIGN TARUNG;Mc;0;L;;;;;N;;;;; +A9B5;JAVANESE VOWEL SIGN TOLONG;Mc;0;L;;;;;N;;;;; +A9B6;JAVANESE VOWEL SIGN WULU;Mn;0;NSM;;;;;N;;;;; +A9B7;JAVANESE VOWEL SIGN WULU MELIK;Mn;0;NSM;;;;;N;;;;; +A9B8;JAVANESE VOWEL SIGN SUKU;Mn;0;NSM;;;;;N;;;;; +A9B9;JAVANESE VOWEL SIGN SUKU MENDUT;Mn;0;NSM;;;;;N;;;;; +A9BA;JAVANESE VOWEL SIGN TALING;Mc;0;L;;;;;N;;;;; +A9BB;JAVANESE VOWEL SIGN DIRGA MURE;Mc;0;L;;;;;N;;;;; +A9BC;JAVANESE VOWEL SIGN PEPET;Mn;0;NSM;;;;;N;;;;; +A9BD;JAVANESE CONSONANT SIGN KERET;Mn;0;NSM;;;;;N;;;;; +A9BE;JAVANESE CONSONANT SIGN PENGKAL;Mc;0;L;;;;;N;;;;; +A9BF;JAVANESE CONSONANT SIGN CAKRA;Mc;0;L;;;;;N;;;;; +A9C0;JAVANESE PANGKON;Mc;9;L;;;;;N;;;;; +A9C1;JAVANESE LEFT RERENGGAN;Po;0;L;;;;;N;;;;; +A9C2;JAVANESE RIGHT RERENGGAN;Po;0;L;;;;;N;;;;; +A9C3;JAVANESE PADA ANDAP;Po;0;L;;;;;N;;;;; +A9C4;JAVANESE PADA MADYA;Po;0;L;;;;;N;;;;; +A9C5;JAVANESE PADA LUHUR;Po;0;L;;;;;N;;;;; +A9C6;JAVANESE PADA WINDU;Po;0;L;;;;;N;;;;; +A9C7;JAVANESE PADA PANGKAT;Po;0;L;;;;;N;;;;; +A9C8;JAVANESE PADA LINGSA;Po;0;L;;;;;N;;;;; +A9C9;JAVANESE PADA LUNGSI;Po;0;L;;;;;N;;;;; +A9CA;JAVANESE PADA ADEG;Po;0;L;;;;;N;;;;; +A9CB;JAVANESE PADA ADEG ADEG;Po;0;L;;;;;N;;;;; +A9CC;JAVANESE PADA PISELEH;Po;0;L;;;;;N;;;;; +A9CD;JAVANESE TURNED PADA PISELEH;Po;0;L;;;;;N;;;;; +A9CF;JAVANESE PANGRANGKEP;Lm;0;L;;;;;N;;;;; +A9D0;JAVANESE DIGIT ZERO;Nd;0;L;;0;0;0;N;;;;; +A9D1;JAVANESE DIGIT ONE;Nd;0;L;;1;1;1;N;;;;; +A9D2;JAVANESE DIGIT TWO;Nd;0;L;;2;2;2;N;;;;; +A9D3;JAVANESE DIGIT THREE;Nd;0;L;;3;3;3;N;;;;; +A9D4;JAVANESE DIGIT FOUR;Nd;0;L;;4;4;4;N;;;;; +A9D5;JAVANESE DIGIT FIVE;Nd;0;L;;5;5;5;N;;;;; +A9D6;JAVANESE DIGIT SIX;Nd;0;L;;6;6;6;N;;;;; +A9D7;JAVANESE DIGIT SEVEN;Nd;0;L;;7;7;7;N;;;;; +A9D8;JAVANESE DIGIT EIGHT;Nd;0;L;;8;8;8;N;;;;; +A9D9;JAVANESE DIGIT NINE;Nd;0;L;;9;9;9;N;;;;; +A9DE;JAVANESE PADA TIRTA TUMETES;Po;0;L;;;;;N;;;;; +A9DF;JAVANESE PADA ISEN-ISEN;Po;0;L;;;;;N;;;;; +A9E0;MYANMAR LETTER SHAN GHA;Lo;0;L;;;;;N;;;;; +A9E1;MYANMAR LETTER SHAN CHA;Lo;0;L;;;;;N;;;;; +A9E2;MYANMAR LETTER SHAN JHA;Lo;0;L;;;;;N;;;;; +A9E3;MYANMAR LETTER SHAN NNA;Lo;0;L;;;;;N;;;;; +A9E4;MYANMAR LETTER SHAN BHA;Lo;0;L;;;;;N;;;;; +A9E5;MYANMAR SIGN SHAN SAW;Mn;0;NSM;;;;;N;;;;; +A9E6;MYANMAR MODIFIER LETTER SHAN REDUPLICATION;Lm;0;L;;;;;N;;;;; +A9E7;MYANMAR LETTER TAI LAING NYA;Lo;0;L;;;;;N;;;;; +A9E8;MYANMAR LETTER TAI LAING FA;Lo;0;L;;;;;N;;;;; +A9E9;MYANMAR LETTER TAI LAING GA;Lo;0;L;;;;;N;;;;; +A9EA;MYANMAR LETTER TAI LAING GHA;Lo;0;L;;;;;N;;;;; +A9EB;MYANMAR LETTER TAI LAING JA;Lo;0;L;;;;;N;;;;; +A9EC;MYANMAR LETTER TAI LAING JHA;Lo;0;L;;;;;N;;;;; +A9ED;MYANMAR LETTER TAI LAING DDA;Lo;0;L;;;;;N;;;;; +A9EE;MYANMAR LETTER TAI LAING DDHA;Lo;0;L;;;;;N;;;;; +A9EF;MYANMAR LETTER TAI LAING NNA;Lo;0;L;;;;;N;;;;; +A9F0;MYANMAR TAI LAING DIGIT ZERO;Nd;0;L;;0;0;0;N;;;;; +A9F1;MYANMAR TAI LAING DIGIT ONE;Nd;0;L;;1;1;1;N;;;;; +A9F2;MYANMAR TAI LAING DIGIT TWO;Nd;0;L;;2;2;2;N;;;;; +A9F3;MYANMAR TAI LAING DIGIT THREE;Nd;0;L;;3;3;3;N;;;;; +A9F4;MYANMAR TAI LAING DIGIT FOUR;Nd;0;L;;4;4;4;N;;;;; +A9F5;MYANMAR TAI LAING DIGIT FIVE;Nd;0;L;;5;5;5;N;;;;; +A9F6;MYANMAR TAI LAING DIGIT SIX;Nd;0;L;;6;6;6;N;;;;; +A9F7;MYANMAR TAI LAING DIGIT SEVEN;Nd;0;L;;7;7;7;N;;;;; +A9F8;MYANMAR TAI LAING DIGIT EIGHT;Nd;0;L;;8;8;8;N;;;;; +A9F9;MYANMAR TAI LAING DIGIT NINE;Nd;0;L;;9;9;9;N;;;;; +A9FA;MYANMAR LETTER TAI LAING LLA;Lo;0;L;;;;;N;;;;; +A9FB;MYANMAR LETTER TAI LAING DA;Lo;0;L;;;;;N;;;;; +A9FC;MYANMAR LETTER TAI LAING DHA;Lo;0;L;;;;;N;;;;; +A9FD;MYANMAR LETTER TAI LAING BA;Lo;0;L;;;;;N;;;;; +A9FE;MYANMAR LETTER TAI LAING BHA;Lo;0;L;;;;;N;;;;; +AA00;CHAM LETTER A;Lo;0;L;;;;;N;;;;; +AA01;CHAM LETTER I;Lo;0;L;;;;;N;;;;; +AA02;CHAM LETTER U;Lo;0;L;;;;;N;;;;; +AA03;CHAM LETTER E;Lo;0;L;;;;;N;;;;; +AA04;CHAM LETTER AI;Lo;0;L;;;;;N;;;;; +AA05;CHAM LETTER O;Lo;0;L;;;;;N;;;;; +AA06;CHAM LETTER KA;Lo;0;L;;;;;N;;;;; +AA07;CHAM LETTER KHA;Lo;0;L;;;;;N;;;;; +AA08;CHAM LETTER GA;Lo;0;L;;;;;N;;;;; +AA09;CHAM LETTER GHA;Lo;0;L;;;;;N;;;;; +AA0A;CHAM LETTER NGUE;Lo;0;L;;;;;N;;;;; +AA0B;CHAM LETTER NGA;Lo;0;L;;;;;N;;;;; +AA0C;CHAM LETTER CHA;Lo;0;L;;;;;N;;;;; +AA0D;CHAM LETTER CHHA;Lo;0;L;;;;;N;;;;; +AA0E;CHAM LETTER JA;Lo;0;L;;;;;N;;;;; +AA0F;CHAM LETTER JHA;Lo;0;L;;;;;N;;;;; +AA10;CHAM LETTER NHUE;Lo;0;L;;;;;N;;;;; +AA11;CHAM LETTER NHA;Lo;0;L;;;;;N;;;;; +AA12;CHAM LETTER NHJA;Lo;0;L;;;;;N;;;;; +AA13;CHAM LETTER TA;Lo;0;L;;;;;N;;;;; +AA14;CHAM LETTER THA;Lo;0;L;;;;;N;;;;; +AA15;CHAM LETTER DA;Lo;0;L;;;;;N;;;;; +AA16;CHAM LETTER DHA;Lo;0;L;;;;;N;;;;; +AA17;CHAM LETTER NUE;Lo;0;L;;;;;N;;;;; +AA18;CHAM LETTER NA;Lo;0;L;;;;;N;;;;; +AA19;CHAM LETTER DDA;Lo;0;L;;;;;N;;;;; +AA1A;CHAM LETTER PA;Lo;0;L;;;;;N;;;;; +AA1B;CHAM LETTER PPA;Lo;0;L;;;;;N;;;;; +AA1C;CHAM LETTER PHA;Lo;0;L;;;;;N;;;;; +AA1D;CHAM LETTER BA;Lo;0;L;;;;;N;;;;; +AA1E;CHAM LETTER BHA;Lo;0;L;;;;;N;;;;; +AA1F;CHAM LETTER MUE;Lo;0;L;;;;;N;;;;; +AA20;CHAM LETTER MA;Lo;0;L;;;;;N;;;;; +AA21;CHAM LETTER BBA;Lo;0;L;;;;;N;;;;; +AA22;CHAM LETTER YA;Lo;0;L;;;;;N;;;;; +AA23;CHAM LETTER RA;Lo;0;L;;;;;N;;;;; +AA24;CHAM LETTER LA;Lo;0;L;;;;;N;;;;; +AA25;CHAM LETTER VA;Lo;0;L;;;;;N;;;;; +AA26;CHAM LETTER SSA;Lo;0;L;;;;;N;;;;; +AA27;CHAM LETTER SA;Lo;0;L;;;;;N;;;;; +AA28;CHAM LETTER HA;Lo;0;L;;;;;N;;;;; +AA29;CHAM VOWEL SIGN AA;Mn;0;NSM;;;;;N;;;;; +AA2A;CHAM VOWEL SIGN I;Mn;0;NSM;;;;;N;;;;; +AA2B;CHAM VOWEL SIGN II;Mn;0;NSM;;;;;N;;;;; +AA2C;CHAM VOWEL SIGN EI;Mn;0;NSM;;;;;N;;;;; +AA2D;CHAM VOWEL SIGN U;Mn;0;NSM;;;;;N;;;;; +AA2E;CHAM VOWEL SIGN OE;Mn;0;NSM;;;;;N;;;;; +AA2F;CHAM VOWEL SIGN O;Mc;0;L;;;;;N;;;;; +AA30;CHAM VOWEL SIGN AI;Mc;0;L;;;;;N;;;;; +AA31;CHAM VOWEL SIGN AU;Mn;0;NSM;;;;;N;;;;; +AA32;CHAM VOWEL SIGN UE;Mn;0;NSM;;;;;N;;;;; +AA33;CHAM CONSONANT SIGN YA;Mc;0;L;;;;;N;;;;; +AA34;CHAM CONSONANT SIGN RA;Mc;0;L;;;;;N;;;;; +AA35;CHAM CONSONANT SIGN LA;Mn;0;NSM;;;;;N;;;;; +AA36;CHAM CONSONANT SIGN WA;Mn;0;NSM;;;;;N;;;;; +AA40;CHAM LETTER FINAL K;Lo;0;L;;;;;N;;;;; +AA41;CHAM LETTER FINAL G;Lo;0;L;;;;;N;;;;; +AA42;CHAM LETTER FINAL NG;Lo;0;L;;;;;N;;;;; +AA43;CHAM CONSONANT SIGN FINAL NG;Mn;0;NSM;;;;;N;;;;; +AA44;CHAM LETTER FINAL CH;Lo;0;L;;;;;N;;;;; +AA45;CHAM LETTER FINAL T;Lo;0;L;;;;;N;;;;; +AA46;CHAM LETTER FINAL N;Lo;0;L;;;;;N;;;;; +AA47;CHAM LETTER FINAL P;Lo;0;L;;;;;N;;;;; +AA48;CHAM LETTER FINAL Y;Lo;0;L;;;;;N;;;;; +AA49;CHAM LETTER FINAL R;Lo;0;L;;;;;N;;;;; +AA4A;CHAM LETTER FINAL L;Lo;0;L;;;;;N;;;;; +AA4B;CHAM LETTER FINAL SS;Lo;0;L;;;;;N;;;;; +AA4C;CHAM CONSONANT SIGN FINAL M;Mn;0;NSM;;;;;N;;;;; +AA4D;CHAM CONSONANT SIGN FINAL H;Mc;0;L;;;;;N;;;;; +AA50;CHAM DIGIT ZERO;Nd;0;L;;0;0;0;N;;;;; +AA51;CHAM DIGIT ONE;Nd;0;L;;1;1;1;N;;;;; +AA52;CHAM DIGIT TWO;Nd;0;L;;2;2;2;N;;;;; +AA53;CHAM DIGIT THREE;Nd;0;L;;3;3;3;N;;;;; +AA54;CHAM DIGIT FOUR;Nd;0;L;;4;4;4;N;;;;; +AA55;CHAM DIGIT FIVE;Nd;0;L;;5;5;5;N;;;;; +AA56;CHAM DIGIT SIX;Nd;0;L;;6;6;6;N;;;;; +AA57;CHAM DIGIT SEVEN;Nd;0;L;;7;7;7;N;;;;; +AA58;CHAM DIGIT EIGHT;Nd;0;L;;8;8;8;N;;;;; +AA59;CHAM DIGIT NINE;Nd;0;L;;9;9;9;N;;;;; +AA5C;CHAM PUNCTUATION SPIRAL;Po;0;L;;;;;N;;;;; +AA5D;CHAM PUNCTUATION DANDA;Po;0;L;;;;;N;;;;; +AA5E;CHAM PUNCTUATION DOUBLE DANDA;Po;0;L;;;;;N;;;;; +AA5F;CHAM PUNCTUATION TRIPLE DANDA;Po;0;L;;;;;N;;;;; +AA60;MYANMAR LETTER KHAMTI GA;Lo;0;L;;;;;N;;;;; +AA61;MYANMAR LETTER KHAMTI CA;Lo;0;L;;;;;N;;;;; +AA62;MYANMAR LETTER KHAMTI CHA;Lo;0;L;;;;;N;;;;; +AA63;MYANMAR LETTER KHAMTI JA;Lo;0;L;;;;;N;;;;; +AA64;MYANMAR LETTER KHAMTI JHA;Lo;0;L;;;;;N;;;;; +AA65;MYANMAR LETTER KHAMTI NYA;Lo;0;L;;;;;N;;;;; +AA66;MYANMAR LETTER KHAMTI TTA;Lo;0;L;;;;;N;;;;; +AA67;MYANMAR LETTER KHAMTI TTHA;Lo;0;L;;;;;N;;;;; +AA68;MYANMAR LETTER KHAMTI DDA;Lo;0;L;;;;;N;;;;; +AA69;MYANMAR LETTER KHAMTI DDHA;Lo;0;L;;;;;N;;;;; +AA6A;MYANMAR LETTER KHAMTI DHA;Lo;0;L;;;;;N;;;;; +AA6B;MYANMAR LETTER KHAMTI NA;Lo;0;L;;;;;N;;;;; +AA6C;MYANMAR LETTER KHAMTI SA;Lo;0;L;;;;;N;;;;; +AA6D;MYANMAR LETTER KHAMTI HA;Lo;0;L;;;;;N;;;;; +AA6E;MYANMAR LETTER KHAMTI HHA;Lo;0;L;;;;;N;;;;; +AA6F;MYANMAR LETTER KHAMTI FA;Lo;0;L;;;;;N;;;;; +AA70;MYANMAR MODIFIER LETTER KHAMTI REDUPLICATION;Lm;0;L;;;;;N;;;;; +AA71;MYANMAR LETTER KHAMTI XA;Lo;0;L;;;;;N;;;;; +AA72;MYANMAR LETTER KHAMTI ZA;Lo;0;L;;;;;N;;;;; +AA73;MYANMAR LETTER KHAMTI RA;Lo;0;L;;;;;N;;;;; +AA74;MYANMAR LOGOGRAM KHAMTI OAY;Lo;0;L;;;;;N;;;;; +AA75;MYANMAR LOGOGRAM KHAMTI QN;Lo;0;L;;;;;N;;;;; +AA76;MYANMAR LOGOGRAM KHAMTI HM;Lo;0;L;;;;;N;;;;; +AA77;MYANMAR SYMBOL AITON EXCLAMATION;So;0;L;;;;;N;;;;; +AA78;MYANMAR SYMBOL AITON ONE;So;0;L;;;;;N;;;;; +AA79;MYANMAR SYMBOL AITON TWO;So;0;L;;;;;N;;;;; +AA7A;MYANMAR LETTER AITON RA;Lo;0;L;;;;;N;;;;; +AA7B;MYANMAR SIGN PAO KAREN TONE;Mc;0;L;;;;;N;;;;; +AA7C;MYANMAR SIGN TAI LAING TONE-2;Mn;0;NSM;;;;;N;;;;; +AA7D;MYANMAR SIGN TAI LAING TONE-5;Mc;0;L;;;;;N;;;;; +AA7E;MYANMAR LETTER SHWE PALAUNG CHA;Lo;0;L;;;;;N;;;;; +AA7F;MYANMAR LETTER SHWE PALAUNG SHA;Lo;0;L;;;;;N;;;;; +AA80;TAI VIET LETTER LOW KO;Lo;0;L;;;;;N;;;;; +AA81;TAI VIET LETTER HIGH KO;Lo;0;L;;;;;N;;;;; +AA82;TAI VIET LETTER LOW KHO;Lo;0;L;;;;;N;;;;; +AA83;TAI VIET LETTER HIGH KHO;Lo;0;L;;;;;N;;;;; +AA84;TAI VIET LETTER LOW KHHO;Lo;0;L;;;;;N;;;;; +AA85;TAI VIET LETTER HIGH KHHO;Lo;0;L;;;;;N;;;;; +AA86;TAI VIET LETTER LOW GO;Lo;0;L;;;;;N;;;;; +AA87;TAI VIET LETTER HIGH GO;Lo;0;L;;;;;N;;;;; +AA88;TAI VIET LETTER LOW NGO;Lo;0;L;;;;;N;;;;; +AA89;TAI VIET LETTER HIGH NGO;Lo;0;L;;;;;N;;;;; +AA8A;TAI VIET LETTER LOW CO;Lo;0;L;;;;;N;;;;; +AA8B;TAI VIET LETTER HIGH CO;Lo;0;L;;;;;N;;;;; +AA8C;TAI VIET LETTER LOW CHO;Lo;0;L;;;;;N;;;;; +AA8D;TAI VIET LETTER HIGH CHO;Lo;0;L;;;;;N;;;;; +AA8E;TAI VIET LETTER LOW SO;Lo;0;L;;;;;N;;;;; +AA8F;TAI VIET LETTER HIGH SO;Lo;0;L;;;;;N;;;;; +AA90;TAI VIET LETTER LOW NYO;Lo;0;L;;;;;N;;;;; +AA91;TAI VIET LETTER HIGH NYO;Lo;0;L;;;;;N;;;;; +AA92;TAI VIET LETTER LOW DO;Lo;0;L;;;;;N;;;;; +AA93;TAI VIET LETTER HIGH DO;Lo;0;L;;;;;N;;;;; +AA94;TAI VIET LETTER LOW TO;Lo;0;L;;;;;N;;;;; +AA95;TAI VIET LETTER HIGH TO;Lo;0;L;;;;;N;;;;; +AA96;TAI VIET LETTER LOW THO;Lo;0;L;;;;;N;;;;; +AA97;TAI VIET LETTER HIGH THO;Lo;0;L;;;;;N;;;;; +AA98;TAI VIET LETTER LOW NO;Lo;0;L;;;;;N;;;;; +AA99;TAI VIET LETTER HIGH NO;Lo;0;L;;;;;N;;;;; +AA9A;TAI VIET LETTER LOW BO;Lo;0;L;;;;;N;;;;; +AA9B;TAI VIET LETTER HIGH BO;Lo;0;L;;;;;N;;;;; +AA9C;TAI VIET LETTER LOW PO;Lo;0;L;;;;;N;;;;; +AA9D;TAI VIET LETTER HIGH PO;Lo;0;L;;;;;N;;;;; +AA9E;TAI VIET LETTER LOW PHO;Lo;0;L;;;;;N;;;;; +AA9F;TAI VIET LETTER HIGH PHO;Lo;0;L;;;;;N;;;;; +AAA0;TAI VIET LETTER LOW FO;Lo;0;L;;;;;N;;;;; +AAA1;TAI VIET LETTER HIGH FO;Lo;0;L;;;;;N;;;;; +AAA2;TAI VIET LETTER LOW MO;Lo;0;L;;;;;N;;;;; +AAA3;TAI VIET LETTER HIGH MO;Lo;0;L;;;;;N;;;;; +AAA4;TAI VIET LETTER LOW YO;Lo;0;L;;;;;N;;;;; +AAA5;TAI VIET LETTER HIGH YO;Lo;0;L;;;;;N;;;;; +AAA6;TAI VIET LETTER LOW RO;Lo;0;L;;;;;N;;;;; +AAA7;TAI VIET LETTER HIGH RO;Lo;0;L;;;;;N;;;;; +AAA8;TAI VIET LETTER LOW LO;Lo;0;L;;;;;N;;;;; +AAA9;TAI VIET LETTER HIGH LO;Lo;0;L;;;;;N;;;;; +AAAA;TAI VIET LETTER LOW VO;Lo;0;L;;;;;N;;;;; +AAAB;TAI VIET LETTER HIGH VO;Lo;0;L;;;;;N;;;;; +AAAC;TAI VIET LETTER LOW HO;Lo;0;L;;;;;N;;;;; +AAAD;TAI VIET LETTER HIGH HO;Lo;0;L;;;;;N;;;;; +AAAE;TAI VIET LETTER LOW O;Lo;0;L;;;;;N;;;;; +AAAF;TAI VIET LETTER HIGH O;Lo;0;L;;;;;N;;;;; +AAB0;TAI VIET MAI KANG;Mn;230;NSM;;;;;N;;;;; +AAB1;TAI VIET VOWEL AA;Lo;0;L;;;;;N;;;;; +AAB2;TAI VIET VOWEL I;Mn;230;NSM;;;;;N;;;;; +AAB3;TAI VIET VOWEL UE;Mn;230;NSM;;;;;N;;;;; +AAB4;TAI VIET VOWEL U;Mn;220;NSM;;;;;N;;;;; +AAB5;TAI VIET VOWEL E;Lo;0;L;;;;;N;;;;; +AAB6;TAI VIET VOWEL O;Lo;0;L;;;;;N;;;;; +AAB7;TAI VIET MAI KHIT;Mn;230;NSM;;;;;N;;;;; +AAB8;TAI VIET VOWEL IA;Mn;230;NSM;;;;;N;;;;; +AAB9;TAI VIET VOWEL UEA;Lo;0;L;;;;;N;;;;; +AABA;TAI VIET VOWEL UA;Lo;0;L;;;;;N;;;;; +AABB;TAI VIET VOWEL AUE;Lo;0;L;;;;;N;;;;; +AABC;TAI VIET VOWEL AY;Lo;0;L;;;;;N;;;;; +AABD;TAI VIET VOWEL AN;Lo;0;L;;;;;N;;;;; +AABE;TAI VIET VOWEL AM;Mn;230;NSM;;;;;N;;;;; +AABF;TAI VIET TONE MAI EK;Mn;230;NSM;;;;;N;;;;; +AAC0;TAI VIET TONE MAI NUENG;Lo;0;L;;;;;N;;;;; +AAC1;TAI VIET TONE MAI THO;Mn;230;NSM;;;;;N;;;;; +AAC2;TAI VIET TONE MAI SONG;Lo;0;L;;;;;N;;;;; +AADB;TAI VIET SYMBOL KON;Lo;0;L;;;;;N;;;;; +AADC;TAI VIET SYMBOL NUENG;Lo;0;L;;;;;N;;;;; +AADD;TAI VIET SYMBOL SAM;Lm;0;L;;;;;N;;;;; +AADE;TAI VIET SYMBOL HO HOI;Po;0;L;;;;;N;;;;; +AADF;TAI VIET SYMBOL KOI KOI;Po;0;L;;;;;N;;;;; +AAE0;MEETEI MAYEK LETTER E;Lo;0;L;;;;;N;;;;; +AAE1;MEETEI MAYEK LETTER O;Lo;0;L;;;;;N;;;;; +AAE2;MEETEI MAYEK LETTER CHA;Lo;0;L;;;;;N;;;;; +AAE3;MEETEI MAYEK LETTER NYA;Lo;0;L;;;;;N;;;;; +AAE4;MEETEI MAYEK LETTER TTA;Lo;0;L;;;;;N;;;;; +AAE5;MEETEI MAYEK LETTER TTHA;Lo;0;L;;;;;N;;;;; +AAE6;MEETEI MAYEK LETTER DDA;Lo;0;L;;;;;N;;;;; +AAE7;MEETEI MAYEK LETTER DDHA;Lo;0;L;;;;;N;;;;; +AAE8;MEETEI MAYEK LETTER NNA;Lo;0;L;;;;;N;;;;; +AAE9;MEETEI MAYEK LETTER SHA;Lo;0;L;;;;;N;;;;; +AAEA;MEETEI MAYEK LETTER SSA;Lo;0;L;;;;;N;;;;; +AAEB;MEETEI MAYEK VOWEL SIGN II;Mc;0;L;;;;;N;;;;; +AAEC;MEETEI MAYEK VOWEL SIGN UU;Mn;0;NSM;;;;;N;;;;; +AAED;MEETEI MAYEK VOWEL SIGN AAI;Mn;0;NSM;;;;;N;;;;; +AAEE;MEETEI MAYEK VOWEL SIGN AU;Mc;0;L;;;;;N;;;;; +AAEF;MEETEI MAYEK VOWEL SIGN AAU;Mc;0;L;;;;;N;;;;; +AAF0;MEETEI MAYEK CHEIKHAN;Po;0;L;;;;;N;;;;; +AAF1;MEETEI MAYEK AHANG KHUDAM;Po;0;L;;;;;N;;;;; +AAF2;MEETEI MAYEK ANJI;Lo;0;L;;;;;N;;;;; +AAF3;MEETEI MAYEK SYLLABLE REPETITION MARK;Lm;0;L;;;;;N;;;;; +AAF4;MEETEI MAYEK WORD REPETITION MARK;Lm;0;L;;;;;N;;;;; +AAF5;MEETEI MAYEK VOWEL SIGN VISARGA;Mc;0;L;;;;;N;;;;; +AAF6;MEETEI MAYEK VIRAMA;Mn;9;NSM;;;;;N;;;;; +AB01;ETHIOPIC SYLLABLE TTHU;Lo;0;L;;;;;N;;;;; +AB02;ETHIOPIC SYLLABLE TTHI;Lo;0;L;;;;;N;;;;; +AB03;ETHIOPIC SYLLABLE TTHAA;Lo;0;L;;;;;N;;;;; +AB04;ETHIOPIC SYLLABLE TTHEE;Lo;0;L;;;;;N;;;;; +AB05;ETHIOPIC SYLLABLE TTHE;Lo;0;L;;;;;N;;;;; +AB06;ETHIOPIC SYLLABLE TTHO;Lo;0;L;;;;;N;;;;; +AB09;ETHIOPIC SYLLABLE DDHU;Lo;0;L;;;;;N;;;;; +AB0A;ETHIOPIC SYLLABLE DDHI;Lo;0;L;;;;;N;;;;; +AB0B;ETHIOPIC SYLLABLE DDHAA;Lo;0;L;;;;;N;;;;; +AB0C;ETHIOPIC SYLLABLE DDHEE;Lo;0;L;;;;;N;;;;; +AB0D;ETHIOPIC SYLLABLE DDHE;Lo;0;L;;;;;N;;;;; +AB0E;ETHIOPIC SYLLABLE DDHO;Lo;0;L;;;;;N;;;;; +AB11;ETHIOPIC SYLLABLE DZU;Lo;0;L;;;;;N;;;;; +AB12;ETHIOPIC SYLLABLE DZI;Lo;0;L;;;;;N;;;;; +AB13;ETHIOPIC SYLLABLE DZAA;Lo;0;L;;;;;N;;;;; +AB14;ETHIOPIC SYLLABLE DZEE;Lo;0;L;;;;;N;;;;; +AB15;ETHIOPIC SYLLABLE DZE;Lo;0;L;;;;;N;;;;; +AB16;ETHIOPIC SYLLABLE DZO;Lo;0;L;;;;;N;;;;; +AB20;ETHIOPIC SYLLABLE CCHHA;Lo;0;L;;;;;N;;;;; +AB21;ETHIOPIC SYLLABLE CCHHU;Lo;0;L;;;;;N;;;;; +AB22;ETHIOPIC SYLLABLE CCHHI;Lo;0;L;;;;;N;;;;; +AB23;ETHIOPIC SYLLABLE CCHHAA;Lo;0;L;;;;;N;;;;; +AB24;ETHIOPIC SYLLABLE CCHHEE;Lo;0;L;;;;;N;;;;; +AB25;ETHIOPIC SYLLABLE CCHHE;Lo;0;L;;;;;N;;;;; +AB26;ETHIOPIC SYLLABLE CCHHO;Lo;0;L;;;;;N;;;;; +AB28;ETHIOPIC SYLLABLE BBA;Lo;0;L;;;;;N;;;;; +AB29;ETHIOPIC SYLLABLE BBU;Lo;0;L;;;;;N;;;;; +AB2A;ETHIOPIC SYLLABLE BBI;Lo;0;L;;;;;N;;;;; +AB2B;ETHIOPIC SYLLABLE BBAA;Lo;0;L;;;;;N;;;;; +AB2C;ETHIOPIC SYLLABLE BBEE;Lo;0;L;;;;;N;;;;; +AB2D;ETHIOPIC SYLLABLE BBE;Lo;0;L;;;;;N;;;;; +AB2E;ETHIOPIC SYLLABLE BBO;Lo;0;L;;;;;N;;;;; +AB30;LATIN SMALL LETTER BARRED ALPHA;Ll;0;L;;;;;N;;;;; +AB31;LATIN SMALL LETTER A REVERSED-SCHWA;Ll;0;L;;;;;N;;;;; +AB32;LATIN SMALL LETTER BLACKLETTER E;Ll;0;L;;;;;N;;;;; +AB33;LATIN SMALL LETTER BARRED E;Ll;0;L;;;;;N;;;;; +AB34;LATIN SMALL LETTER E WITH FLOURISH;Ll;0;L;;;;;N;;;;; +AB35;LATIN SMALL LETTER LENIS F;Ll;0;L;;;;;N;;;;; +AB36;LATIN SMALL LETTER SCRIPT G WITH CROSSED-TAIL;Ll;0;L;;;;;N;;;;; +AB37;LATIN SMALL LETTER L WITH INVERTED LAZY S;Ll;0;L;;;;;N;;;;; +AB38;LATIN SMALL LETTER L WITH DOUBLE MIDDLE TILDE;Ll;0;L;;;;;N;;;;; +AB39;LATIN SMALL LETTER L WITH MIDDLE RING;Ll;0;L;;;;;N;;;;; +AB3A;LATIN SMALL LETTER M WITH CROSSED-TAIL;Ll;0;L;;;;;N;;;;; +AB3B;LATIN SMALL LETTER N WITH CROSSED-TAIL;Ll;0;L;;;;;N;;;;; +AB3C;LATIN SMALL LETTER ENG WITH CROSSED-TAIL;Ll;0;L;;;;;N;;;;; +AB3D;LATIN SMALL LETTER BLACKLETTER O;Ll;0;L;;;;;N;;;;; +AB3E;LATIN SMALL LETTER BLACKLETTER O WITH STROKE;Ll;0;L;;;;;N;;;;; +AB3F;LATIN SMALL LETTER OPEN O WITH STROKE;Ll;0;L;;;;;N;;;;; +AB40;LATIN SMALL LETTER INVERTED OE;Ll;0;L;;;;;N;;;;; +AB41;LATIN SMALL LETTER TURNED OE WITH STROKE;Ll;0;L;;;;;N;;;;; +AB42;LATIN SMALL LETTER TURNED OE WITH HORIZONTAL STROKE;Ll;0;L;;;;;N;;;;; +AB43;LATIN SMALL LETTER TURNED O OPEN-O;Ll;0;L;;;;;N;;;;; +AB44;LATIN SMALL LETTER TURNED O OPEN-O WITH STROKE;Ll;0;L;;;;;N;;;;; +AB45;LATIN SMALL LETTER STIRRUP R;Ll;0;L;;;;;N;;;;; +AB46;LATIN LETTER SMALL CAPITAL R WITH RIGHT LEG;Ll;0;L;;;;;N;;;;; +AB47;LATIN SMALL LETTER R WITHOUT HANDLE;Ll;0;L;;;;;N;;;;; +AB48;LATIN SMALL LETTER DOUBLE R;Ll;0;L;;;;;N;;;;; +AB49;LATIN SMALL LETTER R WITH CROSSED-TAIL;Ll;0;L;;;;;N;;;;; +AB4A;LATIN SMALL LETTER DOUBLE R WITH CROSSED-TAIL;Ll;0;L;;;;;N;;;;; +AB4B;LATIN SMALL LETTER SCRIPT R;Ll;0;L;;;;;N;;;;; +AB4C;LATIN SMALL LETTER SCRIPT R WITH RING;Ll;0;L;;;;;N;;;;; +AB4D;LATIN SMALL LETTER BASELINE ESH;Ll;0;L;;;;;N;;;;; +AB4E;LATIN SMALL LETTER U WITH SHORT RIGHT LEG;Ll;0;L;;;;;N;;;;; +AB4F;LATIN SMALL LETTER U BAR WITH SHORT RIGHT LEG;Ll;0;L;;;;;N;;;;; +AB50;LATIN SMALL LETTER UI;Ll;0;L;;;;;N;;;;; +AB51;LATIN SMALL LETTER TURNED UI;Ll;0;L;;;;;N;;;;; +AB52;LATIN SMALL LETTER U WITH LEFT HOOK;Ll;0;L;;;;;N;;;;; +AB53;LATIN SMALL LETTER CHI;Ll;0;L;;;;;N;;;A7B3;;A7B3 +AB54;LATIN SMALL LETTER CHI WITH LOW RIGHT RING;Ll;0;L;;;;;N;;;;; +AB55;LATIN SMALL LETTER CHI WITH LOW LEFT SERIF;Ll;0;L;;;;;N;;;;; +AB56;LATIN SMALL LETTER X WITH LOW RIGHT RING;Ll;0;L;;;;;N;;;;; +AB57;LATIN SMALL LETTER X WITH LONG LEFT LEG;Ll;0;L;;;;;N;;;;; +AB58;LATIN SMALL LETTER X WITH LONG LEFT LEG AND LOW RIGHT RING;Ll;0;L;;;;;N;;;;; +AB59;LATIN SMALL LETTER X WITH LONG LEFT LEG WITH SERIF;Ll;0;L;;;;;N;;;;; +AB5A;LATIN SMALL LETTER Y WITH SHORT RIGHT LEG;Ll;0;L;;;;;N;;;;; +AB5B;MODIFIER BREVE WITH INVERTED BREVE;Sk;0;L;;;;;N;;;;; +AB5C;MODIFIER LETTER SMALL HENG;Lm;0;L; A727;;;;N;;;;; +AB5D;MODIFIER LETTER SMALL L WITH INVERTED LAZY S;Lm;0;L; AB37;;;;N;;;;; +AB5E;MODIFIER LETTER SMALL L WITH MIDDLE TILDE;Lm;0;L; 026B;;;;N;;;;; +AB5F;MODIFIER LETTER SMALL U WITH LEFT HOOK;Lm;0;L; AB52;;;;N;;;;; +AB60;LATIN SMALL LETTER SAKHA YAT;Ll;0;L;;;;;N;;;;; +AB61;LATIN SMALL LETTER IOTIFIED E;Ll;0;L;;;;;N;;;;; +AB62;LATIN SMALL LETTER OPEN OE;Ll;0;L;;;;;N;;;;; +AB63;LATIN SMALL LETTER UO;Ll;0;L;;;;;N;;;;; +AB64;LATIN SMALL LETTER INVERTED ALPHA;Ll;0;L;;;;;N;;;;; +AB65;GREEK LETTER SMALL CAPITAL OMEGA;Ll;0;L;;;;;N;;;;; +AB66;LATIN SMALL LETTER DZ DIGRAPH WITH RETROFLEX HOOK;Ll;0;L;;;;;N;;;;; +AB67;LATIN SMALL LETTER TS DIGRAPH WITH RETROFLEX HOOK;Ll;0;L;;;;;N;;;;; +AB70;CHEROKEE SMALL LETTER A;Ll;0;L;;;;;N;;;13A0;;13A0 +AB71;CHEROKEE SMALL LETTER E;Ll;0;L;;;;;N;;;13A1;;13A1 +AB72;CHEROKEE SMALL LETTER I;Ll;0;L;;;;;N;;;13A2;;13A2 +AB73;CHEROKEE SMALL LETTER O;Ll;0;L;;;;;N;;;13A3;;13A3 +AB74;CHEROKEE SMALL LETTER U;Ll;0;L;;;;;N;;;13A4;;13A4 +AB75;CHEROKEE SMALL LETTER V;Ll;0;L;;;;;N;;;13A5;;13A5 +AB76;CHEROKEE SMALL LETTER GA;Ll;0;L;;;;;N;;;13A6;;13A6 +AB77;CHEROKEE SMALL LETTER KA;Ll;0;L;;;;;N;;;13A7;;13A7 +AB78;CHEROKEE SMALL LETTER GE;Ll;0;L;;;;;N;;;13A8;;13A8 +AB79;CHEROKEE SMALL LETTER GI;Ll;0;L;;;;;N;;;13A9;;13A9 +AB7A;CHEROKEE SMALL LETTER GO;Ll;0;L;;;;;N;;;13AA;;13AA +AB7B;CHEROKEE SMALL LETTER GU;Ll;0;L;;;;;N;;;13AB;;13AB +AB7C;CHEROKEE SMALL LETTER GV;Ll;0;L;;;;;N;;;13AC;;13AC +AB7D;CHEROKEE SMALL LETTER HA;Ll;0;L;;;;;N;;;13AD;;13AD +AB7E;CHEROKEE SMALL LETTER HE;Ll;0;L;;;;;N;;;13AE;;13AE +AB7F;CHEROKEE SMALL LETTER HI;Ll;0;L;;;;;N;;;13AF;;13AF +AB80;CHEROKEE SMALL LETTER HO;Ll;0;L;;;;;N;;;13B0;;13B0 +AB81;CHEROKEE SMALL LETTER HU;Ll;0;L;;;;;N;;;13B1;;13B1 +AB82;CHEROKEE SMALL LETTER HV;Ll;0;L;;;;;N;;;13B2;;13B2 +AB83;CHEROKEE SMALL LETTER LA;Ll;0;L;;;;;N;;;13B3;;13B3 +AB84;CHEROKEE SMALL LETTER LE;Ll;0;L;;;;;N;;;13B4;;13B4 +AB85;CHEROKEE SMALL LETTER LI;Ll;0;L;;;;;N;;;13B5;;13B5 +AB86;CHEROKEE SMALL LETTER LO;Ll;0;L;;;;;N;;;13B6;;13B6 +AB87;CHEROKEE SMALL LETTER LU;Ll;0;L;;;;;N;;;13B7;;13B7 +AB88;CHEROKEE SMALL LETTER LV;Ll;0;L;;;;;N;;;13B8;;13B8 +AB89;CHEROKEE SMALL LETTER MA;Ll;0;L;;;;;N;;;13B9;;13B9 +AB8A;CHEROKEE SMALL LETTER ME;Ll;0;L;;;;;N;;;13BA;;13BA +AB8B;CHEROKEE SMALL LETTER MI;Ll;0;L;;;;;N;;;13BB;;13BB +AB8C;CHEROKEE SMALL LETTER MO;Ll;0;L;;;;;N;;;13BC;;13BC +AB8D;CHEROKEE SMALL LETTER MU;Ll;0;L;;;;;N;;;13BD;;13BD +AB8E;CHEROKEE SMALL LETTER NA;Ll;0;L;;;;;N;;;13BE;;13BE +AB8F;CHEROKEE SMALL LETTER HNA;Ll;0;L;;;;;N;;;13BF;;13BF +AB90;CHEROKEE SMALL LETTER NAH;Ll;0;L;;;;;N;;;13C0;;13C0 +AB91;CHEROKEE SMALL LETTER NE;Ll;0;L;;;;;N;;;13C1;;13C1 +AB92;CHEROKEE SMALL LETTER NI;Ll;0;L;;;;;N;;;13C2;;13C2 +AB93;CHEROKEE SMALL LETTER NO;Ll;0;L;;;;;N;;;13C3;;13C3 +AB94;CHEROKEE SMALL LETTER NU;Ll;0;L;;;;;N;;;13C4;;13C4 +AB95;CHEROKEE SMALL LETTER NV;Ll;0;L;;;;;N;;;13C5;;13C5 +AB96;CHEROKEE SMALL LETTER QUA;Ll;0;L;;;;;N;;;13C6;;13C6 +AB97;CHEROKEE SMALL LETTER QUE;Ll;0;L;;;;;N;;;13C7;;13C7 +AB98;CHEROKEE SMALL LETTER QUI;Ll;0;L;;;;;N;;;13C8;;13C8 +AB99;CHEROKEE SMALL LETTER QUO;Ll;0;L;;;;;N;;;13C9;;13C9 +AB9A;CHEROKEE SMALL LETTER QUU;Ll;0;L;;;;;N;;;13CA;;13CA +AB9B;CHEROKEE SMALL LETTER QUV;Ll;0;L;;;;;N;;;13CB;;13CB +AB9C;CHEROKEE SMALL LETTER SA;Ll;0;L;;;;;N;;;13CC;;13CC +AB9D;CHEROKEE SMALL LETTER S;Ll;0;L;;;;;N;;;13CD;;13CD +AB9E;CHEROKEE SMALL LETTER SE;Ll;0;L;;;;;N;;;13CE;;13CE +AB9F;CHEROKEE SMALL LETTER SI;Ll;0;L;;;;;N;;;13CF;;13CF +ABA0;CHEROKEE SMALL LETTER SO;Ll;0;L;;;;;N;;;13D0;;13D0 +ABA1;CHEROKEE SMALL LETTER SU;Ll;0;L;;;;;N;;;13D1;;13D1 +ABA2;CHEROKEE SMALL LETTER SV;Ll;0;L;;;;;N;;;13D2;;13D2 +ABA3;CHEROKEE SMALL LETTER DA;Ll;0;L;;;;;N;;;13D3;;13D3 +ABA4;CHEROKEE SMALL LETTER TA;Ll;0;L;;;;;N;;;13D4;;13D4 +ABA5;CHEROKEE SMALL LETTER DE;Ll;0;L;;;;;N;;;13D5;;13D5 +ABA6;CHEROKEE SMALL LETTER TE;Ll;0;L;;;;;N;;;13D6;;13D6 +ABA7;CHEROKEE SMALL LETTER DI;Ll;0;L;;;;;N;;;13D7;;13D7 +ABA8;CHEROKEE SMALL LETTER TI;Ll;0;L;;;;;N;;;13D8;;13D8 +ABA9;CHEROKEE SMALL LETTER DO;Ll;0;L;;;;;N;;;13D9;;13D9 +ABAA;CHEROKEE SMALL LETTER DU;Ll;0;L;;;;;N;;;13DA;;13DA +ABAB;CHEROKEE SMALL LETTER DV;Ll;0;L;;;;;N;;;13DB;;13DB +ABAC;CHEROKEE SMALL LETTER DLA;Ll;0;L;;;;;N;;;13DC;;13DC +ABAD;CHEROKEE SMALL LETTER TLA;Ll;0;L;;;;;N;;;13DD;;13DD +ABAE;CHEROKEE SMALL LETTER TLE;Ll;0;L;;;;;N;;;13DE;;13DE +ABAF;CHEROKEE SMALL LETTER TLI;Ll;0;L;;;;;N;;;13DF;;13DF +ABB0;CHEROKEE SMALL LETTER TLO;Ll;0;L;;;;;N;;;13E0;;13E0 +ABB1;CHEROKEE SMALL LETTER TLU;Ll;0;L;;;;;N;;;13E1;;13E1 +ABB2;CHEROKEE SMALL LETTER TLV;Ll;0;L;;;;;N;;;13E2;;13E2 +ABB3;CHEROKEE SMALL LETTER TSA;Ll;0;L;;;;;N;;;13E3;;13E3 +ABB4;CHEROKEE SMALL LETTER TSE;Ll;0;L;;;;;N;;;13E4;;13E4 +ABB5;CHEROKEE SMALL LETTER TSI;Ll;0;L;;;;;N;;;13E5;;13E5 +ABB6;CHEROKEE SMALL LETTER TSO;Ll;0;L;;;;;N;;;13E6;;13E6 +ABB7;CHEROKEE SMALL LETTER TSU;Ll;0;L;;;;;N;;;13E7;;13E7 +ABB8;CHEROKEE SMALL LETTER TSV;Ll;0;L;;;;;N;;;13E8;;13E8 +ABB9;CHEROKEE SMALL LETTER WA;Ll;0;L;;;;;N;;;13E9;;13E9 +ABBA;CHEROKEE SMALL LETTER WE;Ll;0;L;;;;;N;;;13EA;;13EA +ABBB;CHEROKEE SMALL LETTER WI;Ll;0;L;;;;;N;;;13EB;;13EB +ABBC;CHEROKEE SMALL LETTER WO;Ll;0;L;;;;;N;;;13EC;;13EC +ABBD;CHEROKEE SMALL LETTER WU;Ll;0;L;;;;;N;;;13ED;;13ED +ABBE;CHEROKEE SMALL LETTER WV;Ll;0;L;;;;;N;;;13EE;;13EE +ABBF;CHEROKEE SMALL LETTER YA;Ll;0;L;;;;;N;;;13EF;;13EF +ABC0;MEETEI MAYEK LETTER KOK;Lo;0;L;;;;;N;;;;; +ABC1;MEETEI MAYEK LETTER SAM;Lo;0;L;;;;;N;;;;; +ABC2;MEETEI MAYEK LETTER LAI;Lo;0;L;;;;;N;;;;; +ABC3;MEETEI MAYEK LETTER MIT;Lo;0;L;;;;;N;;;;; +ABC4;MEETEI MAYEK LETTER PA;Lo;0;L;;;;;N;;;;; +ABC5;MEETEI MAYEK LETTER NA;Lo;0;L;;;;;N;;;;; +ABC6;MEETEI MAYEK LETTER CHIL;Lo;0;L;;;;;N;;;;; +ABC7;MEETEI MAYEK LETTER TIL;Lo;0;L;;;;;N;;;;; +ABC8;MEETEI MAYEK LETTER KHOU;Lo;0;L;;;;;N;;;;; +ABC9;MEETEI MAYEK LETTER NGOU;Lo;0;L;;;;;N;;;;; +ABCA;MEETEI MAYEK LETTER THOU;Lo;0;L;;;;;N;;;;; +ABCB;MEETEI MAYEK LETTER WAI;Lo;0;L;;;;;N;;;;; +ABCC;MEETEI MAYEK LETTER YANG;Lo;0;L;;;;;N;;;;; +ABCD;MEETEI MAYEK LETTER HUK;Lo;0;L;;;;;N;;;;; +ABCE;MEETEI MAYEK LETTER UN;Lo;0;L;;;;;N;;;;; +ABCF;MEETEI MAYEK LETTER I;Lo;0;L;;;;;N;;;;; +ABD0;MEETEI MAYEK LETTER PHAM;Lo;0;L;;;;;N;;;;; +ABD1;MEETEI MAYEK LETTER ATIYA;Lo;0;L;;;;;N;;;;; +ABD2;MEETEI MAYEK LETTER GOK;Lo;0;L;;;;;N;;;;; +ABD3;MEETEI MAYEK LETTER JHAM;Lo;0;L;;;;;N;;;;; +ABD4;MEETEI MAYEK LETTER RAI;Lo;0;L;;;;;N;;;;; +ABD5;MEETEI MAYEK LETTER BA;Lo;0;L;;;;;N;;;;; +ABD6;MEETEI MAYEK LETTER JIL;Lo;0;L;;;;;N;;;;; +ABD7;MEETEI MAYEK LETTER DIL;Lo;0;L;;;;;N;;;;; +ABD8;MEETEI MAYEK LETTER GHOU;Lo;0;L;;;;;N;;;;; +ABD9;MEETEI MAYEK LETTER DHOU;Lo;0;L;;;;;N;;;;; +ABDA;MEETEI MAYEK LETTER BHAM;Lo;0;L;;;;;N;;;;; +ABDB;MEETEI MAYEK LETTER KOK LONSUM;Lo;0;L;;;;;N;;;;; +ABDC;MEETEI MAYEK LETTER LAI LONSUM;Lo;0;L;;;;;N;;;;; +ABDD;MEETEI MAYEK LETTER MIT LONSUM;Lo;0;L;;;;;N;;;;; +ABDE;MEETEI MAYEK LETTER PA LONSUM;Lo;0;L;;;;;N;;;;; +ABDF;MEETEI MAYEK LETTER NA LONSUM;Lo;0;L;;;;;N;;;;; +ABE0;MEETEI MAYEK LETTER TIL LONSUM;Lo;0;L;;;;;N;;;;; +ABE1;MEETEI MAYEK LETTER NGOU LONSUM;Lo;0;L;;;;;N;;;;; +ABE2;MEETEI MAYEK LETTER I LONSUM;Lo;0;L;;;;;N;;;;; +ABE3;MEETEI MAYEK VOWEL SIGN ONAP;Mc;0;L;;;;;N;;;;; +ABE4;MEETEI MAYEK VOWEL SIGN INAP;Mc;0;L;;;;;N;;;;; +ABE5;MEETEI MAYEK VOWEL SIGN ANAP;Mn;0;NSM;;;;;N;;;;; +ABE6;MEETEI MAYEK VOWEL SIGN YENAP;Mc;0;L;;;;;N;;;;; +ABE7;MEETEI MAYEK VOWEL SIGN SOUNAP;Mc;0;L;;;;;N;;;;; +ABE8;MEETEI MAYEK VOWEL SIGN UNAP;Mn;0;NSM;;;;;N;;;;; +ABE9;MEETEI MAYEK VOWEL SIGN CHEINAP;Mc;0;L;;;;;N;;;;; +ABEA;MEETEI MAYEK VOWEL SIGN NUNG;Mc;0;L;;;;;N;;;;; +ABEB;MEETEI MAYEK CHEIKHEI;Po;0;L;;;;;N;;;;; +ABEC;MEETEI MAYEK LUM IYEK;Mc;0;L;;;;;N;;;;; +ABED;MEETEI MAYEK APUN IYEK;Mn;9;NSM;;;;;N;;;;; +ABF0;MEETEI MAYEK DIGIT ZERO;Nd;0;L;;0;0;0;N;;;;; +ABF1;MEETEI MAYEK DIGIT ONE;Nd;0;L;;1;1;1;N;;;;; +ABF2;MEETEI MAYEK DIGIT TWO;Nd;0;L;;2;2;2;N;;;;; +ABF3;MEETEI MAYEK DIGIT THREE;Nd;0;L;;3;3;3;N;;;;; +ABF4;MEETEI MAYEK DIGIT FOUR;Nd;0;L;;4;4;4;N;;;;; +ABF5;MEETEI MAYEK DIGIT FIVE;Nd;0;L;;5;5;5;N;;;;; +ABF6;MEETEI MAYEK DIGIT SIX;Nd;0;L;;6;6;6;N;;;;; +ABF7;MEETEI MAYEK DIGIT SEVEN;Nd;0;L;;7;7;7;N;;;;; +ABF8;MEETEI MAYEK DIGIT EIGHT;Nd;0;L;;8;8;8;N;;;;; +ABF9;MEETEI MAYEK DIGIT NINE;Nd;0;L;;9;9;9;N;;;;; +AC00;;Lo;0;L;;;;;N;;;;; +D7A3;;Lo;0;L;;;;;N;;;;; +D7B0;HANGUL JUNGSEONG O-YEO;Lo;0;L;;;;;N;;;;; +D7B1;HANGUL JUNGSEONG O-O-I;Lo;0;L;;;;;N;;;;; +D7B2;HANGUL JUNGSEONG YO-A;Lo;0;L;;;;;N;;;;; +D7B3;HANGUL JUNGSEONG YO-AE;Lo;0;L;;;;;N;;;;; +D7B4;HANGUL JUNGSEONG YO-EO;Lo;0;L;;;;;N;;;;; +D7B5;HANGUL JUNGSEONG U-YEO;Lo;0;L;;;;;N;;;;; +D7B6;HANGUL JUNGSEONG U-I-I;Lo;0;L;;;;;N;;;;; +D7B7;HANGUL JUNGSEONG YU-AE;Lo;0;L;;;;;N;;;;; +D7B8;HANGUL JUNGSEONG YU-O;Lo;0;L;;;;;N;;;;; +D7B9;HANGUL JUNGSEONG EU-A;Lo;0;L;;;;;N;;;;; +D7BA;HANGUL JUNGSEONG EU-EO;Lo;0;L;;;;;N;;;;; +D7BB;HANGUL JUNGSEONG EU-E;Lo;0;L;;;;;N;;;;; +D7BC;HANGUL JUNGSEONG EU-O;Lo;0;L;;;;;N;;;;; +D7BD;HANGUL JUNGSEONG I-YA-O;Lo;0;L;;;;;N;;;;; +D7BE;HANGUL JUNGSEONG I-YAE;Lo;0;L;;;;;N;;;;; +D7BF;HANGUL JUNGSEONG I-YEO;Lo;0;L;;;;;N;;;;; +D7C0;HANGUL JUNGSEONG I-YE;Lo;0;L;;;;;N;;;;; +D7C1;HANGUL JUNGSEONG I-O-I;Lo;0;L;;;;;N;;;;; +D7C2;HANGUL JUNGSEONG I-YO;Lo;0;L;;;;;N;;;;; +D7C3;HANGUL JUNGSEONG I-YU;Lo;0;L;;;;;N;;;;; +D7C4;HANGUL JUNGSEONG I-I;Lo;0;L;;;;;N;;;;; +D7C5;HANGUL JUNGSEONG ARAEA-A;Lo;0;L;;;;;N;;;;; +D7C6;HANGUL JUNGSEONG ARAEA-E;Lo;0;L;;;;;N;;;;; +D7CB;HANGUL JONGSEONG NIEUN-RIEUL;Lo;0;L;;;;;N;;;;; +D7CC;HANGUL JONGSEONG NIEUN-CHIEUCH;Lo;0;L;;;;;N;;;;; +D7CD;HANGUL JONGSEONG SSANGTIKEUT;Lo;0;L;;;;;N;;;;; +D7CE;HANGUL JONGSEONG SSANGTIKEUT-PIEUP;Lo;0;L;;;;;N;;;;; +D7CF;HANGUL JONGSEONG TIKEUT-PIEUP;Lo;0;L;;;;;N;;;;; +D7D0;HANGUL JONGSEONG TIKEUT-SIOS;Lo;0;L;;;;;N;;;;; +D7D1;HANGUL JONGSEONG TIKEUT-SIOS-KIYEOK;Lo;0;L;;;;;N;;;;; +D7D2;HANGUL JONGSEONG TIKEUT-CIEUC;Lo;0;L;;;;;N;;;;; +D7D3;HANGUL JONGSEONG TIKEUT-CHIEUCH;Lo;0;L;;;;;N;;;;; +D7D4;HANGUL JONGSEONG TIKEUT-THIEUTH;Lo;0;L;;;;;N;;;;; +D7D5;HANGUL JONGSEONG RIEUL-SSANGKIYEOK;Lo;0;L;;;;;N;;;;; +D7D6;HANGUL JONGSEONG RIEUL-KIYEOK-HIEUH;Lo;0;L;;;;;N;;;;; +D7D7;HANGUL JONGSEONG SSANGRIEUL-KHIEUKH;Lo;0;L;;;;;N;;;;; +D7D8;HANGUL JONGSEONG RIEUL-MIEUM-HIEUH;Lo;0;L;;;;;N;;;;; +D7D9;HANGUL JONGSEONG RIEUL-PIEUP-TIKEUT;Lo;0;L;;;;;N;;;;; +D7DA;HANGUL JONGSEONG RIEUL-PIEUP-PHIEUPH;Lo;0;L;;;;;N;;;;; +D7DB;HANGUL JONGSEONG RIEUL-YESIEUNG;Lo;0;L;;;;;N;;;;; +D7DC;HANGUL JONGSEONG RIEUL-YEORINHIEUH-HIEUH;Lo;0;L;;;;;N;;;;; +D7DD;HANGUL JONGSEONG KAPYEOUNRIEUL;Lo;0;L;;;;;N;;;;; +D7DE;HANGUL JONGSEONG MIEUM-NIEUN;Lo;0;L;;;;;N;;;;; +D7DF;HANGUL JONGSEONG MIEUM-SSANGNIEUN;Lo;0;L;;;;;N;;;;; +D7E0;HANGUL JONGSEONG SSANGMIEUM;Lo;0;L;;;;;N;;;;; +D7E1;HANGUL JONGSEONG MIEUM-PIEUP-SIOS;Lo;0;L;;;;;N;;;;; +D7E2;HANGUL JONGSEONG MIEUM-CIEUC;Lo;0;L;;;;;N;;;;; +D7E3;HANGUL JONGSEONG PIEUP-TIKEUT;Lo;0;L;;;;;N;;;;; +D7E4;HANGUL JONGSEONG PIEUP-RIEUL-PHIEUPH;Lo;0;L;;;;;N;;;;; +D7E5;HANGUL JONGSEONG PIEUP-MIEUM;Lo;0;L;;;;;N;;;;; +D7E6;HANGUL JONGSEONG SSANGPIEUP;Lo;0;L;;;;;N;;;;; +D7E7;HANGUL JONGSEONG PIEUP-SIOS-TIKEUT;Lo;0;L;;;;;N;;;;; +D7E8;HANGUL JONGSEONG PIEUP-CIEUC;Lo;0;L;;;;;N;;;;; +D7E9;HANGUL JONGSEONG PIEUP-CHIEUCH;Lo;0;L;;;;;N;;;;; +D7EA;HANGUL JONGSEONG SIOS-MIEUM;Lo;0;L;;;;;N;;;;; +D7EB;HANGUL JONGSEONG SIOS-KAPYEOUNPIEUP;Lo;0;L;;;;;N;;;;; +D7EC;HANGUL JONGSEONG SSANGSIOS-KIYEOK;Lo;0;L;;;;;N;;;;; +D7ED;HANGUL JONGSEONG SSANGSIOS-TIKEUT;Lo;0;L;;;;;N;;;;; +D7EE;HANGUL JONGSEONG SIOS-PANSIOS;Lo;0;L;;;;;N;;;;; +D7EF;HANGUL JONGSEONG SIOS-CIEUC;Lo;0;L;;;;;N;;;;; +D7F0;HANGUL JONGSEONG SIOS-CHIEUCH;Lo;0;L;;;;;N;;;;; +D7F1;HANGUL JONGSEONG SIOS-THIEUTH;Lo;0;L;;;;;N;;;;; +D7F2;HANGUL JONGSEONG SIOS-HIEUH;Lo;0;L;;;;;N;;;;; +D7F3;HANGUL JONGSEONG PANSIOS-PIEUP;Lo;0;L;;;;;N;;;;; +D7F4;HANGUL JONGSEONG PANSIOS-KAPYEOUNPIEUP;Lo;0;L;;;;;N;;;;; +D7F5;HANGUL JONGSEONG YESIEUNG-MIEUM;Lo;0;L;;;;;N;;;;; +D7F6;HANGUL JONGSEONG YESIEUNG-HIEUH;Lo;0;L;;;;;N;;;;; +D7F7;HANGUL JONGSEONG CIEUC-PIEUP;Lo;0;L;;;;;N;;;;; +D7F8;HANGUL JONGSEONG CIEUC-SSANGPIEUP;Lo;0;L;;;;;N;;;;; +D7F9;HANGUL JONGSEONG SSANGCIEUC;Lo;0;L;;;;;N;;;;; +D7FA;HANGUL JONGSEONG PHIEUPH-SIOS;Lo;0;L;;;;;N;;;;; +D7FB;HANGUL JONGSEONG PHIEUPH-THIEUTH;Lo;0;L;;;;;N;;;;; +D800;;Cs;0;L;;;;;N;;;;; +DB7F;;Cs;0;L;;;;;N;;;;; +DB80;;Cs;0;L;;;;;N;;;;; +DBFF;;Cs;0;L;;;;;N;;;;; +DC00;;Cs;0;L;;;;;N;;;;; +DFFF;;Cs;0;L;;;;;N;;;;; +E000;;Co;0;L;;;;;N;;;;; +F8FF;;Co;0;L;;;;;N;;;;; +F900;CJK COMPATIBILITY IDEOGRAPH-F900;Lo;0;L;8C48;;;;N;;;;; +F901;CJK COMPATIBILITY IDEOGRAPH-F901;Lo;0;L;66F4;;;;N;;;;; +F902;CJK COMPATIBILITY IDEOGRAPH-F902;Lo;0;L;8ECA;;;;N;;;;; +F903;CJK COMPATIBILITY IDEOGRAPH-F903;Lo;0;L;8CC8;;;;N;;;;; +F904;CJK COMPATIBILITY IDEOGRAPH-F904;Lo;0;L;6ED1;;;;N;;;;; +F905;CJK COMPATIBILITY IDEOGRAPH-F905;Lo;0;L;4E32;;;;N;;;;; +F906;CJK COMPATIBILITY IDEOGRAPH-F906;Lo;0;L;53E5;;;;N;;;;; +F907;CJK COMPATIBILITY IDEOGRAPH-F907;Lo;0;L;9F9C;;;;N;;;;; +F908;CJK COMPATIBILITY IDEOGRAPH-F908;Lo;0;L;9F9C;;;;N;;;;; +F909;CJK COMPATIBILITY IDEOGRAPH-F909;Lo;0;L;5951;;;;N;;;;; +F90A;CJK COMPATIBILITY IDEOGRAPH-F90A;Lo;0;L;91D1;;;;N;;;;; +F90B;CJK COMPATIBILITY IDEOGRAPH-F90B;Lo;0;L;5587;;;;N;;;;; +F90C;CJK COMPATIBILITY IDEOGRAPH-F90C;Lo;0;L;5948;;;;N;;;;; +F90D;CJK COMPATIBILITY IDEOGRAPH-F90D;Lo;0;L;61F6;;;;N;;;;; +F90E;CJK COMPATIBILITY IDEOGRAPH-F90E;Lo;0;L;7669;;;;N;;;;; +F90F;CJK COMPATIBILITY IDEOGRAPH-F90F;Lo;0;L;7F85;;;;N;;;;; +F910;CJK COMPATIBILITY IDEOGRAPH-F910;Lo;0;L;863F;;;;N;;;;; +F911;CJK COMPATIBILITY IDEOGRAPH-F911;Lo;0;L;87BA;;;;N;;;;; +F912;CJK COMPATIBILITY IDEOGRAPH-F912;Lo;0;L;88F8;;;;N;;;;; +F913;CJK COMPATIBILITY IDEOGRAPH-F913;Lo;0;L;908F;;;;N;;;;; +F914;CJK COMPATIBILITY IDEOGRAPH-F914;Lo;0;L;6A02;;;;N;;;;; +F915;CJK COMPATIBILITY IDEOGRAPH-F915;Lo;0;L;6D1B;;;;N;;;;; +F916;CJK COMPATIBILITY IDEOGRAPH-F916;Lo;0;L;70D9;;;;N;;;;; +F917;CJK COMPATIBILITY IDEOGRAPH-F917;Lo;0;L;73DE;;;;N;;;;; +F918;CJK COMPATIBILITY IDEOGRAPH-F918;Lo;0;L;843D;;;;N;;;;; +F919;CJK COMPATIBILITY IDEOGRAPH-F919;Lo;0;L;916A;;;;N;;;;; +F91A;CJK COMPATIBILITY IDEOGRAPH-F91A;Lo;0;L;99F1;;;;N;;;;; +F91B;CJK COMPATIBILITY IDEOGRAPH-F91B;Lo;0;L;4E82;;;;N;;;;; +F91C;CJK COMPATIBILITY IDEOGRAPH-F91C;Lo;0;L;5375;;;;N;;;;; +F91D;CJK COMPATIBILITY IDEOGRAPH-F91D;Lo;0;L;6B04;;;;N;;;;; +F91E;CJK COMPATIBILITY IDEOGRAPH-F91E;Lo;0;L;721B;;;;N;;;;; +F91F;CJK COMPATIBILITY IDEOGRAPH-F91F;Lo;0;L;862D;;;;N;;;;; +F920;CJK COMPATIBILITY IDEOGRAPH-F920;Lo;0;L;9E1E;;;;N;;;;; +F921;CJK COMPATIBILITY IDEOGRAPH-F921;Lo;0;L;5D50;;;;N;;;;; +F922;CJK COMPATIBILITY IDEOGRAPH-F922;Lo;0;L;6FEB;;;;N;;;;; +F923;CJK COMPATIBILITY IDEOGRAPH-F923;Lo;0;L;85CD;;;;N;;;;; +F924;CJK COMPATIBILITY IDEOGRAPH-F924;Lo;0;L;8964;;;;N;;;;; +F925;CJK COMPATIBILITY IDEOGRAPH-F925;Lo;0;L;62C9;;;;N;;;;; +F926;CJK COMPATIBILITY IDEOGRAPH-F926;Lo;0;L;81D8;;;;N;;;;; +F927;CJK COMPATIBILITY IDEOGRAPH-F927;Lo;0;L;881F;;;;N;;;;; +F928;CJK COMPATIBILITY IDEOGRAPH-F928;Lo;0;L;5ECA;;;;N;;;;; +F929;CJK COMPATIBILITY IDEOGRAPH-F929;Lo;0;L;6717;;;;N;;;;; +F92A;CJK COMPATIBILITY IDEOGRAPH-F92A;Lo;0;L;6D6A;;;;N;;;;; +F92B;CJK COMPATIBILITY IDEOGRAPH-F92B;Lo;0;L;72FC;;;;N;;;;; +F92C;CJK COMPATIBILITY IDEOGRAPH-F92C;Lo;0;L;90CE;;;;N;;;;; +F92D;CJK COMPATIBILITY IDEOGRAPH-F92D;Lo;0;L;4F86;;;;N;;;;; +F92E;CJK COMPATIBILITY IDEOGRAPH-F92E;Lo;0;L;51B7;;;;N;;;;; +F92F;CJK COMPATIBILITY IDEOGRAPH-F92F;Lo;0;L;52DE;;;;N;;;;; +F930;CJK COMPATIBILITY IDEOGRAPH-F930;Lo;0;L;64C4;;;;N;;;;; +F931;CJK COMPATIBILITY IDEOGRAPH-F931;Lo;0;L;6AD3;;;;N;;;;; +F932;CJK COMPATIBILITY IDEOGRAPH-F932;Lo;0;L;7210;;;;N;;;;; +F933;CJK COMPATIBILITY IDEOGRAPH-F933;Lo;0;L;76E7;;;;N;;;;; +F934;CJK COMPATIBILITY IDEOGRAPH-F934;Lo;0;L;8001;;;;N;;;;; +F935;CJK COMPATIBILITY IDEOGRAPH-F935;Lo;0;L;8606;;;;N;;;;; +F936;CJK COMPATIBILITY IDEOGRAPH-F936;Lo;0;L;865C;;;;N;;;;; +F937;CJK COMPATIBILITY IDEOGRAPH-F937;Lo;0;L;8DEF;;;;N;;;;; +F938;CJK COMPATIBILITY IDEOGRAPH-F938;Lo;0;L;9732;;;;N;;;;; +F939;CJK COMPATIBILITY IDEOGRAPH-F939;Lo;0;L;9B6F;;;;N;;;;; +F93A;CJK COMPATIBILITY IDEOGRAPH-F93A;Lo;0;L;9DFA;;;;N;;;;; +F93B;CJK COMPATIBILITY IDEOGRAPH-F93B;Lo;0;L;788C;;;;N;;;;; +F93C;CJK COMPATIBILITY IDEOGRAPH-F93C;Lo;0;L;797F;;;;N;;;;; +F93D;CJK COMPATIBILITY IDEOGRAPH-F93D;Lo;0;L;7DA0;;;;N;;;;; +F93E;CJK COMPATIBILITY IDEOGRAPH-F93E;Lo;0;L;83C9;;;;N;;;;; +F93F;CJK COMPATIBILITY IDEOGRAPH-F93F;Lo;0;L;9304;;;;N;;;;; +F940;CJK COMPATIBILITY IDEOGRAPH-F940;Lo;0;L;9E7F;;;;N;;;;; +F941;CJK COMPATIBILITY IDEOGRAPH-F941;Lo;0;L;8AD6;;;;N;;;;; +F942;CJK COMPATIBILITY IDEOGRAPH-F942;Lo;0;L;58DF;;;;N;;;;; +F943;CJK COMPATIBILITY IDEOGRAPH-F943;Lo;0;L;5F04;;;;N;;;;; +F944;CJK COMPATIBILITY IDEOGRAPH-F944;Lo;0;L;7C60;;;;N;;;;; +F945;CJK COMPATIBILITY IDEOGRAPH-F945;Lo;0;L;807E;;;;N;;;;; +F946;CJK COMPATIBILITY IDEOGRAPH-F946;Lo;0;L;7262;;;;N;;;;; +F947;CJK COMPATIBILITY IDEOGRAPH-F947;Lo;0;L;78CA;;;;N;;;;; +F948;CJK COMPATIBILITY IDEOGRAPH-F948;Lo;0;L;8CC2;;;;N;;;;; +F949;CJK COMPATIBILITY IDEOGRAPH-F949;Lo;0;L;96F7;;;;N;;;;; +F94A;CJK COMPATIBILITY IDEOGRAPH-F94A;Lo;0;L;58D8;;;;N;;;;; +F94B;CJK COMPATIBILITY IDEOGRAPH-F94B;Lo;0;L;5C62;;;;N;;;;; +F94C;CJK COMPATIBILITY IDEOGRAPH-F94C;Lo;0;L;6A13;;;;N;;;;; +F94D;CJK COMPATIBILITY IDEOGRAPH-F94D;Lo;0;L;6DDA;;;;N;;;;; +F94E;CJK COMPATIBILITY IDEOGRAPH-F94E;Lo;0;L;6F0F;;;;N;;;;; +F94F;CJK COMPATIBILITY IDEOGRAPH-F94F;Lo;0;L;7D2F;;;;N;;;;; +F950;CJK COMPATIBILITY IDEOGRAPH-F950;Lo;0;L;7E37;;;;N;;;;; +F951;CJK COMPATIBILITY IDEOGRAPH-F951;Lo;0;L;964B;;;;N;;;;; +F952;CJK COMPATIBILITY IDEOGRAPH-F952;Lo;0;L;52D2;;;;N;;;;; +F953;CJK COMPATIBILITY IDEOGRAPH-F953;Lo;0;L;808B;;;;N;;;;; +F954;CJK COMPATIBILITY IDEOGRAPH-F954;Lo;0;L;51DC;;;;N;;;;; +F955;CJK COMPATIBILITY IDEOGRAPH-F955;Lo;0;L;51CC;;;;N;;;;; +F956;CJK COMPATIBILITY IDEOGRAPH-F956;Lo;0;L;7A1C;;;;N;;;;; +F957;CJK COMPATIBILITY IDEOGRAPH-F957;Lo;0;L;7DBE;;;;N;;;;; +F958;CJK COMPATIBILITY IDEOGRAPH-F958;Lo;0;L;83F1;;;;N;;;;; +F959;CJK COMPATIBILITY IDEOGRAPH-F959;Lo;0;L;9675;;;;N;;;;; +F95A;CJK COMPATIBILITY IDEOGRAPH-F95A;Lo;0;L;8B80;;;;N;;;;; +F95B;CJK COMPATIBILITY IDEOGRAPH-F95B;Lo;0;L;62CF;;;;N;;;;; +F95C;CJK COMPATIBILITY IDEOGRAPH-F95C;Lo;0;L;6A02;;;;N;;;;; +F95D;CJK COMPATIBILITY IDEOGRAPH-F95D;Lo;0;L;8AFE;;;;N;;;;; +F95E;CJK COMPATIBILITY IDEOGRAPH-F95E;Lo;0;L;4E39;;;;N;;;;; +F95F;CJK COMPATIBILITY IDEOGRAPH-F95F;Lo;0;L;5BE7;;;;N;;;;; +F960;CJK COMPATIBILITY IDEOGRAPH-F960;Lo;0;L;6012;;;;N;;;;; +F961;CJK COMPATIBILITY IDEOGRAPH-F961;Lo;0;L;7387;;;;N;;;;; +F962;CJK COMPATIBILITY IDEOGRAPH-F962;Lo;0;L;7570;;;;N;;;;; +F963;CJK COMPATIBILITY IDEOGRAPH-F963;Lo;0;L;5317;;;;N;;;;; +F964;CJK COMPATIBILITY IDEOGRAPH-F964;Lo;0;L;78FB;;;;N;;;;; +F965;CJK COMPATIBILITY IDEOGRAPH-F965;Lo;0;L;4FBF;;;;N;;;;; +F966;CJK COMPATIBILITY IDEOGRAPH-F966;Lo;0;L;5FA9;;;;N;;;;; +F967;CJK COMPATIBILITY IDEOGRAPH-F967;Lo;0;L;4E0D;;;;N;;;;; +F968;CJK COMPATIBILITY IDEOGRAPH-F968;Lo;0;L;6CCC;;;;N;;;;; +F969;CJK COMPATIBILITY IDEOGRAPH-F969;Lo;0;L;6578;;;;N;;;;; +F96A;CJK COMPATIBILITY IDEOGRAPH-F96A;Lo;0;L;7D22;;;;N;;;;; +F96B;CJK COMPATIBILITY IDEOGRAPH-F96B;Lo;0;L;53C3;;;3;N;;;;; +F96C;CJK COMPATIBILITY IDEOGRAPH-F96C;Lo;0;L;585E;;;;N;;;;; +F96D;CJK COMPATIBILITY IDEOGRAPH-F96D;Lo;0;L;7701;;;;N;;;;; +F96E;CJK COMPATIBILITY IDEOGRAPH-F96E;Lo;0;L;8449;;;;N;;;;; +F96F;CJK COMPATIBILITY IDEOGRAPH-F96F;Lo;0;L;8AAA;;;;N;;;;; +F970;CJK COMPATIBILITY IDEOGRAPH-F970;Lo;0;L;6BBA;;;;N;;;;; +F971;CJK COMPATIBILITY IDEOGRAPH-F971;Lo;0;L;8FB0;;;;N;;;;; +F972;CJK COMPATIBILITY IDEOGRAPH-F972;Lo;0;L;6C88;;;;N;;;;; +F973;CJK COMPATIBILITY IDEOGRAPH-F973;Lo;0;L;62FE;;;10;N;;;;; +F974;CJK COMPATIBILITY IDEOGRAPH-F974;Lo;0;L;82E5;;;;N;;;;; +F975;CJK COMPATIBILITY IDEOGRAPH-F975;Lo;0;L;63A0;;;;N;;;;; +F976;CJK COMPATIBILITY IDEOGRAPH-F976;Lo;0;L;7565;;;;N;;;;; +F977;CJK COMPATIBILITY IDEOGRAPH-F977;Lo;0;L;4EAE;;;;N;;;;; +F978;CJK COMPATIBILITY IDEOGRAPH-F978;Lo;0;L;5169;;;2;N;;;;; +F979;CJK COMPATIBILITY IDEOGRAPH-F979;Lo;0;L;51C9;;;;N;;;;; +F97A;CJK COMPATIBILITY IDEOGRAPH-F97A;Lo;0;L;6881;;;;N;;;;; +F97B;CJK COMPATIBILITY IDEOGRAPH-F97B;Lo;0;L;7CE7;;;;N;;;;; +F97C;CJK COMPATIBILITY IDEOGRAPH-F97C;Lo;0;L;826F;;;;N;;;;; +F97D;CJK COMPATIBILITY IDEOGRAPH-F97D;Lo;0;L;8AD2;;;;N;;;;; +F97E;CJK COMPATIBILITY IDEOGRAPH-F97E;Lo;0;L;91CF;;;;N;;;;; +F97F;CJK COMPATIBILITY IDEOGRAPH-F97F;Lo;0;L;52F5;;;;N;;;;; +F980;CJK COMPATIBILITY IDEOGRAPH-F980;Lo;0;L;5442;;;;N;;;;; +F981;CJK COMPATIBILITY IDEOGRAPH-F981;Lo;0;L;5973;;;;N;;;;; +F982;CJK COMPATIBILITY IDEOGRAPH-F982;Lo;0;L;5EEC;;;;N;;;;; +F983;CJK COMPATIBILITY IDEOGRAPH-F983;Lo;0;L;65C5;;;;N;;;;; +F984;CJK COMPATIBILITY IDEOGRAPH-F984;Lo;0;L;6FFE;;;;N;;;;; +F985;CJK COMPATIBILITY IDEOGRAPH-F985;Lo;0;L;792A;;;;N;;;;; +F986;CJK COMPATIBILITY IDEOGRAPH-F986;Lo;0;L;95AD;;;;N;;;;; +F987;CJK COMPATIBILITY IDEOGRAPH-F987;Lo;0;L;9A6A;;;;N;;;;; +F988;CJK COMPATIBILITY IDEOGRAPH-F988;Lo;0;L;9E97;;;;N;;;;; +F989;CJK COMPATIBILITY IDEOGRAPH-F989;Lo;0;L;9ECE;;;;N;;;;; +F98A;CJK COMPATIBILITY IDEOGRAPH-F98A;Lo;0;L;529B;;;;N;;;;; +F98B;CJK COMPATIBILITY IDEOGRAPH-F98B;Lo;0;L;66C6;;;;N;;;;; +F98C;CJK COMPATIBILITY IDEOGRAPH-F98C;Lo;0;L;6B77;;;;N;;;;; +F98D;CJK COMPATIBILITY IDEOGRAPH-F98D;Lo;0;L;8F62;;;;N;;;;; +F98E;CJK COMPATIBILITY IDEOGRAPH-F98E;Lo;0;L;5E74;;;;N;;;;; +F98F;CJK COMPATIBILITY IDEOGRAPH-F98F;Lo;0;L;6190;;;;N;;;;; +F990;CJK COMPATIBILITY IDEOGRAPH-F990;Lo;0;L;6200;;;;N;;;;; +F991;CJK COMPATIBILITY IDEOGRAPH-F991;Lo;0;L;649A;;;;N;;;;; +F992;CJK COMPATIBILITY IDEOGRAPH-F992;Lo;0;L;6F23;;;;N;;;;; +F993;CJK COMPATIBILITY IDEOGRAPH-F993;Lo;0;L;7149;;;;N;;;;; +F994;CJK COMPATIBILITY IDEOGRAPH-F994;Lo;0;L;7489;;;;N;;;;; +F995;CJK COMPATIBILITY IDEOGRAPH-F995;Lo;0;L;79CA;;;;N;;;;; +F996;CJK COMPATIBILITY IDEOGRAPH-F996;Lo;0;L;7DF4;;;;N;;;;; +F997;CJK COMPATIBILITY IDEOGRAPH-F997;Lo;0;L;806F;;;;N;;;;; +F998;CJK COMPATIBILITY IDEOGRAPH-F998;Lo;0;L;8F26;;;;N;;;;; +F999;CJK COMPATIBILITY IDEOGRAPH-F999;Lo;0;L;84EE;;;;N;;;;; +F99A;CJK COMPATIBILITY IDEOGRAPH-F99A;Lo;0;L;9023;;;;N;;;;; +F99B;CJK COMPATIBILITY IDEOGRAPH-F99B;Lo;0;L;934A;;;;N;;;;; +F99C;CJK COMPATIBILITY IDEOGRAPH-F99C;Lo;0;L;5217;;;;N;;;;; +F99D;CJK COMPATIBILITY IDEOGRAPH-F99D;Lo;0;L;52A3;;;;N;;;;; +F99E;CJK COMPATIBILITY IDEOGRAPH-F99E;Lo;0;L;54BD;;;;N;;;;; +F99F;CJK COMPATIBILITY IDEOGRAPH-F99F;Lo;0;L;70C8;;;;N;;;;; +F9A0;CJK COMPATIBILITY IDEOGRAPH-F9A0;Lo;0;L;88C2;;;;N;;;;; +F9A1;CJK COMPATIBILITY IDEOGRAPH-F9A1;Lo;0;L;8AAA;;;;N;;;;; +F9A2;CJK COMPATIBILITY IDEOGRAPH-F9A2;Lo;0;L;5EC9;;;;N;;;;; +F9A3;CJK COMPATIBILITY IDEOGRAPH-F9A3;Lo;0;L;5FF5;;;;N;;;;; +F9A4;CJK COMPATIBILITY IDEOGRAPH-F9A4;Lo;0;L;637B;;;;N;;;;; +F9A5;CJK COMPATIBILITY IDEOGRAPH-F9A5;Lo;0;L;6BAE;;;;N;;;;; +F9A6;CJK COMPATIBILITY IDEOGRAPH-F9A6;Lo;0;L;7C3E;;;;N;;;;; +F9A7;CJK COMPATIBILITY IDEOGRAPH-F9A7;Lo;0;L;7375;;;;N;;;;; +F9A8;CJK COMPATIBILITY IDEOGRAPH-F9A8;Lo;0;L;4EE4;;;;N;;;;; +F9A9;CJK COMPATIBILITY IDEOGRAPH-F9A9;Lo;0;L;56F9;;;;N;;;;; +F9AA;CJK COMPATIBILITY IDEOGRAPH-F9AA;Lo;0;L;5BE7;;;;N;;;;; +F9AB;CJK COMPATIBILITY IDEOGRAPH-F9AB;Lo;0;L;5DBA;;;;N;;;;; +F9AC;CJK COMPATIBILITY IDEOGRAPH-F9AC;Lo;0;L;601C;;;;N;;;;; +F9AD;CJK COMPATIBILITY IDEOGRAPH-F9AD;Lo;0;L;73B2;;;;N;;;;; +F9AE;CJK COMPATIBILITY IDEOGRAPH-F9AE;Lo;0;L;7469;;;;N;;;;; +F9AF;CJK COMPATIBILITY IDEOGRAPH-F9AF;Lo;0;L;7F9A;;;;N;;;;; +F9B0;CJK COMPATIBILITY IDEOGRAPH-F9B0;Lo;0;L;8046;;;;N;;;;; +F9B1;CJK COMPATIBILITY IDEOGRAPH-F9B1;Lo;0;L;9234;;;;N;;;;; +F9B2;CJK COMPATIBILITY IDEOGRAPH-F9B2;Lo;0;L;96F6;;;0;N;;;;; +F9B3;CJK COMPATIBILITY IDEOGRAPH-F9B3;Lo;0;L;9748;;;;N;;;;; +F9B4;CJK COMPATIBILITY IDEOGRAPH-F9B4;Lo;0;L;9818;;;;N;;;;; +F9B5;CJK COMPATIBILITY IDEOGRAPH-F9B5;Lo;0;L;4F8B;;;;N;;;;; +F9B6;CJK COMPATIBILITY IDEOGRAPH-F9B6;Lo;0;L;79AE;;;;N;;;;; +F9B7;CJK COMPATIBILITY IDEOGRAPH-F9B7;Lo;0;L;91B4;;;;N;;;;; +F9B8;CJK COMPATIBILITY IDEOGRAPH-F9B8;Lo;0;L;96B8;;;;N;;;;; +F9B9;CJK COMPATIBILITY IDEOGRAPH-F9B9;Lo;0;L;60E1;;;;N;;;;; +F9BA;CJK COMPATIBILITY IDEOGRAPH-F9BA;Lo;0;L;4E86;;;;N;;;;; +F9BB;CJK COMPATIBILITY IDEOGRAPH-F9BB;Lo;0;L;50DA;;;;N;;;;; +F9BC;CJK COMPATIBILITY IDEOGRAPH-F9BC;Lo;0;L;5BEE;;;;N;;;;; +F9BD;CJK COMPATIBILITY IDEOGRAPH-F9BD;Lo;0;L;5C3F;;;;N;;;;; +F9BE;CJK COMPATIBILITY IDEOGRAPH-F9BE;Lo;0;L;6599;;;;N;;;;; +F9BF;CJK COMPATIBILITY IDEOGRAPH-F9BF;Lo;0;L;6A02;;;;N;;;;; +F9C0;CJK COMPATIBILITY IDEOGRAPH-F9C0;Lo;0;L;71CE;;;;N;;;;; +F9C1;CJK COMPATIBILITY IDEOGRAPH-F9C1;Lo;0;L;7642;;;;N;;;;; +F9C2;CJK COMPATIBILITY IDEOGRAPH-F9C2;Lo;0;L;84FC;;;;N;;;;; +F9C3;CJK COMPATIBILITY IDEOGRAPH-F9C3;Lo;0;L;907C;;;;N;;;;; +F9C4;CJK COMPATIBILITY IDEOGRAPH-F9C4;Lo;0;L;9F8D;;;;N;;;;; +F9C5;CJK COMPATIBILITY IDEOGRAPH-F9C5;Lo;0;L;6688;;;;N;;;;; +F9C6;CJK COMPATIBILITY IDEOGRAPH-F9C6;Lo;0;L;962E;;;;N;;;;; +F9C7;CJK COMPATIBILITY IDEOGRAPH-F9C7;Lo;0;L;5289;;;;N;;;;; +F9C8;CJK COMPATIBILITY IDEOGRAPH-F9C8;Lo;0;L;677B;;;;N;;;;; +F9C9;CJK COMPATIBILITY IDEOGRAPH-F9C9;Lo;0;L;67F3;;;;N;;;;; +F9CA;CJK COMPATIBILITY IDEOGRAPH-F9CA;Lo;0;L;6D41;;;;N;;;;; +F9CB;CJK COMPATIBILITY IDEOGRAPH-F9CB;Lo;0;L;6E9C;;;;N;;;;; +F9CC;CJK COMPATIBILITY IDEOGRAPH-F9CC;Lo;0;L;7409;;;;N;;;;; +F9CD;CJK COMPATIBILITY IDEOGRAPH-F9CD;Lo;0;L;7559;;;;N;;;;; +F9CE;CJK COMPATIBILITY IDEOGRAPH-F9CE;Lo;0;L;786B;;;;N;;;;; +F9CF;CJK COMPATIBILITY IDEOGRAPH-F9CF;Lo;0;L;7D10;;;;N;;;;; +F9D0;CJK COMPATIBILITY IDEOGRAPH-F9D0;Lo;0;L;985E;;;;N;;;;; +F9D1;CJK COMPATIBILITY IDEOGRAPH-F9D1;Lo;0;L;516D;;;6;N;;;;; +F9D2;CJK COMPATIBILITY IDEOGRAPH-F9D2;Lo;0;L;622E;;;;N;;;;; +F9D3;CJK COMPATIBILITY IDEOGRAPH-F9D3;Lo;0;L;9678;;;6;N;;;;; +F9D4;CJK COMPATIBILITY IDEOGRAPH-F9D4;Lo;0;L;502B;;;;N;;;;; +F9D5;CJK COMPATIBILITY IDEOGRAPH-F9D5;Lo;0;L;5D19;;;;N;;;;; +F9D6;CJK COMPATIBILITY IDEOGRAPH-F9D6;Lo;0;L;6DEA;;;;N;;;;; +F9D7;CJK COMPATIBILITY IDEOGRAPH-F9D7;Lo;0;L;8F2A;;;;N;;;;; +F9D8;CJK COMPATIBILITY IDEOGRAPH-F9D8;Lo;0;L;5F8B;;;;N;;;;; +F9D9;CJK COMPATIBILITY IDEOGRAPH-F9D9;Lo;0;L;6144;;;;N;;;;; +F9DA;CJK COMPATIBILITY IDEOGRAPH-F9DA;Lo;0;L;6817;;;;N;;;;; +F9DB;CJK COMPATIBILITY IDEOGRAPH-F9DB;Lo;0;L;7387;;;;N;;;;; +F9DC;CJK COMPATIBILITY IDEOGRAPH-F9DC;Lo;0;L;9686;;;;N;;;;; +F9DD;CJK COMPATIBILITY IDEOGRAPH-F9DD;Lo;0;L;5229;;;;N;;;;; +F9DE;CJK COMPATIBILITY IDEOGRAPH-F9DE;Lo;0;L;540F;;;;N;;;;; +F9DF;CJK COMPATIBILITY IDEOGRAPH-F9DF;Lo;0;L;5C65;;;;N;;;;; +F9E0;CJK COMPATIBILITY IDEOGRAPH-F9E0;Lo;0;L;6613;;;;N;;;;; +F9E1;CJK COMPATIBILITY IDEOGRAPH-F9E1;Lo;0;L;674E;;;;N;;;;; +F9E2;CJK COMPATIBILITY IDEOGRAPH-F9E2;Lo;0;L;68A8;;;;N;;;;; +F9E3;CJK COMPATIBILITY IDEOGRAPH-F9E3;Lo;0;L;6CE5;;;;N;;;;; +F9E4;CJK COMPATIBILITY IDEOGRAPH-F9E4;Lo;0;L;7406;;;;N;;;;; +F9E5;CJK COMPATIBILITY IDEOGRAPH-F9E5;Lo;0;L;75E2;;;;N;;;;; +F9E6;CJK COMPATIBILITY IDEOGRAPH-F9E6;Lo;0;L;7F79;;;;N;;;;; +F9E7;CJK COMPATIBILITY IDEOGRAPH-F9E7;Lo;0;L;88CF;;;;N;;;;; +F9E8;CJK COMPATIBILITY IDEOGRAPH-F9E8;Lo;0;L;88E1;;;;N;;;;; +F9E9;CJK COMPATIBILITY IDEOGRAPH-F9E9;Lo;0;L;91CC;;;;N;;;;; +F9EA;CJK COMPATIBILITY IDEOGRAPH-F9EA;Lo;0;L;96E2;;;;N;;;;; +F9EB;CJK COMPATIBILITY IDEOGRAPH-F9EB;Lo;0;L;533F;;;;N;;;;; +F9EC;CJK COMPATIBILITY IDEOGRAPH-F9EC;Lo;0;L;6EBA;;;;N;;;;; +F9ED;CJK COMPATIBILITY IDEOGRAPH-F9ED;Lo;0;L;541D;;;;N;;;;; +F9EE;CJK COMPATIBILITY IDEOGRAPH-F9EE;Lo;0;L;71D0;;;;N;;;;; +F9EF;CJK COMPATIBILITY IDEOGRAPH-F9EF;Lo;0;L;7498;;;;N;;;;; +F9F0;CJK COMPATIBILITY IDEOGRAPH-F9F0;Lo;0;L;85FA;;;;N;;;;; +F9F1;CJK COMPATIBILITY IDEOGRAPH-F9F1;Lo;0;L;96A3;;;;N;;;;; +F9F2;CJK COMPATIBILITY IDEOGRAPH-F9F2;Lo;0;L;9C57;;;;N;;;;; +F9F3;CJK COMPATIBILITY IDEOGRAPH-F9F3;Lo;0;L;9E9F;;;;N;;;;; +F9F4;CJK COMPATIBILITY IDEOGRAPH-F9F4;Lo;0;L;6797;;;;N;;;;; +F9F5;CJK COMPATIBILITY IDEOGRAPH-F9F5;Lo;0;L;6DCB;;;;N;;;;; +F9F6;CJK COMPATIBILITY IDEOGRAPH-F9F6;Lo;0;L;81E8;;;;N;;;;; +F9F7;CJK COMPATIBILITY IDEOGRAPH-F9F7;Lo;0;L;7ACB;;;;N;;;;; +F9F8;CJK COMPATIBILITY IDEOGRAPH-F9F8;Lo;0;L;7B20;;;;N;;;;; +F9F9;CJK COMPATIBILITY IDEOGRAPH-F9F9;Lo;0;L;7C92;;;;N;;;;; +F9FA;CJK COMPATIBILITY IDEOGRAPH-F9FA;Lo;0;L;72C0;;;;N;;;;; +F9FB;CJK COMPATIBILITY IDEOGRAPH-F9FB;Lo;0;L;7099;;;;N;;;;; +F9FC;CJK COMPATIBILITY IDEOGRAPH-F9FC;Lo;0;L;8B58;;;;N;;;;; +F9FD;CJK COMPATIBILITY IDEOGRAPH-F9FD;Lo;0;L;4EC0;;;10;N;;;;; +F9FE;CJK COMPATIBILITY IDEOGRAPH-F9FE;Lo;0;L;8336;;;;N;;;;; +F9FF;CJK COMPATIBILITY IDEOGRAPH-F9FF;Lo;0;L;523A;;;;N;;;;; +FA00;CJK COMPATIBILITY IDEOGRAPH-FA00;Lo;0;L;5207;;;;N;;;;; +FA01;CJK COMPATIBILITY IDEOGRAPH-FA01;Lo;0;L;5EA6;;;;N;;;;; +FA02;CJK COMPATIBILITY IDEOGRAPH-FA02;Lo;0;L;62D3;;;;N;;;;; +FA03;CJK COMPATIBILITY IDEOGRAPH-FA03;Lo;0;L;7CD6;;;;N;;;;; +FA04;CJK COMPATIBILITY IDEOGRAPH-FA04;Lo;0;L;5B85;;;;N;;;;; +FA05;CJK COMPATIBILITY IDEOGRAPH-FA05;Lo;0;L;6D1E;;;;N;;;;; +FA06;CJK COMPATIBILITY IDEOGRAPH-FA06;Lo;0;L;66B4;;;;N;;;;; +FA07;CJK COMPATIBILITY IDEOGRAPH-FA07;Lo;0;L;8F3B;;;;N;;;;; +FA08;CJK COMPATIBILITY IDEOGRAPH-FA08;Lo;0;L;884C;;;;N;;;;; +FA09;CJK COMPATIBILITY IDEOGRAPH-FA09;Lo;0;L;964D;;;;N;;;;; +FA0A;CJK COMPATIBILITY IDEOGRAPH-FA0A;Lo;0;L;898B;;;;N;;;;; +FA0B;CJK COMPATIBILITY IDEOGRAPH-FA0B;Lo;0;L;5ED3;;;;N;;;;; +FA0C;CJK COMPATIBILITY IDEOGRAPH-FA0C;Lo;0;L;5140;;;;N;;;;; +FA0D;CJK COMPATIBILITY IDEOGRAPH-FA0D;Lo;0;L;55C0;;;;N;;;;; +FA0E;CJK COMPATIBILITY IDEOGRAPH-FA0E;Lo;0;L;;;;;N;;;;; +FA0F;CJK COMPATIBILITY IDEOGRAPH-FA0F;Lo;0;L;;;;;N;;;;; +FA10;CJK COMPATIBILITY IDEOGRAPH-FA10;Lo;0;L;585A;;;;N;;;;; +FA11;CJK COMPATIBILITY IDEOGRAPH-FA11;Lo;0;L;;;;;N;;;;; +FA12;CJK COMPATIBILITY IDEOGRAPH-FA12;Lo;0;L;6674;;;;N;;;;; +FA13;CJK COMPATIBILITY IDEOGRAPH-FA13;Lo;0;L;;;;;N;;;;; +FA14;CJK COMPATIBILITY IDEOGRAPH-FA14;Lo;0;L;;;;;N;;;;; +FA15;CJK COMPATIBILITY IDEOGRAPH-FA15;Lo;0;L;51DE;;;;N;;;;; +FA16;CJK COMPATIBILITY IDEOGRAPH-FA16;Lo;0;L;732A;;;;N;;;;; +FA17;CJK COMPATIBILITY IDEOGRAPH-FA17;Lo;0;L;76CA;;;;N;;;;; +FA18;CJK COMPATIBILITY IDEOGRAPH-FA18;Lo;0;L;793C;;;;N;;;;; +FA19;CJK COMPATIBILITY IDEOGRAPH-FA19;Lo;0;L;795E;;;;N;;;;; +FA1A;CJK COMPATIBILITY IDEOGRAPH-FA1A;Lo;0;L;7965;;;;N;;;;; +FA1B;CJK COMPATIBILITY IDEOGRAPH-FA1B;Lo;0;L;798F;;;;N;;;;; +FA1C;CJK COMPATIBILITY IDEOGRAPH-FA1C;Lo;0;L;9756;;;;N;;;;; +FA1D;CJK COMPATIBILITY IDEOGRAPH-FA1D;Lo;0;L;7CBE;;;;N;;;;; +FA1E;CJK COMPATIBILITY IDEOGRAPH-FA1E;Lo;0;L;7FBD;;;;N;;;;; +FA1F;CJK COMPATIBILITY IDEOGRAPH-FA1F;Lo;0;L;;;;;N;;;;; +FA20;CJK COMPATIBILITY IDEOGRAPH-FA20;Lo;0;L;8612;;;;N;;;;; +FA21;CJK COMPATIBILITY IDEOGRAPH-FA21;Lo;0;L;;;;;N;;;;; +FA22;CJK COMPATIBILITY IDEOGRAPH-FA22;Lo;0;L;8AF8;;;;N;;;;; +FA23;CJK COMPATIBILITY IDEOGRAPH-FA23;Lo;0;L;;;;;N;;;;; +FA24;CJK COMPATIBILITY IDEOGRAPH-FA24;Lo;0;L;;;;;N;;;;; +FA25;CJK COMPATIBILITY IDEOGRAPH-FA25;Lo;0;L;9038;;;;N;;;;; +FA26;CJK COMPATIBILITY IDEOGRAPH-FA26;Lo;0;L;90FD;;;;N;;;;; +FA27;CJK COMPATIBILITY IDEOGRAPH-FA27;Lo;0;L;;;;;N;;;;; +FA28;CJK COMPATIBILITY IDEOGRAPH-FA28;Lo;0;L;;;;;N;;;;; +FA29;CJK COMPATIBILITY IDEOGRAPH-FA29;Lo;0;L;;;;;N;;;;; +FA2A;CJK COMPATIBILITY IDEOGRAPH-FA2A;Lo;0;L;98EF;;;;N;;;;; +FA2B;CJK COMPATIBILITY IDEOGRAPH-FA2B;Lo;0;L;98FC;;;;N;;;;; +FA2C;CJK COMPATIBILITY IDEOGRAPH-FA2C;Lo;0;L;9928;;;;N;;;;; +FA2D;CJK COMPATIBILITY IDEOGRAPH-FA2D;Lo;0;L;9DB4;;;;N;;;;; +FA2E;CJK COMPATIBILITY IDEOGRAPH-FA2E;Lo;0;L;90DE;;;;N;;;;; +FA2F;CJK COMPATIBILITY IDEOGRAPH-FA2F;Lo;0;L;96B7;;;;N;;;;; +FA30;CJK COMPATIBILITY IDEOGRAPH-FA30;Lo;0;L;4FAE;;;;N;;;;; +FA31;CJK COMPATIBILITY IDEOGRAPH-FA31;Lo;0;L;50E7;;;;N;;;;; +FA32;CJK COMPATIBILITY IDEOGRAPH-FA32;Lo;0;L;514D;;;;N;;;;; +FA33;CJK COMPATIBILITY IDEOGRAPH-FA33;Lo;0;L;52C9;;;;N;;;;; +FA34;CJK COMPATIBILITY IDEOGRAPH-FA34;Lo;0;L;52E4;;;;N;;;;; +FA35;CJK COMPATIBILITY IDEOGRAPH-FA35;Lo;0;L;5351;;;;N;;;;; +FA36;CJK COMPATIBILITY IDEOGRAPH-FA36;Lo;0;L;559D;;;;N;;;;; +FA37;CJK COMPATIBILITY IDEOGRAPH-FA37;Lo;0;L;5606;;;;N;;;;; +FA38;CJK COMPATIBILITY IDEOGRAPH-FA38;Lo;0;L;5668;;;;N;;;;; +FA39;CJK COMPATIBILITY IDEOGRAPH-FA39;Lo;0;L;5840;;;;N;;;;; +FA3A;CJK COMPATIBILITY IDEOGRAPH-FA3A;Lo;0;L;58A8;;;;N;;;;; +FA3B;CJK COMPATIBILITY IDEOGRAPH-FA3B;Lo;0;L;5C64;;;;N;;;;; +FA3C;CJK COMPATIBILITY IDEOGRAPH-FA3C;Lo;0;L;5C6E;;;;N;;;;; +FA3D;CJK COMPATIBILITY IDEOGRAPH-FA3D;Lo;0;L;6094;;;;N;;;;; +FA3E;CJK COMPATIBILITY IDEOGRAPH-FA3E;Lo;0;L;6168;;;;N;;;;; +FA3F;CJK COMPATIBILITY IDEOGRAPH-FA3F;Lo;0;L;618E;;;;N;;;;; +FA40;CJK COMPATIBILITY IDEOGRAPH-FA40;Lo;0;L;61F2;;;;N;;;;; +FA41;CJK COMPATIBILITY IDEOGRAPH-FA41;Lo;0;L;654F;;;;N;;;;; +FA42;CJK COMPATIBILITY IDEOGRAPH-FA42;Lo;0;L;65E2;;;;N;;;;; +FA43;CJK COMPATIBILITY IDEOGRAPH-FA43;Lo;0;L;6691;;;;N;;;;; +FA44;CJK COMPATIBILITY IDEOGRAPH-FA44;Lo;0;L;6885;;;;N;;;;; +FA45;CJK COMPATIBILITY IDEOGRAPH-FA45;Lo;0;L;6D77;;;;N;;;;; +FA46;CJK COMPATIBILITY IDEOGRAPH-FA46;Lo;0;L;6E1A;;;;N;;;;; +FA47;CJK COMPATIBILITY IDEOGRAPH-FA47;Lo;0;L;6F22;;;;N;;;;; +FA48;CJK COMPATIBILITY IDEOGRAPH-FA48;Lo;0;L;716E;;;;N;;;;; +FA49;CJK COMPATIBILITY IDEOGRAPH-FA49;Lo;0;L;722B;;;;N;;;;; +FA4A;CJK COMPATIBILITY IDEOGRAPH-FA4A;Lo;0;L;7422;;;;N;;;;; +FA4B;CJK COMPATIBILITY IDEOGRAPH-FA4B;Lo;0;L;7891;;;;N;;;;; +FA4C;CJK COMPATIBILITY IDEOGRAPH-FA4C;Lo;0;L;793E;;;;N;;;;; +FA4D;CJK COMPATIBILITY IDEOGRAPH-FA4D;Lo;0;L;7949;;;;N;;;;; +FA4E;CJK COMPATIBILITY IDEOGRAPH-FA4E;Lo;0;L;7948;;;;N;;;;; +FA4F;CJK COMPATIBILITY IDEOGRAPH-FA4F;Lo;0;L;7950;;;;N;;;;; +FA50;CJK COMPATIBILITY IDEOGRAPH-FA50;Lo;0;L;7956;;;;N;;;;; +FA51;CJK COMPATIBILITY IDEOGRAPH-FA51;Lo;0;L;795D;;;;N;;;;; +FA52;CJK COMPATIBILITY IDEOGRAPH-FA52;Lo;0;L;798D;;;;N;;;;; +FA53;CJK COMPATIBILITY IDEOGRAPH-FA53;Lo;0;L;798E;;;;N;;;;; +FA54;CJK COMPATIBILITY IDEOGRAPH-FA54;Lo;0;L;7A40;;;;N;;;;; +FA55;CJK COMPATIBILITY IDEOGRAPH-FA55;Lo;0;L;7A81;;;;N;;;;; +FA56;CJK COMPATIBILITY IDEOGRAPH-FA56;Lo;0;L;7BC0;;;;N;;;;; +FA57;CJK COMPATIBILITY IDEOGRAPH-FA57;Lo;0;L;7DF4;;;;N;;;;; +FA58;CJK COMPATIBILITY IDEOGRAPH-FA58;Lo;0;L;7E09;;;;N;;;;; +FA59;CJK COMPATIBILITY IDEOGRAPH-FA59;Lo;0;L;7E41;;;;N;;;;; +FA5A;CJK COMPATIBILITY IDEOGRAPH-FA5A;Lo;0;L;7F72;;;;N;;;;; +FA5B;CJK COMPATIBILITY IDEOGRAPH-FA5B;Lo;0;L;8005;;;;N;;;;; +FA5C;CJK COMPATIBILITY IDEOGRAPH-FA5C;Lo;0;L;81ED;;;;N;;;;; +FA5D;CJK COMPATIBILITY IDEOGRAPH-FA5D;Lo;0;L;8279;;;;N;;;;; +FA5E;CJK COMPATIBILITY IDEOGRAPH-FA5E;Lo;0;L;8279;;;;N;;;;; +FA5F;CJK COMPATIBILITY IDEOGRAPH-FA5F;Lo;0;L;8457;;;;N;;;;; +FA60;CJK COMPATIBILITY IDEOGRAPH-FA60;Lo;0;L;8910;;;;N;;;;; +FA61;CJK COMPATIBILITY IDEOGRAPH-FA61;Lo;0;L;8996;;;;N;;;;; +FA62;CJK COMPATIBILITY IDEOGRAPH-FA62;Lo;0;L;8B01;;;;N;;;;; +FA63;CJK COMPATIBILITY IDEOGRAPH-FA63;Lo;0;L;8B39;;;;N;;;;; +FA64;CJK COMPATIBILITY IDEOGRAPH-FA64;Lo;0;L;8CD3;;;;N;;;;; +FA65;CJK COMPATIBILITY IDEOGRAPH-FA65;Lo;0;L;8D08;;;;N;;;;; +FA66;CJK COMPATIBILITY IDEOGRAPH-FA66;Lo;0;L;8FB6;;;;N;;;;; +FA67;CJK COMPATIBILITY IDEOGRAPH-FA67;Lo;0;L;9038;;;;N;;;;; +FA68;CJK COMPATIBILITY IDEOGRAPH-FA68;Lo;0;L;96E3;;;;N;;;;; +FA69;CJK COMPATIBILITY IDEOGRAPH-FA69;Lo;0;L;97FF;;;;N;;;;; +FA6A;CJK COMPATIBILITY IDEOGRAPH-FA6A;Lo;0;L;983B;;;;N;;;;; +FA6B;CJK COMPATIBILITY IDEOGRAPH-FA6B;Lo;0;L;6075;;;;N;;;;; +FA6C;CJK COMPATIBILITY IDEOGRAPH-FA6C;Lo;0;L;242EE;;;;N;;;;; +FA6D;CJK COMPATIBILITY IDEOGRAPH-FA6D;Lo;0;L;8218;;;;N;;;;; +FA70;CJK COMPATIBILITY IDEOGRAPH-FA70;Lo;0;L;4E26;;;;N;;;;; +FA71;CJK COMPATIBILITY IDEOGRAPH-FA71;Lo;0;L;51B5;;;;N;;;;; +FA72;CJK COMPATIBILITY IDEOGRAPH-FA72;Lo;0;L;5168;;;;N;;;;; +FA73;CJK COMPATIBILITY IDEOGRAPH-FA73;Lo;0;L;4F80;;;;N;;;;; +FA74;CJK COMPATIBILITY IDEOGRAPH-FA74;Lo;0;L;5145;;;;N;;;;; +FA75;CJK COMPATIBILITY IDEOGRAPH-FA75;Lo;0;L;5180;;;;N;;;;; +FA76;CJK COMPATIBILITY IDEOGRAPH-FA76;Lo;0;L;52C7;;;;N;;;;; +FA77;CJK COMPATIBILITY IDEOGRAPH-FA77;Lo;0;L;52FA;;;;N;;;;; +FA78;CJK COMPATIBILITY IDEOGRAPH-FA78;Lo;0;L;559D;;;;N;;;;; +FA79;CJK COMPATIBILITY IDEOGRAPH-FA79;Lo;0;L;5555;;;;N;;;;; +FA7A;CJK COMPATIBILITY IDEOGRAPH-FA7A;Lo;0;L;5599;;;;N;;;;; +FA7B;CJK COMPATIBILITY IDEOGRAPH-FA7B;Lo;0;L;55E2;;;;N;;;;; +FA7C;CJK COMPATIBILITY IDEOGRAPH-FA7C;Lo;0;L;585A;;;;N;;;;; +FA7D;CJK COMPATIBILITY IDEOGRAPH-FA7D;Lo;0;L;58B3;;;;N;;;;; +FA7E;CJK COMPATIBILITY IDEOGRAPH-FA7E;Lo;0;L;5944;;;;N;;;;; +FA7F;CJK COMPATIBILITY IDEOGRAPH-FA7F;Lo;0;L;5954;;;;N;;;;; +FA80;CJK COMPATIBILITY IDEOGRAPH-FA80;Lo;0;L;5A62;;;;N;;;;; +FA81;CJK COMPATIBILITY IDEOGRAPH-FA81;Lo;0;L;5B28;;;;N;;;;; +FA82;CJK COMPATIBILITY IDEOGRAPH-FA82;Lo;0;L;5ED2;;;;N;;;;; +FA83;CJK COMPATIBILITY IDEOGRAPH-FA83;Lo;0;L;5ED9;;;;N;;;;; +FA84;CJK COMPATIBILITY IDEOGRAPH-FA84;Lo;0;L;5F69;;;;N;;;;; +FA85;CJK COMPATIBILITY IDEOGRAPH-FA85;Lo;0;L;5FAD;;;;N;;;;; +FA86;CJK COMPATIBILITY IDEOGRAPH-FA86;Lo;0;L;60D8;;;;N;;;;; +FA87;CJK COMPATIBILITY IDEOGRAPH-FA87;Lo;0;L;614E;;;;N;;;;; +FA88;CJK COMPATIBILITY IDEOGRAPH-FA88;Lo;0;L;6108;;;;N;;;;; +FA89;CJK COMPATIBILITY IDEOGRAPH-FA89;Lo;0;L;618E;;;;N;;;;; +FA8A;CJK COMPATIBILITY IDEOGRAPH-FA8A;Lo;0;L;6160;;;;N;;;;; +FA8B;CJK COMPATIBILITY IDEOGRAPH-FA8B;Lo;0;L;61F2;;;;N;;;;; +FA8C;CJK COMPATIBILITY IDEOGRAPH-FA8C;Lo;0;L;6234;;;;N;;;;; +FA8D;CJK COMPATIBILITY IDEOGRAPH-FA8D;Lo;0;L;63C4;;;;N;;;;; +FA8E;CJK COMPATIBILITY IDEOGRAPH-FA8E;Lo;0;L;641C;;;;N;;;;; +FA8F;CJK COMPATIBILITY IDEOGRAPH-FA8F;Lo;0;L;6452;;;;N;;;;; +FA90;CJK COMPATIBILITY IDEOGRAPH-FA90;Lo;0;L;6556;;;;N;;;;; +FA91;CJK COMPATIBILITY IDEOGRAPH-FA91;Lo;0;L;6674;;;;N;;;;; +FA92;CJK COMPATIBILITY IDEOGRAPH-FA92;Lo;0;L;6717;;;;N;;;;; +FA93;CJK COMPATIBILITY IDEOGRAPH-FA93;Lo;0;L;671B;;;;N;;;;; +FA94;CJK COMPATIBILITY IDEOGRAPH-FA94;Lo;0;L;6756;;;;N;;;;; +FA95;CJK COMPATIBILITY IDEOGRAPH-FA95;Lo;0;L;6B79;;;;N;;;;; +FA96;CJK COMPATIBILITY IDEOGRAPH-FA96;Lo;0;L;6BBA;;;;N;;;;; +FA97;CJK COMPATIBILITY IDEOGRAPH-FA97;Lo;0;L;6D41;;;;N;;;;; +FA98;CJK COMPATIBILITY IDEOGRAPH-FA98;Lo;0;L;6EDB;;;;N;;;;; +FA99;CJK COMPATIBILITY IDEOGRAPH-FA99;Lo;0;L;6ECB;;;;N;;;;; +FA9A;CJK COMPATIBILITY IDEOGRAPH-FA9A;Lo;0;L;6F22;;;;N;;;;; +FA9B;CJK COMPATIBILITY IDEOGRAPH-FA9B;Lo;0;L;701E;;;;N;;;;; +FA9C;CJK COMPATIBILITY IDEOGRAPH-FA9C;Lo;0;L;716E;;;;N;;;;; +FA9D;CJK COMPATIBILITY IDEOGRAPH-FA9D;Lo;0;L;77A7;;;;N;;;;; +FA9E;CJK COMPATIBILITY IDEOGRAPH-FA9E;Lo;0;L;7235;;;;N;;;;; +FA9F;CJK COMPATIBILITY IDEOGRAPH-FA9F;Lo;0;L;72AF;;;;N;;;;; +FAA0;CJK COMPATIBILITY IDEOGRAPH-FAA0;Lo;0;L;732A;;;;N;;;;; +FAA1;CJK COMPATIBILITY IDEOGRAPH-FAA1;Lo;0;L;7471;;;;N;;;;; +FAA2;CJK COMPATIBILITY IDEOGRAPH-FAA2;Lo;0;L;7506;;;;N;;;;; +FAA3;CJK COMPATIBILITY IDEOGRAPH-FAA3;Lo;0;L;753B;;;;N;;;;; +FAA4;CJK COMPATIBILITY IDEOGRAPH-FAA4;Lo;0;L;761D;;;;N;;;;; +FAA5;CJK COMPATIBILITY IDEOGRAPH-FAA5;Lo;0;L;761F;;;;N;;;;; +FAA6;CJK COMPATIBILITY IDEOGRAPH-FAA6;Lo;0;L;76CA;;;;N;;;;; +FAA7;CJK COMPATIBILITY IDEOGRAPH-FAA7;Lo;0;L;76DB;;;;N;;;;; +FAA8;CJK COMPATIBILITY IDEOGRAPH-FAA8;Lo;0;L;76F4;;;;N;;;;; +FAA9;CJK COMPATIBILITY IDEOGRAPH-FAA9;Lo;0;L;774A;;;;N;;;;; +FAAA;CJK COMPATIBILITY IDEOGRAPH-FAAA;Lo;0;L;7740;;;;N;;;;; +FAAB;CJK COMPATIBILITY IDEOGRAPH-FAAB;Lo;0;L;78CC;;;;N;;;;; +FAAC;CJK COMPATIBILITY IDEOGRAPH-FAAC;Lo;0;L;7AB1;;;;N;;;;; +FAAD;CJK COMPATIBILITY IDEOGRAPH-FAAD;Lo;0;L;7BC0;;;;N;;;;; +FAAE;CJK COMPATIBILITY IDEOGRAPH-FAAE;Lo;0;L;7C7B;;;;N;;;;; +FAAF;CJK COMPATIBILITY IDEOGRAPH-FAAF;Lo;0;L;7D5B;;;;N;;;;; +FAB0;CJK COMPATIBILITY IDEOGRAPH-FAB0;Lo;0;L;7DF4;;;;N;;;;; +FAB1;CJK COMPATIBILITY IDEOGRAPH-FAB1;Lo;0;L;7F3E;;;;N;;;;; +FAB2;CJK COMPATIBILITY IDEOGRAPH-FAB2;Lo;0;L;8005;;;;N;;;;; +FAB3;CJK COMPATIBILITY IDEOGRAPH-FAB3;Lo;0;L;8352;;;;N;;;;; +FAB4;CJK COMPATIBILITY IDEOGRAPH-FAB4;Lo;0;L;83EF;;;;N;;;;; +FAB5;CJK COMPATIBILITY IDEOGRAPH-FAB5;Lo;0;L;8779;;;;N;;;;; +FAB6;CJK COMPATIBILITY IDEOGRAPH-FAB6;Lo;0;L;8941;;;;N;;;;; +FAB7;CJK COMPATIBILITY IDEOGRAPH-FAB7;Lo;0;L;8986;;;;N;;;;; +FAB8;CJK COMPATIBILITY IDEOGRAPH-FAB8;Lo;0;L;8996;;;;N;;;;; +FAB9;CJK COMPATIBILITY IDEOGRAPH-FAB9;Lo;0;L;8ABF;;;;N;;;;; +FABA;CJK COMPATIBILITY IDEOGRAPH-FABA;Lo;0;L;8AF8;;;;N;;;;; +FABB;CJK COMPATIBILITY IDEOGRAPH-FABB;Lo;0;L;8ACB;;;;N;;;;; +FABC;CJK COMPATIBILITY IDEOGRAPH-FABC;Lo;0;L;8B01;;;;N;;;;; +FABD;CJK COMPATIBILITY IDEOGRAPH-FABD;Lo;0;L;8AFE;;;;N;;;;; +FABE;CJK COMPATIBILITY IDEOGRAPH-FABE;Lo;0;L;8AED;;;;N;;;;; +FABF;CJK COMPATIBILITY IDEOGRAPH-FABF;Lo;0;L;8B39;;;;N;;;;; +FAC0;CJK COMPATIBILITY IDEOGRAPH-FAC0;Lo;0;L;8B8A;;;;N;;;;; +FAC1;CJK COMPATIBILITY IDEOGRAPH-FAC1;Lo;0;L;8D08;;;;N;;;;; +FAC2;CJK COMPATIBILITY IDEOGRAPH-FAC2;Lo;0;L;8F38;;;;N;;;;; +FAC3;CJK COMPATIBILITY IDEOGRAPH-FAC3;Lo;0;L;9072;;;;N;;;;; +FAC4;CJK COMPATIBILITY IDEOGRAPH-FAC4;Lo;0;L;9199;;;;N;;;;; +FAC5;CJK COMPATIBILITY IDEOGRAPH-FAC5;Lo;0;L;9276;;;;N;;;;; +FAC6;CJK COMPATIBILITY IDEOGRAPH-FAC6;Lo;0;L;967C;;;;N;;;;; +FAC7;CJK COMPATIBILITY IDEOGRAPH-FAC7;Lo;0;L;96E3;;;;N;;;;; +FAC8;CJK COMPATIBILITY IDEOGRAPH-FAC8;Lo;0;L;9756;;;;N;;;;; +FAC9;CJK COMPATIBILITY IDEOGRAPH-FAC9;Lo;0;L;97DB;;;;N;;;;; +FACA;CJK COMPATIBILITY IDEOGRAPH-FACA;Lo;0;L;97FF;;;;N;;;;; +FACB;CJK COMPATIBILITY IDEOGRAPH-FACB;Lo;0;L;980B;;;;N;;;;; +FACC;CJK COMPATIBILITY IDEOGRAPH-FACC;Lo;0;L;983B;;;;N;;;;; +FACD;CJK COMPATIBILITY IDEOGRAPH-FACD;Lo;0;L;9B12;;;;N;;;;; +FACE;CJK COMPATIBILITY IDEOGRAPH-FACE;Lo;0;L;9F9C;;;;N;;;;; +FACF;CJK COMPATIBILITY IDEOGRAPH-FACF;Lo;0;L;2284A;;;;N;;;;; +FAD0;CJK COMPATIBILITY IDEOGRAPH-FAD0;Lo;0;L;22844;;;;N;;;;; +FAD1;CJK COMPATIBILITY IDEOGRAPH-FAD1;Lo;0;L;233D5;;;;N;;;;; +FAD2;CJK COMPATIBILITY IDEOGRAPH-FAD2;Lo;0;L;3B9D;;;;N;;;;; +FAD3;CJK COMPATIBILITY IDEOGRAPH-FAD3;Lo;0;L;4018;;;;N;;;;; +FAD4;CJK COMPATIBILITY IDEOGRAPH-FAD4;Lo;0;L;4039;;;;N;;;;; +FAD5;CJK COMPATIBILITY IDEOGRAPH-FAD5;Lo;0;L;25249;;;;N;;;;; +FAD6;CJK COMPATIBILITY IDEOGRAPH-FAD6;Lo;0;L;25CD0;;;;N;;;;; +FAD7;CJK COMPATIBILITY IDEOGRAPH-FAD7;Lo;0;L;27ED3;;;;N;;;;; +FAD8;CJK COMPATIBILITY IDEOGRAPH-FAD8;Lo;0;L;9F43;;;;N;;;;; +FAD9;CJK COMPATIBILITY IDEOGRAPH-FAD9;Lo;0;L;9F8E;;;;N;;;;; +FB00;LATIN SMALL LIGATURE FF;Ll;0;L; 0066 0066;;;;N;;;;; +FB01;LATIN SMALL LIGATURE FI;Ll;0;L; 0066 0069;;;;N;;;;; +FB02;LATIN SMALL LIGATURE FL;Ll;0;L; 0066 006C;;;;N;;;;; +FB03;LATIN SMALL LIGATURE FFI;Ll;0;L; 0066 0066 0069;;;;N;;;;; +FB04;LATIN SMALL LIGATURE FFL;Ll;0;L; 0066 0066 006C;;;;N;;;;; +FB05;LATIN SMALL LIGATURE LONG S T;Ll;0;L; 017F 0074;;;;N;;;;; +FB06;LATIN SMALL LIGATURE ST;Ll;0;L; 0073 0074;;;;N;;;;; +FB13;ARMENIAN SMALL LIGATURE MEN NOW;Ll;0;L; 0574 0576;;;;N;;;;; +FB14;ARMENIAN SMALL LIGATURE MEN ECH;Ll;0;L; 0574 0565;;;;N;;;;; +FB15;ARMENIAN SMALL LIGATURE MEN INI;Ll;0;L; 0574 056B;;;;N;;;;; +FB16;ARMENIAN SMALL LIGATURE VEW NOW;Ll;0;L; 057E 0576;;;;N;;;;; +FB17;ARMENIAN SMALL LIGATURE MEN XEH;Ll;0;L; 0574 056D;;;;N;;;;; +FB1D;HEBREW LETTER YOD WITH HIRIQ;Lo;0;R;05D9 05B4;;;;N;;;;; +FB1E;HEBREW POINT JUDEO-SPANISH VARIKA;Mn;26;NSM;;;;;N;HEBREW POINT VARIKA;;;; +FB1F;HEBREW LIGATURE YIDDISH YOD YOD PATAH;Lo;0;R;05F2 05B7;;;;N;;;;; +FB20;HEBREW LETTER ALTERNATIVE AYIN;Lo;0;R; 05E2;;;;N;;;;; +FB21;HEBREW LETTER WIDE ALEF;Lo;0;R; 05D0;;;;N;;;;; +FB22;HEBREW LETTER WIDE DALET;Lo;0;R; 05D3;;;;N;;;;; +FB23;HEBREW LETTER WIDE HE;Lo;0;R; 05D4;;;;N;;;;; +FB24;HEBREW LETTER WIDE KAF;Lo;0;R; 05DB;;;;N;;;;; +FB25;HEBREW LETTER WIDE LAMED;Lo;0;R; 05DC;;;;N;;;;; +FB26;HEBREW LETTER WIDE FINAL MEM;Lo;0;R; 05DD;;;;N;;;;; +FB27;HEBREW LETTER WIDE RESH;Lo;0;R; 05E8;;;;N;;;;; +FB28;HEBREW LETTER WIDE TAV;Lo;0;R; 05EA;;;;N;;;;; +FB29;HEBREW LETTER ALTERNATIVE PLUS SIGN;Sm;0;ES; 002B;;;;N;;;;; +FB2A;HEBREW LETTER SHIN WITH SHIN DOT;Lo;0;R;05E9 05C1;;;;N;;;;; +FB2B;HEBREW LETTER SHIN WITH SIN DOT;Lo;0;R;05E9 05C2;;;;N;;;;; +FB2C;HEBREW LETTER SHIN WITH DAGESH AND SHIN DOT;Lo;0;R;FB49 05C1;;;;N;;;;; +FB2D;HEBREW LETTER SHIN WITH DAGESH AND SIN DOT;Lo;0;R;FB49 05C2;;;;N;;;;; +FB2E;HEBREW LETTER ALEF WITH PATAH;Lo;0;R;05D0 05B7;;;;N;;;;; +FB2F;HEBREW LETTER ALEF WITH QAMATS;Lo;0;R;05D0 05B8;;;;N;;;;; +FB30;HEBREW LETTER ALEF WITH MAPIQ;Lo;0;R;05D0 05BC;;;;N;;;;; +FB31;HEBREW LETTER BET WITH DAGESH;Lo;0;R;05D1 05BC;;;;N;;;;; +FB32;HEBREW LETTER GIMEL WITH DAGESH;Lo;0;R;05D2 05BC;;;;N;;;;; +FB33;HEBREW LETTER DALET WITH DAGESH;Lo;0;R;05D3 05BC;;;;N;;;;; +FB34;HEBREW LETTER HE WITH MAPIQ;Lo;0;R;05D4 05BC;;;;N;;;;; +FB35;HEBREW LETTER VAV WITH DAGESH;Lo;0;R;05D5 05BC;;;;N;;;;; +FB36;HEBREW LETTER ZAYIN WITH DAGESH;Lo;0;R;05D6 05BC;;;;N;;;;; +FB38;HEBREW LETTER TET WITH DAGESH;Lo;0;R;05D8 05BC;;;;N;;;;; +FB39;HEBREW LETTER YOD WITH DAGESH;Lo;0;R;05D9 05BC;;;;N;;;;; +FB3A;HEBREW LETTER FINAL KAF WITH DAGESH;Lo;0;R;05DA 05BC;;;;N;;;;; +FB3B;HEBREW LETTER KAF WITH DAGESH;Lo;0;R;05DB 05BC;;;;N;;;;; +FB3C;HEBREW LETTER LAMED WITH DAGESH;Lo;0;R;05DC 05BC;;;;N;;;;; +FB3E;HEBREW LETTER MEM WITH DAGESH;Lo;0;R;05DE 05BC;;;;N;;;;; +FB40;HEBREW LETTER NUN WITH DAGESH;Lo;0;R;05E0 05BC;;;;N;;;;; +FB41;HEBREW LETTER SAMEKH WITH DAGESH;Lo;0;R;05E1 05BC;;;;N;;;;; +FB43;HEBREW LETTER FINAL PE WITH DAGESH;Lo;0;R;05E3 05BC;;;;N;;;;; +FB44;HEBREW LETTER PE WITH DAGESH;Lo;0;R;05E4 05BC;;;;N;;;;; +FB46;HEBREW LETTER TSADI WITH DAGESH;Lo;0;R;05E6 05BC;;;;N;;;;; +FB47;HEBREW LETTER QOF WITH DAGESH;Lo;0;R;05E7 05BC;;;;N;;;;; +FB48;HEBREW LETTER RESH WITH DAGESH;Lo;0;R;05E8 05BC;;;;N;;;;; +FB49;HEBREW LETTER SHIN WITH DAGESH;Lo;0;R;05E9 05BC;;;;N;;;;; +FB4A;HEBREW LETTER TAV WITH DAGESH;Lo;0;R;05EA 05BC;;;;N;;;;; +FB4B;HEBREW LETTER VAV WITH HOLAM;Lo;0;R;05D5 05B9;;;;N;;;;; +FB4C;HEBREW LETTER BET WITH RAFE;Lo;0;R;05D1 05BF;;;;N;;;;; +FB4D;HEBREW LETTER KAF WITH RAFE;Lo;0;R;05DB 05BF;;;;N;;;;; +FB4E;HEBREW LETTER PE WITH RAFE;Lo;0;R;05E4 05BF;;;;N;;;;; +FB4F;HEBREW LIGATURE ALEF LAMED;Lo;0;R; 05D0 05DC;;;;N;;;;; +FB50;ARABIC LETTER ALEF WASLA ISOLATED FORM;Lo;0;AL; 0671;;;;N;;;;; +FB51;ARABIC LETTER ALEF WASLA FINAL FORM;Lo;0;AL; 0671;;;;N;;;;; +FB52;ARABIC LETTER BEEH ISOLATED FORM;Lo;0;AL; 067B;;;;N;;;;; +FB53;ARABIC LETTER BEEH FINAL FORM;Lo;0;AL; 067B;;;;N;;;;; +FB54;ARABIC LETTER BEEH INITIAL FORM;Lo;0;AL; 067B;;;;N;;;;; +FB55;ARABIC LETTER BEEH MEDIAL FORM;Lo;0;AL; 067B;;;;N;;;;; +FB56;ARABIC LETTER PEH ISOLATED FORM;Lo;0;AL; 067E;;;;N;;;;; +FB57;ARABIC LETTER PEH FINAL FORM;Lo;0;AL; 067E;;;;N;;;;; +FB58;ARABIC LETTER PEH INITIAL FORM;Lo;0;AL; 067E;;;;N;;;;; +FB59;ARABIC LETTER PEH MEDIAL FORM;Lo;0;AL; 067E;;;;N;;;;; +FB5A;ARABIC LETTER BEHEH ISOLATED FORM;Lo;0;AL; 0680;;;;N;;;;; +FB5B;ARABIC LETTER BEHEH FINAL FORM;Lo;0;AL; 0680;;;;N;;;;; +FB5C;ARABIC LETTER BEHEH INITIAL FORM;Lo;0;AL; 0680;;;;N;;;;; +FB5D;ARABIC LETTER BEHEH MEDIAL FORM;Lo;0;AL; 0680;;;;N;;;;; +FB5E;ARABIC LETTER TTEHEH ISOLATED FORM;Lo;0;AL; 067A;;;;N;;;;; +FB5F;ARABIC LETTER TTEHEH FINAL FORM;Lo;0;AL; 067A;;;;N;;;;; +FB60;ARABIC LETTER TTEHEH INITIAL FORM;Lo;0;AL; 067A;;;;N;;;;; +FB61;ARABIC LETTER TTEHEH MEDIAL FORM;Lo;0;AL; 067A;;;;N;;;;; +FB62;ARABIC LETTER TEHEH ISOLATED FORM;Lo;0;AL; 067F;;;;N;;;;; +FB63;ARABIC LETTER TEHEH FINAL FORM;Lo;0;AL; 067F;;;;N;;;;; +FB64;ARABIC LETTER TEHEH INITIAL FORM;Lo;0;AL; 067F;;;;N;;;;; +FB65;ARABIC LETTER TEHEH MEDIAL FORM;Lo;0;AL; 067F;;;;N;;;;; +FB66;ARABIC LETTER TTEH ISOLATED FORM;Lo;0;AL; 0679;;;;N;;;;; +FB67;ARABIC LETTER TTEH FINAL FORM;Lo;0;AL; 0679;;;;N;;;;; +FB68;ARABIC LETTER TTEH INITIAL FORM;Lo;0;AL; 0679;;;;N;;;;; +FB69;ARABIC LETTER TTEH MEDIAL FORM;Lo;0;AL; 0679;;;;N;;;;; +FB6A;ARABIC LETTER VEH ISOLATED FORM;Lo;0;AL; 06A4;;;;N;;;;; +FB6B;ARABIC LETTER VEH FINAL FORM;Lo;0;AL; 06A4;;;;N;;;;; +FB6C;ARABIC LETTER VEH INITIAL FORM;Lo;0;AL; 06A4;;;;N;;;;; +FB6D;ARABIC LETTER VEH MEDIAL FORM;Lo;0;AL; 06A4;;;;N;;;;; +FB6E;ARABIC LETTER PEHEH ISOLATED FORM;Lo;0;AL; 06A6;;;;N;;;;; +FB6F;ARABIC LETTER PEHEH FINAL FORM;Lo;0;AL; 06A6;;;;N;;;;; +FB70;ARABIC LETTER PEHEH INITIAL FORM;Lo;0;AL; 06A6;;;;N;;;;; +FB71;ARABIC LETTER PEHEH MEDIAL FORM;Lo;0;AL; 06A6;;;;N;;;;; +FB72;ARABIC LETTER DYEH ISOLATED FORM;Lo;0;AL; 0684;;;;N;;;;; +FB73;ARABIC LETTER DYEH FINAL FORM;Lo;0;AL; 0684;;;;N;;;;; +FB74;ARABIC LETTER DYEH INITIAL FORM;Lo;0;AL; 0684;;;;N;;;;; +FB75;ARABIC LETTER DYEH MEDIAL FORM;Lo;0;AL; 0684;;;;N;;;;; +FB76;ARABIC LETTER NYEH ISOLATED FORM;Lo;0;AL; 0683;;;;N;;;;; +FB77;ARABIC LETTER NYEH FINAL FORM;Lo;0;AL; 0683;;;;N;;;;; +FB78;ARABIC LETTER NYEH INITIAL FORM;Lo;0;AL; 0683;;;;N;;;;; +FB79;ARABIC LETTER NYEH MEDIAL FORM;Lo;0;AL; 0683;;;;N;;;;; +FB7A;ARABIC LETTER TCHEH ISOLATED FORM;Lo;0;AL; 0686;;;;N;;;;; +FB7B;ARABIC LETTER TCHEH FINAL FORM;Lo;0;AL; 0686;;;;N;;;;; +FB7C;ARABIC LETTER TCHEH INITIAL FORM;Lo;0;AL; 0686;;;;N;;;;; +FB7D;ARABIC LETTER TCHEH MEDIAL FORM;Lo;0;AL; 0686;;;;N;;;;; +FB7E;ARABIC LETTER TCHEHEH ISOLATED FORM;Lo;0;AL; 0687;;;;N;;;;; +FB7F;ARABIC LETTER TCHEHEH FINAL FORM;Lo;0;AL; 0687;;;;N;;;;; +FB80;ARABIC LETTER TCHEHEH INITIAL FORM;Lo;0;AL; 0687;;;;N;;;;; +FB81;ARABIC LETTER TCHEHEH MEDIAL FORM;Lo;0;AL; 0687;;;;N;;;;; +FB82;ARABIC LETTER DDAHAL ISOLATED FORM;Lo;0;AL; 068D;;;;N;;;;; +FB83;ARABIC LETTER DDAHAL FINAL FORM;Lo;0;AL; 068D;;;;N;;;;; +FB84;ARABIC LETTER DAHAL ISOLATED FORM;Lo;0;AL; 068C;;;;N;;;;; +FB85;ARABIC LETTER DAHAL FINAL FORM;Lo;0;AL; 068C;;;;N;;;;; +FB86;ARABIC LETTER DUL ISOLATED FORM;Lo;0;AL; 068E;;;;N;;;;; +FB87;ARABIC LETTER DUL FINAL FORM;Lo;0;AL; 068E;;;;N;;;;; +FB88;ARABIC LETTER DDAL ISOLATED FORM;Lo;0;AL; 0688;;;;N;;;;; +FB89;ARABIC LETTER DDAL FINAL FORM;Lo;0;AL; 0688;;;;N;;;;; +FB8A;ARABIC LETTER JEH ISOLATED FORM;Lo;0;AL; 0698;;;;N;;;;; +FB8B;ARABIC LETTER JEH FINAL FORM;Lo;0;AL; 0698;;;;N;;;;; +FB8C;ARABIC LETTER RREH ISOLATED FORM;Lo;0;AL; 0691;;;;N;;;;; +FB8D;ARABIC LETTER RREH FINAL FORM;Lo;0;AL; 0691;;;;N;;;;; +FB8E;ARABIC LETTER KEHEH ISOLATED FORM;Lo;0;AL; 06A9;;;;N;;;;; +FB8F;ARABIC LETTER KEHEH FINAL FORM;Lo;0;AL; 06A9;;;;N;;;;; +FB90;ARABIC LETTER KEHEH INITIAL FORM;Lo;0;AL; 06A9;;;;N;;;;; +FB91;ARABIC LETTER KEHEH MEDIAL FORM;Lo;0;AL; 06A9;;;;N;;;;; +FB92;ARABIC LETTER GAF ISOLATED FORM;Lo;0;AL; 06AF;;;;N;;;;; +FB93;ARABIC LETTER GAF FINAL FORM;Lo;0;AL; 06AF;;;;N;;;;; +FB94;ARABIC LETTER GAF INITIAL FORM;Lo;0;AL; 06AF;;;;N;;;;; +FB95;ARABIC LETTER GAF MEDIAL FORM;Lo;0;AL; 06AF;;;;N;;;;; +FB96;ARABIC LETTER GUEH ISOLATED FORM;Lo;0;AL; 06B3;;;;N;;;;; +FB97;ARABIC LETTER GUEH FINAL FORM;Lo;0;AL; 06B3;;;;N;;;;; +FB98;ARABIC LETTER GUEH INITIAL FORM;Lo;0;AL; 06B3;;;;N;;;;; +FB99;ARABIC LETTER GUEH MEDIAL FORM;Lo;0;AL; 06B3;;;;N;;;;; +FB9A;ARABIC LETTER NGOEH ISOLATED FORM;Lo;0;AL; 06B1;;;;N;;;;; +FB9B;ARABIC LETTER NGOEH FINAL FORM;Lo;0;AL; 06B1;;;;N;;;;; +FB9C;ARABIC LETTER NGOEH INITIAL FORM;Lo;0;AL; 06B1;;;;N;;;;; +FB9D;ARABIC LETTER NGOEH MEDIAL FORM;Lo;0;AL; 06B1;;;;N;;;;; +FB9E;ARABIC LETTER NOON GHUNNA ISOLATED FORM;Lo;0;AL; 06BA;;;;N;;;;; +FB9F;ARABIC LETTER NOON GHUNNA FINAL FORM;Lo;0;AL; 06BA;;;;N;;;;; +FBA0;ARABIC LETTER RNOON ISOLATED FORM;Lo;0;AL; 06BB;;;;N;;;;; +FBA1;ARABIC LETTER RNOON FINAL FORM;Lo;0;AL; 06BB;;;;N;;;;; +FBA2;ARABIC LETTER RNOON INITIAL FORM;Lo;0;AL; 06BB;;;;N;;;;; +FBA3;ARABIC LETTER RNOON MEDIAL FORM;Lo;0;AL; 06BB;;;;N;;;;; +FBA4;ARABIC LETTER HEH WITH YEH ABOVE ISOLATED FORM;Lo;0;AL; 06C0;;;;N;;;;; +FBA5;ARABIC LETTER HEH WITH YEH ABOVE FINAL FORM;Lo;0;AL; 06C0;;;;N;;;;; +FBA6;ARABIC LETTER HEH GOAL ISOLATED FORM;Lo;0;AL; 06C1;;;;N;;;;; +FBA7;ARABIC LETTER HEH GOAL FINAL FORM;Lo;0;AL; 06C1;;;;N;;;;; +FBA8;ARABIC LETTER HEH GOAL INITIAL FORM;Lo;0;AL; 06C1;;;;N;;;;; +FBA9;ARABIC LETTER HEH GOAL MEDIAL FORM;Lo;0;AL; 06C1;;;;N;;;;; +FBAA;ARABIC LETTER HEH DOACHASHMEE ISOLATED FORM;Lo;0;AL; 06BE;;;;N;;;;; +FBAB;ARABIC LETTER HEH DOACHASHMEE FINAL FORM;Lo;0;AL; 06BE;;;;N;;;;; +FBAC;ARABIC LETTER HEH DOACHASHMEE INITIAL FORM;Lo;0;AL; 06BE;;;;N;;;;; +FBAD;ARABIC LETTER HEH DOACHASHMEE MEDIAL FORM;Lo;0;AL; 06BE;;;;N;;;;; +FBAE;ARABIC LETTER YEH BARREE ISOLATED FORM;Lo;0;AL; 06D2;;;;N;;;;; +FBAF;ARABIC LETTER YEH BARREE FINAL FORM;Lo;0;AL; 06D2;;;;N;;;;; +FBB0;ARABIC LETTER YEH BARREE WITH HAMZA ABOVE ISOLATED FORM;Lo;0;AL; 06D3;;;;N;;;;; +FBB1;ARABIC LETTER YEH BARREE WITH HAMZA ABOVE FINAL FORM;Lo;0;AL; 06D3;;;;N;;;;; +FBB2;ARABIC SYMBOL DOT ABOVE;Sk;0;AL;;;;;N;;;;; +FBB3;ARABIC SYMBOL DOT BELOW;Sk;0;AL;;;;;N;;;;; +FBB4;ARABIC SYMBOL TWO DOTS ABOVE;Sk;0;AL;;;;;N;;;;; +FBB5;ARABIC SYMBOL TWO DOTS BELOW;Sk;0;AL;;;;;N;;;;; +FBB6;ARABIC SYMBOL THREE DOTS ABOVE;Sk;0;AL;;;;;N;;;;; +FBB7;ARABIC SYMBOL THREE DOTS BELOW;Sk;0;AL;;;;;N;;;;; +FBB8;ARABIC SYMBOL THREE DOTS POINTING DOWNWARDS ABOVE;Sk;0;AL;;;;;N;;;;; +FBB9;ARABIC SYMBOL THREE DOTS POINTING DOWNWARDS BELOW;Sk;0;AL;;;;;N;;;;; +FBBA;ARABIC SYMBOL FOUR DOTS ABOVE;Sk;0;AL;;;;;N;;;;; +FBBB;ARABIC SYMBOL FOUR DOTS BELOW;Sk;0;AL;;;;;N;;;;; +FBBC;ARABIC SYMBOL DOUBLE VERTICAL BAR BELOW;Sk;0;AL;;;;;N;;;;; +FBBD;ARABIC SYMBOL TWO DOTS VERTICALLY ABOVE;Sk;0;AL;;;;;N;;;;; +FBBE;ARABIC SYMBOL TWO DOTS VERTICALLY BELOW;Sk;0;AL;;;;;N;;;;; +FBBF;ARABIC SYMBOL RING;Sk;0;AL;;;;;N;;;;; +FBC0;ARABIC SYMBOL SMALL TAH ABOVE;Sk;0;AL;;;;;N;;;;; +FBC1;ARABIC SYMBOL SMALL TAH BELOW;Sk;0;AL;;;;;N;;;;; +FBD3;ARABIC LETTER NG ISOLATED FORM;Lo;0;AL; 06AD;;;;N;;;;; +FBD4;ARABIC LETTER NG FINAL FORM;Lo;0;AL; 06AD;;;;N;;;;; +FBD5;ARABIC LETTER NG INITIAL FORM;Lo;0;AL; 06AD;;;;N;;;;; +FBD6;ARABIC LETTER NG MEDIAL FORM;Lo;0;AL; 06AD;;;;N;;;;; +FBD7;ARABIC LETTER U ISOLATED FORM;Lo;0;AL; 06C7;;;;N;;;;; +FBD8;ARABIC LETTER U FINAL FORM;Lo;0;AL; 06C7;;;;N;;;;; +FBD9;ARABIC LETTER OE ISOLATED FORM;Lo;0;AL; 06C6;;;;N;;;;; +FBDA;ARABIC LETTER OE FINAL FORM;Lo;0;AL; 06C6;;;;N;;;;; +FBDB;ARABIC LETTER YU ISOLATED FORM;Lo;0;AL; 06C8;;;;N;;;;; +FBDC;ARABIC LETTER YU FINAL FORM;Lo;0;AL; 06C8;;;;N;;;;; +FBDD;ARABIC LETTER U WITH HAMZA ABOVE ISOLATED FORM;Lo;0;AL; 0677;;;;N;;;;; +FBDE;ARABIC LETTER VE ISOLATED FORM;Lo;0;AL; 06CB;;;;N;;;;; +FBDF;ARABIC LETTER VE FINAL FORM;Lo;0;AL; 06CB;;;;N;;;;; +FBE0;ARABIC LETTER KIRGHIZ OE ISOLATED FORM;Lo;0;AL; 06C5;;;;N;;;;; +FBE1;ARABIC LETTER KIRGHIZ OE FINAL FORM;Lo;0;AL; 06C5;;;;N;;;;; +FBE2;ARABIC LETTER KIRGHIZ YU ISOLATED FORM;Lo;0;AL; 06C9;;;;N;;;;; +FBE3;ARABIC LETTER KIRGHIZ YU FINAL FORM;Lo;0;AL; 06C9;;;;N;;;;; +FBE4;ARABIC LETTER E ISOLATED FORM;Lo;0;AL; 06D0;;;;N;;;;; +FBE5;ARABIC LETTER E FINAL FORM;Lo;0;AL; 06D0;;;;N;;;;; +FBE6;ARABIC LETTER E INITIAL FORM;Lo;0;AL; 06D0;;;;N;;;;; +FBE7;ARABIC LETTER E MEDIAL FORM;Lo;0;AL; 06D0;;;;N;;;;; +FBE8;ARABIC LETTER UIGHUR KAZAKH KIRGHIZ ALEF MAKSURA INITIAL FORM;Lo;0;AL; 0649;;;;N;;;;; +FBE9;ARABIC LETTER UIGHUR KAZAKH KIRGHIZ ALEF MAKSURA MEDIAL FORM;Lo;0;AL; 0649;;;;N;;;;; +FBEA;ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH ALEF ISOLATED FORM;Lo;0;AL; 0626 0627;;;;N;;;;; +FBEB;ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH ALEF FINAL FORM;Lo;0;AL; 0626 0627;;;;N;;;;; +FBEC;ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH AE ISOLATED FORM;Lo;0;AL; 0626 06D5;;;;N;;;;; +FBED;ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH AE FINAL FORM;Lo;0;AL; 0626 06D5;;;;N;;;;; +FBEE;ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH WAW ISOLATED FORM;Lo;0;AL; 0626 0648;;;;N;;;;; +FBEF;ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH WAW FINAL FORM;Lo;0;AL; 0626 0648;;;;N;;;;; +FBF0;ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH U ISOLATED FORM;Lo;0;AL; 0626 06C7;;;;N;;;;; +FBF1;ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH U FINAL FORM;Lo;0;AL; 0626 06C7;;;;N;;;;; +FBF2;ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH OE ISOLATED FORM;Lo;0;AL; 0626 06C6;;;;N;;;;; +FBF3;ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH OE FINAL FORM;Lo;0;AL; 0626 06C6;;;;N;;;;; +FBF4;ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH YU ISOLATED FORM;Lo;0;AL; 0626 06C8;;;;N;;;;; +FBF5;ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH YU FINAL FORM;Lo;0;AL; 0626 06C8;;;;N;;;;; +FBF6;ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH E ISOLATED FORM;Lo;0;AL; 0626 06D0;;;;N;;;;; +FBF7;ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH E FINAL FORM;Lo;0;AL; 0626 06D0;;;;N;;;;; +FBF8;ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH E INITIAL FORM;Lo;0;AL; 0626 06D0;;;;N;;;;; +FBF9;ARABIC LIGATURE UIGHUR KIRGHIZ YEH WITH HAMZA ABOVE WITH ALEF MAKSURA ISOLATED FORM;Lo;0;AL; 0626 0649;;;;N;;;;; +FBFA;ARABIC LIGATURE UIGHUR KIRGHIZ YEH WITH HAMZA ABOVE WITH ALEF MAKSURA FINAL FORM;Lo;0;AL; 0626 0649;;;;N;;;;; +FBFB;ARABIC LIGATURE UIGHUR KIRGHIZ YEH WITH HAMZA ABOVE WITH ALEF MAKSURA INITIAL FORM;Lo;0;AL; 0626 0649;;;;N;;;;; +FBFC;ARABIC LETTER FARSI YEH ISOLATED FORM;Lo;0;AL; 06CC;;;;N;;;;; +FBFD;ARABIC LETTER FARSI YEH FINAL FORM;Lo;0;AL; 06CC;;;;N;;;;; +FBFE;ARABIC LETTER FARSI YEH INITIAL FORM;Lo;0;AL; 06CC;;;;N;;;;; +FBFF;ARABIC LETTER FARSI YEH MEDIAL FORM;Lo;0;AL; 06CC;;;;N;;;;; +FC00;ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH JEEM ISOLATED FORM;Lo;0;AL; 0626 062C;;;;N;;;;; +FC01;ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH HAH ISOLATED FORM;Lo;0;AL; 0626 062D;;;;N;;;;; +FC02;ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH MEEM ISOLATED FORM;Lo;0;AL; 0626 0645;;;;N;;;;; +FC03;ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH ALEF MAKSURA ISOLATED FORM;Lo;0;AL; 0626 0649;;;;N;;;;; +FC04;ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH YEH ISOLATED FORM;Lo;0;AL; 0626 064A;;;;N;;;;; +FC05;ARABIC LIGATURE BEH WITH JEEM ISOLATED FORM;Lo;0;AL; 0628 062C;;;;N;;;;; +FC06;ARABIC LIGATURE BEH WITH HAH ISOLATED FORM;Lo;0;AL; 0628 062D;;;;N;;;;; +FC07;ARABIC LIGATURE BEH WITH KHAH ISOLATED FORM;Lo;0;AL; 0628 062E;;;;N;;;;; +FC08;ARABIC LIGATURE BEH WITH MEEM ISOLATED FORM;Lo;0;AL; 0628 0645;;;;N;;;;; +FC09;ARABIC LIGATURE BEH WITH ALEF MAKSURA ISOLATED FORM;Lo;0;AL; 0628 0649;;;;N;;;;; +FC0A;ARABIC LIGATURE BEH WITH YEH ISOLATED FORM;Lo;0;AL; 0628 064A;;;;N;;;;; +FC0B;ARABIC LIGATURE TEH WITH JEEM ISOLATED FORM;Lo;0;AL; 062A 062C;;;;N;;;;; +FC0C;ARABIC LIGATURE TEH WITH HAH ISOLATED FORM;Lo;0;AL; 062A 062D;;;;N;;;;; +FC0D;ARABIC LIGATURE TEH WITH KHAH ISOLATED FORM;Lo;0;AL; 062A 062E;;;;N;;;;; +FC0E;ARABIC LIGATURE TEH WITH MEEM ISOLATED FORM;Lo;0;AL; 062A 0645;;;;N;;;;; +FC0F;ARABIC LIGATURE TEH WITH ALEF MAKSURA ISOLATED FORM;Lo;0;AL; 062A 0649;;;;N;;;;; +FC10;ARABIC LIGATURE TEH WITH YEH ISOLATED FORM;Lo;0;AL; 062A 064A;;;;N;;;;; +FC11;ARABIC LIGATURE THEH WITH JEEM ISOLATED FORM;Lo;0;AL; 062B 062C;;;;N;;;;; +FC12;ARABIC LIGATURE THEH WITH MEEM ISOLATED FORM;Lo;0;AL; 062B 0645;;;;N;;;;; +FC13;ARABIC LIGATURE THEH WITH ALEF MAKSURA ISOLATED FORM;Lo;0;AL; 062B 0649;;;;N;;;;; +FC14;ARABIC LIGATURE THEH WITH YEH ISOLATED FORM;Lo;0;AL; 062B 064A;;;;N;;;;; +FC15;ARABIC LIGATURE JEEM WITH HAH ISOLATED FORM;Lo;0;AL; 062C 062D;;;;N;;;;; +FC16;ARABIC LIGATURE JEEM WITH MEEM ISOLATED FORM;Lo;0;AL; 062C 0645;;;;N;;;;; +FC17;ARABIC LIGATURE HAH WITH JEEM ISOLATED FORM;Lo;0;AL; 062D 062C;;;;N;;;;; +FC18;ARABIC LIGATURE HAH WITH MEEM ISOLATED FORM;Lo;0;AL; 062D 0645;;;;N;;;;; +FC19;ARABIC LIGATURE KHAH WITH JEEM ISOLATED FORM;Lo;0;AL; 062E 062C;;;;N;;;;; +FC1A;ARABIC LIGATURE KHAH WITH HAH ISOLATED FORM;Lo;0;AL; 062E 062D;;;;N;;;;; +FC1B;ARABIC LIGATURE KHAH WITH MEEM ISOLATED FORM;Lo;0;AL; 062E 0645;;;;N;;;;; +FC1C;ARABIC LIGATURE SEEN WITH JEEM ISOLATED FORM;Lo;0;AL; 0633 062C;;;;N;;;;; +FC1D;ARABIC LIGATURE SEEN WITH HAH ISOLATED FORM;Lo;0;AL; 0633 062D;;;;N;;;;; +FC1E;ARABIC LIGATURE SEEN WITH KHAH ISOLATED FORM;Lo;0;AL; 0633 062E;;;;N;;;;; +FC1F;ARABIC LIGATURE SEEN WITH MEEM ISOLATED FORM;Lo;0;AL; 0633 0645;;;;N;;;;; +FC20;ARABIC LIGATURE SAD WITH HAH ISOLATED FORM;Lo;0;AL; 0635 062D;;;;N;;;;; +FC21;ARABIC LIGATURE SAD WITH MEEM ISOLATED FORM;Lo;0;AL; 0635 0645;;;;N;;;;; +FC22;ARABIC LIGATURE DAD WITH JEEM ISOLATED FORM;Lo;0;AL; 0636 062C;;;;N;;;;; +FC23;ARABIC LIGATURE DAD WITH HAH ISOLATED FORM;Lo;0;AL; 0636 062D;;;;N;;;;; +FC24;ARABIC LIGATURE DAD WITH KHAH ISOLATED FORM;Lo;0;AL; 0636 062E;;;;N;;;;; +FC25;ARABIC LIGATURE DAD WITH MEEM ISOLATED FORM;Lo;0;AL; 0636 0645;;;;N;;;;; +FC26;ARABIC LIGATURE TAH WITH HAH ISOLATED FORM;Lo;0;AL; 0637 062D;;;;N;;;;; +FC27;ARABIC LIGATURE TAH WITH MEEM ISOLATED FORM;Lo;0;AL; 0637 0645;;;;N;;;;; +FC28;ARABIC LIGATURE ZAH WITH MEEM ISOLATED FORM;Lo;0;AL; 0638 0645;;;;N;;;;; +FC29;ARABIC LIGATURE AIN WITH JEEM ISOLATED FORM;Lo;0;AL; 0639 062C;;;;N;;;;; +FC2A;ARABIC LIGATURE AIN WITH MEEM ISOLATED FORM;Lo;0;AL; 0639 0645;;;;N;;;;; +FC2B;ARABIC LIGATURE GHAIN WITH JEEM ISOLATED FORM;Lo;0;AL; 063A 062C;;;;N;;;;; +FC2C;ARABIC LIGATURE GHAIN WITH MEEM ISOLATED FORM;Lo;0;AL; 063A 0645;;;;N;;;;; +FC2D;ARABIC LIGATURE FEH WITH JEEM ISOLATED FORM;Lo;0;AL; 0641 062C;;;;N;;;;; +FC2E;ARABIC LIGATURE FEH WITH HAH ISOLATED FORM;Lo;0;AL; 0641 062D;;;;N;;;;; +FC2F;ARABIC LIGATURE FEH WITH KHAH ISOLATED FORM;Lo;0;AL; 0641 062E;;;;N;;;;; +FC30;ARABIC LIGATURE FEH WITH MEEM ISOLATED FORM;Lo;0;AL; 0641 0645;;;;N;;;;; +FC31;ARABIC LIGATURE FEH WITH ALEF MAKSURA ISOLATED FORM;Lo;0;AL; 0641 0649;;;;N;;;;; +FC32;ARABIC LIGATURE FEH WITH YEH ISOLATED FORM;Lo;0;AL; 0641 064A;;;;N;;;;; +FC33;ARABIC LIGATURE QAF WITH HAH ISOLATED FORM;Lo;0;AL; 0642 062D;;;;N;;;;; +FC34;ARABIC LIGATURE QAF WITH MEEM ISOLATED FORM;Lo;0;AL; 0642 0645;;;;N;;;;; +FC35;ARABIC LIGATURE QAF WITH ALEF MAKSURA ISOLATED FORM;Lo;0;AL; 0642 0649;;;;N;;;;; +FC36;ARABIC LIGATURE QAF WITH YEH ISOLATED FORM;Lo;0;AL; 0642 064A;;;;N;;;;; +FC37;ARABIC LIGATURE KAF WITH ALEF ISOLATED FORM;Lo;0;AL; 0643 0627;;;;N;;;;; +FC38;ARABIC LIGATURE KAF WITH JEEM ISOLATED FORM;Lo;0;AL; 0643 062C;;;;N;;;;; +FC39;ARABIC LIGATURE KAF WITH HAH ISOLATED FORM;Lo;0;AL; 0643 062D;;;;N;;;;; +FC3A;ARABIC LIGATURE KAF WITH KHAH ISOLATED FORM;Lo;0;AL; 0643 062E;;;;N;;;;; +FC3B;ARABIC LIGATURE KAF WITH LAM ISOLATED FORM;Lo;0;AL; 0643 0644;;;;N;;;;; +FC3C;ARABIC LIGATURE KAF WITH MEEM ISOLATED FORM;Lo;0;AL; 0643 0645;;;;N;;;;; +FC3D;ARABIC LIGATURE KAF WITH ALEF MAKSURA ISOLATED FORM;Lo;0;AL; 0643 0649;;;;N;;;;; +FC3E;ARABIC LIGATURE KAF WITH YEH ISOLATED FORM;Lo;0;AL; 0643 064A;;;;N;;;;; +FC3F;ARABIC LIGATURE LAM WITH JEEM ISOLATED FORM;Lo;0;AL; 0644 062C;;;;N;;;;; +FC40;ARABIC LIGATURE LAM WITH HAH ISOLATED FORM;Lo;0;AL; 0644 062D;;;;N;;;;; +FC41;ARABIC LIGATURE LAM WITH KHAH ISOLATED FORM;Lo;0;AL; 0644 062E;;;;N;;;;; +FC42;ARABIC LIGATURE LAM WITH MEEM ISOLATED FORM;Lo;0;AL; 0644 0645;;;;N;;;;; +FC43;ARABIC LIGATURE LAM WITH ALEF MAKSURA ISOLATED FORM;Lo;0;AL; 0644 0649;;;;N;;;;; +FC44;ARABIC LIGATURE LAM WITH YEH ISOLATED FORM;Lo;0;AL; 0644 064A;;;;N;;;;; +FC45;ARABIC LIGATURE MEEM WITH JEEM ISOLATED FORM;Lo;0;AL; 0645 062C;;;;N;;;;; +FC46;ARABIC LIGATURE MEEM WITH HAH ISOLATED FORM;Lo;0;AL; 0645 062D;;;;N;;;;; +FC47;ARABIC LIGATURE MEEM WITH KHAH ISOLATED FORM;Lo;0;AL; 0645 062E;;;;N;;;;; +FC48;ARABIC LIGATURE MEEM WITH MEEM ISOLATED FORM;Lo;0;AL; 0645 0645;;;;N;;;;; +FC49;ARABIC LIGATURE MEEM WITH ALEF MAKSURA ISOLATED FORM;Lo;0;AL; 0645 0649;;;;N;;;;; +FC4A;ARABIC LIGATURE MEEM WITH YEH ISOLATED FORM;Lo;0;AL; 0645 064A;;;;N;;;;; +FC4B;ARABIC LIGATURE NOON WITH JEEM ISOLATED FORM;Lo;0;AL; 0646 062C;;;;N;;;;; +FC4C;ARABIC LIGATURE NOON WITH HAH ISOLATED FORM;Lo;0;AL; 0646 062D;;;;N;;;;; +FC4D;ARABIC LIGATURE NOON WITH KHAH ISOLATED FORM;Lo;0;AL; 0646 062E;;;;N;;;;; +FC4E;ARABIC LIGATURE NOON WITH MEEM ISOLATED FORM;Lo;0;AL; 0646 0645;;;;N;;;;; +FC4F;ARABIC LIGATURE NOON WITH ALEF MAKSURA ISOLATED FORM;Lo;0;AL; 0646 0649;;;;N;;;;; +FC50;ARABIC LIGATURE NOON WITH YEH ISOLATED FORM;Lo;0;AL; 0646 064A;;;;N;;;;; +FC51;ARABIC LIGATURE HEH WITH JEEM ISOLATED FORM;Lo;0;AL; 0647 062C;;;;N;;;;; +FC52;ARABIC LIGATURE HEH WITH MEEM ISOLATED FORM;Lo;0;AL; 0647 0645;;;;N;;;;; +FC53;ARABIC LIGATURE HEH WITH ALEF MAKSURA ISOLATED FORM;Lo;0;AL; 0647 0649;;;;N;;;;; +FC54;ARABIC LIGATURE HEH WITH YEH ISOLATED FORM;Lo;0;AL; 0647 064A;;;;N;;;;; +FC55;ARABIC LIGATURE YEH WITH JEEM ISOLATED FORM;Lo;0;AL; 064A 062C;;;;N;;;;; +FC56;ARABIC LIGATURE YEH WITH HAH ISOLATED FORM;Lo;0;AL; 064A 062D;;;;N;;;;; +FC57;ARABIC LIGATURE YEH WITH KHAH ISOLATED FORM;Lo;0;AL; 064A 062E;;;;N;;;;; +FC58;ARABIC LIGATURE YEH WITH MEEM ISOLATED FORM;Lo;0;AL; 064A 0645;;;;N;;;;; +FC59;ARABIC LIGATURE YEH WITH ALEF MAKSURA ISOLATED FORM;Lo;0;AL; 064A 0649;;;;N;;;;; +FC5A;ARABIC LIGATURE YEH WITH YEH ISOLATED FORM;Lo;0;AL; 064A 064A;;;;N;;;;; +FC5B;ARABIC LIGATURE THAL WITH SUPERSCRIPT ALEF ISOLATED FORM;Lo;0;AL; 0630 0670;;;;N;;;;; +FC5C;ARABIC LIGATURE REH WITH SUPERSCRIPT ALEF ISOLATED FORM;Lo;0;AL; 0631 0670;;;;N;;;;; +FC5D;ARABIC LIGATURE ALEF MAKSURA WITH SUPERSCRIPT ALEF ISOLATED FORM;Lo;0;AL; 0649 0670;;;;N;;;;; +FC5E;ARABIC LIGATURE SHADDA WITH DAMMATAN ISOLATED FORM;Lo;0;AL; 0020 064C 0651;;;;N;;;;; +FC5F;ARABIC LIGATURE SHADDA WITH KASRATAN ISOLATED FORM;Lo;0;AL; 0020 064D 0651;;;;N;;;;; +FC60;ARABIC LIGATURE SHADDA WITH FATHA ISOLATED FORM;Lo;0;AL; 0020 064E 0651;;;;N;;;;; +FC61;ARABIC LIGATURE SHADDA WITH DAMMA ISOLATED FORM;Lo;0;AL; 0020 064F 0651;;;;N;;;;; +FC62;ARABIC LIGATURE SHADDA WITH KASRA ISOLATED FORM;Lo;0;AL; 0020 0650 0651;;;;N;;;;; +FC63;ARABIC LIGATURE SHADDA WITH SUPERSCRIPT ALEF ISOLATED FORM;Lo;0;AL; 0020 0651 0670;;;;N;;;;; +FC64;ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH REH FINAL FORM;Lo;0;AL; 0626 0631;;;;N;;;;; +FC65;ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH ZAIN FINAL FORM;Lo;0;AL; 0626 0632;;;;N;;;;; +FC66;ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH MEEM FINAL FORM;Lo;0;AL; 0626 0645;;;;N;;;;; +FC67;ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH NOON FINAL FORM;Lo;0;AL; 0626 0646;;;;N;;;;; +FC68;ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH ALEF MAKSURA FINAL FORM;Lo;0;AL; 0626 0649;;;;N;;;;; +FC69;ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH YEH FINAL FORM;Lo;0;AL; 0626 064A;;;;N;;;;; +FC6A;ARABIC LIGATURE BEH WITH REH FINAL FORM;Lo;0;AL; 0628 0631;;;;N;;;;; +FC6B;ARABIC LIGATURE BEH WITH ZAIN FINAL FORM;Lo;0;AL; 0628 0632;;;;N;;;;; +FC6C;ARABIC LIGATURE BEH WITH MEEM FINAL FORM;Lo;0;AL; 0628 0645;;;;N;;;;; +FC6D;ARABIC LIGATURE BEH WITH NOON FINAL FORM;Lo;0;AL; 0628 0646;;;;N;;;;; +FC6E;ARABIC LIGATURE BEH WITH ALEF MAKSURA FINAL FORM;Lo;0;AL; 0628 0649;;;;N;;;;; +FC6F;ARABIC LIGATURE BEH WITH YEH FINAL FORM;Lo;0;AL; 0628 064A;;;;N;;;;; +FC70;ARABIC LIGATURE TEH WITH REH FINAL FORM;Lo;0;AL; 062A 0631;;;;N;;;;; +FC71;ARABIC LIGATURE TEH WITH ZAIN FINAL FORM;Lo;0;AL; 062A 0632;;;;N;;;;; +FC72;ARABIC LIGATURE TEH WITH MEEM FINAL FORM;Lo;0;AL; 062A 0645;;;;N;;;;; +FC73;ARABIC LIGATURE TEH WITH NOON FINAL FORM;Lo;0;AL; 062A 0646;;;;N;;;;; +FC74;ARABIC LIGATURE TEH WITH ALEF MAKSURA FINAL FORM;Lo;0;AL; 062A 0649;;;;N;;;;; +FC75;ARABIC LIGATURE TEH WITH YEH FINAL FORM;Lo;0;AL; 062A 064A;;;;N;;;;; +FC76;ARABIC LIGATURE THEH WITH REH FINAL FORM;Lo;0;AL; 062B 0631;;;;N;;;;; +FC77;ARABIC LIGATURE THEH WITH ZAIN FINAL FORM;Lo;0;AL; 062B 0632;;;;N;;;;; +FC78;ARABIC LIGATURE THEH WITH MEEM FINAL FORM;Lo;0;AL; 062B 0645;;;;N;;;;; +FC79;ARABIC LIGATURE THEH WITH NOON FINAL FORM;Lo;0;AL; 062B 0646;;;;N;;;;; +FC7A;ARABIC LIGATURE THEH WITH ALEF MAKSURA FINAL FORM;Lo;0;AL; 062B 0649;;;;N;;;;; +FC7B;ARABIC LIGATURE THEH WITH YEH FINAL FORM;Lo;0;AL; 062B 064A;;;;N;;;;; +FC7C;ARABIC LIGATURE FEH WITH ALEF MAKSURA FINAL FORM;Lo;0;AL; 0641 0649;;;;N;;;;; +FC7D;ARABIC LIGATURE FEH WITH YEH FINAL FORM;Lo;0;AL; 0641 064A;;;;N;;;;; +FC7E;ARABIC LIGATURE QAF WITH ALEF MAKSURA FINAL FORM;Lo;0;AL; 0642 0649;;;;N;;;;; +FC7F;ARABIC LIGATURE QAF WITH YEH FINAL FORM;Lo;0;AL; 0642 064A;;;;N;;;;; +FC80;ARABIC LIGATURE KAF WITH ALEF FINAL FORM;Lo;0;AL; 0643 0627;;;;N;;;;; +FC81;ARABIC LIGATURE KAF WITH LAM FINAL FORM;Lo;0;AL; 0643 0644;;;;N;;;;; +FC82;ARABIC LIGATURE KAF WITH MEEM FINAL FORM;Lo;0;AL; 0643 0645;;;;N;;;;; +FC83;ARABIC LIGATURE KAF WITH ALEF MAKSURA FINAL FORM;Lo;0;AL; 0643 0649;;;;N;;;;; +FC84;ARABIC LIGATURE KAF WITH YEH FINAL FORM;Lo;0;AL; 0643 064A;;;;N;;;;; +FC85;ARABIC LIGATURE LAM WITH MEEM FINAL FORM;Lo;0;AL; 0644 0645;;;;N;;;;; +FC86;ARABIC LIGATURE LAM WITH ALEF MAKSURA FINAL FORM;Lo;0;AL; 0644 0649;;;;N;;;;; +FC87;ARABIC LIGATURE LAM WITH YEH FINAL FORM;Lo;0;AL; 0644 064A;;;;N;;;;; +FC88;ARABIC LIGATURE MEEM WITH ALEF FINAL FORM;Lo;0;AL; 0645 0627;;;;N;;;;; +FC89;ARABIC LIGATURE MEEM WITH MEEM FINAL FORM;Lo;0;AL; 0645 0645;;;;N;;;;; +FC8A;ARABIC LIGATURE NOON WITH REH FINAL FORM;Lo;0;AL; 0646 0631;;;;N;;;;; +FC8B;ARABIC LIGATURE NOON WITH ZAIN FINAL FORM;Lo;0;AL; 0646 0632;;;;N;;;;; +FC8C;ARABIC LIGATURE NOON WITH MEEM FINAL FORM;Lo;0;AL; 0646 0645;;;;N;;;;; +FC8D;ARABIC LIGATURE NOON WITH NOON FINAL FORM;Lo;0;AL; 0646 0646;;;;N;;;;; +FC8E;ARABIC LIGATURE NOON WITH ALEF MAKSURA FINAL FORM;Lo;0;AL; 0646 0649;;;;N;;;;; +FC8F;ARABIC LIGATURE NOON WITH YEH FINAL FORM;Lo;0;AL; 0646 064A;;;;N;;;;; +FC90;ARABIC LIGATURE ALEF MAKSURA WITH SUPERSCRIPT ALEF FINAL FORM;Lo;0;AL; 0649 0670;;;;N;;;;; +FC91;ARABIC LIGATURE YEH WITH REH FINAL FORM;Lo;0;AL; 064A 0631;;;;N;;;;; +FC92;ARABIC LIGATURE YEH WITH ZAIN FINAL FORM;Lo;0;AL; 064A 0632;;;;N;;;;; +FC93;ARABIC LIGATURE YEH WITH MEEM FINAL FORM;Lo;0;AL; 064A 0645;;;;N;;;;; +FC94;ARABIC LIGATURE YEH WITH NOON FINAL FORM;Lo;0;AL; 064A 0646;;;;N;;;;; +FC95;ARABIC LIGATURE YEH WITH ALEF MAKSURA FINAL FORM;Lo;0;AL; 064A 0649;;;;N;;;;; +FC96;ARABIC LIGATURE YEH WITH YEH FINAL FORM;Lo;0;AL; 064A 064A;;;;N;;;;; +FC97;ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH JEEM INITIAL FORM;Lo;0;AL; 0626 062C;;;;N;;;;; +FC98;ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH HAH INITIAL FORM;Lo;0;AL; 0626 062D;;;;N;;;;; +FC99;ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH KHAH INITIAL FORM;Lo;0;AL; 0626 062E;;;;N;;;;; +FC9A;ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH MEEM INITIAL FORM;Lo;0;AL; 0626 0645;;;;N;;;;; +FC9B;ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH HEH INITIAL FORM;Lo;0;AL; 0626 0647;;;;N;;;;; +FC9C;ARABIC LIGATURE BEH WITH JEEM INITIAL FORM;Lo;0;AL; 0628 062C;;;;N;;;;; +FC9D;ARABIC LIGATURE BEH WITH HAH INITIAL FORM;Lo;0;AL; 0628 062D;;;;N;;;;; +FC9E;ARABIC LIGATURE BEH WITH KHAH INITIAL FORM;Lo;0;AL; 0628 062E;;;;N;;;;; +FC9F;ARABIC LIGATURE BEH WITH MEEM INITIAL FORM;Lo;0;AL; 0628 0645;;;;N;;;;; +FCA0;ARABIC LIGATURE BEH WITH HEH INITIAL FORM;Lo;0;AL; 0628 0647;;;;N;;;;; +FCA1;ARABIC LIGATURE TEH WITH JEEM INITIAL FORM;Lo;0;AL; 062A 062C;;;;N;;;;; +FCA2;ARABIC LIGATURE TEH WITH HAH INITIAL FORM;Lo;0;AL; 062A 062D;;;;N;;;;; +FCA3;ARABIC LIGATURE TEH WITH KHAH INITIAL FORM;Lo;0;AL; 062A 062E;;;;N;;;;; +FCA4;ARABIC LIGATURE TEH WITH MEEM INITIAL FORM;Lo;0;AL; 062A 0645;;;;N;;;;; +FCA5;ARABIC LIGATURE TEH WITH HEH INITIAL FORM;Lo;0;AL; 062A 0647;;;;N;;;;; +FCA6;ARABIC LIGATURE THEH WITH MEEM INITIAL FORM;Lo;0;AL; 062B 0645;;;;N;;;;; +FCA7;ARABIC LIGATURE JEEM WITH HAH INITIAL FORM;Lo;0;AL; 062C 062D;;;;N;;;;; +FCA8;ARABIC LIGATURE JEEM WITH MEEM INITIAL FORM;Lo;0;AL; 062C 0645;;;;N;;;;; +FCA9;ARABIC LIGATURE HAH WITH JEEM INITIAL FORM;Lo;0;AL; 062D 062C;;;;N;;;;; +FCAA;ARABIC LIGATURE HAH WITH MEEM INITIAL FORM;Lo;0;AL; 062D 0645;;;;N;;;;; +FCAB;ARABIC LIGATURE KHAH WITH JEEM INITIAL FORM;Lo;0;AL; 062E 062C;;;;N;;;;; +FCAC;ARABIC LIGATURE KHAH WITH MEEM INITIAL FORM;Lo;0;AL; 062E 0645;;;;N;;;;; +FCAD;ARABIC LIGATURE SEEN WITH JEEM INITIAL FORM;Lo;0;AL; 0633 062C;;;;N;;;;; +FCAE;ARABIC LIGATURE SEEN WITH HAH INITIAL FORM;Lo;0;AL; 0633 062D;;;;N;;;;; +FCAF;ARABIC LIGATURE SEEN WITH KHAH INITIAL FORM;Lo;0;AL; 0633 062E;;;;N;;;;; +FCB0;ARABIC LIGATURE SEEN WITH MEEM INITIAL FORM;Lo;0;AL; 0633 0645;;;;N;;;;; +FCB1;ARABIC LIGATURE SAD WITH HAH INITIAL FORM;Lo;0;AL; 0635 062D;;;;N;;;;; +FCB2;ARABIC LIGATURE SAD WITH KHAH INITIAL FORM;Lo;0;AL; 0635 062E;;;;N;;;;; +FCB3;ARABIC LIGATURE SAD WITH MEEM INITIAL FORM;Lo;0;AL; 0635 0645;;;;N;;;;; +FCB4;ARABIC LIGATURE DAD WITH JEEM INITIAL FORM;Lo;0;AL; 0636 062C;;;;N;;;;; +FCB5;ARABIC LIGATURE DAD WITH HAH INITIAL FORM;Lo;0;AL; 0636 062D;;;;N;;;;; +FCB6;ARABIC LIGATURE DAD WITH KHAH INITIAL FORM;Lo;0;AL; 0636 062E;;;;N;;;;; +FCB7;ARABIC LIGATURE DAD WITH MEEM INITIAL FORM;Lo;0;AL; 0636 0645;;;;N;;;;; +FCB8;ARABIC LIGATURE TAH WITH HAH INITIAL FORM;Lo;0;AL; 0637 062D;;;;N;;;;; +FCB9;ARABIC LIGATURE ZAH WITH MEEM INITIAL FORM;Lo;0;AL; 0638 0645;;;;N;;;;; +FCBA;ARABIC LIGATURE AIN WITH JEEM INITIAL FORM;Lo;0;AL; 0639 062C;;;;N;;;;; +FCBB;ARABIC LIGATURE AIN WITH MEEM INITIAL FORM;Lo;0;AL; 0639 0645;;;;N;;;;; +FCBC;ARABIC LIGATURE GHAIN WITH JEEM INITIAL FORM;Lo;0;AL; 063A 062C;;;;N;;;;; +FCBD;ARABIC LIGATURE GHAIN WITH MEEM INITIAL FORM;Lo;0;AL; 063A 0645;;;;N;;;;; +FCBE;ARABIC LIGATURE FEH WITH JEEM INITIAL FORM;Lo;0;AL; 0641 062C;;;;N;;;;; +FCBF;ARABIC LIGATURE FEH WITH HAH INITIAL FORM;Lo;0;AL; 0641 062D;;;;N;;;;; +FCC0;ARABIC LIGATURE FEH WITH KHAH INITIAL FORM;Lo;0;AL; 0641 062E;;;;N;;;;; +FCC1;ARABIC LIGATURE FEH WITH MEEM INITIAL FORM;Lo;0;AL; 0641 0645;;;;N;;;;; +FCC2;ARABIC LIGATURE QAF WITH HAH INITIAL FORM;Lo;0;AL; 0642 062D;;;;N;;;;; +FCC3;ARABIC LIGATURE QAF WITH MEEM INITIAL FORM;Lo;0;AL; 0642 0645;;;;N;;;;; +FCC4;ARABIC LIGATURE KAF WITH JEEM INITIAL FORM;Lo;0;AL; 0643 062C;;;;N;;;;; +FCC5;ARABIC LIGATURE KAF WITH HAH INITIAL FORM;Lo;0;AL; 0643 062D;;;;N;;;;; +FCC6;ARABIC LIGATURE KAF WITH KHAH INITIAL FORM;Lo;0;AL; 0643 062E;;;;N;;;;; +FCC7;ARABIC LIGATURE KAF WITH LAM INITIAL FORM;Lo;0;AL; 0643 0644;;;;N;;;;; +FCC8;ARABIC LIGATURE KAF WITH MEEM INITIAL FORM;Lo;0;AL; 0643 0645;;;;N;;;;; +FCC9;ARABIC LIGATURE LAM WITH JEEM INITIAL FORM;Lo;0;AL; 0644 062C;;;;N;;;;; +FCCA;ARABIC LIGATURE LAM WITH HAH INITIAL FORM;Lo;0;AL; 0644 062D;;;;N;;;;; +FCCB;ARABIC LIGATURE LAM WITH KHAH INITIAL FORM;Lo;0;AL; 0644 062E;;;;N;;;;; +FCCC;ARABIC LIGATURE LAM WITH MEEM INITIAL FORM;Lo;0;AL; 0644 0645;;;;N;;;;; +FCCD;ARABIC LIGATURE LAM WITH HEH INITIAL FORM;Lo;0;AL; 0644 0647;;;;N;;;;; +FCCE;ARABIC LIGATURE MEEM WITH JEEM INITIAL FORM;Lo;0;AL; 0645 062C;;;;N;;;;; +FCCF;ARABIC LIGATURE MEEM WITH HAH INITIAL FORM;Lo;0;AL; 0645 062D;;;;N;;;;; +FCD0;ARABIC LIGATURE MEEM WITH KHAH INITIAL FORM;Lo;0;AL; 0645 062E;;;;N;;;;; +FCD1;ARABIC LIGATURE MEEM WITH MEEM INITIAL FORM;Lo;0;AL; 0645 0645;;;;N;;;;; +FCD2;ARABIC LIGATURE NOON WITH JEEM INITIAL FORM;Lo;0;AL; 0646 062C;;;;N;;;;; +FCD3;ARABIC LIGATURE NOON WITH HAH INITIAL FORM;Lo;0;AL; 0646 062D;;;;N;;;;; +FCD4;ARABIC LIGATURE NOON WITH KHAH INITIAL FORM;Lo;0;AL; 0646 062E;;;;N;;;;; +FCD5;ARABIC LIGATURE NOON WITH MEEM INITIAL FORM;Lo;0;AL; 0646 0645;;;;N;;;;; +FCD6;ARABIC LIGATURE NOON WITH HEH INITIAL FORM;Lo;0;AL; 0646 0647;;;;N;;;;; +FCD7;ARABIC LIGATURE HEH WITH JEEM INITIAL FORM;Lo;0;AL; 0647 062C;;;;N;;;;; +FCD8;ARABIC LIGATURE HEH WITH MEEM INITIAL FORM;Lo;0;AL; 0647 0645;;;;N;;;;; +FCD9;ARABIC LIGATURE HEH WITH SUPERSCRIPT ALEF INITIAL FORM;Lo;0;AL; 0647 0670;;;;N;;;;; +FCDA;ARABIC LIGATURE YEH WITH JEEM INITIAL FORM;Lo;0;AL; 064A 062C;;;;N;;;;; +FCDB;ARABIC LIGATURE YEH WITH HAH INITIAL FORM;Lo;0;AL; 064A 062D;;;;N;;;;; +FCDC;ARABIC LIGATURE YEH WITH KHAH INITIAL FORM;Lo;0;AL; 064A 062E;;;;N;;;;; +FCDD;ARABIC LIGATURE YEH WITH MEEM INITIAL FORM;Lo;0;AL; 064A 0645;;;;N;;;;; +FCDE;ARABIC LIGATURE YEH WITH HEH INITIAL FORM;Lo;0;AL; 064A 0647;;;;N;;;;; +FCDF;ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH MEEM MEDIAL FORM;Lo;0;AL; 0626 0645;;;;N;;;;; +FCE0;ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH HEH MEDIAL FORM;Lo;0;AL; 0626 0647;;;;N;;;;; +FCE1;ARABIC LIGATURE BEH WITH MEEM MEDIAL FORM;Lo;0;AL; 0628 0645;;;;N;;;;; +FCE2;ARABIC LIGATURE BEH WITH HEH MEDIAL FORM;Lo;0;AL; 0628 0647;;;;N;;;;; +FCE3;ARABIC LIGATURE TEH WITH MEEM MEDIAL FORM;Lo;0;AL; 062A 0645;;;;N;;;;; +FCE4;ARABIC LIGATURE TEH WITH HEH MEDIAL FORM;Lo;0;AL; 062A 0647;;;;N;;;;; +FCE5;ARABIC LIGATURE THEH WITH MEEM MEDIAL FORM;Lo;0;AL; 062B 0645;;;;N;;;;; +FCE6;ARABIC LIGATURE THEH WITH HEH MEDIAL FORM;Lo;0;AL; 062B 0647;;;;N;;;;; +FCE7;ARABIC LIGATURE SEEN WITH MEEM MEDIAL FORM;Lo;0;AL; 0633 0645;;;;N;;;;; +FCE8;ARABIC LIGATURE SEEN WITH HEH MEDIAL FORM;Lo;0;AL; 0633 0647;;;;N;;;;; +FCE9;ARABIC LIGATURE SHEEN WITH MEEM MEDIAL FORM;Lo;0;AL; 0634 0645;;;;N;;;;; +FCEA;ARABIC LIGATURE SHEEN WITH HEH MEDIAL FORM;Lo;0;AL; 0634 0647;;;;N;;;;; +FCEB;ARABIC LIGATURE KAF WITH LAM MEDIAL FORM;Lo;0;AL; 0643 0644;;;;N;;;;; +FCEC;ARABIC LIGATURE KAF WITH MEEM MEDIAL FORM;Lo;0;AL; 0643 0645;;;;N;;;;; +FCED;ARABIC LIGATURE LAM WITH MEEM MEDIAL FORM;Lo;0;AL; 0644 0645;;;;N;;;;; +FCEE;ARABIC LIGATURE NOON WITH MEEM MEDIAL FORM;Lo;0;AL; 0646 0645;;;;N;;;;; +FCEF;ARABIC LIGATURE NOON WITH HEH MEDIAL FORM;Lo;0;AL; 0646 0647;;;;N;;;;; +FCF0;ARABIC LIGATURE YEH WITH MEEM MEDIAL FORM;Lo;0;AL; 064A 0645;;;;N;;;;; +FCF1;ARABIC LIGATURE YEH WITH HEH MEDIAL FORM;Lo;0;AL; 064A 0647;;;;N;;;;; +FCF2;ARABIC LIGATURE SHADDA WITH FATHA MEDIAL FORM;Lo;0;AL; 0640 064E 0651;;;;N;;;;; +FCF3;ARABIC LIGATURE SHADDA WITH DAMMA MEDIAL FORM;Lo;0;AL; 0640 064F 0651;;;;N;;;;; +FCF4;ARABIC LIGATURE SHADDA WITH KASRA MEDIAL FORM;Lo;0;AL; 0640 0650 0651;;;;N;;;;; +FCF5;ARABIC LIGATURE TAH WITH ALEF MAKSURA ISOLATED FORM;Lo;0;AL; 0637 0649;;;;N;;;;; +FCF6;ARABIC LIGATURE TAH WITH YEH ISOLATED FORM;Lo;0;AL; 0637 064A;;;;N;;;;; +FCF7;ARABIC LIGATURE AIN WITH ALEF MAKSURA ISOLATED FORM;Lo;0;AL; 0639 0649;;;;N;;;;; +FCF8;ARABIC LIGATURE AIN WITH YEH ISOLATED FORM;Lo;0;AL; 0639 064A;;;;N;;;;; +FCF9;ARABIC LIGATURE GHAIN WITH ALEF MAKSURA ISOLATED FORM;Lo;0;AL; 063A 0649;;;;N;;;;; +FCFA;ARABIC LIGATURE GHAIN WITH YEH ISOLATED FORM;Lo;0;AL; 063A 064A;;;;N;;;;; +FCFB;ARABIC LIGATURE SEEN WITH ALEF MAKSURA ISOLATED FORM;Lo;0;AL; 0633 0649;;;;N;;;;; +FCFC;ARABIC LIGATURE SEEN WITH YEH ISOLATED FORM;Lo;0;AL; 0633 064A;;;;N;;;;; +FCFD;ARABIC LIGATURE SHEEN WITH ALEF MAKSURA ISOLATED FORM;Lo;0;AL; 0634 0649;;;;N;;;;; +FCFE;ARABIC LIGATURE SHEEN WITH YEH ISOLATED FORM;Lo;0;AL; 0634 064A;;;;N;;;;; +FCFF;ARABIC LIGATURE HAH WITH ALEF MAKSURA ISOLATED FORM;Lo;0;AL; 062D 0649;;;;N;;;;; +FD00;ARABIC LIGATURE HAH WITH YEH ISOLATED FORM;Lo;0;AL; 062D 064A;;;;N;;;;; +FD01;ARABIC LIGATURE JEEM WITH ALEF MAKSURA ISOLATED FORM;Lo;0;AL; 062C 0649;;;;N;;;;; +FD02;ARABIC LIGATURE JEEM WITH YEH ISOLATED FORM;Lo;0;AL; 062C 064A;;;;N;;;;; +FD03;ARABIC LIGATURE KHAH WITH ALEF MAKSURA ISOLATED FORM;Lo;0;AL; 062E 0649;;;;N;;;;; +FD04;ARABIC LIGATURE KHAH WITH YEH ISOLATED FORM;Lo;0;AL; 062E 064A;;;;N;;;;; +FD05;ARABIC LIGATURE SAD WITH ALEF MAKSURA ISOLATED FORM;Lo;0;AL; 0635 0649;;;;N;;;;; +FD06;ARABIC LIGATURE SAD WITH YEH ISOLATED FORM;Lo;0;AL; 0635 064A;;;;N;;;;; +FD07;ARABIC LIGATURE DAD WITH ALEF MAKSURA ISOLATED FORM;Lo;0;AL; 0636 0649;;;;N;;;;; +FD08;ARABIC LIGATURE DAD WITH YEH ISOLATED FORM;Lo;0;AL; 0636 064A;;;;N;;;;; +FD09;ARABIC LIGATURE SHEEN WITH JEEM ISOLATED FORM;Lo;0;AL; 0634 062C;;;;N;;;;; +FD0A;ARABIC LIGATURE SHEEN WITH HAH ISOLATED FORM;Lo;0;AL; 0634 062D;;;;N;;;;; +FD0B;ARABIC LIGATURE SHEEN WITH KHAH ISOLATED FORM;Lo;0;AL; 0634 062E;;;;N;;;;; +FD0C;ARABIC LIGATURE SHEEN WITH MEEM ISOLATED FORM;Lo;0;AL; 0634 0645;;;;N;;;;; +FD0D;ARABIC LIGATURE SHEEN WITH REH ISOLATED FORM;Lo;0;AL; 0634 0631;;;;N;;;;; +FD0E;ARABIC LIGATURE SEEN WITH REH ISOLATED FORM;Lo;0;AL; 0633 0631;;;;N;;;;; +FD0F;ARABIC LIGATURE SAD WITH REH ISOLATED FORM;Lo;0;AL; 0635 0631;;;;N;;;;; +FD10;ARABIC LIGATURE DAD WITH REH ISOLATED FORM;Lo;0;AL; 0636 0631;;;;N;;;;; +FD11;ARABIC LIGATURE TAH WITH ALEF MAKSURA FINAL FORM;Lo;0;AL; 0637 0649;;;;N;;;;; +FD12;ARABIC LIGATURE TAH WITH YEH FINAL FORM;Lo;0;AL; 0637 064A;;;;N;;;;; +FD13;ARABIC LIGATURE AIN WITH ALEF MAKSURA FINAL FORM;Lo;0;AL; 0639 0649;;;;N;;;;; +FD14;ARABIC LIGATURE AIN WITH YEH FINAL FORM;Lo;0;AL; 0639 064A;;;;N;;;;; +FD15;ARABIC LIGATURE GHAIN WITH ALEF MAKSURA FINAL FORM;Lo;0;AL; 063A 0649;;;;N;;;;; +FD16;ARABIC LIGATURE GHAIN WITH YEH FINAL FORM;Lo;0;AL; 063A 064A;;;;N;;;;; +FD17;ARABIC LIGATURE SEEN WITH ALEF MAKSURA FINAL FORM;Lo;0;AL; 0633 0649;;;;N;;;;; +FD18;ARABIC LIGATURE SEEN WITH YEH FINAL FORM;Lo;0;AL; 0633 064A;;;;N;;;;; +FD19;ARABIC LIGATURE SHEEN WITH ALEF MAKSURA FINAL FORM;Lo;0;AL; 0634 0649;;;;N;;;;; +FD1A;ARABIC LIGATURE SHEEN WITH YEH FINAL FORM;Lo;0;AL; 0634 064A;;;;N;;;;; +FD1B;ARABIC LIGATURE HAH WITH ALEF MAKSURA FINAL FORM;Lo;0;AL; 062D 0649;;;;N;;;;; +FD1C;ARABIC LIGATURE HAH WITH YEH FINAL FORM;Lo;0;AL; 062D 064A;;;;N;;;;; +FD1D;ARABIC LIGATURE JEEM WITH ALEF MAKSURA FINAL FORM;Lo;0;AL; 062C 0649;;;;N;;;;; +FD1E;ARABIC LIGATURE JEEM WITH YEH FINAL FORM;Lo;0;AL; 062C 064A;;;;N;;;;; +FD1F;ARABIC LIGATURE KHAH WITH ALEF MAKSURA FINAL FORM;Lo;0;AL; 062E 0649;;;;N;;;;; +FD20;ARABIC LIGATURE KHAH WITH YEH FINAL FORM;Lo;0;AL; 062E 064A;;;;N;;;;; +FD21;ARABIC LIGATURE SAD WITH ALEF MAKSURA FINAL FORM;Lo;0;AL; 0635 0649;;;;N;;;;; +FD22;ARABIC LIGATURE SAD WITH YEH FINAL FORM;Lo;0;AL; 0635 064A;;;;N;;;;; +FD23;ARABIC LIGATURE DAD WITH ALEF MAKSURA FINAL FORM;Lo;0;AL; 0636 0649;;;;N;;;;; +FD24;ARABIC LIGATURE DAD WITH YEH FINAL FORM;Lo;0;AL; 0636 064A;;;;N;;;;; +FD25;ARABIC LIGATURE SHEEN WITH JEEM FINAL FORM;Lo;0;AL; 0634 062C;;;;N;;;;; +FD26;ARABIC LIGATURE SHEEN WITH HAH FINAL FORM;Lo;0;AL; 0634 062D;;;;N;;;;; +FD27;ARABIC LIGATURE SHEEN WITH KHAH FINAL FORM;Lo;0;AL; 0634 062E;;;;N;;;;; +FD28;ARABIC LIGATURE SHEEN WITH MEEM FINAL FORM;Lo;0;AL; 0634 0645;;;;N;;;;; +FD29;ARABIC LIGATURE SHEEN WITH REH FINAL FORM;Lo;0;AL; 0634 0631;;;;N;;;;; +FD2A;ARABIC LIGATURE SEEN WITH REH FINAL FORM;Lo;0;AL; 0633 0631;;;;N;;;;; +FD2B;ARABIC LIGATURE SAD WITH REH FINAL FORM;Lo;0;AL; 0635 0631;;;;N;;;;; +FD2C;ARABIC LIGATURE DAD WITH REH FINAL FORM;Lo;0;AL; 0636 0631;;;;N;;;;; +FD2D;ARABIC LIGATURE SHEEN WITH JEEM INITIAL FORM;Lo;0;AL; 0634 062C;;;;N;;;;; +FD2E;ARABIC LIGATURE SHEEN WITH HAH INITIAL FORM;Lo;0;AL; 0634 062D;;;;N;;;;; +FD2F;ARABIC LIGATURE SHEEN WITH KHAH INITIAL FORM;Lo;0;AL; 0634 062E;;;;N;;;;; +FD30;ARABIC LIGATURE SHEEN WITH MEEM INITIAL FORM;Lo;0;AL; 0634 0645;;;;N;;;;; +FD31;ARABIC LIGATURE SEEN WITH HEH INITIAL FORM;Lo;0;AL; 0633 0647;;;;N;;;;; +FD32;ARABIC LIGATURE SHEEN WITH HEH INITIAL FORM;Lo;0;AL; 0634 0647;;;;N;;;;; +FD33;ARABIC LIGATURE TAH WITH MEEM INITIAL FORM;Lo;0;AL; 0637 0645;;;;N;;;;; +FD34;ARABIC LIGATURE SEEN WITH JEEM MEDIAL FORM;Lo;0;AL; 0633 062C;;;;N;;;;; +FD35;ARABIC LIGATURE SEEN WITH HAH MEDIAL FORM;Lo;0;AL; 0633 062D;;;;N;;;;; +FD36;ARABIC LIGATURE SEEN WITH KHAH MEDIAL FORM;Lo;0;AL; 0633 062E;;;;N;;;;; +FD37;ARABIC LIGATURE SHEEN WITH JEEM MEDIAL FORM;Lo;0;AL; 0634 062C;;;;N;;;;; +FD38;ARABIC LIGATURE SHEEN WITH HAH MEDIAL FORM;Lo;0;AL; 0634 062D;;;;N;;;;; +FD39;ARABIC LIGATURE SHEEN WITH KHAH MEDIAL FORM;Lo;0;AL; 0634 062E;;;;N;;;;; +FD3A;ARABIC LIGATURE TAH WITH MEEM MEDIAL FORM;Lo;0;AL; 0637 0645;;;;N;;;;; +FD3B;ARABIC LIGATURE ZAH WITH MEEM MEDIAL FORM;Lo;0;AL; 0638 0645;;;;N;;;;; +FD3C;ARABIC LIGATURE ALEF WITH FATHATAN FINAL FORM;Lo;0;AL; 0627 064B;;;;N;;;;; +FD3D;ARABIC LIGATURE ALEF WITH FATHATAN ISOLATED FORM;Lo;0;AL; 0627 064B;;;;N;;;;; +FD3E;ORNATE LEFT PARENTHESIS;Pe;0;ON;;;;;N;;;;; +FD3F;ORNATE RIGHT PARENTHESIS;Ps;0;ON;;;;;N;;;;; +FD50;ARABIC LIGATURE TEH WITH JEEM WITH MEEM INITIAL FORM;Lo;0;AL; 062A 062C 0645;;;;N;;;;; +FD51;ARABIC LIGATURE TEH WITH HAH WITH JEEM FINAL FORM;Lo;0;AL; 062A 062D 062C;;;;N;;;;; +FD52;ARABIC LIGATURE TEH WITH HAH WITH JEEM INITIAL FORM;Lo;0;AL; 062A 062D 062C;;;;N;;;;; +FD53;ARABIC LIGATURE TEH WITH HAH WITH MEEM INITIAL FORM;Lo;0;AL; 062A 062D 0645;;;;N;;;;; +FD54;ARABIC LIGATURE TEH WITH KHAH WITH MEEM INITIAL FORM;Lo;0;AL; 062A 062E 0645;;;;N;;;;; +FD55;ARABIC LIGATURE TEH WITH MEEM WITH JEEM INITIAL FORM;Lo;0;AL; 062A 0645 062C;;;;N;;;;; +FD56;ARABIC LIGATURE TEH WITH MEEM WITH HAH INITIAL FORM;Lo;0;AL; 062A 0645 062D;;;;N;;;;; +FD57;ARABIC LIGATURE TEH WITH MEEM WITH KHAH INITIAL FORM;Lo;0;AL; 062A 0645 062E;;;;N;;;;; +FD58;ARABIC LIGATURE JEEM WITH MEEM WITH HAH FINAL FORM;Lo;0;AL; 062C 0645 062D;;;;N;;;;; +FD59;ARABIC LIGATURE JEEM WITH MEEM WITH HAH INITIAL FORM;Lo;0;AL; 062C 0645 062D;;;;N;;;;; +FD5A;ARABIC LIGATURE HAH WITH MEEM WITH YEH FINAL FORM;Lo;0;AL; 062D 0645 064A;;;;N;;;;; +FD5B;ARABIC LIGATURE HAH WITH MEEM WITH ALEF MAKSURA FINAL FORM;Lo;0;AL; 062D 0645 0649;;;;N;;;;; +FD5C;ARABIC LIGATURE SEEN WITH HAH WITH JEEM INITIAL FORM;Lo;0;AL; 0633 062D 062C;;;;N;;;;; +FD5D;ARABIC LIGATURE SEEN WITH JEEM WITH HAH INITIAL FORM;Lo;0;AL; 0633 062C 062D;;;;N;;;;; +FD5E;ARABIC LIGATURE SEEN WITH JEEM WITH ALEF MAKSURA FINAL FORM;Lo;0;AL; 0633 062C 0649;;;;N;;;;; +FD5F;ARABIC LIGATURE SEEN WITH MEEM WITH HAH FINAL FORM;Lo;0;AL; 0633 0645 062D;;;;N;;;;; +FD60;ARABIC LIGATURE SEEN WITH MEEM WITH HAH INITIAL FORM;Lo;0;AL; 0633 0645 062D;;;;N;;;;; +FD61;ARABIC LIGATURE SEEN WITH MEEM WITH JEEM INITIAL FORM;Lo;0;AL; 0633 0645 062C;;;;N;;;;; +FD62;ARABIC LIGATURE SEEN WITH MEEM WITH MEEM FINAL FORM;Lo;0;AL; 0633 0645 0645;;;;N;;;;; +FD63;ARABIC LIGATURE SEEN WITH MEEM WITH MEEM INITIAL FORM;Lo;0;AL; 0633 0645 0645;;;;N;;;;; +FD64;ARABIC LIGATURE SAD WITH HAH WITH HAH FINAL FORM;Lo;0;AL; 0635 062D 062D;;;;N;;;;; +FD65;ARABIC LIGATURE SAD WITH HAH WITH HAH INITIAL FORM;Lo;0;AL; 0635 062D 062D;;;;N;;;;; +FD66;ARABIC LIGATURE SAD WITH MEEM WITH MEEM FINAL FORM;Lo;0;AL; 0635 0645 0645;;;;N;;;;; +FD67;ARABIC LIGATURE SHEEN WITH HAH WITH MEEM FINAL FORM;Lo;0;AL; 0634 062D 0645;;;;N;;;;; +FD68;ARABIC LIGATURE SHEEN WITH HAH WITH MEEM INITIAL FORM;Lo;0;AL; 0634 062D 0645;;;;N;;;;; +FD69;ARABIC LIGATURE SHEEN WITH JEEM WITH YEH FINAL FORM;Lo;0;AL; 0634 062C 064A;;;;N;;;;; +FD6A;ARABIC LIGATURE SHEEN WITH MEEM WITH KHAH FINAL FORM;Lo;0;AL; 0634 0645 062E;;;;N;;;;; +FD6B;ARABIC LIGATURE SHEEN WITH MEEM WITH KHAH INITIAL FORM;Lo;0;AL; 0634 0645 062E;;;;N;;;;; +FD6C;ARABIC LIGATURE SHEEN WITH MEEM WITH MEEM FINAL FORM;Lo;0;AL; 0634 0645 0645;;;;N;;;;; +FD6D;ARABIC LIGATURE SHEEN WITH MEEM WITH MEEM INITIAL FORM;Lo;0;AL; 0634 0645 0645;;;;N;;;;; +FD6E;ARABIC LIGATURE DAD WITH HAH WITH ALEF MAKSURA FINAL FORM;Lo;0;AL; 0636 062D 0649;;;;N;;;;; +FD6F;ARABIC LIGATURE DAD WITH KHAH WITH MEEM FINAL FORM;Lo;0;AL; 0636 062E 0645;;;;N;;;;; +FD70;ARABIC LIGATURE DAD WITH KHAH WITH MEEM INITIAL FORM;Lo;0;AL; 0636 062E 0645;;;;N;;;;; +FD71;ARABIC LIGATURE TAH WITH MEEM WITH HAH FINAL FORM;Lo;0;AL; 0637 0645 062D;;;;N;;;;; +FD72;ARABIC LIGATURE TAH WITH MEEM WITH HAH INITIAL FORM;Lo;0;AL; 0637 0645 062D;;;;N;;;;; +FD73;ARABIC LIGATURE TAH WITH MEEM WITH MEEM INITIAL FORM;Lo;0;AL; 0637 0645 0645;;;;N;;;;; +FD74;ARABIC LIGATURE TAH WITH MEEM WITH YEH FINAL FORM;Lo;0;AL; 0637 0645 064A;;;;N;;;;; +FD75;ARABIC LIGATURE AIN WITH JEEM WITH MEEM FINAL FORM;Lo;0;AL; 0639 062C 0645;;;;N;;;;; +FD76;ARABIC LIGATURE AIN WITH MEEM WITH MEEM FINAL FORM;Lo;0;AL; 0639 0645 0645;;;;N;;;;; +FD77;ARABIC LIGATURE AIN WITH MEEM WITH MEEM INITIAL FORM;Lo;0;AL; 0639 0645 0645;;;;N;;;;; +FD78;ARABIC LIGATURE AIN WITH MEEM WITH ALEF MAKSURA FINAL FORM;Lo;0;AL; 0639 0645 0649;;;;N;;;;; +FD79;ARABIC LIGATURE GHAIN WITH MEEM WITH MEEM FINAL FORM;Lo;0;AL; 063A 0645 0645;;;;N;;;;; +FD7A;ARABIC LIGATURE GHAIN WITH MEEM WITH YEH FINAL FORM;Lo;0;AL; 063A 0645 064A;;;;N;;;;; +FD7B;ARABIC LIGATURE GHAIN WITH MEEM WITH ALEF MAKSURA FINAL FORM;Lo;0;AL; 063A 0645 0649;;;;N;;;;; +FD7C;ARABIC LIGATURE FEH WITH KHAH WITH MEEM FINAL FORM;Lo;0;AL; 0641 062E 0645;;;;N;;;;; +FD7D;ARABIC LIGATURE FEH WITH KHAH WITH MEEM INITIAL FORM;Lo;0;AL; 0641 062E 0645;;;;N;;;;; +FD7E;ARABIC LIGATURE QAF WITH MEEM WITH HAH FINAL FORM;Lo;0;AL; 0642 0645 062D;;;;N;;;;; +FD7F;ARABIC LIGATURE QAF WITH MEEM WITH MEEM FINAL FORM;Lo;0;AL; 0642 0645 0645;;;;N;;;;; +FD80;ARABIC LIGATURE LAM WITH HAH WITH MEEM FINAL FORM;Lo;0;AL; 0644 062D 0645;;;;N;;;;; +FD81;ARABIC LIGATURE LAM WITH HAH WITH YEH FINAL FORM;Lo;0;AL; 0644 062D 064A;;;;N;;;;; +FD82;ARABIC LIGATURE LAM WITH HAH WITH ALEF MAKSURA FINAL FORM;Lo;0;AL; 0644 062D 0649;;;;N;;;;; +FD83;ARABIC LIGATURE LAM WITH JEEM WITH JEEM INITIAL FORM;Lo;0;AL; 0644 062C 062C;;;;N;;;;; +FD84;ARABIC LIGATURE LAM WITH JEEM WITH JEEM FINAL FORM;Lo;0;AL; 0644 062C 062C;;;;N;;;;; +FD85;ARABIC LIGATURE LAM WITH KHAH WITH MEEM FINAL FORM;Lo;0;AL; 0644 062E 0645;;;;N;;;;; +FD86;ARABIC LIGATURE LAM WITH KHAH WITH MEEM INITIAL FORM;Lo;0;AL; 0644 062E 0645;;;;N;;;;; +FD87;ARABIC LIGATURE LAM WITH MEEM WITH HAH FINAL FORM;Lo;0;AL; 0644 0645 062D;;;;N;;;;; +FD88;ARABIC LIGATURE LAM WITH MEEM WITH HAH INITIAL FORM;Lo;0;AL; 0644 0645 062D;;;;N;;;;; +FD89;ARABIC LIGATURE MEEM WITH HAH WITH JEEM INITIAL FORM;Lo;0;AL; 0645 062D 062C;;;;N;;;;; +FD8A;ARABIC LIGATURE MEEM WITH HAH WITH MEEM INITIAL FORM;Lo;0;AL; 0645 062D 0645;;;;N;;;;; +FD8B;ARABIC LIGATURE MEEM WITH HAH WITH YEH FINAL FORM;Lo;0;AL; 0645 062D 064A;;;;N;;;;; +FD8C;ARABIC LIGATURE MEEM WITH JEEM WITH HAH INITIAL FORM;Lo;0;AL; 0645 062C 062D;;;;N;;;;; +FD8D;ARABIC LIGATURE MEEM WITH JEEM WITH MEEM INITIAL FORM;Lo;0;AL; 0645 062C 0645;;;;N;;;;; +FD8E;ARABIC LIGATURE MEEM WITH KHAH WITH JEEM INITIAL FORM;Lo;0;AL; 0645 062E 062C;;;;N;;;;; +FD8F;ARABIC LIGATURE MEEM WITH KHAH WITH MEEM INITIAL FORM;Lo;0;AL; 0645 062E 0645;;;;N;;;;; +FD92;ARABIC LIGATURE MEEM WITH JEEM WITH KHAH INITIAL FORM;Lo;0;AL; 0645 062C 062E;;;;N;;;;; +FD93;ARABIC LIGATURE HEH WITH MEEM WITH JEEM INITIAL FORM;Lo;0;AL; 0647 0645 062C;;;;N;;;;; +FD94;ARABIC LIGATURE HEH WITH MEEM WITH MEEM INITIAL FORM;Lo;0;AL; 0647 0645 0645;;;;N;;;;; +FD95;ARABIC LIGATURE NOON WITH HAH WITH MEEM INITIAL FORM;Lo;0;AL; 0646 062D 0645;;;;N;;;;; +FD96;ARABIC LIGATURE NOON WITH HAH WITH ALEF MAKSURA FINAL FORM;Lo;0;AL; 0646 062D 0649;;;;N;;;;; +FD97;ARABIC LIGATURE NOON WITH JEEM WITH MEEM FINAL FORM;Lo;0;AL; 0646 062C 0645;;;;N;;;;; +FD98;ARABIC LIGATURE NOON WITH JEEM WITH MEEM INITIAL FORM;Lo;0;AL; 0646 062C 0645;;;;N;;;;; +FD99;ARABIC LIGATURE NOON WITH JEEM WITH ALEF MAKSURA FINAL FORM;Lo;0;AL; 0646 062C 0649;;;;N;;;;; +FD9A;ARABIC LIGATURE NOON WITH MEEM WITH YEH FINAL FORM;Lo;0;AL; 0646 0645 064A;;;;N;;;;; +FD9B;ARABIC LIGATURE NOON WITH MEEM WITH ALEF MAKSURA FINAL FORM;Lo;0;AL; 0646 0645 0649;;;;N;;;;; +FD9C;ARABIC LIGATURE YEH WITH MEEM WITH MEEM FINAL FORM;Lo;0;AL; 064A 0645 0645;;;;N;;;;; +FD9D;ARABIC LIGATURE YEH WITH MEEM WITH MEEM INITIAL FORM;Lo;0;AL; 064A 0645 0645;;;;N;;;;; +FD9E;ARABIC LIGATURE BEH WITH KHAH WITH YEH FINAL FORM;Lo;0;AL; 0628 062E 064A;;;;N;;;;; +FD9F;ARABIC LIGATURE TEH WITH JEEM WITH YEH FINAL FORM;Lo;0;AL; 062A 062C 064A;;;;N;;;;; +FDA0;ARABIC LIGATURE TEH WITH JEEM WITH ALEF MAKSURA FINAL FORM;Lo;0;AL; 062A 062C 0649;;;;N;;;;; +FDA1;ARABIC LIGATURE TEH WITH KHAH WITH YEH FINAL FORM;Lo;0;AL; 062A 062E 064A;;;;N;;;;; +FDA2;ARABIC LIGATURE TEH WITH KHAH WITH ALEF MAKSURA FINAL FORM;Lo;0;AL; 062A 062E 0649;;;;N;;;;; +FDA3;ARABIC LIGATURE TEH WITH MEEM WITH YEH FINAL FORM;Lo;0;AL; 062A 0645 064A;;;;N;;;;; +FDA4;ARABIC LIGATURE TEH WITH MEEM WITH ALEF MAKSURA FINAL FORM;Lo;0;AL; 062A 0645 0649;;;;N;;;;; +FDA5;ARABIC LIGATURE JEEM WITH MEEM WITH YEH FINAL FORM;Lo;0;AL; 062C 0645 064A;;;;N;;;;; +FDA6;ARABIC LIGATURE JEEM WITH HAH WITH ALEF MAKSURA FINAL FORM;Lo;0;AL; 062C 062D 0649;;;;N;;;;; +FDA7;ARABIC LIGATURE JEEM WITH MEEM WITH ALEF MAKSURA FINAL FORM;Lo;0;AL; 062C 0645 0649;;;;N;;;;; +FDA8;ARABIC LIGATURE SEEN WITH KHAH WITH ALEF MAKSURA FINAL FORM;Lo;0;AL; 0633 062E 0649;;;;N;;;;; +FDA9;ARABIC LIGATURE SAD WITH HAH WITH YEH FINAL FORM;Lo;0;AL; 0635 062D 064A;;;;N;;;;; +FDAA;ARABIC LIGATURE SHEEN WITH HAH WITH YEH FINAL FORM;Lo;0;AL; 0634 062D 064A;;;;N;;;;; +FDAB;ARABIC LIGATURE DAD WITH HAH WITH YEH FINAL FORM;Lo;0;AL; 0636 062D 064A;;;;N;;;;; +FDAC;ARABIC LIGATURE LAM WITH JEEM WITH YEH FINAL FORM;Lo;0;AL; 0644 062C 064A;;;;N;;;;; +FDAD;ARABIC LIGATURE LAM WITH MEEM WITH YEH FINAL FORM;Lo;0;AL; 0644 0645 064A;;;;N;;;;; +FDAE;ARABIC LIGATURE YEH WITH HAH WITH YEH FINAL FORM;Lo;0;AL; 064A 062D 064A;;;;N;;;;; +FDAF;ARABIC LIGATURE YEH WITH JEEM WITH YEH FINAL FORM;Lo;0;AL; 064A 062C 064A;;;;N;;;;; +FDB0;ARABIC LIGATURE YEH WITH MEEM WITH YEH FINAL FORM;Lo;0;AL; 064A 0645 064A;;;;N;;;;; +FDB1;ARABIC LIGATURE MEEM WITH MEEM WITH YEH FINAL FORM;Lo;0;AL; 0645 0645 064A;;;;N;;;;; +FDB2;ARABIC LIGATURE QAF WITH MEEM WITH YEH FINAL FORM;Lo;0;AL; 0642 0645 064A;;;;N;;;;; +FDB3;ARABIC LIGATURE NOON WITH HAH WITH YEH FINAL FORM;Lo;0;AL; 0646 062D 064A;;;;N;;;;; +FDB4;ARABIC LIGATURE QAF WITH MEEM WITH HAH INITIAL FORM;Lo;0;AL; 0642 0645 062D;;;;N;;;;; +FDB5;ARABIC LIGATURE LAM WITH HAH WITH MEEM INITIAL FORM;Lo;0;AL; 0644 062D 0645;;;;N;;;;; +FDB6;ARABIC LIGATURE AIN WITH MEEM WITH YEH FINAL FORM;Lo;0;AL; 0639 0645 064A;;;;N;;;;; +FDB7;ARABIC LIGATURE KAF WITH MEEM WITH YEH FINAL FORM;Lo;0;AL; 0643 0645 064A;;;;N;;;;; +FDB8;ARABIC LIGATURE NOON WITH JEEM WITH HAH INITIAL FORM;Lo;0;AL; 0646 062C 062D;;;;N;;;;; +FDB9;ARABIC LIGATURE MEEM WITH KHAH WITH YEH FINAL FORM;Lo;0;AL; 0645 062E 064A;;;;N;;;;; +FDBA;ARABIC LIGATURE LAM WITH JEEM WITH MEEM INITIAL FORM;Lo;0;AL; 0644 062C 0645;;;;N;;;;; +FDBB;ARABIC LIGATURE KAF WITH MEEM WITH MEEM FINAL FORM;Lo;0;AL; 0643 0645 0645;;;;N;;;;; +FDBC;ARABIC LIGATURE LAM WITH JEEM WITH MEEM FINAL FORM;Lo;0;AL; 0644 062C 0645;;;;N;;;;; +FDBD;ARABIC LIGATURE NOON WITH JEEM WITH HAH FINAL FORM;Lo;0;AL; 0646 062C 062D;;;;N;;;;; +FDBE;ARABIC LIGATURE JEEM WITH HAH WITH YEH FINAL FORM;Lo;0;AL; 062C 062D 064A;;;;N;;;;; +FDBF;ARABIC LIGATURE HAH WITH JEEM WITH YEH FINAL FORM;Lo;0;AL; 062D 062C 064A;;;;N;;;;; +FDC0;ARABIC LIGATURE MEEM WITH JEEM WITH YEH FINAL FORM;Lo;0;AL; 0645 062C 064A;;;;N;;;;; +FDC1;ARABIC LIGATURE FEH WITH MEEM WITH YEH FINAL FORM;Lo;0;AL; 0641 0645 064A;;;;N;;;;; +FDC2;ARABIC LIGATURE BEH WITH HAH WITH YEH FINAL FORM;Lo;0;AL; 0628 062D 064A;;;;N;;;;; +FDC3;ARABIC LIGATURE KAF WITH MEEM WITH MEEM INITIAL FORM;Lo;0;AL; 0643 0645 0645;;;;N;;;;; +FDC4;ARABIC LIGATURE AIN WITH JEEM WITH MEEM INITIAL FORM;Lo;0;AL; 0639 062C 0645;;;;N;;;;; +FDC5;ARABIC LIGATURE SAD WITH MEEM WITH MEEM INITIAL FORM;Lo;0;AL; 0635 0645 0645;;;;N;;;;; +FDC6;ARABIC LIGATURE SEEN WITH KHAH WITH YEH FINAL FORM;Lo;0;AL; 0633 062E 064A;;;;N;;;;; +FDC7;ARABIC LIGATURE NOON WITH JEEM WITH YEH FINAL FORM;Lo;0;AL; 0646 062C 064A;;;;N;;;;; +FDF0;ARABIC LIGATURE SALLA USED AS KORANIC STOP SIGN ISOLATED FORM;Lo;0;AL; 0635 0644 06D2;;;;N;;;;; +FDF1;ARABIC LIGATURE QALA USED AS KORANIC STOP SIGN ISOLATED FORM;Lo;0;AL; 0642 0644 06D2;;;;N;;;;; +FDF2;ARABIC LIGATURE ALLAH ISOLATED FORM;Lo;0;AL; 0627 0644 0644 0647;;;;N;;;;; +FDF3;ARABIC LIGATURE AKBAR ISOLATED FORM;Lo;0;AL; 0627 0643 0628 0631;;;;N;;;;; +FDF4;ARABIC LIGATURE MOHAMMAD ISOLATED FORM;Lo;0;AL; 0645 062D 0645 062F;;;;N;;;;; +FDF5;ARABIC LIGATURE SALAM ISOLATED FORM;Lo;0;AL; 0635 0644 0639 0645;;;;N;;;;; +FDF6;ARABIC LIGATURE RASOUL ISOLATED FORM;Lo;0;AL; 0631 0633 0648 0644;;;;N;;;;; +FDF7;ARABIC LIGATURE ALAYHE ISOLATED FORM;Lo;0;AL; 0639 0644 064A 0647;;;;N;;;;; +FDF8;ARABIC LIGATURE WASALLAM ISOLATED FORM;Lo;0;AL; 0648 0633 0644 0645;;;;N;;;;; +FDF9;ARABIC LIGATURE SALLA ISOLATED FORM;Lo;0;AL; 0635 0644 0649;;;;N;;;;; +FDFA;ARABIC LIGATURE SALLALLAHOU ALAYHE WASALLAM;Lo;0;AL; 0635 0644 0649 0020 0627 0644 0644 0647 0020 0639 0644 064A 0647 0020 0648 0633 0644 0645;;;;N;ARABIC LETTER SALLALLAHOU ALAYHE WASALLAM;;;; +FDFB;ARABIC LIGATURE JALLAJALALOUHOU;Lo;0;AL; 062C 0644 0020 062C 0644 0627 0644 0647;;;;N;ARABIC LETTER JALLAJALALOUHOU;;;; +FDFC;RIAL SIGN;Sc;0;AL; 0631 06CC 0627 0644;;;;N;;;;; +FDFD;ARABIC LIGATURE BISMILLAH AR-RAHMAN AR-RAHEEM;So;0;ON;;;;;N;;;;; +FE00;VARIATION SELECTOR-1;Mn;0;NSM;;;;;N;;;;; +FE01;VARIATION SELECTOR-2;Mn;0;NSM;;;;;N;;;;; +FE02;VARIATION SELECTOR-3;Mn;0;NSM;;;;;N;;;;; +FE03;VARIATION SELECTOR-4;Mn;0;NSM;;;;;N;;;;; +FE04;VARIATION SELECTOR-5;Mn;0;NSM;;;;;N;;;;; +FE05;VARIATION SELECTOR-6;Mn;0;NSM;;;;;N;;;;; +FE06;VARIATION SELECTOR-7;Mn;0;NSM;;;;;N;;;;; +FE07;VARIATION SELECTOR-8;Mn;0;NSM;;;;;N;;;;; +FE08;VARIATION SELECTOR-9;Mn;0;NSM;;;;;N;;;;; +FE09;VARIATION SELECTOR-10;Mn;0;NSM;;;;;N;;;;; +FE0A;VARIATION SELECTOR-11;Mn;0;NSM;;;;;N;;;;; +FE0B;VARIATION SELECTOR-12;Mn;0;NSM;;;;;N;;;;; +FE0C;VARIATION SELECTOR-13;Mn;0;NSM;;;;;N;;;;; +FE0D;VARIATION SELECTOR-14;Mn;0;NSM;;;;;N;;;;; +FE0E;VARIATION SELECTOR-15;Mn;0;NSM;;;;;N;;;;; +FE0F;VARIATION SELECTOR-16;Mn;0;NSM;;;;;N;;;;; +FE10;PRESENTATION FORM FOR VERTICAL COMMA;Po;0;ON; 002C;;;;N;;;;; +FE11;PRESENTATION FORM FOR VERTICAL IDEOGRAPHIC COMMA;Po;0;ON; 3001;;;;N;;;;; +FE12;PRESENTATION FORM FOR VERTICAL IDEOGRAPHIC FULL STOP;Po;0;ON; 3002;;;;N;;;;; +FE13;PRESENTATION FORM FOR VERTICAL COLON;Po;0;ON; 003A;;;;N;;;;; +FE14;PRESENTATION FORM FOR VERTICAL SEMICOLON;Po;0;ON; 003B;;;;N;;;;; +FE15;PRESENTATION FORM FOR VERTICAL EXCLAMATION MARK;Po;0;ON; 0021;;;;N;;;;; +FE16;PRESENTATION FORM FOR VERTICAL QUESTION MARK;Po;0;ON; 003F;;;;N;;;;; +FE17;PRESENTATION FORM FOR VERTICAL LEFT WHITE LENTICULAR BRACKET;Ps;0;ON; 3016;;;;N;;;;; +FE18;PRESENTATION FORM FOR VERTICAL RIGHT WHITE LENTICULAR BRAKCET;Pe;0;ON; 3017;;;;N;;;;; +FE19;PRESENTATION FORM FOR VERTICAL HORIZONTAL ELLIPSIS;Po;0;ON; 2026;;;;N;;;;; +FE20;COMBINING LIGATURE LEFT HALF;Mn;230;NSM;;;;;N;;;;; +FE21;COMBINING LIGATURE RIGHT HALF;Mn;230;NSM;;;;;N;;;;; +FE22;COMBINING DOUBLE TILDE LEFT HALF;Mn;230;NSM;;;;;N;;;;; +FE23;COMBINING DOUBLE TILDE RIGHT HALF;Mn;230;NSM;;;;;N;;;;; +FE24;COMBINING MACRON LEFT HALF;Mn;230;NSM;;;;;N;;;;; +FE25;COMBINING MACRON RIGHT HALF;Mn;230;NSM;;;;;N;;;;; +FE26;COMBINING CONJOINING MACRON;Mn;230;NSM;;;;;N;;;;; +FE27;COMBINING LIGATURE LEFT HALF BELOW;Mn;220;NSM;;;;;N;;;;; +FE28;COMBINING LIGATURE RIGHT HALF BELOW;Mn;220;NSM;;;;;N;;;;; +FE29;COMBINING TILDE LEFT HALF BELOW;Mn;220;NSM;;;;;N;;;;; +FE2A;COMBINING TILDE RIGHT HALF BELOW;Mn;220;NSM;;;;;N;;;;; +FE2B;COMBINING MACRON LEFT HALF BELOW;Mn;220;NSM;;;;;N;;;;; +FE2C;COMBINING MACRON RIGHT HALF BELOW;Mn;220;NSM;;;;;N;;;;; +FE2D;COMBINING CONJOINING MACRON BELOW;Mn;220;NSM;;;;;N;;;;; +FE2E;COMBINING CYRILLIC TITLO LEFT HALF;Mn;230;NSM;;;;;N;;;;; +FE2F;COMBINING CYRILLIC TITLO RIGHT HALF;Mn;230;NSM;;;;;N;;;;; +FE30;PRESENTATION FORM FOR VERTICAL TWO DOT LEADER;Po;0;ON; 2025;;;;N;GLYPH FOR VERTICAL TWO DOT LEADER;;;; +FE31;PRESENTATION FORM FOR VERTICAL EM DASH;Pd;0;ON; 2014;;;;N;GLYPH FOR VERTICAL EM DASH;;;; +FE32;PRESENTATION FORM FOR VERTICAL EN DASH;Pd;0;ON; 2013;;;;N;GLYPH FOR VERTICAL EN DASH;;;; +FE33;PRESENTATION FORM FOR VERTICAL LOW LINE;Pc;0;ON; 005F;;;;N;GLYPH FOR VERTICAL SPACING UNDERSCORE;;;; +FE34;PRESENTATION FORM FOR VERTICAL WAVY LOW LINE;Pc;0;ON; 005F;;;;N;GLYPH FOR VERTICAL SPACING WAVY UNDERSCORE;;;; +FE35;PRESENTATION FORM FOR VERTICAL LEFT PARENTHESIS;Ps;0;ON; 0028;;;;N;GLYPH FOR VERTICAL OPENING PARENTHESIS;;;; +FE36;PRESENTATION FORM FOR VERTICAL RIGHT PARENTHESIS;Pe;0;ON; 0029;;;;N;GLYPH FOR VERTICAL CLOSING PARENTHESIS;;;; +FE37;PRESENTATION FORM FOR VERTICAL LEFT CURLY BRACKET;Ps;0;ON; 007B;;;;N;GLYPH FOR VERTICAL OPENING CURLY BRACKET;;;; +FE38;PRESENTATION FORM FOR VERTICAL RIGHT CURLY BRACKET;Pe;0;ON; 007D;;;;N;GLYPH FOR VERTICAL CLOSING CURLY BRACKET;;;; +FE39;PRESENTATION FORM FOR VERTICAL LEFT TORTOISE SHELL BRACKET;Ps;0;ON; 3014;;;;N;GLYPH FOR VERTICAL OPENING TORTOISE SHELL BRACKET;;;; +FE3A;PRESENTATION FORM FOR VERTICAL RIGHT TORTOISE SHELL BRACKET;Pe;0;ON; 3015;;;;N;GLYPH FOR VERTICAL CLOSING TORTOISE SHELL BRACKET;;;; +FE3B;PRESENTATION FORM FOR VERTICAL LEFT BLACK LENTICULAR BRACKET;Ps;0;ON; 3010;;;;N;GLYPH FOR VERTICAL OPENING BLACK LENTICULAR BRACKET;;;; +FE3C;PRESENTATION FORM FOR VERTICAL RIGHT BLACK LENTICULAR BRACKET;Pe;0;ON; 3011;;;;N;GLYPH FOR VERTICAL CLOSING BLACK LENTICULAR BRACKET;;;; +FE3D;PRESENTATION FORM FOR VERTICAL LEFT DOUBLE ANGLE BRACKET;Ps;0;ON; 300A;;;;N;GLYPH FOR VERTICAL OPENING DOUBLE ANGLE BRACKET;;;; +FE3E;PRESENTATION FORM FOR VERTICAL RIGHT DOUBLE ANGLE BRACKET;Pe;0;ON; 300B;;;;N;GLYPH FOR VERTICAL CLOSING DOUBLE ANGLE BRACKET;;;; +FE3F;PRESENTATION FORM FOR VERTICAL LEFT ANGLE BRACKET;Ps;0;ON; 3008;;;;N;GLYPH FOR VERTICAL OPENING ANGLE BRACKET;;;; +FE40;PRESENTATION FORM FOR VERTICAL RIGHT ANGLE BRACKET;Pe;0;ON; 3009;;;;N;GLYPH FOR VERTICAL CLOSING ANGLE BRACKET;;;; +FE41;PRESENTATION FORM FOR VERTICAL LEFT CORNER BRACKET;Ps;0;ON; 300C;;;;N;GLYPH FOR VERTICAL OPENING CORNER BRACKET;;;; +FE42;PRESENTATION FORM FOR VERTICAL RIGHT CORNER BRACKET;Pe;0;ON; 300D;;;;N;GLYPH FOR VERTICAL CLOSING CORNER BRACKET;;;; +FE43;PRESENTATION FORM FOR VERTICAL LEFT WHITE CORNER BRACKET;Ps;0;ON; 300E;;;;N;GLYPH FOR VERTICAL OPENING WHITE CORNER BRACKET;;;; +FE44;PRESENTATION FORM FOR VERTICAL RIGHT WHITE CORNER BRACKET;Pe;0;ON; 300F;;;;N;GLYPH FOR VERTICAL CLOSING WHITE CORNER BRACKET;;;; +FE45;SESAME DOT;Po;0;ON;;;;;N;;;;; +FE46;WHITE SESAME DOT;Po;0;ON;;;;;N;;;;; +FE47;PRESENTATION FORM FOR VERTICAL LEFT SQUARE BRACKET;Ps;0;ON; 005B;;;;N;;;;; +FE48;PRESENTATION FORM FOR VERTICAL RIGHT SQUARE BRACKET;Pe;0;ON; 005D;;;;N;;;;; +FE49;DASHED OVERLINE;Po;0;ON; 203E;;;;N;SPACING DASHED OVERSCORE;;;; +FE4A;CENTRELINE OVERLINE;Po;0;ON; 203E;;;;N;SPACING CENTERLINE OVERSCORE;;;; +FE4B;WAVY OVERLINE;Po;0;ON; 203E;;;;N;SPACING WAVY OVERSCORE;;;; +FE4C;DOUBLE WAVY OVERLINE;Po;0;ON; 203E;;;;N;SPACING DOUBLE WAVY OVERSCORE;;;; +FE4D;DASHED LOW LINE;Pc;0;ON; 005F;;;;N;SPACING DASHED UNDERSCORE;;;; +FE4E;CENTRELINE LOW LINE;Pc;0;ON; 005F;;;;N;SPACING CENTERLINE UNDERSCORE;;;; +FE4F;WAVY LOW LINE;Pc;0;ON; 005F;;;;N;SPACING WAVY UNDERSCORE;;;; +FE50;SMALL COMMA;Po;0;CS; 002C;;;;N;;;;; +FE51;SMALL IDEOGRAPHIC COMMA;Po;0;ON; 3001;;;;N;;;;; +FE52;SMALL FULL STOP;Po;0;CS; 002E;;;;N;SMALL PERIOD;;;; +FE54;SMALL SEMICOLON;Po;0;ON; 003B;;;;N;;;;; +FE55;SMALL COLON;Po;0;CS; 003A;;;;N;;;;; +FE56;SMALL QUESTION MARK;Po;0;ON; 003F;;;;N;;;;; +FE57;SMALL EXCLAMATION MARK;Po;0;ON; 0021;;;;N;;;;; +FE58;SMALL EM DASH;Pd;0;ON; 2014;;;;N;;;;; +FE59;SMALL LEFT PARENTHESIS;Ps;0;ON; 0028;;;;Y;SMALL OPENING PARENTHESIS;;;; +FE5A;SMALL RIGHT PARENTHESIS;Pe;0;ON; 0029;;;;Y;SMALL CLOSING PARENTHESIS;;;; +FE5B;SMALL LEFT CURLY BRACKET;Ps;0;ON; 007B;;;;Y;SMALL OPENING CURLY BRACKET;;;; +FE5C;SMALL RIGHT CURLY BRACKET;Pe;0;ON; 007D;;;;Y;SMALL CLOSING CURLY BRACKET;;;; +FE5D;SMALL LEFT TORTOISE SHELL BRACKET;Ps;0;ON; 3014;;;;Y;SMALL OPENING TORTOISE SHELL BRACKET;;;; +FE5E;SMALL RIGHT TORTOISE SHELL BRACKET;Pe;0;ON; 3015;;;;Y;SMALL CLOSING TORTOISE SHELL BRACKET;;;; +FE5F;SMALL NUMBER SIGN;Po;0;ET; 0023;;;;N;;;;; +FE60;SMALL AMPERSAND;Po;0;ON; 0026;;;;N;;;;; +FE61;SMALL ASTERISK;Po;0;ON; 002A;;;;N;;;;; +FE62;SMALL PLUS SIGN;Sm;0;ES; 002B;;;;N;;;;; +FE63;SMALL HYPHEN-MINUS;Pd;0;ES; 002D;;;;N;;;;; +FE64;SMALL LESS-THAN SIGN;Sm;0;ON; 003C;;;;Y;;;;; +FE65;SMALL GREATER-THAN SIGN;Sm;0;ON; 003E;;;;Y;;;;; +FE66;SMALL EQUALS SIGN;Sm;0;ON; 003D;;;;N;;;;; +FE68;SMALL REVERSE SOLIDUS;Po;0;ON; 005C;;;;N;SMALL BACKSLASH;;;; +FE69;SMALL DOLLAR SIGN;Sc;0;ET; 0024;;;;N;;;;; +FE6A;SMALL PERCENT SIGN;Po;0;ET; 0025;;;;N;;;;; +FE6B;SMALL COMMERCIAL AT;Po;0;ON; 0040;;;;N;;;;; +FE70;ARABIC FATHATAN ISOLATED FORM;Lo;0;AL; 0020 064B;;;;N;ARABIC SPACING FATHATAN;;;; +FE71;ARABIC TATWEEL WITH FATHATAN ABOVE;Lo;0;AL; 0640 064B;;;;N;ARABIC FATHATAN ON TATWEEL;;;; +FE72;ARABIC DAMMATAN ISOLATED FORM;Lo;0;AL; 0020 064C;;;;N;ARABIC SPACING DAMMATAN;;;; +FE73;ARABIC TAIL FRAGMENT;Lo;0;AL;;;;;N;;;;; +FE74;ARABIC KASRATAN ISOLATED FORM;Lo;0;AL; 0020 064D;;;;N;ARABIC SPACING KASRATAN;;;; +FE76;ARABIC FATHA ISOLATED FORM;Lo;0;AL; 0020 064E;;;;N;ARABIC SPACING FATHAH;;;; +FE77;ARABIC FATHA MEDIAL FORM;Lo;0;AL; 0640 064E;;;;N;ARABIC FATHAH ON TATWEEL;;;; +FE78;ARABIC DAMMA ISOLATED FORM;Lo;0;AL; 0020 064F;;;;N;ARABIC SPACING DAMMAH;;;; +FE79;ARABIC DAMMA MEDIAL FORM;Lo;0;AL; 0640 064F;;;;N;ARABIC DAMMAH ON TATWEEL;;;; +FE7A;ARABIC KASRA ISOLATED FORM;Lo;0;AL; 0020 0650;;;;N;ARABIC SPACING KASRAH;;;; +FE7B;ARABIC KASRA MEDIAL FORM;Lo;0;AL; 0640 0650;;;;N;ARABIC KASRAH ON TATWEEL;;;; +FE7C;ARABIC SHADDA ISOLATED FORM;Lo;0;AL; 0020 0651;;;;N;ARABIC SPACING SHADDAH;;;; +FE7D;ARABIC SHADDA MEDIAL FORM;Lo;0;AL; 0640 0651;;;;N;ARABIC SHADDAH ON TATWEEL;;;; +FE7E;ARABIC SUKUN ISOLATED FORM;Lo;0;AL; 0020 0652;;;;N;ARABIC SPACING SUKUN;;;; +FE7F;ARABIC SUKUN MEDIAL FORM;Lo;0;AL; 0640 0652;;;;N;ARABIC SUKUN ON TATWEEL;;;; +FE80;ARABIC LETTER HAMZA ISOLATED FORM;Lo;0;AL; 0621;;;;N;GLYPH FOR ISOLATE ARABIC HAMZAH;;;; +FE81;ARABIC LETTER ALEF WITH MADDA ABOVE ISOLATED FORM;Lo;0;AL; 0622;;;;N;GLYPH FOR ISOLATE ARABIC MADDAH ON ALEF;;;; +FE82;ARABIC LETTER ALEF WITH MADDA ABOVE FINAL FORM;Lo;0;AL; 0622;;;;N;GLYPH FOR FINAL ARABIC MADDAH ON ALEF;;;; +FE83;ARABIC LETTER ALEF WITH HAMZA ABOVE ISOLATED FORM;Lo;0;AL; 0623;;;;N;GLYPH FOR ISOLATE ARABIC HAMZAH ON ALEF;;;; +FE84;ARABIC LETTER ALEF WITH HAMZA ABOVE FINAL FORM;Lo;0;AL; 0623;;;;N;GLYPH FOR FINAL ARABIC HAMZAH ON ALEF;;;; +FE85;ARABIC LETTER WAW WITH HAMZA ABOVE ISOLATED FORM;Lo;0;AL; 0624;;;;N;GLYPH FOR ISOLATE ARABIC HAMZAH ON WAW;;;; +FE86;ARABIC LETTER WAW WITH HAMZA ABOVE FINAL FORM;Lo;0;AL; 0624;;;;N;GLYPH FOR FINAL ARABIC HAMZAH ON WAW;;;; +FE87;ARABIC LETTER ALEF WITH HAMZA BELOW ISOLATED FORM;Lo;0;AL; 0625;;;;N;GLYPH FOR ISOLATE ARABIC HAMZAH UNDER ALEF;;;; +FE88;ARABIC LETTER ALEF WITH HAMZA BELOW FINAL FORM;Lo;0;AL; 0625;;;;N;GLYPH FOR FINAL ARABIC HAMZAH UNDER ALEF;;;; +FE89;ARABIC LETTER YEH WITH HAMZA ABOVE ISOLATED FORM;Lo;0;AL; 0626;;;;N;GLYPH FOR ISOLATE ARABIC HAMZAH ON YA;;;; +FE8A;ARABIC LETTER YEH WITH HAMZA ABOVE FINAL FORM;Lo;0;AL; 0626;;;;N;GLYPH FOR FINAL ARABIC HAMZAH ON YA;;;; +FE8B;ARABIC LETTER YEH WITH HAMZA ABOVE INITIAL FORM;Lo;0;AL; 0626;;;;N;GLYPH FOR INITIAL ARABIC HAMZAH ON YA;;;; +FE8C;ARABIC LETTER YEH WITH HAMZA ABOVE MEDIAL FORM;Lo;0;AL; 0626;;;;N;GLYPH FOR MEDIAL ARABIC HAMZAH ON YA;;;; +FE8D;ARABIC LETTER ALEF ISOLATED FORM;Lo;0;AL; 0627;;;;N;GLYPH FOR ISOLATE ARABIC ALEF;;;; +FE8E;ARABIC LETTER ALEF FINAL FORM;Lo;0;AL; 0627;;;;N;GLYPH FOR FINAL ARABIC ALEF;;;; +FE8F;ARABIC LETTER BEH ISOLATED FORM;Lo;0;AL; 0628;;;;N;GLYPH FOR ISOLATE ARABIC BAA;;;; +FE90;ARABIC LETTER BEH FINAL FORM;Lo;0;AL; 0628;;;;N;GLYPH FOR FINAL ARABIC BAA;;;; +FE91;ARABIC LETTER BEH INITIAL FORM;Lo;0;AL; 0628;;;;N;GLYPH FOR INITIAL ARABIC BAA;;;; +FE92;ARABIC LETTER BEH MEDIAL FORM;Lo;0;AL; 0628;;;;N;GLYPH FOR MEDIAL ARABIC BAA;;;; +FE93;ARABIC LETTER TEH MARBUTA ISOLATED FORM;Lo;0;AL; 0629;;;;N;GLYPH FOR ISOLATE ARABIC TAA MARBUTAH;;;; +FE94;ARABIC LETTER TEH MARBUTA FINAL FORM;Lo;0;AL; 0629;;;;N;GLYPH FOR FINAL ARABIC TAA MARBUTAH;;;; +FE95;ARABIC LETTER TEH ISOLATED FORM;Lo;0;AL; 062A;;;;N;GLYPH FOR ISOLATE ARABIC TAA;;;; +FE96;ARABIC LETTER TEH FINAL FORM;Lo;0;AL; 062A;;;;N;GLYPH FOR FINAL ARABIC TAA;;;; +FE97;ARABIC LETTER TEH INITIAL FORM;Lo;0;AL; 062A;;;;N;GLYPH FOR INITIAL ARABIC TAA;;;; +FE98;ARABIC LETTER TEH MEDIAL FORM;Lo;0;AL; 062A;;;;N;GLYPH FOR MEDIAL ARABIC TAA;;;; +FE99;ARABIC LETTER THEH ISOLATED FORM;Lo;0;AL; 062B;;;;N;GLYPH FOR ISOLATE ARABIC THAA;;;; +FE9A;ARABIC LETTER THEH FINAL FORM;Lo;0;AL; 062B;;;;N;GLYPH FOR FINAL ARABIC THAA;;;; +FE9B;ARABIC LETTER THEH INITIAL FORM;Lo;0;AL; 062B;;;;N;GLYPH FOR INITIAL ARABIC THAA;;;; +FE9C;ARABIC LETTER THEH MEDIAL FORM;Lo;0;AL; 062B;;;;N;GLYPH FOR MEDIAL ARABIC THAA;;;; +FE9D;ARABIC LETTER JEEM ISOLATED FORM;Lo;0;AL; 062C;;;;N;GLYPH FOR ISOLATE ARABIC JEEM;;;; +FE9E;ARABIC LETTER JEEM FINAL FORM;Lo;0;AL; 062C;;;;N;GLYPH FOR FINAL ARABIC JEEM;;;; +FE9F;ARABIC LETTER JEEM INITIAL FORM;Lo;0;AL; 062C;;;;N;GLYPH FOR INITIAL ARABIC JEEM;;;; +FEA0;ARABIC LETTER JEEM MEDIAL FORM;Lo;0;AL; 062C;;;;N;GLYPH FOR MEDIAL ARABIC JEEM;;;; +FEA1;ARABIC LETTER HAH ISOLATED FORM;Lo;0;AL; 062D;;;;N;GLYPH FOR ISOLATE ARABIC HAA;;;; +FEA2;ARABIC LETTER HAH FINAL FORM;Lo;0;AL; 062D;;;;N;GLYPH FOR FINAL ARABIC HAA;;;; +FEA3;ARABIC LETTER HAH INITIAL FORM;Lo;0;AL; 062D;;;;N;GLYPH FOR INITIAL ARABIC HAA;;;; +FEA4;ARABIC LETTER HAH MEDIAL FORM;Lo;0;AL; 062D;;;;N;GLYPH FOR MEDIAL ARABIC HAA;;;; +FEA5;ARABIC LETTER KHAH ISOLATED FORM;Lo;0;AL; 062E;;;;N;GLYPH FOR ISOLATE ARABIC KHAA;;;; +FEA6;ARABIC LETTER KHAH FINAL FORM;Lo;0;AL; 062E;;;;N;GLYPH FOR FINAL ARABIC KHAA;;;; +FEA7;ARABIC LETTER KHAH INITIAL FORM;Lo;0;AL; 062E;;;;N;GLYPH FOR INITIAL ARABIC KHAA;;;; +FEA8;ARABIC LETTER KHAH MEDIAL FORM;Lo;0;AL; 062E;;;;N;GLYPH FOR MEDIAL ARABIC KHAA;;;; +FEA9;ARABIC LETTER DAL ISOLATED FORM;Lo;0;AL; 062F;;;;N;GLYPH FOR ISOLATE ARABIC DAL;;;; +FEAA;ARABIC LETTER DAL FINAL FORM;Lo;0;AL; 062F;;;;N;GLYPH FOR FINAL ARABIC DAL;;;; +FEAB;ARABIC LETTER THAL ISOLATED FORM;Lo;0;AL; 0630;;;;N;GLYPH FOR ISOLATE ARABIC THAL;;;; +FEAC;ARABIC LETTER THAL FINAL FORM;Lo;0;AL; 0630;;;;N;GLYPH FOR FINAL ARABIC THAL;;;; +FEAD;ARABIC LETTER REH ISOLATED FORM;Lo;0;AL; 0631;;;;N;GLYPH FOR ISOLATE ARABIC RA;;;; +FEAE;ARABIC LETTER REH FINAL FORM;Lo;0;AL; 0631;;;;N;GLYPH FOR FINAL ARABIC RA;;;; +FEAF;ARABIC LETTER ZAIN ISOLATED FORM;Lo;0;AL; 0632;;;;N;GLYPH FOR ISOLATE ARABIC ZAIN;;;; +FEB0;ARABIC LETTER ZAIN FINAL FORM;Lo;0;AL; 0632;;;;N;GLYPH FOR FINAL ARABIC ZAIN;;;; +FEB1;ARABIC LETTER SEEN ISOLATED FORM;Lo;0;AL; 0633;;;;N;GLYPH FOR ISOLATE ARABIC SEEN;;;; +FEB2;ARABIC LETTER SEEN FINAL FORM;Lo;0;AL; 0633;;;;N;GLYPH FOR FINAL ARABIC SEEN;;;; +FEB3;ARABIC LETTER SEEN INITIAL FORM;Lo;0;AL; 0633;;;;N;GLYPH FOR INITIAL ARABIC SEEN;;;; +FEB4;ARABIC LETTER SEEN MEDIAL FORM;Lo;0;AL; 0633;;;;N;GLYPH FOR MEDIAL ARABIC SEEN;;;; +FEB5;ARABIC LETTER SHEEN ISOLATED FORM;Lo;0;AL; 0634;;;;N;GLYPH FOR ISOLATE ARABIC SHEEN;;;; +FEB6;ARABIC LETTER SHEEN FINAL FORM;Lo;0;AL; 0634;;;;N;GLYPH FOR FINAL ARABIC SHEEN;;;; +FEB7;ARABIC LETTER SHEEN INITIAL FORM;Lo;0;AL; 0634;;;;N;GLYPH FOR INITIAL ARABIC SHEEN;;;; +FEB8;ARABIC LETTER SHEEN MEDIAL FORM;Lo;0;AL; 0634;;;;N;GLYPH FOR MEDIAL ARABIC SHEEN;;;; +FEB9;ARABIC LETTER SAD ISOLATED FORM;Lo;0;AL; 0635;;;;N;GLYPH FOR ISOLATE ARABIC SAD;;;; +FEBA;ARABIC LETTER SAD FINAL FORM;Lo;0;AL; 0635;;;;N;GLYPH FOR FINAL ARABIC SAD;;;; +FEBB;ARABIC LETTER SAD INITIAL FORM;Lo;0;AL; 0635;;;;N;GLYPH FOR INITIAL ARABIC SAD;;;; +FEBC;ARABIC LETTER SAD MEDIAL FORM;Lo;0;AL; 0635;;;;N;GLYPH FOR MEDIAL ARABIC SAD;;;; +FEBD;ARABIC LETTER DAD ISOLATED FORM;Lo;0;AL; 0636;;;;N;GLYPH FOR ISOLATE ARABIC DAD;;;; +FEBE;ARABIC LETTER DAD FINAL FORM;Lo;0;AL; 0636;;;;N;GLYPH FOR FINAL ARABIC DAD;;;; +FEBF;ARABIC LETTER DAD INITIAL FORM;Lo;0;AL; 0636;;;;N;GLYPH FOR INITIAL ARABIC DAD;;;; +FEC0;ARABIC LETTER DAD MEDIAL FORM;Lo;0;AL; 0636;;;;N;GLYPH FOR MEDIAL ARABIC DAD;;;; +FEC1;ARABIC LETTER TAH ISOLATED FORM;Lo;0;AL; 0637;;;;N;GLYPH FOR ISOLATE ARABIC TAH;;;; +FEC2;ARABIC LETTER TAH FINAL FORM;Lo;0;AL; 0637;;;;N;GLYPH FOR FINAL ARABIC TAH;;;; +FEC3;ARABIC LETTER TAH INITIAL FORM;Lo;0;AL; 0637;;;;N;GLYPH FOR INITIAL ARABIC TAH;;;; +FEC4;ARABIC LETTER TAH MEDIAL FORM;Lo;0;AL; 0637;;;;N;GLYPH FOR MEDIAL ARABIC TAH;;;; +FEC5;ARABIC LETTER ZAH ISOLATED FORM;Lo;0;AL; 0638;;;;N;GLYPH FOR ISOLATE ARABIC DHAH;;;; +FEC6;ARABIC LETTER ZAH FINAL FORM;Lo;0;AL; 0638;;;;N;GLYPH FOR FINAL ARABIC DHAH;;;; +FEC7;ARABIC LETTER ZAH INITIAL FORM;Lo;0;AL; 0638;;;;N;GLYPH FOR INITIAL ARABIC DHAH;;;; +FEC8;ARABIC LETTER ZAH MEDIAL FORM;Lo;0;AL; 0638;;;;N;GLYPH FOR MEDIAL ARABIC DHAH;;;; +FEC9;ARABIC LETTER AIN ISOLATED FORM;Lo;0;AL; 0639;;;;N;GLYPH FOR ISOLATE ARABIC AIN;;;; +FECA;ARABIC LETTER AIN FINAL FORM;Lo;0;AL; 0639;;;;N;GLYPH FOR FINAL ARABIC AIN;;;; +FECB;ARABIC LETTER AIN INITIAL FORM;Lo;0;AL; 0639;;;;N;GLYPH FOR INITIAL ARABIC AIN;;;; +FECC;ARABIC LETTER AIN MEDIAL FORM;Lo;0;AL; 0639;;;;N;GLYPH FOR MEDIAL ARABIC AIN;;;; +FECD;ARABIC LETTER GHAIN ISOLATED FORM;Lo;0;AL; 063A;;;;N;GLYPH FOR ISOLATE ARABIC GHAIN;;;; +FECE;ARABIC LETTER GHAIN FINAL FORM;Lo;0;AL; 063A;;;;N;GLYPH FOR FINAL ARABIC GHAIN;;;; +FECF;ARABIC LETTER GHAIN INITIAL FORM;Lo;0;AL; 063A;;;;N;GLYPH FOR INITIAL ARABIC GHAIN;;;; +FED0;ARABIC LETTER GHAIN MEDIAL FORM;Lo;0;AL; 063A;;;;N;GLYPH FOR MEDIAL ARABIC GHAIN;;;; +FED1;ARABIC LETTER FEH ISOLATED FORM;Lo;0;AL; 0641;;;;N;GLYPH FOR ISOLATE ARABIC FA;;;; +FED2;ARABIC LETTER FEH FINAL FORM;Lo;0;AL; 0641;;;;N;GLYPH FOR FINAL ARABIC FA;;;; +FED3;ARABIC LETTER FEH INITIAL FORM;Lo;0;AL; 0641;;;;N;GLYPH FOR INITIAL ARABIC FA;;;; +FED4;ARABIC LETTER FEH MEDIAL FORM;Lo;0;AL; 0641;;;;N;GLYPH FOR MEDIAL ARABIC FA;;;; +FED5;ARABIC LETTER QAF ISOLATED FORM;Lo;0;AL; 0642;;;;N;GLYPH FOR ISOLATE ARABIC QAF;;;; +FED6;ARABIC LETTER QAF FINAL FORM;Lo;0;AL; 0642;;;;N;GLYPH FOR FINAL ARABIC QAF;;;; +FED7;ARABIC LETTER QAF INITIAL FORM;Lo;0;AL; 0642;;;;N;GLYPH FOR INITIAL ARABIC QAF;;;; +FED8;ARABIC LETTER QAF MEDIAL FORM;Lo;0;AL; 0642;;;;N;GLYPH FOR MEDIAL ARABIC QAF;;;; +FED9;ARABIC LETTER KAF ISOLATED FORM;Lo;0;AL; 0643;;;;N;GLYPH FOR ISOLATE ARABIC CAF;;;; +FEDA;ARABIC LETTER KAF FINAL FORM;Lo;0;AL; 0643;;;;N;GLYPH FOR FINAL ARABIC CAF;;;; +FEDB;ARABIC LETTER KAF INITIAL FORM;Lo;0;AL; 0643;;;;N;GLYPH FOR INITIAL ARABIC CAF;;;; +FEDC;ARABIC LETTER KAF MEDIAL FORM;Lo;0;AL; 0643;;;;N;GLYPH FOR MEDIAL ARABIC CAF;;;; +FEDD;ARABIC LETTER LAM ISOLATED FORM;Lo;0;AL; 0644;;;;N;GLYPH FOR ISOLATE ARABIC LAM;;;; +FEDE;ARABIC LETTER LAM FINAL FORM;Lo;0;AL; 0644;;;;N;GLYPH FOR FINAL ARABIC LAM;;;; +FEDF;ARABIC LETTER LAM INITIAL FORM;Lo;0;AL; 0644;;;;N;GLYPH FOR INITIAL ARABIC LAM;;;; +FEE0;ARABIC LETTER LAM MEDIAL FORM;Lo;0;AL; 0644;;;;N;GLYPH FOR MEDIAL ARABIC LAM;;;; +FEE1;ARABIC LETTER MEEM ISOLATED FORM;Lo;0;AL; 0645;;;;N;GLYPH FOR ISOLATE ARABIC MEEM;;;; +FEE2;ARABIC LETTER MEEM FINAL FORM;Lo;0;AL; 0645;;;;N;GLYPH FOR FINAL ARABIC MEEM;;;; +FEE3;ARABIC LETTER MEEM INITIAL FORM;Lo;0;AL; 0645;;;;N;GLYPH FOR INITIAL ARABIC MEEM;;;; +FEE4;ARABIC LETTER MEEM MEDIAL FORM;Lo;0;AL; 0645;;;;N;GLYPH FOR MEDIAL ARABIC MEEM;;;; +FEE5;ARABIC LETTER NOON ISOLATED FORM;Lo;0;AL; 0646;;;;N;GLYPH FOR ISOLATE ARABIC NOON;;;; +FEE6;ARABIC LETTER NOON FINAL FORM;Lo;0;AL; 0646;;;;N;GLYPH FOR FINAL ARABIC NOON;;;; +FEE7;ARABIC LETTER NOON INITIAL FORM;Lo;0;AL; 0646;;;;N;GLYPH FOR INITIAL ARABIC NOON;;;; +FEE8;ARABIC LETTER NOON MEDIAL FORM;Lo;0;AL; 0646;;;;N;GLYPH FOR MEDIAL ARABIC NOON;;;; +FEE9;ARABIC LETTER HEH ISOLATED FORM;Lo;0;AL; 0647;;;;N;GLYPH FOR ISOLATE ARABIC HA;;;; +FEEA;ARABIC LETTER HEH FINAL FORM;Lo;0;AL; 0647;;;;N;GLYPH FOR FINAL ARABIC HA;;;; +FEEB;ARABIC LETTER HEH INITIAL FORM;Lo;0;AL; 0647;;;;N;GLYPH FOR INITIAL ARABIC HA;;;; +FEEC;ARABIC LETTER HEH MEDIAL FORM;Lo;0;AL; 0647;;;;N;GLYPH FOR MEDIAL ARABIC HA;;;; +FEED;ARABIC LETTER WAW ISOLATED FORM;Lo;0;AL; 0648;;;;N;GLYPH FOR ISOLATE ARABIC WAW;;;; +FEEE;ARABIC LETTER WAW FINAL FORM;Lo;0;AL; 0648;;;;N;GLYPH FOR FINAL ARABIC WAW;;;; +FEEF;ARABIC LETTER ALEF MAKSURA ISOLATED FORM;Lo;0;AL; 0649;;;;N;GLYPH FOR ISOLATE ARABIC ALEF MAQSURAH;;;; +FEF0;ARABIC LETTER ALEF MAKSURA FINAL FORM;Lo;0;AL; 0649;;;;N;GLYPH FOR FINAL ARABIC ALEF MAQSURAH;;;; +FEF1;ARABIC LETTER YEH ISOLATED FORM;Lo;0;AL; 064A;;;;N;GLYPH FOR ISOLATE ARABIC YA;;;; +FEF2;ARABIC LETTER YEH FINAL FORM;Lo;0;AL; 064A;;;;N;GLYPH FOR FINAL ARABIC YA;;;; +FEF3;ARABIC LETTER YEH INITIAL FORM;Lo;0;AL; 064A;;;;N;GLYPH FOR INITIAL ARABIC YA;;;; +FEF4;ARABIC LETTER YEH MEDIAL FORM;Lo;0;AL; 064A;;;;N;GLYPH FOR MEDIAL ARABIC YA;;;; +FEF5;ARABIC LIGATURE LAM WITH ALEF WITH MADDA ABOVE ISOLATED FORM;Lo;0;AL; 0644 0622;;;;N;GLYPH FOR ISOLATE ARABIC MADDAH ON LIGATURE LAM ALEF;;;; +FEF6;ARABIC LIGATURE LAM WITH ALEF WITH MADDA ABOVE FINAL FORM;Lo;0;AL; 0644 0622;;;;N;GLYPH FOR FINAL ARABIC MADDAH ON LIGATURE LAM ALEF;;;; +FEF7;ARABIC LIGATURE LAM WITH ALEF WITH HAMZA ABOVE ISOLATED FORM;Lo;0;AL; 0644 0623;;;;N;GLYPH FOR ISOLATE ARABIC HAMZAH ON LIGATURE LAM ALEF;;;; +FEF8;ARABIC LIGATURE LAM WITH ALEF WITH HAMZA ABOVE FINAL FORM;Lo;0;AL; 0644 0623;;;;N;GLYPH FOR FINAL ARABIC HAMZAH ON LIGATURE LAM ALEF;;;; +FEF9;ARABIC LIGATURE LAM WITH ALEF WITH HAMZA BELOW ISOLATED FORM;Lo;0;AL; 0644 0625;;;;N;GLYPH FOR ISOLATE ARABIC HAMZAH UNDER LIGATURE LAM ALEF;;;; +FEFA;ARABIC LIGATURE LAM WITH ALEF WITH HAMZA BELOW FINAL FORM;Lo;0;AL; 0644 0625;;;;N;GLYPH FOR FINAL ARABIC HAMZAH UNDER LIGATURE LAM ALEF;;;; +FEFB;ARABIC LIGATURE LAM WITH ALEF ISOLATED FORM;Lo;0;AL; 0644 0627;;;;N;GLYPH FOR ISOLATE ARABIC LIGATURE LAM ALEF;;;; +FEFC;ARABIC LIGATURE LAM WITH ALEF FINAL FORM;Lo;0;AL; 0644 0627;;;;N;GLYPH FOR FINAL ARABIC LIGATURE LAM ALEF;;;; +FEFF;ZERO WIDTH NO-BREAK SPACE;Cf;0;BN;;;;;N;BYTE ORDER MARK;;;; +FF01;FULLWIDTH EXCLAMATION MARK;Po;0;ON; 0021;;;;N;;;;; +FF02;FULLWIDTH QUOTATION MARK;Po;0;ON; 0022;;;;N;;;;; +FF03;FULLWIDTH NUMBER SIGN;Po;0;ET; 0023;;;;N;;;;; +FF04;FULLWIDTH DOLLAR SIGN;Sc;0;ET; 0024;;;;N;;;;; +FF05;FULLWIDTH PERCENT SIGN;Po;0;ET; 0025;;;;N;;;;; +FF06;FULLWIDTH AMPERSAND;Po;0;ON; 0026;;;;N;;;;; +FF07;FULLWIDTH APOSTROPHE;Po;0;ON; 0027;;;;N;;;;; +FF08;FULLWIDTH LEFT PARENTHESIS;Ps;0;ON; 0028;;;;Y;FULLWIDTH OPENING PARENTHESIS;;;; +FF09;FULLWIDTH RIGHT PARENTHESIS;Pe;0;ON; 0029;;;;Y;FULLWIDTH CLOSING PARENTHESIS;;;; +FF0A;FULLWIDTH ASTERISK;Po;0;ON; 002A;;;;N;;;;; +FF0B;FULLWIDTH PLUS SIGN;Sm;0;ES; 002B;;;;N;;;;; +FF0C;FULLWIDTH COMMA;Po;0;CS; 002C;;;;N;;;;; +FF0D;FULLWIDTH HYPHEN-MINUS;Pd;0;ES; 002D;;;;N;;;;; +FF0E;FULLWIDTH FULL STOP;Po;0;CS; 002E;;;;N;FULLWIDTH PERIOD;;;; +FF0F;FULLWIDTH SOLIDUS;Po;0;CS; 002F;;;;N;FULLWIDTH SLASH;;;; +FF10;FULLWIDTH DIGIT ZERO;Nd;0;EN; 0030;0;0;0;N;;;;; +FF11;FULLWIDTH DIGIT ONE;Nd;0;EN; 0031;1;1;1;N;;;;; +FF12;FULLWIDTH DIGIT TWO;Nd;0;EN; 0032;2;2;2;N;;;;; +FF13;FULLWIDTH DIGIT THREE;Nd;0;EN; 0033;3;3;3;N;;;;; +FF14;FULLWIDTH DIGIT FOUR;Nd;0;EN; 0034;4;4;4;N;;;;; +FF15;FULLWIDTH DIGIT FIVE;Nd;0;EN; 0035;5;5;5;N;;;;; +FF16;FULLWIDTH DIGIT SIX;Nd;0;EN; 0036;6;6;6;N;;;;; +FF17;FULLWIDTH DIGIT SEVEN;Nd;0;EN; 0037;7;7;7;N;;;;; +FF18;FULLWIDTH DIGIT EIGHT;Nd;0;EN; 0038;8;8;8;N;;;;; +FF19;FULLWIDTH DIGIT NINE;Nd;0;EN; 0039;9;9;9;N;;;;; +FF1A;FULLWIDTH COLON;Po;0;CS; 003A;;;;N;;;;; +FF1B;FULLWIDTH SEMICOLON;Po;0;ON; 003B;;;;N;;;;; +FF1C;FULLWIDTH LESS-THAN SIGN;Sm;0;ON; 003C;;;;Y;;;;; +FF1D;FULLWIDTH EQUALS SIGN;Sm;0;ON; 003D;;;;N;;;;; +FF1E;FULLWIDTH GREATER-THAN SIGN;Sm;0;ON; 003E;;;;Y;;;;; +FF1F;FULLWIDTH QUESTION MARK;Po;0;ON; 003F;;;;N;;;;; +FF20;FULLWIDTH COMMERCIAL AT;Po;0;ON; 0040;;;;N;;;;; +FF21;FULLWIDTH LATIN CAPITAL LETTER A;Lu;0;L; 0041;;;;N;;;;FF41; +FF22;FULLWIDTH LATIN CAPITAL LETTER B;Lu;0;L; 0042;;;;N;;;;FF42; +FF23;FULLWIDTH LATIN CAPITAL LETTER C;Lu;0;L; 0043;;;;N;;;;FF43; +FF24;FULLWIDTH LATIN CAPITAL LETTER D;Lu;0;L; 0044;;;;N;;;;FF44; +FF25;FULLWIDTH LATIN CAPITAL LETTER E;Lu;0;L; 0045;;;;N;;;;FF45; +FF26;FULLWIDTH LATIN CAPITAL LETTER F;Lu;0;L; 0046;;;;N;;;;FF46; +FF27;FULLWIDTH LATIN CAPITAL LETTER G;Lu;0;L; 0047;;;;N;;;;FF47; +FF28;FULLWIDTH LATIN CAPITAL LETTER H;Lu;0;L; 0048;;;;N;;;;FF48; +FF29;FULLWIDTH LATIN CAPITAL LETTER I;Lu;0;L; 0049;;;;N;;;;FF49; +FF2A;FULLWIDTH LATIN CAPITAL LETTER J;Lu;0;L; 004A;;;;N;;;;FF4A; +FF2B;FULLWIDTH LATIN CAPITAL LETTER K;Lu;0;L; 004B;;;;N;;;;FF4B; +FF2C;FULLWIDTH LATIN CAPITAL LETTER L;Lu;0;L; 004C;;;;N;;;;FF4C; +FF2D;FULLWIDTH LATIN CAPITAL LETTER M;Lu;0;L; 004D;;;;N;;;;FF4D; +FF2E;FULLWIDTH LATIN CAPITAL LETTER N;Lu;0;L; 004E;;;;N;;;;FF4E; +FF2F;FULLWIDTH LATIN CAPITAL LETTER O;Lu;0;L; 004F;;;;N;;;;FF4F; +FF30;FULLWIDTH LATIN CAPITAL LETTER P;Lu;0;L; 0050;;;;N;;;;FF50; +FF31;FULLWIDTH LATIN CAPITAL LETTER Q;Lu;0;L; 0051;;;;N;;;;FF51; +FF32;FULLWIDTH LATIN CAPITAL LETTER R;Lu;0;L; 0052;;;;N;;;;FF52; +FF33;FULLWIDTH LATIN CAPITAL LETTER S;Lu;0;L; 0053;;;;N;;;;FF53; +FF34;FULLWIDTH LATIN CAPITAL LETTER T;Lu;0;L; 0054;;;;N;;;;FF54; +FF35;FULLWIDTH LATIN CAPITAL LETTER U;Lu;0;L; 0055;;;;N;;;;FF55; +FF36;FULLWIDTH LATIN CAPITAL LETTER V;Lu;0;L; 0056;;;;N;;;;FF56; +FF37;FULLWIDTH LATIN CAPITAL LETTER W;Lu;0;L; 0057;;;;N;;;;FF57; +FF38;FULLWIDTH LATIN CAPITAL LETTER X;Lu;0;L; 0058;;;;N;;;;FF58; +FF39;FULLWIDTH LATIN CAPITAL LETTER Y;Lu;0;L; 0059;;;;N;;;;FF59; +FF3A;FULLWIDTH LATIN CAPITAL LETTER Z;Lu;0;L; 005A;;;;N;;;;FF5A; +FF3B;FULLWIDTH LEFT SQUARE BRACKET;Ps;0;ON; 005B;;;;Y;FULLWIDTH OPENING SQUARE BRACKET;;;; +FF3C;FULLWIDTH REVERSE SOLIDUS;Po;0;ON; 005C;;;;N;FULLWIDTH BACKSLASH;;;; +FF3D;FULLWIDTH RIGHT SQUARE BRACKET;Pe;0;ON; 005D;;;;Y;FULLWIDTH CLOSING SQUARE BRACKET;;;; +FF3E;FULLWIDTH CIRCUMFLEX ACCENT;Sk;0;ON; 005E;;;;N;FULLWIDTH SPACING CIRCUMFLEX;;;; +FF3F;FULLWIDTH LOW LINE;Pc;0;ON; 005F;;;;N;FULLWIDTH SPACING UNDERSCORE;;;; +FF40;FULLWIDTH GRAVE ACCENT;Sk;0;ON; 0060;;;;N;FULLWIDTH SPACING GRAVE;;;; +FF41;FULLWIDTH LATIN SMALL LETTER A;Ll;0;L; 0061;;;;N;;;FF21;;FF21 +FF42;FULLWIDTH LATIN SMALL LETTER B;Ll;0;L; 0062;;;;N;;;FF22;;FF22 +FF43;FULLWIDTH LATIN SMALL LETTER C;Ll;0;L; 0063;;;;N;;;FF23;;FF23 +FF44;FULLWIDTH LATIN SMALL LETTER D;Ll;0;L; 0064;;;;N;;;FF24;;FF24 +FF45;FULLWIDTH LATIN SMALL LETTER E;Ll;0;L; 0065;;;;N;;;FF25;;FF25 +FF46;FULLWIDTH LATIN SMALL LETTER F;Ll;0;L; 0066;;;;N;;;FF26;;FF26 +FF47;FULLWIDTH LATIN SMALL LETTER G;Ll;0;L; 0067;;;;N;;;FF27;;FF27 +FF48;FULLWIDTH LATIN SMALL LETTER H;Ll;0;L; 0068;;;;N;;;FF28;;FF28 +FF49;FULLWIDTH LATIN SMALL LETTER I;Ll;0;L; 0069;;;;N;;;FF29;;FF29 +FF4A;FULLWIDTH LATIN SMALL LETTER J;Ll;0;L; 006A;;;;N;;;FF2A;;FF2A +FF4B;FULLWIDTH LATIN SMALL LETTER K;Ll;0;L; 006B;;;;N;;;FF2B;;FF2B +FF4C;FULLWIDTH LATIN SMALL LETTER L;Ll;0;L; 006C;;;;N;;;FF2C;;FF2C +FF4D;FULLWIDTH LATIN SMALL LETTER M;Ll;0;L; 006D;;;;N;;;FF2D;;FF2D +FF4E;FULLWIDTH LATIN SMALL LETTER N;Ll;0;L; 006E;;;;N;;;FF2E;;FF2E +FF4F;FULLWIDTH LATIN SMALL LETTER O;Ll;0;L; 006F;;;;N;;;FF2F;;FF2F +FF50;FULLWIDTH LATIN SMALL LETTER P;Ll;0;L; 0070;;;;N;;;FF30;;FF30 +FF51;FULLWIDTH LATIN SMALL LETTER Q;Ll;0;L; 0071;;;;N;;;FF31;;FF31 +FF52;FULLWIDTH LATIN SMALL LETTER R;Ll;0;L; 0072;;;;N;;;FF32;;FF32 +FF53;FULLWIDTH LATIN SMALL LETTER S;Ll;0;L; 0073;;;;N;;;FF33;;FF33 +FF54;FULLWIDTH LATIN SMALL LETTER T;Ll;0;L; 0074;;;;N;;;FF34;;FF34 +FF55;FULLWIDTH LATIN SMALL LETTER U;Ll;0;L; 0075;;;;N;;;FF35;;FF35 +FF56;FULLWIDTH LATIN SMALL LETTER V;Ll;0;L; 0076;;;;N;;;FF36;;FF36 +FF57;FULLWIDTH LATIN SMALL LETTER W;Ll;0;L; 0077;;;;N;;;FF37;;FF37 +FF58;FULLWIDTH LATIN SMALL LETTER X;Ll;0;L; 0078;;;;N;;;FF38;;FF38 +FF59;FULLWIDTH LATIN SMALL LETTER Y;Ll;0;L; 0079;;;;N;;;FF39;;FF39 +FF5A;FULLWIDTH LATIN SMALL LETTER Z;Ll;0;L; 007A;;;;N;;;FF3A;;FF3A +FF5B;FULLWIDTH LEFT CURLY BRACKET;Ps;0;ON; 007B;;;;Y;FULLWIDTH OPENING CURLY BRACKET;;;; +FF5C;FULLWIDTH VERTICAL LINE;Sm;0;ON; 007C;;;;N;FULLWIDTH VERTICAL BAR;;;; +FF5D;FULLWIDTH RIGHT CURLY BRACKET;Pe;0;ON; 007D;;;;Y;FULLWIDTH CLOSING CURLY BRACKET;;;; +FF5E;FULLWIDTH TILDE;Sm;0;ON; 007E;;;;N;FULLWIDTH SPACING TILDE;;;; +FF5F;FULLWIDTH LEFT WHITE PARENTHESIS;Ps;0;ON; 2985;;;;Y;;;;; +FF60;FULLWIDTH RIGHT WHITE PARENTHESIS;Pe;0;ON; 2986;;;;Y;;;;; +FF61;HALFWIDTH IDEOGRAPHIC FULL STOP;Po;0;ON; 3002;;;;N;HALFWIDTH IDEOGRAPHIC PERIOD;;;; +FF62;HALFWIDTH LEFT CORNER BRACKET;Ps;0;ON; 300C;;;;Y;HALFWIDTH OPENING CORNER BRACKET;;;; +FF63;HALFWIDTH RIGHT CORNER BRACKET;Pe;0;ON; 300D;;;;Y;HALFWIDTH CLOSING CORNER BRACKET;;;; +FF64;HALFWIDTH IDEOGRAPHIC COMMA;Po;0;ON; 3001;;;;N;;;;; +FF65;HALFWIDTH KATAKANA MIDDLE DOT;Po;0;ON; 30FB;;;;N;;;;; +FF66;HALFWIDTH KATAKANA LETTER WO;Lo;0;L; 30F2;;;;N;;;;; +FF67;HALFWIDTH KATAKANA LETTER SMALL A;Lo;0;L; 30A1;;;;N;;;;; +FF68;HALFWIDTH KATAKANA LETTER SMALL I;Lo;0;L; 30A3;;;;N;;;;; +FF69;HALFWIDTH KATAKANA LETTER SMALL U;Lo;0;L; 30A5;;;;N;;;;; +FF6A;HALFWIDTH KATAKANA LETTER SMALL E;Lo;0;L; 30A7;;;;N;;;;; +FF6B;HALFWIDTH KATAKANA LETTER SMALL O;Lo;0;L; 30A9;;;;N;;;;; +FF6C;HALFWIDTH KATAKANA LETTER SMALL YA;Lo;0;L; 30E3;;;;N;;;;; +FF6D;HALFWIDTH KATAKANA LETTER SMALL YU;Lo;0;L; 30E5;;;;N;;;;; +FF6E;HALFWIDTH KATAKANA LETTER SMALL YO;Lo;0;L; 30E7;;;;N;;;;; +FF6F;HALFWIDTH KATAKANA LETTER SMALL TU;Lo;0;L; 30C3;;;;N;;;;; +FF70;HALFWIDTH KATAKANA-HIRAGANA PROLONGED SOUND MARK;Lm;0;L; 30FC;;;;N;;;;; +FF71;HALFWIDTH KATAKANA LETTER A;Lo;0;L; 30A2;;;;N;;;;; +FF72;HALFWIDTH KATAKANA LETTER I;Lo;0;L; 30A4;;;;N;;;;; +FF73;HALFWIDTH KATAKANA LETTER U;Lo;0;L; 30A6;;;;N;;;;; +FF74;HALFWIDTH KATAKANA LETTER E;Lo;0;L; 30A8;;;;N;;;;; +FF75;HALFWIDTH KATAKANA LETTER O;Lo;0;L; 30AA;;;;N;;;;; +FF76;HALFWIDTH KATAKANA LETTER KA;Lo;0;L; 30AB;;;;N;;;;; +FF77;HALFWIDTH KATAKANA LETTER KI;Lo;0;L; 30AD;;;;N;;;;; +FF78;HALFWIDTH KATAKANA LETTER KU;Lo;0;L; 30AF;;;;N;;;;; +FF79;HALFWIDTH KATAKANA LETTER KE;Lo;0;L; 30B1;;;;N;;;;; +FF7A;HALFWIDTH KATAKANA LETTER KO;Lo;0;L; 30B3;;;;N;;;;; +FF7B;HALFWIDTH KATAKANA LETTER SA;Lo;0;L; 30B5;;;;N;;;;; +FF7C;HALFWIDTH KATAKANA LETTER SI;Lo;0;L; 30B7;;;;N;;;;; +FF7D;HALFWIDTH KATAKANA LETTER SU;Lo;0;L; 30B9;;;;N;;;;; +FF7E;HALFWIDTH KATAKANA LETTER SE;Lo;0;L; 30BB;;;;N;;;;; +FF7F;HALFWIDTH KATAKANA LETTER SO;Lo;0;L; 30BD;;;;N;;;;; +FF80;HALFWIDTH KATAKANA LETTER TA;Lo;0;L; 30BF;;;;N;;;;; +FF81;HALFWIDTH KATAKANA LETTER TI;Lo;0;L; 30C1;;;;N;;;;; +FF82;HALFWIDTH KATAKANA LETTER TU;Lo;0;L; 30C4;;;;N;;;;; +FF83;HALFWIDTH KATAKANA LETTER TE;Lo;0;L; 30C6;;;;N;;;;; +FF84;HALFWIDTH KATAKANA LETTER TO;Lo;0;L; 30C8;;;;N;;;;; +FF85;HALFWIDTH KATAKANA LETTER NA;Lo;0;L; 30CA;;;;N;;;;; +FF86;HALFWIDTH KATAKANA LETTER NI;Lo;0;L; 30CB;;;;N;;;;; +FF87;HALFWIDTH KATAKANA LETTER NU;Lo;0;L; 30CC;;;;N;;;;; +FF88;HALFWIDTH KATAKANA LETTER NE;Lo;0;L; 30CD;;;;N;;;;; +FF89;HALFWIDTH KATAKANA LETTER NO;Lo;0;L; 30CE;;;;N;;;;; +FF8A;HALFWIDTH KATAKANA LETTER HA;Lo;0;L; 30CF;;;;N;;;;; +FF8B;HALFWIDTH KATAKANA LETTER HI;Lo;0;L; 30D2;;;;N;;;;; +FF8C;HALFWIDTH KATAKANA LETTER HU;Lo;0;L; 30D5;;;;N;;;;; +FF8D;HALFWIDTH KATAKANA LETTER HE;Lo;0;L; 30D8;;;;N;;;;; +FF8E;HALFWIDTH KATAKANA LETTER HO;Lo;0;L; 30DB;;;;N;;;;; +FF8F;HALFWIDTH KATAKANA LETTER MA;Lo;0;L; 30DE;;;;N;;;;; +FF90;HALFWIDTH KATAKANA LETTER MI;Lo;0;L; 30DF;;;;N;;;;; +FF91;HALFWIDTH KATAKANA LETTER MU;Lo;0;L; 30E0;;;;N;;;;; +FF92;HALFWIDTH KATAKANA LETTER ME;Lo;0;L; 30E1;;;;N;;;;; +FF93;HALFWIDTH KATAKANA LETTER MO;Lo;0;L; 30E2;;;;N;;;;; +FF94;HALFWIDTH KATAKANA LETTER YA;Lo;0;L; 30E4;;;;N;;;;; +FF95;HALFWIDTH KATAKANA LETTER YU;Lo;0;L; 30E6;;;;N;;;;; +FF96;HALFWIDTH KATAKANA LETTER YO;Lo;0;L; 30E8;;;;N;;;;; +FF97;HALFWIDTH KATAKANA LETTER RA;Lo;0;L; 30E9;;;;N;;;;; +FF98;HALFWIDTH KATAKANA LETTER RI;Lo;0;L; 30EA;;;;N;;;;; +FF99;HALFWIDTH KATAKANA LETTER RU;Lo;0;L; 30EB;;;;N;;;;; +FF9A;HALFWIDTH KATAKANA LETTER RE;Lo;0;L; 30EC;;;;N;;;;; +FF9B;HALFWIDTH KATAKANA LETTER RO;Lo;0;L; 30ED;;;;N;;;;; +FF9C;HALFWIDTH KATAKANA LETTER WA;Lo;0;L; 30EF;;;;N;;;;; +FF9D;HALFWIDTH KATAKANA LETTER N;Lo;0;L; 30F3;;;;N;;;;; +FF9E;HALFWIDTH KATAKANA VOICED SOUND MARK;Lm;0;L; 3099;;;;N;;;;; +FF9F;HALFWIDTH KATAKANA SEMI-VOICED SOUND MARK;Lm;0;L; 309A;;;;N;;;;; +FFA0;HALFWIDTH HANGUL FILLER;Lo;0;L; 3164;;;;N;HALFWIDTH HANGUL CAE OM;;;; +FFA1;HALFWIDTH HANGUL LETTER KIYEOK;Lo;0;L; 3131;;;;N;HALFWIDTH HANGUL LETTER GIYEOG;;;; +FFA2;HALFWIDTH HANGUL LETTER SSANGKIYEOK;Lo;0;L; 3132;;;;N;HALFWIDTH HANGUL LETTER SSANG GIYEOG;;;; +FFA3;HALFWIDTH HANGUL LETTER KIYEOK-SIOS;Lo;0;L; 3133;;;;N;HALFWIDTH HANGUL LETTER GIYEOG SIOS;;;; +FFA4;HALFWIDTH HANGUL LETTER NIEUN;Lo;0;L; 3134;;;;N;;;;; +FFA5;HALFWIDTH HANGUL LETTER NIEUN-CIEUC;Lo;0;L; 3135;;;;N;HALFWIDTH HANGUL LETTER NIEUN JIEUJ;;;; +FFA6;HALFWIDTH HANGUL LETTER NIEUN-HIEUH;Lo;0;L; 3136;;;;N;HALFWIDTH HANGUL LETTER NIEUN HIEUH;;;; +FFA7;HALFWIDTH HANGUL LETTER TIKEUT;Lo;0;L; 3137;;;;N;HALFWIDTH HANGUL LETTER DIGEUD;;;; +FFA8;HALFWIDTH HANGUL LETTER SSANGTIKEUT;Lo;0;L; 3138;;;;N;HALFWIDTH HANGUL LETTER SSANG DIGEUD;;;; +FFA9;HALFWIDTH HANGUL LETTER RIEUL;Lo;0;L; 3139;;;;N;HALFWIDTH HANGUL LETTER LIEUL;;;; +FFAA;HALFWIDTH HANGUL LETTER RIEUL-KIYEOK;Lo;0;L; 313A;;;;N;HALFWIDTH HANGUL LETTER LIEUL GIYEOG;;;; +FFAB;HALFWIDTH HANGUL LETTER RIEUL-MIEUM;Lo;0;L; 313B;;;;N;HALFWIDTH HANGUL LETTER LIEUL MIEUM;;;; +FFAC;HALFWIDTH HANGUL LETTER RIEUL-PIEUP;Lo;0;L; 313C;;;;N;HALFWIDTH HANGUL LETTER LIEUL BIEUB;;;; +FFAD;HALFWIDTH HANGUL LETTER RIEUL-SIOS;Lo;0;L; 313D;;;;N;HALFWIDTH HANGUL LETTER LIEUL SIOS;;;; +FFAE;HALFWIDTH HANGUL LETTER RIEUL-THIEUTH;Lo;0;L; 313E;;;;N;HALFWIDTH HANGUL LETTER LIEUL TIEUT;;;; +FFAF;HALFWIDTH HANGUL LETTER RIEUL-PHIEUPH;Lo;0;L; 313F;;;;N;HALFWIDTH HANGUL LETTER LIEUL PIEUP;;;; +FFB0;HALFWIDTH HANGUL LETTER RIEUL-HIEUH;Lo;0;L; 3140;;;;N;HALFWIDTH HANGUL LETTER LIEUL HIEUH;;;; +FFB1;HALFWIDTH HANGUL LETTER MIEUM;Lo;0;L; 3141;;;;N;;;;; +FFB2;HALFWIDTH HANGUL LETTER PIEUP;Lo;0;L; 3142;;;;N;HALFWIDTH HANGUL LETTER BIEUB;;;; +FFB3;HALFWIDTH HANGUL LETTER SSANGPIEUP;Lo;0;L; 3143;;;;N;HALFWIDTH HANGUL LETTER SSANG BIEUB;;;; +FFB4;HALFWIDTH HANGUL LETTER PIEUP-SIOS;Lo;0;L; 3144;;;;N;HALFWIDTH HANGUL LETTER BIEUB SIOS;;;; +FFB5;HALFWIDTH HANGUL LETTER SIOS;Lo;0;L; 3145;;;;N;;;;; +FFB6;HALFWIDTH HANGUL LETTER SSANGSIOS;Lo;0;L; 3146;;;;N;HALFWIDTH HANGUL LETTER SSANG SIOS;;;; +FFB7;HALFWIDTH HANGUL LETTER IEUNG;Lo;0;L; 3147;;;;N;;;;; +FFB8;HALFWIDTH HANGUL LETTER CIEUC;Lo;0;L; 3148;;;;N;HALFWIDTH HANGUL LETTER JIEUJ;;;; +FFB9;HALFWIDTH HANGUL LETTER SSANGCIEUC;Lo;0;L; 3149;;;;N;HALFWIDTH HANGUL LETTER SSANG JIEUJ;;;; +FFBA;HALFWIDTH HANGUL LETTER CHIEUCH;Lo;0;L; 314A;;;;N;HALFWIDTH HANGUL LETTER CIEUC;;;; +FFBB;HALFWIDTH HANGUL LETTER KHIEUKH;Lo;0;L; 314B;;;;N;HALFWIDTH HANGUL LETTER KIYEOK;;;; +FFBC;HALFWIDTH HANGUL LETTER THIEUTH;Lo;0;L; 314C;;;;N;HALFWIDTH HANGUL LETTER TIEUT;;;; +FFBD;HALFWIDTH HANGUL LETTER PHIEUPH;Lo;0;L; 314D;;;;N;HALFWIDTH HANGUL LETTER PIEUP;;;; +FFBE;HALFWIDTH HANGUL LETTER HIEUH;Lo;0;L; 314E;;;;N;;;;; +FFC2;HALFWIDTH HANGUL LETTER A;Lo;0;L; 314F;;;;N;;;;; +FFC3;HALFWIDTH HANGUL LETTER AE;Lo;0;L; 3150;;;;N;;;;; +FFC4;HALFWIDTH HANGUL LETTER YA;Lo;0;L; 3151;;;;N;;;;; +FFC5;HALFWIDTH HANGUL LETTER YAE;Lo;0;L; 3152;;;;N;;;;; +FFC6;HALFWIDTH HANGUL LETTER EO;Lo;0;L; 3153;;;;N;;;;; +FFC7;HALFWIDTH HANGUL LETTER E;Lo;0;L; 3154;;;;N;;;;; +FFCA;HALFWIDTH HANGUL LETTER YEO;Lo;0;L; 3155;;;;N;;;;; +FFCB;HALFWIDTH HANGUL LETTER YE;Lo;0;L; 3156;;;;N;;;;; +FFCC;HALFWIDTH HANGUL LETTER O;Lo;0;L; 3157;;;;N;;;;; +FFCD;HALFWIDTH HANGUL LETTER WA;Lo;0;L; 3158;;;;N;;;;; +FFCE;HALFWIDTH HANGUL LETTER WAE;Lo;0;L; 3159;;;;N;;;;; +FFCF;HALFWIDTH HANGUL LETTER OE;Lo;0;L; 315A;;;;N;;;;; +FFD2;HALFWIDTH HANGUL LETTER YO;Lo;0;L; 315B;;;;N;;;;; +FFD3;HALFWIDTH HANGUL LETTER U;Lo;0;L; 315C;;;;N;;;;; +FFD4;HALFWIDTH HANGUL LETTER WEO;Lo;0;L; 315D;;;;N;;;;; +FFD5;HALFWIDTH HANGUL LETTER WE;Lo;0;L; 315E;;;;N;;;;; +FFD6;HALFWIDTH HANGUL LETTER WI;Lo;0;L; 315F;;;;N;;;;; +FFD7;HALFWIDTH HANGUL LETTER YU;Lo;0;L; 3160;;;;N;;;;; +FFDA;HALFWIDTH HANGUL LETTER EU;Lo;0;L; 3161;;;;N;;;;; +FFDB;HALFWIDTH HANGUL LETTER YI;Lo;0;L; 3162;;;;N;;;;; +FFDC;HALFWIDTH HANGUL LETTER I;Lo;0;L; 3163;;;;N;;;;; +FFE0;FULLWIDTH CENT SIGN;Sc;0;ET; 00A2;;;;N;;;;; +FFE1;FULLWIDTH POUND SIGN;Sc;0;ET; 00A3;;;;N;;;;; +FFE2;FULLWIDTH NOT SIGN;Sm;0;ON; 00AC;;;;N;;;;; +FFE3;FULLWIDTH MACRON;Sk;0;ON; 00AF;;;;N;FULLWIDTH SPACING MACRON;;;; +FFE4;FULLWIDTH BROKEN BAR;So;0;ON; 00A6;;;;N;FULLWIDTH BROKEN VERTICAL BAR;;;; +FFE5;FULLWIDTH YEN SIGN;Sc;0;ET; 00A5;;;;N;;;;; +FFE6;FULLWIDTH WON SIGN;Sc;0;ET; 20A9;;;;N;;;;; +FFE8;HALFWIDTH FORMS LIGHT VERTICAL;So;0;ON; 2502;;;;N;;;;; +FFE9;HALFWIDTH LEFTWARDS ARROW;Sm;0;ON; 2190;;;;N;;;;; +FFEA;HALFWIDTH UPWARDS ARROW;Sm;0;ON; 2191;;;;N;;;;; +FFEB;HALFWIDTH RIGHTWARDS ARROW;Sm;0;ON; 2192;;;;N;;;;; +FFEC;HALFWIDTH DOWNWARDS ARROW;Sm;0;ON; 2193;;;;N;;;;; +FFED;HALFWIDTH BLACK SQUARE;So;0;ON; 25A0;;;;N;;;;; +FFEE;HALFWIDTH WHITE CIRCLE;So;0;ON; 25CB;;;;N;;;;; +FFF9;INTERLINEAR ANNOTATION ANCHOR;Cf;0;ON;;;;;N;;;;; +FFFA;INTERLINEAR ANNOTATION SEPARATOR;Cf;0;ON;;;;;N;;;;; +FFFB;INTERLINEAR ANNOTATION TERMINATOR;Cf;0;ON;;;;;N;;;;; +FFFC;OBJECT REPLACEMENT CHARACTER;So;0;ON;;;;;N;;;;; +FFFD;REPLACEMENT CHARACTER;So;0;ON;;;;;N;;;;; +10000;LINEAR B SYLLABLE B008 A;Lo;0;L;;;;;N;;;;; +10001;LINEAR B SYLLABLE B038 E;Lo;0;L;;;;;N;;;;; +10002;LINEAR B SYLLABLE B028 I;Lo;0;L;;;;;N;;;;; +10003;LINEAR B SYLLABLE B061 O;Lo;0;L;;;;;N;;;;; +10004;LINEAR B SYLLABLE B010 U;Lo;0;L;;;;;N;;;;; +10005;LINEAR B SYLLABLE B001 DA;Lo;0;L;;;;;N;;;;; +10006;LINEAR B SYLLABLE B045 DE;Lo;0;L;;;;;N;;;;; +10007;LINEAR B SYLLABLE B007 DI;Lo;0;L;;;;;N;;;;; +10008;LINEAR B SYLLABLE B014 DO;Lo;0;L;;;;;N;;;;; +10009;LINEAR B SYLLABLE B051 DU;Lo;0;L;;;;;N;;;;; +1000A;LINEAR B SYLLABLE B057 JA;Lo;0;L;;;;;N;;;;; +1000B;LINEAR B SYLLABLE B046 JE;Lo;0;L;;;;;N;;;;; +1000D;LINEAR B SYLLABLE B036 JO;Lo;0;L;;;;;N;;;;; +1000E;LINEAR B SYLLABLE B065 JU;Lo;0;L;;;;;N;;;;; +1000F;LINEAR B SYLLABLE B077 KA;Lo;0;L;;;;;N;;;;; +10010;LINEAR B SYLLABLE B044 KE;Lo;0;L;;;;;N;;;;; +10011;LINEAR B SYLLABLE B067 KI;Lo;0;L;;;;;N;;;;; +10012;LINEAR B SYLLABLE B070 KO;Lo;0;L;;;;;N;;;;; +10013;LINEAR B SYLLABLE B081 KU;Lo;0;L;;;;;N;;;;; +10014;LINEAR B SYLLABLE B080 MA;Lo;0;L;;;;;N;;;;; +10015;LINEAR B SYLLABLE B013 ME;Lo;0;L;;;;;N;;;;; +10016;LINEAR B SYLLABLE B073 MI;Lo;0;L;;;;;N;;;;; +10017;LINEAR B SYLLABLE B015 MO;Lo;0;L;;;;;N;;;;; +10018;LINEAR B SYLLABLE B023 MU;Lo;0;L;;;;;N;;;;; +10019;LINEAR B SYLLABLE B006 NA;Lo;0;L;;;;;N;;;;; +1001A;LINEAR B SYLLABLE B024 NE;Lo;0;L;;;;;N;;;;; +1001B;LINEAR B SYLLABLE B030 NI;Lo;0;L;;;;;N;;;;; +1001C;LINEAR B SYLLABLE B052 NO;Lo;0;L;;;;;N;;;;; +1001D;LINEAR B SYLLABLE B055 NU;Lo;0;L;;;;;N;;;;; +1001E;LINEAR B SYLLABLE B003 PA;Lo;0;L;;;;;N;;;;; +1001F;LINEAR B SYLLABLE B072 PE;Lo;0;L;;;;;N;;;;; +10020;LINEAR B SYLLABLE B039 PI;Lo;0;L;;;;;N;;;;; +10021;LINEAR B SYLLABLE B011 PO;Lo;0;L;;;;;N;;;;; +10022;LINEAR B SYLLABLE B050 PU;Lo;0;L;;;;;N;;;;; +10023;LINEAR B SYLLABLE B016 QA;Lo;0;L;;;;;N;;;;; +10024;LINEAR B SYLLABLE B078 QE;Lo;0;L;;;;;N;;;;; +10025;LINEAR B SYLLABLE B021 QI;Lo;0;L;;;;;N;;;;; +10026;LINEAR B SYLLABLE B032 QO;Lo;0;L;;;;;N;;;;; +10028;LINEAR B SYLLABLE B060 RA;Lo;0;L;;;;;N;;;;; +10029;LINEAR B SYLLABLE B027 RE;Lo;0;L;;;;;N;;;;; +1002A;LINEAR B SYLLABLE B053 RI;Lo;0;L;;;;;N;;;;; +1002B;LINEAR B SYLLABLE B002 RO;Lo;0;L;;;;;N;;;;; +1002C;LINEAR B SYLLABLE B026 RU;Lo;0;L;;;;;N;;;;; +1002D;LINEAR B SYLLABLE B031 SA;Lo;0;L;;;;;N;;;;; +1002E;LINEAR B SYLLABLE B009 SE;Lo;0;L;;;;;N;;;;; +1002F;LINEAR B SYLLABLE B041 SI;Lo;0;L;;;;;N;;;;; +10030;LINEAR B SYLLABLE B012 SO;Lo;0;L;;;;;N;;;;; +10031;LINEAR B SYLLABLE B058 SU;Lo;0;L;;;;;N;;;;; +10032;LINEAR B SYLLABLE B059 TA;Lo;0;L;;;;;N;;;;; +10033;LINEAR B SYLLABLE B004 TE;Lo;0;L;;;;;N;;;;; +10034;LINEAR B SYLLABLE B037 TI;Lo;0;L;;;;;N;;;;; +10035;LINEAR B SYLLABLE B005 TO;Lo;0;L;;;;;N;;;;; +10036;LINEAR B SYLLABLE B069 TU;Lo;0;L;;;;;N;;;;; +10037;LINEAR B SYLLABLE B054 WA;Lo;0;L;;;;;N;;;;; +10038;LINEAR B SYLLABLE B075 WE;Lo;0;L;;;;;N;;;;; +10039;LINEAR B SYLLABLE B040 WI;Lo;0;L;;;;;N;;;;; +1003A;LINEAR B SYLLABLE B042 WO;Lo;0;L;;;;;N;;;;; +1003C;LINEAR B SYLLABLE B017 ZA;Lo;0;L;;;;;N;;;;; +1003D;LINEAR B SYLLABLE B074 ZE;Lo;0;L;;;;;N;;;;; +1003F;LINEAR B SYLLABLE B020 ZO;Lo;0;L;;;;;N;;;;; +10040;LINEAR B SYLLABLE B025 A2;Lo;0;L;;;;;N;;;;; +10041;LINEAR B SYLLABLE B043 A3;Lo;0;L;;;;;N;;;;; +10042;LINEAR B SYLLABLE B085 AU;Lo;0;L;;;;;N;;;;; +10043;LINEAR B SYLLABLE B071 DWE;Lo;0;L;;;;;N;;;;; +10044;LINEAR B SYLLABLE B090 DWO;Lo;0;L;;;;;N;;;;; +10045;LINEAR B SYLLABLE B048 NWA;Lo;0;L;;;;;N;;;;; +10046;LINEAR B SYLLABLE B029 PU2;Lo;0;L;;;;;N;;;;; +10047;LINEAR B SYLLABLE B062 PTE;Lo;0;L;;;;;N;;;;; +10048;LINEAR B SYLLABLE B076 RA2;Lo;0;L;;;;;N;;;;; +10049;LINEAR B SYLLABLE B033 RA3;Lo;0;L;;;;;N;;;;; +1004A;LINEAR B SYLLABLE B068 RO2;Lo;0;L;;;;;N;;;;; +1004B;LINEAR B SYLLABLE B066 TA2;Lo;0;L;;;;;N;;;;; +1004C;LINEAR B SYLLABLE B087 TWE;Lo;0;L;;;;;N;;;;; +1004D;LINEAR B SYLLABLE B091 TWO;Lo;0;L;;;;;N;;;;; +10050;LINEAR B SYMBOL B018;Lo;0;L;;;;;N;;;;; +10051;LINEAR B SYMBOL B019;Lo;0;L;;;;;N;;;;; +10052;LINEAR B SYMBOL B022;Lo;0;L;;;;;N;;;;; +10053;LINEAR B SYMBOL B034;Lo;0;L;;;;;N;;;;; +10054;LINEAR B SYMBOL B047;Lo;0;L;;;;;N;;;;; +10055;LINEAR B SYMBOL B049;Lo;0;L;;;;;N;;;;; +10056;LINEAR B SYMBOL B056;Lo;0;L;;;;;N;;;;; +10057;LINEAR B SYMBOL B063;Lo;0;L;;;;;N;;;;; +10058;LINEAR B SYMBOL B064;Lo;0;L;;;;;N;;;;; +10059;LINEAR B SYMBOL B079;Lo;0;L;;;;;N;;;;; +1005A;LINEAR B SYMBOL B082;Lo;0;L;;;;;N;;;;; +1005B;LINEAR B SYMBOL B083;Lo;0;L;;;;;N;;;;; +1005C;LINEAR B SYMBOL B086;Lo;0;L;;;;;N;;;;; +1005D;LINEAR B SYMBOL B089;Lo;0;L;;;;;N;;;;; +10080;LINEAR B IDEOGRAM B100 MAN;Lo;0;L;;;;;N;;;;; +10081;LINEAR B IDEOGRAM B102 WOMAN;Lo;0;L;;;;;N;;;;; +10082;LINEAR B IDEOGRAM B104 DEER;Lo;0;L;;;;;N;;;;; +10083;LINEAR B IDEOGRAM B105 EQUID;Lo;0;L;;;;;N;;;;; +10084;LINEAR B IDEOGRAM B105F MARE;Lo;0;L;;;;;N;;;;; +10085;LINEAR B IDEOGRAM B105M STALLION;Lo;0;L;;;;;N;;;;; +10086;LINEAR B IDEOGRAM B106F EWE;Lo;0;L;;;;;N;;;;; +10087;LINEAR B IDEOGRAM B106M RAM;Lo;0;L;;;;;N;;;;; +10088;LINEAR B IDEOGRAM B107F SHE-GOAT;Lo;0;L;;;;;N;;;;; +10089;LINEAR B IDEOGRAM B107M HE-GOAT;Lo;0;L;;;;;N;;;;; +1008A;LINEAR B IDEOGRAM B108F SOW;Lo;0;L;;;;;N;;;;; +1008B;LINEAR B IDEOGRAM B108M BOAR;Lo;0;L;;;;;N;;;;; +1008C;LINEAR B IDEOGRAM B109F COW;Lo;0;L;;;;;N;;;;; +1008D;LINEAR B IDEOGRAM B109M BULL;Lo;0;L;;;;;N;;;;; +1008E;LINEAR B IDEOGRAM B120 WHEAT;Lo;0;L;;;;;N;;;;; +1008F;LINEAR B IDEOGRAM B121 BARLEY;Lo;0;L;;;;;N;;;;; +10090;LINEAR B IDEOGRAM B122 OLIVE;Lo;0;L;;;;;N;;;;; +10091;LINEAR B IDEOGRAM B123 SPICE;Lo;0;L;;;;;N;;;;; +10092;LINEAR B IDEOGRAM B125 CYPERUS;Lo;0;L;;;;;N;;;;; +10093;LINEAR B MONOGRAM B127 KAPO;Lo;0;L;;;;;N;;;;; +10094;LINEAR B MONOGRAM B128 KANAKO;Lo;0;L;;;;;N;;;;; +10095;LINEAR B IDEOGRAM B130 OIL;Lo;0;L;;;;;N;;;;; +10096;LINEAR B IDEOGRAM B131 WINE;Lo;0;L;;;;;N;;;;; +10097;LINEAR B IDEOGRAM B132;Lo;0;L;;;;;N;;;;; +10098;LINEAR B MONOGRAM B133 AREPA;Lo;0;L;;;;;N;;;;; +10099;LINEAR B MONOGRAM B135 MERI;Lo;0;L;;;;;N;;;;; +1009A;LINEAR B IDEOGRAM B140 BRONZE;Lo;0;L;;;;;N;;;;; +1009B;LINEAR B IDEOGRAM B141 GOLD;Lo;0;L;;;;;N;;;;; +1009C;LINEAR B IDEOGRAM B142;Lo;0;L;;;;;N;;;;; +1009D;LINEAR B IDEOGRAM B145 WOOL;Lo;0;L;;;;;N;;;;; +1009E;LINEAR B IDEOGRAM B146;Lo;0;L;;;;;N;;;;; +1009F;LINEAR B IDEOGRAM B150;Lo;0;L;;;;;N;;;;; +100A0;LINEAR B IDEOGRAM B151 HORN;Lo;0;L;;;;;N;;;;; +100A1;LINEAR B IDEOGRAM B152;Lo;0;L;;;;;N;;;;; +100A2;LINEAR B IDEOGRAM B153;Lo;0;L;;;;;N;;;;; +100A3;LINEAR B IDEOGRAM B154;Lo;0;L;;;;;N;;;;; +100A4;LINEAR B MONOGRAM B156 TURO2;Lo;0;L;;;;;N;;;;; +100A5;LINEAR B IDEOGRAM B157;Lo;0;L;;;;;N;;;;; +100A6;LINEAR B IDEOGRAM B158;Lo;0;L;;;;;N;;;;; +100A7;LINEAR B IDEOGRAM B159 CLOTH;Lo;0;L;;;;;N;;;;; +100A8;LINEAR B IDEOGRAM B160;Lo;0;L;;;;;N;;;;; +100A9;LINEAR B IDEOGRAM B161;Lo;0;L;;;;;N;;;;; +100AA;LINEAR B IDEOGRAM B162 GARMENT;Lo;0;L;;;;;N;;;;; +100AB;LINEAR B IDEOGRAM B163 ARMOUR;Lo;0;L;;;;;N;;;;; +100AC;LINEAR B IDEOGRAM B164;Lo;0;L;;;;;N;;;;; +100AD;LINEAR B IDEOGRAM B165;Lo;0;L;;;;;N;;;;; +100AE;LINEAR B IDEOGRAM B166;Lo;0;L;;;;;N;;;;; +100AF;LINEAR B IDEOGRAM B167;Lo;0;L;;;;;N;;;;; +100B0;LINEAR B IDEOGRAM B168;Lo;0;L;;;;;N;;;;; +100B1;LINEAR B IDEOGRAM B169;Lo;0;L;;;;;N;;;;; +100B2;LINEAR B IDEOGRAM B170;Lo;0;L;;;;;N;;;;; +100B3;LINEAR B IDEOGRAM B171;Lo;0;L;;;;;N;;;;; +100B4;LINEAR B IDEOGRAM B172;Lo;0;L;;;;;N;;;;; +100B5;LINEAR B IDEOGRAM B173 MONTH;Lo;0;L;;;;;N;;;;; +100B6;LINEAR B IDEOGRAM B174;Lo;0;L;;;;;N;;;;; +100B7;LINEAR B IDEOGRAM B176 TREE;Lo;0;L;;;;;N;;;;; +100B8;LINEAR B IDEOGRAM B177;Lo;0;L;;;;;N;;;;; +100B9;LINEAR B IDEOGRAM B178;Lo;0;L;;;;;N;;;;; +100BA;LINEAR B IDEOGRAM B179;Lo;0;L;;;;;N;;;;; +100BB;LINEAR B IDEOGRAM B180;Lo;0;L;;;;;N;;;;; +100BC;LINEAR B IDEOGRAM B181;Lo;0;L;;;;;N;;;;; +100BD;LINEAR B IDEOGRAM B182;Lo;0;L;;;;;N;;;;; +100BE;LINEAR B IDEOGRAM B183;Lo;0;L;;;;;N;;;;; +100BF;LINEAR B IDEOGRAM B184;Lo;0;L;;;;;N;;;;; +100C0;LINEAR B IDEOGRAM B185;Lo;0;L;;;;;N;;;;; +100C1;LINEAR B IDEOGRAM B189;Lo;0;L;;;;;N;;;;; +100C2;LINEAR B IDEOGRAM B190;Lo;0;L;;;;;N;;;;; +100C3;LINEAR B IDEOGRAM B191 HELMET;Lo;0;L;;;;;N;;;;; +100C4;LINEAR B IDEOGRAM B220 FOOTSTOOL;Lo;0;L;;;;;N;;;;; +100C5;LINEAR B IDEOGRAM B225 BATHTUB;Lo;0;L;;;;;N;;;;; +100C6;LINEAR B IDEOGRAM B230 SPEAR;Lo;0;L;;;;;N;;;;; +100C7;LINEAR B IDEOGRAM B231 ARROW;Lo;0;L;;;;;N;;;;; +100C8;LINEAR B IDEOGRAM B232;Lo;0;L;;;;;N;;;;; +100C9;LINEAR B IDEOGRAM B233 SWORD;Lo;0;L;;;;;N;;;;; +100CA;LINEAR B IDEOGRAM B234;Lo;0;L;;;;;N;;;;; +100CB;LINEAR B IDEOGRAM B236;Lo;0;L;;;;;N;;;;; +100CC;LINEAR B IDEOGRAM B240 WHEELED CHARIOT;Lo;0;L;;;;;N;;;;; +100CD;LINEAR B IDEOGRAM B241 CHARIOT;Lo;0;L;;;;;N;;;;; +100CE;LINEAR B IDEOGRAM B242 CHARIOT FRAME;Lo;0;L;;;;;N;;;;; +100CF;LINEAR B IDEOGRAM B243 WHEEL;Lo;0;L;;;;;N;;;;; +100D0;LINEAR B IDEOGRAM B245;Lo;0;L;;;;;N;;;;; +100D1;LINEAR B IDEOGRAM B246;Lo;0;L;;;;;N;;;;; +100D2;LINEAR B MONOGRAM B247 DIPTE;Lo;0;L;;;;;N;;;;; +100D3;LINEAR B IDEOGRAM B248;Lo;0;L;;;;;N;;;;; +100D4;LINEAR B IDEOGRAM B249;Lo;0;L;;;;;N;;;;; +100D5;LINEAR B IDEOGRAM B251;Lo;0;L;;;;;N;;;;; +100D6;LINEAR B IDEOGRAM B252;Lo;0;L;;;;;N;;;;; +100D7;LINEAR B IDEOGRAM B253;Lo;0;L;;;;;N;;;;; +100D8;LINEAR B IDEOGRAM B254 DART;Lo;0;L;;;;;N;;;;; +100D9;LINEAR B IDEOGRAM B255;Lo;0;L;;;;;N;;;;; +100DA;LINEAR B IDEOGRAM B256;Lo;0;L;;;;;N;;;;; +100DB;LINEAR B IDEOGRAM B257;Lo;0;L;;;;;N;;;;; +100DC;LINEAR B IDEOGRAM B258;Lo;0;L;;;;;N;;;;; +100DD;LINEAR B IDEOGRAM B259;Lo;0;L;;;;;N;;;;; +100DE;LINEAR B IDEOGRAM VESSEL B155;Lo;0;L;;;;;N;;;;; +100DF;LINEAR B IDEOGRAM VESSEL B200;Lo;0;L;;;;;N;;;;; +100E0;LINEAR B IDEOGRAM VESSEL B201;Lo;0;L;;;;;N;;;;; +100E1;LINEAR B IDEOGRAM VESSEL B202;Lo;0;L;;;;;N;;;;; +100E2;LINEAR B IDEOGRAM VESSEL B203;Lo;0;L;;;;;N;;;;; +100E3;LINEAR B IDEOGRAM VESSEL B204;Lo;0;L;;;;;N;;;;; +100E4;LINEAR B IDEOGRAM VESSEL B205;Lo;0;L;;;;;N;;;;; +100E5;LINEAR B IDEOGRAM VESSEL B206;Lo;0;L;;;;;N;;;;; +100E6;LINEAR B IDEOGRAM VESSEL B207;Lo;0;L;;;;;N;;;;; +100E7;LINEAR B IDEOGRAM VESSEL B208;Lo;0;L;;;;;N;;;;; +100E8;LINEAR B IDEOGRAM VESSEL B209;Lo;0;L;;;;;N;;;;; +100E9;LINEAR B IDEOGRAM VESSEL B210;Lo;0;L;;;;;N;;;;; +100EA;LINEAR B IDEOGRAM VESSEL B211;Lo;0;L;;;;;N;;;;; +100EB;LINEAR B IDEOGRAM VESSEL B212;Lo;0;L;;;;;N;;;;; +100EC;LINEAR B IDEOGRAM VESSEL B213;Lo;0;L;;;;;N;;;;; +100ED;LINEAR B IDEOGRAM VESSEL B214;Lo;0;L;;;;;N;;;;; +100EE;LINEAR B IDEOGRAM VESSEL B215;Lo;0;L;;;;;N;;;;; +100EF;LINEAR B IDEOGRAM VESSEL B216;Lo;0;L;;;;;N;;;;; +100F0;LINEAR B IDEOGRAM VESSEL B217;Lo;0;L;;;;;N;;;;; +100F1;LINEAR B IDEOGRAM VESSEL B218;Lo;0;L;;;;;N;;;;; +100F2;LINEAR B IDEOGRAM VESSEL B219;Lo;0;L;;;;;N;;;;; +100F3;LINEAR B IDEOGRAM VESSEL B221;Lo;0;L;;;;;N;;;;; +100F4;LINEAR B IDEOGRAM VESSEL B222;Lo;0;L;;;;;N;;;;; +100F5;LINEAR B IDEOGRAM VESSEL B226;Lo;0;L;;;;;N;;;;; +100F6;LINEAR B IDEOGRAM VESSEL B227;Lo;0;L;;;;;N;;;;; +100F7;LINEAR B IDEOGRAM VESSEL B228;Lo;0;L;;;;;N;;;;; +100F8;LINEAR B IDEOGRAM VESSEL B229;Lo;0;L;;;;;N;;;;; +100F9;LINEAR B IDEOGRAM VESSEL B250;Lo;0;L;;;;;N;;;;; +100FA;LINEAR B IDEOGRAM VESSEL B305;Lo;0;L;;;;;N;;;;; +10100;AEGEAN WORD SEPARATOR LINE;Po;0;L;;;;;N;;;;; +10101;AEGEAN WORD SEPARATOR DOT;Po;0;ON;;;;;N;;;;; +10102;AEGEAN CHECK MARK;Po;0;L;;;;;N;;;;; +10107;AEGEAN NUMBER ONE;No;0;L;;;;1;N;;;;; +10108;AEGEAN NUMBER TWO;No;0;L;;;;2;N;;;;; +10109;AEGEAN NUMBER THREE;No;0;L;;;;3;N;;;;; +1010A;AEGEAN NUMBER FOUR;No;0;L;;;;4;N;;;;; +1010B;AEGEAN NUMBER FIVE;No;0;L;;;;5;N;;;;; +1010C;AEGEAN NUMBER SIX;No;0;L;;;;6;N;;;;; +1010D;AEGEAN NUMBER SEVEN;No;0;L;;;;7;N;;;;; +1010E;AEGEAN NUMBER EIGHT;No;0;L;;;;8;N;;;;; +1010F;AEGEAN NUMBER NINE;No;0;L;;;;9;N;;;;; +10110;AEGEAN NUMBER TEN;No;0;L;;;;10;N;;;;; +10111;AEGEAN NUMBER TWENTY;No;0;L;;;;20;N;;;;; +10112;AEGEAN NUMBER THIRTY;No;0;L;;;;30;N;;;;; +10113;AEGEAN NUMBER FORTY;No;0;L;;;;40;N;;;;; +10114;AEGEAN NUMBER FIFTY;No;0;L;;;;50;N;;;;; +10115;AEGEAN NUMBER SIXTY;No;0;L;;;;60;N;;;;; +10116;AEGEAN NUMBER SEVENTY;No;0;L;;;;70;N;;;;; +10117;AEGEAN NUMBER EIGHTY;No;0;L;;;;80;N;;;;; +10118;AEGEAN NUMBER NINETY;No;0;L;;;;90;N;;;;; +10119;AEGEAN NUMBER ONE HUNDRED;No;0;L;;;;100;N;;;;; +1011A;AEGEAN NUMBER TWO HUNDRED;No;0;L;;;;200;N;;;;; +1011B;AEGEAN NUMBER THREE HUNDRED;No;0;L;;;;300;N;;;;; +1011C;AEGEAN NUMBER FOUR HUNDRED;No;0;L;;;;400;N;;;;; +1011D;AEGEAN NUMBER FIVE HUNDRED;No;0;L;;;;500;N;;;;; +1011E;AEGEAN NUMBER SIX HUNDRED;No;0;L;;;;600;N;;;;; +1011F;AEGEAN NUMBER SEVEN HUNDRED;No;0;L;;;;700;N;;;;; +10120;AEGEAN NUMBER EIGHT HUNDRED;No;0;L;;;;800;N;;;;; +10121;AEGEAN NUMBER NINE HUNDRED;No;0;L;;;;900;N;;;;; +10122;AEGEAN NUMBER ONE THOUSAND;No;0;L;;;;1000;N;;;;; +10123;AEGEAN NUMBER TWO THOUSAND;No;0;L;;;;2000;N;;;;; +10124;AEGEAN NUMBER THREE THOUSAND;No;0;L;;;;3000;N;;;;; +10125;AEGEAN NUMBER FOUR THOUSAND;No;0;L;;;;4000;N;;;;; +10126;AEGEAN NUMBER FIVE THOUSAND;No;0;L;;;;5000;N;;;;; +10127;AEGEAN NUMBER SIX THOUSAND;No;0;L;;;;6000;N;;;;; +10128;AEGEAN NUMBER SEVEN THOUSAND;No;0;L;;;;7000;N;;;;; +10129;AEGEAN NUMBER EIGHT THOUSAND;No;0;L;;;;8000;N;;;;; +1012A;AEGEAN NUMBER NINE THOUSAND;No;0;L;;;;9000;N;;;;; +1012B;AEGEAN NUMBER TEN THOUSAND;No;0;L;;;;10000;N;;;;; +1012C;AEGEAN NUMBER TWENTY THOUSAND;No;0;L;;;;20000;N;;;;; +1012D;AEGEAN NUMBER THIRTY THOUSAND;No;0;L;;;;30000;N;;;;; +1012E;AEGEAN NUMBER FORTY THOUSAND;No;0;L;;;;40000;N;;;;; +1012F;AEGEAN NUMBER FIFTY THOUSAND;No;0;L;;;;50000;N;;;;; +10130;AEGEAN NUMBER SIXTY THOUSAND;No;0;L;;;;60000;N;;;;; +10131;AEGEAN NUMBER SEVENTY THOUSAND;No;0;L;;;;70000;N;;;;; +10132;AEGEAN NUMBER EIGHTY THOUSAND;No;0;L;;;;80000;N;;;;; +10133;AEGEAN NUMBER NINETY THOUSAND;No;0;L;;;;90000;N;;;;; +10137;AEGEAN WEIGHT BASE UNIT;So;0;L;;;;;N;;;;; +10138;AEGEAN WEIGHT FIRST SUBUNIT;So;0;L;;;;;N;;;;; +10139;AEGEAN WEIGHT SECOND SUBUNIT;So;0;L;;;;;N;;;;; +1013A;AEGEAN WEIGHT THIRD SUBUNIT;So;0;L;;;;;N;;;;; +1013B;AEGEAN WEIGHT FOURTH SUBUNIT;So;0;L;;;;;N;;;;; +1013C;AEGEAN DRY MEASURE FIRST SUBUNIT;So;0;L;;;;;N;;;;; +1013D;AEGEAN LIQUID MEASURE FIRST SUBUNIT;So;0;L;;;;;N;;;;; +1013E;AEGEAN MEASURE SECOND SUBUNIT;So;0;L;;;;;N;;;;; +1013F;AEGEAN MEASURE THIRD SUBUNIT;So;0;L;;;;;N;;;;; +10140;GREEK ACROPHONIC ATTIC ONE QUARTER;Nl;0;ON;;;;1/4;N;;;;; +10141;GREEK ACROPHONIC ATTIC ONE HALF;Nl;0;ON;;;;1/2;N;;;;; +10142;GREEK ACROPHONIC ATTIC ONE DRACHMA;Nl;0;ON;;;;1;N;;;;; +10143;GREEK ACROPHONIC ATTIC FIVE;Nl;0;ON;;;;5;N;;;;; +10144;GREEK ACROPHONIC ATTIC FIFTY;Nl;0;ON;;;;50;N;;;;; +10145;GREEK ACROPHONIC ATTIC FIVE HUNDRED;Nl;0;ON;;;;500;N;;;;; +10146;GREEK ACROPHONIC ATTIC FIVE THOUSAND;Nl;0;ON;;;;5000;N;;;;; +10147;GREEK ACROPHONIC ATTIC FIFTY THOUSAND;Nl;0;ON;;;;50000;N;;;;; +10148;GREEK ACROPHONIC ATTIC FIVE TALENTS;Nl;0;ON;;;;5;N;;;;; +10149;GREEK ACROPHONIC ATTIC TEN TALENTS;Nl;0;ON;;;;10;N;;;;; +1014A;GREEK ACROPHONIC ATTIC FIFTY TALENTS;Nl;0;ON;;;;50;N;;;;; +1014B;GREEK ACROPHONIC ATTIC ONE HUNDRED TALENTS;Nl;0;ON;;;;100;N;;;;; +1014C;GREEK ACROPHONIC ATTIC FIVE HUNDRED TALENTS;Nl;0;ON;;;;500;N;;;;; +1014D;GREEK ACROPHONIC ATTIC ONE THOUSAND TALENTS;Nl;0;ON;;;;1000;N;;;;; +1014E;GREEK ACROPHONIC ATTIC FIVE THOUSAND TALENTS;Nl;0;ON;;;;5000;N;;;;; +1014F;GREEK ACROPHONIC ATTIC FIVE STATERS;Nl;0;ON;;;;5;N;;;;; +10150;GREEK ACROPHONIC ATTIC TEN STATERS;Nl;0;ON;;;;10;N;;;;; +10151;GREEK ACROPHONIC ATTIC FIFTY STATERS;Nl;0;ON;;;;50;N;;;;; +10152;GREEK ACROPHONIC ATTIC ONE HUNDRED STATERS;Nl;0;ON;;;;100;N;;;;; +10153;GREEK ACROPHONIC ATTIC FIVE HUNDRED STATERS;Nl;0;ON;;;;500;N;;;;; +10154;GREEK ACROPHONIC ATTIC ONE THOUSAND STATERS;Nl;0;ON;;;;1000;N;;;;; +10155;GREEK ACROPHONIC ATTIC TEN THOUSAND STATERS;Nl;0;ON;;;;10000;N;;;;; +10156;GREEK ACROPHONIC ATTIC FIFTY THOUSAND STATERS;Nl;0;ON;;;;50000;N;;;;; +10157;GREEK ACROPHONIC ATTIC TEN MNAS;Nl;0;ON;;;;10;N;;;;; +10158;GREEK ACROPHONIC HERAEUM ONE PLETHRON;Nl;0;ON;;;;1;N;;;;; +10159;GREEK ACROPHONIC THESPIAN ONE;Nl;0;ON;;;;1;N;;;;; +1015A;GREEK ACROPHONIC HERMIONIAN ONE;Nl;0;ON;;;;1;N;;;;; +1015B;GREEK ACROPHONIC EPIDAUREAN TWO;Nl;0;ON;;;;2;N;;;;; +1015C;GREEK ACROPHONIC THESPIAN TWO;Nl;0;ON;;;;2;N;;;;; +1015D;GREEK ACROPHONIC CYRENAIC TWO DRACHMAS;Nl;0;ON;;;;2;N;;;;; +1015E;GREEK ACROPHONIC EPIDAUREAN TWO DRACHMAS;Nl;0;ON;;;;2;N;;;;; +1015F;GREEK ACROPHONIC TROEZENIAN FIVE;Nl;0;ON;;;;5;N;;;;; +10160;GREEK ACROPHONIC TROEZENIAN TEN;Nl;0;ON;;;;10;N;;;;; +10161;GREEK ACROPHONIC TROEZENIAN TEN ALTERNATE FORM;Nl;0;ON;;;;10;N;;;;; +10162;GREEK ACROPHONIC HERMIONIAN TEN;Nl;0;ON;;;;10;N;;;;; +10163;GREEK ACROPHONIC MESSENIAN TEN;Nl;0;ON;;;;10;N;;;;; +10164;GREEK ACROPHONIC THESPIAN TEN;Nl;0;ON;;;;10;N;;;;; +10165;GREEK ACROPHONIC THESPIAN THIRTY;Nl;0;ON;;;;30;N;;;;; +10166;GREEK ACROPHONIC TROEZENIAN FIFTY;Nl;0;ON;;;;50;N;;;;; +10167;GREEK ACROPHONIC TROEZENIAN FIFTY ALTERNATE FORM;Nl;0;ON;;;;50;N;;;;; +10168;GREEK ACROPHONIC HERMIONIAN FIFTY;Nl;0;ON;;;;50;N;;;;; +10169;GREEK ACROPHONIC THESPIAN FIFTY;Nl;0;ON;;;;50;N;;;;; +1016A;GREEK ACROPHONIC THESPIAN ONE HUNDRED;Nl;0;ON;;;;100;N;;;;; +1016B;GREEK ACROPHONIC THESPIAN THREE HUNDRED;Nl;0;ON;;;;300;N;;;;; +1016C;GREEK ACROPHONIC EPIDAUREAN FIVE HUNDRED;Nl;0;ON;;;;500;N;;;;; +1016D;GREEK ACROPHONIC TROEZENIAN FIVE HUNDRED;Nl;0;ON;;;;500;N;;;;; +1016E;GREEK ACROPHONIC THESPIAN FIVE HUNDRED;Nl;0;ON;;;;500;N;;;;; +1016F;GREEK ACROPHONIC CARYSTIAN FIVE HUNDRED;Nl;0;ON;;;;500;N;;;;; +10170;GREEK ACROPHONIC NAXIAN FIVE HUNDRED;Nl;0;ON;;;;500;N;;;;; +10171;GREEK ACROPHONIC THESPIAN ONE THOUSAND;Nl;0;ON;;;;1000;N;;;;; +10172;GREEK ACROPHONIC THESPIAN FIVE THOUSAND;Nl;0;ON;;;;5000;N;;;;; +10173;GREEK ACROPHONIC DELPHIC FIVE MNAS;Nl;0;ON;;;;5;N;;;;; +10174;GREEK ACROPHONIC STRATIAN FIFTY MNAS;Nl;0;ON;;;;50;N;;;;; +10175;GREEK ONE HALF SIGN;No;0;ON;;;;1/2;N;;;;; +10176;GREEK ONE HALF SIGN ALTERNATE FORM;No;0;ON;;;;1/2;N;;;;; +10177;GREEK TWO THIRDS SIGN;No;0;ON;;;;2/3;N;;;;; +10178;GREEK THREE QUARTERS SIGN;No;0;ON;;;;3/4;N;;;;; +10179;GREEK YEAR SIGN;So;0;ON;;;;;N;;;;; +1017A;GREEK TALENT SIGN;So;0;ON;;;;;N;;;;; +1017B;GREEK DRACHMA SIGN;So;0;ON;;;;;N;;;;; +1017C;GREEK OBOL SIGN;So;0;ON;;;;;N;;;;; +1017D;GREEK TWO OBOLS SIGN;So;0;ON;;;;;N;;;;; +1017E;GREEK THREE OBOLS SIGN;So;0;ON;;;;;N;;;;; +1017F;GREEK FOUR OBOLS SIGN;So;0;ON;;;;;N;;;;; +10180;GREEK FIVE OBOLS SIGN;So;0;ON;;;;;N;;;;; +10181;GREEK METRETES SIGN;So;0;ON;;;;;N;;;;; +10182;GREEK KYATHOS BASE SIGN;So;0;ON;;;;;N;;;;; +10183;GREEK LITRA SIGN;So;0;ON;;;;;N;;;;; +10184;GREEK OUNKIA SIGN;So;0;ON;;;;;N;;;;; +10185;GREEK XESTES SIGN;So;0;ON;;;;;N;;;;; +10186;GREEK ARTABE SIGN;So;0;ON;;;;;N;;;;; +10187;GREEK AROURA SIGN;So;0;ON;;;;;N;;;;; +10188;GREEK GRAMMA SIGN;So;0;ON;;;;;N;;;;; +10189;GREEK TRYBLION BASE SIGN;So;0;ON;;;;;N;;;;; +1018A;GREEK ZERO SIGN;No;0;ON;;;;0;N;;;;; +1018B;GREEK ONE QUARTER SIGN;No;0;ON;;;;1/4;N;;;;; +1018C;GREEK SINUSOID SIGN;So;0;ON;;;;;N;;;;; +1018D;GREEK INDICTION SIGN;So;0;L;;;;;N;;;;; +1018E;NOMISMA SIGN;So;0;L;;;;;N;;;;; +10190;ROMAN SEXTANS SIGN;So;0;ON;;;;;N;;;;; +10191;ROMAN UNCIA SIGN;So;0;ON;;;;;N;;;;; +10192;ROMAN SEMUNCIA SIGN;So;0;ON;;;;;N;;;;; +10193;ROMAN SEXTULA SIGN;So;0;ON;;;;;N;;;;; +10194;ROMAN DIMIDIA SEXTULA SIGN;So;0;ON;;;;;N;;;;; +10195;ROMAN SILIQUA SIGN;So;0;ON;;;;;N;;;;; +10196;ROMAN DENARIUS SIGN;So;0;ON;;;;;N;;;;; +10197;ROMAN QUINARIUS SIGN;So;0;ON;;;;;N;;;;; +10198;ROMAN SESTERTIUS SIGN;So;0;ON;;;;;N;;;;; +10199;ROMAN DUPONDIUS SIGN;So;0;ON;;;;;N;;;;; +1019A;ROMAN AS SIGN;So;0;ON;;;;;N;;;;; +1019B;ROMAN CENTURIAL SIGN;So;0;ON;;;;;N;;;;; +101A0;GREEK SYMBOL TAU RHO;So;0;ON;;;;;N;;;;; +101D0;PHAISTOS DISC SIGN PEDESTRIAN;So;0;L;;;;;N;;;;; +101D1;PHAISTOS DISC SIGN PLUMED HEAD;So;0;L;;;;;N;;;;; +101D2;PHAISTOS DISC SIGN TATTOOED HEAD;So;0;L;;;;;N;;;;; +101D3;PHAISTOS DISC SIGN CAPTIVE;So;0;L;;;;;N;;;;; +101D4;PHAISTOS DISC SIGN CHILD;So;0;L;;;;;N;;;;; +101D5;PHAISTOS DISC SIGN WOMAN;So;0;L;;;;;N;;;;; +101D6;PHAISTOS DISC SIGN HELMET;So;0;L;;;;;N;;;;; +101D7;PHAISTOS DISC SIGN GAUNTLET;So;0;L;;;;;N;;;;; +101D8;PHAISTOS DISC SIGN TIARA;So;0;L;;;;;N;;;;; +101D9;PHAISTOS DISC SIGN ARROW;So;0;L;;;;;N;;;;; +101DA;PHAISTOS DISC SIGN BOW;So;0;L;;;;;N;;;;; +101DB;PHAISTOS DISC SIGN SHIELD;So;0;L;;;;;N;;;;; +101DC;PHAISTOS DISC SIGN CLUB;So;0;L;;;;;N;;;;; +101DD;PHAISTOS DISC SIGN MANACLES;So;0;L;;;;;N;;;;; +101DE;PHAISTOS DISC SIGN MATTOCK;So;0;L;;;;;N;;;;; +101DF;PHAISTOS DISC SIGN SAW;So;0;L;;;;;N;;;;; +101E0;PHAISTOS DISC SIGN LID;So;0;L;;;;;N;;;;; +101E1;PHAISTOS DISC SIGN BOOMERANG;So;0;L;;;;;N;;;;; +101E2;PHAISTOS DISC SIGN CARPENTRY PLANE;So;0;L;;;;;N;;;;; +101E3;PHAISTOS DISC SIGN DOLIUM;So;0;L;;;;;N;;;;; +101E4;PHAISTOS DISC SIGN COMB;So;0;L;;;;;N;;;;; +101E5;PHAISTOS DISC SIGN SLING;So;0;L;;;;;N;;;;; +101E6;PHAISTOS DISC SIGN COLUMN;So;0;L;;;;;N;;;;; +101E7;PHAISTOS DISC SIGN BEEHIVE;So;0;L;;;;;N;;;;; +101E8;PHAISTOS DISC SIGN SHIP;So;0;L;;;;;N;;;;; +101E9;PHAISTOS DISC SIGN HORN;So;0;L;;;;;N;;;;; +101EA;PHAISTOS DISC SIGN HIDE;So;0;L;;;;;N;;;;; +101EB;PHAISTOS DISC SIGN BULLS LEG;So;0;L;;;;;N;;;;; +101EC;PHAISTOS DISC SIGN CAT;So;0;L;;;;;N;;;;; +101ED;PHAISTOS DISC SIGN RAM;So;0;L;;;;;N;;;;; +101EE;PHAISTOS DISC SIGN EAGLE;So;0;L;;;;;N;;;;; +101EF;PHAISTOS DISC SIGN DOVE;So;0;L;;;;;N;;;;; +101F0;PHAISTOS DISC SIGN TUNNY;So;0;L;;;;;N;;;;; +101F1;PHAISTOS DISC SIGN BEE;So;0;L;;;;;N;;;;; +101F2;PHAISTOS DISC SIGN PLANE TREE;So;0;L;;;;;N;;;;; +101F3;PHAISTOS DISC SIGN VINE;So;0;L;;;;;N;;;;; +101F4;PHAISTOS DISC SIGN PAPYRUS;So;0;L;;;;;N;;;;; +101F5;PHAISTOS DISC SIGN ROSETTE;So;0;L;;;;;N;;;;; +101F6;PHAISTOS DISC SIGN LILY;So;0;L;;;;;N;;;;; +101F7;PHAISTOS DISC SIGN OX BACK;So;0;L;;;;;N;;;;; +101F8;PHAISTOS DISC SIGN FLUTE;So;0;L;;;;;N;;;;; +101F9;PHAISTOS DISC SIGN GRATER;So;0;L;;;;;N;;;;; +101FA;PHAISTOS DISC SIGN STRAINER;So;0;L;;;;;N;;;;; +101FB;PHAISTOS DISC SIGN SMALL AXE;So;0;L;;;;;N;;;;; +101FC;PHAISTOS DISC SIGN WAVY BAND;So;0;L;;;;;N;;;;; +101FD;PHAISTOS DISC SIGN COMBINING OBLIQUE STROKE;Mn;220;NSM;;;;;N;;;;; +10280;LYCIAN LETTER A;Lo;0;L;;;;;N;;;;; +10281;LYCIAN LETTER E;Lo;0;L;;;;;N;;;;; +10282;LYCIAN LETTER B;Lo;0;L;;;;;N;;;;; +10283;LYCIAN LETTER BH;Lo;0;L;;;;;N;;;;; +10284;LYCIAN LETTER G;Lo;0;L;;;;;N;;;;; +10285;LYCIAN LETTER D;Lo;0;L;;;;;N;;;;; +10286;LYCIAN LETTER I;Lo;0;L;;;;;N;;;;; +10287;LYCIAN LETTER W;Lo;0;L;;;;;N;;;;; +10288;LYCIAN LETTER Z;Lo;0;L;;;;;N;;;;; +10289;LYCIAN LETTER TH;Lo;0;L;;;;;N;;;;; +1028A;LYCIAN LETTER J;Lo;0;L;;;;;N;;;;; +1028B;LYCIAN LETTER K;Lo;0;L;;;;;N;;;;; +1028C;LYCIAN LETTER Q;Lo;0;L;;;;;N;;;;; +1028D;LYCIAN LETTER L;Lo;0;L;;;;;N;;;;; +1028E;LYCIAN LETTER M;Lo;0;L;;;;;N;;;;; +1028F;LYCIAN LETTER N;Lo;0;L;;;;;N;;;;; +10290;LYCIAN LETTER MM;Lo;0;L;;;;;N;;;;; +10291;LYCIAN LETTER NN;Lo;0;L;;;;;N;;;;; +10292;LYCIAN LETTER U;Lo;0;L;;;;;N;;;;; +10293;LYCIAN LETTER P;Lo;0;L;;;;;N;;;;; +10294;LYCIAN LETTER KK;Lo;0;L;;;;;N;;;;; +10295;LYCIAN LETTER R;Lo;0;L;;;;;N;;;;; +10296;LYCIAN LETTER S;Lo;0;L;;;;;N;;;;; +10297;LYCIAN LETTER T;Lo;0;L;;;;;N;;;;; +10298;LYCIAN LETTER TT;Lo;0;L;;;;;N;;;;; +10299;LYCIAN LETTER AN;Lo;0;L;;;;;N;;;;; +1029A;LYCIAN LETTER EN;Lo;0;L;;;;;N;;;;; +1029B;LYCIAN LETTER H;Lo;0;L;;;;;N;;;;; +1029C;LYCIAN LETTER X;Lo;0;L;;;;;N;;;;; +102A0;CARIAN LETTER A;Lo;0;L;;;;;N;;;;; +102A1;CARIAN LETTER P2;Lo;0;L;;;;;N;;;;; +102A2;CARIAN LETTER D;Lo;0;L;;;;;N;;;;; +102A3;CARIAN LETTER L;Lo;0;L;;;;;N;;;;; +102A4;CARIAN LETTER UUU;Lo;0;L;;;;;N;;;;; +102A5;CARIAN LETTER R;Lo;0;L;;;;;N;;;;; +102A6;CARIAN LETTER LD;Lo;0;L;;;;;N;;;;; +102A7;CARIAN LETTER A2;Lo;0;L;;;;;N;;;;; +102A8;CARIAN LETTER Q;Lo;0;L;;;;;N;;;;; +102A9;CARIAN LETTER B;Lo;0;L;;;;;N;;;;; +102AA;CARIAN LETTER M;Lo;0;L;;;;;N;;;;; +102AB;CARIAN LETTER O;Lo;0;L;;;;;N;;;;; +102AC;CARIAN LETTER D2;Lo;0;L;;;;;N;;;;; +102AD;CARIAN LETTER T;Lo;0;L;;;;;N;;;;; +102AE;CARIAN LETTER SH;Lo;0;L;;;;;N;;;;; +102AF;CARIAN LETTER SH2;Lo;0;L;;;;;N;;;;; +102B0;CARIAN LETTER S;Lo;0;L;;;;;N;;;;; +102B1;CARIAN LETTER C-18;Lo;0;L;;;;;N;;;;; +102B2;CARIAN LETTER U;Lo;0;L;;;;;N;;;;; +102B3;CARIAN LETTER NN;Lo;0;L;;;;;N;;;;; +102B4;CARIAN LETTER X;Lo;0;L;;;;;N;;;;; +102B5;CARIAN LETTER N;Lo;0;L;;;;;N;;;;; +102B6;CARIAN LETTER TT2;Lo;0;L;;;;;N;;;;; +102B7;CARIAN LETTER P;Lo;0;L;;;;;N;;;;; +102B8;CARIAN LETTER SS;Lo;0;L;;;;;N;;;;; +102B9;CARIAN LETTER I;Lo;0;L;;;;;N;;;;; +102BA;CARIAN LETTER E;Lo;0;L;;;;;N;;;;; +102BB;CARIAN LETTER UUUU;Lo;0;L;;;;;N;;;;; +102BC;CARIAN LETTER K;Lo;0;L;;;;;N;;;;; +102BD;CARIAN LETTER K2;Lo;0;L;;;;;N;;;;; +102BE;CARIAN LETTER ND;Lo;0;L;;;;;N;;;;; +102BF;CARIAN LETTER UU;Lo;0;L;;;;;N;;;;; +102C0;CARIAN LETTER G;Lo;0;L;;;;;N;;;;; +102C1;CARIAN LETTER G2;Lo;0;L;;;;;N;;;;; +102C2;CARIAN LETTER ST;Lo;0;L;;;;;N;;;;; +102C3;CARIAN LETTER ST2;Lo;0;L;;;;;N;;;;; +102C4;CARIAN LETTER NG;Lo;0;L;;;;;N;;;;; +102C5;CARIAN LETTER II;Lo;0;L;;;;;N;;;;; +102C6;CARIAN LETTER C-39;Lo;0;L;;;;;N;;;;; +102C7;CARIAN LETTER TT;Lo;0;L;;;;;N;;;;; +102C8;CARIAN LETTER UUU2;Lo;0;L;;;;;N;;;;; +102C9;CARIAN LETTER RR;Lo;0;L;;;;;N;;;;; +102CA;CARIAN LETTER MB;Lo;0;L;;;;;N;;;;; +102CB;CARIAN LETTER MB2;Lo;0;L;;;;;N;;;;; +102CC;CARIAN LETTER MB3;Lo;0;L;;;;;N;;;;; +102CD;CARIAN LETTER MB4;Lo;0;L;;;;;N;;;;; +102CE;CARIAN LETTER LD2;Lo;0;L;;;;;N;;;;; +102CF;CARIAN LETTER E2;Lo;0;L;;;;;N;;;;; +102D0;CARIAN LETTER UUU3;Lo;0;L;;;;;N;;;;; +102E0;COPTIC EPACT THOUSANDS MARK;Mn;220;NSM;;;;;N;;;;; +102E1;COPTIC EPACT DIGIT ONE;No;0;EN;;;;1;N;;;;; +102E2;COPTIC EPACT DIGIT TWO;No;0;EN;;;;2;N;;;;; +102E3;COPTIC EPACT DIGIT THREE;No;0;EN;;;;3;N;;;;; +102E4;COPTIC EPACT DIGIT FOUR;No;0;EN;;;;4;N;;;;; +102E5;COPTIC EPACT DIGIT FIVE;No;0;EN;;;;5;N;;;;; +102E6;COPTIC EPACT DIGIT SIX;No;0;EN;;;;6;N;;;;; +102E7;COPTIC EPACT DIGIT SEVEN;No;0;EN;;;;7;N;;;;; +102E8;COPTIC EPACT DIGIT EIGHT;No;0;EN;;;;8;N;;;;; +102E9;COPTIC EPACT DIGIT NINE;No;0;EN;;;;9;N;;;;; +102EA;COPTIC EPACT NUMBER TEN;No;0;EN;;;;10;N;;;;; +102EB;COPTIC EPACT NUMBER TWENTY;No;0;EN;;;;20;N;;;;; +102EC;COPTIC EPACT NUMBER THIRTY;No;0;EN;;;;30;N;;;;; +102ED;COPTIC EPACT NUMBER FORTY;No;0;EN;;;;40;N;;;;; +102EE;COPTIC EPACT NUMBER FIFTY;No;0;EN;;;;50;N;;;;; +102EF;COPTIC EPACT NUMBER SIXTY;No;0;EN;;;;60;N;;;;; +102F0;COPTIC EPACT NUMBER SEVENTY;No;0;EN;;;;70;N;;;;; +102F1;COPTIC EPACT NUMBER EIGHTY;No;0;EN;;;;80;N;;;;; +102F2;COPTIC EPACT NUMBER NINETY;No;0;EN;;;;90;N;;;;; +102F3;COPTIC EPACT NUMBER ONE HUNDRED;No;0;EN;;;;100;N;;;;; +102F4;COPTIC EPACT NUMBER TWO HUNDRED;No;0;EN;;;;200;N;;;;; +102F5;COPTIC EPACT NUMBER THREE HUNDRED;No;0;EN;;;;300;N;;;;; +102F6;COPTIC EPACT NUMBER FOUR HUNDRED;No;0;EN;;;;400;N;;;;; +102F7;COPTIC EPACT NUMBER FIVE HUNDRED;No;0;EN;;;;500;N;;;;; +102F8;COPTIC EPACT NUMBER SIX HUNDRED;No;0;EN;;;;600;N;;;;; +102F9;COPTIC EPACT NUMBER SEVEN HUNDRED;No;0;EN;;;;700;N;;;;; +102FA;COPTIC EPACT NUMBER EIGHT HUNDRED;No;0;EN;;;;800;N;;;;; +102FB;COPTIC EPACT NUMBER NINE HUNDRED;No;0;EN;;;;900;N;;;;; +10300;OLD ITALIC LETTER A;Lo;0;L;;;;;N;;;;; +10301;OLD ITALIC LETTER BE;Lo;0;L;;;;;N;;;;; +10302;OLD ITALIC LETTER KE;Lo;0;L;;;;;N;;;;; +10303;OLD ITALIC LETTER DE;Lo;0;L;;;;;N;;;;; +10304;OLD ITALIC LETTER E;Lo;0;L;;;;;N;;;;; +10305;OLD ITALIC LETTER VE;Lo;0;L;;;;;N;;;;; +10306;OLD ITALIC LETTER ZE;Lo;0;L;;;;;N;;;;; +10307;OLD ITALIC LETTER HE;Lo;0;L;;;;;N;;;;; +10308;OLD ITALIC LETTER THE;Lo;0;L;;;;;N;;;;; +10309;OLD ITALIC LETTER I;Lo;0;L;;;;;N;;;;; +1030A;OLD ITALIC LETTER KA;Lo;0;L;;;;;N;;;;; +1030B;OLD ITALIC LETTER EL;Lo;0;L;;;;;N;;;;; +1030C;OLD ITALIC LETTER EM;Lo;0;L;;;;;N;;;;; +1030D;OLD ITALIC LETTER EN;Lo;0;L;;;;;N;;;;; +1030E;OLD ITALIC LETTER ESH;Lo;0;L;;;;;N;;;;; +1030F;OLD ITALIC LETTER O;Lo;0;L;;;;;N;;;;; +10310;OLD ITALIC LETTER PE;Lo;0;L;;;;;N;;;;; +10311;OLD ITALIC LETTER SHE;Lo;0;L;;;;;N;;;;; +10312;OLD ITALIC LETTER KU;Lo;0;L;;;;;N;;;;; +10313;OLD ITALIC LETTER ER;Lo;0;L;;;;;N;;;;; +10314;OLD ITALIC LETTER ES;Lo;0;L;;;;;N;;;;; +10315;OLD ITALIC LETTER TE;Lo;0;L;;;;;N;;;;; +10316;OLD ITALIC LETTER U;Lo;0;L;;;;;N;;;;; +10317;OLD ITALIC LETTER EKS;Lo;0;L;;;;;N;;;;; +10318;OLD ITALIC LETTER PHE;Lo;0;L;;;;;N;;;;; +10319;OLD ITALIC LETTER KHE;Lo;0;L;;;;;N;;;;; +1031A;OLD ITALIC LETTER EF;Lo;0;L;;;;;N;;;;; +1031B;OLD ITALIC LETTER ERS;Lo;0;L;;;;;N;;;;; +1031C;OLD ITALIC LETTER CHE;Lo;0;L;;;;;N;;;;; +1031D;OLD ITALIC LETTER II;Lo;0;L;;;;;N;;;;; +1031E;OLD ITALIC LETTER UU;Lo;0;L;;;;;N;;;;; +1031F;OLD ITALIC LETTER ESS;Lo;0;L;;;;;N;;;;; +10320;OLD ITALIC NUMERAL ONE;No;0;L;;;;1;N;;;;; +10321;OLD ITALIC NUMERAL FIVE;No;0;L;;;;5;N;;;;; +10322;OLD ITALIC NUMERAL TEN;No;0;L;;;;10;N;;;;; +10323;OLD ITALIC NUMERAL FIFTY;No;0;L;;;;50;N;;;;; +1032D;OLD ITALIC LETTER YE;Lo;0;L;;;;;N;;;;; +1032E;OLD ITALIC LETTER NORTHERN TSE;Lo;0;L;;;;;N;;;;; +1032F;OLD ITALIC LETTER SOUTHERN TSE;Lo;0;L;;;;;N;;;;; +10330;GOTHIC LETTER AHSA;Lo;0;L;;;;;N;;;;; +10331;GOTHIC LETTER BAIRKAN;Lo;0;L;;;;;N;;;;; +10332;GOTHIC LETTER GIBA;Lo;0;L;;;;;N;;;;; +10333;GOTHIC LETTER DAGS;Lo;0;L;;;;;N;;;;; +10334;GOTHIC LETTER AIHVUS;Lo;0;L;;;;;N;;;;; +10335;GOTHIC LETTER QAIRTHRA;Lo;0;L;;;;;N;;;;; +10336;GOTHIC LETTER IUJA;Lo;0;L;;;;;N;;;;; +10337;GOTHIC LETTER HAGL;Lo;0;L;;;;;N;;;;; +10338;GOTHIC LETTER THIUTH;Lo;0;L;;;;;N;;;;; +10339;GOTHIC LETTER EIS;Lo;0;L;;;;;N;;;;; +1033A;GOTHIC LETTER KUSMA;Lo;0;L;;;;;N;;;;; +1033B;GOTHIC LETTER LAGUS;Lo;0;L;;;;;N;;;;; +1033C;GOTHIC LETTER MANNA;Lo;0;L;;;;;N;;;;; +1033D;GOTHIC LETTER NAUTHS;Lo;0;L;;;;;N;;;;; +1033E;GOTHIC LETTER JER;Lo;0;L;;;;;N;;;;; +1033F;GOTHIC LETTER URUS;Lo;0;L;;;;;N;;;;; +10340;GOTHIC LETTER PAIRTHRA;Lo;0;L;;;;;N;;;;; +10341;GOTHIC LETTER NINETY;Nl;0;L;;;;90;N;;;;; +10342;GOTHIC LETTER RAIDA;Lo;0;L;;;;;N;;;;; +10343;GOTHIC LETTER SAUIL;Lo;0;L;;;;;N;;;;; +10344;GOTHIC LETTER TEIWS;Lo;0;L;;;;;N;;;;; +10345;GOTHIC LETTER WINJA;Lo;0;L;;;;;N;;;;; +10346;GOTHIC LETTER FAIHU;Lo;0;L;;;;;N;;;;; +10347;GOTHIC LETTER IGGWS;Lo;0;L;;;;;N;;;;; +10348;GOTHIC LETTER HWAIR;Lo;0;L;;;;;N;;;;; +10349;GOTHIC LETTER OTHAL;Lo;0;L;;;;;N;;;;; +1034A;GOTHIC LETTER NINE HUNDRED;Nl;0;L;;;;900;N;;;;; +10350;OLD PERMIC LETTER AN;Lo;0;L;;;;;N;;;;; +10351;OLD PERMIC LETTER BUR;Lo;0;L;;;;;N;;;;; +10352;OLD PERMIC LETTER GAI;Lo;0;L;;;;;N;;;;; +10353;OLD PERMIC LETTER DOI;Lo;0;L;;;;;N;;;;; +10354;OLD PERMIC LETTER E;Lo;0;L;;;;;N;;;;; +10355;OLD PERMIC LETTER ZHOI;Lo;0;L;;;;;N;;;;; +10356;OLD PERMIC LETTER DZHOI;Lo;0;L;;;;;N;;;;; +10357;OLD PERMIC LETTER ZATA;Lo;0;L;;;;;N;;;;; +10358;OLD PERMIC LETTER DZITA;Lo;0;L;;;;;N;;;;; +10359;OLD PERMIC LETTER I;Lo;0;L;;;;;N;;;;; +1035A;OLD PERMIC LETTER KOKE;Lo;0;L;;;;;N;;;;; +1035B;OLD PERMIC LETTER LEI;Lo;0;L;;;;;N;;;;; +1035C;OLD PERMIC LETTER MENOE;Lo;0;L;;;;;N;;;;; +1035D;OLD PERMIC LETTER NENOE;Lo;0;L;;;;;N;;;;; +1035E;OLD PERMIC LETTER VOOI;Lo;0;L;;;;;N;;;;; +1035F;OLD PERMIC LETTER PEEI;Lo;0;L;;;;;N;;;;; +10360;OLD PERMIC LETTER REI;Lo;0;L;;;;;N;;;;; +10361;OLD PERMIC LETTER SII;Lo;0;L;;;;;N;;;;; +10362;OLD PERMIC LETTER TAI;Lo;0;L;;;;;N;;;;; +10363;OLD PERMIC LETTER U;Lo;0;L;;;;;N;;;;; +10364;OLD PERMIC LETTER CHERY;Lo;0;L;;;;;N;;;;; +10365;OLD PERMIC LETTER SHOOI;Lo;0;L;;;;;N;;;;; +10366;OLD PERMIC LETTER SHCHOOI;Lo;0;L;;;;;N;;;;; +10367;OLD PERMIC LETTER YRY;Lo;0;L;;;;;N;;;;; +10368;OLD PERMIC LETTER YERU;Lo;0;L;;;;;N;;;;; +10369;OLD PERMIC LETTER O;Lo;0;L;;;;;N;;;;; +1036A;OLD PERMIC LETTER OO;Lo;0;L;;;;;N;;;;; +1036B;OLD PERMIC LETTER EF;Lo;0;L;;;;;N;;;;; +1036C;OLD PERMIC LETTER HA;Lo;0;L;;;;;N;;;;; +1036D;OLD PERMIC LETTER TSIU;Lo;0;L;;;;;N;;;;; +1036E;OLD PERMIC LETTER VER;Lo;0;L;;;;;N;;;;; +1036F;OLD PERMIC LETTER YER;Lo;0;L;;;;;N;;;;; +10370;OLD PERMIC LETTER YERI;Lo;0;L;;;;;N;;;;; +10371;OLD PERMIC LETTER YAT;Lo;0;L;;;;;N;;;;; +10372;OLD PERMIC LETTER IE;Lo;0;L;;;;;N;;;;; +10373;OLD PERMIC LETTER YU;Lo;0;L;;;;;N;;;;; +10374;OLD PERMIC LETTER YA;Lo;0;L;;;;;N;;;;; +10375;OLD PERMIC LETTER IA;Lo;0;L;;;;;N;;;;; +10376;COMBINING OLD PERMIC LETTER AN;Mn;230;NSM;;;;;N;;;;; +10377;COMBINING OLD PERMIC LETTER DOI;Mn;230;NSM;;;;;N;;;;; +10378;COMBINING OLD PERMIC LETTER ZATA;Mn;230;NSM;;;;;N;;;;; +10379;COMBINING OLD PERMIC LETTER NENOE;Mn;230;NSM;;;;;N;;;;; +1037A;COMBINING OLD PERMIC LETTER SII;Mn;230;NSM;;;;;N;;;;; +10380;UGARITIC LETTER ALPA;Lo;0;L;;;;;N;;;;; +10381;UGARITIC LETTER BETA;Lo;0;L;;;;;N;;;;; +10382;UGARITIC LETTER GAMLA;Lo;0;L;;;;;N;;;;; +10383;UGARITIC LETTER KHA;Lo;0;L;;;;;N;;;;; +10384;UGARITIC LETTER DELTA;Lo;0;L;;;;;N;;;;; +10385;UGARITIC LETTER HO;Lo;0;L;;;;;N;;;;; +10386;UGARITIC LETTER WO;Lo;0;L;;;;;N;;;;; +10387;UGARITIC LETTER ZETA;Lo;0;L;;;;;N;;;;; +10388;UGARITIC LETTER HOTA;Lo;0;L;;;;;N;;;;; +10389;UGARITIC LETTER TET;Lo;0;L;;;;;N;;;;; +1038A;UGARITIC LETTER YOD;Lo;0;L;;;;;N;;;;; +1038B;UGARITIC LETTER KAF;Lo;0;L;;;;;N;;;;; +1038C;UGARITIC LETTER SHIN;Lo;0;L;;;;;N;;;;; +1038D;UGARITIC LETTER LAMDA;Lo;0;L;;;;;N;;;;; +1038E;UGARITIC LETTER MEM;Lo;0;L;;;;;N;;;;; +1038F;UGARITIC LETTER DHAL;Lo;0;L;;;;;N;;;;; +10390;UGARITIC LETTER NUN;Lo;0;L;;;;;N;;;;; +10391;UGARITIC LETTER ZU;Lo;0;L;;;;;N;;;;; +10392;UGARITIC LETTER SAMKA;Lo;0;L;;;;;N;;;;; +10393;UGARITIC LETTER AIN;Lo;0;L;;;;;N;;;;; +10394;UGARITIC LETTER PU;Lo;0;L;;;;;N;;;;; +10395;UGARITIC LETTER SADE;Lo;0;L;;;;;N;;;;; +10396;UGARITIC LETTER QOPA;Lo;0;L;;;;;N;;;;; +10397;UGARITIC LETTER RASHA;Lo;0;L;;;;;N;;;;; +10398;UGARITIC LETTER THANNA;Lo;0;L;;;;;N;;;;; +10399;UGARITIC LETTER GHAIN;Lo;0;L;;;;;N;;;;; +1039A;UGARITIC LETTER TO;Lo;0;L;;;;;N;;;;; +1039B;UGARITIC LETTER I;Lo;0;L;;;;;N;;;;; +1039C;UGARITIC LETTER U;Lo;0;L;;;;;N;;;;; +1039D;UGARITIC LETTER SSU;Lo;0;L;;;;;N;;;;; +1039F;UGARITIC WORD DIVIDER;Po;0;L;;;;;N;;;;; +103A0;OLD PERSIAN SIGN A;Lo;0;L;;;;;N;;;;; +103A1;OLD PERSIAN SIGN I;Lo;0;L;;;;;N;;;;; +103A2;OLD PERSIAN SIGN U;Lo;0;L;;;;;N;;;;; +103A3;OLD PERSIAN SIGN KA;Lo;0;L;;;;;N;;;;; +103A4;OLD PERSIAN SIGN KU;Lo;0;L;;;;;N;;;;; +103A5;OLD PERSIAN SIGN GA;Lo;0;L;;;;;N;;;;; +103A6;OLD PERSIAN SIGN GU;Lo;0;L;;;;;N;;;;; +103A7;OLD PERSIAN SIGN XA;Lo;0;L;;;;;N;;;;; +103A8;OLD PERSIAN SIGN CA;Lo;0;L;;;;;N;;;;; +103A9;OLD PERSIAN SIGN JA;Lo;0;L;;;;;N;;;;; +103AA;OLD PERSIAN SIGN JI;Lo;0;L;;;;;N;;;;; +103AB;OLD PERSIAN SIGN TA;Lo;0;L;;;;;N;;;;; +103AC;OLD PERSIAN SIGN TU;Lo;0;L;;;;;N;;;;; +103AD;OLD PERSIAN SIGN DA;Lo;0;L;;;;;N;;;;; +103AE;OLD PERSIAN SIGN DI;Lo;0;L;;;;;N;;;;; +103AF;OLD PERSIAN SIGN DU;Lo;0;L;;;;;N;;;;; +103B0;OLD PERSIAN SIGN THA;Lo;0;L;;;;;N;;;;; +103B1;OLD PERSIAN SIGN PA;Lo;0;L;;;;;N;;;;; +103B2;OLD PERSIAN SIGN BA;Lo;0;L;;;;;N;;;;; +103B3;OLD PERSIAN SIGN FA;Lo;0;L;;;;;N;;;;; +103B4;OLD PERSIAN SIGN NA;Lo;0;L;;;;;N;;;;; +103B5;OLD PERSIAN SIGN NU;Lo;0;L;;;;;N;;;;; +103B6;OLD PERSIAN SIGN MA;Lo;0;L;;;;;N;;;;; +103B7;OLD PERSIAN SIGN MI;Lo;0;L;;;;;N;;;;; +103B8;OLD PERSIAN SIGN MU;Lo;0;L;;;;;N;;;;; +103B9;OLD PERSIAN SIGN YA;Lo;0;L;;;;;N;;;;; +103BA;OLD PERSIAN SIGN VA;Lo;0;L;;;;;N;;;;; +103BB;OLD PERSIAN SIGN VI;Lo;0;L;;;;;N;;;;; +103BC;OLD PERSIAN SIGN RA;Lo;0;L;;;;;N;;;;; +103BD;OLD PERSIAN SIGN RU;Lo;0;L;;;;;N;;;;; +103BE;OLD PERSIAN SIGN LA;Lo;0;L;;;;;N;;;;; +103BF;OLD PERSIAN SIGN SA;Lo;0;L;;;;;N;;;;; +103C0;OLD PERSIAN SIGN ZA;Lo;0;L;;;;;N;;;;; +103C1;OLD PERSIAN SIGN SHA;Lo;0;L;;;;;N;;;;; +103C2;OLD PERSIAN SIGN SSA;Lo;0;L;;;;;N;;;;; +103C3;OLD PERSIAN SIGN HA;Lo;0;L;;;;;N;;;;; +103C8;OLD PERSIAN SIGN AURAMAZDAA;Lo;0;L;;;;;N;;;;; +103C9;OLD PERSIAN SIGN AURAMAZDAA-2;Lo;0;L;;;;;N;;;;; +103CA;OLD PERSIAN SIGN AURAMAZDAAHA;Lo;0;L;;;;;N;;;;; +103CB;OLD PERSIAN SIGN XSHAAYATHIYA;Lo;0;L;;;;;N;;;;; +103CC;OLD PERSIAN SIGN DAHYAAUSH;Lo;0;L;;;;;N;;;;; +103CD;OLD PERSIAN SIGN DAHYAAUSH-2;Lo;0;L;;;;;N;;;;; +103CE;OLD PERSIAN SIGN BAGA;Lo;0;L;;;;;N;;;;; +103CF;OLD PERSIAN SIGN BUUMISH;Lo;0;L;;;;;N;;;;; +103D0;OLD PERSIAN WORD DIVIDER;Po;0;L;;;;;N;;;;; +103D1;OLD PERSIAN NUMBER ONE;Nl;0;L;;;;1;N;;;;; +103D2;OLD PERSIAN NUMBER TWO;Nl;0;L;;;;2;N;;;;; +103D3;OLD PERSIAN NUMBER TEN;Nl;0;L;;;;10;N;;;;; +103D4;OLD PERSIAN NUMBER TWENTY;Nl;0;L;;;;20;N;;;;; +103D5;OLD PERSIAN NUMBER HUNDRED;Nl;0;L;;;;100;N;;;;; +10400;DESERET CAPITAL LETTER LONG I;Lu;0;L;;;;;N;;;;10428; +10401;DESERET CAPITAL LETTER LONG E;Lu;0;L;;;;;N;;;;10429; +10402;DESERET CAPITAL LETTER LONG A;Lu;0;L;;;;;N;;;;1042A; +10403;DESERET CAPITAL LETTER LONG AH;Lu;0;L;;;;;N;;;;1042B; +10404;DESERET CAPITAL LETTER LONG O;Lu;0;L;;;;;N;;;;1042C; +10405;DESERET CAPITAL LETTER LONG OO;Lu;0;L;;;;;N;;;;1042D; +10406;DESERET CAPITAL LETTER SHORT I;Lu;0;L;;;;;N;;;;1042E; +10407;DESERET CAPITAL LETTER SHORT E;Lu;0;L;;;;;N;;;;1042F; +10408;DESERET CAPITAL LETTER SHORT A;Lu;0;L;;;;;N;;;;10430; +10409;DESERET CAPITAL LETTER SHORT AH;Lu;0;L;;;;;N;;;;10431; +1040A;DESERET CAPITAL LETTER SHORT O;Lu;0;L;;;;;N;;;;10432; +1040B;DESERET CAPITAL LETTER SHORT OO;Lu;0;L;;;;;N;;;;10433; +1040C;DESERET CAPITAL LETTER AY;Lu;0;L;;;;;N;;;;10434; +1040D;DESERET CAPITAL LETTER OW;Lu;0;L;;;;;N;;;;10435; +1040E;DESERET CAPITAL LETTER WU;Lu;0;L;;;;;N;;;;10436; +1040F;DESERET CAPITAL LETTER YEE;Lu;0;L;;;;;N;;;;10437; +10410;DESERET CAPITAL LETTER H;Lu;0;L;;;;;N;;;;10438; +10411;DESERET CAPITAL LETTER PEE;Lu;0;L;;;;;N;;;;10439; +10412;DESERET CAPITAL LETTER BEE;Lu;0;L;;;;;N;;;;1043A; +10413;DESERET CAPITAL LETTER TEE;Lu;0;L;;;;;N;;;;1043B; +10414;DESERET CAPITAL LETTER DEE;Lu;0;L;;;;;N;;;;1043C; +10415;DESERET CAPITAL LETTER CHEE;Lu;0;L;;;;;N;;;;1043D; +10416;DESERET CAPITAL LETTER JEE;Lu;0;L;;;;;N;;;;1043E; +10417;DESERET CAPITAL LETTER KAY;Lu;0;L;;;;;N;;;;1043F; +10418;DESERET CAPITAL LETTER GAY;Lu;0;L;;;;;N;;;;10440; +10419;DESERET CAPITAL LETTER EF;Lu;0;L;;;;;N;;;;10441; +1041A;DESERET CAPITAL LETTER VEE;Lu;0;L;;;;;N;;;;10442; +1041B;DESERET CAPITAL LETTER ETH;Lu;0;L;;;;;N;;;;10443; +1041C;DESERET CAPITAL LETTER THEE;Lu;0;L;;;;;N;;;;10444; +1041D;DESERET CAPITAL LETTER ES;Lu;0;L;;;;;N;;;;10445; +1041E;DESERET CAPITAL LETTER ZEE;Lu;0;L;;;;;N;;;;10446; +1041F;DESERET CAPITAL LETTER ESH;Lu;0;L;;;;;N;;;;10447; +10420;DESERET CAPITAL LETTER ZHEE;Lu;0;L;;;;;N;;;;10448; +10421;DESERET CAPITAL LETTER ER;Lu;0;L;;;;;N;;;;10449; +10422;DESERET CAPITAL LETTER EL;Lu;0;L;;;;;N;;;;1044A; +10423;DESERET CAPITAL LETTER EM;Lu;0;L;;;;;N;;;;1044B; +10424;DESERET CAPITAL LETTER EN;Lu;0;L;;;;;N;;;;1044C; +10425;DESERET CAPITAL LETTER ENG;Lu;0;L;;;;;N;;;;1044D; +10426;DESERET CAPITAL LETTER OI;Lu;0;L;;;;;N;;;;1044E; +10427;DESERET CAPITAL LETTER EW;Lu;0;L;;;;;N;;;;1044F; +10428;DESERET SMALL LETTER LONG I;Ll;0;L;;;;;N;;;10400;;10400 +10429;DESERET SMALL LETTER LONG E;Ll;0;L;;;;;N;;;10401;;10401 +1042A;DESERET SMALL LETTER LONG A;Ll;0;L;;;;;N;;;10402;;10402 +1042B;DESERET SMALL LETTER LONG AH;Ll;0;L;;;;;N;;;10403;;10403 +1042C;DESERET SMALL LETTER LONG O;Ll;0;L;;;;;N;;;10404;;10404 +1042D;DESERET SMALL LETTER LONG OO;Ll;0;L;;;;;N;;;10405;;10405 +1042E;DESERET SMALL LETTER SHORT I;Ll;0;L;;;;;N;;;10406;;10406 +1042F;DESERET SMALL LETTER SHORT E;Ll;0;L;;;;;N;;;10407;;10407 +10430;DESERET SMALL LETTER SHORT A;Ll;0;L;;;;;N;;;10408;;10408 +10431;DESERET SMALL LETTER SHORT AH;Ll;0;L;;;;;N;;;10409;;10409 +10432;DESERET SMALL LETTER SHORT O;Ll;0;L;;;;;N;;;1040A;;1040A +10433;DESERET SMALL LETTER SHORT OO;Ll;0;L;;;;;N;;;1040B;;1040B +10434;DESERET SMALL LETTER AY;Ll;0;L;;;;;N;;;1040C;;1040C +10435;DESERET SMALL LETTER OW;Ll;0;L;;;;;N;;;1040D;;1040D +10436;DESERET SMALL LETTER WU;Ll;0;L;;;;;N;;;1040E;;1040E +10437;DESERET SMALL LETTER YEE;Ll;0;L;;;;;N;;;1040F;;1040F +10438;DESERET SMALL LETTER H;Ll;0;L;;;;;N;;;10410;;10410 +10439;DESERET SMALL LETTER PEE;Ll;0;L;;;;;N;;;10411;;10411 +1043A;DESERET SMALL LETTER BEE;Ll;0;L;;;;;N;;;10412;;10412 +1043B;DESERET SMALL LETTER TEE;Ll;0;L;;;;;N;;;10413;;10413 +1043C;DESERET SMALL LETTER DEE;Ll;0;L;;;;;N;;;10414;;10414 +1043D;DESERET SMALL LETTER CHEE;Ll;0;L;;;;;N;;;10415;;10415 +1043E;DESERET SMALL LETTER JEE;Ll;0;L;;;;;N;;;10416;;10416 +1043F;DESERET SMALL LETTER KAY;Ll;0;L;;;;;N;;;10417;;10417 +10440;DESERET SMALL LETTER GAY;Ll;0;L;;;;;N;;;10418;;10418 +10441;DESERET SMALL LETTER EF;Ll;0;L;;;;;N;;;10419;;10419 +10442;DESERET SMALL LETTER VEE;Ll;0;L;;;;;N;;;1041A;;1041A +10443;DESERET SMALL LETTER ETH;Ll;0;L;;;;;N;;;1041B;;1041B +10444;DESERET SMALL LETTER THEE;Ll;0;L;;;;;N;;;1041C;;1041C +10445;DESERET SMALL LETTER ES;Ll;0;L;;;;;N;;;1041D;;1041D +10446;DESERET SMALL LETTER ZEE;Ll;0;L;;;;;N;;;1041E;;1041E +10447;DESERET SMALL LETTER ESH;Ll;0;L;;;;;N;;;1041F;;1041F +10448;DESERET SMALL LETTER ZHEE;Ll;0;L;;;;;N;;;10420;;10420 +10449;DESERET SMALL LETTER ER;Ll;0;L;;;;;N;;;10421;;10421 +1044A;DESERET SMALL LETTER EL;Ll;0;L;;;;;N;;;10422;;10422 +1044B;DESERET SMALL LETTER EM;Ll;0;L;;;;;N;;;10423;;10423 +1044C;DESERET SMALL LETTER EN;Ll;0;L;;;;;N;;;10424;;10424 +1044D;DESERET SMALL LETTER ENG;Ll;0;L;;;;;N;;;10425;;10425 +1044E;DESERET SMALL LETTER OI;Ll;0;L;;;;;N;;;10426;;10426 +1044F;DESERET SMALL LETTER EW;Ll;0;L;;;;;N;;;10427;;10427 +10450;SHAVIAN LETTER PEEP;Lo;0;L;;;;;N;;;;; +10451;SHAVIAN LETTER TOT;Lo;0;L;;;;;N;;;;; +10452;SHAVIAN LETTER KICK;Lo;0;L;;;;;N;;;;; +10453;SHAVIAN LETTER FEE;Lo;0;L;;;;;N;;;;; +10454;SHAVIAN LETTER THIGH;Lo;0;L;;;;;N;;;;; +10455;SHAVIAN LETTER SO;Lo;0;L;;;;;N;;;;; +10456;SHAVIAN LETTER SURE;Lo;0;L;;;;;N;;;;; +10457;SHAVIAN LETTER CHURCH;Lo;0;L;;;;;N;;;;; +10458;SHAVIAN LETTER YEA;Lo;0;L;;;;;N;;;;; +10459;SHAVIAN LETTER HUNG;Lo;0;L;;;;;N;;;;; +1045A;SHAVIAN LETTER BIB;Lo;0;L;;;;;N;;;;; +1045B;SHAVIAN LETTER DEAD;Lo;0;L;;;;;N;;;;; +1045C;SHAVIAN LETTER GAG;Lo;0;L;;;;;N;;;;; +1045D;SHAVIAN LETTER VOW;Lo;0;L;;;;;N;;;;; +1045E;SHAVIAN LETTER THEY;Lo;0;L;;;;;N;;;;; +1045F;SHAVIAN LETTER ZOO;Lo;0;L;;;;;N;;;;; +10460;SHAVIAN LETTER MEASURE;Lo;0;L;;;;;N;;;;; +10461;SHAVIAN LETTER JUDGE;Lo;0;L;;;;;N;;;;; +10462;SHAVIAN LETTER WOE;Lo;0;L;;;;;N;;;;; +10463;SHAVIAN LETTER HA-HA;Lo;0;L;;;;;N;;;;; +10464;SHAVIAN LETTER LOLL;Lo;0;L;;;;;N;;;;; +10465;SHAVIAN LETTER MIME;Lo;0;L;;;;;N;;;;; +10466;SHAVIAN LETTER IF;Lo;0;L;;;;;N;;;;; +10467;SHAVIAN LETTER EGG;Lo;0;L;;;;;N;;;;; +10468;SHAVIAN LETTER ASH;Lo;0;L;;;;;N;;;;; +10469;SHAVIAN LETTER ADO;Lo;0;L;;;;;N;;;;; +1046A;SHAVIAN LETTER ON;Lo;0;L;;;;;N;;;;; +1046B;SHAVIAN LETTER WOOL;Lo;0;L;;;;;N;;;;; +1046C;SHAVIAN LETTER OUT;Lo;0;L;;;;;N;;;;; +1046D;SHAVIAN LETTER AH;Lo;0;L;;;;;N;;;;; +1046E;SHAVIAN LETTER ROAR;Lo;0;L;;;;;N;;;;; +1046F;SHAVIAN LETTER NUN;Lo;0;L;;;;;N;;;;; +10470;SHAVIAN LETTER EAT;Lo;0;L;;;;;N;;;;; +10471;SHAVIAN LETTER AGE;Lo;0;L;;;;;N;;;;; +10472;SHAVIAN LETTER ICE;Lo;0;L;;;;;N;;;;; +10473;SHAVIAN LETTER UP;Lo;0;L;;;;;N;;;;; +10474;SHAVIAN LETTER OAK;Lo;0;L;;;;;N;;;;; +10475;SHAVIAN LETTER OOZE;Lo;0;L;;;;;N;;;;; +10476;SHAVIAN LETTER OIL;Lo;0;L;;;;;N;;;;; +10477;SHAVIAN LETTER AWE;Lo;0;L;;;;;N;;;;; +10478;SHAVIAN LETTER ARE;Lo;0;L;;;;;N;;;;; +10479;SHAVIAN LETTER OR;Lo;0;L;;;;;N;;;;; +1047A;SHAVIAN LETTER AIR;Lo;0;L;;;;;N;;;;; +1047B;SHAVIAN LETTER ERR;Lo;0;L;;;;;N;;;;; +1047C;SHAVIAN LETTER ARRAY;Lo;0;L;;;;;N;;;;; +1047D;SHAVIAN LETTER EAR;Lo;0;L;;;;;N;;;;; +1047E;SHAVIAN LETTER IAN;Lo;0;L;;;;;N;;;;; +1047F;SHAVIAN LETTER YEW;Lo;0;L;;;;;N;;;;; +10480;OSMANYA LETTER ALEF;Lo;0;L;;;;;N;;;;; +10481;OSMANYA LETTER BA;Lo;0;L;;;;;N;;;;; +10482;OSMANYA LETTER TA;Lo;0;L;;;;;N;;;;; +10483;OSMANYA LETTER JA;Lo;0;L;;;;;N;;;;; +10484;OSMANYA LETTER XA;Lo;0;L;;;;;N;;;;; +10485;OSMANYA LETTER KHA;Lo;0;L;;;;;N;;;;; +10486;OSMANYA LETTER DEEL;Lo;0;L;;;;;N;;;;; +10487;OSMANYA LETTER RA;Lo;0;L;;;;;N;;;;; +10488;OSMANYA LETTER SA;Lo;0;L;;;;;N;;;;; +10489;OSMANYA LETTER SHIIN;Lo;0;L;;;;;N;;;;; +1048A;OSMANYA LETTER DHA;Lo;0;L;;;;;N;;;;; +1048B;OSMANYA LETTER CAYN;Lo;0;L;;;;;N;;;;; +1048C;OSMANYA LETTER GA;Lo;0;L;;;;;N;;;;; +1048D;OSMANYA LETTER FA;Lo;0;L;;;;;N;;;;; +1048E;OSMANYA LETTER QAAF;Lo;0;L;;;;;N;;;;; +1048F;OSMANYA LETTER KAAF;Lo;0;L;;;;;N;;;;; +10490;OSMANYA LETTER LAAN;Lo;0;L;;;;;N;;;;; +10491;OSMANYA LETTER MIIN;Lo;0;L;;;;;N;;;;; +10492;OSMANYA LETTER NUUN;Lo;0;L;;;;;N;;;;; +10493;OSMANYA LETTER WAW;Lo;0;L;;;;;N;;;;; +10494;OSMANYA LETTER HA;Lo;0;L;;;;;N;;;;; +10495;OSMANYA LETTER YA;Lo;0;L;;;;;N;;;;; +10496;OSMANYA LETTER A;Lo;0;L;;;;;N;;;;; +10497;OSMANYA LETTER E;Lo;0;L;;;;;N;;;;; +10498;OSMANYA LETTER I;Lo;0;L;;;;;N;;;;; +10499;OSMANYA LETTER O;Lo;0;L;;;;;N;;;;; +1049A;OSMANYA LETTER U;Lo;0;L;;;;;N;;;;; +1049B;OSMANYA LETTER AA;Lo;0;L;;;;;N;;;;; +1049C;OSMANYA LETTER EE;Lo;0;L;;;;;N;;;;; +1049D;OSMANYA LETTER OO;Lo;0;L;;;;;N;;;;; +104A0;OSMANYA DIGIT ZERO;Nd;0;L;;0;0;0;N;;;;; +104A1;OSMANYA DIGIT ONE;Nd;0;L;;1;1;1;N;;;;; +104A2;OSMANYA DIGIT TWO;Nd;0;L;;2;2;2;N;;;;; +104A3;OSMANYA DIGIT THREE;Nd;0;L;;3;3;3;N;;;;; +104A4;OSMANYA DIGIT FOUR;Nd;0;L;;4;4;4;N;;;;; +104A5;OSMANYA DIGIT FIVE;Nd;0;L;;5;5;5;N;;;;; +104A6;OSMANYA DIGIT SIX;Nd;0;L;;6;6;6;N;;;;; +104A7;OSMANYA DIGIT SEVEN;Nd;0;L;;7;7;7;N;;;;; +104A8;OSMANYA DIGIT EIGHT;Nd;0;L;;8;8;8;N;;;;; +104A9;OSMANYA DIGIT NINE;Nd;0;L;;9;9;9;N;;;;; +104B0;OSAGE CAPITAL LETTER A;Lu;0;L;;;;;N;;;;104D8; +104B1;OSAGE CAPITAL LETTER AI;Lu;0;L;;;;;N;;;;104D9; +104B2;OSAGE CAPITAL LETTER AIN;Lu;0;L;;;;;N;;;;104DA; +104B3;OSAGE CAPITAL LETTER AH;Lu;0;L;;;;;N;;;;104DB; +104B4;OSAGE CAPITAL LETTER BRA;Lu;0;L;;;;;N;;;;104DC; +104B5;OSAGE CAPITAL LETTER CHA;Lu;0;L;;;;;N;;;;104DD; +104B6;OSAGE CAPITAL LETTER EHCHA;Lu;0;L;;;;;N;;;;104DE; +104B7;OSAGE CAPITAL LETTER E;Lu;0;L;;;;;N;;;;104DF; +104B8;OSAGE CAPITAL LETTER EIN;Lu;0;L;;;;;N;;;;104E0; +104B9;OSAGE CAPITAL LETTER HA;Lu;0;L;;;;;N;;;;104E1; +104BA;OSAGE CAPITAL LETTER HYA;Lu;0;L;;;;;N;;;;104E2; +104BB;OSAGE CAPITAL LETTER I;Lu;0;L;;;;;N;;;;104E3; +104BC;OSAGE CAPITAL LETTER KA;Lu;0;L;;;;;N;;;;104E4; +104BD;OSAGE CAPITAL LETTER EHKA;Lu;0;L;;;;;N;;;;104E5; +104BE;OSAGE CAPITAL LETTER KYA;Lu;0;L;;;;;N;;;;104E6; +104BF;OSAGE CAPITAL LETTER LA;Lu;0;L;;;;;N;;;;104E7; +104C0;OSAGE CAPITAL LETTER MA;Lu;0;L;;;;;N;;;;104E8; +104C1;OSAGE CAPITAL LETTER NA;Lu;0;L;;;;;N;;;;104E9; +104C2;OSAGE CAPITAL LETTER O;Lu;0;L;;;;;N;;;;104EA; +104C3;OSAGE CAPITAL LETTER OIN;Lu;0;L;;;;;N;;;;104EB; +104C4;OSAGE CAPITAL LETTER PA;Lu;0;L;;;;;N;;;;104EC; +104C5;OSAGE CAPITAL LETTER EHPA;Lu;0;L;;;;;N;;;;104ED; +104C6;OSAGE CAPITAL LETTER SA;Lu;0;L;;;;;N;;;;104EE; +104C7;OSAGE CAPITAL LETTER SHA;Lu;0;L;;;;;N;;;;104EF; +104C8;OSAGE CAPITAL LETTER TA;Lu;0;L;;;;;N;;;;104F0; +104C9;OSAGE CAPITAL LETTER EHTA;Lu;0;L;;;;;N;;;;104F1; +104CA;OSAGE CAPITAL LETTER TSA;Lu;0;L;;;;;N;;;;104F2; +104CB;OSAGE CAPITAL LETTER EHTSA;Lu;0;L;;;;;N;;;;104F3; +104CC;OSAGE CAPITAL LETTER TSHA;Lu;0;L;;;;;N;;;;104F4; +104CD;OSAGE CAPITAL LETTER DHA;Lu;0;L;;;;;N;;;;104F5; +104CE;OSAGE CAPITAL LETTER U;Lu;0;L;;;;;N;;;;104F6; +104CF;OSAGE CAPITAL LETTER WA;Lu;0;L;;;;;N;;;;104F7; +104D0;OSAGE CAPITAL LETTER KHA;Lu;0;L;;;;;N;;;;104F8; +104D1;OSAGE CAPITAL LETTER GHA;Lu;0;L;;;;;N;;;;104F9; +104D2;OSAGE CAPITAL LETTER ZA;Lu;0;L;;;;;N;;;;104FA; +104D3;OSAGE CAPITAL LETTER ZHA;Lu;0;L;;;;;N;;;;104FB; +104D8;OSAGE SMALL LETTER A;Ll;0;L;;;;;N;;;104B0;;104B0 +104D9;OSAGE SMALL LETTER AI;Ll;0;L;;;;;N;;;104B1;;104B1 +104DA;OSAGE SMALL LETTER AIN;Ll;0;L;;;;;N;;;104B2;;104B2 +104DB;OSAGE SMALL LETTER AH;Ll;0;L;;;;;N;;;104B3;;104B3 +104DC;OSAGE SMALL LETTER BRA;Ll;0;L;;;;;N;;;104B4;;104B4 +104DD;OSAGE SMALL LETTER CHA;Ll;0;L;;;;;N;;;104B5;;104B5 +104DE;OSAGE SMALL LETTER EHCHA;Ll;0;L;;;;;N;;;104B6;;104B6 +104DF;OSAGE SMALL LETTER E;Ll;0;L;;;;;N;;;104B7;;104B7 +104E0;OSAGE SMALL LETTER EIN;Ll;0;L;;;;;N;;;104B8;;104B8 +104E1;OSAGE SMALL LETTER HA;Ll;0;L;;;;;N;;;104B9;;104B9 +104E2;OSAGE SMALL LETTER HYA;Ll;0;L;;;;;N;;;104BA;;104BA +104E3;OSAGE SMALL LETTER I;Ll;0;L;;;;;N;;;104BB;;104BB +104E4;OSAGE SMALL LETTER KA;Ll;0;L;;;;;N;;;104BC;;104BC +104E5;OSAGE SMALL LETTER EHKA;Ll;0;L;;;;;N;;;104BD;;104BD +104E6;OSAGE SMALL LETTER KYA;Ll;0;L;;;;;N;;;104BE;;104BE +104E7;OSAGE SMALL LETTER LA;Ll;0;L;;;;;N;;;104BF;;104BF +104E8;OSAGE SMALL LETTER MA;Ll;0;L;;;;;N;;;104C0;;104C0 +104E9;OSAGE SMALL LETTER NA;Ll;0;L;;;;;N;;;104C1;;104C1 +104EA;OSAGE SMALL LETTER O;Ll;0;L;;;;;N;;;104C2;;104C2 +104EB;OSAGE SMALL LETTER OIN;Ll;0;L;;;;;N;;;104C3;;104C3 +104EC;OSAGE SMALL LETTER PA;Ll;0;L;;;;;N;;;104C4;;104C4 +104ED;OSAGE SMALL LETTER EHPA;Ll;0;L;;;;;N;;;104C5;;104C5 +104EE;OSAGE SMALL LETTER SA;Ll;0;L;;;;;N;;;104C6;;104C6 +104EF;OSAGE SMALL LETTER SHA;Ll;0;L;;;;;N;;;104C7;;104C7 +104F0;OSAGE SMALL LETTER TA;Ll;0;L;;;;;N;;;104C8;;104C8 +104F1;OSAGE SMALL LETTER EHTA;Ll;0;L;;;;;N;;;104C9;;104C9 +104F2;OSAGE SMALL LETTER TSA;Ll;0;L;;;;;N;;;104CA;;104CA +104F3;OSAGE SMALL LETTER EHTSA;Ll;0;L;;;;;N;;;104CB;;104CB +104F4;OSAGE SMALL LETTER TSHA;Ll;0;L;;;;;N;;;104CC;;104CC +104F5;OSAGE SMALL LETTER DHA;Ll;0;L;;;;;N;;;104CD;;104CD +104F6;OSAGE SMALL LETTER U;Ll;0;L;;;;;N;;;104CE;;104CE +104F7;OSAGE SMALL LETTER WA;Ll;0;L;;;;;N;;;104CF;;104CF +104F8;OSAGE SMALL LETTER KHA;Ll;0;L;;;;;N;;;104D0;;104D0 +104F9;OSAGE SMALL LETTER GHA;Ll;0;L;;;;;N;;;104D1;;104D1 +104FA;OSAGE SMALL LETTER ZA;Ll;0;L;;;;;N;;;104D2;;104D2 +104FB;OSAGE SMALL LETTER ZHA;Ll;0;L;;;;;N;;;104D3;;104D3 +10500;ELBASAN LETTER A;Lo;0;L;;;;;N;;;;; +10501;ELBASAN LETTER BE;Lo;0;L;;;;;N;;;;; +10502;ELBASAN LETTER CE;Lo;0;L;;;;;N;;;;; +10503;ELBASAN LETTER CHE;Lo;0;L;;;;;N;;;;; +10504;ELBASAN LETTER DE;Lo;0;L;;;;;N;;;;; +10505;ELBASAN LETTER NDE;Lo;0;L;;;;;N;;;;; +10506;ELBASAN LETTER DHE;Lo;0;L;;;;;N;;;;; +10507;ELBASAN LETTER EI;Lo;0;L;;;;;N;;;;; +10508;ELBASAN LETTER E;Lo;0;L;;;;;N;;;;; +10509;ELBASAN LETTER FE;Lo;0;L;;;;;N;;;;; +1050A;ELBASAN LETTER GE;Lo;0;L;;;;;N;;;;; +1050B;ELBASAN LETTER GJE;Lo;0;L;;;;;N;;;;; +1050C;ELBASAN LETTER HE;Lo;0;L;;;;;N;;;;; +1050D;ELBASAN LETTER I;Lo;0;L;;;;;N;;;;; +1050E;ELBASAN LETTER JE;Lo;0;L;;;;;N;;;;; +1050F;ELBASAN LETTER KE;Lo;0;L;;;;;N;;;;; +10510;ELBASAN LETTER LE;Lo;0;L;;;;;N;;;;; +10511;ELBASAN LETTER LLE;Lo;0;L;;;;;N;;;;; +10512;ELBASAN LETTER ME;Lo;0;L;;;;;N;;;;; +10513;ELBASAN LETTER NE;Lo;0;L;;;;;N;;;;; +10514;ELBASAN LETTER NA;Lo;0;L;;;;;N;;;;; +10515;ELBASAN LETTER NJE;Lo;0;L;;;;;N;;;;; +10516;ELBASAN LETTER O;Lo;0;L;;;;;N;;;;; +10517;ELBASAN LETTER PE;Lo;0;L;;;;;N;;;;; +10518;ELBASAN LETTER QE;Lo;0;L;;;;;N;;;;; +10519;ELBASAN LETTER RE;Lo;0;L;;;;;N;;;;; +1051A;ELBASAN LETTER RRE;Lo;0;L;;;;;N;;;;; +1051B;ELBASAN LETTER SE;Lo;0;L;;;;;N;;;;; +1051C;ELBASAN LETTER SHE;Lo;0;L;;;;;N;;;;; +1051D;ELBASAN LETTER TE;Lo;0;L;;;;;N;;;;; +1051E;ELBASAN LETTER THE;Lo;0;L;;;;;N;;;;; +1051F;ELBASAN LETTER U;Lo;0;L;;;;;N;;;;; +10520;ELBASAN LETTER VE;Lo;0;L;;;;;N;;;;; +10521;ELBASAN LETTER XE;Lo;0;L;;;;;N;;;;; +10522;ELBASAN LETTER Y;Lo;0;L;;;;;N;;;;; +10523;ELBASAN LETTER ZE;Lo;0;L;;;;;N;;;;; +10524;ELBASAN LETTER ZHE;Lo;0;L;;;;;N;;;;; +10525;ELBASAN LETTER GHE;Lo;0;L;;;;;N;;;;; +10526;ELBASAN LETTER GHAMMA;Lo;0;L;;;;;N;;;;; +10527;ELBASAN LETTER KHE;Lo;0;L;;;;;N;;;;; +10530;CAUCASIAN ALBANIAN LETTER ALT;Lo;0;L;;;;;N;;;;; +10531;CAUCASIAN ALBANIAN LETTER BET;Lo;0;L;;;;;N;;;;; +10532;CAUCASIAN ALBANIAN LETTER GIM;Lo;0;L;;;;;N;;;;; +10533;CAUCASIAN ALBANIAN LETTER DAT;Lo;0;L;;;;;N;;;;; +10534;CAUCASIAN ALBANIAN LETTER EB;Lo;0;L;;;;;N;;;;; +10535;CAUCASIAN ALBANIAN LETTER ZARL;Lo;0;L;;;;;N;;;;; +10536;CAUCASIAN ALBANIAN LETTER EYN;Lo;0;L;;;;;N;;;;; +10537;CAUCASIAN ALBANIAN LETTER ZHIL;Lo;0;L;;;;;N;;;;; +10538;CAUCASIAN ALBANIAN LETTER TAS;Lo;0;L;;;;;N;;;;; +10539;CAUCASIAN ALBANIAN LETTER CHA;Lo;0;L;;;;;N;;;;; +1053A;CAUCASIAN ALBANIAN LETTER YOWD;Lo;0;L;;;;;N;;;;; +1053B;CAUCASIAN ALBANIAN LETTER ZHA;Lo;0;L;;;;;N;;;;; +1053C;CAUCASIAN ALBANIAN LETTER IRB;Lo;0;L;;;;;N;;;;; +1053D;CAUCASIAN ALBANIAN LETTER SHA;Lo;0;L;;;;;N;;;;; +1053E;CAUCASIAN ALBANIAN LETTER LAN;Lo;0;L;;;;;N;;;;; +1053F;CAUCASIAN ALBANIAN LETTER INYA;Lo;0;L;;;;;N;;;;; +10540;CAUCASIAN ALBANIAN LETTER XEYN;Lo;0;L;;;;;N;;;;; +10541;CAUCASIAN ALBANIAN LETTER DYAN;Lo;0;L;;;;;N;;;;; +10542;CAUCASIAN ALBANIAN LETTER CAR;Lo;0;L;;;;;N;;;;; +10543;CAUCASIAN ALBANIAN LETTER JHOX;Lo;0;L;;;;;N;;;;; +10544;CAUCASIAN ALBANIAN LETTER KAR;Lo;0;L;;;;;N;;;;; +10545;CAUCASIAN ALBANIAN LETTER LYIT;Lo;0;L;;;;;N;;;;; +10546;CAUCASIAN ALBANIAN LETTER HEYT;Lo;0;L;;;;;N;;;;; +10547;CAUCASIAN ALBANIAN LETTER QAY;Lo;0;L;;;;;N;;;;; +10548;CAUCASIAN ALBANIAN LETTER AOR;Lo;0;L;;;;;N;;;;; +10549;CAUCASIAN ALBANIAN LETTER CHOY;Lo;0;L;;;;;N;;;;; +1054A;CAUCASIAN ALBANIAN LETTER CHI;Lo;0;L;;;;;N;;;;; +1054B;CAUCASIAN ALBANIAN LETTER CYAY;Lo;0;L;;;;;N;;;;; +1054C;CAUCASIAN ALBANIAN LETTER MAQ;Lo;0;L;;;;;N;;;;; +1054D;CAUCASIAN ALBANIAN LETTER QAR;Lo;0;L;;;;;N;;;;; +1054E;CAUCASIAN ALBANIAN LETTER NOWC;Lo;0;L;;;;;N;;;;; +1054F;CAUCASIAN ALBANIAN LETTER DZYAY;Lo;0;L;;;;;N;;;;; +10550;CAUCASIAN ALBANIAN LETTER SHAK;Lo;0;L;;;;;N;;;;; +10551;CAUCASIAN ALBANIAN LETTER JAYN;Lo;0;L;;;;;N;;;;; +10552;CAUCASIAN ALBANIAN LETTER ON;Lo;0;L;;;;;N;;;;; +10553;CAUCASIAN ALBANIAN LETTER TYAY;Lo;0;L;;;;;N;;;;; +10554;CAUCASIAN ALBANIAN LETTER FAM;Lo;0;L;;;;;N;;;;; +10555;CAUCASIAN ALBANIAN LETTER DZAY;Lo;0;L;;;;;N;;;;; +10556;CAUCASIAN ALBANIAN LETTER CHAT;Lo;0;L;;;;;N;;;;; +10557;CAUCASIAN ALBANIAN LETTER PEN;Lo;0;L;;;;;N;;;;; +10558;CAUCASIAN ALBANIAN LETTER GHEYS;Lo;0;L;;;;;N;;;;; +10559;CAUCASIAN ALBANIAN LETTER RAT;Lo;0;L;;;;;N;;;;; +1055A;CAUCASIAN ALBANIAN LETTER SEYK;Lo;0;L;;;;;N;;;;; +1055B;CAUCASIAN ALBANIAN LETTER VEYZ;Lo;0;L;;;;;N;;;;; +1055C;CAUCASIAN ALBANIAN LETTER TIWR;Lo;0;L;;;;;N;;;;; +1055D;CAUCASIAN ALBANIAN LETTER SHOY;Lo;0;L;;;;;N;;;;; +1055E;CAUCASIAN ALBANIAN LETTER IWN;Lo;0;L;;;;;N;;;;; +1055F;CAUCASIAN ALBANIAN LETTER CYAW;Lo;0;L;;;;;N;;;;; +10560;CAUCASIAN ALBANIAN LETTER CAYN;Lo;0;L;;;;;N;;;;; +10561;CAUCASIAN ALBANIAN LETTER YAYD;Lo;0;L;;;;;N;;;;; +10562;CAUCASIAN ALBANIAN LETTER PIWR;Lo;0;L;;;;;N;;;;; +10563;CAUCASIAN ALBANIAN LETTER KIW;Lo;0;L;;;;;N;;;;; +1056F;CAUCASIAN ALBANIAN CITATION MARK;Po;0;L;;;;;N;;;;; +10600;LINEAR A SIGN AB001;Lo;0;L;;;;;N;;;;; +10601;LINEAR A SIGN AB002;Lo;0;L;;;;;N;;;;; +10602;LINEAR A SIGN AB003;Lo;0;L;;;;;N;;;;; +10603;LINEAR A SIGN AB004;Lo;0;L;;;;;N;;;;; +10604;LINEAR A SIGN AB005;Lo;0;L;;;;;N;;;;; +10605;LINEAR A SIGN AB006;Lo;0;L;;;;;N;;;;; +10606;LINEAR A SIGN AB007;Lo;0;L;;;;;N;;;;; +10607;LINEAR A SIGN AB008;Lo;0;L;;;;;N;;;;; +10608;LINEAR A SIGN AB009;Lo;0;L;;;;;N;;;;; +10609;LINEAR A SIGN AB010;Lo;0;L;;;;;N;;;;; +1060A;LINEAR A SIGN AB011;Lo;0;L;;;;;N;;;;; +1060B;LINEAR A SIGN AB013;Lo;0;L;;;;;N;;;;; +1060C;LINEAR A SIGN AB016;Lo;0;L;;;;;N;;;;; +1060D;LINEAR A SIGN AB017;Lo;0;L;;;;;N;;;;; +1060E;LINEAR A SIGN AB020;Lo;0;L;;;;;N;;;;; +1060F;LINEAR A SIGN AB021;Lo;0;L;;;;;N;;;;; +10610;LINEAR A SIGN AB021F;Lo;0;L;;;;;N;;;;; +10611;LINEAR A SIGN AB021M;Lo;0;L;;;;;N;;;;; +10612;LINEAR A SIGN AB022;Lo;0;L;;;;;N;;;;; +10613;LINEAR A SIGN AB022F;Lo;0;L;;;;;N;;;;; +10614;LINEAR A SIGN AB022M;Lo;0;L;;;;;N;;;;; +10615;LINEAR A SIGN AB023;Lo;0;L;;;;;N;;;;; +10616;LINEAR A SIGN AB023M;Lo;0;L;;;;;N;;;;; +10617;LINEAR A SIGN AB024;Lo;0;L;;;;;N;;;;; +10618;LINEAR A SIGN AB026;Lo;0;L;;;;;N;;;;; +10619;LINEAR A SIGN AB027;Lo;0;L;;;;;N;;;;; +1061A;LINEAR A SIGN AB028;Lo;0;L;;;;;N;;;;; +1061B;LINEAR A SIGN A028B;Lo;0;L;;;;;N;;;;; +1061C;LINEAR A SIGN AB029;Lo;0;L;;;;;N;;;;; +1061D;LINEAR A SIGN AB030;Lo;0;L;;;;;N;;;;; +1061E;LINEAR A SIGN AB031;Lo;0;L;;;;;N;;;;; +1061F;LINEAR A SIGN AB034;Lo;0;L;;;;;N;;;;; +10620;LINEAR A SIGN AB037;Lo;0;L;;;;;N;;;;; +10621;LINEAR A SIGN AB038;Lo;0;L;;;;;N;;;;; +10622;LINEAR A SIGN AB039;Lo;0;L;;;;;N;;;;; +10623;LINEAR A SIGN AB040;Lo;0;L;;;;;N;;;;; +10624;LINEAR A SIGN AB041;Lo;0;L;;;;;N;;;;; +10625;LINEAR A SIGN AB044;Lo;0;L;;;;;N;;;;; +10626;LINEAR A SIGN AB045;Lo;0;L;;;;;N;;;;; +10627;LINEAR A SIGN AB046;Lo;0;L;;;;;N;;;;; +10628;LINEAR A SIGN AB047;Lo;0;L;;;;;N;;;;; +10629;LINEAR A SIGN AB048;Lo;0;L;;;;;N;;;;; +1062A;LINEAR A SIGN AB049;Lo;0;L;;;;;N;;;;; +1062B;LINEAR A SIGN AB050;Lo;0;L;;;;;N;;;;; +1062C;LINEAR A SIGN AB051;Lo;0;L;;;;;N;;;;; +1062D;LINEAR A SIGN AB053;Lo;0;L;;;;;N;;;;; +1062E;LINEAR A SIGN AB054;Lo;0;L;;;;;N;;;;; +1062F;LINEAR A SIGN AB055;Lo;0;L;;;;;N;;;;; +10630;LINEAR A SIGN AB056;Lo;0;L;;;;;N;;;;; +10631;LINEAR A SIGN AB057;Lo;0;L;;;;;N;;;;; +10632;LINEAR A SIGN AB058;Lo;0;L;;;;;N;;;;; +10633;LINEAR A SIGN AB059;Lo;0;L;;;;;N;;;;; +10634;LINEAR A SIGN AB060;Lo;0;L;;;;;N;;;;; +10635;LINEAR A SIGN AB061;Lo;0;L;;;;;N;;;;; +10636;LINEAR A SIGN AB065;Lo;0;L;;;;;N;;;;; +10637;LINEAR A SIGN AB066;Lo;0;L;;;;;N;;;;; +10638;LINEAR A SIGN AB067;Lo;0;L;;;;;N;;;;; +10639;LINEAR A SIGN AB069;Lo;0;L;;;;;N;;;;; +1063A;LINEAR A SIGN AB070;Lo;0;L;;;;;N;;;;; +1063B;LINEAR A SIGN AB073;Lo;0;L;;;;;N;;;;; +1063C;LINEAR A SIGN AB074;Lo;0;L;;;;;N;;;;; +1063D;LINEAR A SIGN AB076;Lo;0;L;;;;;N;;;;; +1063E;LINEAR A SIGN AB077;Lo;0;L;;;;;N;;;;; +1063F;LINEAR A SIGN AB078;Lo;0;L;;;;;N;;;;; +10640;LINEAR A SIGN AB079;Lo;0;L;;;;;N;;;;; +10641;LINEAR A SIGN AB080;Lo;0;L;;;;;N;;;;; +10642;LINEAR A SIGN AB081;Lo;0;L;;;;;N;;;;; +10643;LINEAR A SIGN AB082;Lo;0;L;;;;;N;;;;; +10644;LINEAR A SIGN AB085;Lo;0;L;;;;;N;;;;; +10645;LINEAR A SIGN AB086;Lo;0;L;;;;;N;;;;; +10646;LINEAR A SIGN AB087;Lo;0;L;;;;;N;;;;; +10647;LINEAR A SIGN A100-102;Lo;0;L;;;;;N;;;;; +10648;LINEAR A SIGN AB118;Lo;0;L;;;;;N;;;;; +10649;LINEAR A SIGN AB120;Lo;0;L;;;;;N;;;;; +1064A;LINEAR A SIGN A120B;Lo;0;L;;;;;N;;;;; +1064B;LINEAR A SIGN AB122;Lo;0;L;;;;;N;;;;; +1064C;LINEAR A SIGN AB123;Lo;0;L;;;;;N;;;;; +1064D;LINEAR A SIGN AB131A;Lo;0;L;;;;;N;;;;; +1064E;LINEAR A SIGN AB131B;Lo;0;L;;;;;N;;;;; +1064F;LINEAR A SIGN A131C;Lo;0;L;;;;;N;;;;; +10650;LINEAR A SIGN AB164;Lo;0;L;;;;;N;;;;; +10651;LINEAR A SIGN AB171;Lo;0;L;;;;;N;;;;; +10652;LINEAR A SIGN AB180;Lo;0;L;;;;;N;;;;; +10653;LINEAR A SIGN AB188;Lo;0;L;;;;;N;;;;; +10654;LINEAR A SIGN AB191;Lo;0;L;;;;;N;;;;; +10655;LINEAR A SIGN A301;Lo;0;L;;;;;N;;;;; +10656;LINEAR A SIGN A302;Lo;0;L;;;;;N;;;;; +10657;LINEAR A SIGN A303;Lo;0;L;;;;;N;;;;; +10658;LINEAR A SIGN A304;Lo;0;L;;;;;N;;;;; +10659;LINEAR A SIGN A305;Lo;0;L;;;;;N;;;;; +1065A;LINEAR A SIGN A306;Lo;0;L;;;;;N;;;;; +1065B;LINEAR A SIGN A307;Lo;0;L;;;;;N;;;;; +1065C;LINEAR A SIGN A308;Lo;0;L;;;;;N;;;;; +1065D;LINEAR A SIGN A309A;Lo;0;L;;;;;N;;;;; +1065E;LINEAR A SIGN A309B;Lo;0;L;;;;;N;;;;; +1065F;LINEAR A SIGN A309C;Lo;0;L;;;;;N;;;;; +10660;LINEAR A SIGN A310;Lo;0;L;;;;;N;;;;; +10661;LINEAR A SIGN A311;Lo;0;L;;;;;N;;;;; +10662;LINEAR A SIGN A312;Lo;0;L;;;;;N;;;;; +10663;LINEAR A SIGN A313A;Lo;0;L;;;;;N;;;;; +10664;LINEAR A SIGN A313B;Lo;0;L;;;;;N;;;;; +10665;LINEAR A SIGN A313C;Lo;0;L;;;;;N;;;;; +10666;LINEAR A SIGN A314;Lo;0;L;;;;;N;;;;; +10667;LINEAR A SIGN A315;Lo;0;L;;;;;N;;;;; +10668;LINEAR A SIGN A316;Lo;0;L;;;;;N;;;;; +10669;LINEAR A SIGN A317;Lo;0;L;;;;;N;;;;; +1066A;LINEAR A SIGN A318;Lo;0;L;;;;;N;;;;; +1066B;LINEAR A SIGN A319;Lo;0;L;;;;;N;;;;; +1066C;LINEAR A SIGN A320;Lo;0;L;;;;;N;;;;; +1066D;LINEAR A SIGN A321;Lo;0;L;;;;;N;;;;; +1066E;LINEAR A SIGN A322;Lo;0;L;;;;;N;;;;; +1066F;LINEAR A SIGN A323;Lo;0;L;;;;;N;;;;; +10670;LINEAR A SIGN A324;Lo;0;L;;;;;N;;;;; +10671;LINEAR A SIGN A325;Lo;0;L;;;;;N;;;;; +10672;LINEAR A SIGN A326;Lo;0;L;;;;;N;;;;; +10673;LINEAR A SIGN A327;Lo;0;L;;;;;N;;;;; +10674;LINEAR A SIGN A328;Lo;0;L;;;;;N;;;;; +10675;LINEAR A SIGN A329;Lo;0;L;;;;;N;;;;; +10676;LINEAR A SIGN A330;Lo;0;L;;;;;N;;;;; +10677;LINEAR A SIGN A331;Lo;0;L;;;;;N;;;;; +10678;LINEAR A SIGN A332;Lo;0;L;;;;;N;;;;; +10679;LINEAR A SIGN A333;Lo;0;L;;;;;N;;;;; +1067A;LINEAR A SIGN A334;Lo;0;L;;;;;N;;;;; +1067B;LINEAR A SIGN A335;Lo;0;L;;;;;N;;;;; +1067C;LINEAR A SIGN A336;Lo;0;L;;;;;N;;;;; +1067D;LINEAR A SIGN A337;Lo;0;L;;;;;N;;;;; +1067E;LINEAR A SIGN A338;Lo;0;L;;;;;N;;;;; +1067F;LINEAR A SIGN A339;Lo;0;L;;;;;N;;;;; +10680;LINEAR A SIGN A340;Lo;0;L;;;;;N;;;;; +10681;LINEAR A SIGN A341;Lo;0;L;;;;;N;;;;; +10682;LINEAR A SIGN A342;Lo;0;L;;;;;N;;;;; +10683;LINEAR A SIGN A343;Lo;0;L;;;;;N;;;;; +10684;LINEAR A SIGN A344;Lo;0;L;;;;;N;;;;; +10685;LINEAR A SIGN A345;Lo;0;L;;;;;N;;;;; +10686;LINEAR A SIGN A346;Lo;0;L;;;;;N;;;;; +10687;LINEAR A SIGN A347;Lo;0;L;;;;;N;;;;; +10688;LINEAR A SIGN A348;Lo;0;L;;;;;N;;;;; +10689;LINEAR A SIGN A349;Lo;0;L;;;;;N;;;;; +1068A;LINEAR A SIGN A350;Lo;0;L;;;;;N;;;;; +1068B;LINEAR A SIGN A351;Lo;0;L;;;;;N;;;;; +1068C;LINEAR A SIGN A352;Lo;0;L;;;;;N;;;;; +1068D;LINEAR A SIGN A353;Lo;0;L;;;;;N;;;;; +1068E;LINEAR A SIGN A354;Lo;0;L;;;;;N;;;;; +1068F;LINEAR A SIGN A355;Lo;0;L;;;;;N;;;;; +10690;LINEAR A SIGN A356;Lo;0;L;;;;;N;;;;; +10691;LINEAR A SIGN A357;Lo;0;L;;;;;N;;;;; +10692;LINEAR A SIGN A358;Lo;0;L;;;;;N;;;;; +10693;LINEAR A SIGN A359;Lo;0;L;;;;;N;;;;; +10694;LINEAR A SIGN A360;Lo;0;L;;;;;N;;;;; +10695;LINEAR A SIGN A361;Lo;0;L;;;;;N;;;;; +10696;LINEAR A SIGN A362;Lo;0;L;;;;;N;;;;; +10697;LINEAR A SIGN A363;Lo;0;L;;;;;N;;;;; +10698;LINEAR A SIGN A364;Lo;0;L;;;;;N;;;;; +10699;LINEAR A SIGN A365;Lo;0;L;;;;;N;;;;; +1069A;LINEAR A SIGN A366;Lo;0;L;;;;;N;;;;; +1069B;LINEAR A SIGN A367;Lo;0;L;;;;;N;;;;; +1069C;LINEAR A SIGN A368;Lo;0;L;;;;;N;;;;; +1069D;LINEAR A SIGN A369;Lo;0;L;;;;;N;;;;; +1069E;LINEAR A SIGN A370;Lo;0;L;;;;;N;;;;; +1069F;LINEAR A SIGN A371;Lo;0;L;;;;;N;;;;; +106A0;LINEAR A SIGN A400-VAS;Lo;0;L;;;;;N;;;;; +106A1;LINEAR A SIGN A401-VAS;Lo;0;L;;;;;N;;;;; +106A2;LINEAR A SIGN A402-VAS;Lo;0;L;;;;;N;;;;; +106A3;LINEAR A SIGN A403-VAS;Lo;0;L;;;;;N;;;;; +106A4;LINEAR A SIGN A404-VAS;Lo;0;L;;;;;N;;;;; +106A5;LINEAR A SIGN A405-VAS;Lo;0;L;;;;;N;;;;; +106A6;LINEAR A SIGN A406-VAS;Lo;0;L;;;;;N;;;;; +106A7;LINEAR A SIGN A407-VAS;Lo;0;L;;;;;N;;;;; +106A8;LINEAR A SIGN A408-VAS;Lo;0;L;;;;;N;;;;; +106A9;LINEAR A SIGN A409-VAS;Lo;0;L;;;;;N;;;;; +106AA;LINEAR A SIGN A410-VAS;Lo;0;L;;;;;N;;;;; +106AB;LINEAR A SIGN A411-VAS;Lo;0;L;;;;;N;;;;; +106AC;LINEAR A SIGN A412-VAS;Lo;0;L;;;;;N;;;;; +106AD;LINEAR A SIGN A413-VAS;Lo;0;L;;;;;N;;;;; +106AE;LINEAR A SIGN A414-VAS;Lo;0;L;;;;;N;;;;; +106AF;LINEAR A SIGN A415-VAS;Lo;0;L;;;;;N;;;;; +106B0;LINEAR A SIGN A416-VAS;Lo;0;L;;;;;N;;;;; +106B1;LINEAR A SIGN A417-VAS;Lo;0;L;;;;;N;;;;; +106B2;LINEAR A SIGN A418-VAS;Lo;0;L;;;;;N;;;;; +106B3;LINEAR A SIGN A501;Lo;0;L;;;;;N;;;;; +106B4;LINEAR A SIGN A502;Lo;0;L;;;;;N;;;;; +106B5;LINEAR A SIGN A503;Lo;0;L;;;;;N;;;;; +106B6;LINEAR A SIGN A504;Lo;0;L;;;;;N;;;;; +106B7;LINEAR A SIGN A505;Lo;0;L;;;;;N;;;;; +106B8;LINEAR A SIGN A506;Lo;0;L;;;;;N;;;;; +106B9;LINEAR A SIGN A508;Lo;0;L;;;;;N;;;;; +106BA;LINEAR A SIGN A509;Lo;0;L;;;;;N;;;;; +106BB;LINEAR A SIGN A510;Lo;0;L;;;;;N;;;;; +106BC;LINEAR A SIGN A511;Lo;0;L;;;;;N;;;;; +106BD;LINEAR A SIGN A512;Lo;0;L;;;;;N;;;;; +106BE;LINEAR A SIGN A513;Lo;0;L;;;;;N;;;;; +106BF;LINEAR A SIGN A515;Lo;0;L;;;;;N;;;;; +106C0;LINEAR A SIGN A516;Lo;0;L;;;;;N;;;;; +106C1;LINEAR A SIGN A520;Lo;0;L;;;;;N;;;;; +106C2;LINEAR A SIGN A521;Lo;0;L;;;;;N;;;;; +106C3;LINEAR A SIGN A523;Lo;0;L;;;;;N;;;;; +106C4;LINEAR A SIGN A524;Lo;0;L;;;;;N;;;;; +106C5;LINEAR A SIGN A525;Lo;0;L;;;;;N;;;;; +106C6;LINEAR A SIGN A526;Lo;0;L;;;;;N;;;;; +106C7;LINEAR A SIGN A527;Lo;0;L;;;;;N;;;;; +106C8;LINEAR A SIGN A528;Lo;0;L;;;;;N;;;;; +106C9;LINEAR A SIGN A529;Lo;0;L;;;;;N;;;;; +106CA;LINEAR A SIGN A530;Lo;0;L;;;;;N;;;;; +106CB;LINEAR A SIGN A531;Lo;0;L;;;;;N;;;;; +106CC;LINEAR A SIGN A532;Lo;0;L;;;;;N;;;;; +106CD;LINEAR A SIGN A534;Lo;0;L;;;;;N;;;;; +106CE;LINEAR A SIGN A535;Lo;0;L;;;;;N;;;;; +106CF;LINEAR A SIGN A536;Lo;0;L;;;;;N;;;;; +106D0;LINEAR A SIGN A537;Lo;0;L;;;;;N;;;;; +106D1;LINEAR A SIGN A538;Lo;0;L;;;;;N;;;;; +106D2;LINEAR A SIGN A539;Lo;0;L;;;;;N;;;;; +106D3;LINEAR A SIGN A540;Lo;0;L;;;;;N;;;;; +106D4;LINEAR A SIGN A541;Lo;0;L;;;;;N;;;;; +106D5;LINEAR A SIGN A542;Lo;0;L;;;;;N;;;;; +106D6;LINEAR A SIGN A545;Lo;0;L;;;;;N;;;;; +106D7;LINEAR A SIGN A547;Lo;0;L;;;;;N;;;;; +106D8;LINEAR A SIGN A548;Lo;0;L;;;;;N;;;;; +106D9;LINEAR A SIGN A549;Lo;0;L;;;;;N;;;;; +106DA;LINEAR A SIGN A550;Lo;0;L;;;;;N;;;;; +106DB;LINEAR A SIGN A551;Lo;0;L;;;;;N;;;;; +106DC;LINEAR A SIGN A552;Lo;0;L;;;;;N;;;;; +106DD;LINEAR A SIGN A553;Lo;0;L;;;;;N;;;;; +106DE;LINEAR A SIGN A554;Lo;0;L;;;;;N;;;;; +106DF;LINEAR A SIGN A555;Lo;0;L;;;;;N;;;;; +106E0;LINEAR A SIGN A556;Lo;0;L;;;;;N;;;;; +106E1;LINEAR A SIGN A557;Lo;0;L;;;;;N;;;;; +106E2;LINEAR A SIGN A559;Lo;0;L;;;;;N;;;;; +106E3;LINEAR A SIGN A563;Lo;0;L;;;;;N;;;;; +106E4;LINEAR A SIGN A564;Lo;0;L;;;;;N;;;;; +106E5;LINEAR A SIGN A565;Lo;0;L;;;;;N;;;;; +106E6;LINEAR A SIGN A566;Lo;0;L;;;;;N;;;;; +106E7;LINEAR A SIGN A568;Lo;0;L;;;;;N;;;;; +106E8;LINEAR A SIGN A569;Lo;0;L;;;;;N;;;;; +106E9;LINEAR A SIGN A570;Lo;0;L;;;;;N;;;;; +106EA;LINEAR A SIGN A571;Lo;0;L;;;;;N;;;;; +106EB;LINEAR A SIGN A572;Lo;0;L;;;;;N;;;;; +106EC;LINEAR A SIGN A573;Lo;0;L;;;;;N;;;;; +106ED;LINEAR A SIGN A574;Lo;0;L;;;;;N;;;;; +106EE;LINEAR A SIGN A575;Lo;0;L;;;;;N;;;;; +106EF;LINEAR A SIGN A576;Lo;0;L;;;;;N;;;;; +106F0;LINEAR A SIGN A577;Lo;0;L;;;;;N;;;;; +106F1;LINEAR A SIGN A578;Lo;0;L;;;;;N;;;;; +106F2;LINEAR A SIGN A579;Lo;0;L;;;;;N;;;;; +106F3;LINEAR A SIGN A580;Lo;0;L;;;;;N;;;;; +106F4;LINEAR A SIGN A581;Lo;0;L;;;;;N;;;;; +106F5;LINEAR A SIGN A582;Lo;0;L;;;;;N;;;;; +106F6;LINEAR A SIGN A583;Lo;0;L;;;;;N;;;;; +106F7;LINEAR A SIGN A584;Lo;0;L;;;;;N;;;;; +106F8;LINEAR A SIGN A585;Lo;0;L;;;;;N;;;;; +106F9;LINEAR A SIGN A586;Lo;0;L;;;;;N;;;;; +106FA;LINEAR A SIGN A587;Lo;0;L;;;;;N;;;;; +106FB;LINEAR A SIGN A588;Lo;0;L;;;;;N;;;;; +106FC;LINEAR A SIGN A589;Lo;0;L;;;;;N;;;;; +106FD;LINEAR A SIGN A591;Lo;0;L;;;;;N;;;;; +106FE;LINEAR A SIGN A592;Lo;0;L;;;;;N;;;;; +106FF;LINEAR A SIGN A594;Lo;0;L;;;;;N;;;;; +10700;LINEAR A SIGN A595;Lo;0;L;;;;;N;;;;; +10701;LINEAR A SIGN A596;Lo;0;L;;;;;N;;;;; +10702;LINEAR A SIGN A598;Lo;0;L;;;;;N;;;;; +10703;LINEAR A SIGN A600;Lo;0;L;;;;;N;;;;; +10704;LINEAR A SIGN A601;Lo;0;L;;;;;N;;;;; +10705;LINEAR A SIGN A602;Lo;0;L;;;;;N;;;;; +10706;LINEAR A SIGN A603;Lo;0;L;;;;;N;;;;; +10707;LINEAR A SIGN A604;Lo;0;L;;;;;N;;;;; +10708;LINEAR A SIGN A606;Lo;0;L;;;;;N;;;;; +10709;LINEAR A SIGN A608;Lo;0;L;;;;;N;;;;; +1070A;LINEAR A SIGN A609;Lo;0;L;;;;;N;;;;; +1070B;LINEAR A SIGN A610;Lo;0;L;;;;;N;;;;; +1070C;LINEAR A SIGN A611;Lo;0;L;;;;;N;;;;; +1070D;LINEAR A SIGN A612;Lo;0;L;;;;;N;;;;; +1070E;LINEAR A SIGN A613;Lo;0;L;;;;;N;;;;; +1070F;LINEAR A SIGN A614;Lo;0;L;;;;;N;;;;; +10710;LINEAR A SIGN A615;Lo;0;L;;;;;N;;;;; +10711;LINEAR A SIGN A616;Lo;0;L;;;;;N;;;;; +10712;LINEAR A SIGN A617;Lo;0;L;;;;;N;;;;; +10713;LINEAR A SIGN A618;Lo;0;L;;;;;N;;;;; +10714;LINEAR A SIGN A619;Lo;0;L;;;;;N;;;;; +10715;LINEAR A SIGN A620;Lo;0;L;;;;;N;;;;; +10716;LINEAR A SIGN A621;Lo;0;L;;;;;N;;;;; +10717;LINEAR A SIGN A622;Lo;0;L;;;;;N;;;;; +10718;LINEAR A SIGN A623;Lo;0;L;;;;;N;;;;; +10719;LINEAR A SIGN A624;Lo;0;L;;;;;N;;;;; +1071A;LINEAR A SIGN A626;Lo;0;L;;;;;N;;;;; +1071B;LINEAR A SIGN A627;Lo;0;L;;;;;N;;;;; +1071C;LINEAR A SIGN A628;Lo;0;L;;;;;N;;;;; +1071D;LINEAR A SIGN A629;Lo;0;L;;;;;N;;;;; +1071E;LINEAR A SIGN A634;Lo;0;L;;;;;N;;;;; +1071F;LINEAR A SIGN A637;Lo;0;L;;;;;N;;;;; +10720;LINEAR A SIGN A638;Lo;0;L;;;;;N;;;;; +10721;LINEAR A SIGN A640;Lo;0;L;;;;;N;;;;; +10722;LINEAR A SIGN A642;Lo;0;L;;;;;N;;;;; +10723;LINEAR A SIGN A643;Lo;0;L;;;;;N;;;;; +10724;LINEAR A SIGN A644;Lo;0;L;;;;;N;;;;; +10725;LINEAR A SIGN A645;Lo;0;L;;;;;N;;;;; +10726;LINEAR A SIGN A646;Lo;0;L;;;;;N;;;;; +10727;LINEAR A SIGN A648;Lo;0;L;;;;;N;;;;; +10728;LINEAR A SIGN A649;Lo;0;L;;;;;N;;;;; +10729;LINEAR A SIGN A651;Lo;0;L;;;;;N;;;;; +1072A;LINEAR A SIGN A652;Lo;0;L;;;;;N;;;;; +1072B;LINEAR A SIGN A653;Lo;0;L;;;;;N;;;;; +1072C;LINEAR A SIGN A654;Lo;0;L;;;;;N;;;;; +1072D;LINEAR A SIGN A655;Lo;0;L;;;;;N;;;;; +1072E;LINEAR A SIGN A656;Lo;0;L;;;;;N;;;;; +1072F;LINEAR A SIGN A657;Lo;0;L;;;;;N;;;;; +10730;LINEAR A SIGN A658;Lo;0;L;;;;;N;;;;; +10731;LINEAR A SIGN A659;Lo;0;L;;;;;N;;;;; +10732;LINEAR A SIGN A660;Lo;0;L;;;;;N;;;;; +10733;LINEAR A SIGN A661;Lo;0;L;;;;;N;;;;; +10734;LINEAR A SIGN A662;Lo;0;L;;;;;N;;;;; +10735;LINEAR A SIGN A663;Lo;0;L;;;;;N;;;;; +10736;LINEAR A SIGN A664;Lo;0;L;;;;;N;;;;; +10740;LINEAR A SIGN A701 A;Lo;0;L;;;;;N;;;;; +10741;LINEAR A SIGN A702 B;Lo;0;L;;;;;N;;;;; +10742;LINEAR A SIGN A703 D;Lo;0;L;;;;;N;;;;; +10743;LINEAR A SIGN A704 E;Lo;0;L;;;;;N;;;;; +10744;LINEAR A SIGN A705 F;Lo;0;L;;;;;N;;;;; +10745;LINEAR A SIGN A706 H;Lo;0;L;;;;;N;;;;; +10746;LINEAR A SIGN A707 J;Lo;0;L;;;;;N;;;;; +10747;LINEAR A SIGN A708 K;Lo;0;L;;;;;N;;;;; +10748;LINEAR A SIGN A709 L;Lo;0;L;;;;;N;;;;; +10749;LINEAR A SIGN A709-2 L2;Lo;0;L;;;;;N;;;;; +1074A;LINEAR A SIGN A709-3 L3;Lo;0;L;;;;;N;;;;; +1074B;LINEAR A SIGN A709-4 L4;Lo;0;L;;;;;N;;;;; +1074C;LINEAR A SIGN A709-6 L6;Lo;0;L;;;;;N;;;;; +1074D;LINEAR A SIGN A710 W;Lo;0;L;;;;;N;;;;; +1074E;LINEAR A SIGN A711 X;Lo;0;L;;;;;N;;;;; +1074F;LINEAR A SIGN A712 Y;Lo;0;L;;;;;N;;;;; +10750;LINEAR A SIGN A713 OMEGA;Lo;0;L;;;;;N;;;;; +10751;LINEAR A SIGN A714 ABB;Lo;0;L;;;;;N;;;;; +10752;LINEAR A SIGN A715 BB;Lo;0;L;;;;;N;;;;; +10753;LINEAR A SIGN A717 DD;Lo;0;L;;;;;N;;;;; +10754;LINEAR A SIGN A726 EYYY;Lo;0;L;;;;;N;;;;; +10755;LINEAR A SIGN A732 JE;Lo;0;L;;;;;N;;;;; +10760;LINEAR A SIGN A800;Lo;0;L;;;;;N;;;;; +10761;LINEAR A SIGN A801;Lo;0;L;;;;;N;;;;; +10762;LINEAR A SIGN A802;Lo;0;L;;;;;N;;;;; +10763;LINEAR A SIGN A803;Lo;0;L;;;;;N;;;;; +10764;LINEAR A SIGN A804;Lo;0;L;;;;;N;;;;; +10765;LINEAR A SIGN A805;Lo;0;L;;;;;N;;;;; +10766;LINEAR A SIGN A806;Lo;0;L;;;;;N;;;;; +10767;LINEAR A SIGN A807;Lo;0;L;;;;;N;;;;; +10800;CYPRIOT SYLLABLE A;Lo;0;R;;;;;N;;;;; +10801;CYPRIOT SYLLABLE E;Lo;0;R;;;;;N;;;;; +10802;CYPRIOT SYLLABLE I;Lo;0;R;;;;;N;;;;; +10803;CYPRIOT SYLLABLE O;Lo;0;R;;;;;N;;;;; +10804;CYPRIOT SYLLABLE U;Lo;0;R;;;;;N;;;;; +10805;CYPRIOT SYLLABLE JA;Lo;0;R;;;;;N;;;;; +10808;CYPRIOT SYLLABLE JO;Lo;0;R;;;;;N;;;;; +1080A;CYPRIOT SYLLABLE KA;Lo;0;R;;;;;N;;;;; +1080B;CYPRIOT SYLLABLE KE;Lo;0;R;;;;;N;;;;; +1080C;CYPRIOT SYLLABLE KI;Lo;0;R;;;;;N;;;;; +1080D;CYPRIOT SYLLABLE KO;Lo;0;R;;;;;N;;;;; +1080E;CYPRIOT SYLLABLE KU;Lo;0;R;;;;;N;;;;; +1080F;CYPRIOT SYLLABLE LA;Lo;0;R;;;;;N;;;;; +10810;CYPRIOT SYLLABLE LE;Lo;0;R;;;;;N;;;;; +10811;CYPRIOT SYLLABLE LI;Lo;0;R;;;;;N;;;;; +10812;CYPRIOT SYLLABLE LO;Lo;0;R;;;;;N;;;;; +10813;CYPRIOT SYLLABLE LU;Lo;0;R;;;;;N;;;;; +10814;CYPRIOT SYLLABLE MA;Lo;0;R;;;;;N;;;;; +10815;CYPRIOT SYLLABLE ME;Lo;0;R;;;;;N;;;;; +10816;CYPRIOT SYLLABLE MI;Lo;0;R;;;;;N;;;;; +10817;CYPRIOT SYLLABLE MO;Lo;0;R;;;;;N;;;;; +10818;CYPRIOT SYLLABLE MU;Lo;0;R;;;;;N;;;;; +10819;CYPRIOT SYLLABLE NA;Lo;0;R;;;;;N;;;;; +1081A;CYPRIOT SYLLABLE NE;Lo;0;R;;;;;N;;;;; +1081B;CYPRIOT SYLLABLE NI;Lo;0;R;;;;;N;;;;; +1081C;CYPRIOT SYLLABLE NO;Lo;0;R;;;;;N;;;;; +1081D;CYPRIOT SYLLABLE NU;Lo;0;R;;;;;N;;;;; +1081E;CYPRIOT SYLLABLE PA;Lo;0;R;;;;;N;;;;; +1081F;CYPRIOT SYLLABLE PE;Lo;0;R;;;;;N;;;;; +10820;CYPRIOT SYLLABLE PI;Lo;0;R;;;;;N;;;;; +10821;CYPRIOT SYLLABLE PO;Lo;0;R;;;;;N;;;;; +10822;CYPRIOT SYLLABLE PU;Lo;0;R;;;;;N;;;;; +10823;CYPRIOT SYLLABLE RA;Lo;0;R;;;;;N;;;;; +10824;CYPRIOT SYLLABLE RE;Lo;0;R;;;;;N;;;;; +10825;CYPRIOT SYLLABLE RI;Lo;0;R;;;;;N;;;;; +10826;CYPRIOT SYLLABLE RO;Lo;0;R;;;;;N;;;;; +10827;CYPRIOT SYLLABLE RU;Lo;0;R;;;;;N;;;;; +10828;CYPRIOT SYLLABLE SA;Lo;0;R;;;;;N;;;;; +10829;CYPRIOT SYLLABLE SE;Lo;0;R;;;;;N;;;;; +1082A;CYPRIOT SYLLABLE SI;Lo;0;R;;;;;N;;;;; +1082B;CYPRIOT SYLLABLE SO;Lo;0;R;;;;;N;;;;; +1082C;CYPRIOT SYLLABLE SU;Lo;0;R;;;;;N;;;;; +1082D;CYPRIOT SYLLABLE TA;Lo;0;R;;;;;N;;;;; +1082E;CYPRIOT SYLLABLE TE;Lo;0;R;;;;;N;;;;; +1082F;CYPRIOT SYLLABLE TI;Lo;0;R;;;;;N;;;;; +10830;CYPRIOT SYLLABLE TO;Lo;0;R;;;;;N;;;;; +10831;CYPRIOT SYLLABLE TU;Lo;0;R;;;;;N;;;;; +10832;CYPRIOT SYLLABLE WA;Lo;0;R;;;;;N;;;;; +10833;CYPRIOT SYLLABLE WE;Lo;0;R;;;;;N;;;;; +10834;CYPRIOT SYLLABLE WI;Lo;0;R;;;;;N;;;;; +10835;CYPRIOT SYLLABLE WO;Lo;0;R;;;;;N;;;;; +10837;CYPRIOT SYLLABLE XA;Lo;0;R;;;;;N;;;;; +10838;CYPRIOT SYLLABLE XE;Lo;0;R;;;;;N;;;;; +1083C;CYPRIOT SYLLABLE ZA;Lo;0;R;;;;;N;;;;; +1083F;CYPRIOT SYLLABLE ZO;Lo;0;R;;;;;N;;;;; +10840;IMPERIAL ARAMAIC LETTER ALEPH;Lo;0;R;;;;;N;;;;; +10841;IMPERIAL ARAMAIC LETTER BETH;Lo;0;R;;;;;N;;;;; +10842;IMPERIAL ARAMAIC LETTER GIMEL;Lo;0;R;;;;;N;;;;; +10843;IMPERIAL ARAMAIC LETTER DALETH;Lo;0;R;;;;;N;;;;; +10844;IMPERIAL ARAMAIC LETTER HE;Lo;0;R;;;;;N;;;;; +10845;IMPERIAL ARAMAIC LETTER WAW;Lo;0;R;;;;;N;;;;; +10846;IMPERIAL ARAMAIC LETTER ZAYIN;Lo;0;R;;;;;N;;;;; +10847;IMPERIAL ARAMAIC LETTER HETH;Lo;0;R;;;;;N;;;;; +10848;IMPERIAL ARAMAIC LETTER TETH;Lo;0;R;;;;;N;;;;; +10849;IMPERIAL ARAMAIC LETTER YODH;Lo;0;R;;;;;N;;;;; +1084A;IMPERIAL ARAMAIC LETTER KAPH;Lo;0;R;;;;;N;;;;; +1084B;IMPERIAL ARAMAIC LETTER LAMEDH;Lo;0;R;;;;;N;;;;; +1084C;IMPERIAL ARAMAIC LETTER MEM;Lo;0;R;;;;;N;;;;; +1084D;IMPERIAL ARAMAIC LETTER NUN;Lo;0;R;;;;;N;;;;; +1084E;IMPERIAL ARAMAIC LETTER SAMEKH;Lo;0;R;;;;;N;;;;; +1084F;IMPERIAL ARAMAIC LETTER AYIN;Lo;0;R;;;;;N;;;;; +10850;IMPERIAL ARAMAIC LETTER PE;Lo;0;R;;;;;N;;;;; +10851;IMPERIAL ARAMAIC LETTER SADHE;Lo;0;R;;;;;N;;;;; +10852;IMPERIAL ARAMAIC LETTER QOPH;Lo;0;R;;;;;N;;;;; +10853;IMPERIAL ARAMAIC LETTER RESH;Lo;0;R;;;;;N;;;;; +10854;IMPERIAL ARAMAIC LETTER SHIN;Lo;0;R;;;;;N;;;;; +10855;IMPERIAL ARAMAIC LETTER TAW;Lo;0;R;;;;;N;;;;; +10857;IMPERIAL ARAMAIC SECTION SIGN;Po;0;R;;;;;N;;;;; +10858;IMPERIAL ARAMAIC NUMBER ONE;No;0;R;;;;1;N;;;;; +10859;IMPERIAL ARAMAIC NUMBER TWO;No;0;R;;;;2;N;;;;; +1085A;IMPERIAL ARAMAIC NUMBER THREE;No;0;R;;;;3;N;;;;; +1085B;IMPERIAL ARAMAIC NUMBER TEN;No;0;R;;;;10;N;;;;; +1085C;IMPERIAL ARAMAIC NUMBER TWENTY;No;0;R;;;;20;N;;;;; +1085D;IMPERIAL ARAMAIC NUMBER ONE HUNDRED;No;0;R;;;;100;N;;;;; +1085E;IMPERIAL ARAMAIC NUMBER ONE THOUSAND;No;0;R;;;;1000;N;;;;; +1085F;IMPERIAL ARAMAIC NUMBER TEN THOUSAND;No;0;R;;;;10000;N;;;;; +10860;PALMYRENE LETTER ALEPH;Lo;0;R;;;;;N;;;;; +10861;PALMYRENE LETTER BETH;Lo;0;R;;;;;N;;;;; +10862;PALMYRENE LETTER GIMEL;Lo;0;R;;;;;N;;;;; +10863;PALMYRENE LETTER DALETH;Lo;0;R;;;;;N;;;;; +10864;PALMYRENE LETTER HE;Lo;0;R;;;;;N;;;;; +10865;PALMYRENE LETTER WAW;Lo;0;R;;;;;N;;;;; +10866;PALMYRENE LETTER ZAYIN;Lo;0;R;;;;;N;;;;; +10867;PALMYRENE LETTER HETH;Lo;0;R;;;;;N;;;;; +10868;PALMYRENE LETTER TETH;Lo;0;R;;;;;N;;;;; +10869;PALMYRENE LETTER YODH;Lo;0;R;;;;;N;;;;; +1086A;PALMYRENE LETTER KAPH;Lo;0;R;;;;;N;;;;; +1086B;PALMYRENE LETTER LAMEDH;Lo;0;R;;;;;N;;;;; +1086C;PALMYRENE LETTER MEM;Lo;0;R;;;;;N;;;;; +1086D;PALMYRENE LETTER FINAL NUN;Lo;0;R;;;;;N;;;;; +1086E;PALMYRENE LETTER NUN;Lo;0;R;;;;;N;;;;; +1086F;PALMYRENE LETTER SAMEKH;Lo;0;R;;;;;N;;;;; +10870;PALMYRENE LETTER AYIN;Lo;0;R;;;;;N;;;;; +10871;PALMYRENE LETTER PE;Lo;0;R;;;;;N;;;;; +10872;PALMYRENE LETTER SADHE;Lo;0;R;;;;;N;;;;; +10873;PALMYRENE LETTER QOPH;Lo;0;R;;;;;N;;;;; +10874;PALMYRENE LETTER RESH;Lo;0;R;;;;;N;;;;; +10875;PALMYRENE LETTER SHIN;Lo;0;R;;;;;N;;;;; +10876;PALMYRENE LETTER TAW;Lo;0;R;;;;;N;;;;; +10877;PALMYRENE LEFT-POINTING FLEURON;So;0;R;;;;;N;;;;; +10878;PALMYRENE RIGHT-POINTING FLEURON;So;0;R;;;;;N;;;;; +10879;PALMYRENE NUMBER ONE;No;0;R;;;;1;N;;;;; +1087A;PALMYRENE NUMBER TWO;No;0;R;;;;2;N;;;;; +1087B;PALMYRENE NUMBER THREE;No;0;R;;;;3;N;;;;; +1087C;PALMYRENE NUMBER FOUR;No;0;R;;;;4;N;;;;; +1087D;PALMYRENE NUMBER FIVE;No;0;R;;;;5;N;;;;; +1087E;PALMYRENE NUMBER TEN;No;0;R;;;;10;N;;;;; +1087F;PALMYRENE NUMBER TWENTY;No;0;R;;;;20;N;;;;; +10880;NABATAEAN LETTER FINAL ALEPH;Lo;0;R;;;;;N;;;;; +10881;NABATAEAN LETTER ALEPH;Lo;0;R;;;;;N;;;;; +10882;NABATAEAN LETTER FINAL BETH;Lo;0;R;;;;;N;;;;; +10883;NABATAEAN LETTER BETH;Lo;0;R;;;;;N;;;;; +10884;NABATAEAN LETTER GIMEL;Lo;0;R;;;;;N;;;;; +10885;NABATAEAN LETTER DALETH;Lo;0;R;;;;;N;;;;; +10886;NABATAEAN LETTER FINAL HE;Lo;0;R;;;;;N;;;;; +10887;NABATAEAN LETTER HE;Lo;0;R;;;;;N;;;;; +10888;NABATAEAN LETTER WAW;Lo;0;R;;;;;N;;;;; +10889;NABATAEAN LETTER ZAYIN;Lo;0;R;;;;;N;;;;; +1088A;NABATAEAN LETTER HETH;Lo;0;R;;;;;N;;;;; +1088B;NABATAEAN LETTER TETH;Lo;0;R;;;;;N;;;;; +1088C;NABATAEAN LETTER FINAL YODH;Lo;0;R;;;;;N;;;;; +1088D;NABATAEAN LETTER YODH;Lo;0;R;;;;;N;;;;; +1088E;NABATAEAN LETTER FINAL KAPH;Lo;0;R;;;;;N;;;;; +1088F;NABATAEAN LETTER KAPH;Lo;0;R;;;;;N;;;;; +10890;NABATAEAN LETTER FINAL LAMEDH;Lo;0;R;;;;;N;;;;; +10891;NABATAEAN LETTER LAMEDH;Lo;0;R;;;;;N;;;;; +10892;NABATAEAN LETTER FINAL MEM;Lo;0;R;;;;;N;;;;; +10893;NABATAEAN LETTER MEM;Lo;0;R;;;;;N;;;;; +10894;NABATAEAN LETTER FINAL NUN;Lo;0;R;;;;;N;;;;; +10895;NABATAEAN LETTER NUN;Lo;0;R;;;;;N;;;;; +10896;NABATAEAN LETTER SAMEKH;Lo;0;R;;;;;N;;;;; +10897;NABATAEAN LETTER AYIN;Lo;0;R;;;;;N;;;;; +10898;NABATAEAN LETTER PE;Lo;0;R;;;;;N;;;;; +10899;NABATAEAN LETTER SADHE;Lo;0;R;;;;;N;;;;; +1089A;NABATAEAN LETTER QOPH;Lo;0;R;;;;;N;;;;; +1089B;NABATAEAN LETTER RESH;Lo;0;R;;;;;N;;;;; +1089C;NABATAEAN LETTER FINAL SHIN;Lo;0;R;;;;;N;;;;; +1089D;NABATAEAN LETTER SHIN;Lo;0;R;;;;;N;;;;; +1089E;NABATAEAN LETTER TAW;Lo;0;R;;;;;N;;;;; +108A7;NABATAEAN NUMBER ONE;No;0;R;;;;1;N;;;;; +108A8;NABATAEAN NUMBER TWO;No;0;R;;;;2;N;;;;; +108A9;NABATAEAN NUMBER THREE;No;0;R;;;;3;N;;;;; +108AA;NABATAEAN NUMBER FOUR;No;0;R;;;;4;N;;;;; +108AB;NABATAEAN CRUCIFORM NUMBER FOUR;No;0;R;;;;4;N;;;;; +108AC;NABATAEAN NUMBER FIVE;No;0;R;;;;5;N;;;;; +108AD;NABATAEAN NUMBER TEN;No;0;R;;;;10;N;;;;; +108AE;NABATAEAN NUMBER TWENTY;No;0;R;;;;20;N;;;;; +108AF;NABATAEAN NUMBER ONE HUNDRED;No;0;R;;;;100;N;;;;; +108E0;HATRAN LETTER ALEPH;Lo;0;R;;;;;N;;;;; +108E1;HATRAN LETTER BETH;Lo;0;R;;;;;N;;;;; +108E2;HATRAN LETTER GIMEL;Lo;0;R;;;;;N;;;;; +108E3;HATRAN LETTER DALETH-RESH;Lo;0;R;;;;;N;;;;; +108E4;HATRAN LETTER HE;Lo;0;R;;;;;N;;;;; +108E5;HATRAN LETTER WAW;Lo;0;R;;;;;N;;;;; +108E6;HATRAN LETTER ZAYN;Lo;0;R;;;;;N;;;;; +108E7;HATRAN LETTER HETH;Lo;0;R;;;;;N;;;;; +108E8;HATRAN LETTER TETH;Lo;0;R;;;;;N;;;;; +108E9;HATRAN LETTER YODH;Lo;0;R;;;;;N;;;;; +108EA;HATRAN LETTER KAPH;Lo;0;R;;;;;N;;;;; +108EB;HATRAN LETTER LAMEDH;Lo;0;R;;;;;N;;;;; +108EC;HATRAN LETTER MEM;Lo;0;R;;;;;N;;;;; +108ED;HATRAN LETTER NUN;Lo;0;R;;;;;N;;;;; +108EE;HATRAN LETTER SAMEKH;Lo;0;R;;;;;N;;;;; +108EF;HATRAN LETTER AYN;Lo;0;R;;;;;N;;;;; +108F0;HATRAN LETTER PE;Lo;0;R;;;;;N;;;;; +108F1;HATRAN LETTER SADHE;Lo;0;R;;;;;N;;;;; +108F2;HATRAN LETTER QOPH;Lo;0;R;;;;;N;;;;; +108F4;HATRAN LETTER SHIN;Lo;0;R;;;;;N;;;;; +108F5;HATRAN LETTER TAW;Lo;0;R;;;;;N;;;;; +108FB;HATRAN NUMBER ONE;No;0;R;;;;1;N;;;;; +108FC;HATRAN NUMBER FIVE;No;0;R;;;;5;N;;;;; +108FD;HATRAN NUMBER TEN;No;0;R;;;;10;N;;;;; +108FE;HATRAN NUMBER TWENTY;No;0;R;;;;20;N;;;;; +108FF;HATRAN NUMBER ONE HUNDRED;No;0;R;;;;100;N;;;;; +10900;PHOENICIAN LETTER ALF;Lo;0;R;;;;;N;;;;; +10901;PHOENICIAN LETTER BET;Lo;0;R;;;;;N;;;;; +10902;PHOENICIAN LETTER GAML;Lo;0;R;;;;;N;;;;; +10903;PHOENICIAN LETTER DELT;Lo;0;R;;;;;N;;;;; +10904;PHOENICIAN LETTER HE;Lo;0;R;;;;;N;;;;; +10905;PHOENICIAN LETTER WAU;Lo;0;R;;;;;N;;;;; +10906;PHOENICIAN LETTER ZAI;Lo;0;R;;;;;N;;;;; +10907;PHOENICIAN LETTER HET;Lo;0;R;;;;;N;;;;; +10908;PHOENICIAN LETTER TET;Lo;0;R;;;;;N;;;;; +10909;PHOENICIAN LETTER YOD;Lo;0;R;;;;;N;;;;; +1090A;PHOENICIAN LETTER KAF;Lo;0;R;;;;;N;;;;; +1090B;PHOENICIAN LETTER LAMD;Lo;0;R;;;;;N;;;;; +1090C;PHOENICIAN LETTER MEM;Lo;0;R;;;;;N;;;;; +1090D;PHOENICIAN LETTER NUN;Lo;0;R;;;;;N;;;;; +1090E;PHOENICIAN LETTER SEMK;Lo;0;R;;;;;N;;;;; +1090F;PHOENICIAN LETTER AIN;Lo;0;R;;;;;N;;;;; +10910;PHOENICIAN LETTER PE;Lo;0;R;;;;;N;;;;; +10911;PHOENICIAN LETTER SADE;Lo;0;R;;;;;N;;;;; +10912;PHOENICIAN LETTER QOF;Lo;0;R;;;;;N;;;;; +10913;PHOENICIAN LETTER ROSH;Lo;0;R;;;;;N;;;;; +10914;PHOENICIAN LETTER SHIN;Lo;0;R;;;;;N;;;;; +10915;PHOENICIAN LETTER TAU;Lo;0;R;;;;;N;;;;; +10916;PHOENICIAN NUMBER ONE;No;0;R;;;;1;N;;;;; +10917;PHOENICIAN NUMBER TEN;No;0;R;;;;10;N;;;;; +10918;PHOENICIAN NUMBER TWENTY;No;0;R;;;;20;N;;;;; +10919;PHOENICIAN NUMBER ONE HUNDRED;No;0;R;;;;100;N;;;;; +1091A;PHOENICIAN NUMBER TWO;No;0;R;;;;2;N;;;;; +1091B;PHOENICIAN NUMBER THREE;No;0;R;;;;3;N;;;;; +1091F;PHOENICIAN WORD SEPARATOR;Po;0;ON;;;;;N;;;;; +10920;LYDIAN LETTER A;Lo;0;R;;;;;N;;;;; +10921;LYDIAN LETTER B;Lo;0;R;;;;;N;;;;; +10922;LYDIAN LETTER G;Lo;0;R;;;;;N;;;;; +10923;LYDIAN LETTER D;Lo;0;R;;;;;N;;;;; +10924;LYDIAN LETTER E;Lo;0;R;;;;;N;;;;; +10925;LYDIAN LETTER V;Lo;0;R;;;;;N;;;;; +10926;LYDIAN LETTER I;Lo;0;R;;;;;N;;;;; +10927;LYDIAN LETTER Y;Lo;0;R;;;;;N;;;;; +10928;LYDIAN LETTER K;Lo;0;R;;;;;N;;;;; +10929;LYDIAN LETTER L;Lo;0;R;;;;;N;;;;; +1092A;LYDIAN LETTER M;Lo;0;R;;;;;N;;;;; +1092B;LYDIAN LETTER N;Lo;0;R;;;;;N;;;;; +1092C;LYDIAN LETTER O;Lo;0;R;;;;;N;;;;; +1092D;LYDIAN LETTER R;Lo;0;R;;;;;N;;;;; +1092E;LYDIAN LETTER SS;Lo;0;R;;;;;N;;;;; +1092F;LYDIAN LETTER T;Lo;0;R;;;;;N;;;;; +10930;LYDIAN LETTER U;Lo;0;R;;;;;N;;;;; +10931;LYDIAN LETTER F;Lo;0;R;;;;;N;;;;; +10932;LYDIAN LETTER Q;Lo;0;R;;;;;N;;;;; +10933;LYDIAN LETTER S;Lo;0;R;;;;;N;;;;; +10934;LYDIAN LETTER TT;Lo;0;R;;;;;N;;;;; +10935;LYDIAN LETTER AN;Lo;0;R;;;;;N;;;;; +10936;LYDIAN LETTER EN;Lo;0;R;;;;;N;;;;; +10937;LYDIAN LETTER LY;Lo;0;R;;;;;N;;;;; +10938;LYDIAN LETTER NN;Lo;0;R;;;;;N;;;;; +10939;LYDIAN LETTER C;Lo;0;R;;;;;N;;;;; +1093F;LYDIAN TRIANGULAR MARK;Po;0;R;;;;;N;;;;; +10980;MEROITIC HIEROGLYPHIC LETTER A;Lo;0;R;;;;;N;;;;; +10981;MEROITIC HIEROGLYPHIC LETTER E;Lo;0;R;;;;;N;;;;; +10982;MEROITIC HIEROGLYPHIC LETTER I;Lo;0;R;;;;;N;;;;; +10983;MEROITIC HIEROGLYPHIC LETTER O;Lo;0;R;;;;;N;;;;; +10984;MEROITIC HIEROGLYPHIC LETTER YA;Lo;0;R;;;;;N;;;;; +10985;MEROITIC HIEROGLYPHIC LETTER WA;Lo;0;R;;;;;N;;;;; +10986;MEROITIC HIEROGLYPHIC LETTER BA;Lo;0;R;;;;;N;;;;; +10987;MEROITIC HIEROGLYPHIC LETTER BA-2;Lo;0;R;;;;;N;;;;; +10988;MEROITIC HIEROGLYPHIC LETTER PA;Lo;0;R;;;;;N;;;;; +10989;MEROITIC HIEROGLYPHIC LETTER MA;Lo;0;R;;;;;N;;;;; +1098A;MEROITIC HIEROGLYPHIC LETTER NA;Lo;0;R;;;;;N;;;;; +1098B;MEROITIC HIEROGLYPHIC LETTER NA-2;Lo;0;R;;;;;N;;;;; +1098C;MEROITIC HIEROGLYPHIC LETTER NE;Lo;0;R;;;;;N;;;;; +1098D;MEROITIC HIEROGLYPHIC LETTER NE-2;Lo;0;R;;;;;N;;;;; +1098E;MEROITIC HIEROGLYPHIC LETTER RA;Lo;0;R;;;;;N;;;;; +1098F;MEROITIC HIEROGLYPHIC LETTER RA-2;Lo;0;R;;;;;N;;;;; +10990;MEROITIC HIEROGLYPHIC LETTER LA;Lo;0;R;;;;;N;;;;; +10991;MEROITIC HIEROGLYPHIC LETTER KHA;Lo;0;R;;;;;N;;;;; +10992;MEROITIC HIEROGLYPHIC LETTER HHA;Lo;0;R;;;;;N;;;;; +10993;MEROITIC HIEROGLYPHIC LETTER SA;Lo;0;R;;;;;N;;;;; +10994;MEROITIC HIEROGLYPHIC LETTER SA-2;Lo;0;R;;;;;N;;;;; +10995;MEROITIC HIEROGLYPHIC LETTER SE;Lo;0;R;;;;;N;;;;; +10996;MEROITIC HIEROGLYPHIC LETTER KA;Lo;0;R;;;;;N;;;;; +10997;MEROITIC HIEROGLYPHIC LETTER QA;Lo;0;R;;;;;N;;;;; +10998;MEROITIC HIEROGLYPHIC LETTER TA;Lo;0;R;;;;;N;;;;; +10999;MEROITIC HIEROGLYPHIC LETTER TA-2;Lo;0;R;;;;;N;;;;; +1099A;MEROITIC HIEROGLYPHIC LETTER TE;Lo;0;R;;;;;N;;;;; +1099B;MEROITIC HIEROGLYPHIC LETTER TE-2;Lo;0;R;;;;;N;;;;; +1099C;MEROITIC HIEROGLYPHIC LETTER TO;Lo;0;R;;;;;N;;;;; +1099D;MEROITIC HIEROGLYPHIC LETTER DA;Lo;0;R;;;;;N;;;;; +1099E;MEROITIC HIEROGLYPHIC SYMBOL VIDJ;Lo;0;R;;;;;N;;;;; +1099F;MEROITIC HIEROGLYPHIC SYMBOL VIDJ-2;Lo;0;R;;;;;N;;;;; +109A0;MEROITIC CURSIVE LETTER A;Lo;0;R;;;;;N;;;;; +109A1;MEROITIC CURSIVE LETTER E;Lo;0;R;;;;;N;;;;; +109A2;MEROITIC CURSIVE LETTER I;Lo;0;R;;;;;N;;;;; +109A3;MEROITIC CURSIVE LETTER O;Lo;0;R;;;;;N;;;;; +109A4;MEROITIC CURSIVE LETTER YA;Lo;0;R;;;;;N;;;;; +109A5;MEROITIC CURSIVE LETTER WA;Lo;0;R;;;;;N;;;;; +109A6;MEROITIC CURSIVE LETTER BA;Lo;0;R;;;;;N;;;;; +109A7;MEROITIC CURSIVE LETTER PA;Lo;0;R;;;;;N;;;;; +109A8;MEROITIC CURSIVE LETTER MA;Lo;0;R;;;;;N;;;;; +109A9;MEROITIC CURSIVE LETTER NA;Lo;0;R;;;;;N;;;;; +109AA;MEROITIC CURSIVE LETTER NE;Lo;0;R;;;;;N;;;;; +109AB;MEROITIC CURSIVE LETTER RA;Lo;0;R;;;;;N;;;;; +109AC;MEROITIC CURSIVE LETTER LA;Lo;0;R;;;;;N;;;;; +109AD;MEROITIC CURSIVE LETTER KHA;Lo;0;R;;;;;N;;;;; +109AE;MEROITIC CURSIVE LETTER HHA;Lo;0;R;;;;;N;;;;; +109AF;MEROITIC CURSIVE LETTER SA;Lo;0;R;;;;;N;;;;; +109B0;MEROITIC CURSIVE LETTER ARCHAIC SA;Lo;0;R;;;;;N;;;;; +109B1;MEROITIC CURSIVE LETTER SE;Lo;0;R;;;;;N;;;;; +109B2;MEROITIC CURSIVE LETTER KA;Lo;0;R;;;;;N;;;;; +109B3;MEROITIC CURSIVE LETTER QA;Lo;0;R;;;;;N;;;;; +109B4;MEROITIC CURSIVE LETTER TA;Lo;0;R;;;;;N;;;;; +109B5;MEROITIC CURSIVE LETTER TE;Lo;0;R;;;;;N;;;;; +109B6;MEROITIC CURSIVE LETTER TO;Lo;0;R;;;;;N;;;;; +109B7;MEROITIC CURSIVE LETTER DA;Lo;0;R;;;;;N;;;;; +109BC;MEROITIC CURSIVE FRACTION ELEVEN TWELFTHS;No;0;R;;;;11/12;N;;;;; +109BD;MEROITIC CURSIVE FRACTION ONE HALF;No;0;R;;;;1/2;N;;;;; +109BE;MEROITIC CURSIVE LOGOGRAM RMT;Lo;0;R;;;;;N;;;;; +109BF;MEROITIC CURSIVE LOGOGRAM IMN;Lo;0;R;;;;;N;;;;; +109C0;MEROITIC CURSIVE NUMBER ONE;No;0;R;;;;1;N;;;;; +109C1;MEROITIC CURSIVE NUMBER TWO;No;0;R;;;;2;N;;;;; +109C2;MEROITIC CURSIVE NUMBER THREE;No;0;R;;;;3;N;;;;; +109C3;MEROITIC CURSIVE NUMBER FOUR;No;0;R;;;;4;N;;;;; +109C4;MEROITIC CURSIVE NUMBER FIVE;No;0;R;;;;5;N;;;;; +109C5;MEROITIC CURSIVE NUMBER SIX;No;0;R;;;;6;N;;;;; +109C6;MEROITIC CURSIVE NUMBER SEVEN;No;0;R;;;;7;N;;;;; +109C7;MEROITIC CURSIVE NUMBER EIGHT;No;0;R;;;;8;N;;;;; +109C8;MEROITIC CURSIVE NUMBER NINE;No;0;R;;;;9;N;;;;; +109C9;MEROITIC CURSIVE NUMBER TEN;No;0;R;;;;10;N;;;;; +109CA;MEROITIC CURSIVE NUMBER TWENTY;No;0;R;;;;20;N;;;;; +109CB;MEROITIC CURSIVE NUMBER THIRTY;No;0;R;;;;30;N;;;;; +109CC;MEROITIC CURSIVE NUMBER FORTY;No;0;R;;;;40;N;;;;; +109CD;MEROITIC CURSIVE NUMBER FIFTY;No;0;R;;;;50;N;;;;; +109CE;MEROITIC CURSIVE NUMBER SIXTY;No;0;R;;;;60;N;;;;; +109CF;MEROITIC CURSIVE NUMBER SEVENTY;No;0;R;;;;70;N;;;;; +109D2;MEROITIC CURSIVE NUMBER ONE HUNDRED;No;0;R;;;;100;N;;;;; +109D3;MEROITIC CURSIVE NUMBER TWO HUNDRED;No;0;R;;;;200;N;;;;; +109D4;MEROITIC CURSIVE NUMBER THREE HUNDRED;No;0;R;;;;300;N;;;;; +109D5;MEROITIC CURSIVE NUMBER FOUR HUNDRED;No;0;R;;;;400;N;;;;; +109D6;MEROITIC CURSIVE NUMBER FIVE HUNDRED;No;0;R;;;;500;N;;;;; +109D7;MEROITIC CURSIVE NUMBER SIX HUNDRED;No;0;R;;;;600;N;;;;; +109D8;MEROITIC CURSIVE NUMBER SEVEN HUNDRED;No;0;R;;;;700;N;;;;; +109D9;MEROITIC CURSIVE NUMBER EIGHT HUNDRED;No;0;R;;;;800;N;;;;; +109DA;MEROITIC CURSIVE NUMBER NINE HUNDRED;No;0;R;;;;900;N;;;;; +109DB;MEROITIC CURSIVE NUMBER ONE THOUSAND;No;0;R;;;;1000;N;;;;; +109DC;MEROITIC CURSIVE NUMBER TWO THOUSAND;No;0;R;;;;2000;N;;;;; +109DD;MEROITIC CURSIVE NUMBER THREE THOUSAND;No;0;R;;;;3000;N;;;;; +109DE;MEROITIC CURSIVE NUMBER FOUR THOUSAND;No;0;R;;;;4000;N;;;;; +109DF;MEROITIC CURSIVE NUMBER FIVE THOUSAND;No;0;R;;;;5000;N;;;;; +109E0;MEROITIC CURSIVE NUMBER SIX THOUSAND;No;0;R;;;;6000;N;;;;; +109E1;MEROITIC CURSIVE NUMBER SEVEN THOUSAND;No;0;R;;;;7000;N;;;;; +109E2;MEROITIC CURSIVE NUMBER EIGHT THOUSAND;No;0;R;;;;8000;N;;;;; +109E3;MEROITIC CURSIVE NUMBER NINE THOUSAND;No;0;R;;;;9000;N;;;;; +109E4;MEROITIC CURSIVE NUMBER TEN THOUSAND;No;0;R;;;;10000;N;;;;; +109E5;MEROITIC CURSIVE NUMBER TWENTY THOUSAND;No;0;R;;;;20000;N;;;;; +109E6;MEROITIC CURSIVE NUMBER THIRTY THOUSAND;No;0;R;;;;30000;N;;;;; +109E7;MEROITIC CURSIVE NUMBER FORTY THOUSAND;No;0;R;;;;40000;N;;;;; +109E8;MEROITIC CURSIVE NUMBER FIFTY THOUSAND;No;0;R;;;;50000;N;;;;; +109E9;MEROITIC CURSIVE NUMBER SIXTY THOUSAND;No;0;R;;;;60000;N;;;;; +109EA;MEROITIC CURSIVE NUMBER SEVENTY THOUSAND;No;0;R;;;;70000;N;;;;; +109EB;MEROITIC CURSIVE NUMBER EIGHTY THOUSAND;No;0;R;;;;80000;N;;;;; +109EC;MEROITIC CURSIVE NUMBER NINETY THOUSAND;No;0;R;;;;90000;N;;;;; +109ED;MEROITIC CURSIVE NUMBER ONE HUNDRED THOUSAND;No;0;R;;;;100000;N;;;;; +109EE;MEROITIC CURSIVE NUMBER TWO HUNDRED THOUSAND;No;0;R;;;;200000;N;;;;; +109EF;MEROITIC CURSIVE NUMBER THREE HUNDRED THOUSAND;No;0;R;;;;300000;N;;;;; +109F0;MEROITIC CURSIVE NUMBER FOUR HUNDRED THOUSAND;No;0;R;;;;400000;N;;;;; +109F1;MEROITIC CURSIVE NUMBER FIVE HUNDRED THOUSAND;No;0;R;;;;500000;N;;;;; +109F2;MEROITIC CURSIVE NUMBER SIX HUNDRED THOUSAND;No;0;R;;;;600000;N;;;;; +109F3;MEROITIC CURSIVE NUMBER SEVEN HUNDRED THOUSAND;No;0;R;;;;700000;N;;;;; +109F4;MEROITIC CURSIVE NUMBER EIGHT HUNDRED THOUSAND;No;0;R;;;;800000;N;;;;; +109F5;MEROITIC CURSIVE NUMBER NINE HUNDRED THOUSAND;No;0;R;;;;900000;N;;;;; +109F6;MEROITIC CURSIVE FRACTION ONE TWELFTH;No;0;R;;;;1/12;N;;;;; +109F7;MEROITIC CURSIVE FRACTION TWO TWELFTHS;No;0;R;;;;2/12;N;;;;; +109F8;MEROITIC CURSIVE FRACTION THREE TWELFTHS;No;0;R;;;;3/12;N;;;;; +109F9;MEROITIC CURSIVE FRACTION FOUR TWELFTHS;No;0;R;;;;4/12;N;;;;; +109FA;MEROITIC CURSIVE FRACTION FIVE TWELFTHS;No;0;R;;;;5/12;N;;;;; +109FB;MEROITIC CURSIVE FRACTION SIX TWELFTHS;No;0;R;;;;6/12;N;;;;; +109FC;MEROITIC CURSIVE FRACTION SEVEN TWELFTHS;No;0;R;;;;7/12;N;;;;; +109FD;MEROITIC CURSIVE FRACTION EIGHT TWELFTHS;No;0;R;;;;8/12;N;;;;; +109FE;MEROITIC CURSIVE FRACTION NINE TWELFTHS;No;0;R;;;;9/12;N;;;;; +109FF;MEROITIC CURSIVE FRACTION TEN TWELFTHS;No;0;R;;;;10/12;N;;;;; +10A00;KHAROSHTHI LETTER A;Lo;0;R;;;;;N;;;;; +10A01;KHAROSHTHI VOWEL SIGN I;Mn;0;NSM;;;;;N;;;;; +10A02;KHAROSHTHI VOWEL SIGN U;Mn;0;NSM;;;;;N;;;;; +10A03;KHAROSHTHI VOWEL SIGN VOCALIC R;Mn;0;NSM;;;;;N;;;;; +10A05;KHAROSHTHI VOWEL SIGN E;Mn;0;NSM;;;;;N;;;;; +10A06;KHAROSHTHI VOWEL SIGN O;Mn;0;NSM;;;;;N;;;;; +10A0C;KHAROSHTHI VOWEL LENGTH MARK;Mn;0;NSM;;;;;N;;;;; +10A0D;KHAROSHTHI SIGN DOUBLE RING BELOW;Mn;220;NSM;;;;;N;;;;; +10A0E;KHAROSHTHI SIGN ANUSVARA;Mn;0;NSM;;;;;N;;;;; +10A0F;KHAROSHTHI SIGN VISARGA;Mn;230;NSM;;;;;N;;;;; +10A10;KHAROSHTHI LETTER KA;Lo;0;R;;;;;N;;;;; +10A11;KHAROSHTHI LETTER KHA;Lo;0;R;;;;;N;;;;; +10A12;KHAROSHTHI LETTER GA;Lo;0;R;;;;;N;;;;; +10A13;KHAROSHTHI LETTER GHA;Lo;0;R;;;;;N;;;;; +10A15;KHAROSHTHI LETTER CA;Lo;0;R;;;;;N;;;;; +10A16;KHAROSHTHI LETTER CHA;Lo;0;R;;;;;N;;;;; +10A17;KHAROSHTHI LETTER JA;Lo;0;R;;;;;N;;;;; +10A19;KHAROSHTHI LETTER NYA;Lo;0;R;;;;;N;;;;; +10A1A;KHAROSHTHI LETTER TTA;Lo;0;R;;;;;N;;;;; +10A1B;KHAROSHTHI LETTER TTHA;Lo;0;R;;;;;N;;;;; +10A1C;KHAROSHTHI LETTER DDA;Lo;0;R;;;;;N;;;;; +10A1D;KHAROSHTHI LETTER DDHA;Lo;0;R;;;;;N;;;;; +10A1E;KHAROSHTHI LETTER NNA;Lo;0;R;;;;;N;;;;; +10A1F;KHAROSHTHI LETTER TA;Lo;0;R;;;;;N;;;;; +10A20;KHAROSHTHI LETTER THA;Lo;0;R;;;;;N;;;;; +10A21;KHAROSHTHI LETTER DA;Lo;0;R;;;;;N;;;;; +10A22;KHAROSHTHI LETTER DHA;Lo;0;R;;;;;N;;;;; +10A23;KHAROSHTHI LETTER NA;Lo;0;R;;;;;N;;;;; +10A24;KHAROSHTHI LETTER PA;Lo;0;R;;;;;N;;;;; +10A25;KHAROSHTHI LETTER PHA;Lo;0;R;;;;;N;;;;; +10A26;KHAROSHTHI LETTER BA;Lo;0;R;;;;;N;;;;; +10A27;KHAROSHTHI LETTER BHA;Lo;0;R;;;;;N;;;;; +10A28;KHAROSHTHI LETTER MA;Lo;0;R;;;;;N;;;;; +10A29;KHAROSHTHI LETTER YA;Lo;0;R;;;;;N;;;;; +10A2A;KHAROSHTHI LETTER RA;Lo;0;R;;;;;N;;;;; +10A2B;KHAROSHTHI LETTER LA;Lo;0;R;;;;;N;;;;; +10A2C;KHAROSHTHI LETTER VA;Lo;0;R;;;;;N;;;;; +10A2D;KHAROSHTHI LETTER SHA;Lo;0;R;;;;;N;;;;; +10A2E;KHAROSHTHI LETTER SSA;Lo;0;R;;;;;N;;;;; +10A2F;KHAROSHTHI LETTER SA;Lo;0;R;;;;;N;;;;; +10A30;KHAROSHTHI LETTER ZA;Lo;0;R;;;;;N;;;;; +10A31;KHAROSHTHI LETTER HA;Lo;0;R;;;;;N;;;;; +10A32;KHAROSHTHI LETTER KKA;Lo;0;R;;;;;N;;;;; +10A33;KHAROSHTHI LETTER TTTHA;Lo;0;R;;;;;N;;;;; +10A34;KHAROSHTHI LETTER TTTA;Lo;0;R;;;;;N;;;;; +10A35;KHAROSHTHI LETTER VHA;Lo;0;R;;;;;N;;;;; +10A38;KHAROSHTHI SIGN BAR ABOVE;Mn;230;NSM;;;;;N;;;;; +10A39;KHAROSHTHI SIGN CAUDA;Mn;1;NSM;;;;;N;;;;; +10A3A;KHAROSHTHI SIGN DOT BELOW;Mn;220;NSM;;;;;N;;;;; +10A3F;KHAROSHTHI VIRAMA;Mn;9;NSM;;;;;N;;;;; +10A40;KHAROSHTHI DIGIT ONE;No;0;R;;;1;1;N;;;;; +10A41;KHAROSHTHI DIGIT TWO;No;0;R;;;2;2;N;;;;; +10A42;KHAROSHTHI DIGIT THREE;No;0;R;;;3;3;N;;;;; +10A43;KHAROSHTHI DIGIT FOUR;No;0;R;;;4;4;N;;;;; +10A44;KHAROSHTHI NUMBER TEN;No;0;R;;;;10;N;;;;; +10A45;KHAROSHTHI NUMBER TWENTY;No;0;R;;;;20;N;;;;; +10A46;KHAROSHTHI NUMBER ONE HUNDRED;No;0;R;;;;100;N;;;;; +10A47;KHAROSHTHI NUMBER ONE THOUSAND;No;0;R;;;;1000;N;;;;; +10A48;KHAROSHTHI FRACTION ONE HALF;No;0;R;;;;1/2;N;;;;; +10A50;KHAROSHTHI PUNCTUATION DOT;Po;0;R;;;;;N;;;;; +10A51;KHAROSHTHI PUNCTUATION SMALL CIRCLE;Po;0;R;;;;;N;;;;; +10A52;KHAROSHTHI PUNCTUATION CIRCLE;Po;0;R;;;;;N;;;;; +10A53;KHAROSHTHI PUNCTUATION CRESCENT BAR;Po;0;R;;;;;N;;;;; +10A54;KHAROSHTHI PUNCTUATION MANGALAM;Po;0;R;;;;;N;;;;; +10A55;KHAROSHTHI PUNCTUATION LOTUS;Po;0;R;;;;;N;;;;; +10A56;KHAROSHTHI PUNCTUATION DANDA;Po;0;R;;;;;N;;;;; +10A57;KHAROSHTHI PUNCTUATION DOUBLE DANDA;Po;0;R;;;;;N;;;;; +10A58;KHAROSHTHI PUNCTUATION LINES;Po;0;R;;;;;N;;;;; +10A60;OLD SOUTH ARABIAN LETTER HE;Lo;0;R;;;;;N;;;;; +10A61;OLD SOUTH ARABIAN LETTER LAMEDH;Lo;0;R;;;;;N;;;;; +10A62;OLD SOUTH ARABIAN LETTER HETH;Lo;0;R;;;;;N;;;;; +10A63;OLD SOUTH ARABIAN LETTER MEM;Lo;0;R;;;;;N;;;;; +10A64;OLD SOUTH ARABIAN LETTER QOPH;Lo;0;R;;;;;N;;;;; +10A65;OLD SOUTH ARABIAN LETTER WAW;Lo;0;R;;;;;N;;;;; +10A66;OLD SOUTH ARABIAN LETTER SHIN;Lo;0;R;;;;;N;;;;; +10A67;OLD SOUTH ARABIAN LETTER RESH;Lo;0;R;;;;;N;;;;; +10A68;OLD SOUTH ARABIAN LETTER BETH;Lo;0;R;;;;;N;;;;; +10A69;OLD SOUTH ARABIAN LETTER TAW;Lo;0;R;;;;;N;;;;; +10A6A;OLD SOUTH ARABIAN LETTER SAT;Lo;0;R;;;;;N;;;;; +10A6B;OLD SOUTH ARABIAN LETTER KAPH;Lo;0;R;;;;;N;;;;; +10A6C;OLD SOUTH ARABIAN LETTER NUN;Lo;0;R;;;;;N;;;;; +10A6D;OLD SOUTH ARABIAN LETTER KHETH;Lo;0;R;;;;;N;;;;; +10A6E;OLD SOUTH ARABIAN LETTER SADHE;Lo;0;R;;;;;N;;;;; +10A6F;OLD SOUTH ARABIAN LETTER SAMEKH;Lo;0;R;;;;;N;;;;; +10A70;OLD SOUTH ARABIAN LETTER FE;Lo;0;R;;;;;N;;;;; +10A71;OLD SOUTH ARABIAN LETTER ALEF;Lo;0;R;;;;;N;;;;; +10A72;OLD SOUTH ARABIAN LETTER AYN;Lo;0;R;;;;;N;;;;; +10A73;OLD SOUTH ARABIAN LETTER DHADHE;Lo;0;R;;;;;N;;;;; +10A74;OLD SOUTH ARABIAN LETTER GIMEL;Lo;0;R;;;;;N;;;;; +10A75;OLD SOUTH ARABIAN LETTER DALETH;Lo;0;R;;;;;N;;;;; +10A76;OLD SOUTH ARABIAN LETTER GHAYN;Lo;0;R;;;;;N;;;;; +10A77;OLD SOUTH ARABIAN LETTER TETH;Lo;0;R;;;;;N;;;;; +10A78;OLD SOUTH ARABIAN LETTER ZAYN;Lo;0;R;;;;;N;;;;; +10A79;OLD SOUTH ARABIAN LETTER DHALETH;Lo;0;R;;;;;N;;;;; +10A7A;OLD SOUTH ARABIAN LETTER YODH;Lo;0;R;;;;;N;;;;; +10A7B;OLD SOUTH ARABIAN LETTER THAW;Lo;0;R;;;;;N;;;;; +10A7C;OLD SOUTH ARABIAN LETTER THETH;Lo;0;R;;;;;N;;;;; +10A7D;OLD SOUTH ARABIAN NUMBER ONE;No;0;R;;;;1;N;;;;; +10A7E;OLD SOUTH ARABIAN NUMBER FIFTY;No;0;R;;;;50;N;;;;; +10A7F;OLD SOUTH ARABIAN NUMERIC INDICATOR;Po;0;R;;;;;N;;;;; +10A80;OLD NORTH ARABIAN LETTER HEH;Lo;0;R;;;;;N;;;;; +10A81;OLD NORTH ARABIAN LETTER LAM;Lo;0;R;;;;;N;;;;; +10A82;OLD NORTH ARABIAN LETTER HAH;Lo;0;R;;;;;N;;;;; +10A83;OLD NORTH ARABIAN LETTER MEEM;Lo;0;R;;;;;N;;;;; +10A84;OLD NORTH ARABIAN LETTER QAF;Lo;0;R;;;;;N;;;;; +10A85;OLD NORTH ARABIAN LETTER WAW;Lo;0;R;;;;;N;;;;; +10A86;OLD NORTH ARABIAN LETTER ES-2;Lo;0;R;;;;;N;;;;; +10A87;OLD NORTH ARABIAN LETTER REH;Lo;0;R;;;;;N;;;;; +10A88;OLD NORTH ARABIAN LETTER BEH;Lo;0;R;;;;;N;;;;; +10A89;OLD NORTH ARABIAN LETTER TEH;Lo;0;R;;;;;N;;;;; +10A8A;OLD NORTH ARABIAN LETTER ES-1;Lo;0;R;;;;;N;;;;; +10A8B;OLD NORTH ARABIAN LETTER KAF;Lo;0;R;;;;;N;;;;; +10A8C;OLD NORTH ARABIAN LETTER NOON;Lo;0;R;;;;;N;;;;; +10A8D;OLD NORTH ARABIAN LETTER KHAH;Lo;0;R;;;;;N;;;;; +10A8E;OLD NORTH ARABIAN LETTER SAD;Lo;0;R;;;;;N;;;;; +10A8F;OLD NORTH ARABIAN LETTER ES-3;Lo;0;R;;;;;N;;;;; +10A90;OLD NORTH ARABIAN LETTER FEH;Lo;0;R;;;;;N;;;;; +10A91;OLD NORTH ARABIAN LETTER ALEF;Lo;0;R;;;;;N;;;;; +10A92;OLD NORTH ARABIAN LETTER AIN;Lo;0;R;;;;;N;;;;; +10A93;OLD NORTH ARABIAN LETTER DAD;Lo;0;R;;;;;N;;;;; +10A94;OLD NORTH ARABIAN LETTER GEEM;Lo;0;R;;;;;N;;;;; +10A95;OLD NORTH ARABIAN LETTER DAL;Lo;0;R;;;;;N;;;;; +10A96;OLD NORTH ARABIAN LETTER GHAIN;Lo;0;R;;;;;N;;;;; +10A97;OLD NORTH ARABIAN LETTER TAH;Lo;0;R;;;;;N;;;;; +10A98;OLD NORTH ARABIAN LETTER ZAIN;Lo;0;R;;;;;N;;;;; +10A99;OLD NORTH ARABIAN LETTER THAL;Lo;0;R;;;;;N;;;;; +10A9A;OLD NORTH ARABIAN LETTER YEH;Lo;0;R;;;;;N;;;;; +10A9B;OLD NORTH ARABIAN LETTER THEH;Lo;0;R;;;;;N;;;;; +10A9C;OLD NORTH ARABIAN LETTER ZAH;Lo;0;R;;;;;N;;;;; +10A9D;OLD NORTH ARABIAN NUMBER ONE;No;0;R;;;;1;N;;;;; +10A9E;OLD NORTH ARABIAN NUMBER TEN;No;0;R;;;;10;N;;;;; +10A9F;OLD NORTH ARABIAN NUMBER TWENTY;No;0;R;;;;20;N;;;;; +10AC0;MANICHAEAN LETTER ALEPH;Lo;0;R;;;;;N;;;;; +10AC1;MANICHAEAN LETTER BETH;Lo;0;R;;;;;N;;;;; +10AC2;MANICHAEAN LETTER BHETH;Lo;0;R;;;;;N;;;;; +10AC3;MANICHAEAN LETTER GIMEL;Lo;0;R;;;;;N;;;;; +10AC4;MANICHAEAN LETTER GHIMEL;Lo;0;R;;;;;N;;;;; +10AC5;MANICHAEAN LETTER DALETH;Lo;0;R;;;;;N;;;;; +10AC6;MANICHAEAN LETTER HE;Lo;0;R;;;;;N;;;;; +10AC7;MANICHAEAN LETTER WAW;Lo;0;R;;;;;N;;;;; +10AC8;MANICHAEAN SIGN UD;So;0;R;;;;;N;;;;; +10AC9;MANICHAEAN LETTER ZAYIN;Lo;0;R;;;;;N;;;;; +10ACA;MANICHAEAN LETTER ZHAYIN;Lo;0;R;;;;;N;;;;; +10ACB;MANICHAEAN LETTER JAYIN;Lo;0;R;;;;;N;;;;; +10ACC;MANICHAEAN LETTER JHAYIN;Lo;0;R;;;;;N;;;;; +10ACD;MANICHAEAN LETTER HETH;Lo;0;R;;;;;N;;;;; +10ACE;MANICHAEAN LETTER TETH;Lo;0;R;;;;;N;;;;; +10ACF;MANICHAEAN LETTER YODH;Lo;0;R;;;;;N;;;;; +10AD0;MANICHAEAN LETTER KAPH;Lo;0;R;;;;;N;;;;; +10AD1;MANICHAEAN LETTER XAPH;Lo;0;R;;;;;N;;;;; +10AD2;MANICHAEAN LETTER KHAPH;Lo;0;R;;;;;N;;;;; +10AD3;MANICHAEAN LETTER LAMEDH;Lo;0;R;;;;;N;;;;; +10AD4;MANICHAEAN LETTER DHAMEDH;Lo;0;R;;;;;N;;;;; +10AD5;MANICHAEAN LETTER THAMEDH;Lo;0;R;;;;;N;;;;; +10AD6;MANICHAEAN LETTER MEM;Lo;0;R;;;;;N;;;;; +10AD7;MANICHAEAN LETTER NUN;Lo;0;R;;;;;N;;;;; +10AD8;MANICHAEAN LETTER SAMEKH;Lo;0;R;;;;;N;;;;; +10AD9;MANICHAEAN LETTER AYIN;Lo;0;R;;;;;N;;;;; +10ADA;MANICHAEAN LETTER AAYIN;Lo;0;R;;;;;N;;;;; +10ADB;MANICHAEAN LETTER PE;Lo;0;R;;;;;N;;;;; +10ADC;MANICHAEAN LETTER FE;Lo;0;R;;;;;N;;;;; +10ADD;MANICHAEAN LETTER SADHE;Lo;0;R;;;;;N;;;;; +10ADE;MANICHAEAN LETTER QOPH;Lo;0;R;;;;;N;;;;; +10ADF;MANICHAEAN LETTER XOPH;Lo;0;R;;;;;N;;;;; +10AE0;MANICHAEAN LETTER QHOPH;Lo;0;R;;;;;N;;;;; +10AE1;MANICHAEAN LETTER RESH;Lo;0;R;;;;;N;;;;; +10AE2;MANICHAEAN LETTER SHIN;Lo;0;R;;;;;N;;;;; +10AE3;MANICHAEAN LETTER SSHIN;Lo;0;R;;;;;N;;;;; +10AE4;MANICHAEAN LETTER TAW;Lo;0;R;;;;;N;;;;; +10AE5;MANICHAEAN ABBREVIATION MARK ABOVE;Mn;230;NSM;;;;;N;;;;; +10AE6;MANICHAEAN ABBREVIATION MARK BELOW;Mn;220;NSM;;;;;N;;;;; +10AEB;MANICHAEAN NUMBER ONE;No;0;R;;;;1;N;;;;; +10AEC;MANICHAEAN NUMBER FIVE;No;0;R;;;;5;N;;;;; +10AED;MANICHAEAN NUMBER TEN;No;0;R;;;;10;N;;;;; +10AEE;MANICHAEAN NUMBER TWENTY;No;0;R;;;;20;N;;;;; +10AEF;MANICHAEAN NUMBER ONE HUNDRED;No;0;R;;;;100;N;;;;; +10AF0;MANICHAEAN PUNCTUATION STAR;Po;0;R;;;;;N;;;;; +10AF1;MANICHAEAN PUNCTUATION FLEURON;Po;0;R;;;;;N;;;;; +10AF2;MANICHAEAN PUNCTUATION DOUBLE DOT WITHIN DOT;Po;0;R;;;;;N;;;;; +10AF3;MANICHAEAN PUNCTUATION DOT WITHIN DOT;Po;0;R;;;;;N;;;;; +10AF4;MANICHAEAN PUNCTUATION DOT;Po;0;R;;;;;N;;;;; +10AF5;MANICHAEAN PUNCTUATION TWO DOTS;Po;0;R;;;;;N;;;;; +10AF6;MANICHAEAN PUNCTUATION LINE FILLER;Po;0;R;;;;;N;;;;; +10B00;AVESTAN LETTER A;Lo;0;R;;;;;N;;;;; +10B01;AVESTAN LETTER AA;Lo;0;R;;;;;N;;;;; +10B02;AVESTAN LETTER AO;Lo;0;R;;;;;N;;;;; +10B03;AVESTAN LETTER AAO;Lo;0;R;;;;;N;;;;; +10B04;AVESTAN LETTER AN;Lo;0;R;;;;;N;;;;; +10B05;AVESTAN LETTER AAN;Lo;0;R;;;;;N;;;;; +10B06;AVESTAN LETTER AE;Lo;0;R;;;;;N;;;;; +10B07;AVESTAN LETTER AEE;Lo;0;R;;;;;N;;;;; +10B08;AVESTAN LETTER E;Lo;0;R;;;;;N;;;;; +10B09;AVESTAN LETTER EE;Lo;0;R;;;;;N;;;;; +10B0A;AVESTAN LETTER O;Lo;0;R;;;;;N;;;;; +10B0B;AVESTAN LETTER OO;Lo;0;R;;;;;N;;;;; +10B0C;AVESTAN LETTER I;Lo;0;R;;;;;N;;;;; +10B0D;AVESTAN LETTER II;Lo;0;R;;;;;N;;;;; +10B0E;AVESTAN LETTER U;Lo;0;R;;;;;N;;;;; +10B0F;AVESTAN LETTER UU;Lo;0;R;;;;;N;;;;; +10B10;AVESTAN LETTER KE;Lo;0;R;;;;;N;;;;; +10B11;AVESTAN LETTER XE;Lo;0;R;;;;;N;;;;; +10B12;AVESTAN LETTER XYE;Lo;0;R;;;;;N;;;;; +10B13;AVESTAN LETTER XVE;Lo;0;R;;;;;N;;;;; +10B14;AVESTAN LETTER GE;Lo;0;R;;;;;N;;;;; +10B15;AVESTAN LETTER GGE;Lo;0;R;;;;;N;;;;; +10B16;AVESTAN LETTER GHE;Lo;0;R;;;;;N;;;;; +10B17;AVESTAN LETTER CE;Lo;0;R;;;;;N;;;;; +10B18;AVESTAN LETTER JE;Lo;0;R;;;;;N;;;;; +10B19;AVESTAN LETTER TE;Lo;0;R;;;;;N;;;;; +10B1A;AVESTAN LETTER THE;Lo;0;R;;;;;N;;;;; +10B1B;AVESTAN LETTER DE;Lo;0;R;;;;;N;;;;; +10B1C;AVESTAN LETTER DHE;Lo;0;R;;;;;N;;;;; +10B1D;AVESTAN LETTER TTE;Lo;0;R;;;;;N;;;;; +10B1E;AVESTAN LETTER PE;Lo;0;R;;;;;N;;;;; +10B1F;AVESTAN LETTER FE;Lo;0;R;;;;;N;;;;; +10B20;AVESTAN LETTER BE;Lo;0;R;;;;;N;;;;; +10B21;AVESTAN LETTER BHE;Lo;0;R;;;;;N;;;;; +10B22;AVESTAN LETTER NGE;Lo;0;R;;;;;N;;;;; +10B23;AVESTAN LETTER NGYE;Lo;0;R;;;;;N;;;;; +10B24;AVESTAN LETTER NGVE;Lo;0;R;;;;;N;;;;; +10B25;AVESTAN LETTER NE;Lo;0;R;;;;;N;;;;; +10B26;AVESTAN LETTER NYE;Lo;0;R;;;;;N;;;;; +10B27;AVESTAN LETTER NNE;Lo;0;R;;;;;N;;;;; +10B28;AVESTAN LETTER ME;Lo;0;R;;;;;N;;;;; +10B29;AVESTAN LETTER HME;Lo;0;R;;;;;N;;;;; +10B2A;AVESTAN LETTER YYE;Lo;0;R;;;;;N;;;;; +10B2B;AVESTAN LETTER YE;Lo;0;R;;;;;N;;;;; +10B2C;AVESTAN LETTER VE;Lo;0;R;;;;;N;;;;; +10B2D;AVESTAN LETTER RE;Lo;0;R;;;;;N;;;;; +10B2E;AVESTAN LETTER LE;Lo;0;R;;;;;N;;;;; +10B2F;AVESTAN LETTER SE;Lo;0;R;;;;;N;;;;; +10B30;AVESTAN LETTER ZE;Lo;0;R;;;;;N;;;;; +10B31;AVESTAN LETTER SHE;Lo;0;R;;;;;N;;;;; +10B32;AVESTAN LETTER ZHE;Lo;0;R;;;;;N;;;;; +10B33;AVESTAN LETTER SHYE;Lo;0;R;;;;;N;;;;; +10B34;AVESTAN LETTER SSHE;Lo;0;R;;;;;N;;;;; +10B35;AVESTAN LETTER HE;Lo;0;R;;;;;N;;;;; +10B39;AVESTAN ABBREVIATION MARK;Po;0;ON;;;;;N;;;;; +10B3A;TINY TWO DOTS OVER ONE DOT PUNCTUATION;Po;0;ON;;;;;N;;;;; +10B3B;SMALL TWO DOTS OVER ONE DOT PUNCTUATION;Po;0;ON;;;;;N;;;;; +10B3C;LARGE TWO DOTS OVER ONE DOT PUNCTUATION;Po;0;ON;;;;;N;;;;; +10B3D;LARGE ONE DOT OVER TWO DOTS PUNCTUATION;Po;0;ON;;;;;N;;;;; +10B3E;LARGE TWO RINGS OVER ONE RING PUNCTUATION;Po;0;ON;;;;;N;;;;; +10B3F;LARGE ONE RING OVER TWO RINGS PUNCTUATION;Po;0;ON;;;;;N;;;;; +10B40;INSCRIPTIONAL PARTHIAN LETTER ALEPH;Lo;0;R;;;;;N;;;;; +10B41;INSCRIPTIONAL PARTHIAN LETTER BETH;Lo;0;R;;;;;N;;;;; +10B42;INSCRIPTIONAL PARTHIAN LETTER GIMEL;Lo;0;R;;;;;N;;;;; +10B43;INSCRIPTIONAL PARTHIAN LETTER DALETH;Lo;0;R;;;;;N;;;;; +10B44;INSCRIPTIONAL PARTHIAN LETTER HE;Lo;0;R;;;;;N;;;;; +10B45;INSCRIPTIONAL PARTHIAN LETTER WAW;Lo;0;R;;;;;N;;;;; +10B46;INSCRIPTIONAL PARTHIAN LETTER ZAYIN;Lo;0;R;;;;;N;;;;; +10B47;INSCRIPTIONAL PARTHIAN LETTER HETH;Lo;0;R;;;;;N;;;;; +10B48;INSCRIPTIONAL PARTHIAN LETTER TETH;Lo;0;R;;;;;N;;;;; +10B49;INSCRIPTIONAL PARTHIAN LETTER YODH;Lo;0;R;;;;;N;;;;; +10B4A;INSCRIPTIONAL PARTHIAN LETTER KAPH;Lo;0;R;;;;;N;;;;; +10B4B;INSCRIPTIONAL PARTHIAN LETTER LAMEDH;Lo;0;R;;;;;N;;;;; +10B4C;INSCRIPTIONAL PARTHIAN LETTER MEM;Lo;0;R;;;;;N;;;;; +10B4D;INSCRIPTIONAL PARTHIAN LETTER NUN;Lo;0;R;;;;;N;;;;; +10B4E;INSCRIPTIONAL PARTHIAN LETTER SAMEKH;Lo;0;R;;;;;N;;;;; +10B4F;INSCRIPTIONAL PARTHIAN LETTER AYIN;Lo;0;R;;;;;N;;;;; +10B50;INSCRIPTIONAL PARTHIAN LETTER PE;Lo;0;R;;;;;N;;;;; +10B51;INSCRIPTIONAL PARTHIAN LETTER SADHE;Lo;0;R;;;;;N;;;;; +10B52;INSCRIPTIONAL PARTHIAN LETTER QOPH;Lo;0;R;;;;;N;;;;; +10B53;INSCRIPTIONAL PARTHIAN LETTER RESH;Lo;0;R;;;;;N;;;;; +10B54;INSCRIPTIONAL PARTHIAN LETTER SHIN;Lo;0;R;;;;;N;;;;; +10B55;INSCRIPTIONAL PARTHIAN LETTER TAW;Lo;0;R;;;;;N;;;;; +10B58;INSCRIPTIONAL PARTHIAN NUMBER ONE;No;0;R;;;;1;N;;;;; +10B59;INSCRIPTIONAL PARTHIAN NUMBER TWO;No;0;R;;;;2;N;;;;; +10B5A;INSCRIPTIONAL PARTHIAN NUMBER THREE;No;0;R;;;;3;N;;;;; +10B5B;INSCRIPTIONAL PARTHIAN NUMBER FOUR;No;0;R;;;;4;N;;;;; +10B5C;INSCRIPTIONAL PARTHIAN NUMBER TEN;No;0;R;;;;10;N;;;;; +10B5D;INSCRIPTIONAL PARTHIAN NUMBER TWENTY;No;0;R;;;;20;N;;;;; +10B5E;INSCRIPTIONAL PARTHIAN NUMBER ONE HUNDRED;No;0;R;;;;100;N;;;;; +10B5F;INSCRIPTIONAL PARTHIAN NUMBER ONE THOUSAND;No;0;R;;;;1000;N;;;;; +10B60;INSCRIPTIONAL PAHLAVI LETTER ALEPH;Lo;0;R;;;;;N;;;;; +10B61;INSCRIPTIONAL PAHLAVI LETTER BETH;Lo;0;R;;;;;N;;;;; +10B62;INSCRIPTIONAL PAHLAVI LETTER GIMEL;Lo;0;R;;;;;N;;;;; +10B63;INSCRIPTIONAL PAHLAVI LETTER DALETH;Lo;0;R;;;;;N;;;;; +10B64;INSCRIPTIONAL PAHLAVI LETTER HE;Lo;0;R;;;;;N;;;;; +10B65;INSCRIPTIONAL PAHLAVI LETTER WAW-AYIN-RESH;Lo;0;R;;;;;N;;;;; +10B66;INSCRIPTIONAL PAHLAVI LETTER ZAYIN;Lo;0;R;;;;;N;;;;; +10B67;INSCRIPTIONAL PAHLAVI LETTER HETH;Lo;0;R;;;;;N;;;;; +10B68;INSCRIPTIONAL PAHLAVI LETTER TETH;Lo;0;R;;;;;N;;;;; +10B69;INSCRIPTIONAL PAHLAVI LETTER YODH;Lo;0;R;;;;;N;;;;; +10B6A;INSCRIPTIONAL PAHLAVI LETTER KAPH;Lo;0;R;;;;;N;;;;; +10B6B;INSCRIPTIONAL PAHLAVI LETTER LAMEDH;Lo;0;R;;;;;N;;;;; +10B6C;INSCRIPTIONAL PAHLAVI LETTER MEM-QOPH;Lo;0;R;;;;;N;;;;; +10B6D;INSCRIPTIONAL PAHLAVI LETTER NUN;Lo;0;R;;;;;N;;;;; +10B6E;INSCRIPTIONAL PAHLAVI LETTER SAMEKH;Lo;0;R;;;;;N;;;;; +10B6F;INSCRIPTIONAL PAHLAVI LETTER PE;Lo;0;R;;;;;N;;;;; +10B70;INSCRIPTIONAL PAHLAVI LETTER SADHE;Lo;0;R;;;;;N;;;;; +10B71;INSCRIPTIONAL PAHLAVI LETTER SHIN;Lo;0;R;;;;;N;;;;; +10B72;INSCRIPTIONAL PAHLAVI LETTER TAW;Lo;0;R;;;;;N;;;;; +10B78;INSCRIPTIONAL PAHLAVI NUMBER ONE;No;0;R;;;;1;N;;;;; +10B79;INSCRIPTIONAL PAHLAVI NUMBER TWO;No;0;R;;;;2;N;;;;; +10B7A;INSCRIPTIONAL PAHLAVI NUMBER THREE;No;0;R;;;;3;N;;;;; +10B7B;INSCRIPTIONAL PAHLAVI NUMBER FOUR;No;0;R;;;;4;N;;;;; +10B7C;INSCRIPTIONAL PAHLAVI NUMBER TEN;No;0;R;;;;10;N;;;;; +10B7D;INSCRIPTIONAL PAHLAVI NUMBER TWENTY;No;0;R;;;;20;N;;;;; +10B7E;INSCRIPTIONAL PAHLAVI NUMBER ONE HUNDRED;No;0;R;;;;100;N;;;;; +10B7F;INSCRIPTIONAL PAHLAVI NUMBER ONE THOUSAND;No;0;R;;;;1000;N;;;;; +10B80;PSALTER PAHLAVI LETTER ALEPH;Lo;0;R;;;;;N;;;;; +10B81;PSALTER PAHLAVI LETTER BETH;Lo;0;R;;;;;N;;;;; +10B82;PSALTER PAHLAVI LETTER GIMEL;Lo;0;R;;;;;N;;;;; +10B83;PSALTER PAHLAVI LETTER DALETH;Lo;0;R;;;;;N;;;;; +10B84;PSALTER PAHLAVI LETTER HE;Lo;0;R;;;;;N;;;;; +10B85;PSALTER PAHLAVI LETTER WAW-AYIN-RESH;Lo;0;R;;;;;N;;;;; +10B86;PSALTER PAHLAVI LETTER ZAYIN;Lo;0;R;;;;;N;;;;; +10B87;PSALTER PAHLAVI LETTER HETH;Lo;0;R;;;;;N;;;;; +10B88;PSALTER PAHLAVI LETTER YODH;Lo;0;R;;;;;N;;;;; +10B89;PSALTER PAHLAVI LETTER KAPH;Lo;0;R;;;;;N;;;;; +10B8A;PSALTER PAHLAVI LETTER LAMEDH;Lo;0;R;;;;;N;;;;; +10B8B;PSALTER PAHLAVI LETTER MEM-QOPH;Lo;0;R;;;;;N;;;;; +10B8C;PSALTER PAHLAVI LETTER NUN;Lo;0;R;;;;;N;;;;; +10B8D;PSALTER PAHLAVI LETTER SAMEKH;Lo;0;R;;;;;N;;;;; +10B8E;PSALTER PAHLAVI LETTER PE;Lo;0;R;;;;;N;;;;; +10B8F;PSALTER PAHLAVI LETTER SADHE;Lo;0;R;;;;;N;;;;; +10B90;PSALTER PAHLAVI LETTER SHIN;Lo;0;R;;;;;N;;;;; +10B91;PSALTER PAHLAVI LETTER TAW;Lo;0;R;;;;;N;;;;; +10B99;PSALTER PAHLAVI SECTION MARK;Po;0;R;;;;;N;;;;; +10B9A;PSALTER PAHLAVI TURNED SECTION MARK;Po;0;R;;;;;N;;;;; +10B9B;PSALTER PAHLAVI FOUR DOTS WITH CROSS;Po;0;R;;;;;N;;;;; +10B9C;PSALTER PAHLAVI FOUR DOTS WITH DOT;Po;0;R;;;;;N;;;;; +10BA9;PSALTER PAHLAVI NUMBER ONE;No;0;R;;;;1;N;;;;; +10BAA;PSALTER PAHLAVI NUMBER TWO;No;0;R;;;;2;N;;;;; +10BAB;PSALTER PAHLAVI NUMBER THREE;No;0;R;;;;3;N;;;;; +10BAC;PSALTER PAHLAVI NUMBER FOUR;No;0;R;;;;4;N;;;;; +10BAD;PSALTER PAHLAVI NUMBER TEN;No;0;R;;;;10;N;;;;; +10BAE;PSALTER PAHLAVI NUMBER TWENTY;No;0;R;;;;20;N;;;;; +10BAF;PSALTER PAHLAVI NUMBER ONE HUNDRED;No;0;R;;;;100;N;;;;; +10C00;OLD TURKIC LETTER ORKHON A;Lo;0;R;;;;;N;;;;; +10C01;OLD TURKIC LETTER YENISEI A;Lo;0;R;;;;;N;;;;; +10C02;OLD TURKIC LETTER YENISEI AE;Lo;0;R;;;;;N;;;;; +10C03;OLD TURKIC LETTER ORKHON I;Lo;0;R;;;;;N;;;;; +10C04;OLD TURKIC LETTER YENISEI I;Lo;0;R;;;;;N;;;;; +10C05;OLD TURKIC LETTER YENISEI E;Lo;0;R;;;;;N;;;;; +10C06;OLD TURKIC LETTER ORKHON O;Lo;0;R;;;;;N;;;;; +10C07;OLD TURKIC LETTER ORKHON OE;Lo;0;R;;;;;N;;;;; +10C08;OLD TURKIC LETTER YENISEI OE;Lo;0;R;;;;;N;;;;; +10C09;OLD TURKIC LETTER ORKHON AB;Lo;0;R;;;;;N;;;;; +10C0A;OLD TURKIC LETTER YENISEI AB;Lo;0;R;;;;;N;;;;; +10C0B;OLD TURKIC LETTER ORKHON AEB;Lo;0;R;;;;;N;;;;; +10C0C;OLD TURKIC LETTER YENISEI AEB;Lo;0;R;;;;;N;;;;; +10C0D;OLD TURKIC LETTER ORKHON AG;Lo;0;R;;;;;N;;;;; +10C0E;OLD TURKIC LETTER YENISEI AG;Lo;0;R;;;;;N;;;;; +10C0F;OLD TURKIC LETTER ORKHON AEG;Lo;0;R;;;;;N;;;;; +10C10;OLD TURKIC LETTER YENISEI AEG;Lo;0;R;;;;;N;;;;; +10C11;OLD TURKIC LETTER ORKHON AD;Lo;0;R;;;;;N;;;;; +10C12;OLD TURKIC LETTER YENISEI AD;Lo;0;R;;;;;N;;;;; +10C13;OLD TURKIC LETTER ORKHON AED;Lo;0;R;;;;;N;;;;; +10C14;OLD TURKIC LETTER ORKHON EZ;Lo;0;R;;;;;N;;;;; +10C15;OLD TURKIC LETTER YENISEI EZ;Lo;0;R;;;;;N;;;;; +10C16;OLD TURKIC LETTER ORKHON AY;Lo;0;R;;;;;N;;;;; +10C17;OLD TURKIC LETTER YENISEI AY;Lo;0;R;;;;;N;;;;; +10C18;OLD TURKIC LETTER ORKHON AEY;Lo;0;R;;;;;N;;;;; +10C19;OLD TURKIC LETTER YENISEI AEY;Lo;0;R;;;;;N;;;;; +10C1A;OLD TURKIC LETTER ORKHON AEK;Lo;0;R;;;;;N;;;;; +10C1B;OLD TURKIC LETTER YENISEI AEK;Lo;0;R;;;;;N;;;;; +10C1C;OLD TURKIC LETTER ORKHON OEK;Lo;0;R;;;;;N;;;;; +10C1D;OLD TURKIC LETTER YENISEI OEK;Lo;0;R;;;;;N;;;;; +10C1E;OLD TURKIC LETTER ORKHON AL;Lo;0;R;;;;;N;;;;; +10C1F;OLD TURKIC LETTER YENISEI AL;Lo;0;R;;;;;N;;;;; +10C20;OLD TURKIC LETTER ORKHON AEL;Lo;0;R;;;;;N;;;;; +10C21;OLD TURKIC LETTER ORKHON ELT;Lo;0;R;;;;;N;;;;; +10C22;OLD TURKIC LETTER ORKHON EM;Lo;0;R;;;;;N;;;;; +10C23;OLD TURKIC LETTER ORKHON AN;Lo;0;R;;;;;N;;;;; +10C24;OLD TURKIC LETTER ORKHON AEN;Lo;0;R;;;;;N;;;;; +10C25;OLD TURKIC LETTER YENISEI AEN;Lo;0;R;;;;;N;;;;; +10C26;OLD TURKIC LETTER ORKHON ENT;Lo;0;R;;;;;N;;;;; +10C27;OLD TURKIC LETTER YENISEI ENT;Lo;0;R;;;;;N;;;;; +10C28;OLD TURKIC LETTER ORKHON ENC;Lo;0;R;;;;;N;;;;; +10C29;OLD TURKIC LETTER YENISEI ENC;Lo;0;R;;;;;N;;;;; +10C2A;OLD TURKIC LETTER ORKHON ENY;Lo;0;R;;;;;N;;;;; +10C2B;OLD TURKIC LETTER YENISEI ENY;Lo;0;R;;;;;N;;;;; +10C2C;OLD TURKIC LETTER YENISEI ANG;Lo;0;R;;;;;N;;;;; +10C2D;OLD TURKIC LETTER ORKHON ENG;Lo;0;R;;;;;N;;;;; +10C2E;OLD TURKIC LETTER YENISEI AENG;Lo;0;R;;;;;N;;;;; +10C2F;OLD TURKIC LETTER ORKHON EP;Lo;0;R;;;;;N;;;;; +10C30;OLD TURKIC LETTER ORKHON OP;Lo;0;R;;;;;N;;;;; +10C31;OLD TURKIC LETTER ORKHON IC;Lo;0;R;;;;;N;;;;; +10C32;OLD TURKIC LETTER ORKHON EC;Lo;0;R;;;;;N;;;;; +10C33;OLD TURKIC LETTER YENISEI EC;Lo;0;R;;;;;N;;;;; +10C34;OLD TURKIC LETTER ORKHON AQ;Lo;0;R;;;;;N;;;;; +10C35;OLD TURKIC LETTER YENISEI AQ;Lo;0;R;;;;;N;;;;; +10C36;OLD TURKIC LETTER ORKHON IQ;Lo;0;R;;;;;N;;;;; +10C37;OLD TURKIC LETTER YENISEI IQ;Lo;0;R;;;;;N;;;;; +10C38;OLD TURKIC LETTER ORKHON OQ;Lo;0;R;;;;;N;;;;; +10C39;OLD TURKIC LETTER YENISEI OQ;Lo;0;R;;;;;N;;;;; +10C3A;OLD TURKIC LETTER ORKHON AR;Lo;0;R;;;;;N;;;;; +10C3B;OLD TURKIC LETTER YENISEI AR;Lo;0;R;;;;;N;;;;; +10C3C;OLD TURKIC LETTER ORKHON AER;Lo;0;R;;;;;N;;;;; +10C3D;OLD TURKIC LETTER ORKHON AS;Lo;0;R;;;;;N;;;;; +10C3E;OLD TURKIC LETTER ORKHON AES;Lo;0;R;;;;;N;;;;; +10C3F;OLD TURKIC LETTER ORKHON ASH;Lo;0;R;;;;;N;;;;; +10C40;OLD TURKIC LETTER YENISEI ASH;Lo;0;R;;;;;N;;;;; +10C41;OLD TURKIC LETTER ORKHON ESH;Lo;0;R;;;;;N;;;;; +10C42;OLD TURKIC LETTER YENISEI ESH;Lo;0;R;;;;;N;;;;; +10C43;OLD TURKIC LETTER ORKHON AT;Lo;0;R;;;;;N;;;;; +10C44;OLD TURKIC LETTER YENISEI AT;Lo;0;R;;;;;N;;;;; +10C45;OLD TURKIC LETTER ORKHON AET;Lo;0;R;;;;;N;;;;; +10C46;OLD TURKIC LETTER YENISEI AET;Lo;0;R;;;;;N;;;;; +10C47;OLD TURKIC LETTER ORKHON OT;Lo;0;R;;;;;N;;;;; +10C48;OLD TURKIC LETTER ORKHON BASH;Lo;0;R;;;;;N;;;;; +10C80;OLD HUNGARIAN CAPITAL LETTER A;Lu;0;R;;;;;N;;;;10CC0; +10C81;OLD HUNGARIAN CAPITAL LETTER AA;Lu;0;R;;;;;N;;;;10CC1; +10C82;OLD HUNGARIAN CAPITAL LETTER EB;Lu;0;R;;;;;N;;;;10CC2; +10C83;OLD HUNGARIAN CAPITAL LETTER AMB;Lu;0;R;;;;;N;;;;10CC3; +10C84;OLD HUNGARIAN CAPITAL LETTER EC;Lu;0;R;;;;;N;;;;10CC4; +10C85;OLD HUNGARIAN CAPITAL LETTER ENC;Lu;0;R;;;;;N;;;;10CC5; +10C86;OLD HUNGARIAN CAPITAL LETTER ECS;Lu;0;R;;;;;N;;;;10CC6; +10C87;OLD HUNGARIAN CAPITAL LETTER ED;Lu;0;R;;;;;N;;;;10CC7; +10C88;OLD HUNGARIAN CAPITAL LETTER AND;Lu;0;R;;;;;N;;;;10CC8; +10C89;OLD HUNGARIAN CAPITAL LETTER E;Lu;0;R;;;;;N;;;;10CC9; +10C8A;OLD HUNGARIAN CAPITAL LETTER CLOSE E;Lu;0;R;;;;;N;;;;10CCA; +10C8B;OLD HUNGARIAN CAPITAL LETTER EE;Lu;0;R;;;;;N;;;;10CCB; +10C8C;OLD HUNGARIAN CAPITAL LETTER EF;Lu;0;R;;;;;N;;;;10CCC; +10C8D;OLD HUNGARIAN CAPITAL LETTER EG;Lu;0;R;;;;;N;;;;10CCD; +10C8E;OLD HUNGARIAN CAPITAL LETTER EGY;Lu;0;R;;;;;N;;;;10CCE; +10C8F;OLD HUNGARIAN CAPITAL LETTER EH;Lu;0;R;;;;;N;;;;10CCF; +10C90;OLD HUNGARIAN CAPITAL LETTER I;Lu;0;R;;;;;N;;;;10CD0; +10C91;OLD HUNGARIAN CAPITAL LETTER II;Lu;0;R;;;;;N;;;;10CD1; +10C92;OLD HUNGARIAN CAPITAL LETTER EJ;Lu;0;R;;;;;N;;;;10CD2; +10C93;OLD HUNGARIAN CAPITAL LETTER EK;Lu;0;R;;;;;N;;;;10CD3; +10C94;OLD HUNGARIAN CAPITAL LETTER AK;Lu;0;R;;;;;N;;;;10CD4; +10C95;OLD HUNGARIAN CAPITAL LETTER UNK;Lu;0;R;;;;;N;;;;10CD5; +10C96;OLD HUNGARIAN CAPITAL LETTER EL;Lu;0;R;;;;;N;;;;10CD6; +10C97;OLD HUNGARIAN CAPITAL LETTER ELY;Lu;0;R;;;;;N;;;;10CD7; +10C98;OLD HUNGARIAN CAPITAL LETTER EM;Lu;0;R;;;;;N;;;;10CD8; +10C99;OLD HUNGARIAN CAPITAL LETTER EN;Lu;0;R;;;;;N;;;;10CD9; +10C9A;OLD HUNGARIAN CAPITAL LETTER ENY;Lu;0;R;;;;;N;;;;10CDA; +10C9B;OLD HUNGARIAN CAPITAL LETTER O;Lu;0;R;;;;;N;;;;10CDB; +10C9C;OLD HUNGARIAN CAPITAL LETTER OO;Lu;0;R;;;;;N;;;;10CDC; +10C9D;OLD HUNGARIAN CAPITAL LETTER NIKOLSBURG OE;Lu;0;R;;;;;N;;;;10CDD; +10C9E;OLD HUNGARIAN CAPITAL LETTER RUDIMENTA OE;Lu;0;R;;;;;N;;;;10CDE; +10C9F;OLD HUNGARIAN CAPITAL LETTER OEE;Lu;0;R;;;;;N;;;;10CDF; +10CA0;OLD HUNGARIAN CAPITAL LETTER EP;Lu;0;R;;;;;N;;;;10CE0; +10CA1;OLD HUNGARIAN CAPITAL LETTER EMP;Lu;0;R;;;;;N;;;;10CE1; +10CA2;OLD HUNGARIAN CAPITAL LETTER ER;Lu;0;R;;;;;N;;;;10CE2; +10CA3;OLD HUNGARIAN CAPITAL LETTER SHORT ER;Lu;0;R;;;;;N;;;;10CE3; +10CA4;OLD HUNGARIAN CAPITAL LETTER ES;Lu;0;R;;;;;N;;;;10CE4; +10CA5;OLD HUNGARIAN CAPITAL LETTER ESZ;Lu;0;R;;;;;N;;;;10CE5; +10CA6;OLD HUNGARIAN CAPITAL LETTER ET;Lu;0;R;;;;;N;;;;10CE6; +10CA7;OLD HUNGARIAN CAPITAL LETTER ENT;Lu;0;R;;;;;N;;;;10CE7; +10CA8;OLD HUNGARIAN CAPITAL LETTER ETY;Lu;0;R;;;;;N;;;;10CE8; +10CA9;OLD HUNGARIAN CAPITAL LETTER ECH;Lu;0;R;;;;;N;;;;10CE9; +10CAA;OLD HUNGARIAN CAPITAL LETTER U;Lu;0;R;;;;;N;;;;10CEA; +10CAB;OLD HUNGARIAN CAPITAL LETTER UU;Lu;0;R;;;;;N;;;;10CEB; +10CAC;OLD HUNGARIAN CAPITAL LETTER NIKOLSBURG UE;Lu;0;R;;;;;N;;;;10CEC; +10CAD;OLD HUNGARIAN CAPITAL LETTER RUDIMENTA UE;Lu;0;R;;;;;N;;;;10CED; +10CAE;OLD HUNGARIAN CAPITAL LETTER EV;Lu;0;R;;;;;N;;;;10CEE; +10CAF;OLD HUNGARIAN CAPITAL LETTER EZ;Lu;0;R;;;;;N;;;;10CEF; +10CB0;OLD HUNGARIAN CAPITAL LETTER EZS;Lu;0;R;;;;;N;;;;10CF0; +10CB1;OLD HUNGARIAN CAPITAL LETTER ENT-SHAPED SIGN;Lu;0;R;;;;;N;;;;10CF1; +10CB2;OLD HUNGARIAN CAPITAL LETTER US;Lu;0;R;;;;;N;;;;10CF2; +10CC0;OLD HUNGARIAN SMALL LETTER A;Ll;0;R;;;;;N;;;10C80;;10C80 +10CC1;OLD HUNGARIAN SMALL LETTER AA;Ll;0;R;;;;;N;;;10C81;;10C81 +10CC2;OLD HUNGARIAN SMALL LETTER EB;Ll;0;R;;;;;N;;;10C82;;10C82 +10CC3;OLD HUNGARIAN SMALL LETTER AMB;Ll;0;R;;;;;N;;;10C83;;10C83 +10CC4;OLD HUNGARIAN SMALL LETTER EC;Ll;0;R;;;;;N;;;10C84;;10C84 +10CC5;OLD HUNGARIAN SMALL LETTER ENC;Ll;0;R;;;;;N;;;10C85;;10C85 +10CC6;OLD HUNGARIAN SMALL LETTER ECS;Ll;0;R;;;;;N;;;10C86;;10C86 +10CC7;OLD HUNGARIAN SMALL LETTER ED;Ll;0;R;;;;;N;;;10C87;;10C87 +10CC8;OLD HUNGARIAN SMALL LETTER AND;Ll;0;R;;;;;N;;;10C88;;10C88 +10CC9;OLD HUNGARIAN SMALL LETTER E;Ll;0;R;;;;;N;;;10C89;;10C89 +10CCA;OLD HUNGARIAN SMALL LETTER CLOSE E;Ll;0;R;;;;;N;;;10C8A;;10C8A +10CCB;OLD HUNGARIAN SMALL LETTER EE;Ll;0;R;;;;;N;;;10C8B;;10C8B +10CCC;OLD HUNGARIAN SMALL LETTER EF;Ll;0;R;;;;;N;;;10C8C;;10C8C +10CCD;OLD HUNGARIAN SMALL LETTER EG;Ll;0;R;;;;;N;;;10C8D;;10C8D +10CCE;OLD HUNGARIAN SMALL LETTER EGY;Ll;0;R;;;;;N;;;10C8E;;10C8E +10CCF;OLD HUNGARIAN SMALL LETTER EH;Ll;0;R;;;;;N;;;10C8F;;10C8F +10CD0;OLD HUNGARIAN SMALL LETTER I;Ll;0;R;;;;;N;;;10C90;;10C90 +10CD1;OLD HUNGARIAN SMALL LETTER II;Ll;0;R;;;;;N;;;10C91;;10C91 +10CD2;OLD HUNGARIAN SMALL LETTER EJ;Ll;0;R;;;;;N;;;10C92;;10C92 +10CD3;OLD HUNGARIAN SMALL LETTER EK;Ll;0;R;;;;;N;;;10C93;;10C93 +10CD4;OLD HUNGARIAN SMALL LETTER AK;Ll;0;R;;;;;N;;;10C94;;10C94 +10CD5;OLD HUNGARIAN SMALL LETTER UNK;Ll;0;R;;;;;N;;;10C95;;10C95 +10CD6;OLD HUNGARIAN SMALL LETTER EL;Ll;0;R;;;;;N;;;10C96;;10C96 +10CD7;OLD HUNGARIAN SMALL LETTER ELY;Ll;0;R;;;;;N;;;10C97;;10C97 +10CD8;OLD HUNGARIAN SMALL LETTER EM;Ll;0;R;;;;;N;;;10C98;;10C98 +10CD9;OLD HUNGARIAN SMALL LETTER EN;Ll;0;R;;;;;N;;;10C99;;10C99 +10CDA;OLD HUNGARIAN SMALL LETTER ENY;Ll;0;R;;;;;N;;;10C9A;;10C9A +10CDB;OLD HUNGARIAN SMALL LETTER O;Ll;0;R;;;;;N;;;10C9B;;10C9B +10CDC;OLD HUNGARIAN SMALL LETTER OO;Ll;0;R;;;;;N;;;10C9C;;10C9C +10CDD;OLD HUNGARIAN SMALL LETTER NIKOLSBURG OE;Ll;0;R;;;;;N;;;10C9D;;10C9D +10CDE;OLD HUNGARIAN SMALL LETTER RUDIMENTA OE;Ll;0;R;;;;;N;;;10C9E;;10C9E +10CDF;OLD HUNGARIAN SMALL LETTER OEE;Ll;0;R;;;;;N;;;10C9F;;10C9F +10CE0;OLD HUNGARIAN SMALL LETTER EP;Ll;0;R;;;;;N;;;10CA0;;10CA0 +10CE1;OLD HUNGARIAN SMALL LETTER EMP;Ll;0;R;;;;;N;;;10CA1;;10CA1 +10CE2;OLD HUNGARIAN SMALL LETTER ER;Ll;0;R;;;;;N;;;10CA2;;10CA2 +10CE3;OLD HUNGARIAN SMALL LETTER SHORT ER;Ll;0;R;;;;;N;;;10CA3;;10CA3 +10CE4;OLD HUNGARIAN SMALL LETTER ES;Ll;0;R;;;;;N;;;10CA4;;10CA4 +10CE5;OLD HUNGARIAN SMALL LETTER ESZ;Ll;0;R;;;;;N;;;10CA5;;10CA5 +10CE6;OLD HUNGARIAN SMALL LETTER ET;Ll;0;R;;;;;N;;;10CA6;;10CA6 +10CE7;OLD HUNGARIAN SMALL LETTER ENT;Ll;0;R;;;;;N;;;10CA7;;10CA7 +10CE8;OLD HUNGARIAN SMALL LETTER ETY;Ll;0;R;;;;;N;;;10CA8;;10CA8 +10CE9;OLD HUNGARIAN SMALL LETTER ECH;Ll;0;R;;;;;N;;;10CA9;;10CA9 +10CEA;OLD HUNGARIAN SMALL LETTER U;Ll;0;R;;;;;N;;;10CAA;;10CAA +10CEB;OLD HUNGARIAN SMALL LETTER UU;Ll;0;R;;;;;N;;;10CAB;;10CAB +10CEC;OLD HUNGARIAN SMALL LETTER NIKOLSBURG UE;Ll;0;R;;;;;N;;;10CAC;;10CAC +10CED;OLD HUNGARIAN SMALL LETTER RUDIMENTA UE;Ll;0;R;;;;;N;;;10CAD;;10CAD +10CEE;OLD HUNGARIAN SMALL LETTER EV;Ll;0;R;;;;;N;;;10CAE;;10CAE +10CEF;OLD HUNGARIAN SMALL LETTER EZ;Ll;0;R;;;;;N;;;10CAF;;10CAF +10CF0;OLD HUNGARIAN SMALL LETTER EZS;Ll;0;R;;;;;N;;;10CB0;;10CB0 +10CF1;OLD HUNGARIAN SMALL LETTER ENT-SHAPED SIGN;Ll;0;R;;;;;N;;;10CB1;;10CB1 +10CF2;OLD HUNGARIAN SMALL LETTER US;Ll;0;R;;;;;N;;;10CB2;;10CB2 +10CFA;OLD HUNGARIAN NUMBER ONE;No;0;R;;;;1;N;;;;; +10CFB;OLD HUNGARIAN NUMBER FIVE;No;0;R;;;;5;N;;;;; +10CFC;OLD HUNGARIAN NUMBER TEN;No;0;R;;;;10;N;;;;; +10CFD;OLD HUNGARIAN NUMBER FIFTY;No;0;R;;;;50;N;;;;; +10CFE;OLD HUNGARIAN NUMBER ONE HUNDRED;No;0;R;;;;100;N;;;;; +10CFF;OLD HUNGARIAN NUMBER ONE THOUSAND;No;0;R;;;;1000;N;;;;; +10D00;HANIFI ROHINGYA LETTER A;Lo;0;AL;;;;;N;;;;; +10D01;HANIFI ROHINGYA LETTER BA;Lo;0;AL;;;;;N;;;;; +10D02;HANIFI ROHINGYA LETTER PA;Lo;0;AL;;;;;N;;;;; +10D03;HANIFI ROHINGYA LETTER TA;Lo;0;AL;;;;;N;;;;; +10D04;HANIFI ROHINGYA LETTER TTA;Lo;0;AL;;;;;N;;;;; +10D05;HANIFI ROHINGYA LETTER JA;Lo;0;AL;;;;;N;;;;; +10D06;HANIFI ROHINGYA LETTER CA;Lo;0;AL;;;;;N;;;;; +10D07;HANIFI ROHINGYA LETTER HA;Lo;0;AL;;;;;N;;;;; +10D08;HANIFI ROHINGYA LETTER KHA;Lo;0;AL;;;;;N;;;;; +10D09;HANIFI ROHINGYA LETTER FA;Lo;0;AL;;;;;N;;;;; +10D0A;HANIFI ROHINGYA LETTER DA;Lo;0;AL;;;;;N;;;;; +10D0B;HANIFI ROHINGYA LETTER DDA;Lo;0;AL;;;;;N;;;;; +10D0C;HANIFI ROHINGYA LETTER RA;Lo;0;AL;;;;;N;;;;; +10D0D;HANIFI ROHINGYA LETTER RRA;Lo;0;AL;;;;;N;;;;; +10D0E;HANIFI ROHINGYA LETTER ZA;Lo;0;AL;;;;;N;;;;; +10D0F;HANIFI ROHINGYA LETTER SA;Lo;0;AL;;;;;N;;;;; +10D10;HANIFI ROHINGYA LETTER SHA;Lo;0;AL;;;;;N;;;;; +10D11;HANIFI ROHINGYA LETTER KA;Lo;0;AL;;;;;N;;;;; +10D12;HANIFI ROHINGYA LETTER GA;Lo;0;AL;;;;;N;;;;; +10D13;HANIFI ROHINGYA LETTER LA;Lo;0;AL;;;;;N;;;;; +10D14;HANIFI ROHINGYA LETTER MA;Lo;0;AL;;;;;N;;;;; +10D15;HANIFI ROHINGYA LETTER NA;Lo;0;AL;;;;;N;;;;; +10D16;HANIFI ROHINGYA LETTER WA;Lo;0;AL;;;;;N;;;;; +10D17;HANIFI ROHINGYA LETTER KINNA WA;Lo;0;AL;;;;;N;;;;; +10D18;HANIFI ROHINGYA LETTER YA;Lo;0;AL;;;;;N;;;;; +10D19;HANIFI ROHINGYA LETTER KINNA YA;Lo;0;AL;;;;;N;;;;; +10D1A;HANIFI ROHINGYA LETTER NGA;Lo;0;AL;;;;;N;;;;; +10D1B;HANIFI ROHINGYA LETTER NYA;Lo;0;AL;;;;;N;;;;; +10D1C;HANIFI ROHINGYA LETTER VA;Lo;0;AL;;;;;N;;;;; +10D1D;HANIFI ROHINGYA VOWEL A;Lo;0;AL;;;;;N;;;;; +10D1E;HANIFI ROHINGYA VOWEL I;Lo;0;AL;;;;;N;;;;; +10D1F;HANIFI ROHINGYA VOWEL U;Lo;0;AL;;;;;N;;;;; +10D20;HANIFI ROHINGYA VOWEL E;Lo;0;AL;;;;;N;;;;; +10D21;HANIFI ROHINGYA VOWEL O;Lo;0;AL;;;;;N;;;;; +10D22;HANIFI ROHINGYA MARK SAKIN;Lo;0;AL;;;;;N;;;;; +10D23;HANIFI ROHINGYA MARK NA KHONNA;Lo;0;AL;;;;;N;;;;; +10D24;HANIFI ROHINGYA SIGN HARBAHAY;Mn;230;NSM;;;;;N;;;;; +10D25;HANIFI ROHINGYA SIGN TAHALA;Mn;230;NSM;;;;;N;;;;; +10D26;HANIFI ROHINGYA SIGN TANA;Mn;230;NSM;;;;;N;;;;; +10D27;HANIFI ROHINGYA SIGN TASSI;Mn;230;NSM;;;;;N;;;;; +10D30;HANIFI ROHINGYA DIGIT ZERO;Nd;0;AN;;0;0;0;N;;;;; +10D31;HANIFI ROHINGYA DIGIT ONE;Nd;0;AN;;1;1;1;N;;;;; +10D32;HANIFI ROHINGYA DIGIT TWO;Nd;0;AN;;2;2;2;N;;;;; +10D33;HANIFI ROHINGYA DIGIT THREE;Nd;0;AN;;3;3;3;N;;;;; +10D34;HANIFI ROHINGYA DIGIT FOUR;Nd;0;AN;;4;4;4;N;;;;; +10D35;HANIFI ROHINGYA DIGIT FIVE;Nd;0;AN;;5;5;5;N;;;;; +10D36;HANIFI ROHINGYA DIGIT SIX;Nd;0;AN;;6;6;6;N;;;;; +10D37;HANIFI ROHINGYA DIGIT SEVEN;Nd;0;AN;;7;7;7;N;;;;; +10D38;HANIFI ROHINGYA DIGIT EIGHT;Nd;0;AN;;8;8;8;N;;;;; +10D39;HANIFI ROHINGYA DIGIT NINE;Nd;0;AN;;9;9;9;N;;;;; +10E60;RUMI DIGIT ONE;No;0;AN;;;1;1;N;;;;; +10E61;RUMI DIGIT TWO;No;0;AN;;;2;2;N;;;;; +10E62;RUMI DIGIT THREE;No;0;AN;;;3;3;N;;;;; +10E63;RUMI DIGIT FOUR;No;0;AN;;;4;4;N;;;;; +10E64;RUMI DIGIT FIVE;No;0;AN;;;5;5;N;;;;; +10E65;RUMI DIGIT SIX;No;0;AN;;;6;6;N;;;;; +10E66;RUMI DIGIT SEVEN;No;0;AN;;;7;7;N;;;;; +10E67;RUMI DIGIT EIGHT;No;0;AN;;;8;8;N;;;;; +10E68;RUMI DIGIT NINE;No;0;AN;;;9;9;N;;;;; +10E69;RUMI NUMBER TEN;No;0;AN;;;;10;N;;;;; +10E6A;RUMI NUMBER TWENTY;No;0;AN;;;;20;N;;;;; +10E6B;RUMI NUMBER THIRTY;No;0;AN;;;;30;N;;;;; +10E6C;RUMI NUMBER FORTY;No;0;AN;;;;40;N;;;;; +10E6D;RUMI NUMBER FIFTY;No;0;AN;;;;50;N;;;;; +10E6E;RUMI NUMBER SIXTY;No;0;AN;;;;60;N;;;;; +10E6F;RUMI NUMBER SEVENTY;No;0;AN;;;;70;N;;;;; +10E70;RUMI NUMBER EIGHTY;No;0;AN;;;;80;N;;;;; +10E71;RUMI NUMBER NINETY;No;0;AN;;;;90;N;;;;; +10E72;RUMI NUMBER ONE HUNDRED;No;0;AN;;;;100;N;;;;; +10E73;RUMI NUMBER TWO HUNDRED;No;0;AN;;;;200;N;;;;; +10E74;RUMI NUMBER THREE HUNDRED;No;0;AN;;;;300;N;;;;; +10E75;RUMI NUMBER FOUR HUNDRED;No;0;AN;;;;400;N;;;;; +10E76;RUMI NUMBER FIVE HUNDRED;No;0;AN;;;;500;N;;;;; +10E77;RUMI NUMBER SIX HUNDRED;No;0;AN;;;;600;N;;;;; +10E78;RUMI NUMBER SEVEN HUNDRED;No;0;AN;;;;700;N;;;;; +10E79;RUMI NUMBER EIGHT HUNDRED;No;0;AN;;;;800;N;;;;; +10E7A;RUMI NUMBER NINE HUNDRED;No;0;AN;;;;900;N;;;;; +10E7B;RUMI FRACTION ONE HALF;No;0;AN;;;;1/2;N;;;;; +10E7C;RUMI FRACTION ONE QUARTER;No;0;AN;;;;1/4;N;;;;; +10E7D;RUMI FRACTION ONE THIRD;No;0;AN;;;;1/3;N;;;;; +10E7E;RUMI FRACTION TWO THIRDS;No;0;AN;;;;2/3;N;;;;; +10F00;OLD SOGDIAN LETTER ALEPH;Lo;0;R;;;;;N;;;;; +10F01;OLD SOGDIAN LETTER FINAL ALEPH;Lo;0;R;;;;;N;;;;; +10F02;OLD SOGDIAN LETTER BETH;Lo;0;R;;;;;N;;;;; +10F03;OLD SOGDIAN LETTER FINAL BETH;Lo;0;R;;;;;N;;;;; +10F04;OLD SOGDIAN LETTER GIMEL;Lo;0;R;;;;;N;;;;; +10F05;OLD SOGDIAN LETTER HE;Lo;0;R;;;;;N;;;;; +10F06;OLD SOGDIAN LETTER FINAL HE;Lo;0;R;;;;;N;;;;; +10F07;OLD SOGDIAN LETTER WAW;Lo;0;R;;;;;N;;;;; +10F08;OLD SOGDIAN LETTER ZAYIN;Lo;0;R;;;;;N;;;;; +10F09;OLD SOGDIAN LETTER HETH;Lo;0;R;;;;;N;;;;; +10F0A;OLD SOGDIAN LETTER YODH;Lo;0;R;;;;;N;;;;; +10F0B;OLD SOGDIAN LETTER KAPH;Lo;0;R;;;;;N;;;;; +10F0C;OLD SOGDIAN LETTER LAMEDH;Lo;0;R;;;;;N;;;;; +10F0D;OLD SOGDIAN LETTER MEM;Lo;0;R;;;;;N;;;;; +10F0E;OLD SOGDIAN LETTER NUN;Lo;0;R;;;;;N;;;;; +10F0F;OLD SOGDIAN LETTER FINAL NUN;Lo;0;R;;;;;N;;;;; +10F10;OLD SOGDIAN LETTER FINAL NUN WITH VERTICAL TAIL;Lo;0;R;;;;;N;;;;; +10F11;OLD SOGDIAN LETTER SAMEKH;Lo;0;R;;;;;N;;;;; +10F12;OLD SOGDIAN LETTER AYIN;Lo;0;R;;;;;N;;;;; +10F13;OLD SOGDIAN LETTER ALTERNATE AYIN;Lo;0;R;;;;;N;;;;; +10F14;OLD SOGDIAN LETTER PE;Lo;0;R;;;;;N;;;;; +10F15;OLD SOGDIAN LETTER SADHE;Lo;0;R;;;;;N;;;;; +10F16;OLD SOGDIAN LETTER FINAL SADHE;Lo;0;R;;;;;N;;;;; +10F17;OLD SOGDIAN LETTER FINAL SADHE WITH VERTICAL TAIL;Lo;0;R;;;;;N;;;;; +10F18;OLD SOGDIAN LETTER RESH-AYIN-DALETH;Lo;0;R;;;;;N;;;;; +10F19;OLD SOGDIAN LETTER SHIN;Lo;0;R;;;;;N;;;;; +10F1A;OLD SOGDIAN LETTER TAW;Lo;0;R;;;;;N;;;;; +10F1B;OLD SOGDIAN LETTER FINAL TAW;Lo;0;R;;;;;N;;;;; +10F1C;OLD SOGDIAN LETTER FINAL TAW WITH VERTICAL TAIL;Lo;0;R;;;;;N;;;;; +10F1D;OLD SOGDIAN NUMBER ONE;No;0;R;;;;1;N;;;;; +10F1E;OLD SOGDIAN NUMBER TWO;No;0;R;;;;2;N;;;;; +10F1F;OLD SOGDIAN NUMBER THREE;No;0;R;;;;3;N;;;;; +10F20;OLD SOGDIAN NUMBER FOUR;No;0;R;;;;4;N;;;;; +10F21;OLD SOGDIAN NUMBER FIVE;No;0;R;;;;5;N;;;;; +10F22;OLD SOGDIAN NUMBER TEN;No;0;R;;;;10;N;;;;; +10F23;OLD SOGDIAN NUMBER TWENTY;No;0;R;;;;20;N;;;;; +10F24;OLD SOGDIAN NUMBER THIRTY;No;0;R;;;;30;N;;;;; +10F25;OLD SOGDIAN NUMBER ONE HUNDRED;No;0;R;;;;100;N;;;;; +10F26;OLD SOGDIAN FRACTION ONE HALF;No;0;R;;;;1/2;N;;;;; +10F27;OLD SOGDIAN LIGATURE AYIN-DALETH;Lo;0;R;;;;;N;;;;; +10F30;SOGDIAN LETTER ALEPH;Lo;0;AL;;;;;N;;;;; +10F31;SOGDIAN LETTER BETH;Lo;0;AL;;;;;N;;;;; +10F32;SOGDIAN LETTER GIMEL;Lo;0;AL;;;;;N;;;;; +10F33;SOGDIAN LETTER HE;Lo;0;AL;;;;;N;;;;; +10F34;SOGDIAN LETTER WAW;Lo;0;AL;;;;;N;;;;; +10F35;SOGDIAN LETTER ZAYIN;Lo;0;AL;;;;;N;;;;; +10F36;SOGDIAN LETTER HETH;Lo;0;AL;;;;;N;;;;; +10F37;SOGDIAN LETTER YODH;Lo;0;AL;;;;;N;;;;; +10F38;SOGDIAN LETTER KAPH;Lo;0;AL;;;;;N;;;;; +10F39;SOGDIAN LETTER LAMEDH;Lo;0;AL;;;;;N;;;;; +10F3A;SOGDIAN LETTER MEM;Lo;0;AL;;;;;N;;;;; +10F3B;SOGDIAN LETTER NUN;Lo;0;AL;;;;;N;;;;; +10F3C;SOGDIAN LETTER SAMEKH;Lo;0;AL;;;;;N;;;;; +10F3D;SOGDIAN LETTER AYIN;Lo;0;AL;;;;;N;;;;; +10F3E;SOGDIAN LETTER PE;Lo;0;AL;;;;;N;;;;; +10F3F;SOGDIAN LETTER SADHE;Lo;0;AL;;;;;N;;;;; +10F40;SOGDIAN LETTER RESH-AYIN;Lo;0;AL;;;;;N;;;;; +10F41;SOGDIAN LETTER SHIN;Lo;0;AL;;;;;N;;;;; +10F42;SOGDIAN LETTER TAW;Lo;0;AL;;;;;N;;;;; +10F43;SOGDIAN LETTER FETH;Lo;0;AL;;;;;N;;;;; +10F44;SOGDIAN LETTER LESH;Lo;0;AL;;;;;N;;;;; +10F45;SOGDIAN INDEPENDENT SHIN;Lo;0;AL;;;;;N;;;;; +10F46;SOGDIAN COMBINING DOT BELOW;Mn;220;NSM;;;;;N;;;;; +10F47;SOGDIAN COMBINING TWO DOTS BELOW;Mn;220;NSM;;;;;N;;;;; +10F48;SOGDIAN COMBINING DOT ABOVE;Mn;230;NSM;;;;;N;;;;; +10F49;SOGDIAN COMBINING TWO DOTS ABOVE;Mn;230;NSM;;;;;N;;;;; +10F4A;SOGDIAN COMBINING CURVE ABOVE;Mn;230;NSM;;;;;N;;;;; +10F4B;SOGDIAN COMBINING CURVE BELOW;Mn;220;NSM;;;;;N;;;;; +10F4C;SOGDIAN COMBINING HOOK ABOVE;Mn;230;NSM;;;;;N;;;;; +10F4D;SOGDIAN COMBINING HOOK BELOW;Mn;220;NSM;;;;;N;;;;; +10F4E;SOGDIAN COMBINING LONG HOOK BELOW;Mn;220;NSM;;;;;N;;;;; +10F4F;SOGDIAN COMBINING RESH BELOW;Mn;220;NSM;;;;;N;;;;; +10F50;SOGDIAN COMBINING STROKE BELOW;Mn;220;NSM;;;;;N;;;;; +10F51;SOGDIAN NUMBER ONE;No;0;AL;;;;1;N;;;;; +10F52;SOGDIAN NUMBER TEN;No;0;AL;;;;10;N;;;;; +10F53;SOGDIAN NUMBER TWENTY;No;0;AL;;;;20;N;;;;; +10F54;SOGDIAN NUMBER ONE HUNDRED;No;0;AL;;;;100;N;;;;; +10F55;SOGDIAN PUNCTUATION TWO VERTICAL BARS;Po;0;AL;;;;;N;;;;; +10F56;SOGDIAN PUNCTUATION TWO VERTICAL BARS WITH DOTS;Po;0;AL;;;;;N;;;;; +10F57;SOGDIAN PUNCTUATION CIRCLE WITH DOT;Po;0;AL;;;;;N;;;;; +10F58;SOGDIAN PUNCTUATION TWO CIRCLES WITH DOTS;Po;0;AL;;;;;N;;;;; +10F59;SOGDIAN PUNCTUATION HALF CIRCLE WITH DOT;Po;0;AL;;;;;N;;;;; +10FE0;ELYMAIC LETTER ALEPH;Lo;0;R;;;;;N;;;;; +10FE1;ELYMAIC LETTER BETH;Lo;0;R;;;;;N;;;;; +10FE2;ELYMAIC LETTER GIMEL;Lo;0;R;;;;;N;;;;; +10FE3;ELYMAIC LETTER DALETH;Lo;0;R;;;;;N;;;;; +10FE4;ELYMAIC LETTER HE;Lo;0;R;;;;;N;;;;; +10FE5;ELYMAIC LETTER WAW;Lo;0;R;;;;;N;;;;; +10FE6;ELYMAIC LETTER ZAYIN;Lo;0;R;;;;;N;;;;; +10FE7;ELYMAIC LETTER HETH;Lo;0;R;;;;;N;;;;; +10FE8;ELYMAIC LETTER TETH;Lo;0;R;;;;;N;;;;; +10FE9;ELYMAIC LETTER YODH;Lo;0;R;;;;;N;;;;; +10FEA;ELYMAIC LETTER KAPH;Lo;0;R;;;;;N;;;;; +10FEB;ELYMAIC LETTER LAMEDH;Lo;0;R;;;;;N;;;;; +10FEC;ELYMAIC LETTER MEM;Lo;0;R;;;;;N;;;;; +10FED;ELYMAIC LETTER NUN;Lo;0;R;;;;;N;;;;; +10FEE;ELYMAIC LETTER SAMEKH;Lo;0;R;;;;;N;;;;; +10FEF;ELYMAIC LETTER AYIN;Lo;0;R;;;;;N;;;;; +10FF0;ELYMAIC LETTER PE;Lo;0;R;;;;;N;;;;; +10FF1;ELYMAIC LETTER SADHE;Lo;0;R;;;;;N;;;;; +10FF2;ELYMAIC LETTER QOPH;Lo;0;R;;;;;N;;;;; +10FF3;ELYMAIC LETTER RESH;Lo;0;R;;;;;N;;;;; +10FF4;ELYMAIC LETTER SHIN;Lo;0;R;;;;;N;;;;; +10FF5;ELYMAIC LETTER TAW;Lo;0;R;;;;;N;;;;; +10FF6;ELYMAIC LIGATURE ZAYIN-YODH;Lo;0;R;;;;;N;;;;; +11000;BRAHMI SIGN CANDRABINDU;Mc;0;L;;;;;N;;;;; +11001;BRAHMI SIGN ANUSVARA;Mn;0;NSM;;;;;N;;;;; +11002;BRAHMI SIGN VISARGA;Mc;0;L;;;;;N;;;;; +11003;BRAHMI SIGN JIHVAMULIYA;Lo;0;L;;;;;N;;;;; +11004;BRAHMI SIGN UPADHMANIYA;Lo;0;L;;;;;N;;;;; +11005;BRAHMI LETTER A;Lo;0;L;;;;;N;;;;; +11006;BRAHMI LETTER AA;Lo;0;L;;;;;N;;;;; +11007;BRAHMI LETTER I;Lo;0;L;;;;;N;;;;; +11008;BRAHMI LETTER II;Lo;0;L;;;;;N;;;;; +11009;BRAHMI LETTER U;Lo;0;L;;;;;N;;;;; +1100A;BRAHMI LETTER UU;Lo;0;L;;;;;N;;;;; +1100B;BRAHMI LETTER VOCALIC R;Lo;0;L;;;;;N;;;;; +1100C;BRAHMI LETTER VOCALIC RR;Lo;0;L;;;;;N;;;;; +1100D;BRAHMI LETTER VOCALIC L;Lo;0;L;;;;;N;;;;; +1100E;BRAHMI LETTER VOCALIC LL;Lo;0;L;;;;;N;;;;; +1100F;BRAHMI LETTER E;Lo;0;L;;;;;N;;;;; +11010;BRAHMI LETTER AI;Lo;0;L;;;;;N;;;;; +11011;BRAHMI LETTER O;Lo;0;L;;;;;N;;;;; +11012;BRAHMI LETTER AU;Lo;0;L;;;;;N;;;;; +11013;BRAHMI LETTER KA;Lo;0;L;;;;;N;;;;; +11014;BRAHMI LETTER KHA;Lo;0;L;;;;;N;;;;; +11015;BRAHMI LETTER GA;Lo;0;L;;;;;N;;;;; +11016;BRAHMI LETTER GHA;Lo;0;L;;;;;N;;;;; +11017;BRAHMI LETTER NGA;Lo;0;L;;;;;N;;;;; +11018;BRAHMI LETTER CA;Lo;0;L;;;;;N;;;;; +11019;BRAHMI LETTER CHA;Lo;0;L;;;;;N;;;;; +1101A;BRAHMI LETTER JA;Lo;0;L;;;;;N;;;;; +1101B;BRAHMI LETTER JHA;Lo;0;L;;;;;N;;;;; +1101C;BRAHMI LETTER NYA;Lo;0;L;;;;;N;;;;; +1101D;BRAHMI LETTER TTA;Lo;0;L;;;;;N;;;;; +1101E;BRAHMI LETTER TTHA;Lo;0;L;;;;;N;;;;; +1101F;BRAHMI LETTER DDA;Lo;0;L;;;;;N;;;;; +11020;BRAHMI LETTER DDHA;Lo;0;L;;;;;N;;;;; +11021;BRAHMI LETTER NNA;Lo;0;L;;;;;N;;;;; +11022;BRAHMI LETTER TA;Lo;0;L;;;;;N;;;;; +11023;BRAHMI LETTER THA;Lo;0;L;;;;;N;;;;; +11024;BRAHMI LETTER DA;Lo;0;L;;;;;N;;;;; +11025;BRAHMI LETTER DHA;Lo;0;L;;;;;N;;;;; +11026;BRAHMI LETTER NA;Lo;0;L;;;;;N;;;;; +11027;BRAHMI LETTER PA;Lo;0;L;;;;;N;;;;; +11028;BRAHMI LETTER PHA;Lo;0;L;;;;;N;;;;; +11029;BRAHMI LETTER BA;Lo;0;L;;;;;N;;;;; +1102A;BRAHMI LETTER BHA;Lo;0;L;;;;;N;;;;; +1102B;BRAHMI LETTER MA;Lo;0;L;;;;;N;;;;; +1102C;BRAHMI LETTER YA;Lo;0;L;;;;;N;;;;; +1102D;BRAHMI LETTER RA;Lo;0;L;;;;;N;;;;; +1102E;BRAHMI LETTER LA;Lo;0;L;;;;;N;;;;; +1102F;BRAHMI LETTER VA;Lo;0;L;;;;;N;;;;; +11030;BRAHMI LETTER SHA;Lo;0;L;;;;;N;;;;; +11031;BRAHMI LETTER SSA;Lo;0;L;;;;;N;;;;; +11032;BRAHMI LETTER SA;Lo;0;L;;;;;N;;;;; +11033;BRAHMI LETTER HA;Lo;0;L;;;;;N;;;;; +11034;BRAHMI LETTER LLA;Lo;0;L;;;;;N;;;;; +11035;BRAHMI LETTER OLD TAMIL LLLA;Lo;0;L;;;;;N;;;;; +11036;BRAHMI LETTER OLD TAMIL RRA;Lo;0;L;;;;;N;;;;; +11037;BRAHMI LETTER OLD TAMIL NNNA;Lo;0;L;;;;;N;;;;; +11038;BRAHMI VOWEL SIGN AA;Mn;0;NSM;;;;;N;;;;; +11039;BRAHMI VOWEL SIGN BHATTIPROLU AA;Mn;0;NSM;;;;;N;;;;; +1103A;BRAHMI VOWEL SIGN I;Mn;0;NSM;;;;;N;;;;; +1103B;BRAHMI VOWEL SIGN II;Mn;0;NSM;;;;;N;;;;; +1103C;BRAHMI VOWEL SIGN U;Mn;0;NSM;;;;;N;;;;; +1103D;BRAHMI VOWEL SIGN UU;Mn;0;NSM;;;;;N;;;;; +1103E;BRAHMI VOWEL SIGN VOCALIC R;Mn;0;NSM;;;;;N;;;;; +1103F;BRAHMI VOWEL SIGN VOCALIC RR;Mn;0;NSM;;;;;N;;;;; +11040;BRAHMI VOWEL SIGN VOCALIC L;Mn;0;NSM;;;;;N;;;;; +11041;BRAHMI VOWEL SIGN VOCALIC LL;Mn;0;NSM;;;;;N;;;;; +11042;BRAHMI VOWEL SIGN E;Mn;0;NSM;;;;;N;;;;; +11043;BRAHMI VOWEL SIGN AI;Mn;0;NSM;;;;;N;;;;; +11044;BRAHMI VOWEL SIGN O;Mn;0;NSM;;;;;N;;;;; +11045;BRAHMI VOWEL SIGN AU;Mn;0;NSM;;;;;N;;;;; +11046;BRAHMI VIRAMA;Mn;9;NSM;;;;;N;;;;; +11047;BRAHMI DANDA;Po;0;L;;;;;N;;;;; +11048;BRAHMI DOUBLE DANDA;Po;0;L;;;;;N;;;;; +11049;BRAHMI PUNCTUATION DOT;Po;0;L;;;;;N;;;;; +1104A;BRAHMI PUNCTUATION DOUBLE DOT;Po;0;L;;;;;N;;;;; +1104B;BRAHMI PUNCTUATION LINE;Po;0;L;;;;;N;;;;; +1104C;BRAHMI PUNCTUATION CRESCENT BAR;Po;0;L;;;;;N;;;;; +1104D;BRAHMI PUNCTUATION LOTUS;Po;0;L;;;;;N;;;;; +11052;BRAHMI NUMBER ONE;No;0;ON;;;1;1;N;;;;; +11053;BRAHMI NUMBER TWO;No;0;ON;;;2;2;N;;;;; +11054;BRAHMI NUMBER THREE;No;0;ON;;;3;3;N;;;;; +11055;BRAHMI NUMBER FOUR;No;0;ON;;;4;4;N;;;;; +11056;BRAHMI NUMBER FIVE;No;0;ON;;;5;5;N;;;;; +11057;BRAHMI NUMBER SIX;No;0;ON;;;6;6;N;;;;; +11058;BRAHMI NUMBER SEVEN;No;0;ON;;;7;7;N;;;;; +11059;BRAHMI NUMBER EIGHT;No;0;ON;;;8;8;N;;;;; +1105A;BRAHMI NUMBER NINE;No;0;ON;;;9;9;N;;;;; +1105B;BRAHMI NUMBER TEN;No;0;ON;;;;10;N;;;;; +1105C;BRAHMI NUMBER TWENTY;No;0;ON;;;;20;N;;;;; +1105D;BRAHMI NUMBER THIRTY;No;0;ON;;;;30;N;;;;; +1105E;BRAHMI NUMBER FORTY;No;0;ON;;;;40;N;;;;; +1105F;BRAHMI NUMBER FIFTY;No;0;ON;;;;50;N;;;;; +11060;BRAHMI NUMBER SIXTY;No;0;ON;;;;60;N;;;;; +11061;BRAHMI NUMBER SEVENTY;No;0;ON;;;;70;N;;;;; +11062;BRAHMI NUMBER EIGHTY;No;0;ON;;;;80;N;;;;; +11063;BRAHMI NUMBER NINETY;No;0;ON;;;;90;N;;;;; +11064;BRAHMI NUMBER ONE HUNDRED;No;0;ON;;;;100;N;;;;; +11065;BRAHMI NUMBER ONE THOUSAND;No;0;ON;;;;1000;N;;;;; +11066;BRAHMI DIGIT ZERO;Nd;0;L;;0;0;0;N;;;;; +11067;BRAHMI DIGIT ONE;Nd;0;L;;1;1;1;N;;;;; +11068;BRAHMI DIGIT TWO;Nd;0;L;;2;2;2;N;;;;; +11069;BRAHMI DIGIT THREE;Nd;0;L;;3;3;3;N;;;;; +1106A;BRAHMI DIGIT FOUR;Nd;0;L;;4;4;4;N;;;;; +1106B;BRAHMI DIGIT FIVE;Nd;0;L;;5;5;5;N;;;;; +1106C;BRAHMI DIGIT SIX;Nd;0;L;;6;6;6;N;;;;; +1106D;BRAHMI DIGIT SEVEN;Nd;0;L;;7;7;7;N;;;;; +1106E;BRAHMI DIGIT EIGHT;Nd;0;L;;8;8;8;N;;;;; +1106F;BRAHMI DIGIT NINE;Nd;0;L;;9;9;9;N;;;;; +1107F;BRAHMI NUMBER JOINER;Mn;9;NSM;;;;;N;;;;; +11080;KAITHI SIGN CANDRABINDU;Mn;0;NSM;;;;;N;;;;; +11081;KAITHI SIGN ANUSVARA;Mn;0;NSM;;;;;N;;;;; +11082;KAITHI SIGN VISARGA;Mc;0;L;;;;;N;;;;; +11083;KAITHI LETTER A;Lo;0;L;;;;;N;;;;; +11084;KAITHI LETTER AA;Lo;0;L;;;;;N;;;;; +11085;KAITHI LETTER I;Lo;0;L;;;;;N;;;;; +11086;KAITHI LETTER II;Lo;0;L;;;;;N;;;;; +11087;KAITHI LETTER U;Lo;0;L;;;;;N;;;;; +11088;KAITHI LETTER UU;Lo;0;L;;;;;N;;;;; +11089;KAITHI LETTER E;Lo;0;L;;;;;N;;;;; +1108A;KAITHI LETTER AI;Lo;0;L;;;;;N;;;;; +1108B;KAITHI LETTER O;Lo;0;L;;;;;N;;;;; +1108C;KAITHI LETTER AU;Lo;0;L;;;;;N;;;;; +1108D;KAITHI LETTER KA;Lo;0;L;;;;;N;;;;; +1108E;KAITHI LETTER KHA;Lo;0;L;;;;;N;;;;; +1108F;KAITHI LETTER GA;Lo;0;L;;;;;N;;;;; +11090;KAITHI LETTER GHA;Lo;0;L;;;;;N;;;;; +11091;KAITHI LETTER NGA;Lo;0;L;;;;;N;;;;; +11092;KAITHI LETTER CA;Lo;0;L;;;;;N;;;;; +11093;KAITHI LETTER CHA;Lo;0;L;;;;;N;;;;; +11094;KAITHI LETTER JA;Lo;0;L;;;;;N;;;;; +11095;KAITHI LETTER JHA;Lo;0;L;;;;;N;;;;; +11096;KAITHI LETTER NYA;Lo;0;L;;;;;N;;;;; +11097;KAITHI LETTER TTA;Lo;0;L;;;;;N;;;;; +11098;KAITHI LETTER TTHA;Lo;0;L;;;;;N;;;;; +11099;KAITHI LETTER DDA;Lo;0;L;;;;;N;;;;; +1109A;KAITHI LETTER DDDHA;Lo;0;L;11099 110BA;;;;N;;;;; +1109B;KAITHI LETTER DDHA;Lo;0;L;;;;;N;;;;; +1109C;KAITHI LETTER RHA;Lo;0;L;1109B 110BA;;;;N;;;;; +1109D;KAITHI LETTER NNA;Lo;0;L;;;;;N;;;;; +1109E;KAITHI LETTER TA;Lo;0;L;;;;;N;;;;; +1109F;KAITHI LETTER THA;Lo;0;L;;;;;N;;;;; +110A0;KAITHI LETTER DA;Lo;0;L;;;;;N;;;;; +110A1;KAITHI LETTER DHA;Lo;0;L;;;;;N;;;;; +110A2;KAITHI LETTER NA;Lo;0;L;;;;;N;;;;; +110A3;KAITHI LETTER PA;Lo;0;L;;;;;N;;;;; +110A4;KAITHI LETTER PHA;Lo;0;L;;;;;N;;;;; +110A5;KAITHI LETTER BA;Lo;0;L;;;;;N;;;;; +110A6;KAITHI LETTER BHA;Lo;0;L;;;;;N;;;;; +110A7;KAITHI LETTER MA;Lo;0;L;;;;;N;;;;; +110A8;KAITHI LETTER YA;Lo;0;L;;;;;N;;;;; +110A9;KAITHI LETTER RA;Lo;0;L;;;;;N;;;;; +110AA;KAITHI LETTER LA;Lo;0;L;;;;;N;;;;; +110AB;KAITHI LETTER VA;Lo;0;L;110A5 110BA;;;;N;;;;; +110AC;KAITHI LETTER SHA;Lo;0;L;;;;;N;;;;; +110AD;KAITHI LETTER SSA;Lo;0;L;;;;;N;;;;; +110AE;KAITHI LETTER SA;Lo;0;L;;;;;N;;;;; +110AF;KAITHI LETTER HA;Lo;0;L;;;;;N;;;;; +110B0;KAITHI VOWEL SIGN AA;Mc;0;L;;;;;N;;;;; +110B1;KAITHI VOWEL SIGN I;Mc;0;L;;;;;N;;;;; +110B2;KAITHI VOWEL SIGN II;Mc;0;L;;;;;N;;;;; +110B3;KAITHI VOWEL SIGN U;Mn;0;NSM;;;;;N;;;;; +110B4;KAITHI VOWEL SIGN UU;Mn;0;NSM;;;;;N;;;;; +110B5;KAITHI VOWEL SIGN E;Mn;0;NSM;;;;;N;;;;; +110B6;KAITHI VOWEL SIGN AI;Mn;0;NSM;;;;;N;;;;; +110B7;KAITHI VOWEL SIGN O;Mc;0;L;;;;;N;;;;; +110B8;KAITHI VOWEL SIGN AU;Mc;0;L;;;;;N;;;;; +110B9;KAITHI SIGN VIRAMA;Mn;9;NSM;;;;;N;;;;; +110BA;KAITHI SIGN NUKTA;Mn;7;NSM;;;;;N;;;;; +110BB;KAITHI ABBREVIATION SIGN;Po;0;L;;;;;N;;;;; +110BC;KAITHI ENUMERATION SIGN;Po;0;L;;;;;N;;;;; +110BD;KAITHI NUMBER SIGN;Cf;0;L;;;;;N;;;;; +110BE;KAITHI SECTION MARK;Po;0;L;;;;;N;;;;; +110BF;KAITHI DOUBLE SECTION MARK;Po;0;L;;;;;N;;;;; +110C0;KAITHI DANDA;Po;0;L;;;;;N;;;;; +110C1;KAITHI DOUBLE DANDA;Po;0;L;;;;;N;;;;; +110CD;KAITHI NUMBER SIGN ABOVE;Cf;0;L;;;;;N;;;;; +110D0;SORA SOMPENG LETTER SAH;Lo;0;L;;;;;N;;;;; +110D1;SORA SOMPENG LETTER TAH;Lo;0;L;;;;;N;;;;; +110D2;SORA SOMPENG LETTER BAH;Lo;0;L;;;;;N;;;;; +110D3;SORA SOMPENG LETTER CAH;Lo;0;L;;;;;N;;;;; +110D4;SORA SOMPENG LETTER DAH;Lo;0;L;;;;;N;;;;; +110D5;SORA SOMPENG LETTER GAH;Lo;0;L;;;;;N;;;;; +110D6;SORA SOMPENG LETTER MAH;Lo;0;L;;;;;N;;;;; +110D7;SORA SOMPENG LETTER NGAH;Lo;0;L;;;;;N;;;;; +110D8;SORA SOMPENG LETTER LAH;Lo;0;L;;;;;N;;;;; +110D9;SORA SOMPENG LETTER NAH;Lo;0;L;;;;;N;;;;; +110DA;SORA SOMPENG LETTER VAH;Lo;0;L;;;;;N;;;;; +110DB;SORA SOMPENG LETTER PAH;Lo;0;L;;;;;N;;;;; +110DC;SORA SOMPENG LETTER YAH;Lo;0;L;;;;;N;;;;; +110DD;SORA SOMPENG LETTER RAH;Lo;0;L;;;;;N;;;;; +110DE;SORA SOMPENG LETTER HAH;Lo;0;L;;;;;N;;;;; +110DF;SORA SOMPENG LETTER KAH;Lo;0;L;;;;;N;;;;; +110E0;SORA SOMPENG LETTER JAH;Lo;0;L;;;;;N;;;;; +110E1;SORA SOMPENG LETTER NYAH;Lo;0;L;;;;;N;;;;; +110E2;SORA SOMPENG LETTER AH;Lo;0;L;;;;;N;;;;; +110E3;SORA SOMPENG LETTER EEH;Lo;0;L;;;;;N;;;;; +110E4;SORA SOMPENG LETTER IH;Lo;0;L;;;;;N;;;;; +110E5;SORA SOMPENG LETTER UH;Lo;0;L;;;;;N;;;;; +110E6;SORA SOMPENG LETTER OH;Lo;0;L;;;;;N;;;;; +110E7;SORA SOMPENG LETTER EH;Lo;0;L;;;;;N;;;;; +110E8;SORA SOMPENG LETTER MAE;Lo;0;L;;;;;N;;;;; +110F0;SORA SOMPENG DIGIT ZERO;Nd;0;L;;0;0;0;N;;;;; +110F1;SORA SOMPENG DIGIT ONE;Nd;0;L;;1;1;1;N;;;;; +110F2;SORA SOMPENG DIGIT TWO;Nd;0;L;;2;2;2;N;;;;; +110F3;SORA SOMPENG DIGIT THREE;Nd;0;L;;3;3;3;N;;;;; +110F4;SORA SOMPENG DIGIT FOUR;Nd;0;L;;4;4;4;N;;;;; +110F5;SORA SOMPENG DIGIT FIVE;Nd;0;L;;5;5;5;N;;;;; +110F6;SORA SOMPENG DIGIT SIX;Nd;0;L;;6;6;6;N;;;;; +110F7;SORA SOMPENG DIGIT SEVEN;Nd;0;L;;7;7;7;N;;;;; +110F8;SORA SOMPENG DIGIT EIGHT;Nd;0;L;;8;8;8;N;;;;; +110F9;SORA SOMPENG DIGIT NINE;Nd;0;L;;9;9;9;N;;;;; +11100;CHAKMA SIGN CANDRABINDU;Mn;230;NSM;;;;;N;;;;; +11101;CHAKMA SIGN ANUSVARA;Mn;230;NSM;;;;;N;;;;; +11102;CHAKMA SIGN VISARGA;Mn;230;NSM;;;;;N;;;;; +11103;CHAKMA LETTER AA;Lo;0;L;;;;;N;;;;; +11104;CHAKMA LETTER I;Lo;0;L;;;;;N;;;;; +11105;CHAKMA LETTER U;Lo;0;L;;;;;N;;;;; +11106;CHAKMA LETTER E;Lo;0;L;;;;;N;;;;; +11107;CHAKMA LETTER KAA;Lo;0;L;;;;;N;;;;; +11108;CHAKMA LETTER KHAA;Lo;0;L;;;;;N;;;;; +11109;CHAKMA LETTER GAA;Lo;0;L;;;;;N;;;;; +1110A;CHAKMA LETTER GHAA;Lo;0;L;;;;;N;;;;; +1110B;CHAKMA LETTER NGAA;Lo;0;L;;;;;N;;;;; +1110C;CHAKMA LETTER CAA;Lo;0;L;;;;;N;;;;; +1110D;CHAKMA LETTER CHAA;Lo;0;L;;;;;N;;;;; +1110E;CHAKMA LETTER JAA;Lo;0;L;;;;;N;;;;; +1110F;CHAKMA LETTER JHAA;Lo;0;L;;;;;N;;;;; +11110;CHAKMA LETTER NYAA;Lo;0;L;;;;;N;;;;; +11111;CHAKMA LETTER TTAA;Lo;0;L;;;;;N;;;;; +11112;CHAKMA LETTER TTHAA;Lo;0;L;;;;;N;;;;; +11113;CHAKMA LETTER DDAA;Lo;0;L;;;;;N;;;;; +11114;CHAKMA LETTER DDHAA;Lo;0;L;;;;;N;;;;; +11115;CHAKMA LETTER NNAA;Lo;0;L;;;;;N;;;;; +11116;CHAKMA LETTER TAA;Lo;0;L;;;;;N;;;;; +11117;CHAKMA LETTER THAA;Lo;0;L;;;;;N;;;;; +11118;CHAKMA LETTER DAA;Lo;0;L;;;;;N;;;;; +11119;CHAKMA LETTER DHAA;Lo;0;L;;;;;N;;;;; +1111A;CHAKMA LETTER NAA;Lo;0;L;;;;;N;;;;; +1111B;CHAKMA LETTER PAA;Lo;0;L;;;;;N;;;;; +1111C;CHAKMA LETTER PHAA;Lo;0;L;;;;;N;;;;; +1111D;CHAKMA LETTER BAA;Lo;0;L;;;;;N;;;;; +1111E;CHAKMA LETTER BHAA;Lo;0;L;;;;;N;;;;; +1111F;CHAKMA LETTER MAA;Lo;0;L;;;;;N;;;;; +11120;CHAKMA LETTER YYAA;Lo;0;L;;;;;N;;;;; +11121;CHAKMA LETTER YAA;Lo;0;L;;;;;N;;;;; +11122;CHAKMA LETTER RAA;Lo;0;L;;;;;N;;;;; +11123;CHAKMA LETTER LAA;Lo;0;L;;;;;N;;;;; +11124;CHAKMA LETTER WAA;Lo;0;L;;;;;N;;;;; +11125;CHAKMA LETTER SAA;Lo;0;L;;;;;N;;;;; +11126;CHAKMA LETTER HAA;Lo;0;L;;;;;N;;;;; +11127;CHAKMA VOWEL SIGN A;Mn;0;NSM;;;;;N;;;;; +11128;CHAKMA VOWEL SIGN I;Mn;0;NSM;;;;;N;;;;; +11129;CHAKMA VOWEL SIGN II;Mn;0;NSM;;;;;N;;;;; +1112A;CHAKMA VOWEL SIGN U;Mn;0;NSM;;;;;N;;;;; +1112B;CHAKMA VOWEL SIGN UU;Mn;0;NSM;;;;;N;;;;; +1112C;CHAKMA VOWEL SIGN E;Mc;0;L;;;;;N;;;;; +1112D;CHAKMA VOWEL SIGN AI;Mn;0;NSM;;;;;N;;;;; +1112E;CHAKMA VOWEL SIGN O;Mn;0;NSM;11131 11127;;;;N;;;;; +1112F;CHAKMA VOWEL SIGN AU;Mn;0;NSM;11132 11127;;;;N;;;;; +11130;CHAKMA VOWEL SIGN OI;Mn;0;NSM;;;;;N;;;;; +11131;CHAKMA O MARK;Mn;0;NSM;;;;;N;;;;; +11132;CHAKMA AU MARK;Mn;0;NSM;;;;;N;;;;; +11133;CHAKMA VIRAMA;Mn;9;NSM;;;;;N;;;;; +11134;CHAKMA MAAYYAA;Mn;9;NSM;;;;;N;;;;; +11136;CHAKMA DIGIT ZERO;Nd;0;L;;0;0;0;N;;;;; +11137;CHAKMA DIGIT ONE;Nd;0;L;;1;1;1;N;;;;; +11138;CHAKMA DIGIT TWO;Nd;0;L;;2;2;2;N;;;;; +11139;CHAKMA DIGIT THREE;Nd;0;L;;3;3;3;N;;;;; +1113A;CHAKMA DIGIT FOUR;Nd;0;L;;4;4;4;N;;;;; +1113B;CHAKMA DIGIT FIVE;Nd;0;L;;5;5;5;N;;;;; +1113C;CHAKMA DIGIT SIX;Nd;0;L;;6;6;6;N;;;;; +1113D;CHAKMA DIGIT SEVEN;Nd;0;L;;7;7;7;N;;;;; +1113E;CHAKMA DIGIT EIGHT;Nd;0;L;;8;8;8;N;;;;; +1113F;CHAKMA DIGIT NINE;Nd;0;L;;9;9;9;N;;;;; +11140;CHAKMA SECTION MARK;Po;0;L;;;;;N;;;;; +11141;CHAKMA DANDA;Po;0;L;;;;;N;;;;; +11142;CHAKMA DOUBLE DANDA;Po;0;L;;;;;N;;;;; +11143;CHAKMA QUESTION MARK;Po;0;L;;;;;N;;;;; +11144;CHAKMA LETTER LHAA;Lo;0;L;;;;;N;;;;; +11145;CHAKMA VOWEL SIGN AA;Mc;0;L;;;;;N;;;;; +11146;CHAKMA VOWEL SIGN EI;Mc;0;L;;;;;N;;;;; +11150;MAHAJANI LETTER A;Lo;0;L;;;;;N;;;;; +11151;MAHAJANI LETTER I;Lo;0;L;;;;;N;;;;; +11152;MAHAJANI LETTER U;Lo;0;L;;;;;N;;;;; +11153;MAHAJANI LETTER E;Lo;0;L;;;;;N;;;;; +11154;MAHAJANI LETTER O;Lo;0;L;;;;;N;;;;; +11155;MAHAJANI LETTER KA;Lo;0;L;;;;;N;;;;; +11156;MAHAJANI LETTER KHA;Lo;0;L;;;;;N;;;;; +11157;MAHAJANI LETTER GA;Lo;0;L;;;;;N;;;;; +11158;MAHAJANI LETTER GHA;Lo;0;L;;;;;N;;;;; +11159;MAHAJANI LETTER CA;Lo;0;L;;;;;N;;;;; +1115A;MAHAJANI LETTER CHA;Lo;0;L;;;;;N;;;;; +1115B;MAHAJANI LETTER JA;Lo;0;L;;;;;N;;;;; +1115C;MAHAJANI LETTER JHA;Lo;0;L;;;;;N;;;;; +1115D;MAHAJANI LETTER NYA;Lo;0;L;;;;;N;;;;; +1115E;MAHAJANI LETTER TTA;Lo;0;L;;;;;N;;;;; +1115F;MAHAJANI LETTER TTHA;Lo;0;L;;;;;N;;;;; +11160;MAHAJANI LETTER DDA;Lo;0;L;;;;;N;;;;; +11161;MAHAJANI LETTER DDHA;Lo;0;L;;;;;N;;;;; +11162;MAHAJANI LETTER NNA;Lo;0;L;;;;;N;;;;; +11163;MAHAJANI LETTER TA;Lo;0;L;;;;;N;;;;; +11164;MAHAJANI LETTER THA;Lo;0;L;;;;;N;;;;; +11165;MAHAJANI LETTER DA;Lo;0;L;;;;;N;;;;; +11166;MAHAJANI LETTER DHA;Lo;0;L;;;;;N;;;;; +11167;MAHAJANI LETTER NA;Lo;0;L;;;;;N;;;;; +11168;MAHAJANI LETTER PA;Lo;0;L;;;;;N;;;;; +11169;MAHAJANI LETTER PHA;Lo;0;L;;;;;N;;;;; +1116A;MAHAJANI LETTER BA;Lo;0;L;;;;;N;;;;; +1116B;MAHAJANI LETTER BHA;Lo;0;L;;;;;N;;;;; +1116C;MAHAJANI LETTER MA;Lo;0;L;;;;;N;;;;; +1116D;MAHAJANI LETTER RA;Lo;0;L;;;;;N;;;;; +1116E;MAHAJANI LETTER LA;Lo;0;L;;;;;N;;;;; +1116F;MAHAJANI LETTER VA;Lo;0;L;;;;;N;;;;; +11170;MAHAJANI LETTER SA;Lo;0;L;;;;;N;;;;; +11171;MAHAJANI LETTER HA;Lo;0;L;;;;;N;;;;; +11172;MAHAJANI LETTER RRA;Lo;0;L;;;;;N;;;;; +11173;MAHAJANI SIGN NUKTA;Mn;7;NSM;;;;;N;;;;; +11174;MAHAJANI ABBREVIATION SIGN;Po;0;L;;;;;N;;;;; +11175;MAHAJANI SECTION MARK;Po;0;L;;;;;N;;;;; +11176;MAHAJANI LIGATURE SHRI;Lo;0;L;;;;;N;;;;; +11180;SHARADA SIGN CANDRABINDU;Mn;0;NSM;;;;;N;;;;; +11181;SHARADA SIGN ANUSVARA;Mn;0;NSM;;;;;N;;;;; +11182;SHARADA SIGN VISARGA;Mc;0;L;;;;;N;;;;; +11183;SHARADA LETTER A;Lo;0;L;;;;;N;;;;; +11184;SHARADA LETTER AA;Lo;0;L;;;;;N;;;;; +11185;SHARADA LETTER I;Lo;0;L;;;;;N;;;;; +11186;SHARADA LETTER II;Lo;0;L;;;;;N;;;;; +11187;SHARADA LETTER U;Lo;0;L;;;;;N;;;;; +11188;SHARADA LETTER UU;Lo;0;L;;;;;N;;;;; +11189;SHARADA LETTER VOCALIC R;Lo;0;L;;;;;N;;;;; +1118A;SHARADA LETTER VOCALIC RR;Lo;0;L;;;;;N;;;;; +1118B;SHARADA LETTER VOCALIC L;Lo;0;L;;;;;N;;;;; +1118C;SHARADA LETTER VOCALIC LL;Lo;0;L;;;;;N;;;;; +1118D;SHARADA LETTER E;Lo;0;L;;;;;N;;;;; +1118E;SHARADA LETTER AI;Lo;0;L;;;;;N;;;;; +1118F;SHARADA LETTER O;Lo;0;L;;;;;N;;;;; +11190;SHARADA LETTER AU;Lo;0;L;;;;;N;;;;; +11191;SHARADA LETTER KA;Lo;0;L;;;;;N;;;;; +11192;SHARADA LETTER KHA;Lo;0;L;;;;;N;;;;; +11193;SHARADA LETTER GA;Lo;0;L;;;;;N;;;;; +11194;SHARADA LETTER GHA;Lo;0;L;;;;;N;;;;; +11195;SHARADA LETTER NGA;Lo;0;L;;;;;N;;;;; +11196;SHARADA LETTER CA;Lo;0;L;;;;;N;;;;; +11197;SHARADA LETTER CHA;Lo;0;L;;;;;N;;;;; +11198;SHARADA LETTER JA;Lo;0;L;;;;;N;;;;; +11199;SHARADA LETTER JHA;Lo;0;L;;;;;N;;;;; +1119A;SHARADA LETTER NYA;Lo;0;L;;;;;N;;;;; +1119B;SHARADA LETTER TTA;Lo;0;L;;;;;N;;;;; +1119C;SHARADA LETTER TTHA;Lo;0;L;;;;;N;;;;; +1119D;SHARADA LETTER DDA;Lo;0;L;;;;;N;;;;; +1119E;SHARADA LETTER DDHA;Lo;0;L;;;;;N;;;;; +1119F;SHARADA LETTER NNA;Lo;0;L;;;;;N;;;;; +111A0;SHARADA LETTER TA;Lo;0;L;;;;;N;;;;; +111A1;SHARADA LETTER THA;Lo;0;L;;;;;N;;;;; +111A2;SHARADA LETTER DA;Lo;0;L;;;;;N;;;;; +111A3;SHARADA LETTER DHA;Lo;0;L;;;;;N;;;;; +111A4;SHARADA LETTER NA;Lo;0;L;;;;;N;;;;; +111A5;SHARADA LETTER PA;Lo;0;L;;;;;N;;;;; +111A6;SHARADA LETTER PHA;Lo;0;L;;;;;N;;;;; +111A7;SHARADA LETTER BA;Lo;0;L;;;;;N;;;;; +111A8;SHARADA LETTER BHA;Lo;0;L;;;;;N;;;;; +111A9;SHARADA LETTER MA;Lo;0;L;;;;;N;;;;; +111AA;SHARADA LETTER YA;Lo;0;L;;;;;N;;;;; +111AB;SHARADA LETTER RA;Lo;0;L;;;;;N;;;;; +111AC;SHARADA LETTER LA;Lo;0;L;;;;;N;;;;; +111AD;SHARADA LETTER LLA;Lo;0;L;;;;;N;;;;; +111AE;SHARADA LETTER VA;Lo;0;L;;;;;N;;;;; +111AF;SHARADA LETTER SHA;Lo;0;L;;;;;N;;;;; +111B0;SHARADA LETTER SSA;Lo;0;L;;;;;N;;;;; +111B1;SHARADA LETTER SA;Lo;0;L;;;;;N;;;;; +111B2;SHARADA LETTER HA;Lo;0;L;;;;;N;;;;; +111B3;SHARADA VOWEL SIGN AA;Mc;0;L;;;;;N;;;;; +111B4;SHARADA VOWEL SIGN I;Mc;0;L;;;;;N;;;;; +111B5;SHARADA VOWEL SIGN II;Mc;0;L;;;;;N;;;;; +111B6;SHARADA VOWEL SIGN U;Mn;0;NSM;;;;;N;;;;; +111B7;SHARADA VOWEL SIGN UU;Mn;0;NSM;;;;;N;;;;; +111B8;SHARADA VOWEL SIGN VOCALIC R;Mn;0;NSM;;;;;N;;;;; +111B9;SHARADA VOWEL SIGN VOCALIC RR;Mn;0;NSM;;;;;N;;;;; +111BA;SHARADA VOWEL SIGN VOCALIC L;Mn;0;NSM;;;;;N;;;;; +111BB;SHARADA VOWEL SIGN VOCALIC LL;Mn;0;NSM;;;;;N;;;;; +111BC;SHARADA VOWEL SIGN E;Mn;0;NSM;;;;;N;;;;; +111BD;SHARADA VOWEL SIGN AI;Mn;0;NSM;;;;;N;;;;; +111BE;SHARADA VOWEL SIGN O;Mn;0;NSM;;;;;N;;;;; +111BF;SHARADA VOWEL SIGN AU;Mc;0;L;;;;;N;;;;; +111C0;SHARADA SIGN VIRAMA;Mc;9;L;;;;;N;;;;; +111C1;SHARADA SIGN AVAGRAHA;Lo;0;L;;;;;N;;;;; +111C2;SHARADA SIGN JIHVAMULIYA;Lo;0;L;;;;;N;;;;; +111C3;SHARADA SIGN UPADHMANIYA;Lo;0;L;;;;;N;;;;; +111C4;SHARADA OM;Lo;0;L;;;;;N;;;;; +111C5;SHARADA DANDA;Po;0;L;;;;;N;;;;; +111C6;SHARADA DOUBLE DANDA;Po;0;L;;;;;N;;;;; +111C7;SHARADA ABBREVIATION SIGN;Po;0;L;;;;;N;;;;; +111C8;SHARADA SEPARATOR;Po;0;L;;;;;N;;;;; +111C9;SHARADA SANDHI MARK;Mn;0;NSM;;;;;N;;;;; +111CA;SHARADA SIGN NUKTA;Mn;7;NSM;;;;;N;;;;; +111CB;SHARADA VOWEL MODIFIER MARK;Mn;0;NSM;;;;;N;;;;; +111CC;SHARADA EXTRA SHORT VOWEL MARK;Mn;0;NSM;;;;;N;;;;; +111CD;SHARADA SUTRA MARK;Po;0;L;;;;;N;;;;; +111D0;SHARADA DIGIT ZERO;Nd;0;L;;0;0;0;N;;;;; +111D1;SHARADA DIGIT ONE;Nd;0;L;;1;1;1;N;;;;; +111D2;SHARADA DIGIT TWO;Nd;0;L;;2;2;2;N;;;;; +111D3;SHARADA DIGIT THREE;Nd;0;L;;3;3;3;N;;;;; +111D4;SHARADA DIGIT FOUR;Nd;0;L;;4;4;4;N;;;;; +111D5;SHARADA DIGIT FIVE;Nd;0;L;;5;5;5;N;;;;; +111D6;SHARADA DIGIT SIX;Nd;0;L;;6;6;6;N;;;;; +111D7;SHARADA DIGIT SEVEN;Nd;0;L;;7;7;7;N;;;;; +111D8;SHARADA DIGIT EIGHT;Nd;0;L;;8;8;8;N;;;;; +111D9;SHARADA DIGIT NINE;Nd;0;L;;9;9;9;N;;;;; +111DA;SHARADA EKAM;Lo;0;L;;;;;N;;;;; +111DB;SHARADA SIGN SIDDHAM;Po;0;L;;;;;N;;;;; +111DC;SHARADA HEADSTROKE;Lo;0;L;;;;;N;;;;; +111DD;SHARADA CONTINUATION SIGN;Po;0;L;;;;;N;;;;; +111DE;SHARADA SECTION MARK-1;Po;0;L;;;;;N;;;;; +111DF;SHARADA SECTION MARK-2;Po;0;L;;;;;N;;;;; +111E1;SINHALA ARCHAIC DIGIT ONE;No;0;L;;;;1;N;;;;; +111E2;SINHALA ARCHAIC DIGIT TWO;No;0;L;;;;2;N;;;;; +111E3;SINHALA ARCHAIC DIGIT THREE;No;0;L;;;;3;N;;;;; +111E4;SINHALA ARCHAIC DIGIT FOUR;No;0;L;;;;4;N;;;;; +111E5;SINHALA ARCHAIC DIGIT FIVE;No;0;L;;;;5;N;;;;; +111E6;SINHALA ARCHAIC DIGIT SIX;No;0;L;;;;6;N;;;;; +111E7;SINHALA ARCHAIC DIGIT SEVEN;No;0;L;;;;7;N;;;;; +111E8;SINHALA ARCHAIC DIGIT EIGHT;No;0;L;;;;8;N;;;;; +111E9;SINHALA ARCHAIC DIGIT NINE;No;0;L;;;;9;N;;;;; +111EA;SINHALA ARCHAIC NUMBER TEN;No;0;L;;;;10;N;;;;; +111EB;SINHALA ARCHAIC NUMBER TWENTY;No;0;L;;;;20;N;;;;; +111EC;SINHALA ARCHAIC NUMBER THIRTY;No;0;L;;;;30;N;;;;; +111ED;SINHALA ARCHAIC NUMBER FORTY;No;0;L;;;;40;N;;;;; +111EE;SINHALA ARCHAIC NUMBER FIFTY;No;0;L;;;;50;N;;;;; +111EF;SINHALA ARCHAIC NUMBER SIXTY;No;0;L;;;;60;N;;;;; +111F0;SINHALA ARCHAIC NUMBER SEVENTY;No;0;L;;;;70;N;;;;; +111F1;SINHALA ARCHAIC NUMBER EIGHTY;No;0;L;;;;80;N;;;;; +111F2;SINHALA ARCHAIC NUMBER NINETY;No;0;L;;;;90;N;;;;; +111F3;SINHALA ARCHAIC NUMBER ONE HUNDRED;No;0;L;;;;100;N;;;;; +111F4;SINHALA ARCHAIC NUMBER ONE THOUSAND;No;0;L;;;;1000;N;;;;; +11200;KHOJKI LETTER A;Lo;0;L;;;;;N;;;;; +11201;KHOJKI LETTER AA;Lo;0;L;;;;;N;;;;; +11202;KHOJKI LETTER I;Lo;0;L;;;;;N;;;;; +11203;KHOJKI LETTER U;Lo;0;L;;;;;N;;;;; +11204;KHOJKI LETTER E;Lo;0;L;;;;;N;;;;; +11205;KHOJKI LETTER AI;Lo;0;L;;;;;N;;;;; +11206;KHOJKI LETTER O;Lo;0;L;;;;;N;;;;; +11207;KHOJKI LETTER AU;Lo;0;L;;;;;N;;;;; +11208;KHOJKI LETTER KA;Lo;0;L;;;;;N;;;;; +11209;KHOJKI LETTER KHA;Lo;0;L;;;;;N;;;;; +1120A;KHOJKI LETTER GA;Lo;0;L;;;;;N;;;;; +1120B;KHOJKI LETTER GGA;Lo;0;L;;;;;N;;;;; +1120C;KHOJKI LETTER GHA;Lo;0;L;;;;;N;;;;; +1120D;KHOJKI LETTER NGA;Lo;0;L;;;;;N;;;;; +1120E;KHOJKI LETTER CA;Lo;0;L;;;;;N;;;;; +1120F;KHOJKI LETTER CHA;Lo;0;L;;;;;N;;;;; +11210;KHOJKI LETTER JA;Lo;0;L;;;;;N;;;;; +11211;KHOJKI LETTER JJA;Lo;0;L;;;;;N;;;;; +11213;KHOJKI LETTER NYA;Lo;0;L;;;;;N;;;;; +11214;KHOJKI LETTER TTA;Lo;0;L;;;;;N;;;;; +11215;KHOJKI LETTER TTHA;Lo;0;L;;;;;N;;;;; +11216;KHOJKI LETTER DDA;Lo;0;L;;;;;N;;;;; +11217;KHOJKI LETTER DDHA;Lo;0;L;;;;;N;;;;; +11218;KHOJKI LETTER NNA;Lo;0;L;;;;;N;;;;; +11219;KHOJKI LETTER TA;Lo;0;L;;;;;N;;;;; +1121A;KHOJKI LETTER THA;Lo;0;L;;;;;N;;;;; +1121B;KHOJKI LETTER DA;Lo;0;L;;;;;N;;;;; +1121C;KHOJKI LETTER DDDA;Lo;0;L;;;;;N;;;;; +1121D;KHOJKI LETTER DHA;Lo;0;L;;;;;N;;;;; +1121E;KHOJKI LETTER NA;Lo;0;L;;;;;N;;;;; +1121F;KHOJKI LETTER PA;Lo;0;L;;;;;N;;;;; +11220;KHOJKI LETTER PHA;Lo;0;L;;;;;N;;;;; +11221;KHOJKI LETTER BA;Lo;0;L;;;;;N;;;;; +11222;KHOJKI LETTER BBA;Lo;0;L;;;;;N;;;;; +11223;KHOJKI LETTER BHA;Lo;0;L;;;;;N;;;;; +11224;KHOJKI LETTER MA;Lo;0;L;;;;;N;;;;; +11225;KHOJKI LETTER YA;Lo;0;L;;;;;N;;;;; +11226;KHOJKI LETTER RA;Lo;0;L;;;;;N;;;;; +11227;KHOJKI LETTER LA;Lo;0;L;;;;;N;;;;; +11228;KHOJKI LETTER VA;Lo;0;L;;;;;N;;;;; +11229;KHOJKI LETTER SA;Lo;0;L;;;;;N;;;;; +1122A;KHOJKI LETTER HA;Lo;0;L;;;;;N;;;;; +1122B;KHOJKI LETTER LLA;Lo;0;L;;;;;N;;;;; +1122C;KHOJKI VOWEL SIGN AA;Mc;0;L;;;;;N;;;;; +1122D;KHOJKI VOWEL SIGN I;Mc;0;L;;;;;N;;;;; +1122E;KHOJKI VOWEL SIGN II;Mc;0;L;;;;;N;;;;; +1122F;KHOJKI VOWEL SIGN U;Mn;0;NSM;;;;;N;;;;; +11230;KHOJKI VOWEL SIGN E;Mn;0;NSM;;;;;N;;;;; +11231;KHOJKI VOWEL SIGN AI;Mn;0;NSM;;;;;N;;;;; +11232;KHOJKI VOWEL SIGN O;Mc;0;L;;;;;N;;;;; +11233;KHOJKI VOWEL SIGN AU;Mc;0;L;;;;;N;;;;; +11234;KHOJKI SIGN ANUSVARA;Mn;0;NSM;;;;;N;;;;; +11235;KHOJKI SIGN VIRAMA;Mc;9;L;;;;;N;;;;; +11236;KHOJKI SIGN NUKTA;Mn;7;NSM;;;;;N;;;;; +11237;KHOJKI SIGN SHADDA;Mn;0;NSM;;;;;N;;;;; +11238;KHOJKI DANDA;Po;0;L;;;;;N;;;;; +11239;KHOJKI DOUBLE DANDA;Po;0;L;;;;;N;;;;; +1123A;KHOJKI WORD SEPARATOR;Po;0;L;;;;;N;;;;; +1123B;KHOJKI SECTION MARK;Po;0;L;;;;;N;;;;; +1123C;KHOJKI DOUBLE SECTION MARK;Po;0;L;;;;;N;;;;; +1123D;KHOJKI ABBREVIATION SIGN;Po;0;L;;;;;N;;;;; +1123E;KHOJKI SIGN SUKUN;Mn;0;NSM;;;;;N;;;;; +11280;MULTANI LETTER A;Lo;0;L;;;;;N;;;;; +11281;MULTANI LETTER I;Lo;0;L;;;;;N;;;;; +11282;MULTANI LETTER U;Lo;0;L;;;;;N;;;;; +11283;MULTANI LETTER E;Lo;0;L;;;;;N;;;;; +11284;MULTANI LETTER KA;Lo;0;L;;;;;N;;;;; +11285;MULTANI LETTER KHA;Lo;0;L;;;;;N;;;;; +11286;MULTANI LETTER GA;Lo;0;L;;;;;N;;;;; +11288;MULTANI LETTER GHA;Lo;0;L;;;;;N;;;;; +1128A;MULTANI LETTER CA;Lo;0;L;;;;;N;;;;; +1128B;MULTANI LETTER CHA;Lo;0;L;;;;;N;;;;; +1128C;MULTANI LETTER JA;Lo;0;L;;;;;N;;;;; +1128D;MULTANI LETTER JJA;Lo;0;L;;;;;N;;;;; +1128F;MULTANI LETTER NYA;Lo;0;L;;;;;N;;;;; +11290;MULTANI LETTER TTA;Lo;0;L;;;;;N;;;;; +11291;MULTANI LETTER TTHA;Lo;0;L;;;;;N;;;;; +11292;MULTANI LETTER DDA;Lo;0;L;;;;;N;;;;; +11293;MULTANI LETTER DDDA;Lo;0;L;;;;;N;;;;; +11294;MULTANI LETTER DDHA;Lo;0;L;;;;;N;;;;; +11295;MULTANI LETTER NNA;Lo;0;L;;;;;N;;;;; +11296;MULTANI LETTER TA;Lo;0;L;;;;;N;;;;; +11297;MULTANI LETTER THA;Lo;0;L;;;;;N;;;;; +11298;MULTANI LETTER DA;Lo;0;L;;;;;N;;;;; +11299;MULTANI LETTER DHA;Lo;0;L;;;;;N;;;;; +1129A;MULTANI LETTER NA;Lo;0;L;;;;;N;;;;; +1129B;MULTANI LETTER PA;Lo;0;L;;;;;N;;;;; +1129C;MULTANI LETTER PHA;Lo;0;L;;;;;N;;;;; +1129D;MULTANI LETTER BA;Lo;0;L;;;;;N;;;;; +1129F;MULTANI LETTER BHA;Lo;0;L;;;;;N;;;;; +112A0;MULTANI LETTER MA;Lo;0;L;;;;;N;;;;; +112A1;MULTANI LETTER YA;Lo;0;L;;;;;N;;;;; +112A2;MULTANI LETTER RA;Lo;0;L;;;;;N;;;;; +112A3;MULTANI LETTER LA;Lo;0;L;;;;;N;;;;; +112A4;MULTANI LETTER VA;Lo;0;L;;;;;N;;;;; +112A5;MULTANI LETTER SA;Lo;0;L;;;;;N;;;;; +112A6;MULTANI LETTER HA;Lo;0;L;;;;;N;;;;; +112A7;MULTANI LETTER RRA;Lo;0;L;;;;;N;;;;; +112A8;MULTANI LETTER RHA;Lo;0;L;;;;;N;;;;; +112A9;MULTANI SECTION MARK;Po;0;L;;;;;N;;;;; +112B0;KHUDAWADI LETTER A;Lo;0;L;;;;;N;;;;; +112B1;KHUDAWADI LETTER AA;Lo;0;L;;;;;N;;;;; +112B2;KHUDAWADI LETTER I;Lo;0;L;;;;;N;;;;; +112B3;KHUDAWADI LETTER II;Lo;0;L;;;;;N;;;;; +112B4;KHUDAWADI LETTER U;Lo;0;L;;;;;N;;;;; +112B5;KHUDAWADI LETTER UU;Lo;0;L;;;;;N;;;;; +112B6;KHUDAWADI LETTER E;Lo;0;L;;;;;N;;;;; +112B7;KHUDAWADI LETTER AI;Lo;0;L;;;;;N;;;;; +112B8;KHUDAWADI LETTER O;Lo;0;L;;;;;N;;;;; +112B9;KHUDAWADI LETTER AU;Lo;0;L;;;;;N;;;;; +112BA;KHUDAWADI LETTER KA;Lo;0;L;;;;;N;;;;; +112BB;KHUDAWADI LETTER KHA;Lo;0;L;;;;;N;;;;; +112BC;KHUDAWADI LETTER GA;Lo;0;L;;;;;N;;;;; +112BD;KHUDAWADI LETTER GGA;Lo;0;L;;;;;N;;;;; +112BE;KHUDAWADI LETTER GHA;Lo;0;L;;;;;N;;;;; +112BF;KHUDAWADI LETTER NGA;Lo;0;L;;;;;N;;;;; +112C0;KHUDAWADI LETTER CA;Lo;0;L;;;;;N;;;;; +112C1;KHUDAWADI LETTER CHA;Lo;0;L;;;;;N;;;;; +112C2;KHUDAWADI LETTER JA;Lo;0;L;;;;;N;;;;; +112C3;KHUDAWADI LETTER JJA;Lo;0;L;;;;;N;;;;; +112C4;KHUDAWADI LETTER JHA;Lo;0;L;;;;;N;;;;; +112C5;KHUDAWADI LETTER NYA;Lo;0;L;;;;;N;;;;; +112C6;KHUDAWADI LETTER TTA;Lo;0;L;;;;;N;;;;; +112C7;KHUDAWADI LETTER TTHA;Lo;0;L;;;;;N;;;;; +112C8;KHUDAWADI LETTER DDA;Lo;0;L;;;;;N;;;;; +112C9;KHUDAWADI LETTER DDDA;Lo;0;L;;;;;N;;;;; +112CA;KHUDAWADI LETTER RRA;Lo;0;L;;;;;N;;;;; +112CB;KHUDAWADI LETTER DDHA;Lo;0;L;;;;;N;;;;; +112CC;KHUDAWADI LETTER NNA;Lo;0;L;;;;;N;;;;; +112CD;KHUDAWADI LETTER TA;Lo;0;L;;;;;N;;;;; +112CE;KHUDAWADI LETTER THA;Lo;0;L;;;;;N;;;;; +112CF;KHUDAWADI LETTER DA;Lo;0;L;;;;;N;;;;; +112D0;KHUDAWADI LETTER DHA;Lo;0;L;;;;;N;;;;; +112D1;KHUDAWADI LETTER NA;Lo;0;L;;;;;N;;;;; +112D2;KHUDAWADI LETTER PA;Lo;0;L;;;;;N;;;;; +112D3;KHUDAWADI LETTER PHA;Lo;0;L;;;;;N;;;;; +112D4;KHUDAWADI LETTER BA;Lo;0;L;;;;;N;;;;; +112D5;KHUDAWADI LETTER BBA;Lo;0;L;;;;;N;;;;; +112D6;KHUDAWADI LETTER BHA;Lo;0;L;;;;;N;;;;; +112D7;KHUDAWADI LETTER MA;Lo;0;L;;;;;N;;;;; +112D8;KHUDAWADI LETTER YA;Lo;0;L;;;;;N;;;;; +112D9;KHUDAWADI LETTER RA;Lo;0;L;;;;;N;;;;; +112DA;KHUDAWADI LETTER LA;Lo;0;L;;;;;N;;;;; +112DB;KHUDAWADI LETTER VA;Lo;0;L;;;;;N;;;;; +112DC;KHUDAWADI LETTER SHA;Lo;0;L;;;;;N;;;;; +112DD;KHUDAWADI LETTER SA;Lo;0;L;;;;;N;;;;; +112DE;KHUDAWADI LETTER HA;Lo;0;L;;;;;N;;;;; +112DF;KHUDAWADI SIGN ANUSVARA;Mn;0;NSM;;;;;N;;;;; +112E0;KHUDAWADI VOWEL SIGN AA;Mc;0;L;;;;;N;;;;; +112E1;KHUDAWADI VOWEL SIGN I;Mc;0;L;;;;;N;;;;; +112E2;KHUDAWADI VOWEL SIGN II;Mc;0;L;;;;;N;;;;; +112E3;KHUDAWADI VOWEL SIGN U;Mn;0;NSM;;;;;N;;;;; +112E4;KHUDAWADI VOWEL SIGN UU;Mn;0;NSM;;;;;N;;;;; +112E5;KHUDAWADI VOWEL SIGN E;Mn;0;NSM;;;;;N;;;;; +112E6;KHUDAWADI VOWEL SIGN AI;Mn;0;NSM;;;;;N;;;;; +112E7;KHUDAWADI VOWEL SIGN O;Mn;0;NSM;;;;;N;;;;; +112E8;KHUDAWADI VOWEL SIGN AU;Mn;0;NSM;;;;;N;;;;; +112E9;KHUDAWADI SIGN NUKTA;Mn;7;NSM;;;;;N;;;;; +112EA;KHUDAWADI SIGN VIRAMA;Mn;9;NSM;;;;;N;;;;; +112F0;KHUDAWADI DIGIT ZERO;Nd;0;L;;0;0;0;N;;;;; +112F1;KHUDAWADI DIGIT ONE;Nd;0;L;;1;1;1;N;;;;; +112F2;KHUDAWADI DIGIT TWO;Nd;0;L;;2;2;2;N;;;;; +112F3;KHUDAWADI DIGIT THREE;Nd;0;L;;3;3;3;N;;;;; +112F4;KHUDAWADI DIGIT FOUR;Nd;0;L;;4;4;4;N;;;;; +112F5;KHUDAWADI DIGIT FIVE;Nd;0;L;;5;5;5;N;;;;; +112F6;KHUDAWADI DIGIT SIX;Nd;0;L;;6;6;6;N;;;;; +112F7;KHUDAWADI DIGIT SEVEN;Nd;0;L;;7;7;7;N;;;;; +112F8;KHUDAWADI DIGIT EIGHT;Nd;0;L;;8;8;8;N;;;;; +112F9;KHUDAWADI DIGIT NINE;Nd;0;L;;9;9;9;N;;;;; +11300;GRANTHA SIGN COMBINING ANUSVARA ABOVE;Mn;0;NSM;;;;;N;;;;; +11301;GRANTHA SIGN CANDRABINDU;Mn;0;NSM;;;;;N;;;;; +11302;GRANTHA SIGN ANUSVARA;Mc;0;L;;;;;N;;;;; +11303;GRANTHA SIGN VISARGA;Mc;0;L;;;;;N;;;;; +11305;GRANTHA LETTER A;Lo;0;L;;;;;N;;;;; +11306;GRANTHA LETTER AA;Lo;0;L;;;;;N;;;;; +11307;GRANTHA LETTER I;Lo;0;L;;;;;N;;;;; +11308;GRANTHA LETTER II;Lo;0;L;;;;;N;;;;; +11309;GRANTHA LETTER U;Lo;0;L;;;;;N;;;;; +1130A;GRANTHA LETTER UU;Lo;0;L;;;;;N;;;;; +1130B;GRANTHA LETTER VOCALIC R;Lo;0;L;;;;;N;;;;; +1130C;GRANTHA LETTER VOCALIC L;Lo;0;L;;;;;N;;;;; +1130F;GRANTHA LETTER EE;Lo;0;L;;;;;N;;;;; +11310;GRANTHA LETTER AI;Lo;0;L;;;;;N;;;;; +11313;GRANTHA LETTER OO;Lo;0;L;;;;;N;;;;; +11314;GRANTHA LETTER AU;Lo;0;L;;;;;N;;;;; +11315;GRANTHA LETTER KA;Lo;0;L;;;;;N;;;;; +11316;GRANTHA LETTER KHA;Lo;0;L;;;;;N;;;;; +11317;GRANTHA LETTER GA;Lo;0;L;;;;;N;;;;; +11318;GRANTHA LETTER GHA;Lo;0;L;;;;;N;;;;; +11319;GRANTHA LETTER NGA;Lo;0;L;;;;;N;;;;; +1131A;GRANTHA LETTER CA;Lo;0;L;;;;;N;;;;; +1131B;GRANTHA LETTER CHA;Lo;0;L;;;;;N;;;;; +1131C;GRANTHA LETTER JA;Lo;0;L;;;;;N;;;;; +1131D;GRANTHA LETTER JHA;Lo;0;L;;;;;N;;;;; +1131E;GRANTHA LETTER NYA;Lo;0;L;;;;;N;;;;; +1131F;GRANTHA LETTER TTA;Lo;0;L;;;;;N;;;;; +11320;GRANTHA LETTER TTHA;Lo;0;L;;;;;N;;;;; +11321;GRANTHA LETTER DDA;Lo;0;L;;;;;N;;;;; +11322;GRANTHA LETTER DDHA;Lo;0;L;;;;;N;;;;; +11323;GRANTHA LETTER NNA;Lo;0;L;;;;;N;;;;; +11324;GRANTHA LETTER TA;Lo;0;L;;;;;N;;;;; +11325;GRANTHA LETTER THA;Lo;0;L;;;;;N;;;;; +11326;GRANTHA LETTER DA;Lo;0;L;;;;;N;;;;; +11327;GRANTHA LETTER DHA;Lo;0;L;;;;;N;;;;; +11328;GRANTHA LETTER NA;Lo;0;L;;;;;N;;;;; +1132A;GRANTHA LETTER PA;Lo;0;L;;;;;N;;;;; +1132B;GRANTHA LETTER PHA;Lo;0;L;;;;;N;;;;; +1132C;GRANTHA LETTER BA;Lo;0;L;;;;;N;;;;; +1132D;GRANTHA LETTER BHA;Lo;0;L;;;;;N;;;;; +1132E;GRANTHA LETTER MA;Lo;0;L;;;;;N;;;;; +1132F;GRANTHA LETTER YA;Lo;0;L;;;;;N;;;;; +11330;GRANTHA LETTER RA;Lo;0;L;;;;;N;;;;; +11332;GRANTHA LETTER LA;Lo;0;L;;;;;N;;;;; +11333;GRANTHA LETTER LLA;Lo;0;L;;;;;N;;;;; +11335;GRANTHA LETTER VA;Lo;0;L;;;;;N;;;;; +11336;GRANTHA LETTER SHA;Lo;0;L;;;;;N;;;;; +11337;GRANTHA LETTER SSA;Lo;0;L;;;;;N;;;;; +11338;GRANTHA LETTER SA;Lo;0;L;;;;;N;;;;; +11339;GRANTHA LETTER HA;Lo;0;L;;;;;N;;;;; +1133B;COMBINING BINDU BELOW;Mn;7;NSM;;;;;N;;;;; +1133C;GRANTHA SIGN NUKTA;Mn;7;NSM;;;;;N;;;;; +1133D;GRANTHA SIGN AVAGRAHA;Lo;0;L;;;;;N;;;;; +1133E;GRANTHA VOWEL SIGN AA;Mc;0;L;;;;;N;;;;; +1133F;GRANTHA VOWEL SIGN I;Mc;0;L;;;;;N;;;;; +11340;GRANTHA VOWEL SIGN II;Mn;0;NSM;;;;;N;;;;; +11341;GRANTHA VOWEL SIGN U;Mc;0;L;;;;;N;;;;; +11342;GRANTHA VOWEL SIGN UU;Mc;0;L;;;;;N;;;;; +11343;GRANTHA VOWEL SIGN VOCALIC R;Mc;0;L;;;;;N;;;;; +11344;GRANTHA VOWEL SIGN VOCALIC RR;Mc;0;L;;;;;N;;;;; +11347;GRANTHA VOWEL SIGN EE;Mc;0;L;;;;;N;;;;; +11348;GRANTHA VOWEL SIGN AI;Mc;0;L;;;;;N;;;;; +1134B;GRANTHA VOWEL SIGN OO;Mc;0;L;11347 1133E;;;;N;;;;; +1134C;GRANTHA VOWEL SIGN AU;Mc;0;L;11347 11357;;;;N;;;;; +1134D;GRANTHA SIGN VIRAMA;Mc;9;L;;;;;N;;;;; +11350;GRANTHA OM;Lo;0;L;;;;;N;;;;; +11357;GRANTHA AU LENGTH MARK;Mc;0;L;;;;;N;;;;; +1135D;GRANTHA SIGN PLUTA;Lo;0;L;;;;;N;;;;; +1135E;GRANTHA LETTER VEDIC ANUSVARA;Lo;0;L;;;;;N;;;;; +1135F;GRANTHA LETTER VEDIC DOUBLE ANUSVARA;Lo;0;L;;;;;N;;;;; +11360;GRANTHA LETTER VOCALIC RR;Lo;0;L;;;;;N;;;;; +11361;GRANTHA LETTER VOCALIC LL;Lo;0;L;;;;;N;;;;; +11362;GRANTHA VOWEL SIGN VOCALIC L;Mc;0;L;;;;;N;;;;; +11363;GRANTHA VOWEL SIGN VOCALIC LL;Mc;0;L;;;;;N;;;;; +11366;COMBINING GRANTHA DIGIT ZERO;Mn;230;NSM;;;;;N;;;;; +11367;COMBINING GRANTHA DIGIT ONE;Mn;230;NSM;;;;;N;;;;; +11368;COMBINING GRANTHA DIGIT TWO;Mn;230;NSM;;;;;N;;;;; +11369;COMBINING GRANTHA DIGIT THREE;Mn;230;NSM;;;;;N;;;;; +1136A;COMBINING GRANTHA DIGIT FOUR;Mn;230;NSM;;;;;N;;;;; +1136B;COMBINING GRANTHA DIGIT FIVE;Mn;230;NSM;;;;;N;;;;; +1136C;COMBINING GRANTHA DIGIT SIX;Mn;230;NSM;;;;;N;;;;; +11370;COMBINING GRANTHA LETTER A;Mn;230;NSM;;;;;N;;;;; +11371;COMBINING GRANTHA LETTER KA;Mn;230;NSM;;;;;N;;;;; +11372;COMBINING GRANTHA LETTER NA;Mn;230;NSM;;;;;N;;;;; +11373;COMBINING GRANTHA LETTER VI;Mn;230;NSM;;;;;N;;;;; +11374;COMBINING GRANTHA LETTER PA;Mn;230;NSM;;;;;N;;;;; +11400;NEWA LETTER A;Lo;0;L;;;;;N;;;;; +11401;NEWA LETTER AA;Lo;0;L;;;;;N;;;;; +11402;NEWA LETTER I;Lo;0;L;;;;;N;;;;; +11403;NEWA LETTER II;Lo;0;L;;;;;N;;;;; +11404;NEWA LETTER U;Lo;0;L;;;;;N;;;;; +11405;NEWA LETTER UU;Lo;0;L;;;;;N;;;;; +11406;NEWA LETTER VOCALIC R;Lo;0;L;;;;;N;;;;; +11407;NEWA LETTER VOCALIC RR;Lo;0;L;;;;;N;;;;; +11408;NEWA LETTER VOCALIC L;Lo;0;L;;;;;N;;;;; +11409;NEWA LETTER VOCALIC LL;Lo;0;L;;;;;N;;;;; +1140A;NEWA LETTER E;Lo;0;L;;;;;N;;;;; +1140B;NEWA LETTER AI;Lo;0;L;;;;;N;;;;; +1140C;NEWA LETTER O;Lo;0;L;;;;;N;;;;; +1140D;NEWA LETTER AU;Lo;0;L;;;;;N;;;;; +1140E;NEWA LETTER KA;Lo;0;L;;;;;N;;;;; +1140F;NEWA LETTER KHA;Lo;0;L;;;;;N;;;;; +11410;NEWA LETTER GA;Lo;0;L;;;;;N;;;;; +11411;NEWA LETTER GHA;Lo;0;L;;;;;N;;;;; +11412;NEWA LETTER NGA;Lo;0;L;;;;;N;;;;; +11413;NEWA LETTER NGHA;Lo;0;L;;;;;N;;;;; +11414;NEWA LETTER CA;Lo;0;L;;;;;N;;;;; +11415;NEWA LETTER CHA;Lo;0;L;;;;;N;;;;; +11416;NEWA LETTER JA;Lo;0;L;;;;;N;;;;; +11417;NEWA LETTER JHA;Lo;0;L;;;;;N;;;;; +11418;NEWA LETTER NYA;Lo;0;L;;;;;N;;;;; +11419;NEWA LETTER NYHA;Lo;0;L;;;;;N;;;;; +1141A;NEWA LETTER TTA;Lo;0;L;;;;;N;;;;; +1141B;NEWA LETTER TTHA;Lo;0;L;;;;;N;;;;; +1141C;NEWA LETTER DDA;Lo;0;L;;;;;N;;;;; +1141D;NEWA LETTER DDHA;Lo;0;L;;;;;N;;;;; +1141E;NEWA LETTER NNA;Lo;0;L;;;;;N;;;;; +1141F;NEWA LETTER TA;Lo;0;L;;;;;N;;;;; +11420;NEWA LETTER THA;Lo;0;L;;;;;N;;;;; +11421;NEWA LETTER DA;Lo;0;L;;;;;N;;;;; +11422;NEWA LETTER DHA;Lo;0;L;;;;;N;;;;; +11423;NEWA LETTER NA;Lo;0;L;;;;;N;;;;; +11424;NEWA LETTER NHA;Lo;0;L;;;;;N;;;;; +11425;NEWA LETTER PA;Lo;0;L;;;;;N;;;;; +11426;NEWA LETTER PHA;Lo;0;L;;;;;N;;;;; +11427;NEWA LETTER BA;Lo;0;L;;;;;N;;;;; +11428;NEWA LETTER BHA;Lo;0;L;;;;;N;;;;; +11429;NEWA LETTER MA;Lo;0;L;;;;;N;;;;; +1142A;NEWA LETTER MHA;Lo;0;L;;;;;N;;;;; +1142B;NEWA LETTER YA;Lo;0;L;;;;;N;;;;; +1142C;NEWA LETTER RA;Lo;0;L;;;;;N;;;;; +1142D;NEWA LETTER RHA;Lo;0;L;;;;;N;;;;; +1142E;NEWA LETTER LA;Lo;0;L;;;;;N;;;;; +1142F;NEWA LETTER LHA;Lo;0;L;;;;;N;;;;; +11430;NEWA LETTER WA;Lo;0;L;;;;;N;;;;; +11431;NEWA LETTER SHA;Lo;0;L;;;;;N;;;;; +11432;NEWA LETTER SSA;Lo;0;L;;;;;N;;;;; +11433;NEWA LETTER SA;Lo;0;L;;;;;N;;;;; +11434;NEWA LETTER HA;Lo;0;L;;;;;N;;;;; +11435;NEWA VOWEL SIGN AA;Mc;0;L;;;;;N;;;;; +11436;NEWA VOWEL SIGN I;Mc;0;L;;;;;N;;;;; +11437;NEWA VOWEL SIGN II;Mc;0;L;;;;;N;;;;; +11438;NEWA VOWEL SIGN U;Mn;0;NSM;;;;;N;;;;; +11439;NEWA VOWEL SIGN UU;Mn;0;NSM;;;;;N;;;;; +1143A;NEWA VOWEL SIGN VOCALIC R;Mn;0;NSM;;;;;N;;;;; +1143B;NEWA VOWEL SIGN VOCALIC RR;Mn;0;NSM;;;;;N;;;;; +1143C;NEWA VOWEL SIGN VOCALIC L;Mn;0;NSM;;;;;N;;;;; +1143D;NEWA VOWEL SIGN VOCALIC LL;Mn;0;NSM;;;;;N;;;;; +1143E;NEWA VOWEL SIGN E;Mn;0;NSM;;;;;N;;;;; +1143F;NEWA VOWEL SIGN AI;Mn;0;NSM;;;;;N;;;;; +11440;NEWA VOWEL SIGN O;Mc;0;L;;;;;N;;;;; +11441;NEWA VOWEL SIGN AU;Mc;0;L;;;;;N;;;;; +11442;NEWA SIGN VIRAMA;Mn;9;NSM;;;;;N;;;;; +11443;NEWA SIGN CANDRABINDU;Mn;0;NSM;;;;;N;;;;; +11444;NEWA SIGN ANUSVARA;Mn;0;NSM;;;;;N;;;;; +11445;NEWA SIGN VISARGA;Mc;0;L;;;;;N;;;;; +11446;NEWA SIGN NUKTA;Mn;7;NSM;;;;;N;;;;; +11447;NEWA SIGN AVAGRAHA;Lo;0;L;;;;;N;;;;; +11448;NEWA SIGN FINAL ANUSVARA;Lo;0;L;;;;;N;;;;; +11449;NEWA OM;Lo;0;L;;;;;N;;;;; +1144A;NEWA SIDDHI;Lo;0;L;;;;;N;;;;; +1144B;NEWA DANDA;Po;0;L;;;;;N;;;;; +1144C;NEWA DOUBLE DANDA;Po;0;L;;;;;N;;;;; +1144D;NEWA COMMA;Po;0;L;;;;;N;;;;; +1144E;NEWA GAP FILLER;Po;0;L;;;;;N;;;;; +1144F;NEWA ABBREVIATION SIGN;Po;0;L;;;;;N;;;;; +11450;NEWA DIGIT ZERO;Nd;0;L;;0;0;0;N;;;;; +11451;NEWA DIGIT ONE;Nd;0;L;;1;1;1;N;;;;; +11452;NEWA DIGIT TWO;Nd;0;L;;2;2;2;N;;;;; +11453;NEWA DIGIT THREE;Nd;0;L;;3;3;3;N;;;;; +11454;NEWA DIGIT FOUR;Nd;0;L;;4;4;4;N;;;;; +11455;NEWA DIGIT FIVE;Nd;0;L;;5;5;5;N;;;;; +11456;NEWA DIGIT SIX;Nd;0;L;;6;6;6;N;;;;; +11457;NEWA DIGIT SEVEN;Nd;0;L;;7;7;7;N;;;;; +11458;NEWA DIGIT EIGHT;Nd;0;L;;8;8;8;N;;;;; +11459;NEWA DIGIT NINE;Nd;0;L;;9;9;9;N;;;;; +1145B;NEWA PLACEHOLDER MARK;Po;0;L;;;;;N;;;;; +1145D;NEWA INSERTION SIGN;Po;0;L;;;;;N;;;;; +1145E;NEWA SANDHI MARK;Mn;230;NSM;;;;;N;;;;; +1145F;NEWA LETTER VEDIC ANUSVARA;Lo;0;L;;;;;N;;;;; +11480;TIRHUTA ANJI;Lo;0;L;;;;;N;;;;; +11481;TIRHUTA LETTER A;Lo;0;L;;;;;N;;;;; +11482;TIRHUTA LETTER AA;Lo;0;L;;;;;N;;;;; +11483;TIRHUTA LETTER I;Lo;0;L;;;;;N;;;;; +11484;TIRHUTA LETTER II;Lo;0;L;;;;;N;;;;; +11485;TIRHUTA LETTER U;Lo;0;L;;;;;N;;;;; +11486;TIRHUTA LETTER UU;Lo;0;L;;;;;N;;;;; +11487;TIRHUTA LETTER VOCALIC R;Lo;0;L;;;;;N;;;;; +11488;TIRHUTA LETTER VOCALIC RR;Lo;0;L;;;;;N;;;;; +11489;TIRHUTA LETTER VOCALIC L;Lo;0;L;;;;;N;;;;; +1148A;TIRHUTA LETTER VOCALIC LL;Lo;0;L;;;;;N;;;;; +1148B;TIRHUTA LETTER E;Lo;0;L;;;;;N;;;;; +1148C;TIRHUTA LETTER AI;Lo;0;L;;;;;N;;;;; +1148D;TIRHUTA LETTER O;Lo;0;L;;;;;N;;;;; +1148E;TIRHUTA LETTER AU;Lo;0;L;;;;;N;;;;; +1148F;TIRHUTA LETTER KA;Lo;0;L;;;;;N;;;;; +11490;TIRHUTA LETTER KHA;Lo;0;L;;;;;N;;;;; +11491;TIRHUTA LETTER GA;Lo;0;L;;;;;N;;;;; +11492;TIRHUTA LETTER GHA;Lo;0;L;;;;;N;;;;; +11493;TIRHUTA LETTER NGA;Lo;0;L;;;;;N;;;;; +11494;TIRHUTA LETTER CA;Lo;0;L;;;;;N;;;;; +11495;TIRHUTA LETTER CHA;Lo;0;L;;;;;N;;;;; +11496;TIRHUTA LETTER JA;Lo;0;L;;;;;N;;;;; +11497;TIRHUTA LETTER JHA;Lo;0;L;;;;;N;;;;; +11498;TIRHUTA LETTER NYA;Lo;0;L;;;;;N;;;;; +11499;TIRHUTA LETTER TTA;Lo;0;L;;;;;N;;;;; +1149A;TIRHUTA LETTER TTHA;Lo;0;L;;;;;N;;;;; +1149B;TIRHUTA LETTER DDA;Lo;0;L;;;;;N;;;;; +1149C;TIRHUTA LETTER DDHA;Lo;0;L;;;;;N;;;;; +1149D;TIRHUTA LETTER NNA;Lo;0;L;;;;;N;;;;; +1149E;TIRHUTA LETTER TA;Lo;0;L;;;;;N;;;;; +1149F;TIRHUTA LETTER THA;Lo;0;L;;;;;N;;;;; +114A0;TIRHUTA LETTER DA;Lo;0;L;;;;;N;;;;; +114A1;TIRHUTA LETTER DHA;Lo;0;L;;;;;N;;;;; +114A2;TIRHUTA LETTER NA;Lo;0;L;;;;;N;;;;; +114A3;TIRHUTA LETTER PA;Lo;0;L;;;;;N;;;;; +114A4;TIRHUTA LETTER PHA;Lo;0;L;;;;;N;;;;; +114A5;TIRHUTA LETTER BA;Lo;0;L;;;;;N;;;;; +114A6;TIRHUTA LETTER BHA;Lo;0;L;;;;;N;;;;; +114A7;TIRHUTA LETTER MA;Lo;0;L;;;;;N;;;;; +114A8;TIRHUTA LETTER YA;Lo;0;L;;;;;N;;;;; +114A9;TIRHUTA LETTER RA;Lo;0;L;;;;;N;;;;; +114AA;TIRHUTA LETTER LA;Lo;0;L;;;;;N;;;;; +114AB;TIRHUTA LETTER VA;Lo;0;L;;;;;N;;;;; +114AC;TIRHUTA LETTER SHA;Lo;0;L;;;;;N;;;;; +114AD;TIRHUTA LETTER SSA;Lo;0;L;;;;;N;;;;; +114AE;TIRHUTA LETTER SA;Lo;0;L;;;;;N;;;;; +114AF;TIRHUTA LETTER HA;Lo;0;L;;;;;N;;;;; +114B0;TIRHUTA VOWEL SIGN AA;Mc;0;L;;;;;N;;;;; +114B1;TIRHUTA VOWEL SIGN I;Mc;0;L;;;;;N;;;;; +114B2;TIRHUTA VOWEL SIGN II;Mc;0;L;;;;;N;;;;; +114B3;TIRHUTA VOWEL SIGN U;Mn;0;NSM;;;;;N;;;;; +114B4;TIRHUTA VOWEL SIGN UU;Mn;0;NSM;;;;;N;;;;; +114B5;TIRHUTA VOWEL SIGN VOCALIC R;Mn;0;NSM;;;;;N;;;;; +114B6;TIRHUTA VOWEL SIGN VOCALIC RR;Mn;0;NSM;;;;;N;;;;; +114B7;TIRHUTA VOWEL SIGN VOCALIC L;Mn;0;NSM;;;;;N;;;;; +114B8;TIRHUTA VOWEL SIGN VOCALIC LL;Mn;0;NSM;;;;;N;;;;; +114B9;TIRHUTA VOWEL SIGN E;Mc;0;L;;;;;N;;;;; +114BA;TIRHUTA VOWEL SIGN SHORT E;Mn;0;NSM;;;;;N;;;;; +114BB;TIRHUTA VOWEL SIGN AI;Mc;0;L;114B9 114BA;;;;N;;;;; +114BC;TIRHUTA VOWEL SIGN O;Mc;0;L;114B9 114B0;;;;N;;;;; +114BD;TIRHUTA VOWEL SIGN SHORT O;Mc;0;L;;;;;N;;;;; +114BE;TIRHUTA VOWEL SIGN AU;Mc;0;L;114B9 114BD;;;;N;;;;; +114BF;TIRHUTA SIGN CANDRABINDU;Mn;0;NSM;;;;;N;;;;; +114C0;TIRHUTA SIGN ANUSVARA;Mn;0;NSM;;;;;N;;;;; +114C1;TIRHUTA SIGN VISARGA;Mc;0;L;;;;;N;;;;; +114C2;TIRHUTA SIGN VIRAMA;Mn;9;NSM;;;;;N;;;;; +114C3;TIRHUTA SIGN NUKTA;Mn;7;NSM;;;;;N;;;;; +114C4;TIRHUTA SIGN AVAGRAHA;Lo;0;L;;;;;N;;;;; +114C5;TIRHUTA GVANG;Lo;0;L;;;;;N;;;;; +114C6;TIRHUTA ABBREVIATION SIGN;Po;0;L;;;;;N;;;;; +114C7;TIRHUTA OM;Lo;0;L;;;;;N;;;;; +114D0;TIRHUTA DIGIT ZERO;Nd;0;L;;0;0;0;N;;;;; +114D1;TIRHUTA DIGIT ONE;Nd;0;L;;1;1;1;N;;;;; +114D2;TIRHUTA DIGIT TWO;Nd;0;L;;2;2;2;N;;;;; +114D3;TIRHUTA DIGIT THREE;Nd;0;L;;3;3;3;N;;;;; +114D4;TIRHUTA DIGIT FOUR;Nd;0;L;;4;4;4;N;;;;; +114D5;TIRHUTA DIGIT FIVE;Nd;0;L;;5;5;5;N;;;;; +114D6;TIRHUTA DIGIT SIX;Nd;0;L;;6;6;6;N;;;;; +114D7;TIRHUTA DIGIT SEVEN;Nd;0;L;;7;7;7;N;;;;; +114D8;TIRHUTA DIGIT EIGHT;Nd;0;L;;8;8;8;N;;;;; +114D9;TIRHUTA DIGIT NINE;Nd;0;L;;9;9;9;N;;;;; +11580;SIDDHAM LETTER A;Lo;0;L;;;;;N;;;;; +11581;SIDDHAM LETTER AA;Lo;0;L;;;;;N;;;;; +11582;SIDDHAM LETTER I;Lo;0;L;;;;;N;;;;; +11583;SIDDHAM LETTER II;Lo;0;L;;;;;N;;;;; +11584;SIDDHAM LETTER U;Lo;0;L;;;;;N;;;;; +11585;SIDDHAM LETTER UU;Lo;0;L;;;;;N;;;;; +11586;SIDDHAM LETTER VOCALIC R;Lo;0;L;;;;;N;;;;; +11587;SIDDHAM LETTER VOCALIC RR;Lo;0;L;;;;;N;;;;; +11588;SIDDHAM LETTER VOCALIC L;Lo;0;L;;;;;N;;;;; +11589;SIDDHAM LETTER VOCALIC LL;Lo;0;L;;;;;N;;;;; +1158A;SIDDHAM LETTER E;Lo;0;L;;;;;N;;;;; +1158B;SIDDHAM LETTER AI;Lo;0;L;;;;;N;;;;; +1158C;SIDDHAM LETTER O;Lo;0;L;;;;;N;;;;; +1158D;SIDDHAM LETTER AU;Lo;0;L;;;;;N;;;;; +1158E;SIDDHAM LETTER KA;Lo;0;L;;;;;N;;;;; +1158F;SIDDHAM LETTER KHA;Lo;0;L;;;;;N;;;;; +11590;SIDDHAM LETTER GA;Lo;0;L;;;;;N;;;;; +11591;SIDDHAM LETTER GHA;Lo;0;L;;;;;N;;;;; +11592;SIDDHAM LETTER NGA;Lo;0;L;;;;;N;;;;; +11593;SIDDHAM LETTER CA;Lo;0;L;;;;;N;;;;; +11594;SIDDHAM LETTER CHA;Lo;0;L;;;;;N;;;;; +11595;SIDDHAM LETTER JA;Lo;0;L;;;;;N;;;;; +11596;SIDDHAM LETTER JHA;Lo;0;L;;;;;N;;;;; +11597;SIDDHAM LETTER NYA;Lo;0;L;;;;;N;;;;; +11598;SIDDHAM LETTER TTA;Lo;0;L;;;;;N;;;;; +11599;SIDDHAM LETTER TTHA;Lo;0;L;;;;;N;;;;; +1159A;SIDDHAM LETTER DDA;Lo;0;L;;;;;N;;;;; +1159B;SIDDHAM LETTER DDHA;Lo;0;L;;;;;N;;;;; +1159C;SIDDHAM LETTER NNA;Lo;0;L;;;;;N;;;;; +1159D;SIDDHAM LETTER TA;Lo;0;L;;;;;N;;;;; +1159E;SIDDHAM LETTER THA;Lo;0;L;;;;;N;;;;; +1159F;SIDDHAM LETTER DA;Lo;0;L;;;;;N;;;;; +115A0;SIDDHAM LETTER DHA;Lo;0;L;;;;;N;;;;; +115A1;SIDDHAM LETTER NA;Lo;0;L;;;;;N;;;;; +115A2;SIDDHAM LETTER PA;Lo;0;L;;;;;N;;;;; +115A3;SIDDHAM LETTER PHA;Lo;0;L;;;;;N;;;;; +115A4;SIDDHAM LETTER BA;Lo;0;L;;;;;N;;;;; +115A5;SIDDHAM LETTER BHA;Lo;0;L;;;;;N;;;;; +115A6;SIDDHAM LETTER MA;Lo;0;L;;;;;N;;;;; +115A7;SIDDHAM LETTER YA;Lo;0;L;;;;;N;;;;; +115A8;SIDDHAM LETTER RA;Lo;0;L;;;;;N;;;;; +115A9;SIDDHAM LETTER LA;Lo;0;L;;;;;N;;;;; +115AA;SIDDHAM LETTER VA;Lo;0;L;;;;;N;;;;; +115AB;SIDDHAM LETTER SHA;Lo;0;L;;;;;N;;;;; +115AC;SIDDHAM LETTER SSA;Lo;0;L;;;;;N;;;;; +115AD;SIDDHAM LETTER SA;Lo;0;L;;;;;N;;;;; +115AE;SIDDHAM LETTER HA;Lo;0;L;;;;;N;;;;; +115AF;SIDDHAM VOWEL SIGN AA;Mc;0;L;;;;;N;;;;; +115B0;SIDDHAM VOWEL SIGN I;Mc;0;L;;;;;N;;;;; +115B1;SIDDHAM VOWEL SIGN II;Mc;0;L;;;;;N;;;;; +115B2;SIDDHAM VOWEL SIGN U;Mn;0;NSM;;;;;N;;;;; +115B3;SIDDHAM VOWEL SIGN UU;Mn;0;NSM;;;;;N;;;;; +115B4;SIDDHAM VOWEL SIGN VOCALIC R;Mn;0;NSM;;;;;N;;;;; +115B5;SIDDHAM VOWEL SIGN VOCALIC RR;Mn;0;NSM;;;;;N;;;;; +115B8;SIDDHAM VOWEL SIGN E;Mc;0;L;;;;;N;;;;; +115B9;SIDDHAM VOWEL SIGN AI;Mc;0;L;;;;;N;;;;; +115BA;SIDDHAM VOWEL SIGN O;Mc;0;L;115B8 115AF;;;;N;;;;; +115BB;SIDDHAM VOWEL SIGN AU;Mc;0;L;115B9 115AF;;;;N;;;;; +115BC;SIDDHAM SIGN CANDRABINDU;Mn;0;NSM;;;;;N;;;;; +115BD;SIDDHAM SIGN ANUSVARA;Mn;0;NSM;;;;;N;;;;; +115BE;SIDDHAM SIGN VISARGA;Mc;0;L;;;;;N;;;;; +115BF;SIDDHAM SIGN VIRAMA;Mn;9;NSM;;;;;N;;;;; +115C0;SIDDHAM SIGN NUKTA;Mn;7;NSM;;;;;N;;;;; +115C1;SIDDHAM SIGN SIDDHAM;Po;0;L;;;;;N;;;;; +115C2;SIDDHAM DANDA;Po;0;L;;;;;N;;;;; +115C3;SIDDHAM DOUBLE DANDA;Po;0;L;;;;;N;;;;; +115C4;SIDDHAM SEPARATOR DOT;Po;0;L;;;;;N;;;;; +115C5;SIDDHAM SEPARATOR BAR;Po;0;L;;;;;N;;;;; +115C6;SIDDHAM REPETITION MARK-1;Po;0;L;;;;;N;;;;; +115C7;SIDDHAM REPETITION MARK-2;Po;0;L;;;;;N;;;;; +115C8;SIDDHAM REPETITION MARK-3;Po;0;L;;;;;N;;;;; +115C9;SIDDHAM END OF TEXT MARK;Po;0;L;;;;;N;;;;; +115CA;SIDDHAM SECTION MARK WITH TRIDENT AND U-SHAPED ORNAMENTS;Po;0;L;;;;;N;;;;; +115CB;SIDDHAM SECTION MARK WITH TRIDENT AND DOTTED CRESCENTS;Po;0;L;;;;;N;;;;; +115CC;SIDDHAM SECTION MARK WITH RAYS AND DOTTED CRESCENTS;Po;0;L;;;;;N;;;;; +115CD;SIDDHAM SECTION MARK WITH RAYS AND DOTTED DOUBLE CRESCENTS;Po;0;L;;;;;N;;;;; +115CE;SIDDHAM SECTION MARK WITH RAYS AND DOTTED TRIPLE CRESCENTS;Po;0;L;;;;;N;;;;; +115CF;SIDDHAM SECTION MARK DOUBLE RING;Po;0;L;;;;;N;;;;; +115D0;SIDDHAM SECTION MARK DOUBLE RING WITH RAYS;Po;0;L;;;;;N;;;;; +115D1;SIDDHAM SECTION MARK WITH DOUBLE CRESCENTS;Po;0;L;;;;;N;;;;; +115D2;SIDDHAM SECTION MARK WITH TRIPLE CRESCENTS;Po;0;L;;;;;N;;;;; +115D3;SIDDHAM SECTION MARK WITH QUADRUPLE CRESCENTS;Po;0;L;;;;;N;;;;; +115D4;SIDDHAM SECTION MARK WITH SEPTUPLE CRESCENTS;Po;0;L;;;;;N;;;;; +115D5;SIDDHAM SECTION MARK WITH CIRCLES AND RAYS;Po;0;L;;;;;N;;;;; +115D6;SIDDHAM SECTION MARK WITH CIRCLES AND TWO ENCLOSURES;Po;0;L;;;;;N;;;;; +115D7;SIDDHAM SECTION MARK WITH CIRCLES AND FOUR ENCLOSURES;Po;0;L;;;;;N;;;;; +115D8;SIDDHAM LETTER THREE-CIRCLE ALTERNATE I;Lo;0;L;;;;;N;;;;; +115D9;SIDDHAM LETTER TWO-CIRCLE ALTERNATE I;Lo;0;L;;;;;N;;;;; +115DA;SIDDHAM LETTER TWO-CIRCLE ALTERNATE II;Lo;0;L;;;;;N;;;;; +115DB;SIDDHAM LETTER ALTERNATE U;Lo;0;L;;;;;N;;;;; +115DC;SIDDHAM VOWEL SIGN ALTERNATE U;Mn;0;NSM;;;;;N;;;;; +115DD;SIDDHAM VOWEL SIGN ALTERNATE UU;Mn;0;NSM;;;;;N;;;;; +11600;MODI LETTER A;Lo;0;L;;;;;N;;;;; +11601;MODI LETTER AA;Lo;0;L;;;;;N;;;;; +11602;MODI LETTER I;Lo;0;L;;;;;N;;;;; +11603;MODI LETTER II;Lo;0;L;;;;;N;;;;; +11604;MODI LETTER U;Lo;0;L;;;;;N;;;;; +11605;MODI LETTER UU;Lo;0;L;;;;;N;;;;; +11606;MODI LETTER VOCALIC R;Lo;0;L;;;;;N;;;;; +11607;MODI LETTER VOCALIC RR;Lo;0;L;;;;;N;;;;; +11608;MODI LETTER VOCALIC L;Lo;0;L;;;;;N;;;;; +11609;MODI LETTER VOCALIC LL;Lo;0;L;;;;;N;;;;; +1160A;MODI LETTER E;Lo;0;L;;;;;N;;;;; +1160B;MODI LETTER AI;Lo;0;L;;;;;N;;;;; +1160C;MODI LETTER O;Lo;0;L;;;;;N;;;;; +1160D;MODI LETTER AU;Lo;0;L;;;;;N;;;;; +1160E;MODI LETTER KA;Lo;0;L;;;;;N;;;;; +1160F;MODI LETTER KHA;Lo;0;L;;;;;N;;;;; +11610;MODI LETTER GA;Lo;0;L;;;;;N;;;;; +11611;MODI LETTER GHA;Lo;0;L;;;;;N;;;;; +11612;MODI LETTER NGA;Lo;0;L;;;;;N;;;;; +11613;MODI LETTER CA;Lo;0;L;;;;;N;;;;; +11614;MODI LETTER CHA;Lo;0;L;;;;;N;;;;; +11615;MODI LETTER JA;Lo;0;L;;;;;N;;;;; +11616;MODI LETTER JHA;Lo;0;L;;;;;N;;;;; +11617;MODI LETTER NYA;Lo;0;L;;;;;N;;;;; +11618;MODI LETTER TTA;Lo;0;L;;;;;N;;;;; +11619;MODI LETTER TTHA;Lo;0;L;;;;;N;;;;; +1161A;MODI LETTER DDA;Lo;0;L;;;;;N;;;;; +1161B;MODI LETTER DDHA;Lo;0;L;;;;;N;;;;; +1161C;MODI LETTER NNA;Lo;0;L;;;;;N;;;;; +1161D;MODI LETTER TA;Lo;0;L;;;;;N;;;;; +1161E;MODI LETTER THA;Lo;0;L;;;;;N;;;;; +1161F;MODI LETTER DA;Lo;0;L;;;;;N;;;;; +11620;MODI LETTER DHA;Lo;0;L;;;;;N;;;;; +11621;MODI LETTER NA;Lo;0;L;;;;;N;;;;; +11622;MODI LETTER PA;Lo;0;L;;;;;N;;;;; +11623;MODI LETTER PHA;Lo;0;L;;;;;N;;;;; +11624;MODI LETTER BA;Lo;0;L;;;;;N;;;;; +11625;MODI LETTER BHA;Lo;0;L;;;;;N;;;;; +11626;MODI LETTER MA;Lo;0;L;;;;;N;;;;; +11627;MODI LETTER YA;Lo;0;L;;;;;N;;;;; +11628;MODI LETTER RA;Lo;0;L;;;;;N;;;;; +11629;MODI LETTER LA;Lo;0;L;;;;;N;;;;; +1162A;MODI LETTER VA;Lo;0;L;;;;;N;;;;; +1162B;MODI LETTER SHA;Lo;0;L;;;;;N;;;;; +1162C;MODI LETTER SSA;Lo;0;L;;;;;N;;;;; +1162D;MODI LETTER SA;Lo;0;L;;;;;N;;;;; +1162E;MODI LETTER HA;Lo;0;L;;;;;N;;;;; +1162F;MODI LETTER LLA;Lo;0;L;;;;;N;;;;; +11630;MODI VOWEL SIGN AA;Mc;0;L;;;;;N;;;;; +11631;MODI VOWEL SIGN I;Mc;0;L;;;;;N;;;;; +11632;MODI VOWEL SIGN II;Mc;0;L;;;;;N;;;;; +11633;MODI VOWEL SIGN U;Mn;0;NSM;;;;;N;;;;; +11634;MODI VOWEL SIGN UU;Mn;0;NSM;;;;;N;;;;; +11635;MODI VOWEL SIGN VOCALIC R;Mn;0;NSM;;;;;N;;;;; +11636;MODI VOWEL SIGN VOCALIC RR;Mn;0;NSM;;;;;N;;;;; +11637;MODI VOWEL SIGN VOCALIC L;Mn;0;NSM;;;;;N;;;;; +11638;MODI VOWEL SIGN VOCALIC LL;Mn;0;NSM;;;;;N;;;;; +11639;MODI VOWEL SIGN E;Mn;0;NSM;;;;;N;;;;; +1163A;MODI VOWEL SIGN AI;Mn;0;NSM;;;;;N;;;;; +1163B;MODI VOWEL SIGN O;Mc;0;L;;;;;N;;;;; +1163C;MODI VOWEL SIGN AU;Mc;0;L;;;;;N;;;;; +1163D;MODI SIGN ANUSVARA;Mn;0;NSM;;;;;N;;;;; +1163E;MODI SIGN VISARGA;Mc;0;L;;;;;N;;;;; +1163F;MODI SIGN VIRAMA;Mn;9;NSM;;;;;N;;;;; +11640;MODI SIGN ARDHACANDRA;Mn;0;NSM;;;;;N;;;;; +11641;MODI DANDA;Po;0;L;;;;;N;;;;; +11642;MODI DOUBLE DANDA;Po;0;L;;;;;N;;;;; +11643;MODI ABBREVIATION SIGN;Po;0;L;;;;;N;;;;; +11644;MODI SIGN HUVA;Lo;0;L;;;;;N;;;;; +11650;MODI DIGIT ZERO;Nd;0;L;;0;0;0;N;;;;; +11651;MODI DIGIT ONE;Nd;0;L;;1;1;1;N;;;;; +11652;MODI DIGIT TWO;Nd;0;L;;2;2;2;N;;;;; +11653;MODI DIGIT THREE;Nd;0;L;;3;3;3;N;;;;; +11654;MODI DIGIT FOUR;Nd;0;L;;4;4;4;N;;;;; +11655;MODI DIGIT FIVE;Nd;0;L;;5;5;5;N;;;;; +11656;MODI DIGIT SIX;Nd;0;L;;6;6;6;N;;;;; +11657;MODI DIGIT SEVEN;Nd;0;L;;7;7;7;N;;;;; +11658;MODI DIGIT EIGHT;Nd;0;L;;8;8;8;N;;;;; +11659;MODI DIGIT NINE;Nd;0;L;;9;9;9;N;;;;; +11660;MONGOLIAN BIRGA WITH ORNAMENT;Po;0;ON;;;;;N;;;;; +11661;MONGOLIAN ROTATED BIRGA;Po;0;ON;;;;;N;;;;; +11662;MONGOLIAN DOUBLE BIRGA WITH ORNAMENT;Po;0;ON;;;;;N;;;;; +11663;MONGOLIAN TRIPLE BIRGA WITH ORNAMENT;Po;0;ON;;;;;N;;;;; +11664;MONGOLIAN BIRGA WITH DOUBLE ORNAMENT;Po;0;ON;;;;;N;;;;; +11665;MONGOLIAN ROTATED BIRGA WITH ORNAMENT;Po;0;ON;;;;;N;;;;; +11666;MONGOLIAN ROTATED BIRGA WITH DOUBLE ORNAMENT;Po;0;ON;;;;;N;;;;; +11667;MONGOLIAN INVERTED BIRGA;Po;0;ON;;;;;N;;;;; +11668;MONGOLIAN INVERTED BIRGA WITH DOUBLE ORNAMENT;Po;0;ON;;;;;N;;;;; +11669;MONGOLIAN SWIRL BIRGA;Po;0;ON;;;;;N;;;;; +1166A;MONGOLIAN SWIRL BIRGA WITH ORNAMENT;Po;0;ON;;;;;N;;;;; +1166B;MONGOLIAN SWIRL BIRGA WITH DOUBLE ORNAMENT;Po;0;ON;;;;;N;;;;; +1166C;MONGOLIAN TURNED SWIRL BIRGA WITH DOUBLE ORNAMENT;Po;0;ON;;;;;N;;;;; +11680;TAKRI LETTER A;Lo;0;L;;;;;N;;;;; +11681;TAKRI LETTER AA;Lo;0;L;;;;;N;;;;; +11682;TAKRI LETTER I;Lo;0;L;;;;;N;;;;; +11683;TAKRI LETTER II;Lo;0;L;;;;;N;;;;; +11684;TAKRI LETTER U;Lo;0;L;;;;;N;;;;; +11685;TAKRI LETTER UU;Lo;0;L;;;;;N;;;;; +11686;TAKRI LETTER E;Lo;0;L;;;;;N;;;;; +11687;TAKRI LETTER AI;Lo;0;L;;;;;N;;;;; +11688;TAKRI LETTER O;Lo;0;L;;;;;N;;;;; +11689;TAKRI LETTER AU;Lo;0;L;;;;;N;;;;; +1168A;TAKRI LETTER KA;Lo;0;L;;;;;N;;;;; +1168B;TAKRI LETTER KHA;Lo;0;L;;;;;N;;;;; +1168C;TAKRI LETTER GA;Lo;0;L;;;;;N;;;;; +1168D;TAKRI LETTER GHA;Lo;0;L;;;;;N;;;;; +1168E;TAKRI LETTER NGA;Lo;0;L;;;;;N;;;;; +1168F;TAKRI LETTER CA;Lo;0;L;;;;;N;;;;; +11690;TAKRI LETTER CHA;Lo;0;L;;;;;N;;;;; +11691;TAKRI LETTER JA;Lo;0;L;;;;;N;;;;; +11692;TAKRI LETTER JHA;Lo;0;L;;;;;N;;;;; +11693;TAKRI LETTER NYA;Lo;0;L;;;;;N;;;;; +11694;TAKRI LETTER TTA;Lo;0;L;;;;;N;;;;; +11695;TAKRI LETTER TTHA;Lo;0;L;;;;;N;;;;; +11696;TAKRI LETTER DDA;Lo;0;L;;;;;N;;;;; +11697;TAKRI LETTER DDHA;Lo;0;L;;;;;N;;;;; +11698;TAKRI LETTER NNA;Lo;0;L;;;;;N;;;;; +11699;TAKRI LETTER TA;Lo;0;L;;;;;N;;;;; +1169A;TAKRI LETTER THA;Lo;0;L;;;;;N;;;;; +1169B;TAKRI LETTER DA;Lo;0;L;;;;;N;;;;; +1169C;TAKRI LETTER DHA;Lo;0;L;;;;;N;;;;; +1169D;TAKRI LETTER NA;Lo;0;L;;;;;N;;;;; +1169E;TAKRI LETTER PA;Lo;0;L;;;;;N;;;;; +1169F;TAKRI LETTER PHA;Lo;0;L;;;;;N;;;;; +116A0;TAKRI LETTER BA;Lo;0;L;;;;;N;;;;; +116A1;TAKRI LETTER BHA;Lo;0;L;;;;;N;;;;; +116A2;TAKRI LETTER MA;Lo;0;L;;;;;N;;;;; +116A3;TAKRI LETTER YA;Lo;0;L;;;;;N;;;;; +116A4;TAKRI LETTER RA;Lo;0;L;;;;;N;;;;; +116A5;TAKRI LETTER LA;Lo;0;L;;;;;N;;;;; +116A6;TAKRI LETTER VA;Lo;0;L;;;;;N;;;;; +116A7;TAKRI LETTER SHA;Lo;0;L;;;;;N;;;;; +116A8;TAKRI LETTER SA;Lo;0;L;;;;;N;;;;; +116A9;TAKRI LETTER HA;Lo;0;L;;;;;N;;;;; +116AA;TAKRI LETTER RRA;Lo;0;L;;;;;N;;;;; +116AB;TAKRI SIGN ANUSVARA;Mn;0;NSM;;;;;N;;;;; +116AC;TAKRI SIGN VISARGA;Mc;0;L;;;;;N;;;;; +116AD;TAKRI VOWEL SIGN AA;Mn;0;NSM;;;;;N;;;;; +116AE;TAKRI VOWEL SIGN I;Mc;0;L;;;;;N;;;;; +116AF;TAKRI VOWEL SIGN II;Mc;0;L;;;;;N;;;;; +116B0;TAKRI VOWEL SIGN U;Mn;0;NSM;;;;;N;;;;; +116B1;TAKRI VOWEL SIGN UU;Mn;0;NSM;;;;;N;;;;; +116B2;TAKRI VOWEL SIGN E;Mn;0;NSM;;;;;N;;;;; +116B3;TAKRI VOWEL SIGN AI;Mn;0;NSM;;;;;N;;;;; +116B4;TAKRI VOWEL SIGN O;Mn;0;NSM;;;;;N;;;;; +116B5;TAKRI VOWEL SIGN AU;Mn;0;NSM;;;;;N;;;;; +116B6;TAKRI SIGN VIRAMA;Mc;9;L;;;;;N;;;;; +116B7;TAKRI SIGN NUKTA;Mn;7;NSM;;;;;N;;;;; +116B8;TAKRI LETTER ARCHAIC KHA;Lo;0;L;;;;;N;;;;; +116C0;TAKRI DIGIT ZERO;Nd;0;L;;0;0;0;N;;;;; +116C1;TAKRI DIGIT ONE;Nd;0;L;;1;1;1;N;;;;; +116C2;TAKRI DIGIT TWO;Nd;0;L;;2;2;2;N;;;;; +116C3;TAKRI DIGIT THREE;Nd;0;L;;3;3;3;N;;;;; +116C4;TAKRI DIGIT FOUR;Nd;0;L;;4;4;4;N;;;;; +116C5;TAKRI DIGIT FIVE;Nd;0;L;;5;5;5;N;;;;; +116C6;TAKRI DIGIT SIX;Nd;0;L;;6;6;6;N;;;;; +116C7;TAKRI DIGIT SEVEN;Nd;0;L;;7;7;7;N;;;;; +116C8;TAKRI DIGIT EIGHT;Nd;0;L;;8;8;8;N;;;;; +116C9;TAKRI DIGIT NINE;Nd;0;L;;9;9;9;N;;;;; +11700;AHOM LETTER KA;Lo;0;L;;;;;N;;;;; +11701;AHOM LETTER KHA;Lo;0;L;;;;;N;;;;; +11702;AHOM LETTER NGA;Lo;0;L;;;;;N;;;;; +11703;AHOM LETTER NA;Lo;0;L;;;;;N;;;;; +11704;AHOM LETTER TA;Lo;0;L;;;;;N;;;;; +11705;AHOM LETTER ALTERNATE TA;Lo;0;L;;;;;N;;;;; +11706;AHOM LETTER PA;Lo;0;L;;;;;N;;;;; +11707;AHOM LETTER PHA;Lo;0;L;;;;;N;;;;; +11708;AHOM LETTER BA;Lo;0;L;;;;;N;;;;; +11709;AHOM LETTER MA;Lo;0;L;;;;;N;;;;; +1170A;AHOM LETTER JA;Lo;0;L;;;;;N;;;;; +1170B;AHOM LETTER CHA;Lo;0;L;;;;;N;;;;; +1170C;AHOM LETTER THA;Lo;0;L;;;;;N;;;;; +1170D;AHOM LETTER RA;Lo;0;L;;;;;N;;;;; +1170E;AHOM LETTER LA;Lo;0;L;;;;;N;;;;; +1170F;AHOM LETTER SA;Lo;0;L;;;;;N;;;;; +11710;AHOM LETTER NYA;Lo;0;L;;;;;N;;;;; +11711;AHOM LETTER HA;Lo;0;L;;;;;N;;;;; +11712;AHOM LETTER A;Lo;0;L;;;;;N;;;;; +11713;AHOM LETTER DA;Lo;0;L;;;;;N;;;;; +11714;AHOM LETTER DHA;Lo;0;L;;;;;N;;;;; +11715;AHOM LETTER GA;Lo;0;L;;;;;N;;;;; +11716;AHOM LETTER ALTERNATE GA;Lo;0;L;;;;;N;;;;; +11717;AHOM LETTER GHA;Lo;0;L;;;;;N;;;;; +11718;AHOM LETTER BHA;Lo;0;L;;;;;N;;;;; +11719;AHOM LETTER JHA;Lo;0;L;;;;;N;;;;; +1171A;AHOM LETTER ALTERNATE BA;Lo;0;L;;;;;N;;;;; +1171D;AHOM CONSONANT SIGN MEDIAL LA;Mn;0;NSM;;;;;N;;;;; +1171E;AHOM CONSONANT SIGN MEDIAL RA;Mn;0;NSM;;;;;N;;;;; +1171F;AHOM CONSONANT SIGN MEDIAL LIGATING RA;Mn;0;NSM;;;;;N;;;;; +11720;AHOM VOWEL SIGN A;Mc;0;L;;;;;N;;;;; +11721;AHOM VOWEL SIGN AA;Mc;0;L;;;;;N;;;;; +11722;AHOM VOWEL SIGN I;Mn;0;NSM;;;;;N;;;;; +11723;AHOM VOWEL SIGN II;Mn;0;NSM;;;;;N;;;;; +11724;AHOM VOWEL SIGN U;Mn;0;NSM;;;;;N;;;;; +11725;AHOM VOWEL SIGN UU;Mn;0;NSM;;;;;N;;;;; +11726;AHOM VOWEL SIGN E;Mc;0;L;;;;;N;;;;; +11727;AHOM VOWEL SIGN AW;Mn;0;NSM;;;;;N;;;;; +11728;AHOM VOWEL SIGN O;Mn;0;NSM;;;;;N;;;;; +11729;AHOM VOWEL SIGN AI;Mn;0;NSM;;;;;N;;;;; +1172A;AHOM VOWEL SIGN AM;Mn;0;NSM;;;;;N;;;;; +1172B;AHOM SIGN KILLER;Mn;9;NSM;;;;;N;;;;; +11730;AHOM DIGIT ZERO;Nd;0;L;;0;0;0;N;;;;; +11731;AHOM DIGIT ONE;Nd;0;L;;1;1;1;N;;;;; +11732;AHOM DIGIT TWO;Nd;0;L;;2;2;2;N;;;;; +11733;AHOM DIGIT THREE;Nd;0;L;;3;3;3;N;;;;; +11734;AHOM DIGIT FOUR;Nd;0;L;;4;4;4;N;;;;; +11735;AHOM DIGIT FIVE;Nd;0;L;;5;5;5;N;;;;; +11736;AHOM DIGIT SIX;Nd;0;L;;6;6;6;N;;;;; +11737;AHOM DIGIT SEVEN;Nd;0;L;;7;7;7;N;;;;; +11738;AHOM DIGIT EIGHT;Nd;0;L;;8;8;8;N;;;;; +11739;AHOM DIGIT NINE;Nd;0;L;;9;9;9;N;;;;; +1173A;AHOM NUMBER TEN;No;0;L;;;;10;N;;;;; +1173B;AHOM NUMBER TWENTY;No;0;L;;;;20;N;;;;; +1173C;AHOM SIGN SMALL SECTION;Po;0;L;;;;;N;;;;; +1173D;AHOM SIGN SECTION;Po;0;L;;;;;N;;;;; +1173E;AHOM SIGN RULAI;Po;0;L;;;;;N;;;;; +1173F;AHOM SYMBOL VI;So;0;L;;;;;N;;;;; +11800;DOGRA LETTER A;Lo;0;L;;;;;N;;;;; +11801;DOGRA LETTER AA;Lo;0;L;;;;;N;;;;; +11802;DOGRA LETTER I;Lo;0;L;;;;;N;;;;; +11803;DOGRA LETTER II;Lo;0;L;;;;;N;;;;; +11804;DOGRA LETTER U;Lo;0;L;;;;;N;;;;; +11805;DOGRA LETTER UU;Lo;0;L;;;;;N;;;;; +11806;DOGRA LETTER E;Lo;0;L;;;;;N;;;;; +11807;DOGRA LETTER AI;Lo;0;L;;;;;N;;;;; +11808;DOGRA LETTER O;Lo;0;L;;;;;N;;;;; +11809;DOGRA LETTER AU;Lo;0;L;;;;;N;;;;; +1180A;DOGRA LETTER KA;Lo;0;L;;;;;N;;;;; +1180B;DOGRA LETTER KHA;Lo;0;L;;;;;N;;;;; +1180C;DOGRA LETTER GA;Lo;0;L;;;;;N;;;;; +1180D;DOGRA LETTER GHA;Lo;0;L;;;;;N;;;;; +1180E;DOGRA LETTER NGA;Lo;0;L;;;;;N;;;;; +1180F;DOGRA LETTER CA;Lo;0;L;;;;;N;;;;; +11810;DOGRA LETTER CHA;Lo;0;L;;;;;N;;;;; +11811;DOGRA LETTER JA;Lo;0;L;;;;;N;;;;; +11812;DOGRA LETTER JHA;Lo;0;L;;;;;N;;;;; +11813;DOGRA LETTER NYA;Lo;0;L;;;;;N;;;;; +11814;DOGRA LETTER TTA;Lo;0;L;;;;;N;;;;; +11815;DOGRA LETTER TTHA;Lo;0;L;;;;;N;;;;; +11816;DOGRA LETTER DDA;Lo;0;L;;;;;N;;;;; +11817;DOGRA LETTER DDHA;Lo;0;L;;;;;N;;;;; +11818;DOGRA LETTER NNA;Lo;0;L;;;;;N;;;;; +11819;DOGRA LETTER TA;Lo;0;L;;;;;N;;;;; +1181A;DOGRA LETTER THA;Lo;0;L;;;;;N;;;;; +1181B;DOGRA LETTER DA;Lo;0;L;;;;;N;;;;; +1181C;DOGRA LETTER DHA;Lo;0;L;;;;;N;;;;; +1181D;DOGRA LETTER NA;Lo;0;L;;;;;N;;;;; +1181E;DOGRA LETTER PA;Lo;0;L;;;;;N;;;;; +1181F;DOGRA LETTER PHA;Lo;0;L;;;;;N;;;;; +11820;DOGRA LETTER BA;Lo;0;L;;;;;N;;;;; +11821;DOGRA LETTER BHA;Lo;0;L;;;;;N;;;;; +11822;DOGRA LETTER MA;Lo;0;L;;;;;N;;;;; +11823;DOGRA LETTER YA;Lo;0;L;;;;;N;;;;; +11824;DOGRA LETTER RA;Lo;0;L;;;;;N;;;;; +11825;DOGRA LETTER LA;Lo;0;L;;;;;N;;;;; +11826;DOGRA LETTER VA;Lo;0;L;;;;;N;;;;; +11827;DOGRA LETTER SHA;Lo;0;L;;;;;N;;;;; +11828;DOGRA LETTER SSA;Lo;0;L;;;;;N;;;;; +11829;DOGRA LETTER SA;Lo;0;L;;;;;N;;;;; +1182A;DOGRA LETTER HA;Lo;0;L;;;;;N;;;;; +1182B;DOGRA LETTER RRA;Lo;0;L;;;;;N;;;;; +1182C;DOGRA VOWEL SIGN AA;Mc;0;L;;;;;N;;;;; +1182D;DOGRA VOWEL SIGN I;Mc;0;L;;;;;N;;;;; +1182E;DOGRA VOWEL SIGN II;Mc;0;L;;;;;N;;;;; +1182F;DOGRA VOWEL SIGN U;Mn;0;NSM;;;;;N;;;;; +11830;DOGRA VOWEL SIGN UU;Mn;0;NSM;;;;;N;;;;; +11831;DOGRA VOWEL SIGN VOCALIC R;Mn;0;NSM;;;;;N;;;;; +11832;DOGRA VOWEL SIGN VOCALIC RR;Mn;0;NSM;;;;;N;;;;; +11833;DOGRA VOWEL SIGN E;Mn;0;NSM;;;;;N;;;;; +11834;DOGRA VOWEL SIGN AI;Mn;0;NSM;;;;;N;;;;; +11835;DOGRA VOWEL SIGN O;Mn;0;NSM;;;;;N;;;;; +11836;DOGRA VOWEL SIGN AU;Mn;0;NSM;;;;;N;;;;; +11837;DOGRA SIGN ANUSVARA;Mn;0;NSM;;;;;N;;;;; +11838;DOGRA SIGN VISARGA;Mc;0;L;;;;;N;;;;; +11839;DOGRA SIGN VIRAMA;Mn;9;NSM;;;;;N;;;;; +1183A;DOGRA SIGN NUKTA;Mn;7;NSM;;;;;N;;;;; +1183B;DOGRA ABBREVIATION SIGN;Po;0;L;;;;;N;;;;; +118A0;WARANG CITI CAPITAL LETTER NGAA;Lu;0;L;;;;;N;;;;118C0; +118A1;WARANG CITI CAPITAL LETTER A;Lu;0;L;;;;;N;;;;118C1; +118A2;WARANG CITI CAPITAL LETTER WI;Lu;0;L;;;;;N;;;;118C2; +118A3;WARANG CITI CAPITAL LETTER YU;Lu;0;L;;;;;N;;;;118C3; +118A4;WARANG CITI CAPITAL LETTER YA;Lu;0;L;;;;;N;;;;118C4; +118A5;WARANG CITI CAPITAL LETTER YO;Lu;0;L;;;;;N;;;;118C5; +118A6;WARANG CITI CAPITAL LETTER II;Lu;0;L;;;;;N;;;;118C6; +118A7;WARANG CITI CAPITAL LETTER UU;Lu;0;L;;;;;N;;;;118C7; +118A8;WARANG CITI CAPITAL LETTER E;Lu;0;L;;;;;N;;;;118C8; +118A9;WARANG CITI CAPITAL LETTER O;Lu;0;L;;;;;N;;;;118C9; +118AA;WARANG CITI CAPITAL LETTER ANG;Lu;0;L;;;;;N;;;;118CA; +118AB;WARANG CITI CAPITAL LETTER GA;Lu;0;L;;;;;N;;;;118CB; +118AC;WARANG CITI CAPITAL LETTER KO;Lu;0;L;;;;;N;;;;118CC; +118AD;WARANG CITI CAPITAL LETTER ENY;Lu;0;L;;;;;N;;;;118CD; +118AE;WARANG CITI CAPITAL LETTER YUJ;Lu;0;L;;;;;N;;;;118CE; +118AF;WARANG CITI CAPITAL LETTER UC;Lu;0;L;;;;;N;;;;118CF; +118B0;WARANG CITI CAPITAL LETTER ENN;Lu;0;L;;;;;N;;;;118D0; +118B1;WARANG CITI CAPITAL LETTER ODD;Lu;0;L;;;;;N;;;;118D1; +118B2;WARANG CITI CAPITAL LETTER TTE;Lu;0;L;;;;;N;;;;118D2; +118B3;WARANG CITI CAPITAL LETTER NUNG;Lu;0;L;;;;;N;;;;118D3; +118B4;WARANG CITI CAPITAL LETTER DA;Lu;0;L;;;;;N;;;;118D4; +118B5;WARANG CITI CAPITAL LETTER AT;Lu;0;L;;;;;N;;;;118D5; +118B6;WARANG CITI CAPITAL LETTER AM;Lu;0;L;;;;;N;;;;118D6; +118B7;WARANG CITI CAPITAL LETTER BU;Lu;0;L;;;;;N;;;;118D7; +118B8;WARANG CITI CAPITAL LETTER PU;Lu;0;L;;;;;N;;;;118D8; +118B9;WARANG CITI CAPITAL LETTER HIYO;Lu;0;L;;;;;N;;;;118D9; +118BA;WARANG CITI CAPITAL LETTER HOLO;Lu;0;L;;;;;N;;;;118DA; +118BB;WARANG CITI CAPITAL LETTER HORR;Lu;0;L;;;;;N;;;;118DB; +118BC;WARANG CITI CAPITAL LETTER HAR;Lu;0;L;;;;;N;;;;118DC; +118BD;WARANG CITI CAPITAL LETTER SSUU;Lu;0;L;;;;;N;;;;118DD; +118BE;WARANG CITI CAPITAL LETTER SII;Lu;0;L;;;;;N;;;;118DE; +118BF;WARANG CITI CAPITAL LETTER VIYO;Lu;0;L;;;;;N;;;;118DF; +118C0;WARANG CITI SMALL LETTER NGAA;Ll;0;L;;;;;N;;;118A0;;118A0 +118C1;WARANG CITI SMALL LETTER A;Ll;0;L;;;;;N;;;118A1;;118A1 +118C2;WARANG CITI SMALL LETTER WI;Ll;0;L;;;;;N;;;118A2;;118A2 +118C3;WARANG CITI SMALL LETTER YU;Ll;0;L;;;;;N;;;118A3;;118A3 +118C4;WARANG CITI SMALL LETTER YA;Ll;0;L;;;;;N;;;118A4;;118A4 +118C5;WARANG CITI SMALL LETTER YO;Ll;0;L;;;;;N;;;118A5;;118A5 +118C6;WARANG CITI SMALL LETTER II;Ll;0;L;;;;;N;;;118A6;;118A6 +118C7;WARANG CITI SMALL LETTER UU;Ll;0;L;;;;;N;;;118A7;;118A7 +118C8;WARANG CITI SMALL LETTER E;Ll;0;L;;;;;N;;;118A8;;118A8 +118C9;WARANG CITI SMALL LETTER O;Ll;0;L;;;;;N;;;118A9;;118A9 +118CA;WARANG CITI SMALL LETTER ANG;Ll;0;L;;;;;N;;;118AA;;118AA +118CB;WARANG CITI SMALL LETTER GA;Ll;0;L;;;;;N;;;118AB;;118AB +118CC;WARANG CITI SMALL LETTER KO;Ll;0;L;;;;;N;;;118AC;;118AC +118CD;WARANG CITI SMALL LETTER ENY;Ll;0;L;;;;;N;;;118AD;;118AD +118CE;WARANG CITI SMALL LETTER YUJ;Ll;0;L;;;;;N;;;118AE;;118AE +118CF;WARANG CITI SMALL LETTER UC;Ll;0;L;;;;;N;;;118AF;;118AF +118D0;WARANG CITI SMALL LETTER ENN;Ll;0;L;;;;;N;;;118B0;;118B0 +118D1;WARANG CITI SMALL LETTER ODD;Ll;0;L;;;;;N;;;118B1;;118B1 +118D2;WARANG CITI SMALL LETTER TTE;Ll;0;L;;;;;N;;;118B2;;118B2 +118D3;WARANG CITI SMALL LETTER NUNG;Ll;0;L;;;;;N;;;118B3;;118B3 +118D4;WARANG CITI SMALL LETTER DA;Ll;0;L;;;;;N;;;118B4;;118B4 +118D5;WARANG CITI SMALL LETTER AT;Ll;0;L;;;;;N;;;118B5;;118B5 +118D6;WARANG CITI SMALL LETTER AM;Ll;0;L;;;;;N;;;118B6;;118B6 +118D7;WARANG CITI SMALL LETTER BU;Ll;0;L;;;;;N;;;118B7;;118B7 +118D8;WARANG CITI SMALL LETTER PU;Ll;0;L;;;;;N;;;118B8;;118B8 +118D9;WARANG CITI SMALL LETTER HIYO;Ll;0;L;;;;;N;;;118B9;;118B9 +118DA;WARANG CITI SMALL LETTER HOLO;Ll;0;L;;;;;N;;;118BA;;118BA +118DB;WARANG CITI SMALL LETTER HORR;Ll;0;L;;;;;N;;;118BB;;118BB +118DC;WARANG CITI SMALL LETTER HAR;Ll;0;L;;;;;N;;;118BC;;118BC +118DD;WARANG CITI SMALL LETTER SSUU;Ll;0;L;;;;;N;;;118BD;;118BD +118DE;WARANG CITI SMALL LETTER SII;Ll;0;L;;;;;N;;;118BE;;118BE +118DF;WARANG CITI SMALL LETTER VIYO;Ll;0;L;;;;;N;;;118BF;;118BF +118E0;WARANG CITI DIGIT ZERO;Nd;0;L;;0;0;0;N;;;;; +118E1;WARANG CITI DIGIT ONE;Nd;0;L;;1;1;1;N;;;;; +118E2;WARANG CITI DIGIT TWO;Nd;0;L;;2;2;2;N;;;;; +118E3;WARANG CITI DIGIT THREE;Nd;0;L;;3;3;3;N;;;;; +118E4;WARANG CITI DIGIT FOUR;Nd;0;L;;4;4;4;N;;;;; +118E5;WARANG CITI DIGIT FIVE;Nd;0;L;;5;5;5;N;;;;; +118E6;WARANG CITI DIGIT SIX;Nd;0;L;;6;6;6;N;;;;; +118E7;WARANG CITI DIGIT SEVEN;Nd;0;L;;7;7;7;N;;;;; +118E8;WARANG CITI DIGIT EIGHT;Nd;0;L;;8;8;8;N;;;;; +118E9;WARANG CITI DIGIT NINE;Nd;0;L;;9;9;9;N;;;;; +118EA;WARANG CITI NUMBER TEN;No;0;L;;;;10;N;;;;; +118EB;WARANG CITI NUMBER TWENTY;No;0;L;;;;20;N;;;;; +118EC;WARANG CITI NUMBER THIRTY;No;0;L;;;;30;N;;;;; +118ED;WARANG CITI NUMBER FORTY;No;0;L;;;;40;N;;;;; +118EE;WARANG CITI NUMBER FIFTY;No;0;L;;;;50;N;;;;; +118EF;WARANG CITI NUMBER SIXTY;No;0;L;;;;60;N;;;;; +118F0;WARANG CITI NUMBER SEVENTY;No;0;L;;;;70;N;;;;; +118F1;WARANG CITI NUMBER EIGHTY;No;0;L;;;;80;N;;;;; +118F2;WARANG CITI NUMBER NINETY;No;0;L;;;;90;N;;;;; +118FF;WARANG CITI OM;Lo;0;L;;;;;N;;;;; +119A0;NANDINAGARI LETTER A;Lo;0;L;;;;;N;;;;; +119A1;NANDINAGARI LETTER AA;Lo;0;L;;;;;N;;;;; +119A2;NANDINAGARI LETTER I;Lo;0;L;;;;;N;;;;; +119A3;NANDINAGARI LETTER II;Lo;0;L;;;;;N;;;;; +119A4;NANDINAGARI LETTER U;Lo;0;L;;;;;N;;;;; +119A5;NANDINAGARI LETTER UU;Lo;0;L;;;;;N;;;;; +119A6;NANDINAGARI LETTER VOCALIC R;Lo;0;L;;;;;N;;;;; +119A7;NANDINAGARI LETTER VOCALIC RR;Lo;0;L;;;;;N;;;;; +119AA;NANDINAGARI LETTER E;Lo;0;L;;;;;N;;;;; +119AB;NANDINAGARI LETTER AI;Lo;0;L;;;;;N;;;;; +119AC;NANDINAGARI LETTER O;Lo;0;L;;;;;N;;;;; +119AD;NANDINAGARI LETTER AU;Lo;0;L;;;;;N;;;;; +119AE;NANDINAGARI LETTER KA;Lo;0;L;;;;;N;;;;; +119AF;NANDINAGARI LETTER KHA;Lo;0;L;;;;;N;;;;; +119B0;NANDINAGARI LETTER GA;Lo;0;L;;;;;N;;;;; +119B1;NANDINAGARI LETTER GHA;Lo;0;L;;;;;N;;;;; +119B2;NANDINAGARI LETTER NGA;Lo;0;L;;;;;N;;;;; +119B3;NANDINAGARI LETTER CA;Lo;0;L;;;;;N;;;;; +119B4;NANDINAGARI LETTER CHA;Lo;0;L;;;;;N;;;;; +119B5;NANDINAGARI LETTER JA;Lo;0;L;;;;;N;;;;; +119B6;NANDINAGARI LETTER JHA;Lo;0;L;;;;;N;;;;; +119B7;NANDINAGARI LETTER NYA;Lo;0;L;;;;;N;;;;; +119B8;NANDINAGARI LETTER TTA;Lo;0;L;;;;;N;;;;; +119B9;NANDINAGARI LETTER TTHA;Lo;0;L;;;;;N;;;;; +119BA;NANDINAGARI LETTER DDA;Lo;0;L;;;;;N;;;;; +119BB;NANDINAGARI LETTER DDHA;Lo;0;L;;;;;N;;;;; +119BC;NANDINAGARI LETTER NNA;Lo;0;L;;;;;N;;;;; +119BD;NANDINAGARI LETTER TA;Lo;0;L;;;;;N;;;;; +119BE;NANDINAGARI LETTER THA;Lo;0;L;;;;;N;;;;; +119BF;NANDINAGARI LETTER DA;Lo;0;L;;;;;N;;;;; +119C0;NANDINAGARI LETTER DHA;Lo;0;L;;;;;N;;;;; +119C1;NANDINAGARI LETTER NA;Lo;0;L;;;;;N;;;;; +119C2;NANDINAGARI LETTER PA;Lo;0;L;;;;;N;;;;; +119C3;NANDINAGARI LETTER PHA;Lo;0;L;;;;;N;;;;; +119C4;NANDINAGARI LETTER BA;Lo;0;L;;;;;N;;;;; +119C5;NANDINAGARI LETTER BHA;Lo;0;L;;;;;N;;;;; +119C6;NANDINAGARI LETTER MA;Lo;0;L;;;;;N;;;;; +119C7;NANDINAGARI LETTER YA;Lo;0;L;;;;;N;;;;; +119C8;NANDINAGARI LETTER RA;Lo;0;L;;;;;N;;;;; +119C9;NANDINAGARI LETTER LA;Lo;0;L;;;;;N;;;;; +119CA;NANDINAGARI LETTER VA;Lo;0;L;;;;;N;;;;; +119CB;NANDINAGARI LETTER SHA;Lo;0;L;;;;;N;;;;; +119CC;NANDINAGARI LETTER SSA;Lo;0;L;;;;;N;;;;; +119CD;NANDINAGARI LETTER SA;Lo;0;L;;;;;N;;;;; +119CE;NANDINAGARI LETTER HA;Lo;0;L;;;;;N;;;;; +119CF;NANDINAGARI LETTER LLA;Lo;0;L;;;;;N;;;;; +119D0;NANDINAGARI LETTER RRA;Lo;0;L;;;;;N;;;;; +119D1;NANDINAGARI VOWEL SIGN AA;Mc;0;L;;;;;N;;;;; +119D2;NANDINAGARI VOWEL SIGN I;Mc;0;L;;;;;N;;;;; +119D3;NANDINAGARI VOWEL SIGN II;Mc;0;L;;;;;N;;;;; +119D4;NANDINAGARI VOWEL SIGN U;Mn;0;NSM;;;;;N;;;;; +119D5;NANDINAGARI VOWEL SIGN UU;Mn;0;NSM;;;;;N;;;;; +119D6;NANDINAGARI VOWEL SIGN VOCALIC R;Mn;0;NSM;;;;;N;;;;; +119D7;NANDINAGARI VOWEL SIGN VOCALIC RR;Mn;0;NSM;;;;;N;;;;; +119DA;NANDINAGARI VOWEL SIGN E;Mn;0;NSM;;;;;N;;;;; +119DB;NANDINAGARI VOWEL SIGN AI;Mn;0;NSM;;;;;N;;;;; +119DC;NANDINAGARI VOWEL SIGN O;Mc;0;L;;;;;N;;;;; +119DD;NANDINAGARI VOWEL SIGN AU;Mc;0;L;;;;;N;;;;; +119DE;NANDINAGARI SIGN ANUSVARA;Mc;0;L;;;;;N;;;;; +119DF;NANDINAGARI SIGN VISARGA;Mc;0;L;;;;;N;;;;; +119E0;NANDINAGARI SIGN VIRAMA;Mn;9;NSM;;;;;N;;;;; +119E1;NANDINAGARI SIGN AVAGRAHA;Lo;0;L;;;;;N;;;;; +119E2;NANDINAGARI SIGN SIDDHAM;Po;0;L;;;;;N;;;;; +119E3;NANDINAGARI HEADSTROKE;Lo;0;L;;;;;N;;;;; +119E4;NANDINAGARI VOWEL SIGN PRISHTHAMATRA E;Mc;0;L;;;;;N;;;;; +11A00;ZANABAZAR SQUARE LETTER A;Lo;0;L;;;;;N;;;;; +11A01;ZANABAZAR SQUARE VOWEL SIGN I;Mn;0;NSM;;;;;N;;;;; +11A02;ZANABAZAR SQUARE VOWEL SIGN UE;Mn;0;NSM;;;;;N;;;;; +11A03;ZANABAZAR SQUARE VOWEL SIGN U;Mn;0;NSM;;;;;N;;;;; +11A04;ZANABAZAR SQUARE VOWEL SIGN E;Mn;0;NSM;;;;;N;;;;; +11A05;ZANABAZAR SQUARE VOWEL SIGN OE;Mn;0;NSM;;;;;N;;;;; +11A06;ZANABAZAR SQUARE VOWEL SIGN O;Mn;0;NSM;;;;;N;;;;; +11A07;ZANABAZAR SQUARE VOWEL SIGN AI;Mn;0;L;;;;;N;;;;; +11A08;ZANABAZAR SQUARE VOWEL SIGN AU;Mn;0;L;;;;;N;;;;; +11A09;ZANABAZAR SQUARE VOWEL SIGN REVERSED I;Mn;0;NSM;;;;;N;;;;; +11A0A;ZANABAZAR SQUARE VOWEL LENGTH MARK;Mn;0;NSM;;;;;N;;;;; +11A0B;ZANABAZAR SQUARE LETTER KA;Lo;0;L;;;;;N;;;;; +11A0C;ZANABAZAR SQUARE LETTER KHA;Lo;0;L;;;;;N;;;;; +11A0D;ZANABAZAR SQUARE LETTER GA;Lo;0;L;;;;;N;;;;; +11A0E;ZANABAZAR SQUARE LETTER GHA;Lo;0;L;;;;;N;;;;; +11A0F;ZANABAZAR SQUARE LETTER NGA;Lo;0;L;;;;;N;;;;; +11A10;ZANABAZAR SQUARE LETTER CA;Lo;0;L;;;;;N;;;;; +11A11;ZANABAZAR SQUARE LETTER CHA;Lo;0;L;;;;;N;;;;; +11A12;ZANABAZAR SQUARE LETTER JA;Lo;0;L;;;;;N;;;;; +11A13;ZANABAZAR SQUARE LETTER NYA;Lo;0;L;;;;;N;;;;; +11A14;ZANABAZAR SQUARE LETTER TTA;Lo;0;L;;;;;N;;;;; +11A15;ZANABAZAR SQUARE LETTER TTHA;Lo;0;L;;;;;N;;;;; +11A16;ZANABAZAR SQUARE LETTER DDA;Lo;0;L;;;;;N;;;;; +11A17;ZANABAZAR SQUARE LETTER DDHA;Lo;0;L;;;;;N;;;;; +11A18;ZANABAZAR SQUARE LETTER NNA;Lo;0;L;;;;;N;;;;; +11A19;ZANABAZAR SQUARE LETTER TA;Lo;0;L;;;;;N;;;;; +11A1A;ZANABAZAR SQUARE LETTER THA;Lo;0;L;;;;;N;;;;; +11A1B;ZANABAZAR SQUARE LETTER DA;Lo;0;L;;;;;N;;;;; +11A1C;ZANABAZAR SQUARE LETTER DHA;Lo;0;L;;;;;N;;;;; +11A1D;ZANABAZAR SQUARE LETTER NA;Lo;0;L;;;;;N;;;;; +11A1E;ZANABAZAR SQUARE LETTER PA;Lo;0;L;;;;;N;;;;; +11A1F;ZANABAZAR SQUARE LETTER PHA;Lo;0;L;;;;;N;;;;; +11A20;ZANABAZAR SQUARE LETTER BA;Lo;0;L;;;;;N;;;;; +11A21;ZANABAZAR SQUARE LETTER BHA;Lo;0;L;;;;;N;;;;; +11A22;ZANABAZAR SQUARE LETTER MA;Lo;0;L;;;;;N;;;;; +11A23;ZANABAZAR SQUARE LETTER TSA;Lo;0;L;;;;;N;;;;; +11A24;ZANABAZAR SQUARE LETTER TSHA;Lo;0;L;;;;;N;;;;; +11A25;ZANABAZAR SQUARE LETTER DZA;Lo;0;L;;;;;N;;;;; +11A26;ZANABAZAR SQUARE LETTER DZHA;Lo;0;L;;;;;N;;;;; +11A27;ZANABAZAR SQUARE LETTER ZHA;Lo;0;L;;;;;N;;;;; +11A28;ZANABAZAR SQUARE LETTER ZA;Lo;0;L;;;;;N;;;;; +11A29;ZANABAZAR SQUARE LETTER -A;Lo;0;L;;;;;N;;;;; +11A2A;ZANABAZAR SQUARE LETTER YA;Lo;0;L;;;;;N;;;;; +11A2B;ZANABAZAR SQUARE LETTER RA;Lo;0;L;;;;;N;;;;; +11A2C;ZANABAZAR SQUARE LETTER LA;Lo;0;L;;;;;N;;;;; +11A2D;ZANABAZAR SQUARE LETTER VA;Lo;0;L;;;;;N;;;;; +11A2E;ZANABAZAR SQUARE LETTER SHA;Lo;0;L;;;;;N;;;;; +11A2F;ZANABAZAR SQUARE LETTER SSA;Lo;0;L;;;;;N;;;;; +11A30;ZANABAZAR SQUARE LETTER SA;Lo;0;L;;;;;N;;;;; +11A31;ZANABAZAR SQUARE LETTER HA;Lo;0;L;;;;;N;;;;; +11A32;ZANABAZAR SQUARE LETTER KSSA;Lo;0;L;;;;;N;;;;; +11A33;ZANABAZAR SQUARE FINAL CONSONANT MARK;Mn;0;NSM;;;;;N;;;;; +11A34;ZANABAZAR SQUARE SIGN VIRAMA;Mn;9;NSM;;;;;N;;;;; +11A35;ZANABAZAR SQUARE SIGN CANDRABINDU;Mn;0;NSM;;;;;N;;;;; +11A36;ZANABAZAR SQUARE SIGN CANDRABINDU WITH ORNAMENT;Mn;0;NSM;;;;;N;;;;; +11A37;ZANABAZAR SQUARE SIGN CANDRA WITH ORNAMENT;Mn;0;NSM;;;;;N;;;;; +11A38;ZANABAZAR SQUARE SIGN ANUSVARA;Mn;0;NSM;;;;;N;;;;; +11A39;ZANABAZAR SQUARE SIGN VISARGA;Mc;0;L;;;;;N;;;;; +11A3A;ZANABAZAR SQUARE CLUSTER-INITIAL LETTER RA;Lo;0;L;;;;;N;;;;; +11A3B;ZANABAZAR SQUARE CLUSTER-FINAL LETTER YA;Mn;0;NSM;;;;;N;;;;; +11A3C;ZANABAZAR SQUARE CLUSTER-FINAL LETTER RA;Mn;0;NSM;;;;;N;;;;; +11A3D;ZANABAZAR SQUARE CLUSTER-FINAL LETTER LA;Mn;0;NSM;;;;;N;;;;; +11A3E;ZANABAZAR SQUARE CLUSTER-FINAL LETTER VA;Mn;0;NSM;;;;;N;;;;; +11A3F;ZANABAZAR SQUARE INITIAL HEAD MARK;Po;0;L;;;;;N;;;;; +11A40;ZANABAZAR SQUARE CLOSING HEAD MARK;Po;0;L;;;;;N;;;;; +11A41;ZANABAZAR SQUARE MARK TSHEG;Po;0;L;;;;;N;;;;; +11A42;ZANABAZAR SQUARE MARK SHAD;Po;0;L;;;;;N;;;;; +11A43;ZANABAZAR SQUARE MARK DOUBLE SHAD;Po;0;L;;;;;N;;;;; +11A44;ZANABAZAR SQUARE MARK LONG TSHEG;Po;0;L;;;;;N;;;;; +11A45;ZANABAZAR SQUARE INITIAL DOUBLE-LINED HEAD MARK;Po;0;L;;;;;N;;;;; +11A46;ZANABAZAR SQUARE CLOSING DOUBLE-LINED HEAD MARK;Po;0;L;;;;;N;;;;; +11A47;ZANABAZAR SQUARE SUBJOINER;Mn;9;NSM;;;;;N;;;;; +11A50;SOYOMBO LETTER A;Lo;0;L;;;;;N;;;;; +11A51;SOYOMBO VOWEL SIGN I;Mn;0;NSM;;;;;N;;;;; +11A52;SOYOMBO VOWEL SIGN UE;Mn;0;NSM;;;;;N;;;;; +11A53;SOYOMBO VOWEL SIGN U;Mn;0;NSM;;;;;N;;;;; +11A54;SOYOMBO VOWEL SIGN E;Mn;0;NSM;;;;;N;;;;; +11A55;SOYOMBO VOWEL SIGN O;Mn;0;NSM;;;;;N;;;;; +11A56;SOYOMBO VOWEL SIGN OE;Mn;0;NSM;;;;;N;;;;; +11A57;SOYOMBO VOWEL SIGN AI;Mc;0;L;;;;;N;;;;; +11A58;SOYOMBO VOWEL SIGN AU;Mc;0;L;;;;;N;;;;; +11A59;SOYOMBO VOWEL SIGN VOCALIC R;Mn;0;NSM;;;;;N;;;;; +11A5A;SOYOMBO VOWEL SIGN VOCALIC L;Mn;0;NSM;;;;;N;;;;; +11A5B;SOYOMBO VOWEL LENGTH MARK;Mn;0;NSM;;;;;N;;;;; +11A5C;SOYOMBO LETTER KA;Lo;0;L;;;;;N;;;;; +11A5D;SOYOMBO LETTER KHA;Lo;0;L;;;;;N;;;;; +11A5E;SOYOMBO LETTER GA;Lo;0;L;;;;;N;;;;; +11A5F;SOYOMBO LETTER GHA;Lo;0;L;;;;;N;;;;; +11A60;SOYOMBO LETTER NGA;Lo;0;L;;;;;N;;;;; +11A61;SOYOMBO LETTER CA;Lo;0;L;;;;;N;;;;; +11A62;SOYOMBO LETTER CHA;Lo;0;L;;;;;N;;;;; +11A63;SOYOMBO LETTER JA;Lo;0;L;;;;;N;;;;; +11A64;SOYOMBO LETTER JHA;Lo;0;L;;;;;N;;;;; +11A65;SOYOMBO LETTER NYA;Lo;0;L;;;;;N;;;;; +11A66;SOYOMBO LETTER TTA;Lo;0;L;;;;;N;;;;; +11A67;SOYOMBO LETTER TTHA;Lo;0;L;;;;;N;;;;; +11A68;SOYOMBO LETTER DDA;Lo;0;L;;;;;N;;;;; +11A69;SOYOMBO LETTER DDHA;Lo;0;L;;;;;N;;;;; +11A6A;SOYOMBO LETTER NNA;Lo;0;L;;;;;N;;;;; +11A6B;SOYOMBO LETTER TA;Lo;0;L;;;;;N;;;;; +11A6C;SOYOMBO LETTER THA;Lo;0;L;;;;;N;;;;; +11A6D;SOYOMBO LETTER DA;Lo;0;L;;;;;N;;;;; +11A6E;SOYOMBO LETTER DHA;Lo;0;L;;;;;N;;;;; +11A6F;SOYOMBO LETTER NA;Lo;0;L;;;;;N;;;;; +11A70;SOYOMBO LETTER PA;Lo;0;L;;;;;N;;;;; +11A71;SOYOMBO LETTER PHA;Lo;0;L;;;;;N;;;;; +11A72;SOYOMBO LETTER BA;Lo;0;L;;;;;N;;;;; +11A73;SOYOMBO LETTER BHA;Lo;0;L;;;;;N;;;;; +11A74;SOYOMBO LETTER MA;Lo;0;L;;;;;N;;;;; +11A75;SOYOMBO LETTER TSA;Lo;0;L;;;;;N;;;;; +11A76;SOYOMBO LETTER TSHA;Lo;0;L;;;;;N;;;;; +11A77;SOYOMBO LETTER DZA;Lo;0;L;;;;;N;;;;; +11A78;SOYOMBO LETTER ZHA;Lo;0;L;;;;;N;;;;; +11A79;SOYOMBO LETTER ZA;Lo;0;L;;;;;N;;;;; +11A7A;SOYOMBO LETTER -A;Lo;0;L;;;;;N;;;;; +11A7B;SOYOMBO LETTER YA;Lo;0;L;;;;;N;;;;; +11A7C;SOYOMBO LETTER RA;Lo;0;L;;;;;N;;;;; +11A7D;SOYOMBO LETTER LA;Lo;0;L;;;;;N;;;;; +11A7E;SOYOMBO LETTER VA;Lo;0;L;;;;;N;;;;; +11A7F;SOYOMBO LETTER SHA;Lo;0;L;;;;;N;;;;; +11A80;SOYOMBO LETTER SSA;Lo;0;L;;;;;N;;;;; +11A81;SOYOMBO LETTER SA;Lo;0;L;;;;;N;;;;; +11A82;SOYOMBO LETTER HA;Lo;0;L;;;;;N;;;;; +11A83;SOYOMBO LETTER KSSA;Lo;0;L;;;;;N;;;;; +11A84;SOYOMBO SIGN JIHVAMULIYA;Lo;0;L;;;;;N;;;;; +11A85;SOYOMBO SIGN UPADHMANIYA;Lo;0;L;;;;;N;;;;; +11A86;SOYOMBO CLUSTER-INITIAL LETTER RA;Lo;0;L;;;;;N;;;;; +11A87;SOYOMBO CLUSTER-INITIAL LETTER LA;Lo;0;L;;;;;N;;;;; +11A88;SOYOMBO CLUSTER-INITIAL LETTER SHA;Lo;0;L;;;;;N;;;;; +11A89;SOYOMBO CLUSTER-INITIAL LETTER SA;Lo;0;L;;;;;N;;;;; +11A8A;SOYOMBO FINAL CONSONANT SIGN G;Mn;0;NSM;;;;;N;;;;; +11A8B;SOYOMBO FINAL CONSONANT SIGN K;Mn;0;NSM;;;;;N;;;;; +11A8C;SOYOMBO FINAL CONSONANT SIGN NG;Mn;0;NSM;;;;;N;;;;; +11A8D;SOYOMBO FINAL CONSONANT SIGN D;Mn;0;NSM;;;;;N;;;;; +11A8E;SOYOMBO FINAL CONSONANT SIGN N;Mn;0;NSM;;;;;N;;;;; +11A8F;SOYOMBO FINAL CONSONANT SIGN B;Mn;0;NSM;;;;;N;;;;; +11A90;SOYOMBO FINAL CONSONANT SIGN M;Mn;0;NSM;;;;;N;;;;; +11A91;SOYOMBO FINAL CONSONANT SIGN R;Mn;0;NSM;;;;;N;;;;; +11A92;SOYOMBO FINAL CONSONANT SIGN L;Mn;0;NSM;;;;;N;;;;; +11A93;SOYOMBO FINAL CONSONANT SIGN SH;Mn;0;NSM;;;;;N;;;;; +11A94;SOYOMBO FINAL CONSONANT SIGN S;Mn;0;NSM;;;;;N;;;;; +11A95;SOYOMBO FINAL CONSONANT SIGN -A;Mn;0;NSM;;;;;N;;;;; +11A96;SOYOMBO SIGN ANUSVARA;Mn;0;NSM;;;;;N;;;;; +11A97;SOYOMBO SIGN VISARGA;Mc;0;L;;;;;N;;;;; +11A98;SOYOMBO GEMINATION MARK;Mn;0;NSM;;;;;N;;;;; +11A99;SOYOMBO SUBJOINER;Mn;9;NSM;;;;;N;;;;; +11A9A;SOYOMBO MARK TSHEG;Po;0;L;;;;;N;;;;; +11A9B;SOYOMBO MARK SHAD;Po;0;L;;;;;N;;;;; +11A9C;SOYOMBO MARK DOUBLE SHAD;Po;0;L;;;;;N;;;;; +11A9D;SOYOMBO MARK PLUTA;Lo;0;L;;;;;N;;;;; +11A9E;SOYOMBO HEAD MARK WITH MOON AND SUN AND TRIPLE FLAME;Po;0;L;;;;;N;;;;; +11A9F;SOYOMBO HEAD MARK WITH MOON AND SUN AND FLAME;Po;0;L;;;;;N;;;;; +11AA0;SOYOMBO HEAD MARK WITH MOON AND SUN;Po;0;L;;;;;N;;;;; +11AA1;SOYOMBO TERMINAL MARK-1;Po;0;L;;;;;N;;;;; +11AA2;SOYOMBO TERMINAL MARK-2;Po;0;L;;;;;N;;;;; +11AC0;PAU CIN HAU LETTER PA;Lo;0;L;;;;;N;;;;; +11AC1;PAU CIN HAU LETTER KA;Lo;0;L;;;;;N;;;;; +11AC2;PAU CIN HAU LETTER LA;Lo;0;L;;;;;N;;;;; +11AC3;PAU CIN HAU LETTER MA;Lo;0;L;;;;;N;;;;; +11AC4;PAU CIN HAU LETTER DA;Lo;0;L;;;;;N;;;;; +11AC5;PAU CIN HAU LETTER ZA;Lo;0;L;;;;;N;;;;; +11AC6;PAU CIN HAU LETTER VA;Lo;0;L;;;;;N;;;;; +11AC7;PAU CIN HAU LETTER NGA;Lo;0;L;;;;;N;;;;; +11AC8;PAU CIN HAU LETTER HA;Lo;0;L;;;;;N;;;;; +11AC9;PAU CIN HAU LETTER GA;Lo;0;L;;;;;N;;;;; +11ACA;PAU CIN HAU LETTER KHA;Lo;0;L;;;;;N;;;;; +11ACB;PAU CIN HAU LETTER SA;Lo;0;L;;;;;N;;;;; +11ACC;PAU CIN HAU LETTER BA;Lo;0;L;;;;;N;;;;; +11ACD;PAU CIN HAU LETTER CA;Lo;0;L;;;;;N;;;;; +11ACE;PAU CIN HAU LETTER TA;Lo;0;L;;;;;N;;;;; +11ACF;PAU CIN HAU LETTER THA;Lo;0;L;;;;;N;;;;; +11AD0;PAU CIN HAU LETTER NA;Lo;0;L;;;;;N;;;;; +11AD1;PAU CIN HAU LETTER PHA;Lo;0;L;;;;;N;;;;; +11AD2;PAU CIN HAU LETTER RA;Lo;0;L;;;;;N;;;;; +11AD3;PAU CIN HAU LETTER FA;Lo;0;L;;;;;N;;;;; +11AD4;PAU CIN HAU LETTER CHA;Lo;0;L;;;;;N;;;;; +11AD5;PAU CIN HAU LETTER A;Lo;0;L;;;;;N;;;;; +11AD6;PAU CIN HAU LETTER E;Lo;0;L;;;;;N;;;;; +11AD7;PAU CIN HAU LETTER I;Lo;0;L;;;;;N;;;;; +11AD8;PAU CIN HAU LETTER O;Lo;0;L;;;;;N;;;;; +11AD9;PAU CIN HAU LETTER U;Lo;0;L;;;;;N;;;;; +11ADA;PAU CIN HAU LETTER UA;Lo;0;L;;;;;N;;;;; +11ADB;PAU CIN HAU LETTER IA;Lo;0;L;;;;;N;;;;; +11ADC;PAU CIN HAU LETTER FINAL P;Lo;0;L;;;;;N;;;;; +11ADD;PAU CIN HAU LETTER FINAL K;Lo;0;L;;;;;N;;;;; +11ADE;PAU CIN HAU LETTER FINAL T;Lo;0;L;;;;;N;;;;; +11ADF;PAU CIN HAU LETTER FINAL M;Lo;0;L;;;;;N;;;;; +11AE0;PAU CIN HAU LETTER FINAL N;Lo;0;L;;;;;N;;;;; +11AE1;PAU CIN HAU LETTER FINAL L;Lo;0;L;;;;;N;;;;; +11AE2;PAU CIN HAU LETTER FINAL W;Lo;0;L;;;;;N;;;;; +11AE3;PAU CIN HAU LETTER FINAL NG;Lo;0;L;;;;;N;;;;; +11AE4;PAU CIN HAU LETTER FINAL Y;Lo;0;L;;;;;N;;;;; +11AE5;PAU CIN HAU RISING TONE LONG;Lo;0;L;;;;;N;;;;; +11AE6;PAU CIN HAU RISING TONE;Lo;0;L;;;;;N;;;;; +11AE7;PAU CIN HAU SANDHI GLOTTAL STOP;Lo;0;L;;;;;N;;;;; +11AE8;PAU CIN HAU RISING TONE LONG FINAL;Lo;0;L;;;;;N;;;;; +11AE9;PAU CIN HAU RISING TONE FINAL;Lo;0;L;;;;;N;;;;; +11AEA;PAU CIN HAU SANDHI GLOTTAL STOP FINAL;Lo;0;L;;;;;N;;;;; +11AEB;PAU CIN HAU SANDHI TONE LONG;Lo;0;L;;;;;N;;;;; +11AEC;PAU CIN HAU SANDHI TONE;Lo;0;L;;;;;N;;;;; +11AED;PAU CIN HAU SANDHI TONE LONG FINAL;Lo;0;L;;;;;N;;;;; +11AEE;PAU CIN HAU SANDHI TONE FINAL;Lo;0;L;;;;;N;;;;; +11AEF;PAU CIN HAU MID-LEVEL TONE;Lo;0;L;;;;;N;;;;; +11AF0;PAU CIN HAU GLOTTAL STOP VARIANT;Lo;0;L;;;;;N;;;;; +11AF1;PAU CIN HAU MID-LEVEL TONE LONG FINAL;Lo;0;L;;;;;N;;;;; +11AF2;PAU CIN HAU MID-LEVEL TONE FINAL;Lo;0;L;;;;;N;;;;; +11AF3;PAU CIN HAU LOW-FALLING TONE LONG;Lo;0;L;;;;;N;;;;; +11AF4;PAU CIN HAU LOW-FALLING TONE;Lo;0;L;;;;;N;;;;; +11AF5;PAU CIN HAU GLOTTAL STOP;Lo;0;L;;;;;N;;;;; +11AF6;PAU CIN HAU LOW-FALLING TONE LONG FINAL;Lo;0;L;;;;;N;;;;; +11AF7;PAU CIN HAU LOW-FALLING TONE FINAL;Lo;0;L;;;;;N;;;;; +11AF8;PAU CIN HAU GLOTTAL STOP FINAL;Lo;0;L;;;;;N;;;;; +11C00;BHAIKSUKI LETTER A;Lo;0;L;;;;;N;;;;; +11C01;BHAIKSUKI LETTER AA;Lo;0;L;;;;;N;;;;; +11C02;BHAIKSUKI LETTER I;Lo;0;L;;;;;N;;;;; +11C03;BHAIKSUKI LETTER II;Lo;0;L;;;;;N;;;;; +11C04;BHAIKSUKI LETTER U;Lo;0;L;;;;;N;;;;; +11C05;BHAIKSUKI LETTER UU;Lo;0;L;;;;;N;;;;; +11C06;BHAIKSUKI LETTER VOCALIC R;Lo;0;L;;;;;N;;;;; +11C07;BHAIKSUKI LETTER VOCALIC RR;Lo;0;L;;;;;N;;;;; +11C08;BHAIKSUKI LETTER VOCALIC L;Lo;0;L;;;;;N;;;;; +11C0A;BHAIKSUKI LETTER E;Lo;0;L;;;;;N;;;;; +11C0B;BHAIKSUKI LETTER AI;Lo;0;L;;;;;N;;;;; +11C0C;BHAIKSUKI LETTER O;Lo;0;L;;;;;N;;;;; +11C0D;BHAIKSUKI LETTER AU;Lo;0;L;;;;;N;;;;; +11C0E;BHAIKSUKI LETTER KA;Lo;0;L;;;;;N;;;;; +11C0F;BHAIKSUKI LETTER KHA;Lo;0;L;;;;;N;;;;; +11C10;BHAIKSUKI LETTER GA;Lo;0;L;;;;;N;;;;; +11C11;BHAIKSUKI LETTER GHA;Lo;0;L;;;;;N;;;;; +11C12;BHAIKSUKI LETTER NGA;Lo;0;L;;;;;N;;;;; +11C13;BHAIKSUKI LETTER CA;Lo;0;L;;;;;N;;;;; +11C14;BHAIKSUKI LETTER CHA;Lo;0;L;;;;;N;;;;; +11C15;BHAIKSUKI LETTER JA;Lo;0;L;;;;;N;;;;; +11C16;BHAIKSUKI LETTER JHA;Lo;0;L;;;;;N;;;;; +11C17;BHAIKSUKI LETTER NYA;Lo;0;L;;;;;N;;;;; +11C18;BHAIKSUKI LETTER TTA;Lo;0;L;;;;;N;;;;; +11C19;BHAIKSUKI LETTER TTHA;Lo;0;L;;;;;N;;;;; +11C1A;BHAIKSUKI LETTER DDA;Lo;0;L;;;;;N;;;;; +11C1B;BHAIKSUKI LETTER DDHA;Lo;0;L;;;;;N;;;;; +11C1C;BHAIKSUKI LETTER NNA;Lo;0;L;;;;;N;;;;; +11C1D;BHAIKSUKI LETTER TA;Lo;0;L;;;;;N;;;;; +11C1E;BHAIKSUKI LETTER THA;Lo;0;L;;;;;N;;;;; +11C1F;BHAIKSUKI LETTER DA;Lo;0;L;;;;;N;;;;; +11C20;BHAIKSUKI LETTER DHA;Lo;0;L;;;;;N;;;;; +11C21;BHAIKSUKI LETTER NA;Lo;0;L;;;;;N;;;;; +11C22;BHAIKSUKI LETTER PA;Lo;0;L;;;;;N;;;;; +11C23;BHAIKSUKI LETTER PHA;Lo;0;L;;;;;N;;;;; +11C24;BHAIKSUKI LETTER BA;Lo;0;L;;;;;N;;;;; +11C25;BHAIKSUKI LETTER BHA;Lo;0;L;;;;;N;;;;; +11C26;BHAIKSUKI LETTER MA;Lo;0;L;;;;;N;;;;; +11C27;BHAIKSUKI LETTER YA;Lo;0;L;;;;;N;;;;; +11C28;BHAIKSUKI LETTER RA;Lo;0;L;;;;;N;;;;; +11C29;BHAIKSUKI LETTER LA;Lo;0;L;;;;;N;;;;; +11C2A;BHAIKSUKI LETTER VA;Lo;0;L;;;;;N;;;;; +11C2B;BHAIKSUKI LETTER SHA;Lo;0;L;;;;;N;;;;; +11C2C;BHAIKSUKI LETTER SSA;Lo;0;L;;;;;N;;;;; +11C2D;BHAIKSUKI LETTER SA;Lo;0;L;;;;;N;;;;; +11C2E;BHAIKSUKI LETTER HA;Lo;0;L;;;;;N;;;;; +11C2F;BHAIKSUKI VOWEL SIGN AA;Mc;0;L;;;;;N;;;;; +11C30;BHAIKSUKI VOWEL SIGN I;Mn;0;NSM;;;;;N;;;;; +11C31;BHAIKSUKI VOWEL SIGN II;Mn;0;NSM;;;;;N;;;;; +11C32;BHAIKSUKI VOWEL SIGN U;Mn;0;NSM;;;;;N;;;;; +11C33;BHAIKSUKI VOWEL SIGN UU;Mn;0;NSM;;;;;N;;;;; +11C34;BHAIKSUKI VOWEL SIGN VOCALIC R;Mn;0;NSM;;;;;N;;;;; +11C35;BHAIKSUKI VOWEL SIGN VOCALIC RR;Mn;0;NSM;;;;;N;;;;; +11C36;BHAIKSUKI VOWEL SIGN VOCALIC L;Mn;0;NSM;;;;;N;;;;; +11C38;BHAIKSUKI VOWEL SIGN E;Mn;0;NSM;;;;;N;;;;; +11C39;BHAIKSUKI VOWEL SIGN AI;Mn;0;NSM;;;;;N;;;;; +11C3A;BHAIKSUKI VOWEL SIGN O;Mn;0;NSM;;;;;N;;;;; +11C3B;BHAIKSUKI VOWEL SIGN AU;Mn;0;NSM;;;;;N;;;;; +11C3C;BHAIKSUKI SIGN CANDRABINDU;Mn;0;NSM;;;;;N;;;;; +11C3D;BHAIKSUKI SIGN ANUSVARA;Mn;0;NSM;;;;;N;;;;; +11C3E;BHAIKSUKI SIGN VISARGA;Mc;0;L;;;;;N;;;;; +11C3F;BHAIKSUKI SIGN VIRAMA;Mn;9;L;;;;;N;;;;; +11C40;BHAIKSUKI SIGN AVAGRAHA;Lo;0;L;;;;;N;;;;; +11C41;BHAIKSUKI DANDA;Po;0;L;;;;;N;;;;; +11C42;BHAIKSUKI DOUBLE DANDA;Po;0;L;;;;;N;;;;; +11C43;BHAIKSUKI WORD SEPARATOR;Po;0;L;;;;;N;;;;; +11C44;BHAIKSUKI GAP FILLER-1;Po;0;L;;;;;N;;;;; +11C45;BHAIKSUKI GAP FILLER-2;Po;0;L;;;;;N;;;;; +11C50;BHAIKSUKI DIGIT ZERO;Nd;0;L;;0;0;0;N;;;;; +11C51;BHAIKSUKI DIGIT ONE;Nd;0;L;;1;1;1;N;;;;; +11C52;BHAIKSUKI DIGIT TWO;Nd;0;L;;2;2;2;N;;;;; +11C53;BHAIKSUKI DIGIT THREE;Nd;0;L;;3;3;3;N;;;;; +11C54;BHAIKSUKI DIGIT FOUR;Nd;0;L;;4;4;4;N;;;;; +11C55;BHAIKSUKI DIGIT FIVE;Nd;0;L;;5;5;5;N;;;;; +11C56;BHAIKSUKI DIGIT SIX;Nd;0;L;;6;6;6;N;;;;; +11C57;BHAIKSUKI DIGIT SEVEN;Nd;0;L;;7;7;7;N;;;;; +11C58;BHAIKSUKI DIGIT EIGHT;Nd;0;L;;8;8;8;N;;;;; +11C59;BHAIKSUKI DIGIT NINE;Nd;0;L;;9;9;9;N;;;;; +11C5A;BHAIKSUKI NUMBER ONE;No;0;L;;;;1;N;;;;; +11C5B;BHAIKSUKI NUMBER TWO;No;0;L;;;;2;N;;;;; +11C5C;BHAIKSUKI NUMBER THREE;No;0;L;;;;3;N;;;;; +11C5D;BHAIKSUKI NUMBER FOUR;No;0;L;;;;4;N;;;;; +11C5E;BHAIKSUKI NUMBER FIVE;No;0;L;;;;5;N;;;;; +11C5F;BHAIKSUKI NUMBER SIX;No;0;L;;;;6;N;;;;; +11C60;BHAIKSUKI NUMBER SEVEN;No;0;L;;;;7;N;;;;; +11C61;BHAIKSUKI NUMBER EIGHT;No;0;L;;;;8;N;;;;; +11C62;BHAIKSUKI NUMBER NINE;No;0;L;;;;9;N;;;;; +11C63;BHAIKSUKI NUMBER TEN;No;0;L;;;;10;N;;;;; +11C64;BHAIKSUKI NUMBER TWENTY;No;0;L;;;;20;N;;;;; +11C65;BHAIKSUKI NUMBER THIRTY;No;0;L;;;;30;N;;;;; +11C66;BHAIKSUKI NUMBER FORTY;No;0;L;;;;40;N;;;;; +11C67;BHAIKSUKI NUMBER FIFTY;No;0;L;;;;50;N;;;;; +11C68;BHAIKSUKI NUMBER SIXTY;No;0;L;;;;60;N;;;;; +11C69;BHAIKSUKI NUMBER SEVENTY;No;0;L;;;;70;N;;;;; +11C6A;BHAIKSUKI NUMBER EIGHTY;No;0;L;;;;80;N;;;;; +11C6B;BHAIKSUKI NUMBER NINETY;No;0;L;;;;90;N;;;;; +11C6C;BHAIKSUKI HUNDREDS UNIT MARK;No;0;L;;;;100;N;;;;; +11C70;MARCHEN HEAD MARK;Po;0;L;;;;;N;;;;; +11C71;MARCHEN MARK SHAD;Po;0;L;;;;;N;;;;; +11C72;MARCHEN LETTER KA;Lo;0;L;;;;;N;;;;; +11C73;MARCHEN LETTER KHA;Lo;0;L;;;;;N;;;;; +11C74;MARCHEN LETTER GA;Lo;0;L;;;;;N;;;;; +11C75;MARCHEN LETTER NGA;Lo;0;L;;;;;N;;;;; +11C76;MARCHEN LETTER CA;Lo;0;L;;;;;N;;;;; +11C77;MARCHEN LETTER CHA;Lo;0;L;;;;;N;;;;; +11C78;MARCHEN LETTER JA;Lo;0;L;;;;;N;;;;; +11C79;MARCHEN LETTER NYA;Lo;0;L;;;;;N;;;;; +11C7A;MARCHEN LETTER TA;Lo;0;L;;;;;N;;;;; +11C7B;MARCHEN LETTER THA;Lo;0;L;;;;;N;;;;; +11C7C;MARCHEN LETTER DA;Lo;0;L;;;;;N;;;;; +11C7D;MARCHEN LETTER NA;Lo;0;L;;;;;N;;;;; +11C7E;MARCHEN LETTER PA;Lo;0;L;;;;;N;;;;; +11C7F;MARCHEN LETTER PHA;Lo;0;L;;;;;N;;;;; +11C80;MARCHEN LETTER BA;Lo;0;L;;;;;N;;;;; +11C81;MARCHEN LETTER MA;Lo;0;L;;;;;N;;;;; +11C82;MARCHEN LETTER TSA;Lo;0;L;;;;;N;;;;; +11C83;MARCHEN LETTER TSHA;Lo;0;L;;;;;N;;;;; +11C84;MARCHEN LETTER DZA;Lo;0;L;;;;;N;;;;; +11C85;MARCHEN LETTER WA;Lo;0;L;;;;;N;;;;; +11C86;MARCHEN LETTER ZHA;Lo;0;L;;;;;N;;;;; +11C87;MARCHEN LETTER ZA;Lo;0;L;;;;;N;;;;; +11C88;MARCHEN LETTER -A;Lo;0;L;;;;;N;;;;; +11C89;MARCHEN LETTER YA;Lo;0;L;;;;;N;;;;; +11C8A;MARCHEN LETTER RA;Lo;0;L;;;;;N;;;;; +11C8B;MARCHEN LETTER LA;Lo;0;L;;;;;N;;;;; +11C8C;MARCHEN LETTER SHA;Lo;0;L;;;;;N;;;;; +11C8D;MARCHEN LETTER SA;Lo;0;L;;;;;N;;;;; +11C8E;MARCHEN LETTER HA;Lo;0;L;;;;;N;;;;; +11C8F;MARCHEN LETTER A;Lo;0;L;;;;;N;;;;; +11C92;MARCHEN SUBJOINED LETTER KA;Mn;0;NSM;;;;;N;;;;; +11C93;MARCHEN SUBJOINED LETTER KHA;Mn;0;NSM;;;;;N;;;;; +11C94;MARCHEN SUBJOINED LETTER GA;Mn;0;NSM;;;;;N;;;;; +11C95;MARCHEN SUBJOINED LETTER NGA;Mn;0;NSM;;;;;N;;;;; +11C96;MARCHEN SUBJOINED LETTER CA;Mn;0;NSM;;;;;N;;;;; +11C97;MARCHEN SUBJOINED LETTER CHA;Mn;0;NSM;;;;;N;;;;; +11C98;MARCHEN SUBJOINED LETTER JA;Mn;0;NSM;;;;;N;;;;; +11C99;MARCHEN SUBJOINED LETTER NYA;Mn;0;NSM;;;;;N;;;;; +11C9A;MARCHEN SUBJOINED LETTER TA;Mn;0;NSM;;;;;N;;;;; +11C9B;MARCHEN SUBJOINED LETTER THA;Mn;0;NSM;;;;;N;;;;; +11C9C;MARCHEN SUBJOINED LETTER DA;Mn;0;NSM;;;;;N;;;;; +11C9D;MARCHEN SUBJOINED LETTER NA;Mn;0;NSM;;;;;N;;;;; +11C9E;MARCHEN SUBJOINED LETTER PA;Mn;0;NSM;;;;;N;;;;; +11C9F;MARCHEN SUBJOINED LETTER PHA;Mn;0;NSM;;;;;N;;;;; +11CA0;MARCHEN SUBJOINED LETTER BA;Mn;0;NSM;;;;;N;;;;; +11CA1;MARCHEN SUBJOINED LETTER MA;Mn;0;NSM;;;;;N;;;;; +11CA2;MARCHEN SUBJOINED LETTER TSA;Mn;0;NSM;;;;;N;;;;; +11CA3;MARCHEN SUBJOINED LETTER TSHA;Mn;0;NSM;;;;;N;;;;; +11CA4;MARCHEN SUBJOINED LETTER DZA;Mn;0;NSM;;;;;N;;;;; +11CA5;MARCHEN SUBJOINED LETTER WA;Mn;0;NSM;;;;;N;;;;; +11CA6;MARCHEN SUBJOINED LETTER ZHA;Mn;0;NSM;;;;;N;;;;; +11CA7;MARCHEN SUBJOINED LETTER ZA;Mn;0;NSM;;;;;N;;;;; +11CA9;MARCHEN SUBJOINED LETTER YA;Mc;0;L;;;;;N;;;;; +11CAA;MARCHEN SUBJOINED LETTER RA;Mn;0;NSM;;;;;N;;;;; +11CAB;MARCHEN SUBJOINED LETTER LA;Mn;0;NSM;;;;;N;;;;; +11CAC;MARCHEN SUBJOINED LETTER SHA;Mn;0;NSM;;;;;N;;;;; +11CAD;MARCHEN SUBJOINED LETTER SA;Mn;0;NSM;;;;;N;;;;; +11CAE;MARCHEN SUBJOINED LETTER HA;Mn;0;NSM;;;;;N;;;;; +11CAF;MARCHEN SUBJOINED LETTER A;Mn;0;NSM;;;;;N;;;;; +11CB0;MARCHEN VOWEL SIGN AA;Mn;0;NSM;;;;;N;;;;; +11CB1;MARCHEN VOWEL SIGN I;Mc;0;L;;;;;N;;;;; +11CB2;MARCHEN VOWEL SIGN U;Mn;0;NSM;;;;;N;;;;; +11CB3;MARCHEN VOWEL SIGN E;Mn;0;NSM;;;;;N;;;;; +11CB4;MARCHEN VOWEL SIGN O;Mc;0;L;;;;;N;;;;; +11CB5;MARCHEN SIGN ANUSVARA;Mn;0;NSM;;;;;N;;;;; +11CB6;MARCHEN SIGN CANDRABINDU;Mn;0;NSM;;;;;N;;;;; +11D00;MASARAM GONDI LETTER A;Lo;0;L;;;;;N;;;;; +11D01;MASARAM GONDI LETTER AA;Lo;0;L;;;;;N;;;;; +11D02;MASARAM GONDI LETTER I;Lo;0;L;;;;;N;;;;; +11D03;MASARAM GONDI LETTER II;Lo;0;L;;;;;N;;;;; +11D04;MASARAM GONDI LETTER U;Lo;0;L;;;;;N;;;;; +11D05;MASARAM GONDI LETTER UU;Lo;0;L;;;;;N;;;;; +11D06;MASARAM GONDI LETTER E;Lo;0;L;;;;;N;;;;; +11D08;MASARAM GONDI LETTER AI;Lo;0;L;;;;;N;;;;; +11D09;MASARAM GONDI LETTER O;Lo;0;L;;;;;N;;;;; +11D0B;MASARAM GONDI LETTER AU;Lo;0;L;;;;;N;;;;; +11D0C;MASARAM GONDI LETTER KA;Lo;0;L;;;;;N;;;;; +11D0D;MASARAM GONDI LETTER KHA;Lo;0;L;;;;;N;;;;; +11D0E;MASARAM GONDI LETTER GA;Lo;0;L;;;;;N;;;;; +11D0F;MASARAM GONDI LETTER GHA;Lo;0;L;;;;;N;;;;; +11D10;MASARAM GONDI LETTER NGA;Lo;0;L;;;;;N;;;;; +11D11;MASARAM GONDI LETTER CA;Lo;0;L;;;;;N;;;;; +11D12;MASARAM GONDI LETTER CHA;Lo;0;L;;;;;N;;;;; +11D13;MASARAM GONDI LETTER JA;Lo;0;L;;;;;N;;;;; +11D14;MASARAM GONDI LETTER JHA;Lo;0;L;;;;;N;;;;; +11D15;MASARAM GONDI LETTER NYA;Lo;0;L;;;;;N;;;;; +11D16;MASARAM GONDI LETTER TTA;Lo;0;L;;;;;N;;;;; +11D17;MASARAM GONDI LETTER TTHA;Lo;0;L;;;;;N;;;;; +11D18;MASARAM GONDI LETTER DDA;Lo;0;L;;;;;N;;;;; +11D19;MASARAM GONDI LETTER DDHA;Lo;0;L;;;;;N;;;;; +11D1A;MASARAM GONDI LETTER NNA;Lo;0;L;;;;;N;;;;; +11D1B;MASARAM GONDI LETTER TA;Lo;0;L;;;;;N;;;;; +11D1C;MASARAM GONDI LETTER THA;Lo;0;L;;;;;N;;;;; +11D1D;MASARAM GONDI LETTER DA;Lo;0;L;;;;;N;;;;; +11D1E;MASARAM GONDI LETTER DHA;Lo;0;L;;;;;N;;;;; +11D1F;MASARAM GONDI LETTER NA;Lo;0;L;;;;;N;;;;; +11D20;MASARAM GONDI LETTER PA;Lo;0;L;;;;;N;;;;; +11D21;MASARAM GONDI LETTER PHA;Lo;0;L;;;;;N;;;;; +11D22;MASARAM GONDI LETTER BA;Lo;0;L;;;;;N;;;;; +11D23;MASARAM GONDI LETTER BHA;Lo;0;L;;;;;N;;;;; +11D24;MASARAM GONDI LETTER MA;Lo;0;L;;;;;N;;;;; +11D25;MASARAM GONDI LETTER YA;Lo;0;L;;;;;N;;;;; +11D26;MASARAM GONDI LETTER RA;Lo;0;L;;;;;N;;;;; +11D27;MASARAM GONDI LETTER LA;Lo;0;L;;;;;N;;;;; +11D28;MASARAM GONDI LETTER VA;Lo;0;L;;;;;N;;;;; +11D29;MASARAM GONDI LETTER SHA;Lo;0;L;;;;;N;;;;; +11D2A;MASARAM GONDI LETTER SSA;Lo;0;L;;;;;N;;;;; +11D2B;MASARAM GONDI LETTER SA;Lo;0;L;;;;;N;;;;; +11D2C;MASARAM GONDI LETTER HA;Lo;0;L;;;;;N;;;;; +11D2D;MASARAM GONDI LETTER LLA;Lo;0;L;;;;;N;;;;; +11D2E;MASARAM GONDI LETTER KSSA;Lo;0;L;;;;;N;;;;; +11D2F;MASARAM GONDI LETTER JNYA;Lo;0;L;;;;;N;;;;; +11D30;MASARAM GONDI LETTER TRA;Lo;0;L;;;;;N;;;;; +11D31;MASARAM GONDI VOWEL SIGN AA;Mn;0;NSM;;;;;N;;;;; +11D32;MASARAM GONDI VOWEL SIGN I;Mn;0;NSM;;;;;N;;;;; +11D33;MASARAM GONDI VOWEL SIGN II;Mn;0;NSM;;;;;N;;;;; +11D34;MASARAM GONDI VOWEL SIGN U;Mn;0;NSM;;;;;N;;;;; +11D35;MASARAM GONDI VOWEL SIGN UU;Mn;0;NSM;;;;;N;;;;; +11D36;MASARAM GONDI VOWEL SIGN VOCALIC R;Mn;0;NSM;;;;;N;;;;; +11D3A;MASARAM GONDI VOWEL SIGN E;Mn;0;NSM;;;;;N;;;;; +11D3C;MASARAM GONDI VOWEL SIGN AI;Mn;0;NSM;;;;;N;;;;; +11D3D;MASARAM GONDI VOWEL SIGN O;Mn;0;NSM;;;;;N;;;;; +11D3F;MASARAM GONDI VOWEL SIGN AU;Mn;0;NSM;;;;;N;;;;; +11D40;MASARAM GONDI SIGN ANUSVARA;Mn;0;NSM;;;;;N;;;;; +11D41;MASARAM GONDI SIGN VISARGA;Mn;0;NSM;;;;;N;;;;; +11D42;MASARAM GONDI SIGN NUKTA;Mn;7;NSM;;;;;N;;;;; +11D43;MASARAM GONDI SIGN CANDRA;Mn;0;NSM;;;;;N;;;;; +11D44;MASARAM GONDI SIGN HALANTA;Mn;9;NSM;;;;;N;;;;; +11D45;MASARAM GONDI VIRAMA;Mn;9;NSM;;;;;N;;;;; +11D46;MASARAM GONDI REPHA;Lo;0;L;;;;;N;;;;; +11D47;MASARAM GONDI RA-KARA;Mn;0;NSM;;;;;N;;;;; +11D50;MASARAM GONDI DIGIT ZERO;Nd;0;L;;0;0;0;N;;;;; +11D51;MASARAM GONDI DIGIT ONE;Nd;0;L;;1;1;1;N;;;;; +11D52;MASARAM GONDI DIGIT TWO;Nd;0;L;;2;2;2;N;;;;; +11D53;MASARAM GONDI DIGIT THREE;Nd;0;L;;3;3;3;N;;;;; +11D54;MASARAM GONDI DIGIT FOUR;Nd;0;L;;4;4;4;N;;;;; +11D55;MASARAM GONDI DIGIT FIVE;Nd;0;L;;5;5;5;N;;;;; +11D56;MASARAM GONDI DIGIT SIX;Nd;0;L;;6;6;6;N;;;;; +11D57;MASARAM GONDI DIGIT SEVEN;Nd;0;L;;7;7;7;N;;;;; +11D58;MASARAM GONDI DIGIT EIGHT;Nd;0;L;;8;8;8;N;;;;; +11D59;MASARAM GONDI DIGIT NINE;Nd;0;L;;9;9;9;N;;;;; +11D60;GUNJALA GONDI LETTER A;Lo;0;L;;;;;N;;;;; +11D61;GUNJALA GONDI LETTER AA;Lo;0;L;;;;;N;;;;; +11D62;GUNJALA GONDI LETTER I;Lo;0;L;;;;;N;;;;; +11D63;GUNJALA GONDI LETTER II;Lo;0;L;;;;;N;;;;; +11D64;GUNJALA GONDI LETTER U;Lo;0;L;;;;;N;;;;; +11D65;GUNJALA GONDI LETTER UU;Lo;0;L;;;;;N;;;;; +11D67;GUNJALA GONDI LETTER EE;Lo;0;L;;;;;N;;;;; +11D68;GUNJALA GONDI LETTER AI;Lo;0;L;;;;;N;;;;; +11D6A;GUNJALA GONDI LETTER OO;Lo;0;L;;;;;N;;;;; +11D6B;GUNJALA GONDI LETTER AU;Lo;0;L;;;;;N;;;;; +11D6C;GUNJALA GONDI LETTER YA;Lo;0;L;;;;;N;;;;; +11D6D;GUNJALA GONDI LETTER VA;Lo;0;L;;;;;N;;;;; +11D6E;GUNJALA GONDI LETTER BA;Lo;0;L;;;;;N;;;;; +11D6F;GUNJALA GONDI LETTER BHA;Lo;0;L;;;;;N;;;;; +11D70;GUNJALA GONDI LETTER MA;Lo;0;L;;;;;N;;;;; +11D71;GUNJALA GONDI LETTER KA;Lo;0;L;;;;;N;;;;; +11D72;GUNJALA GONDI LETTER KHA;Lo;0;L;;;;;N;;;;; +11D73;GUNJALA GONDI LETTER TA;Lo;0;L;;;;;N;;;;; +11D74;GUNJALA GONDI LETTER THA;Lo;0;L;;;;;N;;;;; +11D75;GUNJALA GONDI LETTER LA;Lo;0;L;;;;;N;;;;; +11D76;GUNJALA GONDI LETTER GA;Lo;0;L;;;;;N;;;;; +11D77;GUNJALA GONDI LETTER GHA;Lo;0;L;;;;;N;;;;; +11D78;GUNJALA GONDI LETTER DA;Lo;0;L;;;;;N;;;;; +11D79;GUNJALA GONDI LETTER DHA;Lo;0;L;;;;;N;;;;; +11D7A;GUNJALA GONDI LETTER NA;Lo;0;L;;;;;N;;;;; +11D7B;GUNJALA GONDI LETTER CA;Lo;0;L;;;;;N;;;;; +11D7C;GUNJALA GONDI LETTER CHA;Lo;0;L;;;;;N;;;;; +11D7D;GUNJALA GONDI LETTER TTA;Lo;0;L;;;;;N;;;;; +11D7E;GUNJALA GONDI LETTER TTHA;Lo;0;L;;;;;N;;;;; +11D7F;GUNJALA GONDI LETTER LLA;Lo;0;L;;;;;N;;;;; +11D80;GUNJALA GONDI LETTER JA;Lo;0;L;;;;;N;;;;; +11D81;GUNJALA GONDI LETTER JHA;Lo;0;L;;;;;N;;;;; +11D82;GUNJALA GONDI LETTER DDA;Lo;0;L;;;;;N;;;;; +11D83;GUNJALA GONDI LETTER DDHA;Lo;0;L;;;;;N;;;;; +11D84;GUNJALA GONDI LETTER NGA;Lo;0;L;;;;;N;;;;; +11D85;GUNJALA GONDI LETTER PA;Lo;0;L;;;;;N;;;;; +11D86;GUNJALA GONDI LETTER PHA;Lo;0;L;;;;;N;;;;; +11D87;GUNJALA GONDI LETTER HA;Lo;0;L;;;;;N;;;;; +11D88;GUNJALA GONDI LETTER RA;Lo;0;L;;;;;N;;;;; +11D89;GUNJALA GONDI LETTER SA;Lo;0;L;;;;;N;;;;; +11D8A;GUNJALA GONDI VOWEL SIGN AA;Mc;0;L;;;;;N;;;;; +11D8B;GUNJALA GONDI VOWEL SIGN I;Mc;0;L;;;;;N;;;;; +11D8C;GUNJALA GONDI VOWEL SIGN II;Mc;0;L;;;;;N;;;;; +11D8D;GUNJALA GONDI VOWEL SIGN U;Mc;0;L;;;;;N;;;;; +11D8E;GUNJALA GONDI VOWEL SIGN UU;Mc;0;L;;;;;N;;;;; +11D90;GUNJALA GONDI VOWEL SIGN EE;Mn;0;NSM;;;;;N;;;;; +11D91;GUNJALA GONDI VOWEL SIGN AI;Mn;0;NSM;;;;;N;;;;; +11D93;GUNJALA GONDI VOWEL SIGN OO;Mc;0;L;;;;;N;;;;; +11D94;GUNJALA GONDI VOWEL SIGN AU;Mc;0;L;;;;;N;;;;; +11D95;GUNJALA GONDI SIGN ANUSVARA;Mn;0;NSM;;;;;N;;;;; +11D96;GUNJALA GONDI SIGN VISARGA;Mc;0;L;;;;;N;;;;; +11D97;GUNJALA GONDI VIRAMA;Mn;9;NSM;;;;;N;;;;; +11D98;GUNJALA GONDI OM;Lo;0;L;;;;;N;;;;; +11DA0;GUNJALA GONDI DIGIT ZERO;Nd;0;L;;0;0;0;N;;;;; +11DA1;GUNJALA GONDI DIGIT ONE;Nd;0;L;;1;1;1;N;;;;; +11DA2;GUNJALA GONDI DIGIT TWO;Nd;0;L;;2;2;2;N;;;;; +11DA3;GUNJALA GONDI DIGIT THREE;Nd;0;L;;3;3;3;N;;;;; +11DA4;GUNJALA GONDI DIGIT FOUR;Nd;0;L;;4;4;4;N;;;;; +11DA5;GUNJALA GONDI DIGIT FIVE;Nd;0;L;;5;5;5;N;;;;; +11DA6;GUNJALA GONDI DIGIT SIX;Nd;0;L;;6;6;6;N;;;;; +11DA7;GUNJALA GONDI DIGIT SEVEN;Nd;0;L;;7;7;7;N;;;;; +11DA8;GUNJALA GONDI DIGIT EIGHT;Nd;0;L;;8;8;8;N;;;;; +11DA9;GUNJALA GONDI DIGIT NINE;Nd;0;L;;9;9;9;N;;;;; +11EE0;MAKASAR LETTER KA;Lo;0;L;;;;;N;;;;; +11EE1;MAKASAR LETTER GA;Lo;0;L;;;;;N;;;;; +11EE2;MAKASAR LETTER NGA;Lo;0;L;;;;;N;;;;; +11EE3;MAKASAR LETTER PA;Lo;0;L;;;;;N;;;;; +11EE4;MAKASAR LETTER BA;Lo;0;L;;;;;N;;;;; +11EE5;MAKASAR LETTER MA;Lo;0;L;;;;;N;;;;; +11EE6;MAKASAR LETTER TA;Lo;0;L;;;;;N;;;;; +11EE7;MAKASAR LETTER DA;Lo;0;L;;;;;N;;;;; +11EE8;MAKASAR LETTER NA;Lo;0;L;;;;;N;;;;; +11EE9;MAKASAR LETTER CA;Lo;0;L;;;;;N;;;;; +11EEA;MAKASAR LETTER JA;Lo;0;L;;;;;N;;;;; +11EEB;MAKASAR LETTER NYA;Lo;0;L;;;;;N;;;;; +11EEC;MAKASAR LETTER YA;Lo;0;L;;;;;N;;;;; +11EED;MAKASAR LETTER RA;Lo;0;L;;;;;N;;;;; +11EEE;MAKASAR LETTER LA;Lo;0;L;;;;;N;;;;; +11EEF;MAKASAR LETTER VA;Lo;0;L;;;;;N;;;;; +11EF0;MAKASAR LETTER SA;Lo;0;L;;;;;N;;;;; +11EF1;MAKASAR LETTER A;Lo;0;L;;;;;N;;;;; +11EF2;MAKASAR ANGKA;Lo;0;L;;;;;N;;;;; +11EF3;MAKASAR VOWEL SIGN I;Mn;0;NSM;;;;;N;;;;; +11EF4;MAKASAR VOWEL SIGN U;Mn;0;NSM;;;;;N;;;;; +11EF5;MAKASAR VOWEL SIGN E;Mc;0;L;;;;;N;;;;; +11EF6;MAKASAR VOWEL SIGN O;Mc;0;L;;;;;N;;;;; +11EF7;MAKASAR PASSIMBANG;Po;0;L;;;;;N;;;;; +11EF8;MAKASAR END OF SECTION;Po;0;L;;;;;N;;;;; +11FC0;TAMIL FRACTION ONE THREE-HUNDRED-AND-TWENTIETH;No;0;L;;;;1/320;N;;;;; +11FC1;TAMIL FRACTION ONE ONE-HUNDRED-AND-SIXTIETH;No;0;L;;;;1/160;N;;;;; +11FC2;TAMIL FRACTION ONE EIGHTIETH;No;0;L;;;;1/80;N;;;;; +11FC3;TAMIL FRACTION ONE SIXTY-FOURTH;No;0;L;;;;1/64;N;;;;; +11FC4;TAMIL FRACTION ONE FORTIETH;No;0;L;;;;1/40;N;;;;; +11FC5;TAMIL FRACTION ONE THIRTY-SECOND;No;0;L;;;;1/32;N;;;;; +11FC6;TAMIL FRACTION THREE EIGHTIETHS;No;0;L;;;;3/80;N;;;;; +11FC7;TAMIL FRACTION THREE SIXTY-FOURTHS;No;0;L;;;;3/64;N;;;;; +11FC8;TAMIL FRACTION ONE TWENTIETH;No;0;L;;;;1/20;N;;;;; +11FC9;TAMIL FRACTION ONE SIXTEENTH-1;No;0;L;;;;1/16;N;;;;; +11FCA;TAMIL FRACTION ONE SIXTEENTH-2;No;0;L;;;;1/16;N;;;;; +11FCB;TAMIL FRACTION ONE TENTH;No;0;L;;;;1/10;N;;;;; +11FCC;TAMIL FRACTION ONE EIGHTH;No;0;L;;;;1/8;N;;;;; +11FCD;TAMIL FRACTION THREE TWENTIETHS;No;0;L;;;;3/20;N;;;;; +11FCE;TAMIL FRACTION THREE SIXTEENTHS;No;0;L;;;;3/16;N;;;;; +11FCF;TAMIL FRACTION ONE FIFTH;No;0;L;;;;1/5;N;;;;; +11FD0;TAMIL FRACTION ONE QUARTER;No;0;L;;;;1/4;N;;;;; +11FD1;TAMIL FRACTION ONE HALF-1;No;0;L;;;;1/2;N;;;;; +11FD2;TAMIL FRACTION ONE HALF-2;No;0;L;;;;1/2;N;;;;; +11FD3;TAMIL FRACTION THREE QUARTERS;No;0;L;;;;3/4;N;;;;; +11FD4;TAMIL FRACTION DOWNSCALING FACTOR KIIZH;No;0;L;;;;1/320;N;;;;; +11FD5;TAMIL SIGN NEL;So;0;ON;;;;;N;;;;; +11FD6;TAMIL SIGN CEVITU;So;0;ON;;;;;N;;;;; +11FD7;TAMIL SIGN AAZHAAKKU;So;0;ON;;;;;N;;;;; +11FD8;TAMIL SIGN UZHAKKU;So;0;ON;;;;;N;;;;; +11FD9;TAMIL SIGN MUUVUZHAKKU;So;0;ON;;;;;N;;;;; +11FDA;TAMIL SIGN KURUNI;So;0;ON;;;;;N;;;;; +11FDB;TAMIL SIGN PATHAKKU;So;0;ON;;;;;N;;;;; +11FDC;TAMIL SIGN MUKKURUNI;So;0;ON;;;;;N;;;;; +11FDD;TAMIL SIGN KAACU;Sc;0;ET;;;;;N;;;;; +11FDE;TAMIL SIGN PANAM;Sc;0;ET;;;;;N;;;;; +11FDF;TAMIL SIGN PON;Sc;0;ET;;;;;N;;;;; +11FE0;TAMIL SIGN VARAAKAN;Sc;0;ET;;;;;N;;;;; +11FE1;TAMIL SIGN PAARAM;So;0;ON;;;;;N;;;;; +11FE2;TAMIL SIGN KUZHI;So;0;ON;;;;;N;;;;; +11FE3;TAMIL SIGN VELI;So;0;ON;;;;;N;;;;; +11FE4;TAMIL WET CULTIVATION SIGN;So;0;ON;;;;;N;;;;; +11FE5;TAMIL DRY CULTIVATION SIGN;So;0;ON;;;;;N;;;;; +11FE6;TAMIL LAND SIGN;So;0;ON;;;;;N;;;;; +11FE7;TAMIL SALT PAN SIGN;So;0;ON;;;;;N;;;;; +11FE8;TAMIL TRADITIONAL CREDIT SIGN;So;0;ON;;;;;N;;;;; +11FE9;TAMIL TRADITIONAL NUMBER SIGN;So;0;ON;;;;;N;;;;; +11FEA;TAMIL CURRENT SIGN;So;0;ON;;;;;N;;;;; +11FEB;TAMIL AND ODD SIGN;So;0;ON;;;;;N;;;;; +11FEC;TAMIL SPENT SIGN;So;0;ON;;;;;N;;;;; +11FED;TAMIL TOTAL SIGN;So;0;ON;;;;;N;;;;; +11FEE;TAMIL IN POSSESSION SIGN;So;0;ON;;;;;N;;;;; +11FEF;TAMIL STARTING FROM SIGN;So;0;ON;;;;;N;;;;; +11FF0;TAMIL SIGN MUTHALIYA;So;0;ON;;;;;N;;;;; +11FF1;TAMIL SIGN VAKAIYARAA;So;0;ON;;;;;N;;;;; +11FFF;TAMIL PUNCTUATION END OF TEXT;Po;0;L;;;;;N;;;;; +12000;CUNEIFORM SIGN A;Lo;0;L;;;;;N;;;;; +12001;CUNEIFORM SIGN A TIMES A;Lo;0;L;;;;;N;;;;; +12002;CUNEIFORM SIGN A TIMES BAD;Lo;0;L;;;;;N;;;;; +12003;CUNEIFORM SIGN A TIMES GAN2 TENU;Lo;0;L;;;;;N;;;;; +12004;CUNEIFORM SIGN A TIMES HA;Lo;0;L;;;;;N;;;;; +12005;CUNEIFORM SIGN A TIMES IGI;Lo;0;L;;;;;N;;;;; +12006;CUNEIFORM SIGN A TIMES LAGAR GUNU;Lo;0;L;;;;;N;;;;; +12007;CUNEIFORM SIGN A TIMES MUSH;Lo;0;L;;;;;N;;;;; +12008;CUNEIFORM SIGN A TIMES SAG;Lo;0;L;;;;;N;;;;; +12009;CUNEIFORM SIGN A2;Lo;0;L;;;;;N;;;;; +1200A;CUNEIFORM SIGN AB;Lo;0;L;;;;;N;;;;; +1200B;CUNEIFORM SIGN AB TIMES ASH2;Lo;0;L;;;;;N;;;;; +1200C;CUNEIFORM SIGN AB TIMES DUN3 GUNU;Lo;0;L;;;;;N;;;;; +1200D;CUNEIFORM SIGN AB TIMES GAL;Lo;0;L;;;;;N;;;;; +1200E;CUNEIFORM SIGN AB TIMES GAN2 TENU;Lo;0;L;;;;;N;;;;; +1200F;CUNEIFORM SIGN AB TIMES HA;Lo;0;L;;;;;N;;;;; +12010;CUNEIFORM SIGN AB TIMES IGI GUNU;Lo;0;L;;;;;N;;;;; +12011;CUNEIFORM SIGN AB TIMES IMIN;Lo;0;L;;;;;N;;;;; +12012;CUNEIFORM SIGN AB TIMES LAGAB;Lo;0;L;;;;;N;;;;; +12013;CUNEIFORM SIGN AB TIMES SHESH;Lo;0;L;;;;;N;;;;; +12014;CUNEIFORM SIGN AB TIMES U PLUS U PLUS U;Lo;0;L;;;;;N;;;;; +12015;CUNEIFORM SIGN AB GUNU;Lo;0;L;;;;;N;;;;; +12016;CUNEIFORM SIGN AB2;Lo;0;L;;;;;N;;;;; +12017;CUNEIFORM SIGN AB2 TIMES BALAG;Lo;0;L;;;;;N;;;;; +12018;CUNEIFORM SIGN AB2 TIMES GAN2 TENU;Lo;0;L;;;;;N;;;;; +12019;CUNEIFORM SIGN AB2 TIMES ME PLUS EN;Lo;0;L;;;;;N;;;;; +1201A;CUNEIFORM SIGN AB2 TIMES SHA3;Lo;0;L;;;;;N;;;;; +1201B;CUNEIFORM SIGN AB2 TIMES TAK4;Lo;0;L;;;;;N;;;;; +1201C;CUNEIFORM SIGN AD;Lo;0;L;;;;;N;;;;; +1201D;CUNEIFORM SIGN AK;Lo;0;L;;;;;N;;;;; +1201E;CUNEIFORM SIGN AK TIMES ERIN2;Lo;0;L;;;;;N;;;;; +1201F;CUNEIFORM SIGN AK TIMES SHITA PLUS GISH;Lo;0;L;;;;;N;;;;; +12020;CUNEIFORM SIGN AL;Lo;0;L;;;;;N;;;;; +12021;CUNEIFORM SIGN AL TIMES AL;Lo;0;L;;;;;N;;;;; +12022;CUNEIFORM SIGN AL TIMES DIM2;Lo;0;L;;;;;N;;;;; +12023;CUNEIFORM SIGN AL TIMES GISH;Lo;0;L;;;;;N;;;;; +12024;CUNEIFORM SIGN AL TIMES HA;Lo;0;L;;;;;N;;;;; +12025;CUNEIFORM SIGN AL TIMES KAD3;Lo;0;L;;;;;N;;;;; +12026;CUNEIFORM SIGN AL TIMES KI;Lo;0;L;;;;;N;;;;; +12027;CUNEIFORM SIGN AL TIMES SHE;Lo;0;L;;;;;N;;;;; +12028;CUNEIFORM SIGN AL TIMES USH;Lo;0;L;;;;;N;;;;; +12029;CUNEIFORM SIGN ALAN;Lo;0;L;;;;;N;;;;; +1202A;CUNEIFORM SIGN ALEPH;Lo;0;L;;;;;N;;;;; +1202B;CUNEIFORM SIGN AMAR;Lo;0;L;;;;;N;;;;; +1202C;CUNEIFORM SIGN AMAR TIMES SHE;Lo;0;L;;;;;N;;;;; +1202D;CUNEIFORM SIGN AN;Lo;0;L;;;;;N;;;;; +1202E;CUNEIFORM SIGN AN OVER AN;Lo;0;L;;;;;N;;;;; +1202F;CUNEIFORM SIGN AN THREE TIMES;Lo;0;L;;;;;N;;;;; +12030;CUNEIFORM SIGN AN PLUS NAGA OPPOSING AN PLUS NAGA;Lo;0;L;;;;;N;;;;; +12031;CUNEIFORM SIGN AN PLUS NAGA SQUARED;Lo;0;L;;;;;N;;;;; +12032;CUNEIFORM SIGN ANSHE;Lo;0;L;;;;;N;;;;; +12033;CUNEIFORM SIGN APIN;Lo;0;L;;;;;N;;;;; +12034;CUNEIFORM SIGN ARAD;Lo;0;L;;;;;N;;;;; +12035;CUNEIFORM SIGN ARAD TIMES KUR;Lo;0;L;;;;;N;;;;; +12036;CUNEIFORM SIGN ARKAB;Lo;0;L;;;;;N;;;;; +12037;CUNEIFORM SIGN ASAL2;Lo;0;L;;;;;N;;;;; +12038;CUNEIFORM SIGN ASH;Lo;0;L;;;;;N;;;;; +12039;CUNEIFORM SIGN ASH ZIDA TENU;Lo;0;L;;;;;N;;;;; +1203A;CUNEIFORM SIGN ASH KABA TENU;Lo;0;L;;;;;N;;;;; +1203B;CUNEIFORM SIGN ASH OVER ASH TUG2 OVER TUG2 TUG2 OVER TUG2 PAP;Lo;0;L;;;;;N;;;;; +1203C;CUNEIFORM SIGN ASH OVER ASH OVER ASH;Lo;0;L;;;;;N;;;;; +1203D;CUNEIFORM SIGN ASH OVER ASH OVER ASH CROSSING ASH OVER ASH OVER ASH;Lo;0;L;;;;;N;;;;; +1203E;CUNEIFORM SIGN ASH2;Lo;0;L;;;;;N;;;;; +1203F;CUNEIFORM SIGN ASHGAB;Lo;0;L;;;;;N;;;;; +12040;CUNEIFORM SIGN BA;Lo;0;L;;;;;N;;;;; +12041;CUNEIFORM SIGN BAD;Lo;0;L;;;;;N;;;;; +12042;CUNEIFORM SIGN BAG3;Lo;0;L;;;;;N;;;;; +12043;CUNEIFORM SIGN BAHAR2;Lo;0;L;;;;;N;;;;; +12044;CUNEIFORM SIGN BAL;Lo;0;L;;;;;N;;;;; +12045;CUNEIFORM SIGN BAL OVER BAL;Lo;0;L;;;;;N;;;;; +12046;CUNEIFORM SIGN BALAG;Lo;0;L;;;;;N;;;;; +12047;CUNEIFORM SIGN BAR;Lo;0;L;;;;;N;;;;; +12048;CUNEIFORM SIGN BARA2;Lo;0;L;;;;;N;;;;; +12049;CUNEIFORM SIGN BI;Lo;0;L;;;;;N;;;;; +1204A;CUNEIFORM SIGN BI TIMES A;Lo;0;L;;;;;N;;;;; +1204B;CUNEIFORM SIGN BI TIMES GAR;Lo;0;L;;;;;N;;;;; +1204C;CUNEIFORM SIGN BI TIMES IGI GUNU;Lo;0;L;;;;;N;;;;; +1204D;CUNEIFORM SIGN BU;Lo;0;L;;;;;N;;;;; +1204E;CUNEIFORM SIGN BU OVER BU AB;Lo;0;L;;;;;N;;;;; +1204F;CUNEIFORM SIGN BU OVER BU UN;Lo;0;L;;;;;N;;;;; +12050;CUNEIFORM SIGN BU CROSSING BU;Lo;0;L;;;;;N;;;;; +12051;CUNEIFORM SIGN BULUG;Lo;0;L;;;;;N;;;;; +12052;CUNEIFORM SIGN BULUG OVER BULUG;Lo;0;L;;;;;N;;;;; +12053;CUNEIFORM SIGN BUR;Lo;0;L;;;;;N;;;;; +12054;CUNEIFORM SIGN BUR2;Lo;0;L;;;;;N;;;;; +12055;CUNEIFORM SIGN DA;Lo;0;L;;;;;N;;;;; +12056;CUNEIFORM SIGN DAG;Lo;0;L;;;;;N;;;;; +12057;CUNEIFORM SIGN DAG KISIM5 TIMES A PLUS MASH;Lo;0;L;;;;;N;;;;; +12058;CUNEIFORM SIGN DAG KISIM5 TIMES AMAR;Lo;0;L;;;;;N;;;;; +12059;CUNEIFORM SIGN DAG KISIM5 TIMES BALAG;Lo;0;L;;;;;N;;;;; +1205A;CUNEIFORM SIGN DAG KISIM5 TIMES BI;Lo;0;L;;;;;N;;;;; +1205B;CUNEIFORM SIGN DAG KISIM5 TIMES GA;Lo;0;L;;;;;N;;;;; +1205C;CUNEIFORM SIGN DAG KISIM5 TIMES GA PLUS MASH;Lo;0;L;;;;;N;;;;; +1205D;CUNEIFORM SIGN DAG KISIM5 TIMES GI;Lo;0;L;;;;;N;;;;; +1205E;CUNEIFORM SIGN DAG KISIM5 TIMES GIR2;Lo;0;L;;;;;N;;;;; +1205F;CUNEIFORM SIGN DAG KISIM5 TIMES GUD;Lo;0;L;;;;;N;;;;; +12060;CUNEIFORM SIGN DAG KISIM5 TIMES HA;Lo;0;L;;;;;N;;;;; +12061;CUNEIFORM SIGN DAG KISIM5 TIMES IR;Lo;0;L;;;;;N;;;;; +12062;CUNEIFORM SIGN DAG KISIM5 TIMES IR PLUS LU;Lo;0;L;;;;;N;;;;; +12063;CUNEIFORM SIGN DAG KISIM5 TIMES KAK;Lo;0;L;;;;;N;;;;; +12064;CUNEIFORM SIGN DAG KISIM5 TIMES LA;Lo;0;L;;;;;N;;;;; +12065;CUNEIFORM SIGN DAG KISIM5 TIMES LU;Lo;0;L;;;;;N;;;;; +12066;CUNEIFORM SIGN DAG KISIM5 TIMES LU PLUS MASH2;Lo;0;L;;;;;N;;;;; +12067;CUNEIFORM SIGN DAG KISIM5 TIMES LUM;Lo;0;L;;;;;N;;;;; +12068;CUNEIFORM SIGN DAG KISIM5 TIMES NE;Lo;0;L;;;;;N;;;;; +12069;CUNEIFORM SIGN DAG KISIM5 TIMES PAP PLUS PAP;Lo;0;L;;;;;N;;;;; +1206A;CUNEIFORM SIGN DAG KISIM5 TIMES SI;Lo;0;L;;;;;N;;;;; +1206B;CUNEIFORM SIGN DAG KISIM5 TIMES TAK4;Lo;0;L;;;;;N;;;;; +1206C;CUNEIFORM SIGN DAG KISIM5 TIMES U2 PLUS GIR2;Lo;0;L;;;;;N;;;;; +1206D;CUNEIFORM SIGN DAG KISIM5 TIMES USH;Lo;0;L;;;;;N;;;;; +1206E;CUNEIFORM SIGN DAM;Lo;0;L;;;;;N;;;;; +1206F;CUNEIFORM SIGN DAR;Lo;0;L;;;;;N;;;;; +12070;CUNEIFORM SIGN DARA3;Lo;0;L;;;;;N;;;;; +12071;CUNEIFORM SIGN DARA4;Lo;0;L;;;;;N;;;;; +12072;CUNEIFORM SIGN DI;Lo;0;L;;;;;N;;;;; +12073;CUNEIFORM SIGN DIB;Lo;0;L;;;;;N;;;;; +12074;CUNEIFORM SIGN DIM;Lo;0;L;;;;;N;;;;; +12075;CUNEIFORM SIGN DIM TIMES SHE;Lo;0;L;;;;;N;;;;; +12076;CUNEIFORM SIGN DIM2;Lo;0;L;;;;;N;;;;; +12077;CUNEIFORM SIGN DIN;Lo;0;L;;;;;N;;;;; +12078;CUNEIFORM SIGN DIN KASKAL U GUNU DISH;Lo;0;L;;;;;N;;;;; +12079;CUNEIFORM SIGN DISH;Lo;0;L;;;;;N;;;;; +1207A;CUNEIFORM SIGN DU;Lo;0;L;;;;;N;;;;; +1207B;CUNEIFORM SIGN DU OVER DU;Lo;0;L;;;;;N;;;;; +1207C;CUNEIFORM SIGN DU GUNU;Lo;0;L;;;;;N;;;;; +1207D;CUNEIFORM SIGN DU SHESHIG;Lo;0;L;;;;;N;;;;; +1207E;CUNEIFORM SIGN DUB;Lo;0;L;;;;;N;;;;; +1207F;CUNEIFORM SIGN DUB TIMES ESH2;Lo;0;L;;;;;N;;;;; +12080;CUNEIFORM SIGN DUB2;Lo;0;L;;;;;N;;;;; +12081;CUNEIFORM SIGN DUG;Lo;0;L;;;;;N;;;;; +12082;CUNEIFORM SIGN DUGUD;Lo;0;L;;;;;N;;;;; +12083;CUNEIFORM SIGN DUH;Lo;0;L;;;;;N;;;;; +12084;CUNEIFORM SIGN DUN;Lo;0;L;;;;;N;;;;; +12085;CUNEIFORM SIGN DUN3;Lo;0;L;;;;;N;;;;; +12086;CUNEIFORM SIGN DUN3 GUNU;Lo;0;L;;;;;N;;;;; +12087;CUNEIFORM SIGN DUN3 GUNU GUNU;Lo;0;L;;;;;N;;;;; +12088;CUNEIFORM SIGN DUN4;Lo;0;L;;;;;N;;;;; +12089;CUNEIFORM SIGN DUR2;Lo;0;L;;;;;N;;;;; +1208A;CUNEIFORM SIGN E;Lo;0;L;;;;;N;;;;; +1208B;CUNEIFORM SIGN E TIMES PAP;Lo;0;L;;;;;N;;;;; +1208C;CUNEIFORM SIGN E OVER E NUN OVER NUN;Lo;0;L;;;;;N;;;;; +1208D;CUNEIFORM SIGN E2;Lo;0;L;;;;;N;;;;; +1208E;CUNEIFORM SIGN E2 TIMES A PLUS HA PLUS DA;Lo;0;L;;;;;N;;;;; +1208F;CUNEIFORM SIGN E2 TIMES GAR;Lo;0;L;;;;;N;;;;; +12090;CUNEIFORM SIGN E2 TIMES MI;Lo;0;L;;;;;N;;;;; +12091;CUNEIFORM SIGN E2 TIMES SAL;Lo;0;L;;;;;N;;;;; +12092;CUNEIFORM SIGN E2 TIMES SHE;Lo;0;L;;;;;N;;;;; +12093;CUNEIFORM SIGN E2 TIMES U;Lo;0;L;;;;;N;;;;; +12094;CUNEIFORM SIGN EDIN;Lo;0;L;;;;;N;;;;; +12095;CUNEIFORM SIGN EGIR;Lo;0;L;;;;;N;;;;; +12096;CUNEIFORM SIGN EL;Lo;0;L;;;;;N;;;;; +12097;CUNEIFORM SIGN EN;Lo;0;L;;;;;N;;;;; +12098;CUNEIFORM SIGN EN TIMES GAN2;Lo;0;L;;;;;N;;;;; +12099;CUNEIFORM SIGN EN TIMES GAN2 TENU;Lo;0;L;;;;;N;;;;; +1209A;CUNEIFORM SIGN EN TIMES ME;Lo;0;L;;;;;N;;;;; +1209B;CUNEIFORM SIGN EN CROSSING EN;Lo;0;L;;;;;N;;;;; +1209C;CUNEIFORM SIGN EN OPPOSING EN;Lo;0;L;;;;;N;;;;; +1209D;CUNEIFORM SIGN EN SQUARED;Lo;0;L;;;;;N;;;;; +1209E;CUNEIFORM SIGN EREN;Lo;0;L;;;;;N;;;;; +1209F;CUNEIFORM SIGN ERIN2;Lo;0;L;;;;;N;;;;; +120A0;CUNEIFORM SIGN ESH2;Lo;0;L;;;;;N;;;;; +120A1;CUNEIFORM SIGN EZEN;Lo;0;L;;;;;N;;;;; +120A2;CUNEIFORM SIGN EZEN TIMES A;Lo;0;L;;;;;N;;;;; +120A3;CUNEIFORM SIGN EZEN TIMES A PLUS LAL;Lo;0;L;;;;;N;;;;; +120A4;CUNEIFORM SIGN EZEN TIMES A PLUS LAL TIMES LAL;Lo;0;L;;;;;N;;;;; +120A5;CUNEIFORM SIGN EZEN TIMES AN;Lo;0;L;;;;;N;;;;; +120A6;CUNEIFORM SIGN EZEN TIMES BAD;Lo;0;L;;;;;N;;;;; +120A7;CUNEIFORM SIGN EZEN TIMES DUN3 GUNU;Lo;0;L;;;;;N;;;;; +120A8;CUNEIFORM SIGN EZEN TIMES DUN3 GUNU GUNU;Lo;0;L;;;;;N;;;;; +120A9;CUNEIFORM SIGN EZEN TIMES HA;Lo;0;L;;;;;N;;;;; +120AA;CUNEIFORM SIGN EZEN TIMES HA GUNU;Lo;0;L;;;;;N;;;;; +120AB;CUNEIFORM SIGN EZEN TIMES IGI GUNU;Lo;0;L;;;;;N;;;;; +120AC;CUNEIFORM SIGN EZEN TIMES KASKAL;Lo;0;L;;;;;N;;;;; +120AD;CUNEIFORM SIGN EZEN TIMES KASKAL SQUARED;Lo;0;L;;;;;N;;;;; +120AE;CUNEIFORM SIGN EZEN TIMES KU3;Lo;0;L;;;;;N;;;;; +120AF;CUNEIFORM SIGN EZEN TIMES LA;Lo;0;L;;;;;N;;;;; +120B0;CUNEIFORM SIGN EZEN TIMES LAL TIMES LAL;Lo;0;L;;;;;N;;;;; +120B1;CUNEIFORM SIGN EZEN TIMES LI;Lo;0;L;;;;;N;;;;; +120B2;CUNEIFORM SIGN EZEN TIMES LU;Lo;0;L;;;;;N;;;;; +120B3;CUNEIFORM SIGN EZEN TIMES U2;Lo;0;L;;;;;N;;;;; +120B4;CUNEIFORM SIGN EZEN TIMES UD;Lo;0;L;;;;;N;;;;; +120B5;CUNEIFORM SIGN GA;Lo;0;L;;;;;N;;;;; +120B6;CUNEIFORM SIGN GA GUNU;Lo;0;L;;;;;N;;;;; +120B7;CUNEIFORM SIGN GA2;Lo;0;L;;;;;N;;;;; +120B8;CUNEIFORM SIGN GA2 TIMES A PLUS DA PLUS HA;Lo;0;L;;;;;N;;;;; +120B9;CUNEIFORM SIGN GA2 TIMES A PLUS HA;Lo;0;L;;;;;N;;;;; +120BA;CUNEIFORM SIGN GA2 TIMES A PLUS IGI;Lo;0;L;;;;;N;;;;; +120BB;CUNEIFORM SIGN GA2 TIMES AB2 TENU PLUS TAB;Lo;0;L;;;;;N;;;;; +120BC;CUNEIFORM SIGN GA2 TIMES AN;Lo;0;L;;;;;N;;;;; +120BD;CUNEIFORM SIGN GA2 TIMES ASH;Lo;0;L;;;;;N;;;;; +120BE;CUNEIFORM SIGN GA2 TIMES ASH2 PLUS GAL;Lo;0;L;;;;;N;;;;; +120BF;CUNEIFORM SIGN GA2 TIMES BAD;Lo;0;L;;;;;N;;;;; +120C0;CUNEIFORM SIGN GA2 TIMES BAR PLUS RA;Lo;0;L;;;;;N;;;;; +120C1;CUNEIFORM SIGN GA2 TIMES BUR;Lo;0;L;;;;;N;;;;; +120C2;CUNEIFORM SIGN GA2 TIMES BUR PLUS RA;Lo;0;L;;;;;N;;;;; +120C3;CUNEIFORM SIGN GA2 TIMES DA;Lo;0;L;;;;;N;;;;; +120C4;CUNEIFORM SIGN GA2 TIMES DI;Lo;0;L;;;;;N;;;;; +120C5;CUNEIFORM SIGN GA2 TIMES DIM TIMES SHE;Lo;0;L;;;;;N;;;;; +120C6;CUNEIFORM SIGN GA2 TIMES DUB;Lo;0;L;;;;;N;;;;; +120C7;CUNEIFORM SIGN GA2 TIMES EL;Lo;0;L;;;;;N;;;;; +120C8;CUNEIFORM SIGN GA2 TIMES EL PLUS LA;Lo;0;L;;;;;N;;;;; +120C9;CUNEIFORM SIGN GA2 TIMES EN;Lo;0;L;;;;;N;;;;; +120CA;CUNEIFORM SIGN GA2 TIMES EN TIMES GAN2 TENU;Lo;0;L;;;;;N;;;;; +120CB;CUNEIFORM SIGN GA2 TIMES GAN2 TENU;Lo;0;L;;;;;N;;;;; +120CC;CUNEIFORM SIGN GA2 TIMES GAR;Lo;0;L;;;;;N;;;;; +120CD;CUNEIFORM SIGN GA2 TIMES GI;Lo;0;L;;;;;N;;;;; +120CE;CUNEIFORM SIGN GA2 TIMES GI4;Lo;0;L;;;;;N;;;;; +120CF;CUNEIFORM SIGN GA2 TIMES GI4 PLUS A;Lo;0;L;;;;;N;;;;; +120D0;CUNEIFORM SIGN GA2 TIMES GIR2 PLUS SU;Lo;0;L;;;;;N;;;;; +120D1;CUNEIFORM SIGN GA2 TIMES HA PLUS LU PLUS ESH2;Lo;0;L;;;;;N;;;;; +120D2;CUNEIFORM SIGN GA2 TIMES HAL;Lo;0;L;;;;;N;;;;; +120D3;CUNEIFORM SIGN GA2 TIMES HAL PLUS LA;Lo;0;L;;;;;N;;;;; +120D4;CUNEIFORM SIGN GA2 TIMES HI PLUS LI;Lo;0;L;;;;;N;;;;; +120D5;CUNEIFORM SIGN GA2 TIMES HUB2;Lo;0;L;;;;;N;;;;; +120D6;CUNEIFORM SIGN GA2 TIMES IGI GUNU;Lo;0;L;;;;;N;;;;; +120D7;CUNEIFORM SIGN GA2 TIMES ISH PLUS HU PLUS ASH;Lo;0;L;;;;;N;;;;; +120D8;CUNEIFORM SIGN GA2 TIMES KAK;Lo;0;L;;;;;N;;;;; +120D9;CUNEIFORM SIGN GA2 TIMES KASKAL;Lo;0;L;;;;;N;;;;; +120DA;CUNEIFORM SIGN GA2 TIMES KID;Lo;0;L;;;;;N;;;;; +120DB;CUNEIFORM SIGN GA2 TIMES KID PLUS LAL;Lo;0;L;;;;;N;;;;; +120DC;CUNEIFORM SIGN GA2 TIMES KU3 PLUS AN;Lo;0;L;;;;;N;;;;; +120DD;CUNEIFORM SIGN GA2 TIMES LA;Lo;0;L;;;;;N;;;;; +120DE;CUNEIFORM SIGN GA2 TIMES ME PLUS EN;Lo;0;L;;;;;N;;;;; +120DF;CUNEIFORM SIGN GA2 TIMES MI;Lo;0;L;;;;;N;;;;; +120E0;CUNEIFORM SIGN GA2 TIMES NUN;Lo;0;L;;;;;N;;;;; +120E1;CUNEIFORM SIGN GA2 TIMES NUN OVER NUN;Lo;0;L;;;;;N;;;;; +120E2;CUNEIFORM SIGN GA2 TIMES PA;Lo;0;L;;;;;N;;;;; +120E3;CUNEIFORM SIGN GA2 TIMES SAL;Lo;0;L;;;;;N;;;;; +120E4;CUNEIFORM SIGN GA2 TIMES SAR;Lo;0;L;;;;;N;;;;; +120E5;CUNEIFORM SIGN GA2 TIMES SHE;Lo;0;L;;;;;N;;;;; +120E6;CUNEIFORM SIGN GA2 TIMES SHE PLUS TUR;Lo;0;L;;;;;N;;;;; +120E7;CUNEIFORM SIGN GA2 TIMES SHID;Lo;0;L;;;;;N;;;;; +120E8;CUNEIFORM SIGN GA2 TIMES SUM;Lo;0;L;;;;;N;;;;; +120E9;CUNEIFORM SIGN GA2 TIMES TAK4;Lo;0;L;;;;;N;;;;; +120EA;CUNEIFORM SIGN GA2 TIMES U;Lo;0;L;;;;;N;;;;; +120EB;CUNEIFORM SIGN GA2 TIMES UD;Lo;0;L;;;;;N;;;;; +120EC;CUNEIFORM SIGN GA2 TIMES UD PLUS DU;Lo;0;L;;;;;N;;;;; +120ED;CUNEIFORM SIGN GA2 OVER GA2;Lo;0;L;;;;;N;;;;; +120EE;CUNEIFORM SIGN GABA;Lo;0;L;;;;;N;;;;; +120EF;CUNEIFORM SIGN GABA CROSSING GABA;Lo;0;L;;;;;N;;;;; +120F0;CUNEIFORM SIGN GAD;Lo;0;L;;;;;N;;;;; +120F1;CUNEIFORM SIGN GAD OVER GAD GAR OVER GAR;Lo;0;L;;;;;N;;;;; +120F2;CUNEIFORM SIGN GAL;Lo;0;L;;;;;N;;;;; +120F3;CUNEIFORM SIGN GAL GAD OVER GAD GAR OVER GAR;Lo;0;L;;;;;N;;;;; +120F4;CUNEIFORM SIGN GALAM;Lo;0;L;;;;;N;;;;; +120F5;CUNEIFORM SIGN GAM;Lo;0;L;;;;;N;;;;; +120F6;CUNEIFORM SIGN GAN;Lo;0;L;;;;;N;;;;; +120F7;CUNEIFORM SIGN GAN2;Lo;0;L;;;;;N;;;;; +120F8;CUNEIFORM SIGN GAN2 TENU;Lo;0;L;;;;;N;;;;; +120F9;CUNEIFORM SIGN GAN2 OVER GAN2;Lo;0;L;;;;;N;;;;; +120FA;CUNEIFORM SIGN GAN2 CROSSING GAN2;Lo;0;L;;;;;N;;;;; +120FB;CUNEIFORM SIGN GAR;Lo;0;L;;;;;N;;;;; +120FC;CUNEIFORM SIGN GAR3;Lo;0;L;;;;;N;;;;; +120FD;CUNEIFORM SIGN GASHAN;Lo;0;L;;;;;N;;;;; +120FE;CUNEIFORM SIGN GESHTIN;Lo;0;L;;;;;N;;;;; +120FF;CUNEIFORM SIGN GESHTIN TIMES KUR;Lo;0;L;;;;;N;;;;; +12100;CUNEIFORM SIGN GI;Lo;0;L;;;;;N;;;;; +12101;CUNEIFORM SIGN GI TIMES E;Lo;0;L;;;;;N;;;;; +12102;CUNEIFORM SIGN GI TIMES U;Lo;0;L;;;;;N;;;;; +12103;CUNEIFORM SIGN GI CROSSING GI;Lo;0;L;;;;;N;;;;; +12104;CUNEIFORM SIGN GI4;Lo;0;L;;;;;N;;;;; +12105;CUNEIFORM SIGN GI4 OVER GI4;Lo;0;L;;;;;N;;;;; +12106;CUNEIFORM SIGN GI4 CROSSING GI4;Lo;0;L;;;;;N;;;;; +12107;CUNEIFORM SIGN GIDIM;Lo;0;L;;;;;N;;;;; +12108;CUNEIFORM SIGN GIR2;Lo;0;L;;;;;N;;;;; +12109;CUNEIFORM SIGN GIR2 GUNU;Lo;0;L;;;;;N;;;;; +1210A;CUNEIFORM SIGN GIR3;Lo;0;L;;;;;N;;;;; +1210B;CUNEIFORM SIGN GIR3 TIMES A PLUS IGI;Lo;0;L;;;;;N;;;;; +1210C;CUNEIFORM SIGN GIR3 TIMES GAN2 TENU;Lo;0;L;;;;;N;;;;; +1210D;CUNEIFORM SIGN GIR3 TIMES IGI;Lo;0;L;;;;;N;;;;; +1210E;CUNEIFORM SIGN GIR3 TIMES LU PLUS IGI;Lo;0;L;;;;;N;;;;; +1210F;CUNEIFORM SIGN GIR3 TIMES PA;Lo;0;L;;;;;N;;;;; +12110;CUNEIFORM SIGN GISAL;Lo;0;L;;;;;N;;;;; +12111;CUNEIFORM SIGN GISH;Lo;0;L;;;;;N;;;;; +12112;CUNEIFORM SIGN GISH CROSSING GISH;Lo;0;L;;;;;N;;;;; +12113;CUNEIFORM SIGN GISH TIMES BAD;Lo;0;L;;;;;N;;;;; +12114;CUNEIFORM SIGN GISH TIMES TAK4;Lo;0;L;;;;;N;;;;; +12115;CUNEIFORM SIGN GISH TENU;Lo;0;L;;;;;N;;;;; +12116;CUNEIFORM SIGN GU;Lo;0;L;;;;;N;;;;; +12117;CUNEIFORM SIGN GU CROSSING GU;Lo;0;L;;;;;N;;;;; +12118;CUNEIFORM SIGN GU2;Lo;0;L;;;;;N;;;;; +12119;CUNEIFORM SIGN GU2 TIMES KAK;Lo;0;L;;;;;N;;;;; +1211A;CUNEIFORM SIGN GU2 TIMES KAK TIMES IGI GUNU;Lo;0;L;;;;;N;;;;; +1211B;CUNEIFORM SIGN GU2 TIMES NUN;Lo;0;L;;;;;N;;;;; +1211C;CUNEIFORM SIGN GU2 TIMES SAL PLUS TUG2;Lo;0;L;;;;;N;;;;; +1211D;CUNEIFORM SIGN GU2 GUNU;Lo;0;L;;;;;N;;;;; +1211E;CUNEIFORM SIGN GUD;Lo;0;L;;;;;N;;;;; +1211F;CUNEIFORM SIGN GUD TIMES A PLUS KUR;Lo;0;L;;;;;N;;;;; +12120;CUNEIFORM SIGN GUD TIMES KUR;Lo;0;L;;;;;N;;;;; +12121;CUNEIFORM SIGN GUD OVER GUD LUGAL;Lo;0;L;;;;;N;;;;; +12122;CUNEIFORM SIGN GUL;Lo;0;L;;;;;N;;;;; +12123;CUNEIFORM SIGN GUM;Lo;0;L;;;;;N;;;;; +12124;CUNEIFORM SIGN GUM TIMES SHE;Lo;0;L;;;;;N;;;;; +12125;CUNEIFORM SIGN GUR;Lo;0;L;;;;;N;;;;; +12126;CUNEIFORM SIGN GUR7;Lo;0;L;;;;;N;;;;; +12127;CUNEIFORM SIGN GURUN;Lo;0;L;;;;;N;;;;; +12128;CUNEIFORM SIGN GURUSH;Lo;0;L;;;;;N;;;;; +12129;CUNEIFORM SIGN HA;Lo;0;L;;;;;N;;;;; +1212A;CUNEIFORM SIGN HA TENU;Lo;0;L;;;;;N;;;;; +1212B;CUNEIFORM SIGN HA GUNU;Lo;0;L;;;;;N;;;;; +1212C;CUNEIFORM SIGN HAL;Lo;0;L;;;;;N;;;;; +1212D;CUNEIFORM SIGN HI;Lo;0;L;;;;;N;;;;; +1212E;CUNEIFORM SIGN HI TIMES ASH;Lo;0;L;;;;;N;;;;; +1212F;CUNEIFORM SIGN HI TIMES ASH2;Lo;0;L;;;;;N;;;;; +12130;CUNEIFORM SIGN HI TIMES BAD;Lo;0;L;;;;;N;;;;; +12131;CUNEIFORM SIGN HI TIMES DISH;Lo;0;L;;;;;N;;;;; +12132;CUNEIFORM SIGN HI TIMES GAD;Lo;0;L;;;;;N;;;;; +12133;CUNEIFORM SIGN HI TIMES KIN;Lo;0;L;;;;;N;;;;; +12134;CUNEIFORM SIGN HI TIMES NUN;Lo;0;L;;;;;N;;;;; +12135;CUNEIFORM SIGN HI TIMES SHE;Lo;0;L;;;;;N;;;;; +12136;CUNEIFORM SIGN HI TIMES U;Lo;0;L;;;;;N;;;;; +12137;CUNEIFORM SIGN HU;Lo;0;L;;;;;N;;;;; +12138;CUNEIFORM SIGN HUB2;Lo;0;L;;;;;N;;;;; +12139;CUNEIFORM SIGN HUB2 TIMES AN;Lo;0;L;;;;;N;;;;; +1213A;CUNEIFORM SIGN HUB2 TIMES HAL;Lo;0;L;;;;;N;;;;; +1213B;CUNEIFORM SIGN HUB2 TIMES KASKAL;Lo;0;L;;;;;N;;;;; +1213C;CUNEIFORM SIGN HUB2 TIMES LISH;Lo;0;L;;;;;N;;;;; +1213D;CUNEIFORM SIGN HUB2 TIMES UD;Lo;0;L;;;;;N;;;;; +1213E;CUNEIFORM SIGN HUL2;Lo;0;L;;;;;N;;;;; +1213F;CUNEIFORM SIGN I;Lo;0;L;;;;;N;;;;; +12140;CUNEIFORM SIGN I A;Lo;0;L;;;;;N;;;;; +12141;CUNEIFORM SIGN IB;Lo;0;L;;;;;N;;;;; +12142;CUNEIFORM SIGN IDIM;Lo;0;L;;;;;N;;;;; +12143;CUNEIFORM SIGN IDIM OVER IDIM BUR;Lo;0;L;;;;;N;;;;; +12144;CUNEIFORM SIGN IDIM OVER IDIM SQUARED;Lo;0;L;;;;;N;;;;; +12145;CUNEIFORM SIGN IG;Lo;0;L;;;;;N;;;;; +12146;CUNEIFORM SIGN IGI;Lo;0;L;;;;;N;;;;; +12147;CUNEIFORM SIGN IGI DIB;Lo;0;L;;;;;N;;;;; +12148;CUNEIFORM SIGN IGI RI;Lo;0;L;;;;;N;;;;; +12149;CUNEIFORM SIGN IGI OVER IGI SHIR OVER SHIR UD OVER UD;Lo;0;L;;;;;N;;;;; +1214A;CUNEIFORM SIGN IGI GUNU;Lo;0;L;;;;;N;;;;; +1214B;CUNEIFORM SIGN IL;Lo;0;L;;;;;N;;;;; +1214C;CUNEIFORM SIGN IL TIMES GAN2 TENU;Lo;0;L;;;;;N;;;;; +1214D;CUNEIFORM SIGN IL2;Lo;0;L;;;;;N;;;;; +1214E;CUNEIFORM SIGN IM;Lo;0;L;;;;;N;;;;; +1214F;CUNEIFORM SIGN IM TIMES TAK4;Lo;0;L;;;;;N;;;;; +12150;CUNEIFORM SIGN IM CROSSING IM;Lo;0;L;;;;;N;;;;; +12151;CUNEIFORM SIGN IM OPPOSING IM;Lo;0;L;;;;;N;;;;; +12152;CUNEIFORM SIGN IM SQUARED;Lo;0;L;;;;;N;;;;; +12153;CUNEIFORM SIGN IMIN;Lo;0;L;;;;;N;;;;; +12154;CUNEIFORM SIGN IN;Lo;0;L;;;;;N;;;;; +12155;CUNEIFORM SIGN IR;Lo;0;L;;;;;N;;;;; +12156;CUNEIFORM SIGN ISH;Lo;0;L;;;;;N;;;;; +12157;CUNEIFORM SIGN KA;Lo;0;L;;;;;N;;;;; +12158;CUNEIFORM SIGN KA TIMES A;Lo;0;L;;;;;N;;;;; +12159;CUNEIFORM SIGN KA TIMES AD;Lo;0;L;;;;;N;;;;; +1215A;CUNEIFORM SIGN KA TIMES AD PLUS KU3;Lo;0;L;;;;;N;;;;; +1215B;CUNEIFORM SIGN KA TIMES ASH2;Lo;0;L;;;;;N;;;;; +1215C;CUNEIFORM SIGN KA TIMES BAD;Lo;0;L;;;;;N;;;;; +1215D;CUNEIFORM SIGN KA TIMES BALAG;Lo;0;L;;;;;N;;;;; +1215E;CUNEIFORM SIGN KA TIMES BAR;Lo;0;L;;;;;N;;;;; +1215F;CUNEIFORM SIGN KA TIMES BI;Lo;0;L;;;;;N;;;;; +12160;CUNEIFORM SIGN KA TIMES ERIN2;Lo;0;L;;;;;N;;;;; +12161;CUNEIFORM SIGN KA TIMES ESH2;Lo;0;L;;;;;N;;;;; +12162;CUNEIFORM SIGN KA TIMES GA;Lo;0;L;;;;;N;;;;; +12163;CUNEIFORM SIGN KA TIMES GAL;Lo;0;L;;;;;N;;;;; +12164;CUNEIFORM SIGN KA TIMES GAN2 TENU;Lo;0;L;;;;;N;;;;; +12165;CUNEIFORM SIGN KA TIMES GAR;Lo;0;L;;;;;N;;;;; +12166;CUNEIFORM SIGN KA TIMES GAR PLUS SHA3 PLUS A;Lo;0;L;;;;;N;;;;; +12167;CUNEIFORM SIGN KA TIMES GI;Lo;0;L;;;;;N;;;;; +12168;CUNEIFORM SIGN KA TIMES GIR2;Lo;0;L;;;;;N;;;;; +12169;CUNEIFORM SIGN KA TIMES GISH PLUS SAR;Lo;0;L;;;;;N;;;;; +1216A;CUNEIFORM SIGN KA TIMES GISH CROSSING GISH;Lo;0;L;;;;;N;;;;; +1216B;CUNEIFORM SIGN KA TIMES GU;Lo;0;L;;;;;N;;;;; +1216C;CUNEIFORM SIGN KA TIMES GUR7;Lo;0;L;;;;;N;;;;; +1216D;CUNEIFORM SIGN KA TIMES IGI;Lo;0;L;;;;;N;;;;; +1216E;CUNEIFORM SIGN KA TIMES IM;Lo;0;L;;;;;N;;;;; +1216F;CUNEIFORM SIGN KA TIMES KAK;Lo;0;L;;;;;N;;;;; +12170;CUNEIFORM SIGN KA TIMES KI;Lo;0;L;;;;;N;;;;; +12171;CUNEIFORM SIGN KA TIMES KID;Lo;0;L;;;;;N;;;;; +12172;CUNEIFORM SIGN KA TIMES LI;Lo;0;L;;;;;N;;;;; +12173;CUNEIFORM SIGN KA TIMES LU;Lo;0;L;;;;;N;;;;; +12174;CUNEIFORM SIGN KA TIMES ME;Lo;0;L;;;;;N;;;;; +12175;CUNEIFORM SIGN KA TIMES ME PLUS DU;Lo;0;L;;;;;N;;;;; +12176;CUNEIFORM SIGN KA TIMES ME PLUS GI;Lo;0;L;;;;;N;;;;; +12177;CUNEIFORM SIGN KA TIMES ME PLUS TE;Lo;0;L;;;;;N;;;;; +12178;CUNEIFORM SIGN KA TIMES MI;Lo;0;L;;;;;N;;;;; +12179;CUNEIFORM SIGN KA TIMES MI PLUS NUNUZ;Lo;0;L;;;;;N;;;;; +1217A;CUNEIFORM SIGN KA TIMES NE;Lo;0;L;;;;;N;;;;; +1217B;CUNEIFORM SIGN KA TIMES NUN;Lo;0;L;;;;;N;;;;; +1217C;CUNEIFORM SIGN KA TIMES PI;Lo;0;L;;;;;N;;;;; +1217D;CUNEIFORM SIGN KA TIMES RU;Lo;0;L;;;;;N;;;;; +1217E;CUNEIFORM SIGN KA TIMES SA;Lo;0;L;;;;;N;;;;; +1217F;CUNEIFORM SIGN KA TIMES SAR;Lo;0;L;;;;;N;;;;; +12180;CUNEIFORM SIGN KA TIMES SHA;Lo;0;L;;;;;N;;;;; +12181;CUNEIFORM SIGN KA TIMES SHE;Lo;0;L;;;;;N;;;;; +12182;CUNEIFORM SIGN KA TIMES SHID;Lo;0;L;;;;;N;;;;; +12183;CUNEIFORM SIGN KA TIMES SHU;Lo;0;L;;;;;N;;;;; +12184;CUNEIFORM SIGN KA TIMES SIG;Lo;0;L;;;;;N;;;;; +12185;CUNEIFORM SIGN KA TIMES SUHUR;Lo;0;L;;;;;N;;;;; +12186;CUNEIFORM SIGN KA TIMES TAR;Lo;0;L;;;;;N;;;;; +12187;CUNEIFORM SIGN KA TIMES U;Lo;0;L;;;;;N;;;;; +12188;CUNEIFORM SIGN KA TIMES U2;Lo;0;L;;;;;N;;;;; +12189;CUNEIFORM SIGN KA TIMES UD;Lo;0;L;;;;;N;;;;; +1218A;CUNEIFORM SIGN KA TIMES UMUM TIMES PA;Lo;0;L;;;;;N;;;;; +1218B;CUNEIFORM SIGN KA TIMES USH;Lo;0;L;;;;;N;;;;; +1218C;CUNEIFORM SIGN KA TIMES ZI;Lo;0;L;;;;;N;;;;; +1218D;CUNEIFORM SIGN KA2;Lo;0;L;;;;;N;;;;; +1218E;CUNEIFORM SIGN KA2 CROSSING KA2;Lo;0;L;;;;;N;;;;; +1218F;CUNEIFORM SIGN KAB;Lo;0;L;;;;;N;;;;; +12190;CUNEIFORM SIGN KAD2;Lo;0;L;;;;;N;;;;; +12191;CUNEIFORM SIGN KAD3;Lo;0;L;;;;;N;;;;; +12192;CUNEIFORM SIGN KAD4;Lo;0;L;;;;;N;;;;; +12193;CUNEIFORM SIGN KAD5;Lo;0;L;;;;;N;;;;; +12194;CUNEIFORM SIGN KAD5 OVER KAD5;Lo;0;L;;;;;N;;;;; +12195;CUNEIFORM SIGN KAK;Lo;0;L;;;;;N;;;;; +12196;CUNEIFORM SIGN KAK TIMES IGI GUNU;Lo;0;L;;;;;N;;;;; +12197;CUNEIFORM SIGN KAL;Lo;0;L;;;;;N;;;;; +12198;CUNEIFORM SIGN KAL TIMES BAD;Lo;0;L;;;;;N;;;;; +12199;CUNEIFORM SIGN KAL CROSSING KAL;Lo;0;L;;;;;N;;;;; +1219A;CUNEIFORM SIGN KAM2;Lo;0;L;;;;;N;;;;; +1219B;CUNEIFORM SIGN KAM4;Lo;0;L;;;;;N;;;;; +1219C;CUNEIFORM SIGN KASKAL;Lo;0;L;;;;;N;;;;; +1219D;CUNEIFORM SIGN KASKAL LAGAB TIMES U OVER LAGAB TIMES U;Lo;0;L;;;;;N;;;;; +1219E;CUNEIFORM SIGN KASKAL OVER KASKAL LAGAB TIMES U OVER LAGAB TIMES U;Lo;0;L;;;;;N;;;;; +1219F;CUNEIFORM SIGN KESH2;Lo;0;L;;;;;N;;;;; +121A0;CUNEIFORM SIGN KI;Lo;0;L;;;;;N;;;;; +121A1;CUNEIFORM SIGN KI TIMES BAD;Lo;0;L;;;;;N;;;;; +121A2;CUNEIFORM SIGN KI TIMES U;Lo;0;L;;;;;N;;;;; +121A3;CUNEIFORM SIGN KI TIMES UD;Lo;0;L;;;;;N;;;;; +121A4;CUNEIFORM SIGN KID;Lo;0;L;;;;;N;;;;; +121A5;CUNEIFORM SIGN KIN;Lo;0;L;;;;;N;;;;; +121A6;CUNEIFORM SIGN KISAL;Lo;0;L;;;;;N;;;;; +121A7;CUNEIFORM SIGN KISH;Lo;0;L;;;;;N;;;;; +121A8;CUNEIFORM SIGN KISIM5;Lo;0;L;;;;;N;;;;; +121A9;CUNEIFORM SIGN KISIM5 OVER KISIM5;Lo;0;L;;;;;N;;;;; +121AA;CUNEIFORM SIGN KU;Lo;0;L;;;;;N;;;;; +121AB;CUNEIFORM SIGN KU OVER HI TIMES ASH2 KU OVER HI TIMES ASH2;Lo;0;L;;;;;N;;;;; +121AC;CUNEIFORM SIGN KU3;Lo;0;L;;;;;N;;;;; +121AD;CUNEIFORM SIGN KU4;Lo;0;L;;;;;N;;;;; +121AE;CUNEIFORM SIGN KU4 VARIANT FORM;Lo;0;L;;;;;N;;;;; +121AF;CUNEIFORM SIGN KU7;Lo;0;L;;;;;N;;;;; +121B0;CUNEIFORM SIGN KUL;Lo;0;L;;;;;N;;;;; +121B1;CUNEIFORM SIGN KUL GUNU;Lo;0;L;;;;;N;;;;; +121B2;CUNEIFORM SIGN KUN;Lo;0;L;;;;;N;;;;; +121B3;CUNEIFORM SIGN KUR;Lo;0;L;;;;;N;;;;; +121B4;CUNEIFORM SIGN KUR OPPOSING KUR;Lo;0;L;;;;;N;;;;; +121B5;CUNEIFORM SIGN KUSHU2;Lo;0;L;;;;;N;;;;; +121B6;CUNEIFORM SIGN KWU318;Lo;0;L;;;;;N;;;;; +121B7;CUNEIFORM SIGN LA;Lo;0;L;;;;;N;;;;; +121B8;CUNEIFORM SIGN LAGAB;Lo;0;L;;;;;N;;;;; +121B9;CUNEIFORM SIGN LAGAB TIMES A;Lo;0;L;;;;;N;;;;; +121BA;CUNEIFORM SIGN LAGAB TIMES A PLUS DA PLUS HA;Lo;0;L;;;;;N;;;;; +121BB;CUNEIFORM SIGN LAGAB TIMES A PLUS GAR;Lo;0;L;;;;;N;;;;; +121BC;CUNEIFORM SIGN LAGAB TIMES A PLUS LAL;Lo;0;L;;;;;N;;;;; +121BD;CUNEIFORM SIGN LAGAB TIMES AL;Lo;0;L;;;;;N;;;;; +121BE;CUNEIFORM SIGN LAGAB TIMES AN;Lo;0;L;;;;;N;;;;; +121BF;CUNEIFORM SIGN LAGAB TIMES ASH ZIDA TENU;Lo;0;L;;;;;N;;;;; +121C0;CUNEIFORM SIGN LAGAB TIMES BAD;Lo;0;L;;;;;N;;;;; +121C1;CUNEIFORM SIGN LAGAB TIMES BI;Lo;0;L;;;;;N;;;;; +121C2;CUNEIFORM SIGN LAGAB TIMES DAR;Lo;0;L;;;;;N;;;;; +121C3;CUNEIFORM SIGN LAGAB TIMES EN;Lo;0;L;;;;;N;;;;; +121C4;CUNEIFORM SIGN LAGAB TIMES GA;Lo;0;L;;;;;N;;;;; +121C5;CUNEIFORM SIGN LAGAB TIMES GAR;Lo;0;L;;;;;N;;;;; +121C6;CUNEIFORM SIGN LAGAB TIMES GUD;Lo;0;L;;;;;N;;;;; +121C7;CUNEIFORM SIGN LAGAB TIMES GUD PLUS GUD;Lo;0;L;;;;;N;;;;; +121C8;CUNEIFORM SIGN LAGAB TIMES HA;Lo;0;L;;;;;N;;;;; +121C9;CUNEIFORM SIGN LAGAB TIMES HAL;Lo;0;L;;;;;N;;;;; +121CA;CUNEIFORM SIGN LAGAB TIMES HI TIMES NUN;Lo;0;L;;;;;N;;;;; +121CB;CUNEIFORM SIGN LAGAB TIMES IGI GUNU;Lo;0;L;;;;;N;;;;; +121CC;CUNEIFORM SIGN LAGAB TIMES IM;Lo;0;L;;;;;N;;;;; +121CD;CUNEIFORM SIGN LAGAB TIMES IM PLUS HA;Lo;0;L;;;;;N;;;;; +121CE;CUNEIFORM SIGN LAGAB TIMES IM PLUS LU;Lo;0;L;;;;;N;;;;; +121CF;CUNEIFORM SIGN LAGAB TIMES KI;Lo;0;L;;;;;N;;;;; +121D0;CUNEIFORM SIGN LAGAB TIMES KIN;Lo;0;L;;;;;N;;;;; +121D1;CUNEIFORM SIGN LAGAB TIMES KU3;Lo;0;L;;;;;N;;;;; +121D2;CUNEIFORM SIGN LAGAB TIMES KUL;Lo;0;L;;;;;N;;;;; +121D3;CUNEIFORM SIGN LAGAB TIMES KUL PLUS HI PLUS A;Lo;0;L;;;;;N;;;;; +121D4;CUNEIFORM SIGN LAGAB TIMES LAGAB;Lo;0;L;;;;;N;;;;; +121D5;CUNEIFORM SIGN LAGAB TIMES LISH;Lo;0;L;;;;;N;;;;; +121D6;CUNEIFORM SIGN LAGAB TIMES LU;Lo;0;L;;;;;N;;;;; +121D7;CUNEIFORM SIGN LAGAB TIMES LUL;Lo;0;L;;;;;N;;;;; +121D8;CUNEIFORM SIGN LAGAB TIMES ME;Lo;0;L;;;;;N;;;;; +121D9;CUNEIFORM SIGN LAGAB TIMES ME PLUS EN;Lo;0;L;;;;;N;;;;; +121DA;CUNEIFORM SIGN LAGAB TIMES MUSH;Lo;0;L;;;;;N;;;;; +121DB;CUNEIFORM SIGN LAGAB TIMES NE;Lo;0;L;;;;;N;;;;; +121DC;CUNEIFORM SIGN LAGAB TIMES SHE PLUS SUM;Lo;0;L;;;;;N;;;;; +121DD;CUNEIFORM SIGN LAGAB TIMES SHITA PLUS GISH PLUS ERIN2;Lo;0;L;;;;;N;;;;; +121DE;CUNEIFORM SIGN LAGAB TIMES SHITA PLUS GISH TENU;Lo;0;L;;;;;N;;;;; +121DF;CUNEIFORM SIGN LAGAB TIMES SHU2;Lo;0;L;;;;;N;;;;; +121E0;CUNEIFORM SIGN LAGAB TIMES SHU2 PLUS SHU2;Lo;0;L;;;;;N;;;;; +121E1;CUNEIFORM SIGN LAGAB TIMES SUM;Lo;0;L;;;;;N;;;;; +121E2;CUNEIFORM SIGN LAGAB TIMES TAG;Lo;0;L;;;;;N;;;;; +121E3;CUNEIFORM SIGN LAGAB TIMES TAK4;Lo;0;L;;;;;N;;;;; +121E4;CUNEIFORM SIGN LAGAB TIMES TE PLUS A PLUS SU PLUS NA;Lo;0;L;;;;;N;;;;; +121E5;CUNEIFORM SIGN LAGAB TIMES U;Lo;0;L;;;;;N;;;;; +121E6;CUNEIFORM SIGN LAGAB TIMES U PLUS A;Lo;0;L;;;;;N;;;;; +121E7;CUNEIFORM SIGN LAGAB TIMES U PLUS U PLUS U;Lo;0;L;;;;;N;;;;; +121E8;CUNEIFORM SIGN LAGAB TIMES U2 PLUS ASH;Lo;0;L;;;;;N;;;;; +121E9;CUNEIFORM SIGN LAGAB TIMES UD;Lo;0;L;;;;;N;;;;; +121EA;CUNEIFORM SIGN LAGAB TIMES USH;Lo;0;L;;;;;N;;;;; +121EB;CUNEIFORM SIGN LAGAB SQUARED;Lo;0;L;;;;;N;;;;; +121EC;CUNEIFORM SIGN LAGAR;Lo;0;L;;;;;N;;;;; +121ED;CUNEIFORM SIGN LAGAR TIMES SHE;Lo;0;L;;;;;N;;;;; +121EE;CUNEIFORM SIGN LAGAR TIMES SHE PLUS SUM;Lo;0;L;;;;;N;;;;; +121EF;CUNEIFORM SIGN LAGAR GUNU;Lo;0;L;;;;;N;;;;; +121F0;CUNEIFORM SIGN LAGAR GUNU OVER LAGAR GUNU SHE;Lo;0;L;;;;;N;;;;; +121F1;CUNEIFORM SIGN LAHSHU;Lo;0;L;;;;;N;;;;; +121F2;CUNEIFORM SIGN LAL;Lo;0;L;;;;;N;;;;; +121F3;CUNEIFORM SIGN LAL TIMES LAL;Lo;0;L;;;;;N;;;;; +121F4;CUNEIFORM SIGN LAM;Lo;0;L;;;;;N;;;;; +121F5;CUNEIFORM SIGN LAM TIMES KUR;Lo;0;L;;;;;N;;;;; +121F6;CUNEIFORM SIGN LAM TIMES KUR PLUS RU;Lo;0;L;;;;;N;;;;; +121F7;CUNEIFORM SIGN LI;Lo;0;L;;;;;N;;;;; +121F8;CUNEIFORM SIGN LIL;Lo;0;L;;;;;N;;;;; +121F9;CUNEIFORM SIGN LIMMU2;Lo;0;L;;;;;N;;;;; +121FA;CUNEIFORM SIGN LISH;Lo;0;L;;;;;N;;;;; +121FB;CUNEIFORM SIGN LU;Lo;0;L;;;;;N;;;;; +121FC;CUNEIFORM SIGN LU TIMES BAD;Lo;0;L;;;;;N;;;;; +121FD;CUNEIFORM SIGN LU2;Lo;0;L;;;;;N;;;;; +121FE;CUNEIFORM SIGN LU2 TIMES AL;Lo;0;L;;;;;N;;;;; +121FF;CUNEIFORM SIGN LU2 TIMES BAD;Lo;0;L;;;;;N;;;;; +12200;CUNEIFORM SIGN LU2 TIMES ESH2;Lo;0;L;;;;;N;;;;; +12201;CUNEIFORM SIGN LU2 TIMES ESH2 TENU;Lo;0;L;;;;;N;;;;; +12202;CUNEIFORM SIGN LU2 TIMES GAN2 TENU;Lo;0;L;;;;;N;;;;; +12203;CUNEIFORM SIGN LU2 TIMES HI TIMES BAD;Lo;0;L;;;;;N;;;;; +12204;CUNEIFORM SIGN LU2 TIMES IM;Lo;0;L;;;;;N;;;;; +12205;CUNEIFORM SIGN LU2 TIMES KAD2;Lo;0;L;;;;;N;;;;; +12206;CUNEIFORM SIGN LU2 TIMES KAD3;Lo;0;L;;;;;N;;;;; +12207;CUNEIFORM SIGN LU2 TIMES KAD3 PLUS ASH;Lo;0;L;;;;;N;;;;; +12208;CUNEIFORM SIGN LU2 TIMES KI;Lo;0;L;;;;;N;;;;; +12209;CUNEIFORM SIGN LU2 TIMES LA PLUS ASH;Lo;0;L;;;;;N;;;;; +1220A;CUNEIFORM SIGN LU2 TIMES LAGAB;Lo;0;L;;;;;N;;;;; +1220B;CUNEIFORM SIGN LU2 TIMES ME PLUS EN;Lo;0;L;;;;;N;;;;; +1220C;CUNEIFORM SIGN LU2 TIMES NE;Lo;0;L;;;;;N;;;;; +1220D;CUNEIFORM SIGN LU2 TIMES NU;Lo;0;L;;;;;N;;;;; +1220E;CUNEIFORM SIGN LU2 TIMES SI PLUS ASH;Lo;0;L;;;;;N;;;;; +1220F;CUNEIFORM SIGN LU2 TIMES SIK2 PLUS BU;Lo;0;L;;;;;N;;;;; +12210;CUNEIFORM SIGN LU2 TIMES TUG2;Lo;0;L;;;;;N;;;;; +12211;CUNEIFORM SIGN LU2 TENU;Lo;0;L;;;;;N;;;;; +12212;CUNEIFORM SIGN LU2 CROSSING LU2;Lo;0;L;;;;;N;;;;; +12213;CUNEIFORM SIGN LU2 OPPOSING LU2;Lo;0;L;;;;;N;;;;; +12214;CUNEIFORM SIGN LU2 SQUARED;Lo;0;L;;;;;N;;;;; +12215;CUNEIFORM SIGN LU2 SHESHIG;Lo;0;L;;;;;N;;;;; +12216;CUNEIFORM SIGN LU3;Lo;0;L;;;;;N;;;;; +12217;CUNEIFORM SIGN LUGAL;Lo;0;L;;;;;N;;;;; +12218;CUNEIFORM SIGN LUGAL OVER LUGAL;Lo;0;L;;;;;N;;;;; +12219;CUNEIFORM SIGN LUGAL OPPOSING LUGAL;Lo;0;L;;;;;N;;;;; +1221A;CUNEIFORM SIGN LUGAL SHESHIG;Lo;0;L;;;;;N;;;;; +1221B;CUNEIFORM SIGN LUH;Lo;0;L;;;;;N;;;;; +1221C;CUNEIFORM SIGN LUL;Lo;0;L;;;;;N;;;;; +1221D;CUNEIFORM SIGN LUM;Lo;0;L;;;;;N;;;;; +1221E;CUNEIFORM SIGN LUM OVER LUM;Lo;0;L;;;;;N;;;;; +1221F;CUNEIFORM SIGN LUM OVER LUM GAR OVER GAR;Lo;0;L;;;;;N;;;;; +12220;CUNEIFORM SIGN MA;Lo;0;L;;;;;N;;;;; +12221;CUNEIFORM SIGN MA TIMES TAK4;Lo;0;L;;;;;N;;;;; +12222;CUNEIFORM SIGN MA GUNU;Lo;0;L;;;;;N;;;;; +12223;CUNEIFORM SIGN MA2;Lo;0;L;;;;;N;;;;; +12224;CUNEIFORM SIGN MAH;Lo;0;L;;;;;N;;;;; +12225;CUNEIFORM SIGN MAR;Lo;0;L;;;;;N;;;;; +12226;CUNEIFORM SIGN MASH;Lo;0;L;;;;;N;;;;; +12227;CUNEIFORM SIGN MASH2;Lo;0;L;;;;;N;;;;; +12228;CUNEIFORM SIGN ME;Lo;0;L;;;;;N;;;;; +12229;CUNEIFORM SIGN MES;Lo;0;L;;;;;N;;;;; +1222A;CUNEIFORM SIGN MI;Lo;0;L;;;;;N;;;;; +1222B;CUNEIFORM SIGN MIN;Lo;0;L;;;;;N;;;;; +1222C;CUNEIFORM SIGN MU;Lo;0;L;;;;;N;;;;; +1222D;CUNEIFORM SIGN MU OVER MU;Lo;0;L;;;;;N;;;;; +1222E;CUNEIFORM SIGN MUG;Lo;0;L;;;;;N;;;;; +1222F;CUNEIFORM SIGN MUG GUNU;Lo;0;L;;;;;N;;;;; +12230;CUNEIFORM SIGN MUNSUB;Lo;0;L;;;;;N;;;;; +12231;CUNEIFORM SIGN MURGU2;Lo;0;L;;;;;N;;;;; +12232;CUNEIFORM SIGN MUSH;Lo;0;L;;;;;N;;;;; +12233;CUNEIFORM SIGN MUSH TIMES A;Lo;0;L;;;;;N;;;;; +12234;CUNEIFORM SIGN MUSH TIMES KUR;Lo;0;L;;;;;N;;;;; +12235;CUNEIFORM SIGN MUSH TIMES ZA;Lo;0;L;;;;;N;;;;; +12236;CUNEIFORM SIGN MUSH OVER MUSH;Lo;0;L;;;;;N;;;;; +12237;CUNEIFORM SIGN MUSH OVER MUSH TIMES A PLUS NA;Lo;0;L;;;;;N;;;;; +12238;CUNEIFORM SIGN MUSH CROSSING MUSH;Lo;0;L;;;;;N;;;;; +12239;CUNEIFORM SIGN MUSH3;Lo;0;L;;;;;N;;;;; +1223A;CUNEIFORM SIGN MUSH3 TIMES A;Lo;0;L;;;;;N;;;;; +1223B;CUNEIFORM SIGN MUSH3 TIMES A PLUS DI;Lo;0;L;;;;;N;;;;; +1223C;CUNEIFORM SIGN MUSH3 TIMES DI;Lo;0;L;;;;;N;;;;; +1223D;CUNEIFORM SIGN MUSH3 GUNU;Lo;0;L;;;;;N;;;;; +1223E;CUNEIFORM SIGN NA;Lo;0;L;;;;;N;;;;; +1223F;CUNEIFORM SIGN NA2;Lo;0;L;;;;;N;;;;; +12240;CUNEIFORM SIGN NAGA;Lo;0;L;;;;;N;;;;; +12241;CUNEIFORM SIGN NAGA INVERTED;Lo;0;L;;;;;N;;;;; +12242;CUNEIFORM SIGN NAGA TIMES SHU TENU;Lo;0;L;;;;;N;;;;; +12243;CUNEIFORM SIGN NAGA OPPOSING NAGA;Lo;0;L;;;;;N;;;;; +12244;CUNEIFORM SIGN NAGAR;Lo;0;L;;;;;N;;;;; +12245;CUNEIFORM SIGN NAM NUTILLU;Lo;0;L;;;;;N;;;;; +12246;CUNEIFORM SIGN NAM;Lo;0;L;;;;;N;;;;; +12247;CUNEIFORM SIGN NAM2;Lo;0;L;;;;;N;;;;; +12248;CUNEIFORM SIGN NE;Lo;0;L;;;;;N;;;;; +12249;CUNEIFORM SIGN NE TIMES A;Lo;0;L;;;;;N;;;;; +1224A;CUNEIFORM SIGN NE TIMES UD;Lo;0;L;;;;;N;;;;; +1224B;CUNEIFORM SIGN NE SHESHIG;Lo;0;L;;;;;N;;;;; +1224C;CUNEIFORM SIGN NI;Lo;0;L;;;;;N;;;;; +1224D;CUNEIFORM SIGN NI TIMES E;Lo;0;L;;;;;N;;;;; +1224E;CUNEIFORM SIGN NI2;Lo;0;L;;;;;N;;;;; +1224F;CUNEIFORM SIGN NIM;Lo;0;L;;;;;N;;;;; +12250;CUNEIFORM SIGN NIM TIMES GAN2 TENU;Lo;0;L;;;;;N;;;;; +12251;CUNEIFORM SIGN NIM TIMES GAR PLUS GAN2 TENU;Lo;0;L;;;;;N;;;;; +12252;CUNEIFORM SIGN NINDA2;Lo;0;L;;;;;N;;;;; +12253;CUNEIFORM SIGN NINDA2 TIMES AN;Lo;0;L;;;;;N;;;;; +12254;CUNEIFORM SIGN NINDA2 TIMES ASH;Lo;0;L;;;;;N;;;;; +12255;CUNEIFORM SIGN NINDA2 TIMES ASH PLUS ASH;Lo;0;L;;;;;N;;;;; +12256;CUNEIFORM SIGN NINDA2 TIMES GUD;Lo;0;L;;;;;N;;;;; +12257;CUNEIFORM SIGN NINDA2 TIMES ME PLUS GAN2 TENU;Lo;0;L;;;;;N;;;;; +12258;CUNEIFORM SIGN NINDA2 TIMES NE;Lo;0;L;;;;;N;;;;; +12259;CUNEIFORM SIGN NINDA2 TIMES NUN;Lo;0;L;;;;;N;;;;; +1225A;CUNEIFORM SIGN NINDA2 TIMES SHE;Lo;0;L;;;;;N;;;;; +1225B;CUNEIFORM SIGN NINDA2 TIMES SHE PLUS A AN;Lo;0;L;;;;;N;;;;; +1225C;CUNEIFORM SIGN NINDA2 TIMES SHE PLUS ASH;Lo;0;L;;;;;N;;;;; +1225D;CUNEIFORM SIGN NINDA2 TIMES SHE PLUS ASH PLUS ASH;Lo;0;L;;;;;N;;;;; +1225E;CUNEIFORM SIGN NINDA2 TIMES U2 PLUS ASH;Lo;0;L;;;;;N;;;;; +1225F;CUNEIFORM SIGN NINDA2 TIMES USH;Lo;0;L;;;;;N;;;;; +12260;CUNEIFORM SIGN NISAG;Lo;0;L;;;;;N;;;;; +12261;CUNEIFORM SIGN NU;Lo;0;L;;;;;N;;;;; +12262;CUNEIFORM SIGN NU11;Lo;0;L;;;;;N;;;;; +12263;CUNEIFORM SIGN NUN;Lo;0;L;;;;;N;;;;; +12264;CUNEIFORM SIGN NUN LAGAR TIMES GAR;Lo;0;L;;;;;N;;;;; +12265;CUNEIFORM SIGN NUN LAGAR TIMES MASH;Lo;0;L;;;;;N;;;;; +12266;CUNEIFORM SIGN NUN LAGAR TIMES SAL;Lo;0;L;;;;;N;;;;; +12267;CUNEIFORM SIGN NUN LAGAR TIMES SAL OVER NUN LAGAR TIMES SAL;Lo;0;L;;;;;N;;;;; +12268;CUNEIFORM SIGN NUN LAGAR TIMES USH;Lo;0;L;;;;;N;;;;; +12269;CUNEIFORM SIGN NUN TENU;Lo;0;L;;;;;N;;;;; +1226A;CUNEIFORM SIGN NUN OVER NUN;Lo;0;L;;;;;N;;;;; +1226B;CUNEIFORM SIGN NUN CROSSING NUN;Lo;0;L;;;;;N;;;;; +1226C;CUNEIFORM SIGN NUN CROSSING NUN LAGAR OVER LAGAR;Lo;0;L;;;;;N;;;;; +1226D;CUNEIFORM SIGN NUNUZ;Lo;0;L;;;;;N;;;;; +1226E;CUNEIFORM SIGN NUNUZ AB2 TIMES ASHGAB;Lo;0;L;;;;;N;;;;; +1226F;CUNEIFORM SIGN NUNUZ AB2 TIMES BI;Lo;0;L;;;;;N;;;;; +12270;CUNEIFORM SIGN NUNUZ AB2 TIMES DUG;Lo;0;L;;;;;N;;;;; +12271;CUNEIFORM SIGN NUNUZ AB2 TIMES GUD;Lo;0;L;;;;;N;;;;; +12272;CUNEIFORM SIGN NUNUZ AB2 TIMES IGI GUNU;Lo;0;L;;;;;N;;;;; +12273;CUNEIFORM SIGN NUNUZ AB2 TIMES KAD3;Lo;0;L;;;;;N;;;;; +12274;CUNEIFORM SIGN NUNUZ AB2 TIMES LA;Lo;0;L;;;;;N;;;;; +12275;CUNEIFORM SIGN NUNUZ AB2 TIMES NE;Lo;0;L;;;;;N;;;;; +12276;CUNEIFORM SIGN NUNUZ AB2 TIMES SILA3;Lo;0;L;;;;;N;;;;; +12277;CUNEIFORM SIGN NUNUZ AB2 TIMES U2;Lo;0;L;;;;;N;;;;; +12278;CUNEIFORM SIGN NUNUZ KISIM5 TIMES BI;Lo;0;L;;;;;N;;;;; +12279;CUNEIFORM SIGN NUNUZ KISIM5 TIMES BI U;Lo;0;L;;;;;N;;;;; +1227A;CUNEIFORM SIGN PA;Lo;0;L;;;;;N;;;;; +1227B;CUNEIFORM SIGN PAD;Lo;0;L;;;;;N;;;;; +1227C;CUNEIFORM SIGN PAN;Lo;0;L;;;;;N;;;;; +1227D;CUNEIFORM SIGN PAP;Lo;0;L;;;;;N;;;;; +1227E;CUNEIFORM SIGN PESH2;Lo;0;L;;;;;N;;;;; +1227F;CUNEIFORM SIGN PI;Lo;0;L;;;;;N;;;;; +12280;CUNEIFORM SIGN PI TIMES A;Lo;0;L;;;;;N;;;;; +12281;CUNEIFORM SIGN PI TIMES AB;Lo;0;L;;;;;N;;;;; +12282;CUNEIFORM SIGN PI TIMES BI;Lo;0;L;;;;;N;;;;; +12283;CUNEIFORM SIGN PI TIMES BU;Lo;0;L;;;;;N;;;;; +12284;CUNEIFORM SIGN PI TIMES E;Lo;0;L;;;;;N;;;;; +12285;CUNEIFORM SIGN PI TIMES I;Lo;0;L;;;;;N;;;;; +12286;CUNEIFORM SIGN PI TIMES IB;Lo;0;L;;;;;N;;;;; +12287;CUNEIFORM SIGN PI TIMES U;Lo;0;L;;;;;N;;;;; +12288;CUNEIFORM SIGN PI TIMES U2;Lo;0;L;;;;;N;;;;; +12289;CUNEIFORM SIGN PI CROSSING PI;Lo;0;L;;;;;N;;;;; +1228A;CUNEIFORM SIGN PIRIG;Lo;0;L;;;;;N;;;;; +1228B;CUNEIFORM SIGN PIRIG TIMES KAL;Lo;0;L;;;;;N;;;;; +1228C;CUNEIFORM SIGN PIRIG TIMES UD;Lo;0;L;;;;;N;;;;; +1228D;CUNEIFORM SIGN PIRIG TIMES ZA;Lo;0;L;;;;;N;;;;; +1228E;CUNEIFORM SIGN PIRIG OPPOSING PIRIG;Lo;0;L;;;;;N;;;;; +1228F;CUNEIFORM SIGN RA;Lo;0;L;;;;;N;;;;; +12290;CUNEIFORM SIGN RAB;Lo;0;L;;;;;N;;;;; +12291;CUNEIFORM SIGN RI;Lo;0;L;;;;;N;;;;; +12292;CUNEIFORM SIGN RU;Lo;0;L;;;;;N;;;;; +12293;CUNEIFORM SIGN SA;Lo;0;L;;;;;N;;;;; +12294;CUNEIFORM SIGN SAG NUTILLU;Lo;0;L;;;;;N;;;;; +12295;CUNEIFORM SIGN SAG;Lo;0;L;;;;;N;;;;; +12296;CUNEIFORM SIGN SAG TIMES A;Lo;0;L;;;;;N;;;;; +12297;CUNEIFORM SIGN SAG TIMES DU;Lo;0;L;;;;;N;;;;; +12298;CUNEIFORM SIGN SAG TIMES DUB;Lo;0;L;;;;;N;;;;; +12299;CUNEIFORM SIGN SAG TIMES HA;Lo;0;L;;;;;N;;;;; +1229A;CUNEIFORM SIGN SAG TIMES KAK;Lo;0;L;;;;;N;;;;; +1229B;CUNEIFORM SIGN SAG TIMES KUR;Lo;0;L;;;;;N;;;;; +1229C;CUNEIFORM SIGN SAG TIMES LUM;Lo;0;L;;;;;N;;;;; +1229D;CUNEIFORM SIGN SAG TIMES MI;Lo;0;L;;;;;N;;;;; +1229E;CUNEIFORM SIGN SAG TIMES NUN;Lo;0;L;;;;;N;;;;; +1229F;CUNEIFORM SIGN SAG TIMES SAL;Lo;0;L;;;;;N;;;;; +122A0;CUNEIFORM SIGN SAG TIMES SHID;Lo;0;L;;;;;N;;;;; +122A1;CUNEIFORM SIGN SAG TIMES TAB;Lo;0;L;;;;;N;;;;; +122A2;CUNEIFORM SIGN SAG TIMES U2;Lo;0;L;;;;;N;;;;; +122A3;CUNEIFORM SIGN SAG TIMES UB;Lo;0;L;;;;;N;;;;; +122A4;CUNEIFORM SIGN SAG TIMES UM;Lo;0;L;;;;;N;;;;; +122A5;CUNEIFORM SIGN SAG TIMES UR;Lo;0;L;;;;;N;;;;; +122A6;CUNEIFORM SIGN SAG TIMES USH;Lo;0;L;;;;;N;;;;; +122A7;CUNEIFORM SIGN SAG OVER SAG;Lo;0;L;;;;;N;;;;; +122A8;CUNEIFORM SIGN SAG GUNU;Lo;0;L;;;;;N;;;;; +122A9;CUNEIFORM SIGN SAL;Lo;0;L;;;;;N;;;;; +122AA;CUNEIFORM SIGN SAL LAGAB TIMES ASH2;Lo;0;L;;;;;N;;;;; +122AB;CUNEIFORM SIGN SANGA2;Lo;0;L;;;;;N;;;;; +122AC;CUNEIFORM SIGN SAR;Lo;0;L;;;;;N;;;;; +122AD;CUNEIFORM SIGN SHA;Lo;0;L;;;;;N;;;;; +122AE;CUNEIFORM SIGN SHA3;Lo;0;L;;;;;N;;;;; +122AF;CUNEIFORM SIGN SHA3 TIMES A;Lo;0;L;;;;;N;;;;; +122B0;CUNEIFORM SIGN SHA3 TIMES BAD;Lo;0;L;;;;;N;;;;; +122B1;CUNEIFORM SIGN SHA3 TIMES GISH;Lo;0;L;;;;;N;;;;; +122B2;CUNEIFORM SIGN SHA3 TIMES NE;Lo;0;L;;;;;N;;;;; +122B3;CUNEIFORM SIGN SHA3 TIMES SHU2;Lo;0;L;;;;;N;;;;; +122B4;CUNEIFORM SIGN SHA3 TIMES TUR;Lo;0;L;;;;;N;;;;; +122B5;CUNEIFORM SIGN SHA3 TIMES U;Lo;0;L;;;;;N;;;;; +122B6;CUNEIFORM SIGN SHA3 TIMES U PLUS A;Lo;0;L;;;;;N;;;;; +122B7;CUNEIFORM SIGN SHA6;Lo;0;L;;;;;N;;;;; +122B8;CUNEIFORM SIGN SHAB6;Lo;0;L;;;;;N;;;;; +122B9;CUNEIFORM SIGN SHAR2;Lo;0;L;;;;;N;;;;; +122BA;CUNEIFORM SIGN SHE;Lo;0;L;;;;;N;;;;; +122BB;CUNEIFORM SIGN SHE HU;Lo;0;L;;;;;N;;;;; +122BC;CUNEIFORM SIGN SHE OVER SHE GAD OVER GAD GAR OVER GAR;Lo;0;L;;;;;N;;;;; +122BD;CUNEIFORM SIGN SHE OVER SHE TAB OVER TAB GAR OVER GAR;Lo;0;L;;;;;N;;;;; +122BE;CUNEIFORM SIGN SHEG9;Lo;0;L;;;;;N;;;;; +122BF;CUNEIFORM SIGN SHEN;Lo;0;L;;;;;N;;;;; +122C0;CUNEIFORM SIGN SHESH;Lo;0;L;;;;;N;;;;; +122C1;CUNEIFORM SIGN SHESH2;Lo;0;L;;;;;N;;;;; +122C2;CUNEIFORM SIGN SHESHLAM;Lo;0;L;;;;;N;;;;; +122C3;CUNEIFORM SIGN SHID;Lo;0;L;;;;;N;;;;; +122C4;CUNEIFORM SIGN SHID TIMES A;Lo;0;L;;;;;N;;;;; +122C5;CUNEIFORM SIGN SHID TIMES IM;Lo;0;L;;;;;N;;;;; +122C6;CUNEIFORM SIGN SHIM;Lo;0;L;;;;;N;;;;; +122C7;CUNEIFORM SIGN SHIM TIMES A;Lo;0;L;;;;;N;;;;; +122C8;CUNEIFORM SIGN SHIM TIMES BAL;Lo;0;L;;;;;N;;;;; +122C9;CUNEIFORM SIGN SHIM TIMES BULUG;Lo;0;L;;;;;N;;;;; +122CA;CUNEIFORM SIGN SHIM TIMES DIN;Lo;0;L;;;;;N;;;;; +122CB;CUNEIFORM SIGN SHIM TIMES GAR;Lo;0;L;;;;;N;;;;; +122CC;CUNEIFORM SIGN SHIM TIMES IGI;Lo;0;L;;;;;N;;;;; +122CD;CUNEIFORM SIGN SHIM TIMES IGI GUNU;Lo;0;L;;;;;N;;;;; +122CE;CUNEIFORM SIGN SHIM TIMES KUSHU2;Lo;0;L;;;;;N;;;;; +122CF;CUNEIFORM SIGN SHIM TIMES LUL;Lo;0;L;;;;;N;;;;; +122D0;CUNEIFORM SIGN SHIM TIMES MUG;Lo;0;L;;;;;N;;;;; +122D1;CUNEIFORM SIGN SHIM TIMES SAL;Lo;0;L;;;;;N;;;;; +122D2;CUNEIFORM SIGN SHINIG;Lo;0;L;;;;;N;;;;; +122D3;CUNEIFORM SIGN SHIR;Lo;0;L;;;;;N;;;;; +122D4;CUNEIFORM SIGN SHIR TENU;Lo;0;L;;;;;N;;;;; +122D5;CUNEIFORM SIGN SHIR OVER SHIR BUR OVER BUR;Lo;0;L;;;;;N;;;;; +122D6;CUNEIFORM SIGN SHITA;Lo;0;L;;;;;N;;;;; +122D7;CUNEIFORM SIGN SHU;Lo;0;L;;;;;N;;;;; +122D8;CUNEIFORM SIGN SHU OVER INVERTED SHU;Lo;0;L;;;;;N;;;;; +122D9;CUNEIFORM SIGN SHU2;Lo;0;L;;;;;N;;;;; +122DA;CUNEIFORM SIGN SHUBUR;Lo;0;L;;;;;N;;;;; +122DB;CUNEIFORM SIGN SI;Lo;0;L;;;;;N;;;;; +122DC;CUNEIFORM SIGN SI GUNU;Lo;0;L;;;;;N;;;;; +122DD;CUNEIFORM SIGN SIG;Lo;0;L;;;;;N;;;;; +122DE;CUNEIFORM SIGN SIG4;Lo;0;L;;;;;N;;;;; +122DF;CUNEIFORM SIGN SIG4 OVER SIG4 SHU2;Lo;0;L;;;;;N;;;;; +122E0;CUNEIFORM SIGN SIK2;Lo;0;L;;;;;N;;;;; +122E1;CUNEIFORM SIGN SILA3;Lo;0;L;;;;;N;;;;; +122E2;CUNEIFORM SIGN SU;Lo;0;L;;;;;N;;;;; +122E3;CUNEIFORM SIGN SU OVER SU;Lo;0;L;;;;;N;;;;; +122E4;CUNEIFORM SIGN SUD;Lo;0;L;;;;;N;;;;; +122E5;CUNEIFORM SIGN SUD2;Lo;0;L;;;;;N;;;;; +122E6;CUNEIFORM SIGN SUHUR;Lo;0;L;;;;;N;;;;; +122E7;CUNEIFORM SIGN SUM;Lo;0;L;;;;;N;;;;; +122E8;CUNEIFORM SIGN SUMASH;Lo;0;L;;;;;N;;;;; +122E9;CUNEIFORM SIGN SUR;Lo;0;L;;;;;N;;;;; +122EA;CUNEIFORM SIGN SUR9;Lo;0;L;;;;;N;;;;; +122EB;CUNEIFORM SIGN TA;Lo;0;L;;;;;N;;;;; +122EC;CUNEIFORM SIGN TA ASTERISK;Lo;0;L;;;;;N;;;;; +122ED;CUNEIFORM SIGN TA TIMES HI;Lo;0;L;;;;;N;;;;; +122EE;CUNEIFORM SIGN TA TIMES MI;Lo;0;L;;;;;N;;;;; +122EF;CUNEIFORM SIGN TA GUNU;Lo;0;L;;;;;N;;;;; +122F0;CUNEIFORM SIGN TAB;Lo;0;L;;;;;N;;;;; +122F1;CUNEIFORM SIGN TAB OVER TAB NI OVER NI DISH OVER DISH;Lo;0;L;;;;;N;;;;; +122F2;CUNEIFORM SIGN TAB SQUARED;Lo;0;L;;;;;N;;;;; +122F3;CUNEIFORM SIGN TAG;Lo;0;L;;;;;N;;;;; +122F4;CUNEIFORM SIGN TAG TIMES BI;Lo;0;L;;;;;N;;;;; +122F5;CUNEIFORM SIGN TAG TIMES GUD;Lo;0;L;;;;;N;;;;; +122F6;CUNEIFORM SIGN TAG TIMES SHE;Lo;0;L;;;;;N;;;;; +122F7;CUNEIFORM SIGN TAG TIMES SHU;Lo;0;L;;;;;N;;;;; +122F8;CUNEIFORM SIGN TAG TIMES TUG2;Lo;0;L;;;;;N;;;;; +122F9;CUNEIFORM SIGN TAG TIMES UD;Lo;0;L;;;;;N;;;;; +122FA;CUNEIFORM SIGN TAK4;Lo;0;L;;;;;N;;;;; +122FB;CUNEIFORM SIGN TAR;Lo;0;L;;;;;N;;;;; +122FC;CUNEIFORM SIGN TE;Lo;0;L;;;;;N;;;;; +122FD;CUNEIFORM SIGN TE GUNU;Lo;0;L;;;;;N;;;;; +122FE;CUNEIFORM SIGN TI;Lo;0;L;;;;;N;;;;; +122FF;CUNEIFORM SIGN TI TENU;Lo;0;L;;;;;N;;;;; +12300;CUNEIFORM SIGN TIL;Lo;0;L;;;;;N;;;;; +12301;CUNEIFORM SIGN TIR;Lo;0;L;;;;;N;;;;; +12302;CUNEIFORM SIGN TIR TIMES TAK4;Lo;0;L;;;;;N;;;;; +12303;CUNEIFORM SIGN TIR OVER TIR;Lo;0;L;;;;;N;;;;; +12304;CUNEIFORM SIGN TIR OVER TIR GAD OVER GAD GAR OVER GAR;Lo;0;L;;;;;N;;;;; +12305;CUNEIFORM SIGN TU;Lo;0;L;;;;;N;;;;; +12306;CUNEIFORM SIGN TUG2;Lo;0;L;;;;;N;;;;; +12307;CUNEIFORM SIGN TUK;Lo;0;L;;;;;N;;;;; +12308;CUNEIFORM SIGN TUM;Lo;0;L;;;;;N;;;;; +12309;CUNEIFORM SIGN TUR;Lo;0;L;;;;;N;;;;; +1230A;CUNEIFORM SIGN TUR OVER TUR ZA OVER ZA;Lo;0;L;;;;;N;;;;; +1230B;CUNEIFORM SIGN U;Lo;0;L;;;;;N;;;;; +1230C;CUNEIFORM SIGN U GUD;Lo;0;L;;;;;N;;;;; +1230D;CUNEIFORM SIGN U U U;Lo;0;L;;;;;N;;;;; +1230E;CUNEIFORM SIGN U OVER U PA OVER PA GAR OVER GAR;Lo;0;L;;;;;N;;;;; +1230F;CUNEIFORM SIGN U OVER U SUR OVER SUR;Lo;0;L;;;;;N;;;;; +12310;CUNEIFORM SIGN U OVER U U REVERSED OVER U REVERSED;Lo;0;L;;;;;N;;;;; +12311;CUNEIFORM SIGN U2;Lo;0;L;;;;;N;;;;; +12312;CUNEIFORM SIGN UB;Lo;0;L;;;;;N;;;;; +12313;CUNEIFORM SIGN UD;Lo;0;L;;;;;N;;;;; +12314;CUNEIFORM SIGN UD KUSHU2;Lo;0;L;;;;;N;;;;; +12315;CUNEIFORM SIGN UD TIMES BAD;Lo;0;L;;;;;N;;;;; +12316;CUNEIFORM SIGN UD TIMES MI;Lo;0;L;;;;;N;;;;; +12317;CUNEIFORM SIGN UD TIMES U PLUS U PLUS U;Lo;0;L;;;;;N;;;;; +12318;CUNEIFORM SIGN UD TIMES U PLUS U PLUS U GUNU;Lo;0;L;;;;;N;;;;; +12319;CUNEIFORM SIGN UD GUNU;Lo;0;L;;;;;N;;;;; +1231A;CUNEIFORM SIGN UD SHESHIG;Lo;0;L;;;;;N;;;;; +1231B;CUNEIFORM SIGN UD SHESHIG TIMES BAD;Lo;0;L;;;;;N;;;;; +1231C;CUNEIFORM SIGN UDUG;Lo;0;L;;;;;N;;;;; +1231D;CUNEIFORM SIGN UM;Lo;0;L;;;;;N;;;;; +1231E;CUNEIFORM SIGN UM TIMES LAGAB;Lo;0;L;;;;;N;;;;; +1231F;CUNEIFORM SIGN UM TIMES ME PLUS DA;Lo;0;L;;;;;N;;;;; +12320;CUNEIFORM SIGN UM TIMES SHA3;Lo;0;L;;;;;N;;;;; +12321;CUNEIFORM SIGN UM TIMES U;Lo;0;L;;;;;N;;;;; +12322;CUNEIFORM SIGN UMBIN;Lo;0;L;;;;;N;;;;; +12323;CUNEIFORM SIGN UMUM;Lo;0;L;;;;;N;;;;; +12324;CUNEIFORM SIGN UMUM TIMES KASKAL;Lo;0;L;;;;;N;;;;; +12325;CUNEIFORM SIGN UMUM TIMES PA;Lo;0;L;;;;;N;;;;; +12326;CUNEIFORM SIGN UN;Lo;0;L;;;;;N;;;;; +12327;CUNEIFORM SIGN UN GUNU;Lo;0;L;;;;;N;;;;; +12328;CUNEIFORM SIGN UR;Lo;0;L;;;;;N;;;;; +12329;CUNEIFORM SIGN UR CROSSING UR;Lo;0;L;;;;;N;;;;; +1232A;CUNEIFORM SIGN UR SHESHIG;Lo;0;L;;;;;N;;;;; +1232B;CUNEIFORM SIGN UR2;Lo;0;L;;;;;N;;;;; +1232C;CUNEIFORM SIGN UR2 TIMES A PLUS HA;Lo;0;L;;;;;N;;;;; +1232D;CUNEIFORM SIGN UR2 TIMES A PLUS NA;Lo;0;L;;;;;N;;;;; +1232E;CUNEIFORM SIGN UR2 TIMES AL;Lo;0;L;;;;;N;;;;; +1232F;CUNEIFORM SIGN UR2 TIMES HA;Lo;0;L;;;;;N;;;;; +12330;CUNEIFORM SIGN UR2 TIMES NUN;Lo;0;L;;;;;N;;;;; +12331;CUNEIFORM SIGN UR2 TIMES U2;Lo;0;L;;;;;N;;;;; +12332;CUNEIFORM SIGN UR2 TIMES U2 PLUS ASH;Lo;0;L;;;;;N;;;;; +12333;CUNEIFORM SIGN UR2 TIMES U2 PLUS BI;Lo;0;L;;;;;N;;;;; +12334;CUNEIFORM SIGN UR4;Lo;0;L;;;;;N;;;;; +12335;CUNEIFORM SIGN URI;Lo;0;L;;;;;N;;;;; +12336;CUNEIFORM SIGN URI3;Lo;0;L;;;;;N;;;;; +12337;CUNEIFORM SIGN URU;Lo;0;L;;;;;N;;;;; +12338;CUNEIFORM SIGN URU TIMES A;Lo;0;L;;;;;N;;;;; +12339;CUNEIFORM SIGN URU TIMES ASHGAB;Lo;0;L;;;;;N;;;;; +1233A;CUNEIFORM SIGN URU TIMES BAR;Lo;0;L;;;;;N;;;;; +1233B;CUNEIFORM SIGN URU TIMES DUN;Lo;0;L;;;;;N;;;;; +1233C;CUNEIFORM SIGN URU TIMES GA;Lo;0;L;;;;;N;;;;; +1233D;CUNEIFORM SIGN URU TIMES GAL;Lo;0;L;;;;;N;;;;; +1233E;CUNEIFORM SIGN URU TIMES GAN2 TENU;Lo;0;L;;;;;N;;;;; +1233F;CUNEIFORM SIGN URU TIMES GAR;Lo;0;L;;;;;N;;;;; +12340;CUNEIFORM SIGN URU TIMES GU;Lo;0;L;;;;;N;;;;; +12341;CUNEIFORM SIGN URU TIMES HA;Lo;0;L;;;;;N;;;;; +12342;CUNEIFORM SIGN URU TIMES IGI;Lo;0;L;;;;;N;;;;; +12343;CUNEIFORM SIGN URU TIMES IM;Lo;0;L;;;;;N;;;;; +12344;CUNEIFORM SIGN URU TIMES ISH;Lo;0;L;;;;;N;;;;; +12345;CUNEIFORM SIGN URU TIMES KI;Lo;0;L;;;;;N;;;;; +12346;CUNEIFORM SIGN URU TIMES LUM;Lo;0;L;;;;;N;;;;; +12347;CUNEIFORM SIGN URU TIMES MIN;Lo;0;L;;;;;N;;;;; +12348;CUNEIFORM SIGN URU TIMES PA;Lo;0;L;;;;;N;;;;; +12349;CUNEIFORM SIGN URU TIMES SHE;Lo;0;L;;;;;N;;;;; +1234A;CUNEIFORM SIGN URU TIMES SIG4;Lo;0;L;;;;;N;;;;; +1234B;CUNEIFORM SIGN URU TIMES TU;Lo;0;L;;;;;N;;;;; +1234C;CUNEIFORM SIGN URU TIMES U PLUS GUD;Lo;0;L;;;;;N;;;;; +1234D;CUNEIFORM SIGN URU TIMES UD;Lo;0;L;;;;;N;;;;; +1234E;CUNEIFORM SIGN URU TIMES URUDA;Lo;0;L;;;;;N;;;;; +1234F;CUNEIFORM SIGN URUDA;Lo;0;L;;;;;N;;;;; +12350;CUNEIFORM SIGN URUDA TIMES U;Lo;0;L;;;;;N;;;;; +12351;CUNEIFORM SIGN USH;Lo;0;L;;;;;N;;;;; +12352;CUNEIFORM SIGN USH TIMES A;Lo;0;L;;;;;N;;;;; +12353;CUNEIFORM SIGN USH TIMES KU;Lo;0;L;;;;;N;;;;; +12354;CUNEIFORM SIGN USH TIMES KUR;Lo;0;L;;;;;N;;;;; +12355;CUNEIFORM SIGN USH TIMES TAK4;Lo;0;L;;;;;N;;;;; +12356;CUNEIFORM SIGN USHX;Lo;0;L;;;;;N;;;;; +12357;CUNEIFORM SIGN USH2;Lo;0;L;;;;;N;;;;; +12358;CUNEIFORM SIGN USHUMX;Lo;0;L;;;;;N;;;;; +12359;CUNEIFORM SIGN UTUKI;Lo;0;L;;;;;N;;;;; +1235A;CUNEIFORM SIGN UZ3;Lo;0;L;;;;;N;;;;; +1235B;CUNEIFORM SIGN UZ3 TIMES KASKAL;Lo;0;L;;;;;N;;;;; +1235C;CUNEIFORM SIGN UZU;Lo;0;L;;;;;N;;;;; +1235D;CUNEIFORM SIGN ZA;Lo;0;L;;;;;N;;;;; +1235E;CUNEIFORM SIGN ZA TENU;Lo;0;L;;;;;N;;;;; +1235F;CUNEIFORM SIGN ZA SQUARED TIMES KUR;Lo;0;L;;;;;N;;;;; +12360;CUNEIFORM SIGN ZAG;Lo;0;L;;;;;N;;;;; +12361;CUNEIFORM SIGN ZAMX;Lo;0;L;;;;;N;;;;; +12362;CUNEIFORM SIGN ZE2;Lo;0;L;;;;;N;;;;; +12363;CUNEIFORM SIGN ZI;Lo;0;L;;;;;N;;;;; +12364;CUNEIFORM SIGN ZI OVER ZI;Lo;0;L;;;;;N;;;;; +12365;CUNEIFORM SIGN ZI3;Lo;0;L;;;;;N;;;;; +12366;CUNEIFORM SIGN ZIB;Lo;0;L;;;;;N;;;;; +12367;CUNEIFORM SIGN ZIB KABA TENU;Lo;0;L;;;;;N;;;;; +12368;CUNEIFORM SIGN ZIG;Lo;0;L;;;;;N;;;;; +12369;CUNEIFORM SIGN ZIZ2;Lo;0;L;;;;;N;;;;; +1236A;CUNEIFORM SIGN ZU;Lo;0;L;;;;;N;;;;; +1236B;CUNEIFORM SIGN ZU5;Lo;0;L;;;;;N;;;;; +1236C;CUNEIFORM SIGN ZU5 TIMES A;Lo;0;L;;;;;N;;;;; +1236D;CUNEIFORM SIGN ZUBUR;Lo;0;L;;;;;N;;;;; +1236E;CUNEIFORM SIGN ZUM;Lo;0;L;;;;;N;;;;; +1236F;CUNEIFORM SIGN KAP ELAMITE;Lo;0;L;;;;;N;;;;; +12370;CUNEIFORM SIGN AB TIMES NUN;Lo;0;L;;;;;N;;;;; +12371;CUNEIFORM SIGN AB2 TIMES A;Lo;0;L;;;;;N;;;;; +12372;CUNEIFORM SIGN AMAR TIMES KUG;Lo;0;L;;;;;N;;;;; +12373;CUNEIFORM SIGN DAG KISIM5 TIMES U2 PLUS MASH;Lo;0;L;;;;;N;;;;; +12374;CUNEIFORM SIGN DAG3;Lo;0;L;;;;;N;;;;; +12375;CUNEIFORM SIGN DISH PLUS SHU;Lo;0;L;;;;;N;;;;; +12376;CUNEIFORM SIGN DUB TIMES SHE;Lo;0;L;;;;;N;;;;; +12377;CUNEIFORM SIGN EZEN TIMES GUD;Lo;0;L;;;;;N;;;;; +12378;CUNEIFORM SIGN EZEN TIMES SHE;Lo;0;L;;;;;N;;;;; +12379;CUNEIFORM SIGN GA2 TIMES AN PLUS KAK PLUS A;Lo;0;L;;;;;N;;;;; +1237A;CUNEIFORM SIGN GA2 TIMES ASH2;Lo;0;L;;;;;N;;;;; +1237B;CUNEIFORM SIGN GE22;Lo;0;L;;;;;N;;;;; +1237C;CUNEIFORM SIGN GIG;Lo;0;L;;;;;N;;;;; +1237D;CUNEIFORM SIGN HUSH;Lo;0;L;;;;;N;;;;; +1237E;CUNEIFORM SIGN KA TIMES ANSHE;Lo;0;L;;;;;N;;;;; +1237F;CUNEIFORM SIGN KA TIMES ASH3;Lo;0;L;;;;;N;;;;; +12380;CUNEIFORM SIGN KA TIMES GISH;Lo;0;L;;;;;N;;;;; +12381;CUNEIFORM SIGN KA TIMES GUD;Lo;0;L;;;;;N;;;;; +12382;CUNEIFORM SIGN KA TIMES HI TIMES ASH2;Lo;0;L;;;;;N;;;;; +12383;CUNEIFORM SIGN KA TIMES LUM;Lo;0;L;;;;;N;;;;; +12384;CUNEIFORM SIGN KA TIMES PA;Lo;0;L;;;;;N;;;;; +12385;CUNEIFORM SIGN KA TIMES SHUL;Lo;0;L;;;;;N;;;;; +12386;CUNEIFORM SIGN KA TIMES TU;Lo;0;L;;;;;N;;;;; +12387;CUNEIFORM SIGN KA TIMES UR2;Lo;0;L;;;;;N;;;;; +12388;CUNEIFORM SIGN LAGAB TIMES GI;Lo;0;L;;;;;N;;;;; +12389;CUNEIFORM SIGN LU2 SHESHIG TIMES BAD;Lo;0;L;;;;;N;;;;; +1238A;CUNEIFORM SIGN LU2 TIMES ESH2 PLUS LAL;Lo;0;L;;;;;N;;;;; +1238B;CUNEIFORM SIGN LU2 TIMES SHU;Lo;0;L;;;;;N;;;;; +1238C;CUNEIFORM SIGN MESH;Lo;0;L;;;;;N;;;;; +1238D;CUNEIFORM SIGN MUSH3 TIMES ZA;Lo;0;L;;;;;N;;;;; +1238E;CUNEIFORM SIGN NA4;Lo;0;L;;;;;N;;;;; +1238F;CUNEIFORM SIGN NIN;Lo;0;L;;;;;N;;;;; +12390;CUNEIFORM SIGN NIN9;Lo;0;L;;;;;N;;;;; +12391;CUNEIFORM SIGN NINDA2 TIMES BAL;Lo;0;L;;;;;N;;;;; +12392;CUNEIFORM SIGN NINDA2 TIMES GI;Lo;0;L;;;;;N;;;;; +12393;CUNEIFORM SIGN NU11 ROTATED NINETY DEGREES;Lo;0;L;;;;;N;;;;; +12394;CUNEIFORM SIGN PESH2 ASTERISK;Lo;0;L;;;;;N;;;;; +12395;CUNEIFORM SIGN PIR2;Lo;0;L;;;;;N;;;;; +12396;CUNEIFORM SIGN SAG TIMES IGI GUNU;Lo;0;L;;;;;N;;;;; +12397;CUNEIFORM SIGN TI2;Lo;0;L;;;;;N;;;;; +12398;CUNEIFORM SIGN UM TIMES ME;Lo;0;L;;;;;N;;;;; +12399;CUNEIFORM SIGN U U;Lo;0;L;;;;;N;;;;; +12400;CUNEIFORM NUMERIC SIGN TWO ASH;Nl;0;L;;;;2;N;;;;; +12401;CUNEIFORM NUMERIC SIGN THREE ASH;Nl;0;L;;;;3;N;;;;; +12402;CUNEIFORM NUMERIC SIGN FOUR ASH;Nl;0;L;;;;4;N;;;;; +12403;CUNEIFORM NUMERIC SIGN FIVE ASH;Nl;0;L;;;;5;N;;;;; +12404;CUNEIFORM NUMERIC SIGN SIX ASH;Nl;0;L;;;;6;N;;;;; +12405;CUNEIFORM NUMERIC SIGN SEVEN ASH;Nl;0;L;;;;7;N;;;;; +12406;CUNEIFORM NUMERIC SIGN EIGHT ASH;Nl;0;L;;;;8;N;;;;; +12407;CUNEIFORM NUMERIC SIGN NINE ASH;Nl;0;L;;;;9;N;;;;; +12408;CUNEIFORM NUMERIC SIGN THREE DISH;Nl;0;L;;;;3;N;;;;; +12409;CUNEIFORM NUMERIC SIGN FOUR DISH;Nl;0;L;;;;4;N;;;;; +1240A;CUNEIFORM NUMERIC SIGN FIVE DISH;Nl;0;L;;;;5;N;;;;; +1240B;CUNEIFORM NUMERIC SIGN SIX DISH;Nl;0;L;;;;6;N;;;;; +1240C;CUNEIFORM NUMERIC SIGN SEVEN DISH;Nl;0;L;;;;7;N;;;;; +1240D;CUNEIFORM NUMERIC SIGN EIGHT DISH;Nl;0;L;;;;8;N;;;;; +1240E;CUNEIFORM NUMERIC SIGN NINE DISH;Nl;0;L;;;;9;N;;;;; +1240F;CUNEIFORM NUMERIC SIGN FOUR U;Nl;0;L;;;;4;N;;;;; +12410;CUNEIFORM NUMERIC SIGN FIVE U;Nl;0;L;;;;5;N;;;;; +12411;CUNEIFORM NUMERIC SIGN SIX U;Nl;0;L;;;;6;N;;;;; +12412;CUNEIFORM NUMERIC SIGN SEVEN U;Nl;0;L;;;;7;N;;;;; +12413;CUNEIFORM NUMERIC SIGN EIGHT U;Nl;0;L;;;;8;N;;;;; +12414;CUNEIFORM NUMERIC SIGN NINE U;Nl;0;L;;;;9;N;;;;; +12415;CUNEIFORM NUMERIC SIGN ONE GESH2;Nl;0;L;;;;1;N;;;;; +12416;CUNEIFORM NUMERIC SIGN TWO GESH2;Nl;0;L;;;;2;N;;;;; +12417;CUNEIFORM NUMERIC SIGN THREE GESH2;Nl;0;L;;;;3;N;;;;; +12418;CUNEIFORM NUMERIC SIGN FOUR GESH2;Nl;0;L;;;;4;N;;;;; +12419;CUNEIFORM NUMERIC SIGN FIVE GESH2;Nl;0;L;;;;5;N;;;;; +1241A;CUNEIFORM NUMERIC SIGN SIX GESH2;Nl;0;L;;;;6;N;;;;; +1241B;CUNEIFORM NUMERIC SIGN SEVEN GESH2;Nl;0;L;;;;7;N;;;;; +1241C;CUNEIFORM NUMERIC SIGN EIGHT GESH2;Nl;0;L;;;;8;N;;;;; +1241D;CUNEIFORM NUMERIC SIGN NINE GESH2;Nl;0;L;;;;9;N;;;;; +1241E;CUNEIFORM NUMERIC SIGN ONE GESHU;Nl;0;L;;;;1;N;;;;; +1241F;CUNEIFORM NUMERIC SIGN TWO GESHU;Nl;0;L;;;;2;N;;;;; +12420;CUNEIFORM NUMERIC SIGN THREE GESHU;Nl;0;L;;;;3;N;;;;; +12421;CUNEIFORM NUMERIC SIGN FOUR GESHU;Nl;0;L;;;;4;N;;;;; +12422;CUNEIFORM NUMERIC SIGN FIVE GESHU;Nl;0;L;;;;5;N;;;;; +12423;CUNEIFORM NUMERIC SIGN TWO SHAR2;Nl;0;L;;;;2;N;;;;; +12424;CUNEIFORM NUMERIC SIGN THREE SHAR2;Nl;0;L;;;;3;N;;;;; +12425;CUNEIFORM NUMERIC SIGN THREE SHAR2 VARIANT FORM;Nl;0;L;;;;3;N;;;;; +12426;CUNEIFORM NUMERIC SIGN FOUR SHAR2;Nl;0;L;;;;4;N;;;;; +12427;CUNEIFORM NUMERIC SIGN FIVE SHAR2;Nl;0;L;;;;5;N;;;;; +12428;CUNEIFORM NUMERIC SIGN SIX SHAR2;Nl;0;L;;;;6;N;;;;; +12429;CUNEIFORM NUMERIC SIGN SEVEN SHAR2;Nl;0;L;;;;7;N;;;;; +1242A;CUNEIFORM NUMERIC SIGN EIGHT SHAR2;Nl;0;L;;;;8;N;;;;; +1242B;CUNEIFORM NUMERIC SIGN NINE SHAR2;Nl;0;L;;;;9;N;;;;; +1242C;CUNEIFORM NUMERIC SIGN ONE SHARU;Nl;0;L;;;;1;N;;;;; +1242D;CUNEIFORM NUMERIC SIGN TWO SHARU;Nl;0;L;;;;2;N;;;;; +1242E;CUNEIFORM NUMERIC SIGN THREE SHARU;Nl;0;L;;;;3;N;;;;; +1242F;CUNEIFORM NUMERIC SIGN THREE SHARU VARIANT FORM;Nl;0;L;;;;3;N;;;;; +12430;CUNEIFORM NUMERIC SIGN FOUR SHARU;Nl;0;L;;;;4;N;;;;; +12431;CUNEIFORM NUMERIC SIGN FIVE SHARU;Nl;0;L;;;;5;N;;;;; +12432;CUNEIFORM NUMERIC SIGN SHAR2 TIMES GAL PLUS DISH;Nl;0;L;;;;216000;N;;;;; +12433;CUNEIFORM NUMERIC SIGN SHAR2 TIMES GAL PLUS MIN;Nl;0;L;;;;432000;N;;;;; +12434;CUNEIFORM NUMERIC SIGN ONE BURU;Nl;0;L;;;;1;N;;;;; +12435;CUNEIFORM NUMERIC SIGN TWO BURU;Nl;0;L;;;;2;N;;;;; +12436;CUNEIFORM NUMERIC SIGN THREE BURU;Nl;0;L;;;;3;N;;;;; +12437;CUNEIFORM NUMERIC SIGN THREE BURU VARIANT FORM;Nl;0;L;;;;3;N;;;;; +12438;CUNEIFORM NUMERIC SIGN FOUR BURU;Nl;0;L;;;;4;N;;;;; +12439;CUNEIFORM NUMERIC SIGN FIVE BURU;Nl;0;L;;;;5;N;;;;; +1243A;CUNEIFORM NUMERIC SIGN THREE VARIANT FORM ESH16;Nl;0;L;;;;3;N;;;;; +1243B;CUNEIFORM NUMERIC SIGN THREE VARIANT FORM ESH21;Nl;0;L;;;;3;N;;;;; +1243C;CUNEIFORM NUMERIC SIGN FOUR VARIANT FORM LIMMU;Nl;0;L;;;;4;N;;;;; +1243D;CUNEIFORM NUMERIC SIGN FOUR VARIANT FORM LIMMU4;Nl;0;L;;;;4;N;;;;; +1243E;CUNEIFORM NUMERIC SIGN FOUR VARIANT FORM LIMMU A;Nl;0;L;;;;4;N;;;;; +1243F;CUNEIFORM NUMERIC SIGN FOUR VARIANT FORM LIMMU B;Nl;0;L;;;;4;N;;;;; +12440;CUNEIFORM NUMERIC SIGN SIX VARIANT FORM ASH9;Nl;0;L;;;;6;N;;;;; +12441;CUNEIFORM NUMERIC SIGN SEVEN VARIANT FORM IMIN3;Nl;0;L;;;;7;N;;;;; +12442;CUNEIFORM NUMERIC SIGN SEVEN VARIANT FORM IMIN A;Nl;0;L;;;;7;N;;;;; +12443;CUNEIFORM NUMERIC SIGN SEVEN VARIANT FORM IMIN B;Nl;0;L;;;;7;N;;;;; +12444;CUNEIFORM NUMERIC SIGN EIGHT VARIANT FORM USSU;Nl;0;L;;;;8;N;;;;; +12445;CUNEIFORM NUMERIC SIGN EIGHT VARIANT FORM USSU3;Nl;0;L;;;;8;N;;;;; +12446;CUNEIFORM NUMERIC SIGN NINE VARIANT FORM ILIMMU;Nl;0;L;;;;9;N;;;;; +12447;CUNEIFORM NUMERIC SIGN NINE VARIANT FORM ILIMMU3;Nl;0;L;;;;9;N;;;;; +12448;CUNEIFORM NUMERIC SIGN NINE VARIANT FORM ILIMMU4;Nl;0;L;;;;9;N;;;;; +12449;CUNEIFORM NUMERIC SIGN NINE VARIANT FORM ILIMMU A;Nl;0;L;;;;9;N;;;;; +1244A;CUNEIFORM NUMERIC SIGN TWO ASH TENU;Nl;0;L;;;;2;N;;;;; +1244B;CUNEIFORM NUMERIC SIGN THREE ASH TENU;Nl;0;L;;;;3;N;;;;; +1244C;CUNEIFORM NUMERIC SIGN FOUR ASH TENU;Nl;0;L;;;;4;N;;;;; +1244D;CUNEIFORM NUMERIC SIGN FIVE ASH TENU;Nl;0;L;;;;5;N;;;;; +1244E;CUNEIFORM NUMERIC SIGN SIX ASH TENU;Nl;0;L;;;;6;N;;;;; +1244F;CUNEIFORM NUMERIC SIGN ONE BAN2;Nl;0;L;;;;1;N;;;;; +12450;CUNEIFORM NUMERIC SIGN TWO BAN2;Nl;0;L;;;;2;N;;;;; +12451;CUNEIFORM NUMERIC SIGN THREE BAN2;Nl;0;L;;;;3;N;;;;; +12452;CUNEIFORM NUMERIC SIGN FOUR BAN2;Nl;0;L;;;;4;N;;;;; +12453;CUNEIFORM NUMERIC SIGN FOUR BAN2 VARIANT FORM;Nl;0;L;;;;4;N;;;;; +12454;CUNEIFORM NUMERIC SIGN FIVE BAN2;Nl;0;L;;;;5;N;;;;; +12455;CUNEIFORM NUMERIC SIGN FIVE BAN2 VARIANT FORM;Nl;0;L;;;;5;N;;;;; +12456;CUNEIFORM NUMERIC SIGN NIGIDAMIN;Nl;0;L;;;;2;N;;;;; +12457;CUNEIFORM NUMERIC SIGN NIGIDAESH;Nl;0;L;;;;3;N;;;;; +12458;CUNEIFORM NUMERIC SIGN ONE ESHE3;Nl;0;L;;;;1;N;;;;; +12459;CUNEIFORM NUMERIC SIGN TWO ESHE3;Nl;0;L;;;;2;N;;;;; +1245A;CUNEIFORM NUMERIC SIGN ONE THIRD DISH;Nl;0;L;;;;1/3;N;;;;; +1245B;CUNEIFORM NUMERIC SIGN TWO THIRDS DISH;Nl;0;L;;;;2/3;N;;;;; +1245C;CUNEIFORM NUMERIC SIGN FIVE SIXTHS DISH;Nl;0;L;;;;5/6;N;;;;; +1245D;CUNEIFORM NUMERIC SIGN ONE THIRD VARIANT FORM A;Nl;0;L;;;;1/3;N;;;;; +1245E;CUNEIFORM NUMERIC SIGN TWO THIRDS VARIANT FORM A;Nl;0;L;;;;2/3;N;;;;; +1245F;CUNEIFORM NUMERIC SIGN ONE EIGHTH ASH;Nl;0;L;;;;1/8;N;;;;; +12460;CUNEIFORM NUMERIC SIGN ONE QUARTER ASH;Nl;0;L;;;;1/4;N;;;;; +12461;CUNEIFORM NUMERIC SIGN OLD ASSYRIAN ONE SIXTH;Nl;0;L;;;;1/6;N;;;;; +12462;CUNEIFORM NUMERIC SIGN OLD ASSYRIAN ONE QUARTER;Nl;0;L;;;;1/4;N;;;;; +12463;CUNEIFORM NUMERIC SIGN ONE QUARTER GUR;Nl;0;L;;;;1/4;N;;;;; +12464;CUNEIFORM NUMERIC SIGN ONE HALF GUR;Nl;0;L;;;;1/2;N;;;;; +12465;CUNEIFORM NUMERIC SIGN ELAMITE ONE THIRD;Nl;0;L;;;;1/3;N;;;;; +12466;CUNEIFORM NUMERIC SIGN ELAMITE TWO THIRDS;Nl;0;L;;;;2/3;N;;;;; +12467;CUNEIFORM NUMERIC SIGN ELAMITE FORTY;Nl;0;L;;;;40;N;;;;; +12468;CUNEIFORM NUMERIC SIGN ELAMITE FIFTY;Nl;0;L;;;;50;N;;;;; +12469;CUNEIFORM NUMERIC SIGN FOUR U VARIANT FORM;Nl;0;L;;;;4;N;;;;; +1246A;CUNEIFORM NUMERIC SIGN FIVE U VARIANT FORM;Nl;0;L;;;;5;N;;;;; +1246B;CUNEIFORM NUMERIC SIGN SIX U VARIANT FORM;Nl;0;L;;;;6;N;;;;; +1246C;CUNEIFORM NUMERIC SIGN SEVEN U VARIANT FORM;Nl;0;L;;;;7;N;;;;; +1246D;CUNEIFORM NUMERIC SIGN EIGHT U VARIANT FORM;Nl;0;L;;;;8;N;;;;; +1246E;CUNEIFORM NUMERIC SIGN NINE U VARIANT FORM;Nl;0;L;;;;9;N;;;;; +12470;CUNEIFORM PUNCTUATION SIGN OLD ASSYRIAN WORD DIVIDER;Po;0;L;;;;;N;;;;; +12471;CUNEIFORM PUNCTUATION SIGN VERTICAL COLON;Po;0;L;;;;;N;;;;; +12472;CUNEIFORM PUNCTUATION SIGN DIAGONAL COLON;Po;0;L;;;;;N;;;;; +12473;CUNEIFORM PUNCTUATION SIGN DIAGONAL TRICOLON;Po;0;L;;;;;N;;;;; +12474;CUNEIFORM PUNCTUATION SIGN DIAGONAL QUADCOLON;Po;0;L;;;;;N;;;;; +12480;CUNEIFORM SIGN AB TIMES NUN TENU;Lo;0;L;;;;;N;;;;; +12481;CUNEIFORM SIGN AB TIMES SHU2;Lo;0;L;;;;;N;;;;; +12482;CUNEIFORM SIGN AD TIMES ESH2;Lo;0;L;;;;;N;;;;; +12483;CUNEIFORM SIGN BAD TIMES DISH TENU;Lo;0;L;;;;;N;;;;; +12484;CUNEIFORM SIGN BAHAR2 TIMES AB2;Lo;0;L;;;;;N;;;;; +12485;CUNEIFORM SIGN BAHAR2 TIMES NI;Lo;0;L;;;;;N;;;;; +12486;CUNEIFORM SIGN BAHAR2 TIMES ZA;Lo;0;L;;;;;N;;;;; +12487;CUNEIFORM SIGN BU OVER BU TIMES NA2;Lo;0;L;;;;;N;;;;; +12488;CUNEIFORM SIGN DA TIMES TAK4;Lo;0;L;;;;;N;;;;; +12489;CUNEIFORM SIGN DAG TIMES KUR;Lo;0;L;;;;;N;;;;; +1248A;CUNEIFORM SIGN DIM TIMES IGI;Lo;0;L;;;;;N;;;;; +1248B;CUNEIFORM SIGN DIM TIMES U U U;Lo;0;L;;;;;N;;;;; +1248C;CUNEIFORM SIGN DIM2 TIMES UD;Lo;0;L;;;;;N;;;;; +1248D;CUNEIFORM SIGN DUG TIMES ANSHE;Lo;0;L;;;;;N;;;;; +1248E;CUNEIFORM SIGN DUG TIMES ASH;Lo;0;L;;;;;N;;;;; +1248F;CUNEIFORM SIGN DUG TIMES ASH AT LEFT;Lo;0;L;;;;;N;;;;; +12490;CUNEIFORM SIGN DUG TIMES DIN;Lo;0;L;;;;;N;;;;; +12491;CUNEIFORM SIGN DUG TIMES DUN;Lo;0;L;;;;;N;;;;; +12492;CUNEIFORM SIGN DUG TIMES ERIN2;Lo;0;L;;;;;N;;;;; +12493;CUNEIFORM SIGN DUG TIMES GA;Lo;0;L;;;;;N;;;;; +12494;CUNEIFORM SIGN DUG TIMES GI;Lo;0;L;;;;;N;;;;; +12495;CUNEIFORM SIGN DUG TIMES GIR2 GUNU;Lo;0;L;;;;;N;;;;; +12496;CUNEIFORM SIGN DUG TIMES GISH;Lo;0;L;;;;;N;;;;; +12497;CUNEIFORM SIGN DUG TIMES HA;Lo;0;L;;;;;N;;;;; +12498;CUNEIFORM SIGN DUG TIMES HI;Lo;0;L;;;;;N;;;;; +12499;CUNEIFORM SIGN DUG TIMES IGI GUNU;Lo;0;L;;;;;N;;;;; +1249A;CUNEIFORM SIGN DUG TIMES KASKAL;Lo;0;L;;;;;N;;;;; +1249B;CUNEIFORM SIGN DUG TIMES KUR;Lo;0;L;;;;;N;;;;; +1249C;CUNEIFORM SIGN DUG TIMES KUSHU2;Lo;0;L;;;;;N;;;;; +1249D;CUNEIFORM SIGN DUG TIMES KUSHU2 PLUS KASKAL;Lo;0;L;;;;;N;;;;; +1249E;CUNEIFORM SIGN DUG TIMES LAK-020;Lo;0;L;;;;;N;;;;; +1249F;CUNEIFORM SIGN DUG TIMES LAM;Lo;0;L;;;;;N;;;;; +124A0;CUNEIFORM SIGN DUG TIMES LAM TIMES KUR;Lo;0;L;;;;;N;;;;; +124A1;CUNEIFORM SIGN DUG TIMES LUH PLUS GISH;Lo;0;L;;;;;N;;;;; +124A2;CUNEIFORM SIGN DUG TIMES MASH;Lo;0;L;;;;;N;;;;; +124A3;CUNEIFORM SIGN DUG TIMES MES;Lo;0;L;;;;;N;;;;; +124A4;CUNEIFORM SIGN DUG TIMES MI;Lo;0;L;;;;;N;;;;; +124A5;CUNEIFORM SIGN DUG TIMES NI;Lo;0;L;;;;;N;;;;; +124A6;CUNEIFORM SIGN DUG TIMES PI;Lo;0;L;;;;;N;;;;; +124A7;CUNEIFORM SIGN DUG TIMES SHE;Lo;0;L;;;;;N;;;;; +124A8;CUNEIFORM SIGN DUG TIMES SI GUNU;Lo;0;L;;;;;N;;;;; +124A9;CUNEIFORM SIGN E2 TIMES KUR;Lo;0;L;;;;;N;;;;; +124AA;CUNEIFORM SIGN E2 TIMES PAP;Lo;0;L;;;;;N;;;;; +124AB;CUNEIFORM SIGN ERIN2 X;Lo;0;L;;;;;N;;;;; +124AC;CUNEIFORM SIGN ESH2 CROSSING ESH2;Lo;0;L;;;;;N;;;;; +124AD;CUNEIFORM SIGN EZEN SHESHIG TIMES ASH;Lo;0;L;;;;;N;;;;; +124AE;CUNEIFORM SIGN EZEN SHESHIG TIMES HI;Lo;0;L;;;;;N;;;;; +124AF;CUNEIFORM SIGN EZEN SHESHIG TIMES IGI GUNU;Lo;0;L;;;;;N;;;;; +124B0;CUNEIFORM SIGN EZEN SHESHIG TIMES LA;Lo;0;L;;;;;N;;;;; +124B1;CUNEIFORM SIGN EZEN SHESHIG TIMES LAL;Lo;0;L;;;;;N;;;;; +124B2;CUNEIFORM SIGN EZEN SHESHIG TIMES ME;Lo;0;L;;;;;N;;;;; +124B3;CUNEIFORM SIGN EZEN SHESHIG TIMES MES;Lo;0;L;;;;;N;;;;; +124B4;CUNEIFORM SIGN EZEN SHESHIG TIMES SU;Lo;0;L;;;;;N;;;;; +124B5;CUNEIFORM SIGN EZEN TIMES SU;Lo;0;L;;;;;N;;;;; +124B6;CUNEIFORM SIGN GA2 TIMES BAHAR2;Lo;0;L;;;;;N;;;;; +124B7;CUNEIFORM SIGN GA2 TIMES DIM GUNU;Lo;0;L;;;;;N;;;;; +124B8;CUNEIFORM SIGN GA2 TIMES DUG TIMES IGI GUNU;Lo;0;L;;;;;N;;;;; +124B9;CUNEIFORM SIGN GA2 TIMES DUG TIMES KASKAL;Lo;0;L;;;;;N;;;;; +124BA;CUNEIFORM SIGN GA2 TIMES EREN;Lo;0;L;;;;;N;;;;; +124BB;CUNEIFORM SIGN GA2 TIMES GA;Lo;0;L;;;;;N;;;;; +124BC;CUNEIFORM SIGN GA2 TIMES GAR PLUS DI;Lo;0;L;;;;;N;;;;; +124BD;CUNEIFORM SIGN GA2 TIMES GAR PLUS NE;Lo;0;L;;;;;N;;;;; +124BE;CUNEIFORM SIGN GA2 TIMES HA PLUS A;Lo;0;L;;;;;N;;;;; +124BF;CUNEIFORM SIGN GA2 TIMES KUSHU2 PLUS KASKAL;Lo;0;L;;;;;N;;;;; +124C0;CUNEIFORM SIGN GA2 TIMES LAM;Lo;0;L;;;;;N;;;;; +124C1;CUNEIFORM SIGN GA2 TIMES LAM TIMES KUR;Lo;0;L;;;;;N;;;;; +124C2;CUNEIFORM SIGN GA2 TIMES LUH;Lo;0;L;;;;;N;;;;; +124C3;CUNEIFORM SIGN GA2 TIMES MUSH;Lo;0;L;;;;;N;;;;; +124C4;CUNEIFORM SIGN GA2 TIMES NE;Lo;0;L;;;;;N;;;;; +124C5;CUNEIFORM SIGN GA2 TIMES NE PLUS E2;Lo;0;L;;;;;N;;;;; +124C6;CUNEIFORM SIGN GA2 TIMES NE PLUS GI;Lo;0;L;;;;;N;;;;; +124C7;CUNEIFORM SIGN GA2 TIMES SHIM;Lo;0;L;;;;;N;;;;; +124C8;CUNEIFORM SIGN GA2 TIMES ZIZ2;Lo;0;L;;;;;N;;;;; +124C9;CUNEIFORM SIGN GABA ROTATED NINETY DEGREES;Lo;0;L;;;;;N;;;;; +124CA;CUNEIFORM SIGN GESHTIN TIMES U;Lo;0;L;;;;;N;;;;; +124CB;CUNEIFORM SIGN GISH TIMES GISH CROSSING GISH;Lo;0;L;;;;;N;;;;; +124CC;CUNEIFORM SIGN GU2 TIMES IGI GUNU;Lo;0;L;;;;;N;;;;; +124CD;CUNEIFORM SIGN GUD PLUS GISH TIMES TAK4;Lo;0;L;;;;;N;;;;; +124CE;CUNEIFORM SIGN HA TENU GUNU;Lo;0;L;;;;;N;;;;; +124CF;CUNEIFORM SIGN HI TIMES ASH OVER HI TIMES ASH;Lo;0;L;;;;;N;;;;; +124D0;CUNEIFORM SIGN KA TIMES BU;Lo;0;L;;;;;N;;;;; +124D1;CUNEIFORM SIGN KA TIMES KA;Lo;0;L;;;;;N;;;;; +124D2;CUNEIFORM SIGN KA TIMES U U U;Lo;0;L;;;;;N;;;;; +124D3;CUNEIFORM SIGN KA TIMES UR;Lo;0;L;;;;;N;;;;; +124D4;CUNEIFORM SIGN LAGAB TIMES ZU OVER ZU;Lo;0;L;;;;;N;;;;; +124D5;CUNEIFORM SIGN LAK-003;Lo;0;L;;;;;N;;;;; +124D6;CUNEIFORM SIGN LAK-021;Lo;0;L;;;;;N;;;;; +124D7;CUNEIFORM SIGN LAK-025;Lo;0;L;;;;;N;;;;; +124D8;CUNEIFORM SIGN LAK-030;Lo;0;L;;;;;N;;;;; +124D9;CUNEIFORM SIGN LAK-050;Lo;0;L;;;;;N;;;;; +124DA;CUNEIFORM SIGN LAK-051;Lo;0;L;;;;;N;;;;; +124DB;CUNEIFORM SIGN LAK-062;Lo;0;L;;;;;N;;;;; +124DC;CUNEIFORM SIGN LAK-079 OVER LAK-079 GUNU;Lo;0;L;;;;;N;;;;; +124DD;CUNEIFORM SIGN LAK-080;Lo;0;L;;;;;N;;;;; +124DE;CUNEIFORM SIGN LAK-081 OVER LAK-081;Lo;0;L;;;;;N;;;;; +124DF;CUNEIFORM SIGN LAK-092;Lo;0;L;;;;;N;;;;; +124E0;CUNEIFORM SIGN LAK-130;Lo;0;L;;;;;N;;;;; +124E1;CUNEIFORM SIGN LAK-142;Lo;0;L;;;;;N;;;;; +124E2;CUNEIFORM SIGN LAK-210;Lo;0;L;;;;;N;;;;; +124E3;CUNEIFORM SIGN LAK-219;Lo;0;L;;;;;N;;;;; +124E4;CUNEIFORM SIGN LAK-220;Lo;0;L;;;;;N;;;;; +124E5;CUNEIFORM SIGN LAK-225;Lo;0;L;;;;;N;;;;; +124E6;CUNEIFORM SIGN LAK-228;Lo;0;L;;;;;N;;;;; +124E7;CUNEIFORM SIGN LAK-238;Lo;0;L;;;;;N;;;;; +124E8;CUNEIFORM SIGN LAK-265;Lo;0;L;;;;;N;;;;; +124E9;CUNEIFORM SIGN LAK-266;Lo;0;L;;;;;N;;;;; +124EA;CUNEIFORM SIGN LAK-343;Lo;0;L;;;;;N;;;;; +124EB;CUNEIFORM SIGN LAK-347;Lo;0;L;;;;;N;;;;; +124EC;CUNEIFORM SIGN LAK-348;Lo;0;L;;;;;N;;;;; +124ED;CUNEIFORM SIGN LAK-383;Lo;0;L;;;;;N;;;;; +124EE;CUNEIFORM SIGN LAK-384;Lo;0;L;;;;;N;;;;; +124EF;CUNEIFORM SIGN LAK-390;Lo;0;L;;;;;N;;;;; +124F0;CUNEIFORM SIGN LAK-441;Lo;0;L;;;;;N;;;;; +124F1;CUNEIFORM SIGN LAK-449;Lo;0;L;;;;;N;;;;; +124F2;CUNEIFORM SIGN LAK-449 TIMES GU;Lo;0;L;;;;;N;;;;; +124F3;CUNEIFORM SIGN LAK-449 TIMES IGI;Lo;0;L;;;;;N;;;;; +124F4;CUNEIFORM SIGN LAK-449 TIMES PAP PLUS LU3;Lo;0;L;;;;;N;;;;; +124F5;CUNEIFORM SIGN LAK-449 TIMES PAP PLUS PAP PLUS LU3;Lo;0;L;;;;;N;;;;; +124F6;CUNEIFORM SIGN LAK-449 TIMES U2 PLUS BA;Lo;0;L;;;;;N;;;;; +124F7;CUNEIFORM SIGN LAK-450;Lo;0;L;;;;;N;;;;; +124F8;CUNEIFORM SIGN LAK-457;Lo;0;L;;;;;N;;;;; +124F9;CUNEIFORM SIGN LAK-470;Lo;0;L;;;;;N;;;;; +124FA;CUNEIFORM SIGN LAK-483;Lo;0;L;;;;;N;;;;; +124FB;CUNEIFORM SIGN LAK-490;Lo;0;L;;;;;N;;;;; +124FC;CUNEIFORM SIGN LAK-492;Lo;0;L;;;;;N;;;;; +124FD;CUNEIFORM SIGN LAK-493;Lo;0;L;;;;;N;;;;; +124FE;CUNEIFORM SIGN LAK-495;Lo;0;L;;;;;N;;;;; +124FF;CUNEIFORM SIGN LAK-550;Lo;0;L;;;;;N;;;;; +12500;CUNEIFORM SIGN LAK-608;Lo;0;L;;;;;N;;;;; +12501;CUNEIFORM SIGN LAK-617;Lo;0;L;;;;;N;;;;; +12502;CUNEIFORM SIGN LAK-617 TIMES ASH;Lo;0;L;;;;;N;;;;; +12503;CUNEIFORM SIGN LAK-617 TIMES BAD;Lo;0;L;;;;;N;;;;; +12504;CUNEIFORM SIGN LAK-617 TIMES DUN3 GUNU GUNU;Lo;0;L;;;;;N;;;;; +12505;CUNEIFORM SIGN LAK-617 TIMES KU3;Lo;0;L;;;;;N;;;;; +12506;CUNEIFORM SIGN LAK-617 TIMES LA;Lo;0;L;;;;;N;;;;; +12507;CUNEIFORM SIGN LAK-617 TIMES TAR;Lo;0;L;;;;;N;;;;; +12508;CUNEIFORM SIGN LAK-617 TIMES TE;Lo;0;L;;;;;N;;;;; +12509;CUNEIFORM SIGN LAK-617 TIMES U2;Lo;0;L;;;;;N;;;;; +1250A;CUNEIFORM SIGN LAK-617 TIMES UD;Lo;0;L;;;;;N;;;;; +1250B;CUNEIFORM SIGN LAK-617 TIMES URUDA;Lo;0;L;;;;;N;;;;; +1250C;CUNEIFORM SIGN LAK-636;Lo;0;L;;;;;N;;;;; +1250D;CUNEIFORM SIGN LAK-648;Lo;0;L;;;;;N;;;;; +1250E;CUNEIFORM SIGN LAK-648 TIMES DUB;Lo;0;L;;;;;N;;;;; +1250F;CUNEIFORM SIGN LAK-648 TIMES GA;Lo;0;L;;;;;N;;;;; +12510;CUNEIFORM SIGN LAK-648 TIMES IGI;Lo;0;L;;;;;N;;;;; +12511;CUNEIFORM SIGN LAK-648 TIMES IGI GUNU;Lo;0;L;;;;;N;;;;; +12512;CUNEIFORM SIGN LAK-648 TIMES NI;Lo;0;L;;;;;N;;;;; +12513;CUNEIFORM SIGN LAK-648 TIMES PAP PLUS PAP PLUS LU3;Lo;0;L;;;;;N;;;;; +12514;CUNEIFORM SIGN LAK-648 TIMES SHESH PLUS KI;Lo;0;L;;;;;N;;;;; +12515;CUNEIFORM SIGN LAK-648 TIMES UD;Lo;0;L;;;;;N;;;;; +12516;CUNEIFORM SIGN LAK-648 TIMES URUDA;Lo;0;L;;;;;N;;;;; +12517;CUNEIFORM SIGN LAK-724;Lo;0;L;;;;;N;;;;; +12518;CUNEIFORM SIGN LAK-749;Lo;0;L;;;;;N;;;;; +12519;CUNEIFORM SIGN LU2 GUNU TIMES ASH;Lo;0;L;;;;;N;;;;; +1251A;CUNEIFORM SIGN LU2 TIMES DISH;Lo;0;L;;;;;N;;;;; +1251B;CUNEIFORM SIGN LU2 TIMES HAL;Lo;0;L;;;;;N;;;;; +1251C;CUNEIFORM SIGN LU2 TIMES PAP;Lo;0;L;;;;;N;;;;; +1251D;CUNEIFORM SIGN LU2 TIMES PAP PLUS PAP PLUS LU3;Lo;0;L;;;;;N;;;;; +1251E;CUNEIFORM SIGN LU2 TIMES TAK4;Lo;0;L;;;;;N;;;;; +1251F;CUNEIFORM SIGN MI PLUS ZA7;Lo;0;L;;;;;N;;;;; +12520;CUNEIFORM SIGN MUSH OVER MUSH TIMES GA;Lo;0;L;;;;;N;;;;; +12521;CUNEIFORM SIGN MUSH OVER MUSH TIMES KAK;Lo;0;L;;;;;N;;;;; +12522;CUNEIFORM SIGN NINDA2 TIMES DIM GUNU;Lo;0;L;;;;;N;;;;; +12523;CUNEIFORM SIGN NINDA2 TIMES GISH;Lo;0;L;;;;;N;;;;; +12524;CUNEIFORM SIGN NINDA2 TIMES GUL;Lo;0;L;;;;;N;;;;; +12525;CUNEIFORM SIGN NINDA2 TIMES HI;Lo;0;L;;;;;N;;;;; +12526;CUNEIFORM SIGN NINDA2 TIMES KESH2;Lo;0;L;;;;;N;;;;; +12527;CUNEIFORM SIGN NINDA2 TIMES LAK-050;Lo;0;L;;;;;N;;;;; +12528;CUNEIFORM SIGN NINDA2 TIMES MASH;Lo;0;L;;;;;N;;;;; +12529;CUNEIFORM SIGN NINDA2 TIMES PAP PLUS PAP;Lo;0;L;;;;;N;;;;; +1252A;CUNEIFORM SIGN NINDA2 TIMES U;Lo;0;L;;;;;N;;;;; +1252B;CUNEIFORM SIGN NINDA2 TIMES U PLUS U;Lo;0;L;;;;;N;;;;; +1252C;CUNEIFORM SIGN NINDA2 TIMES URUDA;Lo;0;L;;;;;N;;;;; +1252D;CUNEIFORM SIGN SAG GUNU TIMES HA;Lo;0;L;;;;;N;;;;; +1252E;CUNEIFORM SIGN SAG TIMES EN;Lo;0;L;;;;;N;;;;; +1252F;CUNEIFORM SIGN SAG TIMES SHE AT LEFT;Lo;0;L;;;;;N;;;;; +12530;CUNEIFORM SIGN SAG TIMES TAK4;Lo;0;L;;;;;N;;;;; +12531;CUNEIFORM SIGN SHA6 TENU;Lo;0;L;;;;;N;;;;; +12532;CUNEIFORM SIGN SHE OVER SHE;Lo;0;L;;;;;N;;;;; +12533;CUNEIFORM SIGN SHE PLUS HUB2;Lo;0;L;;;;;N;;;;; +12534;CUNEIFORM SIGN SHE PLUS NAM2;Lo;0;L;;;;;N;;;;; +12535;CUNEIFORM SIGN SHE PLUS SAR;Lo;0;L;;;;;N;;;;; +12536;CUNEIFORM SIGN SHU2 PLUS DUG TIMES NI;Lo;0;L;;;;;N;;;;; +12537;CUNEIFORM SIGN SHU2 PLUS E2 TIMES AN;Lo;0;L;;;;;N;;;;; +12538;CUNEIFORM SIGN SI TIMES TAK4;Lo;0;L;;;;;N;;;;; +12539;CUNEIFORM SIGN TAK4 PLUS SAG;Lo;0;L;;;;;N;;;;; +1253A;CUNEIFORM SIGN TUM TIMES GAN2 TENU;Lo;0;L;;;;;N;;;;; +1253B;CUNEIFORM SIGN TUM TIMES THREE DISH;Lo;0;L;;;;;N;;;;; +1253C;CUNEIFORM SIGN UR2 INVERTED;Lo;0;L;;;;;N;;;;; +1253D;CUNEIFORM SIGN UR2 TIMES UD;Lo;0;L;;;;;N;;;;; +1253E;CUNEIFORM SIGN URU TIMES DARA3;Lo;0;L;;;;;N;;;;; +1253F;CUNEIFORM SIGN URU TIMES LAK-668;Lo;0;L;;;;;N;;;;; +12540;CUNEIFORM SIGN URU TIMES LU3;Lo;0;L;;;;;N;;;;; +12541;CUNEIFORM SIGN ZA7;Lo;0;L;;;;;N;;;;; +12542;CUNEIFORM SIGN ZU OVER ZU PLUS SAR;Lo;0;L;;;;;N;;;;; +12543;CUNEIFORM SIGN ZU5 TIMES THREE DISH TENU;Lo;0;L;;;;;N;;;;; +13000;EGYPTIAN HIEROGLYPH A001;Lo;0;L;;;;;N;;;;; +13001;EGYPTIAN HIEROGLYPH A002;Lo;0;L;;;;;N;;;;; +13002;EGYPTIAN HIEROGLYPH A003;Lo;0;L;;;;;N;;;;; +13003;EGYPTIAN HIEROGLYPH A004;Lo;0;L;;;;;N;;;;; +13004;EGYPTIAN HIEROGLYPH A005;Lo;0;L;;;;;N;;;;; +13005;EGYPTIAN HIEROGLYPH A005A;Lo;0;L;;;;;N;;;;; +13006;EGYPTIAN HIEROGLYPH A006;Lo;0;L;;;;;N;;;;; +13007;EGYPTIAN HIEROGLYPH A006A;Lo;0;L;;;;;N;;;;; +13008;EGYPTIAN HIEROGLYPH A006B;Lo;0;L;;;;;N;;;;; +13009;EGYPTIAN HIEROGLYPH A007;Lo;0;L;;;;;N;;;;; +1300A;EGYPTIAN HIEROGLYPH A008;Lo;0;L;;;;;N;;;;; +1300B;EGYPTIAN HIEROGLYPH A009;Lo;0;L;;;;;N;;;;; +1300C;EGYPTIAN HIEROGLYPH A010;Lo;0;L;;;;;N;;;;; +1300D;EGYPTIAN HIEROGLYPH A011;Lo;0;L;;;;;N;;;;; +1300E;EGYPTIAN HIEROGLYPH A012;Lo;0;L;;;;;N;;;;; +1300F;EGYPTIAN HIEROGLYPH A013;Lo;0;L;;;;;N;;;;; +13010;EGYPTIAN HIEROGLYPH A014;Lo;0;L;;;;;N;;;;; +13011;EGYPTIAN HIEROGLYPH A014A;Lo;0;L;;;;;N;;;;; +13012;EGYPTIAN HIEROGLYPH A015;Lo;0;L;;;;;N;;;;; +13013;EGYPTIAN HIEROGLYPH A016;Lo;0;L;;;;;N;;;;; +13014;EGYPTIAN HIEROGLYPH A017;Lo;0;L;;;;;N;;;;; +13015;EGYPTIAN HIEROGLYPH A017A;Lo;0;L;;;;;N;;;;; +13016;EGYPTIAN HIEROGLYPH A018;Lo;0;L;;;;;N;;;;; +13017;EGYPTIAN HIEROGLYPH A019;Lo;0;L;;;;;N;;;;; +13018;EGYPTIAN HIEROGLYPH A020;Lo;0;L;;;;;N;;;;; +13019;EGYPTIAN HIEROGLYPH A021;Lo;0;L;;;;;N;;;;; +1301A;EGYPTIAN HIEROGLYPH A022;Lo;0;L;;;;;N;;;;; +1301B;EGYPTIAN HIEROGLYPH A023;Lo;0;L;;;;;N;;;;; +1301C;EGYPTIAN HIEROGLYPH A024;Lo;0;L;;;;;N;;;;; +1301D;EGYPTIAN HIEROGLYPH A025;Lo;0;L;;;;;N;;;;; +1301E;EGYPTIAN HIEROGLYPH A026;Lo;0;L;;;;;N;;;;; +1301F;EGYPTIAN HIEROGLYPH A027;Lo;0;L;;;;;N;;;;; +13020;EGYPTIAN HIEROGLYPH A028;Lo;0;L;;;;;N;;;;; +13021;EGYPTIAN HIEROGLYPH A029;Lo;0;L;;;;;N;;;;; +13022;EGYPTIAN HIEROGLYPH A030;Lo;0;L;;;;;N;;;;; +13023;EGYPTIAN HIEROGLYPH A031;Lo;0;L;;;;;N;;;;; +13024;EGYPTIAN HIEROGLYPH A032;Lo;0;L;;;;;N;;;;; +13025;EGYPTIAN HIEROGLYPH A032A;Lo;0;L;;;;;N;;;;; +13026;EGYPTIAN HIEROGLYPH A033;Lo;0;L;;;;;N;;;;; +13027;EGYPTIAN HIEROGLYPH A034;Lo;0;L;;;;;N;;;;; +13028;EGYPTIAN HIEROGLYPH A035;Lo;0;L;;;;;N;;;;; +13029;EGYPTIAN HIEROGLYPH A036;Lo;0;L;;;;;N;;;;; +1302A;EGYPTIAN HIEROGLYPH A037;Lo;0;L;;;;;N;;;;; +1302B;EGYPTIAN HIEROGLYPH A038;Lo;0;L;;;;;N;;;;; +1302C;EGYPTIAN HIEROGLYPH A039;Lo;0;L;;;;;N;;;;; +1302D;EGYPTIAN HIEROGLYPH A040;Lo;0;L;;;;;N;;;;; +1302E;EGYPTIAN HIEROGLYPH A040A;Lo;0;L;;;;;N;;;;; +1302F;EGYPTIAN HIEROGLYPH A041;Lo;0;L;;;;;N;;;;; +13030;EGYPTIAN HIEROGLYPH A042;Lo;0;L;;;;;N;;;;; +13031;EGYPTIAN HIEROGLYPH A042A;Lo;0;L;;;;;N;;;;; +13032;EGYPTIAN HIEROGLYPH A043;Lo;0;L;;;;;N;;;;; +13033;EGYPTIAN HIEROGLYPH A043A;Lo;0;L;;;;;N;;;;; +13034;EGYPTIAN HIEROGLYPH A044;Lo;0;L;;;;;N;;;;; +13035;EGYPTIAN HIEROGLYPH A045;Lo;0;L;;;;;N;;;;; +13036;EGYPTIAN HIEROGLYPH A045A;Lo;0;L;;;;;N;;;;; +13037;EGYPTIAN HIEROGLYPH A046;Lo;0;L;;;;;N;;;;; +13038;EGYPTIAN HIEROGLYPH A047;Lo;0;L;;;;;N;;;;; +13039;EGYPTIAN HIEROGLYPH A048;Lo;0;L;;;;;N;;;;; +1303A;EGYPTIAN HIEROGLYPH A049;Lo;0;L;;;;;N;;;;; +1303B;EGYPTIAN HIEROGLYPH A050;Lo;0;L;;;;;N;;;;; +1303C;EGYPTIAN HIEROGLYPH A051;Lo;0;L;;;;;N;;;;; +1303D;EGYPTIAN HIEROGLYPH A052;Lo;0;L;;;;;N;;;;; +1303E;EGYPTIAN HIEROGLYPH A053;Lo;0;L;;;;;N;;;;; +1303F;EGYPTIAN HIEROGLYPH A054;Lo;0;L;;;;;N;;;;; +13040;EGYPTIAN HIEROGLYPH A055;Lo;0;L;;;;;N;;;;; +13041;EGYPTIAN HIEROGLYPH A056;Lo;0;L;;;;;N;;;;; +13042;EGYPTIAN HIEROGLYPH A057;Lo;0;L;;;;;N;;;;; +13043;EGYPTIAN HIEROGLYPH A058;Lo;0;L;;;;;N;;;;; +13044;EGYPTIAN HIEROGLYPH A059;Lo;0;L;;;;;N;;;;; +13045;EGYPTIAN HIEROGLYPH A060;Lo;0;L;;;;;N;;;;; +13046;EGYPTIAN HIEROGLYPH A061;Lo;0;L;;;;;N;;;;; +13047;EGYPTIAN HIEROGLYPH A062;Lo;0;L;;;;;N;;;;; +13048;EGYPTIAN HIEROGLYPH A063;Lo;0;L;;;;;N;;;;; +13049;EGYPTIAN HIEROGLYPH A064;Lo;0;L;;;;;N;;;;; +1304A;EGYPTIAN HIEROGLYPH A065;Lo;0;L;;;;;N;;;;; +1304B;EGYPTIAN HIEROGLYPH A066;Lo;0;L;;;;;N;;;;; +1304C;EGYPTIAN HIEROGLYPH A067;Lo;0;L;;;;;N;;;;; +1304D;EGYPTIAN HIEROGLYPH A068;Lo;0;L;;;;;N;;;;; +1304E;EGYPTIAN HIEROGLYPH A069;Lo;0;L;;;;;N;;;;; +1304F;EGYPTIAN HIEROGLYPH A070;Lo;0;L;;;;;N;;;;; +13050;EGYPTIAN HIEROGLYPH B001;Lo;0;L;;;;;N;;;;; +13051;EGYPTIAN HIEROGLYPH B002;Lo;0;L;;;;;N;;;;; +13052;EGYPTIAN HIEROGLYPH B003;Lo;0;L;;;;;N;;;;; +13053;EGYPTIAN HIEROGLYPH B004;Lo;0;L;;;;;N;;;;; +13054;EGYPTIAN HIEROGLYPH B005;Lo;0;L;;;;;N;;;;; +13055;EGYPTIAN HIEROGLYPH B005A;Lo;0;L;;;;;N;;;;; +13056;EGYPTIAN HIEROGLYPH B006;Lo;0;L;;;;;N;;;;; +13057;EGYPTIAN HIEROGLYPH B007;Lo;0;L;;;;;N;;;;; +13058;EGYPTIAN HIEROGLYPH B008;Lo;0;L;;;;;N;;;;; +13059;EGYPTIAN HIEROGLYPH B009;Lo;0;L;;;;;N;;;;; +1305A;EGYPTIAN HIEROGLYPH C001;Lo;0;L;;;;;N;;;;; +1305B;EGYPTIAN HIEROGLYPH C002;Lo;0;L;;;;;N;;;;; +1305C;EGYPTIAN HIEROGLYPH C002A;Lo;0;L;;;;;N;;;;; +1305D;EGYPTIAN HIEROGLYPH C002B;Lo;0;L;;;;;N;;;;; +1305E;EGYPTIAN HIEROGLYPH C002C;Lo;0;L;;;;;N;;;;; +1305F;EGYPTIAN HIEROGLYPH C003;Lo;0;L;;;;;N;;;;; +13060;EGYPTIAN HIEROGLYPH C004;Lo;0;L;;;;;N;;;;; +13061;EGYPTIAN HIEROGLYPH C005;Lo;0;L;;;;;N;;;;; +13062;EGYPTIAN HIEROGLYPH C006;Lo;0;L;;;;;N;;;;; +13063;EGYPTIAN HIEROGLYPH C007;Lo;0;L;;;;;N;;;;; +13064;EGYPTIAN HIEROGLYPH C008;Lo;0;L;;;;;N;;;;; +13065;EGYPTIAN HIEROGLYPH C009;Lo;0;L;;;;;N;;;;; +13066;EGYPTIAN HIEROGLYPH C010;Lo;0;L;;;;;N;;;;; +13067;EGYPTIAN HIEROGLYPH C010A;Lo;0;L;;;;;N;;;;; +13068;EGYPTIAN HIEROGLYPH C011;Lo;0;L;;;;;N;;;;; +13069;EGYPTIAN HIEROGLYPH C012;Lo;0;L;;;;;N;;;;; +1306A;EGYPTIAN HIEROGLYPH C013;Lo;0;L;;;;;N;;;;; +1306B;EGYPTIAN HIEROGLYPH C014;Lo;0;L;;;;;N;;;;; +1306C;EGYPTIAN HIEROGLYPH C015;Lo;0;L;;;;;N;;;;; +1306D;EGYPTIAN HIEROGLYPH C016;Lo;0;L;;;;;N;;;;; +1306E;EGYPTIAN HIEROGLYPH C017;Lo;0;L;;;;;N;;;;; +1306F;EGYPTIAN HIEROGLYPH C018;Lo;0;L;;;;;N;;;;; +13070;EGYPTIAN HIEROGLYPH C019;Lo;0;L;;;;;N;;;;; +13071;EGYPTIAN HIEROGLYPH C020;Lo;0;L;;;;;N;;;;; +13072;EGYPTIAN HIEROGLYPH C021;Lo;0;L;;;;;N;;;;; +13073;EGYPTIAN HIEROGLYPH C022;Lo;0;L;;;;;N;;;;; +13074;EGYPTIAN HIEROGLYPH C023;Lo;0;L;;;;;N;;;;; +13075;EGYPTIAN HIEROGLYPH C024;Lo;0;L;;;;;N;;;;; +13076;EGYPTIAN HIEROGLYPH D001;Lo;0;L;;;;;N;;;;; +13077;EGYPTIAN HIEROGLYPH D002;Lo;0;L;;;;;N;;;;; +13078;EGYPTIAN HIEROGLYPH D003;Lo;0;L;;;;;N;;;;; +13079;EGYPTIAN HIEROGLYPH D004;Lo;0;L;;;;;N;;;;; +1307A;EGYPTIAN HIEROGLYPH D005;Lo;0;L;;;;;N;;;;; +1307B;EGYPTIAN HIEROGLYPH D006;Lo;0;L;;;;;N;;;;; +1307C;EGYPTIAN HIEROGLYPH D007;Lo;0;L;;;;;N;;;;; +1307D;EGYPTIAN HIEROGLYPH D008;Lo;0;L;;;;;N;;;;; +1307E;EGYPTIAN HIEROGLYPH D008A;Lo;0;L;;;;;N;;;;; +1307F;EGYPTIAN HIEROGLYPH D009;Lo;0;L;;;;;N;;;;; +13080;EGYPTIAN HIEROGLYPH D010;Lo;0;L;;;;;N;;;;; +13081;EGYPTIAN HIEROGLYPH D011;Lo;0;L;;;;;N;;;;; +13082;EGYPTIAN HIEROGLYPH D012;Lo;0;L;;;;;N;;;;; +13083;EGYPTIAN HIEROGLYPH D013;Lo;0;L;;;;;N;;;;; +13084;EGYPTIAN HIEROGLYPH D014;Lo;0;L;;;;;N;;;;; +13085;EGYPTIAN HIEROGLYPH D015;Lo;0;L;;;;;N;;;;; +13086;EGYPTIAN HIEROGLYPH D016;Lo;0;L;;;;;N;;;;; +13087;EGYPTIAN HIEROGLYPH D017;Lo;0;L;;;;;N;;;;; +13088;EGYPTIAN HIEROGLYPH D018;Lo;0;L;;;;;N;;;;; +13089;EGYPTIAN HIEROGLYPH D019;Lo;0;L;;;;;N;;;;; +1308A;EGYPTIAN HIEROGLYPH D020;Lo;0;L;;;;;N;;;;; +1308B;EGYPTIAN HIEROGLYPH D021;Lo;0;L;;;;;N;;;;; +1308C;EGYPTIAN HIEROGLYPH D022;Lo;0;L;;;;;N;;;;; +1308D;EGYPTIAN HIEROGLYPH D023;Lo;0;L;;;;;N;;;;; +1308E;EGYPTIAN HIEROGLYPH D024;Lo;0;L;;;;;N;;;;; +1308F;EGYPTIAN HIEROGLYPH D025;Lo;0;L;;;;;N;;;;; +13090;EGYPTIAN HIEROGLYPH D026;Lo;0;L;;;;;N;;;;; +13091;EGYPTIAN HIEROGLYPH D027;Lo;0;L;;;;;N;;;;; +13092;EGYPTIAN HIEROGLYPH D027A;Lo;0;L;;;;;N;;;;; +13093;EGYPTIAN HIEROGLYPH D028;Lo;0;L;;;;;N;;;;; +13094;EGYPTIAN HIEROGLYPH D029;Lo;0;L;;;;;N;;;;; +13095;EGYPTIAN HIEROGLYPH D030;Lo;0;L;;;;;N;;;;; +13096;EGYPTIAN HIEROGLYPH D031;Lo;0;L;;;;;N;;;;; +13097;EGYPTIAN HIEROGLYPH D031A;Lo;0;L;;;;;N;;;;; +13098;EGYPTIAN HIEROGLYPH D032;Lo;0;L;;;;;N;;;;; +13099;EGYPTIAN HIEROGLYPH D033;Lo;0;L;;;;;N;;;;; +1309A;EGYPTIAN HIEROGLYPH D034;Lo;0;L;;;;;N;;;;; +1309B;EGYPTIAN HIEROGLYPH D034A;Lo;0;L;;;;;N;;;;; +1309C;EGYPTIAN HIEROGLYPH D035;Lo;0;L;;;;;N;;;;; +1309D;EGYPTIAN HIEROGLYPH D036;Lo;0;L;;;;;N;;;;; +1309E;EGYPTIAN HIEROGLYPH D037;Lo;0;L;;;;;N;;;;; +1309F;EGYPTIAN HIEROGLYPH D038;Lo;0;L;;;;;N;;;;; +130A0;EGYPTIAN HIEROGLYPH D039;Lo;0;L;;;;;N;;;;; +130A1;EGYPTIAN HIEROGLYPH D040;Lo;0;L;;;;;N;;;;; +130A2;EGYPTIAN HIEROGLYPH D041;Lo;0;L;;;;;N;;;;; +130A3;EGYPTIAN HIEROGLYPH D042;Lo;0;L;;;;;N;;;;; +130A4;EGYPTIAN HIEROGLYPH D043;Lo;0;L;;;;;N;;;;; +130A5;EGYPTIAN HIEROGLYPH D044;Lo;0;L;;;;;N;;;;; +130A6;EGYPTIAN HIEROGLYPH D045;Lo;0;L;;;;;N;;;;; +130A7;EGYPTIAN HIEROGLYPH D046;Lo;0;L;;;;;N;;;;; +130A8;EGYPTIAN HIEROGLYPH D046A;Lo;0;L;;;;;N;;;;; +130A9;EGYPTIAN HIEROGLYPH D047;Lo;0;L;;;;;N;;;;; +130AA;EGYPTIAN HIEROGLYPH D048;Lo;0;L;;;;;N;;;;; +130AB;EGYPTIAN HIEROGLYPH D048A;Lo;0;L;;;;;N;;;;; +130AC;EGYPTIAN HIEROGLYPH D049;Lo;0;L;;;;;N;;;;; +130AD;EGYPTIAN HIEROGLYPH D050;Lo;0;L;;;;;N;;;;; +130AE;EGYPTIAN HIEROGLYPH D050A;Lo;0;L;;;;;N;;;;; +130AF;EGYPTIAN HIEROGLYPH D050B;Lo;0;L;;;;;N;;;;; +130B0;EGYPTIAN HIEROGLYPH D050C;Lo;0;L;;;;;N;;;;; +130B1;EGYPTIAN HIEROGLYPH D050D;Lo;0;L;;;;;N;;;;; +130B2;EGYPTIAN HIEROGLYPH D050E;Lo;0;L;;;;;N;;;;; +130B3;EGYPTIAN HIEROGLYPH D050F;Lo;0;L;;;;;N;;;;; +130B4;EGYPTIAN HIEROGLYPH D050G;Lo;0;L;;;;;N;;;;; +130B5;EGYPTIAN HIEROGLYPH D050H;Lo;0;L;;;;;N;;;;; +130B6;EGYPTIAN HIEROGLYPH D050I;Lo;0;L;;;;;N;;;;; +130B7;EGYPTIAN HIEROGLYPH D051;Lo;0;L;;;;;N;;;;; +130B8;EGYPTIAN HIEROGLYPH D052;Lo;0;L;;;;;N;;;;; +130B9;EGYPTIAN HIEROGLYPH D052A;Lo;0;L;;;;;N;;;;; +130BA;EGYPTIAN HIEROGLYPH D053;Lo;0;L;;;;;N;;;;; +130BB;EGYPTIAN HIEROGLYPH D054;Lo;0;L;;;;;N;;;;; +130BC;EGYPTIAN HIEROGLYPH D054A;Lo;0;L;;;;;N;;;;; +130BD;EGYPTIAN HIEROGLYPH D055;Lo;0;L;;;;;N;;;;; +130BE;EGYPTIAN HIEROGLYPH D056;Lo;0;L;;;;;N;;;;; +130BF;EGYPTIAN HIEROGLYPH D057;Lo;0;L;;;;;N;;;;; +130C0;EGYPTIAN HIEROGLYPH D058;Lo;0;L;;;;;N;;;;; +130C1;EGYPTIAN HIEROGLYPH D059;Lo;0;L;;;;;N;;;;; +130C2;EGYPTIAN HIEROGLYPH D060;Lo;0;L;;;;;N;;;;; +130C3;EGYPTIAN HIEROGLYPH D061;Lo;0;L;;;;;N;;;;; +130C4;EGYPTIAN HIEROGLYPH D062;Lo;0;L;;;;;N;;;;; +130C5;EGYPTIAN HIEROGLYPH D063;Lo;0;L;;;;;N;;;;; +130C6;EGYPTIAN HIEROGLYPH D064;Lo;0;L;;;;;N;;;;; +130C7;EGYPTIAN HIEROGLYPH D065;Lo;0;L;;;;;N;;;;; +130C8;EGYPTIAN HIEROGLYPH D066;Lo;0;L;;;;;N;;;;; +130C9;EGYPTIAN HIEROGLYPH D067;Lo;0;L;;;;;N;;;;; +130CA;EGYPTIAN HIEROGLYPH D067A;Lo;0;L;;;;;N;;;;; +130CB;EGYPTIAN HIEROGLYPH D067B;Lo;0;L;;;;;N;;;;; +130CC;EGYPTIAN HIEROGLYPH D067C;Lo;0;L;;;;;N;;;;; +130CD;EGYPTIAN HIEROGLYPH D067D;Lo;0;L;;;;;N;;;;; +130CE;EGYPTIAN HIEROGLYPH D067E;Lo;0;L;;;;;N;;;;; +130CF;EGYPTIAN HIEROGLYPH D067F;Lo;0;L;;;;;N;;;;; +130D0;EGYPTIAN HIEROGLYPH D067G;Lo;0;L;;;;;N;;;;; +130D1;EGYPTIAN HIEROGLYPH D067H;Lo;0;L;;;;;N;;;;; +130D2;EGYPTIAN HIEROGLYPH E001;Lo;0;L;;;;;N;;;;; +130D3;EGYPTIAN HIEROGLYPH E002;Lo;0;L;;;;;N;;;;; +130D4;EGYPTIAN HIEROGLYPH E003;Lo;0;L;;;;;N;;;;; +130D5;EGYPTIAN HIEROGLYPH E004;Lo;0;L;;;;;N;;;;; +130D6;EGYPTIAN HIEROGLYPH E005;Lo;0;L;;;;;N;;;;; +130D7;EGYPTIAN HIEROGLYPH E006;Lo;0;L;;;;;N;;;;; +130D8;EGYPTIAN HIEROGLYPH E007;Lo;0;L;;;;;N;;;;; +130D9;EGYPTIAN HIEROGLYPH E008;Lo;0;L;;;;;N;;;;; +130DA;EGYPTIAN HIEROGLYPH E008A;Lo;0;L;;;;;N;;;;; +130DB;EGYPTIAN HIEROGLYPH E009;Lo;0;L;;;;;N;;;;; +130DC;EGYPTIAN HIEROGLYPH E009A;Lo;0;L;;;;;N;;;;; +130DD;EGYPTIAN HIEROGLYPH E010;Lo;0;L;;;;;N;;;;; +130DE;EGYPTIAN HIEROGLYPH E011;Lo;0;L;;;;;N;;;;; +130DF;EGYPTIAN HIEROGLYPH E012;Lo;0;L;;;;;N;;;;; +130E0;EGYPTIAN HIEROGLYPH E013;Lo;0;L;;;;;N;;;;; +130E1;EGYPTIAN HIEROGLYPH E014;Lo;0;L;;;;;N;;;;; +130E2;EGYPTIAN HIEROGLYPH E015;Lo;0;L;;;;;N;;;;; +130E3;EGYPTIAN HIEROGLYPH E016;Lo;0;L;;;;;N;;;;; +130E4;EGYPTIAN HIEROGLYPH E016A;Lo;0;L;;;;;N;;;;; +130E5;EGYPTIAN HIEROGLYPH E017;Lo;0;L;;;;;N;;;;; +130E6;EGYPTIAN HIEROGLYPH E017A;Lo;0;L;;;;;N;;;;; +130E7;EGYPTIAN HIEROGLYPH E018;Lo;0;L;;;;;N;;;;; +130E8;EGYPTIAN HIEROGLYPH E019;Lo;0;L;;;;;N;;;;; +130E9;EGYPTIAN HIEROGLYPH E020;Lo;0;L;;;;;N;;;;; +130EA;EGYPTIAN HIEROGLYPH E020A;Lo;0;L;;;;;N;;;;; +130EB;EGYPTIAN HIEROGLYPH E021;Lo;0;L;;;;;N;;;;; +130EC;EGYPTIAN HIEROGLYPH E022;Lo;0;L;;;;;N;;;;; +130ED;EGYPTIAN HIEROGLYPH E023;Lo;0;L;;;;;N;;;;; +130EE;EGYPTIAN HIEROGLYPH E024;Lo;0;L;;;;;N;;;;; +130EF;EGYPTIAN HIEROGLYPH E025;Lo;0;L;;;;;N;;;;; +130F0;EGYPTIAN HIEROGLYPH E026;Lo;0;L;;;;;N;;;;; +130F1;EGYPTIAN HIEROGLYPH E027;Lo;0;L;;;;;N;;;;; +130F2;EGYPTIAN HIEROGLYPH E028;Lo;0;L;;;;;N;;;;; +130F3;EGYPTIAN HIEROGLYPH E028A;Lo;0;L;;;;;N;;;;; +130F4;EGYPTIAN HIEROGLYPH E029;Lo;0;L;;;;;N;;;;; +130F5;EGYPTIAN HIEROGLYPH E030;Lo;0;L;;;;;N;;;;; +130F6;EGYPTIAN HIEROGLYPH E031;Lo;0;L;;;;;N;;;;; +130F7;EGYPTIAN HIEROGLYPH E032;Lo;0;L;;;;;N;;;;; +130F8;EGYPTIAN HIEROGLYPH E033;Lo;0;L;;;;;N;;;;; +130F9;EGYPTIAN HIEROGLYPH E034;Lo;0;L;;;;;N;;;;; +130FA;EGYPTIAN HIEROGLYPH E034A;Lo;0;L;;;;;N;;;;; +130FB;EGYPTIAN HIEROGLYPH E036;Lo;0;L;;;;;N;;;;; +130FC;EGYPTIAN HIEROGLYPH E037;Lo;0;L;;;;;N;;;;; +130FD;EGYPTIAN HIEROGLYPH E038;Lo;0;L;;;;;N;;;;; +130FE;EGYPTIAN HIEROGLYPH F001;Lo;0;L;;;;;N;;;;; +130FF;EGYPTIAN HIEROGLYPH F001A;Lo;0;L;;;;;N;;;;; +13100;EGYPTIAN HIEROGLYPH F002;Lo;0;L;;;;;N;;;;; +13101;EGYPTIAN HIEROGLYPH F003;Lo;0;L;;;;;N;;;;; +13102;EGYPTIAN HIEROGLYPH F004;Lo;0;L;;;;;N;;;;; +13103;EGYPTIAN HIEROGLYPH F005;Lo;0;L;;;;;N;;;;; +13104;EGYPTIAN HIEROGLYPH F006;Lo;0;L;;;;;N;;;;; +13105;EGYPTIAN HIEROGLYPH F007;Lo;0;L;;;;;N;;;;; +13106;EGYPTIAN HIEROGLYPH F008;Lo;0;L;;;;;N;;;;; +13107;EGYPTIAN HIEROGLYPH F009;Lo;0;L;;;;;N;;;;; +13108;EGYPTIAN HIEROGLYPH F010;Lo;0;L;;;;;N;;;;; +13109;EGYPTIAN HIEROGLYPH F011;Lo;0;L;;;;;N;;;;; +1310A;EGYPTIAN HIEROGLYPH F012;Lo;0;L;;;;;N;;;;; +1310B;EGYPTIAN HIEROGLYPH F013;Lo;0;L;;;;;N;;;;; +1310C;EGYPTIAN HIEROGLYPH F013A;Lo;0;L;;;;;N;;;;; +1310D;EGYPTIAN HIEROGLYPH F014;Lo;0;L;;;;;N;;;;; +1310E;EGYPTIAN HIEROGLYPH F015;Lo;0;L;;;;;N;;;;; +1310F;EGYPTIAN HIEROGLYPH F016;Lo;0;L;;;;;N;;;;; +13110;EGYPTIAN HIEROGLYPH F017;Lo;0;L;;;;;N;;;;; +13111;EGYPTIAN HIEROGLYPH F018;Lo;0;L;;;;;N;;;;; +13112;EGYPTIAN HIEROGLYPH F019;Lo;0;L;;;;;N;;;;; +13113;EGYPTIAN HIEROGLYPH F020;Lo;0;L;;;;;N;;;;; +13114;EGYPTIAN HIEROGLYPH F021;Lo;0;L;;;;;N;;;;; +13115;EGYPTIAN HIEROGLYPH F021A;Lo;0;L;;;;;N;;;;; +13116;EGYPTIAN HIEROGLYPH F022;Lo;0;L;;;;;N;;;;; +13117;EGYPTIAN HIEROGLYPH F023;Lo;0;L;;;;;N;;;;; +13118;EGYPTIAN HIEROGLYPH F024;Lo;0;L;;;;;N;;;;; +13119;EGYPTIAN HIEROGLYPH F025;Lo;0;L;;;;;N;;;;; +1311A;EGYPTIAN HIEROGLYPH F026;Lo;0;L;;;;;N;;;;; +1311B;EGYPTIAN HIEROGLYPH F027;Lo;0;L;;;;;N;;;;; +1311C;EGYPTIAN HIEROGLYPH F028;Lo;0;L;;;;;N;;;;; +1311D;EGYPTIAN HIEROGLYPH F029;Lo;0;L;;;;;N;;;;; +1311E;EGYPTIAN HIEROGLYPH F030;Lo;0;L;;;;;N;;;;; +1311F;EGYPTIAN HIEROGLYPH F031;Lo;0;L;;;;;N;;;;; +13120;EGYPTIAN HIEROGLYPH F031A;Lo;0;L;;;;;N;;;;; +13121;EGYPTIAN HIEROGLYPH F032;Lo;0;L;;;;;N;;;;; +13122;EGYPTIAN HIEROGLYPH F033;Lo;0;L;;;;;N;;;;; +13123;EGYPTIAN HIEROGLYPH F034;Lo;0;L;;;;;N;;;;; +13124;EGYPTIAN HIEROGLYPH F035;Lo;0;L;;;;;N;;;;; +13125;EGYPTIAN HIEROGLYPH F036;Lo;0;L;;;;;N;;;;; +13126;EGYPTIAN HIEROGLYPH F037;Lo;0;L;;;;;N;;;;; +13127;EGYPTIAN HIEROGLYPH F037A;Lo;0;L;;;;;N;;;;; +13128;EGYPTIAN HIEROGLYPH F038;Lo;0;L;;;;;N;;;;; +13129;EGYPTIAN HIEROGLYPH F038A;Lo;0;L;;;;;N;;;;; +1312A;EGYPTIAN HIEROGLYPH F039;Lo;0;L;;;;;N;;;;; +1312B;EGYPTIAN HIEROGLYPH F040;Lo;0;L;;;;;N;;;;; +1312C;EGYPTIAN HIEROGLYPH F041;Lo;0;L;;;;;N;;;;; +1312D;EGYPTIAN HIEROGLYPH F042;Lo;0;L;;;;;N;;;;; +1312E;EGYPTIAN HIEROGLYPH F043;Lo;0;L;;;;;N;;;;; +1312F;EGYPTIAN HIEROGLYPH F044;Lo;0;L;;;;;N;;;;; +13130;EGYPTIAN HIEROGLYPH F045;Lo;0;L;;;;;N;;;;; +13131;EGYPTIAN HIEROGLYPH F045A;Lo;0;L;;;;;N;;;;; +13132;EGYPTIAN HIEROGLYPH F046;Lo;0;L;;;;;N;;;;; +13133;EGYPTIAN HIEROGLYPH F046A;Lo;0;L;;;;;N;;;;; +13134;EGYPTIAN HIEROGLYPH F047;Lo;0;L;;;;;N;;;;; +13135;EGYPTIAN HIEROGLYPH F047A;Lo;0;L;;;;;N;;;;; +13136;EGYPTIAN HIEROGLYPH F048;Lo;0;L;;;;;N;;;;; +13137;EGYPTIAN HIEROGLYPH F049;Lo;0;L;;;;;N;;;;; +13138;EGYPTIAN HIEROGLYPH F050;Lo;0;L;;;;;N;;;;; +13139;EGYPTIAN HIEROGLYPH F051;Lo;0;L;;;;;N;;;;; +1313A;EGYPTIAN HIEROGLYPH F051A;Lo;0;L;;;;;N;;;;; +1313B;EGYPTIAN HIEROGLYPH F051B;Lo;0;L;;;;;N;;;;; +1313C;EGYPTIAN HIEROGLYPH F051C;Lo;0;L;;;;;N;;;;; +1313D;EGYPTIAN HIEROGLYPH F052;Lo;0;L;;;;;N;;;;; +1313E;EGYPTIAN HIEROGLYPH F053;Lo;0;L;;;;;N;;;;; +1313F;EGYPTIAN HIEROGLYPH G001;Lo;0;L;;;;;N;;;;; +13140;EGYPTIAN HIEROGLYPH G002;Lo;0;L;;;;;N;;;;; +13141;EGYPTIAN HIEROGLYPH G003;Lo;0;L;;;;;N;;;;; +13142;EGYPTIAN HIEROGLYPH G004;Lo;0;L;;;;;N;;;;; +13143;EGYPTIAN HIEROGLYPH G005;Lo;0;L;;;;;N;;;;; +13144;EGYPTIAN HIEROGLYPH G006;Lo;0;L;;;;;N;;;;; +13145;EGYPTIAN HIEROGLYPH G006A;Lo;0;L;;;;;N;;;;; +13146;EGYPTIAN HIEROGLYPH G007;Lo;0;L;;;;;N;;;;; +13147;EGYPTIAN HIEROGLYPH G007A;Lo;0;L;;;;;N;;;;; +13148;EGYPTIAN HIEROGLYPH G007B;Lo;0;L;;;;;N;;;;; +13149;EGYPTIAN HIEROGLYPH G008;Lo;0;L;;;;;N;;;;; +1314A;EGYPTIAN HIEROGLYPH G009;Lo;0;L;;;;;N;;;;; +1314B;EGYPTIAN HIEROGLYPH G010;Lo;0;L;;;;;N;;;;; +1314C;EGYPTIAN HIEROGLYPH G011;Lo;0;L;;;;;N;;;;; +1314D;EGYPTIAN HIEROGLYPH G011A;Lo;0;L;;;;;N;;;;; +1314E;EGYPTIAN HIEROGLYPH G012;Lo;0;L;;;;;N;;;;; +1314F;EGYPTIAN HIEROGLYPH G013;Lo;0;L;;;;;N;;;;; +13150;EGYPTIAN HIEROGLYPH G014;Lo;0;L;;;;;N;;;;; +13151;EGYPTIAN HIEROGLYPH G015;Lo;0;L;;;;;N;;;;; +13152;EGYPTIAN HIEROGLYPH G016;Lo;0;L;;;;;N;;;;; +13153;EGYPTIAN HIEROGLYPH G017;Lo;0;L;;;;;N;;;;; +13154;EGYPTIAN HIEROGLYPH G018;Lo;0;L;;;;;N;;;;; +13155;EGYPTIAN HIEROGLYPH G019;Lo;0;L;;;;;N;;;;; +13156;EGYPTIAN HIEROGLYPH G020;Lo;0;L;;;;;N;;;;; +13157;EGYPTIAN HIEROGLYPH G020A;Lo;0;L;;;;;N;;;;; +13158;EGYPTIAN HIEROGLYPH G021;Lo;0;L;;;;;N;;;;; +13159;EGYPTIAN HIEROGLYPH G022;Lo;0;L;;;;;N;;;;; +1315A;EGYPTIAN HIEROGLYPH G023;Lo;0;L;;;;;N;;;;; +1315B;EGYPTIAN HIEROGLYPH G024;Lo;0;L;;;;;N;;;;; +1315C;EGYPTIAN HIEROGLYPH G025;Lo;0;L;;;;;N;;;;; +1315D;EGYPTIAN HIEROGLYPH G026;Lo;0;L;;;;;N;;;;; +1315E;EGYPTIAN HIEROGLYPH G026A;Lo;0;L;;;;;N;;;;; +1315F;EGYPTIAN HIEROGLYPH G027;Lo;0;L;;;;;N;;;;; +13160;EGYPTIAN HIEROGLYPH G028;Lo;0;L;;;;;N;;;;; +13161;EGYPTIAN HIEROGLYPH G029;Lo;0;L;;;;;N;;;;; +13162;EGYPTIAN HIEROGLYPH G030;Lo;0;L;;;;;N;;;;; +13163;EGYPTIAN HIEROGLYPH G031;Lo;0;L;;;;;N;;;;; +13164;EGYPTIAN HIEROGLYPH G032;Lo;0;L;;;;;N;;;;; +13165;EGYPTIAN HIEROGLYPH G033;Lo;0;L;;;;;N;;;;; +13166;EGYPTIAN HIEROGLYPH G034;Lo;0;L;;;;;N;;;;; +13167;EGYPTIAN HIEROGLYPH G035;Lo;0;L;;;;;N;;;;; +13168;EGYPTIAN HIEROGLYPH G036;Lo;0;L;;;;;N;;;;; +13169;EGYPTIAN HIEROGLYPH G036A;Lo;0;L;;;;;N;;;;; +1316A;EGYPTIAN HIEROGLYPH G037;Lo;0;L;;;;;N;;;;; +1316B;EGYPTIAN HIEROGLYPH G037A;Lo;0;L;;;;;N;;;;; +1316C;EGYPTIAN HIEROGLYPH G038;Lo;0;L;;;;;N;;;;; +1316D;EGYPTIAN HIEROGLYPH G039;Lo;0;L;;;;;N;;;;; +1316E;EGYPTIAN HIEROGLYPH G040;Lo;0;L;;;;;N;;;;; +1316F;EGYPTIAN HIEROGLYPH G041;Lo;0;L;;;;;N;;;;; +13170;EGYPTIAN HIEROGLYPH G042;Lo;0;L;;;;;N;;;;; +13171;EGYPTIAN HIEROGLYPH G043;Lo;0;L;;;;;N;;;;; +13172;EGYPTIAN HIEROGLYPH G043A;Lo;0;L;;;;;N;;;;; +13173;EGYPTIAN HIEROGLYPH G044;Lo;0;L;;;;;N;;;;; +13174;EGYPTIAN HIEROGLYPH G045;Lo;0;L;;;;;N;;;;; +13175;EGYPTIAN HIEROGLYPH G045A;Lo;0;L;;;;;N;;;;; +13176;EGYPTIAN HIEROGLYPH G046;Lo;0;L;;;;;N;;;;; +13177;EGYPTIAN HIEROGLYPH G047;Lo;0;L;;;;;N;;;;; +13178;EGYPTIAN HIEROGLYPH G048;Lo;0;L;;;;;N;;;;; +13179;EGYPTIAN HIEROGLYPH G049;Lo;0;L;;;;;N;;;;; +1317A;EGYPTIAN HIEROGLYPH G050;Lo;0;L;;;;;N;;;;; +1317B;EGYPTIAN HIEROGLYPH G051;Lo;0;L;;;;;N;;;;; +1317C;EGYPTIAN HIEROGLYPH G052;Lo;0;L;;;;;N;;;;; +1317D;EGYPTIAN HIEROGLYPH G053;Lo;0;L;;;;;N;;;;; +1317E;EGYPTIAN HIEROGLYPH G054;Lo;0;L;;;;;N;;;;; +1317F;EGYPTIAN HIEROGLYPH H001;Lo;0;L;;;;;N;;;;; +13180;EGYPTIAN HIEROGLYPH H002;Lo;0;L;;;;;N;;;;; +13181;EGYPTIAN HIEROGLYPH H003;Lo;0;L;;;;;N;;;;; +13182;EGYPTIAN HIEROGLYPH H004;Lo;0;L;;;;;N;;;;; +13183;EGYPTIAN HIEROGLYPH H005;Lo;0;L;;;;;N;;;;; +13184;EGYPTIAN HIEROGLYPH H006;Lo;0;L;;;;;N;;;;; +13185;EGYPTIAN HIEROGLYPH H006A;Lo;0;L;;;;;N;;;;; +13186;EGYPTIAN HIEROGLYPH H007;Lo;0;L;;;;;N;;;;; +13187;EGYPTIAN HIEROGLYPH H008;Lo;0;L;;;;;N;;;;; +13188;EGYPTIAN HIEROGLYPH I001;Lo;0;L;;;;;N;;;;; +13189;EGYPTIAN HIEROGLYPH I002;Lo;0;L;;;;;N;;;;; +1318A;EGYPTIAN HIEROGLYPH I003;Lo;0;L;;;;;N;;;;; +1318B;EGYPTIAN HIEROGLYPH I004;Lo;0;L;;;;;N;;;;; +1318C;EGYPTIAN HIEROGLYPH I005;Lo;0;L;;;;;N;;;;; +1318D;EGYPTIAN HIEROGLYPH I005A;Lo;0;L;;;;;N;;;;; +1318E;EGYPTIAN HIEROGLYPH I006;Lo;0;L;;;;;N;;;;; +1318F;EGYPTIAN HIEROGLYPH I007;Lo;0;L;;;;;N;;;;; +13190;EGYPTIAN HIEROGLYPH I008;Lo;0;L;;;;;N;;;;; +13191;EGYPTIAN HIEROGLYPH I009;Lo;0;L;;;;;N;;;;; +13192;EGYPTIAN HIEROGLYPH I009A;Lo;0;L;;;;;N;;;;; +13193;EGYPTIAN HIEROGLYPH I010;Lo;0;L;;;;;N;;;;; +13194;EGYPTIAN HIEROGLYPH I010A;Lo;0;L;;;;;N;;;;; +13195;EGYPTIAN HIEROGLYPH I011;Lo;0;L;;;;;N;;;;; +13196;EGYPTIAN HIEROGLYPH I011A;Lo;0;L;;;;;N;;;;; +13197;EGYPTIAN HIEROGLYPH I012;Lo;0;L;;;;;N;;;;; +13198;EGYPTIAN HIEROGLYPH I013;Lo;0;L;;;;;N;;;;; +13199;EGYPTIAN HIEROGLYPH I014;Lo;0;L;;;;;N;;;;; +1319A;EGYPTIAN HIEROGLYPH I015;Lo;0;L;;;;;N;;;;; +1319B;EGYPTIAN HIEROGLYPH K001;Lo;0;L;;;;;N;;;;; +1319C;EGYPTIAN HIEROGLYPH K002;Lo;0;L;;;;;N;;;;; +1319D;EGYPTIAN HIEROGLYPH K003;Lo;0;L;;;;;N;;;;; +1319E;EGYPTIAN HIEROGLYPH K004;Lo;0;L;;;;;N;;;;; +1319F;EGYPTIAN HIEROGLYPH K005;Lo;0;L;;;;;N;;;;; +131A0;EGYPTIAN HIEROGLYPH K006;Lo;0;L;;;;;N;;;;; +131A1;EGYPTIAN HIEROGLYPH K007;Lo;0;L;;;;;N;;;;; +131A2;EGYPTIAN HIEROGLYPH K008;Lo;0;L;;;;;N;;;;; +131A3;EGYPTIAN HIEROGLYPH L001;Lo;0;L;;;;;N;;;;; +131A4;EGYPTIAN HIEROGLYPH L002;Lo;0;L;;;;;N;;;;; +131A5;EGYPTIAN HIEROGLYPH L002A;Lo;0;L;;;;;N;;;;; +131A6;EGYPTIAN HIEROGLYPH L003;Lo;0;L;;;;;N;;;;; +131A7;EGYPTIAN HIEROGLYPH L004;Lo;0;L;;;;;N;;;;; +131A8;EGYPTIAN HIEROGLYPH L005;Lo;0;L;;;;;N;;;;; +131A9;EGYPTIAN HIEROGLYPH L006;Lo;0;L;;;;;N;;;;; +131AA;EGYPTIAN HIEROGLYPH L006A;Lo;0;L;;;;;N;;;;; +131AB;EGYPTIAN HIEROGLYPH L007;Lo;0;L;;;;;N;;;;; +131AC;EGYPTIAN HIEROGLYPH L008;Lo;0;L;;;;;N;;;;; +131AD;EGYPTIAN HIEROGLYPH M001;Lo;0;L;;;;;N;;;;; +131AE;EGYPTIAN HIEROGLYPH M001A;Lo;0;L;;;;;N;;;;; +131AF;EGYPTIAN HIEROGLYPH M001B;Lo;0;L;;;;;N;;;;; +131B0;EGYPTIAN HIEROGLYPH M002;Lo;0;L;;;;;N;;;;; +131B1;EGYPTIAN HIEROGLYPH M003;Lo;0;L;;;;;N;;;;; +131B2;EGYPTIAN HIEROGLYPH M003A;Lo;0;L;;;;;N;;;;; +131B3;EGYPTIAN HIEROGLYPH M004;Lo;0;L;;;;;N;;;;; +131B4;EGYPTIAN HIEROGLYPH M005;Lo;0;L;;;;;N;;;;; +131B5;EGYPTIAN HIEROGLYPH M006;Lo;0;L;;;;;N;;;;; +131B6;EGYPTIAN HIEROGLYPH M007;Lo;0;L;;;;;N;;;;; +131B7;EGYPTIAN HIEROGLYPH M008;Lo;0;L;;;;;N;;;;; +131B8;EGYPTIAN HIEROGLYPH M009;Lo;0;L;;;;;N;;;;; +131B9;EGYPTIAN HIEROGLYPH M010;Lo;0;L;;;;;N;;;;; +131BA;EGYPTIAN HIEROGLYPH M010A;Lo;0;L;;;;;N;;;;; +131BB;EGYPTIAN HIEROGLYPH M011;Lo;0;L;;;;;N;;;;; +131BC;EGYPTIAN HIEROGLYPH M012;Lo;0;L;;;;;N;;;;; +131BD;EGYPTIAN HIEROGLYPH M012A;Lo;0;L;;;;;N;;;;; +131BE;EGYPTIAN HIEROGLYPH M012B;Lo;0;L;;;;;N;;;;; +131BF;EGYPTIAN HIEROGLYPH M012C;Lo;0;L;;;;;N;;;;; +131C0;EGYPTIAN HIEROGLYPH M012D;Lo;0;L;;;;;N;;;;; +131C1;EGYPTIAN HIEROGLYPH M012E;Lo;0;L;;;;;N;;;;; +131C2;EGYPTIAN HIEROGLYPH M012F;Lo;0;L;;;;;N;;;;; +131C3;EGYPTIAN HIEROGLYPH M012G;Lo;0;L;;;;;N;;;;; +131C4;EGYPTIAN HIEROGLYPH M012H;Lo;0;L;;;;;N;;;;; +131C5;EGYPTIAN HIEROGLYPH M013;Lo;0;L;;;;;N;;;;; +131C6;EGYPTIAN HIEROGLYPH M014;Lo;0;L;;;;;N;;;;; +131C7;EGYPTIAN HIEROGLYPH M015;Lo;0;L;;;;;N;;;;; +131C8;EGYPTIAN HIEROGLYPH M015A;Lo;0;L;;;;;N;;;;; +131C9;EGYPTIAN HIEROGLYPH M016;Lo;0;L;;;;;N;;;;; +131CA;EGYPTIAN HIEROGLYPH M016A;Lo;0;L;;;;;N;;;;; +131CB;EGYPTIAN HIEROGLYPH M017;Lo;0;L;;;;;N;;;;; +131CC;EGYPTIAN HIEROGLYPH M017A;Lo;0;L;;;;;N;;;;; +131CD;EGYPTIAN HIEROGLYPH M018;Lo;0;L;;;;;N;;;;; +131CE;EGYPTIAN HIEROGLYPH M019;Lo;0;L;;;;;N;;;;; +131CF;EGYPTIAN HIEROGLYPH M020;Lo;0;L;;;;;N;;;;; +131D0;EGYPTIAN HIEROGLYPH M021;Lo;0;L;;;;;N;;;;; +131D1;EGYPTIAN HIEROGLYPH M022;Lo;0;L;;;;;N;;;;; +131D2;EGYPTIAN HIEROGLYPH M022A;Lo;0;L;;;;;N;;;;; +131D3;EGYPTIAN HIEROGLYPH M023;Lo;0;L;;;;;N;;;;; +131D4;EGYPTIAN HIEROGLYPH M024;Lo;0;L;;;;;N;;;;; +131D5;EGYPTIAN HIEROGLYPH M024A;Lo;0;L;;;;;N;;;;; +131D6;EGYPTIAN HIEROGLYPH M025;Lo;0;L;;;;;N;;;;; +131D7;EGYPTIAN HIEROGLYPH M026;Lo;0;L;;;;;N;;;;; +131D8;EGYPTIAN HIEROGLYPH M027;Lo;0;L;;;;;N;;;;; +131D9;EGYPTIAN HIEROGLYPH M028;Lo;0;L;;;;;N;;;;; +131DA;EGYPTIAN HIEROGLYPH M028A;Lo;0;L;;;;;N;;;;; +131DB;EGYPTIAN HIEROGLYPH M029;Lo;0;L;;;;;N;;;;; +131DC;EGYPTIAN HIEROGLYPH M030;Lo;0;L;;;;;N;;;;; +131DD;EGYPTIAN HIEROGLYPH M031;Lo;0;L;;;;;N;;;;; +131DE;EGYPTIAN HIEROGLYPH M031A;Lo;0;L;;;;;N;;;;; +131DF;EGYPTIAN HIEROGLYPH M032;Lo;0;L;;;;;N;;;;; +131E0;EGYPTIAN HIEROGLYPH M033;Lo;0;L;;;;;N;;;;; +131E1;EGYPTIAN HIEROGLYPH M033A;Lo;0;L;;;;;N;;;;; +131E2;EGYPTIAN HIEROGLYPH M033B;Lo;0;L;;;;;N;;;;; +131E3;EGYPTIAN HIEROGLYPH M034;Lo;0;L;;;;;N;;;;; +131E4;EGYPTIAN HIEROGLYPH M035;Lo;0;L;;;;;N;;;;; +131E5;EGYPTIAN HIEROGLYPH M036;Lo;0;L;;;;;N;;;;; +131E6;EGYPTIAN HIEROGLYPH M037;Lo;0;L;;;;;N;;;;; +131E7;EGYPTIAN HIEROGLYPH M038;Lo;0;L;;;;;N;;;;; +131E8;EGYPTIAN HIEROGLYPH M039;Lo;0;L;;;;;N;;;;; +131E9;EGYPTIAN HIEROGLYPH M040;Lo;0;L;;;;;N;;;;; +131EA;EGYPTIAN HIEROGLYPH M040A;Lo;0;L;;;;;N;;;;; +131EB;EGYPTIAN HIEROGLYPH M041;Lo;0;L;;;;;N;;;;; +131EC;EGYPTIAN HIEROGLYPH M042;Lo;0;L;;;;;N;;;;; +131ED;EGYPTIAN HIEROGLYPH M043;Lo;0;L;;;;;N;;;;; +131EE;EGYPTIAN HIEROGLYPH M044;Lo;0;L;;;;;N;;;;; +131EF;EGYPTIAN HIEROGLYPH N001;Lo;0;L;;;;;N;;;;; +131F0;EGYPTIAN HIEROGLYPH N002;Lo;0;L;;;;;N;;;;; +131F1;EGYPTIAN HIEROGLYPH N003;Lo;0;L;;;;;N;;;;; +131F2;EGYPTIAN HIEROGLYPH N004;Lo;0;L;;;;;N;;;;; +131F3;EGYPTIAN HIEROGLYPH N005;Lo;0;L;;;;;N;;;;; +131F4;EGYPTIAN HIEROGLYPH N006;Lo;0;L;;;;;N;;;;; +131F5;EGYPTIAN HIEROGLYPH N007;Lo;0;L;;;;;N;;;;; +131F6;EGYPTIAN HIEROGLYPH N008;Lo;0;L;;;;;N;;;;; +131F7;EGYPTIAN HIEROGLYPH N009;Lo;0;L;;;;;N;;;;; +131F8;EGYPTIAN HIEROGLYPH N010;Lo;0;L;;;;;N;;;;; +131F9;EGYPTIAN HIEROGLYPH N011;Lo;0;L;;;;;N;;;;; +131FA;EGYPTIAN HIEROGLYPH N012;Lo;0;L;;;;;N;;;;; +131FB;EGYPTIAN HIEROGLYPH N013;Lo;0;L;;;;;N;;;;; +131FC;EGYPTIAN HIEROGLYPH N014;Lo;0;L;;;;;N;;;;; +131FD;EGYPTIAN HIEROGLYPH N015;Lo;0;L;;;;;N;;;;; +131FE;EGYPTIAN HIEROGLYPH N016;Lo;0;L;;;;;N;;;;; +131FF;EGYPTIAN HIEROGLYPH N017;Lo;0;L;;;;;N;;;;; +13200;EGYPTIAN HIEROGLYPH N018;Lo;0;L;;;;;N;;;;; +13201;EGYPTIAN HIEROGLYPH N018A;Lo;0;L;;;;;N;;;;; +13202;EGYPTIAN HIEROGLYPH N018B;Lo;0;L;;;;;N;;;;; +13203;EGYPTIAN HIEROGLYPH N019;Lo;0;L;;;;;N;;;;; +13204;EGYPTIAN HIEROGLYPH N020;Lo;0;L;;;;;N;;;;; +13205;EGYPTIAN HIEROGLYPH N021;Lo;0;L;;;;;N;;;;; +13206;EGYPTIAN HIEROGLYPH N022;Lo;0;L;;;;;N;;;;; +13207;EGYPTIAN HIEROGLYPH N023;Lo;0;L;;;;;N;;;;; +13208;EGYPTIAN HIEROGLYPH N024;Lo;0;L;;;;;N;;;;; +13209;EGYPTIAN HIEROGLYPH N025;Lo;0;L;;;;;N;;;;; +1320A;EGYPTIAN HIEROGLYPH N025A;Lo;0;L;;;;;N;;;;; +1320B;EGYPTIAN HIEROGLYPH N026;Lo;0;L;;;;;N;;;;; +1320C;EGYPTIAN HIEROGLYPH N027;Lo;0;L;;;;;N;;;;; +1320D;EGYPTIAN HIEROGLYPH N028;Lo;0;L;;;;;N;;;;; +1320E;EGYPTIAN HIEROGLYPH N029;Lo;0;L;;;;;N;;;;; +1320F;EGYPTIAN HIEROGLYPH N030;Lo;0;L;;;;;N;;;;; +13210;EGYPTIAN HIEROGLYPH N031;Lo;0;L;;;;;N;;;;; +13211;EGYPTIAN HIEROGLYPH N032;Lo;0;L;;;;;N;;;;; +13212;EGYPTIAN HIEROGLYPH N033;Lo;0;L;;;;;N;;;;; +13213;EGYPTIAN HIEROGLYPH N033A;Lo;0;L;;;;;N;;;;; +13214;EGYPTIAN HIEROGLYPH N034;Lo;0;L;;;;;N;;;;; +13215;EGYPTIAN HIEROGLYPH N034A;Lo;0;L;;;;;N;;;;; +13216;EGYPTIAN HIEROGLYPH N035;Lo;0;L;;;;;N;;;;; +13217;EGYPTIAN HIEROGLYPH N035A;Lo;0;L;;;;;N;;;;; +13218;EGYPTIAN HIEROGLYPH N036;Lo;0;L;;;;;N;;;;; +13219;EGYPTIAN HIEROGLYPH N037;Lo;0;L;;;;;N;;;;; +1321A;EGYPTIAN HIEROGLYPH N037A;Lo;0;L;;;;;N;;;;; +1321B;EGYPTIAN HIEROGLYPH N038;Lo;0;L;;;;;N;;;;; +1321C;EGYPTIAN HIEROGLYPH N039;Lo;0;L;;;;;N;;;;; +1321D;EGYPTIAN HIEROGLYPH N040;Lo;0;L;;;;;N;;;;; +1321E;EGYPTIAN HIEROGLYPH N041;Lo;0;L;;;;;N;;;;; +1321F;EGYPTIAN HIEROGLYPH N042;Lo;0;L;;;;;N;;;;; +13220;EGYPTIAN HIEROGLYPH NL001;Lo;0;L;;;;;N;;;;; +13221;EGYPTIAN HIEROGLYPH NL002;Lo;0;L;;;;;N;;;;; +13222;EGYPTIAN HIEROGLYPH NL003;Lo;0;L;;;;;N;;;;; +13223;EGYPTIAN HIEROGLYPH NL004;Lo;0;L;;;;;N;;;;; +13224;EGYPTIAN HIEROGLYPH NL005;Lo;0;L;;;;;N;;;;; +13225;EGYPTIAN HIEROGLYPH NL005A;Lo;0;L;;;;;N;;;;; +13226;EGYPTIAN HIEROGLYPH NL006;Lo;0;L;;;;;N;;;;; +13227;EGYPTIAN HIEROGLYPH NL007;Lo;0;L;;;;;N;;;;; +13228;EGYPTIAN HIEROGLYPH NL008;Lo;0;L;;;;;N;;;;; +13229;EGYPTIAN HIEROGLYPH NL009;Lo;0;L;;;;;N;;;;; +1322A;EGYPTIAN HIEROGLYPH NL010;Lo;0;L;;;;;N;;;;; +1322B;EGYPTIAN HIEROGLYPH NL011;Lo;0;L;;;;;N;;;;; +1322C;EGYPTIAN HIEROGLYPH NL012;Lo;0;L;;;;;N;;;;; +1322D;EGYPTIAN HIEROGLYPH NL013;Lo;0;L;;;;;N;;;;; +1322E;EGYPTIAN HIEROGLYPH NL014;Lo;0;L;;;;;N;;;;; +1322F;EGYPTIAN HIEROGLYPH NL015;Lo;0;L;;;;;N;;;;; +13230;EGYPTIAN HIEROGLYPH NL016;Lo;0;L;;;;;N;;;;; +13231;EGYPTIAN HIEROGLYPH NL017;Lo;0;L;;;;;N;;;;; +13232;EGYPTIAN HIEROGLYPH NL017A;Lo;0;L;;;;;N;;;;; +13233;EGYPTIAN HIEROGLYPH NL018;Lo;0;L;;;;;N;;;;; +13234;EGYPTIAN HIEROGLYPH NL019;Lo;0;L;;;;;N;;;;; +13235;EGYPTIAN HIEROGLYPH NL020;Lo;0;L;;;;;N;;;;; +13236;EGYPTIAN HIEROGLYPH NU001;Lo;0;L;;;;;N;;;;; +13237;EGYPTIAN HIEROGLYPH NU002;Lo;0;L;;;;;N;;;;; +13238;EGYPTIAN HIEROGLYPH NU003;Lo;0;L;;;;;N;;;;; +13239;EGYPTIAN HIEROGLYPH NU004;Lo;0;L;;;;;N;;;;; +1323A;EGYPTIAN HIEROGLYPH NU005;Lo;0;L;;;;;N;;;;; +1323B;EGYPTIAN HIEROGLYPH NU006;Lo;0;L;;;;;N;;;;; +1323C;EGYPTIAN HIEROGLYPH NU007;Lo;0;L;;;;;N;;;;; +1323D;EGYPTIAN HIEROGLYPH NU008;Lo;0;L;;;;;N;;;;; +1323E;EGYPTIAN HIEROGLYPH NU009;Lo;0;L;;;;;N;;;;; +1323F;EGYPTIAN HIEROGLYPH NU010;Lo;0;L;;;;;N;;;;; +13240;EGYPTIAN HIEROGLYPH NU010A;Lo;0;L;;;;;N;;;;; +13241;EGYPTIAN HIEROGLYPH NU011;Lo;0;L;;;;;N;;;;; +13242;EGYPTIAN HIEROGLYPH NU011A;Lo;0;L;;;;;N;;;;; +13243;EGYPTIAN HIEROGLYPH NU012;Lo;0;L;;;;;N;;;;; +13244;EGYPTIAN HIEROGLYPH NU013;Lo;0;L;;;;;N;;;;; +13245;EGYPTIAN HIEROGLYPH NU014;Lo;0;L;;;;;N;;;;; +13246;EGYPTIAN HIEROGLYPH NU015;Lo;0;L;;;;;N;;;;; +13247;EGYPTIAN HIEROGLYPH NU016;Lo;0;L;;;;;N;;;;; +13248;EGYPTIAN HIEROGLYPH NU017;Lo;0;L;;;;;N;;;;; +13249;EGYPTIAN HIEROGLYPH NU018;Lo;0;L;;;;;N;;;;; +1324A;EGYPTIAN HIEROGLYPH NU018A;Lo;0;L;;;;;N;;;;; +1324B;EGYPTIAN HIEROGLYPH NU019;Lo;0;L;;;;;N;;;;; +1324C;EGYPTIAN HIEROGLYPH NU020;Lo;0;L;;;;;N;;;;; +1324D;EGYPTIAN HIEROGLYPH NU021;Lo;0;L;;;;;N;;;;; +1324E;EGYPTIAN HIEROGLYPH NU022;Lo;0;L;;;;;N;;;;; +1324F;EGYPTIAN HIEROGLYPH NU022A;Lo;0;L;;;;;N;;;;; +13250;EGYPTIAN HIEROGLYPH O001;Lo;0;L;;;;;N;;;;; +13251;EGYPTIAN HIEROGLYPH O001A;Lo;0;L;;;;;N;;;;; +13252;EGYPTIAN HIEROGLYPH O002;Lo;0;L;;;;;N;;;;; +13253;EGYPTIAN HIEROGLYPH O003;Lo;0;L;;;;;N;;;;; +13254;EGYPTIAN HIEROGLYPH O004;Lo;0;L;;;;;N;;;;; +13255;EGYPTIAN HIEROGLYPH O005;Lo;0;L;;;;;N;;;;; +13256;EGYPTIAN HIEROGLYPH O005A;Lo;0;L;;;;;N;;;;; +13257;EGYPTIAN HIEROGLYPH O006;Lo;0;L;;;;;N;;;;; +13258;EGYPTIAN HIEROGLYPH O006A;Lo;0;L;;;;;N;;;;; +13259;EGYPTIAN HIEROGLYPH O006B;Lo;0;L;;;;;N;;;;; +1325A;EGYPTIAN HIEROGLYPH O006C;Lo;0;L;;;;;N;;;;; +1325B;EGYPTIAN HIEROGLYPH O006D;Lo;0;L;;;;;N;;;;; +1325C;EGYPTIAN HIEROGLYPH O006E;Lo;0;L;;;;;N;;;;; +1325D;EGYPTIAN HIEROGLYPH O006F;Lo;0;L;;;;;N;;;;; +1325E;EGYPTIAN HIEROGLYPH O007;Lo;0;L;;;;;N;;;;; +1325F;EGYPTIAN HIEROGLYPH O008;Lo;0;L;;;;;N;;;;; +13260;EGYPTIAN HIEROGLYPH O009;Lo;0;L;;;;;N;;;;; +13261;EGYPTIAN HIEROGLYPH O010;Lo;0;L;;;;;N;;;;; +13262;EGYPTIAN HIEROGLYPH O010A;Lo;0;L;;;;;N;;;;; +13263;EGYPTIAN HIEROGLYPH O010B;Lo;0;L;;;;;N;;;;; +13264;EGYPTIAN HIEROGLYPH O010C;Lo;0;L;;;;;N;;;;; +13265;EGYPTIAN HIEROGLYPH O011;Lo;0;L;;;;;N;;;;; +13266;EGYPTIAN HIEROGLYPH O012;Lo;0;L;;;;;N;;;;; +13267;EGYPTIAN HIEROGLYPH O013;Lo;0;L;;;;;N;;;;; +13268;EGYPTIAN HIEROGLYPH O014;Lo;0;L;;;;;N;;;;; +13269;EGYPTIAN HIEROGLYPH O015;Lo;0;L;;;;;N;;;;; +1326A;EGYPTIAN HIEROGLYPH O016;Lo;0;L;;;;;N;;;;; +1326B;EGYPTIAN HIEROGLYPH O017;Lo;0;L;;;;;N;;;;; +1326C;EGYPTIAN HIEROGLYPH O018;Lo;0;L;;;;;N;;;;; +1326D;EGYPTIAN HIEROGLYPH O019;Lo;0;L;;;;;N;;;;; +1326E;EGYPTIAN HIEROGLYPH O019A;Lo;0;L;;;;;N;;;;; +1326F;EGYPTIAN HIEROGLYPH O020;Lo;0;L;;;;;N;;;;; +13270;EGYPTIAN HIEROGLYPH O020A;Lo;0;L;;;;;N;;;;; +13271;EGYPTIAN HIEROGLYPH O021;Lo;0;L;;;;;N;;;;; +13272;EGYPTIAN HIEROGLYPH O022;Lo;0;L;;;;;N;;;;; +13273;EGYPTIAN HIEROGLYPH O023;Lo;0;L;;;;;N;;;;; +13274;EGYPTIAN HIEROGLYPH O024;Lo;0;L;;;;;N;;;;; +13275;EGYPTIAN HIEROGLYPH O024A;Lo;0;L;;;;;N;;;;; +13276;EGYPTIAN HIEROGLYPH O025;Lo;0;L;;;;;N;;;;; +13277;EGYPTIAN HIEROGLYPH O025A;Lo;0;L;;;;;N;;;;; +13278;EGYPTIAN HIEROGLYPH O026;Lo;0;L;;;;;N;;;;; +13279;EGYPTIAN HIEROGLYPH O027;Lo;0;L;;;;;N;;;;; +1327A;EGYPTIAN HIEROGLYPH O028;Lo;0;L;;;;;N;;;;; +1327B;EGYPTIAN HIEROGLYPH O029;Lo;0;L;;;;;N;;;;; +1327C;EGYPTIAN HIEROGLYPH O029A;Lo;0;L;;;;;N;;;;; +1327D;EGYPTIAN HIEROGLYPH O030;Lo;0;L;;;;;N;;;;; +1327E;EGYPTIAN HIEROGLYPH O030A;Lo;0;L;;;;;N;;;;; +1327F;EGYPTIAN HIEROGLYPH O031;Lo;0;L;;;;;N;;;;; +13280;EGYPTIAN HIEROGLYPH O032;Lo;0;L;;;;;N;;;;; +13281;EGYPTIAN HIEROGLYPH O033;Lo;0;L;;;;;N;;;;; +13282;EGYPTIAN HIEROGLYPH O033A;Lo;0;L;;;;;N;;;;; +13283;EGYPTIAN HIEROGLYPH O034;Lo;0;L;;;;;N;;;;; +13284;EGYPTIAN HIEROGLYPH O035;Lo;0;L;;;;;N;;;;; +13285;EGYPTIAN HIEROGLYPH O036;Lo;0;L;;;;;N;;;;; +13286;EGYPTIAN HIEROGLYPH O036A;Lo;0;L;;;;;N;;;;; +13287;EGYPTIAN HIEROGLYPH O036B;Lo;0;L;;;;;N;;;;; +13288;EGYPTIAN HIEROGLYPH O036C;Lo;0;L;;;;;N;;;;; +13289;EGYPTIAN HIEROGLYPH O036D;Lo;0;L;;;;;N;;;;; +1328A;EGYPTIAN HIEROGLYPH O037;Lo;0;L;;;;;N;;;;; +1328B;EGYPTIAN HIEROGLYPH O038;Lo;0;L;;;;;N;;;;; +1328C;EGYPTIAN HIEROGLYPH O039;Lo;0;L;;;;;N;;;;; +1328D;EGYPTIAN HIEROGLYPH O040;Lo;0;L;;;;;N;;;;; +1328E;EGYPTIAN HIEROGLYPH O041;Lo;0;L;;;;;N;;;;; +1328F;EGYPTIAN HIEROGLYPH O042;Lo;0;L;;;;;N;;;;; +13290;EGYPTIAN HIEROGLYPH O043;Lo;0;L;;;;;N;;;;; +13291;EGYPTIAN HIEROGLYPH O044;Lo;0;L;;;;;N;;;;; +13292;EGYPTIAN HIEROGLYPH O045;Lo;0;L;;;;;N;;;;; +13293;EGYPTIAN HIEROGLYPH O046;Lo;0;L;;;;;N;;;;; +13294;EGYPTIAN HIEROGLYPH O047;Lo;0;L;;;;;N;;;;; +13295;EGYPTIAN HIEROGLYPH O048;Lo;0;L;;;;;N;;;;; +13296;EGYPTIAN HIEROGLYPH O049;Lo;0;L;;;;;N;;;;; +13297;EGYPTIAN HIEROGLYPH O050;Lo;0;L;;;;;N;;;;; +13298;EGYPTIAN HIEROGLYPH O050A;Lo;0;L;;;;;N;;;;; +13299;EGYPTIAN HIEROGLYPH O050B;Lo;0;L;;;;;N;;;;; +1329A;EGYPTIAN HIEROGLYPH O051;Lo;0;L;;;;;N;;;;; +1329B;EGYPTIAN HIEROGLYPH P001;Lo;0;L;;;;;N;;;;; +1329C;EGYPTIAN HIEROGLYPH P001A;Lo;0;L;;;;;N;;;;; +1329D;EGYPTIAN HIEROGLYPH P002;Lo;0;L;;;;;N;;;;; +1329E;EGYPTIAN HIEROGLYPH P003;Lo;0;L;;;;;N;;;;; +1329F;EGYPTIAN HIEROGLYPH P003A;Lo;0;L;;;;;N;;;;; +132A0;EGYPTIAN HIEROGLYPH P004;Lo;0;L;;;;;N;;;;; +132A1;EGYPTIAN HIEROGLYPH P005;Lo;0;L;;;;;N;;;;; +132A2;EGYPTIAN HIEROGLYPH P006;Lo;0;L;;;;;N;;;;; +132A3;EGYPTIAN HIEROGLYPH P007;Lo;0;L;;;;;N;;;;; +132A4;EGYPTIAN HIEROGLYPH P008;Lo;0;L;;;;;N;;;;; +132A5;EGYPTIAN HIEROGLYPH P009;Lo;0;L;;;;;N;;;;; +132A6;EGYPTIAN HIEROGLYPH P010;Lo;0;L;;;;;N;;;;; +132A7;EGYPTIAN HIEROGLYPH P011;Lo;0;L;;;;;N;;;;; +132A8;EGYPTIAN HIEROGLYPH Q001;Lo;0;L;;;;;N;;;;; +132A9;EGYPTIAN HIEROGLYPH Q002;Lo;0;L;;;;;N;;;;; +132AA;EGYPTIAN HIEROGLYPH Q003;Lo;0;L;;;;;N;;;;; +132AB;EGYPTIAN HIEROGLYPH Q004;Lo;0;L;;;;;N;;;;; +132AC;EGYPTIAN HIEROGLYPH Q005;Lo;0;L;;;;;N;;;;; +132AD;EGYPTIAN HIEROGLYPH Q006;Lo;0;L;;;;;N;;;;; +132AE;EGYPTIAN HIEROGLYPH Q007;Lo;0;L;;;;;N;;;;; +132AF;EGYPTIAN HIEROGLYPH R001;Lo;0;L;;;;;N;;;;; +132B0;EGYPTIAN HIEROGLYPH R002;Lo;0;L;;;;;N;;;;; +132B1;EGYPTIAN HIEROGLYPH R002A;Lo;0;L;;;;;N;;;;; +132B2;EGYPTIAN HIEROGLYPH R003;Lo;0;L;;;;;N;;;;; +132B3;EGYPTIAN HIEROGLYPH R003A;Lo;0;L;;;;;N;;;;; +132B4;EGYPTIAN HIEROGLYPH R003B;Lo;0;L;;;;;N;;;;; +132B5;EGYPTIAN HIEROGLYPH R004;Lo;0;L;;;;;N;;;;; +132B6;EGYPTIAN HIEROGLYPH R005;Lo;0;L;;;;;N;;;;; +132B7;EGYPTIAN HIEROGLYPH R006;Lo;0;L;;;;;N;;;;; +132B8;EGYPTIAN HIEROGLYPH R007;Lo;0;L;;;;;N;;;;; +132B9;EGYPTIAN HIEROGLYPH R008;Lo;0;L;;;;;N;;;;; +132BA;EGYPTIAN HIEROGLYPH R009;Lo;0;L;;;;;N;;;;; +132BB;EGYPTIAN HIEROGLYPH R010;Lo;0;L;;;;;N;;;;; +132BC;EGYPTIAN HIEROGLYPH R010A;Lo;0;L;;;;;N;;;;; +132BD;EGYPTIAN HIEROGLYPH R011;Lo;0;L;;;;;N;;;;; +132BE;EGYPTIAN HIEROGLYPH R012;Lo;0;L;;;;;N;;;;; +132BF;EGYPTIAN HIEROGLYPH R013;Lo;0;L;;;;;N;;;;; +132C0;EGYPTIAN HIEROGLYPH R014;Lo;0;L;;;;;N;;;;; +132C1;EGYPTIAN HIEROGLYPH R015;Lo;0;L;;;;;N;;;;; +132C2;EGYPTIAN HIEROGLYPH R016;Lo;0;L;;;;;N;;;;; +132C3;EGYPTIAN HIEROGLYPH R016A;Lo;0;L;;;;;N;;;;; +132C4;EGYPTIAN HIEROGLYPH R017;Lo;0;L;;;;;N;;;;; +132C5;EGYPTIAN HIEROGLYPH R018;Lo;0;L;;;;;N;;;;; +132C6;EGYPTIAN HIEROGLYPH R019;Lo;0;L;;;;;N;;;;; +132C7;EGYPTIAN HIEROGLYPH R020;Lo;0;L;;;;;N;;;;; +132C8;EGYPTIAN HIEROGLYPH R021;Lo;0;L;;;;;N;;;;; +132C9;EGYPTIAN HIEROGLYPH R022;Lo;0;L;;;;;N;;;;; +132CA;EGYPTIAN HIEROGLYPH R023;Lo;0;L;;;;;N;;;;; +132CB;EGYPTIAN HIEROGLYPH R024;Lo;0;L;;;;;N;;;;; +132CC;EGYPTIAN HIEROGLYPH R025;Lo;0;L;;;;;N;;;;; +132CD;EGYPTIAN HIEROGLYPH R026;Lo;0;L;;;;;N;;;;; +132CE;EGYPTIAN HIEROGLYPH R027;Lo;0;L;;;;;N;;;;; +132CF;EGYPTIAN HIEROGLYPH R028;Lo;0;L;;;;;N;;;;; +132D0;EGYPTIAN HIEROGLYPH R029;Lo;0;L;;;;;N;;;;; +132D1;EGYPTIAN HIEROGLYPH S001;Lo;0;L;;;;;N;;;;; +132D2;EGYPTIAN HIEROGLYPH S002;Lo;0;L;;;;;N;;;;; +132D3;EGYPTIAN HIEROGLYPH S002A;Lo;0;L;;;;;N;;;;; +132D4;EGYPTIAN HIEROGLYPH S003;Lo;0;L;;;;;N;;;;; +132D5;EGYPTIAN HIEROGLYPH S004;Lo;0;L;;;;;N;;;;; +132D6;EGYPTIAN HIEROGLYPH S005;Lo;0;L;;;;;N;;;;; +132D7;EGYPTIAN HIEROGLYPH S006;Lo;0;L;;;;;N;;;;; +132D8;EGYPTIAN HIEROGLYPH S006A;Lo;0;L;;;;;N;;;;; +132D9;EGYPTIAN HIEROGLYPH S007;Lo;0;L;;;;;N;;;;; +132DA;EGYPTIAN HIEROGLYPH S008;Lo;0;L;;;;;N;;;;; +132DB;EGYPTIAN HIEROGLYPH S009;Lo;0;L;;;;;N;;;;; +132DC;EGYPTIAN HIEROGLYPH S010;Lo;0;L;;;;;N;;;;; +132DD;EGYPTIAN HIEROGLYPH S011;Lo;0;L;;;;;N;;;;; +132DE;EGYPTIAN HIEROGLYPH S012;Lo;0;L;;;;;N;;;;; +132DF;EGYPTIAN HIEROGLYPH S013;Lo;0;L;;;;;N;;;;; +132E0;EGYPTIAN HIEROGLYPH S014;Lo;0;L;;;;;N;;;;; +132E1;EGYPTIAN HIEROGLYPH S014A;Lo;0;L;;;;;N;;;;; +132E2;EGYPTIAN HIEROGLYPH S014B;Lo;0;L;;;;;N;;;;; +132E3;EGYPTIAN HIEROGLYPH S015;Lo;0;L;;;;;N;;;;; +132E4;EGYPTIAN HIEROGLYPH S016;Lo;0;L;;;;;N;;;;; +132E5;EGYPTIAN HIEROGLYPH S017;Lo;0;L;;;;;N;;;;; +132E6;EGYPTIAN HIEROGLYPH S017A;Lo;0;L;;;;;N;;;;; +132E7;EGYPTIAN HIEROGLYPH S018;Lo;0;L;;;;;N;;;;; +132E8;EGYPTIAN HIEROGLYPH S019;Lo;0;L;;;;;N;;;;; +132E9;EGYPTIAN HIEROGLYPH S020;Lo;0;L;;;;;N;;;;; +132EA;EGYPTIAN HIEROGLYPH S021;Lo;0;L;;;;;N;;;;; +132EB;EGYPTIAN HIEROGLYPH S022;Lo;0;L;;;;;N;;;;; +132EC;EGYPTIAN HIEROGLYPH S023;Lo;0;L;;;;;N;;;;; +132ED;EGYPTIAN HIEROGLYPH S024;Lo;0;L;;;;;N;;;;; +132EE;EGYPTIAN HIEROGLYPH S025;Lo;0;L;;;;;N;;;;; +132EF;EGYPTIAN HIEROGLYPH S026;Lo;0;L;;;;;N;;;;; +132F0;EGYPTIAN HIEROGLYPH S026A;Lo;0;L;;;;;N;;;;; +132F1;EGYPTIAN HIEROGLYPH S026B;Lo;0;L;;;;;N;;;;; +132F2;EGYPTIAN HIEROGLYPH S027;Lo;0;L;;;;;N;;;;; +132F3;EGYPTIAN HIEROGLYPH S028;Lo;0;L;;;;;N;;;;; +132F4;EGYPTIAN HIEROGLYPH S029;Lo;0;L;;;;;N;;;;; +132F5;EGYPTIAN HIEROGLYPH S030;Lo;0;L;;;;;N;;;;; +132F6;EGYPTIAN HIEROGLYPH S031;Lo;0;L;;;;;N;;;;; +132F7;EGYPTIAN HIEROGLYPH S032;Lo;0;L;;;;;N;;;;; +132F8;EGYPTIAN HIEROGLYPH S033;Lo;0;L;;;;;N;;;;; +132F9;EGYPTIAN HIEROGLYPH S034;Lo;0;L;;;;;N;;;;; +132FA;EGYPTIAN HIEROGLYPH S035;Lo;0;L;;;;;N;;;;; +132FB;EGYPTIAN HIEROGLYPH S035A;Lo;0;L;;;;;N;;;;; +132FC;EGYPTIAN HIEROGLYPH S036;Lo;0;L;;;;;N;;;;; +132FD;EGYPTIAN HIEROGLYPH S037;Lo;0;L;;;;;N;;;;; +132FE;EGYPTIAN HIEROGLYPH S038;Lo;0;L;;;;;N;;;;; +132FF;EGYPTIAN HIEROGLYPH S039;Lo;0;L;;;;;N;;;;; +13300;EGYPTIAN HIEROGLYPH S040;Lo;0;L;;;;;N;;;;; +13301;EGYPTIAN HIEROGLYPH S041;Lo;0;L;;;;;N;;;;; +13302;EGYPTIAN HIEROGLYPH S042;Lo;0;L;;;;;N;;;;; +13303;EGYPTIAN HIEROGLYPH S043;Lo;0;L;;;;;N;;;;; +13304;EGYPTIAN HIEROGLYPH S044;Lo;0;L;;;;;N;;;;; +13305;EGYPTIAN HIEROGLYPH S045;Lo;0;L;;;;;N;;;;; +13306;EGYPTIAN HIEROGLYPH S046;Lo;0;L;;;;;N;;;;; +13307;EGYPTIAN HIEROGLYPH T001;Lo;0;L;;;;;N;;;;; +13308;EGYPTIAN HIEROGLYPH T002;Lo;0;L;;;;;N;;;;; +13309;EGYPTIAN HIEROGLYPH T003;Lo;0;L;;;;;N;;;;; +1330A;EGYPTIAN HIEROGLYPH T003A;Lo;0;L;;;;;N;;;;; +1330B;EGYPTIAN HIEROGLYPH T004;Lo;0;L;;;;;N;;;;; +1330C;EGYPTIAN HIEROGLYPH T005;Lo;0;L;;;;;N;;;;; +1330D;EGYPTIAN HIEROGLYPH T006;Lo;0;L;;;;;N;;;;; +1330E;EGYPTIAN HIEROGLYPH T007;Lo;0;L;;;;;N;;;;; +1330F;EGYPTIAN HIEROGLYPH T007A;Lo;0;L;;;;;N;;;;; +13310;EGYPTIAN HIEROGLYPH T008;Lo;0;L;;;;;N;;;;; +13311;EGYPTIAN HIEROGLYPH T008A;Lo;0;L;;;;;N;;;;; +13312;EGYPTIAN HIEROGLYPH T009;Lo;0;L;;;;;N;;;;; +13313;EGYPTIAN HIEROGLYPH T009A;Lo;0;L;;;;;N;;;;; +13314;EGYPTIAN HIEROGLYPH T010;Lo;0;L;;;;;N;;;;; +13315;EGYPTIAN HIEROGLYPH T011;Lo;0;L;;;;;N;;;;; +13316;EGYPTIAN HIEROGLYPH T011A;Lo;0;L;;;;;N;;;;; +13317;EGYPTIAN HIEROGLYPH T012;Lo;0;L;;;;;N;;;;; +13318;EGYPTIAN HIEROGLYPH T013;Lo;0;L;;;;;N;;;;; +13319;EGYPTIAN HIEROGLYPH T014;Lo;0;L;;;;;N;;;;; +1331A;EGYPTIAN HIEROGLYPH T015;Lo;0;L;;;;;N;;;;; +1331B;EGYPTIAN HIEROGLYPH T016;Lo;0;L;;;;;N;;;;; +1331C;EGYPTIAN HIEROGLYPH T016A;Lo;0;L;;;;;N;;;;; +1331D;EGYPTIAN HIEROGLYPH T017;Lo;0;L;;;;;N;;;;; +1331E;EGYPTIAN HIEROGLYPH T018;Lo;0;L;;;;;N;;;;; +1331F;EGYPTIAN HIEROGLYPH T019;Lo;0;L;;;;;N;;;;; +13320;EGYPTIAN HIEROGLYPH T020;Lo;0;L;;;;;N;;;;; +13321;EGYPTIAN HIEROGLYPH T021;Lo;0;L;;;;;N;;;;; +13322;EGYPTIAN HIEROGLYPH T022;Lo;0;L;;;;;N;;;;; +13323;EGYPTIAN HIEROGLYPH T023;Lo;0;L;;;;;N;;;;; +13324;EGYPTIAN HIEROGLYPH T024;Lo;0;L;;;;;N;;;;; +13325;EGYPTIAN HIEROGLYPH T025;Lo;0;L;;;;;N;;;;; +13326;EGYPTIAN HIEROGLYPH T026;Lo;0;L;;;;;N;;;;; +13327;EGYPTIAN HIEROGLYPH T027;Lo;0;L;;;;;N;;;;; +13328;EGYPTIAN HIEROGLYPH T028;Lo;0;L;;;;;N;;;;; +13329;EGYPTIAN HIEROGLYPH T029;Lo;0;L;;;;;N;;;;; +1332A;EGYPTIAN HIEROGLYPH T030;Lo;0;L;;;;;N;;;;; +1332B;EGYPTIAN HIEROGLYPH T031;Lo;0;L;;;;;N;;;;; +1332C;EGYPTIAN HIEROGLYPH T032;Lo;0;L;;;;;N;;;;; +1332D;EGYPTIAN HIEROGLYPH T032A;Lo;0;L;;;;;N;;;;; +1332E;EGYPTIAN HIEROGLYPH T033;Lo;0;L;;;;;N;;;;; +1332F;EGYPTIAN HIEROGLYPH T033A;Lo;0;L;;;;;N;;;;; +13330;EGYPTIAN HIEROGLYPH T034;Lo;0;L;;;;;N;;;;; +13331;EGYPTIAN HIEROGLYPH T035;Lo;0;L;;;;;N;;;;; +13332;EGYPTIAN HIEROGLYPH T036;Lo;0;L;;;;;N;;;;; +13333;EGYPTIAN HIEROGLYPH U001;Lo;0;L;;;;;N;;;;; +13334;EGYPTIAN HIEROGLYPH U002;Lo;0;L;;;;;N;;;;; +13335;EGYPTIAN HIEROGLYPH U003;Lo;0;L;;;;;N;;;;; +13336;EGYPTIAN HIEROGLYPH U004;Lo;0;L;;;;;N;;;;; +13337;EGYPTIAN HIEROGLYPH U005;Lo;0;L;;;;;N;;;;; +13338;EGYPTIAN HIEROGLYPH U006;Lo;0;L;;;;;N;;;;; +13339;EGYPTIAN HIEROGLYPH U006A;Lo;0;L;;;;;N;;;;; +1333A;EGYPTIAN HIEROGLYPH U006B;Lo;0;L;;;;;N;;;;; +1333B;EGYPTIAN HIEROGLYPH U007;Lo;0;L;;;;;N;;;;; +1333C;EGYPTIAN HIEROGLYPH U008;Lo;0;L;;;;;N;;;;; +1333D;EGYPTIAN HIEROGLYPH U009;Lo;0;L;;;;;N;;;;; +1333E;EGYPTIAN HIEROGLYPH U010;Lo;0;L;;;;;N;;;;; +1333F;EGYPTIAN HIEROGLYPH U011;Lo;0;L;;;;;N;;;;; +13340;EGYPTIAN HIEROGLYPH U012;Lo;0;L;;;;;N;;;;; +13341;EGYPTIAN HIEROGLYPH U013;Lo;0;L;;;;;N;;;;; +13342;EGYPTIAN HIEROGLYPH U014;Lo;0;L;;;;;N;;;;; +13343;EGYPTIAN HIEROGLYPH U015;Lo;0;L;;;;;N;;;;; +13344;EGYPTIAN HIEROGLYPH U016;Lo;0;L;;;;;N;;;;; +13345;EGYPTIAN HIEROGLYPH U017;Lo;0;L;;;;;N;;;;; +13346;EGYPTIAN HIEROGLYPH U018;Lo;0;L;;;;;N;;;;; +13347;EGYPTIAN HIEROGLYPH U019;Lo;0;L;;;;;N;;;;; +13348;EGYPTIAN HIEROGLYPH U020;Lo;0;L;;;;;N;;;;; +13349;EGYPTIAN HIEROGLYPH U021;Lo;0;L;;;;;N;;;;; +1334A;EGYPTIAN HIEROGLYPH U022;Lo;0;L;;;;;N;;;;; +1334B;EGYPTIAN HIEROGLYPH U023;Lo;0;L;;;;;N;;;;; +1334C;EGYPTIAN HIEROGLYPH U023A;Lo;0;L;;;;;N;;;;; +1334D;EGYPTIAN HIEROGLYPH U024;Lo;0;L;;;;;N;;;;; +1334E;EGYPTIAN HIEROGLYPH U025;Lo;0;L;;;;;N;;;;; +1334F;EGYPTIAN HIEROGLYPH U026;Lo;0;L;;;;;N;;;;; +13350;EGYPTIAN HIEROGLYPH U027;Lo;0;L;;;;;N;;;;; +13351;EGYPTIAN HIEROGLYPH U028;Lo;0;L;;;;;N;;;;; +13352;EGYPTIAN HIEROGLYPH U029;Lo;0;L;;;;;N;;;;; +13353;EGYPTIAN HIEROGLYPH U029A;Lo;0;L;;;;;N;;;;; +13354;EGYPTIAN HIEROGLYPH U030;Lo;0;L;;;;;N;;;;; +13355;EGYPTIAN HIEROGLYPH U031;Lo;0;L;;;;;N;;;;; +13356;EGYPTIAN HIEROGLYPH U032;Lo;0;L;;;;;N;;;;; +13357;EGYPTIAN HIEROGLYPH U032A;Lo;0;L;;;;;N;;;;; +13358;EGYPTIAN HIEROGLYPH U033;Lo;0;L;;;;;N;;;;; +13359;EGYPTIAN HIEROGLYPH U034;Lo;0;L;;;;;N;;;;; +1335A;EGYPTIAN HIEROGLYPH U035;Lo;0;L;;;;;N;;;;; +1335B;EGYPTIAN HIEROGLYPH U036;Lo;0;L;;;;;N;;;;; +1335C;EGYPTIAN HIEROGLYPH U037;Lo;0;L;;;;;N;;;;; +1335D;EGYPTIAN HIEROGLYPH U038;Lo;0;L;;;;;N;;;;; +1335E;EGYPTIAN HIEROGLYPH U039;Lo;0;L;;;;;N;;;;; +1335F;EGYPTIAN HIEROGLYPH U040;Lo;0;L;;;;;N;;;;; +13360;EGYPTIAN HIEROGLYPH U041;Lo;0;L;;;;;N;;;;; +13361;EGYPTIAN HIEROGLYPH U042;Lo;0;L;;;;;N;;;;; +13362;EGYPTIAN HIEROGLYPH V001;Lo;0;L;;;;;N;;;;; +13363;EGYPTIAN HIEROGLYPH V001A;Lo;0;L;;;;;N;;;;; +13364;EGYPTIAN HIEROGLYPH V001B;Lo;0;L;;;;;N;;;;; +13365;EGYPTIAN HIEROGLYPH V001C;Lo;0;L;;;;;N;;;;; +13366;EGYPTIAN HIEROGLYPH V001D;Lo;0;L;;;;;N;;;;; +13367;EGYPTIAN HIEROGLYPH V001E;Lo;0;L;;;;;N;;;;; +13368;EGYPTIAN HIEROGLYPH V001F;Lo;0;L;;;;;N;;;;; +13369;EGYPTIAN HIEROGLYPH V001G;Lo;0;L;;;;;N;;;;; +1336A;EGYPTIAN HIEROGLYPH V001H;Lo;0;L;;;;;N;;;;; +1336B;EGYPTIAN HIEROGLYPH V001I;Lo;0;L;;;;;N;;;;; +1336C;EGYPTIAN HIEROGLYPH V002;Lo;0;L;;;;;N;;;;; +1336D;EGYPTIAN HIEROGLYPH V002A;Lo;0;L;;;;;N;;;;; +1336E;EGYPTIAN HIEROGLYPH V003;Lo;0;L;;;;;N;;;;; +1336F;EGYPTIAN HIEROGLYPH V004;Lo;0;L;;;;;N;;;;; +13370;EGYPTIAN HIEROGLYPH V005;Lo;0;L;;;;;N;;;;; +13371;EGYPTIAN HIEROGLYPH V006;Lo;0;L;;;;;N;;;;; +13372;EGYPTIAN HIEROGLYPH V007;Lo;0;L;;;;;N;;;;; +13373;EGYPTIAN HIEROGLYPH V007A;Lo;0;L;;;;;N;;;;; +13374;EGYPTIAN HIEROGLYPH V007B;Lo;0;L;;;;;N;;;;; +13375;EGYPTIAN HIEROGLYPH V008;Lo;0;L;;;;;N;;;;; +13376;EGYPTIAN HIEROGLYPH V009;Lo;0;L;;;;;N;;;;; +13377;EGYPTIAN HIEROGLYPH V010;Lo;0;L;;;;;N;;;;; +13378;EGYPTIAN HIEROGLYPH V011;Lo;0;L;;;;;N;;;;; +13379;EGYPTIAN HIEROGLYPH V011A;Lo;0;L;;;;;N;;;;; +1337A;EGYPTIAN HIEROGLYPH V011B;Lo;0;L;;;;;N;;;;; +1337B;EGYPTIAN HIEROGLYPH V011C;Lo;0;L;;;;;N;;;;; +1337C;EGYPTIAN HIEROGLYPH V012;Lo;0;L;;;;;N;;;;; +1337D;EGYPTIAN HIEROGLYPH V012A;Lo;0;L;;;;;N;;;;; +1337E;EGYPTIAN HIEROGLYPH V012B;Lo;0;L;;;;;N;;;;; +1337F;EGYPTIAN HIEROGLYPH V013;Lo;0;L;;;;;N;;;;; +13380;EGYPTIAN HIEROGLYPH V014;Lo;0;L;;;;;N;;;;; +13381;EGYPTIAN HIEROGLYPH V015;Lo;0;L;;;;;N;;;;; +13382;EGYPTIAN HIEROGLYPH V016;Lo;0;L;;;;;N;;;;; +13383;EGYPTIAN HIEROGLYPH V017;Lo;0;L;;;;;N;;;;; +13384;EGYPTIAN HIEROGLYPH V018;Lo;0;L;;;;;N;;;;; +13385;EGYPTIAN HIEROGLYPH V019;Lo;0;L;;;;;N;;;;; +13386;EGYPTIAN HIEROGLYPH V020;Lo;0;L;;;;;N;;;;; +13387;EGYPTIAN HIEROGLYPH V020A;Lo;0;L;;;;;N;;;;; +13388;EGYPTIAN HIEROGLYPH V020B;Lo;0;L;;;;;N;;;;; +13389;EGYPTIAN HIEROGLYPH V020C;Lo;0;L;;;;;N;;;;; +1338A;EGYPTIAN HIEROGLYPH V020D;Lo;0;L;;;;;N;;;;; +1338B;EGYPTIAN HIEROGLYPH V020E;Lo;0;L;;;;;N;;;;; +1338C;EGYPTIAN HIEROGLYPH V020F;Lo;0;L;;;;;N;;;;; +1338D;EGYPTIAN HIEROGLYPH V020G;Lo;0;L;;;;;N;;;;; +1338E;EGYPTIAN HIEROGLYPH V020H;Lo;0;L;;;;;N;;;;; +1338F;EGYPTIAN HIEROGLYPH V020I;Lo;0;L;;;;;N;;;;; +13390;EGYPTIAN HIEROGLYPH V020J;Lo;0;L;;;;;N;;;;; +13391;EGYPTIAN HIEROGLYPH V020K;Lo;0;L;;;;;N;;;;; +13392;EGYPTIAN HIEROGLYPH V020L;Lo;0;L;;;;;N;;;;; +13393;EGYPTIAN HIEROGLYPH V021;Lo;0;L;;;;;N;;;;; +13394;EGYPTIAN HIEROGLYPH V022;Lo;0;L;;;;;N;;;;; +13395;EGYPTIAN HIEROGLYPH V023;Lo;0;L;;;;;N;;;;; +13396;EGYPTIAN HIEROGLYPH V023A;Lo;0;L;;;;;N;;;;; +13397;EGYPTIAN HIEROGLYPH V024;Lo;0;L;;;;;N;;;;; +13398;EGYPTIAN HIEROGLYPH V025;Lo;0;L;;;;;N;;;;; +13399;EGYPTIAN HIEROGLYPH V026;Lo;0;L;;;;;N;;;;; +1339A;EGYPTIAN HIEROGLYPH V027;Lo;0;L;;;;;N;;;;; +1339B;EGYPTIAN HIEROGLYPH V028;Lo;0;L;;;;;N;;;;; +1339C;EGYPTIAN HIEROGLYPH V028A;Lo;0;L;;;;;N;;;;; +1339D;EGYPTIAN HIEROGLYPH V029;Lo;0;L;;;;;N;;;;; +1339E;EGYPTIAN HIEROGLYPH V029A;Lo;0;L;;;;;N;;;;; +1339F;EGYPTIAN HIEROGLYPH V030;Lo;0;L;;;;;N;;;;; +133A0;EGYPTIAN HIEROGLYPH V030A;Lo;0;L;;;;;N;;;;; +133A1;EGYPTIAN HIEROGLYPH V031;Lo;0;L;;;;;N;;;;; +133A2;EGYPTIAN HIEROGLYPH V031A;Lo;0;L;;;;;N;;;;; +133A3;EGYPTIAN HIEROGLYPH V032;Lo;0;L;;;;;N;;;;; +133A4;EGYPTIAN HIEROGLYPH V033;Lo;0;L;;;;;N;;;;; +133A5;EGYPTIAN HIEROGLYPH V033A;Lo;0;L;;;;;N;;;;; +133A6;EGYPTIAN HIEROGLYPH V034;Lo;0;L;;;;;N;;;;; +133A7;EGYPTIAN HIEROGLYPH V035;Lo;0;L;;;;;N;;;;; +133A8;EGYPTIAN HIEROGLYPH V036;Lo;0;L;;;;;N;;;;; +133A9;EGYPTIAN HIEROGLYPH V037;Lo;0;L;;;;;N;;;;; +133AA;EGYPTIAN HIEROGLYPH V037A;Lo;0;L;;;;;N;;;;; +133AB;EGYPTIAN HIEROGLYPH V038;Lo;0;L;;;;;N;;;;; +133AC;EGYPTIAN HIEROGLYPH V039;Lo;0;L;;;;;N;;;;; +133AD;EGYPTIAN HIEROGLYPH V040;Lo;0;L;;;;;N;;;;; +133AE;EGYPTIAN HIEROGLYPH V040A;Lo;0;L;;;;;N;;;;; +133AF;EGYPTIAN HIEROGLYPH W001;Lo;0;L;;;;;N;;;;; +133B0;EGYPTIAN HIEROGLYPH W002;Lo;0;L;;;;;N;;;;; +133B1;EGYPTIAN HIEROGLYPH W003;Lo;0;L;;;;;N;;;;; +133B2;EGYPTIAN HIEROGLYPH W003A;Lo;0;L;;;;;N;;;;; +133B3;EGYPTIAN HIEROGLYPH W004;Lo;0;L;;;;;N;;;;; +133B4;EGYPTIAN HIEROGLYPH W005;Lo;0;L;;;;;N;;;;; +133B5;EGYPTIAN HIEROGLYPH W006;Lo;0;L;;;;;N;;;;; +133B6;EGYPTIAN HIEROGLYPH W007;Lo;0;L;;;;;N;;;;; +133B7;EGYPTIAN HIEROGLYPH W008;Lo;0;L;;;;;N;;;;; +133B8;EGYPTIAN HIEROGLYPH W009;Lo;0;L;;;;;N;;;;; +133B9;EGYPTIAN HIEROGLYPH W009A;Lo;0;L;;;;;N;;;;; +133BA;EGYPTIAN HIEROGLYPH W010;Lo;0;L;;;;;N;;;;; +133BB;EGYPTIAN HIEROGLYPH W010A;Lo;0;L;;;;;N;;;;; +133BC;EGYPTIAN HIEROGLYPH W011;Lo;0;L;;;;;N;;;;; +133BD;EGYPTIAN HIEROGLYPH W012;Lo;0;L;;;;;N;;;;; +133BE;EGYPTIAN HIEROGLYPH W013;Lo;0;L;;;;;N;;;;; +133BF;EGYPTIAN HIEROGLYPH W014;Lo;0;L;;;;;N;;;;; +133C0;EGYPTIAN HIEROGLYPH W014A;Lo;0;L;;;;;N;;;;; +133C1;EGYPTIAN HIEROGLYPH W015;Lo;0;L;;;;;N;;;;; +133C2;EGYPTIAN HIEROGLYPH W016;Lo;0;L;;;;;N;;;;; +133C3;EGYPTIAN HIEROGLYPH W017;Lo;0;L;;;;;N;;;;; +133C4;EGYPTIAN HIEROGLYPH W017A;Lo;0;L;;;;;N;;;;; +133C5;EGYPTIAN HIEROGLYPH W018;Lo;0;L;;;;;N;;;;; +133C6;EGYPTIAN HIEROGLYPH W018A;Lo;0;L;;;;;N;;;;; +133C7;EGYPTIAN HIEROGLYPH W019;Lo;0;L;;;;;N;;;;; +133C8;EGYPTIAN HIEROGLYPH W020;Lo;0;L;;;;;N;;;;; +133C9;EGYPTIAN HIEROGLYPH W021;Lo;0;L;;;;;N;;;;; +133CA;EGYPTIAN HIEROGLYPH W022;Lo;0;L;;;;;N;;;;; +133CB;EGYPTIAN HIEROGLYPH W023;Lo;0;L;;;;;N;;;;; +133CC;EGYPTIAN HIEROGLYPH W024;Lo;0;L;;;;;N;;;;; +133CD;EGYPTIAN HIEROGLYPH W024A;Lo;0;L;;;;;N;;;;; +133CE;EGYPTIAN HIEROGLYPH W025;Lo;0;L;;;;;N;;;;; +133CF;EGYPTIAN HIEROGLYPH X001;Lo;0;L;;;;;N;;;;; +133D0;EGYPTIAN HIEROGLYPH X002;Lo;0;L;;;;;N;;;;; +133D1;EGYPTIAN HIEROGLYPH X003;Lo;0;L;;;;;N;;;;; +133D2;EGYPTIAN HIEROGLYPH X004;Lo;0;L;;;;;N;;;;; +133D3;EGYPTIAN HIEROGLYPH X004A;Lo;0;L;;;;;N;;;;; +133D4;EGYPTIAN HIEROGLYPH X004B;Lo;0;L;;;;;N;;;;; +133D5;EGYPTIAN HIEROGLYPH X005;Lo;0;L;;;;;N;;;;; +133D6;EGYPTIAN HIEROGLYPH X006;Lo;0;L;;;;;N;;;;; +133D7;EGYPTIAN HIEROGLYPH X006A;Lo;0;L;;;;;N;;;;; +133D8;EGYPTIAN HIEROGLYPH X007;Lo;0;L;;;;;N;;;;; +133D9;EGYPTIAN HIEROGLYPH X008;Lo;0;L;;;;;N;;;;; +133DA;EGYPTIAN HIEROGLYPH X008A;Lo;0;L;;;;;N;;;;; +133DB;EGYPTIAN HIEROGLYPH Y001;Lo;0;L;;;;;N;;;;; +133DC;EGYPTIAN HIEROGLYPH Y001A;Lo;0;L;;;;;N;;;;; +133DD;EGYPTIAN HIEROGLYPH Y002;Lo;0;L;;;;;N;;;;; +133DE;EGYPTIAN HIEROGLYPH Y003;Lo;0;L;;;;;N;;;;; +133DF;EGYPTIAN HIEROGLYPH Y004;Lo;0;L;;;;;N;;;;; +133E0;EGYPTIAN HIEROGLYPH Y005;Lo;0;L;;;;;N;;;;; +133E1;EGYPTIAN HIEROGLYPH Y006;Lo;0;L;;;;;N;;;;; +133E2;EGYPTIAN HIEROGLYPH Y007;Lo;0;L;;;;;N;;;;; +133E3;EGYPTIAN HIEROGLYPH Y008;Lo;0;L;;;;;N;;;;; +133E4;EGYPTIAN HIEROGLYPH Z001;Lo;0;L;;;;;N;;;;; +133E5;EGYPTIAN HIEROGLYPH Z002;Lo;0;L;;;;;N;;;;; +133E6;EGYPTIAN HIEROGLYPH Z002A;Lo;0;L;;;;;N;;;;; +133E7;EGYPTIAN HIEROGLYPH Z002B;Lo;0;L;;;;;N;;;;; +133E8;EGYPTIAN HIEROGLYPH Z002C;Lo;0;L;;;;;N;;;;; +133E9;EGYPTIAN HIEROGLYPH Z002D;Lo;0;L;;;;;N;;;;; +133EA;EGYPTIAN HIEROGLYPH Z003;Lo;0;L;;;;;N;;;;; +133EB;EGYPTIAN HIEROGLYPH Z003A;Lo;0;L;;;;;N;;;;; +133EC;EGYPTIAN HIEROGLYPH Z003B;Lo;0;L;;;;;N;;;;; +133ED;EGYPTIAN HIEROGLYPH Z004;Lo;0;L;;;;;N;;;;; +133EE;EGYPTIAN HIEROGLYPH Z004A;Lo;0;L;;;;;N;;;;; +133EF;EGYPTIAN HIEROGLYPH Z005;Lo;0;L;;;;;N;;;;; +133F0;EGYPTIAN HIEROGLYPH Z005A;Lo;0;L;;;;;N;;;;; +133F1;EGYPTIAN HIEROGLYPH Z006;Lo;0;L;;;;;N;;;;; +133F2;EGYPTIAN HIEROGLYPH Z007;Lo;0;L;;;;;N;;;;; +133F3;EGYPTIAN HIEROGLYPH Z008;Lo;0;L;;;;;N;;;;; +133F4;EGYPTIAN HIEROGLYPH Z009;Lo;0;L;;;;;N;;;;; +133F5;EGYPTIAN HIEROGLYPH Z010;Lo;0;L;;;;;N;;;;; +133F6;EGYPTIAN HIEROGLYPH Z011;Lo;0;L;;;;;N;;;;; +133F7;EGYPTIAN HIEROGLYPH Z012;Lo;0;L;;;;;N;;;;; +133F8;EGYPTIAN HIEROGLYPH Z013;Lo;0;L;;;;;N;;;;; +133F9;EGYPTIAN HIEROGLYPH Z014;Lo;0;L;;;;;N;;;;; +133FA;EGYPTIAN HIEROGLYPH Z015;Lo;0;L;;;;;N;;;;; +133FB;EGYPTIAN HIEROGLYPH Z015A;Lo;0;L;;;;;N;;;;; +133FC;EGYPTIAN HIEROGLYPH Z015B;Lo;0;L;;;;;N;;;;; +133FD;EGYPTIAN HIEROGLYPH Z015C;Lo;0;L;;;;;N;;;;; +133FE;EGYPTIAN HIEROGLYPH Z015D;Lo;0;L;;;;;N;;;;; +133FF;EGYPTIAN HIEROGLYPH Z015E;Lo;0;L;;;;;N;;;;; +13400;EGYPTIAN HIEROGLYPH Z015F;Lo;0;L;;;;;N;;;;; +13401;EGYPTIAN HIEROGLYPH Z015G;Lo;0;L;;;;;N;;;;; +13402;EGYPTIAN HIEROGLYPH Z015H;Lo;0;L;;;;;N;;;;; +13403;EGYPTIAN HIEROGLYPH Z015I;Lo;0;L;;;;;N;;;;; +13404;EGYPTIAN HIEROGLYPH Z016;Lo;0;L;;;;;N;;;;; +13405;EGYPTIAN HIEROGLYPH Z016A;Lo;0;L;;;;;N;;;;; +13406;EGYPTIAN HIEROGLYPH Z016B;Lo;0;L;;;;;N;;;;; +13407;EGYPTIAN HIEROGLYPH Z016C;Lo;0;L;;;;;N;;;;; +13408;EGYPTIAN HIEROGLYPH Z016D;Lo;0;L;;;;;N;;;;; +13409;EGYPTIAN HIEROGLYPH Z016E;Lo;0;L;;;;;N;;;;; +1340A;EGYPTIAN HIEROGLYPH Z016F;Lo;0;L;;;;;N;;;;; +1340B;EGYPTIAN HIEROGLYPH Z016G;Lo;0;L;;;;;N;;;;; +1340C;EGYPTIAN HIEROGLYPH Z016H;Lo;0;L;;;;;N;;;;; +1340D;EGYPTIAN HIEROGLYPH AA001;Lo;0;L;;;;;N;;;;; +1340E;EGYPTIAN HIEROGLYPH AA002;Lo;0;L;;;;;N;;;;; +1340F;EGYPTIAN HIEROGLYPH AA003;Lo;0;L;;;;;N;;;;; +13410;EGYPTIAN HIEROGLYPH AA004;Lo;0;L;;;;;N;;;;; +13411;EGYPTIAN HIEROGLYPH AA005;Lo;0;L;;;;;N;;;;; +13412;EGYPTIAN HIEROGLYPH AA006;Lo;0;L;;;;;N;;;;; +13413;EGYPTIAN HIEROGLYPH AA007;Lo;0;L;;;;;N;;;;; +13414;EGYPTIAN HIEROGLYPH AA007A;Lo;0;L;;;;;N;;;;; +13415;EGYPTIAN HIEROGLYPH AA007B;Lo;0;L;;;;;N;;;;; +13416;EGYPTIAN HIEROGLYPH AA008;Lo;0;L;;;;;N;;;;; +13417;EGYPTIAN HIEROGLYPH AA009;Lo;0;L;;;;;N;;;;; +13418;EGYPTIAN HIEROGLYPH AA010;Lo;0;L;;;;;N;;;;; +13419;EGYPTIAN HIEROGLYPH AA011;Lo;0;L;;;;;N;;;;; +1341A;EGYPTIAN HIEROGLYPH AA012;Lo;0;L;;;;;N;;;;; +1341B;EGYPTIAN HIEROGLYPH AA013;Lo;0;L;;;;;N;;;;; +1341C;EGYPTIAN HIEROGLYPH AA014;Lo;0;L;;;;;N;;;;; +1341D;EGYPTIAN HIEROGLYPH AA015;Lo;0;L;;;;;N;;;;; +1341E;EGYPTIAN HIEROGLYPH AA016;Lo;0;L;;;;;N;;;;; +1341F;EGYPTIAN HIEROGLYPH AA017;Lo;0;L;;;;;N;;;;; +13420;EGYPTIAN HIEROGLYPH AA018;Lo;0;L;;;;;N;;;;; +13421;EGYPTIAN HIEROGLYPH AA019;Lo;0;L;;;;;N;;;;; +13422;EGYPTIAN HIEROGLYPH AA020;Lo;0;L;;;;;N;;;;; +13423;EGYPTIAN HIEROGLYPH AA021;Lo;0;L;;;;;N;;;;; +13424;EGYPTIAN HIEROGLYPH AA022;Lo;0;L;;;;;N;;;;; +13425;EGYPTIAN HIEROGLYPH AA023;Lo;0;L;;;;;N;;;;; +13426;EGYPTIAN HIEROGLYPH AA024;Lo;0;L;;;;;N;;;;; +13427;EGYPTIAN HIEROGLYPH AA025;Lo;0;L;;;;;N;;;;; +13428;EGYPTIAN HIEROGLYPH AA026;Lo;0;L;;;;;N;;;;; +13429;EGYPTIAN HIEROGLYPH AA027;Lo;0;L;;;;;N;;;;; +1342A;EGYPTIAN HIEROGLYPH AA028;Lo;0;L;;;;;N;;;;; +1342B;EGYPTIAN HIEROGLYPH AA029;Lo;0;L;;;;;N;;;;; +1342C;EGYPTIAN HIEROGLYPH AA030;Lo;0;L;;;;;N;;;;; +1342D;EGYPTIAN HIEROGLYPH AA031;Lo;0;L;;;;;N;;;;; +1342E;EGYPTIAN HIEROGLYPH AA032;Lo;0;L;;;;;N;;;;; +13430;EGYPTIAN HIEROGLYPH VERTICAL JOINER;Cf;0;L;;;;;N;;;;; +13431;EGYPTIAN HIEROGLYPH HORIZONTAL JOINER;Cf;0;L;;;;;N;;;;; +13432;EGYPTIAN HIEROGLYPH INSERT AT TOP START;Cf;0;L;;;;;N;;;;; +13433;EGYPTIAN HIEROGLYPH INSERT AT BOTTOM START;Cf;0;L;;;;;N;;;;; +13434;EGYPTIAN HIEROGLYPH INSERT AT TOP END;Cf;0;L;;;;;N;;;;; +13435;EGYPTIAN HIEROGLYPH INSERT AT BOTTOM END;Cf;0;L;;;;;N;;;;; +13436;EGYPTIAN HIEROGLYPH OVERLAY MIDDLE;Cf;0;L;;;;;N;;;;; +13437;EGYPTIAN HIEROGLYPH BEGIN SEGMENT;Cf;0;L;;;;;N;;;;; +13438;EGYPTIAN HIEROGLYPH END SEGMENT;Cf;0;L;;;;;N;;;;; +14400;ANATOLIAN HIEROGLYPH A001;Lo;0;L;;;;;N;;;;; +14401;ANATOLIAN HIEROGLYPH A002;Lo;0;L;;;;;N;;;;; +14402;ANATOLIAN HIEROGLYPH A003;Lo;0;L;;;;;N;;;;; +14403;ANATOLIAN HIEROGLYPH A004;Lo;0;L;;;;;N;;;;; +14404;ANATOLIAN HIEROGLYPH A005;Lo;0;L;;;;;N;;;;; +14405;ANATOLIAN HIEROGLYPH A006;Lo;0;L;;;;;N;;;;; +14406;ANATOLIAN HIEROGLYPH A007;Lo;0;L;;;;;N;;;;; +14407;ANATOLIAN HIEROGLYPH A008;Lo;0;L;;;;;N;;;;; +14408;ANATOLIAN HIEROGLYPH A009;Lo;0;L;;;;;N;;;;; +14409;ANATOLIAN HIEROGLYPH A010;Lo;0;L;;;;;N;;;;; +1440A;ANATOLIAN HIEROGLYPH A010A;Lo;0;L;;;;;N;;;;; +1440B;ANATOLIAN HIEROGLYPH A011;Lo;0;L;;;;;N;;;;; +1440C;ANATOLIAN HIEROGLYPH A012;Lo;0;L;;;;;N;;;;; +1440D;ANATOLIAN HIEROGLYPH A013;Lo;0;L;;;;;N;;;;; +1440E;ANATOLIAN HIEROGLYPH A014;Lo;0;L;;;;;N;;;;; +1440F;ANATOLIAN HIEROGLYPH A015;Lo;0;L;;;;;N;;;;; +14410;ANATOLIAN HIEROGLYPH A016;Lo;0;L;;;;;N;;;;; +14411;ANATOLIAN HIEROGLYPH A017;Lo;0;L;;;;;N;;;;; +14412;ANATOLIAN HIEROGLYPH A018;Lo;0;L;;;;;N;;;;; +14413;ANATOLIAN HIEROGLYPH A019;Lo;0;L;;;;;N;;;;; +14414;ANATOLIAN HIEROGLYPH A020;Lo;0;L;;;;;N;;;;; +14415;ANATOLIAN HIEROGLYPH A021;Lo;0;L;;;;;N;;;;; +14416;ANATOLIAN HIEROGLYPH A022;Lo;0;L;;;;;N;;;;; +14417;ANATOLIAN HIEROGLYPH A023;Lo;0;L;;;;;N;;;;; +14418;ANATOLIAN HIEROGLYPH A024;Lo;0;L;;;;;N;;;;; +14419;ANATOLIAN HIEROGLYPH A025;Lo;0;L;;;;;N;;;;; +1441A;ANATOLIAN HIEROGLYPH A026;Lo;0;L;;;;;N;;;;; +1441B;ANATOLIAN HIEROGLYPH A026A;Lo;0;L;;;;;N;;;;; +1441C;ANATOLIAN HIEROGLYPH A027;Lo;0;L;;;;;N;;;;; +1441D;ANATOLIAN HIEROGLYPH A028;Lo;0;L;;;;;N;;;;; +1441E;ANATOLIAN HIEROGLYPH A029;Lo;0;L;;;;;N;;;;; +1441F;ANATOLIAN HIEROGLYPH A030;Lo;0;L;;;;;N;;;;; +14420;ANATOLIAN HIEROGLYPH A031;Lo;0;L;;;;;N;;;;; +14421;ANATOLIAN HIEROGLYPH A032;Lo;0;L;;;;;N;;;;; +14422;ANATOLIAN HIEROGLYPH A033;Lo;0;L;;;;;N;;;;; +14423;ANATOLIAN HIEROGLYPH A034;Lo;0;L;;;;;N;;;;; +14424;ANATOLIAN HIEROGLYPH A035;Lo;0;L;;;;;N;;;;; +14425;ANATOLIAN HIEROGLYPH A036;Lo;0;L;;;;;N;;;;; +14426;ANATOLIAN HIEROGLYPH A037;Lo;0;L;;;;;N;;;;; +14427;ANATOLIAN HIEROGLYPH A038;Lo;0;L;;;;;N;;;;; +14428;ANATOLIAN HIEROGLYPH A039;Lo;0;L;;;;;N;;;;; +14429;ANATOLIAN HIEROGLYPH A039A;Lo;0;L;;;;;N;;;;; +1442A;ANATOLIAN HIEROGLYPH A040;Lo;0;L;;;;;N;;;;; +1442B;ANATOLIAN HIEROGLYPH A041;Lo;0;L;;;;;N;;;;; +1442C;ANATOLIAN HIEROGLYPH A041A;Lo;0;L;;;;;N;;;;; +1442D;ANATOLIAN HIEROGLYPH A042;Lo;0;L;;;;;N;;;;; +1442E;ANATOLIAN HIEROGLYPH A043;Lo;0;L;;;;;N;;;;; +1442F;ANATOLIAN HIEROGLYPH A044;Lo;0;L;;;;;N;;;;; +14430;ANATOLIAN HIEROGLYPH A045;Lo;0;L;;;;;N;;;;; +14431;ANATOLIAN HIEROGLYPH A045A;Lo;0;L;;;;;N;;;;; +14432;ANATOLIAN HIEROGLYPH A046;Lo;0;L;;;;;N;;;;; +14433;ANATOLIAN HIEROGLYPH A046A;Lo;0;L;;;;;N;;;;; +14434;ANATOLIAN HIEROGLYPH A046B;Lo;0;L;;;;;N;;;;; +14435;ANATOLIAN HIEROGLYPH A047;Lo;0;L;;;;;N;;;;; +14436;ANATOLIAN HIEROGLYPH A048;Lo;0;L;;;;;N;;;;; +14437;ANATOLIAN HIEROGLYPH A049;Lo;0;L;;;;;N;;;;; +14438;ANATOLIAN HIEROGLYPH A050;Lo;0;L;;;;;N;;;;; +14439;ANATOLIAN HIEROGLYPH A051;Lo;0;L;;;;;N;;;;; +1443A;ANATOLIAN HIEROGLYPH A052;Lo;0;L;;;;;N;;;;; +1443B;ANATOLIAN HIEROGLYPH A053;Lo;0;L;;;;;N;;;;; +1443C;ANATOLIAN HIEROGLYPH A054;Lo;0;L;;;;;N;;;;; +1443D;ANATOLIAN HIEROGLYPH A055;Lo;0;L;;;;;N;;;;; +1443E;ANATOLIAN HIEROGLYPH A056;Lo;0;L;;;;;N;;;;; +1443F;ANATOLIAN HIEROGLYPH A057;Lo;0;L;;;;;N;;;;; +14440;ANATOLIAN HIEROGLYPH A058;Lo;0;L;;;;;N;;;;; +14441;ANATOLIAN HIEROGLYPH A059;Lo;0;L;;;;;N;;;;; +14442;ANATOLIAN HIEROGLYPH A060;Lo;0;L;;;;;N;;;;; +14443;ANATOLIAN HIEROGLYPH A061;Lo;0;L;;;;;N;;;;; +14444;ANATOLIAN HIEROGLYPH A062;Lo;0;L;;;;;N;;;;; +14445;ANATOLIAN HIEROGLYPH A063;Lo;0;L;;;;;N;;;;; +14446;ANATOLIAN HIEROGLYPH A064;Lo;0;L;;;;;N;;;;; +14447;ANATOLIAN HIEROGLYPH A065;Lo;0;L;;;;;N;;;;; +14448;ANATOLIAN HIEROGLYPH A066;Lo;0;L;;;;;N;;;;; +14449;ANATOLIAN HIEROGLYPH A066A;Lo;0;L;;;;;N;;;;; +1444A;ANATOLIAN HIEROGLYPH A066B;Lo;0;L;;;;;N;;;;; +1444B;ANATOLIAN HIEROGLYPH A066C;Lo;0;L;;;;;N;;;;; +1444C;ANATOLIAN HIEROGLYPH A067;Lo;0;L;;;;;N;;;;; +1444D;ANATOLIAN HIEROGLYPH A068;Lo;0;L;;;;;N;;;;; +1444E;ANATOLIAN HIEROGLYPH A069;Lo;0;L;;;;;N;;;;; +1444F;ANATOLIAN HIEROGLYPH A070;Lo;0;L;;;;;N;;;;; +14450;ANATOLIAN HIEROGLYPH A071;Lo;0;L;;;;;N;;;;; +14451;ANATOLIAN HIEROGLYPH A072;Lo;0;L;;;;;N;;;;; +14452;ANATOLIAN HIEROGLYPH A073;Lo;0;L;;;;;N;;;;; +14453;ANATOLIAN HIEROGLYPH A074;Lo;0;L;;;;;N;;;;; +14454;ANATOLIAN HIEROGLYPH A075;Lo;0;L;;;;;N;;;;; +14455;ANATOLIAN HIEROGLYPH A076;Lo;0;L;;;;;N;;;;; +14456;ANATOLIAN HIEROGLYPH A077;Lo;0;L;;;;;N;;;;; +14457;ANATOLIAN HIEROGLYPH A078;Lo;0;L;;;;;N;;;;; +14458;ANATOLIAN HIEROGLYPH A079;Lo;0;L;;;;;N;;;;; +14459;ANATOLIAN HIEROGLYPH A080;Lo;0;L;;;;;N;;;;; +1445A;ANATOLIAN HIEROGLYPH A081;Lo;0;L;;;;;N;;;;; +1445B;ANATOLIAN HIEROGLYPH A082;Lo;0;L;;;;;N;;;;; +1445C;ANATOLIAN HIEROGLYPH A083;Lo;0;L;;;;;N;;;;; +1445D;ANATOLIAN HIEROGLYPH A084;Lo;0;L;;;;;N;;;;; +1445E;ANATOLIAN HIEROGLYPH A085;Lo;0;L;;;;;N;;;;; +1445F;ANATOLIAN HIEROGLYPH A086;Lo;0;L;;;;;N;;;;; +14460;ANATOLIAN HIEROGLYPH A087;Lo;0;L;;;;;N;;;;; +14461;ANATOLIAN HIEROGLYPH A088;Lo;0;L;;;;;N;;;;; +14462;ANATOLIAN HIEROGLYPH A089;Lo;0;L;;;;;N;;;;; +14463;ANATOLIAN HIEROGLYPH A090;Lo;0;L;;;;;N;;;;; +14464;ANATOLIAN HIEROGLYPH A091;Lo;0;L;;;;;N;;;;; +14465;ANATOLIAN HIEROGLYPH A092;Lo;0;L;;;;;N;;;;; +14466;ANATOLIAN HIEROGLYPH A093;Lo;0;L;;;;;N;;;;; +14467;ANATOLIAN HIEROGLYPH A094;Lo;0;L;;;;;N;;;;; +14468;ANATOLIAN HIEROGLYPH A095;Lo;0;L;;;;;N;;;;; +14469;ANATOLIAN HIEROGLYPH A096;Lo;0;L;;;;;N;;;;; +1446A;ANATOLIAN HIEROGLYPH A097;Lo;0;L;;;;;N;;;;; +1446B;ANATOLIAN HIEROGLYPH A097A;Lo;0;L;;;;;N;;;;; +1446C;ANATOLIAN HIEROGLYPH A098;Lo;0;L;;;;;N;;;;; +1446D;ANATOLIAN HIEROGLYPH A098A;Lo;0;L;;;;;N;;;;; +1446E;ANATOLIAN HIEROGLYPH A099;Lo;0;L;;;;;N;;;;; +1446F;ANATOLIAN HIEROGLYPH A100;Lo;0;L;;;;;N;;;;; +14470;ANATOLIAN HIEROGLYPH A100A;Lo;0;L;;;;;N;;;;; +14471;ANATOLIAN HIEROGLYPH A101;Lo;0;L;;;;;N;;;;; +14472;ANATOLIAN HIEROGLYPH A101A;Lo;0;L;;;;;N;;;;; +14473;ANATOLIAN HIEROGLYPH A102;Lo;0;L;;;;;N;;;;; +14474;ANATOLIAN HIEROGLYPH A102A;Lo;0;L;;;;;N;;;;; +14475;ANATOLIAN HIEROGLYPH A103;Lo;0;L;;;;;N;;;;; +14476;ANATOLIAN HIEROGLYPH A104;Lo;0;L;;;;;N;;;;; +14477;ANATOLIAN HIEROGLYPH A104A;Lo;0;L;;;;;N;;;;; +14478;ANATOLIAN HIEROGLYPH A104B;Lo;0;L;;;;;N;;;;; +14479;ANATOLIAN HIEROGLYPH A104C;Lo;0;L;;;;;N;;;;; +1447A;ANATOLIAN HIEROGLYPH A105;Lo;0;L;;;;;N;;;;; +1447B;ANATOLIAN HIEROGLYPH A105A;Lo;0;L;;;;;N;;;;; +1447C;ANATOLIAN HIEROGLYPH A105B;Lo;0;L;;;;;N;;;;; +1447D;ANATOLIAN HIEROGLYPH A106;Lo;0;L;;;;;N;;;;; +1447E;ANATOLIAN HIEROGLYPH A107;Lo;0;L;;;;;N;;;;; +1447F;ANATOLIAN HIEROGLYPH A107A;Lo;0;L;;;;;N;;;;; +14480;ANATOLIAN HIEROGLYPH A107B;Lo;0;L;;;;;N;;;;; +14481;ANATOLIAN HIEROGLYPH A107C;Lo;0;L;;;;;N;;;;; +14482;ANATOLIAN HIEROGLYPH A108;Lo;0;L;;;;;N;;;;; +14483;ANATOLIAN HIEROGLYPH A109;Lo;0;L;;;;;N;;;;; +14484;ANATOLIAN HIEROGLYPH A110;Lo;0;L;;;;;N;;;;; +14485;ANATOLIAN HIEROGLYPH A110A;Lo;0;L;;;;;N;;;;; +14486;ANATOLIAN HIEROGLYPH A110B;Lo;0;L;;;;;N;;;;; +14487;ANATOLIAN HIEROGLYPH A111;Lo;0;L;;;;;N;;;;; +14488;ANATOLIAN HIEROGLYPH A112;Lo;0;L;;;;;N;;;;; +14489;ANATOLIAN HIEROGLYPH A113;Lo;0;L;;;;;N;;;;; +1448A;ANATOLIAN HIEROGLYPH A114;Lo;0;L;;;;;N;;;;; +1448B;ANATOLIAN HIEROGLYPH A115;Lo;0;L;;;;;N;;;;; +1448C;ANATOLIAN HIEROGLYPH A115A;Lo;0;L;;;;;N;;;;; +1448D;ANATOLIAN HIEROGLYPH A116;Lo;0;L;;;;;N;;;;; +1448E;ANATOLIAN HIEROGLYPH A117;Lo;0;L;;;;;N;;;;; +1448F;ANATOLIAN HIEROGLYPH A118;Lo;0;L;;;;;N;;;;; +14490;ANATOLIAN HIEROGLYPH A119;Lo;0;L;;;;;N;;;;; +14491;ANATOLIAN HIEROGLYPH A120;Lo;0;L;;;;;N;;;;; +14492;ANATOLIAN HIEROGLYPH A121;Lo;0;L;;;;;N;;;;; +14493;ANATOLIAN HIEROGLYPH A122;Lo;0;L;;;;;N;;;;; +14494;ANATOLIAN HIEROGLYPH A123;Lo;0;L;;;;;N;;;;; +14495;ANATOLIAN HIEROGLYPH A124;Lo;0;L;;;;;N;;;;; +14496;ANATOLIAN HIEROGLYPH A125;Lo;0;L;;;;;N;;;;; +14497;ANATOLIAN HIEROGLYPH A125A;Lo;0;L;;;;;N;;;;; +14498;ANATOLIAN HIEROGLYPH A126;Lo;0;L;;;;;N;;;;; +14499;ANATOLIAN HIEROGLYPH A127;Lo;0;L;;;;;N;;;;; +1449A;ANATOLIAN HIEROGLYPH A128;Lo;0;L;;;;;N;;;;; +1449B;ANATOLIAN HIEROGLYPH A129;Lo;0;L;;;;;N;;;;; +1449C;ANATOLIAN HIEROGLYPH A130;Lo;0;L;;;;;N;;;;; +1449D;ANATOLIAN HIEROGLYPH A131;Lo;0;L;;;;;N;;;;; +1449E;ANATOLIAN HIEROGLYPH A132;Lo;0;L;;;;;N;;;;; +1449F;ANATOLIAN HIEROGLYPH A133;Lo;0;L;;;;;N;;;;; +144A0;ANATOLIAN HIEROGLYPH A134;Lo;0;L;;;;;N;;;;; +144A1;ANATOLIAN HIEROGLYPH A135;Lo;0;L;;;;;N;;;;; +144A2;ANATOLIAN HIEROGLYPH A135A;Lo;0;L;;;;;N;;;;; +144A3;ANATOLIAN HIEROGLYPH A136;Lo;0;L;;;;;N;;;;; +144A4;ANATOLIAN HIEROGLYPH A137;Lo;0;L;;;;;N;;;;; +144A5;ANATOLIAN HIEROGLYPH A138;Lo;0;L;;;;;N;;;;; +144A6;ANATOLIAN HIEROGLYPH A139;Lo;0;L;;;;;N;;;;; +144A7;ANATOLIAN HIEROGLYPH A140;Lo;0;L;;;;;N;;;;; +144A8;ANATOLIAN HIEROGLYPH A141;Lo;0;L;;;;;N;;;;; +144A9;ANATOLIAN HIEROGLYPH A142;Lo;0;L;;;;;N;;;;; +144AA;ANATOLIAN HIEROGLYPH A143;Lo;0;L;;;;;N;;;;; +144AB;ANATOLIAN HIEROGLYPH A144;Lo;0;L;;;;;N;;;;; +144AC;ANATOLIAN HIEROGLYPH A145;Lo;0;L;;;;;N;;;;; +144AD;ANATOLIAN HIEROGLYPH A146;Lo;0;L;;;;;N;;;;; +144AE;ANATOLIAN HIEROGLYPH A147;Lo;0;L;;;;;N;;;;; +144AF;ANATOLIAN HIEROGLYPH A148;Lo;0;L;;;;;N;;;;; +144B0;ANATOLIAN HIEROGLYPH A149;Lo;0;L;;;;;N;;;;; +144B1;ANATOLIAN HIEROGLYPH A150;Lo;0;L;;;;;N;;;;; +144B2;ANATOLIAN HIEROGLYPH A151;Lo;0;L;;;;;N;;;;; +144B3;ANATOLIAN HIEROGLYPH A152;Lo;0;L;;;;;N;;;;; +144B4;ANATOLIAN HIEROGLYPH A153;Lo;0;L;;;;;N;;;;; +144B5;ANATOLIAN HIEROGLYPH A154;Lo;0;L;;;;;N;;;;; +144B6;ANATOLIAN HIEROGLYPH A155;Lo;0;L;;;;;N;;;;; +144B7;ANATOLIAN HIEROGLYPH A156;Lo;0;L;;;;;N;;;;; +144B8;ANATOLIAN HIEROGLYPH A157;Lo;0;L;;;;;N;;;;; +144B9;ANATOLIAN HIEROGLYPH A158;Lo;0;L;;;;;N;;;;; +144BA;ANATOLIAN HIEROGLYPH A159;Lo;0;L;;;;;N;;;;; +144BB;ANATOLIAN HIEROGLYPH A160;Lo;0;L;;;;;N;;;;; +144BC;ANATOLIAN HIEROGLYPH A161;Lo;0;L;;;;;N;;;;; +144BD;ANATOLIAN HIEROGLYPH A162;Lo;0;L;;;;;N;;;;; +144BE;ANATOLIAN HIEROGLYPH A163;Lo;0;L;;;;;N;;;;; +144BF;ANATOLIAN HIEROGLYPH A164;Lo;0;L;;;;;N;;;;; +144C0;ANATOLIAN HIEROGLYPH A165;Lo;0;L;;;;;N;;;;; +144C1;ANATOLIAN HIEROGLYPH A166;Lo;0;L;;;;;N;;;;; +144C2;ANATOLIAN HIEROGLYPH A167;Lo;0;L;;;;;N;;;;; +144C3;ANATOLIAN HIEROGLYPH A168;Lo;0;L;;;;;N;;;;; +144C4;ANATOLIAN HIEROGLYPH A169;Lo;0;L;;;;;N;;;;; +144C5;ANATOLIAN HIEROGLYPH A170;Lo;0;L;;;;;N;;;;; +144C6;ANATOLIAN HIEROGLYPH A171;Lo;0;L;;;;;N;;;;; +144C7;ANATOLIAN HIEROGLYPH A172;Lo;0;L;;;;;N;;;;; +144C8;ANATOLIAN HIEROGLYPH A173;Lo;0;L;;;;;N;;;;; +144C9;ANATOLIAN HIEROGLYPH A174;Lo;0;L;;;;;N;;;;; +144CA;ANATOLIAN HIEROGLYPH A175;Lo;0;L;;;;;N;;;;; +144CB;ANATOLIAN HIEROGLYPH A176;Lo;0;L;;;;;N;;;;; +144CC;ANATOLIAN HIEROGLYPH A177;Lo;0;L;;;;;N;;;;; +144CD;ANATOLIAN HIEROGLYPH A178;Lo;0;L;;;;;N;;;;; +144CE;ANATOLIAN HIEROGLYPH A179;Lo;0;L;;;;;N;;;;; +144CF;ANATOLIAN HIEROGLYPH A180;Lo;0;L;;;;;N;;;;; +144D0;ANATOLIAN HIEROGLYPH A181;Lo;0;L;;;;;N;;;;; +144D1;ANATOLIAN HIEROGLYPH A182;Lo;0;L;;;;;N;;;;; +144D2;ANATOLIAN HIEROGLYPH A183;Lo;0;L;;;;;N;;;;; +144D3;ANATOLIAN HIEROGLYPH A184;Lo;0;L;;;;;N;;;;; +144D4;ANATOLIAN HIEROGLYPH A185;Lo;0;L;;;;;N;;;;; +144D5;ANATOLIAN HIEROGLYPH A186;Lo;0;L;;;;;N;;;;; +144D6;ANATOLIAN HIEROGLYPH A187;Lo;0;L;;;;;N;;;;; +144D7;ANATOLIAN HIEROGLYPH A188;Lo;0;L;;;;;N;;;;; +144D8;ANATOLIAN HIEROGLYPH A189;Lo;0;L;;;;;N;;;;; +144D9;ANATOLIAN HIEROGLYPH A190;Lo;0;L;;;;;N;;;;; +144DA;ANATOLIAN HIEROGLYPH A191;Lo;0;L;;;;;N;;;;; +144DB;ANATOLIAN HIEROGLYPH A192;Lo;0;L;;;;;N;;;;; +144DC;ANATOLIAN HIEROGLYPH A193;Lo;0;L;;;;;N;;;;; +144DD;ANATOLIAN HIEROGLYPH A194;Lo;0;L;;;;;N;;;;; +144DE;ANATOLIAN HIEROGLYPH A195;Lo;0;L;;;;;N;;;;; +144DF;ANATOLIAN HIEROGLYPH A196;Lo;0;L;;;;;N;;;;; +144E0;ANATOLIAN HIEROGLYPH A197;Lo;0;L;;;;;N;;;;; +144E1;ANATOLIAN HIEROGLYPH A198;Lo;0;L;;;;;N;;;;; +144E2;ANATOLIAN HIEROGLYPH A199;Lo;0;L;;;;;N;;;;; +144E3;ANATOLIAN HIEROGLYPH A200;Lo;0;L;;;;;N;;;;; +144E4;ANATOLIAN HIEROGLYPH A201;Lo;0;L;;;;;N;;;;; +144E5;ANATOLIAN HIEROGLYPH A202;Lo;0;L;;;;;N;;;;; +144E6;ANATOLIAN HIEROGLYPH A202A;Lo;0;L;;;;;N;;;;; +144E7;ANATOLIAN HIEROGLYPH A202B;Lo;0;L;;;;;N;;;;; +144E8;ANATOLIAN HIEROGLYPH A203;Lo;0;L;;;;;N;;;;; +144E9;ANATOLIAN HIEROGLYPH A204;Lo;0;L;;;;;N;;;;; +144EA;ANATOLIAN HIEROGLYPH A205;Lo;0;L;;;;;N;;;;; +144EB;ANATOLIAN HIEROGLYPH A206;Lo;0;L;;;;;N;;;;; +144EC;ANATOLIAN HIEROGLYPH A207;Lo;0;L;;;;;N;;;;; +144ED;ANATOLIAN HIEROGLYPH A207A;Lo;0;L;;;;;N;;;;; +144EE;ANATOLIAN HIEROGLYPH A208;Lo;0;L;;;;;N;;;;; +144EF;ANATOLIAN HIEROGLYPH A209;Lo;0;L;;;;;N;;;;; +144F0;ANATOLIAN HIEROGLYPH A209A;Lo;0;L;;;;;N;;;;; +144F1;ANATOLIAN HIEROGLYPH A210;Lo;0;L;;;;;N;;;;; +144F2;ANATOLIAN HIEROGLYPH A211;Lo;0;L;;;;;N;;;;; +144F3;ANATOLIAN HIEROGLYPH A212;Lo;0;L;;;;;N;;;;; +144F4;ANATOLIAN HIEROGLYPH A213;Lo;0;L;;;;;N;;;;; +144F5;ANATOLIAN HIEROGLYPH A214;Lo;0;L;;;;;N;;;;; +144F6;ANATOLIAN HIEROGLYPH A215;Lo;0;L;;;;;N;;;;; +144F7;ANATOLIAN HIEROGLYPH A215A;Lo;0;L;;;;;N;;;;; +144F8;ANATOLIAN HIEROGLYPH A216;Lo;0;L;;;;;N;;;;; +144F9;ANATOLIAN HIEROGLYPH A216A;Lo;0;L;;;;;N;;;;; +144FA;ANATOLIAN HIEROGLYPH A217;Lo;0;L;;;;;N;;;;; +144FB;ANATOLIAN HIEROGLYPH A218;Lo;0;L;;;;;N;;;;; +144FC;ANATOLIAN HIEROGLYPH A219;Lo;0;L;;;;;N;;;;; +144FD;ANATOLIAN HIEROGLYPH A220;Lo;0;L;;;;;N;;;;; +144FE;ANATOLIAN HIEROGLYPH A221;Lo;0;L;;;;;N;;;;; +144FF;ANATOLIAN HIEROGLYPH A222;Lo;0;L;;;;;N;;;;; +14500;ANATOLIAN HIEROGLYPH A223;Lo;0;L;;;;;N;;;;; +14501;ANATOLIAN HIEROGLYPH A224;Lo;0;L;;;;;N;;;;; +14502;ANATOLIAN HIEROGLYPH A225;Lo;0;L;;;;;N;;;;; +14503;ANATOLIAN HIEROGLYPH A226;Lo;0;L;;;;;N;;;;; +14504;ANATOLIAN HIEROGLYPH A227;Lo;0;L;;;;;N;;;;; +14505;ANATOLIAN HIEROGLYPH A227A;Lo;0;L;;;;;N;;;;; +14506;ANATOLIAN HIEROGLYPH A228;Lo;0;L;;;;;N;;;;; +14507;ANATOLIAN HIEROGLYPH A229;Lo;0;L;;;;;N;;;;; +14508;ANATOLIAN HIEROGLYPH A230;Lo;0;L;;;;;N;;;;; +14509;ANATOLIAN HIEROGLYPH A231;Lo;0;L;;;;;N;;;;; +1450A;ANATOLIAN HIEROGLYPH A232;Lo;0;L;;;;;N;;;;; +1450B;ANATOLIAN HIEROGLYPH A233;Lo;0;L;;;;;N;;;;; +1450C;ANATOLIAN HIEROGLYPH A234;Lo;0;L;;;;;N;;;;; +1450D;ANATOLIAN HIEROGLYPH A235;Lo;0;L;;;;;N;;;;; +1450E;ANATOLIAN HIEROGLYPH A236;Lo;0;L;;;;;N;;;;; +1450F;ANATOLIAN HIEROGLYPH A237;Lo;0;L;;;;;N;;;;; +14510;ANATOLIAN HIEROGLYPH A238;Lo;0;L;;;;;N;;;;; +14511;ANATOLIAN HIEROGLYPH A239;Lo;0;L;;;;;N;;;;; +14512;ANATOLIAN HIEROGLYPH A240;Lo;0;L;;;;;N;;;;; +14513;ANATOLIAN HIEROGLYPH A241;Lo;0;L;;;;;N;;;;; +14514;ANATOLIAN HIEROGLYPH A242;Lo;0;L;;;;;N;;;;; +14515;ANATOLIAN HIEROGLYPH A243;Lo;0;L;;;;;N;;;;; +14516;ANATOLIAN HIEROGLYPH A244;Lo;0;L;;;;;N;;;;; +14517;ANATOLIAN HIEROGLYPH A245;Lo;0;L;;;;;N;;;;; +14518;ANATOLIAN HIEROGLYPH A246;Lo;0;L;;;;;N;;;;; +14519;ANATOLIAN HIEROGLYPH A247;Lo;0;L;;;;;N;;;;; +1451A;ANATOLIAN HIEROGLYPH A248;Lo;0;L;;;;;N;;;;; +1451B;ANATOLIAN HIEROGLYPH A249;Lo;0;L;;;;;N;;;;; +1451C;ANATOLIAN HIEROGLYPH A250;Lo;0;L;;;;;N;;;;; +1451D;ANATOLIAN HIEROGLYPH A251;Lo;0;L;;;;;N;;;;; +1451E;ANATOLIAN HIEROGLYPH A252;Lo;0;L;;;;;N;;;;; +1451F;ANATOLIAN HIEROGLYPH A253;Lo;0;L;;;;;N;;;;; +14520;ANATOLIAN HIEROGLYPH A254;Lo;0;L;;;;;N;;;;; +14521;ANATOLIAN HIEROGLYPH A255;Lo;0;L;;;;;N;;;;; +14522;ANATOLIAN HIEROGLYPH A256;Lo;0;L;;;;;N;;;;; +14523;ANATOLIAN HIEROGLYPH A257;Lo;0;L;;;;;N;;;;; +14524;ANATOLIAN HIEROGLYPH A258;Lo;0;L;;;;;N;;;;; +14525;ANATOLIAN HIEROGLYPH A259;Lo;0;L;;;;;N;;;;; +14526;ANATOLIAN HIEROGLYPH A260;Lo;0;L;;;;;N;;;;; +14527;ANATOLIAN HIEROGLYPH A261;Lo;0;L;;;;;N;;;;; +14528;ANATOLIAN HIEROGLYPH A262;Lo;0;L;;;;;N;;;;; +14529;ANATOLIAN HIEROGLYPH A263;Lo;0;L;;;;;N;;;;; +1452A;ANATOLIAN HIEROGLYPH A264;Lo;0;L;;;;;N;;;;; +1452B;ANATOLIAN HIEROGLYPH A265;Lo;0;L;;;;;N;;;;; +1452C;ANATOLIAN HIEROGLYPH A266;Lo;0;L;;;;;N;;;;; +1452D;ANATOLIAN HIEROGLYPH A267;Lo;0;L;;;;;N;;;;; +1452E;ANATOLIAN HIEROGLYPH A267A;Lo;0;L;;;;;N;;;;; +1452F;ANATOLIAN HIEROGLYPH A268;Lo;0;L;;;;;N;;;;; +14530;ANATOLIAN HIEROGLYPH A269;Lo;0;L;;;;;N;;;;; +14531;ANATOLIAN HIEROGLYPH A270;Lo;0;L;;;;;N;;;;; +14532;ANATOLIAN HIEROGLYPH A271;Lo;0;L;;;;;N;;;;; +14533;ANATOLIAN HIEROGLYPH A272;Lo;0;L;;;;;N;;;;; +14534;ANATOLIAN HIEROGLYPH A273;Lo;0;L;;;;;N;;;;; +14535;ANATOLIAN HIEROGLYPH A274;Lo;0;L;;;;;N;;;;; +14536;ANATOLIAN HIEROGLYPH A275;Lo;0;L;;;;;N;;;;; +14537;ANATOLIAN HIEROGLYPH A276;Lo;0;L;;;;;N;;;;; +14538;ANATOLIAN HIEROGLYPH A277;Lo;0;L;;;;;N;;;;; +14539;ANATOLIAN HIEROGLYPH A278;Lo;0;L;;;;;N;;;;; +1453A;ANATOLIAN HIEROGLYPH A279;Lo;0;L;;;;;N;;;;; +1453B;ANATOLIAN HIEROGLYPH A280;Lo;0;L;;;;;N;;;;; +1453C;ANATOLIAN HIEROGLYPH A281;Lo;0;L;;;;;N;;;;; +1453D;ANATOLIAN HIEROGLYPH A282;Lo;0;L;;;;;N;;;;; +1453E;ANATOLIAN HIEROGLYPH A283;Lo;0;L;;;;;N;;;;; +1453F;ANATOLIAN HIEROGLYPH A284;Lo;0;L;;;;;N;;;;; +14540;ANATOLIAN HIEROGLYPH A285;Lo;0;L;;;;;N;;;;; +14541;ANATOLIAN HIEROGLYPH A286;Lo;0;L;;;;;N;;;;; +14542;ANATOLIAN HIEROGLYPH A287;Lo;0;L;;;;;N;;;;; +14543;ANATOLIAN HIEROGLYPH A288;Lo;0;L;;;;;N;;;;; +14544;ANATOLIAN HIEROGLYPH A289;Lo;0;L;;;;;N;;;;; +14545;ANATOLIAN HIEROGLYPH A289A;Lo;0;L;;;;;N;;;;; +14546;ANATOLIAN HIEROGLYPH A290;Lo;0;L;;;;;N;;;;; +14547;ANATOLIAN HIEROGLYPH A291;Lo;0;L;;;;;N;;;;; +14548;ANATOLIAN HIEROGLYPH A292;Lo;0;L;;;;;N;;;;; +14549;ANATOLIAN HIEROGLYPH A293;Lo;0;L;;;;;N;;;;; +1454A;ANATOLIAN HIEROGLYPH A294;Lo;0;L;;;;;N;;;;; +1454B;ANATOLIAN HIEROGLYPH A294A;Lo;0;L;;;;;N;;;;; +1454C;ANATOLIAN HIEROGLYPH A295;Lo;0;L;;;;;N;;;;; +1454D;ANATOLIAN HIEROGLYPH A296;Lo;0;L;;;;;N;;;;; +1454E;ANATOLIAN HIEROGLYPH A297;Lo;0;L;;;;;N;;;;; +1454F;ANATOLIAN HIEROGLYPH A298;Lo;0;L;;;;;N;;;;; +14550;ANATOLIAN HIEROGLYPH A299;Lo;0;L;;;;;N;;;;; +14551;ANATOLIAN HIEROGLYPH A299A;Lo;0;L;;;;;N;;;;; +14552;ANATOLIAN HIEROGLYPH A300;Lo;0;L;;;;;N;;;;; +14553;ANATOLIAN HIEROGLYPH A301;Lo;0;L;;;;;N;;;;; +14554;ANATOLIAN HIEROGLYPH A302;Lo;0;L;;;;;N;;;;; +14555;ANATOLIAN HIEROGLYPH A303;Lo;0;L;;;;;N;;;;; +14556;ANATOLIAN HIEROGLYPH A304;Lo;0;L;;;;;N;;;;; +14557;ANATOLIAN HIEROGLYPH A305;Lo;0;L;;;;;N;;;;; +14558;ANATOLIAN HIEROGLYPH A306;Lo;0;L;;;;;N;;;;; +14559;ANATOLIAN HIEROGLYPH A307;Lo;0;L;;;;;N;;;;; +1455A;ANATOLIAN HIEROGLYPH A308;Lo;0;L;;;;;N;;;;; +1455B;ANATOLIAN HIEROGLYPH A309;Lo;0;L;;;;;N;;;;; +1455C;ANATOLIAN HIEROGLYPH A309A;Lo;0;L;;;;;N;;;;; +1455D;ANATOLIAN HIEROGLYPH A310;Lo;0;L;;;;;N;;;;; +1455E;ANATOLIAN HIEROGLYPH A311;Lo;0;L;;;;;N;;;;; +1455F;ANATOLIAN HIEROGLYPH A312;Lo;0;L;;;;;N;;;;; +14560;ANATOLIAN HIEROGLYPH A313;Lo;0;L;;;;;N;;;;; +14561;ANATOLIAN HIEROGLYPH A314;Lo;0;L;;;;;N;;;;; +14562;ANATOLIAN HIEROGLYPH A315;Lo;0;L;;;;;N;;;;; +14563;ANATOLIAN HIEROGLYPH A316;Lo;0;L;;;;;N;;;;; +14564;ANATOLIAN HIEROGLYPH A317;Lo;0;L;;;;;N;;;;; +14565;ANATOLIAN HIEROGLYPH A318;Lo;0;L;;;;;N;;;;; +14566;ANATOLIAN HIEROGLYPH A319;Lo;0;L;;;;;N;;;;; +14567;ANATOLIAN HIEROGLYPH A320;Lo;0;L;;;;;N;;;;; +14568;ANATOLIAN HIEROGLYPH A321;Lo;0;L;;;;;N;;;;; +14569;ANATOLIAN HIEROGLYPH A322;Lo;0;L;;;;;N;;;;; +1456A;ANATOLIAN HIEROGLYPH A323;Lo;0;L;;;;;N;;;;; +1456B;ANATOLIAN HIEROGLYPH A324;Lo;0;L;;;;;N;;;;; +1456C;ANATOLIAN HIEROGLYPH A325;Lo;0;L;;;;;N;;;;; +1456D;ANATOLIAN HIEROGLYPH A326;Lo;0;L;;;;;N;;;;; +1456E;ANATOLIAN HIEROGLYPH A327;Lo;0;L;;;;;N;;;;; +1456F;ANATOLIAN HIEROGLYPH A328;Lo;0;L;;;;;N;;;;; +14570;ANATOLIAN HIEROGLYPH A329;Lo;0;L;;;;;N;;;;; +14571;ANATOLIAN HIEROGLYPH A329A;Lo;0;L;;;;;N;;;;; +14572;ANATOLIAN HIEROGLYPH A330;Lo;0;L;;;;;N;;;;; +14573;ANATOLIAN HIEROGLYPH A331;Lo;0;L;;;;;N;;;;; +14574;ANATOLIAN HIEROGLYPH A332A;Lo;0;L;;;;;N;;;;; +14575;ANATOLIAN HIEROGLYPH A332B;Lo;0;L;;;;;N;;;;; +14576;ANATOLIAN HIEROGLYPH A332C;Lo;0;L;;;;;N;;;;; +14577;ANATOLIAN HIEROGLYPH A333;Lo;0;L;;;;;N;;;;; +14578;ANATOLIAN HIEROGLYPH A334;Lo;0;L;;;;;N;;;;; +14579;ANATOLIAN HIEROGLYPH A335;Lo;0;L;;;;;N;;;;; +1457A;ANATOLIAN HIEROGLYPH A336;Lo;0;L;;;;;N;;;;; +1457B;ANATOLIAN HIEROGLYPH A336A;Lo;0;L;;;;;N;;;;; +1457C;ANATOLIAN HIEROGLYPH A336B;Lo;0;L;;;;;N;;;;; +1457D;ANATOLIAN HIEROGLYPH A336C;Lo;0;L;;;;;N;;;;; +1457E;ANATOLIAN HIEROGLYPH A337;Lo;0;L;;;;;N;;;;; +1457F;ANATOLIAN HIEROGLYPH A338;Lo;0;L;;;;;N;;;;; +14580;ANATOLIAN HIEROGLYPH A339;Lo;0;L;;;;;N;;;;; +14581;ANATOLIAN HIEROGLYPH A340;Lo;0;L;;;;;N;;;;; +14582;ANATOLIAN HIEROGLYPH A341;Lo;0;L;;;;;N;;;;; +14583;ANATOLIAN HIEROGLYPH A342;Lo;0;L;;;;;N;;;;; +14584;ANATOLIAN HIEROGLYPH A343;Lo;0;L;;;;;N;;;;; +14585;ANATOLIAN HIEROGLYPH A344;Lo;0;L;;;;;N;;;;; +14586;ANATOLIAN HIEROGLYPH A345;Lo;0;L;;;;;N;;;;; +14587;ANATOLIAN HIEROGLYPH A346;Lo;0;L;;;;;N;;;;; +14588;ANATOLIAN HIEROGLYPH A347;Lo;0;L;;;;;N;;;;; +14589;ANATOLIAN HIEROGLYPH A348;Lo;0;L;;;;;N;;;;; +1458A;ANATOLIAN HIEROGLYPH A349;Lo;0;L;;;;;N;;;;; +1458B;ANATOLIAN HIEROGLYPH A350;Lo;0;L;;;;;N;;;;; +1458C;ANATOLIAN HIEROGLYPH A351;Lo;0;L;;;;;N;;;;; +1458D;ANATOLIAN HIEROGLYPH A352;Lo;0;L;;;;;N;;;;; +1458E;ANATOLIAN HIEROGLYPH A353;Lo;0;L;;;;;N;;;;; +1458F;ANATOLIAN HIEROGLYPH A354;Lo;0;L;;;;;N;;;;; +14590;ANATOLIAN HIEROGLYPH A355;Lo;0;L;;;;;N;;;;; +14591;ANATOLIAN HIEROGLYPH A356;Lo;0;L;;;;;N;;;;; +14592;ANATOLIAN HIEROGLYPH A357;Lo;0;L;;;;;N;;;;; +14593;ANATOLIAN HIEROGLYPH A358;Lo;0;L;;;;;N;;;;; +14594;ANATOLIAN HIEROGLYPH A359;Lo;0;L;;;;;N;;;;; +14595;ANATOLIAN HIEROGLYPH A359A;Lo;0;L;;;;;N;;;;; +14596;ANATOLIAN HIEROGLYPH A360;Lo;0;L;;;;;N;;;;; +14597;ANATOLIAN HIEROGLYPH A361;Lo;0;L;;;;;N;;;;; +14598;ANATOLIAN HIEROGLYPH A362;Lo;0;L;;;;;N;;;;; +14599;ANATOLIAN HIEROGLYPH A363;Lo;0;L;;;;;N;;;;; +1459A;ANATOLIAN HIEROGLYPH A364;Lo;0;L;;;;;N;;;;; +1459B;ANATOLIAN HIEROGLYPH A364A;Lo;0;L;;;;;N;;;;; +1459C;ANATOLIAN HIEROGLYPH A365;Lo;0;L;;;;;N;;;;; +1459D;ANATOLIAN HIEROGLYPH A366;Lo;0;L;;;;;N;;;;; +1459E;ANATOLIAN HIEROGLYPH A367;Lo;0;L;;;;;N;;;;; +1459F;ANATOLIAN HIEROGLYPH A368;Lo;0;L;;;;;N;;;;; +145A0;ANATOLIAN HIEROGLYPH A368A;Lo;0;L;;;;;N;;;;; +145A1;ANATOLIAN HIEROGLYPH A369;Lo;0;L;;;;;N;;;;; +145A2;ANATOLIAN HIEROGLYPH A370;Lo;0;L;;;;;N;;;;; +145A3;ANATOLIAN HIEROGLYPH A371;Lo;0;L;;;;;N;;;;; +145A4;ANATOLIAN HIEROGLYPH A371A;Lo;0;L;;;;;N;;;;; +145A5;ANATOLIAN HIEROGLYPH A372;Lo;0;L;;;;;N;;;;; +145A6;ANATOLIAN HIEROGLYPH A373;Lo;0;L;;;;;N;;;;; +145A7;ANATOLIAN HIEROGLYPH A374;Lo;0;L;;;;;N;;;;; +145A8;ANATOLIAN HIEROGLYPH A375;Lo;0;L;;;;;N;;;;; +145A9;ANATOLIAN HIEROGLYPH A376;Lo;0;L;;;;;N;;;;; +145AA;ANATOLIAN HIEROGLYPH A377;Lo;0;L;;;;;N;;;;; +145AB;ANATOLIAN HIEROGLYPH A378;Lo;0;L;;;;;N;;;;; +145AC;ANATOLIAN HIEROGLYPH A379;Lo;0;L;;;;;N;;;;; +145AD;ANATOLIAN HIEROGLYPH A380;Lo;0;L;;;;;N;;;;; +145AE;ANATOLIAN HIEROGLYPH A381;Lo;0;L;;;;;N;;;;; +145AF;ANATOLIAN HIEROGLYPH A381A;Lo;0;L;;;;;N;;;;; +145B0;ANATOLIAN HIEROGLYPH A382;Lo;0;L;;;;;N;;;;; +145B1;ANATOLIAN HIEROGLYPH A383 RA OR RI;Lo;0;L;;;;;N;;;;; +145B2;ANATOLIAN HIEROGLYPH A383A;Lo;0;L;;;;;N;;;;; +145B3;ANATOLIAN HIEROGLYPH A384;Lo;0;L;;;;;N;;;;; +145B4;ANATOLIAN HIEROGLYPH A385;Lo;0;L;;;;;N;;;;; +145B5;ANATOLIAN HIEROGLYPH A386;Lo;0;L;;;;;N;;;;; +145B6;ANATOLIAN HIEROGLYPH A386A;Lo;0;L;;;;;N;;;;; +145B7;ANATOLIAN HIEROGLYPH A387;Lo;0;L;;;;;N;;;;; +145B8;ANATOLIAN HIEROGLYPH A388;Lo;0;L;;;;;N;;;;; +145B9;ANATOLIAN HIEROGLYPH A389;Lo;0;L;;;;;N;;;;; +145BA;ANATOLIAN HIEROGLYPH A390;Lo;0;L;;;;;N;;;;; +145BB;ANATOLIAN HIEROGLYPH A391;Lo;0;L;;;;;N;;;;; +145BC;ANATOLIAN HIEROGLYPH A392;Lo;0;L;;;;;N;;;;; +145BD;ANATOLIAN HIEROGLYPH A393 EIGHT;Lo;0;L;;;;;N;;;;; +145BE;ANATOLIAN HIEROGLYPH A394;Lo;0;L;;;;;N;;;;; +145BF;ANATOLIAN HIEROGLYPH A395;Lo;0;L;;;;;N;;;;; +145C0;ANATOLIAN HIEROGLYPH A396;Lo;0;L;;;;;N;;;;; +145C1;ANATOLIAN HIEROGLYPH A397;Lo;0;L;;;;;N;;;;; +145C2;ANATOLIAN HIEROGLYPH A398;Lo;0;L;;;;;N;;;;; +145C3;ANATOLIAN HIEROGLYPH A399;Lo;0;L;;;;;N;;;;; +145C4;ANATOLIAN HIEROGLYPH A400;Lo;0;L;;;;;N;;;;; +145C5;ANATOLIAN HIEROGLYPH A401;Lo;0;L;;;;;N;;;;; +145C6;ANATOLIAN HIEROGLYPH A402;Lo;0;L;;;;;N;;;;; +145C7;ANATOLIAN HIEROGLYPH A403;Lo;0;L;;;;;N;;;;; +145C8;ANATOLIAN HIEROGLYPH A404;Lo;0;L;;;;;N;;;;; +145C9;ANATOLIAN HIEROGLYPH A405;Lo;0;L;;;;;N;;;;; +145CA;ANATOLIAN HIEROGLYPH A406;Lo;0;L;;;;;N;;;;; +145CB;ANATOLIAN HIEROGLYPH A407;Lo;0;L;;;;;N;;;;; +145CC;ANATOLIAN HIEROGLYPH A408;Lo;0;L;;;;;N;;;;; +145CD;ANATOLIAN HIEROGLYPH A409;Lo;0;L;;;;;N;;;;; +145CE;ANATOLIAN HIEROGLYPH A410 BEGIN LOGOGRAM MARK;Lo;0;L;;;;;N;;;;; +145CF;ANATOLIAN HIEROGLYPH A410A END LOGOGRAM MARK;Lo;0;L;;;;;N;;;;; +145D0;ANATOLIAN HIEROGLYPH A411;Lo;0;L;;;;;N;;;;; +145D1;ANATOLIAN HIEROGLYPH A412;Lo;0;L;;;;;N;;;;; +145D2;ANATOLIAN HIEROGLYPH A413;Lo;0;L;;;;;N;;;;; +145D3;ANATOLIAN HIEROGLYPH A414;Lo;0;L;;;;;N;;;;; +145D4;ANATOLIAN HIEROGLYPH A415;Lo;0;L;;;;;N;;;;; +145D5;ANATOLIAN HIEROGLYPH A416;Lo;0;L;;;;;N;;;;; +145D6;ANATOLIAN HIEROGLYPH A417;Lo;0;L;;;;;N;;;;; +145D7;ANATOLIAN HIEROGLYPH A418;Lo;0;L;;;;;N;;;;; +145D8;ANATOLIAN HIEROGLYPH A419;Lo;0;L;;;;;N;;;;; +145D9;ANATOLIAN HIEROGLYPH A420;Lo;0;L;;;;;N;;;;; +145DA;ANATOLIAN HIEROGLYPH A421;Lo;0;L;;;;;N;;;;; +145DB;ANATOLIAN HIEROGLYPH A422;Lo;0;L;;;;;N;;;;; +145DC;ANATOLIAN HIEROGLYPH A423;Lo;0;L;;;;;N;;;;; +145DD;ANATOLIAN HIEROGLYPH A424;Lo;0;L;;;;;N;;;;; +145DE;ANATOLIAN HIEROGLYPH A425;Lo;0;L;;;;;N;;;;; +145DF;ANATOLIAN HIEROGLYPH A426;Lo;0;L;;;;;N;;;;; +145E0;ANATOLIAN HIEROGLYPH A427;Lo;0;L;;;;;N;;;;; +145E1;ANATOLIAN HIEROGLYPH A428;Lo;0;L;;;;;N;;;;; +145E2;ANATOLIAN HIEROGLYPH A429;Lo;0;L;;;;;N;;;;; +145E3;ANATOLIAN HIEROGLYPH A430;Lo;0;L;;;;;N;;;;; +145E4;ANATOLIAN HIEROGLYPH A431;Lo;0;L;;;;;N;;;;; +145E5;ANATOLIAN HIEROGLYPH A432;Lo;0;L;;;;;N;;;;; +145E6;ANATOLIAN HIEROGLYPH A433;Lo;0;L;;;;;N;;;;; +145E7;ANATOLIAN HIEROGLYPH A434;Lo;0;L;;;;;N;;;;; +145E8;ANATOLIAN HIEROGLYPH A435;Lo;0;L;;;;;N;;;;; +145E9;ANATOLIAN HIEROGLYPH A436;Lo;0;L;;;;;N;;;;; +145EA;ANATOLIAN HIEROGLYPH A437;Lo;0;L;;;;;N;;;;; +145EB;ANATOLIAN HIEROGLYPH A438;Lo;0;L;;;;;N;;;;; +145EC;ANATOLIAN HIEROGLYPH A439;Lo;0;L;;;;;N;;;;; +145ED;ANATOLIAN HIEROGLYPH A440;Lo;0;L;;;;;N;;;;; +145EE;ANATOLIAN HIEROGLYPH A441;Lo;0;L;;;;;N;;;;; +145EF;ANATOLIAN HIEROGLYPH A442;Lo;0;L;;;;;N;;;;; +145F0;ANATOLIAN HIEROGLYPH A443;Lo;0;L;;;;;N;;;;; +145F1;ANATOLIAN HIEROGLYPH A444;Lo;0;L;;;;;N;;;;; +145F2;ANATOLIAN HIEROGLYPH A445;Lo;0;L;;;;;N;;;;; +145F3;ANATOLIAN HIEROGLYPH A446;Lo;0;L;;;;;N;;;;; +145F4;ANATOLIAN HIEROGLYPH A447;Lo;0;L;;;;;N;;;;; +145F5;ANATOLIAN HIEROGLYPH A448;Lo;0;L;;;;;N;;;;; +145F6;ANATOLIAN HIEROGLYPH A449;Lo;0;L;;;;;N;;;;; +145F7;ANATOLIAN HIEROGLYPH A450;Lo;0;L;;;;;N;;;;; +145F8;ANATOLIAN HIEROGLYPH A450A;Lo;0;L;;;;;N;;;;; +145F9;ANATOLIAN HIEROGLYPH A451;Lo;0;L;;;;;N;;;;; +145FA;ANATOLIAN HIEROGLYPH A452;Lo;0;L;;;;;N;;;;; +145FB;ANATOLIAN HIEROGLYPH A453;Lo;0;L;;;;;N;;;;; +145FC;ANATOLIAN HIEROGLYPH A454;Lo;0;L;;;;;N;;;;; +145FD;ANATOLIAN HIEROGLYPH A455;Lo;0;L;;;;;N;;;;; +145FE;ANATOLIAN HIEROGLYPH A456;Lo;0;L;;;;;N;;;;; +145FF;ANATOLIAN HIEROGLYPH A457;Lo;0;L;;;;;N;;;;; +14600;ANATOLIAN HIEROGLYPH A457A;Lo;0;L;;;;;N;;;;; +14601;ANATOLIAN HIEROGLYPH A458;Lo;0;L;;;;;N;;;;; +14602;ANATOLIAN HIEROGLYPH A459;Lo;0;L;;;;;N;;;;; +14603;ANATOLIAN HIEROGLYPH A460;Lo;0;L;;;;;N;;;;; +14604;ANATOLIAN HIEROGLYPH A461;Lo;0;L;;;;;N;;;;; +14605;ANATOLIAN HIEROGLYPH A462;Lo;0;L;;;;;N;;;;; +14606;ANATOLIAN HIEROGLYPH A463;Lo;0;L;;;;;N;;;;; +14607;ANATOLIAN HIEROGLYPH A464;Lo;0;L;;;;;N;;;;; +14608;ANATOLIAN HIEROGLYPH A465;Lo;0;L;;;;;N;;;;; +14609;ANATOLIAN HIEROGLYPH A466;Lo;0;L;;;;;N;;;;; +1460A;ANATOLIAN HIEROGLYPH A467;Lo;0;L;;;;;N;;;;; +1460B;ANATOLIAN HIEROGLYPH A468;Lo;0;L;;;;;N;;;;; +1460C;ANATOLIAN HIEROGLYPH A469;Lo;0;L;;;;;N;;;;; +1460D;ANATOLIAN HIEROGLYPH A470;Lo;0;L;;;;;N;;;;; +1460E;ANATOLIAN HIEROGLYPH A471;Lo;0;L;;;;;N;;;;; +1460F;ANATOLIAN HIEROGLYPH A472;Lo;0;L;;;;;N;;;;; +14610;ANATOLIAN HIEROGLYPH A473;Lo;0;L;;;;;N;;;;; +14611;ANATOLIAN HIEROGLYPH A474;Lo;0;L;;;;;N;;;;; +14612;ANATOLIAN HIEROGLYPH A475;Lo;0;L;;;;;N;;;;; +14613;ANATOLIAN HIEROGLYPH A476;Lo;0;L;;;;;N;;;;; +14614;ANATOLIAN HIEROGLYPH A477;Lo;0;L;;;;;N;;;;; +14615;ANATOLIAN HIEROGLYPH A478;Lo;0;L;;;;;N;;;;; +14616;ANATOLIAN HIEROGLYPH A479;Lo;0;L;;;;;N;;;;; +14617;ANATOLIAN HIEROGLYPH A480;Lo;0;L;;;;;N;;;;; +14618;ANATOLIAN HIEROGLYPH A481;Lo;0;L;;;;;N;;;;; +14619;ANATOLIAN HIEROGLYPH A482;Lo;0;L;;;;;N;;;;; +1461A;ANATOLIAN HIEROGLYPH A483;Lo;0;L;;;;;N;;;;; +1461B;ANATOLIAN HIEROGLYPH A484;Lo;0;L;;;;;N;;;;; +1461C;ANATOLIAN HIEROGLYPH A485;Lo;0;L;;;;;N;;;;; +1461D;ANATOLIAN HIEROGLYPH A486;Lo;0;L;;;;;N;;;;; +1461E;ANATOLIAN HIEROGLYPH A487;Lo;0;L;;;;;N;;;;; +1461F;ANATOLIAN HIEROGLYPH A488;Lo;0;L;;;;;N;;;;; +14620;ANATOLIAN HIEROGLYPH A489;Lo;0;L;;;;;N;;;;; +14621;ANATOLIAN HIEROGLYPH A490;Lo;0;L;;;;;N;;;;; +14622;ANATOLIAN HIEROGLYPH A491;Lo;0;L;;;;;N;;;;; +14623;ANATOLIAN HIEROGLYPH A492;Lo;0;L;;;;;N;;;;; +14624;ANATOLIAN HIEROGLYPH A493;Lo;0;L;;;;;N;;;;; +14625;ANATOLIAN HIEROGLYPH A494;Lo;0;L;;;;;N;;;;; +14626;ANATOLIAN HIEROGLYPH A495;Lo;0;L;;;;;N;;;;; +14627;ANATOLIAN HIEROGLYPH A496;Lo;0;L;;;;;N;;;;; +14628;ANATOLIAN HIEROGLYPH A497;Lo;0;L;;;;;N;;;;; +14629;ANATOLIAN HIEROGLYPH A501;Lo;0;L;;;;;N;;;;; +1462A;ANATOLIAN HIEROGLYPH A502;Lo;0;L;;;;;N;;;;; +1462B;ANATOLIAN HIEROGLYPH A503;Lo;0;L;;;;;N;;;;; +1462C;ANATOLIAN HIEROGLYPH A504;Lo;0;L;;;;;N;;;;; +1462D;ANATOLIAN HIEROGLYPH A505;Lo;0;L;;;;;N;;;;; +1462E;ANATOLIAN HIEROGLYPH A506;Lo;0;L;;;;;N;;;;; +1462F;ANATOLIAN HIEROGLYPH A507;Lo;0;L;;;;;N;;;;; +14630;ANATOLIAN HIEROGLYPH A508;Lo;0;L;;;;;N;;;;; +14631;ANATOLIAN HIEROGLYPH A509;Lo;0;L;;;;;N;;;;; +14632;ANATOLIAN HIEROGLYPH A510;Lo;0;L;;;;;N;;;;; +14633;ANATOLIAN HIEROGLYPH A511;Lo;0;L;;;;;N;;;;; +14634;ANATOLIAN HIEROGLYPH A512;Lo;0;L;;;;;N;;;;; +14635;ANATOLIAN HIEROGLYPH A513;Lo;0;L;;;;;N;;;;; +14636;ANATOLIAN HIEROGLYPH A514;Lo;0;L;;;;;N;;;;; +14637;ANATOLIAN HIEROGLYPH A515;Lo;0;L;;;;;N;;;;; +14638;ANATOLIAN HIEROGLYPH A516;Lo;0;L;;;;;N;;;;; +14639;ANATOLIAN HIEROGLYPH A517;Lo;0;L;;;;;N;;;;; +1463A;ANATOLIAN HIEROGLYPH A518;Lo;0;L;;;;;N;;;;; +1463B;ANATOLIAN HIEROGLYPH A519;Lo;0;L;;;;;N;;;;; +1463C;ANATOLIAN HIEROGLYPH A520;Lo;0;L;;;;;N;;;;; +1463D;ANATOLIAN HIEROGLYPH A521;Lo;0;L;;;;;N;;;;; +1463E;ANATOLIAN HIEROGLYPH A522;Lo;0;L;;;;;N;;;;; +1463F;ANATOLIAN HIEROGLYPH A523;Lo;0;L;;;;;N;;;;; +14640;ANATOLIAN HIEROGLYPH A524;Lo;0;L;;;;;N;;;;; +14641;ANATOLIAN HIEROGLYPH A525;Lo;0;L;;;;;N;;;;; +14642;ANATOLIAN HIEROGLYPH A526;Lo;0;L;;;;;N;;;;; +14643;ANATOLIAN HIEROGLYPH A527;Lo;0;L;;;;;N;;;;; +14644;ANATOLIAN HIEROGLYPH A528;Lo;0;L;;;;;N;;;;; +14645;ANATOLIAN HIEROGLYPH A529;Lo;0;L;;;;;N;;;;; +14646;ANATOLIAN HIEROGLYPH A530;Lo;0;L;;;;;N;;;;; +16800;BAMUM LETTER PHASE-A NGKUE MFON;Lo;0;L;;;;;N;;;;; +16801;BAMUM LETTER PHASE-A GBIEE FON;Lo;0;L;;;;;N;;;;; +16802;BAMUM LETTER PHASE-A PON MFON PIPAEMGBIEE;Lo;0;L;;;;;N;;;;; +16803;BAMUM LETTER PHASE-A PON MFON PIPAEMBA;Lo;0;L;;;;;N;;;;; +16804;BAMUM LETTER PHASE-A NAA MFON;Lo;0;L;;;;;N;;;;; +16805;BAMUM LETTER PHASE-A SHUENSHUET;Lo;0;L;;;;;N;;;;; +16806;BAMUM LETTER PHASE-A TITA MFON;Lo;0;L;;;;;N;;;;; +16807;BAMUM LETTER PHASE-A NZA MFON;Lo;0;L;;;;;N;;;;; +16808;BAMUM LETTER PHASE-A SHINDA PA NJI;Lo;0;L;;;;;N;;;;; +16809;BAMUM LETTER PHASE-A PON PA NJI PIPAEMGBIEE;Lo;0;L;;;;;N;;;;; +1680A;BAMUM LETTER PHASE-A PON PA NJI PIPAEMBA;Lo;0;L;;;;;N;;;;; +1680B;BAMUM LETTER PHASE-A MAEMBGBIEE;Lo;0;L;;;;;N;;;;; +1680C;BAMUM LETTER PHASE-A TU MAEMBA;Lo;0;L;;;;;N;;;;; +1680D;BAMUM LETTER PHASE-A NGANGU;Lo;0;L;;;;;N;;;;; +1680E;BAMUM LETTER PHASE-A MAEMVEUX;Lo;0;L;;;;;N;;;;; +1680F;BAMUM LETTER PHASE-A MANSUAE;Lo;0;L;;;;;N;;;;; +16810;BAMUM LETTER PHASE-A MVEUAENGAM;Lo;0;L;;;;;N;;;;; +16811;BAMUM LETTER PHASE-A SEUNYAM;Lo;0;L;;;;;N;;;;; +16812;BAMUM LETTER PHASE-A NTOQPEN;Lo;0;L;;;;;N;;;;; +16813;BAMUM LETTER PHASE-A KEUKEUTNDA;Lo;0;L;;;;;N;;;;; +16814;BAMUM LETTER PHASE-A NKINDI;Lo;0;L;;;;;N;;;;; +16815;BAMUM LETTER PHASE-A SUU;Lo;0;L;;;;;N;;;;; +16816;BAMUM LETTER PHASE-A NGKUENZEUM;Lo;0;L;;;;;N;;;;; +16817;BAMUM LETTER PHASE-A LAPAQ;Lo;0;L;;;;;N;;;;; +16818;BAMUM LETTER PHASE-A LET KUT;Lo;0;L;;;;;N;;;;; +16819;BAMUM LETTER PHASE-A NTAP MFAA;Lo;0;L;;;;;N;;;;; +1681A;BAMUM LETTER PHASE-A MAEKEUP;Lo;0;L;;;;;N;;;;; +1681B;BAMUM LETTER PHASE-A PASHAE;Lo;0;L;;;;;N;;;;; +1681C;BAMUM LETTER PHASE-A GHEUAERAE;Lo;0;L;;;;;N;;;;; +1681D;BAMUM LETTER PHASE-A PAMSHAE;Lo;0;L;;;;;N;;;;; +1681E;BAMUM LETTER PHASE-A MON NGGEUAET;Lo;0;L;;;;;N;;;;; +1681F;BAMUM LETTER PHASE-A NZUN MEUT;Lo;0;L;;;;;N;;;;; +16820;BAMUM LETTER PHASE-A U YUQ NAE;Lo;0;L;;;;;N;;;;; +16821;BAMUM LETTER PHASE-A GHEUAEGHEUAE;Lo;0;L;;;;;N;;;;; +16822;BAMUM LETTER PHASE-A NTAP NTAA;Lo;0;L;;;;;N;;;;; +16823;BAMUM LETTER PHASE-A SISA;Lo;0;L;;;;;N;;;;; +16824;BAMUM LETTER PHASE-A MGBASA;Lo;0;L;;;;;N;;;;; +16825;BAMUM LETTER PHASE-A MEUNJOMNDEUQ;Lo;0;L;;;;;N;;;;; +16826;BAMUM LETTER PHASE-A MOOMPUQ;Lo;0;L;;;;;N;;;;; +16827;BAMUM LETTER PHASE-A KAFA;Lo;0;L;;;;;N;;;;; +16828;BAMUM LETTER PHASE-A PA LEERAEWA;Lo;0;L;;;;;N;;;;; +16829;BAMUM LETTER PHASE-A NDA LEERAEWA;Lo;0;L;;;;;N;;;;; +1682A;BAMUM LETTER PHASE-A PET;Lo;0;L;;;;;N;;;;; +1682B;BAMUM LETTER PHASE-A MAEMKPEN;Lo;0;L;;;;;N;;;;; +1682C;BAMUM LETTER PHASE-A NIKA;Lo;0;L;;;;;N;;;;; +1682D;BAMUM LETTER PHASE-A PUP;Lo;0;L;;;;;N;;;;; +1682E;BAMUM LETTER PHASE-A TUAEP;Lo;0;L;;;;;N;;;;; +1682F;BAMUM LETTER PHASE-A LUAEP;Lo;0;L;;;;;N;;;;; +16830;BAMUM LETTER PHASE-A SONJAM;Lo;0;L;;;;;N;;;;; +16831;BAMUM LETTER PHASE-A TEUTEUWEN;Lo;0;L;;;;;N;;;;; +16832;BAMUM LETTER PHASE-A MAENYI;Lo;0;L;;;;;N;;;;; +16833;BAMUM LETTER PHASE-A KET;Lo;0;L;;;;;N;;;;; +16834;BAMUM LETTER PHASE-A NDAANGGEUAET;Lo;0;L;;;;;N;;;;; +16835;BAMUM LETTER PHASE-A KUOQ;Lo;0;L;;;;;N;;;;; +16836;BAMUM LETTER PHASE-A MOOMEUT;Lo;0;L;;;;;N;;;;; +16837;BAMUM LETTER PHASE-A SHUM;Lo;0;L;;;;;N;;;;; +16838;BAMUM LETTER PHASE-A LOMMAE;Lo;0;L;;;;;N;;;;; +16839;BAMUM LETTER PHASE-A FIRI;Lo;0;L;;;;;N;;;;; +1683A;BAMUM LETTER PHASE-A ROM;Lo;0;L;;;;;N;;;;; +1683B;BAMUM LETTER PHASE-A KPOQ;Lo;0;L;;;;;N;;;;; +1683C;BAMUM LETTER PHASE-A SOQ;Lo;0;L;;;;;N;;;;; +1683D;BAMUM LETTER PHASE-A MAP PIEET;Lo;0;L;;;;;N;;;;; +1683E;BAMUM LETTER PHASE-A SHIRAE;Lo;0;L;;;;;N;;;;; +1683F;BAMUM LETTER PHASE-A NTAP;Lo;0;L;;;;;N;;;;; +16840;BAMUM LETTER PHASE-A SHOQ NSHUT YUM;Lo;0;L;;;;;N;;;;; +16841;BAMUM LETTER PHASE-A NYIT MONGKEUAEQ;Lo;0;L;;;;;N;;;;; +16842;BAMUM LETTER PHASE-A PAARAE;Lo;0;L;;;;;N;;;;; +16843;BAMUM LETTER PHASE-A NKAARAE;Lo;0;L;;;;;N;;;;; +16844;BAMUM LETTER PHASE-A UNKNOWN;Lo;0;L;;;;;N;;;;; +16845;BAMUM LETTER PHASE-A NGGEN;Lo;0;L;;;;;N;;;;; +16846;BAMUM LETTER PHASE-A MAESI;Lo;0;L;;;;;N;;;;; +16847;BAMUM LETTER PHASE-A NJAM;Lo;0;L;;;;;N;;;;; +16848;BAMUM LETTER PHASE-A MBANYI;Lo;0;L;;;;;N;;;;; +16849;BAMUM LETTER PHASE-A NYET;Lo;0;L;;;;;N;;;;; +1684A;BAMUM LETTER PHASE-A TEUAEN;Lo;0;L;;;;;N;;;;; +1684B;BAMUM LETTER PHASE-A SOT;Lo;0;L;;;;;N;;;;; +1684C;BAMUM LETTER PHASE-A PAAM;Lo;0;L;;;;;N;;;;; +1684D;BAMUM LETTER PHASE-A NSHIEE;Lo;0;L;;;;;N;;;;; +1684E;BAMUM LETTER PHASE-A MAEM;Lo;0;L;;;;;N;;;;; +1684F;BAMUM LETTER PHASE-A NYI;Lo;0;L;;;;;N;;;;; +16850;BAMUM LETTER PHASE-A KAQ;Lo;0;L;;;;;N;;;;; +16851;BAMUM LETTER PHASE-A NSHA;Lo;0;L;;;;;N;;;;; +16852;BAMUM LETTER PHASE-A VEE;Lo;0;L;;;;;N;;;;; +16853;BAMUM LETTER PHASE-A LU;Lo;0;L;;;;;N;;;;; +16854;BAMUM LETTER PHASE-A NEN;Lo;0;L;;;;;N;;;;; +16855;BAMUM LETTER PHASE-A NAQ;Lo;0;L;;;;;N;;;;; +16856;BAMUM LETTER PHASE-A MBAQ;Lo;0;L;;;;;N;;;;; +16857;BAMUM LETTER PHASE-B NSHUET;Lo;0;L;;;;;N;;;;; +16858;BAMUM LETTER PHASE-B TU MAEMGBIEE;Lo;0;L;;;;;N;;;;; +16859;BAMUM LETTER PHASE-B SIEE;Lo;0;L;;;;;N;;;;; +1685A;BAMUM LETTER PHASE-B SET TU;Lo;0;L;;;;;N;;;;; +1685B;BAMUM LETTER PHASE-B LOM NTEUM;Lo;0;L;;;;;N;;;;; +1685C;BAMUM LETTER PHASE-B MBA MAELEE;Lo;0;L;;;;;N;;;;; +1685D;BAMUM LETTER PHASE-B KIEEM;Lo;0;L;;;;;N;;;;; +1685E;BAMUM LETTER PHASE-B YEURAE;Lo;0;L;;;;;N;;;;; +1685F;BAMUM LETTER PHASE-B MBAARAE;Lo;0;L;;;;;N;;;;; +16860;BAMUM LETTER PHASE-B KAM;Lo;0;L;;;;;N;;;;; +16861;BAMUM LETTER PHASE-B PEESHI;Lo;0;L;;;;;N;;;;; +16862;BAMUM LETTER PHASE-B YAFU LEERAEWA;Lo;0;L;;;;;N;;;;; +16863;BAMUM LETTER PHASE-B LAM NSHUT NYAM;Lo;0;L;;;;;N;;;;; +16864;BAMUM LETTER PHASE-B NTIEE SHEUOQ;Lo;0;L;;;;;N;;;;; +16865;BAMUM LETTER PHASE-B NDU NJAA;Lo;0;L;;;;;N;;;;; +16866;BAMUM LETTER PHASE-B GHEUGHEUAEM;Lo;0;L;;;;;N;;;;; +16867;BAMUM LETTER PHASE-B PIT;Lo;0;L;;;;;N;;;;; +16868;BAMUM LETTER PHASE-B TU NSIEE;Lo;0;L;;;;;N;;;;; +16869;BAMUM LETTER PHASE-B SHET NJAQ;Lo;0;L;;;;;N;;;;; +1686A;BAMUM LETTER PHASE-B SHEUAEQTU;Lo;0;L;;;;;N;;;;; +1686B;BAMUM LETTER PHASE-B MFON TEUAEQ;Lo;0;L;;;;;N;;;;; +1686C;BAMUM LETTER PHASE-B MBIT MBAAKET;Lo;0;L;;;;;N;;;;; +1686D;BAMUM LETTER PHASE-B NYI NTEUM;Lo;0;L;;;;;N;;;;; +1686E;BAMUM LETTER PHASE-B KEUPUQ;Lo;0;L;;;;;N;;;;; +1686F;BAMUM LETTER PHASE-B GHEUGHEN;Lo;0;L;;;;;N;;;;; +16870;BAMUM LETTER PHASE-B KEUYEUX;Lo;0;L;;;;;N;;;;; +16871;BAMUM LETTER PHASE-B LAANAE;Lo;0;L;;;;;N;;;;; +16872;BAMUM LETTER PHASE-B PARUM;Lo;0;L;;;;;N;;;;; +16873;BAMUM LETTER PHASE-B VEUM;Lo;0;L;;;;;N;;;;; +16874;BAMUM LETTER PHASE-B NGKINDI MVOP;Lo;0;L;;;;;N;;;;; +16875;BAMUM LETTER PHASE-B NGGEU MBU;Lo;0;L;;;;;N;;;;; +16876;BAMUM LETTER PHASE-B WUAET;Lo;0;L;;;;;N;;;;; +16877;BAMUM LETTER PHASE-B SAKEUAE;Lo;0;L;;;;;N;;;;; +16878;BAMUM LETTER PHASE-B TAAM;Lo;0;L;;;;;N;;;;; +16879;BAMUM LETTER PHASE-B MEUQ;Lo;0;L;;;;;N;;;;; +1687A;BAMUM LETTER PHASE-B NGGUOQ;Lo;0;L;;;;;N;;;;; +1687B;BAMUM LETTER PHASE-B NGGUOQ LARGE;Lo;0;L;;;;;N;;;;; +1687C;BAMUM LETTER PHASE-B MFIYAQ;Lo;0;L;;;;;N;;;;; +1687D;BAMUM LETTER PHASE-B SUE;Lo;0;L;;;;;N;;;;; +1687E;BAMUM LETTER PHASE-B MBEURI;Lo;0;L;;;;;N;;;;; +1687F;BAMUM LETTER PHASE-B MONTIEEN;Lo;0;L;;;;;N;;;;; +16880;BAMUM LETTER PHASE-B NYAEMAE;Lo;0;L;;;;;N;;;;; +16881;BAMUM LETTER PHASE-B PUNGAAM;Lo;0;L;;;;;N;;;;; +16882;BAMUM LETTER PHASE-B MEUT NGGEET;Lo;0;L;;;;;N;;;;; +16883;BAMUM LETTER PHASE-B FEUX;Lo;0;L;;;;;N;;;;; +16884;BAMUM LETTER PHASE-B MBUOQ;Lo;0;L;;;;;N;;;;; +16885;BAMUM LETTER PHASE-B FEE;Lo;0;L;;;;;N;;;;; +16886;BAMUM LETTER PHASE-B KEUAEM;Lo;0;L;;;;;N;;;;; +16887;BAMUM LETTER PHASE-B MA NJEUAENA;Lo;0;L;;;;;N;;;;; +16888;BAMUM LETTER PHASE-B MA NJUQA;Lo;0;L;;;;;N;;;;; +16889;BAMUM LETTER PHASE-B LET;Lo;0;L;;;;;N;;;;; +1688A;BAMUM LETTER PHASE-B NGGAAM;Lo;0;L;;;;;N;;;;; +1688B;BAMUM LETTER PHASE-B NSEN;Lo;0;L;;;;;N;;;;; +1688C;BAMUM LETTER PHASE-B MA;Lo;0;L;;;;;N;;;;; +1688D;BAMUM LETTER PHASE-B KIQ;Lo;0;L;;;;;N;;;;; +1688E;BAMUM LETTER PHASE-B NGOM;Lo;0;L;;;;;N;;;;; +1688F;BAMUM LETTER PHASE-C NGKUE MAEMBA;Lo;0;L;;;;;N;;;;; +16890;BAMUM LETTER PHASE-C NZA;Lo;0;L;;;;;N;;;;; +16891;BAMUM LETTER PHASE-C YUM;Lo;0;L;;;;;N;;;;; +16892;BAMUM LETTER PHASE-C WANGKUOQ;Lo;0;L;;;;;N;;;;; +16893;BAMUM LETTER PHASE-C NGGEN;Lo;0;L;;;;;N;;;;; +16894;BAMUM LETTER PHASE-C NDEUAEREE;Lo;0;L;;;;;N;;;;; +16895;BAMUM LETTER PHASE-C NGKAQ;Lo;0;L;;;;;N;;;;; +16896;BAMUM LETTER PHASE-C GHARAE;Lo;0;L;;;;;N;;;;; +16897;BAMUM LETTER PHASE-C MBEEKEET;Lo;0;L;;;;;N;;;;; +16898;BAMUM LETTER PHASE-C GBAYI;Lo;0;L;;;;;N;;;;; +16899;BAMUM LETTER PHASE-C NYIR MKPARAQ MEUN;Lo;0;L;;;;;N;;;;; +1689A;BAMUM LETTER PHASE-C NTU MBIT;Lo;0;L;;;;;N;;;;; +1689B;BAMUM LETTER PHASE-C MBEUM;Lo;0;L;;;;;N;;;;; +1689C;BAMUM LETTER PHASE-C PIRIEEN;Lo;0;L;;;;;N;;;;; +1689D;BAMUM LETTER PHASE-C NDOMBU;Lo;0;L;;;;;N;;;;; +1689E;BAMUM LETTER PHASE-C MBAA CABBAGE-TREE;Lo;0;L;;;;;N;;;;; +1689F;BAMUM LETTER PHASE-C KEUSHEUAEP;Lo;0;L;;;;;N;;;;; +168A0;BAMUM LETTER PHASE-C GHAP;Lo;0;L;;;;;N;;;;; +168A1;BAMUM LETTER PHASE-C KEUKAQ;Lo;0;L;;;;;N;;;;; +168A2;BAMUM LETTER PHASE-C YU MUOMAE;Lo;0;L;;;;;N;;;;; +168A3;BAMUM LETTER PHASE-C NZEUM;Lo;0;L;;;;;N;;;;; +168A4;BAMUM LETTER PHASE-C MBUE;Lo;0;L;;;;;N;;;;; +168A5;BAMUM LETTER PHASE-C NSEUAEN;Lo;0;L;;;;;N;;;;; +168A6;BAMUM LETTER PHASE-C MBIT;Lo;0;L;;;;;N;;;;; +168A7;BAMUM LETTER PHASE-C YEUQ;Lo;0;L;;;;;N;;;;; +168A8;BAMUM LETTER PHASE-C KPARAQ;Lo;0;L;;;;;N;;;;; +168A9;BAMUM LETTER PHASE-C KAA;Lo;0;L;;;;;N;;;;; +168AA;BAMUM LETTER PHASE-C SEUX;Lo;0;L;;;;;N;;;;; +168AB;BAMUM LETTER PHASE-C NDIDA;Lo;0;L;;;;;N;;;;; +168AC;BAMUM LETTER PHASE-C TAASHAE;Lo;0;L;;;;;N;;;;; +168AD;BAMUM LETTER PHASE-C NJUEQ;Lo;0;L;;;;;N;;;;; +168AE;BAMUM LETTER PHASE-C TITA YUE;Lo;0;L;;;;;N;;;;; +168AF;BAMUM LETTER PHASE-C SUAET;Lo;0;L;;;;;N;;;;; +168B0;BAMUM LETTER PHASE-C NGGUAEN NYAM;Lo;0;L;;;;;N;;;;; +168B1;BAMUM LETTER PHASE-C VEUX;Lo;0;L;;;;;N;;;;; +168B2;BAMUM LETTER PHASE-C NANSANAQ;Lo;0;L;;;;;N;;;;; +168B3;BAMUM LETTER PHASE-C MA KEUAERI;Lo;0;L;;;;;N;;;;; +168B4;BAMUM LETTER PHASE-C NTAA;Lo;0;L;;;;;N;;;;; +168B5;BAMUM LETTER PHASE-C NGGUON;Lo;0;L;;;;;N;;;;; +168B6;BAMUM LETTER PHASE-C LAP;Lo;0;L;;;;;N;;;;; +168B7;BAMUM LETTER PHASE-C MBIRIEEN;Lo;0;L;;;;;N;;;;; +168B8;BAMUM LETTER PHASE-C MGBASAQ;Lo;0;L;;;;;N;;;;; +168B9;BAMUM LETTER PHASE-C NTEUNGBA;Lo;0;L;;;;;N;;;;; +168BA;BAMUM LETTER PHASE-C TEUTEUX;Lo;0;L;;;;;N;;;;; +168BB;BAMUM LETTER PHASE-C NGGUM;Lo;0;L;;;;;N;;;;; +168BC;BAMUM LETTER PHASE-C FUE;Lo;0;L;;;;;N;;;;; +168BD;BAMUM LETTER PHASE-C NDEUT;Lo;0;L;;;;;N;;;;; +168BE;BAMUM LETTER PHASE-C NSA;Lo;0;L;;;;;N;;;;; +168BF;BAMUM LETTER PHASE-C NSHAQ;Lo;0;L;;;;;N;;;;; +168C0;BAMUM LETTER PHASE-C BUNG;Lo;0;L;;;;;N;;;;; +168C1;BAMUM LETTER PHASE-C VEUAEPEN;Lo;0;L;;;;;N;;;;; +168C2;BAMUM LETTER PHASE-C MBERAE;Lo;0;L;;;;;N;;;;; +168C3;BAMUM LETTER PHASE-C RU;Lo;0;L;;;;;N;;;;; +168C4;BAMUM LETTER PHASE-C NJAEM;Lo;0;L;;;;;N;;;;; +168C5;BAMUM LETTER PHASE-C LAM;Lo;0;L;;;;;N;;;;; +168C6;BAMUM LETTER PHASE-C TITUAEP;Lo;0;L;;;;;N;;;;; +168C7;BAMUM LETTER PHASE-C NSUOT NGOM;Lo;0;L;;;;;N;;;;; +168C8;BAMUM LETTER PHASE-C NJEEEE;Lo;0;L;;;;;N;;;;; +168C9;BAMUM LETTER PHASE-C KET;Lo;0;L;;;;;N;;;;; +168CA;BAMUM LETTER PHASE-C NGGU;Lo;0;L;;;;;N;;;;; +168CB;BAMUM LETTER PHASE-C MAESI;Lo;0;L;;;;;N;;;;; +168CC;BAMUM LETTER PHASE-C MBUAEM;Lo;0;L;;;;;N;;;;; +168CD;BAMUM LETTER PHASE-C LU;Lo;0;L;;;;;N;;;;; +168CE;BAMUM LETTER PHASE-C KUT;Lo;0;L;;;;;N;;;;; +168CF;BAMUM LETTER PHASE-C NJAM;Lo;0;L;;;;;N;;;;; +168D0;BAMUM LETTER PHASE-C NGOM;Lo;0;L;;;;;N;;;;; +168D1;BAMUM LETTER PHASE-C WUP;Lo;0;L;;;;;N;;;;; +168D2;BAMUM LETTER PHASE-C NGGUEET;Lo;0;L;;;;;N;;;;; +168D3;BAMUM LETTER PHASE-C NSOM;Lo;0;L;;;;;N;;;;; +168D4;BAMUM LETTER PHASE-C NTEN;Lo;0;L;;;;;N;;;;; +168D5;BAMUM LETTER PHASE-C KUOP NKAARAE;Lo;0;L;;;;;N;;;;; +168D6;BAMUM LETTER PHASE-C NSUN;Lo;0;L;;;;;N;;;;; +168D7;BAMUM LETTER PHASE-C NDAM;Lo;0;L;;;;;N;;;;; +168D8;BAMUM LETTER PHASE-C MA NSIEE;Lo;0;L;;;;;N;;;;; +168D9;BAMUM LETTER PHASE-C YAA;Lo;0;L;;;;;N;;;;; +168DA;BAMUM LETTER PHASE-C NDAP;Lo;0;L;;;;;N;;;;; +168DB;BAMUM LETTER PHASE-C SHUEQ;Lo;0;L;;;;;N;;;;; +168DC;BAMUM LETTER PHASE-C SETFON;Lo;0;L;;;;;N;;;;; +168DD;BAMUM LETTER PHASE-C MBI;Lo;0;L;;;;;N;;;;; +168DE;BAMUM LETTER PHASE-C MAEMBA;Lo;0;L;;;;;N;;;;; +168DF;BAMUM LETTER PHASE-C MBANYI;Lo;0;L;;;;;N;;;;; +168E0;BAMUM LETTER PHASE-C KEUSEUX;Lo;0;L;;;;;N;;;;; +168E1;BAMUM LETTER PHASE-C MBEUX;Lo;0;L;;;;;N;;;;; +168E2;BAMUM LETTER PHASE-C KEUM;Lo;0;L;;;;;N;;;;; +168E3;BAMUM LETTER PHASE-C MBAA PICKET;Lo;0;L;;;;;N;;;;; +168E4;BAMUM LETTER PHASE-C YUWOQ;Lo;0;L;;;;;N;;;;; +168E5;BAMUM LETTER PHASE-C NJEUX;Lo;0;L;;;;;N;;;;; +168E6;BAMUM LETTER PHASE-C MIEE;Lo;0;L;;;;;N;;;;; +168E7;BAMUM LETTER PHASE-C MUAE;Lo;0;L;;;;;N;;;;; +168E8;BAMUM LETTER PHASE-C SHIQ;Lo;0;L;;;;;N;;;;; +168E9;BAMUM LETTER PHASE-C KEN LAW;Lo;0;L;;;;;N;;;;; +168EA;BAMUM LETTER PHASE-C KEN FATIGUE;Lo;0;L;;;;;N;;;;; +168EB;BAMUM LETTER PHASE-C NGAQ;Lo;0;L;;;;;N;;;;; +168EC;BAMUM LETTER PHASE-C NAQ;Lo;0;L;;;;;N;;;;; +168ED;BAMUM LETTER PHASE-C LIQ;Lo;0;L;;;;;N;;;;; +168EE;BAMUM LETTER PHASE-C PIN;Lo;0;L;;;;;N;;;;; +168EF;BAMUM LETTER PHASE-C PEN;Lo;0;L;;;;;N;;;;; +168F0;BAMUM LETTER PHASE-C TET;Lo;0;L;;;;;N;;;;; +168F1;BAMUM LETTER PHASE-D MBUO;Lo;0;L;;;;;N;;;;; +168F2;BAMUM LETTER PHASE-D WAP;Lo;0;L;;;;;N;;;;; +168F3;BAMUM LETTER PHASE-D NJI;Lo;0;L;;;;;N;;;;; +168F4;BAMUM LETTER PHASE-D MFON;Lo;0;L;;;;;N;;;;; +168F5;BAMUM LETTER PHASE-D NJIEE;Lo;0;L;;;;;N;;;;; +168F6;BAMUM LETTER PHASE-D LIEE;Lo;0;L;;;;;N;;;;; +168F7;BAMUM LETTER PHASE-D NJEUT;Lo;0;L;;;;;N;;;;; +168F8;BAMUM LETTER PHASE-D NSHEE;Lo;0;L;;;;;N;;;;; +168F9;BAMUM LETTER PHASE-D NGGAAMAE;Lo;0;L;;;;;N;;;;; +168FA;BAMUM LETTER PHASE-D NYAM;Lo;0;L;;;;;N;;;;; +168FB;BAMUM LETTER PHASE-D WUAEN;Lo;0;L;;;;;N;;;;; +168FC;BAMUM LETTER PHASE-D NGKUN;Lo;0;L;;;;;N;;;;; +168FD;BAMUM LETTER PHASE-D SHEE;Lo;0;L;;;;;N;;;;; +168FE;BAMUM LETTER PHASE-D NGKAP;Lo;0;L;;;;;N;;;;; +168FF;BAMUM LETTER PHASE-D KEUAETMEUN;Lo;0;L;;;;;N;;;;; +16900;BAMUM LETTER PHASE-D TEUT;Lo;0;L;;;;;N;;;;; +16901;BAMUM LETTER PHASE-D SHEUAE;Lo;0;L;;;;;N;;;;; +16902;BAMUM LETTER PHASE-D NJAP;Lo;0;L;;;;;N;;;;; +16903;BAMUM LETTER PHASE-D SUE;Lo;0;L;;;;;N;;;;; +16904;BAMUM LETTER PHASE-D KET;Lo;0;L;;;;;N;;;;; +16905;BAMUM LETTER PHASE-D YAEMMAE;Lo;0;L;;;;;N;;;;; +16906;BAMUM LETTER PHASE-D KUOM;Lo;0;L;;;;;N;;;;; +16907;BAMUM LETTER PHASE-D SAP;Lo;0;L;;;;;N;;;;; +16908;BAMUM LETTER PHASE-D MFEUT;Lo;0;L;;;;;N;;;;; +16909;BAMUM LETTER PHASE-D NDEUX;Lo;0;L;;;;;N;;;;; +1690A;BAMUM LETTER PHASE-D MALEERI;Lo;0;L;;;;;N;;;;; +1690B;BAMUM LETTER PHASE-D MEUT;Lo;0;L;;;;;N;;;;; +1690C;BAMUM LETTER PHASE-D SEUAEQ;Lo;0;L;;;;;N;;;;; +1690D;BAMUM LETTER PHASE-D YEN;Lo;0;L;;;;;N;;;;; +1690E;BAMUM LETTER PHASE-D NJEUAEM;Lo;0;L;;;;;N;;;;; +1690F;BAMUM LETTER PHASE-D KEUOT MBUAE;Lo;0;L;;;;;N;;;;; +16910;BAMUM LETTER PHASE-D NGKEURI;Lo;0;L;;;;;N;;;;; +16911;BAMUM LETTER PHASE-D TU;Lo;0;L;;;;;N;;;;; +16912;BAMUM LETTER PHASE-D GHAA;Lo;0;L;;;;;N;;;;; +16913;BAMUM LETTER PHASE-D NGKYEE;Lo;0;L;;;;;N;;;;; +16914;BAMUM LETTER PHASE-D FEUFEUAET;Lo;0;L;;;;;N;;;;; +16915;BAMUM LETTER PHASE-D NDEE;Lo;0;L;;;;;N;;;;; +16916;BAMUM LETTER PHASE-D MGBOFUM;Lo;0;L;;;;;N;;;;; +16917;BAMUM LETTER PHASE-D LEUAEP;Lo;0;L;;;;;N;;;;; +16918;BAMUM LETTER PHASE-D NDON;Lo;0;L;;;;;N;;;;; +16919;BAMUM LETTER PHASE-D MONI;Lo;0;L;;;;;N;;;;; +1691A;BAMUM LETTER PHASE-D MGBEUN;Lo;0;L;;;;;N;;;;; +1691B;BAMUM LETTER PHASE-D PUUT;Lo;0;L;;;;;N;;;;; +1691C;BAMUM LETTER PHASE-D MGBIEE;Lo;0;L;;;;;N;;;;; +1691D;BAMUM LETTER PHASE-D MFO;Lo;0;L;;;;;N;;;;; +1691E;BAMUM LETTER PHASE-D LUM;Lo;0;L;;;;;N;;;;; +1691F;BAMUM LETTER PHASE-D NSIEEP;Lo;0;L;;;;;N;;;;; +16920;BAMUM LETTER PHASE-D MBAA;Lo;0;L;;;;;N;;;;; +16921;BAMUM LETTER PHASE-D KWAET;Lo;0;L;;;;;N;;;;; +16922;BAMUM LETTER PHASE-D NYET;Lo;0;L;;;;;N;;;;; +16923;BAMUM LETTER PHASE-D TEUAEN;Lo;0;L;;;;;N;;;;; +16924;BAMUM LETTER PHASE-D SOT;Lo;0;L;;;;;N;;;;; +16925;BAMUM LETTER PHASE-D YUWOQ;Lo;0;L;;;;;N;;;;; +16926;BAMUM LETTER PHASE-D KEUM;Lo;0;L;;;;;N;;;;; +16927;BAMUM LETTER PHASE-D RAEM;Lo;0;L;;;;;N;;;;; +16928;BAMUM LETTER PHASE-D TEEEE;Lo;0;L;;;;;N;;;;; +16929;BAMUM LETTER PHASE-D NGKEUAEQ;Lo;0;L;;;;;N;;;;; +1692A;BAMUM LETTER PHASE-D MFEUAE;Lo;0;L;;;;;N;;;;; +1692B;BAMUM LETTER PHASE-D NSIEET;Lo;0;L;;;;;N;;;;; +1692C;BAMUM LETTER PHASE-D KEUP;Lo;0;L;;;;;N;;;;; +1692D;BAMUM LETTER PHASE-D PIP;Lo;0;L;;;;;N;;;;; +1692E;BAMUM LETTER PHASE-D PEUTAE;Lo;0;L;;;;;N;;;;; +1692F;BAMUM LETTER PHASE-D NYUE;Lo;0;L;;;;;N;;;;; +16930;BAMUM LETTER PHASE-D LET;Lo;0;L;;;;;N;;;;; +16931;BAMUM LETTER PHASE-D NGGAAM;Lo;0;L;;;;;N;;;;; +16932;BAMUM LETTER PHASE-D MFIEE;Lo;0;L;;;;;N;;;;; +16933;BAMUM LETTER PHASE-D NGGWAEN;Lo;0;L;;;;;N;;;;; +16934;BAMUM LETTER PHASE-D YUOM;Lo;0;L;;;;;N;;;;; +16935;BAMUM LETTER PHASE-D PAP;Lo;0;L;;;;;N;;;;; +16936;BAMUM LETTER PHASE-D YUOP;Lo;0;L;;;;;N;;;;; +16937;BAMUM LETTER PHASE-D NDAM;Lo;0;L;;;;;N;;;;; +16938;BAMUM LETTER PHASE-D NTEUM;Lo;0;L;;;;;N;;;;; +16939;BAMUM LETTER PHASE-D SUAE;Lo;0;L;;;;;N;;;;; +1693A;BAMUM LETTER PHASE-D KUN;Lo;0;L;;;;;N;;;;; +1693B;BAMUM LETTER PHASE-D NGGEUX;Lo;0;L;;;;;N;;;;; +1693C;BAMUM LETTER PHASE-D NGKIEE;Lo;0;L;;;;;N;;;;; +1693D;BAMUM LETTER PHASE-D TUOT;Lo;0;L;;;;;N;;;;; +1693E;BAMUM LETTER PHASE-D MEUN;Lo;0;L;;;;;N;;;;; +1693F;BAMUM LETTER PHASE-D KUQ;Lo;0;L;;;;;N;;;;; +16940;BAMUM LETTER PHASE-D NSUM;Lo;0;L;;;;;N;;;;; +16941;BAMUM LETTER PHASE-D TEUN;Lo;0;L;;;;;N;;;;; +16942;BAMUM LETTER PHASE-D MAENJET;Lo;0;L;;;;;N;;;;; +16943;BAMUM LETTER PHASE-D NGGAP;Lo;0;L;;;;;N;;;;; +16944;BAMUM LETTER PHASE-D LEUM;Lo;0;L;;;;;N;;;;; +16945;BAMUM LETTER PHASE-D NGGUOM;Lo;0;L;;;;;N;;;;; +16946;BAMUM LETTER PHASE-D NSHUT;Lo;0;L;;;;;N;;;;; +16947;BAMUM LETTER PHASE-D NJUEQ;Lo;0;L;;;;;N;;;;; +16948;BAMUM LETTER PHASE-D GHEUAE;Lo;0;L;;;;;N;;;;; +16949;BAMUM LETTER PHASE-D KU;Lo;0;L;;;;;N;;;;; +1694A;BAMUM LETTER PHASE-D REN OLD;Lo;0;L;;;;;N;;;;; +1694B;BAMUM LETTER PHASE-D TAE;Lo;0;L;;;;;N;;;;; +1694C;BAMUM LETTER PHASE-D TOQ;Lo;0;L;;;;;N;;;;; +1694D;BAMUM LETTER PHASE-D NYI;Lo;0;L;;;;;N;;;;; +1694E;BAMUM LETTER PHASE-D RII;Lo;0;L;;;;;N;;;;; +1694F;BAMUM LETTER PHASE-D LEEEE;Lo;0;L;;;;;N;;;;; +16950;BAMUM LETTER PHASE-D MEEEE;Lo;0;L;;;;;N;;;;; +16951;BAMUM LETTER PHASE-D M;Lo;0;L;;;;;N;;;;; +16952;BAMUM LETTER PHASE-D SUU;Lo;0;L;;;;;N;;;;; +16953;BAMUM LETTER PHASE-D MU;Lo;0;L;;;;;N;;;;; +16954;BAMUM LETTER PHASE-D SHII;Lo;0;L;;;;;N;;;;; +16955;BAMUM LETTER PHASE-D SHEUX;Lo;0;L;;;;;N;;;;; +16956;BAMUM LETTER PHASE-D KYEE;Lo;0;L;;;;;N;;;;; +16957;BAMUM LETTER PHASE-D NU;Lo;0;L;;;;;N;;;;; +16958;BAMUM LETTER PHASE-D SHU;Lo;0;L;;;;;N;;;;; +16959;BAMUM LETTER PHASE-D NTEE;Lo;0;L;;;;;N;;;;; +1695A;BAMUM LETTER PHASE-D PEE;Lo;0;L;;;;;N;;;;; +1695B;BAMUM LETTER PHASE-D NI;Lo;0;L;;;;;N;;;;; +1695C;BAMUM LETTER PHASE-D SHOQ;Lo;0;L;;;;;N;;;;; +1695D;BAMUM LETTER PHASE-D PUQ;Lo;0;L;;;;;N;;;;; +1695E;BAMUM LETTER PHASE-D MVOP;Lo;0;L;;;;;N;;;;; +1695F;BAMUM LETTER PHASE-D LOQ;Lo;0;L;;;;;N;;;;; +16960;BAMUM LETTER PHASE-D REN MUCH;Lo;0;L;;;;;N;;;;; +16961;BAMUM LETTER PHASE-D TI;Lo;0;L;;;;;N;;;;; +16962;BAMUM LETTER PHASE-D NTUU;Lo;0;L;;;;;N;;;;; +16963;BAMUM LETTER PHASE-D MBAA SEVEN;Lo;0;L;;;;;N;;;;; +16964;BAMUM LETTER PHASE-D SAQ;Lo;0;L;;;;;N;;;;; +16965;BAMUM LETTER PHASE-D FAA;Lo;0;L;;;;;N;;;;; +16966;BAMUM LETTER PHASE-E NDAP;Lo;0;L;;;;;N;;;;; +16967;BAMUM LETTER PHASE-E TOON;Lo;0;L;;;;;N;;;;; +16968;BAMUM LETTER PHASE-E MBEUM;Lo;0;L;;;;;N;;;;; +16969;BAMUM LETTER PHASE-E LAP;Lo;0;L;;;;;N;;;;; +1696A;BAMUM LETTER PHASE-E VOM;Lo;0;L;;;;;N;;;;; +1696B;BAMUM LETTER PHASE-E LOON;Lo;0;L;;;;;N;;;;; +1696C;BAMUM LETTER PHASE-E PAA;Lo;0;L;;;;;N;;;;; +1696D;BAMUM LETTER PHASE-E SOM;Lo;0;L;;;;;N;;;;; +1696E;BAMUM LETTER PHASE-E RAQ;Lo;0;L;;;;;N;;;;; +1696F;BAMUM LETTER PHASE-E NSHUOP;Lo;0;L;;;;;N;;;;; +16970;BAMUM LETTER PHASE-E NDUN;Lo;0;L;;;;;N;;;;; +16971;BAMUM LETTER PHASE-E PUAE;Lo;0;L;;;;;N;;;;; +16972;BAMUM LETTER PHASE-E TAM;Lo;0;L;;;;;N;;;;; +16973;BAMUM LETTER PHASE-E NGKA;Lo;0;L;;;;;N;;;;; +16974;BAMUM LETTER PHASE-E KPEUX;Lo;0;L;;;;;N;;;;; +16975;BAMUM LETTER PHASE-E WUO;Lo;0;L;;;;;N;;;;; +16976;BAMUM LETTER PHASE-E SEE;Lo;0;L;;;;;N;;;;; +16977;BAMUM LETTER PHASE-E NGGEUAET;Lo;0;L;;;;;N;;;;; +16978;BAMUM LETTER PHASE-E PAAM;Lo;0;L;;;;;N;;;;; +16979;BAMUM LETTER PHASE-E TOO;Lo;0;L;;;;;N;;;;; +1697A;BAMUM LETTER PHASE-E KUOP;Lo;0;L;;;;;N;;;;; +1697B;BAMUM LETTER PHASE-E LOM;Lo;0;L;;;;;N;;;;; +1697C;BAMUM LETTER PHASE-E NSHIEE;Lo;0;L;;;;;N;;;;; +1697D;BAMUM LETTER PHASE-E NGOP;Lo;0;L;;;;;N;;;;; +1697E;BAMUM LETTER PHASE-E MAEM;Lo;0;L;;;;;N;;;;; +1697F;BAMUM LETTER PHASE-E NGKEUX;Lo;0;L;;;;;N;;;;; +16980;BAMUM LETTER PHASE-E NGOQ;Lo;0;L;;;;;N;;;;; +16981;BAMUM LETTER PHASE-E NSHUE;Lo;0;L;;;;;N;;;;; +16982;BAMUM LETTER PHASE-E RIMGBA;Lo;0;L;;;;;N;;;;; +16983;BAMUM LETTER PHASE-E NJEUX;Lo;0;L;;;;;N;;;;; +16984;BAMUM LETTER PHASE-E PEEM;Lo;0;L;;;;;N;;;;; +16985;BAMUM LETTER PHASE-E SAA;Lo;0;L;;;;;N;;;;; +16986;BAMUM LETTER PHASE-E NGGURAE;Lo;0;L;;;;;N;;;;; +16987;BAMUM LETTER PHASE-E MGBA;Lo;0;L;;;;;N;;;;; +16988;BAMUM LETTER PHASE-E GHEUX;Lo;0;L;;;;;N;;;;; +16989;BAMUM LETTER PHASE-E NGKEUAEM;Lo;0;L;;;;;N;;;;; +1698A;BAMUM LETTER PHASE-E NJAEMLI;Lo;0;L;;;;;N;;;;; +1698B;BAMUM LETTER PHASE-E MAP;Lo;0;L;;;;;N;;;;; +1698C;BAMUM LETTER PHASE-E LOOT;Lo;0;L;;;;;N;;;;; +1698D;BAMUM LETTER PHASE-E NGGEEEE;Lo;0;L;;;;;N;;;;; +1698E;BAMUM LETTER PHASE-E NDIQ;Lo;0;L;;;;;N;;;;; +1698F;BAMUM LETTER PHASE-E TAEN NTEUM;Lo;0;L;;;;;N;;;;; +16990;BAMUM LETTER PHASE-E SET;Lo;0;L;;;;;N;;;;; +16991;BAMUM LETTER PHASE-E PUM;Lo;0;L;;;;;N;;;;; +16992;BAMUM LETTER PHASE-E NDAA SOFTNESS;Lo;0;L;;;;;N;;;;; +16993;BAMUM LETTER PHASE-E NGGUAESHAE NYAM;Lo;0;L;;;;;N;;;;; +16994;BAMUM LETTER PHASE-E YIEE;Lo;0;L;;;;;N;;;;; +16995;BAMUM LETTER PHASE-E GHEUN;Lo;0;L;;;;;N;;;;; +16996;BAMUM LETTER PHASE-E TUAE;Lo;0;L;;;;;N;;;;; +16997;BAMUM LETTER PHASE-E YEUAE;Lo;0;L;;;;;N;;;;; +16998;BAMUM LETTER PHASE-E PO;Lo;0;L;;;;;N;;;;; +16999;BAMUM LETTER PHASE-E TUMAE;Lo;0;L;;;;;N;;;;; +1699A;BAMUM LETTER PHASE-E KEUAE;Lo;0;L;;;;;N;;;;; +1699B;BAMUM LETTER PHASE-E SUAEN;Lo;0;L;;;;;N;;;;; +1699C;BAMUM LETTER PHASE-E TEUAEQ;Lo;0;L;;;;;N;;;;; +1699D;BAMUM LETTER PHASE-E VEUAE;Lo;0;L;;;;;N;;;;; +1699E;BAMUM LETTER PHASE-E WEUX;Lo;0;L;;;;;N;;;;; +1699F;BAMUM LETTER PHASE-E LAAM;Lo;0;L;;;;;N;;;;; +169A0;BAMUM LETTER PHASE-E PU;Lo;0;L;;;;;N;;;;; +169A1;BAMUM LETTER PHASE-E TAAQ;Lo;0;L;;;;;N;;;;; +169A2;BAMUM LETTER PHASE-E GHAAMAE;Lo;0;L;;;;;N;;;;; +169A3;BAMUM LETTER PHASE-E NGEUREUT;Lo;0;L;;;;;N;;;;; +169A4;BAMUM LETTER PHASE-E SHEUAEQ;Lo;0;L;;;;;N;;;;; +169A5;BAMUM LETTER PHASE-E MGBEN;Lo;0;L;;;;;N;;;;; +169A6;BAMUM LETTER PHASE-E MBEE;Lo;0;L;;;;;N;;;;; +169A7;BAMUM LETTER PHASE-E NZAQ;Lo;0;L;;;;;N;;;;; +169A8;BAMUM LETTER PHASE-E NKOM;Lo;0;L;;;;;N;;;;; +169A9;BAMUM LETTER PHASE-E GBET;Lo;0;L;;;;;N;;;;; +169AA;BAMUM LETTER PHASE-E TUM;Lo;0;L;;;;;N;;;;; +169AB;BAMUM LETTER PHASE-E KUET;Lo;0;L;;;;;N;;;;; +169AC;BAMUM LETTER PHASE-E YAP;Lo;0;L;;;;;N;;;;; +169AD;BAMUM LETTER PHASE-E NYI CLEAVER;Lo;0;L;;;;;N;;;;; +169AE;BAMUM LETTER PHASE-E YIT;Lo;0;L;;;;;N;;;;; +169AF;BAMUM LETTER PHASE-E MFEUQ;Lo;0;L;;;;;N;;;;; +169B0;BAMUM LETTER PHASE-E NDIAQ;Lo;0;L;;;;;N;;;;; +169B1;BAMUM LETTER PHASE-E PIEEQ;Lo;0;L;;;;;N;;;;; +169B2;BAMUM LETTER PHASE-E YUEQ;Lo;0;L;;;;;N;;;;; +169B3;BAMUM LETTER PHASE-E LEUAEM;Lo;0;L;;;;;N;;;;; +169B4;BAMUM LETTER PHASE-E FUE;Lo;0;L;;;;;N;;;;; +169B5;BAMUM LETTER PHASE-E GBEUX;Lo;0;L;;;;;N;;;;; +169B6;BAMUM LETTER PHASE-E NGKUP;Lo;0;L;;;;;N;;;;; +169B7;BAMUM LETTER PHASE-E KET;Lo;0;L;;;;;N;;;;; +169B8;BAMUM LETTER PHASE-E MAE;Lo;0;L;;;;;N;;;;; +169B9;BAMUM LETTER PHASE-E NGKAAMI;Lo;0;L;;;;;N;;;;; +169BA;BAMUM LETTER PHASE-E GHET;Lo;0;L;;;;;N;;;;; +169BB;BAMUM LETTER PHASE-E FA;Lo;0;L;;;;;N;;;;; +169BC;BAMUM LETTER PHASE-E NTUM;Lo;0;L;;;;;N;;;;; +169BD;BAMUM LETTER PHASE-E PEUT;Lo;0;L;;;;;N;;;;; +169BE;BAMUM LETTER PHASE-E YEUM;Lo;0;L;;;;;N;;;;; +169BF;BAMUM LETTER PHASE-E NGGEUAE;Lo;0;L;;;;;N;;;;; +169C0;BAMUM LETTER PHASE-E NYI BETWEEN;Lo;0;L;;;;;N;;;;; +169C1;BAMUM LETTER PHASE-E NZUQ;Lo;0;L;;;;;N;;;;; +169C2;BAMUM LETTER PHASE-E POON;Lo;0;L;;;;;N;;;;; +169C3;BAMUM LETTER PHASE-E MIEE;Lo;0;L;;;;;N;;;;; +169C4;BAMUM LETTER PHASE-E FUET;Lo;0;L;;;;;N;;;;; +169C5;BAMUM LETTER PHASE-E NAE;Lo;0;L;;;;;N;;;;; +169C6;BAMUM LETTER PHASE-E MUAE;Lo;0;L;;;;;N;;;;; +169C7;BAMUM LETTER PHASE-E GHEUAE;Lo;0;L;;;;;N;;;;; +169C8;BAMUM LETTER PHASE-E FU I;Lo;0;L;;;;;N;;;;; +169C9;BAMUM LETTER PHASE-E MVI;Lo;0;L;;;;;N;;;;; +169CA;BAMUM LETTER PHASE-E PUAQ;Lo;0;L;;;;;N;;;;; +169CB;BAMUM LETTER PHASE-E NGKUM;Lo;0;L;;;;;N;;;;; +169CC;BAMUM LETTER PHASE-E KUT;Lo;0;L;;;;;N;;;;; +169CD;BAMUM LETTER PHASE-E PIET;Lo;0;L;;;;;N;;;;; +169CE;BAMUM LETTER PHASE-E NTAP;Lo;0;L;;;;;N;;;;; +169CF;BAMUM LETTER PHASE-E YEUAET;Lo;0;L;;;;;N;;;;; +169D0;BAMUM LETTER PHASE-E NGGUP;Lo;0;L;;;;;N;;;;; +169D1;BAMUM LETTER PHASE-E PA PEOPLE;Lo;0;L;;;;;N;;;;; +169D2;BAMUM LETTER PHASE-E FU CALL;Lo;0;L;;;;;N;;;;; +169D3;BAMUM LETTER PHASE-E FOM;Lo;0;L;;;;;N;;;;; +169D4;BAMUM LETTER PHASE-E NJEE;Lo;0;L;;;;;N;;;;; +169D5;BAMUM LETTER PHASE-E A;Lo;0;L;;;;;N;;;;; +169D6;BAMUM LETTER PHASE-E TOQ;Lo;0;L;;;;;N;;;;; +169D7;BAMUM LETTER PHASE-E O;Lo;0;L;;;;;N;;;;; +169D8;BAMUM LETTER PHASE-E I;Lo;0;L;;;;;N;;;;; +169D9;BAMUM LETTER PHASE-E LAQ;Lo;0;L;;;;;N;;;;; +169DA;BAMUM LETTER PHASE-E PA PLURAL;Lo;0;L;;;;;N;;;;; +169DB;BAMUM LETTER PHASE-E TAA;Lo;0;L;;;;;N;;;;; +169DC;BAMUM LETTER PHASE-E TAQ;Lo;0;L;;;;;N;;;;; +169DD;BAMUM LETTER PHASE-E NDAA MY HOUSE;Lo;0;L;;;;;N;;;;; +169DE;BAMUM LETTER PHASE-E SHIQ;Lo;0;L;;;;;N;;;;; +169DF;BAMUM LETTER PHASE-E YEUX;Lo;0;L;;;;;N;;;;; +169E0;BAMUM LETTER PHASE-E NGUAE;Lo;0;L;;;;;N;;;;; +169E1;BAMUM LETTER PHASE-E YUAEN;Lo;0;L;;;;;N;;;;; +169E2;BAMUM LETTER PHASE-E YOQ SWIMMING;Lo;0;L;;;;;N;;;;; +169E3;BAMUM LETTER PHASE-E YOQ COVER;Lo;0;L;;;;;N;;;;; +169E4;BAMUM LETTER PHASE-E YUQ;Lo;0;L;;;;;N;;;;; +169E5;BAMUM LETTER PHASE-E YUN;Lo;0;L;;;;;N;;;;; +169E6;BAMUM LETTER PHASE-E KEUX;Lo;0;L;;;;;N;;;;; +169E7;BAMUM LETTER PHASE-E PEUX;Lo;0;L;;;;;N;;;;; +169E8;BAMUM LETTER PHASE-E NJEE EPOCH;Lo;0;L;;;;;N;;;;; +169E9;BAMUM LETTER PHASE-E PUE;Lo;0;L;;;;;N;;;;; +169EA;BAMUM LETTER PHASE-E WUE;Lo;0;L;;;;;N;;;;; +169EB;BAMUM LETTER PHASE-E FEE;Lo;0;L;;;;;N;;;;; +169EC;BAMUM LETTER PHASE-E VEE;Lo;0;L;;;;;N;;;;; +169ED;BAMUM LETTER PHASE-E LU;Lo;0;L;;;;;N;;;;; +169EE;BAMUM LETTER PHASE-E MI;Lo;0;L;;;;;N;;;;; +169EF;BAMUM LETTER PHASE-E REUX;Lo;0;L;;;;;N;;;;; +169F0;BAMUM LETTER PHASE-E RAE;Lo;0;L;;;;;N;;;;; +169F1;BAMUM LETTER PHASE-E NGUAET;Lo;0;L;;;;;N;;;;; +169F2;BAMUM LETTER PHASE-E NGA;Lo;0;L;;;;;N;;;;; +169F3;BAMUM LETTER PHASE-E SHO;Lo;0;L;;;;;N;;;;; +169F4;BAMUM LETTER PHASE-E SHOQ;Lo;0;L;;;;;N;;;;; +169F5;BAMUM LETTER PHASE-E FU REMEDY;Lo;0;L;;;;;N;;;;; +169F6;BAMUM LETTER PHASE-E NA;Lo;0;L;;;;;N;;;;; +169F7;BAMUM LETTER PHASE-E PI;Lo;0;L;;;;;N;;;;; +169F8;BAMUM LETTER PHASE-E LOQ;Lo;0;L;;;;;N;;;;; +169F9;BAMUM LETTER PHASE-E KO;Lo;0;L;;;;;N;;;;; +169FA;BAMUM LETTER PHASE-E MEN;Lo;0;L;;;;;N;;;;; +169FB;BAMUM LETTER PHASE-E MA;Lo;0;L;;;;;N;;;;; +169FC;BAMUM LETTER PHASE-E MAQ;Lo;0;L;;;;;N;;;;; +169FD;BAMUM LETTER PHASE-E TEU;Lo;0;L;;;;;N;;;;; +169FE;BAMUM LETTER PHASE-E KI;Lo;0;L;;;;;N;;;;; +169FF;BAMUM LETTER PHASE-E MON;Lo;0;L;;;;;N;;;;; +16A00;BAMUM LETTER PHASE-E TEN;Lo;0;L;;;;;N;;;;; +16A01;BAMUM LETTER PHASE-E FAQ;Lo;0;L;;;;;N;;;;; +16A02;BAMUM LETTER PHASE-E GHOM;Lo;0;L;;;;;N;;;;; +16A03;BAMUM LETTER PHASE-F KA;Lo;0;L;;;;;N;;;;; +16A04;BAMUM LETTER PHASE-F U;Lo;0;L;;;;;N;;;;; +16A05;BAMUM LETTER PHASE-F KU;Lo;0;L;;;;;N;;;;; +16A06;BAMUM LETTER PHASE-F EE;Lo;0;L;;;;;N;;;;; +16A07;BAMUM LETTER PHASE-F REE;Lo;0;L;;;;;N;;;;; +16A08;BAMUM LETTER PHASE-F TAE;Lo;0;L;;;;;N;;;;; +16A09;BAMUM LETTER PHASE-F NYI;Lo;0;L;;;;;N;;;;; +16A0A;BAMUM LETTER PHASE-F LA;Lo;0;L;;;;;N;;;;; +16A0B;BAMUM LETTER PHASE-F RII;Lo;0;L;;;;;N;;;;; +16A0C;BAMUM LETTER PHASE-F RIEE;Lo;0;L;;;;;N;;;;; +16A0D;BAMUM LETTER PHASE-F MEEEE;Lo;0;L;;;;;N;;;;; +16A0E;BAMUM LETTER PHASE-F TAA;Lo;0;L;;;;;N;;;;; +16A0F;BAMUM LETTER PHASE-F NDAA;Lo;0;L;;;;;N;;;;; +16A10;BAMUM LETTER PHASE-F NJAEM;Lo;0;L;;;;;N;;;;; +16A11;BAMUM LETTER PHASE-F M;Lo;0;L;;;;;N;;;;; +16A12;BAMUM LETTER PHASE-F SUU;Lo;0;L;;;;;N;;;;; +16A13;BAMUM LETTER PHASE-F SHII;Lo;0;L;;;;;N;;;;; +16A14;BAMUM LETTER PHASE-F SI;Lo;0;L;;;;;N;;;;; +16A15;BAMUM LETTER PHASE-F SEUX;Lo;0;L;;;;;N;;;;; +16A16;BAMUM LETTER PHASE-F KYEE;Lo;0;L;;;;;N;;;;; +16A17;BAMUM LETTER PHASE-F KET;Lo;0;L;;;;;N;;;;; +16A18;BAMUM LETTER PHASE-F NUAE;Lo;0;L;;;;;N;;;;; +16A19;BAMUM LETTER PHASE-F NU;Lo;0;L;;;;;N;;;;; +16A1A;BAMUM LETTER PHASE-F NJUAE;Lo;0;L;;;;;N;;;;; +16A1B;BAMUM LETTER PHASE-F YOQ;Lo;0;L;;;;;N;;;;; +16A1C;BAMUM LETTER PHASE-F SHU;Lo;0;L;;;;;N;;;;; +16A1D;BAMUM LETTER PHASE-F YA;Lo;0;L;;;;;N;;;;; +16A1E;BAMUM LETTER PHASE-F NSHA;Lo;0;L;;;;;N;;;;; +16A1F;BAMUM LETTER PHASE-F PEUX;Lo;0;L;;;;;N;;;;; +16A20;BAMUM LETTER PHASE-F NTEE;Lo;0;L;;;;;N;;;;; +16A21;BAMUM LETTER PHASE-F WUE;Lo;0;L;;;;;N;;;;; +16A22;BAMUM LETTER PHASE-F PEE;Lo;0;L;;;;;N;;;;; +16A23;BAMUM LETTER PHASE-F RU;Lo;0;L;;;;;N;;;;; +16A24;BAMUM LETTER PHASE-F NI;Lo;0;L;;;;;N;;;;; +16A25;BAMUM LETTER PHASE-F REUX;Lo;0;L;;;;;N;;;;; +16A26;BAMUM LETTER PHASE-F KEN;Lo;0;L;;;;;N;;;;; +16A27;BAMUM LETTER PHASE-F NGKWAEN;Lo;0;L;;;;;N;;;;; +16A28;BAMUM LETTER PHASE-F NGGA;Lo;0;L;;;;;N;;;;; +16A29;BAMUM LETTER PHASE-F SHO;Lo;0;L;;;;;N;;;;; +16A2A;BAMUM LETTER PHASE-F PUAE;Lo;0;L;;;;;N;;;;; +16A2B;BAMUM LETTER PHASE-F FOM;Lo;0;L;;;;;N;;;;; +16A2C;BAMUM LETTER PHASE-F WA;Lo;0;L;;;;;N;;;;; +16A2D;BAMUM LETTER PHASE-F LI;Lo;0;L;;;;;N;;;;; +16A2E;BAMUM LETTER PHASE-F LOQ;Lo;0;L;;;;;N;;;;; +16A2F;BAMUM LETTER PHASE-F KO;Lo;0;L;;;;;N;;;;; +16A30;BAMUM LETTER PHASE-F MBEN;Lo;0;L;;;;;N;;;;; +16A31;BAMUM LETTER PHASE-F REN;Lo;0;L;;;;;N;;;;; +16A32;BAMUM LETTER PHASE-F MA;Lo;0;L;;;;;N;;;;; +16A33;BAMUM LETTER PHASE-F MO;Lo;0;L;;;;;N;;;;; +16A34;BAMUM LETTER PHASE-F MBAA;Lo;0;L;;;;;N;;;;; +16A35;BAMUM LETTER PHASE-F TET;Lo;0;L;;;;;N;;;;; +16A36;BAMUM LETTER PHASE-F KPA;Lo;0;L;;;;;N;;;;; +16A37;BAMUM LETTER PHASE-F SAMBA;Lo;0;L;;;;;N;;;;; +16A38;BAMUM LETTER PHASE-F VUEQ;Lo;0;L;;;;;N;;;;; +16A40;MRO LETTER TA;Lo;0;L;;;;;N;;;;; +16A41;MRO LETTER NGI;Lo;0;L;;;;;N;;;;; +16A42;MRO LETTER YO;Lo;0;L;;;;;N;;;;; +16A43;MRO LETTER MIM;Lo;0;L;;;;;N;;;;; +16A44;MRO LETTER BA;Lo;0;L;;;;;N;;;;; +16A45;MRO LETTER DA;Lo;0;L;;;;;N;;;;; +16A46;MRO LETTER A;Lo;0;L;;;;;N;;;;; +16A47;MRO LETTER PHI;Lo;0;L;;;;;N;;;;; +16A48;MRO LETTER KHAI;Lo;0;L;;;;;N;;;;; +16A49;MRO LETTER HAO;Lo;0;L;;;;;N;;;;; +16A4A;MRO LETTER DAI;Lo;0;L;;;;;N;;;;; +16A4B;MRO LETTER CHU;Lo;0;L;;;;;N;;;;; +16A4C;MRO LETTER KEAAE;Lo;0;L;;;;;N;;;;; +16A4D;MRO LETTER OL;Lo;0;L;;;;;N;;;;; +16A4E;MRO LETTER MAEM;Lo;0;L;;;;;N;;;;; +16A4F;MRO LETTER NIN;Lo;0;L;;;;;N;;;;; +16A50;MRO LETTER PA;Lo;0;L;;;;;N;;;;; +16A51;MRO LETTER OO;Lo;0;L;;;;;N;;;;; +16A52;MRO LETTER O;Lo;0;L;;;;;N;;;;; +16A53;MRO LETTER RO;Lo;0;L;;;;;N;;;;; +16A54;MRO LETTER SHI;Lo;0;L;;;;;N;;;;; +16A55;MRO LETTER THEA;Lo;0;L;;;;;N;;;;; +16A56;MRO LETTER EA;Lo;0;L;;;;;N;;;;; +16A57;MRO LETTER WA;Lo;0;L;;;;;N;;;;; +16A58;MRO LETTER E;Lo;0;L;;;;;N;;;;; +16A59;MRO LETTER KO;Lo;0;L;;;;;N;;;;; +16A5A;MRO LETTER LAN;Lo;0;L;;;;;N;;;;; +16A5B;MRO LETTER LA;Lo;0;L;;;;;N;;;;; +16A5C;MRO LETTER HAI;Lo;0;L;;;;;N;;;;; +16A5D;MRO LETTER RI;Lo;0;L;;;;;N;;;;; +16A5E;MRO LETTER TEK;Lo;0;L;;;;;N;;;;; +16A60;MRO DIGIT ZERO;Nd;0;L;;0;0;0;N;;;;; +16A61;MRO DIGIT ONE;Nd;0;L;;1;1;1;N;;;;; +16A62;MRO DIGIT TWO;Nd;0;L;;2;2;2;N;;;;; +16A63;MRO DIGIT THREE;Nd;0;L;;3;3;3;N;;;;; +16A64;MRO DIGIT FOUR;Nd;0;L;;4;4;4;N;;;;; +16A65;MRO DIGIT FIVE;Nd;0;L;;5;5;5;N;;;;; +16A66;MRO DIGIT SIX;Nd;0;L;;6;6;6;N;;;;; +16A67;MRO DIGIT SEVEN;Nd;0;L;;7;7;7;N;;;;; +16A68;MRO DIGIT EIGHT;Nd;0;L;;8;8;8;N;;;;; +16A69;MRO DIGIT NINE;Nd;0;L;;9;9;9;N;;;;; +16A6E;MRO DANDA;Po;0;L;;;;;N;;;;; +16A6F;MRO DOUBLE DANDA;Po;0;L;;;;;N;;;;; +16AD0;BASSA VAH LETTER ENNI;Lo;0;L;;;;;N;;;;; +16AD1;BASSA VAH LETTER KA;Lo;0;L;;;;;N;;;;; +16AD2;BASSA VAH LETTER SE;Lo;0;L;;;;;N;;;;; +16AD3;BASSA VAH LETTER FA;Lo;0;L;;;;;N;;;;; +16AD4;BASSA VAH LETTER MBE;Lo;0;L;;;;;N;;;;; +16AD5;BASSA VAH LETTER YIE;Lo;0;L;;;;;N;;;;; +16AD6;BASSA VAH LETTER GAH;Lo;0;L;;;;;N;;;;; +16AD7;BASSA VAH LETTER DHII;Lo;0;L;;;;;N;;;;; +16AD8;BASSA VAH LETTER KPAH;Lo;0;L;;;;;N;;;;; +16AD9;BASSA VAH LETTER JO;Lo;0;L;;;;;N;;;;; +16ADA;BASSA VAH LETTER HWAH;Lo;0;L;;;;;N;;;;; +16ADB;BASSA VAH LETTER WA;Lo;0;L;;;;;N;;;;; +16ADC;BASSA VAH LETTER ZO;Lo;0;L;;;;;N;;;;; +16ADD;BASSA VAH LETTER GBU;Lo;0;L;;;;;N;;;;; +16ADE;BASSA VAH LETTER DO;Lo;0;L;;;;;N;;;;; +16ADF;BASSA VAH LETTER CE;Lo;0;L;;;;;N;;;;; +16AE0;BASSA VAH LETTER UWU;Lo;0;L;;;;;N;;;;; +16AE1;BASSA VAH LETTER TO;Lo;0;L;;;;;N;;;;; +16AE2;BASSA VAH LETTER BA;Lo;0;L;;;;;N;;;;; +16AE3;BASSA VAH LETTER VU;Lo;0;L;;;;;N;;;;; +16AE4;BASSA VAH LETTER YEIN;Lo;0;L;;;;;N;;;;; +16AE5;BASSA VAH LETTER PA;Lo;0;L;;;;;N;;;;; +16AE6;BASSA VAH LETTER WADDA;Lo;0;L;;;;;N;;;;; +16AE7;BASSA VAH LETTER A;Lo;0;L;;;;;N;;;;; +16AE8;BASSA VAH LETTER O;Lo;0;L;;;;;N;;;;; +16AE9;BASSA VAH LETTER OO;Lo;0;L;;;;;N;;;;; +16AEA;BASSA VAH LETTER U;Lo;0;L;;;;;N;;;;; +16AEB;BASSA VAH LETTER EE;Lo;0;L;;;;;N;;;;; +16AEC;BASSA VAH LETTER E;Lo;0;L;;;;;N;;;;; +16AED;BASSA VAH LETTER I;Lo;0;L;;;;;N;;;;; +16AF0;BASSA VAH COMBINING HIGH TONE;Mn;1;NSM;;;;;N;;;;; +16AF1;BASSA VAH COMBINING LOW TONE;Mn;1;NSM;;;;;N;;;;; +16AF2;BASSA VAH COMBINING MID TONE;Mn;1;NSM;;;;;N;;;;; +16AF3;BASSA VAH COMBINING LOW-MID TONE;Mn;1;NSM;;;;;N;;;;; +16AF4;BASSA VAH COMBINING HIGH-LOW TONE;Mn;1;NSM;;;;;N;;;;; +16AF5;BASSA VAH FULL STOP;Po;0;L;;;;;N;;;;; +16B00;PAHAWH HMONG VOWEL KEEB;Lo;0;L;;;;;N;;;;; +16B01;PAHAWH HMONG VOWEL KEEV;Lo;0;L;;;;;N;;;;; +16B02;PAHAWH HMONG VOWEL KIB;Lo;0;L;;;;;N;;;;; +16B03;PAHAWH HMONG VOWEL KIV;Lo;0;L;;;;;N;;;;; +16B04;PAHAWH HMONG VOWEL KAUB;Lo;0;L;;;;;N;;;;; +16B05;PAHAWH HMONG VOWEL KAUV;Lo;0;L;;;;;N;;;;; +16B06;PAHAWH HMONG VOWEL KUB;Lo;0;L;;;;;N;;;;; +16B07;PAHAWH HMONG VOWEL KUV;Lo;0;L;;;;;N;;;;; +16B08;PAHAWH HMONG VOWEL KEB;Lo;0;L;;;;;N;;;;; +16B09;PAHAWH HMONG VOWEL KEV;Lo;0;L;;;;;N;;;;; +16B0A;PAHAWH HMONG VOWEL KAIB;Lo;0;L;;;;;N;;;;; +16B0B;PAHAWH HMONG VOWEL KAIV;Lo;0;L;;;;;N;;;;; +16B0C;PAHAWH HMONG VOWEL KOOB;Lo;0;L;;;;;N;;;;; +16B0D;PAHAWH HMONG VOWEL KOOV;Lo;0;L;;;;;N;;;;; +16B0E;PAHAWH HMONG VOWEL KAWB;Lo;0;L;;;;;N;;;;; +16B0F;PAHAWH HMONG VOWEL KAWV;Lo;0;L;;;;;N;;;;; +16B10;PAHAWH HMONG VOWEL KUAB;Lo;0;L;;;;;N;;;;; +16B11;PAHAWH HMONG VOWEL KUAV;Lo;0;L;;;;;N;;;;; +16B12;PAHAWH HMONG VOWEL KOB;Lo;0;L;;;;;N;;;;; +16B13;PAHAWH HMONG VOWEL KOV;Lo;0;L;;;;;N;;;;; +16B14;PAHAWH HMONG VOWEL KIAB;Lo;0;L;;;;;N;;;;; +16B15;PAHAWH HMONG VOWEL KIAV;Lo;0;L;;;;;N;;;;; +16B16;PAHAWH HMONG VOWEL KAB;Lo;0;L;;;;;N;;;;; +16B17;PAHAWH HMONG VOWEL KAV;Lo;0;L;;;;;N;;;;; +16B18;PAHAWH HMONG VOWEL KWB;Lo;0;L;;;;;N;;;;; +16B19;PAHAWH HMONG VOWEL KWV;Lo;0;L;;;;;N;;;;; +16B1A;PAHAWH HMONG VOWEL KAAB;Lo;0;L;;;;;N;;;;; +16B1B;PAHAWH HMONG VOWEL KAAV;Lo;0;L;;;;;N;;;;; +16B1C;PAHAWH HMONG CONSONANT VAU;Lo;0;L;;;;;N;;;;; +16B1D;PAHAWH HMONG CONSONANT NTSAU;Lo;0;L;;;;;N;;;;; +16B1E;PAHAWH HMONG CONSONANT LAU;Lo;0;L;;;;;N;;;;; +16B1F;PAHAWH HMONG CONSONANT HAU;Lo;0;L;;;;;N;;;;; +16B20;PAHAWH HMONG CONSONANT NLAU;Lo;0;L;;;;;N;;;;; +16B21;PAHAWH HMONG CONSONANT RAU;Lo;0;L;;;;;N;;;;; +16B22;PAHAWH HMONG CONSONANT NKAU;Lo;0;L;;;;;N;;;;; +16B23;PAHAWH HMONG CONSONANT QHAU;Lo;0;L;;;;;N;;;;; +16B24;PAHAWH HMONG CONSONANT YAU;Lo;0;L;;;;;N;;;;; +16B25;PAHAWH HMONG CONSONANT HLAU;Lo;0;L;;;;;N;;;;; +16B26;PAHAWH HMONG CONSONANT MAU;Lo;0;L;;;;;N;;;;; +16B27;PAHAWH HMONG CONSONANT CHAU;Lo;0;L;;;;;N;;;;; +16B28;PAHAWH HMONG CONSONANT NCHAU;Lo;0;L;;;;;N;;;;; +16B29;PAHAWH HMONG CONSONANT HNAU;Lo;0;L;;;;;N;;;;; +16B2A;PAHAWH HMONG CONSONANT PLHAU;Lo;0;L;;;;;N;;;;; +16B2B;PAHAWH HMONG CONSONANT NTHAU;Lo;0;L;;;;;N;;;;; +16B2C;PAHAWH HMONG CONSONANT NAU;Lo;0;L;;;;;N;;;;; +16B2D;PAHAWH HMONG CONSONANT AU;Lo;0;L;;;;;N;;;;; +16B2E;PAHAWH HMONG CONSONANT XAU;Lo;0;L;;;;;N;;;;; +16B2F;PAHAWH HMONG CONSONANT CAU;Lo;0;L;;;;;N;;;;; +16B30;PAHAWH HMONG MARK CIM TUB;Mn;230;NSM;;;;;N;;;;; +16B31;PAHAWH HMONG MARK CIM SO;Mn;230;NSM;;;;;N;;;;; +16B32;PAHAWH HMONG MARK CIM KES;Mn;230;NSM;;;;;N;;;;; +16B33;PAHAWH HMONG MARK CIM KHAV;Mn;230;NSM;;;;;N;;;;; +16B34;PAHAWH HMONG MARK CIM SUAM;Mn;230;NSM;;;;;N;;;;; +16B35;PAHAWH HMONG MARK CIM HOM;Mn;230;NSM;;;;;N;;;;; +16B36;PAHAWH HMONG MARK CIM TAUM;Mn;230;NSM;;;;;N;;;;; +16B37;PAHAWH HMONG SIGN VOS THOM;Po;0;L;;;;;N;;;;; +16B38;PAHAWH HMONG SIGN VOS TSHAB CEEB;Po;0;L;;;;;N;;;;; +16B39;PAHAWH HMONG SIGN CIM CHEEM;Po;0;L;;;;;N;;;;; +16B3A;PAHAWH HMONG SIGN VOS THIAB;Po;0;L;;;;;N;;;;; +16B3B;PAHAWH HMONG SIGN VOS FEEM;Po;0;L;;;;;N;;;;; +16B3C;PAHAWH HMONG SIGN XYEEM NTXIV;So;0;L;;;;;N;;;;; +16B3D;PAHAWH HMONG SIGN XYEEM RHO;So;0;L;;;;;N;;;;; +16B3E;PAHAWH HMONG SIGN XYEEM TOV;So;0;L;;;;;N;;;;; +16B3F;PAHAWH HMONG SIGN XYEEM FAIB;So;0;L;;;;;N;;;;; +16B40;PAHAWH HMONG SIGN VOS SEEV;Lm;0;L;;;;;N;;;;; +16B41;PAHAWH HMONG SIGN MEEJ SUAB;Lm;0;L;;;;;N;;;;; +16B42;PAHAWH HMONG SIGN VOS NRUA;Lm;0;L;;;;;N;;;;; +16B43;PAHAWH HMONG SIGN IB YAM;Lm;0;L;;;;;N;;;;; +16B44;PAHAWH HMONG SIGN XAUS;Po;0;L;;;;;N;;;;; +16B45;PAHAWH HMONG SIGN CIM TSOV ROG;So;0;L;;;;;N;;;;; +16B50;PAHAWH HMONG DIGIT ZERO;Nd;0;L;;0;0;0;N;;;;; +16B51;PAHAWH HMONG DIGIT ONE;Nd;0;L;;1;1;1;N;;;;; +16B52;PAHAWH HMONG DIGIT TWO;Nd;0;L;;2;2;2;N;;;;; +16B53;PAHAWH HMONG DIGIT THREE;Nd;0;L;;3;3;3;N;;;;; +16B54;PAHAWH HMONG DIGIT FOUR;Nd;0;L;;4;4;4;N;;;;; +16B55;PAHAWH HMONG DIGIT FIVE;Nd;0;L;;5;5;5;N;;;;; +16B56;PAHAWH HMONG DIGIT SIX;Nd;0;L;;6;6;6;N;;;;; +16B57;PAHAWH HMONG DIGIT SEVEN;Nd;0;L;;7;7;7;N;;;;; +16B58;PAHAWH HMONG DIGIT EIGHT;Nd;0;L;;8;8;8;N;;;;; +16B59;PAHAWH HMONG DIGIT NINE;Nd;0;L;;9;9;9;N;;;;; +16B5B;PAHAWH HMONG NUMBER TENS;No;0;L;;;;10;N;;;;; +16B5C;PAHAWH HMONG NUMBER HUNDREDS;No;0;L;;;;100;N;;;;; +16B5D;PAHAWH HMONG NUMBER TEN THOUSANDS;No;0;L;;;;10000;N;;;;; +16B5E;PAHAWH HMONG NUMBER MILLIONS;No;0;L;;;;1000000;N;;;;; +16B5F;PAHAWH HMONG NUMBER HUNDRED MILLIONS;No;0;L;;;;100000000;N;;;;; +16B60;PAHAWH HMONG NUMBER TEN BILLIONS;No;0;L;;;;10000000000;N;;;;; +16B61;PAHAWH HMONG NUMBER TRILLIONS;No;0;L;;;;1000000000000;N;;;;; +16B63;PAHAWH HMONG SIGN VOS LUB;Lo;0;L;;;;;N;;;;; +16B64;PAHAWH HMONG SIGN XYOO;Lo;0;L;;;;;N;;;;; +16B65;PAHAWH HMONG SIGN HLI;Lo;0;L;;;;;N;;;;; +16B66;PAHAWH HMONG SIGN THIRD-STAGE HLI;Lo;0;L;;;;;N;;;;; +16B67;PAHAWH HMONG SIGN ZWJ THAJ;Lo;0;L;;;;;N;;;;; +16B68;PAHAWH HMONG SIGN HNUB;Lo;0;L;;;;;N;;;;; +16B69;PAHAWH HMONG SIGN NQIG;Lo;0;L;;;;;N;;;;; +16B6A;PAHAWH HMONG SIGN XIAB;Lo;0;L;;;;;N;;;;; +16B6B;PAHAWH HMONG SIGN NTUJ;Lo;0;L;;;;;N;;;;; +16B6C;PAHAWH HMONG SIGN AV;Lo;0;L;;;;;N;;;;; +16B6D;PAHAWH HMONG SIGN TXHEEJ CEEV;Lo;0;L;;;;;N;;;;; +16B6E;PAHAWH HMONG SIGN MEEJ TSEEB;Lo;0;L;;;;;N;;;;; +16B6F;PAHAWH HMONG SIGN TAU;Lo;0;L;;;;;N;;;;; +16B70;PAHAWH HMONG SIGN LOS;Lo;0;L;;;;;N;;;;; +16B71;PAHAWH HMONG SIGN MUS;Lo;0;L;;;;;N;;;;; +16B72;PAHAWH HMONG SIGN CIM HAIS LUS NTOG NTOG;Lo;0;L;;;;;N;;;;; +16B73;PAHAWH HMONG SIGN CIM CUAM TSHOOJ;Lo;0;L;;;;;N;;;;; +16B74;PAHAWH HMONG SIGN CIM TXWV;Lo;0;L;;;;;N;;;;; +16B75;PAHAWH HMONG SIGN CIM TXWV CHWV;Lo;0;L;;;;;N;;;;; +16B76;PAHAWH HMONG SIGN CIM PUB DAWB;Lo;0;L;;;;;N;;;;; +16B77;PAHAWH HMONG SIGN CIM NRES TOS;Lo;0;L;;;;;N;;;;; +16B7D;PAHAWH HMONG CLAN SIGN TSHEEJ;Lo;0;L;;;;;N;;;;; +16B7E;PAHAWH HMONG CLAN SIGN YEEG;Lo;0;L;;;;;N;;;;; +16B7F;PAHAWH HMONG CLAN SIGN LIS;Lo;0;L;;;;;N;;;;; +16B80;PAHAWH HMONG CLAN SIGN LAUJ;Lo;0;L;;;;;N;;;;; +16B81;PAHAWH HMONG CLAN SIGN XYOOJ;Lo;0;L;;;;;N;;;;; +16B82;PAHAWH HMONG CLAN SIGN KOO;Lo;0;L;;;;;N;;;;; +16B83;PAHAWH HMONG CLAN SIGN HAWJ;Lo;0;L;;;;;N;;;;; +16B84;PAHAWH HMONG CLAN SIGN MUAS;Lo;0;L;;;;;N;;;;; +16B85;PAHAWH HMONG CLAN SIGN THOJ;Lo;0;L;;;;;N;;;;; +16B86;PAHAWH HMONG CLAN SIGN TSAB;Lo;0;L;;;;;N;;;;; +16B87;PAHAWH HMONG CLAN SIGN PHAB;Lo;0;L;;;;;N;;;;; +16B88;PAHAWH HMONG CLAN SIGN KHAB;Lo;0;L;;;;;N;;;;; +16B89;PAHAWH HMONG CLAN SIGN HAM;Lo;0;L;;;;;N;;;;; +16B8A;PAHAWH HMONG CLAN SIGN VAJ;Lo;0;L;;;;;N;;;;; +16B8B;PAHAWH HMONG CLAN SIGN FAJ;Lo;0;L;;;;;N;;;;; +16B8C;PAHAWH HMONG CLAN SIGN YAJ;Lo;0;L;;;;;N;;;;; +16B8D;PAHAWH HMONG CLAN SIGN TSWB;Lo;0;L;;;;;N;;;;; +16B8E;PAHAWH HMONG CLAN SIGN KWM;Lo;0;L;;;;;N;;;;; +16B8F;PAHAWH HMONG CLAN SIGN VWJ;Lo;0;L;;;;;N;;;;; +16E40;MEDEFAIDRIN CAPITAL LETTER M;Lu;0;L;;;;;N;;;;16E60; +16E41;MEDEFAIDRIN CAPITAL LETTER S;Lu;0;L;;;;;N;;;;16E61; +16E42;MEDEFAIDRIN CAPITAL LETTER V;Lu;0;L;;;;;N;;;;16E62; +16E43;MEDEFAIDRIN CAPITAL LETTER W;Lu;0;L;;;;;N;;;;16E63; +16E44;MEDEFAIDRIN CAPITAL LETTER ATIU;Lu;0;L;;;;;N;;;;16E64; +16E45;MEDEFAIDRIN CAPITAL LETTER Z;Lu;0;L;;;;;N;;;;16E65; +16E46;MEDEFAIDRIN CAPITAL LETTER KP;Lu;0;L;;;;;N;;;;16E66; +16E47;MEDEFAIDRIN CAPITAL LETTER P;Lu;0;L;;;;;N;;;;16E67; +16E48;MEDEFAIDRIN CAPITAL LETTER T;Lu;0;L;;;;;N;;;;16E68; +16E49;MEDEFAIDRIN CAPITAL LETTER G;Lu;0;L;;;;;N;;;;16E69; +16E4A;MEDEFAIDRIN CAPITAL LETTER F;Lu;0;L;;;;;N;;;;16E6A; +16E4B;MEDEFAIDRIN CAPITAL LETTER I;Lu;0;L;;;;;N;;;;16E6B; +16E4C;MEDEFAIDRIN CAPITAL LETTER K;Lu;0;L;;;;;N;;;;16E6C; +16E4D;MEDEFAIDRIN CAPITAL LETTER A;Lu;0;L;;;;;N;;;;16E6D; +16E4E;MEDEFAIDRIN CAPITAL LETTER J;Lu;0;L;;;;;N;;;;16E6E; +16E4F;MEDEFAIDRIN CAPITAL LETTER E;Lu;0;L;;;;;N;;;;16E6F; +16E50;MEDEFAIDRIN CAPITAL LETTER B;Lu;0;L;;;;;N;;;;16E70; +16E51;MEDEFAIDRIN CAPITAL LETTER C;Lu;0;L;;;;;N;;;;16E71; +16E52;MEDEFAIDRIN CAPITAL LETTER U;Lu;0;L;;;;;N;;;;16E72; +16E53;MEDEFAIDRIN CAPITAL LETTER YU;Lu;0;L;;;;;N;;;;16E73; +16E54;MEDEFAIDRIN CAPITAL LETTER L;Lu;0;L;;;;;N;;;;16E74; +16E55;MEDEFAIDRIN CAPITAL LETTER Q;Lu;0;L;;;;;N;;;;16E75; +16E56;MEDEFAIDRIN CAPITAL LETTER HP;Lu;0;L;;;;;N;;;;16E76; +16E57;MEDEFAIDRIN CAPITAL LETTER NY;Lu;0;L;;;;;N;;;;16E77; +16E58;MEDEFAIDRIN CAPITAL LETTER X;Lu;0;L;;;;;N;;;;16E78; +16E59;MEDEFAIDRIN CAPITAL LETTER D;Lu;0;L;;;;;N;;;;16E79; +16E5A;MEDEFAIDRIN CAPITAL LETTER OE;Lu;0;L;;;;;N;;;;16E7A; +16E5B;MEDEFAIDRIN CAPITAL LETTER N;Lu;0;L;;;;;N;;;;16E7B; +16E5C;MEDEFAIDRIN CAPITAL LETTER R;Lu;0;L;;;;;N;;;;16E7C; +16E5D;MEDEFAIDRIN CAPITAL LETTER O;Lu;0;L;;;;;N;;;;16E7D; +16E5E;MEDEFAIDRIN CAPITAL LETTER AI;Lu;0;L;;;;;N;;;;16E7E; +16E5F;MEDEFAIDRIN CAPITAL LETTER Y;Lu;0;L;;;;;N;;;;16E7F; +16E60;MEDEFAIDRIN SMALL LETTER M;Ll;0;L;;;;;N;;;16E40;;16E40 +16E61;MEDEFAIDRIN SMALL LETTER S;Ll;0;L;;;;;N;;;16E41;;16E41 +16E62;MEDEFAIDRIN SMALL LETTER V;Ll;0;L;;;;;N;;;16E42;;16E42 +16E63;MEDEFAIDRIN SMALL LETTER W;Ll;0;L;;;;;N;;;16E43;;16E43 +16E64;MEDEFAIDRIN SMALL LETTER ATIU;Ll;0;L;;;;;N;;;16E44;;16E44 +16E65;MEDEFAIDRIN SMALL LETTER Z;Ll;0;L;;;;;N;;;16E45;;16E45 +16E66;MEDEFAIDRIN SMALL LETTER KP;Ll;0;L;;;;;N;;;16E46;;16E46 +16E67;MEDEFAIDRIN SMALL LETTER P;Ll;0;L;;;;;N;;;16E47;;16E47 +16E68;MEDEFAIDRIN SMALL LETTER T;Ll;0;L;;;;;N;;;16E48;;16E48 +16E69;MEDEFAIDRIN SMALL LETTER G;Ll;0;L;;;;;N;;;16E49;;16E49 +16E6A;MEDEFAIDRIN SMALL LETTER F;Ll;0;L;;;;;N;;;16E4A;;16E4A +16E6B;MEDEFAIDRIN SMALL LETTER I;Ll;0;L;;;;;N;;;16E4B;;16E4B +16E6C;MEDEFAIDRIN SMALL LETTER K;Ll;0;L;;;;;N;;;16E4C;;16E4C +16E6D;MEDEFAIDRIN SMALL LETTER A;Ll;0;L;;;;;N;;;16E4D;;16E4D +16E6E;MEDEFAIDRIN SMALL LETTER J;Ll;0;L;;;;;N;;;16E4E;;16E4E +16E6F;MEDEFAIDRIN SMALL LETTER E;Ll;0;L;;;;;N;;;16E4F;;16E4F +16E70;MEDEFAIDRIN SMALL LETTER B;Ll;0;L;;;;;N;;;16E50;;16E50 +16E71;MEDEFAIDRIN SMALL LETTER C;Ll;0;L;;;;;N;;;16E51;;16E51 +16E72;MEDEFAIDRIN SMALL LETTER U;Ll;0;L;;;;;N;;;16E52;;16E52 +16E73;MEDEFAIDRIN SMALL LETTER YU;Ll;0;L;;;;;N;;;16E53;;16E53 +16E74;MEDEFAIDRIN SMALL LETTER L;Ll;0;L;;;;;N;;;16E54;;16E54 +16E75;MEDEFAIDRIN SMALL LETTER Q;Ll;0;L;;;;;N;;;16E55;;16E55 +16E76;MEDEFAIDRIN SMALL LETTER HP;Ll;0;L;;;;;N;;;16E56;;16E56 +16E77;MEDEFAIDRIN SMALL LETTER NY;Ll;0;L;;;;;N;;;16E57;;16E57 +16E78;MEDEFAIDRIN SMALL LETTER X;Ll;0;L;;;;;N;;;16E58;;16E58 +16E79;MEDEFAIDRIN SMALL LETTER D;Ll;0;L;;;;;N;;;16E59;;16E59 +16E7A;MEDEFAIDRIN SMALL LETTER OE;Ll;0;L;;;;;N;;;16E5A;;16E5A +16E7B;MEDEFAIDRIN SMALL LETTER N;Ll;0;L;;;;;N;;;16E5B;;16E5B +16E7C;MEDEFAIDRIN SMALL LETTER R;Ll;0;L;;;;;N;;;16E5C;;16E5C +16E7D;MEDEFAIDRIN SMALL LETTER O;Ll;0;L;;;;;N;;;16E5D;;16E5D +16E7E;MEDEFAIDRIN SMALL LETTER AI;Ll;0;L;;;;;N;;;16E5E;;16E5E +16E7F;MEDEFAIDRIN SMALL LETTER Y;Ll;0;L;;;;;N;;;16E5F;;16E5F +16E80;MEDEFAIDRIN DIGIT ZERO;No;0;L;;;;0;N;;;;; +16E81;MEDEFAIDRIN DIGIT ONE;No;0;L;;;;1;N;;;;; +16E82;MEDEFAIDRIN DIGIT TWO;No;0;L;;;;2;N;;;;; +16E83;MEDEFAIDRIN DIGIT THREE;No;0;L;;;;3;N;;;;; +16E84;MEDEFAIDRIN DIGIT FOUR;No;0;L;;;;4;N;;;;; +16E85;MEDEFAIDRIN DIGIT FIVE;No;0;L;;;;5;N;;;;; +16E86;MEDEFAIDRIN DIGIT SIX;No;0;L;;;;6;N;;;;; +16E87;MEDEFAIDRIN DIGIT SEVEN;No;0;L;;;;7;N;;;;; +16E88;MEDEFAIDRIN DIGIT EIGHT;No;0;L;;;;8;N;;;;; +16E89;MEDEFAIDRIN DIGIT NINE;No;0;L;;;;9;N;;;;; +16E8A;MEDEFAIDRIN NUMBER TEN;No;0;L;;;;10;N;;;;; +16E8B;MEDEFAIDRIN NUMBER ELEVEN;No;0;L;;;;11;N;;;;; +16E8C;MEDEFAIDRIN NUMBER TWELVE;No;0;L;;;;12;N;;;;; +16E8D;MEDEFAIDRIN NUMBER THIRTEEN;No;0;L;;;;13;N;;;;; +16E8E;MEDEFAIDRIN NUMBER FOURTEEN;No;0;L;;;;14;N;;;;; +16E8F;MEDEFAIDRIN NUMBER FIFTEEN;No;0;L;;;;15;N;;;;; +16E90;MEDEFAIDRIN NUMBER SIXTEEN;No;0;L;;;;16;N;;;;; +16E91;MEDEFAIDRIN NUMBER SEVENTEEN;No;0;L;;;;17;N;;;;; +16E92;MEDEFAIDRIN NUMBER EIGHTEEN;No;0;L;;;;18;N;;;;; +16E93;MEDEFAIDRIN NUMBER NINETEEN;No;0;L;;;;19;N;;;;; +16E94;MEDEFAIDRIN DIGIT ONE ALTERNATE FORM;No;0;L;;;;1;N;;;;; +16E95;MEDEFAIDRIN DIGIT TWO ALTERNATE FORM;No;0;L;;;;2;N;;;;; +16E96;MEDEFAIDRIN DIGIT THREE ALTERNATE FORM;No;0;L;;;;3;N;;;;; +16E97;MEDEFAIDRIN COMMA;Po;0;L;;;;;N;;;;; +16E98;MEDEFAIDRIN FULL STOP;Po;0;L;;;;;N;;;;; +16E99;MEDEFAIDRIN SYMBOL AIVA;Po;0;L;;;;;N;;;;; +16E9A;MEDEFAIDRIN EXCLAMATION OH;Po;0;L;;;;;N;;;;; +16F00;MIAO LETTER PA;Lo;0;L;;;;;N;;;;; +16F01;MIAO LETTER BA;Lo;0;L;;;;;N;;;;; +16F02;MIAO LETTER YI PA;Lo;0;L;;;;;N;;;;; +16F03;MIAO LETTER PLA;Lo;0;L;;;;;N;;;;; +16F04;MIAO LETTER MA;Lo;0;L;;;;;N;;;;; +16F05;MIAO LETTER MHA;Lo;0;L;;;;;N;;;;; +16F06;MIAO LETTER ARCHAIC MA;Lo;0;L;;;;;N;;;;; +16F07;MIAO LETTER FA;Lo;0;L;;;;;N;;;;; +16F08;MIAO LETTER VA;Lo;0;L;;;;;N;;;;; +16F09;MIAO LETTER VFA;Lo;0;L;;;;;N;;;;; +16F0A;MIAO LETTER TA;Lo;0;L;;;;;N;;;;; +16F0B;MIAO LETTER DA;Lo;0;L;;;;;N;;;;; +16F0C;MIAO LETTER YI TTA;Lo;0;L;;;;;N;;;;; +16F0D;MIAO LETTER YI TA;Lo;0;L;;;;;N;;;;; +16F0E;MIAO LETTER TTA;Lo;0;L;;;;;N;;;;; +16F0F;MIAO LETTER DDA;Lo;0;L;;;;;N;;;;; +16F10;MIAO LETTER NA;Lo;0;L;;;;;N;;;;; +16F11;MIAO LETTER NHA;Lo;0;L;;;;;N;;;;; +16F12;MIAO LETTER YI NNA;Lo;0;L;;;;;N;;;;; +16F13;MIAO LETTER ARCHAIC NA;Lo;0;L;;;;;N;;;;; +16F14;MIAO LETTER NNA;Lo;0;L;;;;;N;;;;; +16F15;MIAO LETTER NNHA;Lo;0;L;;;;;N;;;;; +16F16;MIAO LETTER LA;Lo;0;L;;;;;N;;;;; +16F17;MIAO LETTER LYA;Lo;0;L;;;;;N;;;;; +16F18;MIAO LETTER LHA;Lo;0;L;;;;;N;;;;; +16F19;MIAO LETTER LHYA;Lo;0;L;;;;;N;;;;; +16F1A;MIAO LETTER TLHA;Lo;0;L;;;;;N;;;;; +16F1B;MIAO LETTER DLHA;Lo;0;L;;;;;N;;;;; +16F1C;MIAO LETTER TLHYA;Lo;0;L;;;;;N;;;;; +16F1D;MIAO LETTER DLHYA;Lo;0;L;;;;;N;;;;; +16F1E;MIAO LETTER KA;Lo;0;L;;;;;N;;;;; +16F1F;MIAO LETTER GA;Lo;0;L;;;;;N;;;;; +16F20;MIAO LETTER YI KA;Lo;0;L;;;;;N;;;;; +16F21;MIAO LETTER QA;Lo;0;L;;;;;N;;;;; +16F22;MIAO LETTER QGA;Lo;0;L;;;;;N;;;;; +16F23;MIAO LETTER NGA;Lo;0;L;;;;;N;;;;; +16F24;MIAO LETTER NGHA;Lo;0;L;;;;;N;;;;; +16F25;MIAO LETTER ARCHAIC NGA;Lo;0;L;;;;;N;;;;; +16F26;MIAO LETTER HA;Lo;0;L;;;;;N;;;;; +16F27;MIAO LETTER XA;Lo;0;L;;;;;N;;;;; +16F28;MIAO LETTER GHA;Lo;0;L;;;;;N;;;;; +16F29;MIAO LETTER GHHA;Lo;0;L;;;;;N;;;;; +16F2A;MIAO LETTER TSSA;Lo;0;L;;;;;N;;;;; +16F2B;MIAO LETTER DZZA;Lo;0;L;;;;;N;;;;; +16F2C;MIAO LETTER NYA;Lo;0;L;;;;;N;;;;; +16F2D;MIAO LETTER NYHA;Lo;0;L;;;;;N;;;;; +16F2E;MIAO LETTER TSHA;Lo;0;L;;;;;N;;;;; +16F2F;MIAO LETTER DZHA;Lo;0;L;;;;;N;;;;; +16F30;MIAO LETTER YI TSHA;Lo;0;L;;;;;N;;;;; +16F31;MIAO LETTER YI DZHA;Lo;0;L;;;;;N;;;;; +16F32;MIAO LETTER REFORMED TSHA;Lo;0;L;;;;;N;;;;; +16F33;MIAO LETTER SHA;Lo;0;L;;;;;N;;;;; +16F34;MIAO LETTER SSA;Lo;0;L;;;;;N;;;;; +16F35;MIAO LETTER ZHA;Lo;0;L;;;;;N;;;;; +16F36;MIAO LETTER ZSHA;Lo;0;L;;;;;N;;;;; +16F37;MIAO LETTER TSA;Lo;0;L;;;;;N;;;;; +16F38;MIAO LETTER DZA;Lo;0;L;;;;;N;;;;; +16F39;MIAO LETTER YI TSA;Lo;0;L;;;;;N;;;;; +16F3A;MIAO LETTER SA;Lo;0;L;;;;;N;;;;; +16F3B;MIAO LETTER ZA;Lo;0;L;;;;;N;;;;; +16F3C;MIAO LETTER ZSA;Lo;0;L;;;;;N;;;;; +16F3D;MIAO LETTER ZZA;Lo;0;L;;;;;N;;;;; +16F3E;MIAO LETTER ZZSA;Lo;0;L;;;;;N;;;;; +16F3F;MIAO LETTER ARCHAIC ZZA;Lo;0;L;;;;;N;;;;; +16F40;MIAO LETTER ZZYA;Lo;0;L;;;;;N;;;;; +16F41;MIAO LETTER ZZSYA;Lo;0;L;;;;;N;;;;; +16F42;MIAO LETTER WA;Lo;0;L;;;;;N;;;;; +16F43;MIAO LETTER AH;Lo;0;L;;;;;N;;;;; +16F44;MIAO LETTER HHA;Lo;0;L;;;;;N;;;;; +16F45;MIAO LETTER BRI;Lo;0;L;;;;;N;;;;; +16F46;MIAO LETTER SYI;Lo;0;L;;;;;N;;;;; +16F47;MIAO LETTER DZYI;Lo;0;L;;;;;N;;;;; +16F48;MIAO LETTER TE;Lo;0;L;;;;;N;;;;; +16F49;MIAO LETTER TSE;Lo;0;L;;;;;N;;;;; +16F4A;MIAO LETTER RTE;Lo;0;L;;;;;N;;;;; +16F4F;MIAO SIGN CONSONANT MODIFIER BAR;Mn;0;NSM;;;;;N;;;;; +16F50;MIAO LETTER NASALIZATION;Lo;0;L;;;;;N;;;;; +16F51;MIAO SIGN ASPIRATION;Mc;0;L;;;;;N;;;;; +16F52;MIAO SIGN REFORMED VOICING;Mc;0;L;;;;;N;;;;; +16F53;MIAO SIGN REFORMED ASPIRATION;Mc;0;L;;;;;N;;;;; +16F54;MIAO VOWEL SIGN A;Mc;0;L;;;;;N;;;;; +16F55;MIAO VOWEL SIGN AA;Mc;0;L;;;;;N;;;;; +16F56;MIAO VOWEL SIGN AHH;Mc;0;L;;;;;N;;;;; +16F57;MIAO VOWEL SIGN AN;Mc;0;L;;;;;N;;;;; +16F58;MIAO VOWEL SIGN ANG;Mc;0;L;;;;;N;;;;; +16F59;MIAO VOWEL SIGN O;Mc;0;L;;;;;N;;;;; +16F5A;MIAO VOWEL SIGN OO;Mc;0;L;;;;;N;;;;; +16F5B;MIAO VOWEL SIGN WO;Mc;0;L;;;;;N;;;;; +16F5C;MIAO VOWEL SIGN W;Mc;0;L;;;;;N;;;;; +16F5D;MIAO VOWEL SIGN E;Mc;0;L;;;;;N;;;;; +16F5E;MIAO VOWEL SIGN EN;Mc;0;L;;;;;N;;;;; +16F5F;MIAO VOWEL SIGN ENG;Mc;0;L;;;;;N;;;;; +16F60;MIAO VOWEL SIGN OEY;Mc;0;L;;;;;N;;;;; +16F61;MIAO VOWEL SIGN I;Mc;0;L;;;;;N;;;;; +16F62;MIAO VOWEL SIGN IA;Mc;0;L;;;;;N;;;;; +16F63;MIAO VOWEL SIGN IAN;Mc;0;L;;;;;N;;;;; +16F64;MIAO VOWEL SIGN IANG;Mc;0;L;;;;;N;;;;; +16F65;MIAO VOWEL SIGN IO;Mc;0;L;;;;;N;;;;; +16F66;MIAO VOWEL SIGN IE;Mc;0;L;;;;;N;;;;; +16F67;MIAO VOWEL SIGN II;Mc;0;L;;;;;N;;;;; +16F68;MIAO VOWEL SIGN IU;Mc;0;L;;;;;N;;;;; +16F69;MIAO VOWEL SIGN ING;Mc;0;L;;;;;N;;;;; +16F6A;MIAO VOWEL SIGN U;Mc;0;L;;;;;N;;;;; +16F6B;MIAO VOWEL SIGN UA;Mc;0;L;;;;;N;;;;; +16F6C;MIAO VOWEL SIGN UAN;Mc;0;L;;;;;N;;;;; +16F6D;MIAO VOWEL SIGN UANG;Mc;0;L;;;;;N;;;;; +16F6E;MIAO VOWEL SIGN UU;Mc;0;L;;;;;N;;;;; +16F6F;MIAO VOWEL SIGN UEI;Mc;0;L;;;;;N;;;;; +16F70;MIAO VOWEL SIGN UNG;Mc;0;L;;;;;N;;;;; +16F71;MIAO VOWEL SIGN Y;Mc;0;L;;;;;N;;;;; +16F72;MIAO VOWEL SIGN YI;Mc;0;L;;;;;N;;;;; +16F73;MIAO VOWEL SIGN AE;Mc;0;L;;;;;N;;;;; +16F74;MIAO VOWEL SIGN AEE;Mc;0;L;;;;;N;;;;; +16F75;MIAO VOWEL SIGN ERR;Mc;0;L;;;;;N;;;;; +16F76;MIAO VOWEL SIGN ROUNDED ERR;Mc;0;L;;;;;N;;;;; +16F77;MIAO VOWEL SIGN ER;Mc;0;L;;;;;N;;;;; +16F78;MIAO VOWEL SIGN ROUNDED ER;Mc;0;L;;;;;N;;;;; +16F79;MIAO VOWEL SIGN AI;Mc;0;L;;;;;N;;;;; +16F7A;MIAO VOWEL SIGN EI;Mc;0;L;;;;;N;;;;; +16F7B;MIAO VOWEL SIGN AU;Mc;0;L;;;;;N;;;;; +16F7C;MIAO VOWEL SIGN OU;Mc;0;L;;;;;N;;;;; +16F7D;MIAO VOWEL SIGN N;Mc;0;L;;;;;N;;;;; +16F7E;MIAO VOWEL SIGN NG;Mc;0;L;;;;;N;;;;; +16F7F;MIAO VOWEL SIGN UOG;Mc;0;L;;;;;N;;;;; +16F80;MIAO VOWEL SIGN YUI;Mc;0;L;;;;;N;;;;; +16F81;MIAO VOWEL SIGN OG;Mc;0;L;;;;;N;;;;; +16F82;MIAO VOWEL SIGN OER;Mc;0;L;;;;;N;;;;; +16F83;MIAO VOWEL SIGN VW;Mc;0;L;;;;;N;;;;; +16F84;MIAO VOWEL SIGN IG;Mc;0;L;;;;;N;;;;; +16F85;MIAO VOWEL SIGN EA;Mc;0;L;;;;;N;;;;; +16F86;MIAO VOWEL SIGN IONG;Mc;0;L;;;;;N;;;;; +16F87;MIAO VOWEL SIGN UI;Mc;0;L;;;;;N;;;;; +16F8F;MIAO TONE RIGHT;Mn;0;NSM;;;;;N;;;;; +16F90;MIAO TONE TOP RIGHT;Mn;0;NSM;;;;;N;;;;; +16F91;MIAO TONE ABOVE;Mn;0;NSM;;;;;N;;;;; +16F92;MIAO TONE BELOW;Mn;0;NSM;;;;;N;;;;; +16F93;MIAO LETTER TONE-2;Lm;0;L;;;;;N;;;;; +16F94;MIAO LETTER TONE-3;Lm;0;L;;;;;N;;;;; +16F95;MIAO LETTER TONE-4;Lm;0;L;;;;;N;;;;; +16F96;MIAO LETTER TONE-5;Lm;0;L;;;;;N;;;;; +16F97;MIAO LETTER TONE-6;Lm;0;L;;;;;N;;;;; +16F98;MIAO LETTER TONE-7;Lm;0;L;;;;;N;;;;; +16F99;MIAO LETTER TONE-8;Lm;0;L;;;;;N;;;;; +16F9A;MIAO LETTER REFORMED TONE-1;Lm;0;L;;;;;N;;;;; +16F9B;MIAO LETTER REFORMED TONE-2;Lm;0;L;;;;;N;;;;; +16F9C;MIAO LETTER REFORMED TONE-4;Lm;0;L;;;;;N;;;;; +16F9D;MIAO LETTER REFORMED TONE-5;Lm;0;L;;;;;N;;;;; +16F9E;MIAO LETTER REFORMED TONE-6;Lm;0;L;;;;;N;;;;; +16F9F;MIAO LETTER REFORMED TONE-8;Lm;0;L;;;;;N;;;;; +16FE0;TANGUT ITERATION MARK;Lm;0;L;;;;;N;;;;; +16FE1;NUSHU ITERATION MARK;Lm;0;L;;;;;N;;;;; +16FE2;OLD CHINESE HOOK MARK;Po;0;ON;;;;;N;;;;; +16FE3;OLD CHINESE ITERATION MARK;Lm;0;L;;;;;N;;;;; +17000;;Lo;0;L;;;;;N;;;;; +187F7;;Lo;0;L;;;;;N;;;;; +18800;TANGUT COMPONENT-001;Lo;0;L;;;;;N;;;;; +18801;TANGUT COMPONENT-002;Lo;0;L;;;;;N;;;;; +18802;TANGUT COMPONENT-003;Lo;0;L;;;;;N;;;;; +18803;TANGUT COMPONENT-004;Lo;0;L;;;;;N;;;;; +18804;TANGUT COMPONENT-005;Lo;0;L;;;;;N;;;;; +18805;TANGUT COMPONENT-006;Lo;0;L;;;;;N;;;;; +18806;TANGUT COMPONENT-007;Lo;0;L;;;;;N;;;;; +18807;TANGUT COMPONENT-008;Lo;0;L;;;;;N;;;;; +18808;TANGUT COMPONENT-009;Lo;0;L;;;;;N;;;;; +18809;TANGUT COMPONENT-010;Lo;0;L;;;;;N;;;;; +1880A;TANGUT COMPONENT-011;Lo;0;L;;;;;N;;;;; +1880B;TANGUT COMPONENT-012;Lo;0;L;;;;;N;;;;; +1880C;TANGUT COMPONENT-013;Lo;0;L;;;;;N;;;;; +1880D;TANGUT COMPONENT-014;Lo;0;L;;;;;N;;;;; +1880E;TANGUT COMPONENT-015;Lo;0;L;;;;;N;;;;; +1880F;TANGUT COMPONENT-016;Lo;0;L;;;;;N;;;;; +18810;TANGUT COMPONENT-017;Lo;0;L;;;;;N;;;;; +18811;TANGUT COMPONENT-018;Lo;0;L;;;;;N;;;;; +18812;TANGUT COMPONENT-019;Lo;0;L;;;;;N;;;;; +18813;TANGUT COMPONENT-020;Lo;0;L;;;;;N;;;;; +18814;TANGUT COMPONENT-021;Lo;0;L;;;;;N;;;;; +18815;TANGUT COMPONENT-022;Lo;0;L;;;;;N;;;;; +18816;TANGUT COMPONENT-023;Lo;0;L;;;;;N;;;;; +18817;TANGUT COMPONENT-024;Lo;0;L;;;;;N;;;;; +18818;TANGUT COMPONENT-025;Lo;0;L;;;;;N;;;;; +18819;TANGUT COMPONENT-026;Lo;0;L;;;;;N;;;;; +1881A;TANGUT COMPONENT-027;Lo;0;L;;;;;N;;;;; +1881B;TANGUT COMPONENT-028;Lo;0;L;;;;;N;;;;; +1881C;TANGUT COMPONENT-029;Lo;0;L;;;;;N;;;;; +1881D;TANGUT COMPONENT-030;Lo;0;L;;;;;N;;;;; +1881E;TANGUT COMPONENT-031;Lo;0;L;;;;;N;;;;; +1881F;TANGUT COMPONENT-032;Lo;0;L;;;;;N;;;;; +18820;TANGUT COMPONENT-033;Lo;0;L;;;;;N;;;;; +18821;TANGUT COMPONENT-034;Lo;0;L;;;;;N;;;;; +18822;TANGUT COMPONENT-035;Lo;0;L;;;;;N;;;;; +18823;TANGUT COMPONENT-036;Lo;0;L;;;;;N;;;;; +18824;TANGUT COMPONENT-037;Lo;0;L;;;;;N;;;;; +18825;TANGUT COMPONENT-038;Lo;0;L;;;;;N;;;;; +18826;TANGUT COMPONENT-039;Lo;0;L;;;;;N;;;;; +18827;TANGUT COMPONENT-040;Lo;0;L;;;;;N;;;;; +18828;TANGUT COMPONENT-041;Lo;0;L;;;;;N;;;;; +18829;TANGUT COMPONENT-042;Lo;0;L;;;;;N;;;;; +1882A;TANGUT COMPONENT-043;Lo;0;L;;;;;N;;;;; +1882B;TANGUT COMPONENT-044;Lo;0;L;;;;;N;;;;; +1882C;TANGUT COMPONENT-045;Lo;0;L;;;;;N;;;;; +1882D;TANGUT COMPONENT-046;Lo;0;L;;;;;N;;;;; +1882E;TANGUT COMPONENT-047;Lo;0;L;;;;;N;;;;; +1882F;TANGUT COMPONENT-048;Lo;0;L;;;;;N;;;;; +18830;TANGUT COMPONENT-049;Lo;0;L;;;;;N;;;;; +18831;TANGUT COMPONENT-050;Lo;0;L;;;;;N;;;;; +18832;TANGUT COMPONENT-051;Lo;0;L;;;;;N;;;;; +18833;TANGUT COMPONENT-052;Lo;0;L;;;;;N;;;;; +18834;TANGUT COMPONENT-053;Lo;0;L;;;;;N;;;;; +18835;TANGUT COMPONENT-054;Lo;0;L;;;;;N;;;;; +18836;TANGUT COMPONENT-055;Lo;0;L;;;;;N;;;;; +18837;TANGUT COMPONENT-056;Lo;0;L;;;;;N;;;;; +18838;TANGUT COMPONENT-057;Lo;0;L;;;;;N;;;;; +18839;TANGUT COMPONENT-058;Lo;0;L;;;;;N;;;;; +1883A;TANGUT COMPONENT-059;Lo;0;L;;;;;N;;;;; +1883B;TANGUT COMPONENT-060;Lo;0;L;;;;;N;;;;; +1883C;TANGUT COMPONENT-061;Lo;0;L;;;;;N;;;;; +1883D;TANGUT COMPONENT-062;Lo;0;L;;;;;N;;;;; +1883E;TANGUT COMPONENT-063;Lo;0;L;;;;;N;;;;; +1883F;TANGUT COMPONENT-064;Lo;0;L;;;;;N;;;;; +18840;TANGUT COMPONENT-065;Lo;0;L;;;;;N;;;;; +18841;TANGUT COMPONENT-066;Lo;0;L;;;;;N;;;;; +18842;TANGUT COMPONENT-067;Lo;0;L;;;;;N;;;;; +18843;TANGUT COMPONENT-068;Lo;0;L;;;;;N;;;;; +18844;TANGUT COMPONENT-069;Lo;0;L;;;;;N;;;;; +18845;TANGUT COMPONENT-070;Lo;0;L;;;;;N;;;;; +18846;TANGUT COMPONENT-071;Lo;0;L;;;;;N;;;;; +18847;TANGUT COMPONENT-072;Lo;0;L;;;;;N;;;;; +18848;TANGUT COMPONENT-073;Lo;0;L;;;;;N;;;;; +18849;TANGUT COMPONENT-074;Lo;0;L;;;;;N;;;;; +1884A;TANGUT COMPONENT-075;Lo;0;L;;;;;N;;;;; +1884B;TANGUT COMPONENT-076;Lo;0;L;;;;;N;;;;; +1884C;TANGUT COMPONENT-077;Lo;0;L;;;;;N;;;;; +1884D;TANGUT COMPONENT-078;Lo;0;L;;;;;N;;;;; +1884E;TANGUT COMPONENT-079;Lo;0;L;;;;;N;;;;; +1884F;TANGUT COMPONENT-080;Lo;0;L;;;;;N;;;;; +18850;TANGUT COMPONENT-081;Lo;0;L;;;;;N;;;;; +18851;TANGUT COMPONENT-082;Lo;0;L;;;;;N;;;;; +18852;TANGUT COMPONENT-083;Lo;0;L;;;;;N;;;;; +18853;TANGUT COMPONENT-084;Lo;0;L;;;;;N;;;;; +18854;TANGUT COMPONENT-085;Lo;0;L;;;;;N;;;;; +18855;TANGUT COMPONENT-086;Lo;0;L;;;;;N;;;;; +18856;TANGUT COMPONENT-087;Lo;0;L;;;;;N;;;;; +18857;TANGUT COMPONENT-088;Lo;0;L;;;;;N;;;;; +18858;TANGUT COMPONENT-089;Lo;0;L;;;;;N;;;;; +18859;TANGUT COMPONENT-090;Lo;0;L;;;;;N;;;;; +1885A;TANGUT COMPONENT-091;Lo;0;L;;;;;N;;;;; +1885B;TANGUT COMPONENT-092;Lo;0;L;;;;;N;;;;; +1885C;TANGUT COMPONENT-093;Lo;0;L;;;;;N;;;;; +1885D;TANGUT COMPONENT-094;Lo;0;L;;;;;N;;;;; +1885E;TANGUT COMPONENT-095;Lo;0;L;;;;;N;;;;; +1885F;TANGUT COMPONENT-096;Lo;0;L;;;;;N;;;;; +18860;TANGUT COMPONENT-097;Lo;0;L;;;;;N;;;;; +18861;TANGUT COMPONENT-098;Lo;0;L;;;;;N;;;;; +18862;TANGUT COMPONENT-099;Lo;0;L;;;;;N;;;;; +18863;TANGUT COMPONENT-100;Lo;0;L;;;;;N;;;;; +18864;TANGUT COMPONENT-101;Lo;0;L;;;;;N;;;;; +18865;TANGUT COMPONENT-102;Lo;0;L;;;;;N;;;;; +18866;TANGUT COMPONENT-103;Lo;0;L;;;;;N;;;;; +18867;TANGUT COMPONENT-104;Lo;0;L;;;;;N;;;;; +18868;TANGUT COMPONENT-105;Lo;0;L;;;;;N;;;;; +18869;TANGUT COMPONENT-106;Lo;0;L;;;;;N;;;;; +1886A;TANGUT COMPONENT-107;Lo;0;L;;;;;N;;;;; +1886B;TANGUT COMPONENT-108;Lo;0;L;;;;;N;;;;; +1886C;TANGUT COMPONENT-109;Lo;0;L;;;;;N;;;;; +1886D;TANGUT COMPONENT-110;Lo;0;L;;;;;N;;;;; +1886E;TANGUT COMPONENT-111;Lo;0;L;;;;;N;;;;; +1886F;TANGUT COMPONENT-112;Lo;0;L;;;;;N;;;;; +18870;TANGUT COMPONENT-113;Lo;0;L;;;;;N;;;;; +18871;TANGUT COMPONENT-114;Lo;0;L;;;;;N;;;;; +18872;TANGUT COMPONENT-115;Lo;0;L;;;;;N;;;;; +18873;TANGUT COMPONENT-116;Lo;0;L;;;;;N;;;;; +18874;TANGUT COMPONENT-117;Lo;0;L;;;;;N;;;;; +18875;TANGUT COMPONENT-118;Lo;0;L;;;;;N;;;;; +18876;TANGUT COMPONENT-119;Lo;0;L;;;;;N;;;;; +18877;TANGUT COMPONENT-120;Lo;0;L;;;;;N;;;;; +18878;TANGUT COMPONENT-121;Lo;0;L;;;;;N;;;;; +18879;TANGUT COMPONENT-122;Lo;0;L;;;;;N;;;;; +1887A;TANGUT COMPONENT-123;Lo;0;L;;;;;N;;;;; +1887B;TANGUT COMPONENT-124;Lo;0;L;;;;;N;;;;; +1887C;TANGUT COMPONENT-125;Lo;0;L;;;;;N;;;;; +1887D;TANGUT COMPONENT-126;Lo;0;L;;;;;N;;;;; +1887E;TANGUT COMPONENT-127;Lo;0;L;;;;;N;;;;; +1887F;TANGUT COMPONENT-128;Lo;0;L;;;;;N;;;;; +18880;TANGUT COMPONENT-129;Lo;0;L;;;;;N;;;;; +18881;TANGUT COMPONENT-130;Lo;0;L;;;;;N;;;;; +18882;TANGUT COMPONENT-131;Lo;0;L;;;;;N;;;;; +18883;TANGUT COMPONENT-132;Lo;0;L;;;;;N;;;;; +18884;TANGUT COMPONENT-133;Lo;0;L;;;;;N;;;;; +18885;TANGUT COMPONENT-134;Lo;0;L;;;;;N;;;;; +18886;TANGUT COMPONENT-135;Lo;0;L;;;;;N;;;;; +18887;TANGUT COMPONENT-136;Lo;0;L;;;;;N;;;;; +18888;TANGUT COMPONENT-137;Lo;0;L;;;;;N;;;;; +18889;TANGUT COMPONENT-138;Lo;0;L;;;;;N;;;;; +1888A;TANGUT COMPONENT-139;Lo;0;L;;;;;N;;;;; +1888B;TANGUT COMPONENT-140;Lo;0;L;;;;;N;;;;; +1888C;TANGUT COMPONENT-141;Lo;0;L;;;;;N;;;;; +1888D;TANGUT COMPONENT-142;Lo;0;L;;;;;N;;;;; +1888E;TANGUT COMPONENT-143;Lo;0;L;;;;;N;;;;; +1888F;TANGUT COMPONENT-144;Lo;0;L;;;;;N;;;;; +18890;TANGUT COMPONENT-145;Lo;0;L;;;;;N;;;;; +18891;TANGUT COMPONENT-146;Lo;0;L;;;;;N;;;;; +18892;TANGUT COMPONENT-147;Lo;0;L;;;;;N;;;;; +18893;TANGUT COMPONENT-148;Lo;0;L;;;;;N;;;;; +18894;TANGUT COMPONENT-149;Lo;0;L;;;;;N;;;;; +18895;TANGUT COMPONENT-150;Lo;0;L;;;;;N;;;;; +18896;TANGUT COMPONENT-151;Lo;0;L;;;;;N;;;;; +18897;TANGUT COMPONENT-152;Lo;0;L;;;;;N;;;;; +18898;TANGUT COMPONENT-153;Lo;0;L;;;;;N;;;;; +18899;TANGUT COMPONENT-154;Lo;0;L;;;;;N;;;;; +1889A;TANGUT COMPONENT-155;Lo;0;L;;;;;N;;;;; +1889B;TANGUT COMPONENT-156;Lo;0;L;;;;;N;;;;; +1889C;TANGUT COMPONENT-157;Lo;0;L;;;;;N;;;;; +1889D;TANGUT COMPONENT-158;Lo;0;L;;;;;N;;;;; +1889E;TANGUT COMPONENT-159;Lo;0;L;;;;;N;;;;; +1889F;TANGUT COMPONENT-160;Lo;0;L;;;;;N;;;;; +188A0;TANGUT COMPONENT-161;Lo;0;L;;;;;N;;;;; +188A1;TANGUT COMPONENT-162;Lo;0;L;;;;;N;;;;; +188A2;TANGUT COMPONENT-163;Lo;0;L;;;;;N;;;;; +188A3;TANGUT COMPONENT-164;Lo;0;L;;;;;N;;;;; +188A4;TANGUT COMPONENT-165;Lo;0;L;;;;;N;;;;; +188A5;TANGUT COMPONENT-166;Lo;0;L;;;;;N;;;;; +188A6;TANGUT COMPONENT-167;Lo;0;L;;;;;N;;;;; +188A7;TANGUT COMPONENT-168;Lo;0;L;;;;;N;;;;; +188A8;TANGUT COMPONENT-169;Lo;0;L;;;;;N;;;;; +188A9;TANGUT COMPONENT-170;Lo;0;L;;;;;N;;;;; +188AA;TANGUT COMPONENT-171;Lo;0;L;;;;;N;;;;; +188AB;TANGUT COMPONENT-172;Lo;0;L;;;;;N;;;;; +188AC;TANGUT COMPONENT-173;Lo;0;L;;;;;N;;;;; +188AD;TANGUT COMPONENT-174;Lo;0;L;;;;;N;;;;; +188AE;TANGUT COMPONENT-175;Lo;0;L;;;;;N;;;;; +188AF;TANGUT COMPONENT-176;Lo;0;L;;;;;N;;;;; +188B0;TANGUT COMPONENT-177;Lo;0;L;;;;;N;;;;; +188B1;TANGUT COMPONENT-178;Lo;0;L;;;;;N;;;;; +188B2;TANGUT COMPONENT-179;Lo;0;L;;;;;N;;;;; +188B3;TANGUT COMPONENT-180;Lo;0;L;;;;;N;;;;; +188B4;TANGUT COMPONENT-181;Lo;0;L;;;;;N;;;;; +188B5;TANGUT COMPONENT-182;Lo;0;L;;;;;N;;;;; +188B6;TANGUT COMPONENT-183;Lo;0;L;;;;;N;;;;; +188B7;TANGUT COMPONENT-184;Lo;0;L;;;;;N;;;;; +188B8;TANGUT COMPONENT-185;Lo;0;L;;;;;N;;;;; +188B9;TANGUT COMPONENT-186;Lo;0;L;;;;;N;;;;; +188BA;TANGUT COMPONENT-187;Lo;0;L;;;;;N;;;;; +188BB;TANGUT COMPONENT-188;Lo;0;L;;;;;N;;;;; +188BC;TANGUT COMPONENT-189;Lo;0;L;;;;;N;;;;; +188BD;TANGUT COMPONENT-190;Lo;0;L;;;;;N;;;;; +188BE;TANGUT COMPONENT-191;Lo;0;L;;;;;N;;;;; +188BF;TANGUT COMPONENT-192;Lo;0;L;;;;;N;;;;; +188C0;TANGUT COMPONENT-193;Lo;0;L;;;;;N;;;;; +188C1;TANGUT COMPONENT-194;Lo;0;L;;;;;N;;;;; +188C2;TANGUT COMPONENT-195;Lo;0;L;;;;;N;;;;; +188C3;TANGUT COMPONENT-196;Lo;0;L;;;;;N;;;;; +188C4;TANGUT COMPONENT-197;Lo;0;L;;;;;N;;;;; +188C5;TANGUT COMPONENT-198;Lo;0;L;;;;;N;;;;; +188C6;TANGUT COMPONENT-199;Lo;0;L;;;;;N;;;;; +188C7;TANGUT COMPONENT-200;Lo;0;L;;;;;N;;;;; +188C8;TANGUT COMPONENT-201;Lo;0;L;;;;;N;;;;; +188C9;TANGUT COMPONENT-202;Lo;0;L;;;;;N;;;;; +188CA;TANGUT COMPONENT-203;Lo;0;L;;;;;N;;;;; +188CB;TANGUT COMPONENT-204;Lo;0;L;;;;;N;;;;; +188CC;TANGUT COMPONENT-205;Lo;0;L;;;;;N;;;;; +188CD;TANGUT COMPONENT-206;Lo;0;L;;;;;N;;;;; +188CE;TANGUT COMPONENT-207;Lo;0;L;;;;;N;;;;; +188CF;TANGUT COMPONENT-208;Lo;0;L;;;;;N;;;;; +188D0;TANGUT COMPONENT-209;Lo;0;L;;;;;N;;;;; +188D1;TANGUT COMPONENT-210;Lo;0;L;;;;;N;;;;; +188D2;TANGUT COMPONENT-211;Lo;0;L;;;;;N;;;;; +188D3;TANGUT COMPONENT-212;Lo;0;L;;;;;N;;;;; +188D4;TANGUT COMPONENT-213;Lo;0;L;;;;;N;;;;; +188D5;TANGUT COMPONENT-214;Lo;0;L;;;;;N;;;;; +188D6;TANGUT COMPONENT-215;Lo;0;L;;;;;N;;;;; +188D7;TANGUT COMPONENT-216;Lo;0;L;;;;;N;;;;; +188D8;TANGUT COMPONENT-217;Lo;0;L;;;;;N;;;;; +188D9;TANGUT COMPONENT-218;Lo;0;L;;;;;N;;;;; +188DA;TANGUT COMPONENT-219;Lo;0;L;;;;;N;;;;; +188DB;TANGUT COMPONENT-220;Lo;0;L;;;;;N;;;;; +188DC;TANGUT COMPONENT-221;Lo;0;L;;;;;N;;;;; +188DD;TANGUT COMPONENT-222;Lo;0;L;;;;;N;;;;; +188DE;TANGUT COMPONENT-223;Lo;0;L;;;;;N;;;;; +188DF;TANGUT COMPONENT-224;Lo;0;L;;;;;N;;;;; +188E0;TANGUT COMPONENT-225;Lo;0;L;;;;;N;;;;; +188E1;TANGUT COMPONENT-226;Lo;0;L;;;;;N;;;;; +188E2;TANGUT COMPONENT-227;Lo;0;L;;;;;N;;;;; +188E3;TANGUT COMPONENT-228;Lo;0;L;;;;;N;;;;; +188E4;TANGUT COMPONENT-229;Lo;0;L;;;;;N;;;;; +188E5;TANGUT COMPONENT-230;Lo;0;L;;;;;N;;;;; +188E6;TANGUT COMPONENT-231;Lo;0;L;;;;;N;;;;; +188E7;TANGUT COMPONENT-232;Lo;0;L;;;;;N;;;;; +188E8;TANGUT COMPONENT-233;Lo;0;L;;;;;N;;;;; +188E9;TANGUT COMPONENT-234;Lo;0;L;;;;;N;;;;; +188EA;TANGUT COMPONENT-235;Lo;0;L;;;;;N;;;;; +188EB;TANGUT COMPONENT-236;Lo;0;L;;;;;N;;;;; +188EC;TANGUT COMPONENT-237;Lo;0;L;;;;;N;;;;; +188ED;TANGUT COMPONENT-238;Lo;0;L;;;;;N;;;;; +188EE;TANGUT COMPONENT-239;Lo;0;L;;;;;N;;;;; +188EF;TANGUT COMPONENT-240;Lo;0;L;;;;;N;;;;; +188F0;TANGUT COMPONENT-241;Lo;0;L;;;;;N;;;;; +188F1;TANGUT COMPONENT-242;Lo;0;L;;;;;N;;;;; +188F2;TANGUT COMPONENT-243;Lo;0;L;;;;;N;;;;; +188F3;TANGUT COMPONENT-244;Lo;0;L;;;;;N;;;;; +188F4;TANGUT COMPONENT-245;Lo;0;L;;;;;N;;;;; +188F5;TANGUT COMPONENT-246;Lo;0;L;;;;;N;;;;; +188F6;TANGUT COMPONENT-247;Lo;0;L;;;;;N;;;;; +188F7;TANGUT COMPONENT-248;Lo;0;L;;;;;N;;;;; +188F8;TANGUT COMPONENT-249;Lo;0;L;;;;;N;;;;; +188F9;TANGUT COMPONENT-250;Lo;0;L;;;;;N;;;;; +188FA;TANGUT COMPONENT-251;Lo;0;L;;;;;N;;;;; +188FB;TANGUT COMPONENT-252;Lo;0;L;;;;;N;;;;; +188FC;TANGUT COMPONENT-253;Lo;0;L;;;;;N;;;;; +188FD;TANGUT COMPONENT-254;Lo;0;L;;;;;N;;;;; +188FE;TANGUT COMPONENT-255;Lo;0;L;;;;;N;;;;; +188FF;TANGUT COMPONENT-256;Lo;0;L;;;;;N;;;;; +18900;TANGUT COMPONENT-257;Lo;0;L;;;;;N;;;;; +18901;TANGUT COMPONENT-258;Lo;0;L;;;;;N;;;;; +18902;TANGUT COMPONENT-259;Lo;0;L;;;;;N;;;;; +18903;TANGUT COMPONENT-260;Lo;0;L;;;;;N;;;;; +18904;TANGUT COMPONENT-261;Lo;0;L;;;;;N;;;;; +18905;TANGUT COMPONENT-262;Lo;0;L;;;;;N;;;;; +18906;TANGUT COMPONENT-263;Lo;0;L;;;;;N;;;;; +18907;TANGUT COMPONENT-264;Lo;0;L;;;;;N;;;;; +18908;TANGUT COMPONENT-265;Lo;0;L;;;;;N;;;;; +18909;TANGUT COMPONENT-266;Lo;0;L;;;;;N;;;;; +1890A;TANGUT COMPONENT-267;Lo;0;L;;;;;N;;;;; +1890B;TANGUT COMPONENT-268;Lo;0;L;;;;;N;;;;; +1890C;TANGUT COMPONENT-269;Lo;0;L;;;;;N;;;;; +1890D;TANGUT COMPONENT-270;Lo;0;L;;;;;N;;;;; +1890E;TANGUT COMPONENT-271;Lo;0;L;;;;;N;;;;; +1890F;TANGUT COMPONENT-272;Lo;0;L;;;;;N;;;;; +18910;TANGUT COMPONENT-273;Lo;0;L;;;;;N;;;;; +18911;TANGUT COMPONENT-274;Lo;0;L;;;;;N;;;;; +18912;TANGUT COMPONENT-275;Lo;0;L;;;;;N;;;;; +18913;TANGUT COMPONENT-276;Lo;0;L;;;;;N;;;;; +18914;TANGUT COMPONENT-277;Lo;0;L;;;;;N;;;;; +18915;TANGUT COMPONENT-278;Lo;0;L;;;;;N;;;;; +18916;TANGUT COMPONENT-279;Lo;0;L;;;;;N;;;;; +18917;TANGUT COMPONENT-280;Lo;0;L;;;;;N;;;;; +18918;TANGUT COMPONENT-281;Lo;0;L;;;;;N;;;;; +18919;TANGUT COMPONENT-282;Lo;0;L;;;;;N;;;;; +1891A;TANGUT COMPONENT-283;Lo;0;L;;;;;N;;;;; +1891B;TANGUT COMPONENT-284;Lo;0;L;;;;;N;;;;; +1891C;TANGUT COMPONENT-285;Lo;0;L;;;;;N;;;;; +1891D;TANGUT COMPONENT-286;Lo;0;L;;;;;N;;;;; +1891E;TANGUT COMPONENT-287;Lo;0;L;;;;;N;;;;; +1891F;TANGUT COMPONENT-288;Lo;0;L;;;;;N;;;;; +18920;TANGUT COMPONENT-289;Lo;0;L;;;;;N;;;;; +18921;TANGUT COMPONENT-290;Lo;0;L;;;;;N;;;;; +18922;TANGUT COMPONENT-291;Lo;0;L;;;;;N;;;;; +18923;TANGUT COMPONENT-292;Lo;0;L;;;;;N;;;;; +18924;TANGUT COMPONENT-293;Lo;0;L;;;;;N;;;;; +18925;TANGUT COMPONENT-294;Lo;0;L;;;;;N;;;;; +18926;TANGUT COMPONENT-295;Lo;0;L;;;;;N;;;;; +18927;TANGUT COMPONENT-296;Lo;0;L;;;;;N;;;;; +18928;TANGUT COMPONENT-297;Lo;0;L;;;;;N;;;;; +18929;TANGUT COMPONENT-298;Lo;0;L;;;;;N;;;;; +1892A;TANGUT COMPONENT-299;Lo;0;L;;;;;N;;;;; +1892B;TANGUT COMPONENT-300;Lo;0;L;;;;;N;;;;; +1892C;TANGUT COMPONENT-301;Lo;0;L;;;;;N;;;;; +1892D;TANGUT COMPONENT-302;Lo;0;L;;;;;N;;;;; +1892E;TANGUT COMPONENT-303;Lo;0;L;;;;;N;;;;; +1892F;TANGUT COMPONENT-304;Lo;0;L;;;;;N;;;;; +18930;TANGUT COMPONENT-305;Lo;0;L;;;;;N;;;;; +18931;TANGUT COMPONENT-306;Lo;0;L;;;;;N;;;;; +18932;TANGUT COMPONENT-307;Lo;0;L;;;;;N;;;;; +18933;TANGUT COMPONENT-308;Lo;0;L;;;;;N;;;;; +18934;TANGUT COMPONENT-309;Lo;0;L;;;;;N;;;;; +18935;TANGUT COMPONENT-310;Lo;0;L;;;;;N;;;;; +18936;TANGUT COMPONENT-311;Lo;0;L;;;;;N;;;;; +18937;TANGUT COMPONENT-312;Lo;0;L;;;;;N;;;;; +18938;TANGUT COMPONENT-313;Lo;0;L;;;;;N;;;;; +18939;TANGUT COMPONENT-314;Lo;0;L;;;;;N;;;;; +1893A;TANGUT COMPONENT-315;Lo;0;L;;;;;N;;;;; +1893B;TANGUT COMPONENT-316;Lo;0;L;;;;;N;;;;; +1893C;TANGUT COMPONENT-317;Lo;0;L;;;;;N;;;;; +1893D;TANGUT COMPONENT-318;Lo;0;L;;;;;N;;;;; +1893E;TANGUT COMPONENT-319;Lo;0;L;;;;;N;;;;; +1893F;TANGUT COMPONENT-320;Lo;0;L;;;;;N;;;;; +18940;TANGUT COMPONENT-321;Lo;0;L;;;;;N;;;;; +18941;TANGUT COMPONENT-322;Lo;0;L;;;;;N;;;;; +18942;TANGUT COMPONENT-323;Lo;0;L;;;;;N;;;;; +18943;TANGUT COMPONENT-324;Lo;0;L;;;;;N;;;;; +18944;TANGUT COMPONENT-325;Lo;0;L;;;;;N;;;;; +18945;TANGUT COMPONENT-326;Lo;0;L;;;;;N;;;;; +18946;TANGUT COMPONENT-327;Lo;0;L;;;;;N;;;;; +18947;TANGUT COMPONENT-328;Lo;0;L;;;;;N;;;;; +18948;TANGUT COMPONENT-329;Lo;0;L;;;;;N;;;;; +18949;TANGUT COMPONENT-330;Lo;0;L;;;;;N;;;;; +1894A;TANGUT COMPONENT-331;Lo;0;L;;;;;N;;;;; +1894B;TANGUT COMPONENT-332;Lo;0;L;;;;;N;;;;; +1894C;TANGUT COMPONENT-333;Lo;0;L;;;;;N;;;;; +1894D;TANGUT COMPONENT-334;Lo;0;L;;;;;N;;;;; +1894E;TANGUT COMPONENT-335;Lo;0;L;;;;;N;;;;; +1894F;TANGUT COMPONENT-336;Lo;0;L;;;;;N;;;;; +18950;TANGUT COMPONENT-337;Lo;0;L;;;;;N;;;;; +18951;TANGUT COMPONENT-338;Lo;0;L;;;;;N;;;;; +18952;TANGUT COMPONENT-339;Lo;0;L;;;;;N;;;;; +18953;TANGUT COMPONENT-340;Lo;0;L;;;;;N;;;;; +18954;TANGUT COMPONENT-341;Lo;0;L;;;;;N;;;;; +18955;TANGUT COMPONENT-342;Lo;0;L;;;;;N;;;;; +18956;TANGUT COMPONENT-343;Lo;0;L;;;;;N;;;;; +18957;TANGUT COMPONENT-344;Lo;0;L;;;;;N;;;;; +18958;TANGUT COMPONENT-345;Lo;0;L;;;;;N;;;;; +18959;TANGUT COMPONENT-346;Lo;0;L;;;;;N;;;;; +1895A;TANGUT COMPONENT-347;Lo;0;L;;;;;N;;;;; +1895B;TANGUT COMPONENT-348;Lo;0;L;;;;;N;;;;; +1895C;TANGUT COMPONENT-349;Lo;0;L;;;;;N;;;;; +1895D;TANGUT COMPONENT-350;Lo;0;L;;;;;N;;;;; +1895E;TANGUT COMPONENT-351;Lo;0;L;;;;;N;;;;; +1895F;TANGUT COMPONENT-352;Lo;0;L;;;;;N;;;;; +18960;TANGUT COMPONENT-353;Lo;0;L;;;;;N;;;;; +18961;TANGUT COMPONENT-354;Lo;0;L;;;;;N;;;;; +18962;TANGUT COMPONENT-355;Lo;0;L;;;;;N;;;;; +18963;TANGUT COMPONENT-356;Lo;0;L;;;;;N;;;;; +18964;TANGUT COMPONENT-357;Lo;0;L;;;;;N;;;;; +18965;TANGUT COMPONENT-358;Lo;0;L;;;;;N;;;;; +18966;TANGUT COMPONENT-359;Lo;0;L;;;;;N;;;;; +18967;TANGUT COMPONENT-360;Lo;0;L;;;;;N;;;;; +18968;TANGUT COMPONENT-361;Lo;0;L;;;;;N;;;;; +18969;TANGUT COMPONENT-362;Lo;0;L;;;;;N;;;;; +1896A;TANGUT COMPONENT-363;Lo;0;L;;;;;N;;;;; +1896B;TANGUT COMPONENT-364;Lo;0;L;;;;;N;;;;; +1896C;TANGUT COMPONENT-365;Lo;0;L;;;;;N;;;;; +1896D;TANGUT COMPONENT-366;Lo;0;L;;;;;N;;;;; +1896E;TANGUT COMPONENT-367;Lo;0;L;;;;;N;;;;; +1896F;TANGUT COMPONENT-368;Lo;0;L;;;;;N;;;;; +18970;TANGUT COMPONENT-369;Lo;0;L;;;;;N;;;;; +18971;TANGUT COMPONENT-370;Lo;0;L;;;;;N;;;;; +18972;TANGUT COMPONENT-371;Lo;0;L;;;;;N;;;;; +18973;TANGUT COMPONENT-372;Lo;0;L;;;;;N;;;;; +18974;TANGUT COMPONENT-373;Lo;0;L;;;;;N;;;;; +18975;TANGUT COMPONENT-374;Lo;0;L;;;;;N;;;;; +18976;TANGUT COMPONENT-375;Lo;0;L;;;;;N;;;;; +18977;TANGUT COMPONENT-376;Lo;0;L;;;;;N;;;;; +18978;TANGUT COMPONENT-377;Lo;0;L;;;;;N;;;;; +18979;TANGUT COMPONENT-378;Lo;0;L;;;;;N;;;;; +1897A;TANGUT COMPONENT-379;Lo;0;L;;;;;N;;;;; +1897B;TANGUT COMPONENT-380;Lo;0;L;;;;;N;;;;; +1897C;TANGUT COMPONENT-381;Lo;0;L;;;;;N;;;;; +1897D;TANGUT COMPONENT-382;Lo;0;L;;;;;N;;;;; +1897E;TANGUT COMPONENT-383;Lo;0;L;;;;;N;;;;; +1897F;TANGUT COMPONENT-384;Lo;0;L;;;;;N;;;;; +18980;TANGUT COMPONENT-385;Lo;0;L;;;;;N;;;;; +18981;TANGUT COMPONENT-386;Lo;0;L;;;;;N;;;;; +18982;TANGUT COMPONENT-387;Lo;0;L;;;;;N;;;;; +18983;TANGUT COMPONENT-388;Lo;0;L;;;;;N;;;;; +18984;TANGUT COMPONENT-389;Lo;0;L;;;;;N;;;;; +18985;TANGUT COMPONENT-390;Lo;0;L;;;;;N;;;;; +18986;TANGUT COMPONENT-391;Lo;0;L;;;;;N;;;;; +18987;TANGUT COMPONENT-392;Lo;0;L;;;;;N;;;;; +18988;TANGUT COMPONENT-393;Lo;0;L;;;;;N;;;;; +18989;TANGUT COMPONENT-394;Lo;0;L;;;;;N;;;;; +1898A;TANGUT COMPONENT-395;Lo;0;L;;;;;N;;;;; +1898B;TANGUT COMPONENT-396;Lo;0;L;;;;;N;;;;; +1898C;TANGUT COMPONENT-397;Lo;0;L;;;;;N;;;;; +1898D;TANGUT COMPONENT-398;Lo;0;L;;;;;N;;;;; +1898E;TANGUT COMPONENT-399;Lo;0;L;;;;;N;;;;; +1898F;TANGUT COMPONENT-400;Lo;0;L;;;;;N;;;;; +18990;TANGUT COMPONENT-401;Lo;0;L;;;;;N;;;;; +18991;TANGUT COMPONENT-402;Lo;0;L;;;;;N;;;;; +18992;TANGUT COMPONENT-403;Lo;0;L;;;;;N;;;;; +18993;TANGUT COMPONENT-404;Lo;0;L;;;;;N;;;;; +18994;TANGUT COMPONENT-405;Lo;0;L;;;;;N;;;;; +18995;TANGUT COMPONENT-406;Lo;0;L;;;;;N;;;;; +18996;TANGUT COMPONENT-407;Lo;0;L;;;;;N;;;;; +18997;TANGUT COMPONENT-408;Lo;0;L;;;;;N;;;;; +18998;TANGUT COMPONENT-409;Lo;0;L;;;;;N;;;;; +18999;TANGUT COMPONENT-410;Lo;0;L;;;;;N;;;;; +1899A;TANGUT COMPONENT-411;Lo;0;L;;;;;N;;;;; +1899B;TANGUT COMPONENT-412;Lo;0;L;;;;;N;;;;; +1899C;TANGUT COMPONENT-413;Lo;0;L;;;;;N;;;;; +1899D;TANGUT COMPONENT-414;Lo;0;L;;;;;N;;;;; +1899E;TANGUT COMPONENT-415;Lo;0;L;;;;;N;;;;; +1899F;TANGUT COMPONENT-416;Lo;0;L;;;;;N;;;;; +189A0;TANGUT COMPONENT-417;Lo;0;L;;;;;N;;;;; +189A1;TANGUT COMPONENT-418;Lo;0;L;;;;;N;;;;; +189A2;TANGUT COMPONENT-419;Lo;0;L;;;;;N;;;;; +189A3;TANGUT COMPONENT-420;Lo;0;L;;;;;N;;;;; +189A4;TANGUT COMPONENT-421;Lo;0;L;;;;;N;;;;; +189A5;TANGUT COMPONENT-422;Lo;0;L;;;;;N;;;;; +189A6;TANGUT COMPONENT-423;Lo;0;L;;;;;N;;;;; +189A7;TANGUT COMPONENT-424;Lo;0;L;;;;;N;;;;; +189A8;TANGUT COMPONENT-425;Lo;0;L;;;;;N;;;;; +189A9;TANGUT COMPONENT-426;Lo;0;L;;;;;N;;;;; +189AA;TANGUT COMPONENT-427;Lo;0;L;;;;;N;;;;; +189AB;TANGUT COMPONENT-428;Lo;0;L;;;;;N;;;;; +189AC;TANGUT COMPONENT-429;Lo;0;L;;;;;N;;;;; +189AD;TANGUT COMPONENT-430;Lo;0;L;;;;;N;;;;; +189AE;TANGUT COMPONENT-431;Lo;0;L;;;;;N;;;;; +189AF;TANGUT COMPONENT-432;Lo;0;L;;;;;N;;;;; +189B0;TANGUT COMPONENT-433;Lo;0;L;;;;;N;;;;; +189B1;TANGUT COMPONENT-434;Lo;0;L;;;;;N;;;;; +189B2;TANGUT COMPONENT-435;Lo;0;L;;;;;N;;;;; +189B3;TANGUT COMPONENT-436;Lo;0;L;;;;;N;;;;; +189B4;TANGUT COMPONENT-437;Lo;0;L;;;;;N;;;;; +189B5;TANGUT COMPONENT-438;Lo;0;L;;;;;N;;;;; +189B6;TANGUT COMPONENT-439;Lo;0;L;;;;;N;;;;; +189B7;TANGUT COMPONENT-440;Lo;0;L;;;;;N;;;;; +189B8;TANGUT COMPONENT-441;Lo;0;L;;;;;N;;;;; +189B9;TANGUT COMPONENT-442;Lo;0;L;;;;;N;;;;; +189BA;TANGUT COMPONENT-443;Lo;0;L;;;;;N;;;;; +189BB;TANGUT COMPONENT-444;Lo;0;L;;;;;N;;;;; +189BC;TANGUT COMPONENT-445;Lo;0;L;;;;;N;;;;; +189BD;TANGUT COMPONENT-446;Lo;0;L;;;;;N;;;;; +189BE;TANGUT COMPONENT-447;Lo;0;L;;;;;N;;;;; +189BF;TANGUT COMPONENT-448;Lo;0;L;;;;;N;;;;; +189C0;TANGUT COMPONENT-449;Lo;0;L;;;;;N;;;;; +189C1;TANGUT COMPONENT-450;Lo;0;L;;;;;N;;;;; +189C2;TANGUT COMPONENT-451;Lo;0;L;;;;;N;;;;; +189C3;TANGUT COMPONENT-452;Lo;0;L;;;;;N;;;;; +189C4;TANGUT COMPONENT-453;Lo;0;L;;;;;N;;;;; +189C5;TANGUT COMPONENT-454;Lo;0;L;;;;;N;;;;; +189C6;TANGUT COMPONENT-455;Lo;0;L;;;;;N;;;;; +189C7;TANGUT COMPONENT-456;Lo;0;L;;;;;N;;;;; +189C8;TANGUT COMPONENT-457;Lo;0;L;;;;;N;;;;; +189C9;TANGUT COMPONENT-458;Lo;0;L;;;;;N;;;;; +189CA;TANGUT COMPONENT-459;Lo;0;L;;;;;N;;;;; +189CB;TANGUT COMPONENT-460;Lo;0;L;;;;;N;;;;; +189CC;TANGUT COMPONENT-461;Lo;0;L;;;;;N;;;;; +189CD;TANGUT COMPONENT-462;Lo;0;L;;;;;N;;;;; +189CE;TANGUT COMPONENT-463;Lo;0;L;;;;;N;;;;; +189CF;TANGUT COMPONENT-464;Lo;0;L;;;;;N;;;;; +189D0;TANGUT COMPONENT-465;Lo;0;L;;;;;N;;;;; +189D1;TANGUT COMPONENT-466;Lo;0;L;;;;;N;;;;; +189D2;TANGUT COMPONENT-467;Lo;0;L;;;;;N;;;;; +189D3;TANGUT COMPONENT-468;Lo;0;L;;;;;N;;;;; +189D4;TANGUT COMPONENT-469;Lo;0;L;;;;;N;;;;; +189D5;TANGUT COMPONENT-470;Lo;0;L;;;;;N;;;;; +189D6;TANGUT COMPONENT-471;Lo;0;L;;;;;N;;;;; +189D7;TANGUT COMPONENT-472;Lo;0;L;;;;;N;;;;; +189D8;TANGUT COMPONENT-473;Lo;0;L;;;;;N;;;;; +189D9;TANGUT COMPONENT-474;Lo;0;L;;;;;N;;;;; +189DA;TANGUT COMPONENT-475;Lo;0;L;;;;;N;;;;; +189DB;TANGUT COMPONENT-476;Lo;0;L;;;;;N;;;;; +189DC;TANGUT COMPONENT-477;Lo;0;L;;;;;N;;;;; +189DD;TANGUT COMPONENT-478;Lo;0;L;;;;;N;;;;; +189DE;TANGUT COMPONENT-479;Lo;0;L;;;;;N;;;;; +189DF;TANGUT COMPONENT-480;Lo;0;L;;;;;N;;;;; +189E0;TANGUT COMPONENT-481;Lo;0;L;;;;;N;;;;; +189E1;TANGUT COMPONENT-482;Lo;0;L;;;;;N;;;;; +189E2;TANGUT COMPONENT-483;Lo;0;L;;;;;N;;;;; +189E3;TANGUT COMPONENT-484;Lo;0;L;;;;;N;;;;; +189E4;TANGUT COMPONENT-485;Lo;0;L;;;;;N;;;;; +189E5;TANGUT COMPONENT-486;Lo;0;L;;;;;N;;;;; +189E6;TANGUT COMPONENT-487;Lo;0;L;;;;;N;;;;; +189E7;TANGUT COMPONENT-488;Lo;0;L;;;;;N;;;;; +189E8;TANGUT COMPONENT-489;Lo;0;L;;;;;N;;;;; +189E9;TANGUT COMPONENT-490;Lo;0;L;;;;;N;;;;; +189EA;TANGUT COMPONENT-491;Lo;0;L;;;;;N;;;;; +189EB;TANGUT COMPONENT-492;Lo;0;L;;;;;N;;;;; +189EC;TANGUT COMPONENT-493;Lo;0;L;;;;;N;;;;; +189ED;TANGUT COMPONENT-494;Lo;0;L;;;;;N;;;;; +189EE;TANGUT COMPONENT-495;Lo;0;L;;;;;N;;;;; +189EF;TANGUT COMPONENT-496;Lo;0;L;;;;;N;;;;; +189F0;TANGUT COMPONENT-497;Lo;0;L;;;;;N;;;;; +189F1;TANGUT COMPONENT-498;Lo;0;L;;;;;N;;;;; +189F2;TANGUT COMPONENT-499;Lo;0;L;;;;;N;;;;; +189F3;TANGUT COMPONENT-500;Lo;0;L;;;;;N;;;;; +189F4;TANGUT COMPONENT-501;Lo;0;L;;;;;N;;;;; +189F5;TANGUT COMPONENT-502;Lo;0;L;;;;;N;;;;; +189F6;TANGUT COMPONENT-503;Lo;0;L;;;;;N;;;;; +189F7;TANGUT COMPONENT-504;Lo;0;L;;;;;N;;;;; +189F8;TANGUT COMPONENT-505;Lo;0;L;;;;;N;;;;; +189F9;TANGUT COMPONENT-506;Lo;0;L;;;;;N;;;;; +189FA;TANGUT COMPONENT-507;Lo;0;L;;;;;N;;;;; +189FB;TANGUT COMPONENT-508;Lo;0;L;;;;;N;;;;; +189FC;TANGUT COMPONENT-509;Lo;0;L;;;;;N;;;;; +189FD;TANGUT COMPONENT-510;Lo;0;L;;;;;N;;;;; +189FE;TANGUT COMPONENT-511;Lo;0;L;;;;;N;;;;; +189FF;TANGUT COMPONENT-512;Lo;0;L;;;;;N;;;;; +18A00;TANGUT COMPONENT-513;Lo;0;L;;;;;N;;;;; +18A01;TANGUT COMPONENT-514;Lo;0;L;;;;;N;;;;; +18A02;TANGUT COMPONENT-515;Lo;0;L;;;;;N;;;;; +18A03;TANGUT COMPONENT-516;Lo;0;L;;;;;N;;;;; +18A04;TANGUT COMPONENT-517;Lo;0;L;;;;;N;;;;; +18A05;TANGUT COMPONENT-518;Lo;0;L;;;;;N;;;;; +18A06;TANGUT COMPONENT-519;Lo;0;L;;;;;N;;;;; +18A07;TANGUT COMPONENT-520;Lo;0;L;;;;;N;;;;; +18A08;TANGUT COMPONENT-521;Lo;0;L;;;;;N;;;;; +18A09;TANGUT COMPONENT-522;Lo;0;L;;;;;N;;;;; +18A0A;TANGUT COMPONENT-523;Lo;0;L;;;;;N;;;;; +18A0B;TANGUT COMPONENT-524;Lo;0;L;;;;;N;;;;; +18A0C;TANGUT COMPONENT-525;Lo;0;L;;;;;N;;;;; +18A0D;TANGUT COMPONENT-526;Lo;0;L;;;;;N;;;;; +18A0E;TANGUT COMPONENT-527;Lo;0;L;;;;;N;;;;; +18A0F;TANGUT COMPONENT-528;Lo;0;L;;;;;N;;;;; +18A10;TANGUT COMPONENT-529;Lo;0;L;;;;;N;;;;; +18A11;TANGUT COMPONENT-530;Lo;0;L;;;;;N;;;;; +18A12;TANGUT COMPONENT-531;Lo;0;L;;;;;N;;;;; +18A13;TANGUT COMPONENT-532;Lo;0;L;;;;;N;;;;; +18A14;TANGUT COMPONENT-533;Lo;0;L;;;;;N;;;;; +18A15;TANGUT COMPONENT-534;Lo;0;L;;;;;N;;;;; +18A16;TANGUT COMPONENT-535;Lo;0;L;;;;;N;;;;; +18A17;TANGUT COMPONENT-536;Lo;0;L;;;;;N;;;;; +18A18;TANGUT COMPONENT-537;Lo;0;L;;;;;N;;;;; +18A19;TANGUT COMPONENT-538;Lo;0;L;;;;;N;;;;; +18A1A;TANGUT COMPONENT-539;Lo;0;L;;;;;N;;;;; +18A1B;TANGUT COMPONENT-540;Lo;0;L;;;;;N;;;;; +18A1C;TANGUT COMPONENT-541;Lo;0;L;;;;;N;;;;; +18A1D;TANGUT COMPONENT-542;Lo;0;L;;;;;N;;;;; +18A1E;TANGUT COMPONENT-543;Lo;0;L;;;;;N;;;;; +18A1F;TANGUT COMPONENT-544;Lo;0;L;;;;;N;;;;; +18A20;TANGUT COMPONENT-545;Lo;0;L;;;;;N;;;;; +18A21;TANGUT COMPONENT-546;Lo;0;L;;;;;N;;;;; +18A22;TANGUT COMPONENT-547;Lo;0;L;;;;;N;;;;; +18A23;TANGUT COMPONENT-548;Lo;0;L;;;;;N;;;;; +18A24;TANGUT COMPONENT-549;Lo;0;L;;;;;N;;;;; +18A25;TANGUT COMPONENT-550;Lo;0;L;;;;;N;;;;; +18A26;TANGUT COMPONENT-551;Lo;0;L;;;;;N;;;;; +18A27;TANGUT COMPONENT-552;Lo;0;L;;;;;N;;;;; +18A28;TANGUT COMPONENT-553;Lo;0;L;;;;;N;;;;; +18A29;TANGUT COMPONENT-554;Lo;0;L;;;;;N;;;;; +18A2A;TANGUT COMPONENT-555;Lo;0;L;;;;;N;;;;; +18A2B;TANGUT COMPONENT-556;Lo;0;L;;;;;N;;;;; +18A2C;TANGUT COMPONENT-557;Lo;0;L;;;;;N;;;;; +18A2D;TANGUT COMPONENT-558;Lo;0;L;;;;;N;;;;; +18A2E;TANGUT COMPONENT-559;Lo;0;L;;;;;N;;;;; +18A2F;TANGUT COMPONENT-560;Lo;0;L;;;;;N;;;;; +18A30;TANGUT COMPONENT-561;Lo;0;L;;;;;N;;;;; +18A31;TANGUT COMPONENT-562;Lo;0;L;;;;;N;;;;; +18A32;TANGUT COMPONENT-563;Lo;0;L;;;;;N;;;;; +18A33;TANGUT COMPONENT-564;Lo;0;L;;;;;N;;;;; +18A34;TANGUT COMPONENT-565;Lo;0;L;;;;;N;;;;; +18A35;TANGUT COMPONENT-566;Lo;0;L;;;;;N;;;;; +18A36;TANGUT COMPONENT-567;Lo;0;L;;;;;N;;;;; +18A37;TANGUT COMPONENT-568;Lo;0;L;;;;;N;;;;; +18A38;TANGUT COMPONENT-569;Lo;0;L;;;;;N;;;;; +18A39;TANGUT COMPONENT-570;Lo;0;L;;;;;N;;;;; +18A3A;TANGUT COMPONENT-571;Lo;0;L;;;;;N;;;;; +18A3B;TANGUT COMPONENT-572;Lo;0;L;;;;;N;;;;; +18A3C;TANGUT COMPONENT-573;Lo;0;L;;;;;N;;;;; +18A3D;TANGUT COMPONENT-574;Lo;0;L;;;;;N;;;;; +18A3E;TANGUT COMPONENT-575;Lo;0;L;;;;;N;;;;; +18A3F;TANGUT COMPONENT-576;Lo;0;L;;;;;N;;;;; +18A40;TANGUT COMPONENT-577;Lo;0;L;;;;;N;;;;; +18A41;TANGUT COMPONENT-578;Lo;0;L;;;;;N;;;;; +18A42;TANGUT COMPONENT-579;Lo;0;L;;;;;N;;;;; +18A43;TANGUT COMPONENT-580;Lo;0;L;;;;;N;;;;; +18A44;TANGUT COMPONENT-581;Lo;0;L;;;;;N;;;;; +18A45;TANGUT COMPONENT-582;Lo;0;L;;;;;N;;;;; +18A46;TANGUT COMPONENT-583;Lo;0;L;;;;;N;;;;; +18A47;TANGUT COMPONENT-584;Lo;0;L;;;;;N;;;;; +18A48;TANGUT COMPONENT-585;Lo;0;L;;;;;N;;;;; +18A49;TANGUT COMPONENT-586;Lo;0;L;;;;;N;;;;; +18A4A;TANGUT COMPONENT-587;Lo;0;L;;;;;N;;;;; +18A4B;TANGUT COMPONENT-588;Lo;0;L;;;;;N;;;;; +18A4C;TANGUT COMPONENT-589;Lo;0;L;;;;;N;;;;; +18A4D;TANGUT COMPONENT-590;Lo;0;L;;;;;N;;;;; +18A4E;TANGUT COMPONENT-591;Lo;0;L;;;;;N;;;;; +18A4F;TANGUT COMPONENT-592;Lo;0;L;;;;;N;;;;; +18A50;TANGUT COMPONENT-593;Lo;0;L;;;;;N;;;;; +18A51;TANGUT COMPONENT-594;Lo;0;L;;;;;N;;;;; +18A52;TANGUT COMPONENT-595;Lo;0;L;;;;;N;;;;; +18A53;TANGUT COMPONENT-596;Lo;0;L;;;;;N;;;;; +18A54;TANGUT COMPONENT-597;Lo;0;L;;;;;N;;;;; +18A55;TANGUT COMPONENT-598;Lo;0;L;;;;;N;;;;; +18A56;TANGUT COMPONENT-599;Lo;0;L;;;;;N;;;;; +18A57;TANGUT COMPONENT-600;Lo;0;L;;;;;N;;;;; +18A58;TANGUT COMPONENT-601;Lo;0;L;;;;;N;;;;; +18A59;TANGUT COMPONENT-602;Lo;0;L;;;;;N;;;;; +18A5A;TANGUT COMPONENT-603;Lo;0;L;;;;;N;;;;; +18A5B;TANGUT COMPONENT-604;Lo;0;L;;;;;N;;;;; +18A5C;TANGUT COMPONENT-605;Lo;0;L;;;;;N;;;;; +18A5D;TANGUT COMPONENT-606;Lo;0;L;;;;;N;;;;; +18A5E;TANGUT COMPONENT-607;Lo;0;L;;;;;N;;;;; +18A5F;TANGUT COMPONENT-608;Lo;0;L;;;;;N;;;;; +18A60;TANGUT COMPONENT-609;Lo;0;L;;;;;N;;;;; +18A61;TANGUT COMPONENT-610;Lo;0;L;;;;;N;;;;; +18A62;TANGUT COMPONENT-611;Lo;0;L;;;;;N;;;;; +18A63;TANGUT COMPONENT-612;Lo;0;L;;;;;N;;;;; +18A64;TANGUT COMPONENT-613;Lo;0;L;;;;;N;;;;; +18A65;TANGUT COMPONENT-614;Lo;0;L;;;;;N;;;;; +18A66;TANGUT COMPONENT-615;Lo;0;L;;;;;N;;;;; +18A67;TANGUT COMPONENT-616;Lo;0;L;;;;;N;;;;; +18A68;TANGUT COMPONENT-617;Lo;0;L;;;;;N;;;;; +18A69;TANGUT COMPONENT-618;Lo;0;L;;;;;N;;;;; +18A6A;TANGUT COMPONENT-619;Lo;0;L;;;;;N;;;;; +18A6B;TANGUT COMPONENT-620;Lo;0;L;;;;;N;;;;; +18A6C;TANGUT COMPONENT-621;Lo;0;L;;;;;N;;;;; +18A6D;TANGUT COMPONENT-622;Lo;0;L;;;;;N;;;;; +18A6E;TANGUT COMPONENT-623;Lo;0;L;;;;;N;;;;; +18A6F;TANGUT COMPONENT-624;Lo;0;L;;;;;N;;;;; +18A70;TANGUT COMPONENT-625;Lo;0;L;;;;;N;;;;; +18A71;TANGUT COMPONENT-626;Lo;0;L;;;;;N;;;;; +18A72;TANGUT COMPONENT-627;Lo;0;L;;;;;N;;;;; +18A73;TANGUT COMPONENT-628;Lo;0;L;;;;;N;;;;; +18A74;TANGUT COMPONENT-629;Lo;0;L;;;;;N;;;;; +18A75;TANGUT COMPONENT-630;Lo;0;L;;;;;N;;;;; +18A76;TANGUT COMPONENT-631;Lo;0;L;;;;;N;;;;; +18A77;TANGUT COMPONENT-632;Lo;0;L;;;;;N;;;;; +18A78;TANGUT COMPONENT-633;Lo;0;L;;;;;N;;;;; +18A79;TANGUT COMPONENT-634;Lo;0;L;;;;;N;;;;; +18A7A;TANGUT COMPONENT-635;Lo;0;L;;;;;N;;;;; +18A7B;TANGUT COMPONENT-636;Lo;0;L;;;;;N;;;;; +18A7C;TANGUT COMPONENT-637;Lo;0;L;;;;;N;;;;; +18A7D;TANGUT COMPONENT-638;Lo;0;L;;;;;N;;;;; +18A7E;TANGUT COMPONENT-639;Lo;0;L;;;;;N;;;;; +18A7F;TANGUT COMPONENT-640;Lo;0;L;;;;;N;;;;; +18A80;TANGUT COMPONENT-641;Lo;0;L;;;;;N;;;;; +18A81;TANGUT COMPONENT-642;Lo;0;L;;;;;N;;;;; +18A82;TANGUT COMPONENT-643;Lo;0;L;;;;;N;;;;; +18A83;TANGUT COMPONENT-644;Lo;0;L;;;;;N;;;;; +18A84;TANGUT COMPONENT-645;Lo;0;L;;;;;N;;;;; +18A85;TANGUT COMPONENT-646;Lo;0;L;;;;;N;;;;; +18A86;TANGUT COMPONENT-647;Lo;0;L;;;;;N;;;;; +18A87;TANGUT COMPONENT-648;Lo;0;L;;;;;N;;;;; +18A88;TANGUT COMPONENT-649;Lo;0;L;;;;;N;;;;; +18A89;TANGUT COMPONENT-650;Lo;0;L;;;;;N;;;;; +18A8A;TANGUT COMPONENT-651;Lo;0;L;;;;;N;;;;; +18A8B;TANGUT COMPONENT-652;Lo;0;L;;;;;N;;;;; +18A8C;TANGUT COMPONENT-653;Lo;0;L;;;;;N;;;;; +18A8D;TANGUT COMPONENT-654;Lo;0;L;;;;;N;;;;; +18A8E;TANGUT COMPONENT-655;Lo;0;L;;;;;N;;;;; +18A8F;TANGUT COMPONENT-656;Lo;0;L;;;;;N;;;;; +18A90;TANGUT COMPONENT-657;Lo;0;L;;;;;N;;;;; +18A91;TANGUT COMPONENT-658;Lo;0;L;;;;;N;;;;; +18A92;TANGUT COMPONENT-659;Lo;0;L;;;;;N;;;;; +18A93;TANGUT COMPONENT-660;Lo;0;L;;;;;N;;;;; +18A94;TANGUT COMPONENT-661;Lo;0;L;;;;;N;;;;; +18A95;TANGUT COMPONENT-662;Lo;0;L;;;;;N;;;;; +18A96;TANGUT COMPONENT-663;Lo;0;L;;;;;N;;;;; +18A97;TANGUT COMPONENT-664;Lo;0;L;;;;;N;;;;; +18A98;TANGUT COMPONENT-665;Lo;0;L;;;;;N;;;;; +18A99;TANGUT COMPONENT-666;Lo;0;L;;;;;N;;;;; +18A9A;TANGUT COMPONENT-667;Lo;0;L;;;;;N;;;;; +18A9B;TANGUT COMPONENT-668;Lo;0;L;;;;;N;;;;; +18A9C;TANGUT COMPONENT-669;Lo;0;L;;;;;N;;;;; +18A9D;TANGUT COMPONENT-670;Lo;0;L;;;;;N;;;;; +18A9E;TANGUT COMPONENT-671;Lo;0;L;;;;;N;;;;; +18A9F;TANGUT COMPONENT-672;Lo;0;L;;;;;N;;;;; +18AA0;TANGUT COMPONENT-673;Lo;0;L;;;;;N;;;;; +18AA1;TANGUT COMPONENT-674;Lo;0;L;;;;;N;;;;; +18AA2;TANGUT COMPONENT-675;Lo;0;L;;;;;N;;;;; +18AA3;TANGUT COMPONENT-676;Lo;0;L;;;;;N;;;;; +18AA4;TANGUT COMPONENT-677;Lo;0;L;;;;;N;;;;; +18AA5;TANGUT COMPONENT-678;Lo;0;L;;;;;N;;;;; +18AA6;TANGUT COMPONENT-679;Lo;0;L;;;;;N;;;;; +18AA7;TANGUT COMPONENT-680;Lo;0;L;;;;;N;;;;; +18AA8;TANGUT COMPONENT-681;Lo;0;L;;;;;N;;;;; +18AA9;TANGUT COMPONENT-682;Lo;0;L;;;;;N;;;;; +18AAA;TANGUT COMPONENT-683;Lo;0;L;;;;;N;;;;; +18AAB;TANGUT COMPONENT-684;Lo;0;L;;;;;N;;;;; +18AAC;TANGUT COMPONENT-685;Lo;0;L;;;;;N;;;;; +18AAD;TANGUT COMPONENT-686;Lo;0;L;;;;;N;;;;; +18AAE;TANGUT COMPONENT-687;Lo;0;L;;;;;N;;;;; +18AAF;TANGUT COMPONENT-688;Lo;0;L;;;;;N;;;;; +18AB0;TANGUT COMPONENT-689;Lo;0;L;;;;;N;;;;; +18AB1;TANGUT COMPONENT-690;Lo;0;L;;;;;N;;;;; +18AB2;TANGUT COMPONENT-691;Lo;0;L;;;;;N;;;;; +18AB3;TANGUT COMPONENT-692;Lo;0;L;;;;;N;;;;; +18AB4;TANGUT COMPONENT-693;Lo;0;L;;;;;N;;;;; +18AB5;TANGUT COMPONENT-694;Lo;0;L;;;;;N;;;;; +18AB6;TANGUT COMPONENT-695;Lo;0;L;;;;;N;;;;; +18AB7;TANGUT COMPONENT-696;Lo;0;L;;;;;N;;;;; +18AB8;TANGUT COMPONENT-697;Lo;0;L;;;;;N;;;;; +18AB9;TANGUT COMPONENT-698;Lo;0;L;;;;;N;;;;; +18ABA;TANGUT COMPONENT-699;Lo;0;L;;;;;N;;;;; +18ABB;TANGUT COMPONENT-700;Lo;0;L;;;;;N;;;;; +18ABC;TANGUT COMPONENT-701;Lo;0;L;;;;;N;;;;; +18ABD;TANGUT COMPONENT-702;Lo;0;L;;;;;N;;;;; +18ABE;TANGUT COMPONENT-703;Lo;0;L;;;;;N;;;;; +18ABF;TANGUT COMPONENT-704;Lo;0;L;;;;;N;;;;; +18AC0;TANGUT COMPONENT-705;Lo;0;L;;;;;N;;;;; +18AC1;TANGUT COMPONENT-706;Lo;0;L;;;;;N;;;;; +18AC2;TANGUT COMPONENT-707;Lo;0;L;;;;;N;;;;; +18AC3;TANGUT COMPONENT-708;Lo;0;L;;;;;N;;;;; +18AC4;TANGUT COMPONENT-709;Lo;0;L;;;;;N;;;;; +18AC5;TANGUT COMPONENT-710;Lo;0;L;;;;;N;;;;; +18AC6;TANGUT COMPONENT-711;Lo;0;L;;;;;N;;;;; +18AC7;TANGUT COMPONENT-712;Lo;0;L;;;;;N;;;;; +18AC8;TANGUT COMPONENT-713;Lo;0;L;;;;;N;;;;; +18AC9;TANGUT COMPONENT-714;Lo;0;L;;;;;N;;;;; +18ACA;TANGUT COMPONENT-715;Lo;0;L;;;;;N;;;;; +18ACB;TANGUT COMPONENT-716;Lo;0;L;;;;;N;;;;; +18ACC;TANGUT COMPONENT-717;Lo;0;L;;;;;N;;;;; +18ACD;TANGUT COMPONENT-718;Lo;0;L;;;;;N;;;;; +18ACE;TANGUT COMPONENT-719;Lo;0;L;;;;;N;;;;; +18ACF;TANGUT COMPONENT-720;Lo;0;L;;;;;N;;;;; +18AD0;TANGUT COMPONENT-721;Lo;0;L;;;;;N;;;;; +18AD1;TANGUT COMPONENT-722;Lo;0;L;;;;;N;;;;; +18AD2;TANGUT COMPONENT-723;Lo;0;L;;;;;N;;;;; +18AD3;TANGUT COMPONENT-724;Lo;0;L;;;;;N;;;;; +18AD4;TANGUT COMPONENT-725;Lo;0;L;;;;;N;;;;; +18AD5;TANGUT COMPONENT-726;Lo;0;L;;;;;N;;;;; +18AD6;TANGUT COMPONENT-727;Lo;0;L;;;;;N;;;;; +18AD7;TANGUT COMPONENT-728;Lo;0;L;;;;;N;;;;; +18AD8;TANGUT COMPONENT-729;Lo;0;L;;;;;N;;;;; +18AD9;TANGUT COMPONENT-730;Lo;0;L;;;;;N;;;;; +18ADA;TANGUT COMPONENT-731;Lo;0;L;;;;;N;;;;; +18ADB;TANGUT COMPONENT-732;Lo;0;L;;;;;N;;;;; +18ADC;TANGUT COMPONENT-733;Lo;0;L;;;;;N;;;;; +18ADD;TANGUT COMPONENT-734;Lo;0;L;;;;;N;;;;; +18ADE;TANGUT COMPONENT-735;Lo;0;L;;;;;N;;;;; +18ADF;TANGUT COMPONENT-736;Lo;0;L;;;;;N;;;;; +18AE0;TANGUT COMPONENT-737;Lo;0;L;;;;;N;;;;; +18AE1;TANGUT COMPONENT-738;Lo;0;L;;;;;N;;;;; +18AE2;TANGUT COMPONENT-739;Lo;0;L;;;;;N;;;;; +18AE3;TANGUT COMPONENT-740;Lo;0;L;;;;;N;;;;; +18AE4;TANGUT COMPONENT-741;Lo;0;L;;;;;N;;;;; +18AE5;TANGUT COMPONENT-742;Lo;0;L;;;;;N;;;;; +18AE6;TANGUT COMPONENT-743;Lo;0;L;;;;;N;;;;; +18AE7;TANGUT COMPONENT-744;Lo;0;L;;;;;N;;;;; +18AE8;TANGUT COMPONENT-745;Lo;0;L;;;;;N;;;;; +18AE9;TANGUT COMPONENT-746;Lo;0;L;;;;;N;;;;; +18AEA;TANGUT COMPONENT-747;Lo;0;L;;;;;N;;;;; +18AEB;TANGUT COMPONENT-748;Lo;0;L;;;;;N;;;;; +18AEC;TANGUT COMPONENT-749;Lo;0;L;;;;;N;;;;; +18AED;TANGUT COMPONENT-750;Lo;0;L;;;;;N;;;;; +18AEE;TANGUT COMPONENT-751;Lo;0;L;;;;;N;;;;; +18AEF;TANGUT COMPONENT-752;Lo;0;L;;;;;N;;;;; +18AF0;TANGUT COMPONENT-753;Lo;0;L;;;;;N;;;;; +18AF1;TANGUT COMPONENT-754;Lo;0;L;;;;;N;;;;; +18AF2;TANGUT COMPONENT-755;Lo;0;L;;;;;N;;;;; +1B000;KATAKANA LETTER ARCHAIC E;Lo;0;L;;;;;N;;;;; +1B001;HIRAGANA LETTER ARCHAIC YE;Lo;0;L;;;;;N;;;;; +1B002;HENTAIGANA LETTER A-1;Lo;0;L;;;;;N;;;;; +1B003;HENTAIGANA LETTER A-2;Lo;0;L;;;;;N;;;;; +1B004;HENTAIGANA LETTER A-3;Lo;0;L;;;;;N;;;;; +1B005;HENTAIGANA LETTER A-WO;Lo;0;L;;;;;N;;;;; +1B006;HENTAIGANA LETTER I-1;Lo;0;L;;;;;N;;;;; +1B007;HENTAIGANA LETTER I-2;Lo;0;L;;;;;N;;;;; +1B008;HENTAIGANA LETTER I-3;Lo;0;L;;;;;N;;;;; +1B009;HENTAIGANA LETTER I-4;Lo;0;L;;;;;N;;;;; +1B00A;HENTAIGANA LETTER U-1;Lo;0;L;;;;;N;;;;; +1B00B;HENTAIGANA LETTER U-2;Lo;0;L;;;;;N;;;;; +1B00C;HENTAIGANA LETTER U-3;Lo;0;L;;;;;N;;;;; +1B00D;HENTAIGANA LETTER U-4;Lo;0;L;;;;;N;;;;; +1B00E;HENTAIGANA LETTER U-5;Lo;0;L;;;;;N;;;;; +1B00F;HENTAIGANA LETTER E-2;Lo;0;L;;;;;N;;;;; +1B010;HENTAIGANA LETTER E-3;Lo;0;L;;;;;N;;;;; +1B011;HENTAIGANA LETTER E-4;Lo;0;L;;;;;N;;;;; +1B012;HENTAIGANA LETTER E-5;Lo;0;L;;;;;N;;;;; +1B013;HENTAIGANA LETTER E-6;Lo;0;L;;;;;N;;;;; +1B014;HENTAIGANA LETTER O-1;Lo;0;L;;;;;N;;;;; +1B015;HENTAIGANA LETTER O-2;Lo;0;L;;;;;N;;;;; +1B016;HENTAIGANA LETTER O-3;Lo;0;L;;;;;N;;;;; +1B017;HENTAIGANA LETTER KA-1;Lo;0;L;;;;;N;;;;; +1B018;HENTAIGANA LETTER KA-2;Lo;0;L;;;;;N;;;;; +1B019;HENTAIGANA LETTER KA-3;Lo;0;L;;;;;N;;;;; +1B01A;HENTAIGANA LETTER KA-4;Lo;0;L;;;;;N;;;;; +1B01B;HENTAIGANA LETTER KA-5;Lo;0;L;;;;;N;;;;; +1B01C;HENTAIGANA LETTER KA-6;Lo;0;L;;;;;N;;;;; +1B01D;HENTAIGANA LETTER KA-7;Lo;0;L;;;;;N;;;;; +1B01E;HENTAIGANA LETTER KA-8;Lo;0;L;;;;;N;;;;; +1B01F;HENTAIGANA LETTER KA-9;Lo;0;L;;;;;N;;;;; +1B020;HENTAIGANA LETTER KA-10;Lo;0;L;;;;;N;;;;; +1B021;HENTAIGANA LETTER KA-11;Lo;0;L;;;;;N;;;;; +1B022;HENTAIGANA LETTER KA-KE;Lo;0;L;;;;;N;;;;; +1B023;HENTAIGANA LETTER KI-1;Lo;0;L;;;;;N;;;;; +1B024;HENTAIGANA LETTER KI-2;Lo;0;L;;;;;N;;;;; +1B025;HENTAIGANA LETTER KI-3;Lo;0;L;;;;;N;;;;; +1B026;HENTAIGANA LETTER KI-4;Lo;0;L;;;;;N;;;;; +1B027;HENTAIGANA LETTER KI-5;Lo;0;L;;;;;N;;;;; +1B028;HENTAIGANA LETTER KI-6;Lo;0;L;;;;;N;;;;; +1B029;HENTAIGANA LETTER KI-7;Lo;0;L;;;;;N;;;;; +1B02A;HENTAIGANA LETTER KI-8;Lo;0;L;;;;;N;;;;; +1B02B;HENTAIGANA LETTER KU-1;Lo;0;L;;;;;N;;;;; +1B02C;HENTAIGANA LETTER KU-2;Lo;0;L;;;;;N;;;;; +1B02D;HENTAIGANA LETTER KU-3;Lo;0;L;;;;;N;;;;; +1B02E;HENTAIGANA LETTER KU-4;Lo;0;L;;;;;N;;;;; +1B02F;HENTAIGANA LETTER KU-5;Lo;0;L;;;;;N;;;;; +1B030;HENTAIGANA LETTER KU-6;Lo;0;L;;;;;N;;;;; +1B031;HENTAIGANA LETTER KU-7;Lo;0;L;;;;;N;;;;; +1B032;HENTAIGANA LETTER KE-1;Lo;0;L;;;;;N;;;;; +1B033;HENTAIGANA LETTER KE-2;Lo;0;L;;;;;N;;;;; +1B034;HENTAIGANA LETTER KE-3;Lo;0;L;;;;;N;;;;; +1B035;HENTAIGANA LETTER KE-4;Lo;0;L;;;;;N;;;;; +1B036;HENTAIGANA LETTER KE-5;Lo;0;L;;;;;N;;;;; +1B037;HENTAIGANA LETTER KE-6;Lo;0;L;;;;;N;;;;; +1B038;HENTAIGANA LETTER KO-1;Lo;0;L;;;;;N;;;;; +1B039;HENTAIGANA LETTER KO-2;Lo;0;L;;;;;N;;;;; +1B03A;HENTAIGANA LETTER KO-3;Lo;0;L;;;;;N;;;;; +1B03B;HENTAIGANA LETTER KO-KI;Lo;0;L;;;;;N;;;;; +1B03C;HENTAIGANA LETTER SA-1;Lo;0;L;;;;;N;;;;; +1B03D;HENTAIGANA LETTER SA-2;Lo;0;L;;;;;N;;;;; +1B03E;HENTAIGANA LETTER SA-3;Lo;0;L;;;;;N;;;;; +1B03F;HENTAIGANA LETTER SA-4;Lo;0;L;;;;;N;;;;; +1B040;HENTAIGANA LETTER SA-5;Lo;0;L;;;;;N;;;;; +1B041;HENTAIGANA LETTER SA-6;Lo;0;L;;;;;N;;;;; +1B042;HENTAIGANA LETTER SA-7;Lo;0;L;;;;;N;;;;; +1B043;HENTAIGANA LETTER SA-8;Lo;0;L;;;;;N;;;;; +1B044;HENTAIGANA LETTER SI-1;Lo;0;L;;;;;N;;;;; +1B045;HENTAIGANA LETTER SI-2;Lo;0;L;;;;;N;;;;; +1B046;HENTAIGANA LETTER SI-3;Lo;0;L;;;;;N;;;;; +1B047;HENTAIGANA LETTER SI-4;Lo;0;L;;;;;N;;;;; +1B048;HENTAIGANA LETTER SI-5;Lo;0;L;;;;;N;;;;; +1B049;HENTAIGANA LETTER SI-6;Lo;0;L;;;;;N;;;;; +1B04A;HENTAIGANA LETTER SU-1;Lo;0;L;;;;;N;;;;; +1B04B;HENTAIGANA LETTER SU-2;Lo;0;L;;;;;N;;;;; +1B04C;HENTAIGANA LETTER SU-3;Lo;0;L;;;;;N;;;;; +1B04D;HENTAIGANA LETTER SU-4;Lo;0;L;;;;;N;;;;; +1B04E;HENTAIGANA LETTER SU-5;Lo;0;L;;;;;N;;;;; +1B04F;HENTAIGANA LETTER SU-6;Lo;0;L;;;;;N;;;;; +1B050;HENTAIGANA LETTER SU-7;Lo;0;L;;;;;N;;;;; +1B051;HENTAIGANA LETTER SU-8;Lo;0;L;;;;;N;;;;; +1B052;HENTAIGANA LETTER SE-1;Lo;0;L;;;;;N;;;;; +1B053;HENTAIGANA LETTER SE-2;Lo;0;L;;;;;N;;;;; +1B054;HENTAIGANA LETTER SE-3;Lo;0;L;;;;;N;;;;; +1B055;HENTAIGANA LETTER SE-4;Lo;0;L;;;;;N;;;;; +1B056;HENTAIGANA LETTER SE-5;Lo;0;L;;;;;N;;;;; +1B057;HENTAIGANA LETTER SO-1;Lo;0;L;;;;;N;;;;; +1B058;HENTAIGANA LETTER SO-2;Lo;0;L;;;;;N;;;;; +1B059;HENTAIGANA LETTER SO-3;Lo;0;L;;;;;N;;;;; +1B05A;HENTAIGANA LETTER SO-4;Lo;0;L;;;;;N;;;;; +1B05B;HENTAIGANA LETTER SO-5;Lo;0;L;;;;;N;;;;; +1B05C;HENTAIGANA LETTER SO-6;Lo;0;L;;;;;N;;;;; +1B05D;HENTAIGANA LETTER SO-7;Lo;0;L;;;;;N;;;;; +1B05E;HENTAIGANA LETTER TA-1;Lo;0;L;;;;;N;;;;; +1B05F;HENTAIGANA LETTER TA-2;Lo;0;L;;;;;N;;;;; +1B060;HENTAIGANA LETTER TA-3;Lo;0;L;;;;;N;;;;; +1B061;HENTAIGANA LETTER TA-4;Lo;0;L;;;;;N;;;;; +1B062;HENTAIGANA LETTER TI-1;Lo;0;L;;;;;N;;;;; +1B063;HENTAIGANA LETTER TI-2;Lo;0;L;;;;;N;;;;; +1B064;HENTAIGANA LETTER TI-3;Lo;0;L;;;;;N;;;;; +1B065;HENTAIGANA LETTER TI-4;Lo;0;L;;;;;N;;;;; +1B066;HENTAIGANA LETTER TI-5;Lo;0;L;;;;;N;;;;; +1B067;HENTAIGANA LETTER TI-6;Lo;0;L;;;;;N;;;;; +1B068;HENTAIGANA LETTER TI-7;Lo;0;L;;;;;N;;;;; +1B069;HENTAIGANA LETTER TU-1;Lo;0;L;;;;;N;;;;; +1B06A;HENTAIGANA LETTER TU-2;Lo;0;L;;;;;N;;;;; +1B06B;HENTAIGANA LETTER TU-3;Lo;0;L;;;;;N;;;;; +1B06C;HENTAIGANA LETTER TU-4;Lo;0;L;;;;;N;;;;; +1B06D;HENTAIGANA LETTER TU-TO;Lo;0;L;;;;;N;;;;; +1B06E;HENTAIGANA LETTER TE-1;Lo;0;L;;;;;N;;;;; +1B06F;HENTAIGANA LETTER TE-2;Lo;0;L;;;;;N;;;;; +1B070;HENTAIGANA LETTER TE-3;Lo;0;L;;;;;N;;;;; +1B071;HENTAIGANA LETTER TE-4;Lo;0;L;;;;;N;;;;; +1B072;HENTAIGANA LETTER TE-5;Lo;0;L;;;;;N;;;;; +1B073;HENTAIGANA LETTER TE-6;Lo;0;L;;;;;N;;;;; +1B074;HENTAIGANA LETTER TE-7;Lo;0;L;;;;;N;;;;; +1B075;HENTAIGANA LETTER TE-8;Lo;0;L;;;;;N;;;;; +1B076;HENTAIGANA LETTER TE-9;Lo;0;L;;;;;N;;;;; +1B077;HENTAIGANA LETTER TO-1;Lo;0;L;;;;;N;;;;; +1B078;HENTAIGANA LETTER TO-2;Lo;0;L;;;;;N;;;;; +1B079;HENTAIGANA LETTER TO-3;Lo;0;L;;;;;N;;;;; +1B07A;HENTAIGANA LETTER TO-4;Lo;0;L;;;;;N;;;;; +1B07B;HENTAIGANA LETTER TO-5;Lo;0;L;;;;;N;;;;; +1B07C;HENTAIGANA LETTER TO-6;Lo;0;L;;;;;N;;;;; +1B07D;HENTAIGANA LETTER TO-RA;Lo;0;L;;;;;N;;;;; +1B07E;HENTAIGANA LETTER NA-1;Lo;0;L;;;;;N;;;;; +1B07F;HENTAIGANA LETTER NA-2;Lo;0;L;;;;;N;;;;; +1B080;HENTAIGANA LETTER NA-3;Lo;0;L;;;;;N;;;;; +1B081;HENTAIGANA LETTER NA-4;Lo;0;L;;;;;N;;;;; +1B082;HENTAIGANA LETTER NA-5;Lo;0;L;;;;;N;;;;; +1B083;HENTAIGANA LETTER NA-6;Lo;0;L;;;;;N;;;;; +1B084;HENTAIGANA LETTER NA-7;Lo;0;L;;;;;N;;;;; +1B085;HENTAIGANA LETTER NA-8;Lo;0;L;;;;;N;;;;; +1B086;HENTAIGANA LETTER NA-9;Lo;0;L;;;;;N;;;;; +1B087;HENTAIGANA LETTER NI-1;Lo;0;L;;;;;N;;;;; +1B088;HENTAIGANA LETTER NI-2;Lo;0;L;;;;;N;;;;; +1B089;HENTAIGANA LETTER NI-3;Lo;0;L;;;;;N;;;;; +1B08A;HENTAIGANA LETTER NI-4;Lo;0;L;;;;;N;;;;; +1B08B;HENTAIGANA LETTER NI-5;Lo;0;L;;;;;N;;;;; +1B08C;HENTAIGANA LETTER NI-6;Lo;0;L;;;;;N;;;;; +1B08D;HENTAIGANA LETTER NI-7;Lo;0;L;;;;;N;;;;; +1B08E;HENTAIGANA LETTER NI-TE;Lo;0;L;;;;;N;;;;; +1B08F;HENTAIGANA LETTER NU-1;Lo;0;L;;;;;N;;;;; +1B090;HENTAIGANA LETTER NU-2;Lo;0;L;;;;;N;;;;; +1B091;HENTAIGANA LETTER NU-3;Lo;0;L;;;;;N;;;;; +1B092;HENTAIGANA LETTER NE-1;Lo;0;L;;;;;N;;;;; +1B093;HENTAIGANA LETTER NE-2;Lo;0;L;;;;;N;;;;; +1B094;HENTAIGANA LETTER NE-3;Lo;0;L;;;;;N;;;;; +1B095;HENTAIGANA LETTER NE-4;Lo;0;L;;;;;N;;;;; +1B096;HENTAIGANA LETTER NE-5;Lo;0;L;;;;;N;;;;; +1B097;HENTAIGANA LETTER NE-6;Lo;0;L;;;;;N;;;;; +1B098;HENTAIGANA LETTER NE-KO;Lo;0;L;;;;;N;;;;; +1B099;HENTAIGANA LETTER NO-1;Lo;0;L;;;;;N;;;;; +1B09A;HENTAIGANA LETTER NO-2;Lo;0;L;;;;;N;;;;; +1B09B;HENTAIGANA LETTER NO-3;Lo;0;L;;;;;N;;;;; +1B09C;HENTAIGANA LETTER NO-4;Lo;0;L;;;;;N;;;;; +1B09D;HENTAIGANA LETTER NO-5;Lo;0;L;;;;;N;;;;; +1B09E;HENTAIGANA LETTER HA-1;Lo;0;L;;;;;N;;;;; +1B09F;HENTAIGANA LETTER HA-2;Lo;0;L;;;;;N;;;;; +1B0A0;HENTAIGANA LETTER HA-3;Lo;0;L;;;;;N;;;;; +1B0A1;HENTAIGANA LETTER HA-4;Lo;0;L;;;;;N;;;;; +1B0A2;HENTAIGANA LETTER HA-5;Lo;0;L;;;;;N;;;;; +1B0A3;HENTAIGANA LETTER HA-6;Lo;0;L;;;;;N;;;;; +1B0A4;HENTAIGANA LETTER HA-7;Lo;0;L;;;;;N;;;;; +1B0A5;HENTAIGANA LETTER HA-8;Lo;0;L;;;;;N;;;;; +1B0A6;HENTAIGANA LETTER HA-9;Lo;0;L;;;;;N;;;;; +1B0A7;HENTAIGANA LETTER HA-10;Lo;0;L;;;;;N;;;;; +1B0A8;HENTAIGANA LETTER HA-11;Lo;0;L;;;;;N;;;;; +1B0A9;HENTAIGANA LETTER HI-1;Lo;0;L;;;;;N;;;;; +1B0AA;HENTAIGANA LETTER HI-2;Lo;0;L;;;;;N;;;;; +1B0AB;HENTAIGANA LETTER HI-3;Lo;0;L;;;;;N;;;;; +1B0AC;HENTAIGANA LETTER HI-4;Lo;0;L;;;;;N;;;;; +1B0AD;HENTAIGANA LETTER HI-5;Lo;0;L;;;;;N;;;;; +1B0AE;HENTAIGANA LETTER HI-6;Lo;0;L;;;;;N;;;;; +1B0AF;HENTAIGANA LETTER HI-7;Lo;0;L;;;;;N;;;;; +1B0B0;HENTAIGANA LETTER HU-1;Lo;0;L;;;;;N;;;;; +1B0B1;HENTAIGANA LETTER HU-2;Lo;0;L;;;;;N;;;;; +1B0B2;HENTAIGANA LETTER HU-3;Lo;0;L;;;;;N;;;;; +1B0B3;HENTAIGANA LETTER HE-1;Lo;0;L;;;;;N;;;;; +1B0B4;HENTAIGANA LETTER HE-2;Lo;0;L;;;;;N;;;;; +1B0B5;HENTAIGANA LETTER HE-3;Lo;0;L;;;;;N;;;;; +1B0B6;HENTAIGANA LETTER HE-4;Lo;0;L;;;;;N;;;;; +1B0B7;HENTAIGANA LETTER HE-5;Lo;0;L;;;;;N;;;;; +1B0B8;HENTAIGANA LETTER HE-6;Lo;0;L;;;;;N;;;;; +1B0B9;HENTAIGANA LETTER HE-7;Lo;0;L;;;;;N;;;;; +1B0BA;HENTAIGANA LETTER HO-1;Lo;0;L;;;;;N;;;;; +1B0BB;HENTAIGANA LETTER HO-2;Lo;0;L;;;;;N;;;;; +1B0BC;HENTAIGANA LETTER HO-3;Lo;0;L;;;;;N;;;;; +1B0BD;HENTAIGANA LETTER HO-4;Lo;0;L;;;;;N;;;;; +1B0BE;HENTAIGANA LETTER HO-5;Lo;0;L;;;;;N;;;;; +1B0BF;HENTAIGANA LETTER HO-6;Lo;0;L;;;;;N;;;;; +1B0C0;HENTAIGANA LETTER HO-7;Lo;0;L;;;;;N;;;;; +1B0C1;HENTAIGANA LETTER HO-8;Lo;0;L;;;;;N;;;;; +1B0C2;HENTAIGANA LETTER MA-1;Lo;0;L;;;;;N;;;;; +1B0C3;HENTAIGANA LETTER MA-2;Lo;0;L;;;;;N;;;;; +1B0C4;HENTAIGANA LETTER MA-3;Lo;0;L;;;;;N;;;;; +1B0C5;HENTAIGANA LETTER MA-4;Lo;0;L;;;;;N;;;;; +1B0C6;HENTAIGANA LETTER MA-5;Lo;0;L;;;;;N;;;;; +1B0C7;HENTAIGANA LETTER MA-6;Lo;0;L;;;;;N;;;;; +1B0C8;HENTAIGANA LETTER MA-7;Lo;0;L;;;;;N;;;;; +1B0C9;HENTAIGANA LETTER MI-1;Lo;0;L;;;;;N;;;;; +1B0CA;HENTAIGANA LETTER MI-2;Lo;0;L;;;;;N;;;;; +1B0CB;HENTAIGANA LETTER MI-3;Lo;0;L;;;;;N;;;;; +1B0CC;HENTAIGANA LETTER MI-4;Lo;0;L;;;;;N;;;;; +1B0CD;HENTAIGANA LETTER MI-5;Lo;0;L;;;;;N;;;;; +1B0CE;HENTAIGANA LETTER MI-6;Lo;0;L;;;;;N;;;;; +1B0CF;HENTAIGANA LETTER MI-7;Lo;0;L;;;;;N;;;;; +1B0D0;HENTAIGANA LETTER MU-1;Lo;0;L;;;;;N;;;;; +1B0D1;HENTAIGANA LETTER MU-2;Lo;0;L;;;;;N;;;;; +1B0D2;HENTAIGANA LETTER MU-3;Lo;0;L;;;;;N;;;;; +1B0D3;HENTAIGANA LETTER MU-4;Lo;0;L;;;;;N;;;;; +1B0D4;HENTAIGANA LETTER ME-1;Lo;0;L;;;;;N;;;;; +1B0D5;HENTAIGANA LETTER ME-2;Lo;0;L;;;;;N;;;;; +1B0D6;HENTAIGANA LETTER ME-MA;Lo;0;L;;;;;N;;;;; +1B0D7;HENTAIGANA LETTER MO-1;Lo;0;L;;;;;N;;;;; +1B0D8;HENTAIGANA LETTER MO-2;Lo;0;L;;;;;N;;;;; +1B0D9;HENTAIGANA LETTER MO-3;Lo;0;L;;;;;N;;;;; +1B0DA;HENTAIGANA LETTER MO-4;Lo;0;L;;;;;N;;;;; +1B0DB;HENTAIGANA LETTER MO-5;Lo;0;L;;;;;N;;;;; +1B0DC;HENTAIGANA LETTER MO-6;Lo;0;L;;;;;N;;;;; +1B0DD;HENTAIGANA LETTER YA-1;Lo;0;L;;;;;N;;;;; +1B0DE;HENTAIGANA LETTER YA-2;Lo;0;L;;;;;N;;;;; +1B0DF;HENTAIGANA LETTER YA-3;Lo;0;L;;;;;N;;;;; +1B0E0;HENTAIGANA LETTER YA-4;Lo;0;L;;;;;N;;;;; +1B0E1;HENTAIGANA LETTER YA-5;Lo;0;L;;;;;N;;;;; +1B0E2;HENTAIGANA LETTER YA-YO;Lo;0;L;;;;;N;;;;; +1B0E3;HENTAIGANA LETTER YU-1;Lo;0;L;;;;;N;;;;; +1B0E4;HENTAIGANA LETTER YU-2;Lo;0;L;;;;;N;;;;; +1B0E5;HENTAIGANA LETTER YU-3;Lo;0;L;;;;;N;;;;; +1B0E6;HENTAIGANA LETTER YU-4;Lo;0;L;;;;;N;;;;; +1B0E7;HENTAIGANA LETTER YO-1;Lo;0;L;;;;;N;;;;; +1B0E8;HENTAIGANA LETTER YO-2;Lo;0;L;;;;;N;;;;; +1B0E9;HENTAIGANA LETTER YO-3;Lo;0;L;;;;;N;;;;; +1B0EA;HENTAIGANA LETTER YO-4;Lo;0;L;;;;;N;;;;; +1B0EB;HENTAIGANA LETTER YO-5;Lo;0;L;;;;;N;;;;; +1B0EC;HENTAIGANA LETTER YO-6;Lo;0;L;;;;;N;;;;; +1B0ED;HENTAIGANA LETTER RA-1;Lo;0;L;;;;;N;;;;; +1B0EE;HENTAIGANA LETTER RA-2;Lo;0;L;;;;;N;;;;; +1B0EF;HENTAIGANA LETTER RA-3;Lo;0;L;;;;;N;;;;; +1B0F0;HENTAIGANA LETTER RA-4;Lo;0;L;;;;;N;;;;; +1B0F1;HENTAIGANA LETTER RI-1;Lo;0;L;;;;;N;;;;; +1B0F2;HENTAIGANA LETTER RI-2;Lo;0;L;;;;;N;;;;; +1B0F3;HENTAIGANA LETTER RI-3;Lo;0;L;;;;;N;;;;; +1B0F4;HENTAIGANA LETTER RI-4;Lo;0;L;;;;;N;;;;; +1B0F5;HENTAIGANA LETTER RI-5;Lo;0;L;;;;;N;;;;; +1B0F6;HENTAIGANA LETTER RI-6;Lo;0;L;;;;;N;;;;; +1B0F7;HENTAIGANA LETTER RI-7;Lo;0;L;;;;;N;;;;; +1B0F8;HENTAIGANA LETTER RU-1;Lo;0;L;;;;;N;;;;; +1B0F9;HENTAIGANA LETTER RU-2;Lo;0;L;;;;;N;;;;; +1B0FA;HENTAIGANA LETTER RU-3;Lo;0;L;;;;;N;;;;; +1B0FB;HENTAIGANA LETTER RU-4;Lo;0;L;;;;;N;;;;; +1B0FC;HENTAIGANA LETTER RU-5;Lo;0;L;;;;;N;;;;; +1B0FD;HENTAIGANA LETTER RU-6;Lo;0;L;;;;;N;;;;; +1B0FE;HENTAIGANA LETTER RE-1;Lo;0;L;;;;;N;;;;; +1B0FF;HENTAIGANA LETTER RE-2;Lo;0;L;;;;;N;;;;; +1B100;HENTAIGANA LETTER RE-3;Lo;0;L;;;;;N;;;;; +1B101;HENTAIGANA LETTER RE-4;Lo;0;L;;;;;N;;;;; +1B102;HENTAIGANA LETTER RO-1;Lo;0;L;;;;;N;;;;; +1B103;HENTAIGANA LETTER RO-2;Lo;0;L;;;;;N;;;;; +1B104;HENTAIGANA LETTER RO-3;Lo;0;L;;;;;N;;;;; +1B105;HENTAIGANA LETTER RO-4;Lo;0;L;;;;;N;;;;; +1B106;HENTAIGANA LETTER RO-5;Lo;0;L;;;;;N;;;;; +1B107;HENTAIGANA LETTER RO-6;Lo;0;L;;;;;N;;;;; +1B108;HENTAIGANA LETTER WA-1;Lo;0;L;;;;;N;;;;; +1B109;HENTAIGANA LETTER WA-2;Lo;0;L;;;;;N;;;;; +1B10A;HENTAIGANA LETTER WA-3;Lo;0;L;;;;;N;;;;; +1B10B;HENTAIGANA LETTER WA-4;Lo;0;L;;;;;N;;;;; +1B10C;HENTAIGANA LETTER WA-5;Lo;0;L;;;;;N;;;;; +1B10D;HENTAIGANA LETTER WI-1;Lo;0;L;;;;;N;;;;; +1B10E;HENTAIGANA LETTER WI-2;Lo;0;L;;;;;N;;;;; +1B10F;HENTAIGANA LETTER WI-3;Lo;0;L;;;;;N;;;;; +1B110;HENTAIGANA LETTER WI-4;Lo;0;L;;;;;N;;;;; +1B111;HENTAIGANA LETTER WI-5;Lo;0;L;;;;;N;;;;; +1B112;HENTAIGANA LETTER WE-1;Lo;0;L;;;;;N;;;;; +1B113;HENTAIGANA LETTER WE-2;Lo;0;L;;;;;N;;;;; +1B114;HENTAIGANA LETTER WE-3;Lo;0;L;;;;;N;;;;; +1B115;HENTAIGANA LETTER WE-4;Lo;0;L;;;;;N;;;;; +1B116;HENTAIGANA LETTER WO-1;Lo;0;L;;;;;N;;;;; +1B117;HENTAIGANA LETTER WO-2;Lo;0;L;;;;;N;;;;; +1B118;HENTAIGANA LETTER WO-3;Lo;0;L;;;;;N;;;;; +1B119;HENTAIGANA LETTER WO-4;Lo;0;L;;;;;N;;;;; +1B11A;HENTAIGANA LETTER WO-5;Lo;0;L;;;;;N;;;;; +1B11B;HENTAIGANA LETTER WO-6;Lo;0;L;;;;;N;;;;; +1B11C;HENTAIGANA LETTER WO-7;Lo;0;L;;;;;N;;;;; +1B11D;HENTAIGANA LETTER N-MU-MO-1;Lo;0;L;;;;;N;;;;; +1B11E;HENTAIGANA LETTER N-MU-MO-2;Lo;0;L;;;;;N;;;;; +1B150;HIRAGANA LETTER SMALL WI;Lo;0;L;;;;;N;;;;; +1B151;HIRAGANA LETTER SMALL WE;Lo;0;L;;;;;N;;;;; +1B152;HIRAGANA LETTER SMALL WO;Lo;0;L;;;;;N;;;;; +1B164;KATAKANA LETTER SMALL WI;Lo;0;L;;;;;N;;;;; +1B165;KATAKANA LETTER SMALL WE;Lo;0;L;;;;;N;;;;; +1B166;KATAKANA LETTER SMALL WO;Lo;0;L;;;;;N;;;;; +1B167;KATAKANA LETTER SMALL N;Lo;0;L;;;;;N;;;;; +1B170;NUSHU CHARACTER-1B170;Lo;0;L;;;;;N;;;;; +1B171;NUSHU CHARACTER-1B171;Lo;0;L;;;;;N;;;;; +1B172;NUSHU CHARACTER-1B172;Lo;0;L;;;;;N;;;;; +1B173;NUSHU CHARACTER-1B173;Lo;0;L;;;;;N;;;;; +1B174;NUSHU CHARACTER-1B174;Lo;0;L;;;;;N;;;;; +1B175;NUSHU CHARACTER-1B175;Lo;0;L;;;;;N;;;;; +1B176;NUSHU CHARACTER-1B176;Lo;0;L;;;;;N;;;;; +1B177;NUSHU CHARACTER-1B177;Lo;0;L;;;;;N;;;;; +1B178;NUSHU CHARACTER-1B178;Lo;0;L;;;;;N;;;;; +1B179;NUSHU CHARACTER-1B179;Lo;0;L;;;;;N;;;;; +1B17A;NUSHU CHARACTER-1B17A;Lo;0;L;;;;;N;;;;; +1B17B;NUSHU CHARACTER-1B17B;Lo;0;L;;;;;N;;;;; +1B17C;NUSHU CHARACTER-1B17C;Lo;0;L;;;;;N;;;;; +1B17D;NUSHU CHARACTER-1B17D;Lo;0;L;;;;;N;;;;; +1B17E;NUSHU CHARACTER-1B17E;Lo;0;L;;;;;N;;;;; +1B17F;NUSHU CHARACTER-1B17F;Lo;0;L;;;;;N;;;;; +1B180;NUSHU CHARACTER-1B180;Lo;0;L;;;;;N;;;;; +1B181;NUSHU CHARACTER-1B181;Lo;0;L;;;;;N;;;;; +1B182;NUSHU CHARACTER-1B182;Lo;0;L;;;;;N;;;;; +1B183;NUSHU CHARACTER-1B183;Lo;0;L;;;;;N;;;;; +1B184;NUSHU CHARACTER-1B184;Lo;0;L;;;;;N;;;;; +1B185;NUSHU CHARACTER-1B185;Lo;0;L;;;;;N;;;;; +1B186;NUSHU CHARACTER-1B186;Lo;0;L;;;;;N;;;;; +1B187;NUSHU CHARACTER-1B187;Lo;0;L;;;;;N;;;;; +1B188;NUSHU CHARACTER-1B188;Lo;0;L;;;;;N;;;;; +1B189;NUSHU CHARACTER-1B189;Lo;0;L;;;;;N;;;;; +1B18A;NUSHU CHARACTER-1B18A;Lo;0;L;;;;;N;;;;; +1B18B;NUSHU CHARACTER-1B18B;Lo;0;L;;;;;N;;;;; +1B18C;NUSHU CHARACTER-1B18C;Lo;0;L;;;;;N;;;;; +1B18D;NUSHU CHARACTER-1B18D;Lo;0;L;;;;;N;;;;; +1B18E;NUSHU CHARACTER-1B18E;Lo;0;L;;;;;N;;;;; +1B18F;NUSHU CHARACTER-1B18F;Lo;0;L;;;;;N;;;;; +1B190;NUSHU CHARACTER-1B190;Lo;0;L;;;;;N;;;;; +1B191;NUSHU CHARACTER-1B191;Lo;0;L;;;;;N;;;;; +1B192;NUSHU CHARACTER-1B192;Lo;0;L;;;;;N;;;;; +1B193;NUSHU CHARACTER-1B193;Lo;0;L;;;;;N;;;;; +1B194;NUSHU CHARACTER-1B194;Lo;0;L;;;;;N;;;;; +1B195;NUSHU CHARACTER-1B195;Lo;0;L;;;;;N;;;;; +1B196;NUSHU CHARACTER-1B196;Lo;0;L;;;;;N;;;;; +1B197;NUSHU CHARACTER-1B197;Lo;0;L;;;;;N;;;;; +1B198;NUSHU CHARACTER-1B198;Lo;0;L;;;;;N;;;;; +1B199;NUSHU CHARACTER-1B199;Lo;0;L;;;;;N;;;;; +1B19A;NUSHU CHARACTER-1B19A;Lo;0;L;;;;;N;;;;; +1B19B;NUSHU CHARACTER-1B19B;Lo;0;L;;;;;N;;;;; +1B19C;NUSHU CHARACTER-1B19C;Lo;0;L;;;;;N;;;;; +1B19D;NUSHU CHARACTER-1B19D;Lo;0;L;;;;;N;;;;; +1B19E;NUSHU CHARACTER-1B19E;Lo;0;L;;;;;N;;;;; +1B19F;NUSHU CHARACTER-1B19F;Lo;0;L;;;;;N;;;;; +1B1A0;NUSHU CHARACTER-1B1A0;Lo;0;L;;;;;N;;;;; +1B1A1;NUSHU CHARACTER-1B1A1;Lo;0;L;;;;;N;;;;; +1B1A2;NUSHU CHARACTER-1B1A2;Lo;0;L;;;;;N;;;;; +1B1A3;NUSHU CHARACTER-1B1A3;Lo;0;L;;;;;N;;;;; +1B1A4;NUSHU CHARACTER-1B1A4;Lo;0;L;;;;;N;;;;; +1B1A5;NUSHU CHARACTER-1B1A5;Lo;0;L;;;;;N;;;;; +1B1A6;NUSHU CHARACTER-1B1A6;Lo;0;L;;;;;N;;;;; +1B1A7;NUSHU CHARACTER-1B1A7;Lo;0;L;;;;;N;;;;; +1B1A8;NUSHU CHARACTER-1B1A8;Lo;0;L;;;;;N;;;;; +1B1A9;NUSHU CHARACTER-1B1A9;Lo;0;L;;;;;N;;;;; +1B1AA;NUSHU CHARACTER-1B1AA;Lo;0;L;;;;;N;;;;; +1B1AB;NUSHU CHARACTER-1B1AB;Lo;0;L;;;;;N;;;;; +1B1AC;NUSHU CHARACTER-1B1AC;Lo;0;L;;;;;N;;;;; +1B1AD;NUSHU CHARACTER-1B1AD;Lo;0;L;;;;;N;;;;; +1B1AE;NUSHU CHARACTER-1B1AE;Lo;0;L;;;;;N;;;;; +1B1AF;NUSHU CHARACTER-1B1AF;Lo;0;L;;;;;N;;;;; +1B1B0;NUSHU CHARACTER-1B1B0;Lo;0;L;;;;;N;;;;; +1B1B1;NUSHU CHARACTER-1B1B1;Lo;0;L;;;;;N;;;;; +1B1B2;NUSHU CHARACTER-1B1B2;Lo;0;L;;;;;N;;;;; +1B1B3;NUSHU CHARACTER-1B1B3;Lo;0;L;;;;;N;;;;; +1B1B4;NUSHU CHARACTER-1B1B4;Lo;0;L;;;;;N;;;;; +1B1B5;NUSHU CHARACTER-1B1B5;Lo;0;L;;;;;N;;;;; +1B1B6;NUSHU CHARACTER-1B1B6;Lo;0;L;;;;;N;;;;; +1B1B7;NUSHU CHARACTER-1B1B7;Lo;0;L;;;;;N;;;;; +1B1B8;NUSHU CHARACTER-1B1B8;Lo;0;L;;;;;N;;;;; +1B1B9;NUSHU CHARACTER-1B1B9;Lo;0;L;;;;;N;;;;; +1B1BA;NUSHU CHARACTER-1B1BA;Lo;0;L;;;;;N;;;;; +1B1BB;NUSHU CHARACTER-1B1BB;Lo;0;L;;;;;N;;;;; +1B1BC;NUSHU CHARACTER-1B1BC;Lo;0;L;;;;;N;;;;; +1B1BD;NUSHU CHARACTER-1B1BD;Lo;0;L;;;;;N;;;;; +1B1BE;NUSHU CHARACTER-1B1BE;Lo;0;L;;;;;N;;;;; +1B1BF;NUSHU CHARACTER-1B1BF;Lo;0;L;;;;;N;;;;; +1B1C0;NUSHU CHARACTER-1B1C0;Lo;0;L;;;;;N;;;;; +1B1C1;NUSHU CHARACTER-1B1C1;Lo;0;L;;;;;N;;;;; +1B1C2;NUSHU CHARACTER-1B1C2;Lo;0;L;;;;;N;;;;; +1B1C3;NUSHU CHARACTER-1B1C3;Lo;0;L;;;;;N;;;;; +1B1C4;NUSHU CHARACTER-1B1C4;Lo;0;L;;;;;N;;;;; +1B1C5;NUSHU CHARACTER-1B1C5;Lo;0;L;;;;;N;;;;; +1B1C6;NUSHU CHARACTER-1B1C6;Lo;0;L;;;;;N;;;;; +1B1C7;NUSHU CHARACTER-1B1C7;Lo;0;L;;;;;N;;;;; +1B1C8;NUSHU CHARACTER-1B1C8;Lo;0;L;;;;;N;;;;; +1B1C9;NUSHU CHARACTER-1B1C9;Lo;0;L;;;;;N;;;;; +1B1CA;NUSHU CHARACTER-1B1CA;Lo;0;L;;;;;N;;;;; +1B1CB;NUSHU CHARACTER-1B1CB;Lo;0;L;;;;;N;;;;; +1B1CC;NUSHU CHARACTER-1B1CC;Lo;0;L;;;;;N;;;;; +1B1CD;NUSHU CHARACTER-1B1CD;Lo;0;L;;;;;N;;;;; +1B1CE;NUSHU CHARACTER-1B1CE;Lo;0;L;;;;;N;;;;; +1B1CF;NUSHU CHARACTER-1B1CF;Lo;0;L;;;;;N;;;;; +1B1D0;NUSHU CHARACTER-1B1D0;Lo;0;L;;;;;N;;;;; +1B1D1;NUSHU CHARACTER-1B1D1;Lo;0;L;;;;;N;;;;; +1B1D2;NUSHU CHARACTER-1B1D2;Lo;0;L;;;;;N;;;;; +1B1D3;NUSHU CHARACTER-1B1D3;Lo;0;L;;;;;N;;;;; +1B1D4;NUSHU CHARACTER-1B1D4;Lo;0;L;;;;;N;;;;; +1B1D5;NUSHU CHARACTER-1B1D5;Lo;0;L;;;;;N;;;;; +1B1D6;NUSHU CHARACTER-1B1D6;Lo;0;L;;;;;N;;;;; +1B1D7;NUSHU CHARACTER-1B1D7;Lo;0;L;;;;;N;;;;; +1B1D8;NUSHU CHARACTER-1B1D8;Lo;0;L;;;;;N;;;;; +1B1D9;NUSHU CHARACTER-1B1D9;Lo;0;L;;;;;N;;;;; +1B1DA;NUSHU CHARACTER-1B1DA;Lo;0;L;;;;;N;;;;; +1B1DB;NUSHU CHARACTER-1B1DB;Lo;0;L;;;;;N;;;;; +1B1DC;NUSHU CHARACTER-1B1DC;Lo;0;L;;;;;N;;;;; +1B1DD;NUSHU CHARACTER-1B1DD;Lo;0;L;;;;;N;;;;; +1B1DE;NUSHU CHARACTER-1B1DE;Lo;0;L;;;;;N;;;;; +1B1DF;NUSHU CHARACTER-1B1DF;Lo;0;L;;;;;N;;;;; +1B1E0;NUSHU CHARACTER-1B1E0;Lo;0;L;;;;;N;;;;; +1B1E1;NUSHU CHARACTER-1B1E1;Lo;0;L;;;;;N;;;;; +1B1E2;NUSHU CHARACTER-1B1E2;Lo;0;L;;;;;N;;;;; +1B1E3;NUSHU CHARACTER-1B1E3;Lo;0;L;;;;;N;;;;; +1B1E4;NUSHU CHARACTER-1B1E4;Lo;0;L;;;;;N;;;;; +1B1E5;NUSHU CHARACTER-1B1E5;Lo;0;L;;;;;N;;;;; +1B1E6;NUSHU CHARACTER-1B1E6;Lo;0;L;;;;;N;;;;; +1B1E7;NUSHU CHARACTER-1B1E7;Lo;0;L;;;;;N;;;;; +1B1E8;NUSHU CHARACTER-1B1E8;Lo;0;L;;;;;N;;;;; +1B1E9;NUSHU CHARACTER-1B1E9;Lo;0;L;;;;;N;;;;; +1B1EA;NUSHU CHARACTER-1B1EA;Lo;0;L;;;;;N;;;;; +1B1EB;NUSHU CHARACTER-1B1EB;Lo;0;L;;;;;N;;;;; +1B1EC;NUSHU CHARACTER-1B1EC;Lo;0;L;;;;;N;;;;; +1B1ED;NUSHU CHARACTER-1B1ED;Lo;0;L;;;;;N;;;;; +1B1EE;NUSHU CHARACTER-1B1EE;Lo;0;L;;;;;N;;;;; +1B1EF;NUSHU CHARACTER-1B1EF;Lo;0;L;;;;;N;;;;; +1B1F0;NUSHU CHARACTER-1B1F0;Lo;0;L;;;;;N;;;;; +1B1F1;NUSHU CHARACTER-1B1F1;Lo;0;L;;;;;N;;;;; +1B1F2;NUSHU CHARACTER-1B1F2;Lo;0;L;;;;;N;;;;; +1B1F3;NUSHU CHARACTER-1B1F3;Lo;0;L;;;;;N;;;;; +1B1F4;NUSHU CHARACTER-1B1F4;Lo;0;L;;;;;N;;;;; +1B1F5;NUSHU CHARACTER-1B1F5;Lo;0;L;;;;;N;;;;; +1B1F6;NUSHU CHARACTER-1B1F6;Lo;0;L;;;;;N;;;;; +1B1F7;NUSHU CHARACTER-1B1F7;Lo;0;L;;;;;N;;;;; +1B1F8;NUSHU CHARACTER-1B1F8;Lo;0;L;;;;;N;;;;; +1B1F9;NUSHU CHARACTER-1B1F9;Lo;0;L;;;;;N;;;;; +1B1FA;NUSHU CHARACTER-1B1FA;Lo;0;L;;;;;N;;;;; +1B1FB;NUSHU CHARACTER-1B1FB;Lo;0;L;;;;;N;;;;; +1B1FC;NUSHU CHARACTER-1B1FC;Lo;0;L;;;;;N;;;;; +1B1FD;NUSHU CHARACTER-1B1FD;Lo;0;L;;;;;N;;;;; +1B1FE;NUSHU CHARACTER-1B1FE;Lo;0;L;;;;;N;;;;; +1B1FF;NUSHU CHARACTER-1B1FF;Lo;0;L;;;;;N;;;;; +1B200;NUSHU CHARACTER-1B200;Lo;0;L;;;;;N;;;;; +1B201;NUSHU CHARACTER-1B201;Lo;0;L;;;;;N;;;;; +1B202;NUSHU CHARACTER-1B202;Lo;0;L;;;;;N;;;;; +1B203;NUSHU CHARACTER-1B203;Lo;0;L;;;;;N;;;;; +1B204;NUSHU CHARACTER-1B204;Lo;0;L;;;;;N;;;;; +1B205;NUSHU CHARACTER-1B205;Lo;0;L;;;;;N;;;;; +1B206;NUSHU CHARACTER-1B206;Lo;0;L;;;;;N;;;;; +1B207;NUSHU CHARACTER-1B207;Lo;0;L;;;;;N;;;;; +1B208;NUSHU CHARACTER-1B208;Lo;0;L;;;;;N;;;;; +1B209;NUSHU CHARACTER-1B209;Lo;0;L;;;;;N;;;;; +1B20A;NUSHU CHARACTER-1B20A;Lo;0;L;;;;;N;;;;; +1B20B;NUSHU CHARACTER-1B20B;Lo;0;L;;;;;N;;;;; +1B20C;NUSHU CHARACTER-1B20C;Lo;0;L;;;;;N;;;;; +1B20D;NUSHU CHARACTER-1B20D;Lo;0;L;;;;;N;;;;; +1B20E;NUSHU CHARACTER-1B20E;Lo;0;L;;;;;N;;;;; +1B20F;NUSHU CHARACTER-1B20F;Lo;0;L;;;;;N;;;;; +1B210;NUSHU CHARACTER-1B210;Lo;0;L;;;;;N;;;;; +1B211;NUSHU CHARACTER-1B211;Lo;0;L;;;;;N;;;;; +1B212;NUSHU CHARACTER-1B212;Lo;0;L;;;;;N;;;;; +1B213;NUSHU CHARACTER-1B213;Lo;0;L;;;;;N;;;;; +1B214;NUSHU CHARACTER-1B214;Lo;0;L;;;;;N;;;;; +1B215;NUSHU CHARACTER-1B215;Lo;0;L;;;;;N;;;;; +1B216;NUSHU CHARACTER-1B216;Lo;0;L;;;;;N;;;;; +1B217;NUSHU CHARACTER-1B217;Lo;0;L;;;;;N;;;;; +1B218;NUSHU CHARACTER-1B218;Lo;0;L;;;;;N;;;;; +1B219;NUSHU CHARACTER-1B219;Lo;0;L;;;;;N;;;;; +1B21A;NUSHU CHARACTER-1B21A;Lo;0;L;;;;;N;;;;; +1B21B;NUSHU CHARACTER-1B21B;Lo;0;L;;;;;N;;;;; +1B21C;NUSHU CHARACTER-1B21C;Lo;0;L;;;;;N;;;;; +1B21D;NUSHU CHARACTER-1B21D;Lo;0;L;;;;;N;;;;; +1B21E;NUSHU CHARACTER-1B21E;Lo;0;L;;;;;N;;;;; +1B21F;NUSHU CHARACTER-1B21F;Lo;0;L;;;;;N;;;;; +1B220;NUSHU CHARACTER-1B220;Lo;0;L;;;;;N;;;;; +1B221;NUSHU CHARACTER-1B221;Lo;0;L;;;;;N;;;;; +1B222;NUSHU CHARACTER-1B222;Lo;0;L;;;;;N;;;;; +1B223;NUSHU CHARACTER-1B223;Lo;0;L;;;;;N;;;;; +1B224;NUSHU CHARACTER-1B224;Lo;0;L;;;;;N;;;;; +1B225;NUSHU CHARACTER-1B225;Lo;0;L;;;;;N;;;;; +1B226;NUSHU CHARACTER-1B226;Lo;0;L;;;;;N;;;;; +1B227;NUSHU CHARACTER-1B227;Lo;0;L;;;;;N;;;;; +1B228;NUSHU CHARACTER-1B228;Lo;0;L;;;;;N;;;;; +1B229;NUSHU CHARACTER-1B229;Lo;0;L;;;;;N;;;;; +1B22A;NUSHU CHARACTER-1B22A;Lo;0;L;;;;;N;;;;; +1B22B;NUSHU CHARACTER-1B22B;Lo;0;L;;;;;N;;;;; +1B22C;NUSHU CHARACTER-1B22C;Lo;0;L;;;;;N;;;;; +1B22D;NUSHU CHARACTER-1B22D;Lo;0;L;;;;;N;;;;; +1B22E;NUSHU CHARACTER-1B22E;Lo;0;L;;;;;N;;;;; +1B22F;NUSHU CHARACTER-1B22F;Lo;0;L;;;;;N;;;;; +1B230;NUSHU CHARACTER-1B230;Lo;0;L;;;;;N;;;;; +1B231;NUSHU CHARACTER-1B231;Lo;0;L;;;;;N;;;;; +1B232;NUSHU CHARACTER-1B232;Lo;0;L;;;;;N;;;;; +1B233;NUSHU CHARACTER-1B233;Lo;0;L;;;;;N;;;;; +1B234;NUSHU CHARACTER-1B234;Lo;0;L;;;;;N;;;;; +1B235;NUSHU CHARACTER-1B235;Lo;0;L;;;;;N;;;;; +1B236;NUSHU CHARACTER-1B236;Lo;0;L;;;;;N;;;;; +1B237;NUSHU CHARACTER-1B237;Lo;0;L;;;;;N;;;;; +1B238;NUSHU CHARACTER-1B238;Lo;0;L;;;;;N;;;;; +1B239;NUSHU CHARACTER-1B239;Lo;0;L;;;;;N;;;;; +1B23A;NUSHU CHARACTER-1B23A;Lo;0;L;;;;;N;;;;; +1B23B;NUSHU CHARACTER-1B23B;Lo;0;L;;;;;N;;;;; +1B23C;NUSHU CHARACTER-1B23C;Lo;0;L;;;;;N;;;;; +1B23D;NUSHU CHARACTER-1B23D;Lo;0;L;;;;;N;;;;; +1B23E;NUSHU CHARACTER-1B23E;Lo;0;L;;;;;N;;;;; +1B23F;NUSHU CHARACTER-1B23F;Lo;0;L;;;;;N;;;;; +1B240;NUSHU CHARACTER-1B240;Lo;0;L;;;;;N;;;;; +1B241;NUSHU CHARACTER-1B241;Lo;0;L;;;;;N;;;;; +1B242;NUSHU CHARACTER-1B242;Lo;0;L;;;;;N;;;;; +1B243;NUSHU CHARACTER-1B243;Lo;0;L;;;;;N;;;;; +1B244;NUSHU CHARACTER-1B244;Lo;0;L;;;;;N;;;;; +1B245;NUSHU CHARACTER-1B245;Lo;0;L;;;;;N;;;;; +1B246;NUSHU CHARACTER-1B246;Lo;0;L;;;;;N;;;;; +1B247;NUSHU CHARACTER-1B247;Lo;0;L;;;;;N;;;;; +1B248;NUSHU CHARACTER-1B248;Lo;0;L;;;;;N;;;;; +1B249;NUSHU CHARACTER-1B249;Lo;0;L;;;;;N;;;;; +1B24A;NUSHU CHARACTER-1B24A;Lo;0;L;;;;;N;;;;; +1B24B;NUSHU CHARACTER-1B24B;Lo;0;L;;;;;N;;;;; +1B24C;NUSHU CHARACTER-1B24C;Lo;0;L;;;;;N;;;;; +1B24D;NUSHU CHARACTER-1B24D;Lo;0;L;;;;;N;;;;; +1B24E;NUSHU CHARACTER-1B24E;Lo;0;L;;;;;N;;;;; +1B24F;NUSHU CHARACTER-1B24F;Lo;0;L;;;;;N;;;;; +1B250;NUSHU CHARACTER-1B250;Lo;0;L;;;;;N;;;;; +1B251;NUSHU CHARACTER-1B251;Lo;0;L;;;;;N;;;;; +1B252;NUSHU CHARACTER-1B252;Lo;0;L;;;;;N;;;;; +1B253;NUSHU CHARACTER-1B253;Lo;0;L;;;;;N;;;;; +1B254;NUSHU CHARACTER-1B254;Lo;0;L;;;;;N;;;;; +1B255;NUSHU CHARACTER-1B255;Lo;0;L;;;;;N;;;;; +1B256;NUSHU CHARACTER-1B256;Lo;0;L;;;;;N;;;;; +1B257;NUSHU CHARACTER-1B257;Lo;0;L;;;;;N;;;;; +1B258;NUSHU CHARACTER-1B258;Lo;0;L;;;;;N;;;;; +1B259;NUSHU CHARACTER-1B259;Lo;0;L;;;;;N;;;;; +1B25A;NUSHU CHARACTER-1B25A;Lo;0;L;;;;;N;;;;; +1B25B;NUSHU CHARACTER-1B25B;Lo;0;L;;;;;N;;;;; +1B25C;NUSHU CHARACTER-1B25C;Lo;0;L;;;;;N;;;;; +1B25D;NUSHU CHARACTER-1B25D;Lo;0;L;;;;;N;;;;; +1B25E;NUSHU CHARACTER-1B25E;Lo;0;L;;;;;N;;;;; +1B25F;NUSHU CHARACTER-1B25F;Lo;0;L;;;;;N;;;;; +1B260;NUSHU CHARACTER-1B260;Lo;0;L;;;;;N;;;;; +1B261;NUSHU CHARACTER-1B261;Lo;0;L;;;;;N;;;;; +1B262;NUSHU CHARACTER-1B262;Lo;0;L;;;;;N;;;;; +1B263;NUSHU CHARACTER-1B263;Lo;0;L;;;;;N;;;;; +1B264;NUSHU CHARACTER-1B264;Lo;0;L;;;;;N;;;;; +1B265;NUSHU CHARACTER-1B265;Lo;0;L;;;;;N;;;;; +1B266;NUSHU CHARACTER-1B266;Lo;0;L;;;;;N;;;;; +1B267;NUSHU CHARACTER-1B267;Lo;0;L;;;;;N;;;;; +1B268;NUSHU CHARACTER-1B268;Lo;0;L;;;;;N;;;;; +1B269;NUSHU CHARACTER-1B269;Lo;0;L;;;;;N;;;;; +1B26A;NUSHU CHARACTER-1B26A;Lo;0;L;;;;;N;;;;; +1B26B;NUSHU CHARACTER-1B26B;Lo;0;L;;;;;N;;;;; +1B26C;NUSHU CHARACTER-1B26C;Lo;0;L;;;;;N;;;;; +1B26D;NUSHU CHARACTER-1B26D;Lo;0;L;;;;;N;;;;; +1B26E;NUSHU CHARACTER-1B26E;Lo;0;L;;;;;N;;;;; +1B26F;NUSHU CHARACTER-1B26F;Lo;0;L;;;;;N;;;;; +1B270;NUSHU CHARACTER-1B270;Lo;0;L;;;;;N;;;;; +1B271;NUSHU CHARACTER-1B271;Lo;0;L;;;;;N;;;;; +1B272;NUSHU CHARACTER-1B272;Lo;0;L;;;;;N;;;;; +1B273;NUSHU CHARACTER-1B273;Lo;0;L;;;;;N;;;;; +1B274;NUSHU CHARACTER-1B274;Lo;0;L;;;;;N;;;;; +1B275;NUSHU CHARACTER-1B275;Lo;0;L;;;;;N;;;;; +1B276;NUSHU CHARACTER-1B276;Lo;0;L;;;;;N;;;;; +1B277;NUSHU CHARACTER-1B277;Lo;0;L;;;;;N;;;;; +1B278;NUSHU CHARACTER-1B278;Lo;0;L;;;;;N;;;;; +1B279;NUSHU CHARACTER-1B279;Lo;0;L;;;;;N;;;;; +1B27A;NUSHU CHARACTER-1B27A;Lo;0;L;;;;;N;;;;; +1B27B;NUSHU CHARACTER-1B27B;Lo;0;L;;;;;N;;;;; +1B27C;NUSHU CHARACTER-1B27C;Lo;0;L;;;;;N;;;;; +1B27D;NUSHU CHARACTER-1B27D;Lo;0;L;;;;;N;;;;; +1B27E;NUSHU CHARACTER-1B27E;Lo;0;L;;;;;N;;;;; +1B27F;NUSHU CHARACTER-1B27F;Lo;0;L;;;;;N;;;;; +1B280;NUSHU CHARACTER-1B280;Lo;0;L;;;;;N;;;;; +1B281;NUSHU CHARACTER-1B281;Lo;0;L;;;;;N;;;;; +1B282;NUSHU CHARACTER-1B282;Lo;0;L;;;;;N;;;;; +1B283;NUSHU CHARACTER-1B283;Lo;0;L;;;;;N;;;;; +1B284;NUSHU CHARACTER-1B284;Lo;0;L;;;;;N;;;;; +1B285;NUSHU CHARACTER-1B285;Lo;0;L;;;;;N;;;;; +1B286;NUSHU CHARACTER-1B286;Lo;0;L;;;;;N;;;;; +1B287;NUSHU CHARACTER-1B287;Lo;0;L;;;;;N;;;;; +1B288;NUSHU CHARACTER-1B288;Lo;0;L;;;;;N;;;;; +1B289;NUSHU CHARACTER-1B289;Lo;0;L;;;;;N;;;;; +1B28A;NUSHU CHARACTER-1B28A;Lo;0;L;;;;;N;;;;; +1B28B;NUSHU CHARACTER-1B28B;Lo;0;L;;;;;N;;;;; +1B28C;NUSHU CHARACTER-1B28C;Lo;0;L;;;;;N;;;;; +1B28D;NUSHU CHARACTER-1B28D;Lo;0;L;;;;;N;;;;; +1B28E;NUSHU CHARACTER-1B28E;Lo;0;L;;;;;N;;;;; +1B28F;NUSHU CHARACTER-1B28F;Lo;0;L;;;;;N;;;;; +1B290;NUSHU CHARACTER-1B290;Lo;0;L;;;;;N;;;;; +1B291;NUSHU CHARACTER-1B291;Lo;0;L;;;;;N;;;;; +1B292;NUSHU CHARACTER-1B292;Lo;0;L;;;;;N;;;;; +1B293;NUSHU CHARACTER-1B293;Lo;0;L;;;;;N;;;;; +1B294;NUSHU CHARACTER-1B294;Lo;0;L;;;;;N;;;;; +1B295;NUSHU CHARACTER-1B295;Lo;0;L;;;;;N;;;;; +1B296;NUSHU CHARACTER-1B296;Lo;0;L;;;;;N;;;;; +1B297;NUSHU CHARACTER-1B297;Lo;0;L;;;;;N;;;;; +1B298;NUSHU CHARACTER-1B298;Lo;0;L;;;;;N;;;;; +1B299;NUSHU CHARACTER-1B299;Lo;0;L;;;;;N;;;;; +1B29A;NUSHU CHARACTER-1B29A;Lo;0;L;;;;;N;;;;; +1B29B;NUSHU CHARACTER-1B29B;Lo;0;L;;;;;N;;;;; +1B29C;NUSHU CHARACTER-1B29C;Lo;0;L;;;;;N;;;;; +1B29D;NUSHU CHARACTER-1B29D;Lo;0;L;;;;;N;;;;; +1B29E;NUSHU CHARACTER-1B29E;Lo;0;L;;;;;N;;;;; +1B29F;NUSHU CHARACTER-1B29F;Lo;0;L;;;;;N;;;;; +1B2A0;NUSHU CHARACTER-1B2A0;Lo;0;L;;;;;N;;;;; +1B2A1;NUSHU CHARACTER-1B2A1;Lo;0;L;;;;;N;;;;; +1B2A2;NUSHU CHARACTER-1B2A2;Lo;0;L;;;;;N;;;;; +1B2A3;NUSHU CHARACTER-1B2A3;Lo;0;L;;;;;N;;;;; +1B2A4;NUSHU CHARACTER-1B2A4;Lo;0;L;;;;;N;;;;; +1B2A5;NUSHU CHARACTER-1B2A5;Lo;0;L;;;;;N;;;;; +1B2A6;NUSHU CHARACTER-1B2A6;Lo;0;L;;;;;N;;;;; +1B2A7;NUSHU CHARACTER-1B2A7;Lo;0;L;;;;;N;;;;; +1B2A8;NUSHU CHARACTER-1B2A8;Lo;0;L;;;;;N;;;;; +1B2A9;NUSHU CHARACTER-1B2A9;Lo;0;L;;;;;N;;;;; +1B2AA;NUSHU CHARACTER-1B2AA;Lo;0;L;;;;;N;;;;; +1B2AB;NUSHU CHARACTER-1B2AB;Lo;0;L;;;;;N;;;;; +1B2AC;NUSHU CHARACTER-1B2AC;Lo;0;L;;;;;N;;;;; +1B2AD;NUSHU CHARACTER-1B2AD;Lo;0;L;;;;;N;;;;; +1B2AE;NUSHU CHARACTER-1B2AE;Lo;0;L;;;;;N;;;;; +1B2AF;NUSHU CHARACTER-1B2AF;Lo;0;L;;;;;N;;;;; +1B2B0;NUSHU CHARACTER-1B2B0;Lo;0;L;;;;;N;;;;; +1B2B1;NUSHU CHARACTER-1B2B1;Lo;0;L;;;;;N;;;;; +1B2B2;NUSHU CHARACTER-1B2B2;Lo;0;L;;;;;N;;;;; +1B2B3;NUSHU CHARACTER-1B2B3;Lo;0;L;;;;;N;;;;; +1B2B4;NUSHU CHARACTER-1B2B4;Lo;0;L;;;;;N;;;;; +1B2B5;NUSHU CHARACTER-1B2B5;Lo;0;L;;;;;N;;;;; +1B2B6;NUSHU CHARACTER-1B2B6;Lo;0;L;;;;;N;;;;; +1B2B7;NUSHU CHARACTER-1B2B7;Lo;0;L;;;;;N;;;;; +1B2B8;NUSHU CHARACTER-1B2B8;Lo;0;L;;;;;N;;;;; +1B2B9;NUSHU CHARACTER-1B2B9;Lo;0;L;;;;;N;;;;; +1B2BA;NUSHU CHARACTER-1B2BA;Lo;0;L;;;;;N;;;;; +1B2BB;NUSHU CHARACTER-1B2BB;Lo;0;L;;;;;N;;;;; +1B2BC;NUSHU CHARACTER-1B2BC;Lo;0;L;;;;;N;;;;; +1B2BD;NUSHU CHARACTER-1B2BD;Lo;0;L;;;;;N;;;;; +1B2BE;NUSHU CHARACTER-1B2BE;Lo;0;L;;;;;N;;;;; +1B2BF;NUSHU CHARACTER-1B2BF;Lo;0;L;;;;;N;;;;; +1B2C0;NUSHU CHARACTER-1B2C0;Lo;0;L;;;;;N;;;;; +1B2C1;NUSHU CHARACTER-1B2C1;Lo;0;L;;;;;N;;;;; +1B2C2;NUSHU CHARACTER-1B2C2;Lo;0;L;;;;;N;;;;; +1B2C3;NUSHU CHARACTER-1B2C3;Lo;0;L;;;;;N;;;;; +1B2C4;NUSHU CHARACTER-1B2C4;Lo;0;L;;;;;N;;;;; +1B2C5;NUSHU CHARACTER-1B2C5;Lo;0;L;;;;;N;;;;; +1B2C6;NUSHU CHARACTER-1B2C6;Lo;0;L;;;;;N;;;;; +1B2C7;NUSHU CHARACTER-1B2C7;Lo;0;L;;;;;N;;;;; +1B2C8;NUSHU CHARACTER-1B2C8;Lo;0;L;;;;;N;;;;; +1B2C9;NUSHU CHARACTER-1B2C9;Lo;0;L;;;;;N;;;;; +1B2CA;NUSHU CHARACTER-1B2CA;Lo;0;L;;;;;N;;;;; +1B2CB;NUSHU CHARACTER-1B2CB;Lo;0;L;;;;;N;;;;; +1B2CC;NUSHU CHARACTER-1B2CC;Lo;0;L;;;;;N;;;;; +1B2CD;NUSHU CHARACTER-1B2CD;Lo;0;L;;;;;N;;;;; +1B2CE;NUSHU CHARACTER-1B2CE;Lo;0;L;;;;;N;;;;; +1B2CF;NUSHU CHARACTER-1B2CF;Lo;0;L;;;;;N;;;;; +1B2D0;NUSHU CHARACTER-1B2D0;Lo;0;L;;;;;N;;;;; +1B2D1;NUSHU CHARACTER-1B2D1;Lo;0;L;;;;;N;;;;; +1B2D2;NUSHU CHARACTER-1B2D2;Lo;0;L;;;;;N;;;;; +1B2D3;NUSHU CHARACTER-1B2D3;Lo;0;L;;;;;N;;;;; +1B2D4;NUSHU CHARACTER-1B2D4;Lo;0;L;;;;;N;;;;; +1B2D5;NUSHU CHARACTER-1B2D5;Lo;0;L;;;;;N;;;;; +1B2D6;NUSHU CHARACTER-1B2D6;Lo;0;L;;;;;N;;;;; +1B2D7;NUSHU CHARACTER-1B2D7;Lo;0;L;;;;;N;;;;; +1B2D8;NUSHU CHARACTER-1B2D8;Lo;0;L;;;;;N;;;;; +1B2D9;NUSHU CHARACTER-1B2D9;Lo;0;L;;;;;N;;;;; +1B2DA;NUSHU CHARACTER-1B2DA;Lo;0;L;;;;;N;;;;; +1B2DB;NUSHU CHARACTER-1B2DB;Lo;0;L;;;;;N;;;;; +1B2DC;NUSHU CHARACTER-1B2DC;Lo;0;L;;;;;N;;;;; +1B2DD;NUSHU CHARACTER-1B2DD;Lo;0;L;;;;;N;;;;; +1B2DE;NUSHU CHARACTER-1B2DE;Lo;0;L;;;;;N;;;;; +1B2DF;NUSHU CHARACTER-1B2DF;Lo;0;L;;;;;N;;;;; +1B2E0;NUSHU CHARACTER-1B2E0;Lo;0;L;;;;;N;;;;; +1B2E1;NUSHU CHARACTER-1B2E1;Lo;0;L;;;;;N;;;;; +1B2E2;NUSHU CHARACTER-1B2E2;Lo;0;L;;;;;N;;;;; +1B2E3;NUSHU CHARACTER-1B2E3;Lo;0;L;;;;;N;;;;; +1B2E4;NUSHU CHARACTER-1B2E4;Lo;0;L;;;;;N;;;;; +1B2E5;NUSHU CHARACTER-1B2E5;Lo;0;L;;;;;N;;;;; +1B2E6;NUSHU CHARACTER-1B2E6;Lo;0;L;;;;;N;;;;; +1B2E7;NUSHU CHARACTER-1B2E7;Lo;0;L;;;;;N;;;;; +1B2E8;NUSHU CHARACTER-1B2E8;Lo;0;L;;;;;N;;;;; +1B2E9;NUSHU CHARACTER-1B2E9;Lo;0;L;;;;;N;;;;; +1B2EA;NUSHU CHARACTER-1B2EA;Lo;0;L;;;;;N;;;;; +1B2EB;NUSHU CHARACTER-1B2EB;Lo;0;L;;;;;N;;;;; +1B2EC;NUSHU CHARACTER-1B2EC;Lo;0;L;;;;;N;;;;; +1B2ED;NUSHU CHARACTER-1B2ED;Lo;0;L;;;;;N;;;;; +1B2EE;NUSHU CHARACTER-1B2EE;Lo;0;L;;;;;N;;;;; +1B2EF;NUSHU CHARACTER-1B2EF;Lo;0;L;;;;;N;;;;; +1B2F0;NUSHU CHARACTER-1B2F0;Lo;0;L;;;;;N;;;;; +1B2F1;NUSHU CHARACTER-1B2F1;Lo;0;L;;;;;N;;;;; +1B2F2;NUSHU CHARACTER-1B2F2;Lo;0;L;;;;;N;;;;; +1B2F3;NUSHU CHARACTER-1B2F3;Lo;0;L;;;;;N;;;;; +1B2F4;NUSHU CHARACTER-1B2F4;Lo;0;L;;;;;N;;;;; +1B2F5;NUSHU CHARACTER-1B2F5;Lo;0;L;;;;;N;;;;; +1B2F6;NUSHU CHARACTER-1B2F6;Lo;0;L;;;;;N;;;;; +1B2F7;NUSHU CHARACTER-1B2F7;Lo;0;L;;;;;N;;;;; +1B2F8;NUSHU CHARACTER-1B2F8;Lo;0;L;;;;;N;;;;; +1B2F9;NUSHU CHARACTER-1B2F9;Lo;0;L;;;;;N;;;;; +1B2FA;NUSHU CHARACTER-1B2FA;Lo;0;L;;;;;N;;;;; +1B2FB;NUSHU CHARACTER-1B2FB;Lo;0;L;;;;;N;;;;; +1BC00;DUPLOYAN LETTER H;Lo;0;L;;;;;N;;;;; +1BC01;DUPLOYAN LETTER X;Lo;0;L;;;;;N;;;;; +1BC02;DUPLOYAN LETTER P;Lo;0;L;;;;;N;;;;; +1BC03;DUPLOYAN LETTER T;Lo;0;L;;;;;N;;;;; +1BC04;DUPLOYAN LETTER F;Lo;0;L;;;;;N;;;;; +1BC05;DUPLOYAN LETTER K;Lo;0;L;;;;;N;;;;; +1BC06;DUPLOYAN LETTER L;Lo;0;L;;;;;N;;;;; +1BC07;DUPLOYAN LETTER B;Lo;0;L;;;;;N;;;;; +1BC08;DUPLOYAN LETTER D;Lo;0;L;;;;;N;;;;; +1BC09;DUPLOYAN LETTER V;Lo;0;L;;;;;N;;;;; +1BC0A;DUPLOYAN LETTER G;Lo;0;L;;;;;N;;;;; +1BC0B;DUPLOYAN LETTER R;Lo;0;L;;;;;N;;;;; +1BC0C;DUPLOYAN LETTER P N;Lo;0;L;;;;;N;;;;; +1BC0D;DUPLOYAN LETTER D S;Lo;0;L;;;;;N;;;;; +1BC0E;DUPLOYAN LETTER F N;Lo;0;L;;;;;N;;;;; +1BC0F;DUPLOYAN LETTER K M;Lo;0;L;;;;;N;;;;; +1BC10;DUPLOYAN LETTER R S;Lo;0;L;;;;;N;;;;; +1BC11;DUPLOYAN LETTER TH;Lo;0;L;;;;;N;;;;; +1BC12;DUPLOYAN LETTER SLOAN DH;Lo;0;L;;;;;N;;;;; +1BC13;DUPLOYAN LETTER DH;Lo;0;L;;;;;N;;;;; +1BC14;DUPLOYAN LETTER KK;Lo;0;L;;;;;N;;;;; +1BC15;DUPLOYAN LETTER SLOAN J;Lo;0;L;;;;;N;;;;; +1BC16;DUPLOYAN LETTER HL;Lo;0;L;;;;;N;;;;; +1BC17;DUPLOYAN LETTER LH;Lo;0;L;;;;;N;;;;; +1BC18;DUPLOYAN LETTER RH;Lo;0;L;;;;;N;;;;; +1BC19;DUPLOYAN LETTER M;Lo;0;L;;;;;N;;;;; +1BC1A;DUPLOYAN LETTER N;Lo;0;L;;;;;N;;;;; +1BC1B;DUPLOYAN LETTER J;Lo;0;L;;;;;N;;;;; +1BC1C;DUPLOYAN LETTER S;Lo;0;L;;;;;N;;;;; +1BC1D;DUPLOYAN LETTER M N;Lo;0;L;;;;;N;;;;; +1BC1E;DUPLOYAN LETTER N M;Lo;0;L;;;;;N;;;;; +1BC1F;DUPLOYAN LETTER J M;Lo;0;L;;;;;N;;;;; +1BC20;DUPLOYAN LETTER S J;Lo;0;L;;;;;N;;;;; +1BC21;DUPLOYAN LETTER M WITH DOT;Lo;0;L;;;;;N;;;;; +1BC22;DUPLOYAN LETTER N WITH DOT;Lo;0;L;;;;;N;;;;; +1BC23;DUPLOYAN LETTER J WITH DOT;Lo;0;L;;;;;N;;;;; +1BC24;DUPLOYAN LETTER J WITH DOTS INSIDE AND ABOVE;Lo;0;L;;;;;N;;;;; +1BC25;DUPLOYAN LETTER S WITH DOT;Lo;0;L;;;;;N;;;;; +1BC26;DUPLOYAN LETTER S WITH DOT BELOW;Lo;0;L;;;;;N;;;;; +1BC27;DUPLOYAN LETTER M S;Lo;0;L;;;;;N;;;;; +1BC28;DUPLOYAN LETTER N S;Lo;0;L;;;;;N;;;;; +1BC29;DUPLOYAN LETTER J S;Lo;0;L;;;;;N;;;;; +1BC2A;DUPLOYAN LETTER S S;Lo;0;L;;;;;N;;;;; +1BC2B;DUPLOYAN LETTER M N S;Lo;0;L;;;;;N;;;;; +1BC2C;DUPLOYAN LETTER N M S;Lo;0;L;;;;;N;;;;; +1BC2D;DUPLOYAN LETTER J M S;Lo;0;L;;;;;N;;;;; +1BC2E;DUPLOYAN LETTER S J S;Lo;0;L;;;;;N;;;;; +1BC2F;DUPLOYAN LETTER J S WITH DOT;Lo;0;L;;;;;N;;;;; +1BC30;DUPLOYAN LETTER J N;Lo;0;L;;;;;N;;;;; +1BC31;DUPLOYAN LETTER J N S;Lo;0;L;;;;;N;;;;; +1BC32;DUPLOYAN LETTER S T;Lo;0;L;;;;;N;;;;; +1BC33;DUPLOYAN LETTER S T R;Lo;0;L;;;;;N;;;;; +1BC34;DUPLOYAN LETTER S P;Lo;0;L;;;;;N;;;;; +1BC35;DUPLOYAN LETTER S P R;Lo;0;L;;;;;N;;;;; +1BC36;DUPLOYAN LETTER T S;Lo;0;L;;;;;N;;;;; +1BC37;DUPLOYAN LETTER T R S;Lo;0;L;;;;;N;;;;; +1BC38;DUPLOYAN LETTER W;Lo;0;L;;;;;N;;;;; +1BC39;DUPLOYAN LETTER WH;Lo;0;L;;;;;N;;;;; +1BC3A;DUPLOYAN LETTER W R;Lo;0;L;;;;;N;;;;; +1BC3B;DUPLOYAN LETTER S N;Lo;0;L;;;;;N;;;;; +1BC3C;DUPLOYAN LETTER S M;Lo;0;L;;;;;N;;;;; +1BC3D;DUPLOYAN LETTER K R S;Lo;0;L;;;;;N;;;;; +1BC3E;DUPLOYAN LETTER G R S;Lo;0;L;;;;;N;;;;; +1BC3F;DUPLOYAN LETTER S K;Lo;0;L;;;;;N;;;;; +1BC40;DUPLOYAN LETTER S K R;Lo;0;L;;;;;N;;;;; +1BC41;DUPLOYAN LETTER A;Lo;0;L;;;;;N;;;;; +1BC42;DUPLOYAN LETTER SLOAN OW;Lo;0;L;;;;;N;;;;; +1BC43;DUPLOYAN LETTER OA;Lo;0;L;;;;;N;;;;; +1BC44;DUPLOYAN LETTER O;Lo;0;L;;;;;N;;;;; +1BC45;DUPLOYAN LETTER AOU;Lo;0;L;;;;;N;;;;; +1BC46;DUPLOYAN LETTER I;Lo;0;L;;;;;N;;;;; +1BC47;DUPLOYAN LETTER E;Lo;0;L;;;;;N;;;;; +1BC48;DUPLOYAN LETTER IE;Lo;0;L;;;;;N;;;;; +1BC49;DUPLOYAN LETTER SHORT I;Lo;0;L;;;;;N;;;;; +1BC4A;DUPLOYAN LETTER UI;Lo;0;L;;;;;N;;;;; +1BC4B;DUPLOYAN LETTER EE;Lo;0;L;;;;;N;;;;; +1BC4C;DUPLOYAN LETTER SLOAN EH;Lo;0;L;;;;;N;;;;; +1BC4D;DUPLOYAN LETTER ROMANIAN I;Lo;0;L;;;;;N;;;;; +1BC4E;DUPLOYAN LETTER SLOAN EE;Lo;0;L;;;;;N;;;;; +1BC4F;DUPLOYAN LETTER LONG I;Lo;0;L;;;;;N;;;;; +1BC50;DUPLOYAN LETTER YE;Lo;0;L;;;;;N;;;;; +1BC51;DUPLOYAN LETTER U;Lo;0;L;;;;;N;;;;; +1BC52;DUPLOYAN LETTER EU;Lo;0;L;;;;;N;;;;; +1BC53;DUPLOYAN LETTER XW;Lo;0;L;;;;;N;;;;; +1BC54;DUPLOYAN LETTER U N;Lo;0;L;;;;;N;;;;; +1BC55;DUPLOYAN LETTER LONG U;Lo;0;L;;;;;N;;;;; +1BC56;DUPLOYAN LETTER ROMANIAN U;Lo;0;L;;;;;N;;;;; +1BC57;DUPLOYAN LETTER UH;Lo;0;L;;;;;N;;;;; +1BC58;DUPLOYAN LETTER SLOAN U;Lo;0;L;;;;;N;;;;; +1BC59;DUPLOYAN LETTER OOH;Lo;0;L;;;;;N;;;;; +1BC5A;DUPLOYAN LETTER OW;Lo;0;L;;;;;N;;;;; +1BC5B;DUPLOYAN LETTER OU;Lo;0;L;;;;;N;;;;; +1BC5C;DUPLOYAN LETTER WA;Lo;0;L;;;;;N;;;;; +1BC5D;DUPLOYAN LETTER WO;Lo;0;L;;;;;N;;;;; +1BC5E;DUPLOYAN LETTER WI;Lo;0;L;;;;;N;;;;; +1BC5F;DUPLOYAN LETTER WEI;Lo;0;L;;;;;N;;;;; +1BC60;DUPLOYAN LETTER WOW;Lo;0;L;;;;;N;;;;; +1BC61;DUPLOYAN LETTER NASAL U;Lo;0;L;;;;;N;;;;; +1BC62;DUPLOYAN LETTER NASAL O;Lo;0;L;;;;;N;;;;; +1BC63;DUPLOYAN LETTER NASAL I;Lo;0;L;;;;;N;;;;; +1BC64;DUPLOYAN LETTER NASAL A;Lo;0;L;;;;;N;;;;; +1BC65;DUPLOYAN LETTER PERNIN AN;Lo;0;L;;;;;N;;;;; +1BC66;DUPLOYAN LETTER PERNIN AM;Lo;0;L;;;;;N;;;;; +1BC67;DUPLOYAN LETTER SLOAN EN;Lo;0;L;;;;;N;;;;; +1BC68;DUPLOYAN LETTER SLOAN AN;Lo;0;L;;;;;N;;;;; +1BC69;DUPLOYAN LETTER SLOAN ON;Lo;0;L;;;;;N;;;;; +1BC6A;DUPLOYAN LETTER VOCALIC M;Lo;0;L;;;;;N;;;;; +1BC70;DUPLOYAN AFFIX LEFT HORIZONTAL SECANT;Lo;0;L;;;;;N;;;;; +1BC71;DUPLOYAN AFFIX MID HORIZONTAL SECANT;Lo;0;L;;;;;N;;;;; +1BC72;DUPLOYAN AFFIX RIGHT HORIZONTAL SECANT;Lo;0;L;;;;;N;;;;; +1BC73;DUPLOYAN AFFIX LOW VERTICAL SECANT;Lo;0;L;;;;;N;;;;; +1BC74;DUPLOYAN AFFIX MID VERTICAL SECANT;Lo;0;L;;;;;N;;;;; +1BC75;DUPLOYAN AFFIX HIGH VERTICAL SECANT;Lo;0;L;;;;;N;;;;; +1BC76;DUPLOYAN AFFIX ATTACHED SECANT;Lo;0;L;;;;;N;;;;; +1BC77;DUPLOYAN AFFIX ATTACHED LEFT-TO-RIGHT SECANT;Lo;0;L;;;;;N;;;;; +1BC78;DUPLOYAN AFFIX ATTACHED TANGENT;Lo;0;L;;;;;N;;;;; +1BC79;DUPLOYAN AFFIX ATTACHED TAIL;Lo;0;L;;;;;N;;;;; +1BC7A;DUPLOYAN AFFIX ATTACHED E HOOK;Lo;0;L;;;;;N;;;;; +1BC7B;DUPLOYAN AFFIX ATTACHED I HOOK;Lo;0;L;;;;;N;;;;; +1BC7C;DUPLOYAN AFFIX ATTACHED TANGENT HOOK;Lo;0;L;;;;;N;;;;; +1BC80;DUPLOYAN AFFIX HIGH ACUTE;Lo;0;L;;;;;N;;;;; +1BC81;DUPLOYAN AFFIX HIGH TIGHT ACUTE;Lo;0;L;;;;;N;;;;; +1BC82;DUPLOYAN AFFIX HIGH GRAVE;Lo;0;L;;;;;N;;;;; +1BC83;DUPLOYAN AFFIX HIGH LONG GRAVE;Lo;0;L;;;;;N;;;;; +1BC84;DUPLOYAN AFFIX HIGH DOT;Lo;0;L;;;;;N;;;;; +1BC85;DUPLOYAN AFFIX HIGH CIRCLE;Lo;0;L;;;;;N;;;;; +1BC86;DUPLOYAN AFFIX HIGH LINE;Lo;0;L;;;;;N;;;;; +1BC87;DUPLOYAN AFFIX HIGH WAVE;Lo;0;L;;;;;N;;;;; +1BC88;DUPLOYAN AFFIX HIGH VERTICAL;Lo;0;L;;;;;N;;;;; +1BC90;DUPLOYAN AFFIX LOW ACUTE;Lo;0;L;;;;;N;;;;; +1BC91;DUPLOYAN AFFIX LOW TIGHT ACUTE;Lo;0;L;;;;;N;;;;; +1BC92;DUPLOYAN AFFIX LOW GRAVE;Lo;0;L;;;;;N;;;;; +1BC93;DUPLOYAN AFFIX LOW LONG GRAVE;Lo;0;L;;;;;N;;;;; +1BC94;DUPLOYAN AFFIX LOW DOT;Lo;0;L;;;;;N;;;;; +1BC95;DUPLOYAN AFFIX LOW CIRCLE;Lo;0;L;;;;;N;;;;; +1BC96;DUPLOYAN AFFIX LOW LINE;Lo;0;L;;;;;N;;;;; +1BC97;DUPLOYAN AFFIX LOW WAVE;Lo;0;L;;;;;N;;;;; +1BC98;DUPLOYAN AFFIX LOW VERTICAL;Lo;0;L;;;;;N;;;;; +1BC99;DUPLOYAN AFFIX LOW ARROW;Lo;0;L;;;;;N;;;;; +1BC9C;DUPLOYAN SIGN O WITH CROSS;So;0;L;;;;;N;;;;; +1BC9D;DUPLOYAN THICK LETTER SELECTOR;Mn;0;NSM;;;;;N;;;;; +1BC9E;DUPLOYAN DOUBLE MARK;Mn;1;NSM;;;;;N;;;;; +1BC9F;DUPLOYAN PUNCTUATION CHINOOK FULL STOP;Po;0;L;;;;;N;;;;; +1BCA0;SHORTHAND FORMAT LETTER OVERLAP;Cf;0;BN;;;;;N;;;;; +1BCA1;SHORTHAND FORMAT CONTINUING OVERLAP;Cf;0;BN;;;;;N;;;;; +1BCA2;SHORTHAND FORMAT DOWN STEP;Cf;0;BN;;;;;N;;;;; +1BCA3;SHORTHAND FORMAT UP STEP;Cf;0;BN;;;;;N;;;;; +1D000;BYZANTINE MUSICAL SYMBOL PSILI;So;0;L;;;;;N;;;;; +1D001;BYZANTINE MUSICAL SYMBOL DASEIA;So;0;L;;;;;N;;;;; +1D002;BYZANTINE MUSICAL SYMBOL PERISPOMENI;So;0;L;;;;;N;;;;; +1D003;BYZANTINE MUSICAL SYMBOL OXEIA EKFONITIKON;So;0;L;;;;;N;;;;; +1D004;BYZANTINE MUSICAL SYMBOL OXEIA DIPLI;So;0;L;;;;;N;;;;; +1D005;BYZANTINE MUSICAL SYMBOL VAREIA EKFONITIKON;So;0;L;;;;;N;;;;; +1D006;BYZANTINE MUSICAL SYMBOL VAREIA DIPLI;So;0;L;;;;;N;;;;; +1D007;BYZANTINE MUSICAL SYMBOL KATHISTI;So;0;L;;;;;N;;;;; +1D008;BYZANTINE MUSICAL SYMBOL SYRMATIKI;So;0;L;;;;;N;;;;; +1D009;BYZANTINE MUSICAL SYMBOL PARAKLITIKI;So;0;L;;;;;N;;;;; +1D00A;BYZANTINE MUSICAL SYMBOL YPOKRISIS;So;0;L;;;;;N;;;;; +1D00B;BYZANTINE MUSICAL SYMBOL YPOKRISIS DIPLI;So;0;L;;;;;N;;;;; +1D00C;BYZANTINE MUSICAL SYMBOL KREMASTI;So;0;L;;;;;N;;;;; +1D00D;BYZANTINE MUSICAL SYMBOL APESO EKFONITIKON;So;0;L;;;;;N;;;;; +1D00E;BYZANTINE MUSICAL SYMBOL EXO EKFONITIKON;So;0;L;;;;;N;;;;; +1D00F;BYZANTINE MUSICAL SYMBOL TELEIA;So;0;L;;;;;N;;;;; +1D010;BYZANTINE MUSICAL SYMBOL KENTIMATA;So;0;L;;;;;N;;;;; +1D011;BYZANTINE MUSICAL SYMBOL APOSTROFOS;So;0;L;;;;;N;;;;; +1D012;BYZANTINE MUSICAL SYMBOL APOSTROFOS DIPLI;So;0;L;;;;;N;;;;; +1D013;BYZANTINE MUSICAL SYMBOL SYNEVMA;So;0;L;;;;;N;;;;; +1D014;BYZANTINE MUSICAL SYMBOL THITA;So;0;L;;;;;N;;;;; +1D015;BYZANTINE MUSICAL SYMBOL OLIGON ARCHAION;So;0;L;;;;;N;;;;; +1D016;BYZANTINE MUSICAL SYMBOL GORGON ARCHAION;So;0;L;;;;;N;;;;; +1D017;BYZANTINE MUSICAL SYMBOL PSILON;So;0;L;;;;;N;;;;; +1D018;BYZANTINE MUSICAL SYMBOL CHAMILON;So;0;L;;;;;N;;;;; +1D019;BYZANTINE MUSICAL SYMBOL VATHY;So;0;L;;;;;N;;;;; +1D01A;BYZANTINE MUSICAL SYMBOL ISON ARCHAION;So;0;L;;;;;N;;;;; +1D01B;BYZANTINE MUSICAL SYMBOL KENTIMA ARCHAION;So;0;L;;;;;N;;;;; +1D01C;BYZANTINE MUSICAL SYMBOL KENTIMATA ARCHAION;So;0;L;;;;;N;;;;; +1D01D;BYZANTINE MUSICAL SYMBOL SAXIMATA;So;0;L;;;;;N;;;;; +1D01E;BYZANTINE MUSICAL SYMBOL PARICHON;So;0;L;;;;;N;;;;; +1D01F;BYZANTINE MUSICAL SYMBOL STAVROS APODEXIA;So;0;L;;;;;N;;;;; +1D020;BYZANTINE MUSICAL SYMBOL OXEIAI ARCHAION;So;0;L;;;;;N;;;;; +1D021;BYZANTINE MUSICAL SYMBOL VAREIAI ARCHAION;So;0;L;;;;;N;;;;; +1D022;BYZANTINE MUSICAL SYMBOL APODERMA ARCHAION;So;0;L;;;;;N;;;;; +1D023;BYZANTINE MUSICAL SYMBOL APOTHEMA;So;0;L;;;;;N;;;;; +1D024;BYZANTINE MUSICAL SYMBOL KLASMA;So;0;L;;;;;N;;;;; +1D025;BYZANTINE MUSICAL SYMBOL REVMA;So;0;L;;;;;N;;;;; +1D026;BYZANTINE MUSICAL SYMBOL PIASMA ARCHAION;So;0;L;;;;;N;;;;; +1D027;BYZANTINE MUSICAL SYMBOL TINAGMA;So;0;L;;;;;N;;;;; +1D028;BYZANTINE MUSICAL SYMBOL ANATRICHISMA;So;0;L;;;;;N;;;;; +1D029;BYZANTINE MUSICAL SYMBOL SEISMA;So;0;L;;;;;N;;;;; +1D02A;BYZANTINE MUSICAL SYMBOL SYNAGMA ARCHAION;So;0;L;;;;;N;;;;; +1D02B;BYZANTINE MUSICAL SYMBOL SYNAGMA META STAVROU;So;0;L;;;;;N;;;;; +1D02C;BYZANTINE MUSICAL SYMBOL OYRANISMA ARCHAION;So;0;L;;;;;N;;;;; +1D02D;BYZANTINE MUSICAL SYMBOL THEMA;So;0;L;;;;;N;;;;; +1D02E;BYZANTINE MUSICAL SYMBOL LEMOI;So;0;L;;;;;N;;;;; +1D02F;BYZANTINE MUSICAL SYMBOL DYO;So;0;L;;;;;N;;;;; +1D030;BYZANTINE MUSICAL SYMBOL TRIA;So;0;L;;;;;N;;;;; +1D031;BYZANTINE MUSICAL SYMBOL TESSERA;So;0;L;;;;;N;;;;; +1D032;BYZANTINE MUSICAL SYMBOL KRATIMATA;So;0;L;;;;;N;;;;; +1D033;BYZANTINE MUSICAL SYMBOL APESO EXO NEO;So;0;L;;;;;N;;;;; +1D034;BYZANTINE MUSICAL SYMBOL FTHORA ARCHAION;So;0;L;;;;;N;;;;; +1D035;BYZANTINE MUSICAL SYMBOL IMIFTHORA;So;0;L;;;;;N;;;;; +1D036;BYZANTINE MUSICAL SYMBOL TROMIKON ARCHAION;So;0;L;;;;;N;;;;; +1D037;BYZANTINE MUSICAL SYMBOL KATAVA TROMIKON;So;0;L;;;;;N;;;;; +1D038;BYZANTINE MUSICAL SYMBOL PELASTON;So;0;L;;;;;N;;;;; +1D039;BYZANTINE MUSICAL SYMBOL PSIFISTON;So;0;L;;;;;N;;;;; +1D03A;BYZANTINE MUSICAL SYMBOL KONTEVMA;So;0;L;;;;;N;;;;; +1D03B;BYZANTINE MUSICAL SYMBOL CHOREVMA ARCHAION;So;0;L;;;;;N;;;;; +1D03C;BYZANTINE MUSICAL SYMBOL RAPISMA;So;0;L;;;;;N;;;;; +1D03D;BYZANTINE MUSICAL SYMBOL PARAKALESMA ARCHAION;So;0;L;;;;;N;;;;; +1D03E;BYZANTINE MUSICAL SYMBOL PARAKLITIKI ARCHAION;So;0;L;;;;;N;;;;; +1D03F;BYZANTINE MUSICAL SYMBOL ICHADIN;So;0;L;;;;;N;;;;; +1D040;BYZANTINE MUSICAL SYMBOL NANA;So;0;L;;;;;N;;;;; +1D041;BYZANTINE MUSICAL SYMBOL PETASMA;So;0;L;;;;;N;;;;; +1D042;BYZANTINE MUSICAL SYMBOL KONTEVMA ALLO;So;0;L;;;;;N;;;;; +1D043;BYZANTINE MUSICAL SYMBOL TROMIKON ALLO;So;0;L;;;;;N;;;;; +1D044;BYZANTINE MUSICAL SYMBOL STRAGGISMATA;So;0;L;;;;;N;;;;; +1D045;BYZANTINE MUSICAL SYMBOL GRONTHISMATA;So;0;L;;;;;N;;;;; +1D046;BYZANTINE MUSICAL SYMBOL ISON NEO;So;0;L;;;;;N;;;;; +1D047;BYZANTINE MUSICAL SYMBOL OLIGON NEO;So;0;L;;;;;N;;;;; +1D048;BYZANTINE MUSICAL SYMBOL OXEIA NEO;So;0;L;;;;;N;;;;; +1D049;BYZANTINE MUSICAL SYMBOL PETASTI;So;0;L;;;;;N;;;;; +1D04A;BYZANTINE MUSICAL SYMBOL KOUFISMA;So;0;L;;;;;N;;;;; +1D04B;BYZANTINE MUSICAL SYMBOL PETASTOKOUFISMA;So;0;L;;;;;N;;;;; +1D04C;BYZANTINE MUSICAL SYMBOL KRATIMOKOUFISMA;So;0;L;;;;;N;;;;; +1D04D;BYZANTINE MUSICAL SYMBOL PELASTON NEO;So;0;L;;;;;N;;;;; +1D04E;BYZANTINE MUSICAL SYMBOL KENTIMATA NEO ANO;So;0;L;;;;;N;;;;; +1D04F;BYZANTINE MUSICAL SYMBOL KENTIMA NEO ANO;So;0;L;;;;;N;;;;; +1D050;BYZANTINE MUSICAL SYMBOL YPSILI;So;0;L;;;;;N;;;;; +1D051;BYZANTINE MUSICAL SYMBOL APOSTROFOS NEO;So;0;L;;;;;N;;;;; +1D052;BYZANTINE MUSICAL SYMBOL APOSTROFOI SYNDESMOS NEO;So;0;L;;;;;N;;;;; +1D053;BYZANTINE MUSICAL SYMBOL YPORROI;So;0;L;;;;;N;;;;; +1D054;BYZANTINE MUSICAL SYMBOL KRATIMOYPORROON;So;0;L;;;;;N;;;;; +1D055;BYZANTINE MUSICAL SYMBOL ELAFRON;So;0;L;;;;;N;;;;; +1D056;BYZANTINE MUSICAL SYMBOL CHAMILI;So;0;L;;;;;N;;;;; +1D057;BYZANTINE MUSICAL SYMBOL MIKRON ISON;So;0;L;;;;;N;;;;; +1D058;BYZANTINE MUSICAL SYMBOL VAREIA NEO;So;0;L;;;;;N;;;;; +1D059;BYZANTINE MUSICAL SYMBOL PIASMA NEO;So;0;L;;;;;N;;;;; +1D05A;BYZANTINE MUSICAL SYMBOL PSIFISTON NEO;So;0;L;;;;;N;;;;; +1D05B;BYZANTINE MUSICAL SYMBOL OMALON;So;0;L;;;;;N;;;;; +1D05C;BYZANTINE MUSICAL SYMBOL ANTIKENOMA;So;0;L;;;;;N;;;;; +1D05D;BYZANTINE MUSICAL SYMBOL LYGISMA;So;0;L;;;;;N;;;;; +1D05E;BYZANTINE MUSICAL SYMBOL PARAKLITIKI NEO;So;0;L;;;;;N;;;;; +1D05F;BYZANTINE MUSICAL SYMBOL PARAKALESMA NEO;So;0;L;;;;;N;;;;; +1D060;BYZANTINE MUSICAL SYMBOL ETERON PARAKALESMA;So;0;L;;;;;N;;;;; +1D061;BYZANTINE MUSICAL SYMBOL KYLISMA;So;0;L;;;;;N;;;;; +1D062;BYZANTINE MUSICAL SYMBOL ANTIKENOKYLISMA;So;0;L;;;;;N;;;;; +1D063;BYZANTINE MUSICAL SYMBOL TROMIKON NEO;So;0;L;;;;;N;;;;; +1D064;BYZANTINE MUSICAL SYMBOL EKSTREPTON;So;0;L;;;;;N;;;;; +1D065;BYZANTINE MUSICAL SYMBOL SYNAGMA NEO;So;0;L;;;;;N;;;;; +1D066;BYZANTINE MUSICAL SYMBOL SYRMA;So;0;L;;;;;N;;;;; +1D067;BYZANTINE MUSICAL SYMBOL CHOREVMA NEO;So;0;L;;;;;N;;;;; +1D068;BYZANTINE MUSICAL SYMBOL EPEGERMA;So;0;L;;;;;N;;;;; +1D069;BYZANTINE MUSICAL SYMBOL SEISMA NEO;So;0;L;;;;;N;;;;; +1D06A;BYZANTINE MUSICAL SYMBOL XIRON KLASMA;So;0;L;;;;;N;;;;; +1D06B;BYZANTINE MUSICAL SYMBOL TROMIKOPSIFISTON;So;0;L;;;;;N;;;;; +1D06C;BYZANTINE MUSICAL SYMBOL PSIFISTOLYGISMA;So;0;L;;;;;N;;;;; +1D06D;BYZANTINE MUSICAL SYMBOL TROMIKOLYGISMA;So;0;L;;;;;N;;;;; +1D06E;BYZANTINE MUSICAL SYMBOL TROMIKOPARAKALESMA;So;0;L;;;;;N;;;;; +1D06F;BYZANTINE MUSICAL SYMBOL PSIFISTOPARAKALESMA;So;0;L;;;;;N;;;;; +1D070;BYZANTINE MUSICAL SYMBOL TROMIKOSYNAGMA;So;0;L;;;;;N;;;;; +1D071;BYZANTINE MUSICAL SYMBOL PSIFISTOSYNAGMA;So;0;L;;;;;N;;;;; +1D072;BYZANTINE MUSICAL SYMBOL GORGOSYNTHETON;So;0;L;;;;;N;;;;; +1D073;BYZANTINE MUSICAL SYMBOL ARGOSYNTHETON;So;0;L;;;;;N;;;;; +1D074;BYZANTINE MUSICAL SYMBOL ETERON ARGOSYNTHETON;So;0;L;;;;;N;;;;; +1D075;BYZANTINE MUSICAL SYMBOL OYRANISMA NEO;So;0;L;;;;;N;;;;; +1D076;BYZANTINE MUSICAL SYMBOL THEMATISMOS ESO;So;0;L;;;;;N;;;;; +1D077;BYZANTINE MUSICAL SYMBOL THEMATISMOS EXO;So;0;L;;;;;N;;;;; +1D078;BYZANTINE MUSICAL SYMBOL THEMA APLOUN;So;0;L;;;;;N;;;;; +1D079;BYZANTINE MUSICAL SYMBOL THES KAI APOTHES;So;0;L;;;;;N;;;;; +1D07A;BYZANTINE MUSICAL SYMBOL KATAVASMA;So;0;L;;;;;N;;;;; +1D07B;BYZANTINE MUSICAL SYMBOL ENDOFONON;So;0;L;;;;;N;;;;; +1D07C;BYZANTINE MUSICAL SYMBOL YFEN KATO;So;0;L;;;;;N;;;;; +1D07D;BYZANTINE MUSICAL SYMBOL YFEN ANO;So;0;L;;;;;N;;;;; +1D07E;BYZANTINE MUSICAL SYMBOL STAVROS;So;0;L;;;;;N;;;;; +1D07F;BYZANTINE MUSICAL SYMBOL KLASMA ANO;So;0;L;;;;;N;;;;; +1D080;BYZANTINE MUSICAL SYMBOL DIPLI ARCHAION;So;0;L;;;;;N;;;;; +1D081;BYZANTINE MUSICAL SYMBOL KRATIMA ARCHAION;So;0;L;;;;;N;;;;; +1D082;BYZANTINE MUSICAL SYMBOL KRATIMA ALLO;So;0;L;;;;;N;;;;; +1D083;BYZANTINE MUSICAL SYMBOL KRATIMA NEO;So;0;L;;;;;N;;;;; +1D084;BYZANTINE MUSICAL SYMBOL APODERMA NEO;So;0;L;;;;;N;;;;; +1D085;BYZANTINE MUSICAL SYMBOL APLI;So;0;L;;;;;N;;;;; +1D086;BYZANTINE MUSICAL SYMBOL DIPLI;So;0;L;;;;;N;;;;; +1D087;BYZANTINE MUSICAL SYMBOL TRIPLI;So;0;L;;;;;N;;;;; +1D088;BYZANTINE MUSICAL SYMBOL TETRAPLI;So;0;L;;;;;N;;;;; +1D089;BYZANTINE MUSICAL SYMBOL KORONIS;So;0;L;;;;;N;;;;; +1D08A;BYZANTINE MUSICAL SYMBOL LEIMMA ENOS CHRONOU;So;0;L;;;;;N;;;;; +1D08B;BYZANTINE MUSICAL SYMBOL LEIMMA DYO CHRONON;So;0;L;;;;;N;;;;; +1D08C;BYZANTINE MUSICAL SYMBOL LEIMMA TRION CHRONON;So;0;L;;;;;N;;;;; +1D08D;BYZANTINE MUSICAL SYMBOL LEIMMA TESSARON CHRONON;So;0;L;;;;;N;;;;; +1D08E;BYZANTINE MUSICAL SYMBOL LEIMMA IMISEOS CHRONOU;So;0;L;;;;;N;;;;; +1D08F;BYZANTINE MUSICAL SYMBOL GORGON NEO ANO;So;0;L;;;;;N;;;;; +1D090;BYZANTINE MUSICAL SYMBOL GORGON PARESTIGMENON ARISTERA;So;0;L;;;;;N;;;;; +1D091;BYZANTINE MUSICAL SYMBOL GORGON PARESTIGMENON DEXIA;So;0;L;;;;;N;;;;; +1D092;BYZANTINE MUSICAL SYMBOL DIGORGON;So;0;L;;;;;N;;;;; +1D093;BYZANTINE MUSICAL SYMBOL DIGORGON PARESTIGMENON ARISTERA KATO;So;0;L;;;;;N;;;;; +1D094;BYZANTINE MUSICAL SYMBOL DIGORGON PARESTIGMENON ARISTERA ANO;So;0;L;;;;;N;;;;; +1D095;BYZANTINE MUSICAL SYMBOL DIGORGON PARESTIGMENON DEXIA;So;0;L;;;;;N;;;;; +1D096;BYZANTINE MUSICAL SYMBOL TRIGORGON;So;0;L;;;;;N;;;;; +1D097;BYZANTINE MUSICAL SYMBOL ARGON;So;0;L;;;;;N;;;;; +1D098;BYZANTINE MUSICAL SYMBOL IMIDIARGON;So;0;L;;;;;N;;;;; +1D099;BYZANTINE MUSICAL SYMBOL DIARGON;So;0;L;;;;;N;;;;; +1D09A;BYZANTINE MUSICAL SYMBOL AGOGI POLI ARGI;So;0;L;;;;;N;;;;; +1D09B;BYZANTINE MUSICAL SYMBOL AGOGI ARGOTERI;So;0;L;;;;;N;;;;; +1D09C;BYZANTINE MUSICAL SYMBOL AGOGI ARGI;So;0;L;;;;;N;;;;; +1D09D;BYZANTINE MUSICAL SYMBOL AGOGI METRIA;So;0;L;;;;;N;;;;; +1D09E;BYZANTINE MUSICAL SYMBOL AGOGI MESI;So;0;L;;;;;N;;;;; +1D09F;BYZANTINE MUSICAL SYMBOL AGOGI GORGI;So;0;L;;;;;N;;;;; +1D0A0;BYZANTINE MUSICAL SYMBOL AGOGI GORGOTERI;So;0;L;;;;;N;;;;; +1D0A1;BYZANTINE MUSICAL SYMBOL AGOGI POLI GORGI;So;0;L;;;;;N;;;;; +1D0A2;BYZANTINE MUSICAL SYMBOL MARTYRIA PROTOS ICHOS;So;0;L;;;;;N;;;;; +1D0A3;BYZANTINE MUSICAL SYMBOL MARTYRIA ALLI PROTOS ICHOS;So;0;L;;;;;N;;;;; +1D0A4;BYZANTINE MUSICAL SYMBOL MARTYRIA DEYTEROS ICHOS;So;0;L;;;;;N;;;;; +1D0A5;BYZANTINE MUSICAL SYMBOL MARTYRIA ALLI DEYTEROS ICHOS;So;0;L;;;;;N;;;;; +1D0A6;BYZANTINE MUSICAL SYMBOL MARTYRIA TRITOS ICHOS;So;0;L;;;;;N;;;;; +1D0A7;BYZANTINE MUSICAL SYMBOL MARTYRIA TRIFONIAS;So;0;L;;;;;N;;;;; +1D0A8;BYZANTINE MUSICAL SYMBOL MARTYRIA TETARTOS ICHOS;So;0;L;;;;;N;;;;; +1D0A9;BYZANTINE MUSICAL SYMBOL MARTYRIA TETARTOS LEGETOS ICHOS;So;0;L;;;;;N;;;;; +1D0AA;BYZANTINE MUSICAL SYMBOL MARTYRIA LEGETOS ICHOS;So;0;L;;;;;N;;;;; +1D0AB;BYZANTINE MUSICAL SYMBOL MARTYRIA PLAGIOS ICHOS;So;0;L;;;;;N;;;;; +1D0AC;BYZANTINE MUSICAL SYMBOL ISAKIA TELOUS ICHIMATOS;So;0;L;;;;;N;;;;; +1D0AD;BYZANTINE MUSICAL SYMBOL APOSTROFOI TELOUS ICHIMATOS;So;0;L;;;;;N;;;;; +1D0AE;BYZANTINE MUSICAL SYMBOL FANEROSIS TETRAFONIAS;So;0;L;;;;;N;;;;; +1D0AF;BYZANTINE MUSICAL SYMBOL FANEROSIS MONOFONIAS;So;0;L;;;;;N;;;;; +1D0B0;BYZANTINE MUSICAL SYMBOL FANEROSIS DIFONIAS;So;0;L;;;;;N;;;;; +1D0B1;BYZANTINE MUSICAL SYMBOL MARTYRIA VARYS ICHOS;So;0;L;;;;;N;;;;; +1D0B2;BYZANTINE MUSICAL SYMBOL MARTYRIA PROTOVARYS ICHOS;So;0;L;;;;;N;;;;; +1D0B3;BYZANTINE MUSICAL SYMBOL MARTYRIA PLAGIOS TETARTOS ICHOS;So;0;L;;;;;N;;;;; +1D0B4;BYZANTINE MUSICAL SYMBOL GORTHMIKON N APLOUN;So;0;L;;;;;N;;;;; +1D0B5;BYZANTINE MUSICAL SYMBOL GORTHMIKON N DIPLOUN;So;0;L;;;;;N;;;;; +1D0B6;BYZANTINE MUSICAL SYMBOL ENARXIS KAI FTHORA VOU;So;0;L;;;;;N;;;;; +1D0B7;BYZANTINE MUSICAL SYMBOL IMIFONON;So;0;L;;;;;N;;;;; +1D0B8;BYZANTINE MUSICAL SYMBOL IMIFTHORON;So;0;L;;;;;N;;;;; +1D0B9;BYZANTINE MUSICAL SYMBOL FTHORA ARCHAION DEYTEROU ICHOU;So;0;L;;;;;N;;;;; +1D0BA;BYZANTINE MUSICAL SYMBOL FTHORA DIATONIKI PA;So;0;L;;;;;N;;;;; +1D0BB;BYZANTINE MUSICAL SYMBOL FTHORA DIATONIKI NANA;So;0;L;;;;;N;;;;; +1D0BC;BYZANTINE MUSICAL SYMBOL FTHORA NAOS ICHOS;So;0;L;;;;;N;;;;; +1D0BD;BYZANTINE MUSICAL SYMBOL FTHORA DIATONIKI DI;So;0;L;;;;;N;;;;; +1D0BE;BYZANTINE MUSICAL SYMBOL FTHORA SKLIRON DIATONON DI;So;0;L;;;;;N;;;;; +1D0BF;BYZANTINE MUSICAL SYMBOL FTHORA DIATONIKI KE;So;0;L;;;;;N;;;;; +1D0C0;BYZANTINE MUSICAL SYMBOL FTHORA DIATONIKI ZO;So;0;L;;;;;N;;;;; +1D0C1;BYZANTINE MUSICAL SYMBOL FTHORA DIATONIKI NI KATO;So;0;L;;;;;N;;;;; +1D0C2;BYZANTINE MUSICAL SYMBOL FTHORA DIATONIKI NI ANO;So;0;L;;;;;N;;;;; +1D0C3;BYZANTINE MUSICAL SYMBOL FTHORA MALAKON CHROMA DIFONIAS;So;0;L;;;;;N;;;;; +1D0C4;BYZANTINE MUSICAL SYMBOL FTHORA MALAKON CHROMA MONOFONIAS;So;0;L;;;;;N;;;;; +1D0C5;BYZANTINE MUSICAL SYMBOL FHTORA SKLIRON CHROMA VASIS;So;0;L;;;;;N;;;;; +1D0C6;BYZANTINE MUSICAL SYMBOL FTHORA SKLIRON CHROMA SYNAFI;So;0;L;;;;;N;;;;; +1D0C7;BYZANTINE MUSICAL SYMBOL FTHORA NENANO;So;0;L;;;;;N;;;;; +1D0C8;BYZANTINE MUSICAL SYMBOL CHROA ZYGOS;So;0;L;;;;;N;;;;; +1D0C9;BYZANTINE MUSICAL SYMBOL CHROA KLITON;So;0;L;;;;;N;;;;; +1D0CA;BYZANTINE MUSICAL SYMBOL CHROA SPATHI;So;0;L;;;;;N;;;;; +1D0CB;BYZANTINE MUSICAL SYMBOL FTHORA I YFESIS TETARTIMORION;So;0;L;;;;;N;;;;; +1D0CC;BYZANTINE MUSICAL SYMBOL FTHORA ENARMONIOS ANTIFONIA;So;0;L;;;;;N;;;;; +1D0CD;BYZANTINE MUSICAL SYMBOL YFESIS TRITIMORION;So;0;L;;;;;N;;;;; +1D0CE;BYZANTINE MUSICAL SYMBOL DIESIS TRITIMORION;So;0;L;;;;;N;;;;; +1D0CF;BYZANTINE MUSICAL SYMBOL DIESIS TETARTIMORION;So;0;L;;;;;N;;;;; +1D0D0;BYZANTINE MUSICAL SYMBOL DIESIS APLI DYO DODEKATA;So;0;L;;;;;N;;;;; +1D0D1;BYZANTINE MUSICAL SYMBOL DIESIS MONOGRAMMOS TESSERA DODEKATA;So;0;L;;;;;N;;;;; +1D0D2;BYZANTINE MUSICAL SYMBOL DIESIS DIGRAMMOS EX DODEKATA;So;0;L;;;;;N;;;;; +1D0D3;BYZANTINE MUSICAL SYMBOL DIESIS TRIGRAMMOS OKTO DODEKATA;So;0;L;;;;;N;;;;; +1D0D4;BYZANTINE MUSICAL SYMBOL YFESIS APLI DYO DODEKATA;So;0;L;;;;;N;;;;; +1D0D5;BYZANTINE MUSICAL SYMBOL YFESIS MONOGRAMMOS TESSERA DODEKATA;So;0;L;;;;;N;;;;; +1D0D6;BYZANTINE MUSICAL SYMBOL YFESIS DIGRAMMOS EX DODEKATA;So;0;L;;;;;N;;;;; +1D0D7;BYZANTINE MUSICAL SYMBOL YFESIS TRIGRAMMOS OKTO DODEKATA;So;0;L;;;;;N;;;;; +1D0D8;BYZANTINE MUSICAL SYMBOL GENIKI DIESIS;So;0;L;;;;;N;;;;; +1D0D9;BYZANTINE MUSICAL SYMBOL GENIKI YFESIS;So;0;L;;;;;N;;;;; +1D0DA;BYZANTINE MUSICAL SYMBOL DIASTOLI APLI MIKRI;So;0;L;;;;;N;;;;; +1D0DB;BYZANTINE MUSICAL SYMBOL DIASTOLI APLI MEGALI;So;0;L;;;;;N;;;;; +1D0DC;BYZANTINE MUSICAL SYMBOL DIASTOLI DIPLI;So;0;L;;;;;N;;;;; +1D0DD;BYZANTINE MUSICAL SYMBOL DIASTOLI THESEOS;So;0;L;;;;;N;;;;; +1D0DE;BYZANTINE MUSICAL SYMBOL SIMANSIS THESEOS;So;0;L;;;;;N;;;;; +1D0DF;BYZANTINE MUSICAL SYMBOL SIMANSIS THESEOS DISIMOU;So;0;L;;;;;N;;;;; +1D0E0;BYZANTINE MUSICAL SYMBOL SIMANSIS THESEOS TRISIMOU;So;0;L;;;;;N;;;;; +1D0E1;BYZANTINE MUSICAL SYMBOL SIMANSIS THESEOS TETRASIMOU;So;0;L;;;;;N;;;;; +1D0E2;BYZANTINE MUSICAL SYMBOL SIMANSIS ARSEOS;So;0;L;;;;;N;;;;; +1D0E3;BYZANTINE MUSICAL SYMBOL SIMANSIS ARSEOS DISIMOU;So;0;L;;;;;N;;;;; +1D0E4;BYZANTINE MUSICAL SYMBOL SIMANSIS ARSEOS TRISIMOU;So;0;L;;;;;N;;;;; +1D0E5;BYZANTINE MUSICAL SYMBOL SIMANSIS ARSEOS TETRASIMOU;So;0;L;;;;;N;;;;; +1D0E6;BYZANTINE MUSICAL SYMBOL DIGRAMMA GG;So;0;L;;;;;N;;;;; +1D0E7;BYZANTINE MUSICAL SYMBOL DIFTOGGOS OU;So;0;L;;;;;N;;;;; +1D0E8;BYZANTINE MUSICAL SYMBOL STIGMA;So;0;L;;;;;N;;;;; +1D0E9;BYZANTINE MUSICAL SYMBOL ARKTIKO PA;So;0;L;;;;;N;;;;; +1D0EA;BYZANTINE MUSICAL SYMBOL ARKTIKO VOU;So;0;L;;;;;N;;;;; +1D0EB;BYZANTINE MUSICAL SYMBOL ARKTIKO GA;So;0;L;;;;;N;;;;; +1D0EC;BYZANTINE MUSICAL SYMBOL ARKTIKO DI;So;0;L;;;;;N;;;;; +1D0ED;BYZANTINE MUSICAL SYMBOL ARKTIKO KE;So;0;L;;;;;N;;;;; +1D0EE;BYZANTINE MUSICAL SYMBOL ARKTIKO ZO;So;0;L;;;;;N;;;;; +1D0EF;BYZANTINE MUSICAL SYMBOL ARKTIKO NI;So;0;L;;;;;N;;;;; +1D0F0;BYZANTINE MUSICAL SYMBOL KENTIMATA NEO MESO;So;0;L;;;;;N;;;;; +1D0F1;BYZANTINE MUSICAL SYMBOL KENTIMA NEO MESO;So;0;L;;;;;N;;;;; +1D0F2;BYZANTINE MUSICAL SYMBOL KENTIMATA NEO KATO;So;0;L;;;;;N;;;;; +1D0F3;BYZANTINE MUSICAL SYMBOL KENTIMA NEO KATO;So;0;L;;;;;N;;;;; +1D0F4;BYZANTINE MUSICAL SYMBOL KLASMA KATO;So;0;L;;;;;N;;;;; +1D0F5;BYZANTINE MUSICAL SYMBOL GORGON NEO KATO;So;0;L;;;;;N;;;;; +1D100;MUSICAL SYMBOL SINGLE BARLINE;So;0;L;;;;;N;;;;; +1D101;MUSICAL SYMBOL DOUBLE BARLINE;So;0;L;;;;;N;;;;; +1D102;MUSICAL SYMBOL FINAL BARLINE;So;0;L;;;;;N;;;;; +1D103;MUSICAL SYMBOL REVERSE FINAL BARLINE;So;0;L;;;;;N;;;;; +1D104;MUSICAL SYMBOL DASHED BARLINE;So;0;L;;;;;N;;;;; +1D105;MUSICAL SYMBOL SHORT BARLINE;So;0;L;;;;;N;;;;; +1D106;MUSICAL SYMBOL LEFT REPEAT SIGN;So;0;L;;;;;N;;;;; +1D107;MUSICAL SYMBOL RIGHT REPEAT SIGN;So;0;L;;;;;N;;;;; +1D108;MUSICAL SYMBOL REPEAT DOTS;So;0;L;;;;;N;;;;; +1D109;MUSICAL SYMBOL DAL SEGNO;So;0;L;;;;;N;;;;; +1D10A;MUSICAL SYMBOL DA CAPO;So;0;L;;;;;N;;;;; +1D10B;MUSICAL SYMBOL SEGNO;So;0;L;;;;;N;;;;; +1D10C;MUSICAL SYMBOL CODA;So;0;L;;;;;N;;;;; +1D10D;MUSICAL SYMBOL REPEATED FIGURE-1;So;0;L;;;;;N;;;;; +1D10E;MUSICAL SYMBOL REPEATED FIGURE-2;So;0;L;;;;;N;;;;; +1D10F;MUSICAL SYMBOL REPEATED FIGURE-3;So;0;L;;;;;N;;;;; +1D110;MUSICAL SYMBOL FERMATA;So;0;L;;;;;N;;;;; +1D111;MUSICAL SYMBOL FERMATA BELOW;So;0;L;;;;;N;;;;; +1D112;MUSICAL SYMBOL BREATH MARK;So;0;L;;;;;N;;;;; +1D113;MUSICAL SYMBOL CAESURA;So;0;L;;;;;N;;;;; +1D114;MUSICAL SYMBOL BRACE;So;0;L;;;;;N;;;;; +1D115;MUSICAL SYMBOL BRACKET;So;0;L;;;;;N;;;;; +1D116;MUSICAL SYMBOL ONE-LINE STAFF;So;0;L;;;;;N;;;;; +1D117;MUSICAL SYMBOL TWO-LINE STAFF;So;0;L;;;;;N;;;;; +1D118;MUSICAL SYMBOL THREE-LINE STAFF;So;0;L;;;;;N;;;;; +1D119;MUSICAL SYMBOL FOUR-LINE STAFF;So;0;L;;;;;N;;;;; +1D11A;MUSICAL SYMBOL FIVE-LINE STAFF;So;0;L;;;;;N;;;;; +1D11B;MUSICAL SYMBOL SIX-LINE STAFF;So;0;L;;;;;N;;;;; +1D11C;MUSICAL SYMBOL SIX-STRING FRETBOARD;So;0;L;;;;;N;;;;; +1D11D;MUSICAL SYMBOL FOUR-STRING FRETBOARD;So;0;L;;;;;N;;;;; +1D11E;MUSICAL SYMBOL G CLEF;So;0;L;;;;;N;;;;; +1D11F;MUSICAL SYMBOL G CLEF OTTAVA ALTA;So;0;L;;;;;N;;;;; +1D120;MUSICAL SYMBOL G CLEF OTTAVA BASSA;So;0;L;;;;;N;;;;; +1D121;MUSICAL SYMBOL C CLEF;So;0;L;;;;;N;;;;; +1D122;MUSICAL SYMBOL F CLEF;So;0;L;;;;;N;;;;; +1D123;MUSICAL SYMBOL F CLEF OTTAVA ALTA;So;0;L;;;;;N;;;;; +1D124;MUSICAL SYMBOL F CLEF OTTAVA BASSA;So;0;L;;;;;N;;;;; +1D125;MUSICAL SYMBOL DRUM CLEF-1;So;0;L;;;;;N;;;;; +1D126;MUSICAL SYMBOL DRUM CLEF-2;So;0;L;;;;;N;;;;; +1D129;MUSICAL SYMBOL MULTIPLE MEASURE REST;So;0;L;;;;;N;;;;; +1D12A;MUSICAL SYMBOL DOUBLE SHARP;So;0;L;;;;;N;;;;; +1D12B;MUSICAL SYMBOL DOUBLE FLAT;So;0;L;;;;;N;;;;; +1D12C;MUSICAL SYMBOL FLAT UP;So;0;L;;;;;N;;;;; +1D12D;MUSICAL SYMBOL FLAT DOWN;So;0;L;;;;;N;;;;; +1D12E;MUSICAL SYMBOL NATURAL UP;So;0;L;;;;;N;;;;; +1D12F;MUSICAL SYMBOL NATURAL DOWN;So;0;L;;;;;N;;;;; +1D130;MUSICAL SYMBOL SHARP UP;So;0;L;;;;;N;;;;; +1D131;MUSICAL SYMBOL SHARP DOWN;So;0;L;;;;;N;;;;; +1D132;MUSICAL SYMBOL QUARTER TONE SHARP;So;0;L;;;;;N;;;;; +1D133;MUSICAL SYMBOL QUARTER TONE FLAT;So;0;L;;;;;N;;;;; +1D134;MUSICAL SYMBOL COMMON TIME;So;0;L;;;;;N;;;;; +1D135;MUSICAL SYMBOL CUT TIME;So;0;L;;;;;N;;;;; +1D136;MUSICAL SYMBOL OTTAVA ALTA;So;0;L;;;;;N;;;;; +1D137;MUSICAL SYMBOL OTTAVA BASSA;So;0;L;;;;;N;;;;; +1D138;MUSICAL SYMBOL QUINDICESIMA ALTA;So;0;L;;;;;N;;;;; +1D139;MUSICAL SYMBOL QUINDICESIMA BASSA;So;0;L;;;;;N;;;;; +1D13A;MUSICAL SYMBOL MULTI REST;So;0;L;;;;;N;;;;; +1D13B;MUSICAL SYMBOL WHOLE REST;So;0;L;;;;;N;;;;; +1D13C;MUSICAL SYMBOL HALF REST;So;0;L;;;;;N;;;;; +1D13D;MUSICAL SYMBOL QUARTER REST;So;0;L;;;;;N;;;;; +1D13E;MUSICAL SYMBOL EIGHTH REST;So;0;L;;;;;N;;;;; +1D13F;MUSICAL SYMBOL SIXTEENTH REST;So;0;L;;;;;N;;;;; +1D140;MUSICAL SYMBOL THIRTY-SECOND REST;So;0;L;;;;;N;;;;; +1D141;MUSICAL SYMBOL SIXTY-FOURTH REST;So;0;L;;;;;N;;;;; +1D142;MUSICAL SYMBOL ONE HUNDRED TWENTY-EIGHTH REST;So;0;L;;;;;N;;;;; +1D143;MUSICAL SYMBOL X NOTEHEAD;So;0;L;;;;;N;;;;; +1D144;MUSICAL SYMBOL PLUS NOTEHEAD;So;0;L;;;;;N;;;;; +1D145;MUSICAL SYMBOL CIRCLE X NOTEHEAD;So;0;L;;;;;N;;;;; +1D146;MUSICAL SYMBOL SQUARE NOTEHEAD WHITE;So;0;L;;;;;N;;;;; +1D147;MUSICAL SYMBOL SQUARE NOTEHEAD BLACK;So;0;L;;;;;N;;;;; +1D148;MUSICAL SYMBOL TRIANGLE NOTEHEAD UP WHITE;So;0;L;;;;;N;;;;; +1D149;MUSICAL SYMBOL TRIANGLE NOTEHEAD UP BLACK;So;0;L;;;;;N;;;;; +1D14A;MUSICAL SYMBOL TRIANGLE NOTEHEAD LEFT WHITE;So;0;L;;;;;N;;;;; +1D14B;MUSICAL SYMBOL TRIANGLE NOTEHEAD LEFT BLACK;So;0;L;;;;;N;;;;; +1D14C;MUSICAL SYMBOL TRIANGLE NOTEHEAD RIGHT WHITE;So;0;L;;;;;N;;;;; +1D14D;MUSICAL SYMBOL TRIANGLE NOTEHEAD RIGHT BLACK;So;0;L;;;;;N;;;;; +1D14E;MUSICAL SYMBOL TRIANGLE NOTEHEAD DOWN WHITE;So;0;L;;;;;N;;;;; +1D14F;MUSICAL SYMBOL TRIANGLE NOTEHEAD DOWN BLACK;So;0;L;;;;;N;;;;; +1D150;MUSICAL SYMBOL TRIANGLE NOTEHEAD UP RIGHT WHITE;So;0;L;;;;;N;;;;; +1D151;MUSICAL SYMBOL TRIANGLE NOTEHEAD UP RIGHT BLACK;So;0;L;;;;;N;;;;; +1D152;MUSICAL SYMBOL MOON NOTEHEAD WHITE;So;0;L;;;;;N;;;;; +1D153;MUSICAL SYMBOL MOON NOTEHEAD BLACK;So;0;L;;;;;N;;;;; +1D154;MUSICAL SYMBOL TRIANGLE-ROUND NOTEHEAD DOWN WHITE;So;0;L;;;;;N;;;;; +1D155;MUSICAL SYMBOL TRIANGLE-ROUND NOTEHEAD DOWN BLACK;So;0;L;;;;;N;;;;; +1D156;MUSICAL SYMBOL PARENTHESIS NOTEHEAD;So;0;L;;;;;N;;;;; +1D157;MUSICAL SYMBOL VOID NOTEHEAD;So;0;L;;;;;N;;;;; +1D158;MUSICAL SYMBOL NOTEHEAD BLACK;So;0;L;;;;;N;;;;; +1D159;MUSICAL SYMBOL NULL NOTEHEAD;So;0;L;;;;;N;;;;; +1D15A;MUSICAL SYMBOL CLUSTER NOTEHEAD WHITE;So;0;L;;;;;N;;;;; +1D15B;MUSICAL SYMBOL CLUSTER NOTEHEAD BLACK;So;0;L;;;;;N;;;;; +1D15C;MUSICAL SYMBOL BREVE;So;0;L;;;;;N;;;;; +1D15D;MUSICAL SYMBOL WHOLE NOTE;So;0;L;;;;;N;;;;; +1D15E;MUSICAL SYMBOL HALF NOTE;So;0;L;1D157 1D165;;;;N;;;;; +1D15F;MUSICAL SYMBOL QUARTER NOTE;So;0;L;1D158 1D165;;;;N;;;;; +1D160;MUSICAL SYMBOL EIGHTH NOTE;So;0;L;1D15F 1D16E;;;;N;;;;; +1D161;MUSICAL SYMBOL SIXTEENTH NOTE;So;0;L;1D15F 1D16F;;;;N;;;;; +1D162;MUSICAL SYMBOL THIRTY-SECOND NOTE;So;0;L;1D15F 1D170;;;;N;;;;; +1D163;MUSICAL SYMBOL SIXTY-FOURTH NOTE;So;0;L;1D15F 1D171;;;;N;;;;; +1D164;MUSICAL SYMBOL ONE HUNDRED TWENTY-EIGHTH NOTE;So;0;L;1D15F 1D172;;;;N;;;;; +1D165;MUSICAL SYMBOL COMBINING STEM;Mc;216;L;;;;;N;;;;; +1D166;MUSICAL SYMBOL COMBINING SPRECHGESANG STEM;Mc;216;L;;;;;N;;;;; +1D167;MUSICAL SYMBOL COMBINING TREMOLO-1;Mn;1;NSM;;;;;N;;;;; +1D168;MUSICAL SYMBOL COMBINING TREMOLO-2;Mn;1;NSM;;;;;N;;;;; +1D169;MUSICAL SYMBOL COMBINING TREMOLO-3;Mn;1;NSM;;;;;N;;;;; +1D16A;MUSICAL SYMBOL FINGERED TREMOLO-1;So;0;L;;;;;N;;;;; +1D16B;MUSICAL SYMBOL FINGERED TREMOLO-2;So;0;L;;;;;N;;;;; +1D16C;MUSICAL SYMBOL FINGERED TREMOLO-3;So;0;L;;;;;N;;;;; +1D16D;MUSICAL SYMBOL COMBINING AUGMENTATION DOT;Mc;226;L;;;;;N;;;;; +1D16E;MUSICAL SYMBOL COMBINING FLAG-1;Mc;216;L;;;;;N;;;;; +1D16F;MUSICAL SYMBOL COMBINING FLAG-2;Mc;216;L;;;;;N;;;;; +1D170;MUSICAL SYMBOL COMBINING FLAG-3;Mc;216;L;;;;;N;;;;; +1D171;MUSICAL SYMBOL COMBINING FLAG-4;Mc;216;L;;;;;N;;;;; +1D172;MUSICAL SYMBOL COMBINING FLAG-5;Mc;216;L;;;;;N;;;;; +1D173;MUSICAL SYMBOL BEGIN BEAM;Cf;0;BN;;;;;N;;;;; +1D174;MUSICAL SYMBOL END BEAM;Cf;0;BN;;;;;N;;;;; +1D175;MUSICAL SYMBOL BEGIN TIE;Cf;0;BN;;;;;N;;;;; +1D176;MUSICAL SYMBOL END TIE;Cf;0;BN;;;;;N;;;;; +1D177;MUSICAL SYMBOL BEGIN SLUR;Cf;0;BN;;;;;N;;;;; +1D178;MUSICAL SYMBOL END SLUR;Cf;0;BN;;;;;N;;;;; +1D179;MUSICAL SYMBOL BEGIN PHRASE;Cf;0;BN;;;;;N;;;;; +1D17A;MUSICAL SYMBOL END PHRASE;Cf;0;BN;;;;;N;;;;; +1D17B;MUSICAL SYMBOL COMBINING ACCENT;Mn;220;NSM;;;;;N;;;;; +1D17C;MUSICAL SYMBOL COMBINING STACCATO;Mn;220;NSM;;;;;N;;;;; +1D17D;MUSICAL SYMBOL COMBINING TENUTO;Mn;220;NSM;;;;;N;;;;; +1D17E;MUSICAL SYMBOL COMBINING STACCATISSIMO;Mn;220;NSM;;;;;N;;;;; +1D17F;MUSICAL SYMBOL COMBINING MARCATO;Mn;220;NSM;;;;;N;;;;; +1D180;MUSICAL SYMBOL COMBINING MARCATO-STACCATO;Mn;220;NSM;;;;;N;;;;; +1D181;MUSICAL SYMBOL COMBINING ACCENT-STACCATO;Mn;220;NSM;;;;;N;;;;; +1D182;MUSICAL SYMBOL COMBINING LOURE;Mn;220;NSM;;;;;N;;;;; +1D183;MUSICAL SYMBOL ARPEGGIATO UP;So;0;L;;;;;N;;;;; +1D184;MUSICAL SYMBOL ARPEGGIATO DOWN;So;0;L;;;;;N;;;;; +1D185;MUSICAL SYMBOL COMBINING DOIT;Mn;230;NSM;;;;;N;;;;; +1D186;MUSICAL SYMBOL COMBINING RIP;Mn;230;NSM;;;;;N;;;;; +1D187;MUSICAL SYMBOL COMBINING FLIP;Mn;230;NSM;;;;;N;;;;; +1D188;MUSICAL SYMBOL COMBINING SMEAR;Mn;230;NSM;;;;;N;;;;; +1D189;MUSICAL SYMBOL COMBINING BEND;Mn;230;NSM;;;;;N;;;;; +1D18A;MUSICAL SYMBOL COMBINING DOUBLE TONGUE;Mn;220;NSM;;;;;N;;;;; +1D18B;MUSICAL SYMBOL COMBINING TRIPLE TONGUE;Mn;220;NSM;;;;;N;;;;; +1D18C;MUSICAL SYMBOL RINFORZANDO;So;0;L;;;;;N;;;;; +1D18D;MUSICAL SYMBOL SUBITO;So;0;L;;;;;N;;;;; +1D18E;MUSICAL SYMBOL Z;So;0;L;;;;;N;;;;; +1D18F;MUSICAL SYMBOL PIANO;So;0;L;;;;;N;;;;; +1D190;MUSICAL SYMBOL MEZZO;So;0;L;;;;;N;;;;; +1D191;MUSICAL SYMBOL FORTE;So;0;L;;;;;N;;;;; +1D192;MUSICAL SYMBOL CRESCENDO;So;0;L;;;;;N;;;;; +1D193;MUSICAL SYMBOL DECRESCENDO;So;0;L;;;;;N;;;;; +1D194;MUSICAL SYMBOL GRACE NOTE SLASH;So;0;L;;;;;N;;;;; +1D195;MUSICAL SYMBOL GRACE NOTE NO SLASH;So;0;L;;;;;N;;;;; +1D196;MUSICAL SYMBOL TR;So;0;L;;;;;N;;;;; +1D197;MUSICAL SYMBOL TURN;So;0;L;;;;;N;;;;; +1D198;MUSICAL SYMBOL INVERTED TURN;So;0;L;;;;;N;;;;; +1D199;MUSICAL SYMBOL TURN SLASH;So;0;L;;;;;N;;;;; +1D19A;MUSICAL SYMBOL TURN UP;So;0;L;;;;;N;;;;; +1D19B;MUSICAL SYMBOL ORNAMENT STROKE-1;So;0;L;;;;;N;;;;; +1D19C;MUSICAL SYMBOL ORNAMENT STROKE-2;So;0;L;;;;;N;;;;; +1D19D;MUSICAL SYMBOL ORNAMENT STROKE-3;So;0;L;;;;;N;;;;; +1D19E;MUSICAL SYMBOL ORNAMENT STROKE-4;So;0;L;;;;;N;;;;; +1D19F;MUSICAL SYMBOL ORNAMENT STROKE-5;So;0;L;;;;;N;;;;; +1D1A0;MUSICAL SYMBOL ORNAMENT STROKE-6;So;0;L;;;;;N;;;;; +1D1A1;MUSICAL SYMBOL ORNAMENT STROKE-7;So;0;L;;;;;N;;;;; +1D1A2;MUSICAL SYMBOL ORNAMENT STROKE-8;So;0;L;;;;;N;;;;; +1D1A3;MUSICAL SYMBOL ORNAMENT STROKE-9;So;0;L;;;;;N;;;;; +1D1A4;MUSICAL SYMBOL ORNAMENT STROKE-10;So;0;L;;;;;N;;;;; +1D1A5;MUSICAL SYMBOL ORNAMENT STROKE-11;So;0;L;;;;;N;;;;; +1D1A6;MUSICAL SYMBOL HAUPTSTIMME;So;0;L;;;;;N;;;;; +1D1A7;MUSICAL SYMBOL NEBENSTIMME;So;0;L;;;;;N;;;;; +1D1A8;MUSICAL SYMBOL END OF STIMME;So;0;L;;;;;N;;;;; +1D1A9;MUSICAL SYMBOL DEGREE SLASH;So;0;L;;;;;N;;;;; +1D1AA;MUSICAL SYMBOL COMBINING DOWN BOW;Mn;230;NSM;;;;;N;;;;; +1D1AB;MUSICAL SYMBOL COMBINING UP BOW;Mn;230;NSM;;;;;N;;;;; +1D1AC;MUSICAL SYMBOL COMBINING HARMONIC;Mn;230;NSM;;;;;N;;;;; +1D1AD;MUSICAL SYMBOL COMBINING SNAP PIZZICATO;Mn;230;NSM;;;;;N;;;;; +1D1AE;MUSICAL SYMBOL PEDAL MARK;So;0;L;;;;;N;;;;; +1D1AF;MUSICAL SYMBOL PEDAL UP MARK;So;0;L;;;;;N;;;;; +1D1B0;MUSICAL SYMBOL HALF PEDAL MARK;So;0;L;;;;;N;;;;; +1D1B1;MUSICAL SYMBOL GLISSANDO UP;So;0;L;;;;;N;;;;; +1D1B2;MUSICAL SYMBOL GLISSANDO DOWN;So;0;L;;;;;N;;;;; +1D1B3;MUSICAL SYMBOL WITH FINGERNAILS;So;0;L;;;;;N;;;;; +1D1B4;MUSICAL SYMBOL DAMP;So;0;L;;;;;N;;;;; +1D1B5;MUSICAL SYMBOL DAMP ALL;So;0;L;;;;;N;;;;; +1D1B6;MUSICAL SYMBOL MAXIMA;So;0;L;;;;;N;;;;; +1D1B7;MUSICAL SYMBOL LONGA;So;0;L;;;;;N;;;;; +1D1B8;MUSICAL SYMBOL BREVIS;So;0;L;;;;;N;;;;; +1D1B9;MUSICAL SYMBOL SEMIBREVIS WHITE;So;0;L;;;;;N;;;;; +1D1BA;MUSICAL SYMBOL SEMIBREVIS BLACK;So;0;L;;;;;N;;;;; +1D1BB;MUSICAL SYMBOL MINIMA;So;0;L;1D1B9 1D165;;;;N;;;;; +1D1BC;MUSICAL SYMBOL MINIMA BLACK;So;0;L;1D1BA 1D165;;;;N;;;;; +1D1BD;MUSICAL SYMBOL SEMIMINIMA WHITE;So;0;L;1D1BB 1D16E;;;;N;;;;; +1D1BE;MUSICAL SYMBOL SEMIMINIMA BLACK;So;0;L;1D1BC 1D16E;;;;N;;;;; +1D1BF;MUSICAL SYMBOL FUSA WHITE;So;0;L;1D1BB 1D16F;;;;N;;;;; +1D1C0;MUSICAL SYMBOL FUSA BLACK;So;0;L;1D1BC 1D16F;;;;N;;;;; +1D1C1;MUSICAL SYMBOL LONGA PERFECTA REST;So;0;L;;;;;N;;;;; +1D1C2;MUSICAL SYMBOL LONGA IMPERFECTA REST;So;0;L;;;;;N;;;;; +1D1C3;MUSICAL SYMBOL BREVIS REST;So;0;L;;;;;N;;;;; +1D1C4;MUSICAL SYMBOL SEMIBREVIS REST;So;0;L;;;;;N;;;;; +1D1C5;MUSICAL SYMBOL MINIMA REST;So;0;L;;;;;N;;;;; +1D1C6;MUSICAL SYMBOL SEMIMINIMA REST;So;0;L;;;;;N;;;;; +1D1C7;MUSICAL SYMBOL TEMPUS PERFECTUM CUM PROLATIONE PERFECTA;So;0;L;;;;;N;;;;; +1D1C8;MUSICAL SYMBOL TEMPUS PERFECTUM CUM PROLATIONE IMPERFECTA;So;0;L;;;;;N;;;;; +1D1C9;MUSICAL SYMBOL TEMPUS PERFECTUM CUM PROLATIONE PERFECTA DIMINUTION-1;So;0;L;;;;;N;;;;; +1D1CA;MUSICAL SYMBOL TEMPUS IMPERFECTUM CUM PROLATIONE PERFECTA;So;0;L;;;;;N;;;;; +1D1CB;MUSICAL SYMBOL TEMPUS IMPERFECTUM CUM PROLATIONE IMPERFECTA;So;0;L;;;;;N;;;;; +1D1CC;MUSICAL SYMBOL TEMPUS IMPERFECTUM CUM PROLATIONE IMPERFECTA DIMINUTION-1;So;0;L;;;;;N;;;;; +1D1CD;MUSICAL SYMBOL TEMPUS IMPERFECTUM CUM PROLATIONE IMPERFECTA DIMINUTION-2;So;0;L;;;;;N;;;;; +1D1CE;MUSICAL SYMBOL TEMPUS IMPERFECTUM CUM PROLATIONE IMPERFECTA DIMINUTION-3;So;0;L;;;;;N;;;;; +1D1CF;MUSICAL SYMBOL CROIX;So;0;L;;;;;N;;;;; +1D1D0;MUSICAL SYMBOL GREGORIAN C CLEF;So;0;L;;;;;N;;;;; +1D1D1;MUSICAL SYMBOL GREGORIAN F CLEF;So;0;L;;;;;N;;;;; +1D1D2;MUSICAL SYMBOL SQUARE B;So;0;L;;;;;N;;;;; +1D1D3;MUSICAL SYMBOL VIRGA;So;0;L;;;;;N;;;;; +1D1D4;MUSICAL SYMBOL PODATUS;So;0;L;;;;;N;;;;; +1D1D5;MUSICAL SYMBOL CLIVIS;So;0;L;;;;;N;;;;; +1D1D6;MUSICAL SYMBOL SCANDICUS;So;0;L;;;;;N;;;;; +1D1D7;MUSICAL SYMBOL CLIMACUS;So;0;L;;;;;N;;;;; +1D1D8;MUSICAL SYMBOL TORCULUS;So;0;L;;;;;N;;;;; +1D1D9;MUSICAL SYMBOL PORRECTUS;So;0;L;;;;;N;;;;; +1D1DA;MUSICAL SYMBOL PORRECTUS FLEXUS;So;0;L;;;;;N;;;;; +1D1DB;MUSICAL SYMBOL SCANDICUS FLEXUS;So;0;L;;;;;N;;;;; +1D1DC;MUSICAL SYMBOL TORCULUS RESUPINUS;So;0;L;;;;;N;;;;; +1D1DD;MUSICAL SYMBOL PES SUBPUNCTIS;So;0;L;;;;;N;;;;; +1D1DE;MUSICAL SYMBOL KIEVAN C CLEF;So;0;L;;;;;N;;;;; +1D1DF;MUSICAL SYMBOL KIEVAN END OF PIECE;So;0;L;;;;;N;;;;; +1D1E0;MUSICAL SYMBOL KIEVAN FINAL NOTE;So;0;L;;;;;N;;;;; +1D1E1;MUSICAL SYMBOL KIEVAN RECITATIVE MARK;So;0;L;;;;;N;;;;; +1D1E2;MUSICAL SYMBOL KIEVAN WHOLE NOTE;So;0;L;;;;;N;;;;; +1D1E3;MUSICAL SYMBOL KIEVAN HALF NOTE;So;0;L;;;;;N;;;;; +1D1E4;MUSICAL SYMBOL KIEVAN QUARTER NOTE STEM DOWN;So;0;L;;;;;N;;;;; +1D1E5;MUSICAL SYMBOL KIEVAN QUARTER NOTE STEM UP;So;0;L;;;;;N;;;;; +1D1E6;MUSICAL SYMBOL KIEVAN EIGHTH NOTE STEM DOWN;So;0;L;;;;;N;;;;; +1D1E7;MUSICAL SYMBOL KIEVAN EIGHTH NOTE STEM UP;So;0;L;;;;;N;;;;; +1D1E8;MUSICAL SYMBOL KIEVAN FLAT SIGN;So;0;L;;;;;N;;;;; +1D200;GREEK VOCAL NOTATION SYMBOL-1;So;0;ON;;;;;N;;;;; +1D201;GREEK VOCAL NOTATION SYMBOL-2;So;0;ON;;;;;N;;;;; +1D202;GREEK VOCAL NOTATION SYMBOL-3;So;0;ON;;;;;N;;;;; +1D203;GREEK VOCAL NOTATION SYMBOL-4;So;0;ON;;;;;N;;;;; +1D204;GREEK VOCAL NOTATION SYMBOL-5;So;0;ON;;;;;N;;;;; +1D205;GREEK VOCAL NOTATION SYMBOL-6;So;0;ON;;;;;N;;;;; +1D206;GREEK VOCAL NOTATION SYMBOL-7;So;0;ON;;;;;N;;;;; +1D207;GREEK VOCAL NOTATION SYMBOL-8;So;0;ON;;;;;N;;;;; +1D208;GREEK VOCAL NOTATION SYMBOL-9;So;0;ON;;;;;N;;;;; +1D209;GREEK VOCAL NOTATION SYMBOL-10;So;0;ON;;;;;N;;;;; +1D20A;GREEK VOCAL NOTATION SYMBOL-11;So;0;ON;;;;;N;;;;; +1D20B;GREEK VOCAL NOTATION SYMBOL-12;So;0;ON;;;;;N;;;;; +1D20C;GREEK VOCAL NOTATION SYMBOL-13;So;0;ON;;;;;N;;;;; +1D20D;GREEK VOCAL NOTATION SYMBOL-14;So;0;ON;;;;;N;;;;; +1D20E;GREEK VOCAL NOTATION SYMBOL-15;So;0;ON;;;;;N;;;;; +1D20F;GREEK VOCAL NOTATION SYMBOL-16;So;0;ON;;;;;N;;;;; +1D210;GREEK VOCAL NOTATION SYMBOL-17;So;0;ON;;;;;N;;;;; +1D211;GREEK VOCAL NOTATION SYMBOL-18;So;0;ON;;;;;N;;;;; +1D212;GREEK VOCAL NOTATION SYMBOL-19;So;0;ON;;;;;N;;;;; +1D213;GREEK VOCAL NOTATION SYMBOL-20;So;0;ON;;;;;N;;;;; +1D214;GREEK VOCAL NOTATION SYMBOL-21;So;0;ON;;;;;N;;;;; +1D215;GREEK VOCAL NOTATION SYMBOL-22;So;0;ON;;;;;N;;;;; +1D216;GREEK VOCAL NOTATION SYMBOL-23;So;0;ON;;;;;N;;;;; +1D217;GREEK VOCAL NOTATION SYMBOL-24;So;0;ON;;;;;N;;;;; +1D218;GREEK VOCAL NOTATION SYMBOL-50;So;0;ON;;;;;N;;;;; +1D219;GREEK VOCAL NOTATION SYMBOL-51;So;0;ON;;;;;N;;;;; +1D21A;GREEK VOCAL NOTATION SYMBOL-52;So;0;ON;;;;;N;;;;; +1D21B;GREEK VOCAL NOTATION SYMBOL-53;So;0;ON;;;;;N;;;;; +1D21C;GREEK VOCAL NOTATION SYMBOL-54;So;0;ON;;;;;N;;;;; +1D21D;GREEK INSTRUMENTAL NOTATION SYMBOL-1;So;0;ON;;;;;N;;;;; +1D21E;GREEK INSTRUMENTAL NOTATION SYMBOL-2;So;0;ON;;;;;N;;;;; +1D21F;GREEK INSTRUMENTAL NOTATION SYMBOL-4;So;0;ON;;;;;N;;;;; +1D220;GREEK INSTRUMENTAL NOTATION SYMBOL-5;So;0;ON;;;;;N;;;;; +1D221;GREEK INSTRUMENTAL NOTATION SYMBOL-7;So;0;ON;;;;;N;;;;; +1D222;GREEK INSTRUMENTAL NOTATION SYMBOL-8;So;0;ON;;;;;N;;;;; +1D223;GREEK INSTRUMENTAL NOTATION SYMBOL-11;So;0;ON;;;;;N;;;;; +1D224;GREEK INSTRUMENTAL NOTATION SYMBOL-12;So;0;ON;;;;;N;;;;; +1D225;GREEK INSTRUMENTAL NOTATION SYMBOL-13;So;0;ON;;;;;N;;;;; +1D226;GREEK INSTRUMENTAL NOTATION SYMBOL-14;So;0;ON;;;;;N;;;;; +1D227;GREEK INSTRUMENTAL NOTATION SYMBOL-17;So;0;ON;;;;;N;;;;; +1D228;GREEK INSTRUMENTAL NOTATION SYMBOL-18;So;0;ON;;;;;N;;;;; +1D229;GREEK INSTRUMENTAL NOTATION SYMBOL-19;So;0;ON;;;;;N;;;;; +1D22A;GREEK INSTRUMENTAL NOTATION SYMBOL-23;So;0;ON;;;;;N;;;;; +1D22B;GREEK INSTRUMENTAL NOTATION SYMBOL-24;So;0;ON;;;;;N;;;;; +1D22C;GREEK INSTRUMENTAL NOTATION SYMBOL-25;So;0;ON;;;;;N;;;;; +1D22D;GREEK INSTRUMENTAL NOTATION SYMBOL-26;So;0;ON;;;;;N;;;;; +1D22E;GREEK INSTRUMENTAL NOTATION SYMBOL-27;So;0;ON;;;;;N;;;;; +1D22F;GREEK INSTRUMENTAL NOTATION SYMBOL-29;So;0;ON;;;;;N;;;;; +1D230;GREEK INSTRUMENTAL NOTATION SYMBOL-30;So;0;ON;;;;;N;;;;; +1D231;GREEK INSTRUMENTAL NOTATION SYMBOL-32;So;0;ON;;;;;N;;;;; +1D232;GREEK INSTRUMENTAL NOTATION SYMBOL-36;So;0;ON;;;;;N;;;;; +1D233;GREEK INSTRUMENTAL NOTATION SYMBOL-37;So;0;ON;;;;;N;;;;; +1D234;GREEK INSTRUMENTAL NOTATION SYMBOL-38;So;0;ON;;;;;N;;;;; +1D235;GREEK INSTRUMENTAL NOTATION SYMBOL-39;So;0;ON;;;;;N;;;;; +1D236;GREEK INSTRUMENTAL NOTATION SYMBOL-40;So;0;ON;;;;;N;;;;; +1D237;GREEK INSTRUMENTAL NOTATION SYMBOL-42;So;0;ON;;;;;N;;;;; +1D238;GREEK INSTRUMENTAL NOTATION SYMBOL-43;So;0;ON;;;;;N;;;;; +1D239;GREEK INSTRUMENTAL NOTATION SYMBOL-45;So;0;ON;;;;;N;;;;; +1D23A;GREEK INSTRUMENTAL NOTATION SYMBOL-47;So;0;ON;;;;;N;;;;; +1D23B;GREEK INSTRUMENTAL NOTATION SYMBOL-48;So;0;ON;;;;;N;;;;; +1D23C;GREEK INSTRUMENTAL NOTATION SYMBOL-49;So;0;ON;;;;;N;;;;; +1D23D;GREEK INSTRUMENTAL NOTATION SYMBOL-50;So;0;ON;;;;;N;;;;; +1D23E;GREEK INSTRUMENTAL NOTATION SYMBOL-51;So;0;ON;;;;;N;;;;; +1D23F;GREEK INSTRUMENTAL NOTATION SYMBOL-52;So;0;ON;;;;;N;;;;; +1D240;GREEK INSTRUMENTAL NOTATION SYMBOL-53;So;0;ON;;;;;N;;;;; +1D241;GREEK INSTRUMENTAL NOTATION SYMBOL-54;So;0;ON;;;;;N;;;;; +1D242;COMBINING GREEK MUSICAL TRISEME;Mn;230;NSM;;;;;N;;;;; +1D243;COMBINING GREEK MUSICAL TETRASEME;Mn;230;NSM;;;;;N;;;;; +1D244;COMBINING GREEK MUSICAL PENTASEME;Mn;230;NSM;;;;;N;;;;; +1D245;GREEK MUSICAL LEIMMA;So;0;ON;;;;;N;;;;; +1D2E0;MAYAN NUMERAL ZERO;No;0;L;;;;0;N;;;;; +1D2E1;MAYAN NUMERAL ONE;No;0;L;;;;1;N;;;;; +1D2E2;MAYAN NUMERAL TWO;No;0;L;;;;2;N;;;;; +1D2E3;MAYAN NUMERAL THREE;No;0;L;;;;3;N;;;;; +1D2E4;MAYAN NUMERAL FOUR;No;0;L;;;;4;N;;;;; +1D2E5;MAYAN NUMERAL FIVE;No;0;L;;;;5;N;;;;; +1D2E6;MAYAN NUMERAL SIX;No;0;L;;;;6;N;;;;; +1D2E7;MAYAN NUMERAL SEVEN;No;0;L;;;;7;N;;;;; +1D2E8;MAYAN NUMERAL EIGHT;No;0;L;;;;8;N;;;;; +1D2E9;MAYAN NUMERAL NINE;No;0;L;;;;9;N;;;;; +1D2EA;MAYAN NUMERAL TEN;No;0;L;;;;10;N;;;;; +1D2EB;MAYAN NUMERAL ELEVEN;No;0;L;;;;11;N;;;;; +1D2EC;MAYAN NUMERAL TWELVE;No;0;L;;;;12;N;;;;; +1D2ED;MAYAN NUMERAL THIRTEEN;No;0;L;;;;13;N;;;;; +1D2EE;MAYAN NUMERAL FOURTEEN;No;0;L;;;;14;N;;;;; +1D2EF;MAYAN NUMERAL FIFTEEN;No;0;L;;;;15;N;;;;; +1D2F0;MAYAN NUMERAL SIXTEEN;No;0;L;;;;16;N;;;;; +1D2F1;MAYAN NUMERAL SEVENTEEN;No;0;L;;;;17;N;;;;; +1D2F2;MAYAN NUMERAL EIGHTEEN;No;0;L;;;;18;N;;;;; +1D2F3;MAYAN NUMERAL NINETEEN;No;0;L;;;;19;N;;;;; +1D300;MONOGRAM FOR EARTH;So;0;ON;;;;;N;;;;; +1D301;DIGRAM FOR HEAVENLY EARTH;So;0;ON;;;;;N;;;;; +1D302;DIGRAM FOR HUMAN EARTH;So;0;ON;;;;;N;;;;; +1D303;DIGRAM FOR EARTHLY HEAVEN;So;0;ON;;;;;N;;;;; +1D304;DIGRAM FOR EARTHLY HUMAN;So;0;ON;;;;;N;;;;; +1D305;DIGRAM FOR EARTH;So;0;ON;;;;;N;;;;; +1D306;TETRAGRAM FOR CENTRE;So;0;ON;;;;;N;;;;; +1D307;TETRAGRAM FOR FULL CIRCLE;So;0;ON;;;;;N;;;;; +1D308;TETRAGRAM FOR MIRED;So;0;ON;;;;;N;;;;; +1D309;TETRAGRAM FOR BARRIER;So;0;ON;;;;;N;;;;; +1D30A;TETRAGRAM FOR KEEPING SMALL;So;0;ON;;;;;N;;;;; +1D30B;TETRAGRAM FOR CONTRARIETY;So;0;ON;;;;;N;;;;; +1D30C;TETRAGRAM FOR ASCENT;So;0;ON;;;;;N;;;;; +1D30D;TETRAGRAM FOR OPPOSITION;So;0;ON;;;;;N;;;;; +1D30E;TETRAGRAM FOR BRANCHING OUT;So;0;ON;;;;;N;;;;; +1D30F;TETRAGRAM FOR DEFECTIVENESS OR DISTORTION;So;0;ON;;;;;N;;;;; +1D310;TETRAGRAM FOR DIVERGENCE;So;0;ON;;;;;N;;;;; +1D311;TETRAGRAM FOR YOUTHFULNESS;So;0;ON;;;;;N;;;;; +1D312;TETRAGRAM FOR INCREASE;So;0;ON;;;;;N;;;;; +1D313;TETRAGRAM FOR PENETRATION;So;0;ON;;;;;N;;;;; +1D314;TETRAGRAM FOR REACH;So;0;ON;;;;;N;;;;; +1D315;TETRAGRAM FOR CONTACT;So;0;ON;;;;;N;;;;; +1D316;TETRAGRAM FOR HOLDING BACK;So;0;ON;;;;;N;;;;; +1D317;TETRAGRAM FOR WAITING;So;0;ON;;;;;N;;;;; +1D318;TETRAGRAM FOR FOLLOWING;So;0;ON;;;;;N;;;;; +1D319;TETRAGRAM FOR ADVANCE;So;0;ON;;;;;N;;;;; +1D31A;TETRAGRAM FOR RELEASE;So;0;ON;;;;;N;;;;; +1D31B;TETRAGRAM FOR RESISTANCE;So;0;ON;;;;;N;;;;; +1D31C;TETRAGRAM FOR EASE;So;0;ON;;;;;N;;;;; +1D31D;TETRAGRAM FOR JOY;So;0;ON;;;;;N;;;;; +1D31E;TETRAGRAM FOR CONTENTION;So;0;ON;;;;;N;;;;; +1D31F;TETRAGRAM FOR ENDEAVOUR;So;0;ON;;;;;N;;;;; +1D320;TETRAGRAM FOR DUTIES;So;0;ON;;;;;N;;;;; +1D321;TETRAGRAM FOR CHANGE;So;0;ON;;;;;N;;;;; +1D322;TETRAGRAM FOR DECISIVENESS;So;0;ON;;;;;N;;;;; +1D323;TETRAGRAM FOR BOLD RESOLUTION;So;0;ON;;;;;N;;;;; +1D324;TETRAGRAM FOR PACKING;So;0;ON;;;;;N;;;;; +1D325;TETRAGRAM FOR LEGION;So;0;ON;;;;;N;;;;; +1D326;TETRAGRAM FOR CLOSENESS;So;0;ON;;;;;N;;;;; +1D327;TETRAGRAM FOR KINSHIP;So;0;ON;;;;;N;;;;; +1D328;TETRAGRAM FOR GATHERING;So;0;ON;;;;;N;;;;; +1D329;TETRAGRAM FOR STRENGTH;So;0;ON;;;;;N;;;;; +1D32A;TETRAGRAM FOR PURITY;So;0;ON;;;;;N;;;;; +1D32B;TETRAGRAM FOR FULLNESS;So;0;ON;;;;;N;;;;; +1D32C;TETRAGRAM FOR RESIDENCE;So;0;ON;;;;;N;;;;; +1D32D;TETRAGRAM FOR LAW OR MODEL;So;0;ON;;;;;N;;;;; +1D32E;TETRAGRAM FOR RESPONSE;So;0;ON;;;;;N;;;;; +1D32F;TETRAGRAM FOR GOING TO MEET;So;0;ON;;;;;N;;;;; +1D330;TETRAGRAM FOR ENCOUNTERS;So;0;ON;;;;;N;;;;; +1D331;TETRAGRAM FOR STOVE;So;0;ON;;;;;N;;;;; +1D332;TETRAGRAM FOR GREATNESS;So;0;ON;;;;;N;;;;; +1D333;TETRAGRAM FOR ENLARGEMENT;So;0;ON;;;;;N;;;;; +1D334;TETRAGRAM FOR PATTERN;So;0;ON;;;;;N;;;;; +1D335;TETRAGRAM FOR RITUAL;So;0;ON;;;;;N;;;;; +1D336;TETRAGRAM FOR FLIGHT;So;0;ON;;;;;N;;;;; +1D337;TETRAGRAM FOR VASTNESS OR WASTING;So;0;ON;;;;;N;;;;; +1D338;TETRAGRAM FOR CONSTANCY;So;0;ON;;;;;N;;;;; +1D339;TETRAGRAM FOR MEASURE;So;0;ON;;;;;N;;;;; +1D33A;TETRAGRAM FOR ETERNITY;So;0;ON;;;;;N;;;;; +1D33B;TETRAGRAM FOR UNITY;So;0;ON;;;;;N;;;;; +1D33C;TETRAGRAM FOR DIMINISHMENT;So;0;ON;;;;;N;;;;; +1D33D;TETRAGRAM FOR CLOSED MOUTH;So;0;ON;;;;;N;;;;; +1D33E;TETRAGRAM FOR GUARDEDNESS;So;0;ON;;;;;N;;;;; +1D33F;TETRAGRAM FOR GATHERING IN;So;0;ON;;;;;N;;;;; +1D340;TETRAGRAM FOR MASSING;So;0;ON;;;;;N;;;;; +1D341;TETRAGRAM FOR ACCUMULATION;So;0;ON;;;;;N;;;;; +1D342;TETRAGRAM FOR EMBELLISHMENT;So;0;ON;;;;;N;;;;; +1D343;TETRAGRAM FOR DOUBT;So;0;ON;;;;;N;;;;; +1D344;TETRAGRAM FOR WATCH;So;0;ON;;;;;N;;;;; +1D345;TETRAGRAM FOR SINKING;So;0;ON;;;;;N;;;;; +1D346;TETRAGRAM FOR INNER;So;0;ON;;;;;N;;;;; +1D347;TETRAGRAM FOR DEPARTURE;So;0;ON;;;;;N;;;;; +1D348;TETRAGRAM FOR DARKENING;So;0;ON;;;;;N;;;;; +1D349;TETRAGRAM FOR DIMMING;So;0;ON;;;;;N;;;;; +1D34A;TETRAGRAM FOR EXHAUSTION;So;0;ON;;;;;N;;;;; +1D34B;TETRAGRAM FOR SEVERANCE;So;0;ON;;;;;N;;;;; +1D34C;TETRAGRAM FOR STOPPAGE;So;0;ON;;;;;N;;;;; +1D34D;TETRAGRAM FOR HARDNESS;So;0;ON;;;;;N;;;;; +1D34E;TETRAGRAM FOR COMPLETION;So;0;ON;;;;;N;;;;; +1D34F;TETRAGRAM FOR CLOSURE;So;0;ON;;;;;N;;;;; +1D350;TETRAGRAM FOR FAILURE;So;0;ON;;;;;N;;;;; +1D351;TETRAGRAM FOR AGGRAVATION;So;0;ON;;;;;N;;;;; +1D352;TETRAGRAM FOR COMPLIANCE;So;0;ON;;;;;N;;;;; +1D353;TETRAGRAM FOR ON THE VERGE;So;0;ON;;;;;N;;;;; +1D354;TETRAGRAM FOR DIFFICULTIES;So;0;ON;;;;;N;;;;; +1D355;TETRAGRAM FOR LABOURING;So;0;ON;;;;;N;;;;; +1D356;TETRAGRAM FOR FOSTERING;So;0;ON;;;;;N;;;;; +1D360;COUNTING ROD UNIT DIGIT ONE;No;0;L;;;;1;N;;;;; +1D361;COUNTING ROD UNIT DIGIT TWO;No;0;L;;;;2;N;;;;; +1D362;COUNTING ROD UNIT DIGIT THREE;No;0;L;;;;3;N;;;;; +1D363;COUNTING ROD UNIT DIGIT FOUR;No;0;L;;;;4;N;;;;; +1D364;COUNTING ROD UNIT DIGIT FIVE;No;0;L;;;;5;N;;;;; +1D365;COUNTING ROD UNIT DIGIT SIX;No;0;L;;;;6;N;;;;; +1D366;COUNTING ROD UNIT DIGIT SEVEN;No;0;L;;;;7;N;;;;; +1D367;COUNTING ROD UNIT DIGIT EIGHT;No;0;L;;;;8;N;;;;; +1D368;COUNTING ROD UNIT DIGIT NINE;No;0;L;;;;9;N;;;;; +1D369;COUNTING ROD TENS DIGIT ONE;No;0;L;;;;10;N;;;;; +1D36A;COUNTING ROD TENS DIGIT TWO;No;0;L;;;;20;N;;;;; +1D36B;COUNTING ROD TENS DIGIT THREE;No;0;L;;;;30;N;;;;; +1D36C;COUNTING ROD TENS DIGIT FOUR;No;0;L;;;;40;N;;;;; +1D36D;COUNTING ROD TENS DIGIT FIVE;No;0;L;;;;50;N;;;;; +1D36E;COUNTING ROD TENS DIGIT SIX;No;0;L;;;;60;N;;;;; +1D36F;COUNTING ROD TENS DIGIT SEVEN;No;0;L;;;;70;N;;;;; +1D370;COUNTING ROD TENS DIGIT EIGHT;No;0;L;;;;80;N;;;;; +1D371;COUNTING ROD TENS DIGIT NINE;No;0;L;;;;90;N;;;;; +1D372;IDEOGRAPHIC TALLY MARK ONE;No;0;L;;;;1;N;;;;; +1D373;IDEOGRAPHIC TALLY MARK TWO;No;0;L;;;;2;N;;;;; +1D374;IDEOGRAPHIC TALLY MARK THREE;No;0;L;;;;3;N;;;;; +1D375;IDEOGRAPHIC TALLY MARK FOUR;No;0;L;;;;4;N;;;;; +1D376;IDEOGRAPHIC TALLY MARK FIVE;No;0;L;;;;5;N;;;;; +1D377;TALLY MARK ONE;No;0;L;;;;1;N;;;;; +1D378;TALLY MARK FIVE;No;0;L;;;;5;N;;;;; +1D400;MATHEMATICAL BOLD CAPITAL A;Lu;0;L; 0041;;;;N;;;;; +1D401;MATHEMATICAL BOLD CAPITAL B;Lu;0;L; 0042;;;;N;;;;; +1D402;MATHEMATICAL BOLD CAPITAL C;Lu;0;L; 0043;;;;N;;;;; +1D403;MATHEMATICAL BOLD CAPITAL D;Lu;0;L; 0044;;;;N;;;;; +1D404;MATHEMATICAL BOLD CAPITAL E;Lu;0;L; 0045;;;;N;;;;; +1D405;MATHEMATICAL BOLD CAPITAL F;Lu;0;L; 0046;;;;N;;;;; +1D406;MATHEMATICAL BOLD CAPITAL G;Lu;0;L; 0047;;;;N;;;;; +1D407;MATHEMATICAL BOLD CAPITAL H;Lu;0;L; 0048;;;;N;;;;; +1D408;MATHEMATICAL BOLD CAPITAL I;Lu;0;L; 0049;;;;N;;;;; +1D409;MATHEMATICAL BOLD CAPITAL J;Lu;0;L; 004A;;;;N;;;;; +1D40A;MATHEMATICAL BOLD CAPITAL K;Lu;0;L; 004B;;;;N;;;;; +1D40B;MATHEMATICAL BOLD CAPITAL L;Lu;0;L; 004C;;;;N;;;;; +1D40C;MATHEMATICAL BOLD CAPITAL M;Lu;0;L; 004D;;;;N;;;;; +1D40D;MATHEMATICAL BOLD CAPITAL N;Lu;0;L; 004E;;;;N;;;;; +1D40E;MATHEMATICAL BOLD CAPITAL O;Lu;0;L; 004F;;;;N;;;;; +1D40F;MATHEMATICAL BOLD CAPITAL P;Lu;0;L; 0050;;;;N;;;;; +1D410;MATHEMATICAL BOLD CAPITAL Q;Lu;0;L; 0051;;;;N;;;;; +1D411;MATHEMATICAL BOLD CAPITAL R;Lu;0;L; 0052;;;;N;;;;; +1D412;MATHEMATICAL BOLD CAPITAL S;Lu;0;L; 0053;;;;N;;;;; +1D413;MATHEMATICAL BOLD CAPITAL T;Lu;0;L; 0054;;;;N;;;;; +1D414;MATHEMATICAL BOLD CAPITAL U;Lu;0;L; 0055;;;;N;;;;; +1D415;MATHEMATICAL BOLD CAPITAL V;Lu;0;L; 0056;;;;N;;;;; +1D416;MATHEMATICAL BOLD CAPITAL W;Lu;0;L; 0057;;;;N;;;;; +1D417;MATHEMATICAL BOLD CAPITAL X;Lu;0;L; 0058;;;;N;;;;; +1D418;MATHEMATICAL BOLD CAPITAL Y;Lu;0;L; 0059;;;;N;;;;; +1D419;MATHEMATICAL BOLD CAPITAL Z;Lu;0;L; 005A;;;;N;;;;; +1D41A;MATHEMATICAL BOLD SMALL A;Ll;0;L; 0061;;;;N;;;;; +1D41B;MATHEMATICAL BOLD SMALL B;Ll;0;L; 0062;;;;N;;;;; +1D41C;MATHEMATICAL BOLD SMALL C;Ll;0;L; 0063;;;;N;;;;; +1D41D;MATHEMATICAL BOLD SMALL D;Ll;0;L; 0064;;;;N;;;;; +1D41E;MATHEMATICAL BOLD SMALL E;Ll;0;L; 0065;;;;N;;;;; +1D41F;MATHEMATICAL BOLD SMALL F;Ll;0;L; 0066;;;;N;;;;; +1D420;MATHEMATICAL BOLD SMALL G;Ll;0;L; 0067;;;;N;;;;; +1D421;MATHEMATICAL BOLD SMALL H;Ll;0;L; 0068;;;;N;;;;; +1D422;MATHEMATICAL BOLD SMALL I;Ll;0;L; 0069;;;;N;;;;; +1D423;MATHEMATICAL BOLD SMALL J;Ll;0;L; 006A;;;;N;;;;; +1D424;MATHEMATICAL BOLD SMALL K;Ll;0;L; 006B;;;;N;;;;; +1D425;MATHEMATICAL BOLD SMALL L;Ll;0;L; 006C;;;;N;;;;; +1D426;MATHEMATICAL BOLD SMALL M;Ll;0;L; 006D;;;;N;;;;; +1D427;MATHEMATICAL BOLD SMALL N;Ll;0;L; 006E;;;;N;;;;; +1D428;MATHEMATICAL BOLD SMALL O;Ll;0;L; 006F;;;;N;;;;; +1D429;MATHEMATICAL BOLD SMALL P;Ll;0;L; 0070;;;;N;;;;; +1D42A;MATHEMATICAL BOLD SMALL Q;Ll;0;L; 0071;;;;N;;;;; +1D42B;MATHEMATICAL BOLD SMALL R;Ll;0;L; 0072;;;;N;;;;; +1D42C;MATHEMATICAL BOLD SMALL S;Ll;0;L; 0073;;;;N;;;;; +1D42D;MATHEMATICAL BOLD SMALL T;Ll;0;L; 0074;;;;N;;;;; +1D42E;MATHEMATICAL BOLD SMALL U;Ll;0;L; 0075;;;;N;;;;; +1D42F;MATHEMATICAL BOLD SMALL V;Ll;0;L; 0076;;;;N;;;;; +1D430;MATHEMATICAL BOLD SMALL W;Ll;0;L; 0077;;;;N;;;;; +1D431;MATHEMATICAL BOLD SMALL X;Ll;0;L; 0078;;;;N;;;;; +1D432;MATHEMATICAL BOLD SMALL Y;Ll;0;L; 0079;;;;N;;;;; +1D433;MATHEMATICAL BOLD SMALL Z;Ll;0;L; 007A;;;;N;;;;; +1D434;MATHEMATICAL ITALIC CAPITAL A;Lu;0;L; 0041;;;;N;;;;; +1D435;MATHEMATICAL ITALIC CAPITAL B;Lu;0;L; 0042;;;;N;;;;; +1D436;MATHEMATICAL ITALIC CAPITAL C;Lu;0;L; 0043;;;;N;;;;; +1D437;MATHEMATICAL ITALIC CAPITAL D;Lu;0;L; 0044;;;;N;;;;; +1D438;MATHEMATICAL ITALIC CAPITAL E;Lu;0;L; 0045;;;;N;;;;; +1D439;MATHEMATICAL ITALIC CAPITAL F;Lu;0;L; 0046;;;;N;;;;; +1D43A;MATHEMATICAL ITALIC CAPITAL G;Lu;0;L; 0047;;;;N;;;;; +1D43B;MATHEMATICAL ITALIC CAPITAL H;Lu;0;L; 0048;;;;N;;;;; +1D43C;MATHEMATICAL ITALIC CAPITAL I;Lu;0;L; 0049;;;;N;;;;; +1D43D;MATHEMATICAL ITALIC CAPITAL J;Lu;0;L; 004A;;;;N;;;;; +1D43E;MATHEMATICAL ITALIC CAPITAL K;Lu;0;L; 004B;;;;N;;;;; +1D43F;MATHEMATICAL ITALIC CAPITAL L;Lu;0;L; 004C;;;;N;;;;; +1D440;MATHEMATICAL ITALIC CAPITAL M;Lu;0;L; 004D;;;;N;;;;; +1D441;MATHEMATICAL ITALIC CAPITAL N;Lu;0;L; 004E;;;;N;;;;; +1D442;MATHEMATICAL ITALIC CAPITAL O;Lu;0;L; 004F;;;;N;;;;; +1D443;MATHEMATICAL ITALIC CAPITAL P;Lu;0;L; 0050;;;;N;;;;; +1D444;MATHEMATICAL ITALIC CAPITAL Q;Lu;0;L; 0051;;;;N;;;;; +1D445;MATHEMATICAL ITALIC CAPITAL R;Lu;0;L; 0052;;;;N;;;;; +1D446;MATHEMATICAL ITALIC CAPITAL S;Lu;0;L; 0053;;;;N;;;;; +1D447;MATHEMATICAL ITALIC CAPITAL T;Lu;0;L; 0054;;;;N;;;;; +1D448;MATHEMATICAL ITALIC CAPITAL U;Lu;0;L; 0055;;;;N;;;;; +1D449;MATHEMATICAL ITALIC CAPITAL V;Lu;0;L; 0056;;;;N;;;;; +1D44A;MATHEMATICAL ITALIC CAPITAL W;Lu;0;L; 0057;;;;N;;;;; +1D44B;MATHEMATICAL ITALIC CAPITAL X;Lu;0;L; 0058;;;;N;;;;; +1D44C;MATHEMATICAL ITALIC CAPITAL Y;Lu;0;L; 0059;;;;N;;;;; +1D44D;MATHEMATICAL ITALIC CAPITAL Z;Lu;0;L; 005A;;;;N;;;;; +1D44E;MATHEMATICAL ITALIC SMALL A;Ll;0;L; 0061;;;;N;;;;; +1D44F;MATHEMATICAL ITALIC SMALL B;Ll;0;L; 0062;;;;N;;;;; +1D450;MATHEMATICAL ITALIC SMALL C;Ll;0;L; 0063;;;;N;;;;; +1D451;MATHEMATICAL ITALIC SMALL D;Ll;0;L; 0064;;;;N;;;;; +1D452;MATHEMATICAL ITALIC SMALL E;Ll;0;L; 0065;;;;N;;;;; +1D453;MATHEMATICAL ITALIC SMALL F;Ll;0;L; 0066;;;;N;;;;; +1D454;MATHEMATICAL ITALIC SMALL G;Ll;0;L; 0067;;;;N;;;;; +1D456;MATHEMATICAL ITALIC SMALL I;Ll;0;L; 0069;;;;N;;;;; +1D457;MATHEMATICAL ITALIC SMALL J;Ll;0;L; 006A;;;;N;;;;; +1D458;MATHEMATICAL ITALIC SMALL K;Ll;0;L; 006B;;;;N;;;;; +1D459;MATHEMATICAL ITALIC SMALL L;Ll;0;L; 006C;;;;N;;;;; +1D45A;MATHEMATICAL ITALIC SMALL M;Ll;0;L; 006D;;;;N;;;;; +1D45B;MATHEMATICAL ITALIC SMALL N;Ll;0;L; 006E;;;;N;;;;; +1D45C;MATHEMATICAL ITALIC SMALL O;Ll;0;L; 006F;;;;N;;;;; +1D45D;MATHEMATICAL ITALIC SMALL P;Ll;0;L; 0070;;;;N;;;;; +1D45E;MATHEMATICAL ITALIC SMALL Q;Ll;0;L; 0071;;;;N;;;;; +1D45F;MATHEMATICAL ITALIC SMALL R;Ll;0;L; 0072;;;;N;;;;; +1D460;MATHEMATICAL ITALIC SMALL S;Ll;0;L; 0073;;;;N;;;;; +1D461;MATHEMATICAL ITALIC SMALL T;Ll;0;L; 0074;;;;N;;;;; +1D462;MATHEMATICAL ITALIC SMALL U;Ll;0;L; 0075;;;;N;;;;; +1D463;MATHEMATICAL ITALIC SMALL V;Ll;0;L; 0076;;;;N;;;;; +1D464;MATHEMATICAL ITALIC SMALL W;Ll;0;L; 0077;;;;N;;;;; +1D465;MATHEMATICAL ITALIC SMALL X;Ll;0;L; 0078;;;;N;;;;; +1D466;MATHEMATICAL ITALIC SMALL Y;Ll;0;L; 0079;;;;N;;;;; +1D467;MATHEMATICAL ITALIC SMALL Z;Ll;0;L; 007A;;;;N;;;;; +1D468;MATHEMATICAL BOLD ITALIC CAPITAL A;Lu;0;L; 0041;;;;N;;;;; +1D469;MATHEMATICAL BOLD ITALIC CAPITAL B;Lu;0;L; 0042;;;;N;;;;; +1D46A;MATHEMATICAL BOLD ITALIC CAPITAL C;Lu;0;L; 0043;;;;N;;;;; +1D46B;MATHEMATICAL BOLD ITALIC CAPITAL D;Lu;0;L; 0044;;;;N;;;;; +1D46C;MATHEMATICAL BOLD ITALIC CAPITAL E;Lu;0;L; 0045;;;;N;;;;; +1D46D;MATHEMATICAL BOLD ITALIC CAPITAL F;Lu;0;L; 0046;;;;N;;;;; +1D46E;MATHEMATICAL BOLD ITALIC CAPITAL G;Lu;0;L; 0047;;;;N;;;;; +1D46F;MATHEMATICAL BOLD ITALIC CAPITAL H;Lu;0;L; 0048;;;;N;;;;; +1D470;MATHEMATICAL BOLD ITALIC CAPITAL I;Lu;0;L; 0049;;;;N;;;;; +1D471;MATHEMATICAL BOLD ITALIC CAPITAL J;Lu;0;L; 004A;;;;N;;;;; +1D472;MATHEMATICAL BOLD ITALIC CAPITAL K;Lu;0;L; 004B;;;;N;;;;; +1D473;MATHEMATICAL BOLD ITALIC CAPITAL L;Lu;0;L; 004C;;;;N;;;;; +1D474;MATHEMATICAL BOLD ITALIC CAPITAL M;Lu;0;L; 004D;;;;N;;;;; +1D475;MATHEMATICAL BOLD ITALIC CAPITAL N;Lu;0;L; 004E;;;;N;;;;; +1D476;MATHEMATICAL BOLD ITALIC CAPITAL O;Lu;0;L; 004F;;;;N;;;;; +1D477;MATHEMATICAL BOLD ITALIC CAPITAL P;Lu;0;L; 0050;;;;N;;;;; +1D478;MATHEMATICAL BOLD ITALIC CAPITAL Q;Lu;0;L; 0051;;;;N;;;;; +1D479;MATHEMATICAL BOLD ITALIC CAPITAL R;Lu;0;L; 0052;;;;N;;;;; +1D47A;MATHEMATICAL BOLD ITALIC CAPITAL S;Lu;0;L; 0053;;;;N;;;;; +1D47B;MATHEMATICAL BOLD ITALIC CAPITAL T;Lu;0;L; 0054;;;;N;;;;; +1D47C;MATHEMATICAL BOLD ITALIC CAPITAL U;Lu;0;L; 0055;;;;N;;;;; +1D47D;MATHEMATICAL BOLD ITALIC CAPITAL V;Lu;0;L; 0056;;;;N;;;;; +1D47E;MATHEMATICAL BOLD ITALIC CAPITAL W;Lu;0;L; 0057;;;;N;;;;; +1D47F;MATHEMATICAL BOLD ITALIC CAPITAL X;Lu;0;L; 0058;;;;N;;;;; +1D480;MATHEMATICAL BOLD ITALIC CAPITAL Y;Lu;0;L; 0059;;;;N;;;;; +1D481;MATHEMATICAL BOLD ITALIC CAPITAL Z;Lu;0;L; 005A;;;;N;;;;; +1D482;MATHEMATICAL BOLD ITALIC SMALL A;Ll;0;L; 0061;;;;N;;;;; +1D483;MATHEMATICAL BOLD ITALIC SMALL B;Ll;0;L; 0062;;;;N;;;;; +1D484;MATHEMATICAL BOLD ITALIC SMALL C;Ll;0;L; 0063;;;;N;;;;; +1D485;MATHEMATICAL BOLD ITALIC SMALL D;Ll;0;L; 0064;;;;N;;;;; +1D486;MATHEMATICAL BOLD ITALIC SMALL E;Ll;0;L; 0065;;;;N;;;;; +1D487;MATHEMATICAL BOLD ITALIC SMALL F;Ll;0;L; 0066;;;;N;;;;; +1D488;MATHEMATICAL BOLD ITALIC SMALL G;Ll;0;L; 0067;;;;N;;;;; +1D489;MATHEMATICAL BOLD ITALIC SMALL H;Ll;0;L; 0068;;;;N;;;;; +1D48A;MATHEMATICAL BOLD ITALIC SMALL I;Ll;0;L; 0069;;;;N;;;;; +1D48B;MATHEMATICAL BOLD ITALIC SMALL J;Ll;0;L; 006A;;;;N;;;;; +1D48C;MATHEMATICAL BOLD ITALIC SMALL K;Ll;0;L; 006B;;;;N;;;;; +1D48D;MATHEMATICAL BOLD ITALIC SMALL L;Ll;0;L; 006C;;;;N;;;;; +1D48E;MATHEMATICAL BOLD ITALIC SMALL M;Ll;0;L; 006D;;;;N;;;;; +1D48F;MATHEMATICAL BOLD ITALIC SMALL N;Ll;0;L; 006E;;;;N;;;;; +1D490;MATHEMATICAL BOLD ITALIC SMALL O;Ll;0;L; 006F;;;;N;;;;; +1D491;MATHEMATICAL BOLD ITALIC SMALL P;Ll;0;L; 0070;;;;N;;;;; +1D492;MATHEMATICAL BOLD ITALIC SMALL Q;Ll;0;L; 0071;;;;N;;;;; +1D493;MATHEMATICAL BOLD ITALIC SMALL R;Ll;0;L; 0072;;;;N;;;;; +1D494;MATHEMATICAL BOLD ITALIC SMALL S;Ll;0;L; 0073;;;;N;;;;; +1D495;MATHEMATICAL BOLD ITALIC SMALL T;Ll;0;L; 0074;;;;N;;;;; +1D496;MATHEMATICAL BOLD ITALIC SMALL U;Ll;0;L; 0075;;;;N;;;;; +1D497;MATHEMATICAL BOLD ITALIC SMALL V;Ll;0;L; 0076;;;;N;;;;; +1D498;MATHEMATICAL BOLD ITALIC SMALL W;Ll;0;L; 0077;;;;N;;;;; +1D499;MATHEMATICAL BOLD ITALIC SMALL X;Ll;0;L; 0078;;;;N;;;;; +1D49A;MATHEMATICAL BOLD ITALIC SMALL Y;Ll;0;L; 0079;;;;N;;;;; +1D49B;MATHEMATICAL BOLD ITALIC SMALL Z;Ll;0;L; 007A;;;;N;;;;; +1D49C;MATHEMATICAL SCRIPT CAPITAL A;Lu;0;L; 0041;;;;N;;;;; +1D49E;MATHEMATICAL SCRIPT CAPITAL C;Lu;0;L; 0043;;;;N;;;;; +1D49F;MATHEMATICAL SCRIPT CAPITAL D;Lu;0;L; 0044;;;;N;;;;; +1D4A2;MATHEMATICAL SCRIPT CAPITAL G;Lu;0;L; 0047;;;;N;;;;; +1D4A5;MATHEMATICAL SCRIPT CAPITAL J;Lu;0;L; 004A;;;;N;;;;; +1D4A6;MATHEMATICAL SCRIPT CAPITAL K;Lu;0;L; 004B;;;;N;;;;; +1D4A9;MATHEMATICAL SCRIPT CAPITAL N;Lu;0;L; 004E;;;;N;;;;; +1D4AA;MATHEMATICAL SCRIPT CAPITAL O;Lu;0;L; 004F;;;;N;;;;; +1D4AB;MATHEMATICAL SCRIPT CAPITAL P;Lu;0;L; 0050;;;;N;;;;; +1D4AC;MATHEMATICAL SCRIPT CAPITAL Q;Lu;0;L; 0051;;;;N;;;;; +1D4AE;MATHEMATICAL SCRIPT CAPITAL S;Lu;0;L; 0053;;;;N;;;;; +1D4AF;MATHEMATICAL SCRIPT CAPITAL T;Lu;0;L; 0054;;;;N;;;;; +1D4B0;MATHEMATICAL SCRIPT CAPITAL U;Lu;0;L; 0055;;;;N;;;;; +1D4B1;MATHEMATICAL SCRIPT CAPITAL V;Lu;0;L; 0056;;;;N;;;;; +1D4B2;MATHEMATICAL SCRIPT CAPITAL W;Lu;0;L; 0057;;;;N;;;;; +1D4B3;MATHEMATICAL SCRIPT CAPITAL X;Lu;0;L; 0058;;;;N;;;;; +1D4B4;MATHEMATICAL SCRIPT CAPITAL Y;Lu;0;L; 0059;;;;N;;;;; +1D4B5;MATHEMATICAL SCRIPT CAPITAL Z;Lu;0;L; 005A;;;;N;;;;; +1D4B6;MATHEMATICAL SCRIPT SMALL A;Ll;0;L; 0061;;;;N;;;;; +1D4B7;MATHEMATICAL SCRIPT SMALL B;Ll;0;L; 0062;;;;N;;;;; +1D4B8;MATHEMATICAL SCRIPT SMALL C;Ll;0;L; 0063;;;;N;;;;; +1D4B9;MATHEMATICAL SCRIPT SMALL D;Ll;0;L; 0064;;;;N;;;;; +1D4BB;MATHEMATICAL SCRIPT SMALL F;Ll;0;L; 0066;;;;N;;;;; +1D4BD;MATHEMATICAL SCRIPT SMALL H;Ll;0;L; 0068;;;;N;;;;; +1D4BE;MATHEMATICAL SCRIPT SMALL I;Ll;0;L; 0069;;;;N;;;;; +1D4BF;MATHEMATICAL SCRIPT SMALL J;Ll;0;L; 006A;;;;N;;;;; +1D4C0;MATHEMATICAL SCRIPT SMALL K;Ll;0;L; 006B;;;;N;;;;; +1D4C1;MATHEMATICAL SCRIPT SMALL L;Ll;0;L; 006C;;;;N;;;;; +1D4C2;MATHEMATICAL SCRIPT SMALL M;Ll;0;L; 006D;;;;N;;;;; +1D4C3;MATHEMATICAL SCRIPT SMALL N;Ll;0;L; 006E;;;;N;;;;; +1D4C5;MATHEMATICAL SCRIPT SMALL P;Ll;0;L; 0070;;;;N;;;;; +1D4C6;MATHEMATICAL SCRIPT SMALL Q;Ll;0;L; 0071;;;;N;;;;; +1D4C7;MATHEMATICAL SCRIPT SMALL R;Ll;0;L; 0072;;;;N;;;;; +1D4C8;MATHEMATICAL SCRIPT SMALL S;Ll;0;L; 0073;;;;N;;;;; +1D4C9;MATHEMATICAL SCRIPT SMALL T;Ll;0;L; 0074;;;;N;;;;; +1D4CA;MATHEMATICAL SCRIPT SMALL U;Ll;0;L; 0075;;;;N;;;;; +1D4CB;MATHEMATICAL SCRIPT SMALL V;Ll;0;L; 0076;;;;N;;;;; +1D4CC;MATHEMATICAL SCRIPT SMALL W;Ll;0;L; 0077;;;;N;;;;; +1D4CD;MATHEMATICAL SCRIPT SMALL X;Ll;0;L; 0078;;;;N;;;;; +1D4CE;MATHEMATICAL SCRIPT SMALL Y;Ll;0;L; 0079;;;;N;;;;; +1D4CF;MATHEMATICAL SCRIPT SMALL Z;Ll;0;L; 007A;;;;N;;;;; +1D4D0;MATHEMATICAL BOLD SCRIPT CAPITAL A;Lu;0;L; 0041;;;;N;;;;; +1D4D1;MATHEMATICAL BOLD SCRIPT CAPITAL B;Lu;0;L; 0042;;;;N;;;;; +1D4D2;MATHEMATICAL BOLD SCRIPT CAPITAL C;Lu;0;L; 0043;;;;N;;;;; +1D4D3;MATHEMATICAL BOLD SCRIPT CAPITAL D;Lu;0;L; 0044;;;;N;;;;; +1D4D4;MATHEMATICAL BOLD SCRIPT CAPITAL E;Lu;0;L; 0045;;;;N;;;;; +1D4D5;MATHEMATICAL BOLD SCRIPT CAPITAL F;Lu;0;L; 0046;;;;N;;;;; +1D4D6;MATHEMATICAL BOLD SCRIPT CAPITAL G;Lu;0;L; 0047;;;;N;;;;; +1D4D7;MATHEMATICAL BOLD SCRIPT CAPITAL H;Lu;0;L; 0048;;;;N;;;;; +1D4D8;MATHEMATICAL BOLD SCRIPT CAPITAL I;Lu;0;L; 0049;;;;N;;;;; +1D4D9;MATHEMATICAL BOLD SCRIPT CAPITAL J;Lu;0;L; 004A;;;;N;;;;; +1D4DA;MATHEMATICAL BOLD SCRIPT CAPITAL K;Lu;0;L; 004B;;;;N;;;;; +1D4DB;MATHEMATICAL BOLD SCRIPT CAPITAL L;Lu;0;L; 004C;;;;N;;;;; +1D4DC;MATHEMATICAL BOLD SCRIPT CAPITAL M;Lu;0;L; 004D;;;;N;;;;; +1D4DD;MATHEMATICAL BOLD SCRIPT CAPITAL N;Lu;0;L; 004E;;;;N;;;;; +1D4DE;MATHEMATICAL BOLD SCRIPT CAPITAL O;Lu;0;L; 004F;;;;N;;;;; +1D4DF;MATHEMATICAL BOLD SCRIPT CAPITAL P;Lu;0;L; 0050;;;;N;;;;; +1D4E0;MATHEMATICAL BOLD SCRIPT CAPITAL Q;Lu;0;L; 0051;;;;N;;;;; +1D4E1;MATHEMATICAL BOLD SCRIPT CAPITAL R;Lu;0;L; 0052;;;;N;;;;; +1D4E2;MATHEMATICAL BOLD SCRIPT CAPITAL S;Lu;0;L; 0053;;;;N;;;;; +1D4E3;MATHEMATICAL BOLD SCRIPT CAPITAL T;Lu;0;L; 0054;;;;N;;;;; +1D4E4;MATHEMATICAL BOLD SCRIPT CAPITAL U;Lu;0;L; 0055;;;;N;;;;; +1D4E5;MATHEMATICAL BOLD SCRIPT CAPITAL V;Lu;0;L; 0056;;;;N;;;;; +1D4E6;MATHEMATICAL BOLD SCRIPT CAPITAL W;Lu;0;L; 0057;;;;N;;;;; +1D4E7;MATHEMATICAL BOLD SCRIPT CAPITAL X;Lu;0;L; 0058;;;;N;;;;; +1D4E8;MATHEMATICAL BOLD SCRIPT CAPITAL Y;Lu;0;L; 0059;;;;N;;;;; +1D4E9;MATHEMATICAL BOLD SCRIPT CAPITAL Z;Lu;0;L; 005A;;;;N;;;;; +1D4EA;MATHEMATICAL BOLD SCRIPT SMALL A;Ll;0;L; 0061;;;;N;;;;; +1D4EB;MATHEMATICAL BOLD SCRIPT SMALL B;Ll;0;L; 0062;;;;N;;;;; +1D4EC;MATHEMATICAL BOLD SCRIPT SMALL C;Ll;0;L; 0063;;;;N;;;;; +1D4ED;MATHEMATICAL BOLD SCRIPT SMALL D;Ll;0;L; 0064;;;;N;;;;; +1D4EE;MATHEMATICAL BOLD SCRIPT SMALL E;Ll;0;L; 0065;;;;N;;;;; +1D4EF;MATHEMATICAL BOLD SCRIPT SMALL F;Ll;0;L; 0066;;;;N;;;;; +1D4F0;MATHEMATICAL BOLD SCRIPT SMALL G;Ll;0;L; 0067;;;;N;;;;; +1D4F1;MATHEMATICAL BOLD SCRIPT SMALL H;Ll;0;L; 0068;;;;N;;;;; +1D4F2;MATHEMATICAL BOLD SCRIPT SMALL I;Ll;0;L; 0069;;;;N;;;;; +1D4F3;MATHEMATICAL BOLD SCRIPT SMALL J;Ll;0;L; 006A;;;;N;;;;; +1D4F4;MATHEMATICAL BOLD SCRIPT SMALL K;Ll;0;L; 006B;;;;N;;;;; +1D4F5;MATHEMATICAL BOLD SCRIPT SMALL L;Ll;0;L; 006C;;;;N;;;;; +1D4F6;MATHEMATICAL BOLD SCRIPT SMALL M;Ll;0;L; 006D;;;;N;;;;; +1D4F7;MATHEMATICAL BOLD SCRIPT SMALL N;Ll;0;L; 006E;;;;N;;;;; +1D4F8;MATHEMATICAL BOLD SCRIPT SMALL O;Ll;0;L; 006F;;;;N;;;;; +1D4F9;MATHEMATICAL BOLD SCRIPT SMALL P;Ll;0;L; 0070;;;;N;;;;; +1D4FA;MATHEMATICAL BOLD SCRIPT SMALL Q;Ll;0;L; 0071;;;;N;;;;; +1D4FB;MATHEMATICAL BOLD SCRIPT SMALL R;Ll;0;L; 0072;;;;N;;;;; +1D4FC;MATHEMATICAL BOLD SCRIPT SMALL S;Ll;0;L; 0073;;;;N;;;;; +1D4FD;MATHEMATICAL BOLD SCRIPT SMALL T;Ll;0;L; 0074;;;;N;;;;; +1D4FE;MATHEMATICAL BOLD SCRIPT SMALL U;Ll;0;L; 0075;;;;N;;;;; +1D4FF;MATHEMATICAL BOLD SCRIPT SMALL V;Ll;0;L; 0076;;;;N;;;;; +1D500;MATHEMATICAL BOLD SCRIPT SMALL W;Ll;0;L; 0077;;;;N;;;;; +1D501;MATHEMATICAL BOLD SCRIPT SMALL X;Ll;0;L; 0078;;;;N;;;;; +1D502;MATHEMATICAL BOLD SCRIPT SMALL Y;Ll;0;L; 0079;;;;N;;;;; +1D503;MATHEMATICAL BOLD SCRIPT SMALL Z;Ll;0;L; 007A;;;;N;;;;; +1D504;MATHEMATICAL FRAKTUR CAPITAL A;Lu;0;L; 0041;;;;N;;;;; +1D505;MATHEMATICAL FRAKTUR CAPITAL B;Lu;0;L; 0042;;;;N;;;;; +1D507;MATHEMATICAL FRAKTUR CAPITAL D;Lu;0;L; 0044;;;;N;;;;; +1D508;MATHEMATICAL FRAKTUR CAPITAL E;Lu;0;L; 0045;;;;N;;;;; +1D509;MATHEMATICAL FRAKTUR CAPITAL F;Lu;0;L; 0046;;;;N;;;;; +1D50A;MATHEMATICAL FRAKTUR CAPITAL G;Lu;0;L; 0047;;;;N;;;;; +1D50D;MATHEMATICAL FRAKTUR CAPITAL J;Lu;0;L; 004A;;;;N;;;;; +1D50E;MATHEMATICAL FRAKTUR CAPITAL K;Lu;0;L; 004B;;;;N;;;;; +1D50F;MATHEMATICAL FRAKTUR CAPITAL L;Lu;0;L; 004C;;;;N;;;;; +1D510;MATHEMATICAL FRAKTUR CAPITAL M;Lu;0;L; 004D;;;;N;;;;; +1D511;MATHEMATICAL FRAKTUR CAPITAL N;Lu;0;L; 004E;;;;N;;;;; +1D512;MATHEMATICAL FRAKTUR CAPITAL O;Lu;0;L; 004F;;;;N;;;;; +1D513;MATHEMATICAL FRAKTUR CAPITAL P;Lu;0;L; 0050;;;;N;;;;; +1D514;MATHEMATICAL FRAKTUR CAPITAL Q;Lu;0;L; 0051;;;;N;;;;; +1D516;MATHEMATICAL FRAKTUR CAPITAL S;Lu;0;L; 0053;;;;N;;;;; +1D517;MATHEMATICAL FRAKTUR CAPITAL T;Lu;0;L; 0054;;;;N;;;;; +1D518;MATHEMATICAL FRAKTUR CAPITAL U;Lu;0;L; 0055;;;;N;;;;; +1D519;MATHEMATICAL FRAKTUR CAPITAL V;Lu;0;L; 0056;;;;N;;;;; +1D51A;MATHEMATICAL FRAKTUR CAPITAL W;Lu;0;L; 0057;;;;N;;;;; +1D51B;MATHEMATICAL FRAKTUR CAPITAL X;Lu;0;L; 0058;;;;N;;;;; +1D51C;MATHEMATICAL FRAKTUR CAPITAL Y;Lu;0;L; 0059;;;;N;;;;; +1D51E;MATHEMATICAL FRAKTUR SMALL A;Ll;0;L; 0061;;;;N;;;;; +1D51F;MATHEMATICAL FRAKTUR SMALL B;Ll;0;L; 0062;;;;N;;;;; +1D520;MATHEMATICAL FRAKTUR SMALL C;Ll;0;L; 0063;;;;N;;;;; +1D521;MATHEMATICAL FRAKTUR SMALL D;Ll;0;L; 0064;;;;N;;;;; +1D522;MATHEMATICAL FRAKTUR SMALL E;Ll;0;L; 0065;;;;N;;;;; +1D523;MATHEMATICAL FRAKTUR SMALL F;Ll;0;L; 0066;;;;N;;;;; +1D524;MATHEMATICAL FRAKTUR SMALL G;Ll;0;L; 0067;;;;N;;;;; +1D525;MATHEMATICAL FRAKTUR SMALL H;Ll;0;L; 0068;;;;N;;;;; +1D526;MATHEMATICAL FRAKTUR SMALL I;Ll;0;L; 0069;;;;N;;;;; +1D527;MATHEMATICAL FRAKTUR SMALL J;Ll;0;L; 006A;;;;N;;;;; +1D528;MATHEMATICAL FRAKTUR SMALL K;Ll;0;L; 006B;;;;N;;;;; +1D529;MATHEMATICAL FRAKTUR SMALL L;Ll;0;L; 006C;;;;N;;;;; +1D52A;MATHEMATICAL FRAKTUR SMALL M;Ll;0;L; 006D;;;;N;;;;; +1D52B;MATHEMATICAL FRAKTUR SMALL N;Ll;0;L; 006E;;;;N;;;;; +1D52C;MATHEMATICAL FRAKTUR SMALL O;Ll;0;L; 006F;;;;N;;;;; +1D52D;MATHEMATICAL FRAKTUR SMALL P;Ll;0;L; 0070;;;;N;;;;; +1D52E;MATHEMATICAL FRAKTUR SMALL Q;Ll;0;L; 0071;;;;N;;;;; +1D52F;MATHEMATICAL FRAKTUR SMALL R;Ll;0;L; 0072;;;;N;;;;; +1D530;MATHEMATICAL FRAKTUR SMALL S;Ll;0;L; 0073;;;;N;;;;; +1D531;MATHEMATICAL FRAKTUR SMALL T;Ll;0;L; 0074;;;;N;;;;; +1D532;MATHEMATICAL FRAKTUR SMALL U;Ll;0;L; 0075;;;;N;;;;; +1D533;MATHEMATICAL FRAKTUR SMALL V;Ll;0;L; 0076;;;;N;;;;; +1D534;MATHEMATICAL FRAKTUR SMALL W;Ll;0;L; 0077;;;;N;;;;; +1D535;MATHEMATICAL FRAKTUR SMALL X;Ll;0;L; 0078;;;;N;;;;; +1D536;MATHEMATICAL FRAKTUR SMALL Y;Ll;0;L; 0079;;;;N;;;;; +1D537;MATHEMATICAL FRAKTUR SMALL Z;Ll;0;L; 007A;;;;N;;;;; +1D538;MATHEMATICAL DOUBLE-STRUCK CAPITAL A;Lu;0;L; 0041;;;;N;;;;; +1D539;MATHEMATICAL DOUBLE-STRUCK CAPITAL B;Lu;0;L; 0042;;;;N;;;;; +1D53B;MATHEMATICAL DOUBLE-STRUCK CAPITAL D;Lu;0;L; 0044;;;;N;;;;; +1D53C;MATHEMATICAL DOUBLE-STRUCK CAPITAL E;Lu;0;L; 0045;;;;N;;;;; +1D53D;MATHEMATICAL DOUBLE-STRUCK CAPITAL F;Lu;0;L; 0046;;;;N;;;;; +1D53E;MATHEMATICAL DOUBLE-STRUCK CAPITAL G;Lu;0;L; 0047;;;;N;;;;; +1D540;MATHEMATICAL DOUBLE-STRUCK CAPITAL I;Lu;0;L; 0049;;;;N;;;;; +1D541;MATHEMATICAL DOUBLE-STRUCK CAPITAL J;Lu;0;L; 004A;;;;N;;;;; +1D542;MATHEMATICAL DOUBLE-STRUCK CAPITAL K;Lu;0;L; 004B;;;;N;;;;; +1D543;MATHEMATICAL DOUBLE-STRUCK CAPITAL L;Lu;0;L; 004C;;;;N;;;;; +1D544;MATHEMATICAL DOUBLE-STRUCK CAPITAL M;Lu;0;L; 004D;;;;N;;;;; +1D546;MATHEMATICAL DOUBLE-STRUCK CAPITAL O;Lu;0;L; 004F;;;;N;;;;; +1D54A;MATHEMATICAL DOUBLE-STRUCK CAPITAL S;Lu;0;L; 0053;;;;N;;;;; +1D54B;MATHEMATICAL DOUBLE-STRUCK CAPITAL T;Lu;0;L; 0054;;;;N;;;;; +1D54C;MATHEMATICAL DOUBLE-STRUCK CAPITAL U;Lu;0;L; 0055;;;;N;;;;; +1D54D;MATHEMATICAL DOUBLE-STRUCK CAPITAL V;Lu;0;L; 0056;;;;N;;;;; +1D54E;MATHEMATICAL DOUBLE-STRUCK CAPITAL W;Lu;0;L; 0057;;;;N;;;;; +1D54F;MATHEMATICAL DOUBLE-STRUCK CAPITAL X;Lu;0;L; 0058;;;;N;;;;; +1D550;MATHEMATICAL DOUBLE-STRUCK CAPITAL Y;Lu;0;L; 0059;;;;N;;;;; +1D552;MATHEMATICAL DOUBLE-STRUCK SMALL A;Ll;0;L; 0061;;;;N;;;;; +1D553;MATHEMATICAL DOUBLE-STRUCK SMALL B;Ll;0;L; 0062;;;;N;;;;; +1D554;MATHEMATICAL DOUBLE-STRUCK SMALL C;Ll;0;L; 0063;;;;N;;;;; +1D555;MATHEMATICAL DOUBLE-STRUCK SMALL D;Ll;0;L; 0064;;;;N;;;;; +1D556;MATHEMATICAL DOUBLE-STRUCK SMALL E;Ll;0;L; 0065;;;;N;;;;; +1D557;MATHEMATICAL DOUBLE-STRUCK SMALL F;Ll;0;L; 0066;;;;N;;;;; +1D558;MATHEMATICAL DOUBLE-STRUCK SMALL G;Ll;0;L; 0067;;;;N;;;;; +1D559;MATHEMATICAL DOUBLE-STRUCK SMALL H;Ll;0;L; 0068;;;;N;;;;; +1D55A;MATHEMATICAL DOUBLE-STRUCK SMALL I;Ll;0;L; 0069;;;;N;;;;; +1D55B;MATHEMATICAL DOUBLE-STRUCK SMALL J;Ll;0;L; 006A;;;;N;;;;; +1D55C;MATHEMATICAL DOUBLE-STRUCK SMALL K;Ll;0;L; 006B;;;;N;;;;; +1D55D;MATHEMATICAL DOUBLE-STRUCK SMALL L;Ll;0;L; 006C;;;;N;;;;; +1D55E;MATHEMATICAL DOUBLE-STRUCK SMALL M;Ll;0;L; 006D;;;;N;;;;; +1D55F;MATHEMATICAL DOUBLE-STRUCK SMALL N;Ll;0;L; 006E;;;;N;;;;; +1D560;MATHEMATICAL DOUBLE-STRUCK SMALL O;Ll;0;L; 006F;;;;N;;;;; +1D561;MATHEMATICAL DOUBLE-STRUCK SMALL P;Ll;0;L; 0070;;;;N;;;;; +1D562;MATHEMATICAL DOUBLE-STRUCK SMALL Q;Ll;0;L; 0071;;;;N;;;;; +1D563;MATHEMATICAL DOUBLE-STRUCK SMALL R;Ll;0;L; 0072;;;;N;;;;; +1D564;MATHEMATICAL DOUBLE-STRUCK SMALL S;Ll;0;L; 0073;;;;N;;;;; +1D565;MATHEMATICAL DOUBLE-STRUCK SMALL T;Ll;0;L; 0074;;;;N;;;;; +1D566;MATHEMATICAL DOUBLE-STRUCK SMALL U;Ll;0;L; 0075;;;;N;;;;; +1D567;MATHEMATICAL DOUBLE-STRUCK SMALL V;Ll;0;L; 0076;;;;N;;;;; +1D568;MATHEMATICAL DOUBLE-STRUCK SMALL W;Ll;0;L; 0077;;;;N;;;;; +1D569;MATHEMATICAL DOUBLE-STRUCK SMALL X;Ll;0;L; 0078;;;;N;;;;; +1D56A;MATHEMATICAL DOUBLE-STRUCK SMALL Y;Ll;0;L; 0079;;;;N;;;;; +1D56B;MATHEMATICAL DOUBLE-STRUCK SMALL Z;Ll;0;L; 007A;;;;N;;;;; +1D56C;MATHEMATICAL BOLD FRAKTUR CAPITAL A;Lu;0;L; 0041;;;;N;;;;; +1D56D;MATHEMATICAL BOLD FRAKTUR CAPITAL B;Lu;0;L; 0042;;;;N;;;;; +1D56E;MATHEMATICAL BOLD FRAKTUR CAPITAL C;Lu;0;L; 0043;;;;N;;;;; +1D56F;MATHEMATICAL BOLD FRAKTUR CAPITAL D;Lu;0;L; 0044;;;;N;;;;; +1D570;MATHEMATICAL BOLD FRAKTUR CAPITAL E;Lu;0;L; 0045;;;;N;;;;; +1D571;MATHEMATICAL BOLD FRAKTUR CAPITAL F;Lu;0;L; 0046;;;;N;;;;; +1D572;MATHEMATICAL BOLD FRAKTUR CAPITAL G;Lu;0;L; 0047;;;;N;;;;; +1D573;MATHEMATICAL BOLD FRAKTUR CAPITAL H;Lu;0;L; 0048;;;;N;;;;; +1D574;MATHEMATICAL BOLD FRAKTUR CAPITAL I;Lu;0;L; 0049;;;;N;;;;; +1D575;MATHEMATICAL BOLD FRAKTUR CAPITAL J;Lu;0;L; 004A;;;;N;;;;; +1D576;MATHEMATICAL BOLD FRAKTUR CAPITAL K;Lu;0;L; 004B;;;;N;;;;; +1D577;MATHEMATICAL BOLD FRAKTUR CAPITAL L;Lu;0;L; 004C;;;;N;;;;; +1D578;MATHEMATICAL BOLD FRAKTUR CAPITAL M;Lu;0;L; 004D;;;;N;;;;; +1D579;MATHEMATICAL BOLD FRAKTUR CAPITAL N;Lu;0;L; 004E;;;;N;;;;; +1D57A;MATHEMATICAL BOLD FRAKTUR CAPITAL O;Lu;0;L; 004F;;;;N;;;;; +1D57B;MATHEMATICAL BOLD FRAKTUR CAPITAL P;Lu;0;L; 0050;;;;N;;;;; +1D57C;MATHEMATICAL BOLD FRAKTUR CAPITAL Q;Lu;0;L; 0051;;;;N;;;;; +1D57D;MATHEMATICAL BOLD FRAKTUR CAPITAL R;Lu;0;L; 0052;;;;N;;;;; +1D57E;MATHEMATICAL BOLD FRAKTUR CAPITAL S;Lu;0;L; 0053;;;;N;;;;; +1D57F;MATHEMATICAL BOLD FRAKTUR CAPITAL T;Lu;0;L; 0054;;;;N;;;;; +1D580;MATHEMATICAL BOLD FRAKTUR CAPITAL U;Lu;0;L; 0055;;;;N;;;;; +1D581;MATHEMATICAL BOLD FRAKTUR CAPITAL V;Lu;0;L; 0056;;;;N;;;;; +1D582;MATHEMATICAL BOLD FRAKTUR CAPITAL W;Lu;0;L; 0057;;;;N;;;;; +1D583;MATHEMATICAL BOLD FRAKTUR CAPITAL X;Lu;0;L; 0058;;;;N;;;;; +1D584;MATHEMATICAL BOLD FRAKTUR CAPITAL Y;Lu;0;L; 0059;;;;N;;;;; +1D585;MATHEMATICAL BOLD FRAKTUR CAPITAL Z;Lu;0;L; 005A;;;;N;;;;; +1D586;MATHEMATICAL BOLD FRAKTUR SMALL A;Ll;0;L; 0061;;;;N;;;;; +1D587;MATHEMATICAL BOLD FRAKTUR SMALL B;Ll;0;L; 0062;;;;N;;;;; +1D588;MATHEMATICAL BOLD FRAKTUR SMALL C;Ll;0;L; 0063;;;;N;;;;; +1D589;MATHEMATICAL BOLD FRAKTUR SMALL D;Ll;0;L; 0064;;;;N;;;;; +1D58A;MATHEMATICAL BOLD FRAKTUR SMALL E;Ll;0;L; 0065;;;;N;;;;; +1D58B;MATHEMATICAL BOLD FRAKTUR SMALL F;Ll;0;L; 0066;;;;N;;;;; +1D58C;MATHEMATICAL BOLD FRAKTUR SMALL G;Ll;0;L; 0067;;;;N;;;;; +1D58D;MATHEMATICAL BOLD FRAKTUR SMALL H;Ll;0;L; 0068;;;;N;;;;; +1D58E;MATHEMATICAL BOLD FRAKTUR SMALL I;Ll;0;L; 0069;;;;N;;;;; +1D58F;MATHEMATICAL BOLD FRAKTUR SMALL J;Ll;0;L; 006A;;;;N;;;;; +1D590;MATHEMATICAL BOLD FRAKTUR SMALL K;Ll;0;L; 006B;;;;N;;;;; +1D591;MATHEMATICAL BOLD FRAKTUR SMALL L;Ll;0;L; 006C;;;;N;;;;; +1D592;MATHEMATICAL BOLD FRAKTUR SMALL M;Ll;0;L; 006D;;;;N;;;;; +1D593;MATHEMATICAL BOLD FRAKTUR SMALL N;Ll;0;L; 006E;;;;N;;;;; +1D594;MATHEMATICAL BOLD FRAKTUR SMALL O;Ll;0;L; 006F;;;;N;;;;; +1D595;MATHEMATICAL BOLD FRAKTUR SMALL P;Ll;0;L; 0070;;;;N;;;;; +1D596;MATHEMATICAL BOLD FRAKTUR SMALL Q;Ll;0;L; 0071;;;;N;;;;; +1D597;MATHEMATICAL BOLD FRAKTUR SMALL R;Ll;0;L; 0072;;;;N;;;;; +1D598;MATHEMATICAL BOLD FRAKTUR SMALL S;Ll;0;L; 0073;;;;N;;;;; +1D599;MATHEMATICAL BOLD FRAKTUR SMALL T;Ll;0;L; 0074;;;;N;;;;; +1D59A;MATHEMATICAL BOLD FRAKTUR SMALL U;Ll;0;L; 0075;;;;N;;;;; +1D59B;MATHEMATICAL BOLD FRAKTUR SMALL V;Ll;0;L; 0076;;;;N;;;;; +1D59C;MATHEMATICAL BOLD FRAKTUR SMALL W;Ll;0;L; 0077;;;;N;;;;; +1D59D;MATHEMATICAL BOLD FRAKTUR SMALL X;Ll;0;L; 0078;;;;N;;;;; +1D59E;MATHEMATICAL BOLD FRAKTUR SMALL Y;Ll;0;L; 0079;;;;N;;;;; +1D59F;MATHEMATICAL BOLD FRAKTUR SMALL Z;Ll;0;L; 007A;;;;N;;;;; +1D5A0;MATHEMATICAL SANS-SERIF CAPITAL A;Lu;0;L; 0041;;;;N;;;;; +1D5A1;MATHEMATICAL SANS-SERIF CAPITAL B;Lu;0;L; 0042;;;;N;;;;; +1D5A2;MATHEMATICAL SANS-SERIF CAPITAL C;Lu;0;L; 0043;;;;N;;;;; +1D5A3;MATHEMATICAL SANS-SERIF CAPITAL D;Lu;0;L; 0044;;;;N;;;;; +1D5A4;MATHEMATICAL SANS-SERIF CAPITAL E;Lu;0;L; 0045;;;;N;;;;; +1D5A5;MATHEMATICAL SANS-SERIF CAPITAL F;Lu;0;L; 0046;;;;N;;;;; +1D5A6;MATHEMATICAL SANS-SERIF CAPITAL G;Lu;0;L; 0047;;;;N;;;;; +1D5A7;MATHEMATICAL SANS-SERIF CAPITAL H;Lu;0;L; 0048;;;;N;;;;; +1D5A8;MATHEMATICAL SANS-SERIF CAPITAL I;Lu;0;L; 0049;;;;N;;;;; +1D5A9;MATHEMATICAL SANS-SERIF CAPITAL J;Lu;0;L; 004A;;;;N;;;;; +1D5AA;MATHEMATICAL SANS-SERIF CAPITAL K;Lu;0;L; 004B;;;;N;;;;; +1D5AB;MATHEMATICAL SANS-SERIF CAPITAL L;Lu;0;L; 004C;;;;N;;;;; +1D5AC;MATHEMATICAL SANS-SERIF CAPITAL M;Lu;0;L; 004D;;;;N;;;;; +1D5AD;MATHEMATICAL SANS-SERIF CAPITAL N;Lu;0;L; 004E;;;;N;;;;; +1D5AE;MATHEMATICAL SANS-SERIF CAPITAL O;Lu;0;L; 004F;;;;N;;;;; +1D5AF;MATHEMATICAL SANS-SERIF CAPITAL P;Lu;0;L; 0050;;;;N;;;;; +1D5B0;MATHEMATICAL SANS-SERIF CAPITAL Q;Lu;0;L; 0051;;;;N;;;;; +1D5B1;MATHEMATICAL SANS-SERIF CAPITAL R;Lu;0;L; 0052;;;;N;;;;; +1D5B2;MATHEMATICAL SANS-SERIF CAPITAL S;Lu;0;L; 0053;;;;N;;;;; +1D5B3;MATHEMATICAL SANS-SERIF CAPITAL T;Lu;0;L; 0054;;;;N;;;;; +1D5B4;MATHEMATICAL SANS-SERIF CAPITAL U;Lu;0;L; 0055;;;;N;;;;; +1D5B5;MATHEMATICAL SANS-SERIF CAPITAL V;Lu;0;L; 0056;;;;N;;;;; +1D5B6;MATHEMATICAL SANS-SERIF CAPITAL W;Lu;0;L; 0057;;;;N;;;;; +1D5B7;MATHEMATICAL SANS-SERIF CAPITAL X;Lu;0;L; 0058;;;;N;;;;; +1D5B8;MATHEMATICAL SANS-SERIF CAPITAL Y;Lu;0;L; 0059;;;;N;;;;; +1D5B9;MATHEMATICAL SANS-SERIF CAPITAL Z;Lu;0;L; 005A;;;;N;;;;; +1D5BA;MATHEMATICAL SANS-SERIF SMALL A;Ll;0;L; 0061;;;;N;;;;; +1D5BB;MATHEMATICAL SANS-SERIF SMALL B;Ll;0;L; 0062;;;;N;;;;; +1D5BC;MATHEMATICAL SANS-SERIF SMALL C;Ll;0;L; 0063;;;;N;;;;; +1D5BD;MATHEMATICAL SANS-SERIF SMALL D;Ll;0;L; 0064;;;;N;;;;; +1D5BE;MATHEMATICAL SANS-SERIF SMALL E;Ll;0;L; 0065;;;;N;;;;; +1D5BF;MATHEMATICAL SANS-SERIF SMALL F;Ll;0;L; 0066;;;;N;;;;; +1D5C0;MATHEMATICAL SANS-SERIF SMALL G;Ll;0;L; 0067;;;;N;;;;; +1D5C1;MATHEMATICAL SANS-SERIF SMALL H;Ll;0;L; 0068;;;;N;;;;; +1D5C2;MATHEMATICAL SANS-SERIF SMALL I;Ll;0;L; 0069;;;;N;;;;; +1D5C3;MATHEMATICAL SANS-SERIF SMALL J;Ll;0;L; 006A;;;;N;;;;; +1D5C4;MATHEMATICAL SANS-SERIF SMALL K;Ll;0;L; 006B;;;;N;;;;; +1D5C5;MATHEMATICAL SANS-SERIF SMALL L;Ll;0;L; 006C;;;;N;;;;; +1D5C6;MATHEMATICAL SANS-SERIF SMALL M;Ll;0;L; 006D;;;;N;;;;; +1D5C7;MATHEMATICAL SANS-SERIF SMALL N;Ll;0;L; 006E;;;;N;;;;; +1D5C8;MATHEMATICAL SANS-SERIF SMALL O;Ll;0;L; 006F;;;;N;;;;; +1D5C9;MATHEMATICAL SANS-SERIF SMALL P;Ll;0;L; 0070;;;;N;;;;; +1D5CA;MATHEMATICAL SANS-SERIF SMALL Q;Ll;0;L; 0071;;;;N;;;;; +1D5CB;MATHEMATICAL SANS-SERIF SMALL R;Ll;0;L; 0072;;;;N;;;;; +1D5CC;MATHEMATICAL SANS-SERIF SMALL S;Ll;0;L; 0073;;;;N;;;;; +1D5CD;MATHEMATICAL SANS-SERIF SMALL T;Ll;0;L; 0074;;;;N;;;;; +1D5CE;MATHEMATICAL SANS-SERIF SMALL U;Ll;0;L; 0075;;;;N;;;;; +1D5CF;MATHEMATICAL SANS-SERIF SMALL V;Ll;0;L; 0076;;;;N;;;;; +1D5D0;MATHEMATICAL SANS-SERIF SMALL W;Ll;0;L; 0077;;;;N;;;;; +1D5D1;MATHEMATICAL SANS-SERIF SMALL X;Ll;0;L; 0078;;;;N;;;;; +1D5D2;MATHEMATICAL SANS-SERIF SMALL Y;Ll;0;L; 0079;;;;N;;;;; +1D5D3;MATHEMATICAL SANS-SERIF SMALL Z;Ll;0;L; 007A;;;;N;;;;; +1D5D4;MATHEMATICAL SANS-SERIF BOLD CAPITAL A;Lu;0;L; 0041;;;;N;;;;; +1D5D5;MATHEMATICAL SANS-SERIF BOLD CAPITAL B;Lu;0;L; 0042;;;;N;;;;; +1D5D6;MATHEMATICAL SANS-SERIF BOLD CAPITAL C;Lu;0;L; 0043;;;;N;;;;; +1D5D7;MATHEMATICAL SANS-SERIF BOLD CAPITAL D;Lu;0;L; 0044;;;;N;;;;; +1D5D8;MATHEMATICAL SANS-SERIF BOLD CAPITAL E;Lu;0;L; 0045;;;;N;;;;; +1D5D9;MATHEMATICAL SANS-SERIF BOLD CAPITAL F;Lu;0;L; 0046;;;;N;;;;; +1D5DA;MATHEMATICAL SANS-SERIF BOLD CAPITAL G;Lu;0;L; 0047;;;;N;;;;; +1D5DB;MATHEMATICAL SANS-SERIF BOLD CAPITAL H;Lu;0;L; 0048;;;;N;;;;; +1D5DC;MATHEMATICAL SANS-SERIF BOLD CAPITAL I;Lu;0;L; 0049;;;;N;;;;; +1D5DD;MATHEMATICAL SANS-SERIF BOLD CAPITAL J;Lu;0;L; 004A;;;;N;;;;; +1D5DE;MATHEMATICAL SANS-SERIF BOLD CAPITAL K;Lu;0;L; 004B;;;;N;;;;; +1D5DF;MATHEMATICAL SANS-SERIF BOLD CAPITAL L;Lu;0;L; 004C;;;;N;;;;; +1D5E0;MATHEMATICAL SANS-SERIF BOLD CAPITAL M;Lu;0;L; 004D;;;;N;;;;; +1D5E1;MATHEMATICAL SANS-SERIF BOLD CAPITAL N;Lu;0;L; 004E;;;;N;;;;; +1D5E2;MATHEMATICAL SANS-SERIF BOLD CAPITAL O;Lu;0;L; 004F;;;;N;;;;; +1D5E3;MATHEMATICAL SANS-SERIF BOLD CAPITAL P;Lu;0;L; 0050;;;;N;;;;; +1D5E4;MATHEMATICAL SANS-SERIF BOLD CAPITAL Q;Lu;0;L; 0051;;;;N;;;;; +1D5E5;MATHEMATICAL SANS-SERIF BOLD CAPITAL R;Lu;0;L; 0052;;;;N;;;;; +1D5E6;MATHEMATICAL SANS-SERIF BOLD CAPITAL S;Lu;0;L; 0053;;;;N;;;;; +1D5E7;MATHEMATICAL SANS-SERIF BOLD CAPITAL T;Lu;0;L; 0054;;;;N;;;;; +1D5E8;MATHEMATICAL SANS-SERIF BOLD CAPITAL U;Lu;0;L; 0055;;;;N;;;;; +1D5E9;MATHEMATICAL SANS-SERIF BOLD CAPITAL V;Lu;0;L; 0056;;;;N;;;;; +1D5EA;MATHEMATICAL SANS-SERIF BOLD CAPITAL W;Lu;0;L; 0057;;;;N;;;;; +1D5EB;MATHEMATICAL SANS-SERIF BOLD CAPITAL X;Lu;0;L; 0058;;;;N;;;;; +1D5EC;MATHEMATICAL SANS-SERIF BOLD CAPITAL Y;Lu;0;L; 0059;;;;N;;;;; +1D5ED;MATHEMATICAL SANS-SERIF BOLD CAPITAL Z;Lu;0;L; 005A;;;;N;;;;; +1D5EE;MATHEMATICAL SANS-SERIF BOLD SMALL A;Ll;0;L; 0061;;;;N;;;;; +1D5EF;MATHEMATICAL SANS-SERIF BOLD SMALL B;Ll;0;L; 0062;;;;N;;;;; +1D5F0;MATHEMATICAL SANS-SERIF BOLD SMALL C;Ll;0;L; 0063;;;;N;;;;; +1D5F1;MATHEMATICAL SANS-SERIF BOLD SMALL D;Ll;0;L; 0064;;;;N;;;;; +1D5F2;MATHEMATICAL SANS-SERIF BOLD SMALL E;Ll;0;L; 0065;;;;N;;;;; +1D5F3;MATHEMATICAL SANS-SERIF BOLD SMALL F;Ll;0;L; 0066;;;;N;;;;; +1D5F4;MATHEMATICAL SANS-SERIF BOLD SMALL G;Ll;0;L; 0067;;;;N;;;;; +1D5F5;MATHEMATICAL SANS-SERIF BOLD SMALL H;Ll;0;L; 0068;;;;N;;;;; +1D5F6;MATHEMATICAL SANS-SERIF BOLD SMALL I;Ll;0;L; 0069;;;;N;;;;; +1D5F7;MATHEMATICAL SANS-SERIF BOLD SMALL J;Ll;0;L; 006A;;;;N;;;;; +1D5F8;MATHEMATICAL SANS-SERIF BOLD SMALL K;Ll;0;L; 006B;;;;N;;;;; +1D5F9;MATHEMATICAL SANS-SERIF BOLD SMALL L;Ll;0;L; 006C;;;;N;;;;; +1D5FA;MATHEMATICAL SANS-SERIF BOLD SMALL M;Ll;0;L; 006D;;;;N;;;;; +1D5FB;MATHEMATICAL SANS-SERIF BOLD SMALL N;Ll;0;L; 006E;;;;N;;;;; +1D5FC;MATHEMATICAL SANS-SERIF BOLD SMALL O;Ll;0;L; 006F;;;;N;;;;; +1D5FD;MATHEMATICAL SANS-SERIF BOLD SMALL P;Ll;0;L; 0070;;;;N;;;;; +1D5FE;MATHEMATICAL SANS-SERIF BOLD SMALL Q;Ll;0;L; 0071;;;;N;;;;; +1D5FF;MATHEMATICAL SANS-SERIF BOLD SMALL R;Ll;0;L; 0072;;;;N;;;;; +1D600;MATHEMATICAL SANS-SERIF BOLD SMALL S;Ll;0;L; 0073;;;;N;;;;; +1D601;MATHEMATICAL SANS-SERIF BOLD SMALL T;Ll;0;L; 0074;;;;N;;;;; +1D602;MATHEMATICAL SANS-SERIF BOLD SMALL U;Ll;0;L; 0075;;;;N;;;;; +1D603;MATHEMATICAL SANS-SERIF BOLD SMALL V;Ll;0;L; 0076;;;;N;;;;; +1D604;MATHEMATICAL SANS-SERIF BOLD SMALL W;Ll;0;L; 0077;;;;N;;;;; +1D605;MATHEMATICAL SANS-SERIF BOLD SMALL X;Ll;0;L; 0078;;;;N;;;;; +1D606;MATHEMATICAL SANS-SERIF BOLD SMALL Y;Ll;0;L; 0079;;;;N;;;;; +1D607;MATHEMATICAL SANS-SERIF BOLD SMALL Z;Ll;0;L; 007A;;;;N;;;;; +1D608;MATHEMATICAL SANS-SERIF ITALIC CAPITAL A;Lu;0;L; 0041;;;;N;;;;; +1D609;MATHEMATICAL SANS-SERIF ITALIC CAPITAL B;Lu;0;L; 0042;;;;N;;;;; +1D60A;MATHEMATICAL SANS-SERIF ITALIC CAPITAL C;Lu;0;L; 0043;;;;N;;;;; +1D60B;MATHEMATICAL SANS-SERIF ITALIC CAPITAL D;Lu;0;L; 0044;;;;N;;;;; +1D60C;MATHEMATICAL SANS-SERIF ITALIC CAPITAL E;Lu;0;L; 0045;;;;N;;;;; +1D60D;MATHEMATICAL SANS-SERIF ITALIC CAPITAL F;Lu;0;L; 0046;;;;N;;;;; +1D60E;MATHEMATICAL SANS-SERIF ITALIC CAPITAL G;Lu;0;L; 0047;;;;N;;;;; +1D60F;MATHEMATICAL SANS-SERIF ITALIC CAPITAL H;Lu;0;L; 0048;;;;N;;;;; +1D610;MATHEMATICAL SANS-SERIF ITALIC CAPITAL I;Lu;0;L; 0049;;;;N;;;;; +1D611;MATHEMATICAL SANS-SERIF ITALIC CAPITAL J;Lu;0;L; 004A;;;;N;;;;; +1D612;MATHEMATICAL SANS-SERIF ITALIC CAPITAL K;Lu;0;L; 004B;;;;N;;;;; +1D613;MATHEMATICAL SANS-SERIF ITALIC CAPITAL L;Lu;0;L; 004C;;;;N;;;;; +1D614;MATHEMATICAL SANS-SERIF ITALIC CAPITAL M;Lu;0;L; 004D;;;;N;;;;; +1D615;MATHEMATICAL SANS-SERIF ITALIC CAPITAL N;Lu;0;L; 004E;;;;N;;;;; +1D616;MATHEMATICAL SANS-SERIF ITALIC CAPITAL O;Lu;0;L; 004F;;;;N;;;;; +1D617;MATHEMATICAL SANS-SERIF ITALIC CAPITAL P;Lu;0;L; 0050;;;;N;;;;; +1D618;MATHEMATICAL SANS-SERIF ITALIC CAPITAL Q;Lu;0;L; 0051;;;;N;;;;; +1D619;MATHEMATICAL SANS-SERIF ITALIC CAPITAL R;Lu;0;L; 0052;;;;N;;;;; +1D61A;MATHEMATICAL SANS-SERIF ITALIC CAPITAL S;Lu;0;L; 0053;;;;N;;;;; +1D61B;MATHEMATICAL SANS-SERIF ITALIC CAPITAL T;Lu;0;L; 0054;;;;N;;;;; +1D61C;MATHEMATICAL SANS-SERIF ITALIC CAPITAL U;Lu;0;L; 0055;;;;N;;;;; +1D61D;MATHEMATICAL SANS-SERIF ITALIC CAPITAL V;Lu;0;L; 0056;;;;N;;;;; +1D61E;MATHEMATICAL SANS-SERIF ITALIC CAPITAL W;Lu;0;L; 0057;;;;N;;;;; +1D61F;MATHEMATICAL SANS-SERIF ITALIC CAPITAL X;Lu;0;L; 0058;;;;N;;;;; +1D620;MATHEMATICAL SANS-SERIF ITALIC CAPITAL Y;Lu;0;L; 0059;;;;N;;;;; +1D621;MATHEMATICAL SANS-SERIF ITALIC CAPITAL Z;Lu;0;L; 005A;;;;N;;;;; +1D622;MATHEMATICAL SANS-SERIF ITALIC SMALL A;Ll;0;L; 0061;;;;N;;;;; +1D623;MATHEMATICAL SANS-SERIF ITALIC SMALL B;Ll;0;L; 0062;;;;N;;;;; +1D624;MATHEMATICAL SANS-SERIF ITALIC SMALL C;Ll;0;L; 0063;;;;N;;;;; +1D625;MATHEMATICAL SANS-SERIF ITALIC SMALL D;Ll;0;L; 0064;;;;N;;;;; +1D626;MATHEMATICAL SANS-SERIF ITALIC SMALL E;Ll;0;L; 0065;;;;N;;;;; +1D627;MATHEMATICAL SANS-SERIF ITALIC SMALL F;Ll;0;L; 0066;;;;N;;;;; +1D628;MATHEMATICAL SANS-SERIF ITALIC SMALL G;Ll;0;L; 0067;;;;N;;;;; +1D629;MATHEMATICAL SANS-SERIF ITALIC SMALL H;Ll;0;L; 0068;;;;N;;;;; +1D62A;MATHEMATICAL SANS-SERIF ITALIC SMALL I;Ll;0;L; 0069;;;;N;;;;; +1D62B;MATHEMATICAL SANS-SERIF ITALIC SMALL J;Ll;0;L; 006A;;;;N;;;;; +1D62C;MATHEMATICAL SANS-SERIF ITALIC SMALL K;Ll;0;L; 006B;;;;N;;;;; +1D62D;MATHEMATICAL SANS-SERIF ITALIC SMALL L;Ll;0;L; 006C;;;;N;;;;; +1D62E;MATHEMATICAL SANS-SERIF ITALIC SMALL M;Ll;0;L; 006D;;;;N;;;;; +1D62F;MATHEMATICAL SANS-SERIF ITALIC SMALL N;Ll;0;L; 006E;;;;N;;;;; +1D630;MATHEMATICAL SANS-SERIF ITALIC SMALL O;Ll;0;L; 006F;;;;N;;;;; +1D631;MATHEMATICAL SANS-SERIF ITALIC SMALL P;Ll;0;L; 0070;;;;N;;;;; +1D632;MATHEMATICAL SANS-SERIF ITALIC SMALL Q;Ll;0;L; 0071;;;;N;;;;; +1D633;MATHEMATICAL SANS-SERIF ITALIC SMALL R;Ll;0;L; 0072;;;;N;;;;; +1D634;MATHEMATICAL SANS-SERIF ITALIC SMALL S;Ll;0;L; 0073;;;;N;;;;; +1D635;MATHEMATICAL SANS-SERIF ITALIC SMALL T;Ll;0;L; 0074;;;;N;;;;; +1D636;MATHEMATICAL SANS-SERIF ITALIC SMALL U;Ll;0;L; 0075;;;;N;;;;; +1D637;MATHEMATICAL SANS-SERIF ITALIC SMALL V;Ll;0;L; 0076;;;;N;;;;; +1D638;MATHEMATICAL SANS-SERIF ITALIC SMALL W;Ll;0;L; 0077;;;;N;;;;; +1D639;MATHEMATICAL SANS-SERIF ITALIC SMALL X;Ll;0;L; 0078;;;;N;;;;; +1D63A;MATHEMATICAL SANS-SERIF ITALIC SMALL Y;Ll;0;L; 0079;;;;N;;;;; +1D63B;MATHEMATICAL SANS-SERIF ITALIC SMALL Z;Ll;0;L; 007A;;;;N;;;;; +1D63C;MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL A;Lu;0;L; 0041;;;;N;;;;; +1D63D;MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL B;Lu;0;L; 0042;;;;N;;;;; +1D63E;MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL C;Lu;0;L; 0043;;;;N;;;;; +1D63F;MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL D;Lu;0;L; 0044;;;;N;;;;; +1D640;MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL E;Lu;0;L; 0045;;;;N;;;;; +1D641;MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL F;Lu;0;L; 0046;;;;N;;;;; +1D642;MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL G;Lu;0;L; 0047;;;;N;;;;; +1D643;MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL H;Lu;0;L; 0048;;;;N;;;;; +1D644;MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL I;Lu;0;L; 0049;;;;N;;;;; +1D645;MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL J;Lu;0;L; 004A;;;;N;;;;; +1D646;MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL K;Lu;0;L; 004B;;;;N;;;;; +1D647;MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL L;Lu;0;L; 004C;;;;N;;;;; +1D648;MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL M;Lu;0;L; 004D;;;;N;;;;; +1D649;MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL N;Lu;0;L; 004E;;;;N;;;;; +1D64A;MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL O;Lu;0;L; 004F;;;;N;;;;; +1D64B;MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL P;Lu;0;L; 0050;;;;N;;;;; +1D64C;MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL Q;Lu;0;L; 0051;;;;N;;;;; +1D64D;MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL R;Lu;0;L; 0052;;;;N;;;;; +1D64E;MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL S;Lu;0;L; 0053;;;;N;;;;; +1D64F;MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL T;Lu;0;L; 0054;;;;N;;;;; +1D650;MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL U;Lu;0;L; 0055;;;;N;;;;; +1D651;MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL V;Lu;0;L; 0056;;;;N;;;;; +1D652;MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL W;Lu;0;L; 0057;;;;N;;;;; +1D653;MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL X;Lu;0;L; 0058;;;;N;;;;; +1D654;MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL Y;Lu;0;L; 0059;;;;N;;;;; +1D655;MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL Z;Lu;0;L; 005A;;;;N;;;;; +1D656;MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL A;Ll;0;L; 0061;;;;N;;;;; +1D657;MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL B;Ll;0;L; 0062;;;;N;;;;; +1D658;MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL C;Ll;0;L; 0063;;;;N;;;;; +1D659;MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL D;Ll;0;L; 0064;;;;N;;;;; +1D65A;MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL E;Ll;0;L; 0065;;;;N;;;;; +1D65B;MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL F;Ll;0;L; 0066;;;;N;;;;; +1D65C;MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL G;Ll;0;L; 0067;;;;N;;;;; +1D65D;MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL H;Ll;0;L; 0068;;;;N;;;;; +1D65E;MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL I;Ll;0;L; 0069;;;;N;;;;; +1D65F;MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL J;Ll;0;L; 006A;;;;N;;;;; +1D660;MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL K;Ll;0;L; 006B;;;;N;;;;; +1D661;MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL L;Ll;0;L; 006C;;;;N;;;;; +1D662;MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL M;Ll;0;L; 006D;;;;N;;;;; +1D663;MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL N;Ll;0;L; 006E;;;;N;;;;; +1D664;MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL O;Ll;0;L; 006F;;;;N;;;;; +1D665;MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL P;Ll;0;L; 0070;;;;N;;;;; +1D666;MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL Q;Ll;0;L; 0071;;;;N;;;;; +1D667;MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL R;Ll;0;L; 0072;;;;N;;;;; +1D668;MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL S;Ll;0;L; 0073;;;;N;;;;; +1D669;MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL T;Ll;0;L; 0074;;;;N;;;;; +1D66A;MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL U;Ll;0;L; 0075;;;;N;;;;; +1D66B;MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL V;Ll;0;L; 0076;;;;N;;;;; +1D66C;MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL W;Ll;0;L; 0077;;;;N;;;;; +1D66D;MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL X;Ll;0;L; 0078;;;;N;;;;; +1D66E;MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL Y;Ll;0;L; 0079;;;;N;;;;; +1D66F;MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL Z;Ll;0;L; 007A;;;;N;;;;; +1D670;MATHEMATICAL MONOSPACE CAPITAL A;Lu;0;L; 0041;;;;N;;;;; +1D671;MATHEMATICAL MONOSPACE CAPITAL B;Lu;0;L; 0042;;;;N;;;;; +1D672;MATHEMATICAL MONOSPACE CAPITAL C;Lu;0;L; 0043;;;;N;;;;; +1D673;MATHEMATICAL MONOSPACE CAPITAL D;Lu;0;L; 0044;;;;N;;;;; +1D674;MATHEMATICAL MONOSPACE CAPITAL E;Lu;0;L; 0045;;;;N;;;;; +1D675;MATHEMATICAL MONOSPACE CAPITAL F;Lu;0;L; 0046;;;;N;;;;; +1D676;MATHEMATICAL MONOSPACE CAPITAL G;Lu;0;L; 0047;;;;N;;;;; +1D677;MATHEMATICAL MONOSPACE CAPITAL H;Lu;0;L; 0048;;;;N;;;;; +1D678;MATHEMATICAL MONOSPACE CAPITAL I;Lu;0;L; 0049;;;;N;;;;; +1D679;MATHEMATICAL MONOSPACE CAPITAL J;Lu;0;L; 004A;;;;N;;;;; +1D67A;MATHEMATICAL MONOSPACE CAPITAL K;Lu;0;L; 004B;;;;N;;;;; +1D67B;MATHEMATICAL MONOSPACE CAPITAL L;Lu;0;L; 004C;;;;N;;;;; +1D67C;MATHEMATICAL MONOSPACE CAPITAL M;Lu;0;L; 004D;;;;N;;;;; +1D67D;MATHEMATICAL MONOSPACE CAPITAL N;Lu;0;L; 004E;;;;N;;;;; +1D67E;MATHEMATICAL MONOSPACE CAPITAL O;Lu;0;L; 004F;;;;N;;;;; +1D67F;MATHEMATICAL MONOSPACE CAPITAL P;Lu;0;L; 0050;;;;N;;;;; +1D680;MATHEMATICAL MONOSPACE CAPITAL Q;Lu;0;L; 0051;;;;N;;;;; +1D681;MATHEMATICAL MONOSPACE CAPITAL R;Lu;0;L; 0052;;;;N;;;;; +1D682;MATHEMATICAL MONOSPACE CAPITAL S;Lu;0;L; 0053;;;;N;;;;; +1D683;MATHEMATICAL MONOSPACE CAPITAL T;Lu;0;L; 0054;;;;N;;;;; +1D684;MATHEMATICAL MONOSPACE CAPITAL U;Lu;0;L; 0055;;;;N;;;;; +1D685;MATHEMATICAL MONOSPACE CAPITAL V;Lu;0;L; 0056;;;;N;;;;; +1D686;MATHEMATICAL MONOSPACE CAPITAL W;Lu;0;L; 0057;;;;N;;;;; +1D687;MATHEMATICAL MONOSPACE CAPITAL X;Lu;0;L; 0058;;;;N;;;;; +1D688;MATHEMATICAL MONOSPACE CAPITAL Y;Lu;0;L; 0059;;;;N;;;;; +1D689;MATHEMATICAL MONOSPACE CAPITAL Z;Lu;0;L; 005A;;;;N;;;;; +1D68A;MATHEMATICAL MONOSPACE SMALL A;Ll;0;L; 0061;;;;N;;;;; +1D68B;MATHEMATICAL MONOSPACE SMALL B;Ll;0;L; 0062;;;;N;;;;; +1D68C;MATHEMATICAL MONOSPACE SMALL C;Ll;0;L; 0063;;;;N;;;;; +1D68D;MATHEMATICAL MONOSPACE SMALL D;Ll;0;L; 0064;;;;N;;;;; +1D68E;MATHEMATICAL MONOSPACE SMALL E;Ll;0;L; 0065;;;;N;;;;; +1D68F;MATHEMATICAL MONOSPACE SMALL F;Ll;0;L; 0066;;;;N;;;;; +1D690;MATHEMATICAL MONOSPACE SMALL G;Ll;0;L; 0067;;;;N;;;;; +1D691;MATHEMATICAL MONOSPACE SMALL H;Ll;0;L; 0068;;;;N;;;;; +1D692;MATHEMATICAL MONOSPACE SMALL I;Ll;0;L; 0069;;;;N;;;;; +1D693;MATHEMATICAL MONOSPACE SMALL J;Ll;0;L; 006A;;;;N;;;;; +1D694;MATHEMATICAL MONOSPACE SMALL K;Ll;0;L; 006B;;;;N;;;;; +1D695;MATHEMATICAL MONOSPACE SMALL L;Ll;0;L; 006C;;;;N;;;;; +1D696;MATHEMATICAL MONOSPACE SMALL M;Ll;0;L; 006D;;;;N;;;;; +1D697;MATHEMATICAL MONOSPACE SMALL N;Ll;0;L; 006E;;;;N;;;;; +1D698;MATHEMATICAL MONOSPACE SMALL O;Ll;0;L; 006F;;;;N;;;;; +1D699;MATHEMATICAL MONOSPACE SMALL P;Ll;0;L; 0070;;;;N;;;;; +1D69A;MATHEMATICAL MONOSPACE SMALL Q;Ll;0;L; 0071;;;;N;;;;; +1D69B;MATHEMATICAL MONOSPACE SMALL R;Ll;0;L; 0072;;;;N;;;;; +1D69C;MATHEMATICAL MONOSPACE SMALL S;Ll;0;L; 0073;;;;N;;;;; +1D69D;MATHEMATICAL MONOSPACE SMALL T;Ll;0;L; 0074;;;;N;;;;; +1D69E;MATHEMATICAL MONOSPACE SMALL U;Ll;0;L; 0075;;;;N;;;;; +1D69F;MATHEMATICAL MONOSPACE SMALL V;Ll;0;L; 0076;;;;N;;;;; +1D6A0;MATHEMATICAL MONOSPACE SMALL W;Ll;0;L; 0077;;;;N;;;;; +1D6A1;MATHEMATICAL MONOSPACE SMALL X;Ll;0;L; 0078;;;;N;;;;; +1D6A2;MATHEMATICAL MONOSPACE SMALL Y;Ll;0;L; 0079;;;;N;;;;; +1D6A3;MATHEMATICAL MONOSPACE SMALL Z;Ll;0;L; 007A;;;;N;;;;; +1D6A4;MATHEMATICAL ITALIC SMALL DOTLESS I;Ll;0;L; 0131;;;;N;;;;; +1D6A5;MATHEMATICAL ITALIC SMALL DOTLESS J;Ll;0;L; 0237;;;;N;;;;; +1D6A8;MATHEMATICAL BOLD CAPITAL ALPHA;Lu;0;L; 0391;;;;N;;;;; +1D6A9;MATHEMATICAL BOLD CAPITAL BETA;Lu;0;L; 0392;;;;N;;;;; +1D6AA;MATHEMATICAL BOLD CAPITAL GAMMA;Lu;0;L; 0393;;;;N;;;;; +1D6AB;MATHEMATICAL BOLD CAPITAL DELTA;Lu;0;L; 0394;;;;N;;;;; +1D6AC;MATHEMATICAL BOLD CAPITAL EPSILON;Lu;0;L; 0395;;;;N;;;;; +1D6AD;MATHEMATICAL BOLD CAPITAL ZETA;Lu;0;L; 0396;;;;N;;;;; +1D6AE;MATHEMATICAL BOLD CAPITAL ETA;Lu;0;L; 0397;;;;N;;;;; +1D6AF;MATHEMATICAL BOLD CAPITAL THETA;Lu;0;L; 0398;;;;N;;;;; +1D6B0;MATHEMATICAL BOLD CAPITAL IOTA;Lu;0;L; 0399;;;;N;;;;; +1D6B1;MATHEMATICAL BOLD CAPITAL KAPPA;Lu;0;L; 039A;;;;N;;;;; +1D6B2;MATHEMATICAL BOLD CAPITAL LAMDA;Lu;0;L; 039B;;;;N;;;;; +1D6B3;MATHEMATICAL BOLD CAPITAL MU;Lu;0;L; 039C;;;;N;;;;; +1D6B4;MATHEMATICAL BOLD CAPITAL NU;Lu;0;L; 039D;;;;N;;;;; +1D6B5;MATHEMATICAL BOLD CAPITAL XI;Lu;0;L; 039E;;;;N;;;;; +1D6B6;MATHEMATICAL BOLD CAPITAL OMICRON;Lu;0;L; 039F;;;;N;;;;; +1D6B7;MATHEMATICAL BOLD CAPITAL PI;Lu;0;L; 03A0;;;;N;;;;; +1D6B8;MATHEMATICAL BOLD CAPITAL RHO;Lu;0;L; 03A1;;;;N;;;;; +1D6B9;MATHEMATICAL BOLD CAPITAL THETA SYMBOL;Lu;0;L; 03F4;;;;N;;;;; +1D6BA;MATHEMATICAL BOLD CAPITAL SIGMA;Lu;0;L; 03A3;;;;N;;;;; +1D6BB;MATHEMATICAL BOLD CAPITAL TAU;Lu;0;L; 03A4;;;;N;;;;; +1D6BC;MATHEMATICAL BOLD CAPITAL UPSILON;Lu;0;L; 03A5;;;;N;;;;; +1D6BD;MATHEMATICAL BOLD CAPITAL PHI;Lu;0;L; 03A6;;;;N;;;;; +1D6BE;MATHEMATICAL BOLD CAPITAL CHI;Lu;0;L; 03A7;;;;N;;;;; +1D6BF;MATHEMATICAL BOLD CAPITAL PSI;Lu;0;L; 03A8;;;;N;;;;; +1D6C0;MATHEMATICAL BOLD CAPITAL OMEGA;Lu;0;L; 03A9;;;;N;;;;; +1D6C1;MATHEMATICAL BOLD NABLA;Sm;0;L; 2207;;;;N;;;;; +1D6C2;MATHEMATICAL BOLD SMALL ALPHA;Ll;0;L; 03B1;;;;N;;;;; +1D6C3;MATHEMATICAL BOLD SMALL BETA;Ll;0;L; 03B2;;;;N;;;;; +1D6C4;MATHEMATICAL BOLD SMALL GAMMA;Ll;0;L; 03B3;;;;N;;;;; +1D6C5;MATHEMATICAL BOLD SMALL DELTA;Ll;0;L; 03B4;;;;N;;;;; +1D6C6;MATHEMATICAL BOLD SMALL EPSILON;Ll;0;L; 03B5;;;;N;;;;; +1D6C7;MATHEMATICAL BOLD SMALL ZETA;Ll;0;L; 03B6;;;;N;;;;; +1D6C8;MATHEMATICAL BOLD SMALL ETA;Ll;0;L; 03B7;;;;N;;;;; +1D6C9;MATHEMATICAL BOLD SMALL THETA;Ll;0;L; 03B8;;;;N;;;;; +1D6CA;MATHEMATICAL BOLD SMALL IOTA;Ll;0;L; 03B9;;;;N;;;;; +1D6CB;MATHEMATICAL BOLD SMALL KAPPA;Ll;0;L; 03BA;;;;N;;;;; +1D6CC;MATHEMATICAL BOLD SMALL LAMDA;Ll;0;L; 03BB;;;;N;;;;; +1D6CD;MATHEMATICAL BOLD SMALL MU;Ll;0;L; 03BC;;;;N;;;;; +1D6CE;MATHEMATICAL BOLD SMALL NU;Ll;0;L; 03BD;;;;N;;;;; +1D6CF;MATHEMATICAL BOLD SMALL XI;Ll;0;L; 03BE;;;;N;;;;; +1D6D0;MATHEMATICAL BOLD SMALL OMICRON;Ll;0;L; 03BF;;;;N;;;;; +1D6D1;MATHEMATICAL BOLD SMALL PI;Ll;0;L; 03C0;;;;N;;;;; +1D6D2;MATHEMATICAL BOLD SMALL RHO;Ll;0;L; 03C1;;;;N;;;;; +1D6D3;MATHEMATICAL BOLD SMALL FINAL SIGMA;Ll;0;L; 03C2;;;;N;;;;; +1D6D4;MATHEMATICAL BOLD SMALL SIGMA;Ll;0;L; 03C3;;;;N;;;;; +1D6D5;MATHEMATICAL BOLD SMALL TAU;Ll;0;L; 03C4;;;;N;;;;; +1D6D6;MATHEMATICAL BOLD SMALL UPSILON;Ll;0;L; 03C5;;;;N;;;;; +1D6D7;MATHEMATICAL BOLD SMALL PHI;Ll;0;L; 03C6;;;;N;;;;; +1D6D8;MATHEMATICAL BOLD SMALL CHI;Ll;0;L; 03C7;;;;N;;;;; +1D6D9;MATHEMATICAL BOLD SMALL PSI;Ll;0;L; 03C8;;;;N;;;;; +1D6DA;MATHEMATICAL BOLD SMALL OMEGA;Ll;0;L; 03C9;;;;N;;;;; +1D6DB;MATHEMATICAL BOLD PARTIAL DIFFERENTIAL;Sm;0;ON; 2202;;;;Y;;;;; +1D6DC;MATHEMATICAL BOLD EPSILON SYMBOL;Ll;0;L; 03F5;;;;N;;;;; +1D6DD;MATHEMATICAL BOLD THETA SYMBOL;Ll;0;L; 03D1;;;;N;;;;; +1D6DE;MATHEMATICAL BOLD KAPPA SYMBOL;Ll;0;L; 03F0;;;;N;;;;; +1D6DF;MATHEMATICAL BOLD PHI SYMBOL;Ll;0;L; 03D5;;;;N;;;;; +1D6E0;MATHEMATICAL BOLD RHO SYMBOL;Ll;0;L; 03F1;;;;N;;;;; +1D6E1;MATHEMATICAL BOLD PI SYMBOL;Ll;0;L; 03D6;;;;N;;;;; +1D6E2;MATHEMATICAL ITALIC CAPITAL ALPHA;Lu;0;L; 0391;;;;N;;;;; +1D6E3;MATHEMATICAL ITALIC CAPITAL BETA;Lu;0;L; 0392;;;;N;;;;; +1D6E4;MATHEMATICAL ITALIC CAPITAL GAMMA;Lu;0;L; 0393;;;;N;;;;; +1D6E5;MATHEMATICAL ITALIC CAPITAL DELTA;Lu;0;L; 0394;;;;N;;;;; +1D6E6;MATHEMATICAL ITALIC CAPITAL EPSILON;Lu;0;L; 0395;;;;N;;;;; +1D6E7;MATHEMATICAL ITALIC CAPITAL ZETA;Lu;0;L; 0396;;;;N;;;;; +1D6E8;MATHEMATICAL ITALIC CAPITAL ETA;Lu;0;L; 0397;;;;N;;;;; +1D6E9;MATHEMATICAL ITALIC CAPITAL THETA;Lu;0;L; 0398;;;;N;;;;; +1D6EA;MATHEMATICAL ITALIC CAPITAL IOTA;Lu;0;L; 0399;;;;N;;;;; +1D6EB;MATHEMATICAL ITALIC CAPITAL KAPPA;Lu;0;L; 039A;;;;N;;;;; +1D6EC;MATHEMATICAL ITALIC CAPITAL LAMDA;Lu;0;L; 039B;;;;N;;;;; +1D6ED;MATHEMATICAL ITALIC CAPITAL MU;Lu;0;L; 039C;;;;N;;;;; +1D6EE;MATHEMATICAL ITALIC CAPITAL NU;Lu;0;L; 039D;;;;N;;;;; +1D6EF;MATHEMATICAL ITALIC CAPITAL XI;Lu;0;L; 039E;;;;N;;;;; +1D6F0;MATHEMATICAL ITALIC CAPITAL OMICRON;Lu;0;L; 039F;;;;N;;;;; +1D6F1;MATHEMATICAL ITALIC CAPITAL PI;Lu;0;L; 03A0;;;;N;;;;; +1D6F2;MATHEMATICAL ITALIC CAPITAL RHO;Lu;0;L; 03A1;;;;N;;;;; +1D6F3;MATHEMATICAL ITALIC CAPITAL THETA SYMBOL;Lu;0;L; 03F4;;;;N;;;;; +1D6F4;MATHEMATICAL ITALIC CAPITAL SIGMA;Lu;0;L; 03A3;;;;N;;;;; +1D6F5;MATHEMATICAL ITALIC CAPITAL TAU;Lu;0;L; 03A4;;;;N;;;;; +1D6F6;MATHEMATICAL ITALIC CAPITAL UPSILON;Lu;0;L; 03A5;;;;N;;;;; +1D6F7;MATHEMATICAL ITALIC CAPITAL PHI;Lu;0;L; 03A6;;;;N;;;;; +1D6F8;MATHEMATICAL ITALIC CAPITAL CHI;Lu;0;L; 03A7;;;;N;;;;; +1D6F9;MATHEMATICAL ITALIC CAPITAL PSI;Lu;0;L; 03A8;;;;N;;;;; +1D6FA;MATHEMATICAL ITALIC CAPITAL OMEGA;Lu;0;L; 03A9;;;;N;;;;; +1D6FB;MATHEMATICAL ITALIC NABLA;Sm;0;L; 2207;;;;N;;;;; +1D6FC;MATHEMATICAL ITALIC SMALL ALPHA;Ll;0;L; 03B1;;;;N;;;;; +1D6FD;MATHEMATICAL ITALIC SMALL BETA;Ll;0;L; 03B2;;;;N;;;;; +1D6FE;MATHEMATICAL ITALIC SMALL GAMMA;Ll;0;L; 03B3;;;;N;;;;; +1D6FF;MATHEMATICAL ITALIC SMALL DELTA;Ll;0;L; 03B4;;;;N;;;;; +1D700;MATHEMATICAL ITALIC SMALL EPSILON;Ll;0;L; 03B5;;;;N;;;;; +1D701;MATHEMATICAL ITALIC SMALL ZETA;Ll;0;L; 03B6;;;;N;;;;; +1D702;MATHEMATICAL ITALIC SMALL ETA;Ll;0;L; 03B7;;;;N;;;;; +1D703;MATHEMATICAL ITALIC SMALL THETA;Ll;0;L; 03B8;;;;N;;;;; +1D704;MATHEMATICAL ITALIC SMALL IOTA;Ll;0;L; 03B9;;;;N;;;;; +1D705;MATHEMATICAL ITALIC SMALL KAPPA;Ll;0;L; 03BA;;;;N;;;;; +1D706;MATHEMATICAL ITALIC SMALL LAMDA;Ll;0;L; 03BB;;;;N;;;;; +1D707;MATHEMATICAL ITALIC SMALL MU;Ll;0;L; 03BC;;;;N;;;;; +1D708;MATHEMATICAL ITALIC SMALL NU;Ll;0;L; 03BD;;;;N;;;;; +1D709;MATHEMATICAL ITALIC SMALL XI;Ll;0;L; 03BE;;;;N;;;;; +1D70A;MATHEMATICAL ITALIC SMALL OMICRON;Ll;0;L; 03BF;;;;N;;;;; +1D70B;MATHEMATICAL ITALIC SMALL PI;Ll;0;L; 03C0;;;;N;;;;; +1D70C;MATHEMATICAL ITALIC SMALL RHO;Ll;0;L; 03C1;;;;N;;;;; +1D70D;MATHEMATICAL ITALIC SMALL FINAL SIGMA;Ll;0;L; 03C2;;;;N;;;;; +1D70E;MATHEMATICAL ITALIC SMALL SIGMA;Ll;0;L; 03C3;;;;N;;;;; +1D70F;MATHEMATICAL ITALIC SMALL TAU;Ll;0;L; 03C4;;;;N;;;;; +1D710;MATHEMATICAL ITALIC SMALL UPSILON;Ll;0;L; 03C5;;;;N;;;;; +1D711;MATHEMATICAL ITALIC SMALL PHI;Ll;0;L; 03C6;;;;N;;;;; +1D712;MATHEMATICAL ITALIC SMALL CHI;Ll;0;L; 03C7;;;;N;;;;; +1D713;MATHEMATICAL ITALIC SMALL PSI;Ll;0;L; 03C8;;;;N;;;;; +1D714;MATHEMATICAL ITALIC SMALL OMEGA;Ll;0;L; 03C9;;;;N;;;;; +1D715;MATHEMATICAL ITALIC PARTIAL DIFFERENTIAL;Sm;0;ON; 2202;;;;Y;;;;; +1D716;MATHEMATICAL ITALIC EPSILON SYMBOL;Ll;0;L; 03F5;;;;N;;;;; +1D717;MATHEMATICAL ITALIC THETA SYMBOL;Ll;0;L; 03D1;;;;N;;;;; +1D718;MATHEMATICAL ITALIC KAPPA SYMBOL;Ll;0;L; 03F0;;;;N;;;;; +1D719;MATHEMATICAL ITALIC PHI SYMBOL;Ll;0;L; 03D5;;;;N;;;;; +1D71A;MATHEMATICAL ITALIC RHO SYMBOL;Ll;0;L; 03F1;;;;N;;;;; +1D71B;MATHEMATICAL ITALIC PI SYMBOL;Ll;0;L; 03D6;;;;N;;;;; +1D71C;MATHEMATICAL BOLD ITALIC CAPITAL ALPHA;Lu;0;L; 0391;;;;N;;;;; +1D71D;MATHEMATICAL BOLD ITALIC CAPITAL BETA;Lu;0;L; 0392;;;;N;;;;; +1D71E;MATHEMATICAL BOLD ITALIC CAPITAL GAMMA;Lu;0;L; 0393;;;;N;;;;; +1D71F;MATHEMATICAL BOLD ITALIC CAPITAL DELTA;Lu;0;L; 0394;;;;N;;;;; +1D720;MATHEMATICAL BOLD ITALIC CAPITAL EPSILON;Lu;0;L; 0395;;;;N;;;;; +1D721;MATHEMATICAL BOLD ITALIC CAPITAL ZETA;Lu;0;L; 0396;;;;N;;;;; +1D722;MATHEMATICAL BOLD ITALIC CAPITAL ETA;Lu;0;L; 0397;;;;N;;;;; +1D723;MATHEMATICAL BOLD ITALIC CAPITAL THETA;Lu;0;L; 0398;;;;N;;;;; +1D724;MATHEMATICAL BOLD ITALIC CAPITAL IOTA;Lu;0;L; 0399;;;;N;;;;; +1D725;MATHEMATICAL BOLD ITALIC CAPITAL KAPPA;Lu;0;L; 039A;;;;N;;;;; +1D726;MATHEMATICAL BOLD ITALIC CAPITAL LAMDA;Lu;0;L; 039B;;;;N;;;;; +1D727;MATHEMATICAL BOLD ITALIC CAPITAL MU;Lu;0;L; 039C;;;;N;;;;; +1D728;MATHEMATICAL BOLD ITALIC CAPITAL NU;Lu;0;L; 039D;;;;N;;;;; +1D729;MATHEMATICAL BOLD ITALIC CAPITAL XI;Lu;0;L; 039E;;;;N;;;;; +1D72A;MATHEMATICAL BOLD ITALIC CAPITAL OMICRON;Lu;0;L; 039F;;;;N;;;;; +1D72B;MATHEMATICAL BOLD ITALIC CAPITAL PI;Lu;0;L; 03A0;;;;N;;;;; +1D72C;MATHEMATICAL BOLD ITALIC CAPITAL RHO;Lu;0;L; 03A1;;;;N;;;;; +1D72D;MATHEMATICAL BOLD ITALIC CAPITAL THETA SYMBOL;Lu;0;L; 03F4;;;;N;;;;; +1D72E;MATHEMATICAL BOLD ITALIC CAPITAL SIGMA;Lu;0;L; 03A3;;;;N;;;;; +1D72F;MATHEMATICAL BOLD ITALIC CAPITAL TAU;Lu;0;L; 03A4;;;;N;;;;; +1D730;MATHEMATICAL BOLD ITALIC CAPITAL UPSILON;Lu;0;L; 03A5;;;;N;;;;; +1D731;MATHEMATICAL BOLD ITALIC CAPITAL PHI;Lu;0;L; 03A6;;;;N;;;;; +1D732;MATHEMATICAL BOLD ITALIC CAPITAL CHI;Lu;0;L; 03A7;;;;N;;;;; +1D733;MATHEMATICAL BOLD ITALIC CAPITAL PSI;Lu;0;L; 03A8;;;;N;;;;; +1D734;MATHEMATICAL BOLD ITALIC CAPITAL OMEGA;Lu;0;L; 03A9;;;;N;;;;; +1D735;MATHEMATICAL BOLD ITALIC NABLA;Sm;0;L; 2207;;;;N;;;;; +1D736;MATHEMATICAL BOLD ITALIC SMALL ALPHA;Ll;0;L; 03B1;;;;N;;;;; +1D737;MATHEMATICAL BOLD ITALIC SMALL BETA;Ll;0;L; 03B2;;;;N;;;;; +1D738;MATHEMATICAL BOLD ITALIC SMALL GAMMA;Ll;0;L; 03B3;;;;N;;;;; +1D739;MATHEMATICAL BOLD ITALIC SMALL DELTA;Ll;0;L; 03B4;;;;N;;;;; +1D73A;MATHEMATICAL BOLD ITALIC SMALL EPSILON;Ll;0;L; 03B5;;;;N;;;;; +1D73B;MATHEMATICAL BOLD ITALIC SMALL ZETA;Ll;0;L; 03B6;;;;N;;;;; +1D73C;MATHEMATICAL BOLD ITALIC SMALL ETA;Ll;0;L; 03B7;;;;N;;;;; +1D73D;MATHEMATICAL BOLD ITALIC SMALL THETA;Ll;0;L; 03B8;;;;N;;;;; +1D73E;MATHEMATICAL BOLD ITALIC SMALL IOTA;Ll;0;L; 03B9;;;;N;;;;; +1D73F;MATHEMATICAL BOLD ITALIC SMALL KAPPA;Ll;0;L; 03BA;;;;N;;;;; +1D740;MATHEMATICAL BOLD ITALIC SMALL LAMDA;Ll;0;L; 03BB;;;;N;;;;; +1D741;MATHEMATICAL BOLD ITALIC SMALL MU;Ll;0;L; 03BC;;;;N;;;;; +1D742;MATHEMATICAL BOLD ITALIC SMALL NU;Ll;0;L; 03BD;;;;N;;;;; +1D743;MATHEMATICAL BOLD ITALIC SMALL XI;Ll;0;L; 03BE;;;;N;;;;; +1D744;MATHEMATICAL BOLD ITALIC SMALL OMICRON;Ll;0;L; 03BF;;;;N;;;;; +1D745;MATHEMATICAL BOLD ITALIC SMALL PI;Ll;0;L; 03C0;;;;N;;;;; +1D746;MATHEMATICAL BOLD ITALIC SMALL RHO;Ll;0;L; 03C1;;;;N;;;;; +1D747;MATHEMATICAL BOLD ITALIC SMALL FINAL SIGMA;Ll;0;L; 03C2;;;;N;;;;; +1D748;MATHEMATICAL BOLD ITALIC SMALL SIGMA;Ll;0;L; 03C3;;;;N;;;;; +1D749;MATHEMATICAL BOLD ITALIC SMALL TAU;Ll;0;L; 03C4;;;;N;;;;; +1D74A;MATHEMATICAL BOLD ITALIC SMALL UPSILON;Ll;0;L; 03C5;;;;N;;;;; +1D74B;MATHEMATICAL BOLD ITALIC SMALL PHI;Ll;0;L; 03C6;;;;N;;;;; +1D74C;MATHEMATICAL BOLD ITALIC SMALL CHI;Ll;0;L; 03C7;;;;N;;;;; +1D74D;MATHEMATICAL BOLD ITALIC SMALL PSI;Ll;0;L; 03C8;;;;N;;;;; +1D74E;MATHEMATICAL BOLD ITALIC SMALL OMEGA;Ll;0;L; 03C9;;;;N;;;;; +1D74F;MATHEMATICAL BOLD ITALIC PARTIAL DIFFERENTIAL;Sm;0;ON; 2202;;;;Y;;;;; +1D750;MATHEMATICAL BOLD ITALIC EPSILON SYMBOL;Ll;0;L; 03F5;;;;N;;;;; +1D751;MATHEMATICAL BOLD ITALIC THETA SYMBOL;Ll;0;L; 03D1;;;;N;;;;; +1D752;MATHEMATICAL BOLD ITALIC KAPPA SYMBOL;Ll;0;L; 03F0;;;;N;;;;; +1D753;MATHEMATICAL BOLD ITALIC PHI SYMBOL;Ll;0;L; 03D5;;;;N;;;;; +1D754;MATHEMATICAL BOLD ITALIC RHO SYMBOL;Ll;0;L; 03F1;;;;N;;;;; +1D755;MATHEMATICAL BOLD ITALIC PI SYMBOL;Ll;0;L; 03D6;;;;N;;;;; +1D756;MATHEMATICAL SANS-SERIF BOLD CAPITAL ALPHA;Lu;0;L; 0391;;;;N;;;;; +1D757;MATHEMATICAL SANS-SERIF BOLD CAPITAL BETA;Lu;0;L; 0392;;;;N;;;;; +1D758;MATHEMATICAL SANS-SERIF BOLD CAPITAL GAMMA;Lu;0;L; 0393;;;;N;;;;; +1D759;MATHEMATICAL SANS-SERIF BOLD CAPITAL DELTA;Lu;0;L; 0394;;;;N;;;;; +1D75A;MATHEMATICAL SANS-SERIF BOLD CAPITAL EPSILON;Lu;0;L; 0395;;;;N;;;;; +1D75B;MATHEMATICAL SANS-SERIF BOLD CAPITAL ZETA;Lu;0;L; 0396;;;;N;;;;; +1D75C;MATHEMATICAL SANS-SERIF BOLD CAPITAL ETA;Lu;0;L; 0397;;;;N;;;;; +1D75D;MATHEMATICAL SANS-SERIF BOLD CAPITAL THETA;Lu;0;L; 0398;;;;N;;;;; +1D75E;MATHEMATICAL SANS-SERIF BOLD CAPITAL IOTA;Lu;0;L; 0399;;;;N;;;;; +1D75F;MATHEMATICAL SANS-SERIF BOLD CAPITAL KAPPA;Lu;0;L; 039A;;;;N;;;;; +1D760;MATHEMATICAL SANS-SERIF BOLD CAPITAL LAMDA;Lu;0;L; 039B;;;;N;;;;; +1D761;MATHEMATICAL SANS-SERIF BOLD CAPITAL MU;Lu;0;L; 039C;;;;N;;;;; +1D762;MATHEMATICAL SANS-SERIF BOLD CAPITAL NU;Lu;0;L; 039D;;;;N;;;;; +1D763;MATHEMATICAL SANS-SERIF BOLD CAPITAL XI;Lu;0;L; 039E;;;;N;;;;; +1D764;MATHEMATICAL SANS-SERIF BOLD CAPITAL OMICRON;Lu;0;L; 039F;;;;N;;;;; +1D765;MATHEMATICAL SANS-SERIF BOLD CAPITAL PI;Lu;0;L; 03A0;;;;N;;;;; +1D766;MATHEMATICAL SANS-SERIF BOLD CAPITAL RHO;Lu;0;L; 03A1;;;;N;;;;; +1D767;MATHEMATICAL SANS-SERIF BOLD CAPITAL THETA SYMBOL;Lu;0;L; 03F4;;;;N;;;;; +1D768;MATHEMATICAL SANS-SERIF BOLD CAPITAL SIGMA;Lu;0;L; 03A3;;;;N;;;;; +1D769;MATHEMATICAL SANS-SERIF BOLD CAPITAL TAU;Lu;0;L; 03A4;;;;N;;;;; +1D76A;MATHEMATICAL SANS-SERIF BOLD CAPITAL UPSILON;Lu;0;L; 03A5;;;;N;;;;; +1D76B;MATHEMATICAL SANS-SERIF BOLD CAPITAL PHI;Lu;0;L; 03A6;;;;N;;;;; +1D76C;MATHEMATICAL SANS-SERIF BOLD CAPITAL CHI;Lu;0;L; 03A7;;;;N;;;;; +1D76D;MATHEMATICAL SANS-SERIF BOLD CAPITAL PSI;Lu;0;L; 03A8;;;;N;;;;; +1D76E;MATHEMATICAL SANS-SERIF BOLD CAPITAL OMEGA;Lu;0;L; 03A9;;;;N;;;;; +1D76F;MATHEMATICAL SANS-SERIF BOLD NABLA;Sm;0;L; 2207;;;;N;;;;; +1D770;MATHEMATICAL SANS-SERIF BOLD SMALL ALPHA;Ll;0;L; 03B1;;;;N;;;;; +1D771;MATHEMATICAL SANS-SERIF BOLD SMALL BETA;Ll;0;L; 03B2;;;;N;;;;; +1D772;MATHEMATICAL SANS-SERIF BOLD SMALL GAMMA;Ll;0;L; 03B3;;;;N;;;;; +1D773;MATHEMATICAL SANS-SERIF BOLD SMALL DELTA;Ll;0;L; 03B4;;;;N;;;;; +1D774;MATHEMATICAL SANS-SERIF BOLD SMALL EPSILON;Ll;0;L; 03B5;;;;N;;;;; +1D775;MATHEMATICAL SANS-SERIF BOLD SMALL ZETA;Ll;0;L; 03B6;;;;N;;;;; +1D776;MATHEMATICAL SANS-SERIF BOLD SMALL ETA;Ll;0;L; 03B7;;;;N;;;;; +1D777;MATHEMATICAL SANS-SERIF BOLD SMALL THETA;Ll;0;L; 03B8;;;;N;;;;; +1D778;MATHEMATICAL SANS-SERIF BOLD SMALL IOTA;Ll;0;L; 03B9;;;;N;;;;; +1D779;MATHEMATICAL SANS-SERIF BOLD SMALL KAPPA;Ll;0;L; 03BA;;;;N;;;;; +1D77A;MATHEMATICAL SANS-SERIF BOLD SMALL LAMDA;Ll;0;L; 03BB;;;;N;;;;; +1D77B;MATHEMATICAL SANS-SERIF BOLD SMALL MU;Ll;0;L; 03BC;;;;N;;;;; +1D77C;MATHEMATICAL SANS-SERIF BOLD SMALL NU;Ll;0;L; 03BD;;;;N;;;;; +1D77D;MATHEMATICAL SANS-SERIF BOLD SMALL XI;Ll;0;L; 03BE;;;;N;;;;; +1D77E;MATHEMATICAL SANS-SERIF BOLD SMALL OMICRON;Ll;0;L; 03BF;;;;N;;;;; +1D77F;MATHEMATICAL SANS-SERIF BOLD SMALL PI;Ll;0;L; 03C0;;;;N;;;;; +1D780;MATHEMATICAL SANS-SERIF BOLD SMALL RHO;Ll;0;L; 03C1;;;;N;;;;; +1D781;MATHEMATICAL SANS-SERIF BOLD SMALL FINAL SIGMA;Ll;0;L; 03C2;;;;N;;;;; +1D782;MATHEMATICAL SANS-SERIF BOLD SMALL SIGMA;Ll;0;L; 03C3;;;;N;;;;; +1D783;MATHEMATICAL SANS-SERIF BOLD SMALL TAU;Ll;0;L; 03C4;;;;N;;;;; +1D784;MATHEMATICAL SANS-SERIF BOLD SMALL UPSILON;Ll;0;L; 03C5;;;;N;;;;; +1D785;MATHEMATICAL SANS-SERIF BOLD SMALL PHI;Ll;0;L; 03C6;;;;N;;;;; +1D786;MATHEMATICAL SANS-SERIF BOLD SMALL CHI;Ll;0;L; 03C7;;;;N;;;;; +1D787;MATHEMATICAL SANS-SERIF BOLD SMALL PSI;Ll;0;L; 03C8;;;;N;;;;; +1D788;MATHEMATICAL SANS-SERIF BOLD SMALL OMEGA;Ll;0;L; 03C9;;;;N;;;;; +1D789;MATHEMATICAL SANS-SERIF BOLD PARTIAL DIFFERENTIAL;Sm;0;ON; 2202;;;;Y;;;;; +1D78A;MATHEMATICAL SANS-SERIF BOLD EPSILON SYMBOL;Ll;0;L; 03F5;;;;N;;;;; +1D78B;MATHEMATICAL SANS-SERIF BOLD THETA SYMBOL;Ll;0;L; 03D1;;;;N;;;;; +1D78C;MATHEMATICAL SANS-SERIF BOLD KAPPA SYMBOL;Ll;0;L; 03F0;;;;N;;;;; +1D78D;MATHEMATICAL SANS-SERIF BOLD PHI SYMBOL;Ll;0;L; 03D5;;;;N;;;;; +1D78E;MATHEMATICAL SANS-SERIF BOLD RHO SYMBOL;Ll;0;L; 03F1;;;;N;;;;; +1D78F;MATHEMATICAL SANS-SERIF BOLD PI SYMBOL;Ll;0;L; 03D6;;;;N;;;;; +1D790;MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL ALPHA;Lu;0;L; 0391;;;;N;;;;; +1D791;MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL BETA;Lu;0;L; 0392;;;;N;;;;; +1D792;MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL GAMMA;Lu;0;L; 0393;;;;N;;;;; +1D793;MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL DELTA;Lu;0;L; 0394;;;;N;;;;; +1D794;MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL EPSILON;Lu;0;L; 0395;;;;N;;;;; +1D795;MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL ZETA;Lu;0;L; 0396;;;;N;;;;; +1D796;MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL ETA;Lu;0;L; 0397;;;;N;;;;; +1D797;MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL THETA;Lu;0;L; 0398;;;;N;;;;; +1D798;MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL IOTA;Lu;0;L; 0399;;;;N;;;;; +1D799;MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL KAPPA;Lu;0;L; 039A;;;;N;;;;; +1D79A;MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL LAMDA;Lu;0;L; 039B;;;;N;;;;; +1D79B;MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL MU;Lu;0;L; 039C;;;;N;;;;; +1D79C;MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL NU;Lu;0;L; 039D;;;;N;;;;; +1D79D;MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL XI;Lu;0;L; 039E;;;;N;;;;; +1D79E;MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL OMICRON;Lu;0;L; 039F;;;;N;;;;; +1D79F;MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL PI;Lu;0;L; 03A0;;;;N;;;;; +1D7A0;MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL RHO;Lu;0;L; 03A1;;;;N;;;;; +1D7A1;MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL THETA SYMBOL;Lu;0;L; 03F4;;;;N;;;;; +1D7A2;MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL SIGMA;Lu;0;L; 03A3;;;;N;;;;; +1D7A3;MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL TAU;Lu;0;L; 03A4;;;;N;;;;; +1D7A4;MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL UPSILON;Lu;0;L; 03A5;;;;N;;;;; +1D7A5;MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL PHI;Lu;0;L; 03A6;;;;N;;;;; +1D7A6;MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL CHI;Lu;0;L; 03A7;;;;N;;;;; +1D7A7;MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL PSI;Lu;0;L; 03A8;;;;N;;;;; +1D7A8;MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL OMEGA;Lu;0;L; 03A9;;;;N;;;;; +1D7A9;MATHEMATICAL SANS-SERIF BOLD ITALIC NABLA;Sm;0;L; 2207;;;;N;;;;; +1D7AA;MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL ALPHA;Ll;0;L; 03B1;;;;N;;;;; +1D7AB;MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL BETA;Ll;0;L; 03B2;;;;N;;;;; +1D7AC;MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL GAMMA;Ll;0;L; 03B3;;;;N;;;;; +1D7AD;MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL DELTA;Ll;0;L; 03B4;;;;N;;;;; +1D7AE;MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL EPSILON;Ll;0;L; 03B5;;;;N;;;;; +1D7AF;MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL ZETA;Ll;0;L; 03B6;;;;N;;;;; +1D7B0;MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL ETA;Ll;0;L; 03B7;;;;N;;;;; +1D7B1;MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL THETA;Ll;0;L; 03B8;;;;N;;;;; +1D7B2;MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL IOTA;Ll;0;L; 03B9;;;;N;;;;; +1D7B3;MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL KAPPA;Ll;0;L; 03BA;;;;N;;;;; +1D7B4;MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL LAMDA;Ll;0;L; 03BB;;;;N;;;;; +1D7B5;MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL MU;Ll;0;L; 03BC;;;;N;;;;; +1D7B6;MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL NU;Ll;0;L; 03BD;;;;N;;;;; +1D7B7;MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL XI;Ll;0;L; 03BE;;;;N;;;;; +1D7B8;MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL OMICRON;Ll;0;L; 03BF;;;;N;;;;; +1D7B9;MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL PI;Ll;0;L; 03C0;;;;N;;;;; +1D7BA;MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL RHO;Ll;0;L; 03C1;;;;N;;;;; +1D7BB;MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL FINAL SIGMA;Ll;0;L; 03C2;;;;N;;;;; +1D7BC;MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL SIGMA;Ll;0;L; 03C3;;;;N;;;;; +1D7BD;MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL TAU;Ll;0;L; 03C4;;;;N;;;;; +1D7BE;MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL UPSILON;Ll;0;L; 03C5;;;;N;;;;; +1D7BF;MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL PHI;Ll;0;L; 03C6;;;;N;;;;; +1D7C0;MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL CHI;Ll;0;L; 03C7;;;;N;;;;; +1D7C1;MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL PSI;Ll;0;L; 03C8;;;;N;;;;; +1D7C2;MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL OMEGA;Ll;0;L; 03C9;;;;N;;;;; +1D7C3;MATHEMATICAL SANS-SERIF BOLD ITALIC PARTIAL DIFFERENTIAL;Sm;0;ON; 2202;;;;Y;;;;; +1D7C4;MATHEMATICAL SANS-SERIF BOLD ITALIC EPSILON SYMBOL;Ll;0;L; 03F5;;;;N;;;;; +1D7C5;MATHEMATICAL SANS-SERIF BOLD ITALIC THETA SYMBOL;Ll;0;L; 03D1;;;;N;;;;; +1D7C6;MATHEMATICAL SANS-SERIF BOLD ITALIC KAPPA SYMBOL;Ll;0;L; 03F0;;;;N;;;;; +1D7C7;MATHEMATICAL SANS-SERIF BOLD ITALIC PHI SYMBOL;Ll;0;L; 03D5;;;;N;;;;; +1D7C8;MATHEMATICAL SANS-SERIF BOLD ITALIC RHO SYMBOL;Ll;0;L; 03F1;;;;N;;;;; +1D7C9;MATHEMATICAL SANS-SERIF BOLD ITALIC PI SYMBOL;Ll;0;L; 03D6;;;;N;;;;; +1D7CA;MATHEMATICAL BOLD CAPITAL DIGAMMA;Lu;0;L; 03DC;;;;N;;;;; +1D7CB;MATHEMATICAL BOLD SMALL DIGAMMA;Ll;0;L; 03DD;;;;N;;;;; +1D7CE;MATHEMATICAL BOLD DIGIT ZERO;Nd;0;EN; 0030;0;0;0;N;;;;; +1D7CF;MATHEMATICAL BOLD DIGIT ONE;Nd;0;EN; 0031;1;1;1;N;;;;; +1D7D0;MATHEMATICAL BOLD DIGIT TWO;Nd;0;EN; 0032;2;2;2;N;;;;; +1D7D1;MATHEMATICAL BOLD DIGIT THREE;Nd;0;EN; 0033;3;3;3;N;;;;; +1D7D2;MATHEMATICAL BOLD DIGIT FOUR;Nd;0;EN; 0034;4;4;4;N;;;;; +1D7D3;MATHEMATICAL BOLD DIGIT FIVE;Nd;0;EN; 0035;5;5;5;N;;;;; +1D7D4;MATHEMATICAL BOLD DIGIT SIX;Nd;0;EN; 0036;6;6;6;N;;;;; +1D7D5;MATHEMATICAL BOLD DIGIT SEVEN;Nd;0;EN; 0037;7;7;7;N;;;;; +1D7D6;MATHEMATICAL BOLD DIGIT EIGHT;Nd;0;EN; 0038;8;8;8;N;;;;; +1D7D7;MATHEMATICAL BOLD DIGIT NINE;Nd;0;EN; 0039;9;9;9;N;;;;; +1D7D8;MATHEMATICAL DOUBLE-STRUCK DIGIT ZERO;Nd;0;EN; 0030;0;0;0;N;;;;; +1D7D9;MATHEMATICAL DOUBLE-STRUCK DIGIT ONE;Nd;0;EN; 0031;1;1;1;N;;;;; +1D7DA;MATHEMATICAL DOUBLE-STRUCK DIGIT TWO;Nd;0;EN; 0032;2;2;2;N;;;;; +1D7DB;MATHEMATICAL DOUBLE-STRUCK DIGIT THREE;Nd;0;EN; 0033;3;3;3;N;;;;; +1D7DC;MATHEMATICAL DOUBLE-STRUCK DIGIT FOUR;Nd;0;EN; 0034;4;4;4;N;;;;; +1D7DD;MATHEMATICAL DOUBLE-STRUCK DIGIT FIVE;Nd;0;EN; 0035;5;5;5;N;;;;; +1D7DE;MATHEMATICAL DOUBLE-STRUCK DIGIT SIX;Nd;0;EN; 0036;6;6;6;N;;;;; +1D7DF;MATHEMATICAL DOUBLE-STRUCK DIGIT SEVEN;Nd;0;EN; 0037;7;7;7;N;;;;; +1D7E0;MATHEMATICAL DOUBLE-STRUCK DIGIT EIGHT;Nd;0;EN; 0038;8;8;8;N;;;;; +1D7E1;MATHEMATICAL DOUBLE-STRUCK DIGIT NINE;Nd;0;EN; 0039;9;9;9;N;;;;; +1D7E2;MATHEMATICAL SANS-SERIF DIGIT ZERO;Nd;0;EN; 0030;0;0;0;N;;;;; +1D7E3;MATHEMATICAL SANS-SERIF DIGIT ONE;Nd;0;EN; 0031;1;1;1;N;;;;; +1D7E4;MATHEMATICAL SANS-SERIF DIGIT TWO;Nd;0;EN; 0032;2;2;2;N;;;;; +1D7E5;MATHEMATICAL SANS-SERIF DIGIT THREE;Nd;0;EN; 0033;3;3;3;N;;;;; +1D7E6;MATHEMATICAL SANS-SERIF DIGIT FOUR;Nd;0;EN; 0034;4;4;4;N;;;;; +1D7E7;MATHEMATICAL SANS-SERIF DIGIT FIVE;Nd;0;EN; 0035;5;5;5;N;;;;; +1D7E8;MATHEMATICAL SANS-SERIF DIGIT SIX;Nd;0;EN; 0036;6;6;6;N;;;;; +1D7E9;MATHEMATICAL SANS-SERIF DIGIT SEVEN;Nd;0;EN; 0037;7;7;7;N;;;;; +1D7EA;MATHEMATICAL SANS-SERIF DIGIT EIGHT;Nd;0;EN; 0038;8;8;8;N;;;;; +1D7EB;MATHEMATICAL SANS-SERIF DIGIT NINE;Nd;0;EN; 0039;9;9;9;N;;;;; +1D7EC;MATHEMATICAL SANS-SERIF BOLD DIGIT ZERO;Nd;0;EN; 0030;0;0;0;N;;;;; +1D7ED;MATHEMATICAL SANS-SERIF BOLD DIGIT ONE;Nd;0;EN; 0031;1;1;1;N;;;;; +1D7EE;MATHEMATICAL SANS-SERIF BOLD DIGIT TWO;Nd;0;EN; 0032;2;2;2;N;;;;; +1D7EF;MATHEMATICAL SANS-SERIF BOLD DIGIT THREE;Nd;0;EN; 0033;3;3;3;N;;;;; +1D7F0;MATHEMATICAL SANS-SERIF BOLD DIGIT FOUR;Nd;0;EN; 0034;4;4;4;N;;;;; +1D7F1;MATHEMATICAL SANS-SERIF BOLD DIGIT FIVE;Nd;0;EN; 0035;5;5;5;N;;;;; +1D7F2;MATHEMATICAL SANS-SERIF BOLD DIGIT SIX;Nd;0;EN; 0036;6;6;6;N;;;;; +1D7F3;MATHEMATICAL SANS-SERIF BOLD DIGIT SEVEN;Nd;0;EN; 0037;7;7;7;N;;;;; +1D7F4;MATHEMATICAL SANS-SERIF BOLD DIGIT EIGHT;Nd;0;EN; 0038;8;8;8;N;;;;; +1D7F5;MATHEMATICAL SANS-SERIF BOLD DIGIT NINE;Nd;0;EN; 0039;9;9;9;N;;;;; +1D7F6;MATHEMATICAL MONOSPACE DIGIT ZERO;Nd;0;EN; 0030;0;0;0;N;;;;; +1D7F7;MATHEMATICAL MONOSPACE DIGIT ONE;Nd;0;EN; 0031;1;1;1;N;;;;; +1D7F8;MATHEMATICAL MONOSPACE DIGIT TWO;Nd;0;EN; 0032;2;2;2;N;;;;; +1D7F9;MATHEMATICAL MONOSPACE DIGIT THREE;Nd;0;EN; 0033;3;3;3;N;;;;; +1D7FA;MATHEMATICAL MONOSPACE DIGIT FOUR;Nd;0;EN; 0034;4;4;4;N;;;;; +1D7FB;MATHEMATICAL MONOSPACE DIGIT FIVE;Nd;0;EN; 0035;5;5;5;N;;;;; +1D7FC;MATHEMATICAL MONOSPACE DIGIT SIX;Nd;0;EN; 0036;6;6;6;N;;;;; +1D7FD;MATHEMATICAL MONOSPACE DIGIT SEVEN;Nd;0;EN; 0037;7;7;7;N;;;;; +1D7FE;MATHEMATICAL MONOSPACE DIGIT EIGHT;Nd;0;EN; 0038;8;8;8;N;;;;; +1D7FF;MATHEMATICAL MONOSPACE DIGIT NINE;Nd;0;EN; 0039;9;9;9;N;;;;; +1D800;SIGNWRITING HAND-FIST INDEX;So;0;L;;;;;N;;;;; +1D801;SIGNWRITING HAND-CIRCLE INDEX;So;0;L;;;;;N;;;;; +1D802;SIGNWRITING HAND-CUP INDEX;So;0;L;;;;;N;;;;; +1D803;SIGNWRITING HAND-OVAL INDEX;So;0;L;;;;;N;;;;; +1D804;SIGNWRITING HAND-HINGE INDEX;So;0;L;;;;;N;;;;; +1D805;SIGNWRITING HAND-ANGLE INDEX;So;0;L;;;;;N;;;;; +1D806;SIGNWRITING HAND-FIST INDEX BENT;So;0;L;;;;;N;;;;; +1D807;SIGNWRITING HAND-CIRCLE INDEX BENT;So;0;L;;;;;N;;;;; +1D808;SIGNWRITING HAND-FIST THUMB UNDER INDEX BENT;So;0;L;;;;;N;;;;; +1D809;SIGNWRITING HAND-FIST INDEX RAISED KNUCKLE;So;0;L;;;;;N;;;;; +1D80A;SIGNWRITING HAND-FIST INDEX CUPPED;So;0;L;;;;;N;;;;; +1D80B;SIGNWRITING HAND-FIST INDEX HINGED;So;0;L;;;;;N;;;;; +1D80C;SIGNWRITING HAND-FIST INDEX HINGED LOW;So;0;L;;;;;N;;;;; +1D80D;SIGNWRITING HAND-CIRCLE INDEX HINGE;So;0;L;;;;;N;;;;; +1D80E;SIGNWRITING HAND-FIST INDEX MIDDLE;So;0;L;;;;;N;;;;; +1D80F;SIGNWRITING HAND-CIRCLE INDEX MIDDLE;So;0;L;;;;;N;;;;; +1D810;SIGNWRITING HAND-FIST INDEX MIDDLE BENT;So;0;L;;;;;N;;;;; +1D811;SIGNWRITING HAND-FIST INDEX MIDDLE RAISED KNUCKLES;So;0;L;;;;;N;;;;; +1D812;SIGNWRITING HAND-FIST INDEX MIDDLE HINGED;So;0;L;;;;;N;;;;; +1D813;SIGNWRITING HAND-FIST INDEX UP MIDDLE HINGED;So;0;L;;;;;N;;;;; +1D814;SIGNWRITING HAND-FIST INDEX HINGED MIDDLE UP;So;0;L;;;;;N;;;;; +1D815;SIGNWRITING HAND-FIST INDEX MIDDLE CONJOINED;So;0;L;;;;;N;;;;; +1D816;SIGNWRITING HAND-FIST INDEX MIDDLE CONJOINED INDEX BENT;So;0;L;;;;;N;;;;; +1D817;SIGNWRITING HAND-FIST INDEX MIDDLE CONJOINED MIDDLE BENT;So;0;L;;;;;N;;;;; +1D818;SIGNWRITING HAND-FIST INDEX MIDDLE CONJOINED CUPPED;So;0;L;;;;;N;;;;; +1D819;SIGNWRITING HAND-FIST INDEX MIDDLE CONJOINED HINGED;So;0;L;;;;;N;;;;; +1D81A;SIGNWRITING HAND-FIST INDEX MIDDLE CROSSED;So;0;L;;;;;N;;;;; +1D81B;SIGNWRITING HAND-CIRCLE INDEX MIDDLE CROSSED;So;0;L;;;;;N;;;;; +1D81C;SIGNWRITING HAND-FIST MIDDLE BENT OVER INDEX;So;0;L;;;;;N;;;;; +1D81D;SIGNWRITING HAND-FIST INDEX BENT OVER MIDDLE;So;0;L;;;;;N;;;;; +1D81E;SIGNWRITING HAND-FIST INDEX MIDDLE THUMB;So;0;L;;;;;N;;;;; +1D81F;SIGNWRITING HAND-CIRCLE INDEX MIDDLE THUMB;So;0;L;;;;;N;;;;; +1D820;SIGNWRITING HAND-FIST INDEX MIDDLE STRAIGHT THUMB BENT;So;0;L;;;;;N;;;;; +1D821;SIGNWRITING HAND-FIST INDEX MIDDLE BENT THUMB STRAIGHT;So;0;L;;;;;N;;;;; +1D822;SIGNWRITING HAND-FIST INDEX MIDDLE THUMB BENT;So;0;L;;;;;N;;;;; +1D823;SIGNWRITING HAND-FIST INDEX MIDDLE HINGED SPREAD THUMB SIDE;So;0;L;;;;;N;;;;; +1D824;SIGNWRITING HAND-FIST INDEX UP MIDDLE HINGED THUMB SIDE;So;0;L;;;;;N;;;;; +1D825;SIGNWRITING HAND-FIST INDEX UP MIDDLE HINGED THUMB CONJOINED;So;0;L;;;;;N;;;;; +1D826;SIGNWRITING HAND-FIST INDEX HINGED MIDDLE UP THUMB SIDE;So;0;L;;;;;N;;;;; +1D827;SIGNWRITING HAND-FIST INDEX MIDDLE UP SPREAD THUMB FORWARD;So;0;L;;;;;N;;;;; +1D828;SIGNWRITING HAND-FIST INDEX MIDDLE THUMB CUPPED;So;0;L;;;;;N;;;;; +1D829;SIGNWRITING HAND-FIST INDEX MIDDLE THUMB CIRCLED;So;0;L;;;;;N;;;;; +1D82A;SIGNWRITING HAND-FIST INDEX MIDDLE THUMB HOOKED;So;0;L;;;;;N;;;;; +1D82B;SIGNWRITING HAND-FIST INDEX MIDDLE THUMB HINGED;So;0;L;;;;;N;;;;; +1D82C;SIGNWRITING HAND-FIST THUMB BETWEEN INDEX MIDDLE STRAIGHT;So;0;L;;;;;N;;;;; +1D82D;SIGNWRITING HAND-FIST INDEX MIDDLE CONJOINED THUMB SIDE;So;0;L;;;;;N;;;;; +1D82E;SIGNWRITING HAND-FIST INDEX MIDDLE CONJOINED THUMB SIDE CONJOINED;So;0;L;;;;;N;;;;; +1D82F;SIGNWRITING HAND-FIST INDEX MIDDLE CONJOINED THUMB SIDE BENT;So;0;L;;;;;N;;;;; +1D830;SIGNWRITING HAND-FIST MIDDLE THUMB HOOKED INDEX UP;So;0;L;;;;;N;;;;; +1D831;SIGNWRITING HAND-FIST INDEX THUMB HOOKED MIDDLE UP;So;0;L;;;;;N;;;;; +1D832;SIGNWRITING HAND-FIST INDEX MIDDLE CONJOINED HINGED THUMB SIDE;So;0;L;;;;;N;;;;; +1D833;SIGNWRITING HAND-FIST INDEX MIDDLE CROSSED THUMB SIDE;So;0;L;;;;;N;;;;; +1D834;SIGNWRITING HAND-FIST INDEX MIDDLE CONJOINED THUMB FORWARD;So;0;L;;;;;N;;;;; +1D835;SIGNWRITING HAND-FIST INDEX MIDDLE CONJOINED CUPPED THUMB FORWARD;So;0;L;;;;;N;;;;; +1D836;SIGNWRITING HAND-FIST MIDDLE THUMB CUPPED INDEX UP;So;0;L;;;;;N;;;;; +1D837;SIGNWRITING HAND-FIST INDEX THUMB CUPPED MIDDLE UP;So;0;L;;;;;N;;;;; +1D838;SIGNWRITING HAND-FIST MIDDLE THUMB CIRCLED INDEX UP;So;0;L;;;;;N;;;;; +1D839;SIGNWRITING HAND-FIST MIDDLE THUMB CIRCLED INDEX HINGED;So;0;L;;;;;N;;;;; +1D83A;SIGNWRITING HAND-FIST INDEX THUMB ANGLED OUT MIDDLE UP;So;0;L;;;;;N;;;;; +1D83B;SIGNWRITING HAND-FIST INDEX THUMB ANGLED IN MIDDLE UP;So;0;L;;;;;N;;;;; +1D83C;SIGNWRITING HAND-FIST INDEX THUMB CIRCLED MIDDLE UP;So;0;L;;;;;N;;;;; +1D83D;SIGNWRITING HAND-FIST INDEX MIDDLE THUMB CONJOINED HINGED;So;0;L;;;;;N;;;;; +1D83E;SIGNWRITING HAND-FIST INDEX MIDDLE THUMB ANGLED OUT;So;0;L;;;;;N;;;;; +1D83F;SIGNWRITING HAND-FIST INDEX MIDDLE THUMB ANGLED;So;0;L;;;;;N;;;;; +1D840;SIGNWRITING HAND-FIST MIDDLE THUMB ANGLED OUT INDEX UP;So;0;L;;;;;N;;;;; +1D841;SIGNWRITING HAND-FIST MIDDLE THUMB ANGLED OUT INDEX CROSSED;So;0;L;;;;;N;;;;; +1D842;SIGNWRITING HAND-FIST MIDDLE THUMB ANGLED INDEX UP;So;0;L;;;;;N;;;;; +1D843;SIGNWRITING HAND-FIST INDEX THUMB HOOKED MIDDLE HINGED;So;0;L;;;;;N;;;;; +1D844;SIGNWRITING HAND-FLAT FOUR FINGERS;So;0;L;;;;;N;;;;; +1D845;SIGNWRITING HAND-FLAT FOUR FINGERS BENT;So;0;L;;;;;N;;;;; +1D846;SIGNWRITING HAND-FLAT FOUR FINGERS HINGED;So;0;L;;;;;N;;;;; +1D847;SIGNWRITING HAND-FLAT FOUR FINGERS CONJOINED;So;0;L;;;;;N;;;;; +1D848;SIGNWRITING HAND-FLAT FOUR FINGERS CONJOINED SPLIT;So;0;L;;;;;N;;;;; +1D849;SIGNWRITING HAND-CLAW FOUR FINGERS CONJOINED;So;0;L;;;;;N;;;;; +1D84A;SIGNWRITING HAND-FIST FOUR FINGERS CONJOINED BENT;So;0;L;;;;;N;;;;; +1D84B;SIGNWRITING HAND-HINGE FOUR FINGERS CONJOINED;So;0;L;;;;;N;;;;; +1D84C;SIGNWRITING HAND-FLAT FIVE FINGERS SPREAD;So;0;L;;;;;N;;;;; +1D84D;SIGNWRITING HAND-FLAT HEEL FIVE FINGERS SPREAD;So;0;L;;;;;N;;;;; +1D84E;SIGNWRITING HAND-FLAT FIVE FINGERS SPREAD FOUR BENT;So;0;L;;;;;N;;;;; +1D84F;SIGNWRITING HAND-FLAT HEEL FIVE FINGERS SPREAD FOUR BENT;So;0;L;;;;;N;;;;; +1D850;SIGNWRITING HAND-FLAT FIVE FINGERS SPREAD BENT;So;0;L;;;;;N;;;;; +1D851;SIGNWRITING HAND-FLAT HEEL FIVE FINGERS SPREAD BENT;So;0;L;;;;;N;;;;; +1D852;SIGNWRITING HAND-FLAT FIVE FINGERS SPREAD THUMB FORWARD;So;0;L;;;;;N;;;;; +1D853;SIGNWRITING HAND-CUP FIVE FINGERS SPREAD;So;0;L;;;;;N;;;;; +1D854;SIGNWRITING HAND-CUP FIVE FINGERS SPREAD OPEN;So;0;L;;;;;N;;;;; +1D855;SIGNWRITING HAND-HINGE FIVE FINGERS SPREAD OPEN;So;0;L;;;;;N;;;;; +1D856;SIGNWRITING HAND-OVAL FIVE FINGERS SPREAD;So;0;L;;;;;N;;;;; +1D857;SIGNWRITING HAND-FLAT FIVE FINGERS SPREAD HINGED;So;0;L;;;;;N;;;;; +1D858;SIGNWRITING HAND-FLAT FIVE FINGERS SPREAD HINGED THUMB SIDE;So;0;L;;;;;N;;;;; +1D859;SIGNWRITING HAND-FLAT FIVE FINGERS SPREAD HINGED NO THUMB;So;0;L;;;;;N;;;;; +1D85A;SIGNWRITING HAND-FLAT;So;0;L;;;;;N;;;;; +1D85B;SIGNWRITING HAND-FLAT BETWEEN PALM FACINGS;So;0;L;;;;;N;;;;; +1D85C;SIGNWRITING HAND-FLAT HEEL;So;0;L;;;;;N;;;;; +1D85D;SIGNWRITING HAND-FLAT THUMB SIDE;So;0;L;;;;;N;;;;; +1D85E;SIGNWRITING HAND-FLAT HEEL THUMB SIDE;So;0;L;;;;;N;;;;; +1D85F;SIGNWRITING HAND-FLAT THUMB BENT;So;0;L;;;;;N;;;;; +1D860;SIGNWRITING HAND-FLAT THUMB FORWARD;So;0;L;;;;;N;;;;; +1D861;SIGNWRITING HAND-FLAT SPLIT INDEX THUMB SIDE;So;0;L;;;;;N;;;;; +1D862;SIGNWRITING HAND-FLAT SPLIT CENTRE;So;0;L;;;;;N;;;;; +1D863;SIGNWRITING HAND-FLAT SPLIT CENTRE THUMB SIDE;So;0;L;;;;;N;;;;; +1D864;SIGNWRITING HAND-FLAT SPLIT CENTRE THUMB SIDE BENT;So;0;L;;;;;N;;;;; +1D865;SIGNWRITING HAND-FLAT SPLIT LITTLE;So;0;L;;;;;N;;;;; +1D866;SIGNWRITING HAND-CLAW;So;0;L;;;;;N;;;;; +1D867;SIGNWRITING HAND-CLAW THUMB SIDE;So;0;L;;;;;N;;;;; +1D868;SIGNWRITING HAND-CLAW NO THUMB;So;0;L;;;;;N;;;;; +1D869;SIGNWRITING HAND-CLAW THUMB FORWARD;So;0;L;;;;;N;;;;; +1D86A;SIGNWRITING HAND-HOOK CURLICUE;So;0;L;;;;;N;;;;; +1D86B;SIGNWRITING HAND-HOOK;So;0;L;;;;;N;;;;; +1D86C;SIGNWRITING HAND-CUP OPEN;So;0;L;;;;;N;;;;; +1D86D;SIGNWRITING HAND-CUP;So;0;L;;;;;N;;;;; +1D86E;SIGNWRITING HAND-CUP OPEN THUMB SIDE;So;0;L;;;;;N;;;;; +1D86F;SIGNWRITING HAND-CUP THUMB SIDE;So;0;L;;;;;N;;;;; +1D870;SIGNWRITING HAND-CUP OPEN NO THUMB;So;0;L;;;;;N;;;;; +1D871;SIGNWRITING HAND-CUP NO THUMB;So;0;L;;;;;N;;;;; +1D872;SIGNWRITING HAND-CUP OPEN THUMB FORWARD;So;0;L;;;;;N;;;;; +1D873;SIGNWRITING HAND-CUP THUMB FORWARD;So;0;L;;;;;N;;;;; +1D874;SIGNWRITING HAND-CURLICUE OPEN;So;0;L;;;;;N;;;;; +1D875;SIGNWRITING HAND-CURLICUE;So;0;L;;;;;N;;;;; +1D876;SIGNWRITING HAND-CIRCLE;So;0;L;;;;;N;;;;; +1D877;SIGNWRITING HAND-OVAL;So;0;L;;;;;N;;;;; +1D878;SIGNWRITING HAND-OVAL THUMB SIDE;So;0;L;;;;;N;;;;; +1D879;SIGNWRITING HAND-OVAL NO THUMB;So;0;L;;;;;N;;;;; +1D87A;SIGNWRITING HAND-OVAL THUMB FORWARD;So;0;L;;;;;N;;;;; +1D87B;SIGNWRITING HAND-HINGE OPEN;So;0;L;;;;;N;;;;; +1D87C;SIGNWRITING HAND-HINGE OPEN THUMB FORWARD;So;0;L;;;;;N;;;;; +1D87D;SIGNWRITING HAND-HINGE;So;0;L;;;;;N;;;;; +1D87E;SIGNWRITING HAND-HINGE SMALL;So;0;L;;;;;N;;;;; +1D87F;SIGNWRITING HAND-HINGE OPEN THUMB SIDE;So;0;L;;;;;N;;;;; +1D880;SIGNWRITING HAND-HINGE THUMB SIDE;So;0;L;;;;;N;;;;; +1D881;SIGNWRITING HAND-HINGE OPEN NO THUMB;So;0;L;;;;;N;;;;; +1D882;SIGNWRITING HAND-HINGE NO THUMB;So;0;L;;;;;N;;;;; +1D883;SIGNWRITING HAND-HINGE THUMB SIDE TOUCHING INDEX;So;0;L;;;;;N;;;;; +1D884;SIGNWRITING HAND-HINGE THUMB BETWEEN MIDDLE RING;So;0;L;;;;;N;;;;; +1D885;SIGNWRITING HAND-ANGLE;So;0;L;;;;;N;;;;; +1D886;SIGNWRITING HAND-FIST INDEX MIDDLE RING;So;0;L;;;;;N;;;;; +1D887;SIGNWRITING HAND-CIRCLE INDEX MIDDLE RING;So;0;L;;;;;N;;;;; +1D888;SIGNWRITING HAND-HINGE INDEX MIDDLE RING;So;0;L;;;;;N;;;;; +1D889;SIGNWRITING HAND-ANGLE INDEX MIDDLE RING;So;0;L;;;;;N;;;;; +1D88A;SIGNWRITING HAND-HINGE LITTLE;So;0;L;;;;;N;;;;; +1D88B;SIGNWRITING HAND-FIST INDEX MIDDLE RING BENT;So;0;L;;;;;N;;;;; +1D88C;SIGNWRITING HAND-FIST INDEX MIDDLE RING CONJOINED;So;0;L;;;;;N;;;;; +1D88D;SIGNWRITING HAND-HINGE INDEX MIDDLE RING CONJOINED;So;0;L;;;;;N;;;;; +1D88E;SIGNWRITING HAND-FIST LITTLE DOWN;So;0;L;;;;;N;;;;; +1D88F;SIGNWRITING HAND-FIST LITTLE DOWN RIPPLE STRAIGHT;So;0;L;;;;;N;;;;; +1D890;SIGNWRITING HAND-FIST LITTLE DOWN RIPPLE CURVED;So;0;L;;;;;N;;;;; +1D891;SIGNWRITING HAND-FIST LITTLE DOWN OTHERS CIRCLED;So;0;L;;;;;N;;;;; +1D892;SIGNWRITING HAND-FIST LITTLE UP;So;0;L;;;;;N;;;;; +1D893;SIGNWRITING HAND-FIST THUMB UNDER LITTLE UP;So;0;L;;;;;N;;;;; +1D894;SIGNWRITING HAND-CIRCLE LITTLE UP;So;0;L;;;;;N;;;;; +1D895;SIGNWRITING HAND-OVAL LITTLE UP;So;0;L;;;;;N;;;;; +1D896;SIGNWRITING HAND-ANGLE LITTLE UP;So;0;L;;;;;N;;;;; +1D897;SIGNWRITING HAND-FIST LITTLE RAISED KNUCKLE;So;0;L;;;;;N;;;;; +1D898;SIGNWRITING HAND-FIST LITTLE BENT;So;0;L;;;;;N;;;;; +1D899;SIGNWRITING HAND-FIST LITTLE TOUCHES THUMB;So;0;L;;;;;N;;;;; +1D89A;SIGNWRITING HAND-FIST LITTLE THUMB;So;0;L;;;;;N;;;;; +1D89B;SIGNWRITING HAND-HINGE LITTLE THUMB;So;0;L;;;;;N;;;;; +1D89C;SIGNWRITING HAND-FIST LITTLE INDEX THUMB;So;0;L;;;;;N;;;;; +1D89D;SIGNWRITING HAND-HINGE LITTLE INDEX THUMB;So;0;L;;;;;N;;;;; +1D89E;SIGNWRITING HAND-ANGLE LITTLE INDEX THUMB INDEX THUMB OUT;So;0;L;;;;;N;;;;; +1D89F;SIGNWRITING HAND-ANGLE LITTLE INDEX THUMB INDEX THUMB;So;0;L;;;;;N;;;;; +1D8A0;SIGNWRITING HAND-FIST LITTLE INDEX;So;0;L;;;;;N;;;;; +1D8A1;SIGNWRITING HAND-CIRCLE LITTLE INDEX;So;0;L;;;;;N;;;;; +1D8A2;SIGNWRITING HAND-HINGE LITTLE INDEX;So;0;L;;;;;N;;;;; +1D8A3;SIGNWRITING HAND-ANGLE LITTLE INDEX;So;0;L;;;;;N;;;;; +1D8A4;SIGNWRITING HAND-FIST INDEX MIDDLE LITTLE;So;0;L;;;;;N;;;;; +1D8A5;SIGNWRITING HAND-CIRCLE INDEX MIDDLE LITTLE;So;0;L;;;;;N;;;;; +1D8A6;SIGNWRITING HAND-HINGE INDEX MIDDLE LITTLE;So;0;L;;;;;N;;;;; +1D8A7;SIGNWRITING HAND-HINGE RING;So;0;L;;;;;N;;;;; +1D8A8;SIGNWRITING HAND-ANGLE INDEX MIDDLE LITTLE;So;0;L;;;;;N;;;;; +1D8A9;SIGNWRITING HAND-FIST INDEX MIDDLE CROSS LITTLE;So;0;L;;;;;N;;;;; +1D8AA;SIGNWRITING HAND-CIRCLE INDEX MIDDLE CROSS LITTLE;So;0;L;;;;;N;;;;; +1D8AB;SIGNWRITING HAND-FIST RING DOWN;So;0;L;;;;;N;;;;; +1D8AC;SIGNWRITING HAND-HINGE RING DOWN INDEX THUMB HOOK MIDDLE;So;0;L;;;;;N;;;;; +1D8AD;SIGNWRITING HAND-ANGLE RING DOWN MIDDLE THUMB INDEX CROSS;So;0;L;;;;;N;;;;; +1D8AE;SIGNWRITING HAND-FIST RING UP;So;0;L;;;;;N;;;;; +1D8AF;SIGNWRITING HAND-FIST RING RAISED KNUCKLE;So;0;L;;;;;N;;;;; +1D8B0;SIGNWRITING HAND-FIST RING LITTLE;So;0;L;;;;;N;;;;; +1D8B1;SIGNWRITING HAND-CIRCLE RING LITTLE;So;0;L;;;;;N;;;;; +1D8B2;SIGNWRITING HAND-OVAL RING LITTLE;So;0;L;;;;;N;;;;; +1D8B3;SIGNWRITING HAND-ANGLE RING LITTLE;So;0;L;;;;;N;;;;; +1D8B4;SIGNWRITING HAND-FIST RING MIDDLE;So;0;L;;;;;N;;;;; +1D8B5;SIGNWRITING HAND-FIST RING MIDDLE CONJOINED;So;0;L;;;;;N;;;;; +1D8B6;SIGNWRITING HAND-FIST RING MIDDLE RAISED KNUCKLES;So;0;L;;;;;N;;;;; +1D8B7;SIGNWRITING HAND-FIST RING INDEX;So;0;L;;;;;N;;;;; +1D8B8;SIGNWRITING HAND-FIST RING THUMB;So;0;L;;;;;N;;;;; +1D8B9;SIGNWRITING HAND-HOOK RING THUMB;So;0;L;;;;;N;;;;; +1D8BA;SIGNWRITING HAND-FIST INDEX RING LITTLE;So;0;L;;;;;N;;;;; +1D8BB;SIGNWRITING HAND-CIRCLE INDEX RING LITTLE;So;0;L;;;;;N;;;;; +1D8BC;SIGNWRITING HAND-CURLICUE INDEX RING LITTLE ON;So;0;L;;;;;N;;;;; +1D8BD;SIGNWRITING HAND-HOOK INDEX RING LITTLE OUT;So;0;L;;;;;N;;;;; +1D8BE;SIGNWRITING HAND-HOOK INDEX RING LITTLE IN;So;0;L;;;;;N;;;;; +1D8BF;SIGNWRITING HAND-HOOK INDEX RING LITTLE UNDER;So;0;L;;;;;N;;;;; +1D8C0;SIGNWRITING HAND-CUP INDEX RING LITTLE;So;0;L;;;;;N;;;;; +1D8C1;SIGNWRITING HAND-HINGE INDEX RING LITTLE;So;0;L;;;;;N;;;;; +1D8C2;SIGNWRITING HAND-ANGLE INDEX RING LITTLE OUT;So;0;L;;;;;N;;;;; +1D8C3;SIGNWRITING HAND-ANGLE INDEX RING LITTLE;So;0;L;;;;;N;;;;; +1D8C4;SIGNWRITING HAND-FIST MIDDLE DOWN;So;0;L;;;;;N;;;;; +1D8C5;SIGNWRITING HAND-HINGE MIDDLE;So;0;L;;;;;N;;;;; +1D8C6;SIGNWRITING HAND-FIST MIDDLE UP;So;0;L;;;;;N;;;;; +1D8C7;SIGNWRITING HAND-CIRCLE MIDDLE UP;So;0;L;;;;;N;;;;; +1D8C8;SIGNWRITING HAND-FIST MIDDLE RAISED KNUCKLE;So;0;L;;;;;N;;;;; +1D8C9;SIGNWRITING HAND-FIST MIDDLE UP THUMB SIDE;So;0;L;;;;;N;;;;; +1D8CA;SIGNWRITING HAND-HOOK MIDDLE THUMB;So;0;L;;;;;N;;;;; +1D8CB;SIGNWRITING HAND-FIST MIDDLE THUMB LITTLE;So;0;L;;;;;N;;;;; +1D8CC;SIGNWRITING HAND-FIST MIDDLE LITTLE;So;0;L;;;;;N;;;;; +1D8CD;SIGNWRITING HAND-FIST MIDDLE RING LITTLE;So;0;L;;;;;N;;;;; +1D8CE;SIGNWRITING HAND-CIRCLE MIDDLE RING LITTLE;So;0;L;;;;;N;;;;; +1D8CF;SIGNWRITING HAND-CURLICUE MIDDLE RING LITTLE ON;So;0;L;;;;;N;;;;; +1D8D0;SIGNWRITING HAND-CUP MIDDLE RING LITTLE;So;0;L;;;;;N;;;;; +1D8D1;SIGNWRITING HAND-HINGE MIDDLE RING LITTLE;So;0;L;;;;;N;;;;; +1D8D2;SIGNWRITING HAND-ANGLE MIDDLE RING LITTLE OUT;So;0;L;;;;;N;;;;; +1D8D3;SIGNWRITING HAND-ANGLE MIDDLE RING LITTLE IN;So;0;L;;;;;N;;;;; +1D8D4;SIGNWRITING HAND-ANGLE MIDDLE RING LITTLE;So;0;L;;;;;N;;;;; +1D8D5;SIGNWRITING HAND-CIRCLE MIDDLE RING LITTLE BENT;So;0;L;;;;;N;;;;; +1D8D6;SIGNWRITING HAND-CLAW MIDDLE RING LITTLE CONJOINED;So;0;L;;;;;N;;;;; +1D8D7;SIGNWRITING HAND-CLAW MIDDLE RING LITTLE CONJOINED SIDE;So;0;L;;;;;N;;;;; +1D8D8;SIGNWRITING HAND-HOOK MIDDLE RING LITTLE CONJOINED OUT;So;0;L;;;;;N;;;;; +1D8D9;SIGNWRITING HAND-HOOK MIDDLE RING LITTLE CONJOINED IN;So;0;L;;;;;N;;;;; +1D8DA;SIGNWRITING HAND-HOOK MIDDLE RING LITTLE CONJOINED;So;0;L;;;;;N;;;;; +1D8DB;SIGNWRITING HAND-HINGE INDEX HINGED;So;0;L;;;;;N;;;;; +1D8DC;SIGNWRITING HAND-FIST INDEX THUMB SIDE;So;0;L;;;;;N;;;;; +1D8DD;SIGNWRITING HAND-HINGE INDEX THUMB SIDE;So;0;L;;;;;N;;;;; +1D8DE;SIGNWRITING HAND-FIST INDEX THUMB SIDE THUMB DIAGONAL;So;0;L;;;;;N;;;;; +1D8DF;SIGNWRITING HAND-FIST INDEX THUMB SIDE THUMB CONJOINED;So;0;L;;;;;N;;;;; +1D8E0;SIGNWRITING HAND-FIST INDEX THUMB SIDE THUMB BENT;So;0;L;;;;;N;;;;; +1D8E1;SIGNWRITING HAND-FIST INDEX THUMB SIDE INDEX BENT;So;0;L;;;;;N;;;;; +1D8E2;SIGNWRITING HAND-FIST INDEX THUMB SIDE BOTH BENT;So;0;L;;;;;N;;;;; +1D8E3;SIGNWRITING HAND-FIST INDEX THUMB SIDE INDEX HINGE;So;0;L;;;;;N;;;;; +1D8E4;SIGNWRITING HAND-FIST INDEX THUMB FORWARD INDEX STRAIGHT;So;0;L;;;;;N;;;;; +1D8E5;SIGNWRITING HAND-FIST INDEX THUMB FORWARD INDEX BENT;So;0;L;;;;;N;;;;; +1D8E6;SIGNWRITING HAND-FIST INDEX THUMB HOOK;So;0;L;;;;;N;;;;; +1D8E7;SIGNWRITING HAND-FIST INDEX THUMB CURLICUE;So;0;L;;;;;N;;;;; +1D8E8;SIGNWRITING HAND-FIST INDEX THUMB CURVE THUMB INSIDE;So;0;L;;;;;N;;;;; +1D8E9;SIGNWRITING HAND-CLAW INDEX THUMB CURVE THUMB INSIDE;So;0;L;;;;;N;;;;; +1D8EA;SIGNWRITING HAND-FIST INDEX THUMB CURVE THUMB UNDER;So;0;L;;;;;N;;;;; +1D8EB;SIGNWRITING HAND-FIST INDEX THUMB CIRCLE;So;0;L;;;;;N;;;;; +1D8EC;SIGNWRITING HAND-CUP INDEX THUMB;So;0;L;;;;;N;;;;; +1D8ED;SIGNWRITING HAND-CUP INDEX THUMB OPEN;So;0;L;;;;;N;;;;; +1D8EE;SIGNWRITING HAND-HINGE INDEX THUMB OPEN;So;0;L;;;;;N;;;;; +1D8EF;SIGNWRITING HAND-HINGE INDEX THUMB LARGE;So;0;L;;;;;N;;;;; +1D8F0;SIGNWRITING HAND-HINGE INDEX THUMB;So;0;L;;;;;N;;;;; +1D8F1;SIGNWRITING HAND-HINGE INDEX THUMB SMALL;So;0;L;;;;;N;;;;; +1D8F2;SIGNWRITING HAND-ANGLE INDEX THUMB OUT;So;0;L;;;;;N;;;;; +1D8F3;SIGNWRITING HAND-ANGLE INDEX THUMB IN;So;0;L;;;;;N;;;;; +1D8F4;SIGNWRITING HAND-ANGLE INDEX THUMB;So;0;L;;;;;N;;;;; +1D8F5;SIGNWRITING HAND-FIST THUMB;So;0;L;;;;;N;;;;; +1D8F6;SIGNWRITING HAND-FIST THUMB HEEL;So;0;L;;;;;N;;;;; +1D8F7;SIGNWRITING HAND-FIST THUMB SIDE DIAGONAL;So;0;L;;;;;N;;;;; +1D8F8;SIGNWRITING HAND-FIST THUMB SIDE CONJOINED;So;0;L;;;;;N;;;;; +1D8F9;SIGNWRITING HAND-FIST THUMB SIDE BENT;So;0;L;;;;;N;;;;; +1D8FA;SIGNWRITING HAND-FIST THUMB FORWARD;So;0;L;;;;;N;;;;; +1D8FB;SIGNWRITING HAND-FIST THUMB BETWEEN INDEX MIDDLE;So;0;L;;;;;N;;;;; +1D8FC;SIGNWRITING HAND-FIST THUMB BETWEEN MIDDLE RING;So;0;L;;;;;N;;;;; +1D8FD;SIGNWRITING HAND-FIST THUMB BETWEEN RING LITTLE;So;0;L;;;;;N;;;;; +1D8FE;SIGNWRITING HAND-FIST THUMB UNDER TWO FINGERS;So;0;L;;;;;N;;;;; +1D8FF;SIGNWRITING HAND-FIST THUMB OVER TWO FINGERS;So;0;L;;;;;N;;;;; +1D900;SIGNWRITING HAND-FIST THUMB UNDER THREE FINGERS;So;0;L;;;;;N;;;;; +1D901;SIGNWRITING HAND-FIST THUMB UNDER FOUR FINGERS;So;0;L;;;;;N;;;;; +1D902;SIGNWRITING HAND-FIST THUMB OVER FOUR RAISED KNUCKLES;So;0;L;;;;;N;;;;; +1D903;SIGNWRITING HAND-FIST;So;0;L;;;;;N;;;;; +1D904;SIGNWRITING HAND-FIST HEEL;So;0;L;;;;;N;;;;; +1D905;SIGNWRITING TOUCH SINGLE;So;0;L;;;;;N;;;;; +1D906;SIGNWRITING TOUCH MULTIPLE;So;0;L;;;;;N;;;;; +1D907;SIGNWRITING TOUCH BETWEEN;So;0;L;;;;;N;;;;; +1D908;SIGNWRITING GRASP SINGLE;So;0;L;;;;;N;;;;; +1D909;SIGNWRITING GRASP MULTIPLE;So;0;L;;;;;N;;;;; +1D90A;SIGNWRITING GRASP BETWEEN;So;0;L;;;;;N;;;;; +1D90B;SIGNWRITING STRIKE SINGLE;So;0;L;;;;;N;;;;; +1D90C;SIGNWRITING STRIKE MULTIPLE;So;0;L;;;;;N;;;;; +1D90D;SIGNWRITING STRIKE BETWEEN;So;0;L;;;;;N;;;;; +1D90E;SIGNWRITING BRUSH SINGLE;So;0;L;;;;;N;;;;; +1D90F;SIGNWRITING BRUSH MULTIPLE;So;0;L;;;;;N;;;;; +1D910;SIGNWRITING BRUSH BETWEEN;So;0;L;;;;;N;;;;; +1D911;SIGNWRITING RUB SINGLE;So;0;L;;;;;N;;;;; +1D912;SIGNWRITING RUB MULTIPLE;So;0;L;;;;;N;;;;; +1D913;SIGNWRITING RUB BETWEEN;So;0;L;;;;;N;;;;; +1D914;SIGNWRITING SURFACE SYMBOLS;So;0;L;;;;;N;;;;; +1D915;SIGNWRITING SURFACE BETWEEN;So;0;L;;;;;N;;;;; +1D916;SIGNWRITING SQUEEZE LARGE SINGLE;So;0;L;;;;;N;;;;; +1D917;SIGNWRITING SQUEEZE SMALL SINGLE;So;0;L;;;;;N;;;;; +1D918;SIGNWRITING SQUEEZE LARGE MULTIPLE;So;0;L;;;;;N;;;;; +1D919;SIGNWRITING SQUEEZE SMALL MULTIPLE;So;0;L;;;;;N;;;;; +1D91A;SIGNWRITING SQUEEZE SEQUENTIAL;So;0;L;;;;;N;;;;; +1D91B;SIGNWRITING FLICK LARGE SINGLE;So;0;L;;;;;N;;;;; +1D91C;SIGNWRITING FLICK SMALL SINGLE;So;0;L;;;;;N;;;;; +1D91D;SIGNWRITING FLICK LARGE MULTIPLE;So;0;L;;;;;N;;;;; +1D91E;SIGNWRITING FLICK SMALL MULTIPLE;So;0;L;;;;;N;;;;; +1D91F;SIGNWRITING FLICK SEQUENTIAL;So;0;L;;;;;N;;;;; +1D920;SIGNWRITING SQUEEZE FLICK ALTERNATING;So;0;L;;;;;N;;;;; +1D921;SIGNWRITING MOVEMENT-HINGE UP DOWN LARGE;So;0;L;;;;;N;;;;; +1D922;SIGNWRITING MOVEMENT-HINGE UP DOWN SMALL;So;0;L;;;;;N;;;;; +1D923;SIGNWRITING MOVEMENT-HINGE UP SEQUENTIAL;So;0;L;;;;;N;;;;; +1D924;SIGNWRITING MOVEMENT-HINGE DOWN SEQUENTIAL;So;0;L;;;;;N;;;;; +1D925;SIGNWRITING MOVEMENT-HINGE UP DOWN ALTERNATING LARGE;So;0;L;;;;;N;;;;; +1D926;SIGNWRITING MOVEMENT-HINGE UP DOWN ALTERNATING SMALL;So;0;L;;;;;N;;;;; +1D927;SIGNWRITING MOVEMENT-HINGE SIDE TO SIDE SCISSORS;So;0;L;;;;;N;;;;; +1D928;SIGNWRITING MOVEMENT-WALLPLANE FINGER CONTACT;So;0;L;;;;;N;;;;; +1D929;SIGNWRITING MOVEMENT-FLOORPLANE FINGER CONTACT;So;0;L;;;;;N;;;;; +1D92A;SIGNWRITING MOVEMENT-WALLPLANE SINGLE STRAIGHT SMALL;So;0;L;;;;;N;;;;; +1D92B;SIGNWRITING MOVEMENT-WALLPLANE SINGLE STRAIGHT MEDIUM;So;0;L;;;;;N;;;;; +1D92C;SIGNWRITING MOVEMENT-WALLPLANE SINGLE STRAIGHT LARGE;So;0;L;;;;;N;;;;; +1D92D;SIGNWRITING MOVEMENT-WALLPLANE SINGLE STRAIGHT LARGEST;So;0;L;;;;;N;;;;; +1D92E;SIGNWRITING MOVEMENT-WALLPLANE SINGLE WRIST FLEX;So;0;L;;;;;N;;;;; +1D92F;SIGNWRITING MOVEMENT-WALLPLANE DOUBLE STRAIGHT;So;0;L;;;;;N;;;;; +1D930;SIGNWRITING MOVEMENT-WALLPLANE DOUBLE WRIST FLEX;So;0;L;;;;;N;;;;; +1D931;SIGNWRITING MOVEMENT-WALLPLANE DOUBLE ALTERNATING;So;0;L;;;;;N;;;;; +1D932;SIGNWRITING MOVEMENT-WALLPLANE DOUBLE ALTERNATING WRIST FLEX;So;0;L;;;;;N;;;;; +1D933;SIGNWRITING MOVEMENT-WALLPLANE CROSS;So;0;L;;;;;N;;;;; +1D934;SIGNWRITING MOVEMENT-WALLPLANE TRIPLE STRAIGHT MOVEMENT;So;0;L;;;;;N;;;;; +1D935;SIGNWRITING MOVEMENT-WALLPLANE TRIPLE WRIST FLEX;So;0;L;;;;;N;;;;; +1D936;SIGNWRITING MOVEMENT-WALLPLANE TRIPLE ALTERNATING;So;0;L;;;;;N;;;;; +1D937;SIGNWRITING MOVEMENT-WALLPLANE TRIPLE ALTERNATING WRIST FLEX;So;0;L;;;;;N;;;;; +1D938;SIGNWRITING MOVEMENT-WALLPLANE BEND SMALL;So;0;L;;;;;N;;;;; +1D939;SIGNWRITING MOVEMENT-WALLPLANE BEND MEDIUM;So;0;L;;;;;N;;;;; +1D93A;SIGNWRITING MOVEMENT-WALLPLANE BEND LARGE;So;0;L;;;;;N;;;;; +1D93B;SIGNWRITING MOVEMENT-WALLPLANE CORNER SMALL;So;0;L;;;;;N;;;;; +1D93C;SIGNWRITING MOVEMENT-WALLPLANE CORNER MEDIUM;So;0;L;;;;;N;;;;; +1D93D;SIGNWRITING MOVEMENT-WALLPLANE CORNER LARGE;So;0;L;;;;;N;;;;; +1D93E;SIGNWRITING MOVEMENT-WALLPLANE CORNER ROTATION;So;0;L;;;;;N;;;;; +1D93F;SIGNWRITING MOVEMENT-WALLPLANE CHECK SMALL;So;0;L;;;;;N;;;;; +1D940;SIGNWRITING MOVEMENT-WALLPLANE CHECK MEDIUM;So;0;L;;;;;N;;;;; +1D941;SIGNWRITING MOVEMENT-WALLPLANE CHECK LARGE;So;0;L;;;;;N;;;;; +1D942;SIGNWRITING MOVEMENT-WALLPLANE BOX SMALL;So;0;L;;;;;N;;;;; +1D943;SIGNWRITING MOVEMENT-WALLPLANE BOX MEDIUM;So;0;L;;;;;N;;;;; +1D944;SIGNWRITING MOVEMENT-WALLPLANE BOX LARGE;So;0;L;;;;;N;;;;; +1D945;SIGNWRITING MOVEMENT-WALLPLANE ZIGZAG SMALL;So;0;L;;;;;N;;;;; +1D946;SIGNWRITING MOVEMENT-WALLPLANE ZIGZAG MEDIUM;So;0;L;;;;;N;;;;; +1D947;SIGNWRITING MOVEMENT-WALLPLANE ZIGZAG LARGE;So;0;L;;;;;N;;;;; +1D948;SIGNWRITING MOVEMENT-WALLPLANE PEAKS SMALL;So;0;L;;;;;N;;;;; +1D949;SIGNWRITING MOVEMENT-WALLPLANE PEAKS MEDIUM;So;0;L;;;;;N;;;;; +1D94A;SIGNWRITING MOVEMENT-WALLPLANE PEAKS LARGE;So;0;L;;;;;N;;;;; +1D94B;SIGNWRITING TRAVEL-WALLPLANE ROTATION-WALLPLANE SINGLE;So;0;L;;;;;N;;;;; +1D94C;SIGNWRITING TRAVEL-WALLPLANE ROTATION-WALLPLANE DOUBLE;So;0;L;;;;;N;;;;; +1D94D;SIGNWRITING TRAVEL-WALLPLANE ROTATION-WALLPLANE ALTERNATING;So;0;L;;;;;N;;;;; +1D94E;SIGNWRITING TRAVEL-WALLPLANE ROTATION-FLOORPLANE SINGLE;So;0;L;;;;;N;;;;; +1D94F;SIGNWRITING TRAVEL-WALLPLANE ROTATION-FLOORPLANE DOUBLE;So;0;L;;;;;N;;;;; +1D950;SIGNWRITING TRAVEL-WALLPLANE ROTATION-FLOORPLANE ALTERNATING;So;0;L;;;;;N;;;;; +1D951;SIGNWRITING TRAVEL-WALLPLANE SHAKING;So;0;L;;;;;N;;;;; +1D952;SIGNWRITING TRAVEL-WALLPLANE ARM SPIRAL SINGLE;So;0;L;;;;;N;;;;; +1D953;SIGNWRITING TRAVEL-WALLPLANE ARM SPIRAL DOUBLE;So;0;L;;;;;N;;;;; +1D954;SIGNWRITING TRAVEL-WALLPLANE ARM SPIRAL TRIPLE;So;0;L;;;;;N;;;;; +1D955;SIGNWRITING MOVEMENT-DIAGONAL AWAY SMALL;So;0;L;;;;;N;;;;; +1D956;SIGNWRITING MOVEMENT-DIAGONAL AWAY MEDIUM;So;0;L;;;;;N;;;;; +1D957;SIGNWRITING MOVEMENT-DIAGONAL AWAY LARGE;So;0;L;;;;;N;;;;; +1D958;SIGNWRITING MOVEMENT-DIAGONAL AWAY LARGEST;So;0;L;;;;;N;;;;; +1D959;SIGNWRITING MOVEMENT-DIAGONAL TOWARDS SMALL;So;0;L;;;;;N;;;;; +1D95A;SIGNWRITING MOVEMENT-DIAGONAL TOWARDS MEDIUM;So;0;L;;;;;N;;;;; +1D95B;SIGNWRITING MOVEMENT-DIAGONAL TOWARDS LARGE;So;0;L;;;;;N;;;;; +1D95C;SIGNWRITING MOVEMENT-DIAGONAL TOWARDS LARGEST;So;0;L;;;;;N;;;;; +1D95D;SIGNWRITING MOVEMENT-DIAGONAL BETWEEN AWAY SMALL;So;0;L;;;;;N;;;;; +1D95E;SIGNWRITING MOVEMENT-DIAGONAL BETWEEN AWAY MEDIUM;So;0;L;;;;;N;;;;; +1D95F;SIGNWRITING MOVEMENT-DIAGONAL BETWEEN AWAY LARGE;So;0;L;;;;;N;;;;; +1D960;SIGNWRITING MOVEMENT-DIAGONAL BETWEEN AWAY LARGEST;So;0;L;;;;;N;;;;; +1D961;SIGNWRITING MOVEMENT-DIAGONAL BETWEEN TOWARDS SMALL;So;0;L;;;;;N;;;;; +1D962;SIGNWRITING MOVEMENT-DIAGONAL BETWEEN TOWARDS MEDIUM;So;0;L;;;;;N;;;;; +1D963;SIGNWRITING MOVEMENT-DIAGONAL BETWEEN TOWARDS LARGE;So;0;L;;;;;N;;;;; +1D964;SIGNWRITING MOVEMENT-DIAGONAL BETWEEN TOWARDS LARGEST;So;0;L;;;;;N;;;;; +1D965;SIGNWRITING MOVEMENT-FLOORPLANE SINGLE STRAIGHT SMALL;So;0;L;;;;;N;;;;; +1D966;SIGNWRITING MOVEMENT-FLOORPLANE SINGLE STRAIGHT MEDIUM;So;0;L;;;;;N;;;;; +1D967;SIGNWRITING MOVEMENT-FLOORPLANE SINGLE STRAIGHT LARGE;So;0;L;;;;;N;;;;; +1D968;SIGNWRITING MOVEMENT-FLOORPLANE SINGLE STRAIGHT LARGEST;So;0;L;;;;;N;;;;; +1D969;SIGNWRITING MOVEMENT-FLOORPLANE SINGLE WRIST FLEX;So;0;L;;;;;N;;;;; +1D96A;SIGNWRITING MOVEMENT-FLOORPLANE DOUBLE STRAIGHT;So;0;L;;;;;N;;;;; +1D96B;SIGNWRITING MOVEMENT-FLOORPLANE DOUBLE WRIST FLEX;So;0;L;;;;;N;;;;; +1D96C;SIGNWRITING MOVEMENT-FLOORPLANE DOUBLE ALTERNATING;So;0;L;;;;;N;;;;; +1D96D;SIGNWRITING MOVEMENT-FLOORPLANE DOUBLE ALTERNATING WRIST FLEX;So;0;L;;;;;N;;;;; +1D96E;SIGNWRITING MOVEMENT-FLOORPLANE CROSS;So;0;L;;;;;N;;;;; +1D96F;SIGNWRITING MOVEMENT-FLOORPLANE TRIPLE STRAIGHT MOVEMENT;So;0;L;;;;;N;;;;; +1D970;SIGNWRITING MOVEMENT-FLOORPLANE TRIPLE WRIST FLEX;So;0;L;;;;;N;;;;; +1D971;SIGNWRITING MOVEMENT-FLOORPLANE TRIPLE ALTERNATING MOVEMENT;So;0;L;;;;;N;;;;; +1D972;SIGNWRITING MOVEMENT-FLOORPLANE TRIPLE ALTERNATING WRIST FLEX;So;0;L;;;;;N;;;;; +1D973;SIGNWRITING MOVEMENT-FLOORPLANE BEND;So;0;L;;;;;N;;;;; +1D974;SIGNWRITING MOVEMENT-FLOORPLANE CORNER SMALL;So;0;L;;;;;N;;;;; +1D975;SIGNWRITING MOVEMENT-FLOORPLANE CORNER MEDIUM;So;0;L;;;;;N;;;;; +1D976;SIGNWRITING MOVEMENT-FLOORPLANE CORNER LARGE;So;0;L;;;;;N;;;;; +1D977;SIGNWRITING MOVEMENT-FLOORPLANE CHECK;So;0;L;;;;;N;;;;; +1D978;SIGNWRITING MOVEMENT-FLOORPLANE BOX SMALL;So;0;L;;;;;N;;;;; +1D979;SIGNWRITING MOVEMENT-FLOORPLANE BOX MEDIUM;So;0;L;;;;;N;;;;; +1D97A;SIGNWRITING MOVEMENT-FLOORPLANE BOX LARGE;So;0;L;;;;;N;;;;; +1D97B;SIGNWRITING MOVEMENT-FLOORPLANE ZIGZAG SMALL;So;0;L;;;;;N;;;;; +1D97C;SIGNWRITING MOVEMENT-FLOORPLANE ZIGZAG MEDIUM;So;0;L;;;;;N;;;;; +1D97D;SIGNWRITING MOVEMENT-FLOORPLANE ZIGZAG LARGE;So;0;L;;;;;N;;;;; +1D97E;SIGNWRITING MOVEMENT-FLOORPLANE PEAKS SMALL;So;0;L;;;;;N;;;;; +1D97F;SIGNWRITING MOVEMENT-FLOORPLANE PEAKS MEDIUM;So;0;L;;;;;N;;;;; +1D980;SIGNWRITING MOVEMENT-FLOORPLANE PEAKS LARGE;So;0;L;;;;;N;;;;; +1D981;SIGNWRITING TRAVEL-FLOORPLANE ROTATION-FLOORPLANE SINGLE;So;0;L;;;;;N;;;;; +1D982;SIGNWRITING TRAVEL-FLOORPLANE ROTATION-FLOORPLANE DOUBLE;So;0;L;;;;;N;;;;; +1D983;SIGNWRITING TRAVEL-FLOORPLANE ROTATION-FLOORPLANE ALTERNATING;So;0;L;;;;;N;;;;; +1D984;SIGNWRITING TRAVEL-FLOORPLANE ROTATION-WALLPLANE SINGLE;So;0;L;;;;;N;;;;; +1D985;SIGNWRITING TRAVEL-FLOORPLANE ROTATION-WALLPLANE DOUBLE;So;0;L;;;;;N;;;;; +1D986;SIGNWRITING TRAVEL-FLOORPLANE ROTATION-WALLPLANE ALTERNATING;So;0;L;;;;;N;;;;; +1D987;SIGNWRITING TRAVEL-FLOORPLANE SHAKING;So;0;L;;;;;N;;;;; +1D988;SIGNWRITING MOVEMENT-WALLPLANE CURVE QUARTER SMALL;So;0;L;;;;;N;;;;; +1D989;SIGNWRITING MOVEMENT-WALLPLANE CURVE QUARTER MEDIUM;So;0;L;;;;;N;;;;; +1D98A;SIGNWRITING MOVEMENT-WALLPLANE CURVE QUARTER LARGE;So;0;L;;;;;N;;;;; +1D98B;SIGNWRITING MOVEMENT-WALLPLANE CURVE QUARTER LARGEST;So;0;L;;;;;N;;;;; +1D98C;SIGNWRITING MOVEMENT-WALLPLANE CURVE HALF-CIRCLE SMALL;So;0;L;;;;;N;;;;; +1D98D;SIGNWRITING MOVEMENT-WALLPLANE CURVE HALF-CIRCLE MEDIUM;So;0;L;;;;;N;;;;; +1D98E;SIGNWRITING MOVEMENT-WALLPLANE CURVE HALF-CIRCLE LARGE;So;0;L;;;;;N;;;;; +1D98F;SIGNWRITING MOVEMENT-WALLPLANE CURVE HALF-CIRCLE LARGEST;So;0;L;;;;;N;;;;; +1D990;SIGNWRITING MOVEMENT-WALLPLANE CURVE THREE-QUARTER CIRCLE SMALL;So;0;L;;;;;N;;;;; +1D991;SIGNWRITING MOVEMENT-WALLPLANE CURVE THREE-QUARTER CIRCLE MEDIUM;So;0;L;;;;;N;;;;; +1D992;SIGNWRITING MOVEMENT-WALLPLANE HUMP SMALL;So;0;L;;;;;N;;;;; +1D993;SIGNWRITING MOVEMENT-WALLPLANE HUMP MEDIUM;So;0;L;;;;;N;;;;; +1D994;SIGNWRITING MOVEMENT-WALLPLANE HUMP LARGE;So;0;L;;;;;N;;;;; +1D995;SIGNWRITING MOVEMENT-WALLPLANE LOOP SMALL;So;0;L;;;;;N;;;;; +1D996;SIGNWRITING MOVEMENT-WALLPLANE LOOP MEDIUM;So;0;L;;;;;N;;;;; +1D997;SIGNWRITING MOVEMENT-WALLPLANE LOOP LARGE;So;0;L;;;;;N;;;;; +1D998;SIGNWRITING MOVEMENT-WALLPLANE LOOP SMALL DOUBLE;So;0;L;;;;;N;;;;; +1D999;SIGNWRITING MOVEMENT-WALLPLANE WAVE CURVE DOUBLE SMALL;So;0;L;;;;;N;;;;; +1D99A;SIGNWRITING MOVEMENT-WALLPLANE WAVE CURVE DOUBLE MEDIUM;So;0;L;;;;;N;;;;; +1D99B;SIGNWRITING MOVEMENT-WALLPLANE WAVE CURVE DOUBLE LARGE;So;0;L;;;;;N;;;;; +1D99C;SIGNWRITING MOVEMENT-WALLPLANE WAVE CURVE TRIPLE SMALL;So;0;L;;;;;N;;;;; +1D99D;SIGNWRITING MOVEMENT-WALLPLANE WAVE CURVE TRIPLE MEDIUM;So;0;L;;;;;N;;;;; +1D99E;SIGNWRITING MOVEMENT-WALLPLANE WAVE CURVE TRIPLE LARGE;So;0;L;;;;;N;;;;; +1D99F;SIGNWRITING MOVEMENT-WALLPLANE CURVE THEN STRAIGHT;So;0;L;;;;;N;;;;; +1D9A0;SIGNWRITING MOVEMENT-WALLPLANE CURVED CROSS SMALL;So;0;L;;;;;N;;;;; +1D9A1;SIGNWRITING MOVEMENT-WALLPLANE CURVED CROSS MEDIUM;So;0;L;;;;;N;;;;; +1D9A2;SIGNWRITING ROTATION-WALLPLANE SINGLE;So;0;L;;;;;N;;;;; +1D9A3;SIGNWRITING ROTATION-WALLPLANE DOUBLE;So;0;L;;;;;N;;;;; +1D9A4;SIGNWRITING ROTATION-WALLPLANE ALTERNATE;So;0;L;;;;;N;;;;; +1D9A5;SIGNWRITING MOVEMENT-WALLPLANE SHAKING;So;0;L;;;;;N;;;;; +1D9A6;SIGNWRITING MOVEMENT-WALLPLANE CURVE HITTING FRONT WALL;So;0;L;;;;;N;;;;; +1D9A7;SIGNWRITING MOVEMENT-WALLPLANE HUMP HITTING FRONT WALL;So;0;L;;;;;N;;;;; +1D9A8;SIGNWRITING MOVEMENT-WALLPLANE LOOP HITTING FRONT WALL;So;0;L;;;;;N;;;;; +1D9A9;SIGNWRITING MOVEMENT-WALLPLANE WAVE HITTING FRONT WALL;So;0;L;;;;;N;;;;; +1D9AA;SIGNWRITING ROTATION-WALLPLANE SINGLE HITTING FRONT WALL;So;0;L;;;;;N;;;;; +1D9AB;SIGNWRITING ROTATION-WALLPLANE DOUBLE HITTING FRONT WALL;So;0;L;;;;;N;;;;; +1D9AC;SIGNWRITING ROTATION-WALLPLANE ALTERNATING HITTING FRONT WALL;So;0;L;;;;;N;;;;; +1D9AD;SIGNWRITING MOVEMENT-WALLPLANE CURVE HITTING CHEST;So;0;L;;;;;N;;;;; +1D9AE;SIGNWRITING MOVEMENT-WALLPLANE HUMP HITTING CHEST;So;0;L;;;;;N;;;;; +1D9AF;SIGNWRITING MOVEMENT-WALLPLANE LOOP HITTING CHEST;So;0;L;;;;;N;;;;; +1D9B0;SIGNWRITING MOVEMENT-WALLPLANE WAVE HITTING CHEST;So;0;L;;;;;N;;;;; +1D9B1;SIGNWRITING ROTATION-WALLPLANE SINGLE HITTING CHEST;So;0;L;;;;;N;;;;; +1D9B2;SIGNWRITING ROTATION-WALLPLANE DOUBLE HITTING CHEST;So;0;L;;;;;N;;;;; +1D9B3;SIGNWRITING ROTATION-WALLPLANE ALTERNATING HITTING CHEST;So;0;L;;;;;N;;;;; +1D9B4;SIGNWRITING MOVEMENT-WALLPLANE WAVE DIAGONAL PATH SMALL;So;0;L;;;;;N;;;;; +1D9B5;SIGNWRITING MOVEMENT-WALLPLANE WAVE DIAGONAL PATH MEDIUM;So;0;L;;;;;N;;;;; +1D9B6;SIGNWRITING MOVEMENT-WALLPLANE WAVE DIAGONAL PATH LARGE;So;0;L;;;;;N;;;;; +1D9B7;SIGNWRITING MOVEMENT-FLOORPLANE CURVE HITTING CEILING SMALL;So;0;L;;;;;N;;;;; +1D9B8;SIGNWRITING MOVEMENT-FLOORPLANE CURVE HITTING CEILING LARGE;So;0;L;;;;;N;;;;; +1D9B9;SIGNWRITING MOVEMENT-FLOORPLANE HUMP HITTING CEILING SMALL DOUBLE;So;0;L;;;;;N;;;;; +1D9BA;SIGNWRITING MOVEMENT-FLOORPLANE HUMP HITTING CEILING LARGE DOUBLE;So;0;L;;;;;N;;;;; +1D9BB;SIGNWRITING MOVEMENT-FLOORPLANE HUMP HITTING CEILING SMALL TRIPLE;So;0;L;;;;;N;;;;; +1D9BC;SIGNWRITING MOVEMENT-FLOORPLANE HUMP HITTING CEILING LARGE TRIPLE;So;0;L;;;;;N;;;;; +1D9BD;SIGNWRITING MOVEMENT-FLOORPLANE LOOP HITTING CEILING SMALL SINGLE;So;0;L;;;;;N;;;;; +1D9BE;SIGNWRITING MOVEMENT-FLOORPLANE LOOP HITTING CEILING LARGE SINGLE;So;0;L;;;;;N;;;;; +1D9BF;SIGNWRITING MOVEMENT-FLOORPLANE LOOP HITTING CEILING SMALL DOUBLE;So;0;L;;;;;N;;;;; +1D9C0;SIGNWRITING MOVEMENT-FLOORPLANE LOOP HITTING CEILING LARGE DOUBLE;So;0;L;;;;;N;;;;; +1D9C1;SIGNWRITING MOVEMENT-FLOORPLANE WAVE HITTING CEILING SMALL;So;0;L;;;;;N;;;;; +1D9C2;SIGNWRITING MOVEMENT-FLOORPLANE WAVE HITTING CEILING LARGE;So;0;L;;;;;N;;;;; +1D9C3;SIGNWRITING ROTATION-FLOORPLANE SINGLE HITTING CEILING;So;0;L;;;;;N;;;;; +1D9C4;SIGNWRITING ROTATION-FLOORPLANE DOUBLE HITTING CEILING;So;0;L;;;;;N;;;;; +1D9C5;SIGNWRITING ROTATION-FLOORPLANE ALTERNATING HITTING CEILING;So;0;L;;;;;N;;;;; +1D9C6;SIGNWRITING MOVEMENT-FLOORPLANE CURVE HITTING FLOOR SMALL;So;0;L;;;;;N;;;;; +1D9C7;SIGNWRITING MOVEMENT-FLOORPLANE CURVE HITTING FLOOR LARGE;So;0;L;;;;;N;;;;; +1D9C8;SIGNWRITING MOVEMENT-FLOORPLANE HUMP HITTING FLOOR SMALL DOUBLE;So;0;L;;;;;N;;;;; +1D9C9;SIGNWRITING MOVEMENT-FLOORPLANE HUMP HITTING FLOOR LARGE DOUBLE;So;0;L;;;;;N;;;;; +1D9CA;SIGNWRITING MOVEMENT-FLOORPLANE HUMP HITTING FLOOR TRIPLE SMALL TRIPLE;So;0;L;;;;;N;;;;; +1D9CB;SIGNWRITING MOVEMENT-FLOORPLANE HUMP HITTING FLOOR TRIPLE LARGE TRIPLE;So;0;L;;;;;N;;;;; +1D9CC;SIGNWRITING MOVEMENT-FLOORPLANE LOOP HITTING FLOOR SMALL SINGLE;So;0;L;;;;;N;;;;; +1D9CD;SIGNWRITING MOVEMENT-FLOORPLANE LOOP HITTING FLOOR LARGE SINGLE;So;0;L;;;;;N;;;;; +1D9CE;SIGNWRITING MOVEMENT-FLOORPLANE LOOP HITTING FLOOR SMALL DOUBLE;So;0;L;;;;;N;;;;; +1D9CF;SIGNWRITING MOVEMENT-FLOORPLANE LOOP HITTING FLOOR LARGE DOUBLE;So;0;L;;;;;N;;;;; +1D9D0;SIGNWRITING MOVEMENT-FLOORPLANE WAVE HITTING FLOOR SMALL;So;0;L;;;;;N;;;;; +1D9D1;SIGNWRITING MOVEMENT-FLOORPLANE WAVE HITTING FLOOR LARGE;So;0;L;;;;;N;;;;; +1D9D2;SIGNWRITING ROTATION-FLOORPLANE SINGLE HITTING FLOOR;So;0;L;;;;;N;;;;; +1D9D3;SIGNWRITING ROTATION-FLOORPLANE DOUBLE HITTING FLOOR;So;0;L;;;;;N;;;;; +1D9D4;SIGNWRITING ROTATION-FLOORPLANE ALTERNATING HITTING FLOOR;So;0;L;;;;;N;;;;; +1D9D5;SIGNWRITING MOVEMENT-FLOORPLANE CURVE SMALL;So;0;L;;;;;N;;;;; +1D9D6;SIGNWRITING MOVEMENT-FLOORPLANE CURVE MEDIUM;So;0;L;;;;;N;;;;; +1D9D7;SIGNWRITING MOVEMENT-FLOORPLANE CURVE LARGE;So;0;L;;;;;N;;;;; +1D9D8;SIGNWRITING MOVEMENT-FLOORPLANE CURVE LARGEST;So;0;L;;;;;N;;;;; +1D9D9;SIGNWRITING MOVEMENT-FLOORPLANE CURVE COMBINED;So;0;L;;;;;N;;;;; +1D9DA;SIGNWRITING MOVEMENT-FLOORPLANE HUMP SMALL;So;0;L;;;;;N;;;;; +1D9DB;SIGNWRITING MOVEMENT-FLOORPLANE LOOP SMALL;So;0;L;;;;;N;;;;; +1D9DC;SIGNWRITING MOVEMENT-FLOORPLANE WAVE SNAKE;So;0;L;;;;;N;;;;; +1D9DD;SIGNWRITING MOVEMENT-FLOORPLANE WAVE SMALL;So;0;L;;;;;N;;;;; +1D9DE;SIGNWRITING MOVEMENT-FLOORPLANE WAVE LARGE;So;0;L;;;;;N;;;;; +1D9DF;SIGNWRITING ROTATION-FLOORPLANE SINGLE;So;0;L;;;;;N;;;;; +1D9E0;SIGNWRITING ROTATION-FLOORPLANE DOUBLE;So;0;L;;;;;N;;;;; +1D9E1;SIGNWRITING ROTATION-FLOORPLANE ALTERNATING;So;0;L;;;;;N;;;;; +1D9E2;SIGNWRITING MOVEMENT-FLOORPLANE SHAKING PARALLEL;So;0;L;;;;;N;;;;; +1D9E3;SIGNWRITING MOVEMENT-WALLPLANE ARM CIRCLE SMALL SINGLE;So;0;L;;;;;N;;;;; +1D9E4;SIGNWRITING MOVEMENT-WALLPLANE ARM CIRCLE MEDIUM SINGLE;So;0;L;;;;;N;;;;; +1D9E5;SIGNWRITING MOVEMENT-WALLPLANE ARM CIRCLE SMALL DOUBLE;So;0;L;;;;;N;;;;; +1D9E6;SIGNWRITING MOVEMENT-WALLPLANE ARM CIRCLE MEDIUM DOUBLE;So;0;L;;;;;N;;;;; +1D9E7;SIGNWRITING MOVEMENT-FLOORPLANE ARM CIRCLE HITTING WALL SMALL SINGLE;So;0;L;;;;;N;;;;; +1D9E8;SIGNWRITING MOVEMENT-FLOORPLANE ARM CIRCLE HITTING WALL MEDIUM SINGLE;So;0;L;;;;;N;;;;; +1D9E9;SIGNWRITING MOVEMENT-FLOORPLANE ARM CIRCLE HITTING WALL LARGE SINGLE;So;0;L;;;;;N;;;;; +1D9EA;SIGNWRITING MOVEMENT-FLOORPLANE ARM CIRCLE HITTING WALL SMALL DOUBLE;So;0;L;;;;;N;;;;; +1D9EB;SIGNWRITING MOVEMENT-FLOORPLANE ARM CIRCLE HITTING WALL MEDIUM DOUBLE;So;0;L;;;;;N;;;;; +1D9EC;SIGNWRITING MOVEMENT-FLOORPLANE ARM CIRCLE HITTING WALL LARGE DOUBLE;So;0;L;;;;;N;;;;; +1D9ED;SIGNWRITING MOVEMENT-WALLPLANE WRIST CIRCLE FRONT SINGLE;So;0;L;;;;;N;;;;; +1D9EE;SIGNWRITING MOVEMENT-WALLPLANE WRIST CIRCLE FRONT DOUBLE;So;0;L;;;;;N;;;;; +1D9EF;SIGNWRITING MOVEMENT-FLOORPLANE WRIST CIRCLE HITTING WALL SINGLE;So;0;L;;;;;N;;;;; +1D9F0;SIGNWRITING MOVEMENT-FLOORPLANE WRIST CIRCLE HITTING WALL DOUBLE;So;0;L;;;;;N;;;;; +1D9F1;SIGNWRITING MOVEMENT-WALLPLANE FINGER CIRCLES SINGLE;So;0;L;;;;;N;;;;; +1D9F2;SIGNWRITING MOVEMENT-WALLPLANE FINGER CIRCLES DOUBLE;So;0;L;;;;;N;;;;; +1D9F3;SIGNWRITING MOVEMENT-FLOORPLANE FINGER CIRCLES HITTING WALL SINGLE;So;0;L;;;;;N;;;;; +1D9F4;SIGNWRITING MOVEMENT-FLOORPLANE FINGER CIRCLES HITTING WALL DOUBLE;So;0;L;;;;;N;;;;; +1D9F5;SIGNWRITING DYNAMIC ARROWHEAD SMALL;So;0;L;;;;;N;;;;; +1D9F6;SIGNWRITING DYNAMIC ARROWHEAD LARGE;So;0;L;;;;;N;;;;; +1D9F7;SIGNWRITING DYNAMIC FAST;So;0;L;;;;;N;;;;; +1D9F8;SIGNWRITING DYNAMIC SLOW;So;0;L;;;;;N;;;;; +1D9F9;SIGNWRITING DYNAMIC TENSE;So;0;L;;;;;N;;;;; +1D9FA;SIGNWRITING DYNAMIC RELAXED;So;0;L;;;;;N;;;;; +1D9FB;SIGNWRITING DYNAMIC SIMULTANEOUS;So;0;L;;;;;N;;;;; +1D9FC;SIGNWRITING DYNAMIC SIMULTANEOUS ALTERNATING;So;0;L;;;;;N;;;;; +1D9FD;SIGNWRITING DYNAMIC EVERY OTHER TIME;So;0;L;;;;;N;;;;; +1D9FE;SIGNWRITING DYNAMIC GRADUAL;So;0;L;;;;;N;;;;; +1D9FF;SIGNWRITING HEAD;So;0;L;;;;;N;;;;; +1DA00;SIGNWRITING HEAD RIM;Mn;0;NSM;;;;;N;;;;; +1DA01;SIGNWRITING HEAD MOVEMENT-WALLPLANE STRAIGHT;Mn;0;NSM;;;;;N;;;;; +1DA02;SIGNWRITING HEAD MOVEMENT-WALLPLANE TILT;Mn;0;NSM;;;;;N;;;;; +1DA03;SIGNWRITING HEAD MOVEMENT-FLOORPLANE STRAIGHT;Mn;0;NSM;;;;;N;;;;; +1DA04;SIGNWRITING HEAD MOVEMENT-WALLPLANE CURVE;Mn;0;NSM;;;;;N;;;;; +1DA05;SIGNWRITING HEAD MOVEMENT-FLOORPLANE CURVE;Mn;0;NSM;;;;;N;;;;; +1DA06;SIGNWRITING HEAD MOVEMENT CIRCLE;Mn;0;NSM;;;;;N;;;;; +1DA07;SIGNWRITING FACE DIRECTION POSITION NOSE FORWARD TILTING;Mn;0;NSM;;;;;N;;;;; +1DA08;SIGNWRITING FACE DIRECTION POSITION NOSE UP OR DOWN;Mn;0;NSM;;;;;N;;;;; +1DA09;SIGNWRITING FACE DIRECTION POSITION NOSE UP OR DOWN TILTING;Mn;0;NSM;;;;;N;;;;; +1DA0A;SIGNWRITING EYEBROWS STRAIGHT UP;Mn;0;NSM;;;;;N;;;;; +1DA0B;SIGNWRITING EYEBROWS STRAIGHT NEUTRAL;Mn;0;NSM;;;;;N;;;;; +1DA0C;SIGNWRITING EYEBROWS STRAIGHT DOWN;Mn;0;NSM;;;;;N;;;;; +1DA0D;SIGNWRITING DREAMY EYEBROWS NEUTRAL DOWN;Mn;0;NSM;;;;;N;;;;; +1DA0E;SIGNWRITING DREAMY EYEBROWS DOWN NEUTRAL;Mn;0;NSM;;;;;N;;;;; +1DA0F;SIGNWRITING DREAMY EYEBROWS UP NEUTRAL;Mn;0;NSM;;;;;N;;;;; +1DA10;SIGNWRITING DREAMY EYEBROWS NEUTRAL UP;Mn;0;NSM;;;;;N;;;;; +1DA11;SIGNWRITING FOREHEAD NEUTRAL;Mn;0;NSM;;;;;N;;;;; +1DA12;SIGNWRITING FOREHEAD CONTACT;Mn;0;NSM;;;;;N;;;;; +1DA13;SIGNWRITING FOREHEAD WRINKLED;Mn;0;NSM;;;;;N;;;;; +1DA14;SIGNWRITING EYES OPEN;Mn;0;NSM;;;;;N;;;;; +1DA15;SIGNWRITING EYES SQUEEZED;Mn;0;NSM;;;;;N;;;;; +1DA16;SIGNWRITING EYES CLOSED;Mn;0;NSM;;;;;N;;;;; +1DA17;SIGNWRITING EYE BLINK SINGLE;Mn;0;NSM;;;;;N;;;;; +1DA18;SIGNWRITING EYE BLINK MULTIPLE;Mn;0;NSM;;;;;N;;;;; +1DA19;SIGNWRITING EYES HALF OPEN;Mn;0;NSM;;;;;N;;;;; +1DA1A;SIGNWRITING EYES WIDE OPEN;Mn;0;NSM;;;;;N;;;;; +1DA1B;SIGNWRITING EYES HALF CLOSED;Mn;0;NSM;;;;;N;;;;; +1DA1C;SIGNWRITING EYES WIDENING MOVEMENT;Mn;0;NSM;;;;;N;;;;; +1DA1D;SIGNWRITING EYE WINK;Mn;0;NSM;;;;;N;;;;; +1DA1E;SIGNWRITING EYELASHES UP;Mn;0;NSM;;;;;N;;;;; +1DA1F;SIGNWRITING EYELASHES DOWN;Mn;0;NSM;;;;;N;;;;; +1DA20;SIGNWRITING EYELASHES FLUTTERING;Mn;0;NSM;;;;;N;;;;; +1DA21;SIGNWRITING EYEGAZE-WALLPLANE STRAIGHT;Mn;0;NSM;;;;;N;;;;; +1DA22;SIGNWRITING EYEGAZE-WALLPLANE STRAIGHT DOUBLE;Mn;0;NSM;;;;;N;;;;; +1DA23;SIGNWRITING EYEGAZE-WALLPLANE STRAIGHT ALTERNATING;Mn;0;NSM;;;;;N;;;;; +1DA24;SIGNWRITING EYEGAZE-FLOORPLANE STRAIGHT;Mn;0;NSM;;;;;N;;;;; +1DA25;SIGNWRITING EYEGAZE-FLOORPLANE STRAIGHT DOUBLE;Mn;0;NSM;;;;;N;;;;; +1DA26;SIGNWRITING EYEGAZE-FLOORPLANE STRAIGHT ALTERNATING;Mn;0;NSM;;;;;N;;;;; +1DA27;SIGNWRITING EYEGAZE-WALLPLANE CURVED;Mn;0;NSM;;;;;N;;;;; +1DA28;SIGNWRITING EYEGAZE-FLOORPLANE CURVED;Mn;0;NSM;;;;;N;;;;; +1DA29;SIGNWRITING EYEGAZE-WALLPLANE CIRCLING;Mn;0;NSM;;;;;N;;;;; +1DA2A;SIGNWRITING CHEEKS PUFFED;Mn;0;NSM;;;;;N;;;;; +1DA2B;SIGNWRITING CHEEKS NEUTRAL;Mn;0;NSM;;;;;N;;;;; +1DA2C;SIGNWRITING CHEEKS SUCKED;Mn;0;NSM;;;;;N;;;;; +1DA2D;SIGNWRITING TENSE CHEEKS HIGH;Mn;0;NSM;;;;;N;;;;; +1DA2E;SIGNWRITING TENSE CHEEKS MIDDLE;Mn;0;NSM;;;;;N;;;;; +1DA2F;SIGNWRITING TENSE CHEEKS LOW;Mn;0;NSM;;;;;N;;;;; +1DA30;SIGNWRITING EARS;Mn;0;NSM;;;;;N;;;;; +1DA31;SIGNWRITING NOSE NEUTRAL;Mn;0;NSM;;;;;N;;;;; +1DA32;SIGNWRITING NOSE CONTACT;Mn;0;NSM;;;;;N;;;;; +1DA33;SIGNWRITING NOSE WRINKLES;Mn;0;NSM;;;;;N;;;;; +1DA34;SIGNWRITING NOSE WIGGLES;Mn;0;NSM;;;;;N;;;;; +1DA35;SIGNWRITING AIR BLOWING OUT;Mn;0;NSM;;;;;N;;;;; +1DA36;SIGNWRITING AIR SUCKING IN;Mn;0;NSM;;;;;N;;;;; +1DA37;SIGNWRITING AIR BLOW SMALL ROTATIONS;So;0;L;;;;;N;;;;; +1DA38;SIGNWRITING AIR SUCK SMALL ROTATIONS;So;0;L;;;;;N;;;;; +1DA39;SIGNWRITING BREATH INHALE;So;0;L;;;;;N;;;;; +1DA3A;SIGNWRITING BREATH EXHALE;So;0;L;;;;;N;;;;; +1DA3B;SIGNWRITING MOUTH CLOSED NEUTRAL;Mn;0;NSM;;;;;N;;;;; +1DA3C;SIGNWRITING MOUTH CLOSED FORWARD;Mn;0;NSM;;;;;N;;;;; +1DA3D;SIGNWRITING MOUTH CLOSED CONTACT;Mn;0;NSM;;;;;N;;;;; +1DA3E;SIGNWRITING MOUTH SMILE;Mn;0;NSM;;;;;N;;;;; +1DA3F;SIGNWRITING MOUTH SMILE WRINKLED;Mn;0;NSM;;;;;N;;;;; +1DA40;SIGNWRITING MOUTH SMILE OPEN;Mn;0;NSM;;;;;N;;;;; +1DA41;SIGNWRITING MOUTH FROWN;Mn;0;NSM;;;;;N;;;;; +1DA42;SIGNWRITING MOUTH FROWN WRINKLED;Mn;0;NSM;;;;;N;;;;; +1DA43;SIGNWRITING MOUTH FROWN OPEN;Mn;0;NSM;;;;;N;;;;; +1DA44;SIGNWRITING MOUTH OPEN CIRCLE;Mn;0;NSM;;;;;N;;;;; +1DA45;SIGNWRITING MOUTH OPEN FORWARD;Mn;0;NSM;;;;;N;;;;; +1DA46;SIGNWRITING MOUTH OPEN WRINKLED;Mn;0;NSM;;;;;N;;;;; +1DA47;SIGNWRITING MOUTH OPEN OVAL;Mn;0;NSM;;;;;N;;;;; +1DA48;SIGNWRITING MOUTH OPEN OVAL WRINKLED;Mn;0;NSM;;;;;N;;;;; +1DA49;SIGNWRITING MOUTH OPEN OVAL YAWN;Mn;0;NSM;;;;;N;;;;; +1DA4A;SIGNWRITING MOUTH OPEN RECTANGLE;Mn;0;NSM;;;;;N;;;;; +1DA4B;SIGNWRITING MOUTH OPEN RECTANGLE WRINKLED;Mn;0;NSM;;;;;N;;;;; +1DA4C;SIGNWRITING MOUTH OPEN RECTANGLE YAWN;Mn;0;NSM;;;;;N;;;;; +1DA4D;SIGNWRITING MOUTH KISS;Mn;0;NSM;;;;;N;;;;; +1DA4E;SIGNWRITING MOUTH KISS FORWARD;Mn;0;NSM;;;;;N;;;;; +1DA4F;SIGNWRITING MOUTH KISS WRINKLED;Mn;0;NSM;;;;;N;;;;; +1DA50;SIGNWRITING MOUTH TENSE;Mn;0;NSM;;;;;N;;;;; +1DA51;SIGNWRITING MOUTH TENSE FORWARD;Mn;0;NSM;;;;;N;;;;; +1DA52;SIGNWRITING MOUTH TENSE SUCKED;Mn;0;NSM;;;;;N;;;;; +1DA53;SIGNWRITING LIPS PRESSED TOGETHER;Mn;0;NSM;;;;;N;;;;; +1DA54;SIGNWRITING LIP LOWER OVER UPPER;Mn;0;NSM;;;;;N;;;;; +1DA55;SIGNWRITING LIP UPPER OVER LOWER;Mn;0;NSM;;;;;N;;;;; +1DA56;SIGNWRITING MOUTH CORNERS;Mn;0;NSM;;;;;N;;;;; +1DA57;SIGNWRITING MOUTH WRINKLES SINGLE;Mn;0;NSM;;;;;N;;;;; +1DA58;SIGNWRITING MOUTH WRINKLES DOUBLE;Mn;0;NSM;;;;;N;;;;; +1DA59;SIGNWRITING TONGUE STICKING OUT FAR;Mn;0;NSM;;;;;N;;;;; +1DA5A;SIGNWRITING TONGUE LICKING LIPS;Mn;0;NSM;;;;;N;;;;; +1DA5B;SIGNWRITING TONGUE TIP BETWEEN LIPS;Mn;0;NSM;;;;;N;;;;; +1DA5C;SIGNWRITING TONGUE TIP TOUCHING INSIDE MOUTH;Mn;0;NSM;;;;;N;;;;; +1DA5D;SIGNWRITING TONGUE INSIDE MOUTH RELAXED;Mn;0;NSM;;;;;N;;;;; +1DA5E;SIGNWRITING TONGUE MOVES AGAINST CHEEK;Mn;0;NSM;;;;;N;;;;; +1DA5F;SIGNWRITING TONGUE CENTRE STICKING OUT;Mn;0;NSM;;;;;N;;;;; +1DA60;SIGNWRITING TONGUE CENTRE INSIDE MOUTH;Mn;0;NSM;;;;;N;;;;; +1DA61;SIGNWRITING TEETH;Mn;0;NSM;;;;;N;;;;; +1DA62;SIGNWRITING TEETH MOVEMENT;Mn;0;NSM;;;;;N;;;;; +1DA63;SIGNWRITING TEETH ON TONGUE;Mn;0;NSM;;;;;N;;;;; +1DA64;SIGNWRITING TEETH ON TONGUE MOVEMENT;Mn;0;NSM;;;;;N;;;;; +1DA65;SIGNWRITING TEETH ON LIPS;Mn;0;NSM;;;;;N;;;;; +1DA66;SIGNWRITING TEETH ON LIPS MOVEMENT;Mn;0;NSM;;;;;N;;;;; +1DA67;SIGNWRITING TEETH BITE LIPS;Mn;0;NSM;;;;;N;;;;; +1DA68;SIGNWRITING MOVEMENT-WALLPLANE JAW;Mn;0;NSM;;;;;N;;;;; +1DA69;SIGNWRITING MOVEMENT-FLOORPLANE JAW;Mn;0;NSM;;;;;N;;;;; +1DA6A;SIGNWRITING NECK;Mn;0;NSM;;;;;N;;;;; +1DA6B;SIGNWRITING HAIR;Mn;0;NSM;;;;;N;;;;; +1DA6C;SIGNWRITING EXCITEMENT;Mn;0;NSM;;;;;N;;;;; +1DA6D;SIGNWRITING SHOULDER HIP SPINE;So;0;L;;;;;N;;;;; +1DA6E;SIGNWRITING SHOULDER HIP POSITIONS;So;0;L;;;;;N;;;;; +1DA6F;SIGNWRITING WALLPLANE SHOULDER HIP MOVE;So;0;L;;;;;N;;;;; +1DA70;SIGNWRITING FLOORPLANE SHOULDER HIP MOVE;So;0;L;;;;;N;;;;; +1DA71;SIGNWRITING SHOULDER TILTING FROM WAIST;So;0;L;;;;;N;;;;; +1DA72;SIGNWRITING TORSO-WALLPLANE STRAIGHT STRETCH;So;0;L;;;;;N;;;;; +1DA73;SIGNWRITING TORSO-WALLPLANE CURVED BEND;So;0;L;;;;;N;;;;; +1DA74;SIGNWRITING TORSO-FLOORPLANE TWISTING;So;0;L;;;;;N;;;;; +1DA75;SIGNWRITING UPPER BODY TILTING FROM HIP JOINTS;Mn;0;NSM;;;;;N;;;;; +1DA76;SIGNWRITING LIMB COMBINATION;So;0;L;;;;;N;;;;; +1DA77;SIGNWRITING LIMB LENGTH-1;So;0;L;;;;;N;;;;; +1DA78;SIGNWRITING LIMB LENGTH-2;So;0;L;;;;;N;;;;; +1DA79;SIGNWRITING LIMB LENGTH-3;So;0;L;;;;;N;;;;; +1DA7A;SIGNWRITING LIMB LENGTH-4;So;0;L;;;;;N;;;;; +1DA7B;SIGNWRITING LIMB LENGTH-5;So;0;L;;;;;N;;;;; +1DA7C;SIGNWRITING LIMB LENGTH-6;So;0;L;;;;;N;;;;; +1DA7D;SIGNWRITING LIMB LENGTH-7;So;0;L;;;;;N;;;;; +1DA7E;SIGNWRITING FINGER;So;0;L;;;;;N;;;;; +1DA7F;SIGNWRITING LOCATION-WALLPLANE SPACE;So;0;L;;;;;N;;;;; +1DA80;SIGNWRITING LOCATION-FLOORPLANE SPACE;So;0;L;;;;;N;;;;; +1DA81;SIGNWRITING LOCATION HEIGHT;So;0;L;;;;;N;;;;; +1DA82;SIGNWRITING LOCATION WIDTH;So;0;L;;;;;N;;;;; +1DA83;SIGNWRITING LOCATION DEPTH;So;0;L;;;;;N;;;;; +1DA84;SIGNWRITING LOCATION HEAD NECK;Mn;0;NSM;;;;;N;;;;; +1DA85;SIGNWRITING LOCATION TORSO;So;0;L;;;;;N;;;;; +1DA86;SIGNWRITING LOCATION LIMBS DIGITS;So;0;L;;;;;N;;;;; +1DA87;SIGNWRITING COMMA;Po;0;L;;;;;N;;;;; +1DA88;SIGNWRITING FULL STOP;Po;0;L;;;;;N;;;;; +1DA89;SIGNWRITING SEMICOLON;Po;0;L;;;;;N;;;;; +1DA8A;SIGNWRITING COLON;Po;0;L;;;;;N;;;;; +1DA8B;SIGNWRITING PARENTHESIS;Po;0;L;;;;;N;;;;; +1DA9B;SIGNWRITING FILL MODIFIER-2;Mn;0;NSM;;;;;N;;;;; +1DA9C;SIGNWRITING FILL MODIFIER-3;Mn;0;NSM;;;;;N;;;;; +1DA9D;SIGNWRITING FILL MODIFIER-4;Mn;0;NSM;;;;;N;;;;; +1DA9E;SIGNWRITING FILL MODIFIER-5;Mn;0;NSM;;;;;N;;;;; +1DA9F;SIGNWRITING FILL MODIFIER-6;Mn;0;NSM;;;;;N;;;;; +1DAA1;SIGNWRITING ROTATION MODIFIER-2;Mn;0;NSM;;;;;N;;;;; +1DAA2;SIGNWRITING ROTATION MODIFIER-3;Mn;0;NSM;;;;;N;;;;; +1DAA3;SIGNWRITING ROTATION MODIFIER-4;Mn;0;NSM;;;;;N;;;;; +1DAA4;SIGNWRITING ROTATION MODIFIER-5;Mn;0;NSM;;;;;N;;;;; +1DAA5;SIGNWRITING ROTATION MODIFIER-6;Mn;0;NSM;;;;;N;;;;; +1DAA6;SIGNWRITING ROTATION MODIFIER-7;Mn;0;NSM;;;;;N;;;;; +1DAA7;SIGNWRITING ROTATION MODIFIER-8;Mn;0;NSM;;;;;N;;;;; +1DAA8;SIGNWRITING ROTATION MODIFIER-9;Mn;0;NSM;;;;;N;;;;; +1DAA9;SIGNWRITING ROTATION MODIFIER-10;Mn;0;NSM;;;;;N;;;;; +1DAAA;SIGNWRITING ROTATION MODIFIER-11;Mn;0;NSM;;;;;N;;;;; +1DAAB;SIGNWRITING ROTATION MODIFIER-12;Mn;0;NSM;;;;;N;;;;; +1DAAC;SIGNWRITING ROTATION MODIFIER-13;Mn;0;NSM;;;;;N;;;;; +1DAAD;SIGNWRITING ROTATION MODIFIER-14;Mn;0;NSM;;;;;N;;;;; +1DAAE;SIGNWRITING ROTATION MODIFIER-15;Mn;0;NSM;;;;;N;;;;; +1DAAF;SIGNWRITING ROTATION MODIFIER-16;Mn;0;NSM;;;;;N;;;;; +1E000;COMBINING GLAGOLITIC LETTER AZU;Mn;230;NSM;;;;;N;;;;; +1E001;COMBINING GLAGOLITIC LETTER BUKY;Mn;230;NSM;;;;;N;;;;; +1E002;COMBINING GLAGOLITIC LETTER VEDE;Mn;230;NSM;;;;;N;;;;; +1E003;COMBINING GLAGOLITIC LETTER GLAGOLI;Mn;230;NSM;;;;;N;;;;; +1E004;COMBINING GLAGOLITIC LETTER DOBRO;Mn;230;NSM;;;;;N;;;;; +1E005;COMBINING GLAGOLITIC LETTER YESTU;Mn;230;NSM;;;;;N;;;;; +1E006;COMBINING GLAGOLITIC LETTER ZHIVETE;Mn;230;NSM;;;;;N;;;;; +1E008;COMBINING GLAGOLITIC LETTER ZEMLJA;Mn;230;NSM;;;;;N;;;;; +1E009;COMBINING GLAGOLITIC LETTER IZHE;Mn;230;NSM;;;;;N;;;;; +1E00A;COMBINING GLAGOLITIC LETTER INITIAL IZHE;Mn;230;NSM;;;;;N;;;;; +1E00B;COMBINING GLAGOLITIC LETTER I;Mn;230;NSM;;;;;N;;;;; +1E00C;COMBINING GLAGOLITIC LETTER DJERVI;Mn;230;NSM;;;;;N;;;;; +1E00D;COMBINING GLAGOLITIC LETTER KAKO;Mn;230;NSM;;;;;N;;;;; +1E00E;COMBINING GLAGOLITIC LETTER LJUDIJE;Mn;230;NSM;;;;;N;;;;; +1E00F;COMBINING GLAGOLITIC LETTER MYSLITE;Mn;230;NSM;;;;;N;;;;; +1E010;COMBINING GLAGOLITIC LETTER NASHI;Mn;230;NSM;;;;;N;;;;; +1E011;COMBINING GLAGOLITIC LETTER ONU;Mn;230;NSM;;;;;N;;;;; +1E012;COMBINING GLAGOLITIC LETTER POKOJI;Mn;230;NSM;;;;;N;;;;; +1E013;COMBINING GLAGOLITIC LETTER RITSI;Mn;230;NSM;;;;;N;;;;; +1E014;COMBINING GLAGOLITIC LETTER SLOVO;Mn;230;NSM;;;;;N;;;;; +1E015;COMBINING GLAGOLITIC LETTER TVRIDO;Mn;230;NSM;;;;;N;;;;; +1E016;COMBINING GLAGOLITIC LETTER UKU;Mn;230;NSM;;;;;N;;;;; +1E017;COMBINING GLAGOLITIC LETTER FRITU;Mn;230;NSM;;;;;N;;;;; +1E018;COMBINING GLAGOLITIC LETTER HERU;Mn;230;NSM;;;;;N;;;;; +1E01B;COMBINING GLAGOLITIC LETTER SHTA;Mn;230;NSM;;;;;N;;;;; +1E01C;COMBINING GLAGOLITIC LETTER TSI;Mn;230;NSM;;;;;N;;;;; +1E01D;COMBINING GLAGOLITIC LETTER CHRIVI;Mn;230;NSM;;;;;N;;;;; +1E01E;COMBINING GLAGOLITIC LETTER SHA;Mn;230;NSM;;;;;N;;;;; +1E01F;COMBINING GLAGOLITIC LETTER YERU;Mn;230;NSM;;;;;N;;;;; +1E020;COMBINING GLAGOLITIC LETTER YERI;Mn;230;NSM;;;;;N;;;;; +1E021;COMBINING GLAGOLITIC LETTER YATI;Mn;230;NSM;;;;;N;;;;; +1E023;COMBINING GLAGOLITIC LETTER YU;Mn;230;NSM;;;;;N;;;;; +1E024;COMBINING GLAGOLITIC LETTER SMALL YUS;Mn;230;NSM;;;;;N;;;;; +1E026;COMBINING GLAGOLITIC LETTER YO;Mn;230;NSM;;;;;N;;;;; +1E027;COMBINING GLAGOLITIC LETTER IOTATED SMALL YUS;Mn;230;NSM;;;;;N;;;;; +1E028;COMBINING GLAGOLITIC LETTER BIG YUS;Mn;230;NSM;;;;;N;;;;; +1E029;COMBINING GLAGOLITIC LETTER IOTATED BIG YUS;Mn;230;NSM;;;;;N;;;;; +1E02A;COMBINING GLAGOLITIC LETTER FITA;Mn;230;NSM;;;;;N;;;;; +1E100;NYIAKENG PUACHUE HMONG LETTER MA;Lo;0;L;;;;;N;;;;; +1E101;NYIAKENG PUACHUE HMONG LETTER TSA;Lo;0;L;;;;;N;;;;; +1E102;NYIAKENG PUACHUE HMONG LETTER NTA;Lo;0;L;;;;;N;;;;; +1E103;NYIAKENG PUACHUE HMONG LETTER TA;Lo;0;L;;;;;N;;;;; +1E104;NYIAKENG PUACHUE HMONG LETTER HA;Lo;0;L;;;;;N;;;;; +1E105;NYIAKENG PUACHUE HMONG LETTER NA;Lo;0;L;;;;;N;;;;; +1E106;NYIAKENG PUACHUE HMONG LETTER XA;Lo;0;L;;;;;N;;;;; +1E107;NYIAKENG PUACHUE HMONG LETTER NKA;Lo;0;L;;;;;N;;;;; +1E108;NYIAKENG PUACHUE HMONG LETTER CA;Lo;0;L;;;;;N;;;;; +1E109;NYIAKENG PUACHUE HMONG LETTER LA;Lo;0;L;;;;;N;;;;; +1E10A;NYIAKENG PUACHUE HMONG LETTER SA;Lo;0;L;;;;;N;;;;; +1E10B;NYIAKENG PUACHUE HMONG LETTER ZA;Lo;0;L;;;;;N;;;;; +1E10C;NYIAKENG PUACHUE HMONG LETTER NCA;Lo;0;L;;;;;N;;;;; +1E10D;NYIAKENG PUACHUE HMONG LETTER NTSA;Lo;0;L;;;;;N;;;;; +1E10E;NYIAKENG PUACHUE HMONG LETTER KA;Lo;0;L;;;;;N;;;;; +1E10F;NYIAKENG PUACHUE HMONG LETTER DA;Lo;0;L;;;;;N;;;;; +1E110;NYIAKENG PUACHUE HMONG LETTER NYA;Lo;0;L;;;;;N;;;;; +1E111;NYIAKENG PUACHUE HMONG LETTER NRA;Lo;0;L;;;;;N;;;;; +1E112;NYIAKENG PUACHUE HMONG LETTER VA;Lo;0;L;;;;;N;;;;; +1E113;NYIAKENG PUACHUE HMONG LETTER NTXA;Lo;0;L;;;;;N;;;;; +1E114;NYIAKENG PUACHUE HMONG LETTER TXA;Lo;0;L;;;;;N;;;;; +1E115;NYIAKENG PUACHUE HMONG LETTER FA;Lo;0;L;;;;;N;;;;; +1E116;NYIAKENG PUACHUE HMONG LETTER RA;Lo;0;L;;;;;N;;;;; +1E117;NYIAKENG PUACHUE HMONG LETTER QA;Lo;0;L;;;;;N;;;;; +1E118;NYIAKENG PUACHUE HMONG LETTER YA;Lo;0;L;;;;;N;;;;; +1E119;NYIAKENG PUACHUE HMONG LETTER NQA;Lo;0;L;;;;;N;;;;; +1E11A;NYIAKENG PUACHUE HMONG LETTER PA;Lo;0;L;;;;;N;;;;; +1E11B;NYIAKENG PUACHUE HMONG LETTER XYA;Lo;0;L;;;;;N;;;;; +1E11C;NYIAKENG PUACHUE HMONG LETTER NPA;Lo;0;L;;;;;N;;;;; +1E11D;NYIAKENG PUACHUE HMONG LETTER DLA;Lo;0;L;;;;;N;;;;; +1E11E;NYIAKENG PUACHUE HMONG LETTER NPLA;Lo;0;L;;;;;N;;;;; +1E11F;NYIAKENG PUACHUE HMONG LETTER HAH;Lo;0;L;;;;;N;;;;; +1E120;NYIAKENG PUACHUE HMONG LETTER MLA;Lo;0;L;;;;;N;;;;; +1E121;NYIAKENG PUACHUE HMONG LETTER PLA;Lo;0;L;;;;;N;;;;; +1E122;NYIAKENG PUACHUE HMONG LETTER GA;Lo;0;L;;;;;N;;;;; +1E123;NYIAKENG PUACHUE HMONG LETTER RRA;Lo;0;L;;;;;N;;;;; +1E124;NYIAKENG PUACHUE HMONG LETTER A;Lo;0;L;;;;;N;;;;; +1E125;NYIAKENG PUACHUE HMONG LETTER AA;Lo;0;L;;;;;N;;;;; +1E126;NYIAKENG PUACHUE HMONG LETTER I;Lo;0;L;;;;;N;;;;; +1E127;NYIAKENG PUACHUE HMONG LETTER U;Lo;0;L;;;;;N;;;;; +1E128;NYIAKENG PUACHUE HMONG LETTER O;Lo;0;L;;;;;N;;;;; +1E129;NYIAKENG PUACHUE HMONG LETTER OO;Lo;0;L;;;;;N;;;;; +1E12A;NYIAKENG PUACHUE HMONG LETTER E;Lo;0;L;;;;;N;;;;; +1E12B;NYIAKENG PUACHUE HMONG LETTER EE;Lo;0;L;;;;;N;;;;; +1E12C;NYIAKENG PUACHUE HMONG LETTER W;Lo;0;L;;;;;N;;;;; +1E130;NYIAKENG PUACHUE HMONG TONE-B;Mn;230;NSM;;;;;N;;;;; +1E131;NYIAKENG PUACHUE HMONG TONE-M;Mn;230;NSM;;;;;N;;;;; +1E132;NYIAKENG PUACHUE HMONG TONE-J;Mn;230;NSM;;;;;N;;;;; +1E133;NYIAKENG PUACHUE HMONG TONE-V;Mn;230;NSM;;;;;N;;;;; +1E134;NYIAKENG PUACHUE HMONG TONE-S;Mn;230;NSM;;;;;N;;;;; +1E135;NYIAKENG PUACHUE HMONG TONE-G;Mn;230;NSM;;;;;N;;;;; +1E136;NYIAKENG PUACHUE HMONG TONE-D;Mn;230;NSM;;;;;N;;;;; +1E137;NYIAKENG PUACHUE HMONG SIGN FOR PERSON;Lm;0;L;;;;;N;;;;; +1E138;NYIAKENG PUACHUE HMONG SIGN FOR THING;Lm;0;L;;;;;N;;;;; +1E139;NYIAKENG PUACHUE HMONG SIGN FOR LOCATION;Lm;0;L;;;;;N;;;;; +1E13A;NYIAKENG PUACHUE HMONG SIGN FOR ANIMAL;Lm;0;L;;;;;N;;;;; +1E13B;NYIAKENG PUACHUE HMONG SIGN FOR INVERTEBRATE;Lm;0;L;;;;;N;;;;; +1E13C;NYIAKENG PUACHUE HMONG SIGN XW XW;Lm;0;L;;;;;N;;;;; +1E13D;NYIAKENG PUACHUE HMONG SYLLABLE LENGTHENER;Lm;0;L;;;;;N;;;;; +1E140;NYIAKENG PUACHUE HMONG DIGIT ZERO;Nd;0;L;;0;0;0;N;;;;; +1E141;NYIAKENG PUACHUE HMONG DIGIT ONE;Nd;0;L;;1;1;1;N;;;;; +1E142;NYIAKENG PUACHUE HMONG DIGIT TWO;Nd;0;L;;2;2;2;N;;;;; +1E143;NYIAKENG PUACHUE HMONG DIGIT THREE;Nd;0;L;;3;3;3;N;;;;; +1E144;NYIAKENG PUACHUE HMONG DIGIT FOUR;Nd;0;L;;4;4;4;N;;;;; +1E145;NYIAKENG PUACHUE HMONG DIGIT FIVE;Nd;0;L;;5;5;5;N;;;;; +1E146;NYIAKENG PUACHUE HMONG DIGIT SIX;Nd;0;L;;6;6;6;N;;;;; +1E147;NYIAKENG PUACHUE HMONG DIGIT SEVEN;Nd;0;L;;7;7;7;N;;;;; +1E148;NYIAKENG PUACHUE HMONG DIGIT EIGHT;Nd;0;L;;8;8;8;N;;;;; +1E149;NYIAKENG PUACHUE HMONG DIGIT NINE;Nd;0;L;;9;9;9;N;;;;; +1E14E;NYIAKENG PUACHUE HMONG LOGOGRAM NYAJ;Lo;0;L;;;;;N;;;;; +1E14F;NYIAKENG PUACHUE HMONG CIRCLED CA;So;0;L;;;;;N;;;;; +1E2C0;WANCHO LETTER AA;Lo;0;L;;;;;N;;;;; +1E2C1;WANCHO LETTER A;Lo;0;L;;;;;N;;;;; +1E2C2;WANCHO LETTER BA;Lo;0;L;;;;;N;;;;; +1E2C3;WANCHO LETTER CA;Lo;0;L;;;;;N;;;;; +1E2C4;WANCHO LETTER DA;Lo;0;L;;;;;N;;;;; +1E2C5;WANCHO LETTER GA;Lo;0;L;;;;;N;;;;; +1E2C6;WANCHO LETTER YA;Lo;0;L;;;;;N;;;;; +1E2C7;WANCHO LETTER PHA;Lo;0;L;;;;;N;;;;; +1E2C8;WANCHO LETTER LA;Lo;0;L;;;;;N;;;;; +1E2C9;WANCHO LETTER NA;Lo;0;L;;;;;N;;;;; +1E2CA;WANCHO LETTER PA;Lo;0;L;;;;;N;;;;; +1E2CB;WANCHO LETTER TA;Lo;0;L;;;;;N;;;;; +1E2CC;WANCHO LETTER THA;Lo;0;L;;;;;N;;;;; +1E2CD;WANCHO LETTER FA;Lo;0;L;;;;;N;;;;; +1E2CE;WANCHO LETTER SA;Lo;0;L;;;;;N;;;;; +1E2CF;WANCHO LETTER SHA;Lo;0;L;;;;;N;;;;; +1E2D0;WANCHO LETTER JA;Lo;0;L;;;;;N;;;;; +1E2D1;WANCHO LETTER ZA;Lo;0;L;;;;;N;;;;; +1E2D2;WANCHO LETTER WA;Lo;0;L;;;;;N;;;;; +1E2D3;WANCHO LETTER VA;Lo;0;L;;;;;N;;;;; +1E2D4;WANCHO LETTER KA;Lo;0;L;;;;;N;;;;; +1E2D5;WANCHO LETTER O;Lo;0;L;;;;;N;;;;; +1E2D6;WANCHO LETTER AU;Lo;0;L;;;;;N;;;;; +1E2D7;WANCHO LETTER RA;Lo;0;L;;;;;N;;;;; +1E2D8;WANCHO LETTER MA;Lo;0;L;;;;;N;;;;; +1E2D9;WANCHO LETTER KHA;Lo;0;L;;;;;N;;;;; +1E2DA;WANCHO LETTER HA;Lo;0;L;;;;;N;;;;; +1E2DB;WANCHO LETTER E;Lo;0;L;;;;;N;;;;; +1E2DC;WANCHO LETTER I;Lo;0;L;;;;;N;;;;; +1E2DD;WANCHO LETTER NGA;Lo;0;L;;;;;N;;;;; +1E2DE;WANCHO LETTER U;Lo;0;L;;;;;N;;;;; +1E2DF;WANCHO LETTER LLHA;Lo;0;L;;;;;N;;;;; +1E2E0;WANCHO LETTER TSA;Lo;0;L;;;;;N;;;;; +1E2E1;WANCHO LETTER TRA;Lo;0;L;;;;;N;;;;; +1E2E2;WANCHO LETTER ONG;Lo;0;L;;;;;N;;;;; +1E2E3;WANCHO LETTER AANG;Lo;0;L;;;;;N;;;;; +1E2E4;WANCHO LETTER ANG;Lo;0;L;;;;;N;;;;; +1E2E5;WANCHO LETTER ING;Lo;0;L;;;;;N;;;;; +1E2E6;WANCHO LETTER ON;Lo;0;L;;;;;N;;;;; +1E2E7;WANCHO LETTER EN;Lo;0;L;;;;;N;;;;; +1E2E8;WANCHO LETTER AAN;Lo;0;L;;;;;N;;;;; +1E2E9;WANCHO LETTER NYA;Lo;0;L;;;;;N;;;;; +1E2EA;WANCHO LETTER UEN;Lo;0;L;;;;;N;;;;; +1E2EB;WANCHO LETTER YIH;Lo;0;L;;;;;N;;;;; +1E2EC;WANCHO TONE TUP;Mn;230;NSM;;;;;N;;;;; +1E2ED;WANCHO TONE TUPNI;Mn;230;NSM;;;;;N;;;;; +1E2EE;WANCHO TONE KOI;Mn;230;NSM;;;;;N;;;;; +1E2EF;WANCHO TONE KOINI;Mn;230;NSM;;;;;N;;;;; +1E2F0;WANCHO DIGIT ZERO;Nd;0;L;;0;0;0;N;;;;; +1E2F1;WANCHO DIGIT ONE;Nd;0;L;;1;1;1;N;;;;; +1E2F2;WANCHO DIGIT TWO;Nd;0;L;;2;2;2;N;;;;; +1E2F3;WANCHO DIGIT THREE;Nd;0;L;;3;3;3;N;;;;; +1E2F4;WANCHO DIGIT FOUR;Nd;0;L;;4;4;4;N;;;;; +1E2F5;WANCHO DIGIT FIVE;Nd;0;L;;5;5;5;N;;;;; +1E2F6;WANCHO DIGIT SIX;Nd;0;L;;6;6;6;N;;;;; +1E2F7;WANCHO DIGIT SEVEN;Nd;0;L;;7;7;7;N;;;;; +1E2F8;WANCHO DIGIT EIGHT;Nd;0;L;;8;8;8;N;;;;; +1E2F9;WANCHO DIGIT NINE;Nd;0;L;;9;9;9;N;;;;; +1E2FF;WANCHO NGUN SIGN;Sc;0;ET;;;;;N;;;;; +1E800;MENDE KIKAKUI SYLLABLE M001 KI;Lo;0;R;;;;;N;;;;; +1E801;MENDE KIKAKUI SYLLABLE M002 KA;Lo;0;R;;;;;N;;;;; +1E802;MENDE KIKAKUI SYLLABLE M003 KU;Lo;0;R;;;;;N;;;;; +1E803;MENDE KIKAKUI SYLLABLE M065 KEE;Lo;0;R;;;;;N;;;;; +1E804;MENDE KIKAKUI SYLLABLE M095 KE;Lo;0;R;;;;;N;;;;; +1E805;MENDE KIKAKUI SYLLABLE M076 KOO;Lo;0;R;;;;;N;;;;; +1E806;MENDE KIKAKUI SYLLABLE M048 KO;Lo;0;R;;;;;N;;;;; +1E807;MENDE KIKAKUI SYLLABLE M179 KUA;Lo;0;R;;;;;N;;;;; +1E808;MENDE KIKAKUI SYLLABLE M004 WI;Lo;0;R;;;;;N;;;;; +1E809;MENDE KIKAKUI SYLLABLE M005 WA;Lo;0;R;;;;;N;;;;; +1E80A;MENDE KIKAKUI SYLLABLE M006 WU;Lo;0;R;;;;;N;;;;; +1E80B;MENDE KIKAKUI SYLLABLE M126 WEE;Lo;0;R;;;;;N;;;;; +1E80C;MENDE KIKAKUI SYLLABLE M118 WE;Lo;0;R;;;;;N;;;;; +1E80D;MENDE KIKAKUI SYLLABLE M114 WOO;Lo;0;R;;;;;N;;;;; +1E80E;MENDE KIKAKUI SYLLABLE M045 WO;Lo;0;R;;;;;N;;;;; +1E80F;MENDE KIKAKUI SYLLABLE M194 WUI;Lo;0;R;;;;;N;;;;; +1E810;MENDE KIKAKUI SYLLABLE M143 WEI;Lo;0;R;;;;;N;;;;; +1E811;MENDE KIKAKUI SYLLABLE M061 WVI;Lo;0;R;;;;;N;;;;; +1E812;MENDE KIKAKUI SYLLABLE M049 WVA;Lo;0;R;;;;;N;;;;; +1E813;MENDE KIKAKUI SYLLABLE M139 WVE;Lo;0;R;;;;;N;;;;; +1E814;MENDE KIKAKUI SYLLABLE M007 MIN;Lo;0;R;;;;;N;;;;; +1E815;MENDE KIKAKUI SYLLABLE M008 MAN;Lo;0;R;;;;;N;;;;; +1E816;MENDE KIKAKUI SYLLABLE M009 MUN;Lo;0;R;;;;;N;;;;; +1E817;MENDE KIKAKUI SYLLABLE M059 MEN;Lo;0;R;;;;;N;;;;; +1E818;MENDE KIKAKUI SYLLABLE M094 MON;Lo;0;R;;;;;N;;;;; +1E819;MENDE KIKAKUI SYLLABLE M154 MUAN;Lo;0;R;;;;;N;;;;; +1E81A;MENDE KIKAKUI SYLLABLE M189 MUEN;Lo;0;R;;;;;N;;;;; +1E81B;MENDE KIKAKUI SYLLABLE M010 BI;Lo;0;R;;;;;N;;;;; +1E81C;MENDE KIKAKUI SYLLABLE M011 BA;Lo;0;R;;;;;N;;;;; +1E81D;MENDE KIKAKUI SYLLABLE M012 BU;Lo;0;R;;;;;N;;;;; +1E81E;MENDE KIKAKUI SYLLABLE M150 BEE;Lo;0;R;;;;;N;;;;; +1E81F;MENDE KIKAKUI SYLLABLE M097 BE;Lo;0;R;;;;;N;;;;; +1E820;MENDE KIKAKUI SYLLABLE M103 BOO;Lo;0;R;;;;;N;;;;; +1E821;MENDE KIKAKUI SYLLABLE M138 BO;Lo;0;R;;;;;N;;;;; +1E822;MENDE KIKAKUI SYLLABLE M013 I;Lo;0;R;;;;;N;;;;; +1E823;MENDE KIKAKUI SYLLABLE M014 A;Lo;0;R;;;;;N;;;;; +1E824;MENDE KIKAKUI SYLLABLE M015 U;Lo;0;R;;;;;N;;;;; +1E825;MENDE KIKAKUI SYLLABLE M163 EE;Lo;0;R;;;;;N;;;;; +1E826;MENDE KIKAKUI SYLLABLE M100 E;Lo;0;R;;;;;N;;;;; +1E827;MENDE KIKAKUI SYLLABLE M165 OO;Lo;0;R;;;;;N;;;;; +1E828;MENDE KIKAKUI SYLLABLE M147 O;Lo;0;R;;;;;N;;;;; +1E829;MENDE KIKAKUI SYLLABLE M137 EI;Lo;0;R;;;;;N;;;;; +1E82A;MENDE KIKAKUI SYLLABLE M131 IN;Lo;0;R;;;;;N;;;;; +1E82B;MENDE KIKAKUI SYLLABLE M135 IN;Lo;0;R;;;;;N;;;;; +1E82C;MENDE KIKAKUI SYLLABLE M195 AN;Lo;0;R;;;;;N;;;;; +1E82D;MENDE KIKAKUI SYLLABLE M178 EN;Lo;0;R;;;;;N;;;;; +1E82E;MENDE KIKAKUI SYLLABLE M019 SI;Lo;0;R;;;;;N;;;;; +1E82F;MENDE KIKAKUI SYLLABLE M020 SA;Lo;0;R;;;;;N;;;;; +1E830;MENDE KIKAKUI SYLLABLE M021 SU;Lo;0;R;;;;;N;;;;; +1E831;MENDE KIKAKUI SYLLABLE M162 SEE;Lo;0;R;;;;;N;;;;; +1E832;MENDE KIKAKUI SYLLABLE M116 SE;Lo;0;R;;;;;N;;;;; +1E833;MENDE KIKAKUI SYLLABLE M136 SOO;Lo;0;R;;;;;N;;;;; +1E834;MENDE KIKAKUI SYLLABLE M079 SO;Lo;0;R;;;;;N;;;;; +1E835;MENDE KIKAKUI SYLLABLE M196 SIA;Lo;0;R;;;;;N;;;;; +1E836;MENDE KIKAKUI SYLLABLE M025 LI;Lo;0;R;;;;;N;;;;; +1E837;MENDE KIKAKUI SYLLABLE M026 LA;Lo;0;R;;;;;N;;;;; +1E838;MENDE KIKAKUI SYLLABLE M027 LU;Lo;0;R;;;;;N;;;;; +1E839;MENDE KIKAKUI SYLLABLE M084 LEE;Lo;0;R;;;;;N;;;;; +1E83A;MENDE KIKAKUI SYLLABLE M073 LE;Lo;0;R;;;;;N;;;;; +1E83B;MENDE KIKAKUI SYLLABLE M054 LOO;Lo;0;R;;;;;N;;;;; +1E83C;MENDE KIKAKUI SYLLABLE M153 LO;Lo;0;R;;;;;N;;;;; +1E83D;MENDE KIKAKUI SYLLABLE M110 LONG LE;Lo;0;R;;;;;N;;;;; +1E83E;MENDE KIKAKUI SYLLABLE M016 DI;Lo;0;R;;;;;N;;;;; +1E83F;MENDE KIKAKUI SYLLABLE M017 DA;Lo;0;R;;;;;N;;;;; +1E840;MENDE KIKAKUI SYLLABLE M018 DU;Lo;0;R;;;;;N;;;;; +1E841;MENDE KIKAKUI SYLLABLE M089 DEE;Lo;0;R;;;;;N;;;;; +1E842;MENDE KIKAKUI SYLLABLE M180 DOO;Lo;0;R;;;;;N;;;;; +1E843;MENDE KIKAKUI SYLLABLE M181 DO;Lo;0;R;;;;;N;;;;; +1E844;MENDE KIKAKUI SYLLABLE M022 TI;Lo;0;R;;;;;N;;;;; +1E845;MENDE KIKAKUI SYLLABLE M023 TA;Lo;0;R;;;;;N;;;;; +1E846;MENDE KIKAKUI SYLLABLE M024 TU;Lo;0;R;;;;;N;;;;; +1E847;MENDE KIKAKUI SYLLABLE M091 TEE;Lo;0;R;;;;;N;;;;; +1E848;MENDE KIKAKUI SYLLABLE M055 TE;Lo;0;R;;;;;N;;;;; +1E849;MENDE KIKAKUI SYLLABLE M104 TOO;Lo;0;R;;;;;N;;;;; +1E84A;MENDE KIKAKUI SYLLABLE M069 TO;Lo;0;R;;;;;N;;;;; +1E84B;MENDE KIKAKUI SYLLABLE M028 JI;Lo;0;R;;;;;N;;;;; +1E84C;MENDE KIKAKUI SYLLABLE M029 JA;Lo;0;R;;;;;N;;;;; +1E84D;MENDE KIKAKUI SYLLABLE M030 JU;Lo;0;R;;;;;N;;;;; +1E84E;MENDE KIKAKUI SYLLABLE M157 JEE;Lo;0;R;;;;;N;;;;; +1E84F;MENDE KIKAKUI SYLLABLE M113 JE;Lo;0;R;;;;;N;;;;; +1E850;MENDE KIKAKUI SYLLABLE M160 JOO;Lo;0;R;;;;;N;;;;; +1E851;MENDE KIKAKUI SYLLABLE M063 JO;Lo;0;R;;;;;N;;;;; +1E852;MENDE KIKAKUI SYLLABLE M175 LONG JO;Lo;0;R;;;;;N;;;;; +1E853;MENDE KIKAKUI SYLLABLE M031 YI;Lo;0;R;;;;;N;;;;; +1E854;MENDE KIKAKUI SYLLABLE M032 YA;Lo;0;R;;;;;N;;;;; +1E855;MENDE KIKAKUI SYLLABLE M033 YU;Lo;0;R;;;;;N;;;;; +1E856;MENDE KIKAKUI SYLLABLE M109 YEE;Lo;0;R;;;;;N;;;;; +1E857;MENDE KIKAKUI SYLLABLE M080 YE;Lo;0;R;;;;;N;;;;; +1E858;MENDE KIKAKUI SYLLABLE M141 YOO;Lo;0;R;;;;;N;;;;; +1E859;MENDE KIKAKUI SYLLABLE M121 YO;Lo;0;R;;;;;N;;;;; +1E85A;MENDE KIKAKUI SYLLABLE M034 FI;Lo;0;R;;;;;N;;;;; +1E85B;MENDE KIKAKUI SYLLABLE M035 FA;Lo;0;R;;;;;N;;;;; +1E85C;MENDE KIKAKUI SYLLABLE M036 FU;Lo;0;R;;;;;N;;;;; +1E85D;MENDE KIKAKUI SYLLABLE M078 FEE;Lo;0;R;;;;;N;;;;; +1E85E;MENDE KIKAKUI SYLLABLE M075 FE;Lo;0;R;;;;;N;;;;; +1E85F;MENDE KIKAKUI SYLLABLE M133 FOO;Lo;0;R;;;;;N;;;;; +1E860;MENDE KIKAKUI SYLLABLE M088 FO;Lo;0;R;;;;;N;;;;; +1E861;MENDE KIKAKUI SYLLABLE M197 FUA;Lo;0;R;;;;;N;;;;; +1E862;MENDE KIKAKUI SYLLABLE M101 FAN;Lo;0;R;;;;;N;;;;; +1E863;MENDE KIKAKUI SYLLABLE M037 NIN;Lo;0;R;;;;;N;;;;; +1E864;MENDE KIKAKUI SYLLABLE M038 NAN;Lo;0;R;;;;;N;;;;; +1E865;MENDE KIKAKUI SYLLABLE M039 NUN;Lo;0;R;;;;;N;;;;; +1E866;MENDE KIKAKUI SYLLABLE M117 NEN;Lo;0;R;;;;;N;;;;; +1E867;MENDE KIKAKUI SYLLABLE M169 NON;Lo;0;R;;;;;N;;;;; +1E868;MENDE KIKAKUI SYLLABLE M176 HI;Lo;0;R;;;;;N;;;;; +1E869;MENDE KIKAKUI SYLLABLE M041 HA;Lo;0;R;;;;;N;;;;; +1E86A;MENDE KIKAKUI SYLLABLE M186 HU;Lo;0;R;;;;;N;;;;; +1E86B;MENDE KIKAKUI SYLLABLE M040 HEE;Lo;0;R;;;;;N;;;;; +1E86C;MENDE KIKAKUI SYLLABLE M096 HE;Lo;0;R;;;;;N;;;;; +1E86D;MENDE KIKAKUI SYLLABLE M042 HOO;Lo;0;R;;;;;N;;;;; +1E86E;MENDE KIKAKUI SYLLABLE M140 HO;Lo;0;R;;;;;N;;;;; +1E86F;MENDE KIKAKUI SYLLABLE M083 HEEI;Lo;0;R;;;;;N;;;;; +1E870;MENDE KIKAKUI SYLLABLE M128 HOOU;Lo;0;R;;;;;N;;;;; +1E871;MENDE KIKAKUI SYLLABLE M053 HIN;Lo;0;R;;;;;N;;;;; +1E872;MENDE KIKAKUI SYLLABLE M130 HAN;Lo;0;R;;;;;N;;;;; +1E873;MENDE KIKAKUI SYLLABLE M087 HUN;Lo;0;R;;;;;N;;;;; +1E874;MENDE KIKAKUI SYLLABLE M052 HEN;Lo;0;R;;;;;N;;;;; +1E875;MENDE KIKAKUI SYLLABLE M193 HON;Lo;0;R;;;;;N;;;;; +1E876;MENDE KIKAKUI SYLLABLE M046 HUAN;Lo;0;R;;;;;N;;;;; +1E877;MENDE KIKAKUI SYLLABLE M090 NGGI;Lo;0;R;;;;;N;;;;; +1E878;MENDE KIKAKUI SYLLABLE M043 NGGA;Lo;0;R;;;;;N;;;;; +1E879;MENDE KIKAKUI SYLLABLE M082 NGGU;Lo;0;R;;;;;N;;;;; +1E87A;MENDE KIKAKUI SYLLABLE M115 NGGEE;Lo;0;R;;;;;N;;;;; +1E87B;MENDE KIKAKUI SYLLABLE M146 NGGE;Lo;0;R;;;;;N;;;;; +1E87C;MENDE KIKAKUI SYLLABLE M156 NGGOO;Lo;0;R;;;;;N;;;;; +1E87D;MENDE KIKAKUI SYLLABLE M120 NGGO;Lo;0;R;;;;;N;;;;; +1E87E;MENDE KIKAKUI SYLLABLE M159 NGGAA;Lo;0;R;;;;;N;;;;; +1E87F;MENDE KIKAKUI SYLLABLE M127 NGGUA;Lo;0;R;;;;;N;;;;; +1E880;MENDE KIKAKUI SYLLABLE M086 LONG NGGE;Lo;0;R;;;;;N;;;;; +1E881;MENDE KIKAKUI SYLLABLE M106 LONG NGGOO;Lo;0;R;;;;;N;;;;; +1E882;MENDE KIKAKUI SYLLABLE M183 LONG NGGO;Lo;0;R;;;;;N;;;;; +1E883;MENDE KIKAKUI SYLLABLE M155 GI;Lo;0;R;;;;;N;;;;; +1E884;MENDE KIKAKUI SYLLABLE M111 GA;Lo;0;R;;;;;N;;;;; +1E885;MENDE KIKAKUI SYLLABLE M168 GU;Lo;0;R;;;;;N;;;;; +1E886;MENDE KIKAKUI SYLLABLE M190 GEE;Lo;0;R;;;;;N;;;;; +1E887;MENDE KIKAKUI SYLLABLE M166 GUEI;Lo;0;R;;;;;N;;;;; +1E888;MENDE KIKAKUI SYLLABLE M167 GUAN;Lo;0;R;;;;;N;;;;; +1E889;MENDE KIKAKUI SYLLABLE M184 NGEN;Lo;0;R;;;;;N;;;;; +1E88A;MENDE KIKAKUI SYLLABLE M057 NGON;Lo;0;R;;;;;N;;;;; +1E88B;MENDE KIKAKUI SYLLABLE M177 NGUAN;Lo;0;R;;;;;N;;;;; +1E88C;MENDE KIKAKUI SYLLABLE M068 PI;Lo;0;R;;;;;N;;;;; +1E88D;MENDE KIKAKUI SYLLABLE M099 PA;Lo;0;R;;;;;N;;;;; +1E88E;MENDE KIKAKUI SYLLABLE M050 PU;Lo;0;R;;;;;N;;;;; +1E88F;MENDE KIKAKUI SYLLABLE M081 PEE;Lo;0;R;;;;;N;;;;; +1E890;MENDE KIKAKUI SYLLABLE M051 PE;Lo;0;R;;;;;N;;;;; +1E891;MENDE KIKAKUI SYLLABLE M102 POO;Lo;0;R;;;;;N;;;;; +1E892;MENDE KIKAKUI SYLLABLE M066 PO;Lo;0;R;;;;;N;;;;; +1E893;MENDE KIKAKUI SYLLABLE M145 MBI;Lo;0;R;;;;;N;;;;; +1E894;MENDE KIKAKUI SYLLABLE M062 MBA;Lo;0;R;;;;;N;;;;; +1E895;MENDE KIKAKUI SYLLABLE M122 MBU;Lo;0;R;;;;;N;;;;; +1E896;MENDE KIKAKUI SYLLABLE M047 MBEE;Lo;0;R;;;;;N;;;;; +1E897;MENDE KIKAKUI SYLLABLE M188 MBEE;Lo;0;R;;;;;N;;;;; +1E898;MENDE KIKAKUI SYLLABLE M072 MBE;Lo;0;R;;;;;N;;;;; +1E899;MENDE KIKAKUI SYLLABLE M172 MBOO;Lo;0;R;;;;;N;;;;; +1E89A;MENDE KIKAKUI SYLLABLE M174 MBO;Lo;0;R;;;;;N;;;;; +1E89B;MENDE KIKAKUI SYLLABLE M187 MBUU;Lo;0;R;;;;;N;;;;; +1E89C;MENDE KIKAKUI SYLLABLE M161 LONG MBE;Lo;0;R;;;;;N;;;;; +1E89D;MENDE KIKAKUI SYLLABLE M105 LONG MBOO;Lo;0;R;;;;;N;;;;; +1E89E;MENDE KIKAKUI SYLLABLE M142 LONG MBO;Lo;0;R;;;;;N;;;;; +1E89F;MENDE KIKAKUI SYLLABLE M132 KPI;Lo;0;R;;;;;N;;;;; +1E8A0;MENDE KIKAKUI SYLLABLE M092 KPA;Lo;0;R;;;;;N;;;;; +1E8A1;MENDE KIKAKUI SYLLABLE M074 KPU;Lo;0;R;;;;;N;;;;; +1E8A2;MENDE KIKAKUI SYLLABLE M044 KPEE;Lo;0;R;;;;;N;;;;; +1E8A3;MENDE KIKAKUI SYLLABLE M108 KPE;Lo;0;R;;;;;N;;;;; +1E8A4;MENDE KIKAKUI SYLLABLE M112 KPOO;Lo;0;R;;;;;N;;;;; +1E8A5;MENDE KIKAKUI SYLLABLE M158 KPO;Lo;0;R;;;;;N;;;;; +1E8A6;MENDE KIKAKUI SYLLABLE M124 GBI;Lo;0;R;;;;;N;;;;; +1E8A7;MENDE KIKAKUI SYLLABLE M056 GBA;Lo;0;R;;;;;N;;;;; +1E8A8;MENDE KIKAKUI SYLLABLE M148 GBU;Lo;0;R;;;;;N;;;;; +1E8A9;MENDE KIKAKUI SYLLABLE M093 GBEE;Lo;0;R;;;;;N;;;;; +1E8AA;MENDE KIKAKUI SYLLABLE M107 GBE;Lo;0;R;;;;;N;;;;; +1E8AB;MENDE KIKAKUI SYLLABLE M071 GBOO;Lo;0;R;;;;;N;;;;; +1E8AC;MENDE KIKAKUI SYLLABLE M070 GBO;Lo;0;R;;;;;N;;;;; +1E8AD;MENDE KIKAKUI SYLLABLE M171 RA;Lo;0;R;;;;;N;;;;; +1E8AE;MENDE KIKAKUI SYLLABLE M123 NDI;Lo;0;R;;;;;N;;;;; +1E8AF;MENDE KIKAKUI SYLLABLE M129 NDA;Lo;0;R;;;;;N;;;;; +1E8B0;MENDE KIKAKUI SYLLABLE M125 NDU;Lo;0;R;;;;;N;;;;; +1E8B1;MENDE KIKAKUI SYLLABLE M191 NDEE;Lo;0;R;;;;;N;;;;; +1E8B2;MENDE KIKAKUI SYLLABLE M119 NDE;Lo;0;R;;;;;N;;;;; +1E8B3;MENDE KIKAKUI SYLLABLE M067 NDOO;Lo;0;R;;;;;N;;;;; +1E8B4;MENDE KIKAKUI SYLLABLE M064 NDO;Lo;0;R;;;;;N;;;;; +1E8B5;MENDE KIKAKUI SYLLABLE M152 NJA;Lo;0;R;;;;;N;;;;; +1E8B6;MENDE KIKAKUI SYLLABLE M192 NJU;Lo;0;R;;;;;N;;;;; +1E8B7;MENDE KIKAKUI SYLLABLE M149 NJEE;Lo;0;R;;;;;N;;;;; +1E8B8;MENDE KIKAKUI SYLLABLE M134 NJOO;Lo;0;R;;;;;N;;;;; +1E8B9;MENDE KIKAKUI SYLLABLE M182 VI;Lo;0;R;;;;;N;;;;; +1E8BA;MENDE KIKAKUI SYLLABLE M185 VA;Lo;0;R;;;;;N;;;;; +1E8BB;MENDE KIKAKUI SYLLABLE M151 VU;Lo;0;R;;;;;N;;;;; +1E8BC;MENDE KIKAKUI SYLLABLE M173 VEE;Lo;0;R;;;;;N;;;;; +1E8BD;MENDE KIKAKUI SYLLABLE M085 VE;Lo;0;R;;;;;N;;;;; +1E8BE;MENDE KIKAKUI SYLLABLE M144 VOO;Lo;0;R;;;;;N;;;;; +1E8BF;MENDE KIKAKUI SYLLABLE M077 VO;Lo;0;R;;;;;N;;;;; +1E8C0;MENDE KIKAKUI SYLLABLE M164 NYIN;Lo;0;R;;;;;N;;;;; +1E8C1;MENDE KIKAKUI SYLLABLE M058 NYAN;Lo;0;R;;;;;N;;;;; +1E8C2;MENDE KIKAKUI SYLLABLE M170 NYUN;Lo;0;R;;;;;N;;;;; +1E8C3;MENDE KIKAKUI SYLLABLE M098 NYEN;Lo;0;R;;;;;N;;;;; +1E8C4;MENDE KIKAKUI SYLLABLE M060 NYON;Lo;0;R;;;;;N;;;;; +1E8C7;MENDE KIKAKUI DIGIT ONE;No;0;R;;;;1;N;;;;; +1E8C8;MENDE KIKAKUI DIGIT TWO;No;0;R;;;;2;N;;;;; +1E8C9;MENDE KIKAKUI DIGIT THREE;No;0;R;;;;3;N;;;;; +1E8CA;MENDE KIKAKUI DIGIT FOUR;No;0;R;;;;4;N;;;;; +1E8CB;MENDE KIKAKUI DIGIT FIVE;No;0;R;;;;5;N;;;;; +1E8CC;MENDE KIKAKUI DIGIT SIX;No;0;R;;;;6;N;;;;; +1E8CD;MENDE KIKAKUI DIGIT SEVEN;No;0;R;;;;7;N;;;;; +1E8CE;MENDE KIKAKUI DIGIT EIGHT;No;0;R;;;;8;N;;;;; +1E8CF;MENDE KIKAKUI DIGIT NINE;No;0;R;;;;9;N;;;;; +1E8D0;MENDE KIKAKUI COMBINING NUMBER TEENS;Mn;220;NSM;;;;;N;;;;; +1E8D1;MENDE KIKAKUI COMBINING NUMBER TENS;Mn;220;NSM;;;;;N;;;;; +1E8D2;MENDE KIKAKUI COMBINING NUMBER HUNDREDS;Mn;220;NSM;;;;;N;;;;; +1E8D3;MENDE KIKAKUI COMBINING NUMBER THOUSANDS;Mn;220;NSM;;;;;N;;;;; +1E8D4;MENDE KIKAKUI COMBINING NUMBER TEN THOUSANDS;Mn;220;NSM;;;;;N;;;;; +1E8D5;MENDE KIKAKUI COMBINING NUMBER HUNDRED THOUSANDS;Mn;220;NSM;;;;;N;;;;; +1E8D6;MENDE KIKAKUI COMBINING NUMBER MILLIONS;Mn;220;NSM;;;;;N;;;;; +1E900;ADLAM CAPITAL LETTER ALIF;Lu;0;R;;;;;N;;;;1E922; +1E901;ADLAM CAPITAL LETTER DAALI;Lu;0;R;;;;;N;;;;1E923; +1E902;ADLAM CAPITAL LETTER LAAM;Lu;0;R;;;;;N;;;;1E924; +1E903;ADLAM CAPITAL LETTER MIIM;Lu;0;R;;;;;N;;;;1E925; +1E904;ADLAM CAPITAL LETTER BA;Lu;0;R;;;;;N;;;;1E926; +1E905;ADLAM CAPITAL LETTER SINNYIIYHE;Lu;0;R;;;;;N;;;;1E927; +1E906;ADLAM CAPITAL LETTER PE;Lu;0;R;;;;;N;;;;1E928; +1E907;ADLAM CAPITAL LETTER BHE;Lu;0;R;;;;;N;;;;1E929; +1E908;ADLAM CAPITAL LETTER RA;Lu;0;R;;;;;N;;;;1E92A; +1E909;ADLAM CAPITAL LETTER E;Lu;0;R;;;;;N;;;;1E92B; +1E90A;ADLAM CAPITAL LETTER FA;Lu;0;R;;;;;N;;;;1E92C; +1E90B;ADLAM CAPITAL LETTER I;Lu;0;R;;;;;N;;;;1E92D; +1E90C;ADLAM CAPITAL LETTER O;Lu;0;R;;;;;N;;;;1E92E; +1E90D;ADLAM CAPITAL LETTER DHA;Lu;0;R;;;;;N;;;;1E92F; +1E90E;ADLAM CAPITAL LETTER YHE;Lu;0;R;;;;;N;;;;1E930; +1E90F;ADLAM CAPITAL LETTER WAW;Lu;0;R;;;;;N;;;;1E931; +1E910;ADLAM CAPITAL LETTER NUN;Lu;0;R;;;;;N;;;;1E932; +1E911;ADLAM CAPITAL LETTER KAF;Lu;0;R;;;;;N;;;;1E933; +1E912;ADLAM CAPITAL LETTER YA;Lu;0;R;;;;;N;;;;1E934; +1E913;ADLAM CAPITAL LETTER U;Lu;0;R;;;;;N;;;;1E935; +1E914;ADLAM CAPITAL LETTER JIIM;Lu;0;R;;;;;N;;;;1E936; +1E915;ADLAM CAPITAL LETTER CHI;Lu;0;R;;;;;N;;;;1E937; +1E916;ADLAM CAPITAL LETTER HA;Lu;0;R;;;;;N;;;;1E938; +1E917;ADLAM CAPITAL LETTER QAAF;Lu;0;R;;;;;N;;;;1E939; +1E918;ADLAM CAPITAL LETTER GA;Lu;0;R;;;;;N;;;;1E93A; +1E919;ADLAM CAPITAL LETTER NYA;Lu;0;R;;;;;N;;;;1E93B; +1E91A;ADLAM CAPITAL LETTER TU;Lu;0;R;;;;;N;;;;1E93C; +1E91B;ADLAM CAPITAL LETTER NHA;Lu;0;R;;;;;N;;;;1E93D; +1E91C;ADLAM CAPITAL LETTER VA;Lu;0;R;;;;;N;;;;1E93E; +1E91D;ADLAM CAPITAL LETTER KHA;Lu;0;R;;;;;N;;;;1E93F; +1E91E;ADLAM CAPITAL LETTER GBE;Lu;0;R;;;;;N;;;;1E940; +1E91F;ADLAM CAPITAL LETTER ZAL;Lu;0;R;;;;;N;;;;1E941; +1E920;ADLAM CAPITAL LETTER KPO;Lu;0;R;;;;;N;;;;1E942; +1E921;ADLAM CAPITAL LETTER SHA;Lu;0;R;;;;;N;;;;1E943; +1E922;ADLAM SMALL LETTER ALIF;Ll;0;R;;;;;N;;;1E900;;1E900 +1E923;ADLAM SMALL LETTER DAALI;Ll;0;R;;;;;N;;;1E901;;1E901 +1E924;ADLAM SMALL LETTER LAAM;Ll;0;R;;;;;N;;;1E902;;1E902 +1E925;ADLAM SMALL LETTER MIIM;Ll;0;R;;;;;N;;;1E903;;1E903 +1E926;ADLAM SMALL LETTER BA;Ll;0;R;;;;;N;;;1E904;;1E904 +1E927;ADLAM SMALL LETTER SINNYIIYHE;Ll;0;R;;;;;N;;;1E905;;1E905 +1E928;ADLAM SMALL LETTER PE;Ll;0;R;;;;;N;;;1E906;;1E906 +1E929;ADLAM SMALL LETTER BHE;Ll;0;R;;;;;N;;;1E907;;1E907 +1E92A;ADLAM SMALL LETTER RA;Ll;0;R;;;;;N;;;1E908;;1E908 +1E92B;ADLAM SMALL LETTER E;Ll;0;R;;;;;N;;;1E909;;1E909 +1E92C;ADLAM SMALL LETTER FA;Ll;0;R;;;;;N;;;1E90A;;1E90A +1E92D;ADLAM SMALL LETTER I;Ll;0;R;;;;;N;;;1E90B;;1E90B +1E92E;ADLAM SMALL LETTER O;Ll;0;R;;;;;N;;;1E90C;;1E90C +1E92F;ADLAM SMALL LETTER DHA;Ll;0;R;;;;;N;;;1E90D;;1E90D +1E930;ADLAM SMALL LETTER YHE;Ll;0;R;;;;;N;;;1E90E;;1E90E +1E931;ADLAM SMALL LETTER WAW;Ll;0;R;;;;;N;;;1E90F;;1E90F +1E932;ADLAM SMALL LETTER NUN;Ll;0;R;;;;;N;;;1E910;;1E910 +1E933;ADLAM SMALL LETTER KAF;Ll;0;R;;;;;N;;;1E911;;1E911 +1E934;ADLAM SMALL LETTER YA;Ll;0;R;;;;;N;;;1E912;;1E912 +1E935;ADLAM SMALL LETTER U;Ll;0;R;;;;;N;;;1E913;;1E913 +1E936;ADLAM SMALL LETTER JIIM;Ll;0;R;;;;;N;;;1E914;;1E914 +1E937;ADLAM SMALL LETTER CHI;Ll;0;R;;;;;N;;;1E915;;1E915 +1E938;ADLAM SMALL LETTER HA;Ll;0;R;;;;;N;;;1E916;;1E916 +1E939;ADLAM SMALL LETTER QAAF;Ll;0;R;;;;;N;;;1E917;;1E917 +1E93A;ADLAM SMALL LETTER GA;Ll;0;R;;;;;N;;;1E918;;1E918 +1E93B;ADLAM SMALL LETTER NYA;Ll;0;R;;;;;N;;;1E919;;1E919 +1E93C;ADLAM SMALL LETTER TU;Ll;0;R;;;;;N;;;1E91A;;1E91A +1E93D;ADLAM SMALL LETTER NHA;Ll;0;R;;;;;N;;;1E91B;;1E91B +1E93E;ADLAM SMALL LETTER VA;Ll;0;R;;;;;N;;;1E91C;;1E91C +1E93F;ADLAM SMALL LETTER KHA;Ll;0;R;;;;;N;;;1E91D;;1E91D +1E940;ADLAM SMALL LETTER GBE;Ll;0;R;;;;;N;;;1E91E;;1E91E +1E941;ADLAM SMALL LETTER ZAL;Ll;0;R;;;;;N;;;1E91F;;1E91F +1E942;ADLAM SMALL LETTER KPO;Ll;0;R;;;;;N;;;1E920;;1E920 +1E943;ADLAM SMALL LETTER SHA;Ll;0;R;;;;;N;;;1E921;;1E921 +1E944;ADLAM ALIF LENGTHENER;Mn;230;NSM;;;;;N;;;;; +1E945;ADLAM VOWEL LENGTHENER;Mn;230;NSM;;;;;N;;;;; +1E946;ADLAM GEMINATION MARK;Mn;230;NSM;;;;;N;;;;; +1E947;ADLAM HAMZA;Mn;230;NSM;;;;;N;;;;; +1E948;ADLAM CONSONANT MODIFIER;Mn;230;NSM;;;;;N;;;;; +1E949;ADLAM GEMINATE CONSONANT MODIFIER;Mn;230;NSM;;;;;N;;;;; +1E94A;ADLAM NUKTA;Mn;7;NSM;;;;;N;;;;; +1E94B;ADLAM NASALIZATION MARK;Lm;0;R;;;;;N;;;;; +1E950;ADLAM DIGIT ZERO;Nd;0;R;;0;0;0;N;;;;; +1E951;ADLAM DIGIT ONE;Nd;0;R;;1;1;1;N;;;;; +1E952;ADLAM DIGIT TWO;Nd;0;R;;2;2;2;N;;;;; +1E953;ADLAM DIGIT THREE;Nd;0;R;;3;3;3;N;;;;; +1E954;ADLAM DIGIT FOUR;Nd;0;R;;4;4;4;N;;;;; +1E955;ADLAM DIGIT FIVE;Nd;0;R;;5;5;5;N;;;;; +1E956;ADLAM DIGIT SIX;Nd;0;R;;6;6;6;N;;;;; +1E957;ADLAM DIGIT SEVEN;Nd;0;R;;7;7;7;N;;;;; +1E958;ADLAM DIGIT EIGHT;Nd;0;R;;8;8;8;N;;;;; +1E959;ADLAM DIGIT NINE;Nd;0;R;;9;9;9;N;;;;; +1E95E;ADLAM INITIAL EXCLAMATION MARK;Po;0;R;;;;;N;;;;; +1E95F;ADLAM INITIAL QUESTION MARK;Po;0;R;;;;;N;;;;; +1EC71;INDIC SIYAQ NUMBER ONE;No;0;AL;;;;1;N;;;;; +1EC72;INDIC SIYAQ NUMBER TWO;No;0;AL;;;;2;N;;;;; +1EC73;INDIC SIYAQ NUMBER THREE;No;0;AL;;;;3;N;;;;; +1EC74;INDIC SIYAQ NUMBER FOUR;No;0;AL;;;;4;N;;;;; +1EC75;INDIC SIYAQ NUMBER FIVE;No;0;AL;;;;5;N;;;;; +1EC76;INDIC SIYAQ NUMBER SIX;No;0;AL;;;;6;N;;;;; +1EC77;INDIC SIYAQ NUMBER SEVEN;No;0;AL;;;;7;N;;;;; +1EC78;INDIC SIYAQ NUMBER EIGHT;No;0;AL;;;;8;N;;;;; +1EC79;INDIC SIYAQ NUMBER NINE;No;0;AL;;;;9;N;;;;; +1EC7A;INDIC SIYAQ NUMBER TEN;No;0;AL;;;;10;N;;;;; +1EC7B;INDIC SIYAQ NUMBER TWENTY;No;0;AL;;;;20;N;;;;; +1EC7C;INDIC SIYAQ NUMBER THIRTY;No;0;AL;;;;30;N;;;;; +1EC7D;INDIC SIYAQ NUMBER FORTY;No;0;AL;;;;40;N;;;;; +1EC7E;INDIC SIYAQ NUMBER FIFTY;No;0;AL;;;;50;N;;;;; +1EC7F;INDIC SIYAQ NUMBER SIXTY;No;0;AL;;;;60;N;;;;; +1EC80;INDIC SIYAQ NUMBER SEVENTY;No;0;AL;;;;70;N;;;;; +1EC81;INDIC SIYAQ NUMBER EIGHTY;No;0;AL;;;;80;N;;;;; +1EC82;INDIC SIYAQ NUMBER NINETY;No;0;AL;;;;90;N;;;;; +1EC83;INDIC SIYAQ NUMBER ONE HUNDRED;No;0;AL;;;;100;N;;;;; +1EC84;INDIC SIYAQ NUMBER TWO HUNDRED;No;0;AL;;;;200;N;;;;; +1EC85;INDIC SIYAQ NUMBER THREE HUNDRED;No;0;AL;;;;300;N;;;;; +1EC86;INDIC SIYAQ NUMBER FOUR HUNDRED;No;0;AL;;;;400;N;;;;; +1EC87;INDIC SIYAQ NUMBER FIVE HUNDRED;No;0;AL;;;;500;N;;;;; +1EC88;INDIC SIYAQ NUMBER SIX HUNDRED;No;0;AL;;;;600;N;;;;; +1EC89;INDIC SIYAQ NUMBER SEVEN HUNDRED;No;0;AL;;;;700;N;;;;; +1EC8A;INDIC SIYAQ NUMBER EIGHT HUNDRED;No;0;AL;;;;800;N;;;;; +1EC8B;INDIC SIYAQ NUMBER NINE HUNDRED;No;0;AL;;;;900;N;;;;; +1EC8C;INDIC SIYAQ NUMBER ONE THOUSAND;No;0;AL;;;;1000;N;;;;; +1EC8D;INDIC SIYAQ NUMBER TWO THOUSAND;No;0;AL;;;;2000;N;;;;; +1EC8E;INDIC SIYAQ NUMBER THREE THOUSAND;No;0;AL;;;;3000;N;;;;; +1EC8F;INDIC SIYAQ NUMBER FOUR THOUSAND;No;0;AL;;;;4000;N;;;;; +1EC90;INDIC SIYAQ NUMBER FIVE THOUSAND;No;0;AL;;;;5000;N;;;;; +1EC91;INDIC SIYAQ NUMBER SIX THOUSAND;No;0;AL;;;;6000;N;;;;; +1EC92;INDIC SIYAQ NUMBER SEVEN THOUSAND;No;0;AL;;;;7000;N;;;;; +1EC93;INDIC SIYAQ NUMBER EIGHT THOUSAND;No;0;AL;;;;8000;N;;;;; +1EC94;INDIC SIYAQ NUMBER NINE THOUSAND;No;0;AL;;;;9000;N;;;;; +1EC95;INDIC SIYAQ NUMBER TEN THOUSAND;No;0;AL;;;;10000;N;;;;; +1EC96;INDIC SIYAQ NUMBER TWENTY THOUSAND;No;0;AL;;;;20000;N;;;;; +1EC97;INDIC SIYAQ NUMBER THIRTY THOUSAND;No;0;AL;;;;30000;N;;;;; +1EC98;INDIC SIYAQ NUMBER FORTY THOUSAND;No;0;AL;;;;40000;N;;;;; +1EC99;INDIC SIYAQ NUMBER FIFTY THOUSAND;No;0;AL;;;;50000;N;;;;; +1EC9A;INDIC SIYAQ NUMBER SIXTY THOUSAND;No;0;AL;;;;60000;N;;;;; +1EC9B;INDIC SIYAQ NUMBER SEVENTY THOUSAND;No;0;AL;;;;70000;N;;;;; +1EC9C;INDIC SIYAQ NUMBER EIGHTY THOUSAND;No;0;AL;;;;80000;N;;;;; +1EC9D;INDIC SIYAQ NUMBER NINETY THOUSAND;No;0;AL;;;;90000;N;;;;; +1EC9E;INDIC SIYAQ NUMBER LAKH;No;0;AL;;;;100000;N;;;;; +1EC9F;INDIC SIYAQ NUMBER LAKHAN;No;0;AL;;;;200000;N;;;;; +1ECA0;INDIC SIYAQ LAKH MARK;No;0;AL;;;;100000;N;;;;; +1ECA1;INDIC SIYAQ NUMBER KAROR;No;0;AL;;;;10000000;N;;;;; +1ECA2;INDIC SIYAQ NUMBER KARORAN;No;0;AL;;;;20000000;N;;;;; +1ECA3;INDIC SIYAQ NUMBER PREFIXED ONE;No;0;AL;;;;1;N;;;;; +1ECA4;INDIC SIYAQ NUMBER PREFIXED TWO;No;0;AL;;;;2;N;;;;; +1ECA5;INDIC SIYAQ NUMBER PREFIXED THREE;No;0;AL;;;;3;N;;;;; +1ECA6;INDIC SIYAQ NUMBER PREFIXED FOUR;No;0;AL;;;;4;N;;;;; +1ECA7;INDIC SIYAQ NUMBER PREFIXED FIVE;No;0;AL;;;;5;N;;;;; +1ECA8;INDIC SIYAQ NUMBER PREFIXED SIX;No;0;AL;;;;6;N;;;;; +1ECA9;INDIC SIYAQ NUMBER PREFIXED SEVEN;No;0;AL;;;;7;N;;;;; +1ECAA;INDIC SIYAQ NUMBER PREFIXED EIGHT;No;0;AL;;;;8;N;;;;; +1ECAB;INDIC SIYAQ NUMBER PREFIXED NINE;No;0;AL;;;;9;N;;;;; +1ECAC;INDIC SIYAQ PLACEHOLDER;So;0;AL;;;;;N;;;;; +1ECAD;INDIC SIYAQ FRACTION ONE QUARTER;No;0;AL;;;;1/4;N;;;;; +1ECAE;INDIC SIYAQ FRACTION ONE HALF;No;0;AL;;;;1/2;N;;;;; +1ECAF;INDIC SIYAQ FRACTION THREE QUARTERS;No;0;AL;;;;3/4;N;;;;; +1ECB0;INDIC SIYAQ RUPEE MARK;Sc;0;AL;;;;;N;;;;; +1ECB1;INDIC SIYAQ NUMBER ALTERNATE ONE;No;0;AL;;;;1;N;;;;; +1ECB2;INDIC SIYAQ NUMBER ALTERNATE TWO;No;0;AL;;;;2;N;;;;; +1ECB3;INDIC SIYAQ NUMBER ALTERNATE TEN THOUSAND;No;0;AL;;;;10000;N;;;;; +1ECB4;INDIC SIYAQ ALTERNATE LAKH MARK;No;0;AL;;;;100000;N;;;;; +1ED01;OTTOMAN SIYAQ NUMBER ONE;No;0;AL;;;;1;N;;;;; +1ED02;OTTOMAN SIYAQ NUMBER TWO;No;0;AL;;;;2;N;;;;; +1ED03;OTTOMAN SIYAQ NUMBER THREE;No;0;AL;;;;3;N;;;;; +1ED04;OTTOMAN SIYAQ NUMBER FOUR;No;0;AL;;;;4;N;;;;; +1ED05;OTTOMAN SIYAQ NUMBER FIVE;No;0;AL;;;;5;N;;;;; +1ED06;OTTOMAN SIYAQ NUMBER SIX;No;0;AL;;;;6;N;;;;; +1ED07;OTTOMAN SIYAQ NUMBER SEVEN;No;0;AL;;;;7;N;;;;; +1ED08;OTTOMAN SIYAQ NUMBER EIGHT;No;0;AL;;;;8;N;;;;; +1ED09;OTTOMAN SIYAQ NUMBER NINE;No;0;AL;;;;9;N;;;;; +1ED0A;OTTOMAN SIYAQ NUMBER TEN;No;0;AL;;;;10;N;;;;; +1ED0B;OTTOMAN SIYAQ NUMBER TWENTY;No;0;AL;;;;20;N;;;;; +1ED0C;OTTOMAN SIYAQ NUMBER THIRTY;No;0;AL;;;;30;N;;;;; +1ED0D;OTTOMAN SIYAQ NUMBER FORTY;No;0;AL;;;;40;N;;;;; +1ED0E;OTTOMAN SIYAQ NUMBER FIFTY;No;0;AL;;;;50;N;;;;; +1ED0F;OTTOMAN SIYAQ NUMBER SIXTY;No;0;AL;;;;60;N;;;;; +1ED10;OTTOMAN SIYAQ NUMBER SEVENTY;No;0;AL;;;;70;N;;;;; +1ED11;OTTOMAN SIYAQ NUMBER EIGHTY;No;0;AL;;;;80;N;;;;; +1ED12;OTTOMAN SIYAQ NUMBER NINETY;No;0;AL;;;;90;N;;;;; +1ED13;OTTOMAN SIYAQ NUMBER ONE HUNDRED;No;0;AL;;;;100;N;;;;; +1ED14;OTTOMAN SIYAQ NUMBER TWO HUNDRED;No;0;AL;;;;200;N;;;;; +1ED15;OTTOMAN SIYAQ NUMBER THREE HUNDRED;No;0;AL;;;;300;N;;;;; +1ED16;OTTOMAN SIYAQ NUMBER FOUR HUNDRED;No;0;AL;;;;400;N;;;;; +1ED17;OTTOMAN SIYAQ NUMBER FIVE HUNDRED;No;0;AL;;;;500;N;;;;; +1ED18;OTTOMAN SIYAQ NUMBER SIX HUNDRED;No;0;AL;;;;600;N;;;;; +1ED19;OTTOMAN SIYAQ NUMBER SEVEN HUNDRED;No;0;AL;;;;700;N;;;;; +1ED1A;OTTOMAN SIYAQ NUMBER EIGHT HUNDRED;No;0;AL;;;;800;N;;;;; +1ED1B;OTTOMAN SIYAQ NUMBER NINE HUNDRED;No;0;AL;;;;900;N;;;;; +1ED1C;OTTOMAN SIYAQ NUMBER ONE THOUSAND;No;0;AL;;;;1000;N;;;;; +1ED1D;OTTOMAN SIYAQ NUMBER TWO THOUSAND;No;0;AL;;;;2000;N;;;;; +1ED1E;OTTOMAN SIYAQ NUMBER THREE THOUSAND;No;0;AL;;;;3000;N;;;;; +1ED1F;OTTOMAN SIYAQ NUMBER FOUR THOUSAND;No;0;AL;;;;4000;N;;;;; +1ED20;OTTOMAN SIYAQ NUMBER FIVE THOUSAND;No;0;AL;;;;5000;N;;;;; +1ED21;OTTOMAN SIYAQ NUMBER SIX THOUSAND;No;0;AL;;;;6000;N;;;;; +1ED22;OTTOMAN SIYAQ NUMBER SEVEN THOUSAND;No;0;AL;;;;7000;N;;;;; +1ED23;OTTOMAN SIYAQ NUMBER EIGHT THOUSAND;No;0;AL;;;;8000;N;;;;; +1ED24;OTTOMAN SIYAQ NUMBER NINE THOUSAND;No;0;AL;;;;9000;N;;;;; +1ED25;OTTOMAN SIYAQ NUMBER TEN THOUSAND;No;0;AL;;;;10000;N;;;;; +1ED26;OTTOMAN SIYAQ NUMBER TWENTY THOUSAND;No;0;AL;;;;20000;N;;;;; +1ED27;OTTOMAN SIYAQ NUMBER THIRTY THOUSAND;No;0;AL;;;;30000;N;;;;; +1ED28;OTTOMAN SIYAQ NUMBER FORTY THOUSAND;No;0;AL;;;;40000;N;;;;; +1ED29;OTTOMAN SIYAQ NUMBER FIFTY THOUSAND;No;0;AL;;;;50000;N;;;;; +1ED2A;OTTOMAN SIYAQ NUMBER SIXTY THOUSAND;No;0;AL;;;;60000;N;;;;; +1ED2B;OTTOMAN SIYAQ NUMBER SEVENTY THOUSAND;No;0;AL;;;;70000;N;;;;; +1ED2C;OTTOMAN SIYAQ NUMBER EIGHTY THOUSAND;No;0;AL;;;;80000;N;;;;; +1ED2D;OTTOMAN SIYAQ NUMBER NINETY THOUSAND;No;0;AL;;;;90000;N;;;;; +1ED2E;OTTOMAN SIYAQ MARRATAN;So;0;AL;;;;;N;;;;; +1ED2F;OTTOMAN SIYAQ ALTERNATE NUMBER TWO;No;0;AL;;;;2;N;;;;; +1ED30;OTTOMAN SIYAQ ALTERNATE NUMBER THREE;No;0;AL;;;;3;N;;;;; +1ED31;OTTOMAN SIYAQ ALTERNATE NUMBER FOUR;No;0;AL;;;;4;N;;;;; +1ED32;OTTOMAN SIYAQ ALTERNATE NUMBER FIVE;No;0;AL;;;;5;N;;;;; +1ED33;OTTOMAN SIYAQ ALTERNATE NUMBER SIX;No;0;AL;;;;6;N;;;;; +1ED34;OTTOMAN SIYAQ ALTERNATE NUMBER SEVEN;No;0;AL;;;;7;N;;;;; +1ED35;OTTOMAN SIYAQ ALTERNATE NUMBER EIGHT;No;0;AL;;;;8;N;;;;; +1ED36;OTTOMAN SIYAQ ALTERNATE NUMBER NINE;No;0;AL;;;;9;N;;;;; +1ED37;OTTOMAN SIYAQ ALTERNATE NUMBER TEN;No;0;AL;;;;10;N;;;;; +1ED38;OTTOMAN SIYAQ ALTERNATE NUMBER FOUR HUNDRED;No;0;AL;;;;400;N;;;;; +1ED39;OTTOMAN SIYAQ ALTERNATE NUMBER SIX HUNDRED;No;0;AL;;;;600;N;;;;; +1ED3A;OTTOMAN SIYAQ ALTERNATE NUMBER TWO THOUSAND;No;0;AL;;;;2000;N;;;;; +1ED3B;OTTOMAN SIYAQ ALTERNATE NUMBER TEN THOUSAND;No;0;AL;;;;10000;N;;;;; +1ED3C;OTTOMAN SIYAQ FRACTION ONE HALF;No;0;AL;;;;1/2;N;;;;; +1ED3D;OTTOMAN SIYAQ FRACTION ONE SIXTH;No;0;AL;;;;1/6;N;;;;; +1EE00;ARABIC MATHEMATICAL ALEF;Lo;0;AL; 0627;;;;N;;;;; +1EE01;ARABIC MATHEMATICAL BEH;Lo;0;AL; 0628;;;;N;;;;; +1EE02;ARABIC MATHEMATICAL JEEM;Lo;0;AL; 062C;;;;N;;;;; +1EE03;ARABIC MATHEMATICAL DAL;Lo;0;AL; 062F;;;;N;;;;; +1EE05;ARABIC MATHEMATICAL WAW;Lo;0;AL; 0648;;;;N;;;;; +1EE06;ARABIC MATHEMATICAL ZAIN;Lo;0;AL; 0632;;;;N;;;;; +1EE07;ARABIC MATHEMATICAL HAH;Lo;0;AL; 062D;;;;N;;;;; +1EE08;ARABIC MATHEMATICAL TAH;Lo;0;AL; 0637;;;;N;;;;; +1EE09;ARABIC MATHEMATICAL YEH;Lo;0;AL; 064A;;;;N;;;;; +1EE0A;ARABIC MATHEMATICAL KAF;Lo;0;AL; 0643;;;;N;;;;; +1EE0B;ARABIC MATHEMATICAL LAM;Lo;0;AL; 0644;;;;N;;;;; +1EE0C;ARABIC MATHEMATICAL MEEM;Lo;0;AL; 0645;;;;N;;;;; +1EE0D;ARABIC MATHEMATICAL NOON;Lo;0;AL; 0646;;;;N;;;;; +1EE0E;ARABIC MATHEMATICAL SEEN;Lo;0;AL; 0633;;;;N;;;;; +1EE0F;ARABIC MATHEMATICAL AIN;Lo;0;AL; 0639;;;;N;;;;; +1EE10;ARABIC MATHEMATICAL FEH;Lo;0;AL; 0641;;;;N;;;;; +1EE11;ARABIC MATHEMATICAL SAD;Lo;0;AL; 0635;;;;N;;;;; +1EE12;ARABIC MATHEMATICAL QAF;Lo;0;AL; 0642;;;;N;;;;; +1EE13;ARABIC MATHEMATICAL REH;Lo;0;AL; 0631;;;;N;;;;; +1EE14;ARABIC MATHEMATICAL SHEEN;Lo;0;AL; 0634;;;;N;;;;; +1EE15;ARABIC MATHEMATICAL TEH;Lo;0;AL; 062A;;;;N;;;;; +1EE16;ARABIC MATHEMATICAL THEH;Lo;0;AL; 062B;;;;N;;;;; +1EE17;ARABIC MATHEMATICAL KHAH;Lo;0;AL; 062E;;;;N;;;;; +1EE18;ARABIC MATHEMATICAL THAL;Lo;0;AL; 0630;;;;N;;;;; +1EE19;ARABIC MATHEMATICAL DAD;Lo;0;AL; 0636;;;;N;;;;; +1EE1A;ARABIC MATHEMATICAL ZAH;Lo;0;AL; 0638;;;;N;;;;; +1EE1B;ARABIC MATHEMATICAL GHAIN;Lo;0;AL; 063A;;;;N;;;;; +1EE1C;ARABIC MATHEMATICAL DOTLESS BEH;Lo;0;AL; 066E;;;;N;;;;; +1EE1D;ARABIC MATHEMATICAL DOTLESS NOON;Lo;0;AL; 06BA;;;;N;;;;; +1EE1E;ARABIC MATHEMATICAL DOTLESS FEH;Lo;0;AL; 06A1;;;;N;;;;; +1EE1F;ARABIC MATHEMATICAL DOTLESS QAF;Lo;0;AL; 066F;;;;N;;;;; +1EE21;ARABIC MATHEMATICAL INITIAL BEH;Lo;0;AL; 0628;;;;N;;;;; +1EE22;ARABIC MATHEMATICAL INITIAL JEEM;Lo;0;AL; 062C;;;;N;;;;; +1EE24;ARABIC MATHEMATICAL INITIAL HEH;Lo;0;AL; 0647;;;;N;;;;; +1EE27;ARABIC MATHEMATICAL INITIAL HAH;Lo;0;AL; 062D;;;;N;;;;; +1EE29;ARABIC MATHEMATICAL INITIAL YEH;Lo;0;AL; 064A;;;;N;;;;; +1EE2A;ARABIC MATHEMATICAL INITIAL KAF;Lo;0;AL; 0643;;;;N;;;;; +1EE2B;ARABIC MATHEMATICAL INITIAL LAM;Lo;0;AL; 0644;;;;N;;;;; +1EE2C;ARABIC MATHEMATICAL INITIAL MEEM;Lo;0;AL; 0645;;;;N;;;;; +1EE2D;ARABIC MATHEMATICAL INITIAL NOON;Lo;0;AL; 0646;;;;N;;;;; +1EE2E;ARABIC MATHEMATICAL INITIAL SEEN;Lo;0;AL; 0633;;;;N;;;;; +1EE2F;ARABIC MATHEMATICAL INITIAL AIN;Lo;0;AL; 0639;;;;N;;;;; +1EE30;ARABIC MATHEMATICAL INITIAL FEH;Lo;0;AL; 0641;;;;N;;;;; +1EE31;ARABIC MATHEMATICAL INITIAL SAD;Lo;0;AL; 0635;;;;N;;;;; +1EE32;ARABIC MATHEMATICAL INITIAL QAF;Lo;0;AL; 0642;;;;N;;;;; +1EE34;ARABIC MATHEMATICAL INITIAL SHEEN;Lo;0;AL; 0634;;;;N;;;;; +1EE35;ARABIC MATHEMATICAL INITIAL TEH;Lo;0;AL; 062A;;;;N;;;;; +1EE36;ARABIC MATHEMATICAL INITIAL THEH;Lo;0;AL; 062B;;;;N;;;;; +1EE37;ARABIC MATHEMATICAL INITIAL KHAH;Lo;0;AL; 062E;;;;N;;;;; +1EE39;ARABIC MATHEMATICAL INITIAL DAD;Lo;0;AL; 0636;;;;N;;;;; +1EE3B;ARABIC MATHEMATICAL INITIAL GHAIN;Lo;0;AL; 063A;;;;N;;;;; +1EE42;ARABIC MATHEMATICAL TAILED JEEM;Lo;0;AL; 062C;;;;N;;;;; +1EE47;ARABIC MATHEMATICAL TAILED HAH;Lo;0;AL; 062D;;;;N;;;;; +1EE49;ARABIC MATHEMATICAL TAILED YEH;Lo;0;AL; 064A;;;;N;;;;; +1EE4B;ARABIC MATHEMATICAL TAILED LAM;Lo;0;AL; 0644;;;;N;;;;; +1EE4D;ARABIC MATHEMATICAL TAILED NOON;Lo;0;AL; 0646;;;;N;;;;; +1EE4E;ARABIC MATHEMATICAL TAILED SEEN;Lo;0;AL; 0633;;;;N;;;;; +1EE4F;ARABIC MATHEMATICAL TAILED AIN;Lo;0;AL; 0639;;;;N;;;;; +1EE51;ARABIC MATHEMATICAL TAILED SAD;Lo;0;AL; 0635;;;;N;;;;; +1EE52;ARABIC MATHEMATICAL TAILED QAF;Lo;0;AL; 0642;;;;N;;;;; +1EE54;ARABIC MATHEMATICAL TAILED SHEEN;Lo;0;AL; 0634;;;;N;;;;; +1EE57;ARABIC MATHEMATICAL TAILED KHAH;Lo;0;AL; 062E;;;;N;;;;; +1EE59;ARABIC MATHEMATICAL TAILED DAD;Lo;0;AL; 0636;;;;N;;;;; +1EE5B;ARABIC MATHEMATICAL TAILED GHAIN;Lo;0;AL; 063A;;;;N;;;;; +1EE5D;ARABIC MATHEMATICAL TAILED DOTLESS NOON;Lo;0;AL; 06BA;;;;N;;;;; +1EE5F;ARABIC MATHEMATICAL TAILED DOTLESS QAF;Lo;0;AL; 066F;;;;N;;;;; +1EE61;ARABIC MATHEMATICAL STRETCHED BEH;Lo;0;AL; 0628;;;;N;;;;; +1EE62;ARABIC MATHEMATICAL STRETCHED JEEM;Lo;0;AL; 062C;;;;N;;;;; +1EE64;ARABIC MATHEMATICAL STRETCHED HEH;Lo;0;AL; 0647;;;;N;;;;; +1EE67;ARABIC MATHEMATICAL STRETCHED HAH;Lo;0;AL; 062D;;;;N;;;;; +1EE68;ARABIC MATHEMATICAL STRETCHED TAH;Lo;0;AL; 0637;;;;N;;;;; +1EE69;ARABIC MATHEMATICAL STRETCHED YEH;Lo;0;AL; 064A;;;;N;;;;; +1EE6A;ARABIC MATHEMATICAL STRETCHED KAF;Lo;0;AL; 0643;;;;N;;;;; +1EE6C;ARABIC MATHEMATICAL STRETCHED MEEM;Lo;0;AL; 0645;;;;N;;;;; +1EE6D;ARABIC MATHEMATICAL STRETCHED NOON;Lo;0;AL; 0646;;;;N;;;;; +1EE6E;ARABIC MATHEMATICAL STRETCHED SEEN;Lo;0;AL; 0633;;;;N;;;;; +1EE6F;ARABIC MATHEMATICAL STRETCHED AIN;Lo;0;AL; 0639;;;;N;;;;; +1EE70;ARABIC MATHEMATICAL STRETCHED FEH;Lo;0;AL; 0641;;;;N;;;;; +1EE71;ARABIC MATHEMATICAL STRETCHED SAD;Lo;0;AL; 0635;;;;N;;;;; +1EE72;ARABIC MATHEMATICAL STRETCHED QAF;Lo;0;AL; 0642;;;;N;;;;; +1EE74;ARABIC MATHEMATICAL STRETCHED SHEEN;Lo;0;AL; 0634;;;;N;;;;; +1EE75;ARABIC MATHEMATICAL STRETCHED TEH;Lo;0;AL; 062A;;;;N;;;;; +1EE76;ARABIC MATHEMATICAL STRETCHED THEH;Lo;0;AL; 062B;;;;N;;;;; +1EE77;ARABIC MATHEMATICAL STRETCHED KHAH;Lo;0;AL; 062E;;;;N;;;;; +1EE79;ARABIC MATHEMATICAL STRETCHED DAD;Lo;0;AL; 0636;;;;N;;;;; +1EE7A;ARABIC MATHEMATICAL STRETCHED ZAH;Lo;0;AL; 0638;;;;N;;;;; +1EE7B;ARABIC MATHEMATICAL STRETCHED GHAIN;Lo;0;AL; 063A;;;;N;;;;; +1EE7C;ARABIC MATHEMATICAL STRETCHED DOTLESS BEH;Lo;0;AL; 066E;;;;N;;;;; +1EE7E;ARABIC MATHEMATICAL STRETCHED DOTLESS FEH;Lo;0;AL; 06A1;;;;N;;;;; +1EE80;ARABIC MATHEMATICAL LOOPED ALEF;Lo;0;AL; 0627;;;;N;;;;; +1EE81;ARABIC MATHEMATICAL LOOPED BEH;Lo;0;AL; 0628;;;;N;;;;; +1EE82;ARABIC MATHEMATICAL LOOPED JEEM;Lo;0;AL; 062C;;;;N;;;;; +1EE83;ARABIC MATHEMATICAL LOOPED DAL;Lo;0;AL; 062F;;;;N;;;;; +1EE84;ARABIC MATHEMATICAL LOOPED HEH;Lo;0;AL; 0647;;;;N;;;;; +1EE85;ARABIC MATHEMATICAL LOOPED WAW;Lo;0;AL; 0648;;;;N;;;;; +1EE86;ARABIC MATHEMATICAL LOOPED ZAIN;Lo;0;AL; 0632;;;;N;;;;; +1EE87;ARABIC MATHEMATICAL LOOPED HAH;Lo;0;AL; 062D;;;;N;;;;; +1EE88;ARABIC MATHEMATICAL LOOPED TAH;Lo;0;AL; 0637;;;;N;;;;; +1EE89;ARABIC MATHEMATICAL LOOPED YEH;Lo;0;AL; 064A;;;;N;;;;; +1EE8B;ARABIC MATHEMATICAL LOOPED LAM;Lo;0;AL; 0644;;;;N;;;;; +1EE8C;ARABIC MATHEMATICAL LOOPED MEEM;Lo;0;AL; 0645;;;;N;;;;; +1EE8D;ARABIC MATHEMATICAL LOOPED NOON;Lo;0;AL; 0646;;;;N;;;;; +1EE8E;ARABIC MATHEMATICAL LOOPED SEEN;Lo;0;AL; 0633;;;;N;;;;; +1EE8F;ARABIC MATHEMATICAL LOOPED AIN;Lo;0;AL; 0639;;;;N;;;;; +1EE90;ARABIC MATHEMATICAL LOOPED FEH;Lo;0;AL; 0641;;;;N;;;;; +1EE91;ARABIC MATHEMATICAL LOOPED SAD;Lo;0;AL; 0635;;;;N;;;;; +1EE92;ARABIC MATHEMATICAL LOOPED QAF;Lo;0;AL; 0642;;;;N;;;;; +1EE93;ARABIC MATHEMATICAL LOOPED REH;Lo;0;AL; 0631;;;;N;;;;; +1EE94;ARABIC MATHEMATICAL LOOPED SHEEN;Lo;0;AL; 0634;;;;N;;;;; +1EE95;ARABIC MATHEMATICAL LOOPED TEH;Lo;0;AL; 062A;;;;N;;;;; +1EE96;ARABIC MATHEMATICAL LOOPED THEH;Lo;0;AL; 062B;;;;N;;;;; +1EE97;ARABIC MATHEMATICAL LOOPED KHAH;Lo;0;AL; 062E;;;;N;;;;; +1EE98;ARABIC MATHEMATICAL LOOPED THAL;Lo;0;AL; 0630;;;;N;;;;; +1EE99;ARABIC MATHEMATICAL LOOPED DAD;Lo;0;AL; 0636;;;;N;;;;; +1EE9A;ARABIC MATHEMATICAL LOOPED ZAH;Lo;0;AL; 0638;;;;N;;;;; +1EE9B;ARABIC MATHEMATICAL LOOPED GHAIN;Lo;0;AL; 063A;;;;N;;;;; +1EEA1;ARABIC MATHEMATICAL DOUBLE-STRUCK BEH;Lo;0;AL; 0628;;;;N;;;;; +1EEA2;ARABIC MATHEMATICAL DOUBLE-STRUCK JEEM;Lo;0;AL; 062C;;;;N;;;;; +1EEA3;ARABIC MATHEMATICAL DOUBLE-STRUCK DAL;Lo;0;AL; 062F;;;;N;;;;; +1EEA5;ARABIC MATHEMATICAL DOUBLE-STRUCK WAW;Lo;0;AL; 0648;;;;N;;;;; +1EEA6;ARABIC MATHEMATICAL DOUBLE-STRUCK ZAIN;Lo;0;AL; 0632;;;;N;;;;; +1EEA7;ARABIC MATHEMATICAL DOUBLE-STRUCK HAH;Lo;0;AL; 062D;;;;N;;;;; +1EEA8;ARABIC MATHEMATICAL DOUBLE-STRUCK TAH;Lo;0;AL; 0637;;;;N;;;;; +1EEA9;ARABIC MATHEMATICAL DOUBLE-STRUCK YEH;Lo;0;AL; 064A;;;;N;;;;; +1EEAB;ARABIC MATHEMATICAL DOUBLE-STRUCK LAM;Lo;0;AL; 0644;;;;N;;;;; +1EEAC;ARABIC MATHEMATICAL DOUBLE-STRUCK MEEM;Lo;0;AL; 0645;;;;N;;;;; +1EEAD;ARABIC MATHEMATICAL DOUBLE-STRUCK NOON;Lo;0;AL; 0646;;;;N;;;;; +1EEAE;ARABIC MATHEMATICAL DOUBLE-STRUCK SEEN;Lo;0;AL; 0633;;;;N;;;;; +1EEAF;ARABIC MATHEMATICAL DOUBLE-STRUCK AIN;Lo;0;AL; 0639;;;;N;;;;; +1EEB0;ARABIC MATHEMATICAL DOUBLE-STRUCK FEH;Lo;0;AL; 0641;;;;N;;;;; +1EEB1;ARABIC MATHEMATICAL DOUBLE-STRUCK SAD;Lo;0;AL; 0635;;;;N;;;;; +1EEB2;ARABIC MATHEMATICAL DOUBLE-STRUCK QAF;Lo;0;AL; 0642;;;;N;;;;; +1EEB3;ARABIC MATHEMATICAL DOUBLE-STRUCK REH;Lo;0;AL; 0631;;;;N;;;;; +1EEB4;ARABIC MATHEMATICAL DOUBLE-STRUCK SHEEN;Lo;0;AL; 0634;;;;N;;;;; +1EEB5;ARABIC MATHEMATICAL DOUBLE-STRUCK TEH;Lo;0;AL; 062A;;;;N;;;;; +1EEB6;ARABIC MATHEMATICAL DOUBLE-STRUCK THEH;Lo;0;AL; 062B;;;;N;;;;; +1EEB7;ARABIC MATHEMATICAL DOUBLE-STRUCK KHAH;Lo;0;AL; 062E;;;;N;;;;; +1EEB8;ARABIC MATHEMATICAL DOUBLE-STRUCK THAL;Lo;0;AL; 0630;;;;N;;;;; +1EEB9;ARABIC MATHEMATICAL DOUBLE-STRUCK DAD;Lo;0;AL; 0636;;;;N;;;;; +1EEBA;ARABIC MATHEMATICAL DOUBLE-STRUCK ZAH;Lo;0;AL; 0638;;;;N;;;;; +1EEBB;ARABIC MATHEMATICAL DOUBLE-STRUCK GHAIN;Lo;0;AL; 063A;;;;N;;;;; +1EEF0;ARABIC MATHEMATICAL OPERATOR MEEM WITH HAH WITH TATWEEL;Sm;0;ON;;;;;N;;;;; +1EEF1;ARABIC MATHEMATICAL OPERATOR HAH WITH DAL;Sm;0;ON;;;;;N;;;;; +1F000;MAHJONG TILE EAST WIND;So;0;ON;;;;;N;;;;; +1F001;MAHJONG TILE SOUTH WIND;So;0;ON;;;;;N;;;;; +1F002;MAHJONG TILE WEST WIND;So;0;ON;;;;;N;;;;; +1F003;MAHJONG TILE NORTH WIND;So;0;ON;;;;;N;;;;; +1F004;MAHJONG TILE RED DRAGON;So;0;ON;;;;;N;;;;; +1F005;MAHJONG TILE GREEN DRAGON;So;0;ON;;;;;N;;;;; +1F006;MAHJONG TILE WHITE DRAGON;So;0;ON;;;;;N;;;;; +1F007;MAHJONG TILE ONE OF CHARACTERS;So;0;ON;;;;;N;;;;; +1F008;MAHJONG TILE TWO OF CHARACTERS;So;0;ON;;;;;N;;;;; +1F009;MAHJONG TILE THREE OF CHARACTERS;So;0;ON;;;;;N;;;;; +1F00A;MAHJONG TILE FOUR OF CHARACTERS;So;0;ON;;;;;N;;;;; +1F00B;MAHJONG TILE FIVE OF CHARACTERS;So;0;ON;;;;;N;;;;; +1F00C;MAHJONG TILE SIX OF CHARACTERS;So;0;ON;;;;;N;;;;; +1F00D;MAHJONG TILE SEVEN OF CHARACTERS;So;0;ON;;;;;N;;;;; +1F00E;MAHJONG TILE EIGHT OF CHARACTERS;So;0;ON;;;;;N;;;;; +1F00F;MAHJONG TILE NINE OF CHARACTERS;So;0;ON;;;;;N;;;;; +1F010;MAHJONG TILE ONE OF BAMBOOS;So;0;ON;;;;;N;;;;; +1F011;MAHJONG TILE TWO OF BAMBOOS;So;0;ON;;;;;N;;;;; +1F012;MAHJONG TILE THREE OF BAMBOOS;So;0;ON;;;;;N;;;;; +1F013;MAHJONG TILE FOUR OF BAMBOOS;So;0;ON;;;;;N;;;;; +1F014;MAHJONG TILE FIVE OF BAMBOOS;So;0;ON;;;;;N;;;;; +1F015;MAHJONG TILE SIX OF BAMBOOS;So;0;ON;;;;;N;;;;; +1F016;MAHJONG TILE SEVEN OF BAMBOOS;So;0;ON;;;;;N;;;;; +1F017;MAHJONG TILE EIGHT OF BAMBOOS;So;0;ON;;;;;N;;;;; +1F018;MAHJONG TILE NINE OF BAMBOOS;So;0;ON;;;;;N;;;;; +1F019;MAHJONG TILE ONE OF CIRCLES;So;0;ON;;;;;N;;;;; +1F01A;MAHJONG TILE TWO OF CIRCLES;So;0;ON;;;;;N;;;;; +1F01B;MAHJONG TILE THREE OF CIRCLES;So;0;ON;;;;;N;;;;; +1F01C;MAHJONG TILE FOUR OF CIRCLES;So;0;ON;;;;;N;;;;; +1F01D;MAHJONG TILE FIVE OF CIRCLES;So;0;ON;;;;;N;;;;; +1F01E;MAHJONG TILE SIX OF CIRCLES;So;0;ON;;;;;N;;;;; +1F01F;MAHJONG TILE SEVEN OF CIRCLES;So;0;ON;;;;;N;;;;; +1F020;MAHJONG TILE EIGHT OF CIRCLES;So;0;ON;;;;;N;;;;; +1F021;MAHJONG TILE NINE OF CIRCLES;So;0;ON;;;;;N;;;;; +1F022;MAHJONG TILE PLUM;So;0;ON;;;;;N;;;;; +1F023;MAHJONG TILE ORCHID;So;0;ON;;;;;N;;;;; +1F024;MAHJONG TILE BAMBOO;So;0;ON;;;;;N;;;;; +1F025;MAHJONG TILE CHRYSANTHEMUM;So;0;ON;;;;;N;;;;; +1F026;MAHJONG TILE SPRING;So;0;ON;;;;;N;;;;; +1F027;MAHJONG TILE SUMMER;So;0;ON;;;;;N;;;;; +1F028;MAHJONG TILE AUTUMN;So;0;ON;;;;;N;;;;; +1F029;MAHJONG TILE WINTER;So;0;ON;;;;;N;;;;; +1F02A;MAHJONG TILE JOKER;So;0;ON;;;;;N;;;;; +1F02B;MAHJONG TILE BACK;So;0;ON;;;;;N;;;;; +1F030;DOMINO TILE HORIZONTAL BACK;So;0;ON;;;;;N;;;;; +1F031;DOMINO TILE HORIZONTAL-00-00;So;0;ON;;;;;N;;;;; +1F032;DOMINO TILE HORIZONTAL-00-01;So;0;ON;;;;;N;;;;; +1F033;DOMINO TILE HORIZONTAL-00-02;So;0;ON;;;;;N;;;;; +1F034;DOMINO TILE HORIZONTAL-00-03;So;0;ON;;;;;N;;;;; +1F035;DOMINO TILE HORIZONTAL-00-04;So;0;ON;;;;;N;;;;; +1F036;DOMINO TILE HORIZONTAL-00-05;So;0;ON;;;;;N;;;;; +1F037;DOMINO TILE HORIZONTAL-00-06;So;0;ON;;;;;N;;;;; +1F038;DOMINO TILE HORIZONTAL-01-00;So;0;ON;;;;;N;;;;; +1F039;DOMINO TILE HORIZONTAL-01-01;So;0;ON;;;;;N;;;;; +1F03A;DOMINO TILE HORIZONTAL-01-02;So;0;ON;;;;;N;;;;; +1F03B;DOMINO TILE HORIZONTAL-01-03;So;0;ON;;;;;N;;;;; +1F03C;DOMINO TILE HORIZONTAL-01-04;So;0;ON;;;;;N;;;;; +1F03D;DOMINO TILE HORIZONTAL-01-05;So;0;ON;;;;;N;;;;; +1F03E;DOMINO TILE HORIZONTAL-01-06;So;0;ON;;;;;N;;;;; +1F03F;DOMINO TILE HORIZONTAL-02-00;So;0;ON;;;;;N;;;;; +1F040;DOMINO TILE HORIZONTAL-02-01;So;0;ON;;;;;N;;;;; +1F041;DOMINO TILE HORIZONTAL-02-02;So;0;ON;;;;;N;;;;; +1F042;DOMINO TILE HORIZONTAL-02-03;So;0;ON;;;;;N;;;;; +1F043;DOMINO TILE HORIZONTAL-02-04;So;0;ON;;;;;N;;;;; +1F044;DOMINO TILE HORIZONTAL-02-05;So;0;ON;;;;;N;;;;; +1F045;DOMINO TILE HORIZONTAL-02-06;So;0;ON;;;;;N;;;;; +1F046;DOMINO TILE HORIZONTAL-03-00;So;0;ON;;;;;N;;;;; +1F047;DOMINO TILE HORIZONTAL-03-01;So;0;ON;;;;;N;;;;; +1F048;DOMINO TILE HORIZONTAL-03-02;So;0;ON;;;;;N;;;;; +1F049;DOMINO TILE HORIZONTAL-03-03;So;0;ON;;;;;N;;;;; +1F04A;DOMINO TILE HORIZONTAL-03-04;So;0;ON;;;;;N;;;;; +1F04B;DOMINO TILE HORIZONTAL-03-05;So;0;ON;;;;;N;;;;; +1F04C;DOMINO TILE HORIZONTAL-03-06;So;0;ON;;;;;N;;;;; +1F04D;DOMINO TILE HORIZONTAL-04-00;So;0;ON;;;;;N;;;;; +1F04E;DOMINO TILE HORIZONTAL-04-01;So;0;ON;;;;;N;;;;; +1F04F;DOMINO TILE HORIZONTAL-04-02;So;0;ON;;;;;N;;;;; +1F050;DOMINO TILE HORIZONTAL-04-03;So;0;ON;;;;;N;;;;; +1F051;DOMINO TILE HORIZONTAL-04-04;So;0;ON;;;;;N;;;;; +1F052;DOMINO TILE HORIZONTAL-04-05;So;0;ON;;;;;N;;;;; +1F053;DOMINO TILE HORIZONTAL-04-06;So;0;ON;;;;;N;;;;; +1F054;DOMINO TILE HORIZONTAL-05-00;So;0;ON;;;;;N;;;;; +1F055;DOMINO TILE HORIZONTAL-05-01;So;0;ON;;;;;N;;;;; +1F056;DOMINO TILE HORIZONTAL-05-02;So;0;ON;;;;;N;;;;; +1F057;DOMINO TILE HORIZONTAL-05-03;So;0;ON;;;;;N;;;;; +1F058;DOMINO TILE HORIZONTAL-05-04;So;0;ON;;;;;N;;;;; +1F059;DOMINO TILE HORIZONTAL-05-05;So;0;ON;;;;;N;;;;; +1F05A;DOMINO TILE HORIZONTAL-05-06;So;0;ON;;;;;N;;;;; +1F05B;DOMINO TILE HORIZONTAL-06-00;So;0;ON;;;;;N;;;;; +1F05C;DOMINO TILE HORIZONTAL-06-01;So;0;ON;;;;;N;;;;; +1F05D;DOMINO TILE HORIZONTAL-06-02;So;0;ON;;;;;N;;;;; +1F05E;DOMINO TILE HORIZONTAL-06-03;So;0;ON;;;;;N;;;;; +1F05F;DOMINO TILE HORIZONTAL-06-04;So;0;ON;;;;;N;;;;; +1F060;DOMINO TILE HORIZONTAL-06-05;So;0;ON;;;;;N;;;;; +1F061;DOMINO TILE HORIZONTAL-06-06;So;0;ON;;;;;N;;;;; +1F062;DOMINO TILE VERTICAL BACK;So;0;ON;;;;;N;;;;; +1F063;DOMINO TILE VERTICAL-00-00;So;0;ON;;;;;N;;;;; +1F064;DOMINO TILE VERTICAL-00-01;So;0;ON;;;;;N;;;;; +1F065;DOMINO TILE VERTICAL-00-02;So;0;ON;;;;;N;;;;; +1F066;DOMINO TILE VERTICAL-00-03;So;0;ON;;;;;N;;;;; +1F067;DOMINO TILE VERTICAL-00-04;So;0;ON;;;;;N;;;;; +1F068;DOMINO TILE VERTICAL-00-05;So;0;ON;;;;;N;;;;; +1F069;DOMINO TILE VERTICAL-00-06;So;0;ON;;;;;N;;;;; +1F06A;DOMINO TILE VERTICAL-01-00;So;0;ON;;;;;N;;;;; +1F06B;DOMINO TILE VERTICAL-01-01;So;0;ON;;;;;N;;;;; +1F06C;DOMINO TILE VERTICAL-01-02;So;0;ON;;;;;N;;;;; +1F06D;DOMINO TILE VERTICAL-01-03;So;0;ON;;;;;N;;;;; +1F06E;DOMINO TILE VERTICAL-01-04;So;0;ON;;;;;N;;;;; +1F06F;DOMINO TILE VERTICAL-01-05;So;0;ON;;;;;N;;;;; +1F070;DOMINO TILE VERTICAL-01-06;So;0;ON;;;;;N;;;;; +1F071;DOMINO TILE VERTICAL-02-00;So;0;ON;;;;;N;;;;; +1F072;DOMINO TILE VERTICAL-02-01;So;0;ON;;;;;N;;;;; +1F073;DOMINO TILE VERTICAL-02-02;So;0;ON;;;;;N;;;;; +1F074;DOMINO TILE VERTICAL-02-03;So;0;ON;;;;;N;;;;; +1F075;DOMINO TILE VERTICAL-02-04;So;0;ON;;;;;N;;;;; +1F076;DOMINO TILE VERTICAL-02-05;So;0;ON;;;;;N;;;;; +1F077;DOMINO TILE VERTICAL-02-06;So;0;ON;;;;;N;;;;; +1F078;DOMINO TILE VERTICAL-03-00;So;0;ON;;;;;N;;;;; +1F079;DOMINO TILE VERTICAL-03-01;So;0;ON;;;;;N;;;;; +1F07A;DOMINO TILE VERTICAL-03-02;So;0;ON;;;;;N;;;;; +1F07B;DOMINO TILE VERTICAL-03-03;So;0;ON;;;;;N;;;;; +1F07C;DOMINO TILE VERTICAL-03-04;So;0;ON;;;;;N;;;;; +1F07D;DOMINO TILE VERTICAL-03-05;So;0;ON;;;;;N;;;;; +1F07E;DOMINO TILE VERTICAL-03-06;So;0;ON;;;;;N;;;;; +1F07F;DOMINO TILE VERTICAL-04-00;So;0;ON;;;;;N;;;;; +1F080;DOMINO TILE VERTICAL-04-01;So;0;ON;;;;;N;;;;; +1F081;DOMINO TILE VERTICAL-04-02;So;0;ON;;;;;N;;;;; +1F082;DOMINO TILE VERTICAL-04-03;So;0;ON;;;;;N;;;;; +1F083;DOMINO TILE VERTICAL-04-04;So;0;ON;;;;;N;;;;; +1F084;DOMINO TILE VERTICAL-04-05;So;0;ON;;;;;N;;;;; +1F085;DOMINO TILE VERTICAL-04-06;So;0;ON;;;;;N;;;;; +1F086;DOMINO TILE VERTICAL-05-00;So;0;ON;;;;;N;;;;; +1F087;DOMINO TILE VERTICAL-05-01;So;0;ON;;;;;N;;;;; +1F088;DOMINO TILE VERTICAL-05-02;So;0;ON;;;;;N;;;;; +1F089;DOMINO TILE VERTICAL-05-03;So;0;ON;;;;;N;;;;; +1F08A;DOMINO TILE VERTICAL-05-04;So;0;ON;;;;;N;;;;; +1F08B;DOMINO TILE VERTICAL-05-05;So;0;ON;;;;;N;;;;; +1F08C;DOMINO TILE VERTICAL-05-06;So;0;ON;;;;;N;;;;; +1F08D;DOMINO TILE VERTICAL-06-00;So;0;ON;;;;;N;;;;; +1F08E;DOMINO TILE VERTICAL-06-01;So;0;ON;;;;;N;;;;; +1F08F;DOMINO TILE VERTICAL-06-02;So;0;ON;;;;;N;;;;; +1F090;DOMINO TILE VERTICAL-06-03;So;0;ON;;;;;N;;;;; +1F091;DOMINO TILE VERTICAL-06-04;So;0;ON;;;;;N;;;;; +1F092;DOMINO TILE VERTICAL-06-05;So;0;ON;;;;;N;;;;; +1F093;DOMINO TILE VERTICAL-06-06;So;0;ON;;;;;N;;;;; +1F0A0;PLAYING CARD BACK;So;0;ON;;;;;N;;;;; +1F0A1;PLAYING CARD ACE OF SPADES;So;0;ON;;;;;N;;;;; +1F0A2;PLAYING CARD TWO OF SPADES;So;0;ON;;;;;N;;;;; +1F0A3;PLAYING CARD THREE OF SPADES;So;0;ON;;;;;N;;;;; +1F0A4;PLAYING CARD FOUR OF SPADES;So;0;ON;;;;;N;;;;; +1F0A5;PLAYING CARD FIVE OF SPADES;So;0;ON;;;;;N;;;;; +1F0A6;PLAYING CARD SIX OF SPADES;So;0;ON;;;;;N;;;;; +1F0A7;PLAYING CARD SEVEN OF SPADES;So;0;ON;;;;;N;;;;; +1F0A8;PLAYING CARD EIGHT OF SPADES;So;0;ON;;;;;N;;;;; +1F0A9;PLAYING CARD NINE OF SPADES;So;0;ON;;;;;N;;;;; +1F0AA;PLAYING CARD TEN OF SPADES;So;0;ON;;;;;N;;;;; +1F0AB;PLAYING CARD JACK OF SPADES;So;0;ON;;;;;N;;;;; +1F0AC;PLAYING CARD KNIGHT OF SPADES;So;0;ON;;;;;N;;;;; +1F0AD;PLAYING CARD QUEEN OF SPADES;So;0;ON;;;;;N;;;;; +1F0AE;PLAYING CARD KING OF SPADES;So;0;ON;;;;;N;;;;; +1F0B1;PLAYING CARD ACE OF HEARTS;So;0;ON;;;;;N;;;;; +1F0B2;PLAYING CARD TWO OF HEARTS;So;0;ON;;;;;N;;;;; +1F0B3;PLAYING CARD THREE OF HEARTS;So;0;ON;;;;;N;;;;; +1F0B4;PLAYING CARD FOUR OF HEARTS;So;0;ON;;;;;N;;;;; +1F0B5;PLAYING CARD FIVE OF HEARTS;So;0;ON;;;;;N;;;;; +1F0B6;PLAYING CARD SIX OF HEARTS;So;0;ON;;;;;N;;;;; +1F0B7;PLAYING CARD SEVEN OF HEARTS;So;0;ON;;;;;N;;;;; +1F0B8;PLAYING CARD EIGHT OF HEARTS;So;0;ON;;;;;N;;;;; +1F0B9;PLAYING CARD NINE OF HEARTS;So;0;ON;;;;;N;;;;; +1F0BA;PLAYING CARD TEN OF HEARTS;So;0;ON;;;;;N;;;;; +1F0BB;PLAYING CARD JACK OF HEARTS;So;0;ON;;;;;N;;;;; +1F0BC;PLAYING CARD KNIGHT OF HEARTS;So;0;ON;;;;;N;;;;; +1F0BD;PLAYING CARD QUEEN OF HEARTS;So;0;ON;;;;;N;;;;; +1F0BE;PLAYING CARD KING OF HEARTS;So;0;ON;;;;;N;;;;; +1F0BF;PLAYING CARD RED JOKER;So;0;ON;;;;;N;;;;; +1F0C1;PLAYING CARD ACE OF DIAMONDS;So;0;ON;;;;;N;;;;; +1F0C2;PLAYING CARD TWO OF DIAMONDS;So;0;ON;;;;;N;;;;; +1F0C3;PLAYING CARD THREE OF DIAMONDS;So;0;ON;;;;;N;;;;; +1F0C4;PLAYING CARD FOUR OF DIAMONDS;So;0;ON;;;;;N;;;;; +1F0C5;PLAYING CARD FIVE OF DIAMONDS;So;0;ON;;;;;N;;;;; +1F0C6;PLAYING CARD SIX OF DIAMONDS;So;0;ON;;;;;N;;;;; +1F0C7;PLAYING CARD SEVEN OF DIAMONDS;So;0;ON;;;;;N;;;;; +1F0C8;PLAYING CARD EIGHT OF DIAMONDS;So;0;ON;;;;;N;;;;; +1F0C9;PLAYING CARD NINE OF DIAMONDS;So;0;ON;;;;;N;;;;; +1F0CA;PLAYING CARD TEN OF DIAMONDS;So;0;ON;;;;;N;;;;; +1F0CB;PLAYING CARD JACK OF DIAMONDS;So;0;ON;;;;;N;;;;; +1F0CC;PLAYING CARD KNIGHT OF DIAMONDS;So;0;ON;;;;;N;;;;; +1F0CD;PLAYING CARD QUEEN OF DIAMONDS;So;0;ON;;;;;N;;;;; +1F0CE;PLAYING CARD KING OF DIAMONDS;So;0;ON;;;;;N;;;;; +1F0CF;PLAYING CARD BLACK JOKER;So;0;ON;;;;;N;;;;; +1F0D1;PLAYING CARD ACE OF CLUBS;So;0;ON;;;;;N;;;;; +1F0D2;PLAYING CARD TWO OF CLUBS;So;0;ON;;;;;N;;;;; +1F0D3;PLAYING CARD THREE OF CLUBS;So;0;ON;;;;;N;;;;; +1F0D4;PLAYING CARD FOUR OF CLUBS;So;0;ON;;;;;N;;;;; +1F0D5;PLAYING CARD FIVE OF CLUBS;So;0;ON;;;;;N;;;;; +1F0D6;PLAYING CARD SIX OF CLUBS;So;0;ON;;;;;N;;;;; +1F0D7;PLAYING CARD SEVEN OF CLUBS;So;0;ON;;;;;N;;;;; +1F0D8;PLAYING CARD EIGHT OF CLUBS;So;0;ON;;;;;N;;;;; +1F0D9;PLAYING CARD NINE OF CLUBS;So;0;ON;;;;;N;;;;; +1F0DA;PLAYING CARD TEN OF CLUBS;So;0;ON;;;;;N;;;;; +1F0DB;PLAYING CARD JACK OF CLUBS;So;0;ON;;;;;N;;;;; +1F0DC;PLAYING CARD KNIGHT OF CLUBS;So;0;ON;;;;;N;;;;; +1F0DD;PLAYING CARD QUEEN OF CLUBS;So;0;ON;;;;;N;;;;; +1F0DE;PLAYING CARD KING OF CLUBS;So;0;ON;;;;;N;;;;; +1F0DF;PLAYING CARD WHITE JOKER;So;0;ON;;;;;N;;;;; +1F0E0;PLAYING CARD FOOL;So;0;ON;;;;;N;;;;; +1F0E1;PLAYING CARD TRUMP-1;So;0;ON;;;;;N;;;;; +1F0E2;PLAYING CARD TRUMP-2;So;0;ON;;;;;N;;;;; +1F0E3;PLAYING CARD TRUMP-3;So;0;ON;;;;;N;;;;; +1F0E4;PLAYING CARD TRUMP-4;So;0;ON;;;;;N;;;;; +1F0E5;PLAYING CARD TRUMP-5;So;0;ON;;;;;N;;;;; +1F0E6;PLAYING CARD TRUMP-6;So;0;ON;;;;;N;;;;; +1F0E7;PLAYING CARD TRUMP-7;So;0;ON;;;;;N;;;;; +1F0E8;PLAYING CARD TRUMP-8;So;0;ON;;;;;N;;;;; +1F0E9;PLAYING CARD TRUMP-9;So;0;ON;;;;;N;;;;; +1F0EA;PLAYING CARD TRUMP-10;So;0;ON;;;;;N;;;;; +1F0EB;PLAYING CARD TRUMP-11;So;0;ON;;;;;N;;;;; +1F0EC;PLAYING CARD TRUMP-12;So;0;ON;;;;;N;;;;; +1F0ED;PLAYING CARD TRUMP-13;So;0;ON;;;;;N;;;;; +1F0EE;PLAYING CARD TRUMP-14;So;0;ON;;;;;N;;;;; +1F0EF;PLAYING CARD TRUMP-15;So;0;ON;;;;;N;;;;; +1F0F0;PLAYING CARD TRUMP-16;So;0;ON;;;;;N;;;;; +1F0F1;PLAYING CARD TRUMP-17;So;0;ON;;;;;N;;;;; +1F0F2;PLAYING CARD TRUMP-18;So;0;ON;;;;;N;;;;; +1F0F3;PLAYING CARD TRUMP-19;So;0;ON;;;;;N;;;;; +1F0F4;PLAYING CARD TRUMP-20;So;0;ON;;;;;N;;;;; +1F0F5;PLAYING CARD TRUMP-21;So;0;ON;;;;;N;;;;; +1F100;DIGIT ZERO FULL STOP;No;0;EN; 0030 002E;;0;0;N;;;;; +1F101;DIGIT ZERO COMMA;No;0;EN; 0030 002C;;0;0;N;;;;; +1F102;DIGIT ONE COMMA;No;0;EN; 0031 002C;;1;1;N;;;;; +1F103;DIGIT TWO COMMA;No;0;EN; 0032 002C;;2;2;N;;;;; +1F104;DIGIT THREE COMMA;No;0;EN; 0033 002C;;3;3;N;;;;; +1F105;DIGIT FOUR COMMA;No;0;EN; 0034 002C;;4;4;N;;;;; +1F106;DIGIT FIVE COMMA;No;0;EN; 0035 002C;;5;5;N;;;;; +1F107;DIGIT SIX COMMA;No;0;EN; 0036 002C;;6;6;N;;;;; +1F108;DIGIT SEVEN COMMA;No;0;EN; 0037 002C;;7;7;N;;;;; +1F109;DIGIT EIGHT COMMA;No;0;EN; 0038 002C;;8;8;N;;;;; +1F10A;DIGIT NINE COMMA;No;0;EN; 0039 002C;;9;9;N;;;;; +1F10B;DINGBAT CIRCLED SANS-SERIF DIGIT ZERO;No;0;ON;;;;0;N;;;;; +1F10C;DINGBAT NEGATIVE CIRCLED SANS-SERIF DIGIT ZERO;No;0;ON;;;;0;N;;;;; +1F110;PARENTHESIZED LATIN CAPITAL LETTER A;So;0;L; 0028 0041 0029;;;;N;;;;; +1F111;PARENTHESIZED LATIN CAPITAL LETTER B;So;0;L; 0028 0042 0029;;;;N;;;;; +1F112;PARENTHESIZED LATIN CAPITAL LETTER C;So;0;L; 0028 0043 0029;;;;N;;;;; +1F113;PARENTHESIZED LATIN CAPITAL LETTER D;So;0;L; 0028 0044 0029;;;;N;;;;; +1F114;PARENTHESIZED LATIN CAPITAL LETTER E;So;0;L; 0028 0045 0029;;;;N;;;;; +1F115;PARENTHESIZED LATIN CAPITAL LETTER F;So;0;L; 0028 0046 0029;;;;N;;;;; +1F116;PARENTHESIZED LATIN CAPITAL LETTER G;So;0;L; 0028 0047 0029;;;;N;;;;; +1F117;PARENTHESIZED LATIN CAPITAL LETTER H;So;0;L; 0028 0048 0029;;;;N;;;;; +1F118;PARENTHESIZED LATIN CAPITAL LETTER I;So;0;L; 0028 0049 0029;;;;N;;;;; +1F119;PARENTHESIZED LATIN CAPITAL LETTER J;So;0;L; 0028 004A 0029;;;;N;;;;; +1F11A;PARENTHESIZED LATIN CAPITAL LETTER K;So;0;L; 0028 004B 0029;;;;N;;;;; +1F11B;PARENTHESIZED LATIN CAPITAL LETTER L;So;0;L; 0028 004C 0029;;;;N;;;;; +1F11C;PARENTHESIZED LATIN CAPITAL LETTER M;So;0;L; 0028 004D 0029;;;;N;;;;; +1F11D;PARENTHESIZED LATIN CAPITAL LETTER N;So;0;L; 0028 004E 0029;;;;N;;;;; +1F11E;PARENTHESIZED LATIN CAPITAL LETTER O;So;0;L; 0028 004F 0029;;;;N;;;;; +1F11F;PARENTHESIZED LATIN CAPITAL LETTER P;So;0;L; 0028 0050 0029;;;;N;;;;; +1F120;PARENTHESIZED LATIN CAPITAL LETTER Q;So;0;L; 0028 0051 0029;;;;N;;;;; +1F121;PARENTHESIZED LATIN CAPITAL LETTER R;So;0;L; 0028 0052 0029;;;;N;;;;; +1F122;PARENTHESIZED LATIN CAPITAL LETTER S;So;0;L; 0028 0053 0029;;;;N;;;;; +1F123;PARENTHESIZED LATIN CAPITAL LETTER T;So;0;L; 0028 0054 0029;;;;N;;;;; +1F124;PARENTHESIZED LATIN CAPITAL LETTER U;So;0;L; 0028 0055 0029;;;;N;;;;; +1F125;PARENTHESIZED LATIN CAPITAL LETTER V;So;0;L; 0028 0056 0029;;;;N;;;;; +1F126;PARENTHESIZED LATIN CAPITAL LETTER W;So;0;L; 0028 0057 0029;;;;N;;;;; +1F127;PARENTHESIZED LATIN CAPITAL LETTER X;So;0;L; 0028 0058 0029;;;;N;;;;; +1F128;PARENTHESIZED LATIN CAPITAL LETTER Y;So;0;L; 0028 0059 0029;;;;N;;;;; +1F129;PARENTHESIZED LATIN CAPITAL LETTER Z;So;0;L; 0028 005A 0029;;;;N;;;;; +1F12A;TORTOISE SHELL BRACKETED LATIN CAPITAL LETTER S;So;0;L; 3014 0053 3015;;;;N;;;;; +1F12B;CIRCLED ITALIC LATIN CAPITAL LETTER C;So;0;L; 0043;;;;N;;;;; +1F12C;CIRCLED ITALIC LATIN CAPITAL LETTER R;So;0;L; 0052;;;;N;;;;; +1F12D;CIRCLED CD;So;0;L; 0043 0044;;;;N;;;;; +1F12E;CIRCLED WZ;So;0;L; 0057 005A;;;;N;;;;; +1F12F;COPYLEFT SYMBOL;So;0;ON;;;;;N;;;;; +1F130;SQUARED LATIN CAPITAL LETTER A;So;0;L; 0041;;;;N;;;;; +1F131;SQUARED LATIN CAPITAL LETTER B;So;0;L; 0042;;;;N;;;;; +1F132;SQUARED LATIN CAPITAL LETTER C;So;0;L; 0043;;;;N;;;;; +1F133;SQUARED LATIN CAPITAL LETTER D;So;0;L; 0044;;;;N;;;;; +1F134;SQUARED LATIN CAPITAL LETTER E;So;0;L; 0045;;;;N;;;;; +1F135;SQUARED LATIN CAPITAL LETTER F;So;0;L; 0046;;;;N;;;;; +1F136;SQUARED LATIN CAPITAL LETTER G;So;0;L; 0047;;;;N;;;;; +1F137;SQUARED LATIN CAPITAL LETTER H;So;0;L; 0048;;;;N;;;;; +1F138;SQUARED LATIN CAPITAL LETTER I;So;0;L; 0049;;;;N;;;;; +1F139;SQUARED LATIN CAPITAL LETTER J;So;0;L; 004A;;;;N;;;;; +1F13A;SQUARED LATIN CAPITAL LETTER K;So;0;L; 004B;;;;N;;;;; +1F13B;SQUARED LATIN CAPITAL LETTER L;So;0;L; 004C;;;;N;;;;; +1F13C;SQUARED LATIN CAPITAL LETTER M;So;0;L; 004D;;;;N;;;;; +1F13D;SQUARED LATIN CAPITAL LETTER N;So;0;L; 004E;;;;N;;;;; +1F13E;SQUARED LATIN CAPITAL LETTER O;So;0;L; 004F;;;;N;;;;; +1F13F;SQUARED LATIN CAPITAL LETTER P;So;0;L; 0050;;;;N;;;;; +1F140;SQUARED LATIN CAPITAL LETTER Q;So;0;L; 0051;;;;N;;;;; +1F141;SQUARED LATIN CAPITAL LETTER R;So;0;L; 0052;;;;N;;;;; +1F142;SQUARED LATIN CAPITAL LETTER S;So;0;L; 0053;;;;N;;;;; +1F143;SQUARED LATIN CAPITAL LETTER T;So;0;L; 0054;;;;N;;;;; +1F144;SQUARED LATIN CAPITAL LETTER U;So;0;L; 0055;;;;N;;;;; +1F145;SQUARED LATIN CAPITAL LETTER V;So;0;L; 0056;;;;N;;;;; +1F146;SQUARED LATIN CAPITAL LETTER W;So;0;L; 0057;;;;N;;;;; +1F147;SQUARED LATIN CAPITAL LETTER X;So;0;L; 0058;;;;N;;;;; +1F148;SQUARED LATIN CAPITAL LETTER Y;So;0;L; 0059;;;;N;;;;; +1F149;SQUARED LATIN CAPITAL LETTER Z;So;0;L; 005A;;;;N;;;;; +1F14A;SQUARED HV;So;0;L; 0048 0056;;;;N;;;;; +1F14B;SQUARED MV;So;0;L; 004D 0056;;;;N;;;;; +1F14C;SQUARED SD;So;0;L; 0053 0044;;;;N;;;;; +1F14D;SQUARED SS;So;0;L; 0053 0053;;;;N;;;;; +1F14E;SQUARED PPV;So;0;L; 0050 0050 0056;;;;N;;;;; +1F14F;SQUARED WC;So;0;L; 0057 0043;;;;N;;;;; +1F150;NEGATIVE CIRCLED LATIN CAPITAL LETTER A;So;0;L;;;;;N;;;;; +1F151;NEGATIVE CIRCLED LATIN CAPITAL LETTER B;So;0;L;;;;;N;;;;; +1F152;NEGATIVE CIRCLED LATIN CAPITAL LETTER C;So;0;L;;;;;N;;;;; +1F153;NEGATIVE CIRCLED LATIN CAPITAL LETTER D;So;0;L;;;;;N;;;;; +1F154;NEGATIVE CIRCLED LATIN CAPITAL LETTER E;So;0;L;;;;;N;;;;; +1F155;NEGATIVE CIRCLED LATIN CAPITAL LETTER F;So;0;L;;;;;N;;;;; +1F156;NEGATIVE CIRCLED LATIN CAPITAL LETTER G;So;0;L;;;;;N;;;;; +1F157;NEGATIVE CIRCLED LATIN CAPITAL LETTER H;So;0;L;;;;;N;;;;; +1F158;NEGATIVE CIRCLED LATIN CAPITAL LETTER I;So;0;L;;;;;N;;;;; +1F159;NEGATIVE CIRCLED LATIN CAPITAL LETTER J;So;0;L;;;;;N;;;;; +1F15A;NEGATIVE CIRCLED LATIN CAPITAL LETTER K;So;0;L;;;;;N;;;;; +1F15B;NEGATIVE CIRCLED LATIN CAPITAL LETTER L;So;0;L;;;;;N;;;;; +1F15C;NEGATIVE CIRCLED LATIN CAPITAL LETTER M;So;0;L;;;;;N;;;;; +1F15D;NEGATIVE CIRCLED LATIN CAPITAL LETTER N;So;0;L;;;;;N;;;;; +1F15E;NEGATIVE CIRCLED LATIN CAPITAL LETTER O;So;0;L;;;;;N;;;;; +1F15F;NEGATIVE CIRCLED LATIN CAPITAL LETTER P;So;0;L;;;;;N;;;;; +1F160;NEGATIVE CIRCLED LATIN CAPITAL LETTER Q;So;0;L;;;;;N;;;;; +1F161;NEGATIVE CIRCLED LATIN CAPITAL LETTER R;So;0;L;;;;;N;;;;; +1F162;NEGATIVE CIRCLED LATIN CAPITAL LETTER S;So;0;L;;;;;N;;;;; +1F163;NEGATIVE CIRCLED LATIN CAPITAL LETTER T;So;0;L;;;;;N;;;;; +1F164;NEGATIVE CIRCLED LATIN CAPITAL LETTER U;So;0;L;;;;;N;;;;; +1F165;NEGATIVE CIRCLED LATIN CAPITAL LETTER V;So;0;L;;;;;N;;;;; +1F166;NEGATIVE CIRCLED LATIN CAPITAL LETTER W;So;0;L;;;;;N;;;;; +1F167;NEGATIVE CIRCLED LATIN CAPITAL LETTER X;So;0;L;;;;;N;;;;; +1F168;NEGATIVE CIRCLED LATIN CAPITAL LETTER Y;So;0;L;;;;;N;;;;; +1F169;NEGATIVE CIRCLED LATIN CAPITAL LETTER Z;So;0;L;;;;;N;;;;; +1F16A;RAISED MC SIGN;So;0;ON; 004D 0043;;;;N;;;;; +1F16B;RAISED MD SIGN;So;0;ON; 004D 0044;;;;N;;;;; +1F16C;RAISED MR SIGN;So;0;ON; 004D 0052;;;;N;;;;; +1F170;NEGATIVE SQUARED LATIN CAPITAL LETTER A;So;0;L;;;;;N;;;;; +1F171;NEGATIVE SQUARED LATIN CAPITAL LETTER B;So;0;L;;;;;N;;;;; +1F172;NEGATIVE SQUARED LATIN CAPITAL LETTER C;So;0;L;;;;;N;;;;; +1F173;NEGATIVE SQUARED LATIN CAPITAL LETTER D;So;0;L;;;;;N;;;;; +1F174;NEGATIVE SQUARED LATIN CAPITAL LETTER E;So;0;L;;;;;N;;;;; +1F175;NEGATIVE SQUARED LATIN CAPITAL LETTER F;So;0;L;;;;;N;;;;; +1F176;NEGATIVE SQUARED LATIN CAPITAL LETTER G;So;0;L;;;;;N;;;;; +1F177;NEGATIVE SQUARED LATIN CAPITAL LETTER H;So;0;L;;;;;N;;;;; +1F178;NEGATIVE SQUARED LATIN CAPITAL LETTER I;So;0;L;;;;;N;;;;; +1F179;NEGATIVE SQUARED LATIN CAPITAL LETTER J;So;0;L;;;;;N;;;;; +1F17A;NEGATIVE SQUARED LATIN CAPITAL LETTER K;So;0;L;;;;;N;;;;; +1F17B;NEGATIVE SQUARED LATIN CAPITAL LETTER L;So;0;L;;;;;N;;;;; +1F17C;NEGATIVE SQUARED LATIN CAPITAL LETTER M;So;0;L;;;;;N;;;;; +1F17D;NEGATIVE SQUARED LATIN CAPITAL LETTER N;So;0;L;;;;;N;;;;; +1F17E;NEGATIVE SQUARED LATIN CAPITAL LETTER O;So;0;L;;;;;N;;;;; +1F17F;NEGATIVE SQUARED LATIN CAPITAL LETTER P;So;0;L;;;;;N;;;;; +1F180;NEGATIVE SQUARED LATIN CAPITAL LETTER Q;So;0;L;;;;;N;;;;; +1F181;NEGATIVE SQUARED LATIN CAPITAL LETTER R;So;0;L;;;;;N;;;;; +1F182;NEGATIVE SQUARED LATIN CAPITAL LETTER S;So;0;L;;;;;N;;;;; +1F183;NEGATIVE SQUARED LATIN CAPITAL LETTER T;So;0;L;;;;;N;;;;; +1F184;NEGATIVE SQUARED LATIN CAPITAL LETTER U;So;0;L;;;;;N;;;;; +1F185;NEGATIVE SQUARED LATIN CAPITAL LETTER V;So;0;L;;;;;N;;;;; +1F186;NEGATIVE SQUARED LATIN CAPITAL LETTER W;So;0;L;;;;;N;;;;; +1F187;NEGATIVE SQUARED LATIN CAPITAL LETTER X;So;0;L;;;;;N;;;;; +1F188;NEGATIVE SQUARED LATIN CAPITAL LETTER Y;So;0;L;;;;;N;;;;; +1F189;NEGATIVE SQUARED LATIN CAPITAL LETTER Z;So;0;L;;;;;N;;;;; +1F18A;CROSSED NEGATIVE SQUARED LATIN CAPITAL LETTER P;So;0;L;;;;;N;;;;; +1F18B;NEGATIVE SQUARED IC;So;0;L;;;;;N;;;;; +1F18C;NEGATIVE SQUARED PA;So;0;L;;;;;N;;;;; +1F18D;NEGATIVE SQUARED SA;So;0;L;;;;;N;;;;; +1F18E;NEGATIVE SQUARED AB;So;0;L;;;;;N;;;;; +1F18F;NEGATIVE SQUARED WC;So;0;L;;;;;N;;;;; +1F190;SQUARE DJ;So;0;L; 0044 004A;;;;N;;;;; +1F191;SQUARED CL;So;0;L;;;;;N;;;;; +1F192;SQUARED COOL;So;0;L;;;;;N;;;;; +1F193;SQUARED FREE;So;0;L;;;;;N;;;;; +1F194;SQUARED ID;So;0;L;;;;;N;;;;; +1F195;SQUARED NEW;So;0;L;;;;;N;;;;; +1F196;SQUARED NG;So;0;L;;;;;N;;;;; +1F197;SQUARED OK;So;0;L;;;;;N;;;;; +1F198;SQUARED SOS;So;0;L;;;;;N;;;;; +1F199;SQUARED UP WITH EXCLAMATION MARK;So;0;L;;;;;N;;;;; +1F19A;SQUARED VS;So;0;L;;;;;N;;;;; +1F19B;SQUARED THREE D;So;0;L;;;;;N;;;;; +1F19C;SQUARED SECOND SCREEN;So;0;L;;;;;N;;;;; +1F19D;SQUARED TWO K;So;0;L;;;;;N;;;;; +1F19E;SQUARED FOUR K;So;0;L;;;;;N;;;;; +1F19F;SQUARED EIGHT K;So;0;L;;;;;N;;;;; +1F1A0;SQUARED FIVE POINT ONE;So;0;L;;;;;N;;;;; +1F1A1;SQUARED SEVEN POINT ONE;So;0;L;;;;;N;;;;; +1F1A2;SQUARED TWENTY-TWO POINT TWO;So;0;L;;;;;N;;;;; +1F1A3;SQUARED SIXTY P;So;0;L;;;;;N;;;;; +1F1A4;SQUARED ONE HUNDRED TWENTY P;So;0;L;;;;;N;;;;; +1F1A5;SQUARED LATIN SMALL LETTER D;So;0;L;;;;;N;;;;; +1F1A6;SQUARED HC;So;0;L;;;;;N;;;;; +1F1A7;SQUARED HDR;So;0;L;;;;;N;;;;; +1F1A8;SQUARED HI-RES;So;0;L;;;;;N;;;;; +1F1A9;SQUARED LOSSLESS;So;0;L;;;;;N;;;;; +1F1AA;SQUARED SHV;So;0;L;;;;;N;;;;; +1F1AB;SQUARED UHD;So;0;L;;;;;N;;;;; +1F1AC;SQUARED VOD;So;0;L;;;;;N;;;;; +1F1E6;REGIONAL INDICATOR SYMBOL LETTER A;So;0;L;;;;;N;;;;; +1F1E7;REGIONAL INDICATOR SYMBOL LETTER B;So;0;L;;;;;N;;;;; +1F1E8;REGIONAL INDICATOR SYMBOL LETTER C;So;0;L;;;;;N;;;;; +1F1E9;REGIONAL INDICATOR SYMBOL LETTER D;So;0;L;;;;;N;;;;; +1F1EA;REGIONAL INDICATOR SYMBOL LETTER E;So;0;L;;;;;N;;;;; +1F1EB;REGIONAL INDICATOR SYMBOL LETTER F;So;0;L;;;;;N;;;;; +1F1EC;REGIONAL INDICATOR SYMBOL LETTER G;So;0;L;;;;;N;;;;; +1F1ED;REGIONAL INDICATOR SYMBOL LETTER H;So;0;L;;;;;N;;;;; +1F1EE;REGIONAL INDICATOR SYMBOL LETTER I;So;0;L;;;;;N;;;;; +1F1EF;REGIONAL INDICATOR SYMBOL LETTER J;So;0;L;;;;;N;;;;; +1F1F0;REGIONAL INDICATOR SYMBOL LETTER K;So;0;L;;;;;N;;;;; +1F1F1;REGIONAL INDICATOR SYMBOL LETTER L;So;0;L;;;;;N;;;;; +1F1F2;REGIONAL INDICATOR SYMBOL LETTER M;So;0;L;;;;;N;;;;; +1F1F3;REGIONAL INDICATOR SYMBOL LETTER N;So;0;L;;;;;N;;;;; +1F1F4;REGIONAL INDICATOR SYMBOL LETTER O;So;0;L;;;;;N;;;;; +1F1F5;REGIONAL INDICATOR SYMBOL LETTER P;So;0;L;;;;;N;;;;; +1F1F6;REGIONAL INDICATOR SYMBOL LETTER Q;So;0;L;;;;;N;;;;; +1F1F7;REGIONAL INDICATOR SYMBOL LETTER R;So;0;L;;;;;N;;;;; +1F1F8;REGIONAL INDICATOR SYMBOL LETTER S;So;0;L;;;;;N;;;;; +1F1F9;REGIONAL INDICATOR SYMBOL LETTER T;So;0;L;;;;;N;;;;; +1F1FA;REGIONAL INDICATOR SYMBOL LETTER U;So;0;L;;;;;N;;;;; +1F1FB;REGIONAL INDICATOR SYMBOL LETTER V;So;0;L;;;;;N;;;;; +1F1FC;REGIONAL INDICATOR SYMBOL LETTER W;So;0;L;;;;;N;;;;; +1F1FD;REGIONAL INDICATOR SYMBOL LETTER X;So;0;L;;;;;N;;;;; +1F1FE;REGIONAL INDICATOR SYMBOL LETTER Y;So;0;L;;;;;N;;;;; +1F1FF;REGIONAL INDICATOR SYMBOL LETTER Z;So;0;L;;;;;N;;;;; +1F200;SQUARE HIRAGANA HOKA;So;0;L; 307B 304B;;;;N;;;;; +1F201;SQUARED KATAKANA KOKO;So;0;L; 30B3 30B3;;;;N;;;;; +1F202;SQUARED KATAKANA SA;So;0;L; 30B5;;;;N;;;;; +1F210;SQUARED CJK UNIFIED IDEOGRAPH-624B;So;0;L; 624B;;;;N;;;;; +1F211;SQUARED CJK UNIFIED IDEOGRAPH-5B57;So;0;L; 5B57;;;;N;;;;; +1F212;SQUARED CJK UNIFIED IDEOGRAPH-53CC;So;0;L; 53CC;;;;N;;;;; +1F213;SQUARED KATAKANA DE;So;0;L; 30C7;;;;N;;;;; +1F214;SQUARED CJK UNIFIED IDEOGRAPH-4E8C;So;0;L; 4E8C;;;;N;;;;; +1F215;SQUARED CJK UNIFIED IDEOGRAPH-591A;So;0;L; 591A;;;;N;;;;; +1F216;SQUARED CJK UNIFIED IDEOGRAPH-89E3;So;0;L; 89E3;;;;N;;;;; +1F217;SQUARED CJK UNIFIED IDEOGRAPH-5929;So;0;L; 5929;;;;N;;;;; +1F218;SQUARED CJK UNIFIED IDEOGRAPH-4EA4;So;0;L; 4EA4;;;;N;;;;; +1F219;SQUARED CJK UNIFIED IDEOGRAPH-6620;So;0;L; 6620;;;;N;;;;; +1F21A;SQUARED CJK UNIFIED IDEOGRAPH-7121;So;0;L; 7121;;;;N;;;;; +1F21B;SQUARED CJK UNIFIED IDEOGRAPH-6599;So;0;L; 6599;;;;N;;;;; +1F21C;SQUARED CJK UNIFIED IDEOGRAPH-524D;So;0;L; 524D;;;;N;;;;; +1F21D;SQUARED CJK UNIFIED IDEOGRAPH-5F8C;So;0;L; 5F8C;;;;N;;;;; +1F21E;SQUARED CJK UNIFIED IDEOGRAPH-518D;So;0;L; 518D;;;;N;;;;; +1F21F;SQUARED CJK UNIFIED IDEOGRAPH-65B0;So;0;L; 65B0;;;;N;;;;; +1F220;SQUARED CJK UNIFIED IDEOGRAPH-521D;So;0;L; 521D;;;;N;;;;; +1F221;SQUARED CJK UNIFIED IDEOGRAPH-7D42;So;0;L; 7D42;;;;N;;;;; +1F222;SQUARED CJK UNIFIED IDEOGRAPH-751F;So;0;L; 751F;;;;N;;;;; +1F223;SQUARED CJK UNIFIED IDEOGRAPH-8CA9;So;0;L; 8CA9;;;;N;;;;; +1F224;SQUARED CJK UNIFIED IDEOGRAPH-58F0;So;0;L; 58F0;;;;N;;;;; +1F225;SQUARED CJK UNIFIED IDEOGRAPH-5439;So;0;L; 5439;;;;N;;;;; +1F226;SQUARED CJK UNIFIED IDEOGRAPH-6F14;So;0;L; 6F14;;;;N;;;;; +1F227;SQUARED CJK UNIFIED IDEOGRAPH-6295;So;0;L; 6295;;;;N;;;;; +1F228;SQUARED CJK UNIFIED IDEOGRAPH-6355;So;0;L; 6355;;;;N;;;;; +1F229;SQUARED CJK UNIFIED IDEOGRAPH-4E00;So;0;L; 4E00;;;;N;;;;; +1F22A;SQUARED CJK UNIFIED IDEOGRAPH-4E09;So;0;L; 4E09;;;;N;;;;; +1F22B;SQUARED CJK UNIFIED IDEOGRAPH-904A;So;0;L; 904A;;;;N;;;;; +1F22C;SQUARED CJK UNIFIED IDEOGRAPH-5DE6;So;0;L; 5DE6;;;;N;;;;; +1F22D;SQUARED CJK UNIFIED IDEOGRAPH-4E2D;So;0;L; 4E2D;;;;N;;;;; +1F22E;SQUARED CJK UNIFIED IDEOGRAPH-53F3;So;0;L; 53F3;;;;N;;;;; +1F22F;SQUARED CJK UNIFIED IDEOGRAPH-6307;So;0;L; 6307;;;;N;;;;; +1F230;SQUARED CJK UNIFIED IDEOGRAPH-8D70;So;0;L; 8D70;;;;N;;;;; +1F231;SQUARED CJK UNIFIED IDEOGRAPH-6253;So;0;L; 6253;;;;N;;;;; +1F232;SQUARED CJK UNIFIED IDEOGRAPH-7981;So;0;L; 7981;;;;N;;;;; +1F233;SQUARED CJK UNIFIED IDEOGRAPH-7A7A;So;0;L; 7A7A;;;;N;;;;; +1F234;SQUARED CJK UNIFIED IDEOGRAPH-5408;So;0;L; 5408;;;;N;;;;; +1F235;SQUARED CJK UNIFIED IDEOGRAPH-6E80;So;0;L; 6E80;;;;N;;;;; +1F236;SQUARED CJK UNIFIED IDEOGRAPH-6709;So;0;L; 6709;;;;N;;;;; +1F237;SQUARED CJK UNIFIED IDEOGRAPH-6708;So;0;L; 6708;;;;N;;;;; +1F238;SQUARED CJK UNIFIED IDEOGRAPH-7533;So;0;L; 7533;;;;N;;;;; +1F239;SQUARED CJK UNIFIED IDEOGRAPH-5272;So;0;L; 5272;;;;N;;;;; +1F23A;SQUARED CJK UNIFIED IDEOGRAPH-55B6;So;0;L; 55B6;;;;N;;;;; +1F23B;SQUARED CJK UNIFIED IDEOGRAPH-914D;So;0;L; 914D;;;;N;;;;; +1F240;TORTOISE SHELL BRACKETED CJK UNIFIED IDEOGRAPH-672C;So;0;L; 3014 672C 3015;;;;N;;;;; +1F241;TORTOISE SHELL BRACKETED CJK UNIFIED IDEOGRAPH-4E09;So;0;L; 3014 4E09 3015;;;;N;;;;; +1F242;TORTOISE SHELL BRACKETED CJK UNIFIED IDEOGRAPH-4E8C;So;0;L; 3014 4E8C 3015;;;;N;;;;; +1F243;TORTOISE SHELL BRACKETED CJK UNIFIED IDEOGRAPH-5B89;So;0;L; 3014 5B89 3015;;;;N;;;;; +1F244;TORTOISE SHELL BRACKETED CJK UNIFIED IDEOGRAPH-70B9;So;0;L; 3014 70B9 3015;;;;N;;;;; +1F245;TORTOISE SHELL BRACKETED CJK UNIFIED IDEOGRAPH-6253;So;0;L; 3014 6253 3015;;;;N;;;;; +1F246;TORTOISE SHELL BRACKETED CJK UNIFIED IDEOGRAPH-76D7;So;0;L; 3014 76D7 3015;;;;N;;;;; +1F247;TORTOISE SHELL BRACKETED CJK UNIFIED IDEOGRAPH-52DD;So;0;L; 3014 52DD 3015;;;;N;;;;; +1F248;TORTOISE SHELL BRACKETED CJK UNIFIED IDEOGRAPH-6557;So;0;L; 3014 6557 3015;;;;N;;;;; +1F250;CIRCLED IDEOGRAPH ADVANTAGE;So;0;L; 5F97;;;;N;;;;; +1F251;CIRCLED IDEOGRAPH ACCEPT;So;0;L; 53EF;;;;N;;;;; +1F260;ROUNDED SYMBOL FOR FU;So;0;ON;;;;;N;;;;; +1F261;ROUNDED SYMBOL FOR LU;So;0;ON;;;;;N;;;;; +1F262;ROUNDED SYMBOL FOR SHOU;So;0;ON;;;;;N;;;;; +1F263;ROUNDED SYMBOL FOR XI;So;0;ON;;;;;N;;;;; +1F264;ROUNDED SYMBOL FOR SHUANGXI;So;0;ON;;;;;N;;;;; +1F265;ROUNDED SYMBOL FOR CAI;So;0;ON;;;;;N;;;;; +1F300;CYCLONE;So;0;ON;;;;;N;;;;; +1F301;FOGGY;So;0;ON;;;;;N;;;;; +1F302;CLOSED UMBRELLA;So;0;ON;;;;;N;;;;; +1F303;NIGHT WITH STARS;So;0;ON;;;;;N;;;;; +1F304;SUNRISE OVER MOUNTAINS;So;0;ON;;;;;N;;;;; +1F305;SUNRISE;So;0;ON;;;;;N;;;;; +1F306;CITYSCAPE AT DUSK;So;0;ON;;;;;N;;;;; +1F307;SUNSET OVER BUILDINGS;So;0;ON;;;;;N;;;;; +1F308;RAINBOW;So;0;ON;;;;;N;;;;; +1F309;BRIDGE AT NIGHT;So;0;ON;;;;;N;;;;; +1F30A;WATER WAVE;So;0;ON;;;;;N;;;;; +1F30B;VOLCANO;So;0;ON;;;;;N;;;;; +1F30C;MILKY WAY;So;0;ON;;;;;N;;;;; +1F30D;EARTH GLOBE EUROPE-AFRICA;So;0;ON;;;;;N;;;;; +1F30E;EARTH GLOBE AMERICAS;So;0;ON;;;;;N;;;;; +1F30F;EARTH GLOBE ASIA-AUSTRALIA;So;0;ON;;;;;N;;;;; +1F310;GLOBE WITH MERIDIANS;So;0;ON;;;;;N;;;;; +1F311;NEW MOON SYMBOL;So;0;ON;;;;;N;;;;; +1F312;WAXING CRESCENT MOON SYMBOL;So;0;ON;;;;;N;;;;; +1F313;FIRST QUARTER MOON SYMBOL;So;0;ON;;;;;N;;;;; +1F314;WAXING GIBBOUS MOON SYMBOL;So;0;ON;;;;;N;;;;; +1F315;FULL MOON SYMBOL;So;0;ON;;;;;N;;;;; +1F316;WANING GIBBOUS MOON SYMBOL;So;0;ON;;;;;N;;;;; +1F317;LAST QUARTER MOON SYMBOL;So;0;ON;;;;;N;;;;; +1F318;WANING CRESCENT MOON SYMBOL;So;0;ON;;;;;N;;;;; +1F319;CRESCENT MOON;So;0;ON;;;;;N;;;;; +1F31A;NEW MOON WITH FACE;So;0;ON;;;;;N;;;;; +1F31B;FIRST QUARTER MOON WITH FACE;So;0;ON;;;;;N;;;;; +1F31C;LAST QUARTER MOON WITH FACE;So;0;ON;;;;;N;;;;; +1F31D;FULL MOON WITH FACE;So;0;ON;;;;;N;;;;; +1F31E;SUN WITH FACE;So;0;ON;;;;;N;;;;; +1F31F;GLOWING STAR;So;0;ON;;;;;N;;;;; +1F320;SHOOTING STAR;So;0;ON;;;;;N;;;;; +1F321;THERMOMETER;So;0;ON;;;;;N;;;;; +1F322;BLACK DROPLET;So;0;ON;;;;;N;;;;; +1F323;WHITE SUN;So;0;ON;;;;;N;;;;; +1F324;WHITE SUN WITH SMALL CLOUD;So;0;ON;;;;;N;;;;; +1F325;WHITE SUN BEHIND CLOUD;So;0;ON;;;;;N;;;;; +1F326;WHITE SUN BEHIND CLOUD WITH RAIN;So;0;ON;;;;;N;;;;; +1F327;CLOUD WITH RAIN;So;0;ON;;;;;N;;;;; +1F328;CLOUD WITH SNOW;So;0;ON;;;;;N;;;;; +1F329;CLOUD WITH LIGHTNING;So;0;ON;;;;;N;;;;; +1F32A;CLOUD WITH TORNADO;So;0;ON;;;;;N;;;;; +1F32B;FOG;So;0;ON;;;;;N;;;;; +1F32C;WIND BLOWING FACE;So;0;ON;;;;;N;;;;; +1F32D;HOT DOG;So;0;ON;;;;;N;;;;; +1F32E;TACO;So;0;ON;;;;;N;;;;; +1F32F;BURRITO;So;0;ON;;;;;N;;;;; +1F330;CHESTNUT;So;0;ON;;;;;N;;;;; +1F331;SEEDLING;So;0;ON;;;;;N;;;;; +1F332;EVERGREEN TREE;So;0;ON;;;;;N;;;;; +1F333;DECIDUOUS TREE;So;0;ON;;;;;N;;;;; +1F334;PALM TREE;So;0;ON;;;;;N;;;;; +1F335;CACTUS;So;0;ON;;;;;N;;;;; +1F336;HOT PEPPER;So;0;ON;;;;;N;;;;; +1F337;TULIP;So;0;ON;;;;;N;;;;; +1F338;CHERRY BLOSSOM;So;0;ON;;;;;N;;;;; +1F339;ROSE;So;0;ON;;;;;N;;;;; +1F33A;HIBISCUS;So;0;ON;;;;;N;;;;; +1F33B;SUNFLOWER;So;0;ON;;;;;N;;;;; +1F33C;BLOSSOM;So;0;ON;;;;;N;;;;; +1F33D;EAR OF MAIZE;So;0;ON;;;;;N;;;;; +1F33E;EAR OF RICE;So;0;ON;;;;;N;;;;; +1F33F;HERB;So;0;ON;;;;;N;;;;; +1F340;FOUR LEAF CLOVER;So;0;ON;;;;;N;;;;; +1F341;MAPLE LEAF;So;0;ON;;;;;N;;;;; +1F342;FALLEN LEAF;So;0;ON;;;;;N;;;;; +1F343;LEAF FLUTTERING IN WIND;So;0;ON;;;;;N;;;;; +1F344;MUSHROOM;So;0;ON;;;;;N;;;;; +1F345;TOMATO;So;0;ON;;;;;N;;;;; +1F346;AUBERGINE;So;0;ON;;;;;N;;;;; +1F347;GRAPES;So;0;ON;;;;;N;;;;; +1F348;MELON;So;0;ON;;;;;N;;;;; +1F349;WATERMELON;So;0;ON;;;;;N;;;;; +1F34A;TANGERINE;So;0;ON;;;;;N;;;;; +1F34B;LEMON;So;0;ON;;;;;N;;;;; +1F34C;BANANA;So;0;ON;;;;;N;;;;; +1F34D;PINEAPPLE;So;0;ON;;;;;N;;;;; +1F34E;RED APPLE;So;0;ON;;;;;N;;;;; +1F34F;GREEN APPLE;So;0;ON;;;;;N;;;;; +1F350;PEAR;So;0;ON;;;;;N;;;;; +1F351;PEACH;So;0;ON;;;;;N;;;;; +1F352;CHERRIES;So;0;ON;;;;;N;;;;; +1F353;STRAWBERRY;So;0;ON;;;;;N;;;;; +1F354;HAMBURGER;So;0;ON;;;;;N;;;;; +1F355;SLICE OF PIZZA;So;0;ON;;;;;N;;;;; +1F356;MEAT ON BONE;So;0;ON;;;;;N;;;;; +1F357;POULTRY LEG;So;0;ON;;;;;N;;;;; +1F358;RICE CRACKER;So;0;ON;;;;;N;;;;; +1F359;RICE BALL;So;0;ON;;;;;N;;;;; +1F35A;COOKED RICE;So;0;ON;;;;;N;;;;; +1F35B;CURRY AND RICE;So;0;ON;;;;;N;;;;; +1F35C;STEAMING BOWL;So;0;ON;;;;;N;;;;; +1F35D;SPAGHETTI;So;0;ON;;;;;N;;;;; +1F35E;BREAD;So;0;ON;;;;;N;;;;; +1F35F;FRENCH FRIES;So;0;ON;;;;;N;;;;; +1F360;ROASTED SWEET POTATO;So;0;ON;;;;;N;;;;; +1F361;DANGO;So;0;ON;;;;;N;;;;; +1F362;ODEN;So;0;ON;;;;;N;;;;; +1F363;SUSHI;So;0;ON;;;;;N;;;;; +1F364;FRIED SHRIMP;So;0;ON;;;;;N;;;;; +1F365;FISH CAKE WITH SWIRL DESIGN;So;0;ON;;;;;N;;;;; +1F366;SOFT ICE CREAM;So;0;ON;;;;;N;;;;; +1F367;SHAVED ICE;So;0;ON;;;;;N;;;;; +1F368;ICE CREAM;So;0;ON;;;;;N;;;;; +1F369;DOUGHNUT;So;0;ON;;;;;N;;;;; +1F36A;COOKIE;So;0;ON;;;;;N;;;;; +1F36B;CHOCOLATE BAR;So;0;ON;;;;;N;;;;; +1F36C;CANDY;So;0;ON;;;;;N;;;;; +1F36D;LOLLIPOP;So;0;ON;;;;;N;;;;; +1F36E;CUSTARD;So;0;ON;;;;;N;;;;; +1F36F;HONEY POT;So;0;ON;;;;;N;;;;; +1F370;SHORTCAKE;So;0;ON;;;;;N;;;;; +1F371;BENTO BOX;So;0;ON;;;;;N;;;;; +1F372;POT OF FOOD;So;0;ON;;;;;N;;;;; +1F373;COOKING;So;0;ON;;;;;N;;;;; +1F374;FORK AND KNIFE;So;0;ON;;;;;N;;;;; +1F375;TEACUP WITHOUT HANDLE;So;0;ON;;;;;N;;;;; +1F376;SAKE BOTTLE AND CUP;So;0;ON;;;;;N;;;;; +1F377;WINE GLASS;So;0;ON;;;;;N;;;;; +1F378;COCKTAIL GLASS;So;0;ON;;;;;N;;;;; +1F379;TROPICAL DRINK;So;0;ON;;;;;N;;;;; +1F37A;BEER MUG;So;0;ON;;;;;N;;;;; +1F37B;CLINKING BEER MUGS;So;0;ON;;;;;N;;;;; +1F37C;BABY BOTTLE;So;0;ON;;;;;N;;;;; +1F37D;FORK AND KNIFE WITH PLATE;So;0;ON;;;;;N;;;;; +1F37E;BOTTLE WITH POPPING CORK;So;0;ON;;;;;N;;;;; +1F37F;POPCORN;So;0;ON;;;;;N;;;;; +1F380;RIBBON;So;0;ON;;;;;N;;;;; +1F381;WRAPPED PRESENT;So;0;ON;;;;;N;;;;; +1F382;BIRTHDAY CAKE;So;0;ON;;;;;N;;;;; +1F383;JACK-O-LANTERN;So;0;ON;;;;;N;;;;; +1F384;CHRISTMAS TREE;So;0;ON;;;;;N;;;;; +1F385;FATHER CHRISTMAS;So;0;ON;;;;;N;;;;; +1F386;FIREWORKS;So;0;ON;;;;;N;;;;; +1F387;FIREWORK SPARKLER;So;0;ON;;;;;N;;;;; +1F388;BALLOON;So;0;ON;;;;;N;;;;; +1F389;PARTY POPPER;So;0;ON;;;;;N;;;;; +1F38A;CONFETTI BALL;So;0;ON;;;;;N;;;;; +1F38B;TANABATA TREE;So;0;ON;;;;;N;;;;; +1F38C;CROSSED FLAGS;So;0;ON;;;;;N;;;;; +1F38D;PINE DECORATION;So;0;ON;;;;;N;;;;; +1F38E;JAPANESE DOLLS;So;0;ON;;;;;N;;;;; +1F38F;CARP STREAMER;So;0;ON;;;;;N;;;;; +1F390;WIND CHIME;So;0;ON;;;;;N;;;;; +1F391;MOON VIEWING CEREMONY;So;0;ON;;;;;N;;;;; +1F392;SCHOOL SATCHEL;So;0;ON;;;;;N;;;;; +1F393;GRADUATION CAP;So;0;ON;;;;;N;;;;; +1F394;HEART WITH TIP ON THE LEFT;So;0;ON;;;;;N;;;;; +1F395;BOUQUET OF FLOWERS;So;0;ON;;;;;N;;;;; +1F396;MILITARY MEDAL;So;0;ON;;;;;N;;;;; +1F397;REMINDER RIBBON;So;0;ON;;;;;N;;;;; +1F398;MUSICAL KEYBOARD WITH JACKS;So;0;ON;;;;;N;;;;; +1F399;STUDIO MICROPHONE;So;0;ON;;;;;N;;;;; +1F39A;LEVEL SLIDER;So;0;ON;;;;;N;;;;; +1F39B;CONTROL KNOBS;So;0;ON;;;;;N;;;;; +1F39C;BEAMED ASCENDING MUSICAL NOTES;So;0;ON;;;;;N;;;;; +1F39D;BEAMED DESCENDING MUSICAL NOTES;So;0;ON;;;;;N;;;;; +1F39E;FILM FRAMES;So;0;ON;;;;;N;;;;; +1F39F;ADMISSION TICKETS;So;0;ON;;;;;N;;;;; +1F3A0;CAROUSEL HORSE;So;0;ON;;;;;N;;;;; +1F3A1;FERRIS WHEEL;So;0;ON;;;;;N;;;;; +1F3A2;ROLLER COASTER;So;0;ON;;;;;N;;;;; +1F3A3;FISHING POLE AND FISH;So;0;ON;;;;;N;;;;; +1F3A4;MICROPHONE;So;0;ON;;;;;N;;;;; +1F3A5;MOVIE CAMERA;So;0;ON;;;;;N;;;;; +1F3A6;CINEMA;So;0;ON;;;;;N;;;;; +1F3A7;HEADPHONE;So;0;ON;;;;;N;;;;; +1F3A8;ARTIST PALETTE;So;0;ON;;;;;N;;;;; +1F3A9;TOP HAT;So;0;ON;;;;;N;;;;; +1F3AA;CIRCUS TENT;So;0;ON;;;;;N;;;;; +1F3AB;TICKET;So;0;ON;;;;;N;;;;; +1F3AC;CLAPPER BOARD;So;0;ON;;;;;N;;;;; +1F3AD;PERFORMING ARTS;So;0;ON;;;;;N;;;;; +1F3AE;VIDEO GAME;So;0;ON;;;;;N;;;;; +1F3AF;DIRECT HIT;So;0;ON;;;;;N;;;;; +1F3B0;SLOT MACHINE;So;0;ON;;;;;N;;;;; +1F3B1;BILLIARDS;So;0;ON;;;;;N;;;;; +1F3B2;GAME DIE;So;0;ON;;;;;N;;;;; +1F3B3;BOWLING;So;0;ON;;;;;N;;;;; +1F3B4;FLOWER PLAYING CARDS;So;0;ON;;;;;N;;;;; +1F3B5;MUSICAL NOTE;So;0;ON;;;;;N;;;;; +1F3B6;MULTIPLE MUSICAL NOTES;So;0;ON;;;;;N;;;;; +1F3B7;SAXOPHONE;So;0;ON;;;;;N;;;;; +1F3B8;GUITAR;So;0;ON;;;;;N;;;;; +1F3B9;MUSICAL KEYBOARD;So;0;ON;;;;;N;;;;; +1F3BA;TRUMPET;So;0;ON;;;;;N;;;;; +1F3BB;VIOLIN;So;0;ON;;;;;N;;;;; +1F3BC;MUSICAL SCORE;So;0;ON;;;;;N;;;;; +1F3BD;RUNNING SHIRT WITH SASH;So;0;ON;;;;;N;;;;; +1F3BE;TENNIS RACQUET AND BALL;So;0;ON;;;;;N;;;;; +1F3BF;SKI AND SKI BOOT;So;0;ON;;;;;N;;;;; +1F3C0;BASKETBALL AND HOOP;So;0;ON;;;;;N;;;;; +1F3C1;CHEQUERED FLAG;So;0;ON;;;;;N;;;;; +1F3C2;SNOWBOARDER;So;0;ON;;;;;N;;;;; +1F3C3;RUNNER;So;0;ON;;;;;N;;;;; +1F3C4;SURFER;So;0;ON;;;;;N;;;;; +1F3C5;SPORTS MEDAL;So;0;ON;;;;;N;;;;; +1F3C6;TROPHY;So;0;ON;;;;;N;;;;; +1F3C7;HORSE RACING;So;0;ON;;;;;N;;;;; +1F3C8;AMERICAN FOOTBALL;So;0;ON;;;;;N;;;;; +1F3C9;RUGBY FOOTBALL;So;0;ON;;;;;N;;;;; +1F3CA;SWIMMER;So;0;ON;;;;;N;;;;; +1F3CB;WEIGHT LIFTER;So;0;ON;;;;;N;;;;; +1F3CC;GOLFER;So;0;ON;;;;;N;;;;; +1F3CD;RACING MOTORCYCLE;So;0;ON;;;;;N;;;;; +1F3CE;RACING CAR;So;0;ON;;;;;N;;;;; +1F3CF;CRICKET BAT AND BALL;So;0;ON;;;;;N;;;;; +1F3D0;VOLLEYBALL;So;0;ON;;;;;N;;;;; +1F3D1;FIELD HOCKEY STICK AND BALL;So;0;ON;;;;;N;;;;; +1F3D2;ICE HOCKEY STICK AND PUCK;So;0;ON;;;;;N;;;;; +1F3D3;TABLE TENNIS PADDLE AND BALL;So;0;ON;;;;;N;;;;; +1F3D4;SNOW CAPPED MOUNTAIN;So;0;ON;;;;;N;;;;; +1F3D5;CAMPING;So;0;ON;;;;;N;;;;; +1F3D6;BEACH WITH UMBRELLA;So;0;ON;;;;;N;;;;; +1F3D7;BUILDING CONSTRUCTION;So;0;ON;;;;;N;;;;; +1F3D8;HOUSE BUILDINGS;So;0;ON;;;;;N;;;;; +1F3D9;CITYSCAPE;So;0;ON;;;;;N;;;;; +1F3DA;DERELICT HOUSE BUILDING;So;0;ON;;;;;N;;;;; +1F3DB;CLASSICAL BUILDING;So;0;ON;;;;;N;;;;; +1F3DC;DESERT;So;0;ON;;;;;N;;;;; +1F3DD;DESERT ISLAND;So;0;ON;;;;;N;;;;; +1F3DE;NATIONAL PARK;So;0;ON;;;;;N;;;;; +1F3DF;STADIUM;So;0;ON;;;;;N;;;;; +1F3E0;HOUSE BUILDING;So;0;ON;;;;;N;;;;; +1F3E1;HOUSE WITH GARDEN;So;0;ON;;;;;N;;;;; +1F3E2;OFFICE BUILDING;So;0;ON;;;;;N;;;;; +1F3E3;JAPANESE POST OFFICE;So;0;ON;;;;;N;;;;; +1F3E4;EUROPEAN POST OFFICE;So;0;ON;;;;;N;;;;; +1F3E5;HOSPITAL;So;0;ON;;;;;N;;;;; +1F3E6;BANK;So;0;ON;;;;;N;;;;; +1F3E7;AUTOMATED TELLER MACHINE;So;0;ON;;;;;N;;;;; +1F3E8;HOTEL;So;0;ON;;;;;N;;;;; +1F3E9;LOVE HOTEL;So;0;ON;;;;;N;;;;; +1F3EA;CONVENIENCE STORE;So;0;ON;;;;;N;;;;; +1F3EB;SCHOOL;So;0;ON;;;;;N;;;;; +1F3EC;DEPARTMENT STORE;So;0;ON;;;;;N;;;;; +1F3ED;FACTORY;So;0;ON;;;;;N;;;;; +1F3EE;IZAKAYA LANTERN;So;0;ON;;;;;N;;;;; +1F3EF;JAPANESE CASTLE;So;0;ON;;;;;N;;;;; +1F3F0;EUROPEAN CASTLE;So;0;ON;;;;;N;;;;; +1F3F1;WHITE PENNANT;So;0;ON;;;;;N;;;;; +1F3F2;BLACK PENNANT;So;0;ON;;;;;N;;;;; +1F3F3;WAVING WHITE FLAG;So;0;ON;;;;;N;;;;; +1F3F4;WAVING BLACK FLAG;So;0;ON;;;;;N;;;;; +1F3F5;ROSETTE;So;0;ON;;;;;N;;;;; +1F3F6;BLACK ROSETTE;So;0;ON;;;;;N;;;;; +1F3F7;LABEL;So;0;ON;;;;;N;;;;; +1F3F8;BADMINTON RACQUET AND SHUTTLECOCK;So;0;ON;;;;;N;;;;; +1F3F9;BOW AND ARROW;So;0;ON;;;;;N;;;;; +1F3FA;AMPHORA;So;0;ON;;;;;N;;;;; +1F3FB;EMOJI MODIFIER FITZPATRICK TYPE-1-2;Sk;0;ON;;;;;N;;;;; +1F3FC;EMOJI MODIFIER FITZPATRICK TYPE-3;Sk;0;ON;;;;;N;;;;; +1F3FD;EMOJI MODIFIER FITZPATRICK TYPE-4;Sk;0;ON;;;;;N;;;;; +1F3FE;EMOJI MODIFIER FITZPATRICK TYPE-5;Sk;0;ON;;;;;N;;;;; +1F3FF;EMOJI MODIFIER FITZPATRICK TYPE-6;Sk;0;ON;;;;;N;;;;; +1F400;RAT;So;0;ON;;;;;N;;;;; +1F401;MOUSE;So;0;ON;;;;;N;;;;; +1F402;OX;So;0;ON;;;;;N;;;;; +1F403;WATER BUFFALO;So;0;ON;;;;;N;;;;; +1F404;COW;So;0;ON;;;;;N;;;;; +1F405;TIGER;So;0;ON;;;;;N;;;;; +1F406;LEOPARD;So;0;ON;;;;;N;;;;; +1F407;RABBIT;So;0;ON;;;;;N;;;;; +1F408;CAT;So;0;ON;;;;;N;;;;; +1F409;DRAGON;So;0;ON;;;;;N;;;;; +1F40A;CROCODILE;So;0;ON;;;;;N;;;;; +1F40B;WHALE;So;0;ON;;;;;N;;;;; +1F40C;SNAIL;So;0;ON;;;;;N;;;;; +1F40D;SNAKE;So;0;ON;;;;;N;;;;; +1F40E;HORSE;So;0;ON;;;;;N;;;;; +1F40F;RAM;So;0;ON;;;;;N;;;;; +1F410;GOAT;So;0;ON;;;;;N;;;;; +1F411;SHEEP;So;0;ON;;;;;N;;;;; +1F412;MONKEY;So;0;ON;;;;;N;;;;; +1F413;ROOSTER;So;0;ON;;;;;N;;;;; +1F414;CHICKEN;So;0;ON;;;;;N;;;;; +1F415;DOG;So;0;ON;;;;;N;;;;; +1F416;PIG;So;0;ON;;;;;N;;;;; +1F417;BOAR;So;0;ON;;;;;N;;;;; +1F418;ELEPHANT;So;0;ON;;;;;N;;;;; +1F419;OCTOPUS;So;0;ON;;;;;N;;;;; +1F41A;SPIRAL SHELL;So;0;ON;;;;;N;;;;; +1F41B;BUG;So;0;ON;;;;;N;;;;; +1F41C;ANT;So;0;ON;;;;;N;;;;; +1F41D;HONEYBEE;So;0;ON;;;;;N;;;;; +1F41E;LADY BEETLE;So;0;ON;;;;;N;;;;; +1F41F;FISH;So;0;ON;;;;;N;;;;; +1F420;TROPICAL FISH;So;0;ON;;;;;N;;;;; +1F421;BLOWFISH;So;0;ON;;;;;N;;;;; +1F422;TURTLE;So;0;ON;;;;;N;;;;; +1F423;HATCHING CHICK;So;0;ON;;;;;N;;;;; +1F424;BABY CHICK;So;0;ON;;;;;N;;;;; +1F425;FRONT-FACING BABY CHICK;So;0;ON;;;;;N;;;;; +1F426;BIRD;So;0;ON;;;;;N;;;;; +1F427;PENGUIN;So;0;ON;;;;;N;;;;; +1F428;KOALA;So;0;ON;;;;;N;;;;; +1F429;POODLE;So;0;ON;;;;;N;;;;; +1F42A;DROMEDARY CAMEL;So;0;ON;;;;;N;;;;; +1F42B;BACTRIAN CAMEL;So;0;ON;;;;;N;;;;; +1F42C;DOLPHIN;So;0;ON;;;;;N;;;;; +1F42D;MOUSE FACE;So;0;ON;;;;;N;;;;; +1F42E;COW FACE;So;0;ON;;;;;N;;;;; +1F42F;TIGER FACE;So;0;ON;;;;;N;;;;; +1F430;RABBIT FACE;So;0;ON;;;;;N;;;;; +1F431;CAT FACE;So;0;ON;;;;;N;;;;; +1F432;DRAGON FACE;So;0;ON;;;;;N;;;;; +1F433;SPOUTING WHALE;So;0;ON;;;;;N;;;;; +1F434;HORSE FACE;So;0;ON;;;;;N;;;;; +1F435;MONKEY FACE;So;0;ON;;;;;N;;;;; +1F436;DOG FACE;So;0;ON;;;;;N;;;;; +1F437;PIG FACE;So;0;ON;;;;;N;;;;; +1F438;FROG FACE;So;0;ON;;;;;N;;;;; +1F439;HAMSTER FACE;So;0;ON;;;;;N;;;;; +1F43A;WOLF FACE;So;0;ON;;;;;N;;;;; +1F43B;BEAR FACE;So;0;ON;;;;;N;;;;; +1F43C;PANDA FACE;So;0;ON;;;;;N;;;;; +1F43D;PIG NOSE;So;0;ON;;;;;N;;;;; +1F43E;PAW PRINTS;So;0;ON;;;;;N;;;;; +1F43F;CHIPMUNK;So;0;ON;;;;;N;;;;; +1F440;EYES;So;0;ON;;;;;N;;;;; +1F441;EYE;So;0;ON;;;;;N;;;;; +1F442;EAR;So;0;ON;;;;;N;;;;; +1F443;NOSE;So;0;ON;;;;;N;;;;; +1F444;MOUTH;So;0;ON;;;;;N;;;;; +1F445;TONGUE;So;0;ON;;;;;N;;;;; +1F446;WHITE UP POINTING BACKHAND INDEX;So;0;ON;;;;;N;;;;; +1F447;WHITE DOWN POINTING BACKHAND INDEX;So;0;ON;;;;;N;;;;; +1F448;WHITE LEFT POINTING BACKHAND INDEX;So;0;ON;;;;;N;;;;; +1F449;WHITE RIGHT POINTING BACKHAND INDEX;So;0;ON;;;;;N;;;;; +1F44A;FISTED HAND SIGN;So;0;ON;;;;;N;;;;; +1F44B;WAVING HAND SIGN;So;0;ON;;;;;N;;;;; +1F44C;OK HAND SIGN;So;0;ON;;;;;N;;;;; +1F44D;THUMBS UP SIGN;So;0;ON;;;;;N;;;;; +1F44E;THUMBS DOWN SIGN;So;0;ON;;;;;N;;;;; +1F44F;CLAPPING HANDS SIGN;So;0;ON;;;;;N;;;;; +1F450;OPEN HANDS SIGN;So;0;ON;;;;;N;;;;; +1F451;CROWN;So;0;ON;;;;;N;;;;; +1F452;WOMANS HAT;So;0;ON;;;;;N;;;;; +1F453;EYEGLASSES;So;0;ON;;;;;N;;;;; +1F454;NECKTIE;So;0;ON;;;;;N;;;;; +1F455;T-SHIRT;So;0;ON;;;;;N;;;;; +1F456;JEANS;So;0;ON;;;;;N;;;;; +1F457;DRESS;So;0;ON;;;;;N;;;;; +1F458;KIMONO;So;0;ON;;;;;N;;;;; +1F459;BIKINI;So;0;ON;;;;;N;;;;; +1F45A;WOMANS CLOTHES;So;0;ON;;;;;N;;;;; +1F45B;PURSE;So;0;ON;;;;;N;;;;; +1F45C;HANDBAG;So;0;ON;;;;;N;;;;; +1F45D;POUCH;So;0;ON;;;;;N;;;;; +1F45E;MANS SHOE;So;0;ON;;;;;N;;;;; +1F45F;ATHLETIC SHOE;So;0;ON;;;;;N;;;;; +1F460;HIGH-HEELED SHOE;So;0;ON;;;;;N;;;;; +1F461;WOMANS SANDAL;So;0;ON;;;;;N;;;;; +1F462;WOMANS BOOTS;So;0;ON;;;;;N;;;;; +1F463;FOOTPRINTS;So;0;ON;;;;;N;;;;; +1F464;BUST IN SILHOUETTE;So;0;ON;;;;;N;;;;; +1F465;BUSTS IN SILHOUETTE;So;0;ON;;;;;N;;;;; +1F466;BOY;So;0;ON;;;;;N;;;;; +1F467;GIRL;So;0;ON;;;;;N;;;;; +1F468;MAN;So;0;ON;;;;;N;;;;; +1F469;WOMAN;So;0;ON;;;;;N;;;;; +1F46A;FAMILY;So;0;ON;;;;;N;;;;; +1F46B;MAN AND WOMAN HOLDING HANDS;So;0;ON;;;;;N;;;;; +1F46C;TWO MEN HOLDING HANDS;So;0;ON;;;;;N;;;;; +1F46D;TWO WOMEN HOLDING HANDS;So;0;ON;;;;;N;;;;; +1F46E;POLICE OFFICER;So;0;ON;;;;;N;;;;; +1F46F;WOMAN WITH BUNNY EARS;So;0;ON;;;;;N;;;;; +1F470;BRIDE WITH VEIL;So;0;ON;;;;;N;;;;; +1F471;PERSON WITH BLOND HAIR;So;0;ON;;;;;N;;;;; +1F472;MAN WITH GUA PI MAO;So;0;ON;;;;;N;;;;; +1F473;MAN WITH TURBAN;So;0;ON;;;;;N;;;;; +1F474;OLDER MAN;So;0;ON;;;;;N;;;;; +1F475;OLDER WOMAN;So;0;ON;;;;;N;;;;; +1F476;BABY;So;0;ON;;;;;N;;;;; +1F477;CONSTRUCTION WORKER;So;0;ON;;;;;N;;;;; +1F478;PRINCESS;So;0;ON;;;;;N;;;;; +1F479;JAPANESE OGRE;So;0;ON;;;;;N;;;;; +1F47A;JAPANESE GOBLIN;So;0;ON;;;;;N;;;;; +1F47B;GHOST;So;0;ON;;;;;N;;;;; +1F47C;BABY ANGEL;So;0;ON;;;;;N;;;;; +1F47D;EXTRATERRESTRIAL ALIEN;So;0;ON;;;;;N;;;;; +1F47E;ALIEN MONSTER;So;0;ON;;;;;N;;;;; +1F47F;IMP;So;0;ON;;;;;N;;;;; +1F480;SKULL;So;0;ON;;;;;N;;;;; +1F481;INFORMATION DESK PERSON;So;0;ON;;;;;N;;;;; +1F482;GUARDSMAN;So;0;ON;;;;;N;;;;; +1F483;DANCER;So;0;ON;;;;;N;;;;; +1F484;LIPSTICK;So;0;ON;;;;;N;;;;; +1F485;NAIL POLISH;So;0;ON;;;;;N;;;;; +1F486;FACE MASSAGE;So;0;ON;;;;;N;;;;; +1F487;HAIRCUT;So;0;ON;;;;;N;;;;; +1F488;BARBER POLE;So;0;ON;;;;;N;;;;; +1F489;SYRINGE;So;0;ON;;;;;N;;;;; +1F48A;PILL;So;0;ON;;;;;N;;;;; +1F48B;KISS MARK;So;0;ON;;;;;N;;;;; +1F48C;LOVE LETTER;So;0;ON;;;;;N;;;;; +1F48D;RING;So;0;ON;;;;;N;;;;; +1F48E;GEM STONE;So;0;ON;;;;;N;;;;; +1F48F;KISS;So;0;ON;;;;;N;;;;; +1F490;BOUQUET;So;0;ON;;;;;N;;;;; +1F491;COUPLE WITH HEART;So;0;ON;;;;;N;;;;; +1F492;WEDDING;So;0;ON;;;;;N;;;;; +1F493;BEATING HEART;So;0;ON;;;;;N;;;;; +1F494;BROKEN HEART;So;0;ON;;;;;N;;;;; +1F495;TWO HEARTS;So;0;ON;;;;;N;;;;; +1F496;SPARKLING HEART;So;0;ON;;;;;N;;;;; +1F497;GROWING HEART;So;0;ON;;;;;N;;;;; +1F498;HEART WITH ARROW;So;0;ON;;;;;N;;;;; +1F499;BLUE HEART;So;0;ON;;;;;N;;;;; +1F49A;GREEN HEART;So;0;ON;;;;;N;;;;; +1F49B;YELLOW HEART;So;0;ON;;;;;N;;;;; +1F49C;PURPLE HEART;So;0;ON;;;;;N;;;;; +1F49D;HEART WITH RIBBON;So;0;ON;;;;;N;;;;; +1F49E;REVOLVING HEARTS;So;0;ON;;;;;N;;;;; +1F49F;HEART DECORATION;So;0;ON;;;;;N;;;;; +1F4A0;DIAMOND SHAPE WITH A DOT INSIDE;So;0;ON;;;;;N;;;;; +1F4A1;ELECTRIC LIGHT BULB;So;0;ON;;;;;N;;;;; +1F4A2;ANGER SYMBOL;So;0;ON;;;;;N;;;;; +1F4A3;BOMB;So;0;ON;;;;;N;;;;; +1F4A4;SLEEPING SYMBOL;So;0;ON;;;;;N;;;;; +1F4A5;COLLISION SYMBOL;So;0;ON;;;;;N;;;;; +1F4A6;SPLASHING SWEAT SYMBOL;So;0;ON;;;;;N;;;;; +1F4A7;DROPLET;So;0;ON;;;;;N;;;;; +1F4A8;DASH SYMBOL;So;0;ON;;;;;N;;;;; +1F4A9;PILE OF POO;So;0;ON;;;;;N;;;;; +1F4AA;FLEXED BICEPS;So;0;ON;;;;;N;;;;; +1F4AB;DIZZY SYMBOL;So;0;ON;;;;;N;;;;; +1F4AC;SPEECH BALLOON;So;0;ON;;;;;N;;;;; +1F4AD;THOUGHT BALLOON;So;0;ON;;;;;N;;;;; +1F4AE;WHITE FLOWER;So;0;ON;;;;;N;;;;; +1F4AF;HUNDRED POINTS SYMBOL;So;0;ON;;;;;N;;;;; +1F4B0;MONEY BAG;So;0;ON;;;;;N;;;;; +1F4B1;CURRENCY EXCHANGE;So;0;ON;;;;;N;;;;; +1F4B2;HEAVY DOLLAR SIGN;So;0;ON;;;;;N;;;;; +1F4B3;CREDIT CARD;So;0;ON;;;;;N;;;;; +1F4B4;BANKNOTE WITH YEN SIGN;So;0;ON;;;;;N;;;;; +1F4B5;BANKNOTE WITH DOLLAR SIGN;So;0;ON;;;;;N;;;;; +1F4B6;BANKNOTE WITH EURO SIGN;So;0;ON;;;;;N;;;;; +1F4B7;BANKNOTE WITH POUND SIGN;So;0;ON;;;;;N;;;;; +1F4B8;MONEY WITH WINGS;So;0;ON;;;;;N;;;;; +1F4B9;CHART WITH UPWARDS TREND AND YEN SIGN;So;0;ON;;;;;N;;;;; +1F4BA;SEAT;So;0;ON;;;;;N;;;;; +1F4BB;PERSONAL COMPUTER;So;0;ON;;;;;N;;;;; +1F4BC;BRIEFCASE;So;0;ON;;;;;N;;;;; +1F4BD;MINIDISC;So;0;ON;;;;;N;;;;; +1F4BE;FLOPPY DISK;So;0;ON;;;;;N;;;;; +1F4BF;OPTICAL DISC;So;0;ON;;;;;N;;;;; +1F4C0;DVD;So;0;ON;;;;;N;;;;; +1F4C1;FILE FOLDER;So;0;ON;;;;;N;;;;; +1F4C2;OPEN FILE FOLDER;So;0;ON;;;;;N;;;;; +1F4C3;PAGE WITH CURL;So;0;ON;;;;;N;;;;; +1F4C4;PAGE FACING UP;So;0;ON;;;;;N;;;;; +1F4C5;CALENDAR;So;0;ON;;;;;N;;;;; +1F4C6;TEAR-OFF CALENDAR;So;0;ON;;;;;N;;;;; +1F4C7;CARD INDEX;So;0;ON;;;;;N;;;;; +1F4C8;CHART WITH UPWARDS TREND;So;0;ON;;;;;N;;;;; +1F4C9;CHART WITH DOWNWARDS TREND;So;0;ON;;;;;N;;;;; +1F4CA;BAR CHART;So;0;ON;;;;;N;;;;; +1F4CB;CLIPBOARD;So;0;ON;;;;;N;;;;; +1F4CC;PUSHPIN;So;0;ON;;;;;N;;;;; +1F4CD;ROUND PUSHPIN;So;0;ON;;;;;N;;;;; +1F4CE;PAPERCLIP;So;0;ON;;;;;N;;;;; +1F4CF;STRAIGHT RULER;So;0;ON;;;;;N;;;;; +1F4D0;TRIANGULAR RULER;So;0;ON;;;;;N;;;;; +1F4D1;BOOKMARK TABS;So;0;ON;;;;;N;;;;; +1F4D2;LEDGER;So;0;ON;;;;;N;;;;; +1F4D3;NOTEBOOK;So;0;ON;;;;;N;;;;; +1F4D4;NOTEBOOK WITH DECORATIVE COVER;So;0;ON;;;;;N;;;;; +1F4D5;CLOSED BOOK;So;0;ON;;;;;N;;;;; +1F4D6;OPEN BOOK;So;0;ON;;;;;N;;;;; +1F4D7;GREEN BOOK;So;0;ON;;;;;N;;;;; +1F4D8;BLUE BOOK;So;0;ON;;;;;N;;;;; +1F4D9;ORANGE BOOK;So;0;ON;;;;;N;;;;; +1F4DA;BOOKS;So;0;ON;;;;;N;;;;; +1F4DB;NAME BADGE;So;0;ON;;;;;N;;;;; +1F4DC;SCROLL;So;0;ON;;;;;N;;;;; +1F4DD;MEMO;So;0;ON;;;;;N;;;;; +1F4DE;TELEPHONE RECEIVER;So;0;ON;;;;;N;;;;; +1F4DF;PAGER;So;0;ON;;;;;N;;;;; +1F4E0;FAX MACHINE;So;0;ON;;;;;N;;;;; +1F4E1;SATELLITE ANTENNA;So;0;ON;;;;;N;;;;; +1F4E2;PUBLIC ADDRESS LOUDSPEAKER;So;0;ON;;;;;N;;;;; +1F4E3;CHEERING MEGAPHONE;So;0;ON;;;;;N;;;;; +1F4E4;OUTBOX TRAY;So;0;ON;;;;;N;;;;; +1F4E5;INBOX TRAY;So;0;ON;;;;;N;;;;; +1F4E6;PACKAGE;So;0;ON;;;;;N;;;;; +1F4E7;E-MAIL SYMBOL;So;0;ON;;;;;N;;;;; +1F4E8;INCOMING ENVELOPE;So;0;ON;;;;;N;;;;; +1F4E9;ENVELOPE WITH DOWNWARDS ARROW ABOVE;So;0;ON;;;;;N;;;;; +1F4EA;CLOSED MAILBOX WITH LOWERED FLAG;So;0;ON;;;;;N;;;;; +1F4EB;CLOSED MAILBOX WITH RAISED FLAG;So;0;ON;;;;;N;;;;; +1F4EC;OPEN MAILBOX WITH RAISED FLAG;So;0;ON;;;;;N;;;;; +1F4ED;OPEN MAILBOX WITH LOWERED FLAG;So;0;ON;;;;;N;;;;; +1F4EE;POSTBOX;So;0;ON;;;;;N;;;;; +1F4EF;POSTAL HORN;So;0;ON;;;;;N;;;;; +1F4F0;NEWSPAPER;So;0;ON;;;;;N;;;;; +1F4F1;MOBILE PHONE;So;0;ON;;;;;N;;;;; +1F4F2;MOBILE PHONE WITH RIGHTWARDS ARROW AT LEFT;So;0;ON;;;;;N;;;;; +1F4F3;VIBRATION MODE;So;0;ON;;;;;N;;;;; +1F4F4;MOBILE PHONE OFF;So;0;ON;;;;;N;;;;; +1F4F5;NO MOBILE PHONES;So;0;ON;;;;;N;;;;; +1F4F6;ANTENNA WITH BARS;So;0;ON;;;;;N;;;;; +1F4F7;CAMERA;So;0;ON;;;;;N;;;;; +1F4F8;CAMERA WITH FLASH;So;0;ON;;;;;N;;;;; +1F4F9;VIDEO CAMERA;So;0;ON;;;;;N;;;;; +1F4FA;TELEVISION;So;0;ON;;;;;N;;;;; +1F4FB;RADIO;So;0;ON;;;;;N;;;;; +1F4FC;VIDEOCASSETTE;So;0;ON;;;;;N;;;;; +1F4FD;FILM PROJECTOR;So;0;ON;;;;;N;;;;; +1F4FE;PORTABLE STEREO;So;0;ON;;;;;N;;;;; +1F4FF;PRAYER BEADS;So;0;ON;;;;;N;;;;; +1F500;TWISTED RIGHTWARDS ARROWS;So;0;ON;;;;;N;;;;; +1F501;CLOCKWISE RIGHTWARDS AND LEFTWARDS OPEN CIRCLE ARROWS;So;0;ON;;;;;N;;;;; +1F502;CLOCKWISE RIGHTWARDS AND LEFTWARDS OPEN CIRCLE ARROWS WITH CIRCLED ONE OVERLAY;So;0;ON;;;;;N;;;;; +1F503;CLOCKWISE DOWNWARDS AND UPWARDS OPEN CIRCLE ARROWS;So;0;ON;;;;;N;;;;; +1F504;ANTICLOCKWISE DOWNWARDS AND UPWARDS OPEN CIRCLE ARROWS;So;0;ON;;;;;N;;;;; +1F505;LOW BRIGHTNESS SYMBOL;So;0;ON;;;;;N;;;;; +1F506;HIGH BRIGHTNESS SYMBOL;So;0;ON;;;;;N;;;;; +1F507;SPEAKER WITH CANCELLATION STROKE;So;0;ON;;;;;N;;;;; +1F508;SPEAKER;So;0;ON;;;;;N;;;;; +1F509;SPEAKER WITH ONE SOUND WAVE;So;0;ON;;;;;N;;;;; +1F50A;SPEAKER WITH THREE SOUND WAVES;So;0;ON;;;;;N;;;;; +1F50B;BATTERY;So;0;ON;;;;;N;;;;; +1F50C;ELECTRIC PLUG;So;0;ON;;;;;N;;;;; +1F50D;LEFT-POINTING MAGNIFYING GLASS;So;0;ON;;;;;N;;;;; +1F50E;RIGHT-POINTING MAGNIFYING GLASS;So;0;ON;;;;;N;;;;; +1F50F;LOCK WITH INK PEN;So;0;ON;;;;;N;;;;; +1F510;CLOSED LOCK WITH KEY;So;0;ON;;;;;N;;;;; +1F511;KEY;So;0;ON;;;;;N;;;;; +1F512;LOCK;So;0;ON;;;;;N;;;;; +1F513;OPEN LOCK;So;0;ON;;;;;N;;;;; +1F514;BELL;So;0;ON;;;;;N;;;;; +1F515;BELL WITH CANCELLATION STROKE;So;0;ON;;;;;N;;;;; +1F516;BOOKMARK;So;0;ON;;;;;N;;;;; +1F517;LINK SYMBOL;So;0;ON;;;;;N;;;;; +1F518;RADIO BUTTON;So;0;ON;;;;;N;;;;; +1F519;BACK WITH LEFTWARDS ARROW ABOVE;So;0;ON;;;;;N;;;;; +1F51A;END WITH LEFTWARDS ARROW ABOVE;So;0;ON;;;;;N;;;;; +1F51B;ON WITH EXCLAMATION MARK WITH LEFT RIGHT ARROW ABOVE;So;0;ON;;;;;N;;;;; +1F51C;SOON WITH RIGHTWARDS ARROW ABOVE;So;0;ON;;;;;N;;;;; +1F51D;TOP WITH UPWARDS ARROW ABOVE;So;0;ON;;;;;N;;;;; +1F51E;NO ONE UNDER EIGHTEEN SYMBOL;So;0;ON;;;;;N;;;;; +1F51F;KEYCAP TEN;So;0;ON;;;;;N;;;;; +1F520;INPUT SYMBOL FOR LATIN CAPITAL LETTERS;So;0;ON;;;;;N;;;;; +1F521;INPUT SYMBOL FOR LATIN SMALL LETTERS;So;0;ON;;;;;N;;;;; +1F522;INPUT SYMBOL FOR NUMBERS;So;0;ON;;;;;N;;;;; +1F523;INPUT SYMBOL FOR SYMBOLS;So;0;ON;;;;;N;;;;; +1F524;INPUT SYMBOL FOR LATIN LETTERS;So;0;ON;;;;;N;;;;; +1F525;FIRE;So;0;ON;;;;;N;;;;; +1F526;ELECTRIC TORCH;So;0;ON;;;;;N;;;;; +1F527;WRENCH;So;0;ON;;;;;N;;;;; +1F528;HAMMER;So;0;ON;;;;;N;;;;; +1F529;NUT AND BOLT;So;0;ON;;;;;N;;;;; +1F52A;HOCHO;So;0;ON;;;;;N;;;;; +1F52B;PISTOL;So;0;ON;;;;;N;;;;; +1F52C;MICROSCOPE;So;0;ON;;;;;N;;;;; +1F52D;TELESCOPE;So;0;ON;;;;;N;;;;; +1F52E;CRYSTAL BALL;So;0;ON;;;;;N;;;;; +1F52F;SIX POINTED STAR WITH MIDDLE DOT;So;0;ON;;;;;N;;;;; +1F530;JAPANESE SYMBOL FOR BEGINNER;So;0;ON;;;;;N;;;;; +1F531;TRIDENT EMBLEM;So;0;ON;;;;;N;;;;; +1F532;BLACK SQUARE BUTTON;So;0;ON;;;;;N;;;;; +1F533;WHITE SQUARE BUTTON;So;0;ON;;;;;N;;;;; +1F534;LARGE RED CIRCLE;So;0;ON;;;;;N;;;;; +1F535;LARGE BLUE CIRCLE;So;0;ON;;;;;N;;;;; +1F536;LARGE ORANGE DIAMOND;So;0;ON;;;;;N;;;;; +1F537;LARGE BLUE DIAMOND;So;0;ON;;;;;N;;;;; +1F538;SMALL ORANGE DIAMOND;So;0;ON;;;;;N;;;;; +1F539;SMALL BLUE DIAMOND;So;0;ON;;;;;N;;;;; +1F53A;UP-POINTING RED TRIANGLE;So;0;ON;;;;;N;;;;; +1F53B;DOWN-POINTING RED TRIANGLE;So;0;ON;;;;;N;;;;; +1F53C;UP-POINTING SMALL RED TRIANGLE;So;0;ON;;;;;N;;;;; +1F53D;DOWN-POINTING SMALL RED TRIANGLE;So;0;ON;;;;;N;;;;; +1F53E;LOWER RIGHT SHADOWED WHITE CIRCLE;So;0;ON;;;;;N;;;;; +1F53F;UPPER RIGHT SHADOWED WHITE CIRCLE;So;0;ON;;;;;N;;;;; +1F540;CIRCLED CROSS POMMEE;So;0;ON;;;;;N;;;;; +1F541;CROSS POMMEE WITH HALF-CIRCLE BELOW;So;0;ON;;;;;N;;;;; +1F542;CROSS POMMEE;So;0;ON;;;;;N;;;;; +1F543;NOTCHED LEFT SEMICIRCLE WITH THREE DOTS;So;0;ON;;;;;N;;;;; +1F544;NOTCHED RIGHT SEMICIRCLE WITH THREE DOTS;So;0;ON;;;;;N;;;;; +1F545;SYMBOL FOR MARKS CHAPTER;So;0;ON;;;;;N;;;;; +1F546;WHITE LATIN CROSS;So;0;ON;;;;;N;;;;; +1F547;HEAVY LATIN CROSS;So;0;ON;;;;;N;;;;; +1F548;CELTIC CROSS;So;0;ON;;;;;N;;;;; +1F549;OM SYMBOL;So;0;ON;;;;;N;;;;; +1F54A;DOVE OF PEACE;So;0;ON;;;;;N;;;;; +1F54B;KAABA;So;0;ON;;;;;N;;;;; +1F54C;MOSQUE;So;0;ON;;;;;N;;;;; +1F54D;SYNAGOGUE;So;0;ON;;;;;N;;;;; +1F54E;MENORAH WITH NINE BRANCHES;So;0;ON;;;;;N;;;;; +1F54F;BOWL OF HYGIEIA;So;0;ON;;;;;N;;;;; +1F550;CLOCK FACE ONE OCLOCK;So;0;ON;;;;;N;;;;; +1F551;CLOCK FACE TWO OCLOCK;So;0;ON;;;;;N;;;;; +1F552;CLOCK FACE THREE OCLOCK;So;0;ON;;;;;N;;;;; +1F553;CLOCK FACE FOUR OCLOCK;So;0;ON;;;;;N;;;;; +1F554;CLOCK FACE FIVE OCLOCK;So;0;ON;;;;;N;;;;; +1F555;CLOCK FACE SIX OCLOCK;So;0;ON;;;;;N;;;;; +1F556;CLOCK FACE SEVEN OCLOCK;So;0;ON;;;;;N;;;;; +1F557;CLOCK FACE EIGHT OCLOCK;So;0;ON;;;;;N;;;;; +1F558;CLOCK FACE NINE OCLOCK;So;0;ON;;;;;N;;;;; +1F559;CLOCK FACE TEN OCLOCK;So;0;ON;;;;;N;;;;; +1F55A;CLOCK FACE ELEVEN OCLOCK;So;0;ON;;;;;N;;;;; +1F55B;CLOCK FACE TWELVE OCLOCK;So;0;ON;;;;;N;;;;; +1F55C;CLOCK FACE ONE-THIRTY;So;0;ON;;;;;N;;;;; +1F55D;CLOCK FACE TWO-THIRTY;So;0;ON;;;;;N;;;;; +1F55E;CLOCK FACE THREE-THIRTY;So;0;ON;;;;;N;;;;; +1F55F;CLOCK FACE FOUR-THIRTY;So;0;ON;;;;;N;;;;; +1F560;CLOCK FACE FIVE-THIRTY;So;0;ON;;;;;N;;;;; +1F561;CLOCK FACE SIX-THIRTY;So;0;ON;;;;;N;;;;; +1F562;CLOCK FACE SEVEN-THIRTY;So;0;ON;;;;;N;;;;; +1F563;CLOCK FACE EIGHT-THIRTY;So;0;ON;;;;;N;;;;; +1F564;CLOCK FACE NINE-THIRTY;So;0;ON;;;;;N;;;;; +1F565;CLOCK FACE TEN-THIRTY;So;0;ON;;;;;N;;;;; +1F566;CLOCK FACE ELEVEN-THIRTY;So;0;ON;;;;;N;;;;; +1F567;CLOCK FACE TWELVE-THIRTY;So;0;ON;;;;;N;;;;; +1F568;RIGHT SPEAKER;So;0;ON;;;;;N;;;;; +1F569;RIGHT SPEAKER WITH ONE SOUND WAVE;So;0;ON;;;;;N;;;;; +1F56A;RIGHT SPEAKER WITH THREE SOUND WAVES;So;0;ON;;;;;N;;;;; +1F56B;BULLHORN;So;0;ON;;;;;N;;;;; +1F56C;BULLHORN WITH SOUND WAVES;So;0;ON;;;;;N;;;;; +1F56D;RINGING BELL;So;0;ON;;;;;N;;;;; +1F56E;BOOK;So;0;ON;;;;;N;;;;; +1F56F;CANDLE;So;0;ON;;;;;N;;;;; +1F570;MANTELPIECE CLOCK;So;0;ON;;;;;N;;;;; +1F571;BLACK SKULL AND CROSSBONES;So;0;ON;;;;;N;;;;; +1F572;NO PIRACY;So;0;ON;;;;;N;;;;; +1F573;HOLE;So;0;ON;;;;;N;;;;; +1F574;MAN IN BUSINESS SUIT LEVITATING;So;0;ON;;;;;N;;;;; +1F575;SLEUTH OR SPY;So;0;ON;;;;;N;;;;; +1F576;DARK SUNGLASSES;So;0;ON;;;;;N;;;;; +1F577;SPIDER;So;0;ON;;;;;N;;;;; +1F578;SPIDER WEB;So;0;ON;;;;;N;;;;; +1F579;JOYSTICK;So;0;ON;;;;;N;;;;; +1F57A;MAN DANCING;So;0;ON;;;;;N;;;;; +1F57B;LEFT HAND TELEPHONE RECEIVER;So;0;ON;;;;;N;;;;; +1F57C;TELEPHONE RECEIVER WITH PAGE;So;0;ON;;;;;N;;;;; +1F57D;RIGHT HAND TELEPHONE RECEIVER;So;0;ON;;;;;N;;;;; +1F57E;WHITE TOUCHTONE TELEPHONE;So;0;ON;;;;;N;;;;; +1F57F;BLACK TOUCHTONE TELEPHONE;So;0;ON;;;;;N;;;;; +1F580;TELEPHONE ON TOP OF MODEM;So;0;ON;;;;;N;;;;; +1F581;CLAMSHELL MOBILE PHONE;So;0;ON;;;;;N;;;;; +1F582;BACK OF ENVELOPE;So;0;ON;;;;;N;;;;; +1F583;STAMPED ENVELOPE;So;0;ON;;;;;N;;;;; +1F584;ENVELOPE WITH LIGHTNING;So;0;ON;;;;;N;;;;; +1F585;FLYING ENVELOPE;So;0;ON;;;;;N;;;;; +1F586;PEN OVER STAMPED ENVELOPE;So;0;ON;;;;;N;;;;; +1F587;LINKED PAPERCLIPS;So;0;ON;;;;;N;;;;; +1F588;BLACK PUSHPIN;So;0;ON;;;;;N;;;;; +1F589;LOWER LEFT PENCIL;So;0;ON;;;;;N;;;;; +1F58A;LOWER LEFT BALLPOINT PEN;So;0;ON;;;;;N;;;;; +1F58B;LOWER LEFT FOUNTAIN PEN;So;0;ON;;;;;N;;;;; +1F58C;LOWER LEFT PAINTBRUSH;So;0;ON;;;;;N;;;;; +1F58D;LOWER LEFT CRAYON;So;0;ON;;;;;N;;;;; +1F58E;LEFT WRITING HAND;So;0;ON;;;;;N;;;;; +1F58F;TURNED OK HAND SIGN;So;0;ON;;;;;N;;;;; +1F590;RAISED HAND WITH FINGERS SPLAYED;So;0;ON;;;;;N;;;;; +1F591;REVERSED RAISED HAND WITH FINGERS SPLAYED;So;0;ON;;;;;N;;;;; +1F592;REVERSED THUMBS UP SIGN;So;0;ON;;;;;N;;;;; +1F593;REVERSED THUMBS DOWN SIGN;So;0;ON;;;;;N;;;;; +1F594;REVERSED VICTORY HAND;So;0;ON;;;;;N;;;;; +1F595;REVERSED HAND WITH MIDDLE FINGER EXTENDED;So;0;ON;;;;;N;;;;; +1F596;RAISED HAND WITH PART BETWEEN MIDDLE AND RING FINGERS;So;0;ON;;;;;N;;;;; +1F597;WHITE DOWN POINTING LEFT HAND INDEX;So;0;ON;;;;;N;;;;; +1F598;SIDEWAYS WHITE LEFT POINTING INDEX;So;0;ON;;;;;N;;;;; +1F599;SIDEWAYS WHITE RIGHT POINTING INDEX;So;0;ON;;;;;N;;;;; +1F59A;SIDEWAYS BLACK LEFT POINTING INDEX;So;0;ON;;;;;N;;;;; +1F59B;SIDEWAYS BLACK RIGHT POINTING INDEX;So;0;ON;;;;;N;;;;; +1F59C;BLACK LEFT POINTING BACKHAND INDEX;So;0;ON;;;;;N;;;;; +1F59D;BLACK RIGHT POINTING BACKHAND INDEX;So;0;ON;;;;;N;;;;; +1F59E;SIDEWAYS WHITE UP POINTING INDEX;So;0;ON;;;;;N;;;;; +1F59F;SIDEWAYS WHITE DOWN POINTING INDEX;So;0;ON;;;;;N;;;;; +1F5A0;SIDEWAYS BLACK UP POINTING INDEX;So;0;ON;;;;;N;;;;; +1F5A1;SIDEWAYS BLACK DOWN POINTING INDEX;So;0;ON;;;;;N;;;;; +1F5A2;BLACK UP POINTING BACKHAND INDEX;So;0;ON;;;;;N;;;;; +1F5A3;BLACK DOWN POINTING BACKHAND INDEX;So;0;ON;;;;;N;;;;; +1F5A4;BLACK HEART;So;0;ON;;;;;N;;;;; +1F5A5;DESKTOP COMPUTER;So;0;ON;;;;;N;;;;; +1F5A6;KEYBOARD AND MOUSE;So;0;ON;;;;;N;;;;; +1F5A7;THREE NETWORKED COMPUTERS;So;0;ON;;;;;N;;;;; +1F5A8;PRINTER;So;0;ON;;;;;N;;;;; +1F5A9;POCKET CALCULATOR;So;0;ON;;;;;N;;;;; +1F5AA;BLACK HARD SHELL FLOPPY DISK;So;0;ON;;;;;N;;;;; +1F5AB;WHITE HARD SHELL FLOPPY DISK;So;0;ON;;;;;N;;;;; +1F5AC;SOFT SHELL FLOPPY DISK;So;0;ON;;;;;N;;;;; +1F5AD;TAPE CARTRIDGE;So;0;ON;;;;;N;;;;; +1F5AE;WIRED KEYBOARD;So;0;ON;;;;;N;;;;; +1F5AF;ONE BUTTON MOUSE;So;0;ON;;;;;N;;;;; +1F5B0;TWO BUTTON MOUSE;So;0;ON;;;;;N;;;;; +1F5B1;THREE BUTTON MOUSE;So;0;ON;;;;;N;;;;; +1F5B2;TRACKBALL;So;0;ON;;;;;N;;;;; +1F5B3;OLD PERSONAL COMPUTER;So;0;ON;;;;;N;;;;; +1F5B4;HARD DISK;So;0;ON;;;;;N;;;;; +1F5B5;SCREEN;So;0;ON;;;;;N;;;;; +1F5B6;PRINTER ICON;So;0;ON;;;;;N;;;;; +1F5B7;FAX ICON;So;0;ON;;;;;N;;;;; +1F5B8;OPTICAL DISC ICON;So;0;ON;;;;;N;;;;; +1F5B9;DOCUMENT WITH TEXT;So;0;ON;;;;;N;;;;; +1F5BA;DOCUMENT WITH TEXT AND PICTURE;So;0;ON;;;;;N;;;;; +1F5BB;DOCUMENT WITH PICTURE;So;0;ON;;;;;N;;;;; +1F5BC;FRAME WITH PICTURE;So;0;ON;;;;;N;;;;; +1F5BD;FRAME WITH TILES;So;0;ON;;;;;N;;;;; +1F5BE;FRAME WITH AN X;So;0;ON;;;;;N;;;;; +1F5BF;BLACK FOLDER;So;0;ON;;;;;N;;;;; +1F5C0;FOLDER;So;0;ON;;;;;N;;;;; +1F5C1;OPEN FOLDER;So;0;ON;;;;;N;;;;; +1F5C2;CARD INDEX DIVIDERS;So;0;ON;;;;;N;;;;; +1F5C3;CARD FILE BOX;So;0;ON;;;;;N;;;;; +1F5C4;FILE CABINET;So;0;ON;;;;;N;;;;; +1F5C5;EMPTY NOTE;So;0;ON;;;;;N;;;;; +1F5C6;EMPTY NOTE PAGE;So;0;ON;;;;;N;;;;; +1F5C7;EMPTY NOTE PAD;So;0;ON;;;;;N;;;;; +1F5C8;NOTE;So;0;ON;;;;;N;;;;; +1F5C9;NOTE PAGE;So;0;ON;;;;;N;;;;; +1F5CA;NOTE PAD;So;0;ON;;;;;N;;;;; +1F5CB;EMPTY DOCUMENT;So;0;ON;;;;;N;;;;; +1F5CC;EMPTY PAGE;So;0;ON;;;;;N;;;;; +1F5CD;EMPTY PAGES;So;0;ON;;;;;N;;;;; +1F5CE;DOCUMENT;So;0;ON;;;;;N;;;;; +1F5CF;PAGE;So;0;ON;;;;;N;;;;; +1F5D0;PAGES;So;0;ON;;;;;N;;;;; +1F5D1;WASTEBASKET;So;0;ON;;;;;N;;;;; +1F5D2;SPIRAL NOTE PAD;So;0;ON;;;;;N;;;;; +1F5D3;SPIRAL CALENDAR PAD;So;0;ON;;;;;N;;;;; +1F5D4;DESKTOP WINDOW;So;0;ON;;;;;N;;;;; +1F5D5;MINIMIZE;So;0;ON;;;;;N;;;;; +1F5D6;MAXIMIZE;So;0;ON;;;;;N;;;;; +1F5D7;OVERLAP;So;0;ON;;;;;N;;;;; +1F5D8;CLOCKWISE RIGHT AND LEFT SEMICIRCLE ARROWS;So;0;ON;;;;;N;;;;; +1F5D9;CANCELLATION X;So;0;ON;;;;;N;;;;; +1F5DA;INCREASE FONT SIZE SYMBOL;So;0;ON;;;;;N;;;;; +1F5DB;DECREASE FONT SIZE SYMBOL;So;0;ON;;;;;N;;;;; +1F5DC;COMPRESSION;So;0;ON;;;;;N;;;;; +1F5DD;OLD KEY;So;0;ON;;;;;N;;;;; +1F5DE;ROLLED-UP NEWSPAPER;So;0;ON;;;;;N;;;;; +1F5DF;PAGE WITH CIRCLED TEXT;So;0;ON;;;;;N;;;;; +1F5E0;STOCK CHART;So;0;ON;;;;;N;;;;; +1F5E1;DAGGER KNIFE;So;0;ON;;;;;N;;;;; +1F5E2;LIPS;So;0;ON;;;;;N;;;;; +1F5E3;SPEAKING HEAD IN SILHOUETTE;So;0;ON;;;;;N;;;;; +1F5E4;THREE RAYS ABOVE;So;0;ON;;;;;N;;;;; +1F5E5;THREE RAYS BELOW;So;0;ON;;;;;N;;;;; +1F5E6;THREE RAYS LEFT;So;0;ON;;;;;N;;;;; +1F5E7;THREE RAYS RIGHT;So;0;ON;;;;;N;;;;; +1F5E8;LEFT SPEECH BUBBLE;So;0;ON;;;;;N;;;;; +1F5E9;RIGHT SPEECH BUBBLE;So;0;ON;;;;;N;;;;; +1F5EA;TWO SPEECH BUBBLES;So;0;ON;;;;;N;;;;; +1F5EB;THREE SPEECH BUBBLES;So;0;ON;;;;;N;;;;; +1F5EC;LEFT THOUGHT BUBBLE;So;0;ON;;;;;N;;;;; +1F5ED;RIGHT THOUGHT BUBBLE;So;0;ON;;;;;N;;;;; +1F5EE;LEFT ANGER BUBBLE;So;0;ON;;;;;N;;;;; +1F5EF;RIGHT ANGER BUBBLE;So;0;ON;;;;;N;;;;; +1F5F0;MOOD BUBBLE;So;0;ON;;;;;N;;;;; +1F5F1;LIGHTNING MOOD BUBBLE;So;0;ON;;;;;N;;;;; +1F5F2;LIGHTNING MOOD;So;0;ON;;;;;N;;;;; +1F5F3;BALLOT BOX WITH BALLOT;So;0;ON;;;;;N;;;;; +1F5F4;BALLOT SCRIPT X;So;0;ON;;;;;N;;;;; +1F5F5;BALLOT BOX WITH SCRIPT X;So;0;ON;;;;;N;;;;; +1F5F6;BALLOT BOLD SCRIPT X;So;0;ON;;;;;N;;;;; +1F5F7;BALLOT BOX WITH BOLD SCRIPT X;So;0;ON;;;;;N;;;;; +1F5F8;LIGHT CHECK MARK;So;0;ON;;;;;N;;;;; +1F5F9;BALLOT BOX WITH BOLD CHECK;So;0;ON;;;;;N;;;;; +1F5FA;WORLD MAP;So;0;ON;;;;;N;;;;; +1F5FB;MOUNT FUJI;So;0;ON;;;;;N;;;;; +1F5FC;TOKYO TOWER;So;0;ON;;;;;N;;;;; +1F5FD;STATUE OF LIBERTY;So;0;ON;;;;;N;;;;; +1F5FE;SILHOUETTE OF JAPAN;So;0;ON;;;;;N;;;;; +1F5FF;MOYAI;So;0;ON;;;;;N;;;;; +1F600;GRINNING FACE;So;0;ON;;;;;N;;;;; +1F601;GRINNING FACE WITH SMILING EYES;So;0;ON;;;;;N;;;;; +1F602;FACE WITH TEARS OF JOY;So;0;ON;;;;;N;;;;; +1F603;SMILING FACE WITH OPEN MOUTH;So;0;ON;;;;;N;;;;; +1F604;SMILING FACE WITH OPEN MOUTH AND SMILING EYES;So;0;ON;;;;;N;;;;; +1F605;SMILING FACE WITH OPEN MOUTH AND COLD SWEAT;So;0;ON;;;;;N;;;;; +1F606;SMILING FACE WITH OPEN MOUTH AND TIGHTLY-CLOSED EYES;So;0;ON;;;;;N;;;;; +1F607;SMILING FACE WITH HALO;So;0;ON;;;;;N;;;;; +1F608;SMILING FACE WITH HORNS;So;0;ON;;;;;N;;;;; +1F609;WINKING FACE;So;0;ON;;;;;N;;;;; +1F60A;SMILING FACE WITH SMILING EYES;So;0;ON;;;;;N;;;;; +1F60B;FACE SAVOURING DELICIOUS FOOD;So;0;ON;;;;;N;;;;; +1F60C;RELIEVED FACE;So;0;ON;;;;;N;;;;; +1F60D;SMILING FACE WITH HEART-SHAPED EYES;So;0;ON;;;;;N;;;;; +1F60E;SMILING FACE WITH SUNGLASSES;So;0;ON;;;;;N;;;;; +1F60F;SMIRKING FACE;So;0;ON;;;;;N;;;;; +1F610;NEUTRAL FACE;So;0;ON;;;;;N;;;;; +1F611;EXPRESSIONLESS FACE;So;0;ON;;;;;N;;;;; +1F612;UNAMUSED FACE;So;0;ON;;;;;N;;;;; +1F613;FACE WITH COLD SWEAT;So;0;ON;;;;;N;;;;; +1F614;PENSIVE FACE;So;0;ON;;;;;N;;;;; +1F615;CONFUSED FACE;So;0;ON;;;;;N;;;;; +1F616;CONFOUNDED FACE;So;0;ON;;;;;N;;;;; +1F617;KISSING FACE;So;0;ON;;;;;N;;;;; +1F618;FACE THROWING A KISS;So;0;ON;;;;;N;;;;; +1F619;KISSING FACE WITH SMILING EYES;So;0;ON;;;;;N;;;;; +1F61A;KISSING FACE WITH CLOSED EYES;So;0;ON;;;;;N;;;;; +1F61B;FACE WITH STUCK-OUT TONGUE;So;0;ON;;;;;N;;;;; +1F61C;FACE WITH STUCK-OUT TONGUE AND WINKING EYE;So;0;ON;;;;;N;;;;; +1F61D;FACE WITH STUCK-OUT TONGUE AND TIGHTLY-CLOSED EYES;So;0;ON;;;;;N;;;;; +1F61E;DISAPPOINTED FACE;So;0;ON;;;;;N;;;;; +1F61F;WORRIED FACE;So;0;ON;;;;;N;;;;; +1F620;ANGRY FACE;So;0;ON;;;;;N;;;;; +1F621;POUTING FACE;So;0;ON;;;;;N;;;;; +1F622;CRYING FACE;So;0;ON;;;;;N;;;;; +1F623;PERSEVERING FACE;So;0;ON;;;;;N;;;;; +1F624;FACE WITH LOOK OF TRIUMPH;So;0;ON;;;;;N;;;;; +1F625;DISAPPOINTED BUT RELIEVED FACE;So;0;ON;;;;;N;;;;; +1F626;FROWNING FACE WITH OPEN MOUTH;So;0;ON;;;;;N;;;;; +1F627;ANGUISHED FACE;So;0;ON;;;;;N;;;;; +1F628;FEARFUL FACE;So;0;ON;;;;;N;;;;; +1F629;WEARY FACE;So;0;ON;;;;;N;;;;; +1F62A;SLEEPY FACE;So;0;ON;;;;;N;;;;; +1F62B;TIRED FACE;So;0;ON;;;;;N;;;;; +1F62C;GRIMACING FACE;So;0;ON;;;;;N;;;;; +1F62D;LOUDLY CRYING FACE;So;0;ON;;;;;N;;;;; +1F62E;FACE WITH OPEN MOUTH;So;0;ON;;;;;N;;;;; +1F62F;HUSHED FACE;So;0;ON;;;;;N;;;;; +1F630;FACE WITH OPEN MOUTH AND COLD SWEAT;So;0;ON;;;;;N;;;;; +1F631;FACE SCREAMING IN FEAR;So;0;ON;;;;;N;;;;; +1F632;ASTONISHED FACE;So;0;ON;;;;;N;;;;; +1F633;FLUSHED FACE;So;0;ON;;;;;N;;;;; +1F634;SLEEPING FACE;So;0;ON;;;;;N;;;;; +1F635;DIZZY FACE;So;0;ON;;;;;N;;;;; +1F636;FACE WITHOUT MOUTH;So;0;ON;;;;;N;;;;; +1F637;FACE WITH MEDICAL MASK;So;0;ON;;;;;N;;;;; +1F638;GRINNING CAT FACE WITH SMILING EYES;So;0;ON;;;;;N;;;;; +1F639;CAT FACE WITH TEARS OF JOY;So;0;ON;;;;;N;;;;; +1F63A;SMILING CAT FACE WITH OPEN MOUTH;So;0;ON;;;;;N;;;;; +1F63B;SMILING CAT FACE WITH HEART-SHAPED EYES;So;0;ON;;;;;N;;;;; +1F63C;CAT FACE WITH WRY SMILE;So;0;ON;;;;;N;;;;; +1F63D;KISSING CAT FACE WITH CLOSED EYES;So;0;ON;;;;;N;;;;; +1F63E;POUTING CAT FACE;So;0;ON;;;;;N;;;;; +1F63F;CRYING CAT FACE;So;0;ON;;;;;N;;;;; +1F640;WEARY CAT FACE;So;0;ON;;;;;N;;;;; +1F641;SLIGHTLY FROWNING FACE;So;0;ON;;;;;N;;;;; +1F642;SLIGHTLY SMILING FACE;So;0;ON;;;;;N;;;;; +1F643;UPSIDE-DOWN FACE;So;0;ON;;;;;N;;;;; +1F644;FACE WITH ROLLING EYES;So;0;ON;;;;;N;;;;; +1F645;FACE WITH NO GOOD GESTURE;So;0;ON;;;;;N;;;;; +1F646;FACE WITH OK GESTURE;So;0;ON;;;;;N;;;;; +1F647;PERSON BOWING DEEPLY;So;0;ON;;;;;N;;;;; +1F648;SEE-NO-EVIL MONKEY;So;0;ON;;;;;N;;;;; +1F649;HEAR-NO-EVIL MONKEY;So;0;ON;;;;;N;;;;; +1F64A;SPEAK-NO-EVIL MONKEY;So;0;ON;;;;;N;;;;; +1F64B;HAPPY PERSON RAISING ONE HAND;So;0;ON;;;;;N;;;;; +1F64C;PERSON RAISING BOTH HANDS IN CELEBRATION;So;0;ON;;;;;N;;;;; +1F64D;PERSON FROWNING;So;0;ON;;;;;N;;;;; +1F64E;PERSON WITH POUTING FACE;So;0;ON;;;;;N;;;;; +1F64F;PERSON WITH FOLDED HANDS;So;0;ON;;;;;N;;;;; +1F650;NORTH WEST POINTING LEAF;So;0;ON;;;;;N;;;;; +1F651;SOUTH WEST POINTING LEAF;So;0;ON;;;;;N;;;;; +1F652;NORTH EAST POINTING LEAF;So;0;ON;;;;;N;;;;; +1F653;SOUTH EAST POINTING LEAF;So;0;ON;;;;;N;;;;; +1F654;TURNED NORTH WEST POINTING LEAF;So;0;ON;;;;;N;;;;; +1F655;TURNED SOUTH WEST POINTING LEAF;So;0;ON;;;;;N;;;;; +1F656;TURNED NORTH EAST POINTING LEAF;So;0;ON;;;;;N;;;;; +1F657;TURNED SOUTH EAST POINTING LEAF;So;0;ON;;;;;N;;;;; +1F658;NORTH WEST POINTING VINE LEAF;So;0;ON;;;;;N;;;;; +1F659;SOUTH WEST POINTING VINE LEAF;So;0;ON;;;;;N;;;;; +1F65A;NORTH EAST POINTING VINE LEAF;So;0;ON;;;;;N;;;;; +1F65B;SOUTH EAST POINTING VINE LEAF;So;0;ON;;;;;N;;;;; +1F65C;HEAVY NORTH WEST POINTING VINE LEAF;So;0;ON;;;;;N;;;;; +1F65D;HEAVY SOUTH WEST POINTING VINE LEAF;So;0;ON;;;;;N;;;;; +1F65E;HEAVY NORTH EAST POINTING VINE LEAF;So;0;ON;;;;;N;;;;; +1F65F;HEAVY SOUTH EAST POINTING VINE LEAF;So;0;ON;;;;;N;;;;; +1F660;NORTH WEST POINTING BUD;So;0;ON;;;;;N;;;;; +1F661;SOUTH WEST POINTING BUD;So;0;ON;;;;;N;;;;; +1F662;NORTH EAST POINTING BUD;So;0;ON;;;;;N;;;;; +1F663;SOUTH EAST POINTING BUD;So;0;ON;;;;;N;;;;; +1F664;HEAVY NORTH WEST POINTING BUD;So;0;ON;;;;;N;;;;; +1F665;HEAVY SOUTH WEST POINTING BUD;So;0;ON;;;;;N;;;;; +1F666;HEAVY NORTH EAST POINTING BUD;So;0;ON;;;;;N;;;;; +1F667;HEAVY SOUTH EAST POINTING BUD;So;0;ON;;;;;N;;;;; +1F668;HOLLOW QUILT SQUARE ORNAMENT;So;0;ON;;;;;N;;;;; +1F669;HOLLOW QUILT SQUARE ORNAMENT IN BLACK SQUARE;So;0;ON;;;;;N;;;;; +1F66A;SOLID QUILT SQUARE ORNAMENT;So;0;ON;;;;;N;;;;; +1F66B;SOLID QUILT SQUARE ORNAMENT IN BLACK SQUARE;So;0;ON;;;;;N;;;;; +1F66C;LEFTWARDS ROCKET;So;0;ON;;;;;N;;;;; +1F66D;UPWARDS ROCKET;So;0;ON;;;;;N;;;;; +1F66E;RIGHTWARDS ROCKET;So;0;ON;;;;;N;;;;; +1F66F;DOWNWARDS ROCKET;So;0;ON;;;;;N;;;;; +1F670;SCRIPT LIGATURE ET ORNAMENT;So;0;ON;;;;;N;;;;; +1F671;HEAVY SCRIPT LIGATURE ET ORNAMENT;So;0;ON;;;;;N;;;;; +1F672;LIGATURE OPEN ET ORNAMENT;So;0;ON;;;;;N;;;;; +1F673;HEAVY LIGATURE OPEN ET ORNAMENT;So;0;ON;;;;;N;;;;; +1F674;HEAVY AMPERSAND ORNAMENT;So;0;ON;;;;;N;;;;; +1F675;SWASH AMPERSAND ORNAMENT;So;0;ON;;;;;N;;;;; +1F676;SANS-SERIF HEAVY DOUBLE TURNED COMMA QUOTATION MARK ORNAMENT;So;0;ON;;;;;N;;;;; +1F677;SANS-SERIF HEAVY DOUBLE COMMA QUOTATION MARK ORNAMENT;So;0;ON;;;;;N;;;;; +1F678;SANS-SERIF HEAVY LOW DOUBLE COMMA QUOTATION MARK ORNAMENT;So;0;ON;;;;;N;;;;; +1F679;HEAVY INTERROBANG ORNAMENT;So;0;ON;;;;;N;;;;; +1F67A;SANS-SERIF INTERROBANG ORNAMENT;So;0;ON;;;;;N;;;;; +1F67B;HEAVY SANS-SERIF INTERROBANG ORNAMENT;So;0;ON;;;;;N;;;;; +1F67C;VERY HEAVY SOLIDUS;So;0;ON;;;;;N;;;;; +1F67D;VERY HEAVY REVERSE SOLIDUS;So;0;ON;;;;;N;;;;; +1F67E;CHECKER BOARD;So;0;ON;;;;;N;;;;; +1F67F;REVERSE CHECKER BOARD;So;0;ON;;;;;N;;;;; +1F680;ROCKET;So;0;ON;;;;;N;;;;; +1F681;HELICOPTER;So;0;ON;;;;;N;;;;; +1F682;STEAM LOCOMOTIVE;So;0;ON;;;;;N;;;;; +1F683;RAILWAY CAR;So;0;ON;;;;;N;;;;; +1F684;HIGH-SPEED TRAIN;So;0;ON;;;;;N;;;;; +1F685;HIGH-SPEED TRAIN WITH BULLET NOSE;So;0;ON;;;;;N;;;;; +1F686;TRAIN;So;0;ON;;;;;N;;;;; +1F687;METRO;So;0;ON;;;;;N;;;;; +1F688;LIGHT RAIL;So;0;ON;;;;;N;;;;; +1F689;STATION;So;0;ON;;;;;N;;;;; +1F68A;TRAM;So;0;ON;;;;;N;;;;; +1F68B;TRAM CAR;So;0;ON;;;;;N;;;;; +1F68C;BUS;So;0;ON;;;;;N;;;;; +1F68D;ONCOMING BUS;So;0;ON;;;;;N;;;;; +1F68E;TROLLEYBUS;So;0;ON;;;;;N;;;;; +1F68F;BUS STOP;So;0;ON;;;;;N;;;;; +1F690;MINIBUS;So;0;ON;;;;;N;;;;; +1F691;AMBULANCE;So;0;ON;;;;;N;;;;; +1F692;FIRE ENGINE;So;0;ON;;;;;N;;;;; +1F693;POLICE CAR;So;0;ON;;;;;N;;;;; +1F694;ONCOMING POLICE CAR;So;0;ON;;;;;N;;;;; +1F695;TAXI;So;0;ON;;;;;N;;;;; +1F696;ONCOMING TAXI;So;0;ON;;;;;N;;;;; +1F697;AUTOMOBILE;So;0;ON;;;;;N;;;;; +1F698;ONCOMING AUTOMOBILE;So;0;ON;;;;;N;;;;; +1F699;RECREATIONAL VEHICLE;So;0;ON;;;;;N;;;;; +1F69A;DELIVERY TRUCK;So;0;ON;;;;;N;;;;; +1F69B;ARTICULATED LORRY;So;0;ON;;;;;N;;;;; +1F69C;TRACTOR;So;0;ON;;;;;N;;;;; +1F69D;MONORAIL;So;0;ON;;;;;N;;;;; +1F69E;MOUNTAIN RAILWAY;So;0;ON;;;;;N;;;;; +1F69F;SUSPENSION RAILWAY;So;0;ON;;;;;N;;;;; +1F6A0;MOUNTAIN CABLEWAY;So;0;ON;;;;;N;;;;; +1F6A1;AERIAL TRAMWAY;So;0;ON;;;;;N;;;;; +1F6A2;SHIP;So;0;ON;;;;;N;;;;; +1F6A3;ROWBOAT;So;0;ON;;;;;N;;;;; +1F6A4;SPEEDBOAT;So;0;ON;;;;;N;;;;; +1F6A5;HORIZONTAL TRAFFIC LIGHT;So;0;ON;;;;;N;;;;; +1F6A6;VERTICAL TRAFFIC LIGHT;So;0;ON;;;;;N;;;;; +1F6A7;CONSTRUCTION SIGN;So;0;ON;;;;;N;;;;; +1F6A8;POLICE CARS REVOLVING LIGHT;So;0;ON;;;;;N;;;;; +1F6A9;TRIANGULAR FLAG ON POST;So;0;ON;;;;;N;;;;; +1F6AA;DOOR;So;0;ON;;;;;N;;;;; +1F6AB;NO ENTRY SIGN;So;0;ON;;;;;N;;;;; +1F6AC;SMOKING SYMBOL;So;0;ON;;;;;N;;;;; +1F6AD;NO SMOKING SYMBOL;So;0;ON;;;;;N;;;;; +1F6AE;PUT LITTER IN ITS PLACE SYMBOL;So;0;ON;;;;;N;;;;; +1F6AF;DO NOT LITTER SYMBOL;So;0;ON;;;;;N;;;;; +1F6B0;POTABLE WATER SYMBOL;So;0;ON;;;;;N;;;;; +1F6B1;NON-POTABLE WATER SYMBOL;So;0;ON;;;;;N;;;;; +1F6B2;BICYCLE;So;0;ON;;;;;N;;;;; +1F6B3;NO BICYCLES;So;0;ON;;;;;N;;;;; +1F6B4;BICYCLIST;So;0;ON;;;;;N;;;;; +1F6B5;MOUNTAIN BICYCLIST;So;0;ON;;;;;N;;;;; +1F6B6;PEDESTRIAN;So;0;ON;;;;;N;;;;; +1F6B7;NO PEDESTRIANS;So;0;ON;;;;;N;;;;; +1F6B8;CHILDREN CROSSING;So;0;ON;;;;;N;;;;; +1F6B9;MENS SYMBOL;So;0;ON;;;;;N;;;;; +1F6BA;WOMENS SYMBOL;So;0;ON;;;;;N;;;;; +1F6BB;RESTROOM;So;0;ON;;;;;N;;;;; +1F6BC;BABY SYMBOL;So;0;ON;;;;;N;;;;; +1F6BD;TOILET;So;0;ON;;;;;N;;;;; +1F6BE;WATER CLOSET;So;0;ON;;;;;N;;;;; +1F6BF;SHOWER;So;0;ON;;;;;N;;;;; +1F6C0;BATH;So;0;ON;;;;;N;;;;; +1F6C1;BATHTUB;So;0;ON;;;;;N;;;;; +1F6C2;PASSPORT CONTROL;So;0;ON;;;;;N;;;;; +1F6C3;CUSTOMS;So;0;ON;;;;;N;;;;; +1F6C4;BAGGAGE CLAIM;So;0;ON;;;;;N;;;;; +1F6C5;LEFT LUGGAGE;So;0;ON;;;;;N;;;;; +1F6C6;TRIANGLE WITH ROUNDED CORNERS;So;0;ON;;;;;N;;;;; +1F6C7;PROHIBITED SIGN;So;0;ON;;;;;N;;;;; +1F6C8;CIRCLED INFORMATION SOURCE;So;0;ON;;;;;N;;;;; +1F6C9;BOYS SYMBOL;So;0;ON;;;;;N;;;;; +1F6CA;GIRLS SYMBOL;So;0;ON;;;;;N;;;;; +1F6CB;COUCH AND LAMP;So;0;ON;;;;;N;;;;; +1F6CC;SLEEPING ACCOMMODATION;So;0;ON;;;;;N;;;;; +1F6CD;SHOPPING BAGS;So;0;ON;;;;;N;;;;; +1F6CE;BELLHOP BELL;So;0;ON;;;;;N;;;;; +1F6CF;BED;So;0;ON;;;;;N;;;;; +1F6D0;PLACE OF WORSHIP;So;0;ON;;;;;N;;;;; +1F6D1;OCTAGONAL SIGN;So;0;ON;;;;;N;;;;; +1F6D2;SHOPPING TROLLEY;So;0;ON;;;;;N;;;;; +1F6D3;STUPA;So;0;ON;;;;;N;;;;; +1F6D4;PAGODA;So;0;ON;;;;;N;;;;; +1F6D5;HINDU TEMPLE;So;0;ON;;;;;N;;;;; +1F6E0;HAMMER AND WRENCH;So;0;ON;;;;;N;;;;; +1F6E1;SHIELD;So;0;ON;;;;;N;;;;; +1F6E2;OIL DRUM;So;0;ON;;;;;N;;;;; +1F6E3;MOTORWAY;So;0;ON;;;;;N;;;;; +1F6E4;RAILWAY TRACK;So;0;ON;;;;;N;;;;; +1F6E5;MOTOR BOAT;So;0;ON;;;;;N;;;;; +1F6E6;UP-POINTING MILITARY AIRPLANE;So;0;ON;;;;;N;;;;; +1F6E7;UP-POINTING AIRPLANE;So;0;ON;;;;;N;;;;; +1F6E8;UP-POINTING SMALL AIRPLANE;So;0;ON;;;;;N;;;;; +1F6E9;SMALL AIRPLANE;So;0;ON;;;;;N;;;;; +1F6EA;NORTHEAST-POINTING AIRPLANE;So;0;ON;;;;;N;;;;; +1F6EB;AIRPLANE DEPARTURE;So;0;ON;;;;;N;;;;; +1F6EC;AIRPLANE ARRIVING;So;0;ON;;;;;N;;;;; +1F6F0;SATELLITE;So;0;ON;;;;;N;;;;; +1F6F1;ONCOMING FIRE ENGINE;So;0;ON;;;;;N;;;;; +1F6F2;DIESEL LOCOMOTIVE;So;0;ON;;;;;N;;;;; +1F6F3;PASSENGER SHIP;So;0;ON;;;;;N;;;;; +1F6F4;SCOOTER;So;0;ON;;;;;N;;;;; +1F6F5;MOTOR SCOOTER;So;0;ON;;;;;N;;;;; +1F6F6;CANOE;So;0;ON;;;;;N;;;;; +1F6F7;SLED;So;0;ON;;;;;N;;;;; +1F6F8;FLYING SAUCER;So;0;ON;;;;;N;;;;; +1F6F9;SKATEBOARD;So;0;ON;;;;;N;;;;; +1F6FA;AUTO RICKSHAW;So;0;ON;;;;;N;;;;; +1F700;ALCHEMICAL SYMBOL FOR QUINTESSENCE;So;0;ON;;;;;N;;;;; +1F701;ALCHEMICAL SYMBOL FOR AIR;So;0;ON;;;;;N;;;;; +1F702;ALCHEMICAL SYMBOL FOR FIRE;So;0;ON;;;;;N;;;;; +1F703;ALCHEMICAL SYMBOL FOR EARTH;So;0;ON;;;;;N;;;;; +1F704;ALCHEMICAL SYMBOL FOR WATER;So;0;ON;;;;;N;;;;; +1F705;ALCHEMICAL SYMBOL FOR AQUAFORTIS;So;0;ON;;;;;N;;;;; +1F706;ALCHEMICAL SYMBOL FOR AQUA REGIA;So;0;ON;;;;;N;;;;; +1F707;ALCHEMICAL SYMBOL FOR AQUA REGIA-2;So;0;ON;;;;;N;;;;; +1F708;ALCHEMICAL SYMBOL FOR AQUA VITAE;So;0;ON;;;;;N;;;;; +1F709;ALCHEMICAL SYMBOL FOR AQUA VITAE-2;So;0;ON;;;;;N;;;;; +1F70A;ALCHEMICAL SYMBOL FOR VINEGAR;So;0;ON;;;;;N;;;;; +1F70B;ALCHEMICAL SYMBOL FOR VINEGAR-2;So;0;ON;;;;;N;;;;; +1F70C;ALCHEMICAL SYMBOL FOR VINEGAR-3;So;0;ON;;;;;N;;;;; +1F70D;ALCHEMICAL SYMBOL FOR SULFUR;So;0;ON;;;;;N;;;;; +1F70E;ALCHEMICAL SYMBOL FOR PHILOSOPHERS SULFUR;So;0;ON;;;;;N;;;;; +1F70F;ALCHEMICAL SYMBOL FOR BLACK SULFUR;So;0;ON;;;;;N;;;;; +1F710;ALCHEMICAL SYMBOL FOR MERCURY SUBLIMATE;So;0;ON;;;;;N;;;;; +1F711;ALCHEMICAL SYMBOL FOR MERCURY SUBLIMATE-2;So;0;ON;;;;;N;;;;; +1F712;ALCHEMICAL SYMBOL FOR MERCURY SUBLIMATE-3;So;0;ON;;;;;N;;;;; +1F713;ALCHEMICAL SYMBOL FOR CINNABAR;So;0;ON;;;;;N;;;;; +1F714;ALCHEMICAL SYMBOL FOR SALT;So;0;ON;;;;;N;;;;; +1F715;ALCHEMICAL SYMBOL FOR NITRE;So;0;ON;;;;;N;;;;; +1F716;ALCHEMICAL SYMBOL FOR VITRIOL;So;0;ON;;;;;N;;;;; +1F717;ALCHEMICAL SYMBOL FOR VITRIOL-2;So;0;ON;;;;;N;;;;; +1F718;ALCHEMICAL SYMBOL FOR ROCK SALT;So;0;ON;;;;;N;;;;; +1F719;ALCHEMICAL SYMBOL FOR ROCK SALT-2;So;0;ON;;;;;N;;;;; +1F71A;ALCHEMICAL SYMBOL FOR GOLD;So;0;ON;;;;;N;;;;; +1F71B;ALCHEMICAL SYMBOL FOR SILVER;So;0;ON;;;;;N;;;;; +1F71C;ALCHEMICAL SYMBOL FOR IRON ORE;So;0;ON;;;;;N;;;;; +1F71D;ALCHEMICAL SYMBOL FOR IRON ORE-2;So;0;ON;;;;;N;;;;; +1F71E;ALCHEMICAL SYMBOL FOR CROCUS OF IRON;So;0;ON;;;;;N;;;;; +1F71F;ALCHEMICAL SYMBOL FOR REGULUS OF IRON;So;0;ON;;;;;N;;;;; +1F720;ALCHEMICAL SYMBOL FOR COPPER ORE;So;0;ON;;;;;N;;;;; +1F721;ALCHEMICAL SYMBOL FOR IRON-COPPER ORE;So;0;ON;;;;;N;;;;; +1F722;ALCHEMICAL SYMBOL FOR SUBLIMATE OF COPPER;So;0;ON;;;;;N;;;;; +1F723;ALCHEMICAL SYMBOL FOR CROCUS OF COPPER;So;0;ON;;;;;N;;;;; +1F724;ALCHEMICAL SYMBOL FOR CROCUS OF COPPER-2;So;0;ON;;;;;N;;;;; +1F725;ALCHEMICAL SYMBOL FOR COPPER ANTIMONIATE;So;0;ON;;;;;N;;;;; +1F726;ALCHEMICAL SYMBOL FOR SALT OF COPPER ANTIMONIATE;So;0;ON;;;;;N;;;;; +1F727;ALCHEMICAL SYMBOL FOR SUBLIMATE OF SALT OF COPPER;So;0;ON;;;;;N;;;;; +1F728;ALCHEMICAL SYMBOL FOR VERDIGRIS;So;0;ON;;;;;N;;;;; +1F729;ALCHEMICAL SYMBOL FOR TIN ORE;So;0;ON;;;;;N;;;;; +1F72A;ALCHEMICAL SYMBOL FOR LEAD ORE;So;0;ON;;;;;N;;;;; +1F72B;ALCHEMICAL SYMBOL FOR ANTIMONY ORE;So;0;ON;;;;;N;;;;; +1F72C;ALCHEMICAL SYMBOL FOR SUBLIMATE OF ANTIMONY;So;0;ON;;;;;N;;;;; +1F72D;ALCHEMICAL SYMBOL FOR SALT OF ANTIMONY;So;0;ON;;;;;N;;;;; +1F72E;ALCHEMICAL SYMBOL FOR SUBLIMATE OF SALT OF ANTIMONY;So;0;ON;;;;;N;;;;; +1F72F;ALCHEMICAL SYMBOL FOR VINEGAR OF ANTIMONY;So;0;ON;;;;;N;;;;; +1F730;ALCHEMICAL SYMBOL FOR REGULUS OF ANTIMONY;So;0;ON;;;;;N;;;;; +1F731;ALCHEMICAL SYMBOL FOR REGULUS OF ANTIMONY-2;So;0;ON;;;;;N;;;;; +1F732;ALCHEMICAL SYMBOL FOR REGULUS;So;0;ON;;;;;N;;;;; +1F733;ALCHEMICAL SYMBOL FOR REGULUS-2;So;0;ON;;;;;N;;;;; +1F734;ALCHEMICAL SYMBOL FOR REGULUS-3;So;0;ON;;;;;N;;;;; +1F735;ALCHEMICAL SYMBOL FOR REGULUS-4;So;0;ON;;;;;N;;;;; +1F736;ALCHEMICAL SYMBOL FOR ALKALI;So;0;ON;;;;;N;;;;; +1F737;ALCHEMICAL SYMBOL FOR ALKALI-2;So;0;ON;;;;;N;;;;; +1F738;ALCHEMICAL SYMBOL FOR MARCASITE;So;0;ON;;;;;N;;;;; +1F739;ALCHEMICAL SYMBOL FOR SAL-AMMONIAC;So;0;ON;;;;;N;;;;; +1F73A;ALCHEMICAL SYMBOL FOR ARSENIC;So;0;ON;;;;;N;;;;; +1F73B;ALCHEMICAL SYMBOL FOR REALGAR;So;0;ON;;;;;N;;;;; +1F73C;ALCHEMICAL SYMBOL FOR REALGAR-2;So;0;ON;;;;;N;;;;; +1F73D;ALCHEMICAL SYMBOL FOR AURIPIGMENT;So;0;ON;;;;;N;;;;; +1F73E;ALCHEMICAL SYMBOL FOR BISMUTH ORE;So;0;ON;;;;;N;;;;; +1F73F;ALCHEMICAL SYMBOL FOR TARTAR;So;0;ON;;;;;N;;;;; +1F740;ALCHEMICAL SYMBOL FOR TARTAR-2;So;0;ON;;;;;N;;;;; +1F741;ALCHEMICAL SYMBOL FOR QUICK LIME;So;0;ON;;;;;N;;;;; +1F742;ALCHEMICAL SYMBOL FOR BORAX;So;0;ON;;;;;N;;;;; +1F743;ALCHEMICAL SYMBOL FOR BORAX-2;So;0;ON;;;;;N;;;;; +1F744;ALCHEMICAL SYMBOL FOR BORAX-3;So;0;ON;;;;;N;;;;; +1F745;ALCHEMICAL SYMBOL FOR ALUM;So;0;ON;;;;;N;;;;; +1F746;ALCHEMICAL SYMBOL FOR OIL;So;0;ON;;;;;N;;;;; +1F747;ALCHEMICAL SYMBOL FOR SPIRIT;So;0;ON;;;;;N;;;;; +1F748;ALCHEMICAL SYMBOL FOR TINCTURE;So;0;ON;;;;;N;;;;; +1F749;ALCHEMICAL SYMBOL FOR GUM;So;0;ON;;;;;N;;;;; +1F74A;ALCHEMICAL SYMBOL FOR WAX;So;0;ON;;;;;N;;;;; +1F74B;ALCHEMICAL SYMBOL FOR POWDER;So;0;ON;;;;;N;;;;; +1F74C;ALCHEMICAL SYMBOL FOR CALX;So;0;ON;;;;;N;;;;; +1F74D;ALCHEMICAL SYMBOL FOR TUTTY;So;0;ON;;;;;N;;;;; +1F74E;ALCHEMICAL SYMBOL FOR CAPUT MORTUUM;So;0;ON;;;;;N;;;;; +1F74F;ALCHEMICAL SYMBOL FOR SCEPTER OF JOVE;So;0;ON;;;;;N;;;;; +1F750;ALCHEMICAL SYMBOL FOR CADUCEUS;So;0;ON;;;;;N;;;;; +1F751;ALCHEMICAL SYMBOL FOR TRIDENT;So;0;ON;;;;;N;;;;; +1F752;ALCHEMICAL SYMBOL FOR STARRED TRIDENT;So;0;ON;;;;;N;;;;; +1F753;ALCHEMICAL SYMBOL FOR LODESTONE;So;0;ON;;;;;N;;;;; +1F754;ALCHEMICAL SYMBOL FOR SOAP;So;0;ON;;;;;N;;;;; +1F755;ALCHEMICAL SYMBOL FOR URINE;So;0;ON;;;;;N;;;;; +1F756;ALCHEMICAL SYMBOL FOR HORSE DUNG;So;0;ON;;;;;N;;;;; +1F757;ALCHEMICAL SYMBOL FOR ASHES;So;0;ON;;;;;N;;;;; +1F758;ALCHEMICAL SYMBOL FOR POT ASHES;So;0;ON;;;;;N;;;;; +1F759;ALCHEMICAL SYMBOL FOR BRICK;So;0;ON;;;;;N;;;;; +1F75A;ALCHEMICAL SYMBOL FOR POWDERED BRICK;So;0;ON;;;;;N;;;;; +1F75B;ALCHEMICAL SYMBOL FOR AMALGAM;So;0;ON;;;;;N;;;;; +1F75C;ALCHEMICAL SYMBOL FOR STRATUM SUPER STRATUM;So;0;ON;;;;;N;;;;; +1F75D;ALCHEMICAL SYMBOL FOR STRATUM SUPER STRATUM-2;So;0;ON;;;;;N;;;;; +1F75E;ALCHEMICAL SYMBOL FOR SUBLIMATION;So;0;ON;;;;;N;;;;; +1F75F;ALCHEMICAL SYMBOL FOR PRECIPITATE;So;0;ON;;;;;N;;;;; +1F760;ALCHEMICAL SYMBOL FOR DISTILL;So;0;ON;;;;;N;;;;; +1F761;ALCHEMICAL SYMBOL FOR DISSOLVE;So;0;ON;;;;;N;;;;; +1F762;ALCHEMICAL SYMBOL FOR DISSOLVE-2;So;0;ON;;;;;N;;;;; +1F763;ALCHEMICAL SYMBOL FOR PURIFY;So;0;ON;;;;;N;;;;; +1F764;ALCHEMICAL SYMBOL FOR PUTREFACTION;So;0;ON;;;;;N;;;;; +1F765;ALCHEMICAL SYMBOL FOR CRUCIBLE;So;0;ON;;;;;N;;;;; +1F766;ALCHEMICAL SYMBOL FOR CRUCIBLE-2;So;0;ON;;;;;N;;;;; +1F767;ALCHEMICAL SYMBOL FOR CRUCIBLE-3;So;0;ON;;;;;N;;;;; +1F768;ALCHEMICAL SYMBOL FOR CRUCIBLE-4;So;0;ON;;;;;N;;;;; +1F769;ALCHEMICAL SYMBOL FOR CRUCIBLE-5;So;0;ON;;;;;N;;;;; +1F76A;ALCHEMICAL SYMBOL FOR ALEMBIC;So;0;ON;;;;;N;;;;; +1F76B;ALCHEMICAL SYMBOL FOR BATH OF MARY;So;0;ON;;;;;N;;;;; +1F76C;ALCHEMICAL SYMBOL FOR BATH OF VAPOURS;So;0;ON;;;;;N;;;;; +1F76D;ALCHEMICAL SYMBOL FOR RETORT;So;0;ON;;;;;N;;;;; +1F76E;ALCHEMICAL SYMBOL FOR HOUR;So;0;ON;;;;;N;;;;; +1F76F;ALCHEMICAL SYMBOL FOR NIGHT;So;0;ON;;;;;N;;;;; +1F770;ALCHEMICAL SYMBOL FOR DAY-NIGHT;So;0;ON;;;;;N;;;;; +1F771;ALCHEMICAL SYMBOL FOR MONTH;So;0;ON;;;;;N;;;;; +1F772;ALCHEMICAL SYMBOL FOR HALF DRAM;So;0;ON;;;;;N;;;;; +1F773;ALCHEMICAL SYMBOL FOR HALF OUNCE;So;0;ON;;;;;N;;;;; +1F780;BLACK LEFT-POINTING ISOSCELES RIGHT TRIANGLE;So;0;ON;;;;;N;;;;; +1F781;BLACK UP-POINTING ISOSCELES RIGHT TRIANGLE;So;0;ON;;;;;N;;;;; +1F782;BLACK RIGHT-POINTING ISOSCELES RIGHT TRIANGLE;So;0;ON;;;;;N;;;;; +1F783;BLACK DOWN-POINTING ISOSCELES RIGHT TRIANGLE;So;0;ON;;;;;N;;;;; +1F784;BLACK SLIGHTLY SMALL CIRCLE;So;0;ON;;;;;N;;;;; +1F785;MEDIUM BOLD WHITE CIRCLE;So;0;ON;;;;;N;;;;; +1F786;BOLD WHITE CIRCLE;So;0;ON;;;;;N;;;;; +1F787;HEAVY WHITE CIRCLE;So;0;ON;;;;;N;;;;; +1F788;VERY HEAVY WHITE CIRCLE;So;0;ON;;;;;N;;;;; +1F789;EXTREMELY HEAVY WHITE CIRCLE;So;0;ON;;;;;N;;;;; +1F78A;WHITE CIRCLE CONTAINING BLACK SMALL CIRCLE;So;0;ON;;;;;N;;;;; +1F78B;ROUND TARGET;So;0;ON;;;;;N;;;;; +1F78C;BLACK TINY SQUARE;So;0;ON;;;;;N;;;;; +1F78D;BLACK SLIGHTLY SMALL SQUARE;So;0;ON;;;;;N;;;;; +1F78E;LIGHT WHITE SQUARE;So;0;ON;;;;;N;;;;; +1F78F;MEDIUM WHITE SQUARE;So;0;ON;;;;;N;;;;; +1F790;BOLD WHITE SQUARE;So;0;ON;;;;;N;;;;; +1F791;HEAVY WHITE SQUARE;So;0;ON;;;;;N;;;;; +1F792;VERY HEAVY WHITE SQUARE;So;0;ON;;;;;N;;;;; +1F793;EXTREMELY HEAVY WHITE SQUARE;So;0;ON;;;;;N;;;;; +1F794;WHITE SQUARE CONTAINING BLACK VERY SMALL SQUARE;So;0;ON;;;;;N;;;;; +1F795;WHITE SQUARE CONTAINING BLACK MEDIUM SQUARE;So;0;ON;;;;;N;;;;; +1F796;SQUARE TARGET;So;0;ON;;;;;N;;;;; +1F797;BLACK TINY DIAMOND;So;0;ON;;;;;N;;;;; +1F798;BLACK VERY SMALL DIAMOND;So;0;ON;;;;;N;;;;; +1F799;BLACK MEDIUM SMALL DIAMOND;So;0;ON;;;;;N;;;;; +1F79A;WHITE DIAMOND CONTAINING BLACK VERY SMALL DIAMOND;So;0;ON;;;;;N;;;;; +1F79B;WHITE DIAMOND CONTAINING BLACK MEDIUM DIAMOND;So;0;ON;;;;;N;;;;; +1F79C;DIAMOND TARGET;So;0;ON;;;;;N;;;;; +1F79D;BLACK TINY LOZENGE;So;0;ON;;;;;N;;;;; +1F79E;BLACK VERY SMALL LOZENGE;So;0;ON;;;;;N;;;;; +1F79F;BLACK MEDIUM SMALL LOZENGE;So;0;ON;;;;;N;;;;; +1F7A0;WHITE LOZENGE CONTAINING BLACK SMALL LOZENGE;So;0;ON;;;;;N;;;;; +1F7A1;THIN GREEK CROSS;So;0;ON;;;;;N;;;;; +1F7A2;LIGHT GREEK CROSS;So;0;ON;;;;;N;;;;; +1F7A3;MEDIUM GREEK CROSS;So;0;ON;;;;;N;;;;; +1F7A4;BOLD GREEK CROSS;So;0;ON;;;;;N;;;;; +1F7A5;VERY BOLD GREEK CROSS;So;0;ON;;;;;N;;;;; +1F7A6;VERY HEAVY GREEK CROSS;So;0;ON;;;;;N;;;;; +1F7A7;EXTREMELY HEAVY GREEK CROSS;So;0;ON;;;;;N;;;;; +1F7A8;THIN SALTIRE;So;0;ON;;;;;N;;;;; +1F7A9;LIGHT SALTIRE;So;0;ON;;;;;N;;;;; +1F7AA;MEDIUM SALTIRE;So;0;ON;;;;;N;;;;; +1F7AB;BOLD SALTIRE;So;0;ON;;;;;N;;;;; +1F7AC;HEAVY SALTIRE;So;0;ON;;;;;N;;;;; +1F7AD;VERY HEAVY SALTIRE;So;0;ON;;;;;N;;;;; +1F7AE;EXTREMELY HEAVY SALTIRE;So;0;ON;;;;;N;;;;; +1F7AF;LIGHT FIVE SPOKED ASTERISK;So;0;ON;;;;;N;;;;; +1F7B0;MEDIUM FIVE SPOKED ASTERISK;So;0;ON;;;;;N;;;;; +1F7B1;BOLD FIVE SPOKED ASTERISK;So;0;ON;;;;;N;;;;; +1F7B2;HEAVY FIVE SPOKED ASTERISK;So;0;ON;;;;;N;;;;; +1F7B3;VERY HEAVY FIVE SPOKED ASTERISK;So;0;ON;;;;;N;;;;; +1F7B4;EXTREMELY HEAVY FIVE SPOKED ASTERISK;So;0;ON;;;;;N;;;;; +1F7B5;LIGHT SIX SPOKED ASTERISK;So;0;ON;;;;;N;;;;; +1F7B6;MEDIUM SIX SPOKED ASTERISK;So;0;ON;;;;;N;;;;; +1F7B7;BOLD SIX SPOKED ASTERISK;So;0;ON;;;;;N;;;;; +1F7B8;HEAVY SIX SPOKED ASTERISK;So;0;ON;;;;;N;;;;; +1F7B9;VERY HEAVY SIX SPOKED ASTERISK;So;0;ON;;;;;N;;;;; +1F7BA;EXTREMELY HEAVY SIX SPOKED ASTERISK;So;0;ON;;;;;N;;;;; +1F7BB;LIGHT EIGHT SPOKED ASTERISK;So;0;ON;;;;;N;;;;; +1F7BC;MEDIUM EIGHT SPOKED ASTERISK;So;0;ON;;;;;N;;;;; +1F7BD;BOLD EIGHT SPOKED ASTERISK;So;0;ON;;;;;N;;;;; +1F7BE;HEAVY EIGHT SPOKED ASTERISK;So;0;ON;;;;;N;;;;; +1F7BF;VERY HEAVY EIGHT SPOKED ASTERISK;So;0;ON;;;;;N;;;;; +1F7C0;LIGHT THREE POINTED BLACK STAR;So;0;ON;;;;;N;;;;; +1F7C1;MEDIUM THREE POINTED BLACK STAR;So;0;ON;;;;;N;;;;; +1F7C2;THREE POINTED BLACK STAR;So;0;ON;;;;;N;;;;; +1F7C3;MEDIUM THREE POINTED PINWHEEL STAR;So;0;ON;;;;;N;;;;; +1F7C4;LIGHT FOUR POINTED BLACK STAR;So;0;ON;;;;;N;;;;; +1F7C5;MEDIUM FOUR POINTED BLACK STAR;So;0;ON;;;;;N;;;;; +1F7C6;FOUR POINTED BLACK STAR;So;0;ON;;;;;N;;;;; +1F7C7;MEDIUM FOUR POINTED PINWHEEL STAR;So;0;ON;;;;;N;;;;; +1F7C8;REVERSE LIGHT FOUR POINTED PINWHEEL STAR;So;0;ON;;;;;N;;;;; +1F7C9;LIGHT FIVE POINTED BLACK STAR;So;0;ON;;;;;N;;;;; +1F7CA;HEAVY FIVE POINTED BLACK STAR;So;0;ON;;;;;N;;;;; +1F7CB;MEDIUM SIX POINTED BLACK STAR;So;0;ON;;;;;N;;;;; +1F7CC;HEAVY SIX POINTED BLACK STAR;So;0;ON;;;;;N;;;;; +1F7CD;SIX POINTED PINWHEEL STAR;So;0;ON;;;;;N;;;;; +1F7CE;MEDIUM EIGHT POINTED BLACK STAR;So;0;ON;;;;;N;;;;; +1F7CF;HEAVY EIGHT POINTED BLACK STAR;So;0;ON;;;;;N;;;;; +1F7D0;VERY HEAVY EIGHT POINTED BLACK STAR;So;0;ON;;;;;N;;;;; +1F7D1;HEAVY EIGHT POINTED PINWHEEL STAR;So;0;ON;;;;;N;;;;; +1F7D2;LIGHT TWELVE POINTED BLACK STAR;So;0;ON;;;;;N;;;;; +1F7D3;HEAVY TWELVE POINTED BLACK STAR;So;0;ON;;;;;N;;;;; +1F7D4;HEAVY TWELVE POINTED PINWHEEL STAR;So;0;ON;;;;;N;;;;; +1F7D5;CIRCLED TRIANGLE;So;0;ON;;;;;N;;;;; +1F7D6;NEGATIVE CIRCLED TRIANGLE;So;0;ON;;;;;N;;;;; +1F7D7;CIRCLED SQUARE;So;0;ON;;;;;N;;;;; +1F7D8;NEGATIVE CIRCLED SQUARE;So;0;ON;;;;;N;;;;; +1F7E0;LARGE ORANGE CIRCLE;So;0;ON;;;;;N;;;;; +1F7E1;LARGE YELLOW CIRCLE;So;0;ON;;;;;N;;;;; +1F7E2;LARGE GREEN CIRCLE;So;0;ON;;;;;N;;;;; +1F7E3;LARGE PURPLE CIRCLE;So;0;ON;;;;;N;;;;; +1F7E4;LARGE BROWN CIRCLE;So;0;ON;;;;;N;;;;; +1F7E5;LARGE RED SQUARE;So;0;ON;;;;;N;;;;; +1F7E6;LARGE BLUE SQUARE;So;0;ON;;;;;N;;;;; +1F7E7;LARGE ORANGE SQUARE;So;0;ON;;;;;N;;;;; +1F7E8;LARGE YELLOW SQUARE;So;0;ON;;;;;N;;;;; +1F7E9;LARGE GREEN SQUARE;So;0;ON;;;;;N;;;;; +1F7EA;LARGE PURPLE SQUARE;So;0;ON;;;;;N;;;;; +1F7EB;LARGE BROWN SQUARE;So;0;ON;;;;;N;;;;; +1F800;LEFTWARDS ARROW WITH SMALL TRIANGLE ARROWHEAD;So;0;ON;;;;;N;;;;; +1F801;UPWARDS ARROW WITH SMALL TRIANGLE ARROWHEAD;So;0;ON;;;;;N;;;;; +1F802;RIGHTWARDS ARROW WITH SMALL TRIANGLE ARROWHEAD;So;0;ON;;;;;N;;;;; +1F803;DOWNWARDS ARROW WITH SMALL TRIANGLE ARROWHEAD;So;0;ON;;;;;N;;;;; +1F804;LEFTWARDS ARROW WITH MEDIUM TRIANGLE ARROWHEAD;So;0;ON;;;;;N;;;;; +1F805;UPWARDS ARROW WITH MEDIUM TRIANGLE ARROWHEAD;So;0;ON;;;;;N;;;;; +1F806;RIGHTWARDS ARROW WITH MEDIUM TRIANGLE ARROWHEAD;So;0;ON;;;;;N;;;;; +1F807;DOWNWARDS ARROW WITH MEDIUM TRIANGLE ARROWHEAD;So;0;ON;;;;;N;;;;; +1F808;LEFTWARDS ARROW WITH LARGE TRIANGLE ARROWHEAD;So;0;ON;;;;;N;;;;; +1F809;UPWARDS ARROW WITH LARGE TRIANGLE ARROWHEAD;So;0;ON;;;;;N;;;;; +1F80A;RIGHTWARDS ARROW WITH LARGE TRIANGLE ARROWHEAD;So;0;ON;;;;;N;;;;; +1F80B;DOWNWARDS ARROW WITH LARGE TRIANGLE ARROWHEAD;So;0;ON;;;;;N;;;;; +1F810;LEFTWARDS ARROW WITH SMALL EQUILATERAL ARROWHEAD;So;0;ON;;;;;N;;;;; +1F811;UPWARDS ARROW WITH SMALL EQUILATERAL ARROWHEAD;So;0;ON;;;;;N;;;;; +1F812;RIGHTWARDS ARROW WITH SMALL EQUILATERAL ARROWHEAD;So;0;ON;;;;;N;;;;; +1F813;DOWNWARDS ARROW WITH SMALL EQUILATERAL ARROWHEAD;So;0;ON;;;;;N;;;;; +1F814;LEFTWARDS ARROW WITH EQUILATERAL ARROWHEAD;So;0;ON;;;;;N;;;;; +1F815;UPWARDS ARROW WITH EQUILATERAL ARROWHEAD;So;0;ON;;;;;N;;;;; +1F816;RIGHTWARDS ARROW WITH EQUILATERAL ARROWHEAD;So;0;ON;;;;;N;;;;; +1F817;DOWNWARDS ARROW WITH EQUILATERAL ARROWHEAD;So;0;ON;;;;;N;;;;; +1F818;HEAVY LEFTWARDS ARROW WITH EQUILATERAL ARROWHEAD;So;0;ON;;;;;N;;;;; +1F819;HEAVY UPWARDS ARROW WITH EQUILATERAL ARROWHEAD;So;0;ON;;;;;N;;;;; +1F81A;HEAVY RIGHTWARDS ARROW WITH EQUILATERAL ARROWHEAD;So;0;ON;;;;;N;;;;; +1F81B;HEAVY DOWNWARDS ARROW WITH EQUILATERAL ARROWHEAD;So;0;ON;;;;;N;;;;; +1F81C;HEAVY LEFTWARDS ARROW WITH LARGE EQUILATERAL ARROWHEAD;So;0;ON;;;;;N;;;;; +1F81D;HEAVY UPWARDS ARROW WITH LARGE EQUILATERAL ARROWHEAD;So;0;ON;;;;;N;;;;; +1F81E;HEAVY RIGHTWARDS ARROW WITH LARGE EQUILATERAL ARROWHEAD;So;0;ON;;;;;N;;;;; +1F81F;HEAVY DOWNWARDS ARROW WITH LARGE EQUILATERAL ARROWHEAD;So;0;ON;;;;;N;;;;; +1F820;LEFTWARDS TRIANGLE-HEADED ARROW WITH NARROW SHAFT;So;0;ON;;;;;N;;;;; +1F821;UPWARDS TRIANGLE-HEADED ARROW WITH NARROW SHAFT;So;0;ON;;;;;N;;;;; +1F822;RIGHTWARDS TRIANGLE-HEADED ARROW WITH NARROW SHAFT;So;0;ON;;;;;N;;;;; +1F823;DOWNWARDS TRIANGLE-HEADED ARROW WITH NARROW SHAFT;So;0;ON;;;;;N;;;;; +1F824;LEFTWARDS TRIANGLE-HEADED ARROW WITH MEDIUM SHAFT;So;0;ON;;;;;N;;;;; +1F825;UPWARDS TRIANGLE-HEADED ARROW WITH MEDIUM SHAFT;So;0;ON;;;;;N;;;;; +1F826;RIGHTWARDS TRIANGLE-HEADED ARROW WITH MEDIUM SHAFT;So;0;ON;;;;;N;;;;; +1F827;DOWNWARDS TRIANGLE-HEADED ARROW WITH MEDIUM SHAFT;So;0;ON;;;;;N;;;;; +1F828;LEFTWARDS TRIANGLE-HEADED ARROW WITH BOLD SHAFT;So;0;ON;;;;;N;;;;; +1F829;UPWARDS TRIANGLE-HEADED ARROW WITH BOLD SHAFT;So;0;ON;;;;;N;;;;; +1F82A;RIGHTWARDS TRIANGLE-HEADED ARROW WITH BOLD SHAFT;So;0;ON;;;;;N;;;;; +1F82B;DOWNWARDS TRIANGLE-HEADED ARROW WITH BOLD SHAFT;So;0;ON;;;;;N;;;;; +1F82C;LEFTWARDS TRIANGLE-HEADED ARROW WITH HEAVY SHAFT;So;0;ON;;;;;N;;;;; +1F82D;UPWARDS TRIANGLE-HEADED ARROW WITH HEAVY SHAFT;So;0;ON;;;;;N;;;;; +1F82E;RIGHTWARDS TRIANGLE-HEADED ARROW WITH HEAVY SHAFT;So;0;ON;;;;;N;;;;; +1F82F;DOWNWARDS TRIANGLE-HEADED ARROW WITH HEAVY SHAFT;So;0;ON;;;;;N;;;;; +1F830;LEFTWARDS TRIANGLE-HEADED ARROW WITH VERY HEAVY SHAFT;So;0;ON;;;;;N;;;;; +1F831;UPWARDS TRIANGLE-HEADED ARROW WITH VERY HEAVY SHAFT;So;0;ON;;;;;N;;;;; +1F832;RIGHTWARDS TRIANGLE-HEADED ARROW WITH VERY HEAVY SHAFT;So;0;ON;;;;;N;;;;; +1F833;DOWNWARDS TRIANGLE-HEADED ARROW WITH VERY HEAVY SHAFT;So;0;ON;;;;;N;;;;; +1F834;LEFTWARDS FINGER-POST ARROW;So;0;ON;;;;;N;;;;; +1F835;UPWARDS FINGER-POST ARROW;So;0;ON;;;;;N;;;;; +1F836;RIGHTWARDS FINGER-POST ARROW;So;0;ON;;;;;N;;;;; +1F837;DOWNWARDS FINGER-POST ARROW;So;0;ON;;;;;N;;;;; +1F838;LEFTWARDS SQUARED ARROW;So;0;ON;;;;;N;;;;; +1F839;UPWARDS SQUARED ARROW;So;0;ON;;;;;N;;;;; +1F83A;RIGHTWARDS SQUARED ARROW;So;0;ON;;;;;N;;;;; +1F83B;DOWNWARDS SQUARED ARROW;So;0;ON;;;;;N;;;;; +1F83C;LEFTWARDS COMPRESSED ARROW;So;0;ON;;;;;N;;;;; +1F83D;UPWARDS COMPRESSED ARROW;So;0;ON;;;;;N;;;;; +1F83E;RIGHTWARDS COMPRESSED ARROW;So;0;ON;;;;;N;;;;; +1F83F;DOWNWARDS COMPRESSED ARROW;So;0;ON;;;;;N;;;;; +1F840;LEFTWARDS HEAVY COMPRESSED ARROW;So;0;ON;;;;;N;;;;; +1F841;UPWARDS HEAVY COMPRESSED ARROW;So;0;ON;;;;;N;;;;; +1F842;RIGHTWARDS HEAVY COMPRESSED ARROW;So;0;ON;;;;;N;;;;; +1F843;DOWNWARDS HEAVY COMPRESSED ARROW;So;0;ON;;;;;N;;;;; +1F844;LEFTWARDS HEAVY ARROW;So;0;ON;;;;;N;;;;; +1F845;UPWARDS HEAVY ARROW;So;0;ON;;;;;N;;;;; +1F846;RIGHTWARDS HEAVY ARROW;So;0;ON;;;;;N;;;;; +1F847;DOWNWARDS HEAVY ARROW;So;0;ON;;;;;N;;;;; +1F850;LEFTWARDS SANS-SERIF ARROW;So;0;ON;;;;;N;;;;; +1F851;UPWARDS SANS-SERIF ARROW;So;0;ON;;;;;N;;;;; +1F852;RIGHTWARDS SANS-SERIF ARROW;So;0;ON;;;;;N;;;;; +1F853;DOWNWARDS SANS-SERIF ARROW;So;0;ON;;;;;N;;;;; +1F854;NORTH WEST SANS-SERIF ARROW;So;0;ON;;;;;N;;;;; +1F855;NORTH EAST SANS-SERIF ARROW;So;0;ON;;;;;N;;;;; +1F856;SOUTH EAST SANS-SERIF ARROW;So;0;ON;;;;;N;;;;; +1F857;SOUTH WEST SANS-SERIF ARROW;So;0;ON;;;;;N;;;;; +1F858;LEFT RIGHT SANS-SERIF ARROW;So;0;ON;;;;;N;;;;; +1F859;UP DOWN SANS-SERIF ARROW;So;0;ON;;;;;N;;;;; +1F860;WIDE-HEADED LEFTWARDS LIGHT BARB ARROW;So;0;ON;;;;;N;;;;; +1F861;WIDE-HEADED UPWARDS LIGHT BARB ARROW;So;0;ON;;;;;N;;;;; +1F862;WIDE-HEADED RIGHTWARDS LIGHT BARB ARROW;So;0;ON;;;;;N;;;;; +1F863;WIDE-HEADED DOWNWARDS LIGHT BARB ARROW;So;0;ON;;;;;N;;;;; +1F864;WIDE-HEADED NORTH WEST LIGHT BARB ARROW;So;0;ON;;;;;N;;;;; +1F865;WIDE-HEADED NORTH EAST LIGHT BARB ARROW;So;0;ON;;;;;N;;;;; +1F866;WIDE-HEADED SOUTH EAST LIGHT BARB ARROW;So;0;ON;;;;;N;;;;; +1F867;WIDE-HEADED SOUTH WEST LIGHT BARB ARROW;So;0;ON;;;;;N;;;;; +1F868;WIDE-HEADED LEFTWARDS BARB ARROW;So;0;ON;;;;;N;;;;; +1F869;WIDE-HEADED UPWARDS BARB ARROW;So;0;ON;;;;;N;;;;; +1F86A;WIDE-HEADED RIGHTWARDS BARB ARROW;So;0;ON;;;;;N;;;;; +1F86B;WIDE-HEADED DOWNWARDS BARB ARROW;So;0;ON;;;;;N;;;;; +1F86C;WIDE-HEADED NORTH WEST BARB ARROW;So;0;ON;;;;;N;;;;; +1F86D;WIDE-HEADED NORTH EAST BARB ARROW;So;0;ON;;;;;N;;;;; +1F86E;WIDE-HEADED SOUTH EAST BARB ARROW;So;0;ON;;;;;N;;;;; +1F86F;WIDE-HEADED SOUTH WEST BARB ARROW;So;0;ON;;;;;N;;;;; +1F870;WIDE-HEADED LEFTWARDS MEDIUM BARB ARROW;So;0;ON;;;;;N;;;;; +1F871;WIDE-HEADED UPWARDS MEDIUM BARB ARROW;So;0;ON;;;;;N;;;;; +1F872;WIDE-HEADED RIGHTWARDS MEDIUM BARB ARROW;So;0;ON;;;;;N;;;;; +1F873;WIDE-HEADED DOWNWARDS MEDIUM BARB ARROW;So;0;ON;;;;;N;;;;; +1F874;WIDE-HEADED NORTH WEST MEDIUM BARB ARROW;So;0;ON;;;;;N;;;;; +1F875;WIDE-HEADED NORTH EAST MEDIUM BARB ARROW;So;0;ON;;;;;N;;;;; +1F876;WIDE-HEADED SOUTH EAST MEDIUM BARB ARROW;So;0;ON;;;;;N;;;;; +1F877;WIDE-HEADED SOUTH WEST MEDIUM BARB ARROW;So;0;ON;;;;;N;;;;; +1F878;WIDE-HEADED LEFTWARDS HEAVY BARB ARROW;So;0;ON;;;;;N;;;;; +1F879;WIDE-HEADED UPWARDS HEAVY BARB ARROW;So;0;ON;;;;;N;;;;; +1F87A;WIDE-HEADED RIGHTWARDS HEAVY BARB ARROW;So;0;ON;;;;;N;;;;; +1F87B;WIDE-HEADED DOWNWARDS HEAVY BARB ARROW;So;0;ON;;;;;N;;;;; +1F87C;WIDE-HEADED NORTH WEST HEAVY BARB ARROW;So;0;ON;;;;;N;;;;; +1F87D;WIDE-HEADED NORTH EAST HEAVY BARB ARROW;So;0;ON;;;;;N;;;;; +1F87E;WIDE-HEADED SOUTH EAST HEAVY BARB ARROW;So;0;ON;;;;;N;;;;; +1F87F;WIDE-HEADED SOUTH WEST HEAVY BARB ARROW;So;0;ON;;;;;N;;;;; +1F880;WIDE-HEADED LEFTWARDS VERY HEAVY BARB ARROW;So;0;ON;;;;;N;;;;; +1F881;WIDE-HEADED UPWARDS VERY HEAVY BARB ARROW;So;0;ON;;;;;N;;;;; +1F882;WIDE-HEADED RIGHTWARDS VERY HEAVY BARB ARROW;So;0;ON;;;;;N;;;;; +1F883;WIDE-HEADED DOWNWARDS VERY HEAVY BARB ARROW;So;0;ON;;;;;N;;;;; +1F884;WIDE-HEADED NORTH WEST VERY HEAVY BARB ARROW;So;0;ON;;;;;N;;;;; +1F885;WIDE-HEADED NORTH EAST VERY HEAVY BARB ARROW;So;0;ON;;;;;N;;;;; +1F886;WIDE-HEADED SOUTH EAST VERY HEAVY BARB ARROW;So;0;ON;;;;;N;;;;; +1F887;WIDE-HEADED SOUTH WEST VERY HEAVY BARB ARROW;So;0;ON;;;;;N;;;;; +1F890;LEFTWARDS TRIANGLE ARROWHEAD;So;0;ON;;;;;N;;;;; +1F891;UPWARDS TRIANGLE ARROWHEAD;So;0;ON;;;;;N;;;;; +1F892;RIGHTWARDS TRIANGLE ARROWHEAD;So;0;ON;;;;;N;;;;; +1F893;DOWNWARDS TRIANGLE ARROWHEAD;So;0;ON;;;;;N;;;;; +1F894;LEFTWARDS WHITE ARROW WITHIN TRIANGLE ARROWHEAD;So;0;ON;;;;;N;;;;; +1F895;UPWARDS WHITE ARROW WITHIN TRIANGLE ARROWHEAD;So;0;ON;;;;;N;;;;; +1F896;RIGHTWARDS WHITE ARROW WITHIN TRIANGLE ARROWHEAD;So;0;ON;;;;;N;;;;; +1F897;DOWNWARDS WHITE ARROW WITHIN TRIANGLE ARROWHEAD;So;0;ON;;;;;N;;;;; +1F898;LEFTWARDS ARROW WITH NOTCHED TAIL;So;0;ON;;;;;N;;;;; +1F899;UPWARDS ARROW WITH NOTCHED TAIL;So;0;ON;;;;;N;;;;; +1F89A;RIGHTWARDS ARROW WITH NOTCHED TAIL;So;0;ON;;;;;N;;;;; +1F89B;DOWNWARDS ARROW WITH NOTCHED TAIL;So;0;ON;;;;;N;;;;; +1F89C;HEAVY ARROW SHAFT WIDTH ONE;So;0;ON;;;;;N;;;;; +1F89D;HEAVY ARROW SHAFT WIDTH TWO THIRDS;So;0;ON;;;;;N;;;;; +1F89E;HEAVY ARROW SHAFT WIDTH ONE HALF;So;0;ON;;;;;N;;;;; +1F89F;HEAVY ARROW SHAFT WIDTH ONE THIRD;So;0;ON;;;;;N;;;;; +1F8A0;LEFTWARDS BOTTOM-SHADED WHITE ARROW;So;0;ON;;;;;N;;;;; +1F8A1;RIGHTWARDS BOTTOM SHADED WHITE ARROW;So;0;ON;;;;;N;;;;; +1F8A2;LEFTWARDS TOP SHADED WHITE ARROW;So;0;ON;;;;;N;;;;; +1F8A3;RIGHTWARDS TOP SHADED WHITE ARROW;So;0;ON;;;;;N;;;;; +1F8A4;LEFTWARDS LEFT-SHADED WHITE ARROW;So;0;ON;;;;;N;;;;; +1F8A5;RIGHTWARDS RIGHT-SHADED WHITE ARROW;So;0;ON;;;;;N;;;;; +1F8A6;LEFTWARDS RIGHT-SHADED WHITE ARROW;So;0;ON;;;;;N;;;;; +1F8A7;RIGHTWARDS LEFT-SHADED WHITE ARROW;So;0;ON;;;;;N;;;;; +1F8A8;LEFTWARDS BACK-TILTED SHADOWED WHITE ARROW;So;0;ON;;;;;N;;;;; +1F8A9;RIGHTWARDS BACK-TILTED SHADOWED WHITE ARROW;So;0;ON;;;;;N;;;;; +1F8AA;LEFTWARDS FRONT-TILTED SHADOWED WHITE ARROW;So;0;ON;;;;;N;;;;; +1F8AB;RIGHTWARDS FRONT-TILTED SHADOWED WHITE ARROW;So;0;ON;;;;;N;;;;; +1F8AC;WHITE ARROW SHAFT WIDTH ONE;So;0;ON;;;;;N;;;;; +1F8AD;WHITE ARROW SHAFT WIDTH TWO THIRDS;So;0;ON;;;;;N;;;;; +1F900;CIRCLED CROSS FORMEE WITH FOUR DOTS;So;0;ON;;;;;N;;;;; +1F901;CIRCLED CROSS FORMEE WITH TWO DOTS;So;0;ON;;;;;N;;;;; +1F902;CIRCLED CROSS FORMEE;So;0;ON;;;;;N;;;;; +1F903;LEFT HALF CIRCLE WITH FOUR DOTS;So;0;ON;;;;;N;;;;; +1F904;LEFT HALF CIRCLE WITH THREE DOTS;So;0;ON;;;;;N;;;;; +1F905;LEFT HALF CIRCLE WITH TWO DOTS;So;0;ON;;;;;N;;;;; +1F906;LEFT HALF CIRCLE WITH DOT;So;0;ON;;;;;N;;;;; +1F907;LEFT HALF CIRCLE;So;0;ON;;;;;N;;;;; +1F908;DOWNWARD FACING HOOK;So;0;ON;;;;;N;;;;; +1F909;DOWNWARD FACING NOTCHED HOOK;So;0;ON;;;;;N;;;;; +1F90A;DOWNWARD FACING HOOK WITH DOT;So;0;ON;;;;;N;;;;; +1F90B;DOWNWARD FACING NOTCHED HOOK WITH DOT;So;0;ON;;;;;N;;;;; +1F90D;WHITE HEART;So;0;ON;;;;;N;;;;; +1F90E;BROWN HEART;So;0;ON;;;;;N;;;;; +1F90F;PINCHING HAND;So;0;ON;;;;;N;;;;; +1F910;ZIPPER-MOUTH FACE;So;0;ON;;;;;N;;;;; +1F911;MONEY-MOUTH FACE;So;0;ON;;;;;N;;;;; +1F912;FACE WITH THERMOMETER;So;0;ON;;;;;N;;;;; +1F913;NERD FACE;So;0;ON;;;;;N;;;;; +1F914;THINKING FACE;So;0;ON;;;;;N;;;;; +1F915;FACE WITH HEAD-BANDAGE;So;0;ON;;;;;N;;;;; +1F916;ROBOT FACE;So;0;ON;;;;;N;;;;; +1F917;HUGGING FACE;So;0;ON;;;;;N;;;;; +1F918;SIGN OF THE HORNS;So;0;ON;;;;;N;;;;; +1F919;CALL ME HAND;So;0;ON;;;;;N;;;;; +1F91A;RAISED BACK OF HAND;So;0;ON;;;;;N;;;;; +1F91B;LEFT-FACING FIST;So;0;ON;;;;;N;;;;; +1F91C;RIGHT-FACING FIST;So;0;ON;;;;;N;;;;; +1F91D;HANDSHAKE;So;0;ON;;;;;N;;;;; +1F91E;HAND WITH INDEX AND MIDDLE FINGERS CROSSED;So;0;ON;;;;;N;;;;; +1F91F;I LOVE YOU HAND SIGN;So;0;ON;;;;;N;;;;; +1F920;FACE WITH COWBOY HAT;So;0;ON;;;;;N;;;;; +1F921;CLOWN FACE;So;0;ON;;;;;N;;;;; +1F922;NAUSEATED FACE;So;0;ON;;;;;N;;;;; +1F923;ROLLING ON THE FLOOR LAUGHING;So;0;ON;;;;;N;;;;; +1F924;DROOLING FACE;So;0;ON;;;;;N;;;;; +1F925;LYING FACE;So;0;ON;;;;;N;;;;; +1F926;FACE PALM;So;0;ON;;;;;N;;;;; +1F927;SNEEZING FACE;So;0;ON;;;;;N;;;;; +1F928;FACE WITH ONE EYEBROW RAISED;So;0;ON;;;;;N;;;;; +1F929;GRINNING FACE WITH STAR EYES;So;0;ON;;;;;N;;;;; +1F92A;GRINNING FACE WITH ONE LARGE AND ONE SMALL EYE;So;0;ON;;;;;N;;;;; +1F92B;FACE WITH FINGER COVERING CLOSED LIPS;So;0;ON;;;;;N;;;;; +1F92C;SERIOUS FACE WITH SYMBOLS COVERING MOUTH;So;0;ON;;;;;N;;;;; +1F92D;SMILING FACE WITH SMILING EYES AND HAND COVERING MOUTH;So;0;ON;;;;;N;;;;; +1F92E;FACE WITH OPEN MOUTH VOMITING;So;0;ON;;;;;N;;;;; +1F92F;SHOCKED FACE WITH EXPLODING HEAD;So;0;ON;;;;;N;;;;; +1F930;PREGNANT WOMAN;So;0;ON;;;;;N;;;;; +1F931;BREAST-FEEDING;So;0;ON;;;;;N;;;;; +1F932;PALMS UP TOGETHER;So;0;ON;;;;;N;;;;; +1F933;SELFIE;So;0;ON;;;;;N;;;;; +1F934;PRINCE;So;0;ON;;;;;N;;;;; +1F935;MAN IN TUXEDO;So;0;ON;;;;;N;;;;; +1F936;MOTHER CHRISTMAS;So;0;ON;;;;;N;;;;; +1F937;SHRUG;So;0;ON;;;;;N;;;;; +1F938;PERSON DOING CARTWHEEL;So;0;ON;;;;;N;;;;; +1F939;JUGGLING;So;0;ON;;;;;N;;;;; +1F93A;FENCER;So;0;ON;;;;;N;;;;; +1F93B;MODERN PENTATHLON;So;0;ON;;;;;N;;;;; +1F93C;WRESTLERS;So;0;ON;;;;;N;;;;; +1F93D;WATER POLO;So;0;ON;;;;;N;;;;; +1F93E;HANDBALL;So;0;ON;;;;;N;;;;; +1F93F;DIVING MASK;So;0;ON;;;;;N;;;;; +1F940;WILTED FLOWER;So;0;ON;;;;;N;;;;; +1F941;DRUM WITH DRUMSTICKS;So;0;ON;;;;;N;;;;; +1F942;CLINKING GLASSES;So;0;ON;;;;;N;;;;; +1F943;TUMBLER GLASS;So;0;ON;;;;;N;;;;; +1F944;SPOON;So;0;ON;;;;;N;;;;; +1F945;GOAL NET;So;0;ON;;;;;N;;;;; +1F946;RIFLE;So;0;ON;;;;;N;;;;; +1F947;FIRST PLACE MEDAL;So;0;ON;;;;;N;;;;; +1F948;SECOND PLACE MEDAL;So;0;ON;;;;;N;;;;; +1F949;THIRD PLACE MEDAL;So;0;ON;;;;;N;;;;; +1F94A;BOXING GLOVE;So;0;ON;;;;;N;;;;; +1F94B;MARTIAL ARTS UNIFORM;So;0;ON;;;;;N;;;;; +1F94C;CURLING STONE;So;0;ON;;;;;N;;;;; +1F94D;LACROSSE STICK AND BALL;So;0;ON;;;;;N;;;;; +1F94E;SOFTBALL;So;0;ON;;;;;N;;;;; +1F94F;FLYING DISC;So;0;ON;;;;;N;;;;; +1F950;CROISSANT;So;0;ON;;;;;N;;;;; +1F951;AVOCADO;So;0;ON;;;;;N;;;;; +1F952;CUCUMBER;So;0;ON;;;;;N;;;;; +1F953;BACON;So;0;ON;;;;;N;;;;; +1F954;POTATO;So;0;ON;;;;;N;;;;; +1F955;CARROT;So;0;ON;;;;;N;;;;; +1F956;BAGUETTE BREAD;So;0;ON;;;;;N;;;;; +1F957;GREEN SALAD;So;0;ON;;;;;N;;;;; +1F958;SHALLOW PAN OF FOOD;So;0;ON;;;;;N;;;;; +1F959;STUFFED FLATBREAD;So;0;ON;;;;;N;;;;; +1F95A;EGG;So;0;ON;;;;;N;;;;; +1F95B;GLASS OF MILK;So;0;ON;;;;;N;;;;; +1F95C;PEANUTS;So;0;ON;;;;;N;;;;; +1F95D;KIWIFRUIT;So;0;ON;;;;;N;;;;; +1F95E;PANCAKES;So;0;ON;;;;;N;;;;; +1F95F;DUMPLING;So;0;ON;;;;;N;;;;; +1F960;FORTUNE COOKIE;So;0;ON;;;;;N;;;;; +1F961;TAKEOUT BOX;So;0;ON;;;;;N;;;;; +1F962;CHOPSTICKS;So;0;ON;;;;;N;;;;; +1F963;BOWL WITH SPOON;So;0;ON;;;;;N;;;;; +1F964;CUP WITH STRAW;So;0;ON;;;;;N;;;;; +1F965;COCONUT;So;0;ON;;;;;N;;;;; +1F966;BROCCOLI;So;0;ON;;;;;N;;;;; +1F967;PIE;So;0;ON;;;;;N;;;;; +1F968;PRETZEL;So;0;ON;;;;;N;;;;; +1F969;CUT OF MEAT;So;0;ON;;;;;N;;;;; +1F96A;SANDWICH;So;0;ON;;;;;N;;;;; +1F96B;CANNED FOOD;So;0;ON;;;;;N;;;;; +1F96C;LEAFY GREEN;So;0;ON;;;;;N;;;;; +1F96D;MANGO;So;0;ON;;;;;N;;;;; +1F96E;MOON CAKE;So;0;ON;;;;;N;;;;; +1F96F;BAGEL;So;0;ON;;;;;N;;;;; +1F970;SMILING FACE WITH SMILING EYES AND THREE HEARTS;So;0;ON;;;;;N;;;;; +1F971;YAWNING FACE;So;0;ON;;;;;N;;;;; +1F973;FACE WITH PARTY HORN AND PARTY HAT;So;0;ON;;;;;N;;;;; +1F974;FACE WITH UNEVEN EYES AND WAVY MOUTH;So;0;ON;;;;;N;;;;; +1F975;OVERHEATED FACE;So;0;ON;;;;;N;;;;; +1F976;FREEZING FACE;So;0;ON;;;;;N;;;;; +1F97A;FACE WITH PLEADING EYES;So;0;ON;;;;;N;;;;; +1F97B;SARI;So;0;ON;;;;;N;;;;; +1F97C;LAB COAT;So;0;ON;;;;;N;;;;; +1F97D;GOGGLES;So;0;ON;;;;;N;;;;; +1F97E;HIKING BOOT;So;0;ON;;;;;N;;;;; +1F97F;FLAT SHOE;So;0;ON;;;;;N;;;;; +1F980;CRAB;So;0;ON;;;;;N;;;;; +1F981;LION FACE;So;0;ON;;;;;N;;;;; +1F982;SCORPION;So;0;ON;;;;;N;;;;; +1F983;TURKEY;So;0;ON;;;;;N;;;;; +1F984;UNICORN FACE;So;0;ON;;;;;N;;;;; +1F985;EAGLE;So;0;ON;;;;;N;;;;; +1F986;DUCK;So;0;ON;;;;;N;;;;; +1F987;BAT;So;0;ON;;;;;N;;;;; +1F988;SHARK;So;0;ON;;;;;N;;;;; +1F989;OWL;So;0;ON;;;;;N;;;;; +1F98A;FOX FACE;So;0;ON;;;;;N;;;;; +1F98B;BUTTERFLY;So;0;ON;;;;;N;;;;; +1F98C;DEER;So;0;ON;;;;;N;;;;; +1F98D;GORILLA;So;0;ON;;;;;N;;;;; +1F98E;LIZARD;So;0;ON;;;;;N;;;;; +1F98F;RHINOCEROS;So;0;ON;;;;;N;;;;; +1F990;SHRIMP;So;0;ON;;;;;N;;;;; +1F991;SQUID;So;0;ON;;;;;N;;;;; +1F992;GIRAFFE FACE;So;0;ON;;;;;N;;;;; +1F993;ZEBRA FACE;So;0;ON;;;;;N;;;;; +1F994;HEDGEHOG;So;0;ON;;;;;N;;;;; +1F995;SAUROPOD;So;0;ON;;;;;N;;;;; +1F996;T-REX;So;0;ON;;;;;N;;;;; +1F997;CRICKET;So;0;ON;;;;;N;;;;; +1F998;KANGAROO;So;0;ON;;;;;N;;;;; +1F999;LLAMA;So;0;ON;;;;;N;;;;; +1F99A;PEACOCK;So;0;ON;;;;;N;;;;; +1F99B;HIPPOPOTAMUS;So;0;ON;;;;;N;;;;; +1F99C;PARROT;So;0;ON;;;;;N;;;;; +1F99D;RACCOON;So;0;ON;;;;;N;;;;; +1F99E;LOBSTER;So;0;ON;;;;;N;;;;; +1F99F;MOSQUITO;So;0;ON;;;;;N;;;;; +1F9A0;MICROBE;So;0;ON;;;;;N;;;;; +1F9A1;BADGER;So;0;ON;;;;;N;;;;; +1F9A2;SWAN;So;0;ON;;;;;N;;;;; +1F9A5;SLOTH;So;0;ON;;;;;N;;;;; +1F9A6;OTTER;So;0;ON;;;;;N;;;;; +1F9A7;ORANGUTAN;So;0;ON;;;;;N;;;;; +1F9A8;SKUNK;So;0;ON;;;;;N;;;;; +1F9A9;FLAMINGO;So;0;ON;;;;;N;;;;; +1F9AA;OYSTER;So;0;ON;;;;;N;;;;; +1F9AE;GUIDE DOG;So;0;ON;;;;;N;;;;; +1F9AF;PROBING CANE;So;0;ON;;;;;N;;;;; +1F9B0;EMOJI COMPONENT RED HAIR;So;0;ON;;;;;N;;;;; +1F9B1;EMOJI COMPONENT CURLY HAIR;So;0;ON;;;;;N;;;;; +1F9B2;EMOJI COMPONENT BALD;So;0;ON;;;;;N;;;;; +1F9B3;EMOJI COMPONENT WHITE HAIR;So;0;ON;;;;;N;;;;; +1F9B4;BONE;So;0;ON;;;;;N;;;;; +1F9B5;LEG;So;0;ON;;;;;N;;;;; +1F9B6;FOOT;So;0;ON;;;;;N;;;;; +1F9B7;TOOTH;So;0;ON;;;;;N;;;;; +1F9B8;SUPERHERO;So;0;ON;;;;;N;;;;; +1F9B9;SUPERVILLAIN;So;0;ON;;;;;N;;;;; +1F9BA;SAFETY VEST;So;0;ON;;;;;N;;;;; +1F9BB;EAR WITH HEARING AID;So;0;ON;;;;;N;;;;; +1F9BC;MOTORIZED WHEELCHAIR;So;0;ON;;;;;N;;;;; +1F9BD;MANUAL WHEELCHAIR;So;0;ON;;;;;N;;;;; +1F9BE;MECHANICAL ARM;So;0;ON;;;;;N;;;;; +1F9BF;MECHANICAL LEG;So;0;ON;;;;;N;;;;; +1F9C0;CHEESE WEDGE;So;0;ON;;;;;N;;;;; +1F9C1;CUPCAKE;So;0;ON;;;;;N;;;;; +1F9C2;SALT SHAKER;So;0;ON;;;;;N;;;;; +1F9C3;BEVERAGE BOX;So;0;ON;;;;;N;;;;; +1F9C4;GARLIC;So;0;ON;;;;;N;;;;; +1F9C5;ONION;So;0;ON;;;;;N;;;;; +1F9C6;FALAFEL;So;0;ON;;;;;N;;;;; +1F9C7;WAFFLE;So;0;ON;;;;;N;;;;; +1F9C8;BUTTER;So;0;ON;;;;;N;;;;; +1F9C9;MATE DRINK;So;0;ON;;;;;N;;;;; +1F9CA;ICE CUBE;So;0;ON;;;;;N;;;;; +1F9CD;STANDING PERSON;So;0;ON;;;;;N;;;;; +1F9CE;KNEELING PERSON;So;0;ON;;;;;N;;;;; +1F9CF;DEAF PERSON;So;0;ON;;;;;N;;;;; +1F9D0;FACE WITH MONOCLE;So;0;ON;;;;;N;;;;; +1F9D1;ADULT;So;0;ON;;;;;N;;;;; +1F9D2;CHILD;So;0;ON;;;;;N;;;;; +1F9D3;OLDER ADULT;So;0;ON;;;;;N;;;;; +1F9D4;BEARDED PERSON;So;0;ON;;;;;N;;;;; +1F9D5;PERSON WITH HEADSCARF;So;0;ON;;;;;N;;;;; +1F9D6;PERSON IN STEAMY ROOM;So;0;ON;;;;;N;;;;; +1F9D7;PERSON CLIMBING;So;0;ON;;;;;N;;;;; +1F9D8;PERSON IN LOTUS POSITION;So;0;ON;;;;;N;;;;; +1F9D9;MAGE;So;0;ON;;;;;N;;;;; +1F9DA;FAIRY;So;0;ON;;;;;N;;;;; +1F9DB;VAMPIRE;So;0;ON;;;;;N;;;;; +1F9DC;MERPERSON;So;0;ON;;;;;N;;;;; +1F9DD;ELF;So;0;ON;;;;;N;;;;; +1F9DE;GENIE;So;0;ON;;;;;N;;;;; +1F9DF;ZOMBIE;So;0;ON;;;;;N;;;;; +1F9E0;BRAIN;So;0;ON;;;;;N;;;;; +1F9E1;ORANGE HEART;So;0;ON;;;;;N;;;;; +1F9E2;BILLED CAP;So;0;ON;;;;;N;;;;; +1F9E3;SCARF;So;0;ON;;;;;N;;;;; +1F9E4;GLOVES;So;0;ON;;;;;N;;;;; +1F9E5;COAT;So;0;ON;;;;;N;;;;; +1F9E6;SOCKS;So;0;ON;;;;;N;;;;; +1F9E7;RED GIFT ENVELOPE;So;0;ON;;;;;N;;;;; +1F9E8;FIRECRACKER;So;0;ON;;;;;N;;;;; +1F9E9;JIGSAW PUZZLE PIECE;So;0;ON;;;;;N;;;;; +1F9EA;TEST TUBE;So;0;ON;;;;;N;;;;; +1F9EB;PETRI DISH;So;0;ON;;;;;N;;;;; +1F9EC;DNA DOUBLE HELIX;So;0;ON;;;;;N;;;;; +1F9ED;COMPASS;So;0;ON;;;;;N;;;;; +1F9EE;ABACUS;So;0;ON;;;;;N;;;;; +1F9EF;FIRE EXTINGUISHER;So;0;ON;;;;;N;;;;; +1F9F0;TOOLBOX;So;0;ON;;;;;N;;;;; +1F9F1;BRICK;So;0;ON;;;;;N;;;;; +1F9F2;MAGNET;So;0;ON;;;;;N;;;;; +1F9F3;LUGGAGE;So;0;ON;;;;;N;;;;; +1F9F4;LOTION BOTTLE;So;0;ON;;;;;N;;;;; +1F9F5;SPOOL OF THREAD;So;0;ON;;;;;N;;;;; +1F9F6;BALL OF YARN;So;0;ON;;;;;N;;;;; +1F9F7;SAFETY PIN;So;0;ON;;;;;N;;;;; +1F9F8;TEDDY BEAR;So;0;ON;;;;;N;;;;; +1F9F9;BROOM;So;0;ON;;;;;N;;;;; +1F9FA;BASKET;So;0;ON;;;;;N;;;;; +1F9FB;ROLL OF PAPER;So;0;ON;;;;;N;;;;; +1F9FC;BAR OF SOAP;So;0;ON;;;;;N;;;;; +1F9FD;SPONGE;So;0;ON;;;;;N;;;;; +1F9FE;RECEIPT;So;0;ON;;;;;N;;;;; +1F9FF;NAZAR AMULET;So;0;ON;;;;;N;;;;; +1FA00;NEUTRAL CHESS KING;So;0;ON;;;;;N;;;;; +1FA01;NEUTRAL CHESS QUEEN;So;0;ON;;;;;N;;;;; +1FA02;NEUTRAL CHESS ROOK;So;0;ON;;;;;N;;;;; +1FA03;NEUTRAL CHESS BISHOP;So;0;ON;;;;;N;;;;; +1FA04;NEUTRAL CHESS KNIGHT;So;0;ON;;;;;N;;;;; +1FA05;NEUTRAL CHESS PAWN;So;0;ON;;;;;N;;;;; +1FA06;WHITE CHESS KNIGHT ROTATED FORTY-FIVE DEGREES;So;0;ON;;;;;N;;;;; +1FA07;BLACK CHESS KNIGHT ROTATED FORTY-FIVE DEGREES;So;0;ON;;;;;N;;;;; +1FA08;NEUTRAL CHESS KNIGHT ROTATED FORTY-FIVE DEGREES;So;0;ON;;;;;N;;;;; +1FA09;WHITE CHESS KING ROTATED NINETY DEGREES;So;0;ON;;;;;N;;;;; +1FA0A;WHITE CHESS QUEEN ROTATED NINETY DEGREES;So;0;ON;;;;;N;;;;; +1FA0B;WHITE CHESS ROOK ROTATED NINETY DEGREES;So;0;ON;;;;;N;;;;; +1FA0C;WHITE CHESS BISHOP ROTATED NINETY DEGREES;So;0;ON;;;;;N;;;;; +1FA0D;WHITE CHESS KNIGHT ROTATED NINETY DEGREES;So;0;ON;;;;;N;;;;; +1FA0E;WHITE CHESS PAWN ROTATED NINETY DEGREES;So;0;ON;;;;;N;;;;; +1FA0F;BLACK CHESS KING ROTATED NINETY DEGREES;So;0;ON;;;;;N;;;;; +1FA10;BLACK CHESS QUEEN ROTATED NINETY DEGREES;So;0;ON;;;;;N;;;;; +1FA11;BLACK CHESS ROOK ROTATED NINETY DEGREES;So;0;ON;;;;;N;;;;; +1FA12;BLACK CHESS BISHOP ROTATED NINETY DEGREES;So;0;ON;;;;;N;;;;; +1FA13;BLACK CHESS KNIGHT ROTATED NINETY DEGREES;So;0;ON;;;;;N;;;;; +1FA14;BLACK CHESS PAWN ROTATED NINETY DEGREES;So;0;ON;;;;;N;;;;; +1FA15;NEUTRAL CHESS KING ROTATED NINETY DEGREES;So;0;ON;;;;;N;;;;; +1FA16;NEUTRAL CHESS QUEEN ROTATED NINETY DEGREES;So;0;ON;;;;;N;;;;; +1FA17;NEUTRAL CHESS ROOK ROTATED NINETY DEGREES;So;0;ON;;;;;N;;;;; +1FA18;NEUTRAL CHESS BISHOP ROTATED NINETY DEGREES;So;0;ON;;;;;N;;;;; +1FA19;NEUTRAL CHESS KNIGHT ROTATED NINETY DEGREES;So;0;ON;;;;;N;;;;; +1FA1A;NEUTRAL CHESS PAWN ROTATED NINETY DEGREES;So;0;ON;;;;;N;;;;; +1FA1B;WHITE CHESS KNIGHT ROTATED ONE HUNDRED THIRTY-FIVE DEGREES;So;0;ON;;;;;N;;;;; +1FA1C;BLACK CHESS KNIGHT ROTATED ONE HUNDRED THIRTY-FIVE DEGREES;So;0;ON;;;;;N;;;;; +1FA1D;NEUTRAL CHESS KNIGHT ROTATED ONE HUNDRED THIRTY-FIVE DEGREES;So;0;ON;;;;;N;;;;; +1FA1E;WHITE CHESS TURNED KING;So;0;ON;;;;;N;;;;; +1FA1F;WHITE CHESS TURNED QUEEN;So;0;ON;;;;;N;;;;; +1FA20;WHITE CHESS TURNED ROOK;So;0;ON;;;;;N;;;;; +1FA21;WHITE CHESS TURNED BISHOP;So;0;ON;;;;;N;;;;; +1FA22;WHITE CHESS TURNED KNIGHT;So;0;ON;;;;;N;;;;; +1FA23;WHITE CHESS TURNED PAWN;So;0;ON;;;;;N;;;;; +1FA24;BLACK CHESS TURNED KING;So;0;ON;;;;;N;;;;; +1FA25;BLACK CHESS TURNED QUEEN;So;0;ON;;;;;N;;;;; +1FA26;BLACK CHESS TURNED ROOK;So;0;ON;;;;;N;;;;; +1FA27;BLACK CHESS TURNED BISHOP;So;0;ON;;;;;N;;;;; +1FA28;BLACK CHESS TURNED KNIGHT;So;0;ON;;;;;N;;;;; +1FA29;BLACK CHESS TURNED PAWN;So;0;ON;;;;;N;;;;; +1FA2A;NEUTRAL CHESS TURNED KING;So;0;ON;;;;;N;;;;; +1FA2B;NEUTRAL CHESS TURNED QUEEN;So;0;ON;;;;;N;;;;; +1FA2C;NEUTRAL CHESS TURNED ROOK;So;0;ON;;;;;N;;;;; +1FA2D;NEUTRAL CHESS TURNED BISHOP;So;0;ON;;;;;N;;;;; +1FA2E;NEUTRAL CHESS TURNED KNIGHT;So;0;ON;;;;;N;;;;; +1FA2F;NEUTRAL CHESS TURNED PAWN;So;0;ON;;;;;N;;;;; +1FA30;WHITE CHESS KNIGHT ROTATED TWO HUNDRED TWENTY-FIVE DEGREES;So;0;ON;;;;;N;;;;; +1FA31;BLACK CHESS KNIGHT ROTATED TWO HUNDRED TWENTY-FIVE DEGREES;So;0;ON;;;;;N;;;;; +1FA32;NEUTRAL CHESS KNIGHT ROTATED TWO HUNDRED TWENTY-FIVE DEGREES;So;0;ON;;;;;N;;;;; +1FA33;WHITE CHESS KING ROTATED TWO HUNDRED SEVENTY DEGREES;So;0;ON;;;;;N;;;;; +1FA34;WHITE CHESS QUEEN ROTATED TWO HUNDRED SEVENTY DEGREES;So;0;ON;;;;;N;;;;; +1FA35;WHITE CHESS ROOK ROTATED TWO HUNDRED SEVENTY DEGREES;So;0;ON;;;;;N;;;;; +1FA36;WHITE CHESS BISHOP ROTATED TWO HUNDRED SEVENTY DEGREES;So;0;ON;;;;;N;;;;; +1FA37;WHITE CHESS KNIGHT ROTATED TWO HUNDRED SEVENTY DEGREES;So;0;ON;;;;;N;;;;; +1FA38;WHITE CHESS PAWN ROTATED TWO HUNDRED SEVENTY DEGREES;So;0;ON;;;;;N;;;;; +1FA39;BLACK CHESS KING ROTATED TWO HUNDRED SEVENTY DEGREES;So;0;ON;;;;;N;;;;; +1FA3A;BLACK CHESS QUEEN ROTATED TWO HUNDRED SEVENTY DEGREES;So;0;ON;;;;;N;;;;; +1FA3B;BLACK CHESS ROOK ROTATED TWO HUNDRED SEVENTY DEGREES;So;0;ON;;;;;N;;;;; +1FA3C;BLACK CHESS BISHOP ROTATED TWO HUNDRED SEVENTY DEGREES;So;0;ON;;;;;N;;;;; +1FA3D;BLACK CHESS KNIGHT ROTATED TWO HUNDRED SEVENTY DEGREES;So;0;ON;;;;;N;;;;; +1FA3E;BLACK CHESS PAWN ROTATED TWO HUNDRED SEVENTY DEGREES;So;0;ON;;;;;N;;;;; +1FA3F;NEUTRAL CHESS KING ROTATED TWO HUNDRED SEVENTY DEGREES;So;0;ON;;;;;N;;;;; +1FA40;NEUTRAL CHESS QUEEN ROTATED TWO HUNDRED SEVENTY DEGREES;So;0;ON;;;;;N;;;;; +1FA41;NEUTRAL CHESS ROOK ROTATED TWO HUNDRED SEVENTY DEGREES;So;0;ON;;;;;N;;;;; +1FA42;NEUTRAL CHESS BISHOP ROTATED TWO HUNDRED SEVENTY DEGREES;So;0;ON;;;;;N;;;;; +1FA43;NEUTRAL CHESS KNIGHT ROTATED TWO HUNDRED SEVENTY DEGREES;So;0;ON;;;;;N;;;;; +1FA44;NEUTRAL CHESS PAWN ROTATED TWO HUNDRED SEVENTY DEGREES;So;0;ON;;;;;N;;;;; +1FA45;WHITE CHESS KNIGHT ROTATED THREE HUNDRED FIFTEEN DEGREES;So;0;ON;;;;;N;;;;; +1FA46;BLACK CHESS KNIGHT ROTATED THREE HUNDRED FIFTEEN DEGREES;So;0;ON;;;;;N;;;;; +1FA47;NEUTRAL CHESS KNIGHT ROTATED THREE HUNDRED FIFTEEN DEGREES;So;0;ON;;;;;N;;;;; +1FA48;WHITE CHESS EQUIHOPPER;So;0;ON;;;;;N;;;;; +1FA49;BLACK CHESS EQUIHOPPER;So;0;ON;;;;;N;;;;; +1FA4A;NEUTRAL CHESS EQUIHOPPER;So;0;ON;;;;;N;;;;; +1FA4B;WHITE CHESS EQUIHOPPER ROTATED NINETY DEGREES;So;0;ON;;;;;N;;;;; +1FA4C;BLACK CHESS EQUIHOPPER ROTATED NINETY DEGREES;So;0;ON;;;;;N;;;;; +1FA4D;NEUTRAL CHESS EQUIHOPPER ROTATED NINETY DEGREES;So;0;ON;;;;;N;;;;; +1FA4E;WHITE CHESS KNIGHT-QUEEN;So;0;ON;;;;;N;;;;; +1FA4F;WHITE CHESS KNIGHT-ROOK;So;0;ON;;;;;N;;;;; +1FA50;WHITE CHESS KNIGHT-BISHOP;So;0;ON;;;;;N;;;;; +1FA51;BLACK CHESS KNIGHT-QUEEN;So;0;ON;;;;;N;;;;; +1FA52;BLACK CHESS KNIGHT-ROOK;So;0;ON;;;;;N;;;;; +1FA53;BLACK CHESS KNIGHT-BISHOP;So;0;ON;;;;;N;;;;; +1FA60;XIANGQI RED GENERAL;So;0;ON;;;;;N;;;;; +1FA61;XIANGQI RED MANDARIN;So;0;ON;;;;;N;;;;; +1FA62;XIANGQI RED ELEPHANT;So;0;ON;;;;;N;;;;; +1FA63;XIANGQI RED HORSE;So;0;ON;;;;;N;;;;; +1FA64;XIANGQI RED CHARIOT;So;0;ON;;;;;N;;;;; +1FA65;XIANGQI RED CANNON;So;0;ON;;;;;N;;;;; +1FA66;XIANGQI RED SOLDIER;So;0;ON;;;;;N;;;;; +1FA67;XIANGQI BLACK GENERAL;So;0;ON;;;;;N;;;;; +1FA68;XIANGQI BLACK MANDARIN;So;0;ON;;;;;N;;;;; +1FA69;XIANGQI BLACK ELEPHANT;So;0;ON;;;;;N;;;;; +1FA6A;XIANGQI BLACK HORSE;So;0;ON;;;;;N;;;;; +1FA6B;XIANGQI BLACK CHARIOT;So;0;ON;;;;;N;;;;; +1FA6C;XIANGQI BLACK CANNON;So;0;ON;;;;;N;;;;; +1FA6D;XIANGQI BLACK SOLDIER;So;0;ON;;;;;N;;;;; +1FA70;BALLET SHOES;So;0;ON;;;;;N;;;;; +1FA71;ONE-PIECE SWIMSUIT;So;0;ON;;;;;N;;;;; +1FA72;BRIEFS;So;0;ON;;;;;N;;;;; +1FA73;SHORTS;So;0;ON;;;;;N;;;;; +1FA78;DROP OF BLOOD;So;0;ON;;;;;N;;;;; +1FA79;ADHESIVE BANDAGE;So;0;ON;;;;;N;;;;; +1FA7A;STETHOSCOPE;So;0;ON;;;;;N;;;;; +1FA80;YO-YO;So;0;ON;;;;;N;;;;; +1FA81;KITE;So;0;ON;;;;;N;;;;; +1FA82;PARACHUTE;So;0;ON;;;;;N;;;;; +1FA90;RINGED PLANET;So;0;ON;;;;;N;;;;; +1FA91;CHAIR;So;0;ON;;;;;N;;;;; +1FA92;RAZOR;So;0;ON;;;;;N;;;;; +1FA93;AXE;So;0;ON;;;;;N;;;;; +1FA94;DIYA LAMP;So;0;ON;;;;;N;;;;; +1FA95;BANJO;So;0;ON;;;;;N;;;;; +20000;;Lo;0;L;;;;;N;;;;; +2A6D6;;Lo;0;L;;;;;N;;;;; +2A700;;Lo;0;L;;;;;N;;;;; +2B734;;Lo;0;L;;;;;N;;;;; +2B740;;Lo;0;L;;;;;N;;;;; +2B81D;;Lo;0;L;;;;;N;;;;; +2B820;;Lo;0;L;;;;;N;;;;; +2CEA1;;Lo;0;L;;;;;N;;;;; +2CEB0;;Lo;0;L;;;;;N;;;;; +2EBE0;;Lo;0;L;;;;;N;;;;; +2F800;CJK COMPATIBILITY IDEOGRAPH-2F800;Lo;0;L;4E3D;;;;N;;;;; +2F801;CJK COMPATIBILITY IDEOGRAPH-2F801;Lo;0;L;4E38;;;;N;;;;; +2F802;CJK COMPATIBILITY IDEOGRAPH-2F802;Lo;0;L;4E41;;;;N;;;;; +2F803;CJK COMPATIBILITY IDEOGRAPH-2F803;Lo;0;L;20122;;;;N;;;;; +2F804;CJK COMPATIBILITY IDEOGRAPH-2F804;Lo;0;L;4F60;;;;N;;;;; +2F805;CJK COMPATIBILITY IDEOGRAPH-2F805;Lo;0;L;4FAE;;;;N;;;;; +2F806;CJK COMPATIBILITY IDEOGRAPH-2F806;Lo;0;L;4FBB;;;;N;;;;; +2F807;CJK COMPATIBILITY IDEOGRAPH-2F807;Lo;0;L;5002;;;;N;;;;; +2F808;CJK COMPATIBILITY IDEOGRAPH-2F808;Lo;0;L;507A;;;;N;;;;; +2F809;CJK COMPATIBILITY IDEOGRAPH-2F809;Lo;0;L;5099;;;;N;;;;; +2F80A;CJK COMPATIBILITY IDEOGRAPH-2F80A;Lo;0;L;50E7;;;;N;;;;; +2F80B;CJK COMPATIBILITY IDEOGRAPH-2F80B;Lo;0;L;50CF;;;;N;;;;; +2F80C;CJK COMPATIBILITY IDEOGRAPH-2F80C;Lo;0;L;349E;;;;N;;;;; +2F80D;CJK COMPATIBILITY IDEOGRAPH-2F80D;Lo;0;L;2063A;;;;N;;;;; +2F80E;CJK COMPATIBILITY IDEOGRAPH-2F80E;Lo;0;L;514D;;;;N;;;;; +2F80F;CJK COMPATIBILITY IDEOGRAPH-2F80F;Lo;0;L;5154;;;;N;;;;; +2F810;CJK COMPATIBILITY IDEOGRAPH-2F810;Lo;0;L;5164;;;;N;;;;; +2F811;CJK COMPATIBILITY IDEOGRAPH-2F811;Lo;0;L;5177;;;;N;;;;; +2F812;CJK COMPATIBILITY IDEOGRAPH-2F812;Lo;0;L;2051C;;;;N;;;;; +2F813;CJK COMPATIBILITY IDEOGRAPH-2F813;Lo;0;L;34B9;;;;N;;;;; +2F814;CJK COMPATIBILITY IDEOGRAPH-2F814;Lo;0;L;5167;;;;N;;;;; +2F815;CJK COMPATIBILITY IDEOGRAPH-2F815;Lo;0;L;518D;;;;N;;;;; +2F816;CJK COMPATIBILITY IDEOGRAPH-2F816;Lo;0;L;2054B;;;;N;;;;; +2F817;CJK COMPATIBILITY IDEOGRAPH-2F817;Lo;0;L;5197;;;;N;;;;; +2F818;CJK COMPATIBILITY IDEOGRAPH-2F818;Lo;0;L;51A4;;;;N;;;;; +2F819;CJK COMPATIBILITY IDEOGRAPH-2F819;Lo;0;L;4ECC;;;;N;;;;; +2F81A;CJK COMPATIBILITY IDEOGRAPH-2F81A;Lo;0;L;51AC;;;;N;;;;; +2F81B;CJK COMPATIBILITY IDEOGRAPH-2F81B;Lo;0;L;51B5;;;;N;;;;; +2F81C;CJK COMPATIBILITY IDEOGRAPH-2F81C;Lo;0;L;291DF;;;;N;;;;; +2F81D;CJK COMPATIBILITY IDEOGRAPH-2F81D;Lo;0;L;51F5;;;;N;;;;; +2F81E;CJK COMPATIBILITY IDEOGRAPH-2F81E;Lo;0;L;5203;;;;N;;;;; +2F81F;CJK COMPATIBILITY IDEOGRAPH-2F81F;Lo;0;L;34DF;;;;N;;;;; +2F820;CJK COMPATIBILITY IDEOGRAPH-2F820;Lo;0;L;523B;;;;N;;;;; +2F821;CJK COMPATIBILITY IDEOGRAPH-2F821;Lo;0;L;5246;;;;N;;;;; +2F822;CJK COMPATIBILITY IDEOGRAPH-2F822;Lo;0;L;5272;;;;N;;;;; +2F823;CJK COMPATIBILITY IDEOGRAPH-2F823;Lo;0;L;5277;;;;N;;;;; +2F824;CJK COMPATIBILITY IDEOGRAPH-2F824;Lo;0;L;3515;;;;N;;;;; +2F825;CJK COMPATIBILITY IDEOGRAPH-2F825;Lo;0;L;52C7;;;;N;;;;; +2F826;CJK COMPATIBILITY IDEOGRAPH-2F826;Lo;0;L;52C9;;;;N;;;;; +2F827;CJK COMPATIBILITY IDEOGRAPH-2F827;Lo;0;L;52E4;;;;N;;;;; +2F828;CJK COMPATIBILITY IDEOGRAPH-2F828;Lo;0;L;52FA;;;;N;;;;; +2F829;CJK COMPATIBILITY IDEOGRAPH-2F829;Lo;0;L;5305;;;;N;;;;; +2F82A;CJK COMPATIBILITY IDEOGRAPH-2F82A;Lo;0;L;5306;;;;N;;;;; +2F82B;CJK COMPATIBILITY IDEOGRAPH-2F82B;Lo;0;L;5317;;;;N;;;;; +2F82C;CJK COMPATIBILITY IDEOGRAPH-2F82C;Lo;0;L;5349;;;;N;;;;; +2F82D;CJK COMPATIBILITY IDEOGRAPH-2F82D;Lo;0;L;5351;;;;N;;;;; +2F82E;CJK COMPATIBILITY IDEOGRAPH-2F82E;Lo;0;L;535A;;;;N;;;;; +2F82F;CJK COMPATIBILITY IDEOGRAPH-2F82F;Lo;0;L;5373;;;;N;;;;; +2F830;CJK COMPATIBILITY IDEOGRAPH-2F830;Lo;0;L;537D;;;;N;;;;; +2F831;CJK COMPATIBILITY IDEOGRAPH-2F831;Lo;0;L;537F;;;;N;;;;; +2F832;CJK COMPATIBILITY IDEOGRAPH-2F832;Lo;0;L;537F;;;;N;;;;; +2F833;CJK COMPATIBILITY IDEOGRAPH-2F833;Lo;0;L;537F;;;;N;;;;; +2F834;CJK COMPATIBILITY IDEOGRAPH-2F834;Lo;0;L;20A2C;;;;N;;;;; +2F835;CJK COMPATIBILITY IDEOGRAPH-2F835;Lo;0;L;7070;;;;N;;;;; +2F836;CJK COMPATIBILITY IDEOGRAPH-2F836;Lo;0;L;53CA;;;;N;;;;; +2F837;CJK COMPATIBILITY IDEOGRAPH-2F837;Lo;0;L;53DF;;;;N;;;;; +2F838;CJK COMPATIBILITY IDEOGRAPH-2F838;Lo;0;L;20B63;;;;N;;;;; +2F839;CJK COMPATIBILITY IDEOGRAPH-2F839;Lo;0;L;53EB;;;;N;;;;; +2F83A;CJK COMPATIBILITY IDEOGRAPH-2F83A;Lo;0;L;53F1;;;;N;;;;; +2F83B;CJK COMPATIBILITY IDEOGRAPH-2F83B;Lo;0;L;5406;;;;N;;;;; +2F83C;CJK COMPATIBILITY IDEOGRAPH-2F83C;Lo;0;L;549E;;;;N;;;;; +2F83D;CJK COMPATIBILITY IDEOGRAPH-2F83D;Lo;0;L;5438;;;;N;;;;; +2F83E;CJK COMPATIBILITY IDEOGRAPH-2F83E;Lo;0;L;5448;;;;N;;;;; +2F83F;CJK COMPATIBILITY IDEOGRAPH-2F83F;Lo;0;L;5468;;;;N;;;;; +2F840;CJK COMPATIBILITY IDEOGRAPH-2F840;Lo;0;L;54A2;;;;N;;;;; +2F841;CJK COMPATIBILITY IDEOGRAPH-2F841;Lo;0;L;54F6;;;;N;;;;; +2F842;CJK COMPATIBILITY IDEOGRAPH-2F842;Lo;0;L;5510;;;;N;;;;; +2F843;CJK COMPATIBILITY IDEOGRAPH-2F843;Lo;0;L;5553;;;;N;;;;; +2F844;CJK COMPATIBILITY IDEOGRAPH-2F844;Lo;0;L;5563;;;;N;;;;; +2F845;CJK COMPATIBILITY IDEOGRAPH-2F845;Lo;0;L;5584;;;;N;;;;; +2F846;CJK COMPATIBILITY IDEOGRAPH-2F846;Lo;0;L;5584;;;;N;;;;; +2F847;CJK COMPATIBILITY IDEOGRAPH-2F847;Lo;0;L;5599;;;;N;;;;; +2F848;CJK COMPATIBILITY IDEOGRAPH-2F848;Lo;0;L;55AB;;;;N;;;;; +2F849;CJK COMPATIBILITY IDEOGRAPH-2F849;Lo;0;L;55B3;;;;N;;;;; +2F84A;CJK COMPATIBILITY IDEOGRAPH-2F84A;Lo;0;L;55C2;;;;N;;;;; +2F84B;CJK COMPATIBILITY IDEOGRAPH-2F84B;Lo;0;L;5716;;;;N;;;;; +2F84C;CJK COMPATIBILITY IDEOGRAPH-2F84C;Lo;0;L;5606;;;;N;;;;; +2F84D;CJK COMPATIBILITY IDEOGRAPH-2F84D;Lo;0;L;5717;;;;N;;;;; +2F84E;CJK COMPATIBILITY IDEOGRAPH-2F84E;Lo;0;L;5651;;;;N;;;;; +2F84F;CJK COMPATIBILITY IDEOGRAPH-2F84F;Lo;0;L;5674;;;;N;;;;; +2F850;CJK COMPATIBILITY IDEOGRAPH-2F850;Lo;0;L;5207;;;;N;;;;; +2F851;CJK COMPATIBILITY IDEOGRAPH-2F851;Lo;0;L;58EE;;;;N;;;;; +2F852;CJK COMPATIBILITY IDEOGRAPH-2F852;Lo;0;L;57CE;;;;N;;;;; +2F853;CJK COMPATIBILITY IDEOGRAPH-2F853;Lo;0;L;57F4;;;;N;;;;; +2F854;CJK COMPATIBILITY IDEOGRAPH-2F854;Lo;0;L;580D;;;;N;;;;; +2F855;CJK COMPATIBILITY IDEOGRAPH-2F855;Lo;0;L;578B;;;;N;;;;; +2F856;CJK COMPATIBILITY IDEOGRAPH-2F856;Lo;0;L;5832;;;;N;;;;; +2F857;CJK COMPATIBILITY IDEOGRAPH-2F857;Lo;0;L;5831;;;;N;;;;; +2F858;CJK COMPATIBILITY IDEOGRAPH-2F858;Lo;0;L;58AC;;;;N;;;;; +2F859;CJK COMPATIBILITY IDEOGRAPH-2F859;Lo;0;L;214E4;;;;N;;;;; +2F85A;CJK COMPATIBILITY IDEOGRAPH-2F85A;Lo;0;L;58F2;;;;N;;;;; +2F85B;CJK COMPATIBILITY IDEOGRAPH-2F85B;Lo;0;L;58F7;;;;N;;;;; +2F85C;CJK COMPATIBILITY IDEOGRAPH-2F85C;Lo;0;L;5906;;;;N;;;;; +2F85D;CJK COMPATIBILITY IDEOGRAPH-2F85D;Lo;0;L;591A;;;;N;;;;; +2F85E;CJK COMPATIBILITY IDEOGRAPH-2F85E;Lo;0;L;5922;;;;N;;;;; +2F85F;CJK COMPATIBILITY IDEOGRAPH-2F85F;Lo;0;L;5962;;;;N;;;;; +2F860;CJK COMPATIBILITY IDEOGRAPH-2F860;Lo;0;L;216A8;;;;N;;;;; +2F861;CJK COMPATIBILITY IDEOGRAPH-2F861;Lo;0;L;216EA;;;;N;;;;; +2F862;CJK COMPATIBILITY IDEOGRAPH-2F862;Lo;0;L;59EC;;;;N;;;;; +2F863;CJK COMPATIBILITY IDEOGRAPH-2F863;Lo;0;L;5A1B;;;;N;;;;; +2F864;CJK COMPATIBILITY IDEOGRAPH-2F864;Lo;0;L;5A27;;;;N;;;;; +2F865;CJK COMPATIBILITY IDEOGRAPH-2F865;Lo;0;L;59D8;;;;N;;;;; +2F866;CJK COMPATIBILITY IDEOGRAPH-2F866;Lo;0;L;5A66;;;;N;;;;; +2F867;CJK COMPATIBILITY IDEOGRAPH-2F867;Lo;0;L;36EE;;;;N;;;;; +2F868;CJK COMPATIBILITY IDEOGRAPH-2F868;Lo;0;L;36FC;;;;N;;;;; +2F869;CJK COMPATIBILITY IDEOGRAPH-2F869;Lo;0;L;5B08;;;;N;;;;; +2F86A;CJK COMPATIBILITY IDEOGRAPH-2F86A;Lo;0;L;5B3E;;;;N;;;;; +2F86B;CJK COMPATIBILITY IDEOGRAPH-2F86B;Lo;0;L;5B3E;;;;N;;;;; +2F86C;CJK COMPATIBILITY IDEOGRAPH-2F86C;Lo;0;L;219C8;;;;N;;;;; +2F86D;CJK COMPATIBILITY IDEOGRAPH-2F86D;Lo;0;L;5BC3;;;;N;;;;; +2F86E;CJK COMPATIBILITY IDEOGRAPH-2F86E;Lo;0;L;5BD8;;;;N;;;;; +2F86F;CJK COMPATIBILITY IDEOGRAPH-2F86F;Lo;0;L;5BE7;;;;N;;;;; +2F870;CJK COMPATIBILITY IDEOGRAPH-2F870;Lo;0;L;5BF3;;;;N;;;;; +2F871;CJK COMPATIBILITY IDEOGRAPH-2F871;Lo;0;L;21B18;;;;N;;;;; +2F872;CJK COMPATIBILITY IDEOGRAPH-2F872;Lo;0;L;5BFF;;;;N;;;;; +2F873;CJK COMPATIBILITY IDEOGRAPH-2F873;Lo;0;L;5C06;;;;N;;;;; +2F874;CJK COMPATIBILITY IDEOGRAPH-2F874;Lo;0;L;5F53;;;;N;;;;; +2F875;CJK COMPATIBILITY IDEOGRAPH-2F875;Lo;0;L;5C22;;;;N;;;;; +2F876;CJK COMPATIBILITY IDEOGRAPH-2F876;Lo;0;L;3781;;;;N;;;;; +2F877;CJK COMPATIBILITY IDEOGRAPH-2F877;Lo;0;L;5C60;;;;N;;;;; +2F878;CJK COMPATIBILITY IDEOGRAPH-2F878;Lo;0;L;5C6E;;;;N;;;;; +2F879;CJK COMPATIBILITY IDEOGRAPH-2F879;Lo;0;L;5CC0;;;;N;;;;; +2F87A;CJK COMPATIBILITY IDEOGRAPH-2F87A;Lo;0;L;5C8D;;;;N;;;;; +2F87B;CJK COMPATIBILITY IDEOGRAPH-2F87B;Lo;0;L;21DE4;;;;N;;;;; +2F87C;CJK COMPATIBILITY IDEOGRAPH-2F87C;Lo;0;L;5D43;;;;N;;;;; +2F87D;CJK COMPATIBILITY IDEOGRAPH-2F87D;Lo;0;L;21DE6;;;;N;;;;; +2F87E;CJK COMPATIBILITY IDEOGRAPH-2F87E;Lo;0;L;5D6E;;;;N;;;;; +2F87F;CJK COMPATIBILITY IDEOGRAPH-2F87F;Lo;0;L;5D6B;;;;N;;;;; +2F880;CJK COMPATIBILITY IDEOGRAPH-2F880;Lo;0;L;5D7C;;;;N;;;;; +2F881;CJK COMPATIBILITY IDEOGRAPH-2F881;Lo;0;L;5DE1;;;;N;;;;; +2F882;CJK COMPATIBILITY IDEOGRAPH-2F882;Lo;0;L;5DE2;;;;N;;;;; +2F883;CJK COMPATIBILITY IDEOGRAPH-2F883;Lo;0;L;382F;;;;N;;;;; +2F884;CJK COMPATIBILITY IDEOGRAPH-2F884;Lo;0;L;5DFD;;;;N;;;;; +2F885;CJK COMPATIBILITY IDEOGRAPH-2F885;Lo;0;L;5E28;;;;N;;;;; +2F886;CJK COMPATIBILITY IDEOGRAPH-2F886;Lo;0;L;5E3D;;;;N;;;;; +2F887;CJK COMPATIBILITY IDEOGRAPH-2F887;Lo;0;L;5E69;;;;N;;;;; +2F888;CJK COMPATIBILITY IDEOGRAPH-2F888;Lo;0;L;3862;;;;N;;;;; +2F889;CJK COMPATIBILITY IDEOGRAPH-2F889;Lo;0;L;22183;;;;N;;;;; +2F88A;CJK COMPATIBILITY IDEOGRAPH-2F88A;Lo;0;L;387C;;;;N;;;;; +2F88B;CJK COMPATIBILITY IDEOGRAPH-2F88B;Lo;0;L;5EB0;;;;N;;;;; +2F88C;CJK COMPATIBILITY IDEOGRAPH-2F88C;Lo;0;L;5EB3;;;;N;;;;; +2F88D;CJK COMPATIBILITY IDEOGRAPH-2F88D;Lo;0;L;5EB6;;;;N;;;;; +2F88E;CJK COMPATIBILITY IDEOGRAPH-2F88E;Lo;0;L;5ECA;;;;N;;;;; +2F88F;CJK COMPATIBILITY IDEOGRAPH-2F88F;Lo;0;L;2A392;;;;N;;;;; +2F890;CJK COMPATIBILITY IDEOGRAPH-2F890;Lo;0;L;5EFE;;;9;N;;;;; +2F891;CJK COMPATIBILITY IDEOGRAPH-2F891;Lo;0;L;22331;;;;N;;;;; +2F892;CJK COMPATIBILITY IDEOGRAPH-2F892;Lo;0;L;22331;;;;N;;;;; +2F893;CJK COMPATIBILITY IDEOGRAPH-2F893;Lo;0;L;8201;;;;N;;;;; +2F894;CJK COMPATIBILITY IDEOGRAPH-2F894;Lo;0;L;5F22;;;;N;;;;; +2F895;CJK COMPATIBILITY IDEOGRAPH-2F895;Lo;0;L;5F22;;;;N;;;;; +2F896;CJK COMPATIBILITY IDEOGRAPH-2F896;Lo;0;L;38C7;;;;N;;;;; +2F897;CJK COMPATIBILITY IDEOGRAPH-2F897;Lo;0;L;232B8;;;;N;;;;; +2F898;CJK COMPATIBILITY IDEOGRAPH-2F898;Lo;0;L;261DA;;;;N;;;;; +2F899;CJK COMPATIBILITY IDEOGRAPH-2F899;Lo;0;L;5F62;;;;N;;;;; +2F89A;CJK COMPATIBILITY IDEOGRAPH-2F89A;Lo;0;L;5F6B;;;;N;;;;; +2F89B;CJK COMPATIBILITY IDEOGRAPH-2F89B;Lo;0;L;38E3;;;;N;;;;; +2F89C;CJK COMPATIBILITY IDEOGRAPH-2F89C;Lo;0;L;5F9A;;;;N;;;;; +2F89D;CJK COMPATIBILITY IDEOGRAPH-2F89D;Lo;0;L;5FCD;;;;N;;;;; +2F89E;CJK COMPATIBILITY IDEOGRAPH-2F89E;Lo;0;L;5FD7;;;;N;;;;; +2F89F;CJK COMPATIBILITY IDEOGRAPH-2F89F;Lo;0;L;5FF9;;;;N;;;;; +2F8A0;CJK COMPATIBILITY IDEOGRAPH-2F8A0;Lo;0;L;6081;;;;N;;;;; +2F8A1;CJK COMPATIBILITY IDEOGRAPH-2F8A1;Lo;0;L;393A;;;;N;;;;; +2F8A2;CJK COMPATIBILITY IDEOGRAPH-2F8A2;Lo;0;L;391C;;;;N;;;;; +2F8A3;CJK COMPATIBILITY IDEOGRAPH-2F8A3;Lo;0;L;6094;;;;N;;;;; +2F8A4;CJK COMPATIBILITY IDEOGRAPH-2F8A4;Lo;0;L;226D4;;;;N;;;;; +2F8A5;CJK COMPATIBILITY IDEOGRAPH-2F8A5;Lo;0;L;60C7;;;;N;;;;; +2F8A6;CJK COMPATIBILITY IDEOGRAPH-2F8A6;Lo;0;L;6148;;;;N;;;;; +2F8A7;CJK COMPATIBILITY IDEOGRAPH-2F8A7;Lo;0;L;614C;;;;N;;;;; +2F8A8;CJK COMPATIBILITY IDEOGRAPH-2F8A8;Lo;0;L;614E;;;;N;;;;; +2F8A9;CJK COMPATIBILITY IDEOGRAPH-2F8A9;Lo;0;L;614C;;;;N;;;;; +2F8AA;CJK COMPATIBILITY IDEOGRAPH-2F8AA;Lo;0;L;617A;;;;N;;;;; +2F8AB;CJK COMPATIBILITY IDEOGRAPH-2F8AB;Lo;0;L;618E;;;;N;;;;; +2F8AC;CJK COMPATIBILITY IDEOGRAPH-2F8AC;Lo;0;L;61B2;;;;N;;;;; +2F8AD;CJK COMPATIBILITY IDEOGRAPH-2F8AD;Lo;0;L;61A4;;;;N;;;;; +2F8AE;CJK COMPATIBILITY IDEOGRAPH-2F8AE;Lo;0;L;61AF;;;;N;;;;; +2F8AF;CJK COMPATIBILITY IDEOGRAPH-2F8AF;Lo;0;L;61DE;;;;N;;;;; +2F8B0;CJK COMPATIBILITY IDEOGRAPH-2F8B0;Lo;0;L;61F2;;;;N;;;;; +2F8B1;CJK COMPATIBILITY IDEOGRAPH-2F8B1;Lo;0;L;61F6;;;;N;;;;; +2F8B2;CJK COMPATIBILITY IDEOGRAPH-2F8B2;Lo;0;L;6210;;;;N;;;;; +2F8B3;CJK COMPATIBILITY IDEOGRAPH-2F8B3;Lo;0;L;621B;;;;N;;;;; +2F8B4;CJK COMPATIBILITY IDEOGRAPH-2F8B4;Lo;0;L;625D;;;;N;;;;; +2F8B5;CJK COMPATIBILITY IDEOGRAPH-2F8B5;Lo;0;L;62B1;;;;N;;;;; +2F8B6;CJK COMPATIBILITY IDEOGRAPH-2F8B6;Lo;0;L;62D4;;;;N;;;;; +2F8B7;CJK COMPATIBILITY IDEOGRAPH-2F8B7;Lo;0;L;6350;;;;N;;;;; +2F8B8;CJK COMPATIBILITY IDEOGRAPH-2F8B8;Lo;0;L;22B0C;;;;N;;;;; +2F8B9;CJK COMPATIBILITY IDEOGRAPH-2F8B9;Lo;0;L;633D;;;;N;;;;; +2F8BA;CJK COMPATIBILITY IDEOGRAPH-2F8BA;Lo;0;L;62FC;;;;N;;;;; +2F8BB;CJK COMPATIBILITY IDEOGRAPH-2F8BB;Lo;0;L;6368;;;;N;;;;; +2F8BC;CJK COMPATIBILITY IDEOGRAPH-2F8BC;Lo;0;L;6383;;;;N;;;;; +2F8BD;CJK COMPATIBILITY IDEOGRAPH-2F8BD;Lo;0;L;63E4;;;;N;;;;; +2F8BE;CJK COMPATIBILITY IDEOGRAPH-2F8BE;Lo;0;L;22BF1;;;;N;;;;; +2F8BF;CJK COMPATIBILITY IDEOGRAPH-2F8BF;Lo;0;L;6422;;;;N;;;;; +2F8C0;CJK COMPATIBILITY IDEOGRAPH-2F8C0;Lo;0;L;63C5;;;;N;;;;; +2F8C1;CJK COMPATIBILITY IDEOGRAPH-2F8C1;Lo;0;L;63A9;;;;N;;;;; +2F8C2;CJK COMPATIBILITY IDEOGRAPH-2F8C2;Lo;0;L;3A2E;;;;N;;;;; +2F8C3;CJK COMPATIBILITY IDEOGRAPH-2F8C3;Lo;0;L;6469;;;;N;;;;; +2F8C4;CJK COMPATIBILITY IDEOGRAPH-2F8C4;Lo;0;L;647E;;;;N;;;;; +2F8C5;CJK COMPATIBILITY IDEOGRAPH-2F8C5;Lo;0;L;649D;;;;N;;;;; +2F8C6;CJK COMPATIBILITY IDEOGRAPH-2F8C6;Lo;0;L;6477;;;;N;;;;; +2F8C7;CJK COMPATIBILITY IDEOGRAPH-2F8C7;Lo;0;L;3A6C;;;;N;;;;; +2F8C8;CJK COMPATIBILITY IDEOGRAPH-2F8C8;Lo;0;L;654F;;;;N;;;;; +2F8C9;CJK COMPATIBILITY IDEOGRAPH-2F8C9;Lo;0;L;656C;;;;N;;;;; +2F8CA;CJK COMPATIBILITY IDEOGRAPH-2F8CA;Lo;0;L;2300A;;;;N;;;;; +2F8CB;CJK COMPATIBILITY IDEOGRAPH-2F8CB;Lo;0;L;65E3;;;;N;;;;; +2F8CC;CJK COMPATIBILITY IDEOGRAPH-2F8CC;Lo;0;L;66F8;;;;N;;;;; +2F8CD;CJK COMPATIBILITY IDEOGRAPH-2F8CD;Lo;0;L;6649;;;;N;;;;; +2F8CE;CJK COMPATIBILITY IDEOGRAPH-2F8CE;Lo;0;L;3B19;;;;N;;;;; +2F8CF;CJK COMPATIBILITY IDEOGRAPH-2F8CF;Lo;0;L;6691;;;;N;;;;; +2F8D0;CJK COMPATIBILITY IDEOGRAPH-2F8D0;Lo;0;L;3B08;;;;N;;;;; +2F8D1;CJK COMPATIBILITY IDEOGRAPH-2F8D1;Lo;0;L;3AE4;;;;N;;;;; +2F8D2;CJK COMPATIBILITY IDEOGRAPH-2F8D2;Lo;0;L;5192;;;;N;;;;; +2F8D3;CJK COMPATIBILITY IDEOGRAPH-2F8D3;Lo;0;L;5195;;;;N;;;;; +2F8D4;CJK COMPATIBILITY IDEOGRAPH-2F8D4;Lo;0;L;6700;;;;N;;;;; +2F8D5;CJK COMPATIBILITY IDEOGRAPH-2F8D5;Lo;0;L;669C;;;;N;;;;; +2F8D6;CJK COMPATIBILITY IDEOGRAPH-2F8D6;Lo;0;L;80AD;;;;N;;;;; +2F8D7;CJK COMPATIBILITY IDEOGRAPH-2F8D7;Lo;0;L;43D9;;;;N;;;;; +2F8D8;CJK COMPATIBILITY IDEOGRAPH-2F8D8;Lo;0;L;6717;;;;N;;;;; +2F8D9;CJK COMPATIBILITY IDEOGRAPH-2F8D9;Lo;0;L;671B;;;;N;;;;; +2F8DA;CJK COMPATIBILITY IDEOGRAPH-2F8DA;Lo;0;L;6721;;;;N;;;;; +2F8DB;CJK COMPATIBILITY IDEOGRAPH-2F8DB;Lo;0;L;675E;;;;N;;;;; +2F8DC;CJK COMPATIBILITY IDEOGRAPH-2F8DC;Lo;0;L;6753;;;;N;;;;; +2F8DD;CJK COMPATIBILITY IDEOGRAPH-2F8DD;Lo;0;L;233C3;;;;N;;;;; +2F8DE;CJK COMPATIBILITY IDEOGRAPH-2F8DE;Lo;0;L;3B49;;;;N;;;;; +2F8DF;CJK COMPATIBILITY IDEOGRAPH-2F8DF;Lo;0;L;67FA;;;;N;;;;; +2F8E0;CJK COMPATIBILITY IDEOGRAPH-2F8E0;Lo;0;L;6785;;;;N;;;;; +2F8E1;CJK COMPATIBILITY IDEOGRAPH-2F8E1;Lo;0;L;6852;;;;N;;;;; +2F8E2;CJK COMPATIBILITY IDEOGRAPH-2F8E2;Lo;0;L;6885;;;;N;;;;; +2F8E3;CJK COMPATIBILITY IDEOGRAPH-2F8E3;Lo;0;L;2346D;;;;N;;;;; +2F8E4;CJK COMPATIBILITY IDEOGRAPH-2F8E4;Lo;0;L;688E;;;;N;;;;; +2F8E5;CJK COMPATIBILITY IDEOGRAPH-2F8E5;Lo;0;L;681F;;;;N;;;;; +2F8E6;CJK COMPATIBILITY IDEOGRAPH-2F8E6;Lo;0;L;6914;;;;N;;;;; +2F8E7;CJK COMPATIBILITY IDEOGRAPH-2F8E7;Lo;0;L;3B9D;;;;N;;;;; +2F8E8;CJK COMPATIBILITY IDEOGRAPH-2F8E8;Lo;0;L;6942;;;;N;;;;; +2F8E9;CJK COMPATIBILITY IDEOGRAPH-2F8E9;Lo;0;L;69A3;;;;N;;;;; +2F8EA;CJK COMPATIBILITY IDEOGRAPH-2F8EA;Lo;0;L;69EA;;;;N;;;;; +2F8EB;CJK COMPATIBILITY IDEOGRAPH-2F8EB;Lo;0;L;6AA8;;;;N;;;;; +2F8EC;CJK COMPATIBILITY IDEOGRAPH-2F8EC;Lo;0;L;236A3;;;;N;;;;; +2F8ED;CJK COMPATIBILITY IDEOGRAPH-2F8ED;Lo;0;L;6ADB;;;;N;;;;; +2F8EE;CJK COMPATIBILITY IDEOGRAPH-2F8EE;Lo;0;L;3C18;;;;N;;;;; +2F8EF;CJK COMPATIBILITY IDEOGRAPH-2F8EF;Lo;0;L;6B21;;;;N;;;;; +2F8F0;CJK COMPATIBILITY IDEOGRAPH-2F8F0;Lo;0;L;238A7;;;;N;;;;; +2F8F1;CJK COMPATIBILITY IDEOGRAPH-2F8F1;Lo;0;L;6B54;;;;N;;;;; +2F8F2;CJK COMPATIBILITY IDEOGRAPH-2F8F2;Lo;0;L;3C4E;;;;N;;;;; +2F8F3;CJK COMPATIBILITY IDEOGRAPH-2F8F3;Lo;0;L;6B72;;;;N;;;;; +2F8F4;CJK COMPATIBILITY IDEOGRAPH-2F8F4;Lo;0;L;6B9F;;;;N;;;;; +2F8F5;CJK COMPATIBILITY IDEOGRAPH-2F8F5;Lo;0;L;6BBA;;;;N;;;;; +2F8F6;CJK COMPATIBILITY IDEOGRAPH-2F8F6;Lo;0;L;6BBB;;;;N;;;;; +2F8F7;CJK COMPATIBILITY IDEOGRAPH-2F8F7;Lo;0;L;23A8D;;;;N;;;;; +2F8F8;CJK COMPATIBILITY IDEOGRAPH-2F8F8;Lo;0;L;21D0B;;;;N;;;;; +2F8F9;CJK COMPATIBILITY IDEOGRAPH-2F8F9;Lo;0;L;23AFA;;;;N;;;;; +2F8FA;CJK COMPATIBILITY IDEOGRAPH-2F8FA;Lo;0;L;6C4E;;;;N;;;;; +2F8FB;CJK COMPATIBILITY IDEOGRAPH-2F8FB;Lo;0;L;23CBC;;;;N;;;;; +2F8FC;CJK COMPATIBILITY IDEOGRAPH-2F8FC;Lo;0;L;6CBF;;;;N;;;;; +2F8FD;CJK COMPATIBILITY IDEOGRAPH-2F8FD;Lo;0;L;6CCD;;;;N;;;;; +2F8FE;CJK COMPATIBILITY IDEOGRAPH-2F8FE;Lo;0;L;6C67;;;;N;;;;; +2F8FF;CJK COMPATIBILITY IDEOGRAPH-2F8FF;Lo;0;L;6D16;;;;N;;;;; +2F900;CJK COMPATIBILITY IDEOGRAPH-2F900;Lo;0;L;6D3E;;;;N;;;;; +2F901;CJK COMPATIBILITY IDEOGRAPH-2F901;Lo;0;L;6D77;;;;N;;;;; +2F902;CJK COMPATIBILITY IDEOGRAPH-2F902;Lo;0;L;6D41;;;;N;;;;; +2F903;CJK COMPATIBILITY IDEOGRAPH-2F903;Lo;0;L;6D69;;;;N;;;;; +2F904;CJK COMPATIBILITY IDEOGRAPH-2F904;Lo;0;L;6D78;;;;N;;;;; +2F905;CJK COMPATIBILITY IDEOGRAPH-2F905;Lo;0;L;6D85;;;;N;;;;; +2F906;CJK COMPATIBILITY IDEOGRAPH-2F906;Lo;0;L;23D1E;;;;N;;;;; +2F907;CJK COMPATIBILITY IDEOGRAPH-2F907;Lo;0;L;6D34;;;;N;;;;; +2F908;CJK COMPATIBILITY IDEOGRAPH-2F908;Lo;0;L;6E2F;;;;N;;;;; +2F909;CJK COMPATIBILITY IDEOGRAPH-2F909;Lo;0;L;6E6E;;;;N;;;;; +2F90A;CJK COMPATIBILITY IDEOGRAPH-2F90A;Lo;0;L;3D33;;;;N;;;;; +2F90B;CJK COMPATIBILITY IDEOGRAPH-2F90B;Lo;0;L;6ECB;;;;N;;;;; +2F90C;CJK COMPATIBILITY IDEOGRAPH-2F90C;Lo;0;L;6EC7;;;;N;;;;; +2F90D;CJK COMPATIBILITY IDEOGRAPH-2F90D;Lo;0;L;23ED1;;;;N;;;;; +2F90E;CJK COMPATIBILITY IDEOGRAPH-2F90E;Lo;0;L;6DF9;;;;N;;;;; +2F90F;CJK COMPATIBILITY IDEOGRAPH-2F90F;Lo;0;L;6F6E;;;;N;;;;; +2F910;CJK COMPATIBILITY IDEOGRAPH-2F910;Lo;0;L;23F5E;;;;N;;;;; +2F911;CJK COMPATIBILITY IDEOGRAPH-2F911;Lo;0;L;23F8E;;;;N;;;;; +2F912;CJK COMPATIBILITY IDEOGRAPH-2F912;Lo;0;L;6FC6;;;;N;;;;; +2F913;CJK COMPATIBILITY IDEOGRAPH-2F913;Lo;0;L;7039;;;;N;;;;; +2F914;CJK COMPATIBILITY IDEOGRAPH-2F914;Lo;0;L;701E;;;;N;;;;; +2F915;CJK COMPATIBILITY IDEOGRAPH-2F915;Lo;0;L;701B;;;;N;;;;; +2F916;CJK COMPATIBILITY IDEOGRAPH-2F916;Lo;0;L;3D96;;;;N;;;;; +2F917;CJK COMPATIBILITY IDEOGRAPH-2F917;Lo;0;L;704A;;;;N;;;;; +2F918;CJK COMPATIBILITY IDEOGRAPH-2F918;Lo;0;L;707D;;;;N;;;;; +2F919;CJK COMPATIBILITY IDEOGRAPH-2F919;Lo;0;L;7077;;;;N;;;;; +2F91A;CJK COMPATIBILITY IDEOGRAPH-2F91A;Lo;0;L;70AD;;;;N;;;;; +2F91B;CJK COMPATIBILITY IDEOGRAPH-2F91B;Lo;0;L;20525;;;;N;;;;; +2F91C;CJK COMPATIBILITY IDEOGRAPH-2F91C;Lo;0;L;7145;;;;N;;;;; +2F91D;CJK COMPATIBILITY IDEOGRAPH-2F91D;Lo;0;L;24263;;;;N;;;;; +2F91E;CJK COMPATIBILITY IDEOGRAPH-2F91E;Lo;0;L;719C;;;;N;;;;; +2F91F;CJK COMPATIBILITY IDEOGRAPH-2F91F;Lo;0;L;243AB;;;;N;;;;; +2F920;CJK COMPATIBILITY IDEOGRAPH-2F920;Lo;0;L;7228;;;;N;;;;; +2F921;CJK COMPATIBILITY IDEOGRAPH-2F921;Lo;0;L;7235;;;;N;;;;; +2F922;CJK COMPATIBILITY IDEOGRAPH-2F922;Lo;0;L;7250;;;;N;;;;; +2F923;CJK COMPATIBILITY IDEOGRAPH-2F923;Lo;0;L;24608;;;;N;;;;; +2F924;CJK COMPATIBILITY IDEOGRAPH-2F924;Lo;0;L;7280;;;;N;;;;; +2F925;CJK COMPATIBILITY IDEOGRAPH-2F925;Lo;0;L;7295;;;;N;;;;; +2F926;CJK COMPATIBILITY IDEOGRAPH-2F926;Lo;0;L;24735;;;;N;;;;; +2F927;CJK COMPATIBILITY IDEOGRAPH-2F927;Lo;0;L;24814;;;;N;;;;; +2F928;CJK COMPATIBILITY IDEOGRAPH-2F928;Lo;0;L;737A;;;;N;;;;; +2F929;CJK COMPATIBILITY IDEOGRAPH-2F929;Lo;0;L;738B;;;;N;;;;; +2F92A;CJK COMPATIBILITY IDEOGRAPH-2F92A;Lo;0;L;3EAC;;;;N;;;;; +2F92B;CJK COMPATIBILITY IDEOGRAPH-2F92B;Lo;0;L;73A5;;;;N;;;;; +2F92C;CJK COMPATIBILITY IDEOGRAPH-2F92C;Lo;0;L;3EB8;;;;N;;;;; +2F92D;CJK COMPATIBILITY IDEOGRAPH-2F92D;Lo;0;L;3EB8;;;;N;;;;; +2F92E;CJK COMPATIBILITY IDEOGRAPH-2F92E;Lo;0;L;7447;;;;N;;;;; +2F92F;CJK COMPATIBILITY IDEOGRAPH-2F92F;Lo;0;L;745C;;;;N;;;;; +2F930;CJK COMPATIBILITY IDEOGRAPH-2F930;Lo;0;L;7471;;;;N;;;;; +2F931;CJK COMPATIBILITY IDEOGRAPH-2F931;Lo;0;L;7485;;;;N;;;;; +2F932;CJK COMPATIBILITY IDEOGRAPH-2F932;Lo;0;L;74CA;;;;N;;;;; +2F933;CJK COMPATIBILITY IDEOGRAPH-2F933;Lo;0;L;3F1B;;;;N;;;;; +2F934;CJK COMPATIBILITY IDEOGRAPH-2F934;Lo;0;L;7524;;;;N;;;;; +2F935;CJK COMPATIBILITY IDEOGRAPH-2F935;Lo;0;L;24C36;;;;N;;;;; +2F936;CJK COMPATIBILITY IDEOGRAPH-2F936;Lo;0;L;753E;;;;N;;;;; +2F937;CJK COMPATIBILITY IDEOGRAPH-2F937;Lo;0;L;24C92;;;;N;;;;; +2F938;CJK COMPATIBILITY IDEOGRAPH-2F938;Lo;0;L;7570;;;;N;;;;; +2F939;CJK COMPATIBILITY IDEOGRAPH-2F939;Lo;0;L;2219F;;;;N;;;;; +2F93A;CJK COMPATIBILITY IDEOGRAPH-2F93A;Lo;0;L;7610;;;;N;;;;; +2F93B;CJK COMPATIBILITY IDEOGRAPH-2F93B;Lo;0;L;24FA1;;;;N;;;;; +2F93C;CJK COMPATIBILITY IDEOGRAPH-2F93C;Lo;0;L;24FB8;;;;N;;;;; +2F93D;CJK COMPATIBILITY IDEOGRAPH-2F93D;Lo;0;L;25044;;;;N;;;;; +2F93E;CJK COMPATIBILITY IDEOGRAPH-2F93E;Lo;0;L;3FFC;;;;N;;;;; +2F93F;CJK COMPATIBILITY IDEOGRAPH-2F93F;Lo;0;L;4008;;;;N;;;;; +2F940;CJK COMPATIBILITY IDEOGRAPH-2F940;Lo;0;L;76F4;;;;N;;;;; +2F941;CJK COMPATIBILITY IDEOGRAPH-2F941;Lo;0;L;250F3;;;;N;;;;; +2F942;CJK COMPATIBILITY IDEOGRAPH-2F942;Lo;0;L;250F2;;;;N;;;;; +2F943;CJK COMPATIBILITY IDEOGRAPH-2F943;Lo;0;L;25119;;;;N;;;;; +2F944;CJK COMPATIBILITY IDEOGRAPH-2F944;Lo;0;L;25133;;;;N;;;;; +2F945;CJK COMPATIBILITY IDEOGRAPH-2F945;Lo;0;L;771E;;;;N;;;;; +2F946;CJK COMPATIBILITY IDEOGRAPH-2F946;Lo;0;L;771F;;;;N;;;;; +2F947;CJK COMPATIBILITY IDEOGRAPH-2F947;Lo;0;L;771F;;;;N;;;;; +2F948;CJK COMPATIBILITY IDEOGRAPH-2F948;Lo;0;L;774A;;;;N;;;;; +2F949;CJK COMPATIBILITY IDEOGRAPH-2F949;Lo;0;L;4039;;;;N;;;;; +2F94A;CJK COMPATIBILITY IDEOGRAPH-2F94A;Lo;0;L;778B;;;;N;;;;; +2F94B;CJK COMPATIBILITY IDEOGRAPH-2F94B;Lo;0;L;4046;;;;N;;;;; +2F94C;CJK COMPATIBILITY IDEOGRAPH-2F94C;Lo;0;L;4096;;;;N;;;;; +2F94D;CJK COMPATIBILITY IDEOGRAPH-2F94D;Lo;0;L;2541D;;;;N;;;;; +2F94E;CJK COMPATIBILITY IDEOGRAPH-2F94E;Lo;0;L;784E;;;;N;;;;; +2F94F;CJK COMPATIBILITY IDEOGRAPH-2F94F;Lo;0;L;788C;;;;N;;;;; +2F950;CJK COMPATIBILITY IDEOGRAPH-2F950;Lo;0;L;78CC;;;;N;;;;; +2F951;CJK COMPATIBILITY IDEOGRAPH-2F951;Lo;0;L;40E3;;;;N;;;;; +2F952;CJK COMPATIBILITY IDEOGRAPH-2F952;Lo;0;L;25626;;;;N;;;;; +2F953;CJK COMPATIBILITY IDEOGRAPH-2F953;Lo;0;L;7956;;;;N;;;;; +2F954;CJK COMPATIBILITY IDEOGRAPH-2F954;Lo;0;L;2569A;;;;N;;;;; +2F955;CJK COMPATIBILITY IDEOGRAPH-2F955;Lo;0;L;256C5;;;;N;;;;; +2F956;CJK COMPATIBILITY IDEOGRAPH-2F956;Lo;0;L;798F;;;;N;;;;; +2F957;CJK COMPATIBILITY IDEOGRAPH-2F957;Lo;0;L;79EB;;;;N;;;;; +2F958;CJK COMPATIBILITY IDEOGRAPH-2F958;Lo;0;L;412F;;;;N;;;;; +2F959;CJK COMPATIBILITY IDEOGRAPH-2F959;Lo;0;L;7A40;;;;N;;;;; +2F95A;CJK COMPATIBILITY IDEOGRAPH-2F95A;Lo;0;L;7A4A;;;;N;;;;; +2F95B;CJK COMPATIBILITY IDEOGRAPH-2F95B;Lo;0;L;7A4F;;;;N;;;;; +2F95C;CJK COMPATIBILITY IDEOGRAPH-2F95C;Lo;0;L;2597C;;;;N;;;;; +2F95D;CJK COMPATIBILITY IDEOGRAPH-2F95D;Lo;0;L;25AA7;;;;N;;;;; +2F95E;CJK COMPATIBILITY IDEOGRAPH-2F95E;Lo;0;L;25AA7;;;;N;;;;; +2F95F;CJK COMPATIBILITY IDEOGRAPH-2F95F;Lo;0;L;7AEE;;;;N;;;;; +2F960;CJK COMPATIBILITY IDEOGRAPH-2F960;Lo;0;L;4202;;;;N;;;;; +2F961;CJK COMPATIBILITY IDEOGRAPH-2F961;Lo;0;L;25BAB;;;;N;;;;; +2F962;CJK COMPATIBILITY IDEOGRAPH-2F962;Lo;0;L;7BC6;;;;N;;;;; +2F963;CJK COMPATIBILITY IDEOGRAPH-2F963;Lo;0;L;7BC9;;;;N;;;;; +2F964;CJK COMPATIBILITY IDEOGRAPH-2F964;Lo;0;L;4227;;;;N;;;;; +2F965;CJK COMPATIBILITY IDEOGRAPH-2F965;Lo;0;L;25C80;;;;N;;;;; +2F966;CJK COMPATIBILITY IDEOGRAPH-2F966;Lo;0;L;7CD2;;;;N;;;;; +2F967;CJK COMPATIBILITY IDEOGRAPH-2F967;Lo;0;L;42A0;;;;N;;;;; +2F968;CJK COMPATIBILITY IDEOGRAPH-2F968;Lo;0;L;7CE8;;;;N;;;;; +2F969;CJK COMPATIBILITY IDEOGRAPH-2F969;Lo;0;L;7CE3;;;;N;;;;; +2F96A;CJK COMPATIBILITY IDEOGRAPH-2F96A;Lo;0;L;7D00;;;;N;;;;; +2F96B;CJK COMPATIBILITY IDEOGRAPH-2F96B;Lo;0;L;25F86;;;;N;;;;; +2F96C;CJK COMPATIBILITY IDEOGRAPH-2F96C;Lo;0;L;7D63;;;;N;;;;; +2F96D;CJK COMPATIBILITY IDEOGRAPH-2F96D;Lo;0;L;4301;;;;N;;;;; +2F96E;CJK COMPATIBILITY IDEOGRAPH-2F96E;Lo;0;L;7DC7;;;;N;;;;; +2F96F;CJK COMPATIBILITY IDEOGRAPH-2F96F;Lo;0;L;7E02;;;;N;;;;; +2F970;CJK COMPATIBILITY IDEOGRAPH-2F970;Lo;0;L;7E45;;;;N;;;;; +2F971;CJK COMPATIBILITY IDEOGRAPH-2F971;Lo;0;L;4334;;;;N;;;;; +2F972;CJK COMPATIBILITY IDEOGRAPH-2F972;Lo;0;L;26228;;;;N;;;;; +2F973;CJK COMPATIBILITY IDEOGRAPH-2F973;Lo;0;L;26247;;;;N;;;;; +2F974;CJK COMPATIBILITY IDEOGRAPH-2F974;Lo;0;L;4359;;;;N;;;;; +2F975;CJK COMPATIBILITY IDEOGRAPH-2F975;Lo;0;L;262D9;;;;N;;;;; +2F976;CJK COMPATIBILITY IDEOGRAPH-2F976;Lo;0;L;7F7A;;;;N;;;;; +2F977;CJK COMPATIBILITY IDEOGRAPH-2F977;Lo;0;L;2633E;;;;N;;;;; +2F978;CJK COMPATIBILITY IDEOGRAPH-2F978;Lo;0;L;7F95;;;;N;;;;; +2F979;CJK COMPATIBILITY IDEOGRAPH-2F979;Lo;0;L;7FFA;;;;N;;;;; +2F97A;CJK COMPATIBILITY IDEOGRAPH-2F97A;Lo;0;L;8005;;;;N;;;;; +2F97B;CJK COMPATIBILITY IDEOGRAPH-2F97B;Lo;0;L;264DA;;;;N;;;;; +2F97C;CJK COMPATIBILITY IDEOGRAPH-2F97C;Lo;0;L;26523;;;;N;;;;; +2F97D;CJK COMPATIBILITY IDEOGRAPH-2F97D;Lo;0;L;8060;;;;N;;;;; +2F97E;CJK COMPATIBILITY IDEOGRAPH-2F97E;Lo;0;L;265A8;;;;N;;;;; +2F97F;CJK COMPATIBILITY IDEOGRAPH-2F97F;Lo;0;L;8070;;;;N;;;;; +2F980;CJK COMPATIBILITY IDEOGRAPH-2F980;Lo;0;L;2335F;;;;N;;;;; +2F981;CJK COMPATIBILITY IDEOGRAPH-2F981;Lo;0;L;43D5;;;;N;;;;; +2F982;CJK COMPATIBILITY IDEOGRAPH-2F982;Lo;0;L;80B2;;;;N;;;;; +2F983;CJK COMPATIBILITY IDEOGRAPH-2F983;Lo;0;L;8103;;;;N;;;;; +2F984;CJK COMPATIBILITY IDEOGRAPH-2F984;Lo;0;L;440B;;;;N;;;;; +2F985;CJK COMPATIBILITY IDEOGRAPH-2F985;Lo;0;L;813E;;;;N;;;;; +2F986;CJK COMPATIBILITY IDEOGRAPH-2F986;Lo;0;L;5AB5;;;;N;;;;; +2F987;CJK COMPATIBILITY IDEOGRAPH-2F987;Lo;0;L;267A7;;;;N;;;;; +2F988;CJK COMPATIBILITY IDEOGRAPH-2F988;Lo;0;L;267B5;;;;N;;;;; +2F989;CJK COMPATIBILITY IDEOGRAPH-2F989;Lo;0;L;23393;;;;N;;;;; +2F98A;CJK COMPATIBILITY IDEOGRAPH-2F98A;Lo;0;L;2339C;;;;N;;;;; +2F98B;CJK COMPATIBILITY IDEOGRAPH-2F98B;Lo;0;L;8201;;;;N;;;;; +2F98C;CJK COMPATIBILITY IDEOGRAPH-2F98C;Lo;0;L;8204;;;;N;;;;; +2F98D;CJK COMPATIBILITY IDEOGRAPH-2F98D;Lo;0;L;8F9E;;;;N;;;;; +2F98E;CJK COMPATIBILITY IDEOGRAPH-2F98E;Lo;0;L;446B;;;;N;;;;; +2F98F;CJK COMPATIBILITY IDEOGRAPH-2F98F;Lo;0;L;8291;;;;N;;;;; +2F990;CJK COMPATIBILITY IDEOGRAPH-2F990;Lo;0;L;828B;;;;N;;;;; +2F991;CJK COMPATIBILITY IDEOGRAPH-2F991;Lo;0;L;829D;;;;N;;;;; +2F992;CJK COMPATIBILITY IDEOGRAPH-2F992;Lo;0;L;52B3;;;;N;;;;; +2F993;CJK COMPATIBILITY IDEOGRAPH-2F993;Lo;0;L;82B1;;;;N;;;;; +2F994;CJK COMPATIBILITY IDEOGRAPH-2F994;Lo;0;L;82B3;;;;N;;;;; +2F995;CJK COMPATIBILITY IDEOGRAPH-2F995;Lo;0;L;82BD;;;;N;;;;; +2F996;CJK COMPATIBILITY IDEOGRAPH-2F996;Lo;0;L;82E6;;;;N;;;;; +2F997;CJK COMPATIBILITY IDEOGRAPH-2F997;Lo;0;L;26B3C;;;;N;;;;; +2F998;CJK COMPATIBILITY IDEOGRAPH-2F998;Lo;0;L;82E5;;;;N;;;;; +2F999;CJK COMPATIBILITY IDEOGRAPH-2F999;Lo;0;L;831D;;;;N;;;;; +2F99A;CJK COMPATIBILITY IDEOGRAPH-2F99A;Lo;0;L;8363;;;;N;;;;; +2F99B;CJK COMPATIBILITY IDEOGRAPH-2F99B;Lo;0;L;83AD;;;;N;;;;; +2F99C;CJK COMPATIBILITY IDEOGRAPH-2F99C;Lo;0;L;8323;;;;N;;;;; +2F99D;CJK COMPATIBILITY IDEOGRAPH-2F99D;Lo;0;L;83BD;;;;N;;;;; +2F99E;CJK COMPATIBILITY IDEOGRAPH-2F99E;Lo;0;L;83E7;;;;N;;;;; +2F99F;CJK COMPATIBILITY IDEOGRAPH-2F99F;Lo;0;L;8457;;;;N;;;;; +2F9A0;CJK COMPATIBILITY IDEOGRAPH-2F9A0;Lo;0;L;8353;;;;N;;;;; +2F9A1;CJK COMPATIBILITY IDEOGRAPH-2F9A1;Lo;0;L;83CA;;;;N;;;;; +2F9A2;CJK COMPATIBILITY IDEOGRAPH-2F9A2;Lo;0;L;83CC;;;;N;;;;; +2F9A3;CJK COMPATIBILITY IDEOGRAPH-2F9A3;Lo;0;L;83DC;;;;N;;;;; +2F9A4;CJK COMPATIBILITY IDEOGRAPH-2F9A4;Lo;0;L;26C36;;;;N;;;;; +2F9A5;CJK COMPATIBILITY IDEOGRAPH-2F9A5;Lo;0;L;26D6B;;;;N;;;;; +2F9A6;CJK COMPATIBILITY IDEOGRAPH-2F9A6;Lo;0;L;26CD5;;;;N;;;;; +2F9A7;CJK COMPATIBILITY IDEOGRAPH-2F9A7;Lo;0;L;452B;;;;N;;;;; +2F9A8;CJK COMPATIBILITY IDEOGRAPH-2F9A8;Lo;0;L;84F1;;;;N;;;;; +2F9A9;CJK COMPATIBILITY IDEOGRAPH-2F9A9;Lo;0;L;84F3;;;;N;;;;; +2F9AA;CJK COMPATIBILITY IDEOGRAPH-2F9AA;Lo;0;L;8516;;;;N;;;;; +2F9AB;CJK COMPATIBILITY IDEOGRAPH-2F9AB;Lo;0;L;273CA;;;;N;;;;; +2F9AC;CJK COMPATIBILITY IDEOGRAPH-2F9AC;Lo;0;L;8564;;;;N;;;;; +2F9AD;CJK COMPATIBILITY IDEOGRAPH-2F9AD;Lo;0;L;26F2C;;;;N;;;;; +2F9AE;CJK COMPATIBILITY IDEOGRAPH-2F9AE;Lo;0;L;455D;;;;N;;;;; +2F9AF;CJK COMPATIBILITY IDEOGRAPH-2F9AF;Lo;0;L;4561;;;;N;;;;; +2F9B0;CJK COMPATIBILITY IDEOGRAPH-2F9B0;Lo;0;L;26FB1;;;;N;;;;; +2F9B1;CJK COMPATIBILITY IDEOGRAPH-2F9B1;Lo;0;L;270D2;;;;N;;;;; +2F9B2;CJK COMPATIBILITY IDEOGRAPH-2F9B2;Lo;0;L;456B;;;;N;;;;; +2F9B3;CJK COMPATIBILITY IDEOGRAPH-2F9B3;Lo;0;L;8650;;;;N;;;;; +2F9B4;CJK COMPATIBILITY IDEOGRAPH-2F9B4;Lo;0;L;865C;;;;N;;;;; +2F9B5;CJK COMPATIBILITY IDEOGRAPH-2F9B5;Lo;0;L;8667;;;;N;;;;; +2F9B6;CJK COMPATIBILITY IDEOGRAPH-2F9B6;Lo;0;L;8669;;;;N;;;;; +2F9B7;CJK COMPATIBILITY IDEOGRAPH-2F9B7;Lo;0;L;86A9;;;;N;;;;; +2F9B8;CJK COMPATIBILITY IDEOGRAPH-2F9B8;Lo;0;L;8688;;;;N;;;;; +2F9B9;CJK COMPATIBILITY IDEOGRAPH-2F9B9;Lo;0;L;870E;;;;N;;;;; +2F9BA;CJK COMPATIBILITY IDEOGRAPH-2F9BA;Lo;0;L;86E2;;;;N;;;;; +2F9BB;CJK COMPATIBILITY IDEOGRAPH-2F9BB;Lo;0;L;8779;;;;N;;;;; +2F9BC;CJK COMPATIBILITY IDEOGRAPH-2F9BC;Lo;0;L;8728;;;;N;;;;; +2F9BD;CJK COMPATIBILITY IDEOGRAPH-2F9BD;Lo;0;L;876B;;;;N;;;;; +2F9BE;CJK COMPATIBILITY IDEOGRAPH-2F9BE;Lo;0;L;8786;;;;N;;;;; +2F9BF;CJK COMPATIBILITY IDEOGRAPH-2F9BF;Lo;0;L;45D7;;;;N;;;;; +2F9C0;CJK COMPATIBILITY IDEOGRAPH-2F9C0;Lo;0;L;87E1;;;;N;;;;; +2F9C1;CJK COMPATIBILITY IDEOGRAPH-2F9C1;Lo;0;L;8801;;;;N;;;;; +2F9C2;CJK COMPATIBILITY IDEOGRAPH-2F9C2;Lo;0;L;45F9;;;;N;;;;; +2F9C3;CJK COMPATIBILITY IDEOGRAPH-2F9C3;Lo;0;L;8860;;;;N;;;;; +2F9C4;CJK COMPATIBILITY IDEOGRAPH-2F9C4;Lo;0;L;8863;;;;N;;;;; +2F9C5;CJK COMPATIBILITY IDEOGRAPH-2F9C5;Lo;0;L;27667;;;;N;;;;; +2F9C6;CJK COMPATIBILITY IDEOGRAPH-2F9C6;Lo;0;L;88D7;;;;N;;;;; +2F9C7;CJK COMPATIBILITY IDEOGRAPH-2F9C7;Lo;0;L;88DE;;;;N;;;;; +2F9C8;CJK COMPATIBILITY IDEOGRAPH-2F9C8;Lo;0;L;4635;;;;N;;;;; +2F9C9;CJK COMPATIBILITY IDEOGRAPH-2F9C9;Lo;0;L;88FA;;;;N;;;;; +2F9CA;CJK COMPATIBILITY IDEOGRAPH-2F9CA;Lo;0;L;34BB;;;;N;;;;; +2F9CB;CJK COMPATIBILITY IDEOGRAPH-2F9CB;Lo;0;L;278AE;;;;N;;;;; +2F9CC;CJK COMPATIBILITY IDEOGRAPH-2F9CC;Lo;0;L;27966;;;;N;;;;; +2F9CD;CJK COMPATIBILITY IDEOGRAPH-2F9CD;Lo;0;L;46BE;;;;N;;;;; +2F9CE;CJK COMPATIBILITY IDEOGRAPH-2F9CE;Lo;0;L;46C7;;;;N;;;;; +2F9CF;CJK COMPATIBILITY IDEOGRAPH-2F9CF;Lo;0;L;8AA0;;;;N;;;;; +2F9D0;CJK COMPATIBILITY IDEOGRAPH-2F9D0;Lo;0;L;8AED;;;;N;;;;; +2F9D1;CJK COMPATIBILITY IDEOGRAPH-2F9D1;Lo;0;L;8B8A;;;;N;;;;; +2F9D2;CJK COMPATIBILITY IDEOGRAPH-2F9D2;Lo;0;L;8C55;;;;N;;;;; +2F9D3;CJK COMPATIBILITY IDEOGRAPH-2F9D3;Lo;0;L;27CA8;;;;N;;;;; +2F9D4;CJK COMPATIBILITY IDEOGRAPH-2F9D4;Lo;0;L;8CAB;;;;N;;;;; +2F9D5;CJK COMPATIBILITY IDEOGRAPH-2F9D5;Lo;0;L;8CC1;;;;N;;;;; +2F9D6;CJK COMPATIBILITY IDEOGRAPH-2F9D6;Lo;0;L;8D1B;;;;N;;;;; +2F9D7;CJK COMPATIBILITY IDEOGRAPH-2F9D7;Lo;0;L;8D77;;;;N;;;;; +2F9D8;CJK COMPATIBILITY IDEOGRAPH-2F9D8;Lo;0;L;27F2F;;;;N;;;;; +2F9D9;CJK COMPATIBILITY IDEOGRAPH-2F9D9;Lo;0;L;20804;;;;N;;;;; +2F9DA;CJK COMPATIBILITY IDEOGRAPH-2F9DA;Lo;0;L;8DCB;;;;N;;;;; +2F9DB;CJK COMPATIBILITY IDEOGRAPH-2F9DB;Lo;0;L;8DBC;;;;N;;;;; +2F9DC;CJK COMPATIBILITY IDEOGRAPH-2F9DC;Lo;0;L;8DF0;;;;N;;;;; +2F9DD;CJK COMPATIBILITY IDEOGRAPH-2F9DD;Lo;0;L;208DE;;;;N;;;;; +2F9DE;CJK COMPATIBILITY IDEOGRAPH-2F9DE;Lo;0;L;8ED4;;;;N;;;;; +2F9DF;CJK COMPATIBILITY IDEOGRAPH-2F9DF;Lo;0;L;8F38;;;;N;;;;; +2F9E0;CJK COMPATIBILITY IDEOGRAPH-2F9E0;Lo;0;L;285D2;;;;N;;;;; +2F9E1;CJK COMPATIBILITY IDEOGRAPH-2F9E1;Lo;0;L;285ED;;;;N;;;;; +2F9E2;CJK COMPATIBILITY IDEOGRAPH-2F9E2;Lo;0;L;9094;;;;N;;;;; +2F9E3;CJK COMPATIBILITY IDEOGRAPH-2F9E3;Lo;0;L;90F1;;;;N;;;;; +2F9E4;CJK COMPATIBILITY IDEOGRAPH-2F9E4;Lo;0;L;9111;;;;N;;;;; +2F9E5;CJK COMPATIBILITY IDEOGRAPH-2F9E5;Lo;0;L;2872E;;;;N;;;;; +2F9E6;CJK COMPATIBILITY IDEOGRAPH-2F9E6;Lo;0;L;911B;;;;N;;;;; +2F9E7;CJK COMPATIBILITY IDEOGRAPH-2F9E7;Lo;0;L;9238;;;;N;;;;; +2F9E8;CJK COMPATIBILITY IDEOGRAPH-2F9E8;Lo;0;L;92D7;;;;N;;;;; +2F9E9;CJK COMPATIBILITY IDEOGRAPH-2F9E9;Lo;0;L;92D8;;;;N;;;;; +2F9EA;CJK COMPATIBILITY IDEOGRAPH-2F9EA;Lo;0;L;927C;;;;N;;;;; +2F9EB;CJK COMPATIBILITY IDEOGRAPH-2F9EB;Lo;0;L;93F9;;;;N;;;;; +2F9EC;CJK COMPATIBILITY IDEOGRAPH-2F9EC;Lo;0;L;9415;;;;N;;;;; +2F9ED;CJK COMPATIBILITY IDEOGRAPH-2F9ED;Lo;0;L;28BFA;;;;N;;;;; +2F9EE;CJK COMPATIBILITY IDEOGRAPH-2F9EE;Lo;0;L;958B;;;;N;;;;; +2F9EF;CJK COMPATIBILITY IDEOGRAPH-2F9EF;Lo;0;L;4995;;;;N;;;;; +2F9F0;CJK COMPATIBILITY IDEOGRAPH-2F9F0;Lo;0;L;95B7;;;;N;;;;; +2F9F1;CJK COMPATIBILITY IDEOGRAPH-2F9F1;Lo;0;L;28D77;;;;N;;;;; +2F9F2;CJK COMPATIBILITY IDEOGRAPH-2F9F2;Lo;0;L;49E6;;;;N;;;;; +2F9F3;CJK COMPATIBILITY IDEOGRAPH-2F9F3;Lo;0;L;96C3;;;;N;;;;; +2F9F4;CJK COMPATIBILITY IDEOGRAPH-2F9F4;Lo;0;L;5DB2;;;;N;;;;; +2F9F5;CJK COMPATIBILITY IDEOGRAPH-2F9F5;Lo;0;L;9723;;;;N;;;;; +2F9F6;CJK COMPATIBILITY IDEOGRAPH-2F9F6;Lo;0;L;29145;;;;N;;;;; +2F9F7;CJK COMPATIBILITY IDEOGRAPH-2F9F7;Lo;0;L;2921A;;;;N;;;;; +2F9F8;CJK COMPATIBILITY IDEOGRAPH-2F9F8;Lo;0;L;4A6E;;;;N;;;;; +2F9F9;CJK COMPATIBILITY IDEOGRAPH-2F9F9;Lo;0;L;4A76;;;;N;;;;; +2F9FA;CJK COMPATIBILITY IDEOGRAPH-2F9FA;Lo;0;L;97E0;;;;N;;;;; +2F9FB;CJK COMPATIBILITY IDEOGRAPH-2F9FB;Lo;0;L;2940A;;;;N;;;;; +2F9FC;CJK COMPATIBILITY IDEOGRAPH-2F9FC;Lo;0;L;4AB2;;;;N;;;;; +2F9FD;CJK COMPATIBILITY IDEOGRAPH-2F9FD;Lo;0;L;29496;;;;N;;;;; +2F9FE;CJK COMPATIBILITY IDEOGRAPH-2F9FE;Lo;0;L;980B;;;;N;;;;; +2F9FF;CJK COMPATIBILITY IDEOGRAPH-2F9FF;Lo;0;L;980B;;;;N;;;;; +2FA00;CJK COMPATIBILITY IDEOGRAPH-2FA00;Lo;0;L;9829;;;;N;;;;; +2FA01;CJK COMPATIBILITY IDEOGRAPH-2FA01;Lo;0;L;295B6;;;;N;;;;; +2FA02;CJK COMPATIBILITY IDEOGRAPH-2FA02;Lo;0;L;98E2;;;;N;;;;; +2FA03;CJK COMPATIBILITY IDEOGRAPH-2FA03;Lo;0;L;4B33;;;;N;;;;; +2FA04;CJK COMPATIBILITY IDEOGRAPH-2FA04;Lo;0;L;9929;;;;N;;;;; +2FA05;CJK COMPATIBILITY IDEOGRAPH-2FA05;Lo;0;L;99A7;;;;N;;;;; +2FA06;CJK COMPATIBILITY IDEOGRAPH-2FA06;Lo;0;L;99C2;;;;N;;;;; +2FA07;CJK COMPATIBILITY IDEOGRAPH-2FA07;Lo;0;L;99FE;;;;N;;;;; +2FA08;CJK COMPATIBILITY IDEOGRAPH-2FA08;Lo;0;L;4BCE;;;;N;;;;; +2FA09;CJK COMPATIBILITY IDEOGRAPH-2FA09;Lo;0;L;29B30;;;;N;;;;; +2FA0A;CJK COMPATIBILITY IDEOGRAPH-2FA0A;Lo;0;L;9B12;;;;N;;;;; +2FA0B;CJK COMPATIBILITY IDEOGRAPH-2FA0B;Lo;0;L;9C40;;;;N;;;;; +2FA0C;CJK COMPATIBILITY IDEOGRAPH-2FA0C;Lo;0;L;9CFD;;;;N;;;;; +2FA0D;CJK COMPATIBILITY IDEOGRAPH-2FA0D;Lo;0;L;4CCE;;;;N;;;;; +2FA0E;CJK COMPATIBILITY IDEOGRAPH-2FA0E;Lo;0;L;4CED;;;;N;;;;; +2FA0F;CJK COMPATIBILITY IDEOGRAPH-2FA0F;Lo;0;L;9D67;;;;N;;;;; +2FA10;CJK COMPATIBILITY IDEOGRAPH-2FA10;Lo;0;L;2A0CE;;;;N;;;;; +2FA11;CJK COMPATIBILITY IDEOGRAPH-2FA11;Lo;0;L;4CF8;;;;N;;;;; +2FA12;CJK COMPATIBILITY IDEOGRAPH-2FA12;Lo;0;L;2A105;;;;N;;;;; +2FA13;CJK COMPATIBILITY IDEOGRAPH-2FA13;Lo;0;L;2A20E;;;;N;;;;; +2FA14;CJK COMPATIBILITY IDEOGRAPH-2FA14;Lo;0;L;2A291;;;;N;;;;; +2FA15;CJK COMPATIBILITY IDEOGRAPH-2FA15;Lo;0;L;9EBB;;;;N;;;;; +2FA16;CJK COMPATIBILITY IDEOGRAPH-2FA16;Lo;0;L;4D56;;;;N;;;;; +2FA17;CJK COMPATIBILITY IDEOGRAPH-2FA17;Lo;0;L;9EF9;;;;N;;;;; +2FA18;CJK COMPATIBILITY IDEOGRAPH-2FA18;Lo;0;L;9EFE;;;;N;;;;; +2FA19;CJK COMPATIBILITY IDEOGRAPH-2FA19;Lo;0;L;9F05;;;;N;;;;; +2FA1A;CJK COMPATIBILITY IDEOGRAPH-2FA1A;Lo;0;L;9F0F;;;;N;;;;; +2FA1B;CJK COMPATIBILITY IDEOGRAPH-2FA1B;Lo;0;L;9F16;;;;N;;;;; +2FA1C;CJK COMPATIBILITY IDEOGRAPH-2FA1C;Lo;0;L;9F3B;;;;N;;;;; +2FA1D;CJK COMPATIBILITY IDEOGRAPH-2FA1D;Lo;0;L;2A600;;;;N;;;;; +E0001;LANGUAGE TAG;Cf;0;BN;;;;;N;;;;; +E0020;TAG SPACE;Cf;0;BN;;;;;N;;;;; +E0021;TAG EXCLAMATION MARK;Cf;0;BN;;;;;N;;;;; +E0022;TAG QUOTATION MARK;Cf;0;BN;;;;;N;;;;; +E0023;TAG NUMBER SIGN;Cf;0;BN;;;;;N;;;;; +E0024;TAG DOLLAR SIGN;Cf;0;BN;;;;;N;;;;; +E0025;TAG PERCENT SIGN;Cf;0;BN;;;;;N;;;;; +E0026;TAG AMPERSAND;Cf;0;BN;;;;;N;;;;; +E0027;TAG APOSTROPHE;Cf;0;BN;;;;;N;;;;; +E0028;TAG LEFT PARENTHESIS;Cf;0;BN;;;;;N;;;;; +E0029;TAG RIGHT PARENTHESIS;Cf;0;BN;;;;;N;;;;; +E002A;TAG ASTERISK;Cf;0;BN;;;;;N;;;;; +E002B;TAG PLUS SIGN;Cf;0;BN;;;;;N;;;;; +E002C;TAG COMMA;Cf;0;BN;;;;;N;;;;; +E002D;TAG HYPHEN-MINUS;Cf;0;BN;;;;;N;;;;; +E002E;TAG FULL STOP;Cf;0;BN;;;;;N;;;;; +E002F;TAG SOLIDUS;Cf;0;BN;;;;;N;;;;; +E0030;TAG DIGIT ZERO;Cf;0;BN;;;;;N;;;;; +E0031;TAG DIGIT ONE;Cf;0;BN;;;;;N;;;;; +E0032;TAG DIGIT TWO;Cf;0;BN;;;;;N;;;;; +E0033;TAG DIGIT THREE;Cf;0;BN;;;;;N;;;;; +E0034;TAG DIGIT FOUR;Cf;0;BN;;;;;N;;;;; +E0035;TAG DIGIT FIVE;Cf;0;BN;;;;;N;;;;; +E0036;TAG DIGIT SIX;Cf;0;BN;;;;;N;;;;; +E0037;TAG DIGIT SEVEN;Cf;0;BN;;;;;N;;;;; +E0038;TAG DIGIT EIGHT;Cf;0;BN;;;;;N;;;;; +E0039;TAG DIGIT NINE;Cf;0;BN;;;;;N;;;;; +E003A;TAG COLON;Cf;0;BN;;;;;N;;;;; +E003B;TAG SEMICOLON;Cf;0;BN;;;;;N;;;;; +E003C;TAG LESS-THAN SIGN;Cf;0;BN;;;;;N;;;;; +E003D;TAG EQUALS SIGN;Cf;0;BN;;;;;N;;;;; +E003E;TAG GREATER-THAN SIGN;Cf;0;BN;;;;;N;;;;; +E003F;TAG QUESTION MARK;Cf;0;BN;;;;;N;;;;; +E0040;TAG COMMERCIAL AT;Cf;0;BN;;;;;N;;;;; +E0041;TAG LATIN CAPITAL LETTER A;Cf;0;BN;;;;;N;;;;; +E0042;TAG LATIN CAPITAL LETTER B;Cf;0;BN;;;;;N;;;;; +E0043;TAG LATIN CAPITAL LETTER C;Cf;0;BN;;;;;N;;;;; +E0044;TAG LATIN CAPITAL LETTER D;Cf;0;BN;;;;;N;;;;; +E0045;TAG LATIN CAPITAL LETTER E;Cf;0;BN;;;;;N;;;;; +E0046;TAG LATIN CAPITAL LETTER F;Cf;0;BN;;;;;N;;;;; +E0047;TAG LATIN CAPITAL LETTER G;Cf;0;BN;;;;;N;;;;; +E0048;TAG LATIN CAPITAL LETTER H;Cf;0;BN;;;;;N;;;;; +E0049;TAG LATIN CAPITAL LETTER I;Cf;0;BN;;;;;N;;;;; +E004A;TAG LATIN CAPITAL LETTER J;Cf;0;BN;;;;;N;;;;; +E004B;TAG LATIN CAPITAL LETTER K;Cf;0;BN;;;;;N;;;;; +E004C;TAG LATIN CAPITAL LETTER L;Cf;0;BN;;;;;N;;;;; +E004D;TAG LATIN CAPITAL LETTER M;Cf;0;BN;;;;;N;;;;; +E004E;TAG LATIN CAPITAL LETTER N;Cf;0;BN;;;;;N;;;;; +E004F;TAG LATIN CAPITAL LETTER O;Cf;0;BN;;;;;N;;;;; +E0050;TAG LATIN CAPITAL LETTER P;Cf;0;BN;;;;;N;;;;; +E0051;TAG LATIN CAPITAL LETTER Q;Cf;0;BN;;;;;N;;;;; +E0052;TAG LATIN CAPITAL LETTER R;Cf;0;BN;;;;;N;;;;; +E0053;TAG LATIN CAPITAL LETTER S;Cf;0;BN;;;;;N;;;;; +E0054;TAG LATIN CAPITAL LETTER T;Cf;0;BN;;;;;N;;;;; +E0055;TAG LATIN CAPITAL LETTER U;Cf;0;BN;;;;;N;;;;; +E0056;TAG LATIN CAPITAL LETTER V;Cf;0;BN;;;;;N;;;;; +E0057;TAG LATIN CAPITAL LETTER W;Cf;0;BN;;;;;N;;;;; +E0058;TAG LATIN CAPITAL LETTER X;Cf;0;BN;;;;;N;;;;; +E0059;TAG LATIN CAPITAL LETTER Y;Cf;0;BN;;;;;N;;;;; +E005A;TAG LATIN CAPITAL LETTER Z;Cf;0;BN;;;;;N;;;;; +E005B;TAG LEFT SQUARE BRACKET;Cf;0;BN;;;;;N;;;;; +E005C;TAG REVERSE SOLIDUS;Cf;0;BN;;;;;N;;;;; +E005D;TAG RIGHT SQUARE BRACKET;Cf;0;BN;;;;;N;;;;; +E005E;TAG CIRCUMFLEX ACCENT;Cf;0;BN;;;;;N;;;;; +E005F;TAG LOW LINE;Cf;0;BN;;;;;N;;;;; +E0060;TAG GRAVE ACCENT;Cf;0;BN;;;;;N;;;;; +E0061;TAG LATIN SMALL LETTER A;Cf;0;BN;;;;;N;;;;; +E0062;TAG LATIN SMALL LETTER B;Cf;0;BN;;;;;N;;;;; +E0063;TAG LATIN SMALL LETTER C;Cf;0;BN;;;;;N;;;;; +E0064;TAG LATIN SMALL LETTER D;Cf;0;BN;;;;;N;;;;; +E0065;TAG LATIN SMALL LETTER E;Cf;0;BN;;;;;N;;;;; +E0066;TAG LATIN SMALL LETTER F;Cf;0;BN;;;;;N;;;;; +E0067;TAG LATIN SMALL LETTER G;Cf;0;BN;;;;;N;;;;; +E0068;TAG LATIN SMALL LETTER H;Cf;0;BN;;;;;N;;;;; +E0069;TAG LATIN SMALL LETTER I;Cf;0;BN;;;;;N;;;;; +E006A;TAG LATIN SMALL LETTER J;Cf;0;BN;;;;;N;;;;; +E006B;TAG LATIN SMALL LETTER K;Cf;0;BN;;;;;N;;;;; +E006C;TAG LATIN SMALL LETTER L;Cf;0;BN;;;;;N;;;;; +E006D;TAG LATIN SMALL LETTER M;Cf;0;BN;;;;;N;;;;; +E006E;TAG LATIN SMALL LETTER N;Cf;0;BN;;;;;N;;;;; +E006F;TAG LATIN SMALL LETTER O;Cf;0;BN;;;;;N;;;;; +E0070;TAG LATIN SMALL LETTER P;Cf;0;BN;;;;;N;;;;; +E0071;TAG LATIN SMALL LETTER Q;Cf;0;BN;;;;;N;;;;; +E0072;TAG LATIN SMALL LETTER R;Cf;0;BN;;;;;N;;;;; +E0073;TAG LATIN SMALL LETTER S;Cf;0;BN;;;;;N;;;;; +E0074;TAG LATIN SMALL LETTER T;Cf;0;BN;;;;;N;;;;; +E0075;TAG LATIN SMALL LETTER U;Cf;0;BN;;;;;N;;;;; +E0076;TAG LATIN SMALL LETTER V;Cf;0;BN;;;;;N;;;;; +E0077;TAG LATIN SMALL LETTER W;Cf;0;BN;;;;;N;;;;; +E0078;TAG LATIN SMALL LETTER X;Cf;0;BN;;;;;N;;;;; +E0079;TAG LATIN SMALL LETTER Y;Cf;0;BN;;;;;N;;;;; +E007A;TAG LATIN SMALL LETTER Z;Cf;0;BN;;;;;N;;;;; +E007B;TAG LEFT CURLY BRACKET;Cf;0;BN;;;;;N;;;;; +E007C;TAG VERTICAL LINE;Cf;0;BN;;;;;N;;;;; +E007D;TAG RIGHT CURLY BRACKET;Cf;0;BN;;;;;N;;;;; +E007E;TAG TILDE;Cf;0;BN;;;;;N;;;;; +E007F;CANCEL TAG;Cf;0;BN;;;;;N;;;;; +E0100;VARIATION SELECTOR-17;Mn;0;NSM;;;;;N;;;;; +E0101;VARIATION SELECTOR-18;Mn;0;NSM;;;;;N;;;;; +E0102;VARIATION SELECTOR-19;Mn;0;NSM;;;;;N;;;;; +E0103;VARIATION SELECTOR-20;Mn;0;NSM;;;;;N;;;;; +E0104;VARIATION SELECTOR-21;Mn;0;NSM;;;;;N;;;;; +E0105;VARIATION SELECTOR-22;Mn;0;NSM;;;;;N;;;;; +E0106;VARIATION SELECTOR-23;Mn;0;NSM;;;;;N;;;;; +E0107;VARIATION SELECTOR-24;Mn;0;NSM;;;;;N;;;;; +E0108;VARIATION SELECTOR-25;Mn;0;NSM;;;;;N;;;;; +E0109;VARIATION SELECTOR-26;Mn;0;NSM;;;;;N;;;;; +E010A;VARIATION SELECTOR-27;Mn;0;NSM;;;;;N;;;;; +E010B;VARIATION SELECTOR-28;Mn;0;NSM;;;;;N;;;;; +E010C;VARIATION SELECTOR-29;Mn;0;NSM;;;;;N;;;;; +E010D;VARIATION SELECTOR-30;Mn;0;NSM;;;;;N;;;;; +E010E;VARIATION SELECTOR-31;Mn;0;NSM;;;;;N;;;;; +E010F;VARIATION SELECTOR-32;Mn;0;NSM;;;;;N;;;;; +E0110;VARIATION SELECTOR-33;Mn;0;NSM;;;;;N;;;;; +E0111;VARIATION SELECTOR-34;Mn;0;NSM;;;;;N;;;;; +E0112;VARIATION SELECTOR-35;Mn;0;NSM;;;;;N;;;;; +E0113;VARIATION SELECTOR-36;Mn;0;NSM;;;;;N;;;;; +E0114;VARIATION SELECTOR-37;Mn;0;NSM;;;;;N;;;;; +E0115;VARIATION SELECTOR-38;Mn;0;NSM;;;;;N;;;;; +E0116;VARIATION SELECTOR-39;Mn;0;NSM;;;;;N;;;;; +E0117;VARIATION SELECTOR-40;Mn;0;NSM;;;;;N;;;;; +E0118;VARIATION SELECTOR-41;Mn;0;NSM;;;;;N;;;;; +E0119;VARIATION SELECTOR-42;Mn;0;NSM;;;;;N;;;;; +E011A;VARIATION SELECTOR-43;Mn;0;NSM;;;;;N;;;;; +E011B;VARIATION SELECTOR-44;Mn;0;NSM;;;;;N;;;;; +E011C;VARIATION SELECTOR-45;Mn;0;NSM;;;;;N;;;;; +E011D;VARIATION SELECTOR-46;Mn;0;NSM;;;;;N;;;;; +E011E;VARIATION SELECTOR-47;Mn;0;NSM;;;;;N;;;;; +E011F;VARIATION SELECTOR-48;Mn;0;NSM;;;;;N;;;;; +E0120;VARIATION SELECTOR-49;Mn;0;NSM;;;;;N;;;;; +E0121;VARIATION SELECTOR-50;Mn;0;NSM;;;;;N;;;;; +E0122;VARIATION SELECTOR-51;Mn;0;NSM;;;;;N;;;;; +E0123;VARIATION SELECTOR-52;Mn;0;NSM;;;;;N;;;;; +E0124;VARIATION SELECTOR-53;Mn;0;NSM;;;;;N;;;;; +E0125;VARIATION SELECTOR-54;Mn;0;NSM;;;;;N;;;;; +E0126;VARIATION SELECTOR-55;Mn;0;NSM;;;;;N;;;;; +E0127;VARIATION SELECTOR-56;Mn;0;NSM;;;;;N;;;;; +E0128;VARIATION SELECTOR-57;Mn;0;NSM;;;;;N;;;;; +E0129;VARIATION SELECTOR-58;Mn;0;NSM;;;;;N;;;;; +E012A;VARIATION SELECTOR-59;Mn;0;NSM;;;;;N;;;;; +E012B;VARIATION SELECTOR-60;Mn;0;NSM;;;;;N;;;;; +E012C;VARIATION SELECTOR-61;Mn;0;NSM;;;;;N;;;;; +E012D;VARIATION SELECTOR-62;Mn;0;NSM;;;;;N;;;;; +E012E;VARIATION SELECTOR-63;Mn;0;NSM;;;;;N;;;;; +E012F;VARIATION SELECTOR-64;Mn;0;NSM;;;;;N;;;;; +E0130;VARIATION SELECTOR-65;Mn;0;NSM;;;;;N;;;;; +E0131;VARIATION SELECTOR-66;Mn;0;NSM;;;;;N;;;;; +E0132;VARIATION SELECTOR-67;Mn;0;NSM;;;;;N;;;;; +E0133;VARIATION SELECTOR-68;Mn;0;NSM;;;;;N;;;;; +E0134;VARIATION SELECTOR-69;Mn;0;NSM;;;;;N;;;;; +E0135;VARIATION SELECTOR-70;Mn;0;NSM;;;;;N;;;;; +E0136;VARIATION SELECTOR-71;Mn;0;NSM;;;;;N;;;;; +E0137;VARIATION SELECTOR-72;Mn;0;NSM;;;;;N;;;;; +E0138;VARIATION SELECTOR-73;Mn;0;NSM;;;;;N;;;;; +E0139;VARIATION SELECTOR-74;Mn;0;NSM;;;;;N;;;;; +E013A;VARIATION SELECTOR-75;Mn;0;NSM;;;;;N;;;;; +E013B;VARIATION SELECTOR-76;Mn;0;NSM;;;;;N;;;;; +E013C;VARIATION SELECTOR-77;Mn;0;NSM;;;;;N;;;;; +E013D;VARIATION SELECTOR-78;Mn;0;NSM;;;;;N;;;;; +E013E;VARIATION SELECTOR-79;Mn;0;NSM;;;;;N;;;;; +E013F;VARIATION SELECTOR-80;Mn;0;NSM;;;;;N;;;;; +E0140;VARIATION SELECTOR-81;Mn;0;NSM;;;;;N;;;;; +E0141;VARIATION SELECTOR-82;Mn;0;NSM;;;;;N;;;;; +E0142;VARIATION SELECTOR-83;Mn;0;NSM;;;;;N;;;;; +E0143;VARIATION SELECTOR-84;Mn;0;NSM;;;;;N;;;;; +E0144;VARIATION SELECTOR-85;Mn;0;NSM;;;;;N;;;;; +E0145;VARIATION SELECTOR-86;Mn;0;NSM;;;;;N;;;;; +E0146;VARIATION SELECTOR-87;Mn;0;NSM;;;;;N;;;;; +E0147;VARIATION SELECTOR-88;Mn;0;NSM;;;;;N;;;;; +E0148;VARIATION SELECTOR-89;Mn;0;NSM;;;;;N;;;;; +E0149;VARIATION SELECTOR-90;Mn;0;NSM;;;;;N;;;;; +E014A;VARIATION SELECTOR-91;Mn;0;NSM;;;;;N;;;;; +E014B;VARIATION SELECTOR-92;Mn;0;NSM;;;;;N;;;;; +E014C;VARIATION SELECTOR-93;Mn;0;NSM;;;;;N;;;;; +E014D;VARIATION SELECTOR-94;Mn;0;NSM;;;;;N;;;;; +E014E;VARIATION SELECTOR-95;Mn;0;NSM;;;;;N;;;;; +E014F;VARIATION SELECTOR-96;Mn;0;NSM;;;;;N;;;;; +E0150;VARIATION SELECTOR-97;Mn;0;NSM;;;;;N;;;;; +E0151;VARIATION SELECTOR-98;Mn;0;NSM;;;;;N;;;;; +E0152;VARIATION SELECTOR-99;Mn;0;NSM;;;;;N;;;;; +E0153;VARIATION SELECTOR-100;Mn;0;NSM;;;;;N;;;;; +E0154;VARIATION SELECTOR-101;Mn;0;NSM;;;;;N;;;;; +E0155;VARIATION SELECTOR-102;Mn;0;NSM;;;;;N;;;;; +E0156;VARIATION SELECTOR-103;Mn;0;NSM;;;;;N;;;;; +E0157;VARIATION SELECTOR-104;Mn;0;NSM;;;;;N;;;;; +E0158;VARIATION SELECTOR-105;Mn;0;NSM;;;;;N;;;;; +E0159;VARIATION SELECTOR-106;Mn;0;NSM;;;;;N;;;;; +E015A;VARIATION SELECTOR-107;Mn;0;NSM;;;;;N;;;;; +E015B;VARIATION SELECTOR-108;Mn;0;NSM;;;;;N;;;;; +E015C;VARIATION SELECTOR-109;Mn;0;NSM;;;;;N;;;;; +E015D;VARIATION SELECTOR-110;Mn;0;NSM;;;;;N;;;;; +E015E;VARIATION SELECTOR-111;Mn;0;NSM;;;;;N;;;;; +E015F;VARIATION SELECTOR-112;Mn;0;NSM;;;;;N;;;;; +E0160;VARIATION SELECTOR-113;Mn;0;NSM;;;;;N;;;;; +E0161;VARIATION SELECTOR-114;Mn;0;NSM;;;;;N;;;;; +E0162;VARIATION SELECTOR-115;Mn;0;NSM;;;;;N;;;;; +E0163;VARIATION SELECTOR-116;Mn;0;NSM;;;;;N;;;;; +E0164;VARIATION SELECTOR-117;Mn;0;NSM;;;;;N;;;;; +E0165;VARIATION SELECTOR-118;Mn;0;NSM;;;;;N;;;;; +E0166;VARIATION SELECTOR-119;Mn;0;NSM;;;;;N;;;;; +E0167;VARIATION SELECTOR-120;Mn;0;NSM;;;;;N;;;;; +E0168;VARIATION SELECTOR-121;Mn;0;NSM;;;;;N;;;;; +E0169;VARIATION SELECTOR-122;Mn;0;NSM;;;;;N;;;;; +E016A;VARIATION SELECTOR-123;Mn;0;NSM;;;;;N;;;;; +E016B;VARIATION SELECTOR-124;Mn;0;NSM;;;;;N;;;;; +E016C;VARIATION SELECTOR-125;Mn;0;NSM;;;;;N;;;;; +E016D;VARIATION SELECTOR-126;Mn;0;NSM;;;;;N;;;;; +E016E;VARIATION SELECTOR-127;Mn;0;NSM;;;;;N;;;;; +E016F;VARIATION SELECTOR-128;Mn;0;NSM;;;;;N;;;;; +E0170;VARIATION SELECTOR-129;Mn;0;NSM;;;;;N;;;;; +E0171;VARIATION SELECTOR-130;Mn;0;NSM;;;;;N;;;;; +E0172;VARIATION SELECTOR-131;Mn;0;NSM;;;;;N;;;;; +E0173;VARIATION SELECTOR-132;Mn;0;NSM;;;;;N;;;;; +E0174;VARIATION SELECTOR-133;Mn;0;NSM;;;;;N;;;;; +E0175;VARIATION SELECTOR-134;Mn;0;NSM;;;;;N;;;;; +E0176;VARIATION SELECTOR-135;Mn;0;NSM;;;;;N;;;;; +E0177;VARIATION SELECTOR-136;Mn;0;NSM;;;;;N;;;;; +E0178;VARIATION SELECTOR-137;Mn;0;NSM;;;;;N;;;;; +E0179;VARIATION SELECTOR-138;Mn;0;NSM;;;;;N;;;;; +E017A;VARIATION SELECTOR-139;Mn;0;NSM;;;;;N;;;;; +E017B;VARIATION SELECTOR-140;Mn;0;NSM;;;;;N;;;;; +E017C;VARIATION SELECTOR-141;Mn;0;NSM;;;;;N;;;;; +E017D;VARIATION SELECTOR-142;Mn;0;NSM;;;;;N;;;;; +E017E;VARIATION SELECTOR-143;Mn;0;NSM;;;;;N;;;;; +E017F;VARIATION SELECTOR-144;Mn;0;NSM;;;;;N;;;;; +E0180;VARIATION SELECTOR-145;Mn;0;NSM;;;;;N;;;;; +E0181;VARIATION SELECTOR-146;Mn;0;NSM;;;;;N;;;;; +E0182;VARIATION SELECTOR-147;Mn;0;NSM;;;;;N;;;;; +E0183;VARIATION SELECTOR-148;Mn;0;NSM;;;;;N;;;;; +E0184;VARIATION SELECTOR-149;Mn;0;NSM;;;;;N;;;;; +E0185;VARIATION SELECTOR-150;Mn;0;NSM;;;;;N;;;;; +E0186;VARIATION SELECTOR-151;Mn;0;NSM;;;;;N;;;;; +E0187;VARIATION SELECTOR-152;Mn;0;NSM;;;;;N;;;;; +E0188;VARIATION SELECTOR-153;Mn;0;NSM;;;;;N;;;;; +E0189;VARIATION SELECTOR-154;Mn;0;NSM;;;;;N;;;;; +E018A;VARIATION SELECTOR-155;Mn;0;NSM;;;;;N;;;;; +E018B;VARIATION SELECTOR-156;Mn;0;NSM;;;;;N;;;;; +E018C;VARIATION SELECTOR-157;Mn;0;NSM;;;;;N;;;;; +E018D;VARIATION SELECTOR-158;Mn;0;NSM;;;;;N;;;;; +E018E;VARIATION SELECTOR-159;Mn;0;NSM;;;;;N;;;;; +E018F;VARIATION SELECTOR-160;Mn;0;NSM;;;;;N;;;;; +E0190;VARIATION SELECTOR-161;Mn;0;NSM;;;;;N;;;;; +E0191;VARIATION SELECTOR-162;Mn;0;NSM;;;;;N;;;;; +E0192;VARIATION SELECTOR-163;Mn;0;NSM;;;;;N;;;;; +E0193;VARIATION SELECTOR-164;Mn;0;NSM;;;;;N;;;;; +E0194;VARIATION SELECTOR-165;Mn;0;NSM;;;;;N;;;;; +E0195;VARIATION SELECTOR-166;Mn;0;NSM;;;;;N;;;;; +E0196;VARIATION SELECTOR-167;Mn;0;NSM;;;;;N;;;;; +E0197;VARIATION SELECTOR-168;Mn;0;NSM;;;;;N;;;;; +E0198;VARIATION SELECTOR-169;Mn;0;NSM;;;;;N;;;;; +E0199;VARIATION SELECTOR-170;Mn;0;NSM;;;;;N;;;;; +E019A;VARIATION SELECTOR-171;Mn;0;NSM;;;;;N;;;;; +E019B;VARIATION SELECTOR-172;Mn;0;NSM;;;;;N;;;;; +E019C;VARIATION SELECTOR-173;Mn;0;NSM;;;;;N;;;;; +E019D;VARIATION SELECTOR-174;Mn;0;NSM;;;;;N;;;;; +E019E;VARIATION SELECTOR-175;Mn;0;NSM;;;;;N;;;;; +E019F;VARIATION SELECTOR-176;Mn;0;NSM;;;;;N;;;;; +E01A0;VARIATION SELECTOR-177;Mn;0;NSM;;;;;N;;;;; +E01A1;VARIATION SELECTOR-178;Mn;0;NSM;;;;;N;;;;; +E01A2;VARIATION SELECTOR-179;Mn;0;NSM;;;;;N;;;;; +E01A3;VARIATION SELECTOR-180;Mn;0;NSM;;;;;N;;;;; +E01A4;VARIATION SELECTOR-181;Mn;0;NSM;;;;;N;;;;; +E01A5;VARIATION SELECTOR-182;Mn;0;NSM;;;;;N;;;;; +E01A6;VARIATION SELECTOR-183;Mn;0;NSM;;;;;N;;;;; +E01A7;VARIATION SELECTOR-184;Mn;0;NSM;;;;;N;;;;; +E01A8;VARIATION SELECTOR-185;Mn;0;NSM;;;;;N;;;;; +E01A9;VARIATION SELECTOR-186;Mn;0;NSM;;;;;N;;;;; +E01AA;VARIATION SELECTOR-187;Mn;0;NSM;;;;;N;;;;; +E01AB;VARIATION SELECTOR-188;Mn;0;NSM;;;;;N;;;;; +E01AC;VARIATION SELECTOR-189;Mn;0;NSM;;;;;N;;;;; +E01AD;VARIATION SELECTOR-190;Mn;0;NSM;;;;;N;;;;; +E01AE;VARIATION SELECTOR-191;Mn;0;NSM;;;;;N;;;;; +E01AF;VARIATION SELECTOR-192;Mn;0;NSM;;;;;N;;;;; +E01B0;VARIATION SELECTOR-193;Mn;0;NSM;;;;;N;;;;; +E01B1;VARIATION SELECTOR-194;Mn;0;NSM;;;;;N;;;;; +E01B2;VARIATION SELECTOR-195;Mn;0;NSM;;;;;N;;;;; +E01B3;VARIATION SELECTOR-196;Mn;0;NSM;;;;;N;;;;; +E01B4;VARIATION SELECTOR-197;Mn;0;NSM;;;;;N;;;;; +E01B5;VARIATION SELECTOR-198;Mn;0;NSM;;;;;N;;;;; +E01B6;VARIATION SELECTOR-199;Mn;0;NSM;;;;;N;;;;; +E01B7;VARIATION SELECTOR-200;Mn;0;NSM;;;;;N;;;;; +E01B8;VARIATION SELECTOR-201;Mn;0;NSM;;;;;N;;;;; +E01B9;VARIATION SELECTOR-202;Mn;0;NSM;;;;;N;;;;; +E01BA;VARIATION SELECTOR-203;Mn;0;NSM;;;;;N;;;;; +E01BB;VARIATION SELECTOR-204;Mn;0;NSM;;;;;N;;;;; +E01BC;VARIATION SELECTOR-205;Mn;0;NSM;;;;;N;;;;; +E01BD;VARIATION SELECTOR-206;Mn;0;NSM;;;;;N;;;;; +E01BE;VARIATION SELECTOR-207;Mn;0;NSM;;;;;N;;;;; +E01BF;VARIATION SELECTOR-208;Mn;0;NSM;;;;;N;;;;; +E01C0;VARIATION SELECTOR-209;Mn;0;NSM;;;;;N;;;;; +E01C1;VARIATION SELECTOR-210;Mn;0;NSM;;;;;N;;;;; +E01C2;VARIATION SELECTOR-211;Mn;0;NSM;;;;;N;;;;; +E01C3;VARIATION SELECTOR-212;Mn;0;NSM;;;;;N;;;;; +E01C4;VARIATION SELECTOR-213;Mn;0;NSM;;;;;N;;;;; +E01C5;VARIATION SELECTOR-214;Mn;0;NSM;;;;;N;;;;; +E01C6;VARIATION SELECTOR-215;Mn;0;NSM;;;;;N;;;;; +E01C7;VARIATION SELECTOR-216;Mn;0;NSM;;;;;N;;;;; +E01C8;VARIATION SELECTOR-217;Mn;0;NSM;;;;;N;;;;; +E01C9;VARIATION SELECTOR-218;Mn;0;NSM;;;;;N;;;;; +E01CA;VARIATION SELECTOR-219;Mn;0;NSM;;;;;N;;;;; +E01CB;VARIATION SELECTOR-220;Mn;0;NSM;;;;;N;;;;; +E01CC;VARIATION SELECTOR-221;Mn;0;NSM;;;;;N;;;;; +E01CD;VARIATION SELECTOR-222;Mn;0;NSM;;;;;N;;;;; +E01CE;VARIATION SELECTOR-223;Mn;0;NSM;;;;;N;;;;; +E01CF;VARIATION SELECTOR-224;Mn;0;NSM;;;;;N;;;;; +E01D0;VARIATION SELECTOR-225;Mn;0;NSM;;;;;N;;;;; +E01D1;VARIATION SELECTOR-226;Mn;0;NSM;;;;;N;;;;; +E01D2;VARIATION SELECTOR-227;Mn;0;NSM;;;;;N;;;;; +E01D3;VARIATION SELECTOR-228;Mn;0;NSM;;;;;N;;;;; +E01D4;VARIATION SELECTOR-229;Mn;0;NSM;;;;;N;;;;; +E01D5;VARIATION SELECTOR-230;Mn;0;NSM;;;;;N;;;;; +E01D6;VARIATION SELECTOR-231;Mn;0;NSM;;;;;N;;;;; +E01D7;VARIATION SELECTOR-232;Mn;0;NSM;;;;;N;;;;; +E01D8;VARIATION SELECTOR-233;Mn;0;NSM;;;;;N;;;;; +E01D9;VARIATION SELECTOR-234;Mn;0;NSM;;;;;N;;;;; +E01DA;VARIATION SELECTOR-235;Mn;0;NSM;;;;;N;;;;; +E01DB;VARIATION SELECTOR-236;Mn;0;NSM;;;;;N;;;;; +E01DC;VARIATION SELECTOR-237;Mn;0;NSM;;;;;N;;;;; +E01DD;VARIATION SELECTOR-238;Mn;0;NSM;;;;;N;;;;; +E01DE;VARIATION SELECTOR-239;Mn;0;NSM;;;;;N;;;;; +E01DF;VARIATION SELECTOR-240;Mn;0;NSM;;;;;N;;;;; +E01E0;VARIATION SELECTOR-241;Mn;0;NSM;;;;;N;;;;; +E01E1;VARIATION SELECTOR-242;Mn;0;NSM;;;;;N;;;;; +E01E2;VARIATION SELECTOR-243;Mn;0;NSM;;;;;N;;;;; +E01E3;VARIATION SELECTOR-244;Mn;0;NSM;;;;;N;;;;; +E01E4;VARIATION SELECTOR-245;Mn;0;NSM;;;;;N;;;;; +E01E5;VARIATION SELECTOR-246;Mn;0;NSM;;;;;N;;;;; +E01E6;VARIATION SELECTOR-247;Mn;0;NSM;;;;;N;;;;; +E01E7;VARIATION SELECTOR-248;Mn;0;NSM;;;;;N;;;;; +E01E8;VARIATION SELECTOR-249;Mn;0;NSM;;;;;N;;;;; +E01E9;VARIATION SELECTOR-250;Mn;0;NSM;;;;;N;;;;; +E01EA;VARIATION SELECTOR-251;Mn;0;NSM;;;;;N;;;;; +E01EB;VARIATION SELECTOR-252;Mn;0;NSM;;;;;N;;;;; +E01EC;VARIATION SELECTOR-253;Mn;0;NSM;;;;;N;;;;; +E01ED;VARIATION SELECTOR-254;Mn;0;NSM;;;;;N;;;;; +E01EE;VARIATION SELECTOR-255;Mn;0;NSM;;;;;N;;;;; +E01EF;VARIATION SELECTOR-256;Mn;0;NSM;;;;;N;;;;; +F0000;;Co;0;L;;;;;N;;;;; +FFFFD;;Co;0;L;;;;;N;;;;; +100000;;Co;0;L;;;;;N;;;;; +10FFFD;;Co;0;L;;;;;N;;;;; diff --git a/src/System.Text.Encodings.Web/ref/System.Text.Encodings.Web.cs b/src/System.Text.Encodings.Web/ref/System.Text.Encodings.Web.cs index 804855920a4c..45da8a9b421c 100644 --- a/src/System.Text.Encodings.Web/ref/System.Text.Encodings.Web.cs +++ b/src/System.Text.Encodings.Web/ref/System.Text.Encodings.Web.cs @@ -121,6 +121,7 @@ public static partial class UnicodeRanges public static System.Text.Unicode.UnicodeRange Cyrillic { get { throw null; } } public static System.Text.Unicode.UnicodeRange CyrillicExtendedA { get { throw null; } } public static System.Text.Unicode.UnicodeRange CyrillicExtendedB { get { throw null; } } + public static System.Text.Unicode.UnicodeRange CyrillicExtendedC { get { throw null; } } public static System.Text.Unicode.UnicodeRange CyrillicSupplement { get { throw null; } } public static System.Text.Unicode.UnicodeRange Devanagari { get { throw null; } } public static System.Text.Unicode.UnicodeRange DevanagariExtended { get { throw null; } } @@ -134,6 +135,7 @@ public static partial class UnicodeRanges public static System.Text.Unicode.UnicodeRange GeneralPunctuation { get { throw null; } } public static System.Text.Unicode.UnicodeRange GeometricShapes { get { throw null; } } public static System.Text.Unicode.UnicodeRange Georgian { get { throw null; } } + public static System.Text.Unicode.UnicodeRange GeorgianExtended { get { throw null; } } public static System.Text.Unicode.UnicodeRange GeorgianSupplement { get { throw null; } } public static System.Text.Unicode.UnicodeRange Glagolitic { get { throw null; } } public static System.Text.Unicode.UnicodeRange GreekandCoptic { get { throw null; } } @@ -215,6 +217,7 @@ public static partial class UnicodeRanges public static System.Text.Unicode.UnicodeRange SupplementalPunctuation { get { throw null; } } public static System.Text.Unicode.UnicodeRange SylotiNagri { get { throw null; } } public static System.Text.Unicode.UnicodeRange Syriac { get { throw null; } } + public static System.Text.Unicode.UnicodeRange SyriacSupplement { get { throw null; } } public static System.Text.Unicode.UnicodeRange Tagalog { get { throw null; } } public static System.Text.Unicode.UnicodeRange Tagbanwa { get { throw null; } } public static System.Text.Unicode.UnicodeRange TaiLe { get { throw null; } } diff --git a/src/System.Text.Encodings.Web/src/System/Text/Unicode/UnicodeHelpers.generated.cs b/src/System.Text.Encodings.Web/src/System/Text/Unicode/UnicodeHelpers.generated.cs index 2f8347c20243..68c0f06b4b28 100644 --- a/src/System.Text.Encodings.Web/src/System/Text/Unicode/UnicodeHelpers.generated.cs +++ b/src/System.Text.Encodings.Web/src/System/Text/Unicode/UnicodeHelpers.generated.cs @@ -21,26 +21,26 @@ internal static partial class UnicodeHelpers 0xF0, 0xD7, 0xFF, 0xFF, 0xFB, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+0380..U+03FF 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+0400..U+047F 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+0480..U+04FF - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xFF, 0xFF, 0xFF, 0x7F, 0xFE, 0xFE, 0xFF, 0xFF, 0xFF, // U+0500..U+057F - 0xFF, 0xE6, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0xFF, 0xFF, 0xFF, 0x07, 0x1F, 0x00, // U+0580..U+05FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xFF, 0xFF, 0xFF, 0x7F, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, // U+0500..U+057F + 0xFF, 0xE7, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0xFF, 0xFF, 0xFF, 0x87, 0x1F, 0x00, // U+0580..U+05FF 0xFF, 0xFF, 0xFF, 0xDF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+0600..U+067F 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+0680..U+06FF 0xFF, 0xBF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xE7, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+0700..U+077F - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x03, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x07, // U+0780..U+07FF - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0xFF, 0x7F, 0xFF, 0xFF, 0xFF, 0x4F, 0x00, 0x00, 0x00, 0x00, // U+0800..U+087F - 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xFF, 0xFF, 0xFF, // U+0880..U+08FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x03, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xE7, // U+0780..U+07FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0xFF, 0x7F, 0xFF, 0xFF, 0xFF, 0x4F, 0xFF, 0x07, 0x00, 0x00, // U+0800..U+087F + 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xDF, 0x3F, 0x00, 0x00, 0xF8, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+0880..U+08FF 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+0900..U+097F - 0xEF, 0x9F, 0xF9, 0xFF, 0xFF, 0xFD, 0xC5, 0xF3, 0x9F, 0x79, 0x80, 0xB0, 0xCF, 0xFF, 0xFF, 0x0F, // U+0980..U+09FF - 0xEE, 0x87, 0xF9, 0xFF, 0xFF, 0xFD, 0x6D, 0xD3, 0x87, 0x39, 0x02, 0x5E, 0xC0, 0xFF, 0x3F, 0x00, // U+0A00..U+0A7F - 0xEE, 0xBF, 0xFB, 0xFF, 0xFF, 0xFD, 0xED, 0xF3, 0xBF, 0x3B, 0x01, 0x00, 0xCF, 0xFF, 0x03, 0x02, // U+0A80..U+0AFF + 0xEF, 0x9F, 0xF9, 0xFF, 0xFF, 0xFD, 0xC5, 0xF3, 0x9F, 0x79, 0x80, 0xB0, 0xCF, 0xFF, 0xFF, 0x7F, // U+0980..U+09FF + 0xEE, 0x87, 0xF9, 0xFF, 0xFF, 0xFD, 0x6D, 0xD3, 0x87, 0x39, 0x02, 0x5E, 0xC0, 0xFF, 0x7F, 0x00, // U+0A00..U+0A7F + 0xEE, 0xBF, 0xFB, 0xFF, 0xFF, 0xFD, 0xED, 0xF3, 0xBF, 0x3B, 0x01, 0x00, 0xCF, 0xFF, 0x03, 0xFE, // U+0A80..U+0AFF 0xEE, 0x9F, 0xF9, 0xFF, 0xFF, 0xFD, 0xED, 0xF3, 0x9F, 0x39, 0xC0, 0xB0, 0xCF, 0xFF, 0xFF, 0x00, // U+0B00..U+0B7F 0xEC, 0xC7, 0x3D, 0xD6, 0x18, 0xC7, 0xFF, 0xC3, 0xC7, 0x3D, 0x81, 0x00, 0xC0, 0xFF, 0xFF, 0x07, // U+0B80..U+0BFF - 0xEF, 0xDF, 0xFD, 0xFF, 0xFF, 0xFD, 0xFF, 0xE3, 0xDF, 0x3D, 0x60, 0x07, 0xCF, 0xFF, 0x00, 0xFF, // U+0C00..U+0C7F - 0xEE, 0xDF, 0xFD, 0xFF, 0xFF, 0xFD, 0xEF, 0xF3, 0xDF, 0x3D, 0x60, 0x40, 0xCF, 0xFF, 0x06, 0x00, // U+0C80..U+0CFF - 0xEE, 0xDF, 0xFD, 0xFF, 0xFF, 0xFF, 0xFF, 0xE7, 0xDF, 0x7D, 0x80, 0x80, 0xCF, 0xFF, 0x3F, 0xFE, // U+0D00..U+0D7F + 0xFF, 0xDF, 0xFD, 0xFF, 0xFF, 0xFD, 0xFF, 0xE3, 0xDF, 0x3D, 0x60, 0x07, 0xCF, 0xFF, 0x80, 0xFF, // U+0C00..U+0C7F + 0xFF, 0xDF, 0xFD, 0xFF, 0xFF, 0xFD, 0xEF, 0xF3, 0xDF, 0x3D, 0x60, 0x40, 0xCF, 0xFF, 0x06, 0x00, // U+0C80..U+0CFF + 0xEF, 0xDF, 0xFD, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xDF, 0xFD, 0xF0, 0xFF, 0xCF, 0xFF, 0xFF, 0xFF, // U+0D00..U+0D7F 0xEC, 0xFF, 0x7F, 0xFC, 0xFF, 0xFF, 0xFB, 0x2F, 0x7F, 0x84, 0x5F, 0xFF, 0xC0, 0xFF, 0x1C, 0x00, // U+0D80..U+0DFF 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x87, 0xFF, 0xFF, 0xFF, 0x0F, 0x00, 0x00, 0x00, 0x00, // U+0E00..U+0E7F - 0x96, 0x25, 0xF0, 0xFE, 0xAE, 0xEC, 0xFF, 0x3B, 0x5F, 0x3F, 0xFF, 0xF3, 0x00, 0x00, 0x00, 0x00, // U+0E80..U+0EFF + 0xD6, 0xF7, 0xFF, 0xFF, 0xAF, 0xFF, 0xFF, 0x3F, 0x5F, 0x3F, 0xFF, 0xF3, 0x00, 0x00, 0x00, 0x00, // U+0E80..U+0EFF 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xFF, 0xFF, 0xFF, 0x1F, 0xFE, 0xFF, // U+0F00..U+0F7F 0xFF, 0xFF, 0xFF, 0xFE, 0xFF, 0xFF, 0xFF, 0xDF, 0xFF, 0xDF, 0xFF, 0x07, 0x00, 0x00, 0x00, 0x00, // U+0F80..U+0FFF 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+1000..U+107F @@ -59,7 +59,7 @@ internal static partial class UnicodeHelpers 0xFE, 0xFF, 0xFF, 0x1F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, // U+1680..U+16FF 0xFF, 0xDF, 0x1F, 0x00, 0xFF, 0xFF, 0x7F, 0x00, 0xFF, 0xFF, 0x0F, 0x00, 0xFF, 0xDF, 0x0D, 0x00, // U+1700..U+177F 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0xFF, 0x03, 0xFF, 0x03, // U+1780..U+17FF - 0xFF, 0x7F, 0xFF, 0x03, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, // U+1800..U+187F + 0xFF, 0x7F, 0xFF, 0x03, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, // U+1800..U+187F 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x07, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0x00, // U+1880..U+18FF 0xFF, 0xFF, 0xFF, 0x7F, 0xFF, 0x0F, 0xFF, 0x0F, 0xF1, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0x1F, 0x00, // U+1900..U+197F 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x0F, 0xFF, 0xFF, 0xFF, 0x03, 0xFF, 0xC7, 0xFF, 0xFF, 0xFF, 0xFF, // U+1980..U+19FF @@ -68,21 +68,21 @@ internal static partial class UnicodeHelpers 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x0F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x1F, // U+1B00..U+1B7F 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x0F, 0xF0, // U+1B80..U+1BFF 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0xFF, 0xE3, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+1C00..U+1C7F - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0x03, // U+1C80..U+1CFF + 0xFF, 0x01, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xE7, 0xFF, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x07, // U+1C80..U+1CFF 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+1D00..U+1D7F - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0xF0, // U+1D80..U+1DFF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, // U+1D80..U+1DFF 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+1E00..U+1E7F 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+1E80..U+1EFF 0xFF, 0xFF, 0x3F, 0x3F, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0x3F, 0xFF, 0xAA, 0xFF, 0xFF, 0xFF, 0x3F, // U+1F00..U+1F7F 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xDF, 0xFF, 0xDF, 0xFF, 0xCF, 0xEF, 0xFF, 0xFF, 0xDC, 0x7F, // U+1F80..U+1FFF 0x00, 0xF8, 0xFF, 0xFF, 0xFF, 0x7C, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0xDF, 0xFF, 0xF3, 0xFF, // U+2000..U+207F - 0xFF, 0x7F, 0xFF, 0x1F, 0xFF, 0xFF, 0xFF, 0x7F, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x00, // U+2080..U+20FF + 0xFF, 0x7F, 0xFF, 0x1F, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x00, // U+2080..U+20FF 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+2100..U+217F 0xFF, 0x0F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+2180..U+21FF 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+2200..U+227F 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+2280..U+22FF 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+2300..U+237F - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x07, // U+2380..U+23FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+2380..U+23FF 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0x00, 0x00, 0x00, 0xFF, 0x07, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, // U+2400..U+247F 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+2480..U+24FF 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+2500..U+257F @@ -98,21 +98,21 @@ internal static partial class UnicodeHelpers 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+2A00..U+2A7F 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+2A80..U+2AFF 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0xFF, // U+2B00..U+2B7F - 0xFF, 0xFF, 0x3F, 0xFF, 0xFF, 0xFF, 0xFF, 0xE3, 0xFF, 0xFD, 0x03, 0x00, 0x00, 0xF0, 0x00, 0x00, // U+2B80..U+2BFF + 0xFF, 0xFF, 0x3F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+2B80..U+2BFF 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0xFF, 0xFF, 0xFF, 0xFF, // U+2C00..U+2C7F 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x0F, 0xFE, // U+2C80..U+2CFF 0xFF, 0xFF, 0xFF, 0xFF, 0xBF, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x80, 0x01, 0x80, // U+2D00..U+2D7F 0xFF, 0xFF, 0x7F, 0x00, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0xFF, 0xFF, 0xFF, 0xFF, // U+2D80..U+2DFF - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // U+2E00..U+2E7F + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // U+2E00..U+2E7F 0xFF, 0xFF, 0xFF, 0xFB, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x0F, 0x00, // U+2E80..U+2EFF 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+2F00..U+2F7F 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0x00, 0x00, 0x00, 0xFF, 0x0F, // U+2F80..U+2FFF 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+3000..U+307F 0xFF, 0xFF, 0x7F, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+3080..U+30FF - 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+3100..U+317F + 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+3100..U+317F 0xFF, 0x7F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x07, 0xFF, 0xFF, 0xFF, 0xFF, 0x0F, 0x00, 0xFF, 0xFF, // U+3180..U+31FF 0xFF, 0xFF, 0xFF, 0x7F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+3200..U+327F - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, // U+3280..U+32FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+3280..U+32FF 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+3300..U+337F 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+3380..U+33FF 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+3400..U+347F @@ -330,7 +330,7 @@ internal static partial class UnicodeHelpers 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+9E00..U+9E7F 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+9E80..U+9EFF 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+9F00..U+9F7F - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, // U+9F80..U+9FFF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, // U+9F80..U+9FFF 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+A000..U+A07F 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+A080..U+A0FF 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+A100..U+A17F @@ -346,14 +346,14 @@ internal static partial class UnicodeHelpers 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x0F, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+A600..U+A67F 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, // U+A680..U+A6FF 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+A700..U+A77F - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xFF, // U+A780..U+A7FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xFF, // U+A780..U+A7FF 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x0F, 0xFF, 0x03, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, // U+A800..U+A87F - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x1F, 0xC0, 0xFF, 0x03, 0xFF, 0xFF, 0xFF, 0x3F, // U+A880..U+A8FF + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0xC0, 0xFF, 0x03, 0xFF, 0xFF, 0xFF, 0xFF, // U+A880..U+A8FF 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x0F, 0x80, 0xFF, 0xFF, 0xFF, 0x1F, // U+A900..U+A97F 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xBF, 0xFF, 0xC3, 0xFF, 0xFF, 0xFF, 0x7F, // U+A980..U+A9FF 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0x00, 0xFF, 0x3F, 0xFF, 0xF3, 0xFF, 0xFF, 0xFF, 0xFF, // U+AA00..U+AA7F 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x07, 0x00, 0x00, 0xF8, 0xFF, 0xFF, 0x7F, 0x00, // U+AA80..U+AAFF - 0x7E, 0x7E, 0x7E, 0x00, 0x7F, 0x7F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0x00, 0xFF, 0xFF, // U+AB00..U+AB7F + 0x7E, 0x7E, 0x7E, 0x00, 0x7F, 0x7F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0xFF, 0xFF, // U+AB00..U+AB7F 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0xFF, 0x03, // U+AB80..U+ABFF 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+AC00..U+AC7F 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // U+AC80..U+ACFF diff --git a/src/System.Text.Encodings.Web/src/System/Text/Unicode/UnicodeRanges.generated.cs b/src/System.Text.Encodings.Web/src/System/Text/Unicode/UnicodeRanges.generated.cs index d3dd165db51a..5568bfb411c8 100644 --- a/src/System.Text.Encodings.Web/src/System/Text/Unicode/UnicodeRanges.generated.cs +++ b/src/System.Text.Encodings.Web/src/System/Text/Unicode/UnicodeRanges.generated.cs @@ -2,8 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Threading; +// This file was generated by a tool. +// See src/System.Text.Encodings.Web/tools/GenUnicodeRanges namespace System.Text.Unicode { @@ -15,8 +15,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/U0000.pdf for the full set of characters in this block. /// - public static UnicodeRange BasicLatin { get { return _basicLatin ?? CreateRange(ref _basicLatin, first: '\u0000', last: '\u007F'); } } - private static UnicodeRange _basicLatin; + public static UnicodeRange BasicLatin => _u0000 ?? CreateRange(ref _u0000, first: '\u0000', last: '\u007F'); + private static UnicodeRange _u0000; /// /// A corresponding to the 'Latin-1 Supplement' Unicode block (U+0080..U+00FF). @@ -24,8 +24,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/U0080.pdf for the full set of characters in this block. /// - public static UnicodeRange Latin1Supplement { get { return _latin1Supplement ?? CreateRange(ref _latin1Supplement, first: '\u0080', last: '\u00FF'); } } - private static UnicodeRange _latin1Supplement; + public static UnicodeRange Latin1Supplement => _u0080 ?? CreateRange(ref _u0080, first: '\u0080', last: '\u00FF'); + private static UnicodeRange _u0080; /// /// A corresponding to the 'Latin Extended-A' Unicode block (U+0100..U+017F). @@ -33,8 +33,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/U0100.pdf for the full set of characters in this block. /// - public static UnicodeRange LatinExtendedA { get { return _latinExtendedA ?? CreateRange(ref _latinExtendedA, first: '\u0100', last: '\u017F'); } } - private static UnicodeRange _latinExtendedA; + public static UnicodeRange LatinExtendedA => _u0100 ?? CreateRange(ref _u0100, first: '\u0100', last: '\u017F'); + private static UnicodeRange _u0100; /// /// A corresponding to the 'Latin Extended-B' Unicode block (U+0180..U+024F). @@ -42,8 +42,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/U0180.pdf for the full set of characters in this block. /// - public static UnicodeRange LatinExtendedB { get { return _latinExtendedB ?? CreateRange(ref _latinExtendedB, first: '\u0180', last: '\u024F'); } } - private static UnicodeRange _latinExtendedB; + public static UnicodeRange LatinExtendedB => _u0180 ?? CreateRange(ref _u0180, first: '\u0180', last: '\u024F'); + private static UnicodeRange _u0180; /// /// A corresponding to the 'IPA Extensions' Unicode block (U+0250..U+02AF). @@ -51,8 +51,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/U0250.pdf for the full set of characters in this block. /// - public static UnicodeRange IpaExtensions { get { return _ipaExtensions ?? CreateRange(ref _ipaExtensions, first: '\u0250', last: '\u02AF'); } } - private static UnicodeRange _ipaExtensions; + public static UnicodeRange IpaExtensions => _u0250 ?? CreateRange(ref _u0250, first: '\u0250', last: '\u02AF'); + private static UnicodeRange _u0250; /// /// A corresponding to the 'Spacing Modifier Letters' Unicode block (U+02B0..U+02FF). @@ -60,8 +60,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/U02B0.pdf for the full set of characters in this block. /// - public static UnicodeRange SpacingModifierLetters { get { return _spacingModifierLetters ?? CreateRange(ref _spacingModifierLetters, first: '\u02B0', last: '\u02FF'); } } - private static UnicodeRange _spacingModifierLetters; + public static UnicodeRange SpacingModifierLetters => _u02B0 ?? CreateRange(ref _u02B0, first: '\u02B0', last: '\u02FF'); + private static UnicodeRange _u02B0; /// /// A corresponding to the 'Combining Diacritical Marks' Unicode block (U+0300..U+036F). @@ -69,8 +69,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/U0300.pdf for the full set of characters in this block. /// - public static UnicodeRange CombiningDiacriticalMarks { get { return _combiningDiacriticalMarks ?? CreateRange(ref _combiningDiacriticalMarks, first: '\u0300', last: '\u036F'); } } - private static UnicodeRange _combiningDiacriticalMarks; + public static UnicodeRange CombiningDiacriticalMarks => _u0300 ?? CreateRange(ref _u0300, first: '\u0300', last: '\u036F'); + private static UnicodeRange _u0300; /// /// A corresponding to the 'Greek and Coptic' Unicode block (U+0370..U+03FF). @@ -78,8 +78,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/U0370.pdf for the full set of characters in this block. /// - public static UnicodeRange GreekandCoptic { get { return _greekandCoptic ?? CreateRange(ref _greekandCoptic, first: '\u0370', last: '\u03FF'); } } - private static UnicodeRange _greekandCoptic; + public static UnicodeRange GreekandCoptic => _u0370 ?? CreateRange(ref _u0370, first: '\u0370', last: '\u03FF'); + private static UnicodeRange _u0370; /// /// A corresponding to the 'Cyrillic' Unicode block (U+0400..U+04FF). @@ -87,8 +87,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/U0400.pdf for the full set of characters in this block. /// - public static UnicodeRange Cyrillic { get { return _cyrillic ?? CreateRange(ref _cyrillic, first: '\u0400', last: '\u04FF'); } } - private static UnicodeRange _cyrillic; + public static UnicodeRange Cyrillic => _u0400 ?? CreateRange(ref _u0400, first: '\u0400', last: '\u04FF'); + private static UnicodeRange _u0400; /// /// A corresponding to the 'Cyrillic Supplement' Unicode block (U+0500..U+052F). @@ -96,8 +96,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/U0500.pdf for the full set of characters in this block. /// - public static UnicodeRange CyrillicSupplement { get { return _cyrillicSupplement ?? CreateRange(ref _cyrillicSupplement, first: '\u0500', last: '\u052F'); } } - private static UnicodeRange _cyrillicSupplement; + public static UnicodeRange CyrillicSupplement => _u0500 ?? CreateRange(ref _u0500, first: '\u0500', last: '\u052F'); + private static UnicodeRange _u0500; /// /// A corresponding to the 'Armenian' Unicode block (U+0530..U+058F). @@ -105,8 +105,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/U0530.pdf for the full set of characters in this block. /// - public static UnicodeRange Armenian { get { return _armenian ?? CreateRange(ref _armenian, first: '\u0530', last: '\u058F'); } } - private static UnicodeRange _armenian; + public static UnicodeRange Armenian => _u0530 ?? CreateRange(ref _u0530, first: '\u0530', last: '\u058F'); + private static UnicodeRange _u0530; /// /// A corresponding to the 'Hebrew' Unicode block (U+0590..U+05FF). @@ -114,8 +114,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/U0590.pdf for the full set of characters in this block. /// - public static UnicodeRange Hebrew { get { return _hebrew ?? CreateRange(ref _hebrew, first: '\u0590', last: '\u05FF'); } } - private static UnicodeRange _hebrew; + public static UnicodeRange Hebrew => _u0590 ?? CreateRange(ref _u0590, first: '\u0590', last: '\u05FF'); + private static UnicodeRange _u0590; /// /// A corresponding to the 'Arabic' Unicode block (U+0600..U+06FF). @@ -123,8 +123,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/U0600.pdf for the full set of characters in this block. /// - public static UnicodeRange Arabic { get { return _arabic ?? CreateRange(ref _arabic, first: '\u0600', last: '\u06FF'); } } - private static UnicodeRange _arabic; + public static UnicodeRange Arabic => _u0600 ?? CreateRange(ref _u0600, first: '\u0600', last: '\u06FF'); + private static UnicodeRange _u0600; /// /// A corresponding to the 'Syriac' Unicode block (U+0700..U+074F). @@ -132,8 +132,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/U0700.pdf for the full set of characters in this block. /// - public static UnicodeRange Syriac { get { return _syriac ?? CreateRange(ref _syriac, first: '\u0700', last: '\u074F'); } } - private static UnicodeRange _syriac; + public static UnicodeRange Syriac => _u0700 ?? CreateRange(ref _u0700, first: '\u0700', last: '\u074F'); + private static UnicodeRange _u0700; /// /// A corresponding to the 'Arabic Supplement' Unicode block (U+0750..U+077F). @@ -141,8 +141,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/U0750.pdf for the full set of characters in this block. /// - public static UnicodeRange ArabicSupplement { get { return _arabicSupplement ?? CreateRange(ref _arabicSupplement, first: '\u0750', last: '\u077F'); } } - private static UnicodeRange _arabicSupplement; + public static UnicodeRange ArabicSupplement => _u0750 ?? CreateRange(ref _u0750, first: '\u0750', last: '\u077F'); + private static UnicodeRange _u0750; /// /// A corresponding to the 'Thaana' Unicode block (U+0780..U+07BF). @@ -150,8 +150,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/U0780.pdf for the full set of characters in this block. /// - public static UnicodeRange Thaana { get { return _thaana ?? CreateRange(ref _thaana, first: '\u0780', last: '\u07BF'); } } - private static UnicodeRange _thaana; + public static UnicodeRange Thaana => _u0780 ?? CreateRange(ref _u0780, first: '\u0780', last: '\u07BF'); + private static UnicodeRange _u0780; /// /// A corresponding to the 'NKo' Unicode block (U+07C0..U+07FF). @@ -159,8 +159,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/U07C0.pdf for the full set of characters in this block. /// - public static UnicodeRange NKo { get { return _nKo ?? CreateRange(ref _nKo, first: '\u07C0', last: '\u07FF'); } } - private static UnicodeRange _nKo; + public static UnicodeRange NKo => _u07C0 ?? CreateRange(ref _u07C0, first: '\u07C0', last: '\u07FF'); + private static UnicodeRange _u07C0; /// /// A corresponding to the 'Samaritan' Unicode block (U+0800..U+083F). @@ -168,8 +168,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/U0800.pdf for the full set of characters in this block. /// - public static UnicodeRange Samaritan { get { return _samaritan ?? CreateRange(ref _samaritan, first: '\u0800', last: '\u083F'); } } - private static UnicodeRange _samaritan; + public static UnicodeRange Samaritan => _u0800 ?? CreateRange(ref _u0800, first: '\u0800', last: '\u083F'); + private static UnicodeRange _u0800; /// /// A corresponding to the 'Mandaic' Unicode block (U+0840..U+085F). @@ -177,8 +177,17 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/U0840.pdf for the full set of characters in this block. /// - public static UnicodeRange Mandaic { get { return _mandaic ?? CreateRange(ref _mandaic, first: '\u0840', last: '\u085F'); } } - private static UnicodeRange _mandaic; + public static UnicodeRange Mandaic => _u0840 ?? CreateRange(ref _u0840, first: '\u0840', last: '\u085F'); + private static UnicodeRange _u0840; + + /// + /// A corresponding to the 'Syriac Supplement' Unicode block (U+0860..U+086F). + /// + /// + /// See http://www.unicode.org/charts/PDF/U0860.pdf for the full set of characters in this block. + /// + public static UnicodeRange SyriacSupplement => _u0860 ?? CreateRange(ref _u0860, first: '\u0860', last: '\u086F'); + private static UnicodeRange _u0860; /// /// A corresponding to the 'Arabic Extended-A' Unicode block (U+08A0..U+08FF). @@ -186,8 +195,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/U08A0.pdf for the full set of characters in this block. /// - public static UnicodeRange ArabicExtendedA { get { return _arabicExtendedA ?? CreateRange(ref _arabicExtendedA, first: '\u08A0', last: '\u08FF'); } } - private static UnicodeRange _arabicExtendedA; + public static UnicodeRange ArabicExtendedA => _u08A0 ?? CreateRange(ref _u08A0, first: '\u08A0', last: '\u08FF'); + private static UnicodeRange _u08A0; /// /// A corresponding to the 'Devanagari' Unicode block (U+0900..U+097F). @@ -195,8 +204,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/U0900.pdf for the full set of characters in this block. /// - public static UnicodeRange Devanagari { get { return _devanagari ?? CreateRange(ref _devanagari, first: '\u0900', last: '\u097F'); } } - private static UnicodeRange _devanagari; + public static UnicodeRange Devanagari => _u0900 ?? CreateRange(ref _u0900, first: '\u0900', last: '\u097F'); + private static UnicodeRange _u0900; /// /// A corresponding to the 'Bengali' Unicode block (U+0980..U+09FF). @@ -204,8 +213,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/U0980.pdf for the full set of characters in this block. /// - public static UnicodeRange Bengali { get { return _bengali ?? CreateRange(ref _bengali, first: '\u0980', last: '\u09FF'); } } - private static UnicodeRange _bengali; + public static UnicodeRange Bengali => _u0980 ?? CreateRange(ref _u0980, first: '\u0980', last: '\u09FF'); + private static UnicodeRange _u0980; /// /// A corresponding to the 'Gurmukhi' Unicode block (U+0A00..U+0A7F). @@ -213,8 +222,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/U0A00.pdf for the full set of characters in this block. /// - public static UnicodeRange Gurmukhi { get { return _gurmukhi ?? CreateRange(ref _gurmukhi, first: '\u0A00', last: '\u0A7F'); } } - private static UnicodeRange _gurmukhi; + public static UnicodeRange Gurmukhi => _u0A00 ?? CreateRange(ref _u0A00, first: '\u0A00', last: '\u0A7F'); + private static UnicodeRange _u0A00; /// /// A corresponding to the 'Gujarati' Unicode block (U+0A80..U+0AFF). @@ -222,8 +231,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/U0A80.pdf for the full set of characters in this block. /// - public static UnicodeRange Gujarati { get { return _gujarati ?? CreateRange(ref _gujarati, first: '\u0A80', last: '\u0AFF'); } } - private static UnicodeRange _gujarati; + public static UnicodeRange Gujarati => _u0A80 ?? CreateRange(ref _u0A80, first: '\u0A80', last: '\u0AFF'); + private static UnicodeRange _u0A80; /// /// A corresponding to the 'Oriya' Unicode block (U+0B00..U+0B7F). @@ -231,8 +240,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/U0B00.pdf for the full set of characters in this block. /// - public static UnicodeRange Oriya { get { return _oriya ?? CreateRange(ref _oriya, first: '\u0B00', last: '\u0B7F'); } } - private static UnicodeRange _oriya; + public static UnicodeRange Oriya => _u0B00 ?? CreateRange(ref _u0B00, first: '\u0B00', last: '\u0B7F'); + private static UnicodeRange _u0B00; /// /// A corresponding to the 'Tamil' Unicode block (U+0B80..U+0BFF). @@ -240,8 +249,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/U0B80.pdf for the full set of characters in this block. /// - public static UnicodeRange Tamil { get { return _tamil ?? CreateRange(ref _tamil, first: '\u0B80', last: '\u0BFF'); } } - private static UnicodeRange _tamil; + public static UnicodeRange Tamil => _u0B80 ?? CreateRange(ref _u0B80, first: '\u0B80', last: '\u0BFF'); + private static UnicodeRange _u0B80; /// /// A corresponding to the 'Telugu' Unicode block (U+0C00..U+0C7F). @@ -249,8 +258,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/U0C00.pdf for the full set of characters in this block. /// - public static UnicodeRange Telugu { get { return _telugu ?? CreateRange(ref _telugu, first: '\u0C00', last: '\u0C7F'); } } - private static UnicodeRange _telugu; + public static UnicodeRange Telugu => _u0C00 ?? CreateRange(ref _u0C00, first: '\u0C00', last: '\u0C7F'); + private static UnicodeRange _u0C00; /// /// A corresponding to the 'Kannada' Unicode block (U+0C80..U+0CFF). @@ -258,8 +267,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/U0C80.pdf for the full set of characters in this block. /// - public static UnicodeRange Kannada { get { return _kannada ?? CreateRange(ref _kannada, first: '\u0C80', last: '\u0CFF'); } } - private static UnicodeRange _kannada; + public static UnicodeRange Kannada => _u0C80 ?? CreateRange(ref _u0C80, first: '\u0C80', last: '\u0CFF'); + private static UnicodeRange _u0C80; /// /// A corresponding to the 'Malayalam' Unicode block (U+0D00..U+0D7F). @@ -267,8 +276,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/U0D00.pdf for the full set of characters in this block. /// - public static UnicodeRange Malayalam { get { return _malayalam ?? CreateRange(ref _malayalam, first: '\u0D00', last: '\u0D7F'); } } - private static UnicodeRange _malayalam; + public static UnicodeRange Malayalam => _u0D00 ?? CreateRange(ref _u0D00, first: '\u0D00', last: '\u0D7F'); + private static UnicodeRange _u0D00; /// /// A corresponding to the 'Sinhala' Unicode block (U+0D80..U+0DFF). @@ -276,8 +285,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/U0D80.pdf for the full set of characters in this block. /// - public static UnicodeRange Sinhala { get { return _sinhala ?? CreateRange(ref _sinhala, first: '\u0D80', last: '\u0DFF'); } } - private static UnicodeRange _sinhala; + public static UnicodeRange Sinhala => _u0D80 ?? CreateRange(ref _u0D80, first: '\u0D80', last: '\u0DFF'); + private static UnicodeRange _u0D80; /// /// A corresponding to the 'Thai' Unicode block (U+0E00..U+0E7F). @@ -285,8 +294,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/U0E00.pdf for the full set of characters in this block. /// - public static UnicodeRange Thai { get { return _thai ?? CreateRange(ref _thai, first: '\u0E00', last: '\u0E7F'); } } - private static UnicodeRange _thai; + public static UnicodeRange Thai => _u0E00 ?? CreateRange(ref _u0E00, first: '\u0E00', last: '\u0E7F'); + private static UnicodeRange _u0E00; /// /// A corresponding to the 'Lao' Unicode block (U+0E80..U+0EFF). @@ -294,8 +303,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/U0E80.pdf for the full set of characters in this block. /// - public static UnicodeRange Lao { get { return _lao ?? CreateRange(ref _lao, first: '\u0E80', last: '\u0EFF'); } } - private static UnicodeRange _lao; + public static UnicodeRange Lao => _u0E80 ?? CreateRange(ref _u0E80, first: '\u0E80', last: '\u0EFF'); + private static UnicodeRange _u0E80; /// /// A corresponding to the 'Tibetan' Unicode block (U+0F00..U+0FFF). @@ -303,8 +312,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/U0F00.pdf for the full set of characters in this block. /// - public static UnicodeRange Tibetan { get { return _tibetan ?? CreateRange(ref _tibetan, first: '\u0F00', last: '\u0FFF'); } } - private static UnicodeRange _tibetan; + public static UnicodeRange Tibetan => _u0F00 ?? CreateRange(ref _u0F00, first: '\u0F00', last: '\u0FFF'); + private static UnicodeRange _u0F00; /// /// A corresponding to the 'Myanmar' Unicode block (U+1000..U+109F). @@ -312,8 +321,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/U1000.pdf for the full set of characters in this block. /// - public static UnicodeRange Myanmar { get { return _myanmar ?? CreateRange(ref _myanmar, first: '\u1000', last: '\u109F'); } } - private static UnicodeRange _myanmar; + public static UnicodeRange Myanmar => _u1000 ?? CreateRange(ref _u1000, first: '\u1000', last: '\u109F'); + private static UnicodeRange _u1000; /// /// A corresponding to the 'Georgian' Unicode block (U+10A0..U+10FF). @@ -321,8 +330,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/U10A0.pdf for the full set of characters in this block. /// - public static UnicodeRange Georgian { get { return _georgian ?? CreateRange(ref _georgian, first: '\u10A0', last: '\u10FF'); } } - private static UnicodeRange _georgian; + public static UnicodeRange Georgian => _u10A0 ?? CreateRange(ref _u10A0, first: '\u10A0', last: '\u10FF'); + private static UnicodeRange _u10A0; /// /// A corresponding to the 'Hangul Jamo' Unicode block (U+1100..U+11FF). @@ -330,8 +339,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/U1100.pdf for the full set of characters in this block. /// - public static UnicodeRange HangulJamo { get { return _hangulJamo ?? CreateRange(ref _hangulJamo, first: '\u1100', last: '\u11FF'); } } - private static UnicodeRange _hangulJamo; + public static UnicodeRange HangulJamo => _u1100 ?? CreateRange(ref _u1100, first: '\u1100', last: '\u11FF'); + private static UnicodeRange _u1100; /// /// A corresponding to the 'Ethiopic' Unicode block (U+1200..U+137F). @@ -339,8 +348,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/U1200.pdf for the full set of characters in this block. /// - public static UnicodeRange Ethiopic { get { return _ethiopic ?? CreateRange(ref _ethiopic, first: '\u1200', last: '\u137F'); } } - private static UnicodeRange _ethiopic; + public static UnicodeRange Ethiopic => _u1200 ?? CreateRange(ref _u1200, first: '\u1200', last: '\u137F'); + private static UnicodeRange _u1200; /// /// A corresponding to the 'Ethiopic Supplement' Unicode block (U+1380..U+139F). @@ -348,8 +357,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/U1380.pdf for the full set of characters in this block. /// - public static UnicodeRange EthiopicSupplement { get { return _ethiopicSupplement ?? CreateRange(ref _ethiopicSupplement, first: '\u1380', last: '\u139F'); } } - private static UnicodeRange _ethiopicSupplement; + public static UnicodeRange EthiopicSupplement => _u1380 ?? CreateRange(ref _u1380, first: '\u1380', last: '\u139F'); + private static UnicodeRange _u1380; /// /// A corresponding to the 'Cherokee' Unicode block (U+13A0..U+13FF). @@ -357,8 +366,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/U13A0.pdf for the full set of characters in this block. /// - public static UnicodeRange Cherokee { get { return _cherokee ?? CreateRange(ref _cherokee, first: '\u13A0', last: '\u13FF'); } } - private static UnicodeRange _cherokee; + public static UnicodeRange Cherokee => _u13A0 ?? CreateRange(ref _u13A0, first: '\u13A0', last: '\u13FF'); + private static UnicodeRange _u13A0; /// /// A corresponding to the 'Unified Canadian Aboriginal Syllabics' Unicode block (U+1400..U+167F). @@ -366,8 +375,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/U1400.pdf for the full set of characters in this block. /// - public static UnicodeRange UnifiedCanadianAboriginalSyllabics { get { return _unifiedCanadianAboriginalSyllabics ?? CreateRange(ref _unifiedCanadianAboriginalSyllabics, first: '\u1400', last: '\u167F'); } } - private static UnicodeRange _unifiedCanadianAboriginalSyllabics; + public static UnicodeRange UnifiedCanadianAboriginalSyllabics => _u1400 ?? CreateRange(ref _u1400, first: '\u1400', last: '\u167F'); + private static UnicodeRange _u1400; /// /// A corresponding to the 'Ogham' Unicode block (U+1680..U+169F). @@ -375,8 +384,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/U1680.pdf for the full set of characters in this block. /// - public static UnicodeRange Ogham { get { return _ogham ?? CreateRange(ref _ogham, first: '\u1680', last: '\u169F'); } } - private static UnicodeRange _ogham; + public static UnicodeRange Ogham => _u1680 ?? CreateRange(ref _u1680, first: '\u1680', last: '\u169F'); + private static UnicodeRange _u1680; /// /// A corresponding to the 'Runic' Unicode block (U+16A0..U+16FF). @@ -384,8 +393,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/U16A0.pdf for the full set of characters in this block. /// - public static UnicodeRange Runic { get { return _runic ?? CreateRange(ref _runic, first: '\u16A0', last: '\u16FF'); } } - private static UnicodeRange _runic; + public static UnicodeRange Runic => _u16A0 ?? CreateRange(ref _u16A0, first: '\u16A0', last: '\u16FF'); + private static UnicodeRange _u16A0; /// /// A corresponding to the 'Tagalog' Unicode block (U+1700..U+171F). @@ -393,8 +402,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/U1700.pdf for the full set of characters in this block. /// - public static UnicodeRange Tagalog { get { return _tagalog ?? CreateRange(ref _tagalog, first: '\u1700', last: '\u171F'); } } - private static UnicodeRange _tagalog; + public static UnicodeRange Tagalog => _u1700 ?? CreateRange(ref _u1700, first: '\u1700', last: '\u171F'); + private static UnicodeRange _u1700; /// /// A corresponding to the 'Hanunoo' Unicode block (U+1720..U+173F). @@ -402,8 +411,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/U1720.pdf for the full set of characters in this block. /// - public static UnicodeRange Hanunoo { get { return _hanunoo ?? CreateRange(ref _hanunoo, first: '\u1720', last: '\u173F'); } } - private static UnicodeRange _hanunoo; + public static UnicodeRange Hanunoo => _u1720 ?? CreateRange(ref _u1720, first: '\u1720', last: '\u173F'); + private static UnicodeRange _u1720; /// /// A corresponding to the 'Buhid' Unicode block (U+1740..U+175F). @@ -411,8 +420,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/U1740.pdf for the full set of characters in this block. /// - public static UnicodeRange Buhid { get { return _buhid ?? CreateRange(ref _buhid, first: '\u1740', last: '\u175F'); } } - private static UnicodeRange _buhid; + public static UnicodeRange Buhid => _u1740 ?? CreateRange(ref _u1740, first: '\u1740', last: '\u175F'); + private static UnicodeRange _u1740; /// /// A corresponding to the 'Tagbanwa' Unicode block (U+1760..U+177F). @@ -420,8 +429,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/U1760.pdf for the full set of characters in this block. /// - public static UnicodeRange Tagbanwa { get { return _tagbanwa ?? CreateRange(ref _tagbanwa, first: '\u1760', last: '\u177F'); } } - private static UnicodeRange _tagbanwa; + public static UnicodeRange Tagbanwa => _u1760 ?? CreateRange(ref _u1760, first: '\u1760', last: '\u177F'); + private static UnicodeRange _u1760; /// /// A corresponding to the 'Khmer' Unicode block (U+1780..U+17FF). @@ -429,8 +438,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/U1780.pdf for the full set of characters in this block. /// - public static UnicodeRange Khmer { get { return _khmer ?? CreateRange(ref _khmer, first: '\u1780', last: '\u17FF'); } } - private static UnicodeRange _khmer; + public static UnicodeRange Khmer => _u1780 ?? CreateRange(ref _u1780, first: '\u1780', last: '\u17FF'); + private static UnicodeRange _u1780; /// /// A corresponding to the 'Mongolian' Unicode block (U+1800..U+18AF). @@ -438,8 +447,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/U1800.pdf for the full set of characters in this block. /// - public static UnicodeRange Mongolian { get { return _mongolian ?? CreateRange(ref _mongolian, first: '\u1800', last: '\u18AF'); } } - private static UnicodeRange _mongolian; + public static UnicodeRange Mongolian => _u1800 ?? CreateRange(ref _u1800, first: '\u1800', last: '\u18AF'); + private static UnicodeRange _u1800; /// /// A corresponding to the 'Unified Canadian Aboriginal Syllabics Extended' Unicode block (U+18B0..U+18FF). @@ -447,8 +456,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/U18B0.pdf for the full set of characters in this block. /// - public static UnicodeRange UnifiedCanadianAboriginalSyllabicsExtended { get { return _unifiedCanadianAboriginalSyllabicsExtended ?? CreateRange(ref _unifiedCanadianAboriginalSyllabicsExtended, first: '\u18B0', last: '\u18FF'); } } - private static UnicodeRange _unifiedCanadianAboriginalSyllabicsExtended; + public static UnicodeRange UnifiedCanadianAboriginalSyllabicsExtended => _u18B0 ?? CreateRange(ref _u18B0, first: '\u18B0', last: '\u18FF'); + private static UnicodeRange _u18B0; /// /// A corresponding to the 'Limbu' Unicode block (U+1900..U+194F). @@ -456,8 +465,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/U1900.pdf for the full set of characters in this block. /// - public static UnicodeRange Limbu { get { return _limbu ?? CreateRange(ref _limbu, first: '\u1900', last: '\u194F'); } } - private static UnicodeRange _limbu; + public static UnicodeRange Limbu => _u1900 ?? CreateRange(ref _u1900, first: '\u1900', last: '\u194F'); + private static UnicodeRange _u1900; /// /// A corresponding to the 'Tai Le' Unicode block (U+1950..U+197F). @@ -465,8 +474,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/U1950.pdf for the full set of characters in this block. /// - public static UnicodeRange TaiLe { get { return _taiLe ?? CreateRange(ref _taiLe, first: '\u1950', last: '\u197F'); } } - private static UnicodeRange _taiLe; + public static UnicodeRange TaiLe => _u1950 ?? CreateRange(ref _u1950, first: '\u1950', last: '\u197F'); + private static UnicodeRange _u1950; /// /// A corresponding to the 'New Tai Lue' Unicode block (U+1980..U+19DF). @@ -474,8 +483,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/U1980.pdf for the full set of characters in this block. /// - public static UnicodeRange NewTaiLue { get { return _newTaiLue ?? CreateRange(ref _newTaiLue, first: '\u1980', last: '\u19DF'); } } - private static UnicodeRange _newTaiLue; + public static UnicodeRange NewTaiLue => _u1980 ?? CreateRange(ref _u1980, first: '\u1980', last: '\u19DF'); + private static UnicodeRange _u1980; /// /// A corresponding to the 'Khmer Symbols' Unicode block (U+19E0..U+19FF). @@ -483,8 +492,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/U19E0.pdf for the full set of characters in this block. /// - public static UnicodeRange KhmerSymbols { get { return _khmerSymbols ?? CreateRange(ref _khmerSymbols, first: '\u19E0', last: '\u19FF'); } } - private static UnicodeRange _khmerSymbols; + public static UnicodeRange KhmerSymbols => _u19E0 ?? CreateRange(ref _u19E0, first: '\u19E0', last: '\u19FF'); + private static UnicodeRange _u19E0; /// /// A corresponding to the 'Buginese' Unicode block (U+1A00..U+1A1F). @@ -492,8 +501,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/U1A00.pdf for the full set of characters in this block. /// - public static UnicodeRange Buginese { get { return _buginese ?? CreateRange(ref _buginese, first: '\u1A00', last: '\u1A1F'); } } - private static UnicodeRange _buginese; + public static UnicodeRange Buginese => _u1A00 ?? CreateRange(ref _u1A00, first: '\u1A00', last: '\u1A1F'); + private static UnicodeRange _u1A00; /// /// A corresponding to the 'Tai Tham' Unicode block (U+1A20..U+1AAF). @@ -501,8 +510,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/U1A20.pdf for the full set of characters in this block. /// - public static UnicodeRange TaiTham { get { return _taiTham ?? CreateRange(ref _taiTham, first: '\u1A20', last: '\u1AAF'); } } - private static UnicodeRange _taiTham; + public static UnicodeRange TaiTham => _u1A20 ?? CreateRange(ref _u1A20, first: '\u1A20', last: '\u1AAF'); + private static UnicodeRange _u1A20; /// /// A corresponding to the 'Combining Diacritical Marks Extended' Unicode block (U+1AB0..U+1AFF). @@ -510,8 +519,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/U1AB0.pdf for the full set of characters in this block. /// - public static UnicodeRange CombiningDiacriticalMarksExtended { get { return _combiningDiacriticalMarksExtended ?? CreateRange(ref _combiningDiacriticalMarksExtended, first: '\u1AB0', last: '\u1AFF'); } } - private static UnicodeRange _combiningDiacriticalMarksExtended; + public static UnicodeRange CombiningDiacriticalMarksExtended => _u1AB0 ?? CreateRange(ref _u1AB0, first: '\u1AB0', last: '\u1AFF'); + private static UnicodeRange _u1AB0; /// /// A corresponding to the 'Balinese' Unicode block (U+1B00..U+1B7F). @@ -519,8 +528,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/U1B00.pdf for the full set of characters in this block. /// - public static UnicodeRange Balinese { get { return _balinese ?? CreateRange(ref _balinese, first: '\u1B00', last: '\u1B7F'); } } - private static UnicodeRange _balinese; + public static UnicodeRange Balinese => _u1B00 ?? CreateRange(ref _u1B00, first: '\u1B00', last: '\u1B7F'); + private static UnicodeRange _u1B00; /// /// A corresponding to the 'Sundanese' Unicode block (U+1B80..U+1BBF). @@ -528,8 +537,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/U1B80.pdf for the full set of characters in this block. /// - public static UnicodeRange Sundanese { get { return _sundanese ?? CreateRange(ref _sundanese, first: '\u1B80', last: '\u1BBF'); } } - private static UnicodeRange _sundanese; + public static UnicodeRange Sundanese => _u1B80 ?? CreateRange(ref _u1B80, first: '\u1B80', last: '\u1BBF'); + private static UnicodeRange _u1B80; /// /// A corresponding to the 'Batak' Unicode block (U+1BC0..U+1BFF). @@ -537,8 +546,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/U1BC0.pdf for the full set of characters in this block. /// - public static UnicodeRange Batak { get { return _batak ?? CreateRange(ref _batak, first: '\u1BC0', last: '\u1BFF'); } } - private static UnicodeRange _batak; + public static UnicodeRange Batak => _u1BC0 ?? CreateRange(ref _u1BC0, first: '\u1BC0', last: '\u1BFF'); + private static UnicodeRange _u1BC0; /// /// A corresponding to the 'Lepcha' Unicode block (U+1C00..U+1C4F). @@ -546,8 +555,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/U1C00.pdf for the full set of characters in this block. /// - public static UnicodeRange Lepcha { get { return _lepcha ?? CreateRange(ref _lepcha, first: '\u1C00', last: '\u1C4F'); } } - private static UnicodeRange _lepcha; + public static UnicodeRange Lepcha => _u1C00 ?? CreateRange(ref _u1C00, first: '\u1C00', last: '\u1C4F'); + private static UnicodeRange _u1C00; /// /// A corresponding to the 'Ol Chiki' Unicode block (U+1C50..U+1C7F). @@ -555,8 +564,26 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/U1C50.pdf for the full set of characters in this block. /// - public static UnicodeRange OlChiki { get { return _olChiki ?? CreateRange(ref _olChiki, first: '\u1C50', last: '\u1C7F'); } } - private static UnicodeRange _olChiki; + public static UnicodeRange OlChiki => _u1C50 ?? CreateRange(ref _u1C50, first: '\u1C50', last: '\u1C7F'); + private static UnicodeRange _u1C50; + + /// + /// A corresponding to the 'Cyrillic Extended-C' Unicode block (U+1C80..U+1C8F). + /// + /// + /// See http://www.unicode.org/charts/PDF/U1C80.pdf for the full set of characters in this block. + /// + public static UnicodeRange CyrillicExtendedC => _u1C80 ?? CreateRange(ref _u1C80, first: '\u1C80', last: '\u1C8F'); + private static UnicodeRange _u1C80; + + /// + /// A corresponding to the 'Georgian Extended' Unicode block (U+1C90..U+1CBF). + /// + /// + /// See http://www.unicode.org/charts/PDF/U1C90.pdf for the full set of characters in this block. + /// + public static UnicodeRange GeorgianExtended => _u1C90 ?? CreateRange(ref _u1C90, first: '\u1C90', last: '\u1CBF'); + private static UnicodeRange _u1C90; /// /// A corresponding to the 'Sundanese Supplement' Unicode block (U+1CC0..U+1CCF). @@ -564,8 +591,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/U1CC0.pdf for the full set of characters in this block. /// - public static UnicodeRange SundaneseSupplement { get { return _sundaneseSupplement ?? CreateRange(ref _sundaneseSupplement, first: '\u1CC0', last: '\u1CCF'); } } - private static UnicodeRange _sundaneseSupplement; + public static UnicodeRange SundaneseSupplement => _u1CC0 ?? CreateRange(ref _u1CC0, first: '\u1CC0', last: '\u1CCF'); + private static UnicodeRange _u1CC0; /// /// A corresponding to the 'Vedic Extensions' Unicode block (U+1CD0..U+1CFF). @@ -573,8 +600,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/U1CD0.pdf for the full set of characters in this block. /// - public static UnicodeRange VedicExtensions { get { return _vedicExtensions ?? CreateRange(ref _vedicExtensions, first: '\u1CD0', last: '\u1CFF'); } } - private static UnicodeRange _vedicExtensions; + public static UnicodeRange VedicExtensions => _u1CD0 ?? CreateRange(ref _u1CD0, first: '\u1CD0', last: '\u1CFF'); + private static UnicodeRange _u1CD0; /// /// A corresponding to the 'Phonetic Extensions' Unicode block (U+1D00..U+1D7F). @@ -582,8 +609,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/U1D00.pdf for the full set of characters in this block. /// - public static UnicodeRange PhoneticExtensions { get { return _phoneticExtensions ?? CreateRange(ref _phoneticExtensions, first: '\u1D00', last: '\u1D7F'); } } - private static UnicodeRange _phoneticExtensions; + public static UnicodeRange PhoneticExtensions => _u1D00 ?? CreateRange(ref _u1D00, first: '\u1D00', last: '\u1D7F'); + private static UnicodeRange _u1D00; /// /// A corresponding to the 'Phonetic Extensions Supplement' Unicode block (U+1D80..U+1DBF). @@ -591,8 +618,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/U1D80.pdf for the full set of characters in this block. /// - public static UnicodeRange PhoneticExtensionsSupplement { get { return _phoneticExtensionsSupplement ?? CreateRange(ref _phoneticExtensionsSupplement, first: '\u1D80', last: '\u1DBF'); } } - private static UnicodeRange _phoneticExtensionsSupplement; + public static UnicodeRange PhoneticExtensionsSupplement => _u1D80 ?? CreateRange(ref _u1D80, first: '\u1D80', last: '\u1DBF'); + private static UnicodeRange _u1D80; /// /// A corresponding to the 'Combining Diacritical Marks Supplement' Unicode block (U+1DC0..U+1DFF). @@ -600,8 +627,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/U1DC0.pdf for the full set of characters in this block. /// - public static UnicodeRange CombiningDiacriticalMarksSupplement { get { return _combiningDiacriticalMarksSupplement ?? CreateRange(ref _combiningDiacriticalMarksSupplement, first: '\u1DC0', last: '\u1DFF'); } } - private static UnicodeRange _combiningDiacriticalMarksSupplement; + public static UnicodeRange CombiningDiacriticalMarksSupplement => _u1DC0 ?? CreateRange(ref _u1DC0, first: '\u1DC0', last: '\u1DFF'); + private static UnicodeRange _u1DC0; /// /// A corresponding to the 'Latin Extended Additional' Unicode block (U+1E00..U+1EFF). @@ -609,8 +636,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/U1E00.pdf for the full set of characters in this block. /// - public static UnicodeRange LatinExtendedAdditional { get { return _latinExtendedAdditional ?? CreateRange(ref _latinExtendedAdditional, first: '\u1E00', last: '\u1EFF'); } } - private static UnicodeRange _latinExtendedAdditional; + public static UnicodeRange LatinExtendedAdditional => _u1E00 ?? CreateRange(ref _u1E00, first: '\u1E00', last: '\u1EFF'); + private static UnicodeRange _u1E00; /// /// A corresponding to the 'Greek Extended' Unicode block (U+1F00..U+1FFF). @@ -618,8 +645,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/U1F00.pdf for the full set of characters in this block. /// - public static UnicodeRange GreekExtended { get { return _greekExtended ?? CreateRange(ref _greekExtended, first: '\u1F00', last: '\u1FFF'); } } - private static UnicodeRange _greekExtended; + public static UnicodeRange GreekExtended => _u1F00 ?? CreateRange(ref _u1F00, first: '\u1F00', last: '\u1FFF'); + private static UnicodeRange _u1F00; /// /// A corresponding to the 'General Punctuation' Unicode block (U+2000..U+206F). @@ -627,8 +654,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/U2000.pdf for the full set of characters in this block. /// - public static UnicodeRange GeneralPunctuation { get { return _generalPunctuation ?? CreateRange(ref _generalPunctuation, first: '\u2000', last: '\u206F'); } } - private static UnicodeRange _generalPunctuation; + public static UnicodeRange GeneralPunctuation => _u2000 ?? CreateRange(ref _u2000, first: '\u2000', last: '\u206F'); + private static UnicodeRange _u2000; /// /// A corresponding to the 'Superscripts and Subscripts' Unicode block (U+2070..U+209F). @@ -636,8 +663,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/U2070.pdf for the full set of characters in this block. /// - public static UnicodeRange SuperscriptsandSubscripts { get { return _superscriptsandSubscripts ?? CreateRange(ref _superscriptsandSubscripts, first: '\u2070', last: '\u209F'); } } - private static UnicodeRange _superscriptsandSubscripts; + public static UnicodeRange SuperscriptsandSubscripts => _u2070 ?? CreateRange(ref _u2070, first: '\u2070', last: '\u209F'); + private static UnicodeRange _u2070; /// /// A corresponding to the 'Currency Symbols' Unicode block (U+20A0..U+20CF). @@ -645,8 +672,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/U20A0.pdf for the full set of characters in this block. /// - public static UnicodeRange CurrencySymbols { get { return _currencySymbols ?? CreateRange(ref _currencySymbols, first: '\u20A0', last: '\u20CF'); } } - private static UnicodeRange _currencySymbols; + public static UnicodeRange CurrencySymbols => _u20A0 ?? CreateRange(ref _u20A0, first: '\u20A0', last: '\u20CF'); + private static UnicodeRange _u20A0; /// /// A corresponding to the 'Combining Diacritical Marks for Symbols' Unicode block (U+20D0..U+20FF). @@ -654,8 +681,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/U20D0.pdf for the full set of characters in this block. /// - public static UnicodeRange CombiningDiacriticalMarksforSymbols { get { return _combiningDiacriticalMarksforSymbols ?? CreateRange(ref _combiningDiacriticalMarksforSymbols, first: '\u20D0', last: '\u20FF'); } } - private static UnicodeRange _combiningDiacriticalMarksforSymbols; + public static UnicodeRange CombiningDiacriticalMarksforSymbols => _u20D0 ?? CreateRange(ref _u20D0, first: '\u20D0', last: '\u20FF'); + private static UnicodeRange _u20D0; /// /// A corresponding to the 'Letterlike Symbols' Unicode block (U+2100..U+214F). @@ -663,8 +690,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/U2100.pdf for the full set of characters in this block. /// - public static UnicodeRange LetterlikeSymbols { get { return _letterlikeSymbols ?? CreateRange(ref _letterlikeSymbols, first: '\u2100', last: '\u214F'); } } - private static UnicodeRange _letterlikeSymbols; + public static UnicodeRange LetterlikeSymbols => _u2100 ?? CreateRange(ref _u2100, first: '\u2100', last: '\u214F'); + private static UnicodeRange _u2100; /// /// A corresponding to the 'Number Forms' Unicode block (U+2150..U+218F). @@ -672,8 +699,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/U2150.pdf for the full set of characters in this block. /// - public static UnicodeRange NumberForms { get { return _numberForms ?? CreateRange(ref _numberForms, first: '\u2150', last: '\u218F'); } } - private static UnicodeRange _numberForms; + public static UnicodeRange NumberForms => _u2150 ?? CreateRange(ref _u2150, first: '\u2150', last: '\u218F'); + private static UnicodeRange _u2150; /// /// A corresponding to the 'Arrows' Unicode block (U+2190..U+21FF). @@ -681,8 +708,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/U2190.pdf for the full set of characters in this block. /// - public static UnicodeRange Arrows { get { return _arrows ?? CreateRange(ref _arrows, first: '\u2190', last: '\u21FF'); } } - private static UnicodeRange _arrows; + public static UnicodeRange Arrows => _u2190 ?? CreateRange(ref _u2190, first: '\u2190', last: '\u21FF'); + private static UnicodeRange _u2190; /// /// A corresponding to the 'Mathematical Operators' Unicode block (U+2200..U+22FF). @@ -690,8 +717,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/U2200.pdf for the full set of characters in this block. /// - public static UnicodeRange MathematicalOperators { get { return _mathematicalOperators ?? CreateRange(ref _mathematicalOperators, first: '\u2200', last: '\u22FF'); } } - private static UnicodeRange _mathematicalOperators; + public static UnicodeRange MathematicalOperators => _u2200 ?? CreateRange(ref _u2200, first: '\u2200', last: '\u22FF'); + private static UnicodeRange _u2200; /// /// A corresponding to the 'Miscellaneous Technical' Unicode block (U+2300..U+23FF). @@ -699,8 +726,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/U2300.pdf for the full set of characters in this block. /// - public static UnicodeRange MiscellaneousTechnical { get { return _miscellaneousTechnical ?? CreateRange(ref _miscellaneousTechnical, first: '\u2300', last: '\u23FF'); } } - private static UnicodeRange _miscellaneousTechnical; + public static UnicodeRange MiscellaneousTechnical => _u2300 ?? CreateRange(ref _u2300, first: '\u2300', last: '\u23FF'); + private static UnicodeRange _u2300; /// /// A corresponding to the 'Control Pictures' Unicode block (U+2400..U+243F). @@ -708,8 +735,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/U2400.pdf for the full set of characters in this block. /// - public static UnicodeRange ControlPictures { get { return _controlPictures ?? CreateRange(ref _controlPictures, first: '\u2400', last: '\u243F'); } } - private static UnicodeRange _controlPictures; + public static UnicodeRange ControlPictures => _u2400 ?? CreateRange(ref _u2400, first: '\u2400', last: '\u243F'); + private static UnicodeRange _u2400; /// /// A corresponding to the 'Optical Character Recognition' Unicode block (U+2440..U+245F). @@ -717,8 +744,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/U2440.pdf for the full set of characters in this block. /// - public static UnicodeRange OpticalCharacterRecognition { get { return _opticalCharacterRecognition ?? CreateRange(ref _opticalCharacterRecognition, first: '\u2440', last: '\u245F'); } } - private static UnicodeRange _opticalCharacterRecognition; + public static UnicodeRange OpticalCharacterRecognition => _u2440 ?? CreateRange(ref _u2440, first: '\u2440', last: '\u245F'); + private static UnicodeRange _u2440; /// /// A corresponding to the 'Enclosed Alphanumerics' Unicode block (U+2460..U+24FF). @@ -726,8 +753,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/U2460.pdf for the full set of characters in this block. /// - public static UnicodeRange EnclosedAlphanumerics { get { return _enclosedAlphanumerics ?? CreateRange(ref _enclosedAlphanumerics, first: '\u2460', last: '\u24FF'); } } - private static UnicodeRange _enclosedAlphanumerics; + public static UnicodeRange EnclosedAlphanumerics => _u2460 ?? CreateRange(ref _u2460, first: '\u2460', last: '\u24FF'); + private static UnicodeRange _u2460; /// /// A corresponding to the 'Box Drawing' Unicode block (U+2500..U+257F). @@ -735,8 +762,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/U2500.pdf for the full set of characters in this block. /// - public static UnicodeRange BoxDrawing { get { return _boxDrawing ?? CreateRange(ref _boxDrawing, first: '\u2500', last: '\u257F'); } } - private static UnicodeRange _boxDrawing; + public static UnicodeRange BoxDrawing => _u2500 ?? CreateRange(ref _u2500, first: '\u2500', last: '\u257F'); + private static UnicodeRange _u2500; /// /// A corresponding to the 'Block Elements' Unicode block (U+2580..U+259F). @@ -744,8 +771,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/U2580.pdf for the full set of characters in this block. /// - public static UnicodeRange BlockElements { get { return _blockElements ?? CreateRange(ref _blockElements, first: '\u2580', last: '\u259F'); } } - private static UnicodeRange _blockElements; + public static UnicodeRange BlockElements => _u2580 ?? CreateRange(ref _u2580, first: '\u2580', last: '\u259F'); + private static UnicodeRange _u2580; /// /// A corresponding to the 'Geometric Shapes' Unicode block (U+25A0..U+25FF). @@ -753,8 +780,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/U25A0.pdf for the full set of characters in this block. /// - public static UnicodeRange GeometricShapes { get { return _geometricShapes ?? CreateRange(ref _geometricShapes, first: '\u25A0', last: '\u25FF'); } } - private static UnicodeRange _geometricShapes; + public static UnicodeRange GeometricShapes => _u25A0 ?? CreateRange(ref _u25A0, first: '\u25A0', last: '\u25FF'); + private static UnicodeRange _u25A0; /// /// A corresponding to the 'Miscellaneous Symbols' Unicode block (U+2600..U+26FF). @@ -762,8 +789,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/U2600.pdf for the full set of characters in this block. /// - public static UnicodeRange MiscellaneousSymbols { get { return _miscellaneousSymbols ?? CreateRange(ref _miscellaneousSymbols, first: '\u2600', last: '\u26FF'); } } - private static UnicodeRange _miscellaneousSymbols; + public static UnicodeRange MiscellaneousSymbols => _u2600 ?? CreateRange(ref _u2600, first: '\u2600', last: '\u26FF'); + private static UnicodeRange _u2600; /// /// A corresponding to the 'Dingbats' Unicode block (U+2700..U+27BF). @@ -771,8 +798,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/U2700.pdf for the full set of characters in this block. /// - public static UnicodeRange Dingbats { get { return _dingbats ?? CreateRange(ref _dingbats, first: '\u2700', last: '\u27BF'); } } - private static UnicodeRange _dingbats; + public static UnicodeRange Dingbats => _u2700 ?? CreateRange(ref _u2700, first: '\u2700', last: '\u27BF'); + private static UnicodeRange _u2700; /// /// A corresponding to the 'Miscellaneous Mathematical Symbols-A' Unicode block (U+27C0..U+27EF). @@ -780,8 +807,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/U27C0.pdf for the full set of characters in this block. /// - public static UnicodeRange MiscellaneousMathematicalSymbolsA { get { return _miscellaneousMathematicalSymbolsA ?? CreateRange(ref _miscellaneousMathematicalSymbolsA, first: '\u27C0', last: '\u27EF'); } } - private static UnicodeRange _miscellaneousMathematicalSymbolsA; + public static UnicodeRange MiscellaneousMathematicalSymbolsA => _u27C0 ?? CreateRange(ref _u27C0, first: '\u27C0', last: '\u27EF'); + private static UnicodeRange _u27C0; /// /// A corresponding to the 'Supplemental Arrows-A' Unicode block (U+27F0..U+27FF). @@ -789,8 +816,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/U27F0.pdf for the full set of characters in this block. /// - public static UnicodeRange SupplementalArrowsA { get { return _supplementalArrowsA ?? CreateRange(ref _supplementalArrowsA, first: '\u27F0', last: '\u27FF'); } } - private static UnicodeRange _supplementalArrowsA; + public static UnicodeRange SupplementalArrowsA => _u27F0 ?? CreateRange(ref _u27F0, first: '\u27F0', last: '\u27FF'); + private static UnicodeRange _u27F0; /// /// A corresponding to the 'Braille Patterns' Unicode block (U+2800..U+28FF). @@ -798,8 +825,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/U2800.pdf for the full set of characters in this block. /// - public static UnicodeRange BraillePatterns { get { return _braillePatterns ?? CreateRange(ref _braillePatterns, first: '\u2800', last: '\u28FF'); } } - private static UnicodeRange _braillePatterns; + public static UnicodeRange BraillePatterns => _u2800 ?? CreateRange(ref _u2800, first: '\u2800', last: '\u28FF'); + private static UnicodeRange _u2800; /// /// A corresponding to the 'Supplemental Arrows-B' Unicode block (U+2900..U+297F). @@ -807,8 +834,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/U2900.pdf for the full set of characters in this block. /// - public static UnicodeRange SupplementalArrowsB { get { return _supplementalArrowsB ?? CreateRange(ref _supplementalArrowsB, first: '\u2900', last: '\u297F'); } } - private static UnicodeRange _supplementalArrowsB; + public static UnicodeRange SupplementalArrowsB => _u2900 ?? CreateRange(ref _u2900, first: '\u2900', last: '\u297F'); + private static UnicodeRange _u2900; /// /// A corresponding to the 'Miscellaneous Mathematical Symbols-B' Unicode block (U+2980..U+29FF). @@ -816,8 +843,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/U2980.pdf for the full set of characters in this block. /// - public static UnicodeRange MiscellaneousMathematicalSymbolsB { get { return _miscellaneousMathematicalSymbolsB ?? CreateRange(ref _miscellaneousMathematicalSymbolsB, first: '\u2980', last: '\u29FF'); } } - private static UnicodeRange _miscellaneousMathematicalSymbolsB; + public static UnicodeRange MiscellaneousMathematicalSymbolsB => _u2980 ?? CreateRange(ref _u2980, first: '\u2980', last: '\u29FF'); + private static UnicodeRange _u2980; /// /// A corresponding to the 'Supplemental Mathematical Operators' Unicode block (U+2A00..U+2AFF). @@ -825,8 +852,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/U2A00.pdf for the full set of characters in this block. /// - public static UnicodeRange SupplementalMathematicalOperators { get { return _supplementalMathematicalOperators ?? CreateRange(ref _supplementalMathematicalOperators, first: '\u2A00', last: '\u2AFF'); } } - private static UnicodeRange _supplementalMathematicalOperators; + public static UnicodeRange SupplementalMathematicalOperators => _u2A00 ?? CreateRange(ref _u2A00, first: '\u2A00', last: '\u2AFF'); + private static UnicodeRange _u2A00; /// /// A corresponding to the 'Miscellaneous Symbols and Arrows' Unicode block (U+2B00..U+2BFF). @@ -834,8 +861,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/U2B00.pdf for the full set of characters in this block. /// - public static UnicodeRange MiscellaneousSymbolsandArrows { get { return _miscellaneousSymbolsandArrows ?? CreateRange(ref _miscellaneousSymbolsandArrows, first: '\u2B00', last: '\u2BFF'); } } - private static UnicodeRange _miscellaneousSymbolsandArrows; + public static UnicodeRange MiscellaneousSymbolsandArrows => _u2B00 ?? CreateRange(ref _u2B00, first: '\u2B00', last: '\u2BFF'); + private static UnicodeRange _u2B00; /// /// A corresponding to the 'Glagolitic' Unicode block (U+2C00..U+2C5F). @@ -843,8 +870,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/U2C00.pdf for the full set of characters in this block. /// - public static UnicodeRange Glagolitic { get { return _glagolitic ?? CreateRange(ref _glagolitic, first: '\u2C00', last: '\u2C5F'); } } - private static UnicodeRange _glagolitic; + public static UnicodeRange Glagolitic => _u2C00 ?? CreateRange(ref _u2C00, first: '\u2C00', last: '\u2C5F'); + private static UnicodeRange _u2C00; /// /// A corresponding to the 'Latin Extended-C' Unicode block (U+2C60..U+2C7F). @@ -852,8 +879,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/U2C60.pdf for the full set of characters in this block. /// - public static UnicodeRange LatinExtendedC { get { return _latinExtendedC ?? CreateRange(ref _latinExtendedC, first: '\u2C60', last: '\u2C7F'); } } - private static UnicodeRange _latinExtendedC; + public static UnicodeRange LatinExtendedC => _u2C60 ?? CreateRange(ref _u2C60, first: '\u2C60', last: '\u2C7F'); + private static UnicodeRange _u2C60; /// /// A corresponding to the 'Coptic' Unicode block (U+2C80..U+2CFF). @@ -861,8 +888,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/U2C80.pdf for the full set of characters in this block. /// - public static UnicodeRange Coptic { get { return _coptic ?? CreateRange(ref _coptic, first: '\u2C80', last: '\u2CFF'); } } - private static UnicodeRange _coptic; + public static UnicodeRange Coptic => _u2C80 ?? CreateRange(ref _u2C80, first: '\u2C80', last: '\u2CFF'); + private static UnicodeRange _u2C80; /// /// A corresponding to the 'Georgian Supplement' Unicode block (U+2D00..U+2D2F). @@ -870,8 +897,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/U2D00.pdf for the full set of characters in this block. /// - public static UnicodeRange GeorgianSupplement { get { return _georgianSupplement ?? CreateRange(ref _georgianSupplement, first: '\u2D00', last: '\u2D2F'); } } - private static UnicodeRange _georgianSupplement; + public static UnicodeRange GeorgianSupplement => _u2D00 ?? CreateRange(ref _u2D00, first: '\u2D00', last: '\u2D2F'); + private static UnicodeRange _u2D00; /// /// A corresponding to the 'Tifinagh' Unicode block (U+2D30..U+2D7F). @@ -879,8 +906,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/U2D30.pdf for the full set of characters in this block. /// - public static UnicodeRange Tifinagh { get { return _tifinagh ?? CreateRange(ref _tifinagh, first: '\u2D30', last: '\u2D7F'); } } - private static UnicodeRange _tifinagh; + public static UnicodeRange Tifinagh => _u2D30 ?? CreateRange(ref _u2D30, first: '\u2D30', last: '\u2D7F'); + private static UnicodeRange _u2D30; /// /// A corresponding to the 'Ethiopic Extended' Unicode block (U+2D80..U+2DDF). @@ -888,8 +915,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/U2D80.pdf for the full set of characters in this block. /// - public static UnicodeRange EthiopicExtended { get { return _ethiopicExtended ?? CreateRange(ref _ethiopicExtended, first: '\u2D80', last: '\u2DDF'); } } - private static UnicodeRange _ethiopicExtended; + public static UnicodeRange EthiopicExtended => _u2D80 ?? CreateRange(ref _u2D80, first: '\u2D80', last: '\u2DDF'); + private static UnicodeRange _u2D80; /// /// A corresponding to the 'Cyrillic Extended-A' Unicode block (U+2DE0..U+2DFF). @@ -897,8 +924,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/U2DE0.pdf for the full set of characters in this block. /// - public static UnicodeRange CyrillicExtendedA { get { return _cyrillicExtendedA ?? CreateRange(ref _cyrillicExtendedA, first: '\u2DE0', last: '\u2DFF'); } } - private static UnicodeRange _cyrillicExtendedA; + public static UnicodeRange CyrillicExtendedA => _u2DE0 ?? CreateRange(ref _u2DE0, first: '\u2DE0', last: '\u2DFF'); + private static UnicodeRange _u2DE0; /// /// A corresponding to the 'Supplemental Punctuation' Unicode block (U+2E00..U+2E7F). @@ -906,8 +933,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/U2E00.pdf for the full set of characters in this block. /// - public static UnicodeRange SupplementalPunctuation { get { return _supplementalPunctuation ?? CreateRange(ref _supplementalPunctuation, first: '\u2E00', last: '\u2E7F'); } } - private static UnicodeRange _supplementalPunctuation; + public static UnicodeRange SupplementalPunctuation => _u2E00 ?? CreateRange(ref _u2E00, first: '\u2E00', last: '\u2E7F'); + private static UnicodeRange _u2E00; /// /// A corresponding to the 'CJK Radicals Supplement' Unicode block (U+2E80..U+2EFF). @@ -915,8 +942,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/U2E80.pdf for the full set of characters in this block. /// - public static UnicodeRange CjkRadicalsSupplement { get { return _cjkRadicalsSupplement ?? CreateRange(ref _cjkRadicalsSupplement, first: '\u2E80', last: '\u2EFF'); } } - private static UnicodeRange _cjkRadicalsSupplement; + public static UnicodeRange CjkRadicalsSupplement => _u2E80 ?? CreateRange(ref _u2E80, first: '\u2E80', last: '\u2EFF'); + private static UnicodeRange _u2E80; /// /// A corresponding to the 'Kangxi Radicals' Unicode block (U+2F00..U+2FDF). @@ -924,8 +951,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/U2F00.pdf for the full set of characters in this block. /// - public static UnicodeRange KangxiRadicals { get { return _kangxiRadicals ?? CreateRange(ref _kangxiRadicals, first: '\u2F00', last: '\u2FDF'); } } - private static UnicodeRange _kangxiRadicals; + public static UnicodeRange KangxiRadicals => _u2F00 ?? CreateRange(ref _u2F00, first: '\u2F00', last: '\u2FDF'); + private static UnicodeRange _u2F00; /// /// A corresponding to the 'Ideographic Description Characters' Unicode block (U+2FF0..U+2FFF). @@ -933,8 +960,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/U2FF0.pdf for the full set of characters in this block. /// - public static UnicodeRange IdeographicDescriptionCharacters { get { return _ideographicDescriptionCharacters ?? CreateRange(ref _ideographicDescriptionCharacters, first: '\u2FF0', last: '\u2FFF'); } } - private static UnicodeRange _ideographicDescriptionCharacters; + public static UnicodeRange IdeographicDescriptionCharacters => _u2FF0 ?? CreateRange(ref _u2FF0, first: '\u2FF0', last: '\u2FFF'); + private static UnicodeRange _u2FF0; /// /// A corresponding to the 'CJK Symbols and Punctuation' Unicode block (U+3000..U+303F). @@ -942,8 +969,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/U3000.pdf for the full set of characters in this block. /// - public static UnicodeRange CjkSymbolsandPunctuation { get { return _cjkSymbolsandPunctuation ?? CreateRange(ref _cjkSymbolsandPunctuation, first: '\u3000', last: '\u303F'); } } - private static UnicodeRange _cjkSymbolsandPunctuation; + public static UnicodeRange CjkSymbolsandPunctuation => _u3000 ?? CreateRange(ref _u3000, first: '\u3000', last: '\u303F'); + private static UnicodeRange _u3000; /// /// A corresponding to the 'Hiragana' Unicode block (U+3040..U+309F). @@ -951,8 +978,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/U3040.pdf for the full set of characters in this block. /// - public static UnicodeRange Hiragana { get { return _hiragana ?? CreateRange(ref _hiragana, first: '\u3040', last: '\u309F'); } } - private static UnicodeRange _hiragana; + public static UnicodeRange Hiragana => _u3040 ?? CreateRange(ref _u3040, first: '\u3040', last: '\u309F'); + private static UnicodeRange _u3040; /// /// A corresponding to the 'Katakana' Unicode block (U+30A0..U+30FF). @@ -960,8 +987,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/U30A0.pdf for the full set of characters in this block. /// - public static UnicodeRange Katakana { get { return _katakana ?? CreateRange(ref _katakana, first: '\u30A0', last: '\u30FF'); } } - private static UnicodeRange _katakana; + public static UnicodeRange Katakana => _u30A0 ?? CreateRange(ref _u30A0, first: '\u30A0', last: '\u30FF'); + private static UnicodeRange _u30A0; /// /// A corresponding to the 'Bopomofo' Unicode block (U+3100..U+312F). @@ -969,8 +996,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/U3100.pdf for the full set of characters in this block. /// - public static UnicodeRange Bopomofo { get { return _bopomofo ?? CreateRange(ref _bopomofo, first: '\u3100', last: '\u312F'); } } - private static UnicodeRange _bopomofo; + public static UnicodeRange Bopomofo => _u3100 ?? CreateRange(ref _u3100, first: '\u3100', last: '\u312F'); + private static UnicodeRange _u3100; /// /// A corresponding to the 'Hangul Compatibility Jamo' Unicode block (U+3130..U+318F). @@ -978,8 +1005,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/U3130.pdf for the full set of characters in this block. /// - public static UnicodeRange HangulCompatibilityJamo { get { return _hangulCompatibilityJamo ?? CreateRange(ref _hangulCompatibilityJamo, first: '\u3130', last: '\u318F'); } } - private static UnicodeRange _hangulCompatibilityJamo; + public static UnicodeRange HangulCompatibilityJamo => _u3130 ?? CreateRange(ref _u3130, first: '\u3130', last: '\u318F'); + private static UnicodeRange _u3130; /// /// A corresponding to the 'Kanbun' Unicode block (U+3190..U+319F). @@ -987,8 +1014,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/U3190.pdf for the full set of characters in this block. /// - public static UnicodeRange Kanbun { get { return _kanbun ?? CreateRange(ref _kanbun, first: '\u3190', last: '\u319F'); } } - private static UnicodeRange _kanbun; + public static UnicodeRange Kanbun => _u3190 ?? CreateRange(ref _u3190, first: '\u3190', last: '\u319F'); + private static UnicodeRange _u3190; /// /// A corresponding to the 'Bopomofo Extended' Unicode block (U+31A0..U+31BF). @@ -996,8 +1023,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/U31A0.pdf for the full set of characters in this block. /// - public static UnicodeRange BopomofoExtended { get { return _bopomofoExtended ?? CreateRange(ref _bopomofoExtended, first: '\u31A0', last: '\u31BF'); } } - private static UnicodeRange _bopomofoExtended; + public static UnicodeRange BopomofoExtended => _u31A0 ?? CreateRange(ref _u31A0, first: '\u31A0', last: '\u31BF'); + private static UnicodeRange _u31A0; /// /// A corresponding to the 'CJK Strokes' Unicode block (U+31C0..U+31EF). @@ -1005,8 +1032,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/U31C0.pdf for the full set of characters in this block. /// - public static UnicodeRange CjkStrokes { get { return _cjkStrokes ?? CreateRange(ref _cjkStrokes, first: '\u31C0', last: '\u31EF'); } } - private static UnicodeRange _cjkStrokes; + public static UnicodeRange CjkStrokes => _u31C0 ?? CreateRange(ref _u31C0, first: '\u31C0', last: '\u31EF'); + private static UnicodeRange _u31C0; /// /// A corresponding to the 'Katakana Phonetic Extensions' Unicode block (U+31F0..U+31FF). @@ -1014,8 +1041,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/U31F0.pdf for the full set of characters in this block. /// - public static UnicodeRange KatakanaPhoneticExtensions { get { return _katakanaPhoneticExtensions ?? CreateRange(ref _katakanaPhoneticExtensions, first: '\u31F0', last: '\u31FF'); } } - private static UnicodeRange _katakanaPhoneticExtensions; + public static UnicodeRange KatakanaPhoneticExtensions => _u31F0 ?? CreateRange(ref _u31F0, first: '\u31F0', last: '\u31FF'); + private static UnicodeRange _u31F0; /// /// A corresponding to the 'Enclosed CJK Letters and Months' Unicode block (U+3200..U+32FF). @@ -1023,8 +1050,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/U3200.pdf for the full set of characters in this block. /// - public static UnicodeRange EnclosedCjkLettersandMonths { get { return _enclosedCjkLettersandMonths ?? CreateRange(ref _enclosedCjkLettersandMonths, first: '\u3200', last: '\u32FF'); } } - private static UnicodeRange _enclosedCjkLettersandMonths; + public static UnicodeRange EnclosedCjkLettersandMonths => _u3200 ?? CreateRange(ref _u3200, first: '\u3200', last: '\u32FF'); + private static UnicodeRange _u3200; /// /// A corresponding to the 'CJK Compatibility' Unicode block (U+3300..U+33FF). @@ -1032,8 +1059,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/U3300.pdf for the full set of characters in this block. /// - public static UnicodeRange CjkCompatibility { get { return _cjkCompatibility ?? CreateRange(ref _cjkCompatibility, first: '\u3300', last: '\u33FF'); } } - private static UnicodeRange _cjkCompatibility; + public static UnicodeRange CjkCompatibility => _u3300 ?? CreateRange(ref _u3300, first: '\u3300', last: '\u33FF'); + private static UnicodeRange _u3300; /// /// A corresponding to the 'CJK Unified Ideographs Extension A' Unicode block (U+3400..U+4DBF). @@ -1041,8 +1068,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/U3400.pdf for the full set of characters in this block. /// - public static UnicodeRange CjkUnifiedIdeographsExtensionA { get { return _cjkUnifiedIdeographsExtensionA ?? CreateRange(ref _cjkUnifiedIdeographsExtensionA, first: '\u3400', last: '\u4DBF'); } } - private static UnicodeRange _cjkUnifiedIdeographsExtensionA; + public static UnicodeRange CjkUnifiedIdeographsExtensionA => _u3400 ?? CreateRange(ref _u3400, first: '\u3400', last: '\u4DBF'); + private static UnicodeRange _u3400; /// /// A corresponding to the 'Yijing Hexagram Symbols' Unicode block (U+4DC0..U+4DFF). @@ -1050,8 +1077,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/U4DC0.pdf for the full set of characters in this block. /// - public static UnicodeRange YijingHexagramSymbols { get { return _yijingHexagramSymbols ?? CreateRange(ref _yijingHexagramSymbols, first: '\u4DC0', last: '\u4DFF'); } } - private static UnicodeRange _yijingHexagramSymbols; + public static UnicodeRange YijingHexagramSymbols => _u4DC0 ?? CreateRange(ref _u4DC0, first: '\u4DC0', last: '\u4DFF'); + private static UnicodeRange _u4DC0; /// /// A corresponding to the 'CJK Unified Ideographs' Unicode block (U+4E00..U+9FFF). @@ -1059,8 +1086,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/U4E00.pdf for the full set of characters in this block. /// - public static UnicodeRange CjkUnifiedIdeographs { get { return _cjkUnifiedIdeographs ?? CreateRange(ref _cjkUnifiedIdeographs, first: '\u4E00', last: '\u9FFF'); } } - private static UnicodeRange _cjkUnifiedIdeographs; + public static UnicodeRange CjkUnifiedIdeographs => _u4E00 ?? CreateRange(ref _u4E00, first: '\u4E00', last: '\u9FFF'); + private static UnicodeRange _u4E00; /// /// A corresponding to the 'Yi Syllables' Unicode block (U+A000..U+A48F). @@ -1068,8 +1095,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/UA000.pdf for the full set of characters in this block. /// - public static UnicodeRange YiSyllables { get { return _yiSyllables ?? CreateRange(ref _yiSyllables, first: '\uA000', last: '\uA48F'); } } - private static UnicodeRange _yiSyllables; + public static UnicodeRange YiSyllables => _uA000 ?? CreateRange(ref _uA000, first: '\uA000', last: '\uA48F'); + private static UnicodeRange _uA000; /// /// A corresponding to the 'Yi Radicals' Unicode block (U+A490..U+A4CF). @@ -1077,8 +1104,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/UA490.pdf for the full set of characters in this block. /// - public static UnicodeRange YiRadicals { get { return _yiRadicals ?? CreateRange(ref _yiRadicals, first: '\uA490', last: '\uA4CF'); } } - private static UnicodeRange _yiRadicals; + public static UnicodeRange YiRadicals => _uA490 ?? CreateRange(ref _uA490, first: '\uA490', last: '\uA4CF'); + private static UnicodeRange _uA490; /// /// A corresponding to the 'Lisu' Unicode block (U+A4D0..U+A4FF). @@ -1086,8 +1113,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/UA4D0.pdf for the full set of characters in this block. /// - public static UnicodeRange Lisu { get { return _lisu ?? CreateRange(ref _lisu, first: '\uA4D0', last: '\uA4FF'); } } - private static UnicodeRange _lisu; + public static UnicodeRange Lisu => _uA4D0 ?? CreateRange(ref _uA4D0, first: '\uA4D0', last: '\uA4FF'); + private static UnicodeRange _uA4D0; /// /// A corresponding to the 'Vai' Unicode block (U+A500..U+A63F). @@ -1095,8 +1122,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/UA500.pdf for the full set of characters in this block. /// - public static UnicodeRange Vai { get { return _vai ?? CreateRange(ref _vai, first: '\uA500', last: '\uA63F'); } } - private static UnicodeRange _vai; + public static UnicodeRange Vai => _uA500 ?? CreateRange(ref _uA500, first: '\uA500', last: '\uA63F'); + private static UnicodeRange _uA500; /// /// A corresponding to the 'Cyrillic Extended-B' Unicode block (U+A640..U+A69F). @@ -1104,8 +1131,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/UA640.pdf for the full set of characters in this block. /// - public static UnicodeRange CyrillicExtendedB { get { return _cyrillicExtendedB ?? CreateRange(ref _cyrillicExtendedB, first: '\uA640', last: '\uA69F'); } } - private static UnicodeRange _cyrillicExtendedB; + public static UnicodeRange CyrillicExtendedB => _uA640 ?? CreateRange(ref _uA640, first: '\uA640', last: '\uA69F'); + private static UnicodeRange _uA640; /// /// A corresponding to the 'Bamum' Unicode block (U+A6A0..U+A6FF). @@ -1113,8 +1140,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/UA6A0.pdf for the full set of characters in this block. /// - public static UnicodeRange Bamum { get { return _bamum ?? CreateRange(ref _bamum, first: '\uA6A0', last: '\uA6FF'); } } - private static UnicodeRange _bamum; + public static UnicodeRange Bamum => _uA6A0 ?? CreateRange(ref _uA6A0, first: '\uA6A0', last: '\uA6FF'); + private static UnicodeRange _uA6A0; /// /// A corresponding to the 'Modifier Tone Letters' Unicode block (U+A700..U+A71F). @@ -1122,8 +1149,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/UA700.pdf for the full set of characters in this block. /// - public static UnicodeRange ModifierToneLetters { get { return _modifierToneLetters ?? CreateRange(ref _modifierToneLetters, first: '\uA700', last: '\uA71F'); } } - private static UnicodeRange _modifierToneLetters; + public static UnicodeRange ModifierToneLetters => _uA700 ?? CreateRange(ref _uA700, first: '\uA700', last: '\uA71F'); + private static UnicodeRange _uA700; /// /// A corresponding to the 'Latin Extended-D' Unicode block (U+A720..U+A7FF). @@ -1131,8 +1158,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/UA720.pdf for the full set of characters in this block. /// - public static UnicodeRange LatinExtendedD { get { return _latinExtendedD ?? CreateRange(ref _latinExtendedD, first: '\uA720', last: '\uA7FF'); } } - private static UnicodeRange _latinExtendedD; + public static UnicodeRange LatinExtendedD => _uA720 ?? CreateRange(ref _uA720, first: '\uA720', last: '\uA7FF'); + private static UnicodeRange _uA720; /// /// A corresponding to the 'Syloti Nagri' Unicode block (U+A800..U+A82F). @@ -1140,8 +1167,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/UA800.pdf for the full set of characters in this block. /// - public static UnicodeRange SylotiNagri { get { return _sylotiNagri ?? CreateRange(ref _sylotiNagri, first: '\uA800', last: '\uA82F'); } } - private static UnicodeRange _sylotiNagri; + public static UnicodeRange SylotiNagri => _uA800 ?? CreateRange(ref _uA800, first: '\uA800', last: '\uA82F'); + private static UnicodeRange _uA800; /// /// A corresponding to the 'Common Indic Number Forms' Unicode block (U+A830..U+A83F). @@ -1149,8 +1176,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/UA830.pdf for the full set of characters in this block. /// - public static UnicodeRange CommonIndicNumberForms { get { return _commonIndicNumberForms ?? CreateRange(ref _commonIndicNumberForms, first: '\uA830', last: '\uA83F'); } } - private static UnicodeRange _commonIndicNumberForms; + public static UnicodeRange CommonIndicNumberForms => _uA830 ?? CreateRange(ref _uA830, first: '\uA830', last: '\uA83F'); + private static UnicodeRange _uA830; /// /// A corresponding to the 'Phags-pa' Unicode block (U+A840..U+A87F). @@ -1158,8 +1185,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/UA840.pdf for the full set of characters in this block. /// - public static UnicodeRange Phagspa { get { return _phagspa ?? CreateRange(ref _phagspa, first: '\uA840', last: '\uA87F'); } } - private static UnicodeRange _phagspa; + public static UnicodeRange Phagspa => _uA840 ?? CreateRange(ref _uA840, first: '\uA840', last: '\uA87F'); + private static UnicodeRange _uA840; /// /// A corresponding to the 'Saurashtra' Unicode block (U+A880..U+A8DF). @@ -1167,8 +1194,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/UA880.pdf for the full set of characters in this block. /// - public static UnicodeRange Saurashtra { get { return _saurashtra ?? CreateRange(ref _saurashtra, first: '\uA880', last: '\uA8DF'); } } - private static UnicodeRange _saurashtra; + public static UnicodeRange Saurashtra => _uA880 ?? CreateRange(ref _uA880, first: '\uA880', last: '\uA8DF'); + private static UnicodeRange _uA880; /// /// A corresponding to the 'Devanagari Extended' Unicode block (U+A8E0..U+A8FF). @@ -1176,8 +1203,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/UA8E0.pdf for the full set of characters in this block. /// - public static UnicodeRange DevanagariExtended { get { return _devanagariExtended ?? CreateRange(ref _devanagariExtended, first: '\uA8E0', last: '\uA8FF'); } } - private static UnicodeRange _devanagariExtended; + public static UnicodeRange DevanagariExtended => _uA8E0 ?? CreateRange(ref _uA8E0, first: '\uA8E0', last: '\uA8FF'); + private static UnicodeRange _uA8E0; /// /// A corresponding to the 'Kayah Li' Unicode block (U+A900..U+A92F). @@ -1185,8 +1212,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/UA900.pdf for the full set of characters in this block. /// - public static UnicodeRange KayahLi { get { return _kayahLi ?? CreateRange(ref _kayahLi, first: '\uA900', last: '\uA92F'); } } - private static UnicodeRange _kayahLi; + public static UnicodeRange KayahLi => _uA900 ?? CreateRange(ref _uA900, first: '\uA900', last: '\uA92F'); + private static UnicodeRange _uA900; /// /// A corresponding to the 'Rejang' Unicode block (U+A930..U+A95F). @@ -1194,8 +1221,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/UA930.pdf for the full set of characters in this block. /// - public static UnicodeRange Rejang { get { return _rejang ?? CreateRange(ref _rejang, first: '\uA930', last: '\uA95F'); } } - private static UnicodeRange _rejang; + public static UnicodeRange Rejang => _uA930 ?? CreateRange(ref _uA930, first: '\uA930', last: '\uA95F'); + private static UnicodeRange _uA930; /// /// A corresponding to the 'Hangul Jamo Extended-A' Unicode block (U+A960..U+A97F). @@ -1203,8 +1230,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/UA960.pdf for the full set of characters in this block. /// - public static UnicodeRange HangulJamoExtendedA { get { return _hangulJamoExtendedA ?? CreateRange(ref _hangulJamoExtendedA, first: '\uA960', last: '\uA97F'); } } - private static UnicodeRange _hangulJamoExtendedA; + public static UnicodeRange HangulJamoExtendedA => _uA960 ?? CreateRange(ref _uA960, first: '\uA960', last: '\uA97F'); + private static UnicodeRange _uA960; /// /// A corresponding to the 'Javanese' Unicode block (U+A980..U+A9DF). @@ -1212,8 +1239,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/UA980.pdf for the full set of characters in this block. /// - public static UnicodeRange Javanese { get { return _javanese ?? CreateRange(ref _javanese, first: '\uA980', last: '\uA9DF'); } } - private static UnicodeRange _javanese; + public static UnicodeRange Javanese => _uA980 ?? CreateRange(ref _uA980, first: '\uA980', last: '\uA9DF'); + private static UnicodeRange _uA980; /// /// A corresponding to the 'Myanmar Extended-B' Unicode block (U+A9E0..U+A9FF). @@ -1221,8 +1248,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/UA9E0.pdf for the full set of characters in this block. /// - public static UnicodeRange MyanmarExtendedB { get { return _myanmarExtendedB ?? CreateRange(ref _myanmarExtendedB, first: '\uA9E0', last: '\uA9FF'); } } - private static UnicodeRange _myanmarExtendedB; + public static UnicodeRange MyanmarExtendedB => _uA9E0 ?? CreateRange(ref _uA9E0, first: '\uA9E0', last: '\uA9FF'); + private static UnicodeRange _uA9E0; /// /// A corresponding to the 'Cham' Unicode block (U+AA00..U+AA5F). @@ -1230,8 +1257,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/UAA00.pdf for the full set of characters in this block. /// - public static UnicodeRange Cham { get { return _cham ?? CreateRange(ref _cham, first: '\uAA00', last: '\uAA5F'); } } - private static UnicodeRange _cham; + public static UnicodeRange Cham => _uAA00 ?? CreateRange(ref _uAA00, first: '\uAA00', last: '\uAA5F'); + private static UnicodeRange _uAA00; /// /// A corresponding to the 'Myanmar Extended-A' Unicode block (U+AA60..U+AA7F). @@ -1239,8 +1266,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/UAA60.pdf for the full set of characters in this block. /// - public static UnicodeRange MyanmarExtendedA { get { return _myanmarExtendedA ?? CreateRange(ref _myanmarExtendedA, first: '\uAA60', last: '\uAA7F'); } } - private static UnicodeRange _myanmarExtendedA; + public static UnicodeRange MyanmarExtendedA => _uAA60 ?? CreateRange(ref _uAA60, first: '\uAA60', last: '\uAA7F'); + private static UnicodeRange _uAA60; /// /// A corresponding to the 'Tai Viet' Unicode block (U+AA80..U+AADF). @@ -1248,8 +1275,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/UAA80.pdf for the full set of characters in this block. /// - public static UnicodeRange TaiViet { get { return _taiViet ?? CreateRange(ref _taiViet, first: '\uAA80', last: '\uAADF'); } } - private static UnicodeRange _taiViet; + public static UnicodeRange TaiViet => _uAA80 ?? CreateRange(ref _uAA80, first: '\uAA80', last: '\uAADF'); + private static UnicodeRange _uAA80; /// /// A corresponding to the 'Meetei Mayek Extensions' Unicode block (U+AAE0..U+AAFF). @@ -1257,8 +1284,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/UAAE0.pdf for the full set of characters in this block. /// - public static UnicodeRange MeeteiMayekExtensions { get { return _meeteiMayekExtensions ?? CreateRange(ref _meeteiMayekExtensions, first: '\uAAE0', last: '\uAAFF'); } } - private static UnicodeRange _meeteiMayekExtensions; + public static UnicodeRange MeeteiMayekExtensions => _uAAE0 ?? CreateRange(ref _uAAE0, first: '\uAAE0', last: '\uAAFF'); + private static UnicodeRange _uAAE0; /// /// A corresponding to the 'Ethiopic Extended-A' Unicode block (U+AB00..U+AB2F). @@ -1266,8 +1293,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/UAB00.pdf for the full set of characters in this block. /// - public static UnicodeRange EthiopicExtendedA { get { return _ethiopicExtendedA ?? CreateRange(ref _ethiopicExtendedA, first: '\uAB00', last: '\uAB2F'); } } - private static UnicodeRange _ethiopicExtendedA; + public static UnicodeRange EthiopicExtendedA => _uAB00 ?? CreateRange(ref _uAB00, first: '\uAB00', last: '\uAB2F'); + private static UnicodeRange _uAB00; /// /// A corresponding to the 'Latin Extended-E' Unicode block (U+AB30..U+AB6F). @@ -1275,8 +1302,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/UAB30.pdf for the full set of characters in this block. /// - public static UnicodeRange LatinExtendedE { get { return _latinExtendedE ?? CreateRange(ref _latinExtendedE, first: '\uAB30', last: '\uAB6F'); } } - private static UnicodeRange _latinExtendedE; + public static UnicodeRange LatinExtendedE => _uAB30 ?? CreateRange(ref _uAB30, first: '\uAB30', last: '\uAB6F'); + private static UnicodeRange _uAB30; /// /// A corresponding to the 'Cherokee Supplement' Unicode block (U+AB70..U+ABBF). @@ -1284,8 +1311,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/UAB70.pdf for the full set of characters in this block. /// - public static UnicodeRange CherokeeSupplement { get { return _cherokeeSupplement ?? CreateRange(ref _cherokeeSupplement, first: '\uAB70', last: '\uABBF'); } } - private static UnicodeRange _cherokeeSupplement; + public static UnicodeRange CherokeeSupplement => _uAB70 ?? CreateRange(ref _uAB70, first: '\uAB70', last: '\uABBF'); + private static UnicodeRange _uAB70; /// /// A corresponding to the 'Meetei Mayek' Unicode block (U+ABC0..U+ABFF). @@ -1293,8 +1320,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/UABC0.pdf for the full set of characters in this block. /// - public static UnicodeRange MeeteiMayek { get { return _meeteiMayek ?? CreateRange(ref _meeteiMayek, first: '\uABC0', last: '\uABFF'); } } - private static UnicodeRange _meeteiMayek; + public static UnicodeRange MeeteiMayek => _uABC0 ?? CreateRange(ref _uABC0, first: '\uABC0', last: '\uABFF'); + private static UnicodeRange _uABC0; /// /// A corresponding to the 'Hangul Syllables' Unicode block (U+AC00..U+D7AF). @@ -1302,8 +1329,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/UAC00.pdf for the full set of characters in this block. /// - public static UnicodeRange HangulSyllables { get { return _hangulSyllables ?? CreateRange(ref _hangulSyllables, first: '\uAC00', last: '\uD7AF'); } } - private static UnicodeRange _hangulSyllables; + public static UnicodeRange HangulSyllables => _uAC00 ?? CreateRange(ref _uAC00, first: '\uAC00', last: '\uD7AF'); + private static UnicodeRange _uAC00; /// /// A corresponding to the 'Hangul Jamo Extended-B' Unicode block (U+D7B0..U+D7FF). @@ -1311,17 +1338,17 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/UD7B0.pdf for the full set of characters in this block. /// - public static UnicodeRange HangulJamoExtendedB { get { return _hangulJamoExtendedB ?? CreateRange(ref _hangulJamoExtendedB, first: '\uD7B0', last: '\uD7FF'); } } - private static UnicodeRange _hangulJamoExtendedB; - + public static UnicodeRange HangulJamoExtendedB => _uD7B0 ?? CreateRange(ref _uD7B0, first: '\uD7B0', last: '\uD7FF'); + private static UnicodeRange _uD7B0; + /// /// A corresponding to the 'CJK Compatibility Ideographs' Unicode block (U+F900..U+FAFF). /// /// /// See http://www.unicode.org/charts/PDF/UF900.pdf for the full set of characters in this block. /// - public static UnicodeRange CjkCompatibilityIdeographs { get { return _cjkCompatibilityIdeographs ?? CreateRange(ref _cjkCompatibilityIdeographs, first: '\uF900', last: '\uFAFF'); } } - private static UnicodeRange _cjkCompatibilityIdeographs; + public static UnicodeRange CjkCompatibilityIdeographs => _uF900 ?? CreateRange(ref _uF900, first: '\uF900', last: '\uFAFF'); + private static UnicodeRange _uF900; /// /// A corresponding to the 'Alphabetic Presentation Forms' Unicode block (U+FB00..U+FB4F). @@ -1329,8 +1356,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/UFB00.pdf for the full set of characters in this block. /// - public static UnicodeRange AlphabeticPresentationForms { get { return _alphabeticPresentationForms ?? CreateRange(ref _alphabeticPresentationForms, first: '\uFB00', last: '\uFB4F'); } } - private static UnicodeRange _alphabeticPresentationForms; + public static UnicodeRange AlphabeticPresentationForms => _uFB00 ?? CreateRange(ref _uFB00, first: '\uFB00', last: '\uFB4F'); + private static UnicodeRange _uFB00; /// /// A corresponding to the 'Arabic Presentation Forms-A' Unicode block (U+FB50..U+FDFF). @@ -1338,8 +1365,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/UFB50.pdf for the full set of characters in this block. /// - public static UnicodeRange ArabicPresentationFormsA { get { return _arabicPresentationFormsA ?? CreateRange(ref _arabicPresentationFormsA, first: '\uFB50', last: '\uFDFF'); } } - private static UnicodeRange _arabicPresentationFormsA; + public static UnicodeRange ArabicPresentationFormsA => _uFB50 ?? CreateRange(ref _uFB50, first: '\uFB50', last: '\uFDFF'); + private static UnicodeRange _uFB50; /// /// A corresponding to the 'Variation Selectors' Unicode block (U+FE00..U+FE0F). @@ -1347,8 +1374,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/UFE00.pdf for the full set of characters in this block. /// - public static UnicodeRange VariationSelectors { get { return _variationSelectors ?? CreateRange(ref _variationSelectors, first: '\uFE00', last: '\uFE0F'); } } - private static UnicodeRange _variationSelectors; + public static UnicodeRange VariationSelectors => _uFE00 ?? CreateRange(ref _uFE00, first: '\uFE00', last: '\uFE0F'); + private static UnicodeRange _uFE00; /// /// A corresponding to the 'Vertical Forms' Unicode block (U+FE10..U+FE1F). @@ -1356,8 +1383,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/UFE10.pdf for the full set of characters in this block. /// - public static UnicodeRange VerticalForms { get { return _verticalForms ?? CreateRange(ref _verticalForms, first: '\uFE10', last: '\uFE1F'); } } - private static UnicodeRange _verticalForms; + public static UnicodeRange VerticalForms => _uFE10 ?? CreateRange(ref _uFE10, first: '\uFE10', last: '\uFE1F'); + private static UnicodeRange _uFE10; /// /// A corresponding to the 'Combining Half Marks' Unicode block (U+FE20..U+FE2F). @@ -1365,8 +1392,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/UFE20.pdf for the full set of characters in this block. /// - public static UnicodeRange CombiningHalfMarks { get { return _combiningHalfMarks ?? CreateRange(ref _combiningHalfMarks, first: '\uFE20', last: '\uFE2F'); } } - private static UnicodeRange _combiningHalfMarks; + public static UnicodeRange CombiningHalfMarks => _uFE20 ?? CreateRange(ref _uFE20, first: '\uFE20', last: '\uFE2F'); + private static UnicodeRange _uFE20; /// /// A corresponding to the 'CJK Compatibility Forms' Unicode block (U+FE30..U+FE4F). @@ -1374,8 +1401,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/UFE30.pdf for the full set of characters in this block. /// - public static UnicodeRange CjkCompatibilityForms { get { return _cjkCompatibilityForms ?? CreateRange(ref _cjkCompatibilityForms, first: '\uFE30', last: '\uFE4F'); } } - private static UnicodeRange _cjkCompatibilityForms; + public static UnicodeRange CjkCompatibilityForms => _uFE30 ?? CreateRange(ref _uFE30, first: '\uFE30', last: '\uFE4F'); + private static UnicodeRange _uFE30; /// /// A corresponding to the 'Small Form Variants' Unicode block (U+FE50..U+FE6F). @@ -1383,8 +1410,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/UFE50.pdf for the full set of characters in this block. /// - public static UnicodeRange SmallFormVariants { get { return _smallFormVariants ?? CreateRange(ref _smallFormVariants, first: '\uFE50', last: '\uFE6F'); } } - private static UnicodeRange _smallFormVariants; + public static UnicodeRange SmallFormVariants => _uFE50 ?? CreateRange(ref _uFE50, first: '\uFE50', last: '\uFE6F'); + private static UnicodeRange _uFE50; /// /// A corresponding to the 'Arabic Presentation Forms-B' Unicode block (U+FE70..U+FEFF). @@ -1392,8 +1419,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/UFE70.pdf for the full set of characters in this block. /// - public static UnicodeRange ArabicPresentationFormsB { get { return _arabicPresentationFormsB ?? CreateRange(ref _arabicPresentationFormsB, first: '\uFE70', last: '\uFEFF'); } } - private static UnicodeRange _arabicPresentationFormsB; + public static UnicodeRange ArabicPresentationFormsB => _uFE70 ?? CreateRange(ref _uFE70, first: '\uFE70', last: '\uFEFF'); + private static UnicodeRange _uFE70; /// /// A corresponding to the 'Halfwidth and Fullwidth Forms' Unicode block (U+FF00..U+FFEF). @@ -1401,8 +1428,8 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/UFF00.pdf for the full set of characters in this block. /// - public static UnicodeRange HalfwidthandFullwidthForms { get { return _halfwidthandFullwidthForms ?? CreateRange(ref _halfwidthandFullwidthForms, first: '\uFF00', last: '\uFFEF'); } } - private static UnicodeRange _halfwidthandFullwidthForms; + public static UnicodeRange HalfwidthandFullwidthForms => _uFF00 ?? CreateRange(ref _uFF00, first: '\uFF00', last: '\uFFEF'); + private static UnicodeRange _uFF00; /// /// A corresponding to the 'Specials' Unicode block (U+FFF0..U+FFFF). @@ -1410,7 +1437,7 @@ public static partial class UnicodeRanges /// /// See http://www.unicode.org/charts/PDF/UFFF0.pdf for the full set of characters in this block. /// - public static UnicodeRange Specials { get { return _specials ?? CreateRange(ref _specials, first: '\uFFF0', last: '\uFFFF'); } } - private static UnicodeRange _specials; + public static UnicodeRange Specials => _uFFF0 ?? CreateRange(ref _uFFF0, first: '\uFFF0', last: '\uFFFF'); + private static UnicodeRange _uFFF0; } } diff --git a/src/System.Text.Encodings.Web/tests/System.Text.Encodings.Web.Tests.csproj b/src/System.Text.Encodings.Web/tests/System.Text.Encodings.Web.Tests.csproj index 849bf48203eb..f770f5d23362 100644 --- a/src/System.Text.Encodings.Web/tests/System.Text.Encodings.Web.Tests.csproj +++ b/src/System.Text.Encodings.Web/tests/System.Text.Encodings.Web.Tests.csproj @@ -45,8 +45,8 @@ - - UnicodeData.8.0.txt + + UnicodeData.12.1.txt diff --git a/src/System.Text.Encodings.Web/tests/UnicodeHelpersTests.cs b/src/System.Text.Encodings.Web/tests/UnicodeHelpersTests.cs index 1a61732525a5..1113dc8f9514 100644 --- a/src/System.Text.Encodings.Web/tests/UnicodeHelpersTests.cs +++ b/src/System.Text.Encodings.Web/tests/UnicodeHelpersTests.cs @@ -16,7 +16,7 @@ namespace Microsoft.Framework.WebEncoders public unsafe class UnicodeHelpersTests { // If updating the version of UnicodeData.txt, update the below string with the new file name. - private const string UnicodeDataFileName = "UnicodeData.8.0.txt"; + private const string UnicodeDataFileName = "UnicodeData.12.1.txt"; private const int UnicodeReplacementChar = '\uFFFD'; diff --git a/src/System.Text.Encodings.Web/tests/UnicodeRangesTests.generated.cs b/src/System.Text.Encodings.Web/tests/UnicodeRangesTests.generated.cs index ba9194b92e46..289c2bd33f88 100644 --- a/src/System.Text.Encodings.Web/tests/UnicodeRangesTests.generated.cs +++ b/src/System.Text.Encodings.Web/tests/UnicodeRangesTests.generated.cs @@ -2,6 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +// This file was generated by a tool. +// See src/System.Text.Encodings.Web/tools/GenUnicodeRanges + using System.Collections.Generic; namespace System.Text.Unicode.Tests @@ -10,162 +13,165 @@ public static partial class UnicodeRangesTests { public static IEnumerable UnicodeRanges_GeneratedData => new[] { - new object[] { '\u0000', '\u007F', "BasicLatin" }, - new object[] { '\u0080', '\u00FF', "Latin1Supplement" }, - new object[] { '\u0100', '\u017F', "LatinExtendedA" }, - new object[] { '\u0180', '\u024F', "LatinExtendedB" }, - new object[] { '\u0250', '\u02AF', "IpaExtensions" }, - new object[] { '\u02B0', '\u02FF', "SpacingModifierLetters" }, - new object[] { '\u0300', '\u036F', "CombiningDiacriticalMarks" }, - new object[] { '\u0370', '\u03FF', "GreekandCoptic" }, - new object[] { '\u0400', '\u04FF', "Cyrillic" }, - new object[] { '\u0500', '\u052F', "CyrillicSupplement" }, - new object[] { '\u0530', '\u058F', "Armenian" }, - new object[] { '\u0590', '\u05FF', "Hebrew" }, - new object[] { '\u0600', '\u06FF', "Arabic" }, - new object[] { '\u0700', '\u074F', "Syriac" }, - new object[] { '\u0750', '\u077F', "ArabicSupplement" }, - new object[] { '\u0780', '\u07BF', "Thaana" }, - new object[] { '\u07C0', '\u07FF', "NKo" }, - new object[] { '\u0800', '\u083F', "Samaritan" }, - new object[] { '\u0840', '\u085F', "Mandaic" }, - new object[] { '\u08A0', '\u08FF', "ArabicExtendedA" }, - new object[] { '\u0900', '\u097F', "Devanagari" }, - new object[] { '\u0980', '\u09FF', "Bengali" }, - new object[] { '\u0A00', '\u0A7F', "Gurmukhi" }, - new object[] { '\u0A80', '\u0AFF', "Gujarati" }, - new object[] { '\u0B00', '\u0B7F', "Oriya" }, - new object[] { '\u0B80', '\u0BFF', "Tamil" }, - new object[] { '\u0C00', '\u0C7F', "Telugu" }, - new object[] { '\u0C80', '\u0CFF', "Kannada" }, - new object[] { '\u0D00', '\u0D7F', "Malayalam" }, - new object[] { '\u0D80', '\u0DFF', "Sinhala" }, - new object[] { '\u0E00', '\u0E7F', "Thai" }, - new object[] { '\u0E80', '\u0EFF', "Lao" }, - new object[] { '\u0F00', '\u0FFF', "Tibetan" }, - new object[] { '\u1000', '\u109F', "Myanmar" }, - new object[] { '\u10A0', '\u10FF', "Georgian" }, - new object[] { '\u1100', '\u11FF', "HangulJamo" }, - new object[] { '\u1200', '\u137F', "Ethiopic" }, - new object[] { '\u1380', '\u139F', "EthiopicSupplement" }, - new object[] { '\u13A0', '\u13FF', "Cherokee" }, - new object[] { '\u1400', '\u167F', "UnifiedCanadianAboriginalSyllabics" }, - new object[] { '\u1680', '\u169F', "Ogham" }, - new object[] { '\u16A0', '\u16FF', "Runic" }, - new object[] { '\u1700', '\u171F', "Tagalog" }, - new object[] { '\u1720', '\u173F', "Hanunoo" }, - new object[] { '\u1740', '\u175F', "Buhid" }, - new object[] { '\u1760', '\u177F', "Tagbanwa" }, - new object[] { '\u1780', '\u17FF', "Khmer" }, - new object[] { '\u1800', '\u18AF', "Mongolian" }, - new object[] { '\u18B0', '\u18FF', "UnifiedCanadianAboriginalSyllabicsExtended" }, - new object[] { '\u1900', '\u194F', "Limbu" }, - new object[] { '\u1950', '\u197F', "TaiLe" }, - new object[] { '\u1980', '\u19DF', "NewTaiLue" }, - new object[] { '\u19E0', '\u19FF', "KhmerSymbols" }, - new object[] { '\u1A00', '\u1A1F', "Buginese" }, - new object[] { '\u1A20', '\u1AAF', "TaiTham" }, - new object[] { '\u1AB0', '\u1AFF', "CombiningDiacriticalMarksExtended" }, - new object[] { '\u1B00', '\u1B7F', "Balinese" }, - new object[] { '\u1B80', '\u1BBF', "Sundanese" }, - new object[] { '\u1BC0', '\u1BFF', "Batak" }, - new object[] { '\u1C00', '\u1C4F', "Lepcha" }, - new object[] { '\u1C50', '\u1C7F', "OlChiki" }, - new object[] { '\u1CC0', '\u1CCF', "SundaneseSupplement" }, - new object[] { '\u1CD0', '\u1CFF', "VedicExtensions" }, - new object[] { '\u1D00', '\u1D7F', "PhoneticExtensions" }, - new object[] { '\u1D80', '\u1DBF', "PhoneticExtensionsSupplement" }, - new object[] { '\u1DC0', '\u1DFF', "CombiningDiacriticalMarksSupplement" }, - new object[] { '\u1E00', '\u1EFF', "LatinExtendedAdditional" }, - new object[] { '\u1F00', '\u1FFF', "GreekExtended" }, - new object[] { '\u2000', '\u206F', "GeneralPunctuation" }, - new object[] { '\u2070', '\u209F', "SuperscriptsandSubscripts" }, - new object[] { '\u20A0', '\u20CF', "CurrencySymbols" }, - new object[] { '\u20D0', '\u20FF', "CombiningDiacriticalMarksforSymbols" }, - new object[] { '\u2100', '\u214F', "LetterlikeSymbols" }, - new object[] { '\u2150', '\u218F', "NumberForms" }, - new object[] { '\u2190', '\u21FF', "Arrows" }, - new object[] { '\u2200', '\u22FF', "MathematicalOperators" }, - new object[] { '\u2300', '\u23FF', "MiscellaneousTechnical" }, - new object[] { '\u2400', '\u243F', "ControlPictures" }, - new object[] { '\u2440', '\u245F', "OpticalCharacterRecognition" }, - new object[] { '\u2460', '\u24FF', "EnclosedAlphanumerics" }, - new object[] { '\u2500', '\u257F', "BoxDrawing" }, - new object[] { '\u2580', '\u259F', "BlockElements" }, - new object[] { '\u25A0', '\u25FF', "GeometricShapes" }, - new object[] { '\u2600', '\u26FF', "MiscellaneousSymbols" }, - new object[] { '\u2700', '\u27BF', "Dingbats" }, - new object[] { '\u27C0', '\u27EF', "MiscellaneousMathematicalSymbolsA" }, - new object[] { '\u27F0', '\u27FF', "SupplementalArrowsA" }, - new object[] { '\u2800', '\u28FF', "BraillePatterns" }, - new object[] { '\u2900', '\u297F', "SupplementalArrowsB" }, - new object[] { '\u2980', '\u29FF', "MiscellaneousMathematicalSymbolsB" }, - new object[] { '\u2A00', '\u2AFF', "SupplementalMathematicalOperators" }, - new object[] { '\u2B00', '\u2BFF', "MiscellaneousSymbolsandArrows" }, - new object[] { '\u2C00', '\u2C5F', "Glagolitic" }, - new object[] { '\u2C60', '\u2C7F', "LatinExtendedC" }, - new object[] { '\u2C80', '\u2CFF', "Coptic" }, - new object[] { '\u2D00', '\u2D2F', "GeorgianSupplement" }, - new object[] { '\u2D30', '\u2D7F', "Tifinagh" }, - new object[] { '\u2D80', '\u2DDF', "EthiopicExtended" }, - new object[] { '\u2DE0', '\u2DFF', "CyrillicExtendedA" }, - new object[] { '\u2E00', '\u2E7F', "SupplementalPunctuation" }, - new object[] { '\u2E80', '\u2EFF', "CjkRadicalsSupplement" }, - new object[] { '\u2F00', '\u2FDF', "KangxiRadicals" }, - new object[] { '\u2FF0', '\u2FFF', "IdeographicDescriptionCharacters" }, - new object[] { '\u3000', '\u303F', "CjkSymbolsandPunctuation" }, - new object[] { '\u3040', '\u309F', "Hiragana" }, - new object[] { '\u30A0', '\u30FF', "Katakana" }, - new object[] { '\u3100', '\u312F', "Bopomofo" }, - new object[] { '\u3130', '\u318F', "HangulCompatibilityJamo" }, - new object[] { '\u3190', '\u319F', "Kanbun" }, - new object[] { '\u31A0', '\u31BF', "BopomofoExtended" }, - new object[] { '\u31C0', '\u31EF', "CjkStrokes" }, - new object[] { '\u31F0', '\u31FF', "KatakanaPhoneticExtensions" }, - new object[] { '\u3200', '\u32FF', "EnclosedCjkLettersandMonths" }, - new object[] { '\u3300', '\u33FF', "CjkCompatibility" }, - new object[] { '\u3400', '\u4DBF', "CjkUnifiedIdeographsExtensionA" }, - new object[] { '\u4DC0', '\u4DFF', "YijingHexagramSymbols" }, - new object[] { '\u4E00', '\u9FFF', "CjkUnifiedIdeographs" }, - new object[] { '\uA000', '\uA48F', "YiSyllables" }, - new object[] { '\uA490', '\uA4CF', "YiRadicals" }, - new object[] { '\uA4D0', '\uA4FF', "Lisu" }, - new object[] { '\uA500', '\uA63F', "Vai" }, - new object[] { '\uA640', '\uA69F', "CyrillicExtendedB" }, - new object[] { '\uA6A0', '\uA6FF', "Bamum" }, - new object[] { '\uA700', '\uA71F', "ModifierToneLetters" }, - new object[] { '\uA720', '\uA7FF', "LatinExtendedD" }, - new object[] { '\uA800', '\uA82F', "SylotiNagri" }, - new object[] { '\uA830', '\uA83F', "CommonIndicNumberForms" }, - new object[] { '\uA840', '\uA87F', "Phagspa" }, - new object[] { '\uA880', '\uA8DF', "Saurashtra" }, - new object[] { '\uA8E0', '\uA8FF', "DevanagariExtended" }, - new object[] { '\uA900', '\uA92F', "KayahLi" }, - new object[] { '\uA930', '\uA95F', "Rejang" }, - new object[] { '\uA960', '\uA97F', "HangulJamoExtendedA" }, - new object[] { '\uA980', '\uA9DF', "Javanese" }, - new object[] { '\uA9E0', '\uA9FF', "MyanmarExtendedB" }, - new object[] { '\uAA00', '\uAA5F', "Cham" }, - new object[] { '\uAA60', '\uAA7F', "MyanmarExtendedA" }, - new object[] { '\uAA80', '\uAADF', "TaiViet" }, - new object[] { '\uAAE0', '\uAAFF', "MeeteiMayekExtensions" }, - new object[] { '\uAB00', '\uAB2F', "EthiopicExtendedA" }, - new object[] { '\uAB30', '\uAB6F', "LatinExtendedE" }, - new object[] { '\uAB70', '\uABBF', "CherokeeSupplement" }, - new object[] { '\uABC0', '\uABFF', "MeeteiMayek" }, - new object[] { '\uAC00', '\uD7AF', "HangulSyllables" }, - new object[] { '\uD7B0', '\uD7FF', "HangulJamoExtendedB" }, - new object[] { '\uF900', '\uFAFF', "CjkCompatibilityIdeographs" }, - new object[] { '\uFB00', '\uFB4F', "AlphabeticPresentationForms" }, - new object[] { '\uFB50', '\uFDFF', "ArabicPresentationFormsA" }, - new object[] { '\uFE00', '\uFE0F', "VariationSelectors" }, - new object[] { '\uFE10', '\uFE1F', "VerticalForms" }, - new object[] { '\uFE20', '\uFE2F', "CombiningHalfMarks" }, - new object[] { '\uFE30', '\uFE4F', "CjkCompatibilityForms" }, - new object[] { '\uFE50', '\uFE6F', "SmallFormVariants" }, - new object[] { '\uFE70', '\uFEFF', "ArabicPresentationFormsB" }, - new object[] { '\uFF00', '\uFFEF', "HalfwidthandFullwidthForms" }, - new object[] { '\uFFF0', '\uFFFF', "Specials" }, + new object[] { '\u0000', '\u007F', nameof(UnicodeRanges.BasicLatin) }, + new object[] { '\u0080', '\u00FF', nameof(UnicodeRanges.Latin1Supplement) }, + new object[] { '\u0100', '\u017F', nameof(UnicodeRanges.LatinExtendedA) }, + new object[] { '\u0180', '\u024F', nameof(UnicodeRanges.LatinExtendedB) }, + new object[] { '\u0250', '\u02AF', nameof(UnicodeRanges.IpaExtensions) }, + new object[] { '\u02B0', '\u02FF', nameof(UnicodeRanges.SpacingModifierLetters) }, + new object[] { '\u0300', '\u036F', nameof(UnicodeRanges.CombiningDiacriticalMarks) }, + new object[] { '\u0370', '\u03FF', nameof(UnicodeRanges.GreekandCoptic) }, + new object[] { '\u0400', '\u04FF', nameof(UnicodeRanges.Cyrillic) }, + new object[] { '\u0500', '\u052F', nameof(UnicodeRanges.CyrillicSupplement) }, + new object[] { '\u0530', '\u058F', nameof(UnicodeRanges.Armenian) }, + new object[] { '\u0590', '\u05FF', nameof(UnicodeRanges.Hebrew) }, + new object[] { '\u0600', '\u06FF', nameof(UnicodeRanges.Arabic) }, + new object[] { '\u0700', '\u074F', nameof(UnicodeRanges.Syriac) }, + new object[] { '\u0750', '\u077F', nameof(UnicodeRanges.ArabicSupplement) }, + new object[] { '\u0780', '\u07BF', nameof(UnicodeRanges.Thaana) }, + new object[] { '\u07C0', '\u07FF', nameof(UnicodeRanges.NKo) }, + new object[] { '\u0800', '\u083F', nameof(UnicodeRanges.Samaritan) }, + new object[] { '\u0840', '\u085F', nameof(UnicodeRanges.Mandaic) }, + new object[] { '\u0860', '\u086F', nameof(UnicodeRanges.SyriacSupplement) }, + new object[] { '\u08A0', '\u08FF', nameof(UnicodeRanges.ArabicExtendedA) }, + new object[] { '\u0900', '\u097F', nameof(UnicodeRanges.Devanagari) }, + new object[] { '\u0980', '\u09FF', nameof(UnicodeRanges.Bengali) }, + new object[] { '\u0A00', '\u0A7F', nameof(UnicodeRanges.Gurmukhi) }, + new object[] { '\u0A80', '\u0AFF', nameof(UnicodeRanges.Gujarati) }, + new object[] { '\u0B00', '\u0B7F', nameof(UnicodeRanges.Oriya) }, + new object[] { '\u0B80', '\u0BFF', nameof(UnicodeRanges.Tamil) }, + new object[] { '\u0C00', '\u0C7F', nameof(UnicodeRanges.Telugu) }, + new object[] { '\u0C80', '\u0CFF', nameof(UnicodeRanges.Kannada) }, + new object[] { '\u0D00', '\u0D7F', nameof(UnicodeRanges.Malayalam) }, + new object[] { '\u0D80', '\u0DFF', nameof(UnicodeRanges.Sinhala) }, + new object[] { '\u0E00', '\u0E7F', nameof(UnicodeRanges.Thai) }, + new object[] { '\u0E80', '\u0EFF', nameof(UnicodeRanges.Lao) }, + new object[] { '\u0F00', '\u0FFF', nameof(UnicodeRanges.Tibetan) }, + new object[] { '\u1000', '\u109F', nameof(UnicodeRanges.Myanmar) }, + new object[] { '\u10A0', '\u10FF', nameof(UnicodeRanges.Georgian) }, + new object[] { '\u1100', '\u11FF', nameof(UnicodeRanges.HangulJamo) }, + new object[] { '\u1200', '\u137F', nameof(UnicodeRanges.Ethiopic) }, + new object[] { '\u1380', '\u139F', nameof(UnicodeRanges.EthiopicSupplement) }, + new object[] { '\u13A0', '\u13FF', nameof(UnicodeRanges.Cherokee) }, + new object[] { '\u1400', '\u167F', nameof(UnicodeRanges.UnifiedCanadianAboriginalSyllabics) }, + new object[] { '\u1680', '\u169F', nameof(UnicodeRanges.Ogham) }, + new object[] { '\u16A0', '\u16FF', nameof(UnicodeRanges.Runic) }, + new object[] { '\u1700', '\u171F', nameof(UnicodeRanges.Tagalog) }, + new object[] { '\u1720', '\u173F', nameof(UnicodeRanges.Hanunoo) }, + new object[] { '\u1740', '\u175F', nameof(UnicodeRanges.Buhid) }, + new object[] { '\u1760', '\u177F', nameof(UnicodeRanges.Tagbanwa) }, + new object[] { '\u1780', '\u17FF', nameof(UnicodeRanges.Khmer) }, + new object[] { '\u1800', '\u18AF', nameof(UnicodeRanges.Mongolian) }, + new object[] { '\u18B0', '\u18FF', nameof(UnicodeRanges.UnifiedCanadianAboriginalSyllabicsExtended) }, + new object[] { '\u1900', '\u194F', nameof(UnicodeRanges.Limbu) }, + new object[] { '\u1950', '\u197F', nameof(UnicodeRanges.TaiLe) }, + new object[] { '\u1980', '\u19DF', nameof(UnicodeRanges.NewTaiLue) }, + new object[] { '\u19E0', '\u19FF', nameof(UnicodeRanges.KhmerSymbols) }, + new object[] { '\u1A00', '\u1A1F', nameof(UnicodeRanges.Buginese) }, + new object[] { '\u1A20', '\u1AAF', nameof(UnicodeRanges.TaiTham) }, + new object[] { '\u1AB0', '\u1AFF', nameof(UnicodeRanges.CombiningDiacriticalMarksExtended) }, + new object[] { '\u1B00', '\u1B7F', nameof(UnicodeRanges.Balinese) }, + new object[] { '\u1B80', '\u1BBF', nameof(UnicodeRanges.Sundanese) }, + new object[] { '\u1BC0', '\u1BFF', nameof(UnicodeRanges.Batak) }, + new object[] { '\u1C00', '\u1C4F', nameof(UnicodeRanges.Lepcha) }, + new object[] { '\u1C50', '\u1C7F', nameof(UnicodeRanges.OlChiki) }, + new object[] { '\u1C80', '\u1C8F', nameof(UnicodeRanges.CyrillicExtendedC) }, + new object[] { '\u1C90', '\u1CBF', nameof(UnicodeRanges.GeorgianExtended) }, + new object[] { '\u1CC0', '\u1CCF', nameof(UnicodeRanges.SundaneseSupplement) }, + new object[] { '\u1CD0', '\u1CFF', nameof(UnicodeRanges.VedicExtensions) }, + new object[] { '\u1D00', '\u1D7F', nameof(UnicodeRanges.PhoneticExtensions) }, + new object[] { '\u1D80', '\u1DBF', nameof(UnicodeRanges.PhoneticExtensionsSupplement) }, + new object[] { '\u1DC0', '\u1DFF', nameof(UnicodeRanges.CombiningDiacriticalMarksSupplement) }, + new object[] { '\u1E00', '\u1EFF', nameof(UnicodeRanges.LatinExtendedAdditional) }, + new object[] { '\u1F00', '\u1FFF', nameof(UnicodeRanges.GreekExtended) }, + new object[] { '\u2000', '\u206F', nameof(UnicodeRanges.GeneralPunctuation) }, + new object[] { '\u2070', '\u209F', nameof(UnicodeRanges.SuperscriptsandSubscripts) }, + new object[] { '\u20A0', '\u20CF', nameof(UnicodeRanges.CurrencySymbols) }, + new object[] { '\u20D0', '\u20FF', nameof(UnicodeRanges.CombiningDiacriticalMarksforSymbols) }, + new object[] { '\u2100', '\u214F', nameof(UnicodeRanges.LetterlikeSymbols) }, + new object[] { '\u2150', '\u218F', nameof(UnicodeRanges.NumberForms) }, + new object[] { '\u2190', '\u21FF', nameof(UnicodeRanges.Arrows) }, + new object[] { '\u2200', '\u22FF', nameof(UnicodeRanges.MathematicalOperators) }, + new object[] { '\u2300', '\u23FF', nameof(UnicodeRanges.MiscellaneousTechnical) }, + new object[] { '\u2400', '\u243F', nameof(UnicodeRanges.ControlPictures) }, + new object[] { '\u2440', '\u245F', nameof(UnicodeRanges.OpticalCharacterRecognition) }, + new object[] { '\u2460', '\u24FF', nameof(UnicodeRanges.EnclosedAlphanumerics) }, + new object[] { '\u2500', '\u257F', nameof(UnicodeRanges.BoxDrawing) }, + new object[] { '\u2580', '\u259F', nameof(UnicodeRanges.BlockElements) }, + new object[] { '\u25A0', '\u25FF', nameof(UnicodeRanges.GeometricShapes) }, + new object[] { '\u2600', '\u26FF', nameof(UnicodeRanges.MiscellaneousSymbols) }, + new object[] { '\u2700', '\u27BF', nameof(UnicodeRanges.Dingbats) }, + new object[] { '\u27C0', '\u27EF', nameof(UnicodeRanges.MiscellaneousMathematicalSymbolsA) }, + new object[] { '\u27F0', '\u27FF', nameof(UnicodeRanges.SupplementalArrowsA) }, + new object[] { '\u2800', '\u28FF', nameof(UnicodeRanges.BraillePatterns) }, + new object[] { '\u2900', '\u297F', nameof(UnicodeRanges.SupplementalArrowsB) }, + new object[] { '\u2980', '\u29FF', nameof(UnicodeRanges.MiscellaneousMathematicalSymbolsB) }, + new object[] { '\u2A00', '\u2AFF', nameof(UnicodeRanges.SupplementalMathematicalOperators) }, + new object[] { '\u2B00', '\u2BFF', nameof(UnicodeRanges.MiscellaneousSymbolsandArrows) }, + new object[] { '\u2C00', '\u2C5F', nameof(UnicodeRanges.Glagolitic) }, + new object[] { '\u2C60', '\u2C7F', nameof(UnicodeRanges.LatinExtendedC) }, + new object[] { '\u2C80', '\u2CFF', nameof(UnicodeRanges.Coptic) }, + new object[] { '\u2D00', '\u2D2F', nameof(UnicodeRanges.GeorgianSupplement) }, + new object[] { '\u2D30', '\u2D7F', nameof(UnicodeRanges.Tifinagh) }, + new object[] { '\u2D80', '\u2DDF', nameof(UnicodeRanges.EthiopicExtended) }, + new object[] { '\u2DE0', '\u2DFF', nameof(UnicodeRanges.CyrillicExtendedA) }, + new object[] { '\u2E00', '\u2E7F', nameof(UnicodeRanges.SupplementalPunctuation) }, + new object[] { '\u2E80', '\u2EFF', nameof(UnicodeRanges.CjkRadicalsSupplement) }, + new object[] { '\u2F00', '\u2FDF', nameof(UnicodeRanges.KangxiRadicals) }, + new object[] { '\u2FF0', '\u2FFF', nameof(UnicodeRanges.IdeographicDescriptionCharacters) }, + new object[] { '\u3000', '\u303F', nameof(UnicodeRanges.CjkSymbolsandPunctuation) }, + new object[] { '\u3040', '\u309F', nameof(UnicodeRanges.Hiragana) }, + new object[] { '\u30A0', '\u30FF', nameof(UnicodeRanges.Katakana) }, + new object[] { '\u3100', '\u312F', nameof(UnicodeRanges.Bopomofo) }, + new object[] { '\u3130', '\u318F', nameof(UnicodeRanges.HangulCompatibilityJamo) }, + new object[] { '\u3190', '\u319F', nameof(UnicodeRanges.Kanbun) }, + new object[] { '\u31A0', '\u31BF', nameof(UnicodeRanges.BopomofoExtended) }, + new object[] { '\u31C0', '\u31EF', nameof(UnicodeRanges.CjkStrokes) }, + new object[] { '\u31F0', '\u31FF', nameof(UnicodeRanges.KatakanaPhoneticExtensions) }, + new object[] { '\u3200', '\u32FF', nameof(UnicodeRanges.EnclosedCjkLettersandMonths) }, + new object[] { '\u3300', '\u33FF', nameof(UnicodeRanges.CjkCompatibility) }, + new object[] { '\u3400', '\u4DBF', nameof(UnicodeRanges.CjkUnifiedIdeographsExtensionA) }, + new object[] { '\u4DC0', '\u4DFF', nameof(UnicodeRanges.YijingHexagramSymbols) }, + new object[] { '\u4E00', '\u9FFF', nameof(UnicodeRanges.CjkUnifiedIdeographs) }, + new object[] { '\uA000', '\uA48F', nameof(UnicodeRanges.YiSyllables) }, + new object[] { '\uA490', '\uA4CF', nameof(UnicodeRanges.YiRadicals) }, + new object[] { '\uA4D0', '\uA4FF', nameof(UnicodeRanges.Lisu) }, + new object[] { '\uA500', '\uA63F', nameof(UnicodeRanges.Vai) }, + new object[] { '\uA640', '\uA69F', nameof(UnicodeRanges.CyrillicExtendedB) }, + new object[] { '\uA6A0', '\uA6FF', nameof(UnicodeRanges.Bamum) }, + new object[] { '\uA700', '\uA71F', nameof(UnicodeRanges.ModifierToneLetters) }, + new object[] { '\uA720', '\uA7FF', nameof(UnicodeRanges.LatinExtendedD) }, + new object[] { '\uA800', '\uA82F', nameof(UnicodeRanges.SylotiNagri) }, + new object[] { '\uA830', '\uA83F', nameof(UnicodeRanges.CommonIndicNumberForms) }, + new object[] { '\uA840', '\uA87F', nameof(UnicodeRanges.Phagspa) }, + new object[] { '\uA880', '\uA8DF', nameof(UnicodeRanges.Saurashtra) }, + new object[] { '\uA8E0', '\uA8FF', nameof(UnicodeRanges.DevanagariExtended) }, + new object[] { '\uA900', '\uA92F', nameof(UnicodeRanges.KayahLi) }, + new object[] { '\uA930', '\uA95F', nameof(UnicodeRanges.Rejang) }, + new object[] { '\uA960', '\uA97F', nameof(UnicodeRanges.HangulJamoExtendedA) }, + new object[] { '\uA980', '\uA9DF', nameof(UnicodeRanges.Javanese) }, + new object[] { '\uA9E0', '\uA9FF', nameof(UnicodeRanges.MyanmarExtendedB) }, + new object[] { '\uAA00', '\uAA5F', nameof(UnicodeRanges.Cham) }, + new object[] { '\uAA60', '\uAA7F', nameof(UnicodeRanges.MyanmarExtendedA) }, + new object[] { '\uAA80', '\uAADF', nameof(UnicodeRanges.TaiViet) }, + new object[] { '\uAAE0', '\uAAFF', nameof(UnicodeRanges.MeeteiMayekExtensions) }, + new object[] { '\uAB00', '\uAB2F', nameof(UnicodeRanges.EthiopicExtendedA) }, + new object[] { '\uAB30', '\uAB6F', nameof(UnicodeRanges.LatinExtendedE) }, + new object[] { '\uAB70', '\uABBF', nameof(UnicodeRanges.CherokeeSupplement) }, + new object[] { '\uABC0', '\uABFF', nameof(UnicodeRanges.MeeteiMayek) }, + new object[] { '\uAC00', '\uD7AF', nameof(UnicodeRanges.HangulSyllables) }, + new object[] { '\uD7B0', '\uD7FF', nameof(UnicodeRanges.HangulJamoExtendedB) }, + new object[] { '\uF900', '\uFAFF', nameof(UnicodeRanges.CjkCompatibilityIdeographs) }, + new object[] { '\uFB00', '\uFB4F', nameof(UnicodeRanges.AlphabeticPresentationForms) }, + new object[] { '\uFB50', '\uFDFF', nameof(UnicodeRanges.ArabicPresentationFormsA) }, + new object[] { '\uFE00', '\uFE0F', nameof(UnicodeRanges.VariationSelectors) }, + new object[] { '\uFE10', '\uFE1F', nameof(UnicodeRanges.VerticalForms) }, + new object[] { '\uFE20', '\uFE2F', nameof(UnicodeRanges.CombiningHalfMarks) }, + new object[] { '\uFE30', '\uFE4F', nameof(UnicodeRanges.CjkCompatibilityForms) }, + new object[] { '\uFE50', '\uFE6F', nameof(UnicodeRanges.SmallFormVariants) }, + new object[] { '\uFE70', '\uFEFF', nameof(UnicodeRanges.ArabicPresentationFormsB) }, + new object[] { '\uFF00', '\uFFEF', nameof(UnicodeRanges.HalfwidthandFullwidthForms) }, + new object[] { '\uFFF0', '\uFFFF', nameof(UnicodeRanges.Specials) }, }; } } diff --git a/src/System.Text.Encodings.Web/tools/updating-encodings.md b/src/System.Text.Encodings.Web/tools/updating-encodings.md index 55dfa4201bb8..30600da42323 100644 --- a/src/System.Text.Encodings.Web/tools/updating-encodings.md +++ b/src/System.Text.Encodings.Web/tools/updating-encodings.md @@ -4,7 +4,7 @@ This folder contains tools which allow updating the Unicode data within the __Sy ### Current implementation -The current version of the Unicode data checked in is __8.0.0__. The archived files can be found at https://unicode.org/Public/8.0.0/. +The current version of the Unicode data checked in is __12.1.0__. The archived files can be found at https://unicode.org/Public/12.1.0/. ### Updating the implementation From 0d3caeba10c3c4a83f16a11c4298e39528d923b5 Mon Sep 17 00:00:00 2001 From: Steve MacLean Date: Fri, 10 May 2019 20:21:38 -0400 Subject: [PATCH 315/607] Add AssemblyResolve_FirstChanceException test (#37570) PR Feedback --- .../tests/System/AppDomainTests.netcoreapp.cs | 46 +++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/src/System.Runtime.Extensions/tests/System/AppDomainTests.netcoreapp.cs b/src/System.Runtime.Extensions/tests/System/AppDomainTests.netcoreapp.cs index 5f77a630f9f1..6c6e3c7cef39 100644 --- a/src/System.Runtime.Extensions/tests/System/AppDomainTests.netcoreapp.cs +++ b/src/System.Runtime.Extensions/tests/System/AppDomainTests.netcoreapp.cs @@ -14,6 +14,10 @@ namespace System.Tests { + class AGenericClass + { + } + public partial class AppDomainTests { [Fact] @@ -197,5 +201,47 @@ public static IEnumerable TestingCreateInstanceObjectHandleFullSignatu yield return new object[] { "AssemblyResolveTestApp", "AssemblyResolveTestApp.PrivateClassSample", false, BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Instance, Type.DefaultBinder, new object[1] { 1 }, CultureInfo.InvariantCulture, null, "AssemblyResolveTestApp.PrivateClassSample" }; yield return new object[] { "assemblyresolvetestapp", "assemblyresolvetestapp.privateclasssample", true, BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Instance, Type.DefaultBinder, new object[1] { 1 }, CultureInfo.InvariantCulture, null, "AssemblyResolveTestApp.PrivateClassSample" }; } + + [Fact] + public void AssemblyResolve_FirstChanceException() + { + RemoteExecutor.Invoke(() => { + Assembly assembly = typeof(AppDomainTests).Assembly; + + Exception firstChanceExceptionThrown = null; + + EventHandler firstChanceHandler = (source, args) => + { + firstChanceExceptionThrown = args.Exception; + }; + + AppDomain.CurrentDomain.FirstChanceException += firstChanceHandler; + + ResolveEventHandler assemblyResolveHandler = (sender, e) => + { + Assert.Equal(assembly, e.RequestingAssembly); + Assert.Null(firstChanceExceptionThrown); + return null; + }; + + AppDomain.CurrentDomain.AssemblyResolve += assemblyResolveHandler; + + Func resolvingHandler = (context, name) => + { + return null; + }; + + // The issue resolved by coreclr#24450, was only reproduced when there was a Resolving handler present + System.Runtime.Loader.AssemblyLoadContext.Default.Resolving += resolvingHandler; + + assembly.GetType("System.Tests.AGenericClass`1[[Bogus, BogusAssembly]]", false); + Assert.Null(firstChanceExceptionThrown); + + Exception thrown = Assert.Throws(() => assembly.GetType("System.Tests.AGenericClass`1[[Bogus, AnotherBogusAssembly]]", true)); + Assert.Same(firstChanceExceptionThrown, thrown); + + return RemoteExecutor.SuccessExitCode; + }).Dispose(); + } } } From 81d42d72dfd5af65c3b9408496e9c49df3fea418 Mon Sep 17 00:00:00 2001 From: dotnet-maestro <@dotnet-maestro> Date: Sat, 11 May 2019 13:07:33 +0000 Subject: [PATCH 316/607] Update dependencies from https://github.com/dotnet/standard build 20190511.1 - NETStandard.Library - 2.1.0-prerelease.19261.1 --- eng/Version.Details.xml | 4 ++-- eng/Versions.props | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index be321d910187..50db4a062f42 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -38,9 +38,9 @@ https://github.com/dotnet/arcade a7a250e9c13147134543c35fef2fb81f19592edf - + https://github.com/dotnet/standard - 013b89db06c1f331804d2c07c79c9b5192b3c5d7 + f61ae50628419624d3e462794245c747e61c1166 https://github.com/dotnet/arcade diff --git a/eng/Versions.props b/eng/Versions.props index 601d9958b524..5ae06955fa47 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -46,7 +46,7 @@ 3.0.0-preview6.19259.1 4.6.0-preview6.19259.1 - 2.1.0-prerelease.19259.7 + 2.1.0-prerelease.19261.1 99.99.99-master-20190509.1 From a48c3110c0b49e2e96701482f5922e71902ac8d2 Mon Sep 17 00:00:00 2001 From: dotnet-maestro <@dotnet-maestro> Date: Sun, 12 May 2019 12:47:43 +0000 Subject: [PATCH 317/607] Update dependencies from https://github.com/dotnet/standard build 20190512.1 - NETStandard.Library - 2.1.0-prerelease.19262.1 --- eng/Version.Details.xml | 4 ++-- eng/Versions.props | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 50db4a062f42..c7f057808142 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -38,9 +38,9 @@ https://github.com/dotnet/arcade a7a250e9c13147134543c35fef2fb81f19592edf - + https://github.com/dotnet/standard - f61ae50628419624d3e462794245c747e61c1166 + c139217dd25213e5f2fbc209f4c24f3973ecff60 https://github.com/dotnet/arcade diff --git a/eng/Versions.props b/eng/Versions.props index 5ae06955fa47..99a976f73e60 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -46,7 +46,7 @@ 3.0.0-preview6.19259.1 4.6.0-preview6.19259.1 - 2.1.0-prerelease.19261.1 + 2.1.0-prerelease.19262.1 99.99.99-master-20190509.1 From b7827907a1f389608f634077d7d41b401fb8ef36 Mon Sep 17 00:00:00 2001 From: dotnet-maestro <@dotnet-maestro> Date: Mon, 13 May 2019 12:52:35 +0000 Subject: [PATCH 318/607] Update dependencies from https://github.com/dotnet/standard build 20190513.1 - NETStandard.Library - 2.1.0-prerelease.19263.1 --- eng/Version.Details.xml | 4 ++-- eng/Versions.props | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index c7f057808142..d31e9162d98f 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -38,9 +38,9 @@ https://github.com/dotnet/arcade a7a250e9c13147134543c35fef2fb81f19592edf - + https://github.com/dotnet/standard - c139217dd25213e5f2fbc209f4c24f3973ecff60 + 4b3bef4a8ca06a6a016d986cc78902bd63ab9033 https://github.com/dotnet/arcade diff --git a/eng/Versions.props b/eng/Versions.props index 99a976f73e60..fef720bcd2b4 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -46,7 +46,7 @@ 3.0.0-preview6.19259.1 4.6.0-preview6.19259.1 - 2.1.0-prerelease.19262.1 + 2.1.0-prerelease.19263.1 99.99.99-master-20190509.1 From 33013441dcde783c38c063e39d52da8bfbb32ad6 Mon Sep 17 00:00:00 2001 From: Tarek Mahmoud Sayed Date: Mon, 13 May 2019 09:18:11 -0700 Subject: [PATCH 319/607] Add Idn.GetAscii Test (#37498) This test to enusre we are not throwing when having a string with hyphens in the 3rd and 4th places. --- .../tests/IdnMapping/IdnMappingGetAsciiTests.cs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/System.Globalization.Extensions/tests/IdnMapping/IdnMappingGetAsciiTests.cs b/src/System.Globalization.Extensions/tests/IdnMapping/IdnMappingGetAsciiTests.cs index 020f0ef94755..c2d7e791c666 100644 --- a/src/System.Globalization.Extensions/tests/IdnMapping/IdnMappingGetAsciiTests.cs +++ b/src/System.Globalization.Extensions/tests/IdnMapping/IdnMappingGetAsciiTests.cs @@ -180,5 +180,14 @@ public static void GetAscii_Invalid(IdnMapping idnMapping, string unicode, int i } Assert.Throws(exceptionType, () => idnMapping.GetAscii(unicode, index, count)); } + + [Fact] + public void TestStringWithHyphenIn3rdAnd4thPlace() + { + string unicode = "r6---sn-uxanug5-hxay.gvt1.com"; + + // Ensure we are not throwing on Linux because of the 3rd and 4th hyphens in the string. + Assert.Equal(unicode, new IdnMapping().GetAscii(unicode)); + } } } From 2b741e27494b710029b581d90394e377906fc0e6 Mon Sep 17 00:00:00 2001 From: dotnet-maestro-bot Date: Mon, 13 May 2019 11:08:35 -0700 Subject: [PATCH 320/607] Update ProjectNTfs, ProjectNTfsTestILC to beta-27713-00, beta-27713-00, respectively --- eng/dependencies.props | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/eng/dependencies.props b/eng/dependencies.props index 777a1bdc89d7..546c419f0b25 100644 --- a/eng/dependencies.props +++ b/eng/dependencies.props @@ -9,8 +9,8 @@ These ref versions are pulled from https://github.com/dotnet/versions. --> - a777ed5ef3be177ea9001e3c106a07fd2d0e99f4 - a777ed5ef3be177ea9001e3c106a07fd2d0e99f4 + ff7b2cc14cdddbd056e68fdabd380fbfa14c51d9 + ff7b2cc14cdddbd056e68fdabd380fbfa14c51d9 8bd1ec5fac9f0eec34ff6b34b1d878b4359e02dd @@ -22,9 +22,9 @@ - beta-27710-00 - beta-27710-00 - 1.0.0-beta-27710-00 + beta-27713-00 + beta-27713-00 + 1.0.0-beta-27713-00 4.4.0 From 6ef4cf53034e3e57cd117e23e599afbb5dd2e3fb Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Mon, 13 May 2019 18:19:10 +0000 Subject: [PATCH 321/607] Update dependencies from https://github.com/dotnet/coreclr build 20190510.71 (#37605) - Microsoft.NET.Sdk.IL - 3.0.0-preview6-27710-71 - Microsoft.NETCore.ILAsm - 3.0.0-preview6-27710-71 - Microsoft.NETCore.Runtime.CoreCLR - 3.0.0-preview6-27710-71 --- eng/Version.Details.xml | 12 ++++++------ eng/Versions.props | 4 ++-- global.json | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 898b3b0f0436..793acc0302b7 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -1,16 +1,16 @@ - + https://github.com/dotnet/coreclr - a086fa2466d601fed6d2f4fb029b78613bf4ec7a + 48431cc037776ca359de36bf71bda8c154cc2aa9 - + https://github.com/dotnet/coreclr - a086fa2466d601fed6d2f4fb029b78613bf4ec7a + 48431cc037776ca359de36bf71bda8c154cc2aa9 - + https://github.com/dotnet/coreclr - a086fa2466d601fed6d2f4fb029b78613bf4ec7a + 48431cc037776ca359de36bf71bda8c154cc2aa9 diff --git a/eng/Versions.props b/eng/Versions.props index 97aed519d273..4f105ff85847 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -40,8 +40,8 @@ 3.0.0-preview6-27709-05 3.0.0-preview6-27709-05 - 3.0.0-preview6-27709-73 - 3.0.0-preview6-27709-73 + 3.0.0-preview6-27710-71 + 3.0.0-preview6-27710-71 3.0.0-preview6.19259.7 4.6.0-preview6.19259.7 diff --git a/global.json b/global.json index 2f309a320edb..3bb283a02fb3 100644 --- a/global.json +++ b/global.json @@ -5,6 +5,6 @@ "msbuild-sdks": { "Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19229.8", "Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19257.7", - "Microsoft.NET.Sdk.IL": "3.0.0-preview6-27709-73" + "Microsoft.NET.Sdk.IL": "3.0.0-preview6-27710-71" } } From a2fcb8c87eef10235ca2f2f89b7b2ef0c096bf4e Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Mon, 13 May 2019 18:40:59 +0000 Subject: [PATCH 322/607] [master] Update dependencies from dotnet/corefx (#37584) * Update dependencies from https://github.com/dotnet/corefx build 20190509.10 - Microsoft.NETCore.Platforms - 3.0.0-preview6.19259.10 - runtime.native.System.IO.Ports - 4.6.0-preview6.19259.10 * Update dependencies from https://github.com/dotnet/corefx build 20190510.6 - Microsoft.NETCore.Platforms - 3.0.0-preview6.19260.6 - runtime.native.System.IO.Ports - 4.6.0-preview6.19260.6 --- eng/Version.Details.xml | 8 ++++---- eng/Versions.props | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 793acc0302b7..8f9afa166335 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -26,13 +26,13 @@ https://github.com/dotnet/core-setup a8478dda1140e055651636fe35cad036f2585edd - + https://github.com/dotnet/corefx - 7076e2b603c3ba8f22fdb802aa4b078296ecd6b3 + 0d3caeba10c3c4a83f16a11c4298e39528d923b5 - + https://github.com/dotnet/corefx - 7076e2b603c3ba8f22fdb802aa4b078296ecd6b3 + 0d3caeba10c3c4a83f16a11c4298e39528d923b5 https://github.com/dotnet/arcade diff --git a/eng/Versions.props b/eng/Versions.props index 4f105ff85847..86c97c7bb4f4 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -43,8 +43,8 @@ 3.0.0-preview6-27710-71 3.0.0-preview6-27710-71 - 3.0.0-preview6.19259.7 - 4.6.0-preview6.19259.7 + 3.0.0-preview6.19260.6 + 4.6.0-preview6.19260.6 2.1.0-prerelease.19259.7 From 4c8af9a27784df92bb567d920f84799b90990717 Mon Sep 17 00:00:00 2001 From: Matt Galbraith Date: Mon, 13 May 2019 11:45:32 -0700 Subject: [PATCH 323/607] Use Docker feature for nano runs @wfurt FYI --- eng/pipelines/windows.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/pipelines/windows.yml b/eng/pipelines/windows.yml index c6bca6c1f918..ca349a967ac9 100644 --- a/eng/pipelines/windows.yml +++ b/eng/pipelines/windows.yml @@ -126,12 +126,12 @@ jobs: - ${{ if eq(parameters.isOfficialBuild, 'false') }}: - netcoreappWindowsQueues: Windows.7.Amd64.Open+Windows.81.Amd64.Open+Windows.10.Amd64.ClientRS4.ES.Open - - nanoQueues: Windows.10.Nano.Amd64.Open + - nanoQueues: (Windows.Nano.1803.Amd64.Open)windows.10.amd64.serverrs4.open@mcr.microsoft.com/dotnet-buildtools/prereqs:nanoserver-1803-helix-amd64-05227e1-20190509225944 - uapNetfxQueues: Windows.10.Amd64.ClientRS5.Open - ${{ if eq(parameters.isOfficialBuild, 'true') }}: - netcoreappWindowsQueues: Windows.7.Amd64+Windows.81.Amd64+Windows.10.Amd64.Core+Windows.10.Amd64.ClientRS4 - - nanoQueues: Windows.10.Nano.Amd64 + - nanoQueues: (Windows.Nano.1803.Amd64)windows.10.amd64.serverrs4@mcr.microsoft.com/dotnet-buildtools/prereqs:nanoserver-1803-helix-amd64-05227e1-20190509225944 - uapNetfxQueues: Windows.10.Amd64.ClientRS5 - windowsArmQueue: Windows.10.Arm64 From cc00646d20b70827aa52ecd67ae6748d03eb3233 Mon Sep 17 00:00:00 2001 From: Layomi Akinrinade Date: Mon, 13 May 2019 14:19:31 -0700 Subject: [PATCH 324/607] Add support for more collections (#37308) * Add support for additional collections * Add more tests * Some changes * Address review feedback * Some nits * Remove immutable dependency * Use Invoke, not DyanmicInvoke * Address review comments * Utilize JsonPropertyInfoCommon generic TElement parameter --- .../src/Resources/Strings.resx | 3 + .../src/System.Text.Json.csproj | 2 + .../Json/Serialization/ClassMaterializer.cs | 27 + .../Converters/DefaultArrayConverter.cs | 4 +- .../Converters/DefaultEnumerableConverter.cs | 15 +- ...efaultIEnumerableConstructibleConverter.cs | 43 ++ .../Converters/DefaultImmutableConverter.cs | 134 ++++ .../JsonClassInfo.AddProperty.cs | 2 +- .../Serialization/JsonEnumerableConverter.cs | 3 +- .../Json/Serialization/JsonPropertyInfo.cs | 29 +- .../Serialization/JsonPropertyInfoCommon.cs | 26 + .../JsonSerializer.Read.HandleArray.cs | 3 +- .../ReflectionEmitMaterializer.cs | 9 + .../Serialization/ReflectionMaterializer.cs | 12 + .../tests/Serialization/Array.ReadTests.cs | 16 + .../tests/Serialization/Array.WriteTests.cs | 46 ++ .../tests/Serialization/Null.WriteTests.cs | 10 + .../tests/Serialization/PolymorphicTests.cs | 114 ++++ .../Serialization/TestClasses.Polymorphic.cs | 70 +- .../TestClasses.SimpleTestClass.cs | 73 ++ .../TestClasses.SimpleTestClassWithObject.cs | 83 +++ .../tests/Serialization/TestClasses.cs | 290 ++++++++ .../tests/Serialization/TestData.cs | 6 + .../Value.ReadTests.GenericCollections.cs | 631 ++++++++++++++++++ .../Value.ReadTests.ImmutableCollections.cs | 548 +++++++++++++++ .../tests/Serialization/Value.ReadTests.cs | 329 +-------- .../Value.WriteTests.GenericCollections.cs | 492 ++++++++++++++ .../Value.WriteTests.ImmutableCollections.cs | 397 +++++++++++ .../tests/Serialization/Value.WriteTests.cs | 277 +------- .../tests/System.Text.Json.Tests.csproj | 4 + 30 files changed, 3045 insertions(+), 653 deletions(-) create mode 100644 src/System.Text.Json/src/System/Text/Json/Serialization/Converters/DefaultIEnumerableConstructibleConverter.cs create mode 100644 src/System.Text.Json/src/System/Text/Json/Serialization/Converters/DefaultImmutableConverter.cs create mode 100644 src/System.Text.Json/tests/Serialization/Value.ReadTests.GenericCollections.cs create mode 100644 src/System.Text.Json/tests/Serialization/Value.ReadTests.ImmutableCollections.cs create mode 100644 src/System.Text.Json/tests/Serialization/Value.WriteTests.GenericCollections.cs create mode 100644 src/System.Text.Json/tests/Serialization/Value.WriteTests.ImmutableCollections.cs diff --git a/src/System.Text.Json/src/Resources/Strings.resx b/src/System.Text.Json/src/Resources/Strings.resx index f2f72cbc78fa..dc3eb4a08e31 100644 --- a/src/System.Text.Json/src/Resources/Strings.resx +++ b/src/System.Text.Json/src/Resources/Strings.resx @@ -339,4 +339,7 @@ An item with the same property name '{0}' has already been added. + + Deserialization of type {0} is not supported. + \ No newline at end of file diff --git a/src/System.Text.Json/src/System.Text.Json.csproj b/src/System.Text.Json/src/System.Text.Json.csproj index 99d08f729119..14f1ecbefb57 100644 --- a/src/System.Text.Json/src/System.Text.Json.csproj +++ b/src/System.Text.Json/src/System.Text.Json.csproj @@ -49,6 +49,8 @@ + + diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/ClassMaterializer.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/ClassMaterializer.cs index 75d1f8cc112f..5f786400051e 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/ClassMaterializer.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/ClassMaterializer.cs @@ -2,10 +2,37 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System.Collections; +using System.Collections.Generic; +using System.Diagnostics; +using System.Reflection; +using System.Text.Json.Serialization.Converters; + namespace System.Text.Json.Serialization { internal abstract class ClassMaterializer { public abstract JsonClassInfo.ConstructorDelegate CreateConstructor(Type classType); + + public abstract object ImmutableCreateRange(Type constructingType, Type elementType); + + protected MethodInfo ImmutableCreateRangeMethod(Type constructingType, Type elementType) + { + MethodInfo[] constructingTypeMethods = constructingType.GetMethods(); + MethodInfo createRange = null; + + foreach (MethodInfo method in constructingTypeMethods) + { + if (method.Name == "CreateRange" && method.GetParameters().Length == 1) + { + createRange = method; + break; + } + } + + Debug.Assert(createRange != null); + + return createRange.MakeGenericMethod(elementType); + } } } diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/DefaultArrayConverter.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/DefaultArrayConverter.cs index f48d347392cf..bc2ee860d8cd 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/DefaultArrayConverter.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/DefaultArrayConverter.cs @@ -9,8 +9,10 @@ namespace System.Text.Json.Serialization.Converters { internal sealed class DefaultArrayConverter : JsonEnumerableConverter { - public override IEnumerable CreateFromList(Type elementType, IList sourceList) + public override IEnumerable CreateFromList(ref ReadStack state, IList sourceList, JsonSerializerOptions options) { + Type elementType = state.Current.GetElementType(); + Array array; if (sourceList.Count > 0 && sourceList[0] is Array probe) diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/DefaultEnumerableConverter.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/DefaultEnumerableConverter.cs index afddd6510da1..3e8c81f219d9 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/DefaultEnumerableConverter.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/DefaultEnumerableConverter.cs @@ -1,4 +1,8 @@ -using System.Collections; +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Collections; using System.Collections.Generic; using System.Text.Json.Serialization.Policies; @@ -15,10 +19,7 @@ public JsonEnumerableT(IList sourceList) foreach (object item in sourceList) { - if (item is T itemT) - { - _list.Add(itemT); - } + _list.Add((T)item); } } @@ -81,8 +82,10 @@ IEnumerator IEnumerable.GetEnumerator() internal sealed class DefaultEnumerableConverter : JsonEnumerableConverter { - public override IEnumerable CreateFromList(Type elementType, IList sourceList) + public override IEnumerable CreateFromList(ref ReadStack state, IList sourceList, JsonSerializerOptions options) { + Type elementType = state.Current.GetElementType(); + Type t = typeof(JsonEnumerableT<>).MakeGenericType(elementType); return (IEnumerable)Activator.CreateInstance(t, sourceList); } diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/DefaultIEnumerableConstructibleConverter.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/DefaultIEnumerableConstructibleConverter.cs new file mode 100644 index 000000000000..8aa82ed1b6f7 --- /dev/null +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/DefaultIEnumerableConstructibleConverter.cs @@ -0,0 +1,43 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Collections; +using System.Collections.Concurrent; +using System.Text.Json.Serialization.Policies; + +namespace System.Text.Json.Serialization.Converters +{ + internal sealed class DefaultIEnumerableConstructibleConverter : JsonEnumerableConverter + { + public static ConcurrentDictionary s_objectJsonProperties = new ConcurrentDictionary(); + + public override IEnumerable CreateFromList(ref ReadStack state, IList sourceList, JsonSerializerOptions options) + { + Type enumerableType = state.Current.JsonPropertyInfo.RuntimePropertyType; + JsonClassInfo elementClassInfo = state.Current.JsonPropertyInfo.ElementClassInfo; + + JsonPropertyInfo propertyInfo; + if (elementClassInfo.ClassType == ClassType.Object) + { + Type objectType = elementClassInfo.Type; + + if (s_objectJsonProperties.ContainsKey(objectType)) + { + propertyInfo = s_objectJsonProperties[objectType]; + } + else + { + propertyInfo = JsonClassInfo.CreateProperty(objectType, objectType, null, typeof(object), options); + s_objectJsonProperties[objectType] = propertyInfo; + } + } + else + { + propertyInfo = elementClassInfo.GetPolicyProperty(); + } + + return propertyInfo.CreateIEnumerableConstructibleType(enumerableType, sourceList); + } + } +} diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/DefaultImmutableConverter.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/DefaultImmutableConverter.cs new file mode 100644 index 000000000000..00b77ba795b2 --- /dev/null +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/DefaultImmutableConverter.cs @@ -0,0 +1,134 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Collections; +using System.Collections.Generic; +using System.Collections.Concurrent; +using System.Diagnostics; +using System.Text.Json.Serialization.Policies; + +namespace System.Text.Json.Serialization.Converters +{ + // This converter returns enumerables in the System.Collections.Immutable namespace. + internal sealed class DefaultImmutableConverter : JsonEnumerableConverter + { + public const string ImmutableNamespace = "System.Collections.Immutable"; + + private const string ImmutableListTypeName = "System.Collections.Immutable.ImmutableList"; + private const string ImmutableListGenericTypeName = "System.Collections.Immutable.ImmutableList`1"; + private const string ImmutableListGenericInterfaceTypeName = "System.Collections.Immutable.IImmutableList`1"; + + private const string ImmutableStackTypeName = "System.Collections.Immutable.ImmutableStack"; + private const string ImmutableStackGenericTypeName = "System.Collections.Immutable.ImmutableStack`1"; + private const string ImmutableStackGenericInterfaceTypeName = "System.Collections.Immutable.IImmutableStack`1"; + + private const string ImmutableQueueTypeName = "System.Collections.Immutable.ImmutableQueue"; + private const string ImmutableQueueGenericTypeName = "System.Collections.Immutable.ImmutableQueue`1"; + private const string ImmutableQueueGenericInterfaceTypeName = "System.Collections.Immutable.IImmutableQueue`1"; + + private const string ImmutableSortedSetTypeName = "System.Collections.Immutable.ImmutableSortedSet"; + private const string ImmutableSortedSetGenericTypeName = "System.Collections.Immutable.ImmutableSortedSet`1"; + + private const string ImmutableHashSetTypeName = "System.Collections.Immutable.ImmutableHashSet"; + private const string ImmutableHashSetGenericTypeName = "System.Collections.Immutable.ImmutableHashSet`1"; + private const string ImmutableSetGenericInterfaceTypeName = "System.Collections.Immutable.IImmutableSet`1"; + + internal delegate object ImmutableCreateRangeDelegate(IEnumerable items); + + public static ConcurrentDictionary CreateRangeDelegates = new ConcurrentDictionary(); + + private string GetConstructingTypeName(string immutableCollectionTypeName) + { + switch (immutableCollectionTypeName) + { + case ImmutableListGenericTypeName: + case ImmutableListGenericInterfaceTypeName: + return ImmutableListTypeName; + case ImmutableStackGenericTypeName: + case ImmutableStackGenericInterfaceTypeName: + return ImmutableStackTypeName; + case ImmutableQueueGenericTypeName: + case ImmutableQueueGenericInterfaceTypeName: + return ImmutableQueueTypeName; + case ImmutableSortedSetGenericTypeName: + return ImmutableSortedSetTypeName; + case ImmutableHashSetGenericTypeName: + case ImmutableSetGenericInterfaceTypeName: + return ImmutableHashSetTypeName; + default: + // TODO: Refactor exception throw following serialization exception changes. + throw new NotSupportedException(SR.Format(SR.DeserializeTypeNotSupported, immutableCollectionTypeName)); + } + } + + private string GetDelegateKey( + Type immutableCollectionType, + Type elementType, + out Type underlyingType, + out string constructingTypeName) + { + // Use the generic type definition of the immutable collection to determine an appropriate constructing type, + // i.e. a type that we can invoke the `CreateRange` method on, which returns an assignable immutable collection. + underlyingType = immutableCollectionType.GetGenericTypeDefinition(); + constructingTypeName = GetConstructingTypeName(underlyingType.FullName); + + return $"{constructingTypeName}:{elementType.FullName}"; + } + + public void RegisterImmutableCollectionType(Type immutableCollectionType, Type elementType, JsonSerializerOptions options) + { + // Get a unique identifier for a delegate which will point to the appropiate CreateRange method. + string delegateKey = GetDelegateKey(immutableCollectionType, elementType, out Type underlyingType, out string constructingTypeName); + + // Exit if we have registered this immutable collection type. + if (CreateRangeDelegates.ContainsKey(delegateKey)) + { + return; + } + + // Get the constructing type. + Type constructingType = underlyingType.Assembly.GetType(constructingTypeName); + + // Create a delegate which will point to the CreateRange method. + object createRangeDelegate = options.ClassMaterializerStrategy.ImmutableCreateRange(constructingType, elementType); + Debug.Assert(createRangeDelegate != null); + + // Cache the delegate + CreateRangeDelegates.TryAdd(delegateKey, createRangeDelegate); + } + + public override IEnumerable CreateFromList(ref ReadStack state, IList sourceList, JsonSerializerOptions options) + { + Type immutableCollectionType = state.Current.JsonPropertyInfo.RuntimePropertyType; + Type elementType = state.Current.GetElementType(); + + string delegateKey = GetDelegateKey(immutableCollectionType, elementType, out _, out _); + Debug.Assert(CreateRangeDelegates.ContainsKey(delegateKey)); + + JsonClassInfo elementClassInfo = state.Current.JsonPropertyInfo.ElementClassInfo; + + JsonPropertyInfo propertyInfo; + if (elementClassInfo.ClassType == ClassType.Object) + { + Type objectType = elementClassInfo.Type; + + if (DefaultIEnumerableConstructibleConverter.s_objectJsonProperties.ContainsKey(objectType)) + { + propertyInfo = DefaultIEnumerableConstructibleConverter.s_objectJsonProperties[objectType]; + } + else + { + propertyInfo = JsonClassInfo.CreateProperty(objectType, objectType, null, typeof(object), options); + DefaultIEnumerableConstructibleConverter.s_objectJsonProperties[objectType] = propertyInfo; + } + } + else + { + propertyInfo = elementClassInfo.GetPolicyProperty(); + } + + return propertyInfo.CreateImmutableCollectionFromList(delegateKey, sourceList); + } + } +} diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonClassInfo.AddProperty.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonClassInfo.AddProperty.cs index 8eaebc9f33d3..05b9ca1df630 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonClassInfo.AddProperty.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonClassInfo.AddProperty.cs @@ -52,7 +52,7 @@ private JsonPropertyInfo AddProperty(Type propertyType, PropertyInfo propertyInf return jsonInfo; } - internal JsonPropertyInfo CreateProperty(Type declaredPropertyType, Type runtimePropertyType, PropertyInfo propertyInfo, Type parentClassType, JsonSerializerOptions options) + internal static JsonPropertyInfo CreateProperty(Type declaredPropertyType, Type runtimePropertyType, PropertyInfo propertyInfo, Type parentClassType, JsonSerializerOptions options) { Type collectionElementType = null; switch (GetClassType(runtimePropertyType)) diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonEnumerableConverter.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonEnumerableConverter.cs index dd92cec1e4a0..3d2d587108b4 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonEnumerableConverter.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonEnumerableConverter.cs @@ -3,11 +3,12 @@ // See the LICENSE file in the project root for more information. using System.Collections; +using System.Collections.Generic; namespace System.Text.Json.Serialization.Policies { internal abstract class JsonEnumerableConverter { - public abstract IEnumerable CreateFromList(Type elementType, IList sourceList); + public abstract IEnumerable CreateFromList(ref ReadStack state, IList sourceList, JsonSerializerOptions options); } } diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfo.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfo.cs index 3702b018dca5..8c429bc4d722 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfo.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfo.cs @@ -2,8 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System.Buffers; using System.Collections; +using System.Collections.Generic; using System.Diagnostics; using System.Reflection; using System.Text.Json.Serialization.Converters; @@ -17,6 +17,8 @@ internal abstract class JsonPropertyInfo // Cache the converters so they don't get created for every enumerable property. private static readonly JsonEnumerableConverter s_jsonArrayConverter = new DefaultArrayConverter(); private static readonly JsonEnumerableConverter s_jsonEnumerableConverter = new DefaultEnumerableConverter(); + private static readonly JsonEnumerableConverter s_jsonIEnumerableConstuctibleConverter = new DefaultIEnumerableConstructibleConverter(); + private static readonly JsonEnumerableConverter s_jsonImmutableConverter = new DefaultImmutableConverter(); public ClassType ClassType; @@ -40,7 +42,6 @@ internal abstract class JsonPropertyInfo public bool IgnoreNullValues { get; private set; } - // todo: to minimize hashtable lookups, cache JsonClassInfo: //public JsonClassInfo ClassInfo; @@ -201,10 +202,6 @@ private void DetermineSerializationCapabilities(JsonSerializerOptions options) { ShouldDeserialize = true; } - //else - //{ - // // todo: future feature that allows non-List types (e.g. from System.Collections.Immutable) to have converters. - //} } //else if (HasSetter) //{ @@ -228,6 +225,22 @@ private void DetermineSerializationCapabilities(JsonSerializerOptions options) { EnumerableConverter = s_jsonEnumerableConverter; } + // Else if IList can't be assigned from the property type (we populate and return an IList directly) + // and the type can be constructed with an IEnumerable, then use the + // IEnumerableConstructible converter to create the instance. + else if (!typeof(IList).IsAssignableFrom(RuntimePropertyType) && + RuntimePropertyType.GetConstructor(new Type[] { typeof(List<>).MakeGenericType(elementType) }) != null) + { + EnumerableConverter = s_jsonIEnumerableConstuctibleConverter; + } + // Else if it's a System.Collections.Immutable type with one generic argument. + else if (RuntimePropertyType.IsGenericType && + RuntimePropertyType.FullName.StartsWith(DefaultImmutableConverter.ImmutableNamespace) && + RuntimePropertyType.GetGenericArguments().Length == 1) + { + EnumerableConverter = s_jsonImmutableConverter; + ((DefaultImmutableConverter)EnumerableConverter).RegisterImmutableCollectionType(RuntimePropertyType, elementType, options); + } } } else @@ -259,6 +272,10 @@ public TAttribute GetAttribute() where TAttribute : Attribute return (TAttribute)PropertyInfo?.GetCustomAttribute(typeof(TAttribute), inherit: false); } + public abstract IEnumerable CreateImmutableCollectionFromList(string delegateKey, IList sourceList); + + public abstract IEnumerable CreateIEnumerableConstructibleType(Type enumerableType, IList sourceList); + public abstract IList CreateConverterList(); public abstract Type GetDictionaryConcreteType(); diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfoCommon.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfoCommon.cs index 50f22bd92e68..708f2d9545c8 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfoCommon.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfoCommon.cs @@ -96,5 +96,31 @@ public override Type GetDictionaryConcreteType() { return typeof(Dictionary); } + + // Creates an IEnumerable and populates it with the items in the, + // sourceList argument then uses the delegateKey argument to identify the appropriate cached + // CreateRange method to create and return the desired immutable collection type. + public override IEnumerable CreateImmutableCollectionFromList(string delegateKey, IList sourceList) + { + Debug.Assert(DefaultImmutableConverter.CreateRangeDelegates.ContainsKey(delegateKey)); + + DefaultImmutableConverter.ImmutableCreateRangeDelegate createRangeDelegate = ( + (DefaultImmutableConverter.ImmutableCreateRangeDelegate)DefaultImmutableConverter.CreateRangeDelegates[delegateKey]); + + return (IEnumerable)createRangeDelegate.Invoke(CreateGenericIEnumerableFromList(sourceList)); + } + + public override IEnumerable CreateIEnumerableConstructibleType(Type enumerableType, IList sourceList) + { + return (IEnumerable)Activator.CreateInstance(enumerableType, CreateGenericIEnumerableFromList(sourceList)); + } + + private IEnumerable CreateGenericIEnumerableFromList(IList sourceList) + { + foreach (object item in sourceList) + { + yield return (TRuntimeProperty)item; + } + } } } diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleArray.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleArray.cs index a19e02f4f2b8..b36dbdf366c7 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleArray.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleArray.cs @@ -106,8 +106,7 @@ private static bool HandleEndArray( JsonEnumerableConverter converter = state.Current.JsonPropertyInfo.EnumerableConverter; Debug.Assert(converter != null); - Type elementType = state.Current.GetElementType(); - value = converter.CreateFromList(elementType, (IList)value); + value = converter.CreateFromList(ref state, (IList)value, options); setPropertyDirectly = true; } else if (!popStackOnEnd) diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/ReflectionEmitMaterializer.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/ReflectionEmitMaterializer.cs index d6e0efee526e..be5dec15cd46 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/ReflectionEmitMaterializer.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/ReflectionEmitMaterializer.cs @@ -6,6 +6,7 @@ using System.Diagnostics; using System.Reflection; using System.Reflection.Emit; +using System.Text.Json.Serialization.Converters; namespace System.Text.Json.Serialization { @@ -34,6 +35,14 @@ public override JsonClassInfo.ConstructorDelegate CreateConstructor(Type type) return (JsonClassInfo.ConstructorDelegate)dynamicMethod.CreateDelegate(typeof(JsonClassInfo.ConstructorDelegate)); } + + public override object ImmutableCreateRange(Type constructingType, Type elementType) + { + MethodInfo createRange = ImmutableCreateRangeMethod(constructingType, elementType); + + return createRange.CreateDelegate( + typeof(DefaultImmutableConverter.ImmutableCreateRangeDelegate<>).MakeGenericType(elementType), null); + } } } #endif diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/ReflectionMaterializer.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/ReflectionMaterializer.cs index 284affc37fb5..5c5c43173af0 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/ReflectionMaterializer.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/ReflectionMaterializer.cs @@ -2,6 +2,10 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System.Diagnostics; +using System.Reflection; +using System.Text.Json.Serialization.Converters; + namespace System.Text.Json.Serialization { internal sealed class ReflectionMaterializer : ClassMaterializer @@ -10,5 +14,13 @@ public override JsonClassInfo.ConstructorDelegate CreateConstructor(Type type) { return () => Activator.CreateInstance(type); } + + public override object ImmutableCreateRange(Type constructingType, Type elementType) + { + MethodInfo createRange = ImmutableCreateRangeMethod(constructingType, elementType); + + return createRange.CreateDelegate( + typeof(DefaultImmutableConverter.ImmutableCreateRangeDelegate<>).MakeGenericType(elementType), null); + } } } diff --git a/src/System.Text.Json/tests/Serialization/Array.ReadTests.cs b/src/System.Text.Json/tests/Serialization/Array.ReadTests.cs index 85fb64722025..29458f2eaae8 100644 --- a/src/System.Text.Json/tests/Serialization/Array.ReadTests.cs +++ b/src/System.Text.Json/tests/Serialization/Array.ReadTests.cs @@ -3,6 +3,8 @@ // See the LICENSE file in the project root for more information. using System.Collections.Generic; +using System.Collections.Immutable; +using System.Reflection; using Xunit; namespace System.Text.Json.Serialization.Tests @@ -161,5 +163,19 @@ public static void ReadClassWithGenericIReadOnlyListT() TestClassWithGenericIReadOnlyListT obj = JsonSerializer.Parse(TestClassWithGenericIReadOnlyListT.s_data); obj.Verify(); } + + [Fact] + public static void ReadClassWithObjectIEnumerableConstructibleTypes() + { + TestClassWithObjectIEnumerableConstructibleTypes obj = JsonSerializer.Parse(TestClassWithObjectIEnumerableConstructibleTypes.s_data); + obj.Verify(); + } + + [Fact] + public static void ReadClassWithObjectImmutableTypes() + { + TestClassWithObjectImmutableTypes obj = JsonSerializer.Parse(TestClassWithObjectImmutableTypes.s_data); + obj.Verify(); + } } } diff --git a/src/System.Text.Json/tests/Serialization/Array.WriteTests.cs b/src/System.Text.Json/tests/Serialization/Array.WriteTests.cs index d6e0715398d5..2926d4b6525a 100644 --- a/src/System.Text.Json/tests/Serialization/Array.WriteTests.cs +++ b/src/System.Text.Json/tests/Serialization/Array.WriteTests.cs @@ -318,5 +318,51 @@ public static void WriteClassWithObjectIReadOnlyListT() obj.Verify(); } } + + [Fact] + public static void WriteClassWithObjectIEnumerableConstructibleTypes() + { + string json; + + { + TestClassWithObjectIEnumerableConstructibleTypes obj = new TestClassWithObjectIEnumerableConstructibleTypes(); + obj.Initialize(); + obj.Verify(); + json = JsonSerializer.ToString(obj); + } + + { + TestClassWithObjectIEnumerableConstructibleTypes obj = JsonSerializer.Parse(json); + obj.Verify(); + } + + { + TestClassWithObjectIEnumerableConstructibleTypes obj = JsonSerializer.Parse(TestClassWithObjectIEnumerableConstructibleTypes.s_data); + obj.Verify(); + } + } + + [Fact] + public static void WriteClassWithObjectImmutableTypes() + { + string json; + + { + TestClassWithObjectImmutableTypes obj = new TestClassWithObjectImmutableTypes(); + obj.Initialize(); + obj.Verify(); + json = JsonSerializer.ToString(obj); + } + + { + TestClassWithObjectImmutableTypes obj = JsonSerializer.Parse(json); + obj.Verify(); + } + + { + TestClassWithObjectImmutableTypes obj = JsonSerializer.Parse(TestClassWithObjectImmutableTypes.s_data); + obj.Verify(); + } + } } } diff --git a/src/System.Text.Json/tests/Serialization/Null.WriteTests.cs b/src/System.Text.Json/tests/Serialization/Null.WriteTests.cs index 20b1925e9986..1759d25b592d 100644 --- a/src/System.Text.Json/tests/Serialization/Null.WriteTests.cs +++ b/src/System.Text.Json/tests/Serialization/Null.WriteTests.cs @@ -52,6 +52,11 @@ public static void NullReferences() obj.ICollectionT = null; obj.IReadOnlyCollectionT = null; obj.IReadOnlyListT = null; + obj.StackT = null; + obj.QueueT = null; + obj.HashSetT = null; + obj.LinkedListT = null; + obj.SortedSetT = null; obj.NullableInt = null; obj.NullableIntArray = null; obj.Object = null; @@ -65,6 +70,11 @@ public static void NullReferences() Assert.Contains(@"""ICollectionT"":null", json); Assert.Contains(@"""IReadOnlyCollectionT"":null", json); Assert.Contains(@"""IReadOnlyListT"":null", json); + Assert.Contains(@"""StackT"":null", json); + Assert.Contains(@"""QueueT"":null", json); + Assert.Contains(@"""HashSetT"":null", json); + Assert.Contains(@"""LinkedListT"":null", json); + Assert.Contains(@"""SortedSetT"":null", json); Assert.Contains(@"""NullableInt"":null", json); Assert.Contains(@"""Object"":null", json); Assert.Contains(@"""NullableIntArray"":null", json); diff --git a/src/System.Text.Json/tests/Serialization/PolymorphicTests.cs b/src/System.Text.Json/tests/Serialization/PolymorphicTests.cs index eaa0cd58eb98..238d4053b386 100644 --- a/src/System.Text.Json/tests/Serialization/PolymorphicTests.cs +++ b/src/System.Text.Json/tests/Serialization/PolymorphicTests.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System.Collections.Generic; +using System.Collections.Immutable; using Xunit; namespace System.Text.Json.Serialization.Tests @@ -68,6 +69,9 @@ public static void ParseUntyped() public static void ArrayAsRootObject() { const string ExpectedJson = @"[1,true,{""City"":""MyCity""},null,""foo""]"; + const string ReversedExpectedJson = @"[""foo"",null,{""City"":""MyCity""},true,1]"; + + string[] expectedObjects = { @"""foo""", @"null", @"{""City"":""MyCity""}", @"true", @"1" }; var address = new Address(); address.Initialize(); @@ -125,6 +129,102 @@ public static void ArrayAsRootObject() json = JsonSerializer.ToString(ireadonlylist); Assert.Equal(ExpectedJson, json); + + Stack stack = new Stack(new List { 1, true, address, null, "foo" }); + json = JsonSerializer.ToString(stack); + Assert.Equal(ReversedExpectedJson, json); + + json = JsonSerializer.ToString(stack); + Assert.Equal(ReversedExpectedJson, json); + + Queue queue = new Queue(new List { 1, true, address, null, "foo" }); + json = JsonSerializer.ToString(queue); + Assert.Equal(ExpectedJson, json); + + json = JsonSerializer.ToString(queue); + Assert.Equal(ExpectedJson, json); + + HashSet hashset = new HashSet(new List { 1, true, address, null, "foo" }); + json = JsonSerializer.ToString(hashset); + Assert.Equal(ExpectedJson, json); + + json = JsonSerializer.ToString(hashset); + Assert.Equal(ExpectedJson, json); + + LinkedList linkedlist = new LinkedList(new List { 1, true, address, null, "foo" }); + json = JsonSerializer.ToString(linkedlist); + Assert.Equal(ExpectedJson, json); + + json = JsonSerializer.ToString(linkedlist); + Assert.Equal(ExpectedJson, json); + + IImmutableList iimmutablelist = ImmutableList.CreateRange(new List { 1, true, address, null, "foo" }); + json = JsonSerializer.ToString(iimmutablelist); + Assert.Equal(ExpectedJson, json); + + json = JsonSerializer.ToString(iimmutablelist); + Assert.Equal(ExpectedJson, json); + + IImmutableStack iimmutablestack = ImmutableStack.CreateRange(new List { 1, true, address, null, "foo" }); + json = JsonSerializer.ToString(iimmutablestack); + Assert.Equal(ReversedExpectedJson, json); + + json = JsonSerializer.ToString(iimmutablestack); + Assert.Equal(ReversedExpectedJson, json); + + IImmutableQueue iimmutablequeue = ImmutableQueue.CreateRange(new List { 1, true, address, null, "foo" }); + json = JsonSerializer.ToString(iimmutablequeue); + Assert.Equal(ExpectedJson, json); + + json = JsonSerializer.ToString(iimmutablequeue); + Assert.Equal(ExpectedJson, json); + + IImmutableSet iimmutableset = ImmutableHashSet.CreateRange(new List { 1, true, address, null, "foo" }); + json = JsonSerializer.ToString(iimmutableset); + foreach (string obj in expectedObjects) + { + Assert.Contains(obj, json); + } + + json = JsonSerializer.ToString(iimmutableset); + foreach (string obj in expectedObjects) + { + Assert.Contains(obj, json); + } + + ImmutableHashSet immutablehashset = ImmutableHashSet.CreateRange(new List { 1, true, address, null, "foo" }); + json = JsonSerializer.ToString(immutablehashset); + foreach (string obj in expectedObjects) + { + Assert.Contains(obj, json); + } + + json = JsonSerializer.ToString(immutablehashset); + foreach (string obj in expectedObjects) + { + Assert.Contains(obj, json); + } + + ImmutableList immutablelist = ImmutableList.CreateRange(new List { 1, true, address, null, "foo" }); + json = JsonSerializer.ToString(immutablelist); + Assert.Equal(ExpectedJson, json); + + json = JsonSerializer.ToString(immutablelist); + Assert.Equal(ExpectedJson, json); + + ImmutableStack immutablestack = ImmutableStack.CreateRange(new List { 1, true, address, null, "foo" }); + json = JsonSerializer.ToString(immutablestack); + Assert.Equal(ReversedExpectedJson, json); + + json = JsonSerializer.ToString(immutablestack); + Assert.Equal(ReversedExpectedJson, json); + + ImmutableQueue immutablequeue = ImmutableQueue.CreateRange(new List { 1, true, address, null, "foo" }); + json = JsonSerializer.ToString(immutablequeue); + Assert.Equal(ExpectedJson, json); + + json = JsonSerializer.ToString(immutablequeue); + Assert.Equal(ExpectedJson, json); } [Fact] @@ -164,6 +264,20 @@ static void Verify(string json) Assert.Contains(@"""ICollectionT"":[""Hello"",""World""]", json); Assert.Contains(@"""IReadOnlyCollectionT"":[""Hello"",""World""]", json); Assert.Contains(@"""IReadOnlyListT"":[""Hello"",""World""]", json); + Assert.Contains(@"""StackT"":[""World"",""Hello""]", json); + Assert.Contains(@"""QueueT"":[""Hello"",""World""]", json); + Assert.Contains(@"""HashSetT"":[""Hello"",""World""]", json); + Assert.Contains(@"""LinkedListT"":[""Hello"",""World""]", json); + Assert.Contains(@"""SortedSetT"":[""Hello"",""World""]", json); + Assert.Contains(@"""IImmutableListT"":[""Hello"",""World""]", json); + Assert.Contains(@"""IImmutableStackT"":[""World"",""Hello""]", json); + Assert.Contains(@"""IImmutableQueueT"":[""Hello"",""World""]", json); + Assert.True(json.Contains(@"""IImmutableSetT"":[""Hello"",""World""]") || json.Contains(@"""IImmutableSetT"":[""World"",""Hello""]")); + Assert.True(json.Contains(@"""ImmutableHashSetT"":[""Hello"",""World""]") || json.Contains(@"""ImmutableHashSetT"":[""World"",""Hello""]")); + Assert.Contains(@"""ImmutableListT"":[""Hello"",""World""]", json); + Assert.Contains(@"""ImmutableStackT"":[""World"",""Hello""]", json); + Assert.Contains(@"""ImmutableQueueT"":[""Hello"",""World""]", json); + Assert.Contains(@"""ImmutableSortedSetT"":[""Hello"",""World""]", json); Assert.Contains(@"""NullableInt"":42", json); Assert.Contains(@"""Object"":{}", json); Assert.Contains(@"""NullableIntArray"":[null,42,null]", json); diff --git a/src/System.Text.Json/tests/Serialization/TestClasses.Polymorphic.cs b/src/System.Text.Json/tests/Serialization/TestClasses.Polymorphic.cs index f97e14c28511..23708f69634a 100644 --- a/src/System.Text.Json/tests/Serialization/TestClasses.Polymorphic.cs +++ b/src/System.Text.Json/tests/Serialization/TestClasses.Polymorphic.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System.Collections.Generic; +using System.Collections.Immutable; using Xunit; namespace System.Text.Json.Serialization.Tests @@ -115,6 +116,20 @@ public class ObjectWithObjectProperties public object /*ICollection*/ ICollectionT { get; set; } public object /*IReadOnlyCollection*/ IReadOnlyCollectionT { get; set; } public object /*IReadOnlyList*/ IReadOnlyListT { get; set; } + public object /*Stack*/ StackT { get; set; } + public object /*Queue*/ QueueT { get; set; } + public object /*HashSet*/ HashSetT { get; set; } + public object /*LinkedList*/ LinkedListT { get; set; } + public object /*SortedSet*/ SortedSetT { get; set; } + public object /*IImmutableList*/ IImmutableListT { get; set; } + public object /*IImmutableStack*/ IImmutableStackT { get; set; } + public object /*IImmutableQueue*/ IImmutableQueueT { get; set; } + public object /*IImmutableSet*/ IImmutableSetT { get; set; } + public object /*ImmutableHashSet*/ ImmutableHashSetT { get; set; } + public object /*ImmutableList*/ ImmutableListT { get; set; } + public object /*ImmutableStack*/ ImmutableStackT { get; set; } + public object /*ImmutableQueue*/ ImmutableQueueT { get; set; } + public object /*ImmutableSortedSet*/ ImmutableSortedSetT { get; set; } public object /*int?*/ NullableInt { get; set; } public object /*object*/ Object { get; set; } public object /*int?[]*/ NullableIntArray { get; set; } @@ -124,40 +139,27 @@ public ObjectWithObjectProperties() Address = new Address(); ((Address)Address).Initialize(); - List = new List - { - "Hello", "World" - }; - - Array = new string[] - { - "Hello", "Again" - }; - - IEnumerableT = new List - { - "Hello", "World" - }; - - IListT = new List - { - "Hello", "World" - }; - - ICollectionT = new List - { - "Hello", "World" - }; - - IReadOnlyCollectionT = new List - { - "Hello", "World" - }; - - IReadOnlyListT = new List - { - "Hello", "World" - }; + List = new List { "Hello", "World" }; + Array = new string[] { "Hello", "Again" }; + IEnumerableT = new List { "Hello", "World" }; + IListT = new List { "Hello", "World" }; + ICollectionT = new List { "Hello", "World" }; + IReadOnlyCollectionT = new List { "Hello", "World" }; + IReadOnlyListT = new List { "Hello", "World" }; + StackT = new Stack(new List { "Hello", "World" }); + QueueT = new Queue(new List { "Hello", "World" }); + HashSetT = new HashSet(new List { "Hello", "World" }); + LinkedListT = new LinkedList(new List { "Hello", "World" }); + SortedSetT = new SortedSet(new List { "Hello", "World" }); + IImmutableListT = ImmutableList.CreateRange(new List { "Hello", "World" }); + IImmutableStackT = ImmutableStack.CreateRange(new List { "Hello", "World" }); + IImmutableQueueT = ImmutableQueue.CreateRange(new List { "Hello", "World" }); + IImmutableSetT = ImmutableHashSet.CreateRange(new List { "Hello", "World" }); + ImmutableHashSetT = ImmutableHashSet.CreateRange(new List { "Hello", "World" }); + ImmutableListT = ImmutableList.CreateRange(new List { "Hello", "World" }); + ImmutableStackT = ImmutableStack.CreateRange(new List { "Hello", "World" }); + ImmutableQueueT = ImmutableQueue.CreateRange(new List { "Hello", "World" }); + ImmutableSortedSetT = ImmutableSortedSet.CreateRange(new List { "Hello", "World" }); NullableInt = new int?(42); Object = new object(); diff --git a/src/System.Text.Json/tests/Serialization/TestClasses.SimpleTestClass.cs b/src/System.Text.Json/tests/Serialization/TestClasses.SimpleTestClass.cs index 8edbc63bca44..f5b090fee2de 100644 --- a/src/System.Text.Json/tests/Serialization/TestClasses.SimpleTestClass.cs +++ b/src/System.Text.Json/tests/Serialization/TestClasses.SimpleTestClass.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System.Collections.Generic; +using System.Collections.Immutable; using System.Linq; using Xunit; @@ -57,6 +58,20 @@ public class SimpleTestClass : ITestClass public Dictionary MyStringToStringDict { get; set; } public IDictionary MyStringToStringIDict { get; set; } public IReadOnlyDictionary MyStringToStringIReadOnlyDict { get; set; } + public Stack MyStringStackT { get; set; } + public Queue MyStringQueueT { get; set; } + public HashSet MyStringHashSetT { get; set; } + public LinkedList MyStringLinkedListT { get; set; } + public SortedSet MyStringSortedSetT { get; set; } + public IImmutableList MyStringIImmutableListT { get; set; } + public IImmutableStack MyStringIImmutableStackT { get; set; } + public IImmutableQueue MyStringIImmutableQueueT { get; set; } + public IImmutableSet MyStringIImmutableSetT { get; set; } + public ImmutableHashSet MyStringImmutableHashSetT { get; set; } + public ImmutableList MyStringImmutableListT { get; set; } + public ImmutableStack MyStringImmutableStackT { get; set; } + public ImmutableQueue MyStringImmutablQueueT { get; set; } + public ImmutableSortedSet MyStringImmutableSortedSetT { get; set; } public List MyListOfNullString { get; set; } public static readonly string s_json = $"{{{s_partialJsonProperties},{s_partialJsonArrays}}}"; @@ -110,6 +125,20 @@ public class SimpleTestClass : ITestClass @"""MyStringICollectionT"" : [""Hello""]," + @"""MyStringIReadOnlyCollectionT"" : [""Hello""]," + @"""MyStringIReadOnlyListT"" : [""Hello""]," + + @"""MyStringStackT"" : [""Hello"", ""World""]," + + @"""MyStringQueueT"" : [""Hello"", ""World""]," + + @"""MyStringHashSetT"" : [""Hello""]," + + @"""MyStringLinkedListT"" : [""Hello""]," + + @"""MyStringSortedSetT"" : [""Hello""]," + + @"""MyStringIImmutableListT"" : [""Hello""]," + + @"""MyStringIImmutableStackT"" : [""Hello""]," + + @"""MyStringIImmutableQueueT"" : [""Hello""]," + + @"""MyStringIImmutableSetT"" : [""Hello""]," + + @"""MyStringImmutableHashSetT"" : [""Hello""]," + + @"""MyStringImmutableListT"" : [""Hello""]," + + @"""MyStringImmutableStackT"" : [""Hello""]," + + @"""MyStringImmutablQueueT"" : [""Hello""]," + + @"""MyStringImmutableSortedSetT"" : [""Hello""]," + @"""MyListOfNullString"" : [null]"; public static readonly byte[] s_data = Encoding.UTF8.GetBytes(s_json); @@ -164,6 +193,23 @@ public void Initialize() MyStringToStringDict = new Dictionary { { "key", "value" } }; MyStringToStringIDict = new Dictionary { { "key", "value" } }; MyStringToStringIReadOnlyDict = new Dictionary { { "key", "value" } }; + + MyStringStackT = new Stack(new List() { "Hello", "World" } ); + MyStringQueueT = new Queue(new List() { "Hello", "World" }); + MyStringHashSetT = new HashSet(new List() { "Hello" }); + MyStringLinkedListT = new LinkedList(new List() { "Hello" }); + MyStringSortedSetT = new SortedSet(new List() { "Hello" }); + + MyStringIImmutableListT = ImmutableList.CreateRange(new List { "Hello" }); + MyStringIImmutableStackT = ImmutableStack.CreateRange(new List { "Hello" }); + MyStringIImmutableQueueT = ImmutableQueue.CreateRange(new List { "Hello" }); + MyStringIImmutableSetT = ImmutableHashSet.CreateRange(new List { "Hello" }); + MyStringImmutableHashSetT = ImmutableHashSet.CreateRange(new List { "Hello" }); + MyStringImmutableListT = ImmutableList.CreateRange(new List { "Hello" }); + MyStringImmutableStackT = ImmutableStack.CreateRange(new List { "Hello" }); + MyStringImmutablQueueT = ImmutableQueue.CreateRange(new List { "Hello" }); + MyStringImmutableSortedSetT = ImmutableSortedSet.CreateRange(new List { "Hello" }); + MyListOfNullString = new List { null }; } @@ -217,6 +263,33 @@ public void Verify() Assert.Equal("value", MyStringToStringDict["key"]); Assert.Equal("value", MyStringToStringIDict["key"]); Assert.Equal("value", MyStringToStringIReadOnlyDict["key"]); + + Assert.Equal(2, MyStringStackT.Count); + Assert.True(MyStringStackT.Contains("Hello")); + Assert.True(MyStringStackT.Contains("World")); + + string[] expectedQueue = { "Hello", "World" }; + int i = 0; + foreach (string item in MyStringQueueT) + { + Assert.Equal(expectedQueue[i], item); + i++; + } + + Assert.Equal("Hello", MyStringHashSetT.First()); + Assert.Equal("Hello", MyStringLinkedListT.First()); + Assert.Equal("Hello", MyStringSortedSetT.First()); + + Assert.Equal("Hello", MyStringIImmutableListT[0]); + Assert.Equal("Hello", MyStringIImmutableStackT.First()); + Assert.Equal("Hello", MyStringIImmutableQueueT.First()); + Assert.Equal("Hello", MyStringIImmutableSetT.First()); + Assert.Equal("Hello", MyStringImmutableHashSetT.First()); + Assert.Equal("Hello", MyStringImmutableListT[0]); + Assert.Equal("Hello", MyStringImmutableStackT.First()); + Assert.Equal("Hello", MyStringImmutablQueueT.First()); + Assert.Equal("Hello", MyStringImmutableSortedSetT.First()); + Assert.Null(MyListOfNullString[0]); } } diff --git a/src/System.Text.Json/tests/Serialization/TestClasses.SimpleTestClassWithObject.cs b/src/System.Text.Json/tests/Serialization/TestClasses.SimpleTestClassWithObject.cs index 042b395bbd6a..6ae05115e843 100644 --- a/src/System.Text.Json/tests/Serialization/TestClasses.SimpleTestClassWithObject.cs +++ b/src/System.Text.Json/tests/Serialization/TestClasses.SimpleTestClassWithObject.cs @@ -3,6 +3,8 @@ // See the LICENSE file in the project root for more information. using System.Collections.Generic; +using System.Collections.Immutable; +using System.Linq; using Xunit; namespace System.Text.Json.Serialization.Tests @@ -35,6 +37,20 @@ public class SimpleTestClassWithObject : SimpleTestClassWithSimpleObject public object MyStringToStringDict { get; set; } public object MyStringToStringIDict { get; set; } public object MyStringToStringIReadOnlyDict { get; set; } + public object MyStringStackT { get; set; } + public object MyStringQueueT { get; set; } + public object MyStringHashSetT { get; set; } + public object MyStringLinkedListT { get; set; } + public object MyStringSortedSetT { get; set; } + public object MyStringIImmutableListT { get; set; } + public object MyStringIImmutableStackT { get; set; } + public object MyStringIImmutableQueueT { get; set; } + public object MyStringIImmutableSetT { get; set; } + public object MyStringImmutableHashSetT { get; set; } + public object MyStringImmutableListT { get; set; } + public object MyStringImmutableStackT { get; set; } + public object MyStringImmutablQueueT { get; set; } + public object MyStringImmutableSortedSetT { get; set; } public new static readonly string s_json = @"{" + @@ -81,6 +97,20 @@ public class SimpleTestClassWithObject : SimpleTestClassWithSimpleObject @"""MyStringToStringDict"" : {""key"" : ""value""}," + @"""MyStringToStringIDict"" : {""key"" : ""value""}," + @"""MyStringToStringIReadOnlyDict"" : {""key"" : ""value""}" + + @"""MyStringStackT"" : [""Hello"", ""World""]," + + @"""MyStringQueueT"" : [""Hello"", ""World""]," + + @"""MyStringHashSetT"" : [""Hello""]," + + @"""MyStringLinkedListT"" : [""Hello""]," + + @"""MyStringSortedSetT"" : [""Hello""]," + + @"""MyStringIImmutableListT"" : [""Hello""]," + + @"""MyStringIImmutableStackT"" : [""Hello""]," + + @"""MyStringIImmutableQueueT"" : [""Hello""]," + + @"""MyStringIImmutableSetT"" : [""Hello""]," + + @"""MyStringImmutableHashSetT"" : [""Hello""]," + + @"""MyStringImmutableListT"" : [""Hello""]," + + @"""MyStringImmutableStackT"" : [""Hello""]," + + @"""MyStringImmutablQueueT"" : [""Hello""]," + + @"""MyStringImmutableSortedSetT"" : [""Hello""]" + @"}"; public new static readonly byte[] s_data = Encoding.UTF8.GetBytes(s_json); @@ -117,6 +147,22 @@ public override void Initialize() MyStringToStringDict = new Dictionary { { "key", "value" } }; MyStringToStringIDict = new Dictionary { { "key", "value" } }; MyStringToStringIReadOnlyDict = new Dictionary { { "key", "value" } }; + + MyStringStackT = new Stack(new List() { "Hello", "World" }); + MyStringQueueT = new Queue(new List() { "Hello", "World" }); + MyStringHashSetT = new HashSet(new List() { "Hello" }); + MyStringLinkedListT = new LinkedList(new List() { "Hello" }); + MyStringSortedSetT = new SortedSet(new List() { "Hello" }); + + MyStringIImmutableListT = ImmutableList.CreateRange(new List { "Hello" }); + MyStringIImmutableStackT = ImmutableStack.CreateRange(new List { "Hello" }); + MyStringIImmutableQueueT = ImmutableQueue.CreateRange(new List { "Hello" }); + MyStringIImmutableSetT = ImmutableHashSet.CreateRange(new List { "Hello" }); + MyStringImmutableHashSetT = ImmutableHashSet.CreateRange(new List { "Hello" }); + MyStringImmutableListT = ImmutableList.CreateRange(new List { "Hello" }); + MyStringImmutableStackT = ImmutableStack.CreateRange(new List { "Hello" }); + MyStringImmutablQueueT = ImmutableQueue.CreateRange(new List { "Hello" }); + MyStringImmutableSortedSetT = ImmutableSortedSet.CreateRange(new List { "Hello" }); } public override void Verify() @@ -140,6 +186,43 @@ public override void Verify() Assert.Equal(2.2d, ((double[])MyDoubleArray)[0]); Assert.Equal(new DateTime(2019, 1, 30, 12, 1, 2, DateTimeKind.Utc), ((DateTime[])MyDateTimeArray)[0]); Assert.Equal(SampleEnum.Two, ((SampleEnum[])MyEnumArray)[0]); + + Assert.Equal("Hello", ((List)MyStringList)[0]); + Assert.Equal("Hello", ((IEnumerable)MyStringIEnumerableT).First()); + Assert.Equal("Hello", ((IList)MyStringIListT)[0]); + Assert.Equal("Hello", ((ICollection)MyStringICollectionT).First()); + Assert.Equal("Hello", ((IReadOnlyCollection)MyStringIReadOnlyCollectionT).First()); + Assert.Equal("Hello", ((IReadOnlyList)MyStringIReadOnlyListT)[0]); + + Assert.Equal("value", ((Dictionary)MyStringToStringDict)["key"]); + Assert.Equal("value", ((IDictionary)MyStringToStringIDict)["key"]); + Assert.Equal("value", ((IReadOnlyDictionary)MyStringToStringIReadOnlyDict)["key"]); + + Assert.Equal(2, ((Stack)MyStringStackT).Count); + Assert.True(((Stack)MyStringStackT).Contains("Hello")); + Assert.True(((Stack)MyStringStackT).Contains("World")); + + string[] expectedQueue = { "Hello", "World" }; + int i = 0; + foreach (string item in ((Queue)MyStringQueueT)) + { + Assert.Equal(expectedQueue[i], item); + i++; + } + + Assert.Equal("Hello", ((HashSet)MyStringHashSetT).First()); + Assert.Equal("Hello", ((LinkedList)MyStringLinkedListT).First()); + Assert.Equal("Hello", ((SortedSet)MyStringSortedSetT).First()); + + Assert.Equal("Hello", ((IImmutableList)MyStringIImmutableListT)[0]); + Assert.Equal("Hello", ((IImmutableStack)MyStringIImmutableStackT).First()); + Assert.Equal("Hello", ((IImmutableQueue)MyStringIImmutableQueueT).First()); + Assert.Equal("Hello", ((IImmutableSet)MyStringIImmutableSetT).First()); + Assert.Equal("Hello", ((ImmutableHashSet)MyStringImmutableHashSetT).First()); + Assert.Equal("Hello", ((ImmutableList)MyStringImmutableListT)[0]); + Assert.Equal("Hello", ((ImmutableStack)MyStringImmutableStackT).First()); + Assert.Equal("Hello", ((ImmutableQueue)MyStringImmutablQueueT).First()); + Assert.Equal("Hello", ((ImmutableSortedSet)MyStringImmutableSortedSetT).First()); } } } diff --git a/src/System.Text.Json/tests/Serialization/TestClasses.cs b/src/System.Text.Json/tests/Serialization/TestClasses.cs index 380fbab122ba..22e7eaceb6f1 100644 --- a/src/System.Text.Json/tests/Serialization/TestClasses.cs +++ b/src/System.Text.Json/tests/Serialization/TestClasses.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System.Collections.Generic; +using System.Collections.Immutable; using System.Linq; using Xunit; @@ -768,6 +769,295 @@ public void Verify() } } + public class TestClassWithObjectIEnumerableConstructibleTypes : ITestClass + { + public Stack MyStack { get; set; } + public Queue MyQueue { get; set; } + public HashSet MyHashSet { get; set; } + public LinkedList MyLinkedList { get; set; } + + public static readonly byte[] s_data = Encoding.UTF8.GetBytes( + @"{" + + @"""MyStack"":[" + + SimpleTestClass.s_json + "," + + SimpleTestClass.s_json + + @"]," + + @"""MyQueue"":[" + + SimpleTestClass.s_json + "," + + SimpleTestClass.s_json + + @"]," + + @"""MyHashSet"":[" + + SimpleTestClass.s_json + "," + + SimpleTestClass.s_json + + @"]," + + @"""MyLinkedList"":[" + + SimpleTestClass.s_json + "," + + SimpleTestClass.s_json + + @"]" + + @"}"); + + public void Initialize() + { + MyStack = new Stack(); + { + SimpleTestClass obj = new SimpleTestClass(); + obj.Initialize(); + MyStack.Push(obj); + } + { + SimpleTestClass obj = new SimpleTestClass(); + obj.Initialize(); + MyStack.Push(obj); + } + + MyQueue = new Queue(); + { + SimpleTestClass obj = new SimpleTestClass(); + obj.Initialize(); + MyQueue.Enqueue(obj); + } + { + SimpleTestClass obj = new SimpleTestClass(); + obj.Initialize(); + MyQueue.Enqueue(obj); + } + + MyHashSet = new HashSet(); + { + SimpleTestClass obj = new SimpleTestClass(); + obj.Initialize(); + MyHashSet.Add(obj); + } + { + SimpleTestClass obj = new SimpleTestClass(); + obj.Initialize(); + MyHashSet.Add(obj); + } + + MyLinkedList = new LinkedList(); + { + SimpleTestClass obj = new SimpleTestClass(); + obj.Initialize(); + MyLinkedList.AddLast(obj); + } + { + SimpleTestClass obj = new SimpleTestClass(); + obj.Initialize(); + MyLinkedList.AddLast(obj); + } + } + + public void Verify() + { + Assert.Equal(2, MyStack.Count); + foreach (SimpleTestClass data in MyStack) + { + data.Verify(); + } + + Assert.Equal(2, MyQueue.Count); + foreach (SimpleTestClass data in MyQueue) + { + data.Verify(); + } + + Assert.Equal(2, MyHashSet.Count); + foreach (SimpleTestClass data in MyHashSet) + { + data.Verify(); + } + + Assert.Equal(2, MyLinkedList.Count); + foreach (SimpleTestClass data in MyLinkedList) + { + data.Verify(); + } + } + } + + public class TestClassWithObjectImmutableTypes : ITestClass + { + public IImmutableList MyIImmutableList { get; set; } + public IImmutableStack MyIImmutableStack { get; set; } + public IImmutableQueue MyIImmutableQueue { get; set; } + public IImmutableSet MyIImmutableSet { get; set; } + public ImmutableHashSet MyImmutableHashSet { get; set; } + public ImmutableList MyImmutableList { get; set; } + public ImmutableStack MyImmutableStack { get; set; } + public ImmutableQueue MyImmutableQueue { get; set; } + + public static readonly byte[] s_data = Encoding.UTF8.GetBytes( + @"{" + + @"""MyIImmutableList"":[" + + SimpleTestClass.s_json + "," + + SimpleTestClass.s_json + + @"]," + + @"""MyIImmutableStack"":[" + + SimpleTestClass.s_json + "," + + SimpleTestClass.s_json + + @"]," + + @"""MyIImmutableQueue"":[" + + SimpleTestClass.s_json + "," + + SimpleTestClass.s_json + + @"]," + + @"""MyIImmutableSet"":[" + + SimpleTestClass.s_json + "," + + SimpleTestClass.s_json + + @"]," + + @"""MyImmutableHashSet"":[" + + SimpleTestClass.s_json + "," + + SimpleTestClass.s_json + + @"]," + + @"""MyImmutableList"":[" + + SimpleTestClass.s_json + "," + + SimpleTestClass.s_json + + @"]," + + @"""MyImmutableStack"":[" + + SimpleTestClass.s_json + "," + + SimpleTestClass.s_json + + @"]," + + @"""MyImmutableQueue"":[" + + SimpleTestClass.s_json + "," + + SimpleTestClass.s_json + + @"]" + + @"}"); + + public void Initialize() + { + { + SimpleTestClass obj1 = new SimpleTestClass(); + obj1.Initialize(); + + SimpleTestClass obj2 = new SimpleTestClass(); + obj2.Initialize(); + + MyIImmutableList = ImmutableList.CreateRange(new List { obj1, obj2 }); + } + { + SimpleTestClass obj1 = new SimpleTestClass(); + obj1.Initialize(); + + SimpleTestClass obj2 = new SimpleTestClass(); + obj2.Initialize(); + + MyIImmutableStack = ImmutableStack.CreateRange(new List { obj1, obj2 }); + } + { + SimpleTestClass obj1 = new SimpleTestClass(); + obj1.Initialize(); + + SimpleTestClass obj2 = new SimpleTestClass(); + obj2.Initialize(); + + MyIImmutableQueue = ImmutableQueue.CreateRange(new List { obj1, obj2 }); + } + { + SimpleTestClass obj1 = new SimpleTestClass(); + obj1.Initialize(); + + SimpleTestClass obj2 = new SimpleTestClass(); + obj2.Initialize(); + + MyIImmutableSet = ImmutableHashSet.CreateRange(new List { obj1, obj2 }); + } + { + SimpleTestClass obj1 = new SimpleTestClass(); + obj1.Initialize(); + + SimpleTestClass obj2 = new SimpleTestClass(); + obj2.Initialize(); + + MyImmutableHashSet = ImmutableHashSet.CreateRange(new List { obj1, obj2 }); + } + { + SimpleTestClass obj1 = new SimpleTestClass(); + obj1.Initialize(); + + SimpleTestClass obj2 = new SimpleTestClass(); + obj2.Initialize(); + + MyImmutableList = ImmutableList.CreateRange(new List { obj1, obj2 }); + } + { + SimpleTestClass obj1 = new SimpleTestClass(); + obj1.Initialize(); + + SimpleTestClass obj2 = new SimpleTestClass(); + obj2.Initialize(); + + MyImmutableStack = ImmutableStack.CreateRange(new List { obj1, obj2 }); + } + { + SimpleTestClass obj1 = new SimpleTestClass(); + obj1.Initialize(); + + SimpleTestClass obj2 = new SimpleTestClass(); + obj2.Initialize(); + + MyImmutableQueue = ImmutableQueue.CreateRange(new List { obj1, obj2 }); + } + } + + public void Verify() + { + Assert.Equal(2, MyIImmutableList.Count); + foreach (SimpleTestClass data in MyIImmutableList) + { + data.Verify(); + } + + int i = 0; + foreach (SimpleTestClass data in MyIImmutableStack) + { + data.Verify(); + i++; + } + Assert.Equal(2, i); + + i = 0; + foreach (SimpleTestClass data in MyIImmutableQueue) + { + data.Verify(); + i++; + } + Assert.Equal(2, i); + + Assert.Equal(2, MyIImmutableSet.Count); + foreach (SimpleTestClass data in MyIImmutableSet) + { + data.Verify(); + } + + Assert.Equal(2, MyImmutableHashSet.Count); + foreach (SimpleTestClass data in MyImmutableHashSet) + { + data.Verify(); + } + + Assert.Equal(2, MyImmutableList.Count); + foreach (SimpleTestClass data in MyImmutableList) + { + data.Verify(); + } + + i = 0; + foreach (SimpleTestClass data in MyImmutableStack) + { + data.Verify(); + i++; + } + Assert.Equal(2, i); + + i = 0; + foreach (SimpleTestClass data in MyImmutableQueue) + { + data.Verify(); + i++; + } + Assert.Equal(2, i); + } + } + public class SimpleDerivedTestClass : SimpleTestClass { } diff --git a/src/System.Text.Json/tests/Serialization/TestData.cs b/src/System.Text.Json/tests/Serialization/TestData.cs index 8e585d755d47..ebf962f2a232 100644 --- a/src/System.Text.Json/tests/Serialization/TestData.cs +++ b/src/System.Text.Json/tests/Serialization/TestData.cs @@ -34,6 +34,9 @@ public static IEnumerable ReadSuccessCases yield return new object[] { typeof(TestClassWithGenericICollectionT), TestClassWithGenericICollectionT.s_data }; yield return new object[] { typeof(TestClassWithGenericIReadOnlyCollectionT), TestClassWithGenericIReadOnlyCollectionT.s_data }; yield return new object[] { typeof(TestClassWithGenericIReadOnlyListT), TestClassWithGenericIReadOnlyListT.s_data }; + yield return new object[] { typeof(TestClassWithStringToPrimitiveDictionary), TestClassWithStringToPrimitiveDictionary.s_data }; + yield return new object[] { typeof(TestClassWithObjectIEnumerableConstructibleTypes), TestClassWithObjectIEnumerableConstructibleTypes.s_data }; + yield return new object[] { typeof(TestClassWithObjectImmutableTypes), TestClassWithObjectImmutableTypes.s_data }; yield return new object[] { typeof(JsonElementTests.JsonElementClass), JsonElementTests.JsonElementClass.s_data }; yield return new object[] { typeof(JsonElementTests.JsonElementArrayClass), JsonElementTests.JsonElementArrayClass.s_data }; yield return new object[] { typeof(ClassWithComplexObjects), ClassWithComplexObjects.s_data }; @@ -65,6 +68,9 @@ public static IEnumerable WriteSuccessCases yield return new object[] { new TestClassWithGenericICollectionT() }; yield return new object[] { new TestClassWithGenericIReadOnlyCollectionT() }; yield return new object[] { new TestClassWithGenericIReadOnlyListT() }; + yield return new object[] { new TestClassWithStringToPrimitiveDictionary() }; + yield return new object[] { new TestClassWithObjectIEnumerableConstructibleTypes() }; + yield return new object[] { new TestClassWithObjectImmutableTypes() }; yield return new object[] { new JsonElementTests.JsonElementClass() }; yield return new object[] { new JsonElementTests.JsonElementArrayClass() }; yield return new object[] { new ClassWithComplexObjects() }; diff --git a/src/System.Text.Json/tests/Serialization/Value.ReadTests.GenericCollections.cs b/src/System.Text.Json/tests/Serialization/Value.ReadTests.GenericCollections.cs new file mode 100644 index 000000000000..ca26eebc2075 --- /dev/null +++ b/src/System.Text.Json/tests/Serialization/Value.ReadTests.GenericCollections.cs @@ -0,0 +1,631 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Collections.Generic; +using System.Linq; +using Xunit; + +namespace System.Text.Json.Serialization.Tests +{ + public static partial class ValueTests + { + [Fact] + public static void ReadListOfList() + { + List> result = JsonSerializer.Parse>>(Encoding.UTF8.GetBytes(@"[[1,2],[3,4]]")); + + Assert.Equal(1, result[0][0]); + Assert.Equal(2, result[0][1]); + Assert.Equal(3, result[1][0]); + Assert.Equal(4, result[1][1]); + } + + [Fact] + public static void ReadListOfArray() + { + List result = JsonSerializer.Parse>(Encoding.UTF8.GetBytes(@"[[1,2],[3,4]]")); + + Assert.Equal(1, result[0][0]); + Assert.Equal(2, result[0][1]); + Assert.Equal(3, result[1][0]); + Assert.Equal(4, result[1][1]); + } + + [Fact] + public static void ReadArrayOfList() + { + List[] result = JsonSerializer.Parse[]>(Encoding.UTF8.GetBytes(@"[[1,2],[3,4]]")); + + Assert.Equal(1, result[0][0]); + Assert.Equal(2, result[0][1]); + Assert.Equal(3, result[1][0]); + Assert.Equal(4, result[1][1]); + } + + [Fact] + public static void ReadPrimitiveList() + { + List i = JsonSerializer.Parse>(Encoding.UTF8.GetBytes(@"[1,2]")); + Assert.Equal(1, i[0]); + Assert.Equal(2, i[1]); + + i = JsonSerializer.Parse>(Encoding.UTF8.GetBytes(@"[]")); + Assert.Equal(0, i.Count); + } + + [Fact] + public static void ReadIEnumerableTOfIEnumerableT() + { + IEnumerable> result = JsonSerializer.Parse>>(Encoding.UTF8.GetBytes(@"[[1,2],[3,4]]")); + int expected = 1; + + foreach (IEnumerable ie in result) + { + foreach (int i in ie) + { + Assert.Equal(expected++, i); + } + } + } + + [Fact] + public static void ReadIEnumerableTOfArray() + { + IEnumerable result = JsonSerializer.Parse>(Encoding.UTF8.GetBytes(@"[[1,2],[3,4]]")); + int expected = 1; + + foreach (int[] arr in result) + { + foreach (int i in arr) + { + Assert.Equal(expected++, i); + } + } + } + + [Fact] + public static void ReadArrayOfIEnumerableT() + { + IEnumerable[] result = JsonSerializer.Parse[]>(Encoding.UTF8.GetBytes(@"[[1,2],[3,4]]")); + int expected = 1; + + foreach (IEnumerable arr in result) + { + foreach (int i in arr) + { + Assert.Equal(expected++, i); + } + } + } + + [Fact] + public static void ReadPrimitiveIEnumerableT() + { + IEnumerable result = JsonSerializer.Parse>(Encoding.UTF8.GetBytes(@"[1,2]")); + int expected = 1; + + foreach (int i in result) + { + Assert.Equal(expected++, i); + } + + result = JsonSerializer.Parse>(Encoding.UTF8.GetBytes(@"[]")); + Assert.Equal(0, result.Count()); + } + + [Fact] + public static void ReadIListTOfIListT() + { + IList> result = JsonSerializer.Parse>>(Encoding.UTF8.GetBytes(@"[[1,2],[3,4]]")); + int expected = 1; + + foreach (IList ie in result) + { + foreach (int i in ie) + { + Assert.Equal(expected++, i); + } + } + } + + [Fact] + public static void ReadIListTOfArray() + { + IList result = JsonSerializer.Parse>(Encoding.UTF8.GetBytes(@"[[1,2],[3,4]]")); + int expected = 1; + + foreach (int[] arr in result) + { + foreach (int i in arr) + { + Assert.Equal(expected++, i); + } + } + } + + [Fact] + public static void ReadArrayOfIListT() + { + IList[] result = JsonSerializer.Parse[]>(Encoding.UTF8.GetBytes(@"[[1,2],[3,4]]")); + int expected = 1; + + foreach (IList arr in result) + { + foreach (int i in arr) + { + Assert.Equal(expected++, i); + } + } + } + + [Fact] + public static void ReadPrimitiveIListT() + { + IList result = JsonSerializer.Parse>(Encoding.UTF8.GetBytes(@"[1,2]")); + int expected = 1; + + foreach (int i in result) + { + Assert.Equal(expected++, i); + } + + result = JsonSerializer.Parse>(Encoding.UTF8.GetBytes(@"[]")); + Assert.Equal(0, result.Count()); + } + + [Fact] + public static void ReadICollectionTOfICollectionT() + { + ICollection> result = JsonSerializer.Parse>>(Encoding.UTF8.GetBytes(@"[[1,2],[3,4]]")); + int expected = 1; + + foreach (ICollection ie in result) + { + foreach (int i in ie) + { + Assert.Equal(expected++, i); + } + } + } + + [Fact] + public static void ReadICollectionTOfArray() + { + ICollection result = JsonSerializer.Parse>(Encoding.UTF8.GetBytes(@"[[1,2],[3,4]]")); + int expected = 1; + + foreach (int[] arr in result) + { + foreach (int i in arr) + { + Assert.Equal(expected++, i); + } + } + } + + [Fact] + public static void ReadArrayOfICollectionT() + { + ICollection[] result = JsonSerializer.Parse[]>(Encoding.UTF8.GetBytes(@"[[1,2],[3,4]]")); + int expected = 1; + + foreach (ICollection arr in result) + { + foreach (int i in arr) + { + Assert.Equal(expected++, i); + } + } + } + + [Fact] + public static void ReadPrimitiveICollectionT() + { + ICollection result = JsonSerializer.Parse>(Encoding.UTF8.GetBytes(@"[1,2]")); + int expected = 1; + + foreach (int i in result) + { + Assert.Equal(expected++, i); + } + + result = JsonSerializer.Parse>(Encoding.UTF8.GetBytes(@"[]")); + Assert.Equal(0, result.Count()); + } + + [Fact] + public static void ReadIReadOnlyCollectionTOfIReadOnlyCollectionT() + { + IReadOnlyCollection> result = JsonSerializer.Parse>>(Encoding.UTF8.GetBytes(@"[[1,2],[3,4]]")); + int expected = 1; + + foreach (IReadOnlyCollection ie in result) + { + foreach (int i in ie) + { + Assert.Equal(expected++, i); + } + } + } + + [Fact] + public static void ReadIReadOnlyCollectionTOfArray() + { + IReadOnlyCollection result = JsonSerializer.Parse>(Encoding.UTF8.GetBytes(@"[[1,2],[3,4]]")); + int expected = 1; + + foreach (int[] arr in result) + { + foreach (int i in arr) + { + Assert.Equal(expected++, i); + } + } + } + + [Fact] + public static void ReadArrayOfIReadOnlyCollectionT() + { + IReadOnlyCollection[] result = JsonSerializer.Parse[]>(Encoding.UTF8.GetBytes(@"[[1,2],[3,4]]")); + int expected = 1; + + foreach (IReadOnlyCollection arr in result) + { + foreach (int i in arr) + { + Assert.Equal(expected++, i); + } + } + } + + [Fact] + public static void ReadPrimitiveIReadOnlyCollectionT() + { + IReadOnlyCollection result = JsonSerializer.Parse>(Encoding.UTF8.GetBytes(@"[1,2]")); + int expected = 1; + + foreach (int i in result) + { + Assert.Equal(expected++, i); + } + + result = JsonSerializer.Parse>(Encoding.UTF8.GetBytes(@"[]")); + Assert.Equal(0, result.Count()); + } + + [Fact] + public static void ReadIReadOnlyListTOfIReadOnlyListT() + { + IReadOnlyList> result = JsonSerializer.Parse>>(Encoding.UTF8.GetBytes(@"[[1,2],[3,4]]")); + int expected = 1; + + foreach (IReadOnlyList ie in result) + { + foreach (int i in ie) + { + Assert.Equal(expected++, i); + } + } + } + + [Fact] + public static void ReadIReadOnlyListTOfArray() + { + IReadOnlyList result = JsonSerializer.Parse>(Encoding.UTF8.GetBytes(@"[[1,2],[3,4]]")); + int expected = 1; + + foreach (int[] arr in result) + { + foreach (int i in arr) + { + Assert.Equal(expected++, i); + } + } + } + + [Fact] + public static void ReadArrayOfIReadOnlyListT() + { + IReadOnlyList[] result = JsonSerializer.Parse[]>(Encoding.UTF8.GetBytes(@"[[1,2],[3,4]]")); + int expected = 1; + + foreach (IReadOnlyList arr in result) + { + foreach (int i in arr) + { + Assert.Equal(expected++, i); + } + } + } + + [Fact] + public static void ReadPrimitiveIReadOnlyListT() + { + IReadOnlyList result = JsonSerializer.Parse>(Encoding.UTF8.GetBytes(@"[1,2]")); + int expected = 1; + + foreach (int i in result) + { + Assert.Equal(expected++, i); + } + + result = JsonSerializer.Parse>(Encoding.UTF8.GetBytes(@"[]")); + Assert.Equal(0, result.Count()); + } + + [Fact] + public static void StackTOfStackT() + { + Stack> result = JsonSerializer.Parse>>(Encoding.UTF8.GetBytes(@"[[1,2],[3,4]]")); + int expected = 4; + + foreach (Stack st in result) + { + foreach (int i in st) + { + Assert.Equal(expected--, i); + } + } + } + + [Fact] + public static void ReadStackTOfArray() + { + Stack result = JsonSerializer.Parse>(Encoding.UTF8.GetBytes(@"[[1,2],[3,4]]")); + int expected = 3; + + foreach (int[] arr in result) + { + foreach (int i in arr) + { + Assert.Equal(expected++, i); + } + + expected = 1; + } + } + + [Fact] + public static void ReadArrayOfStackT() + { + Stack[] result = JsonSerializer.Parse[]>(Encoding.UTF8.GetBytes(@"[[1,2],[3,4]]")); + int expected = 2; + + foreach (Stack st in result) + { + foreach (int i in st) + { + Assert.Equal(expected--, i); + } + + expected = 4; + } + } + + [Fact] + public static void ReadPrimitiveStackT() + { + Stack result = JsonSerializer.Parse>(Encoding.UTF8.GetBytes(@"[1,2]")); + int expected = 2; + + foreach (int i in result) + { + Assert.Equal(expected--, i); + } + + result = JsonSerializer.Parse>(Encoding.UTF8.GetBytes(@"[]")); + Assert.Equal(0, result.Count()); + } + + [Fact] + public static void ReadQueueTOfQueueT() + { + Queue> result = JsonSerializer.Parse>>(Encoding.UTF8.GetBytes(@"[[1,2],[3,4]]")); + int expected = 1; + + foreach (Queue q in result) + { + foreach (int i in q) + { + Assert.Equal(expected++, i); + } + } + } + + [Fact] + public static void ReadQueueTOfArray() + { + Queue result = JsonSerializer.Parse>(Encoding.UTF8.GetBytes(@"[[1,2],[3,4]]")); + int expected = 1; + + foreach (int[] arr in result) + { + foreach (int i in arr) + { + Assert.Equal(expected++, i); + } + } + } + + [Fact] + public static void ReadArrayOfIQueueT() + { + Queue[] result = JsonSerializer.Parse[]>(Encoding.UTF8.GetBytes(@"[[1,2],[3,4]]")); + int expected = 1; + + foreach (Queue q in result) + { + foreach (int i in q) + { + Assert.Equal(expected++, i); + } + } + } + + [Fact] + public static void ReadPrimitiveQueueT() + { + Queue result = JsonSerializer.Parse>(Encoding.UTF8.GetBytes(@"[1,2]")); + int expected = 1; + + foreach (int i in result) + { + Assert.Equal(expected++, i); + } + result = JsonSerializer.Parse>(Encoding.UTF8.GetBytes(@"[]")); + Assert.Equal(0, result.Count()); + + } + + [Fact] + public static void ReadHashSetTOfHashSetT() + { + HashSet> result = JsonSerializer.Parse>>(Encoding.UTF8.GetBytes(@"[[1,2],[3,4]]")); + int expected = 1; + + foreach (HashSet hs in result) + { + foreach (int i in hs) + { + Assert.Equal(expected++, i); + } + } + } + + [Fact] + public static void ReadHashSetTOfArray() + { + HashSet result = JsonSerializer.Parse>(Encoding.UTF8.GetBytes(@"[[1,2],[3,4]]")); + int expected = 1; + + foreach (int[] arr in result) + { + foreach (int i in arr) + { + Assert.Equal(expected++, i); + } + } + } + + [Fact] + public static void ReadArrayOfIHashSetT() + { + HashSet[] result = JsonSerializer.Parse[]>(Encoding.UTF8.GetBytes(@"[[1,2],[3,4]]")); + int expected = 1; + + foreach (HashSet hs in result) + { + foreach (int i in hs) + { + Assert.Equal(expected++, i); + } + } + } + + [Fact] + public static void ReadPrimitiveHashSetT() + { + HashSet result = JsonSerializer.Parse>(Encoding.UTF8.GetBytes(@"[1,2]")); + int expected = 1; + + foreach (int i in result) + { + Assert.Equal(expected++, i); + } + + result = JsonSerializer.Parse>(Encoding.UTF8.GetBytes(@"[]")); + Assert.Equal(0, result.Count()); + } + + [Fact] + public static void ReadLinkedListTOfLinkedListT() + { + LinkedList> result = JsonSerializer.Parse>>(Encoding.UTF8.GetBytes(@"[[1,2],[3,4]]")); + int expected = 1; + + foreach (LinkedList l in result) + { + foreach (int i in l) + { + Assert.Equal(expected++, i); + } + } + } + + [Fact] + public static void ReadLinkedListTOfArray() + { + LinkedList result = JsonSerializer.Parse>(Encoding.UTF8.GetBytes(@"[[1,2],[3,4]]")); + int expected = 1; + + foreach (int[] arr in result) + { + foreach (int i in arr) + { + Assert.Equal(expected++, i); + } + } + } + + [Fact] + public static void ReadArrayOfILinkedListT() + { + LinkedList[] result = JsonSerializer.Parse[]>(Encoding.UTF8.GetBytes(@"[[1,2],[3,4]]")); + int expected = 1; + + foreach (LinkedList l in result) + { + foreach (int i in l) + { + Assert.Equal(expected++, i); + } + } + } + + [Fact] + public static void ReadPrimitiveLinkedListT() + { + LinkedList result = JsonSerializer.Parse>(Encoding.UTF8.GetBytes(@"[1,2]")); + int expected = 1; + + foreach (int i in result) + { + Assert.Equal(expected++, i); + } + + result = JsonSerializer.Parse>(Encoding.UTF8.GetBytes(@"[]")); + Assert.Equal(0, result.Count()); + } + + [Fact] + public static void ReadArrayOfISortedSetT() + { + SortedSet[] result = JsonSerializer.Parse[]>(Encoding.UTF8.GetBytes(@"[[1,2],[3,4]]")); + int expected = 1; + + foreach (SortedSet s in result) + { + foreach (int i in s) + { + Assert.Equal(expected++, i); + } + } + } + + [Fact] + public static void ReadPrimitiveSortedSetT() + { + SortedSet result = JsonSerializer.Parse>(Encoding.UTF8.GetBytes(@"[1,2]")); + int expected = 1; + + foreach (int i in result) + { + Assert.Equal(expected++, i); + } + + result = JsonSerializer.Parse>(Encoding.UTF8.GetBytes(@"[]")); + Assert.Equal(0, result.Count()); + } + } +} diff --git a/src/System.Text.Json/tests/Serialization/Value.ReadTests.ImmutableCollections.cs b/src/System.Text.Json/tests/Serialization/Value.ReadTests.ImmutableCollections.cs new file mode 100644 index 000000000000..c1b923b01282 --- /dev/null +++ b/src/System.Text.Json/tests/Serialization/Value.ReadTests.ImmutableCollections.cs @@ -0,0 +1,548 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Linq; +using Xunit; + +namespace System.Text.Json.Serialization.Tests +{ + public static partial class ValueTests + { + [Fact] + public static void ReadIImmutableListTOfIImmutableListT() + { + IImmutableList> result = JsonSerializer.Parse>>(Encoding.UTF8.GetBytes(@"[[1,2],[3,4]]")); + int expected = 1; + + foreach (IImmutableList l in result) + { + foreach (int i in l) + { + Assert.Equal(expected++, i); + } + } + } + + [Fact] + public static void ReadIImmutableListTOfArray() + { + IImmutableList result = JsonSerializer.Parse>(Encoding.UTF8.GetBytes(@"[[1,2],[3,4]]")); + int expected = 1; + + foreach (int[] arr in result) + { + foreach (int i in arr) + { + Assert.Equal(expected++, i); + } + } + } + + [Fact] + public static void ReadArrayOfIIImmutableListT() + { + IImmutableList[] result = JsonSerializer.Parse[]>(Encoding.UTF8.GetBytes(@"[[1,2],[3,4]]")); + int expected = 1; + + foreach (IImmutableList l in result) + { + foreach (int i in l) + { + Assert.Equal(expected++, i); + } + } + } + + [Fact] + public static void ReadPrimitiveIImmutableListT() + { + IImmutableList result = JsonSerializer.Parse>(Encoding.UTF8.GetBytes(@"[1,2]")); + int expected = 1; + + foreach (int i in result) + { + Assert.Equal(expected++, i); + } + + result = JsonSerializer.Parse>(Encoding.UTF8.GetBytes(@"[]")); + Assert.Equal(0, result.Count()); + } + + [Fact] + public static void ReadIImmutableStackTOfIImmutableStackT() + { + IImmutableStack> result = JsonSerializer.Parse>>(Encoding.UTF8.GetBytes(@"[[1,2],[3,4]]")); + int expected = 4; + + foreach (IImmutableStack l in result) + { + foreach (int i in l) + { + Assert.Equal(expected--, i); + } + } + } + + [Fact] + public static void ReadIImmutableStackTOfArray() + { + IImmutableStack result = JsonSerializer.Parse>(Encoding.UTF8.GetBytes(@"[[1,2],[3,4]]")); + int expected = 3; + + foreach (int[] arr in result) + { + foreach (int i in arr) + { + Assert.Equal(expected++, i); + } + + expected = 1; + } + } + + [Fact] + public static void ReadArrayOfIIImmutableStackT() + { + IImmutableStack[] result = JsonSerializer.Parse[]>(Encoding.UTF8.GetBytes(@"[[1,2],[3,4]]")); + int expected = 2; + + foreach (IImmutableStack l in result) + { + foreach (int i in l) + { + Assert.Equal(expected--, i); + } + + expected = 4; + } + } + + [Fact] + public static void ReadPrimitiveIImmutableStackT() + { + IImmutableStack result = JsonSerializer.Parse>(Encoding.UTF8.GetBytes(@"[1,2]")); + int expected = 2; + + foreach (int i in result) + { + Assert.Equal(expected--, i); + } + + result = JsonSerializer.Parse>(Encoding.UTF8.GetBytes(@"[]")); + Assert.Equal(0, result.Count()); + } + + [Fact] + public static void ReadIImmutableQueueTOfIImmutableQueueT() + { + IImmutableQueue> result = JsonSerializer.Parse>>(Encoding.UTF8.GetBytes(@"[[1,2],[3,4]]")); + int expected = 1; + + foreach (IImmutableQueue l in result) + { + foreach (int i in l) + { + Assert.Equal(expected++, i); + } + } + } + + [Fact] + public static void ReadIImmutableQueueTOfArray() + { + IImmutableQueue result = JsonSerializer.Parse>(Encoding.UTF8.GetBytes(@"[[1,2],[3,4]]")); + int expected = 1; + + foreach (int[] arr in result) + { + foreach (int i in arr) + { + Assert.Equal(expected++, i); + } + } + } + + [Fact] + public static void ReadArrayOfIIImmutableQueueT() + { + IImmutableQueue[] result = JsonSerializer.Parse[]>(Encoding.UTF8.GetBytes(@"[[1,2],[3,4]]")); + int expected = 1; + + foreach (IImmutableQueue l in result) + { + foreach (int i in l) + { + Assert.Equal(expected++, i); + } + } + } + + [Fact] + public static void ReadPrimitiveIImmutableQueueT() + { + IImmutableQueue result = JsonSerializer.Parse>(Encoding.UTF8.GetBytes(@"[1,2]")); + int expected = 1; + + foreach (int i in result) + { + Assert.Equal(expected++, i); + } + + result = JsonSerializer.Parse>(Encoding.UTF8.GetBytes(@"[]")); + Assert.Equal(0, result.Count()); + } + + [Fact] + public static void ReadIImmutableSetTOfIImmutableSetT() + { + IImmutableSet> result = JsonSerializer.Parse>>(Encoding.UTF8.GetBytes(@"[[1,2],[3,4]]")); + List expected = new List { 1, 2, 3, 4 }; + + foreach (IImmutableSet l in result) + { + foreach (int i in l) + { + expected.Remove(i); + } + } + + Assert.Equal(0, expected.Count); + } + + [Fact] + public static void ReadIImmutableSetTOfArray() + { + IImmutableSet result = JsonSerializer.Parse>(Encoding.UTF8.GetBytes(@"[[1,2],[3,4]]")); + List expected = new List { 1, 2, 3, 4 }; + + foreach (int[] arr in result) + { + foreach (int i in arr) + { + expected.Remove(i); + } + } + + Assert.Equal(0, expected.Count); + } + + [Fact] + public static void ReadArrayOfIIImmutableSetT() + { + IImmutableSet[] result = JsonSerializer.Parse[]>(Encoding.UTF8.GetBytes(@"[[1,2],[3,4]]")); + List expected = new List { 1, 2, 3, 4 }; + + foreach (IImmutableSet l in result) + { + foreach (int i in l) + { + expected.Remove(i); + } + } + + Assert.Equal(0, expected.Count); + } + + [Fact] + public static void ReadPrimitiveIImmutableSetT() + { + IImmutableSet result = JsonSerializer.Parse>(Encoding.UTF8.GetBytes(@"[1,2]")); + List expected = new List { 1, 2 }; + + foreach (int i in result) + { + expected.Remove(i); + } + + Assert.Equal(0, expected.Count); + + result = JsonSerializer.Parse>(Encoding.UTF8.GetBytes(@"[]")); + Assert.Equal(0, result.Count()); + } + + [Fact] + public static void ReadImmutableHashSetTOfImmutableHashSetT() + { + ImmutableHashSet> result = JsonSerializer.Parse>>(Encoding.UTF8.GetBytes(@"[[1,2],[3,4]]")); + List expected = new List { 1, 2, 3, 4 }; + + foreach (ImmutableHashSet l in result) + { + foreach (int i in l) + { + expected.Remove(i); + } + } + + Assert.Equal(0, expected.Count); + } + + [Fact] + public static void ReadImmutableHashSetTOfArray() + { + ImmutableHashSet result = JsonSerializer.Parse>(Encoding.UTF8.GetBytes(@"[[1,2],[3,4]]")); + List expected = new List { 1, 2, 3, 4 }; + + foreach (int[] arr in result) + { + foreach (int i in arr) + { + expected.Remove(i); + } + } + + Assert.Equal(0, expected.Count); + } + + [Fact] + public static void ReadArrayOfIImmutableHashSetT() + { + ImmutableHashSet[] result = JsonSerializer.Parse[]>(Encoding.UTF8.GetBytes(@"[[1,2],[3,4]]")); + List expected = new List { 1, 2, 3, 4 }; + + foreach (ImmutableHashSet l in result) + { + foreach (int i in l) + { + expected.Remove(i); + } + } + + Assert.Equal(0, expected.Count); + } + + [Fact] + public static void ReadPrimitiveImmutableHashSetT() + { + ImmutableHashSet result = JsonSerializer.Parse>(Encoding.UTF8.GetBytes(@"[1,2]")); + List expected = new List { 1, 2 }; + + foreach (int i in result) + { + expected.Remove(i); + } + + Assert.Equal(0, expected.Count); + + result = JsonSerializer.Parse>(Encoding.UTF8.GetBytes(@"[]")); + Assert.Equal(0, result.Count()); + } + + [Fact] + public static void ReadImmutableListTOfImmutableListT() + { + ImmutableList> result = JsonSerializer.Parse>>(Encoding.UTF8.GetBytes(@"[[1,2],[3,4]]")); + int expected = 1; + + foreach (ImmutableList l in result) + { + foreach (int i in l) + { + Assert.Equal(expected++, i); + } + } + } + + [Fact] + public static void ReadImmutableListTOfArray() + { + ImmutableList result = JsonSerializer.Parse>(Encoding.UTF8.GetBytes(@"[[1,2],[3,4]]")); + int expected = 1; + + foreach (int[] arr in result) + { + foreach (int i in arr) + { + Assert.Equal(expected++, i); + } + } + } + + [Fact] + public static void ReadArrayOfIImmutableListT() + { + ImmutableList[] result = JsonSerializer.Parse[]>(Encoding.UTF8.GetBytes(@"[[1,2],[3,4]]")); + int expected = 1; + + foreach (ImmutableList l in result) + { + foreach (int i in l) + { + Assert.Equal(expected++, i); + } + } + } + + [Fact] + public static void ReadPrimitiveImmutableListT() + { + ImmutableList result = JsonSerializer.Parse>(Encoding.UTF8.GetBytes(@"[1,2]")); + int expected = 1; + + foreach (int i in result) + { + Assert.Equal(expected++, i); + } + + result = JsonSerializer.Parse>(Encoding.UTF8.GetBytes(@"[]")); + Assert.Equal(0, result.Count()); + } + + [Fact] + public static void ReadImmutableStackTOfImmutableStackT() + { + ImmutableStack> result = JsonSerializer.Parse>>(Encoding.UTF8.GetBytes(@"[[1,2],[3,4]]")); + int expected = 4; + + foreach (ImmutableStack l in result) + { + foreach (int i in l) + { + Assert.Equal(expected--, i); + } + } + } + + [Fact] + public static void ReadImmutableStackTOfArray() + { + ImmutableStack result = JsonSerializer.Parse>(Encoding.UTF8.GetBytes(@"[[1,2],[3,4]]")); + int expected = 3; + + foreach (int[] arr in result) + { + foreach (int i in arr) + { + Assert.Equal(expected++, i); + } + + expected = 1; + } + } + + [Fact] + public static void ReadArrayOfIImmutableStackT() + { + ImmutableStack[] result = JsonSerializer.Parse[]>(Encoding.UTF8.GetBytes(@"[[1,2],[3,4]]")); + int expected = 2; + + foreach (ImmutableStack l in result) + { + foreach (int i in l) + { + Assert.Equal(expected--, i); + } + + expected = 4; + } + } + + [Fact] + public static void ReadPrimitiveImmutableStackT() + { + ImmutableStack result = JsonSerializer.Parse>(Encoding.UTF8.GetBytes(@"[1,2]")); + int expected = 2; + + foreach (int i in result) + { + Assert.Equal(expected--, i); + } + + result = JsonSerializer.Parse>(Encoding.UTF8.GetBytes(@"[]")); + Assert.Equal(0, result.Count()); + } + + [Fact] + public static void ReadImmutableQueueTOfImmutableQueueT() + { + ImmutableQueue> result = JsonSerializer.Parse>>(Encoding.UTF8.GetBytes(@"[[1,2],[3,4]]")); + int expected = 1; + + foreach (ImmutableQueue l in result) + { + foreach (int i in l) + { + Assert.Equal(expected++, i); + } + } + } + + [Fact] + public static void ReadImmutableQueueTOfArray() + { + ImmutableQueue result = JsonSerializer.Parse>(Encoding.UTF8.GetBytes(@"[[1,2],[3,4]]")); + int expected = 1; + + foreach (int[] arr in result) + { + foreach (int i in arr) + { + Assert.Equal(expected++, i); + } + } + } + + [Fact] + public static void ReadArrayOfIImmutableQueueT() + { + ImmutableQueue[] result = JsonSerializer.Parse[]>(Encoding.UTF8.GetBytes(@"[[1,2],[3,4]]")); + int expected = 1; + + foreach (ImmutableQueue l in result) + { + foreach (int i in l) + { + Assert.Equal(expected++, i); + } + } + } + + [Fact] + public static void ReadPrimitiveImmutableQueueT() + { + ImmutableQueue result = JsonSerializer.Parse>(Encoding.UTF8.GetBytes(@"[1,2]")); + int expected = 1; + + foreach (int i in result) + { + Assert.Equal(expected++, i); + } + + result = JsonSerializer.Parse>(Encoding.UTF8.GetBytes(@"[]")); + Assert.Equal(0, result.Count()); + } + + [Fact] + public static void ReadArrayOfIImmutableSortedSetT() + { + ImmutableSortedSet[] result = JsonSerializer.Parse[]>(Encoding.UTF8.GetBytes(@"[[1,2],[3,4]]")); + int expected = 1; + + foreach (ImmutableSortedSet l in result) + { + foreach (int i in l) + { + Assert.Equal(expected++, i); + } + } + } + + [Fact] + public static void ReadPrimitiveImmutableSortedSetT() + { + ImmutableSortedSet result = JsonSerializer.Parse>(Encoding.UTF8.GetBytes(@"[1,2]")); + int expected = 1; + + foreach (int i in result) + { + Assert.Equal(expected++, i); + } + + result = JsonSerializer.Parse>(Encoding.UTF8.GetBytes(@"[]")); + Assert.Equal(0, result.Count()); + } + } +} diff --git a/src/System.Text.Json/tests/Serialization/Value.ReadTests.cs b/src/System.Text.Json/tests/Serialization/Value.ReadTests.cs index 1fdd0b05977f..45c9a339b45e 100644 --- a/src/System.Text.Json/tests/Serialization/Value.ReadTests.cs +++ b/src/System.Text.Json/tests/Serialization/Value.ReadTests.cs @@ -49,6 +49,9 @@ public static void ReadPrimitiveArray() int[] i = JsonSerializer.Parse(Encoding.UTF8.GetBytes(@"[1,2]")); Assert.Equal(1, i[0]); Assert.Equal(2, i[1]); + + i = JsonSerializer.Parse(Encoding.UTF8.GetBytes(@"[]")); + Assert.Equal(0, i.Length); } [Fact] @@ -274,332 +277,6 @@ public static void ReadPrimitiveJaggedArray() Assert.Equal(4, i[1][1]); } - [Fact] - public static void ReadListOfList() - { - List> result = JsonSerializer.Parse>>(Encoding.UTF8.GetBytes(@"[[1,2],[3,4]]")); - - Assert.Equal(1, result[0][0]); - Assert.Equal(2, result[0][1]); - Assert.Equal(3, result[1][0]); - Assert.Equal(4, result[1][1]); - } - - [Fact] - public static void ReadListOfArray() - { - List result = JsonSerializer.Parse>(Encoding.UTF8.GetBytes(@"[[1,2],[3,4]]")); - - Assert.Equal(1, result[0][0]); - Assert.Equal(2, result[0][1]); - Assert.Equal(3, result[1][0]); - Assert.Equal(4, result[1][1]); - } - - [Fact] - public static void ReadArrayOfList() - { - List[] result = JsonSerializer.Parse[]> (Encoding.UTF8.GetBytes(@"[[1,2],[3,4]]")); - - Assert.Equal(1, result[0][0]); - Assert.Equal(2, result[0][1]); - Assert.Equal(3, result[1][0]); - Assert.Equal(4, result[1][1]); - } - - [Fact] - public static void ReadPrimitiveList() - { - List i = JsonSerializer.Parse>(Encoding.UTF8.GetBytes(@"[1,2]")); - Assert.Equal(1, i[0]); - Assert.Equal(2, i[1]); - } - - [Fact] - public static void ReadIEnumerableTOfIEnumerableT() - { - IEnumerable> result = JsonSerializer.Parse>>(Encoding.UTF8.GetBytes(@"[[1,2],[3,4]]")); - int expected = 1; - - foreach (IEnumerable ie in result) - { - foreach (int i in ie) - { - Assert.Equal(expected++, i); - } - } - } - - [Fact] - public static void ReadIEnumerableTOfArray() - { - IEnumerable result = JsonSerializer.Parse>(Encoding.UTF8.GetBytes(@"[[1,2],[3,4]]")); - int expected = 1; - - foreach (int[] arr in result) - { - foreach (int i in arr) - { - Assert.Equal(expected++, i); - } - } - } - - [Fact] - public static void ReadArrayOfIEnumerableT() - { - IEnumerable[] result = JsonSerializer.Parse[]> (Encoding.UTF8.GetBytes(@"[[1,2],[3,4]]")); - int expected = 1; - - foreach (IEnumerable arr in result) - { - foreach (int i in arr) - { - Assert.Equal(expected++, i); - } - } - } - - [Fact] - public static void ReadPrimitiveIEnumerableT() - { - IEnumerable result = JsonSerializer.Parse>(Encoding.UTF8.GetBytes(@"[1,2]")); - int expected = 1; - - foreach (int i in result) - { - Assert.Equal(expected++, i); - } - } - - [Fact] - public static void ReadIListTOfIListT() - { - IList> result = JsonSerializer.Parse>>(Encoding.UTF8.GetBytes(@"[[1,2],[3,4]]")); - int expected = 1; - - foreach (IList ie in result) - { - foreach (int i in ie) - { - Assert.Equal(expected++, i); - } - } - } - - [Fact] - public static void ReadIListTOfArray() - { - IList result = JsonSerializer.Parse>(Encoding.UTF8.GetBytes(@"[[1,2],[3,4]]")); - int expected = 1; - - foreach (int[] arr in result) - { - foreach (int i in arr) - { - Assert.Equal(expected++, i); - } - } - } - - [Fact] - public static void ReadArrayOfIListT() - { - IList[] result = JsonSerializer.Parse[]>(Encoding.UTF8.GetBytes(@"[[1,2],[3,4]]")); - int expected = 1; - - foreach (IList arr in result) - { - foreach (int i in arr) - { - Assert.Equal(expected++, i); - } - } - } - - [Fact] - public static void ReadPrimitiveIListT() - { - IList result = JsonSerializer.Parse>(Encoding.UTF8.GetBytes(@"[1,2]")); - int expected = 1; - - foreach (int i in result) - { - Assert.Equal(expected++, i); - } - } - - [Fact] - public static void ReadICollectionTOfICollectionT() - { - ICollection> result = JsonSerializer.Parse>>(Encoding.UTF8.GetBytes(@"[[1,2],[3,4]]")); - int expected = 1; - - foreach (ICollection ie in result) - { - foreach (int i in ie) - { - Assert.Equal(expected++, i); - } - } - } - - [Fact] - public static void ReadICollectionTOfArray() - { - ICollection result = JsonSerializer.Parse>(Encoding.UTF8.GetBytes(@"[[1,2],[3,4]]")); - int expected = 1; - - foreach (int[] arr in result) - { - foreach (int i in arr) - { - Assert.Equal(expected++, i); - } - } - } - - [Fact] - public static void ReadArrayOfICollectionT() - { - ICollection[] result = JsonSerializer.Parse[]>(Encoding.UTF8.GetBytes(@"[[1,2],[3,4]]")); - int expected = 1; - - foreach (ICollection arr in result) - { - foreach (int i in arr) - { - Assert.Equal(expected++, i); - } - } - } - - [Fact] - public static void ReadPrimitiveICollectionT() - { - ICollection result = JsonSerializer.Parse>(Encoding.UTF8.GetBytes(@"[1,2]")); - int expected = 1; - - foreach (int i in result) - { - Assert.Equal(expected++, i); - } - } - - [Fact] - public static void ReadIReadOnlyCollectionTOfIReadOnlyCollectionT() - { - IReadOnlyCollection> result = JsonSerializer.Parse>>(Encoding.UTF8.GetBytes(@"[[1,2],[3,4]]")); - int expected = 1; - - foreach (IReadOnlyCollection ie in result) - { - foreach (int i in ie) - { - Assert.Equal(expected++, i); - } - } - } - - [Fact] - public static void ReadIReadOnlyCollectionTOfArray() - { - IReadOnlyCollection result = JsonSerializer.Parse>(Encoding.UTF8.GetBytes(@"[[1,2],[3,4]]")); - int expected = 1; - - foreach (int[] arr in result) - { - foreach (int i in arr) - { - Assert.Equal(expected++, i); - } - } - } - - [Fact] - public static void ReadArrayOfIReadOnlyCollectionT() - { - IReadOnlyCollection[] result = JsonSerializer.Parse[]>(Encoding.UTF8.GetBytes(@"[[1,2],[3,4]]")); - int expected = 1; - - foreach (IReadOnlyCollection arr in result) - { - foreach (int i in arr) - { - Assert.Equal(expected++, i); - } - } - } - - [Fact] - public static void ReadPrimitiveIReadOnlyCollectionT() - { - IReadOnlyCollection result = JsonSerializer.Parse>(Encoding.UTF8.GetBytes(@"[1,2]")); - int expected = 1; - - foreach (int i in result) - { - Assert.Equal(expected++, i); - } - } - - [Fact] - public static void ReadIReadOnlyListTOfIReadOnlyListT() - { - IReadOnlyList> result = JsonSerializer.Parse>>(Encoding.UTF8.GetBytes(@"[[1,2],[3,4]]")); - int expected = 1; - - foreach (IReadOnlyList ie in result) - { - foreach (int i in ie) - { - Assert.Equal(expected++, i); - } - } - } - - [Fact] - public static void ReadIReadOnlyListTOfArray() - { - IReadOnlyList result = JsonSerializer.Parse>(Encoding.UTF8.GetBytes(@"[[1,2],[3,4]]")); - int expected = 1; - - foreach (int[] arr in result) - { - foreach (int i in arr) - { - Assert.Equal(expected++, i); - } - } - } - - [Fact] - public static void ReadArrayOfIReadOnlyListT() - { - IReadOnlyList[] result = JsonSerializer.Parse[]>(Encoding.UTF8.GetBytes(@"[[1,2],[3,4]]")); - int expected = 1; - - foreach (IReadOnlyList arr in result) - { - foreach (int i in arr) - { - Assert.Equal(expected++, i); - } - } - } - - [Fact] - public static void ReadPrimitiveIReadOnlyListT() - { - IReadOnlyList result = JsonSerializer.Parse>(Encoding.UTF8.GetBytes(@"[1,2]")); - int expected = 1; - - foreach (int i in result) - { - Assert.Equal(expected++, i); - } - } - public class TestClassWithBadData { public TestChildClassWithBadData[] Children { get; set; } diff --git a/src/System.Text.Json/tests/Serialization/Value.WriteTests.GenericCollections.cs b/src/System.Text.Json/tests/Serialization/Value.WriteTests.GenericCollections.cs new file mode 100644 index 000000000000..8128e4440f2c --- /dev/null +++ b/src/System.Text.Json/tests/Serialization/Value.WriteTests.GenericCollections.cs @@ -0,0 +1,492 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Collections.Generic; +using Xunit; + +namespace System.Text.Json.Serialization.Tests +{ + public static partial class ValueTests + { + [Fact] + public static void WriteListOfList() + { + var input = new List> + { + new List() { 1, 2 }, + new List() { 3, 4 } + }; + + string json = JsonSerializer.ToString(input); + Assert.Equal("[[1,2],[3,4]]", json); + } + + [Fact] + public static void WriteListOfArray() + { + var input = new List + { + new int[] { 1, 2 }, + new int[] { 3, 4 } + }; + + string json = JsonSerializer.ToString(input); + Assert.Equal("[[1,2],[3,4]]", json); + } + + [Fact] + public static void WriteArrayOfList() + { + var input = new List[2]; + input[0] = new List() { 1, 2 }; + input[1] = new List() { 3, 4 }; + + string json = JsonSerializer.ToString(input); + Assert.Equal("[[1,2],[3,4]]", json); + } + + [Fact] + public static void WritePrimitiveList() + { + var input = new List { 1, 2 }; + + string json = JsonSerializer.ToString(input); + Assert.Equal("[1,2]", json); + } + + [Fact] + public static void WriteIEnumerableTOfIEnumerableT() + { + IEnumerable> input = new List> + { + new List() { 1, 2 }, + new List() { 3, 4 } + }; + + string json = JsonSerializer.ToString(input); + Assert.Equal("[[1,2],[3,4]]", json); + } + + [Fact] + public static void WriteIEnumerableTOfArray() + { + IEnumerable input = new List + { + new int[] { 1, 2 }, + new int[] { 3, 4 } + }; + + string json = JsonSerializer.ToString(input); + Assert.Equal("[[1,2],[3,4]]", json); + } + + [Fact] + public static void WriteArrayOfIEnumerableT() + { + IEnumerable[] input = new List[2]; + input[0] = new List() { 1, 2 }; + input[1] = new List() { 3, 4 }; + + string json = JsonSerializer.ToString(input); + Assert.Equal("[[1,2],[3,4]]", json); + } + + [Fact] + public static void WritePrimitiveIEnumerableT() + { + IEnumerable input = new List { 1, 2 }; + + string json = JsonSerializer.ToString(input); + Assert.Equal("[1,2]", json); + } + + [Fact] + public static void WriteIListTOfIListT() + { + IList> input = new List> + { + new List() { 1, 2 }, + new List() { 3, 4 } + }; + + string json = JsonSerializer.ToString(input); + Assert.Equal("[[1,2],[3,4]]", json); + } + + [Fact] + public static void WriteIListTOfArray() + { + IList input = new List + { + new int[] { 1, 2 }, + new int[] { 3, 4 } + }; + + string json = JsonSerializer.ToString(input); + Assert.Equal("[[1,2],[3,4]]", json); + } + + [Fact] + public static void WriteArrayOfIListT() + { + IList[] input = new List[2]; + input[0] = new List() { 1, 2 }; + input[1] = new List() { 3, 4 }; + + string json = JsonSerializer.ToString(input); + Assert.Equal("[[1,2],[3,4]]", json); + } + + [Fact] + public static void WritePrimitiveIListT() + { + IList input = new List { 1, 2 }; + + string json = JsonSerializer.ToString(input); + Assert.Equal("[1,2]", json); + } + + [Fact] + public static void WriteICollectionTOfICollectionT() + { + ICollection> input = new List> + { + new List() { 1, 2 }, + new List() { 3, 4 } + }; + + string json = JsonSerializer.ToString(input); + Assert.Equal("[[1,2],[3,4]]", json); + } + + [Fact] + public static void WriteICollectionTOfArray() + { + ICollection input = new List + { + new int[] { 1, 2 }, + new int[] { 3, 4 } + }; + + string json = JsonSerializer.ToString(input); + Assert.Equal("[[1,2],[3,4]]", json); + } + + [Fact] + public static void WriteArrayOfICollectionT() + { + ICollection[] input = new List[2]; + input[0] = new List() { 1, 2 }; + input[1] = new List() { 3, 4 }; + + string json = JsonSerializer.ToString(input); + Assert.Equal("[[1,2],[3,4]]", json); + } + + [Fact] + public static void WritePrimitiveICollectionT() + { + ICollection input = new List { 1, 2 }; + + string json = JsonSerializer.ToString(input); + Assert.Equal("[1,2]", json); + } + + [Fact] + public static void WriteIReadOnlyCollectionTOfIReadOnlyCollectionT() + { + IReadOnlyCollection> input = new List> + { + new List() { 1, 2 }, + new List() { 3, 4 } + }; + + string json = JsonSerializer.ToString(input); + Assert.Equal("[[1,2],[3,4]]", json); + } + + [Fact] + public static void WriteIReadOnlyCollectionTOfArray() + { + IReadOnlyCollection input = new List + { + new int[] { 1, 2 }, + new int[] { 3, 4 } + }; + + string json = JsonSerializer.ToString(input); + Assert.Equal("[[1,2],[3,4]]", json); + } + + [Fact] + public static void WriteArrayOfIReadOnlyCollectionT() + { + IReadOnlyCollection[] input = new List[2]; + input[0] = new List() { 1, 2 }; + input[1] = new List() { 3, 4 }; + + string json = JsonSerializer.ToString(input); + Assert.Equal("[[1,2],[3,4]]", json); + } + + [Fact] + public static void WritePrimitiveIReadOnlyCollectionT() + { + IReadOnlyCollection input = new List { 1, 2 }; + + string json = JsonSerializer.ToString(input); + Assert.Equal("[1,2]", json); + } + + [Fact] + public static void WriteIReadOnlyListTOfIReadOnlyListT() + { + IReadOnlyList> input = new List> + { + new List() { 1, 2 }, + new List() { 3, 4 } + }; + + string json = JsonSerializer.ToString(input); + Assert.Equal("[[1,2],[3,4]]", json); + } + + [Fact] + public static void WriteIReadOnlyListTOfArray() + { + IReadOnlyList input = new List + { + new int[] { 1, 2 }, + new int[] { 3, 4 } + }; + + string json = JsonSerializer.ToString(input); + Assert.Equal("[[1,2],[3,4]]", json); + } + + [Fact] + public static void WriteArrayOfIReadOnlyListT() + { + IReadOnlyList[] input = new List[2]; + input[0] = new List() { 1, 2 }; + input[1] = new List() { 3, 4 }; + + string json = JsonSerializer.ToString(input); + Assert.Equal("[[1,2],[3,4]]", json); + } + + [Fact] + public static void WritePrimitiveIReadOnlyListT() + { + IReadOnlyList input = new List { 1, 2 }; + + string json = JsonSerializer.ToString(input); + Assert.Equal("[1,2]", json); + } + + [Fact] + public static void WriteStackTOfStackT() + { + Stack> input = new Stack>(new List> + { + new Stack(new List() { 1, 2 }), + new Stack(new List() { 3, 4 }) + }); + + string json = JsonSerializer.ToString(input); + Assert.Equal("[[4,3],[2,1]]", json); + } + + [Fact] + public static void WriteStackTOfArray() + { + Stack input = new Stack(new List + { + new int[] { 1, 2 }, + new int[] { 3, 4 } + }); + + string json = JsonSerializer.ToString(input); + Assert.Equal("[[3,4],[1,2]]", json); + } + + [Fact] + public static void WriteArrayOfStackT() + { + Stack[] input = new Stack[2]; + input[0] = new Stack(new List { 1, 2 }); + input[1] = new Stack(new List { 3, 4 }); + + string json = JsonSerializer.ToString(input); + Assert.Equal("[[2,1],[4,3]]", json); + } + + [Fact] + public static void WritePrimitiveStackT() + { + Stack input = new Stack(new List { 1, 2 }); + + string json = JsonSerializer.ToString(input); + Assert.Equal("[2,1]", json); + } + + [Fact] + public static void WriteQueueTOfQueueT() + { + Queue> input = new Queue>(new List> + { + new Queue(new List() { 1, 2 }), + new Queue(new List() { 3, 4 }) + }); + + string json = JsonSerializer.ToString(input); + Assert.Equal("[[1,2],[3,4]]", json); + } + + [Fact] + public static void WriteQueueTOfArray() + { + Queue input = new Queue(new List + { + new int[] { 1, 2 }, + new int[] { 3, 4 } + }); + + string json = JsonSerializer.ToString(input); + Assert.Equal("[[1,2],[3,4]]", json); + } + + [Fact] + public static void WriteArrayOfQueueT() + { + Queue[] input = new Queue[2]; + input[0] = new Queue(new List { 1, 2 }); + input[1] = new Queue(new List { 3, 4 }); + + string json = JsonSerializer.ToString(input); + Assert.Equal("[[1,2],[3,4]]", json); + } + + [Fact] + public static void WritePrimitiveQueueT() + { + Queue input = new Queue(new List { 1, 2 }); + + string json = JsonSerializer.ToString(input); + Assert.Equal("[1,2]", json); + } + + [Fact] + public static void WriteHashSetTOfHashSetT() + { + HashSet> input = new HashSet>(new List> + { + new HashSet(new List() { 1, 2 }), + new HashSet(new List() { 3, 4 }) + }); + + string json = JsonSerializer.ToString(input); + Assert.Equal("[[1,2],[3,4]]", json); + } + + [Fact] + public static void WriteHashSetTOfArray() + { + HashSet input = new HashSet(new List + { + new int[] { 1, 2 }, + new int[] { 3, 4 } + }); + + string json = JsonSerializer.ToString(input); + Assert.Equal("[[1,2],[3,4]]", json); + } + + [Fact] + public static void WriteArrayOfHashSetT() + { + HashSet[] input = new HashSet[2]; + input[0] = new HashSet(new List { 1, 2 }); + input[1] = new HashSet(new List { 3, 4 }); + + string json = JsonSerializer.ToString(input); + Assert.Equal("[[1,2],[3,4]]", json); + } + + [Fact] + public static void WritePrimitiveHashSetT() + { + HashSet input = new HashSet(new List { 1, 2 }); + + string json = JsonSerializer.ToString(input); + Assert.Equal("[1,2]", json); + } + + [Fact] + public static void WriteLinkedListTOfLinkedListT() + { + LinkedList> input = new LinkedList>(new List> + { + new LinkedList(new List() { 1, 2 }), + new LinkedList(new List() { 3, 4 }) + }); + + string json = JsonSerializer.ToString(input); + Assert.Equal("[[1,2],[3,4]]", json); + } + + [Fact] + public static void WriteLinkedListTOfArray() + { + LinkedList input = new LinkedList(new List + { + new int[] { 1, 2 }, + new int[] { 3, 4 } + }); + + string json = JsonSerializer.ToString(input); + Assert.Equal("[[1,2],[3,4]]", json); + } + + [Fact] + public static void WriteArrayOfLinkedListT() + { + LinkedList[] input = new LinkedList[2]; + input[0] = new LinkedList(new List { 1, 2 }); + input[1] = new LinkedList(new List { 3, 4 }); + + string json = JsonSerializer.ToString(input); + Assert.Equal("[[1,2],[3,4]]", json); + } + + [Fact] + public static void WritePrimitiveLinkedListT() + { + LinkedList input = new LinkedList(new List { 1, 2 }); + + string json = JsonSerializer.ToString(input); + Assert.Equal("[1,2]", json); + } + + [Fact] + public static void WriteArrayOfSortedSetT() + { + SortedSet[] input = new SortedSet[2]; + input[0] = new SortedSet(new List { 1, 2 }); + input[1] = new SortedSet(new List { 3, 4 }); + + string json = JsonSerializer.ToString(input); + Assert.Equal("[[1,2],[3,4]]", json); + } + + [Fact] + public static void WritePrimitiveSortedSetT() + { + SortedSet input = new SortedSet(new List { 1, 2 }); + + string json = JsonSerializer.ToString(input); + Assert.Equal("[1,2]", json); + } + } +} diff --git a/src/System.Text.Json/tests/Serialization/Value.WriteTests.ImmutableCollections.cs b/src/System.Text.Json/tests/Serialization/Value.WriteTests.ImmutableCollections.cs new file mode 100644 index 000000000000..9ecbd8433d36 --- /dev/null +++ b/src/System.Text.Json/tests/Serialization/Value.WriteTests.ImmutableCollections.cs @@ -0,0 +1,397 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Collections.Generic; +using System.Collections.Immutable; +using Xunit; + +namespace System.Text.Json.Serialization.Tests +{ + public static partial class ValueTests + { + [Fact] + public static void WriteIImmutableListTOfIImmutableListT() + { + IImmutableList> input = ImmutableList.CreateRange(new List>{ + ImmutableList.CreateRange(new List() { 1, 2 }), + ImmutableList.CreateRange(new List() { 3, 4 }) + }); + + string json = JsonSerializer.ToString(input); + Assert.Equal("[[1,2],[3,4]]", json); + } + + [Fact] + public static void WriteIImmutableListTOfArray() + { + IImmutableList input = ImmutableList.CreateRange(new List + { + new int[] { 1, 2 }, + new int[] { 3, 4 } + }); + + string json = JsonSerializer.ToString(input); + Assert.Equal("[[1,2],[3,4]]", json); + } + + [Fact] + public static void WriteArrayOfIImmutableListT() + { + IImmutableList[] input = new IImmutableList[2]; + input[0] = ImmutableList.CreateRange(new List() { 1, 2 }); + input[1] = ImmutableList.CreateRange(new List() { 3, 4 }); + + string json = JsonSerializer.ToString(input); + Assert.Equal("[[1,2],[3,4]]", json); + } + + [Fact] + public static void WritePrimitiveIImmutableListT() + { + IImmutableList input = ImmutableList.CreateRange(new List { 1, 2 }); + + string json = JsonSerializer.ToString(input); + Assert.Equal("[1,2]", json); + } + + [Fact] + public static void WriteIImmutableStackTOfIImmutableStackT() + { + IImmutableStack> input = ImmutableStack.CreateRange(new List>{ + ImmutableStack.CreateRange(new List() { 1, 2 }), + ImmutableStack.CreateRange(new List() { 3, 4 }) + }); + + string json = JsonSerializer.ToString(input); + Assert.Equal("[[4,3],[2,1]]", json); + } + + [Fact] + public static void WriteIImmutableStackTOfArray() + { + IImmutableStack input = ImmutableStack.CreateRange(new List + { + new int[] { 1, 2 }, + new int[] { 3, 4 } + }); + + string json = JsonSerializer.ToString(input); + Assert.Equal("[[3,4],[1,2]]", json); + } + + [Fact] + public static void WriteArrayOfIImmutableStackT() + { + IImmutableStack[] input = new IImmutableStack[2]; + input[0] = ImmutableStack.CreateRange(new List() { 1, 2 }); + input[1] = ImmutableStack.CreateRange(new List() { 3, 4 }); + + string json = JsonSerializer.ToString(input); + Assert.Equal("[[2,1],[4,3]]", json); + } + + [Fact] + public static void WritePrimitiveIImmutableStackT() + { + IImmutableStack input = ImmutableStack.CreateRange(new List { 1, 2 }); + + string json = JsonSerializer.ToString(input); + Assert.Equal("[2,1]", json); + } + + [Fact] + public static void WriteIImmutableQueueTOfIImmutableQueueT() + { + IImmutableQueue> input = ImmutableQueue.CreateRange(new List>{ + ImmutableQueue.CreateRange(new List() { 1, 2 }), + ImmutableQueue.CreateRange(new List() { 3, 4 }) + }); + + string json = JsonSerializer.ToString(input); + Assert.Equal("[[1,2],[3,4]]", json); + } + + [Fact] + public static void WriteIImmutableQueueTOfArray() + { + IImmutableQueue input = ImmutableQueue.CreateRange(new List + { + new int[] { 1, 2 }, + new int[] { 3, 4 } + }); + + string json = JsonSerializer.ToString(input); + Assert.Equal("[[1,2],[3,4]]", json); + } + + [Fact] + public static void WriteArrayOfIImmutableQueueT() + { + IImmutableQueue[] input = new IImmutableQueue[2]; + input[0] = ImmutableQueue.CreateRange(new List() { 1, 2 }); + input[1] = ImmutableQueue.CreateRange(new List() { 3, 4 }); + + string json = JsonSerializer.ToString(input); + Assert.Equal("[[1,2],[3,4]]", json); + } + + [Fact] + public static void WritePrimitiveIImmutableQueueT() + { + IImmutableQueue input = ImmutableQueue.CreateRange(new List { 1, 2 }); + + string json = JsonSerializer.ToString(input); + Assert.Equal("[1,2]", json); + } + + [Fact] + public static void WriteIImmutableSetTOfIImmutableSetT() + { + IImmutableSet> input = ImmutableHashSet.CreateRange(new List>{ + ImmutableHashSet.CreateRange(new List() { 1, 2 }), + ImmutableHashSet.CreateRange(new List() { 3, 4 }) + }); + + string json = JsonSerializer.ToString(input); + Assert.True(json.Contains("[1,2]")); + Assert.True(json.Contains("[3,4]")); + } + + [Fact] + public static void WriteIImmutableSetTOfArray() + { + IImmutableSet input = ImmutableHashSet.CreateRange(new List + { + new int[] { 1, 2 }, + new int[] { 3, 4 } + }); + + string json = JsonSerializer.ToString(input); + Assert.True(json.Contains("[1,2]")); + Assert.True(json.Contains("[3,4]")); + } + + [Fact] + public static void WriteArrayOfIImmutableSetT() + { + IImmutableSet[] input = new IImmutableSet[2]; + input[0] = ImmutableHashSet.CreateRange(new List() { 1, 2 }); + input[1] = ImmutableHashSet.CreateRange(new List() { 3, 4 }); + + string json = JsonSerializer.ToString(input); + Assert.Equal("[[1,2],[3,4]]", json); + } + + [Fact] + public static void WritePrimitiveIImmutableSetT() + { + IImmutableSet input = ImmutableHashSet.CreateRange(new List { 1, 2 }); + + string json = JsonSerializer.ToString(input); + Assert.Equal("[1,2]", json); + } + + [Fact] + public static void WriteImmutableHashSetTOfImmutableHashSetT() + { + ImmutableHashSet> input = ImmutableHashSet.CreateRange(new List>{ + ImmutableHashSet.CreateRange(new List() { 1, 2 }), + ImmutableHashSet.CreateRange(new List() { 3, 4 }) + }); + + string json = JsonSerializer.ToString(input); + Assert.True(json.Contains("[1,2]")); + Assert.True(json.Contains("[3,4]")); + } + + [Fact] + public static void WriteImmutableHashSetTOfArray() + { + ImmutableHashSet input = ImmutableHashSet.CreateRange(new List + { + new int[] { 1, 2 }, + new int[] { 3, 4 } + }); + + string json = JsonSerializer.ToString(input); + Assert.True(json.Contains("[1,2]")); + Assert.True(json.Contains("[3,4]")); + } + + [Fact] + public static void WriteArrayOfImmutableHashSetT() + { + ImmutableHashSet[] input = new ImmutableHashSet[2]; + input[0] = ImmutableHashSet.CreateRange(new List() { 1, 2 }); + input[1] = ImmutableHashSet.CreateRange(new List() { 3, 4 }); + + string json = JsonSerializer.ToString(input); + Assert.Equal("[[1,2],[3,4]]", json); + } + + [Fact] + public static void WritePrimitiveImmutableHashSetT() + { + ImmutableHashSet input = ImmutableHashSet.CreateRange(new List { 1, 2 }); + + string json = JsonSerializer.ToString(input); + Assert.Equal("[1,2]", json); + } + + [Fact] + public static void WriteImmutableListTOfImmutableListT() + { + ImmutableList> input = ImmutableList.CreateRange(new List>{ + ImmutableList.CreateRange(new List() { 1, 2 }), + ImmutableList.CreateRange(new List() { 3, 4 }) + }); + + string json = JsonSerializer.ToString(input); + Assert.Equal("[[1,2],[3,4]]", json); + } + + [Fact] + public static void WriteImmutableListTOfArray() + { + ImmutableList input = ImmutableList.CreateRange(new List + { + new int[] { 1, 2 }, + new int[] { 3, 4 } + }); + + string json = JsonSerializer.ToString(input); + Assert.Equal("[[1,2],[3,4]]", json); + } + + [Fact] + public static void WriteArrayOfImmutableListT() + { + ImmutableList[] input = new ImmutableList[2]; + input[0] = ImmutableList.CreateRange(new List() { 1, 2 }); + input[1] = ImmutableList.CreateRange(new List() { 3, 4 }); + + string json = JsonSerializer.ToString(input); + Assert.Equal("[[1,2],[3,4]]", json); + } + + [Fact] + public static void WritePrimitiveImmutableListT() + { + ImmutableList input = ImmutableList.CreateRange(new List { 1, 2 }); + + string json = JsonSerializer.ToString(input); + Assert.Equal("[1,2]", json); + } + + [Fact] + public static void WriteImmutableStackTOfImmutableStackT() + { + ImmutableStack> input = ImmutableStack.CreateRange(new List>{ + ImmutableStack.CreateRange(new List() { 1, 2 }), + ImmutableStack.CreateRange(new List() { 3, 4 }) + }); + + string json = JsonSerializer.ToString(input); + Assert.Equal("[[4,3],[2,1]]", json); + } + + [Fact] + public static void WriteImmutableStackTOfArray() + { + ImmutableStack input = ImmutableStack.CreateRange(new List + { + new int[] { 1, 2 }, + new int[] { 3, 4 } + }); + + string json = JsonSerializer.ToString(input); + Assert.Equal("[[3,4],[1,2]]", json); + } + + [Fact] + public static void WriteArrayOfImmutableStackT() + { + ImmutableStack[] input = new ImmutableStack[2]; + input[0] = ImmutableStack.CreateRange(new List() { 1, 2 }); + input[1] = ImmutableStack.CreateRange(new List() { 3, 4 }); + + string json = JsonSerializer.ToString(input); + Assert.Equal("[[2,1],[4,3]]", json); + } + + [Fact] + public static void WritePrimitiveImmutableStackT() + { + ImmutableStack input = ImmutableStack.CreateRange(new List { 1, 2 }); + + string json = JsonSerializer.ToString(input); + Assert.Equal("[2,1]", json); + } + + [Fact] + public static void WriteImmutableQueueTOfImmutableQueueT() + { + ImmutableQueue> input = ImmutableQueue.CreateRange(new List>{ + ImmutableQueue.CreateRange(new List() { 1, 2 }), + ImmutableQueue.CreateRange(new List() { 3, 4 }) + }); + + string json = JsonSerializer.ToString(input); + Assert.Equal("[[1,2],[3,4]]", json); + } + + [Fact] + public static void WriteImmutableQueueTOfArray() + { + ImmutableQueue input = ImmutableQueue.CreateRange(new List + { + new int[] { 1, 2 }, + new int[] { 3, 4 } + }); + + string json = JsonSerializer.ToString(input); + Assert.Equal("[[1,2],[3,4]]", json); + } + + [Fact] + public static void WriteArrayOfImmutableQueueT() + { + ImmutableQueue[] input = new ImmutableQueue[2]; + input[0] = ImmutableQueue.CreateRange(new List() { 1, 2 }); + input[1] = ImmutableQueue.CreateRange(new List() { 3, 4 }); + + string json = JsonSerializer.ToString(input); + Assert.Equal("[[1,2],[3,4]]", json); + } + + [Fact] + public static void WritePrimitiveImmutableQueueT() + { + ImmutableQueue input = ImmutableQueue.CreateRange(new List { 1, 2 }); + + string json = JsonSerializer.ToString(input); + Assert.Equal("[1,2]", json); + } + + [Fact] + public static void WriteArrayOfImmutableSortedSetT() + { + ImmutableSortedSet[] input = new ImmutableSortedSet[2]; + input[0] = ImmutableSortedSet.CreateRange(new List() { 1, 2 }); + input[1] = ImmutableSortedSet.CreateRange(new List() { 3, 4 }); + + string json = JsonSerializer.ToString(input); + Assert.Equal("[[1,2],[3,4]]", json); + } + + [Fact] + public static void WritePrimitiveImmutableSortedSetT() + { + ImmutableSortedSet input = ImmutableSortedSet.CreateRange(new List { 1, 2 }); + + string json = JsonSerializer.ToString(input); + Assert.Equal("[1,2]", json); + } + } +} diff --git a/src/System.Text.Json/tests/Serialization/Value.WriteTests.cs b/src/System.Text.Json/tests/Serialization/Value.WriteTests.cs index 8a6c96000206..17b845b2cf12 100644 --- a/src/System.Text.Json/tests/Serialization/Value.WriteTests.cs +++ b/src/System.Text.Json/tests/Serialization/Value.WriteTests.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System.Collections.Generic; +using System.Collections.Immutable; using Xunit; namespace System.Text.Json.Serialization.Tests @@ -114,281 +115,5 @@ public static void WritePrimitiveJaggedArray() string json = JsonSerializer.ToString(input); Assert.Equal("[[1,2],[3,4]]", json); } - - [Fact] - public static void WriteListOfList() - { - var input = new List> - { - new List() { 1, 2 }, - new List() { 3, 4 } - }; - - string json = JsonSerializer.ToString(input); - Assert.Equal("[[1,2],[3,4]]", json); - } - - [Fact] - public static void WriteListOfArray() - { - var input = new List - { - new int[] { 1, 2 }, - new int[] { 3, 4 } - }; - - string json = JsonSerializer.ToString(input); - Assert.Equal("[[1,2],[3,4]]", json); - } - - [Fact] - public static void WriteArrayOfList() - { - var input = new List[2]; - input[0] = new List() { 1, 2 }; - input[1] = new List() { 3, 4 }; - - string json = JsonSerializer.ToString(input); - Assert.Equal("[[1,2],[3,4]]", json); - } - - [Fact] - public static void WritePrimitiveList() - { - var input = new List { 1, 2 }; - - string json = JsonSerializer.ToString(input); - Assert.Equal("[1,2]", json); - } - - [Fact] - public static void WriteIEnumerableTOfIEnumerableT() - { - IEnumerable> input = new List> - { - new List() { 1, 2 }, - new List() { 3, 4 } - }; - - string json = JsonSerializer.ToString(input); - Assert.Equal("[[1,2],[3,4]]", json); - } - - [Fact] - public static void WriteIEnumerableTOfArray() - { - IEnumerable input = new List - { - new int[] { 1, 2 }, - new int[] { 3, 4 } - }; - - string json = JsonSerializer.ToString(input); - Assert.Equal("[[1,2],[3,4]]", json); - } - - [Fact] - public static void WriteArrayOfIEnumerableT() - { - IEnumerable[] input = new List[2]; - input[0] = new List() { 1, 2 }; - input[1] = new List() { 3, 4 }; - - string json = JsonSerializer.ToString(input); - Assert.Equal("[[1,2],[3,4]]", json); - } - - [Fact] - public static void WritePrimitiveIEnumerableT() - { - IEnumerable input = new List { 1, 2 }; - - string json = JsonSerializer.ToString(input); - Assert.Equal("[1,2]", json); - } - - [Fact] - public static void WriteIListTOfIListT() - { - IList> input = new List> - { - new List() { 1, 2 }, - new List() { 3, 4 } - }; - - string json = JsonSerializer.ToString(input); - Assert.Equal("[[1,2],[3,4]]", json); - } - - [Fact] - public static void WriteIListTOfArray() - { - IList input = new List - { - new int[] { 1, 2 }, - new int[] { 3, 4 } - }; - - string json = JsonSerializer.ToString(input); - Assert.Equal("[[1,2],[3,4]]", json); - } - - [Fact] - public static void WriteArrayOfIListT() - { - IList[] input = new List[2]; - input[0] = new List() { 1, 2 }; - input[1] = new List() { 3, 4 }; - - string json = JsonSerializer.ToString(input); - Assert.Equal("[[1,2],[3,4]]", json); - } - - [Fact] - public static void WritePrimitiveIListT() - { - IList input = new List { 1, 2 }; - - string json = JsonSerializer.ToString(input); - Assert.Equal("[1,2]", json); - } - - [Fact] - public static void WriteICollectionTOfICollectionT() - { - ICollection> input = new List> - { - new List() { 1, 2 }, - new List() { 3, 4 } - }; - - string json = JsonSerializer.ToString(input); - Assert.Equal("[[1,2],[3,4]]", json); - } - - [Fact] - public static void WriteICollectionTOfArray() - { - ICollection input = new List - { - new int[] { 1, 2 }, - new int[] { 3, 4 } - }; - - string json = JsonSerializer.ToString(input); - Assert.Equal("[[1,2],[3,4]]", json); - } - - [Fact] - public static void WriteArrayOfICollectionT() - { - ICollection[] input = new List[2]; - input[0] = new List() { 1, 2 }; - input[1] = new List() { 3, 4 }; - - string json = JsonSerializer.ToString(input); - Assert.Equal("[[1,2],[3,4]]", json); - } - - [Fact] - public static void WritePrimitiveICollectionT() - { - ICollection input = new List { 1, 2 }; - - string json = JsonSerializer.ToString(input); - Assert.Equal("[1,2]", json); - } - - [Fact] - public static void WriteIReadOnlyCollectionTOfIReadOnlyCollectionT() - { - IReadOnlyCollection> input = new List> - { - new List() { 1, 2 }, - new List() { 3, 4 } - }; - - string json = JsonSerializer.ToString(input); - Assert.Equal("[[1,2],[3,4]]", json); - } - - [Fact] - public static void WriteIReadOnlyCollectionTOfArray() - { - IReadOnlyCollection input = new List - { - new int[] { 1, 2 }, - new int[] { 3, 4 } - }; - - string json = JsonSerializer.ToString(input); - Assert.Equal("[[1,2],[3,4]]", json); - } - - [Fact] - public static void WriteArrayOfIReadOnlyCollectionT() - { - IReadOnlyCollection[] input = new List[2]; - input[0] = new List() { 1, 2 }; - input[1] = new List() { 3, 4 }; - - string json = JsonSerializer.ToString(input); - Assert.Equal("[[1,2],[3,4]]", json); - } - - [Fact] - public static void WritePrimitiveIReadOnlyCollectionT() - { - IReadOnlyCollection input = new List { 1, 2 }; - - string json = JsonSerializer.ToString(input); - Assert.Equal("[1,2]", json); - } - - [Fact] - public static void WriteIReadOnlyListTOfIReadOnlyListT() - { - IReadOnlyList> input = new List> - { - new List() { 1, 2 }, - new List() { 3, 4 } - }; - - string json = JsonSerializer.ToString(input); - Assert.Equal("[[1,2],[3,4]]", json); - } - - [Fact] - public static void WriteIReadOnlyListTOfArray() - { - IReadOnlyList input = new List - { - new int[] { 1, 2 }, - new int[] { 3, 4 } - }; - - string json = JsonSerializer.ToString(input); - Assert.Equal("[[1,2],[3,4]]", json); - } - - [Fact] - public static void WriteArrayOfIReadOnlyListT() - { - IReadOnlyList[] input = new List[2]; - input[0] = new List() { 1, 2 }; - input[1] = new List() { 3, 4 }; - - string json = JsonSerializer.ToString(input); - Assert.Equal("[[1,2],[3,4]]", json); - } - - [Fact] - public static void WritePrimitiveIReadOnlyListT() - { - IReadOnlyList input = new List { 1, 2 }; - - string json = JsonSerializer.ToString(input); - Assert.Equal("[1,2]", json); - } } } diff --git a/src/System.Text.Json/tests/System.Text.Json.Tests.csproj b/src/System.Text.Json/tests/System.Text.Json.Tests.csproj index 1183e02082b6..fb067fa78dc2 100644 --- a/src/System.Text.Json/tests/System.Text.Json.Tests.csproj +++ b/src/System.Text.Json/tests/System.Text.Json.Tests.csproj @@ -51,7 +51,11 @@ + + + + From 5b9efef3d1dc97934c702c3602dd89e22d92dc8c Mon Sep 17 00:00:00 2001 From: Matt Galbraith Date: Mon, 13 May 2019 15:31:18 -0700 Subject: [PATCH 325/607] Update windows.yml Try escaping the () --- eng/pipelines/windows.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/pipelines/windows.yml b/eng/pipelines/windows.yml index ca349a967ac9..f2f95e46b32c 100644 --- a/eng/pipelines/windows.yml +++ b/eng/pipelines/windows.yml @@ -126,12 +126,12 @@ jobs: - ${{ if eq(parameters.isOfficialBuild, 'false') }}: - netcoreappWindowsQueues: Windows.7.Amd64.Open+Windows.81.Amd64.Open+Windows.10.Amd64.ClientRS4.ES.Open - - nanoQueues: (Windows.Nano.1803.Amd64.Open)windows.10.amd64.serverrs4.open@mcr.microsoft.com/dotnet-buildtools/prereqs:nanoserver-1803-helix-amd64-05227e1-20190509225944 + - nanoQueues: \(Windows.Nano.1803.Amd64.Open\)windows.10.amd64.serverrs4.open@mcr.microsoft.com/dotnet-buildtools/prereqs:nanoserver-1803-helix-amd64-05227e1-20190509225944 - uapNetfxQueues: Windows.10.Amd64.ClientRS5.Open - ${{ if eq(parameters.isOfficialBuild, 'true') }}: - netcoreappWindowsQueues: Windows.7.Amd64+Windows.81.Amd64+Windows.10.Amd64.Core+Windows.10.Amd64.ClientRS4 - - nanoQueues: (Windows.Nano.1803.Amd64)windows.10.amd64.serverrs4@mcr.microsoft.com/dotnet-buildtools/prereqs:nanoserver-1803-helix-amd64-05227e1-20190509225944 + - nanoQueues: \(Windows.Nano.1803.Amd64\)windows.10.amd64.serverrs4@mcr.microsoft.com/dotnet-buildtools/prereqs:nanoserver-1803-helix-amd64-05227e1-20190509225944 - uapNetfxQueues: Windows.10.Amd64.ClientRS5 - windowsArmQueue: Windows.10.Arm64 From 18b98c9aa2d92b60da217b1912e368a6c48b4f2f Mon Sep 17 00:00:00 2001 From: Calvin Buckley Date: Mon, 13 May 2019 19:46:02 -0300 Subject: [PATCH 326/607] Fix ODBC issues with UTF-16 (#36710) * Fixup UTF-16 string marshalling rules in ODBC Based on a patch by Filip Navara (@filipnavara) - this clears up some ambigious situations after the change to UTF-8 by default. * Fix endianness issue marshalling UTF-16 strings manually in ODBC Encoding.Unicode is used for UTF-16LE, and is no good on big endian systems. Detect at runtime what Encoding object to use. This fixes ODBC on Mono for IBM i. * Restore in attributes from botched patch application * and this line too * remove unneeded MarshalAs on SQLGetDiagFieldW * compile error typo fix * Remove in attributes on strings --- src/Common/src/Interop/Interop.Odbc.cs | 47 +++++-------------- .../src/System/Data/Odbc/OdbcConnection.cs | 4 +- 2 files changed, 15 insertions(+), 36 deletions(-) diff --git a/src/Common/src/Interop/Interop.Odbc.cs b/src/Common/src/Interop/Interop.Odbc.cs index 81d7c12d2a3c..c71b3cbead7d 100644 --- a/src/Common/src/Interop/Interop.Odbc.cs +++ b/src/Common/src/Interop/Interop.Odbc.cs @@ -94,19 +94,15 @@ internal static partial class Odbc // SQLSMALLINT *StringLength, SQLPOINTER NumericAttribute); // #endif - [DllImport(Interop.Libraries.Odbc32)] + [DllImport(Interop.Libraries.Odbc32, CharSet = CharSet.Unicode)] internal static extern /*SQLRETURN*/ODBC32.RetCode SQLColumnsW( /*SQLHSTMT*/OdbcStatementHandle StatementHandle, - [In, MarshalAs(UnmanagedType.LPWStr)] /*SQLCHAR* */string CatalogName, /*SQLSMALLINT*/short NameLen1, - [In, MarshalAs(UnmanagedType.LPWStr)] /*SQLCHAR* */string SchemaName, /*SQLSMALLINT*/short NameLen2, - [In, MarshalAs(UnmanagedType.LPWStr)] /*SQLCHAR* */string TableName, /*SQLSMALLINT*/short NameLen3, - [In, MarshalAs(UnmanagedType.LPWStr)] /*SQLCHAR* */string ColumnName, /*SQLSMALLINT*/short NameLen4); @@ -118,8 +114,7 @@ internal static partial class Odbc internal static extern /*SQLRETURN*/ODBC32.RetCode SQLDriverConnectW( /*SQLHDBC*/OdbcConnectionHandle hdbc, /*SQLHWND*/IntPtr hwnd, - [In, MarshalAs(UnmanagedType.LPWStr)] - /*SQLCHAR* */string connectionstring, + /*SQLCHAR* */string connectionstring, /*SQLSMALLINT*/short cbConnectionstring, /*SQLCHAR* */IntPtr connectionstringout, /*SQLSMALLINT*/short cbConnectionstringoutMax, @@ -135,7 +130,6 @@ internal static partial class Odbc [DllImport(Interop.Libraries.Odbc32, CharSet = CharSet.Unicode)] internal static extern /*SQLRETURN*/ODBC32.RetCode SQLExecDirectW( /*SQLHSTMT*/OdbcStatementHandle StatementHandle, - [In, MarshalAs(UnmanagedType.LPWStr)] /*SQLCHAR* */string StatementText, /*SQLINTEGER*/int TextLength); @@ -172,7 +166,7 @@ internal static partial class Odbc /*SQLSMALLINT*/ODBC32.SQL_C TargetType, /*SQLPOINTER*/CNativeBuffer TargetValue, /*SQLLEN*/IntPtr BufferLength, // sql.h differs from MSDN - /*SQLLEN* */out IntPtr StrLen_or_Ind); + /*SQLLEN* */out IntPtr StrLen_or_Ind); [DllImport(Interop.Libraries.Odbc32)] internal static extern /*SQLRETURN*/ODBC32.RetCode SQLGetDescFieldW( @@ -200,7 +194,6 @@ internal static partial class Odbc /*SQLHANDLE*/ OdbcHandle Handle, /*SQLSMALLINT*/ short RecNumber, /*SQLSMALLINT*/ short DiagIdentifier, - [MarshalAs(UnmanagedType.LPWStr)] /*SQLPOINTER*/ [Out] StringBuilder rchState, /*SQLSMALLINT*/ short BufferLength, /*SQLSMALLINT* */ out short StringLength); @@ -252,43 +245,39 @@ internal static partial class Odbc [DllImport(Interop.Libraries.Odbc32, CharSet = CharSet.Unicode)] internal static extern /*SQLRETURN*/ODBC32.RetCode SQLPrepareW( /*SQLHSTMT*/OdbcStatementHandle StatementHandle, - [In, MarshalAs(UnmanagedType.LPWStr)] /*SQLCHAR* */string StatementText, /*SQLINTEGER*/int TextLength); [DllImport(Interop.Libraries.Odbc32, CharSet = CharSet.Unicode)] internal static extern /*SQLRETURN*/ODBC32.RetCode SQLPrimaryKeysW( /*SQLHSTMT*/OdbcStatementHandle StatementHandle, - [In, MarshalAs(UnmanagedType.LPWStr)] /*SQLCHAR* */string CatalogName, /*SQLSMALLINT*/short NameLen1, - [In, MarshalAs(UnmanagedType.LPWStr)] /*SQLCHAR* */ string SchemaName, /*SQLSMALLINT*/short NameLen2, - [In, MarshalAs(UnmanagedType.LPWStr)] /*SQLCHAR* */string TableName, /*SQLSMALLINT*/short NameLen3); [DllImport(Interop.Libraries.Odbc32, CharSet = CharSet.Unicode)] internal static extern /*SQLRETURN*/ODBC32.RetCode SQLProcedureColumnsW( /*SQLHSTMT*/OdbcStatementHandle StatementHandle, - [In, MarshalAs(UnmanagedType.LPWStr)] /*SQLCHAR* */ string CatalogName, + /*SQLCHAR* */ string CatalogName, /*SQLSMALLINT*/short NameLen1, - [In, MarshalAs(UnmanagedType.LPWStr)] /*SQLCHAR* */ string SchemaName, + /*SQLCHAR* */ string SchemaName, /*SQLSMALLINT*/short NameLen2, - [In, MarshalAs(UnmanagedType.LPWStr)] /*SQLCHAR* */ string ProcName, + /*SQLCHAR* */ string ProcName, /*SQLSMALLINT*/short NameLen3, - [In, MarshalAs(UnmanagedType.LPWStr)] /*SQLCHAR* */ string ColumnName, + /*SQLCHAR* */ string ColumnName, /*SQLSMALLINT*/short NameLen4); - [DllImport(Interop.Libraries.Odbc32)] + [DllImport(Interop.Libraries.Odbc32, CharSet = CharSet.Unicode)] internal static extern /*SQLRETURN*/ODBC32.RetCode SQLProceduresW( /*SQLHSTMT*/OdbcStatementHandle StatementHandle, - [In, MarshalAs(UnmanagedType.LPWStr)] /*SQLCHAR* */ string CatalogName, + /*SQLCHAR* */ string CatalogName, /*SQLSMALLINT*/short NameLen1, - [In, MarshalAs(UnmanagedType.LPWStr)] /*SQLCHAR* */ string SchemaName, + /*SQLCHAR* */ string SchemaName, /*SQLSMALLINT*/short NameLen2, - [In, MarshalAs(UnmanagedType.LPWStr)] /*SQLCHAR* */ string ProcName, + /*SQLCHAR* */ string ProcName, /*SQLSMALLINT*/short NameLen3); [DllImport(Interop.Libraries.Odbc32)] @@ -319,7 +308,7 @@ internal static partial class Odbc [DllImport(Interop.Libraries.Odbc32)] internal static extern /*SQLRETURN*/ODBC32.RetCode SQLSetConnectAttrW( // used only for AutoCommitOn - /*SQLHBDC*/IntPtr ConnectionHandle, + /*SQLHBDC*/IntPtr ConnectionHandle, /*SQLINTEGER*/ODBC32.SQL_ATTR Attribute, /*SQLPOINTER*/IntPtr Value, /*SQLINTEGER*/int StringLength); @@ -359,13 +348,10 @@ internal static partial class Odbc internal static extern /*SQLRETURN*/ODBC32.RetCode SQLSpecialColumnsW( /*SQLHSTMT*/OdbcStatementHandle StatementHandle, /*SQLUSMALLINT*/ODBC32.SQL_SPECIALCOLS IdentifierType, - [In, MarshalAs(UnmanagedType.LPWStr)] /*SQLCHAR* */string CatalogName, /*SQLSMALLINT*/short NameLen1, - [In, MarshalAs(UnmanagedType.LPWStr)] /*SQLCHAR* */string SchemaName, /*SQLSMALLINT*/short NameLen2, - [In, MarshalAs(UnmanagedType.LPWStr)] /*SQLCHAR* */string TableName, /*SQLSMALLINT*/short NameLen3, /*SQLUSMALLINT*/ODBC32.SQL_SCOPE Scope, @@ -374,31 +360,24 @@ internal static partial class Odbc [DllImport(Interop.Libraries.Odbc32, CharSet = CharSet.Unicode)] internal static extern /*SQLRETURN*/ODBC32.RetCode SQLStatisticsW( /*SQLHSTMT*/OdbcStatementHandle StatementHandle, - [In, MarshalAs(UnmanagedType.LPWStr)] /*SQLCHAR* */string CatalogName, /*SQLSMALLINT*/short NameLen1, - [In, MarshalAs(UnmanagedType.LPWStr)] /*SQLCHAR* */string SchemaName, /*SQLSMALLINT*/short NameLen2, - [In] /*SQLCHAR* */IntPtr TableName, // IntPtr instead of string because callee may mutate contents /*SQLSMALLINT*/short NameLen3, /*SQLUSMALLINT*/short Unique, /*SQLUSMALLINT*/short Reserved); - [DllImport(Interop.Libraries.Odbc32)] + [DllImport(Interop.Libraries.Odbc32, CharSet = CharSet.Unicode)] internal static extern /*SQLRETURN*/ODBC32.RetCode SQLTablesW( /*SQLHSTMT*/OdbcStatementHandle StatementHandle, - [In, MarshalAs(UnmanagedType.LPWStr)] /*SQLCHAR* */string CatalogName, /*SQLSMALLINT*/short NameLen1, - [In, MarshalAs(UnmanagedType.LPWStr)] /*SQLCHAR* */string SchemaName, /*SQLSMALLINT*/short NameLen2, - [In, MarshalAs(UnmanagedType.LPWStr)] /*SQLCHAR* */string TableName, /*SQLSMALLINT*/short NameLen3, - [In, MarshalAs(UnmanagedType.LPWStr)] /*SQLCHAR* */string TableType, /*SQLSMALLINT*/short NameLen4); } diff --git a/src/System.Data.Odbc/src/System/Data/Odbc/OdbcConnection.cs b/src/System.Data.Odbc/src/System/Data/Odbc/OdbcConnection.cs index 223e729ce8ea..7afd82523a59 100644 --- a/src/System.Data.Odbc/src/System/Data/Odbc/OdbcConnection.cs +++ b/src/System.Data.Odbc/src/System/Data/Odbc/OdbcConnection.cs @@ -394,7 +394,7 @@ internal string GetConnectAttrString(ODBC32.SQL_ATTR attribute) } if ((ODBC32.RetCode.SUCCESS == retcode) || (ODBC32.RetCode.SUCCESS_WITH_INFO == retcode)) { - value = Encoding.Unicode.GetString(buffer, 0, Math.Min(cbActual, buffer.Length)); + value = (BitConverter.IsLittleEndian ? Encoding.Unicode : Encoding.BigEndianUnicode).GetString(buffer, 0, Math.Min(cbActual, buffer.Length)); } else if (retcode == ODBC32.RetCode.ERROR) { @@ -497,7 +497,7 @@ private string GetInfoStringUnhandled(ODBC32.SQL_INFO info, bool handleError) } if (retcode == ODBC32.RetCode.SUCCESS || retcode == ODBC32.RetCode.SUCCESS_WITH_INFO) { - value = Encoding.Unicode.GetString(buffer, 0, Math.Min(cbActual, buffer.Length)); + value = (BitConverter.IsLittleEndian ? Encoding.Unicode : Encoding.BigEndianUnicode).GetString(buffer, 0, Math.Min(cbActual, buffer.Length)); } else if (handleError) { From 9b58db24948c2917cdc01a5805c6a1c52cab9838 Mon Sep 17 00:00:00 2001 From: Matt Galbraith Date: Mon, 13 May 2019 15:49:50 -0700 Subject: [PATCH 327/607] Update windows.yml change to double quotes --- eng/pipelines/windows.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/pipelines/windows.yml b/eng/pipelines/windows.yml index f2f95e46b32c..657f7a66bd4d 100644 --- a/eng/pipelines/windows.yml +++ b/eng/pipelines/windows.yml @@ -126,12 +126,12 @@ jobs: - ${{ if eq(parameters.isOfficialBuild, 'false') }}: - netcoreappWindowsQueues: Windows.7.Amd64.Open+Windows.81.Amd64.Open+Windows.10.Amd64.ClientRS4.ES.Open - - nanoQueues: \(Windows.Nano.1803.Amd64.Open\)windows.10.amd64.serverrs4.open@mcr.microsoft.com/dotnet-buildtools/prereqs:nanoserver-1803-helix-amd64-05227e1-20190509225944 + - nanoQueues: "(Windows.Nano.1803.Amd64.Open)windows.10.amd64.serverrs4.open@mcr.microsoft.com/dotnet-buildtools/prereqs:nanoserver-1803-helix-amd64-05227e1-20190509225944" - uapNetfxQueues: Windows.10.Amd64.ClientRS5.Open - ${{ if eq(parameters.isOfficialBuild, 'true') }}: - netcoreappWindowsQueues: Windows.7.Amd64+Windows.81.Amd64+Windows.10.Amd64.Core+Windows.10.Amd64.ClientRS4 - - nanoQueues: \(Windows.Nano.1803.Amd64\)windows.10.amd64.serverrs4@mcr.microsoft.com/dotnet-buildtools/prereqs:nanoserver-1803-helix-amd64-05227e1-20190509225944 + - nanoQueues: "(Windows.Nano.1803.Amd64)windows.10.amd64.serverrs4@mcr.microsoft.com/dotnet-buildtools/prereqs:nanoserver-1803-helix-amd64-05227e1-20190509225944" - uapNetfxQueues: Windows.10.Amd64.ClientRS5 - windowsArmQueue: Windows.10.Arm64 From 0ba9f4a4a4a9dafc8d4853ca104584554e8aaaa0 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Mon, 13 May 2019 16:05:29 -0700 Subject: [PATCH 328/607] Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-optimization build 20190510.1 (#37585) - optimization.windows_nt-x64.IBC.CoreFx - 99.99.99-master-20190510.1 --- eng/Version.Details.xml | 2 +- eng/Versions.props | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 1b9d30142159..da675eec8d28 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -94,7 +94,7 @@ https://github.com/dotnet/arcade 1b8589bbf53b9a5e819460798eff59830f39a3be - + https://dev.azure.com/dnceng/internal/_git/dotnet-optimization d2be6e027cb7d128e710a8f2efa97fff82ecff20 diff --git a/eng/Versions.props b/eng/Versions.props index 25c357f76adb..204f8f5c03fb 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -48,6 +48,6 @@ 2.1.0-prerelease.19263.1 - 99.99.99-master-20190509.3 + 99.99.99-master-20190510.1 From 10d0327c8d7be6e6cd743ddbcc1d74e329fc2360 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Mon, 13 May 2019 16:13:12 -0700 Subject: [PATCH 329/607] [master] Update dependencies from dotnet/core-setup (#37604) * Update dependencies from https://github.com/dotnet/core-setup build 20190510.13 - Microsoft.NETCore.App - 3.0.0-preview6-27710-13 - Microsoft.NETCore.DotNetHost - 3.0.0-preview6-27710-13 - Microsoft.NETCore.DotNetHostPolicy - 3.0.0-preview6-27710-13 * Update dependencies from https://github.com/dotnet/core-setup build 20190511.04 - Microsoft.NETCore.App - 3.0.0-preview6-27711-04 - Microsoft.NETCore.DotNetHost - 3.0.0-preview6-27711-04 - Microsoft.NETCore.DotNetHostPolicy - 3.0.0-preview6-27711-04 * Update dependencies from https://github.com/dotnet/core-setup build 20190512.03 - Microsoft.NETCore.App - 3.0.0-preview6-27712-03 - Microsoft.NETCore.DotNetHost - 3.0.0-preview6-27712-03 - Microsoft.NETCore.DotNetHostPolicy - 3.0.0-preview6-27712-03 --- eng/Version.Details.xml | 12 ++++++------ eng/Versions.props | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index da675eec8d28..896b34f128a0 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -14,17 +14,17 @@ - + https://github.com/dotnet/core-setup - a8478dda1140e055651636fe35cad036f2585edd + 1085b414679a72791b4de59c09bf4c53144bf5ab - + https://github.com/dotnet/core-setup - a8478dda1140e055651636fe35cad036f2585edd + 1085b414679a72791b4de59c09bf4c53144bf5ab - + https://github.com/dotnet/core-setup - a8478dda1140e055651636fe35cad036f2585edd + 1085b414679a72791b4de59c09bf4c53144bf5ab https://github.com/dotnet/corefx diff --git a/eng/Versions.props b/eng/Versions.props index 204f8f5c03fb..563e49394df9 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -36,9 +36,9 @@ 2.2.0-beta.19254.1 1.0.0-beta.19254.1 - 3.0.0-preview6-27709-05 - 3.0.0-preview6-27709-05 - 3.0.0-preview6-27709-05 + 3.0.0-preview6-27712-03 + 3.0.0-preview6-27712-03 + 3.0.0-preview6-27712-03 3.0.0-preview6-27710-71 3.0.0-preview6-27710-71 From fc59ec7a4206ef7173b9777404ff7dafaad6cc3a Mon Sep 17 00:00:00 2001 From: Matt Galbraith Date: Mon, 13 May 2019 16:18:26 -0700 Subject: [PATCH 330/607] Update windows.yml Ah ha, it's a backtick to get powershell to work with ( ) --- eng/pipelines/windows.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/pipelines/windows.yml b/eng/pipelines/windows.yml index 657f7a66bd4d..3cef4cb6ca96 100644 --- a/eng/pipelines/windows.yml +++ b/eng/pipelines/windows.yml @@ -126,12 +126,12 @@ jobs: - ${{ if eq(parameters.isOfficialBuild, 'false') }}: - netcoreappWindowsQueues: Windows.7.Amd64.Open+Windows.81.Amd64.Open+Windows.10.Amd64.ClientRS4.ES.Open - - nanoQueues: "(Windows.Nano.1803.Amd64.Open)windows.10.amd64.serverrs4.open@mcr.microsoft.com/dotnet-buildtools/prereqs:nanoserver-1803-helix-amd64-05227e1-20190509225944" + - nanoQueues: `(Windows.Nano.1803.Amd64.Open`)windows.10.amd64.serverrs4.open@mcr.microsoft.com/dotnet-buildtools/prereqs:nanoserver-1803-helix-amd64-05227e1-20190509225944" - uapNetfxQueues: Windows.10.Amd64.ClientRS5.Open - ${{ if eq(parameters.isOfficialBuild, 'true') }}: - netcoreappWindowsQueues: Windows.7.Amd64+Windows.81.Amd64+Windows.10.Amd64.Core+Windows.10.Amd64.ClientRS4 - - nanoQueues: "(Windows.Nano.1803.Amd64)windows.10.amd64.serverrs4@mcr.microsoft.com/dotnet-buildtools/prereqs:nanoserver-1803-helix-amd64-05227e1-20190509225944" + - nanoQueues: `(Windows.Nano.1803.Amd64`)windows.10.amd64.serverrs4@mcr.microsoft.com/dotnet-buildtools/prereqs:nanoserver-1803-helix-amd64-05227e1-20190509225944" - uapNetfxQueues: Windows.10.Amd64.ClientRS5 - windowsArmQueue: Windows.10.Arm64 From 9ff9769dc10af0d941ebb27c4f01e73c27c1f759 Mon Sep 17 00:00:00 2001 From: Matt Galbraith Date: Mon, 13 May 2019 16:21:10 -0700 Subject: [PATCH 331/607] Update windows.yml fix typo --- eng/pipelines/windows.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/pipelines/windows.yml b/eng/pipelines/windows.yml index 3cef4cb6ca96..4a08d3c33f45 100644 --- a/eng/pipelines/windows.yml +++ b/eng/pipelines/windows.yml @@ -126,12 +126,12 @@ jobs: - ${{ if eq(parameters.isOfficialBuild, 'false') }}: - netcoreappWindowsQueues: Windows.7.Amd64.Open+Windows.81.Amd64.Open+Windows.10.Amd64.ClientRS4.ES.Open - - nanoQueues: `(Windows.Nano.1803.Amd64.Open`)windows.10.amd64.serverrs4.open@mcr.microsoft.com/dotnet-buildtools/prereqs:nanoserver-1803-helix-amd64-05227e1-20190509225944" + - nanoQueues: `(Windows.Nano.1803.Amd64.Open`)windows.10.amd64.serverrs4.open@mcr.microsoft.com/dotnet-buildtools/prereqs:nanoserver-1803-helix-amd64-05227e1-20190509225944 - uapNetfxQueues: Windows.10.Amd64.ClientRS5.Open - ${{ if eq(parameters.isOfficialBuild, 'true') }}: - netcoreappWindowsQueues: Windows.7.Amd64+Windows.81.Amd64+Windows.10.Amd64.Core+Windows.10.Amd64.ClientRS4 - - nanoQueues: `(Windows.Nano.1803.Amd64`)windows.10.amd64.serverrs4@mcr.microsoft.com/dotnet-buildtools/prereqs:nanoserver-1803-helix-amd64-05227e1-20190509225944" + - nanoQueues: `(Windows.Nano.1803.Amd64`)windows.10.amd64.serverrs4@mcr.microsoft.com/dotnet-buildtools/prereqs:nanoserver-1803-helix-amd64-05227e1-20190509225944 - uapNetfxQueues: Windows.10.Amd64.ClientRS5 - windowsArmQueue: Windows.10.Arm64 From ad60d144b36a72c04b30acf1e84e7bf840e591c5 Mon Sep 17 00:00:00 2001 From: Matt Galbraith Date: Mon, 13 May 2019 16:23:27 -0700 Subject: [PATCH 332/607] Update windows.yml Still fighting the yaml --- eng/pipelines/windows.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/pipelines/windows.yml b/eng/pipelines/windows.yml index 4a08d3c33f45..54bac61921b9 100644 --- a/eng/pipelines/windows.yml +++ b/eng/pipelines/windows.yml @@ -126,12 +126,12 @@ jobs: - ${{ if eq(parameters.isOfficialBuild, 'false') }}: - netcoreappWindowsQueues: Windows.7.Amd64.Open+Windows.81.Amd64.Open+Windows.10.Amd64.ClientRS4.ES.Open - - nanoQueues: `(Windows.Nano.1803.Amd64.Open`)windows.10.amd64.serverrs4.open@mcr.microsoft.com/dotnet-buildtools/prereqs:nanoserver-1803-helix-amd64-05227e1-20190509225944 + - nanoQueues: "`(Windows.Nano.1803.Amd64.Open`)windows.10.amd64.serverrs4.open@mcr.microsoft.com/dotnet-buildtools/prereqs:nanoserver-1803-helix-amd64-05227e1-20190509225944" - uapNetfxQueues: Windows.10.Amd64.ClientRS5.Open - ${{ if eq(parameters.isOfficialBuild, 'true') }}: - netcoreappWindowsQueues: Windows.7.Amd64+Windows.81.Amd64+Windows.10.Amd64.Core+Windows.10.Amd64.ClientRS4 - - nanoQueues: `(Windows.Nano.1803.Amd64`)windows.10.amd64.serverrs4@mcr.microsoft.com/dotnet-buildtools/prereqs:nanoserver-1803-helix-amd64-05227e1-20190509225944 + - nanoQueues: "`(Windows.Nano.1803.Amd64`)windows.10.amd64.serverrs4@mcr.microsoft.com/dotnet-buildtools/prereqs:nanoserver-1803-helix-amd64-05227e1-20190509225944" - uapNetfxQueues: Windows.10.Amd64.ClientRS5 - windowsArmQueue: Windows.10.Arm64 From 2b8126ea3a4ab951386052313e2b71c42cd71480 Mon Sep 17 00:00:00 2001 From: Christopher Watford Date: Mon, 13 May 2019 23:58:42 -0400 Subject: [PATCH 333/607] Allow trailing trivia in JsonSerializer.Parse and Read #37500 (#37549) * Add tests for trailing trivia to JsonSerializer Contributes to #37500 * Consume trailing trivia in JsonSerializer.ReadCore Fixes #37500 * Add tests for leading trivia too - Consolidates leading and trailing trivia tests into one * Simplify ReadCore loop per @ahsonkhan review NOTE: throws NPE in state.PropertyPath if invalid JSON is in the trailer. * Do not compute PropertyPath if outside document * Add additional test cases for primitives * Clean up tests and add negative test for leading/trailing comments --- .../Json/Serialization/JsonSerializer.Read.cs | 12 ++-- .../Text/Json/Serialization/ReadStack.cs | 12 +++- .../tests/Serialization/Null.ReadTests.cs | 19 +++++ .../tests/Serialization/Object.ReadTests.cs | 71 +++++++++++++++++++ .../tests/Serialization/Stream.ReadTests.cs | 33 +++++++++ .../tests/Serialization/Value.ReadTests.cs | 33 +++++++++ 6 files changed, 171 insertions(+), 9 deletions(-) diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.cs index 69cd87d3cf4f..59aa8e633bff 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.cs @@ -33,7 +33,7 @@ private static void ReadCore( if (HandleValue(tokenType, options, ref reader, ref state)) { - return; + continue; } } else if (tokenType == JsonTokenType.PropertyName) @@ -82,14 +82,14 @@ private static void ReadCore( } else if (HandleValue(tokenType, options, ref reader, ref state)) { - return; + continue; } } else if (tokenType == JsonTokenType.EndObject) { if (HandleEndObject(options, ref state, ref reader)) { - return; + continue; } } else if (tokenType == JsonTokenType.StartArray) @@ -100,21 +100,21 @@ private static void ReadCore( } else if (HandleValue(tokenType, options, ref reader, ref state)) { - return; + continue; } } else if (tokenType == JsonTokenType.EndArray) { if (HandleEndArray(options, ref state, ref reader)) { - return; + continue; } } else if (tokenType == JsonTokenType.Null) { if (HandleNull(ref reader, ref state, options)) { - return; + continue; } } } diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/ReadStack.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/ReadStack.cs index 1e68821b443e..650db0a74c4e 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/ReadStack.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/ReadStack.cs @@ -53,15 +53,21 @@ public string PropertyPath { get { - StringBuilder path = new StringBuilder(); + StringBuilder path; if (_previous == null || _index == 0) { - path.Append($"[{Current.JsonClassInfo.Type.FullName}]"); + // No path if we've walked beyond the end of our JSON document + if (Current.JsonClassInfo == null) + { + return ""; + } + + path = new StringBuilder($"[{Current.JsonClassInfo.Type.FullName}]"); } else { - path.Append($"[{_previous[0].JsonClassInfo.Type.FullName}]"); + path = new StringBuilder($"[{_previous[0].JsonClassInfo.Type.FullName}]"); for (int i = 0; i < _index; i++) { diff --git a/src/System.Text.Json/tests/Serialization/Null.ReadTests.cs b/src/System.Text.Json/tests/Serialization/Null.ReadTests.cs index c61dab68fb67..ce121432ad53 100644 --- a/src/System.Text.Json/tests/Serialization/Null.ReadTests.cs +++ b/src/System.Text.Json/tests/Serialization/Null.ReadTests.cs @@ -72,5 +72,24 @@ public static void NullLiteralObjectInput() Assert.Equal("null", obj); } } + + [Fact] + public static void NullAcceptsLeadingAndTrailingTrivia() + { + { + TestClassWithNull obj = JsonSerializer.Parse(" null"); + Assert.Null(obj); + } + + { + object obj = JsonSerializer.Parse("null "); + Assert.Null(obj); + } + + { + object obj = JsonSerializer.Parse(" null\t"); + Assert.Null(obj); + } + } } } diff --git a/src/System.Text.Json/tests/Serialization/Object.ReadTests.cs b/src/System.Text.Json/tests/Serialization/Object.ReadTests.cs index bcc76b72396d..ecff3a232b40 100644 --- a/src/System.Text.Json/tests/Serialization/Object.ReadTests.cs +++ b/src/System.Text.Json/tests/Serialization/Object.ReadTests.cs @@ -15,6 +15,37 @@ public static void ReadSimpleClass() obj.Verify(); } + [Theory] + [InlineData("", " ")] + [InlineData("", "\t ")] + [InlineData("", "//Single Line Comment\r\n")] + [InlineData("", "/* Multi\nLine Comment */")] + [InlineData("", "\t\t\t\n// Both\n/* Comments */")] + [InlineData(" ", "")] + [InlineData("\t ", "")] + [InlineData(" \t", " \n")] + [InlineData("// Leading Comment\n", "")] + [InlineData("/* Multi\nLine\nComment */ ", "")] + [InlineData("/* Multi\nLine\nComment */ ", "\t// trailing comment\n ")] + public static void ReadSimpleClassIgnoresLeadingOrTrailingTrivia(string leadingTrivia, string trailingTrivia) + { + { + var options = new JsonSerializerOptions(); + options.ReadCommentHandling = JsonCommentHandling.Skip; + + SimpleTestClass obj = JsonSerializer.Parse(leadingTrivia + SimpleTestClass.s_json + trailingTrivia, options); + obj.Verify(); + } + + { + var options = new JsonSerializerOptions(); + options.ReadCommentHandling = JsonCommentHandling.Allow; + + SimpleTestClass obj = JsonSerializer.Parse(leadingTrivia + SimpleTestClass.s_json + trailingTrivia, options); + obj.Verify(); + } + } + [Fact] public static void ReadSimpleClassWithObject() { @@ -31,6 +62,18 @@ public static void ReadSimpleClassWithObject() obj.Verify(); } + [Theory] + [InlineData("", "//Single Line Comment\r\n")] + [InlineData("", "/* Multi\nLine Comment */")] + [InlineData("", "\t\t\t\n// Both\n/* Comments */")] + [InlineData("// Leading Comment\n", "")] + [InlineData("/* Multi\nLine\nComment */ ", "")] + [InlineData("/* Multi\nLine\nComment */ ", "\t// trailing comment\n ")] + public static void ReadClassWithCommentsThrowsIfDisallowed(string leadingTrivia, string trailingTrivia) + { + Assert.Throws(() => JsonSerializer.Parse(leadingTrivia + ClassWithComplexObjects.s_json + trailingTrivia)); + } + [Fact] public static void ReadSimpleClassWithObjectArray() { @@ -63,6 +106,34 @@ public static void ReadClassWithComplexObjects() obj.Verify(); } + [Theory] + [InlineData("", " ")] + [InlineData("", "\t ")] + [InlineData("", "//Single Line Comment\r\n")] + [InlineData("", "/* Multi\nLine Comment */")] + [InlineData("", "\t\t\t\n// Both\n/* Comments */")] + [InlineData(" ", "")] + [InlineData("\t ", "")] + [InlineData(" \t", " \n")] + [InlineData("// Leading Comment\n", "")] + [InlineData("/* Multi\nLine\nComment */ ", "")] + [InlineData("/* Multi\nLine\nComment */ ", "\t// trailing comment\n ")] + public static void ReadComplexClassIgnoresLeadingOrTrailingTrivia(string leadingTrivia, string trailingTrivia) + { + var options = new JsonSerializerOptions(); + options.ReadCommentHandling = JsonCommentHandling.Skip; + + ClassWithComplexObjects obj = JsonSerializer.Parse(leadingTrivia + ClassWithComplexObjects.s_json + trailingTrivia, options); + obj.Verify(); + + // Throws due to JsonDocument.TryParse not supporting Allow + //var options = new JsonSerializerOptions(); + //options.ReadCommentHandling = JsonCommentHandling.Allow; + // + //obj = JsonSerializer.Parse(leadingTrivia + ClassWithComplexObjects.s_json + trailingTrivia, options); + //obj.Verify(); + } + [Fact] public static void ReadEmpty() { diff --git a/src/System.Text.Json/tests/Serialization/Stream.ReadTests.cs b/src/System.Text.Json/tests/Serialization/Stream.ReadTests.cs index 3e372b5e8c4d..4b1a3531f4b9 100644 --- a/src/System.Text.Json/tests/Serialization/Stream.ReadTests.cs +++ b/src/System.Text.Json/tests/Serialization/Stream.ReadTests.cs @@ -32,6 +32,23 @@ public static async Task ReadSimpleObjectAsync() } } + [Fact] + public static async Task ReadSimpleObjectWithTrailingTriviaAsync() + { + byte[] data = Encoding.UTF8.GetBytes(SimpleTestClass.s_json + " /* Multi\r\nLine Comment */\t"); + using (MemoryStream stream = new MemoryStream(data)) + { + JsonSerializerOptions options = new JsonSerializerOptions + { + DefaultBufferSize = 1, + ReadCommentHandling = JsonCommentHandling.Skip, + }; + + SimpleTestClass obj = await JsonSerializer.ReadAsync(stream, options); + obj.Verify(); + } + } + [Fact] public static async Task ReadPrimitivesAsync() { @@ -46,5 +63,21 @@ public static async Task ReadPrimitivesAsync() Assert.Equal(1, i); } } + + [Fact] + public static async Task ReadPrimitivesWithTrailingTriviaAsync() + { + using (MemoryStream stream = new MemoryStream(Encoding.UTF8.GetBytes(" 1\t// Comment\r\n/* Multi\r\nLine */"))) + { + JsonSerializerOptions options = new JsonSerializerOptions + { + DefaultBufferSize = 1, + ReadCommentHandling = JsonCommentHandling.Skip, + }; + + int i = await JsonSerializer.ReadAsync(stream, options); + Assert.Equal(1, i); + } + } } } diff --git a/src/System.Text.Json/tests/Serialization/Value.ReadTests.cs b/src/System.Text.Json/tests/Serialization/Value.ReadTests.cs index 45c9a339b45e..9342981e5f8b 100644 --- a/src/System.Text.Json/tests/Serialization/Value.ReadTests.cs +++ b/src/System.Text.Json/tests/Serialization/Value.ReadTests.cs @@ -34,6 +34,37 @@ public static void ReadPrimitives() Assert.Equal("Hello", s2); } + [Fact] + public static void ReadPrimitivesWithWhitespace() + { + int i = JsonSerializer.Parse(Encoding.UTF8.GetBytes(@" 1 ")); + Assert.Equal(1, i); + + int i2 = JsonSerializer.Parse("2\t"); + Assert.Equal(2, i2); + + int? i3 = JsonSerializer.Parse("\r\nnull"); + Assert.Null(i3); + + long l = JsonSerializer.Parse(Encoding.UTF8.GetBytes("\t" + long.MaxValue.ToString())); + Assert.Equal(long.MaxValue, l); + + long l2 = JsonSerializer.Parse(long.MaxValue.ToString() + " \r\n"); + Assert.Equal(long.MaxValue, l2); + + string s = JsonSerializer.Parse(Encoding.UTF8.GetBytes(@"""Hello"" ")); + Assert.Equal("Hello", s); + + string s2 = JsonSerializer.Parse(@" ""Hello"" "); + Assert.Equal("Hello", s2); + + bool b = JsonSerializer.Parse(" \ttrue "); + Assert.Equal(true, b); + + bool b2 = JsonSerializer.Parse(" false\n"); + Assert.Equal(false, b2); + } + [Fact] public static void ReadPrimitivesFail() { @@ -87,6 +118,8 @@ public static void ReadPrimitiveExtraBytesFail() { Assert.Throws(() => JsonSerializer.Parse("[2] {3}")); Assert.Throws(() => JsonSerializer.Parse(Encoding.UTF8.GetBytes(@"[2] {3}"))); + Assert.Throws(() => JsonSerializer.Parse(@"""Hello"" 42")); + Assert.Throws(() => JsonSerializer.Parse(Encoding.UTF8.GetBytes(@"""Hello"" 42"))); } [Fact] From f5be0283c5e00dd823a41f671f9c9a41170f0a85 Mon Sep 17 00:00:00 2001 From: Anirudh Agnihotry Date: Mon, 13 May 2019 21:58:20 -0700 Subject: [PATCH 334/607] removing partial facades from netcoreapp\uap reference assembly build (#37591) --- .../System.Data.DataSetExtensions.Forwards.cs | 14 ++ .../ref/System.Data.DataSetExtensions.csproj | 6 +- .../ref/System.Drawing.Common.Forwards.cs | 5 + .../ref/System.Drawing.Common.cs | 36 ---- .../ref/System.Drawing.Common.csproj | 8 +- .../ref/System.Drawing.Common.netstandard.cs | 43 +++++ ...tem.Threading.Tasks.Extensions.Forwards.cs | 17 ++ .../ref/System.Threading.Tasks.Extensions.cs | 157 ------------------ .../System.Threading.Tasks.Extensions.csproj | 3 +- 9 files changed, 91 insertions(+), 198 deletions(-) create mode 100644 src/System.Data.DataSetExtensions/ref/System.Data.DataSetExtensions.Forwards.cs create mode 100644 src/System.Drawing.Common/ref/System.Drawing.Common.Forwards.cs create mode 100644 src/System.Drawing.Common/ref/System.Drawing.Common.netstandard.cs create mode 100644 src/System.Threading.Tasks.Extensions/ref/System.Threading.Tasks.Extensions.Forwards.cs delete mode 100644 src/System.Threading.Tasks.Extensions/ref/System.Threading.Tasks.Extensions.cs diff --git a/src/System.Data.DataSetExtensions/ref/System.Data.DataSetExtensions.Forwards.cs b/src/System.Data.DataSetExtensions/ref/System.Data.DataSetExtensions.Forwards.cs new file mode 100644 index 000000000000..93e1bb9120de --- /dev/null +++ b/src/System.Data.DataSetExtensions/ref/System.Data.DataSetExtensions.Forwards.cs @@ -0,0 +1,14 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.DataRowComparer))] +[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.DataRowComparer<>))] +[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.DataRowExtensions))] +[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.DataTableExtensions))] +[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.EnumerableRowCollection))] +[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.EnumerableRowCollection<>))] +[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.EnumerableRowCollectionExtensions))] +[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.OrderedEnumerableRowCollection<>))] +[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.TypedTableBase<>))] +[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.TypedTableBaseExtensions))] \ No newline at end of file diff --git a/src/System.Data.DataSetExtensions/ref/System.Data.DataSetExtensions.csproj b/src/System.Data.DataSetExtensions/ref/System.Data.DataSetExtensions.csproj index e5730fd83694..e37894148f71 100644 --- a/src/System.Data.DataSetExtensions/ref/System.Data.DataSetExtensions.csproj +++ b/src/System.Data.DataSetExtensions/ref/System.Data.DataSetExtensions.csproj @@ -2,11 +2,13 @@ {50A5A8BC-C6A9-4000-8B52-667BEE00459D} netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release;uap-Debug;uap-Release - true - + + + + diff --git a/src/System.Drawing.Common/ref/System.Drawing.Common.Forwards.cs b/src/System.Drawing.Common/ref/System.Drawing.Common.Forwards.cs new file mode 100644 index 000000000000..dd1679c41ca6 --- /dev/null +++ b/src/System.Drawing.Common/ref/System.Drawing.Common.Forwards.cs @@ -0,0 +1,5 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Drawing.SystemColors))] \ No newline at end of file diff --git a/src/System.Drawing.Common/ref/System.Drawing.Common.cs b/src/System.Drawing.Common/ref/System.Drawing.Common.cs index 95cdc3adf830..0714a5501b60 100644 --- a/src/System.Drawing.Common/ref/System.Drawing.Common.cs +++ b/src/System.Drawing.Common/ref/System.Drawing.Common.cs @@ -1127,42 +1127,6 @@ public static partial class SystemBrushes public static System.Drawing.Brush WindowText { get { throw null; } } public static System.Drawing.Brush FromSystemColor(System.Drawing.Color c) { throw null; } } - public static partial class SystemColors - { - public static System.Drawing.Color ActiveBorder { get { throw null; } } - public static System.Drawing.Color ActiveCaption { get { throw null; } } - public static System.Drawing.Color ActiveCaptionText { get { throw null; } } - public static System.Drawing.Color AppWorkspace { get { throw null; } } - public static System.Drawing.Color ButtonFace { get { throw null; } } - public static System.Drawing.Color ButtonHighlight { get { throw null; } } - public static System.Drawing.Color ButtonShadow { get { throw null; } } - public static System.Drawing.Color Control { get { throw null; } } - public static System.Drawing.Color ControlDark { get { throw null; } } - public static System.Drawing.Color ControlDarkDark { get { throw null; } } - public static System.Drawing.Color ControlLight { get { throw null; } } - public static System.Drawing.Color ControlLightLight { get { throw null; } } - public static System.Drawing.Color ControlText { get { throw null; } } - public static System.Drawing.Color Desktop { get { throw null; } } - public static System.Drawing.Color GradientActiveCaption { get { throw null; } } - public static System.Drawing.Color GradientInactiveCaption { get { throw null; } } - public static System.Drawing.Color GrayText { get { throw null; } } - public static System.Drawing.Color Highlight { get { throw null; } } - public static System.Drawing.Color HighlightText { get { throw null; } } - public static System.Drawing.Color HotTrack { get { throw null; } } - public static System.Drawing.Color InactiveBorder { get { throw null; } } - public static System.Drawing.Color InactiveCaption { get { throw null; } } - public static System.Drawing.Color InactiveCaptionText { get { throw null; } } - public static System.Drawing.Color Info { get { throw null; } } - public static System.Drawing.Color InfoText { get { throw null; } } - public static System.Drawing.Color Menu { get { throw null; } } - public static System.Drawing.Color MenuBar { get { throw null; } } - public static System.Drawing.Color MenuHighlight { get { throw null; } } - public static System.Drawing.Color MenuText { get { throw null; } } - public static System.Drawing.Color ScrollBar { get { throw null; } } - public static System.Drawing.Color Window { get { throw null; } } - public static System.Drawing.Color WindowFrame { get { throw null; } } - public static System.Drawing.Color WindowText { get { throw null; } } - } public static partial class SystemFonts { public static System.Drawing.Font CaptionFont { get { throw null; } } diff --git a/src/System.Drawing.Common/ref/System.Drawing.Common.csproj b/src/System.Drawing.Common/ref/System.Drawing.Common.csproj index 0b4f0f218c78..8f2831d074f1 100644 --- a/src/System.Drawing.Common/ref/System.Drawing.Common.csproj +++ b/src/System.Drawing.Common/ref/System.Drawing.Common.csproj @@ -1,12 +1,18 @@ {D7AEA698-275D-441F-B7A7-8491D1F0EFF0} - true + true net461-Debug;net461-Release;netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release;netstandard-Debug;netstandard-Release;uap-Debug;uap-Release + + + + + + diff --git a/src/System.Drawing.Common/ref/System.Drawing.Common.netstandard.cs b/src/System.Drawing.Common/ref/System.Drawing.Common.netstandard.cs new file mode 100644 index 000000000000..b38d2148bd42 --- /dev/null +++ b/src/System.Drawing.Common/ref/System.Drawing.Common.netstandard.cs @@ -0,0 +1,43 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +namespace System.Drawing +{ + public static partial class SystemColors + { + public static System.Drawing.Color ActiveBorder { get { throw null; } } + public static System.Drawing.Color ActiveCaption { get { throw null; } } + public static System.Drawing.Color ActiveCaptionText { get { throw null; } } + public static System.Drawing.Color AppWorkspace { get { throw null; } } + public static System.Drawing.Color ButtonFace { get { throw null; } } + public static System.Drawing.Color ButtonHighlight { get { throw null; } } + public static System.Drawing.Color ButtonShadow { get { throw null; } } + public static System.Drawing.Color Control { get { throw null; } } + public static System.Drawing.Color ControlDark { get { throw null; } } + public static System.Drawing.Color ControlDarkDark { get { throw null; } } + public static System.Drawing.Color ControlLight { get { throw null; } } + public static System.Drawing.Color ControlLightLight { get { throw null; } } + public static System.Drawing.Color ControlText { get { throw null; } } + public static System.Drawing.Color Desktop { get { throw null; } } + public static System.Drawing.Color GradientActiveCaption { get { throw null; } } + public static System.Drawing.Color GradientInactiveCaption { get { throw null; } } + public static System.Drawing.Color GrayText { get { throw null; } } + public static System.Drawing.Color Highlight { get { throw null; } } + public static System.Drawing.Color HighlightText { get { throw null; } } + public static System.Drawing.Color HotTrack { get { throw null; } } + public static System.Drawing.Color InactiveBorder { get { throw null; } } + public static System.Drawing.Color InactiveCaption { get { throw null; } } + public static System.Drawing.Color InactiveCaptionText { get { throw null; } } + public static System.Drawing.Color Info { get { throw null; } } + public static System.Drawing.Color InfoText { get { throw null; } } + public static System.Drawing.Color Menu { get { throw null; } } + public static System.Drawing.Color MenuBar { get { throw null; } } + public static System.Drawing.Color MenuHighlight { get { throw null; } } + public static System.Drawing.Color MenuText { get { throw null; } } + public static System.Drawing.Color ScrollBar { get { throw null; } } + public static System.Drawing.Color Window { get { throw null; } } + public static System.Drawing.Color WindowFrame { get { throw null; } } + public static System.Drawing.Color WindowText { get { throw null; } } + } +} \ No newline at end of file diff --git a/src/System.Threading.Tasks.Extensions/ref/System.Threading.Tasks.Extensions.Forwards.cs b/src/System.Threading.Tasks.Extensions/ref/System.Threading.Tasks.Extensions.Forwards.cs new file mode 100644 index 000000000000..6de01a49e123 --- /dev/null +++ b/src/System.Threading.Tasks.Extensions/ref/System.Threading.Tasks.Extensions.Forwards.cs @@ -0,0 +1,17 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.CompilerServices.AsyncMethodBuilderAttribute))] +[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.CompilerServices.AsyncValueTaskMethodBuilder))] +[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.CompilerServices.AsyncValueTaskMethodBuilder<>))] +[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.CompilerServices.ConfiguredValueTaskAwaitable))] +[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.CompilerServices.ConfiguredValueTaskAwaitable<>))] +[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.CompilerServices.ValueTaskAwaiter))] +[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.CompilerServices.ValueTaskAwaiter<>))] +[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Threading.Tasks.Sources.IValueTaskSource))] +[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Threading.Tasks.Sources.IValueTaskSource<>))] +[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Threading.Tasks.Sources.ValueTaskSourceOnCompletedFlags))] +[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Threading.Tasks.Sources.ValueTaskSourceStatus))] +[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Threading.Tasks.ValueTask))] +[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Threading.Tasks.ValueTask<>))] \ No newline at end of file diff --git a/src/System.Threading.Tasks.Extensions/ref/System.Threading.Tasks.Extensions.cs b/src/System.Threading.Tasks.Extensions/ref/System.Threading.Tasks.Extensions.cs deleted file mode 100644 index cbb77814f7ab..000000000000 --- a/src/System.Threading.Tasks.Extensions/ref/System.Threading.Tasks.Extensions.cs +++ /dev/null @@ -1,157 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// ------------------------------------------------------------------------------ -// Changes to this file must follow the http://aka.ms/api-review process. -// ------------------------------------------------------------------------------ - -namespace System.Runtime.CompilerServices -{ - [System.AttributeUsageAttribute((System.AttributeTargets)(5148), Inherited=false, AllowMultiple=false)] - public sealed partial class AsyncMethodBuilderAttribute : System.Attribute - { - public AsyncMethodBuilderAttribute(System.Type builderType) { } - public System.Type BuilderType { get { throw null; } } - } - public partial struct AsyncValueTaskMethodBuilder - { - private object _dummy; - public System.Threading.Tasks.ValueTask Task { get { throw null; } } - public void AwaitOnCompleted(ref TAwaiter awaiter, ref TStateMachine stateMachine) where TAwaiter : System.Runtime.CompilerServices.INotifyCompletion where TStateMachine : System.Runtime.CompilerServices.IAsyncStateMachine { } - public void AwaitUnsafeOnCompleted(ref TAwaiter awaiter, ref TStateMachine stateMachine) where TAwaiter : System.Runtime.CompilerServices.ICriticalNotifyCompletion where TStateMachine : System.Runtime.CompilerServices.IAsyncStateMachine { } - public static System.Runtime.CompilerServices.AsyncValueTaskMethodBuilder Create() { throw null; } - public void SetException(System.Exception exception) { } - public void SetResult() { } - public void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine stateMachine) { } - public void Start(ref TStateMachine stateMachine) where TStateMachine : System.Runtime.CompilerServices.IAsyncStateMachine { } - } - public partial struct AsyncValueTaskMethodBuilder - { - private TResult _result; - public System.Threading.Tasks.ValueTask Task { get { throw null; } } - public void AwaitOnCompleted(ref TAwaiter awaiter, ref TStateMachine stateMachine) where TAwaiter : System.Runtime.CompilerServices.INotifyCompletion where TStateMachine : System.Runtime.CompilerServices.IAsyncStateMachine { } - public void AwaitUnsafeOnCompleted(ref TAwaiter awaiter, ref TStateMachine stateMachine) where TAwaiter : System.Runtime.CompilerServices.ICriticalNotifyCompletion where TStateMachine : System.Runtime.CompilerServices.IAsyncStateMachine { } - public static System.Runtime.CompilerServices.AsyncValueTaskMethodBuilder Create() { throw null; } - public void SetException(System.Exception exception) { } - public void SetResult(TResult result) { } - public void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine stateMachine) { } - public void Start(ref TStateMachine stateMachine) where TStateMachine : System.Runtime.CompilerServices.IAsyncStateMachine { } - } - public readonly partial struct ConfiguredValueTaskAwaitable - { - private readonly object _dummy; - public System.Runtime.CompilerServices.ConfiguredValueTaskAwaitable.ConfiguredValueTaskAwaiter GetAwaiter() { throw null; } - public readonly partial struct ConfiguredValueTaskAwaiter : System.Runtime.CompilerServices.ICriticalNotifyCompletion, System.Runtime.CompilerServices.INotifyCompletion - { - private readonly object _dummy; - public bool IsCompleted { get { throw null; } } - public void GetResult() { } - public void OnCompleted(System.Action continuation) { } - public void UnsafeOnCompleted(System.Action continuation) { } - } - } - public readonly partial struct ConfiguredValueTaskAwaitable - { - private readonly object _dummy; - public System.Runtime.CompilerServices.ConfiguredValueTaskAwaitable.ConfiguredValueTaskAwaiter GetAwaiter() { throw null; } - public readonly partial struct ConfiguredValueTaskAwaiter : System.Runtime.CompilerServices.ICriticalNotifyCompletion, System.Runtime.CompilerServices.INotifyCompletion - { - private readonly object _dummy; - public bool IsCompleted { get { throw null; } } - public TResult GetResult() { throw null; } - public void OnCompleted(System.Action continuation) { } - public void UnsafeOnCompleted(System.Action continuation) { } - } - } - public readonly partial struct ValueTaskAwaiter : System.Runtime.CompilerServices.ICriticalNotifyCompletion, System.Runtime.CompilerServices.INotifyCompletion - { - private readonly object _dummy; - public bool IsCompleted { get { throw null; } } - public void GetResult() { } - public void OnCompleted(System.Action continuation) { } - public void UnsafeOnCompleted(System.Action continuation) { } - } - public readonly partial struct ValueTaskAwaiter : System.Runtime.CompilerServices.ICriticalNotifyCompletion, System.Runtime.CompilerServices.INotifyCompletion - { - private readonly object _dummy; - public bool IsCompleted { get { throw null; } } - public TResult GetResult() { throw null; } - public void OnCompleted(System.Action continuation) { } - public void UnsafeOnCompleted(System.Action continuation) { } - } -} -namespace System.Threading.Tasks -{ - [System.Runtime.CompilerServices.AsyncMethodBuilderAttribute(typeof(System.Runtime.CompilerServices.AsyncValueTaskMethodBuilder))] - public readonly partial struct ValueTask : System.IEquatable - { - internal readonly object _dummy; - public ValueTask(System.Threading.Tasks.Task task) { throw null; } - public ValueTask(System.Threading.Tasks.Sources.IValueTaskSource source, short token) { throw null; } - public bool IsCanceled { get { throw null; } } - public bool IsCompleted { get { throw null; } } - public bool IsCompletedSuccessfully { get { throw null; } } - public bool IsFaulted { get { throw null; } } - public System.Threading.Tasks.Task AsTask() { throw null; } - public System.Runtime.CompilerServices.ConfiguredValueTaskAwaitable ConfigureAwait(bool continueOnCapturedContext) { throw null; } - public override bool Equals(object obj) { throw null; } - public bool Equals(System.Threading.Tasks.ValueTask other) { throw null; } - public System.Runtime.CompilerServices.ValueTaskAwaiter GetAwaiter() { throw null; } - public override int GetHashCode() { throw null; } - public System.Threading.Tasks.ValueTask Preserve() { throw null; } - public static bool operator ==(System.Threading.Tasks.ValueTask left, System.Threading.Tasks.ValueTask right) { throw null; } - public static bool operator !=(System.Threading.Tasks.ValueTask left, System.Threading.Tasks.ValueTask right) { throw null; } - } - [System.Runtime.CompilerServices.AsyncMethodBuilderAttribute(typeof(System.Runtime.CompilerServices.AsyncValueTaskMethodBuilder<>))] - public readonly partial struct ValueTask : System.IEquatable> - { - internal readonly TResult _result; - public ValueTask(System.Threading.Tasks.Task task) { throw null; } - public ValueTask(System.Threading.Tasks.Sources.IValueTaskSource source, short token) { throw null; } - public ValueTask(TResult result) { throw null; } - public bool IsCanceled { get { throw null; } } - public bool IsCompleted { get { throw null; } } - public bool IsCompletedSuccessfully { get { throw null; } } - public bool IsFaulted { get { throw null; } } - public TResult Result { get { throw null; } } - public System.Threading.Tasks.Task AsTask() { throw null; } - public System.Runtime.CompilerServices.ConfiguredValueTaskAwaitable ConfigureAwait(bool continueOnCapturedContext) { throw null; } - public override bool Equals(object obj) { throw null; } - public bool Equals(System.Threading.Tasks.ValueTask other) { throw null; } - public System.Runtime.CompilerServices.ValueTaskAwaiter GetAwaiter() { throw null; } - public override int GetHashCode() { throw null; } - public System.Threading.Tasks.ValueTask Preserve() { throw null; } - public static bool operator ==(System.Threading.Tasks.ValueTask left, System.Threading.Tasks.ValueTask right) { throw null; } - public static bool operator !=(System.Threading.Tasks.ValueTask left, System.Threading.Tasks.ValueTask right) { throw null; } - public override string ToString() { throw null; } - } -} -namespace System.Threading.Tasks.Sources -{ - [System.Flags] - public enum ValueTaskSourceOnCompletedFlags - { - None, - UseSchedulingContext = 0x1, - FlowExecutionContext = 0x2, - } - public enum ValueTaskSourceStatus - { - Pending = 0, - Succeeded = 1, - Faulted = 2, - Canceled = 3 - } - public interface IValueTaskSource - { - System.Threading.Tasks.Sources.ValueTaskSourceStatus GetStatus(short token); - void OnCompleted(System.Action continuation, object state, short token, System.Threading.Tasks.Sources.ValueTaskSourceOnCompletedFlags flags); - void GetResult(short token); - } - public interface IValueTaskSource - { - System.Threading.Tasks.Sources.ValueTaskSourceStatus GetStatus(short token); - void OnCompleted(System.Action continuation, object state, short token, System.Threading.Tasks.Sources.ValueTaskSourceOnCompletedFlags flags); - TResult GetResult(short token); - } -} diff --git a/src/System.Threading.Tasks.Extensions/ref/System.Threading.Tasks.Extensions.csproj b/src/System.Threading.Tasks.Extensions/ref/System.Threading.Tasks.Extensions.csproj index 70d4c915a662..4531771293c6 100644 --- a/src/System.Threading.Tasks.Extensions/ref/System.Threading.Tasks.Extensions.csproj +++ b/src/System.Threading.Tasks.Extensions/ref/System.Threading.Tasks.Extensions.csproj @@ -1,11 +1,10 @@ {0DF7FA9A-E7D3-4CEF-862B-A37F5BBBB54C} - true netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release - + From abffe6bec12cedd4bf1a92e5efbeba5f8218cb39 Mon Sep 17 00:00:00 2001 From: Stephen Toub Date: Fri, 10 May 2019 09:18:53 -0400 Subject: [PATCH 335/607] Tweak a few nullable annotations (dotnet/coreclr#24494) - Assembly.ToString() won't return null - Several attributes have the intent that their arguments are non-nullable, even though they don't check and throw; the annotations should match the intent in such cases. Signed-off-by: dotnet-bot --- .../CodeAnalysis/SuppressMessageAttribute.cs | 6 +++--- .../Diagnostics/DebuggerTypeProxyAttribute.cs | 6 +++--- .../Diagnostics/DebuggerVisualizerAttribute.cs | 14 +++++++------- .../src/CoreLib/System/Reflection/Assembly.cs | 8 ++------ 4 files changed, 15 insertions(+), 19 deletions(-) diff --git a/src/Common/src/CoreLib/System/Diagnostics/CodeAnalysis/SuppressMessageAttribute.cs b/src/Common/src/CoreLib/System/Diagnostics/CodeAnalysis/SuppressMessageAttribute.cs index 28208a379e3a..8ed44b0e659c 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/CodeAnalysis/SuppressMessageAttribute.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/CodeAnalysis/SuppressMessageAttribute.cs @@ -23,14 +23,14 @@ namespace System.Diagnostics.CodeAnalysis [Conditional("CODE_ANALYSIS")] public sealed class SuppressMessageAttribute : Attribute { - public SuppressMessageAttribute(string? category, string? checkId) + public SuppressMessageAttribute(string category, string checkId) { Category = category; CheckId = checkId; } - public string? Category { get; } - public string? CheckId { get; } + public string Category { get; } + public string CheckId { get; } public string? Scope { get; set; } public string? Target { get; set; } public string? MessageId { get; set; } diff --git a/src/Common/src/CoreLib/System/Diagnostics/DebuggerTypeProxyAttribute.cs b/src/Common/src/CoreLib/System/Diagnostics/DebuggerTypeProxyAttribute.cs index 5acc0185b03e..375a7f4011ad 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/DebuggerTypeProxyAttribute.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/DebuggerTypeProxyAttribute.cs @@ -16,15 +16,15 @@ public DebuggerTypeProxyAttribute(Type type) throw new ArgumentNullException(nameof(type)); } - ProxyTypeName = type.AssemblyQualifiedName; + ProxyTypeName = type.AssemblyQualifiedName!; } - public DebuggerTypeProxyAttribute(string? typeName) + public DebuggerTypeProxyAttribute(string typeName) { ProxyTypeName = typeName; } - public string? ProxyTypeName { get; } + public string ProxyTypeName { get; } public Type? Target { diff --git a/src/Common/src/CoreLib/System/Diagnostics/DebuggerVisualizerAttribute.cs b/src/Common/src/CoreLib/System/Diagnostics/DebuggerVisualizerAttribute.cs index b7f9e16c066d..48f81203f1a4 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/DebuggerVisualizerAttribute.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/DebuggerVisualizerAttribute.cs @@ -13,18 +13,18 @@ public sealed class DebuggerVisualizerAttribute : Attribute { private Type? _target; - public DebuggerVisualizerAttribute(string? visualizerTypeName) + public DebuggerVisualizerAttribute(string visualizerTypeName) { VisualizerTypeName = visualizerTypeName; } - public DebuggerVisualizerAttribute(string? visualizerTypeName, string? visualizerObjectSourceTypeName) + public DebuggerVisualizerAttribute(string visualizerTypeName, string? visualizerObjectSourceTypeName) { VisualizerTypeName = visualizerTypeName; VisualizerObjectSourceTypeName = visualizerObjectSourceTypeName; } - public DebuggerVisualizerAttribute(string? visualizerTypeName, Type visualizerObjectSource) + public DebuggerVisualizerAttribute(string visualizerTypeName, Type visualizerObjectSource) { if (visualizerObjectSource == null) { @@ -42,7 +42,7 @@ public DebuggerVisualizerAttribute(Type visualizer) throw new ArgumentNullException(nameof(visualizer)); } - VisualizerTypeName = visualizer.AssemblyQualifiedName; + VisualizerTypeName = visualizer.AssemblyQualifiedName!; } public DebuggerVisualizerAttribute(Type visualizer, Type visualizerObjectSource) @@ -56,7 +56,7 @@ public DebuggerVisualizerAttribute(Type visualizer, Type visualizerObjectSource) throw new ArgumentNullException(nameof(visualizerObjectSource)); } - VisualizerTypeName = visualizer.AssemblyQualifiedName; + VisualizerTypeName = visualizer.AssemblyQualifiedName!; VisualizerObjectSourceTypeName = visualizerObjectSource.AssemblyQualifiedName; } @@ -67,13 +67,13 @@ public DebuggerVisualizerAttribute(Type visualizer, string? visualizerObjectSour throw new ArgumentNullException(nameof(visualizer)); } - VisualizerTypeName = visualizer.AssemblyQualifiedName; + VisualizerTypeName = visualizer.AssemblyQualifiedName!; VisualizerObjectSourceTypeName = visualizerObjectSourceTypeName; } public string? VisualizerObjectSourceTypeName { get; } - public string? VisualizerTypeName { get; } + public string VisualizerTypeName { get; } public string? Description { get; set; } diff --git a/src/Common/src/CoreLib/System/Reflection/Assembly.cs b/src/Common/src/CoreLib/System/Reflection/Assembly.cs index ecae2893b366..78ab61b4a350 100644 --- a/src/Common/src/CoreLib/System/Reflection/Assembly.cs +++ b/src/Common/src/CoreLib/System/Reflection/Assembly.cs @@ -140,13 +140,9 @@ public virtual Type[] GetTypes() public virtual void GetObjectData(SerializationInfo info, StreamingContext context) { throw NotImplemented.ByDesign; } - public override string? ToString() + public override string ToString() { - string? displayName = FullName; - if (displayName == null) - return base.ToString(); - else - return displayName; + return FullName ?? base.ToString()!; } /* From 86c7c00a0eb5b969ff4aa5b5a9c61aa7ce93642a Mon Sep 17 00:00:00 2001 From: Andrew Au Date: Fri, 10 May 2019 09:30:23 -0700 Subject: [PATCH 336/607] Remove obsolete comments Signed-off-by: dotnet-bot --- .../src/CoreLib/System/Diagnostics/Tracing/CounterGroup.cs | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/Common/src/CoreLib/System/Diagnostics/Tracing/CounterGroup.cs b/src/Common/src/CoreLib/System/Diagnostics/Tracing/CounterGroup.cs index d20abe8ced90..c60ba3688659 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/Tracing/CounterGroup.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/Tracing/CounterGroup.cs @@ -58,11 +58,6 @@ private void OnEventSourceCommand(object? sender, EventCommandEventArgs e) if (e.Arguments.TryGetValue("EventCounterIntervalSec", out valueStr) && float.TryParse(valueStr, out value)) { - // Recursion through EventSource callbacks possible. When we enable the timer - // we synchonously issue a EventSource.Write event, which in turn can call back - // to user code (in an EventListener) while holding this lock. This is dangerous - // because it means this code might inadvertantly participate in a lock loop. - // The scenario seems very unlikely so we ignore that problem for now. lock (this) // Lock the CounterGroup { EnableTimer(value); From 320983087e6730598fd05665672b0cbcc94c0769 Mon Sep 17 00:00:00 2001 From: Sung Yoon Whang Date: Fri, 10 May 2019 16:59:38 -0700 Subject: [PATCH 337/607] Fix EventCounter disable logic (dotnet/coreclr#24519) Signed-off-by: dotnet-bot --- .../src/CoreLib/System/Diagnostics/Tracing/CounterGroup.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/Common/src/CoreLib/System/Diagnostics/Tracing/CounterGroup.cs b/src/Common/src/CoreLib/System/Diagnostics/Tracing/CounterGroup.cs index c60ba3688659..d669114d502d 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/Tracing/CounterGroup.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/Tracing/CounterGroup.cs @@ -64,6 +64,13 @@ private void OnEventSourceCommand(object? sender, EventCommandEventArgs e) } } } + else if (e.Command == EventCommand.Disable) + { + lock (this) + { + _pollingIntervalInMilliseconds = 0; + } + } } #endregion // EventSource Command Processing From 112fa81e4064e712b8dcd8d92e027145263082a7 Mon Sep 17 00:00:00 2001 From: Tanner Gooding Date: Fri, 10 May 2019 20:19:26 -0700 Subject: [PATCH 338/607] Fixing S.P.Corelib to not double include files and ensure that S.N.V is marked #nullable enable (#24526) * Changing EnableDefaultCompileItems=false to EnableDefaultItems=false * Taking the VS auto-fixes for the solution and corelib csproj * Removing the duplicated T4 file includes in the main csproj * Regenerating the included T4 templates * Fixing S.P.Corelib to properly list available platforms/configurations * Add a comment on the T4 template service Signed-off-by: dotnet-bot --- src/Common/src/CoreLib/System/Numerics/ConstantHelper.cs | 1 + src/Common/src/CoreLib/System/Numerics/Register.cs | 1 + src/Common/src/CoreLib/System/Numerics/Vector.cs | 1 + 3 files changed, 3 insertions(+) diff --git a/src/Common/src/CoreLib/System/Numerics/ConstantHelper.cs b/src/Common/src/CoreLib/System/Numerics/ConstantHelper.cs index 33b935c2c895..4426c88cb3a8 100644 --- a/src/Common/src/CoreLib/System/Numerics/ConstantHelper.cs +++ b/src/Common/src/CoreLib/System/Numerics/ConstantHelper.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable using System.Runtime.CompilerServices; namespace System.Numerics diff --git a/src/Common/src/CoreLib/System/Numerics/Register.cs b/src/Common/src/CoreLib/System/Numerics/Register.cs index 70a881915726..a5dfd5e1301a 100644 --- a/src/Common/src/CoreLib/System/Numerics/Register.cs +++ b/src/Common/src/CoreLib/System/Numerics/Register.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable using System.Runtime.InteropServices; namespace System.Numerics diff --git a/src/Common/src/CoreLib/System/Numerics/Vector.cs b/src/Common/src/CoreLib/System/Numerics/Vector.cs index 6ee98458d823..92b16a4e87e5 100644 --- a/src/Common/src/CoreLib/System/Numerics/Vector.cs +++ b/src/Common/src/CoreLib/System/Numerics/Vector.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable #if netcoreapp using Internal.Runtime.CompilerServices; #endif From e12bfba58e3581dc475e804688bef1c66d70226c Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Tue, 14 May 2019 13:12:28 +0000 Subject: [PATCH 339/607] Update dependencies from https://github.com/dotnet/core-setup build 20190513.13 (#37640) - Microsoft.NETCore.App - 3.0.0-preview6-27713-13 - Microsoft.NETCore.DotNetHost - 3.0.0-preview6-27713-13 - Microsoft.NETCore.DotNetHostPolicy - 3.0.0-preview6-27713-13 --- eng/Version.Details.xml | 12 ++++++------ eng/Versions.props | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 896b34f128a0..789ff15b8f2b 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -14,17 +14,17 @@ - + https://github.com/dotnet/core-setup - 1085b414679a72791b4de59c09bf4c53144bf5ab + 91a4df0883082c784b0826874874d65b3fcf79ba - + https://github.com/dotnet/core-setup - 1085b414679a72791b4de59c09bf4c53144bf5ab + 91a4df0883082c784b0826874874d65b3fcf79ba - + https://github.com/dotnet/core-setup - 1085b414679a72791b4de59c09bf4c53144bf5ab + 91a4df0883082c784b0826874874d65b3fcf79ba https://github.com/dotnet/corefx diff --git a/eng/Versions.props b/eng/Versions.props index 563e49394df9..2f9e5475af0e 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -36,9 +36,9 @@ 2.2.0-beta.19254.1 1.0.0-beta.19254.1 - 3.0.0-preview6-27712-03 - 3.0.0-preview6-27712-03 - 3.0.0-preview6-27712-03 + 3.0.0-preview6-27713-13 + 3.0.0-preview6-27713-13 + 3.0.0-preview6-27713-13 3.0.0-preview6-27710-71 3.0.0-preview6-27710-71 From 41ab963854979114eeb43a63e0d7d2ec910e682f Mon Sep 17 00:00:00 2001 From: Matt Galbraith Date: Tue, 14 May 2019 08:37:39 -0700 Subject: [PATCH 340/607] Update windows.yml Remove " chars --- eng/pipelines/windows.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/pipelines/windows.yml b/eng/pipelines/windows.yml index 54bac61921b9..4a08d3c33f45 100644 --- a/eng/pipelines/windows.yml +++ b/eng/pipelines/windows.yml @@ -126,12 +126,12 @@ jobs: - ${{ if eq(parameters.isOfficialBuild, 'false') }}: - netcoreappWindowsQueues: Windows.7.Amd64.Open+Windows.81.Amd64.Open+Windows.10.Amd64.ClientRS4.ES.Open - - nanoQueues: "`(Windows.Nano.1803.Amd64.Open`)windows.10.amd64.serverrs4.open@mcr.microsoft.com/dotnet-buildtools/prereqs:nanoserver-1803-helix-amd64-05227e1-20190509225944" + - nanoQueues: `(Windows.Nano.1803.Amd64.Open`)windows.10.amd64.serverrs4.open@mcr.microsoft.com/dotnet-buildtools/prereqs:nanoserver-1803-helix-amd64-05227e1-20190509225944 - uapNetfxQueues: Windows.10.Amd64.ClientRS5.Open - ${{ if eq(parameters.isOfficialBuild, 'true') }}: - netcoreappWindowsQueues: Windows.7.Amd64+Windows.81.Amd64+Windows.10.Amd64.Core+Windows.10.Amd64.ClientRS4 - - nanoQueues: "`(Windows.Nano.1803.Amd64`)windows.10.amd64.serverrs4@mcr.microsoft.com/dotnet-buildtools/prereqs:nanoserver-1803-helix-amd64-05227e1-20190509225944" + - nanoQueues: `(Windows.Nano.1803.Amd64`)windows.10.amd64.serverrs4@mcr.microsoft.com/dotnet-buildtools/prereqs:nanoserver-1803-helix-amd64-05227e1-20190509225944 - uapNetfxQueues: Windows.10.Amd64.ClientRS5 - windowsArmQueue: Windows.10.Arm64 From eacccb411346c86b10c74ffd728540b12963a274 Mon Sep 17 00:00:00 2001 From: Matt Galbraith Date: Tue, 14 May 2019 08:49:50 -0700 Subject: [PATCH 341/607] Update windows.yml Put quotes back (tried without them for @safern ) --- eng/pipelines/windows.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/pipelines/windows.yml b/eng/pipelines/windows.yml index 4a08d3c33f45..54bac61921b9 100644 --- a/eng/pipelines/windows.yml +++ b/eng/pipelines/windows.yml @@ -126,12 +126,12 @@ jobs: - ${{ if eq(parameters.isOfficialBuild, 'false') }}: - netcoreappWindowsQueues: Windows.7.Amd64.Open+Windows.81.Amd64.Open+Windows.10.Amd64.ClientRS4.ES.Open - - nanoQueues: `(Windows.Nano.1803.Amd64.Open`)windows.10.amd64.serverrs4.open@mcr.microsoft.com/dotnet-buildtools/prereqs:nanoserver-1803-helix-amd64-05227e1-20190509225944 + - nanoQueues: "`(Windows.Nano.1803.Amd64.Open`)windows.10.amd64.serverrs4.open@mcr.microsoft.com/dotnet-buildtools/prereqs:nanoserver-1803-helix-amd64-05227e1-20190509225944" - uapNetfxQueues: Windows.10.Amd64.ClientRS5.Open - ${{ if eq(parameters.isOfficialBuild, 'true') }}: - netcoreappWindowsQueues: Windows.7.Amd64+Windows.81.Amd64+Windows.10.Amd64.Core+Windows.10.Amd64.ClientRS4 - - nanoQueues: `(Windows.Nano.1803.Amd64`)windows.10.amd64.serverrs4@mcr.microsoft.com/dotnet-buildtools/prereqs:nanoserver-1803-helix-amd64-05227e1-20190509225944 + - nanoQueues: "`(Windows.Nano.1803.Amd64`)windows.10.amd64.serverrs4@mcr.microsoft.com/dotnet-buildtools/prereqs:nanoserver-1803-helix-amd64-05227e1-20190509225944" - uapNetfxQueues: Windows.10.Amd64.ClientRS5 - windowsArmQueue: Windows.10.Arm64 From cb650e1b95f290c1a64dff26ccd5d21b8116ade7 Mon Sep 17 00:00:00 2001 From: Eric StJohn Date: Tue, 14 May 2019 09:23:42 -0700 Subject: [PATCH 342/607] Replace rewriting GenFacades shims with source projects (#37550) * Replace rewriting GenFacades shims with source projects This uses the new facade generation process that generates source files instead of relying on assembly rewriting for the production of desktop and netstandard facades. * Don't double import the SDK I reuse the properties in the generated projects (treating them as props files) but the SDK attribute on the Project element was causing the SDK to be imported twice. Avoid this by conditioning the imports. * Workaround APICompat misidentifying the core assembly * Fix shim binplacing * Clarify comment. --- build.proj | 3 +- src/dirs.proj | 2 +- src/shims/ApiCompat.proj | 8 +- .../ApiCompatBaseline.uap.netstandardOnly.txt | 21 ++++- ...iCompatBaseline.uapaot.netstandardOnly.txt | 21 ++++- src/shims/Configurations.props | 9 ++ src/shims/Directory.Build.props | 13 ++- src/shims/System.Void.cs | 6 ++ src/shims/generateShims.proj | 62 +++++++++++++ src/shims/generated/Configurations.props | 8 ++ src/shims/generated/Directory.Build.props | 23 +++++ .../generated/Microsoft.VisualBasic.csproj | 12 +++ ...stem.ComponentModel.DataAnnotations.csproj | 12 +++ .../generated/System.Configuration.csproj | 12 +++ src/shims/generated/System.Core.csproj | 12 +++ src/shims/generated/System.Data.csproj | 12 +++ src/shims/generated/System.Drawing.csproj | 12 +++ .../System.IO.Compression.FileSystem.csproj | 12 +++ src/shims/generated/System.Net.csproj | 12 +++ src/shims/generated/System.Numerics.csproj | 12 +++ .../System.Runtime.Serialization.csproj | 12 +++ src/shims/generated/System.Security.csproj | 12 +++ .../generated/System.ServiceModel.Web.csproj | 12 +++ .../generated/System.ServiceProcess.csproj | 12 +++ .../generated/System.Transactions.csproj | 12 +++ src/shims/generated/System.Web.csproj | 12 +++ src/shims/generated/System.Windows.csproj | 12 +++ src/shims/generated/System.Xml.Linq.csproj | 12 +++ .../generated/System.Xml.Serialization.csproj | 12 +++ src/shims/generated/System.Xml.csproj | 12 +++ src/shims/generated/System.Xml.props | 6 ++ src/shims/generated/System.csproj | 12 +++ src/shims/generated/WindowsBase.csproj | 12 +++ src/shims/generated/mscorlib.csproj | 12 +++ src/shims/generated/netstandard.csproj | 12 +++ src/shims/manual/Configurations.props | 9 ++ src/shims/manual/Directory.Build.props | 28 ++---- src/shims/manual/System.Data.csproj | 4 - src/shims/manual/System.Xml.csproj | 3 + src/shims/manual/System.csproj | 4 - src/shims/manual/mscorlib.csproj | 8 -- src/shims/manual/mscorlib.forwards.cs | 2 - src/shims/netfxreference.props | 25 ++--- src/shims/shims.proj | 91 ------------------- 44 files changed, 476 insertions(+), 156 deletions(-) create mode 100644 src/shims/Configurations.props create mode 100644 src/shims/System.Void.cs create mode 100644 src/shims/generateShims.proj create mode 100644 src/shims/generated/Configurations.props create mode 100644 src/shims/generated/Directory.Build.props create mode 100644 src/shims/generated/Microsoft.VisualBasic.csproj create mode 100644 src/shims/generated/System.ComponentModel.DataAnnotations.csproj create mode 100644 src/shims/generated/System.Configuration.csproj create mode 100644 src/shims/generated/System.Core.csproj create mode 100644 src/shims/generated/System.Data.csproj create mode 100644 src/shims/generated/System.Drawing.csproj create mode 100644 src/shims/generated/System.IO.Compression.FileSystem.csproj create mode 100644 src/shims/generated/System.Net.csproj create mode 100644 src/shims/generated/System.Numerics.csproj create mode 100644 src/shims/generated/System.Runtime.Serialization.csproj create mode 100644 src/shims/generated/System.Security.csproj create mode 100644 src/shims/generated/System.ServiceModel.Web.csproj create mode 100644 src/shims/generated/System.ServiceProcess.csproj create mode 100644 src/shims/generated/System.Transactions.csproj create mode 100644 src/shims/generated/System.Web.csproj create mode 100644 src/shims/generated/System.Windows.csproj create mode 100644 src/shims/generated/System.Xml.Linq.csproj create mode 100644 src/shims/generated/System.Xml.Serialization.csproj create mode 100644 src/shims/generated/System.Xml.csproj create mode 100644 src/shims/generated/System.Xml.props create mode 100644 src/shims/generated/System.csproj create mode 100644 src/shims/generated/WindowsBase.csproj create mode 100644 src/shims/generated/mscorlib.csproj create mode 100644 src/shims/generated/netstandard.csproj create mode 100644 src/shims/manual/Configurations.props create mode 100644 src/shims/manual/System.Xml.csproj delete mode 100644 src/shims/shims.proj diff --git a/build.proj b/build.proj index 9583b0d4c2e4..21858a185576 100644 --- a/build.proj +++ b/build.proj @@ -114,7 +114,8 @@ - + <_solutionsToUpdateFiles Include="$(MSBuildThisFileDirectory)src/*/Directory.Build.props" /> diff --git a/src/dirs.proj b/src/dirs.proj index 3dc753472852..6930d3f5eff7 100644 --- a/src/dirs.proj +++ b/src/dirs.proj @@ -8,7 +8,7 @@ - + diff --git a/src/shims/ApiCompat.proj b/src/shims/ApiCompat.proj index 2d79ff93e992..f06e88286c61 100644 --- a/src/shims/ApiCompat.proj +++ b/src/shims/ApiCompat.proj @@ -14,10 +14,10 @@ $(MSBuildThisFileDirectory)ApiCompatBaseline.$(TargetGroup).netfx461.ignore.txt $(MSBuildThisFileDirectory)ApiCompatBaseline.$(TargetGroup).netstandard.txt $(MSBuildThisFileDirectory)ApiCompatBaseline.$(TargetGroup).netstandardOnly.txt - $(RefPath),$(GenFacadesOutputPath) + $(RefPath) - $(RuntimePath),$(GenFacadesOutputPath),$(RefPath) + $(RuntimePath),$(RefPath) false @@ -36,7 +36,7 @@ @@ -89,7 +89,7 @@ - + diff --git a/src/shims/ApiCompatBaseline.uap.netstandardOnly.txt b/src/shims/ApiCompatBaseline.uap.netstandardOnly.txt index 3f505eb5231e..2d23f7e4f13e 100644 --- a/src/shims/ApiCompatBaseline.uap.netstandardOnly.txt +++ b/src/shims/ApiCompatBaseline.uap.netstandardOnly.txt @@ -120,4 +120,23 @@ CannotSealType : Type 'System.Linq.EnumerableExecutor' is effectively (has a pri MembersMustExist : Member 'System.Linq.EnumerableExecutor..ctor()' does not exist in the implementation but it does exist in the contract. CannotSealType : Type 'System.Linq.EnumerableQuery' is effectively (has a private constructor) sealed in the implementation but not sealed in the contract. MembersMustExist : Member 'System.Linq.EnumerableQuery..ctor()' does not exist in the implementation but it does exist in the contract. -Total Issues: 121 + +TypeCannotChangeClassification : Type 'System.Action' is a 'class' in the implementation but is a 'delegate' in the contract. +TypeCannotChangeClassification : Type 'System.Action' is a 'class' in the implementation but is a 'delegate' in the contract. +TypeCannotChangeClassification : Type 'System.Action' is a 'class' in the implementation but is a 'delegate' in the contract. +TypeCannotChangeClassification : Type 'System.Action' is a 'class' in the implementation but is a 'delegate' in the contract. +TypeCannotChangeClassification : Type 'System.Action' is a 'class' in the implementation but is a 'delegate' in the contract. +TypeCannotChangeClassification : Type 'System.Action' is a 'class' in the implementation but is a 'delegate' in the contract. +TypeCannotChangeClassification : Type 'System.Action' is a 'class' in the implementation but is a 'delegate' in the contract. +TypeCannotChangeClassification : Type 'System.Action' is a 'class' in the implementation but is a 'delegate' in the contract. +TypeCannotChangeClassification : Type 'System.Func' is a 'class' in the implementation but is a 'delegate' in the contract. +TypeCannotChangeClassification : Type 'System.Func' is a 'class' in the implementation but is a 'delegate' in the contract. +TypeCannotChangeClassification : Type 'System.Func' is a 'class' in the implementation but is a 'delegate' in the contract. +TypeCannotChangeClassification : Type 'System.Func' is a 'class' in the implementation but is a 'delegate' in the contract. +TypeCannotChangeClassification : Type 'System.Func' is a 'class' in the implementation but is a 'delegate' in the contract. +TypeCannotChangeClassification : Type 'System.Func' is a 'class' in the implementation but is a 'delegate' in the contract. +TypeCannotChangeClassification : Type 'System.Func' is a 'class' in the implementation but is a 'delegate' in the contract. +TypeCannotChangeClassification : Type 'System.Func' is a 'class' in the implementation but is a 'delegate' in the contract. +CannotChangeAttribute : Attribute 'System.Diagnostics.SwitchLevelAttribute' on 'System.Diagnostics.BooleanSwitch' changed from '[SwitchLevelAttribute(typeof(bool))]' in the contract to '[SwitchLevelAttribute(typeof(Boolean))]' in the implementation. +TypeCannotChangeClassification : Type 'System.IO.FileAttributes' is a 'class' in the implementation but is a 'struct' in the contract. +TypeCannotChangeClassification : Type 'System.IO.HandleInheritability' is a 'class' in the implementation but is a 'struct' in the contract. \ No newline at end of file diff --git a/src/shims/ApiCompatBaseline.uapaot.netstandardOnly.txt b/src/shims/ApiCompatBaseline.uapaot.netstandardOnly.txt index d00d2aaf0b6c..2439bae38562 100644 --- a/src/shims/ApiCompatBaseline.uapaot.netstandardOnly.txt +++ b/src/shims/ApiCompatBaseline.uapaot.netstandardOnly.txt @@ -109,4 +109,23 @@ CannotSealType : Type 'System.Linq.EnumerableExecutor' is effectively (has a pri MembersMustExist : Member 'System.Linq.EnumerableExecutor..ctor()' does not exist in the implementation but it does exist in the contract. CannotSealType : Type 'System.Linq.EnumerableQuery' is effectively (has a private constructor) sealed in the implementation but not sealed in the contract. MembersMustExist : Member 'System.Linq.EnumerableQuery..ctor()' does not exist in the implementation but it does exist in the contract. -Total Issues: 109 + +TypeCannotChangeClassification : Type 'System.Action' is a 'class' in the implementation but is a 'delegate' in the contract. +TypeCannotChangeClassification : Type 'System.Action' is a 'class' in the implementation but is a 'delegate' in the contract. +TypeCannotChangeClassification : Type 'System.Action' is a 'class' in the implementation but is a 'delegate' in the contract. +TypeCannotChangeClassification : Type 'System.Action' is a 'class' in the implementation but is a 'delegate' in the contract. +TypeCannotChangeClassification : Type 'System.Action' is a 'class' in the implementation but is a 'delegate' in the contract. +TypeCannotChangeClassification : Type 'System.Action' is a 'class' in the implementation but is a 'delegate' in the contract. +TypeCannotChangeClassification : Type 'System.Action' is a 'class' in the implementation but is a 'delegate' in the contract. +TypeCannotChangeClassification : Type 'System.Action' is a 'class' in the implementation but is a 'delegate' in the contract. +TypeCannotChangeClassification : Type 'System.Func' is a 'class' in the implementation but is a 'delegate' in the contract. +TypeCannotChangeClassification : Type 'System.Func' is a 'class' in the implementation but is a 'delegate' in the contract. +TypeCannotChangeClassification : Type 'System.Func' is a 'class' in the implementation but is a 'delegate' in the contract. +TypeCannotChangeClassification : Type 'System.Func' is a 'class' in the implementation but is a 'delegate' in the contract. +TypeCannotChangeClassification : Type 'System.Func' is a 'class' in the implementation but is a 'delegate' in the contract. +TypeCannotChangeClassification : Type 'System.Func' is a 'class' in the implementation but is a 'delegate' in the contract. +TypeCannotChangeClassification : Type 'System.Func' is a 'class' in the implementation but is a 'delegate' in the contract. +TypeCannotChangeClassification : Type 'System.Func' is a 'class' in the implementation but is a 'delegate' in the contract. +CannotChangeAttribute : Attribute 'System.Diagnostics.SwitchLevelAttribute' on 'System.Diagnostics.BooleanSwitch' changed from '[SwitchLevelAttribute(typeof(bool))]' in the contract to '[SwitchLevelAttribute(typeof(Boolean))]' in the implementation. +TypeCannotChangeClassification : Type 'System.IO.FileAttributes' is a 'class' in the implementation but is a 'struct' in the contract. +TypeCannotChangeClassification : Type 'System.IO.HandleInheritability' is a 'class' in the implementation but is a 'struct' in the contract. \ No newline at end of file diff --git a/src/shims/Configurations.props b/src/shims/Configurations.props new file mode 100644 index 000000000000..a43a53d48731 --- /dev/null +++ b/src/shims/Configurations.props @@ -0,0 +1,9 @@ + + + + netcoreapp; + uap; + uapaot; + + + \ No newline at end of file diff --git a/src/shims/Directory.Build.props b/src/shims/Directory.Build.props index 0ddbf9e5a8f5..c4959365254a 100644 --- a/src/shims/Directory.Build.props +++ b/src/shims/Directory.Build.props @@ -19,7 +19,16 @@ - - $(ArtifactsObjDir)shims/$(TargetGroup)/ + true + true + false + true + + + + + + diff --git a/src/shims/System.Void.cs b/src/shims/System.Void.cs new file mode 100644 index 000000000000..c566acbeb250 --- /dev/null +++ b/src/shims/System.Void.cs @@ -0,0 +1,6 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +// System.void typeforward requires a special C# syntax that we choose to handle here. +[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(void))] diff --git a/src/shims/generateShims.proj b/src/shims/generateShims.proj new file mode 100644 index 000000000000..10e495fe471a --- /dev/null +++ b/src/shims/generateShims.proj @@ -0,0 +1,62 @@ + + + + + + + + + + <_contractName>%(GenFacadesContracts.Identity) + <_contractStrongNameKeyId>%(GenFacadesContracts.StrongNameKeyId) + <_contractStrongNameKeyId Condition="'$(_contractStrongNameKeyId)' == ''">Microsoft + <_contractDirProperty>%(GenFacadesContracts.ContractDir) + <_contractAssembly>$(%(GenFacadesContracts.ContractDir))$(_contractName).dll + <_contractProjectFile>generated/$(_contractName).csproj + + + + + + + + <_contractAssemblyVersion>%(_contractIdentity.Version) + <_contractAssemblyPublicKey>%(_contractIdentity.PublicKeyToken) + <_contractStrongNameKeyId Condition="'$(_contractAssemblyPublicKey)' == 'b77a5c561934e089'">ECMA + <_contractStrongNameKeyId Condition="'$(_contractAssemblyPublicKey)' == 'b03f5f7f11d50a3a'">Microsoft + <_contractStrongNameKeyId Condition="'$(_contractAssemblyPublicKey)' == '31bf3856ad364e35'">MicrosoftShared + <_contractStrongNameKeyId Condition="'$(_contractAssemblyPublicKey)' == 'cc7b13ffcd2ddd51'">Open + <_contractProjectContent> + + + + + $(_contractAssemblyVersion) + $(_contractStrongNameKeyId) + %24($(_contractDirProperty))%24(MSBuildProjectName).dll + + + +]]> + + + + + + + + + + + true + + + + diff --git a/src/shims/generated/Configurations.props b/src/shims/generated/Configurations.props new file mode 100644 index 000000000000..54fa8c3dc73f --- /dev/null +++ b/src/shims/generated/Configurations.props @@ -0,0 +1,8 @@ + + + + netcoreapp; + uap; + + + \ No newline at end of file diff --git a/src/shims/generated/Directory.Build.props b/src/shims/generated/Directory.Build.props new file mode 100644 index 000000000000..c0fede342e90 --- /dev/null +++ b/src/shims/generated/Directory.Build.props @@ -0,0 +1,23 @@ + + + + true + + true + + + + + + + + + + + + + + diff --git a/src/shims/generated/Microsoft.VisualBasic.csproj b/src/shims/generated/Microsoft.VisualBasic.csproj new file mode 100644 index 000000000000..8326dc680269 --- /dev/null +++ b/src/shims/generated/Microsoft.VisualBasic.csproj @@ -0,0 +1,12 @@ + + + + + + 10.0.0.0 + Microsoft + $(NetFxRefPath)$(MSBuildProjectName).dll + + + diff --git a/src/shims/generated/System.ComponentModel.DataAnnotations.csproj b/src/shims/generated/System.ComponentModel.DataAnnotations.csproj new file mode 100644 index 000000000000..967159a41dab --- /dev/null +++ b/src/shims/generated/System.ComponentModel.DataAnnotations.csproj @@ -0,0 +1,12 @@ + + + + + + 4.0.0.0 + MicrosoftShared + $(NetFxRefPath)$(MSBuildProjectName).dll + + + diff --git a/src/shims/generated/System.Configuration.csproj b/src/shims/generated/System.Configuration.csproj new file mode 100644 index 000000000000..a7aa25c98c4d --- /dev/null +++ b/src/shims/generated/System.Configuration.csproj @@ -0,0 +1,12 @@ + + + + + + 4.0.0.0 + Microsoft + $(NetFxRefPath)$(MSBuildProjectName).dll + + + diff --git a/src/shims/generated/System.Core.csproj b/src/shims/generated/System.Core.csproj new file mode 100644 index 000000000000..96e132177f78 --- /dev/null +++ b/src/shims/generated/System.Core.csproj @@ -0,0 +1,12 @@ + + + + + + 4.0.0.0 + ECMA + $(NetFxRefPath)$(MSBuildProjectName).dll + + + diff --git a/src/shims/generated/System.Data.csproj b/src/shims/generated/System.Data.csproj new file mode 100644 index 000000000000..96e132177f78 --- /dev/null +++ b/src/shims/generated/System.Data.csproj @@ -0,0 +1,12 @@ + + + + + + 4.0.0.0 + ECMA + $(NetFxRefPath)$(MSBuildProjectName).dll + + + diff --git a/src/shims/generated/System.Drawing.csproj b/src/shims/generated/System.Drawing.csproj new file mode 100644 index 000000000000..a7aa25c98c4d --- /dev/null +++ b/src/shims/generated/System.Drawing.csproj @@ -0,0 +1,12 @@ + + + + + + 4.0.0.0 + Microsoft + $(NetFxRefPath)$(MSBuildProjectName).dll + + + diff --git a/src/shims/generated/System.IO.Compression.FileSystem.csproj b/src/shims/generated/System.IO.Compression.FileSystem.csproj new file mode 100644 index 000000000000..96e132177f78 --- /dev/null +++ b/src/shims/generated/System.IO.Compression.FileSystem.csproj @@ -0,0 +1,12 @@ + + + + + + 4.0.0.0 + ECMA + $(NetFxRefPath)$(MSBuildProjectName).dll + + + diff --git a/src/shims/generated/System.Net.csproj b/src/shims/generated/System.Net.csproj new file mode 100644 index 000000000000..a7aa25c98c4d --- /dev/null +++ b/src/shims/generated/System.Net.csproj @@ -0,0 +1,12 @@ + + + + + + 4.0.0.0 + Microsoft + $(NetFxRefPath)$(MSBuildProjectName).dll + + + diff --git a/src/shims/generated/System.Numerics.csproj b/src/shims/generated/System.Numerics.csproj new file mode 100644 index 000000000000..96e132177f78 --- /dev/null +++ b/src/shims/generated/System.Numerics.csproj @@ -0,0 +1,12 @@ + + + + + + 4.0.0.0 + ECMA + $(NetFxRefPath)$(MSBuildProjectName).dll + + + diff --git a/src/shims/generated/System.Runtime.Serialization.csproj b/src/shims/generated/System.Runtime.Serialization.csproj new file mode 100644 index 000000000000..96e132177f78 --- /dev/null +++ b/src/shims/generated/System.Runtime.Serialization.csproj @@ -0,0 +1,12 @@ + + + + + + 4.0.0.0 + ECMA + $(NetFxRefPath)$(MSBuildProjectName).dll + + + diff --git a/src/shims/generated/System.Security.csproj b/src/shims/generated/System.Security.csproj new file mode 100644 index 000000000000..a7aa25c98c4d --- /dev/null +++ b/src/shims/generated/System.Security.csproj @@ -0,0 +1,12 @@ + + + + + + 4.0.0.0 + Microsoft + $(NetFxRefPath)$(MSBuildProjectName).dll + + + diff --git a/src/shims/generated/System.ServiceModel.Web.csproj b/src/shims/generated/System.ServiceModel.Web.csproj new file mode 100644 index 000000000000..967159a41dab --- /dev/null +++ b/src/shims/generated/System.ServiceModel.Web.csproj @@ -0,0 +1,12 @@ + + + + + + 4.0.0.0 + MicrosoftShared + $(NetFxRefPath)$(MSBuildProjectName).dll + + + diff --git a/src/shims/generated/System.ServiceProcess.csproj b/src/shims/generated/System.ServiceProcess.csproj new file mode 100644 index 000000000000..a7aa25c98c4d --- /dev/null +++ b/src/shims/generated/System.ServiceProcess.csproj @@ -0,0 +1,12 @@ + + + + + + 4.0.0.0 + Microsoft + $(NetFxRefPath)$(MSBuildProjectName).dll + + + diff --git a/src/shims/generated/System.Transactions.csproj b/src/shims/generated/System.Transactions.csproj new file mode 100644 index 000000000000..96e132177f78 --- /dev/null +++ b/src/shims/generated/System.Transactions.csproj @@ -0,0 +1,12 @@ + + + + + + 4.0.0.0 + ECMA + $(NetFxRefPath)$(MSBuildProjectName).dll + + + diff --git a/src/shims/generated/System.Web.csproj b/src/shims/generated/System.Web.csproj new file mode 100644 index 000000000000..a7aa25c98c4d --- /dev/null +++ b/src/shims/generated/System.Web.csproj @@ -0,0 +1,12 @@ + + + + + + 4.0.0.0 + Microsoft + $(NetFxRefPath)$(MSBuildProjectName).dll + + + diff --git a/src/shims/generated/System.Windows.csproj b/src/shims/generated/System.Windows.csproj new file mode 100644 index 000000000000..a7aa25c98c4d --- /dev/null +++ b/src/shims/generated/System.Windows.csproj @@ -0,0 +1,12 @@ + + + + + + 4.0.0.0 + Microsoft + $(NetFxRefPath)$(MSBuildProjectName).dll + + + diff --git a/src/shims/generated/System.Xml.Linq.csproj b/src/shims/generated/System.Xml.Linq.csproj new file mode 100644 index 000000000000..96e132177f78 --- /dev/null +++ b/src/shims/generated/System.Xml.Linq.csproj @@ -0,0 +1,12 @@ + + + + + + 4.0.0.0 + ECMA + $(NetFxRefPath)$(MSBuildProjectName).dll + + + diff --git a/src/shims/generated/System.Xml.Serialization.csproj b/src/shims/generated/System.Xml.Serialization.csproj new file mode 100644 index 000000000000..96e132177f78 --- /dev/null +++ b/src/shims/generated/System.Xml.Serialization.csproj @@ -0,0 +1,12 @@ + + + + + + 4.0.0.0 + ECMA + $(NetFxRefPath)$(MSBuildProjectName).dll + + + diff --git a/src/shims/generated/System.Xml.csproj b/src/shims/generated/System.Xml.csproj new file mode 100644 index 000000000000..96e132177f78 --- /dev/null +++ b/src/shims/generated/System.Xml.csproj @@ -0,0 +1,12 @@ + + + + + + 4.0.0.0 + ECMA + $(NetFxRefPath)$(MSBuildProjectName).dll + + + diff --git a/src/shims/generated/System.Xml.props b/src/shims/generated/System.Xml.props new file mode 100644 index 000000000000..15ea92775b28 --- /dev/null +++ b/src/shims/generated/System.Xml.props @@ -0,0 +1,6 @@ + + + + + + diff --git a/src/shims/generated/System.csproj b/src/shims/generated/System.csproj new file mode 100644 index 000000000000..96e132177f78 --- /dev/null +++ b/src/shims/generated/System.csproj @@ -0,0 +1,12 @@ + + + + + + 4.0.0.0 + ECMA + $(NetFxRefPath)$(MSBuildProjectName).dll + + + diff --git a/src/shims/generated/WindowsBase.csproj b/src/shims/generated/WindowsBase.csproj new file mode 100644 index 000000000000..967159a41dab --- /dev/null +++ b/src/shims/generated/WindowsBase.csproj @@ -0,0 +1,12 @@ + + + + + + 4.0.0.0 + MicrosoftShared + $(NetFxRefPath)$(MSBuildProjectName).dll + + + diff --git a/src/shims/generated/mscorlib.csproj b/src/shims/generated/mscorlib.csproj new file mode 100644 index 000000000000..96e132177f78 --- /dev/null +++ b/src/shims/generated/mscorlib.csproj @@ -0,0 +1,12 @@ + + + + + + 4.0.0.0 + ECMA + $(NetFxRefPath)$(MSBuildProjectName).dll + + + diff --git a/src/shims/generated/netstandard.csproj b/src/shims/generated/netstandard.csproj new file mode 100644 index 000000000000..ec9b00675ebd --- /dev/null +++ b/src/shims/generated/netstandard.csproj @@ -0,0 +1,12 @@ + + + + + + 2.1.0.0 + Open + $(NETStandard21RefPath)$(MSBuildProjectName).dll + + + diff --git a/src/shims/manual/Configurations.props b/src/shims/manual/Configurations.props new file mode 100644 index 000000000000..a43a53d48731 --- /dev/null +++ b/src/shims/manual/Configurations.props @@ -0,0 +1,9 @@ + + + + netcoreapp; + uap; + uapaot; + + + \ No newline at end of file diff --git a/src/shims/manual/Directory.Build.props b/src/shims/manual/Directory.Build.props index 43c8dd91b7b9..20491c8d9552 100644 --- a/src/shims/manual/Directory.Build.props +++ b/src/shims/manual/Directory.Build.props @@ -1,26 +1,16 @@ - - netcoreapp; - uap; - uapaot; - - true - true + + manual.$(MSBuildProjectName) - - + + + + + + - 4.0.0.0 - ECMA - true - true - true true - true - false - $(NetFxRefPath)$(MSBuildProjectName).dll - $(DefineConstants);netcoreapp <_runtimeOSGroup>$(_bc_OSGroup) <_runtimeOSGroup Condition="'$(TargetsUAP)' == 'true'">Windows_NT @@ -30,6 +20,6 @@ + Exclude="$(RefPath)$(MSBuildProjectName).dll" /> diff --git a/src/shims/manual/System.Data.csproj b/src/shims/manual/System.Data.csproj index 195c82a6290a..9d964c8c7532 100644 --- a/src/shims/manual/System.Data.csproj +++ b/src/shims/manual/System.Data.csproj @@ -1,8 +1,4 @@ - - {5E51460E-C9DC-4B6B-B87E-0ED742FC6733} - Debug;Release - diff --git a/src/shims/manual/System.Xml.csproj b/src/shims/manual/System.Xml.csproj new file mode 100644 index 000000000000..11e762bbe731 --- /dev/null +++ b/src/shims/manual/System.Xml.csproj @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/src/shims/manual/System.csproj b/src/shims/manual/System.csproj index a7a6e5b1df05..f88c9ea94c0f 100644 --- a/src/shims/manual/System.csproj +++ b/src/shims/manual/System.csproj @@ -1,8 +1,4 @@ - - {1FB7650D-7165-49B9-98B0-E345D56983DB} - Debug;Release - diff --git a/src/shims/manual/mscorlib.csproj b/src/shims/manual/mscorlib.csproj index b2f9b8b276c7..33e7c4d6489d 100644 --- a/src/shims/manual/mscorlib.csproj +++ b/src/shims/manual/mscorlib.csproj @@ -1,12 +1,4 @@ - - {CEAE2042-461E-490A-974C-AD7FBD4E294E} - Debug;Release - - - - - diff --git a/src/shims/manual/mscorlib.forwards.cs b/src/shims/manual/mscorlib.forwards.cs index 67d99409b717..e3f499236dec 100644 --- a/src/shims/manual/mscorlib.forwards.cs +++ b/src/shims/manual/mscorlib.forwards.cs @@ -20,5 +20,3 @@ [assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.OrdinalComparer))] [assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.UnitySerializationHolder))] [assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Diagnostics.Contracts.ContractException))] -// System.void typeforward requires a special C# syntax that we choose to handle here. -[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(void))] diff --git a/src/shims/netfxreference.props b/src/shims/netfxreference.props index 449cdecf3ef3..2c28d9ce9174 100644 --- a/src/shims/netfxreference.props +++ b/src/shims/netfxreference.props @@ -1,20 +1,13 @@ + - - true - + - - true - - - MSSharedLib - + + - - true - + @@ -22,17 +15,13 @@ - - MSSharedLib - + - - MSSharedLib - + diff --git a/src/shims/shims.proj b/src/shims/shims.proj deleted file mode 100644 index c24270fb8545..000000000000 --- a/src/shims/shims.proj +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - StrongName - %(NetfxReference.StrongNameSig) - - - - - - - - - - - $(IntermediateOutputPath)genfacades.sempahore - - - - - - - false - true - false - true - false - - - - - - - - - - - - - - - - - - - - - - RuntimeBinplaceItem - - - RuntimeBinplaceItem - - - - - - - - - - - - - - From 8ba8d866746e0bfa12a7fbb74e878ff361a5eb00 Mon Sep 17 00:00:00 2001 From: dotnet-maestro-bot Date: Tue, 14 May 2019 09:30:01 -0700 Subject: [PATCH 343/607] Update ProjectNTfs, ProjectNTfsTestILC to beta-27714-00, beta-27714-00, respectively (#37638) --- eng/dependencies.props | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/eng/dependencies.props b/eng/dependencies.props index 546c419f0b25..ffbd4f15ed10 100644 --- a/eng/dependencies.props +++ b/eng/dependencies.props @@ -9,8 +9,8 @@ These ref versions are pulled from https://github.com/dotnet/versions. --> - ff7b2cc14cdddbd056e68fdabd380fbfa14c51d9 - ff7b2cc14cdddbd056e68fdabd380fbfa14c51d9 + fa9814f6253038f1a3c6f0747294572ee53f027e + fa9814f6253038f1a3c6f0747294572ee53f027e 8bd1ec5fac9f0eec34ff6b34b1d878b4359e02dd @@ -22,9 +22,9 @@ - beta-27713-00 - beta-27713-00 - 1.0.0-beta-27713-00 + beta-27714-00 + beta-27714-00 + 1.0.0-beta-27714-00 4.4.0 From 269a37755c788252385ceec472c619e68d676032 Mon Sep 17 00:00:00 2001 From: Tomas Weinfurt Date: Tue, 14 May 2019 09:52:45 -0700 Subject: [PATCH 344/607] update HTTP2 responce header processing (#37572) * update HTTP2 responce header processing * fix also trailinbg headers --- .../Http/SocketsHttpHandler/Http2Stream.cs | 4 ++-- .../HttpClientHandlerTest.Headers.cs | 22 +++++++++++++++++++ .../FunctionalTests/SocketsHttpHandlerTest.cs | 3 +++ 3 files changed, 27 insertions(+), 2 deletions(-) diff --git a/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http2Stream.cs b/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http2Stream.cs index 2211f84aa9dc..5eb0a1f63852 100644 --- a/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http2Stream.cs +++ b/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http2Stream.cs @@ -186,7 +186,7 @@ public void OnResponseHeader(ReadOnlySpan name, ReadOnlySpan value) // if the header can't be added, we silently drop it. if (_state == StreamState.ExpectingTrailingHeaders) { - _response.TrailingHeaders.TryAddWithoutValidation(descriptor, headerValue); + _response.TrailingHeaders.TryAddWithoutValidation(descriptor.HeaderType == HttpHeaderType.Request ? descriptor.AsCustomHeader() : descriptor, headerValue); } else if (descriptor.HeaderType == HttpHeaderType.Content) { @@ -194,7 +194,7 @@ public void OnResponseHeader(ReadOnlySpan name, ReadOnlySpan value) } else { - _response.Headers.TryAddWithoutValidation(descriptor, headerValue); + _response.Headers.TryAddWithoutValidation(descriptor.HeaderType == HttpHeaderType.Request ? descriptor.AsCustomHeader() : descriptor, headerValue); } } } diff --git a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Headers.cs b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Headers.cs index 82a123cd5927..f018c8163e9a 100644 --- a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Headers.cs +++ b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Headers.cs @@ -202,6 +202,28 @@ public void HeadersAdd_CustomExpires_Success(string value, bool isValid) Assert.Equal(value, headers.GetValues("Expires").First()); } + [Theory] + [InlineData("Accept-Encoding", "identity,gzip")] + public async Task SendAsync_RequestHeaderInResponse_Success(string name, string value) + { + await LoopbackServerFactory.CreateClientAndServerAsync(async uri => + { + using (HttpClient client = CreateHttpClient()) + { + var message = new HttpRequestMessage(HttpMethod.Get, uri) { Version = VersionFromUseHttp2 }; + HttpResponseMessage response = await client.SendAsync(message); + + Assert.Equal(value, response.Headers.GetValues(name).First()); + } + }, + async server => + { + IList headers = new HttpHeaderData[] { new HttpHeaderData(name, value) }; + + HttpRequestData requestData = await server.HandleRequestAsync(HttpStatusCode.OK, headers); + }); + } + [OuterLoop("Uses external server")] [Theory] [InlineData(false)] diff --git a/src/System.Net.Http/tests/FunctionalTests/SocketsHttpHandlerTest.cs b/src/System.Net.Http/tests/FunctionalTests/SocketsHttpHandlerTest.cs index 17132cca6a96..8537cb7e4267 100644 --- a/src/System.Net.Http/tests/FunctionalTests/SocketsHttpHandlerTest.cs +++ b/src/System.Net.Http/tests/FunctionalTests/SocketsHttpHandlerTest.cs @@ -536,6 +536,7 @@ public SocketsHttpHandler_TrailingHeaders_Test(ITestOutputHelper output) : base( protected static readonly IList TrailingHeaders = new HttpHeaderData[] { new HttpHeaderData("MyCoolTrailerHeader", "amazingtrailer"), new HttpHeaderData("EmptyHeader", ""), + new HttpHeaderData("Accept-Encoding", "identity,gzip"), new HttpHeaderData("Hello", "World") }; protected static Frame MakeDataFrame(int streamId, byte[] data, bool endStream = false) => @@ -570,6 +571,7 @@ await TestHelper.WhenAllCompletedOrAnyFailed( "data\r\n" + "0\r\n" + "MyCoolTrailerHeader: amazingtrailer\r\n" + + "Accept-encoding: identity,gzip\r\n" + "Hello: World\r\n" + "\r\n")); @@ -587,6 +589,7 @@ await TestHelper.WhenAllCompletedOrAnyFailed( Assert.Contains("amazingtrailer", response.TrailingHeaders.GetValues("MyCoolTrailerHeader")); Assert.Contains("World", response.TrailingHeaders.GetValues("Hello")); + Assert.Contains("identity,gzip", response.TrailingHeaders.GetValues("Accept-encoding")); string data = await response.Content.ReadAsStringAsync(); Assert.Contains("data", data); From c746f95107a615f17a7fa5344b4c207291536ac3 Mon Sep 17 00:00:00 2001 From: William Godbe Date: Tue, 14 May 2019 10:24:18 -0700 Subject: [PATCH 345/607] Replace the esoteric '<<' in calls to Buffer.BlockCopy() in URI.cs (#37310) * Document the esoteric use of '<<' in URI.cs * Fix comment style * Make calls to Buffer.BlockCopy() clearer * Add EOL --- src/System.Private.Uri/src/System/Uri.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/System.Private.Uri/src/System/Uri.cs b/src/System.Private.Uri/src/System/Uri.cs index 5e7e22aa3672..5a470b0dca4b 100644 --- a/src/System.Private.Uri/src/System/Uri.cs +++ b/src/System.Private.Uri/src/System/Uri.cs @@ -4877,7 +4877,7 @@ private unsafe char[] GetCanonicalPath(char[] dest, ref int pos, UriFormat forma } char[] dest1 = new char[dest.Length]; - Buffer.BlockCopy(dest, 0, dest1, 0, end << 1); + Buffer.BlockCopy(dest, 0, dest1, 0, end * sizeof(char)); fixed (char* pdest = dest1) { dest = UriHelper.UnescapeString(pdest, pos, end, dest, ref pos, '?', '#', c_DummyChar, mode, @@ -5031,7 +5031,7 @@ private static char[] Compress(char[] dest, ushort start, ref int destLength, Ur // // just reusing a variable slot we perform //dest.Remove(i+1, dotCount + (lastSlash==0?0:1)); lastSlash = (ushort)(i + 1 + dotCount + (lastSlash == 0 ? 0 : 1)); - Buffer.BlockCopy(dest, lastSlash << 1, dest, (i + 1) << 1, (destLength - lastSlash) << 1); + Buffer.BlockCopy(dest, lastSlash * sizeof(char), dest, (i + 1) * sizeof(char), (destLength - lastSlash) * sizeof(char)); destLength -= (lastSlash - i - 1); lastSlash = i; @@ -5066,7 +5066,7 @@ private static char[] Compress(char[] dest, ushort start, ref int destLength, Ur // just reusing a variable slot we perform //dest.Remove(i+1, lastSlash - i); lastSlash = (ushort)(lastSlash + 1); - Buffer.BlockCopy(dest, lastSlash << 1, dest, (i + 1) << 1, (destLength - lastSlash) << 1); + Buffer.BlockCopy(dest, lastSlash * sizeof(char), dest, (i + 1) * sizeof(char), (destLength - lastSlash) * sizeof(char)); destLength -= (lastSlash - i - 1); } lastSlash = i; @@ -5084,7 +5084,7 @@ private static char[] Compress(char[] dest, ushort start, ref int destLength, Ur { //remove first not rooted segment lastSlash = (ushort)(lastSlash + 1); - Buffer.BlockCopy(dest, lastSlash << 1, dest, start << 1, (destLength - lastSlash) << 1); + Buffer.BlockCopy(dest, lastSlash * sizeof(char), dest, start * sizeof(char), (destLength - lastSlash) * sizeof(char)); destLength -= lastSlash; } else if (dotCount != 0) @@ -5094,7 +5094,7 @@ private static char[] Compress(char[] dest, ushort start, ref int destLength, Ur if (lastSlash == dotCount + 1 || (lastSlash == 0 && dotCount + 1 == destLength)) { dotCount = (ushort)(dotCount + (lastSlash == 0 ? 0 : 1)); - Buffer.BlockCopy(dest, dotCount << 1, dest, start << 1, (destLength - dotCount) << 1); + Buffer.BlockCopy(dest, dotCount * sizeof(char), dest, start * sizeof(char), (destLength - dotCount) * sizeof(char)); destLength -= dotCount; } } From 47be0d100765c165c085fd492786783b1833ff95 Mon Sep 17 00:00:00 2001 From: Tomas Weinfurt Date: Tue, 14 May 2019 10:41:01 -0700 Subject: [PATCH 346/607] disable UDS tests on Nano (#37652) --- .../tests/FunctionalTests/UnixDomainSocketTest.netcoreapp.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/System.Net.Sockets/tests/FunctionalTests/UnixDomainSocketTest.netcoreapp.cs b/src/System.Net.Sockets/tests/FunctionalTests/UnixDomainSocketTest.netcoreapp.cs index fbc5b7495875..23fa304f30e6 100644 --- a/src/System.Net.Sockets/tests/FunctionalTests/UnixDomainSocketTest.netcoreapp.cs +++ b/src/System.Net.Sockets/tests/FunctionalTests/UnixDomainSocketTest.netcoreapp.cs @@ -445,7 +445,7 @@ private static bool PlatformSupportsUnixDomainSockets if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) { // UDS support added in April 2018 Update - if (!PlatformDetection.IsWindows10Version1803OrGreater) + if (!PlatformDetection.IsWindows10Version1803OrGreater || PlatformDetection.IsWindowsNanoServer) { return false; } From 3fd3a51d84f9f7f23b69114872cc3d397daf3c73 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Tue, 14 May 2019 22:44:52 +0200 Subject: [PATCH 347/607] Update dependencies from https://github.com/dotnet/corefx build 20190513.9 (#37641) - Microsoft.NETCore.Platforms - 3.0.0-preview6.19263.9 - runtime.native.System.IO.Ports - 4.6.0-preview6.19263.9 --- eng/Version.Details.xml | 8 ++++---- eng/Versions.props | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 789ff15b8f2b..57f7f8837878 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -26,13 +26,13 @@ https://github.com/dotnet/core-setup 91a4df0883082c784b0826874874d65b3fcf79ba - + https://github.com/dotnet/corefx - 0d3caeba10c3c4a83f16a11c4298e39528d923b5 + f5be0283c5e00dd823a41f671f9c9a41170f0a85 - + https://github.com/dotnet/corefx - 0d3caeba10c3c4a83f16a11c4298e39528d923b5 + f5be0283c5e00dd823a41f671f9c9a41170f0a85 https://github.com/dotnet/arcade diff --git a/eng/Versions.props b/eng/Versions.props index 2f9e5475af0e..3ddda992e428 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -43,8 +43,8 @@ 3.0.0-preview6-27710-71 3.0.0-preview6-27710-71 - 3.0.0-preview6.19260.6 - 4.6.0-preview6.19260.6 + 3.0.0-preview6.19263.9 + 4.6.0-preview6.19263.9 2.1.0-prerelease.19263.1 From bffb2a1c21f84336e0cf4eac83e9885b53a18a82 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Tue, 14 May 2019 22:46:06 +0200 Subject: [PATCH 348/607] [master] Update dependencies from dotnet/standard (#37636) * Update dependencies from https://github.com/dotnet/standard build 20190513.2 - NETStandard.Library - 2.1.0-prerelease.19263.2 * Update dependencies from https://github.com/dotnet/standard build 20190514.1 - NETStandard.Library - 2.1.0-prerelease.19264.1 * Update dependencies from https://github.com/dotnet/standard build 20190514.2 - NETStandard.Library - 2.1.0-prerelease.19264.2 --- eng/Version.Details.xml | 4 ++-- eng/Versions.props | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 57f7f8837878..06f49c2da53e 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -38,9 +38,9 @@ https://github.com/dotnet/arcade a7a250e9c13147134543c35fef2fb81f19592edf - + https://github.com/dotnet/standard - 4b3bef4a8ca06a6a016d986cc78902bd63ab9033 + 5f041c267883fe142b109a92bb48ce65653f7efa https://github.com/dotnet/arcade diff --git a/eng/Versions.props b/eng/Versions.props index 3ddda992e428..13c3825272b0 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -46,7 +46,7 @@ 3.0.0-preview6.19263.9 4.6.0-preview6.19263.9 - 2.1.0-prerelease.19263.1 + 2.1.0-prerelease.19264.2 99.99.99-master-20190510.1 From 05ada9bc9674ef874666260c14a01187deee8040 Mon Sep 17 00:00:00 2001 From: Carlos Sanchez Lopez <1175054+carlossanlop@users.noreply.github.com> Date: Tue, 14 May 2019 14:26:12 -0700 Subject: [PATCH 349/607] Fix bug in ZipArchiveEntry data descriptor (#37601) * Prevent data corruption (can't drag drop files using external zip tools) when data descriptor bit is turned on in a seekable file that is being updated. * Add unit test to verify data descriptor is off after updating a zip file that was created with an unseekable stream. --- .../System/IO/Compression/ZipArchiveEntry.cs | 6 ++- .../tests/ZipArchive/zip_CreateTests.cs | 48 +++++++++++++++++++ 2 files changed, 53 insertions(+), 1 deletion(-) diff --git a/src/System.IO.Compression/src/System/IO/Compression/ZipArchiveEntry.cs b/src/System.IO.Compression/src/System/IO/Compression/ZipArchiveEntry.cs index 202ede0a71f1..b7183a0f7b3f 100644 --- a/src/System.IO.Compression/src/System/IO/Compression/ZipArchiveEntry.cs +++ b/src/System.IO.Compression/src/System/IO/Compression/ZipArchiveEntry.cs @@ -823,6 +823,8 @@ private bool WriteLocalFileHeader(bool isEmptyFile) } else // if we are not in streaming mode, we have to decide if we want to write zip64 headers { + // We are in seekable mode so we will not need to write a data descriptor + _generalPurposeBitFlag &= ~BitFlagValues.DataDescriptor; if (SizesTooLarge() #if DEBUG_FORCE_ZIP64 || (_archive._forceZip64 && _archive.Mode == ZipArchiveMode.Update) @@ -1020,6 +1022,9 @@ private void WriteCrcAndSizesInLocalHeader(bool zip64HeaderUsed) private void WriteDataDescriptor() { + // We enter here because we cannot seek, so the data descriptor bit should be on + Debug.Assert((_generalPurposeBitFlag & BitFlagValues.DataDescriptor) != 0); + // data descriptor can be 32-bit or 64-bit sizes. 32-bit is more compatible, so use that if possible // signature is optional but recommended by the spec @@ -1231,7 +1236,6 @@ protected override void Dispose(bool disposing) // go back and finish writing if (_entry._archive.ArchiveStream.CanSeek) // finish writing local header if we have seek capabilities - _entry.WriteCrcAndSizesInLocalHeader(_usedZip64inLH); else // write out data descriptor if we don't have seek capabilities diff --git a/src/System.IO.Compression/tests/ZipArchive/zip_CreateTests.cs b/src/System.IO.Compression/tests/ZipArchive/zip_CreateTests.cs index 0dabcac565b4..dcfbe23f0c6f 100644 --- a/src/System.IO.Compression/tests/ZipArchive/zip_CreateTests.cs +++ b/src/System.IO.Compression/tests/ZipArchive/zip_CreateTests.cs @@ -149,10 +149,58 @@ public static void CreateUncompressedArchive() } } + [Fact] + public static void CreateNormal_VerifyDataDescriptor() + { + using var memoryStream = new MemoryStream(); + // We need an non-seekable stream so the data descriptor bit is turned on when saving + var wrappedStream = new WrappedStream(memoryStream, true, true, false, null); + + // Creation will go through the path that sets the data descriptor bit when the stream is unseekable + using (var archive = new ZipArchive(wrappedStream, ZipArchiveMode.Create)) + { + CreateEntry(archive, "A", "xxx"); + CreateEntry(archive, "B", "yyy"); + } + + AssertDataDescriptor(memoryStream, true); + + // Update should flip the data descriptor bit to zero on save + using (var archive = new ZipArchive(memoryStream, ZipArchiveMode.Update)) + { + ZipArchiveEntry entry = archive.Entries[0]; + using Stream entryStream = entry.Open(); + StreamReader reader = new StreamReader(entryStream); + string content = reader.ReadToEnd(); + + // Append a string to this entry + entryStream.Seek(0, SeekOrigin.End); + StreamWriter writer = new StreamWriter(entryStream); + writer.Write("zzz"); + writer.Flush(); + } + + AssertDataDescriptor(memoryStream, false); + } + private static string ReadStringFromSpan(Span input) { return Text.Encoding.UTF8.GetString(input.ToArray()); } + + private static void CreateEntry(ZipArchive archive, string fileName, string fileContents) + { + ZipArchiveEntry entry = archive.CreateEntry(fileName); + using StreamWriter writer = new StreamWriter(entry.Open()); + writer.Write(fileContents); + } + + private static void AssertDataDescriptor(MemoryStream memoryStream, bool hasDataDescriptor) + { + byte[] fileBytes = memoryStream.ToArray(); + Assert.Equal(hasDataDescriptor ? 8 : 0, fileBytes[6]); + Assert.Equal(0, fileBytes[7]); + } } } From d943b4d090dc8e88cbf02e6e24702543c59c49fb Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Tue, 14 May 2019 23:40:30 +0200 Subject: [PATCH 350/607] Update dependencies from https://github.com/dotnet/standard build 20190514.3 (#37657) - NETStandard.Library - 2.1.0-prerelease.19264.3 --- eng/Version.Details.xml | 4 ++-- eng/Versions.props | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 06f49c2da53e..155fecdd9dd5 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -38,9 +38,9 @@ https://github.com/dotnet/arcade a7a250e9c13147134543c35fef2fb81f19592edf - + https://github.com/dotnet/standard - 5f041c267883fe142b109a92bb48ce65653f7efa + 7053cdf764a6e08a356573bd447b44c85190de0e https://github.com/dotnet/arcade diff --git a/eng/Versions.props b/eng/Versions.props index 13c3825272b0..51d742cb9eb2 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -46,7 +46,7 @@ 3.0.0-preview6.19263.9 4.6.0-preview6.19263.9 - 2.1.0-prerelease.19264.2 + 2.1.0-prerelease.19264.3 99.99.99-master-20190510.1 From 30f4fbcb5bc16bdb3953d9186f20606a0f134f2d Mon Sep 17 00:00:00 2001 From: Eric StJohn Date: Tue, 14 May 2019 16:13:50 -0700 Subject: [PATCH 351/607] Don't reference netstandard.dll by wildcard (#37660) NetStandard.dll is built during the same phase as the other generated shims. We use a ProjectReference to correctly sequence it before other generated shims. Make sure that building a generated shim after building netstandard.csproj doesn't result in 2 netstandard.dll's being passed to the compiler. --- src/shims/generated/Directory.Build.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shims/generated/Directory.Build.props b/src/shims/generated/Directory.Build.props index c0fede342e90..33ac71219eb7 100644 --- a/src/shims/generated/Directory.Build.props +++ b/src/shims/generated/Directory.Build.props @@ -14,7 +14,7 @@ + Exclude="$(RefPath)$(MSBuildProjectName).dll;$(RefPath)netstandard.dll" /> Date: Wed, 15 May 2019 03:28:16 +0200 Subject: [PATCH 352/607] Harden PerfCounter tests (#37658) --- .../tests/Helpers.cs | 27 +++++-------------- 1 file changed, 6 insertions(+), 21 deletions(-) diff --git a/src/System.Diagnostics.PerformanceCounter/tests/Helpers.cs b/src/System.Diagnostics.PerformanceCounter/tests/Helpers.cs index 0a9cabd485db..110fce154501 100644 --- a/src/System.Diagnostics.PerformanceCounter/tests/Helpers.cs +++ b/src/System.Diagnostics.PerformanceCounter/tests/Helpers.cs @@ -50,29 +50,14 @@ public static void DeleteCategory(string name) public static T RetryOnAllPlatforms(Func func) { - T entry = default(T); - int retries = 20; - while (retries > 0) + // Harden the tests increasing the retry count and the timeout. + T result = default; + RetryHelper.Execute(() => { - try - { - entry = func(); - retries = -1; - } - catch (InvalidOperationException) - { - Thread.Sleep(100); - retries--; - } - catch (ArgumentException) - { - Thread.Sleep(100); - retries--; - } - } + result = func(); + }, maxAttempts: 10, (iteration) => iteration * 300); - Assert.NotEqual(0, retries); - return entry; + return result; } } } From 11b548176e6889866dee553ea84b92da3916e73b Mon Sep 17 00:00:00 2001 From: Layomi Akinrinade Date: Tue, 14 May 2019 18:29:56 -0700 Subject: [PATCH 353/607] Move colon debug assert to where it is needed (#37654) This addresses https://github.com/dotnet/corefx/pull/37159#discussion_r279108249. --- .../src/System/Text/Json/Writer/JsonWriterHelper.Date.cs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/System.Text.Json/src/System/Text/Json/Writer/JsonWriterHelper.Date.cs b/src/System.Text.Json/src/System/Text/Json/Writer/JsonWriterHelper.Date.cs index 6b6a53228309..535b8bb99ae2 100644 --- a/src/System.Text.Json/src/System/Text/Json/Writer/JsonWriterHelper.Date.cs +++ b/src/System.Text.Json/src/System/Text/Json/Writer/JsonWriterHelper.Date.cs @@ -29,11 +29,6 @@ public static void TrimDateTimeOffset(Span buffer, out int bytesWritten) buffer.Length == (JsonConstants.MaximumFormatDateTimeLength + 1) || buffer.Length == JsonConstants.MaximumFormatDateTimeOffsetLength); - if (buffer.Length == JsonConstants.MaximumFormatDateTimeOffsetLength) - { - Debug.Assert(buffer[30] == JsonConstants.Colon); - } - uint digit7 = buffer[26] - (uint)'0'; uint digit6 = buffer[25] - (uint)'0'; uint digit5 = buffer[24] - (uint)'0'; @@ -101,6 +96,8 @@ public static void TrimDateTimeOffset(Span buffer, out int bytesWritten) byte offsetHourDigit2 = buffer[29]; byte offsetHourDigit1 = buffer[28]; + Debug.Assert(buffer[30] == JsonConstants.Colon); + // Write offset characters buffer[bufferEnd] = buffer[32]; buffer[bufferEnd - 1] = offsetMinDigit1; From a28176b5ec68b6da1472934fe9493790d1665cae Mon Sep 17 00:00:00 2001 From: Gergely Kalapos Date: Tue, 14 May 2019 23:08:15 -0400 Subject: [PATCH 354/607] Fix System.Diagnostics.Process.[x]ProcessorTime on macOS (#37637) * Fix System.Diagnostics.Process xProcessorTime props and add test The ri_user_time unit is nanoseconds, but the TimeSpan .ctor expects values with a 100-nanosecond unit. * Update src/System.Diagnostics.Process/tests/ProcessTests.cs * Update src/System.Diagnostics.Process/tests/ProcessTests.cs * Update src/System.Diagnostics.Process/tests/ProcessTests.cs * Update src/System.Diagnostics.Process/tests/ProcessTests.cs * Add ActiveIssue to TotalProcessorTime_PerformLoop_TotalProcessorTimeValid * Address PR feedback * Fix typo - NanoSeconds -> Nanoseconds --- .../src/System/Diagnostics/Process.OSX.cs | 8 +++--- .../tests/ProcessTests.cs | 27 +++++++++++++++++++ 2 files changed, 32 insertions(+), 3 deletions(-) diff --git a/src/System.Diagnostics.Process/src/System/Diagnostics/Process.OSX.cs b/src/System.Diagnostics.Process/src/System/Diagnostics/Process.OSX.cs index cbcd07d69f41..7fa1ef40e52d 100644 --- a/src/System.Diagnostics.Process/src/System/Diagnostics/Process.OSX.cs +++ b/src/System.Diagnostics.Process/src/System/Diagnostics/Process.OSX.cs @@ -9,6 +9,8 @@ namespace System.Diagnostics { public partial class Process { + private const int NanoSecondsTo100NanosecondsFactor = 100; + /// Gets the amount of time the process has spent running code inside the operating system core. public TimeSpan PrivilegedProcessorTime { @@ -16,7 +18,7 @@ public TimeSpan PrivilegedProcessorTime { EnsureState(State.HaveNonExitedId); Interop.libproc.rusage_info_v3 info = Interop.libproc.proc_pid_rusage(_processId); - return new TimeSpan(Convert.ToInt64(info.ri_system_time)); + return new TimeSpan(Convert.ToInt64(info.ri_system_time / NanoSecondsTo100NanosecondsFactor)); } } @@ -76,7 +78,7 @@ public TimeSpan TotalProcessorTime { EnsureState(State.HaveNonExitedId); Interop.libproc.rusage_info_v3 info = Interop.libproc.proc_pid_rusage(_processId); - return new TimeSpan(Convert.ToInt64(info.ri_system_time + info.ri_user_time)); + return new TimeSpan(Convert.ToInt64((info.ri_system_time + info.ri_user_time) / NanoSecondsTo100NanosecondsFactor)); } } @@ -90,7 +92,7 @@ public TimeSpan UserProcessorTime { EnsureState(State.HaveNonExitedId); Interop.libproc.rusage_info_v3 info = Interop.libproc.proc_pid_rusage(_processId); - return new TimeSpan(Convert.ToInt64(info.ri_user_time)); + return new TimeSpan(Convert.ToInt64(info.ri_user_time / NanoSecondsTo100NanosecondsFactor)); } } diff --git a/src/System.Diagnostics.Process/tests/ProcessTests.cs b/src/System.Diagnostics.Process/tests/ProcessTests.cs index 8bd402108050..d0b018d93f49 100644 --- a/src/System.Diagnostics.Process/tests/ProcessTests.cs +++ b/src/System.Diagnostics.Process/tests/ProcessTests.cs @@ -754,6 +754,33 @@ public void TestProcessorTime() Assert.InRange(processorTimeAtHalfSpin, processorTimeBeforeSpin, Process.GetCurrentProcess().TotalProcessorTime.TotalSeconds); } + [Fact] + [ActiveIssue(31908, TargetFrameworkMonikers.Uap)] + public void TotalProcessorTime_PerformLoop_TotalProcessorTimeValid() + { + CreateDefaultProcess(); + + DateTime startTime = DateTime.UtcNow; + TimeSpan processorTimeBeforeSpin = Process.GetCurrentProcess().TotalProcessorTime; + + // Perform loop to occupy cpu, takes less than a second. + int i = int.MaxValue / 16; + while (i > 0) + { + i--; + } + + TimeSpan processorTimeAfterSpin = Process.GetCurrentProcess().TotalProcessorTime; + DateTime endTime = DateTime.UtcNow; + + double timeDiff = (endTime - startTime).TotalMilliseconds; + double cpuTimeDiff = (processorTimeAfterSpin - processorTimeBeforeSpin).TotalMilliseconds; + + double cpuUsage = cpuTimeDiff / (timeDiff * Environment.ProcessorCount); + + Assert.InRange(cpuUsage, 0, 1); + } + [Fact] public void UserProcessorTime_GetNotStarted_ThrowsInvalidOperationException() { From 271138bc0625ff82b1d1b5cb115a309130d8202e Mon Sep 17 00:00:00 2001 From: Jeremy Barton Date: Tue, 14 May 2019 22:54:46 -0700 Subject: [PATCH 355/607] Add ToXmlString and FromXmlString implementations to RSA and DSA. The ToXmlString implementations produce output identical to .NET Framework. The FromXmlString implementations are based on XDocument in Core, vs a custom parser in Framework. Additionally, the FromXmlString in Core can read values which (per the xmldsig spec) removed any leading zero-value bytes, whereas the Framework version can't. No ToXmlString or FromXmlString is being added for ECDsa or ECDiffieHellman, because these types have always thrown in .NET Framework. The equivalent functionality was provided by an overload on ECDsaCng (and ECDiffieHellmanCng) that took a format-type enum (with only one member defined in it). Since that's not portable, and telemetry has never seen a caller of that method, they are being left as PNSE. --- .../DSA/DSAFactory.cs | 7 + .../AlgorithmImplementations/DSA/DSAXml.cs | 914 ++++++++++- .../RSA/ImportExport.cs | 29 + .../RSA/RSAKeyFileTests.cs | 28 +- .../AlgorithmImplementations/RSA/RSAXml.cs | 1450 ++++++++++++++++- .../src/Resources/Strings.resx | 6 + ...em.Security.Cryptography.Algorithms.csproj | 1 + .../System/Security/Cryptography/DSA.Xml.cs | 126 +- .../System/Security/Cryptography/RSA.Xml.cs | 116 +- .../Security/Cryptography/XmlKeyHelper.cs | 319 ++++ ...urity.Cryptography.Algorithms.Tests.csproj | 6 +- 11 files changed, 2963 insertions(+), 39 deletions(-) create mode 100644 src/System.Security.Cryptography.Algorithms/src/System/Security/Cryptography/XmlKeyHelper.cs diff --git a/src/Common/tests/System/Security/Cryptography/AlgorithmImplementations/DSA/DSAFactory.cs b/src/Common/tests/System/Security/Cryptography/AlgorithmImplementations/DSA/DSAFactory.cs index 0fc4f613a96d..76bea19325a6 100644 --- a/src/Common/tests/System/Security/Cryptography/AlgorithmImplementations/DSA/DSAFactory.cs +++ b/src/Common/tests/System/Security/Cryptography/AlgorithmImplementations/DSA/DSAFactory.cs @@ -24,6 +24,13 @@ public static DSA Create(int keySize) return s_provider.Create(keySize); } + public static DSA Create(in DSAParameters dsaParameters) + { + DSA dsa = s_provider.Create(); + dsa.ImportParameters(dsaParameters); + return dsa; + } + /// /// If false, 186-2 is assumed which implies key size of 1024 or less and only SHA-1 /// If true, 186-3 includes support for keysizes >1024 and SHA-2 algorithms diff --git a/src/Common/tests/System/Security/Cryptography/AlgorithmImplementations/DSA/DSAXml.cs b/src/Common/tests/System/Security/Cryptography/AlgorithmImplementations/DSA/DSAXml.cs index 51bf0b00c42f..d65e14dd3ae0 100644 --- a/src/Common/tests/System/Security/Cryptography/AlgorithmImplementations/DSA/DSAXml.cs +++ b/src/Common/tests/System/Security/Cryptography/AlgorithmImplementations/DSA/DSAXml.cs @@ -2,20 +2,926 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System.Collections.Generic; +using System.Xml.Linq; using Xunit; namespace System.Security.Cryptography.Dsa.Tests { - public partial class DSAXml + public static class DSAXml { [Fact] - public static void TestPlatformNotSupportedException() + public static void TestRead512Parameters_Public() + { + DSAParameters expectedParameters = DSATestData.Dsa512Parameters; + expectedParameters.X = null; + + TestReadXml( + // Bonus trait of this XML: it shows that the namespaces of the elements are not considered + @" + + 1qi38cr3ppZNB2Y/xpHSL2q81Vw3rvWNIHRnQNgv4U4UY2NifZGSUULc3uOEvgoeBO1b9fRxSG9NmG1CoufflQ== + +rX2JdXV4WQwoe9jDr4ziXzCJPk= + CETEkOUu9Y4FkCxjbWTR1essYIKg1PO/0c4Hjoe0On73u+zhmk7+Km2cIp02AIPOqfch85sFuvlwUt78Z6WKKw== + wwDg5n2HfmztOf7qqsHywr1WjmoyRnIn4Stq5FqNlHhUGkgKyAA4qshjgn1uOYQGGiWQXBi9JJmoOWY8PKRWBQ== +", + expectedParameters); + } + + [Fact] + public static void TestRead512Parameters_Private() + { + TestReadXml( + // Bonus trait of this XML, it shows that the order doesn't matter in the elements, + // and unknown elements are ignored + @" + + wwDg5n2HfmztOf7qqsHywr1WjmoyRnIn4Stq5FqNlHhUGkgKyAA4qshjgn1uOYQGGiWQXBi9JJmoOWY8PKRWBQ== + +rX2JdXV4WQwoe9jDr4ziXzCJPk= + 30000 + Lj16hMhbZnheH2/nlpgrIrDLmLw= + CETEkOUu9Y4FkCxjbWTR1essYIKg1PO/0c4Hjoe0On73u+zhmk7+Km2cIp02AIPOqfch85sFuvlwUt78Z6WKKw== +

1qi38cr3ppZNB2Y/xpHSL2q81Vw3rvWNIHRnQNgv4U4UY2NifZGSUULc3uOEvgoeBO1b9fRxSG9NmG1CoufflQ==

+
", + DSATestData.Dsa512Parameters); + } + + [Fact] + public static void TestRead576Parameters_Public() + { + DSAParameters expectedParameters = DSATestData.Dsa576Parameters; + expectedParameters.X = null; + + TestReadXml( + // Bonus trait of this XML: it shows that the default namespaces of the elements is not considered, + // and is the first test to show that whitespace is not considered. + @" + +

+ 4hZzBr/9hrti9DJ7d4u/oHukIyPsVnsQa5VjiCvd1tfy7nNg8pmIjen0CmHHjQvY + + RC76nDIrhorTZ7OUHXK3ozLJVOsWKRMr +

+ zNzsz18LLI/iOOLwbyITfxf66xs= + + rxfUBhMCB54zA0p3oFjdtLgyrLEUt7jS065EUd/4XrjdddRHQhg2nUhbIgZQZAYE + SrTmQH/apaKeldSWTKVZ6BxvfPzahyZl + + + +gVpUm2/QztrwRLALfP4TUZAtdyfW1/tzYAOk4cTNjfv0MeT/RzPz+pLHZfDP+UTj7VaoW3WVPrFpASSJhbtfiROY6rXjlkXn + + +
", + expectedParameters); + } + + [Fact] + public static void TestRead576Parameters_Private() + { + TestReadXml( + // Bonus trait of this XML: it shows the root element name is not considered. + @" + +

+ 4hZzBr/9hrti9DJ7d4u/oHukIyPsVnsQa5VjiCvd1tfy7nNg8pmIjen0CmHHjQvY + + RC76nDIrhorTZ7OUHXK3ozLJVOsWKRMr +

+ zNzsz18LLI/iOOLwbyITfxf66xs= + + rxfUBhMCB54zA0p3oFjdtLgyrLEUt7jS065EUd/4XrjdddRHQhg2nUhbIgZQZAYE + SrTmQH/apaKeldSWTKVZ6BxvfPzahyZl + + + +gVpUm2/QztrwRLALfP4TUZAtdyfW1/tzYAOk4cTNjfv0MeT/RzPz+pLHZfDP+UTj7VaoW3WVPrFpASSJhbtfiROY6rXjlkXn + + + + +rDJpPhzXKtY+GgtugVfrvKZx09s= + +
", + DSATestData.Dsa576Parameters); + } + + [Fact] + public static void TestRead1024Parameters_Public() + { + DSAParameters expectedParameters = DSATestData.GetDSA1024Params(); + expectedParameters.X = null; + + TestReadXml( + // Bonus trait of this XML: very odd whitespace + @" + +

+ wW0mx01sFid5nAkYVI5VP+WMeIHaSEYpyvZDEfSyfP72vbDyEgaw/8SZmi/tU7Q7 + nuKRDGjaLENqgBj0k49kcjafVkfQBbzJbiJZDMFePNTqDRMvXaWvaqoIB7DMTvNA + SvVC9FRrN73WpH5kETCDfbm + Tl8hFY1 + 1 9 w 2 0 F N + S o S z E = +

+ 2DwOy3NVHi/jDVH89CNsZRiDrdc= + + a8NmtmNVVF4Jjx/pDlRptWfgn6edgX8rNntF3s1DAaWcgdaRH3aR03DhWsaSwEvB + GHLBcaf+ZU6WPX3aV1qemM4Cb7fTk0olhggTSo7F7WmirtyJQBtnrd5Cfxftrrct + evRdmrHVnhsT1O + 9F8dkMwJn3eNSwg4FuA2zwQn + i5w = + + + aQuzepFF4F1ue0fEV4mKrt1yUBydFuebGtdahyzwF6qQu/uQ8bO39cA8h+RuhyVm + VSb9NBV7JvWWofCZf1nz5l78YVpVLV51acX + / +xFk9WgKZEQ5xyX4SIaWgP+mmk1rt + 2I7ws7L3nTqZ7XX3uHHm6vJoDZbVdKX0 +wTus47S0TeE= + +
", + expectedParameters); + } + + [Fact] + public static void TestRead1024Parameters_Private() + { + TestReadXml( + // Bonus trait of this XML: very odd whitespace + @" + +

+ wW0mx01sFid5nAkYVI5VP+WMeIHaSEYpyvZDEfSyfP72vbDyEgaw/8SZmi/tU7Q7 + nuKRDGjaLENqgBj0k49kcjafVkfQBbzJbiJZDMFePNTqDRMvXaWvaqoIB7DMTvNA + SvVC9FRrN73WpH5kETCDfbm + Tl8hFY1 + 1 9 w 2 0 F N + S o S z E = +

+ 2DwOy3NVHi/jDVH89CNsZRiDrdc= + + a8NmtmNVVF4Jjx/pDlRptWfgn6edgX8rNntF3s1DAaWcgdaRH3aR03DhWsaSwEvB + GHLBcaf+ZU6WPX3aV1qemM4Cb7fTk0olhggTSo7F7WmirtyJQBtnrd5Cfxftrrct + evRdmrHVnhsT1O + 9F8dkMwJn3eNSwg4FuA2zwQn + i5w = + + + aQuzepFF4F1ue0fEV4mKrt1yUBydFuebGtdahyzwF6qQu/uQ8bO39cA8h+RuhyVm + VSb9NBV7JvWWofCZf1nz5l78YVpVLV51acX + / +xFk9WgKZEQ5xyX4SIaWgP+mmk1rt + 2I7ws7L3nTqZ7XX3uHHm6vJoDZbVdKX0 +wTus47S0TeE= + + + + +w C Z 4 A H d 5 5 S 4 2 B o I h +S 9 R / j 6 9 C v C + 0 = + + +
+", + DSATestData.GetDSA1024Params()); + } + + [ConditionalFact(typeof(DSAFactory), nameof(DSAFactory.SupportsFips186_3))] + public static void TestRead2048Parameters_Public() + { + DSAParameters expectedParameters = DSATestData.Dsa2048DeficientXParameters; + expectedParameters.X = null; + + TestReadXml( + // Bonus trait of this XML: Canonical element order, pretty-printed. + // Includes the XML declaration. + @" + +

+ lNPks58XJz6PJ7MmkvfDTTVhi9J5VItHNpOcK6TnKRFsrqxgAelXBcJ9fPDDCLyn + ArtHEtS7RIoQeLYxFQ6rRVyRZ4phxRwtNx4Cu6xw6cLG2nV7V4IOyP0JbhBew2wH + ik/X3Yck0nXTAH+U8S/5YWcpPGZ7RncH8dyafAs0vE/EdbFdUSQKeJpTpWtk1pwe + ArfKOtNBs7b2yYbx4GW/5oDYfe5tlZHY445Xw3rCmDsnlL6v/ix7W2ykm5gSSHMy + XGHeb4IEEQGL6XI/4r2oMywTCIqjKghtFNbwAgEBP1FnhkPzKswAUl2yLwAg2S+c + L0CIuNNaHnZNzYtwwLPS6w== +

+ 23CgOhWOnMudk9v3Z5bL68pFqHA+gqRYAViO5LaYWrM= + + PPDxRLcKu9RCYNksTgMq3wpZjmgyPiVK/4cQyejqm+GdDSr5OaoN7HbSB7bqzveC + TjZldTVjAcpfmF74/3r1UYuN8IhaasVw/i5cWVYXDnHydAGUAYyKCkp7D5z5av1+ + JQJvqAuflya2xN/LxBBeuYaHyml/eXlAwTNbFEMR1H/yHk1cQ8AFhHhrwarkrYWK + wGM1HuRCNHC+URVShpTvzzEtnljU3dHAHig4M/TxSeX5vUVJMEQxthvg2tcXtTjF + zVL94ajmYZPonQnB4Hlo5vcH71YU6D5hEm9qXzk54HZzdFRL4yJcxPjzxQHVolJv + e7ZNZWp7vf5+cssW1x6KOA== + + + cHLO4Kgw8hUDAviwzw8HFHtsaxMs5k309uE7nofw8txeBXRBGbaVgJU1GndCqeRc + cuI+6L8AmMgv0tB4fyGXRwv7DLwhRirTiT3vfBoN80/VKVf/AcafdsVkwmjrzUPe + w3bfU4qIdK807QB7TkbQZgBoE3kxqlmjLodbKUKdtVY13rbcjL+GfUSUytXt7n5/ + IF7o6LLIoFK0Uo9HySsfjP7J7QU8IeOnMb/yaa0JnEE9X8h4U1EWXnmqehQ6DH5V + Ye8DvOPPDe2c7YMWgC+Z3a0DLejBknDzuvWoJgiIkX/Nc+Sx1W+tFWPHHbyS9nJW + kt3Wo5FBhE0R/aIwt75rrA== + +
", + expectedParameters); + } + + [ConditionalFact(typeof(DSAFactory), nameof(DSAFactory.SupportsFips186_3))] + public static void TestRead2048Parameters_Private_CryptoBinary() + { + TestReadXml( + // Bonus trait of this XML: The X parameter is encoded as a CryptoBinary, + // meaning the leading 0x00 byte is removed. + @" + +

+ lNPks58XJz6PJ7MmkvfDTTVhi9J5VItHNpOcK6TnKRFsrqxgAelXBcJ9fPDDCLyn + ArtHEtS7RIoQeLYxFQ6rRVyRZ4phxRwtNx4Cu6xw6cLG2nV7V4IOyP0JbhBew2wH + ik/X3Yck0nXTAH+U8S/5YWcpPGZ7RncH8dyafAs0vE/EdbFdUSQKeJpTpWtk1pwe + ArfKOtNBs7b2yYbx4GW/5oDYfe5tlZHY445Xw3rCmDsnlL6v/ix7W2ykm5gSSHMy + XGHeb4IEEQGL6XI/4r2oMywTCIqjKghtFNbwAgEBP1FnhkPzKswAUl2yLwAg2S+c + L0CIuNNaHnZNzYtwwLPS6w== +

+ 23CgOhWOnMudk9v3Z5bL68pFqHA+gqRYAViO5LaYWrM= + + PPDxRLcKu9RCYNksTgMq3wpZjmgyPiVK/4cQyejqm+GdDSr5OaoN7HbSB7bqzveC + TjZldTVjAcpfmF74/3r1UYuN8IhaasVw/i5cWVYXDnHydAGUAYyKCkp7D5z5av1+ + JQJvqAuflya2xN/LxBBeuYaHyml/eXlAwTNbFEMR1H/yHk1cQ8AFhHhrwarkrYWK + wGM1HuRCNHC+URVShpTvzzEtnljU3dHAHig4M/TxSeX5vUVJMEQxthvg2tcXtTjF + zVL94ajmYZPonQnB4Hlo5vcH71YU6D5hEm9qXzk54HZzdFRL4yJcxPjzxQHVolJv + e7ZNZWp7vf5+cssW1x6KOA== + + + cHLO4Kgw8hUDAviwzw8HFHtsaxMs5k309uE7nofw8txeBXRBGbaVgJU1GndCqeRc + cuI+6L8AmMgv0tB4fyGXRwv7DLwhRirTiT3vfBoN80/VKVf/AcafdsVkwmjrzUPe + w3bfU4qIdK807QB7TkbQZgBoE3kxqlmjLodbKUKdtVY13rbcjL+GfUSUytXt7n5/ + IF7o6LLIoFK0Uo9HySsfjP7J7QU8IeOnMb/yaa0JnEE9X8h4U1EWXnmqehQ6DH5V + Ye8DvOPPDe2c7YMWgC+Z3a0DLejBknDzuvWoJgiIkX/Nc+Sx1W+tFWPHHbyS9nJW + kt3Wo5FBhE0R/aIwt75rrA== + + yHG344loXbl9k03XAR+rB2/yfsQoL7AMDWRtKdXk5Q== +
", + DSATestData.Dsa2048DeficientXParameters); + } + + [ConditionalFact(typeof(DSAFactory), nameof(DSAFactory.SupportsFips186_3))] + public static void TestRead2048Parameters_Private_Base64Binary() + { + TestReadXml( + // Bonus trait of this XML: The X parameter is encoded as a Base64Binary, + // meaning the leading 0x00 byte is NOT removed. + @" + +

+ lNPks58XJz6PJ7MmkvfDTTVhi9J5VItHNpOcK6TnKRFsrqxgAelXBcJ9fPDDCLyn + ArtHEtS7RIoQeLYxFQ6rRVyRZ4phxRwtNx4Cu6xw6cLG2nV7V4IOyP0JbhBew2wH + ik/X3Yck0nXTAH+U8S/5YWcpPGZ7RncH8dyafAs0vE/EdbFdUSQKeJpTpWtk1pwe + ArfKOtNBs7b2yYbx4GW/5oDYfe5tlZHY445Xw3rCmDsnlL6v/ix7W2ykm5gSSHMy + XGHeb4IEEQGL6XI/4r2oMywTCIqjKghtFNbwAgEBP1FnhkPzKswAUl2yLwAg2S+c + L0CIuNNaHnZNzYtwwLPS6w== +

+ 23CgOhWOnMudk9v3Z5bL68pFqHA+gqRYAViO5LaYWrM= + + PPDxRLcKu9RCYNksTgMq3wpZjmgyPiVK/4cQyejqm+GdDSr5OaoN7HbSB7bqzveC + TjZldTVjAcpfmF74/3r1UYuN8IhaasVw/i5cWVYXDnHydAGUAYyKCkp7D5z5av1+ + JQJvqAuflya2xN/LxBBeuYaHyml/eXlAwTNbFEMR1H/yHk1cQ8AFhHhrwarkrYWK + wGM1HuRCNHC+URVShpTvzzEtnljU3dHAHig4M/TxSeX5vUVJMEQxthvg2tcXtTjF + zVL94ajmYZPonQnB4Hlo5vcH71YU6D5hEm9qXzk54HZzdFRL4yJcxPjzxQHVolJv + e7ZNZWp7vf5+cssW1x6KOA== + + + cHLO4Kgw8hUDAviwzw8HFHtsaxMs5k309uE7nofw8txeBXRBGbaVgJU1GndCqeRc + cuI+6L8AmMgv0tB4fyGXRwv7DLwhRirTiT3vfBoN80/VKVf/AcafdsVkwmjrzUPe + w3bfU4qIdK807QB7TkbQZgBoE3kxqlmjLodbKUKdtVY13rbcjL+GfUSUytXt7n5/ + IF7o6LLIoFK0Uo9HySsfjP7J7QU8IeOnMb/yaa0JnEE9X8h4U1EWXnmqehQ6DH5V + Ye8DvOPPDe2c7YMWgC+Z3a0DLejBknDzuvWoJgiIkX/Nc+Sx1W+tFWPHHbyS9nJW + kt3Wo5FBhE0R/aIwt75rrA== + + AMhxt+OJaF25fZNN1wEfqwdv8n7EKC+wDA1kbSnV5OU= +
", + DSATestData.Dsa2048DeficientXParameters); + } + + [Theory] + [InlineData(true)] + [InlineData(false)] + public static void TestWrite512Parameters(bool includePrivateParameters) + { + TestWriteXml( + DSATestData.Dsa512Parameters, + includePrivateParameters, + ( + "1qi38cr3ppZNB2Y/xpHSL2q81Vw3rvWNIHRnQNgv4U4UY2NifZGSUULc3uOEvgoe" + + "BO1b9fRxSG9NmG1CoufflQ==" + ), + "+rX2JdXV4WQwoe9jDr4ziXzCJPk=", + ( + "CETEkOUu9Y4FkCxjbWTR1essYIKg1PO/0c4Hjoe0On73u+zhmk7+Km2cIp02AIPO" + + "qfch85sFuvlwUt78Z6WKKw==" + ), + ( + "wwDg5n2HfmztOf7qqsHywr1WjmoyRnIn4Stq5FqNlHhUGkgKyAA4qshjgn1uOYQG" + + "GiWQXBi9JJmoOWY8PKRWBQ==" + ), + "Lj16hMhbZnheH2/nlpgrIrDLmLw="); + } + + [Theory] + [InlineData(true)] + [InlineData(false)] + public static void TestWrite576Parameters(bool includePrivateParameters) + { + TestWriteXml( + DSATestData.Dsa576Parameters, + includePrivateParameters, + ( + "4hZzBr/9hrti9DJ7d4u/oHukIyPsVnsQa5VjiCvd1tfy7nNg8pmIjen0CmHHjQvY" + + "RC76nDIrhorTZ7OUHXK3ozLJVOsWKRMr" + ), + "zNzsz18LLI/iOOLwbyITfxf66xs=", + ( + "rxfUBhMCB54zA0p3oFjdtLgyrLEUt7jS065EUd/4XrjdddRHQhg2nUhbIgZQZAYE" + + "SrTmQH/apaKeldSWTKVZ6BxvfPzahyZl" + ), + ( + "gVpUm2/QztrwRLALfP4TUZAtdyfW1/tzYAOk4cTNjfv0MeT/RzPz+pLHZfDP+UTj" + + "7VaoW3WVPrFpASSJhbtfiROY6rXjlkXn" + ), + "rDJpPhzXKtY+GgtugVfrvKZx09s="); + } + + [Theory] + [InlineData(true)] + [InlineData(false)] + public static void TestWrite1024Parameters(bool includePrivateParameters) + { + TestWriteXml( + DSATestData.GetDSA1024Params(), + includePrivateParameters, + ( + "wW0mx01sFid5nAkYVI5VP+WMeIHaSEYpyvZDEfSyfP72vbDyEgaw/8SZmi/tU7Q7" + + "nuKRDGjaLENqgBj0k49kcjafVkfQBbzJbiJZDMFePNTqDRMvXaWvaqoIB7DMTvNA" + + "SvVC9FRrN73WpH5kETCDfbmTl8hFY119w20FN+SoSzE=" + ), + "2DwOy3NVHi/jDVH89CNsZRiDrdc=", + ( + "a8NmtmNVVF4Jjx/pDlRptWfgn6edgX8rNntF3s1DAaWcgdaRH3aR03DhWsaSwEvB" + + "GHLBcaf+ZU6WPX3aV1qemM4Cb7fTk0olhggTSo7F7WmirtyJQBtnrd5Cfxftrrct" + + "evRdmrHVnhsT1O+9F8dkMwJn3eNSwg4FuA2zwQn+i5w=" + ), + ( + "aQuzepFF4F1ue0fEV4mKrt1yUBydFuebGtdahyzwF6qQu/uQ8bO39cA8h+RuhyVm" + + "VSb9NBV7JvWWofCZf1nz5l78YVpVLV51acX/xFk9WgKZEQ5xyX4SIaWgP+mmk1rt" + + "2I7ws7L3nTqZ7XX3uHHm6vJoDZbVdKX0wTus47S0TeE=" + ), + "wCZ4AHd55S42BoIhS9R/j69CvC0="); + } + + [ConditionalTheory(typeof(DSAFactory), nameof(DSAFactory.SupportsFips186_3))] + [InlineData(true)] + [InlineData(false)] + public static void TestWriteDeficientXParameters(bool includePrivateParameters) + { + TestWriteXml( + DSATestData.Dsa2048DeficientXParameters, + includePrivateParameters, + ( + "lNPks58XJz6PJ7MmkvfDTTVhi9J5VItHNpOcK6TnKRFsrqxgAelXBcJ9fPDDCLyn" + + "ArtHEtS7RIoQeLYxFQ6rRVyRZ4phxRwtNx4Cu6xw6cLG2nV7V4IOyP0JbhBew2wH" + + "ik/X3Yck0nXTAH+U8S/5YWcpPGZ7RncH8dyafAs0vE/EdbFdUSQKeJpTpWtk1pwe" + + "ArfKOtNBs7b2yYbx4GW/5oDYfe5tlZHY445Xw3rCmDsnlL6v/ix7W2ykm5gSSHMy" + + "XGHeb4IEEQGL6XI/4r2oMywTCIqjKghtFNbwAgEBP1FnhkPzKswAUl2yLwAg2S+c" + + "L0CIuNNaHnZNzYtwwLPS6w==" + ), + "23CgOhWOnMudk9v3Z5bL68pFqHA+gqRYAViO5LaYWrM=", + ( + "PPDxRLcKu9RCYNksTgMq3wpZjmgyPiVK/4cQyejqm+GdDSr5OaoN7HbSB7bqzveC" + + "TjZldTVjAcpfmF74/3r1UYuN8IhaasVw/i5cWVYXDnHydAGUAYyKCkp7D5z5av1+" + + "JQJvqAuflya2xN/LxBBeuYaHyml/eXlAwTNbFEMR1H/yHk1cQ8AFhHhrwarkrYWK" + + "wGM1HuRCNHC+URVShpTvzzEtnljU3dHAHig4M/TxSeX5vUVJMEQxthvg2tcXtTjF" + + "zVL94ajmYZPonQnB4Hlo5vcH71YU6D5hEm9qXzk54HZzdFRL4yJcxPjzxQHVolJv" + + "e7ZNZWp7vf5+cssW1x6KOA==" + ), + ( + "cHLO4Kgw8hUDAviwzw8HFHtsaxMs5k309uE7nofw8txeBXRBGbaVgJU1GndCqeRc" + + "cuI+6L8AmMgv0tB4fyGXRwv7DLwhRirTiT3vfBoN80/VKVf/AcafdsVkwmjrzUPe" + + "w3bfU4qIdK807QB7TkbQZgBoE3kxqlmjLodbKUKdtVY13rbcjL+GfUSUytXt7n5/" + + "IF7o6LLIoFK0Uo9HySsfjP7J7QU8IeOnMb/yaa0JnEE9X8h4U1EWXnmqehQ6DH5V" + + "Ye8DvOPPDe2c7YMWgC+Z3a0DLejBknDzuvWoJgiIkX/Nc+Sx1W+tFWPHHbyS9nJW" + + "kt3Wo5FBhE0R/aIwt75rrA==" + ), + // The rules from xmldsig say that these types are ds:CryptoBinary, which + // means they should leave off any leading 0x00 bytes. + // + // .NET Framework just treated it like base64Binary, though, and happily + // writes the unwanted zeroes. + "AMhxt+OJaF25fZNN1wEfqwdv8n7EKC+wDA1kbSnV5OU="); + } + + [ConditionalFact(typeof(DSAFactory), nameof(DSAFactory.SupportsKeyGeneration))] + [OuterLoop("DSA key generation is very slow")] + public static void FromToXml() + { + using (DSA dsa = DSAFactory.Create()) + { + DSAParameters pubOnly = dsa.ExportParameters(false); + DSAParameters pubPriv = dsa.ExportParameters(true); + + string xmlPub = dsa.ToXmlString(false); + string xmlPriv = dsa.ToXmlString(true); + + using (DSA dsaPub = DSAFactory.Create()) + { + dsaPub.FromXmlString(xmlPub); + + DSAImportExport.AssertKeyEquals(pubOnly, dsaPub.ExportParameters(false)); + } + + using (DSA dsaPriv = DSAFactory.Create()) + { + dsaPriv.FromXmlString(xmlPriv); + + DSAImportExport.AssertKeyEquals(pubPriv, dsaPriv.ExportParameters(true)); + DSAImportExport.AssertKeyEquals(pubOnly, dsaPriv.ExportParameters(false)); + } + } + } + + [Fact] + public static void FromNullXml() + { + using (DSA dsa = DSAFactory.Create()) + { + AssertExtensions.Throws( + "xmlString", + () => dsa.FromXmlString(null)); + } + } + + [Fact] + public static void FromInvalidXml() + { + using (DSA dsa = DSAFactory.Create()) + { + // This is the DSA-512 test case, with an unfinished closing element. + Assert.Throws( + () => dsa.FromXmlString( + @" + + 1qi38cr3ppZNB2Y/xpHSL2q81Vw3rvWNIHRnQNgv4U4UY2NifZGSUULc3uOEvgoeBO1b9fRxSG9NmG1CoufflQ== + +rX2JdXV4WQwoe9jDr4ziXzCJPk= + CETEkOUu9Y4FkCxjbWTR1essYIKg1PO/0c4Hjoe0On73u+zhmk7+Km2cIp02AIPOqfch85sFuvlwUt78Z6WKKw== + wwDg5n2HfmztOf7qqsHywr1WjmoyRnIn4Stq5FqNlHhUGkgKyAA4qshjgn1uOYQGGiWQXBi9JJmoOWY8PKRWBQ== + + 1qi38cr3ppZNB2Y/xpHSL2q81Vw3rvWNIHRnQNgv4U4UY2NifZGSUULc3uOEvgoeBO1b9fRxSG9NmG1CoufflQ== + +rX2JdXV4WQwoe9jDr4ziXzCJPk= + + a8NmtmNVVF4Jjx/pDlRptWfgn6edgX8rNntF3s1DAaWcgdaRH3aR03DhWsaSwEvB + GHLBcaf+ZU6WPX3aV1qemM4Cb7fTk0olhggTSo7F7WmirtyJQBtnrd5Cfxftrrct + evRdmrHVnhsT1O + 9F8dkMwJn3eNSwg4FuA2zwQn + i5w = + + wwDg5n2HfmztOf7qqsHywr1WjmoyRnIn4Stq5FqNlHhUGkgKyAA4qshjgn1uOYQGGiWQXBi9JJmoOWY8PKRWBQ== +"); + } + catch (ArgumentException) + { + // DSACng, DSAOpenSsl + } + catch (CryptographicException) + { + // DSACryptoServiceProvider + } + } + } + + [Fact] + public static void FromXml_MissingP() + { + using (DSA dsa = DSAFactory.Create()) + { + // This is the DSA-576 test case, but with an element missing. + Assert.Throws( + () => dsa.FromXmlString( + @" + + wwDg5n2HfmztOf7qqsHywr1WjmoyRnIn4Stq5FqNlHhUGkgKyAA4qshjgn1uOYQGGiWQXBi9JJmoOWY8PKRWBQ== + +rX2JdXV4WQwoe9jDr4ziXzCJPk= + 30000 + Lj16hMhbZnheH2/nlpgrIrDLmLw= + CETEkOUu9Y4FkCxjbWTR1essYIKg1PO/0c4Hjoe0On73u+zhmk7+Km2cIp02AIPOqfch85sFuvlwUt78Z6WKKw== +")); + } + } + + [Fact] + public static void FromXml_MissingQ() + { + using (DSA dsa = DSAFactory.Create()) + { + // This is the DSA-576 test case, but with an element missing. + Assert.Throws( + () => dsa.FromXmlString( + @" + + wwDg5n2HfmztOf7qqsHywr1WjmoyRnIn4Stq5FqNlHhUGkgKyAA4qshjgn1uOYQGGiWQXBi9JJmoOWY8PKRWBQ== + 30000 + Lj16hMhbZnheH2/nlpgrIrDLmLw= + CETEkOUu9Y4FkCxjbWTR1essYIKg1PO/0c4Hjoe0On73u+zhmk7+Km2cIp02AIPOqfch85sFuvlwUt78Z6WKKw== +

1qi38cr3ppZNB2Y/xpHSL2q81Vw3rvWNIHRnQNgv4U4UY2NifZGSUULc3uOEvgoeBO1b9fRxSG9NmG1CoufflQ==

+
")); + } + } + + [Fact] + public static void FromXml_MissingG() { using (DSA dsa = DSAFactory.Create()) { - Assert.Throws(() => dsa.FromXmlString(null)); - Assert.Throws(() => dsa.ToXmlString(true)); + // This is the DSA-576 test case, but with an element missing. + Assert.Throws( + () => dsa.FromXmlString( + @" + + wwDg5n2HfmztOf7qqsHywr1WjmoyRnIn4Stq5FqNlHhUGkgKyAA4qshjgn1uOYQGGiWQXBi9JJmoOWY8PKRWBQ== + +rX2JdXV4WQwoe9jDr4ziXzCJPk= + 30000 + Lj16hMhbZnheH2/nlpgrIrDLmLw= +

1qi38cr3ppZNB2Y/xpHSL2q81Vw3rvWNIHRnQNgv4U4UY2NifZGSUULc3uOEvgoeBO1b9fRxSG9NmG1CoufflQ==

+
")); } } + + [Fact] + public static void FromXml_MissingY() + { + using (DSA dsa = DSAFactory.Create()) + { + // This is the DSA-576 test case, but with an element missing. + Assert.Throws( + () => dsa.FromXmlString( + @" + + +rX2JdXV4WQwoe9jDr4ziXzCJPk= + 30000 + Lj16hMhbZnheH2/nlpgrIrDLmLw= + CETEkOUu9Y4FkCxjbWTR1essYIKg1PO/0c4Hjoe0On73u+zhmk7+Km2cIp02AIPOqfch85sFuvlwUt78Z6WKKw== +

1qi38cr3ppZNB2Y/xpHSL2q81Vw3rvWNIHRnQNgv4U4UY2NifZGSUULc3uOEvgoeBO1b9fRxSG9NmG1CoufflQ==

+
")); + } + } + + [Fact] + public static void FromXmlWithSeedAndCounterAndJ() + { + // This key comes from FIPS-186-2, Appendix 5, Example of the DSA. + // The version in DSATestData does not have the seed or counter supplied. + + using (DSA dsa = DSAFactory.Create()) + { + dsa.FromXmlString(@" + +

+ jfKklEkidqo9JXWbsGhpy+rA2Dr7jQz3y7gyTw14guXQdi/FtyEOr8Lprawyq3qs + SWk9+/g3JMLsBzbuMcgCkQ== +

+ x3MhjHN+yO6ZO08t7TD0jtrOkV8= + + Ym0CeDnqChNBMWOlW0y1ACmdVSKVbO/LO/8Q85nOLC5xy53l+iS6v1jlt5Uhklyc + xC6fb0ZLCIzFcq9T5teIAg== + + + GRMYcddbFhKoGfKdeNGw1zRveqd7tiqFm/1sVnXanSEtOjbvFnLvZguMfCVcwOx0 + hY+6M/RMBmmWMKdrAw7jMw== + + AgRO2deYCHK5/u5+ElWfz2J6fdI2PN/mnjBxceE11r5zt7x/DVqcoWAp2+dr + 1QFOS2DvK6i2IRtAYroyJOBCfdM= + aQ== + IHCzIj26Ny/eHA/8ey47SYsmBhQ= +
"); + + DSATestData.GetDSA1024_186_2(out DSAParameters expected, out _, out _); + DSAImportExport.AssertKeyEquals(expected, dsa.ExportParameters(true)); + } + } + + [Fact] + public static void FromXmlWrongJ_OK() + { + // No one really reads the J value on import, but xmldsig defined it, + // so we read it. + + // This key comes from FIPS-186-2, Appendix 5, Example of the DSA. + // The version in DSATestData does not have the seed or counter supplied. + + using (DSA dsa = DSAFactory.Create()) + { + dsa.FromXmlString(@" + +

+ jfKklEkidqo9JXWbsGhpy+rA2Dr7jQz3y7gyTw14guXQdi/FtyEOr8Lprawyq3qs + SWk9+/g3JMLsBzbuMcgCkQ== +

+ x3MhjHN+yO6ZO08t7TD0jtrOkV8= + + Ym0CeDnqChNBMWOlW0y1ACmdVSKVbO/LO/8Q85nOLC5xy53l+iS6v1jlt5Uhklyc + xC6fb0ZLCIzFcq9T5teIAg== + + + GRMYcddbFhKoGfKdeNGw1zRveqd7tiqFm/1sVnXanSEtOjbvFnLvZguMfCVcwOx0 + hY+6M/RMBmmWMKdrAw7jMw== + + AgRO2deYCHK5/u5+ElWfz2J6fdI2PN/mnjBxceE11r5zt7x/DVqcoWAp2+dR + 1QFOS2DvK6i2IRtAYroyJOBCfdM= + aQ== + IHCzIj26Ny/eHA/8ey47SYsmBhQ= +
"); + + DSATestData.GetDSA1024_186_2(out DSAParameters expected, out _, out _); + DSAImportExport.AssertKeyEquals(expected, dsa.ExportParameters(true)); + } + } + + [Fact] + public static void FromXmlInvalidJ_Fails() + { + // No one really reads the J value on import, but xmldsig defined it, + // so we read it and pass it to ImportParameters. + // That means it has to be legal base64. + + // This key comes from FIPS-186-2, Appendix 5, Example of the DSA. + // The version in DSATestData does not have the seed or counter supplied. + + using (DSA dsa = DSAFactory.Create()) + { + Assert.Throws( + () => dsa.FromXmlString(@" + +

+ jfKklEkidqo9JXWbsGhpy+rA2Dr7jQz3y7gyTw14guXQdi/FtyEOr8Lprawyq3qs + SWk9+/g3JMLsBzbuMcgCkQ== +

+ x3MhjHN+yO6ZO08t7TD0jtrOkV8= + + Ym0CeDnqChNBMWOlW0y1ACmdVSKVbO/LO/8Q85nOLC5xy53l+iS6v1jlt5Uhklyc + xC6fb0ZLCIzFcq9T5teIAg== + + + GRMYcddbFhKoGfKdeNGw1zRveqd7tiqFm/1sVnXanSEtOjbvFnLvZguMfCVcwOx0 + hY+6M/RMBmmWMKdrAw7jMw== + + AgRO2deYCHK5/u5+ElWfz2J6fdI2PN/mnjBxceE11r5zt7x/DVqcoWAp2+d + 1QFOS2DvK6i2IRtAYroyJOBCfdM= + aQ== + IHCzIj26Ny/eHA/8ey47SYsmBhQ= +
")); + } + } + + [Fact] + public static void FromXmlWrongCounter_SometimesOK() + { + // DSACryptoServiceProvider doesn't check this error state, DSACng does. + // + // So, either the import gets rejected (because the counter value should be 105, + // but says 106) and throws a CryptographicException derivitive, or it succeeds, + // and exports the correct key material. + + // This key comes from FIPS-186-2, Appendix 5, Example of the DSA. + // The version in DSATestData does not have the seed or counter supplied. + + using (DSA dsa = DSAFactory.Create()) + { + bool checkKey = true; + + try + { + dsa.FromXmlString(@" + +

+ jfKklEkidqo9JXWbsGhpy+rA2Dr7jQz3y7gyTw14guXQdi/FtyEOr8Lprawyq3qs + SWk9+/g3JMLsBzbuMcgCkQ== +

+ x3MhjHN+yO6ZO08t7TD0jtrOkV8= + + Ym0CeDnqChNBMWOlW0y1ACmdVSKVbO/LO/8Q85nOLC5xy53l+iS6v1jlt5Uhklyc + xC6fb0ZLCIzFcq9T5teIAg== + + + GRMYcddbFhKoGfKdeNGw1zRveqd7tiqFm/1sVnXanSEtOjbvFnLvZguMfCVcwOx0 + hY+6M/RMBmmWMKdrAw7jMw== + + AgRO2deYCHK5/u5+ElWfz2J6fdI2PN/mnjBxceE11r5zt7x/DVqcoWAp2+dr + 1QFOS2DvK6i2IRtAYroyJOBCfdM= + ag== + IHCzIj26Ny/eHA/8ey47SYsmBhQ= +
"); + } + catch (CryptographicException) + { + checkKey = false; + } + + if (checkKey) + { + DSATestData.GetDSA1024_186_2(out DSAParameters expected, out _, out _); + DSAImportExport.AssertKeyEquals(expected, dsa.ExportParameters(true)); + } + } + } + + [Fact] + public static void FromXml_CounterOverflow_Succeeds() + { + // The counter value should be 105 (0x69). + // This payload says 0x01_00000069 (4294967401). + // Since we only end up looking at the last 4 bytes, this is /a/ right answer. + + // This key comes from FIPS-186-2, Appendix 5, Example of the DSA. + // The version in DSATestData does not have the seed or counter supplied. + + using (DSA dsa = DSAFactory.Create()) + { + dsa.FromXmlString(@" + +

+ jfKklEkidqo9JXWbsGhpy+rA2Dr7jQz3y7gyTw14guXQdi/FtyEOr8Lprawyq3qs + SWk9+/g3JMLsBzbuMcgCkQ== +

+ x3MhjHN+yO6ZO08t7TD0jtrOkV8= + + Ym0CeDnqChNBMWOlW0y1ACmdVSKVbO/LO/8Q85nOLC5xy53l+iS6v1jlt5Uhklyc + xC6fb0ZLCIzFcq9T5teIAg== + + + GRMYcddbFhKoGfKdeNGw1zRveqd7tiqFm/1sVnXanSEtOjbvFnLvZguMfCVcwOx0 + hY+6M/RMBmmWMKdrAw7jMw== + + AgRO2deYCHK5/u5+ElWfz2J6fdI2PN/mnjBxceE11r5zt7x/DVqcoWAp2+dr + 1QFOS2DvK6i2IRtAYroyJOBCfdM= + AQAAAGk= + IHCzIj26Ny/eHA/8ey47SYsmBhQ= +
"); + + DSATestData.GetDSA1024_186_2(out DSAParameters expected, out _, out _); + DSAImportExport.AssertKeyEquals(expected, dsa.ExportParameters(true)); + } + } + + [Fact] + public static void FromXmlSeedWithoutCounter() + { + // This key comes from FIPS-186-2, Appendix 5, Example of the DSA. + // The version in DSATestData does not have the seed or counter supplied. + + using (DSA dsa = DSAFactory.Create()) + { + Assert.Throws( + () => dsa.FromXmlString(@" + +

+ jfKklEkidqo9JXWbsGhpy+rA2Dr7jQz3y7gyTw14guXQdi/FtyEOr8Lprawyq3qs + SWk9+/g3JMLsBzbuMcgCkQ== +

+ x3MhjHN+yO6ZO08t7TD0jtrOkV8= + + Ym0CeDnqChNBMWOlW0y1ACmdVSKVbO/LO/8Q85nOLC5xy53l+iS6v1jlt5Uhklyc + xC6fb0ZLCIzFcq9T5teIAg== + + + GRMYcddbFhKoGfKdeNGw1zRveqd7tiqFm/1sVnXanSEtOjbvFnLvZguMfCVcwOx0 + hY+6M/RMBmmWMKdrAw7jMw== + + AgRO2deYCHK5/u5+ElWfz2J6fdI2PN/mnjBxceE11r5zt7x/DVqcoWAp2+dr + 1QFOS2DvK6i2IRtAYroyJOBCfdM= + IHCzIj26Ny/eHA/8ey47SYsmBhQ= +
")); + } + } + + [Fact] + public static void FromXmlCounterWithoutSeed() + { + // This key comes from FIPS-186-2, Appendix 5, Example of the DSA. + // The version in DSATestData does not have the seed or counter supplied. + + using (DSA dsa = DSAFactory.Create()) + { + Assert.Throws( + () => dsa.FromXmlString(@" + +

+ jfKklEkidqo9JXWbsGhpy+rA2Dr7jQz3y7gyTw14guXQdi/FtyEOr8Lprawyq3qs + SWk9+/g3JMLsBzbuMcgCkQ== +

+ x3MhjHN+yO6ZO08t7TD0jtrOkV8= + + Ym0CeDnqChNBMWOlW0y1ACmdVSKVbO/LO/8Q85nOLC5xy53l+iS6v1jlt5Uhklyc + xC6fb0ZLCIzFcq9T5teIAg== + + + GRMYcddbFhKoGfKdeNGw1zRveqd7tiqFm/1sVnXanSEtOjbvFnLvZguMfCVcwOx0 + hY+6M/RMBmmWMKdrAw7jMw== + + AgRO2deYCHK5/u5+ElWfz2J6fdI2PN/mnjBxceE11r5zt7x/DVqcoWAp2+dr + aQ== + IHCzIj26Ny/eHA/8ey47SYsmBhQ= +
")); + } + } + + private static void TestReadXml(string xmlString, in DSAParameters expectedParameters) + { + using (DSA dsa = DSAFactory.Create()) + { + dsa.FromXmlString(xmlString); + Assert.Equal(expectedParameters.P.Length * 8, dsa.KeySize); + + bool includePrivateParameters = expectedParameters.X != null; + + DSAImportExport.AssertKeyEquals( + expectedParameters, + dsa.ExportParameters(includePrivateParameters)); + } + } + + private static void TestWriteXml( + in DSAParameters keyParameters, + bool includePrivateParameters, + string expectedP, + string expectedQ, + string expectedG, + string expectedY, + string expectedX) + { + IEnumerator iter; + + using (DSA dsa = DSAFactory.Create(keyParameters)) + { + iter = VerifyRootAndGetChildren(dsa, includePrivateParameters); + } + + AssertNextElement(iter, "P", expectedP); + AssertNextElement(iter, "Q", expectedQ); + AssertNextElement(iter, "G", expectedG); + AssertNextElement(iter, "Y", expectedY); + + + // We don't produce J. + // Seed isn't present in the input parameters, so it shouldn't be here. + + if (includePrivateParameters) + { + AssertNextElement(iter, "X", expectedX); + } + + Assert.False(iter.MoveNext(), "Move after last expected value"); + } + + private static IEnumerator VerifyRootAndGetChildren( + DSA dsa, + bool includePrivateParameters) + { + XDocument doc = XDocument.Parse(dsa.ToXmlString(includePrivateParameters)); + XElement root = doc.Root; + + Assert.Equal("DSAKeyValue", root.Name.LocalName); + // Technically the namespace name should be the xmldsig namespace, but + // .NET Framework wrote it as the empty namespace, so just assert that's true. + Assert.Equal("", root.Name.NamespaceName); + + // Test that we're following the schema by looping over each node individually to see + // that they're in order. + IEnumerator iter = root.Elements().GetEnumerator(); + return iter; + } + + private static void AssertNextElement( + IEnumerator iter, + string localName, + string expectedValue) + { + Assert.True(iter.MoveNext(), $"Move to {localName}"); + + XElement cur = iter.Current; + + Assert.Equal(localName, cur.Name.LocalName); + // Technically the namespace name should be the xmldsig namespace, but + // .NET Framework wrote it as the empty namespace, so just assert that's true. + Assert.Equal("", cur.Name.NamespaceName); + + // Technically whitespace should be ignored here. + // But let the test be simple until needs prove otherwise. + Assert.Equal(expectedValue, cur.Value); + } } } diff --git a/src/Common/tests/System/Security/Cryptography/AlgorithmImplementations/RSA/ImportExport.cs b/src/Common/tests/System/Security/Cryptography/AlgorithmImplementations/RSA/ImportExport.cs index a7dcd39181e8..65807a6fdf77 100644 --- a/src/Common/tests/System/Security/Cryptography/AlgorithmImplementations/RSA/ImportExport.cs +++ b/src/Common/tests/System/Security/Cryptography/AlgorithmImplementations/RSA/ImportExport.cs @@ -10,6 +10,8 @@ namespace System.Security.Cryptography.Rsa.Tests { public partial class ImportExport { + public static bool Supports16384 { get; } = TestRsa16384(); + [Fact] public static void ExportAutoKey() { @@ -344,6 +346,15 @@ internal static void ValidateParameters(ref RSAParameters rsaParams) } } + internal static RSAParameters MakePublic(in RSAParameters rsaParams) + { + return new RSAParameters + { + Modulus = rsaParams.Modulus, + Exponent = rsaParams.Exponent, + }; + } + private static void VerifyDValue(in RSAParameters rsaParams) { if (rsaParams.P == null) @@ -393,5 +404,23 @@ private static BigInteger PositiveBigInteger(byte[] bigEndianBytes) Array.Reverse(littleEndianBytes); return new BigInteger(littleEndianBytes); } + + private static bool TestRsa16384() + { + try + { + using (RSA rsa = RSAFactory.Create()) + { + rsa.ImportParameters(TestData.RSA16384Params); + } + + return true; + } + catch (CryptographicException) + { + // The key is too big for this platform. + return false; + } + } } } diff --git a/src/Common/tests/System/Security/Cryptography/AlgorithmImplementations/RSA/RSAKeyFileTests.cs b/src/Common/tests/System/Security/Cryptography/AlgorithmImplementations/RSA/RSAKeyFileTests.cs index 666c10cfba55..fa9a398428d7 100644 --- a/src/Common/tests/System/Security/Cryptography/AlgorithmImplementations/RSA/RSAKeyFileTests.cs +++ b/src/Common/tests/System/Security/Cryptography/AlgorithmImplementations/RSA/RSAKeyFileTests.cs @@ -13,8 +13,6 @@ public static class RSAKeyFileTests public static bool Supports384BitPrivateKey { get; } = RSAFactory.Supports384PrivateKey; public static bool SupportsLargeExponent { get; } = RSAFactory.SupportsLargeExponent; - public static bool Supports16384 { get; } = TestRsa16384(); - [ConditionalFact(nameof(SupportsLargeExponent))] public static void ReadWriteBigExponentPrivatePkcs1() { @@ -63,7 +61,7 @@ public static void ReadWriteDiminishedDPPrivatePkcs1() TestData.DiminishedDPParameters); } - [ConditionalFact(nameof(Supports16384))] + [ConditionalFact(typeof(ImportExport), nameof(ImportExport.Supports16384))] public static void ReadWritePublicPkcs1() { ReadWriteBase64PublicPkcs1( @@ -139,7 +137,7 @@ public static void ReadWriteSubjectPublicKeyInfo_DiminishedDPKey() TestData.DiminishedDPParameters); } - [ConditionalFact(nameof(Supports16384))] + [ConditionalFact(typeof(ImportExport), nameof(ImportExport.Supports16384))] public static void ReadWriteRsa16384SubjectPublicKeyInfo() { ReadWriteBase64SubjectPublicKeyInfo( @@ -191,7 +189,7 @@ public static void ReadWriteRsa16384SubjectPublicKeyInfo() TestData.RSA16384Params); } - [ConditionalFact(nameof(Supports16384))] + [ConditionalFact(typeof(ImportExport), nameof(ImportExport.Supports16384))] public static void ReadWrite16384Pkcs8() { ReadWriteBase64Pkcs8( @@ -466,7 +464,7 @@ public static void ReadEncryptedRsa1032() TestData.RSA1032Parameters); } - [ConditionalFact(nameof(Supports16384))] + [ConditionalFact(typeof(ImportExport), nameof(ImportExport.Supports16384))] public static void ReadEncryptedRsa16384() { // PBES2: PBKDF2 + des (single DES, not 3DES). @@ -1409,24 +1407,6 @@ private static void ReadWriteKey( } } - private static bool TestRsa16384() - { - try - { - using (RSA rsa = RSAFactory.Create()) - { - rsa.ImportParameters(TestData.RSA16384Params); - } - - return true; - } - catch (CryptographicException) - { - // The key is too big for this platform. - return false; - } - } - private delegate void ReadKeyAction(RSA rsa, ReadOnlySpan source, out int bytesRead); private delegate bool WriteKeyToSpanFunc(RSA rsa, Span destination, out int bytesWritten); } diff --git a/src/Common/tests/System/Security/Cryptography/AlgorithmImplementations/RSA/RSAXml.cs b/src/Common/tests/System/Security/Cryptography/AlgorithmImplementations/RSA/RSAXml.cs index 3f5584aa94ae..2dcbf42fd54f 100644 --- a/src/Common/tests/System/Security/Cryptography/AlgorithmImplementations/RSA/RSAXml.cs +++ b/src/Common/tests/System/Security/Cryptography/AlgorithmImplementations/RSA/RSAXml.cs @@ -2,19 +2,1461 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System.Collections.Generic; +using System.Xml.Linq; using Xunit; namespace System.Security.Cryptography.Rsa.Tests { - public partial class RSAXml + public static class RSAXml { [Fact] - public static void TestPlatformNotSupportedException() + public static void TestRead1032Parameters_Public() + { + RSAParameters expectedParameters = ImportExport.MakePublic(TestData.RSA1032Parameters); + + // Bonus trait of this XML: the elements are all in different namespaces, + // showing that isn't part of the reading consideration. + TestReadXml( + @" + + + vKyxpTSdezWlgKw7OZjrFev5AOyzKb8fdXF6ALIZnIoY15G1krfsUr1a8tsNO2Nf + BZV1Pf97p8mHLb9+Mibe9EoHylaNEBeZLCtBv+XsNXCCTPH0sVkZ/tUT/aViBK8g + NKLQj/BMLMpJ0Wj6A/ovoy/M00hMFfCi5UZ8dvx2C1UJ + + + AQAB + +", + expectedParameters); + } + + [Fact] + public static void TestRead1032Parameters_Private() + { + // Bonus trait of this XML: the root element name is wrong + TestReadXml( + @" + + + vKyxpTSdezWlgKw7OZjrFev5AOyzKb8fdXF6ALIZnIoY15G1krfsUr1a8tsNO2Nf + BZV1Pf97p8mHLb9+Mibe9EoHylaNEBeZLCtBv+XsNXCCTPH0sVkZ/tUT/aViBK8g + NKLQj/BMLMpJ0Wj6A/ovoy/M00hMFfCi5UZ8dvx2C1UJ + + + AQAB + +

+ DhUwCp00uje2vagxvGcnsvf20O+3szqZya8oz9Yl4kWlTyUbeExHka2lha23Edkw + Cj1StFDMMH9V0x4SF7n/10U= +

+ + DWXGDei29Up3Vv0cy6ds5B70RtAkAx7pxaQJMbBzNs/tNajuWA4Z24WSyw8mbsaQ + KOuemOPoT/GkWaiiaGCmEPU= + + + DZ20vn5zDZ1ypXsq43OFccfILwmnvrXpHZSqzBDMvjMCezxwi+aMyDBxuodUWwB4 + L15NSaRZWIa1b5NCgQhIclU= + + + DPb73eHhiyVwryFpiDqQyYCa6xvofYygtL20l/0kwVodNtwvKc8bfq+YCiCzFGfa + gX7hjxqdaR9x58GkyFUe3zE= + + + AQzpk26W+634ckDMQZ0BCBu2fJgdRDFOWFg6x/6TeeoCcubEx8FGOOHV7OeEDdsV + oS1wVKQY+HZPpUzhNOvSY14= + + + nlkl4uxsu0qD86EZN7binoxkeGUv3Pqd0XiCl3DiU+IHBW0yAchBHBP179rumQhG + aK5OLtFsG57kx/1uUXMULcWfxkWkwuZlXazmcbMA3g17tS1oqGAmwY8CRybncb0E + gZlELwNCcJZY7/ZK5C6kFzJH7NJKhimei50RUgACyPXx + +
", + TestData.RSA1032Parameters); + } + + [ConditionalFact(typeof(ImportExport), nameof(ImportExport.Supports16384))] + public static void TestRead16384Parameters_Public() + { + RSAParameters expectedParameters = ImportExport.MakePublic(TestData.RSA16384Params); + + // Bonus trait of this XML: the Modulus and Exponent parameters + // are not in canonical order. + // Bonus trait of this XML: the document has very non-standard whitespace. + TestReadXml( + @" + + + A Q + +A B + + + myxwX6kQNx+LSMao1StC1p5rKCEwcBjzI136An3B/BjthgezAOuuJ+fAfFVkj7VH + + 4ZgI+GCFxxQLKzFimFr1FvqnnKhlugrsuJ8wmJtVURxO+lEKeZICPm2cz43nfKAy + gsGcfS7zjoh0twyIiAC6++8K/ + +0rc7MbluIBqwGD3jYsjB0LAZ18gb3KYzuU5lwt2 + uGZWIgm9RGc1L4r4RdE2NCfUeE1unl2VR7yBYFcauMlfGL5bkBMVhEkWbtbdnUfs + IorWepdEa4GkpPXg6kpUO4iBuF2kigUp21rkGIrzBygy1pFQ/hReGuCb/SV3rF7V + + 8qfpn98thqeiiPfziZ6KprlXNtFj/uVAErWHn3P2diYyp3HQx8BGmvJRMbHd0WDr + iQJiWESYp2VTB3N1dcDTj5E0ckdf9Wt+JR7gWMW5axe7y1xMswHJWaI76jnBTHoh + qtt+2T6XFluTonYmOdQ8DbgHBUgqG6H +/HJugWBIm3194QDVh55CSsJLIm8LxwcBg + eUc / H 8 Y 2 F V r 3 W t E s +epc0rb1jNDLkf8sYC+o6jrCMekP9YPF2tPAxf/eodxf/59sB + iC2wXFMDafnWp1lxXiGcVVu9dE2LeglCgnMUps9QlJD0aXaJHYi2VDQ3zFdMvn8A imlqKtZGdGf93YaQg+Yq07hc6f8Vi3o1LSK/wp9BbNZs3JhBv4ODIAMfMsCEok8U + + vFhHSCmoNxzTl8I9pz8KJLRyLQXwfpJylfWY5vAbpAgV8wdyjfKro2QDXNIYCrV + pQk9KFCMwtekaA76LKRQai95TZuYCb+yQ00yvk17nzIPKJHsv/jHLvxxp9Yz1Kcb + 7rZWkT96/ciDfE0G8fc1knWRQ8Sm5rUsc/rHbgkczzAb0Ha3RWOt3vG/J10T1YJr + 1gIOJBSlpNmPbEhJcBzFk88XOq9DC3xc0j3Xk28Q73AlcEq0GNc+FrjkOJ+az6Pd + cKqkDQJ862arB4u+4v1w4qr5468x8lfAl+fv2J72chsr31OWonQsVCOmSBtv34r9 + Lu6VU6mk6ibUk0v6zrVv8GSlHuQsFQO7Ri6PmX3dywKJllpTCFQlcqleEPmIyzC3 + H5fV1RVzIw8G017PJb1erXPzkmLQFPsmTSEiJMvorVz7mVgQaT0xZcI6q2R6inkr + 9xU1iC7Erw3nZ9J2O06DoZj3Rwy+3yfCfbbZk+yS/mPIiprHyAgNW5ejWS9qJBtk + uuYcM+GuSXmE1DG8A/4XV+wMjEyqdRp+AOd3OED38t4MO4Gdpyt742N3olGSdNJq + IuRjGUGb11l5WI2iGLKO2GgWTannjBUO59m3Afb/RV//3yMsrPFL9xg0mUNpCBuO + aWYHdl+8LJcu/AoyYPRTJWd6300N4x3sNBqwey3xIjPitHsRmNm+gyF6JTIebFWn + 0Krnv2DmI5qWYIDI4niYE/W8roRt5REp9U6H6VXPBRFr4daB2Jz9hc5Xft/i9/ZE + 2N1P/koRF90IElQ03Kzgo760j5v/WtfCXsY0JWoc3JCQeUwP089xCLFForx9MvnA + arxtwZjdoJOsfXSVi3Xj9GShgMHxyK4e5Ew6bPMXQZ41WOo1HpcqjZSfbGL39/ZS + OaUQ8Fx0fb+NKbiRw063MbUSGqQ54uiHif+jOLtxiCEqNJEYAl7ALN1Hh982Es+W + HNGYKpuOKPnfga80ALWym+WMo4Kp + +vpXnF+vqVy6ncQu/+43FdJuYwCFwVLHs/6CA + on0pCT9jBqHan6oXnXNlBNkAB7j7jQi1BPQ9Eaoy09320uybU2HQ/Go1oep45are + UT1U5jbDfaNyeGyIDJSdMeVy84nnOL/pZ/er7LxR+Ddei09U0qjGHT4BjDaQnIOj + hygcQGcZDwPZFzfAvR0GrWGXzAFuOrTR30NXQeSfSa+EnsmydGf8FtRPGF6HFno2 + AJNigcDp8M6tiFnld1jDFq0CDaAc07csiMfMg8WZFlh8 + + +JEb2Zye69xB21mQnNRUw + 1vI2SspCUNh6x6uHtmqYNiE4a4hT6N4wd1SUuP2t2RHaJelvZWvgPZWrNQ+exrmi + FItsi8GhOcxG9IKj2e8Z2/MtI9e4pvw98uuaM4zdinZZ0y56UqzZP8v7pTf9pLP8 + 6Q/WBPB1XLNjQ4IHb498hpI2c3qaZvlK8yayfhi7miTzzx9zv5ieNvwYtV5rHQbe + cHqBs52IEYxEohKEGwjK6FujoB9w2f9GdY9G+Dy5aBFdwM0GjHA7f+O508Phn/gc + Na3+BX8NEossBq7hYzoFRakmBm6qm5JC5NNRZXfBQp/Skirh4lcDqgL0JLhmGGy/ + LoqsaTJobbE9jH9PXZapeMX +sSjAWSC15D1rWzzivgE4oUKkWIaa24Tsn22E+4wh9 + jS7xOfJ1/yXnCN8svORJcEv8Te9yMkXEif17VhNJho4+qLDxs7VbUYIyKNJlz3Kr + NQMBADpey10fnhza0NJSTC7RoRpfko905a1Wo4vtSdp7T5S5OPRMuQNaOq2t2fBh + dYMvSNno1mcdUBfVDHYFwx6xuFGHS2jYMRDn88MDPdCm/1MrjHEDx6zzxMR1tjjj + 66oxFJQ3o/Wh8hJDK+kMDIYd//kFRreAMhVX1dGJ/ax6p/dw4fE+aWErFwgfZySn + 9v + + +qKdnL4n1j7bemWOxMmrAigcwt6noH/hX5ZO5X869SV1WvLOvhCt4Ru7LOzqUUL + k+Y3+gSNHX34/+Jw+VCq5hHlolNkpw+thqvba8lMv + +zM= + +", + expectedParameters); + } + + [ConditionalFact(typeof(ImportExport), nameof(ImportExport.Supports16384))] + public static void TestRead16384Parameters_Private() + { + // Bonus trait of this XML: the D parameter is not in + // canonical order. + TestReadXml( + @" + + + myxwX6kQNx+LSMao1StC1p5rKCEwcBjzI136An3B/BjthgezAOuuJ+fAfFVkj7VH + 4ZgI+GCFxxQLKzFimFr1FvqnnKhlugrsuJ8wmJtVURxO+lEKeZICPm2cz43nfKAy + gsGcfS7zjoh0twyIiAC6++8K/0rc7MbluIBqwGD3jYsjB0LAZ18gb3KYzuU5lwt2 + uGZWIgm9RGc1L4r4RdE2NCfUeE1unl2VR7yBYFcauMlfGL5bkBMVhEkWbtbdnUfs + IorWepdEa4GkpPXg6kpUO4iBuF2kigUp21rkGIrzBygy1pFQ/hReGuCb/SV3rF7V + 8qfpn98thqeiiPfziZ6KprlXNtFj/uVAErWHn3P2diYyp3HQx8BGmvJRMbHd0WDr + iQJiWESYp2VTB3N1dcDTj5E0ckdf9Wt+JR7gWMW5axe7y1xMswHJWaI76jnBTHoh + qtt+2T6XFluTonYmOdQ8DbgHBUgqG6H/HJugWBIm3194QDVh55CSsJLIm8LxwcBg + eUc/H8Y2FVr3WtEsepc0rb1jNDLkf8sYC+o6jrCMekP9YPF2tPAxf/eodxf/59sB + iC2wXFMDafnWp1lxXiGcVVu9dE2LeglCgnMUps9QlJD0aXaJHYi2VDQ3zFdMvn8A + imlqKtZGdGf93YaQg+Yq07hc6f8Vi3o1LSK/wp9BbNZs3JhBv4ODIAMfMsCEok8U + +vFhHSCmoNxzTl8I9pz8KJLRyLQXwfpJylfWY5vAbpAgV8wdyjfKro2QDXNIYCrV + pQk9KFCMwtekaA76LKRQai95TZuYCb+yQ00yvk17nzIPKJHsv/jHLvxxp9Yz1Kcb + 7rZWkT96/ciDfE0G8fc1knWRQ8Sm5rUsc/rHbgkczzAb0Ha3RWOt3vG/J10T1YJr + 1gIOJBSlpNmPbEhJcBzFk88XOq9DC3xc0j3Xk28Q73AlcEq0GNc+FrjkOJ+az6Pd + cKqkDQJ862arB4u+4v1w4qr5468x8lfAl+fv2J72chsr31OWonQsVCOmSBtv34r9 + Lu6VU6mk6ibUk0v6zrVv8GSlHuQsFQO7Ri6PmX3dywKJllpTCFQlcqleEPmIyzC3 + H5fV1RVzIw8G017PJb1erXPzkmLQFPsmTSEiJMvorVz7mVgQaT0xZcI6q2R6inkr + 9xU1iC7Erw3nZ9J2O06DoZj3Rwy+3yfCfbbZk+yS/mPIiprHyAgNW5ejWS9qJBtk + uuYcM+GuSXmE1DG8A/4XV+wMjEyqdRp+AOd3OED38t4MO4Gdpyt742N3olGSdNJq + IuRjGUGb11l5WI2iGLKO2GgWTannjBUO59m3Afb/RV//3yMsrPFL9xg0mUNpCBuO + aWYHdl+8LJcu/AoyYPRTJWd6300N4x3sNBqwey3xIjPitHsRmNm+gyF6JTIebFWn + 0Krnv2DmI5qWYIDI4niYE/W8roRt5REp9U6H6VXPBRFr4daB2Jz9hc5Xft/i9/ZE + 2N1P/koRF90IElQ03Kzgo760j5v/WtfCXsY0JWoc3JCQeUwP089xCLFForx9MvnA + arxtwZjdoJOsfXSVi3Xj9GShgMHxyK4e5Ew6bPMXQZ41WOo1HpcqjZSfbGL39/ZS + OaUQ8Fx0fb+NKbiRw063MbUSGqQ54uiHif+jOLtxiCEqNJEYAl7ALN1Hh982Es+W + HNGYKpuOKPnfga80ALWym+WMo4KpvpXnF+vqVy6ncQu/+43FdJuYwCFwVLHs/6CA + on0pCT9jBqHan6oXnXNlBNkAB7j7jQi1BPQ9Eaoy09320uybU2HQ/Go1oep45are + UT1U5jbDfaNyeGyIDJSdMeVy84nnOL/pZ/er7LxR+Ddei09U0qjGHT4BjDaQnIOj + hygcQGcZDwPZFzfAvR0GrWGXzAFuOrTR30NXQeSfSa+EnsmydGf8FtRPGF6HFno2 + AJNigcDp8M6tiFnld1jDFq0CDaAc07csiMfMg8WZFlh8JEb2Zye69xB21mQnNRUw + 1vI2SspCUNh6x6uHtmqYNiE4a4hT6N4wd1SUuP2t2RHaJelvZWvgPZWrNQ+exrmi + FItsi8GhOcxG9IKj2e8Z2/MtI9e4pvw98uuaM4zdinZZ0y56UqzZP8v7pTf9pLP8 + 6Q/WBPB1XLNjQ4IHb498hpI2c3qaZvlK8yayfhi7miTzzx9zv5ieNvwYtV5rHQbe + cHqBs52IEYxEohKEGwjK6FujoB9w2f9GdY9G+Dy5aBFdwM0GjHA7f+O508Phn/gc + Na3+BX8NEossBq7hYzoFRakmBm6qm5JC5NNRZXfBQp/Skirh4lcDqgL0JLhmGGy/ + LoqsaTJobbE9jH9PXZapeMXsSjAWSC15D1rWzzivgE4oUKkWIaa24Tsn22E+4wh9 + jS7xOfJ1/yXnCN8svORJcEv8Te9yMkXEif17VhNJho4+qLDxs7VbUYIyKNJlz3Kr + NQMBADpey10fnhza0NJSTC7RoRpfko905a1Wo4vtSdp7T5S5OPRMuQNaOq2t2fBh + dYMvSNno1mcdUBfVDHYFwx6xuFGHS2jYMRDn88MDPdCm/1MrjHEDx6zzxMR1tjjj + 66oxFJQ3o/Wh8hJDK+kMDIYd//kFRreAMhVX1dGJ/ax6p/dw4fE+aWErFwgfZySn + 9vqKdnL4n1j7bemWOxMmrAigcwt6noH/hX5ZO5X869SV1WvLOvhCt4Ru7LOzqUUL + k+Y3+gSNHX34/+Jw+VCq5hHlolNkpw+thqvba8lMvzM= + + + AQAB + + + Nl0414LjL/TItwwGnXxlE8z3rN0H29YZ5NOpYhMOEdTn7nOnFpT7dHagvM6sBx8T + WmmKBv7GD6upiA3qxYbkZBMYAu4KicYHDl2TSHvvRZX943veCB6L07RSYnMMXWDA + oYfUXBVFdjO/dFwbP07GM7qZZzyirv+1/tBa1iCCyl+rO4F66BxvQCxtddrgNNdq + 1grgdVdlLGBeRVRSTB+Sdm5X5Xf3X9tYkAPubcLGlWPTgdc7O/w7pxd2GQoFJXPL + uoRaxSNW8LVAahzMmjjFTwAxtlZ0bXiGpBexXxnbMDA4s2zA6+tV1uPHMsbcKRMm + sLd8RasKh6kWbBc2hwn4+JVphUaR2n0V2BgqNkaJ2/Xg/EIHS9xEwEdSA++VT6Q9 + kMg5jUQnGUqJ7svYJJOUazGLptfzugdZcAbjwaYwImFzxTkGlBZ1pQYOKK7oVnNZ + dUMmK1Ve2JHn5Nyw4sTE72eAaizQt9KnDq5FXGWrocmQVyp8rQS9J8idKNkBGwjb + o9G+v1KRoyS2EWbERwTPi2kVJvYHkPAl8hKzRkd7R+CnFj4ygQy/wt4Q8vyBBwl2 + /W9IYOgig4/o0MOo0LpEy7Dy7Jq4WV6CIzLPUuvCBvLL9mD1g9fgTRroS5pwRDM5 + jMSG0hA1KdY/HkvlOJi8e2WVg9N/CFkd5TzN4xEpekibZiOfsUmReHcviHfjX/wF + 1S8Y/3vvdN8XNKdd/Aye2VYq0j6qLicSkCX68fXg0ruC4U+dRjoKs+HbzKKNgkev + hvz4JLYnwqGLM3u/0UEV/UW5oWN4Pj4fZa3Xr810mJ8QqX2KbO1rVz5RUWRdz0xm + oFjYdlW/sMb9reBMpRwfdDrlVFFCygRCWTXMhfQCWGI59GyLI+/avAeFGXTmHIDv + Z9BbhO+I4vrn4R9oPzONUw4UTNaXTiBZYr0Q2FHqpIBtVWyOsT9DvPE039OnCMUX + sT/PbtFm05AqLmAa1erGEFunZcn83TM6Qd4b7RAwNmTnl3vxA+RgnW/J82xNYwuO + TVGAFooSQYiuJBbT/XSajaWtJef5u7kNdPaeD8AFovi2HGtzuLDGV+gXkSnjb5CX + L6Xh4B/+MRO0J/yI5Wd1kp5TgP9GeHtO/Wm0zSB1WbuAWEZ+pWgvdL+6D08KEZaH + PS78jMQZ21yrLHgTPQ7yVfzB8W35NzR2UtXrX4RcMWzjFxBIGwAbMfIr4/SVIqZI + QaSZz+FqzsoYq8Dq5pkwM3j7InI/q/xGlemCHr7AP6Hktjpgce9tnYo9ISyj+3K2 + hZfvUitmvmlV9pzUZAO2wQGigr4aZb0A9mCT2cffwj3yZoorvkFhhGXCE8oGs7T3 + zVxWE/ZRdmvXJa0q3kXrFN2CvNXlu8sB+96kDpDxtnPdP8wTHF8xeyaP3+kzUe36 + QUdJzdmjeoE5V8EoBSjgie+96xNOtCAVLU+OxLYh3Eigwpu5AY6ucjuBOAuWoGCa + EtNxjXJvhX4OGMC2LX09wMk7zjXmCJrITBXzLPBPPW6PbBYIDTirwafzXGWh0zwR + pSVEqr2vvk9tgVvZvQfyxb3NhFJsJnoI2LCIjj+RYy8sPdM12vyX7GakeFJ753tB + 4+49GvXoTvlc7zFp77/AlUFeikx7SX4klK+VNr7IsI0eue3xqod5lEfPSywoAXWu + IC/FI13ym1fsIO99oHBzFN450Xt2sG+9P07Y0N+QazxCYlfwLBkWEbdUsxUmFKdB + Ms9rq/2PiC5xhQlijssd6nDm5WzgqbKDX+l01ltr+xiwRLidVCEJ/cNyim6VFCmK + B5++CofeusjQMSqUC7b2phXmIqhUcgNJKM2cHhYqCiCLyqTa6t87ck/v9FSm81rV + TI7+B6aq5m6VUxgfEr5Wl01g4UMjZiM1LXyUMuTw+5aMaev74DhFlGLIv7gVWy8f + S6Ss2Qmt+aO1aOazBl8hbZP2NmX2SqIfmwEnNyBhM2Gj8NccoXkuLbvcTWkWIOBN + Hm6CdA6JWzP4FtaS4/AGrzingviWnBP15IEtkJ+fURqb9hp41vfMBzqjGpFhFABZ + 9ZpyMgrWO8JHNuPkqtmKZXvIf5a5wKfyVa1nLBQM38lONqMiradaXdbRtNlpOYAl + lw1/93YIKQRapBJKKdm5dCdAWsZm/7JBnwuE8otfjrkEHnD9rb0DDFCWLICAzaCH + sLzwsXcwscrU2sq29uulHndvKmqpRe8bESxe7jxT+TfboUJPO13g5M6Q05AgDBl/ + BXr3vm7jqmSRQXlIpXJCv+I/mY6Jm36pROqZMu/HkYTrb0jPVmJgtfs6QCWGCE4w + i+6CYRyji5S8JR4UqX39A0/ms9WWuT/cUBsrQADduGCOtbuQ7ZNxkUqekrEVacID + 1rXtlaULblL7FN4cP5mgWE8miobJ4SpbpQ1KBRcBiKltUqp8nCIGMzM9btR5+Bab + DF83vot8gj07ybndVY3+bwaAFogG3lX6ybaRPnNHbenTX+4DXxRK8IWqrssOQXL2 + cSA7nG60tthi68Z5prAChJXjoOgz8TOuwsY74GyArWZHZ3lItpOfzEyyG3dITKt9 + 0svAwNeSThYDqD5prtwAhkcLJpsIBvicWulXq0Xaqw2E7geG4LRmBreuVSJ67Fbp + /zWjdoKebJK1zyltXFlQ19g3o9F2r1nMD+oiie0E3dRA1arId67h6HYL5DsiXsH9 + OCkadldT6JdOYJZR9lzcgfPDeqi+N4O4Nc3PPb52wnU= + +

+ yk0AOTleQMp8K97g3ZjrtfWOrSI/xEfUS336yp1a4tQQHn59BPy5HfQQxYvHQ+FO + OU4jIpWwOjv/fPI0LNx219S8Z+M/7+puZPFUUQghjsMRkxsgXAcDW2B/kDSD1A72 + BdrZ1noLEt+O8EMP0HdXUA7lhFAo/k9jaK6S+dW1g7tERGbyNuVadRMFj/V5I6qK + zDE2vDUlCRAD6ps/C2X9p8Npxqoweqp5bYDK8gn27aiD+Fii10Z5i8ODUcYEaBJN + 2YXigBTuKpoGwFpku4g3ebBKVxdZdH4FFaZ+AmDLmxMELyiDFurCuxSvZhtSBRU4 + NPfD7jJBOEf84bslMH6gVrc/tuV2xndGyKk8ISuFQj2edkXNaYyx5kaMe+5Sn1cS + svD0Q65+jyLlWbv3zuOZ5G899NNu1PDQn5U/ev8kgmNspnLMIiB59zjqltGqzfP2 + c6ppARmcF1jSliWdtIXPObry/83KwJg9o2lYEUqg2XVaUGmV5sM2US5benizE/Gk + 2jsiy3AzWTRjTmdypPLqFLbCIYPiSEaQ67Asdrav7uifFU8BQnz2vcDDeMb54LlL + Ji+wTUBd3guhuQE4tOS3O43uxmKnl1pQVmL5ra0Qf7k7eyDBr4ERUHCnwsSNN5zR + tGSb5P4No8HEdVF4Iz8bzw4hCXE8yb+8DkKTAV2W9Y2dge5QAwKD6dTsFgkNNgpW + rqPHQ2injuoqtXftCtRB5BGm+ASesy6Ywxh4vb2Oi7aemLVtD+/cEiIcvEp7/9fG + C2ewo6UE98GF1ut07ItKA3wGJ1bYRdkuMGTuPIA4vCDDA5gf09yalDTyh2EqOHzc + Q7mmJhFUjmubYFpruD1oP1xuFuFUuk3uIfpxzeyKls/TUFRTxL+dEEvTMwI8xj+p + w1wEh8KnmQlydANbo1JacctvJI3Ly+MXkOXse7yF1WAkiLNtC6O9Q9pE1u3MwB9s + S5xxY2AK7HPP0R1wnqq9fP4hRkerIUYEVk5qpcnQa8u61OT8bAOi8iIRJYVtC1K4 + b0IVbpyiZ/0WYEtt8C6rumZCRX58mrb4Mz+yWpx1fNTeStbWfspU4FqoVwz5UwjR + BZ2SteMkdflCfyz3KwYTRJFA4hhJAqOo+/wFiXW/TSdDRLfX5RMzGmrCIGdWPyUr + j810+g93jIFeiKAMM3q64WO3lCgp7A3vgDtvnoDAz1PbubGTIx2ZQDp9sIdnkyUn + sXOhRD/cQnI8X1wsg1D6FVsL+wpB+IXID/Drvs2E7/J37XOqvHcrnTpixQhhStnd + N4gzw6Sw3KeLpfVcz/8MAxHPq7Q0wCiuEqo6QhBGES35pUUsgZvcTlfME7TCG5mh + 6XFFmi598pje2nBTY+Epvw== +

+ + xFz9wnWwjmsLis7NS5jqQAyr25r5X1emWywNq8asbhS5NimjXdqNTgOE8shpRVdi + XL38vjoVcdmAfp1CLOef1I1qYwuDd6xxm1gclB8AOU8nk9WKCPGUZwixoqjIFOgz + UQeydqPqy4Edd64kvdHD016+jPMopgy4RNxAgxI/svcPdQNCQ5k5R2RtM8T+prfO + v8yiWZ7+Xeoi2GgemdJ+dr/s7RpUCphXHGO94O+WcSiDA97Ii2o5uVU1bhpdfCUp + DW17zVxRzunRiaoaxYtGlpe5Cc1G+yvPDA2f4BCDu/CGec2uzxnfImIpcMQUgzrt + 8l4ZRTPUX02UUBAf4EZ5swxUDjGFv6egxGqvAL2Ig2cW6Esar1wZ2iBDsXabamM2 + MOdXQAyzR83HtpfIBXwNm9A0qigpP/sxvCPKDX+fPs9+gDKSKaDnxTvNCICCbAFd + EMS0fwj1FU4Dkbx/wxvtMz9E1nE7HYVUjZueOLcRUGhk1/sysmQMyIuNM52aRHjm + CEQNYlaFGJpIOEijer7FGsYB5GLnmEy0P3PFyAlzMvyVGUGUrgugUjGpPnEitxMd + HtqtmUY1HsWQUoI3OqVJ76dugQBLSutly/0uToMsqwfTFVv7xFXek5qerC8iJHPm + WPCDqHgHKZMXYoPLfwjXOqgy2dx1tAnwXXdCTaH/71zxf+SMMxuURLfZhyPabdIM + DZMsuQvrc0ra/vCGtGv4Yx6DTzPn9yWGOZlzaO27LC52RWOJKkkpDirdQLn9WJsX + oWNfo5QEm9I6/IYMvhMFoN7RnU3FCUYklDdrhRyq6Zi92lnJqfKLI2dUymstZMtp + csJhYJUsBzIjpgoYFzdUGKlps973u62kIypjrDrBN4q17p8l2WLyUyjI0LxCtj5Y + oGqkQrtxiu9zoje//11ZPgXAgoW2cslg2OhpsBj8msjgCkDWTGQNo+gg+57rzknb + dDrJy23Ugh9J1bc3Oy2BIyhouaYYJaRdoWmiaysB/pNi6g1zAh9kWoJ6lITBysVc + Fw10uVurb8SulE5B3mIQuC7xLaw3VjMIfFjD1fxr3Z5sgLG46FQEB1ScmiiJ+eB3 + 8e2S4ybqD/LdA8t7Qj+tbRkYO16OpTOxaYg/Xlo/5ab1nyzniMP7YVOqCtXRtog8 + cHIBIE03BhEfCnTGNq/Jdjg0tjKIS8Ua2WlRvNuiBXkXRmex086uF05PNr8/hnWs + HK50YP9N8M5BpJVOkH2sl/coeJ6SJ3aYbzDwdS0Ustcnz0j0wOz5/VfCasBqpDN8 + Qk7I9FpmCKBHVSpmJTppoxe0hMzviXhooP/nYFJhpKqNcd8XR4u4y9/uXaIfo5g+ + w6EvM+zdroqNDDQ6RC1/jQ== + + + GBL3vteT3tP52OKqEdTb4Ah71SCpQ/tkSSORz8DQCwQ/ctGMoSZOBUGBKXEL4okS + XQFubvQvR47SRZUxHlGSFvcrAJXriupz/rE1XntAOxP9qGrm++yduqcOJyQIuBib + sHCt0bcuUC2offENFbrN+in7qDY92p2p79Auj2qeMjH72sQBeQTsMdh0pgAJTXRD + Fi+ZGuacJKryPF4DL6EQgYFguhKQuFhHIP/dptYGu5t9MPWjU0kAt+ApZXbSGWxs + NUGYhbN38DvqJ8PaDvMT3vhasGiH7bP9eOkaP8AzGp41tkL07qo7SDYa9WS06wPu + b2c4usTiPAddEaPKti2reQZPn71I2C9jjgeNr0jVj99zVxHRcwkaNpQYrbrbvDiJ + ch/4gYFncDMv5fDXeZhePO/8CIGMw+xwdz00k7d/KcEZMemhX0JMIV51lEMZN28b + 2gHigw4AJEserF2Hme7+jRkxR72+rhKv6x1jLJOb9qTffYhDHXYHpbuFiVqJvQrZ + mlrFNj6A7dGtK6xl2TlLH/Hrwj9Gk2FKZ7HMaMguwZiPLeL7/GSQnF4vJNVQ8Sw7 + xCySp27MfNsXgMOjcutw3rZyPsuItBs8Sjt3CPL6bqilam6offE3FUKCxEvNnluc + HQKIBsUw7FbnwSpTyKX+8jH1PoFqQXv+rhfAFL6Fc21J3Cd3ABSxjAcZnTmwh8jN + LfUxhlUS84/sSzIdVFeUC8cJ/qPWGu6loTntTG8dYoT19KhKdUYPA11p3AJlJToR + SFQrkh3WLIGsIrpcbLXatfVxagcMr6s7suif7TU5CzI+4tOcngK3poFyhyfJ9XTu + ZWTXX9paHKSzldDM1tz/5eJi+3gPNCiH+SUrm9zVVUMgG4Qdf+FpmIHdfUl73/+9 + fREbPOiuNykHpMStiA8J0lbqQAhbw0SgDk8+SC9UIeNSFa58gJEYudVkscsUvZw/ + r/PLDo9kXWUeyvzc5RTefdxkK0/mDoydgYPNbzNICTvyXNlvLI92OahSMAvjwSAz + 8JGFqWcccJGOsyDm0VlMeF8o7coym9rASKEA4YWS+ar/VRqh5e7AEP7Y35scpIP9 + E9T/m4OPWDa0chvwwf70FgnPFdjb/2NofawtIIGRpWXRvIDAQXN6dl9UALUrb1JG + D9PcYtGqYV8X19xr90hYqu/J7eilrICwCquICe26hDGviTaXkus3zIvpXzON4NXg + Fl7zRwLufD3J73MxnOLrD9WI5HQBC8kn2LXL6CXe9wr8uJY2MD1iRFCpZlcr9NNe + XvhnaJXVsjyCAtrjE6F/VXIuK3nDeUaeCHyXeDsli2/UMJW9ySK6IdyS3Zl6K/yp + ZvVi2glEVbVZd9c8JTurUw== + + + DXlYDEzpFYyw2RCBs8tFX6m+7S3AKNOp3Z2zPnM+h7syTk4jIKCLi6vgJoyr9I8f + d7+tpRv1Nr+2+nkt/kjShdJCV5OFrOOPVBqCs4NBD62nyJQhiaWSClPlZITyXcTl + KI0/qLZsuRQeAoVXjhLjvhBFQQS6aFJ9HnSClLve1Rfw3pWfqWXNMWHpwGCnHKeG + L1EKXt3zFFypkXHrj6CK/vkCd+6Tj7qOV6tcbx/hkdg2zUAvQKnEVjxLk0eJ3Kfs + HjjCAwBvuKQAtdKPTbjV2iWFE/AbC8cgyPHyY3yenXnOsHL1qM5cqk5UC6HYynxz + sWrVjxMUYom/QJMqrMgJN8kDx4mMZO9Kr8+mPIXE5UdgogXtSdUnDPmjy3yZA37V + TBvDt+hnMOkk6BmYJxAxGtz5kCd7VSGWcxN9nNmCAtxYENHnh6W74aPN2OSAjoq1 + aR4mSIVD0/drdUea+Ldk2lxgC9rvNIJen+zquXeOX5caPFvHSchlvCkfQkhxOnuV + RUHuLS5EqcCEbiBF33lRqxmlLZe/zoqM38HA8436cqg0TuxaGGtB0AIKW/eFa0yL + df+JY/gWUws5cP/wbDzFSwWRJpbvk699Z7byw35qxT2fNVr/dqRxxm0YsDX3wMqX + JskyL5A05ZxrQV5Ly2a+5g5+lsZy6Sy5aqBxU0RnfHRDOgRjvmoJDYIUEhratShx + nUjZC8WOnXWoe0/j3mN+QsboOboVE7dmc3NdIPkXG9wAT5iZ4+XrREaasgNRKBBU + WcWo3V+dxVdyprtICo7hlv1TItkgSRegEO+QmCy0aZ0Kgf4hQWEcPQytG8qo7b6r + eK1v4yG5SLEfExikOIuaYKrXTvlgxGcQ2TziZAIQGhCRlVMkVLteZ2hoBzKz3S+A + A1nt9YpJK0BtDdeHfC1an0/jutEUCOJam+euwN+mDbT08p8qVUmUSgf2o21vPtOA + lIQoLqZVq6wb8+dDifMAZnoyXXLRO1wA9L973qCv3Vkds3PCzYV77F4BrUlCxvgt + 7oME3Gc25092r0SDbpAKF6lY8Upc7bRIw8ePgJJ2kFl7loUbbA2/zQT4Tfe0KApI + ELi9mIqmCvweQFFpHs2hx9et+vztCtb2OIiZ2I6WzdpcBlUdehwAltgX1fCAGGdW + xlx8SUwjF257U8tZgo0jZNJMg6gKBDD9O6fnbO8hOgDqIPGimScYeQ7tjpMm98IB + UmKCJ9m87mYoyPNZ1b5Z5n+WLlirLLwNj6urBE9YmUD8QVP/P3HDYafw9kRHzQaf + YylmzqWZVMQywNxM8AcHEqLgxzAMy8EQZOPKa6ibfKIbXJHzVfx3bL3r7E7gnugm + fmQECisZtw1YylqXGPCKTQ== + + + n+rm+JVUflE2xL9LB+IxUmf85aSrEXtyeJDWONs76lEL3omN8rLP4Fq/s2kVn4Nr + uobi4mPG2oINvtU+XaxVIb/90rqtYmj5UQekrfIVjkosqPevbonXiHFWGtvQBHVl + zIP1qoeNim5P/3UnCA07SaK5dFrNSYr0pAFCudEcwe6sAqSE5PomswjacRdehXAL + ePPuwYcJX1n/L6CMCUpb0c26ilxihihLwDikvT556AfB0QEAsNRrNORzvMtZD1Gz + dIaEY+2mUCrIz/jAzP7slWTEOHoHtgIeFNFj7AZ3ztc2GcIAmiIjSPbXPsaCZNIN + tT1jvIEzRSltchQl1ck5BPi0KCJ8WvajfSj/uM2e0I42kVJDbnkKTGsbUUlWns+T + WiqgvS9UpMjfdzZsvYhabN54/1VqgvpVhg1/ZO3MWkDmNhsFLyopm/FHwE3KylJV + +zPZ+ZwTm/oH639Fbvyk1WIXQS/5PVZSTSSfDgEfKocOTFEX+9WFDKJvrInAQl+Y + eyfd/dOKL+VP5YFiWRQiiUCXJrYfqVHJ0/QYy+DqqgihSyYkRJuFj+0zuUvYmjIZ + qwYCecJY7fceDkUFSwkRHyJK471Dr0zVxoSzW0M395u9J0kA+1sQIgTrpLlVKXSK + 4nNYEhuhDD8ja1yGW17XvdMPl2o5RE+9/fbSZXM1BFXoYV2gOaci6dJQciZgepZp + 6AN8MQOrEmAsJyvE/ZnMta6HZ3ngwPxCbvT3clB07uUxCsDy+ogpw3OL3cIz29l2 + 1RDZacWR9rMIZTxAD42aNN6q49MnJt4N9cMTf8w3P5B2rLO4RKaDnaFWwHMN2SPB + pRbRP1iFFIedtW9yziGXq/BiUD1S5fNlO6r4Gi4bZ/dIUtHxQY2Z8A4kIskxTNp1 + iplE5zptN9j+GJCOxg0qxXt/yr2c+ybzvY5nmk/ONjphs4MnTONb8O1YOjphUDXW + 7KpcXs9Hu68rqkSBEa+MhGmDz8NbDTP1Q4bVgAIZtEoWdlWMEDdEMihjU55XgNQB + QACfhKn5nJe+SIgxjoqGZc+13uZDcowNySBXr8R1yujvwN1E2ODX2up7T9mFDXsr + hFBkT7+mW1mOHJUxNJ3L70B+7iepvU1NEbBL2tVGcueSMGduUxXxTebNhCCQxrjC + GJNKc5jCAVgK70SzHQ/HW1PApA8Vma+AV9aOopw32M0it1kAvuzHLbZTHp8OqFIB + WEhzUCxK/cVFK8+yixqYU9/Eky936jzwaO6+QATdC/kJjTOTKAQ4yIR/q1HW16sn + 4Do8AsRi+Rtdx7G9UZbgu8rCShuFHzfF83uHwHsl8khazOQetuanBG/GxBdaeIJF + mTymL1LOru69mA9gwhuFFQ== + +
", + TestData.RSA16384Params); + } + + [Fact] + public static void TestReadDiminishedDPParameters_Public() + { + RSAParameters expectedParameters = + ImportExport.MakePublic(TestData.DiminishedDPParameters); + + TestReadXml( + // Bonus trait of this XML: Canonical element order, pretty-printed. + // Includes the XML declaration. + @" + + + tz9Z9e6L1V4kt/8CmtFqhUPJbSU+VDGbk1MsQcPBR3uJ2y0vM9e5qHRYSOBqjmg7 + UERRHhvKNiUn4Xz0KzgGFQ== + + AQAB + +", + expectedParameters); + } + + [Fact] + public static void TestReadDiminishedDPParameters_Private_Base64Binary() + { + // This test uses the base64Binary version of the DP value, where the 0x00 + // is written down. + TestReadXml( + // Bonus trait of this XML: Elements are in reverse-canonical order. + // Includes the XML declaration. + // Includes unused elements. + @" + + + r+byNi+cr17FpJH4MCEiPXaKnmkH4c4U52EJtL9yg2gijBrpYkat3c2nWb0EGGi5 + aWgXxQHoi7z97/ACD4X3KQ== + + This is not base64. + + wsmVlMaMQHY36wRrMflOgRzNDMqqnu32O4Y1s4+GgQs= + + + rCTM8dSbopUADWnD4jArhU50UhWAIaM6ZrKqC8k0RKs= + + + AAiO/cUU9RIt8A2B84gf2ZfuV2nPMaSuZpTPFC/K5Us= + + + wLI66OpSqftDTv1KUfNe6+hyoh23ggzUSYiWuVT0Ya8= + +

+ 83J7HoZ2IFWU08c6AidNTxqYBEopUchczRLG/FetGXs= +

+ AQAB + + tz9Z9e6L1V4kt/8CmtFqhUPJbSU+VDGbk1MsQcPBR3uJ2y0vM9e5qHRYSOBqjmg7 + UERRHhvKNiUn4Xz0KzgGFQ== + +
+", + TestData.DiminishedDPParameters); + } + + [Fact] + [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] + public static void TestReadDiminishedDPParameters_Private_CryptoBinary() + { + // This test writes the DP value as a CryptoBinary, meaning the leading + // 0x00 is not written down. + // + // .NET Framework does not handle that correctly. + TestReadXml( + // Bonus trait of this XML: Elements are in reverse-canonical order. + // Includes the XML declaration. + // Includes unused elements. + @" + + + r+byNi+cr17FpJH4MCEiPXaKnmkH4c4U52EJtL9yg2gijBrpYkat3c2nWb0EGGi5 + aWgXxQHoi7z97/ACD4X3KQ== + + This is not base64. + + wsmVlMaMQHY36wRrMflOgRzNDMqqnu32O4Y1s4+GgQs= + + + rCTM8dSbopUADWnD4jArhU50UhWAIaM6ZrKqC8k0RKs= + + + CI79xRT1Ei3wDYHziB/Zl+5Xac8xpK5mlM8UL8rlSw== + + + wLI66OpSqftDTv1KUfNe6+hyoh23ggzUSYiWuVT0Ya8= + +

+ 83J7HoZ2IFWU08c6AidNTxqYBEopUchczRLG/FetGXs= +

+ AQAB + + tz9Z9e6L1V4kt/8CmtFqhUPJbSU+VDGbk1MsQcPBR3uJ2y0vM9e5qHRYSOBqjmg7 + UERRHhvKNiUn4Xz0KzgGFQ== + +
+", + TestData.DiminishedDPParameters); + } + + [Theory] + [InlineData(true)] + [InlineData(false)] + public static void TestWrite1024Parameters(bool includePrivateParameters) + { + TestWriteXml( + TestData.RSA1024Params, + includePrivateParameters, + ( + "nwUfznHKLhcPQ8YESm+3hNitYlvbh0sFrQN2GWPuKp3Mfa86USOufxmmY79la143" + + "HGoKp/CCsb3DIVAhI+9AMJMREVz3W0JyGN7+G/YOAr8oVvt8tfGIzWaPwcq6+YN+" + + "CVvSkbkWXCsMjpG7w4QNc+6iMIIvPJBQiKeSlpkMaL0=" + ), + "AQAB", + ( + "Sub5f97mWkZfWM+NVth/a3I6XSGianxCfKesObJxzR4N48elYvG5MEIPN13Ack3r" + + "DJXAVjF6Bim5n1fkfE4l/90RDtnowE+YxhPXJH48PrTHhY/VlAsSVPigC2Fv3eib" + + "kZ0qbxWZjJG5Pe9lx3imV1LEF1v8qGVOHpWCaxVJbGs=" + ), + ( + "0ksJA5IpledllBlPINK39rmweB+3wt20aLX9fdGSuqhQHtxEeb8hL8K1oAgOzoAM" + + "N/Zg6rtXfqV0goqfp1tCAw==" + ), + ( + "wZUxGvTlpB+shkg1m35y+YIXKoYKPTHM0Rwju2SQ3x9Wp0gknq8Y4wy25nvkH/cZ" + + "bU7bqVDN1ihi72VySKkOPw==" + ), + ( + "d813nSkvt87T98NTaQei9lRjTIwFTGax2NWVTJCQXvZ0bqBeAl34shTjFACDLvGU" + + "BG3AWPnRprzr21LOEbHTsQ==" + ), + ( + "rlIzDhtKUClVqvaLj6Km1piXU+uwfLrDveqhIrbE3qfR2IHWuC7lMlDYw2T9YOub" + + "Mhu5IxdoxFlJ/lpUN6pE8Q==" + ), + ( + "Kjmv4nYGSI9Jk98BzXuyxmgVrw7J8eAVPaloJ9ZkHgjcATs4MmJPzQwJ95pryg92" + + "wvvdfF3xhRZnn5in80B9HA==" + ), + // On Windows 10 RSACng recomputes the D value to D-phi instead of D-lambda + ( + "mmmJZxfLcVHm+rKPfBBbLd6RDk+QLiHFUylnRmRo4mz0Ip9Ci4OQb87iaT1zJ/0G" + + "msrFqim7XwibL//1DkXGF1ypenkg5lPOSXYlcBsaqpw9zTxBDgPO+w7+26oySN12" + + "wugBg2XtnZ3XzvUBr8NxfndykVMONAMPdzBTrWnNeKk=" + )); + } + + [Theory] + [InlineData(true)] + [InlineData(false)] + public static void TestWrite1032Parameters(bool includePrivateParameters) + { + TestWriteXml( + TestData.RSA1032Parameters, + includePrivateParameters, + ( + "vKyxpTSdezWlgKw7OZjrFev5AOyzKb8fdXF6ALIZnIoY15G1krfsUr1a8tsNO2Nf" + + "BZV1Pf97p8mHLb9+Mibe9EoHylaNEBeZLCtBv+XsNXCCTPH0sVkZ/tUT/aViBK8g" + + "NKLQj/BMLMpJ0Wj6A/ovoy/M00hMFfCi5UZ8dvx2C1UJ" + ), + "AQAB", + ( + "nlkl4uxsu0qD86EZN7binoxkeGUv3Pqd0XiCl3DiU+IHBW0yAchBHBP179rumQhG" + + "aK5OLtFsG57kx/1uUXMULcWfxkWkwuZlXazmcbMA3g17tS1oqGAmwY8CRybncb0E" + + "gZlELwNCcJZY7/ZK5C6kFzJH7NJKhimei50RUgACyPXx" + ), + ( + "DhUwCp00uje2vagxvGcnsvf20O+3szqZya8oz9Yl4kWlTyUbeExHka2lha23Edkw" + + "Cj1StFDMMH9V0x4SF7n/10U=" + ), + ( + "DWXGDei29Up3Vv0cy6ds5B70RtAkAx7pxaQJMbBzNs/tNajuWA4Z24WSyw8mbsaQ" + + "KOuemOPoT/GkWaiiaGCmEPU=" + ), + ( + "DZ20vn5zDZ1ypXsq43OFccfILwmnvrXpHZSqzBDMvjMCezxwi+aMyDBxuodUWwB4" + + "L15NSaRZWIa1b5NCgQhIclU=" + ), + ( + "DPb73eHhiyVwryFpiDqQyYCa6xvofYygtL20l/0kwVodNtwvKc8bfq+YCiCzFGfa" + + "gX7hjxqdaR9x58GkyFUe3zE=" + ), + ( + "AQzpk26W+634ckDMQZ0BCBu2fJgdRDFOWFg6x/6TeeoCcubEx8FGOOHV7OeEDdsV" + + "oS1wVKQY+HZPpUzhNOvSY14=" + ), + // RSACng recomputes a smaller D for this key + ( + "ENegpwT2nuJH0x/szIQyThtpt7OpfatGOWNnFutPHnp0Y7/p075P3gXxubakrH2/" + + "JH42QFHPXce/Za3Pq9Xs9qK2JxcfZ5hUHxvxHKyapWprK8nBCCYWZRqxrmwC4Qx8" + + "iALCSmtNGBCH/SQdB1N4LPTNA1X4/RV5G0nJACK+PORV" + )); + } + + [Theory] + [InlineData(true)] + [InlineData(false)] + public static void TestWrite2048Parameters(bool includePrivateParameters) + { + TestWriteXml( + TestData.RSA2048Params, + includePrivateParameters, + ( + "sXzud7RZpGWSjX9Vd4A5uiK6KaX/5VP7QJioNeUtCtyFF27k1pOCIHGN6d3J1b0w" + + "R+5ZueaoeZ5Hlo5jzaYonXttg6po4kbWHIwrocQEEq5hB69v6StIXMrCDlJxIQPg" + + "BRwHwFb9imF6lTlLqlqdA216UT565KvttAqIgDwH7RkhotzXnD87GVkzOYol286N" + + "jhDasTgyylmhaTwjdlA3s79zWHc4xRYDYDYNMYy+pRIv5RatHIABUOs8hnki03/U" + + "kIW467B92MiLu4i+/ri6rWHH+WggsqkdtNywW8ez8oM1Q7CuGSum+ohIufuzzfip" + + "nCBvYyPlwoXNdXpVBKQImQ==" + ), + "AQAB", + ( + "LJaGEexs2K/rsUBb6Dl+RxSSUAQz1RjT9dZj66Y3OpNLnCdvtbg46I2eaTIekmOE" + + "zY1DXUBk8qigs2HyEKe9bFKloH4e+zlwcJuGGo1zuH22QogARUNqWmVVeuObKAAh" + + "Nydjix5Pc4Qpl3NdXt6Es2e9Ysufc/L9NE2xHQX3t8g8afYsW3jGsFW/i1jxwp8Z" + + "ShdTYNpSby7eD2SdT7ivUCuPmR4VeDLXNwbDCF0cBLFtRoTJ6PYOjhjsS4TF82Vr" + + "mzUK2nvHq21Y+hd2wmfxupvdH7SKVgZnNjnpHoKKqih6p9oYAdUcGQxQqwk1r84m" + + "ANTQYcwqDj/Kw9tCFpv/QQ==" + ), + ( + "umH9ZW2Gut13txGeyMl9uGojAz3oybfW3vgVfPcLsR3Ig+x2V59/R17VVzTZFr3c" + + "3aCy4BjRcGVOK3UVd8QGPoA+wranQEpTYTA1Rp/U/H2AyQ7hlJvH+r1Gm0wSkH2b" + + "9eaCRrmmqfY1vAeexHh0bkSsv1xZM9pZ3pvtPTkbNiM=" + ), + ( + "88hrqaLS1qtkWQ9oDMhpxlGyLCi1290AcF6zBDjEqkXveax5j/H2Bzvfrwjj2iE3" + + "CEEfoIRN66mRtbHW1ToW1X56nWXxkodp5wH9YJUlG/B54OHKzpl67ceNoj2NMLGO" + + "2pnPnmsCKNTsJdWJdMqifkfb6OVCbNTcrdwxskL7LBM=" + ), + ( + "dddWuzZQpP05n8nINvMORfb1RCt0b3WIqVj5XRVlkwpdqOtst2Hku18+S/DiAPry" + + "Fj5wWjfW09V5YwiYFi0eNY4oIDwT6xYTObOdO5X6t9kx/+0kuyzzd5kMd0vVwP1q" + + "CkM/wy/GLFe7CbNXsqjmFIHfJu5gh+RaReEYUkk05zk=" + ), + ( + "L18PxLv2Gm7dpgy/XFSJcVcotzoF9L5iOnO8d6KMXMYQPeWNDbKn60nwMnQYyqdP" + + "qVP2UFvFRHkD7nmrVG3gSAY2z2Ui5yVXJ+OUF/ODbYVyOYfGwBTE9XWkiRVK3V5z" + + "cvkWhiMnHUYayVNQTZiesMlH6165ZKqMY2B5a7lmU28=" + ), + ( + "CxZrLofPHCycihyS1NEepIclHKEpeuTWZWluYrrqQWmJvXhaoSxRZqM9HlGmZWGm" + + "bC+q211qlE5lSjBC4XqoWy1BBYJfbd2dmmpubnwbswuTWBAc75G2BrvlrRV0aaRk" + + "/2uIHqE84+EkU03I0Qv3fRto6rU05PscbMp/LHEZnbw=" + )); + } + + [ConditionalTheory(typeof(ImportExport), nameof(ImportExport.Supports16384))] + [InlineData(true)] + [InlineData(false)] + public static void TestWrite16384Parameters(bool includePrivateParameters) + { + TestWriteXml( + TestData.RSA16384Params, + includePrivateParameters, + ( + "myxwX6kQNx+LSMao1StC1p5rKCEwcBjzI136An3B/BjthgezAOuuJ+fAfFVkj7VH" + + "4ZgI+GCFxxQLKzFimFr1FvqnnKhlugrsuJ8wmJtVURxO+lEKeZICPm2cz43nfKAy" + + "gsGcfS7zjoh0twyIiAC6++8K/0rc7MbluIBqwGD3jYsjB0LAZ18gb3KYzuU5lwt2" + + "uGZWIgm9RGc1L4r4RdE2NCfUeE1unl2VR7yBYFcauMlfGL5bkBMVhEkWbtbdnUfs" + + "IorWepdEa4GkpPXg6kpUO4iBuF2kigUp21rkGIrzBygy1pFQ/hReGuCb/SV3rF7V" + + "8qfpn98thqeiiPfziZ6KprlXNtFj/uVAErWHn3P2diYyp3HQx8BGmvJRMbHd0WDr" + + "iQJiWESYp2VTB3N1dcDTj5E0ckdf9Wt+JR7gWMW5axe7y1xMswHJWaI76jnBTHoh" + + "qtt+2T6XFluTonYmOdQ8DbgHBUgqG6H/HJugWBIm3194QDVh55CSsJLIm8LxwcBg" + + "eUc/H8Y2FVr3WtEsepc0rb1jNDLkf8sYC+o6jrCMekP9YPF2tPAxf/eodxf/59sB" + + "iC2wXFMDafnWp1lxXiGcVVu9dE2LeglCgnMUps9QlJD0aXaJHYi2VDQ3zFdMvn8A" + + "imlqKtZGdGf93YaQg+Yq07hc6f8Vi3o1LSK/wp9BbNZs3JhBv4ODIAMfMsCEok8U" + + "+vFhHSCmoNxzTl8I9pz8KJLRyLQXwfpJylfWY5vAbpAgV8wdyjfKro2QDXNIYCrV" + + "pQk9KFCMwtekaA76LKRQai95TZuYCb+yQ00yvk17nzIPKJHsv/jHLvxxp9Yz1Kcb" + + "7rZWkT96/ciDfE0G8fc1knWRQ8Sm5rUsc/rHbgkczzAb0Ha3RWOt3vG/J10T1YJr" + + "1gIOJBSlpNmPbEhJcBzFk88XOq9DC3xc0j3Xk28Q73AlcEq0GNc+FrjkOJ+az6Pd" + + "cKqkDQJ862arB4u+4v1w4qr5468x8lfAl+fv2J72chsr31OWonQsVCOmSBtv34r9" + + "Lu6VU6mk6ibUk0v6zrVv8GSlHuQsFQO7Ri6PmX3dywKJllpTCFQlcqleEPmIyzC3" + + "H5fV1RVzIw8G017PJb1erXPzkmLQFPsmTSEiJMvorVz7mVgQaT0xZcI6q2R6inkr" + + "9xU1iC7Erw3nZ9J2O06DoZj3Rwy+3yfCfbbZk+yS/mPIiprHyAgNW5ejWS9qJBtk" + + "uuYcM+GuSXmE1DG8A/4XV+wMjEyqdRp+AOd3OED38t4MO4Gdpyt742N3olGSdNJq" + + "IuRjGUGb11l5WI2iGLKO2GgWTannjBUO59m3Afb/RV//3yMsrPFL9xg0mUNpCBuO" + + "aWYHdl+8LJcu/AoyYPRTJWd6300N4x3sNBqwey3xIjPitHsRmNm+gyF6JTIebFWn" + + "0Krnv2DmI5qWYIDI4niYE/W8roRt5REp9U6H6VXPBRFr4daB2Jz9hc5Xft/i9/ZE" + + "2N1P/koRF90IElQ03Kzgo760j5v/WtfCXsY0JWoc3JCQeUwP089xCLFForx9MvnA" + + "arxtwZjdoJOsfXSVi3Xj9GShgMHxyK4e5Ew6bPMXQZ41WOo1HpcqjZSfbGL39/ZS" + + "OaUQ8Fx0fb+NKbiRw063MbUSGqQ54uiHif+jOLtxiCEqNJEYAl7ALN1Hh982Es+W" + + "HNGYKpuOKPnfga80ALWym+WMo4KpvpXnF+vqVy6ncQu/+43FdJuYwCFwVLHs/6CA" + + "on0pCT9jBqHan6oXnXNlBNkAB7j7jQi1BPQ9Eaoy09320uybU2HQ/Go1oep45are" + + "UT1U5jbDfaNyeGyIDJSdMeVy84nnOL/pZ/er7LxR+Ddei09U0qjGHT4BjDaQnIOj" + + "hygcQGcZDwPZFzfAvR0GrWGXzAFuOrTR30NXQeSfSa+EnsmydGf8FtRPGF6HFno2" + + "AJNigcDp8M6tiFnld1jDFq0CDaAc07csiMfMg8WZFlh8JEb2Zye69xB21mQnNRUw" + + "1vI2SspCUNh6x6uHtmqYNiE4a4hT6N4wd1SUuP2t2RHaJelvZWvgPZWrNQ+exrmi" + + "FItsi8GhOcxG9IKj2e8Z2/MtI9e4pvw98uuaM4zdinZZ0y56UqzZP8v7pTf9pLP8" + + "6Q/WBPB1XLNjQ4IHb498hpI2c3qaZvlK8yayfhi7miTzzx9zv5ieNvwYtV5rHQbe" + + "cHqBs52IEYxEohKEGwjK6FujoB9w2f9GdY9G+Dy5aBFdwM0GjHA7f+O508Phn/gc" + + "Na3+BX8NEossBq7hYzoFRakmBm6qm5JC5NNRZXfBQp/Skirh4lcDqgL0JLhmGGy/" + + "LoqsaTJobbE9jH9PXZapeMXsSjAWSC15D1rWzzivgE4oUKkWIaa24Tsn22E+4wh9" + + "jS7xOfJ1/yXnCN8svORJcEv8Te9yMkXEif17VhNJho4+qLDxs7VbUYIyKNJlz3Kr" + + "NQMBADpey10fnhza0NJSTC7RoRpfko905a1Wo4vtSdp7T5S5OPRMuQNaOq2t2fBh" + + "dYMvSNno1mcdUBfVDHYFwx6xuFGHS2jYMRDn88MDPdCm/1MrjHEDx6zzxMR1tjjj" + + "66oxFJQ3o/Wh8hJDK+kMDIYd//kFRreAMhVX1dGJ/ax6p/dw4fE+aWErFwgfZySn" + + "9vqKdnL4n1j7bemWOxMmrAigcwt6noH/hX5ZO5X869SV1WvLOvhCt4Ru7LOzqUUL" + + "k+Y3+gSNHX34/+Jw+VCq5hHlolNkpw+thqvba8lMvzM=" + ), + "AQAB", + ( + "Nl0414LjL/TItwwGnXxlE8z3rN0H29YZ5NOpYhMOEdTn7nOnFpT7dHagvM6sBx8T" + + "WmmKBv7GD6upiA3qxYbkZBMYAu4KicYHDl2TSHvvRZX943veCB6L07RSYnMMXWDA" + + "oYfUXBVFdjO/dFwbP07GM7qZZzyirv+1/tBa1iCCyl+rO4F66BxvQCxtddrgNNdq" + + "1grgdVdlLGBeRVRSTB+Sdm5X5Xf3X9tYkAPubcLGlWPTgdc7O/w7pxd2GQoFJXPL" + + "uoRaxSNW8LVAahzMmjjFTwAxtlZ0bXiGpBexXxnbMDA4s2zA6+tV1uPHMsbcKRMm" + + "sLd8RasKh6kWbBc2hwn4+JVphUaR2n0V2BgqNkaJ2/Xg/EIHS9xEwEdSA++VT6Q9" + + "kMg5jUQnGUqJ7svYJJOUazGLptfzugdZcAbjwaYwImFzxTkGlBZ1pQYOKK7oVnNZ" + + "dUMmK1Ve2JHn5Nyw4sTE72eAaizQt9KnDq5FXGWrocmQVyp8rQS9J8idKNkBGwjb" + + "o9G+v1KRoyS2EWbERwTPi2kVJvYHkPAl8hKzRkd7R+CnFj4ygQy/wt4Q8vyBBwl2" + + "/W9IYOgig4/o0MOo0LpEy7Dy7Jq4WV6CIzLPUuvCBvLL9mD1g9fgTRroS5pwRDM5" + + "jMSG0hA1KdY/HkvlOJi8e2WVg9N/CFkd5TzN4xEpekibZiOfsUmReHcviHfjX/wF" + + "1S8Y/3vvdN8XNKdd/Aye2VYq0j6qLicSkCX68fXg0ruC4U+dRjoKs+HbzKKNgkev" + + "hvz4JLYnwqGLM3u/0UEV/UW5oWN4Pj4fZa3Xr810mJ8QqX2KbO1rVz5RUWRdz0xm" + + "oFjYdlW/sMb9reBMpRwfdDrlVFFCygRCWTXMhfQCWGI59GyLI+/avAeFGXTmHIDv" + + "Z9BbhO+I4vrn4R9oPzONUw4UTNaXTiBZYr0Q2FHqpIBtVWyOsT9DvPE039OnCMUX" + + "sT/PbtFm05AqLmAa1erGEFunZcn83TM6Qd4b7RAwNmTnl3vxA+RgnW/J82xNYwuO" + + "TVGAFooSQYiuJBbT/XSajaWtJef5u7kNdPaeD8AFovi2HGtzuLDGV+gXkSnjb5CX" + + "L6Xh4B/+MRO0J/yI5Wd1kp5TgP9GeHtO/Wm0zSB1WbuAWEZ+pWgvdL+6D08KEZaH" + + "PS78jMQZ21yrLHgTPQ7yVfzB8W35NzR2UtXrX4RcMWzjFxBIGwAbMfIr4/SVIqZI" + + "QaSZz+FqzsoYq8Dq5pkwM3j7InI/q/xGlemCHr7AP6Hktjpgce9tnYo9ISyj+3K2" + + "hZfvUitmvmlV9pzUZAO2wQGigr4aZb0A9mCT2cffwj3yZoorvkFhhGXCE8oGs7T3" + + "zVxWE/ZRdmvXJa0q3kXrFN2CvNXlu8sB+96kDpDxtnPdP8wTHF8xeyaP3+kzUe36" + + "QUdJzdmjeoE5V8EoBSjgie+96xNOtCAVLU+OxLYh3Eigwpu5AY6ucjuBOAuWoGCa" + + "EtNxjXJvhX4OGMC2LX09wMk7zjXmCJrITBXzLPBPPW6PbBYIDTirwafzXGWh0zwR" + + "pSVEqr2vvk9tgVvZvQfyxb3NhFJsJnoI2LCIjj+RYy8sPdM12vyX7GakeFJ753tB" + + "4+49GvXoTvlc7zFp77/AlUFeikx7SX4klK+VNr7IsI0eue3xqod5lEfPSywoAXWu" + + "IC/FI13ym1fsIO99oHBzFN450Xt2sG+9P07Y0N+QazxCYlfwLBkWEbdUsxUmFKdB" + + "Ms9rq/2PiC5xhQlijssd6nDm5WzgqbKDX+l01ltr+xiwRLidVCEJ/cNyim6VFCmK" + + "B5++CofeusjQMSqUC7b2phXmIqhUcgNJKM2cHhYqCiCLyqTa6t87ck/v9FSm81rV" + + "TI7+B6aq5m6VUxgfEr5Wl01g4UMjZiM1LXyUMuTw+5aMaev74DhFlGLIv7gVWy8f" + + "S6Ss2Qmt+aO1aOazBl8hbZP2NmX2SqIfmwEnNyBhM2Gj8NccoXkuLbvcTWkWIOBN" + + "Hm6CdA6JWzP4FtaS4/AGrzingviWnBP15IEtkJ+fURqb9hp41vfMBzqjGpFhFABZ" + + "9ZpyMgrWO8JHNuPkqtmKZXvIf5a5wKfyVa1nLBQM38lONqMiradaXdbRtNlpOYAl" + + "lw1/93YIKQRapBJKKdm5dCdAWsZm/7JBnwuE8otfjrkEHnD9rb0DDFCWLICAzaCH" + + "sLzwsXcwscrU2sq29uulHndvKmqpRe8bESxe7jxT+TfboUJPO13g5M6Q05AgDBl/" + + "BXr3vm7jqmSRQXlIpXJCv+I/mY6Jm36pROqZMu/HkYTrb0jPVmJgtfs6QCWGCE4w" + + "i+6CYRyji5S8JR4UqX39A0/ms9WWuT/cUBsrQADduGCOtbuQ7ZNxkUqekrEVacID" + + "1rXtlaULblL7FN4cP5mgWE8miobJ4SpbpQ1KBRcBiKltUqp8nCIGMzM9btR5+Bab" + + "DF83vot8gj07ybndVY3+bwaAFogG3lX6ybaRPnNHbenTX+4DXxRK8IWqrssOQXL2" + + "cSA7nG60tthi68Z5prAChJXjoOgz8TOuwsY74GyArWZHZ3lItpOfzEyyG3dITKt9" + + "0svAwNeSThYDqD5prtwAhkcLJpsIBvicWulXq0Xaqw2E7geG4LRmBreuVSJ67Fbp" + + "/zWjdoKebJK1zyltXFlQ19g3o9F2r1nMD+oiie0E3dRA1arId67h6HYL5DsiXsH9" + + "OCkadldT6JdOYJZR9lzcgfPDeqi+N4O4Nc3PPb52wnU=" + ), + ( + "yk0AOTleQMp8K97g3ZjrtfWOrSI/xEfUS336yp1a4tQQHn59BPy5HfQQxYvHQ+FO" + + "OU4jIpWwOjv/fPI0LNx219S8Z+M/7+puZPFUUQghjsMRkxsgXAcDW2B/kDSD1A72" + + "BdrZ1noLEt+O8EMP0HdXUA7lhFAo/k9jaK6S+dW1g7tERGbyNuVadRMFj/V5I6qK" + + "zDE2vDUlCRAD6ps/C2X9p8Npxqoweqp5bYDK8gn27aiD+Fii10Z5i8ODUcYEaBJN" + + "2YXigBTuKpoGwFpku4g3ebBKVxdZdH4FFaZ+AmDLmxMELyiDFurCuxSvZhtSBRU4" + + "NPfD7jJBOEf84bslMH6gVrc/tuV2xndGyKk8ISuFQj2edkXNaYyx5kaMe+5Sn1cS" + + "svD0Q65+jyLlWbv3zuOZ5G899NNu1PDQn5U/ev8kgmNspnLMIiB59zjqltGqzfP2" + + "c6ppARmcF1jSliWdtIXPObry/83KwJg9o2lYEUqg2XVaUGmV5sM2US5benizE/Gk" + + "2jsiy3AzWTRjTmdypPLqFLbCIYPiSEaQ67Asdrav7uifFU8BQnz2vcDDeMb54LlL" + + "Ji+wTUBd3guhuQE4tOS3O43uxmKnl1pQVmL5ra0Qf7k7eyDBr4ERUHCnwsSNN5zR" + + "tGSb5P4No8HEdVF4Iz8bzw4hCXE8yb+8DkKTAV2W9Y2dge5QAwKD6dTsFgkNNgpW" + + "rqPHQ2injuoqtXftCtRB5BGm+ASesy6Ywxh4vb2Oi7aemLVtD+/cEiIcvEp7/9fG" + + "C2ewo6UE98GF1ut07ItKA3wGJ1bYRdkuMGTuPIA4vCDDA5gf09yalDTyh2EqOHzc" + + "Q7mmJhFUjmubYFpruD1oP1xuFuFUuk3uIfpxzeyKls/TUFRTxL+dEEvTMwI8xj+p" + + "w1wEh8KnmQlydANbo1JacctvJI3Ly+MXkOXse7yF1WAkiLNtC6O9Q9pE1u3MwB9s" + + "S5xxY2AK7HPP0R1wnqq9fP4hRkerIUYEVk5qpcnQa8u61OT8bAOi8iIRJYVtC1K4" + + "b0IVbpyiZ/0WYEtt8C6rumZCRX58mrb4Mz+yWpx1fNTeStbWfspU4FqoVwz5UwjR" + + "BZ2SteMkdflCfyz3KwYTRJFA4hhJAqOo+/wFiXW/TSdDRLfX5RMzGmrCIGdWPyUr" + + "j810+g93jIFeiKAMM3q64WO3lCgp7A3vgDtvnoDAz1PbubGTIx2ZQDp9sIdnkyUn" + + "sXOhRD/cQnI8X1wsg1D6FVsL+wpB+IXID/Drvs2E7/J37XOqvHcrnTpixQhhStnd" + + "N4gzw6Sw3KeLpfVcz/8MAxHPq7Q0wCiuEqo6QhBGES35pUUsgZvcTlfME7TCG5mh" + + "6XFFmi598pje2nBTY+Epvw==" + ), + ( + "xFz9wnWwjmsLis7NS5jqQAyr25r5X1emWywNq8asbhS5NimjXdqNTgOE8shpRVdi" + + "XL38vjoVcdmAfp1CLOef1I1qYwuDd6xxm1gclB8AOU8nk9WKCPGUZwixoqjIFOgz" + + "UQeydqPqy4Edd64kvdHD016+jPMopgy4RNxAgxI/svcPdQNCQ5k5R2RtM8T+prfO" + + "v8yiWZ7+Xeoi2GgemdJ+dr/s7RpUCphXHGO94O+WcSiDA97Ii2o5uVU1bhpdfCUp" + + "DW17zVxRzunRiaoaxYtGlpe5Cc1G+yvPDA2f4BCDu/CGec2uzxnfImIpcMQUgzrt" + + "8l4ZRTPUX02UUBAf4EZ5swxUDjGFv6egxGqvAL2Ig2cW6Esar1wZ2iBDsXabamM2" + + "MOdXQAyzR83HtpfIBXwNm9A0qigpP/sxvCPKDX+fPs9+gDKSKaDnxTvNCICCbAFd" + + "EMS0fwj1FU4Dkbx/wxvtMz9E1nE7HYVUjZueOLcRUGhk1/sysmQMyIuNM52aRHjm" + + "CEQNYlaFGJpIOEijer7FGsYB5GLnmEy0P3PFyAlzMvyVGUGUrgugUjGpPnEitxMd" + + "HtqtmUY1HsWQUoI3OqVJ76dugQBLSutly/0uToMsqwfTFVv7xFXek5qerC8iJHPm" + + "WPCDqHgHKZMXYoPLfwjXOqgy2dx1tAnwXXdCTaH/71zxf+SMMxuURLfZhyPabdIM" + + "DZMsuQvrc0ra/vCGtGv4Yx6DTzPn9yWGOZlzaO27LC52RWOJKkkpDirdQLn9WJsX" + + "oWNfo5QEm9I6/IYMvhMFoN7RnU3FCUYklDdrhRyq6Zi92lnJqfKLI2dUymstZMtp" + + "csJhYJUsBzIjpgoYFzdUGKlps973u62kIypjrDrBN4q17p8l2WLyUyjI0LxCtj5Y" + + "oGqkQrtxiu9zoje//11ZPgXAgoW2cslg2OhpsBj8msjgCkDWTGQNo+gg+57rzknb" + + "dDrJy23Ugh9J1bc3Oy2BIyhouaYYJaRdoWmiaysB/pNi6g1zAh9kWoJ6lITBysVc" + + "Fw10uVurb8SulE5B3mIQuC7xLaw3VjMIfFjD1fxr3Z5sgLG46FQEB1ScmiiJ+eB3" + + "8e2S4ybqD/LdA8t7Qj+tbRkYO16OpTOxaYg/Xlo/5ab1nyzniMP7YVOqCtXRtog8" + + "cHIBIE03BhEfCnTGNq/Jdjg0tjKIS8Ua2WlRvNuiBXkXRmex086uF05PNr8/hnWs" + + "HK50YP9N8M5BpJVOkH2sl/coeJ6SJ3aYbzDwdS0Ustcnz0j0wOz5/VfCasBqpDN8" + + "Qk7I9FpmCKBHVSpmJTppoxe0hMzviXhooP/nYFJhpKqNcd8XR4u4y9/uXaIfo5g+" + + "w6EvM+zdroqNDDQ6RC1/jQ==" + ), + ( + "GBL3vteT3tP52OKqEdTb4Ah71SCpQ/tkSSORz8DQCwQ/ctGMoSZOBUGBKXEL4okS" + + "XQFubvQvR47SRZUxHlGSFvcrAJXriupz/rE1XntAOxP9qGrm++yduqcOJyQIuBib" + + "sHCt0bcuUC2offENFbrN+in7qDY92p2p79Auj2qeMjH72sQBeQTsMdh0pgAJTXRD" + + "Fi+ZGuacJKryPF4DL6EQgYFguhKQuFhHIP/dptYGu5t9MPWjU0kAt+ApZXbSGWxs" + + "NUGYhbN38DvqJ8PaDvMT3vhasGiH7bP9eOkaP8AzGp41tkL07qo7SDYa9WS06wPu" + + "b2c4usTiPAddEaPKti2reQZPn71I2C9jjgeNr0jVj99zVxHRcwkaNpQYrbrbvDiJ" + + "ch/4gYFncDMv5fDXeZhePO/8CIGMw+xwdz00k7d/KcEZMemhX0JMIV51lEMZN28b" + + "2gHigw4AJEserF2Hme7+jRkxR72+rhKv6x1jLJOb9qTffYhDHXYHpbuFiVqJvQrZ" + + "mlrFNj6A7dGtK6xl2TlLH/Hrwj9Gk2FKZ7HMaMguwZiPLeL7/GSQnF4vJNVQ8Sw7" + + "xCySp27MfNsXgMOjcutw3rZyPsuItBs8Sjt3CPL6bqilam6offE3FUKCxEvNnluc" + + "HQKIBsUw7FbnwSpTyKX+8jH1PoFqQXv+rhfAFL6Fc21J3Cd3ABSxjAcZnTmwh8jN" + + "LfUxhlUS84/sSzIdVFeUC8cJ/qPWGu6loTntTG8dYoT19KhKdUYPA11p3AJlJToR" + + "SFQrkh3WLIGsIrpcbLXatfVxagcMr6s7suif7TU5CzI+4tOcngK3poFyhyfJ9XTu" + + "ZWTXX9paHKSzldDM1tz/5eJi+3gPNCiH+SUrm9zVVUMgG4Qdf+FpmIHdfUl73/+9" + + "fREbPOiuNykHpMStiA8J0lbqQAhbw0SgDk8+SC9UIeNSFa58gJEYudVkscsUvZw/" + + "r/PLDo9kXWUeyvzc5RTefdxkK0/mDoydgYPNbzNICTvyXNlvLI92OahSMAvjwSAz" + + "8JGFqWcccJGOsyDm0VlMeF8o7coym9rASKEA4YWS+ar/VRqh5e7AEP7Y35scpIP9" + + "E9T/m4OPWDa0chvwwf70FgnPFdjb/2NofawtIIGRpWXRvIDAQXN6dl9UALUrb1JG" + + "D9PcYtGqYV8X19xr90hYqu/J7eilrICwCquICe26hDGviTaXkus3zIvpXzON4NXg" + + "Fl7zRwLufD3J73MxnOLrD9WI5HQBC8kn2LXL6CXe9wr8uJY2MD1iRFCpZlcr9NNe" + + "XvhnaJXVsjyCAtrjE6F/VXIuK3nDeUaeCHyXeDsli2/UMJW9ySK6IdyS3Zl6K/yp" + + "ZvVi2glEVbVZd9c8JTurUw==" + ), + ( + "DXlYDEzpFYyw2RCBs8tFX6m+7S3AKNOp3Z2zPnM+h7syTk4jIKCLi6vgJoyr9I8f" + + "d7+tpRv1Nr+2+nkt/kjShdJCV5OFrOOPVBqCs4NBD62nyJQhiaWSClPlZITyXcTl" + + "KI0/qLZsuRQeAoVXjhLjvhBFQQS6aFJ9HnSClLve1Rfw3pWfqWXNMWHpwGCnHKeG" + + "L1EKXt3zFFypkXHrj6CK/vkCd+6Tj7qOV6tcbx/hkdg2zUAvQKnEVjxLk0eJ3Kfs" + + "HjjCAwBvuKQAtdKPTbjV2iWFE/AbC8cgyPHyY3yenXnOsHL1qM5cqk5UC6HYynxz" + + "sWrVjxMUYom/QJMqrMgJN8kDx4mMZO9Kr8+mPIXE5UdgogXtSdUnDPmjy3yZA37V" + + "TBvDt+hnMOkk6BmYJxAxGtz5kCd7VSGWcxN9nNmCAtxYENHnh6W74aPN2OSAjoq1" + + "aR4mSIVD0/drdUea+Ldk2lxgC9rvNIJen+zquXeOX5caPFvHSchlvCkfQkhxOnuV" + + "RUHuLS5EqcCEbiBF33lRqxmlLZe/zoqM38HA8436cqg0TuxaGGtB0AIKW/eFa0yL" + + "df+JY/gWUws5cP/wbDzFSwWRJpbvk699Z7byw35qxT2fNVr/dqRxxm0YsDX3wMqX" + + "JskyL5A05ZxrQV5Ly2a+5g5+lsZy6Sy5aqBxU0RnfHRDOgRjvmoJDYIUEhratShx" + + "nUjZC8WOnXWoe0/j3mN+QsboOboVE7dmc3NdIPkXG9wAT5iZ4+XrREaasgNRKBBU" + + "WcWo3V+dxVdyprtICo7hlv1TItkgSRegEO+QmCy0aZ0Kgf4hQWEcPQytG8qo7b6r" + + "eK1v4yG5SLEfExikOIuaYKrXTvlgxGcQ2TziZAIQGhCRlVMkVLteZ2hoBzKz3S+A" + + "A1nt9YpJK0BtDdeHfC1an0/jutEUCOJam+euwN+mDbT08p8qVUmUSgf2o21vPtOA" + + "lIQoLqZVq6wb8+dDifMAZnoyXXLRO1wA9L973qCv3Vkds3PCzYV77F4BrUlCxvgt" + + "7oME3Gc25092r0SDbpAKF6lY8Upc7bRIw8ePgJJ2kFl7loUbbA2/zQT4Tfe0KApI" + + "ELi9mIqmCvweQFFpHs2hx9et+vztCtb2OIiZ2I6WzdpcBlUdehwAltgX1fCAGGdW" + + "xlx8SUwjF257U8tZgo0jZNJMg6gKBDD9O6fnbO8hOgDqIPGimScYeQ7tjpMm98IB" + + "UmKCJ9m87mYoyPNZ1b5Z5n+WLlirLLwNj6urBE9YmUD8QVP/P3HDYafw9kRHzQaf" + + "YylmzqWZVMQywNxM8AcHEqLgxzAMy8EQZOPKa6ibfKIbXJHzVfx3bL3r7E7gnugm" + + "fmQECisZtw1YylqXGPCKTQ==" + ), + ( + "n+rm+JVUflE2xL9LB+IxUmf85aSrEXtyeJDWONs76lEL3omN8rLP4Fq/s2kVn4Nr" + + "uobi4mPG2oINvtU+XaxVIb/90rqtYmj5UQekrfIVjkosqPevbonXiHFWGtvQBHVl" + + "zIP1qoeNim5P/3UnCA07SaK5dFrNSYr0pAFCudEcwe6sAqSE5PomswjacRdehXAL" + + "ePPuwYcJX1n/L6CMCUpb0c26ilxihihLwDikvT556AfB0QEAsNRrNORzvMtZD1Gz" + + "dIaEY+2mUCrIz/jAzP7slWTEOHoHtgIeFNFj7AZ3ztc2GcIAmiIjSPbXPsaCZNIN" + + "tT1jvIEzRSltchQl1ck5BPi0KCJ8WvajfSj/uM2e0I42kVJDbnkKTGsbUUlWns+T" + + "WiqgvS9UpMjfdzZsvYhabN54/1VqgvpVhg1/ZO3MWkDmNhsFLyopm/FHwE3KylJV" + + "+zPZ+ZwTm/oH639Fbvyk1WIXQS/5PVZSTSSfDgEfKocOTFEX+9WFDKJvrInAQl+Y" + + "eyfd/dOKL+VP5YFiWRQiiUCXJrYfqVHJ0/QYy+DqqgihSyYkRJuFj+0zuUvYmjIZ" + + "qwYCecJY7fceDkUFSwkRHyJK471Dr0zVxoSzW0M395u9J0kA+1sQIgTrpLlVKXSK" + + "4nNYEhuhDD8ja1yGW17XvdMPl2o5RE+9/fbSZXM1BFXoYV2gOaci6dJQciZgepZp" + + "6AN8MQOrEmAsJyvE/ZnMta6HZ3ngwPxCbvT3clB07uUxCsDy+ogpw3OL3cIz29l2" + + "1RDZacWR9rMIZTxAD42aNN6q49MnJt4N9cMTf8w3P5B2rLO4RKaDnaFWwHMN2SPB" + + "pRbRP1iFFIedtW9yziGXq/BiUD1S5fNlO6r4Gi4bZ/dIUtHxQY2Z8A4kIskxTNp1" + + "iplE5zptN9j+GJCOxg0qxXt/yr2c+ybzvY5nmk/ONjphs4MnTONb8O1YOjphUDXW" + + "7KpcXs9Hu68rqkSBEa+MhGmDz8NbDTP1Q4bVgAIZtEoWdlWMEDdEMihjU55XgNQB" + + "QACfhKn5nJe+SIgxjoqGZc+13uZDcowNySBXr8R1yujvwN1E2ODX2up7T9mFDXsr" + + "hFBkT7+mW1mOHJUxNJ3L70B+7iepvU1NEbBL2tVGcueSMGduUxXxTebNhCCQxrjC" + + "GJNKc5jCAVgK70SzHQ/HW1PApA8Vma+AV9aOopw32M0it1kAvuzHLbZTHp8OqFIB" + + "WEhzUCxK/cVFK8+yixqYU9/Eky936jzwaO6+QATdC/kJjTOTKAQ4yIR/q1HW16sn" + + "4Do8AsRi+Rtdx7G9UZbgu8rCShuFHzfF83uHwHsl8khazOQetuanBG/GxBdaeIJF" + + "mTymL1LOru69mA9gwhuFFQ==" + ), + // Windows 10 RSACng recomputes this to D-phi instead of D-lambda + ( + "g/NxB1drS4SOW29bCBIGfxwtQO2gE+KTdoKmY1HvD+FesXeAlwrSiGqA+vleTvm3" + + "SzWOgy8I8zWvHaacEbRe75Br0UI9Zst9aq0rlMmZ7iQlYKRjROeM8usgyjoAG7DZ" + + "4uiimqy/PXf5z+Jfg08jsbIe5uIRJWMo2xCQNlD+kSU8vyLbG8v/d+W53U19AF0m" + + "Mj4LhlxDzpP43RnObwgtkIJCIZ6urwojM+IvHe5T8ciDDjZpBAXGaTwBUHVz9BfB" + + "y8nGAm75JnYSvJe9D13vbMRykoVGsnsbkcUja19Us8RSHrVpavWE5FQVMVmX/0KR" + + "qgtxFZqhSvznsJMwS9k+S/IVIK9D2e+14XLuBgCFFwj6T/rvr7xoDcB6nMiEOFSz" + + "VUlquWZzbP0zcoWS33P+Mvol3/ujtL0YgpZT7gkM1+1Rqucs7ZdaUdcsHcvI/LBq" + + "SrDll/SqY7+xthfD/67i9kOD7NDlxaOmnPwViG6/EXlMd0UtoM0GgBIBdrp5++kL" + + "4HVeTzWsrdIxvs9ahFBp4kfGwQ950NWx+AfQjZ/BhQKlxrbt24TYgtnlLoiA+vb3" + + "wYYgjxGkOIzUJHBhf8sS9l7RpsF+FmMjZGxZplNqUTtGKxw6Epw7dzUEMcYWo3K5" + + "0fk753tYZAo+DQ8teovR5UHD+NMJzhY4e84txGDKMLPR1G/AkQtTCHi/IdglsSOQ" + + "UqfJjgxCxU1Q29bid1sc7Z+Ttpi2DyQ3dVHmI8PBCgOTDTWsK1XwCyij01wxsl0a" + + "WYGWuN5uJA1dZ4M855M+Ml12SDFEQx34h1RxDvQyaDgYPcaAzOnO7ryKJU93uZ/0" + + "l7QDvvV9L6s/bAbQHhe6PXWt9jOWPV7YkzMwPPiQv/pH3KfmxqGxq4BkrSNwB0Il" + + "UtFilvnbtWevl0OM90HwHPWf6i44096Hy9v8oglzHDiADZHovariyE2m/CN0cJcG" + + "aZUhdVKlSUN/siX6R2l+gbEkV6GV1l8ajdIT2V+rb3J9hyW8VR52x4GdF3oFUtEM" + + "5MjKwF7ktpwYbbzRZM9Shdf/tVoPxjrrGA3l3H70iHn655idPNrZETzGmaan1Sjy" + + "v3HMyqq3wps3kavweEYk6VhNSjCugvjiI/pF34ZpsGn+JPKG2gbIJ6DXZQFHVtMd" + + "OLmXUNt8MuOe4GFOWrY0Jsk9lPRYpshXkbFYKXqlsJ7HXF2r/wQh3739kIxKNLP6" + + "nxen6dJB84bbFdnI6Jg7328BaJiU5omFll09ut88ORDq0/svRYUrjzv48lVtNdvr" + + "lwog3sw0qhYSouOlcFz+LTWtqZMOK8eIak1vWsNfZO3yVhvCFLoHf/HcYGu7N8K/" + + "Ag9ZzyYvjLduo7JEDsAUpsnrLX6VJfJdUhCldRNRXJLNfMU9TDpA/2P37kcQhHBZ" + + "xPJpnViq6RiIvSViXiCQO5+WMmUdw9KfZ/kK/jQnU3sloCGCjClhxSKIPwj0i3ez" + + "Yq6hN2T7xYtdiVFh9d8yff0kz91Wuxd5JUUUpV45HiUg1rNuTk42OCnQxAVsch2Y" + + "sKbGcUzfRLsIBrRHRt2zkyofWCh6+R2bN3UkFeaAxe8FPu5uKAWLyuwB6hp7HMcC" + + "fUKp3XLKNDaXJ63CoHUAcqht6HffmvWmbYpkk1v3tZWP0oYLW38EwKWZACqKYzH3" + + "aUQWH7i3XuYgdVun7YckT71VNKMYhO7mAqvoWe6Blr1AljxHaCPS/gGC590oDZSv" + + "KV63vJDMpZ8rbMe75n/zSGt6w4eA10tli9tpf0ZVkUeL9N9tMcd8esqw1p+SJR5f" + + "uqsVzn1fyLxPEZEu+2RKlUZoDa02xczqcbWBBbiCKAW99GFl0USPt9ZuP0ruaIe4" + + "MI7Zw42jzGOk6lz0SqCkqIztLyz3J0S2x1rnyMdnyNaQV03htXv5/TdeUsf41NtH" + + "sdcVzvHepoMS9rgJs7+cxMfyDkLBav9NRl9LwQtovfhHVFbmW5vozjLnpJ0RnNWF" + + "Ap9fOrm/C64v13Tc53dKbkKZKPYFhhxjsj+NS01SRB6t3x2JsG7XT8+bynGwq+q1" + + "uF8/CdCXzJEkTlagI/8pIhdDl4RbyqT2zEkAC/rbh+DjCxbDk6ic7j52kWISZv4x" + + "gSZeftEmVM3lyNTLpPU+SJn2DGAXrmUdODUlcMJuM/lQmh5lPuHCfmxUWk7n6lEa" + + "KIs4locNJ7UpCCsS2KFmb8oC9rcOcqPvbHDQKHL2TxSHlcNyW1sA253bUrT9Ni5f" + + "27J9BF9Y6/hs9s7aF1EGYYTvSGCf3LXOREkkV9pQWPzsIIq2hm6MTsfNJ2vOU0x7" + + "oOpedAnT3Pl5uHR1/AIdG9LxO1Y67Z9PSvUsU7BJWTePmRAlHMNX0OxWedk6chET" + + "Dm3s+uc06j+cU3CthqC5BjH87GqG02FdB5G62Dld7bdCDUlgHAQ+25yKSCVgbyK3" + + "AXrz9vUcu3fz9k+v/FCy8KIjVEixoFq/LMvAVwKbMn472ymkj7qFn9SVqa39LtHA" + + "D2/g4SS9is4SXbzFmPAusiUcwgPJP57RnIUlcRjtCiLM8P2xI7A4KvZZnSvU9l2J" + + "TyDMqKY3/GUQOtPn8UO5IqMJG8TrFTq8NPIK2KS4Vo0ZJ8lq550HCyiy8oyNUxfZ" + + "KtSKYf1oqXHqc4ZUE+tdgR+cXvs0cygn6Su/Rj1mmOt2/khtgwYyuN5uScPK34mW" + + "vpCkUXUGrMkvA07fAiWZBKYtEWti3Tr9QzBqrM8VzWk=" + )); + } + + [Theory] + [InlineData(true)] + [InlineData(false)] + public static void TestWriteDiminishedDPParameters(bool includePrivateParameters) + { + // This test checks for the base64Binary version of DP (leading 0x00 written), + // instead of the CryptoBinary version (leading 0x00 removed). + TestWriteXml( + TestData.DiminishedDPParameters, + includePrivateParameters, + ( + "tz9Z9e6L1V4kt/8CmtFqhUPJbSU+VDGbk1MsQcPBR3uJ2y0vM9e5qHRYSOBqjmg7" + + "UERRHhvKNiUn4Xz0KzgGFQ==" + ), + "AQAB", + ( + "r+byNi+cr17FpJH4MCEiPXaKnmkH4c4U52EJtL9yg2gijBrpYkat3c2nWb0EGGi5" + + "aWgXxQHoi7z97/ACD4X3KQ==" + ), + "83J7HoZ2IFWU08c6AidNTxqYBEopUchczRLG/FetGXs=", + "wLI66OpSqftDTv1KUfNe6+hyoh23ggzUSYiWuVT0Ya8=", + "AAiO/cUU9RIt8A2B84gf2ZfuV2nPMaSuZpTPFC/K5Us=", + "rCTM8dSbopUADWnD4jArhU50UhWAIaM6ZrKqC8k0RKs=", + "wsmVlMaMQHY36wRrMflOgRzNDMqqnu32O4Y1s4+GgQs=", + // RSACng recalculates this D value + ( + "VEdFOzhWxK+zSJJ24rhs+tSl59Zot7VHHbdzk92R36s3sN9VgL82Mf+Ml4743oq5" + + "QstCaeRtW0L1TOBi0Dqxsw==" + )); + } + + [Theory] + [InlineData(true)] + [InlineData(false)] + public static void TestWriteUnusualExponentParameters(bool includePrivateParameters) + { + // This test ensures we pay attention to the Exponent value, instead of assuming + // AQAB (0x010001 / 65537) + TestWriteXml( + TestData.UnusualExponentParameters, + includePrivateParameters, + ( + "9rqCgyYMOZEbi12xig/zanjVWagNZCk90Aw1h1YAmzzokeHCCK7bnBWrtSSUEAj3" + + "U87XfM91zxdFP0zRApIRyzHfte1rI4+NljeOGoEgcUkXBeBDHaTXe7mZCqkLL4CJ" + + "m/F52slQ9tUtvL+v2i3vKjUpxbyIMuWtTlyPXNAejpM=" + ), + "AbE=", + ( + "fVvObmKOMVmwlNngaZ7d0ZarEcPxhRH/etnchvqf8EcmWX3v402b6/p0zYz33ZQ5" + + "FLTE/JsR4TzlGtc2wguLsoKTYoACMK8Vnlo5fG/KCcnYxSGIjVLuOlBNs/qgiA1n" + + "3p1oMgPINc5zOBntOP7SXNYS8BczmQ0f+z2hNSQDFrE=" + ), + ( + "/viU9MUtmqmlQG4n6SdGzym0vZPhmSml2ot2KOPRhP8AGf3TjEHe+WPGfIVacDdv" + + "bZyWStgMNx0EtKs0QcByjQ==" + ), + ( + "97lpk/oWI0YxJ0q7WjTTuErRzOchPWbsaJCS2dsfAb0CyT4UgmpHjsRH2Eh5dGZ/" + + "aAh+dzkkgPMWg4nIHG9Nnw==" + ), + ( + "dADDeWmsGgY8ZzdwKaIgzpWioxxCkyJR9g3JkIjCDvv/dHjNn5crgW0/G67HAMz0" + + "BrXM81g+UKZUUjKyFaM7zQ==" + ), + ( + "Mur83pA5wqsaEPHMpJLW+PJonDj3ddvOcufqKAyFfIOsBxKsH4kiN/MiRw984Yhb" + + "ONtQ+lpgxyRd5wJOYOSfnw==" + ), + ( + "seFE3fshp/hUjgUdESvD41YpF+vZmz2quo5VaADYEATWU43kvoH2IHPzfKu0YS3Y" + + "gTIMHP3LsKsiX3tB2DJZow==" + ), + // RSACng recalculates this D value + ( + "Af6NLM+IFJEizysHpJbkHFpAZO/q0v1gktPBw0+foqiyEI0O3vYuHe+e8vqt1Y+9" + + "as1ZPjNW+bFCezDOQMKCzeT8hs2sQMZGvnJO4NDn3mkHhXakf+vKxZUPMyd6aJCB" + + "EhZJOKZ1zafwYOR8NdopvyZQl5n4F/ZRYat0BOsLr30=" + )); + } + + [Fact] + public static void FromToXml() + { + using (RSA rsa = RSAFactory.Create()) + { + RSAParameters pubOnly = rsa.ExportParameters(false); + RSAParameters pubPriv = rsa.ExportParameters(true); + + string xmlPub = rsa.ToXmlString(false); + string xmlPriv = rsa.ToXmlString(true); + + using (RSA rsaPub = RSAFactory.Create()) + { + rsaPub.FromXmlString(xmlPub); + + ImportExport.AssertKeyEquals(pubOnly, rsaPub.ExportParameters(false)); + } + + using (RSA rsaPriv = RSAFactory.Create()) + { + rsaPriv.FromXmlString(xmlPriv); + + ImportExport.AssertKeyEquals(pubPriv, rsaPriv.ExportParameters(true)); + ImportExport.AssertKeyEquals(pubOnly, rsaPriv.ExportParameters(false)); + } + } + } + + [Fact] + public static void FromXml_MissingModulus() { using (RSA rsa = RSAFactory.Create()) { - Assert.Throws(() => rsa.FromXmlString(null)); - Assert.Throws(() => rsa.ToXmlString(true)); + Assert.ThrowsAny( + () => rsa.FromXmlString( + @" + + + r+byNi+cr17FpJH4MCEiPXaKnmkH4c4U52EJtL9yg2gijBrpYkat3c2nWb0EGGi5 + aWgXxQHoi7z97/ACD4X3KQ== + + This is not base64. + + wsmVlMaMQHY36wRrMflOgRzNDMqqnu32O4Y1s4+GgQs= + + + rCTM8dSbopUADWnD4jArhU50UhWAIaM6ZrKqC8k0RKs= + + + AAiO/cUU9RIt8A2B84gf2ZfuV2nPMaSuZpTPFC/K5Us= + + + wLI66OpSqftDTv1KUfNe6+hyoh23ggzUSYiWuVT0Ya8= + +

+ 83J7HoZ2IFWU08c6AidNTxqYBEopUchczRLG/FetGXs= +

+ AQAB +
+")); + } + } + + [Fact] + public static void FromXml_MissingExponent() + { + using (RSA rsa = RSAFactory.Create()) + { + Assert.ThrowsAny( + () => rsa.FromXmlString( + @" + + + r+byNi+cr17FpJH4MCEiPXaKnmkH4c4U52EJtL9yg2gijBrpYkat3c2nWb0EGGi5 + aWgXxQHoi7z97/ACD4X3KQ== + + This is not base64. + + wsmVlMaMQHY36wRrMflOgRzNDMqqnu32O4Y1s4+GgQs= + + + rCTM8dSbopUADWnD4jArhU50UhWAIaM6ZrKqC8k0RKs= + + + AAiO/cUU9RIt8A2B84gf2ZfuV2nPMaSuZpTPFC/K5Us= + + + wLI66OpSqftDTv1KUfNe6+hyoh23ggzUSYiWuVT0Ya8= + +

+ 83J7HoZ2IFWU08c6AidNTxqYBEopUchczRLG/FetGXs= +

+ + tz9Z9e6L1V4kt/8CmtFqhUPJbSU+VDGbk1MsQcPBR3uJ2y0vM9e5qHRYSOBqjmg7 + UERRHhvKNiUn4Xz0KzgGFQ== + +
+")); + } + } + + [Fact] + public static void FromXml_MissingQ() + { + using (RSA rsa = RSAFactory.Create()) + { + Assert.ThrowsAny( + () => rsa.FromXmlString( + @" + + + r+byNi+cr17FpJH4MCEiPXaKnmkH4c4U52EJtL9yg2gijBrpYkat3c2nWb0EGGi5 + aWgXxQHoi7z97/ACD4X3KQ== + + This is not base64. + + wsmVlMaMQHY36wRrMflOgRzNDMqqnu32O4Y1s4+GgQs= + + + rCTM8dSbopUADWnD4jArhU50UhWAIaM6ZrKqC8k0RKs= + + + AAiO/cUU9RIt8A2B84gf2ZfuV2nPMaSuZpTPFC/K5Us= + +

+ 83J7HoZ2IFWU08c6AidNTxqYBEopUchczRLG/FetGXs= +

+ AQAB + + tz9Z9e6L1V4kt/8CmtFqhUPJbSU+VDGbk1MsQcPBR3uJ2y0vM9e5qHRYSOBqjmg7 + UERRHhvKNiUn4Xz0KzgGFQ== + +
+")); + } + } + + [Fact] + public static void FromXml_MissingDP() + { + using (RSA rsa = RSAFactory.Create()) + { + Assert.ThrowsAny( + () => rsa.FromXmlString( + @" + + + r+byNi+cr17FpJH4MCEiPXaKnmkH4c4U52EJtL9yg2gijBrpYkat3c2nWb0EGGi5 + aWgXxQHoi7z97/ACD4X3KQ== + + This is not base64. + + wsmVlMaMQHY36wRrMflOgRzNDMqqnu32O4Y1s4+GgQs= + + + rCTM8dSbopUADWnD4jArhU50UhWAIaM6ZrKqC8k0RKs= + + + wLI66OpSqftDTv1KUfNe6+hyoh23ggzUSYiWuVT0Ya8= + +

+ 83J7HoZ2IFWU08c6AidNTxqYBEopUchczRLG/FetGXs= +

+ AQAB + + tz9Z9e6L1V4kt/8CmtFqhUPJbSU+VDGbk1MsQcPBR3uJ2y0vM9e5qHRYSOBqjmg7 + UERRHhvKNiUn4Xz0KzgGFQ== + +
+")); + } + } + + [Fact] + public static void FromXml_MissingDQ() + { + using (RSA rsa = RSAFactory.Create()) + { + Assert.ThrowsAny( + () => rsa.FromXmlString( + @" + + + r+byNi+cr17FpJH4MCEiPXaKnmkH4c4U52EJtL9yg2gijBrpYkat3c2nWb0EGGi5 + aWgXxQHoi7z97/ACD4X3KQ== + + This is not base64. + + wsmVlMaMQHY36wRrMflOgRzNDMqqnu32O4Y1s4+GgQs= + + + AAiO/cUU9RIt8A2B84gf2ZfuV2nPMaSuZpTPFC/K5Us= + + + wLI66OpSqftDTv1KUfNe6+hyoh23ggzUSYiWuVT0Ya8= + +

+ 83J7HoZ2IFWU08c6AidNTxqYBEopUchczRLG/FetGXs= +

+ AQAB + + tz9Z9e6L1V4kt/8CmtFqhUPJbSU+VDGbk1MsQcPBR3uJ2y0vM9e5qHRYSOBqjmg7 + UERRHhvKNiUn4Xz0KzgGFQ== + +
+")); + } + } + + [Fact] + public static void FromXml_MissingInverseQ() + { + using (RSA rsa = RSAFactory.Create()) + { + Assert.ThrowsAny( + () => rsa.FromXmlString( + @" + + + r+byNi+cr17FpJH4MCEiPXaKnmkH4c4U52EJtL9yg2gijBrpYkat3c2nWb0EGGi5 + aWgXxQHoi7z97/ACD4X3KQ== + + This is not base64. + + rCTM8dSbopUADWnD4jArhU50UhWAIaM6ZrKqC8k0RKs= + + + AAiO/cUU9RIt8A2B84gf2ZfuV2nPMaSuZpTPFC/K5Us= + + + wLI66OpSqftDTv1KUfNe6+hyoh23ggzUSYiWuVT0Ya8= + +

+ 83J7HoZ2IFWU08c6AidNTxqYBEopUchczRLG/FetGXs= +

+ AQAB + + tz9Z9e6L1V4kt/8CmtFqhUPJbSU+VDGbk1MsQcPBR3uJ2y0vM9e5qHRYSOBqjmg7 + UERRHhvKNiUn4Xz0KzgGFQ== + +
+")); + } + } + + [Fact] + public static void FromXml_BadBase64() + { + using (RSA rsa = RSAFactory.Create()) + { + // The D value is missing the terminating ==. + Assert.Throws( + () => rsa.FromXmlString( + @" + + + r+byNi+cr17FpJH4MCEiPXaKnmkH4c4U52EJtL9yg2gijBrpYkat3c2nWb0EGGi5 + aWgXxQHoi7z97/ACD4X3KQ + + This is not base64. + + wsmVlMaMQHY36wRrMflOgRzNDMqqnu32O4Y1s4+GgQs= + + + rCTM8dSbopUADWnD4jArhU50UhWAIaM6ZrKqC8k0RKs= + + + AAiO/cUU9RIt8A2B84gf2ZfuV2nPMaSuZpTPFC/K5Us= + + + wLI66OpSqftDTv1KUfNe6+hyoh23ggzUSYiWuVT0Ya8= + +

+ 83J7HoZ2IFWU08c6AidNTxqYBEopUchczRLG/FetGXs= +

+ AQAB + + tz9Z9e6L1V4kt/8CmtFqhUPJbSU+VDGbk1MsQcPBR3uJ2y0vM9e5qHRYSOBqjmg7 + UERRHhvKNiUn4Xz0KzgGFQ== + +
")); + } + } + + private static void TestReadXml(string xmlString, in RSAParameters expectedParameters) + { + using (RSA rsa = RSAFactory.Create()) + { + rsa.FromXmlString(xmlString); + Assert.Equal(expectedParameters.Modulus.Length * 8, rsa.KeySize); + + bool includePrivateParameters = expectedParameters.D != null; + + ImportExport.AssertKeyEquals( + expectedParameters, + rsa.ExportParameters(includePrivateParameters)); + } + } + + [Fact] + public static void FromNullXml() + { + using (RSA rsa = RSAFactory.Create()) + { + AssertExtensions.Throws( + "xmlString", + () => rsa.FromXmlString(null)); + } + } + + [Fact] + public static void FromInvalidXml() + { + using (RSA rsa = RSAFactory.Create()) + { + Exception exception = Assert.ThrowsAny( + () => rsa.FromXmlString( + @" + + + r+byNi+cr17FpJH4MCEiPXaKnmkH4c4U52EJtL9yg2gijBrpYkat3c2nWb0EGGi5 + aWgXxQHoi7z97/ACD4X3KQ== + + This is not base64. + + wsmVlMaMQHY36wRrMflOgRzNDMqqnu32O4Y1s4+GgQs= + + + rCTM8dSbopUADWnD4jArhU50UhWAIaM6ZrKqC8k0RKs= + + + AAiO/cUU9RIt8A2B84gf2ZfuV2nPMaSuZpTPFC/K5Us= + + + wLI66OpSqftDTv1KUfNe6+hyoh23ggzUSYiWuVT0Ya8= + +

+ 83J7HoZ2IFWU08c6AidNTxqYBEopUchczRLG/FetGXs= +

+ AQAB + + tz9Z9e6L1V4kt/8CmtFqhUPJbSU+VDGbk1MsQcPBR3uJ2y0vM9e5qHRYSOBqjmg7 + UERRHhvKNiUn4Xz0KzgGFQ== + +(exception); + Assert.NotNull(exception.InnerException); + } + } + } + + [Fact] + [ActiveIssue(37595, TestPlatforms.AnyUnix)] + public static void FromNonsenseXml() + { + // This is DiminishedDPParameters XML, but with a P that is way too long. + using (RSA rsa = RSAFactory.Create()) + { + Assert.ThrowsAny( + () => rsa.FromXmlString( + @" + + + r+byNi+cr17FpJH4MCEiPXaKnmkH4c4U52EJtL9yg2gijBrpYkat3c2nWb0EGGi5 + aWgXxQHoi7z97/ACD4X3KQ== + + This is not base64. + + wsmVlMaMQHY36wRrMflOgRzNDMqqnu32O4Y1s4+GgQs= + + + rCTM8dSbopUADWnD4jArhU50UhWAIaM6ZrKqC8k0RKs= + + + AAiO/cUU9RIt8A2B84gf2ZfuV2nPMaSuZpTPFC/K5Us= + + + wLI66OpSqftDTv1KUfNe6+hyoh23ggzUSYiWuVT0Ya8= + +

+ r+byNi+cr17FpJH4MCEiPXaKnmkH4c4U52EJtL9yg2gijBrpYkat3c2nWb0EGGi5 + aWgXxQHoi7z97/ACD4X3KQ== +

+ AQAB + + tz9Z9e6L1V4kt/8CmtFqhUPJbSU+VDGbk1MsQcPBR3uJ2y0vM9e5qHRYSOBqjmg7 + UERRHhvKNiUn4Xz0KzgGFQ== + +
")); + } + } + + + + private static void TestWriteXml( + in RSAParameters keyParameters, + bool includePrivateParameters, + string expectedModulus, + string expectedExponent, + string expectedD, + string expectedP, + string expectedQ, + string expectedDP, + string expectedDQ, + string expectedInverseQ, + string alternateD = null) + { + IEnumerator iter; + + using (RSA rsa = RSAFactory.Create(keyParameters)) + { + iter = VerifyRootAndGetChildren(rsa, includePrivateParameters); + } + + AssertNextElement(iter, "Modulus", expectedModulus); + AssertNextElement(iter, "Exponent", expectedExponent); + + if (includePrivateParameters) + { + AssertNextElement(iter, "P", expectedP); + AssertNextElement(iter, "Q", expectedQ); + AssertNextElement(iter, "DP", expectedDP); + AssertNextElement(iter, "DQ", expectedDQ); + AssertNextElement(iter, "InverseQ", expectedInverseQ); + AssertNextElement(iter, "D", expectedD, alternateD); + } + + Assert.False(iter.MoveNext(), "Move after last expected value"); + } + + private static IEnumerator VerifyRootAndGetChildren( + RSA rsa, + bool includePrivateParameters) + { + XDocument doc = XDocument.Parse(rsa.ToXmlString(includePrivateParameters)); + XElement root = doc.Root; + + Assert.Equal("RSAKeyValue", root.Name.LocalName); + // Technically the namespace name should be the xmldsig namespace, but + // .NET Framework wrote it as the empty namespace, so just assert that's true. + Assert.Equal("", root.Name.NamespaceName); + + // Test that we're following the schema by looping over each node individually to see + // that they're in order. + IEnumerator iter = root.Elements().GetEnumerator(); + return iter; + } + + private static void AssertNextElement( + IEnumerator iter, + string localName, + string expectedValue, + string alternateValue = null) + { + Assert.True(iter.MoveNext(), $"Move to {localName}"); + + XElement cur = iter.Current; + + Assert.Equal(localName, cur.Name.LocalName); + // Technically the namespace name should be the xmldsig namespace, but + // .NET Framework wrote it as the empty namespace, so just assert that's true. + Assert.Equal("", cur.Name.NamespaceName); + + // Technically whitespace should be ignored here. + // But let the test be simple until needs prove otherwise. + if (alternateValue == null || + !string.Equals(alternateValue, cur.Value, StringComparison.Ordinal)) + { + Assert.Equal(expectedValue, cur.Value); } } } diff --git a/src/System.Security.Cryptography.Algorithms/src/Resources/Strings.resx b/src/System.Security.Cryptography.Algorithms/src/Resources/Strings.resx index bf59d78a60ae..5b97a598c286 100644 --- a/src/System.Security.Cryptography.Algorithms/src/Resources/Strings.resx +++ b/src/System.Security.Cryptography.Algorithms/src/Resources/Strings.resx @@ -147,6 +147,9 @@ Only named curves are supported on this platform. + + The provided XML could not be read. + The hash algorithm name cannot be null or empty. @@ -183,6 +186,9 @@ The specified DSA parameters are not valid; Q's length must be one of 20, 32 or 64 bytes. + + Input string does not contain a valid encoding of the '{0}' '{1}' parameter. + The specified Characteristic2 curve parameters are not valid. Polynomial, A, B, G.X, G.Y, and Order are required. A, B, G.X, G.Y must be the same length, and the same length as Q.X, Q.Y and D if those are specified. Seed, Cofactor and Hash are optional. Other parameters are not allowed. diff --git a/src/System.Security.Cryptography.Algorithms/src/System.Security.Cryptography.Algorithms.csproj b/src/System.Security.Cryptography.Algorithms/src/System.Security.Cryptography.Algorithms.csproj index ef259e718549..230884a6141a 100644 --- a/src/System.Security.Cryptography.Algorithms/src/System.Security.Cryptography.Algorithms.csproj +++ b/src/System.Security.Cryptography.Algorithms/src/System.Security.Cryptography.Algorithms.csproj @@ -83,6 +83,7 @@ + Internal\Cryptography\BasicSymmetricCipher.cs diff --git a/src/System.Security.Cryptography.Algorithms/src/System/Security/Cryptography/DSA.Xml.cs b/src/System.Security.Cryptography.Algorithms/src/System/Security/Cryptography/DSA.Xml.cs index 9cae3c6de98a..3c84c5a8ca0d 100644 --- a/src/System.Security.Cryptography.Algorithms/src/System/Security/Cryptography/DSA.Xml.cs +++ b/src/System.Security.Cryptography.Algorithms/src/System/Security/Cryptography/DSA.Xml.cs @@ -2,18 +2,140 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System.Text; + namespace System.Security.Cryptography { public abstract partial class DSA : AsymmetricAlgorithm { + private const string CounterElementName = "PgenCounter"; + + private static byte[] ReadRequiredElement( + ref XmlKeyHelper.ParseState state, + string name, + int sizeHint = -1) + { + byte[] ret = XmlKeyHelper.ReadCryptoBinary(ref state, name, sizeHint); + + if (ret == null) + { + throw new CryptographicException( + SR.Format(SR.Cryptography_InvalidFromXmlString, nameof(DSA), name)); + } + + return ret; + } + public override void FromXmlString(string xmlString) { - throw new PlatformNotSupportedException(); + // ParseDocument does the nullcheck for us. + XmlKeyHelper.ParseState state = XmlKeyHelper.ParseDocument(xmlString); + + byte[] p = ReadRequiredElement(ref state, nameof(DSAParameters.P)); + byte[] q = ReadRequiredElement(ref state, nameof(DSAParameters.Q)); + byte[] g = ReadRequiredElement(ref state, nameof(DSAParameters.G), p.Length); + byte[] y = ReadRequiredElement(ref state, nameof(DSAParameters.Y), p.Length); + byte[] j = XmlKeyHelper.ReadCryptoBinary(ref state, nameof(DSAParameters.J)); + byte[] seed = XmlKeyHelper.ReadCryptoBinary(ref state, nameof(DSAParameters.Seed)); + int counter = 0; + byte[] x = XmlKeyHelper.ReadCryptoBinary(ref state, nameof(DSAParameters.X), q.Length); + + if (seed != null) + { + byte[] counterBytes = ReadRequiredElement(ref state, CounterElementName); + counter = XmlKeyHelper.ReadCryptoBinaryInt32(counterBytes); + } + + DSAParameters dsaParameters = new DSAParameters + { + P = p, + Q = q, + G = g, + Y = y, + J = j, + Seed = seed, + Counter = counter, + X = x, + }; + + // Check for Counter without Seed after getting X, since that prevents an extra cycle in the + // canonical element order. + if (dsaParameters.Seed == null) + { + if (XmlKeyHelper.HasElement(ref state, CounterElementName)) + { + throw new CryptographicException( + SR.Format( + SR.Cryptography_InvalidFromXmlString, + nameof(DSA), + nameof(DSAParameters.Seed))); + } + } + + ImportParameters(dsaParameters); } public override string ToXmlString(bool includePrivateParameters) { - throw new PlatformNotSupportedException(); + // The format of this output is based on the xmldsig ds:DSAKeyValue value, except + // * It writes values as xml:base64Binary instead of ds:CryptoBinary + // * It doesn't strip off leading 0x00 byte values before base64 + // * It doesn't emit the output in a namespace + // * When includePrivateParameters is true it writes an X element. + // + // These deviations are inherited from .NET Framework. + + // P is KeySizeInBytes long. + // Q is 160 to 256 bits long, or 20 to 32 bytes. + // G is the same size as P + // Y is the same size as P + // X is the same size as Q + // + // Each field gets base64 encoded (after dropping leading 0x00 bytes) + // so P is (KeySizeInBytes + 2) / 3 * 4, then plus 7 (

) + // (For 3072 that's 519 chars, for 1024 it's 179.) + // Add in maximum-Q: (32 + 2) / 3 * 4 + 7 => 51 + // Then the "" (27). + // Grand total, 3 * P + 2 * Q + 27 => 1686 (3072) or 666 (1024). + // KeySizeInBytes * 2 / 3 comes out to 2048 or 682, so call that good enough. + + // Rarely, keys will export the J or Seed values, and they may cause the + // StringBuilder to need to grow. + + DSAParameters keyParameters = ExportParameters(includePrivateParameters); + StringBuilder builder = new StringBuilder((keyParameters.P.Length << 1) / 3); + builder.Append(""); + XmlKeyHelper.WriteCryptoBinary(nameof(DSAParameters.P), keyParameters.P, builder); + XmlKeyHelper.WriteCryptoBinary(nameof(DSAParameters.Q), keyParameters.Q, builder); + XmlKeyHelper.WriteCryptoBinary(nameof(DSAParameters.G), keyParameters.G, builder); + XmlKeyHelper.WriteCryptoBinary(nameof(DSAParameters.Y), keyParameters.Y, builder); + + if (keyParameters.J != null) + { + XmlKeyHelper.WriteCryptoBinary(nameof(DSAParameters.J), keyParameters.J, builder); + } + + if (keyParameters.Seed != null) + { + XmlKeyHelper.WriteCryptoBinary(nameof(DSAParameters.Seed), keyParameters.Seed, builder); + XmlKeyHelper.WriteCryptoBinary(CounterElementName, keyParameters.Counter, builder); + } + + if (includePrivateParameters) + { + if (keyParameters.X == null) + { + // NetFx compat when a 3rd party type lets X be null when + // includePrivateParameters is true + // (the exception would have been from Convert.ToBase64String) + throw new ArgumentNullException("inArray"); + } + + XmlKeyHelper.WriteCryptoBinary(nameof(DSAParameters.X), keyParameters.X, builder); + } + + builder.Append(""); + return builder.ToString(); } } } diff --git a/src/System.Security.Cryptography.Algorithms/src/System/Security/Cryptography/RSA.Xml.cs b/src/System.Security.Cryptography.Algorithms/src/System/Security/Cryptography/RSA.Xml.cs index cf5112d6a7b1..cdccc5e4e2d1 100644 --- a/src/System.Security.Cryptography.Algorithms/src/System/Security/Cryptography/RSA.Xml.cs +++ b/src/System.Security.Cryptography.Algorithms/src/System/Security/Cryptography/RSA.Xml.cs @@ -2,18 +2,130 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System.Text; + namespace System.Security.Cryptography { public abstract partial class RSA : AsymmetricAlgorithm { + private static byte[] ReadRequiredElement( + ref XmlKeyHelper.ParseState state, + string name, + int sizeHint = -1) + { + byte[] ret = XmlKeyHelper.ReadCryptoBinary(ref state, name, sizeHint); + + if (ret == null) + { + throw new CryptographicException( + SR.Format(SR.Cryptography_InvalidFromXmlString, nameof(RSA), name)); + } + + return ret; + } + public override void FromXmlString(string xmlString) { - throw new PlatformNotSupportedException(); + // ParseDocument does the nullcheck for us. + XmlKeyHelper.ParseState state = XmlKeyHelper.ParseDocument(xmlString); + + byte[] n = ReadRequiredElement(ref state, nameof(RSAParameters.Modulus)); + byte[] e = ReadRequiredElement(ref state, nameof(RSAParameters.Exponent)); + + int halfN = (n.Length + 1) / 2; + + // .NET Framework doesn't report any element other than Modulus/Exponent as required, + // it just lets import fail if they're imbalanced. + byte[] p = XmlKeyHelper.ReadCryptoBinary(ref state, nameof(RSAParameters.P), halfN); + byte[] q = XmlKeyHelper.ReadCryptoBinary(ref state, nameof(RSAParameters.Q), halfN); + byte[] dp = XmlKeyHelper.ReadCryptoBinary(ref state, nameof(RSAParameters.DP), halfN); + byte[] dq = XmlKeyHelper.ReadCryptoBinary(ref state, nameof(RSAParameters.DQ), halfN); + byte[] qInv = XmlKeyHelper.ReadCryptoBinary(ref state, nameof(RSAParameters.InverseQ), halfN); + byte[] d = XmlKeyHelper.ReadCryptoBinary(ref state, nameof(RSAParameters.D), n.Length); + + RSAParameters keyParameters = new RSAParameters + { + Modulus = n, + Exponent = e, + D = d, + P = p, + Q = q, + DP = dp, + DQ = dq, + InverseQ = qInv, + }; + + ImportParameters(keyParameters); } public override string ToXmlString(bool includePrivateParameters) { - throw new PlatformNotSupportedException(); + // The format of this output is based on the xmldsig ds:RSAKeyValue value, except + // * It writes values as xml:base64Binary instead of ds:CryptoBinary + // * It doesn't strip off leading 0x00 byte values before base64 + // * It doesn't emit the output in a namespace + // * When includePrivateParameters is true it writes the private key elements. + // * D, P, Q, DP, DQ, InverseQ + // + // These deviations are inherited from .NET Framework. + + // For a public-only export, the output is like the following, but with no whitespace + // + // + // [base64 modulus] + // AQAB + // + // + // (using the knowledge that 99.9(etc)% of RSA keys use the same exponent, 65537). + // rsa.KeySize (bits) / 6 will produce a value just slightly smaller than needed: + // + // KeySize | BytesReq | Div5 | Div6 + // --------|----------|------|----- + // 16384 | 2732 | 3276 | 2730 + // 2048 | 344 | 409 | 341 + // 1024 | 172 | 204 | 170 + // 512 | 88 | 102 | 85 + // + // So just add 3 chars to the overhead. + // The overhead, otherwise, is 65 chars, plus exponent's actual value. + // While most keys are AQAB (0x010001) it's technically a variable. + // CAPI has a limit of 32 bits. CNG-Win7 is unbounded, CNG-Win10 is 64-bits. + // So call it 12 chars ((64/8 + 2) / 3 * 4). + // 65 + 32 + 3 = 100. Nice, round, number. + // + // For private keys, D is the same size as Modulus, and P/Q/DP/DQ/InverseQ are + // each half the size of Modulus. So their variable payload is 5 * (KeySize / 2 / 6). + // + // Their element tags add 58 extra characters, and sprinkle in another 3 each (18 total) for + // base64 vs div6 padding, for a conditional overhead of 76 chars. + + int keySizeDiv6 = KeySize / 6; + int initialCapacity = 100 + keySizeDiv6; + + if (includePrivateParameters) + { + initialCapacity += 76 + 5 * keySizeDiv6 / 2; + } + + RSAParameters keyParameters = ExportParameters(includePrivateParameters); + StringBuilder builder = new StringBuilder(initialCapacity); + builder.Append(""); + XmlKeyHelper.WriteCryptoBinary(nameof(RSAParameters.Modulus), keyParameters.Modulus, builder); + XmlKeyHelper.WriteCryptoBinary(nameof(RSAParameters.Exponent), keyParameters.Exponent, builder); + + if (includePrivateParameters) + { + // Match .NET Framework field order. + XmlKeyHelper.WriteCryptoBinary(nameof(RSAParameters.P), keyParameters.P, builder); + XmlKeyHelper.WriteCryptoBinary(nameof(RSAParameters.Q), keyParameters.Q, builder); + XmlKeyHelper.WriteCryptoBinary(nameof(RSAParameters.DP), keyParameters.DP, builder); + XmlKeyHelper.WriteCryptoBinary(nameof(RSAParameters.DQ), keyParameters.DQ, builder); + XmlKeyHelper.WriteCryptoBinary(nameof(RSAParameters.InverseQ), keyParameters.InverseQ, builder); + XmlKeyHelper.WriteCryptoBinary(nameof(RSAParameters.D), keyParameters.D, builder); + } + + builder.Append(""); + return builder.ToString(); } } } diff --git a/src/System.Security.Cryptography.Algorithms/src/System/Security/Cryptography/XmlKeyHelper.cs b/src/System.Security.Cryptography.Algorithms/src/System/Security/Cryptography/XmlKeyHelper.cs new file mode 100644 index 000000000000..40eeddcc0655 --- /dev/null +++ b/src/System.Security.Cryptography.Algorithms/src/System/Security/Cryptography/XmlKeyHelper.cs @@ -0,0 +1,319 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Buffers.Binary; +using System.Collections; +using System.Diagnostics; +using System.Reflection; +using System.Text; + +namespace System.Security.Cryptography +{ + internal static class XmlKeyHelper + { + internal static ParseState ParseDocument(string xmlString) + { + if (xmlString == null) + { + throw new ArgumentNullException(nameof(xmlString)); + } + + try + { + return ParseState.ParseDocument(xmlString); + } + catch (Exception e) + { + throw new CryptographicException(SR.Cryptography_FromXmlParseError, e); + } + } + + internal static bool HasElement(ref ParseState state, string name) + { + return state.HasElement(name); + } + + internal static byte[] ReadCryptoBinary(ref ParseState state, string name, int sizeHint = -1) + { + string value = state.GetValue(name); + + if (value == null) + { + return null; + } + + if (value.Length == 0) + { + return Array.Empty(); + } + + if (sizeHint < 0) + { + return Convert.FromBase64String(value); + } + + byte[] ret = new byte[sizeHint]; + + if (Convert.TryFromBase64Chars(value.AsSpan(), ret, out int written)) + { + if (written == sizeHint) + { + return ret; + } + + int shift = sizeHint - written; + Buffer.BlockCopy(ret, 0, ret, shift, written); + ret.AsSpan(0, shift).Clear(); + return ret; + } + + // It didn't fit, so let FromBase64String figure out how big it should be. + // This is almost certainly going to result in throwing from ImportParameters, + // but that's where the exception belongs. + // + // Alternatively, this is where we get the exception that the base64 value was + // corrupt. + return Convert.FromBase64String(value); + } + + internal static int ReadCryptoBinaryInt32(byte[] buf) + { + Debug.Assert(buf != null); + int val = 0; + int idx = Math.Max(0, buf.Length - sizeof(int)); + + // This is like BinaryPrimitives.ReadBigEndianInt32, except it works + // on trimmed inputs and skips to the end. + // + // This is compatible with what .NET Framework does (Utils.ConvertByteArrayToInt) + for (; idx < buf.Length; idx++) + { + val <<= 8; + val |= buf[idx]; + } + + return val; + } + + internal static void WriteCryptoBinary(string name, int value, StringBuilder builder) + { + // NetFX compat + if (value == 0) + { + Span single = stackalloc byte[1]; + single[0] = 0; + WriteCryptoBinary(name, single, builder); + return; + } + + Span valBuf = stackalloc byte[sizeof(int)]; + BinaryPrimitives.WriteInt32BigEndian(valBuf, value); + + // NetFX does write the counter value as CryptoBinary, so do the leading-byte trim here. + + int start = 0; + + // Guaranteed not to go out of bounds by the == 0 check above. + while (valBuf[start] == 0) + { + start++; + } + + WriteCryptoBinary(name, valBuf.Slice(start, valBuf.Length - start), builder); + } + + internal static void WriteCryptoBinary(string name, ReadOnlySpan value, StringBuilder builder) + { + Debug.Assert(name.Length > 0); + Debug.Assert(value.Length > 0); + Debug.Assert(builder != null); + + builder.Append('<'); + builder.Append(name); + builder.Append('>'); + + int offset = 0; + int length = value.Length; + + // If we wanted to produce a ds:CryptoBinary instead of an xml:base64Binary, + // we'd skip all leading zeroes (increase offset, decrease length) before moving on + + const int StackChars = 256; + const int ByteLimit = StackChars / 4 * 3; + Span base64 = stackalloc char[StackChars]; + + while (length > 0) + { + int localLength = Math.Min(ByteLimit, length); + + if (!Convert.TryToBase64Chars(value.Slice(offset, localLength), base64, out int written)) + { + Debug.Fail($"Convert.TryToBase64Chars failed with {localLength} bytes to {StackChars} chars"); + throw new CryptographicException(); + } + + builder.Append(base64.Slice(0, written)); + length -= localLength; + offset += localLength; + } + + builder.Append('<'); + builder.Append('/'); + builder.Append(name); + builder.Append('>'); + } + + internal struct ParseState + { + private IEnumerable _enumerable; + private IEnumerator _enumerator; + private int _index; + + internal static ParseState ParseDocument(string xmlString) + { + object rootElement = Functions.ParseDocument(xmlString); + + return new ParseState + { + _enumerable = Functions.GetElements(rootElement), + _enumerator = null, + _index = -1, + }; + } + + internal bool HasElement(string localName) + { + string value = GetValue(localName); + + bool ret = value != null; + + if (ret) + { + // Make it so that if GetValue is called on + // this name it'll advance into it correctly. + _index--; + } + + return ret; + } + + internal string GetValue(string localName) + { + if (_enumerable == null) + { + return null; + } + + if (_enumerator == null) + { + _enumerator = _enumerable.GetEnumerator(); + } + + int origIdx = _index; + int idx = origIdx; + + if (!_enumerator.MoveNext()) + { + idx = -1; + _enumerator = _enumerable.GetEnumerator(); + + if (!_enumerator.MoveNext()) + { + _enumerable = null; + return null; + } + } + + idx++; + + while (idx != origIdx) + { + string curName = Functions.GetLocalName(_enumerator.Current); + + if (localName == curName) + { + _index = idx; + return Functions.GetValue(_enumerator.Current); + } + + if (!_enumerator.MoveNext()) + { + idx = -1; + + if (origIdx < 0) + { + _enumerator = null; + return null; + } + + _enumerator = _enumerable.GetEnumerator(); + + if (!_enumerator.MoveNext()) + { + Debug.Fail("Original enumerator had elements, new one does not"); + _enumerable = null; + return null; + } + } + + idx++; + } + + return null; + } + + private static class Functions + { + private static readonly Func s_xDocumentCreate; + private static readonly PropertyInfo s_docRootProperty; + private static readonly MethodInfo s_getElementsMethod; + private static readonly PropertyInfo s_elementNameProperty; + private static readonly PropertyInfo s_nameNameProperty; + private static readonly PropertyInfo s_elementValueProperty; + + static Functions() + { + Type xDocument = + Type.GetType( + "System.Xml.Linq.XDocument, System.Private.Xml.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51"); + + MethodInfo docCreateMethod = xDocument.GetMethod( + "Parse", + BindingFlags.Static | BindingFlags.Public, + null, + new[] { typeof(string) }, + null); + + s_xDocumentCreate = + (Func)docCreateMethod.CreateDelegate(typeof(Func)); + + s_docRootProperty = xDocument.GetProperty("Root"); + + s_getElementsMethod = s_docRootProperty.PropertyType.GetMethod( + "Elements", + BindingFlags.Instance | BindingFlags.Public, + null, + Array.Empty(), + null); + + s_elementNameProperty = s_docRootProperty.PropertyType.GetProperty("Name"); + s_nameNameProperty = s_elementNameProperty.PropertyType.GetProperty("LocalName"); + s_elementValueProperty = s_docRootProperty.PropertyType.GetProperty("Value"); + } + + internal static object ParseDocument(string xmlString) => + s_docRootProperty.GetValue(s_xDocumentCreate(xmlString)); + + internal static IEnumerable GetElements(object element) => + (IEnumerable)s_getElementsMethod.Invoke(element, Array.Empty()); + + internal static string GetLocalName(object element) => + (string)s_nameNameProperty.GetValue(s_elementNameProperty.GetValue(element)); + + internal static string GetValue(object element) => + (string)s_elementValueProperty.GetValue(element); + } + } + } +} diff --git a/src/System.Security.Cryptography.Algorithms/tests/System.Security.Cryptography.Algorithms.Tests.csproj b/src/System.Security.Cryptography.Algorithms/tests/System.Security.Cryptography.Algorithms.Tests.csproj index 540a2a6d7d08..9518b44c5e8d 100644 --- a/src/System.Security.Cryptography.Algorithms/tests/System.Security.Cryptography.Algorithms.Tests.csproj +++ b/src/System.Security.Cryptography.Algorithms/tests/System.Security.Cryptography.Algorithms.Tests.csproj @@ -76,6 +76,9 @@ CommonTest\System\Security\Cryptography\AlgorithmImplementations\RSA\RSAFactory.cs + + CommonTest\System\Security\Cryptography\AlgorithmImplementations\RSA\RSAXml.cs + CommonTest\System\Security\Cryptography\AlgorithmImplementations\RSA\SignVerify.cs @@ -263,9 +266,6 @@ CommonTest\System\Security\Cryptography\AlgorithmImplementations\RSA\RSASignatureFormatter.cs - - CommonTest\System\Security\Cryptography\AlgorithmImplementations\RSA\RSAXml.cs - CommonTest\System\Security\Cryptography\AlgorithmImplementations\RSA\SignVerify.netcoreapp.cs From 6d61ed7541b9da643cefd91ecb5dfabec3e99fa9 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Wed, 15 May 2019 13:45:26 +0000 Subject: [PATCH 356/607] Update dependencies from https://github.com/dotnet/core-setup build 20190514.15 (#37668) - Microsoft.NETCore.App - 3.0.0-preview6-27714-15 - Microsoft.NETCore.DotNetHost - 3.0.0-preview6-27714-15 - Microsoft.NETCore.DotNetHostPolicy - 3.0.0-preview6-27714-15 --- eng/Version.Details.xml | 12 ++++++------ eng/Versions.props | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 155fecdd9dd5..52ef5bcd1256 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -14,17 +14,17 @@ - + https://github.com/dotnet/core-setup - 91a4df0883082c784b0826874874d65b3fcf79ba + 73226d6f119c757813f47b0dc021e8700d525f71 - + https://github.com/dotnet/core-setup - 91a4df0883082c784b0826874874d65b3fcf79ba + 73226d6f119c757813f47b0dc021e8700d525f71 - + https://github.com/dotnet/core-setup - 91a4df0883082c784b0826874874d65b3fcf79ba + 73226d6f119c757813f47b0dc021e8700d525f71 https://github.com/dotnet/corefx diff --git a/eng/Versions.props b/eng/Versions.props index 51d742cb9eb2..5252d649db5a 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -36,9 +36,9 @@ 2.2.0-beta.19254.1 1.0.0-beta.19254.1 - 3.0.0-preview6-27713-13 - 3.0.0-preview6-27713-13 - 3.0.0-preview6-27713-13 + 3.0.0-preview6-27714-15 + 3.0.0-preview6-27714-15 + 3.0.0-preview6-27714-15 3.0.0-preview6-27710-71 3.0.0-preview6-27710-71 From 9b8b9c6cf6f9cce3ce9f36b2131fcadd33b755e0 Mon Sep 17 00:00:00 2001 From: Tom Deseyn Date: Wed, 15 May 2019 09:13:27 -0700 Subject: [PATCH 357/607] Unix: make Backspace work when Console.ReadLine has wrapped lines (#37182) * Unix: make Backspace work when Console.ReadLine has wrapped lines * Get ClrEof string from TermInfo database * PR feedback * ManualTests: replace Fact by ConditionalFact(ManualTestsEnabled) --- src/System.Console/src/FxCopBaseline.cs | 2 +- .../src/System/ConsolePal.Unix.cs | 31 +++++++++++++------ .../src/System/IO/StdInReader.cs | 28 ++++++++++++++--- src/System.Console/src/System/TermInfo.cs | 1 + .../tests/ManualTests/ManualTests.cs | 12 +++++++ 5 files changed, 60 insertions(+), 14 deletions(-) diff --git a/src/System.Console/src/FxCopBaseline.cs b/src/System.Console/src/FxCopBaseline.cs index ed361fcc5a17..a5fac4ae97b6 100644 --- a/src/System.Console/src/FxCopBaseline.cs +++ b/src/System.Console/src/FxCopBaseline.cs @@ -14,7 +14,7 @@ [assembly: SuppressMessage("Microsoft.Reliability", "CA2002:DoNotLockOnObjectsWithWeakIdentity", Scope = "member", Target = "System.IO.SyncTextReader.#ReadKey(System.Boolean&):System.ConsoleKeyInfo")] [assembly: SuppressMessage("Microsoft.Reliability", "CA2002:DoNotLockOnObjectsWithWeakIdentity", Scope = "member", Target = "System.IO.SyncTextReader.#get_KeyAvailable():System.Boolean")] [assembly: SuppressMessage("Microsoft.Reliability", "CA2002:DoNotLockOnObjectsWithWeakIdentity", Scope = "member", Target = "System.ConsolePal.#ResetColor()")] -[assembly: SuppressMessage("Microsoft.Reliability", "CA2002:DoNotLockOnObjectsWithWeakIdentity", Scope = "member", Target = "System.ConsolePal.#GetCursorPosition(System.Int32&,System.Int32&)")] +[assembly: SuppressMessage("Microsoft.Reliability", "CA2002:DoNotLockOnObjectsWithWeakIdentity", Scope = "member", Target = "System.ConsolePal.#TryGetCursorPosition(System.Int32&,System.Int32&,System.Boolean):System.Boolean")] [assembly: SuppressMessage("Microsoft.Reliability", "CA2002:DoNotLockOnObjectsWithWeakIdentity", Scope = "member", Target = "System.ConsolePal.#RefreshColors(System.ConsoleColor&,System.ConsoleColor)")] [assembly: SuppressMessage("Microsoft.Reliability", "CA2002:DoNotLockOnObjectsWithWeakIdentity", Scope = "member", Target = "System.ConsolePal.#EnsureInitializedCore()")] [assembly: SuppressMessage("Microsoft.Reliability", "CA2002:DoNotLockOnObjectsWithWeakIdentity", Scope = "member", Target = "System.ConsolePal.#WriteStdoutAnsiString(System.String,System.Boolean)")] diff --git a/src/System.Console/src/System/ConsolePal.Unix.cs b/src/System.Console/src/System/ConsolePal.Unix.cs index 082089d3c118..88f56cdc616b 100644 --- a/src/System.Console/src/System/ConsolePal.Unix.cs +++ b/src/System.Console/src/System/ConsolePal.Unix.cs @@ -412,7 +412,7 @@ public static int CursorLeft get { int left, top; - GetCursorPosition(out left, out top); + TryGetCursorPosition(out left, out top); return left; } } @@ -422,7 +422,7 @@ public static int CursorTop get { int left, top; - GetCursorPosition(out left, out top); + TryGetCursorPosition(out left, out top); return top; } } @@ -442,7 +442,10 @@ public static int CursorTop private static bool s_firstCursorPositionRequest = true; /// Gets the current cursor position. This involves both writing to stdout and reading stdin. - private static unsafe void GetCursorPosition(out int left, out int top) + /// Cursor column. + /// Cursor row. + /// Indicates whether this method is called as part of a on-going Read operation. + internal static unsafe bool TryGetCursorPosition(out int left, out int top, bool reinitializeForRead = false) { left = top = 0; @@ -450,7 +453,7 @@ private static unsafe void GetCursorPosition(out int left, out int top) // parsing a response string from the terminal. So if anything is redirected, bail. if (Console.IsInputRedirected || Console.IsOutputRedirected) { - return; + return false; } int cursorVersion; @@ -458,7 +461,7 @@ private static unsafe void GetCursorPosition(out int left, out int top) { if (TryGetCachedCursorPosition(out left, out top)) { - return; + return true; } cursorVersion = s_cursorVersion; @@ -525,7 +528,7 @@ private static unsafe void GetCursorPosition(out int left, out int top) // back to the StdInReader's extra buffer, treating it all as user input, // and exit having not computed a valid cursor position. TransferBytes(readBytes.Slice(readBytesPos), r); - return; + return false; } // At this point, readBytes starts with \ESC and ends with 'R'. @@ -561,11 +564,17 @@ private static unsafe void GetCursorPosition(out int left, out int top) } finally { - Interop.Sys.UninitializeConsoleAfterRead(); + if (reinitializeForRead) + { + Interop.Sys.InitializeConsoleBeforeRead(); + } + else + { + Interop.Sys.UninitializeConsoleAfterRead(); + } s_firstCursorPositionRequest = false; } - bool BufferUntil(byte toFind, StdInReader src, ref Span dst, ref int dstPos, out int foundPos) { // Loop until we find the target byte. @@ -667,6 +676,7 @@ void TransferBytes(ReadOnlySpan src, StdInReader dst) lock (Console.Out) { SetCachedCursorPosition(left, top, cursorVersion); + return true; } } @@ -997,6 +1007,8 @@ internal class TerminalFormatStrings public readonly string CursorAddress; /// The format string to use to move the cursor to the left. public readonly string CursorLeft; + /// The format string to use to clear to the end of line. + public readonly string ClrEol; /// The ANSI-compatible string for the Cursor Position report request. /// /// This should really be in user string 7 in the terminfo file, but some terminfo databases @@ -1035,6 +1047,7 @@ public TerminalFormatStrings(TermInfo.Database db) CursorInvisible = db.GetString(TermInfo.WellKnownStrings.CursorInvisible); CursorAddress = db.GetString(TermInfo.WellKnownStrings.CursorAddress); CursorLeft = db.GetString(TermInfo.WellKnownStrings.CursorLeft); + ClrEol = db.GetString(TermInfo.WellKnownStrings.ClrEol); Title = GetTitle(db); @@ -1359,7 +1372,7 @@ private static void InvalidateTerminalSettings() /// Writes a terminfo-based ANSI escape string to stdout. /// The string to write. /// Writing this value may change the cursor position. - private static unsafe void WriteStdoutAnsiString(string value, bool mayChangeCursorPosition = true) + internal static unsafe void WriteStdoutAnsiString(string value, bool mayChangeCursorPosition = true) { if (string.IsNullOrEmpty(value)) return; diff --git a/src/System.Console/src/System/IO/StdInReader.cs b/src/System.Console/src/System/IO/StdInReader.cs index bc8bee2d700c..feaf4eddd900 100644 --- a/src/System.Console/src/System/IO/StdInReader.cs +++ b/src/System.Console/src/System/IO/StdInReader.cs @@ -17,6 +17,7 @@ namespace System.IO internal sealed class StdInReader : TextReader { private static string s_moveLeftString; // string written to move the cursor to the left + private static string s_clearToEol; // string written to clear from cursor to end of line private readonly StringBuilder _readLineSB; // SB that holds readLine output. This is a field simply to enable reuse; it's only used in ReadLine. private readonly Stack _tmpKeys = new Stack(); // temporary working stack; should be empty outside of ReadLine @@ -136,12 +137,31 @@ private string ReadLine(bool consumeKeys) _readLineSB.Length = len - 1; if (!previouslyProcessed) { - if (s_moveLeftString == null) + // The ReadLine input may wrap accross terminal rows and we need to handle that. + // note: ConsolePal will cache the cursor position to avoid making many slow cursor position fetch operations. + if (ConsolePal.TryGetCursorPosition(out int left, out int top, reinitializeForRead: true) && + left == 0 && top > 0) { - string moveLeft = ConsolePal.TerminalFormatStrings.Instance.CursorLeft; - s_moveLeftString = !string.IsNullOrEmpty(moveLeft) ? moveLeft + " " + moveLeft : string.Empty; + if (s_clearToEol == null) + { + s_clearToEol = ConsolePal.TerminalFormatStrings.Instance.ClrEol ?? string.Empty; + } + + // Move to end of previous line + ConsolePal.SetCursorPosition(ConsolePal.WindowWidth - 1, top - 1); + // Clear from cursor to end of the line + ConsolePal.WriteStdoutAnsiString(s_clearToEol, mayChangeCursorPosition: false); + } + else + { + if (s_moveLeftString == null) + { + string moveLeft = ConsolePal.TerminalFormatStrings.Instance.CursorLeft; + s_moveLeftString = !string.IsNullOrEmpty(moveLeft) ? moveLeft + " " + moveLeft : string.Empty; + } + + Console.Write(s_moveLeftString); } - Console.Write(s_moveLeftString); } } } diff --git a/src/System.Console/src/System/TermInfo.cs b/src/System.Console/src/System/TermInfo.cs index a4887ffd2a8d..0e86ea7bbef6 100644 --- a/src/System.Console/src/System/TermInfo.cs +++ b/src/System.Console/src/System/TermInfo.cs @@ -24,6 +24,7 @@ internal enum WellKnownStrings { Bell = 1, Clear = 5, + ClrEol = 6, CursorAddress = 10, CursorLeft = 14, CursorPositionReport = 294, diff --git a/src/System.Console/tests/ManualTests/ManualTests.cs b/src/System.Console/tests/ManualTests/ManualTests.cs index a54ed02e264a..442dd8dd5ed6 100644 --- a/src/System.Console/tests/ManualTests/ManualTests.cs +++ b/src/System.Console/tests/ManualTests/ManualTests.cs @@ -23,6 +23,18 @@ public static void ReadLine(bool consoleIn) AssertUserExpectedResults("the characters you typed properly echoed as you typed"); } + [ConditionalFact(nameof(ManualTestsEnabled))] + public static void ReadLine_BackSpaceCanMoveAccrossWrappedLines() + { + Console.WriteLine("Please press 'a' until it wraps to the next terminal line, then press 'Backspace' until the input is erased, and then type a single 'a' and press 'Enter'."); + Console.Write("Input: "); + Console.Out.Flush(); + + string result = Console.ReadLine(); + Assert.Equal("a", result); + AssertUserExpectedResults("the previous line is 'Input: a'"); + } + [ConditionalFact(nameof(ManualTestsEnabled))] public static void InPeek() { From 5a91f2a23f463900457e496c4e7d59494b3a3740 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Wed, 15 May 2019 09:22:16 -0700 Subject: [PATCH 358/607] [master] Update dependencies from dotnet/arcade (#37512) * Update dependencies from https://github.com/dotnet/arcade build 20190507.7 - Microsoft.DotNet.XUnitExtensions - 2.4.0-beta.19257.7 - Microsoft.DotNet.XUnitConsoleRunner - 2.5.1-beta.19257.7 - Microsoft.DotNet.VersionTools.Tasks - 1.0.0-beta.19257.7 - Microsoft.DotNet.ApiCompat - 1.0.0-beta.19257.7 - Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19257.7 - Microsoft.DotNet.Build.Tasks.Configuration - 1.0.0-beta.19257.7 - Microsoft.DotNet.Build.Tasks.Feed - 2.2.0-beta.19257.7 - Microsoft.DotNet.Build.Tasks.Packaging - 1.0.0-beta.19257.7 - Microsoft.DotNet.CodeAnalysis - 1.0.0-beta.19257.7 - Microsoft.DotNet.CoreFxTesting - 1.0.0-beta.19257.7 - Microsoft.DotNet.GenAPI - 1.0.0-beta.19257.7 - Microsoft.DotNet.GenFacades - 1.0.0-beta.19257.7 - Microsoft.DotNet.Helix.Sdk - 2.0.0-beta.19257.7 - Microsoft.DotNet.RemoteExecutor - 1.0.0-beta.19257.7 * Update dependencies from https://github.com/dotnet/arcade build 20190508.5 - Microsoft.DotNet.XUnitExtensions - 2.4.0-beta.19258.5 - Microsoft.DotNet.XUnitConsoleRunner - 2.5.1-beta.19258.5 - Microsoft.DotNet.VersionTools.Tasks - 1.0.0-beta.19258.5 - Microsoft.DotNet.ApiCompat - 1.0.0-beta.19258.5 - Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19258.5 - Microsoft.DotNet.Build.Tasks.Configuration - 1.0.0-beta.19258.5 - Microsoft.DotNet.Build.Tasks.Feed - 2.2.0-beta.19258.5 - Microsoft.DotNet.Build.Tasks.Packaging - 1.0.0-beta.19258.5 - Microsoft.DotNet.CodeAnalysis - 1.0.0-beta.19258.5 - Microsoft.DotNet.CoreFxTesting - 1.0.0-beta.19258.5 - Microsoft.DotNet.GenAPI - 1.0.0-beta.19258.5 - Microsoft.DotNet.GenFacades - 1.0.0-beta.19258.5 - Microsoft.DotNet.Helix.Sdk - 2.0.0-beta.19258.5 - Microsoft.DotNet.RemoteExecutor - 1.0.0-beta.19258.5 * Update dependencies from https://github.com/dotnet/arcade build 20190509.9 - Microsoft.DotNet.XUnitExtensions - 2.4.0-beta.19259.9 - Microsoft.DotNet.XUnitConsoleRunner - 2.5.1-beta.19259.9 - Microsoft.DotNet.VersionTools.Tasks - 1.0.0-beta.19259.9 - Microsoft.DotNet.ApiCompat - 1.0.0-beta.19259.9 - Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19259.9 - Microsoft.DotNet.Build.Tasks.Configuration - 1.0.0-beta.19259.9 - Microsoft.DotNet.Build.Tasks.Feed - 2.2.0-beta.19259.9 - Microsoft.DotNet.Build.Tasks.Packaging - 1.0.0-beta.19259.9 - Microsoft.DotNet.CodeAnalysis - 1.0.0-beta.19259.9 - Microsoft.DotNet.CoreFxTesting - 1.0.0-beta.19259.9 - Microsoft.DotNet.GenAPI - 1.0.0-beta.19259.9 - Microsoft.DotNet.GenFacades - 1.0.0-beta.19259.9 - Microsoft.DotNet.Helix.Sdk - 2.0.0-beta.19259.9 - Microsoft.DotNet.RemoteExecutor - 1.0.0-beta.19259.9 * Update dependencies from https://github.com/dotnet/arcade build 20190510.2 - Microsoft.DotNet.XUnitExtensions - 2.4.0-beta.19260.2 - Microsoft.DotNet.XUnitConsoleRunner - 2.5.1-beta.19260.2 - Microsoft.DotNet.VersionTools.Tasks - 1.0.0-beta.19260.2 - Microsoft.DotNet.ApiCompat - 1.0.0-beta.19260.2 - Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19260.2 - Microsoft.DotNet.Build.Tasks.Configuration - 1.0.0-beta.19260.2 - Microsoft.DotNet.Build.Tasks.Feed - 2.2.0-beta.19260.2 - Microsoft.DotNet.Build.Tasks.Packaging - 1.0.0-beta.19260.2 - Microsoft.DotNet.CodeAnalysis - 1.0.0-beta.19260.2 - Microsoft.DotNet.CoreFxTesting - 1.0.0-beta.19260.2 - Microsoft.DotNet.GenAPI - 1.0.0-beta.19260.2 - Microsoft.DotNet.GenFacades - 1.0.0-beta.19260.2 - Microsoft.DotNet.Helix.Sdk - 2.0.0-beta.19260.2 - Microsoft.DotNet.RemoteExecutor - 1.0.0-beta.19260.2 * Update dependencies from https://github.com/dotnet/arcade build 20190511.1 - Microsoft.DotNet.XUnitExtensions - 2.4.0-beta.19261.1 - Microsoft.DotNet.XUnitConsoleRunner - 2.5.1-beta.19261.1 - Microsoft.DotNet.VersionTools.Tasks - 1.0.0-beta.19261.1 - Microsoft.DotNet.ApiCompat - 1.0.0-beta.19261.1 - Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19261.1 - Microsoft.DotNet.Build.Tasks.Configuration - 1.0.0-beta.19261.1 - Microsoft.DotNet.Build.Tasks.Feed - 2.2.0-beta.19261.1 - Microsoft.DotNet.Build.Tasks.Packaging - 1.0.0-beta.19261.1 - Microsoft.DotNet.CodeAnalysis - 1.0.0-beta.19261.1 - Microsoft.DotNet.CoreFxTesting - 1.0.0-beta.19261.1 - Microsoft.DotNet.GenAPI - 1.0.0-beta.19261.1 - Microsoft.DotNet.GenFacades - 1.0.0-beta.19261.1 - Microsoft.DotNet.Helix.Sdk - 2.0.0-beta.19261.1 - Microsoft.DotNet.RemoteExecutor - 1.0.0-beta.19261.1 * Use RemoteExecutor NS version * Update dependencies from https://github.com/dotnet/arcade build 20190512.1 - Microsoft.DotNet.XUnitExtensions - 2.4.0-beta.19262.1 - Microsoft.DotNet.XUnitConsoleRunner - 2.5.1-beta.19262.1 - Microsoft.DotNet.VersionTools.Tasks - 1.0.0-beta.19262.1 - Microsoft.DotNet.ApiCompat - 1.0.0-beta.19262.1 - Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19262.1 - Microsoft.DotNet.Build.Tasks.Configuration - 1.0.0-beta.19262.1 - Microsoft.DotNet.Build.Tasks.Feed - 2.2.0-beta.19262.1 - Microsoft.DotNet.Build.Tasks.Packaging - 1.0.0-beta.19262.1 - Microsoft.DotNet.CodeAnalysis - 1.0.0-beta.19262.1 - Microsoft.DotNet.CoreFxTesting - 1.0.0-beta.19262.1 - Microsoft.DotNet.GenAPI - 1.0.0-beta.19262.1 - Microsoft.DotNet.GenFacades - 1.0.0-beta.19262.1 - Microsoft.DotNet.Helix.Sdk - 2.0.0-beta.19262.1 - Microsoft.DotNet.RemoteExecutor - 1.0.0-beta.19262.1 * Update dependencies from https://github.com/dotnet/arcade build 20190513.3 - Microsoft.DotNet.XUnitExtensions - 2.4.0-beta.19263.3 - Microsoft.DotNet.XUnitConsoleRunner - 2.5.1-beta.19263.3 - Microsoft.DotNet.VersionTools.Tasks - 1.0.0-beta.19263.3 - Microsoft.DotNet.ApiCompat - 1.0.0-beta.19263.3 - Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19263.3 - Microsoft.DotNet.Build.Tasks.Configuration - 1.0.0-beta.19263.3 - Microsoft.DotNet.Build.Tasks.Feed - 2.2.0-beta.19263.3 - Microsoft.DotNet.Build.Tasks.Packaging - 1.0.0-beta.19263.3 - Microsoft.DotNet.CodeAnalysis - 1.0.0-beta.19263.3 - Microsoft.DotNet.CoreFxTesting - 1.0.0-beta.19263.3 - Microsoft.DotNet.GenAPI - 1.0.0-beta.19263.3 - Microsoft.DotNet.GenFacades - 1.0.0-beta.19263.3 - Microsoft.DotNet.Helix.Sdk - 2.0.0-beta.19263.3 - Microsoft.DotNet.RemoteExecutor - 1.0.0-beta.19263.3 * Exclude compile assets for RemoteExecutor * Manual darc update from build '20190514.12' * Fix Unix restore of RemoteExecutor * Exclude assets for RemoteExecutor correctly * Downgrade compiler version * Fix remoteexecutor lib binplacing for uap/uapaot * Add RemoteExecutorHost tfms in test * Fix process name check test on netfx --- eng/Tools.props | 2 +- eng/Version.Details.xml | 56 ++++++++-------- eng/Versions.props | 26 +++---- eng/common/PublishToPackageFeed.proj | 1 + eng/common/build.sh | 18 +---- eng/common/cross/arm/sources.list.vivid | 11 --- eng/common/cross/arm/sources.list.wily | 11 --- eng/common/cross/arm64/sources.list.buster | 11 +++ eng/common/cross/arm64/sources.list.stretch | 12 ++++ eng/common/cross/arm64/sources.list.vivid | 11 --- eng/common/cross/arm64/sources.list.wily | 11 --- eng/common/cross/build-rootfs.sh | 67 +++++++++++++------ eng/common/cross/x86/sources.list.vivid | 11 --- eng/common/cross/x86/sources.list.wily | 11 --- eng/common/darc-init.ps1 | 11 +-- eng/common/darc-init.sh | 15 ++++- eng/common/dotnet-install.cmd | 2 + eng/common/dotnet-install.ps1 | 22 ++++++ eng/common/dotnet-install.sh | 49 ++++++++++++++ eng/common/templates/job/job.yml | 3 + eng/common/tools.ps1 | 54 ++++++++++++--- eng/common/tools.sh | 39 +++++++++-- external/test-runtime/XUnit.Runtime.depproj | 18 ++++- global.json | 4 +- .../tests/ProcessTests.cs | 4 +- .../tests/System/AppDomainTests.cs | 10 ++- 26 files changed, 314 insertions(+), 176 deletions(-) delete mode 100644 eng/common/cross/arm/sources.list.vivid delete mode 100644 eng/common/cross/arm/sources.list.wily create mode 100644 eng/common/cross/arm64/sources.list.buster create mode 100644 eng/common/cross/arm64/sources.list.stretch delete mode 100644 eng/common/cross/arm64/sources.list.vivid delete mode 100644 eng/common/cross/arm64/sources.list.wily delete mode 100644 eng/common/cross/x86/sources.list.vivid delete mode 100644 eng/common/cross/x86/sources.list.wily create mode 100644 eng/common/dotnet-install.cmd create mode 100644 eng/common/dotnet-install.ps1 create mode 100644 eng/common/dotnet-install.sh diff --git a/eng/Tools.props b/eng/Tools.props index 79a3e0b9493b..9126f753c274 100644 --- a/eng/Tools.props +++ b/eng/Tools.props @@ -33,7 +33,7 @@ - + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 52ef5bcd1256..7eb2c4e1b6fd 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -34,65 +34,65 @@ https://github.com/dotnet/corefx f5be0283c5e00dd823a41f671f9c9a41170f0a85 - + https://github.com/dotnet/arcade - a7a250e9c13147134543c35fef2fb81f19592edf + 670f6ee1a619a2a7c84cfdfe2a1c84fbe94e1c6b https://github.com/dotnet/standard 7053cdf764a6e08a356573bd447b44c85190de0e - + https://github.com/dotnet/arcade - bda52d7619f9420de46f2c39ffc972864bbcab63 + 670f6ee1a619a2a7c84cfdfe2a1c84fbe94e1c6b - + https://github.com/dotnet/arcade - c31fac9f6899094226cb5cd77c85b8f60ecafa3d + 670f6ee1a619a2a7c84cfdfe2a1c84fbe94e1c6b - + https://github.com/dotnet/arcade - 1b8589bbf53b9a5e819460798eff59830f39a3be + 670f6ee1a619a2a7c84cfdfe2a1c84fbe94e1c6b - + https://github.com/dotnet/arcade - 1b8589bbf53b9a5e819460798eff59830f39a3be + 670f6ee1a619a2a7c84cfdfe2a1c84fbe94e1c6b - + https://github.com/dotnet/arcade - 1b8589bbf53b9a5e819460798eff59830f39a3be + 670f6ee1a619a2a7c84cfdfe2a1c84fbe94e1c6b - + https://github.com/dotnet/arcade - bda52d7619f9420de46f2c39ffc972864bbcab63 + 670f6ee1a619a2a7c84cfdfe2a1c84fbe94e1c6b - + https://github.com/dotnet/arcade - 1b8589bbf53b9a5e819460798eff59830f39a3be + 670f6ee1a619a2a7c84cfdfe2a1c84fbe94e1c6b - + https://github.com/dotnet/arcade - 1b8589bbf53b9a5e819460798eff59830f39a3be + 670f6ee1a619a2a7c84cfdfe2a1c84fbe94e1c6b - + https://github.com/dotnet/arcade - 1b8589bbf53b9a5e819460798eff59830f39a3be + 670f6ee1a619a2a7c84cfdfe2a1c84fbe94e1c6b - + https://github.com/dotnet/arcade - 1b8589bbf53b9a5e819460798eff59830f39a3be + 670f6ee1a619a2a7c84cfdfe2a1c84fbe94e1c6b - + https://github.com/dotnet/arcade - 1b8589bbf53b9a5e819460798eff59830f39a3be + 670f6ee1a619a2a7c84cfdfe2a1c84fbe94e1c6b - + https://github.com/dotnet/arcade - 1b8589bbf53b9a5e819460798eff59830f39a3be + 670f6ee1a619a2a7c84cfdfe2a1c84fbe94e1c6b - + https://github.com/dotnet/arcade - 1b8589bbf53b9a5e819460798eff59830f39a3be + 670f6ee1a619a2a7c84cfdfe2a1c84fbe94e1c6b https://dev.azure.com/dnceng/internal/_git/dotnet-optimization diff --git a/eng/Versions.props b/eng/Versions.props index 5252d649db5a..c4546bf12cc9 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -18,23 +18,23 @@ Microsoft.DotNet.XUnitExtensions microsoft.dotnet.xunitconsolerunner - Microsoft.DotNet.RemoteExecutor + microsoft.dotnet.remoteexecutor NETStandard.Library - 1.0.0-beta.19256.12 - 1.0.0-beta.19254.1 - 1.0.0-beta.19254.1 - 1.0.0-beta.19254.1 - 2.4.0-beta.19254.1 - 2.5.1-beta.19257.7 - 1.0.0-beta.19254.1 - 1.0.0-beta.19254.1 - 1.0.0-beta.19254.1 - 1.0.0-beta.19254.1 - 2.2.0-beta.19254.1 - 1.0.0-beta.19254.1 + 1.0.0-beta.19264.13 + 1.0.0-beta.19264.13 + 1.0.0-beta.19264.13 + 1.0.0-beta.19264.13 + 2.4.0-beta.19264.13 + 2.5.1-beta.19264.13 + 1.0.0-beta.19264.13 + 1.0.0-beta.19264.13 + 1.0.0-beta.19264.13 + 1.0.0-beta.19264.13 + 2.2.0-beta.19264.13 + 1.0.0-beta.19264.13 3.0.0-preview6-27714-15 3.0.0-preview6-27714-15 diff --git a/eng/common/PublishToPackageFeed.proj b/eng/common/PublishToPackageFeed.proj index e17f72644e3e..9120b2d2129e 100644 --- a/eng/common/PublishToPackageFeed.proj +++ b/eng/common/PublishToPackageFeed.proj @@ -53,6 +53,7 @@ https://dotnetfeed.blob.core.windows.net/dotnet-toolset/index.json https://dotnetfeed.blob.core.windows.net/dotnet-windowsdesktop/index.json https://dotnetfeed.blob.core.windows.net/nuget-nugetclient/index.json + https://dotnetfeed.blob.core.windows.net/aspnet-entityframework6/index.json Sets nodereuse msbuild parameter ('true' or 'false')" echo " --warnAsError Sets warnaserror msbuild parameter ('true' or 'false')" echo "" - echo "Command line arguments starting with '/p:' are passed through to MSBuild." + echo "Command line arguments not listed above are passed thru to msbuild." echo "Arguments can also be passed in with a single hyphen." } @@ -137,22 +137,8 @@ while [[ $# > 0 ]]; do node_reuse=$2 shift ;; - -p:*|/p:*) - properties="$properties $1" - ;; - -m:*|/m:*) - properties="$properties $1" - ;; - -bl:*|/bl:*) - properties="$properties $1" - ;; - -dl:*|/dl:*) - properties="$properties $1" - ;; *) - echo "Invalid argument: $1" - usage - exit 1 + properties="$properties $1" ;; esac diff --git a/eng/common/cross/arm/sources.list.vivid b/eng/common/cross/arm/sources.list.vivid deleted file mode 100644 index 0b1215e475ac..000000000000 --- a/eng/common/cross/arm/sources.list.vivid +++ /dev/null @@ -1,11 +0,0 @@ -deb http://ports.ubuntu.com/ubuntu-ports/ vivid main restricted universe -deb-src http://ports.ubuntu.com/ubuntu-ports/ vivid main restricted universe - -deb http://ports.ubuntu.com/ubuntu-ports/ vivid-updates main restricted universe -deb-src http://ports.ubuntu.com/ubuntu-ports/ vivid-updates main restricted universe - -deb http://ports.ubuntu.com/ubuntu-ports/ vivid-backports main restricted -deb-src http://ports.ubuntu.com/ubuntu-ports/ vivid-backports main restricted - -deb http://ports.ubuntu.com/ubuntu-ports/ vivid-security main restricted universe multiverse -deb-src http://ports.ubuntu.com/ubuntu-ports/ vivid-security main restricted universe multiverse \ No newline at end of file diff --git a/eng/common/cross/arm/sources.list.wily b/eng/common/cross/arm/sources.list.wily deleted file mode 100644 index e23d1e02a05d..000000000000 --- a/eng/common/cross/arm/sources.list.wily +++ /dev/null @@ -1,11 +0,0 @@ -deb http://ports.ubuntu.com/ubuntu-ports/ wily main restricted universe -deb-src http://ports.ubuntu.com/ubuntu-ports/ wily main restricted universe - -deb http://ports.ubuntu.com/ubuntu-ports/ wily-updates main restricted universe -deb-src http://ports.ubuntu.com/ubuntu-ports/ wily-updates main restricted universe - -deb http://ports.ubuntu.com/ubuntu-ports/ wily-backports main restricted -deb-src http://ports.ubuntu.com/ubuntu-ports/ wily-backports main restricted - -deb http://ports.ubuntu.com/ubuntu-ports/ wily-security main restricted universe multiverse -deb-src http://ports.ubuntu.com/ubuntu-ports/ wily-security main restricted universe multiverse \ No newline at end of file diff --git a/eng/common/cross/arm64/sources.list.buster b/eng/common/cross/arm64/sources.list.buster new file mode 100644 index 000000000000..7194ac64a960 --- /dev/null +++ b/eng/common/cross/arm64/sources.list.buster @@ -0,0 +1,11 @@ +deb http://deb.debian.org/debian buster main +deb-src http://deb.debian.org/debian buster main + +deb http://deb.debian.org/debian-security/ buster/updates main +deb-src http://deb.debian.org/debian-security/ buster/updates main + +deb http://deb.debian.org/debian buster-updates main +deb-src http://deb.debian.org/debian buster-updates main + +deb http://deb.debian.org/debian buster-backports main contrib non-free +deb-src http://deb.debian.org/debian buster-backports main contrib non-free diff --git a/eng/common/cross/arm64/sources.list.stretch b/eng/common/cross/arm64/sources.list.stretch new file mode 100644 index 000000000000..0e1215774368 --- /dev/null +++ b/eng/common/cross/arm64/sources.list.stretch @@ -0,0 +1,12 @@ +deb http://deb.debian.org/debian stretch main +deb-src http://deb.debian.org/debian stretch main + +deb http://deb.debian.org/debian-security/ stretch/updates main +deb-src http://deb.debian.org/debian-security/ stretch/updates main + +deb http://deb.debian.org/debian stretch-updates main +deb-src http://deb.debian.org/debian stretch-updates main + +deb http://deb.debian.org/debian stretch-backports main contrib non-free +deb-src http://deb.debian.org/debian stretch-backports main contrib non-free + diff --git a/eng/common/cross/arm64/sources.list.vivid b/eng/common/cross/arm64/sources.list.vivid deleted file mode 100644 index 0b1215e475ac..000000000000 --- a/eng/common/cross/arm64/sources.list.vivid +++ /dev/null @@ -1,11 +0,0 @@ -deb http://ports.ubuntu.com/ubuntu-ports/ vivid main restricted universe -deb-src http://ports.ubuntu.com/ubuntu-ports/ vivid main restricted universe - -deb http://ports.ubuntu.com/ubuntu-ports/ vivid-updates main restricted universe -deb-src http://ports.ubuntu.com/ubuntu-ports/ vivid-updates main restricted universe - -deb http://ports.ubuntu.com/ubuntu-ports/ vivid-backports main restricted -deb-src http://ports.ubuntu.com/ubuntu-ports/ vivid-backports main restricted - -deb http://ports.ubuntu.com/ubuntu-ports/ vivid-security main restricted universe multiverse -deb-src http://ports.ubuntu.com/ubuntu-ports/ vivid-security main restricted universe multiverse \ No newline at end of file diff --git a/eng/common/cross/arm64/sources.list.wily b/eng/common/cross/arm64/sources.list.wily deleted file mode 100644 index e23d1e02a05d..000000000000 --- a/eng/common/cross/arm64/sources.list.wily +++ /dev/null @@ -1,11 +0,0 @@ -deb http://ports.ubuntu.com/ubuntu-ports/ wily main restricted universe -deb-src http://ports.ubuntu.com/ubuntu-ports/ wily main restricted universe - -deb http://ports.ubuntu.com/ubuntu-ports/ wily-updates main restricted universe -deb-src http://ports.ubuntu.com/ubuntu-ports/ wily-updates main restricted universe - -deb http://ports.ubuntu.com/ubuntu-ports/ wily-backports main restricted -deb-src http://ports.ubuntu.com/ubuntu-ports/ wily-backports main restricted - -deb http://ports.ubuntu.com/ubuntu-ports/ wily-security main restricted universe multiverse -deb-src http://ports.ubuntu.com/ubuntu-ports/ wily-security main restricted universe multiverse \ No newline at end of file diff --git a/eng/common/cross/build-rootfs.sh b/eng/common/cross/build-rootfs.sh index 805948ca83c7..34d3d2ba1fe1 100644 --- a/eng/common/cross/build-rootfs.sh +++ b/eng/common/cross/build-rootfs.sh @@ -2,21 +2,21 @@ usage() { - echo "Usage: $0 [BuildArch] [LinuxCodeName] [lldbx.y] [--skipunmount]" + echo "Usage: $0 [BuildArch] [LinuxCodeName] [lldbx.y] [--skipunmount] --rootfsdir ]" echo "BuildArch can be: arm(default), armel, arm64, x86" - echo "LinuxCodeName - optional, Code name for Linux, can be: trusty(default), vivid, wily, xenial, zesty, bionic, alpine. If BuildArch is armel, LinuxCodeName is jessie(default) or tizen." - echo "lldbx.y - optional, LLDB version, can be: lldb3.6(default), lldb3.8, lldb3.9, lldb4.0, no-lldb. Ignored for alpine" + echo "LinuxCodeName - optional, Code name for Linux, can be: trusty, xenial(default), zesty, bionic, alpine. If BuildArch is armel, LinuxCodeName is jessie(default) or tizen." + echo "lldbx.y - optional, LLDB version, can be: lldb3.9(default), lldb4.0, lldb5.0, lldb6.0 no-lldb. Ignored for alpine" echo "--skipunmount - optional, will skip the unmount of rootfs folder." exit 1 } -__LinuxCodeName=trusty +__LinuxCodeName=xenial __CrossDir=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) __InitialDir=$PWD __BuildArch=arm __UbuntuArch=armhf __UbuntuRepo="http://ports.ubuntu.com/" -__LLDB_Package="lldb-3.6-dev" +__LLDB_Package="liblldb-3.9-dev" __SkipUnmount=0 # base development support @@ -53,8 +53,12 @@ __AlpinePackages+=" openssl-dev" __AlpinePackages+=" zlib-dev" __UnprocessedBuildArgs= -for i in "$@" ; do - lowerI="$(echo $i | awk '{print tolower($0)}')" +while :; do + if [ $# -le 0 ]; then + break + fi + + lowerI="$(echo $1 | awk '{print tolower($0)}')" case $lowerI in -?|-h|--help) usage @@ -95,38 +99,49 @@ for i in "$@" ; do lldb4.0) __LLDB_Package="liblldb-4.0-dev" ;; + lldb5.0) + __LLDB_Package="liblldb-5.0-dev" + ;; + lldb6.0) + __LLDB_Package="liblldb-6.0-dev" + ;; no-lldb) unset __LLDB_Package ;; - vivid) + trusty) # Ubuntu 14.04 if [ "$__LinuxCodeName" != "jessie" ]; then - __LinuxCodeName=vivid + __LinuxCodeName=trusty fi ;; - wily) - if [ "$__LinuxCodeName" != "jessie" ]; then - __LinuxCodeName=wily - fi - ;; - xenial) + xenial) # Ubuntu 16.04 if [ "$__LinuxCodeName" != "jessie" ]; then __LinuxCodeName=xenial fi ;; - zesty) + zesty) # Ubuntu 17.04 if [ "$__LinuxCodeName" != "jessie" ]; then __LinuxCodeName=zesty fi ;; - bionic) + bionic) # Ubuntu 18.04 if [ "$__LinuxCodeName" != "jessie" ]; then __LinuxCodeName=bionic fi ;; - jessie) + jessie) # Debian 8 __LinuxCodeName=jessie __UbuntuRepo="http://ftp.debian.org/debian/" ;; + stretch) # Debian 9 + __LinuxCodeName=stretch + __UbuntuRepo="http://ftp.debian.org/debian/" + __LLDB_Package="liblldb-6.0-dev" + ;; + buster) # Debian 10 + __LinuxCodeName=buster + __UbuntuRepo="http://ftp.debian.org/debian/" + __LLDB_Package="liblldb-6.0-dev" + ;; tizen) if [ "$__BuildArch" != "armel" ]; then echo "Tizen is available only for armel." @@ -144,10 +159,16 @@ for i in "$@" ; do --skipunmount) __SkipUnmount=1 ;; + --rootfsdir|-rootfsdir) + shift + __RootfsDir=$1 + ;; *) - __UnprocessedBuildArgs="$__UnprocessedBuildArgs $i" + __UnprocessedBuildArgs="$__UnprocessedBuildArgs $1" ;; esac + + shift done if [ "$__BuildArch" == "armel" ]; then @@ -155,12 +176,14 @@ if [ "$__BuildArch" == "armel" ]; then fi __UbuntuPackages+=" ${__LLDB_Package:-}" -__RootfsDir="$__CrossDir/rootfs/$__BuildArch" - -if [[ -n "$ROOTFS_DIR" ]]; then +if [ -z "$__RootfsDir" ] && [ ! -z "$ROOTFS_DIR" ]; then __RootfsDir=$ROOTFS_DIR fi +if [ -z "$__RootfsDir" ]; then + __RootfsDir="$__CrossDir/rootfs/$__BuildArch" +fi + if [ -d "$__RootfsDir" ]; then if [ $__SkipUnmount == 0 ]; then umount $__RootfsDir/* diff --git a/eng/common/cross/x86/sources.list.vivid b/eng/common/cross/x86/sources.list.vivid deleted file mode 100644 index 26d37b20fc37..000000000000 --- a/eng/common/cross/x86/sources.list.vivid +++ /dev/null @@ -1,11 +0,0 @@ -deb http://archive.ubuntu.com/ubuntu/ vivid main restricted universe -deb-src http://archive.ubuntu.com/ubuntu/ vivid main restricted universe - -deb http://archive.ubuntu.com/ubuntu/ vivid-updates main restricted universe -deb-src http://archive.ubuntu.com/ubuntu/ vivid-updates main restricted universe - -deb http://archive.ubuntu.com/ubuntu/ vivid-backports main restricted -deb-src http://archive.ubuntu.com/ubuntu/ vivid-backports main restricted - -deb http://archive.ubuntu.com/ubuntu/ vivid-security main restricted universe multiverse -deb-src http://archive.ubuntu.com/ubuntu/ vivid-security main restricted universe multiverse diff --git a/eng/common/cross/x86/sources.list.wily b/eng/common/cross/x86/sources.list.wily deleted file mode 100644 index c4b0b442ab6b..000000000000 --- a/eng/common/cross/x86/sources.list.wily +++ /dev/null @@ -1,11 +0,0 @@ -deb http://archive.ubuntu.com/ubuntu/ wily main restricted universe -deb-src http://archive.ubuntu.com/ubuntu/ wily main restricted universe - -deb http://archive.ubuntu.com/ubuntu/ wily-updates main restricted universe -deb-src http://archive.ubuntu.com/ubuntu/ wily-updates main restricted universe - -deb http://archive.ubuntu.com/ubuntu/ wily-backports main restricted -deb-src http://archive.ubuntu.com/ubuntu/ wily-backports main restricted - -deb http://archive.ubuntu.com/ubuntu/ wily-security main restricted universe multiverse -deb-src http://archive.ubuntu.com/ubuntu/ wily-security main restricted universe multiverse diff --git a/eng/common/darc-init.ps1 b/eng/common/darc-init.ps1 index 81ffd16779cb..dea7cdd903b1 100644 --- a/eng/common/darc-init.ps1 +++ b/eng/common/darc-init.ps1 @@ -1,5 +1,6 @@ param ( - $darcVersion = $null + $darcVersion = $null, + $versionEndpoint = "https://maestro-prod.westus2.cloudapp.azure.com/api/assets/darc-version?api-version=2019-01-16" ) $verbosity = "m" @@ -16,13 +17,13 @@ function InstallDarcCli ($darcVersion) { Invoke-Expression "& `"$dotnet`" tool uninstall $darcCliPackageName -g" } - # Until we can anonymously query the BAR API for the latest arcade-services - # build applied to the PROD channel, this is hardcoded. + # If the user didn't explicitly specify the darc version, + # query the Maestro API for the correct version of darc to install. if (-not $darcVersion) { - $darcVersion = '1.1.0-beta.19205.4' + $darcVersion = $(Invoke-WebRequest -Uri $versionEndpoint -UseBasicParsing).Content } - $arcadeServicesSource = 'https://dotnetfeed.blob.core.windows.net/dotnet-arcade/index.json' + $arcadeServicesSource = 'https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json' Write-Host "Installing Darc CLI version $darcVersion..." Write-Host "You may need to restart your command window if this is the first dotnet tool you have installed." diff --git a/eng/common/darc-init.sh b/eng/common/darc-init.sh index bd7eb4639864..abdd0bc05a13 100755 --- a/eng/common/darc-init.sh +++ b/eng/common/darc-init.sh @@ -1,7 +1,8 @@ #!/usr/bin/env bash source="${BASH_SOURCE[0]}" -darcVersion="1.1.0-beta.19205.4" +darcVersion='' +versionEndpoint="https://maestro-prod.westus2.cloudapp.azure.com/api/assets/darc-version?api-version=2019-01-16" while [[ $# > 0 ]]; do opt="$(echo "$1" | awk '{print tolower($0)}')" @@ -10,6 +11,10 @@ while [[ $# > 0 ]]; do darcVersion=$2 shift ;; + --versionendpoint) + versionEndpoint=$2 + shift + ;; *) echo "Invalid argument: $1" usage @@ -33,6 +38,10 @@ verbosity=m . "$scriptroot/tools.sh" +if [ -z "$darcVersion" ]; then + darcVersion=$(curl -X GET "$versionEndpoint" -H "accept: text/plain") +fi + function InstallDarcCli { local darc_cli_package_name="microsoft.dotnet.darc" @@ -45,9 +54,9 @@ function InstallDarcCli { echo $($dotnet_root/dotnet tool uninstall $darc_cli_package_name -g) fi - local arcadeServicesSource="https://dotnetfeed.blob.core.windows.net/dotnet-arcade/index.json" + local arcadeServicesSource="https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json" - echo "Installing Darc CLI version $toolset_version..." + echo "Installing Darc CLI version $darcVersion..." echo "You may need to restart your command shell if this is the first dotnet tool you have installed." echo $($dotnet_root/dotnet tool install $darc_cli_package_name --version $darcVersion --add-source "$arcadeServicesSource" -v $verbosity -g) } diff --git a/eng/common/dotnet-install.cmd b/eng/common/dotnet-install.cmd new file mode 100644 index 000000000000..b1c2642e76f7 --- /dev/null +++ b/eng/common/dotnet-install.cmd @@ -0,0 +1,2 @@ +@echo off +powershell -ExecutionPolicy ByPass -NoProfile -command "& """%~dp0dotnet-install.ps1""" %*" \ No newline at end of file diff --git a/eng/common/dotnet-install.ps1 b/eng/common/dotnet-install.ps1 new file mode 100644 index 000000000000..5987943fd6f1 --- /dev/null +++ b/eng/common/dotnet-install.ps1 @@ -0,0 +1,22 @@ +[CmdletBinding(PositionalBinding=$false)] +Param( + [string] $verbosity = "minimal", + [string] $architecture = "", + [string] $version = "Latest", + [string] $runtime = "dotnet" +) + +. $PSScriptRoot\tools.ps1 + +try { + $dotnetRoot = Join-Path $RepoRoot ".dotnet" + InstallDotNet $dotnetRoot $version $architecture $runtime $true +} +catch { + Write-Host $_ + Write-Host $_.Exception + Write-Host $_.ScriptStackTrace + ExitWithExitCode 1 +} + +ExitWithExitCode 0 \ No newline at end of file diff --git a/eng/common/dotnet-install.sh b/eng/common/dotnet-install.sh new file mode 100644 index 000000000000..c3072c958af0 --- /dev/null +++ b/eng/common/dotnet-install.sh @@ -0,0 +1,49 @@ +#!/usr/bin/env bash + +source="${BASH_SOURCE[0]}" +# resolve $source until the file is no longer a symlink +while [[ -h "$source" ]]; do + scriptroot="$( cd -P "$( dirname "$source" )" && pwd )" + source="$(readlink "$source")" + # if $source was a relative symlink, we need to resolve it relative to the path where the + # symlink file was located + [[ $source != /* ]] && source="$scriptroot/$source" +done +scriptroot="$( cd -P "$( dirname "$source" )" && pwd )" + +version='Latest' +architecture='' +runtime='dotnet' +while [[ $# > 0 ]]; do + opt="$(echo "$1" | awk '{print tolower($0)}')" + case "$opt" in + -version|-v) + shift + version="$1" + ;; + -architecture|-a) + shift + architecture="$1" + ;; + -runtime|-r) + shift + runtime="$1" + ;; + *) + echo "Invalid argument: $1" + usage + exit 1 + ;; + esac + shift +done + +. "$scriptroot/tools.sh" +dotnetRoot="$repo_root/.dotnet" +InstallDotNet $dotnetRoot $version "$architecture" $runtime true || { + local exit_code=$? + echo "dotnet-install.sh failed (exit code '$exit_code')." >&2 + ExitWithExitCode $exit_code +} + +ExitWithExitCode 0 diff --git a/eng/common/templates/job/job.yml b/eng/common/templates/job/job.yml index 7839b70bb708..1814e0ab6124 100644 --- a/eng/common/templates/job/job.yml +++ b/eng/common/templates/job/job.yml @@ -90,6 +90,9 @@ jobs: timeoutInMinutes: ${{ parameters.timeoutInMinutes }} variables: + - ${{ if eq(parameters.enableTelemetry, 'true') }}: + - name: DOTNET_CLI_TELEMETRY_PROFILE + value: '$(Build.Repository.Uri)' - ${{ each variable in parameters.variables }}: # handle name-value variable syntax # example: diff --git a/eng/common/tools.ps1 b/eng/common/tools.ps1 index 09794dff8377..9ca177b82a34 100644 --- a/eng/common/tools.ps1 +++ b/eng/common/tools.ps1 @@ -11,6 +11,12 @@ # Binary log must be enabled on CI. [bool]$binaryLog = if (Test-Path variable:binaryLog) { $binaryLog } else { $ci } +# Set to true to use the pipelines logger which will enable Azure logging output. +# https://github.com/Microsoft/azure-pipelines-tasks/blob/master/docs/authoring/commands.md +# This flag is meant as a temporary opt-opt for the feature while validate it across +# our consumers. It will be deleted in the future. +[bool]$pipelinesLog = if (Test-Path variable:pipelinesLog) { $pipelinesLog } else { $ci } + # Turns on machine preparation/clean up code that changes the machine state (e.g. kills build processes). [bool]$prepareMachine = if (Test-Path variable:prepareMachine) { $prepareMachine } else { $false } @@ -108,7 +114,7 @@ function InitializeDotNetCli([bool]$install) { } # Find the first path on %PATH% that contains the dotnet.exe - if ($useInstalledDotNetCli -and ($env:DOTNET_INSTALL_DIR -eq $null)) { + if ($useInstalledDotNetCli -and (-not $globalJsonHasRuntimes) -and ($env:DOTNET_INSTALL_DIR -eq $null)) { $dotnetCmd = Get-Command "dotnet.exe" -ErrorAction SilentlyContinue if ($dotnetCmd -ne $null) { $env:DOTNET_INSTALL_DIR = Split-Path $dotnetCmd.Path -Parent @@ -119,7 +125,7 @@ function InitializeDotNetCli([bool]$install) { # Use dotnet installation specified in DOTNET_INSTALL_DIR if it contains the required SDK version, # otherwise install the dotnet CLI and SDK to repo local .dotnet directory to avoid potential permission issues. - if (($env:DOTNET_INSTALL_DIR -ne $null) -and (Test-Path(Join-Path $env:DOTNET_INSTALL_DIR "sdk\$dotnetSdkVersion"))) { + if ((-not $globalJsonHasRuntimes) -and ($env:DOTNET_INSTALL_DIR -ne $null) -and (Test-Path(Join-Path $env:DOTNET_INSTALL_DIR "sdk\$dotnetSdkVersion"))) { $dotnetRoot = $env:DOTNET_INSTALL_DIR } else { $dotnetRoot = Join-Path $RepoRoot ".dotnet" @@ -152,7 +158,7 @@ function InitializeDotNetCli([bool]$install) { } function GetDotNetInstallScript([string] $dotnetRoot) { - $installScript = "$dotnetRoot\dotnet-install.ps1" + $installScript = Join-Path $dotnetRoot "dotnet-install.ps1" if (!(Test-Path $installScript)) { Create-Directory $dotnetRoot Invoke-WebRequest "https://dot.net/v1/dotnet-install.ps1" -OutFile $installScript @@ -162,9 +168,21 @@ function GetDotNetInstallScript([string] $dotnetRoot) { } function InstallDotNetSdk([string] $dotnetRoot, [string] $version, [string] $architecture = "") { + InstallDotNet $dotnetRoot $version $architecture +} + +function InstallDotNet([string] $dotnetRoot, [string] $version, [string] $architecture = "", [string] $runtime = "", [bool] $skipNonVersionedFiles = $false) { $installScript = GetDotNetInstallScript $dotnetRoot $installScript = GetDotNetInstallScript $dotnetRoot - $archArg = if ($architecture) { $architecture } else { "" } - & $installScript -Version $version -InstallDir $dotnetRoot -Architecture $archArg + $installParameters = @{ + Version = $version + InstallDir = $dotnetRoot + } + + if ($architecture) { $installParameters.Architecture = $architecture } + if ($runtime) { $installParameters.Runtime = $runtime } + if ($skipNonVersionedFiles) { $installParameters.SkipNonVersionedFiles = $skipNonVersionedFiles } + + & $installScript @installParameters if ($lastExitCode -ne 0) { Write-Host "Failed to install dotnet cli (exit code '$lastExitCode')." -ForegroundColor Red ExitWithExitCode $lastExitCode @@ -340,7 +358,7 @@ function InitializeBuildTool() { ExitWithExitCode 1 } - $buildTool = @{ Path = Join-Path $dotnetRoot "dotnet.exe"; Command = "msbuild" } + $buildTool = @{ Path = Join-Path $dotnetRoot "dotnet.exe"; Command = "msbuild"; Tool = "dotnet"; Framework = "netcoreapp2.1" } } elseif ($msbuildEngine -eq "vs") { try { $msbuildPath = InitializeVisualStudioMSBuild -install:$restore @@ -349,7 +367,7 @@ function InitializeBuildTool() { ExitWithExitCode 1 } - $buildTool = @{ Path = $msbuildPath; Command = "" } + $buildTool = @{ Path = $msbuildPath; Command = ""; Tool = "vs"; Framework = "net472" } } else { Write-Host "Unexpected value of -msbuildEngine: '$msbuildEngine'." -ForegroundColor Red ExitWithExitCode 1 @@ -429,7 +447,8 @@ function InitializeToolset() { $bl = if ($binaryLog) { "/bl:" + (Join-Path $LogDir "ToolsetRestore.binlog") } else { "" } '' | Set-Content $proj - MSBuild $proj $bl /t:__WriteToolsetLocation /clp:ErrorsOnly`;NoSummary /p:__ToolsetLocationOutputFile=$toolsetLocationFile + + MSBuild-Core $proj $bl /t:__WriteToolsetLocation /clp:ErrorsOnly`;NoSummary /p:__ToolsetLocationOutputFile=$toolsetLocationFile $path = Get-Content $toolsetLocationFile -TotalCount 1 if (!(Test-Path $path)) { @@ -459,6 +478,23 @@ function Stop-Processes() { # Terminates the script if the build fails. # function MSBuild() { + if ($pipelinesLog) { + $buildTool = InitializeBuildTool + $toolsetBuildProject = InitializeToolset + $path = Split-Path -parent $toolsetBuildProject + $path = Join-Path $path (Join-Path $buildTool.Framework "Microsoft.DotNet.Arcade.Sdk.dll") + $args += "/logger:$path" + } + + MSBuild-Core @args +} + +# +# Executes msbuild (or 'dotnet msbuild') with arguments passed to the function. +# The arguments are automatically quoted. +# Terminates the script if the build fails. +# +function MSBuild-Core() { if ($ci) { if (!$binaryLog) { throw "Binary log must be enabled in CI build." @@ -522,6 +558,8 @@ $ToolsDir = Join-Path $RepoRoot ".tools" $LogDir = Join-Path (Join-Path $ArtifactsDir "log") $configuration $TempDir = Join-Path (Join-Path $ArtifactsDir "tmp") $configuration $GlobalJson = Get-Content -Raw -Path (Join-Path $RepoRoot "global.json") | ConvertFrom-Json +# true if global.json contains a "runtimes" section +$globalJsonHasRuntimes = if ($GlobalJson.tools.PSObject.Properties.Name -Match 'runtimes') { $true } else { $false } Create-Directory $ToolsetDir Create-Directory $TempDir diff --git a/eng/common/tools.sh b/eng/common/tools.sh index 59f47c5fa90d..df3eb8bce075 100644 --- a/eng/common/tools.sh +++ b/eng/common/tools.sh @@ -101,7 +101,7 @@ function InitializeDotNetCli { fi # Find the first path on $PATH that contains the dotnet.exe - if [[ "$use_installed_dotnet_cli" == true && -z "${DOTNET_INSTALL_DIR:-}" ]]; then + if [[ "$use_installed_dotnet_cli" == true && $global_json_has_runtimes == false && -z "${DOTNET_INSTALL_DIR:-}" ]]; then local dotnet_path=`command -v dotnet` if [[ -n "$dotnet_path" ]]; then ResolvePath "$dotnet_path" @@ -115,10 +115,11 @@ function InitializeDotNetCli { # Use dotnet installation specified in DOTNET_INSTALL_DIR if it contains the required SDK version, # otherwise install the dotnet CLI and SDK to repo local .dotnet directory to avoid potential permission issues. - if [[ -n "${DOTNET_INSTALL_DIR:-}" && -d "$DOTNET_INSTALL_DIR/sdk/$dotnet_sdk_version" ]]; then + if [[ $global_json_has_runtimes == false && -n "${DOTNET_INSTALL_DIR:-}" && -d "$DOTNET_INSTALL_DIR/sdk/$dotnet_sdk_version" ]]; then dotnet_root="$DOTNET_INSTALL_DIR" else dotnet_root="$repo_root/.dotnet" + export DOTNET_INSTALL_DIR="$dotnet_root" if [[ ! -d "$DOTNET_INSTALL_DIR/sdk/$dotnet_sdk_version" ]]; then @@ -149,16 +150,34 @@ function InitializeDotNetCli { function InstallDotNetSdk { local root=$1 local version=$2 + local architecture="" + if [[ $# == 3 ]]; then + architecture=$3 + fi + InstallDotNet "$root" "$version" $architecture +} +function InstallDotNet { + local root=$1 + local version=$2 + GetDotNetInstallScript "$root" local install_script=$_GetDotNetInstallScript - local arch_arg="" - if [[ $# == 3 ]]; then - arch_arg="--architecture $3" + local archArg='' + if [[ -n "${3:-}" ]]; then + archArg="--architecture $3" + fi + local runtimeArg='' + if [[ -n "${4:-}" ]]; then + runtimeArg="--runtime $4" fi - bash "$install_script" --version $version --install-dir "$root" $arch_arg || { + local skipNonVersionedFilesArg="" + if [[ "$#" -ge "5" ]]; then + skipNonVersionedFilesArg="--skip-non-versioned-files" + fi + bash "$install_script" --version $version --install-dir "$root" $archArg $runtimeArg $skipNonVersionedFilesArg || { local exit_code=$? echo "Failed to install dotnet SDK (exit code '$exit_code')." >&2 ExitWithExitCode $exit_code @@ -323,6 +342,12 @@ log_dir="$artifacts_dir/log/$configuration" temp_dir="$artifacts_dir/tmp/$configuration" global_json_file="$repo_root/global.json" +# determine if global.json contains a "runtimes" entry +global_json_has_runtimes=false +dotnetlocal_key=`grep -m 1 "runtimes" "$global_json_file"` || true +if [[ -n "$dotnetlocal_key" ]]; then + global_json_has_runtimes=true +fi # HOME may not be defined in some scenarios, but it is required by NuGet if [[ -z $HOME ]]; then @@ -337,4 +362,4 @@ mkdir -p "$log_dir" if [[ $ci == true ]]; then export TEMP="$temp_dir" export TMP="$temp_dir" -fi +fi \ No newline at end of file diff --git a/external/test-runtime/XUnit.Runtime.depproj b/external/test-runtime/XUnit.Runtime.depproj index fb9c74afa151..b27e95ddc23f 100644 --- a/external/test-runtime/XUnit.Runtime.depproj +++ b/external/test-runtime/XUnit.Runtime.depproj @@ -34,7 +34,7 @@ - + @@ -309,4 +309,20 @@ + + + + + + + false + $(MicrosoftDotNetRemoteExecutorPackage) + $(MicrosoftDotNetRemoteExecutorPackageVersion) + + + + + diff --git a/global.json b/global.json index 3bb283a02fb3..f55c481c247f 100644 --- a/global.json +++ b/global.json @@ -3,8 +3,8 @@ "dotnet": "3.0.100-preview6-011681" }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19229.8", - "Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19257.7", + "Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19264.13", + "Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19264.13", "Microsoft.NET.Sdk.IL": "3.0.0-preview6-27710-71" } } diff --git a/src/System.Diagnostics.Process/tests/ProcessTests.cs b/src/System.Diagnostics.Process/tests/ProcessTests.cs index d0b018d93f49..f310141e2ff5 100644 --- a/src/System.Diagnostics.Process/tests/ProcessTests.cs +++ b/src/System.Diagnostics.Process/tests/ProcessTests.cs @@ -950,7 +950,9 @@ public void TestProcessName() { CreateDefaultProcess(); - Assert.Equal(Path.GetFileNameWithoutExtension(RemoteExecutor.HostRunner), Path.GetFileNameWithoutExtension(_process.ProcessName), StringComparer.OrdinalIgnoreCase); + // Process.ProcessName drops the extension when it's exe. + string processName = RemoteExecutor.HostRunner.EndsWith(".exe") ?_process.ProcessName : Path.GetFileNameWithoutExtension(_process.ProcessName); + Assert.Equal(Path.GetFileNameWithoutExtension(RemoteExecutor.HostRunner), processName, StringComparer.OrdinalIgnoreCase); } [Fact] diff --git a/src/System.Runtime.Extensions/tests/System/AppDomainTests.cs b/src/System.Runtime.Extensions/tests/System/AppDomainTests.cs index d9088adc4936..bc6074bbf484 100644 --- a/src/System.Runtime.Extensions/tests/System/AppDomainTests.cs +++ b/src/System.Runtime.Extensions/tests/System/AppDomainTests.cs @@ -43,12 +43,16 @@ public void RelativeSearchPath_Is_Null() [Fact] public void TargetFrameworkTest() { - string targetFrameworkName = ".NETStandard,Version=v2.0"; - if (PlatformDetection.IsInAppContainer) + string targetFrameworkName = ".NETCoreApp,Version=v2.1"; + if (PlatformDetection.IsFullFramework) + { + targetFrameworkName = ".NETFramework,Version=v4.7.2"; + } + else if (PlatformDetection.IsInAppContainer) { targetFrameworkName = ".NETCore,Version=v5.0"; } - if (PlatformDetection.IsNetNative) + else if (PlatformDetection.IsNetNative) { targetFrameworkName = ".NETCoreApp,Version=v2.0"; } From d1912344d9f09d6d294aa555c6322ed35ec1cb28 Mon Sep 17 00:00:00 2001 From: Jim Demis <10913919+jimdemis@users.noreply.github.com> Date: Wed, 15 May 2019 20:39:46 +0300 Subject: [PATCH 359/607] Added optional/default parameters for StreamWriter/StreamReader (#36959) * Added optional/default parameters for StreamWriter/StreamReader Fix #8173 * removed tests * Added tests for constructors with optional arguments * Added tests and reverted null encoding throws --- .../StreamReader/StreamReader.CtorTests.cs | 1 + .../StreamReaderTests.netcoreapp.cs | 70 +++++++++++++++++++ .../StreamWriter/StreamWriter.CtorTests.cs | 3 +- .../StreamWriter.WriteTests.netcoreapp.cs | 36 ++++++++++ .../ref/System.Runtime.Extensions.cs | 4 +- 5 files changed, 111 insertions(+), 3 deletions(-) diff --git a/src/System.IO/tests/StreamReader/StreamReader.CtorTests.cs b/src/System.IO/tests/StreamReader/StreamReader.CtorTests.cs index 37d8afa4bea7..e1d1bdf1a8a7 100644 --- a/src/System.IO/tests/StreamReader/StreamReader.CtorTests.cs +++ b/src/System.IO/tests/StreamReader/StreamReader.CtorTests.cs @@ -4,6 +4,7 @@ using System; using System.IO; +using System.Text; using Xunit; namespace System.IO.Tests diff --git a/src/System.IO/tests/StreamReader/StreamReaderTests.netcoreapp.cs b/src/System.IO/tests/StreamReader/StreamReaderTests.netcoreapp.cs index 053cf876e4ce..5b487df8a21e 100644 --- a/src/System.IO/tests/StreamReader/StreamReaderTests.netcoreapp.cs +++ b/src/System.IO/tests/StreamReader/StreamReaderTests.netcoreapp.cs @@ -199,5 +199,75 @@ public async Task Read_SpanMemory_DisposedStream_ThrowsException() await Assert.ThrowsAsync(() => sr.ReadAsync(Memory.Empty).AsTask()); await Assert.ThrowsAsync(() => sr.ReadBlockAsync(Memory.Empty).AsTask()); } + + [Fact] + public void StreamReader_WithOptionalArguments() + { + byte[] ByteOrderMaskUtf7 = new byte[] { 0x2B, 0x2F, 0x76, 0x38 }; + byte[] ByteOrderMaskUtf8 = new byte[] { 0xEF, 0xBB, 0xBF }; + byte[] ByteOrderMaskUtf16_BE = new byte[] { 0xFE, 0xFF, 0x20, 0x20 }; + byte[] ByteOrderMaskUtf16_LE = new byte[] { 0xFF, 0xFE, 0x20, 0x20 }; + byte[] ByteOrderMaskUtf32 = new byte[] { 0x00, 0x00, 0xFE, 0xFF }; + + // check enabled leaveOpen and default encoding + using (var tempStream = new MemoryStream()) + { + using (var sr = new StreamReader(tempStream, leaveOpen: true)) + { + Assert.Equal(Encoding.UTF8, sr.CurrentEncoding); + } + Assert.True(tempStream.CanRead); + } + + // check null encoding, default encoding, default leaveOpen + using (var tempStream = new MemoryStream()) + { + using (var sr = new StreamReader(tempStream, encoding: null)) + { + Assert.Equal(Encoding.UTF8, sr.CurrentEncoding); + } + Assert.False(tempStream.CanRead); + } + + // check bufferSize, default BOM and default leaveOpen + using (var tempStream = new MemoryStream(ByteOrderMaskUtf16_BE)) + { + using (var sr = new StreamReader(tempStream, bufferSize: -1)) + { + sr.Read(); + Assert.Equal(Encoding.BigEndianUnicode, sr.CurrentEncoding); + } + Assert.False(tempStream.CanRead); + } + + // check BOM enabled/disabled encoding, enabled/disabled leaveOpen + using (var tempStream = new MemoryStream(ByteOrderMaskUtf16_BE)) + { + // check disabled BOM, default encoding + using (var sr = new StreamReader(new MemoryStream(ByteOrderMaskUtf7), detectEncodingFromByteOrderMarks: false)) + { + sr.Read(); + Assert.Equal(Encoding.UTF8, sr.CurrentEncoding); + } + + // check disabled BOM, default enconding and leaveOpen + tempStream.Seek(0, SeekOrigin.Begin); + using (var sr = new StreamReader(tempStream, detectEncodingFromByteOrderMarks: false, leaveOpen: true)) + { + sr.Read(); + Assert.Equal(Encoding.UTF8, sr.CurrentEncoding); + } + Assert.True(tempStream.CanRead); + + // check enabled BOM and leaveOpen + tempStream.Seek(0, SeekOrigin.Begin); + using (var sr = new StreamReader(tempStream, detectEncodingFromByteOrderMarks: true)) + { + sr.Read(); + Assert.Equal(Encoding.BigEndianUnicode, sr.CurrentEncoding); + } + Assert.False(tempStream.CanRead); + } + } } } diff --git a/src/System.IO/tests/StreamWriter/StreamWriter.CtorTests.cs b/src/System.IO/tests/StreamWriter/StreamWriter.CtorTests.cs index 963b6b6c76df..5f21cb4235fd 100644 --- a/src/System.IO/tests/StreamWriter/StreamWriter.CtorTests.cs +++ b/src/System.IO/tests/StreamWriter/StreamWriter.CtorTests.cs @@ -33,6 +33,7 @@ public static void CreateStreamWriter() [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)] [Fact] + [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)] public static void NullEncodingThrows() { // [] Check for ArgumentNullException on null encoding @@ -40,7 +41,7 @@ public static void NullEncodingThrows() Assert.Throws(() => new StreamWriter(new MemoryStream(), null)); } - + [Fact] public static void UTF8Encoding() { diff --git a/src/System.IO/tests/StreamWriter/StreamWriter.WriteTests.netcoreapp.cs b/src/System.IO/tests/StreamWriter/StreamWriter.WriteTests.netcoreapp.cs index 6830bed96ce2..1529d4068bbc 100644 --- a/src/System.IO/tests/StreamWriter/StreamWriter.WriteTests.netcoreapp.cs +++ b/src/System.IO/tests/StreamWriter/StreamWriter.WriteTests.netcoreapp.cs @@ -201,5 +201,41 @@ public async Task WriteAsync_Precanceled_ThrowsCancellationException() await Assert.ThrowsAnyAsync(() => writer.WriteLineAsync(ReadOnlyMemory.Empty, new CancellationToken(true))); } } + + [Fact] + public void StreamWriter_WithOptionalArguments_NoExceptions() + { + Encoding UTF8NoBOM = new UTF8Encoding(encoderShouldEmitUTF8Identifier: false, throwOnInvalidBytes: true); + + // check enabled leaveOpen and default encoding + using (var tempStream = new MemoryStream()) + { + using (var sw = new StreamWriter(tempStream, leaveOpen: true)) + { + Assert.Equal(UTF8NoBOM, sw.Encoding); + } + Assert.True(tempStream.CanRead); + } + + // check null encoding, default encoding, default leaveOpen + using (var tempStream = new MemoryStream()) + { + using (var sw = new StreamWriter(tempStream, encoding: null)) + { + Assert.Equal(UTF8NoBOM, sw.Encoding); + } + Assert.False(tempStream.CanRead); + } + + // check bufferSize, default BOM, default leaveOpen + using (var tempStream = new MemoryStream()) + { + using (var sw = new StreamWriter(tempStream, bufferSize: -1)) + { + Assert.Equal(UTF8NoBOM, sw.Encoding); + } + Assert.False(tempStream.CanRead); + } + } } } diff --git a/src/System.Runtime.Extensions/ref/System.Runtime.Extensions.cs b/src/System.Runtime.Extensions/ref/System.Runtime.Extensions.cs index 2b5cf3f679c4..5ee78a2af455 100644 --- a/src/System.Runtime.Extensions/ref/System.Runtime.Extensions.cs +++ b/src/System.Runtime.Extensions/ref/System.Runtime.Extensions.cs @@ -1437,7 +1437,7 @@ public StreamReader(System.IO.Stream stream, bool detectEncodingFromByteOrderMar public StreamReader(System.IO.Stream stream, System.Text.Encoding encoding) { } public StreamReader(System.IO.Stream stream, System.Text.Encoding encoding, bool detectEncodingFromByteOrderMarks) { } public StreamReader(System.IO.Stream stream, System.Text.Encoding encoding, bool detectEncodingFromByteOrderMarks, int bufferSize) { } - public StreamReader(System.IO.Stream stream, System.Text.Encoding encoding, bool detectEncodingFromByteOrderMarks, int bufferSize, bool leaveOpen) { } + public StreamReader(System.IO.Stream stream, System.Text.Encoding encoding = null, bool detectEncodingFromByteOrderMarks = true, int bufferSize = -1, bool leaveOpen = false) { } public StreamReader(string path) { } public StreamReader(string path, bool detectEncodingFromByteOrderMarks) { } public StreamReader(string path, System.Text.Encoding encoding) { } @@ -1470,7 +1470,7 @@ public partial class StreamWriter : System.IO.TextWriter public StreamWriter(System.IO.Stream stream) { } public StreamWriter(System.IO.Stream stream, System.Text.Encoding encoding) { } public StreamWriter(System.IO.Stream stream, System.Text.Encoding encoding, int bufferSize) { } - public StreamWriter(System.IO.Stream stream, System.Text.Encoding encoding, int bufferSize, bool leaveOpen) { } + public StreamWriter(System.IO.Stream stream, System.Text.Encoding encoding = null, int bufferSize = -1, bool leaveOpen = false) { } public StreamWriter(string path) { } public StreamWriter(string path, bool append) { } public StreamWriter(string path, bool append, System.Text.Encoding encoding) { } From cdaaeb18c974eeb1d75bfb5b4286b8caa90255e5 Mon Sep 17 00:00:00 2001 From: dotnet-maestro-bot Date: Wed, 15 May 2019 11:27:23 -0700 Subject: [PATCH 360/607] Update ProjectNTfs, ProjectNTfsTestILC to beta-27715-00, beta-27715-00, respectively (#37663) --- eng/dependencies.props | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/eng/dependencies.props b/eng/dependencies.props index ffbd4f15ed10..8affd68de121 100644 --- a/eng/dependencies.props +++ b/eng/dependencies.props @@ -9,8 +9,8 @@ These ref versions are pulled from https://github.com/dotnet/versions. --> - fa9814f6253038f1a3c6f0747294572ee53f027e - fa9814f6253038f1a3c6f0747294572ee53f027e + a801a54ca7cc0973da761acb95a7863395515ebe + a801a54ca7cc0973da761acb95a7863395515ebe 8bd1ec5fac9f0eec34ff6b34b1d878b4359e02dd @@ -22,9 +22,9 @@ - beta-27714-00 - beta-27714-00 - 1.0.0-beta-27714-00 + beta-27715-00 + beta-27715-00 + 1.0.0-beta-27715-00 4.4.0 From caf2fdb48ff9c74d69810a0984e2e15bd5504024 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Wed, 15 May 2019 20:36:23 +0200 Subject: [PATCH 361/607] Update dependencies from https://github.com/dotnet/corefx build 20190514.9 (#37669) - Microsoft.NETCore.Platforms - 3.0.0-preview6.19264.9 - runtime.native.System.IO.Ports - 4.6.0-preview6.19264.9 --- eng/Version.Details.xml | 8 ++++---- eng/Versions.props | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 7eb2c4e1b6fd..a941a5e54036 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -26,13 +26,13 @@ https://github.com/dotnet/core-setup 73226d6f119c757813f47b0dc021e8700d525f71 - + https://github.com/dotnet/corefx - f5be0283c5e00dd823a41f671f9c9a41170f0a85 + a28176b5ec68b6da1472934fe9493790d1665cae - + https://github.com/dotnet/corefx - f5be0283c5e00dd823a41f671f9c9a41170f0a85 + a28176b5ec68b6da1472934fe9493790d1665cae https://github.com/dotnet/arcade diff --git a/eng/Versions.props b/eng/Versions.props index c4546bf12cc9..0a77b9bd23fb 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -43,8 +43,8 @@ 3.0.0-preview6-27710-71 3.0.0-preview6-27710-71 - 3.0.0-preview6.19263.9 - 4.6.0-preview6.19263.9 + 3.0.0-preview6.19264.9 + 4.6.0-preview6.19264.9 2.1.0-prerelease.19264.3 From 203f61e27e93b098dcc0736fbfe2b38528dcf9aa Mon Sep 17 00:00:00 2001 From: Jeremy Kuhne Date: Wed, 15 May 2019 12:08:19 -0700 Subject: [PATCH 362/607] Improve test coverage for SequenceReader. (#37416) One of the tests was inadvertently private. Added additional coverage and clarification text to TryCopyTo. --- .../src/System/Buffers/SequenceReader.cs | 22 ++- .../tests/SequenceReader/Advance.cs | 15 ++ .../tests/SequenceReader/CopyTo.cs | 64 ++++++ .../tests/SequenceReader/IsNext.cs | 43 +++- .../tests/SequenceReader/Rewind.cs | 27 ++- .../tests/SequenceReader/SkipDelimiter.cs | 184 +++++++++--------- .../tests/System.Memory.Tests.csproj | 1 + 7 files changed, 255 insertions(+), 101 deletions(-) create mode 100644 src/System.Memory/tests/SequenceReader/CopyTo.cs diff --git a/src/System.Memory/src/System/Buffers/SequenceReader.cs b/src/System.Memory/src/System/Buffers/SequenceReader.cs index 52a24e3ae0b2..824b67b90686 100644 --- a/src/System.Memory/src/System/Buffers/SequenceReader.cs +++ b/src/System.Memory/src/System/Buffers/SequenceReader.cs @@ -147,10 +147,13 @@ public bool TryRead(out T value) /// /// Move the reader back the specified number of items. /// + /// + /// Thrown if trying to rewind a negative amount or more than . + /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public void Rewind(long count) { - if (count < 0) + if (count < 0 || count > Consumed) { ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.count); } @@ -324,13 +327,22 @@ private void AdvanceToNextSpan(long count) } /// - /// Copies data from the current to the given span. + /// Copies data from the current to the given span if there + /// is enough data to fill it. /// - /// Destination to copy to. - /// True if there is enough data to copy to the . + /// + /// This API is used to copy a fixed amount of data out of the sequence if possible. It does not advance + /// the reader. To look ahead for a specific stream of data can be used. + /// + /// Destination span to copy to. + /// True if there is enough data to completely fill the span. [MethodImpl(MethodImplOptions.AggressiveInlining)] public bool TryCopyTo(Span destination) { + // This API doesn't advance to facilitate conditional advancement based on the data returned. + // We don't provide an advance option to allow easier utilizing of stack allocated destination spans. + // (Because we can make this method readonly we can guarantee that we won't capture the span.) + ReadOnlySpan firstSpan = UnreadSpan; if (firstSpan.Length >= destination.Length) { @@ -338,11 +350,13 @@ public bool TryCopyTo(Span destination) return true; } + // Not enough in the current span to satisfy the request, fall through to the slow path return TryCopyMultisegment(destination); } internal bool TryCopyMultisegment(Span destination) { + // If we don't have enough to fill the requested buffer, return false if (Remaining < destination.Length) return false; diff --git a/src/System.Memory/tests/SequenceReader/Advance.cs b/src/System.Memory/tests/SequenceReader/Advance.cs index 5ac2253a14c1..89430bb5e475 100644 --- a/src/System.Memory/tests/SequenceReader/Advance.cs +++ b/src/System.Memory/tests/SequenceReader/Advance.cs @@ -37,6 +37,21 @@ public void Basic(bool singleSegment) Assert.Equal(3, skipReader.AdvancePastAny(new byte[] { 2, 3, 1 })); Assert.True(skipReader.TryRead(out value)); Assert.Equal(4, value); + skipReader.Rewind(skipReader.Consumed); + Assert.Equal(0, skipReader.AdvancePast(2)); + Assert.Equal(3, skipReader.AdvancePastAny(2, 3, 1)); + Assert.True(skipReader.TryRead(out value)); + Assert.Equal(4, value); + skipReader.Rewind(skipReader.Consumed); + Assert.Equal(0, skipReader.AdvancePast(2)); + Assert.Equal(3, skipReader.AdvancePastAny(2, 3, 1, 7)); + Assert.True(skipReader.TryRead(out value)); + Assert.Equal(4, value); + skipReader.Rewind(skipReader.Consumed - 1); + Assert.Equal(0, skipReader.AdvancePast(1)); + Assert.Equal(2, skipReader.AdvancePastAny(2, 3)); + Assert.True(skipReader.TryRead(out value)); + Assert.Equal(4, value); } [Fact] diff --git a/src/System.Memory/tests/SequenceReader/CopyTo.cs b/src/System.Memory/tests/SequenceReader/CopyTo.cs new file mode 100644 index 000000000000..3ef90c914530 --- /dev/null +++ b/src/System.Memory/tests/SequenceReader/CopyTo.cs @@ -0,0 +1,64 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; +using System.Buffers; +using Xunit; + +namespace System.Memory.Tests.SequenceReader +{ + public class CopyTo + { + [Fact] + public void TryCopyTo_Empty() + { + var reader = new SequenceReader(ReadOnlySequence.Empty); + + // Nothing to nothing is always possible + Assert.True(reader.TryCopyTo(Span.Empty)); + + // Nothing to something doesn't work + Assert.False(reader.TryCopyTo(new char[1])); + } + + [Fact] + public void TryCopyTo_Multisegment() + { + ReadOnlySequence chars = SequenceFactory.Create(new char[][] { + new char[] { 'A' }, + new char[] { 'B', 'C' }, + new char[] { 'D', 'E', 'F' } + }); + + ReadOnlySpan linear = new char[] { 'A', 'B', 'C', 'D', 'E', 'F' }; + + var reader = new SequenceReader(chars); + + // Something to nothing is always possible + Assert.True(reader.TryCopyTo(Span.Empty)); + Span buffer; + + // Read out ABCDEF, ABCDE, etc. + for (int i = linear.Length; i > 0; i--) + { + buffer = new char[i]; + Assert.True(reader.TryCopyTo(buffer)); + Assert.True(buffer.SequenceEqual(linear.Slice(0, i))); + } + + buffer = new char[1]; + + // Read out one at a time and move through + for (int i = 0; i < linear.Length; i++) + { + Assert.True(reader.TryCopyTo(buffer)); + Assert.True(reader.TryRead(out char value)); + Assert.Equal(buffer[0], value); + } + + // Trying to get more data than there is will fail + Assert.False(reader.TryCopyTo(new char[reader.Remaining + 1])); + } + } +} diff --git a/src/System.Memory/tests/SequenceReader/IsNext.cs b/src/System.Memory/tests/SequenceReader/IsNext.cs index 8141de4b199c..6742539c2d48 100644 --- a/src/System.Memory/tests/SequenceReader/IsNext.cs +++ b/src/System.Memory/tests/SequenceReader/IsNext.cs @@ -9,6 +9,25 @@ namespace System.Memory.Tests.SequenceReader { public class IsNext { + [Theory, + InlineData(true), + InlineData(false)] + public void IsNext_Empty(bool advancePast) + { + var reader = new SequenceReader(ReadOnlySequence.Empty); + + Assert.False(reader.IsNext('Z', advancePast)); + Assert.Equal(0, reader.Consumed); + + // Nothing is always next + Assert.True(reader.IsNext(ReadOnlySpan.Empty, advancePast)); + Assert.Equal(0, reader.Consumed); + + // Something isn't + Assert.False(reader.IsNext(new char[] { '\0' }, advancePast)); + Assert.Equal(0, reader.Consumed); + } + [Fact] public void IsNext_Span() { @@ -19,7 +38,7 @@ public void IsNext_Span() new byte[] { 5, 6, 7, 8 } }); - SequenceReader reader = new SequenceReader(bytes); + var reader = new SequenceReader(bytes); Assert.True(reader.IsNext(ReadOnlySpan.Empty, advancePast: false)); Assert.True(reader.IsNext(ReadOnlySpan.Empty, advancePast: true)); Assert.True(reader.IsNext(new byte[] { 0 }, advancePast: false)); @@ -41,6 +60,28 @@ public void IsNext_Span() Assert.True(reader.IsNext(new byte[] { 4, 5, 6 }, advancePast: true)); Assert.True(reader.TryPeek(out byte value)); Assert.Equal(7, value); + + Assert.True(reader.IsNext(new byte[] { 7, 8 }, advancePast: true)); + Assert.True(reader.End); + } + + [Fact] + public void IsNext_Value() + { + ReadOnlySequence chars = SequenceFactory.Create(new char[][] { + new char[] { 'A' }, + new char[] { 'B', 'C' }, + }); + + var reader = new SequenceReader(chars); + Assert.False(reader.IsNext('Z', advancePast: false)); + Assert.False(reader.IsNext('B', advancePast: false)); + Assert.True(reader.IsNext('A', advancePast: false)); + Assert.True(reader.IsNext('A', advancePast: true)); + Assert.True(reader.IsNext('B', advancePast: true)); + Assert.True(reader.IsNext('C', advancePast: true)); + Assert.False(reader.IsNext('C', advancePast: true)); + Assert.True(reader.End); } } } diff --git a/src/System.Memory/tests/SequenceReader/Rewind.cs b/src/System.Memory/tests/SequenceReader/Rewind.cs index bd31301b8b5a..45d8da2dca45 100644 --- a/src/System.Memory/tests/SequenceReader/Rewind.cs +++ b/src/System.Memory/tests/SequenceReader/Rewind.cs @@ -72,13 +72,32 @@ public void Rewind_ByOne() public void Rewind_Exception() { ReadOnlySequence bytes = SequenceFactory.Create(new byte[][] { - new byte[] { 0 }, - new byte[] { 1, 2 }, - new byte[] { 3, 4 }, - new byte[] { 5, 6, 7, 8 } + new byte[] { 0 }, + new byte[] { 1, 2 } }); + // Can't go negative Assert.Throws(() => new SequenceReader(bytes).Rewind(-1)); + + // Can't pull more than we consumed + Assert.Throws(() => new SequenceReader(bytes).Rewind(1)); + } + + [Fact] + public void RewindEmptyFirstSpan() + { + // This is to hit the "if (memory.Length == 0)" branch in ResetReader. + ReadOnlySequence bytes = SequenceFactory.Create(new byte[][] { + new byte[0], + new byte[] { 1, 2 }, + new byte[] { 3, 4 } + }); + + var reader = new SequenceReader(bytes); + reader.Advance(3); + Assert.True(reader.IsNext(4)); + reader.Rewind(2); + Assert.Equal(new byte[] { 1, 2 }, reader.CurrentSpan.ToArray()); } } } diff --git a/src/System.Memory/tests/SequenceReader/SkipDelimiter.cs b/src/System.Memory/tests/SequenceReader/SkipDelimiter.cs index ec102056f05f..4c56c499e280 100644 --- a/src/System.Memory/tests/SequenceReader/SkipDelimiter.cs +++ b/src/System.Memory/tests/SequenceReader/SkipDelimiter.cs @@ -8,7 +8,7 @@ namespace System.Memory.Tests.SequenceReader { - class SkipDelimiter + public class SkipDelimiter { [Fact] public void TryReadTo_SkipDelimiter() @@ -20,12 +20,22 @@ public void TryReadTo_SkipDelimiter() Assert.Equal(expected, span.ToArray()); Assert.True(reader.IsNext((byte)' ')); Assert.Equal(30, reader.Consumed); + reader.Rewind(reader.Consumed); + Assert.True(reader.TryReadTo(out ReadOnlySequence sequence, (byte)'|', (byte)'^', advancePastDelimiter: true)); + Assert.Equal(expected, sequence.ToArray()); + Assert.True(reader.IsNext((byte)' ')); + Assert.Equal(30, reader.Consumed); reader = new SequenceReader(bytes); Assert.True(reader.TryReadTo(out span, (byte)'|', (byte)'^', advancePastDelimiter: false)); Assert.Equal(expected, span.ToArray()); Assert.True(reader.IsNext((byte)'|')); Assert.Equal(29, reader.Consumed); + reader.Rewind(reader.Consumed); + Assert.True(reader.TryReadTo(out sequence, (byte)'|', (byte)'^', advancePastDelimiter: false)); + Assert.Equal(expected, sequence.ToArray()); + Assert.True(reader.IsNext((byte)'|')); + Assert.Equal(29, reader.Consumed); // Put the skip delimiter in another segment bytes = SequenceFactory.CreateUtf8("This is our ^|understanding", "^|| you see."); @@ -34,12 +44,22 @@ public void TryReadTo_SkipDelimiter() Assert.Equal(expected, span.ToArray()); Assert.True(reader.IsNext((byte)' ')); Assert.Equal(30, reader.Consumed); + reader.Rewind(reader.Consumed); + Assert.True(reader.TryReadTo(out sequence, (byte)'|', (byte)'^', advancePastDelimiter: true)); + Assert.Equal(expected, sequence.ToArray()); + Assert.True(reader.IsNext((byte)' ')); + Assert.Equal(30, reader.Consumed); reader = new SequenceReader(bytes); Assert.True(reader.TryReadTo(out span, (byte)'|', (byte)'^', advancePastDelimiter: false)); Assert.Equal(expected, span.ToArray()); Assert.True(reader.IsNext((byte)'|')); Assert.Equal(29, reader.Consumed); + reader.Rewind(reader.Consumed); + Assert.True(reader.TryReadTo(out sequence, (byte)'|', (byte)'^', advancePastDelimiter: false)); + Assert.Equal(expected, sequence.ToArray()); + Assert.True(reader.IsNext((byte)'|')); + Assert.Equal(29, reader.Consumed); // Put the skip delimiter at the end of the segment bytes = SequenceFactory.CreateUtf8("This is our ^|understanding^", "|| you see."); @@ -48,12 +68,22 @@ public void TryReadTo_SkipDelimiter() Assert.Equal(expected, span.ToArray()); Assert.True(reader.IsNext((byte)' ')); Assert.Equal(30, reader.Consumed); + reader.Rewind(reader.Consumed); + Assert.True(reader.TryReadTo(out sequence, (byte)'|', (byte)'^', advancePastDelimiter: true)); + Assert.Equal(expected, sequence.ToArray()); + Assert.True(reader.IsNext((byte)' ')); + Assert.Equal(30, reader.Consumed); reader = new SequenceReader(bytes); Assert.True(reader.TryReadTo(out span, (byte)'|', (byte)'^', advancePastDelimiter: false)); Assert.Equal(expected, span.ToArray()); Assert.True(reader.IsNext((byte)'|')); Assert.Equal(29, reader.Consumed); + reader.Rewind(reader.Consumed); + Assert.True(reader.TryReadTo(out sequence, (byte)'|', (byte)'^', advancePastDelimiter: false)); + Assert.Equal(expected, sequence.ToArray()); + Assert.True(reader.IsNext((byte)'|')); + Assert.Equal(29, reader.Consumed); // No trailing data bytes = SequenceFactory.CreateUtf8("This is our ^|understanding^||"); @@ -62,22 +92,36 @@ public void TryReadTo_SkipDelimiter() Assert.Equal(expected, span.ToArray()); Assert.True(reader.IsNext((byte)'|')); Assert.Equal(29, reader.Consumed); + reader.Rewind(reader.Consumed); + Assert.True(reader.TryReadTo(out sequence, (byte)'|', (byte)'^', advancePastDelimiter: false)); + Assert.Equal(expected, sequence.ToArray()); + Assert.True(reader.IsNext((byte)'|')); + Assert.Equal(29, reader.Consumed); reader = new SequenceReader(bytes); Assert.True(reader.TryReadTo(out span, (byte)'|', (byte)'^', advancePastDelimiter: true)); Assert.Equal(expected, span.ToArray()); Assert.True(reader.End); Assert.Equal(30, reader.Consumed); + reader.Rewind(reader.Consumed); + Assert.True(reader.TryReadTo(out sequence, (byte)'|', (byte)'^', advancePastDelimiter: true)); + Assert.Equal(expected, sequence.ToArray()); + Assert.True(reader.End); + Assert.Equal(30, reader.Consumed); // All delimiters skipped bytes = SequenceFactory.CreateUtf8("This is our ^|understanding^|"); reader = new SequenceReader(bytes); Assert.False(reader.TryReadTo(out span, (byte)'|', (byte)'^', advancePastDelimiter: false)); Assert.Equal(0, reader.Consumed); + Assert.False(reader.TryReadTo(out sequence, (byte)'|', (byte)'^', advancePastDelimiter: false)); + Assert.Equal(0, reader.Consumed); reader = new SequenceReader(bytes); Assert.False(reader.TryReadTo(out span, (byte)'|', (byte)'^', advancePastDelimiter: true)); Assert.Equal(0, reader.Consumed); + Assert.False(reader.TryReadTo(out sequence, (byte)'|', (byte)'^', advancePastDelimiter: true)); + Assert.Equal(0, reader.Consumed); bytes = SequenceFactory.CreateUtf8("abc^|de|"); reader = new SequenceReader(bytes); @@ -85,6 +129,11 @@ public void TryReadTo_SkipDelimiter() Assert.Equal(Encoding.UTF8.GetBytes("abc^|de"), span.ToArray()); Assert.True(reader.End); Assert.Equal(8, reader.Consumed); + reader.Rewind(reader.Consumed); + Assert.True(reader.TryReadTo(out sequence, (byte)'|', (byte)'^', advancePastDelimiter: true)); + Assert.Equal(Encoding.UTF8.GetBytes("abc^|de"), sequence.ToArray()); + Assert.True(reader.End); + Assert.Equal(8, reader.Consumed); // Escape leads bytes = SequenceFactory.CreateUtf8("^|a|b"); @@ -93,6 +142,11 @@ public void TryReadTo_SkipDelimiter() Assert.Equal(Encoding.UTF8.GetBytes("^|a"), span.ToArray()); Assert.True(reader.IsNext((byte)'b')); Assert.Equal(4, reader.Consumed); + reader.Rewind(reader.Consumed); + Assert.True(reader.TryReadTo(out sequence, (byte)'|', (byte)'^', advancePastDelimiter: true)); + Assert.Equal(Encoding.UTF8.GetBytes("^|a"), sequence.ToArray()); + Assert.True(reader.IsNext((byte)'b')); + Assert.Equal(4, reader.Consumed); // Delimiter starts second segment. bytes = SequenceFactory.CreateUtf8("^", "|a|b"); @@ -101,6 +155,11 @@ public void TryReadTo_SkipDelimiter() Assert.Equal(Encoding.UTF8.GetBytes("^|a"), span.ToArray()); Assert.True(reader.IsNext((byte)'b')); Assert.Equal(4, reader.Consumed); + reader.Rewind(reader.Consumed); + Assert.True(reader.TryReadTo(out sequence, (byte)'|', (byte)'^', advancePastDelimiter: true)); + Assert.Equal(Encoding.UTF8.GetBytes("^|a"), sequence.ToArray()); + Assert.True(reader.IsNext((byte)'b')); + Assert.Equal(4, reader.Consumed); } [Fact] @@ -112,6 +171,11 @@ public void TryReadTo_SkipDelimiter_Runs() Assert.Equal(Encoding.UTF8.GetBytes("abc^^"), span.ToArray()); Assert.True(reader.IsNext((byte)'|')); Assert.Equal(5, reader.Consumed); + reader.Rewind(reader.Consumed); + Assert.True(reader.TryReadTo(out ReadOnlySequence sequence, (byte)'|', (byte)'^', advancePastDelimiter: false)); + Assert.Equal(Encoding.UTF8.GetBytes("abc^^"), sequence.ToArray()); + Assert.True(reader.IsNext((byte)'|')); + Assert.Equal(5, reader.Consumed); // Split after escape char bytes = SequenceFactory.CreateUtf8("abc^^", "|def"); @@ -120,6 +184,11 @@ public void TryReadTo_SkipDelimiter_Runs() Assert.Equal(Encoding.UTF8.GetBytes("abc^^"), span.ToArray()); Assert.True(reader.IsNext((byte)'|')); Assert.Equal(5, reader.Consumed); + reader.Rewind(reader.Consumed); + Assert.True(reader.TryReadTo(out sequence, (byte)'|', (byte)'^', advancePastDelimiter: false)); + Assert.Equal(Encoding.UTF8.GetBytes("abc^^"), sequence.ToArray()); + Assert.True(reader.IsNext((byte)'|')); + Assert.Equal(5, reader.Consumed); // Split before and after escape char bytes = SequenceFactory.CreateUtf8("abc^", "^", "|def"); @@ -128,6 +197,11 @@ public void TryReadTo_SkipDelimiter_Runs() Assert.Equal(Encoding.UTF8.GetBytes("abc^^"), span.ToArray()); Assert.True(reader.IsNext((byte)'|')); Assert.Equal(5, reader.Consumed); + reader.Rewind(reader.Consumed); + Assert.True(reader.TryReadTo(out sequence, (byte)'|', (byte)'^', advancePastDelimiter: false)); + Assert.Equal(Encoding.UTF8.GetBytes("abc^^"), sequence.ToArray()); + Assert.True(reader.IsNext((byte)'|')); + Assert.Equal(5, reader.Consumed); // Check advance past delimiter reader = new SequenceReader(bytes); @@ -135,6 +209,11 @@ public void TryReadTo_SkipDelimiter_Runs() Assert.Equal(Encoding.UTF8.GetBytes("abc^^"), span.ToArray()); Assert.True(reader.IsNext((byte)'d')); Assert.Equal(6, reader.Consumed); + reader.Rewind(reader.Consumed); + Assert.True(reader.TryReadTo(out sequence, (byte)'|', (byte)'^', advancePastDelimiter: true)); + Assert.Equal(Encoding.UTF8.GetBytes("abc^^"), sequence.ToArray()); + Assert.True(reader.IsNext((byte)'d')); + Assert.Equal(6, reader.Consumed); // Leading run of 2 bytes = SequenceFactory.CreateUtf8("^^|abc"); @@ -143,6 +222,11 @@ public void TryReadTo_SkipDelimiter_Runs() Assert.Equal(Encoding.UTF8.GetBytes("^^"), span.ToArray()); Assert.True(reader.IsNext((byte)'|')); Assert.Equal(2, reader.Consumed); + reader.Rewind(reader.Consumed); + Assert.True(reader.TryReadTo(out sequence, (byte)'|', (byte)'^', advancePastDelimiter: false)); + Assert.Equal(Encoding.UTF8.GetBytes("^^"), sequence.ToArray()); + Assert.True(reader.IsNext((byte)'|')); + Assert.Equal(2, reader.Consumed); // Leading run of 3 bytes = SequenceFactory.CreateUtf8("^^^|abc"); @@ -150,6 +234,9 @@ public void TryReadTo_SkipDelimiter_Runs() Assert.False(reader.TryReadTo(out span, (byte)'|', (byte)'^', advancePastDelimiter: false)); Assert.True(reader.IsNext((byte)'^')); Assert.Equal(0, reader.Consumed); + Assert.False(reader.TryReadTo(out sequence, (byte)'|', (byte)'^', advancePastDelimiter: false)); + Assert.True(reader.IsNext((byte)'^')); + Assert.Equal(0, reader.Consumed); // Trailing run of 3 bytes = SequenceFactory.CreateUtf8("abc^^^|"); @@ -157,6 +244,9 @@ public void TryReadTo_SkipDelimiter_Runs() Assert.False(reader.TryReadTo(out span, (byte)'|', (byte)'^', advancePastDelimiter: false)); Assert.True(reader.IsNext((byte)'a')); Assert.Equal(0, reader.Consumed); + Assert.False(reader.TryReadTo(out sequence, (byte)'|', (byte)'^', advancePastDelimiter: false)); + Assert.True(reader.IsNext((byte)'a')); + Assert.Equal(0, reader.Consumed); // Trailing run of 3, split bytes = SequenceFactory.CreateUtf8("abc^^^", "|"); @@ -164,99 +254,9 @@ public void TryReadTo_SkipDelimiter_Runs() Assert.False(reader.TryReadTo(out span, (byte)'|', (byte)'^', advancePastDelimiter: false)); Assert.True(reader.IsNext((byte)'a')); Assert.Equal(0, reader.Consumed); - } - - [Fact] - public void TryReadTo_SkipDelimiter_ReadOnlySequence() - { - byte[] expected = Encoding.UTF8.GetBytes("This is our ^|understanding^|"); - ReadOnlySequence bytes = SequenceFactory.CreateUtf8("This is our ^|understanding^|| you see."); - SequenceReader reader = new SequenceReader(bytes); - Assert.True(reader.TryReadTo(out ReadOnlySequence sequence, (byte)'|', (byte)'^', advancePastDelimiter: true)); - Assert.Equal(expected, sequence.ToArray()); - Assert.True(reader.IsNext((byte)' ')); - Assert.Equal(30, reader.Consumed); - - reader = new SequenceReader(bytes); - Assert.True(reader.TryReadTo(out sequence, (byte)'|', (byte)'^', advancePastDelimiter: false)); - Assert.Equal(expected, sequence.ToArray()); - Assert.True(reader.IsNext((byte)'|')); - Assert.Equal(29, reader.Consumed); - - // Put the skip delimiter in another segment - bytes = SequenceFactory.CreateUtf8("This is our ^|understanding", "^|| you see."); - reader = new SequenceReader(bytes); - Assert.True(reader.TryReadTo(out sequence, (byte)'|', (byte)'^', advancePastDelimiter: true)); - Assert.Equal(expected, sequence.ToArray()); - Assert.True(reader.IsNext((byte)' ')); - Assert.Equal(30, reader.Consumed); - - reader = new SequenceReader(bytes); - Assert.True(reader.TryReadTo(out sequence, (byte)'|', (byte)'^', advancePastDelimiter: false)); - Assert.Equal(expected, sequence.ToArray()); - Assert.True(reader.IsNext((byte)'|')); - Assert.Equal(29, reader.Consumed); - - // Put the skip delimiter at the end of the segment - bytes = SequenceFactory.CreateUtf8("This is our ^|understanding^", "|| you see."); - reader = new SequenceReader(bytes); - Assert.True(reader.TryReadTo(out sequence, (byte)'|', (byte)'^', advancePastDelimiter: true)); - Assert.Equal(expected, sequence.ToArray()); - Assert.True(reader.IsNext((byte)' ')); - Assert.Equal(30, reader.Consumed); - - reader = new SequenceReader(bytes); - Assert.True(reader.TryReadTo(out sequence, (byte)'|', (byte)'^', advancePastDelimiter: false)); - Assert.Equal(expected, sequence.ToArray()); - Assert.True(reader.IsNext((byte)'|')); - Assert.Equal(29, reader.Consumed); - - // No trailing data - bytes = SequenceFactory.CreateUtf8("This is our ^|understanding^||"); - reader = new SequenceReader(bytes); - Assert.True(reader.TryReadTo(out sequence, (byte)'|', (byte)'^', advancePastDelimiter: false)); - Assert.Equal(expected, sequence.ToArray()); - Assert.True(reader.IsNext((byte)'|')); - Assert.Equal(29, reader.Consumed); - - reader = new SequenceReader(bytes); - Assert.True(reader.TryReadTo(out sequence, (byte)'|', (byte)'^', advancePastDelimiter: true)); - Assert.Equal(expected, sequence.ToArray()); - Assert.True(reader.End); - Assert.Equal(30, reader.Consumed); - - // All delimiters skipped - bytes = SequenceFactory.CreateUtf8("This is our ^|understanding^|"); - reader = new SequenceReader(bytes); Assert.False(reader.TryReadTo(out sequence, (byte)'|', (byte)'^', advancePastDelimiter: false)); + Assert.True(reader.IsNext((byte)'a')); Assert.Equal(0, reader.Consumed); - - reader = new SequenceReader(bytes); - Assert.False(reader.TryReadTo(out sequence, (byte)'|', (byte)'^', advancePastDelimiter: true)); - Assert.Equal(0, reader.Consumed); - - bytes = SequenceFactory.CreateUtf8("abc^|de|"); - reader = new SequenceReader(bytes); - Assert.True(reader.TryReadTo(out sequence, (byte)'|', (byte)'^', advancePastDelimiter: true)); - Assert.Equal(Encoding.UTF8.GetBytes("abc^|de"), sequence.ToArray()); - Assert.True(reader.End); - Assert.Equal(8, reader.Consumed); - - // Escape leads - bytes = SequenceFactory.CreateUtf8("^|a|b"); - reader = new SequenceReader(bytes); - Assert.True(reader.TryReadTo(out sequence, (byte)'|', (byte)'^', advancePastDelimiter: true)); - Assert.Equal(Encoding.UTF8.GetBytes("^|a"), sequence.ToArray()); - Assert.True(reader.IsNext((byte)'b')); - Assert.Equal(4, reader.Consumed); - - // Delimiter starts second segment. - bytes = SequenceFactory.CreateUtf8("^", "|a|b"); - reader = new SequenceReader(bytes); - Assert.True(reader.TryReadTo(out sequence, (byte)'|', (byte)'^', advancePastDelimiter: true)); - Assert.Equal(Encoding.UTF8.GetBytes("^|a"), sequence.ToArray()); - Assert.True(reader.IsNext((byte)'b')); - Assert.Equal(4, reader.Consumed); } } } diff --git a/src/System.Memory/tests/System.Memory.Tests.csproj b/src/System.Memory/tests/System.Memory.Tests.csproj index 74eeb412c021..aaa804efd01e 100644 --- a/src/System.Memory/tests/System.Memory.Tests.csproj +++ b/src/System.Memory/tests/System.Memory.Tests.csproj @@ -38,6 +38,7 @@ + From 797142155af425a7dd0581900ad4c9884c62e53b Mon Sep 17 00:00:00 2001 From: Jeremy Kuhne Date: Wed, 15 May 2019 12:23:23 -0700 Subject: [PATCH 363/607] Add Guid serialization support. (#37529) * Add Guid serialization support. Add non IConvertable converters to dictionary for easier extensibility. * Fix project ordering. * Remove explicit static constructor --- .../src/System.Text.Json.csproj | 1 + .../Converters/DefaultConverters.cs | 24 ++++++++++++----- .../Converters/JsonValueConverterGuid.cs | 26 +++++++++++++++++++ .../Text/Json/Serialization/JsonClassInfo.cs | 4 +-- ...estClasses.SimpleTestClassWithNullables.cs | 11 ++++++++ ...Classes.SimpleTestClassWithObjectArrays.cs | 6 +++++ ...Classes.SimpleTestClassWithSimpleObject.cs | 6 +++++ 7 files changed, 69 insertions(+), 9 deletions(-) create mode 100644 src/System.Text.Json/src/System/Text/Json/Serialization/Converters/JsonValueConverterGuid.cs diff --git a/src/System.Text.Json/src/System.Text.Json.csproj b/src/System.Text.Json/src/System.Text.Json.csproj index 14f1ecbefb57..15106dc2c4a2 100644 --- a/src/System.Text.Json/src/System.Text.Json.csproj +++ b/src/System.Text.Json/src/System.Text.Json.csproj @@ -59,6 +59,7 @@ + diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/DefaultConverters.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/DefaultConverters.cs index 0920a8abb287..bc33704e3976 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/DefaultConverters.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/DefaultConverters.cs @@ -2,12 +2,25 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System.Collections.Generic; using System.Reflection; namespace System.Text.Json.Serialization.Converters { internal static class DefaultConverters { + private static readonly Dictionary s_valueConverters = new Dictionary() + { + { typeof(DateTimeOffset), new JsonValueConverterDateTimeOffset() }, + { typeof(Guid), new JsonValueConverterGuid() }, + { typeof(JsonElement), new JsonValueConverterJsonElement() } + }; + + internal static bool IsValueConvertable(Type type) + { + return typeof(IConvertible).IsAssignableFrom(type) || s_valueConverters.ContainsKey(type); + } + internal static object Create(Type type) { if (type.IsEnum) @@ -54,19 +67,16 @@ internal static object Create(Type type) return new JsonValueConverterString(); } - if (type == typeof(DateTimeOffset)) + if (s_valueConverters.TryGetValue(type, out object value)) { - return new JsonValueConverterDateTimeOffset(); - } - if (type == typeof(JsonElement)) - { - return new JsonValueConverterJsonElement(); + return value; } + if (type == typeof(object)) { return new JsonValueConverterObject(); } - + return null; } } diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/JsonValueConverterGuid.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/JsonValueConverterGuid.cs new file mode 100644 index 000000000000..5e5809c4730d --- /dev/null +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/JsonValueConverterGuid.cs @@ -0,0 +1,26 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Text.Json.Serialization.Policies; + +namespace System.Text.Json.Serialization.Converters +{ + internal sealed class JsonValueConverterGuid : JsonValueConverter + { + public override bool TryRead(Type valueType, ref Utf8JsonReader reader, out Guid value) + { + return reader.TryGetGuid(out value); + } + + public override void Write(Guid value, Utf8JsonWriter writer) + { + writer.WriteStringValue(value); + } + + public override void Write(Span escapedPropertyName, Guid value, Utf8JsonWriter writer) + { + writer.WriteString(escapedPropertyName, value); + } + } +} diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonClassInfo.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonClassInfo.cs index 769e5e220d0d..8b53fce55fec 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonClassInfo.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonClassInfo.cs @@ -7,6 +7,7 @@ using System.Diagnostics; using System.Reflection; using System.Runtime.InteropServices; +using System.Text.Json.Serialization.Converters; namespace System.Text.Json.Serialization { @@ -349,8 +350,7 @@ internal static ClassType GetClassType(Type type) type = Nullable.GetUnderlyingType(type); } - // A Type is considered a value if it implements IConvertible or is a DateTimeOffset or JsonElement. - if (typeof(IConvertible).IsAssignableFrom(type) || type == typeof(DateTimeOffset) || type == typeof(JsonElement)) + if (DefaultConverters.IsValueConvertable(type)) { return ClassType.Value; } diff --git a/src/System.Text.Json/tests/Serialization/TestClasses.SimpleTestClassWithNullables.cs b/src/System.Text.Json/tests/Serialization/TestClasses.SimpleTestClassWithNullables.cs index c61e99f41e0c..83749c47e31b 100644 --- a/src/System.Text.Json/tests/Serialization/TestClasses.SimpleTestClassWithNullables.cs +++ b/src/System.Text.Json/tests/Serialization/TestClasses.SimpleTestClassWithNullables.cs @@ -25,6 +25,7 @@ public abstract class SimpleBaseClassWithNullables public double? MyDouble { get; set; } public DateTime? MyDateTime { get; set; } public DateTimeOffset? MyDateTimeOffset { get; set; } + public Guid? MyGuid { get; set; } public SampleEnum? MyEnum { get; set; } public short?[] MyInt16Array { get; set; } public int?[] MyInt32Array { get; set; } @@ -42,6 +43,7 @@ public abstract class SimpleBaseClassWithNullables public double?[] MyDoubleArray { get; set; } public DateTime?[] MyDateTimeArray { get; set; } public DateTimeOffset?[] MyDateTimeOffsetArray { get; set; } + public Guid?[] MyGuidArray { get; set; } public SampleEnum?[] MyEnumArray { get; set; } public Dictionary MyStringToStringDict { get; set; } public List MyListOfNullInt { get; set; } @@ -71,6 +73,7 @@ public void Verify() Assert.Null(MyDouble); Assert.Null(MyDateTime); Assert.Null(MyDateTimeOffset); + Assert.Null(MyGuid); Assert.Null(MyEnum); Assert.Null(MyInt16Array); @@ -89,6 +92,7 @@ public void Verify() Assert.Null(MyDoubleArray); Assert.Null(MyDateTimeArray); Assert.Null(MyDateTimeOffsetArray); + Assert.Null(MyGuidArray); Assert.Null(MyEnumArray); Assert.Null(MyStringToStringDict); Assert.Null(MyListOfNullInt); @@ -111,6 +115,7 @@ public void Verify() @"""MyDecimal"" : null," + @"""MyDateTime"" : null," + @"""MyDateTimeOffset"" : null," + + @"""MyGuid"" : null," + @"""MyEnum"" : null," + @"""MyInt16Array"" : null," + @"""MyInt32Array"" : null," + @@ -156,6 +161,7 @@ public class SimpleTestClassWithNullables : SimpleBaseClassWithNullables, ITestC @"""MyDecimal"" : 3.3," + @"""MyDateTime"" : ""2019-01-30T12:01:02.0000000Z""," + @"""MyDateTimeOffset"" : ""2019-01-30T12:01:02.0000000+01:00""," + + @"""MyGuid"" : ""1B33498A-7B7D-4DDA-9C13-F6AA4AB449A6""," + @"""MyEnum"" : 2," + @"""MyInt16Array"" : [1]," + @"""MyInt32Array"" : [2]," + @@ -173,6 +179,7 @@ public class SimpleTestClassWithNullables : SimpleBaseClassWithNullables, ITestC @"""MyDecimalArray"" : [3.3]," + @"""MyDateTimeArray"" : [""2019-01-30T12:01:02.0000000Z""]," + @"""MyDateTimeOffsetArray"" : [""2019-01-30T12:01:02.0000000+01:00""]," + + @"""MyGuidArray"" : [""1B33498A-7B7D-4DDA-9C13-F6AA4AB449A6""]," + @"""MyEnumArray"" : [2]," + @"""MyStringToStringDict"" : {""key"" : ""value""}," + @"""MyListOfNullInt"" : [null]" + @@ -198,6 +205,7 @@ public void Initialize() MyDecimal = 3.3m; MyDateTime = new DateTime(2019, 1, 30, 12, 1, 2, DateTimeKind.Utc); MyDateTimeOffset = new DateTimeOffset(2019, 1, 30, 12, 1, 2, new TimeSpan(1, 0, 0)); + MyGuid = new Guid("1B33498A-7B7D-4DDA-9C13-F6AA4AB449A6"); MyEnum = SampleEnum.Two; MyInt16Array = new short?[] { 1 }; @@ -216,6 +224,7 @@ public void Initialize() MyDecimalArray = new decimal?[] { 3.3m }; MyDateTimeArray = new DateTime?[] { new DateTime(2019, 1, 30, 12, 1, 2, DateTimeKind.Utc) }; MyDateTimeOffsetArray = new DateTimeOffset?[] { new DateTimeOffset(2019, 1, 30, 12, 1, 2, new TimeSpan(1, 0, 0)) }; + MyGuidArray = new Guid?[] { new Guid("1B33498A-7B7D-4DDA-9C13-F6AA4AB449A6") }; MyEnumArray = new SampleEnum?[] { SampleEnum.Two }; MyStringToStringDict = new Dictionary { { "key", "value" } }; MyListOfNullInt = new List { null }; @@ -239,6 +248,7 @@ public void Verify() Assert.Equal(MyDouble, 2.2d); Assert.Equal(MyDateTime, new DateTime(2019, 1, 30, 12, 1, 2, DateTimeKind.Utc)); Assert.Equal(MyDateTimeOffset, new DateTimeOffset(2019, 1, 30, 12, 1, 2, new TimeSpan(1, 0, 0))); + Assert.Equal(MyGuid, new Guid("1B33498A-7B7D-4DDA-9C13-F6AA4AB449A6")); Assert.Equal(MyEnum, SampleEnum.Two); Assert.Equal((short)1, MyInt16Array[0]); @@ -257,6 +267,7 @@ public void Verify() Assert.Equal(2.2d, MyDoubleArray[0]); Assert.Equal(new DateTime(2019, 1, 30, 12, 1, 2, DateTimeKind.Utc), MyDateTimeArray[0]); Assert.Equal(new DateTimeOffset(2019, 1, 30, 12, 1, 2, new TimeSpan(1, 0, 0)), MyDateTimeOffsetArray[0]); + Assert.Equal(new Guid("1B33498A-7B7D-4DDA-9C13-F6AA4AB449A6"), MyGuidArray[0]); Assert.Equal(SampleEnum.Two, MyEnumArray[0]); Assert.Equal("value", MyStringToStringDict["key"]); Assert.Null(MyListOfNullInt[0]); diff --git a/src/System.Text.Json/tests/Serialization/TestClasses.SimpleTestClassWithObjectArrays.cs b/src/System.Text.Json/tests/Serialization/TestClasses.SimpleTestClassWithObjectArrays.cs index 103f646f6522..6043dc203dcf 100644 --- a/src/System.Text.Json/tests/Serialization/TestClasses.SimpleTestClassWithObjectArrays.cs +++ b/src/System.Text.Json/tests/Serialization/TestClasses.SimpleTestClassWithObjectArrays.cs @@ -24,6 +24,7 @@ public class SimpleTestClassWithObjectArrays : ITestClass public object[] MySingle { get; set; } public object[] MyDouble { get; set; } public object[] MyDateTime { get; set; } + public object[] MyGuid { get; set; } public object[] MyEnum { get; set; } public static readonly string s_json = @@ -44,6 +45,7 @@ public class SimpleTestClassWithObjectArrays : ITestClass @"""MyDouble"" : [2.2]," + @"""MyDecimal"" : [3.3]," + @"""MyDateTime"" : [""2019-01-30T12:01:02.0000000Z""]," + + @"""MyGuid"" : [""97E9F02C-337E-4615-B26C-0020F5DC28C9""]," + @"""MyEnum"" : [2]" + // int by default @"}"; @@ -71,6 +73,7 @@ public void Initialize() MyDouble = new object[] { 2.2d }; MyDecimal = new object[] { 3.3m }; MyDateTime = new object[] { new DateTime(2019, 1, 30, 12, 1, 2, DateTimeKind.Utc) }; + MyGuid = new object[] { new Guid("97E9F02C-337E-4615-B26C-0020F5DC28C9") }; MyEnum = new object[] { SampleEnum.Two }; } @@ -131,6 +134,9 @@ public void Verify() Assert.IsType(MyDateTime[0]); Assert.Equal(JsonValueType.String, ((JsonElement)MyDateTime[0]).Type); Assert.Equal(new DateTime(2019, 1, 30, 12, 1, 2, DateTimeKind.Utc), ((JsonElement)MyDateTime[0]).GetDateTime()); + Assert.IsType(MyGuid[0]); + Assert.Equal(JsonValueType.String, ((JsonElement)MyGuid[0]).Type); + Assert.Equal(new Guid("97E9F02C-337E-4615-B26C-0020F5DC28C9"), ((JsonElement)MyGuid[0]).GetGuid()); Assert.IsType(MyEnum[0]); Assert.Equal(JsonValueType.Number, ((JsonElement)MyEnum[0]).Type); Assert.Equal(SampleEnum.Two, (SampleEnum)((JsonElement)MyEnum[0]).GetUInt32()); diff --git a/src/System.Text.Json/tests/Serialization/TestClasses.SimpleTestClassWithSimpleObject.cs b/src/System.Text.Json/tests/Serialization/TestClasses.SimpleTestClassWithSimpleObject.cs index 55ce2fd7d00a..5060fac38cf2 100644 --- a/src/System.Text.Json/tests/Serialization/TestClasses.SimpleTestClassWithSimpleObject.cs +++ b/src/System.Text.Json/tests/Serialization/TestClasses.SimpleTestClassWithSimpleObject.cs @@ -24,6 +24,7 @@ public class SimpleTestClassWithSimpleObject : ITestClass public object MySingle { get; set; } public object MyDouble { get; set; } public object MyDateTime { get; set; } + public object MyGuid { get; set; } public object MyEnum { get; set; } public static readonly string s_json = @@ -44,6 +45,7 @@ public class SimpleTestClassWithSimpleObject : ITestClass @"""MyDouble"" : 2.2," + @"""MyDecimal"" : 3.3," + @"""MyDateTime"" : ""2019-01-30T12:01:02.0000000Z""," + + @"""MyGuid"" : ""5BB9D872-DA8A-471E-AA70-08E19102683D""," + @"""MyEnum"" : 2" + // int by default @"}"; @@ -70,6 +72,7 @@ public virtual void Initialize() MyDouble = 2.2d; MyDecimal = 3.3m; MyDateTime = new DateTime(2019, 1, 30, 12, 1, 2, DateTimeKind.Utc); + MyGuid = new Guid("5BB9D872-DA8A-471E-AA70-08E19102683D"); MyEnum = SampleEnum.Two; } @@ -130,6 +133,9 @@ public virtual void Verify() Assert.IsType(MyDateTime); Assert.Equal(JsonValueType.String, ((JsonElement)MyDateTime).Type); Assert.Equal(new DateTime(2019, 1, 30, 12, 1, 2, DateTimeKind.Utc), ((JsonElement)MyDateTime).GetDateTime()); + Assert.IsType(MyGuid); + Assert.Equal(JsonValueType.String, ((JsonElement)MyGuid).Type); + Assert.Equal(new Guid("5BB9D872-DA8A-471E-AA70-08E19102683D"), ((JsonElement)MyGuid).GetGuid()); Assert.IsType(MyEnum); Assert.Equal(JsonValueType.Number, ((JsonElement)MyEnum).Type); Assert.Equal(SampleEnum.Two, (SampleEnum)((JsonElement)MyEnum).GetUInt32()); From 16725f91a2ccc41a3ef7981b828914d018f9f2fb Mon Sep 17 00:00:00 2001 From: Viktor Hofer Date: Wed, 15 May 2019 22:52:49 +0200 Subject: [PATCH 364/607] Remove ILC testing (#37681) * Remove ILC testing --- Directory.Build.props | 10 --- Directory.Build.targets | 4 - eng/InternalTools.props | 22 ----- eng/Versions.props | 17 ++++ eng/dependencies.props | 99 --------------------- eng/internal/NuGet.config | 1 - eng/pipelines/corefx-base.yml | 2 - eng/pipelines/windows.yml | 23 ----- eng/sendtohelix.proj | 1 - external/runtime/runtime.depproj | 2 - external/test-runtime/XUnit.Runtime.depproj | 30 ------- src/pretest.builds | 8 +- 12 files changed, 18 insertions(+), 201 deletions(-) delete mode 100644 eng/InternalTools.props diff --git a/Directory.Build.props b/Directory.Build.props index 20f6a94facb9..f036d6988869 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -390,7 +390,6 @@ true - true true true @@ -398,8 +397,6 @@ $([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'testhost', '$(BuildConfiguration)')) $([MSBuild]::NormalizeDirectory('$(TestHostRootPath)', 'host', 'fxr', '$(NETCoreAppTestSharedFxVersion)')) $([MSBuild]::NormalizeDirectory('$(TestHostRootPath)', 'shared', 'Microsoft.NETCore.App', '$(NETCoreAppTestSharedFxVersion)')) - $(TestHostRootPath)ILCInputFolder - $(TestHostRootPath)TestILC $(TestHostRootPath)UAPLayout @@ -423,13 +420,6 @@ - - - - - - $(DefineConstants),uap diff --git a/Directory.Build.targets b/Directory.Build.targets index 603a30e0cc15..ce2aa3e441f9 100644 --- a/Directory.Build.targets +++ b/Directory.Build.targets @@ -83,10 +83,6 @@ $(NETCoreAppTestSharedFrameworkPath) - - - $(ILCFXInputFolder) - $(UAPTestSharedFrameworkPath) diff --git a/eng/InternalTools.props b/eng/InternalTools.props deleted file mode 100644 index b16d4b44460d..000000000000 --- a/eng/InternalTools.props +++ /dev/null @@ -1,22 +0,0 @@ - - - - - true - - - - - - - - - - - - - https://dnceng.pkgs.visualstudio.com/_packaging/dotnet-internal/nuget/v3/index.json; - $(RestoreSources); - - - diff --git a/eng/Versions.props b/eng/Versions.props index 0a77b9bd23fb..352c04a6e1ee 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -49,5 +49,22 @@ 2.1.0-prerelease.19264.3 99.99.99-master-20190510.1 + + 4.4.0 + 4.4.0 + + 16.0.1 + 2.4.1-pre.build.4059 + 2.0.5 + 1.0.31 + + 1.5.0 + 4.1.4 + + Microsoft.SymbolUploader.Build.Task + 1.0.0-beta-63604-05 + + + diff --git a/eng/dependencies.props b/eng/dependencies.props index 8affd68de121..f38f7fe28c23 100644 --- a/eng/dependencies.props +++ b/eng/dependencies.props @@ -10,46 +10,11 @@ --> a801a54ca7cc0973da761acb95a7863395515ebe - a801a54ca7cc0973da761acb95a7863395515ebe - 8bd1ec5fac9f0eec34ff6b34b1d878b4359e02dd - - - - - - 4.4.0 beta-27715-00 - beta-27715-00 - 1.0.0-beta-27715-00 - - - 4.4.0 - - - 16.0.1 - 2.4.1-pre.build.4059 - 1.0.0-beta-build0020 - 2.0.5 - 1.0.31 - - - 1.5.0 - 4.1.4 - - 4.6.0-alpha-00001 - $(ProjectNTfsTestILCPackageVersion) - $(ProjectNTfsTestILCPackageVersion) - $(ProjectNTfsTestILCPackageVersion) - - - - - Microsoft.SymbolUploader.Build.Task - 1.0.0-beta-63604-05 @@ -60,18 +25,10 @@ - - $(BaseDotNetBuildInfo)sni/$(DependencyBranch) - $(SniCurrentRef) - $(BaseDotNetBuildInfo)projectn-tfs/$(DependencyBranch) $(ProjectNTfsCurrentRef) - - $(BaseDotNetBuildInfo)projectn-tfs-testilc/$(DependencyBranch) - $(ProjectNTfsTestILCCurrentRef) - https://raw.githubusercontent.com/dotnet/versions @@ -82,61 +39,5 @@ ProjectNTfsExpectedPrerelease ProjectNTfs - - $(MSBuildThisFileFullPath) - ProjectNTfsTestILCExpectedPrerelease - ProjectNTfsTestILC - - - $(MSBuildThisFileFullPath) - ProjectNTfsTestILCPackageVersion - TestILC.amd64ret - - - $(MSBuildThisFileFullPath) - RuntimeWinX64RuntimeNativeSystemDataSqlClientSniPackageVersion - runtime.win-x64.runtime.native.System.Data.SqlClient.sni - - - - - - - - - - - - 1.0.1 - - - - 1.0.5 - - - - - - - $(XUnitPackageVersion) - - - - - - - - $(XUnitPerformancePackageVersion) - - - - %(Identity) - true - - - - - diff --git a/eng/internal/NuGet.config b/eng/internal/NuGet.config index f3a94002b19a..885f44c10936 100644 --- a/eng/internal/NuGet.config +++ b/eng/internal/NuGet.config @@ -7,7 +7,6 @@ - diff --git a/eng/pipelines/corefx-base.yml b/eng/pipelines/corefx-base.yml index 6cf78b180f50..158dcc2f23e5 100644 --- a/eng/pipelines/corefx-base.yml +++ b/eng/pipelines/corefx-base.yml @@ -142,8 +142,6 @@ jobs: restoreDirectory: '$(Build.SourcesDirectory)\.packages' verbosityRestore: 'normal' externalFeedCredentials: 'dotnet-core-internal-tooling' - env: - TargetGroup: $(_framework) - ${{ if eq(job.customBuildSteps[0], '') }}: - script: $(_buildScript) diff --git a/eng/pipelines/windows.yml b/eng/pipelines/windows.yml index 54bac61921b9..31a4d6b90e80 100644 --- a/eng/pipelines/windows.yml +++ b/eng/pipelines/windows.yml @@ -96,18 +96,6 @@ jobs: _framework: uap _helixQueues: $(uapNetfxQueues) - UAPAOT_x86_Release: - _BuildConfig: Release - _architecture: x86 - _framework: uapaot - _helixQueues: $(uapNetfxQueues) - - UAPAOT_x64_Release: - _BuildConfig: Release - _architecture: x64 - _framework: uapaot - _helixQueues: $(uapNetfxQueues) - pool: ${{ if eq(parameters.isOfficialBuild, 'true') }}: name: NetCoreInternal-Pool @@ -189,7 +177,6 @@ jobs: $(_msbuildCommonParameters) displayName: Build Packages and Tests - # TODO: UAPAOT official builds should send to helix using continuation runner. # Legs without HELIX testing - job: WindowsNoTest displayName: Windows @@ -212,16 +199,6 @@ jobs: _architecture: arm _framework: uap - UAPAOT_arm_Release: - _BuildConfig: Release - _architecture: arm - _framework: uapaot - - UAPAOT_arm64_Release: - _BuildConfig: Release - _architecture: arm64 - _framework: uapaot - pool: ${{ if eq(parameters.isOfficialBuild, 'true') }}: name: NetCoreInternal-Pool diff --git a/eng/sendtohelix.proj b/eng/sendtohelix.proj index 5b07f7fe4da7..811752551651 100644 --- a/eng/sendtohelix.proj +++ b/eng/sendtohelix.proj @@ -42,7 +42,6 @@ test/functional/packaging/ test/functional/desktop/cli/ test/functional/uwp/ - test/functional/ilc/ diff --git a/external/runtime/runtime.depproj b/external/runtime/runtime.depproj index d21809c7ceb5..c7da29345fa8 100644 --- a/external/runtime/runtime.depproj +++ b/external/runtime/runtime.depproj @@ -7,8 +7,6 @@ false - - false Reference uap10.0 $(NoWarn);NU1701 diff --git a/external/test-runtime/XUnit.Runtime.depproj b/external/test-runtime/XUnit.Runtime.depproj index b27e95ddc23f..99ace03dc2f7 100644 --- a/external/test-runtime/XUnit.Runtime.depproj +++ b/external/test-runtime/XUnit.Runtime.depproj @@ -151,36 +151,6 @@ - - - - - - - - - - TestILC - $(TestILCToolsPackageName).amd64ret - $(TestILCToolsPackageName).x86ret - $(TestILCToolsPackageName).armret - $(PackagesDir)$(TestILCToolsPackageName)\$(ProjectNTfsTestILCPackageVersion)\TestILC - - - - - - - - - - diff --git a/src/pretest.builds b/src/pretest.builds index 76a2004139c1..51fbda1c146f 100644 --- a/src/pretest.builds +++ b/src/pretest.builds @@ -6,13 +6,7 @@ true - - - - - - - + From 8ebeb9a2d3ff08e248992566e14978fcd3420564 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Wed, 15 May 2019 14:49:46 -0700 Subject: [PATCH 365/607] Update dependencies from https://github.com/dotnet/standard build 20190515.1 (#37682) - NETStandard.Library - 2.1.0-prerelease.19265.1 --- eng/Version.Details.xml | 4 ++-- eng/Versions.props | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index a941a5e54036..144e584eb3ba 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -38,9 +38,9 @@ https://github.com/dotnet/arcade 670f6ee1a619a2a7c84cfdfe2a1c84fbe94e1c6b - + https://github.com/dotnet/standard - 7053cdf764a6e08a356573bd447b44c85190de0e + d3413ee9ec761bdf067114a498b9da3ebf0149df https://github.com/dotnet/arcade diff --git a/eng/Versions.props b/eng/Versions.props index 352c04a6e1ee..c17df6950c2a 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -46,7 +46,7 @@ 3.0.0-preview6.19264.9 4.6.0-preview6.19264.9 - 2.1.0-prerelease.19264.3 + 2.1.0-prerelease.19265.1 99.99.99-master-20190510.1 From d0d6a734fc877b76f766548d5e79a63aba5160cf Mon Sep 17 00:00:00 2001 From: Vladimir Sadov Date: Wed, 15 May 2019 17:13:00 -0700 Subject: [PATCH 366/607] Added System.GC.GetTotalAllocatedBytes to the ref assembly (#37635) * Update dependencies from https://github.com/dotnet/coreclr build 20190514.72 - Microsoft.NET.Sdk.IL - 3.0.0-preview6-27714-72 - Microsoft.NETCore.ILAsm - 3.0.0-preview6-27714-72 - Microsoft.NETCore.Runtime.CoreCLR - 3.0.0-preview6-27714-72 * Added GetTotalAllocatedBytes to ref * Added a test for GC.GetTotalAllocatedBytes * SImplified the test. --- eng/Version.Details.xml | 12 ++--- eng/Versions.props | 4 +- global.json | 2 +- src/System.Runtime/ref/System.Runtime.cs | 1 + .../src/ApiCompatBaseline.uapaot.txt | 1 + .../tests/System/GCTests.netcoreapp.cs | 47 +++++++++++++++++++ 6 files changed, 58 insertions(+), 9 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 144e584eb3ba..1a463f29b69a 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -1,16 +1,16 @@ - + https://github.com/dotnet/coreclr - 48431cc037776ca359de36bf71bda8c154cc2aa9 + 75addddd0601ab4e57ff41fada17128df47842ef - + https://github.com/dotnet/coreclr - 48431cc037776ca359de36bf71bda8c154cc2aa9 + 75addddd0601ab4e57ff41fada17128df47842ef - + https://github.com/dotnet/coreclr - 48431cc037776ca359de36bf71bda8c154cc2aa9 + 75addddd0601ab4e57ff41fada17128df47842ef diff --git a/eng/Versions.props b/eng/Versions.props index c17df6950c2a..20cca90a775d 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -40,8 +40,8 @@ 3.0.0-preview6-27714-15 3.0.0-preview6-27714-15 - 3.0.0-preview6-27710-71 - 3.0.0-preview6-27710-71 + 3.0.0-preview6-27714-72 + 3.0.0-preview6-27714-72 3.0.0-preview6.19264.9 4.6.0-preview6.19264.9 diff --git a/global.json b/global.json index f55c481c247f..26495566407a 100644 --- a/global.json +++ b/global.json @@ -5,6 +5,6 @@ "msbuild-sdks": { "Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19264.13", "Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19264.13", - "Microsoft.NET.Sdk.IL": "3.0.0-preview6-27710-71" + "Microsoft.NET.Sdk.IL": "3.0.0-preview6-27714-72" } } diff --git a/src/System.Runtime/ref/System.Runtime.cs b/src/System.Runtime/ref/System.Runtime.cs index 694759465fd0..b26e5728d998 100644 --- a/src/System.Runtime/ref/System.Runtime.cs +++ b/src/System.Runtime/ref/System.Runtime.cs @@ -1273,6 +1273,7 @@ public static void EndNoGCRegion() { } public static GCMemoryInfo GetGCMemoryInfo() { throw null; } public static int GetGeneration(object obj) { throw null; } public static int GetGeneration(System.WeakReference wo) { throw null; } + public static long GetTotalAllocatedBytes(bool precise = false) { throw null; } public static long GetTotalMemory(bool forceFullCollection) { throw null; } public static void KeepAlive(object obj) { } public static void RegisterForFullGCNotification(int maxGenerationThreshold, int largeObjectHeapThreshold) { } diff --git a/src/System.Runtime/src/ApiCompatBaseline.uapaot.txt b/src/System.Runtime/src/ApiCompatBaseline.uapaot.txt index 5abd07bf1734..4ecf26a99fde 100644 --- a/src/System.Runtime/src/ApiCompatBaseline.uapaot.txt +++ b/src/System.Runtime/src/ApiCompatBaseline.uapaot.txt @@ -18,3 +18,4 @@ CannotRemoveBaseTypeOrInterface : Type 'System.Memory' does not implement int CannotRemoveBaseTypeOrInterface : Type 'System.ReadOnlyMemory' does not implement interface 'System.IEquatable>' in the implementation but it does in the contract. MembersMustExist : Member 'System.GC.GetGCMemoryInfo()' does not exist in the implementation but it does exist in the contract. TypesMustExist : Type 'System.GCMemoryInfo' does not exist in the implementation but it does exist in the contract. +MembersMustExist : Member 'System.GC.GetTotalAllocatedBytes(System.Boolean)' does not exist in the implementation but it does exist in the contract. diff --git a/src/System.Runtime/tests/System/GCTests.netcoreapp.cs b/src/System.Runtime/tests/System/GCTests.netcoreapp.cs index 13cafec0fd55..e6eea7fc2ce7 100644 --- a/src/System.Runtime/tests/System/GCTests.netcoreapp.cs +++ b/src/System.Runtime/tests/System/GCTests.netcoreapp.cs @@ -64,5 +64,52 @@ public static void GetGCMemoryInfo() Assert.InRange(memoryInfo2.FragmentedBytes, memoryInfo1.FragmentedBytes + 1, long.MaxValue); }).Dispose(); } + + [Fact] + public static void GetTotalAllocatedBytes() + { + byte[] stash; + + long CallGetTotalAllocatedBytesAndCheck(long previous, out long differenceBetweenPreciseAndImprecise) + { + long precise = GC.GetTotalAllocatedBytes(true); + long imprecise = GC.GetTotalAllocatedBytes(false); + + if (precise <= 0) + { + throw new Exception($"Bytes allocated is not positive, this is unlikely. precise = {precise}"); + } + + if (imprecise < precise) + { + throw new Exception($"Imprecise total bytes allocated less than precise, imprecise is required to be a conservative estimate (that estimates high). imprecise = {imprecise}, precise = {precise}"); + } + + if (previous > precise) + { + throw new Exception($"Expected more memory to be allocated. previous = {previous}, precise = {precise}, difference = {previous - precise}"); + } + + differenceBetweenPreciseAndImprecise = imprecise - precise; + return precise; + } + + long CallGetTotalAllocatedBytes(long previous) + { + long differenceBetweenPreciseAndImprecise; + previous = CallGetTotalAllocatedBytesAndCheck(previous, out differenceBetweenPreciseAndImprecise); + stash = new byte[differenceBetweenPreciseAndImprecise]; + previous = CallGetTotalAllocatedBytesAndCheck(previous, out differenceBetweenPreciseAndImprecise); + return previous; + } + + long previous = 0; + + for (int i = 0; i < 1000; ++i) + { + stash = new byte[1234]; + previous = CallGetTotalAllocatedBytes(previous); + } + } } } From cf80956620388850469b516cc895e30a299928e2 Mon Sep 17 00:00:00 2001 From: Jeremy Kuhne Date: Wed, 15 May 2019 21:45:57 -0700 Subject: [PATCH 367/607] Fix serialization of Dictionary (#37686) We didn't drill into the value type (of the key/value pair, i.e. "object") properly when serializing. --- .../JsonSerializer.Write.HandleDictionary.cs | 7 +++- .../Text/Json/Serialization/ReadStackFrame.cs | 5 ++- .../tests/Serialization/DictionaryTests.cs | 34 +++++++++++++++++-- 3 files changed, 42 insertions(+), 4 deletions(-) diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.HandleDictionary.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.HandleDictionary.cs index b816cae4fb6e..b9b2864d5f7b 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.HandleDictionary.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.HandleDictionary.cs @@ -51,7 +51,7 @@ private static bool HandleDictionary( // Check for polymorphism. if (elementClassInfo.ClassType == ClassType.Unknown) { - object currentValue = ((IDictionaryEnumerator)state.Current.Enumerator).Entry; + object currentValue = ((IDictionaryEnumerator)state.Current.Enumerator).Entry.Value; GetRuntimeClassInfo(currentValue, ref elementClassInfo, options); } @@ -111,6 +111,11 @@ internal static void WriteDictionary( value = enumerator.Current.Value; key = enumerator.Current.Key; } + else if (current.Enumerator is IEnumerator> polymorphicEnumerator) + { + value = (TProperty)polymorphicEnumerator.Current.Value; + key = polymorphicEnumerator.Current.Key; + } else { // Todo: support non-generic Dictionary here (IDictionaryEnumerator) diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/ReadStackFrame.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/ReadStackFrame.cs index 5c3ab721c1a9..bab6bcb3bba9 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/ReadStackFrame.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/ReadStackFrame.cs @@ -52,8 +52,11 @@ public bool IsProcessingProperty return false; } + // We've got a property info. If we're a Value or polymorphic Value + // (ClassType.Unknown), return true. ClassType type = JsonPropertyInfo.ClassType; - return type == ClassType.Value || type == ClassType.Unknown; + return type == ClassType.Value || type == ClassType.Unknown + || (type == ClassType.Dictionary && KeyName != null && JsonClassInfo.ElementClassInfo.ClassType == ClassType.Unknown); } } diff --git a/src/System.Text.Json/tests/Serialization/DictionaryTests.cs b/src/System.Text.Json/tests/Serialization/DictionaryTests.cs index b0386a2c3911..7f99c2b7f4a2 100644 --- a/src/System.Text.Json/tests/Serialization/DictionaryTests.cs +++ b/src/System.Text.Json/tests/Serialization/DictionaryTests.cs @@ -65,9 +65,39 @@ public static void DuplicateKeysFail() } [Fact] - public static void DictionaryOfObjectFail() + public static void DictionaryOfObject() { - Assert.Throws(() => JsonSerializer.Parse>(@"{""Key1"":1")); + Dictionary obj = JsonSerializer.Parse>(@"{""Key1"":1}"); + Assert.Equal(1, obj.Count); + JsonElement element = (JsonElement)obj["Key1"]; + Assert.Equal(JsonValueType.Number, element.Type); + Assert.Equal(1, element.GetInt32()); + + string json = JsonSerializer.ToString(obj); + Assert.Equal(@"{""Key1"":1}", json); + } + + [Fact] + public static void DictionaryOfObject_37569() + { + // https://github.com/dotnet/corefx/issues/37569 + Dictionary dictionary = new Dictionary + { + ["key"] = new Poco { Id = 10 }, + }; + + string json = JsonSerializer.ToString(dictionary); + Assert.Equal(@"{""key"":{""Id"":10}}", json); + + dictionary = JsonSerializer.Parse>(json); + Assert.Equal(1, dictionary.Count); + JsonElement element = (JsonElement)dictionary["key"]; + Assert.Equal(@"{""Id"":10}", element.ToString()); + } + + class Poco + { + public int Id { get; set; } } [Fact] From fb97a8b5043dc4f92e437e3b21fb33e7493f1b3a Mon Sep 17 00:00:00 2001 From: Maira Wenzel Date: Wed, 15 May 2019 22:11:16 -0700 Subject: [PATCH 368/607] update/add links (#37685) * update/add links * remove en-us from link --- README.md | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 5fa021d4f41d..26b6a118994c 100644 --- a/README.md +++ b/README.md @@ -10,12 +10,12 @@ Runtime-specific library code ([System.Private.CoreLib](https://github.com/dotne ## .NET Core -Official Starting Page: https://dotnet.github.io +Official Starting Page: https://dotnet.microsoft.com/ -* [How to use .NET Core](https://github.com/dotnet/core/#get-started) (with VS, VS Code, command-line CLI) - * [Install official releases](https://www.microsoft.com/net/core) - * [Documentation](https://docs.microsoft.com/en-us/dotnet) (Get Started, Tutorials, Porting from .NET Framework, API reference, ...) - * [Deploying apps](https://docs.microsoft.com/en-us/dotnet/core/deploying) +* [How to use .NET Core](https://docs.microsoft.com/dotnet/core/get-started) (with VS, VS Code, command-line CLI) + * [Install official releases](https://dotnet.microsoft.com/download) + * [Documentation](https://docs.microsoft.com/dotnet/core) (Get Started, Tutorials, Porting from .NET Framework, API reference, ...) + * [Deploying apps](https://docs.microsoft.com/dotnet/core/deploying) * [Supported OS versions](https://github.com/dotnet/core/blob/master/os-lifecycle-policy.md) * [Roadmap](https://github.com/dotnet/core/blob/master/roadmap.md) * [Releases](https://github.com/dotnet/core/tree/master/release-notes) @@ -45,8 +45,9 @@ This section is **in progress** here: [New contributor Docs - Contributing](http ### Useful Links * [.NET Core source index](https://source.dot.net) / [.NET Framework source index](https://referencesource.microsoft.com) -* [API Reference docs](https://docs.microsoft.com/en-us/dotnet/core/api) +* [API Reference docs](https://docs.microsoft.com/dotnet/api/?view=netcore-3.0) * [.NET API Catalog](http://apisof.net) (incl. APIs from daily builds and API usage info) +* [API docs writing guidelines](https://github.com/dotnet/dotnet-api-docs/wiki) - useful when writing /// comments ### Community From a9cc03b9ad3e3c5230fdb51d10d0ff8770f50819 Mon Sep 17 00:00:00 2001 From: Levi Broderick Date: Wed, 15 May 2019 23:15:23 -0700 Subject: [PATCH 369/607] Make Label and OpCode readonly and IEquatable (dotnet/coreclr#24360) Signed-off-by: dotnet-bot --- src/Common/src/CoreLib/System/Reflection/Emit/Label.cs | 4 ++-- src/Common/src/CoreLib/System/Reflection/Emit/Opcode.cs | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Common/src/CoreLib/System/Reflection/Emit/Label.cs b/src/Common/src/CoreLib/System/Reflection/Emit/Label.cs index 676d926e0a1b..b3cacf5d434f 100644 --- a/src/Common/src/CoreLib/System/Reflection/Emit/Label.cs +++ b/src/Common/src/CoreLib/System/Reflection/Emit/Label.cs @@ -22,9 +22,9 @@ namespace System.Reflection.Emit // is passed to the MethodWriter. // Labels are created by using ILGenerator.CreateLabel and their position is set // by using ILGenerator.MarkLabel. - public struct Label : IEquatable - + https://github.com/dotnet/corefx - a28176b5ec68b6da1472934fe9493790d1665cae + fb97a8b5043dc4f92e437e3b21fb33e7493f1b3a - + https://github.com/dotnet/corefx - a28176b5ec68b6da1472934fe9493790d1665cae + fb97a8b5043dc4f92e437e3b21fb33e7493f1b3a https://github.com/dotnet/arcade diff --git a/eng/Versions.props b/eng/Versions.props index 20cca90a775d..e491f0dad6bd 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -43,8 +43,8 @@ 3.0.0-preview6-27714-72 3.0.0-preview6-27714-72 - 3.0.0-preview6.19264.9 - 4.6.0-preview6.19264.9 + 3.0.0-preview6.19265.6 + 4.6.0-preview6.19265.6 2.1.0-prerelease.19265.1 @@ -64,7 +64,6 @@ Microsoft.SymbolUploader.Build.Task 1.0.0-beta-63604-05 - From db5b11ae3d571493cdeb530709dfaec34819f66c Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Thu, 16 May 2019 08:40:21 -0700 Subject: [PATCH 371/607] Update dependencies from https://github.com/dotnet/core-setup build 20190515.11 (#37704) - Microsoft.NETCore.App - 3.0.0-preview6-27715-11 - Microsoft.NETCore.DotNetHost - 3.0.0-preview6-27715-11 - Microsoft.NETCore.DotNetHostPolicy - 3.0.0-preview6-27715-11 --- eng/Version.Details.xml | 12 ++++++------ eng/Versions.props | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 92aaec68a050..af03d8087e8b 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -14,17 +14,17 @@ - + https://github.com/dotnet/core-setup - 73226d6f119c757813f47b0dc021e8700d525f71 + d2d36e7b1e0081effa2bb220fb88238392fdc389 - + https://github.com/dotnet/core-setup - 73226d6f119c757813f47b0dc021e8700d525f71 + d2d36e7b1e0081effa2bb220fb88238392fdc389 - + https://github.com/dotnet/core-setup - 73226d6f119c757813f47b0dc021e8700d525f71 + d2d36e7b1e0081effa2bb220fb88238392fdc389 https://github.com/dotnet/corefx diff --git a/eng/Versions.props b/eng/Versions.props index e491f0dad6bd..a68000c810f0 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -36,9 +36,9 @@ 2.2.0-beta.19264.13 1.0.0-beta.19264.13 - 3.0.0-preview6-27714-15 - 3.0.0-preview6-27714-15 - 3.0.0-preview6-27714-15 + 3.0.0-preview6-27715-11 + 3.0.0-preview6-27715-11 + 3.0.0-preview6-27715-11 3.0.0-preview6-27714-72 3.0.0-preview6-27714-72 From 7e44240e1644e80a856d81cb989f26751fa52579 Mon Sep 17 00:00:00 2001 From: dotnet-maestro-bot Date: Thu, 16 May 2019 08:42:41 -0700 Subject: [PATCH 372/607] Update ProjectNTfs to beta-27716-00 (#37698) --- eng/dependencies.props | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/dependencies.props b/eng/dependencies.props index f38f7fe28c23..84ccdd668340 100644 --- a/eng/dependencies.props +++ b/eng/dependencies.props @@ -9,12 +9,12 @@ These ref versions are pulled from https://github.com/dotnet/versions. --> - a801a54ca7cc0973da761acb95a7863395515ebe + 3c9929f249aa95695ac87c545685508e25d95ae7 - beta-27715-00 + beta-27716-00 From 5310b5646aa1c8b18b6546dc5980c30c35d5f4e4 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Thu, 16 May 2019 08:43:29 -0700 Subject: [PATCH 373/607] Update dependencies from https://github.com/dotnet/standard build 20190515.2 (#37683) - NETStandard.Library - 2.1.0-prerelease.19265.2 --- eng/Version.Details.xml | 4 ++-- eng/Versions.props | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index af03d8087e8b..8deb3b7b97c9 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -38,9 +38,9 @@ https://github.com/dotnet/arcade 670f6ee1a619a2a7c84cfdfe2a1c84fbe94e1c6b - + https://github.com/dotnet/standard - d3413ee9ec761bdf067114a498b9da3ebf0149df + 4f1286909b95a37686cb3bc3ee69dba716056fb6 https://github.com/dotnet/arcade diff --git a/eng/Versions.props b/eng/Versions.props index a68000c810f0..f7d908cf84f0 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -46,7 +46,7 @@ 3.0.0-preview6.19265.6 4.6.0-preview6.19265.6 - 2.1.0-prerelease.19265.1 + 2.1.0-prerelease.19265.2 99.99.99-master-20190510.1 From b885c2296e531be15151a4857c73b4cf1c1b08c6 Mon Sep 17 00:00:00 2001 From: William Godbe Date: Thu, 16 May 2019 09:53:04 -0700 Subject: [PATCH 374/607] Mark System.Reflection.Emit* as inbox on netstandard2.1 (#37532) --- pkg/Microsoft.Private.PackageBaseline/packageIndex.json | 3 +++ .../pkg/System.Reflection.Emit.ILGeneration.pkgproj | 1 + .../pkg/System.Reflection.Emit.Lightweight.pkgproj | 1 + src/System.Reflection.Emit/pkg/System.Reflection.Emit.pkgproj | 1 + 4 files changed, 6 insertions(+) diff --git a/pkg/Microsoft.Private.PackageBaseline/packageIndex.json b/pkg/Microsoft.Private.PackageBaseline/packageIndex.json index 8a6024e4a7f7..e57d581f597a 100644 --- a/pkg/Microsoft.Private.PackageBaseline/packageIndex.json +++ b/pkg/Microsoft.Private.PackageBaseline/packageIndex.json @@ -3371,6 +3371,7 @@ "InboxOn": { "netcoreapp2.0": "4.1.0.0", "netcoreapp2.1": "4.1.1.0", + "netstandard2.1": "4.0.0.0", "net45": "4.0.0.0", "monoandroid10": "Any", "xamarinmac20": "Any" @@ -3392,6 +3393,7 @@ "BaselineVersion": "4.3.0", "InboxOn": { "netcoreapp2.0": "4.0.3.0", + "netstandard2.1": "4.0.0.0", "net45": "4.0.0.0", "portable45-net45+wp8": "4.0.0.0", "monoandroid10": "Any", @@ -3418,6 +3420,7 @@ "BaselineVersion": "4.3.0", "InboxOn": { "netcoreapp2.0": "4.0.3.0", + "netstandard2.1": "4.0.0.0", "net45": "4.0.0.0", "portable45-net45+wp8": "4.0.0.0", "monoandroid10": "Any", diff --git a/src/System.Reflection.Emit.ILGeneration/pkg/System.Reflection.Emit.ILGeneration.pkgproj b/src/System.Reflection.Emit.ILGeneration/pkg/System.Reflection.Emit.ILGeneration.pkgproj index 3f683196aba3..6dd9b1f42c08 100644 --- a/src/System.Reflection.Emit.ILGeneration/pkg/System.Reflection.Emit.ILGeneration.pkgproj +++ b/src/System.Reflection.Emit.ILGeneration/pkg/System.Reflection.Emit.ILGeneration.pkgproj @@ -12,6 +12,7 @@ + diff --git a/src/System.Reflection.Emit.Lightweight/pkg/System.Reflection.Emit.Lightweight.pkgproj b/src/System.Reflection.Emit.Lightweight/pkg/System.Reflection.Emit.Lightweight.pkgproj index 797a7ab3133c..57f5f5a63966 100644 --- a/src/System.Reflection.Emit.Lightweight/pkg/System.Reflection.Emit.Lightweight.pkgproj +++ b/src/System.Reflection.Emit.Lightweight/pkg/System.Reflection.Emit.Lightweight.pkgproj @@ -12,6 +12,7 @@ + diff --git a/src/System.Reflection.Emit/pkg/System.Reflection.Emit.pkgproj b/src/System.Reflection.Emit/pkg/System.Reflection.Emit.pkgproj index f42c55464a13..ae5220b6dc74 100644 --- a/src/System.Reflection.Emit/pkg/System.Reflection.Emit.pkgproj +++ b/src/System.Reflection.Emit/pkg/System.Reflection.Emit.pkgproj @@ -12,6 +12,7 @@ + true + 1 true netstandard-Debug;netstandard-Release From 02b383221ee03fed74968b7c68a45d626a761339 Mon Sep 17 00:00:00 2001 From: Viktor Hofer Date: Thu, 16 May 2019 22:30:40 +0200 Subject: [PATCH 381/607] Add placeholder entry to global.json (#37675) * Add placeholder entry to global.json --- global.json | 1 + 1 file changed, 1 insertion(+) diff --git a/global.json b/global.json index 26495566407a..7c9ac56b6414 100644 --- a/global.json +++ b/global.json @@ -5,6 +5,7 @@ "msbuild-sdks": { "Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19264.13", "Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19264.13", + "FIX-85B6-MERGE-9C38-CONFLICT": "1.0.0", "Microsoft.NET.Sdk.IL": "3.0.0-preview6-27714-72" } } From 75a6020a76e85fb65b6bdae9f8497f6d5596e4c2 Mon Sep 17 00:00:00 2001 From: Karel Zikmund Date: Thu, 16 May 2019 13:59:33 -0700 Subject: [PATCH 382/607] Update issue-guide.md Update owners --- Documentation/project-docs/issue-guide.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/project-docs/issue-guide.md b/Documentation/project-docs/issue-guide.md index 026640a6e4d2..3420ffd1114b 100644 --- a/Documentation/project-docs/issue-guide.md +++ b/Documentation/project-docs/issue-guide.md @@ -42,7 +42,7 @@ Areas are tracked by labels area-* (e.g. area-System.Collections). Each area |-----------------------------------------------------------------------------------------------|------------------|-------------| | [area-Infrastructure](https://github.com/dotnet/corefx/labels/area-Infrastructure) | [@ericstj](https://github.com/ericstj), [@karelz](https://github.com/karelz), [@wtgodbe](https://github.com/wtgodbe) | Covers:
  • Packaging
  • Build and test infra for CoreFX repo
  • VS integration

| | [area-Meta](https://github.com/dotnet/corefx/labels/area-Meta) | [@joperezr](https://github.com/joperezr) | Issues without clear association to any specific API/contract, e.g.
  • new contract proposals
  • cross-cutting code/test pattern changes (e.g. FxCop failures)
  • project-wide docs

| -| [area-Serialization](https://github.com/dotnet/corefx/labels/area-Serialization) | [@HongGit](https://github.com/HongGit) | Packages:
  • System.Runtime.Serialization.Xml
  • System.Runtime.Serialization.Json
  • System.Private.DataContractSerialization
  • System.Xml.XmlSerializer
Excluded:
  • System.Runtime.Serialization.Formatters
| +| [area-Serialization](https://github.com/dotnet/corefx/labels/area-Serialization) | [StephenMolloy](https://github.com/StephenMolloy), [@HongGit](https://github.com/HongGit) | Packages:
  • System.Runtime.Serialization.Xml
  • System.Runtime.Serialization.Json
  • System.Private.DataContractSerialization
  • System.Xml.XmlSerializer
Excluded:
  • System.Runtime.Serialization.Formatters
| | **System contract assemblies** | | | | [System.AppContext](https://github.com/dotnet/corefx/labels/area-System.AppContext) | **[@safern](https://github.com/safern)**, [@Anipik](https://github.com/Anipik) | | | | [System.Buffers](https://github.com/dotnet/corefx/labels/area-System.Buffers) | **[@layomia](https://github.com/layomia)**, [@JeremyKuhne](https://github.com/JeremyKuhne), [@ahsonkhan](https://github.com/ahsonkhan) | | @@ -90,7 +90,7 @@ Areas are tracked by labels area-* (e.g. area-System.Collections). Each area | [System.Runtime.Intrinsics](https://github.com/dotnet/corefx/labels/area-System.Runtime.Intrinsics) | [@tannergooding](https://github.com/tannergooding), [@CarolEidt](https://github.com/CarolEidt), [@RussKeldorph](https://github.com/RussKeldorph) | | | [System.Security](https://github.com/dotnet/corefx/labels/area-System.Security) | **[@bartonjs](https://github.com/bartonjs)**, [@GrabYourPitchforks](https://github.com/GrabYourPitchforks) | | | System.ServiceModel | N/A | [dotnet/wcf](https://github.com/dotnet/wcf) (except System.ServiceModel.Syndication) | -| [System.ServiceModel.Syndication](https://github.com/dotnet/corefx/labels/area-System.ServiceModel.Syndication) | [@HongGit](https://github.com/HongGit) | | +| [System.ServiceModel.Syndication](https://github.com/dotnet/corefx/labels/area-System.ServiceModel.Syndication) | [StephenMolloy](https://github.com/StephenMolloy), [@HongGit](https://github.com/HongGit) | | | [System.ServiceProcess](https://github.com/dotnet/corefx/labels/area-System.ServiceProcess) | **[@maryamariyan](https://github.com/maryamariyan)**, [@Anipik](https://github.com/Anipik) | | | [System.Text.Encoding](https://github.com/dotnet/corefx/labels/area-System.Text.Encoding) | **[@layomia](https://github.com/layomia)**, [@krwq](https://github.com/krwq), [@tarekgh](https://github.com/tarekgh) | | | [System.Text.Encodings.Web](https://github.com/dotnet/corefx/labels/area-System.Text.Encodings.Web) | **[@GrabYourPitchforks](https://github.com/GrabYourPitchforks)**, [@layomia](https://github.com/layomia), [@tarekgh](https://github.com/tarekgh) | | From 2c22af8903522e54f71225c40ddd383b15632ae0 Mon Sep 17 00:00:00 2001 From: JosVerburg Date: Fri, 17 May 2019 00:20:20 +0200 Subject: [PATCH 383/607] Determine the anyAttribute Namespace based on the NamespaceList (#37409) * Determine the anyAttribute Namespace based on the NamespaceList * Do not test the namespace attribute for full framework for intersection and union cases * Compare namespaces using string comparison in unit tests --- .../Xml/Schema/XmlSchemaAnyAttribute.cs | 2 +- .../XmlSchemaSet/TC_SchemaSet_AnyAttribute.cs | 82 ++++++++++++++++--- 2 files changed, 71 insertions(+), 13 deletions(-) diff --git a/src/System.Private.Xml/src/System/Xml/Schema/XmlSchemaAnyAttribute.cs b/src/System.Private.Xml/src/System/Xml/Schema/XmlSchemaAnyAttribute.cs index 9ed496b158d3..7fb2547443c5 100644 --- a/src/System.Private.Xml/src/System/Xml/Schema/XmlSchemaAnyAttribute.cs +++ b/src/System.Private.Xml/src/System/Xml/Schema/XmlSchemaAnyAttribute.cs @@ -17,7 +17,7 @@ public class XmlSchemaAnyAttribute : XmlSchemaAnnotated [XmlAttribute("namespace")] public string Namespace { - get { return _ns; } + get { return _ns ?? NamespaceList.ToString(); } set { _ns = value; } } diff --git a/src/System.Private.Xml/tests/XmlSchema/XmlSchemaSet/TC_SchemaSet_AnyAttribute.cs b/src/System.Private.Xml/tests/XmlSchema/XmlSchemaSet/TC_SchemaSet_AnyAttribute.cs index 9b63d6e217cb..5b8be302ff09 100644 --- a/src/System.Private.Xml/tests/XmlSchema/XmlSchemaSet/TC_SchemaSet_AnyAttribute.cs +++ b/src/System.Private.Xml/tests/XmlSchema/XmlSchemaSet/TC_SchemaSet_AnyAttribute.cs @@ -5,6 +5,7 @@ using Xunit; using Xunit.Abstractions; using System.IO; +using System.Linq; using System.Xml.Schema; namespace System.Xml.Tests @@ -121,14 +122,28 @@ public XmlSchema GetIntersectionSchema(string ns1, string ns2, string attrNs) return XmlSchema.Read(new StringReader(xsd), null); } + public XmlSchema GetSimpleSchema(string ns, string attrNs) + { + var xsd = @" + + + + + + + "; + + return XmlSchema.Read(new StringReader(xsd), null); + } + //Intersection namespaces [Theory] //[Variation(Desc = "complextype Any ns - ##any, attrgroup Any ns2, allow ns2 attribute")] - [InlineData("##any", "ns2", "ns2", 0)] + [InlineData("##any", "ns2", "ns2", 0, "##targetNamespace")] //[Variation(Desc = "complextype Any ns - ##any, attrgroup Any ns2, not allow ns1 attribute")] [InlineData("##any", "ns2", "ns1", 1)] //[Variation(Desc = "complextype Any ns - ns2, attrgroup Any ##any, allow ns2 attribute")] - [InlineData("ns2", "##any", "ns2", 0)] + [InlineData("ns2", "##any", "ns2", 0, "##targetNamespace")] //[Variation(Desc = "complextype Any ns - ns2, attrgroup Any ##any, not allow ns1 attribute")] [InlineData("ns2", "##any", "ns1", 1)] //[Variation(Desc = "complextype Any ns - ns1 ns2, attrgroup Any ##other, not allow ns1 attribute")] @@ -148,10 +163,10 @@ public XmlSchema GetIntersectionSchema(string ns1, string ns2, string attrNs) //[Variation(Desc = "complextype Any ns - ns1 ns3, attrgroup Any ns1 ns2, not allow ns2 attribute")] [InlineData("ns1 ns3", "ns1 ns2", "ns2", 1)] //[Variation(Desc = "complextype Any ns - ns1 ns3, attrgroup Any ns1 ns2, allow ns1 attribute")] - [InlineData("ns1 ns3", "ns1 ns2", "ns1", 0)] + [InlineData("ns1 ns3", "ns1 ns2", "ns1", 0, "ns1")] //[Variation(Desc = "complextype Any ns - ##other, attrgroup Any ##other, not allow ns1 attribute")] [InlineData("##other", "##other", "ns1", 1)] - public void v1(string ns1, string ns2, string attrNs, int expectedError) + public void v1(string ns1, string ns2, string attrNs, int expectedError, string expectedNs = null) { XmlSchemaSet xss = new XmlSchemaSet(); xss.XmlResolver = new XmlUrlResolver(); @@ -160,26 +175,33 @@ public void v1(string ns1, string ns2, string attrNs, int expectedError) xss.Compile(); Assert.Equal(expectedError, _errorCount); + + // Full framework does not set the namespace property for intersections and unions + if (!PlatformDetection.IsFullFramework && expectedNs != null) + { + XmlSchemaAnyAttribute attributeWildcard = ((XmlSchemaComplexType)xss.GlobalTypes[new XmlQualifiedName("t", attrNs)]).AttributeWildcard; + CompareWildcardNamespaces(expectedNs, attributeWildcard.Namespace); + } } [Theory] //[Variation(Desc = "basetype Any ns - ##any, derivedType Any ns - ns1, allow ns2 attribute")] - [InlineData("##any", "ns1", "ns2", 0)] + [InlineData("##any", "ns1", "ns2", 0, "##any")] //[Variation(Desc = "basetype Any ns - ns1, derivedType Any ns - ##any, allow ns2 attribute")] - [InlineData("ns1", "##any", "ns2", 0)] + [InlineData("ns1", "##any", "ns2", 0, "##any")] //[Variation(Desc = "basetype Any ns - ns1 ns2, derivedType Any ns - ns2 ns3 , allow ns3 attribute")] - [InlineData("ns1 ns2", "ns2 ns3", "ns3", 0)] + [InlineData("ns1 ns2", "ns2 ns3", "ns3", 0, "ns1 ns2 ##targetNamespace")] //[Variation(Desc = "basetype Any ns - ##other, derivedType Any ns - ##other , not allow current ns")] [InlineData("##other", "##other", "ns1", 1)] //[Variation(Desc = "basetype Any ns - ns1 ns2, derivedType Any ns - ##other , allow ns1")] - [InlineData("ns1 ns2", "##other", "ns1", 0)] + [InlineData("ns1 ns2", "##other", "ns1", 0, "##other")] //[Variation(Desc = "basetype Any ns - ns1 ns2, derivedType Any ns - ##other , allow ns2")] - [InlineData("ns1 ns2", "##other", "ns2", 0)] + [InlineData("ns1 ns2", "##other", "ns2", 0, "##other")] //[Variation(Desc = "basetype Any ns - ##other, derivedType Any ns - ns1 ns2 , allow ns2")] - [InlineData("##other", "ns1 ns2", "ns1", 0)] + [InlineData("##other", "ns1 ns2", "ns1", 0, "##other")] //[Variation(Desc = "basetype Any ns - ##other, derivedType Any ns - ns1 ns2 , allow ns2")] - [InlineData("##other", "ns1 ns2", "ns2", 0)] - public void v2(string ns1, string ns2, string attrNs, int expectedError) + [InlineData("##other", "ns1 ns2", "ns2", 0, "##other")] + public void v2(string ns1, string ns2, string attrNs, int expectedError, string expectedNs = null) { XmlSchemaSet xss = new XmlSchemaSet(); xss.XmlResolver = new XmlUrlResolver(); @@ -188,6 +210,42 @@ public void v2(string ns1, string ns2, string attrNs, int expectedError) xss.Compile(); Assert.Equal(expectedError, _errorCount); + + // Full framework does not set the namespace property for intersections and unions + if (!PlatformDetection.IsFullFramework && expectedNs != null) + { + XmlSchemaAnyAttribute attributeWildcard = ((XmlSchemaComplexType)xss.GlobalTypes[new XmlQualifiedName("t1", attrNs)]).AttributeWildcard; + CompareWildcardNamespaces(expectedNs, attributeWildcard.Namespace); + } + } + + [Theory] + //[Variation(Desc = "ns - ##any, allow any attribute")] + [InlineData("##any", "ns1", "##any")] + //[Variation(Desc = "ns - ##other, not allow ns1 attribute")] + [InlineData("##other", "ns1", "##other")] + //[Variation(Desc = "ns - ns1 ns2, allow ns1 and ns2 attribute")] + [InlineData("ns1 ns2", "ns1", "ns1 ns2")] + //[Variation(Desc = "##targetNamespace, allow current ns")] + [InlineData("##targetNamespace", "ns1", "##targetNamespace")] + public void v3(string ns, string attrNs, string expectedNs) + { + XmlSchemaSet xss = new XmlSchemaSet(); + xss.XmlResolver = new XmlUrlResolver(); + xss.ValidationEventHandler += new ValidationEventHandler(ValidationCallback); + xss.Add(GetSimpleSchema(ns, attrNs)); + xss.Compile(); + + XmlSchemaAnyAttribute attributeWildcard = ((XmlSchemaComplexType)xss.GlobalTypes[new XmlQualifiedName("t", attrNs)]).AttributeWildcard; + CompareWildcardNamespaces(expectedNs, attributeWildcard.Namespace); + } + + private static void CompareWildcardNamespaces(string expected, string actual) + { + var orderedExpected = string.Join(" ", expected.Split(' ').OrderBy(ns => ns)); + var orderedActual = string.Join(" ", actual.Split(' ').OrderBy(ns => ns)); + + Assert.Equal(orderedExpected, orderedActual); } } } From 52c6527b80062c2a3a906fd3d01881ff2f36f405 Mon Sep 17 00:00:00 2001 From: Stephen Toub Date: Thu, 16 May 2019 15:53:45 -0700 Subject: [PATCH 384/607] Add [EnumeratorCancellation] to Microsoft.Bcl.AsyncInterfaces (#37719) --- .../ref/Microsoft.Bcl.AsyncInterfaces.Forwards.cs | 1 + .../ref/Microsoft.Bcl.AsyncInterfaces.cs | 5 +++++ .../src/Microsoft.Bcl.AsyncInterfaces.csproj | 3 +++ 3 files changed, 9 insertions(+) diff --git a/src/Microsoft.Bcl.AsyncInterfaces/ref/Microsoft.Bcl.AsyncInterfaces.Forwards.cs b/src/Microsoft.Bcl.AsyncInterfaces/ref/Microsoft.Bcl.AsyncInterfaces.Forwards.cs index 11b154948a4a..1d2d2cc64621 100644 --- a/src/Microsoft.Bcl.AsyncInterfaces/ref/Microsoft.Bcl.AsyncInterfaces.Forwards.cs +++ b/src/Microsoft.Bcl.AsyncInterfaces/ref/Microsoft.Bcl.AsyncInterfaces.Forwards.cs @@ -9,5 +9,6 @@ [assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.CompilerServices.AsyncIteratorStateMachineAttribute))] [assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.CompilerServices.ConfiguredAsyncDisposable))] [assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.CompilerServices.ConfiguredCancelableAsyncEnumerable<>))] +[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.CompilerServices.EnumeratorCancellationAttribute))] [assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Threading.Tasks.TaskAsyncEnumerableExtensions))] [assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Threading.Tasks.Sources.ManualResetValueTaskSourceCore<>))] diff --git a/src/Microsoft.Bcl.AsyncInterfaces/ref/Microsoft.Bcl.AsyncInterfaces.cs b/src/Microsoft.Bcl.AsyncInterfaces/ref/Microsoft.Bcl.AsyncInterfaces.cs index 2bcebe391eeb..14e60e01a375 100644 --- a/src/Microsoft.Bcl.AsyncInterfaces/ref/Microsoft.Bcl.AsyncInterfaces.cs +++ b/src/Microsoft.Bcl.AsyncInterfaces/ref/Microsoft.Bcl.AsyncInterfaces.cs @@ -62,6 +62,11 @@ public readonly partial struct Enumerator public System.Runtime.CompilerServices.ConfiguredValueTaskAwaitable MoveNextAsync() { throw null; } } } + [System.AttributeUsageAttribute(AttributeTargets.Parameter, Inherited = false)] + public sealed class EnumeratorCancellationAttribute : System.Attribute + { + public EnumeratorCancellationAttribute() { } + } } namespace System.Threading.Tasks { diff --git a/src/Microsoft.Bcl.AsyncInterfaces/src/Microsoft.Bcl.AsyncInterfaces.csproj b/src/Microsoft.Bcl.AsyncInterfaces/src/Microsoft.Bcl.AsyncInterfaces.csproj index 710329448ba4..2a076b61760d 100644 --- a/src/Microsoft.Bcl.AsyncInterfaces/src/Microsoft.Bcl.AsyncInterfaces.csproj +++ b/src/Microsoft.Bcl.AsyncInterfaces/src/Microsoft.Bcl.AsyncInterfaces.csproj @@ -28,6 +28,9 @@ ProductionCode\Common\CoreLib\System\Threading\Tasks\TaskAsyncEnumerableExtensions.cs + + ProductionCode\System.Runtime\src\System\Runtime\CompilerServices\EnumeratorCancellationAttribute.cs + From 026fa6a6889ab1c9c8f14f55d414d2940fc59805 Mon Sep 17 00:00:00 2001 From: gnovack <50467879+gnovack@users.noreply.github.com> Date: Thu, 16 May 2019 19:35:08 -0400 Subject: [PATCH 385/607] Fixed deserialization of null arrays for issue #37606 (#37616) * Fixed deserialization of null root arrays. * Used reader.CurrentDepth to catch root level nulls. --- .../JsonSerializer.Read.HandleNull.cs | 4 +- .../tests/Serialization/Null.ReadTests.cs | 38 ++++++++++++++++++- 2 files changed, 39 insertions(+), 3 deletions(-) diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleNull.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleNull.cs index 80abfc4a631c..7f7ecb1ef8b0 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleNull.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleNull.cs @@ -16,8 +16,8 @@ private static bool HandleNull(ref Utf8JsonReader reader, ref ReadStack state, J return false; } - // If we don't have a valid property, that means we read "null" for a root object so just return. - if (state.Current.JsonPropertyInfo == null) + // If null is read at the top level and the type is nullable, then the root is "null" so just return. + if (reader.CurrentDepth == 0 && (state.Current.JsonPropertyInfo == null || state.Current.JsonPropertyInfo.CanBeNull)) { Debug.Assert(state.IsLastFrame); Debug.Assert(state.Current.ReturnValue == null); diff --git a/src/System.Text.Json/tests/Serialization/Null.ReadTests.cs b/src/System.Text.Json/tests/Serialization/Null.ReadTests.cs index ce121432ad53..34f6cae57879 100644 --- a/src/System.Text.Json/tests/Serialization/Null.ReadTests.cs +++ b/src/System.Text.Json/tests/Serialization/Null.ReadTests.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System.Collections.Generic; using Xunit; namespace System.Text.Json.Serialization.Tests @@ -17,7 +18,7 @@ public static void ClassWithNullProperty() [Fact] public static void RootObjectIsNull() - { + { { TestClassWithNull obj = JsonSerializer.Parse("null"); Assert.Null(obj); @@ -27,6 +28,41 @@ public static void RootObjectIsNull() object obj = JsonSerializer.Parse("null"); Assert.Null(obj); } + + { + string obj = JsonSerializer.Parse("null"); + Assert.Null(obj); + } + + { + IEnumerable obj = JsonSerializer.Parse>("null"); + Assert.Null(obj); + } + + { + Dictionary obj = JsonSerializer.Parse>("null"); + Assert.Null(obj); + } + + } + + [Fact] + public static void RootArrayIsNull() + { + { + int[] obj = JsonSerializer.Parse("null"); + Assert.Null(obj); + } + + { + object[] obj = JsonSerializer.Parse("null"); + Assert.Null(obj); + } + + { + TestClassWithNull[] obj = JsonSerializer.Parse("null"); + Assert.Null(obj); + } } [Fact] From d8797a0f1616c1db1e5294964f2826e051f2615e Mon Sep 17 00:00:00 2001 From: Jeremy Barton Date: Thu, 16 May 2019 16:56:35 -0700 Subject: [PATCH 386/607] Improve performance of Linux X509Chain building via caching X509Chain will use cached versions of CU\My, CU\CA, and CU\Root, in addition to the already cached LM\CA and LM\Root stores. By avoiding the dips down to the filesystem it knocks a significant amount of I/O and computation off of the store reloads (~45% of one of my perf tests was spent doing SHA-1... for verifying the HMAC on opening the CU\My files). The new heuristics are: * CU\My, CU\CA, CU\Root * After one second elapses check to see if the LastWriteTimeUtc on the directory has changed, if so, invalidate the cache. * After 30 seconds invalidate the cache no matter what. * Cache invalidation is per store * LM\CA, LM\Root * After 5 seconds elapses check to see if the LastWriteTimeUtc on either (or both) of the SSL_CERT_FILE file or SSL_CERT_DIR directory has changed (and if so, invalidate the cache) * After 5 minutes invalidate the cache no matter what. * System stores are rebuilt together. All X509Store objects for LM\CA and LM\Root will get the same Pal instance (which just no-ops the Dispose) which is a projection over the cache. All X509Store objects for CU\ stores will still use the existing "raw read" model, because otherwise the cache led to observable differences between Windows and Linux. Only X509Chain gets the cached stores. In running a chain-build-only 1000 times in a loop test, before this change my machine reported ~13.6ms per chain build, and after was 0.822ms. In running a particular SslStream-to-SslStream handshake test, 10000 iterations before the change was 7 minutes 51 seconds. After was 3 minutes 40 seconds. This change also fixes a bug introduced in the previous perf enhancement where ERR_get_error was used instead of ERR_peek_last_error (wrong end of the queue, and destructive vs passive)... and that the managed code wasn't checking for the error anyways. --- .../Interop.X509.cs | 16 +- .../pal_x509.c | 58 +--- .../pal_x509.h | 5 +- .../Pal.Unix/CachedDirectoryStoreProvider.cs | 77 +++++ .../Pal.Unix/CachedSystemStoreProvider.cs | 300 ++++++++++++++++++ .../Pal.Unix/CollectionBackedStoreProvider.cs | 93 ------ .../Pal.Unix/OpenSslX509ChainProcessor.cs | 23 +- .../Cryptography/Pal.Unix/StorePal.cs | 146 +-------- ...urity.Cryptography.X509Certificates.csproj | 3 +- 9 files changed, 425 insertions(+), 296 deletions(-) create mode 100644 src/System.Security.Cryptography.X509Certificates/src/Internal/Cryptography/Pal.Unix/CachedDirectoryStoreProvider.cs create mode 100644 src/System.Security.Cryptography.X509Certificates/src/Internal/Cryptography/Pal.Unix/CachedSystemStoreProvider.cs delete mode 100644 src/System.Security.Cryptography.X509Certificates/src/Internal/Cryptography/Pal.Unix/CollectionBackedStoreProvider.cs diff --git a/src/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.X509.cs b/src/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.X509.cs index b17af46f53fd..9c87d0bcb1ea 100644 --- a/src/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.X509.cs +++ b/src/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.X509.cs @@ -127,8 +127,20 @@ internal static SafeSharedAsn1OctetStringHandle X509FindExtensionData(SafeX509Ha [return: MarshalAs(UnmanagedType.Bool)] internal static extern bool X509ExtensionGetCritical(IntPtr ex); - [DllImport(Libraries.CryptoNative, EntryPoint = "CryptoNative_X509ChainNew")] - internal static extern SafeX509StoreHandle X509ChainNew(SafeX509StackHandle systemTrust, string userTrustPath); + [DllImport(Libraries.CryptoNative)] + private static extern SafeX509StoreHandle CryptoNative_X509ChainNew(SafeX509StackHandle systemTrust, SafeX509StackHandle userTrust); + + internal static SafeX509StoreHandle X509ChainNew(SafeX509StackHandle systemTrust, SafeX509StackHandle userTrust) + { + SafeX509StoreHandle store = CryptoNative_X509ChainNew(systemTrust, userTrust); + + if (store.IsInvalid) + { + throw CreateOpenSslCryptographicException(); + } + + return store; + } [DllImport(Libraries.CryptoNative, EntryPoint = "CryptoNative_X509StoreDestory")] internal static extern void X509StoreDestory(IntPtr v); diff --git a/src/Native/Unix/System.Security.Cryptography.Native/pal_x509.c b/src/Native/Unix/System.Security.Cryptography.Native/pal_x509.c index 59ed2a5d24c0..afda385a8555 100644 --- a/src/Native/Unix/System.Security.Cryptography.Native/pal_x509.c +++ b/src/Native/Unix/System.Security.Cryptography.Native/pal_x509.c @@ -480,7 +480,7 @@ static X509* ReadNextPublicCert(DIR* dir, X509Stack* tmpStack, char* pathTmp, si return NULL; } -X509_STORE* CryptoNative_X509ChainNew(X509Stack* systemTrust, const char* userTrustPath) +X509_STORE* CryptoNative_X509ChainNew(X509Stack* systemTrust, X509Stack* userTrust) { X509_STORE* store = X509_STORE_new(); @@ -503,56 +503,30 @@ X509_STORE* CryptoNative_X509ChainNew(X509Stack* systemTrust, const char* userTr } } - if (userTrustPath != NULL) + + if (userTrust != NULL) { - char* pathTmp; - size_t pathTmpSize; - char* nextFileWrite; - DIR* trustDir = OpenUserStore(userTrustPath, &pathTmp, &pathTmpSize, &nextFileWrite); + int count = sk_X509_num(userTrust); + int clearError = 0; - if (trustDir != NULL) + for (int i = 0; i < count; i++) { - X509* cert; - X509Stack* tmpStack = sk_X509_new_null(); - - while ((cert = ReadNextPublicCert(trustDir, tmpStack, pathTmp, pathTmpSize, nextFileWrite)) != NULL) + if (!X509_STORE_add_cert(store, sk_X509_value(userTrust, i))) { - // cert refcount is 1 - if (!X509_STORE_add_cert(store, cert)) + unsigned long error = ERR_peek_last_error(); + + if (error != ERR_PACK(ERR_LIB_X509, X509_F_X509_STORE_ADD_CERT, X509_R_CERT_ALREADY_IN_HASH_TABLE)) { - // cert refcount is still 1 - if (ERR_get_error() != - ERR_PACK(ERR_LIB_X509, X509_F_X509_STORE_ADD_CERT, X509_R_CERT_ALREADY_IN_HASH_TABLE)) - { - // cert refcount goes to 0 - X509_free(cert); - X509_STORE_free(store); - store = NULL; - break; - } + X509_STORE_free(store); + return NULL; } - // if add_cert succeeded, reduce refcount to 1 - // if add_cert failed (duplicate add), reduce refcount to 0 - X509_free(cert); - } - - sk_X509_free(tmpStack); - free(pathTmp); - closedir(trustDir); - - // store is only NULL if X509_STORE_add_cert failed, in which case we - // want to leave the error state intact, so the exception will report - // what went wrong (probably out of memory). - if (store == NULL) - { - return NULL; + clearError = 1; } + } - // PKCS12_parse can cause spurious errors. - // d2i_PKCS12_fp may have failed for invalid files. - // X509_STORE_add_cert may have reported duplicate addition. - // Just clear it all. + if (clearError) + { ERR_clear_error(); } } diff --git a/src/Native/Unix/System.Security.Cryptography.Native/pal_x509.h b/src/Native/Unix/System.Security.Cryptography.Native/pal_x509.h index cf25d05895f2..fa66f59846e2 100644 --- a/src/Native/Unix/System.Security.Cryptography.Native/pal_x509.h +++ b/src/Native/Unix/System.Security.Cryptography.Native/pal_x509.h @@ -337,10 +337,9 @@ Returns the input value. DLLEXPORT X509* CryptoNative_X509UpRef(X509* x509); /* -Create a new X509_STORE, considering the certificates from systemTrust and any readable PFX -in userTrustPath to be trusted +Create a new X509_STORE, considering the certificates from systemTrust and userTrust */ -DLLEXPORT X509_STORE* CryptoNative_X509ChainNew(X509Stack* systemTrust, const char* userTrustPath); +DLLEXPORT X509_STORE* CryptoNative_X509ChainNew(X509Stack* systemTrust, X509Stack* userTrust); /* Adds all of the simple certificates from null-or-empty-password PFX files in storePath to stack. diff --git a/src/System.Security.Cryptography.X509Certificates/src/Internal/Cryptography/Pal.Unix/CachedDirectoryStoreProvider.cs b/src/System.Security.Cryptography.X509Certificates/src/Internal/Cryptography/Pal.Unix/CachedDirectoryStoreProvider.cs new file mode 100644 index 000000000000..cbf5f5abee4b --- /dev/null +++ b/src/System.Security.Cryptography.X509Certificates/src/Internal/Cryptography/Pal.Unix/CachedDirectoryStoreProvider.cs @@ -0,0 +1,77 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; +using System.Diagnostics; +using System.IO; +using Microsoft.Win32.SafeHandles; + +namespace Internal.Cryptography.Pal +{ + internal sealed class CachedDirectoryStoreProvider + { + // These intervals are mostly arbitrary. + // Prior to this caching these stores were always read "hot" from disk, and 30 seconds + // seems like "long enough" for performance gains with "short enough" that if the filesystem + // has LastWrite updating disabled that the process will be mostly responsive. + private static readonly TimeSpan s_lastWriteRecheckInterval = TimeSpan.FromSeconds(1); + private static readonly TimeSpan s_assumeInvalidInterval = TimeSpan.FromSeconds(30); + + private readonly Stopwatch _recheckStopwatch = new Stopwatch(); + private readonly DirectoryInfo _storeDirectoryInfo; + + private SafeX509StackHandle _nativeCollection; + private DateTime _loadLastWrite; + + internal CachedDirectoryStoreProvider(string storeName) + { + string storePath = DirectoryBasedStoreProvider.GetStorePath(storeName); + _storeDirectoryInfo = new DirectoryInfo(storePath); + } + + internal SafeX509StackHandle GetNativeCollection() + { + SafeX509StackHandle ret = _nativeCollection; + + TimeSpan elapsed = _recheckStopwatch.Elapsed; + + if (ret == null || elapsed >= s_lastWriteRecheckInterval) + { + lock (_recheckStopwatch) + { + _storeDirectoryInfo.Refresh(); + DirectoryInfo info = _storeDirectoryInfo; + + if (ret == null || + elapsed >= s_assumeInvalidInterval || + (info.Exists && info.LastWriteTimeUtc != _loadLastWrite)) + { + SafeX509StackHandle newColl = Interop.Crypto.NewX509Stack(); + Interop.Crypto.CheckValidOpenSslHandle(newColl); + + if (info.Exists) + { + Interop.Crypto.X509StackAddDirectoryStore(newColl, info.FullName); + _loadLastWrite = info.LastWriteTimeUtc; + } + + + // The existing collection is not Disposed here, intentionally. + // It could be in the gap between when they are returned from this method and + // not yet used in a P/Invoke, which would result in an exception being thrown. + // In order to maintain "finalization-free" this method would need to always + // DangerousAddRef, and the callers would need to DangerousRelease, + // adding more interlocked operations on every call. + ret = newColl; + _nativeCollection = newColl; + _recheckStopwatch.Restart(); + } + } + } + + Debug.Assert(ret != null); + return ret; + } + } +} diff --git a/src/System.Security.Cryptography.X509Certificates/src/Internal/Cryptography/Pal.Unix/CachedSystemStoreProvider.cs b/src/System.Security.Cryptography.X509Certificates/src/Internal/Cryptography/Pal.Unix/CachedSystemStoreProvider.cs new file mode 100644 index 000000000000..863586fd1e34 --- /dev/null +++ b/src/System.Security.Cryptography.X509Certificates/src/Internal/Cryptography/Pal.Unix/CachedSystemStoreProvider.cs @@ -0,0 +1,300 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.IO; +using System.Linq; +using System.Runtime.InteropServices; +using System.Security.Cryptography.X509Certificates; +using System.Threading; +using Microsoft.Win32.SafeHandles; + +namespace Internal.Cryptography.Pal +{ + internal sealed class CachedSystemStoreProvider : IStorePal + { + // These intervals are mostly arbitrary. + // Prior to this refreshing cache the system collections were read just once per process, on the + // assumption that system trust changes would happen before the process start (or would come + // followed by a reboot for a kernel update, etc). + // Customers requested something more often than "never" and 5 minutes seems like a reasonable + // balance. + // + // Note that on Ubuntu the LastWrite test always fails, because the system default for SSL_CERT_DIR + // is a symlink, so the LastWrite value is always just when the symlink was created (and Ubuntu does + // not provide the single-file version at SSL_CERT_FILE, so the file update does not trigger) -- + // meaning the "assume invalid" interval is Ubuntu's only refresh. + private static readonly TimeSpan s_lastWriteRecheckInterval = TimeSpan.FromSeconds(5); + private static readonly TimeSpan s_assumeInvalidInterval = TimeSpan.FromMinutes(5); + private static readonly Stopwatch s_recheckStopwatch = new Stopwatch(); + private static readonly DirectoryInfo s_rootStoreDirectoryInfo = SafeOpenRootDirectoryInfo(); + private static readonly FileInfo s_rootStoreFileInfo = SafeOpenRootFileInfo(); + + // Use non-Value-Tuple so that it's an atomic update. + private static Tuple s_nativeCollections; + private static DateTime s_directoryCertsLastWrite; + private static DateTime s_fileCertsLastWrite; + + private readonly bool _isRoot; + + private CachedSystemStoreProvider(bool isRoot) + { + _isRoot = isRoot; + } + + internal static CachedSystemStoreProvider MachineRoot { get; } = + new CachedSystemStoreProvider(true); + + internal static CachedSystemStoreProvider MachineIntermediate { get; } = + new CachedSystemStoreProvider(false); + + + public void Dispose() + { + // No-op + } + + public void CloneTo(X509Certificate2Collection collection) + { + Tuple nativeColls = GetCollections(); + SafeX509StackHandle nativeColl = _isRoot ? nativeColls.Item1 : nativeColls.Item2; + + int count = Interop.Crypto.GetX509StackFieldCount(nativeColl); + + for (int i = 0; i < count; i++) + { + X509Certificate2 clone = new X509Certificate2(Interop.Crypto.GetX509StackField(nativeColl, i)); + collection.Add(clone); + } + } + + internal static void GetNativeCollections(out SafeX509StackHandle root, out SafeX509StackHandle intermediate) + { + Tuple nativeColls = GetCollections(); + root = nativeColls.Item1; + intermediate = nativeColls.Item2; + } + + public void Add(ICertificatePal cert) + { + // These stores can only be opened in ReadOnly mode. + throw new InvalidOperationException(); + } + + public void Remove(ICertificatePal cert) + { + // These stores can only be opened in ReadOnly mode. + throw new InvalidOperationException(); + } + + public SafeHandle SafeHandle => null; + + private static Tuple GetCollections() + { + TimeSpan elapsed = s_recheckStopwatch.Elapsed; + Tuple ret = s_nativeCollections; + + if (ret == null || elapsed > s_lastWriteRecheckInterval) + { + lock (s_recheckStopwatch) + { + FileInfo fileInfo = s_rootStoreFileInfo; + DirectoryInfo dirInfo = s_rootStoreDirectoryInfo; + + fileInfo?.Refresh(); + dirInfo?.Refresh(); + + if (ret == null || + elapsed > s_assumeInvalidInterval || + (fileInfo != null && fileInfo.Exists && fileInfo.LastWriteTimeUtc != s_fileCertsLastWrite) || + (dirInfo != null && dirInfo.Exists && dirInfo.LastWriteTimeUtc != s_directoryCertsLastWrite)) + { + ret = LoadMachineStores(dirInfo, fileInfo); + } + } + } + + Debug.Assert(ret != null); + return ret; + } + + private static Tuple LoadMachineStores( + DirectoryInfo rootStorePath, + FileInfo rootStoreFile) + { + Debug.Assert( + Monitor.IsEntered(s_recheckStopwatch), + "LoadMachineStores assumes a lock(s_recheckStopwatch)"); + + IEnumerable trustedCertFiles; + DateTime newFileTime = default; + DateTime newDirTime = default; + + if (rootStorePath != null && rootStorePath.Exists) + { + trustedCertFiles = rootStorePath.EnumerateFiles(); + newDirTime = rootStorePath.LastWriteTimeUtc; + } + else + { + trustedCertFiles = Array.Empty(); + } + + if (rootStoreFile != null && rootStoreFile.Exists) + { + trustedCertFiles = trustedCertFiles.Prepend(rootStoreFile); + newFileTime = rootStoreFile.LastWriteTimeUtc; + } + + SafeX509StackHandle rootStore = Interop.Crypto.NewX509Stack(); + Interop.Crypto.CheckValidOpenSslHandle(rootStore); + SafeX509StackHandle intermedStore = Interop.Crypto.NewX509Stack(); + Interop.Crypto.CheckValidOpenSslHandle(intermedStore); + + HashSet uniqueRootCerts = new HashSet(); + HashSet uniqueIntermediateCerts = new HashSet(); + + foreach (FileInfo file in trustedCertFiles) + { + using (SafeBioHandle fileBio = Interop.Crypto.BioNewFile(file.FullName, "rb")) + { + // The handle may be invalid, for example when we don't have read permission for the file. + if (fileBio.IsInvalid) + { + Interop.Crypto.ErrClearError(); + continue; + } + + ICertificatePal pal; + + // Some distros ship with two variants of the same certificate. + // One is the regular format ('BEGIN CERTIFICATE') and the other + // contains additional AUX-data ('BEGIN TRUSTED CERTIFICATE'). + // The additional data contains the appropriate usage (e.g. emailProtection, serverAuth, ...). + // Because corefx doesn't validate for a specific usage, derived certificates are rejected. + // For now, we skip the certificates with AUX data and use the regular certificates. + while (OpenSslX509CertificateReader.TryReadX509PemNoAux(fileBio, out pal) || + OpenSslX509CertificateReader.TryReadX509Der(fileBio, out pal)) + { + X509Certificate2 cert = new X509Certificate2(pal); + + // The HashSets are just used for uniqueness filters, they do not survive this method. + if (StringComparer.Ordinal.Equals(cert.Subject, cert.Issuer)) + { + if (uniqueRootCerts.Add(cert)) + { + using (SafeX509Handle tmp = Interop.Crypto.X509UpRef(pal.Handle)) + { + if (!Interop.Crypto.PushX509StackField(rootStore, tmp)) + { + throw Interop.Crypto.CreateOpenSslCryptographicException(); + } + + // The ownership has been transferred to the stack + tmp.SetHandleAsInvalid(); + } + + continue; + } + } + else + { + if (uniqueIntermediateCerts.Add(cert)) + { + using (SafeX509Handle tmp = Interop.Crypto.X509UpRef(pal.Handle)) + { + if (!Interop.Crypto.PushX509StackField(intermedStore, tmp)) + { + throw Interop.Crypto.CreateOpenSslCryptographicException(); + } + + // The ownership has been transferred to the stack + tmp.SetHandleAsInvalid(); + } + + continue; + } + } + + // There's a good chance we'll encounter duplicates on systems that have both one-cert-per-file + // and one-big-file trusted certificate stores. Anything that wasn't unique will end up here. + cert.Dispose(); + } + } + } + + foreach (X509Certificate2 cert in uniqueRootCerts) + { + cert.Dispose(); + } + + foreach (X509Certificate2 cert in uniqueIntermediateCerts) + { + cert.Dispose(); + } + + Tuple newCollections = + Tuple.Create(rootStore, intermedStore); + + Debug.Assert( + Monitor.IsEntered(s_recheckStopwatch), + "LoadMachineStores assumes a lock(s_recheckStopwatch)"); + + // The existing collections are not Disposed here, intentionally. + // They could be in the gap between when they are returned from this method and not yet used + // in a P/Invoke, which would result in exceptions being thrown. + // In order to maintain "finalization-free" the GetNativeCollections method would need to + // DangerousAddRef, and the callers would need to DangerousRelease, adding more interlocked operations + // on every call. + + Volatile.Write(ref s_nativeCollections, newCollections); + s_directoryCertsLastWrite = newDirTime; + s_fileCertsLastWrite = newFileTime; + s_recheckStopwatch.Restart(); + return newCollections; + } + + private static FileInfo SafeOpenRootFileInfo() + { + string rootFile = Interop.Crypto.GetX509RootStoreFile(); + + if (!string.IsNullOrEmpty(rootFile)) + { + try + { + return new FileInfo(rootFile); + } + catch (ArgumentException) + { + // If SSL_CERT_FILE is set to the empty string, or anything else which gives + // "The path is not of a legal form", then the GetX509RootStoreFile value is ignored. + } + } + + return null; + } + + private static DirectoryInfo SafeOpenRootDirectoryInfo() + { + string rootDirectory = Interop.Crypto.GetX509RootStorePath(); + + if (!string.IsNullOrEmpty(rootDirectory)) + { + try + { + return new DirectoryInfo(rootDirectory); + } + catch (ArgumentException) + { + // If SSL_CERT_DIR is set to the empty string, or anything else which gives + // "The path is not of a legal form", then the GetX509RootStoreFile value is ignored. + } + } + + return null; + } + } +} diff --git a/src/System.Security.Cryptography.X509Certificates/src/Internal/Cryptography/Pal.Unix/CollectionBackedStoreProvider.cs b/src/System.Security.Cryptography.X509Certificates/src/Internal/Cryptography/Pal.Unix/CollectionBackedStoreProvider.cs deleted file mode 100644 index df6c5076a431..000000000000 --- a/src/System.Security.Cryptography.X509Certificates/src/Internal/Cryptography/Pal.Unix/CollectionBackedStoreProvider.cs +++ /dev/null @@ -1,93 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Runtime.InteropServices; -using System.Security.Cryptography.X509Certificates; -using Microsoft.Win32.SafeHandles; - -namespace Internal.Cryptography.Pal -{ - internal sealed class CollectionBackedStoreProvider : IStorePal - { - private readonly List _certs; - private SafeX509StackHandle _nativeCollection; - - internal CollectionBackedStoreProvider(List certs) - { - _certs = certs; - } - - public void Dispose() - { - // Dispose is explicitly doing nothing here. - // The LM\Root and LM\CA stores are reused after being Disposed, because there's no - // point in re-allocating the array to instantiate them every time. - // But the interface requires Dispose. - } - - public void CloneTo(X509Certificate2Collection collection) - { - Debug.Assert(collection != null); - Debug.Assert(_certs != null); - - foreach (X509Certificate2 cert in _certs) - { - var certPal = (OpenSslX509CertificateReader)cert.Pal; - collection.Add(new X509Certificate2(certPal.DuplicateHandles())); - } - } - - public void Add(ICertificatePal cert) - { - throw new InvalidOperationException(); - } - - public void Remove(ICertificatePal cert) - { - throw new InvalidOperationException(); - } - - SafeHandle IStorePal.SafeHandle - { - get { return null; } - } - - internal SafeX509StackHandle GetNativeCollection() - { - if (_nativeCollection == null) - { - lock (_certs) - { - if (_nativeCollection == null) - { - SafeX509StackHandle nativeCollection = Interop.Crypto.NewX509Stack(); - - foreach (X509Certificate2 cert in _certs) - { - var certPal = (OpenSslX509CertificateReader)cert.Pal; - - using (SafeX509Handle tmp = Interop.Crypto.X509UpRef(certPal.SafeHandle)) - { - if (!Interop.Crypto.PushX509StackField(nativeCollection, tmp)) - { - throw Interop.Crypto.CreateOpenSslCryptographicException(); - } - - // Ownership was transferred to the cert stack. - tmp.SetHandleAsInvalid(); - } - } - - _nativeCollection = nativeCollection; - } - } - } - - return _nativeCollection; - } - } -} diff --git a/src/System.Security.Cryptography.X509Certificates/src/Internal/Cryptography/Pal.Unix/OpenSslX509ChainProcessor.cs b/src/System.Security.Cryptography.X509Certificates/src/Internal/Cryptography/Pal.Unix/OpenSslX509ChainProcessor.cs index 04b1099bde0b..8037861a7fef 100644 --- a/src/System.Security.Cryptography.X509Certificates/src/Internal/Cryptography/Pal.Unix/OpenSslX509ChainProcessor.cs +++ b/src/System.Security.Cryptography.X509Certificates/src/Internal/Cryptography/Pal.Unix/OpenSslX509ChainProcessor.cs @@ -20,14 +20,14 @@ internal sealed class OpenSslX509ChainProcessor : IChainPal // 10 is plenty big. private const int DefaultChainCapacity = 10; - private static readonly string s_userRootPath = - DirectoryBasedStoreProvider.GetStorePath(X509Store.RootStoreName); + private static readonly CachedDirectoryStoreProvider s_userRootStore = + new CachedDirectoryStoreProvider(X509Store.RootStoreName); - private static readonly string s_userIntermediatePath = - DirectoryBasedStoreProvider.GetStorePath(X509Store.IntermediateCAStoreName); + private static readonly CachedDirectoryStoreProvider s_userIntermediateStore = + new CachedDirectoryStoreProvider(X509Store.IntermediateCAStoreName); - private static readonly string s_userPersonalPath = - DirectoryBasedStoreProvider.GetStorePath(X509Store.MyStoreName); + private static readonly CachedDirectoryStoreProvider s_userPersonalStore = + new CachedDirectoryStoreProvider(X509Store.MyStoreName); private SafeX509Handle _leafHandle; private SafeX509StoreHandle _store; @@ -82,8 +82,9 @@ internal static OpenSslX509ChainProcessor InitiateChain( DateTime verificationTime, TimeSpan remainingDownloadTime) { - SafeX509StackHandle systemTrust = StorePal.GetMachineRoot().GetNativeCollection(); - SafeX509StackHandle systemIntermediate = StorePal.GetMachineIntermediate().GetNativeCollection(); + CachedSystemStoreProvider.GetNativeCollections( + out SafeX509StackHandle systemTrust, + out SafeX509StackHandle systemIntermediate); SafeX509StoreHandle store = null; SafeX509StackHandle untrusted = null; @@ -91,11 +92,11 @@ internal static OpenSslX509ChainProcessor InitiateChain( try { - store = Interop.Crypto.X509ChainNew(systemTrust, s_userRootPath); + store = Interop.Crypto.X509ChainNew(systemTrust, s_userRootStore.GetNativeCollection()); untrusted = Interop.Crypto.NewX509Stack(); - Interop.Crypto.X509StackAddDirectoryStore(untrusted, s_userIntermediatePath); - Interop.Crypto.X509StackAddDirectoryStore(untrusted, s_userPersonalPath); + Interop.Crypto.X509StackAddMultiple(untrusted, s_userIntermediateStore.GetNativeCollection()); + Interop.Crypto.X509StackAddMultiple(untrusted, s_userPersonalStore.GetNativeCollection()); Interop.Crypto.X509StackAddMultiple(untrusted, systemIntermediate); Interop.Crypto.X509StoreSetVerifyTime(store, verificationTime); diff --git a/src/System.Security.Cryptography.X509Certificates/src/Internal/Cryptography/Pal.Unix/StorePal.cs b/src/System.Security.Cryptography.X509Certificates/src/Internal/Cryptography/Pal.Unix/StorePal.cs index 509c31978c33..f2976f1f8519 100644 --- a/src/System.Security.Cryptography.X509Certificates/src/Internal/Cryptography/Pal.Unix/StorePal.cs +++ b/src/System.Security.Cryptography.X509Certificates/src/Internal/Cryptography/Pal.Unix/StorePal.cs @@ -5,22 +5,14 @@ using System; using System.Collections.Generic; using System.Diagnostics; -using System.IO; -using System.Linq; -using System.Runtime.InteropServices; using System.Security.Cryptography; using System.Security.Cryptography.X509Certificates; -using System.Threading; using Microsoft.Win32.SafeHandles; namespace Internal.Cryptography.Pal { internal sealed partial class StorePal { - private static CollectionBackedStoreProvider s_machineRootStore; - private static CollectionBackedStoreProvider s_machineIntermediateStore; - private static readonly object s_machineLoadLock = new object(); - public static IStorePal FromHandle(IntPtr storeHandle) { throw new PlatformNotSupportedException(); @@ -140,22 +132,6 @@ public static IExportPal LinkFromCertificateCollection(X509Certificate2Collectio return new ExportProvider(certificates); } - internal static CollectionBackedStoreProvider GetMachineRoot() - { - return (CollectionBackedStoreProvider)FromSystemStore( - X509Store.RootStoreName, - StoreLocation.LocalMachine, - OpenFlags.ReadOnly); - } - - internal static CollectionBackedStoreProvider GetMachineIntermediate() - { - return (CollectionBackedStoreProvider)FromSystemStore( - X509Store.IntermediateCAStoreName, - StoreLocation.LocalMachine, - OpenFlags.ReadOnly); - } - public static IStorePal FromSystemStore(string storeName, StoreLocation storeLocation, OpenFlags openFlags) { if (storeLocation == StoreLocation.CurrentUser) @@ -180,25 +156,15 @@ public static IStorePal FromSystemStore(string storeName, StoreLocation storeLoc // The static store approach here is making an optimization based on not // having write support. Once writing is permitted the stores would need // to fresh-read whenever being requested. - if (s_machineRootStore == null) - { - lock (s_machineLoadLock) - { - if (s_machineRootStore == null) - { - LoadMachineStores(); - } - } - } if (X509Store.RootStoreName.Equals(storeName, StringComparison.OrdinalIgnoreCase)) { - return s_machineRootStore; + return CachedSystemStoreProvider.MachineRoot; } if (X509Store.IntermediateCAStoreName.Equals(storeName, StringComparison.OrdinalIgnoreCase)) { - return s_machineIntermediateStore; + return CachedSystemStoreProvider.MachineIntermediate; } throw new CryptographicException( @@ -215,113 +181,5 @@ private static ILoaderPal ListToLoaderPal(List certPals) { return new CertCollectionLoader(certPals); } - - private static void LoadMachineStores() - { - Debug.Assert( - Monitor.IsEntered(s_machineLoadLock), - "LoadMachineStores assumes a lock(s_machineLoadLock)"); - - var rootStore = new List(); - var intermedStore = new List(); - - DirectoryInfo rootStorePath = null; - IEnumerable trustedCertFiles; - - try - { - rootStorePath = new DirectoryInfo(Interop.Crypto.GetX509RootStorePath()); - } - catch (ArgumentException) - { - // If SSL_CERT_DIR is set to the empty string, or anything else which gives - // "The path is not of a legal form", then the GetX509RootStorePath value is ignored. - } - - if (rootStorePath != null && rootStorePath.Exists) - { - trustedCertFiles = rootStorePath.EnumerateFiles(); - } - else - { - trustedCertFiles = Array.Empty(); - } - - FileInfo rootStoreFile = null; - - try - { - rootStoreFile = new FileInfo(Interop.Crypto.GetX509RootStoreFile()); - } - catch (ArgumentException) - { - // If SSL_CERT_FILE is set to the empty string, or anything else which gives - // "The path is not of a legal form", then the GetX509RootStoreFile value is ignored. - } - - if (rootStoreFile != null && rootStoreFile.Exists) - { - trustedCertFiles = trustedCertFiles.Prepend(rootStoreFile); - } - - HashSet uniqueRootCerts = new HashSet(); - HashSet uniqueIntermediateCerts = new HashSet(); - - foreach (FileInfo file in trustedCertFiles) - { - using (SafeBioHandle fileBio = Interop.Crypto.BioNewFile(file.FullName, "rb")) - { - // The handle may be invalid, for example when we don't have read permission for the file. - if (fileBio.IsInvalid) - { - Interop.Crypto.ErrClearError(); - continue; - } - - ICertificatePal pal; - - // Some distros ship with two variants of the same certificate. - // One is the regular format ('BEGIN CERTIFICATE') and the other - // contains additional AUX-data ('BEGIN TRUSTED CERTIFICATE'). - // The additional data contains the appropriate usage (e.g. emailProtection, serverAuth, ...). - // Because corefx doesn't validate for a specific usage, derived certificates are rejected. - // For now, we skip the certificates with AUX data and use the regular certificates. - while (OpenSslX509CertificateReader.TryReadX509PemNoAux(fileBio, out pal) || - OpenSslX509CertificateReader.TryReadX509Der(fileBio, out pal)) - { - X509Certificate2 cert = new X509Certificate2(pal); - - // The HashSets are just used for uniqueness filters, they do not survive this method. - if (StringComparer.Ordinal.Equals(cert.Subject, cert.Issuer)) - { - if (uniqueRootCerts.Add(cert)) - { - rootStore.Add(cert); - continue; - } - } - else - { - if (uniqueIntermediateCerts.Add(cert)) - { - intermedStore.Add(cert); - continue; - } - } - - // There's a good chance we'll encounter duplicates on systems that have both one-cert-per-file - // and one-big-file trusted certificate stores. Anything that wasn't unique will end up here. - cert.Dispose(); - } - } - } - - var rootStorePal = new CollectionBackedStoreProvider(rootStore); - s_machineIntermediateStore = new CollectionBackedStoreProvider(intermedStore); - - // s_machineRootStore's nullarity is the loaded-state sentinel, so write it with Volatile. - Debug.Assert(Monitor.IsEntered(s_machineLoadLock), "LoadMachineStores assumes a lock(s_machineLoadLock)"); - Volatile.Write(ref s_machineRootStore, rootStorePal); - } } } diff --git a/src/System.Security.Cryptography.X509Certificates/src/System.Security.Cryptography.X509Certificates.csproj b/src/System.Security.Cryptography.X509Certificates/src/System.Security.Cryptography.X509Certificates.csproj index e326a885d1a4..182cb686ed9f 100644 --- a/src/System.Security.Cryptography.X509Certificates/src/System.Security.Cryptography.X509Certificates.csproj +++ b/src/System.Security.Cryptography.X509Certificates/src/System.Security.Cryptography.X509Certificates.csproj @@ -309,11 +309,12 @@ System\Security\Cryptography\X509Certificates\Asn1\DistributionPointNameAsn.xml + + - From 4435d785565f192392b29890401748a6cdea4109 Mon Sep 17 00:00:00 2001 From: Jiayi <14067510+yujayee@users.noreply.github.com> Date: Thu, 16 May 2019 17:20:22 -0700 Subject: [PATCH 387/607] Fix a bug in xsd validation during deserialization (#37596) * Fix a bug in xsd validation during deserialization * Add a test --- .../System/Xml/Core/XsdValidatingReader.cs | 4 +- .../tests/XmlSerializer/XmlSerializerTests.cs | 71 +++++++++++++++++++ .../tests/SerializationTypes.cs | 18 +++++ 3 files changed, 91 insertions(+), 2 deletions(-) diff --git a/src/System.Private.Xml/src/System/Xml/Core/XsdValidatingReader.cs b/src/System.Private.Xml/src/System/Xml/Core/XsdValidatingReader.cs index 34db9fdc8ee6..f539ad9b5930 100644 --- a/src/System.Private.Xml/src/System/Xml/Core/XsdValidatingReader.cs +++ b/src/System.Private.Xml/src/System/Xml/Core/XsdValidatingReader.cs @@ -1011,13 +1011,13 @@ public override string ReadElementContentAsString() try { - if (xmlType != null) + if (xmlType != null && typedValue != null) { return xmlType.ValueConverter.ToString(typedValue); } else { - return typedValue as string; + return typedValue as string ?? string.Empty; } } catch (InvalidCastException e) diff --git a/src/System.Private.Xml/tests/XmlSerializer/XmlSerializerTests.cs b/src/System.Private.Xml/tests/XmlSerializer/XmlSerializerTests.cs index 7c676c70fb4a..aa44cfa8ffee 100644 --- a/src/System.Private.Xml/tests/XmlSerializer/XmlSerializerTests.cs +++ b/src/System.Private.Xml/tests/XmlSerializer/XmlSerializerTests.cs @@ -1763,6 +1763,77 @@ public static void Xml_TypeWithMismatchBetweenAttributeAndPropertyType() Assert.StrictEqual(value.IntValue, actual.IntValue); } + [Fact] + public static void Xml_XsdValidationAndDeserialization() + { + var xsdstring = @" + + + + + + + + + + + + + + + + + + + + + + + + + + +"; + var param = "" + + "" + + "" + + "" + + "" + + "" + + "" + + ""; + + using (var stream = new MemoryStream()) + { + using (var writer = new StreamWriter(stream)) + { + writer.Write(param); + writer.Flush(); + stream.Position = 0; + + var xmlReaderSettings = new XmlReaderSettings(); + xmlReaderSettings.ValidationType = ValidationType.Schema; + xmlReaderSettings.ValidationEventHandler += (sender, args) => + { + throw new XmlSchemaValidationException(args.Message); + }; + xmlReaderSettings.Schemas.Add(null, XmlReader.Create(new StringReader(xsdstring))); + + var xmlReader = XmlReader.Create(stream, xmlReaderSettings); + + var overrides = new XmlAttributeOverrides(); + var parametersXmlAttribute = new XmlAttributes { XmlType = new XmlTypeAttribute("stringParameter") }; + overrides.Add(typeof(Parameter), parametersXmlAttribute); + + var serializer = new XmlSerializer(typeof(RootClass), overrides); + var result=(RootClass)serializer.Deserialize(xmlReader); + + Assert.Equal("SomeName", result.Parameters[0].Name); + Assert.Equal(string.Empty, ((Parameter)result.Parameters[0]).Value); + } + } + } + private static readonly string s_defaultNs = "http://tempuri.org/"; private static T RoundTripWithXmlMembersMapping(object requestBodyValue, string memberName, string baseline, bool skipStringCompare = false, string wrapperName = null) { diff --git a/src/System.Runtime.Serialization.Xml/tests/SerializationTypes.cs b/src/System.Runtime.Serialization.Xml/tests/SerializationTypes.cs index 4e379eb8b845..7e41d5cc14d8 100644 --- a/src/System.Runtime.Serialization.Xml/tests/SerializationTypes.cs +++ b/src/System.Runtime.Serialization.Xml/tests/SerializationTypes.cs @@ -1264,3 +1264,21 @@ public partial class MsgDocumentType [System.Xml.Serialization.XmlAttribute("refs", DataType = "IDREFS")] public string[] Refs { get; set; } } + +public class RootClass +{ + [XmlArray] + public List Parameters { get; set; } +} + +[XmlInclude(typeof(Parameter))] +public class Parameter +{ + [XmlAttribute] + public string Name { get; set; } +} + +public class Parameter : Parameter +{ + public T Value { get; set; } +} From 05233fd0c0200f1fda258bab148bbae28592892d Mon Sep 17 00:00:00 2001 From: Stephen Toub Date: Thu, 16 May 2019 17:31:47 -0700 Subject: [PATCH 388/607] Fix ListenerWithFilter test (#37731) It's searching the output to ensure the id doesn't get written out, so it can't match other IDs that are written out. --- .../tests/XmlWriterTraceListenerTests.cs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/System.Diagnostics.TextWriterTraceListener/tests/XmlWriterTraceListenerTests.cs b/src/System.Diagnostics.TextWriterTraceListener/tests/XmlWriterTraceListenerTests.cs index e00f0830ba51..b88356802a09 100644 --- a/src/System.Diagnostics.TextWriterTraceListener/tests/XmlWriterTraceListenerTests.cs +++ b/src/System.Diagnostics.TextWriterTraceListener/tests/XmlWriterTraceListenerTests.cs @@ -103,15 +103,16 @@ public void Close_AfterXPathNavigatorTraced() [Fact] public void ListenerWithFilter() { - int processId; + // Ensure we use an arbitrary ID that doesn't match the process ID or thread ID. + int traceTransferId = 1; using (Process p = Process.GetCurrentProcess()) { - processId = p.Id; + while (traceTransferId == p.Id || traceTransferId == Environment.CurrentManagedThreadId) + { + traceTransferId++; + } } - // Ensure we use an arbitrary ID that doesn't match the process ID. - int traceTransferId = processId + 1; - string file = GetTestFilePath(); Guid guid = Guid.NewGuid(); using (var listener = new XmlWriterTraceListener(file)) From ef25246c7ea01a96cda8a464b4b717213e8d9685 Mon Sep 17 00:00:00 2001 From: Gergely Kalapos Date: Thu, 16 May 2019 20:32:40 -0400 Subject: [PATCH 389/607] Fix minor typo NanoSeconds -> nanoseconds (#37732) --- src/Common/src/Interop/FreeBSD/Interop.Process.cs | 10 +++++----- .../src/System/Diagnostics/Process.OSX.cs | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/Common/src/Interop/FreeBSD/Interop.Process.cs b/src/Common/src/Interop/FreeBSD/Interop.Process.cs index 598b78e17cd9..2359c339553c 100644 --- a/src/Common/src/Interop/FreeBSD/Interop.Process.cs +++ b/src/Common/src/Interop/FreeBSD/Interop.Process.cs @@ -13,7 +13,7 @@ internal static partial class Interop { internal static partial class Process { - private const ulong SecondsToNanoSeconds = 1000000000; + private const ulong SecondsToNanoseconds = 1000000000; // Constants from sys/syslimits.h private const int PATH_MAX = 1024; @@ -412,8 +412,8 @@ public unsafe static proc_stats GetThreadInfo(int pid, int tid) { ret.startTime = (int)info->ki_start.tv_sec; ret.nice = info->ki_nice; - ret.userTime = (ulong)info->ki_rusage.ru_utime.tv_sec * SecondsToNanoSeconds + (ulong)info->ki_rusage.ru_utime.tv_usec; - ret.systemTime = (ulong)info->ki_rusage.ru_stime.tv_sec * SecondsToNanoSeconds + (ulong)info->ki_rusage.ru_stime.tv_usec; + ret.userTime = (ulong)info->ki_rusage.ru_utime.tv_sec * SecondsToNanoseconds + (ulong)info->ki_rusage.ru_utime.tv_usec; + ret.systemTime = (ulong)info->ki_rusage.ru_stime.tv_sec * SecondsToNanoseconds + (ulong)info->ki_rusage.ru_stime.tv_usec; } else { @@ -424,8 +424,8 @@ public unsafe static proc_stats GetThreadInfo(int pid, int tid) { ret.startTime = (int)list[i].ki_start.tv_sec; ret.nice = list[i].ki_nice; - ret.userTime = (ulong)list[i].ki_rusage.ru_utime.tv_sec * SecondsToNanoSeconds + (ulong)list[i].ki_rusage.ru_utime.tv_usec; - ret.systemTime = (ulong)list[i].ki_rusage.ru_stime.tv_sec * SecondsToNanoSeconds + (ulong)list[i].ki_rusage.ru_stime.tv_usec; + ret.userTime = (ulong)list[i].ki_rusage.ru_utime.tv_sec * SecondsToNanoseconds + (ulong)list[i].ki_rusage.ru_utime.tv_usec; + ret.systemTime = (ulong)list[i].ki_rusage.ru_stime.tv_sec * SecondsToNanoseconds + (ulong)list[i].ki_rusage.ru_stime.tv_usec; break; } } diff --git a/src/System.Diagnostics.Process/src/System/Diagnostics/Process.OSX.cs b/src/System.Diagnostics.Process/src/System/Diagnostics/Process.OSX.cs index 7fa1ef40e52d..0a9ca633cca6 100644 --- a/src/System.Diagnostics.Process/src/System/Diagnostics/Process.OSX.cs +++ b/src/System.Diagnostics.Process/src/System/Diagnostics/Process.OSX.cs @@ -9,7 +9,7 @@ namespace System.Diagnostics { public partial class Process { - private const int NanoSecondsTo100NanosecondsFactor = 100; + private const int NanosecondsTo100NanosecondsFactor = 100; /// Gets the amount of time the process has spent running code inside the operating system core. public TimeSpan PrivilegedProcessorTime @@ -18,7 +18,7 @@ public TimeSpan PrivilegedProcessorTime { EnsureState(State.HaveNonExitedId); Interop.libproc.rusage_info_v3 info = Interop.libproc.proc_pid_rusage(_processId); - return new TimeSpan(Convert.ToInt64(info.ri_system_time / NanoSecondsTo100NanosecondsFactor)); + return new TimeSpan(Convert.ToInt64(info.ri_system_time / NanosecondsTo100NanosecondsFactor)); } } @@ -78,7 +78,7 @@ public TimeSpan TotalProcessorTime { EnsureState(State.HaveNonExitedId); Interop.libproc.rusage_info_v3 info = Interop.libproc.proc_pid_rusage(_processId); - return new TimeSpan(Convert.ToInt64((info.ri_system_time + info.ri_user_time) / NanoSecondsTo100NanosecondsFactor)); + return new TimeSpan(Convert.ToInt64((info.ri_system_time + info.ri_user_time) / NanosecondsTo100NanosecondsFactor)); } } @@ -92,7 +92,7 @@ public TimeSpan UserProcessorTime { EnsureState(State.HaveNonExitedId); Interop.libproc.rusage_info_v3 info = Interop.libproc.proc_pid_rusage(_processId); - return new TimeSpan(Convert.ToInt64(info.ri_user_time / NanoSecondsTo100NanosecondsFactor)); + return new TimeSpan(Convert.ToInt64(info.ri_user_time / NanosecondsTo100NanosecondsFactor)); } } From f42e04b8d4be76b1818cf263ff06234d0e25ada0 Mon Sep 17 00:00:00 2001 From: Viktor Hofer Date: Fri, 17 May 2019 03:39:21 +0200 Subject: [PATCH 390/607] Use Arcade DotNetTool and NuGetPackageRoot (#37647) * Use Arcade props * Use global dotnet if applicable --- Directory.Build.props | 13 ---- eng/Packaging.props | 2 +- eng/Tools.props | 13 ++-- eng/configure-toolset.ps1 | 5 -- eng/configure-toolset.sh | 5 -- eng/publish.proj | 2 +- external/ILLink/ILLink.depproj | 4 +- external/netfx/netfx.depproj | 2 +- external/netstandard/netstandard.depproj | 4 +- external/test-runtime/XUnit.Runtime.depproj | 70 +++++++++---------- .../Microsoft.Private.PackageBaseline.pkgproj | 4 +- pkg/frameworkPackage.targets | 2 +- pkg/test/testPackages.proj | 2 +- ....ComponentModel.TypeConverter.Tests.csproj | 2 +- .../tests/System.Drawing.Common.Tests.csproj | 12 ++-- .../System.IO.Compression.Brotli.Tests.csproj | 2 +- ...System.IO.Compression.ZipFile.Tests.csproj | 2 +- .../tests/System.IO.Compression.Tests.csproj | 2 +- .../tests/System.IO.Packaging.Tests.csproj | 2 +- .../System.Net.Http.Functional.Tests.csproj | 2 +- .../System.Net.Security.Tests.csproj | 2 +- .../System.Net.WebSockets.Client.Tests.csproj | 2 +- .../System.Resources.Extensions.Tests.csproj | 2 +- ...tem.Runtime.WindowsRuntime.UI.Xaml.pkgproj | 2 +- .../pkg/System.Runtime.WindowsRuntime.pkgproj | 2 +- ...Cryptography.X509Certificates.Tests.csproj | 2 +- .../System.Windows.Extensions.Tests.csproj | 4 +- 27 files changed, 70 insertions(+), 98 deletions(-) delete mode 100644 eng/configure-toolset.ps1 delete mode 100644 eng/configure-toolset.sh diff --git a/Directory.Build.props b/Directory.Build.props index f036d6988869..7ac4a3ee6b23 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -114,19 +114,6 @@ $([MSBuild]::NormalizeDirectory('$(RepoRoot)', 'src')) - - - $(DotNetRestorePackagesPath) - $([MSBuild]::EnsureTrailingSlash('$(NuGetPackageRoot)')) - $(RepoRoot).packages/ - - $(DOTNET_INSTALL_DIR) - $(RepoRoot).dotnet\ - $(DotNetRoot)\ - $(DotNetRoot) - "$(DotNetRoot)dotnet" - $(DotNetRoot)dotnet - $(DotNetCmd).exe $(ArtifactsToolsetDir)Common\Tools.Analyzers.props - - $([MSBuild]::NormalizeDirectory('$(RepoRoot)', '.dotnet')) - $(DotNetRoot)dotnet - $(DotNetCmd).exe - "$(DotNetCmd)" @@ -81,7 +76,7 @@ $(OptionalToolDir)Tools.csproj - @@ -95,7 +90,7 @@ @@ -104,7 +99,7 @@ @@ -113,7 +108,7 @@ Creates the global tools folder automatically if it doesn't exist. --> diff --git a/eng/configure-toolset.ps1 b/eng/configure-toolset.ps1 deleted file mode 100644 index 637e9869e2f7..000000000000 --- a/eng/configure-toolset.ps1 +++ /dev/null @@ -1,5 +0,0 @@ -# We depend on a local cli for a number of our buildtool -# commands like init-tools so for now we need to disable -# using the globally installed dotnet - -$script:useInstalledDotNetCli = $false diff --git a/eng/configure-toolset.sh b/eng/configure-toolset.sh deleted file mode 100644 index 267c180859f8..000000000000 --- a/eng/configure-toolset.sh +++ /dev/null @@ -1,5 +0,0 @@ -# We depend on a local cli for a number of our buildtool -# commands like init-tools so for now we need to disable -# using the globally installed dotnet - -useInstalledDotNetCli=false \ No newline at end of file diff --git a/eng/publish.proj b/eng/publish.proj index 58b5ffee7ce4..e2c970d4a2b7 100644 --- a/eng/publish.proj +++ b/eng/publish.proj @@ -1,6 +1,6 @@ - + diff --git a/external/ILLink/ILLink.depproj b/external/ILLink/ILLink.depproj index 5049897cd56f..7f13db572f27 100644 --- a/external/ILLink/ILLink.depproj +++ b/external/ILLink/ILLink.depproj @@ -14,14 +14,14 @@ - + $(ILLinkTasksPackageId) $(ILLinkTasksPackageVersion) /netcoreapp2.0/ - + $(ILLinkTasksPackageId) $(ILLinkTasksPackageVersion) /net46/ diff --git a/external/netfx/netfx.depproj b/external/netfx/netfx.depproj index ccf87f90409c..cba92087c3de 100644 --- a/external/netfx/netfx.depproj +++ b/external/netfx/netfx.depproj @@ -6,7 +6,7 @@ Reference NETStandard.Library.NETFramework 2.0.1-servicing-26011-01 - $(PackagesDir)$(NETStandardSupportPackageId.ToLower())\$(NETStandardSupportPackageVersion)\build + $(NuGetPackageRoot)$(NETStandardSupportPackageId.ToLower())\$(NETStandardSupportPackageVersion)\build true diff --git a/external/netstandard/netstandard.depproj b/external/netstandard/netstandard.depproj index 7e474bb52ef7..6c139d25e175 100644 --- a/external/netstandard/netstandard.depproj +++ b/external/netstandard/netstandard.depproj @@ -77,7 +77,7 @@ - <_NETStandard21RefFolder>$(PackagesDir)$(NETStandardLibraryPackageId.ToLower())\$(NETStandardLibraryPackageVersion)\build\netstandard2.1\ref + <_NETStandard21RefFolder>$(NuGetPackageRoot)$(NETStandardLibraryPackageId.ToLower())\$(NETStandardLibraryPackageVersion)\build\netstandard2.1\ref @@ -94,7 +94,7 @@ - <_NETStandardRefFolder>$(PackagesDir)$(NETStandardLibraryPackageId.ToLower())\$(NETStandardLibraryPackageVersion)\build\$(_NETStandardTFMFolder)\ref + <_NETStandardRefFolder>$(NuGetPackageRoot)$(NETStandardLibraryPackageId.ToLower())\$(NETStandardLibraryPackageVersion)\build\$(_NETStandardTFMFolder)\ref diff --git a/external/test-runtime/XUnit.Runtime.depproj b/external/test-runtime/XUnit.Runtime.depproj index 99ace03dc2f7..817daa2e8d18 100644 --- a/external/test-runtime/XUnit.Runtime.depproj +++ b/external/test-runtime/XUnit.Runtime.depproj @@ -98,7 +98,7 @@ AfterTargets="AfterResolveReferences"> - + @@ -127,7 +127,7 @@ AfterTargets="AfterResolveReferences"> - $(PackagesDir)$(MicrosoftDotNetUapTestToolsPackageName)\$(MicrosoftDotNetUapTestToolsPackageVersion)\Tools\$(ArchGroup) + $(NuGetPackageRoot)$(MicrosoftDotNetUapTestToolsPackageName)\$(MicrosoftDotNetUapTestToolsPackageVersion)\Tools\$(ArchGroup) $(UAPToolsFolder.Replace('/', '\')) @@ -162,7 +162,7 @@ - <_microsoftNetTestSdkAssets Include="$(PackagesDir)$(MicrosoftNetTestSdkPackageName)\$(MicrosoftNETTestSdkPackageVersion)\build\$(TestSdkTFM)\*.*" /> + <_microsoftNetTestSdkAssets Include="$(NuGetPackageRoot)$(MicrosoftNetTestSdkPackageName)\$(MicrosoftNETTestSdkPackageVersion)\build\$(TestSdkTFM)\*.*" /> false $(MicrosoftNetTestSdkPackageName) @@ -171,7 +171,7 @@ + Text="Error: no assets for test sdk package were found under: $(NuGetPackageRoot)$(MicrosoftNetTestSdkPackageName)\$(MicrosoftNETTestSdkPackageVersion)\build\$(TestSdkTFM)\*.*" /> @@ -179,25 +179,25 @@ Condition="'$(TargetGroup)' == 'netcoreapp'" BeforeTargets="ResolveReferences"> - - - + + + - + false $(MicrosoftDotNetXUnitConsoleRunnerPackage) $(MicrosoftDotNetXUnitConsoleRunnerPackageVersion) - + false $(XUnitTestAdapterPackageId) $(XUnitPackageVersion) - + false $(TestPlatformHostPackageId) $(MicrosoftNETTestSdkPackageVersion) @@ -210,18 +210,18 @@ Condition="'$(TargetsUap)' == 'true'" BeforeTargets="ResolveReferences"> - - + + - + false $(XUnitTestAdapterPackageId) $(XUnitPackageVersion) - + false $(TestPlatformHostPackageId) $(MicrosoftNETTestSdkPackageVersion) @@ -234,18 +234,18 @@ Condition="'$(TargetsAot)' == 'true'" BeforeTargets="ResolveReferences"> - - + + - + false $(MicrosoftDotNetUapTestToolsPackageName) $(MicrosoftDotNetUapTestToolsPackageVersion) - + false xunit.runner.utility $(XUnitPackageVersion) @@ -258,19 +258,19 @@ Condition="'$(TargetGroup)' == 'netfx'" BeforeTargets="ResolveReferences"> - - + + - + false $(XUnitRunnerConsolePackageName) $(XUnitPackageVersion) - + false $(XUnitTestAdapterPackageId) $(XUnitPackageVersion) @@ -282,11 +282,11 @@ - + - + false $(MicrosoftDotNetRemoteExecutorPackage) $(MicrosoftDotNetRemoteExecutorPackageVersion) diff --git a/pkg/Microsoft.Private.PackageBaseline/Microsoft.Private.PackageBaseline.pkgproj b/pkg/Microsoft.Private.PackageBaseline/Microsoft.Private.PackageBaseline.pkgproj index b9bd433bee7a..52b3b657ca59 100644 --- a/pkg/Microsoft.Private.PackageBaseline/Microsoft.Private.PackageBaseline.pkgproj +++ b/pkg/Microsoft.Private.PackageBaseline/Microsoft.Private.PackageBaseline.pkgproj @@ -30,10 +30,10 @@ $(UAPvNextTFM) - + netstandard2.0 - + net461 diff --git a/pkg/frameworkPackage.targets b/pkg/frameworkPackage.targets index 1c0abf101f06..c91d1ebe3132 100644 --- a/pkg/frameworkPackage.targets +++ b/pkg/frameworkPackage.targets @@ -5,7 +5,7 @@ true 2.0 - $(PackagesDir)$(NETStandardLibraryPackageId.ToLower())\$(NETStandardLibraryPackageVersion)\build\netstandard$(NETStandardVersion)\ref + $(NuGetPackageRoot)$(NETStandardLibraryPackageId.ToLower())\$(NETStandardLibraryPackageVersion)\build\netstandard$(NETStandardVersion)\ref true true diff --git a/pkg/test/testPackages.proj b/pkg/test/testPackages.proj index 193762258d67..da1e0ecd6a56 100644 --- a/pkg/test/testPackages.proj +++ b/pkg/test/testPackages.proj @@ -40,7 +40,7 @@ - + $(TestToolsDir)%(RecursiveDir) diff --git a/src/System.ComponentModel.TypeConverter/tests/System.ComponentModel.TypeConverter.Tests.csproj b/src/System.ComponentModel.TypeConverter/tests/System.ComponentModel.TypeConverter.Tests.csproj index 50be0858b3fc..8c4a02704f9c 100644 --- a/src/System.ComponentModel.TypeConverter/tests/System.ComponentModel.TypeConverter.Tests.csproj +++ b/src/System.ComponentModel.TypeConverter/tests/System.ComponentModel.TypeConverter.Tests.csproj @@ -153,7 +153,7 @@ - + %(RecursiveDir)%(Filename)%(Extension) diff --git a/src/System.Drawing.Common/tests/System.Drawing.Common.Tests.csproj b/src/System.Drawing.Common/tests/System.Drawing.Common.Tests.csproj index c8e1f60e68cc..0c58d6a512b4 100644 --- a/src/System.Drawing.Common/tests/System.Drawing.Common.Tests.csproj +++ b/src/System.Drawing.Common/tests/System.Drawing.Common.Tests.csproj @@ -86,22 +86,22 @@ - + %(RecursiveDir)%(Filename)%(Extension) - + System.Drawing.Tests.48x48_multiple_entries_4bit.ico - + System.Drawing.Tests.bitmap_173x183_indexed_8bit.bmp - + System.Drawing.Tests.empty.file - + System.Drawing.Tests.invalid.ico - + System.Drawing.Tests.Icon_toolboxBitmapAttributeTest diff --git a/src/System.IO.Compression.Brotli/tests/System.IO.Compression.Brotli.Tests.csproj b/src/System.IO.Compression.Brotli/tests/System.IO.Compression.Brotli.Tests.csproj index 5b8b48c38250..c740b7022dc0 100644 --- a/src/System.IO.Compression.Brotli/tests/System.IO.Compression.Brotli.Tests.csproj +++ b/src/System.IO.Compression.Brotli/tests/System.IO.Compression.Brotli.Tests.csproj @@ -28,7 +28,7 @@ - + %(RecursiveDir)%(Filename)%(Extension) diff --git a/src/System.IO.Compression.ZipFile/tests/System.IO.Compression.ZipFile.Tests.csproj b/src/System.IO.Compression.ZipFile/tests/System.IO.Compression.ZipFile.Tests.csproj index eff9402799c0..24454ebfcf77 100644 --- a/src/System.IO.Compression.ZipFile/tests/System.IO.Compression.ZipFile.Tests.csproj +++ b/src/System.IO.Compression.ZipFile/tests/System.IO.Compression.ZipFile.Tests.csproj @@ -38,7 +38,7 @@ - + %(RecursiveDir)%(Filename)%(Extension) diff --git a/src/System.IO.Compression/tests/System.IO.Compression.Tests.csproj b/src/System.IO.Compression/tests/System.IO.Compression.Tests.csproj index 3f15eddec457..cde91e5797af 100644 --- a/src/System.IO.Compression/tests/System.IO.Compression.Tests.csproj +++ b/src/System.IO.Compression/tests/System.IO.Compression.Tests.csproj @@ -49,7 +49,7 @@ - + %(RecursiveDir)%(Filename)%(Extension) diff --git a/src/System.IO.Packaging/tests/System.IO.Packaging.Tests.csproj b/src/System.IO.Packaging/tests/System.IO.Packaging.Tests.csproj index 0123dd78642f..bb45daedae73 100644 --- a/src/System.IO.Packaging/tests/System.IO.Packaging.Tests.csproj +++ b/src/System.IO.Packaging/tests/System.IO.Packaging.Tests.csproj @@ -7,6 +7,6 @@ - + \ No newline at end of file diff --git a/src/System.Net.Http/tests/FunctionalTests/System.Net.Http.Functional.Tests.csproj b/src/System.Net.Http/tests/FunctionalTests/System.Net.Http.Functional.Tests.csproj index e7b2d9ff7d25..80be7529491d 100644 --- a/src/System.Net.Http/tests/FunctionalTests/System.Net.Http.Functional.Tests.csproj +++ b/src/System.Net.Http/tests/FunctionalTests/System.Net.Http.Functional.Tests.csproj @@ -172,7 +172,7 @@ - + diff --git a/src/System.Net.Security/tests/FunctionalTests/System.Net.Security.Tests.csproj b/src/System.Net.Security/tests/FunctionalTests/System.Net.Security.Tests.csproj index d60b476f02b5..fed636ecd10d 100644 --- a/src/System.Net.Security/tests/FunctionalTests/System.Net.Security.Tests.csproj +++ b/src/System.Net.Security/tests/FunctionalTests/System.Net.Security.Tests.csproj @@ -158,6 +158,6 @@ - + diff --git a/src/System.Net.WebSockets.Client/tests/System.Net.WebSockets.Client.Tests.csproj b/src/System.Net.WebSockets.Client/tests/System.Net.WebSockets.Client.Tests.csproj index 65f1f0f0149d..1717d2753e40 100644 --- a/src/System.Net.WebSockets.Client/tests/System.Net.WebSockets.Client.Tests.csproj +++ b/src/System.Net.WebSockets.Client/tests/System.Net.WebSockets.Client.Tests.csproj @@ -61,6 +61,6 @@ - + diff --git a/src/System.Resources.Extensions/tests/System.Resources.Extensions.Tests.csproj b/src/System.Resources.Extensions/tests/System.Resources.Extensions.Tests.csproj index e774f0d55882..922f23bb458c 100644 --- a/src/System.Resources.Extensions/tests/System.Resources.Extensions.Tests.csproj +++ b/src/System.Resources.Extensions/tests/System.Resources.Extensions.Tests.csproj @@ -11,7 +11,7 @@ - + diff --git a/src/System.Runtime.WindowsRuntime/pkg/System.Runtime.WindowsRuntime.pkgproj b/src/System.Runtime.WindowsRuntime/pkg/System.Runtime.WindowsRuntime.pkgproj index 8a189e7737e6..c20ee7643e44 100644 --- a/src/System.Runtime.WindowsRuntime/pkg/System.Runtime.WindowsRuntime.pkgproj +++ b/src/System.Runtime.WindowsRuntime/pkg/System.Runtime.WindowsRuntime.pkgproj @@ -22,7 +22,7 @@ diff --git a/src/System.Security.Cryptography.X509Certificates/tests/System.Security.Cryptography.X509Certificates.Tests.csproj b/src/System.Security.Cryptography.X509Certificates/tests/System.Security.Cryptography.X509Certificates.Tests.csproj index aa37d9c3089f..e132f609ef55 100644 --- a/src/System.Security.Cryptography.X509Certificates/tests/System.Security.Cryptography.X509Certificates.Tests.csproj +++ b/src/System.Security.Cryptography.X509Certificates/tests/System.Security.Cryptography.X509Certificates.Tests.csproj @@ -128,6 +128,6 @@ - + diff --git a/src/System.Windows.Extensions/tests/System.Windows.Extensions.Tests.csproj b/src/System.Windows.Extensions/tests/System.Windows.Extensions.Tests.csproj index c400b121a280..93712eae0835 100644 --- a/src/System.Windows.Extensions/tests/System.Windows.Extensions.Tests.csproj +++ b/src/System.Windows.Extensions/tests/System.Windows.Extensions.Tests.csproj @@ -25,10 +25,10 @@ - + %(RecursiveDir)%(Filename)%(Extension) - + %(RecursiveDir)%(Filename)%(Extension) From 18ddda0989624b742c5d6913eebb1851e443432f Mon Sep 17 00:00:00 2001 From: Christopher Watford Date: Thu, 16 May 2019 21:51:54 -0400 Subject: [PATCH 391/607] Add interleaved comments to JSON tests (#37712) --- .../tests/Serialization/Object.ReadTests.cs | 10 ++++ .../tests/Serialization/TestClasses.cs | 49 +++++++++++++++++++ .../tests/Serialization/Value.ReadTests.cs | 13 +++++ 3 files changed, 72 insertions(+) diff --git a/src/System.Text.Json/tests/Serialization/Object.ReadTests.cs b/src/System.Text.Json/tests/Serialization/Object.ReadTests.cs index ecff3a232b40..85ff792a8674 100644 --- a/src/System.Text.Json/tests/Serialization/Object.ReadTests.cs +++ b/src/System.Text.Json/tests/Serialization/Object.ReadTests.cs @@ -134,6 +134,16 @@ public static void ReadComplexClassIgnoresLeadingOrTrailingTrivia(string leading //obj.Verify(); } + [Fact] + public static void ReadClassWithNestedComments() + { + var options = new JsonSerializerOptions(); + options.ReadCommentHandling = JsonCommentHandling.Skip; + + TestClassWithNestedObjectCommentsOuter obj = JsonSerializer.Parse(TestClassWithNestedObjectCommentsOuter.s_data, options); + obj.Verify(); + } + [Fact] public static void ReadEmpty() { diff --git a/src/System.Text.Json/tests/Serialization/TestClasses.cs b/src/System.Text.Json/tests/Serialization/TestClasses.cs index 4aa8c531ea0c..a12e60e182f1 100644 --- a/src/System.Text.Json/tests/Serialization/TestClasses.cs +++ b/src/System.Text.Json/tests/Serialization/TestClasses.cs @@ -1279,4 +1279,53 @@ public class ClassWithUnicodeProperty // A 400 character property name with a unicode character making it 401 bytes. public int Aѧ34567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 { get; set; } } + + public class TestClassWithNestedObjectCommentsInner : ITestClass + { + public SimpleTestClass MyData { get; set; } + + public static readonly string s_json = + @"{" + + @"""MyData"":" + SimpleTestClass.s_json + " // Trailing comment\n" + + "/* Multi\nLine Comment with } */\n" + + @"}"; + + public static readonly byte[] s_data = Encoding.UTF8.GetBytes(s_json); + + public void Initialize() + { + MyData = new SimpleTestClass(); + MyData.Initialize(); + } + + public void Verify() + { + Assert.NotNull(MyData); + MyData.Verify(); + } + } + + public class TestClassWithNestedObjectCommentsOuter : ITestClass + { + public TestClassWithNestedObjectCommentsInner MyData { get; set; } + + public static readonly byte[] s_data = Encoding.UTF8.GetBytes( + @"{" + + " // This } will be ignored\n" + + @"""MyData"":" + TestClassWithNestedObjectCommentsInner.s_json + + " /* As will this [ */\n" + + @"}"); + + public void Initialize() + { + MyData = new TestClassWithNestedObjectCommentsInner(); + MyData.Initialize(); + } + + public void Verify() + { + Assert.NotNull(MyData); + MyData.Verify(); + } + } } diff --git a/src/System.Text.Json/tests/Serialization/Value.ReadTests.cs b/src/System.Text.Json/tests/Serialization/Value.ReadTests.cs index 9342981e5f8b..ae223fcac24d 100644 --- a/src/System.Text.Json/tests/Serialization/Value.ReadTests.cs +++ b/src/System.Text.Json/tests/Serialization/Value.ReadTests.cs @@ -310,6 +310,19 @@ public static void ReadPrimitiveJaggedArray() Assert.Equal(4, i[1][1]); } + [Fact] + public static void ReadArrayWithInterleavedComments() + { + var options = new JsonSerializerOptions(); + options.ReadCommentHandling = JsonCommentHandling.Skip; + + int[][] i = JsonSerializer.Parse(Encoding.UTF8.GetBytes("[[1,2] // Inline [\n,[3, /* Multi\n]] Line*/4]]"), options); + Assert.Equal(1, i[0][0]); + Assert.Equal(2, i[0][1]); + Assert.Equal(3, i[1][0]); + Assert.Equal(4, i[1][1]); + } + public class TestClassWithBadData { public TestChildClassWithBadData[] Children { get; set; } From 6f9570e012054bf407778c0b07632e7733ecbb13 Mon Sep 17 00:00:00 2001 From: Tim Date: Fri, 17 May 2019 14:08:25 +0800 Subject: [PATCH 392/607] Fix missing casts in Enumerable.Select assert (#37410) (#37699) --- src/System.Linq/src/System/Linq/Select.SpeedOpt.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/System.Linq/src/System/Linq/Select.SpeedOpt.cs b/src/System.Linq/src/System/Linq/Select.SpeedOpt.cs index b226a75abd79..b3d3b6fc43d9 100644 --- a/src/System.Linq/src/System/Linq/Select.SpeedOpt.cs +++ b/src/System.Linq/src/System/Linq/Select.SpeedOpt.cs @@ -171,7 +171,7 @@ private sealed partial class SelectRangeIterator : Iterator, I public SelectRangeIterator(int start, int end, Func selector) { Debug.Assert(start < end); - Debug.Assert((end - start) <= int.MaxValue); + Debug.Assert((uint)(end - start) <= (uint)int.MaxValue); Debug.Assert(selector != null); _start = start; From 64609475281f2be05a0b9ca5b7bbdaf43b12dc55 Mon Sep 17 00:00:00 2001 From: Jeremy Barton Date: Fri, 17 May 2019 06:28:17 -0700 Subject: [PATCH 393/607] Clean up usage of ArrayPool in the Cryptography assemblies The primary motivator of this change is to prepare for moving cryptography from the public, shared ArrayPool instance to a private pool (or pools), just as a defense in depth strategy. Since only the shared ArrayPool instance has GC cooperation the change to a private pool is not happening at this time. What this change does provide: * Every ArrayPool.Rent was identified as being private to the assembly or shared out. If the array gets shared out, it is not appropriate to use a private pool. * CryptoPool clears returned arrays by default. Instead of an optional bool for clearing it has an optional length to clear (from index 0). * Some rents were removed altogether, via a couple strategies: * Opportunistic stackalloc * Add a SpanAction-based AsnWriter.WriteBitString overload to avoid the pattern of rent-write-call-copy (instead do request-write-done). * Add AsnWriter.ValueEquals to prevent rent-encode-compare. * At least one Rent with no Return was found and fixed. * Fixed several Rent-growth strategies that could double-Return on exceptions. * Changed Rfc2898DeriveBytes to just use the one field array instead of a lot of rent-write-copy-to-the-field. * Moves some Return calls out of finally blocks in Async methods to avoid a Return-while-in-use path with Task composition when one Task gets aborted and another is still running. --- .../Interop.Crypto.cs | 30 --- .../Interop.Encode.cs | 9 +- .../Interop.PooledCrypto.cs | 40 +++ .../Asn1Reader/AsnReader.BitString.cs | 5 +- .../Asn1Reader/AsnReader.GeneralizedTime.cs | 10 +- .../Asn1Reader/AsnReader.Integer.cs | 9 +- .../Asn1Reader/AsnReader.OctetString.cs | 7 +- .../Cryptography/Asn1Reader/AsnReader.Oid.cs | 5 +- .../Cryptography/Asn1Reader/AsnReader.Text.cs | 6 +- .../Asn1Reader/AsnReader.UtcTime.cs | 3 +- .../Asn1Reader/AsnWriter.BitString.cs | 227 ++++++++++++++++-- .../Cryptography/Asn1Reader/AsnWriter.Oid.cs | 6 +- .../Cryptography/Asn1Reader/AsnWriter.Text.cs | 8 +- .../Cryptography/Asn1Reader/AsnWriter.cs | 44 ++-- .../System/Security/Cryptography/CngPkcs8.cs | 24 +- .../Security/Cryptography/CryptoPool.cs | 33 +++ .../Cryptography/DSACng.SignVerify.cs | 95 +++----- .../Security/Cryptography/DSAOpenSsl.cs | 10 +- .../ECDiffieHellmanOpenSsl.Derive.cs | 5 +- .../Security/Cryptography/ECDsaOpenSsl.cs | 5 +- .../Cryptography/EccKeyFormatHelper.cs | 62 ++--- .../Security/Cryptography/KeyFormatHelper.cs | 16 +- .../Cryptography/PasswordBasedEncryption.cs | 44 ++-- .../System/Security/Cryptography/Pkcs12Kdf.cs | 5 +- .../Cryptography/RSACng.EncryptDecrypt.cs | 8 +- .../Security/Cryptography/RSAOpenSsl.cs | 22 +- .../Cryptography/RSASecurityTransforms.cs | 31 ++- .../Cryptography/RsaPaddingProcessor.cs | 24 +- .../Internal/Cryptography/OpenSslCipher.cs | 8 +- ...em.Security.Cryptography.Algorithms.csproj | 5 +- .../src/System/Security/Cryptography/DSA.cs | 31 ++- .../src/System/Security/Cryptography/ECDsa.cs | 30 ++- .../src/System/Security/Cryptography/RSA.cs | 16 +- .../Cryptography/RandomNumberGenerator.cs | 2 + .../Cryptography/Rfc2898DeriveBytes.cs | 79 +++--- .../tests/Rfc2898Tests.cs | 50 +++- .../System.Security.Cryptography.Cng.csproj | 3 + ...stem.Security.Cryptography.Encoding.csproj | 3 + ...ecurity.Cryptography.Encoding.Tests.csproj | 5 +- ...ystem.Security.Cryptography.OpenSsl.csproj | 3 + .../Cryptography/Pal/AnyOS/ManagedPal.Asn.cs | 6 +- .../Pal/AnyOS/ManagedPal.Decrypt.cs | 14 +- .../Pal/AnyOS/ManagedPal.KeyTrans.cs | 6 +- .../Pal/Windows/HelpersWindows.cs | 10 +- .../System.Security.Cryptography.Pkcs.csproj | 3 + .../Cryptography/Pkcs/CmsSignature.DSA.cs | 12 +- .../Cryptography/Pkcs/CmsSignature.ECDsa.cs | 13 +- .../Cryptography/Pkcs/Pkcs12Builder.cs | 10 +- .../Cryptography/Pkcs/Pkcs12SafeContents.cs | 4 +- .../Cryptography/Pkcs/Pkcs8PrivateKeyInfo.cs | 4 +- .../Security/Cryptography/Pkcs/SignedCms.cs | 5 +- ...em.Security.Cryptography.Primitives.csproj | 6 +- .../Cryptography/AsymmetricAlgorithm.cs | 32 +-- .../Security/Cryptography/CryptoStream.cs | 33 ++- .../Security/Cryptography/HashAlgorithm.cs | 36 +-- .../Cryptography/Pal.Unix/CrlCache.cs | 3 +- .../Pal.Unix/OpenSslX509ChainProcessor.cs | 20 +- ...urity.Cryptography.X509Certificates.csproj | 6 + 58 files changed, 752 insertions(+), 499 deletions(-) create mode 100644 src/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.PooledCrypto.cs create mode 100644 src/Common/src/System/Security/Cryptography/CryptoPool.cs diff --git a/src/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.Crypto.cs b/src/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.Crypto.cs index 8671e2e03961..6190ec0d8c03 100644 --- a/src/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.Crypto.cs +++ b/src/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.Crypto.cs @@ -3,10 +3,8 @@ // See the LICENSE file in the project root for more information. using System; -using System.Buffers; using System.Diagnostics; using System.Runtime.InteropServices; -using System.Security.Cryptography; using System.Security.Cryptography.X509Certificates; using Microsoft.Win32.SafeHandles; @@ -131,11 +129,6 @@ internal static byte[] GetAsn1StringBytes(IntPtr asn1) return GetDynamicBuffer((ptr, buf, i) => GetAsn1StringBytes(ptr, buf, i), asn1); } - internal static ArraySegment RentAsn1StringBytes(IntPtr asn1) - { - return RentDynamicBuffer((ptr, buf, i) => GetAsn1StringBytes(ptr, buf, i), asn1); - } - internal static byte[] GetX509Thumbprint(SafeX509Handle x509) { return GetDynamicBuffer((handle, buf, i) => GetX509Thumbprint(handle, buf, i), x509); @@ -218,28 +211,5 @@ private static byte[] GetDynamicBuffer(NegativeSizeReadMethod return bytes; } - - private static ArraySegment RentDynamicBuffer(NegativeSizeReadMethod method, THandle handle) - { - int negativeSize = method(handle, null, 0); - - if (negativeSize > 0) - { - throw Interop.Crypto.CreateOpenSslCryptographicException(); - } - - int targetSize = -negativeSize; - byte[] bytes = ArrayPool.Shared.Rent(targetSize); - - int ret = method(handle, bytes, targetSize); - - if (ret != 1) - { - ArrayPool.Shared.Return(bytes); - throw Interop.Crypto.CreateOpenSslCryptographicException(); - } - - return new ArraySegment(bytes, 0, targetSize); - } } } diff --git a/src/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.Encode.cs b/src/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.Encode.cs index 309ab2af19e6..433bbfa6fbcf 100644 --- a/src/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.Encode.cs +++ b/src/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.Encode.cs @@ -3,9 +3,9 @@ // See the LICENSE file in the project root for more information. using System; -using System.Buffers; using System.Diagnostics; using System.Runtime.InteropServices; +using System.Security.Cryptography; internal static partial class Interop { @@ -59,7 +59,7 @@ internal static ArraySegment OpenSslRentEncode( throw CreateOpenSslCryptographicException(); } - byte[] data = ArrayPool.Shared.Rent(size); + byte[] data = CryptoPool.Rent(size); int size2 = encode(handle, data); if (size2 < 1) @@ -67,9 +67,10 @@ internal static ArraySegment OpenSslRentEncode( Debug.Fail( $"{nameof(OpenSslEncode)}: {nameof(getSize)} succeeded ({size}) and {nameof(encode)} failed ({size2})"); - // Since we don't know what was written, assume it was secret and clear the value. + // Since we don't know what was written, assume it was secret and have the + // CryptoPool.Return clear the whole array. // (It doesn't matter much, since we're behind Debug.Fail) - ArrayPool.Shared.Return(data, clearArray: true); + CryptoPool.Return(data); // If it ever happens, ensure the error queue gets cleared. // And since it didn't write the data, reporting an exception is good too. diff --git a/src/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.PooledCrypto.cs b/src/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.PooledCrypto.cs new file mode 100644 index 000000000000..ddcba2dc19ad --- /dev/null +++ b/src/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.PooledCrypto.cs @@ -0,0 +1,40 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; +using System.Security.Cryptography; + +internal static partial class Interop +{ + internal static partial class Crypto + { + internal static ArraySegment RentAsn1StringBytes(IntPtr asn1) + { + return RentDynamicBuffer((ptr, buf, i) => GetAsn1StringBytes(ptr, buf, i), asn1); + } + + private static ArraySegment RentDynamicBuffer(NegativeSizeReadMethod method, THandle handle) + { + int negativeSize = method(handle, null, 0); + + if (negativeSize > 0) + { + throw Interop.Crypto.CreateOpenSslCryptographicException(); + } + + int targetSize = -negativeSize; + byte[] bytes = CryptoPool.Rent(targetSize); + + int ret = method(handle, bytes, targetSize); + + if (ret != 1) + { + CryptoPool.Return(bytes); + throw Interop.Crypto.CreateOpenSslCryptographicException(); + } + + return new ArraySegment(bytes, 0, targetSize); + } + } +} diff --git a/src/Common/src/System/Security/Cryptography/Asn1Reader/AsnReader.BitString.cs b/src/Common/src/System/Security/Cryptography/Asn1Reader/AsnReader.BitString.cs index fb12032195a4..2d0393186ac9 100644 --- a/src/Common/src/System/Security/Cryptography/Asn1Reader/AsnReader.BitString.cs +++ b/src/Common/src/System/Security/Cryptography/Asn1Reader/AsnReader.BitString.cs @@ -351,7 +351,7 @@ public byte[] ReadBitString(Asn1Tag expectedTag, out int unusedBitCount) memory = PeekEncodedValue(); // Guaranteed long enough - byte[] rented = ArrayPool.Shared.Rent(memory.Length); + byte[] rented = CryptoPool.Rent(memory.Length); int dataLength = 0; try @@ -368,8 +368,7 @@ public byte[] ReadBitString(Asn1Tag expectedTag, out int unusedBitCount) } finally { - rented.AsSpan(0, dataLength).Clear(); - ArrayPool.Shared.Return(rented); + CryptoPool.Return(rented, dataLength); } } diff --git a/src/Common/src/System/Security/Cryptography/Asn1Reader/AsnReader.GeneralizedTime.cs b/src/Common/src/System/Security/Cryptography/Asn1Reader/AsnReader.GeneralizedTime.cs index 59b0eae8ce6e..e1ad8c1c0296 100644 --- a/src/Common/src/System/Security/Cryptography/Asn1Reader/AsnReader.GeneralizedTime.cs +++ b/src/Common/src/System/Security/Cryptography/Asn1Reader/AsnReader.GeneralizedTime.cs @@ -56,18 +56,22 @@ public DateTimeOffset ReadGeneralizedTime(Asn1Tag expectedTag, bool disallowFrac { byte[] rented = null; + // An X.509 time is 15 characters (yyyyMMddHHmmssZ), beyond that is fractions (no limit) or + // BER specified offset. + Span tmpSpace = stackalloc byte[64]; + ReadOnlySpan contents = GetOctetStringContents( expectedTag, UniversalTagNumber.GeneralizedTime, out int bytesRead, - ref rented); + ref rented, + tmpSpace); DateTimeOffset value = ParseGeneralizedTime(RuleSet, contents, disallowFractions); if (rented != null) { - Array.Clear(rented, 0, contents.Length); - ArrayPool.Shared.Return(rented); + CryptoPool.Return(rented, contents.Length); } _data = _data.Slice(bytesRead); diff --git a/src/Common/src/System/Security/Cryptography/Asn1Reader/AsnReader.Integer.cs b/src/Common/src/System/Security/Cryptography/Asn1Reader/AsnReader.Integer.cs index 22b3a6ccaf88..96275d098d8f 100644 --- a/src/Common/src/System/Security/Cryptography/Asn1Reader/AsnReader.Integer.cs +++ b/src/Common/src/System/Security/Cryptography/Asn1Reader/AsnReader.Integer.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System.Buffers; using System.Diagnostics; using System.Numerics; @@ -92,7 +91,7 @@ public BigInteger ReadInteger(Asn1Tag expectedTag) GetIntegerContents(expectedTag, UniversalTagNumber.Integer, out int headerLength); // TODO: Split this for netcoreapp/netstandard to use the Big-Endian BigInteger parsing - byte[] tmp = ArrayPool.Shared.Rent(contents.Length); + byte[] tmp = CryptoPool.Rent(contents.Length); BigInteger value; try @@ -107,9 +106,9 @@ public BigInteger ReadInteger(Asn1Tag expectedTag) } finally { - // Clear the whole tmp so that not even the sign bit is returned to the array pool. - Array.Clear(tmp, 0, tmp.Length); - ArrayPool.Shared.Return(tmp); + // Let CryptoPool.Return clear the whole tmp so that not even the sign bit + // is returned to the array pool. + CryptoPool.Return(tmp); } _data = _data.Slice(headerLength + contents.Length); diff --git a/src/Common/src/System/Security/Cryptography/Asn1Reader/AsnReader.OctetString.cs b/src/Common/src/System/Security/Cryptography/Asn1Reader/AsnReader.OctetString.cs index fb2a983d818d..5394dbe675f4 100644 --- a/src/Common/src/System/Security/Cryptography/Asn1Reader/AsnReader.OctetString.cs +++ b/src/Common/src/System/Security/Cryptography/Asn1Reader/AsnReader.OctetString.cs @@ -230,7 +230,7 @@ public byte[] ReadOctetString(Asn1Tag expectedTag) memory = PeekEncodedValue(); // Guaranteed long enough - byte[] rented = ArrayPool.Shared.Rent(memory.Length); + byte[] rented = CryptoPool.Rent(memory.Length); int dataLength = 0; try @@ -247,8 +247,7 @@ public byte[] ReadOctetString(Asn1Tag expectedTag) } finally { - rented.AsSpan(0, dataLength).Clear(); - ArrayPool.Shared.Return(rented); + CryptoPool.Return(rented, dataLength); } } @@ -571,7 +570,7 @@ private ReadOnlySpan GetOctetStringContents( if (tmpSpace.Length < octetStringLength) { - rented = ArrayPool.Shared.Rent(octetStringLength); + rented = CryptoPool.Rent(octetStringLength); tmpSpace = rented; } diff --git a/src/Common/src/System/Security/Cryptography/Asn1Reader/AsnReader.Oid.cs b/src/Common/src/System/Security/Cryptography/Asn1Reader/AsnReader.Oid.cs index 8a5f2105e453..e767cf568c2c 100644 --- a/src/Common/src/System/Security/Cryptography/Asn1Reader/AsnReader.Oid.cs +++ b/src/Common/src/System/Security/Cryptography/Asn1Reader/AsnReader.Oid.cs @@ -152,7 +152,7 @@ private static void ReadSubIdentifier( // Every 8 content bytes turns into 7 integer bytes, so scale the count appropriately. // Add one while we're shrunk to account for the needed padding byte or the len%8 discarded bytes. int bytesRequired = ((bytesRead / ContentByteCount) + 1) * SemanticByteCount; - byte[] tmpBytes = ArrayPool.Shared.Rent(bytesRequired); + byte[] tmpBytes = CryptoPool.Rent(bytesRequired); // Ensure all the bytes are zeroed out for BigInteger's parsing. Array.Clear(tmpBytes, 0, tmpBytes.Length); @@ -202,8 +202,7 @@ private static void ReadSubIdentifier( largeValue = new BigInteger(tmpBytes); smallValue = null; - Array.Clear(tmpBytes, 0, bytesWritten); - ArrayPool.Shared.Return(tmpBytes); + CryptoPool.Return(tmpBytes, bytesWritten); } private string ReadObjectIdentifierAsString(Asn1Tag expectedTag, out int totalBytesRead) diff --git a/src/Common/src/System/Security/Cryptography/Asn1Reader/AsnReader.Text.cs b/src/Common/src/System/Security/Cryptography/Asn1Reader/AsnReader.Text.cs index b51b799d163a..5c1dd29fa173 100644 --- a/src/Common/src/System/Security/Cryptography/Asn1Reader/AsnReader.Text.cs +++ b/src/Common/src/System/Security/Cryptography/Asn1Reader/AsnReader.Text.cs @@ -656,8 +656,7 @@ private string ReadCharacterString( { if (rented != null) { - Array.Clear(rented, 0, contents.Length); - ArrayPool.Shared.Return(rented); + CryptoPool.Return(rented, contents.Length); } } } @@ -697,8 +696,7 @@ private bool TryCopyCharacterString( { if (rented != null) { - Array.Clear(rented, 0, contents.Length); - ArrayPool.Shared.Return(rented); + CryptoPool.Return(rented, contents.Length); } } } diff --git a/src/Common/src/System/Security/Cryptography/Asn1Reader/AsnReader.UtcTime.cs b/src/Common/src/System/Security/Cryptography/Asn1Reader/AsnReader.UtcTime.cs index 24ff44af995e..24c0b14d0fcb 100644 --- a/src/Common/src/System/Security/Cryptography/Asn1Reader/AsnReader.UtcTime.cs +++ b/src/Common/src/System/Security/Cryptography/Asn1Reader/AsnReader.UtcTime.cs @@ -86,8 +86,7 @@ public DateTimeOffset ReadUtcTime(Asn1Tag expectedTag, int twoDigitYearMax = 204 if (rented != null) { Debug.Fail($"UtcTime did not fit in tmpSpace ({contents.Length} total)"); - Array.Clear(rented, 0, contents.Length); - ArrayPool.Shared.Return(rented); + CryptoPool.Return(rented, contents.Length); } _data = _data.Slice(bytesRead); diff --git a/src/Common/src/System/Security/Cryptography/Asn1Reader/AsnWriter.BitString.cs b/src/Common/src/System/Security/Cryptography/Asn1Reader/AsnWriter.BitString.cs index 89ae8616c9b6..a5a06757dc65 100644 --- a/src/Common/src/System/Security/Cryptography/Asn1Reader/AsnWriter.BitString.cs +++ b/src/Common/src/System/Security/Cryptography/Asn1Reader/AsnWriter.BitString.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System.Buffers; using System.Diagnostics; namespace System.Security.Cryptography.Asn1 @@ -80,19 +81,15 @@ private void WriteBitStringCore(Asn1Tag tag, ReadOnlySpan bitString, int u throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); } - // If 3 bits are "unused" then build a mask for them to check for 0. - // 1 << 3 => 0b0000_1000 - // subtract 1 => 0b000_0111 - int mask = (1 << unusedBitCount) - 1; byte lastByte = bitString.IsEmpty ? (byte)0 : bitString[bitString.Length - 1]; - if ((lastByte & mask) != 0) + // T-REC-X.690-201508 sec 11.2 + // + // This could be ignored for BER, but since DER is more common and + // it likely suggests a program error on the caller, leave it enabled for + // BER for now. + if (!CheckValidLastByte(lastByte, unusedBitCount)) { - // T-REC-X.690-201508 sec 11.2 - // - // This could be ignored for BER, but since DER is more common and - // it likely suggests a program error on the caller, leave it enabled for - // BER for now. // TODO: Probably warrants a distinct message. throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); } @@ -120,20 +117,190 @@ private void WriteBitStringCore(Asn1Tag tag, ReadOnlySpan bitString, int u _offset += bitString.Length; } - // T-REC-X.690-201508 sec 9.2, 8.6 - private void WriteConstructedCerBitString(Asn1Tag tag, ReadOnlySpan payload, int unusedBitCount) +#if netcoreapp || uap || NETCOREAPP + /// + /// Write a Bit String value via a callback, with a tag UNIVERSAL 3. + /// + /// The total number of bytes to write. + /// A state object to pass to . + /// A callback to invoke for populating the Bit String. + /// + /// The number of trailing bits which are not semantic. + /// + /// + /// is negative --OR-- + /// is not in the range [0,7] + /// + /// + /// is 0 and is not 0 --OR-- + /// is not 0 and any of the bits identified by + /// is set + /// + /// The writer has been Disposed. + public void WriteBitString( + int byteLength, + TState state, + SpanAction action, + int unusedBitCount = 0) + { + WriteBitStringCore(Asn1Tag.PrimitiveBitString, byteLength, state, action, unusedBitCount); + } + + /// + /// Write a Bit String value via a callback, with a specified tag. + /// + /// The tag to write. + /// The total number of bytes to write. + /// A state object to pass to . + /// A callback to invoke for populating the Bit String. + /// + /// The number of trailing bits which are not semantic. + /// + /// + /// . is + /// , but + /// . is not correct for + /// the method + /// + /// + /// is negative --OR-- + /// is not in the range [0,7] + /// + /// + /// is 0 and is not 0 --OR-- + /// is not 0 and any of the bits identified by + /// is set + /// + /// The writer has been Disposed. + public void WriteBitString( + Asn1Tag tag, + int byteLength, + TState state, + SpanAction action, + int unusedBitCount = 0) + { + CheckUniversalTag(tag, UniversalTagNumber.BitString); + + // Primitive or constructed, doesn't matter. + WriteBitStringCore(tag, byteLength, state, action, unusedBitCount); + } + + // T-REC-X.690-201508 sec 8.6 + private void WriteBitStringCore( + Asn1Tag tag, + int byteLength, + TState state, + SpanAction action, + int unusedBitCount = 0) + { + if (byteLength == 0) + { + WriteBitStringCore(tag, ReadOnlySpan.Empty, unusedBitCount); + return; + } + + // T-REC-X.690-201508 sec 8.6.2.2 + if (unusedBitCount < 0 || unusedBitCount > 7) + { + throw new ArgumentOutOfRangeException( + nameof(unusedBitCount), + unusedBitCount, + SR.Cryptography_Asn_UnusedBitCountRange); + } + + CheckDisposed(); + + int savedOffset = _offset; + Span scratchSpace; + byte[] ensureNoExtraCopy = null; + int expectedSize = 0; + + // T-REC-X.690-201508 sec 9.2 + // + // If it's not within a primitive segment, use the constructed encoding. + // (>= instead of > because of the unused bit count byte) + bool segmentedWrite = + RuleSet == AsnEncodingRules.CER && byteLength >= AsnReader.MaxCERSegmentSize; + + if (segmentedWrite) + { + // Rather than call the callback multiple times, grow the buffer to allow + // for enough space for the final output, then return a buffer where the last segment + // is in the correct place. (Data will shift backwards to the right spot while writing + // other segments). + expectedSize = DetermineCerBitStringTotalLength(tag, byteLength); + EnsureWriteCapacity(expectedSize); + int overhead = expectedSize - byteLength; + + // Start writing where the last content byte is in the correct place, which is + // after all of the overhead, but ending before the two byte end-of-contents marker. + int scratchStart = overhead - 2; + ensureNoExtraCopy = _buffer; + scratchSpace = _buffer.AsSpan(scratchStart, byteLength); + + // Don't let gapped-writes be unpredictable. + scratchSpace.Clear(); + } + else + { + WriteTag(tag.AsPrimitive()); + // The unused bits byte requires +1. + WriteLength(byteLength + 1); + + _buffer[_offset] = (byte)unusedBitCount; + _offset++; + + scratchSpace = _buffer.AsSpan(_offset, byteLength); + } + + action(scratchSpace, state); + + // T-REC-X.690-201508 sec 11.2 + // + // This could be ignored for BER, but since DER is more common and + // it likely suggests a program error on the caller, leave it enabled for + // BER for now. + if (!CheckValidLastByte(scratchSpace[byteLength - 1], unusedBitCount)) + { + // Since we are restoring _offset we won't clear this on a grow or Dispose, + // so clear it now. + _offset = savedOffset; + scratchSpace.Clear(); + + // TODO: Probably warrants a distinct message. + throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); + } + + if (segmentedWrite) + { + WriteConstructedCerBitString(tag, scratchSpace, unusedBitCount); + Debug.Assert(_offset - savedOffset == expectedSize, $"expected size was {expectedSize}, actual was {_offset - savedOffset}"); + Debug.Assert(_buffer == ensureNoExtraCopy, $"_buffer was replaced during while writing a bit string via callback"); + } + else + { + _offset += byteLength; + } + } +#endif + + private static bool CheckValidLastByte(byte lastByte, int unusedBitCount) + { + // If 3 bits are "unused" then build a mask for them to check for 0. + // 1 << 3 => 0b0000_1000 + // subtract 1 => 0b000_0111 + int mask = (1 << unusedBitCount) - 1; + return ((lastByte & mask) == 0); + } + + private static int DetermineCerBitStringTotalLength(Asn1Tag tag, int contentLength) { const int MaxCERSegmentSize = AsnReader.MaxCERSegmentSize; // Every segment has an "unused bit count" byte. const int MaxCERContentSize = MaxCERSegmentSize - 1; - Debug.Assert(payload.Length > MaxCERContentSize); + Debug.Assert(contentLength > MaxCERContentSize); - WriteTag(tag.AsConstructed()); - // T-REC-X.690-201508 sec 9.1 - // Constructed CER uses the indefinite form. - WriteLength(-1); - - int fullSegments = Math.DivRem(payload.Length, MaxCERContentSize, out int lastContentSize); + int fullSegments = Math.DivRem(contentLength, MaxCERContentSize, out int lastContentSize); // The tag size is 1 byte. // The length will always be encoded as 82 03 E8 (3 bytes) @@ -156,11 +323,29 @@ private void WriteConstructedCerBitString(Asn1Tag tag, ReadOnlySpan payloa // Reduce the number of copies by pre-calculating the size. // +2 for End-Of-Contents - int expectedSize = fullSegments * FullSegmentEncodedSize + remainingEncodedSize + 2; + // +1 for 0x80 indefinite length + // +tag length + return fullSegments * FullSegmentEncodedSize + remainingEncodedSize + 3 + tag.CalculateEncodedSize(); + } + + // T-REC-X.690-201508 sec 9.2, 8.6 + private void WriteConstructedCerBitString(Asn1Tag tag, ReadOnlySpan payload, int unusedBitCount) + { + const int MaxCERSegmentSize = AsnReader.MaxCERSegmentSize; + // Every segment has an "unused bit count" byte. + const int MaxCERContentSize = MaxCERSegmentSize - 1; + Debug.Assert(payload.Length > MaxCERContentSize); + + int expectedSize = DetermineCerBitStringTotalLength(tag, payload.Length); EnsureWriteCapacity(expectedSize); + int savedOffset = _offset; + + WriteTag(tag.AsConstructed()); + // T-REC-X.690-201508 sec 9.1 + // Constructed CER uses the indefinite form. + WriteLength(-1); byte[] ensureNoExtraCopy = _buffer; - int savedOffset = _offset; ReadOnlySpan remainingData = payload; Span dest; diff --git a/src/Common/src/System/Security/Cryptography/Asn1Reader/AsnWriter.Oid.cs b/src/Common/src/System/Security/Cryptography/Asn1Reader/AsnWriter.Oid.cs index 47c8d527b582..f8c64e1abb1e 100644 --- a/src/Common/src/System/Security/Cryptography/Asn1Reader/AsnWriter.Oid.cs +++ b/src/Common/src/System/Security/Cryptography/Asn1Reader/AsnWriter.Oid.cs @@ -169,8 +169,7 @@ private void WriteObjectIdentifierCore(Asn1Tag tag, ReadOnlySpan oidValue) // The worst case is "1.1.1.1.1", which takes 4 bytes (5 components, with the first two condensed) // Longer numbers get smaller: "2.1.127" is only 2 bytes. (81d (0x51) and 127 (0x7F)) // So length / 2 should prevent any reallocations. - var localPool = ArrayPool.Shared; - byte[] tmp = localPool.Rent(oidValue.Length / 2); + byte[] tmp = CryptoPool.Rent(oidValue.Length / 2); int tmpOffset = 0; try @@ -227,8 +226,7 @@ private void WriteObjectIdentifierCore(Asn1Tag tag, ReadOnlySpan oidValue) } finally { - Array.Clear(tmp, 0, tmpOffset); - localPool.Return(tmp); + CryptoPool.Return(tmp, tmpOffset); } } diff --git a/src/Common/src/System/Security/Cryptography/Asn1Reader/AsnWriter.Text.cs b/src/Common/src/System/Security/Cryptography/Asn1Reader/AsnWriter.Text.cs index 348c24c8d7c4..83cb6e8b1404 100644 --- a/src/Common/src/System/Security/Cryptography/Asn1Reader/AsnWriter.Text.cs +++ b/src/Common/src/System/Security/Cryptography/Asn1Reader/AsnWriter.Text.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System.Buffers; using System.Diagnostics; using System.Runtime.InteropServices; @@ -177,13 +176,11 @@ private void WriteConstructedCerCharacterString(Asn1Tag tag, Text.Encoding encod byte[] tmp; - // TODO: Split this for netstandard vs netcoreapp for span?. - var localPool = ArrayPool.Shared; unsafe { fixed (char* strPtr = &MemoryMarshal.GetReference(str)) { - tmp = localPool.Rent(size); + tmp = CryptoPool.Rent(size); fixed (byte* destPtr = tmp) { @@ -200,8 +197,7 @@ private void WriteConstructedCerCharacterString(Asn1Tag tag, Text.Encoding encod } WriteConstructedCerOctetString(tag, tmp.AsSpan(0, size)); - Array.Clear(tmp, 0, size); - localPool.Return(tmp); + CryptoPool.Return(tmp, size); } } } diff --git a/src/Common/src/System/Security/Cryptography/Asn1Reader/AsnWriter.cs b/src/Common/src/System/Security/Cryptography/Asn1Reader/AsnWriter.cs index 2b4c282872be..ad0ce195411f 100644 --- a/src/Common/src/System/Security/Cryptography/Asn1Reader/AsnWriter.cs +++ b/src/Common/src/System/Security/Cryptography/Asn1Reader/AsnWriter.cs @@ -57,7 +57,8 @@ public void Dispose() { Array.Clear(_buffer, 0, _offset); #if !CHECK_ACCURATE_ENSURE - ArrayPool.Shared.Return(_buffer); + // clearSize: 0 because it was already cleared. + CryptoPool.Return(_buffer, clearSize: 0); #endif _buffer = null; } @@ -192,6 +193,24 @@ internal ReadOnlySpan EncodeAsSpan() return new ReadOnlySpan(_buffer, 0, _offset); } + /// + /// Determines if would produce an output identical to + /// . + /// + /// + /// if the pending encoded data is identical to , + /// otherwise. + /// + /// + /// A or has not been closed via + /// or . + /// + /// The writer has been Disposed. + public bool ValueEquals(ReadOnlySpan other) + { + return EncodeAsSpan().SequenceEqual(other); + } + private void CheckDisposed() { if (_offset < 0) @@ -226,26 +245,23 @@ private void EnsureWriteCapacity(int pendingCount) // While the ArrayPool may have similar logic, make sure we don't run into a lot of // "grow a little" by asking in 1k steps. int blocks = checked(_offset + pendingCount + (BlockSize - 1)) / BlockSize; - var localPool = ArrayPool.Shared; - byte[] newBytes = localPool.Rent(BlockSize * blocks); + byte[] oldBytes = _buffer; + _buffer = CryptoPool.Rent(BlockSize * blocks); - if (_buffer != null) + if (oldBytes != null) { - Buffer.BlockCopy(_buffer, 0, newBytes, 0, _offset); - Array.Clear(_buffer, 0, _offset); - localPool.Return(_buffer); + Buffer.BlockCopy(oldBytes, 0, _buffer, 0, _offset); + CryptoPool.Return(oldBytes, _offset); } #endif #if DEBUG // Ensure no "implicit 0" is happening - for (int i = _offset; i < newBytes.Length; i++) + for (int i = _offset; i < _buffer.Length; i++) { - newBytes[i] ^= 0xFF; + _buffer[i] ^= 0xFF; } #endif - - _buffer = newBytes; } } @@ -506,8 +522,7 @@ private static void SortContents(byte[] buffer, int start, int end) var comparer = new ArrayIndexSetOfValueComparer(buffer); positions.Sort(comparer); - ArrayPool localPool = ArrayPool.Shared; - byte[] tmp = localPool.Rent(len); + byte[] tmp = CryptoPool.Rent(len); pos = 0; @@ -520,8 +535,7 @@ private static void SortContents(byte[] buffer, int start, int end) Debug.Assert(pos == len); Buffer.BlockCopy(tmp, 0, buffer, start, len); - Array.Clear(tmp, 0, len); - localPool.Return(tmp); + CryptoPool.Return(tmp, len); } internal static void Reverse(Span span) diff --git a/src/Common/src/System/Security/Cryptography/CngPkcs8.cs b/src/Common/src/System/Security/Cryptography/CngPkcs8.cs index 652de7d6583a..6316db7a815e 100644 --- a/src/Common/src/System/Security/Cryptography/CngPkcs8.cs +++ b/src/Common/src/System/Security/Cryptography/CngPkcs8.cs @@ -151,7 +151,7 @@ internal static unsafe Pkcs8Response ImportEncryptedPkcs8PrivateKey( finally { CryptographicOperations.ZeroMemory(decryptedSpan); - ArrayPool.Shared.Return(decrypted.Array); + CryptoPool.Return(decrypted.Array); } } } @@ -203,7 +203,7 @@ internal static unsafe Pkcs8Response ImportEncryptedPkcs8PrivateKey( finally { CryptographicOperations.ZeroMemory(decryptedSpan); - ArrayPool.Shared.Return(decrypted.Array); + CryptoPool.Return(decrypted.Array, clearSize: 0); } } } @@ -233,7 +233,7 @@ private static AsnWriter RewriteEncryptedPkcs8PrivateKey( // * secp521r1 needs ~300 bytes (named) or ~730 (explicit) // * KeySize (bits) should avoid re-rent for named, and probably // gets one re-rent for explicit. - byte[] rented = ArrayPool.Shared.Rent(key.KeySize); + byte[] rented = CryptoPool.Rent(key.KeySize); int rentWritten = 0; // If we use 6 bits from each byte, that's 22 * 6 = 132 @@ -250,8 +250,9 @@ private static AsnWriter RewriteEncryptedPkcs8PrivateKey( out rentWritten)) { int size = rented.Length; - ArrayPool.Shared.Return(rented); - rented = ArrayPool.Shared.Rent(checked(size * 2)); + byte[] current = rented; + rented = CryptoPool.Rent(checked(size * 2)); + CryptoPool.Return(current, rentWritten); } return KeyFormatHelper.ReencryptPkcs8( @@ -263,8 +264,7 @@ private static AsnWriter RewriteEncryptedPkcs8PrivateKey( finally { randomString.Clear(); - CryptographicOperations.ZeroMemory(rented.AsSpan(0, rentWritten)); - ArrayPool.Shared.Return(rented); + CryptoPool.Return(rented, rentWritten); } } @@ -275,7 +275,7 @@ private static AsnWriter RewriteEncryptedPkcs8PrivateKey( { Debug.Assert(pbeParameters != null); - byte[] rented = ArrayPool.Shared.Rent(key.KeySize); + byte[] rented = CryptoPool.Rent(key.KeySize); int rentWritten = 0; try @@ -287,8 +287,9 @@ private static AsnWriter RewriteEncryptedPkcs8PrivateKey( out rentWritten)) { int size = rented.Length; - ArrayPool.Shared.Return(rented); - rented = ArrayPool.Shared.Rent(checked(size * 2)); + byte[] current = rented; + rented = CryptoPool.Rent(checked(size * 2)); + CryptoPool.Return(current, rentWritten); } return KeyFormatHelper.ReencryptPkcs8( @@ -299,8 +300,7 @@ private static AsnWriter RewriteEncryptedPkcs8PrivateKey( } finally { - CryptographicOperations.ZeroMemory(rented.AsSpan(0, rentWritten)); - ArrayPool.Shared.Return(rented); + CryptoPool.Return(rented, rentWritten); } } diff --git a/src/Common/src/System/Security/Cryptography/CryptoPool.cs b/src/Common/src/System/Security/Cryptography/CryptoPool.cs new file mode 100644 index 000000000000..9d6413ec39f2 --- /dev/null +++ b/src/Common/src/System/Security/Cryptography/CryptoPool.cs @@ -0,0 +1,33 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Buffers; +using System.Diagnostics; + +namespace System.Security.Cryptography +{ + internal static class CryptoPool + { + internal const int ClearAll = -1; + + internal static byte[] Rent(int minimumLength) => ArrayPool.Shared.Rent(minimumLength); + + internal static void Return(byte[] array, int clearSize = ClearAll) + { + Debug.Assert(clearSize <= array.Length); + bool clearWholeArray = clearSize < 0; + + if (!clearWholeArray && clearSize != 0) + { +#if netcoreapp || uap || NETCOREAPP + CryptographicOperations.ZeroMemory(array.AsSpan(0, clearSize)); +#else + Array.Clear(array, 0, clearSize); +#endif + } + + ArrayPool.Shared.Return(array, clearWholeArray); + } + } +} diff --git a/src/Common/src/System/Security/Cryptography/DSACng.SignVerify.cs b/src/Common/src/System/Security/Cryptography/DSACng.SignVerify.cs index 2b2452d733e3..9fb82a90b4d5 100644 --- a/src/Common/src/System/Security/Cryptography/DSACng.SignVerify.cs +++ b/src/Common/src/System/Security/Cryptography/DSACng.SignVerify.cs @@ -2,7 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System.Buffers; +using System.Diagnostics; using Internal.Cryptography; using Microsoft.Win32.SafeHandles; using static Interop.BCrypt; @@ -16,6 +16,12 @@ internal static partial class DSAImplementation #endif public sealed partial class DSACng : DSA { + // As of FIPS 186-4 the maximum Q size is 32 bytes. + // + // See also: cbGroupSize at + // https://docs.microsoft.com/en-us/windows/desktop/api/bcrypt/ns-bcrypt-_bcrypt_dsa_key_blob_v2 + private const int WindowsMaxQSize = 32; + public override byte[] CreateSignature(byte[] rgbHash) { if (rgbHash == null) @@ -23,45 +29,26 @@ public override byte[] CreateSignature(byte[] rgbHash) throw new ArgumentNullException(nameof(rgbHash)); } - ReadOnlySpan source = rgbHash; - byte[] arrayToReturnToArrayPool = AdjustHashSizeIfNecessaryWithArrayPool(ref source); - try - { - using (SafeNCryptKeyHandle keyHandle = GetDuplicatedKeyHandle()) - { - unsafe - { - return CngCommon.SignHash(keyHandle, source, AsymmetricPaddingMode.None, null, source.Length * 2); - } - } - } - finally + Span stackBuf = stackalloc byte[WindowsMaxQSize]; + ReadOnlySpan source = AdjustHashSizeIfNecessary(rgbHash, stackBuf); + + using (SafeNCryptKeyHandle keyHandle = GetDuplicatedKeyHandle()) { - if (arrayToReturnToArrayPool != null) + unsafe { - Array.Clear(arrayToReturnToArrayPool, 0, source.Length); - ArrayPool.Shared.Return(arrayToReturnToArrayPool); + return CngCommon.SignHash(keyHandle, source, AsymmetricPaddingMode.None, null, source.Length * 2); } } } public override unsafe bool TryCreateSignature(ReadOnlySpan hash, Span destination, out int bytesWritten) { - byte[] arrayToReturnToArrayPool = AdjustHashSizeIfNecessaryWithArrayPool(ref hash); - try + Span stackBuf = stackalloc byte[WindowsMaxQSize]; + ReadOnlySpan source = AdjustHashSizeIfNecessary(hash, stackBuf); + + using (SafeNCryptKeyHandle keyHandle = GetDuplicatedKeyHandle()) { - using (SafeNCryptKeyHandle keyHandle = GetDuplicatedKeyHandle()) - { - return CngCommon.TrySignHash(keyHandle, hash, destination, AsymmetricPaddingMode.None, null, out bytesWritten); - } - } - finally - { - if (arrayToReturnToArrayPool != null) - { - Array.Clear(arrayToReturnToArrayPool, 0, hash.Length); - ArrayPool.Shared.Return(arrayToReturnToArrayPool); - } + return CngCommon.TrySignHash(keyHandle, source, destination, AsymmetricPaddingMode.None, null, out bytesWritten); } } @@ -81,29 +68,22 @@ public override bool VerifySignature(byte[] rgbHash, byte[] rgbSignature) public override bool VerifySignature(ReadOnlySpan hash, ReadOnlySpan signature) { - byte[] arrayToReturnToArrayPool = AdjustHashSizeIfNecessaryWithArrayPool(ref hash); - try - { - using (SafeNCryptKeyHandle keyHandle = GetDuplicatedKeyHandle()) - { - unsafe - { - return CngCommon.VerifyHash(keyHandle, hash, signature, AsymmetricPaddingMode.None, null); - } - } - } - finally + Span stackBuf = stackalloc byte[WindowsMaxQSize]; + ReadOnlySpan source = AdjustHashSizeIfNecessary(hash, stackBuf); + + using (SafeNCryptKeyHandle keyHandle = GetDuplicatedKeyHandle()) { - if (arrayToReturnToArrayPool != null) + unsafe { - Array.Clear(arrayToReturnToArrayPool, 0, hash.Length); - ArrayPool.Shared.Return(arrayToReturnToArrayPool); + return CngCommon.VerifyHash(keyHandle, source, signature, AsymmetricPaddingMode.None, null); } } } - private byte[] AdjustHashSizeIfNecessaryWithArrayPool(ref ReadOnlySpan hash) + private ReadOnlySpan AdjustHashSizeIfNecessary(ReadOnlySpan hash, Span stackBuf) { + Debug.Assert(stackBuf.Length == WindowsMaxQSize); + // Windows CNG requires that the hash output and q match sizes, but we can better // interoperate with other FIPS 186-3 implementations if we perform truncation // here, before sending it to CNG. Since this is a scenario presented in the @@ -114,23 +94,22 @@ private byte[] AdjustHashSizeIfNecessaryWithArrayPool(ref ReadOnlySpan has // presented in the CAVP reference test suite, we can confirm our implementation. int qLength = ComputeQLength(); + Debug.Assert(qLength <= WindowsMaxQSize); if (qLength == hash.Length) { - return null; + return hash; } - else if (qLength < hash.Length) - { - hash = hash.Slice(0, qLength); - return null; - } - else + + if (qLength < hash.Length) { - byte[] arrayPoolPaddedHash = ArrayPool.Shared.Rent(qLength); - hash.CopyTo(new Span(arrayPoolPaddedHash, qLength - hash.Length, hash.Length)); - hash = new ReadOnlySpan(arrayPoolPaddedHash, 0, qLength); - return arrayPoolPaddedHash; + return hash.Slice(0, qLength); } + + int zeroByteCount = qLength - hash.Length; + stackBuf.Slice(0, zeroByteCount).Clear(); + hash.CopyTo(stackBuf.Slice(zeroByteCount)); + return stackBuf.Slice(0, qLength); } private int ComputeQLength() diff --git a/src/Common/src/System/Security/Cryptography/DSAOpenSsl.cs b/src/Common/src/System/Security/Cryptography/DSAOpenSsl.cs index e075975f397b..f4be1e7c7293 100644 --- a/src/Common/src/System/Security/Cryptography/DSAOpenSsl.cs +++ b/src/Common/src/System/Security/Cryptography/DSAOpenSsl.cs @@ -190,7 +190,7 @@ public override byte[] CreateSignature(byte[] rgbHash) SafeDsaHandle key = _key.Value; int signatureSize = Interop.Crypto.DsaEncodedSignatureSize(key); - byte[] signature = ArrayPool.Shared.Rent(signatureSize); + byte[] signature = CryptoPool.Rent(signatureSize); try { bool success = Interop.Crypto.DsaSign(key, rgbHash, new Span(signature, 0, signatureSize), out signatureSize); @@ -211,8 +211,7 @@ public override byte[] CreateSignature(byte[] rgbHash) } finally { - Array.Clear(signature, 0, signatureSize); - ArrayPool.Shared.Return(signature); + CryptoPool.Return(signature, signatureSize); } } @@ -221,7 +220,7 @@ public override bool TryCreateSignature(ReadOnlySpan hash, Span dest byte[] converted; SafeDsaHandle key = _key.Value; int signatureSize = Interop.Crypto.DsaEncodedSignatureSize(key); - byte[] signature = ArrayPool.Shared.Rent(signatureSize); + byte[] signature = CryptoPool.Rent(signatureSize); try { bool success = Interop.Crypto.DsaSign(key, hash, new Span(signature, 0, signatureSize), out signatureSize); @@ -242,8 +241,7 @@ public override bool TryCreateSignature(ReadOnlySpan hash, Span dest } finally { - Array.Clear(signature, 0, signatureSize); - ArrayPool.Shared.Return(signature); + CryptoPool.Return(signature, signatureSize); } if (converted.Length <= destination.Length) diff --git a/src/Common/src/System/Security/Cryptography/ECDiffieHellmanOpenSsl.Derive.cs b/src/Common/src/System/Security/Cryptography/ECDiffieHellmanOpenSsl.Derive.cs index 6426aefc69e2..8de7899e7022 100644 --- a/src/Common/src/System/Security/Cryptography/ECDiffieHellmanOpenSsl.Derive.cs +++ b/src/Common/src/System/Security/Cryptography/ECDiffieHellmanOpenSsl.Derive.cs @@ -157,7 +157,7 @@ private byte[] DeriveSecretAgreement(ECDiffieHellmanPublicKey otherPartyPublicKe if (secretLength > StackAllocMax) { - rented = ArrayPool.Shared.Rent(secretLength); + rented = CryptoPool.Rent(secretLength); secret = new Span(rented, 0, secretLength); } else @@ -190,8 +190,7 @@ private byte[] DeriveSecretAgreement(ECDiffieHellmanPublicKey otherPartyPublicKe if (rented != null) { - Array.Clear(rented, 0, secretLength); - ArrayPool.Shared.Return(rented); + CryptoPool.Return(rented, secretLength); } } } diff --git a/src/Common/src/System/Security/Cryptography/ECDsaOpenSsl.cs b/src/Common/src/System/Security/Cryptography/ECDsaOpenSsl.cs index 292fd658d86c..4f5d48852ec5 100644 --- a/src/Common/src/System/Security/Cryptography/ECDsaOpenSsl.cs +++ b/src/Common/src/System/Security/Cryptography/ECDsaOpenSsl.cs @@ -95,7 +95,7 @@ public override bool TrySignHash(ReadOnlySpan hash, Span destination byte[] converted; int signatureLength = Interop.Crypto.EcDsaSize(key); - byte[] signature = ArrayPool.Shared.Rent(signatureLength); + byte[] signature = CryptoPool.Rent(signatureLength); try { if (!Interop.Crypto.EcDsaSign(hash, new Span(signature, 0, signatureLength), ref signatureLength, key)) @@ -107,8 +107,7 @@ public override bool TrySignHash(ReadOnlySpan hash, Span destination } finally { - Array.Clear(signature, 0, signatureLength); - ArrayPool.Shared.Return(signature); + CryptoPool.Return(signature, signatureLength); } if (converted.Length <= destination.Length) diff --git a/src/Common/src/System/Security/Cryptography/EccKeyFormatHelper.cs b/src/Common/src/System/Security/Cryptography/EccKeyFormatHelper.cs index aca89eed33f8..ca712fc92bea 100644 --- a/src/Common/src/System/Security/Cryptography/EccKeyFormatHelper.cs +++ b/src/Common/src/System/Security/Cryptography/EccKeyFormatHelper.cs @@ -213,29 +213,19 @@ private static void ValidateParameters(ECDomainParameters? keyParameters, in Alg if (keyParameters != null && algId.Parameters != null) { ReadOnlySpan algIdParameters = algId.Parameters.Value.Span; - byte[] verify = ArrayPool.Shared.Rent(algIdParameters.Length); - try + // X.509 SubjectPublicKeyInfo specifies DER encoding. + // RFC 5915 specifies DER encoding for EC Private Keys. + // So we can compare as DER. + using (AsnWriter writer = new AsnWriter(AsnEncodingRules.DER)) { - // X.509 SubjectPublicKeyInfo specifies DER encoding. - // RFC 5915 specifies DER encoding for EC Private Keys. - // So we can compare as DER. - using (AsnWriter writer = new AsnWriter(AsnEncodingRules.DER)) + keyParameters.Value.Encode(writer); + + if (!writer.ValueEquals(algIdParameters)) { - keyParameters.Value.Encode(writer); - if (!writer.TryEncode(verify, out int written) || - written != algIdParameters.Length || - !algIdParameters.SequenceEqual(new ReadOnlySpan(verify, 0, written))) - { - throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); - } + throw new CryptographicException(SR.Cryptography_Der_Invalid_Encoding); } } - finally - { - // verify contains public information and does not need to be cleared. - ArrayPool.Shared.Return(verify); - } } } @@ -353,36 +343,16 @@ private static void WriteEcParameters(in ECParameters ecParameters, AsnWriter wr private static void WriteUncompressedPublicKey(in ECParameters ecParameters, AsnWriter writer) { int publicKeyLength = ecParameters.Q.X.Length * 2 + 1; - Span publicKeyBytes = stackalloc byte[0]; - byte[] publicKeyRented = null; - - if (publicKeyLength < 256) - { - publicKeyBytes = stackalloc byte[publicKeyLength]; - } - else - { - publicKeyRented = ArrayPool.Shared.Rent(publicKeyLength); - publicKeyBytes = publicKeyRented.AsSpan(0, publicKeyLength); - } - try - { - publicKeyBytes[0] = 0x04; - ecParameters.Q.X.AsSpan().CopyTo(publicKeyBytes.Slice(1)); - ecParameters.Q.Y.AsSpan().CopyTo(publicKeyBytes.Slice(1 + ecParameters.Q.X.Length)); - - writer.WriteBitString(publicKeyBytes); - } - finally - { - CryptographicOperations.ZeroMemory(publicKeyBytes); - - if (publicKeyRented != null) + writer.WriteBitString( + publicKeyLength, + ecParameters, + (publicKeyBytes, ecParams) => { - ArrayPool.Shared.Return(publicKeyRented); - } - } + publicKeyBytes[0] = 0x04; + ecParams.Q.X.AsSpan().CopyTo(publicKeyBytes.Slice(1)); + ecParams.Q.Y.AsSpan().CopyTo(publicKeyBytes.Slice(1 + ecParams.Q.X.Length)); + }); } internal static AsnWriter WriteECPrivateKey(in ECParameters ecParameters) diff --git a/src/Common/src/System/Security/Cryptography/KeyFormatHelper.cs b/src/Common/src/System/Security/Cryptography/KeyFormatHelper.cs index ff8a28ec3b27..83a9203e6583 100644 --- a/src/Common/src/System/Security/Cryptography/KeyFormatHelper.cs +++ b/src/Common/src/System/Security/Cryptography/KeyFormatHelper.cs @@ -210,7 +210,7 @@ private static void ReadEncryptedPkcs8( // No supported encryption algorithms produce more bytes of decryption output than there // were of decryption input. - byte[] decrypted = ArrayPool.Shared.Rent(epki.EncryptedData.Length); + byte[] decrypted = CryptoPool.Rent(epki.EncryptedData.Length); Memory decryptedMemory = decrypted; try @@ -246,7 +246,7 @@ private static void ReadEncryptedPkcs8( finally { CryptographicOperations.ZeroMemory(decryptedMemory.Span); - ArrayPool.Shared.Return(decrypted); + CryptoPool.Return(decrypted, clearSize: 0); } } @@ -340,7 +340,7 @@ private static unsafe AsnWriter WriteEncryptedPkcs8( Span salt = stackalloc byte[16]; // We need at least one block size beyond the input data size. - encryptedRent = ArrayPool.Shared.Rent( + encryptedRent = CryptoPool.Rent( checked(pkcs8Span.Length + (cipher.BlockSize / 8))); RandomNumberGenerator.Fill(salt); @@ -385,7 +385,7 @@ private static unsafe AsnWriter WriteEncryptedPkcs8( finally { CryptographicOperations.ZeroMemory(encryptedSpan); - ArrayPool.Shared.Return(encryptedRent); + CryptoPool.Return(encryptedRent, clearSize: 0); writer?.Dispose(); cipher.Dispose(); @@ -428,7 +428,7 @@ private static ArraySegment DecryptPkcs8( // No supported encryption algorithms produce more bytes of decryption output than there // were of decryption input. - byte[] decrypted = ArrayPool.Shared.Rent(epki.EncryptedData.Length); + byte[] decrypted = CryptoPool.Rent(epki.EncryptedData.Length); try { @@ -445,7 +445,7 @@ private static ArraySegment DecryptPkcs8( } catch (CryptographicException e) { - ArrayPool.Shared.Return(decrypted); + CryptoPool.Return(decrypted); throw new CryptographicException(SR.Cryptography_Pkcs8_EncryptedReadFailed, e); } } @@ -485,7 +485,7 @@ internal static AsnWriter ReencryptPkcs8( finally { CryptographicOperations.ZeroMemory(decrypted); - ArrayPool.Shared.Return(decrypted.Array); + CryptoPool.Return(decrypted.Array, clearSize: 0); } } @@ -524,7 +524,7 @@ internal static AsnWriter ReencryptPkcs8( finally { CryptographicOperations.ZeroMemory(decrypted); - ArrayPool.Shared.Return(decrypted.Array); + CryptoPool.Return(decrypted.Array, clearSize: 0); } } } diff --git a/src/Common/src/System/Security/Cryptography/PasswordBasedEncryption.cs b/src/Common/src/System/Security/Cryptography/PasswordBasedEncryption.cs index 2242bdb38678..44c4e816994a 100644 --- a/src/Common/src/System/Security/Cryptography/PasswordBasedEncryption.cs +++ b/src/Common/src/System/Security/Cryptography/PasswordBasedEncryption.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System.Buffers; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.Runtime.InteropServices; @@ -15,8 +14,6 @@ internal static class PasswordBasedEncryption { internal const int IterationLimit = 600000; - private static ArrayPool ArrayPool => ArrayPool.Shared; - private static CryptographicException AlgorithmKdfRequiresChars(string algId) { return new CryptographicException(SR.Cryptography_AlgKdfRequiresChars, algId); @@ -178,7 +175,7 @@ internal static unsafe int Decrypt( if (byteCount > buf.Length) { - rented = ArrayPool.Rent(byteCount); + rented = CryptoPool.Rent(byteCount); buf = rented.AsSpan(0, byteCount); } else @@ -213,7 +210,7 @@ internal static unsafe int Decrypt( if (rented != null) { - ArrayPool.Return(rented); + CryptoPool.Return(rented, clearSize: 0); } } } @@ -306,7 +303,7 @@ internal static unsafe int Encrypt( byte[] derivedKey; byte[] iv = cipher.IV; - byte[] sourceRent = ArrayPool.Rent(source.Length); + byte[] sourceRent = CryptoPool.Rent(source.Length); int keySizeBytes = cipher.KeySize / 8; int iterationCount = pbeParameters.IterationCount; HashAlgorithmName prf = pbeParameters.HashAlgorithm; @@ -418,8 +415,7 @@ internal static unsafe int Encrypt( } finally { - CryptographicOperations.ZeroMemory(sourceRent.AsSpan(0, source.Length)); - ArrayPool.Return(sourceRent); + CryptoPool.Return(sourceRent, source.Length); } } } @@ -449,7 +445,7 @@ private static unsafe int Pbes2Decrypt( if (byteCount > buf.Length) { - rented = ArrayPool.Rent(byteCount); + rented = CryptoPool.Rent(byteCount); buf = rented.AsSpan(0, byteCount); } else @@ -468,11 +464,21 @@ private static unsafe int Pbes2Decrypt( effectivePasswordBytes = buf; } - return Pbes2Decrypt( - algorithmParameters, - effectivePasswordBytes, - encryptedData, - destination); + try + { + return Pbes2Decrypt( + algorithmParameters, + effectivePasswordBytes, + encryptedData, + destination); + } + finally + { + if (rented != null) + { + CryptoPool.Return(rented, buf.Length); + } + } } } @@ -882,8 +888,8 @@ private static unsafe int Decrypt( // When we define a Span-based decryption API this should be changed to use it. byte[] tmpKey = new byte[key.Length]; byte[] tmpIv = new byte[iv.Length]; - byte[] rentedEncryptedData = ArrayPool.Rent(encryptedData.Length); - byte[] rentedDestination = ArrayPool.Rent(destination.Length); + byte[] rentedEncryptedData = CryptoPool.Rent(encryptedData.Length); + byte[] rentedDestination = CryptoPool.Rent(destination.Length); // Keep all the arrays pinned so they can be correctly cleared fixed (byte* tmpKeyPtr = tmpKey) @@ -927,11 +933,9 @@ private static unsafe int Decrypt( { CryptographicOperations.ZeroMemory(tmpKey); CryptographicOperations.ZeroMemory(tmpIv); - CryptographicOperations.ZeroMemory(rentedEncryptedData.AsSpan(0, encryptedData.Length)); - CryptographicOperations.ZeroMemory(rentedDestination.AsSpan(0, destination.Length)); - ArrayPool.Return(rentedEncryptedData); - ArrayPool.Return(rentedDestination); + CryptoPool.Return(rentedEncryptedData, encryptedData.Length); + CryptoPool.Return(rentedDestination, destination.Length); } } } diff --git a/src/Common/src/System/Security/Cryptography/Pkcs12Kdf.cs b/src/Common/src/System/Security/Cryptography/Pkcs12Kdf.cs index fcb7d6461764..f7f76871fee8 100644 --- a/src/Common/src/System/Security/Cryptography/Pkcs12Kdf.cs +++ b/src/Common/src/System/Security/Cryptography/Pkcs12Kdf.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System.Buffers; using System.Collections.Generic; using System.Diagnostics; using System.Text; @@ -137,7 +136,7 @@ private static void Derive( } else { - IRented = ArrayPool.Shared.Rent(ILen); + IRented = CryptoPool.Rent(ILen); I = IRented.AsSpan(0, ILen); } @@ -212,7 +211,7 @@ private static void Derive( if (IRented != null) { - ArrayPool.Shared.Return(IRented); + CryptoPool.Return(IRented, clearSize: 0); } hash.Dispose(); diff --git a/src/Common/src/System/Security/Cryptography/RSACng.EncryptDecrypt.cs b/src/Common/src/System/Security/Cryptography/RSACng.EncryptDecrypt.cs index 75444d49daa1..98741323a279 100644 --- a/src/Common/src/System/Security/Cryptography/RSACng.EncryptDecrypt.cs +++ b/src/Common/src/System/Security/Cryptography/RSACng.EncryptDecrypt.cs @@ -69,7 +69,7 @@ private unsafe byte[] EncryptOrDecrypt(byte[] data, RSAEncryptionPadding padding { if (encrypt && data.Length == 0) { - byte[] rented = ArrayPool.Shared.Rent(modulusSizeInBytes); + byte[] rented = CryptoPool.Rent(modulusSizeInBytes); Span paddedMessage = new Span(rented, 0, modulusSizeInBytes); try @@ -95,7 +95,7 @@ private unsafe byte[] EncryptOrDecrypt(byte[] data, RSAEncryptionPadding padding finally { CryptographicOperations.ZeroMemory(paddedMessage); - ArrayPool.Shared.Return(rented); + CryptoPool.Return(rented, clearSize: 0); } } @@ -157,7 +157,7 @@ private unsafe bool TryEncryptOrDecrypt(ReadOnlySpan data, Span dest { if (encrypt && data.Length == 0) { - byte[] rented = ArrayPool.Shared.Rent(modulusSizeInBytes); + byte[] rented = CryptoPool.Rent(modulusSizeInBytes); Span paddedMessage = new Span(rented, 0, modulusSizeInBytes); try @@ -183,7 +183,7 @@ private unsafe bool TryEncryptOrDecrypt(ReadOnlySpan data, Span dest finally { CryptographicOperations.ZeroMemory(paddedMessage); - ArrayPool.Shared.Return(rented); + CryptoPool.Return(rented, clearSize: 0); } } diff --git a/src/Common/src/System/Security/Cryptography/RSAOpenSsl.cs b/src/Common/src/System/Security/Cryptography/RSAOpenSsl.cs index e2617dba3719..88092e2dea62 100644 --- a/src/Common/src/System/Security/Cryptography/RSAOpenSsl.cs +++ b/src/Common/src/System/Security/Cryptography/RSAOpenSsl.cs @@ -97,7 +97,7 @@ public override byte[] Decrypt(byte[] data, RSAEncryptionPadding padding) try { - buf = ArrayPool.Shared.Rent(rsaSize); + buf = CryptoPool.Rent(rsaSize); destination = new Span(buf, 0, rsaSize); if (!TryDecrypt(key, data, destination, rsaPadding, oaepProcessor, out int bytesWritten)) @@ -111,7 +111,7 @@ public override byte[] Decrypt(byte[] data, RSAEncryptionPadding padding) finally { CryptographicOperations.ZeroMemory(destination); - ArrayPool.Shared.Return(buf); + CryptoPool.Return(buf, clearSize: 0); } } @@ -216,7 +216,7 @@ private static bool TryDecrypt( if (rsaPaddingProcessor != null) { - paddingBuf = ArrayPool.Shared.Rent(rsaSize); + paddingBuf = CryptoPool.Rent(rsaSize); decryptBuf = paddingBuf; } @@ -248,7 +248,7 @@ private static bool TryDecrypt( // DecryptBuf is paddingBuf if paddingBuf is not null, erase it before returning it. // If paddingBuf IS null then decryptBuf was destination, and shouldn't be cleared. CryptographicOperations.ZeroMemory(decryptBuf); - ArrayPool.Shared.Return(paddingBuf); + CryptoPool.Return(paddingBuf, clearSize: 0); } } } @@ -318,7 +318,7 @@ private static bool TryEncrypt( if (rsaPaddingProcessor != null) { Debug.Assert(rsaPadding == Interop.Crypto.RsaPadding.NoPadding); - byte[] rented = ArrayPool.Shared.Rent(rsaSize); + byte[] rented = CryptoPool.Rent(rsaSize); Span tmp = new Span(rented, 0, rsaSize); try @@ -329,7 +329,7 @@ private static bool TryEncrypt( finally { CryptographicOperations.ZeroMemory(tmp); - ArrayPool.Shared.Return(rented); + CryptoPool.Return(rented, clearSize: 0); } } else @@ -712,15 +712,14 @@ private bool TrySignHash( return false; } - byte[] pssRented = ArrayPool.Shared.Rent(bytesRequired); + byte[] pssRented = CryptoPool.Rent(bytesRequired); Span pssBytes = new Span(pssRented, 0, bytesRequired); processor.EncodePss(hash, pssBytes, KeySize); int ret = Interop.Crypto.RsaSignPrimitive(pssBytes, destination, rsa); - pssBytes.Clear(); - ArrayPool.Shared.Return(pssRented); + CryptoPool.Return(pssRented, bytesRequired); CheckReturn(ret); @@ -787,7 +786,7 @@ public override bool VerifyHash(ReadOnlySpan hash, ReadOnlySpan sign return false; } - byte[] rented = ArrayPool.Shared.Rent(requiredBytes); + byte[] rented = CryptoPool.Rent(requiredBytes); Span unwrapped = new Span(rented, 0, requiredBytes); try @@ -804,8 +803,7 @@ public override bool VerifyHash(ReadOnlySpan hash, ReadOnlySpan sign } finally { - unwrapped.Clear(); - ArrayPool.Shared.Return(rented); + CryptoPool.Return(rented, requiredBytes); } } diff --git a/src/Common/src/System/Security/Cryptography/RSASecurityTransforms.cs b/src/Common/src/System/Security/Cryptography/RSASecurityTransforms.cs index b6a0518e058c..f93f015599ae 100644 --- a/src/Common/src/System/Security/Cryptography/RSASecurityTransforms.cs +++ b/src/Common/src/System/Security/Cryptography/RSASecurityTransforms.cs @@ -310,7 +310,7 @@ public override bool TryEncrypt(ReadOnlySpan data, Span destination, throw new CryptographicException(SR.Cryptography_InvalidPaddingMode); } - byte[] rented = ArrayPool.Shared.Rent(rsaSize); + byte[] rented = CryptoPool.Rent(rsaSize); Span tmp = new Span(rented, 0, rsaSize); try @@ -333,8 +333,8 @@ public override bool TryEncrypt(ReadOnlySpan data, Span destination, } finally { - tmp.Clear(); - ArrayPool.Shared.Return(rented); + CryptographicOperations.ZeroMemory(tmp); + CryptoPool.Return(rented, clearSize: 0); } } @@ -369,24 +369,23 @@ public override byte[] Decrypt(byte[] data, RSAEncryptionPadding padding) } int maxOutputSize = RsaPaddingProcessor.BytesRequiredForBitCount(KeySize); - byte[] rented = ArrayPool.Shared.Rent(maxOutputSize); - Span contentsSpan = Span.Empty; + byte[] rented = CryptoPool.Rent(maxOutputSize); + int bytesWritten = 0; try { - if (!TryDecrypt(keys.PrivateKey, data, rented, padding, out int bytesWritten)) + if (!TryDecrypt(keys.PrivateKey, data, rented, padding, out bytesWritten)) { Debug.Fail($"TryDecrypt returned false with a modulus-sized destination"); throw new CryptographicException(); } - contentsSpan = new Span(rented, 0, bytesWritten); + Span contentsSpan = new Span(rented, 0, bytesWritten); return contentsSpan.ToArray(); } finally { - CryptographicOperations.ZeroMemory(contentsSpan); - ArrayPool.Shared.Return(rented); + CryptoPool.Return(rented, bytesWritten); } } @@ -438,7 +437,7 @@ private bool TryDecrypt( Debug.Assert(padding.Mode == RSAEncryptionPaddingMode.Oaep); RsaPaddingProcessor processor = RsaPaddingProcessor.OpenProcessor(padding.OaepHashAlgorithm); - byte[] rented = ArrayPool.Shared.Rent(modulusSizeInBytes); + byte[] rented = CryptoPool.Rent(modulusSizeInBytes); Span unpaddedData = Span.Empty; try @@ -456,7 +455,7 @@ private bool TryDecrypt( finally { CryptographicOperations.ZeroMemory(unpaddedData); - ArrayPool.Shared.Return(rented); + CryptoPool.Return(rented, clearSize: 0); } } @@ -585,7 +584,7 @@ public override bool TrySignHash(ReadOnlySpan hash, Span destination return false; } - byte[] rented = ArrayPool.Shared.Rent(rsaSize); + byte[] rented = CryptoPool.Rent(rsaSize); Span buf = new Span(rented, 0, rsaSize); processor.EncodePss(hash, buf, keySize); @@ -596,7 +595,7 @@ public override bool TrySignHash(ReadOnlySpan hash, Span destination finally { CryptographicOperations.ZeroMemory(buf); - ArrayPool.Shared.Return(rented); + CryptoPool.Return(rented, clearSize: 0); } } @@ -653,7 +652,7 @@ public override bool VerifyHash(ReadOnlySpan hash, ReadOnlySpan sign return false; } - byte[] rented = ArrayPool.Shared.Rent(rsaSize); + byte[] rented = CryptoPool.Rent(rsaSize); Span unwrapped = new Span(rented, 0, rsaSize); try @@ -673,8 +672,8 @@ public override bool VerifyHash(ReadOnlySpan hash, ReadOnlySpan sign } finally { - unwrapped.Clear(); - ArrayPool.Shared.Return(rented); + CryptographicOperations.ZeroMemory(unwrapped); + CryptoPool.Return(rented, clearSize: 0); } } diff --git a/src/Common/src/System/Security/Cryptography/RsaPaddingProcessor.cs b/src/Common/src/System/Security/Cryptography/RsaPaddingProcessor.cs index 34de84e443c5..2f54f033c64b 100644 --- a/src/Common/src/System/Security/Cryptography/RsaPaddingProcessor.cs +++ b/src/Common/src/System/Security/Cryptography/RsaPaddingProcessor.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System.Buffers; using System.Buffers.Binary; using System.Collections.Concurrent; using System.Diagnostics; @@ -139,7 +138,7 @@ internal void PadOaep( RandomNumberGenerator.Fill(seed); // 2(e) - dbMask = ArrayPool.Shared.Rent(db.Length); + dbMask = CryptoPool.Rent(db.Length); dbMaskSpan = new Span(dbMask, 0, db.Length); Mgf1(hasher, seed, dbMaskSpan); @@ -166,8 +165,8 @@ internal void PadOaep( { if (dbMask != null) { - dbMaskSpan.Clear(); - ArrayPool.Shared.Return(dbMask); + CryptographicOperations.ZeroMemory(dbMaskSpan); + CryptoPool.Return(dbMask, clearSize: 0); } } } @@ -199,7 +198,7 @@ internal bool DepadOaep( // seed = seedMask XOR maskedSeed Xor(seed, maskedSeed); - byte[] tmp = ArrayPool.Shared.Rent(source.Length); + byte[] tmp = CryptoPool.Rent(source.Length); try { @@ -261,8 +260,7 @@ internal bool DepadOaep( } finally { - Array.Clear(tmp, 0, source.Length); - ArrayPool.Shared.Return(tmp); + CryptoPool.Return(tmp, source.Length); } } } @@ -303,7 +301,7 @@ internal void EncodePss(ReadOnlySpan mHash, Span destination, int ke Span hDest = em.Slice(dbLen, _hLen); em[emLen - 1] = 0xBC; - byte[] dbMaskRented = ArrayPool.Shared.Rent(dbLen); + byte[] dbMaskRented = CryptoPool.Rent(dbLen); Span dbMask = new Span(dbMaskRented, 0, dbLen); using (IncrementalHash hasher = IncrementalHash.CreateHash(_hashAlgorithmName)) @@ -348,8 +346,8 @@ internal void EncodePss(ReadOnlySpan mHash, Span destination, int ke } } - dbMask.Clear(); - ArrayPool.Shared.Return(dbMaskRented); + CryptographicOperations.ZeroMemory(dbMask); + CryptoPool.Return(dbMaskRented, clearSize: 0); } internal bool VerifyPss(ReadOnlySpan mHash, ReadOnlySpan em, int keySize) @@ -397,7 +395,7 @@ internal bool VerifyPss(ReadOnlySpan mHash, ReadOnlySpan em, int key } // 7. dbMask = MGF(H, emLen - hLen - 1) - byte[] dbMaskRented = ArrayPool.Shared.Rent(maskedDb.Length); + byte[] dbMaskRented = CryptoPool.Rent(maskedDb.Length); Span dbMask = new Span(dbMaskRented, 0, maskedDb.Length); try @@ -457,8 +455,8 @@ internal bool VerifyPss(ReadOnlySpan mHash, ReadOnlySpan em, int key } finally { - dbMask.Clear(); - ArrayPool.Shared.Return(dbMaskRented); + CryptographicOperations.ZeroMemory(dbMask); + CryptoPool.Return(dbMaskRented, clearSize: 0); } } diff --git a/src/System.Security.Cryptography.Algorithms/src/Internal/Cryptography/OpenSslCipher.cs b/src/System.Security.Cryptography.Algorithms/src/Internal/Cryptography/OpenSslCipher.cs index 470e616401fc..f625574e0b05 100644 --- a/src/System.Security.Cryptography.Algorithms/src/Internal/Cryptography/OpenSslCipher.cs +++ b/src/System.Security.Cryptography.Algorithms/src/Internal/Cryptography/OpenSslCipher.cs @@ -54,18 +54,18 @@ public override unsafe int Transform(byte[] input, int inputOffset, int count, b // OpenSSL 1.1 does not allow partial overlap. if (input == output && inputOffset != outputOffset) { - byte[] tmp = ArrayPool.Shared.Rent(count); + byte[] tmp = CryptoPool.Rent(count); + int written = 0; try { - int written = CipherUpdate(input, inputOffset, count, tmp, 0); + written = CipherUpdate(input, inputOffset, count, tmp, 0); Buffer.BlockCopy(tmp, 0, output, outputOffset, written); return written; } finally { - CryptographicOperations.ZeroMemory(tmp.AsSpan(0, count)); - ArrayPool.Shared.Return(tmp); + CryptoPool.Return(tmp, written); } } diff --git a/src/System.Security.Cryptography.Algorithms/src/System.Security.Cryptography.Algorithms.csproj b/src/System.Security.Cryptography.Algorithms/src/System.Security.Cryptography.Algorithms.csproj index 230884a6141a..fa63b6e2fee1 100644 --- a/src/System.Security.Cryptography.Algorithms/src/System.Security.Cryptography.Algorithms.csproj +++ b/src/System.Security.Cryptography.Algorithms/src/System.Security.Cryptography.Algorithms.csproj @@ -105,6 +105,9 @@ Common\System\Memory\PointerMemoryManager.cs + + Common\System\Security\Cryptography\CryptoPool.cs + Common\System\Security\Cryptography\DSAKeyFormatHelper.cs @@ -727,4 +730,4 @@ - \ No newline at end of file + diff --git a/src/System.Security.Cryptography.Algorithms/src/System/Security/Cryptography/DSA.cs b/src/System.Security.Cryptography.Algorithms/src/System/Security/Cryptography/DSA.cs index b620c8a74976..4f39f36b90df 100644 --- a/src/System.Security.Cryptography.Algorithms/src/System/Security/Cryptography/DSA.cs +++ b/src/System.Security.Cryptography.Algorithms/src/System/Security/Cryptography/DSA.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System.Buffers; +using System.Diagnostics; using System.IO; using System.Numerics; using System.Runtime.InteropServices; @@ -151,6 +152,7 @@ public virtual bool TryCreateSignature(ReadOnlySpan hash, Span desti protected virtual bool TryHashData(ReadOnlySpan data, Span destination, HashAlgorithmName hashAlgorithm, out int bytesWritten) { + // Use ArrayPool.Shared instead of CryptoPool because the array is passed out. byte[] array = ArrayPool.Shared.Rent(data.Length); try { @@ -199,23 +201,34 @@ public virtual bool VerifyData(ReadOnlySpan data, ReadOnlySpan signa throw HashAlgorithmNameNullOrEmpty(); } - for (int i = 256; ; i = checked(i * 2)) + // The biggest hash algorithm supported is SHA512, which is only 64 bytes (512 bits). + // So this should realistically never hit the fallback + // (it'd require a derived type to add support for a different hash algorithm, and that + // algorithm to have a large output.) + Span buf = stackalloc byte[128]; + ReadOnlySpan hash = stackalloc byte[0]; + + if (TryHashData(data, buf, hashAlgorithm, out int hashLength)) + { + hash = buf.Slice(0, hashLength); + } + else { - int hashLength = 0; - byte[] hash = ArrayPool.Shared.Rent(i); + // Use ArrayPool.Shared instead of CryptoPool because the array is passed out. + byte[] array = ArrayPool.Shared.Rent(data.Length); try { - if (TryHashData(data, hash, hashAlgorithm, out hashLength)) - { - return VerifySignature(new ReadOnlySpan(hash, 0, hashLength), signature); - } + data.CopyTo(array); + hash = HashData(array, 0, data.Length, hashAlgorithm); } finally { - Array.Clear(hash, 0, hashLength); - ArrayPool.Shared.Return(hash); + Array.Clear(array, 0, data.Length); + ArrayPool.Shared.Return(array); } } + + return VerifySignature(hash, signature); } public virtual bool VerifySignature(ReadOnlySpan hash, ReadOnlySpan signature) => diff --git a/src/System.Security.Cryptography.Algorithms/src/System/Security/Cryptography/ECDsa.cs b/src/System.Security.Cryptography.Algorithms/src/System/Security/Cryptography/ECDsa.cs index fa8e0e271c16..2e1fae773f7f 100644 --- a/src/System.Security.Cryptography.Algorithms/src/System/Security/Cryptography/ECDsa.cs +++ b/src/System.Security.Cryptography.Algorithms/src/System/Security/Cryptography/ECDsa.cs @@ -150,23 +150,34 @@ public virtual bool VerifyData(ReadOnlySpan data, ReadOnlySpan signa throw new ArgumentException(SR.Cryptography_HashAlgorithmNameNullOrEmpty, nameof(hashAlgorithm)); } - for (int i = 256; ; i = checked(i * 2)) + // The biggest hash algorithm supported is SHA512, which is only 64 bytes (512 bits). + // So this should realistically never hit the fallback + // (it'd require a derived type to add support for a different hash algorithm, and that + // algorithm to have a large output.) + Span buf = stackalloc byte[128]; + ReadOnlySpan hash = stackalloc byte[0]; + + if (TryHashData(data, buf, hashAlgorithm, out int hashLength)) { - int hashLength = 0; - byte[] hash = ArrayPool.Shared.Rent(i); + hash = buf.Slice(0, hashLength); + } + else + { + // Use ArrayPool.Shared instead of CryptoPool because the array is passed out. + byte[] array = ArrayPool.Shared.Rent(data.Length); try { - if (TryHashData(data, hash, hashAlgorithm, out hashLength)) - { - return VerifyHash(new ReadOnlySpan(hash, 0, hashLength), signature); - } + data.CopyTo(array); + hash = HashData(array, 0, data.Length, hashAlgorithm); } finally { - Array.Clear(hash, 0, hashLength); - ArrayPool.Shared.Return(hash); + Array.Clear(array, 0, data.Length); + ArrayPool.Shared.Return(array); } } + + return VerifyHash(hash, signature); } public bool VerifyData(Stream data, byte[] signature, HashAlgorithmName hashAlgorithm) @@ -200,6 +211,7 @@ protected virtual byte[] HashData(Stream data, HashAlgorithmName hashAlgorithm) protected virtual bool TryHashData(ReadOnlySpan data, Span destination, HashAlgorithmName hashAlgorithm, out int bytesWritten) { + // Use ArrayPool.Shared instead of CryptoPool because the array is passed out. byte[] array = ArrayPool.Shared.Rent(data.Length); try { diff --git a/src/System.Security.Cryptography.Algorithms/src/System/Security/Cryptography/RSA.cs b/src/System.Security.Cryptography.Algorithms/src/System/Security/Cryptography/RSA.cs index f2bbc55cde5a..3be56f9a1923 100644 --- a/src/System.Security.Cryptography.Algorithms/src/System/Security/Cryptography/RSA.cs +++ b/src/System.Security.Cryptography.Algorithms/src/System/Security/Cryptography/RSA.cs @@ -92,6 +92,7 @@ public virtual bool TryEncrypt(ReadOnlySpan data, Span destination, protected virtual bool TryHashData(ReadOnlySpan data, Span destination, HashAlgorithmName hashAlgorithm, out int bytesWritten) { byte[] result; + // Use ArrayPool.Shared instead of CryptoPool because the array is passed out. byte[] array = ArrayPool.Shared.Rent(data.Length); try { @@ -270,7 +271,7 @@ public virtual bool VerifyData(ReadOnlySpan data, ReadOnlySpan signa for (int i = 256; ; i = checked(i * 2)) { int hashLength = 0; - byte[] hash = ArrayPool.Shared.Rent(i); + byte[] hash = CryptoPool.Rent(i); try { if (TryHashData(data, hash, hashAlgorithm, out hashLength)) @@ -280,8 +281,7 @@ public virtual bool VerifyData(ReadOnlySpan data, ReadOnlySpan signa } finally { - Array.Clear(hash, 0, hashLength); - ArrayPool.Shared.Return(hash); + CryptoPool.Return(hash, hashLength); } } } @@ -329,7 +329,7 @@ public override unsafe bool TryExportSubjectPublicKeyInfo(Span destination while (true) { - byte[] rented = ArrayPool.Shared.Rent(rentSize); + byte[] rented = CryptoPool.Rent(rentSize); rentSize = rented.Length; int pkcs1Size = 0; @@ -350,8 +350,7 @@ public override unsafe bool TryExportSubjectPublicKeyInfo(Span destination } finally { - CryptographicOperations.ZeroMemory(rented.AsSpan(0, pkcs1Size)); - ArrayPool.Shared.Return(rented); + CryptoPool.Return(rented, pkcs1Size); } } } @@ -377,7 +376,7 @@ private unsafe AsnWriter WritePkcs8PrivateKey() while (true) { - byte[] rented = ArrayPool.Shared.Rent(rentSize); + byte[] rented = CryptoPool.Rent(rentSize); rentSize = rented.Length; int pkcs1Size = 0; @@ -395,8 +394,7 @@ private unsafe AsnWriter WritePkcs8PrivateKey() } finally { - CryptographicOperations.ZeroMemory(rented.AsSpan(0, pkcs1Size)); - ArrayPool.Shared.Return(rented); + CryptoPool.Return(rented, pkcs1Size); } } } diff --git a/src/System.Security.Cryptography.Algorithms/src/System/Security/Cryptography/RandomNumberGenerator.cs b/src/System.Security.Cryptography.Algorithms/src/System/Security/Cryptography/RandomNumberGenerator.cs index e28f0dd743d8..1986d564243f 100644 --- a/src/System.Security.Cryptography.Algorithms/src/System/Security/Cryptography/RandomNumberGenerator.cs +++ b/src/System.Security.Cryptography.Algorithms/src/System/Security/Cryptography/RandomNumberGenerator.cs @@ -54,6 +54,7 @@ public virtual void GetBytes(byte[] data, int offset, int count) public virtual void GetBytes(Span data) { + // Use ArrayPool.Shared instead of CryptoPool because the array is passed out. byte[] array = ArrayPool.Shared.Rent(data.Length); try { @@ -76,6 +77,7 @@ public virtual void GetNonZeroBytes(byte[] data) public virtual void GetNonZeroBytes(Span data) { + // Use ArrayPool.Shared instead of CryptoPool because the array is passed out. byte[] array = ArrayPool.Shared.Rent(data.Length); try { diff --git a/src/System.Security.Cryptography.Algorithms/src/System/Security/Cryptography/Rfc2898DeriveBytes.cs b/src/System.Security.Cryptography.Algorithms/src/System/Security/Cryptography/Rfc2898DeriveBytes.cs index 2eecd8579c0f..e72eb8393422 100644 --- a/src/System.Security.Cryptography.Algorithms/src/System/Security/Cryptography/Rfc2898DeriveBytes.cs +++ b/src/System.Security.Cryptography.Algorithms/src/System/Security/Cryptography/Rfc2898DeriveBytes.cs @@ -43,7 +43,8 @@ public Rfc2898DeriveBytes(byte[] password, byte[] salt, int iterations, HashAlgo if (password == null) throw new NullReferenceException(); // This "should" be ArgumentNullException but for compat, we throw NullReferenceException. - _salt = salt.CloneByteArray(); + _salt = new byte[salt.Length + sizeof(uint)]; + salt.AsSpan().CopyTo(_salt); _iterations = (uint)iterations; _password = password.CloneByteArray(); HashAlgorithm = hashAlgorithm; @@ -88,7 +89,9 @@ public Rfc2898DeriveBytes(string password, int saltSize, int iterations, HashAlg if (iterations <= 0) throw new ArgumentOutOfRangeException(nameof(iterations), SR.ArgumentOutOfRange_NeedPosNum); - _salt = Helpers.GenerateRandom(saltSize); + _salt = new byte[saltSize + sizeof(uint)]; + RandomNumberGenerator.Fill(_salt.AsSpan(0, saltSize)); + _iterations = (uint)iterations; _password = Encoding.UTF8.GetBytes(password); HashAlgorithm = hashAlgorithm; @@ -119,7 +122,7 @@ public byte[] Salt { get { - return _salt.CloneByteArray(); + return _salt.AsSpan(0, _salt.Length - sizeof(uint)).ToArray(); } set @@ -128,7 +131,9 @@ public byte[] Salt throw new ArgumentNullException(nameof(value)); if (value.Length < MinimumSaltSize) throw new ArgumentException(SR.Cryptography_PasswordDerivedBytes_FewBytesSalt); - _salt = value.CloneByteArray(); + + _salt = new byte[value.Length + sizeof(uint)]; + value.AsSpan().CopyTo(_salt); Initialize(); } } @@ -183,19 +188,18 @@ public override byte[] GetBytes(int cb) while (offset < cb) { - byte[] T_block = Func(); + Func(); int remainder = cb - offset; - if (remainder > _blockSize) + if (remainder >= _blockSize) { - Buffer.BlockCopy(T_block, 0, password, offset, _blockSize); + Buffer.BlockCopy(_buffer, 0, password, offset, _blockSize); offset += _blockSize; } else { - Buffer.BlockCopy(T_block, 0, password, offset, remainder); - offset += remainder; - Buffer.BlockCopy(T_block, remainder, _buffer, _startIndex, _blockSize - remainder); - _endIndex += (_blockSize - remainder); + Buffer.BlockCopy(_buffer, 0, password, offset, remainder); + _startIndex = remainder; + _endIndex = _buffer.Length; return password; } } @@ -252,43 +256,40 @@ private void Initialize() // This function is defined as follows: // Func (S, i) = HMAC(S || i) ^ HMAC2(S || i) ^ ... ^ HMAC(iterations) (S || i) // where i is the block number. - private byte[] Func() + private void Func() { - byte[] temp = new byte[_salt.Length + sizeof(uint)]; - Buffer.BlockCopy(_salt, 0, temp, 0, _salt.Length); - Helpers.WriteInt(_block, temp, _salt.Length); + Helpers.WriteInt(_block, _salt, _salt.Length - sizeof(uint)); + Debug.Assert(_blockSize == _buffer.Length); - byte[] ui = ArrayPool.Shared.Rent(_blockSize); - try - { - Span uiSpan = new Span(ui, 0, _blockSize); + // The biggest _blockSize we have is from SHA512, which is 64 bytes. + // Since we have a closed set of supported hash algorithms (OpenHmac()) + // we can know this always fits. + // + Span uiSpan = stackalloc byte[64]; + uiSpan = uiSpan.Slice(0, _blockSize); - if (!_hmac.TryComputeHash(temp, uiSpan, out int bytesWritten) || bytesWritten != _blockSize) - throw new CryptographicException(); + if (!_hmac.TryComputeHash(_salt, uiSpan, out int bytesWritten) || bytesWritten != _blockSize) + { + throw new CryptographicException(); + } - byte[] ret = new byte[_blockSize]; - uiSpan.CopyTo(ret); + uiSpan.CopyTo(_buffer); - for (int i = 2; i <= _iterations; i++) + for (int i = 2; i <= _iterations; i++) + { + if (!_hmac.TryComputeHash(uiSpan, uiSpan, out bytesWritten) || bytesWritten != _blockSize) { - if (!_hmac.TryComputeHash(uiSpan, uiSpan, out bytesWritten) || bytesWritten != _blockSize) - throw new CryptographicException(); - - for (int j = 0; j < _blockSize; j++) - { - ret[j] ^= ui[j]; - } + throw new CryptographicException(); } - // increment the block count. - _block++; - return ret; - } - finally - { - Array.Clear(ui, 0, _blockSize); - ArrayPool.Shared.Return(ui); + for (int j = _buffer.Length - 1; j >= 0; j--) + { + _buffer[j] ^= uiSpan[j]; + } } + + // increment the block count. + _block++; } } } diff --git a/src/System.Security.Cryptography.Algorithms/tests/Rfc2898Tests.cs b/src/System.Security.Cryptography.Algorithms/tests/Rfc2898Tests.cs index 1b240bf994f0..224929c59841 100644 --- a/src/System.Security.Cryptography.Algorithms/tests/Rfc2898Tests.cs +++ b/src/System.Security.Cryptography.Algorithms/tests/Rfc2898Tests.cs @@ -214,14 +214,23 @@ public static void GetBytes_NotIdempotent() Assert.NotEqual(first, second); } - [Fact] - public static void GetBytes_StreamLike() + [Theory] + [InlineData(2)] + [InlineData(5)] + [InlineData(10)] + [InlineData(16)] + [InlineData(20)] + [InlineData(25)] + [InlineData(32)] + [InlineData(40)] + [InlineData(192)] + public static void GetBytes_StreamLike(int size) { byte[] first; using (var deriveBytes = new Rfc2898DeriveBytes(TestPassword, s_testSalt)) { - first = deriveBytes.GetBytes(32); + first = deriveBytes.GetBytes(size); } byte[] second = new byte[first.Length]; @@ -238,7 +247,40 @@ public static void GetBytes_StreamLike() Assert.Equal(first, second); } - + + [Theory] + [InlineData(2)] + [InlineData(5)] + [InlineData(10)] + [InlineData(16)] + [InlineData(20)] + [InlineData(25)] + [InlineData(32)] + [InlineData(40)] + [InlineData(192)] + public static void GetBytes_StreamLike_OneAtATime(int size) + { + byte[] first; + + using (var deriveBytes = new Rfc2898DeriveBytes(TestPasswordB, s_testSaltB)) + { + first = deriveBytes.GetBytes(size); + } + + byte[] second = new byte[first.Length]; + + // Reset + using (var deriveBytes = new Rfc2898DeriveBytes(TestPasswordB, s_testSaltB)) + { + for (int i = 0; i < second.Length; i++) + { + second[i] = deriveBytes.GetBytes(1)[0]; + } + } + + Assert.Equal(first, second); + } + [Fact] public static void GetBytes_KnownValues_1() { diff --git a/src/System.Security.Cryptography.Cng/src/System.Security.Cryptography.Cng.csproj b/src/System.Security.Cryptography.Cng/src/System.Security.Cryptography.Cng.csproj index 5d151bb31686..581bd6bf87b6 100644 --- a/src/System.Security.Cryptography.Cng/src/System.Security.Cryptography.Cng.csproj +++ b/src/System.Security.Cryptography.Cng/src/System.Security.Cryptography.Cng.csproj @@ -231,6 +231,9 @@ Common\System\Memory\PointerMemoryManager.cs + + Common\System\Security\Cryptography\CryptoPool.cs + Common\System\Security\Cryptography\CngPkcs8.cs diff --git a/src/System.Security.Cryptography.Encoding/src/System.Security.Cryptography.Encoding.csproj b/src/System.Security.Cryptography.Encoding/src/System.Security.Cryptography.Encoding.csproj index 882a8c551fa6..8b6ffd9e66fa 100644 --- a/src/System.Security.Cryptography.Encoding/src/System.Security.Cryptography.Encoding.csproj +++ b/src/System.Security.Cryptography.Encoding/src/System.Security.Cryptography.Encoding.csproj @@ -98,6 +98,9 @@ Common\System\Memory\PointerMemoryManager.cs + + Common\System\Security\Cryptography\CryptoPool.cs + Common\System\Security\Cryptography\Asn1\DirectoryStringAsn.xml diff --git a/src/System.Security.Cryptography.Encoding/tests/System.Security.Cryptography.Encoding.Tests.csproj b/src/System.Security.Cryptography.Encoding/tests/System.Security.Cryptography.Encoding.Tests.csproj index aa90a02bd76f..ba32fda535c0 100644 --- a/src/System.Security.Cryptography.Encoding/tests/System.Security.Cryptography.Encoding.Tests.csproj +++ b/src/System.Security.Cryptography.Encoding/tests/System.Security.Cryptography.Encoding.Tests.csproj @@ -6,6 +6,9 @@ + + Common\System\Security\Cryptography\CryptoPool.cs + @@ -58,4 +61,4 @@ Common\System\Memory\PointerMemoryManager.cs - \ No newline at end of file + diff --git a/src/System.Security.Cryptography.OpenSsl/src/System.Security.Cryptography.OpenSsl.csproj b/src/System.Security.Cryptography.OpenSsl/src/System.Security.Cryptography.OpenSsl.csproj index c28cda4f90e3..fc429bfe003e 100644 --- a/src/System.Security.Cryptography.OpenSsl/src/System.Security.Cryptography.OpenSsl.csproj +++ b/src/System.Security.Cryptography.OpenSsl/src/System.Security.Cryptography.OpenSsl.csproj @@ -105,6 +105,9 @@ Common\System\Memory\PointerMemoryManager.cs + + Common\System\Security\Cryptography\CryptoPool.cs + Common\System\Security\Cryptography\DSAOpenSsl.cs diff --git a/src/System.Security.Cryptography.Pkcs/src/Internal/Cryptography/Pal/AnyOS/ManagedPal.Asn.cs b/src/System.Security.Cryptography.Pkcs/src/Internal/Cryptography/Pal/AnyOS/ManagedPal.Asn.cs index 47b2f91c9c26..489373a86a28 100644 --- a/src/System.Security.Cryptography.Pkcs/src/Internal/Cryptography/Pal/AnyOS/ManagedPal.Asn.cs +++ b/src/System.Security.Cryptography.Pkcs/src/Internal/Cryptography/Pal/AnyOS/ManagedPal.Asn.cs @@ -3,7 +3,6 @@ // See the LICENSE file in the project root for more information. using System; -using System.Buffers; using System.Diagnostics; using System.Security.Cryptography; using System.Security.Cryptography.Asn1; @@ -46,7 +45,7 @@ public override byte[] DecodeOctetString(byte[] encodedOctets) } else { - poolBytes = ArrayPool.Shared.Rent(reader.PeekContentBytes().Length); + poolBytes = CryptoPool.Rent(reader.PeekContentBytes().Length); if (!reader.TryCopyOctetStringBytes(poolBytes, out bytesWritten)) { @@ -70,8 +69,7 @@ public override byte[] DecodeOctetString(byte[] encodedOctets) { if (poolBytes != null) { - Array.Clear(poolBytes, 0, data.Length); - ArrayPool.Shared.Return(poolBytes); + CryptoPool.Return(poolBytes, data.Length); } } } diff --git a/src/System.Security.Cryptography.Pkcs/src/Internal/Cryptography/Pal/AnyOS/ManagedPal.Decrypt.cs b/src/System.Security.Cryptography.Pkcs/src/Internal/Cryptography/Pal/AnyOS/ManagedPal.Decrypt.cs index 0a80301ba6a2..d8400241553f 100644 --- a/src/System.Security.Cryptography.Pkcs/src/Internal/Cryptography/Pal/AnyOS/ManagedPal.Decrypt.cs +++ b/src/System.Security.Cryptography.Pkcs/src/Internal/Cryptography/Pal/AnyOS/ManagedPal.Decrypt.cs @@ -3,7 +3,6 @@ // See the LICENSE file in the project root for more information. using System; -using System.Buffers; using System.Diagnostics; using System.Security.Cryptography; using System.Security.Cryptography.Asn1; @@ -130,7 +129,7 @@ public static unsafe ContentInfo TryDecryptCore( } else { - tmp = ArrayPool.Shared.Rent(decrypted.Length); + tmp = CryptoPool.Rent(decrypted.Length); if (reader.TryCopyOctetStringBytes(tmp, out int written)) { @@ -154,7 +153,7 @@ public static unsafe ContentInfo TryDecryptCore( if (tmp != null) { // Already cleared - ArrayPool.Shared.Return(tmp); + CryptoPool.Return(tmp, clearSize: 0); } } } @@ -194,7 +193,7 @@ private static byte[] DecryptContent( { exception = null; int encryptedContentLength = encryptedContent.Length; - byte[] encryptedContentArray = ArrayPool.Shared.Rent(encryptedContentLength); + byte[] encryptedContentArray = CryptoPool.Rent(encryptedContentLength); try { @@ -203,6 +202,10 @@ private static byte[] DecryptContent( using (SymmetricAlgorithm alg = OpenAlgorithm(contentEncryptionAlgorithm)) using (ICryptoTransform decryptor = alg.CreateDecryptor(cek, alg.IV)) { + // If we extend this library to accept additional algorithm providers + // then a different array pool needs to be used. + Debug.Assert(alg.GetType().Assembly == typeof(Aes).Assembly); + return decryptor.OneShot( encryptedContentArray, 0, @@ -216,8 +219,7 @@ private static byte[] DecryptContent( } finally { - Array.Clear(encryptedContentArray, 0, encryptedContentLength); - ArrayPool.Shared.Return(encryptedContentArray); + CryptoPool.Return(encryptedContentArray, encryptedContentLength); encryptedContentArray = null; } } diff --git a/src/System.Security.Cryptography.Pkcs/src/Internal/Cryptography/Pal/AnyOS/ManagedPal.KeyTrans.cs b/src/System.Security.Cryptography.Pkcs/src/Internal/Cryptography/Pal/AnyOS/ManagedPal.KeyTrans.cs index 59625e49c56e..a1e59686f65d 100644 --- a/src/System.Security.Cryptography.Pkcs/src/Internal/Cryptography/Pal/AnyOS/ManagedPal.KeyTrans.cs +++ b/src/System.Security.Cryptography.Pkcs/src/Internal/Cryptography/Pal/AnyOS/ManagedPal.KeyTrans.cs @@ -3,7 +3,6 @@ // See the LICENSE file in the project root for more information. using System; -using System.Buffers; using System.Diagnostics; using System.Security.Cryptography; using System.Security.Cryptography.Pkcs; @@ -196,7 +195,7 @@ private static byte[] DecryptKey( try { - cek = ArrayPool.Shared.Rent(privateKey.KeySize / 8); + cek = CryptoPool.Rent(privateKey.KeySize / 8); if (!privateKey.TryDecrypt(encryptedKey, cek, encryptionPadding, out cekLength)) { @@ -217,8 +216,7 @@ private static byte[] DecryptKey( { if (cek != null) { - Array.Clear(cek, 0, cekLength); - ArrayPool.Shared.Return(cek); + CryptoPool.Return(cek, cekLength); } } #else diff --git a/src/System.Security.Cryptography.Pkcs/src/Internal/Cryptography/Pal/Windows/HelpersWindows.cs b/src/System.Security.Cryptography.Pkcs/src/Internal/Cryptography/Pal/Windows/HelpersWindows.cs index 113362531415..252ee486c687 100644 --- a/src/System.Security.Cryptography.Pkcs/src/Internal/Cryptography/Pal/Windows/HelpersWindows.cs +++ b/src/System.Security.Cryptography.Pkcs/src/Internal/Cryptography/Pal/Windows/HelpersWindows.cs @@ -420,8 +420,7 @@ public static CspParameters GetProvParameters(this SafeProvOrNCryptKeyHandle han if (rented != null) { - Array.Clear(rented, 0, maxClear); - ArrayPool.Shared.Return(rented); + CryptoPool.Return(rented, maxClear); } return new CspParameters(provType) @@ -445,15 +444,12 @@ private static string GetStringProvParam( { if (len > buf.Length) { - ArrayPool pool = ArrayPool.Shared; - if (rented != null) { - Array.Clear(rented, 0, clearLen); - pool.Return(rented); + CryptoPool.Return(rented, clearLen); } - rented = pool.Rent(len); + rented = CryptoPool.Rent(len); buf = rented; len = rented.Length; } diff --git a/src/System.Security.Cryptography.Pkcs/src/System.Security.Cryptography.Pkcs.csproj b/src/System.Security.Cryptography.Pkcs/src/System.Security.Cryptography.Pkcs.csproj index d34768d36f21..d045a334e34a 100644 --- a/src/System.Security.Cryptography.Pkcs/src/System.Security.Cryptography.Pkcs.csproj +++ b/src/System.Security.Cryptography.Pkcs/src/System.Security.Cryptography.Pkcs.csproj @@ -405,6 +405,9 @@ Common\System\Memory\PointerMemoryManager.cs + + Common\System\Security\Cryptography\CryptoPool.cs + Common\System\Security\Cryptography\Oids.cs diff --git a/src/System.Security.Cryptography.Pkcs/src/System/Security/Cryptography/Pkcs/CmsSignature.DSA.cs b/src/System.Security.Cryptography.Pkcs/src/System/Security/Cryptography/Pkcs/CmsSignature.DSA.cs index 1ed7a6f9e8f5..62cf6bd095be 100644 --- a/src/System.Security.Cryptography.Pkcs/src/System/Security/Cryptography/Pkcs/CmsSignature.DSA.cs +++ b/src/System.Security.Cryptography.Pkcs/src/System/Security/Cryptography/Pkcs/CmsSignature.DSA.cs @@ -69,8 +69,7 @@ internal override bool VerifySignature( int bufSize = 2 * dsaParameters.Q.Length; #if netcoreapp - ArrayPool pool = ArrayPool.Shared; - byte[] rented = pool.Rent(bufSize); + byte[] rented = CryptoPool.Rent(bufSize); Span ieee = new Span(rented, 0, bufSize); try @@ -88,8 +87,7 @@ internal override bool VerifySignature( } finally { - ieee.Clear(); - pool.Return(rented); + CryptoPool.Return(rented, bufSize); } #endif } @@ -136,9 +134,8 @@ protected override bool Sign( signatureAlgorithm = new Oid(oidValue, oidValue); #if netcoreapp - ArrayPool pool = ArrayPool.Shared; // The Q size cannot be bigger than the KeySize. - byte[] rented = pool.Rent(dsa.KeySize / 8); + byte[] rented = CryptoPool.Rent(dsa.KeySize / 8); int bytesWritten = 0; try @@ -160,8 +157,7 @@ protected override bool Sign( } finally { - Array.Clear(rented, 0, bytesWritten); - pool.Return(rented); + CryptoPool.Return(rented, bytesWritten); } signatureValue = null; diff --git a/src/System.Security.Cryptography.Pkcs/src/System/Security/Cryptography/Pkcs/CmsSignature.ECDsa.cs b/src/System.Security.Cryptography.Pkcs/src/System/Security/Cryptography/Pkcs/CmsSignature.ECDsa.cs index fdce23c64081..827e1019ced5 100644 --- a/src/System.Security.Cryptography.Pkcs/src/System/Security/Cryptography/Pkcs/CmsSignature.ECDsa.cs +++ b/src/System.Security.Cryptography.Pkcs/src/System/Security/Cryptography/Pkcs/CmsSignature.ECDsa.cs @@ -74,8 +74,7 @@ internal override bool VerifySignature( } #if netcoreapp - ArrayPool pool = ArrayPool.Shared; - byte[] rented = pool.Rent(bufSize); + byte[] rented = CryptoPool.Rent(bufSize); Span ieee = new Span(rented, 0, bufSize); try @@ -93,8 +92,7 @@ internal override bool VerifySignature( } finally { - ieee.Clear(); - pool.Return(rented); + CryptoPool.Return(rented, bufSize); } #endif } @@ -141,8 +139,6 @@ protected override bool Sign( signatureAlgorithm = new Oid(oidValue, oidValue); #if netcoreapp - ArrayPool pool = ArrayPool.Shared; - int bufSize; checked { @@ -151,7 +147,7 @@ protected override bool Sign( bufSize = 2 * fieldSize; } - byte[] rented = pool.Rent(bufSize); + byte[] rented = CryptoPool.Rent(bufSize); int bytesWritten = 0; try @@ -173,8 +169,7 @@ protected override bool Sign( } finally { - Array.Clear(rented, 0, bytesWritten); - pool.Return(rented); + CryptoPool.Return(rented, bytesWritten); } #endif diff --git a/src/System.Security.Cryptography.Pkcs/src/System/Security/Cryptography/Pkcs/Pkcs12Builder.cs b/src/System.Security.Cryptography.Pkcs/src/System/Security/Cryptography/Pkcs/Pkcs12Builder.cs index a5f5739bd2bc..7926dfff79a3 100644 --- a/src/System.Security.Cryptography.Pkcs/src/System/Security/Cryptography/Pkcs/Pkcs12Builder.cs +++ b/src/System.Security.Cryptography.Pkcs/src/System/Security/Cryptography/Pkcs/Pkcs12Builder.cs @@ -184,13 +184,13 @@ public void SealWithMac( ReadOnlySpan encodedSpan = contentsWriter.EncodeAsSpan(); - rentedAuthSafe = ArrayPool.Shared.Rent(encodedSpan.Length); + rentedAuthSafe = CryptoPool.Rent(encodedSpan.Length); encodedSpan.CopyTo(rentedAuthSafe); authSafeSpan = rentedAuthSafe.AsSpan(0, encodedSpan.Length); // Get an array of the proper size for the hash. byte[] macKey = hasher.GetHashAndReset(); - rentedMac = ArrayPool.Shared.Rent(macKey.Length); + rentedMac = CryptoPool.Rent(macKey.Length); macSpan = rentedMac.AsSpan(0, macKey.Length); // Since the biggest supported hash is SHA-2-512 (64 bytes), the @@ -290,12 +290,14 @@ public void SealWithMac( if (rentedMac != null) { - ArrayPool.Shared.Return(rentedMac); + // Already cleared + CryptoPool.Return(rentedMac, clearSize: 0); } if (rentedAuthSafe != null) { - ArrayPool.Shared.Return(rentedAuthSafe); + // Already cleared + CryptoPool.Return(rentedAuthSafe, clearSize: 0); } } } diff --git a/src/System.Security.Cryptography.Pkcs/src/System/Security/Cryptography/Pkcs/Pkcs12SafeContents.cs b/src/System.Security.Cryptography.Pkcs/src/System/Security/Cryptography/Pkcs/Pkcs12SafeContents.cs index f094642bc184..895dd66badd7 100644 --- a/src/System.Security.Cryptography.Pkcs/src/System/Security/Cryptography/Pkcs/Pkcs12SafeContents.cs +++ b/src/System.Security.Cryptography.Pkcs/src/System/Security/Cryptography/Pkcs/Pkcs12SafeContents.cs @@ -366,7 +366,7 @@ internal byte[] Encrypt( out bool isPkcs12); int cipherBlockBytes = cipher.BlockSize / 8; - byte[] encryptedRent = ArrayPool.Shared.Rent(contentsSpan.Length + cipherBlockBytes); + byte[] encryptedRent = CryptoPool.Rent(contentsSpan.Length + cipherBlockBytes); Span encryptedSpan = Span.Empty; Span iv = stackalloc byte[cipherBlockBytes]; Span salt = stackalloc byte[16]; @@ -424,7 +424,7 @@ internal byte[] Encrypt( finally { CryptographicOperations.ZeroMemory(encryptedSpan); - ArrayPool.Shared.Return(encryptedRent); + CryptoPool.Return(encryptedRent, clearSize: 0); writer?.Dispose(); } } diff --git a/src/System.Security.Cryptography.Pkcs/src/System/Security/Cryptography/Pkcs/Pkcs8PrivateKeyInfo.cs b/src/System.Security.Cryptography.Pkcs/src/System/Security/Cryptography/Pkcs/Pkcs8PrivateKeyInfo.cs index 5587f7224b40..7b71442938d6 100644 --- a/src/System.Security.Cryptography.Pkcs/src/System/Security/Cryptography/Pkcs/Pkcs8PrivateKeyInfo.cs +++ b/src/System.Security.Cryptography.Pkcs/src/System/Security/Cryptography/Pkcs/Pkcs8PrivateKeyInfo.cs @@ -197,7 +197,7 @@ public static Pkcs8PrivateKeyInfo DecryptAndDecode( finally { CryptographicOperations.ZeroMemory(decryptedMemory.Span); - ArrayPool.Shared.Return(decrypted.Array); + CryptoPool.Return(decrypted.Array, clearSize: 0); } } @@ -229,7 +229,7 @@ public static Pkcs8PrivateKeyInfo DecryptAndDecode( finally { CryptographicOperations.ZeroMemory(decryptedMemory.Span); - ArrayPool.Shared.Return(decrypted.Array); + CryptoPool.Return(decrypted.Array, clearSize: 0); } } diff --git a/src/System.Security.Cryptography.Pkcs/src/System/Security/Cryptography/Pkcs/SignedCms.cs b/src/System.Security.Cryptography.Pkcs/src/System/Security/Cryptography/Pkcs/SignedCms.cs index 330bbf41cdbd..1e80dd052b8d 100644 --- a/src/System.Security.Cryptography.Pkcs/src/System/Security/Cryptography/Pkcs/SignedCms.cs +++ b/src/System.Security.Cryptography.Pkcs/src/System/Security/Cryptography/Pkcs/SignedCms.cs @@ -243,7 +243,7 @@ internal static ReadOnlyMemory GetContent( return inner; } - rented = ArrayPool.Shared.Rent(wrappedContent.Length); + rented = CryptoPool.Rent(wrappedContent.Length); if (!reader.TryCopyOctetStringBytes(rented, out bytesWritten)) { @@ -260,8 +260,7 @@ internal static ReadOnlyMemory GetContent( { if (rented != null) { - rented.AsSpan(0, bytesWritten).Clear(); - ArrayPool.Shared.Return(rented); + CryptoPool.Return(rented, bytesWritten); } } diff --git a/src/System.Security.Cryptography.Primitives/src/System.Security.Cryptography.Primitives.csproj b/src/System.Security.Cryptography.Primitives/src/System.Security.Cryptography.Primitives.csproj index 9a76ba017329..834a575bbd2d 100644 --- a/src/System.Security.Cryptography.Primitives/src/System.Security.Cryptography.Primitives.csproj +++ b/src/System.Security.Cryptography.Primitives/src/System.Security.Cryptography.Primitives.csproj @@ -30,6 +30,9 @@ Internal\Cryptography\Helpers.cs + + Common\System\Security\Cryptography\CryptoPool.cs + Common\System\Security\Cryptography\KeySizeHelpers.cs @@ -40,9 +43,10 @@ + - \ No newline at end of file + diff --git a/src/System.Security.Cryptography.Primitives/src/System/Security/Cryptography/AsymmetricAlgorithm.cs b/src/System.Security.Cryptography.Primitives/src/System/Security/Cryptography/AsymmetricAlgorithm.cs index 83c158fb173a..359bd681c293 100644 --- a/src/System.Security.Cryptography.Primitives/src/System/Security/Cryptography/AsymmetricAlgorithm.cs +++ b/src/System.Security.Cryptography.Primitives/src/System/Security/Cryptography/AsymmetricAlgorithm.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System.Buffers; - namespace System.Security.Cryptography { public abstract class AsymmetricAlgorithm : IDisposable @@ -180,28 +178,23 @@ private static unsafe byte[] ExportArray( while (true) { - Span writtenSpan = Span.Empty; - byte[] buf = ArrayPool.Shared.Rent(bufSize); + byte[] buf = CryptoPool.Rent(bufSize); + int bytesWritten = 0; bufSize = buf.Length; fixed (byte* bufPtr = buf) { try { - if (exporter(password, pbeParameters, buf, out int bytesWritten)) + if (exporter(password, pbeParameters, buf, out bytesWritten)) { - writtenSpan = new Span(buf, 0, bytesWritten); + Span writtenSpan = new Span(buf, 0, bytesWritten); return writtenSpan.ToArray(); } } finally { - if (writtenSpan.Length > 0) - { - CryptographicOperations.ZeroMemory(writtenSpan); - } - - ArrayPool.Shared.Return(buf); + CryptoPool.Return(buf, bytesWritten); } bufSize = checked(bufSize * 2); @@ -215,28 +208,23 @@ private static unsafe byte[] ExportArray(TryExport exporter) while (true) { - Span writtenSpan = Span.Empty; - byte[] buf = ArrayPool.Shared.Rent(bufSize); + byte[] buf = CryptoPool.Rent(bufSize); + int bytesWritten = 0; bufSize = buf.Length; fixed (byte* bufPtr = buf) { try { - if (exporter(buf, out int bytesWritten)) + if (exporter(buf, out bytesWritten)) { - writtenSpan = new Span(buf, 0, bytesWritten); + Span writtenSpan = new Span(buf, 0, bytesWritten); return writtenSpan.ToArray(); } } finally { - if (writtenSpan.Length > 0) - { - CryptographicOperations.ZeroMemory(writtenSpan); - } - - ArrayPool.Shared.Return(buf); + CryptoPool.Return(buf, bytesWritten); } bufSize = checked(bufSize * 2); diff --git a/src/System.Security.Cryptography.Primitives/src/System/Security/Cryptography/CryptoStream.cs b/src/System.Security.Cryptography.Primitives/src/System/Security/Cryptography/CryptoStream.cs index efa6cfd059ca..bdb6ec685769 100644 --- a/src/System.Security.Cryptography.Primitives/src/System/Security/Cryptography/CryptoStream.cs +++ b/src/System.Security.Cryptography.Primitives/src/System/Security/Cryptography/CryptoStream.cs @@ -318,6 +318,8 @@ private async Task ReadAsyncCore(byte[] buffer, int offset, int count, Canc if (blocksToProcess > 1 && _transform.CanTransformMultipleBlocks) { int numWholeBlocksInBytes = blocksToProcess * _inputBlockSize; + + // Use ArrayPool.Shared instead of CryptoPool because the array is passed out. byte[] tempInputBuffer = ArrayPool.Shared.Rent(numWholeBlocksInBytes); byte[] tempOutputBuffer = null; @@ -354,6 +356,7 @@ private async Task ReadAsyncCore(byte[] buffer, int offset, int count, Canc Buffer.BlockCopy(tempInputBuffer, numWholeReadBlocksInBytes, _inputBuffer, 0, numIgnoredBytes); } + // Use ArrayPool.Shared instead of CryptoPool because the array is passed out. tempOutputBuffer = ArrayPool.Shared.Rent(numWholeReadBlocks * _outputBlockSize); numOutputBytes = _transform.TransformBlock(tempInputBuffer, 0, numWholeReadBlocksInBytes, tempOutputBuffer, 0); Buffer.BlockCopy(tempOutputBuffer, 0, buffer, currentOutputIndex, numOutputBytes); @@ -366,21 +369,30 @@ private async Task ReadAsyncCore(byte[] buffer, int offset, int count, Canc bytesToDeliver -= numOutputBytes; currentOutputIndex += numOutputBytes; } + + CryptographicOperations.ZeroMemory(new Span(tempInputBuffer, 0, numWholeBlocksInBytes)); + ArrayPool.Shared.Return(tempInputBuffer); + tempInputBuffer = null; } - finally + catch { // If we rented and then an exception happened we don't know how much was written to, - // clear the whole thing and return it. + // clear the whole thing and let it get reclaimed by the GC. if (tempOutputBuffer != null) { CryptographicOperations.ZeroMemory(tempOutputBuffer); - ArrayPool.Shared.Return(tempOutputBuffer); tempOutputBuffer = null; } - CryptographicOperations.ZeroMemory(new Span(tempInputBuffer, 0, numWholeBlocksInBytes)); - ArrayPool.Shared.Return(tempInputBuffer); - tempInputBuffer = null; + // For the input buffer we know how much was written, so clear that. + // But still let it get reclaimed by the GC. + if (tempInputBuffer != null) + { + CryptographicOperations.ZeroMemory(new Span(tempInputBuffer, 0, numWholeBlocksInBytes)); + tempInputBuffer = null; + } + + throw; } } @@ -557,6 +569,8 @@ private async Task WriteAsyncCore(byte[] buffer, int offset, int count, Cancella if (_transform.CanTransformMultipleBlocks && numWholeBlocks > 1) { int numWholeBlocksInBytes = numWholeBlocks * _inputBlockSize; + + // Use ArrayPool.Shared instead of CryptoPool because the array is passed out. byte[] tempOutputBuffer = ArrayPool.Shared.Rent(numWholeBlocks * _outputBlockSize); numOutputBytes = 0; @@ -576,12 +590,15 @@ private async Task WriteAsyncCore(byte[] buffer, int offset, int count, Cancella currentInputIndex += numWholeBlocksInBytes; bytesToWrite -= numWholeBlocksInBytes; + CryptographicOperations.ZeroMemory(new Span(tempOutputBuffer, 0, numOutputBytes)); + ArrayPool.Shared.Return(tempOutputBuffer); + tempOutputBuffer = null; } - finally + catch { CryptographicOperations.ZeroMemory(new Span(tempOutputBuffer, 0, numOutputBytes)); - ArrayPool.Shared.Return(tempOutputBuffer); tempOutputBuffer = null; + throw; } } else diff --git a/src/System.Security.Cryptography.Primitives/src/System/Security/Cryptography/HashAlgorithm.cs b/src/System.Security.Cryptography.Primitives/src/System/Security/Cryptography/HashAlgorithm.cs index f63664533a3e..c78b7e75c7f2 100644 --- a/src/System.Security.Cryptography.Primitives/src/System/Security/Cryptography/HashAlgorithm.cs +++ b/src/System.Security.Cryptography.Primitives/src/System/Security/Cryptography/HashAlgorithm.cs @@ -97,24 +97,17 @@ public byte[] ComputeHash(Stream inputStream) if (_disposed) throw new ObjectDisposedException(null); - // Default the buffer size to 4K. + // Use ArrayPool.Shared instead of CryptoPool because the array is passed out. byte[] buffer = ArrayPool.Shared.Rent(4096); - try + int bytesRead; + while ((bytesRead = inputStream.Read(buffer, 0, buffer.Length)) > 0) { - int bytesRead; - while ((bytesRead = inputStream.Read(buffer, 0, buffer.Length)) > 0) - { - HashCore(buffer, 0, bytesRead); - } - - return CaptureHashCodeAndReinitialize(); - } - finally - { - CryptographicOperations.ZeroMemory(buffer); - ArrayPool.Shared.Return(buffer); + HashCore(buffer, 0, bytesRead); } + + ArrayPool.Shared.Return(buffer, clearArray: true); + return CaptureHashCodeAndReinitialize(); } private byte[] CaptureHashCodeAndReinitialize() @@ -219,17 +212,12 @@ private void ValidateTransformBlock(byte[] inputBuffer, int inputOffset, int inp protected virtual void HashCore(ReadOnlySpan source) { + // Use ArrayPool.Shared instead of CryptoPool because the array is passed out. byte[] array = ArrayPool.Shared.Rent(source.Length); - try - { - source.CopyTo(array); - HashCore(array, 0, source.Length); - } - finally - { - Array.Clear(array, 0, source.Length); - ArrayPool.Shared.Return(array); - } + source.CopyTo(array); + HashCore(array, 0, source.Length); + Array.Clear(array, 0, source.Length); + ArrayPool.Shared.Return(array); } protected virtual bool TryHashFinal(Span destination, out int bytesWritten) diff --git a/src/System.Security.Cryptography.X509Certificates/src/Internal/Cryptography/Pal.Unix/CrlCache.cs b/src/System.Security.Cryptography.X509Certificates/src/Internal/Cryptography/Pal.Unix/CrlCache.cs index 3192bd6187b1..e1c8262f41ef 100644 --- a/src/System.Security.Cryptography.X509Certificates/src/Internal/Cryptography/Pal.Unix/CrlCache.cs +++ b/src/System.Security.Cryptography.X509Certificates/src/Internal/Cryptography/Pal.Unix/CrlCache.cs @@ -244,7 +244,8 @@ private static string GetCdpUrl(SafeX509Handle cert) } finally { - ArrayPool.Shared.Return(crlDistributionPoints.Array); + // The data came from a certificate, so it's public. + CryptoPool.Return(crlDistributionPoints.Array, clearSize: 0); } return null; diff --git a/src/System.Security.Cryptography.X509Certificates/src/Internal/Cryptography/Pal.Unix/OpenSslX509ChainProcessor.cs b/src/System.Security.Cryptography.X509Certificates/src/Internal/Cryptography/Pal.Unix/OpenSslX509ChainProcessor.cs index 8037861a7fef..314cc3e0bdf4 100644 --- a/src/System.Security.Cryptography.X509Certificates/src/Internal/Cryptography/Pal.Unix/OpenSslX509ChainProcessor.cs +++ b/src/System.Security.Cryptography.X509Certificates/src/Internal/Cryptography/Pal.Unix/OpenSslX509ChainProcessor.cs @@ -6,6 +6,7 @@ using System.Buffers; using System.Collections.Generic; using System.Diagnostics; +using System.Runtime.InteropServices; using System.Security.Cryptography; using System.Security.Cryptography.Asn1; using System.Security.Cryptography.X509Certificates; @@ -203,7 +204,7 @@ internal Interop.Crypto.X509VerifyStatusCode FindChainViaAia( ref _remainingDownloadTime); // The AIA record is contained in a public structure, so no need to clear it. - ArrayPool.Shared.Return(authorityInformationAccess.Array); + CryptoPool.Return(authorityInformationAccess.Array, clearSize: 0); if (downloaded == null) { @@ -229,7 +230,7 @@ internal Interop.Crypto.X509VerifyStatusCode FindChainViaAia( { int chainSize = Interop.Crypto.GetX509StackFieldCount(chainStack); Span tempChain = stackalloc IntPtr[DefaultChainCapacity]; - IntPtr[] tempChainRent = null; + byte[] tempChainRent = null; if (chainSize <= tempChain.Length) { @@ -237,8 +238,9 @@ internal Interop.Crypto.X509VerifyStatusCode FindChainViaAia( } else { - tempChainRent = ArrayPool.Shared.Rent(chainSize); - tempChain = tempChainRent.AsSpan(0, chainSize); + int targetSize = checked(chainSize * IntPtr.Size); + tempChainRent = CryptoPool.Rent(targetSize); + tempChain = MemoryMarshal.Cast(tempChainRent.AsSpan(0, targetSize)); } for (int i = 0; i < chainSize; i++) @@ -276,10 +278,7 @@ internal Interop.Crypto.X509VerifyStatusCode FindChainViaAia( if (tempChainRent != null) { - // While the IntPtrs aren't secret, clearing them helps prevent - // accidental use-after-free because of pooling. - tempChain.Clear(); - ArrayPool.Shared.Return(tempChainRent); + CryptoPool.Return(tempChainRent); } } } @@ -450,7 +449,7 @@ private Interop.Crypto.X509VerifyStatusCode CheckOcsp() string requestUrl = UrlPathAppend(baseUri, urlEncoded); // Nothing sensitive is in the encoded request (it was sent via HTTP-non-S) - ArrayPool.Shared.Return(encoded.Array); + CryptoPool.Return(encoded.Array, clearSize: 0); ArrayPool.Shared.Return(urlEncoded.Array); // https://tools.ietf.org/html/rfc6960#appendix-A describes both a GET and a POST @@ -855,7 +854,7 @@ private static string GetOcspEndpoint(SafeX509Handle cert) } string baseUrl = FindHttpAiaRecord(authorityInformationAccess, Oids.OcspEndpoint); - ArrayPool.Shared.Return(authorityInformationAccess.Array); + CryptoPool.Return(authorityInformationAccess.Array, clearSize: 0); return baseUrl; } @@ -984,6 +983,7 @@ internal int VerifyCallback(int ok, IntPtr ctx) if (_errors == null) { int size = Math.Max(DefaultChainCapacity, errorDepth + 1); + // Since ErrorCollection is a non-public type, this is a private pool. _errors = ArrayPool.Shared.Rent(size); // We only do spares writes. diff --git a/src/System.Security.Cryptography.X509Certificates/src/System.Security.Cryptography.X509Certificates.csproj b/src/System.Security.Cryptography.X509Certificates/src/System.Security.Cryptography.X509Certificates.csproj index 182cb686ed9f..03be02269b54 100644 --- a/src/System.Security.Cryptography.X509Certificates/src/System.Security.Cryptography.X509Certificates.csproj +++ b/src/System.Security.Cryptography.X509Certificates/src/System.Security.Cryptography.X509Certificates.csproj @@ -18,6 +18,9 @@ Common\System\Memory\PointerMemoryManager.cs + + Common\System\Security\Cryptography\CryptoPool.cs + Common\System\Security\Cryptography\Oids.cs @@ -407,6 +410,9 @@ Common\Interop\Unix\System.Security.Cryptography.Native\Interop.Crypto.cs + + Common\Interop\Unix\System.Security.Cryptography.Native\Interop.PooledCrypto.cs + Common\Microsoft\Win32\SafeHandles\Asn1SafeHandles.Unix.cs From 71487a4a5bf7c0043cca4672ff3352c098dabd8c Mon Sep 17 00:00:00 2001 From: Steve Harter Date: Fri, 17 May 2019 07:56:47 -0700 Subject: [PATCH 394/607] Add extension data support to Json serializer (#37690) --- src/System.Text.Json/ref/System.Text.Json.cs | 5 + .../src/Resources/Strings.resx | 15 + .../src/System.Text.Json.csproj | 13 +- .../src/System/Text/Json/JsonHelpers.cs | 14 + .../JsonClassInfo.AddProperty.cs | 14 +- .../Text/Json/Serialization/JsonClassInfo.cs | 118 +++++--- .../JsonExtensionDataAttribute.cs | 20 ++ .../Json/Serialization/JsonPropertyInfo.cs | 182 ++++++------ .../Serialization/JsonPropertyInfoCommon.cs | 15 +- .../JsonPropertyInfoNotNullable.cs | 101 +++---- .../Serialization/JsonPropertyInfoNullable.cs | 59 ++-- .../JsonSerializer.Read.HandleArray.cs | 56 ++-- .../JsonSerializer.Read.HandleDictionary.cs | 95 +++++++ .../JsonSerializer.Read.HandleNull.cs | 11 +- .../JsonSerializer.Read.HandleObject.cs | 72 +---- .../JsonSerializer.Read.HandlePropertyName.cs | 131 +++++++++ .../JsonSerializer.Read.HandleValue.cs | 2 +- .../Json/Serialization/JsonSerializer.Read.cs | 74 ++--- .../JsonSerializer.Write.HandleDictionary.cs | 76 ++--- .../JsonSerializer.Write.HandleEnumerable.cs | 9 +- .../JsonSerializer.Write.HandleObject.cs | 10 +- .../Text/Json/Serialization/ReadStack.cs | 4 +- .../Text/Json/Serialization/ReadStackFrame.cs | 58 ++-- .../Json/Serialization/WriteStackFrame.cs | 4 +- .../Text/Json/ThrowHelper.Serialization.cs | 42 ++- .../src/System/Text/Json/ThrowHelper.cs | 2 +- .../tests/Serialization/Array.ReadTests.cs | 36 ++- .../tests/Serialization/Array.WriteTests.cs | 2 - .../tests/Serialization/DictionaryTests.cs | 70 ++++- .../tests/Serialization/ExtensionDataTests.cs | 266 ++++++++++++++++++ .../tests/Serialization/OptionsTests.cs | 48 ++++ .../Serialization/PropertyVisibilityTests.cs | 10 +- .../tests/Serialization/TestClasses.cs | 9 + .../tests/System.Text.Json.Tests.csproj | 1 + 34 files changed, 1172 insertions(+), 472 deletions(-) create mode 100644 src/System.Text.Json/src/System/Text/Json/Serialization/JsonExtensionDataAttribute.cs create mode 100644 src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleDictionary.cs create mode 100644 src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandlePropertyName.cs create mode 100644 src/System.Text.Json/tests/Serialization/ExtensionDataTests.cs diff --git a/src/System.Text.Json/ref/System.Text.Json.cs b/src/System.Text.Json/ref/System.Text.Json.cs index fe1345d3610b..47fbbcbf1815 100644 --- a/src/System.Text.Json/ref/System.Text.Json.cs +++ b/src/System.Text.Json/ref/System.Text.Json.cs @@ -351,6 +351,11 @@ public abstract partial class JsonAttribute : System.Attribute protected JsonAttribute() { } } [System.AttributeUsageAttribute(System.AttributeTargets.Property, AllowMultiple=false)] + public sealed partial class JsonExtensionDataAttribute : System.Text.Json.Serialization.JsonAttribute + { + public JsonExtensionDataAttribute() { } + } + [System.AttributeUsageAttribute(System.AttributeTargets.Property, AllowMultiple=false)] public sealed partial class JsonIgnoreAttribute : System.Text.Json.Serialization.JsonAttribute { public JsonIgnoreAttribute() { } diff --git a/src/System.Text.Json/src/Resources/Strings.resx b/src/System.Text.Json/src/Resources/Strings.resx index dc3eb4a08e31..52c72c4dfd5f 100644 --- a/src/System.Text.Json/src/Resources/Strings.resx +++ b/src/System.Text.Json/src/Resources/Strings.resx @@ -342,4 +342,19 @@ Deserialization of type {0} is not supported. + + The data extension property '{0}.{1}' does not match the required signature of IDictionary<string, JsonElement> or IDictionary<string, object>. + + + A class cannot have more than one property that has the attribute '{0}'. + + + The collection type '{0}' is not supported. + + + The data extension property '{0}.{1}' cannot contain dictionary values of type '{2}'. Dictionary values must be of type JsonElement. + + + The collection type '{0}' on '{1}' is not supported. + \ No newline at end of file diff --git a/src/System.Text.Json/src/System.Text.Json.csproj b/src/System.Text.Json/src/System.Text.Json.csproj index 15106dc2c4a2..04c2ed9ed43e 100644 --- a/src/System.Text.Json/src/System.Text.Json.csproj +++ b/src/System.Text.Json/src/System.Text.Json.csproj @@ -76,6 +76,7 @@ + @@ -84,21 +85,23 @@ + + + + - - - - - + + + diff --git a/src/System.Text.Json/src/System/Text/Json/JsonHelpers.cs b/src/System.Text.Json/src/System/Text/Json/JsonHelpers.cs index 251fe2925e69..4485067ac04b 100644 --- a/src/System.Text.Json/src/System/Text/Json/JsonHelpers.cs +++ b/src/System.Text.Json/src/System/Text/Json/JsonHelpers.cs @@ -77,5 +77,19 @@ public static bool IsInRangeInclusive(JsonTokenType value, JsonTokenType lowerBo /// Otherwise, returns . /// public static bool IsDigit(byte value) => (uint)(value - '0') <= '9' - '0'; + + /// + /// Calls Encoding.UTF8.GetString that supports netstandard. + /// + /// The utf8 bytes to convert. + /// + internal static string Utf8GetString(ReadOnlySpan bytes) + { + return Encoding.UTF8.GetString(bytes +#if netstandard + .ToArray() +#endif + ); + } } } diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonClassInfo.AddProperty.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonClassInfo.AddProperty.cs index 05b9ca1df630..c7578485d6c6 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonClassInfo.AddProperty.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonClassInfo.AddProperty.cs @@ -54,13 +54,19 @@ private JsonPropertyInfo AddProperty(Type propertyType, PropertyInfo propertyInf internal static JsonPropertyInfo CreateProperty(Type declaredPropertyType, Type runtimePropertyType, PropertyInfo propertyInfo, Type parentClassType, JsonSerializerOptions options) { + bool hasIgnoreAttribute = (JsonPropertyInfo.GetAttribute(propertyInfo) != null); + if (hasIgnoreAttribute) + { + return JsonPropertyInfo.CreateIgnoredPropertyPlaceholder(propertyInfo, options); + } + Type collectionElementType = null; switch (GetClassType(runtimePropertyType)) { case ClassType.Enumerable: case ClassType.Dictionary: case ClassType.Unknown: - collectionElementType = GetElementType(runtimePropertyType); + collectionElementType = GetElementType(runtimePropertyType, parentClassType, propertyInfo); break; } @@ -79,10 +85,12 @@ internal static JsonPropertyInfo CreateProperty(Type declaredPropertyType, Type JsonPropertyInfo jsonInfo = (JsonPropertyInfo)Activator.CreateInstance( propertyInfoClassType, BindingFlags.Instance | BindingFlags.Public, - binder: null, - new object[] { parentClassType, declaredPropertyType, runtimePropertyType, propertyInfo, collectionElementType, options }, + binder: null, + args: null, culture: null); + jsonInfo.Initialize(parentClassType, declaredPropertyType, runtimePropertyType, propertyInfo, collectionElementType, options); + return jsonInfo; } diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonClassInfo.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonClassInfo.cs index 8b53fce55fec..d993307846e6 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonClassInfo.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonClassInfo.cs @@ -11,7 +11,7 @@ namespace System.Text.Json.Serialization { - [DebuggerDisplay("ClassType.{ClassType} {Type.Name}")] + [DebuggerDisplay("ClassType.{ClassType}, {Type.Name}")] internal sealed partial class JsonClassInfo { // The length of the property name embedded in the key (in bytes). @@ -27,6 +27,8 @@ internal sealed partial class JsonClassInfo internal ClassType ClassType { get; private set; } + public JsonPropertyInfo DataExtensionProperty { get; private set; } + // If enumerable, the JsonClassInfo for the element type. internal JsonClassInfo ElementClassInfo { get; private set; } @@ -38,6 +40,8 @@ internal void UpdateSortedPropertyCache(ref ReadStackFrame frame) // Todo: when using PropertyNameCaseInsensitive we also need to use the hashtable with case-insensitive // comparison to handle Turkish etc. cultures properly. + Debug.Assert(_propertyRefs != null); + // Set the sorted property cache. Overwrite any existing cache which can occur in multi-threaded cases. if (frame.PropertyRefCache != null) { @@ -51,9 +55,9 @@ internal void UpdateSortedPropertyCache(ref ReadStackFrame frame) for (int iProperty = 0; iProperty < _propertyRefs.Count; iProperty++) { PropertyRef propertyRef = _propertyRefs[iProperty]; - bool found = false; int iCacheProperty = 0; + for (; iCacheProperty < cache.Count; iCacheProperty++) { if (IsPropertyRefEqual(ref propertyRef, cache[iCacheProperty])) @@ -99,10 +103,7 @@ internal JsonClassInfo(Type type, JsonSerializerOptions options) { JsonPropertyInfo jsonPropertyInfo = AddProperty(propertyInfo.PropertyType, propertyInfo, type, options); - if (jsonPropertyInfo.NameAsString == null) - { - ThrowHelper.ThrowInvalidOperationException_SerializerPropertyNameNull(this, jsonPropertyInfo); - } + Debug.Assert(jsonPropertyInfo.NameUsedToCompareAsString != null); // If the JsonPropertyNameAttribute or naming policy results in collisions, throw an exception. if (!propertyNames.Add(jsonPropertyInfo.NameUsedToCompareAsString)) @@ -113,7 +114,10 @@ internal JsonClassInfo(Type type, JsonSerializerOptions options) jsonPropertyInfo.ClearUnusedValuesAfterAdd(); } } + + DetermineExtensionDataProperty(); break; + case ClassType.Enumerable: case ClassType.Dictionary: // Add a single property that maps to the class type so we can have policies applied. @@ -123,7 +127,7 @@ internal JsonClassInfo(Type type, JsonSerializerOptions options) CreateObject = options.ClassMaterializerStrategy.CreateConstructor(policyProperty.RuntimePropertyType); // Create a ClassInfo that maps to the element type which is used for (de)serialization and policies. - Type elementType = GetElementType(type); + Type elementType = GetElementType(type, parentType : null, memberInfo: null); ElementClassInfo = options.GetOrAddClass(elementType); break; case ClassType.Value: @@ -137,12 +141,53 @@ internal JsonClassInfo(Type type, JsonSerializerOptions options) } } + private void DetermineExtensionDataProperty() + { + JsonPropertyInfo jsonPropertyInfo = GetPropertyThatHasAttribute(typeof(JsonExtensionDataAttribute)); + if (jsonPropertyInfo != null) + { + Type declaredPropertyType = jsonPropertyInfo.DeclaredPropertyType; + if (!typeof(IDictionary).IsAssignableFrom(declaredPropertyType) && + !typeof(IDictionary).IsAssignableFrom(declaredPropertyType)) + { + ThrowHelper.ThrowInvalidOperationException_SerializationDataExtensionPropertyInvalid(this, jsonPropertyInfo); + } + + DataExtensionProperty = jsonPropertyInfo; + } + } + + private JsonPropertyInfo GetPropertyThatHasAttribute(Type attributeType) + { + Debug.Assert(_propertyRefs != null); + + JsonPropertyInfo property = null; + + for (int iProperty = 0; iProperty < _propertyRefs.Count; iProperty++) + { + PropertyRef propertyRef = _propertyRefs[iProperty]; + JsonPropertyInfo jsonPropertyInfo = propertyRef.Info; + Attribute attribute = jsonPropertyInfo.PropertyInfo.GetCustomAttribute(attributeType); + if (attribute != null) + { + if (property != null) + { + ThrowHelper.ThrowInvalidOperationException_SerializationDuplicateAttribute(attributeType); + } + + property = jsonPropertyInfo; + } + } + + return property; + } + internal JsonPropertyInfo GetProperty(JsonSerializerOptions options, ReadOnlySpan propertyName, ref ReadStackFrame frame) { // If we should compare with case-insensitive, normalize to an uppercase format since that is what is cached on the propertyInfo. if (options.PropertyNameCaseInsensitive) { - string utf16PropertyName = Encoding.UTF8.GetString(propertyName.ToArray()); + string utf16PropertyName = JsonHelpers.Utf8GetString(propertyName); string upper = utf16PropertyName.ToUpperInvariant(); propertyName = Encoding.UTF8.GetBytes(upper); } @@ -200,10 +245,9 @@ internal JsonPropertyInfo GetProperty(JsonSerializerOptions options, ReadOnlySpa if (!hasPropertyCache) { - if (propertyIndex == 0) + if (propertyIndex == 0 && frame.PropertyRefCache == null) { // Create the temporary list on first property access to prevent a partially filled List. - Debug.Assert(frame.PropertyRefCache == null); frame.PropertyRefCache = new List(); } @@ -258,7 +302,7 @@ private static bool IsPropertyRefEqual(ref PropertyRef propertyRef, PropertyRef if (propertyRef.Key == other.Key) { if (propertyRef.Info.Name.Length <= PropertyNameKeyLength || - propertyRef.Info.Name.SequenceEqual(other.Info.Name)) + propertyRef.Info.Name.AsSpan().SequenceEqual(other.Info.Name.AsSpan())) { return true; } @@ -308,37 +352,41 @@ private static ulong GetKey(ReadOnlySpan propertyName) return key; } - public static Type GetElementType(Type propertyType) + // Return the element type of the IEnumerable, or return null if not an IEnumerable. + public static Type GetElementType(Type propertyType, Type parentType, MemberInfo memberInfo) { - Type elementType = null; - if (typeof(IEnumerable).IsAssignableFrom(propertyType)) + if (!typeof(IEnumerable).IsAssignableFrom(propertyType)) + { + return null; + } + + // Check for Array. + Type elementType = propertyType.GetElementType(); + if (elementType != null) + { + return elementType; + } + + // Check for Dictionary or IEnumerable + if (propertyType.IsGenericType) { - elementType = propertyType.GetElementType(); - if (elementType == null) + Type[] args = propertyType.GetGenericArguments(); + ClassType classType = GetClassType(propertyType); + + if (classType == ClassType.Dictionary && + args.Length >= 2 && // It is >= 2 in case there is a IDictionary. + args[0].UnderlyingSystemType == typeof(string)) { - Type[] args = propertyType.GetGenericArguments(); + return args[1]; + } - if (propertyType.IsGenericType) - { - if (GetClassType(propertyType) == ClassType.Dictionary && - args.Length >= 2) // It is >= 2 in case there is a Dictionary. - { - elementType = args[1]; - } - else if (GetClassType(propertyType) == ClassType.Enumerable && args.Length >= 1) // It is >= 1 in case there is an IEnumerable. - { - elementType = args[0]; - } - } - else - { - // Unable to determine collection type; attempt to use object which will be used to create loosely-typed collection. - elementType = typeof(object); - } + if (classType == ClassType.Enumerable && args.Length >= 1) // It is >= 1 in case there is an IEnumerable. + { + return args[0]; } } - return elementType; + throw ThrowHelper.GetNotSupportedException_SerializationNotSupportedCollection(propertyType, parentType, memberInfo); } internal static ClassType GetClassType(Type type) diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonExtensionDataAttribute.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonExtensionDataAttribute.cs new file mode 100644 index 000000000000..9e6dcd80118a --- /dev/null +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonExtensionDataAttribute.cs @@ -0,0 +1,20 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +namespace System.Text.Json.Serialization +{ + /// + /// When placed on a property of type , any + /// properties that do not have a matching member are added to that Dictionary during deserialization and written during serialization. + /// + /// + /// The TKey value must be and TValue must be or . + /// If there is more than one extension property on a type, or it the property is not of the correct type, + /// an is thrown during the first serialization or deserialization of that type. + /// + [AttributeUsage(AttributeTargets.Property, AllowMultiple = false)] + public sealed class JsonExtensionDataAttribute : JsonAttribute + { + } +} diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfo.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfo.cs index 8c429bc4d722..6160df0ffb5f 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfo.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfo.cs @@ -11,7 +11,7 @@ namespace System.Text.Json.Serialization { - [DebuggerDisplay("{PropertyInfo}")] + [DebuggerDisplay("PropertyInfo={PropertyInfo}, Element={ElementClassInfo}")] internal abstract class JsonPropertyInfo { // Cache the converters so they don't get created for every enumerable property. @@ -20,35 +20,33 @@ internal abstract class JsonPropertyInfo private static readonly JsonEnumerableConverter s_jsonIEnumerableConstuctibleConverter = new DefaultIEnumerableConstructibleConverter(); private static readonly JsonEnumerableConverter s_jsonImmutableConverter = new DefaultImmutableConverter(); + public static readonly JsonPropertyInfo s_missingProperty = new JsonPropertyInfoNotNullable(); + public ClassType ClassType; // The name of the property with any casing policy or the name specified from JsonPropertyNameAttribute. - private byte[] _name { get; set; } - public ReadOnlySpan Name => _name; + public byte[] Name { get; private set; } public string NameAsString { get; private set; } // Used to support case-insensitive comparison - private byte[] _nameUsedToCompare { get; set; } - public ReadOnlySpan NameUsedToCompare => _nameUsedToCompare; + public byte[] NameUsedToCompare { get; private set; } public string NameUsedToCompareAsString { get; private set; } // The escaped name passed to the writer. - public byte[] _escapedName { get; private set; } + public byte[] EscapedName { get; private set; } public bool HasGetter { get; set; } public bool HasSetter { get; set; } public bool ShouldSerialize { get; private set; } public bool ShouldDeserialize { get; private set; } + public bool IsPropertyPolicy {get; protected set;} public bool IgnoreNullValues { get; private set; } // todo: to minimize hashtable lookups, cache JsonClassInfo: //public JsonClassInfo ClassInfo; - // Constructor used for internal identifiers - public JsonPropertyInfo() { } - - public JsonPropertyInfo( + public virtual void Initialize( Type parentClassType, Type declaredPropertyType, Type runtimePropertyType, @@ -94,100 +92,95 @@ public virtual void GetPolicies(JsonSerializerOptions options) private void DeterminePropertyName(JsonSerializerOptions options) { - if (PropertyInfo != null) + if (PropertyInfo == null) { - JsonPropertyNameAttribute nameAttribute = GetAttribute(); - if (nameAttribute != null) - { - NameAsString = nameAttribute.Name; + return; + } - // null is not valid; JsonClassInfo throws an InvalidOperationException after this return. - if (NameAsString == null) - { - return; - } - } - else if (options.PropertyNamingPolicy != null) + JsonPropertyNameAttribute nameAttribute = GetAttribute(PropertyInfo); + if (nameAttribute != null) + { + string name = nameAttribute.Name; + if (name == null) { - NameAsString = options.PropertyNamingPolicy.ConvertName(PropertyInfo.Name); - - // null is not valid; JsonClassInfo throws an InvalidOperationException after this return. - if (NameAsString == null) - { - return; - } + ThrowHelper.ThrowInvalidOperationException_SerializerPropertyNameNull(ParentClassType, this); } - else + + NameAsString = name; + } + else if (options.PropertyNamingPolicy != null) + { + string name = options.PropertyNamingPolicy.ConvertName(PropertyInfo.Name); + if (name == null) { - NameAsString = PropertyInfo.Name; + ThrowHelper.ThrowInvalidOperationException_SerializerPropertyNameNull(ParentClassType, this); } - // At this point propertyName is valid UTF16, so just call the simple UTF16->UTF8 encoder. - _name = Encoding.UTF8.GetBytes(NameAsString); + NameAsString = name; + } + else + { + NameAsString = PropertyInfo.Name; + } - // Set the compare name. - if (options.PropertyNameCaseInsensitive) - { - NameUsedToCompareAsString = NameAsString.ToUpperInvariant(); - _nameUsedToCompare = Encoding.UTF8.GetBytes(NameUsedToCompareAsString); - } - else - { - NameUsedToCompareAsString = NameAsString; - _nameUsedToCompare = _name; - } + Debug.Assert(NameAsString != null); + + // At this point propertyName is valid UTF16, so just call the simple UTF16->UTF8 encoder. + Name = Encoding.UTF8.GetBytes(NameAsString); - // Cache the escaped name. + // Set the compare name. + if (options.PropertyNameCaseInsensitive) + { + NameUsedToCompareAsString = NameAsString.ToUpperInvariant(); + NameUsedToCompare = Encoding.UTF8.GetBytes(NameUsedToCompareAsString); + } + else + { + NameUsedToCompareAsString = NameAsString; + NameUsedToCompare = Name; + } + + // Cache the escaped name. #if true - // temporary behavior until the writer can accept escaped string. - _escapedName = _name; + // temporary behavior until the writer can accept escaped string. + EscapedName = Name; #else - - int valueIdx = JsonWriterHelper.NeedsEscaping(_name); - if (valueIdx == -1) - { - _escapedName = _name; - } - else - { - byte[] pooledName = null; - int length = JsonWriterHelper.GetMaxEscapedLength(_name.Length, valueIdx); + int valueIdx = JsonWriterHelper.NeedsEscaping(_name); + if (valueIdx == -1) + { + _escapedName = _name; + } + else + { + byte[] pooledName = null; + int length = JsonWriterHelper.GetMaxEscapedLength(_name.Length, valueIdx); - Span escapedName = length <= JsonConstants.StackallocThreshold ? - stackalloc byte[length] : - (pooledName = ArrayPool.Shared.Rent(length)); + Span escapedName = length <= JsonConstants.StackallocThreshold ? + stackalloc byte[length] : + (pooledName = ArrayPool.Shared.Rent(length)); - JsonWriterHelper.EscapeString(_name, escapedName, 0, out int written); + JsonWriterHelper.EscapeString(_name, escapedName, 0, out int written); - _escapedName = escapedName.Slice(0, written).ToArray(); + _escapedName = escapedName.Slice(0, written).ToArray(); - if (pooledName != null) - { - // We clear the array because it is "user data" (although a property name). - new Span(pooledName, 0, written).Clear(); - ArrayPool.Shared.Return(pooledName); - } + if (pooledName != null) + { + // We clear the array because it is "user data" (although a property name). + new Span(pooledName, 0, written).Clear(); + ArrayPool.Shared.Return(pooledName); } -#endif } +#endif } private void DetermineSerializationCapabilities(JsonSerializerOptions options) { - bool hasIgnoreAttribute = (GetAttribute() != null); - - if (hasIgnoreAttribute) - { - // We don't serialize or deserialize. - return; - } - - if (ClassType != ClassType.Enumerable) + if (ClassType != ClassType.Enumerable && ClassType != ClassType.Dictionary) { - // We serialize if there is a getter + no [Ignore] attribute + not ignoring readonly properties. + // We serialize if there is a getter + not ignoring readonly properties. ShouldSerialize = HasGetter && (HasSetter || !options.IgnoreReadOnlyProperties); - // We deserialize if there is a setter + no [Ignore] attribute. + // We deserialize if there is a setter. ShouldDeserialize = HasSetter; } else @@ -198,7 +191,8 @@ private void DetermineSerializationCapabilities(JsonSerializerOptions options) { ShouldDeserialize = true; } - else if (RuntimePropertyType.IsAssignableFrom(typeof(IList))) + else if (!RuntimePropertyType.IsArray && + (typeof(IList).IsAssignableFrom(RuntimePropertyType) || typeof(IDictionary).IsAssignableFrom(RuntimePropertyType))) { ShouldDeserialize = true; } @@ -218,7 +212,7 @@ private void DetermineSerializationCapabilities(JsonSerializerOptions options) } else if (typeof(IEnumerable).IsAssignableFrom(RuntimePropertyType)) { - Type elementType = JsonClassInfo.GetElementType(RuntimePropertyType); + Type elementType = JsonClassInfo.GetElementType(RuntimePropertyType, ParentClassType, PropertyInfo); // If the property type only has interface(s) exposed by JsonEnumerableT then use JsonEnumerableT as the converter. if (RuntimePropertyType.IsAssignableFrom(typeof(JsonEnumerableT<>).MakeGenericType(elementType))) @@ -260,16 +254,30 @@ public void ClearUnusedValuesAfterAdd() // Copy any settings defined at run-time to the new property. public void CopyRuntimeSettingsTo(JsonPropertyInfo other) { - other._name = _name; - other._nameUsedToCompare = _nameUsedToCompare; - other._escapedName = _escapedName; + other.Name = Name; + other.NameUsedToCompare = NameUsedToCompare; + other.EscapedName = EscapedName; + } + + // Create a property that is either ignored at run-time. It uses typeof(int) in order to prevent + // issues with unsupported types and helps ensure we don't accidently (de)serialize it. + public static JsonPropertyInfo CreateIgnoredPropertyPlaceholder(PropertyInfo propertyInfo, JsonSerializerOptions options) + { + JsonPropertyInfo jsonPropertyInfo = new JsonPropertyInfoNotNullable(); + jsonPropertyInfo.PropertyInfo = propertyInfo; + jsonPropertyInfo.DeterminePropertyName(options); + + Debug.Assert(!jsonPropertyInfo.ShouldDeserialize); + Debug.Assert(!jsonPropertyInfo.ShouldSerialize); + + return jsonPropertyInfo; } public abstract object GetValueAsObject(object obj); - public TAttribute GetAttribute() where TAttribute : Attribute + public static TAttribute GetAttribute(PropertyInfo propertyInfo) where TAttribute : Attribute { - return (TAttribute)PropertyInfo?.GetCustomAttribute(typeof(TAttribute), inherit: false); + return (TAttribute)propertyInfo?.GetCustomAttribute(typeof(TAttribute), inherit: false); } public abstract IEnumerable CreateImmutableCollectionFromList(string delegateKey, IList sourceList); diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfoCommon.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfoCommon.cs index 708f2d9545c8..ba674275cb92 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfoCommon.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfoCommon.cs @@ -16,24 +16,21 @@ namespace System.Text.Json.Serialization /// internal abstract class JsonPropertyInfoCommon : JsonPropertyInfo { - public bool _isPropertyPolicy; public Func Get { get; private set; } public Action Set { get; private set; } public JsonValueConverter ValueConverter { get; internal set; } - // Constructor used for internal identifiers - public JsonPropertyInfoCommon() { } - - public JsonPropertyInfoCommon( + public override void Initialize( Type parentClassType, Type declaredPropertyType, Type runtimePropertyType, PropertyInfo propertyInfo, Type elementType, - JsonSerializerOptions options) : - base(parentClassType, declaredPropertyType, runtimePropertyType, propertyInfo, elementType, options) + JsonSerializerOptions options) { + base.Initialize(parentClassType, declaredPropertyType, runtimePropertyType, propertyInfo, elementType, options); + if (propertyInfo != null) { if (propertyInfo.GetMethod?.IsPublic == true) @@ -50,7 +47,7 @@ public JsonPropertyInfoCommon( } else { - _isPropertyPolicy = true; + IsPropertyPolicy = true; HasGetter = true; HasSetter = true; ValueConverter = DefaultConverters.s_converter; @@ -67,7 +64,7 @@ public override void GetPolicies(JsonSerializerOptions options) public override object GetValueAsObject(object obj) { - if (_isPropertyPolicy) + if (IsPropertyPolicy) { return obj; } diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfoNotNullable.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfoNotNullable.cs index 9c95b56bb060..fa326d04a41b 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfoNotNullable.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfoNotNullable.cs @@ -4,7 +4,6 @@ using System.Collections.Generic; using System.Diagnostics; -using System.Reflection; namespace System.Text.Json.Serialization { @@ -15,48 +14,33 @@ internal sealed class JsonPropertyInfoNotNullable where TRuntimeProperty : TDeclaredProperty { - // Constructor used for internal identifiers - public JsonPropertyInfoNotNullable() { } - - public JsonPropertyInfoNotNullable( - Type parentClassType, - Type declaredPropertyType, - Type runtimePropertyType, - PropertyInfo propertyInfo, - Type elementType, - JsonSerializerOptions options) : - base(parentClassType, declaredPropertyType, runtimePropertyType, propertyInfo, elementType, options) - { - } - public override void Read(JsonTokenType tokenType, JsonSerializerOptions options, ref ReadStack state, ref Utf8JsonReader reader) { + Debug.Assert(ShouldDeserialize); + if (ElementClassInfo != null) { // Forward the setter to the value-based JsonPropertyInfo. JsonPropertyInfo propertyInfo = ElementClassInfo.GetPolicyProperty(); propertyInfo.ReadEnumerable(tokenType, options, ref state, ref reader); } - else if (ShouldDeserialize) + else { - if (ValueConverter != null) + if (ValueConverter != null && ValueConverter.TryRead(RuntimePropertyType, ref reader, out TRuntimeProperty value)) { - if (ValueConverter.TryRead(RuntimePropertyType, ref reader, out TRuntimeProperty value)) + if (state.Current.ReturnValue == null) { - if (state.Current.ReturnValue == null) - { - state.Current.ReturnValue = value; - } - else - { - // Null values were already handled. - Debug.Assert(value != null); - - Set((TClass)state.Current.ReturnValue, value); - } - - return; + state.Current.ReturnValue = value; } + else + { + // Null values were already handled. + Debug.Assert(value != null); + + Set((TClass)state.Current.ReturnValue, value); + } + + return; } ThrowHelper.ThrowJsonException_DeserializeUnableToConvertValue(RuntimePropertyType, reader, state.PropertyPath); @@ -66,61 +50,64 @@ public override void Read(JsonTokenType tokenType, JsonSerializerOptions options // If this method is changed, also change JsonPropertyInfoNullable.ReadEnumerable and JsonSerializer.ApplyObjectToEnumerable public override void ReadEnumerable(JsonTokenType tokenType, JsonSerializerOptions options, ref ReadStack state, ref Utf8JsonReader reader) { + Debug.Assert(ShouldDeserialize); + if (ValueConverter == null || !ValueConverter.TryRead(RuntimePropertyType, ref reader, out TRuntimeProperty value)) { ThrowHelper.ThrowJsonException_DeserializeUnableToConvertValue(RuntimePropertyType, reader, state.PropertyPath); return; } - JsonSerializer.ApplyValueToEnumerable(ref value, options, ref state, ref reader); + JsonSerializer.ApplyValueToEnumerable(ref value, ref state, ref reader); } public override void Write(JsonSerializerOptions options, ref WriteStackFrame current, Utf8JsonWriter writer) { Debug.Assert(current.Enumerator == null); + Debug.Assert(ShouldSerialize); - if (ShouldSerialize) + TRuntimeProperty value; + if (IsPropertyPolicy) { - TRuntimeProperty value; - if (_isPropertyPolicy) - { - value = (TRuntimeProperty)current.CurrentValue; - } - else + value = (TRuntimeProperty)current.CurrentValue; + } + else + { + value = (TRuntimeProperty)Get((TClass)current.CurrentValue); + } + + if (value == null) + { + Debug.Assert(EscapedName != null); + + if (!IgnoreNullValues) { - value = (TRuntimeProperty)Get((TClass)current.CurrentValue); + writer.WriteNull(EscapedName); } - - if (value == null) + } + else if (ValueConverter != null) + { + if (EscapedName != null) { - Debug.Assert(_escapedName != null); - - if (!IgnoreNullValues) - { - writer.WriteNull(_escapedName); - } + ValueConverter.Write(EscapedName, value, writer); } - else if (ValueConverter != null) + else { - if (_escapedName != null) - { - ValueConverter.Write(_escapedName, value, writer); - } - else - { - ValueConverter.Write(value, writer); - } + ValueConverter.Write(value, writer); } } } public override void WriteDictionary(JsonSerializerOptions options, ref WriteStackFrame current, Utf8JsonWriter writer) { + Debug.Assert(ShouldSerialize); JsonSerializer.WriteDictionary(ValueConverter, options, ref current, writer); } public override void WriteEnumerable(JsonSerializerOptions options, ref WriteStackFrame current, Utf8JsonWriter writer) { + Debug.Assert(ShouldSerialize); + if (ValueConverter != null) { Debug.Assert(current.Enumerator != null); diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfoNullable.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfoNullable.cs index e276e2942d6d..0a476b1910df 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfoNullable.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfoNullable.cs @@ -4,7 +4,6 @@ using System.Collections.Generic; using System.Diagnostics; -using System.Reflection; namespace System.Text.Json.Serialization { @@ -18,46 +17,32 @@ internal sealed class JsonPropertyInfoNullable // should this be cached somewhere else so that it's not populated per TClass as well as TProperty? private static readonly Type s_underlyingType = typeof(TProperty); - public JsonPropertyInfoNullable( - Type parentClassType, - Type declaredPropertyType, - Type runtimePropertyType, - PropertyInfo propertyInfo, - Type elementType, - JsonSerializerOptions options) : - base(parentClassType, declaredPropertyType, runtimePropertyType, propertyInfo, elementType, options) - { - } - public override void Read(JsonTokenType tokenType, JsonSerializerOptions options, ref ReadStack state, ref Utf8JsonReader reader) { Debug.Assert(ElementClassInfo == null); + Debug.Assert(ShouldDeserialize); - if (ShouldDeserialize) + if (ValueConverter != null && ValueConverter.TryRead(s_underlyingType, ref reader, out TProperty value)) { - if (ValueConverter != null) + if (state.Current.ReturnValue == null) { - if (ValueConverter.TryRead(s_underlyingType, ref reader, out TProperty value)) - { - if (state.Current.ReturnValue == null) - { - state.Current.ReturnValue = value; - } - else - { - Set((TClass)state.Current.ReturnValue, value); - } - - return; - } + state.Current.ReturnValue = value; + } + else + { + Set((TClass)state.Current.ReturnValue, value); } - ThrowHelper.ThrowJsonException_DeserializeUnableToConvertValue(RuntimePropertyType, reader, state.PropertyPath); + return; } + + ThrowHelper.ThrowJsonException_DeserializeUnableToConvertValue(RuntimePropertyType, reader, state.PropertyPath); } public override void ReadEnumerable(JsonTokenType tokenType, JsonSerializerOptions options, ref ReadStack state, ref Utf8JsonReader reader) { + Debug.Assert(ShouldDeserialize); + if (ValueConverter == null || !ValueConverter.TryRead(typeof(TProperty), ref reader, out TProperty value)) { ThrowHelper.ThrowJsonException_DeserializeUnableToConvertValue(RuntimePropertyType, reader, state.PropertyPath); @@ -65,21 +50,23 @@ public override void ReadEnumerable(JsonTokenType tokenType, JsonSerializerOptio } TProperty? nullableValue = new TProperty?(value); - JsonSerializer.ApplyValueToEnumerable(ref nullableValue, options, ref state, ref reader); + JsonSerializer.ApplyValueToEnumerable(ref nullableValue, ref state, ref reader); } public override void Write(JsonSerializerOptions options, ref WriteStackFrame current, Utf8JsonWriter writer) { + Debug.Assert(ShouldSerialize); + if (current.Enumerator != null) { // Forward the setter to the value-based JsonPropertyInfo. JsonPropertyInfo propertyInfo = ElementClassInfo.GetPolicyProperty(); propertyInfo.WriteEnumerable(options, ref current, writer); } - else if (ShouldSerialize) + else { TProperty? value; - if (_isPropertyPolicy) + if (IsPropertyPolicy) { value = (TProperty?)current.CurrentValue; } @@ -90,18 +77,18 @@ public override void Write(JsonSerializerOptions options, ref WriteStackFrame cu if (value == null) { - Debug.Assert(_escapedName != null); + Debug.Assert(EscapedName != null); if (!IgnoreNullValues) { - writer.WriteNull(_escapedName); + writer.WriteNull(EscapedName); } } else if (ValueConverter != null) { - if (_escapedName != null) + if (EscapedName != null) { - ValueConverter.Write(_escapedName, value.GetValueOrDefault(), writer); + ValueConverter.Write(EscapedName, value.GetValueOrDefault(), writer); } else { @@ -113,6 +100,8 @@ public override void Write(JsonSerializerOptions options, ref WriteStackFrame cu public override void WriteEnumerable(JsonSerializerOptions options, ref WriteStackFrame current, Utf8JsonWriter writer) { + Debug.Assert(ShouldSerialize); + if (ValueConverter != null) { Debug.Assert(current.Enumerator != null); diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleArray.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleArray.cs index b36dbdf366c7..8ff408cac76b 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleArray.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleArray.cs @@ -16,12 +16,9 @@ private static void HandleStartArray( ref Utf8JsonReader reader, ref ReadStack state) { - JsonPropertyInfo jsonPropertyInfo; + JsonPropertyInfo jsonPropertyInfo = state.Current.JsonPropertyInfo; - jsonPropertyInfo = state.Current.JsonPropertyInfo; - - bool skip = jsonPropertyInfo != null && !jsonPropertyInfo.ShouldDeserialize; - if (skip || state.Current.Skip()) + if (state.Current.SkipProperty) { // The array is not being applied to the object. state.Push(); @@ -38,27 +35,26 @@ private static void HandleStartArray( jsonPropertyInfo = state.Current.JsonClassInfo.CreatePolymorphicProperty(jsonPropertyInfo, typeof(object), options); } + // Verify that we don't have a multidimensional array. Type arrayType = jsonPropertyInfo.RuntimePropertyType; if (!typeof(IEnumerable).IsAssignableFrom(arrayType) || (arrayType.IsArray && arrayType.GetArrayRank() > 1)) { ThrowHelper.ThrowJsonException_DeserializeUnableToConvertValue(arrayType, reader, state.PropertyPath); } - Debug.Assert(state.Current.IsPropertyEnumerable || state.Current.IsDictionary); + Debug.Assert(state.Current.IsProcessingEnumerableOrDictionary); - if (state.Current.EnumerableCreated) + if (state.Current.PropertyInitialized) { // A nested json array so push a new stack frame. Type elementType = state.Current.JsonClassInfo.ElementClassInfo.GetPolicyProperty().RuntimePropertyType; state.Push(); - state.Current.Initialize(elementType, options); - state.Current.PopStackOnEnd = true; } else { - state.Current.EnumerableCreated = true; + state.Current.PropertyInitialized = true; } jsonPropertyInfo = state.Current.JsonPropertyInfo; @@ -85,8 +81,8 @@ private static void HandleStartArray( private static bool HandleEndArray( JsonSerializerOptions options, - ref ReadStack state, - ref Utf8JsonReader reader) + ref Utf8JsonReader reader, + ref ReadStack state) { bool lastFrame = state.IsLastFrame; @@ -99,7 +95,6 @@ private static bool HandleEndArray( IEnumerable value = ReadStackFrame.GetEnumerableValue(state.Current); bool setPropertyDirectly; - bool popStackOnEnd = state.Current.PopStackOnEnd; if (state.Current.TempEnumerableValues != null) { @@ -109,11 +104,9 @@ private static bool HandleEndArray( value = converter.CreateFromList(ref state, (IList)value, options); setPropertyDirectly = true; } - else if (!popStackOnEnd) + else if (state.Current.IsEnumerableProperty) { - Debug.Assert(state.Current.IsPropertyEnumerable); - - // We added the items to the list property already. + // We added the items to the list already. state.Current.ResetProperty(); return false; } @@ -122,11 +115,6 @@ private static bool HandleEndArray( setPropertyDirectly = false; } - if (popStackOnEnd) - { - state.Pop(); - } - if (lastFrame) { if (state.Current.ReturnValue == null) @@ -143,12 +131,15 @@ private static bool HandleEndArray( } // else there must be an outer object, so we'll return false here. } + else if (state.Current.IsEnumerable) + { + state.Pop(); + } - ApplyObjectToEnumerable(value, options, ref state, ref reader, setPropertyDirectly: setPropertyDirectly); + ApplyObjectToEnumerable(value, ref state, ref reader, setPropertyDirectly: setPropertyDirectly); - if (!popStackOnEnd) + if (state.Current.IsEnumerableProperty) { - Debug.Assert(state.Current.IsPropertyEnumerable); state.Current.ResetProperty(); } @@ -158,11 +149,12 @@ private static bool HandleEndArray( // If this method is changed, also change ApplyValueToEnumerable. internal static void ApplyObjectToEnumerable( object value, - JsonSerializerOptions options, ref ReadStack state, ref Utf8JsonReader reader, bool setPropertyDirectly = false) { + Debug.Assert(!state.Current.SkipProperty); + if (state.Current.IsEnumerable) { if (state.Current.TempEnumerableValues != null) @@ -174,7 +166,7 @@ internal static void ApplyObjectToEnumerable( ((IList)state.Current.ReturnValue).Add(value); } } - else if (!setPropertyDirectly && state.Current.IsPropertyEnumerable) + else if (!setPropertyDirectly && state.Current.IsEnumerableProperty) { Debug.Assert(state.Current.JsonPropertyInfo != null); Debug.Assert(state.Current.ReturnValue != null); @@ -189,10 +181,11 @@ internal static void ApplyObjectToEnumerable( list.Add(value); } } - else if (state.Current.IsDictionary) + else if (state.Current.IsDictionary || (state.Current.IsDictionaryProperty && !setPropertyDirectly)) { Debug.Assert(state.Current.ReturnValue != null); IDictionary dictionary = (IDictionary)state.Current.JsonPropertyInfo.GetValueAsObject(state.Current.ReturnValue); + string key = state.Current.KeyName; Debug.Assert(!string.IsNullOrEmpty(key)); if (!dictionary.Contains(key)) @@ -214,10 +207,11 @@ internal static void ApplyObjectToEnumerable( // If this method is changed, also change ApplyObjectToEnumerable. internal static void ApplyValueToEnumerable( ref TProperty value, - JsonSerializerOptions options, ref ReadStack state, ref Utf8JsonReader reader) { + Debug.Assert(!state.Current.SkipProperty); + if (state.Current.IsEnumerable) { if (state.Current.TempEnumerableValues != null) @@ -229,7 +223,7 @@ internal static void ApplyValueToEnumerable( ((IList)state.Current.ReturnValue).Add(value); } } - else if (state.Current.IsPropertyEnumerable) + else if (state.Current.IsEnumerableProperty) { Debug.Assert(state.Current.JsonPropertyInfo != null); Debug.Assert(state.Current.ReturnValue != null); @@ -244,7 +238,7 @@ internal static void ApplyValueToEnumerable( list.Add(value); } } - else if (state.Current.IsDictionary) + else if (state.Current.IsProcessingDictionary) { Debug.Assert(state.Current.ReturnValue != null); IDictionary dictionary = (IDictionary)state.Current.JsonPropertyInfo.GetValueAsObject(state.Current.ReturnValue); diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleDictionary.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleDictionary.cs new file mode 100644 index 000000000000..97540f55d25b --- /dev/null +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleDictionary.cs @@ -0,0 +1,95 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Collections; +using System.Diagnostics; + +namespace System.Text.Json.Serialization +{ + public static partial class JsonSerializer + { + private static void HandleStartDictionary(JsonSerializerOptions options, ref Utf8JsonReader reader, ref ReadStack state) + { + Debug.Assert(!state.Current.IsProcessingEnumerable); + + JsonPropertyInfo jsonPropertyInfo = state.Current.JsonPropertyInfo; + if (jsonPropertyInfo == null) + { + jsonPropertyInfo = state.Current.JsonClassInfo.CreateRootObject(options); + } + + Debug.Assert(jsonPropertyInfo != null); + + // A nested object or dictionary so push new frame. + if (state.Current.PropertyInitialized) + { + Debug.Assert(state.Current.IsDictionary); + + JsonClassInfo classInfoTemp = state.Current.JsonClassInfo; + state.Push(); + state.Current.JsonClassInfo = classInfoTemp.ElementClassInfo; + state.Current.InitializeJsonPropertyInfo(); + + ClassType classType = state.Current.JsonClassInfo.ClassType; + if (classType == ClassType.Value && + jsonPropertyInfo.ElementClassInfo.Type != typeof(object) && + jsonPropertyInfo.ElementClassInfo.Type != typeof(JsonElement)) + { + ThrowHelper.ThrowJsonException_DeserializeUnableToConvertValue(state.Current.JsonClassInfo.Type, reader, state.PropertyPath); + } + + JsonClassInfo classInfo = state.Current.JsonClassInfo; + state.Current.ReturnValue = classInfo.CreateObject(); + return; + } + + state.Current.PropertyInitialized = true; + + // If current property is already set (from a constructor, for example) leave as-is. + if (jsonPropertyInfo.GetValueAsObject(state.Current.ReturnValue) == null) + { + // Create the dictionary. + JsonClassInfo dictionaryClassInfo = options.GetOrAddClass(jsonPropertyInfo.RuntimePropertyType); + IDictionary value = (IDictionary)dictionaryClassInfo.CreateObject(); + if (value != null) + { + if (state.Current.ReturnValue != null) + { + state.Current.JsonPropertyInfo.SetValueAsObject(state.Current.ReturnValue, value); + } + else + { + // A dictionary is being returned directly, or a nested dictionary. + state.Current.SetReturnValue(value); + } + } + } + } + + private static void HandleEndDictionary(JsonSerializerOptions options, ref Utf8JsonReader reader, ref ReadStack state) + { + if (state.Current.IsDictionaryProperty) + { + // We added the items to the dictionary already. + state.Current.ResetProperty(); + } + else + { + object value = state.Current.ReturnValue; + + if (state.IsLastFrame) + { + // Set the return value directly since this will be returned to the user. + state.Current.Reset(); + state.Current.ReturnValue = value; + } + else + { + state.Pop(); + ApplyObjectToEnumerable(value, ref state, ref reader); + } + } + } + } +} diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleNull.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleNull.cs index 7f7ecb1ef8b0..b5b9e5f9c503 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleNull.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleNull.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System.Collections; using System.Diagnostics; namespace System.Text.Json.Serialization @@ -11,7 +10,7 @@ public static partial class JsonSerializer { private static bool HandleNull(ref Utf8JsonReader reader, ref ReadStack state, JsonSerializerOptions options) { - if (state.Current.Skip()) + if (state.Current.SkipProperty) { return false; } @@ -32,14 +31,14 @@ private static bool HandleNull(ref Utf8JsonReader reader, ref ReadStack state, J if (state.Current.IsEnumerable || state.Current.IsDictionary) { - ApplyObjectToEnumerable(null, options, ref state, ref reader); + ApplyObjectToEnumerable(null, ref state, ref reader); return false; } - if (state.Current.IsPropertyEnumerable) + if (state.Current.IsEnumerableProperty || state.Current.IsDictionaryProperty) { - bool setPropertyToNull = !state.Current.EnumerableCreated; - ApplyObjectToEnumerable(null, options, ref state, ref reader, setPropertyDirectly: setPropertyToNull); + bool setPropertyToNull = !state.Current.PropertyInitialized; + ApplyObjectToEnumerable(null, ref state, ref reader, setPropertyDirectly: setPropertyToNull); return false; } diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleObject.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleObject.cs index 425c4d78f65d..b561568a2290 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleObject.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleObject.cs @@ -10,89 +10,45 @@ public static partial class JsonSerializer { private static void HandleStartObject(JsonSerializerOptions options, ref Utf8JsonReader reader, ref ReadStack state) { - if (state.Current.Skip()) - { - state.Push(); - state.Current.Drain = true; - return; - } + Debug.Assert(!state.Current.IsProcessingDictionary); if (state.Current.IsProcessingEnumerable) { + // A nested object within an enumerable. Type objType = state.Current.GetElementType(); state.Push(); state.Current.Initialize(objType, options); } else if (state.Current.JsonPropertyInfo != null) { - if (state.Current.IsDictionary) - { - // Verify that the Dictionary can be deserialized by having as first generic argument. - Type[] args = state.Current.JsonClassInfo.Type.GetGenericArguments(); - if (args.Length == 0 || args[0].UnderlyingSystemType != typeof(string)) - { - ThrowHelper.ThrowJsonException_DeserializeUnableToConvertValue(state.Current.JsonClassInfo.Type, reader, state.PropertyPath); - } - - if (state.Current.ReturnValue == null) - { - // The Dictionary created below will be returned to corresponding Parse() etc method. - // Ensure any nested array creates a new frame. - state.Current.EnumerableCreated = true; - } - else - { - ClassType classType = state.Current.JsonClassInfo.ElementClassInfo.ClassType; - - // Verify that the second parameter is not a value. - if (state.Current.JsonClassInfo.ElementClassInfo.ClassType == ClassType.Value) - { - ThrowHelper.ThrowJsonException_DeserializeUnableToConvertValue(state.Current.JsonClassInfo.Type, reader, state.PropertyPath); - } - - // A nested object, dictionary or enumerable. - JsonClassInfo classInfoTemp = state.Current.JsonClassInfo; - state.Push(); - state.Current.JsonClassInfo = classInfoTemp.ElementClassInfo; - state.Current.InitializeJsonPropertyInfo(); - } - } - else - { - // Nested object. - Type objType = state.Current.JsonPropertyInfo.RuntimePropertyType; - state.Push(); - state.Current.Initialize(objType, options); - } + // Nested object. + Type objType = state.Current.JsonPropertyInfo.RuntimePropertyType; + state.Push(); + state.Current.Initialize(objType, options); } JsonClassInfo classInfo = state.Current.JsonClassInfo; state.Current.ReturnValue = classInfo.CreateObject(); } - private static bool HandleEndObject(JsonSerializerOptions options, ref ReadStack state, ref Utf8JsonReader reader) + private static void HandleEndObject(JsonSerializerOptions options, ref Utf8JsonReader reader, ref ReadStack state) { - bool isLastFrame = state.IsLastFrame; - if (state.Current.Drain) - { - state.Pop(); - return isLastFrame; - } + Debug.Assert(!state.Current.IsProcessingDictionary); state.Current.JsonClassInfo.UpdateSortedPropertyCache(ref state.Current); object value = state.Current.ReturnValue; - if (isLastFrame) + if (state.IsLastFrame) { state.Current.Reset(); state.Current.ReturnValue = value; - return true; } - - state.Pop(); - ApplyObjectToEnumerable(value, options, ref state, ref reader); - return false; + else + { + state.Pop(); + ApplyObjectToEnumerable(value, ref state, ref reader); + } } } } diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandlePropertyName.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandlePropertyName.cs new file mode 100644 index 000000000000..e7b0ff2916a7 --- /dev/null +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandlePropertyName.cs @@ -0,0 +1,131 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Buffers; +using System.Collections; +using System.Diagnostics; + +namespace System.Text.Json.Serialization +{ + public static partial class JsonSerializer + { + private static void HandlePropertyName( + JsonSerializerOptions options, + ref Utf8JsonReader reader, + ref ReadStack state) + { + if (state.Current.Drain) + { + return; + } + + Debug.Assert(state.Current.ReturnValue != default); + Debug.Assert(state.Current.JsonClassInfo != default); + + if (state.Current.IsProcessingDictionary) + { + if (ReferenceEquals(state.Current.JsonClassInfo.DataExtensionProperty, state.Current.JsonPropertyInfo)) + { + ReadOnlySpan propertyName = reader.HasValueSequence ? reader.ValueSequence.ToArray() : reader.ValueSpan; + + // todo: use a cleaner call to get the unescaped string once https://github.com/dotnet/corefx/issues/35386 is implemented. + if (reader._stringHasEscaping) + { + int idx = propertyName.IndexOf(JsonConstants.BackSlash); + Debug.Assert(idx != -1); + propertyName = GetUnescapedString(propertyName, idx); + } + + ProcessMissingProperty(propertyName, options, ref reader, ref state); + } + else + { + string keyName = reader.GetString(); + if (options.DictionaryKeyPolicy != null) + { + keyName = options.DictionaryKeyPolicy.ConvertName(keyName); + } + + if (state.Current.IsDictionary) + { + state.Current.JsonPropertyInfo = state.Current.JsonClassInfo.GetPolicyProperty(); + } + + Debug.Assert(state.Current.IsDictionary || + (state.Current.IsDictionaryProperty && state.Current.JsonPropertyInfo != null)); + + state.Current.KeyName = keyName; + } + } + else + { + ReadOnlySpan propertyName = reader.HasValueSequence ? reader.ValueSequence.ToArray() : reader.ValueSpan; + if (reader._stringHasEscaping) + { + int idx = propertyName.IndexOf(JsonConstants.BackSlash); + Debug.Assert(idx != -1); + propertyName = GetUnescapedString(propertyName, idx); + } + + state.Current.JsonPropertyInfo = state.Current.JsonClassInfo.GetProperty(options, propertyName, ref state.Current); + if (state.Current.JsonPropertyInfo == null) + { + if (state.Current.JsonClassInfo.DataExtensionProperty == null) + { + state.Current.JsonPropertyInfo = JsonPropertyInfo.s_missingProperty; + } + else + { + ProcessMissingProperty(propertyName, options, ref reader, ref state); + } + } + else + { + state.Current.PropertyIndex++; + } + } + } + + private static void ProcessMissingProperty( + ReadOnlySpan unescapedPropertyName, + JsonSerializerOptions options, + ref Utf8JsonReader reader, + ref ReadStack state) + { + JsonPropertyInfo jsonPropertyInfo = state.Current.JsonClassInfo.DataExtensionProperty; + + Debug.Assert(jsonPropertyInfo != null); + Debug.Assert(state.Current.ReturnValue != null); + + IDictionary extensionData = (IDictionary)jsonPropertyInfo.GetValueAsObject(state.Current.ReturnValue); + if (extensionData == null) + { + Type type = jsonPropertyInfo.DeclaredPropertyType; + + // Create the appropriate dictionary type. We already verified the types. + Debug.Assert(type.IsGenericType); + Debug.Assert(type.GetGenericArguments().Length == 2); + Debug.Assert(type.GetGenericArguments()[0].UnderlyingSystemType == typeof(string)); + Debug.Assert( + type.GetGenericArguments()[1].UnderlyingSystemType == typeof(object) || + type.GetGenericArguments()[1].UnderlyingSystemType == typeof(JsonElement)); + + extensionData = (IDictionary)options.GetOrAddClass(type).CreateObject(); + jsonPropertyInfo.SetValueAsObject(state.Current.ReturnValue, extensionData); + } + + JsonElement jsonElement; + using (JsonDocument jsonDocument = JsonDocument.ParseValue(ref reader)) + { + jsonElement = jsonDocument.RootElement.Clone(); + } + + string keyName = JsonHelpers.Utf8GetString(unescapedPropertyName); + + // Currently we don't apply any naming policy. If we do, we'd have to pass it onto the JsonDocument. + + extensionData.Add(keyName, jsonElement); + } + } +} diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleValue.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleValue.cs index 15e9d98dbcbf..a11312908c05 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleValue.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleValue.cs @@ -8,7 +8,7 @@ public static partial class JsonSerializer { private static bool HandleValue(JsonTokenType tokenType, JsonSerializerOptions options, ref Utf8JsonReader reader, ref ReadStack state) { - if (state.Current.Skip()) + if (state.Current.SkipProperty) { return false; } diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.cs index 59aa8e633bff..f95f24b0f653 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System.Buffers; +using System.Collections; using System.Diagnostics; namespace System.Text.Json.Serialization @@ -13,9 +14,6 @@ namespace System.Text.Json.Serialization /// public static partial class JsonSerializer { - internal static readonly JsonPropertyInfo s_missingProperty = new JsonPropertyInfoNotNullable(); - - // todo: for readability, refactor this method to split by ClassType(Enumerable, Object, or Value) like Write() private static void ReadCore( JsonSerializerOptions options, ref Utf8JsonReader reader, @@ -38,63 +36,49 @@ private static void ReadCore( } else if (tokenType == JsonTokenType.PropertyName) { - if (!state.Current.Drain) + HandlePropertyName(options, ref reader, ref state); + } + else if (tokenType == JsonTokenType.StartObject) + { + if (state.Current.SkipProperty) { - Debug.Assert(state.Current.ReturnValue != default); - Debug.Assert(state.Current.JsonClassInfo != default); - - if (state.Current.IsDictionary) - { - string keyName = reader.GetString(); - if (options.DictionaryKeyPolicy != null) - { - keyName = options.DictionaryKeyPolicy.ConvertName(keyName); - } - - state.Current.JsonPropertyInfo = state.Current.JsonClassInfo.GetPolicyProperty(); - state.Current.KeyName = keyName; - } - else + state.Push(); + state.Current.Drain = true; + } + else if (state.Current.IsProcessingValue) + { + if (HandleValue(tokenType, options, ref reader, ref state)) { - ReadOnlySpan propertyName = reader.HasValueSequence ? reader.ValueSequence.ToArray() : reader.ValueSpan; - if (reader._stringHasEscaping) - { - int idx = propertyName.IndexOf(JsonConstants.BackSlash); - Debug.Assert(idx != -1); - propertyName = GetUnescapedString(propertyName, idx); - } - - state.Current.JsonPropertyInfo = state.Current.JsonClassInfo.GetProperty(options, propertyName, ref state.Current); - if (state.Current.JsonPropertyInfo == null) - { - state.Current.JsonPropertyInfo = s_missingProperty; - } - - state.Current.PropertyIndex++; + continue; } } - } - else if (tokenType == JsonTokenType.StartObject) - { - if (!state.Current.IsProcessingProperty) + else if (state.Current.IsProcessingDictionary) { - HandleStartObject(options, ref reader, ref state); + HandleStartDictionary(options, ref reader, ref state); } - else if (HandleValue(tokenType, options, ref reader, ref state)) + else { - continue; + HandleStartObject(options, ref reader, ref state); } } else if (tokenType == JsonTokenType.EndObject) { - if (HandleEndObject(options, ref state, ref reader)) + if (state.Current.Drain) { - continue; + state.Pop(); + } + else if (state.Current.IsProcessingDictionary) + { + HandleEndDictionary(options, ref reader, ref state); + } + else + { + HandleEndObject(options, ref reader, ref state); } } else if (tokenType == JsonTokenType.StartArray) { - if (!state.Current.IsProcessingProperty) + if (!state.Current.IsProcessingValue) { HandleStartArray(options, ref reader, ref state); } @@ -105,7 +89,7 @@ private static void ReadCore( } else if (tokenType == JsonTokenType.EndArray) { - if (HandleEndArray(options, ref state, ref reader)) + if (HandleEndArray(options, ref reader, ref state)) { continue; } diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.HandleDictionary.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.HandleDictionary.cs index b9b2864d5f7b..3ffe0792f14b 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.HandleDictionary.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.HandleDictionary.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System.Buffers; using System.Collections; using System.Collections.Generic; using System.Diagnostics; @@ -19,22 +18,11 @@ private static bool HandleDictionary( ref WriteStack state) { JsonPropertyInfo jsonPropertyInfo = state.Current.JsonPropertyInfo; - if (!jsonPropertyInfo.ShouldSerialize) - { - // Ignore writing this property. - return true; - } - if (state.Current.Enumerator == null) { - // Verify that the Dictionary can be serialized by having as first generic argument. - Type[] args = jsonPropertyInfo.RuntimePropertyType.GetGenericArguments(); - if (args.Length == 0 || args[0].UnderlyingSystemType != typeof(string)) - { - ThrowHelper.ThrowJsonException_DeserializeUnableToConvertValue(state.Current.JsonClassInfo.Type, state.PropertyPath); - } + IEnumerable enumerable; - IEnumerable enumerable = (IEnumerable)jsonPropertyInfo.GetValueAsObject(state.Current.CurrentValue); + enumerable = (IEnumerable)jsonPropertyInfo.GetValueAsObject(state.Current.CurrentValue); if (enumerable == null) { // Write a null object or enumerable. @@ -48,28 +36,36 @@ private static bool HandleDictionary( if (state.Current.Enumerator.MoveNext()) { - // Check for polymorphism. - if (elementClassInfo.ClassType == ClassType.Unknown) - { - object currentValue = ((IDictionaryEnumerator)state.Current.Enumerator).Entry.Value; - GetRuntimeClassInfo(currentValue, ref elementClassInfo, options); - } - - if (elementClassInfo.ClassType == ClassType.Value) - { - elementClassInfo.GetPolicyProperty().WriteDictionary(options, ref state.Current, writer); - } - else if (state.Current.Enumerator.Current == null) + // Handle DataExtension. + if (ReferenceEquals(jsonPropertyInfo, state.Current.JsonClassInfo.DataExtensionProperty)) { - writer.WriteNull(jsonPropertyInfo.Name); + WriteExtensionData(writer, ref state.Current); } else { - // An object or another enumerator requires a new stack frame. - var enumerator = (IDictionaryEnumerator)state.Current.Enumerator; - object value = enumerator.Value; - state.Push(elementClassInfo, value); - state.Current.KeyName = (string)enumerator.Key; + // Check for polymorphism. + if (elementClassInfo.ClassType == ClassType.Unknown) + { + object currentValue = ((IDictionaryEnumerator)state.Current.Enumerator).Entry.Value; + GetRuntimeClassInfo(currentValue, ref elementClassInfo, options); + } + + if (elementClassInfo.ClassType == ClassType.Value) + { + elementClassInfo.GetPolicyProperty().WriteDictionary(options, ref state.Current, writer); + } + else if (state.Current.Enumerator.Current == null) + { + writer.WriteNull(jsonPropertyInfo.Name); + } + else + { + // An object or another enumerator requires a new stack frame. + var enumerator = (IDictionaryEnumerator)state.Current.Enumerator; + object value = enumerator.Value; + state.Push(elementClassInfo, value); + state.Current.KeyName = (string)enumerator.Key; + } } return false; @@ -161,5 +157,21 @@ internal static void WriteDictionary( #endif } } + + private static void WriteExtensionData(Utf8JsonWriter writer, ref WriteStackFrame frame) + { + DictionaryEntry entry = ((IDictionaryEnumerator)frame.Enumerator).Entry; + if (entry.Value is JsonElement element) + { + Debug.Assert(entry.Key is string); + + string propertyName = (string)entry.Key; + element.WriteAsProperty(propertyName.AsSpan(), writer); + } + else + { + ThrowHelper.ThrowInvalidOperationException_SerializationDataExtensionPropertyInvalid(frame.JsonClassInfo, entry.Value.GetType()); + } + } } } diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.HandleEnumerable.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.HandleEnumerable.cs index 6f5109780f8c..4be8b9fa3464 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.HandleEnumerable.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.HandleEnumerable.cs @@ -17,16 +17,9 @@ private static bool HandleEnumerable( { Debug.Assert(state.Current.JsonPropertyInfo.ClassType == ClassType.Enumerable); - JsonPropertyInfo jsonPropertyInfo = state.Current.JsonPropertyInfo; - if (!jsonPropertyInfo.ShouldSerialize) - { - // Ignore writing this property. - return true; - } - if (state.Current.Enumerator == null) { - IEnumerable enumerable = (IEnumerable)jsonPropertyInfo.GetValueAsObject(state.Current.CurrentValue); + IEnumerable enumerable = (IEnumerable)state.Current.JsonPropertyInfo.GetValueAsObject(state.Current.CurrentValue); if (enumerable == null) { diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.HandleObject.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.HandleObject.cs index 1daa62da2db0..f60932eac96d 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.HandleObject.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.HandleObject.cs @@ -13,8 +13,6 @@ private static bool WriteObject( Utf8JsonWriter writer, ref WriteStack state) { - JsonClassInfo classInfo = state.Current.JsonClassInfo; - // Write the start. if (!state.Current.StartObjectWritten) { @@ -24,6 +22,7 @@ private static bool WriteObject( // Determine if we are done enumerating properties. // If the ClassType is unknown, there will be a policy property applied. There is probably // a better way to identify policy properties- maybe not put them in the normal property bag? + JsonClassInfo classInfo = state.Current.JsonClassInfo; if (classInfo.ClassType != ClassType.Unknown && state.Current.PropertyIndex != classInfo.PropertyCount) { HandleObject(options, writer, ref state); @@ -54,6 +53,11 @@ private static bool HandleObject( state.Current.JsonClassInfo.ClassType == ClassType.Unknown); JsonPropertyInfo jsonPropertyInfo = state.Current.JsonClassInfo.GetProperty(state.Current.PropertyIndex); + if (!jsonPropertyInfo.ShouldSerialize) + { + state.Current.NextProperty(); + return true; + } bool obtainedValue = false; object currentValue = null; @@ -122,7 +126,7 @@ private static bool HandleObject( { if (!jsonPropertyInfo.IgnoreNullValues) { - writer.WriteNull(jsonPropertyInfo._escapedName); + writer.WriteNull(jsonPropertyInfo.EscapedName); } state.Current.NextProperty(); diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/ReadStack.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/ReadStack.cs index 650db0a74c4e..73c735ed048f 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/ReadStack.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/ReadStack.cs @@ -7,7 +7,7 @@ namespace System.Text.Json.Serialization { - [DebuggerDisplay("Current: ClassType.{Current.JsonClassInfo.ClassType} {Current.JsonClassInfo.Type.Name}")] + [DebuggerDisplay("Current: ClassType.{Current.JsonClassInfo.ClassType}, {Current.JsonClassInfo.Type.Name}")] internal struct ReadStack { // A fields is used instead of a property to avoid value semantics. @@ -83,7 +83,7 @@ public string PropertyPath private string GetPropertyName(in ReadStackFrame frame) { - if (frame.JsonPropertyInfo != null && frame.JsonClassInfo.ClassType == ClassType.Object) + if (frame.JsonPropertyInfo?.PropertyInfo != null && frame.JsonClassInfo.ClassType == ClassType.Object) { return $".{frame.JsonPropertyInfo.PropertyInfo.Name}"; } diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/ReadStackFrame.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/ReadStackFrame.cs index bab6bcb3bba9..7f3e4d3861d7 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/ReadStackFrame.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/ReadStackFrame.cs @@ -9,7 +9,7 @@ namespace System.Text.Json.Serialization { - [DebuggerDisplay("ClassType.{JsonClassInfo.ClassType} {JsonClassInfo.Type.Name}")] + [DebuggerDisplay("ClassType.{JsonClassInfo.ClassType}, {JsonClassInfo.Type.Name}")] internal struct ReadStackFrame { // The object (POCO or IEnumerable) that is being populated @@ -22,12 +22,11 @@ internal struct ReadStackFrame // Current property values. public JsonPropertyInfo JsonPropertyInfo; - // Pop the stack when the current array or dictionary is done. - public bool PopStackOnEnd; - // Support System.Array and other types that don't implement IList. public IList TempEnumerableValues; - public bool EnumerableCreated; + + // Has an array or dictionary property been initialized. + public bool PropertyInitialized; // For performance, we order the properties by the first deserialize and PropertyIndex helps find the right slot quicker. public int PropertyIndex; @@ -37,17 +36,28 @@ internal struct ReadStackFrame public bool Drain; public bool IsDictionary => JsonClassInfo.ClassType == ClassType.Dictionary; + + public bool IsDictionaryProperty => JsonPropertyInfo != null && + !JsonPropertyInfo.IsPropertyPolicy && + JsonPropertyInfo.ClassType == ClassType.Dictionary; + public bool IsEnumerable => JsonClassInfo.ClassType == ClassType.Enumerable; - public bool IsProcessingEnumerableOrDictionary => IsProcessingEnumerable || IsDictionary; - public bool IsProcessingEnumerable => IsEnumerable || IsPropertyEnumerable; - public bool IsPropertyEnumerable => JsonPropertyInfo != null ? JsonPropertyInfo.ClassType == ClassType.Enumerable : false; - public bool IsProcessingProperty + public bool IsEnumerableProperty => + JsonPropertyInfo != null && + !JsonPropertyInfo.IsPropertyPolicy && + JsonPropertyInfo.ClassType == ClassType.Enumerable; + + public bool IsProcessingEnumerableOrDictionary => IsProcessingEnumerable || IsProcessingDictionary; + public bool IsProcessingDictionary => IsDictionary || IsDictionaryProperty; + public bool IsProcessingEnumerable => IsEnumerable || IsEnumerableProperty; + + public bool IsProcessingValue { [MethodImpl(MethodImplOptions.AggressiveInlining)] get { - if (JsonPropertyInfo == null || Skip()) + if (JsonPropertyInfo == null || SkipProperty) { return false; } @@ -55,8 +65,11 @@ public bool IsProcessingProperty // We've got a property info. If we're a Value or polymorphic Value // (ClassType.Unknown), return true. ClassType type = JsonPropertyInfo.ClassType; - return type == ClassType.Value || type == ClassType.Unknown - || (type == ClassType.Dictionary && KeyName != null && JsonClassInfo.ElementClassInfo.ClassType == ClassType.Unknown); + return type == ClassType.Value || type == ClassType.Unknown || + KeyName != null && ( + (IsDictionary && JsonClassInfo.ElementClassInfo.ClassType == ClassType.Unknown) || + (IsDictionaryProperty && JsonPropertyInfo.ElementClassInfo.ClassType == ClassType.Unknown) + ); } } @@ -86,9 +99,8 @@ public void Reset() public void ResetProperty() { - EnumerableCreated = false; + PropertyInitialized = false; JsonPropertyInfo = null; - PopStackOnEnd = false; TempEnumerableValues = null; } @@ -112,7 +124,7 @@ public static object CreateEnumerableValue(ref Utf8JsonReader reader, ref ReadSt } else { - converterList = new List(); + converterList = new List(); } state.Current.TempEnumerableValues = converterList; @@ -137,17 +149,12 @@ public static object CreateEnumerableValue(ref Utf8JsonReader reader, ref ReadSt public Type GetElementType() { - if (IsPropertyEnumerable) + if (IsEnumerableProperty || IsDictionaryProperty) { return JsonPropertyInfo.ElementClassInfo.Type; } - if (IsEnumerable) - { - return JsonClassInfo.ElementClassInfo.Type; - } - - if (IsDictionary) + if (IsEnumerable || IsDictionary) { return JsonClassInfo.ElementClassInfo.Type; } @@ -175,9 +182,8 @@ public void SetReturnValue(object value) ReturnValue = value; } - public bool Skip() - { - return Drain || ReferenceEquals(JsonPropertyInfo, JsonSerializer.s_missingProperty); - } + public bool SkipProperty => Drain || + ReferenceEquals(JsonPropertyInfo, JsonPropertyInfo.s_missingProperty) || + (JsonPropertyInfo?.IsPropertyPolicy == false && JsonPropertyInfo?.ShouldDeserialize == false); } } diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/WriteStackFrame.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/WriteStackFrame.cs index 82f823b7b47e..660bb44056e9 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/WriteStackFrame.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/WriteStackFrame.cs @@ -46,9 +46,9 @@ public void Initialize(Type type, JsonSerializerOptions options) public void WriteObjectOrArrayStart(ClassType classType, Utf8JsonWriter writer, bool writeNull = false) { - if (JsonPropertyInfo?._escapedName != null) + if (JsonPropertyInfo?.EscapedName != null) { - WriteObjectOrArrayStart(classType, JsonPropertyInfo?._escapedName, writer, writeNull); + WriteObjectOrArrayStart(classType, JsonPropertyInfo?.EscapedName, writer, writeNull); } else if (KeyName != null) { diff --git a/src/System.Text.Json/src/System/Text/Json/ThrowHelper.Serialization.cs b/src/System.Text.Json/src/System/Text/Json/ThrowHelper.Serialization.cs index 6bf5b59ab68e..2f6973661185 100644 --- a/src/System.Text.Json/src/System/Text/Json/ThrowHelper.Serialization.cs +++ b/src/System.Text.Json/src/System/Text/Json/ThrowHelper.Serialization.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System.Diagnostics; +using System.Reflection; using System.Runtime.CompilerServices; using System.Text.Json.Serialization; @@ -13,19 +14,30 @@ internal static partial class ThrowHelper [MethodImpl(MethodImplOptions.NoInlining)] public static void ThrowArgumentException_DeserializeWrongType(Type type, object value) { - throw new ArgumentException(SR.Format(SR.DeserializeWrongType, type.FullName, value.GetType().FullName)); + throw new ArgumentException(SR.Format(SR.DeserializeWrongType, type, value.GetType())); + } + + [MethodImpl(MethodImplOptions.NoInlining)] + public static NotSupportedException GetNotSupportedException_SerializationNotSupportedCollection(Type propertyType, Type parentType, MemberInfo memberInfo) + { + if (parentType != null && parentType != typeof(object) && memberInfo != null) + { + return new NotSupportedException(SR.Format(SR.SerializationNotSupportedCollection, propertyType, $"{parentType}.{memberInfo.Name}")); + } + + return new NotSupportedException(SR.Format(SR.SerializationNotSupportedCollectionType, propertyType)); } [MethodImpl(MethodImplOptions.NoInlining)] public static void ThrowJsonException_DeserializeUnableToConvertValue(Type propertyType, in Utf8JsonReader reader, string path) { - ThowJsonException(SR.Format(SR.DeserializeUnableToConvertValue, propertyType.FullName), in reader, path); + ThowJsonException(SR.Format(SR.DeserializeUnableToConvertValue, propertyType), in reader, path); } [MethodImpl(MethodImplOptions.NoInlining)] public static void ThrowJsonException_DeserializeUnableToConvertValue(Type propertyType, string path) { - string message = SR.Format(SR.DeserializeUnableToConvertValue, propertyType.FullName) + $" Path: {path}."; + string message = SR.Format(SR.DeserializeUnableToConvertValue, propertyType) + $" Path: {path}."; throw new JsonException(message, path, null, null); } @@ -44,13 +56,13 @@ public static void ThrowInvalidOperationException_SerializerOptionsImmutable() [MethodImpl(MethodImplOptions.NoInlining)] public static void ThrowInvalidOperationException_SerializerPropertyNameConflict(JsonClassInfo jsonClassInfo, JsonPropertyInfo jsonPropertyInfo) { - throw new InvalidOperationException(SR.Format(SR.SerializerPropertyNameConflict, jsonClassInfo.Type.FullName, jsonPropertyInfo.PropertyInfo.Name)); + throw new InvalidOperationException(SR.Format(SR.SerializerPropertyNameConflict, jsonClassInfo.Type, jsonPropertyInfo.PropertyInfo.Name)); } [MethodImpl(MethodImplOptions.NoInlining)] - public static void ThrowInvalidOperationException_SerializerPropertyNameNull(JsonClassInfo jsonClassInfo, JsonPropertyInfo jsonPropertyInfo) + public static void ThrowInvalidOperationException_SerializerPropertyNameNull(Type parentType, JsonPropertyInfo jsonPropertyInfo) { - throw new InvalidOperationException(SR.Format(SR.SerializerPropertyNameNull, jsonClassInfo.Type.FullName, jsonPropertyInfo.PropertyInfo.Name)); + throw new InvalidOperationException(SR.Format(SR.SerializerPropertyNameNull, parentType, jsonPropertyInfo.PropertyInfo.Name)); } public static void ThrowJsonException_DeserializeDataRemaining(long length, long bytesRemaining) @@ -92,5 +104,23 @@ public static void ReThrowWithPath(JsonException exception, string path) throw new JsonException(message, path, exception.LineNumber, exception.BytePositionInLine, exception); } + + [MethodImpl(MethodImplOptions.NoInlining)] + public static void ThrowInvalidOperationException_SerializationDuplicateAttribute(Type attribute) + { + throw new InvalidOperationException(SR.Format(SR.SerializationDuplicateAttribute, attribute)); + } + + [MethodImpl(MethodImplOptions.NoInlining)] + public static void ThrowInvalidOperationException_SerializationDataExtensionPropertyInvalid(JsonClassInfo jsonClassInfo, JsonPropertyInfo jsonPropertyInfo) + { + throw new InvalidOperationException(SR.Format(SR.SerializationDataExtensionPropertyInvalid, jsonClassInfo.Type, jsonPropertyInfo.PropertyInfo.Name)); + } + + [MethodImpl(MethodImplOptions.NoInlining)] + public static void ThrowInvalidOperationException_SerializationDataExtensionPropertyInvalid(JsonClassInfo jsonClassInfo, Type invalidType) + { + throw new InvalidOperationException(SR.Format(SR.SerializationDataExtensionPropertyInvalidElement, jsonClassInfo.Type, jsonClassInfo.DataExtensionProperty.PropertyInfo.Name, invalidType)); + } } } diff --git a/src/System.Text.Json/src/System/Text/Json/ThrowHelper.cs b/src/System.Text.Json/src/System/Text/Json/ThrowHelper.cs index a69e50424469..5a93117345aa 100644 --- a/src/System.Text.Json/src/System/Text/Json/ThrowHelper.cs +++ b/src/System.Text.Json/src/System/Text/Json/ThrowHelper.cs @@ -225,7 +225,7 @@ public static void ThrowJsonReaderException(ref Utf8JsonReader json, ExceptionRe [MethodImpl(MethodImplOptions.NoInlining)] public static JsonException GetJsonReaderException(ref Utf8JsonReader json, ExceptionResource resource, byte nextByte, ReadOnlySpan bytes) { - string message = GetResourceString(ref json, resource, nextByte, Encoding.UTF8.GetString(bytes.ToArray(), 0, bytes.Length)); + string message = GetResourceString(ref json, resource, nextByte, JsonHelpers.Utf8GetString(bytes)); long lineNumber = json.CurrentState._lineNumber; long bytePositionInLine = json.CurrentState._bytePositionInLine; diff --git a/src/System.Text.Json/tests/Serialization/Array.ReadTests.cs b/src/System.Text.Json/tests/Serialization/Array.ReadTests.cs index 29458f2eaae8..b30e8de45f65 100644 --- a/src/System.Text.Json/tests/Serialization/Array.ReadTests.cs +++ b/src/System.Text.Json/tests/Serialization/Array.ReadTests.cs @@ -37,18 +37,6 @@ public static IEnumerable ReadNullJson } } - private static void VerifyReadNull(SimpleTestClass obj, bool isNull) - { - if (isNull) - { - Assert.Null(obj); - } - else - { - obj.Verify(); - } - } - [Theory] [MemberData(nameof(ReadNullJson))] public static void ReadNull(string json, bool element0Null, bool element1Null, bool element2Null) @@ -64,6 +52,18 @@ public static void ReadNull(string json, bool element0Null, bool element1Null, b VerifyReadNull(list[0], element0Null); VerifyReadNull(list[1], element1Null); VerifyReadNull(list[2], element2Null); + + static void VerifyReadNull(SimpleTestClass obj, bool isNull) + { + if (isNull) + { + Assert.Null(obj); + } + else + { + obj.Verify(); + } + } } [Fact] @@ -177,5 +177,17 @@ public static void ReadClassWithObjectImmutableTypes() TestClassWithObjectImmutableTypes obj = JsonSerializer.Parse(TestClassWithObjectImmutableTypes.s_data); obj.Verify(); } + + public static void ClassWithNoSetter() + { + string json = @"{""MyList"":[1]}"; + ClassWithListButNoSetter obj = JsonSerializer.Parse(json); + Assert.Equal(1, obj.MyList[0]); + } + + public class ClassWithListButNoSetter + { + public List MyList { get; } = new List(); + } } } diff --git a/src/System.Text.Json/tests/Serialization/Array.WriteTests.cs b/src/System.Text.Json/tests/Serialization/Array.WriteTests.cs index 2926d4b6525a..b1e7e771fe75 100644 --- a/src/System.Text.Json/tests/Serialization/Array.WriteTests.cs +++ b/src/System.Text.Json/tests/Serialization/Array.WriteTests.cs @@ -65,8 +65,6 @@ public static void WriteClassWithObjectArray() } } - - [Fact] public static void WriteClassWithGenericList() { diff --git a/src/System.Text.Json/tests/Serialization/DictionaryTests.cs b/src/System.Text.Json/tests/Serialization/DictionaryTests.cs index 7f99c2b7f4a2..4e80a3afebc6 100644 --- a/src/System.Text.Json/tests/Serialization/DictionaryTests.cs +++ b/src/System.Text.Json/tests/Serialization/DictionaryTests.cs @@ -103,7 +103,7 @@ class Poco [Fact] public static void FirstGenericArgNotStringFail() { - Assert.Throws(() => JsonSerializer.Parse>(@"{""Key1"":1}")); + Assert.Throws(() => JsonSerializer.Parse>(@"{""Key1"":1}")); } [Fact] @@ -301,10 +301,20 @@ public static void UnicodePropertyNames() [Fact] public static void ObjectToStringFail() { + // Baseline string json = @"{""MyDictionary"":{""Key"":""Value""}}"; + JsonSerializer.Parse>(json); + Assert.Throws(() => JsonSerializer.Parse>(json)); } + [Fact, ActiveIssue("JsonElement fails since it is a struct.")] + public static void ObjectToJsonElement() + { + string json = @"{""MyDictionary"":{""Key"":""Value""}}"; + JsonSerializer.Parse>(json); + } + [Fact] public static void HashtableFail() { @@ -315,27 +325,77 @@ public static void HashtableFail() JsonSerializer.Parse>(json); // We don't support non-generic IDictionary - Assert.Throws(() => JsonSerializer.Parse(json)); + Assert.Throws(() => JsonSerializer.Parse(json)); } { Hashtable ht = new Hashtable(); ht.Add("Key", "Value"); - Assert.Throws(() => JsonSerializer.ToString(ht)); + + Assert.Throws(() => JsonSerializer.ToString(ht)); } { string json = @"{""Key"":""Value""}"; // We don't support non-generic IDictionary - Assert.Throws(() => JsonSerializer.Parse(json)); + Assert.Throws(() => JsonSerializer.Parse(json)); } { IDictionary ht = new Hashtable(); ht.Add("Key", "Value"); - Assert.Throws(() => JsonSerializer.ToString(ht)); + Assert.Throws(() => JsonSerializer.ToString(ht)); + } + } + + [Fact] + public static void ClassWithNoSetter() + { + string json = @"{""MyDictionary"":{""Key"":""Value""}}"; + ClassWithDictionaryButNoSetter obj = JsonSerializer.Parse(json); + Assert.Equal("Value", obj.MyDictionary["Key"]); + } + + [Fact] + public static void DictionaryNotSupported() + { + string json = @"{""MyDictionary"":{""Key"":""Value""}}"; + + try + { + JsonSerializer.Parse(json); + Assert.True(false, "Expected NotSupportedException to be thrown."); } + catch (NotSupportedException e) + { + // The exception should contain className.propertyName and the invalid type. + Assert.Contains("ClassWithNotSupportedDictionary.MyDictionary", e.Message); + Assert.Contains("Dictionary`2[System.Int32,System.Int32]", e.Message); + } + } + + [Fact] + public static void DictionaryNotSupportedButIgnored() + { + string json = @"{""MyDictionary"":{""Key"":1}}"; + ClassWithNotSupportedDictionaryButIgnored obj = JsonSerializer.Parse(json); + Assert.Null(obj.MyDictionary); + } + + public class ClassWithDictionaryButNoSetter + { + public Dictionary MyDictionary { get; } = new Dictionary(); + } + + public class ClassWithNotSupportedDictionary + { + public Dictionary MyDictionary { get; set; } + } + + public class ClassWithNotSupportedDictionaryButIgnored + { + [JsonIgnore] public Dictionary MyDictionary { get; set; } } } } diff --git a/src/System.Text.Json/tests/Serialization/ExtensionDataTests.cs b/src/System.Text.Json/tests/Serialization/ExtensionDataTests.cs new file mode 100644 index 000000000000..c45ed4eff3a7 --- /dev/null +++ b/src/System.Text.Json/tests/Serialization/ExtensionDataTests.cs @@ -0,0 +1,266 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Collections.Generic; +using System.Linq; +using Xunit; + +namespace System.Text.Json.Serialization.Tests +{ + public static class ExtensionDataTests + { + [Fact] + public static void ExtensionPropertyNotUsed() + { + string json = @"{""MyNestedClass"":" + SimpleTestClass.s_json + "}"; + ClassWithExtensionProperty obj = JsonSerializer.Parse(json); + Assert.Null(obj.MyOverflow); + } + + [Fact] + public static void ExtensionPropertyRoundTrip() + { + ClassWithExtensionProperty obj; + + { + string json = @"{""MyIntMissing"":2, ""MyInt"":1, ""MyNestedClassMissing"":" + SimpleTestClass.s_json + "}"; + obj = JsonSerializer.Parse(json); + Verify(); + } + + // Round-trip the json. + { + string json = JsonSerializer.ToString(obj); + obj = JsonSerializer.Parse(json); + Verify(); + } + + void Verify() + { + Assert.NotNull(obj.MyOverflow); + Assert.NotNull(obj.MyOverflow["MyIntMissing"]); + Assert.Equal(1, obj.MyInt); + Assert.Equal(2, obj.MyOverflow["MyIntMissing"].GetInt32()); + + JsonProperty[] properties = obj.MyOverflow["MyNestedClassMissing"].EnumerateObject().ToArray(); + + // Verify a couple properties + Assert.Equal(1, properties.Where(prop => prop.Name == "MyInt16").First().Value.GetInt32()); + Assert.Equal(true, properties.Where(prop => prop.Name == "MyBooleanTrue").First().Value.GetBoolean()); + } + } + + [Fact] + public static void ExtensionPropertyAlreadyInstantiated() + { + Assert.NotNull(new ClassWithExtensionPropertyAlreadyInstantiated().MyOverflow); + + string json = @"{""MyIntMissing"":2}"; + + ClassWithExtensionProperty obj = JsonSerializer.Parse(json); + Assert.Equal(2, obj.MyOverflow["MyIntMissing"].GetInt32()); + } + + [Fact] + public static void ExtensionPropertyAsObject() + { + string json = @"{""MyIntMissing"":2}"; + + ClassWithExtensionPropertyAsObject obj = JsonSerializer.Parse(json); + Assert.IsType(obj.MyOverflow["MyIntMissing"]); + Assert.Equal(2, ((JsonElement)obj.MyOverflow["MyIntMissing"]).GetInt32()); + } + + [Fact] + public static void ExtensionPropertyCamelCasing() + { + // Currently we apply no naming policy. If we do (such as a ExtensionPropertyNamingPolicy), we'd also have to add functionality to the JsonDocument. + + ClassWithExtensionProperty obj; + const string jsonWithProperty = @"{""MyIntMissing"":1}"; + const string jsonWithPropertyCamelCased = @"{""myIntMissing"":1}"; + + { + // Baseline Pascal-cased json + no casing option. + obj = JsonSerializer.Parse(jsonWithProperty); + Assert.Equal(1, obj.MyOverflow["MyIntMissing"].GetInt32()); + string json = JsonSerializer.ToString(obj); + Assert.Contains(@"""MyIntMissing"":1", json); + } + + { + // Pascal-cased json + camel casing option. + JsonSerializerOptions options = new JsonSerializerOptions(); + options.DictionaryKeyPolicy = JsonNamingPolicy.CamelCase; + options.PropertyNamingPolicy = JsonNamingPolicy.CamelCase; + + obj = JsonSerializer.Parse(jsonWithProperty, options); + Assert.Equal(1, obj.MyOverflow["MyIntMissing"].GetInt32()); + string json = JsonSerializer.ToString(obj); + Assert.Contains(@"""MyIntMissing"":1", json); + } + + { + // Baseline camel-cased json + no casing option. + obj = JsonSerializer.Parse(jsonWithPropertyCamelCased); + Assert.Equal(1, obj.MyOverflow["myIntMissing"].GetInt32()); + string json = JsonSerializer.ToString(obj); + Assert.Contains(@"""myIntMissing"":1", json); + } + + { + // Baseline camel-cased json + camel casing option. + JsonSerializerOptions options = new JsonSerializerOptions(); + options.DictionaryKeyPolicy = JsonNamingPolicy.CamelCase; + options.PropertyNamingPolicy = JsonNamingPolicy.CamelCase; + + obj = JsonSerializer.Parse(jsonWithPropertyCamelCased, options); + Assert.Equal(1, obj.MyOverflow["myIntMissing"].GetInt32()); + string json = JsonSerializer.ToString(obj); + Assert.Contains(@"""myIntMissing"":1", json); + } + } + + [Fact] + public static void NullValuesIgnored() + { + const string json = @"{""MyNestedClass"":null}"; + const string jsonMissing = @"{ ""MyNestedClassMissing"":null}"; + + { + // Baseline with no missing. + ClassWithExtensionProperty obj = JsonSerializer.Parse(json); + Assert.Null(obj.MyOverflow); + + string outJson = JsonSerializer.ToString(obj); + Assert.Contains(@"""MyNestedClass"":null", outJson); + } + + { + // Baseline with missing. + ClassWithExtensionProperty obj = JsonSerializer.Parse(jsonMissing); + Assert.Equal(1, obj.MyOverflow.Count); + Assert.Equal(JsonValueType.Null, obj.MyOverflow["MyNestedClassMissing"].Type); + } + + { + JsonSerializerOptions options = new JsonSerializerOptions(); + options.IgnoreNullValues = true; + + ClassWithExtensionProperty obj = JsonSerializer.Parse(jsonMissing, options); + + // Currently we do not ignore nulls in the extension data. The JsonDocument would also need to support this mode + // for any lower-level nulls. + Assert.Equal(1, obj.MyOverflow.Count); + Assert.Equal(JsonValueType.Null, obj.MyOverflow["MyNestedClassMissing"].Type); + } + } + + [Fact] + public static void InvalidExtensionPropertyFail() + { + // Baseline + JsonSerializer.Parse(@"{}"); + JsonSerializer.Parse(@"{}"); + + Assert.Throws(() => JsonSerializer.Parse(@"{}")); + Assert.Throws(() => JsonSerializer.Parse(@"{}")); + } + + [Fact] + public static void IgnoredDataShouldNotBeExtensionData() + { + ClassWithIgnoredData obj = JsonSerializer.Parse(@"{""MyInt"":1}"); + + Assert.Equal(0, obj.MyInt); + Assert.Null(obj.MyOverflow); + } + + [Fact] + public static void InvalidExtensionValue() + { + // Baseline + ClassWithExtensionPropertyAlreadyInstantiated obj = JsonSerializer.Parse(@"{}"); + obj.MyOverflow.Add("test", new object()); + + try + { + JsonSerializer.ToString(obj); + Assert.True(false, "InvalidOperationException should have thrown."); + } + catch (InvalidOperationException e) + { + // Verify the exception contains the property name and invalid type. + Assert.Contains("ClassWithExtensionPropertyAlreadyInstantiated.MyOverflow", e.Message); + Assert.Contains("System.Object", e.Message); + } + } + + [Fact] + public static void ObjectTree() + { + string json = @"{""MyIntMissing"":2, ""MyReference"":{""MyIntMissingChild"":3}}"; + + ClassWithReference obj = JsonSerializer.Parse(json); + Assert.IsType(obj.MyOverflow["MyIntMissing"]); + Assert.Equal(1, obj.MyOverflow.Count); + Assert.Equal(2, obj.MyOverflow["MyIntMissing"].GetInt32()); + + ClassWithExtensionProperty child = obj.MyReference; + Assert.IsType(child.MyOverflow["MyIntMissingChild"]); + Assert.IsType(child.MyOverflow["MyIntMissingChild"]); + Assert.Equal(1, child.MyOverflow.Count); + Assert.Equal(3, child.MyOverflow["MyIntMissingChild"].GetInt32()); + } + + public class ClassWithExtensionPropertyAlreadyInstantiated + { + public ClassWithExtensionPropertyAlreadyInstantiated() + { + MyOverflow = new Dictionary(); + } + + [JsonExtensionData] + public Dictionary MyOverflow { get; set; } + } + + public class ClassWithExtensionPropertyAsObject + { + [JsonExtensionData] + public Dictionary MyOverflow { get; set; } + } + + public class ClassWithIgnoredData + { + [JsonExtensionData] + public Dictionary MyOverflow { get; set; } + + [JsonIgnore] + public int MyInt { get; set; } + } + + public class ClassWithInvalidExtensionProperty + { + [JsonExtensionData] + public Dictionary MyOverflow { get; set; } + } + + public class ClassWithTwoExtensionPropertys + { + [JsonExtensionData] + public Dictionary MyOverflow1 { get; set; } + + [JsonExtensionData] + public Dictionary MyOverflow2 { get; set; } + } + + public class ClassWithReference + { + [JsonExtensionData] + public Dictionary MyOverflow { get; set; } + + public ClassWithExtensionProperty MyReference { get; set; } + } + } +} diff --git a/src/System.Text.Json/tests/Serialization/OptionsTests.cs b/src/System.Text.Json/tests/Serialization/OptionsTests.cs index 2806ee5c1957..9fc15c0c1fcc 100644 --- a/src/System.Text.Json/tests/Serialization/OptionsTests.cs +++ b/src/System.Text.Json/tests/Serialization/OptionsTests.cs @@ -90,6 +90,54 @@ public static void WriteIndented() Assert.Contains(Environment.NewLine, json); } + [Fact] + public static void ExtensionDataUsesReaderOptions() + { + // We just verify trailing commas. + const string json = @"{""MyIntMissing"":2,}"; + + // Verify baseline without options. + Assert.Throws(() => JsonSerializer.Parse(json)); + + // Verify baseline with options. + var options = new JsonSerializerOptions(); + Assert.Throws(() => JsonSerializer.Parse(json, options)); + + // Set AllowTrailingCommas to true. + options = new JsonSerializerOptions(); + options.AllowTrailingCommas = true; + JsonSerializer.Parse(json, options); + } + + [Fact] + public static void ExtensionDataUsesWriterOptions() + { + // We just verify whitespace. + + ClassWithExtensionProperty obj = JsonSerializer.Parse(@"{""MyIntMissing"":2}"); + + // Verify baseline without options. + string json = JsonSerializer.ToString(obj); + Assert.False(HasNewLine()); + + // Verify baseline with options. + var options = new JsonSerializerOptions(); + json = JsonSerializer.ToString(obj, options); + Assert.False(HasNewLine()); + + // Set AllowTrailingCommas to true. + options = new JsonSerializerOptions(); + options.WriteIndented = true; + json = JsonSerializer.ToString(obj, options); + Assert.True(HasNewLine()); + + bool HasNewLine() + { + int iEnd = json.IndexOf("2", json.IndexOf("MyIntMissing")); + return json.Substring(iEnd + 1).StartsWith(Environment.NewLine); + } + } + [Fact] public static void ReadCommentHandling() { diff --git a/src/System.Text.Json/tests/Serialization/PropertyVisibilityTests.cs b/src/System.Text.Json/tests/Serialization/PropertyVisibilityTests.cs index dd4f8ecbb5d3..f85cc1241329 100644 --- a/src/System.Text.Json/tests/Serialization/PropertyVisibilityTests.cs +++ b/src/System.Text.Json/tests/Serialization/PropertyVisibilityTests.cs @@ -75,25 +75,29 @@ public static void JsonIgnoreAttribute() Assert.Equal(@"MyString", obj.MyString); Assert.Equal(@"MyStringWithIgnore", obj.MyStringWithIgnore); Assert.Equal(2, obj.MyStringsWithIgnore.Length); + Assert.Equal(1, obj.MyDictionaryWithIgnore["Key"]); // Verify serialize. string json = JsonSerializer.ToString(obj); Assert.Contains(@"""MyString""", json); Assert.DoesNotContain(@"MyStringWithIgnore", json); Assert.DoesNotContain(@"MyStringsWithIgnore", json); + Assert.DoesNotContain(@"MyDictionaryWithIgnore", json); // Verify deserialize default. obj = JsonSerializer.Parse(@"{}"); Assert.Equal(@"MyString", obj.MyString); Assert.Equal(@"MyStringWithIgnore", obj.MyStringWithIgnore); Assert.Equal(2, obj.MyStringsWithIgnore.Length); + Assert.Equal(1, obj.MyDictionaryWithIgnore["Key"]); // Verify deserialize ignores the json for MyStringWithIgnore and MyStringsWithIgnore. obj = JsonSerializer.Parse( - @"{""MyString"":""Hello"", ""MyStringWithIgnore"":""IgnoreMe"", ""MyStringsWithIgnore"":[""IgnoreMe""]}"); + @"{""MyString"":""Hello"", ""MyStringWithIgnore"":""IgnoreMe"", ""MyStringsWithIgnore"":[""IgnoreMe""], ""MyDictionaryWithIgnore"":{""Key"":9}}"); Assert.Contains(@"Hello", obj.MyString); Assert.Equal(@"MyStringWithIgnore", obj.MyStringWithIgnore); Assert.Equal(2, obj.MyStringsWithIgnore.Length); + Assert.Equal(1, obj.MyDictionaryWithIgnore["Key"]); } // Todo: add tests with missing object property and missing collection property. @@ -175,11 +179,15 @@ public class ClassWithIgnoreAttributeProperty { public ClassWithIgnoreAttributeProperty() { + MyDictionaryWithIgnore = new Dictionary { { "Key", 1 } }; MyString = "MyString"; MyStringWithIgnore = "MyStringWithIgnore"; MyStringsWithIgnore = new string[] { "1", "2" }; } + [JsonIgnore] + public Dictionary MyDictionaryWithIgnore { get; set; } + [JsonIgnore] public string MyStringWithIgnore { get; set; } diff --git a/src/System.Text.Json/tests/Serialization/TestClasses.cs b/src/System.Text.Json/tests/Serialization/TestClasses.cs index a12e60e182f1..e64531659cd3 100644 --- a/src/System.Text.Json/tests/Serialization/TestClasses.cs +++ b/src/System.Text.Json/tests/Serialization/TestClasses.cs @@ -1280,6 +1280,15 @@ public class ClassWithUnicodeProperty public int Aѧ34567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 { get; set; } } + public class ClassWithExtensionProperty + { + public SimpleTestClass MyNestedClass { get; set; } + public int MyInt { get; set; } + + [JsonExtensionData] + public IDictionary MyOverflow { get; set; } + } + public class TestClassWithNestedObjectCommentsInner : ITestClass { public SimpleTestClass MyData { get; set; } diff --git a/src/System.Text.Json/tests/System.Text.Json.Tests.csproj b/src/System.Text.Json/tests/System.Text.Json.Tests.csproj index fb067fa78dc2..3f0bb1cd4c26 100644 --- a/src/System.Text.Json/tests/System.Text.Json.Tests.csproj +++ b/src/System.Text.Json/tests/System.Text.Json.Tests.csproj @@ -29,6 +29,7 @@ + From 9643d42eb34e9eadfcfea51379812d185dc4fc7c Mon Sep 17 00:00:00 2001 From: Viktor Hofer Date: Fri, 17 May 2019 19:32:20 +0200 Subject: [PATCH 395/607] Enable rolling builds and add arm64 in outerloop (#37728) * Enable rolling builds and add arm64 in outerloop * Disable tests on official builds * Allow Outerloop to run aggregated * Disable failing RH6 test --- .azure-ci.yml | 33 ++++---- eng/pipelines/corefx-base.yml | 2 +- eng/pipelines/freebsd.yml | 17 +++- eng/pipelines/linux.yml | 37 ++++----- eng/pipelines/macos.yml | 17 ++-- eng/pipelines/outerloop.yml | 12 ++- eng/pipelines/redhat6.yml | 19 +++-- eng/pipelines/windows.yml | 79 ++++++++----------- .../tests/ProcessTests.Unix.cs | 3 +- 9 files changed, 115 insertions(+), 104 deletions(-) diff --git a/.azure-ci.yml b/.azure-ci.yml index 4a4e9aa8ccea..2e16a0989fe5 100644 --- a/.azure-ci.yml +++ b/.azure-ci.yml @@ -46,31 +46,36 @@ resources: jobs: # Windows legs - template: /eng/pipelines/windows.yml - ${{ if and(ne(variables['System.TeamProject'], 'public'), notIn(variables['Build.Reason'], 'PullRequest')) }}: - parameters: - isOfficialBuild: true + parameters: + isOfficialBuild: ${{ and(ne(variables['System.TeamProject'], 'public'), notIn(variables['Build.Reason'], 'PullRequest')) }} + fullMatrix: ${{ notIn(variables['Build.Reason'], 'PullRequest') }} # Linux legs - template: /eng/pipelines/linux.yml - ${{ if and(ne(variables['System.TeamProject'], 'public'), notIn(variables['Build.Reason'], 'PullRequest')) }}: - parameters: - isOfficialBuild: true + parameters: + isOfficialBuild: ${{ and(ne(variables['System.TeamProject'], 'public'), notIn(variables['Build.Reason'], 'PullRequest')) }} + fullMatrix: ${{ notIn(variables['Build.Reason'], 'PullRequest') }} # MacOS legs - template: /eng/pipelines/macos.yml - ${{ if and(ne(variables['System.TeamProject'], 'public'), notIn(variables['Build.Reason'], 'PullRequest')) }}: - parameters: - isOfficialBuild: true + parameters: + isOfficialBuild: ${{ and(ne(variables['System.TeamProject'], 'public'), notIn(variables['Build.Reason'], 'PullRequest')) }} + fullMatrix: ${{ notIn(variables['Build.Reason'], 'PullRequest') }} - # Only run in official builds - - ${{ if and(ne(variables['System.TeamProject'], 'public'), notIn(variables['Build.Reason'], 'PullRequest')) }}: - # Redhat6 leg is only for official builds - - template: /eng/pipelines/redhat6.yml + # RedHat6 leg + - template: /eng/pipelines/redhat6.yml + parameters: + isOfficialBuild: ${{ and(ne(variables['System.TeamProject'], 'public'), notIn(variables['Build.Reason'], 'PullRequest')) }} + fullMatrix: ${{ notIn(variables['Build.Reason'], 'PullRequest') }} # FreeBSD leg is only for official builds # - template: /eng/pipelines/freebsd.yml + # parameters: + # isOfficialBuild: ${{ and(ne(variables['System.TeamProject'], 'public'), notIn(variables['Build.Reason'], 'PullRequest')) }} + # fullMatrix: ${{ notIn(variables['Build.Reason'], 'PullRequest') }} - # Publish step + # Publish step. Only run in official builds + - ${{ if and(ne(variables['System.TeamProject'], 'public'), notIn(variables['Build.Reason'], 'PullRequest')) }}: - template: /eng/pipelines/publish.yml parameters: dependsOn: diff --git a/eng/pipelines/corefx-base.yml b/eng/pipelines/corefx-base.yml index 158dcc2f23e5..ee8ef95bf687 100644 --- a/eng/pipelines/corefx-base.yml +++ b/eng/pipelines/corefx-base.yml @@ -188,7 +188,7 @@ jobs: - template: /eng/pipelines/helix.yml parameters: # send tests to helix only on public builds, official scheduled builds or manual official builds. - condition: or(eq(${{ parameters.isOfficialBuild }}, False), notIn(variables['Build.Reason'], 'BatchedCI', 'IndividualCI')) + condition: eq(${{ parameters.isOfficialBuild }}, False) targetOS: ${{ parameters.targetOS }} archGroup: $(_architecture) configuration: $(_BuildConfig) diff --git a/eng/pipelines/freebsd.yml b/eng/pipelines/freebsd.yml index 4f35c108455f..dc66aa4d53ea 100644 --- a/eng/pipelines/freebsd.yml +++ b/eng/pipelines/freebsd.yml @@ -1,9 +1,19 @@ -# FreeBSD leg. Only for used in Official Builds +# FreeBSD leg +parameters: + # Required: value to specify if the job is comming from an official build to run extra steps and sign binaries + # Default: false + isOfficialBuild: false + # Required: value to specify if the full test matrix should be tested + # Default: false + fullMatrix: false + # Required: value to specify if the build is comming from an outerloop pipeline. + # Default: false + isOuterloopBuild: false jobs: - template: corefx-base.yml parameters: - isOfficialBuild: true + isOfficialBuild: ${{ parameters.isOfficialBuild }} targetOS: FreeBSD jobs: @@ -23,5 +33,4 @@ jobs: submitToHelix: false variables: - - _skipTests: true - - _outerloop: true # Only runs in official builds + - _outerloop: ${{ parameters.isOuterloopBuild }} diff --git a/eng/pipelines/linux.yml b/eng/pipelines/linux.yml index 488bd28ec517..0e42c2d0703d 100644 --- a/eng/pipelines/linux.yml +++ b/eng/pipelines/linux.yml @@ -3,12 +3,14 @@ parameters: # Required: value to specify if the job is comming from an official build to run extra steps and sign binaries # Default: false isOfficialBuild: false + # Required: value to specify if the full test matrix should be tested + # Default: false + fullMatrix: false # Required: value to specify if the build is comming from an outerloop pipeline. # Default: false isOuterloopBuild: false jobs: - - template: corefx-base.yml parameters: isOfficialBuild: ${{ parameters.isOfficialBuild }} @@ -76,7 +78,7 @@ jobs: _buildScriptPrefix: '' _buildExtraArguments: /p:RuntimeOS=linux-musl - ${{ if eq(parameters.isOfficialBuild, 'true') }}: + ${{ if eq(parameters.fullMatrix, 'true') }}: arm_Release: _BuildConfig: Release _architecture: arm @@ -104,22 +106,18 @@ jobs: submitToHelix: true variables: - - _skipTests: true - - _outerloop: ${{ parameters.isOfficialBuild }} - - ${{ if eq(parameters.isOuterloopBuild, 'true') }}: - - _outerloop: true - - - ${{ if eq(parameters.isOfficialBuild, 'false') }}: - - linuxDefaultQueues: Centos.7.Amd64.Open+RedHat.7.Amd64.Open+Debian.8.Amd64.Open+Ubuntu.1604.Amd64.Open+Ubuntu.1804.Amd64.Open+OpenSuse.42.Amd64.Open+\(Fedora.28.Amd64\)ubuntu.1604.amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-28-helix-09ca40b-20190508143249 - - linuxArm64Queues: \(Ubuntu.1604.Arm64\)Ubuntu.1604.Arm64.Docker.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-16.04-helix-arm64v8-b049512-20190321153539 - - alpineQueues: \(Alpine.38.Amd64\)ubuntu.1604.amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.8-helix-09ca40b-20190508143246 - - - ${{ if eq(parameters.isOfficialBuild, 'true') }}: - - linuxDefaultQueues: Centos.7.Amd64+RedHat.7.Amd64+Debian.8.Amd64+Debian.9.Amd64+Ubuntu.1604.Amd64+Ubuntu.1804.Amd64+Ubuntu.1810.Amd64+OpenSuse.42.Amd64+SLES.12.Amd64+SLES.15.Amd64+\(Fedora.28.Amd64\)ubuntu.1604.amd64@mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-28-helix-09ca40b-20190508143249+\(Fedora.29.Amd64\)ubuntu.1604.amd64@mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-29-09ca40b-20190508143249+\(Ubuntu.1904.Amd64\)ubuntu.1604.amd64@mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-19.04-helix-amd64-09ca40b-20190508143257 - - linuxArm64Queues: \(Ubuntu.1604.Arm64\)Ubuntu.1604.Arm64.Docker@mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-16.04-helix-arm64v8-b049512-20190321153539 - - linuxArmQueues: \(Debian.9.Arm32\)Ubuntu.1604.Arm32@mcr.microsoft.com/dotnet-buildtools/prereqs:debian-9-helix-arm32v7-b049512-20190321153542 - - alpineQueues: \(Alpine.38.Amd64\)ubuntu.1604.amd64@mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.8-helix-09ca40b-20190508143246+\(Alpine.39.Amd64\)ubuntu.1604.amd64@mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.9-helix-09ca40b-20190508143246 - - alpineArm64Queues: \(Alpine.38.Arm64\)Ubuntu.1604.Arm64.Docker@mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.8-helix-arm64v8-46e69dd-20190327215724 + - _outerloop: ${{ parameters.isOuterloopBuild }} + - linuxArm64Queues: \(Ubuntu.1604.Arm64.Open\)Ubuntu.1604.Arm64.Docker.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-16.04-helix-arm64v8-b049512-20190321153539 + + - ${{ if eq(parameters.fullMatrix, 'false') }}: + - linuxDefaultQueues: Centos.7.Amd64.Open+RedHat.7.Amd64.Open+Debian.8.Amd64.Open+Ubuntu.1604.Amd64.Open+Ubuntu.1804.Amd64.Open+OpenSuse.42.Amd64.Open+\(Fedora.28.Amd64.Open\)ubuntu.1604.amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-28-helix-09ca40b-20190508143249 + - alpineQueues: \(Alpine.38.Amd64.Open\)ubuntu.1604.amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.8-helix-09ca40b-20190508143246 + + - ${{ if eq(parameters.fullMatrix, 'true') }}: + - linuxDefaultQueues: Centos.7.Amd64.Open+RedHat.7.Amd64.Open+Debian.8.Amd64.Open+Debian.9.Amd64.Open+Ubuntu.1604.Amd64.Open+Ubuntu.1804.Amd64.Open+Ubuntu.1810.Amd64.Open+OpenSuse.42.Amd64.Open+SLES.12.Amd64.Open+SLES.15.Amd64.Open+\(Fedora.28.Amd64.Open\)ubuntu.1604.amd64.open@mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-28-helix-09ca40b-20190508143249+\(Fedora.29.Amd64.Open\)ubuntu.1604.amd64.open@mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-29-09ca40b-20190508143249+\(Ubuntu.1904.Amd64.Open\)ubuntu.1604.amd64.open@mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-19.04-helix-amd64-09ca40b-20190508143257 + - linuxArmQueues: \(Debian.9.Arm32.Open\)Ubuntu.1604.Arm32.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:debian-9-helix-arm32v7-b049512-20190321153542 + - alpineQueues: \(Alpine.38.Amd64.Open\)ubuntu.1604.amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.8-helix-09ca40b-20190508143246+\(Alpine.39.Amd64.Open\)ubuntu.1604.amd64.open@mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.9-helix-09ca40b-20190508143246 + - alpineArm64Queues: \(Alpine.38.Arm64.Open\)Ubuntu.1604.Arm64.Docker.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.8-helix-arm64v8-46e69dd-20190327215724 # Legs without helix testing # Only run this leg in PRs. @@ -153,5 +151,4 @@ jobs: submitToHelix: false variables: - - _skipTests: true - - _outerloop: ${{ parameters.isOfficialBuild }} + - _outerloop: ${{ parameters.isOuterloopBuild }} diff --git a/eng/pipelines/macos.yml b/eng/pipelines/macos.yml index 5c1d0c1d67d0..d88b0de00730 100644 --- a/eng/pipelines/macos.yml +++ b/eng/pipelines/macos.yml @@ -3,12 +3,14 @@ parameters: # Required: value to specify if the job is comming from an official build to run extra steps and sign binaries # Default: false isOfficialBuild: false + # Required: value to specify if the full test matrix should be tested + # Default: false + fullMatrix: false # Required: value to specify if the build is comming from an outerloop pipeline. # Default: false isOuterloopBuild: false jobs: - - template: corefx-base.yml parameters: isOfficialBuild: ${{ parameters.isOfficialBuild }} @@ -20,14 +22,14 @@ jobs: displayName: MacOS strategy: matrix: - ${{ if eq(parameters.isOfficialBuild, 'false') }}: + ${{ if eq(parameters.fullMatrix, 'false') }}: x64_Debug: _BuildConfig: Debug _architecture: x64 _framework: netcoreapp _helixQueues: $(macOSQueues) - ${{ if eq(parameters.isOfficialBuild, 'true') }}: + ${{ if eq(parameters.fullMatrix, 'true') }}: x64_Release: _BuildConfig: Release _architecture: x64 @@ -49,13 +51,10 @@ jobs: submitToHelix: true variables: - - _skipTests: true - - _outerloop: ${{ parameters.isOfficialBuild }} - - ${{ if eq(parameters.isOuterloopBuild, 'true') }}: - - _outerloop: true - + - _outerloop: ${{ parameters.isOuterloopBuild }} + - ${{ if eq(parameters.isOfficialBuild, 'false') }}: - macOSQueues: OSX.1012.Amd64.Open+OSX.1013.Amd64.Open - ${{ if eq(parameters.isOfficialBuild, 'true') }}: - - macOSQueues: OSX.1012.Amd64+OSX.1013.Amd64+OSX.1014.Amd64 + - macOSQueues: OSX.1012.Amd64.Open+OSX.1013.Amd64.Open+OSX.1014.Amd64.Open diff --git a/eng/pipelines/outerloop.yml b/eng/pipelines/outerloop.yml index e3222799f409..b803f4fa54e0 100644 --- a/eng/pipelines/outerloop.yml +++ b/eng/pipelines/outerloop.yml @@ -13,19 +13,25 @@ resources: jobs: # Windows outerloop legs - - ${{ if endsWith(variables['Build.DefinitionName'], 'windows') }}: + - ${{ if or(endsWith(variables['Build.DefinitionName'], 'windows'), endsWith(variables['Build.DefinitionName'], 'outerloop')) }}: - template: /eng/pipelines/windows.yml parameters: + isOfficialBuild: ${{ and(ne(variables['System.TeamProject'], 'public'), notIn(variables['Build.Reason'], 'PullRequest')) }} + fullMatrix: ${{ notIn(variables['Build.Reason'], 'PullRequest') }} isOuterloopBuild: true # Linux outerloop legs - - ${{ if endsWith(variables['Build.DefinitionName'], 'linux') }}: + - ${{ if or(endsWith(variables['Build.DefinitionName'], 'linux'), endsWith(variables['Build.DefinitionName'], 'outerloop')) }}: - template: /eng/pipelines/linux.yml parameters: + isOfficialBuild: ${{ and(ne(variables['System.TeamProject'], 'public'), notIn(variables['Build.Reason'], 'PullRequest')) }} + fullMatrix: ${{ notIn(variables['Build.Reason'], 'PullRequest') }} isOuterloopBuild: true # MacOS outerloop legs - - ${{ if endsWith(variables['Build.DefinitionName'], 'osx') }}: + - ${{ if or(endsWith(variables['Build.DefinitionName'], 'osx'), endsWith(variables['Build.DefinitionName'], 'outerloop')) }}: - template: /eng/pipelines/macos.yml parameters: + isOfficialBuild: ${{ and(ne(variables['System.TeamProject'], 'public'), notIn(variables['Build.Reason'], 'PullRequest')) }} + fullMatrix: ${{ notIn(variables['Build.Reason'], 'PullRequest') }} isOuterloopBuild: true \ No newline at end of file diff --git a/eng/pipelines/redhat6.yml b/eng/pipelines/redhat6.yml index 52cc6eb20a35..c7ba361daca4 100644 --- a/eng/pipelines/redhat6.yml +++ b/eng/pipelines/redhat6.yml @@ -1,9 +1,19 @@ -# RedHat 6 leg. Only for used in Official Builds +# RedHat 6 leg +parameters: + # Required: value to specify if the job is comming from an official build to run extra steps and sign binaries + # Default: false + isOfficialBuild: false + # Required: value to specify if the full test matrix should be tested + # Default: false + fullMatrix: false + # Required: value to specify if the build is comming from an outerloop pipeline. + # Default: false + isOuterloopBuild: false jobs: - template: corefx-base.yml parameters: - isOfficialBuild: true + isOfficialBuild: ${{ parameters.isOfficialBuild }} targetOS: Linux jobs: @@ -26,6 +36,5 @@ jobs: submitToHelix: true variables: - - _skipTests: true - - _outerloop: true # Only runs in official builds - - redhatHelixQueue: RedHat.6.Amd64 + - _outerloop: ${{ parameters.isOuterloopBuild }} + - redhatHelixQueue: RedHat.6.Amd64.Open diff --git a/eng/pipelines/windows.yml b/eng/pipelines/windows.yml index 31a4d6b90e80..8be4808ba50d 100644 --- a/eng/pipelines/windows.yml +++ b/eng/pipelines/windows.yml @@ -3,6 +3,9 @@ parameters: # Required: value to specify if the job is comming from an official build to run extra steps and sign binaries # Default: false isOfficialBuild: false + # Required: value to specify if the full test matrix should be tested + # Default: false + fullMatrix: false # Required: value to specify if the build is comming from an outerloop pipeline. # Default: false isOuterloopBuild: false @@ -21,7 +24,7 @@ jobs: strategy: matrix: # PR CI Matrix - ${{ if eq(parameters.isOfficialBuild, 'false') }}: + ${{ if eq(parameters.fullMatrix, 'false') }}: x64_Debug: _BuildConfig: Debug _architecture: x64 @@ -46,9 +49,18 @@ jobs: _architecture: x64 _framework: uap _helixQueues: $(uapNetfxQueues) + + # Run arm on the matrix or in Outerloop + ${{ if or(eq(parameters.fullMatrix, 'true'), eq(parameters.isOuterloopBuild, 'true')) }}: + arm64_Release: + _BuildConfig: Release + _architecture: arm64 + _framework: netcoreapp + _helixQueues: $(windowsArmQueue) + _publishTests: true - # Official build LEGS with HELIX Testing - ${{ if eq(parameters.isOfficialBuild, 'true') }}: + # Full test matrix + ${{ if eq(parameters.fullMatrix, 'true') }}: x64_Release: _BuildConfig: Release _architecture: x64 @@ -63,13 +75,6 @@ jobs: _helixQueues: $(netcoreappWindowsQueues) _publishTests: true - arm64_Release: - _BuildConfig: Release - _architecture: arm64 - _framework: netcoreapp - _helixQueues: $(windowsArmQueue) - _publishTests: true - NETFX_x86_Release: _BuildConfig: Release _architecture: x86 @@ -97,31 +102,23 @@ jobs: _helixQueues: $(uapNetfxQueues) pool: - ${{ if eq(parameters.isOfficialBuild, 'true') }}: - name: NetCoreInternal-Pool - queue: buildpool.windows.10.amd64.vs2017 - ${{ if eq(parameters.isOfficialBuild, 'false') }}: - name: Hosted VS2017 + name: Hosted VS2017 submitToHelix: true buildExtraArguments: /p:RuntimeOS=win10 variables: - - _skipTests: true - - _outerloop: ${{ parameters.isOfficialBuild }} - - ${{ if eq(parameters.isOuterloopBuild, 'true') }}: - - _outerloop: true + - _outerloop: ${{ parameters.isOuterloopBuild }} + + - nanoQueues: "`(Windows.Nano.1803.Amd64.Open`)windows.10.amd64.serverrs4.open@mcr.microsoft.com/dotnet-buildtools/prereqs:nanoserver-1803-helix-amd64-05227e1-20190509225944" + - uapNetfxQueues: Windows.10.Amd64.ClientRS5.Open + - windowsArmQueue: Windows.10.Arm64.Open - - ${{ if eq(parameters.isOfficialBuild, 'false') }}: + - ${{ if eq(parameters.fullMatrix, 'false') }}: - netcoreappWindowsQueues: Windows.7.Amd64.Open+Windows.81.Amd64.Open+Windows.10.Amd64.ClientRS4.ES.Open - - nanoQueues: "`(Windows.Nano.1803.Amd64.Open`)windows.10.amd64.serverrs4.open@mcr.microsoft.com/dotnet-buildtools/prereqs:nanoserver-1803-helix-amd64-05227e1-20190509225944" - - uapNetfxQueues: Windows.10.Amd64.ClientRS5.Open - - ${{ if eq(parameters.isOfficialBuild, 'true') }}: - - netcoreappWindowsQueues: Windows.7.Amd64+Windows.81.Amd64+Windows.10.Amd64.Core+Windows.10.Amd64.ClientRS4 - - nanoQueues: "`(Windows.Nano.1803.Amd64`)windows.10.amd64.serverrs4@mcr.microsoft.com/dotnet-buildtools/prereqs:nanoserver-1803-helix-amd64-05227e1-20190509225944" - - uapNetfxQueues: Windows.10.Amd64.ClientRS5 - - windowsArmQueue: Windows.10.Arm64 + - ${{ if eq(parameters.fullMatrix, 'true') }}: + - netcoreappWindowsQueues: Windows.7.Amd64.Open+Windows.81.Amd64.Open+Windows.10.Amd64.ClientRS4.Open+Windows.10.Amd64.ServerRS5.Open # There is no point of running legs without outerloop tests, when in an outerloop build. - ${{ if eq(parameters.isOuterloopBuild, 'false') }}: @@ -131,7 +128,7 @@ jobs: strategy: matrix: # PR Validation Matrix - ${{ if eq(parameters.isOfficialBuild, 'false') }}: + ${{ if eq(parameters.fullMatrix, 'false') }}: x64_Debug: _BuildConfig: Debug _architecture: x64 @@ -139,7 +136,7 @@ jobs: _helixQueues: $(allConfigurationsQueues) # Official Build Matrix - ${{ if eq(parameters.isOfficialBuild, 'true') }}: + ${{ if eq(parameters.fullMatrix, 'true') }}: x64_Release: _BuildConfig: Release _architecture: x64 @@ -147,21 +144,14 @@ jobs: _helixQueues: $(allConfigurationsQueues) pool: - ${{ if eq(parameters.isOfficialBuild, 'true') }}: - name: NetCoreInternal-Pool - queue: buildpool.windows.10.amd64.vs2017 - ${{ if eq(parameters.isOfficialBuild, 'false') }}: - name: Hosted VS2017 + name: Hosted VS2017 submitToHelix: true buildExtraArguments: /p:RuntimeOS=win10 variables: - _outerloop: false - - ${{ if eq(parameters.isOfficialBuild, 'false') }}: - - allConfigurationsQueues: Windows.10.Amd64.ClientRS5.Open - - ${{ if eq(parameters.isOfficialBuild, 'true') }}: - - allConfigurationsQueues: Windows.10.Amd64.ClientRS5 + - allConfigurationsQueues: Windows.10.Amd64.ClientRS5.Open _jobFramework: -allConfigurations customBuildSteps: @@ -182,13 +172,13 @@ jobs: displayName: Windows strategy: matrix: - ${{ if eq(parameters.isOfficialBuild, 'false') }}: + ${{ if eq(parameters.fullMatrix, 'false') }}: UWP_NETNative_x86_Release: _BuildConfig: Release _architecture: x86 _framework: uapaot - ${{ if eq(parameters.isOfficialBuild, 'true') }}: + ${{ if eq(parameters.fullMatrix, 'true') }}: arm_Release: _BuildConfig: Release _architecture: arm @@ -200,15 +190,10 @@ jobs: _framework: uap pool: - ${{ if eq(parameters.isOfficialBuild, 'true') }}: - name: NetCoreInternal-Pool - queue: buildpool.windows.10.amd64.vs2017 - ${{ if eq(parameters.isOfficialBuild, 'false') }}: - name: Hosted VS2017 + name: Hosted VS2017 submitToHelix: false buildExtraArguments: /p:RuntimeOS=win10 variables: - - _skipTests: true - - _outerloop: ${{ parameters.isOfficialBuild }} + - _outerloop: ${{ parameters.isOuterloopBuild }} diff --git a/src/System.Diagnostics.Process/tests/ProcessTests.Unix.cs b/src/System.Diagnostics.Process/tests/ProcessTests.Unix.cs index 98e9a3edc7c9..d194d0bb5b54 100644 --- a/src/System.Diagnostics.Process/tests/ProcessTests.Unix.cs +++ b/src/System.Diagnostics.Process/tests/ProcessTests.Unix.cs @@ -156,7 +156,8 @@ public void ProcessStart_UseShellExecute_OnUnix_SuccessWhenProgramInstalled(bool } } - [Fact] + // Active issue https://github.com/dotnet/corefx/issues/37739 + [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotRedHatFamily6))] [PlatformSpecific(~TestPlatforms.OSX)] // On OSX, ProcessName returns the script interpreter. public void ProcessNameMatchesScriptName() { From 9d5932806e7d2ffe998fa47df1836aefe5a12224 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Fri, 17 May 2019 19:58:50 +0200 Subject: [PATCH 396/607] Update dependencies from https://github.com/dotnet/standard build 20190517.1 (#37750) - NETStandard.Library - 2.1.0-prerelease.19267.1 --- eng/Version.Details.xml | 4 ++-- eng/Versions.props | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 8deb3b7b97c9..e650f9da669d 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -38,9 +38,9 @@ https://github.com/dotnet/arcade 670f6ee1a619a2a7c84cfdfe2a1c84fbe94e1c6b - + https://github.com/dotnet/standard - 4f1286909b95a37686cb3bc3ee69dba716056fb6 + ca3d6589882127004ada76201d11caeef77dda14 https://github.com/dotnet/arcade diff --git a/eng/Versions.props b/eng/Versions.props index f7d908cf84f0..608dcf25ec4f 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -46,7 +46,7 @@ 3.0.0-preview6.19265.6 4.6.0-preview6.19265.6 - 2.1.0-prerelease.19265.2 + 2.1.0-prerelease.19267.1 99.99.99-master-20190510.1 From d1d83963828ffe6b0317e5451b09771bd88b42d9 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Fri, 17 May 2019 20:03:31 +0200 Subject: [PATCH 397/607] Update dependencies from https://github.com/dotnet/corefx build 20190516.12 (#37745) - runtime.native.System.IO.Ports - 4.6.0-preview6.19266.12 - Microsoft.NETCore.Platforms - 3.0.0-preview6.19266.12 --- eng/Version.Details.xml | 8 ++++---- eng/Versions.props | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index e650f9da669d..89a08bf13400 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -26,13 +26,13 @@ https://github.com/dotnet/core-setup d2d36e7b1e0081effa2bb220fb88238392fdc389 - + https://github.com/dotnet/corefx - fb97a8b5043dc4f92e437e3b21fb33e7493f1b3a + 6f9570e012054bf407778c0b07632e7733ecbb13 - + https://github.com/dotnet/corefx - fb97a8b5043dc4f92e437e3b21fb33e7493f1b3a + 6f9570e012054bf407778c0b07632e7733ecbb13 https://github.com/dotnet/arcade diff --git a/eng/Versions.props b/eng/Versions.props index 608dcf25ec4f..59edb848a646 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -43,8 +43,8 @@ 3.0.0-preview6-27714-72 3.0.0-preview6-27714-72 - 3.0.0-preview6.19265.6 - 4.6.0-preview6.19265.6 + 3.0.0-preview6.19266.12 + 4.6.0-preview6.19266.12 2.1.0-prerelease.19267.1 From 5e506626b8d21503a7d47a689ae40dbe8e72981b Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Fri, 17 May 2019 20:07:39 +0200 Subject: [PATCH 398/607] Update dependencies from https://github.com/dotnet/core-setup build 20190516.11 (#37744) - Microsoft.NETCore.App - 3.0.0-preview6-27716-11 - Microsoft.NETCore.DotNetHost - 3.0.0-preview6-27716-11 - Microsoft.NETCore.DotNetHostPolicy - 3.0.0-preview6-27716-11 --- eng/Version.Details.xml | 12 ++++++------ eng/Versions.props | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 89a08bf13400..22df121e1212 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -14,17 +14,17 @@ - + https://github.com/dotnet/core-setup - d2d36e7b1e0081effa2bb220fb88238392fdc389 + 5cf9beae08ee36fb97669ea2f5248b19e10292bb - + https://github.com/dotnet/core-setup - d2d36e7b1e0081effa2bb220fb88238392fdc389 + 5cf9beae08ee36fb97669ea2f5248b19e10292bb - + https://github.com/dotnet/core-setup - d2d36e7b1e0081effa2bb220fb88238392fdc389 + 5cf9beae08ee36fb97669ea2f5248b19e10292bb https://github.com/dotnet/corefx diff --git a/eng/Versions.props b/eng/Versions.props index 59edb848a646..496cfad7167a 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -36,9 +36,9 @@ 2.2.0-beta.19264.13 1.0.0-beta.19264.13 - 3.0.0-preview6-27715-11 - 3.0.0-preview6-27715-11 - 3.0.0-preview6-27715-11 + 3.0.0-preview6-27716-11 + 3.0.0-preview6-27716-11 + 3.0.0-preview6-27716-11 3.0.0-preview6-27714-72 3.0.0-preview6-27714-72 From 26195605c37bbb2d269e64b0ee3bbfb8c47ddde5 Mon Sep 17 00:00:00 2001 From: Viktor Hofer Date: Fri, 17 May 2019 21:18:29 +0200 Subject: [PATCH 399/607] Move runtests to eng and fix invocation (#37754) --- run-test.sh => eng/run-test.sh | 110 +++++---------------------------- 1 file changed, 14 insertions(+), 96 deletions(-) rename run-test.sh => eng/run-test.sh (71%) mode change 100755 => 100644 diff --git a/run-test.sh b/eng/run-test.sh old mode 100755 new mode 100644 similarity index 71% rename from run-test.sh rename to eng/run-test.sh index c54987063924..b8f694b94e44 --- a/run-test.sh +++ b/eng/run-test.sh @@ -15,21 +15,21 @@ wait_on_pids() usage() { - echo "Runs .NET CoreFX tests on FreeBSD, Linux, NetBSD or OSX" + echo "Runs .NET CoreFX tests on FreeBSD, NetBSD or Linux" echo "usage: run-test [options]" echo echo "Input sources:" echo " --runtime Location of root of the binaries directory" - echo " containing the FreeBSD, Linux, NetBSD or OSX runtime" + echo " containing the FreeBSD, NetBSD or Linux runtime" echo " default: /bin/testhost/netcoreapp---" echo " --corefx-tests Location of the root binaries location containing" echo " the tests to run" - echo " default: /bin" + echo " default: /artifacts/bin" echo echo "Flavor/OS/Architecture options:" echo " --configurationGroup ConfigurationGroup to run (Debug/Release)" echo " default: Debug" - echo " --os OS to run (FreeBSD, Linux, NetBSD or OSX)" + echo " --os OS to run (FreeBSD, NetBSD or Linux)" echo " default: detect current OS" echo " --arch Architecture to run (x64, arm, armel, x86, arm64)" echo " default: detect current architecture" @@ -47,14 +47,6 @@ usage() echo " listed one line, relative to the directory specified by --corefx-tests" echo " --timeout - + https://github.com/dotnet/arcade - 61cc7d4d347300835925ce5245bfc3ecb6b621d7 + 55ce2900743cb609e51e2c6487e87e42eb627880 https://github.com/dotnet/standard ca3d6589882127004ada76201d11caeef77dda14 - + https://github.com/dotnet/arcade - 61cc7d4d347300835925ce5245bfc3ecb6b621d7 + 55ce2900743cb609e51e2c6487e87e42eb627880 - + https://github.com/dotnet/arcade - 61cc7d4d347300835925ce5245bfc3ecb6b621d7 + 55ce2900743cb609e51e2c6487e87e42eb627880 - + https://github.com/dotnet/arcade - 61cc7d4d347300835925ce5245bfc3ecb6b621d7 + 55ce2900743cb609e51e2c6487e87e42eb627880 - + https://github.com/dotnet/arcade - 61cc7d4d347300835925ce5245bfc3ecb6b621d7 + 55ce2900743cb609e51e2c6487e87e42eb627880 - + https://github.com/dotnet/arcade - 61cc7d4d347300835925ce5245bfc3ecb6b621d7 + 55ce2900743cb609e51e2c6487e87e42eb627880 - + https://github.com/dotnet/arcade - 61cc7d4d347300835925ce5245bfc3ecb6b621d7 + 55ce2900743cb609e51e2c6487e87e42eb627880 - + https://github.com/dotnet/arcade - 61cc7d4d347300835925ce5245bfc3ecb6b621d7 + 55ce2900743cb609e51e2c6487e87e42eb627880 - + https://github.com/dotnet/arcade - 61cc7d4d347300835925ce5245bfc3ecb6b621d7 + 55ce2900743cb609e51e2c6487e87e42eb627880 - + https://github.com/dotnet/arcade - 61cc7d4d347300835925ce5245bfc3ecb6b621d7 + 55ce2900743cb609e51e2c6487e87e42eb627880 - + https://github.com/dotnet/arcade - 61cc7d4d347300835925ce5245bfc3ecb6b621d7 + 55ce2900743cb609e51e2c6487e87e42eb627880 - + https://github.com/dotnet/arcade - 61cc7d4d347300835925ce5245bfc3ecb6b621d7 + 55ce2900743cb609e51e2c6487e87e42eb627880 - + https://github.com/dotnet/arcade - 61cc7d4d347300835925ce5245bfc3ecb6b621d7 + 55ce2900743cb609e51e2c6487e87e42eb627880 - + https://github.com/dotnet/arcade - 61cc7d4d347300835925ce5245bfc3ecb6b621d7 + 55ce2900743cb609e51e2c6487e87e42eb627880 https://dev.azure.com/dnceng/internal/_git/dotnet-optimization diff --git a/eng/Versions.props b/eng/Versions.props index 55d6fd200311..d6706bc71e66 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -23,18 +23,18 @@ - 1.0.0-beta.19266.4 - 1.0.0-beta.19266.4 - 1.0.0-beta.19266.4 - 1.0.0-beta.19266.4 - 2.4.0-beta.19266.4 - 2.5.1-beta.19266.4 - 1.0.0-beta.19266.4 - 1.0.0-beta.19266.4 - 1.0.0-beta.19266.4 - 1.0.0-beta.19266.4 - 2.2.0-beta.19266.4 - 1.0.0-beta.19266.4 + 1.0.0-beta.19267.7 + 1.0.0-beta.19267.7 + 1.0.0-beta.19267.7 + 1.0.0-beta.19267.7 + 2.4.0-beta.19267.7 + 2.5.1-beta.19267.7 + 1.0.0-beta.19267.7 + 1.0.0-beta.19267.7 + 1.0.0-beta.19267.7 + 1.0.0-beta.19267.7 + 2.2.0-beta.19267.7 + 1.0.0-beta.19267.7 3.0.0-preview6-27716-11 3.0.0-preview6-27716-11 diff --git a/eng/build.ps1 b/eng/build.ps1 index 09a3e5030a76..b24eb414cec1 100644 --- a/eng/build.ps1 +++ b/eng/build.ps1 @@ -7,7 +7,7 @@ Param( [string] $os, [switch] $allconfigurations, [switch] $coverage, - [switch] $outerloop, + [string] $testscope, [string] $arch, [switch] $clean, [Parameter(ValueFromRemainingArguments=$true)][String[]]$properties @@ -36,7 +36,7 @@ function Get-Help() { Write-Host "Advanced settings:" Write-Host " -coverage Collect code coverage when testing" - Write-Host " -outerloop Include tests which are marked as OuterLoop" + Write-Host " -testscope Scope tests, allowed values: innerloop, outerloop, all" Write-Host " -allconfigurations Build packages for all build configurations" Write-Host " -os Build operating system: Windows_NT or Unix" Write-Host " -arch Build platform: x86, x64, arm or arm64" @@ -100,7 +100,7 @@ foreach ($argument in $PSBoundParameters.Keys) "os" { $arguments += " /p:OSGroup=$($PSBoundParameters[$argument])" } "allconfigurations" { $arguments += " /p:BuildAllConfigurations=true" } "coverage" { $arguments += " /p:Coverage=true" } - "outerloop" { $arguments += " /p:OuterLoop=true" } + "testscope" { $arguments += " /p:TestScope=$($PSBoundParameters[$argument])" } "arch" { $arguments += " /p:ArchGroup=$($PSBoundParameters[$argument])" } "properties" { $arguments += " " + $properties } default { $arguments += " /p:$argument=$($PSBoundParameters[$argument])" } diff --git a/eng/build.sh b/eng/build.sh index a72e265d9733..557f681a9f4b 100755 --- a/eng/build.sh +++ b/eng/build.sh @@ -36,7 +36,7 @@ usage() echo "Advanced settings:" echo " --coverage Collect code coverage when testing" - echo " --outerloop Include tests which are marked as OuterLoop" + echo " --testscope Test scope, allowed values: innerloop, outerloop, all" echo " --allconfigurations Build packages for all build configurations" echo " --os Build operating system: Windows_NT or Unix" echo " --arch Build platform: x86, x64, arm or arm64" @@ -100,8 +100,8 @@ while [[ $# > 0 ]]; do arguments="$arguments /p:BuildTests=true" shift 1 ;; - -outerloop) - arguments="$arguments /p:OuterLoop=true" + -testscope) + arguments="$arguments /p:TestScope=$2" shift 1 ;; -coverage) diff --git a/eng/common/build.ps1 b/eng/common/build.ps1 index d7e3799ebd99..67046a43f8c4 100644 --- a/eng/common/build.ps1 +++ b/eng/common/build.ps1 @@ -1,6 +1,7 @@ [CmdletBinding(PositionalBinding=$false)] Param( [string][Alias('c')]$configuration = "Debug", + [string]$platform = $null, [string] $projects, [string][Alias('v')]$verbosity = "minimal", [string] $msbuildEngine = $null, @@ -29,6 +30,7 @@ Param( function Print-Usage() { Write-Host "Common settings:" Write-Host " -configuration Build configuration: 'Debug' or 'Release' (short: -c)" + Write-Host " -platform Platform configuration: 'x86', 'x64' or any valid Platform value to pass to msbuild" Write-Host " -verbosity Msbuild verbosity: q[uiet], m[inimal], n[ormal], d[etailed], and diag[nostic] (short: -v)" Write-Host " -binaryLog Output binary log (short: -bl)" Write-Host " -help Print help and exit" @@ -77,6 +79,7 @@ function Build { InitializeCustomToolset $bl = if ($binaryLog) { "/bl:" + (Join-Path $LogDir "Build.binlog") } else { "" } + $platformArg = if ($platform) { "/p:Platform=$platform" } else { "" } if ($projects) { # Re-assign properties to a new variable because PowerShell doesn't let us append properties directly for unclear reasons. @@ -88,6 +91,7 @@ function Build { MSBuild $toolsetBuildProj ` $bl ` + $platformArg ` /p:Configuration=$configuration ` /p:RepoRoot=$RepoRoot ` /p:Restore=$restore ` diff --git a/eng/common/dotnet-install.ps1 b/eng/common/dotnet-install.ps1 index 5987943fd6f1..0b629b8301a1 100644 --- a/eng/common/dotnet-install.ps1 +++ b/eng/common/dotnet-install.ps1 @@ -8,9 +8,14 @@ Param( . $PSScriptRoot\tools.ps1 +$dotnetRoot = Join-Path $RepoRoot ".dotnet" + +$installdir = $dotnetRoot try { - $dotnetRoot = Join-Path $RepoRoot ".dotnet" - InstallDotNet $dotnetRoot $version $architecture $runtime $true + if ($architecture -and $architecture.Trim() -eq "x86") { + $installdir = Join-Path $installdir "x86" + } + InstallDotNet $installdir $version $architecture $runtime $true } catch { Write-Host $_ @@ -19,4 +24,4 @@ catch { ExitWithExitCode 1 } -ExitWithExitCode 0 \ No newline at end of file +ExitWithExitCode 0 diff --git a/eng/pipelines/corefx-base.yml b/eng/pipelines/corefx-base.yml index ee8ef95bf687..0cb15e73dc06 100644 --- a/eng/pipelines/corefx-base.yml +++ b/eng/pipelines/corefx-base.yml @@ -22,8 +22,8 @@ parameters: # _framework: (netcoreapp, netfx, uap, etc). # _helixQueues: Windows.Amd64 (Only needed if submitToHelix -> true.) -- Queues should be separated by + if multiple. - # Required: as part of the variables object, the following values need to be passed: - # _outerloop: true | false + # Required: empty | innerloop | outerloop | all + testScope: '' # Optional: _publishTests -> Boolean -> Publish test assets to blob storage if true. # Default: false @@ -75,6 +75,10 @@ jobs: - _msbuildCommonParameters: '' - _archiveTestsParameter: '' - _finalFrameworkArg: -framework $(_framework) + - _testScopeArg: '' + + - ${{ if ne(parameters.testScope, '') }}: + - _testScopeArg: -testScope ${{ parameters.testScope }} - ${{ if ne(job._jobFramework, '')}}: - _finalFrameworkArg: ${{ job._jobFramework }} @@ -148,7 +152,7 @@ jobs: -build -buildtests $(_commonArguments) - /p:OuterLoop=$(_outerloop) + $(_testScopeArg) $(_msbuildCommonParameters) displayName: Build Sources and Tests @@ -195,7 +199,7 @@ jobs: helixQueues: $(_helixQueues) msbuildScript: $(_msbuildCommand) framework: $(_framework) - outerloop: $(_outerloop) + testScope: ${{ parameters.testScope }} ${{ if eq(parameters.isOfficialBuild, 'true') }}: officialBuildId: $(Build.BuildNumber) diff --git a/eng/pipelines/freebsd.yml b/eng/pipelines/freebsd.yml index dc66aa4d53ea..5c18391311ee 100644 --- a/eng/pipelines/freebsd.yml +++ b/eng/pipelines/freebsd.yml @@ -6,14 +6,15 @@ parameters: # Required: value to specify if the full test matrix should be tested # Default: false fullMatrix: false - # Required: value to specify if the build is comming from an outerloop pipeline. - # Default: false - isOuterloopBuild: false + # Optional: value to scope the tests. + # Default: empty + testScope: '' jobs: - template: corefx-base.yml parameters: isOfficialBuild: ${{ parameters.isOfficialBuild }} + testScope: ${{ parameters.testScope }} targetOS: FreeBSD jobs: @@ -31,6 +32,3 @@ jobs: buildScriptPrefix: $(_buildScriptPrefix) submitToHelix: false - - variables: - - _outerloop: ${{ parameters.isOuterloopBuild }} diff --git a/eng/pipelines/helix.yml b/eng/pipelines/helix.yml index 68073f8983e5..b1f0c74396f9 100644 --- a/eng/pipelines/helix.yml +++ b/eng/pipelines/helix.yml @@ -8,7 +8,7 @@ parameters: msbuildScript: '' targetOS: '' officialBuildId: '' - outerloop: '' # true | false + testScope: '' # empty | innerloop | outerloop | all condition: always() steps: @@ -18,7 +18,7 @@ steps: /p:ArchGroup=${{ parameters.archGroup }} /p:ConfigurationGroup=${{ parameters.configuration }} /p:OSGroup=${{ parameters.targetOS }} - /p:OuterLoop=${{ parameters.outerloop }} + /p:testScope=${{ parameters.testScope }} /p:TargetGroup=${{ parameters.framework }} /p:HelixTargetQueues=${{ parameters.helixQueues }} /p:HelixBuild=$(Build.BuildNumber) diff --git a/eng/pipelines/linux.yml b/eng/pipelines/linux.yml index 0e42c2d0703d..7197b6419267 100644 --- a/eng/pipelines/linux.yml +++ b/eng/pipelines/linux.yml @@ -6,14 +6,15 @@ parameters: # Required: value to specify if the full test matrix should be tested # Default: false fullMatrix: false - # Required: value to specify if the build is comming from an outerloop pipeline. - # Default: false - isOuterloopBuild: false + # Optional: value to scope the tests. + # Default: empty + testScope: '' jobs: - template: corefx-base.yml parameters: isOfficialBuild: ${{ parameters.isOfficialBuild }} + testScope: ${{ parameters.testScope }} targetOS: Linux jobs: @@ -50,7 +51,7 @@ jobs: _buildScriptPrefix: '' _buildExtraArguments: /p:RuntimeOS=linux-musl - ${{ if eq(parameters.isOuterloopBuild, 'true') }}: + ${{ if or(eq(parameters.testScope, 'outerloop'), eq(parameters.testScope, 'all')) }}: x64_Debug: _BuildConfig: Debug _architecture: x64 @@ -106,7 +107,6 @@ jobs: submitToHelix: true variables: - - _outerloop: ${{ parameters.isOuterloopBuild }} - linuxArm64Queues: \(Ubuntu.1604.Arm64.Open\)Ubuntu.1604.Arm64.Docker.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-16.04-helix-arm64v8-b049512-20190321153539 - ${{ if eq(parameters.fullMatrix, 'false') }}: @@ -121,7 +121,7 @@ jobs: # Legs without helix testing # Only run this leg in PRs. - - ${{ if and(eq(parameters.isOfficialBuild, 'false'), eq(parameters.isOuterloopBuild, 'false')) }}: + - ${{ if and(eq(parameters.isOfficialBuild, 'false'), and(ne(parameters.testScope, 'outerloop'), ne(parameters.testScope, 'all'))) }}: - job: LinuxNoTest displayName: Linux strategy: @@ -149,6 +149,3 @@ jobs: buildExtraArguments: $(_buildExtraArguments) buildScriptPrefix: $(_buildScriptPrefix) submitToHelix: false - - variables: - - _outerloop: ${{ parameters.isOuterloopBuild }} diff --git a/eng/pipelines/macos.yml b/eng/pipelines/macos.yml index d88b0de00730..779b9a2c5837 100644 --- a/eng/pipelines/macos.yml +++ b/eng/pipelines/macos.yml @@ -6,14 +6,15 @@ parameters: # Required: value to specify if the full test matrix should be tested # Default: false fullMatrix: false - # Required: value to specify if the build is comming from an outerloop pipeline. - # Default: false - isOuterloopBuild: false + # Optional: value to scope the tests. + # Default: empty + testScope: '' jobs: - template: corefx-base.yml parameters: isOfficialBuild: ${{ parameters.isOfficialBuild }} + testScope: ${{ parameters.testScope }} targetOS: OSX jobs: @@ -51,8 +52,6 @@ jobs: submitToHelix: true variables: - - _outerloop: ${{ parameters.isOuterloopBuild }} - - ${{ if eq(parameters.isOfficialBuild, 'false') }}: - macOSQueues: OSX.1012.Amd64.Open+OSX.1013.Amd64.Open diff --git a/eng/pipelines/outerloop.yml b/eng/pipelines/outerloop.yml index edc82b29c9b7..3dc88a70cb79 100644 --- a/eng/pipelines/outerloop.yml +++ b/eng/pipelines/outerloop.yml @@ -27,7 +27,7 @@ jobs: parameters: isOfficialBuild: ${{ and(ne(variables['System.TeamProject'], 'public'), notIn(variables['Build.Reason'], 'PullRequest')) }} fullMatrix: ${{ notIn(variables['Build.Reason'], 'PullRequest') }} - isOuterloopBuild: true + testScope: outerloop # Linux outerloop legs - ${{ if or(endsWith(variables['Build.DefinitionName'], 'linux'), endsWith(variables['Build.DefinitionName'], 'outerloop')) }}: @@ -35,7 +35,7 @@ jobs: parameters: isOfficialBuild: ${{ and(ne(variables['System.TeamProject'], 'public'), notIn(variables['Build.Reason'], 'PullRequest')) }} fullMatrix: ${{ notIn(variables['Build.Reason'], 'PullRequest') }} - isOuterloopBuild: true + testScope: outerloop # MacOS outerloop legs - ${{ if or(endsWith(variables['Build.DefinitionName'], 'osx'), endsWith(variables['Build.DefinitionName'], 'outerloop')) }}: @@ -43,4 +43,4 @@ jobs: parameters: isOfficialBuild: ${{ and(ne(variables['System.TeamProject'], 'public'), notIn(variables['Build.Reason'], 'PullRequest')) }} fullMatrix: ${{ notIn(variables['Build.Reason'], 'PullRequest') }} - isOuterloopBuild: true \ No newline at end of file + testScope: outerloop \ No newline at end of file diff --git a/eng/pipelines/redhat6.yml b/eng/pipelines/redhat6.yml index c7ba361daca4..af7f71776274 100644 --- a/eng/pipelines/redhat6.yml +++ b/eng/pipelines/redhat6.yml @@ -6,14 +6,15 @@ parameters: # Required: value to specify if the full test matrix should be tested # Default: false fullMatrix: false - # Required: value to specify if the build is comming from an outerloop pipeline. - # Default: false - isOuterloopBuild: false + # Optional: value to scope the tests. + # Default: empty + testScope: '' jobs: - template: corefx-base.yml parameters: isOfficialBuild: ${{ parameters.isOfficialBuild }} + testScope: ${{ parameters.testScope }} targetOS: Linux jobs: @@ -36,5 +37,4 @@ jobs: submitToHelix: true variables: - - _outerloop: ${{ parameters.isOuterloopBuild }} - redhatHelixQueue: RedHat.6.Amd64.Open diff --git a/eng/pipelines/windows.yml b/eng/pipelines/windows.yml index 8be4808ba50d..30cffd3d6ed5 100644 --- a/eng/pipelines/windows.yml +++ b/eng/pipelines/windows.yml @@ -6,15 +6,16 @@ parameters: # Required: value to specify if the full test matrix should be tested # Default: false fullMatrix: false - # Required: value to specify if the build is comming from an outerloop pipeline. - # Default: false - isOuterloopBuild: false + # Optional: value to scope the tests. + # Default: empty + testScope: '' jobs: - template: corefx-base.yml parameters: isOfficialBuild: ${{ parameters.isOfficialBuild }} + testScope: ${{ parameters.testScope }} targetOS: Windows_NT jobs: @@ -51,7 +52,7 @@ jobs: _helixQueues: $(uapNetfxQueues) # Run arm on the matrix or in Outerloop - ${{ if or(eq(parameters.fullMatrix, 'true'), eq(parameters.isOuterloopBuild, 'true')) }}: + ${{ if or(eq(parameters.fullMatrix, 'true'), or(eq(parameters.testScope, 'outerloop'), eq(parameters.testScope, 'all'))) }}: arm64_Release: _BuildConfig: Release _architecture: arm64 @@ -108,8 +109,6 @@ jobs: buildExtraArguments: /p:RuntimeOS=win10 variables: - - _outerloop: ${{ parameters.isOuterloopBuild }} - - nanoQueues: "`(Windows.Nano.1803.Amd64.Open`)windows.10.amd64.serverrs4.open@mcr.microsoft.com/dotnet-buildtools/prereqs:nanoserver-1803-helix-amd64-05227e1-20190509225944" - uapNetfxQueues: Windows.10.Amd64.ClientRS5.Open - windowsArmQueue: Windows.10.Arm64.Open @@ -121,7 +120,7 @@ jobs: - netcoreappWindowsQueues: Windows.7.Amd64.Open+Windows.81.Amd64.Open+Windows.10.Amd64.ClientRS4.Open+Windows.10.Amd64.ServerRS5.Open # There is no point of running legs without outerloop tests, when in an outerloop build. - - ${{ if eq(parameters.isOuterloopBuild, 'false') }}: + - ${{ if and(ne(parameters.testScope, 'outerloop'), ne(parameters.testScope, 'all')) }}: # Packaging all configurations - job: AllConfigurations displayName: Packaging All Configurations @@ -150,7 +149,6 @@ jobs: buildExtraArguments: /p:RuntimeOS=win10 variables: - - _outerloop: false - allConfigurationsQueues: Windows.10.Amd64.ClientRS5.Open _jobFramework: -allConfigurations @@ -194,6 +192,3 @@ jobs: submitToHelix: false buildExtraArguments: /p:RuntimeOS=win10 - - variables: - - _outerloop: ${{ parameters.isOuterloopBuild }} diff --git a/eng/sendtohelix.proj b/eng/sendtohelix.proj index 811752551651..54ab043b7172 100644 --- a/eng/sendtohelix.proj +++ b/eng/sendtohelix.proj @@ -2,7 +2,6 @@ pr/ - official/ $(HelixSourcePrefix)dotnet/corefx $(HelixSource)/$(BUILD_SOURCEBRANCH) @@ -37,11 +36,9 @@ - test/functional/cli/ - $(HelixType)/outerloop/ + innerloop + test/functional/cli/$(TestFilter)/ test/functional/packaging/ - test/functional/desktop/cli/ - test/functional/uwp/ diff --git a/global.json b/global.json index fc63cbcab116..c0c59e7301c0 100644 --- a/global.json +++ b/global.json @@ -3,8 +3,8 @@ "dotnet": "3.0.100-preview6-011681" }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19266.4", - "Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19266.4", + "Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19267.7", + "Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19267.7", "FIX-85B6-MERGE-9C38-CONFLICT": "1.0.0", "Microsoft.NET.Sdk.IL": "3.0.0-preview6-27714-72" } From 5052645a2616385f3df1575de108d8a1c4bd6b76 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Sat, 18 May 2019 19:16:18 +0200 Subject: [PATCH 410/607] Update dependencies from https://github.com/dotnet/arcade build 20190517.7 (#37771) - Microsoft.DotNet.XUnitExtensions - 2.4.0-beta.19267.7 - Microsoft.DotNet.XUnitConsoleRunner - 2.5.1-beta.19267.7 - Microsoft.DotNet.VersionTools.Tasks - 1.0.0-beta.19267.7 - Microsoft.DotNet.ApiCompat - 1.0.0-beta.19267.7 - Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19267.7 - Microsoft.DotNet.Build.Tasks.Configuration - 1.0.0-beta.19267.7 - Microsoft.DotNet.Build.Tasks.Feed - 2.2.0-beta.19267.7 - Microsoft.DotNet.Build.Tasks.Packaging - 1.0.0-beta.19267.7 - Microsoft.DotNet.CodeAnalysis - 1.0.0-beta.19267.7 - Microsoft.DotNet.CoreFxTesting - 1.0.0-beta.19267.7 - Microsoft.DotNet.GenAPI - 1.0.0-beta.19267.7 - Microsoft.DotNet.GenFacades - 1.0.0-beta.19267.7 - Microsoft.DotNet.Helix.Sdk - 2.0.0-beta.19267.7 - Microsoft.DotNet.RemoteExecutor - 1.0.0-beta.19267.7 From 7da9cead23b9b6a45b2a5189fb961d61ae83ac19 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Sat, 18 May 2019 19:16:44 +0200 Subject: [PATCH 411/607] Update dependencies from https://github.com/dotnet/core-setup build 20190517.14 (#37772) - Microsoft.NETCore.App - 3.0.0-preview6-27717-14 - Microsoft.NETCore.DotNetHost - 3.0.0-preview6-27717-14 - Microsoft.NETCore.DotNetHostPolicy - 3.0.0-preview6-27717-14 --- eng/Version.Details.xml | 12 ++++++------ eng/Versions.props | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index cb4434496c26..a24e591ba3bf 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -14,17 +14,17 @@ - + https://github.com/dotnet/core-setup - 5cf9beae08ee36fb97669ea2f5248b19e10292bb + 5fe287f34ad0bf403b75ce17d8c7b19f21c744de - + https://github.com/dotnet/core-setup - 5cf9beae08ee36fb97669ea2f5248b19e10292bb + 5fe287f34ad0bf403b75ce17d8c7b19f21c744de - + https://github.com/dotnet/core-setup - 5cf9beae08ee36fb97669ea2f5248b19e10292bb + 5fe287f34ad0bf403b75ce17d8c7b19f21c744de https://github.com/dotnet/corefx diff --git a/eng/Versions.props b/eng/Versions.props index d6706bc71e66..b48f9a30df21 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -36,9 +36,9 @@ 2.2.0-beta.19267.7 1.0.0-beta.19267.7 - 3.0.0-preview6-27716-11 - 3.0.0-preview6-27716-11 - 3.0.0-preview6-27716-11 + 3.0.0-preview6-27717-14 + 3.0.0-preview6-27717-14 + 3.0.0-preview6-27717-14 3.0.0-preview6-27714-72 3.0.0-preview6-27714-72 From 03a38b32d1c2e4075686541e37ebf0d4d37e1c39 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Sat, 18 May 2019 19:17:47 +0200 Subject: [PATCH 412/607] Update dependencies from https://github.com/dotnet/corefx build 20190517.12 (#37773) - runtime.native.System.IO.Ports - 4.6.0-preview6.19267.12 - Microsoft.NETCore.Platforms - 3.0.0-preview6.19267.12 --- eng/Version.Details.xml | 8 ++++---- eng/Versions.props | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index a24e591ba3bf..d078217d07d7 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -26,13 +26,13 @@ https://github.com/dotnet/core-setup 5fe287f34ad0bf403b75ce17d8c7b19f21c744de - + https://github.com/dotnet/corefx - 6f9570e012054bf407778c0b07632e7733ecbb13 + c671ce2be16ae3c6086a061d9d94b81005217735 - + https://github.com/dotnet/corefx - 6f9570e012054bf407778c0b07632e7733ecbb13 + c671ce2be16ae3c6086a061d9d94b81005217735 https://github.com/dotnet/arcade diff --git a/eng/Versions.props b/eng/Versions.props index b48f9a30df21..15981cf4760c 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -43,8 +43,8 @@ 3.0.0-preview6-27714-72 3.0.0-preview6-27714-72 - 3.0.0-preview6.19266.12 - 4.6.0-preview6.19266.12 + 3.0.0-preview6.19267.12 + 4.6.0-preview6.19267.12 2.1.0-prerelease.19267.1 From 20bd7bb8e0871fc77f3bb7fd7c32dd79d733e7cf Mon Sep 17 00:00:00 2001 From: Immo Landwerth Date: Sat, 18 May 2019 10:22:34 -0700 Subject: [PATCH 413/607] Enable C# mode command line diff (#37767) * Remove trailing whitespace * Enable C# mode command line diff When diffing on the command line, enabling this ensures that hunk headers will use the containing construct (i.e. method, type, or namespace). For example, instead of this (pay attention to the @@ line): diff --git a/src/netstandard/ref/System.Security.Cryptography.cs b/src/netstandard/ref/System.Security.Cryptography.cs index 9f68653..19d239a 100644 --- a/src/netstandard/ref/System.Security.Cryptography.cs +++ b/src/netstandard/ref/System.Security.Cryptography.cs @@ -101,8 +101,20 @@ namespace System.Security.Cryptography public virtual byte[] ExportEncryptedPkcs8PrivateKey(System.ReadOnlySpan password, System.Security.Cryptography.PbeParameters pbeParameters) { throw null; } public virtual byte[] ExportPkcs8PrivateKey() { throw null; } + public virtual byte[] ExportSubjectPublicKeyInfo() { throw null; } public virtual void FromXmlString(string xmlString) { } } public abstract partial class AsymmetricKeyExchangeDeformatter { you'll see this: diff --git a/src/netstandard/ref/System.Security.Cryptography.cs b/src/netstandard/ref/System.Security.Cryptography.cs index 9f68653..19d239a 100644 --- a/src/netstandard/ref/System.Security.Cryptography.cs +++ b/src/netstandard/ref/System.Security.Cryptography.cs @@ -101,8 +101,20 @@ public abstract partial class AsymmetricAlgorithm : System.IDisposable public virtual byte[] ExportEncryptedPkcs8PrivateKey(System.ReadOnlySpan password, System.Security.Cryptography.PbeParameters pbeParameters) { throw null; } public virtual byte[] ExportPkcs8PrivateKey() { throw null; } + public virtual byte[] ExportSubjectPublicKeyInfo() { throw null; } public virtual void FromXmlString(string xmlString) { } } public abstract partial class AsymmetricKeyExchangeDeformatter { --- .gitattributes | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.gitattributes b/.gitattributes index 9ae9a523dc8c..b73e97feb3d2 100644 --- a/.gitattributes +++ b/.gitattributes @@ -10,14 +10,14 @@ # default for csharp files. # Note: This is only used by command line ############################################################################### -#*.cs diff=csharp +*.cs diff=csharp ############################################################################### # Set the merge driver for project and solution files # # Merging from the command prompt will add diff markers to the files if there # are conflicts (Merging from VS is not affected by the settings below, in VS -# the diff markers are never inserted). Diff markers may cause the following +# the diff markers are never inserted). Diff markers may cause the following # file extensions to fail to load in VS. An alternative would be to treat # these files as binary and thus will always conflict and require user # intervention with every merge. To do so, just uncomment the entries below @@ -46,9 +46,9 @@ ############################################################################### # diff behavior for common document formats -# +# # Convert binary document formats to text before diffing them. This feature -# is only available from the command line. Turn it on by uncommenting the +# is only available from the command line. Turn it on by uncommenting the # entries below. ############################################################################### #*.doc diff=astextplain From c93e46bdff2731b6825774431e4b10e31d8e371c Mon Sep 17 00:00:00 2001 From: Dotnet-GitSync-Bot <45578709+Dotnet-GitSync-Bot@users.noreply.github.com> Date: Sat, 18 May 2019 10:38:51 -0700 Subject: [PATCH 414/607] Fixing the Dragon4 algorithm to correctly handle when the first significant digit is after the cutoff (#24484) (#37769) Signed-off-by: dotnet-bot --- .../src/CoreLib/System/Number.Dragon4.cs | 35 +++++++++++++++---- 1 file changed, 29 insertions(+), 6 deletions(-) diff --git a/src/Common/src/CoreLib/System/Number.Dragon4.cs b/src/Common/src/CoreLib/System/Number.Dragon4.cs index 30704975fbf3..b7a6bbaf62c1 100644 --- a/src/Common/src/CoreLib/System/Number.Dragon4.cs +++ b/src/Common/src/CoreLib/System/Number.Dragon4.cs @@ -277,7 +277,7 @@ private static unsafe uint Dragon4(ulong mantissa, int exponent, uint mantissaHi } // Output the exponent of the first digit we will print - decimalExponent = digitExponent - 1; + decimalExponent = --digitExponent; // In preparation for calling BigInteger.HeuristicDivie(), we need to scale up our values such that the highest block of the denominator is greater than or equal to 8. // We also need to guarantee that the numerator can never have a length greater than the denominator after each loop iteration. @@ -315,14 +315,13 @@ private static unsafe uint Dragon4(ulong mantissa, int exponent, uint mantissaHi if (cutoffNumber == -1) { Debug.Assert(isSignificantDigits); + Debug.Assert(digitExponent >= cutoffExponent); // For the unique cutoff mode, we will try to print until we have reached a level of precision that uniquely distinguishes this value from its neighbors. // If we run out of space in the output buffer, we terminate early. while (true) { - digitExponent = digitExponent - 1; - // divide out the scale to extract the digit outputDigit = BigInteger.HeuristicDivide(ref scaledValue, ref scale); Debug.Assert(outputDigit < 10); @@ -351,9 +350,11 @@ private static unsafe uint Dragon4(ulong mantissa, int exponent, uint mantissaHi { BigInteger.Multiply(ref scaledMarginLow, 2, ref *pScaledMarginHigh); } + + digitExponent--; } } - else + else if (digitExponent >= cutoffExponent) { Debug.Assert((cutoffNumber > 0) || ((cutoffNumber == 0) && !isSignificantDigits)); @@ -363,8 +364,6 @@ private static unsafe uint Dragon4(ulong mantissa, int exponent, uint mantissaHi while (true) { - digitExponent = digitExponent - 1; - // divide out the scale to extract the digit outputDigit = BigInteger.HeuristicDivide(ref scaledValue, ref scale); Debug.Assert(outputDigit < 10); @@ -380,7 +379,31 @@ private static unsafe uint Dragon4(ulong mantissa, int exponent, uint mantissaHi // multiply larger by the output base scaledValue.Multiply10(); + digitExponent--; + } + } + else + { + // In the scenario where the first significand digit is after the cutoff, we want to treat that + // first significand digit as the rounding digit and increase the decimalExponent by one. This + // ensures we correctly handle the case where the first significand digit is exactly one after + // the cutoff, it is a 4, and the subsequent digit would round that to 5 inducing a double rounding + // bug when NumberToString is does its own rounding checks. + + decimalExponent++; + + // divide out the scale to extract the digit + outputDigit = BigInteger.HeuristicDivide(ref scaledValue, ref scale); + Debug.Assert(outputDigit < 10); + + if ((outputDigit > 5) || ((outputDigit == 5) && !scaledValue.IsZero())) + { + buffer[curDigit] = (byte)('1'); + curDigit += 1; } + + // return the number of digits output + return (uint)(curDigit); } // round off the final digit From 36ad1c62d4bb753a489d4c055b909af2cb6d407f Mon Sep 17 00:00:00 2001 From: Santiago Fernandez Madero Date: Fri, 17 May 2019 17:48:27 -0700 Subject: [PATCH 415/607] Add IsVariableBoundArray to TypeDelegator (dotnet/coreclr#24637) Signed-off-by: dotnet-bot --- src/Common/src/CoreLib/System/Reflection/TypeDelegator.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Common/src/CoreLib/System/Reflection/TypeDelegator.cs b/src/Common/src/CoreLib/System/Reflection/TypeDelegator.cs index 8623dbd0dbea..81112c9d10a0 100644 --- a/src/Common/src/CoreLib/System/Reflection/TypeDelegator.cs +++ b/src/Common/src/CoreLib/System/Reflection/TypeDelegator.cs @@ -101,6 +101,7 @@ public TypeDelegator(Type delegatingType) public override bool IsTypeDefinition => typeImpl.IsTypeDefinition; public override bool IsSZArray => typeImpl.IsSZArray; + public override bool IsVariableBoundArray => typeImpl.IsVariableBoundArray; protected override bool IsArrayImpl() => typeImpl.IsArray; protected override bool IsPrimitiveImpl() => typeImpl.IsPrimitive; From 771b70fa8d8ca205866315e111358d3a19fc4ff1 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Sun, 19 May 2019 08:06:13 -0700 Subject: [PATCH 416/607] Update dependencies from https://github.com/dotnet/corefx build 20190518.5 (#37783) - runtime.native.System.IO.Ports - 4.6.0-preview6.19268.5 - Microsoft.NETCore.Platforms - 3.0.0-preview6.19268.5 --- eng/Version.Details.xml | 8 ++++---- eng/Versions.props | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index d078217d07d7..320f783cbf5e 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -26,13 +26,13 @@ https://github.com/dotnet/core-setup 5fe287f34ad0bf403b75ce17d8c7b19f21c744de - + https://github.com/dotnet/corefx - c671ce2be16ae3c6086a061d9d94b81005217735 + 36ad1c62d4bb753a489d4c055b909af2cb6d407f - + https://github.com/dotnet/corefx - c671ce2be16ae3c6086a061d9d94b81005217735 + 36ad1c62d4bb753a489d4c055b909af2cb6d407f https://github.com/dotnet/arcade diff --git a/eng/Versions.props b/eng/Versions.props index 15981cf4760c..11d8738613ed 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -43,8 +43,8 @@ 3.0.0-preview6-27714-72 3.0.0-preview6-27714-72 - 3.0.0-preview6.19267.12 - 4.6.0-preview6.19267.12 + 3.0.0-preview6.19268.5 + 4.6.0-preview6.19268.5 2.1.0-prerelease.19267.1 From f18cfc2d6f230390e315a285b4f9de094d43d896 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Sun, 19 May 2019 08:06:59 -0700 Subject: [PATCH 417/607] Update dependencies from https://github.com/dotnet/core-setup build 20190518.08 (#37782) - Microsoft.NETCore.App - 3.0.0-preview6-27718-08 - Microsoft.NETCore.DotNetHost - 3.0.0-preview6-27718-08 - Microsoft.NETCore.DotNetHostPolicy - 3.0.0-preview6-27718-08 --- eng/Version.Details.xml | 12 ++++++------ eng/Versions.props | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 320f783cbf5e..837dd414b287 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -14,17 +14,17 @@ - + https://github.com/dotnet/core-setup - 5fe287f34ad0bf403b75ce17d8c7b19f21c744de + 7c7a2e90741b0efcba4bea89f7fcbcfbc1f61120 - + https://github.com/dotnet/core-setup - 5fe287f34ad0bf403b75ce17d8c7b19f21c744de + 7c7a2e90741b0efcba4bea89f7fcbcfbc1f61120 - + https://github.com/dotnet/core-setup - 5fe287f34ad0bf403b75ce17d8c7b19f21c744de + 7c7a2e90741b0efcba4bea89f7fcbcfbc1f61120 https://github.com/dotnet/corefx diff --git a/eng/Versions.props b/eng/Versions.props index 11d8738613ed..bea84dead951 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -36,9 +36,9 @@ 2.2.0-beta.19267.7 1.0.0-beta.19267.7 - 3.0.0-preview6-27717-14 - 3.0.0-preview6-27717-14 - 3.0.0-preview6-27717-14 + 3.0.0-preview6-27718-08 + 3.0.0-preview6-27718-08 + 3.0.0-preview6-27718-08 3.0.0-preview6-27714-72 3.0.0-preview6-27714-72 From 1ad66d3ba3008d2f2db0087626ce05b3fe136511 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Sun, 19 May 2019 08:07:23 -0700 Subject: [PATCH 418/607] Update dependencies from https://github.com/dotnet/arcade build 20190518.2 (#37781) - Microsoft.DotNet.XUnitExtensions - 2.4.0-beta.19268.2 - Microsoft.DotNet.XUnitConsoleRunner - 2.5.1-beta.19268.2 - Microsoft.DotNet.VersionTools.Tasks - 1.0.0-beta.19268.2 - Microsoft.DotNet.ApiCompat - 1.0.0-beta.19268.2 - Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19268.2 - Microsoft.DotNet.Build.Tasks.Configuration - 1.0.0-beta.19268.2 - Microsoft.DotNet.Build.Tasks.Feed - 2.2.0-beta.19268.2 - Microsoft.DotNet.Build.Tasks.Packaging - 1.0.0-beta.19268.2 - Microsoft.DotNet.CodeAnalysis - 1.0.0-beta.19268.2 - Microsoft.DotNet.CoreFxTesting - 1.0.0-beta.19268.2 - Microsoft.DotNet.GenAPI - 1.0.0-beta.19268.2 - Microsoft.DotNet.GenFacades - 1.0.0-beta.19268.2 - Microsoft.DotNet.Helix.Sdk - 2.0.0-beta.19268.2 - Microsoft.DotNet.RemoteExecutor - 1.0.0-beta.19268.2 --- eng/Version.Details.xml | 56 ++++++++++++++++++++--------------------- eng/Versions.props | 24 +++++++++--------- global.json | 4 +-- 3 files changed, 42 insertions(+), 42 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 837dd414b287..2cf8a8339fd6 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -34,65 +34,65 @@ https://github.com/dotnet/corefx 36ad1c62d4bb753a489d4c055b909af2cb6d407f - + https://github.com/dotnet/arcade - 55ce2900743cb609e51e2c6487e87e42eb627880 + 6d0514d3da59137630b9add5b5e619bce2631f02 https://github.com/dotnet/standard ca3d6589882127004ada76201d11caeef77dda14 - + https://github.com/dotnet/arcade - 55ce2900743cb609e51e2c6487e87e42eb627880 + 6d0514d3da59137630b9add5b5e619bce2631f02 - + https://github.com/dotnet/arcade - 55ce2900743cb609e51e2c6487e87e42eb627880 + 6d0514d3da59137630b9add5b5e619bce2631f02 - + https://github.com/dotnet/arcade - 55ce2900743cb609e51e2c6487e87e42eb627880 + 6d0514d3da59137630b9add5b5e619bce2631f02 - + https://github.com/dotnet/arcade - 55ce2900743cb609e51e2c6487e87e42eb627880 + 6d0514d3da59137630b9add5b5e619bce2631f02 - + https://github.com/dotnet/arcade - 55ce2900743cb609e51e2c6487e87e42eb627880 + 6d0514d3da59137630b9add5b5e619bce2631f02 - + https://github.com/dotnet/arcade - 55ce2900743cb609e51e2c6487e87e42eb627880 + 6d0514d3da59137630b9add5b5e619bce2631f02 - + https://github.com/dotnet/arcade - 55ce2900743cb609e51e2c6487e87e42eb627880 + 6d0514d3da59137630b9add5b5e619bce2631f02 - + https://github.com/dotnet/arcade - 55ce2900743cb609e51e2c6487e87e42eb627880 + 6d0514d3da59137630b9add5b5e619bce2631f02 - + https://github.com/dotnet/arcade - 55ce2900743cb609e51e2c6487e87e42eb627880 + 6d0514d3da59137630b9add5b5e619bce2631f02 - + https://github.com/dotnet/arcade - 55ce2900743cb609e51e2c6487e87e42eb627880 + 6d0514d3da59137630b9add5b5e619bce2631f02 - + https://github.com/dotnet/arcade - 55ce2900743cb609e51e2c6487e87e42eb627880 + 6d0514d3da59137630b9add5b5e619bce2631f02 - + https://github.com/dotnet/arcade - 55ce2900743cb609e51e2c6487e87e42eb627880 + 6d0514d3da59137630b9add5b5e619bce2631f02 - + https://github.com/dotnet/arcade - 55ce2900743cb609e51e2c6487e87e42eb627880 + 6d0514d3da59137630b9add5b5e619bce2631f02 https://dev.azure.com/dnceng/internal/_git/dotnet-optimization diff --git a/eng/Versions.props b/eng/Versions.props index bea84dead951..eb433a202acd 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -23,18 +23,18 @@ - 1.0.0-beta.19267.7 - 1.0.0-beta.19267.7 - 1.0.0-beta.19267.7 - 1.0.0-beta.19267.7 - 2.4.0-beta.19267.7 - 2.5.1-beta.19267.7 - 1.0.0-beta.19267.7 - 1.0.0-beta.19267.7 - 1.0.0-beta.19267.7 - 1.0.0-beta.19267.7 - 2.2.0-beta.19267.7 - 1.0.0-beta.19267.7 + 1.0.0-beta.19268.2 + 1.0.0-beta.19268.2 + 1.0.0-beta.19268.2 + 1.0.0-beta.19268.2 + 2.4.0-beta.19268.2 + 2.5.1-beta.19268.2 + 1.0.0-beta.19268.2 + 1.0.0-beta.19268.2 + 1.0.0-beta.19268.2 + 1.0.0-beta.19268.2 + 2.2.0-beta.19268.2 + 1.0.0-beta.19268.2 3.0.0-preview6-27718-08 3.0.0-preview6-27718-08 diff --git a/global.json b/global.json index c0c59e7301c0..8075e9828b6d 100644 --- a/global.json +++ b/global.json @@ -3,8 +3,8 @@ "dotnet": "3.0.100-preview6-011681" }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19267.7", - "Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19267.7", + "Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19268.2", + "Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19268.2", "FIX-85B6-MERGE-9C38-CONFLICT": "1.0.0", "Microsoft.NET.Sdk.IL": "3.0.0-preview6-27714-72" } From d70ba24c8ca8d8a4384ebe732b3cd748a22e9551 Mon Sep 17 00:00:00 2001 From: Yoh Deadfall Date: Mon, 20 May 2019 04:29:05 +0300 Subject: [PATCH 419/607] Added value type serialization support (#36506) * Added value type serialization support * Fixed coding style issue --- .../src/System.Text.Json.csproj | 1 + .../Serialization/JsonPropertyInfoCommon.cs | 16 +- .../JsonPropertyInfoNotNullable.cs | 6 +- .../Serialization/JsonPropertyInfoNullable.cs | 4 +- .../Text/Json/Serialization/MemberAccessor.cs | 93 ++++++++ .../ReflectionEmitMaterializer.cs | 24 ++- .../tests/Serialization/Object.ReadTests.cs | 7 + .../TestClasses.SimpleTestStruct.cs | 203 ++++++++++++++++++ .../tests/Serialization/TestData.cs | 2 + .../tests/System.Text.Json.Tests.csproj | 1 + 10 files changed, 339 insertions(+), 18 deletions(-) create mode 100644 src/System.Text.Json/src/System/Text/Json/Serialization/MemberAccessor.cs create mode 100644 src/System.Text.Json/tests/Serialization/TestClasses.SimpleTestStruct.cs diff --git a/src/System.Text.Json/src/System.Text.Json.csproj b/src/System.Text.Json/src/System.Text.Json.csproj index 04c2ed9ed43e..585c7e49cfcb 100644 --- a/src/System.Text.Json/src/System.Text.Json.csproj +++ b/src/System.Text.Json/src/System.Text.Json.csproj @@ -104,6 +104,7 @@ + diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfoCommon.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfoCommon.cs index ba674275cb92..7a9aa064ca07 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfoCommon.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfoCommon.cs @@ -16,8 +16,8 @@ namespace System.Text.Json.Serialization /// internal abstract class JsonPropertyInfoCommon : JsonPropertyInfo { - public Func Get { get; private set; } - public Action Set { get; private set; } + public Func Get { get; private set; } + public Action Set { get; private set; } public JsonValueConverter ValueConverter { get; internal set; } @@ -36,13 +36,13 @@ public override void Initialize( if (propertyInfo.GetMethod?.IsPublic == true) { HasGetter = true; - Get = (Func)Delegate.CreateDelegate(typeof(Func), propertyInfo.GetGetMethod()); + Get = MemberAccessor.CreatePropertyGetter(propertyInfo); } if (propertyInfo.SetMethod?.IsPublic == true) { HasSetter = true; - Set = (Action)Delegate.CreateDelegate(typeof(Action), propertyInfo.GetSetMethod()); + Set = MemberAccessor.CreatePropertySetter(propertyInfo); } } else @@ -69,18 +69,18 @@ public override object GetValueAsObject(object obj) return obj; } - Debug.Assert(Get != null); - return Get((TClass)obj); + Debug.Assert(HasGetter); + return Get(obj); } public override void SetValueAsObject(object obj, object value) { - Debug.Assert(Set != null); + Debug.Assert(HasSetter); TDeclaredProperty typedValue = (TDeclaredProperty)value; if (typedValue != null || !IgnoreNullValues) { - Set((TClass)obj, (TDeclaredProperty)value); + Set(obj, typedValue); } } diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfoNotNullable.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfoNotNullable.cs index fa326d04a41b..680f9c388bc7 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfoNotNullable.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfoNotNullable.cs @@ -37,8 +37,8 @@ public override void Read(JsonTokenType tokenType, JsonSerializerOptions options // Null values were already handled. Debug.Assert(value != null); - Set((TClass)state.Current.ReturnValue, value); - } + Set(state.Current.ReturnValue, value); + } return; } @@ -73,7 +73,7 @@ public override void Write(JsonSerializerOptions options, ref WriteStackFrame cu } else { - value = (TRuntimeProperty)Get((TClass)current.CurrentValue); + value = (TRuntimeProperty)Get(current.CurrentValue); } if (value == null) diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfoNullable.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfoNullable.cs index 0a476b1910df..9034f184b939 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfoNullable.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfoNullable.cs @@ -30,7 +30,7 @@ public override void Read(JsonTokenType tokenType, JsonSerializerOptions options } else { - Set((TClass)state.Current.ReturnValue, value); + Set(state.Current.ReturnValue, value); } return; @@ -72,7 +72,7 @@ public override void Write(JsonSerializerOptions options, ref WriteStackFrame cu } else { - value = Get((TClass)current.CurrentValue); + value = Get(current.CurrentValue); } if (value == null) diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/MemberAccessor.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/MemberAccessor.cs new file mode 100644 index 000000000000..167d8125f771 --- /dev/null +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/MemberAccessor.cs @@ -0,0 +1,93 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Reflection; +using System.Runtime.CompilerServices; + +namespace System.Text.Json.Serialization +{ + internal static class MemberAccessor + { + private delegate TProperty GetProperty(TClass obj); + private delegate TProperty GetPropertyByRef(ref TClass obj); + + private delegate void SetProperty(TClass obj, TProperty value); + private delegate void SetPropertyByRef(ref TClass obj, TProperty value); + + private delegate Func GetPropertyByRefFactory(GetPropertyByRef set); + private delegate Action SetPropertyByRefFactory(SetPropertyByRef set); + + private static readonly MethodInfo s_createStructPropertyGetterMethod = new GetPropertyByRefFactory(CreateStructPropertyGetter) + .Method.GetGenericMethodDefinition(); + + private static readonly MethodInfo s_createStructPropertySetterMethod = new SetPropertyByRefFactory(CreateStructPropertySetter) + .Method.GetGenericMethodDefinition(); + + internal static Func CreatePropertyGetter(PropertyInfo propertyInfo) + { + MethodInfo getMethodInfo = propertyInfo.GetGetMethod(); + + if (typeof(TClass).IsValueType) + { + var factory = CreateDelegate>(s_createStructPropertyGetterMethod.MakeGenericMethod(typeof(TClass), typeof(TProperty))); + var propertyGetter = CreateDelegate>(getMethodInfo); + + return factory(propertyGetter); + } + else + { + var propertyGetter = CreateDelegate>(getMethodInfo); + return delegate (object obj) + { + return propertyGetter((TClass)obj); + }; + } + } + + internal static Action CreatePropertySetter(PropertyInfo propertyInfo) + { + MethodInfo setMethodInfo = propertyInfo.GetSetMethod(); + + if (typeof(TClass).IsValueType) + { + var factory = CreateDelegate>(s_createStructPropertySetterMethod.MakeGenericMethod(typeof(TClass), typeof(TProperty))); + var propertySetter = CreateDelegate>(setMethodInfo); + + return factory(propertySetter); + } + else + { + var propertySetter = CreateDelegate>(setMethodInfo); + return delegate (object obj, TProperty value) + { + propertySetter((TClass)obj, value); + }; + } + } + + private static TDelegate CreateDelegate(MethodInfo methodInfo) + where TDelegate : Delegate + { + return (TDelegate)Delegate.CreateDelegate(typeof(TDelegate), methodInfo); + } + + private static Func CreateStructPropertyGetter(GetPropertyByRef get) + where TClass : struct + { + return delegate (object obj) + { + return get(ref Unsafe.Unbox(obj)); + }; + } + + private static Action CreateStructPropertySetter(SetPropertyByRef set) + where TClass : struct + { + return delegate (object obj, TProperty value) + { + set(ref Unsafe.Unbox(obj), value); + }; + } + } +} diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/ReflectionEmitMaterializer.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/ReflectionEmitMaterializer.cs index be5dec15cd46..7af144a96aac 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/ReflectionEmitMaterializer.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/ReflectionEmitMaterializer.cs @@ -15,22 +15,36 @@ internal sealed class ReflectionEmitMaterializer : ClassMaterializer public override JsonClassInfo.ConstructorDelegate CreateConstructor(Type type) { Debug.Assert(type != null); - ConstructorInfo realMethod = type.GetConstructor(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance, binder: null, Type.EmptyTypes, modifiers: null); - if (realMethod == null) + + if (realMethod == null && !type.IsValueType) { return null; } var dynamicMethod = new DynamicMethod( - realMethod.Name, - type, + ConstructorInfo.ConstructorName, + typeof(object), Type.EmptyTypes, typeof(ReflectionEmitMaterializer).Module, skipVisibility: true); ILGenerator generator = dynamicMethod.GetILGenerator(); - generator.Emit(OpCodes.Newobj, realMethod); + + if (realMethod == null) + { + LocalBuilder local = generator.DeclareLocal(type); + + generator.Emit(OpCodes.Ldloca_S, local); + generator.Emit(OpCodes.Initobj, type); + generator.Emit(OpCodes.Ldloc, local); + generator.Emit(OpCodes.Box, type); + } + else + { + generator.Emit(OpCodes.Newobj, realMethod); + } + generator.Emit(OpCodes.Ret); return (JsonClassInfo.ConstructorDelegate)dynamicMethod.CreateDelegate(typeof(JsonClassInfo.ConstructorDelegate)); diff --git a/src/System.Text.Json/tests/Serialization/Object.ReadTests.cs b/src/System.Text.Json/tests/Serialization/Object.ReadTests.cs index 85ff792a8674..ee821b36a696 100644 --- a/src/System.Text.Json/tests/Serialization/Object.ReadTests.cs +++ b/src/System.Text.Json/tests/Serialization/Object.ReadTests.cs @@ -8,6 +8,13 @@ namespace System.Text.Json.Serialization.Tests { public static partial class ObjectTests { + [Fact] + public static void ReadSimpleStruct() + { + SimpleTestStruct obj = JsonSerializer.Parse(SimpleTestStruct.s_json); + obj.Verify(); + } + [Fact] public static void ReadSimpleClass() { diff --git a/src/System.Text.Json/tests/Serialization/TestClasses.SimpleTestStruct.cs b/src/System.Text.Json/tests/Serialization/TestClasses.SimpleTestStruct.cs new file mode 100644 index 000000000000..a5fac97a6219 --- /dev/null +++ b/src/System.Text.Json/tests/Serialization/TestClasses.SimpleTestStruct.cs @@ -0,0 +1,203 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Collections.Generic; +using System.Linq; +using Xunit; + +namespace System.Text.Json.Serialization.Tests +{ + public class SimpleTestStruct : ITestClass + { + public short MyInt16 { get; set; } + public int MyInt32 { get; set; } + public long MyInt64 { get; set; } + public ushort MyUInt16 { get; set; } + public uint MyUInt32 { get; set; } + public ulong MyUInt64 { get; set; } + public byte MyByte { get; set; } + public sbyte MySByte { get; set; } + public char MyChar { get; set; } + public string MyString { get; set; } + public decimal MyDecimal { get; set; } + public bool MyBooleanTrue { get; set; } + public bool MyBooleanFalse { get; set; } + public float MySingle { get; set; } + public double MyDouble { get; set; } + public DateTime MyDateTime { get; set; } + public DateTimeOffset MyDateTimeOffset { get; set; } + public SampleEnum MyEnum { get; set; } + public short[] MyInt16Array { get; set; } + public int[] MyInt32Array { get; set; } + public long[] MyInt64Array { get; set; } + public ushort[] MyUInt16Array { get; set; } + public uint[] MyUInt32Array { get; set; } + public ulong[] MyUInt64Array { get; set; } + public byte[] MyByteArray { get; set; } + public sbyte[] MySByteArray { get; set; } + public char[] MyCharArray { get; set; } + public string[] MyStringArray { get; set; } + public decimal[] MyDecimalArray { get; set; } + public bool[] MyBooleanTrueArray { get; set; } + public bool[] MyBooleanFalseArray { get; set; } + public float[] MySingleArray { get; set; } + public double[] MyDoubleArray { get; set; } + public DateTime[] MyDateTimeArray { get; set; } + public DateTimeOffset[] MyDateTimeOffsetArray { get; set; } + public SampleEnum[] MyEnumArray { get; set; } + public List MyStringList { get; set; } + public IEnumerable MyStringIEnumerableT { get; set; } + public IList MyStringIListT { get; set; } + public ICollection MyStringICollectionT { get; set; } + public IReadOnlyCollection MyStringIReadOnlyCollectionT { get; set; } + public IReadOnlyList MyStringIReadOnlyListT { get; set; } + + public static readonly string s_json = $"{{{s_partialJsonProperties},{s_partialJsonArrays}}}"; + public static readonly string s_json_flipped = $"{{{s_partialJsonArrays},{s_partialJsonProperties}}}"; + + private const string s_partialJsonProperties = + @"""MyInt16"" : 1," + + @"""MyInt32"" : 2," + + @"""MyInt64"" : 3," + + @"""MyUInt16"" : 4," + + @"""MyUInt32"" : 5," + + @"""MyUInt64"" : 6," + + @"""MyByte"" : 7," + + @"""MySByte"" : 8," + + @"""MyChar"" : ""a""," + + @"""MyString"" : ""Hello""," + + @"""MyBooleanTrue"" : true," + + @"""MyBooleanFalse"" : false," + + @"""MySingle"" : 1.1," + + @"""MyDouble"" : 2.2," + + @"""MyDecimal"" : 3.3," + + @"""MyDateTime"" : ""2019-01-30T12:01:02.0000000Z""," + + @"""MyDateTimeOffset"" : ""2019-01-30T12:01:02.0000000+01:00""," + + @"""MyEnum"" : 2"; // int by default + + private const string s_partialJsonArrays = + @"""MyInt16Array"" : [1]," + + @"""MyInt32Array"" : [2]," + + @"""MyInt64Array"" : [3]," + + @"""MyUInt16Array"" : [4]," + + @"""MyUInt32Array"" : [5]," + + @"""MyUInt64Array"" : [6]," + + @"""MyByteArray"" : [7]," + + @"""MySByteArray"" : [8]," + + @"""MyCharArray"" : [""a""]," + + @"""MyStringArray"" : [""Hello""]," + + @"""MyBooleanTrueArray"" : [true]," + + @"""MyBooleanFalseArray"" : [false]," + + @"""MySingleArray"" : [1.1]," + + @"""MyDoubleArray"" : [2.2]," + + @"""MyDecimalArray"" : [3.3]," + + @"""MyDateTimeArray"" : [""2019-01-30T12:01:02.0000000Z""]," + + @"""MyDateTimeOffsetArray"" : [""2019-01-30T12:01:02.0000000+01:00""]," + + @"""MyEnumArray"" : [2]," + // int by default + @"""MyStringList"" : [""Hello""]," + + @"""MyStringIEnumerableT"" : [""Hello""]," + + @"""MyStringIListT"" : [""Hello""]," + + @"""MyStringICollectionT"" : [""Hello""]," + + @"""MyStringIReadOnlyCollectionT"" : [""Hello""]," + + @"""MyStringIReadOnlyListT"" : [""Hello""]"; + + public static readonly byte[] s_data = Encoding.UTF8.GetBytes(s_json); + + public void Initialize() + { + MyInt16 = 1; + MyInt32 = 2; + MyInt64 = 3; + MyUInt16 = 4; + MyUInt32 = 5; + MyUInt64 = 6; + MyByte = 7; + MySByte = 8; + MyChar = 'a'; + MyString = "Hello"; + MyBooleanTrue = true; + MyBooleanFalse = false; + MySingle = 1.1f; + MyDouble = 2.2d; + MyDecimal = 3.3m; + MyDateTime = new DateTime(2019, 1, 30, 12, 1, 2, DateTimeKind.Utc); + MyDateTimeOffset = new DateTimeOffset(2019, 1, 30, 12, 1, 2, new TimeSpan(1, 0, 0)); + MyEnum = SampleEnum.Two; + + MyInt16Array = new short[] { 1 }; + MyInt32Array = new int[] { 2 }; + MyInt64Array = new long[] { 3 }; + MyUInt16Array = new ushort[] { 4 }; + MyUInt32Array = new uint[] { 5 }; + MyUInt64Array = new ulong[] { 6 }; + MyByteArray = new byte[] { 7 }; + MySByteArray = new sbyte[] { 8 }; + MyCharArray = new char[] { 'a' }; + MyStringArray = new string[] { "Hello" }; + MyBooleanTrueArray = new bool[] { true }; + MyBooleanFalseArray = new bool[] { false }; + MySingleArray = new float[] { 1.1f }; + MyDoubleArray = new double[] { 2.2d }; + MyDecimalArray = new decimal[] { 3.3m }; + MyDateTimeArray = new DateTime[] { new DateTime(2019, 1, 30, 12, 1, 2, DateTimeKind.Utc) }; + MyDateTimeOffsetArray = new DateTimeOffset[] { new DateTimeOffset(2019, 1, 30, 12, 1, 2, new TimeSpan(1, 0, 0)) }; + MyEnumArray = new SampleEnum[] { SampleEnum.Two }; + + MyStringList = new List() { "Hello" }; + MyStringIEnumerableT = new string[] { "Hello" }; + MyStringIListT = new string[] { "Hello" }; + MyStringICollectionT = new string[] { "Hello" }; + MyStringIReadOnlyCollectionT = new string[] { "Hello" }; + MyStringIReadOnlyListT = new string[] { "Hello" }; + } + + public void Verify() + { + Assert.Equal((short)1, MyInt16); + Assert.Equal((int)2, MyInt32); + Assert.Equal((long)3, MyInt64); + Assert.Equal((ushort)4, MyUInt16); + Assert.Equal((uint)5, MyUInt32); + Assert.Equal((ulong)6, MyUInt64); + Assert.Equal((byte)7, MyByte); + Assert.Equal((sbyte)8, MySByte); + Assert.Equal('a', MyChar); + Assert.Equal("Hello", MyString); + Assert.Equal(3.3m, MyDecimal); + Assert.Equal(false, MyBooleanFalse); + Assert.Equal(true, MyBooleanTrue); + Assert.Equal(1.1f, MySingle); + Assert.Equal(2.2d, MyDouble); + Assert.Equal(new DateTime(2019, 1, 30, 12, 1, 2, DateTimeKind.Utc), MyDateTime); + Assert.Equal(new DateTimeOffset(2019, 1, 30, 12, 1, 2, new TimeSpan(1, 0, 0)), MyDateTimeOffset); + Assert.Equal(SampleEnum.Two, MyEnum); + + Assert.Equal((short)1, MyInt16Array[0]); + Assert.Equal((int)2, MyInt32Array[0]); + Assert.Equal((long)3, MyInt64Array[0]); + Assert.Equal((ushort)4, MyUInt16Array[0]); + Assert.Equal((uint)5, MyUInt32Array[0]); + Assert.Equal((ulong)6, MyUInt64Array[0]); + Assert.Equal((byte)7, MyByteArray[0]); + Assert.Equal((sbyte)8, MySByteArray[0]); + Assert.Equal('a', MyCharArray[0]); + Assert.Equal("Hello", MyStringArray[0]); + Assert.Equal(3.3m, MyDecimalArray[0]); + Assert.Equal(false, MyBooleanFalseArray[0]); + Assert.Equal(true, MyBooleanTrueArray[0]); + Assert.Equal(1.1f, MySingleArray[0]); + Assert.Equal(2.2d, MyDoubleArray[0]); + Assert.Equal(new DateTime(2019, 1, 30, 12, 1, 2, DateTimeKind.Utc), MyDateTimeArray[0]); + Assert.Equal(new DateTimeOffset(2019, 1, 30, 12, 1, 2, new TimeSpan(1, 0, 0)), MyDateTimeOffsetArray[0]); + Assert.Equal(SampleEnum.Two, MyEnumArray[0]); + + Assert.Equal("Hello", MyStringList[0]); + Assert.Equal("Hello", MyStringIEnumerableT.First()); + Assert.Equal("Hello", MyStringIListT[0]); + Assert.Equal("Hello", MyStringICollectionT.First()); + Assert.Equal("Hello", MyStringIReadOnlyCollectionT.First()); + Assert.Equal("Hello", MyStringIReadOnlyListT[0]); + } + } +} diff --git a/src/System.Text.Json/tests/Serialization/TestData.cs b/src/System.Text.Json/tests/Serialization/TestData.cs index ebf962f2a232..8be65ec9cc75 100644 --- a/src/System.Text.Json/tests/Serialization/TestData.cs +++ b/src/System.Text.Json/tests/Serialization/TestData.cs @@ -12,6 +12,7 @@ public static IEnumerable ReadSuccessCases { get { + yield return new object[] { typeof(SimpleTestStruct), SimpleTestStruct.s_data }; yield return new object[] { typeof(SimpleTestClass), SimpleTestClass.s_data }; yield return new object[] { typeof(SimpleTestClassWithNullables), SimpleTestClassWithNullables.s_data }; yield return new object[] { typeof(SimpleTestClassWithNulls), SimpleTestClassWithNulls.s_data }; @@ -46,6 +47,7 @@ public static IEnumerable WriteSuccessCases { get { + yield return new object[] { new SimpleTestStruct() }; yield return new object[] { new SimpleTestClass() }; yield return new object[] { new SimpleTestClassWithNullables() }; yield return new object[] { new SimpleTestClassWithNulls() }; diff --git a/src/System.Text.Json/tests/System.Text.Json.Tests.csproj b/src/System.Text.Json/tests/System.Text.Json.Tests.csproj index 3f0bb1cd4c26..137c99a23b66 100644 --- a/src/System.Text.Json/tests/System.Text.Json.Tests.csproj +++ b/src/System.Text.Json/tests/System.Text.Json.Tests.csproj @@ -50,6 +50,7 @@ + From 27dae83598c87e3cf4b139c8c981c13fe8e9a81e Mon Sep 17 00:00:00 2001 From: Christopher Watford Date: Sun, 19 May 2019 21:30:08 -0400 Subject: [PATCH 420/607] Throw ArgumentException in JsonSerializer if ReadCommentHandling is Allow #37634 (#37713) * Add tests for Allow failing in JsonSerializer Parse/Read #37634 * Add check to throw on ReadComentHandling == Allow #37634 * Remove unused parameter from CheckSupportedOptions * Move Allow check into JsonSerializerOptions --- .../src/Resources/Strings.resx | 3 +++ .../Serialization/JsonSerializerOptions.cs | 5 ++++ .../tests/Serialization/Object.ReadTests.cs | 25 +++---------------- .../tests/Serialization/OptionsTests.cs | 12 +++++++-- 4 files changed, 22 insertions(+), 23 deletions(-) diff --git a/src/System.Text.Json/src/Resources/Strings.resx b/src/System.Text.Json/src/Resources/Strings.resx index 1acf9d22cc56..33a2bde8eb80 100644 --- a/src/System.Text.Json/src/Resources/Strings.resx +++ b/src/System.Text.Json/src/Resources/Strings.resx @@ -362,4 +362,7 @@ Unexpected end of data while reading a comment. + + Comments cannot be stored when deserializing objects, only the Skip and Disallow comment handling modes are supported. + diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializerOptions.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializerOptions.cs index 7f9938cf5547..27d2683fb73f 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializerOptions.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializerOptions.cs @@ -219,6 +219,11 @@ public JsonCommentHandling ReadCommentHandling set { VerifyMutable(); + if (value == JsonCommentHandling.Allow) + { + throw new ArgumentException(SR.JsonSerializerDoesNotSupportComments, nameof(value)); + } + _readCommentHandling = value; } } diff --git a/src/System.Text.Json/tests/Serialization/Object.ReadTests.cs b/src/System.Text.Json/tests/Serialization/Object.ReadTests.cs index ee821b36a696..ed4720c91574 100644 --- a/src/System.Text.Json/tests/Serialization/Object.ReadTests.cs +++ b/src/System.Text.Json/tests/Serialization/Object.ReadTests.cs @@ -36,21 +36,11 @@ public static void ReadSimpleClass() [InlineData("/* Multi\nLine\nComment */ ", "\t// trailing comment\n ")] public static void ReadSimpleClassIgnoresLeadingOrTrailingTrivia(string leadingTrivia, string trailingTrivia) { - { - var options = new JsonSerializerOptions(); - options.ReadCommentHandling = JsonCommentHandling.Skip; - - SimpleTestClass obj = JsonSerializer.Parse(leadingTrivia + SimpleTestClass.s_json + trailingTrivia, options); - obj.Verify(); - } - - { - var options = new JsonSerializerOptions(); - options.ReadCommentHandling = JsonCommentHandling.Allow; + var options = new JsonSerializerOptions(); + options.ReadCommentHandling = JsonCommentHandling.Skip; - SimpleTestClass obj = JsonSerializer.Parse(leadingTrivia + SimpleTestClass.s_json + trailingTrivia, options); - obj.Verify(); - } + SimpleTestClass obj = JsonSerializer.Parse(leadingTrivia + SimpleTestClass.s_json + trailingTrivia, options); + obj.Verify(); } [Fact] @@ -132,13 +122,6 @@ public static void ReadComplexClassIgnoresLeadingOrTrailingTrivia(string leading ClassWithComplexObjects obj = JsonSerializer.Parse(leadingTrivia + ClassWithComplexObjects.s_json + trailingTrivia, options); obj.Verify(); - - // Throws due to JsonDocument.TryParse not supporting Allow - //var options = new JsonSerializerOptions(); - //options.ReadCommentHandling = JsonCommentHandling.Allow; - // - //obj = JsonSerializer.Parse(leadingTrivia + ClassWithComplexObjects.s_json + trailingTrivia, options); - //obj.Verify(); } [Fact] diff --git a/src/System.Text.Json/tests/Serialization/OptionsTests.cs b/src/System.Text.Json/tests/Serialization/OptionsTests.cs index 9fc15c0c1fcc..7068fc4952b4 100644 --- a/src/System.Text.Json/tests/Serialization/OptionsTests.cs +++ b/src/System.Text.Json/tests/Serialization/OptionsTests.cs @@ -148,9 +148,17 @@ public static void ReadCommentHandling() Assert.Throws(() => JsonSerializer.Parse("/* commment */", options)); options = new JsonSerializerOptions(); - options.ReadCommentHandling = JsonCommentHandling.Allow; + options.ReadCommentHandling = JsonCommentHandling.Skip; - JsonSerializer.Parse("/* commment */", options); + int value = JsonSerializer.Parse("1 /* commment */", options); + } + + [Fact] + public static void ReadCommentHandlingDoesNotSupportAllow() + { + var options = new JsonSerializerOptions(); + + Assert.Throws(() => options.ReadCommentHandling = JsonCommentHandling.Allow); } [Fact] From 8261325d82e18ce559dd19cde7e40c2ab140ed8b Mon Sep 17 00:00:00 2001 From: Filip Navara Date: Mon, 20 May 2019 07:59:05 +0200 Subject: [PATCH 421/607] [System.Drawing] Fix cut & paste error (#37788) --- src/System.Drawing.Common/src/System/Drawing/Pen.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/System.Drawing.Common/src/System/Drawing/Pen.cs b/src/System.Drawing.Common/src/System/Drawing/Pen.cs index b8e725097259..d6077812f547 100644 --- a/src/System.Drawing.Common/src/System/Drawing/Pen.cs +++ b/src/System.Drawing.Common/src/System/Drawing/Pen.cs @@ -148,7 +148,7 @@ private void Dispose(bool disposing) } else if (_immutable) { - throw new ArgumentException(SR.Format(SR.CantChangeImmutableObjects, nameof(Brush))); + throw new ArgumentException(SR.Format(SR.CantChangeImmutableObjects, nameof(Pen))); } if (_nativePen != IntPtr.Zero) From 30296417a127e48dc15888b9ef208e4a85c55dc7 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Mon, 20 May 2019 07:59:28 +0200 Subject: [PATCH 422/607] [master] Update dependencies from dotnet/standard (#37774) * Update dependencies from https://github.com/dotnet/standard build 20190518.1 - NETStandard.Library - 2.1.0-prerelease.19268.1 * Update dependencies from https://github.com/dotnet/standard build 20190519.1 - NETStandard.Library - 2.1.0-prerelease.19269.1 --- eng/Version.Details.xml | 4 ++-- eng/Versions.props | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 2cf8a8339fd6..0d9baf27c447 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -38,9 +38,9 @@ https://github.com/dotnet/arcade 6d0514d3da59137630b9add5b5e619bce2631f02 - + https://github.com/dotnet/standard - ca3d6589882127004ada76201d11caeef77dda14 + 960bd51c618cb9a49f13c7e22605e0b540a549ea https://github.com/dotnet/arcade diff --git a/eng/Versions.props b/eng/Versions.props index eb433a202acd..66a67c59621d 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -46,7 +46,7 @@ 3.0.0-preview6.19268.5 4.6.0-preview6.19268.5 - 2.1.0-prerelease.19267.1 + 2.1.0-prerelease.19269.1 99.99.99-master-20190510.1 From e58b35cd0f8fe6caa194ca7e48388d8d59854fe0 Mon Sep 17 00:00:00 2001 From: Ahson Khan Date: Mon, 20 May 2019 00:21:36 -0700 Subject: [PATCH 423/607] SkipValidation when using the writer internally within the serializer. (#37791) --- .../System/Text/Json/Reader/Utf8JsonReader.MultiSegment.cs | 2 +- .../System/Text/Json/Serialization/JsonSerializerOptions.cs | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/System.Text.Json/src/System/Text/Json/Reader/Utf8JsonReader.MultiSegment.cs b/src/System.Text.Json/src/System/Text/Json/Reader/Utf8JsonReader.MultiSegment.cs index afeeff5a2b99..d7108002302e 100644 --- a/src/System.Text.Json/src/System/Text/Json/Reader/Utf8JsonReader.MultiSegment.cs +++ b/src/System.Text.Json/src/System/Text/Json/Reader/Utf8JsonReader.MultiSegment.cs @@ -2203,7 +2203,7 @@ private bool SkipCommentMultiSegment() if (marker != JsonConstants.Asterisk) { - ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.ExpectedStartOfValueNotFound, marker); + ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.ExpectedStartOfValueNotFound, JsonConstants.Slash); } return SkipMultiLineCommentMultiSegment(localBuffer.Slice(1), leftOver); diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializerOptions.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializerOptions.cs index 27d2683fb73f..e78e2d39ca7e 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializerOptions.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializerOptions.cs @@ -294,7 +294,10 @@ internal JsonWriterOptions GetWriterOptions() { return new JsonWriterOptions { - Indented = WriteIndented + Indented = WriteIndented, +#if !DEBUG + SkipValidation = true +#endif }; } From 189766719a059512a515d488efc5c65c7abf0650 Mon Sep 17 00:00:00 2001 From: Ahson Khan Date: Mon, 20 May 2019 02:57:17 -0700 Subject: [PATCH 424/607] Add string-based WriteAsProperty overload to JsonElement. (#37789) * Add string-based WriteAsProperty overload to JsonElement. * Address PR feedback - remove UTF-16 from the comments. --- src/System.Text.Json/ref/System.Text.Json.cs | 1 + .../System/Text/Json/Document/JsonElement.cs | 14 ++++ .../JsonSerializer.Write.HandleDictionary.cs | 2 +- .../tests/JsonElementWriteTests.cs | 79 +++++++++++++++++-- 4 files changed, 87 insertions(+), 9 deletions(-) diff --git a/src/System.Text.Json/ref/System.Text.Json.cs b/src/System.Text.Json/ref/System.Text.Json.cs index 47fbbcbf1815..82fd50a13383 100644 --- a/src/System.Text.Json/ref/System.Text.Json.cs +++ b/src/System.Text.Json/ref/System.Text.Json.cs @@ -73,6 +73,7 @@ public readonly partial struct JsonElement public bool TryGetUInt64(out ulong value) { throw null; } public void WriteAsProperty(System.ReadOnlySpan utf8PropertyName, System.Text.Json.Utf8JsonWriter writer) { } public void WriteAsProperty(System.ReadOnlySpan propertyName, System.Text.Json.Utf8JsonWriter writer) { } + public void WriteAsProperty(string propertyName, System.Text.Json.Utf8JsonWriter writer) { } public void WriteAsValue(System.Text.Json.Utf8JsonWriter writer) { } public partial struct ArrayEnumerator : System.Collections.Generic.IEnumerable, System.Collections.Generic.IEnumerator, System.Collections.IEnumerable, System.Collections.IEnumerator, System.IDisposable { diff --git a/src/System.Text.Json/src/System/Text/Json/Document/JsonElement.cs b/src/System.Text.Json/src/System/Text/Json/Document/JsonElement.cs index 1ff367ae3a45..6dbebf852078 100644 --- a/src/System.Text.Json/src/System/Text/Json/Document/JsonElement.cs +++ b/src/System.Text.Json/src/System/Text/Json/Document/JsonElement.cs @@ -929,6 +929,20 @@ internal string GetPropertyRawText() return _parent.GetPropertyRawValueAsString(_idx); } + /// + /// Write the element into the provided writer as a named object property. + /// + /// The name for this value within the JSON object. + /// The writer. + /// + /// This value's is . + /// + /// + /// The parent has been disposed. + /// + public void WriteAsProperty(string propertyName, Utf8JsonWriter writer) + => WriteAsProperty(propertyName.AsSpan(), writer); + /// /// Write the element into the provided writer as a named object property. /// diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.HandleDictionary.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.HandleDictionary.cs index 3ffe0792f14b..b689a53d3d39 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.HandleDictionary.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.HandleDictionary.cs @@ -166,7 +166,7 @@ private static void WriteExtensionData(Utf8JsonWriter writer, ref WriteStackFram Debug.Assert(entry.Key is string); string propertyName = (string)entry.Key; - element.WriteAsProperty(propertyName.AsSpan(), writer); + element.WriteAsProperty(propertyName, writer); } else { diff --git a/src/System.Text.Json/tests/JsonElementWriteTests.cs b/src/System.Text.Json/tests/JsonElementWriteTests.cs index 70e2008fc93d..f7b88d6037db 100644 --- a/src/System.Text.Json/tests/JsonElementWriteTests.cs +++ b/src/System.Text.Json/tests/JsonElementWriteTests.cs @@ -374,6 +374,21 @@ public static void WriteEverythingObject(bool indented) "\"obj\":{\"arr\":[1,3,5,7,11]}}"); } + [Theory] + [InlineData(false)] + [InlineData(true)] + public static void WriteNullStringAsProperty(bool indented) + { + WritePropertyValueBothForms( + indented, + null, + "\"\"", + @"{ + """": """" +}", + "{\"\":\"\"}"); + } + [Theory] [InlineData(false)] [InlineData(true)] @@ -864,6 +879,7 @@ public static void WritePropertyOutsideObject(bool skipValidation) { foreach (JsonElement val in root.EnumerateArray()) { + val.WriteAsProperty(CharLabel, writer); val.WriteAsProperty(CharLabel.AsSpan(), writer); val.WriteAsProperty(byteUtf8, writer); } @@ -871,19 +887,23 @@ public static void WritePropertyOutsideObject(bool skipValidation) writer.Flush(); AssertContents( - "\"char\":null,\"byte\":null," + - "\"char\":false,\"byte\":false," + - "\"char\":true,\"byte\":true," + - "\"char\":\"hi\",\"byte\":\"hi\"," + - "\"char\":5,\"byte\":5," + - "\"char\":{},\"byte\":{}," + - "\"char\":[],\"byte\":[]", + "\"char\":null,\"char\":null,\"byte\":null," + + "\"char\":false,\"char\":false,\"byte\":false," + + "\"char\":true,\"char\":true,\"byte\":true," + + "\"char\":\"hi\",\"char\":\"hi\",\"byte\":\"hi\"," + + "\"char\":5,\"char\":5,\"byte\":5," + + "\"char\":{},\"char\":{},\"byte\":{}," + + "\"char\":[],\"char\":[],\"byte\":[]", buffer); } else { foreach (JsonElement val in root.EnumerateArray()) { + JsonTestHelper.AssertThrows( + ref writer, + (ref Utf8JsonWriter w) => val.WriteAsProperty(CharLabel, w)); + JsonTestHelper.AssertThrows( ref writer, (ref Utf8JsonWriter w) => val.WriteAsProperty(CharLabel.AsSpan(), w)); @@ -1008,6 +1028,13 @@ private static void WritePropertyValueBothForms( string expectedIndent, string expectedMinimal) { + WritePropertyValue( + indented, + propertyName, + jsonIn, + expectedIndent, + expectedMinimal); + WritePropertyValue( indented, propertyName.AsSpan(), @@ -1017,12 +1044,48 @@ private static void WritePropertyValueBothForms( WritePropertyValue( indented, - Encoding.UTF8.GetBytes(propertyName), + Encoding.UTF8.GetBytes(propertyName ?? ""), jsonIn, expectedIndent, expectedMinimal); } + private static void WritePropertyValue( + bool indented, + string propertyName, + string jsonIn, + string expectedIndent, + string expectedMinimal) + { + var buffer = new ArrayBufferWriter(1024); + string temp = $" [ {jsonIn} ]"; + using (JsonDocument doc = JsonDocument.Parse(temp, s_readerOptions)) + { + JsonElement target = doc.RootElement[0]; + + var options = new JsonWriterOptions + { + Indented = indented, + }; + + var writer = new Utf8JsonWriter(buffer, options); + + writer.WriteStartObject(); + target.WriteAsProperty(propertyName, writer); + writer.WriteEndObject(); + writer.Flush(); + + if (indented && s_replaceNewlines) + { + AssertContents( + expectedIndent.Replace(CompiledNewline, Environment.NewLine), + buffer); + } + + AssertContents(indented ? expectedIndent : expectedMinimal, buffer); + } + } + private static void WritePropertyValue( bool indented, ReadOnlySpan propertyName, From 889491763322134a1a184f3d54eb1f3605949d33 Mon Sep 17 00:00:00 2001 From: Viktor Hofer Date: Mon, 20 May 2019 18:25:58 +0200 Subject: [PATCH 425/607] Fix testscope usage in yml and sh script (#37805) --- eng/build.sh | 2 +- eng/pipelines/corefx-base.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/build.sh b/eng/build.sh index 557f681a9f4b..1ba96ae25f40 100755 --- a/eng/build.sh +++ b/eng/build.sh @@ -102,7 +102,7 @@ while [[ $# > 0 ]]; do ;; -testscope) arguments="$arguments /p:TestScope=$2" - shift 1 + shift 2 ;; -coverage) arguments="$arguments /p:Coverage=true" diff --git a/eng/pipelines/corefx-base.yml b/eng/pipelines/corefx-base.yml index 0cb15e73dc06..9f98999bded1 100644 --- a/eng/pipelines/corefx-base.yml +++ b/eng/pipelines/corefx-base.yml @@ -78,7 +78,7 @@ jobs: - _testScopeArg: '' - ${{ if ne(parameters.testScope, '') }}: - - _testScopeArg: -testScope ${{ parameters.testScope }} + - _testScopeArg: -testscope ${{ parameters.testScope }} - ${{ if ne(job._jobFramework, '')}}: - _finalFrameworkArg: ${{ job._jobFramework }} From 5b61cc848afba864f1fea1ff87452d4d90be13a2 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Mon, 20 May 2019 18:29:12 +0200 Subject: [PATCH 426/607] Update dependencies from https://github.com/dotnet/corefx build 20190520.1 (#37800) - runtime.native.System.IO.Ports - 4.6.0-preview6.19270.1 - Microsoft.NETCore.Platforms - 3.0.0-preview6.19270.1 --- eng/Version.Details.xml | 8 ++++---- eng/Versions.props | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 0d9baf27c447..331600525c63 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -26,13 +26,13 @@ https://github.com/dotnet/core-setup 7c7a2e90741b0efcba4bea89f7fcbcfbc1f61120 - + https://github.com/dotnet/corefx - 36ad1c62d4bb753a489d4c055b909af2cb6d407f + e58b35cd0f8fe6caa194ca7e48388d8d59854fe0 - + https://github.com/dotnet/corefx - 36ad1c62d4bb753a489d4c055b909af2cb6d407f + e58b35cd0f8fe6caa194ca7e48388d8d59854fe0 https://github.com/dotnet/arcade diff --git a/eng/Versions.props b/eng/Versions.props index 66a67c59621d..39d9a67fad48 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -43,8 +43,8 @@ 3.0.0-preview6-27714-72 3.0.0-preview6-27714-72 - 3.0.0-preview6.19268.5 - 4.6.0-preview6.19268.5 + 3.0.0-preview6.19270.1 + 4.6.0-preview6.19270.1 2.1.0-prerelease.19269.1 From 4694946f12aab6c3293d36fac0bd9f0842c526f9 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Mon, 20 May 2019 18:36:10 +0200 Subject: [PATCH 427/607] Update dependencies from https://github.com/dotnet/standard build 20190520.1 (#37804) - NETStandard.Library - 2.1.0-prerelease.19270.1 --- eng/Version.Details.xml | 4 ++-- eng/Versions.props | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 331600525c63..91929de00f2a 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -38,9 +38,9 @@ https://github.com/dotnet/arcade 6d0514d3da59137630b9add5b5e619bce2631f02 - + https://github.com/dotnet/standard - 960bd51c618cb9a49f13c7e22605e0b540a549ea + 2f630cd85d291fbace35b5d047c19504637322e5 https://github.com/dotnet/arcade diff --git a/eng/Versions.props b/eng/Versions.props index 39d9a67fad48..280f5efca613 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -46,7 +46,7 @@ 3.0.0-preview6.19270.1 4.6.0-preview6.19270.1 - 2.1.0-prerelease.19269.1 + 2.1.0-prerelease.19270.1 99.99.99-master-20190510.1 From 4a79484f4273cd4c9c521bfe258d4cd948a6478c Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Mon, 20 May 2019 18:38:08 +0200 Subject: [PATCH 428/607] Update dependencies from https://github.com/dotnet/arcade build 20190520.1 (#37798) - Microsoft.DotNet.XUnitExtensions - 2.4.0-beta.19270.1 - Microsoft.DotNet.XUnitConsoleRunner - 2.5.1-beta.19270.1 - Microsoft.DotNet.VersionTools.Tasks - 1.0.0-beta.19270.1 - Microsoft.DotNet.ApiCompat - 1.0.0-beta.19270.1 - Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19270.1 - Microsoft.DotNet.Build.Tasks.Configuration - 1.0.0-beta.19270.1 - Microsoft.DotNet.Build.Tasks.Feed - 2.2.0-beta.19270.1 - Microsoft.DotNet.Build.Tasks.Packaging - 1.0.0-beta.19270.1 - Microsoft.DotNet.CodeAnalysis - 1.0.0-beta.19270.1 - Microsoft.DotNet.CoreFxTesting - 1.0.0-beta.19270.1 - Microsoft.DotNet.GenAPI - 1.0.0-beta.19270.1 - Microsoft.DotNet.GenFacades - 1.0.0-beta.19270.1 - Microsoft.DotNet.Helix.Sdk - 2.0.0-beta.19270.1 - Microsoft.DotNet.RemoteExecutor - 1.0.0-beta.19270.1 --- eng/Version.Details.xml | 56 ++++++++++++++++++++--------------------- eng/Versions.props | 24 +++++++++--------- global.json | 4 +-- 3 files changed, 42 insertions(+), 42 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 91929de00f2a..907ae238bbae 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -34,65 +34,65 @@ https://github.com/dotnet/corefx e58b35cd0f8fe6caa194ca7e48388d8d59854fe0 - + https://github.com/dotnet/arcade - 6d0514d3da59137630b9add5b5e619bce2631f02 + e913fb3b02d4089a91ff91c041c5f6e7c29038b0 https://github.com/dotnet/standard 2f630cd85d291fbace35b5d047c19504637322e5 - + https://github.com/dotnet/arcade - 6d0514d3da59137630b9add5b5e619bce2631f02 + e913fb3b02d4089a91ff91c041c5f6e7c29038b0 - + https://github.com/dotnet/arcade - 6d0514d3da59137630b9add5b5e619bce2631f02 + e913fb3b02d4089a91ff91c041c5f6e7c29038b0 - + https://github.com/dotnet/arcade - 6d0514d3da59137630b9add5b5e619bce2631f02 + e913fb3b02d4089a91ff91c041c5f6e7c29038b0 - + https://github.com/dotnet/arcade - 6d0514d3da59137630b9add5b5e619bce2631f02 + e913fb3b02d4089a91ff91c041c5f6e7c29038b0 - + https://github.com/dotnet/arcade - 6d0514d3da59137630b9add5b5e619bce2631f02 + e913fb3b02d4089a91ff91c041c5f6e7c29038b0 - + https://github.com/dotnet/arcade - 6d0514d3da59137630b9add5b5e619bce2631f02 + e913fb3b02d4089a91ff91c041c5f6e7c29038b0 - + https://github.com/dotnet/arcade - 6d0514d3da59137630b9add5b5e619bce2631f02 + e913fb3b02d4089a91ff91c041c5f6e7c29038b0 - + https://github.com/dotnet/arcade - 6d0514d3da59137630b9add5b5e619bce2631f02 + e913fb3b02d4089a91ff91c041c5f6e7c29038b0 - + https://github.com/dotnet/arcade - 6d0514d3da59137630b9add5b5e619bce2631f02 + e913fb3b02d4089a91ff91c041c5f6e7c29038b0 - + https://github.com/dotnet/arcade - 6d0514d3da59137630b9add5b5e619bce2631f02 + e913fb3b02d4089a91ff91c041c5f6e7c29038b0 - + https://github.com/dotnet/arcade - 6d0514d3da59137630b9add5b5e619bce2631f02 + e913fb3b02d4089a91ff91c041c5f6e7c29038b0 - + https://github.com/dotnet/arcade - 6d0514d3da59137630b9add5b5e619bce2631f02 + e913fb3b02d4089a91ff91c041c5f6e7c29038b0 - + https://github.com/dotnet/arcade - 6d0514d3da59137630b9add5b5e619bce2631f02 + e913fb3b02d4089a91ff91c041c5f6e7c29038b0 https://dev.azure.com/dnceng/internal/_git/dotnet-optimization diff --git a/eng/Versions.props b/eng/Versions.props index 280f5efca613..04205c1fa33f 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -23,18 +23,18 @@ - 1.0.0-beta.19268.2 - 1.0.0-beta.19268.2 - 1.0.0-beta.19268.2 - 1.0.0-beta.19268.2 - 2.4.0-beta.19268.2 - 2.5.1-beta.19268.2 - 1.0.0-beta.19268.2 - 1.0.0-beta.19268.2 - 1.0.0-beta.19268.2 - 1.0.0-beta.19268.2 - 2.2.0-beta.19268.2 - 1.0.0-beta.19268.2 + 1.0.0-beta.19270.1 + 1.0.0-beta.19270.1 + 1.0.0-beta.19270.1 + 1.0.0-beta.19270.1 + 2.4.0-beta.19270.1 + 2.5.1-beta.19270.1 + 1.0.0-beta.19270.1 + 1.0.0-beta.19270.1 + 1.0.0-beta.19270.1 + 1.0.0-beta.19270.1 + 2.2.0-beta.19270.1 + 1.0.0-beta.19270.1 3.0.0-preview6-27718-08 3.0.0-preview6-27718-08 diff --git a/global.json b/global.json index 8075e9828b6d..a805c3bca956 100644 --- a/global.json +++ b/global.json @@ -3,8 +3,8 @@ "dotnet": "3.0.100-preview6-011681" }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19268.2", - "Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19268.2", + "Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19270.1", + "Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19270.1", "FIX-85B6-MERGE-9C38-CONFLICT": "1.0.0", "Microsoft.NET.Sdk.IL": "3.0.0-preview6-27714-72" } From 853f11e24da5f47ad233f4a533a11e741e3f452c Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Mon, 20 May 2019 18:40:29 +0200 Subject: [PATCH 429/607] Update dependencies from https://github.com/dotnet/core-setup build 20190519.10 (#37799) - Microsoft.NETCore.App - 3.0.0-preview6-27719-10 - Microsoft.NETCore.DotNetHost - 3.0.0-preview6-27719-10 - Microsoft.NETCore.DotNetHostPolicy - 3.0.0-preview6-27719-10 --- eng/Version.Details.xml | 12 ++++++------ eng/Versions.props | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 907ae238bbae..b3b11bd6a29c 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -14,17 +14,17 @@ - + https://github.com/dotnet/core-setup - 7c7a2e90741b0efcba4bea89f7fcbcfbc1f61120 + 278cf168efcf3adf053aa07b8773ced47887f416 - + https://github.com/dotnet/core-setup - 7c7a2e90741b0efcba4bea89f7fcbcfbc1f61120 + 278cf168efcf3adf053aa07b8773ced47887f416 - + https://github.com/dotnet/core-setup - 7c7a2e90741b0efcba4bea89f7fcbcfbc1f61120 + 278cf168efcf3adf053aa07b8773ced47887f416 https://github.com/dotnet/corefx diff --git a/eng/Versions.props b/eng/Versions.props index 04205c1fa33f..3b7732469f92 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -36,9 +36,9 @@ 2.2.0-beta.19270.1 1.0.0-beta.19270.1 - 3.0.0-preview6-27718-08 - 3.0.0-preview6-27718-08 - 3.0.0-preview6-27718-08 + 3.0.0-preview6-27719-10 + 3.0.0-preview6-27719-10 + 3.0.0-preview6-27719-10 3.0.0-preview6-27714-72 3.0.0-preview6-27714-72 From 7373fd9794c4b52c2a4d253cc2bc4b47c2054241 Mon Sep 17 00:00:00 2001 From: dotnet-maestro-bot Date: Mon, 20 May 2019 09:41:15 -0700 Subject: [PATCH 430/607] Update ProjectNTfs to beta-27720-00 (#37792) --- eng/dependencies.props | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/dependencies.props b/eng/dependencies.props index 84ccdd668340..1fa847381983 100644 --- a/eng/dependencies.props +++ b/eng/dependencies.props @@ -9,12 +9,12 @@ These ref versions are pulled from https://github.com/dotnet/versions. --> - 3c9929f249aa95695ac87c545685508e25d95ae7 + 8a12b7e49b4f381100a0d239d5672b2c30ded40a - beta-27716-00 + beta-27720-00 From 3ff5c4a6eb6315c61cfb0078245c31b59f798290 Mon Sep 17 00:00:00 2001 From: Christopher Watford Date: Mon, 20 May 2019 15:11:17 -0400 Subject: [PATCH 431/607] Ensure JsonException is thrown parsing invalid DateTime, DateTimeOffset, and Guid #37807 (#37809) * Add tests to cover #36901 and #37807 * Ensure DateTime(Offset) and Guid throw JsonException #37807 - The original JsonValueConverterXXX code for these allowed an InvalidOperationException to be raised from Utf8JsonReader.TryGetXXX, instead of returning false so a JsonException could be thrown. --- .../Converters/JsonValueConverterDateTime.cs | 6 +++++ .../JsonValueConverterDateTimeOffset.cs | 6 +++++ .../Converters/JsonValueConverterGuid.cs | 6 +++++ .../tests/Serialization/Value.ReadTests.cs | 26 +++++++++++++++++++ 4 files changed, 44 insertions(+) diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/JsonValueConverterDateTime.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/JsonValueConverterDateTime.cs index f15470ccb079..9abbfa72486e 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/JsonValueConverterDateTime.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/JsonValueConverterDateTime.cs @@ -10,6 +10,12 @@ internal sealed class JsonValueConverterDateTime : JsonValueConverter { public override bool TryRead(Type valueType, ref Utf8JsonReader reader, out DateTime value) { + if (reader.TokenType != JsonTokenType.String) + { + value = default; + return false; + } + return reader.TryGetDateTime(out value); } diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/JsonValueConverterDateTimeOffset.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/JsonValueConverterDateTimeOffset.cs index 0f9d6d3a0198..0567bfb1b1c4 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/JsonValueConverterDateTimeOffset.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/JsonValueConverterDateTimeOffset.cs @@ -10,6 +10,12 @@ internal sealed class JsonValueConverterDateTimeOffset : JsonValueConverter { public override bool TryRead(Type valueType, ref Utf8JsonReader reader, out Guid value) { + if (reader.TokenType != JsonTokenType.String) + { + value = default; + return false; + } + return reader.TryGetGuid(out value); } diff --git a/src/System.Text.Json/tests/Serialization/Value.ReadTests.cs b/src/System.Text.Json/tests/Serialization/Value.ReadTests.cs index ae223fcac24d..a7fe8696be1c 100644 --- a/src/System.Text.Json/tests/Serialization/Value.ReadTests.cs +++ b/src/System.Text.Json/tests/Serialization/Value.ReadTests.cs @@ -74,6 +74,32 @@ public static void ReadPrimitivesFail() Assert.Throws(() => JsonSerializer.Parse(@"""""")); } + [Theory] + [InlineData(typeof(bool))] + [InlineData(typeof(byte))] + [InlineData(typeof(char))] + [InlineData(typeof(DateTime))] + [InlineData(typeof(DateTimeOffset))] + [InlineData(typeof(decimal))] + [InlineData(typeof(double))] + [InlineData(typeof(JsonTokenType))] + [InlineData(typeof(Guid))] + [InlineData(typeof(short))] + [InlineData(typeof(int))] + [InlineData(typeof(long))] + [InlineData(typeof(sbyte))] + [InlineData(typeof(float))] + [InlineData(typeof(string))] + [InlineData(typeof(ushort))] + [InlineData(typeof(uint))] + [InlineData(typeof(ulong))] + public static void PrimitivesShouldFailWithArrayOrObjectAssignment(Type primitiveType) + { + // This test lines up with the built in JsonValueConverters + Assert.Throws(() => JsonSerializer.Parse(@"[]", primitiveType)); + Assert.Throws(() => JsonSerializer.Parse(@"{}", primitiveType)); + } + [Fact] public static void ReadPrimitiveArray() { From e4c091186e5b2f98696e10f978c3548e14c89f0a Mon Sep 17 00:00:00 2001 From: Dotnet-GitSync-Bot <45578709+Dotnet-GitSync-Bot@users.noreply.github.com> Date: Mon, 20 May 2019 13:19:37 -0700 Subject: [PATCH 432/607] Avoid boxing in TextWriter.Write(StringBuilder) (dotnet/coreclr#24664) (#37812) Fixes #24663 by calling `Write(ReadOnlySpan)` instead of `Write(object)` with a boxed `Memory`. Signed-off-by: dotnet-bot --- src/Common/src/CoreLib/System/IO/TextWriter.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Common/src/CoreLib/System/IO/TextWriter.cs b/src/Common/src/CoreLib/System/IO/TextWriter.cs index 875eb5930307..890c35e8a60e 100644 --- a/src/Common/src/CoreLib/System/IO/TextWriter.cs +++ b/src/Common/src/CoreLib/System/IO/TextWriter.cs @@ -305,7 +305,7 @@ public virtual void Write(StringBuilder? value) if (value != null) { foreach (ReadOnlyMemory chunk in value.GetChunks()) - Write(chunk); + Write(chunk.Span); } } From 2e1d93ea69e703345d4f8396aba5a9e47c965dea Mon Sep 17 00:00:00 2001 From: Santiago Fernandez Madero Date: Mon, 20 May 2019 15:39:16 -0700 Subject: [PATCH 433/607] Generate System.Runtime.Extensions reference assembly against implementation (#37811) --- .../ref/System.Runtime.Extensions.cs | 39 +++++++++++++------ .../src/MatchingRefApiCompatBaseline.txt | 3 -- 2 files changed, 28 insertions(+), 14 deletions(-) diff --git a/src/System.Runtime.Extensions/ref/System.Runtime.Extensions.cs b/src/System.Runtime.Extensions/ref/System.Runtime.Extensions.cs index cf87b98e72c4..45b884b3b75a 100644 --- a/src/System.Runtime.Extensions/ref/System.Runtime.Extensions.cs +++ b/src/System.Runtime.Extensions/ref/System.Runtime.Extensions.cs @@ -772,8 +772,8 @@ public LoaderOptimizationAttribute(System.LoaderOptimization value) { } } public static partial class Math { - public const double E = 2.7182818284590451; - public const double PI = 3.1415926535897931; + public const double E = 2.718281828459045; + public const double PI = 3.141592653589793; public static decimal Abs(decimal value) { throw null; } public static double Abs(double value) { throw null; } public static short Abs(short value) { throw null; } @@ -885,8 +885,8 @@ public static partial class Math } public static partial class MathF { - public const float E = 2.71828175f; - public const float PI = 3.14159274f; + public const float E = 2.7182817f; + public const float PI = 3.1415927f; public static float Abs(float x) { throw null; } public static float Acos(float x) { throw null; } public static float Acosh(float x) { throw null; } @@ -994,8 +994,6 @@ protected StringComparer() { } public static System.StringComparer FromComparison(System.StringComparison comparisonType) { throw null; } public int GetHashCode(object obj) { throw null; } public abstract int GetHashCode(string obj); - bool System.Collections.IEqualityComparer.Equals(object x, object y) { throw null; } - int System.Collections.IEqualityComparer.GetHashCode(object obj) { throw null; } } public static partial class StringNormalizationExtensions { @@ -1316,6 +1314,8 @@ public BufferedStream(System.IO.Stream stream, int bufferSize) { } public System.IO.Stream UnderlyingStream { get { throw null; } } public override System.IAsyncResult BeginRead(byte[] buffer, int offset, int count, System.AsyncCallback callback, object state) { throw null; } public override System.IAsyncResult BeginWrite(byte[] buffer, int offset, int count, System.AsyncCallback callback, object state) { throw null; } + public override void CopyTo(System.IO.Stream destination, int bufferSize) { } + public override System.Threading.Tasks.Task CopyToAsync(System.IO.Stream destination, int bufferSize, System.Threading.CancellationToken cancellationToken) { throw null; } protected override void Dispose(bool disposing) { } public override System.Threading.Tasks.ValueTask DisposeAsync() { throw null; } public override int EndRead(System.IAsyncResult asyncResult) { throw null; } @@ -1323,12 +1323,16 @@ public override void EndWrite(System.IAsyncResult asyncResult) { } public override void Flush() { } public override System.Threading.Tasks.Task FlushAsync(System.Threading.CancellationToken cancellationToken) { throw null; } public override int Read(byte[] array, int offset, int count) { throw null; } + public override int Read(System.Span destination) { throw null; } public override System.Threading.Tasks.Task ReadAsync(byte[] buffer, int offset, int count, System.Threading.CancellationToken cancellationToken) { throw null; } + public override System.Threading.Tasks.ValueTask ReadAsync(System.Memory buffer, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public override int ReadByte() { throw null; } public override long Seek(long offset, System.IO.SeekOrigin origin) { throw null; } public override void SetLength(long value) { } public override void Write(byte[] array, int offset, int count) { } + public override void Write(System.ReadOnlySpan buffer) { } public override System.Threading.Tasks.Task WriteAsync(byte[] buffer, int offset, int count, System.Threading.CancellationToken cancellationToken) { throw null; } + public override System.Threading.Tasks.ValueTask WriteAsync(System.ReadOnlyMemory buffer, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public override void WriteByte(byte value) { } } public partial class EndOfStreamException : System.IO.IOException @@ -1491,12 +1495,20 @@ public override void Write(char[] buffer) { } public override void Write(char[] buffer, int index, int count) { } public override void Write(System.ReadOnlySpan buffer) { } public override void Write(string value) { } + public override void Write(string format, object arg0) { } + public override void Write(string format, object arg0, object arg1) { } + public override void Write(string format, object arg0, object arg1, object arg2) { } + public override void Write(string format, params object[] arg) { } public override System.Threading.Tasks.Task WriteAsync(char value) { throw null; } public override System.Threading.Tasks.Task WriteAsync(char[] buffer, int index, int count) { throw null; } public override System.Threading.Tasks.Task WriteAsync(System.ReadOnlyMemory buffer, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public override System.Threading.Tasks.Task WriteAsync(string value) { throw null; } public override void WriteLine(System.ReadOnlySpan buffer) { } public override void WriteLine(string value) { } + public override void WriteLine(string format, object arg0) { } + public override void WriteLine(string format, object arg0, object arg1) { } + public override void WriteLine(string format, object arg0, object arg1, object arg2) { } + public override void WriteLine(string format, params object[] arg) { } public override System.Threading.Tasks.Task WriteLineAsync() { throw null; } public override System.Threading.Tasks.Task WriteLineAsync(char value) { throw null; } public override System.Threading.Tasks.Task WriteLineAsync(char[] buffer, int index, int count) { throw null; } @@ -1538,15 +1550,19 @@ public override void Write(char value) { } public override void Write(char[] buffer, int index, int count) { } public override void Write(System.ReadOnlySpan buffer) { } public override void Write(string value) { } + public override void Write(System.Text.StringBuilder value) { } public override System.Threading.Tasks.Task WriteAsync(char value) { throw null; } public override System.Threading.Tasks.Task WriteAsync(char[] buffer, int index, int count) { throw null; } public override System.Threading.Tasks.Task WriteAsync(System.ReadOnlyMemory buffer, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public override System.Threading.Tasks.Task WriteAsync(string value) { throw null; } + public override System.Threading.Tasks.Task WriteAsync(System.Text.StringBuilder value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public override void WriteLine(System.ReadOnlySpan buffer) { } + public override void WriteLine(System.Text.StringBuilder value) { } public override System.Threading.Tasks.Task WriteLineAsync(char value) { throw null; } public override System.Threading.Tasks.Task WriteLineAsync(char[] buffer, int index, int count) { throw null; } public override System.Threading.Tasks.Task WriteLineAsync(System.ReadOnlyMemory buffer, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public override System.Threading.Tasks.Task WriteLineAsync(string value) { throw null; } + public override System.Threading.Tasks.Task WriteLineAsync(System.Text.StringBuilder value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } public abstract partial class TextReader : System.MarshalByRefObject, System.IDisposable { @@ -1661,7 +1677,7 @@ public static void HtmlEncode(string value, System.IO.TextWriter output) { } } namespace System.Numerics { - public static class BitOperations + public static partial class BitOperations { [System.CLSCompliantAttribute(false)] public static int LeadingZeroCount(uint value) { throw null; } @@ -1676,13 +1692,13 @@ public static class BitOperations [System.CLSCompliantAttribute(false)] public static int PopCount(ulong value) { throw null; } [System.CLSCompliantAttribute(false)] - public static uint RotateLeft(uint value, int bitOffset) { throw null; } + public static uint RotateLeft(uint value, int offset) { throw null; } [System.CLSCompliantAttribute(false)] - public static ulong RotateLeft(ulong value, int bitOffset) { throw null; } + public static ulong RotateLeft(ulong value, int offset) { throw null; } [System.CLSCompliantAttribute(false)] - public static uint RotateRight(uint value, int bitOffset) { throw null; } + public static uint RotateRight(uint value, int offset) { throw null; } [System.CLSCompliantAttribute(false)] - public static ulong RotateRight(ulong value, int bitOffset) { throw null; } + public static ulong RotateRight(ulong value, int offset) { throw null; } public static int TrailingZeroCount(int value) { throw null; } public static int TrailingZeroCount(long value) { throw null; } [System.CLSCompliantAttribute(false)] @@ -1716,6 +1732,7 @@ public SwitchExpressionException(System.Exception innerException) { } public SwitchExpressionException(object unmatchedValue) { } public SwitchExpressionException(string message) { } public SwitchExpressionException(string message, System.Exception innerException) { } + public override string Message { get { throw null; } } public object UnmatchedValue { get { throw null; } } public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } } diff --git a/src/System.Runtime.Extensions/src/MatchingRefApiCompatBaseline.txt b/src/System.Runtime.Extensions/src/MatchingRefApiCompatBaseline.txt index 27384a19c04b..dcebed0d1f7d 100644 --- a/src/System.Runtime.Extensions/src/MatchingRefApiCompatBaseline.txt +++ b/src/System.Runtime.Extensions/src/MatchingRefApiCompatBaseline.txt @@ -1,7 +1,4 @@ Compat issues with assembly System.Runtime.Extensions: MembersMustExist : Member 'System.AppDomain.GetThreadPrincipal()' does not exist in the reference but it does exist in the implementation. MembersMustExist : Member 'System.Environment.FailFast(System.String, System.Exception, System.String)' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'System.IO.Path.Join(System.ReadOnlySpan, System.ReadOnlySpan, System.ReadOnlySpan, System.ReadOnlySpan)' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'System.IO.Path.Join(System.String, System.String, System.String, System.String)' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'System.IO.Path.Join(System.String[])' does not exist in the reference but it does exist in the implementation. Total Issues: 5 From 8b557c62efc5efdcba0aceb4a0bfd82a7d8b5490 Mon Sep 17 00:00:00 2001 From: Viktor Hofer Date: Tue, 21 May 2019 00:50:44 +0200 Subject: [PATCH 434/607] Enable determinism mode (#37677) * Enable desterminism mode --- Directory.Build.props | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index 7ac4a3ee6b23..40e83e521676 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -303,9 +303,7 @@ strict 4 true - - - false + true false From 5f61457d4f8ab9daff042c168c34fced70f2fda2 Mon Sep 17 00:00:00 2001 From: Viktor Hofer Date: Tue, 21 May 2019 01:04:24 +0200 Subject: [PATCH 435/607] Update docs with Outerloop changes --- Documentation/project-docs/developer-guide.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Documentation/project-docs/developer-guide.md b/Documentation/project-docs/developer-guide.md index febf112fca1c..f0dd94f03fe7 100644 --- a/Documentation/project-docs/developer-guide.md +++ b/Documentation/project-docs/developer-guide.md @@ -266,11 +266,11 @@ The tests can also be filtered based on xunit trait attributes defined in [`Micr ```cs [OuterLoop()] ``` -Tests marked as `OuterLoop` are for scenarios that don't need to run every build. They may take longer than normal tests, cover seldom hit code paths, or require special setup or resources to execute. These tests are excluded by default when testing through `dotnet msbuild` but can be enabled manually by adding the `-outerloop` switch or `/p:OuterLoop=true` e.g. +Tests marked as `OuterLoop` are for scenarios that don't need to run every build. They may take longer than normal tests, cover seldom hit code paths, or require special setup or resources to execute. These tests are excluded by default when testing through `dotnet msbuild` but can be enabled manually by adding the `-testscope outerloop` switch or `/p:TestScope=outerloop` e.g. ```cmd -build -test -outerloop -cd src/System.Text.RegularExpressions/tests && dotnet msbuild /t:RebuildAndTest /p:OuterLoop=true +build -test -testscope outerloop +cd src/System.Text.RegularExpressions/tests && dotnet msbuild /t:RebuildAndTest /p:TestScope=outerloop ``` #### PlatformSpecificAttribute From e94ff8a041014decb591ecff475792d68603ca70 Mon Sep 17 00:00:00 2001 From: Viktor Hofer Date: Tue, 21 May 2019 01:05:32 +0200 Subject: [PATCH 436/607] Update supported architectures on Windows in docs --- Documentation/project-docs/developer-guide.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/project-docs/developer-guide.md b/Documentation/project-docs/developer-guide.md index f0dd94f03fe7..e1c9511aefa7 100644 --- a/Documentation/project-docs/developer-guide.md +++ b/Documentation/project-docs/developer-guide.md @@ -8,7 +8,7 @@ The repo can be built for the following platforms, using the provided setup and | x64 | ✔ | ✔ | ✔ | ✔ | | x86 | ✔ | | | | | ARM | ✔ | ✔ | | | -| ARM64 | | ✔ | | | +| ARM64 | ✔ | ✔ | | | | | [Instructions](../building/windows-instructions.md) | [Instructions](../building/unix-instructions.md) | [Instructions](../building/unix-instructions.md) | [Instructions](../building/unix-instructions.md) | From f403c576995dd5860af48226d3ffaec873094ca9 Mon Sep 17 00:00:00 2001 From: Anirudh Agnihotry Date: Mon, 20 May 2019 16:40:01 -0700 Subject: [PATCH 437/607] Converting SystemColors into InstanceDescriptors using Color Convertor (#37810) * fixed converting systemcolors into instance Descriptor using colorConvertor * doing a color check first * checking if right property is returned --- .../src/System/Drawing/ColorConverter.cs | 2 +- .../tests/Drawing/ColorConverterTests.cs | 21 +++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/src/System.ComponentModel.TypeConverter/src/System/Drawing/ColorConverter.cs b/src/System.ComponentModel.TypeConverter/src/System/Drawing/ColorConverter.cs index 749623bc9608..887ea17210be 100644 --- a/src/System.ComponentModel.TypeConverter/src/System/Drawing/ColorConverter.cs +++ b/src/System.ComponentModel.TypeConverter/src/System/Drawing/ColorConverter.cs @@ -112,7 +112,7 @@ public override object ConvertTo(ITypeDescriptorContext context, CultureInfo cul } else if (ColorTable.IsKnownNamedColor(c.Name)) { - member = typeof(Color).GetProperty(c.Name); + member = typeof(Color).GetProperty(c.Name) ?? typeof(SystemColors).GetProperty(c.Name); } else if (c.A != 255) { diff --git a/src/System.ComponentModel.TypeConverter/tests/Drawing/ColorConverterTests.cs b/src/System.ComponentModel.TypeConverter/tests/Drawing/ColorConverterTests.cs index ed463c475267..733326e7bdcc 100644 --- a/src/System.ComponentModel.TypeConverter/tests/Drawing/ColorConverterTests.cs +++ b/src/System.ComponentModel.TypeConverter/tests/Drawing/ColorConverterTests.cs @@ -3,9 +3,11 @@ // See the LICENSE file in the project root for more information. using System.Collections.Generic; +using System.ComponentModel.Design.Serialization; using System.Drawing; using System.Globalization; using System.Linq; +using System.Reflection; using Xunit; namespace System.ComponentModel.TypeConverterTests @@ -446,5 +448,24 @@ public void GetStandardValuesExclusive() var conv = new ColorConverter(); Assert.False(conv.GetStandardValuesExclusive()); } + + [Fact] + public void ConvertToStringTests() + { + var conv = new ColorConverter(); + Assert.Equal("Blue", conv.ConvertTo(Color.Blue, typeof(string))); + Assert.Equal("ActiveCaption", conv.ConvertTo(SystemColors.ActiveCaption, typeof(string))); + } + + [Fact] + public void ConvertToInstanceDescriptorTests() + { + var conv = new ColorConverter(); + InstanceDescriptor descriptor = (InstanceDescriptor)conv.ConvertTo(Color.Blue, typeof(InstanceDescriptor)); + Assert.Equal("Blue", descriptor.MemberInfo.Name); + + descriptor = (InstanceDescriptor)conv.ConvertTo(SystemColors.ActiveCaption, typeof(InstanceDescriptor)); + Assert.Equal("ActiveCaption", descriptor.MemberInfo.Name); + } } } From c85411a30c2c3a1d6ad3beea7be92b19b1e24df9 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Mon, 20 May 2019 17:15:57 -0700 Subject: [PATCH 438/607] [master] Update dependencies from dotnet/coreclr (#37746) * Update dependencies from https://github.com/dotnet/coreclr build 20190516.72 - Microsoft.NET.Sdk.IL - 3.0.0-preview6-27716-72 - Microsoft.NETCore.ILAsm - 3.0.0-preview6-27716-72 - Microsoft.NETCore.Runtime.CoreCLR - 3.0.0-preview6-27716-72 * Update dependencies from https://github.com/dotnet/coreclr build 20190517.72 - Microsoft.NET.Sdk.IL - 3.0.0-preview6-27717-72 - Microsoft.NETCore.ILAsm - 3.0.0-preview6-27717-72 - Microsoft.NETCore.Runtime.CoreCLR - 3.0.0-preview6-27717-72 * Update dependencies from https://github.com/dotnet/coreclr build 20190518.72 - Microsoft.NET.Sdk.IL - 3.0.0-preview6-27718-72 - Microsoft.NETCore.ILAsm - 3.0.0-preview6-27718-72 - Microsoft.NETCore.Runtime.CoreCLR - 3.0.0-preview6-27718-72 * Update dependencies from https://github.com/dotnet/coreclr build 20190519.72 - Microsoft.NET.Sdk.IL - 3.0.0-preview6-27719-72 - Microsoft.NETCore.ILAsm - 3.0.0-preview6-27719-72 - Microsoft.NETCore.Runtime.CoreCLR - 3.0.0-preview6-27719-72 * Fix ref assemblies due to change in coreclr * Fix serialization tests after TimeZone change --- eng/Version.Details.xml | 12 ++++++------ eng/Versions.props | 4 ++-- global.json | 2 +- .../ref/System.Reflection.Emit.ILGeneration.cs | 4 ++-- .../src/ApiCompatBaseline.uap10.0.16299.txt | 4 ++++ .../ref/System.Reflection.Primitives.cs | 4 ++-- .../src/ApiCompatBaseline.uapaot.txt | 5 +++++ .../tests/BinaryFormatterTestData.cs | 2 +- .../tests/EqualityExtensions.cs | 12 +++++++++--- 9 files changed, 32 insertions(+), 17 deletions(-) create mode 100644 src/System.Reflection.Emit.ILGeneration/src/ApiCompatBaseline.uap10.0.16299.txt create mode 100644 src/System.Reflection.Primitives/src/ApiCompatBaseline.uapaot.txt diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index b3b11bd6a29c..9ea9dfe0c69b 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -1,16 +1,16 @@ - + https://github.com/dotnet/coreclr - 75addddd0601ab4e57ff41fada17128df47842ef + c5a44f58952c5014f5e1c25b667dca3901fd84a7 - + https://github.com/dotnet/coreclr - 75addddd0601ab4e57ff41fada17128df47842ef + c5a44f58952c5014f5e1c25b667dca3901fd84a7 - + https://github.com/dotnet/coreclr - 75addddd0601ab4e57ff41fada17128df47842ef + c5a44f58952c5014f5e1c25b667dca3901fd84a7 diff --git a/eng/Versions.props b/eng/Versions.props index 3b7732469f92..a8dac67f127a 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -40,8 +40,8 @@ 3.0.0-preview6-27719-10 3.0.0-preview6-27719-10 - 3.0.0-preview6-27714-72 - 3.0.0-preview6-27714-72 + 3.0.0-preview6-27719-72 + 3.0.0-preview6-27719-72 3.0.0-preview6.19270.1 4.6.0-preview6.19270.1 diff --git a/global.json b/global.json index a805c3bca956..48235e020189 100644 --- a/global.json +++ b/global.json @@ -6,6 +6,6 @@ "Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19270.1", "Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19270.1", "FIX-85B6-MERGE-9C38-CONFLICT": "1.0.0", - "Microsoft.NET.Sdk.IL": "3.0.0-preview6-27714-72" + "Microsoft.NET.Sdk.IL": "3.0.0-preview6-27719-72" } } diff --git a/src/System.Reflection.Emit.ILGeneration/ref/System.Reflection.Emit.ILGeneration.cs b/src/System.Reflection.Emit.ILGeneration/ref/System.Reflection.Emit.ILGeneration.cs index 144a7db27f85..04b021bac2e9 100644 --- a/src/System.Reflection.Emit.ILGeneration/ref/System.Reflection.Emit.ILGeneration.cs +++ b/src/System.Reflection.Emit.ILGeneration/ref/System.Reflection.Emit.ILGeneration.cs @@ -56,9 +56,9 @@ public virtual void MarkLabel(System.Reflection.Emit.Label loc) { } public virtual void ThrowException(System.Type excType) { } public virtual void UsingNamespace(string usingNamespace) { } } - public partial struct Label + public readonly partial struct Label { - private int _dummyPrimitive; + private readonly int _dummyPrimitive; public override bool Equals(object obj) { throw null; } public bool Equals(System.Reflection.Emit.Label obj) { throw null; } public override int GetHashCode() { throw null; } diff --git a/src/System.Reflection.Emit.ILGeneration/src/ApiCompatBaseline.uap10.0.16299.txt b/src/System.Reflection.Emit.ILGeneration/src/ApiCompatBaseline.uap10.0.16299.txt new file mode 100644 index 000000000000..20a5381f0a16 --- /dev/null +++ b/src/System.Reflection.Emit.ILGeneration/src/ApiCompatBaseline.uap10.0.16299.txt @@ -0,0 +1,4 @@ +Compat issues with assembly System.Reflection.Emit.ILGeneration: +CannotRemoveAttribute : Attribute 'System.Runtime.CompilerServices.IsReadOnlyAttribute' exists on 'System.Reflection.Emit.Label' in the contract but not the implementation. +TypeCannotChangeClassification : Type 'System.Reflection.Emit.Label' is marked as readonly in the contract so it must also be marked readonly in the implementation. +Total Issues: 2 diff --git a/src/System.Reflection.Primitives/ref/System.Reflection.Primitives.cs b/src/System.Reflection.Primitives/ref/System.Reflection.Primitives.cs index cb4c623b26d7..84557f4d7558 100644 --- a/src/System.Reflection.Primitives/ref/System.Reflection.Primitives.cs +++ b/src/System.Reflection.Primitives/ref/System.Reflection.Primitives.cs @@ -20,9 +20,9 @@ public enum FlowControl Return = 7, Throw = 8, } - public partial struct OpCode + public readonly partial struct OpCode : IEquatable { - private object _dummy; + private readonly object _dummy; public System.Reflection.Emit.FlowControl FlowControl { get { throw null; } } public string Name { get { throw null; } } public System.Reflection.Emit.OpCodeType OpCodeType { get { throw null; } } diff --git a/src/System.Reflection.Primitives/src/ApiCompatBaseline.uapaot.txt b/src/System.Reflection.Primitives/src/ApiCompatBaseline.uapaot.txt new file mode 100644 index 000000000000..fe64061dd570 --- /dev/null +++ b/src/System.Reflection.Primitives/src/ApiCompatBaseline.uapaot.txt @@ -0,0 +1,5 @@ +Compat issues with assembly System.Reflection.Primitives: +CannotRemoveAttribute : Attribute 'System.Runtime.CompilerServices.IsReadOnlyAttribute' exists on 'System.Reflection.Emit.OpCode' in the contract but not the implementation. +CannotRemoveBaseTypeOrInterface : Type 'System.Reflection.Emit.OpCode' does not implement interface 'System.IEquatable' in the implementation but it does in the contract. +TypeCannotChangeClassification : Type 'System.Reflection.Emit.OpCode' is marked as readonly in the contract so it must also be marked readonly in the implementation. +Total Issues: 3 diff --git a/src/System.Runtime.Serialization.Formatters/tests/BinaryFormatterTestData.cs b/src/System.Runtime.Serialization.Formatters/tests/BinaryFormatterTestData.cs index ff40a8edcdd9..7e6febf06c30 100644 --- a/src/System.Runtime.Serialization.Formatters/tests/BinaryFormatterTestData.cs +++ b/src/System.Runtime.Serialization.Formatters/tests/BinaryFormatterTestData.cs @@ -869,7 +869,7 @@ public static IEnumerable SerializableObjects() yield return new object[] { new DateTime(1990, 11, 23), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAEAQAAAA9TeXN0ZW0uRGF0ZVRpbWUCAAAABXRpY2tzCGRhdGVEYXRhAAAJEADA9z1t7LYIAMD3PW3stggL", TargetFrameworkMoniker.netcoreapp20), new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAEAQAAAA9TeXN0ZW0uRGF0ZVRpbWUCAAAABXRpY2tzCGRhdGVEYXRhAAAJEADA9z1t7LYIAMD3PW3stggL", TargetFrameworkMoniker.netfx461) } }; yield return new object[] { new[] { new DateTime(1990, 11, 24, 0, 0, 0, DateTimeKind.Local), new DateTime(1990, 11, 25, 0, 0, 0, DateTimeKind.Utc), new DateTime(1990, 11, 26, 0, 0, 0, DateTimeKind.Unspecified) }, new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAPAQAAAAMAAAANAIBhaDbttogAQMuS/+22SAAANb3I7rYICw==", TargetFrameworkMoniker.netcoreapp20), new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAPAQAAAAMAAAANAIBhaDbttogAQMuS/+22SAAANb3I7rYICw==", TargetFrameworkMoniker.netfx461) } }; yield return new object[] { new DateTimeOffset(1990, 11, 23, 03, 30, 00, 00, TimeSpan.FromMinutes(30)), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAEAQAAABVTeXN0ZW0uRGF0ZVRpbWVPZmZzZXQCAAAACERhdGVUaW1lDU9mZnNldE1pbnV0ZXMAAA0HAPhEY4bstggeAAs=", TargetFrameworkMoniker.netcoreapp20), new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAEAQAAABVTeXN0ZW0uRGF0ZVRpbWVPZmZzZXQCAAAACERhdGVUaW1lDU9mZnNldE1pbnV0ZXMAAA0HAPhEY4bstggeAAs=", TargetFrameworkMoniker.netfx461) } }; - yield return new object[] { TimeZoneInfo.Utc, new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAE5TeXN0ZW0uQ29yZSwgVmVyc2lvbj0zLjUuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAABNTeXN0ZW0uVGltZVpvbmVJbmZvBwAAAAJJZAtEaXNwbGF5TmFtZQxTdGFuZGFyZE5hbWUMRGF5bGlnaHROYW1lDUJhc2VVdGNPZmZzZXQPQWRqdXN0bWVudFJ1bGVzGlN1cHBvcnRzRGF5bGlnaHRTYXZpbmdUaW1lAQEBAQACAAwBAgAAAAYDAAAAA1VUQwkDAAAACQMAAAAJAwAAAAAAAAAAAAAACgAL", TargetFrameworkMoniker.netcoreapp20), new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAE5TeXN0ZW0uQ29yZSwgVmVyc2lvbj0zLjUuMC4wLCBDdWx0dXJlPU5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAABNTeXN0ZW0uVGltZVpvbmVJbmZvBwAAAAJJZAtEaXNwbGF5TmFtZQxTdGFuZGFyZE5hbWUMRGF5bGlnaHROYW1lDUJhc2VVdGNPZmZzZXQPQWRqdXN0bWVudFJ1bGVzGlN1cHBvcnRzRGF5bGlnaHRTYXZpbmdUaW1lAQEBAQACAAwBAgAAAAYDAAAAA1VUQwkDAAAACQMAAAAJAwAAAAAAAAAAAAAACgAL", TargetFrameworkMoniker.netfx461) } }; + yield return new object[] { TimeZoneInfo.Utc, new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAE5TeXN0ZW0uQ29yZSwgVmVyc2lvbj0zLjUuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAABNTeXN0ZW0uVGltZVpvbmVJbmZvBwAAAAJJZAtEaXNwbGF5TmFtZQxTdGFuZGFyZE5hbWUMRGF5bGlnaHROYW1lDUJhc2VVdGNPZmZzZXQPQWRqdXN0bWVudFJ1bGVzGlN1cHBvcnRzRGF5bGlnaHRTYXZpbmdUaW1lAQEBAQACAAwBAgAAAAYDAAAAA1VUQwYEAAAAIChVVEMpIENvb3JkaW5hdGVkIFVuaXZlcnNhbCBUaW1lBgUAAAAaQ29vcmRpbmF0ZWQgVW5pdmVyc2FsIFRpbWUJBQAAAAAAAAAAAAAACgAL", TargetFrameworkMoniker.netcoreapp30), new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAE5TeXN0ZW0uQ29yZSwgVmVyc2lvbj0zLjUuMC4wLCBDdWx0dXJlPU5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAABNTeXN0ZW0uVGltZVpvbmVJbmZvBwAAAAJJZAtEaXNwbGF5TmFtZQxTdGFuZGFyZE5hbWUMRGF5bGlnaHROYW1lDUJhc2VVdGNPZmZzZXQPQWRqdXN0bWVudFJ1bGVzGlN1cHBvcnRzRGF5bGlnaHRTYXZpbmdUaW1lAQEBAQACAAwBAgAAAAYDAAAAA1VUQwkDAAAACQMAAAAJAwAAAAAAAAAAAAAACgAL", TargetFrameworkMoniker.netfx461) } }; yield return new object[] { TimeZoneInfo.TransitionTime.CreateFixedDateRule(new DateTime(1, 1, 1, 2, 0, 0), 3, 15), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAEAQAAACJTeXN0ZW0uVGltZVpvbmVJbmZvK1RyYW5zaXRpb25UaW1lBgAAAAlUaW1lT2ZEYXkFTW9udGgEV2VlawNEYXkJRGF5T2ZXZWVrD0lzRml4ZWREYXRlUnVsZQAAAAADAA0CAgIQU3lzdGVtLkRheU9mV2VlawEA0IjDEAAAAAMBDwT+////EFN5c3RlbS5EYXlPZldlZWsBAAAAB3ZhbHVlX18ACAAAAAABCw==", TargetFrameworkMoniker.netcoreapp20), new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAE5TeXN0ZW0uQ29yZSwgVmVyc2lvbj0zLjUuMC4wLCBDdWx0dXJlPU5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACJTeXN0ZW0uVGltZVpvbmVJbmZvK1RyYW5zaXRpb25UaW1lBgAAAAlUaW1lT2ZEYXkFTW9udGgEV2VlawNEYXkJRGF5T2ZXZWVrD0lzRml4ZWREYXRlUnVsZQAAAAADAA0CAgIQU3lzdGVtLkRheU9mV2VlawECAAAAANCIwxAAAAADAQ8E/f///xBTeXN0ZW0uRGF5T2ZXZWVrAQAAAAd2YWx1ZV9fAAgAAAAAAQs=", TargetFrameworkMoniker.netfx461) } }; var adjustmentRule = TimeZoneInfo.AdjustmentRule.CreateAdjustmentRule( diff --git a/src/System.Runtime.Serialization.Formatters/tests/EqualityExtensions.cs b/src/System.Runtime.Serialization.Formatters/tests/EqualityExtensions.cs index 028610cec2c8..6da0dafa1a0f 100644 --- a/src/System.Runtime.Serialization.Formatters/tests/EqualityExtensions.cs +++ b/src/System.Runtime.Serialization.Formatters/tests/EqualityExtensions.cs @@ -959,9 +959,15 @@ public static void IsEqual(this TimeZoneInfo @this, TimeZoneInfo other, bool isS Assert.NotNull(@this); Assert.NotNull(other); Assert.Equal(@this.Id, other.Id); - Assert.Equal(@this.DisplayName, other.DisplayName); - Assert.Equal(@this.StandardName, other.StandardName); - Assert.Equal(@this.DaylightName, other.DaylightName); + + if (isSamePlatform) + { + // These properties can change in between TFMs. + Assert.Equal(@this.DisplayName, other.DisplayName); + Assert.Equal(@this.StandardName, other.StandardName); + Assert.Equal(@this.DaylightName, other.DaylightName); + } + Assert.Equal(@this.BaseUtcOffset, other.BaseUtcOffset); Assert.Equal(@this.SupportsDaylightSavingTime, other.SupportsDaylightSavingTime); } From ef1a5aa730098b6c3350977a991232c1ff11cfe3 Mon Sep 17 00:00:00 2001 From: Viktor Hofer Date: Tue, 21 May 2019 02:18:36 +0200 Subject: [PATCH 439/607] Add Microsoft.Private.CoreFx.OOB package (#37784) * Add Microsoft.Private.CoreFx.OOB package --- .../Microsoft.Private.CoreFx.OOB.builds | 10 +++++++ .../Microsoft.Private.CoreFx.OOB.pkgproj | 30 +++++++++++++++++++ .../packageIndex.json | 3 ++ pkg/descriptions.json | 5 ++++ src/Directory.Build.targets | 7 +++++ 5 files changed, 55 insertions(+) create mode 100644 pkg/Microsoft.Private.CoreFx.OOB/Microsoft.Private.CoreFx.OOB.builds create mode 100644 pkg/Microsoft.Private.CoreFx.OOB/Microsoft.Private.CoreFx.OOB.pkgproj diff --git a/pkg/Microsoft.Private.CoreFx.OOB/Microsoft.Private.CoreFx.OOB.builds b/pkg/Microsoft.Private.CoreFx.OOB/Microsoft.Private.CoreFx.OOB.builds new file mode 100644 index 000000000000..17a7f1689029 --- /dev/null +++ b/pkg/Microsoft.Private.CoreFx.OOB/Microsoft.Private.CoreFx.OOB.builds @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/pkg/Microsoft.Private.CoreFx.OOB/Microsoft.Private.CoreFx.OOB.pkgproj b/pkg/Microsoft.Private.CoreFx.OOB/Microsoft.Private.CoreFx.OOB.pkgproj new file mode 100644 index 000000000000..0c3933b81755 --- /dev/null +++ b/pkg/Microsoft.Private.CoreFx.OOB/Microsoft.Private.CoreFx.OOB.pkgproj @@ -0,0 +1,30 @@ + + + + + <_PreReleasePackageVersion>$(PackageVersion) + + false + + + + + + + + + + + + + + + + + + + + diff --git a/pkg/Microsoft.Private.PackageBaseline/packageIndex.json b/pkg/Microsoft.Private.PackageBaseline/packageIndex.json index e57d581f597a..e012d82cece3 100644 --- a/pkg/Microsoft.Private.PackageBaseline/packageIndex.json +++ b/pkg/Microsoft.Private.PackageBaseline/packageIndex.json @@ -201,6 +201,9 @@ "Microsoft.Private.CoreFx.NETCoreApp": { "InboxOn": {} }, + "Microsoft.Private.CoreFx.OOB": { + "InboxOn": {} + }, "Microsoft.Private.PackageBaseline": { "InboxOn": {} }, diff --git a/pkg/descriptions.json b/pkg/descriptions.json index ca6c9a43039a..6367b981e4b7 100644 --- a/pkg/descriptions.json +++ b/pkg/descriptions.json @@ -155,6 +155,11 @@ "Description": "Package used to represent the portions of NETCoreApp that come from CoreFx.", "CommonTypes": [] }, + { + "Name": "Microsoft.Private.CoreFx.OOB", + "Description": "Package used to represent out-of-band packages that are not included in NetCoreApp.", + "CommonTypes": [] + }, { "Name": "Microsoft.Private.CoreFx.UAP", "Description": "Package used to represent the portions of UAP that come from CoreFx.", diff --git a/src/Directory.Build.targets b/src/Directory.Build.targets index 5b2bf4dda970..3fb5559c6aca 100644 --- a/src/Directory.Build.targets +++ b/src/Directory.Build.targets @@ -16,6 +16,13 @@ + + + + + + + Date: Tue, 21 May 2019 07:55:22 +0530 Subject: [PATCH 440/607] Implement GetComment API (#35705) * CoreFx #33347: Implement GetComment API * Generate References as per correct steps * Exclude delims & line separators, new unescape test * Revert consume comment changes, test case fixes * Partial revert of previous incorrect online merge * fixed another online merge conflict resolution slippage * Intermediate rebase from master * Reworked files * Reworked files 2 * Fix coding sytle as per review comments --- src/System.Text.Json/ref/System.Text.Json.cs | 1 + .../Text/Json/Reader/Utf8JsonReader.TryGet.cs | 19 +++++- .../src/System/Text/Json/ThrowHelper.cs | 5 ++ .../tests/Utf8JsonReaderTests.TryGet.cs | 66 +++++++++++++++++-- .../tests/Utf8JsonReaderTests.cs | 64 ++++++++++++++++-- 5 files changed, 144 insertions(+), 11 deletions(-) diff --git a/src/System.Text.Json/ref/System.Text.Json.cs b/src/System.Text.Json/ref/System.Text.Json.cs index 82fd50a13383..935efd7dd87a 100644 --- a/src/System.Text.Json/ref/System.Text.Json.cs +++ b/src/System.Text.Json/ref/System.Text.Json.cs @@ -197,6 +197,7 @@ public ref partial struct Utf8JsonReader public bool GetBoolean() { throw null; } public System.DateTime GetDateTime() { throw null; } public System.DateTimeOffset GetDateTimeOffset() { throw null; } + public string GetComment() { throw null; } public decimal GetDecimal() { throw null; } public double GetDouble() { throw null; } public System.Guid GetGuid() { throw null; } diff --git a/src/System.Text.Json/src/System/Text/Json/Reader/Utf8JsonReader.TryGet.cs b/src/System.Text.Json/src/System/Text/Json/Reader/Utf8JsonReader.TryGet.cs index b3460e1a4998..201d6f9b563a 100644 --- a/src/System.Text.Json/src/System/Text/Json/Reader/Utf8JsonReader.TryGet.cs +++ b/src/System.Text.Json/src/System/Text/Json/Reader/Utf8JsonReader.TryGet.cs @@ -17,7 +17,7 @@ public ref partial struct Utf8JsonReader /// Thrown if trying to get the value of the JSON token that is not a string /// (i.e. other than or ). /// - /// I will also throw when the JSON string contains invalid UTF-8 bytes, or invalid UTF-16 surrogates. + /// It will also throw when the JSON string contains invalid UTF-8 bytes, or invalid UTF-16 surrogates. /// public string GetString() { @@ -39,6 +39,23 @@ public string GetString() return JsonReaderHelper.TranscodeHelper(span); } + /// + /// Reads the next JSON token value from the source as a comment, transcoded as a . + /// + /// + /// Thrown if trying to get the value of the JSON token that is not a comment. + /// + /// + public string GetComment() + { + if (TokenType != JsonTokenType.Comment) + { + throw ThrowHelper.GetInvalidOperationException_ExpectedComment(TokenType); + } + ReadOnlySpan span = HasValueSequence ? ValueSequence.ToArray() : ValueSpan; + return JsonReaderHelper.TranscodeHelper(span); + } + /// /// Reads the next JSON token value from the source as a . /// Returns true if the TokenType is JsonTokenType.True and false if the TokenType is JsonTokenType.False. diff --git a/src/System.Text.Json/src/System/Text/Json/ThrowHelper.cs b/src/System.Text.Json/src/System/Text/Json/ThrowHelper.cs index f044b51f670b..ae373390c6e1 100644 --- a/src/System.Text.Json/src/System/Text/Json/ThrowHelper.cs +++ b/src/System.Text.Json/src/System/Text/Json/ThrowHelper.cs @@ -187,6 +187,11 @@ public static InvalidOperationException GetInvalidOperationException_ExpectedStr return GetInvalidOperationException(tokenType); } + public static InvalidOperationException GetInvalidOperationException_ExpectedComment(JsonTokenType tokenType) + { + return GetInvalidOperationException("comment", tokenType); + } + [MethodImpl(MethodImplOptions.NoInlining)] private static InvalidOperationException GetInvalidOperationException(string message, JsonTokenType tokenType) { diff --git a/src/System.Text.Json/tests/Utf8JsonReaderTests.TryGet.cs b/src/System.Text.Json/tests/Utf8JsonReaderTests.TryGet.cs index e91a260efe71..642cb87e3604 100644 --- a/src/System.Text.Json/tests/Utf8JsonReaderTests.TryGet.cs +++ b/src/System.Text.Json/tests/Utf8JsonReaderTests.TryGet.cs @@ -5,6 +5,7 @@ using System.Collections.Generic; using System.Globalization; using System.IO; +using System.Text.RegularExpressions; using Newtonsoft.Json; using Xunit; @@ -475,10 +476,11 @@ public static void TestingNumbersInvalidConversionToDecimal(string jsonString, d [Fact] public static void InvalidConversion() { - string jsonString = "[\"stringValue\", true, 1234]"; + string jsonString = "[\"stringValue\", true, /* Comment within */ 1234] // Comment outside"; byte[] dataUtf8 = Encoding.UTF8.GetBytes(jsonString); - var json = new Utf8JsonReader(dataUtf8, isFinalBlock: true, state: default); + var state = new JsonReaderState(options: new JsonReaderOptions { CommentHandling = JsonCommentHandling.Allow }); + var json = new Utf8JsonReader(dataUtf8, isFinalBlock: true, state); while (json.Read()) { if (json.TokenType != JsonTokenType.String) @@ -528,6 +530,17 @@ public static void InvalidConversion() JsonTestHelper.AssertThrows(json, (jsonReader) => jsonReader.TryGetGuid(out _)); } + if (json.TokenType != JsonTokenType.Comment) + { + try + { + string value = json.GetComment(); + Assert.True(false, "Expected GetComment to throw InvalidOperationException due to mismatch token type."); + } + catch (InvalidOperationException) + { } + } + if (json.TokenType != JsonTokenType.True && json.TokenType != JsonTokenType.False) { try @@ -764,8 +777,6 @@ public static void TestingGetStringInvalidUTF16(string jsonString) } } - - [Theory] [MemberData(nameof(InvalidUTF8Strings))] public static void TestingGetStringInvalidUTF8(byte[] dataUtf8) @@ -802,6 +813,53 @@ public static void TestingGetStringInvalidUTF8(byte[] dataUtf8) } } + [Theory] + [MemberData(nameof(GetCommentTestData))] + public static void TestingGetComment(string jsonData, string expected) + { + byte[] dataUtf8 = Encoding.UTF8.GetBytes(jsonData); + var state = new JsonReaderState(options: new JsonReaderOptions { CommentHandling = JsonCommentHandling.Allow }); + var reader = new Utf8JsonReader(dataUtf8, isFinalBlock: true, state); + + Assert.True(reader.Read()); + Assert.Equal(JsonTokenType.StartObject, reader.TokenType); + + Assert.True(reader.Read()); + Assert.Equal(JsonTokenType.Comment, reader.TokenType); + Assert.Equal(expected, reader.GetComment()); + + Assert.True(reader.Read()); + Assert.Equal(JsonTokenType.EndObject, reader.TokenType); + + Assert.False(reader.Read()); + } + + [Theory] + [MemberData(nameof(GetCommentUnescapeData))] + public static void TestGetCommentUnescape(string jsonData, string expected) + { + byte[] dataUtf8 = Encoding.UTF8.GetBytes(jsonData); + var state = new JsonReaderState(options: new JsonReaderOptions { CommentHandling = JsonCommentHandling.Allow }); + var reader = new Utf8JsonReader(dataUtf8, isFinalBlock: true, state); + bool commentFound = false; + while (reader.Read()) + { + switch (reader.TokenType) + { + case JsonTokenType.Comment: + commentFound = true; + string comment = reader.GetComment(); + Assert.Equal(expected, comment); + Assert.NotEqual(Regex.Unescape(expected), comment); + break; + default: + Assert.True(false); + break; + } + } + Assert.True(commentFound); + } + [Theory] [MemberData(nameof(JsonDateTimeTestData.ValidISO8601Tests), MemberType = typeof(JsonDateTimeTestData))] public static void TestingStringsConversionToDateTime(string jsonString, string expectedString) diff --git a/src/System.Text.Json/tests/Utf8JsonReaderTests.cs b/src/System.Text.Json/tests/Utf8JsonReaderTests.cs index 8f27fd69a90a..7bb7a675df8a 100644 --- a/src/System.Text.Json/tests/Utf8JsonReaderTests.cs +++ b/src/System.Text.Json/tests/Utf8JsonReaderTests.cs @@ -1259,7 +1259,7 @@ public static void Allow(string jsonString, string expectedComment, int expected foundComment = true; indexAfterFirstComment = json.BytesConsumed; Assert.Equal(indexAfterFirstComment, json.CurrentState.BytesConsumed); - string actualComment = Encoding.UTF8.GetString(json.ValueSpan.ToArray()); // TODO: https://github.com/dotnet/corefx/issues/33347 + string actualComment = json.GetComment(); Assert.Equal(expectedComment, actualComment); break; } @@ -1329,7 +1329,7 @@ public static void AllowSingleSegment(string jsonString, string expectedComment, foundComment = true; indexAfterFirstComment = json.BytesConsumed; Assert.Equal(indexAfterFirstComment, json.CurrentState.BytesConsumed); - string actualComment = Encoding.UTF8.GetString(json.ValueSpan.ToArray()); + string actualComment = json.GetComment(); Assert.Equal(expectedComment, actualComment); break; } @@ -1356,7 +1356,7 @@ public static void AllowSingleSegment(string jsonString, string expectedComment, foundComment = true; indexAfterFirstComment = jsonSlice.BytesConsumed; Assert.Equal(indexAfterFirstComment, jsonSlice.CurrentState.BytesConsumed); - string actualComment = Encoding.UTF8.GetString(jsonSlice.ValueSpan.ToArray()); + string actualComment = jsonSlice.GetComment(); Assert.Equal(expectedComment, actualComment); break; } @@ -1380,7 +1380,7 @@ public static void AllowSingleSegment(string jsonString, string expectedComment, foundComment = true; indexAfterFirstComment = jsonSlice.BytesConsumed; Assert.Equal(indexAfterFirstComment, jsonSlice.CurrentState.BytesConsumed); - string actualComment = Encoding.UTF8.GetString(jsonSlice.ValueSpan.ToArray()); + string actualComment = jsonSlice.GetComment(); Assert.Equal(expectedComment, actualComment); break; } @@ -2097,8 +2097,8 @@ private static void VerifyReadLoop(ref Utf8JsonReader json, string expected) case JsonTokenType.Comment: if (expected != null) { - byte[] data = json.HasValueSequence ? json.ValueSequence.ToArray() : json.ValueSpan.ToArray(); - Assert.Equal(expected, Encoding.UTF8.GetString(data)); + string actualComment = json.GetComment(); + Assert.Equal(expected, actualComment); } else { @@ -3333,5 +3333,57 @@ public static IEnumerable CommentTestLineSeparators }; } } + + public static IEnumerable GetCommentTestData + { + get + { + var dataList = new List(); + foreach (string delim in new[] { "\r", "\r\n", "\n" }) + { + // NOTE: Leading and trailing spaces in the comments are significant. + var singleLineComment = " Single Line Comment "; + dataList.Add(new object[] { $"{{//{singleLineComment}{delim}}}", singleLineComment }); + + var multilineComment = $" Multiline {delim} Comment "; + dataList.Add(new object[] { $"{{/*{multilineComment}*/{delim}}}", multilineComment }); + } + return dataList; + } + } + + public static IEnumerable GetCommentUnescapeData + { + get + { + var dataList = new List(); + + var rawComments = new string[] + { + "A string with {0}valid UTF8 \\t tab", + "A string with {0}invalid UTF8 \\xc3\\x28", + "A string with {0}valid UTF16 \\u002e \\u0009 म", + "A string with {0}invalid UTF16 \\uDD1E" + }; + + // single line comments + foreach (string raw in rawComments) + { + string str = string.Format(raw, ""); + string cmt = "//" + str; + dataList.Add(new object[] { cmt, str }); + } + + // multiline comments + foreach (string raw in rawComments) + { + string str = string.Format(raw, "\n"); + string cmt = "/*" + str + "*/"; + dataList.Add(new object[] { cmt, str }); + } + + return dataList; + } + } } } From 11eba7947e9736109c588a1cfcb77987cb80f570 Mon Sep 17 00:00:00 2001 From: Viktor Hofer Date: Tue, 21 May 2019 07:40:49 +0200 Subject: [PATCH 441/607] Reenable ModifyStore tests (#37827) --- .../tests/ChainTests.cs | 6 +- ...Cryptography.X509Certificates.Tests.csproj | 1 - .../TestEnvironmentConfiguration.Unix.cs | 111 ------------------ .../tests/TestEnvironmentConfiguration.cs | 13 +- .../tests/X509FilesystemTests.Unix.cs | 27 ++--- 5 files changed, 16 insertions(+), 142 deletions(-) delete mode 100644 src/System.Security.Cryptography.X509Certificates/tests/TestEnvironmentConfiguration.Unix.cs diff --git a/src/System.Security.Cryptography.X509Certificates/tests/ChainTests.cs b/src/System.Security.Cryptography.X509Certificates/tests/ChainTests.cs index 0b197cec545b..3b61c25ad513 100644 --- a/src/System.Security.Cryptography.X509Certificates/tests/ChainTests.cs +++ b/src/System.Security.Cryptography.X509Certificates/tests/ChainTests.cs @@ -15,8 +15,6 @@ namespace System.Security.Cryptography.X509Certificates.Tests { public static class ChainTests { - internal static bool CanModifyStores { get; } = TestEnvironmentConfiguration.CanModifyStores; - private static bool TrustsMicrosoftDotComRoot { get @@ -125,8 +123,8 @@ public static void VerifyChainFromHandle() } } + [Fact] [PlatformSpecific(TestPlatforms.AnyUnix)] - [ConditionalFact(nameof(CanModifyStores))] public static void VerifyChainFromHandle_Unix() { using (var microsoftDotCom = new X509Certificate2(TestData.MicrosoftDotComSslCertBytes)) @@ -461,7 +459,7 @@ public static void BuildChain_FailOnlyApplicationPolicy() } } - [ConditionalFact(nameof(TrustsMicrosoftDotComRoot), nameof(CanModifyStores))] + [ConditionalFact(nameof(TrustsMicrosoftDotComRoot))] [OuterLoop(/* Modifies user certificate store */)] public static void BuildChain_MicrosoftDotCom_WithRootCertInUserAndSystemRootCertStores() { diff --git a/src/System.Security.Cryptography.X509Certificates/tests/System.Security.Cryptography.X509Certificates.Tests.csproj b/src/System.Security.Cryptography.X509Certificates/tests/System.Security.Cryptography.X509Certificates.Tests.csproj index e132f609ef55..a673997eb722 100644 --- a/src/System.Security.Cryptography.X509Certificates/tests/System.Security.Cryptography.X509Certificates.Tests.csproj +++ b/src/System.Security.Cryptography.X509Certificates/tests/System.Security.Cryptography.X509Certificates.Tests.csproj @@ -86,7 +86,6 @@ Common\System\IO\PersistedFiles.Names.Unix.cs - diff --git a/src/System.Security.Cryptography.X509Certificates/tests/TestEnvironmentConfiguration.Unix.cs b/src/System.Security.Cryptography.X509Certificates/tests/TestEnvironmentConfiguration.Unix.cs deleted file mode 100644 index b351e89dbb63..000000000000 --- a/src/System.Security.Cryptography.X509Certificates/tests/TestEnvironmentConfiguration.Unix.cs +++ /dev/null @@ -1,111 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System.IO; - -namespace System.Security.Cryptography.X509Certificates.Tests -{ - internal static partial class TestEnvironmentConfiguration - { - static partial void DetermineCanModifyStores(ref bool canModify) - { - try - { - canModify = DetermineCanModifyStores(); - } - catch - { - // This is a little counterintuitive. If the capability probe fails, - // assert that the feature works. Then we'll hopefully get diagnosable - // errors out of the test failures. - canModify = true; - } - } - - private static bool DetermineCanModifyStores() - { - // Check the directory permissions and whether the filesystem supports chmod. - // The only real expected failure from this method is that at the very end - // `stat.Mode == mode` will fail, because fuseblk (NTFS) returns success on chmod, - // but is a no-op. - - uint userId = Interop.Sys.GetEUid(); - string certStoresFeaturePath = PersistedFiles.GetUserFeatureDirectory("cryptography", "x509stores"); - - Directory.CreateDirectory(certStoresFeaturePath); - - // Check directory permissions: - - Interop.Sys.FileStatus dirStat; - if (Interop.Sys.Stat(certStoresFeaturePath, out dirStat) != 0) - { - return false; - } - - if (dirStat.Uid != userId) - { - return false; - } - - if ((dirStat.Mode & (int)Interop.Sys.Permissions.S_IRWXU) != (int)Interop.Sys.Permissions.S_IRWXU) - { - return false; - } - - string probeFilename = - Path.Combine(certStoresFeaturePath, $"{Guid.NewGuid().ToString("N")}.chmod"); - - try - { - using (FileStream stream = new FileStream(probeFilename, FileMode.Create)) - { - Interop.Sys.FileStatus stat; - if (Interop.Sys.FStat(stream.SafeFileHandle, out stat) != 0) - { - return false; - } - - if (stat.Uid != userId) - { - return false; - } - - // The product code here has a lot of stuff it does. - // This capabilities probe will just check that chmod works. - int mode = stat.Mode; - - // Flip all of the O bits. - mode ^= (int)Interop.Sys.Permissions.S_IRWXO; - - if (Interop.Sys.FChMod(stream.SafeFileHandle, mode) < 0) - { - return false; - } - - // Verify the chmod applied. - if (Interop.Sys.FStat(stream.SafeFileHandle, out stat) != 0) - { - return false; - } - - // On fuseblk (NTFS) this will return false, because the fchmod - // call returned success without being able to actually apply - // mode-bits. - return stat.Mode == mode; - } - } - finally - { - try - { - File.Delete(probeFilename); - } - catch - { - // Ignore any failure on delete. - } - } - } - } -} diff --git a/src/System.Security.Cryptography.X509Certificates/tests/TestEnvironmentConfiguration.cs b/src/System.Security.Cryptography.X509Certificates/tests/TestEnvironmentConfiguration.cs index 348f78028c8f..d31eaac4001b 100644 --- a/src/System.Security.Cryptography.X509Certificates/tests/TestEnvironmentConfiguration.cs +++ b/src/System.Security.Cryptography.X509Certificates/tests/TestEnvironmentConfiguration.cs @@ -4,20 +4,9 @@ namespace System.Security.Cryptography.X509Certificates.Tests { - internal static partial class TestEnvironmentConfiguration + internal static class TestEnvironmentConfiguration { - internal static bool CanModifyStores { get; } - internal static bool RunManualTests { get; } = !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("CRYPTOGRAPHY_MANUAL_TESTS")); - - static TestEnvironmentConfiguration() - { - bool canModifyStores = true; - DetermineCanModifyStores(ref canModifyStores); - CanModifyStores = canModifyStores; - } - - static partial void DetermineCanModifyStores(ref bool canModify); } } diff --git a/src/System.Security.Cryptography.X509Certificates/tests/X509FilesystemTests.Unix.cs b/src/System.Security.Cryptography.X509Certificates/tests/X509FilesystemTests.Unix.cs index 334e072b65b8..3421e2c74a3c 100644 --- a/src/System.Security.Cryptography.X509Certificates/tests/X509FilesystemTests.Unix.cs +++ b/src/System.Security.Cryptography.X509Certificates/tests/X509FilesystemTests.Unix.cs @@ -15,7 +15,6 @@ namespace System.Security.Cryptography.X509Certificates.Tests [Collection("X509Filesystem")] public static class X509FilesystemTests { - private static bool CanModifyStores { get; } = TestEnvironmentConfiguration.CanModifyStores; private static bool RunManualTests { get; } = TestEnvironmentConfiguration.RunManualTests; [OuterLoop] @@ -126,7 +125,7 @@ private static void X509Store_AddClosed() }); } - [ConditionalFact(nameof(CanModifyStores))] + [Fact] [OuterLoop(/* Alters user/machine state */)] private static void X509Store_AddOne() { @@ -157,7 +156,7 @@ private static void X509Store_AddOne() }); } - [ConditionalFact(nameof(CanModifyStores))] + [Fact] [OuterLoop(/* Alters user/machine state */)] private static void X509Store_AddOneAfterUpgrade() { @@ -197,7 +196,7 @@ private static void X509Store_AddOneAfterUpgrade() }); } - [ConditionalFact(nameof(CanModifyStores))] + [Fact] [OuterLoop(/* Alters user/machine state */)] private static void X509Store_DowngradePermissions() { @@ -220,7 +219,7 @@ private static void X509Store_DowngradePermissions() }); } - [ConditionalFact(nameof(CanModifyStores))] + [Fact] [OuterLoop(/* Alters user/machine state */)] private static void X509Store_AddAfterDispose() { @@ -243,7 +242,7 @@ private static void X509Store_AddAfterDispose() }); } - [ConditionalFact(nameof(CanModifyStores))] + [Fact] [OuterLoop(/* Alters user/machine state */)] private static void X509Store_AddAndClear() { @@ -267,7 +266,7 @@ private static void X509Store_AddAndClear() }); } - [ConditionalFact(nameof(CanModifyStores))] + [Fact] [OuterLoop(/* Alters user/machine state */)] private static void X509Store_AddDuplicate() { @@ -289,7 +288,7 @@ private static void X509Store_AddDuplicate() }); } - [ConditionalFact(nameof(CanModifyStores))] + [Fact] [OuterLoop(/* Alters user/machine state */)] private static void X509Store_AddTwo() { @@ -320,7 +319,7 @@ private static void X509Store_AddTwo() }); } - [ConditionalFact(nameof(CanModifyStores))] + [Fact] [OuterLoop(/* Alters user/machine state */)] private static void X509Store_AddTwo_UpgradePrivateKey() { @@ -382,7 +381,7 @@ private static void X509Store_AddTwo_UpgradePrivateKey() }); } - [ConditionalFact(nameof(CanModifyStores))] + [Fact] [OuterLoop(/* Alters user/machine state */)] private static void X509Store_AddTwo_UpgradePrivateKey_NoDowngrade() { @@ -442,7 +441,7 @@ private static void X509Store_AddTwo_UpgradePrivateKey_NoDowngrade() }); } - [ConditionalFact(nameof(CanModifyStores))] + [Fact] [OuterLoop(/* Alters user/machine state */)] private static void X509Store_DistinctCollections() { @@ -483,7 +482,7 @@ private static void X509Store_DistinctCollections() }); } - [ConditionalFact(nameof(CanModifyStores))] + [Fact] [OuterLoop(/* Alters user/machine state */)] private static void X509Store_Add4_Remove1() { @@ -532,7 +531,7 @@ private static void X509Store_Add4_Remove1() }); } - [ConditionalTheory(nameof(CanModifyStores))] + [Theory] [OuterLoop(/* Alters user/machine state */)] [InlineData(false)] [InlineData(true)] @@ -579,7 +578,7 @@ private static void X509Store_MultipleObjects(bool matchCase) }); } - [ConditionalFact(nameof(CanModifyStores))] + [Fact] [OuterLoop( /* Alters user/machine state */)] private static void X509Store_FiltersDuplicateOnLoad() { From 51a1f16ee2aaded4ce1fca6847471b58f7ffa160 Mon Sep 17 00:00:00 2001 From: Anirudh Agnihotry Date: Mon, 20 May 2019 23:42:55 -0700 Subject: [PATCH 442/607] As Span and As Memory apis added for immutable arrays (#37757) * As Span and As memory added for immutable arrays * Fixing netstandard build * using a more generic compile constant * fixing build for netcoreapp * building fix for netfx and netstandard * fixing netstandard1.0, using generateRefereceASource to get ref file, tests for string and default immutable arrays --- Directory.Build.props | 1 + .../ref/System.Collections.Immutable.cs | 24 ++-- .../ref/System.Collections.Immutable.csproj | 6 +- .../src/System.Collections.Immutable.csproj | 6 +- .../Immutable/ImmutableArray_1.Builder.cs | 2 +- .../Immutable/ImmutableArray_1.Minimal.cs | 2 +- .../Collections/Immutable/ImmutableArray_1.cs | 5 + .../ImmutableDictionary_2.HashBucket.cs | 6 +- .../ImmutableHashSet_1.HashBucket.cs | 2 +- .../Immutable/ImmutableList_1.Builder.cs | 4 +- .../Immutable/ImmutableList_1.Node.cs | 4 +- .../Collections/Immutable/ImmutableList_1.cs | 4 +- .../Collections/Immutable/ImmutableQueue_1.cs | 2 +- .../ImmutableSortedDictionary_2.Builder.cs | 2 +- .../ImmutableSortedDictionary_2.Node.cs | 2 +- .../Immutable/ImmutableSortedDictionary_2.cs | 2 +- .../Immutable/ImmutableSortedSet_1.Builder.cs | 4 +- .../Immutable/ImmutableSortedSet_1.Node.cs | 2 +- .../Immutable/ImmutableSortedSet_1.cs | 4 +- .../Collections/Immutable/ImmutableStack_1.cs | 2 +- .../tests/ImmutableArrayTest.cs | 107 ++++++++++++++++++ .../ref/mscorlib.WinRT-Facade.csproj | 1 - 22 files changed, 155 insertions(+), 39 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index 40e83e521676..29b4f0b89d19 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -411,6 +411,7 @@ $(DefineConstants),uapaot $(DefineConstants),netfx $(DefineConstants),netstandard + $(DefineConstants),NETSTANDARD10 $(DefineConstants),netcoreapp $(DefineConstants),netcoreapp20 diff --git a/src/System.Collections.Immutable/ref/System.Collections.Immutable.cs b/src/System.Collections.Immutable/ref/System.Collections.Immutable.cs index 21f783037abb..870c4cc352e0 100644 --- a/src/System.Collections.Immutable/ref/System.Collections.Immutable.cs +++ b/src/System.Collections.Immutable/ref/System.Collections.Immutable.cs @@ -118,6 +118,10 @@ public partial struct ImmutableArray : System.Collections.Generic.ICollection public System.Collections.Immutable.ImmutableArray Add(T item) { throw null; } public System.Collections.Immutable.ImmutableArray AddRange(System.Collections.Generic.IEnumerable items) { throw null; } public System.Collections.Immutable.ImmutableArray AddRange(System.Collections.Immutable.ImmutableArray items) { throw null; } +#if !NETSTANDARD10 + public System.ReadOnlyMemory AsMemory() { throw null; } + public System.ReadOnlySpan AsSpan() { throw null; } +#endif public System.Collections.Immutable.ImmutableArray As() where TOther : class { throw null; } public System.Collections.Immutable.ImmutableArray CastArray() where TOther : class { throw null; } public static System.Collections.Immutable.ImmutableArray CastUp(System.Collections.Immutable.ImmutableArray items) where TDerived : class, T { throw null; } @@ -138,7 +142,7 @@ public void CopyTo(T[] destination, int destinationIndex) { } public System.Collections.Immutable.ImmutableArray Insert(int index, T item) { throw null; } public System.Collections.Immutable.ImmutableArray InsertRange(int index, System.Collections.Generic.IEnumerable items) { throw null; } public System.Collections.Immutable.ImmutableArray InsertRange(int index, System.Collections.Immutable.ImmutableArray items) { throw null; } -#if FEATURE_ITEMREFAPI +#if !NETSTANDARD10 public ref readonly T ItemRef(int index) { throw null; } #endif public int LastIndexOf(T item) { throw null; } @@ -223,7 +227,7 @@ public void CopyTo(T[] array, int index) { } public int IndexOf(T item, int startIndex, int count) { throw null; } public int IndexOf(T item, int startIndex, int count, System.Collections.Generic.IEqualityComparer equalityComparer) { throw null; } public void Insert(int index, T item) { } -#if FEATURE_ITEMREFAPI +#if !NETSTANDARD10 public ref readonly T ItemRef(int index) { throw null; } #endif public int LastIndexOf(T item) { throw null; } @@ -571,7 +575,7 @@ public void ForEach(System.Action action) { } public int IndexOf(T item, int index, int count, System.Collections.Generic.IEqualityComparer equalityComparer) { throw null; } public System.Collections.Immutable.ImmutableList Insert(int index, T item) { throw null; } public System.Collections.Immutable.ImmutableList InsertRange(int index, System.Collections.Generic.IEnumerable items) { throw null; } -#if FEATURE_ITEMREFAPI +#if !NETSTANDARD10 public ref readonly T ItemRef(int index) { throw null; } #endif public int LastIndexOf(T item, int index, int count, System.Collections.Generic.IEqualityComparer equalityComparer) { throw null; } @@ -661,7 +665,7 @@ public void ForEach(System.Action action) { } public int IndexOf(T item, int index, int count, System.Collections.Generic.IEqualityComparer equalityComparer) { throw null; } public void Insert(int index, T item) { } public void InsertRange(int index, System.Collections.Generic.IEnumerable items) { } -#if FEATURE_ITEMREFAPI +#if !NETSTANDARD10 public ref readonly T ItemRef(int index) { throw null; } #endif public int LastIndexOf(T item) { throw null; } @@ -719,7 +723,7 @@ internal ImmutableQueue() { } public System.Collections.Immutable.ImmutableQueue Enqueue(T value) { throw null; } public System.Collections.Immutable.ImmutableQueue.Enumerator GetEnumerator() { throw null; } public T Peek() { throw null; } -#if FEATURE_ITEMREFAPI +#if !NETSTANDARD10 public ref readonly T PeekRef() { throw null; } #endif System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } @@ -811,7 +815,7 @@ void System.Collections.IDictionary.Remove(object key) { } public System.Collections.Immutable.ImmutableSortedDictionary.Builder ToBuilder() { throw null; } public bool TryGetKey(TKey equalKey, out TKey actualKey) { throw null; } public bool TryGetValue(TKey key, out TValue value) { throw null; } -#if FEATURE_ITEMREFAPI +#if !NETSTANDARD10 public ref readonly TValue ValueRef(TKey key) { throw null; } #endif public System.Collections.Immutable.ImmutableSortedDictionary WithComparers(System.Collections.Generic.IComparer keyComparer) { throw null; } @@ -859,7 +863,7 @@ void System.Collections.IDictionary.Remove(object key) { } public System.Collections.Immutable.ImmutableSortedDictionary ToImmutable() { throw null; } public bool TryGetKey(TKey equalKey, out TKey actualKey) { throw null; } public bool TryGetValue(TKey key, out TValue value) { throw null; } -#if FEATURE_ITEMREFAPI +#if !NETSTANDARD10 public ref readonly TValue ValueRef(TKey key) { throw null; } #endif } @@ -918,7 +922,7 @@ internal ImmutableSortedSet() { } public bool IsProperSupersetOf(System.Collections.Generic.IEnumerable other) { throw null; } public bool IsSubsetOf(System.Collections.Generic.IEnumerable other) { throw null; } public bool IsSupersetOf(System.Collections.Generic.IEnumerable other) { throw null; } -#if FEATURE_ITEMREFAPI +#if !NETSTANDARD10 public ref readonly T ItemRef(int index) { throw null; } #endif public bool Overlaps(System.Collections.Generic.IEnumerable other) { throw null; } @@ -979,7 +983,7 @@ public void IntersectWith(System.Collections.Generic.IEnumerable other) { } public bool IsProperSupersetOf(System.Collections.Generic.IEnumerable other) { throw null; } public bool IsSubsetOf(System.Collections.Generic.IEnumerable other) { throw null; } public bool IsSupersetOf(System.Collections.Generic.IEnumerable other) { throw null; } -#if FEATURE_ITEMREFAPI +#if !NETSTANDARD10 public ref readonly T ItemRef(int index) { throw null; } #endif public bool Overlaps(System.Collections.Generic.IEnumerable other) { throw null; } @@ -1022,7 +1026,7 @@ internal ImmutableStack() { } public System.Collections.Immutable.ImmutableStack Clear() { throw null; } public System.Collections.Immutable.ImmutableStack.Enumerator GetEnumerator() { throw null; } public T Peek() { throw null; } -#if FEATURE_ITEMREFAPI +#if !NETSTANDARD10 public ref readonly T PeekRef() { throw null; } #endif public System.Collections.Immutable.ImmutableStack Pop() { throw null; } diff --git a/src/System.Collections.Immutable/ref/System.Collections.Immutable.csproj b/src/System.Collections.Immutable/ref/System.Collections.Immutable.csproj index 02bf613eafd3..c491c3431fcd 100644 --- a/src/System.Collections.Immutable/ref/System.Collections.Immutable.csproj +++ b/src/System.Collections.Immutable/ref/System.Collections.Immutable.csproj @@ -3,9 +3,6 @@ {C7EFF4EE-70DC-453B-B817-4AF67921AB03} netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release;netstandard1.0-Debug;netstandard1.0-Release;netstandard1.3-Debug;netstandard1.3-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release - - $(DefineConstants);FEATURE_ITEMREFAPI - @@ -23,4 +20,7 @@ + + + \ No newline at end of file diff --git a/src/System.Collections.Immutable/src/System.Collections.Immutable.csproj b/src/System.Collections.Immutable/src/System.Collections.Immutable.csproj index ea011472701d..1649010cbe35 100644 --- a/src/System.Collections.Immutable/src/System.Collections.Immutable.csproj +++ b/src/System.Collections.Immutable/src/System.Collections.Immutable.csproj @@ -8,9 +8,6 @@ netstandard1.0;portable-net45+win8+wp8+wpa81 netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release;netstandard1.0-Debug;netstandard1.0-Release;netstandard1.3-Debug;netstandard1.3-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release - - $(DefineConstants);FEATURE_ITEMREFAPI - @@ -114,4 +111,7 @@ + + + \ No newline at end of file diff --git a/src/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableArray_1.Builder.cs b/src/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableArray_1.Builder.cs index 482215723c4f..c2dbc680afdc 100644 --- a/src/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableArray_1.Builder.cs +++ b/src/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableArray_1.Builder.cs @@ -159,7 +159,7 @@ public T this[int index] } } -#if FEATURE_ITEMREFAPI +#if !NETSTANDARD10 /// /// Gets a read-only reference to the element at the specified index. /// diff --git a/src/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableArray_1.Minimal.cs b/src/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableArray_1.Minimal.cs index db759ca556c5..f453f29fc9f1 100644 --- a/src/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableArray_1.Minimal.cs +++ b/src/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableArray_1.Minimal.cs @@ -129,7 +129,7 @@ public T this[int index] } } -#if FEATURE_ITEMREFAPI +#if !NETSTANDARD10 /// /// Gets a read-only reference to the element at the specified index in the read-only list. /// diff --git a/src/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableArray_1.cs b/src/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableArray_1.cs index 48981cfc7fa0..2e873321c61e 100644 --- a/src/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableArray_1.cs +++ b/src/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableArray_1.cs @@ -92,6 +92,11 @@ T IReadOnlyList.this[int index] } } +#if !NETSTANDARD10 + public ReadOnlySpan AsSpan() => new ReadOnlySpan(array); + + public ReadOnlyMemory AsMemory() => new ReadOnlyMemory(array); +#endif /// /// Searches the array for the specified item. /// diff --git a/src/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableDictionary_2.HashBucket.cs b/src/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableDictionary_2.HashBucket.cs index d00db01e3ee9..995e45c858c3 100644 --- a/src/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableDictionary_2.HashBucket.cs +++ b/src/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableDictionary_2.HashBucket.cs @@ -186,7 +186,7 @@ internal HashBucket Add(TKey key, TValue value, IEqualityComparer valueComparer, out T exi int index = _additionalElements.IndexOf(value, valueComparer); if (index >= 0) { -#if FEATURE_ITEMREFAPI +#if !NETSTANDARD10 existingValue = _additionalElements.ItemRef(index); #else existingValue = _additionalElements[index]; diff --git a/src/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableList_1.Builder.cs b/src/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableList_1.Builder.cs index b37cc3380925..edc4c6a3884d 100644 --- a/src/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableList_1.Builder.cs +++ b/src/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableList_1.Builder.cs @@ -135,7 +135,7 @@ public T this[int index] { get { -#if FEATURE_ITEMREFAPI +#if !NETSTANDARD10 return this.Root.ItemRef(index); #else return this.Root[index]; @@ -159,7 +159,7 @@ T IOrderedCollection.this[int index] } } -#if FEATURE_ITEMREFAPI +#if !NETSTANDARD10 /// /// Gets a read-only reference to the value for a given index into the list. /// diff --git a/src/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableList_1.Node.cs b/src/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableList_1.Node.cs index bb716eb37ec7..b7d40788e3c0 100644 --- a/src/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableList_1.Node.cs +++ b/src/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableList_1.Node.cs @@ -187,7 +187,7 @@ internal T this[int index] } } -#if FEATURE_ITEMREFAPI +#if !NETSTANDARD10 /// /// Gets a read-only reference to the element of the set at the given index. /// @@ -524,7 +524,7 @@ internal Node Reverse(int index, int count) int end = index + count - 1; while (start < end) { -#if FEATURE_ITEMREFAPI +#if !NETSTANDARD10 T a = result.ItemRef(start); T b = result.ItemRef(end); #else diff --git a/src/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableList_1.cs b/src/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableList_1.cs index 81bbdda6bbb8..66a455f69991 100644 --- a/src/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableList_1.cs +++ b/src/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableList_1.cs @@ -169,13 +169,13 @@ private ImmutableList(Node root) /// The 0-based index of the element in the set to return. /// The element at the given position. /// Thrown from getter when is negative or not less than . -#if FEATURE_ITEMREFAPI +#if !NETSTANDARD10 public T this[int index] => _root.ItemRef(index); #else public T this[int index] => _root[index]; #endif -#if FEATURE_ITEMREFAPI +#if !NETSTANDARD10 /// /// Gets a read-only reference to the element of the set at the given index. /// diff --git a/src/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableQueue_1.cs b/src/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableQueue_1.cs index 02c1479b22fb..1f3c9061f591 100644 --- a/src/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableQueue_1.cs +++ b/src/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableQueue_1.cs @@ -138,7 +138,7 @@ public T Peek() return _forwards.Peek(); } -#if FEATURE_ITEMREFAPI +#if !NETSTANDARD10 /// /// Gets a read-only reference to the element at the front of the queue. /// diff --git a/src/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableSortedDictionary_2.Builder.cs b/src/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableSortedDictionary_2.Builder.cs index 1f1f2798ca5f..e7e7f8cdc26e 100644 --- a/src/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableSortedDictionary_2.Builder.cs +++ b/src/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableSortedDictionary_2.Builder.cs @@ -202,7 +202,7 @@ public TValue this[TKey key] } } -#if FEATURE_ITEMREFAPI +#if !NETSTANDARD10 /// /// Returns a read-only reference to the value associated with the provided key. /// diff --git a/src/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableSortedDictionary_2.Node.cs b/src/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableSortedDictionary_2.Node.cs index 7b5ecd0ba848..42c94167cf1f 100644 --- a/src/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableSortedDictionary_2.Node.cs +++ b/src/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableSortedDictionary_2.Node.cs @@ -329,7 +329,7 @@ internal Node Remove(TKey key, IComparer keyComparer, out bool mutated) return this.RemoveRecursive(key, keyComparer, out mutated); } -#if FEATURE_ITEMREFAPI +#if !NETSTANDARD10 /// /// Returns a read-only reference to the value associated with the provided key. /// diff --git a/src/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableSortedDictionary_2.cs b/src/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableSortedDictionary_2.cs index 5f1a39915796..ce1f976e0e79 100644 --- a/src/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableSortedDictionary_2.cs +++ b/src/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableSortedDictionary_2.cs @@ -209,7 +209,7 @@ public TValue this[TKey key] } } -#if FEATURE_ITEMREFAPI +#if !NETSTANDARD10 /// /// Returns a read-only reference to the value associated with the provided key. /// diff --git a/src/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableSortedSet_1.Builder.cs b/src/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableSortedSet_1.Builder.cs index 232a46fa9202..324a5cc088c3 100644 --- a/src/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableSortedSet_1.Builder.cs +++ b/src/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableSortedSet_1.Builder.cs @@ -105,14 +105,14 @@ bool ICollection.IsReadOnly /// public T this[int index] { -#if FEATURE_ITEMREFAPI +#if !NETSTANDARD10 get { return _root.ItemRef(index); } #else get { return _root[index]; } #endif } -#if FEATURE_ITEMREFAPI +#if !NETSTANDARD10 /// /// Gets a read-only reference to the element of the set at the given index. /// diff --git a/src/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableSortedSet_1.Node.cs b/src/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableSortedSet_1.Node.cs index 6cb0043f6489..3f58ff254601 100644 --- a/src/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableSortedSet_1.Node.cs +++ b/src/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableSortedSet_1.Node.cs @@ -253,7 +253,7 @@ internal T this[int index] } } -#if FEATURE_ITEMREFAPI +#if !NETSTANDARD10 /// /// Gets a read-only reference to the element of the set at the given index. /// diff --git a/src/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableSortedSet_1.cs b/src/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableSortedSet_1.cs index a610ed0707ac..939ed15a0d47 100644 --- a/src/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableSortedSet_1.cs +++ b/src/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableSortedSet_1.cs @@ -148,7 +148,7 @@ public T this[int index] { get { -#if FEATURE_ITEMREFAPI +#if !NETSTANDARD10 return _root.ItemRef(index); #else return _root[index]; @@ -156,7 +156,7 @@ public T this[int index] } } -#if FEATURE_ITEMREFAPI +#if !NETSTANDARD10 /// /// Gets a read-only reference of the element of the set at the given index. /// diff --git a/src/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableStack_1.cs b/src/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableStack_1.cs index 7310af416bfd..5cf5a233cb7a 100644 --- a/src/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableStack_1.cs +++ b/src/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableStack_1.cs @@ -117,7 +117,7 @@ public T Peek() return _head; } -#if FEATURE_ITEMREFAPI +#if !NETSTANDARD10 /// /// Gets a read-only reference to the element on the top of the stack. /// diff --git a/src/System.Collections.Immutable/tests/ImmutableArrayTest.cs b/src/System.Collections.Immutable/tests/ImmutableArrayTest.cs index 925de264a21b..cece07772ef3 100644 --- a/src/System.Collections.Immutable/tests/ImmutableArrayTest.cs +++ b/src/System.Collections.Immutable/tests/ImmutableArrayTest.cs @@ -39,6 +39,15 @@ public static IEnumerable SpecialInt32ImmutableArrayData() yield return new object[] { s_empty }; } + public static IEnumerable StringImmutableArrayData() + { + yield return new object[] { new string[0] }; + yield return new object[] { new[] { "a" } }; + yield return new object[] { new[] { "a", "b", "c" } }; + yield return new object[] { new[] { string.Empty } }; + yield return new object[] { new[] { (string)null } }; + } + [Theory] [MemberData(nameof(Int32EnumerableData))] public void Clear(IEnumerable source) @@ -46,6 +55,104 @@ public void Clear(IEnumerable source) Assert.True(s_empty == source.ToImmutableArray().Clear()); } + [Theory] + [MemberData(nameof(Int32EnumerableData))] + public void AsSpanRoundTripTests(IEnumerable source) + { + ImmutableArray immutableArray = source.ToImmutableArray(); + ReadOnlySpan span = immutableArray.AsSpan(); + Assert.Equal(immutableArray, span.ToArray()); + Assert.Equal(immutableArray.Length, span.Length); + } + + [Fact] + public void AsSpanRoundTripEmptyArrayTests() + { + ImmutableArray immutableArray = ImmutableArray.Create(Array.Empty()); + ReadOnlySpan span = immutableArray.AsSpan(); + Assert.Equal(immutableArray, span.ToArray()); + Assert.Equal(immutableArray.Length, span.Length); + } + + [Fact] + public void AsSpanRoundTripDefaultArrayTests() + { + ImmutableArray immutableArray = new ImmutableArray(); + ReadOnlySpan span = immutableArray.AsSpan(); + Assert.True(immutableArray.IsDefault); + Assert.Equal(0, span.Length); + Assert.True(span.IsEmpty); + } + + [Theory] + [MemberData(nameof(StringImmutableArrayData))] + public void AsSpanRoundTripStringTests(IEnumerable source) + { + ImmutableArray immutableArray = source.ToImmutableArray(); + ReadOnlySpan span = immutableArray.AsSpan(); + Assert.Equal(immutableArray, span.ToArray()); + Assert.Equal(immutableArray.Length, span.Length); + } + + [Fact] + public void AsSpanRoundTripDefaultArrayStringTests() + { + ImmutableArray immutableArray = new ImmutableArray(); + ReadOnlySpan span = immutableArray.AsSpan(); + Assert.True(immutableArray.IsDefault); + Assert.Equal(0, span.Length); + Assert.True(span.IsEmpty); + } + + [Theory] + [MemberData(nameof(Int32EnumerableData))] + public void AsMemoryRoundTripTests(IEnumerable source) + { + ImmutableArray immutableArray = source.ToImmutableArray(); + ReadOnlyMemory memory = immutableArray.AsMemory(); + Assert.Equal(immutableArray, memory.ToArray()); + Assert.Equal(immutableArray.Length, memory.Length); + } + + [Fact] + public void AsMemoryRoundTripEmptyArrayTests() + { + ImmutableArray immutableArray = ImmutableArray.Create(Array.Empty()); + ReadOnlyMemory memory = immutableArray.AsMemory(); + Assert.Equal(immutableArray, memory.ToArray()); + Assert.Equal(immutableArray.Length, memory.Length); + } + + [Fact] + public void AsMemoryRoundTripDefaultArrayTests() + { + ImmutableArray immutableArray = new ImmutableArray(); + ReadOnlyMemory memory = immutableArray.AsMemory(); + Assert.True(immutableArray.IsDefault); + Assert.Equal(0, memory.Length); + Assert.True(memory.IsEmpty); + } + + [Theory] + [MemberData(nameof(StringImmutableArrayData))] + public void AsMemoryRoundTripStringTests(IEnumerable source) + { + ImmutableArray immutableArray = source.ToImmutableArray(); + ReadOnlyMemory memory = immutableArray.AsMemory(); + Assert.Equal(immutableArray, memory.ToArray()); + Assert.Equal(immutableArray.Length, memory.Length); + } + + [Fact] + public void AsMemoryRoundTripDefaultArrayStringTests() + { + ImmutableArray immutableArray = new ImmutableArray(); + ReadOnlyMemory memory = immutableArray.AsMemory(); + Assert.True(immutableArray.IsDefault); + Assert.Equal(0, memory.Length); + Assert.True(memory.IsEmpty); + } + [Fact] public void CreateEnumerableElementType() { diff --git a/src/mscorlib.WinRT-Facade/ref/mscorlib.WinRT-Facade.csproj b/src/mscorlib.WinRT-Facade/ref/mscorlib.WinRT-Facade.csproj index a72021231cc0..6b4cf40ab791 100644 --- a/src/mscorlib.WinRT-Facade/ref/mscorlib.WinRT-Facade.csproj +++ b/src/mscorlib.WinRT-Facade/ref/mscorlib.WinRT-Facade.csproj @@ -8,7 +8,6 @@ false {4773F3C0-646E-4542-9FD5-D07A7737403A} netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release;netstandard1.0-Debug;netstandard1.0-Release;uap-Debug;uap-Release - $(DefineConstants);NETSTANDARD10 $(DefineConstants);NETSTANDARD12 From b3ac650a36e2fa04988fb37c4a0a3195a9e2dc36 Mon Sep 17 00:00:00 2001 From: Tanner Gooding Date: Tue, 21 May 2019 04:09:12 -0700 Subject: [PATCH 443/607] Adding some additional tests to validating formatting is correct with regards to rounding. (#37820) --- .../RealFormatterTestsBase.netcoreapp.cs | 84 +++++++++++++++++++ 1 file changed, 84 insertions(+) diff --git a/src/Common/tests/System/RealFormatterTestsBase.netcoreapp.cs b/src/Common/tests/System/RealFormatterTestsBase.netcoreapp.cs index f1eb615d7709..5d1e27b66f3a 100644 --- a/src/Common/tests/System/RealFormatterTestsBase.netcoreapp.cs +++ b/src/Common/tests/System/RealFormatterTestsBase.netcoreapp.cs @@ -20,6 +20,8 @@ public abstract class RealFormatterTestsBase [InlineData(Math.E, "¤2.72")] [InlineData(Math.PI, "¤3.14")] [InlineData(0.0, "¤0.00")] + [InlineData(0.0046, "¤0.00")] + [InlineData(0.125, "¤0.12")] [InlineData(0.84551240822557006, "¤0.85")] [InlineData(1.0, "¤1.00")] [InlineData(1844674407370955.25, "¤1,844,674,407,370,955.25")] @@ -31,6 +33,8 @@ public abstract class RealFormatterTestsBase [InlineData(Math.E, "¤2.7183")] [InlineData(Math.PI, "¤3.1416")] [InlineData(0.0, "¤0.0000")] + [InlineData(0.0046, "¤0.0046")] + [InlineData(0.125, "¤0.1250")] [InlineData(0.84551240822557006, "¤0.8455")] [InlineData(1.0, "¤1.0000")] [InlineData(1844674407370955.25, "¤1,844,674,407,370,955.2500")] @@ -42,6 +46,8 @@ public abstract class RealFormatterTestsBase [InlineData(Math.E, "¤2.71828182845904509080")] [InlineData(Math.PI, "¤3.14159265358979311600")] [InlineData(0.0, "¤0.00000000000000000000")] + [InlineData(0.0046, "¤0.00459999999999999992")] + [InlineData(0.125, "¤0.12500000000000000000")] [InlineData(0.84551240822557006, "¤0.84551240822557005572")] [InlineData(1.0, "¤1.00000000000000000000")] [InlineData(1844674407370955.25, "¤1,844,674,407,370,955.25000000000000000000")] @@ -53,6 +59,8 @@ public abstract class RealFormatterTestsBase [InlineData(Math.E, "2.718282E+000")] [InlineData(Math.PI, "3.141593E+000")] [InlineData(0.0, "0.000000E+000")] + [InlineData(0.0046, "4.600000E-003")] + [InlineData(0.125, "1.250000E-001")] [InlineData(0.84551240822557006, "8.455124E-001")] [InlineData(1.0, "1.000000E+000")] [InlineData(1844674407370955.25, "1.844674E+015")] @@ -64,6 +72,8 @@ public abstract class RealFormatterTestsBase [InlineData(Math.E, "2.7183E+000")] [InlineData(Math.PI, "3.1416E+000")] [InlineData(0.0, "0.0000E+000")] + [InlineData(0.0046, "4.6000E-003")] + [InlineData(0.125, "1.2500E-001")] [InlineData(0.84551240822557006, "8.4551E-001")] [InlineData(1.0, "1.0000E+000")] [InlineData(1844674407370955.25, "1.8447E+015")] @@ -75,6 +85,8 @@ public abstract class RealFormatterTestsBase [InlineData(Math.E, "2.71828182845904509080E+000")] [InlineData(Math.PI, "3.14159265358979311600E+000")] [InlineData(0.0, "0.00000000000000000000E+000")] + [InlineData(0.0046, "4.59999999999999992228E-003")] + [InlineData(0.125, "1.25000000000000000000E-001")] [InlineData(0.84551240822557006, "8.45512408225570055720E-001")] [InlineData(1.0, "1.00000000000000000000E+000")] [InlineData(1844674407370955.25, "1.84467440737095525000E+015")] @@ -86,6 +98,8 @@ public abstract class RealFormatterTestsBase [InlineData(Math.E, "2.72")] [InlineData(Math.PI, "3.14")] [InlineData(0.0, "0.00")] + [InlineData(0.0046, "0.00")] + [InlineData(0.125, "0.12")] [InlineData(0.84551240822557006, "0.85")] [InlineData(1.0, "1.00")] [InlineData(1844674407370955.25, "1844674407370955.25")] @@ -97,6 +111,8 @@ public abstract class RealFormatterTestsBase [InlineData(Math.E, "2.7183")] [InlineData(Math.PI, "3.1416")] [InlineData(0.0, "0.0000")] + [InlineData(0.0046, "0.0046")] + [InlineData(0.125, "0.1250")] [InlineData(0.84551240822557006, "0.8455")] [InlineData(1.0, "1.0000")] [InlineData(1844674407370955.25, "1844674407370955.2500")] @@ -108,6 +124,8 @@ public abstract class RealFormatterTestsBase [InlineData(Math.E, "2.71828182845904509080")] [InlineData(Math.PI, "3.14159265358979311600")] [InlineData(0.0, "0.00000000000000000000")] + [InlineData(0.0046, "0.00459999999999999992")] + [InlineData(0.125, "0.12500000000000000000")] [InlineData(0.84551240822557006, "0.84551240822557005572")] [InlineData(1.0, "1.00000000000000000000")] [InlineData(1844674407370955.25, "1844674407370955.25000000000000000000")] @@ -119,6 +137,8 @@ public abstract class RealFormatterTestsBase [InlineData(Math.E, "2.718281828459045")] [InlineData(Math.PI, "3.141592653589793")] [InlineData(0.0, "0")] + [InlineData(0.0046, "0.0046")] + [InlineData(0.125, "0.125")] [InlineData(0.84551240822557006, "0.8455124082255701")] [InlineData(1.0, "1")] [InlineData(1844674407370955.25, "1844674407370955.2")] @@ -130,6 +150,8 @@ public abstract class RealFormatterTestsBase [InlineData(Math.E, "2.718")] [InlineData(Math.PI, "3.142")] [InlineData(0.0, "0")] + [InlineData(0.0046, "0.0046")] + [InlineData(0.125, "0.125")] [InlineData(0.84551240822557006, "0.8455")] [InlineData(1.0, "1")] [InlineData(1844674407370955.25, "1.845E+15")] @@ -141,6 +163,8 @@ public abstract class RealFormatterTestsBase [InlineData(Math.E, "2.7182818284590450908")] [InlineData(Math.PI, "3.141592653589793116")] [InlineData(0.0, "0")] + [InlineData(0.0046, "0.0045999999999999999223")] + [InlineData(0.125, "0.125")] [InlineData(0.84551240822557006, "0.84551240822557005572")] [InlineData(1.0, "1")] [InlineData(1844674407370955.25, "1844674407370955.25")] @@ -152,6 +176,8 @@ public abstract class RealFormatterTestsBase [InlineData(Math.E, "2.72")] [InlineData(Math.PI, "3.14")] [InlineData(0.0, "0.00")] + [InlineData(0.0046, "0.00")] + [InlineData(0.125, "0.12")] [InlineData(0.84551240822557006, "0.85")] [InlineData(1.0, "1.00")] [InlineData(1844674407370955.25, "1,844,674,407,370,955.25")] @@ -163,6 +189,8 @@ public abstract class RealFormatterTestsBase [InlineData(Math.E, "2.7183")] [InlineData(Math.PI, "3.1416")] [InlineData(0.0, "0.0000")] + [InlineData(0.0046, "0.0046")] + [InlineData(0.125, "0.1250")] [InlineData(0.84551240822557006, "0.8455")] [InlineData(1.0, "1.0000")] [InlineData(1844674407370955.25, "1,844,674,407,370,955.2500")] @@ -174,6 +202,8 @@ public abstract class RealFormatterTestsBase [InlineData(Math.E, "2.71828182845904509080")] [InlineData(Math.PI, "3.14159265358979311600")] [InlineData(0.0, "0.00000000000000000000")] + [InlineData(0.0046, "0.00459999999999999992")] + [InlineData(0.125, "0.12500000000000000000")] [InlineData(0.84551240822557006, "0.84551240822557005572")] [InlineData(1.0, "1.00000000000000000000")] [InlineData(1844674407370955.25, "1,844,674,407,370,955.25000000000000000000")] @@ -185,6 +215,8 @@ public abstract class RealFormatterTestsBase [InlineData(Math.E, "271.83 %")] [InlineData(Math.PI, "314.16 %")] [InlineData(0.0, "0.00 %")] + [InlineData(0.0046, "0.46 %")] + [InlineData(0.125, "12.50 %")] [InlineData(0.84551240822557006, "84.55 %")] [InlineData(1.0, "100.00 %")] [InlineData(1844674407370955.25, "184,467,440,737,095,525.00 %")] @@ -196,6 +228,8 @@ public abstract class RealFormatterTestsBase [InlineData(Math.E, "271.8282 %")] [InlineData(Math.PI, "314.1593 %")] [InlineData(0.0, "0.0000 %")] + [InlineData(0.0046, "0.4600 %")] + [InlineData(0.125, "12.5000 %")] [InlineData(0.84551240822557006, "84.5512 %")] [InlineData(1.0, "100.0000 %")] [InlineData(1844674407370955.25, "184,467,440,737,095,525.0000 %")] @@ -207,6 +241,8 @@ public abstract class RealFormatterTestsBase [InlineData(Math.E, "271.82818284590450907956 %")] [InlineData(Math.PI, "314.15926535897931159980 %")] [InlineData(0.0, "0.00000000000000000000 %")] + [InlineData(0.0046, "0.45999999999999999223 %")] + [InlineData(0.125, "12.50000000000000000000 %")] [InlineData(0.84551240822557006, "84.55124082255700557198 %")] [InlineData(1.0, "100.00000000000000000000 %")] [InlineData(1844674407370955.25, "184,467,440,737,095,525.00000000000000000000 %")] @@ -218,6 +254,8 @@ public abstract class RealFormatterTestsBase [InlineData(Math.E, "2.718281828459045")] [InlineData(Math.PI, "3.141592653589793")] [InlineData(0.0, "0")] + [InlineData(0.0046, "0.0046")] + [InlineData(0.125, "0.125")] [InlineData(0.84551240822557006, "0.8455124082255701")] [InlineData(1.0, "1")] [InlineData(1844674407370955.25, "1844674407370955.2")] @@ -229,6 +267,8 @@ public abstract class RealFormatterTestsBase [InlineData(Math.E, "2.718281828459045")] [InlineData(Math.PI, "3.141592653589793")] [InlineData(0.0, "0")] + [InlineData(0.0046, "0.0046")] + [InlineData(0.125, "0.125")] [InlineData(0.84551240822557006, "0.8455124082255701")] [InlineData(1.0, "1")] [InlineData(1844674407370955.25, "1844674407370955.2")] @@ -240,6 +280,8 @@ public abstract class RealFormatterTestsBase [InlineData(Math.E, "2.718281828459045")] [InlineData(Math.PI, "3.141592653589793")] [InlineData(0.0, "0")] + [InlineData(0.0046, "0.0046")] + [InlineData(0.125, "0.125")] [InlineData(0.84551240822557006, "0.8455124082255701")] [InlineData(1.0, "1")] [InlineData(1844674407370955.25, "1844674407370955.2")] @@ -266,6 +308,8 @@ private void TestFormatterDouble_Standard(double value, string format, string ex [InlineData(MathF.E, "¤2.72")] [InlineData(MathF.PI, "¤3.14")] [InlineData(0.0f, "¤0.00")] + [InlineData(0.0046f, "¤0.00")] + [InlineData(0.125f, "¤0.12")] [InlineData(0.845512390, "¤0.85")] [InlineData(1.0f, "¤1.00")] [InlineData(429496.72, "¤429,496.72")] @@ -277,6 +321,8 @@ private void TestFormatterDouble_Standard(double value, string format, string ex [InlineData(MathF.E, "¤2.7183")] [InlineData(MathF.PI, "¤3.1416")] [InlineData(0.0f, "¤0.0000")] + [InlineData(0.0046f, "¤0.0046")] + [InlineData(0.125f, "¤0.1250")] [InlineData(0.845512390, "¤0.8455")] [InlineData(1.0f, "¤1.0000")] [InlineData(429496.72, "¤429,496.7188")] @@ -288,6 +334,8 @@ private void TestFormatterDouble_Standard(double value, string format, string ex [InlineData(MathF.E, "¤2.71828174591064453125")] [InlineData(MathF.PI, "¤3.14159274101257324219")] [InlineData(0.0f, "¤0.00000000000000000000")] + [InlineData(0.0046f, "¤0.00460000010207295418")] + [InlineData(0.125f, "¤0.12500000000000000000")] [InlineData(0.845512390, "¤0.84551239013671875000")] [InlineData(1.0f, "¤1.00000000000000000000")] [InlineData(429496.72, "¤429,496.71875000000000000000")] @@ -299,6 +347,8 @@ private void TestFormatterDouble_Standard(double value, string format, string ex [InlineData(MathF.E, "2.718282E+000")] [InlineData(MathF.PI, "3.141593E+000")] [InlineData(0.0f, "0.000000E+000")] + [InlineData(0.0046f, "4.600000E-003")] + [InlineData(0.125f, "1.250000E-001")] [InlineData(0.845512390, "8.455124E-001")] [InlineData(1.0f, "1.000000E+000")] [InlineData(429496.72, "4.294967E+005")] @@ -310,6 +360,8 @@ private void TestFormatterDouble_Standard(double value, string format, string ex [InlineData(MathF.E, "2.7183E+000")] [InlineData(MathF.PI, "3.1416E+000")] [InlineData(0.0f, "0.0000E+000")] + [InlineData(0.0046f, "4.6000E-003")] + [InlineData(0.125f, "1.2500E-001")] [InlineData(0.845512390, "8.4551E-001")] [InlineData(1.0f, "1.0000E+000")] [InlineData(429496.72, "4.2950E+005")] @@ -321,6 +373,8 @@ private void TestFormatterDouble_Standard(double value, string format, string ex [InlineData(MathF.E, "2.71828174591064453125E+000")] [InlineData(MathF.PI, "3.14159274101257324219E+000")] [InlineData(0.0f, "0.00000000000000000000E+000")] + [InlineData(0.0046f, "4.60000010207295417786E-003")] + [InlineData(0.125f, "1.25000000000000000000E-001")] [InlineData(0.845512390, "8.45512390136718750000E-001")] [InlineData(1.0f, "1.00000000000000000000E+000")] [InlineData(429496.72, "4.29496718750000000000E+005")] @@ -332,6 +386,8 @@ private void TestFormatterDouble_Standard(double value, string format, string ex [InlineData(MathF.E, "2.72")] [InlineData(MathF.PI, "3.14")] [InlineData(0.0f, "0.00")] + [InlineData(0.0046f, "0.00")] + [InlineData(0.125f, "0.12")] [InlineData(0.845512390, "0.85")] [InlineData(1.0f, "1.00")] [InlineData(429496.72, "429496.72")] @@ -343,6 +399,8 @@ private void TestFormatterDouble_Standard(double value, string format, string ex [InlineData(MathF.E, "2.7183")] [InlineData(MathF.PI, "3.1416")] [InlineData(0.0f, "0.0000")] + [InlineData(0.0046f, "0.0046")] + [InlineData(0.125f, "0.1250")] [InlineData(0.845512390, "0.8455")] [InlineData(1.0f, "1.0000")] [InlineData(429496.72, "429496.7188")] @@ -354,6 +412,8 @@ private void TestFormatterDouble_Standard(double value, string format, string ex [InlineData(MathF.E, "2.71828174591064453125")] [InlineData(MathF.PI, "3.14159274101257324219")] [InlineData(0.0f, "0.00000000000000000000")] + [InlineData(0.0046f, "0.00460000010207295418")] + [InlineData(0.125f, "0.12500000000000000000")] [InlineData(0.845512390, "0.84551239013671875000")] [InlineData(1.0f, "1.00000000000000000000")] [InlineData(429496.72, "429496.71875000000000000000")] @@ -365,6 +425,8 @@ private void TestFormatterDouble_Standard(double value, string format, string ex [InlineData(MathF.E, "2.7182817")] [InlineData(MathF.PI, "3.1415927")] [InlineData(0.0f, "0")] + [InlineData(0.0046f, "0.0046")] + [InlineData(0.125f, "0.125")] [InlineData(0.845512390, "0.8455124")] [InlineData(1.0f, "1")] [InlineData(429496.72, "429496.72")] @@ -376,6 +438,8 @@ private void TestFormatterDouble_Standard(double value, string format, string ex [InlineData(MathF.E, "2.718")] [InlineData(MathF.PI, "3.142")] [InlineData(0.0f, "0")] + [InlineData(0.0046f, "0.0046")] + [InlineData(0.125f, "0.125")] [InlineData(0.845512390, "0.8455")] [InlineData(1.0f, "1")] [InlineData(429496.72, "4.295E+05")] @@ -387,6 +451,8 @@ private void TestFormatterDouble_Standard(double value, string format, string ex [InlineData(MathF.E, "2.7182817459106445312")] [InlineData(MathF.PI, "3.1415927410125732422")] [InlineData(0.0f, "0")] + [InlineData(0.0046f, "0.0046000001020729541779")] + [InlineData(0.125f, "0.125")] [InlineData(0.845512390, "0.84551239013671875")] [InlineData(1.0f, "1")] [InlineData(429496.72, "429496.71875")] @@ -398,6 +464,8 @@ private void TestFormatterDouble_Standard(double value, string format, string ex [InlineData(MathF.E, "2.72")] [InlineData(MathF.PI, "3.14")] [InlineData(0.0f, "0.00")] + [InlineData(0.0046f, "0.00")] + [InlineData(0.125f, "0.12")] [InlineData(0.845512390, "0.85")] [InlineData(1.0f, "1.00")] [InlineData(429496.72, "429,496.72")] @@ -409,6 +477,8 @@ private void TestFormatterDouble_Standard(double value, string format, string ex [InlineData(MathF.E, "2.7183")] [InlineData(MathF.PI, "3.1416")] [InlineData(0.0f, "0.0000")] + [InlineData(0.0046f, "0.0046")] + [InlineData(0.125f, "0.1250")] [InlineData(0.845512390, "0.8455")] [InlineData(1.0f, "1.0000")] [InlineData(429496.72, "429,496.7188")] @@ -420,6 +490,8 @@ private void TestFormatterDouble_Standard(double value, string format, string ex [InlineData(MathF.E, "2.71828174591064453125")] [InlineData(MathF.PI, "3.14159274101257324219")] [InlineData(0.0f, "0.00000000000000000000")] + [InlineData(0.0046f, "0.00460000010207295418")] + [InlineData(0.125f, "0.12500000000000000000")] [InlineData(0.845512390, "0.84551239013671875000")] [InlineData(1.0f, "1.00000000000000000000")] [InlineData(429496.72, "429,496.71875000000000000000")] @@ -431,6 +503,8 @@ private void TestFormatterDouble_Standard(double value, string format, string ex [InlineData(MathF.E, "271.83 %")] [InlineData(MathF.PI, "314.16 %")] [InlineData(0.0f, "0.00 %")] + [InlineData(0.0046f, "0.46 %")] + [InlineData(0.125f, "12.50 %")] [InlineData(0.845512390, "84.55 %")] [InlineData(1.0f, "100.00 %")] [InlineData(429496.72, "42,949,671.88 %")] @@ -442,6 +516,8 @@ private void TestFormatterDouble_Standard(double value, string format, string ex [InlineData(MathF.E, "271.8282 %")] [InlineData(MathF.PI, "314.1593 %")] [InlineData(0.0f, "0.0000 %")] + [InlineData(0.0046f, "0.4600 %")] + [InlineData(0.125f, "12.5000 %")] [InlineData(0.845512390, "84.5512 %")] [InlineData(1.0f, "100.0000 %")] [InlineData(429496.72, "42,949,671.8750 %")] @@ -453,6 +529,8 @@ private void TestFormatterDouble_Standard(double value, string format, string ex [InlineData(MathF.E, "271.82817459106445312500 %")] [InlineData(MathF.PI, "314.15927410125732421875 %")] [InlineData(0.0f, "0.00000000000000000000 %")] + [InlineData(0.0046f, "0.46000001020729541779 %")] + [InlineData(0.125f, "12.50000000000000000000 %")] [InlineData(0.845512390, "84.55123901367187500000 %")] [InlineData(1.0f, "100.00000000000000000000 %")] [InlineData(429496.72, "42,949,671.87500000000000000000 %")] @@ -464,6 +542,8 @@ private void TestFormatterDouble_Standard(double value, string format, string ex [InlineData(MathF.E, "2.7182817")] [InlineData(MathF.PI, "3.1415927")] [InlineData(0.0f, "0")] + [InlineData(0.0046f, "0.0046")] + [InlineData(0.125f, "0.125")] [InlineData(0.845512390, "0.8455124")] [InlineData(1.0f, "1")] [InlineData(429496.72, "429496.72")] @@ -475,6 +555,8 @@ private void TestFormatterDouble_Standard(double value, string format, string ex [InlineData(MathF.E, "2.7182817")] [InlineData(MathF.PI, "3.1415927")] [InlineData(0.0f, "0")] + [InlineData(0.0046f, "0.0046")] + [InlineData(0.125f, "0.125")] [InlineData(0.845512390, "0.8455124")] [InlineData(1.0f, "1")] [InlineData(429496.72, "429496.72")] @@ -486,6 +568,8 @@ private void TestFormatterDouble_Standard(double value, string format, string ex [InlineData(MathF.E, "2.7182817")] [InlineData(MathF.PI, "3.1415927")] [InlineData(0.0f, "0")] + [InlineData(0.0046f, "0.0046")] + [InlineData(0.125f, "0.125")] [InlineData(0.845512390, "0.8455124")] [InlineData(1.0f, "1")] [InlineData(429496.72, "429496.72")] From 0f22cd03c7efad7f6335ffb27be2ea7abf2320b8 Mon Sep 17 00:00:00 2001 From: Tarek Mahmoud Sayed Date: Tue, 21 May 2019 08:53:31 -0700 Subject: [PATCH 444/607] Enhance the Missing Resources Exception Message (dotnet/coreclr#24645) * Enhance the Missing Resources Exception Message * Address the feedback * Fix Nullable declaration Signed-off-by: dotnet-bot --- .../ManifestBasedResourceGroveler.cs | 41 +++++++++++++++---- 1 file changed, 32 insertions(+), 9 deletions(-) diff --git a/src/Common/src/CoreLib/System/Resources/ManifestBasedResourceGroveler.cs b/src/Common/src/CoreLib/System/Resources/ManifestBasedResourceGroveler.cs index f37b506ee93d..f7f551b17c99 100644 --- a/src/Common/src/CoreLib/System/Resources/ManifestBasedResourceGroveler.cs +++ b/src/Common/src/CoreLib/System/Resources/ManifestBasedResourceGroveler.cs @@ -4,14 +4,14 @@ /*============================================================ ** -** -** +** +** ** ** ** Purpose: Searches for resources in Assembly manifest, used ** for assembly-based resource lookup. ** -** +** ===========================================================*/ namespace System.Resources @@ -34,7 +34,7 @@ namespace System.Resources // Note: this type is integral to the construction of exception objects, // and sometimes this has to be done in low memory situtations (OOM) or // to create TypeInitializationExceptions due to failure of a static class - // constructor. This type needs to be extremely careful and assume that + // constructor. This type needs to be extremely careful and assume that // any type it references may have previously failed to construct, so statics // belonging to that type may not be initialized. FrameworkEventSource.Log // is one such example. @@ -93,7 +93,7 @@ public ManifestBasedResourceGroveler(ResourceManager.ResourceManagerMediator med { // Handle case in here where someone added a callback for assembly load events. // While no other threads have called into GetResourceSet, our own thread can! - // At that point, we could already have an RS in our hash table, and we don't + // At that point, we could already have an RS in our hash table, and we don't // want to add it twice. lock (localResourceSets) { @@ -165,7 +165,7 @@ internal static CultureInfo GetNeutralResourcesLanguage(Assembly a, out Ultimate } catch (ArgumentException e) { // we should catch ArgumentException only. - // Note we could go into infinite loops if mscorlib's + // Note we could go into infinite loops if mscorlib's // NeutralResourcesLanguageAttribute is mangled. If this assert // fires, please fix the build process for the BCL directory. if (a == typeof(object).Assembly) @@ -333,7 +333,7 @@ internal ResourceSet CreateResourceSet(Stream store, Assembly assembly) return stream; } - // Looks up a .resources file in the assembly manifest using + // Looks up a .resources file in the assembly manifest using // case-insensitive lookup rules. Yes, this is slow. The metadata // dev lead refuses to make all assembly manifest resource lookups case-insensitive, // even optionally case-insensitive. @@ -416,7 +416,7 @@ private bool CanUseDefaultResourceClasses(string readerTypeName, string resSetTy if (_mediator.UserResourceSet != null) return false; - // Ignore the actual version of the ResourceReader and + // Ignore the actual version of the ResourceReader and // RuntimeResourceSet classes. Let those classes deal with // versioning themselves. @@ -463,6 +463,27 @@ private void HandleSatelliteMissing() throw new MissingSatelliteAssemblyException(SR.Format(SR.MissingSatelliteAssembly_Culture_Name, _mediator.NeutralResourcesCulture, satAssemName), missingCultureName); } + private static string GetManifestResourceNamesList(Assembly assembly) + { + try + { + string postfix = "\""; + string [] resourceSetNames = assembly.GetManifestResourceNames(); + + // If we have more than 10 resource sets, we just print the first 10 for the sake of the exception message readability. + if (resourceSetNames.Length > 10) + { + resourceSetNames = resourceSetNames[..10]; + postfix = "\", ..."; + } + return "\"" + String.Join("\", \"", resourceSetNames) + postfix; + } + catch + { + return "\"\""; + } + } + private void HandleResourceStreamMissing(string fileName) { Debug.Assert(_mediator.BaseName != null); @@ -483,7 +504,9 @@ private void HandleResourceStreamMissing(string fileName) resName = _mediator.LocationInfo.Namespace + Type.Delimiter; resName += fileName; Debug.Assert(_mediator.MainAssembly != null); - throw new MissingManifestResourceException(SR.Format(SR.MissingManifestResource_NoNeutralAsm, resName, _mediator.MainAssembly.GetName().Name)); + throw new MissingManifestResourceException( + SR.Format(SR.MissingManifestResource_NoNeutralAsm, + resName, _mediator.MainAssembly.GetName().Name, GetManifestResourceNamesList(_mediator.MainAssembly))); } } } From a70f241c0096ed2695333faaa08811e09e947a80 Mon Sep 17 00:00:00 2001 From: dotnet-maestro-bot Date: Tue, 21 May 2019 10:32:31 -0700 Subject: [PATCH 445/607] Update ProjectNTfs to beta-27721-00 (#37832) --- eng/dependencies.props | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/dependencies.props b/eng/dependencies.props index 1fa847381983..fbd6765a81f6 100644 --- a/eng/dependencies.props +++ b/eng/dependencies.props @@ -9,12 +9,12 @@ These ref versions are pulled from https://github.com/dotnet/versions. --> - 8a12b7e49b4f381100a0d239d5672b2c30ded40a + a138056d24c7c98033118faa7e03ba806d6495e4 - beta-27720-00 + beta-27721-00 From 85e0712b2a2fe6ef03bc1ae76e1fba997fe5e85a Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Tue, 21 May 2019 19:37:24 +0200 Subject: [PATCH 446/607] Update dependencies from https://github.com/dotnet/arcade build 20190520.2 (#37833) - Microsoft.DotNet.XUnitExtensions - 2.4.0-beta.19270.2 - Microsoft.DotNet.XUnitConsoleRunner - 2.5.1-beta.19270.2 - Microsoft.DotNet.VersionTools.Tasks - 1.0.0-beta.19270.2 - Microsoft.DotNet.ApiCompat - 1.0.0-beta.19270.2 - Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19270.2 - Microsoft.DotNet.Build.Tasks.Configuration - 1.0.0-beta.19270.2 - Microsoft.DotNet.Build.Tasks.Feed - 2.2.0-beta.19270.2 - Microsoft.DotNet.Build.Tasks.Packaging - 1.0.0-beta.19270.2 - Microsoft.DotNet.CodeAnalysis - 1.0.0-beta.19270.2 - Microsoft.DotNet.CoreFxTesting - 1.0.0-beta.19270.2 - Microsoft.DotNet.GenAPI - 1.0.0-beta.19270.2 - Microsoft.DotNet.GenFacades - 1.0.0-beta.19270.2 - Microsoft.DotNet.Helix.Sdk - 2.0.0-beta.19270.2 - Microsoft.DotNet.RemoteExecutor - 1.0.0-beta.19270.2 --- eng/Version.Details.xml | 56 ++++++++++++++++++++--------------------- eng/Versions.props | 24 +++++++++--------- global.json | 4 +-- 3 files changed, 42 insertions(+), 42 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 9ea9dfe0c69b..95af9cf888b2 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -34,65 +34,65 @@ https://github.com/dotnet/corefx e58b35cd0f8fe6caa194ca7e48388d8d59854fe0 - + https://github.com/dotnet/arcade - e913fb3b02d4089a91ff91c041c5f6e7c29038b0 + 3b0760f8789d5d4bd146b36bd9051696d7a56bfa https://github.com/dotnet/standard 2f630cd85d291fbace35b5d047c19504637322e5 - + https://github.com/dotnet/arcade - e913fb3b02d4089a91ff91c041c5f6e7c29038b0 + 3b0760f8789d5d4bd146b36bd9051696d7a56bfa - + https://github.com/dotnet/arcade - e913fb3b02d4089a91ff91c041c5f6e7c29038b0 + 3b0760f8789d5d4bd146b36bd9051696d7a56bfa - + https://github.com/dotnet/arcade - e913fb3b02d4089a91ff91c041c5f6e7c29038b0 + 3b0760f8789d5d4bd146b36bd9051696d7a56bfa - + https://github.com/dotnet/arcade - e913fb3b02d4089a91ff91c041c5f6e7c29038b0 + 3b0760f8789d5d4bd146b36bd9051696d7a56bfa - + https://github.com/dotnet/arcade - e913fb3b02d4089a91ff91c041c5f6e7c29038b0 + 3b0760f8789d5d4bd146b36bd9051696d7a56bfa - + https://github.com/dotnet/arcade - e913fb3b02d4089a91ff91c041c5f6e7c29038b0 + 3b0760f8789d5d4bd146b36bd9051696d7a56bfa - + https://github.com/dotnet/arcade - e913fb3b02d4089a91ff91c041c5f6e7c29038b0 + 3b0760f8789d5d4bd146b36bd9051696d7a56bfa - + https://github.com/dotnet/arcade - e913fb3b02d4089a91ff91c041c5f6e7c29038b0 + 3b0760f8789d5d4bd146b36bd9051696d7a56bfa - + https://github.com/dotnet/arcade - e913fb3b02d4089a91ff91c041c5f6e7c29038b0 + 3b0760f8789d5d4bd146b36bd9051696d7a56bfa - + https://github.com/dotnet/arcade - e913fb3b02d4089a91ff91c041c5f6e7c29038b0 + 3b0760f8789d5d4bd146b36bd9051696d7a56bfa - + https://github.com/dotnet/arcade - e913fb3b02d4089a91ff91c041c5f6e7c29038b0 + 3b0760f8789d5d4bd146b36bd9051696d7a56bfa - + https://github.com/dotnet/arcade - e913fb3b02d4089a91ff91c041c5f6e7c29038b0 + 3b0760f8789d5d4bd146b36bd9051696d7a56bfa - + https://github.com/dotnet/arcade - e913fb3b02d4089a91ff91c041c5f6e7c29038b0 + 3b0760f8789d5d4bd146b36bd9051696d7a56bfa https://dev.azure.com/dnceng/internal/_git/dotnet-optimization diff --git a/eng/Versions.props b/eng/Versions.props index a8dac67f127a..36aa1b48ced1 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -23,18 +23,18 @@ - 1.0.0-beta.19270.1 - 1.0.0-beta.19270.1 - 1.0.0-beta.19270.1 - 1.0.0-beta.19270.1 - 2.4.0-beta.19270.1 - 2.5.1-beta.19270.1 - 1.0.0-beta.19270.1 - 1.0.0-beta.19270.1 - 1.0.0-beta.19270.1 - 1.0.0-beta.19270.1 - 2.2.0-beta.19270.1 - 1.0.0-beta.19270.1 + 1.0.0-beta.19270.2 + 1.0.0-beta.19270.2 + 1.0.0-beta.19270.2 + 1.0.0-beta.19270.2 + 2.4.0-beta.19270.2 + 2.5.1-beta.19270.2 + 1.0.0-beta.19270.2 + 1.0.0-beta.19270.2 + 1.0.0-beta.19270.2 + 1.0.0-beta.19270.2 + 2.2.0-beta.19270.2 + 1.0.0-beta.19270.2 3.0.0-preview6-27719-10 3.0.0-preview6-27719-10 diff --git a/global.json b/global.json index 48235e020189..48381d318d46 100644 --- a/global.json +++ b/global.json @@ -3,8 +3,8 @@ "dotnet": "3.0.100-preview6-011681" }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19270.1", - "Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19270.1", + "Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19270.2", + "Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19270.2", "FIX-85B6-MERGE-9C38-CONFLICT": "1.0.0", "Microsoft.NET.Sdk.IL": "3.0.0-preview6-27719-72" } From 76f1a30d68b42727508c59c50eff114376a23312 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Tue, 21 May 2019 19:41:26 +0200 Subject: [PATCH 447/607] Update dependencies from https://github.com/dotnet/core-setup build 20190520.09 (#37834) - Microsoft.NETCore.App - 3.0.0-preview6-27720-09 - Microsoft.NETCore.DotNetHost - 3.0.0-preview6-27720-09 - Microsoft.NETCore.DotNetHostPolicy - 3.0.0-preview6-27720-09 --- eng/Version.Details.xml | 12 ++++++------ eng/Versions.props | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 95af9cf888b2..b7925ba3aa72 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -14,17 +14,17 @@ - + https://github.com/dotnet/core-setup - 278cf168efcf3adf053aa07b8773ced47887f416 + c3145b06ba5151d5eafcf177a2e380f7acb61189 - + https://github.com/dotnet/core-setup - 278cf168efcf3adf053aa07b8773ced47887f416 + c3145b06ba5151d5eafcf177a2e380f7acb61189 - + https://github.com/dotnet/core-setup - 278cf168efcf3adf053aa07b8773ced47887f416 + c3145b06ba5151d5eafcf177a2e380f7acb61189 https://github.com/dotnet/corefx diff --git a/eng/Versions.props b/eng/Versions.props index 36aa1b48ced1..21b9e9b598be 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -36,9 +36,9 @@ 2.2.0-beta.19270.2 1.0.0-beta.19270.2 - 3.0.0-preview6-27719-10 - 3.0.0-preview6-27719-10 - 3.0.0-preview6-27719-10 + 3.0.0-preview6-27720-09 + 3.0.0-preview6-27720-09 + 3.0.0-preview6-27720-09 3.0.0-preview6-27719-72 3.0.0-preview6-27719-72 From e52d8996a75d01ed12699bbfe9df13a196a37266 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Tue, 21 May 2019 19:46:47 +0200 Subject: [PATCH 448/607] Update dependencies from https://github.com/dotnet/corefx build 20190521.1 (#37835) - runtime.native.System.IO.Ports - 4.6.0-preview6.19271.1 - Microsoft.NETCore.Platforms - 3.0.0-preview6.19271.1 --- eng/Version.Details.xml | 8 ++++---- eng/Versions.props | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index b7925ba3aa72..5a3d0e97c909 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -26,13 +26,13 @@ https://github.com/dotnet/core-setup c3145b06ba5151d5eafcf177a2e380f7acb61189 - + https://github.com/dotnet/corefx - e58b35cd0f8fe6caa194ca7e48388d8d59854fe0 + 51a1f16ee2aaded4ce1fca6847471b58f7ffa160 - + https://github.com/dotnet/corefx - e58b35cd0f8fe6caa194ca7e48388d8d59854fe0 + 51a1f16ee2aaded4ce1fca6847471b58f7ffa160 https://github.com/dotnet/arcade diff --git a/eng/Versions.props b/eng/Versions.props index 21b9e9b598be..c530d2fe48a2 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -43,8 +43,8 @@ 3.0.0-preview6-27719-72 3.0.0-preview6-27719-72 - 3.0.0-preview6.19270.1 - 4.6.0-preview6.19270.1 + 3.0.0-preview6.19271.1 + 4.6.0-preview6.19271.1 2.1.0-prerelease.19270.1 From 611db6d62650aab8c38b66f3adc6b0a459c38ce9 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Tue, 21 May 2019 19:48:22 +0200 Subject: [PATCH 449/607] Update dependencies from https://github.com/dotnet/coreclr build 20190520.72 (#37836) - Microsoft.NET.Sdk.IL - 3.0.0-preview6-27720-72 - Microsoft.NETCore.ILAsm - 3.0.0-preview6-27720-72 - Microsoft.NETCore.Runtime.CoreCLR - 3.0.0-preview6-27720-72 --- eng/Version.Details.xml | 12 ++++++------ eng/Versions.props | 4 ++-- global.json | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 5a3d0e97c909..ea04020bf19c 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -1,16 +1,16 @@ - + https://github.com/dotnet/coreclr - c5a44f58952c5014f5e1c25b667dca3901fd84a7 + c8e9c122aa5ea827e734fdffd889afa6318619da - + https://github.com/dotnet/coreclr - c5a44f58952c5014f5e1c25b667dca3901fd84a7 + c8e9c122aa5ea827e734fdffd889afa6318619da - + https://github.com/dotnet/coreclr - c5a44f58952c5014f5e1c25b667dca3901fd84a7 + c8e9c122aa5ea827e734fdffd889afa6318619da diff --git a/eng/Versions.props b/eng/Versions.props index c530d2fe48a2..2eadf23abbfd 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -40,8 +40,8 @@ 3.0.0-preview6-27720-09 3.0.0-preview6-27720-09 - 3.0.0-preview6-27719-72 - 3.0.0-preview6-27719-72 + 3.0.0-preview6-27720-72 + 3.0.0-preview6-27720-72 3.0.0-preview6.19271.1 4.6.0-preview6.19271.1 diff --git a/global.json b/global.json index 48381d318d46..47e68d764d0b 100644 --- a/global.json +++ b/global.json @@ -6,6 +6,6 @@ "Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19270.2", "Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19270.2", "FIX-85B6-MERGE-9C38-CONFLICT": "1.0.0", - "Microsoft.NET.Sdk.IL": "3.0.0-preview6-27719-72" + "Microsoft.NET.Sdk.IL": "3.0.0-preview6-27720-72" } } From 76d1a05e9625f09dfa6ee89fcf3189460dcb5020 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Tue, 21 May 2019 19:51:34 +0200 Subject: [PATCH 450/607] Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-optimization build 20190521.1 (#37837) - optimization.windows_nt-x64.IBC.CoreFx - 99.99.99-master-20190521.1 --- eng/Version.Details.xml | 4 ++-- eng/Versions.props | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index ea04020bf19c..5839fe64262b 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -94,9 +94,9 @@ https://github.com/dotnet/arcade 3b0760f8789d5d4bd146b36bd9051696d7a56bfa - + https://dev.azure.com/dnceng/internal/_git/dotnet-optimization - d2be6e027cb7d128e710a8f2efa97fff82ecff20 + 6576979664f443fa03773da591e0ed1fc78ed12c diff --git a/eng/Versions.props b/eng/Versions.props index 2eadf23abbfd..ac9a34572b24 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -48,7 +48,7 @@ 2.1.0-prerelease.19270.1 - 99.99.99-master-20190510.1 + 99.99.99-master-20190521.1 4.4.0 4.4.0 From 857d1d1a9e1cd3597e3b1488f119d3a52e8b921a Mon Sep 17 00:00:00 2001 From: Steve Harter Date: Tue, 21 May 2019 11:50:53 -0700 Subject: [PATCH 451/607] Avoid StackOverflowException when cyclic enumerable Type (#37818) --- .../Json/Serialization/JsonPropertyInfo.cs | 85 +++++++++++++------ .../Serialization/JsonPropertyInfoCommon.cs | 6 +- .../JsonPropertyInfoNotNullable.cs | 14 +-- .../Serialization/JsonPropertyInfoNullable.cs | 10 +-- .../JsonSerializer.Read.HandleDictionary.cs | 2 +- .../JsonSerializer.Read.HandlePropertyName.cs | 14 ++- .../JsonSerializer.Read.HandleValue.cs | 2 +- .../JsonSerializer.Write.HandleDictionary.cs | 2 +- .../JsonSerializer.Write.HandleEnumerable.cs | 2 +- .../JsonSerializer.Write.HandleObject.cs | 4 +- .../Serialization/JsonSerializer.Write.cs | 2 +- .../Text/Json/Serialization/ReadStackFrame.cs | 2 +- .../tests/Serialization/CyclicTests.cs | 61 +++++++++++-- .../tests/Serialization/TestClasses.cs | 15 ---- 14 files changed, 142 insertions(+), 79 deletions(-) diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfo.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfo.cs index 6160df0ffb5f..07936ee7d9e9 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfo.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfo.cs @@ -20,6 +20,11 @@ internal abstract class JsonPropertyInfo private static readonly JsonEnumerableConverter s_jsonIEnumerableConstuctibleConverter = new DefaultIEnumerableConstructibleConverter(); private static readonly JsonEnumerableConverter s_jsonImmutableConverter = new DefaultImmutableConverter(); + private JsonClassInfo _runtimeClassInfo; + + private Type _elementType; + private JsonClassInfo _elementClassInfo; + public static readonly JsonPropertyInfo s_missingProperty = new JsonPropertyInfoNotNullable(); public ClassType ClassType; @@ -43,8 +48,38 @@ internal abstract class JsonPropertyInfo public bool IsPropertyPolicy {get; protected set;} public bool IgnoreNullValues { get; private set; } - // todo: to minimize hashtable lookups, cache JsonClassInfo: - //public JsonClassInfo ClassInfo; + // Options can be referenced here since all JsonPropertyInfos originate from a JsonClassInfo that is cached on JsonSerializerOptions. + protected JsonSerializerOptions Options { get; set; } + + public JsonClassInfo RuntimeClassInfo + { + get + { + if (_runtimeClassInfo == null) + { + _runtimeClassInfo = Options.GetOrAddClass(RuntimePropertyType); + } + + return _runtimeClassInfo; + } + } + + /// + /// Return the JsonClassInfo for the element type, or null if the the property is not an enumerable or dictionary. + /// + public JsonClassInfo ElementClassInfo + { + get + { + if (_elementClassInfo == null && _elementType != null) + { + Debug.Assert(ClassType == ClassType.Enumerable || ClassType == ClassType.Dictionary); + _elementClassInfo = Options.GetOrAddClass(_elementType); + } + + return _elementClassInfo; + } + } public virtual void Initialize( Type parentClassType, @@ -59,18 +94,13 @@ public virtual void Initialize( RuntimePropertyType = runtimePropertyType; PropertyInfo = propertyInfo; ClassType = JsonClassInfo.GetClassType(runtimePropertyType); - if (elementType != null) - { - Debug.Assert(ClassType == ClassType.Enumerable || ClassType == ClassType.Dictionary); - ElementClassInfo = options.GetOrAddClass(elementType); - } - + _elementType = elementType; + Options = options; IsNullableType = runtimePropertyType.IsGenericType && runtimePropertyType.GetGenericTypeDefinition() == typeof(Nullable<>); CanBeNull = IsNullableType || !runtimePropertyType.IsValueType; } public bool CanBeNull { get; private set; } - public JsonClassInfo ElementClassInfo { get; private set; } public JsonEnumerableConverter EnumerableConverter { get; private set; } public bool IsNullableType { get; private set; } @@ -83,14 +113,14 @@ public virtual void Initialize( public Type RuntimePropertyType { get; private set; } - public virtual void GetPolicies(JsonSerializerOptions options) + public virtual void GetPolicies() { - DetermineSerializationCapabilities(options); - DeterminePropertyName(options); - IgnoreNullValues = options.IgnoreNullValues; + DetermineSerializationCapabilities(); + DeterminePropertyName(); + IgnoreNullValues = Options.IgnoreNullValues; } - private void DeterminePropertyName(JsonSerializerOptions options) + private void DeterminePropertyName() { if (PropertyInfo == null) { @@ -108,9 +138,9 @@ private void DeterminePropertyName(JsonSerializerOptions options) NameAsString = name; } - else if (options.PropertyNamingPolicy != null) + else if (Options.PropertyNamingPolicy != null) { - string name = options.PropertyNamingPolicy.ConvertName(PropertyInfo.Name); + string name = Options.PropertyNamingPolicy.ConvertName(PropertyInfo.Name); if (name == null) { ThrowHelper.ThrowInvalidOperationException_SerializerPropertyNameNull(ParentClassType, this); @@ -129,7 +159,7 @@ private void DeterminePropertyName(JsonSerializerOptions options) Name = Encoding.UTF8.GetBytes(NameAsString); // Set the compare name. - if (options.PropertyNameCaseInsensitive) + if (Options.PropertyNameCaseInsensitive) { NameUsedToCompareAsString = NameAsString.ToUpperInvariant(); NameUsedToCompare = Encoding.UTF8.GetBytes(NameUsedToCompareAsString); @@ -173,12 +203,12 @@ private void DeterminePropertyName(JsonSerializerOptions options) #endif } - private void DetermineSerializationCapabilities(JsonSerializerOptions options) + private void DetermineSerializationCapabilities() { if (ClassType != ClassType.Enumerable && ClassType != ClassType.Dictionary) { // We serialize if there is a getter + not ignoring readonly properties. - ShouldSerialize = HasGetter && (HasSetter || !options.IgnoreReadOnlyProperties); + ShouldSerialize = HasGetter && (HasSetter || !Options.IgnoreReadOnlyProperties); // We deserialize if there is a setter. ShouldDeserialize = HasSetter; @@ -233,13 +263,13 @@ private void DetermineSerializationCapabilities(JsonSerializerOptions options) RuntimePropertyType.GetGenericArguments().Length == 1) { EnumerableConverter = s_jsonImmutableConverter; - ((DefaultImmutableConverter)EnumerableConverter).RegisterImmutableCollectionType(RuntimePropertyType, elementType, options); + ((DefaultImmutableConverter)EnumerableConverter).RegisterImmutableCollectionType(RuntimePropertyType, elementType, Options); } } } else { - ShouldSerialize = HasGetter && !options.IgnoreReadOnlyProperties; + ShouldSerialize = HasGetter && !Options.IgnoreReadOnlyProperties; } } } @@ -264,8 +294,9 @@ public void CopyRuntimeSettingsTo(JsonPropertyInfo other) public static JsonPropertyInfo CreateIgnoredPropertyPlaceholder(PropertyInfo propertyInfo, JsonSerializerOptions options) { JsonPropertyInfo jsonPropertyInfo = new JsonPropertyInfoNotNullable(); + jsonPropertyInfo.Options = options; jsonPropertyInfo.PropertyInfo = propertyInfo; - jsonPropertyInfo.DeterminePropertyName(options); + jsonPropertyInfo.DeterminePropertyName(); Debug.Assert(!jsonPropertyInfo.ShouldDeserialize); Debug.Assert(!jsonPropertyInfo.ShouldSerialize); @@ -288,13 +319,13 @@ public static TAttribute GetAttribute(PropertyInfo propertyInfo) whe public abstract Type GetDictionaryConcreteType(); - public abstract void Read(JsonTokenType tokenType, JsonSerializerOptions options, ref ReadStack state, ref Utf8JsonReader reader); - public abstract void ReadEnumerable(JsonTokenType tokenType, JsonSerializerOptions options, ref ReadStack state, ref Utf8JsonReader reader); + public abstract void Read(JsonTokenType tokenType, ref ReadStack state, ref Utf8JsonReader reader); + public abstract void ReadEnumerable(JsonTokenType tokenType, ref ReadStack state, ref Utf8JsonReader reader); public abstract void SetValueAsObject(object obj, object value); - public abstract void Write(JsonSerializerOptions options, ref WriteStackFrame current, Utf8JsonWriter writer); + public abstract void Write(ref WriteStackFrame current, Utf8JsonWriter writer); - public virtual void WriteDictionary(JsonSerializerOptions options, ref WriteStackFrame current, Utf8JsonWriter writer) { } - public abstract void WriteEnumerable(JsonSerializerOptions options, ref WriteStackFrame current, Utf8JsonWriter writer); + public virtual void WriteDictionary(ref WriteStackFrame current, Utf8JsonWriter writer) { } + public abstract void WriteEnumerable(ref WriteStackFrame current, Utf8JsonWriter writer); } } diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfoCommon.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfoCommon.cs index 7a9aa064ca07..22be588e0fa0 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfoCommon.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfoCommon.cs @@ -53,13 +53,13 @@ public override void Initialize( ValueConverter = DefaultConverters.s_converter; } - GetPolicies(options); + GetPolicies(); } - public override void GetPolicies(JsonSerializerOptions options) + public override void GetPolicies() { ValueConverter = DefaultConverters.s_converter; - base.GetPolicies(options); + base.GetPolicies(); } public override object GetValueAsObject(object obj) diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfoNotNullable.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfoNotNullable.cs index 680f9c388bc7..6fdeb2d5f28d 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfoNotNullable.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfoNotNullable.cs @@ -14,7 +14,7 @@ internal sealed class JsonPropertyInfoNotNullable where TRuntimeProperty : TDeclaredProperty { - public override void Read(JsonTokenType tokenType, JsonSerializerOptions options, ref ReadStack state, ref Utf8JsonReader reader) + public override void Read(JsonTokenType tokenType, ref ReadStack state, ref Utf8JsonReader reader) { Debug.Assert(ShouldDeserialize); @@ -22,7 +22,7 @@ public override void Read(JsonTokenType tokenType, JsonSerializerOptions options { // Forward the setter to the value-based JsonPropertyInfo. JsonPropertyInfo propertyInfo = ElementClassInfo.GetPolicyProperty(); - propertyInfo.ReadEnumerable(tokenType, options, ref state, ref reader); + propertyInfo.ReadEnumerable(tokenType, ref state, ref reader); } else { @@ -48,7 +48,7 @@ public override void Read(JsonTokenType tokenType, JsonSerializerOptions options } // If this method is changed, also change JsonPropertyInfoNullable.ReadEnumerable and JsonSerializer.ApplyObjectToEnumerable - public override void ReadEnumerable(JsonTokenType tokenType, JsonSerializerOptions options, ref ReadStack state, ref Utf8JsonReader reader) + public override void ReadEnumerable(JsonTokenType tokenType, ref ReadStack state, ref Utf8JsonReader reader) { Debug.Assert(ShouldDeserialize); @@ -61,7 +61,7 @@ public override void ReadEnumerable(JsonTokenType tokenType, JsonSerializerOptio JsonSerializer.ApplyValueToEnumerable(ref value, ref state, ref reader); } - public override void Write(JsonSerializerOptions options, ref WriteStackFrame current, Utf8JsonWriter writer) + public override void Write(ref WriteStackFrame current, Utf8JsonWriter writer) { Debug.Assert(current.Enumerator == null); Debug.Assert(ShouldSerialize); @@ -98,13 +98,13 @@ public override void Write(JsonSerializerOptions options, ref WriteStackFrame cu } } - public override void WriteDictionary(JsonSerializerOptions options, ref WriteStackFrame current, Utf8JsonWriter writer) + public override void WriteDictionary(ref WriteStackFrame current, Utf8JsonWriter writer) { Debug.Assert(ShouldSerialize); - JsonSerializer.WriteDictionary(ValueConverter, options, ref current, writer); + JsonSerializer.WriteDictionary(ValueConverter, Options, ref current, writer); } - public override void WriteEnumerable(JsonSerializerOptions options, ref WriteStackFrame current, Utf8JsonWriter writer) + public override void WriteEnumerable(ref WriteStackFrame current, Utf8JsonWriter writer) { Debug.Assert(ShouldSerialize); diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfoNullable.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfoNullable.cs index 9034f184b939..b52a828f6a3b 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfoNullable.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfoNullable.cs @@ -17,7 +17,7 @@ internal sealed class JsonPropertyInfoNullable // should this be cached somewhere else so that it's not populated per TClass as well as TProperty? private static readonly Type s_underlyingType = typeof(TProperty); - public override void Read(JsonTokenType tokenType, JsonSerializerOptions options, ref ReadStack state, ref Utf8JsonReader reader) + public override void Read(JsonTokenType tokenType, ref ReadStack state, ref Utf8JsonReader reader) { Debug.Assert(ElementClassInfo == null); Debug.Assert(ShouldDeserialize); @@ -39,7 +39,7 @@ public override void Read(JsonTokenType tokenType, JsonSerializerOptions options ThrowHelper.ThrowJsonException_DeserializeUnableToConvertValue(RuntimePropertyType, reader, state.PropertyPath); } - public override void ReadEnumerable(JsonTokenType tokenType, JsonSerializerOptions options, ref ReadStack state, ref Utf8JsonReader reader) + public override void ReadEnumerable(JsonTokenType tokenType, ref ReadStack state, ref Utf8JsonReader reader) { Debug.Assert(ShouldDeserialize); @@ -53,7 +53,7 @@ public override void ReadEnumerable(JsonTokenType tokenType, JsonSerializerOptio JsonSerializer.ApplyValueToEnumerable(ref nullableValue, ref state, ref reader); } - public override void Write(JsonSerializerOptions options, ref WriteStackFrame current, Utf8JsonWriter writer) + public override void Write(ref WriteStackFrame current, Utf8JsonWriter writer) { Debug.Assert(ShouldSerialize); @@ -61,7 +61,7 @@ public override void Write(JsonSerializerOptions options, ref WriteStackFrame cu { // Forward the setter to the value-based JsonPropertyInfo. JsonPropertyInfo propertyInfo = ElementClassInfo.GetPolicyProperty(); - propertyInfo.WriteEnumerable(options, ref current, writer); + propertyInfo.WriteEnumerable(ref current, writer); } else { @@ -98,7 +98,7 @@ public override void Write(JsonSerializerOptions options, ref WriteStackFrame cu } } - public override void WriteEnumerable(JsonSerializerOptions options, ref WriteStackFrame current, Utf8JsonWriter writer) + public override void WriteEnumerable(ref WriteStackFrame current, Utf8JsonWriter writer) { Debug.Assert(ShouldSerialize); diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleDictionary.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleDictionary.cs index 97540f55d25b..27f939b5f6e9 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleDictionary.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleDictionary.cs @@ -50,7 +50,7 @@ private static void HandleStartDictionary(JsonSerializerOptions options, ref Utf if (jsonPropertyInfo.GetValueAsObject(state.Current.ReturnValue) == null) { // Create the dictionary. - JsonClassInfo dictionaryClassInfo = options.GetOrAddClass(jsonPropertyInfo.RuntimePropertyType); + JsonClassInfo dictionaryClassInfo = jsonPropertyInfo.RuntimeClassInfo; IDictionary value = (IDictionary)dictionaryClassInfo.CreateObject(); if (value != null) { diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandlePropertyName.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandlePropertyName.cs index e7b0ff2916a7..3c0bde8e7d81 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandlePropertyName.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandlePropertyName.cs @@ -101,17 +101,15 @@ private static void ProcessMissingProperty( IDictionary extensionData = (IDictionary)jsonPropertyInfo.GetValueAsObject(state.Current.ReturnValue); if (extensionData == null) { - Type type = jsonPropertyInfo.DeclaredPropertyType; - // Create the appropriate dictionary type. We already verified the types. - Debug.Assert(type.IsGenericType); - Debug.Assert(type.GetGenericArguments().Length == 2); - Debug.Assert(type.GetGenericArguments()[0].UnderlyingSystemType == typeof(string)); + Debug.Assert(jsonPropertyInfo.DeclaredPropertyType.IsGenericType); + Debug.Assert(jsonPropertyInfo.DeclaredPropertyType.GetGenericArguments().Length == 2); + Debug.Assert(jsonPropertyInfo.DeclaredPropertyType.GetGenericArguments()[0].UnderlyingSystemType == typeof(string)); Debug.Assert( - type.GetGenericArguments()[1].UnderlyingSystemType == typeof(object) || - type.GetGenericArguments()[1].UnderlyingSystemType == typeof(JsonElement)); + jsonPropertyInfo.DeclaredPropertyType.GetGenericArguments()[1].UnderlyingSystemType == typeof(object) || + jsonPropertyInfo.DeclaredPropertyType.GetGenericArguments()[1].UnderlyingSystemType == typeof(JsonElement)); - extensionData = (IDictionary)options.GetOrAddClass(type).CreateObject(); + extensionData = (IDictionary)jsonPropertyInfo.RuntimeClassInfo.CreateObject(); jsonPropertyInfo.SetValueAsObject(state.Current.ReturnValue, extensionData); } diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleValue.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleValue.cs index a11312908c05..82e01aa13ed8 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleValue.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleValue.cs @@ -25,7 +25,7 @@ private static bool HandleValue(JsonTokenType tokenType, JsonSerializerOptions o bool lastCall = (!state.Current.IsProcessingEnumerableOrDictionary && state.Current.ReturnValue == null); - jsonPropertyInfo.Read(tokenType, options, ref state, ref reader); + jsonPropertyInfo.Read(tokenType, ref state, ref reader); return lastCall; } } diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.HandleDictionary.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.HandleDictionary.cs index b689a53d3d39..ccbccd531924 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.HandleDictionary.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.HandleDictionary.cs @@ -52,7 +52,7 @@ private static bool HandleDictionary( if (elementClassInfo.ClassType == ClassType.Value) { - elementClassInfo.GetPolicyProperty().WriteDictionary(options, ref state.Current, writer); + elementClassInfo.GetPolicyProperty().WriteDictionary(ref state.Current, writer); } else if (state.Current.Enumerator.Current == null) { diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.HandleEnumerable.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.HandleEnumerable.cs index 4be8b9fa3464..07c1290e8882 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.HandleEnumerable.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.HandleEnumerable.cs @@ -48,7 +48,7 @@ private static bool HandleEnumerable( if (elementClassInfo.ClassType == ClassType.Value) { - elementClassInfo.GetPolicyProperty().WriteEnumerable(options, ref state.Current, writer); + elementClassInfo.GetPolicyProperty().WriteEnumerable(ref state.Current, writer); } else if (state.Current.Enumerator.Current == null) { diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.HandleObject.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.HandleObject.cs index f60932eac96d..80275ee6fd67 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.HandleObject.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.HandleObject.cs @@ -74,7 +74,7 @@ private static bool HandleObject( if (jsonPropertyInfo.ClassType == ClassType.Value) { - jsonPropertyInfo.Write(options, ref state.Current, writer); + jsonPropertyInfo.Write(ref state.Current, writer); state.Current.NextProperty(); return true; } @@ -116,7 +116,7 @@ private static bool HandleObject( state.Current.NextProperty(); - JsonClassInfo nextClassInfo = options.GetOrAddClass(jsonPropertyInfo.RuntimePropertyType); + JsonClassInfo nextClassInfo = jsonPropertyInfo.RuntimeClassInfo; state.Push(nextClassInfo, currentValue); // Set the PropertyInfo so we can obtain the property name in order to write it. diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.cs index ccbac22d2dda..c9a9e4a762bb 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.cs @@ -31,7 +31,7 @@ private static bool Write( break; case ClassType.Value: Debug.Assert(current.JsonPropertyInfo.ClassType == ClassType.Value); - current.JsonPropertyInfo.Write(options, ref current, writer); + current.JsonPropertyInfo.Write(ref current, writer); finishedSerializing = true; break; case ClassType.Object: diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/ReadStackFrame.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/ReadStackFrame.cs index 7f3e4d3861d7..6170ba1d869f 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/ReadStackFrame.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/ReadStackFrame.cs @@ -136,7 +136,7 @@ public static object CreateEnumerableValue(ref Utf8JsonReader reader, ref ReadSt if (typeof(IList).IsAssignableFrom(propType)) { // If IList, add the members as we create them. - JsonClassInfo collectionClassInfo = options.GetOrAddClass(propType); + JsonClassInfo collectionClassInfo = state.Current.JsonPropertyInfo.RuntimeClassInfo; IList collection = (IList)collectionClassInfo.CreateObject(); return collection; } diff --git a/src/System.Text.Json/tests/Serialization/CyclicTests.cs b/src/System.Text.Json/tests/Serialization/CyclicTests.cs index 19f38562db3b..e2f530e26c95 100644 --- a/src/System.Text.Json/tests/Serialization/CyclicTests.cs +++ b/src/System.Text.Json/tests/Serialization/CyclicTests.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System.Collections.Generic; using Xunit; namespace System.Text.Json.Serialization.Tests @@ -12,21 +13,69 @@ public static class CyclicTests public static void WriteCyclicFail() { TestClassWithCycle obj = new TestClassWithCycle(); - obj.Initialize(); + obj.Parent = obj; - // We don't allow cycles; we throw InvalidOperation instead of an unrecoverable StackOverflow. + // We don't allow graph cycles; we throw InvalidOperation instead of an unrecoverable StackOverflow. Assert.Throws(() => JsonSerializer.ToString(obj)); } [Fact] - [ActiveIssue(37313)] - public static void WriteTestClassWithArrayOfElementsOfTheSameClassWithoutCyclesDoesNotFail() + public static void SimpleTypeCycle() { TestClassWithArrayOfElementsOfTheSameClass obj = new TestClassWithArrayOfElementsOfTheSameClass(); - //It shouldn't throw when there is no real cycle reference, and just empty object is created + // A cycle in just Types (not data) is allowed. string json = JsonSerializer.ToString(obj); - Assert.Equal(@"{}", json); + Assert.Equal(@"{""Array"":null}", json); + } + + [Fact] + public static void DeepTypeCycleWithRoundTrip() + { + TestClassWithCycle root = new TestClassWithCycle("root"); + TestClassWithCycle parent = new TestClassWithCycle("parent"); + root.Parent = parent; + root.Children.Add(new TestClassWithCycle("child1")); + root.Children.Add(new TestClassWithCycle("child2")); + + // A cycle in just Types (not data) is allowed. + string json = JsonSerializer.ToString(root); + + // Round-trip the JSON. + TestClassWithCycle rootCopy = JsonSerializer.Parse(json); + Assert.Equal("root", rootCopy.Name); + Assert.Equal(2, rootCopy.Children.Count); + + Assert.Equal("parent", rootCopy.Parent.Name); + Assert.Equal(0, rootCopy.Parent.Children.Count); + Assert.Null(rootCopy.Parent.Parent); + + Assert.Equal("child1", rootCopy.Children[0].Name); + Assert.Equal(0, rootCopy.Children[0].Children.Count); + Assert.Null(rootCopy.Children[0].Parent); + + Assert.Equal("child2", rootCopy.Children[1].Name); + Assert.Equal(0, rootCopy.Children[1].Children.Count); + Assert.Null(rootCopy.Children[1].Parent); + } + + public class TestClassWithCycle + { + public TestClassWithCycle() { } + + public TestClassWithCycle(string name) + { + Name = name; + } + + public TestClassWithCycle Parent { get; set; } + public List Children { get; set; } = new List(); + public string Name { get; set; } + } + + public class TestClassWithArrayOfElementsOfTheSameClass + { + public TestClassWithArrayOfElementsOfTheSameClass[] Array { get; set; } } } } diff --git a/src/System.Text.Json/tests/Serialization/TestClasses.cs b/src/System.Text.Json/tests/Serialization/TestClasses.cs index e64531659cd3..7f88ab2f26be 100644 --- a/src/System.Text.Json/tests/Serialization/TestClasses.cs +++ b/src/System.Text.Json/tests/Serialization/TestClasses.cs @@ -387,21 +387,6 @@ public void Verify() } } - public class TestClassWithCycle - { - public TestClassWithCycle Parent { get; set; } - - public void Initialize() - { - Parent = this; - } - } - - public class TestClassWithArrayOfElementsOfTheSameClass - { - public TestClassWithArrayOfElementsOfTheSameClass[] Array { get; set; } - } - public class TestClassWithGenericList : ITestClass { public List MyData { get; set; } From 008d21c47c22b5757e09f6c3d346998004a0f985 Mon Sep 17 00:00:00 2001 From: Viktor Hofer Date: Tue, 21 May 2019 12:16:50 -0700 Subject: [PATCH 452/607] Exclude non netcoreapp packages from OOB package (#37845) --- .../Microsoft.Private.CoreFx.OOB.pkgproj | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/Microsoft.Private.CoreFx.OOB/Microsoft.Private.CoreFx.OOB.pkgproj b/pkg/Microsoft.Private.CoreFx.OOB/Microsoft.Private.CoreFx.OOB.pkgproj index 0c3933b81755..def37549519f 100644 --- a/pkg/Microsoft.Private.CoreFx.OOB/Microsoft.Private.CoreFx.OOB.pkgproj +++ b/pkg/Microsoft.Private.CoreFx.OOB/Microsoft.Private.CoreFx.OOB.pkgproj @@ -20,7 +20,11 @@ + + + From 39c7df85afee9ddc8bc1a1726a92526d43b1959f Mon Sep 17 00:00:00 2001 From: Tarek Mahmoud Sayed Date: Tue, 21 May 2019 14:39:09 -0700 Subject: [PATCH 453/607] Add Utc test to ensure creating only one instance (#37721) * Add Utc test to ensure creating only one instance * Address the feedback --- src/System.Runtime/tests/System/TimeZoneInfoTests.cs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/System.Runtime/tests/System/TimeZoneInfoTests.cs b/src/System.Runtime/tests/System/TimeZoneInfoTests.cs index 9457cf1f6f2b..8dc6f65181a8 100644 --- a/src/System.Runtime/tests/System/TimeZoneInfoTests.cs +++ b/src/System.Runtime/tests/System/TimeZoneInfoTests.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System; +using System.Linq; using System.Text.RegularExpressions; using System.Collections.Generic; using System.Collections.ObjectModel; @@ -136,7 +137,7 @@ public static void RussianTimeZone() [Fact] [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "The full .NET Framework has a bug. See https://github.com/dotnet/corefx/issues/26479")] - public static void CaseInsensiveLookup() + public static void CaseInsensitiveLookup() { Assert.Equal(TimeZoneInfo.FindSystemTimeZoneById(s_strBrasilia), TimeZoneInfo.FindSystemTimeZoneById(s_strBrasilia.ToLowerInvariant())); Assert.Equal(TimeZoneInfo.FindSystemTimeZoneById(s_strJohannesburg), TimeZoneInfo.FindSystemTimeZoneById(s_strJohannesburg.ToUpperInvariant())); @@ -2243,6 +2244,15 @@ public static void TimeZoneInfo_DisplayNameStartsWithOffset() } } + [Fact] + [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] + public static void EnsureUtcObjectSingleton() + { + TimeZoneInfo utcObject = TimeZoneInfo.GetSystemTimeZones().Single(x => x.Id.Equals("UTC", StringComparison.OrdinalIgnoreCase)); + Assert.True(ReferenceEquals(utcObject, TimeZoneInfo.Utc)); + Assert.True(ReferenceEquals(TimeZoneInfo.FindSystemTimeZoneById("UTC"), TimeZoneInfo.Utc)); + } + private static void VerifyConvertException(DateTimeOffset inputTime, string destinationTimeZoneId) where TException : Exception { Assert.ThrowsAny(() => TimeZoneInfo.ConvertTime(inputTime, TimeZoneInfo.FindSystemTimeZoneById(destinationTimeZoneId))); From 4c5a775daddc95fa484e36637bcb9a67edbbd575 Mon Sep 17 00:00:00 2001 From: Bruce Forstall Date: Tue, 21 May 2019 15:18:02 -0700 Subject: [PATCH 454/607] Publish corefx tests for more platforms Add publishing for Linux/arm64, Linux/arm32, musl/x64, musl/arm64. --- eng/pipelines/linux.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/eng/pipelines/linux.yml b/eng/pipelines/linux.yml index 7197b6419267..1444af9c1db1 100644 --- a/eng/pipelines/linux.yml +++ b/eng/pipelines/linux.yml @@ -41,6 +41,7 @@ jobs: _dockerContainer: ubuntu_1604_arm64_cross_container _buildScriptPrefix: 'ROOTFS_DIR=/crossrootfs/arm64 ' _buildExtraArguments: -warnAsError false + _publishTests: true musl_x64_Release: _BuildConfig: Release @@ -50,6 +51,7 @@ jobs: _dockerContainer: alpine_36_container _buildScriptPrefix: '' _buildExtraArguments: /p:RuntimeOS=linux-musl + _publishTests: true ${{ if or(eq(parameters.testScope, 'outerloop'), eq(parameters.testScope, 'all')) }}: x64_Debug: @@ -88,6 +90,7 @@ jobs: _dockerContainer: ubuntu_1604_arm_cross_container _buildScriptPrefix: 'ROOTFS_DIR=/crossrootfs/arm ' _buildExtraArguments: -warnAsError false + _publishTests: true musl_arm64_Release: _BuildConfig: Release @@ -97,6 +100,7 @@ jobs: _dockerContainer: alpine_37_arm64_container _buildScriptPrefix: 'ROOTFS_DIR=/crossrootfs/arm64 ' _buildExtraArguments: -warnAsError false /p:BuildNativeCompiler=--clang5.0 /p:RuntimeOS=linux-musl + _publishTests: true pool: name: Hosted Ubuntu 1604 From 99267e7b99cdad8031da216f82b46962c23c383b Mon Sep 17 00:00:00 2001 From: Stephen Toub Date: Tue, 21 May 2019 18:00:53 -0400 Subject: [PATCH 455/607] Reduce overhead of SemaphoreSlim.WaitAsync (dotnet/coreclr#24687) This affects the case where SemaphoreSlim.WaitAsync is invoked, the operation completes asynchronously because there's no count available in the semaphore, and where a timeout and/or a cancellation token is passed to WaitAsync. In that case, we need to wait for the underlying wait task to complete, for cancellation to be requested, or for the timeout to elapse. There's currently one code path that handles this. This change improves that slightly by avoiding a defensive array copy. However, we can do much better when we get a cancelable token but no timeout, in which case we can avoid operations like Task.Delay, can register with the original cancellation token rather than a new one (which means we avoid forcing a new CancellationTokenSource's lazily-allocated partitions into existence), etc. Signed-off-by: dotnet-bot --- .../CoreLib/System/Threading/SemaphoreSlim.cs | 34 +++++++++++++------ 1 file changed, 23 insertions(+), 11 deletions(-) diff --git a/src/Common/src/CoreLib/System/Threading/SemaphoreSlim.cs b/src/Common/src/CoreLib/System/Threading/SemaphoreSlim.cs index 64379666712e..0214456ca0ef 100644 --- a/src/Common/src/CoreLib/System/Threading/SemaphoreSlim.cs +++ b/src/Common/src/CoreLib/System/Threading/SemaphoreSlim.cs @@ -712,19 +712,31 @@ private async Task WaitUntilCountOrTimeoutAsync(TaskNode asyncWaiter, int Debug.Assert(asyncWaiter != null, "Waiter should have been constructed"); Debug.Assert(Monitor.IsEntered(m_lockObj!), "Requires the lock be held"); - // Wait until either the task is completed, timeout occurs, or cancellation is requested. - // We need to ensure that the Task.Delay task is appropriately cleaned up if the await - // completes due to the asyncWaiter completing, so we use our own token that we can explicitly - // cancel, and we chain the caller's supplied token into it. - using (var cts = cancellationToken.CanBeCanceled ? - CancellationTokenSource.CreateLinkedTokenSource(cancellationToken, default) : - new CancellationTokenSource()) + if (millisecondsTimeout != Timeout.Infinite) { - var waitCompleted = Task.WhenAny(asyncWaiter, Task.Delay(millisecondsTimeout, cts.Token)); - if (asyncWaiter == await waitCompleted.ConfigureAwait(false)) + // Wait until either the task is completed, cancellation is requested, or the timeout occurs. + // We need to ensure that the Task.Delay task is appropriately cleaned up if the await + // completes due to the asyncWaiter completing, so we use our own token that we can explicitly + // cancel, and we chain the caller's supplied token into it. + using (var cts = CancellationTokenSource.CreateLinkedTokenSource(cancellationToken, default)) { - cts.Cancel(); // ensure that the Task.Delay task is cleaned up - return true; // successfully acquired + if (asyncWaiter == await TaskFactory.CommonCWAnyLogic(new Task[] { asyncWaiter, Task.Delay(millisecondsTimeout, cts.Token) }).ConfigureAwait(false)) + { + cts.Cancel(); // ensure that the Task.Delay task is cleaned up + return true; // successfully acquired + } + } + } + else // millisecondsTimeout == Timeout.Infinite + { + // Wait until either the task is completed or cancellation is requested. + var cancellationTask = new Task(); + using (cancellationToken.UnsafeRegister(s => ((Task)s!).TrySetResult(), cancellationTask)) + { + if (asyncWaiter == await TaskFactory.CommonCWAnyLogic(new Task[] { asyncWaiter, cancellationTask }).ConfigureAwait(false)) + { + return true; // successfully acquired + } } } From 8d0428194d69a8d7fb249a9f4ef780cb4cd54de4 Mon Sep 17 00:00:00 2001 From: Jose Perez Rodriguez Date: Tue, 21 May 2019 16:58:45 -0700 Subject: [PATCH 456/607] Update packageIndex.json with packages from release branches (#37600) * Update packageIndex.json with packages from release branches * Fixing last packaging validation errors --- .../harvestPackages/harvestPackages.props | 28 +- .../packageIndex.json | 241 +++++++++++------- .../workaroundMissingSystemMemory.targets | 10 - .../System.ComponentModel.Composition.csproj | 1 - .../CatalogReflectionContextAttribute.cs | 8 - ...ystem.Diagnostics.DiagnosticSource.pkgproj | 17 -- .../pkg/System.IO.Pipelines.pkgproj | 2 +- .../Directory.Build.props | 1 + .../pkg/System.Reflection.Context.pkgproj | 8 + .../ref/System.Reflection.Context.csproj | 2 - 10 files changed, 171 insertions(+), 147 deletions(-) delete mode 100644 pkg/test/packageSettings/System.Diagnostics.DiagnosticSource/workaroundMissingSystemMemory.targets diff --git a/external/harvestPackages/harvestPackages.props b/external/harvestPackages/harvestPackages.props index 5c0caeb5478b..4458f9dd6c83 100644 --- a/external/harvestPackages/harvestPackages.props +++ b/external/harvestPackages/harvestPackages.props @@ -1,4 +1,4 @@ - + @@ -62,10 +62,10 @@ 4.5.0 - 4.5.1 + 4.6.1 - 4.5.0 + 4.5.1 4.5.0 @@ -80,7 +80,7 @@ 4.5.0 - 4.5.0 + 4.5.1 4.5.0 @@ -89,7 +89,7 @@ 4.5.0 - 4.5.0 + 4.5.3 4.5.0 @@ -101,10 +101,10 @@ 4.5.0 - 4.5.0 + 4.5.3 - 4.5.1 + 4.5.3 0.1.0 @@ -122,13 +122,13 @@ 1.6.0 - 4.5.0 + 4.5.1 4.5.0 - 4.5.1 + 4.5.2 4.3.0 @@ -143,10 +143,10 @@ 4.5.0 - 4.5.0 + 4.5.1 - 4.5.0 + 4.5.2 4.5.0 @@ -158,7 +158,7 @@ 4.5.0 - 4.5.0 + 4.5.1 4.5.0 @@ -167,7 +167,7 @@ 4.5.0 - 4.5.0 + 4.5.1 4.5.0 @@ -182,7 +182,7 @@ 4.9.0 - 4.5.1 + 4.5.2 4.5.0 diff --git a/pkg/Microsoft.Private.PackageBaseline/packageIndex.json b/pkg/Microsoft.Private.PackageBaseline/packageIndex.json index e012d82cece3..dbf89400d9d7 100644 --- a/pkg/Microsoft.Private.PackageBaseline/packageIndex.json +++ b/pkg/Microsoft.Private.PackageBaseline/packageIndex.json @@ -80,7 +80,7 @@ "4.4.0", "4.5.0" ], - "BaselineVersion": "4.5.0", + "BaselineVersion": "4.6.0", "InboxOn": { "netcoreapp2.0": "4.0.3.0", "netcoreapp2.1": "4.0.4.0", @@ -113,7 +113,7 @@ "4.0.1.0": "4.0.1", "4.0.2.0": "4.3.0", "4.0.3.0": "4.4.0", - "4.0.4.0": "4.6.0" + "4.0.4.0": "4.5.0" } }, "Microsoft.Devices.Sensors": { @@ -151,9 +151,14 @@ "1.0.2", "1.1.0", "2.0.0", - "2.1.0" - ], - "BaselineVersion": "2.0.0", + "2.1.0", + "2.1.1", + "2.1.2", + "2.1.3", + "2.1.4", + "2.2.0" + ], + "BaselineVersion": "3.0.0", "InboxOn": {} }, "Microsoft.NETCore.Targets": { @@ -165,7 +170,7 @@ "2.0.0", "2.1.0" ], - "BaselineVersion": "2.0.0", + "BaselineVersion": "3.0.0", "InboxOn": {} }, "Microsoft.Phone": { @@ -234,7 +239,7 @@ "10.0.1.0": "10.0.1", "10.0.2.0": "10.1.0", "10.0.3.0": "10.2.0", - "10.0.4.0": "10.4.0" + "10.0.4.0": "10.3.0" } }, "Microsoft.VisualBasic.Compatibility": { @@ -296,7 +301,7 @@ "4.4.0", "4.5.0" ], - "BaselineVersion": "4.5.0", + "BaselineVersion": "4.6.0", "InboxOn": {}, "AssemblyVersionInPackageVersion": { "4.0.0.0": "4.0.0", @@ -313,7 +318,7 @@ "4.4.0", "4.5.0" ], - "BaselineVersion": "4.5.0", + "BaselineVersion": "4.6.0", "InboxOn": {}, "AssemblyVersionInPackageVersion": { "4.0.0.0": "4.0.0", @@ -327,7 +332,7 @@ "StableVersions": [ "4.5.0" ], - "BaselineVersion": "4.5.0", + "BaselineVersion": "4.6.0", "InboxOn": {}, "AssemblyVersionInPackageVersion": { "4.0.0.0": "4.5.0", @@ -336,13 +341,16 @@ }, "Microsoft.Windows.Compatibility": { "StableVersions": [ - "2.0.0" + "2.0.0", + "2.0.1", + "2.1.0" ], "InboxOn": {} }, "Microsoft.Windows.Compatibility.Shims": { "StableVersions": [ - "2.0.0" + "2.0.0", + "2.0.1" ], "InboxOn": {} }, @@ -512,7 +520,7 @@ "4.4.0", "4.5.0" ], - "BaselineVersion": "4.5.0", + "BaselineVersion": "4.6.0", "InboxOn": {} }, "runtime.native.System.IO.Ports": { @@ -661,7 +669,7 @@ "4.4.0", "4.5.0" ], - "BaselineVersion": "4.5.0", + "BaselineVersion": "4.6.0", "InboxOn": {}, "AssemblyVersionInPackageVersion": { "4.0.0.0": "4.4.0", @@ -756,7 +764,7 @@ "1.4.0", "1.5.0" ], - "BaselineVersion": "1.5.0", + "BaselineVersion": "1.6.0", "InboxOn": { "netcoreapp2.0": "1.2.2.0", "netcoreapp2.1": "1.2.3.0", @@ -874,7 +882,7 @@ "4.4.0", "4.5.0" ], - "BaselineVersion": "4.5.0", + "BaselineVersion": "4.6.0", "InboxOn": { "netcoreapp2.0": "4.2.0.0", "netcoreapp2.1": "4.2.1.0", @@ -907,7 +915,7 @@ "StableVersions": [ "4.5.0" ], - "BaselineVersion": "4.5.0", + "BaselineVersion": "4.6.0", "InboxOn": { "net45": "4.0.0.0", "monoandroid10": "Any", @@ -919,7 +927,7 @@ "xamarinwatchos10": "Any" }, "AssemblyVersionInPackageVersion": { - "4.0.0.0": "4.6.0" + "4.0.0.0": "4.5.0" } }, "System.ComponentModel.Composition.Registration": { @@ -1047,7 +1055,7 @@ "1.1.0", "1.2.0" ], - "BaselineVersion": "1.2.0", + "BaselineVersion": "1.3.0", "InboxOn": {} }, "System.Composition.AttributedModel": { @@ -1056,7 +1064,7 @@ "1.1.0", "1.2.0" ], - "BaselineVersion": "1.2.0", + "BaselineVersion": "1.3.0", "InboxOn": {}, "AssemblyVersionInPackageVersion": { "1.0.31.0": "1.0.31", @@ -1071,7 +1079,7 @@ "1.1.0", "1.2.0" ], - "BaselineVersion": "1.2.0", + "BaselineVersion": "1.3.0", "InboxOn": {}, "AssemblyVersionInPackageVersion": { "1.0.31.0": "1.0.31", @@ -1086,7 +1094,7 @@ "1.1.0", "1.2.0" ], - "BaselineVersion": "1.2.0", + "BaselineVersion": "1.3.0", "InboxOn": {}, "AssemblyVersionInPackageVersion": { "1.0.31.0": "1.0.31", @@ -1101,7 +1109,7 @@ "1.1.0", "1.2.0" ], - "BaselineVersion": "1.2.0", + "BaselineVersion": "1.3.0", "InboxOn": {}, "AssemblyVersionInPackageVersion": { "1.0.31.0": "1.0.31", @@ -1116,7 +1124,7 @@ "1.1.0", "1.2.0" ], - "BaselineVersion": "1.2.0", + "BaselineVersion": "1.3.0", "InboxOn": {}, "AssemblyVersionInPackageVersion": { "1.0.31.0": "1.0.31", @@ -1137,7 +1145,7 @@ "4.4.0", "4.5.0" ], - "BaselineVersion": "4.5.0", + "BaselineVersion": "4.6.0", "InboxOn": {}, "AssemblyVersionInPackageVersion": { "4.0.0.0": "4.4.0", @@ -1253,7 +1261,7 @@ "uap10.0.16300": "4.0.0.0" }, "AssemblyVersionInPackageVersion": { - "4.0.0.0": "4.6.0" + "4.0.0.0": "4.5.0" } }, "System.Data.Entity": { @@ -1276,7 +1284,7 @@ "StableVersions": [ "4.5.0" ], - "BaselineVersion": "4.5.0", + "BaselineVersion": "4.6.0", "InboxOn": {}, "AssemblyVersionInPackageVersion": { "4.0.0.0": "4.5.0", @@ -1320,9 +1328,12 @@ "4.1.0", "4.3.0", "4.4.0", - "4.5.1" + "4.5.1", + "4.5.0", + "4.6.0", + "4.6.1" ], - "BaselineVersion": "4.5.1", + "BaselineVersion": "4.7.0", "InboxOn": { "net461": "4.1.0.0", "monoandroid10": "Any", @@ -1341,6 +1352,7 @@ "4.2.0.0": "4.4.0", "4.4.0.0": "4.5.0", "4.5.0.0": "4.6.0", + "4.5.0.1": "4.6.1", "4.6.0.0": "4.7.0" } }, @@ -1452,12 +1464,13 @@ "4.0.0", "4.3.0", "4.4.1", - "4.5.0" + "4.5.0", + "4.5.1" ], - "BaselineVersion": "4.5.0", + "BaselineVersion": "4.6.0", "InboxOn": { "netcoreapp2.0": "4.0.2.1", - "netcoreapp2.1": "4.0.3.0", + "netcoreapp2.1": "4.0.3.1", "netcoreapp3.0": "4.0.4.0" }, "AssemblyVersionInPackageVersion": { @@ -1466,6 +1479,7 @@ "4.0.2.0": "4.4.0", "4.0.2.1": "4.4.1", "4.0.3.0": "4.5.0", + "4.0.3.1": "4.5.1", "4.0.4.0": "4.6.0" } }, @@ -1473,6 +1487,7 @@ "StableVersions": [ "4.5.0" ], + "BaselineVersion": "4.6.0", "InboxOn": {}, "AssemblyVersionInPackageVersion": { "4.0.0.0": "4.5.0", @@ -1507,7 +1522,7 @@ "StableVersions": [ "4.5.0" ], - "BaselineVersion": "4.5.0", + "BaselineVersion": "4.6.0", "InboxOn": { "monoandroid10": "Any", "monotouch10": "Any", @@ -1717,36 +1732,36 @@ "StableVersions": [ "4.5.0" ], - "BaselineVersion": "4.5.0", + "BaselineVersion": "4.6.0", "InboxOn": { "net45": "4.0.0.0" }, "AssemblyVersionInPackageVersion": { - "4.0.0.0": "4.6.0" + "4.0.0.0": "4.5.0" } }, "System.DirectoryServices.AccountManagement": { "StableVersions": [ "4.5.0" ], - "BaselineVersion": "4.5.0", + "BaselineVersion": "4.6.0", "InboxOn": { "net45": "4.0.0.0" }, "AssemblyVersionInPackageVersion": { - "4.0.0.0": "4.6.0" + "4.0.0.0": "4.5.0" } }, "System.DirectoryServices.Protocols": { "StableVersions": [ "4.5.0" ], - "BaselineVersion": "4.5.0", + "BaselineVersion": "4.6.0", "InboxOn": { "net45": "4.0.0.0" }, "AssemblyVersionInPackageVersion": { - "4.0.0.0": "4.6.0" + "4.0.0.0": "4.5.0" } }, "System.Drawing": { @@ -1759,9 +1774,10 @@ }, "System.Drawing.Common": { "StableVersions": [ - "4.5.0" + "4.5.0", + "4.5.1" ], - "BaselineVersion": "4.5.0", + "BaselineVersion": "4.6.0", "InboxOn": { "monoandroid10": "Any", "monotouch10": "Any", @@ -1772,6 +1788,7 @@ }, "AssemblyVersionInPackageVersion": { "4.0.0.0": "4.5.0", + "4.0.0.1": "4.5.1", "4.0.1.0": "4.6.0" } }, @@ -2131,7 +2148,7 @@ "4.4.0", "4.5.0" ], - "BaselineVersion": "4.5.0", + "BaselineVersion": "4.6.0", "InboxOn": {}, "AssemblyVersionInPackageVersion": { "4.0.0.0": "4.0.0", @@ -2277,7 +2294,7 @@ "4.4.0", "4.5.0" ], - "BaselineVersion": "4.5.0", + "BaselineVersion": "4.6.0", "InboxOn": {}, "AssemblyVersionInPackageVersion": { "4.0.0.0": "4.0.0", @@ -2289,12 +2306,16 @@ }, "System.IO.Pipelines": { "StableVersions": [ - "4.5.0" + "4.5.0", + "4.5.1", + "4.5.2", + "4.5.3" ], - "BaselineVersion": "4.5.0", + "BaselineVersion": "4.6.0", "InboxOn": {}, "AssemblyVersionInPackageVersion": { "4.0.0.0": "4.5.0", + "4.0.0.1": "4.5.2", "4.0.1.0": "4.6.0" } }, @@ -2338,14 +2359,14 @@ "4.4.0", "4.5.0" ], - "BaselineVersion": "4.5.0", + "BaselineVersion": "4.6.0", "InboxOn": { "uap10.0.16299": "4.0.1.0", "uap10.0.16300": "4.0.2.0" }, "AssemblyVersionInPackageVersion": { "4.0.0.0": "4.4.0", - "4.0.1.0": "4.6.0", + "4.0.1.0": "4.5.0", "4.0.2.0": "4.6.0" } }, @@ -2380,7 +2401,7 @@ "4.4.0", "4.5.0" ], - "BaselineVersion": "4.5.0", + "BaselineVersion": "4.6.0", "InboxOn": { "monoandroid10": "Any", "monotouch10": "Any", @@ -2518,7 +2539,7 @@ "4.0.1", "4.3.0" ], - "BaselineVersion": "4.3.0", + "BaselineVersion": "4.6.0", "InboxOn": { "netcoreapp2.0": "4.0.3.0", "net45": "4.0.0.0", @@ -2555,12 +2576,12 @@ "StableVersions": [ "4.5.0" ], - "BaselineVersion": "4.5.0", + "BaselineVersion": "4.6.0", "InboxOn": { "net45": "4.0.0.0" }, "AssemblyVersionInPackageVersion": { - "4.0.0.0": "4.6.0" + "4.0.0.0": "4.5.0" } }, "System.Management.Instrumentation": { @@ -2571,8 +2592,11 @@ "System.Memory": { "StableVersions": [ "4.5.0", - "4.5.1" + "4.5.1", + "4.5.2", + "4.5.3" ], + "BaselineVersion": "4.5.3", "InboxOn": { "netcoreapp2.1": "4.1.0.0", "netcoreapp3.0": "4.2.0.0", @@ -2585,7 +2609,9 @@ "xamarinwatchos10": "Any" }, "AssemblyVersionInPackageVersion": { + "4.0.0.0": "4.4.0", "4.0.1.0": "4.5.0", + "4.0.1.1": "4.5.3", "4.1.0.0": "4.6.0" } }, @@ -2717,15 +2743,20 @@ "4.0.1", "4.3.0", "4.4.0", - "4.5.0" + "4.5.0", + "4.5.1", + "4.5.2", + "4.5.3" ], - "BaselineVersion": "4.5.0", + "BaselineVersion": "4.6.0", "InboxOn": {}, "AssemblyVersionInPackageVersion": { "4.0.0.0": "4.0.0", "4.0.1.0": "4.3.0", "4.0.2.0": "4.4.0", "4.0.3.0": "4.5.0", + "4.0.3.1": "4.5.1", + "4.0.3.2": "4.5.3", "4.0.4.0": "4.6.0" } }, @@ -3099,12 +3130,17 @@ }, "System.Net.WebSockets.WebSocketProtocol": { "StableVersions": [ - "4.5.1" + "4.5.1", + "4.5.0", + "4.5.2", + "4.5.3" ], - "BaselineVersion": "4.5.1", + "BaselineVersion": "4.6.0", "InboxOn": {}, "AssemblyVersionInPackageVersion": { "4.0.0.0": "4.5.0", + "4.0.0.1": "4.5.2", + "4.0.0.2": "4.5.3", "4.0.1.0": "4.6.0" } }, @@ -3133,6 +3169,7 @@ "StableVersions": [ "0.1.0" ], + "BaselineVersion": "0.2.0", "InboxOn": {}, "AssemblyVersionInPackageVersion": { "0.1.0.0": "0.1.0", @@ -3170,7 +3207,7 @@ "4.1.1.0": "4.1.1", "4.1.2.0": "4.3.0", "4.1.3.0": "4.4.0", - "4.1.4.0": "4.5.0", + "4.1.4.0": "4.5.0" } }, "System.Numerics.Vectors.WindowsRuntime": { @@ -3319,11 +3356,12 @@ "4.0.0", "4.3.0" ], - "BaselineVersion": "4.3.0", + "BaselineVersion": "4.6.0", "InboxOn": { "net45": "4.0.0.0", "portable46-net451+win81": "4.0.0.0", "portable45-net45+win8": "4.0.0.0", + "uap10.0.16299": "4.0.3.0", "win8": "4.0.0.0" }, "AssemblyVersionInPackageVersion": { @@ -3339,9 +3377,10 @@ "4.0.1", "4.3.0", "4.4.0", - "4.5.1" + "4.5.1", + "4.5.0" ], - "BaselineVersion": "4.5.1", + "BaselineVersion": "4.6.0", "InboxOn": { "netcoreapp2.0": "4.0.3.0", "netcoreapp2.1": "4.0.4.0", @@ -3370,7 +3409,7 @@ "4.0.1", "4.3.0" ], - "BaselineVersion": "4.3.0", + "BaselineVersion": "4.6.0", "InboxOn": { "netcoreapp2.0": "4.1.0.0", "netcoreapp2.1": "4.1.1.0", @@ -3491,7 +3530,7 @@ "1.5.0", "1.6.0" ], - "BaselineVersion": "1.6.0", + "BaselineVersion": "1.7.0", "InboxOn": { "netcoreapp2.0": "1.4.2.0", "netcoreapp2.1": "1.4.3.0", @@ -3562,9 +3601,10 @@ "4.1.0", "4.3.0", "4.4.0", - "4.5.0" + "4.5.0", + "4.5.1" ], - "BaselineVersion": "4.5.0", + "BaselineVersion": "4.6.0", "InboxOn": { "netcoreapp2.0": "4.1.2.0", "netcoreapp2.1": "4.1.3.0", @@ -3731,7 +3771,7 @@ "StableVersions": [ "4.5.0" ], - "BaselineVersion": "4.5.0", + "BaselineVersion": "4.6.0", "InboxOn": { "net45": "4.0.0.0", "monoandroid10": "Any", @@ -3742,16 +3782,17 @@ "xamarinwatchos10": "Any" }, "AssemblyVersionInPackageVersion": { - "4.0.0.0": "4.6.0" + "4.0.0.0": "4.5.0" } }, "System.Runtime.CompilerServices.Unsafe": { "StableVersions": [ "4.4.0", "4.5.0", - "4.5.1" + "4.5.1", + "4.5.2" ], - "BaselineVersion": "4.5.1", + "BaselineVersion": "4.6.0", "InboxOn": { "netcoreapp3.0": "4.0.5.0", "uap10.0.16300": "4.0.5.0" @@ -3759,6 +3800,7 @@ "AssemblyVersionInPackageVersion": { "4.0.3.0": "4.4.0", "4.0.4.0": "4.5.0", + "4.0.4.1": "4.5.2", "4.0.5.0": "4.6.0" } }, @@ -3931,7 +3973,7 @@ "4.0.1", "4.3.0" ], - "BaselineVersion": "4.3.0", + "BaselineVersion": "4.6.0", "InboxOn": { "netcoreapp2.0": "4.0.3.0", "net45": "4.0.0.0", @@ -4253,7 +4295,7 @@ "4.0.0", "4.3.0" ], - "BaselineVersion": "4.3.0", + "BaselineVersion": "4.6.0", "InboxOn": { "net45": "4.0.0.0", "portable46-win81+wpa81": "4.0.0.0", @@ -4283,7 +4325,7 @@ "4.4.0", "4.5.0" ], - "BaselineVersion": "4.5.0", + "BaselineVersion": "4.6.0", "InboxOn": { "uap10.0.16299": "4.1.1.0" }, @@ -4291,7 +4333,7 @@ "4.0.0.0": "4.0.0", "4.0.1.0": "4.3.0", "4.1.0.0": "4.4.0", - "4.1.1.0": "4.6.0", + "4.1.1.0": "4.5.0", "4.1.2.0": "4.6.0" } }, @@ -4354,7 +4396,7 @@ "4.4.0", "4.5.0" ], - "BaselineVersion": "4.5.0", + "BaselineVersion": "4.6.0", "InboxOn": { "monoandroid10": "Any", "monotouch10": "Any", @@ -4428,15 +4470,17 @@ "4.0.0", "4.3.0", "4.4.0", - "4.5.0" + "4.5.0", + "4.5.1" ], - "BaselineVersion": "4.5.0", + "BaselineVersion": "4.6.0", "InboxOn": {}, "AssemblyVersionInPackageVersion": { "4.0.0.0": "4.0.0", "4.0.1.0": "4.3.0", "4.1.0.0": "4.4.0", "4.1.1.0": "4.5.0", + "4.1.1.1": "4.5.1", "4.1.2.0": "4.6.0" } }, @@ -4445,15 +4489,19 @@ "4.0.0", "4.3.0", "4.4.0", - "4.5.0" + "4.5.0", + "4.5.1", + "4.5.2" ], - "BaselineVersion": "4.5.0", + "BaselineVersion": "4.6.0", "InboxOn": {}, "AssemblyVersionInPackageVersion": { "4.0.0.0": "4.0.0", "4.0.1.0": "4.3.0", "4.0.2.0": "4.4.0", "4.0.3.0": "4.5.0", + "4.0.3.1": "4.5.1", + "4.0.3.2": "4.5.2", "4.0.4.0": "4.6.0", "4.1.0.0": "4.6.0" } @@ -4489,7 +4537,7 @@ "4.4.0", "4.5.0" ], - "BaselineVersion": "4.5.0", + "BaselineVersion": "4.6.0", "InboxOn": { "monoandroid10": "Any", "monotouch10": "Any", @@ -4536,7 +4584,7 @@ "4.4.0", "4.5.0" ], - "BaselineVersion": "4.5.0", + "BaselineVersion": "4.6.0", "InboxOn": {}, "AssemblyVersionInPackageVersion": { "4.0.0.0": "4.4.0", @@ -4549,7 +4597,7 @@ "4.4.0", "4.5.0" ], - "BaselineVersion": "4.5.0", + "BaselineVersion": "4.6.0", "InboxOn": {}, "AssemblyVersionInPackageVersion": { "4.0.0.0": "4.4.0", @@ -4602,9 +4650,10 @@ "4.0.0", "4.3.0", "4.4.0", - "4.5.0" + "4.5.0", + "4.5.1" ], - "BaselineVersion": "4.5.0", + "BaselineVersion": "4.6.0", "InboxOn": { "uap10.0.16299": "4.1.1.0" }, @@ -4612,7 +4661,8 @@ "4.0.0.0": "4.0.0", "4.0.1.0": "4.3.0", "4.1.0.0": "4.4.0", - "4.1.1.0": "4.6.0", + "4.1.1.0": "4.5.0", + "4.1.1.1": "4.5.1", "4.1.2.0": "4.6.0" } }, @@ -4780,7 +4830,7 @@ "StableVersions": [ "4.5.0" ], - "BaselineVersion": "4.5.0", + "BaselineVersion": "4.6.0", "InboxOn": {}, "AssemblyVersionInPackageVersion": { "4.0.0.0": "4.5.0", @@ -4828,7 +4878,7 @@ "4.4.0", "4.5.0" ], - "BaselineVersion": "4.5.0", + "BaselineVersion": "4.6.0", "InboxOn": {}, "AssemblyVersionInPackageVersion": { "4.1.0.0": "4.1.0", @@ -4892,9 +4942,10 @@ "4.0.1", "4.3.0", "4.4.0", - "4.5.0" + "4.5.0", + "4.5.1" ], - "BaselineVersion": "4.5.0", + "BaselineVersion": "4.6.0", "InboxOn": { "monoandroid10": "Any", "monotouch10": "Any", @@ -4964,7 +5015,7 @@ "4.4.0", "4.5.0" ], - "BaselineVersion": "4.5.0", + "BaselineVersion": "4.6.0", "InboxOn": { "netcoreapp3.0": "4.0.4.0" }, @@ -5079,7 +5130,7 @@ "4.4.0", "4.5.0" ], - "BaselineVersion": "4.5.0", + "BaselineVersion": "4.6.0", "InboxOn": {}, "AssemblyVersionInPackageVersion": { "4.0.0.0": "4.0.0", @@ -5093,7 +5144,7 @@ "StableVersions": [ "4.5.0" ], - "BaselineVersion": "4.5.0", + "BaselineVersion": "4.6.0", "InboxOn": {}, "AssemblyVersionInPackageVersion": { "4.0.0.0": "4.5.0", @@ -5171,7 +5222,7 @@ "4.8.0", "4.9.0" ], - "BaselineVersion": "4.9.0", + "BaselineVersion": "4.10.0", "InboxOn": { "netcoreapp2.0": "4.6.2.0", "netcoreapp2.1": "4.6.3.0", @@ -5193,9 +5244,11 @@ "4.0.0", "4.3.0", "4.4.0", - "4.5.1" + "4.5.1", + "4.5.2", + "4.5.0" ], - "BaselineVersion": "4.5.1", + "BaselineVersion": "4.5.2", "InboxOn": { "netcoreapp2.0": "4.1.1.0", "netcoreapp2.1": "4.3.0.0", @@ -5971,4 +6024,4 @@ "System.Xml.XDocument" ] } -} \ No newline at end of file +} diff --git a/pkg/test/packageSettings/System.Diagnostics.DiagnosticSource/workaroundMissingSystemMemory.targets b/pkg/test/packageSettings/System.Diagnostics.DiagnosticSource/workaroundMissingSystemMemory.targets deleted file mode 100644 index fdb725fd625f..000000000000 --- a/pkg/test/packageSettings/System.Diagnostics.DiagnosticSource/workaroundMissingSystemMemory.targets +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - diff --git a/src/System.ComponentModel.Composition/src/System.ComponentModel.Composition.csproj b/src/System.ComponentModel.Composition/src/System.ComponentModel.Composition.csproj index 6aa81ad59019..6c91f0901ce7 100644 --- a/src/System.ComponentModel.Composition/src/System.ComponentModel.Composition.csproj +++ b/src/System.ComponentModel.Composition/src/System.ComponentModel.Composition.csproj @@ -215,6 +215,5 @@ - \ No newline at end of file diff --git a/src/System.ComponentModel.Composition/src/System/ComponentModel/Composition/CatalogReflectionContextAttribute.cs b/src/System.ComponentModel.Composition/src/System/ComponentModel/Composition/CatalogReflectionContextAttribute.cs index bb7df2ae8e28..4f88acd78089 100644 --- a/src/System.ComponentModel.Composition/src/System/ComponentModel/Composition/CatalogReflectionContextAttribute.cs +++ b/src/System.ComponentModel.Composition/src/System/ComponentModel/Composition/CatalogReflectionContextAttribute.cs @@ -6,9 +6,6 @@ using System.Reflection; using Microsoft.Internal; -using PermissionSet = System.Security.PermissionSet; -using PermissionState = System.Security.Permissions.PermissionState; - namespace System.ComponentModel.Composition { /// @@ -34,11 +31,6 @@ public ReflectionContext CreateReflectionContext() throw new ArgumentNullException(nameof(_reflectionContextType)); } - if (!_reflectionContextType.IsPublic) - { - new PermissionSet(PermissionState.Unrestricted).Demand(); - } - ReflectionContext reflectionContext = null; try { diff --git a/src/System.Diagnostics.DiagnosticSource/pkg/System.Diagnostics.DiagnosticSource.pkgproj b/src/System.Diagnostics.DiagnosticSource/pkg/System.Diagnostics.DiagnosticSource.pkgproj index eabb6507738e..e6ed4e3bb858 100644 --- a/src/System.Diagnostics.DiagnosticSource/pkg/System.Diagnostics.DiagnosticSource.pkgproj +++ b/src/System.Diagnostics.DiagnosticSource/pkg/System.Diagnostics.DiagnosticSource.pkgproj @@ -17,22 +17,5 @@ .NETCoreApp;UAP - - - - - - - - - - diff --git a/src/System.IO.Pipelines/pkg/System.IO.Pipelines.pkgproj b/src/System.IO.Pipelines/pkg/System.IO.Pipelines.pkgproj index 386bd83dd953..7d2b398936d6 100644 --- a/src/System.IO.Pipelines/pkg/System.IO.Pipelines.pkgproj +++ b/src/System.IO.Pipelines/pkg/System.IO.Pipelines.pkgproj @@ -2,7 +2,7 @@ - net461;netcoreapp2.0;$(UAPvNextTFM);$(AllXamarinFrameworks) + net461;netcoreapp2.0;uap10.0.16299;$(AllXamarinFrameworks) diff --git a/src/System.Reflection.Context/Directory.Build.props b/src/System.Reflection.Context/Directory.Build.props index 14f75a50fdb4..6bf7e565f300 100644 --- a/src/System.Reflection.Context/Directory.Build.props +++ b/src/System.Reflection.Context/Directory.Build.props @@ -3,5 +3,6 @@ 4.0.3.0 ECMA + true diff --git a/src/System.Reflection.Context/pkg/System.Reflection.Context.pkgproj b/src/System.Reflection.Context/pkg/System.Reflection.Context.pkgproj index 66dc14a19dae..2c2d1331b70e 100644 --- a/src/System.Reflection.Context/pkg/System.Reflection.Context.pkgproj +++ b/src/System.Reflection.Context/pkg/System.Reflection.Context.pkgproj @@ -8,6 +8,14 @@ true + + + UAP + diff --git a/src/System.Reflection.Context/ref/System.Reflection.Context.csproj b/src/System.Reflection.Context/ref/System.Reflection.Context.csproj index 2c5158304a01..64ac4be52fe3 100644 --- a/src/System.Reflection.Context/ref/System.Reflection.Context.csproj +++ b/src/System.Reflection.Context/ref/System.Reflection.Context.csproj @@ -5,8 +5,6 @@ plan on shipping a new desktop version out of band. Instead add API to a different assembly. --> 4.0.0.0 - - netstandard2.0;uap10.0.16300 netstandard-Debug;netstandard-Release;netstandard1.1-Debug;netstandard1.1-Release From 2016619a120bcf6c690801bc577b2e170f1a92e1 Mon Sep 17 00:00:00 2001 From: RJ Date: Tue, 21 May 2019 22:49:49 -0400 Subject: [PATCH 457/607] Fix ambiguous Utf8JsonReader Get/TryGet method documentation (#37779) --- .../Text/Json/Reader/Utf8JsonReader.TryGet.cs | 46 +++++++++---------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/src/System.Text.Json/src/System/Text/Json/Reader/Utf8JsonReader.TryGet.cs b/src/System.Text.Json/src/System/Text/Json/Reader/Utf8JsonReader.TryGet.cs index 201d6f9b563a..d4e25a702841 100644 --- a/src/System.Text.Json/src/System/Text/Json/Reader/Utf8JsonReader.TryGet.cs +++ b/src/System.Text.Json/src/System/Text/Json/Reader/Utf8JsonReader.TryGet.cs @@ -11,7 +11,7 @@ namespace System.Text.Json public ref partial struct Utf8JsonReader { /// - /// Reads the next JSON token value from the source, unescaped, and transcoded as a . + /// Parses the current JSON token value from the source, unescaped, and transcoded as a . /// /// /// Thrown if trying to get the value of the JSON token that is not a string @@ -40,7 +40,7 @@ public string GetString() } /// - /// Reads the next JSON token value from the source as a comment, transcoded as a . + /// Parses the current JSON token value from the source as a comment, transcoded as a . /// /// /// Thrown if trying to get the value of the JSON token that is not a comment. @@ -57,7 +57,7 @@ public string GetComment() } /// - /// Reads the next JSON token value from the source as a . + /// Parses the current JSON token value from the source as a . /// Returns true if the TokenType is JsonTokenType.True and false if the TokenType is JsonTokenType.False. /// /// @@ -85,7 +85,7 @@ public bool GetBoolean() } /// - /// Reads the next JSON token value from the source and parses it to an . + /// Parses the current JSON token value from the source as an . /// Returns the value if the entire UTF-8 encoded token value can be successfully parsed to an /// value. /// Throws exceptions otherwise. @@ -109,7 +109,7 @@ public int GetInt32() } /// - /// Reads the next JSON token value from the source and parses it to a . + /// Parses the current JSON token value from the source as a . /// Returns the value if the entire UTF-8 encoded token value can be successfully parsed to a /// value. /// Throws exceptions otherwise. @@ -133,7 +133,7 @@ public long GetInt64() } /// - /// Reads the next JSON token value from the source and parses it to a . + /// Parses the current JSON token value from the source as a . /// Returns the value if the entire UTF-8 encoded token value can be successfully parsed to a /// value. /// Throws exceptions otherwise. @@ -158,7 +158,7 @@ public uint GetUInt32() } /// - /// Reads the next JSON token value from the source and parses it to a . + /// Parses the current JSON token value from the source as a . /// Returns the value if the entire UTF-8 encoded token value can be successfully parsed to a /// value. /// Throws exceptions otherwise. @@ -183,7 +183,7 @@ public ulong GetUInt64() } /// - /// Reads the next JSON token value from the source and parses it to a . + /// Parses the current JSON token value from the source as a . /// Returns the value if the entire UTF-8 encoded token value can be successfully parsed to a /// value. /// Throws exceptions otherwise. @@ -206,7 +206,7 @@ public float GetSingle() } /// - /// Reads the next JSON token value from the source and parses it to a . + /// Parses the current JSON token value from the source as a . /// Returns the value if the entire UTF-8 encoded token value can be successfully parsed to a /// value. /// Throws exceptions otherwise. @@ -229,7 +229,7 @@ public double GetDouble() } /// - /// Reads the next JSON token value from the source and parses it to a . + /// Parses the current JSON token value from the source as a . /// Returns the value if the entire UTF-8 encoded token value can be successfully parsed to a /// value. /// Throws exceptions otherwise. @@ -252,7 +252,7 @@ public decimal GetDecimal() } /// - /// Reads the next JSON token value from the source and parses it to a . + /// Parses the current JSON token value from the source as a . /// Returns the value if the entire UTF-8 encoded token value can be successfully parsed to a /// value. /// Throws exceptions otherwise. @@ -275,7 +275,7 @@ public DateTime GetDateTime() } /// - /// Reads the next JSON token value from the source and parses it to a . + /// Parses the current JSON token value from the source as a . /// Returns the value if the entire UTF-8 encoded token value can be successfully parsed to a /// value. /// Throws exceptions otherwise. @@ -298,7 +298,7 @@ public DateTimeOffset GetDateTimeOffset() } /// - /// Reads the next JSON token value from the source and parses it to a . + /// Parses the current JSON token value from the source as a . /// Returns the value if the entire UTF-8 encoded token value can be successfully parsed to a /// value. /// Throws exceptions otherwise. @@ -321,7 +321,7 @@ public Guid GetGuid() } /// - /// Reads the next JSON token value from the source and parses it to an . + /// Parses the current JSON token value from the source as an . /// Returns true if the entire UTF-8 encoded token value can be successfully /// parsed to an value. /// Returns false otherwise. @@ -342,7 +342,7 @@ public bool TryGetInt32(out int value) } /// - /// Reads the next JSON token value from the source and parses it to a . + /// Parses the current JSON token value from the source as a . /// Returns true if the entire UTF-8 encoded token value can be successfully /// parsed to a value. /// Returns false otherwise. @@ -363,7 +363,7 @@ public bool TryGetInt64(out long value) } /// - /// Reads the next JSON token value from the source and parses it to a . + /// Parses the current JSON token value from the source as a . /// Returns true if the entire UTF-8 encoded token value can be successfully /// parsed to a value. /// Returns false otherwise. @@ -385,7 +385,7 @@ public bool TryGetUInt32(out uint value) } /// - /// Reads the next JSON token value from the source and parses it to a . + /// Parses the current JSON token value from the source as a . /// Returns true if the entire UTF-8 encoded token value can be successfully /// parsed to a value. /// Returns false otherwise. @@ -407,7 +407,7 @@ public bool TryGetUInt64(out ulong value) } /// - /// Reads the next JSON token value from the source and parses it to a . + /// Parses the current JSON token value from the source as a . /// Returns true if the entire UTF-8 encoded token value can be successfully /// parsed to a value. /// Returns false otherwise. @@ -428,7 +428,7 @@ public bool TryGetSingle(out float value) } /// - /// Reads the next JSON token value from the source and parses it to a . + /// Parses the current JSON token value from the source as a . /// Returns true if the entire UTF-8 encoded token value can be successfully /// parsed to a value. /// Returns false otherwise. @@ -449,7 +449,7 @@ public bool TryGetDouble(out double value) } /// - /// Reads the next JSON token value from the source and parses it to a . + /// Parses the current JSON token value from the source as a . /// Returns true if the entire UTF-8 encoded token value can be successfully /// parsed to a value. /// Returns false otherwise. @@ -470,7 +470,7 @@ public bool TryGetDecimal(out decimal value) } /// - /// Reads the next JSON token value from the source and parses it to a . + /// Parses the current JSON token value from the source as a . /// Returns true if the entire UTF-8 encoded token value can be successfully /// parsed to a value. /// Returns false otherwise. @@ -529,7 +529,7 @@ public bool TryGetDateTime(out DateTime value) } /// - /// Reads the next JSON token value from the source and parses it to a . + /// Parses the current JSON token value from the source as a . /// Returns true if the entire UTF-8 encoded token value can be successfully /// parsed to a value. /// Returns false otherwise. @@ -588,7 +588,7 @@ public bool TryGetDateTimeOffset(out DateTimeOffset value) } /// - /// Reads the next JSON token value from the source and parses it to a . + /// Parses the current JSON token value from the source as a . /// Returns if the entire UTF-8 encoded token value can be successfully /// parsed to a value. Only supports values with hyphens /// and without any surrounding decorations. From 85d82a0402e26fb02be4c006752904cb8e0f8b02 Mon Sep 17 00:00:00 2001 From: Jan Kotas Date: Tue, 21 May 2019 21:26:13 -0700 Subject: [PATCH 458/607] Regression test for multiple attributes on the same type (#37518) Contributes to #37261 --- src/System.Runtime/tests/System/Attributes.cs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/System.Runtime/tests/System/Attributes.cs b/src/System.Runtime/tests/System/Attributes.cs index 035429c604e4..4fb34d9c333c 100644 --- a/src/System.Runtime/tests/System/Attributes.cs +++ b/src/System.Runtime/tests/System/Attributes.cs @@ -199,6 +199,13 @@ public static void NegTest() Assert.Throws(() => Attribute.GetCustomAttributes(typeof(TestClass2).GetMethod("TestMethod2"), null, false)); Assert.Throws(() => Attribute.GetCustomAttributes(typeof(TestClass2).GetMethod("TestMethod2").GetParameters()[0], null, false)); } + + [Fact] + public static void MultipleAttributesTest() + { + Assert.Equal("System.Tests.MyCustomAttribute System.Tests.MyCustomAttribute", string.Join(" ", typeof(MultipleAttributes).GetCustomAttributes(inherit: false))); + Assert.Equal("System.Tests.MyCustomAttribute System.Tests.MyCustomAttribute", string.Join(" ", typeof(MultipleAttributes).GetCustomAttributes(inherit: true))); + } } public static class GetCustomAttribute { @@ -786,4 +793,10 @@ public override string PropBase3 set { } } } + + [MyCustomAttribute("Test")] + [MyCustomAttribute("Test")] + class MultipleAttributes + { + } } From b9b357f9a5a6ccf6a70c2e13b5a7d84a3ed1a684 Mon Sep 17 00:00:00 2001 From: Mike Marynowski Date: Tue, 21 May 2019 22:58:49 -0400 Subject: [PATCH 459/607] Modified format logic so that braces are not allowed in custom format specifiers (#23062) * Modified format logic so that braces are not allowed in custom format specifiers. * Disabled failing test temporarily and fixed code style issue. PR needed to pass test: https://github.com/dotnet/corefx/pull/35820 * Slight changes to logic to better align the diff. * Fixed counting error. * Fix nullable * Move exclusion near related test * Add skip to new issue file * Delete CoreFX.issues.json Signed-off-by: dotnet-bot --- .../src/CoreLib/System/Text/StringBuilder.cs | 70 ++++++------------- 1 file changed, 21 insertions(+), 49 deletions(-) diff --git a/src/Common/src/CoreLib/System/Text/StringBuilder.cs b/src/Common/src/CoreLib/System/Text/StringBuilder.cs index 38d594507611..ec9d2c4b355f 100644 --- a/src/Common/src/CoreLib/System/Text/StringBuilder.cs +++ b/src/Common/src/CoreLib/System/Text/StringBuilder.cs @@ -1538,7 +1538,6 @@ internal StringBuilder AppendFormatHelper(IFormatProvider? provider, string form int pos = 0; int len = format.Length; char ch = '\x0'; - StringBuilder? unescapedItemFormat = null; ICustomFormatter? cf = null; if (provider != null) @@ -1665,7 +1664,7 @@ internal StringBuilder AppendFormatHelper(IFormatProvider? provider, string form // Start of parsing of optional formatting parameter. // object? arg = args[index]; - string? itemFormat = null; + ReadOnlySpan itemFormatSpan = default; // used if itemFormat is null // Is current character a colon? which indicates start of formatting parameter. if (ch == ':') @@ -1678,67 +1677,40 @@ internal StringBuilder AppendFormatHelper(IFormatProvider? provider, string form // If reached end of text then error. (Unexpected end of text) if (pos == len) FormatError(); ch = format[pos]; - pos++; - // Is character a opening or closing brace? - if (ch == '}' || ch == '{') + if (ch == '}') { - if (ch == '{') - { - // Yes, is next character also a opening brace, then treat as escaped. eg {{ - if (pos < len && format[pos] == '{') - pos++; - else - // Error Argument Holes can not be nested. - FormatError(); - } - else - { - // Yes, is next character also a closing brace, then treat as escaped. eg }} - if (pos < len && format[pos] == '}') - pos++; - else - { - // No, then treat it as the closing brace of an Arg Hole. - pos--; - break; - } - } - - // Reaching here means the brace has been escaped - // so we need to build up the format string in segments - if (unescapedItemFormat == null) - { - unescapedItemFormat = new StringBuilder(); - } - unescapedItemFormat.Append(format, startPos, pos - startPos - 1); - startPos = pos; + // Argument hole closed + break; } - } - - if (unescapedItemFormat == null || unescapedItemFormat.Length == 0) - { - if (startPos != pos) + else if (ch == '{') { - // There was no brace escaping, extract the item format as a single string - itemFormatSpan = format.AsSpan(startPos, pos - startPos); + // Braces inside the argument hole are not supported + FormatError(); } + + pos++; } - else + + if (pos > startPos) { - unescapedItemFormat.Append(format, startPos, pos - startPos); - itemFormatSpan = itemFormat = unescapedItemFormat.ToString(); - unescapedItemFormat.Clear(); + itemFormatSpan = format.AsSpan(startPos, pos - startPos); } } - // If current character is not a closing brace then error. (Unexpected Character) - if (ch != '}') FormatError(); + else if (ch != '}') + { + // Unexpected character + FormatError(); + } + // Construct the output for this arg hole. pos++; string? s = null; + string? itemFormat = null; + if (cf != null) { - if (itemFormatSpan.Length != 0 && itemFormat == null) + if (itemFormatSpan.Length != 0) { itemFormat = new string(itemFormatSpan); } From ee35d4f56f8509267fe56086394966f2804d8557 Mon Sep 17 00:00:00 2001 From: Anirudh Agnihotry Date: Tue, 21 May 2019 21:51:30 -0700 Subject: [PATCH 460/607] using netcoreapp2.1 version if colorUtil (#37854) --- src/Common/src/System/Drawing/ColorUtil.netcoreapp21.cs | 4 +--- src/System.Drawing.Common/src/System.Drawing.Common.csproj | 5 ++++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/Common/src/System/Drawing/ColorUtil.netcoreapp21.cs b/src/Common/src/System/Drawing/ColorUtil.netcoreapp21.cs index e65f14c839a8..3b4cfcaa004a 100644 --- a/src/Common/src/System/Drawing/ColorUtil.netcoreapp21.cs +++ b/src/Common/src/System/Drawing/ColorUtil.netcoreapp21.cs @@ -2,14 +2,12 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System.Diagnostics; -using System.Reflection; - namespace System.Drawing { internal static class ColorUtil { public static Color FromKnownColor(KnownColor color) => Color.FromKnownColor(color); public static bool IsSystemColor(this Color color) => color.IsSystemColor; + public static bool GetIsKnownColor(this Color color) => color.IsKnownColor; } } \ No newline at end of file diff --git a/src/System.Drawing.Common/src/System.Drawing.Common.csproj b/src/System.Drawing.Common/src/System.Drawing.Common.csproj index 776b14af4b97..ad577ba9fc5d 100644 --- a/src/System.Drawing.Common/src/System.Drawing.Common.csproj +++ b/src/System.Drawing.Common/src/System.Drawing.Common.csproj @@ -160,9 +160,12 @@ System\Drawing\ColorTable.cs - + System\Drawing\ColorUtil.netcoreapp20.cs + + System\Drawing\ColorUtil.netcoreapp21.cs + System\Drawing\KnownColorTable.cs From bf1223bd6d09b74bc3a02734719261e95c12b56a Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Wed, 22 May 2019 13:31:40 +0000 Subject: [PATCH 461/607] Update dependencies from https://github.com/dotnet/corefx build 20190521.9 (#37862) - runtime.native.System.IO.Ports - 4.6.0-preview6.19271.9 - Microsoft.NETCore.Platforms - 3.0.0-preview6.19271.9 --- eng/Version.Details.xml | 8 ++++---- eng/Versions.props | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 5839fe64262b..851d272016bd 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -26,13 +26,13 @@ https://github.com/dotnet/core-setup c3145b06ba5151d5eafcf177a2e380f7acb61189 - + https://github.com/dotnet/corefx - 51a1f16ee2aaded4ce1fca6847471b58f7ffa160 + b9b357f9a5a6ccf6a70c2e13b5a7d84a3ed1a684 - + https://github.com/dotnet/corefx - 51a1f16ee2aaded4ce1fca6847471b58f7ffa160 + b9b357f9a5a6ccf6a70c2e13b5a7d84a3ed1a684 https://github.com/dotnet/arcade diff --git a/eng/Versions.props b/eng/Versions.props index ac9a34572b24..2490ccd505d6 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -43,8 +43,8 @@ 3.0.0-preview6-27720-72 3.0.0-preview6-27720-72 - 3.0.0-preview6.19271.1 - 4.6.0-preview6.19271.1 + 3.0.0-preview6.19271.9 + 4.6.0-preview6.19271.9 2.1.0-prerelease.19270.1 From a0aac7aef0e9c6c1fd4bd5d51a4dff6e0e05f9d8 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Wed, 22 May 2019 13:46:45 +0000 Subject: [PATCH 462/607] Update dependencies from https://github.com/dotnet/coreclr build 20190521.71 (#37863) - Microsoft.NET.Sdk.IL - 3.0.0-preview6-27721-71 - Microsoft.NETCore.ILAsm - 3.0.0-preview6-27721-71 - Microsoft.NETCore.Runtime.CoreCLR - 3.0.0-preview6-27721-71 --- eng/Version.Details.xml | 12 ++++++------ eng/Versions.props | 4 ++-- global.json | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 851d272016bd..c39fa0429ad9 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -1,16 +1,16 @@ - + https://github.com/dotnet/coreclr - c8e9c122aa5ea827e734fdffd889afa6318619da + 22288107a7acf7a3cf40f72c0464a722c80b7ba9 - + https://github.com/dotnet/coreclr - c8e9c122aa5ea827e734fdffd889afa6318619da + 22288107a7acf7a3cf40f72c0464a722c80b7ba9 - + https://github.com/dotnet/coreclr - c8e9c122aa5ea827e734fdffd889afa6318619da + 22288107a7acf7a3cf40f72c0464a722c80b7ba9 diff --git a/eng/Versions.props b/eng/Versions.props index 2490ccd505d6..4353c46fa558 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -40,8 +40,8 @@ 3.0.0-preview6-27720-09 3.0.0-preview6-27720-09 - 3.0.0-preview6-27720-72 - 3.0.0-preview6-27720-72 + 3.0.0-preview6-27721-71 + 3.0.0-preview6-27721-71 3.0.0-preview6.19271.9 4.6.0-preview6.19271.9 diff --git a/global.json b/global.json index 47e68d764d0b..787d8ffa315d 100644 --- a/global.json +++ b/global.json @@ -6,6 +6,6 @@ "Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19270.2", "Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19270.2", "FIX-85B6-MERGE-9C38-CONFLICT": "1.0.0", - "Microsoft.NET.Sdk.IL": "3.0.0-preview6-27720-72" + "Microsoft.NET.Sdk.IL": "3.0.0-preview6-27721-71" } } From 62951c47e6897c1c9f18a4b2aeee64d99968cb76 Mon Sep 17 00:00:00 2001 From: dotnet-maestro-bot Date: Wed, 22 May 2019 07:12:54 -0700 Subject: [PATCH 463/607] Update ProjectNTfs to beta-27722-00 (#37859) --- eng/dependencies.props | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/dependencies.props b/eng/dependencies.props index fbd6765a81f6..946b1d4593dd 100644 --- a/eng/dependencies.props +++ b/eng/dependencies.props @@ -9,12 +9,12 @@ These ref versions are pulled from https://github.com/dotnet/versions. --> - a138056d24c7c98033118faa7e03ba806d6495e4 + 6bbde1f087deabdcf227771e37e73a6a50e540ce - beta-27721-00 + beta-27722-00 From 716fbb12ada1b7ee3061387b765c3b4488f9d0d0 Mon Sep 17 00:00:00 2001 From: Stephen Toub Date: Wed, 22 May 2019 00:27:00 -0400 Subject: [PATCH 464/607] Implement AppDomain.Monitoring*MemorySize (dotnet/coreclr#24610) * Implement AppDomain.MonitoringTotalAllocatedMemorySize * Change precise:true back to precise:false in GetTotalAllocatedBytes Signed-off-by: dotnet-bot --- .../Interop.GetCpuUtilization.cs | 6 ++--- .../System.Private.CoreLib.Shared.projitems | 2 ++ .../src/CoreLib/System/AppDomain.Unix.cs | 26 +++++++++++++++++++ .../src/CoreLib/System/AppDomain.Windows.cs | 14 ++++++++++ src/Common/src/CoreLib/System/AppDomain.cs | 20 +++++++------- 5 files changed, 56 insertions(+), 12 deletions(-) create mode 100644 src/Common/src/CoreLib/System/AppDomain.Unix.cs create mode 100644 src/Common/src/CoreLib/System/AppDomain.Windows.cs diff --git a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.GetCpuUtilization.cs b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.GetCpuUtilization.cs index 35e77c454192..a630a3e82c34 100644 --- a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.GetCpuUtilization.cs +++ b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.GetCpuUtilization.cs @@ -13,9 +13,9 @@ internal unsafe partial class Sys [StructLayout(LayoutKind.Sequential)] internal struct ProcessCpuInformation { - ulong lastRecordedCurrentTime; - ulong lastRecordedKernelTime; - ulong lastRecordedUserTime; + internal ulong lastRecordedCurrentTime; + internal ulong lastRecordedKernelTime; + internal ulong lastRecordedUserTime; } [DllImport(Libraries.SystemNative, EntryPoint = "SystemNative_GetCpuUtilization")] diff --git a/src/Common/src/CoreLib/System.Private.CoreLib.Shared.projitems b/src/Common/src/CoreLib/System.Private.CoreLib.Shared.projitems index 35b10dbdc2fe..cb5180f823a8 100644 --- a/src/Common/src/CoreLib/System.Private.CoreLib.Shared.projitems +++ b/src/Common/src/CoreLib/System.Private.CoreLib.Shared.projitems @@ -1091,6 +1091,7 @@ + @@ -1253,6 +1254,7 @@ + diff --git a/src/Common/src/CoreLib/System/AppDomain.Unix.cs b/src/Common/src/CoreLib/System/AppDomain.Unix.cs new file mode 100644 index 000000000000..3c1ef889f97b --- /dev/null +++ b/src/Common/src/CoreLib/System/AppDomain.Unix.cs @@ -0,0 +1,26 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +namespace System +{ + public sealed partial class AppDomain + { + public TimeSpan MonitoringTotalProcessorTime + { + get + { + Interop.Sys.ProcessCpuInformation cpuInfo = default; + Interop.Sys.GetCpuUtilization(ref cpuInfo); + + ulong userTime100Nanoseconds = cpuInfo.lastRecordedUserTime / 100; // nanoseconds to 100-nanoseconds + if (userTime100Nanoseconds > long.MaxValue) + { + userTime100Nanoseconds = long.MaxValue; + } + + return new TimeSpan((long)userTime100Nanoseconds); + } + } + } +} diff --git a/src/Common/src/CoreLib/System/AppDomain.Windows.cs b/src/Common/src/CoreLib/System/AppDomain.Windows.cs new file mode 100644 index 000000000000..07633273e243 --- /dev/null +++ b/src/Common/src/CoreLib/System/AppDomain.Windows.cs @@ -0,0 +1,14 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +namespace System +{ + public sealed partial class AppDomain + { + public TimeSpan MonitoringTotalProcessorTime => + Interop.Kernel32.GetProcessTimes(Interop.Kernel32.GetCurrentProcess(), out _, out _, out _, out long userTime100Nanoseconds) ? + new TimeSpan(userTime100Nanoseconds) : + TimeSpan.Zero; + } +} diff --git a/src/Common/src/CoreLib/System/AppDomain.cs b/src/Common/src/CoreLib/System/AppDomain.cs index 34e26efc56b3..9c5a02c505cd 100644 --- a/src/Common/src/CoreLib/System/AppDomain.cs +++ b/src/Common/src/CoreLib/System/AppDomain.cs @@ -184,26 +184,28 @@ public static void Unload(AppDomain domain) public static bool MonitoringIsEnabled { - get { return false; } + get { return true; } set { if (!value) { throw new ArgumentException(SR.Arg_MustBeTrue); } - throw new PlatformNotSupportedException(SR.PlatformNotSupported_AppDomain_ResMon); } } - public long MonitoringSurvivedMemorySize { get { throw CreateResMonNotAvailException(); } } + public long MonitoringSurvivedMemorySize => MonitoringSurvivedProcessMemorySize; - public static long MonitoringSurvivedProcessMemorySize { get { throw CreateResMonNotAvailException(); } } - - public long MonitoringTotalAllocatedMemorySize { get { throw CreateResMonNotAvailException(); } } - - public TimeSpan MonitoringTotalProcessorTime { get { throw CreateResMonNotAvailException(); } } + public static long MonitoringSurvivedProcessMemorySize + { + get + { + GCMemoryInfo mi = GC.GetGCMemoryInfo(); + return mi.HeapSizeBytes - mi.FragmentedBytes; + } + } - private static Exception CreateResMonNotAvailException() => new InvalidOperationException(SR.PlatformNotSupported_AppDomain_ResMon); + public long MonitoringTotalAllocatedMemorySize => GC.GetTotalAllocatedBytes(precise: false); [ObsoleteAttribute("AppDomain.GetCurrentThreadId has been deprecated because it does not provide a stable Id when managed threads are running on fibers (aka lightweight threads). To get a stable identifier for a managed thread, use the ManagedThreadId property on Thread. https://go.microsoft.com/fwlink/?linkid=14202", false)] public static int GetCurrentThreadId() => Environment.CurrentManagedThreadId; From 05d3aaa5c5f3b07ad7eaefab88693fe3f85b8636 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Wed, 22 May 2019 10:59:57 -0400 Subject: [PATCH 465/607] Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-optimization build 20190521.3 (#37864) - optimization.windows_nt-x64.IBC.CoreFx - 99.99.99-master-20190521.3 --- eng/Version.Details.xml | 4 ++-- eng/Versions.props | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index c39fa0429ad9..b48c54b19b7f 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -94,9 +94,9 @@ https://github.com/dotnet/arcade 3b0760f8789d5d4bd146b36bd9051696d7a56bfa - + https://dev.azure.com/dnceng/internal/_git/dotnet-optimization - 6576979664f443fa03773da591e0ed1fc78ed12c + 680817355bb2e1326de1124c846263f8d9fb9294 diff --git a/eng/Versions.props b/eng/Versions.props index 4353c46fa558..2b401d5e6947 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -48,7 +48,7 @@ 2.1.0-prerelease.19270.1 - 99.99.99-master-20190521.1 + 99.99.99-master-20190521.3 4.4.0 4.4.0 From dacb04d181818c3bacd8d7e2db12c0a98b920685 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Wed, 22 May 2019 11:00:29 -0400 Subject: [PATCH 466/607] Update dependencies from https://github.com/dotnet/arcade build 20190521.7 (#37860) - Microsoft.DotNet.XUnitExtensions - 2.4.0-beta.19271.7 - Microsoft.DotNet.XUnitConsoleRunner - 2.5.1-beta.19271.7 - Microsoft.DotNet.VersionTools.Tasks - 1.0.0-beta.19271.7 - Microsoft.DotNet.ApiCompat - 1.0.0-beta.19271.7 - Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19271.7 - Microsoft.DotNet.Build.Tasks.Configuration - 1.0.0-beta.19271.7 - Microsoft.DotNet.Build.Tasks.Feed - 2.2.0-beta.19271.7 - Microsoft.DotNet.Build.Tasks.Packaging - 1.0.0-beta.19271.7 - Microsoft.DotNet.CodeAnalysis - 1.0.0-beta.19271.7 - Microsoft.DotNet.CoreFxTesting - 1.0.0-beta.19271.7 - Microsoft.DotNet.GenAPI - 1.0.0-beta.19271.7 - Microsoft.DotNet.GenFacades - 1.0.0-beta.19271.7 - Microsoft.DotNet.Helix.Sdk - 2.0.0-beta.19271.7 - Microsoft.DotNet.RemoteExecutor - 1.0.0-beta.19271.7 --- eng/Version.Details.xml | 56 +++++++++---------- eng/Versions.props | 24 ++++----- eng/common/build.sh | 5 ++ eng/common/tools.ps1 | 6 ++- eng/common/tools.sh | 115 ++++++++++++++++++++++++++++++++++++---- global.json | 4 +- 6 files changed, 158 insertions(+), 52 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index b48c54b19b7f..0f93a92cb311 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -34,65 +34,65 @@ https://github.com/dotnet/corefx b9b357f9a5a6ccf6a70c2e13b5a7d84a3ed1a684 - + https://github.com/dotnet/arcade - 3b0760f8789d5d4bd146b36bd9051696d7a56bfa + 7a6fb6528b2060cd9e3a3d92535f5b6fdc6b2e82 https://github.com/dotnet/standard 2f630cd85d291fbace35b5d047c19504637322e5 - + https://github.com/dotnet/arcade - 3b0760f8789d5d4bd146b36bd9051696d7a56bfa + 7a6fb6528b2060cd9e3a3d92535f5b6fdc6b2e82 - + https://github.com/dotnet/arcade - 3b0760f8789d5d4bd146b36bd9051696d7a56bfa + 7a6fb6528b2060cd9e3a3d92535f5b6fdc6b2e82 - + https://github.com/dotnet/arcade - 3b0760f8789d5d4bd146b36bd9051696d7a56bfa + 7a6fb6528b2060cd9e3a3d92535f5b6fdc6b2e82 - + https://github.com/dotnet/arcade - 3b0760f8789d5d4bd146b36bd9051696d7a56bfa + 7a6fb6528b2060cd9e3a3d92535f5b6fdc6b2e82 - + https://github.com/dotnet/arcade - 3b0760f8789d5d4bd146b36bd9051696d7a56bfa + 7a6fb6528b2060cd9e3a3d92535f5b6fdc6b2e82 - + https://github.com/dotnet/arcade - 3b0760f8789d5d4bd146b36bd9051696d7a56bfa + 7a6fb6528b2060cd9e3a3d92535f5b6fdc6b2e82 - + https://github.com/dotnet/arcade - 3b0760f8789d5d4bd146b36bd9051696d7a56bfa + 7a6fb6528b2060cd9e3a3d92535f5b6fdc6b2e82 - + https://github.com/dotnet/arcade - 3b0760f8789d5d4bd146b36bd9051696d7a56bfa + 7a6fb6528b2060cd9e3a3d92535f5b6fdc6b2e82 - + https://github.com/dotnet/arcade - 3b0760f8789d5d4bd146b36bd9051696d7a56bfa + 7a6fb6528b2060cd9e3a3d92535f5b6fdc6b2e82 - + https://github.com/dotnet/arcade - 3b0760f8789d5d4bd146b36bd9051696d7a56bfa + 7a6fb6528b2060cd9e3a3d92535f5b6fdc6b2e82 - + https://github.com/dotnet/arcade - 3b0760f8789d5d4bd146b36bd9051696d7a56bfa + 7a6fb6528b2060cd9e3a3d92535f5b6fdc6b2e82 - + https://github.com/dotnet/arcade - 3b0760f8789d5d4bd146b36bd9051696d7a56bfa + 7a6fb6528b2060cd9e3a3d92535f5b6fdc6b2e82 - + https://github.com/dotnet/arcade - 3b0760f8789d5d4bd146b36bd9051696d7a56bfa + 7a6fb6528b2060cd9e3a3d92535f5b6fdc6b2e82 https://dev.azure.com/dnceng/internal/_git/dotnet-optimization diff --git a/eng/Versions.props b/eng/Versions.props index 2b401d5e6947..ae6e9dfba472 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -23,18 +23,18 @@ - 1.0.0-beta.19270.2 - 1.0.0-beta.19270.2 - 1.0.0-beta.19270.2 - 1.0.0-beta.19270.2 - 2.4.0-beta.19270.2 - 2.5.1-beta.19270.2 - 1.0.0-beta.19270.2 - 1.0.0-beta.19270.2 - 1.0.0-beta.19270.2 - 1.0.0-beta.19270.2 - 2.2.0-beta.19270.2 - 1.0.0-beta.19270.2 + 1.0.0-beta.19271.7 + 1.0.0-beta.19271.7 + 1.0.0-beta.19271.7 + 1.0.0-beta.19271.7 + 2.4.0-beta.19271.7 + 2.5.1-beta.19271.7 + 1.0.0-beta.19271.7 + 1.0.0-beta.19271.7 + 1.0.0-beta.19271.7 + 1.0.0-beta.19271.7 + 2.2.0-beta.19271.7 + 1.0.0-beta.19271.7 3.0.0-preview6-27720-09 3.0.0-preview6-27720-09 diff --git a/eng/common/build.sh b/eng/common/build.sh index ce846d888df3..6236fc4d38cd 100755 --- a/eng/common/build.sh +++ b/eng/common/build.sh @@ -66,6 +66,7 @@ ci=false warn_as_error=true node_reuse=true binary_log=false +pipelines_log=false projects='' configuration='Debug' @@ -92,6 +93,9 @@ while [[ $# > 0 ]]; do -binarylog|-bl) binary_log=true ;; + -pipelineslog|-pl) + pipelines_log=true + ;; -restore|-r) restore=true ;; @@ -146,6 +150,7 @@ while [[ $# > 0 ]]; do done if [[ "$ci" == true ]]; then + pipelines_log=true binary_log=true node_reuse=false fi diff --git a/eng/common/tools.ps1 b/eng/common/tools.ps1 index 9ca177b82a34..9cea610a27f5 100644 --- a/eng/common/tools.ps1 +++ b/eng/common/tools.ps1 @@ -213,7 +213,11 @@ function InitializeVisualStudioMSBuild([bool]$install, [object]$vsRequirements = if ($env:VSINSTALLDIR -ne $null) { $msbuildCmd = Get-Command "msbuild.exe" -ErrorAction SilentlyContinue if ($msbuildCmd -ne $null) { - if ($msbuildCmd.Version -ge $vsMinVersion) { + # Workaround for https://github.com/dotnet/roslyn/issues/35793 + # Due to this issue $msbuildCmd.Version returns 0.0.0.0 for msbuild.exe 16.2+ + $msbuildVersion = [Version]::new((Get-Item $msbuildCmd.Path).VersionInfo.ProductVersion.Split(@('-', '+'))[0]) + + if ($msbuildVersion -ge $vsMinVersion) { return $global:_MSBuildExe = $msbuildCmd.Path } diff --git a/eng/common/tools.sh b/eng/common/tools.sh index df3eb8bce075..34a23e9476d4 100644 --- a/eng/common/tools.sh +++ b/eng/common/tools.sh @@ -1,8 +1,20 @@ +#!/usr/bin/env bash + # Initialize variables if they aren't already defined. # CI mode - set to true on CI server for PR validation build or official build. ci=${ci:-false} +# Set to true to use the pipelines logger which will enable Azure logging output. +# https://github.com/Microsoft/azure-pipelines-tasks/blob/master/docs/authoring/commands.md +# This flag is meant as a temporary opt-opt for the feature while validate it across +# our consumers. It will be deleted in the future. +if [[ "$ci" == true ]]; then + pipelines_log=${pipelines_log:-true} +else + pipelines_log=${pipelines_log:-false} +fi + # Build configuration. Common values include 'Debug' and 'Release', but the repository may use other names. configuration=${configuration:-'Debug'} @@ -40,6 +52,78 @@ else use_global_nuget_cache=${use_global_nuget_cache:-true} fi +function EmitError { + if [[ "$ci" != true ]]; then + echo "$@" >&2 + return + fi + + message_type="error" + sourcepath='' + linenumber='' + columnnumber='' + error_code='' + + while [[ $# -gt 0 ]]; do + opt="$(echo "${1/#--/-}" | awk '{print tolower($0)}')" + case "$opt" in + -type|-t) + message_type=$2 + shift + ;; + -sourcepath|-s) + sourcepath=$2 + shift + ;; + -linenumber|-l) + linenumber=$2 + shift + ;; + -columnnumber|-col) + columnnumber=$2 + shift + ;; + -code|-c) + error_code=$2 + shift + ;; + *) + break + ;; + esac + + shift + done + + message='##vso[task.logissue' + + message="$message type=$message_type" + + if [ -n "$sourcepath" ]; then + message="$message;sourcepath=$sourcepath" + else + message="$message;sourcepath=${BASH_SOURCE[1]}" + fi + + if [ -n "$linenumber" ]; then + message="$message;linenumber=$linenumber" + else + message="$message;linenumber=${BASH_LINENO[0]}" + fi + + if [ -n "$columnnumber" ]; then + message="$message;columnnumber=$columnnumber" + fi + + if [ -n "$error_code" ]; then + message="$message;code=$error_code" + fi + + message="$message]$*" + + echo "$message" +} + # Resolve any symlinks in the given path. function ResolvePath { local path=$1 @@ -65,7 +149,7 @@ function ReadGlobalVersion { local pattern="\"$key\" *: *\"(.*)\"" if [[ ! $line =~ $pattern ]]; then - echo "Error: Cannot find \"$key\" in $global_json_file" >&2 + EmitError "Error: Cannot find \"$key\" in $global_json_file" ExitWithExitCode 1 fi @@ -126,7 +210,7 @@ function InitializeDotNetCli { if [[ "$install" == true ]]; then InstallDotNetSdk "$dotnet_root" "$dotnet_sdk_version" else - echo "Unable to find dotnet with SDK version '$dotnet_sdk_version'" >&2 + EmitError "Unable to find dotnet with SDK version '$dotnet_sdk_version'" ExitWithExitCode 1 fi fi @@ -179,7 +263,7 @@ function InstallDotNet { fi bash "$install_script" --version $version --install-dir "$root" $archArg $runtimeArg $skipNonVersionedFilesArg || { local exit_code=$? - echo "Failed to install dotnet SDK (exit code '$exit_code')." >&2 + EmitError "Failed to install dotnet SDK (exit code '$exit_code')." ExitWithExitCode $exit_code } } @@ -216,6 +300,7 @@ function InitializeBuildTool { # return values _InitializeBuildTool="$_InitializeDotNetCli/dotnet" _InitializeBuildToolCommand="msbuild" + _InitializeBuildToolFramework="netcoreapp2.1" } function GetNuGetPackageCachePath { @@ -264,7 +349,7 @@ function InitializeToolset { fi if [[ "$restore" != true ]]; then - echo "Toolset version $toolsetVersion has not been restored." >&2 + EmitError "Toolset version $toolsetVersion has not been restored." ExitWithExitCode 2 fi @@ -276,12 +361,12 @@ function InitializeToolset { fi echo '' > "$proj" - MSBuild "$proj" $bl /t:__WriteToolsetLocation /clp:ErrorsOnly\;NoSummary /p:__ToolsetLocationOutputFile="$toolset_location_file" + MSBuild-Core "$proj" $bl /t:__WriteToolsetLocation /clp:ErrorsOnly\;NoSummary /p:__ToolsetLocationOutputFile="$toolset_location_file" local toolset_build_proj=`cat "$toolset_location_file"` if [[ ! -a "$toolset_build_proj" ]]; then - echo "Invalid toolset path: $toolset_build_proj" >&2 + EmitError "Invalid toolset path: $toolset_build_proj" ExitWithExitCode 3 fi @@ -304,14 +389,26 @@ function StopProcesses { } function MSBuild { + args=$@ + if [[ "$pipelines_log" == true ]]; then + InitializeBuildTool + InitializeToolset + _toolset_dir="${_InitializeToolset%/*}" + _loggerPath="$_toolset_dir/$_InitializeBuildToolFramework/Microsoft.DotNet.Arcade.Sdk.dll" + args=( "${args[@]}" "-logger:$_loggerPath" ) + fi + MSBuild-Core ${args[@]} +} + +function MSBuild-Core { if [[ "$ci" == true ]]; then if [[ "$binary_log" != true ]]; then - echo "Binary log must be enabled in CI build." >&2 + EmitError "Binary log must be enabled in CI build." ExitWithExitCode 1 fi if [[ "$node_reuse" == true ]]; then - echo "Node reuse must be disabled in CI build." >&2 + EmitError "Node reuse must be disabled in CI build." ExitWithExitCode 1 fi fi @@ -325,7 +422,7 @@ function MSBuild { "$_InitializeBuildTool" "$_InitializeBuildToolCommand" /m /nologo /clp:Summary /v:$verbosity /nr:$node_reuse $warnaserror_switch /p:TreatWarningsAsErrors=$warn_as_error /p:ContinuousIntegrationBuild=$ci "$@" || { local exit_code=$? - echo "Build failed (exit code '$exit_code')." >&2 + EmitError "Build failed (exit code '$exit_code')." ExitWithExitCode $exit_code } } diff --git a/global.json b/global.json index 787d8ffa315d..6a5a3875a803 100644 --- a/global.json +++ b/global.json @@ -3,8 +3,8 @@ "dotnet": "3.0.100-preview6-011681" }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19270.2", - "Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19270.2", + "Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19271.7", + "Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19271.7", "FIX-85B6-MERGE-9C38-CONFLICT": "1.0.0", "Microsoft.NET.Sdk.IL": "3.0.0-preview6-27721-71" } From 39315f80b9464734bec1c853836556503fbbe576 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Wed, 22 May 2019 15:04:14 +0000 Subject: [PATCH 467/607] [master] Update dependencies from dotnet/standard (#37847) * Update dependencies from https://github.com/dotnet/standard build 20190520.2 - NETStandard.Library - 2.1.0-prerelease.19270.2 * Update dependencies from https://github.com/dotnet/standard build 20190520.3 - NETStandard.Library - 2.1.0-prerelease.19270.3 * Update dependencies from https://github.com/dotnet/standard build 20190521.1 - NETStandard.Library - 2.1.0-prerelease.19271.1 * Update dependencies from https://github.com/dotnet/standard build 20190521.2 - NETStandard.Library - 2.1.0-prerelease.19271.2 * Update dependencies from https://github.com/dotnet/standard build 20190521.3 - NETStandard.Library - 2.1.0-prerelease.19271.3 * Update dependencies from https://github.com/dotnet/standard build 20190522.1 - NETStandard.Library - 2.1.0-prerelease.19272.1 --- eng/Version.Details.xml | 4 ++-- eng/Versions.props | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 0f93a92cb311..c9c75e429474 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -38,9 +38,9 @@ https://github.com/dotnet/arcade 7a6fb6528b2060cd9e3a3d92535f5b6fdc6b2e82 - + https://github.com/dotnet/standard - 2f630cd85d291fbace35b5d047c19504637322e5 + d5646858d613d440153429e1519233b56a979eea https://github.com/dotnet/arcade diff --git a/eng/Versions.props b/eng/Versions.props index ae6e9dfba472..dc1784187720 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -46,7 +46,7 @@ 3.0.0-preview6.19271.9 4.6.0-preview6.19271.9 - 2.1.0-prerelease.19270.1 + 2.1.0-prerelease.19272.1 99.99.99-master-20190521.3 From 23d3b1b5bd5fc97f2d96a0c5a63fa14657607b63 Mon Sep 17 00:00:00 2001 From: Karel Zikmund Date: Wed, 22 May 2019 11:26:23 -0700 Subject: [PATCH 468/607] Update area owners for System.IO.Pipelines --- Documentation/project-docs/issue-guide.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/project-docs/issue-guide.md b/Documentation/project-docs/issue-guide.md index 3420ffd1114b..c766317c39d8 100644 --- a/Documentation/project-docs/issue-guide.md +++ b/Documentation/project-docs/issue-guide.md @@ -65,7 +65,7 @@ Areas are tracked by labels area-* (e.g. area-System.Collections). Each area | [System.IO](https://github.com/dotnet/corefx/labels/area-System.IO) | **[@JeremyKuhne](https://github.com/JeremyKuhne)**, [@carlossanlop](https://github.com/carlossanlop) | | | [System.IO.Compression](https://github.com/dotnet/corefx/labels/area-System.IO.Compression) | **[@carlossanlop](https://github.com/carlossanlop)**, [@ahsonkhan](https://github.com/ahsonkhan), [@ViktorHofer](https://github.com/ViktorHofer) | | | [System.IO.Packaging](https://github.com/dotnet/corefx/labels/area-System.IO.Packaging) | [@JeremyKuhne](https://github.com/JeremyKuhne) | | -| [System.IO.Pipelines](https://github.com/dotnet/corefx/labels/area-System.IO.Pipelines) | **[@pakrym](https://github.com/pakrym)**, [@davidfowl](https://github.com/davidfowl) | | +| [System.IO.Pipelines](https://github.com/dotnet/corefx/labels/area-System.IO.Pipelines) | [@davidfowl](https://github.com/davidfowl), [@halter73](https://github.com/halter73), [@jkotalik](https://github.com/jkotalik), [@anurse](https://github.com/anurse) | | | [System.Linq](https://github.com/dotnet/corefx/labels/area-System.Linq) | [@maryamariyan](https://github.com/maryamariyan) | | | [System.Linq.Expressions](https://github.com/dotnet/corefx/labels/area-System.Linq.Expressions) | [@cston](https://github.com/cston), [@333fred](https://github.com/333fred) | Archived component - limited churn/contributions (see [#33170](https://github.com/dotnet/corefx/issues/33170)) | | [System.Linq.Parallel](https://github.com/dotnet/corefx/labels/area-System.Linq.Parallel) | **[@tarekgh](https://github.com/tarekgh)**, [@kouvel](https://github.com/kouvel) | | From 6f6790fa8219359f2acbe4b0624a3fa9a0a6943b Mon Sep 17 00:00:00 2001 From: Tomas Weinfurt Date: Wed, 22 May 2019 11:31:10 -0700 Subject: [PATCH 469/607] initial support for new network protocols (#37315) * initial support for new network protocols * feedback from review * fix compilation of AF_CAN --- .../src/System/Net/Sockets/ProtocolFamily.cs | 3 + .../Unix/System.Native/pal_networking.c | 160 +++++++++++++++--- .../Unix/System.Native/pal_networking.h | 17 +- .../ref/System.Net.Primitives.cs | 3 + .../src/System/Net/Sockets/AddressFamily.cs | 3 + .../ref/System.Net.Sockets.cs | 3 + .../FunctionalTests/CreateSocketTests.cs | 2 +- .../CreateSocketTests.netcoreapp.cs | 49 ++++++ .../System.Net.Sockets.Tests.csproj | 3 +- 9 files changed, 215 insertions(+), 28 deletions(-) create mode 100644 src/System.Net.Sockets/tests/FunctionalTests/CreateSocketTests.netcoreapp.cs diff --git a/src/Common/src/System/Net/Sockets/ProtocolFamily.cs b/src/Common/src/System/Net/Sockets/ProtocolFamily.cs index 735a73077e8c..513de2981c2b 100644 --- a/src/Common/src/System/Net/Sockets/ProtocolFamily.cs +++ b/src/Common/src/System/Net/Sockets/ProtocolFamily.cs @@ -42,5 +42,8 @@ public enum ProtocolFamily Irda = AddressFamily.Irda, NetworkDesigners = AddressFamily.NetworkDesigners, Max = 29, //AddressFamily.Max + Netlink = AddressFamily.Netlink, + Packet = AddressFamily.Packet, + ControllerAreaNetwork = AddressFamily.ControllerAreaNetwork, } } diff --git a/src/Native/Unix/System.Native/pal_networking.c b/src/Native/Unix/System.Native/pal_networking.c index 041214438a0f..273f3444fbc6 100644 --- a/src/Native/Unix/System.Native/pal_networking.c +++ b/src/Native/Unix/System.Native/pal_networking.c @@ -55,7 +55,9 @@ #include #endif #endif - +#ifdef AF_CAN +#include +#endif #if HAVE_KQUEUE #if KEVENT_HAS_VOID_UDATA static void* GetKeventUdata(uintptr_t udata) @@ -490,7 +492,21 @@ static bool TryConvertAddressFamilyPlatformToPal(sa_family_t platformAddressFami case AF_INET6: *palAddressFamily = AddressFamily_AF_INET6; return true; - +#ifdef AF_NETLINK + case AF_NETLINK: + *palAddressFamily = AddressFamily_AF_NETLINK; + return true; +#endif +#ifdef AF_PACKET + case AF_PACKET: + *palAddressFamily = AddressFamily_AF_PACKET; + return true; +#endif +#ifdef AF_CAN + case AF_CAN: + *palAddressFamily = AddressFamily_AF_CAN; + return true; +#endif default: *palAddressFamily = platformAddressFamily; return false; @@ -518,7 +534,16 @@ static bool TryConvertAddressFamilyPalToPlatform(int32_t palAddressFamily, sa_fa case AddressFamily_AF_INET6: *platformAddressFamily = AF_INET6; return true; - +#ifdef AF_PACKET + case AddressFamily_AF_PACKET: + *platformAddressFamily = AF_PACKET; + return true; +#endif +#ifdef AF_CAN + case AddressFamily_AF_CAN: + *platformAddressFamily = AF_CAN; + return true; +#endif default: *platformAddressFamily = (sa_family_t)palAddressFamily; return false; @@ -1920,35 +1945,126 @@ static bool TryConvertSocketTypePalToPlatform(int32_t palSocketType, int* platfo } } -static bool TryConvertProtocolTypePalToPlatform(int32_t palProtocolType, int* platformProtocolType) +static bool TryConvertProtocolTypePalToPlatform(int32_t palAddressFamily, int32_t palProtocolType, int* platformProtocolType) { assert(platformProtocolType != NULL); - switch (palProtocolType) + switch(palAddressFamily) { - case ProtocolType_PT_UNSPECIFIED: - *platformProtocolType = 0; +#ifdef AF_PACKET + case AddressFamily_AF_PACKET: + // protocol is the IEEE 802.3 protocol number in network order. + *platformProtocolType = palProtocolType; return true; +#endif +#ifdef AF_CAN + case AddressFamily_AF_CAN: + switch (palProtocolType) + { + case ProtocolType_PT_UNSPECIFIED: + *platformProtocolType = 0; + return true; - case ProtocolType_PT_ICMP: - *platformProtocolType = IPPROTO_ICMP; - return true; + case ProtocolType_PT_RAW: + *platformProtocolType = CAN_RAW; + return true; - case ProtocolType_PT_TCP: - *platformProtocolType = IPPROTO_TCP; - return true; + default: + *platformProtocolType = (int)palProtocolType; + return false; + } +#endif + case AddressFamily_AF_INET: + switch (palProtocolType) + { + case ProtocolType_PT_UNSPECIFIED: + *platformProtocolType = 0; + return true; - case ProtocolType_PT_UDP: - *platformProtocolType = IPPROTO_UDP; - return true; + case ProtocolType_PT_ICMP: + *platformProtocolType = IPPROTO_ICMP; + return true; - case ProtocolType_PT_ICMPV6: - *platformProtocolType = IPPROTO_ICMPV6; - return true; + case ProtocolType_PT_TCP: + *platformProtocolType = IPPROTO_TCP; + return true; + + case ProtocolType_PT_UDP: + *platformProtocolType = IPPROTO_UDP; + return true; + + case ProtocolType_PT_IGMP: + *platformProtocolType = IPPROTO_IGMP; + return true; + + case ProtocolType_PT_RAW: + *platformProtocolType = IPPROTO_RAW; + return true; + + default: + *platformProtocolType = (int)palProtocolType; + return false; + } + + case AddressFamily_AF_INET6: + switch (palProtocolType) + { + case ProtocolType_PT_UNSPECIFIED: + *platformProtocolType = 0; + return true; + + case ProtocolType_PT_ICMPV6: + case ProtocolType_PT_ICMP: + *platformProtocolType = IPPROTO_ICMPV6; + return true; + + case ProtocolType_PT_TCP: + *platformProtocolType = IPPROTO_TCP; + return true; + + case ProtocolType_PT_UDP: + *platformProtocolType = IPPROTO_UDP; + return true; + + case ProtocolType_PT_IGMP: + *platformProtocolType = IPPROTO_IGMP; + return true; + + case ProtocolType_PT_RAW: + *platformProtocolType = IPPROTO_RAW; + return true; + + case ProtocolType_PT_DSTOPTS: + *platformProtocolType = IPPROTO_DSTOPTS; + return true; + + case ProtocolType_PT_NONE: + *platformProtocolType = IPPROTO_NONE; + return true; + + case ProtocolType_PT_ROUTING: + *platformProtocolType = IPPROTO_ROUTING; + return true; + + case ProtocolType_PT_FRAGMENT: + *platformProtocolType = IPPROTO_FRAGMENT; + return true; + + default: + *platformProtocolType = (int)palProtocolType; + return false; + } default: - *platformProtocolType = (int)palProtocolType; - return false; + switch (palProtocolType) + { + case ProtocolType_PT_UNSPECIFIED: + *platformProtocolType = 0; + return true; + default: + *platformProtocolType = (int)palProtocolType; + return false; + } } } @@ -1974,7 +2090,7 @@ int32_t SystemNative_Socket(int32_t addressFamily, int32_t socketType, int32_t p return Error_EPROTOTYPE; } - if (!TryConvertProtocolTypePalToPlatform(protocolType, &platformProtocolType)) + if (!TryConvertProtocolTypePalToPlatform(addressFamily, protocolType, &platformProtocolType)) { *createdSocket = -1; return Error_EPROTONOSUPPORT; diff --git a/src/Native/Unix/System.Native/pal_networking.h b/src/Native/Unix/System.Native/pal_networking.h index 9bb8072350a1..e739dd1ba442 100644 --- a/src/Native/Unix/System.Native/pal_networking.h +++ b/src/Native/Unix/System.Native/pal_networking.h @@ -56,10 +56,13 @@ typedef enum */ typedef enum { - AddressFamily_AF_UNSPEC = 0, // System.Net.AddressFamily.Unspecified - AddressFamily_AF_UNIX = 1, // System.Net.AddressFamily.Unix - AddressFamily_AF_INET = 2, // System.Net.AddressFamily.InterNetwork - AddressFamily_AF_INET6 = 23, // System.Net.AddressFamily.InterNetworkV6 + AddressFamily_AF_UNSPEC = 0, // System.Net.AddressFamily.Unspecified + AddressFamily_AF_UNIX = 1, // System.Net.AddressFamily.Unix + AddressFamily_AF_INET = 2, // System.Net.AddressFamily.InterNetwork + AddressFamily_AF_INET6 = 23, // System.Net.AddressFamily.InterNetworkV6 + AddressFamily_AF_NETLINK = 30, // System.Net.AddressFamily.Netlink + AddressFamily_AF_PACKET = 31, // System.Net.AddressFamily.Packet + AddressFamily_AF_CAN = 32, // System.Net.AddressFamily.ControllerAreaNetwork } AddressFamily; /* @@ -88,6 +91,12 @@ typedef enum ProtocolType_PT_TCP = 6, // System.Net.ProtocolType.Tcp ProtocolType_PT_UDP = 17, // System.Net.ProtocolType.Udp ProtocolType_PT_ICMPV6 = 58, // System.Net.ProtocolType.IcmpV6 + ProtocolType_PT_RAW = 255, // System.Net.ProtocolType.Raw + ProtocolType_PT_IGMP = 2, // System.Net.ProtocolType.Igmp + ProtocolType_PT_NONE = 59, // System.Net.ProtocolType.IPv6NoNextHeader + ProtocolType_PT_DSTOPTS = 60, // System.Net.ProtocolType.IPv6DestinationOptions + ProtocolType_PT_ROUTING = 43, // System.Net.ProtocolType.IPv6RoutingHeader + ProtocolType_PT_FRAGMENT = 44, // System.Net.ProtocolType.IPv6FragmentHeader } ProtocolType; typedef enum diff --git a/src/System.Net.Primitives/ref/System.Net.Primitives.cs b/src/System.Net.Primitives/ref/System.Net.Primitives.cs index 9df357f9524e..d2eda860c1d3 100644 --- a/src/System.Net.Primitives/ref/System.Net.Primitives.cs +++ b/src/System.Net.Primitives/ref/System.Net.Primitives.cs @@ -403,6 +403,9 @@ public enum AddressFamily Irda = 26, NetworkDesigners = 28, Max = 29, + Netlink = 30, + Packet = 31, + ControllerAreaNetwork = 32, } public enum SocketError { diff --git a/src/System.Net.Primitives/src/System/Net/Sockets/AddressFamily.cs b/src/System.Net.Primitives/src/System/Net/Sockets/AddressFamily.cs index e3719f46e213..157655946dd6 100644 --- a/src/System.Net.Primitives/src/System/Net/Sockets/AddressFamily.cs +++ b/src/System.Net.Primitives/src/System/Net/Sockets/AddressFamily.cs @@ -43,5 +43,8 @@ public enum AddressFamily Irda = 26, // IrDA NetworkDesigners = 28, // Network Designers OSI & gateway enabled protocols Max = 29, // Max + Netlink = 30, // Netlink protocol + Packet = 31, // Linux Packet + ControllerAreaNetwork = 32, // Controller Area Network automotive bus protocol } } diff --git a/src/System.Net.Sockets/ref/System.Net.Sockets.cs b/src/System.Net.Sockets/ref/System.Net.Sockets.cs index b9e09c5a4d9c..cd011f033108 100644 --- a/src/System.Net.Sockets/ref/System.Net.Sockets.cs +++ b/src/System.Net.Sockets/ref/System.Net.Sockets.cs @@ -156,6 +156,9 @@ public enum ProtocolFamily Irda = 26, NetworkDesigners = 28, Max = 29, + Netlink = 30, + Packet = 31, + ControllerAreaNetwork = 32, } public enum ProtocolType { diff --git a/src/System.Net.Sockets/tests/FunctionalTests/CreateSocketTests.cs b/src/System.Net.Sockets/tests/FunctionalTests/CreateSocketTests.cs index 819344dce7f2..a4aa95b2e16b 100644 --- a/src/System.Net.Sockets/tests/FunctionalTests/CreateSocketTests.cs +++ b/src/System.Net.Sockets/tests/FunctionalTests/CreateSocketTests.cs @@ -11,7 +11,7 @@ namespace System.Net.Sockets.Tests { - public class CreateSocket + public partial class CreateSocket { public static object[][] DualModeSuccessInputs = { new object[] { SocketType.Stream, ProtocolType.Tcp }, diff --git a/src/System.Net.Sockets/tests/FunctionalTests/CreateSocketTests.netcoreapp.cs b/src/System.Net.Sockets/tests/FunctionalTests/CreateSocketTests.netcoreapp.cs new file mode 100644 index 000000000000..2aef05129709 --- /dev/null +++ b/src/System.Net.Sockets/tests/FunctionalTests/CreateSocketTests.netcoreapp.cs @@ -0,0 +1,49 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Diagnostics; +using System.IO; +using System.IO.Pipes; +using System.Threading.Tasks; +using Microsoft.DotNet.RemoteExecutor; +using Xunit; + +namespace System.Net.Sockets.Tests +{ + public partial class CreateSocket + { + [Theory] + [InlineData(AddressFamily.Netlink)] + [InlineData(AddressFamily.Packet)] + [InlineData(AddressFamily.ControllerAreaNetwork)] + [PlatformSpecific(~TestPlatforms.Linux)] + public void Ctor_Netcoreapp_Throws(AddressFamily addressFamily) + { + // All protocols are Linux specific and throw on other platforms + Assert.Throws(() => new Socket(addressFamily, SocketType.Raw, 0)); + } + + [Theory] + [InlineData(AddressFamily.Netlink)] + [InlineData(AddressFamily.Packet)] + [InlineData(AddressFamily.ControllerAreaNetwork)] + [PlatformSpecific(TestPlatforms.Linux)] + public void Ctor_Netcoreapp_Success(AddressFamily addressFamily) + { + Socket s = null; + try + { + s = new Socket(addressFamily, SocketType.Raw, ProtocolType.Raw); + } + catch (SocketException e) when (e.SocketErrorCode == SocketError.AccessDenied || + e.SocketErrorCode == SocketError.ProtocolNotSupported || + e.SocketErrorCode == SocketError.AddressFamilyNotSupported) + { + // Ignore. We may not have privilege or protocol modules are not loaded. + return; + } + s.Close(); + } + } +} diff --git a/src/System.Net.Sockets/tests/FunctionalTests/System.Net.Sockets.Tests.csproj b/src/System.Net.Sockets/tests/FunctionalTests/System.Net.Sockets.Tests.csproj index cac7453960c1..dcb4cf8bf17f 100644 --- a/src/System.Net.Sockets/tests/FunctionalTests/System.Net.Sockets.Tests.csproj +++ b/src/System.Net.Sockets/tests/FunctionalTests/System.Net.Sockets.Tests.csproj @@ -14,6 +14,7 @@ + @@ -115,4 +116,4 @@ - \ No newline at end of file + From 40197abf52c92572a3cdb2005d6250eae9b8a9f9 Mon Sep 17 00:00:00 2001 From: Karel Zikmund Date: Wed, 22 May 2019 11:35:49 -0700 Subject: [PATCH 470/607] Update issue-guide.md Adding Cory --- Documentation/project-docs/issue-guide.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Documentation/project-docs/issue-guide.md b/Documentation/project-docs/issue-guide.md index c766317c39d8..945d69044bc5 100644 --- a/Documentation/project-docs/issue-guide.md +++ b/Documentation/project-docs/issue-guide.md @@ -71,11 +71,11 @@ Areas are tracked by labels area-* (e.g. area-System.Collections). Each area | [System.Linq.Parallel](https://github.com/dotnet/corefx/labels/area-System.Linq.Parallel) | **[@tarekgh](https://github.com/tarekgh)**, [@kouvel](https://github.com/kouvel) | | | [System.Management](https://github.com/dotnet/corefx/labels/area-System.Management) | [@Anipik](https://github.com/Anipik) | WMI | | [System.Memory](https://github.com/dotnet/corefx/labels/area-System.Memory) | [@ahsonkhan](https://github.com/ahsonkhan) | | -| [System.Net](https://github.com/dotnet/corefx/labels/area-System.Net) | [@davidsh](https://github.com/davidsh), [@wfurt](https://github.com/wfurt), [@karelz](https://github.com/karelz) | Included:
  • System.Uri - [@wtgodbe](https://github.com/wtgodbe)
| -| [System.Net.Http](https://github.com/dotnet/corefx/labels/area-System.Net.Http) | [@davidsh](https://github.com/davidsh), [@wfurt](https://github.com/wfurt), [@karelz](https://github.com/karelz) | | -| [System.Net.Http.SocketsHttpHandler](https://github.com/dotnet/corefx/labels/area-System.Net.Http.SocketsHttpHandler) | [@geoffkizer](https://github.com/geoffkizer), [@wfurt](https://github.com/wfurt), [@davidsh](https://github.com/davidsh), [@karelz](https://github.com/karelz) | | -| [System.Net.Security](https://github.com/dotnet/corefx/labels/area-System.Net.Security) | [@davidsh](https://github.com/davidsh), [@wfurt](https://github.com/wfurt), [@karelz](https://github.com/karelz) | | -| [System.Net.Sockets](https://github.com/dotnet/corefx/labels/area-System.Net.Sockets) | [@davidsh](https://github.com/davidsh), [@wfurt](https://github.com/wfurt), [@karelz](https://github.com/karelz) | | +| [System.Net](https://github.com/dotnet/corefx/labels/area-System.Net) | [@davidsh](https://github.com/davidsh), [@wfurt](https://github.com/wfurt), [@scalablecory](https://github.com/scalablecory), [@karelz](https://github.com/karelz) | Included:
  • System.Uri - [@wtgodbe](https://github.com/wtgodbe)
| +| [System.Net.Http](https://github.com/dotnet/corefx/labels/area-System.Net.Http) | [@davidsh](https://github.com/davidsh), [@wfurt](https://github.com/wfurt), [@scalablecory](https://github.com/scalablecory), [@karelz](https://github.com/karelz) | | +| [System.Net.Http.SocketsHttpHandler](https://github.com/dotnet/corefx/labels/area-System.Net.Http.SocketsHttpHandler) | [@geoffkizer](https://github.com/geoffkizer), [@wfurt](https://github.com/wfurt), [@davidsh](https://github.com/davidsh), [@scalablecory](https://github.com/scalablecory), [@karelz](https://github.com/karelz) | | +| [System.Net.Security](https://github.com/dotnet/corefx/labels/area-System.Net.Security) | [@davidsh](https://github.com/davidsh), [@wfurt](https://github.com/wfurt), [@scalablecory](https://github.com/scalablecory), [@karelz](https://github.com/karelz) | | +| [System.Net.Sockets](https://github.com/dotnet/corefx/labels/area-System.Net.Sockets) | [@davidsh](https://github.com/davidsh), [@wfurt](https://github.com/wfurt), [@scalablecory](https://github.com/scalablecory), [@karelz](https://github.com/karelz) | | | [System.Numerics](https://github.com/dotnet/corefx/labels/area-System.Numerics) | [@tannergooding](https://github.com/tannergooding), [@ViktorHofer](https://github.com/ViktorHofer) | | | [System.Numerics.Tensors](https://github.com/dotnet/corefx/labels/area-System.Numerics.Tensors) | [@tannergooding](https://github.com/tannergooding) | | | [System.Reflection](https://github.com/dotnet/corefx/labels/area-System.Reflection) | [@steveharter](https://github.com/steveharter), [@GrabYourPitchforks](https://github.com/GrabYourPitchforks) | | From a28444b71a45171c07eb28a5d82086a4589665fe Mon Sep 17 00:00:00 2001 From: Krzysztof Wicher Date: Wed, 22 May 2019 12:30:44 -0700 Subject: [PATCH 471/607] Fix threading issue when reading and writing from SslStream at the same time (#37736) --- .../Interop.OpenSsl.cs | 41 +++++++++++++------ 1 file changed, 29 insertions(+), 12 deletions(-) diff --git a/src/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.OpenSsl.cs b/src/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.OpenSsl.cs index cff89e4173ef..4d82a7ddddfe 100644 --- a/src/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.OpenSsl.cs +++ b/src/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.OpenSsl.cs @@ -317,17 +317,26 @@ internal static int Encrypt(SafeSslHandle context, ReadOnlyMemory input, r errorCode = Ssl.SslErrorCode.SSL_ERROR_NONE; int retVal; - unsafe + Exception innerError = null; + + lock (context) { - using (MemoryHandle handle = input.Pin()) + unsafe + { + using (MemoryHandle handle = input.Pin()) + { + retVal = Ssl.SslWrite(context, (byte*)handle.Pointer, input.Length); + } + } + + if (retVal != input.Length) { - retVal = Ssl.SslWrite(context, (byte*)handle.Pointer, input.Length); + errorCode = GetSslError(context, retVal, out innerError); } } if (retVal != input.Length) { - errorCode = GetSslError(context, retVal, out Exception innerError); retVal = 0; switch (errorCode) @@ -351,6 +360,7 @@ internal static int Encrypt(SafeSslHandle context, ReadOnlyMemory input, r } retVal = BioRead(context.OutputBio, output, capacityNeeded); + if (retVal <= 0) { // Make sure we clear out the error that is stored in the queue @@ -370,27 +380,34 @@ internal static int Decrypt(SafeSslHandle context, byte[] outBuffer, int offset, errorCode = Ssl.SslErrorCode.SSL_ERROR_NONE; int retVal = BioWrite(context.InputBio, outBuffer, offset, count); + Exception innerError = null; - if (retVal == count) + lock (context) { - unsafe + if (retVal == count) { - fixed (byte* fixedBuffer = outBuffer) + unsafe + { + fixed (byte* fixedBuffer = outBuffer) + { + retVal = Ssl.SslRead(context, fixedBuffer + offset, outBuffer.Length); + } + } + + if (retVal > 0) { - retVal = Ssl.SslRead(context, fixedBuffer + offset, outBuffer.Length); + count = retVal; } } - if (retVal > 0) + if (retVal != count) { - count = retVal; + errorCode = GetSslError(context, retVal, out innerError); } } if (retVal != count) { - Exception innerError; - errorCode = GetSslError(context, retVal, out innerError); retVal = 0; switch (errorCode) From eae78cbe0c786be62f58ae480b8f3c55bca7fd30 Mon Sep 17 00:00:00 2001 From: Viktor Hofer Date: Wed, 22 May 2019 13:10:23 -0700 Subject: [PATCH 472/607] Fix powershell command invocation for test (#37871) --- eng/build.ps1 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/eng/build.ps1 b/eng/build.ps1 index b24eb414cec1..e459efa38805 100644 --- a/eng/build.ps1 +++ b/eng/build.ps1 @@ -1,6 +1,7 @@ [CmdletBinding(PositionalBinding=$false)] Param( [switch][Alias('b')]$build, + [switch][Alias('t')]$test, [switch] $buildtests, [string][Alias('c')]$configuration = "Debug", [string][Alias('f')]$framework, @@ -93,6 +94,8 @@ foreach ($argument in $PSBoundParameters.Keys) { switch($argument) { + "build" { $arguments += " -build" } + "test" { $arguments += " -test" } "buildtests" { $arguments += " /p:BuildTests=true" } "clean" { } "configuration" { $configuration = (Get-Culture).TextInfo.ToTitleCase($($PSBoundParameters[$argument])); $arguments += " /p:ConfigurationGroup=$configuration -configuration $configuration" } From c8e1416eb6801c782e98bf6fff8e0110bde5011c Mon Sep 17 00:00:00 2001 From: Viktor Hofer Date: Wed, 22 May 2019 15:50:06 -0700 Subject: [PATCH 473/607] Use netfx ref package from nuget (#37869) --- pkg/test/frameworkSettings/net/settings.targets | 2 +- pkg/test/packageTest.targets | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/pkg/test/frameworkSettings/net/settings.targets b/pkg/test/frameworkSettings/net/settings.targets index 25b7f5936bc7..b7ee4126aa5d 100644 --- a/pkg/test/frameworkSettings/net/settings.targets +++ b/pkg/test/frameworkSettings/net/settings.targets @@ -8,7 +8,7 @@ - + diff --git a/pkg/test/packageTest.targets b/pkg/test/packageTest.targets index 6657dfc63b58..f3e2d7efa671 100644 --- a/pkg/test/packageTest.targets +++ b/pkg/test/packageTest.targets @@ -8,7 +8,6 @@ https://api.nuget.org/v3/index.json; https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json; - https://dotnet.myget.org/F/roslyn-tools/api/v3/index.json; $(LocalPackagesPath) From 9963d520d38caf5318356a08c4a3b08f904d2b26 Mon Sep 17 00:00:00 2001 From: Viktor Hofer Date: Wed, 22 May 2019 15:56:13 -0700 Subject: [PATCH 474/607] Remove LanguageTargets switch (#37875) --- Directory.Build.props | 10 +--------- Directory.Build.targets | 15 --------------- eng/dir.traversal.targets | 26 -------------------------- eng/references.props | 10 ++++++++++ src/Directory.Build.props | 7 ------- src/Directory.Build.targets | 4 ---- 6 files changed, 11 insertions(+), 61 deletions(-) create mode 100644 eng/references.props diff --git a/Directory.Build.props b/Directory.Build.props index 29b4f0b89d19..f0b8c1f7861a 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -116,12 +116,6 @@ $([MSBuild]::NormalizeDirectory('$(RepoRoot)', 'src')) - - - $(MSBuildToolsPath)\Microsoft.Common.targets - - true @@ -417,9 +411,6 @@ - - true - true @@ -433,6 +424,7 @@ true + diff --git a/Directory.Build.targets b/Directory.Build.targets index ce2aa3e441f9..8923127a4df6 100644 --- a/Directory.Build.targets +++ b/Directory.Build.targets @@ -127,24 +127,9 @@ - - - - - - - - - - - - - - diff --git a/eng/dir.traversal.targets b/eng/dir.traversal.targets index c9bbb50c019e..8d156b5ba682 100644 --- a/eng/dir.traversal.targets +++ b/eng/dir.traversal.targets @@ -1,32 +1,6 @@ - - - - - - - - - - - - - - - - $(MSBuildProjectDefaultTargets) diff --git a/eng/references.props b/eng/references.props new file mode 100644 index 000000000000..9c65f4210c84 --- /dev/null +++ b/eng/references.props @@ -0,0 +1,10 @@ + + + + $(AssemblySearchPaths);$(RefPath);{RawFileName} + + \ No newline at end of file diff --git a/src/Directory.Build.props b/src/Directory.Build.props index 8954f39e33c8..4b144e22e998 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -12,13 +12,6 @@ false $(MSBuildThisFileDirectory)CodeAnalysis.ruleset - - - $(AssemblySearchPaths);$(RefPath);{RawFileName} diff --git a/src/Directory.Build.targets b/src/Directory.Build.targets index 3fb5559c6aca..86930b55959a 100644 --- a/src/Directory.Build.targets +++ b/src/Directory.Build.targets @@ -62,10 +62,6 @@ - - - - From 44df70fbd94308e7df156694e03db6e17fe244e8 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Thu, 23 May 2019 03:10:49 +0200 Subject: [PATCH 475/607] Update dependencies from https://github.com/dotnet/standard build 20190522.2 (#37878) - NETStandard.Library - 2.1.0-prerelease.19272.2 --- eng/Version.Details.xml | 4 ++-- eng/Versions.props | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index c9c75e429474..46effc1c72e5 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -38,9 +38,9 @@ https://github.com/dotnet/arcade 7a6fb6528b2060cd9e3a3d92535f5b6fdc6b2e82
- + https://github.com/dotnet/standard - d5646858d613d440153429e1519233b56a979eea + 8f6300e1f771d40dee4017f62ce885eb8251c322 https://github.com/dotnet/arcade diff --git a/eng/Versions.props b/eng/Versions.props index dc1784187720..71d1e7f4208d 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -46,7 +46,7 @@ 3.0.0-preview6.19271.9 4.6.0-preview6.19271.9 - 2.1.0-prerelease.19272.1 + 2.1.0-prerelease.19272.2 99.99.99-master-20190521.3 From 58c30f7413b93f47d332c8ec50a40013c3694791 Mon Sep 17 00:00:00 2001 From: Viktor Hofer Date: Wed, 22 May 2019 18:41:45 -0700 Subject: [PATCH 476/607] Use RepoTools instead of global tools (#37858) --- Directory.Build.props | 2 -- eng/Tools.props | 65 ------------------------------------------- eng/dotnet-tools.json | 18 ++++++++++++ eng/sendtohelix.proj | 55 ++++++++---------------------------- 4 files changed, 30 insertions(+), 110 deletions(-) create mode 100644 eng/dotnet-tools.json diff --git a/Directory.Build.props b/Directory.Build.props index f0b8c1f7861a..27afb8ae25ab 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -340,8 +340,6 @@ $(RefRootPath)netstandard/ $(RefRootPath)netstandard2.1/ $(RefRootPath)netfx/ - - $([MSBuild]::NormalizeDirectory('$(RepoRoot)', '.tools', 'globaltools')) $([MSBuild]::NormalizeDirectory('$(ArtifactsDir)', 'ibc')) $([MSBuild]::NormalizeDirectory('$(ArtifactsToolsetDir)', 'ilasm')) $([MSBuild]::NormalizeDirectory('$(ArtifactsToolsetDir)', 'ILLink')) diff --git a/eng/Tools.props b/eng/Tools.props index 2a40cd107f2f..9a4d77963508 100644 --- a/eng/Tools.props +++ b/eng/Tools.props @@ -47,73 +47,8 @@ - - - - - - - - - $([MSBuild]::NormalizeDirectory('$(RepoRoot)', '.tools', 'CredentialsProvider')) - https://raw.githubusercontent.com/Microsoft/artifacts-credprovider/master/helpers/installcredprovider.ps1 - https://raw.githubusercontent.com/Microsoft/artifacts-credprovider/master/helpers/installcredprovider.sh - - - - - - - - - - - $([MSBuild]::NormalizeDirectory('$(RepositoryEngineeringDir)', 'common', 'internal')) - $(OptionalToolDir)Tools.csproj - - - - - - - - - - - $([MSBuild]::NormalizePath('$(RepoRoot)', '.tools', 'globaltools')) - - - - - - - - - - - - - - - $(HelixCommand) /p:LocalPackagesPath="%HELIX_CORRELATION_PAYLOAD%\packages\ - - - true - - - + - call RunTests.cmd --runtime-path %HELIX_CORRELATION_PAYLOAD% --dotnet-root %HELIX_CORRELATION_PAYLOAD% - $(HelixCommand) --global-tools-dir "%HELIX_CORRELATION_PAYLOAD%\tools" - - - - ./RunTests.sh --runtime-path "$HELIX_CORRELATION_PAYLOAD" --dotnet-root "$HELIX_CORRELATION_PAYLOAD" - $(HelixCommand) --global-tools-dir "$HELIX_CORRELATION_PAYLOAD/tools" + call RunTests.cmd --runtime-path %HELIX_CORRELATION_PAYLOAD% --dotnet-root %HELIX_CORRELATION_PAYLOAD% + ./RunTests.sh --runtime-path "$HELIX_CORRELATION_PAYLOAD" --dotnet-root "$HELIX_CORRELATION_PAYLOAD" - + <_RuntimeInputs Include="$(TestHostRootPath)**/*.dll" /> - - - - - - - - - - <_TestArchiveRuntimeDependency Include="@(TestArchiveRuntimeDependency)"> - %(TestArchiveRuntimeDependency.DestinationDir)\%(RecursiveDir) - - - - - - - - + - + <_WorkItem Include="$(WorkItemArchiveWildCard)" Exclude="$(HelixCorrelationPayload)" /> @@ -126,5 +94,6 @@ $(_timeoutSpan) + From 9468757881c95e7fcba996ba1c58a8ef973de966 Mon Sep 17 00:00:00 2001 From: Marek Safar Date: Wed, 22 May 2019 15:30:59 +0200 Subject: [PATCH 477/607] Commit 29810a78e5b93d8da9fb921d096226d249fc75a5 added unconditional dependency on GetCpuUtilization (#24715) Update projitems file inclusion Signed-off-by: dotnet-bot --- src/Common/src/CoreLib/System.Private.CoreLib.Shared.projitems | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Common/src/CoreLib/System.Private.CoreLib.Shared.projitems b/src/Common/src/CoreLib/System.Private.CoreLib.Shared.projitems index cb5180f823a8..30f15000716c 100644 --- a/src/Common/src/CoreLib/System.Private.CoreLib.Shared.projitems +++ b/src/Common/src/CoreLib/System.Private.CoreLib.Shared.projitems @@ -1224,7 +1224,7 @@ - + From 0b8a72e7c8b57a753dbeab762b3967ecda6d47c7 Mon Sep 17 00:00:00 2001 From: Stephen Toub Date: Wed, 22 May 2019 13:28:26 -0400 Subject: [PATCH 478/607] Fix Path.Join argument nullable annotation (dotnet/coreclr#24719) Signed-off-by: dotnet-bot --- src/Common/src/CoreLib/System/IO/Path.cs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/Common/src/CoreLib/System/IO/Path.cs b/src/Common/src/CoreLib/System/IO/Path.cs index 27741b9248e9..674cc6e69ab9 100644 --- a/src/Common/src/CoreLib/System/IO/Path.cs +++ b/src/Common/src/CoreLib/System/IO/Path.cs @@ -468,7 +468,7 @@ public static string Join(string? path1, string? path2, string? path3, string? p return Join(path1.AsSpan(), path2.AsSpan(), path3.AsSpan(), path4.AsSpan()); } - public static string Join(params string[] paths) + public static string Join(params string?[] paths) { if (paths == null) { @@ -481,7 +481,7 @@ public static string Join(params string[] paths) } int maxSize = 0; - foreach (string path in paths) + foreach (string? path in paths) { maxSize += path?.Length ?? 0; } @@ -493,13 +493,12 @@ public static string Join(params string[] paths) for (int i = 0; i < paths.Length; i++) { - if ((paths[i]?.Length ?? 0) == 0) + string? path = paths[i]; + if (path == null || path.Length == 0) { continue; } - string path = paths[i]; - if (builder.Length == 0) { builder.Append(path); From daa005b23d4954d4a41b1663171d6ada2d960bd2 Mon Sep 17 00:00:00 2001 From: Santiago Fernandez Madero Date: Wed, 22 May 2019 21:28:22 -0700 Subject: [PATCH 479/607] Update to new compiler toolset by using arcade's property (#37883) * Update to new compiler toolset by using arcade's property * Run manual darc update --- eng/Tools.props | 2 +- eng/Version.Details.xml | 56 +++++++++---------- eng/Versions.props | 24 ++++---- eng/common/templates/steps/send-to-helix.yml | 3 + global.json | 4 +- .../StaticTestGenerator.csproj | 2 +- .../src/Microsoft.Bcl.HashCode.csproj | 2 +- ...gnostics.Tracing.EventSource.Redist.csproj | 2 +- .../src/System.Collections.Concurrent.csproj | 2 +- .../src/System.Collections.csproj | 2 +- .../src/System.Diagnostics.StackTrace.csproj | 2 +- .../src/System.Diagnostics.Tools.csproj | 2 +- src/System.Memory/src/System.Memory.csproj | 2 +- .../src/System.Numerics.Vectors.csproj | 2 +- .../src/System.Runtime.Extensions.csproj | 2 +- .../src/System.Runtime.InteropServices.csproj | 2 +- src/System.Runtime/src/System.Runtime.csproj | 2 +- .../src/System.Security.Principal.csproj | 2 +- .../src/System.Threading.Thread.csproj | 2 +- .../src/System.Threading.csproj | 2 +- 20 files changed, 61 insertions(+), 58 deletions(-) diff --git a/eng/Tools.props b/eng/Tools.props index 9a4d77963508..818be9fa30fa 100644 --- a/eng/Tools.props +++ b/eng/Tools.props @@ -28,7 +28,7 @@ - + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 46effc1c72e5..a612f2be0bab 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -34,65 +34,65 @@ https://github.com/dotnet/corefx b9b357f9a5a6ccf6a70c2e13b5a7d84a3ed1a684 - + https://github.com/dotnet/arcade - 7a6fb6528b2060cd9e3a3d92535f5b6fdc6b2e82 + e294deb12cd07a20997c29eb46892f3c2aa5dad9 https://github.com/dotnet/standard 8f6300e1f771d40dee4017f62ce885eb8251c322 - + https://github.com/dotnet/arcade - 7a6fb6528b2060cd9e3a3d92535f5b6fdc6b2e82 + e294deb12cd07a20997c29eb46892f3c2aa5dad9 - + https://github.com/dotnet/arcade - 7a6fb6528b2060cd9e3a3d92535f5b6fdc6b2e82 + e294deb12cd07a20997c29eb46892f3c2aa5dad9 - + https://github.com/dotnet/arcade - 7a6fb6528b2060cd9e3a3d92535f5b6fdc6b2e82 + e294deb12cd07a20997c29eb46892f3c2aa5dad9 - + https://github.com/dotnet/arcade - 7a6fb6528b2060cd9e3a3d92535f5b6fdc6b2e82 + e294deb12cd07a20997c29eb46892f3c2aa5dad9 - + https://github.com/dotnet/arcade - 7a6fb6528b2060cd9e3a3d92535f5b6fdc6b2e82 + e294deb12cd07a20997c29eb46892f3c2aa5dad9 - + https://github.com/dotnet/arcade - 7a6fb6528b2060cd9e3a3d92535f5b6fdc6b2e82 + e294deb12cd07a20997c29eb46892f3c2aa5dad9 - + https://github.com/dotnet/arcade - 7a6fb6528b2060cd9e3a3d92535f5b6fdc6b2e82 + e294deb12cd07a20997c29eb46892f3c2aa5dad9 - + https://github.com/dotnet/arcade - 7a6fb6528b2060cd9e3a3d92535f5b6fdc6b2e82 + e294deb12cd07a20997c29eb46892f3c2aa5dad9 - + https://github.com/dotnet/arcade - 7a6fb6528b2060cd9e3a3d92535f5b6fdc6b2e82 + e294deb12cd07a20997c29eb46892f3c2aa5dad9 - + https://github.com/dotnet/arcade - 7a6fb6528b2060cd9e3a3d92535f5b6fdc6b2e82 + e294deb12cd07a20997c29eb46892f3c2aa5dad9 - + https://github.com/dotnet/arcade - 7a6fb6528b2060cd9e3a3d92535f5b6fdc6b2e82 + e294deb12cd07a20997c29eb46892f3c2aa5dad9 - + https://github.com/dotnet/arcade - 7a6fb6528b2060cd9e3a3d92535f5b6fdc6b2e82 + e294deb12cd07a20997c29eb46892f3c2aa5dad9 - + https://github.com/dotnet/arcade - 7a6fb6528b2060cd9e3a3d92535f5b6fdc6b2e82 + e294deb12cd07a20997c29eb46892f3c2aa5dad9 https://dev.azure.com/dnceng/internal/_git/dotnet-optimization diff --git a/eng/Versions.props b/eng/Versions.props index 71d1e7f4208d..fafda26e5795 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -23,18 +23,18 @@ - 1.0.0-beta.19271.7 - 1.0.0-beta.19271.7 - 1.0.0-beta.19271.7 - 1.0.0-beta.19271.7 - 2.4.0-beta.19271.7 - 2.5.1-beta.19271.7 - 1.0.0-beta.19271.7 - 1.0.0-beta.19271.7 - 1.0.0-beta.19271.7 - 1.0.0-beta.19271.7 - 2.2.0-beta.19271.7 - 1.0.0-beta.19271.7 + 1.0.0-beta.19272.8 + 1.0.0-beta.19272.8 + 1.0.0-beta.19272.8 + 1.0.0-beta.19272.8 + 2.4.0-beta.19272.8 + 2.5.1-beta.19272.8 + 1.0.0-beta.19272.8 + 1.0.0-beta.19272.8 + 1.0.0-beta.19272.8 + 1.0.0-beta.19272.8 + 2.2.0-beta.19272.8 + 1.0.0-beta.19272.8 3.0.0-preview6-27720-09 3.0.0-preview6-27720-09 diff --git a/eng/common/templates/steps/send-to-helix.yml b/eng/common/templates/steps/send-to-helix.yml index d1ce577db5b9..05df886f55f7 100644 --- a/eng/common/templates/steps/send-to-helix.yml +++ b/eng/common/templates/steps/send-to-helix.yml @@ -5,6 +5,7 @@ parameters: HelixBuild: $(Build.BuildNumber) # required -- the build number Helix will use to identify this -- automatically set to the AzDO build number HelixTargetQueues: '' # required -- semicolon delimited list of Helix queues to test on; see https://helix.dot.net/ for a list of queues HelixAccessToken: '' # required -- access token to make Helix API requests; should be provided by the appropriate variable group + HelixConfiguration: '' # optional -- additional property attached to a job HelixPreCommands: '' # optional -- commands to run before Helix work item execution HelixPostCommands: '' # optional -- commands to run after Helix work item execution WorkItemDirectory: '' # optional -- a payload directory to zip up and send to Helix; requires WorkItemCommand; incompatible with XUnitProjects @@ -35,6 +36,7 @@ steps: HelixSource: ${{ parameters.HelixSource }} HelixType: ${{ parameters.HelixType }} HelixBuild: ${{ parameters.HelixBuild }} + HelixConfiguration: ${{ parameters.HelixConfiguration }} HelixTargetQueues: ${{ parameters.HelixTargetQueues }} HelixAccessToken: ${{ parameters.HelixAccessToken }} HelixPreCommands: ${{ parameters.HelixPreCommands }} @@ -64,6 +66,7 @@ steps: HelixSource: ${{ parameters.HelixSource }} HelixType: ${{ parameters.HelixType }} HelixBuild: ${{ parameters.HelixBuild }} + HelixConfiguration: ${{ parameters.HelixConfiguration }} HelixTargetQueues: ${{ parameters.HelixTargetQueues }} HelixAccessToken: ${{ parameters.HelixAccessToken }} HelixPreCommands: ${{ parameters.HelixPreCommands }} diff --git a/global.json b/global.json index 6a5a3875a803..413c4ac08af6 100644 --- a/global.json +++ b/global.json @@ -3,8 +3,8 @@ "dotnet": "3.0.100-preview6-011681" }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19271.7", - "Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19271.7", + "Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19272.8", + "Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19272.8", "FIX-85B6-MERGE-9C38-CONFLICT": "1.0.0", "Microsoft.NET.Sdk.IL": "3.0.0-preview6-27721-71" } diff --git a/src/Common/tests/StaticTestGenerator/StaticTestGenerator.csproj b/src/Common/tests/StaticTestGenerator/StaticTestGenerator.csproj index 48621710d6d4..403211ee0e4c 100644 --- a/src/Common/tests/StaticTestGenerator/StaticTestGenerator.csproj +++ b/src/Common/tests/StaticTestGenerator/StaticTestGenerator.csproj @@ -7,7 +7,7 @@ true true - enable + enable Debug;Release diff --git a/src/Microsoft.Bcl.HashCode/src/Microsoft.Bcl.HashCode.csproj b/src/Microsoft.Bcl.HashCode/src/Microsoft.Bcl.HashCode.csproj index ffe0e66ed1c6..9a817ede4865 100644 --- a/src/Microsoft.Bcl.HashCode/src/Microsoft.Bcl.HashCode.csproj +++ b/src/Microsoft.Bcl.HashCode/src/Microsoft.Bcl.HashCode.csproj @@ -5,7 +5,7 @@ true $(IsPartialFacadeAssembly) netcoreapp-Debug;netcoreapp-Release;netcoreapp2.1-Debug;netcoreapp2.1-Release;netstandard-Debug;netstandard-Release;netstandard2.1-Debug;netstandard2.1-Release - enable + enable diff --git a/src/Microsoft.Diagnostics.Tracing.EventSource.Redist/src/Microsoft.Diagnostics.Tracing.EventSource.Redist.csproj b/src/Microsoft.Diagnostics.Tracing.EventSource.Redist/src/Microsoft.Diagnostics.Tracing.EventSource.Redist.csproj index 3082af3c9b4b..dff57bcfb34f 100644 --- a/src/Microsoft.Diagnostics.Tracing.EventSource.Redist/src/Microsoft.Diagnostics.Tracing.EventSource.Redist.csproj +++ b/src/Microsoft.Diagnostics.Tracing.EventSource.Redist/src/Microsoft.Diagnostics.Tracing.EventSource.Redist.csproj @@ -5,7 +5,7 @@ $(NoWarn);CS1573 $(DefineConstants);NO_EVENTCOMMANDEXECUTED_SUPPORT;ES_BUILD_STANDALONE;FEATURE_MANAGED_ETW;PLATFORM_WINDOWS net461-Windows_NT-Debug;net461-Windows_NT-Release;netfx-Windows_NT-Debug;netfx-Windows_NT-Release - enable + enable true diff --git a/src/System.Collections.Concurrent/src/System.Collections.Concurrent.csproj b/src/System.Collections.Concurrent/src/System.Collections.Concurrent.csproj index af4c27e3e44f..8ff60f3d2011 100644 --- a/src/System.Collections.Concurrent/src/System.Collections.Concurrent.csproj +++ b/src/System.Collections.Concurrent/src/System.Collections.Concurrent.csproj @@ -4,7 +4,7 @@ System.Collections.Concurrent System.Collections.Concurrent true - enable + enable netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release;uapaot-Windows_NT-Debug;uapaot-Windows_NT-Release diff --git a/src/System.Collections/src/System.Collections.csproj b/src/System.Collections/src/System.Collections.csproj index 8a1591262014..decd002fb5a9 100644 --- a/src/System.Collections/src/System.Collections.csproj +++ b/src/System.Collections/src/System.Collections.csproj @@ -5,7 +5,7 @@ true true netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release;uapaot-Windows_NT-Debug;uapaot-Windows_NT-Release - enable + enable diff --git a/src/System.Diagnostics.StackTrace/src/System.Diagnostics.StackTrace.csproj b/src/System.Diagnostics.StackTrace/src/System.Diagnostics.StackTrace.csproj index a7653f9c4ef4..b8d378652cb7 100644 --- a/src/System.Diagnostics.StackTrace/src/System.Diagnostics.StackTrace.csproj +++ b/src/System.Diagnostics.StackTrace/src/System.Diagnostics.StackTrace.csproj @@ -4,7 +4,7 @@ {02304469-722E-4723-92A1-820B9A37D275} true true - enable + enable $(NoWarn);1685 netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release;uapaot-Windows_NT-Debug;uapaot-Windows_NT-Release diff --git a/src/System.Diagnostics.Tools/src/System.Diagnostics.Tools.csproj b/src/System.Diagnostics.Tools/src/System.Diagnostics.Tools.csproj index 58278b77aa17..522dd8688bde 100644 --- a/src/System.Diagnostics.Tools/src/System.Diagnostics.Tools.csproj +++ b/src/System.Diagnostics.Tools/src/System.Diagnostics.Tools.csproj @@ -4,7 +4,7 @@ System.Diagnostics.Tools true $(DefineConstants);SYSTEM_DIAGNOSTICS_TOOLS - enable + enable netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release;uapaot-Windows_NT-Debug;uapaot-Windows_NT-Release diff --git a/src/System.Memory/src/System.Memory.csproj b/src/System.Memory/src/System.Memory.csproj index e393188ac2c4..b63a96df0a13 100644 --- a/src/System.Memory/src/System.Memory.csproj +++ b/src/System.Memory/src/System.Memory.csproj @@ -3,7 +3,7 @@ {4BBC8F69-D03E-4432-AA8A-D458FA5B235A} true true - enable + enable netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release;uapaot-Windows_NT-Debug;uapaot-Windows_NT-Release $(DefineConstants);MAKE_ABW_PUBLIC diff --git a/src/System.Numerics.Vectors/src/System.Numerics.Vectors.csproj b/src/System.Numerics.Vectors/src/System.Numerics.Vectors.csproj index 29b641c1083f..dd690a4d88b3 100644 --- a/src/System.Numerics.Vectors/src/System.Numerics.Vectors.csproj +++ b/src/System.Numerics.Vectors/src/System.Numerics.Vectors.csproj @@ -7,7 +7,7 @@ true $(DefineConstants);HAS_INTRINSICS netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release;uapaot-Windows_NT-Debug;uapaot-Windows_NT-Release - enable + enable diff --git a/src/System.Runtime.Extensions/src/System.Runtime.Extensions.csproj b/src/System.Runtime.Extensions/src/System.Runtime.Extensions.csproj index 416a49a49913..edcc68b6bac8 100644 --- a/src/System.Runtime.Extensions/src/System.Runtime.Extensions.csproj +++ b/src/System.Runtime.Extensions/src/System.Runtime.Extensions.csproj @@ -8,7 +8,7 @@ true true netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release;uapaot-Windows_NT-Debug;uapaot-Windows_NT-Release - enable + enable diff --git a/src/System.Runtime.InteropServices/src/System.Runtime.InteropServices.csproj b/src/System.Runtime.InteropServices/src/System.Runtime.InteropServices.csproj index 0e208b6e3bc5..5f9c81480465 100644 --- a/src/System.Runtime.InteropServices/src/System.Runtime.InteropServices.csproj +++ b/src/System.Runtime.InteropServices/src/System.Runtime.InteropServices.csproj @@ -7,7 +7,7 @@ true $(NoWarn);0436;3001 true - enable + enable netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release;uapaot-Windows_NT-Debug;uapaot-Windows_NT-Release diff --git a/src/System.Runtime/src/System.Runtime.csproj b/src/System.Runtime/src/System.Runtime.csproj index ca18dcdcab47..2d850811ed05 100644 --- a/src/System.Runtime/src/System.Runtime.csproj +++ b/src/System.Runtime/src/System.Runtime.csproj @@ -5,7 +5,7 @@ true true netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release;uapaot-Windows_NT-Debug;uapaot-Windows_NT-Release - enable + enable diff --git a/src/System.Security.Principal/src/System.Security.Principal.csproj b/src/System.Security.Principal/src/System.Security.Principal.csproj index e2b074dde904..da825583599d 100644 --- a/src/System.Security.Principal/src/System.Security.Principal.csproj +++ b/src/System.Security.Principal/src/System.Security.Principal.csproj @@ -4,7 +4,7 @@ {FBE16BC8-AE2D-422C-861E-861814F53AF7} true true - enable + enable netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release;uapaot-Windows_NT-Debug;uapaot-Windows_NT-Release diff --git a/src/System.Threading.Thread/src/System.Threading.Thread.csproj b/src/System.Threading.Thread/src/System.Threading.Thread.csproj index 18cc3beab74e..2db1d8c6ce55 100644 --- a/src/System.Threading.Thread/src/System.Threading.Thread.csproj +++ b/src/System.Threading.Thread/src/System.Threading.Thread.csproj @@ -4,7 +4,7 @@ Library true {06197EED-FF48-43F3-976D-463839D43E8C} - enable + enable netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release;uapaot-Windows_NT-Debug;uapaot-Windows_NT-Release diff --git a/src/System.Threading/src/System.Threading.csproj b/src/System.Threading/src/System.Threading.csproj index 5bda8c8372e5..6252580cb359 100644 --- a/src/System.Threading/src/System.Threading.csproj +++ b/src/System.Threading/src/System.Threading.csproj @@ -5,7 +5,7 @@ true true netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release;uapaot-Windows_NT-Debug;uapaot-Windows_NT-Release - enable + enable From 97fb32cbd491a5614190ae476c41da3f49b0ab22 Mon Sep 17 00:00:00 2001 From: dotnet-maestro-bot Date: Thu, 23 May 2019 03:51:36 -0700 Subject: [PATCH 480/607] Update ProjectNTfs to beta-27723-00 (#37887) --- eng/dependencies.props | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/dependencies.props b/eng/dependencies.props index 946b1d4593dd..38d22a72fa6e 100644 --- a/eng/dependencies.props +++ b/eng/dependencies.props @@ -9,12 +9,12 @@ These ref versions are pulled from https://github.com/dotnet/versions. --> - 6bbde1f087deabdcf227771e37e73a6a50e540ce + d2c4b69bd45385b465e3141184f319655e661d71 - beta-27722-00 + beta-27723-00 From 510ab9e6433ff0df29e0ae080140f4f2c1b69abd Mon Sep 17 00:00:00 2001 From: Tarek Mahmoud Sayed Date: Thu, 23 May 2019 08:40:39 -0700 Subject: [PATCH 481/607] Add logging at the Task timeout tests (#37874) We need to get more info to understand what is going on when the test timeout. Also, we are now FailFast to have the test runs create a debugger dump at least when running on Linux platforms. Hopefully this can help in the diagnostics --- .../AsyncTaskMethodBuilderTests.cs | 24 +++++++++++++++---- .../tests/Task/ExecutionContextFlowTest.cs | 20 ++++++++++++++-- 2 files changed, 38 insertions(+), 6 deletions(-) diff --git a/src/System.Threading.Tasks/tests/System.Runtime.CompilerServices/AsyncTaskMethodBuilderTests.cs b/src/System.Threading.Tasks/tests/System.Runtime.CompilerServices/AsyncTaskMethodBuilderTests.cs index fe545c84b6eb..25f07fff5d07 100644 --- a/src/System.Threading.Tasks/tests/System.Runtime.CompilerServices/AsyncTaskMethodBuilderTests.cs +++ b/src/System.Threading.Tasks/tests/System.Runtime.CompilerServices/AsyncTaskMethodBuilderTests.cs @@ -509,10 +509,10 @@ public static void CancellationDoesntResultInEventFiring() cts.Cancel(); b.SignalAndWait(); // release task to complete - // This test may be run concurrently with other tests in the suite, + // This test may be run concurrently with other tests in the suite, // which can be problematic as TaskScheduler.UnobservedTaskException // is global state. The handler is carefully written to be non-problematic - // if it happens to be set during the execution of another test that has + // if it happens to be set during the execution of another test that has // an unobserved exception. EventHandler handler = (s, e) => Assert.DoesNotContain(oce, e.Exception.InnerExceptions); @@ -548,7 +548,15 @@ async Task YieldOnceAsync(object s) } var state = new InvokeActionOnFinalization { Action = () => tcs.SetResult(true) }; - var al = new AsyncLocal { Value = state }; // ensure the object is stored in ExecutionContext + var al = new AsyncLocal(args => { + // Temporary logging to get more info when the test timeout to look who hold a reference to the finalizer object. + string currentValue = args.CurrentValue == null ? "'null'" : "'Object'"; + string previousValue = args.PreviousValue == null ? "'null'" : "'Object'"; + Console.WriteLine($"AsyncMethodsDropsStateMachineAndExecutionContextUponCompletion: Thread Id: {Thread.CurrentThread.ManagedThreadId} Current Value: {currentValue} Previous Value: {previousValue} ThreadContextChanged: {args.ThreadContextChanged}"); + }) + { + Value = state + }; // ensure the object is stored in ExecutionContext t = YieldOnceAsync(state); // ensure the object is stored in the state machine al.Value = null; }); @@ -561,7 +569,15 @@ async Task YieldOnceAsync(object s) GC.Collect(); GC.WaitForPendingFinalizers(); } - await tcs.Task.TimeoutAfter(60_000); + + try + { + await tcs.Task.TimeoutAfter(60_000); + } + catch (Exception e) + { + Environment.FailFast("Look at the created dump", e); + } GC.KeepAlive(t); // ensure the object is stored in the state machine } diff --git a/src/System.Threading.Tasks/tests/Task/ExecutionContextFlowTest.cs b/src/System.Threading.Tasks/tests/Task/ExecutionContextFlowTest.cs index 204f9e2c28d6..b4122dca74ff 100644 --- a/src/System.Threading.Tasks/tests/Task/ExecutionContextFlowTest.cs +++ b/src/System.Threading.Tasks/tests/Task/ExecutionContextFlowTest.cs @@ -45,7 +45,15 @@ public static async Task TaskDropsExecutionContextUponCompletion() await Task.Run(delegate // avoid any issues with the stack keeping the object alive { var state = new InvokeActionOnFinalization { Action = () => tcs.SetResult(true) }; - var al = new AsyncLocal { Value = state }; // ensure the object is stored in ExecutionContext + var al = new AsyncLocal(args => { + // Temporary logging to get more info when the test timeout to look who hold a reference to the finalizer object. + string currentValue = args.CurrentValue == null ? "'null'" : "'Object'"; + string previousValue = args.PreviousValue == null ? "'null'" : "'Object'"; + Console.WriteLine($"TaskDropsExecutionContextUponCompletion: Thread Id: {Thread.CurrentThread.ManagedThreadId} Current Value: {currentValue} Previous Value: {previousValue} ThreadContextChanged: {args.ThreadContextChanged}"); + }) + { + Value = state + }; // ensure the object is stored in ExecutionContext t = Task.Run(() => { }); // run a task that'll capture EC al.Value = null; }); @@ -58,7 +66,15 @@ await Task.Run(delegate // avoid any issues with the stack keeping the object al GC.WaitForPendingFinalizers(); } - await tcs.Task.TimeoutAfter(60_000); // finalizable object should have been collected and finalized + try + { + await tcs.Task.TimeoutAfter(60_000); // finalizable object should have been collected and finalized + } + catch (Exception e) + { + Environment.FailFast("Look at the created dump", e); + } + GC.KeepAlive(t); // ensure the object is stored in the state machine } From e8c66aec851633dad1bb9049028e6e817d3f2297 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Thu, 23 May 2019 19:37:13 +0200 Subject: [PATCH 482/607] Update dependencies from https://github.com/dotnet/arcade build 20190522.13 (#37888) - Microsoft.DotNet.XUnitExtensions - 2.4.0-beta.19272.13 - Microsoft.DotNet.XUnitConsoleRunner - 2.5.1-beta.19272.13 - Microsoft.DotNet.VersionTools.Tasks - 1.0.0-beta.19272.13 - Microsoft.DotNet.ApiCompat - 1.0.0-beta.19272.13 - Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19272.13 - Microsoft.DotNet.Build.Tasks.Configuration - 1.0.0-beta.19272.13 - Microsoft.DotNet.Build.Tasks.Feed - 2.2.0-beta.19272.13 - Microsoft.DotNet.Build.Tasks.Packaging - 1.0.0-beta.19272.13 - Microsoft.DotNet.CodeAnalysis - 1.0.0-beta.19272.13 - Microsoft.DotNet.CoreFxTesting - 1.0.0-beta.19272.13 - Microsoft.DotNet.GenAPI - 1.0.0-beta.19272.13 - Microsoft.DotNet.GenFacades - 1.0.0-beta.19272.13 - Microsoft.DotNet.Helix.Sdk - 2.0.0-beta.19272.13 - Microsoft.DotNet.RemoteExecutor - 1.0.0-beta.19272.13 --- eng/Version.Details.xml | 56 ++++++++++++++++++++--------------------- eng/Versions.props | 24 +++++++++--------- global.json | 4 +-- 3 files changed, 42 insertions(+), 42 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index a612f2be0bab..bc3194f6b1a6 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -34,65 +34,65 @@ https://github.com/dotnet/corefx b9b357f9a5a6ccf6a70c2e13b5a7d84a3ed1a684 - + https://github.com/dotnet/arcade - e294deb12cd07a20997c29eb46892f3c2aa5dad9 + 86e674361bdcefecbd8199ab62d0b1a6cb25703d https://github.com/dotnet/standard 8f6300e1f771d40dee4017f62ce885eb8251c322 - + https://github.com/dotnet/arcade - e294deb12cd07a20997c29eb46892f3c2aa5dad9 + 86e674361bdcefecbd8199ab62d0b1a6cb25703d - + https://github.com/dotnet/arcade - e294deb12cd07a20997c29eb46892f3c2aa5dad9 + 86e674361bdcefecbd8199ab62d0b1a6cb25703d - + https://github.com/dotnet/arcade - e294deb12cd07a20997c29eb46892f3c2aa5dad9 + 86e674361bdcefecbd8199ab62d0b1a6cb25703d - + https://github.com/dotnet/arcade - e294deb12cd07a20997c29eb46892f3c2aa5dad9 + 86e674361bdcefecbd8199ab62d0b1a6cb25703d - + https://github.com/dotnet/arcade - e294deb12cd07a20997c29eb46892f3c2aa5dad9 + 86e674361bdcefecbd8199ab62d0b1a6cb25703d - + https://github.com/dotnet/arcade - e294deb12cd07a20997c29eb46892f3c2aa5dad9 + 86e674361bdcefecbd8199ab62d0b1a6cb25703d - + https://github.com/dotnet/arcade - e294deb12cd07a20997c29eb46892f3c2aa5dad9 + 86e674361bdcefecbd8199ab62d0b1a6cb25703d - + https://github.com/dotnet/arcade - e294deb12cd07a20997c29eb46892f3c2aa5dad9 + 86e674361bdcefecbd8199ab62d0b1a6cb25703d - + https://github.com/dotnet/arcade - e294deb12cd07a20997c29eb46892f3c2aa5dad9 + 86e674361bdcefecbd8199ab62d0b1a6cb25703d - + https://github.com/dotnet/arcade - e294deb12cd07a20997c29eb46892f3c2aa5dad9 + 86e674361bdcefecbd8199ab62d0b1a6cb25703d - + https://github.com/dotnet/arcade - e294deb12cd07a20997c29eb46892f3c2aa5dad9 + 86e674361bdcefecbd8199ab62d0b1a6cb25703d - + https://github.com/dotnet/arcade - e294deb12cd07a20997c29eb46892f3c2aa5dad9 + 86e674361bdcefecbd8199ab62d0b1a6cb25703d - + https://github.com/dotnet/arcade - e294deb12cd07a20997c29eb46892f3c2aa5dad9 + 86e674361bdcefecbd8199ab62d0b1a6cb25703d https://dev.azure.com/dnceng/internal/_git/dotnet-optimization diff --git a/eng/Versions.props b/eng/Versions.props index fafda26e5795..50335acf5344 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -23,18 +23,18 @@ - 1.0.0-beta.19272.8 - 1.0.0-beta.19272.8 - 1.0.0-beta.19272.8 - 1.0.0-beta.19272.8 - 2.4.0-beta.19272.8 - 2.5.1-beta.19272.8 - 1.0.0-beta.19272.8 - 1.0.0-beta.19272.8 - 1.0.0-beta.19272.8 - 1.0.0-beta.19272.8 - 2.2.0-beta.19272.8 - 1.0.0-beta.19272.8 + 1.0.0-beta.19272.13 + 1.0.0-beta.19272.13 + 1.0.0-beta.19272.13 + 1.0.0-beta.19272.13 + 2.4.0-beta.19272.13 + 2.5.1-beta.19272.13 + 1.0.0-beta.19272.13 + 1.0.0-beta.19272.13 + 1.0.0-beta.19272.13 + 1.0.0-beta.19272.13 + 2.2.0-beta.19272.13 + 1.0.0-beta.19272.13 3.0.0-preview6-27720-09 3.0.0-preview6-27720-09 diff --git a/global.json b/global.json index 413c4ac08af6..ad9495ca7153 100644 --- a/global.json +++ b/global.json @@ -3,8 +3,8 @@ "dotnet": "3.0.100-preview6-011681" }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19272.8", - "Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19272.8", + "Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19272.13", + "Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19272.13", "FIX-85B6-MERGE-9C38-CONFLICT": "1.0.0", "Microsoft.NET.Sdk.IL": "3.0.0-preview6-27721-71" } From 7946bfed4ee457f58762ef9cbf711965afe0a400 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Thu, 23 May 2019 10:55:53 -0700 Subject: [PATCH 483/607] Update dependencies from https://github.com/dotnet/core-setup build 20190522.02 (#37889) - Microsoft.NETCore.App - 3.0.0-preview6-27722-02 - Microsoft.NETCore.DotNetHost - 3.0.0-preview6-27722-02 - Microsoft.NETCore.DotNetHostPolicy - 3.0.0-preview6-27722-02 --- eng/Version.Details.xml | 12 ++++++------ eng/Versions.props | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index bc3194f6b1a6..99bcd5814ce9 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -14,17 +14,17 @@ - + https://github.com/dotnet/core-setup - c3145b06ba5151d5eafcf177a2e380f7acb61189 + 4573cea18beb40dc9a41014798060e48ff044c63 - + https://github.com/dotnet/core-setup - c3145b06ba5151d5eafcf177a2e380f7acb61189 + 4573cea18beb40dc9a41014798060e48ff044c63 - + https://github.com/dotnet/core-setup - c3145b06ba5151d5eafcf177a2e380f7acb61189 + 4573cea18beb40dc9a41014798060e48ff044c63 https://github.com/dotnet/corefx diff --git a/eng/Versions.props b/eng/Versions.props index 50335acf5344..3ce3e163b3ed 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -36,9 +36,9 @@ 2.2.0-beta.19272.13 1.0.0-beta.19272.13 - 3.0.0-preview6-27720-09 - 3.0.0-preview6-27720-09 - 3.0.0-preview6-27720-09 + 3.0.0-preview6-27722-02 + 3.0.0-preview6-27722-02 + 3.0.0-preview6-27722-02 3.0.0-preview6-27721-71 3.0.0-preview6-27721-71 From 2fc59abd09c990121526360d90810e19723cb6cb Mon Sep 17 00:00:00 2001 From: Jan Kotas Date: Thu, 23 May 2019 08:26:51 -0700 Subject: [PATCH 484/607] Fix CoreRT build breaks Signed-off-by: dotnet-bot --- src/Common/src/CoreLib/System.Private.CoreLib.Shared.projitems | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Common/src/CoreLib/System.Private.CoreLib.Shared.projitems b/src/Common/src/CoreLib/System.Private.CoreLib.Shared.projitems index 30f15000716c..7a44b25de496 100644 --- a/src/Common/src/CoreLib/System.Private.CoreLib.Shared.projitems +++ b/src/Common/src/CoreLib/System.Private.CoreLib.Shared.projitems @@ -1041,7 +1041,7 @@ - + From 41489a93acf3f36abcaaaea2003a8fdbb577cf35 Mon Sep 17 00:00:00 2001 From: Santiago Fernandez Madero Date: Thu, 23 May 2019 13:02:46 -0700 Subject: [PATCH 485/607] Add nowarns for reference assemblies to be annotated with nullable warnings (#37901) --- Directory.Build.props | 4 ++-- eng/ReferenceAssemblies.props | 8 +++++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index 27afb8ae25ab..400c3a3e2c69 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -309,8 +309,8 @@ true true - - $(NoWarn);CS8609 + + $(NoWarn);CS8609;CS8610 diff --git a/eng/ReferenceAssemblies.props b/eng/ReferenceAssemblies.props index d1f1cfd6d658..597645c130bd 100644 --- a/eng/ReferenceAssemblies.props +++ b/eng/ReferenceAssemblies.props @@ -11,7 +11,13 @@ $(ArtifactsObjDir)ref/$(MSBuildProjectName)/$(Configuration) - $(NoWarn);0169;0649 + $(NoWarn);CS0169;CS0649;CS8618 + + + $(NoWarn);CS8597 + + + $(NoWarn);CS8625 From 025bb33e27b15d973e8be430a9329309ecac37d3 Mon Sep 17 00:00:00 2001 From: Steve Harter Date: Thu, 23 May 2019 13:46:19 -0700 Subject: [PATCH 486/607] Support unlimited array dimensions (#37867) --- .../JsonSerializer.Read.HandleArray.cs | 45 ++++--- .../JsonSerializer.Read.HandleDictionary.cs | 4 +- .../JsonSerializer.Read.HandlePropertyName.cs | 2 + .../Text/Json/Serialization/ReadStackFrame.cs | 1 + .../tests/Serialization/Array.ReadTests.cs | 95 +++++++++++++- .../tests/Serialization/Array.WriteTests.cs | 60 +++++++++ .../tests/Serialization/DictionaryTests.cs | 66 ++++++++++ .../tests/Serialization/Object.ReadTests.cs | 37 ++++++ .../TestClasses.SimpleTestClass.cs | 62 ++++++++++ .../tests/Serialization/Value.ReadTests.cs | 117 ------------------ .../tests/Serialization/Value.WriteTests.cs | 62 ---------- .../tests/System.Text.Json.Tests.csproj | 2 +- 12 files changed, 352 insertions(+), 201 deletions(-) diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleArray.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleArray.cs index 8ff408cac76b..9d6281260a0e 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleArray.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleArray.cs @@ -47,10 +47,11 @@ private static void HandleStartArray( if (state.Current.PropertyInitialized) { // A nested json array so push a new stack frame. - Type elementType = state.Current.JsonClassInfo.ElementClassInfo.GetPolicyProperty().RuntimePropertyType; + Type elementType = jsonPropertyInfo.ElementClassInfo.Type; state.Push(); state.Current.Initialize(elementType, options); + state.Current.PropertyInitialized = true; } else { @@ -64,6 +65,8 @@ private static void HandleStartArray( { // Create the enumerable. object value = ReadStackFrame.CreateEnumerableValue(ref reader, ref state, options); + + // If value is not null, then we don't have a converter so apply the value. if (value != null) { if (state.Current.ReturnValue != null) @@ -94,15 +97,20 @@ private static bool HandleEndArray( } IEnumerable value = ReadStackFrame.GetEnumerableValue(state.Current); - bool setPropertyDirectly; if (state.Current.TempEnumerableValues != null) { + // We have a converter; possibilities: + // - Add value to current frame's current property or TempEnumerableValues. + // - Add value to previous frame's current property or TempEnumerableValues. + // - Set current property on current frame to value. + // - Set current property on previous frame to value. + // - Set ReturnValue if root frame and value is the actual return value. JsonEnumerableConverter converter = state.Current.JsonPropertyInfo.EnumerableConverter; Debug.Assert(converter != null); value = converter.CreateFromList(ref state, (IList)value, options); - setPropertyDirectly = true; + state.Current.TempEnumerableValues = null; } else if (state.Current.IsEnumerableProperty) { @@ -110,10 +118,6 @@ private static bool HandleEndArray( state.Current.ResetProperty(); return false; } - else - { - setPropertyDirectly = false; - } if (lastFrame) { @@ -136,12 +140,7 @@ private static bool HandleEndArray( state.Pop(); } - ApplyObjectToEnumerable(value, ref state, ref reader, setPropertyDirectly: setPropertyDirectly); - - if (state.Current.IsEnumerableProperty) - { - state.Current.ResetProperty(); - } + ApplyObjectToEnumerable(value, ref state, ref reader); return false; } @@ -177,8 +176,14 @@ internal static void ApplyObjectToEnumerable( else { IList list = (IList)state.Current.JsonPropertyInfo.GetValueAsObject(state.Current.ReturnValue); - Debug.Assert(list != null); - list.Add(value); + if (list == null) + { + state.Current.JsonPropertyInfo.SetValueAsObject(state.Current.ReturnValue, value); + } + else + { + list.Add(value); + } } } else if (state.Current.IsDictionary || (state.Current.IsDictionaryProperty && !setPropertyDirectly)) @@ -234,8 +239,14 @@ internal static void ApplyValueToEnumerable( else { IList list = (IList)state.Current.JsonPropertyInfo.GetValueAsObject(state.Current.ReturnValue); - Debug.Assert(list != null); - list.Add(value); + if (list == null) + { + state.Current.JsonPropertyInfo.SetValueAsObject(state.Current.ReturnValue, value); + } + else + { + list.Add(value); + } } } else if (state.Current.IsProcessingDictionary) diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleDictionary.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleDictionary.cs index 27f939b5f6e9..17b955571b28 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleDictionary.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleDictionary.cs @@ -26,10 +26,10 @@ private static void HandleStartDictionary(JsonSerializerOptions options, ref Utf { Debug.Assert(state.Current.IsDictionary); - JsonClassInfo classInfoTemp = state.Current.JsonClassInfo; state.Push(); - state.Current.JsonClassInfo = classInfoTemp.ElementClassInfo; + state.Current.JsonClassInfo = jsonPropertyInfo.ElementClassInfo; state.Current.InitializeJsonPropertyInfo(); + state.Current.PropertyInitialized = true; ClassType classType = state.Current.JsonClassInfo.ClassType; if (classType == ClassType.Value && diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandlePropertyName.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandlePropertyName.cs index 3c0bde8e7d81..f32d08e6c432 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandlePropertyName.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandlePropertyName.cs @@ -60,6 +60,8 @@ private static void HandlePropertyName( } else { + state.Current.ResetProperty(); + ReadOnlySpan propertyName = reader.HasValueSequence ? reader.ValueSequence.ToArray() : reader.ValueSpan; if (reader._stringHasEscaping) { diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/ReadStackFrame.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/ReadStackFrame.cs index 6170ba1d869f..f35bc44d4754 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/ReadStackFrame.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/ReadStackFrame.cs @@ -102,6 +102,7 @@ public void ResetProperty() PropertyInitialized = false; JsonPropertyInfo = null; TempEnumerableValues = null; + KeyName = null; } public void EndObject() diff --git a/src/System.Text.Json/tests/Serialization/Array.ReadTests.cs b/src/System.Text.Json/tests/Serialization/Array.ReadTests.cs index b30e8de45f65..05854c5e679c 100644 --- a/src/System.Text.Json/tests/Serialization/Array.ReadTests.cs +++ b/src/System.Text.Json/tests/Serialization/Array.ReadTests.cs @@ -3,14 +3,74 @@ // See the LICENSE file in the project root for more information. using System.Collections.Generic; -using System.Collections.Immutable; -using System.Reflection; using Xunit; namespace System.Text.Json.Serialization.Tests { public static partial class ArrayTests { + [Fact] + public static void ReadObjectArray() + { + string data = + "[" + + SimpleTestClass.s_json + + "," + + SimpleTestClass.s_json + + "]"; + + SimpleTestClass[] i = JsonSerializer.Parse(Encoding.UTF8.GetBytes(data)); + + i[0].Verify(); + i[1].Verify(); + } + + [Fact] + public static void ReadEmptyObjectArray() + { + SimpleTestClass[] data = JsonSerializer.Parse("[{}]"); + Assert.Equal(1, data.Length); + Assert.NotNull(data[0]); + } + + [Fact] + public static void ReadPrimitiveJagged2dArray() + { + int[][] i = JsonSerializer.Parse(Encoding.UTF8.GetBytes(@"[[1,2],[3,4]]")); + Assert.Equal(1, i[0][0]); + Assert.Equal(2, i[0][1]); + Assert.Equal(3, i[1][0]); + Assert.Equal(4, i[1][1]); + } + + [Fact] + public static void ReadPrimitiveJagged3dArray() + { + int[][][] i = JsonSerializer.Parse(Encoding.UTF8.GetBytes(@"[[[11,12],[13,14]], [[21,22],[23,24]]]")); + Assert.Equal(11, i[0][0][0]); + Assert.Equal(12, i[0][0][1]); + Assert.Equal(13, i[0][1][0]); + Assert.Equal(14, i[0][1][1]); + + Assert.Equal(21, i[1][0][0]); + Assert.Equal(22, i[1][0][1]); + Assert.Equal(23, i[1][1][0]); + Assert.Equal(24, i[1][1][1]); + } + + [Fact] + public static void ReadArrayWithInterleavedComments() + { + var options = new JsonSerializerOptions(); + options.ReadCommentHandling = JsonCommentHandling.Skip; + + int[][] i = JsonSerializer.Parse(Encoding.UTF8.GetBytes("[[1,2] // Inline [\n,[3, /* Multi\n]] Line*/4]]"), options); + Assert.Equal(1, i[0][0]); + Assert.Equal(2, i[0][1]); + Assert.Equal(3, i[1][0]); + Assert.Equal(4, i[1][1]); + } + [Fact] public static void ReadEmpty() { @@ -21,6 +81,37 @@ public static void ReadEmpty() Assert.Equal(0, list.Count); } + [Fact] + public static void ReadPrimitiveArray() + { + int[] i = JsonSerializer.Parse(Encoding.UTF8.GetBytes(@"[1,2]")); + Assert.Equal(1, i[0]); + Assert.Equal(2, i[1]); + + i = JsonSerializer.Parse(Encoding.UTF8.GetBytes(@"[]")); + Assert.Equal(0, i.Length); + } + + [Fact] + public static void ReadArrayWithEnums() + { + SampleEnum[] i = JsonSerializer.Parse(Encoding.UTF8.GetBytes(@"[1,2]")); + Assert.Equal(SampleEnum.One, i[0]); + Assert.Equal(SampleEnum.Two, i[1]); + } + + [Fact] + public static void ReadPrimitiveArrayFail() + { + // Invalid data + Assert.Throws(() => JsonSerializer.Parse(Encoding.UTF8.GetBytes(@"[1,""a""]"))); + + // Invalid data + Assert.Throws(() => JsonSerializer.Parse>(Encoding.UTF8.GetBytes(@"[1,""a""]"))); + + // Multidimensional arrays currently not supported + Assert.Throws(() => JsonSerializer.Parse(Encoding.UTF8.GetBytes(@"[[1,2],[3,4]]"))); + } public static IEnumerable ReadNullJson { diff --git a/src/System.Text.Json/tests/Serialization/Array.WriteTests.cs b/src/System.Text.Json/tests/Serialization/Array.WriteTests.cs index b1e7e771fe75..65ef8bbe0e57 100644 --- a/src/System.Text.Json/tests/Serialization/Array.WriteTests.cs +++ b/src/System.Text.Json/tests/Serialization/Array.WriteTests.cs @@ -9,6 +9,66 @@ namespace System.Text.Json.Serialization.Tests { public static partial class ArrayTests { + [Fact] + public static void WritePrimitiveArray() + { + var input = new int[] { 0, 1 }; + string json = JsonSerializer.ToString(input); + Assert.Equal("[0,1]", json); + } + + [Fact] + public static void WriteArrayWithEnums() + { + var input = new SampleEnum[] { SampleEnum.One, SampleEnum.Two }; + string json = JsonSerializer.ToString(input); + Assert.Equal("[1,2]", json); + } + + [Fact] + public static void WriteObjectArray() + { + string json; + + { + SimpleTestClass[] input = new SimpleTestClass[] { new SimpleTestClass(), new SimpleTestClass() }; + input[0].Initialize(); + input[0].Verify(); + + input[1].Initialize(); + input[1].Verify(); + + json = JsonSerializer.ToString(input); + } + + { + SimpleTestClass[] output = JsonSerializer.Parse(json); + Assert.Equal(2, output.Length); + output[0].Verify(); + output[1].Verify(); + } + } + + [Fact] + public static void WriteEmptyObjectArray() + { + object[] arr = new object[] { new object() }; + + string json = JsonSerializer.ToString(arr); + Assert.Equal("[{}]", json); + } + + [Fact] + public static void WritePrimitiveJaggedArray() + { + var input = new int[2][]; + input[0] = new int[] { 1, 2 }; + input[1] = new int[] { 3, 4 }; + + string json = JsonSerializer.ToString(input); + Assert.Equal("[[1,2],[3,4]]", json); + } + [Fact] public static void WriteEmpty() { diff --git a/src/System.Text.Json/tests/Serialization/DictionaryTests.cs b/src/System.Text.Json/tests/Serialization/DictionaryTests.cs index 4e80a3afebc6..5d6d11428ad1 100644 --- a/src/System.Text.Json/tests/Serialization/DictionaryTests.cs +++ b/src/System.Text.Json/tests/Serialization/DictionaryTests.cs @@ -207,6 +207,72 @@ public static void DictionaryOfDictionary() Assert.Equal(JsonString, json); } + [Fact] + public static void DictionaryOfDictionaryOfDictionary() + { + const string JsonString = @"{""Key1"":{""Key1"":{""Key1"":1,""Key2"":2},""Key2"":{""Key1"":3,""Key2"":4}},""Key2"":{""Key1"":{""Key1"":5,""Key2"":6},""Key2"":{""Key1"":7,""Key2"":8}}}"; + Dictionary>> obj = JsonSerializer.Parse>>>(JsonString); + + Assert.Equal(2, obj.Count); + Assert.Equal(2, obj["Key1"].Count); + Assert.Equal(2, obj["Key1"]["Key1"].Count); + Assert.Equal(2, obj["Key1"]["Key2"].Count); + + Assert.Equal(1, obj["Key1"]["Key1"]["Key1"]); + Assert.Equal(2, obj["Key1"]["Key1"]["Key2"]); + Assert.Equal(3, obj["Key1"]["Key2"]["Key1"]); + Assert.Equal(4, obj["Key1"]["Key2"]["Key2"]); + + Assert.Equal(2, obj["Key2"].Count); + Assert.Equal(2, obj["Key2"]["Key1"].Count); + Assert.Equal(2, obj["Key2"]["Key2"].Count); + + Assert.Equal(5, obj["Key2"]["Key1"]["Key1"]); + Assert.Equal(6, obj["Key2"]["Key1"]["Key2"]); + Assert.Equal(7, obj["Key2"]["Key2"]["Key1"]); + Assert.Equal(8, obj["Key2"]["Key2"]["Key2"]); + + string json = JsonSerializer.ToString(obj); + Assert.Equal(JsonString, json); + + // Verify that typeof(object) doesn't interfere. + json = JsonSerializer.ToString(obj); + Assert.Equal(JsonString, json); + } + + [Fact] + public static void DictionaryOfArrayOfDictionary() + { + const string JsonString = @"{""Key1"":[{""Key1"":1,""Key2"":2},{""Key1"":3,""Key2"":4}],""Key2"":[{""Key1"":5,""Key2"":6},{""Key1"":7,""Key2"":8}]}"; + Dictionary[]> obj = JsonSerializer.Parse[]>>(JsonString); + + Assert.Equal(2, obj.Count); + Assert.Equal(2, obj["Key1"].Length); + Assert.Equal(2, obj["Key1"][0].Count); + Assert.Equal(2, obj["Key1"][1].Count); + + Assert.Equal(1, obj["Key1"][0]["Key1"]); + Assert.Equal(2, obj["Key1"][0]["Key2"]); + Assert.Equal(3, obj["Key1"][1]["Key1"]); + Assert.Equal(4, obj["Key1"][1]["Key2"]); + + Assert.Equal(2, obj["Key2"].Length); + Assert.Equal(2, obj["Key2"][0].Count); + Assert.Equal(2, obj["Key2"][1].Count); + + Assert.Equal(5, obj["Key2"][0]["Key1"]); + Assert.Equal(6, obj["Key2"][0]["Key2"]); + Assert.Equal(7, obj["Key2"][1]["Key1"]); + Assert.Equal(8, obj["Key2"][1]["Key2"]); + + string json = JsonSerializer.ToString(obj); + Assert.Equal(JsonString, json); + + // Verify that typeof(object) doesn't interfere. + json = JsonSerializer.ToString(obj); + Assert.Equal(JsonString, json); + } + [Fact] public static void DictionaryOfClasses() { diff --git a/src/System.Text.Json/tests/Serialization/Object.ReadTests.cs b/src/System.Text.Json/tests/Serialization/Object.ReadTests.cs index ed4720c91574..7f7ed024c5f9 100644 --- a/src/System.Text.Json/tests/Serialization/Object.ReadTests.cs +++ b/src/System.Text.Json/tests/Serialization/Object.ReadTests.cs @@ -174,5 +174,42 @@ public static void ReadClassWithStringToPrimitiveDictionary() TestClassWithStringToPrimitiveDictionary obj = JsonSerializer.Parse(TestClassWithStringToPrimitiveDictionary.s_data); obj.Verify(); } + + public class TestClassWithBadData + { + public TestChildClassWithBadData[] Children { get; set; } + } + + public class TestChildClassWithBadData + { + public int MyProperty { get; set; } + } + + [Fact] + public static void ReadConversionFails() + { + byte[] data = Encoding.UTF8.GetBytes( + @"{" + + @"""Children"":[" + + @"{""MyProperty"":""StringButShouldBeInt""}" + + @"]" + + @"}"); + + bool exceptionThrown = false; + + try + { + JsonSerializer.Parse(data); + } + catch (JsonException exception) + { + exceptionThrown = true; + + // Exception should contain property path. + Assert.True(exception.ToString().Contains("[System.Text.Json.Serialization.Tests.ObjectTests+TestClassWithBadData].Children.MyProperty")); + } + + Assert.True(exceptionThrown); + } } } diff --git a/src/System.Text.Json/tests/Serialization/TestClasses.SimpleTestClass.cs b/src/System.Text.Json/tests/Serialization/TestClasses.SimpleTestClass.cs index f5b090fee2de..ba69ea656bdf 100644 --- a/src/System.Text.Json/tests/Serialization/TestClasses.SimpleTestClass.cs +++ b/src/System.Text.Json/tests/Serialization/TestClasses.SimpleTestClass.cs @@ -49,6 +49,10 @@ public class SimpleTestClass : ITestClass public DateTime[] MyDateTimeArray { get; set; } public DateTimeOffset[] MyDateTimeOffsetArray { get; set; } public SampleEnum[] MyEnumArray { get; set; } + public int[][] MyInt16TwoDimensionArray { get; set; } + public List> MyInt16TwoDimensionList { get; set; } + public int[][][] MyInt16ThreeDimensionArray { get; set; } + public List>> MyInt16ThreeDimensionList { get; set; } public List MyStringList { get; set; } public IEnumerable MyStringIEnumerableT { get; set; } public IList MyStringIListT { get; set; } @@ -119,6 +123,10 @@ public class SimpleTestClass : ITestClass @"""MyDateTimeArray"" : [""2019-01-30T12:01:02.0000000Z""]," + @"""MyDateTimeOffsetArray"" : [""2019-01-30T12:01:02.0000000+01:00""]," + @"""MyEnumArray"" : [2]," + // int by default + @"""MyInt16TwoDimensionArray"" : [[10, 11],[20, 21]]," + + @"""MyInt16TwoDimensionList"" : [[10, 11],[20, 21]]," + + @"""MyInt16ThreeDimensionArray"" : [[[11, 12],[13, 14]],[[21,22],[23,24]]]," + + @"""MyInt16ThreeDimensionList"" : [[[11, 12],[13, 14]],[[21,22],[23,24]]]," + @"""MyStringList"" : [""Hello""]," + @"""MyStringIEnumerableT"" : [""Hello""]," + @"""MyStringIListT"" : [""Hello""]," + @@ -183,6 +191,32 @@ public void Initialize() MyDateTimeOffsetArray = new DateTimeOffset[] { new DateTimeOffset(2019, 1, 30, 12, 1, 2, new TimeSpan(1, 0, 0)) }; MyEnumArray = new SampleEnum[] { SampleEnum.Two }; + MyInt16TwoDimensionArray = new int[2][]; + MyInt16TwoDimensionArray[0] = new int[] { 10, 11 }; + MyInt16TwoDimensionArray[1] = new int[] { 20, 21 }; + + MyInt16TwoDimensionList = new List>(); + MyInt16TwoDimensionList.Add(new List { 10, 11 }); + MyInt16TwoDimensionList.Add(new List { 20, 21 }); + + MyInt16ThreeDimensionArray = new int[2][][]; + MyInt16ThreeDimensionArray[0] = new int[2][]; + MyInt16ThreeDimensionArray[1] = new int[2][]; + MyInt16ThreeDimensionArray[0][0] = new int[] { 11, 12 }; + MyInt16ThreeDimensionArray[0][1] = new int[] { 13, 14 }; + MyInt16ThreeDimensionArray[1][0] = new int[] { 21, 22 }; + MyInt16ThreeDimensionArray[1][1] = new int[] { 23, 24 }; + + MyInt16ThreeDimensionList = new List>>(); + var list1 = new List>(); + MyInt16ThreeDimensionList.Add(list1); + list1.Add(new List { 11, 12 }); + list1.Add(new List { 13, 14 }); + var list2 = new List>(); + MyInt16ThreeDimensionList.Add(list2); + list2.Add(new List { 21, 22 }); + list2.Add(new List { 23, 24 }); + MyStringList = new List() { "Hello" }; MyStringIEnumerableT = new string[] { "Hello" }; MyStringIListT = new string[] { "Hello" }; @@ -253,6 +287,34 @@ public void Verify() Assert.Equal(new DateTimeOffset(2019, 1, 30, 12, 1, 2, new TimeSpan(1, 0, 0)), MyDateTimeOffsetArray[0]); Assert.Equal(SampleEnum.Two, MyEnumArray[0]); + Assert.Equal(10, MyInt16TwoDimensionArray[0][0]); + Assert.Equal(11, MyInt16TwoDimensionArray[0][1]); + Assert.Equal(20, MyInt16TwoDimensionArray[1][0]); + Assert.Equal(21, MyInt16TwoDimensionArray[1][1]); + + Assert.Equal(10, MyInt16TwoDimensionList[0][0]); + Assert.Equal(11, MyInt16TwoDimensionList[0][1]); + Assert.Equal(20, MyInt16TwoDimensionList[1][0]); + Assert.Equal(21, MyInt16TwoDimensionList[1][1]); + + Assert.Equal(11, MyInt16ThreeDimensionArray[0][0][0]); + Assert.Equal(12, MyInt16ThreeDimensionArray[0][0][1]); + Assert.Equal(13, MyInt16ThreeDimensionArray[0][1][0]); + Assert.Equal(14, MyInt16ThreeDimensionArray[0][1][1]); + Assert.Equal(21, MyInt16ThreeDimensionArray[1][0][0]); + Assert.Equal(22, MyInt16ThreeDimensionArray[1][0][1]); + Assert.Equal(23, MyInt16ThreeDimensionArray[1][1][0]); + Assert.Equal(24, MyInt16ThreeDimensionArray[1][1][1]); + + Assert.Equal(11, MyInt16ThreeDimensionList[0][0][0]); + Assert.Equal(12, MyInt16ThreeDimensionList[0][0][1]); + Assert.Equal(13, MyInt16ThreeDimensionList[0][1][0]); + Assert.Equal(14, MyInt16ThreeDimensionList[0][1][1]); + Assert.Equal(21, MyInt16ThreeDimensionList[1][0][0]); + Assert.Equal(22, MyInt16ThreeDimensionList[1][0][1]); + Assert.Equal(23, MyInt16ThreeDimensionList[1][1][0]); + Assert.Equal(24, MyInt16ThreeDimensionList[1][1][1]); + Assert.Equal("Hello", MyStringList[0]); Assert.Equal("Hello", MyStringIEnumerableT.First()); Assert.Equal("Hello", MyStringIListT[0]); diff --git a/src/System.Text.Json/tests/Serialization/Value.ReadTests.cs b/src/System.Text.Json/tests/Serialization/Value.ReadTests.cs index a7fe8696be1c..5adca84f6c79 100644 --- a/src/System.Text.Json/tests/Serialization/Value.ReadTests.cs +++ b/src/System.Text.Json/tests/Serialization/Value.ReadTests.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System.Collections.Generic; using Xunit; namespace System.Text.Json.Serialization.Tests @@ -100,25 +99,6 @@ public static void PrimitivesShouldFailWithArrayOrObjectAssignment(Type primitiv Assert.Throws(() => JsonSerializer.Parse(@"{}", primitiveType)); } - [Fact] - public static void ReadPrimitiveArray() - { - int[] i = JsonSerializer.Parse(Encoding.UTF8.GetBytes(@"[1,2]")); - Assert.Equal(1, i[0]); - Assert.Equal(2, i[1]); - - i = JsonSerializer.Parse(Encoding.UTF8.GetBytes(@"[]")); - Assert.Equal(0, i.Length); - } - - [Fact] - public static void ReadArrayWithEnums() - { - SampleEnum[] i = JsonSerializer.Parse(Encoding.UTF8.GetBytes(@"[1,2]")); - Assert.Equal(SampleEnum.One, i[0]); - Assert.Equal(SampleEnum.Two, i[1]); - } - [Fact] public static void EmptyStringInput() { @@ -126,19 +106,6 @@ public static void EmptyStringInput() Assert.Equal(string.Empty, obj); } - [Fact] - public static void ReadPrimitiveArrayFail() - { - // Invalid data - Assert.Throws(() => JsonSerializer.Parse(Encoding.UTF8.GetBytes(@"[1,""a""]"))); - - // Invalid data - Assert.Throws(() => JsonSerializer.Parse>(Encoding.UTF8.GetBytes(@"[1,""a""]"))); - - // Multidimensional arrays currently not supported - Assert.Throws(() => JsonSerializer.Parse(Encoding.UTF8.GetBytes(@"[[1,2],[3,4]]"))); - } - [Fact] public static void ReadPrimitiveExtraBytesFail() { @@ -301,89 +268,5 @@ public static void ValueFail() Assert.Throws(() => JsonSerializer.Parse(unexpectedString)); } - - [Fact] - public static void ReadObjectArray() - { - string data = - "[" + - SimpleTestClass.s_json + - "," + - SimpleTestClass.s_json + - "]"; - - SimpleTestClass[] i = JsonSerializer.Parse(Encoding.UTF8.GetBytes(data)); - - i[0].Verify(); - i[1].Verify(); - } - - [Fact] - public static void ReadEmptyObjectArray() - { - SimpleTestClass[] data = JsonSerializer.Parse("[{}]"); - Assert.Equal(1, data.Length); - Assert.NotNull(data[0]); - } - - [Fact] - public static void ReadPrimitiveJaggedArray() - { - int[][] i = JsonSerializer.Parse(Encoding.UTF8.GetBytes(@"[[1,2],[3,4]]")); - Assert.Equal(1, i[0][0]); - Assert.Equal(2, i[0][1]); - Assert.Equal(3, i[1][0]); - Assert.Equal(4, i[1][1]); - } - - [Fact] - public static void ReadArrayWithInterleavedComments() - { - var options = new JsonSerializerOptions(); - options.ReadCommentHandling = JsonCommentHandling.Skip; - - int[][] i = JsonSerializer.Parse(Encoding.UTF8.GetBytes("[[1,2] // Inline [\n,[3, /* Multi\n]] Line*/4]]"), options); - Assert.Equal(1, i[0][0]); - Assert.Equal(2, i[0][1]); - Assert.Equal(3, i[1][0]); - Assert.Equal(4, i[1][1]); - } - - public class TestClassWithBadData - { - public TestChildClassWithBadData[] Children { get; set; } - } - - public class TestChildClassWithBadData - { - public int MyProperty { get; set; } - } - - [Fact] - public static void ReadConversionFails() - { - byte[] data = Encoding.UTF8.GetBytes( - @"{" + - @"""Children"":[" + - @"{""MyProperty"":""StringButShouldBeInt""}" + - @"]" + - @"}"); - - bool exceptionThrown = false; - - try - { - JsonSerializer.Parse(data); - } - catch (JsonException exception) - { - exceptionThrown = true; - - // Exception should contain property path. - Assert.True(exception.ToString().Contains("[System.Text.Json.Serialization.Tests.ValueTests+TestClassWithBadData].Children.MyProperty")); - } - - Assert.True(exceptionThrown); - } } } diff --git a/src/System.Text.Json/tests/Serialization/Value.WriteTests.cs b/src/System.Text.Json/tests/Serialization/Value.WriteTests.cs index 17b845b2cf12..55f0643a31b0 100644 --- a/src/System.Text.Json/tests/Serialization/Value.WriteTests.cs +++ b/src/System.Text.Json/tests/Serialization/Value.WriteTests.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System.Collections.Generic; -using System.Collections.Immutable; using Xunit; namespace System.Text.Json.Serialization.Tests @@ -55,65 +53,5 @@ public static void WritePrimitives() Assert.Equal(Encoding.UTF8.GetBytes(@"""Hello"""), json.ToArray()); } } - - [Fact] - public static void WritePrimitiveArray() - { - var input = new int[] { 0, 1 }; - string json = JsonSerializer.ToString(input); - Assert.Equal("[0,1]", json); - } - - [Fact] - public static void WriteArrayWithEnums() - { - var input = new SampleEnum[] { SampleEnum.One, SampleEnum.Two }; - string json = JsonSerializer.ToString(input); - Assert.Equal("[1,2]", json); - } - - [Fact] - public static void WriteObjectArray() - { - string json; - - { - SimpleTestClass[] input = new SimpleTestClass[] { new SimpleTestClass(), new SimpleTestClass() }; - input[0].Initialize(); - input[0].Verify(); - - input[1].Initialize(); - input[1].Verify(); - - json = JsonSerializer.ToString(input); - } - - { - SimpleTestClass[] output = JsonSerializer.Parse(json); - Assert.Equal(2, output.Length); - output[0].Verify(); - output[1].Verify(); - } - } - - [Fact] - public static void WriteEmptyObjectArray() - { - object[] arr = new object[]{new object()}; - - string json = JsonSerializer.ToString(arr); - Assert.Equal("[{}]", json); - } - - [Fact] - public static void WritePrimitiveJaggedArray() - { - var input = new int[2][]; - input[0] = new int[] { 1, 2 }; - input[1] = new int[] { 3, 4 }; - - string json = JsonSerializer.ToString(input); - Assert.Equal("[[1,2],[3,4]]", json); - } } } diff --git a/src/System.Text.Json/tests/System.Text.Json.Tests.csproj b/src/System.Text.Json/tests/System.Text.Json.Tests.csproj index 137c99a23b66..f9490f39efbd 100644 --- a/src/System.Text.Json/tests/System.Text.Json.Tests.csproj +++ b/src/System.Text.Json/tests/System.Text.Json.Tests.csproj @@ -29,9 +29,9 @@ + - From 57337477528b0b3344c4f190ea0ad85d5bc19cd0 Mon Sep 17 00:00:00 2001 From: Ahson Khan Date: Thu, 23 May 2019 20:14:50 -0700 Subject: [PATCH 487/607] Fix typo in JsonSerializer api documentation. (#37917) --- .../Text/Json/Serialization/JsonSerializer.Write.ByteArray.cs | 4 ++-- .../Text/Json/Serialization/JsonSerializer.Write.Stream.cs | 4 ++-- .../Text/Json/Serialization/JsonSerializer.Write.String.cs | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.ByteArray.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.ByteArray.cs index b298c75c8d8a..595bac81bbda 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.ByteArray.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.ByteArray.cs @@ -11,7 +11,7 @@ public static partial class JsonSerializer /// /// A UTF-8 representation of the value. /// The value to convert. - /// Options to control the convertion behavior. + /// Options to control the conversion behavior. public static byte[] ToBytes(TValue value, JsonSerializerOptions options = null) { return WriteCoreBytes(value, typeof(TValue), options); @@ -23,7 +23,7 @@ public static byte[] ToBytes(TValue value, JsonSerializerOptions options /// A UTF-8 representation of the value. /// The value to convert. /// The type of the to convert. - /// Options to control the convertion behavior. + /// Options to control the conversion behavior. public static byte[] ToBytes(object value, Type type, JsonSerializerOptions options = null) { VerifyValueAndType(value, type); diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.Stream.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.Stream.cs index 6a53e3aa8ed8..9aa8ecefb6d6 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.Stream.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.Stream.cs @@ -17,7 +17,7 @@ public static partial class JsonSerializer /// A task that represents the asynchronous write operation. /// The value to convert. /// The UTF-8 to write to. - /// Options to control the convertion behavior. + /// Options to control the conversion behavior. /// The which may be used to cancel the write operation. public static Task WriteAsync(TValue value, Stream utf8Json, JsonSerializerOptions options = null, CancellationToken cancellationToken = default) { @@ -31,7 +31,7 @@ public static Task WriteAsync(TValue value, Stream utf8Json, JsonSeriali /// The value to convert. /// The type of the to convert. /// The UTF-8 to write to. - /// Options to control the convertion behavior. + /// Options to control the conversion behavior. /// The which may be used to cancel the write operation. public static Task WriteAsync(object value, Type type, Stream utf8Json, JsonSerializerOptions options = null, CancellationToken cancellationToken = default) { diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.String.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.String.cs index 9dc78b2bd0cb..48c53aa660e9 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.String.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.String.cs @@ -11,7 +11,7 @@ public static partial class JsonSerializer /// /// A representation of the value. /// The value to convert. - /// Options to control the convertion behavior. + /// Options to control the conversion behavior. /// Using a is not as efficient as using UTF-8 /// encoding since the implementation internally uses UTF-8. See also /// and . @@ -27,7 +27,7 @@ public static string ToString(TValue value, JsonSerializerOptions option /// A representation of the value. /// The value to convert. /// The type of the to convert. - /// Options to control the convertion behavior. + /// Options to control the conversion behavior. /// Using a is not as efficient as using UTF-8 /// encoding since the implementation internally uses UTF-8. See also /// and . From 36a8ed9c881f9f45e6d31f49f693a3ce4411a42a Mon Sep 17 00:00:00 2001 From: David Wrighton Date: Thu, 23 May 2019 16:18:07 -0700 Subject: [PATCH 488/607] Fewer ilstubs in corelib from reflection apis (dotnet/coreclr#24708) Rework use of marshalling for RuntimeTypeHandle, RuntimeModule, RuntimeAssembly, and IRuntimeMethodInfo as used by QCalls - Remove special QCall only used marshallers for RuntimeAssembly, RuntimeModule and IRuntimeMethodInfo - Following the pattern of ObjectHandleOnStack, implement QCall handle types for RuntimeAssembly/Module/TypeHandle. Use these in all QCalls that once passed the types directly. - For uses of IRuntimeMethodInfo, follow the existing RuntimeMethodHandleInternal pattern Also perform some replacement of bool marshalling with use of Interop.BOOL, and a few cases of using pointers instead of byref arguments. Fix delivers a relatively small win on startup, and small throughput gains around reflection as IL stubs are no longer necessary for many functions in reflection that once needed them. Reduces methods jitted on powershell startup from 422 to 399, (About 5%) but performance win is only about 5ms on ~400ms as the methods removed are simple. Signed-off-by: dotnet-bot --- .../Windows/Kernel32/Interop.Globalization.cs | 4 ++-- .../Globalization/CultureInfo.Windows.cs | 19 +++++++++++-------- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.Globalization.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.Globalization.cs index cab7537ced53..49d8033e542a 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.Globalization.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.Globalization.cs @@ -101,8 +101,8 @@ internal static extern unsafe bool IsNLSDefinedString( int cchStr); #if !ENABLE_WINRT - [DllImport("Kernel32.dll", CharSet = CharSet.Auto)] - internal static extern bool GetUserPreferredUILanguages(uint dwFlags, out uint pulNumLanguages, char[]? pwszLanguagesBuffer, ref uint pcchLanguagesBuffer); + [DllImport("kernel32.dll", CharSet = CharSet.Auto)] + internal static extern Interop.BOOL GetUserPreferredUILanguages(uint dwFlags, uint* pulNumLanguages, char* pwszLanguagesBuffer, uint* pcchLanguagesBuffer); #endif //!ENABLE_WINRT [DllImport("kernel32.dll", CharSet = CharSet.Unicode)] diff --git a/src/Common/src/CoreLib/System/Globalization/CultureInfo.Windows.cs b/src/Common/src/CoreLib/System/Globalization/CultureInfo.Windows.cs index 67a70d8234a7..d746659fd2c0 100644 --- a/src/Common/src/CoreLib/System/Globalization/CultureInfo.Windows.cs +++ b/src/Common/src/CoreLib/System/Globalization/CultureInfo.Windows.cs @@ -39,7 +39,7 @@ internal static CultureInfo GetUserDefaultCulture() return GetCultureByName(strDefault); } - private static CultureInfo GetUserDefaultUICulture() + private unsafe static CultureInfo GetUserDefaultUICulture() { #if !ENABLE_WINRT if (GlobalizationMode.Invariant) @@ -49,18 +49,21 @@ private static CultureInfo GetUserDefaultUICulture() uint langCount = 0; uint bufLen = 0; - if (Interop.Kernel32.GetUserPreferredUILanguages(MUI_LANGUAGE_NAME, out langCount, null, ref bufLen)) + if (Interop.Kernel32.GetUserPreferredUILanguages(MUI_LANGUAGE_NAME, &langCount, null, &bufLen) != Interop.BOOL.FALSE) { char[] languages = new char[bufLen]; - if (Interop.Kernel32.GetUserPreferredUILanguages(MUI_LANGUAGE_NAME, out langCount, languages, ref bufLen)) + fixed (char* pLanguages = languages) { - int index = 0; - while (languages[index] != (char)0 && index < languages.Length) + if (Interop.Kernel32.GetUserPreferredUILanguages(MUI_LANGUAGE_NAME, &langCount, pLanguages, &bufLen) != Interop.BOOL.FALSE) { - index++; - } + int index = 0; + while (languages[index] != (char)0 && index < languages.Length) + { + index++; + } - return GetCultureByName(new string(languages, 0, index)); + return GetCultureByName(new string(languages, 0, index)); + } } } #endif From c539d6c627b169d45f0b4cf1826b560cd0862abe Mon Sep 17 00:00:00 2001 From: Christopher Watford Date: Thu, 23 May 2019 23:59:39 -0400 Subject: [PATCH 489/607] Address #37794 by removing "UTF-16" when not needed in System.Text.Json docs (#37866) * Remove UTF-16 notes from summary and param comments #37794 * Remove UTF-16 references from JsonEncodedText comments * Address PR review comments by @ahsonkhan --- .../src/System/Text/Json/JsonEncodedText.cs | 6 +-- .../System/Text/Json/Reader/Utf8JsonReader.cs | 6 +-- .../JsonSerializer.Read.String.cs | 4 +- ...Utf8JsonWriter.WriteProperties.DateTime.cs | 4 +- ...onWriter.WriteProperties.DateTimeOffset.cs | 4 +- .../Utf8JsonWriter.WriteProperties.Decimal.cs | 4 +- .../Utf8JsonWriter.WriteProperties.Double.cs | 4 +- .../Utf8JsonWriter.WriteProperties.Float.cs | 4 +- ...nWriter.WriteProperties.FormattedNumber.cs | 2 +- .../Utf8JsonWriter.WriteProperties.Guid.cs | 4 +- .../Utf8JsonWriter.WriteProperties.Literal.cs | 8 ++-- ...JsonWriter.WriteProperties.SignedNumber.cs | 8 ++-- .../Utf8JsonWriter.WriteProperties.String.cs | 46 +++++++++---------- ...onWriter.WriteProperties.UnsignedNumber.cs | 8 ++-- .../Utf8JsonWriter.WriteValues.Comment.cs | 8 ++-- .../Utf8JsonWriter.WriteValues.String.cs | 6 +-- .../System/Text/Json/Writer/Utf8JsonWriter.cs | 8 ++-- 17 files changed, 67 insertions(+), 67 deletions(-) diff --git a/src/System.Text.Json/src/System/Text/Json/JsonEncodedText.cs b/src/System.Text.Json/src/System/Text/Json/JsonEncodedText.cs index c8b0cf6f97e5..8f40de4785f3 100644 --- a/src/System.Text.Json/src/System/Text/Json/JsonEncodedText.cs +++ b/src/System.Text.Json/src/System/Text/Json/JsonEncodedText.cs @@ -34,7 +34,7 @@ private JsonEncodedText(byte[] utf8Value) /// /// Encodes the string text value as a JSON string. /// - /// The UTF-16 encoded value to be transformed as JSON encoded text. + /// The value to be transformed as JSON encoded text. /// /// Thrown if value is null. /// @@ -50,9 +50,9 @@ public static JsonEncodedText Encode(string value) } /// - /// Encodes the UTF-16 text value as a JSON string. + /// Encodes the text value as a JSON string. /// - /// The UTF-16 encoded value to be transformed as JSON encoded text. + /// The value to be transformed as JSON encoded text. /// /// Thrown when the specified value is too large or if it contains invalid UTF-16 characters. /// diff --git a/src/System.Text.Json/src/System/Text/Json/Reader/Utf8JsonReader.cs b/src/System.Text.Json/src/System/Text/Json/Reader/Utf8JsonReader.cs index fab40d44299d..35298877b74e 100644 --- a/src/System.Text.Json/src/System/Text/Json/Reader/Utf8JsonReader.cs +++ b/src/System.Text.Json/src/System/Text/Json/Reader/Utf8JsonReader.cs @@ -304,10 +304,10 @@ private bool TextEqualsHelper(ReadOnlySpan otherUtf8Text) } /// - /// Compares the UTF-16 encoded text to the unescaped JSON token value in the source and returns true if they match. + /// Compares the text to the unescaped JSON token value in the source and returns true if they match. /// - /// The UTF-16 encoded text to compare against. - /// True if the JSON token value in the source matches the UTF-16 encoded look up text. + /// The text to compare against. + /// True if the JSON token value in the source matches the look up text. /// /// Thrown if trying to find a text match on a JSON token that is not a string /// (i.e. other than or ). diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.String.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.String.cs index ad3133f1d494..fc35c4d8062a 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.String.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.String.cs @@ -20,7 +20,7 @@ public static partial class JsonSerializer /// is not compatible with the JSON, /// or when there is remaining data in the Stream. /// - /// Using a UTF-16 is not as efficient as using the + /// Using a is not as efficient as using the /// UTF-8 methods since the implementation natively uses UTF-8. /// public static TValue Parse(string json, JsonSerializerOptions options = null) @@ -46,7 +46,7 @@ public static TValue Parse(string json, JsonSerializerOptions options = /// the is not compatible with the JSON, /// or when there is remaining data in the Stream. /// - /// Using a UTF-16 is not as efficient as using the + /// Using a is not as efficient as using the /// UTF-8 methods since the implementation natively uses UTF-8. /// public static object Parse(string json, Type returnType, JsonSerializerOptions options = null) diff --git a/src/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.WriteProperties.DateTime.cs b/src/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.WriteProperties.DateTime.cs index 185be31ef1c5..e1dcd76a06c4 100644 --- a/src/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.WriteProperties.DateTime.cs +++ b/src/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.WriteProperties.DateTime.cs @@ -40,7 +40,7 @@ private void WriteStringHelper(ReadOnlySpan utf8PropertyName, DateTime val /// /// Writes the property name and value (as a JSON string) as part of a name/value pair of a JSON object. /// - /// The UTF-16 encoded property name of the JSON object to be transcoded and written as UTF-8. + /// The property name of the JSON object to be transcoded and written as UTF-8. /// The value to be written as a JSON string as part of the name/value pair. /// /// The property name is escaped before writing. @@ -60,7 +60,7 @@ public void WriteString(string propertyName, DateTime value) /// /// Writes the property name and value (as a JSON string) as part of a name/value pair of a JSON object. /// - /// The UTF-16 encoded property name of the JSON object to be transcoded and written as UTF-8. + /// The property name of the JSON object to be transcoded and written as UTF-8. /// The value to be written as a JSON string as part of the name/value pair. /// /// The property name is escaped before writing. diff --git a/src/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.WriteProperties.DateTimeOffset.cs b/src/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.WriteProperties.DateTimeOffset.cs index d20bcfac3d20..ea5995f575ca 100644 --- a/src/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.WriteProperties.DateTimeOffset.cs +++ b/src/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.WriteProperties.DateTimeOffset.cs @@ -40,7 +40,7 @@ private void WriteStringHelper(ReadOnlySpan utf8PropertyName, DateTimeOffs /// /// Writes the property name and value (as a JSON string) as part of a name/value pair of a JSON object. /// - /// The UTF-16 encoded property name of the JSON object to be transcoded and written as UTF-8. + /// The property name of the JSON object to be transcoded and written as UTF-8. /// The value to be written as a JSON string as part of the name/value pair. /// /// The property name is escaped before writing. @@ -60,7 +60,7 @@ public void WriteString(string propertyName, DateTimeOffset value) /// /// Writes the property name and value (as a JSON string) as part of a name/value pair of a JSON object. /// - /// The UTF-16 encoded property name of the JSON object to be transcoded and written as UTF-8. + /// The property name of the JSON object to be transcoded and written as UTF-8. /// The value to be written as a JSON string as part of the name/value pair. /// /// The property name is escaped before writing. diff --git a/src/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.WriteProperties.Decimal.cs b/src/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.WriteProperties.Decimal.cs index 90c6cc967119..b0a008c481b0 100644 --- a/src/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.WriteProperties.Decimal.cs +++ b/src/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.WriteProperties.Decimal.cs @@ -40,7 +40,7 @@ private void WriteNumberHelper(ReadOnlySpan utf8PropertyName, decimal valu /// /// Writes the property name and value (as a JSON number) as part of a name/value pair of a JSON object. /// - /// The UTF-16 encoded property name of the JSON object to be transcoded and written as UTF-8. + /// The property name of the JSON object to be transcoded and written as UTF-8. /// The value to be written as a JSON number as part of the name/value pair. /// /// The property name is escaped before writing. @@ -60,7 +60,7 @@ public void WriteNumber(string propertyName, decimal value) /// /// Writes the property name and value (as a JSON number) as part of a name/value pair of a JSON object. /// - /// The UTF-16 encoded property name of the JSON object to be transcoded and written as UTF-8. + /// The property name of the JSON object to be transcoded and written as UTF-8. /// The value to be written as a JSON number as part of the name/value pair. /// /// The property name is escaped before writing. diff --git a/src/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.WriteProperties.Double.cs b/src/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.WriteProperties.Double.cs index 606c5b1cb6b4..889adf9f7916 100644 --- a/src/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.WriteProperties.Double.cs +++ b/src/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.WriteProperties.Double.cs @@ -42,7 +42,7 @@ private void WriteNumberHelper(ReadOnlySpan utf8PropertyName, double value /// /// Writes the property name and value (as a JSON number) as part of a name/value pair of a JSON object. /// - /// The UTF-16 encoded property name of the JSON object to be transcoded and written as UTF-8. + /// The property name of the JSON object to be transcoded and written as UTF-8. /// The value to be written as a JSON number as part of the name/value pair. /// /// The property name is escaped before writing. @@ -62,7 +62,7 @@ public void WriteNumber(string propertyName, double value) /// /// Writes the property name and value (as a JSON number) as part of a name/value pair of a JSON object. /// - /// The UTF-16 encoded property name of the JSON object to be transcoded and written as UTF-8. + /// The property name of the JSON object to be transcoded and written as UTF-8. /// The value to be written as a JSON number as part of the name/value pair. /// /// The property name is escaped before writing. diff --git a/src/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.WriteProperties.Float.cs b/src/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.WriteProperties.Float.cs index 8483347ba066..3d8dfcd5f94e 100644 --- a/src/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.WriteProperties.Float.cs +++ b/src/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.WriteProperties.Float.cs @@ -42,7 +42,7 @@ private void WriteNumberHelper(ReadOnlySpan utf8PropertyName, float value) /// /// Writes the property name and value (as a JSON number) as part of a name/value pair of a JSON object. /// - /// The UTF-16 encoded property name of the JSON object to be transcoded and written as UTF-8. + /// The property name of the JSON object to be transcoded and written as UTF-8. /// The value to be written as a JSON number as part of the name/value pair. /// /// The property name is escaped before writing. @@ -62,7 +62,7 @@ public void WriteNumber(string propertyName, float value) /// /// Writes the property name and value (as a JSON number) as part of a name/value pair of a JSON object. /// - /// The UTF-16 encoded property name of the JSON object to be transcoded and written as UTF-8. + /// The property name of the JSON object to be transcoded and written as UTF-8. /// The value to be written as a JSON number as part of the name/value pair. /// /// The property name is escaped before writing. diff --git a/src/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.WriteProperties.FormattedNumber.cs b/src/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.WriteProperties.FormattedNumber.cs index f7af6fc4a7be..0278814e323d 100644 --- a/src/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.WriteProperties.FormattedNumber.cs +++ b/src/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.WriteProperties.FormattedNumber.cs @@ -12,7 +12,7 @@ public sealed partial class Utf8JsonWriter /// /// Writes the property name and value (as a JSON number) as part of a name/value pair of a JSON object. /// - /// The UTF-16 encoded property name of the JSON object to be transcoded and written as UTF-8. + /// The property name of the JSON object to be transcoded and written as UTF-8. /// The value to be written as a JSON number as part of the name/value pair. /// /// The property name is escaped before writing. diff --git a/src/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.WriteProperties.Guid.cs b/src/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.WriteProperties.Guid.cs index c7d2b3474bb6..e6b3ea881565 100644 --- a/src/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.WriteProperties.Guid.cs +++ b/src/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.WriteProperties.Guid.cs @@ -40,7 +40,7 @@ private void WriteStringHelper(ReadOnlySpan utf8PropertyName, Guid value) /// /// Writes the property name and value (as a JSON string) as part of a name/value pair of a JSON object. /// - /// The UTF-16 encoded property name of the JSON object to be transcoded and written as UTF-8. + /// The property name of the JSON object to be transcoded and written as UTF-8. /// The value to be written as a JSON string as part of the name/value pair. /// /// The property name is escaped before writing. @@ -60,7 +60,7 @@ public void WriteString(string propertyName, Guid value) /// /// Writes the property name and value (as a JSON string) as part of a name/value pair of a JSON object. /// - /// The UTF-16 encoded property name of the JSON object to be transcoded and written as UTF-8. + /// The property name of the JSON object to be transcoded and written as UTF-8. /// The value to be written as a JSON string as part of the name/value pair. /// /// The property name is escaped before writing. diff --git a/src/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.WriteProperties.Literal.cs b/src/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.WriteProperties.Literal.cs index e43dd553d8ad..912bfa41746a 100644 --- a/src/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.WriteProperties.Literal.cs +++ b/src/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.WriteProperties.Literal.cs @@ -37,7 +37,7 @@ private void WriteLiteralHelper(ReadOnlySpan utf8PropertyName, ReadOnlySpa /// /// Writes the property name and the JSON literal "null" as part of a name/value pair of a JSON object. /// - /// The UTF-16 encoded property name of the JSON object to be transcoded and written as UTF-8. + /// The property name of the JSON object to be transcoded and written as UTF-8. /// /// The property name is escaped before writing. /// @@ -53,7 +53,7 @@ public void WriteNull(string propertyName) /// /// Writes the property name and the JSON literal "null" as part of a name/value pair of a JSON object. /// - /// The UTF-16 encoded property name of the JSON object to be transcoded and written as UTF-8. + /// The property name of the JSON object to be transcoded and written as UTF-8. /// /// The property name is escaped before writing. /// @@ -128,7 +128,7 @@ public void WriteBoolean(JsonEncodedText propertyName, bool value) /// /// Writes the property name and value (as a JSON literal "true" or "false") as part of a name/value pair of a JSON object. /// - /// The UTF-16 encoded property name of the JSON object to be transcoded and written as UTF-8. + /// The property name of the JSON object to be transcoded and written as UTF-8. /// The value to be written as a JSON literal "true" or "false" as part of the name/value pair. /// /// The property name is escaped before writing. @@ -145,7 +145,7 @@ public void WriteBoolean(string propertyName, bool value) /// /// Writes the property name and value (as a JSON literal "true" or "false") as part of a name/value pair of a JSON object. /// - /// The UTF-16 encoded property name of the JSON object to be transcoded and written as UTF-8. + /// The property name of the JSON object to be transcoded and written as UTF-8. /// The value to be written as a JSON literal "true" or "false" as part of the name/value pair. /// /// The property name is escaped before writing. diff --git a/src/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.WriteProperties.SignedNumber.cs b/src/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.WriteProperties.SignedNumber.cs index 2fc232b05159..08375765777a 100644 --- a/src/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.WriteProperties.SignedNumber.cs +++ b/src/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.WriteProperties.SignedNumber.cs @@ -40,7 +40,7 @@ private void WriteNumberHelper(ReadOnlySpan utf8PropertyName, long value) /// /// Writes the property name and value (as a JSON number) as part of a name/value pair of a JSON object. /// - /// The UTF-16 encoded property name of the JSON object to be transcoded and written as UTF-8. + /// The property name of the JSON object to be transcoded and written as UTF-8. /// The value to be written as a JSON number as part of the name/value pair. /// /// The property name is escaped before writing. @@ -60,7 +60,7 @@ public void WriteNumber(string propertyName, long value) /// /// Writes the property name and value (as a JSON number) as part of a name/value pair of a JSON object. /// - /// The UTF-16 encoded property name of the JSON object to be transcoded and written as UTF-8. + /// The property name of the JSON object to be transcoded and written as UTF-8. /// The value to be written as a JSON number as part of the name/value pair. /// /// The property name is escaped before writing. @@ -131,7 +131,7 @@ public void WriteNumber(JsonEncodedText propertyName, int value) /// /// Writes the property name and value (as a JSON number) as part of a name/value pair of a JSON object. /// - /// The UTF-16 encoded property name of the JSON object to be transcoded and written as UTF-8. + /// The property name of the JSON object to be transcoded and written as UTF-8. /// The value to be written as a JSON number as part of the name/value pair. /// /// The property name is escaped before writing. @@ -151,7 +151,7 @@ public void WriteNumber(string propertyName, int value) /// /// Writes the property name and value (as a JSON number) as part of a name/value pair of a JSON object. /// - /// The UTF-16 encoded property name of the JSON object to be transcoded and written as UTF-8. + /// The property name of the JSON object to be transcoded and written as UTF-8. /// The value to be written as a JSON number as part of the name/value pair. /// /// The property name is escaped before writing. diff --git a/src/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.WriteProperties.String.cs b/src/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.WriteProperties.String.cs index ee953851fd21..51b317789604 100644 --- a/src/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.WriteProperties.String.cs +++ b/src/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.WriteProperties.String.cs @@ -36,7 +36,7 @@ private void WriteStringHelper(ReadOnlySpan utf8PropertyName, ReadOnlySpan /// /// Writes the property name and pre-encoded value (as a JSON string) as part of a name/value pair of a JSON object. /// - /// The UTF-16 encoded property name of the JSON object to be transcoded and written as UTF-8. + /// The property name of the JSON object to be transcoded and written as UTF-8. /// The JSON encoded value to be written as a UTF-8 transcoded JSON string as part of the name/value pair. /// /// The value should already be escaped when the instance of was created. The property name is escaped before writing. @@ -53,8 +53,8 @@ public void WriteString(string propertyName, JsonEncodedText value) /// /// Writes the property name and string text value (as a JSON string) as part of a name/value pair of a JSON object. /// - /// The UTF-16 encoded property name of the JSON object to be transcoded and written as UTF-8. - /// The UTF-16 encoded value to be written as a UTF-8 transcoded JSON string as part of the name/value pair. + /// The property name of the JSON object to be transcoded and written as UTF-8. + /// The value to be written as a UTF-8 transcoded JSON string as part of the name/value pair. /// /// The property name and value is escaped before writing. /// @@ -68,10 +68,10 @@ public void WriteString(string propertyName, string value) => WriteString(propertyName.AsSpan(), value.AsSpan()); /// - /// Writes the UTF-16 property name and UTF-16 text value (as a JSON string) as part of a name/value pair of a JSON object. + /// Writes the property name and text value (as a JSON string) as part of a name/value pair of a JSON object. /// - /// The UTF-16 encoded property name of the JSON object to be transcoded and written as UTF-8. - /// The UTF-16 encoded value to be written as a UTF-8 transcoded JSON string as part of the name/value pair. + /// The property name of the JSON object to be transcoded and written as UTF-8. + /// The value to be written as a UTF-8 transcoded JSON string as part of the name/value pair. /// /// The property name and value is escaped before writing. /// @@ -119,7 +119,7 @@ public void WriteString(ReadOnlySpan utf8PropertyName, ReadOnlySpan /// Writes the pre-encoded property name and string text value (as a JSON string) as part of a name/value pair of a JSON object. /// /// The JSON encoded property name of the JSON object to be transcoded and written as UTF-8. - /// The UTF-16 encoded value to be written as a UTF-8 transcoded JSON string as part of the name/value pair. + /// The value to be written as a UTF-8 transcoded JSON string as part of the name/value pair. /// /// The property name should already be escaped when the instance of was created. The value is escaped before writing. /// @@ -133,10 +133,10 @@ public void WriteString(JsonEncodedText propertyName, string value) => WriteString(propertyName, value.AsSpan()); /// - /// Writes the pre-encoded property name and UTF-16 text value (as a JSON string) as part of a name/value pair of a JSON object. + /// Writes the pre-encoded property name and text value (as a JSON string) as part of a name/value pair of a JSON object. /// /// The JSON encoded property name of the JSON object to be transcoded and written as UTF-8. - /// The UTF-16 encoded value to be written as a UTF-8 transcoded JSON string as part of the name/value pair. + /// The value to be written as a UTF-8 transcoded JSON string as part of the name/value pair. /// /// The property name should already be escaped when the instance of was created. The value is escaped before writing. /// @@ -173,10 +173,10 @@ private void WriteStringHelperEscapeValue(ReadOnlySpan utf8PropertyName, R } /// - /// Writes the property name and UTF-16 text value (as a JSON string) as part of a name/value pair of a JSON object. + /// Writes the property name and text value (as a JSON string) as part of a name/value pair of a JSON object. /// - /// The UTF-16 encoded property name of the JSON object to be transcoded and written as UTF-8. - /// The UTF-16 encoded value to be written as a UTF-8 transcoded JSON string as part of the name/value pair. + /// The property name of the JSON object to be transcoded and written as UTF-8. + /// The value to be written as a UTF-8 transcoded JSON string as part of the name/value pair. /// /// The property name and value is escaped before writing. /// @@ -190,10 +190,10 @@ public void WriteString(string propertyName, ReadOnlySpan value) => WriteString(propertyName.AsSpan(), value); /// - /// Writes the UTF-8 property name and UTF-16 text value (as a JSON string) as part of a name/value pair of a JSON object. + /// Writes the UTF-8 property name and text value (as a JSON string) as part of a name/value pair of a JSON object. /// /// The UTF-8 encoded property name of the JSON object to be written. - /// The UTF-16 encoded value to be written as a UTF-8 transcoded JSON string as part of the name/value pair. + /// The value to be written as a UTF-8 transcoded JSON string as part of the name/value pair. /// /// The property name and value is escaped before writing. /// @@ -256,7 +256,7 @@ private void WriteStringHelperEscapeValue(ReadOnlySpan utf8PropertyName, R /// /// Writes the property name and UTF-8 text value (as a JSON string) as part of a name/value pair of a JSON object. /// - /// The UTF-16 encoded property name of the JSON object to be transcoded and written as UTF-8. + /// The property name of the JSON object to be transcoded and written as UTF-8. /// The UTF-8 encoded value to be written as a JSON string as part of the name/value pair. /// /// The property name and value is escaped before writing. @@ -271,9 +271,9 @@ public void WriteString(string propertyName, ReadOnlySpan utf8Value) => WriteString(propertyName.AsSpan(), utf8Value); /// - /// Writes the UTF-16 property name and UTF-8 text value (as a JSON string) as part of a name/value pair of a JSON object. + /// Writes the property name and UTF-8 text value (as a JSON string) as part of a name/value pair of a JSON object. /// - /// The UTF-16 encoded property name of the JSON object to be transcoded and written as UTF-8. + /// The property name of the JSON object to be transcoded and written as UTF-8. /// The UTF-8 encoded value to be written as a JSON string as part of the name/value pair. /// /// The property name and value is escaped before writing. @@ -295,9 +295,9 @@ public void WriteString(ReadOnlySpan propertyName, ReadOnlySpan utf8 } /// - /// Writes the UTF-16 property name and pre-encoded value (as a JSON string) as part of a name/value pair of a JSON object. + /// Writes the property name and pre-encoded value (as a JSON string) as part of a name/value pair of a JSON object. /// - /// The UTF-16 encoded property name of the JSON object to be transcoded and written as UTF-8. + /// The property name of the JSON object to be transcoded and written as UTF-8. /// The JSON encoded value to be written as a UTF-8 transcoded JSON string as part of the name/value pair. /// /// The value should already be escaped when the instance of was created. The property name is escaped before writing. @@ -335,10 +335,10 @@ private void WriteStringHelperEscapeProperty(ReadOnlySpan propertyName, Re } /// - /// Writes the UTF-16 property name and string text value (as a JSON string) as part of a name/value pair of a JSON object. + /// Writes the property name and string text value (as a JSON string) as part of a name/value pair of a JSON object. /// - /// The UTF-16 encoded property name of the JSON object to be transcoded and written as UTF-8. - /// The UTF-16 encoded value to be written as a UTF-8 transcoded JSON string as part of the name/value pair. + /// The property name of the JSON object to be transcoded and written as UTF-8. + /// The value to be written as a UTF-8 transcoded JSON string as part of the name/value pair. /// /// The property name and value is escaped before writing. /// @@ -395,7 +395,7 @@ private void WriteStringHelperEscapeProperty(ReadOnlySpan utf8PropertyName /// Writes the UTF-8 property name and string text value (as a JSON string) as part of a name/value pair of a JSON object. /// /// The UTF-8 encoded property name of the JSON object to be written. - /// The UTF-16 encoded value to be written as a UTF-8 transcoded JSON string as part of the name/value pair. + /// The value to be written as a UTF-8 transcoded JSON string as part of the name/value pair. /// /// The property name and value is escaped before writing. /// diff --git a/src/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.WriteProperties.UnsignedNumber.cs b/src/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.WriteProperties.UnsignedNumber.cs index 7576cfafb072..9461d2129e99 100644 --- a/src/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.WriteProperties.UnsignedNumber.cs +++ b/src/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.WriteProperties.UnsignedNumber.cs @@ -41,7 +41,7 @@ private void WriteNumberHelper(ReadOnlySpan utf8PropertyName, ulong value) /// /// Writes the property name and value (as a JSON number) as part of a name/value pair of a JSON object. /// - /// The UTF-16 encoded property name of the JSON object to be transcoded and written as UTF-8. + /// The property name of the JSON object to be transcoded and written as UTF-8. /// The value to be written as a JSON number as part of the name/value pair. /// /// The property name is escaped before writing. @@ -62,7 +62,7 @@ public void WriteNumber(string propertyName, ulong value) /// /// Writes the property name and value (as a JSON number) as part of a name/value pair of a JSON object. /// - /// The UTF-16 encoded property name of the JSON object to be transcoded and written as UTF-8. + /// The property name of the JSON object to be transcoded and written as UTF-8. /// The value to be written as a JSON number as part of the name/value pair. /// /// The property name is escaped before writing. @@ -136,7 +136,7 @@ public void WriteNumber(JsonEncodedText propertyName, uint value) /// /// Writes the property name and value (as a JSON number) as part of a name/value pair of a JSON object. /// - /// The UTF-16 encoded property name of the JSON object to be transcoded and written as UTF-8. + /// The property name of the JSON object to be transcoded and written as UTF-8. /// The value to be written as a JSON number as part of the name/value pair. /// /// The property name is escaped before writing. @@ -157,7 +157,7 @@ public void WriteNumber(string propertyName, uint value) /// /// Writes the property name and value (as a JSON number) as part of a name/value pair of a JSON object. /// - /// The UTF-16 encoded property name of the JSON object to be transcoded and written as UTF-8. + /// The property name of the JSON object to be transcoded and written as UTF-8. /// The value to be written as a JSON number as part of the name/value pair. /// /// The property name is escaped before writing. diff --git a/src/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.WriteValues.Comment.cs b/src/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.WriteValues.Comment.cs index ede191813948..4e5178b88220 100644 --- a/src/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.WriteValues.Comment.cs +++ b/src/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.WriteValues.Comment.cs @@ -16,7 +16,7 @@ public sealed partial class Utf8JsonWriter /// /// Writes the string text value (as a JSON comment). /// - /// The UTF-16 encoded value to be written as a UTF-8 transcoded JSON comment within /*..*/. + /// The value to be written as a UTF-8 transcoded JSON comment within /*..*/. /// /// The comment value is not escaped before writing. /// @@ -27,14 +27,14 @@ public void WriteCommentValue(string value) => WriteCommentValue(value.AsSpan()); /// - /// Writes the UTF-16 text value (as a JSON comment). + /// Writes the text value (as a JSON comment). /// - /// The UTF-16 encoded value to be written as a UTF-8 transcoded JSON comment within /*..*/. + /// The value to be written as a UTF-8 transcoded JSON comment within /*..*/. /// /// The comment value is not escaped before writing. /// /// - /// Thrown when the specified value is too large OR if the given UTF-16 text value contains a comment delimiter (i.e. */). + /// Thrown when the specified value is too large OR if the given text value contains a comment delimiter (i.e. */). /// public void WriteCommentValue(ReadOnlySpan value) { diff --git a/src/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.WriteValues.String.cs b/src/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.WriteValues.String.cs index e89bdc2413f4..60d35380d5d5 100644 --- a/src/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.WriteValues.String.cs +++ b/src/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.WriteValues.String.cs @@ -35,7 +35,7 @@ private void WriteStringValueHelper(ReadOnlySpan utf8Value) /// /// Writes the string text value (as a JSON string) as an element of a JSON array. /// - /// The UTF-16 encoded value to be written as a UTF-8 transcoded JSON string element of a JSON array. + /// The value to be written as a UTF-8 transcoded JSON string element of a JSON array. /// /// The value is escaped before writing. /// @@ -49,9 +49,9 @@ public void WriteStringValue(string value) => WriteStringValue(value.AsSpan()); /// - /// Writes the UTF-16 text value (as a JSON string) as an element of a JSON array. + /// Writes the text value (as a JSON string) as an element of a JSON array. /// - /// The UTF-16 encoded value to be written as a UTF-8 transcoded JSON string element of a JSON array. + /// The value to be written as a UTF-8 transcoded JSON string element of a JSON array. /// /// The value is escaped before writing. /// diff --git a/src/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.cs b/src/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.cs index d7396de01499..41101c725170 100644 --- a/src/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.cs +++ b/src/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.cs @@ -703,7 +703,7 @@ private void WriteStartEscapeProperty(ReadOnlySpan utf8PropertyName, byte /// /// Writes the beginning of a JSON array with a property name as the key. /// - /// The UTF-16 encoded property name of the JSON array to be transcoded and written as UTF-8. + /// The property name of the JSON array to be transcoded and written as UTF-8. /// /// The property name is escaped before writing. /// @@ -720,7 +720,7 @@ public void WriteStartArray(string propertyName) /// /// Writes the beginning of a JSON object with a property name as the key. /// - /// The UTF-16 encoded property name of the JSON object to be transcoded and written as UTF-8. + /// The property name of the JSON object to be transcoded and written as UTF-8. /// /// The property name is escaped before writing. /// @@ -737,7 +737,7 @@ public void WriteStartObject(string propertyName) /// /// Writes the beginning of a JSON array with a property name as the key. /// - /// The UTF-16 encoded property name of the JSON array to be transcoded and written as UTF-8. + /// The property name of the JSON array to be transcoded and written as UTF-8. /// /// The property name is escaped before writing. /// @@ -763,7 +763,7 @@ public void WriteStartArray(ReadOnlySpan propertyName) /// /// Writes the beginning of a JSON object with a property name as the key. /// - /// The UTF-16 encoded property name of the JSON object to be transcoded and written as UTF-8. + /// The property name of the JSON object to be transcoded and written as UTF-8. /// /// The property name is escaped before writing. /// From 48e46131579063b7438c8be22de479670338afbb Mon Sep 17 00:00:00 2001 From: Jan Kotas Date: Thu, 23 May 2019 17:38:52 -0700 Subject: [PATCH 490/607] Delete FEATURE_TESTHOOK (dotnet/coreclr#24746) Signed-off-by: dotnet-bot --- .../src/CoreLib/System/Diagnostics/Tracing/EventSource.cs | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/Common/src/CoreLib/System/Diagnostics/Tracing/EventSource.cs b/src/Common/src/CoreLib/System/Diagnostics/Tracing/EventSource.cs index e16a57f74347..9f59da9dfb55 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/Tracing/EventSource.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/Tracing/EventSource.cs @@ -3204,13 +3204,6 @@ private static bool AttributeTypeNamesMatch(Type attributeType, Type reflectedAt if (eventSourceType.IsAbstract() && (flags & EventManifestOptions.Strict) == 0) return null; -#if DEBUG && ES_BUILD_STANDALONE && TEST_SUPPORT - TestSupport.TestHooks.MaybeThrow(eventSourceType, - TestSupport.Category.ManifestError, - "EventSource_CreateManifestAndDescriptors", - new ArgumentException("EventSource_CreateManifestAndDescriptors")); -#endif - try { MethodInfo[] methods = eventSourceType.GetMethods(BindingFlags.DeclaredOnly | BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Instance); From ec7a7794fceb4a627096c8fee2bac4c73c3a8f96 Mon Sep 17 00:00:00 2001 From: Santiago Fernandez Madero Date: Thu, 23 May 2019 17:39:30 -0700 Subject: [PATCH 491/607] Make AppDomain.GetThreadPrincipal() internal (dotnet/coreclr#24747) Signed-off-by: dotnet-bot --- src/Common/src/CoreLib/System/AppDomain.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Common/src/CoreLib/System/AppDomain.cs b/src/Common/src/CoreLib/System/AppDomain.cs index 9c5a02c505cd..0884c61a40ee 100644 --- a/src/Common/src/CoreLib/System/AppDomain.cs +++ b/src/Common/src/CoreLib/System/AppDomain.cs @@ -390,7 +390,7 @@ public void SetThreadPrincipal(IPrincipal principal) return oh?.Unwrap(); } - public IPrincipal? GetThreadPrincipal() + internal IPrincipal? GetThreadPrincipal() { IPrincipal? principal = _defaultPrincipal; if (principal == null) From cbc9701436853421b389e118e410e7470c887353 Mon Sep 17 00:00:00 2001 From: Andrew Stanton-Nurse Date: Fri, 24 May 2019 06:50:01 -0700 Subject: [PATCH 492/607] fix #36798 by updating PipeReader doc comment (#37919) Fixes #36798 Corrects an inaccurate doc comment in System.IO.Pipelines.PipeReader --- src/System.IO.Pipelines/src/System/IO/Pipelines/PipeReader.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/System.IO.Pipelines/src/System/IO/Pipelines/PipeReader.cs b/src/System.IO.Pipelines/src/System/IO/Pipelines/PipeReader.cs index fafa50b89394..beb2e14e6a61 100644 --- a/src/System.IO.Pipelines/src/System/IO/Pipelines/PipeReader.cs +++ b/src/System.IO.Pipelines/src/System/IO/Pipelines/PipeReader.cs @@ -71,7 +71,7 @@ public virtual Stream AsStream() public abstract void Complete(Exception exception = null); /// - /// Cancel the pending operation. If there is none, cancels next operation, without completing the . + /// Registers a callback that gets executed when the side of the pipe is completed /// public abstract void OnWriterCompleted(Action callback, object state); From b63b6f8246e46d2388759cc23561e5f04ed95542 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Fri, 24 May 2019 10:02:17 -0400 Subject: [PATCH 493/607] Update dependencies from https://github.com/dotnet/arcade build 20190523.11 (#37925) - Microsoft.DotNet.XUnitExtensions - 2.4.0-beta.19273.11 - Microsoft.DotNet.XUnitConsoleRunner - 2.5.1-beta.19273.11 - Microsoft.DotNet.VersionTools.Tasks - 1.0.0-beta.19273.11 - Microsoft.DotNet.ApiCompat - 1.0.0-beta.19273.11 - Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19273.11 - Microsoft.DotNet.Build.Tasks.Configuration - 1.0.0-beta.19273.11 - Microsoft.DotNet.Build.Tasks.Feed - 2.2.0-beta.19273.11 - Microsoft.DotNet.Build.Tasks.Packaging - 1.0.0-beta.19273.11 - Microsoft.DotNet.CodeAnalysis - 1.0.0-beta.19273.11 - Microsoft.DotNet.CoreFxTesting - 1.0.0-beta.19273.11 - Microsoft.DotNet.GenAPI - 1.0.0-beta.19273.11 - Microsoft.DotNet.GenFacades - 1.0.0-beta.19273.11 - Microsoft.DotNet.Helix.Sdk - 2.0.0-beta.19273.11 - Microsoft.DotNet.RemoteExecutor - 1.0.0-beta.19273.11 --- eng/Version.Details.xml | 56 ++++++++++++++++++++--------------------- eng/Versions.props | 24 +++++++++--------- eng/common/tools.sh | 9 ++++--- global.json | 4 +-- 4 files changed, 47 insertions(+), 46 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 99bcd5814ce9..25cafffee6b8 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -34,65 +34,65 @@ https://github.com/dotnet/corefx b9b357f9a5a6ccf6a70c2e13b5a7d84a3ed1a684 - + https://github.com/dotnet/arcade - 86e674361bdcefecbd8199ab62d0b1a6cb25703d + 02a90cc69d2d32bbde9e6e0e41186711c591de27 https://github.com/dotnet/standard 8f6300e1f771d40dee4017f62ce885eb8251c322 - + https://github.com/dotnet/arcade - 86e674361bdcefecbd8199ab62d0b1a6cb25703d + 02a90cc69d2d32bbde9e6e0e41186711c591de27 - + https://github.com/dotnet/arcade - 86e674361bdcefecbd8199ab62d0b1a6cb25703d + 02a90cc69d2d32bbde9e6e0e41186711c591de27 - + https://github.com/dotnet/arcade - 86e674361bdcefecbd8199ab62d0b1a6cb25703d + 02a90cc69d2d32bbde9e6e0e41186711c591de27 - + https://github.com/dotnet/arcade - 86e674361bdcefecbd8199ab62d0b1a6cb25703d + 02a90cc69d2d32bbde9e6e0e41186711c591de27 - + https://github.com/dotnet/arcade - 86e674361bdcefecbd8199ab62d0b1a6cb25703d + 02a90cc69d2d32bbde9e6e0e41186711c591de27 - + https://github.com/dotnet/arcade - 86e674361bdcefecbd8199ab62d0b1a6cb25703d + 02a90cc69d2d32bbde9e6e0e41186711c591de27 - + https://github.com/dotnet/arcade - 86e674361bdcefecbd8199ab62d0b1a6cb25703d + 02a90cc69d2d32bbde9e6e0e41186711c591de27 - + https://github.com/dotnet/arcade - 86e674361bdcefecbd8199ab62d0b1a6cb25703d + 02a90cc69d2d32bbde9e6e0e41186711c591de27 - + https://github.com/dotnet/arcade - 86e674361bdcefecbd8199ab62d0b1a6cb25703d + 02a90cc69d2d32bbde9e6e0e41186711c591de27 - + https://github.com/dotnet/arcade - 86e674361bdcefecbd8199ab62d0b1a6cb25703d + 02a90cc69d2d32bbde9e6e0e41186711c591de27 - + https://github.com/dotnet/arcade - 86e674361bdcefecbd8199ab62d0b1a6cb25703d + 02a90cc69d2d32bbde9e6e0e41186711c591de27 - + https://github.com/dotnet/arcade - 86e674361bdcefecbd8199ab62d0b1a6cb25703d + 02a90cc69d2d32bbde9e6e0e41186711c591de27 - + https://github.com/dotnet/arcade - 86e674361bdcefecbd8199ab62d0b1a6cb25703d + 02a90cc69d2d32bbde9e6e0e41186711c591de27 https://dev.azure.com/dnceng/internal/_git/dotnet-optimization diff --git a/eng/Versions.props b/eng/Versions.props index 3ce3e163b3ed..f1ff7357d34e 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -23,18 +23,18 @@ - 1.0.0-beta.19272.13 - 1.0.0-beta.19272.13 - 1.0.0-beta.19272.13 - 1.0.0-beta.19272.13 - 2.4.0-beta.19272.13 - 2.5.1-beta.19272.13 - 1.0.0-beta.19272.13 - 1.0.0-beta.19272.13 - 1.0.0-beta.19272.13 - 1.0.0-beta.19272.13 - 2.2.0-beta.19272.13 - 1.0.0-beta.19272.13 + 1.0.0-beta.19273.11 + 1.0.0-beta.19273.11 + 1.0.0-beta.19273.11 + 1.0.0-beta.19273.11 + 2.4.0-beta.19273.11 + 2.5.1-beta.19273.11 + 1.0.0-beta.19273.11 + 1.0.0-beta.19273.11 + 1.0.0-beta.19273.11 + 1.0.0-beta.19273.11 + 2.2.0-beta.19273.11 + 1.0.0-beta.19273.11 3.0.0-preview6-27722-02 3.0.0-preview6-27722-02 diff --git a/eng/common/tools.sh b/eng/common/tools.sh index 34a23e9476d4..fd26f6fbb275 100644 --- a/eng/common/tools.sh +++ b/eng/common/tools.sh @@ -389,14 +389,15 @@ function StopProcesses { } function MSBuild { - args=$@ + local args=$@ if [[ "$pipelines_log" == true ]]; then InitializeBuildTool InitializeToolset - _toolset_dir="${_InitializeToolset%/*}" - _loggerPath="$_toolset_dir/$_InitializeBuildToolFramework/Microsoft.DotNet.Arcade.Sdk.dll" - args=( "${args[@]}" "-logger:$_loggerPath" ) + local toolset_dir="${_InitializeToolset%/*}" + local logger_path="$toolset_dir/$_InitializeBuildToolFramework/Microsoft.DotNet.Arcade.Sdk.dll" + args=( "${args[@]}" "-logger:$logger_path" ) fi + MSBuild-Core ${args[@]} } diff --git a/global.json b/global.json index ad9495ca7153..9cea3c675eb3 100644 --- a/global.json +++ b/global.json @@ -3,8 +3,8 @@ "dotnet": "3.0.100-preview6-011681" }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19272.13", - "Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19272.13", + "Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19273.11", + "Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19273.11", "FIX-85B6-MERGE-9C38-CONFLICT": "1.0.0", "Microsoft.NET.Sdk.IL": "3.0.0-preview6-27721-71" } From 2fe86381d5ec18bf1a24eddd504b2b304a554774 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Fri, 24 May 2019 10:03:09 -0400 Subject: [PATCH 494/607] Update dependencies from https://github.com/dotnet/core-setup build 20190523.08 (#37926) - Microsoft.NETCore.App - 3.0.0-preview6-27723-08 - Microsoft.NETCore.DotNetHost - 3.0.0-preview6-27723-08 - Microsoft.NETCore.DotNetHostPolicy - 3.0.0-preview6-27723-08 --- eng/Version.Details.xml | 12 ++++++------ eng/Versions.props | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 25cafffee6b8..8016ecebf1af 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -14,17 +14,17 @@ - + https://github.com/dotnet/core-setup - 4573cea18beb40dc9a41014798060e48ff044c63 + 20426e8c486d8715337cb6438ec70bc3619a514d - + https://github.com/dotnet/core-setup - 4573cea18beb40dc9a41014798060e48ff044c63 + 20426e8c486d8715337cb6438ec70bc3619a514d - + https://github.com/dotnet/core-setup - 4573cea18beb40dc9a41014798060e48ff044c63 + 20426e8c486d8715337cb6438ec70bc3619a514d https://github.com/dotnet/corefx diff --git a/eng/Versions.props b/eng/Versions.props index f1ff7357d34e..06aff4da04e2 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -36,9 +36,9 @@ 2.2.0-beta.19273.11 1.0.0-beta.19273.11 - 3.0.0-preview6-27722-02 - 3.0.0-preview6-27722-02 - 3.0.0-preview6-27722-02 + 3.0.0-preview6-27723-08 + 3.0.0-preview6-27723-08 + 3.0.0-preview6-27723-08 3.0.0-preview6-27721-71 3.0.0-preview6-27721-71 From 555d6e7991cec1f03b8782bd3fa4cfe5e7bcaa4d Mon Sep 17 00:00:00 2001 From: dotnet-maestro-bot Date: Fri, 24 May 2019 07:03:33 -0700 Subject: [PATCH 495/607] Update ProjectNTfs to beta-27724-00 (#37921) --- eng/dependencies.props | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/dependencies.props b/eng/dependencies.props index 38d22a72fa6e..4dc8d2d6163a 100644 --- a/eng/dependencies.props +++ b/eng/dependencies.props @@ -9,12 +9,12 @@ These ref versions are pulled from https://github.com/dotnet/versions. --> - d2c4b69bd45385b465e3141184f319655e661d71 + 082c015090aa667b372899f06a5af829807ee5b3 - beta-27723-00 + beta-27724-00 From 58d1cd2f5458416dbdb39f3d76368bac9fdea0bc Mon Sep 17 00:00:00 2001 From: dotnet-maestro-bot Date: Fri, 24 May 2019 06:46:47 -0700 Subject: [PATCH 496/607] Update BuildTools, CoreClr to preview4-04022-01, preview6-27721-71, respectively (master) (#24369) * Update BuildTools, CoreClr to preview4-04022-01, preview6-27721-71, respectively * Use `Nullable=enable` rather than `NullableContextOptions=enable` * Resolving new nullability warnings * PR Feedback Signed-off-by: dotnet-bot --- .../src/CoreLib/System.Private.CoreLib.Shared.projitems | 2 +- src/Common/src/CoreLib/System/Progress.cs | 4 ++-- .../src/CoreLib/System/Threading/Tasks/FutureFactory.cs | 2 +- src/Common/src/CoreLib/System/Threading/ThreadPool.cs | 8 ++++---- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/Common/src/CoreLib/System.Private.CoreLib.Shared.projitems b/src/Common/src/CoreLib/System.Private.CoreLib.Shared.projitems index 7a44b25de496..2edb4b357919 100644 --- a/src/Common/src/CoreLib/System.Private.CoreLib.Shared.projitems +++ b/src/Common/src/CoreLib/System.Private.CoreLib.Shared.projitems @@ -8,7 +8,7 @@ - enable + enable false diff --git a/src/Common/src/CoreLib/System/Progress.cs b/src/Common/src/CoreLib/System/Progress.cs index c757da33dc5e..f29849378b11 100644 --- a/src/Common/src/CoreLib/System/Progress.cs +++ b/src/Common/src/CoreLib/System/Progress.cs @@ -81,9 +81,9 @@ protected virtual void OnReport(T value) /// Invokes the action and event callbacks. /// The progress value. - private void InvokeHandlers(object state) + private void InvokeHandlers(object? state) { - T value = (T)state; + T value = (T)state!; Action? handler = _handler; EventHandler changedEvent = ProgressChanged; diff --git a/src/Common/src/CoreLib/System/Threading/Tasks/FutureFactory.cs b/src/Common/src/CoreLib/System/Threading/Tasks/FutureFactory.cs index b00b623c2734..e8be5bd09121 100644 --- a/src/Common/src/CoreLib/System/Threading/Tasks/FutureFactory.cs +++ b/src/Common/src/CoreLib/System/Threading/Tasks/FutureFactory.cs @@ -660,7 +660,7 @@ internal static Task FromAsyncImpl( // RespectParentCancellation. Task t = new Task(new Action(delegate { - FromAsyncCoreLogic(asyncResult, endFunction, endAction, promise, requiresSynchronization: true); + FromAsyncCoreLogic(asyncResult!, endFunction, endAction, promise, requiresSynchronization: true); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 }), (object?)null, null, default, TaskCreationOptions.None, InternalTaskOptions.None, null); diff --git a/src/Common/src/CoreLib/System/Threading/ThreadPool.cs b/src/Common/src/CoreLib/System/Threading/ThreadPool.cs index da4df11e4f6e..064227bf51b6 100644 --- a/src/Common/src/CoreLib/System/Threading/ThreadPool.cs +++ b/src/Common/src/CoreLib/System/Threading/ThreadPool.cs @@ -926,15 +926,15 @@ internal _ThreadPoolWaitOrTimerCallback(WaitOrTimerCallback waitOrTimerCallback, } } - private static void WaitOrTimerCallback_Context_t(object state) => + private static void WaitOrTimerCallback_Context_t(object? state) => WaitOrTimerCallback_Context(state, timedOut: true); - private static void WaitOrTimerCallback_Context_f(object state) => + private static void WaitOrTimerCallback_Context_f(object? state) => WaitOrTimerCallback_Context(state, timedOut: false); - private static void WaitOrTimerCallback_Context(object state, bool timedOut) + private static void WaitOrTimerCallback_Context(object? state, bool timedOut) { - _ThreadPoolWaitOrTimerCallback helper = (_ThreadPoolWaitOrTimerCallback)state; + _ThreadPoolWaitOrTimerCallback helper = (_ThreadPoolWaitOrTimerCallback)state!; helper._waitOrTimerCallback(helper._state, timedOut); } From 4e342b94a06e21604cd805d0340ef871adc47c43 Mon Sep 17 00:00:00 2001 From: Anirudh Agnihotry Date: Fri, 24 May 2019 08:50:13 -0700 Subject: [PATCH 497/607] rename ToBytes to ToUtf8Bytes (#37912) --- src/System.Text.Json/ref/System.Text.Json.cs | 4 ++-- .../Json/Serialization/JsonSerializer.Write.ByteArray.cs | 4 ++-- .../Text/Json/Serialization/JsonSerializer.Write.String.cs | 4 ++-- src/System.Text.Json/tests/Serialization/SpanTests.cs | 4 ++-- .../tests/Serialization/Value.WriteTests.cs | 6 +++--- src/System.Text.Json/tests/Utf8JsonWriterTests.cs | 2 +- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/System.Text.Json/ref/System.Text.Json.cs b/src/System.Text.Json/ref/System.Text.Json.cs index 935efd7dd87a..fd42e29f0c4b 100644 --- a/src/System.Text.Json/ref/System.Text.Json.cs +++ b/src/System.Text.Json/ref/System.Text.Json.cs @@ -382,8 +382,8 @@ public static partial class JsonSerializer public static TValue Parse(string json, System.Text.Json.Serialization.JsonSerializerOptions options = null) { throw null; } public static System.Threading.Tasks.ValueTask ReadAsync(System.IO.Stream utf8Json, System.Type returnType, System.Text.Json.Serialization.JsonSerializerOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static System.Threading.Tasks.ValueTask ReadAsync(System.IO.Stream utf8Json, System.Text.Json.Serialization.JsonSerializerOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static byte[] ToBytes(object value, System.Type type, System.Text.Json.Serialization.JsonSerializerOptions options = null) { throw null; } - public static byte[] ToBytes(TValue value, System.Text.Json.Serialization.JsonSerializerOptions options = null) { throw null; } + public static byte[] ToUtf8Bytes(object value, System.Type type, System.Text.Json.Serialization.JsonSerializerOptions options = null) { throw null; } + public static byte[] ToUtf8Bytes(TValue value, System.Text.Json.Serialization.JsonSerializerOptions options = null) { throw null; } public static string ToString(object value, System.Type type, System.Text.Json.Serialization.JsonSerializerOptions options = null) { throw null; } public static string ToString(TValue value, System.Text.Json.Serialization.JsonSerializerOptions options = null) { throw null; } public static System.Threading.Tasks.Task WriteAsync(object value, System.Type type, System.IO.Stream utf8Json, System.Text.Json.Serialization.JsonSerializerOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.ByteArray.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.ByteArray.cs index 595bac81bbda..77698428fe33 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.ByteArray.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.ByteArray.cs @@ -12,7 +12,7 @@ public static partial class JsonSerializer /// A UTF-8 representation of the value. /// The value to convert. /// Options to control the conversion behavior. - public static byte[] ToBytes(TValue value, JsonSerializerOptions options = null) + public static byte[] ToUtf8Bytes(TValue value, JsonSerializerOptions options = null) { return WriteCoreBytes(value, typeof(TValue), options); } @@ -24,7 +24,7 @@ public static byte[] ToBytes(TValue value, JsonSerializerOptions options /// The value to convert. /// The type of the to convert. /// Options to control the conversion behavior. - public static byte[] ToBytes(object value, Type type, JsonSerializerOptions options = null) + public static byte[] ToUtf8Bytes(object value, Type type, JsonSerializerOptions options = null) { VerifyValueAndType(value, type); return WriteCoreBytes(value, type, options); diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.String.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.String.cs index 48c53aa660e9..3a408a8d9549 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.String.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.String.cs @@ -13,7 +13,7 @@ public static partial class JsonSerializer /// The value to convert. /// Options to control the conversion behavior. /// Using a is not as efficient as using UTF-8 - /// encoding since the implementation internally uses UTF-8. See also + /// encoding since the implementation internally uses UTF-8. See also /// and . /// public static string ToString(TValue value, JsonSerializerOptions options = null) @@ -29,7 +29,7 @@ public static string ToString(TValue value, JsonSerializerOptions option /// The type of the to convert. /// Options to control the conversion behavior. /// Using a is not as efficient as using UTF-8 - /// encoding since the implementation internally uses UTF-8. See also + /// encoding since the implementation internally uses UTF-8. See also /// and . /// public static string ToString(object value, Type type, JsonSerializerOptions options = null) diff --git a/src/System.Text.Json/tests/Serialization/SpanTests.cs b/src/System.Text.Json/tests/Serialization/SpanTests.cs index b8ef567c4177..2dd50b7ed05b 100644 --- a/src/System.Text.Json/tests/Serialization/SpanTests.cs +++ b/src/System.Text.Json/tests/Serialization/SpanTests.cs @@ -60,12 +60,12 @@ public static void NullObjectOutput() byte[] encodedNull = Encoding.UTF8.GetBytes(@"null"); { - byte[] output = JsonSerializer.ToBytes(null, null); + byte[] output = JsonSerializer.ToUtf8Bytes(null, null); Assert.Equal(encodedNull, output); } { - byte[] output = JsonSerializer.ToBytes(null, typeof(NullTests)); + byte[] output = JsonSerializer.ToUtf8Bytes(null, typeof(NullTests)); Assert.Equal(encodedNull, output); } } diff --git a/src/System.Text.Json/tests/Serialization/Value.WriteTests.cs b/src/System.Text.Json/tests/Serialization/Value.WriteTests.cs index 55f0643a31b0..eb557eb522cd 100644 --- a/src/System.Text.Json/tests/Serialization/Value.WriteTests.cs +++ b/src/System.Text.Json/tests/Serialization/Value.WriteTests.cs @@ -29,7 +29,7 @@ public static void WritePrimitives() } { - Span json = JsonSerializer.ToBytes(1); + Span json = JsonSerializer.ToUtf8Bytes(1); Assert.Equal(Encoding.UTF8.GetBytes("1"), json.ToArray()); } @@ -39,7 +39,7 @@ public static void WritePrimitives() } { - Span json = JsonSerializer.ToBytes(long.MaxValue); + Span json = JsonSerializer.ToUtf8Bytes(long.MaxValue); Assert.Equal(Encoding.UTF8.GetBytes(long.MaxValue.ToString()), json.ToArray()); } @@ -49,7 +49,7 @@ public static void WritePrimitives() } { - Span json = JsonSerializer.ToBytes("Hello"); + Span json = JsonSerializer.ToUtf8Bytes("Hello"); Assert.Equal(Encoding.UTF8.GetBytes(@"""Hello"""), json.ToArray()); } } diff --git a/src/System.Text.Json/tests/Utf8JsonWriterTests.cs b/src/System.Text.Json/tests/Utf8JsonWriterTests.cs index 34f97e9be512..7eb66b6b9ba1 100644 --- a/src/System.Text.Json/tests/Utf8JsonWriterTests.cs +++ b/src/System.Text.Json/tests/Utf8JsonWriterTests.cs @@ -3504,7 +3504,7 @@ public void WriteDateTimeOffset_TrimsFractionCorrectly(string testStr, string ex public void WriteDateTime_TrimsFractionCorrectly_SerializerRoundtrip() { DateTime utcNow = DateTime.UtcNow; - Assert.Equal(utcNow, Serialization.JsonSerializer.Parse(Serialization.JsonSerializer.ToBytes(utcNow), typeof(DateTime))); + Assert.Equal(utcNow, Serialization.JsonSerializer.Parse(Serialization.JsonSerializer.ToUtf8Bytes(utcNow), typeof(DateTime))); } private static void WriteTooLargeHelper(JsonWriterOptions options, ReadOnlySpan key, ReadOnlySpan value, bool noThrow = false) From af031b017d106a8fdb560500fada0d28ac92509e Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Fri, 24 May 2019 11:56:01 -0400 Subject: [PATCH 498/607] [master] Update dependencies from dotnet/standard (#37891) * Update dependencies from https://github.com/dotnet/standard build 20190523.1 - NETStandard.Library - 2.1.0-prerelease.19273.1 * Update dependencies from https://github.com/dotnet/standard build 20190523.2 - NETStandard.Library - 2.1.0-prerelease.19273.2 * Update dependencies from https://github.com/dotnet/standard build 20190524.1 - NETStandard.Library - 2.1.0-prerelease.19274.1 * Update dependencies from https://github.com/dotnet/standard build 20190524.2 - NETStandard.Library - 2.1.0-prerelease.19274.2 --- eng/Version.Details.xml | 4 ++-- eng/Versions.props | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 8016ecebf1af..05e0dc22ebfe 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -38,9 +38,9 @@ https://github.com/dotnet/arcade 02a90cc69d2d32bbde9e6e0e41186711c591de27 - + https://github.com/dotnet/standard - 8f6300e1f771d40dee4017f62ce885eb8251c322 + dbf0273ad76a5279703ee5d6e9ae2788b0fe594a https://github.com/dotnet/arcade diff --git a/eng/Versions.props b/eng/Versions.props index 06aff4da04e2..dfbad1cede13 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -46,7 +46,7 @@ 3.0.0-preview6.19271.9 4.6.0-preview6.19271.9 - 2.1.0-prerelease.19272.2 + 2.1.0-prerelease.19274.2 99.99.99-master-20190521.3 From 564ced2a4cfcb02c1efc1e0da83c54f2b9073ea4 Mon Sep 17 00:00:00 2001 From: Santiago Fernandez Madero Date: Fri, 24 May 2019 09:20:48 -0700 Subject: [PATCH 499/607] Re-generate System.Runtime.InteropServices ref source against implementation (#37914) * Re-generate System.Runtime.InteropServices ref source against implementation * PR Feedback --- eng/DefaultGenApiDocIds.txt | 1 + .../ref/System.Runtime.InteropServices.cs | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/eng/DefaultGenApiDocIds.txt b/eng/DefaultGenApiDocIds.txt index 2baff23ad3b2..c0649f4f6c61 100644 --- a/eng/DefaultGenApiDocIds.txt +++ b/eng/DefaultGenApiDocIds.txt @@ -29,6 +29,7 @@ T:System.Runtime.InteropServices.ComDefaultInterfaceAttribute T:System.Runtime.InteropServices.ComVisibleAttribute T:System.Runtime.InteropServices.GuidAttribute T:System.Runtime.InteropServices.InterfaceTypeAttribute +T:System.Runtime.InteropServices.LCIDConversionAttribute T:System.Runtime.InteropServices.StructLayoutAttribute T:System.Security.Permissions.EnvironmentPermissionAttribute T:System.Security.Permissions.FileIOPermissionAttribute diff --git a/src/System.Runtime.InteropServices/ref/System.Runtime.InteropServices.cs b/src/System.Runtime.InteropServices/ref/System.Runtime.InteropServices.cs index d06b89bf167d..3fed247cb519 100644 --- a/src/System.Runtime.InteropServices/ref/System.Runtime.InteropServices.cs +++ b/src/System.Runtime.InteropServices/ref/System.Runtime.InteropServices.cs @@ -136,6 +136,7 @@ public AllowReversePInvokeCallsAttribute() { } public partial struct ArrayWithOffset { private object _dummy; + private int _dummyPrimitive; public ArrayWithOffset(object array, int offset) { throw null; } public override bool Equals(object obj) { throw null; } public bool Equals(System.Runtime.InteropServices.ArrayWithOffset obj) { throw null; } @@ -210,12 +211,16 @@ public partial class ComAwareEventInfo : System.Reflection.EventInfo public ComAwareEventInfo(System.Type type, string eventName) { } public override System.Reflection.EventAttributes Attributes { get { throw null; } } public override System.Type DeclaringType { get { throw null; } } + public override int MetadataToken { get { throw null; } } + public override System.Reflection.Module Module { get { throw null; } } public override string Name { get { throw null; } } public override System.Type ReflectedType { get { throw null; } } public override void AddEventHandler(object target, System.Delegate handler) { } public override System.Reflection.MethodInfo GetAddMethod(bool nonPublic) { throw null; } public override object[] GetCustomAttributes(bool inherit) { throw null; } public override object[] GetCustomAttributes(System.Type attributeType, bool inherit) { throw null; } + public override System.Collections.Generic.IList GetCustomAttributesData() { throw null; } + public override System.Reflection.MethodInfo[] GetOtherMethods(bool nonPublic) { throw null; } public override System.Reflection.MethodInfo GetRaiseMethod(bool nonPublic) { throw null; } public override System.Reflection.MethodInfo GetRemoveMethod(bool nonPublic) { throw null; } public override bool IsDefined(System.Type attributeType, bool inherit) { throw null; } From 47d169ad422564aff1b9d040c95cd4f002f3bbd4 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Fri, 24 May 2019 12:38:03 -0400 Subject: [PATCH 500/607] [master] Update dependencies from dotnet/corefx (#37890) * Update dependencies from https://github.com/dotnet/corefx build 20190522.8 - runtime.native.System.IO.Ports - 4.6.0-preview6.19272.8 - Microsoft.NETCore.Platforms - 3.0.0-preview6.19272.8 * Update dependencies from https://github.com/dotnet/corefx build 20190523.8 - runtime.native.System.IO.Ports - 4.6.0-preview6.19273.8 - Microsoft.NETCore.Platforms - 3.0.0-preview6.19273.8 --- eng/Version.Details.xml | 8 ++++---- eng/Versions.props | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 05e0dc22ebfe..b402aabe8427 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -26,13 +26,13 @@ https://github.com/dotnet/core-setup 20426e8c486d8715337cb6438ec70bc3619a514d - + https://github.com/dotnet/corefx - b9b357f9a5a6ccf6a70c2e13b5a7d84a3ed1a684 + c539d6c627b169d45f0b4cf1826b560cd0862abe - + https://github.com/dotnet/corefx - b9b357f9a5a6ccf6a70c2e13b5a7d84a3ed1a684 + c539d6c627b169d45f0b4cf1826b560cd0862abe https://github.com/dotnet/arcade diff --git a/eng/Versions.props b/eng/Versions.props index dfbad1cede13..72b836c8418d 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -43,8 +43,8 @@ 3.0.0-preview6-27721-71 3.0.0-preview6-27721-71 - 3.0.0-preview6.19271.9 - 4.6.0-preview6.19271.9 + 3.0.0-preview6.19273.8 + 4.6.0-preview6.19273.8 2.1.0-prerelease.19274.2 From 3232bbdf246257690cb2710609de6ff9aa3412ce Mon Sep 17 00:00:00 2001 From: Ganbarukamo41 Date: Sat, 25 May 2019 01:40:58 +0900 Subject: [PATCH 501/607] Fix binary bitwise operators with resized BitArray (#37876) * fix binary bitwise operators with resized bitarray * Use `Length` property instead of array.Length to avoid operating on unused area * Add tests for binary bitwise operators using resized bitarrays * Revert micro-optimisations --- .../src/System/Collections/BitArray.cs | 6 +-- .../tests/BitArray/BitArray_OperatorsTests.cs | 54 +++++++++++++++++++ 2 files changed, 57 insertions(+), 3 deletions(-) diff --git a/src/System.Collections/src/System/Collections/BitArray.cs b/src/System.Collections/src/System/Collections/BitArray.cs index ecb0c214bdba..bf5b6c84be9d 100644 --- a/src/System.Collections/src/System/Collections/BitArray.cs +++ b/src/System.Collections/src/System/Collections/BitArray.cs @@ -264,7 +264,7 @@ public unsafe BitArray And(BitArray value) if (Length != value.Length) throw new ArgumentException(SR.Arg_ArrayLengthsDiffer); - int count = m_array.Length; + int count = GetInt32ArrayLengthFromBitLength(Length); switch (count) { @@ -310,7 +310,7 @@ public unsafe BitArray Or(BitArray value) if (Length != value.Length) throw new ArgumentException(SR.Arg_ArrayLengthsDiffer); - int count = m_array.Length; + int count = GetInt32ArrayLengthFromBitLength(Length); switch (count) { @@ -356,7 +356,7 @@ public unsafe BitArray Xor(BitArray value) if (Length != value.Length) throw new ArgumentException(SR.Arg_ArrayLengthsDiffer); - int count = m_array.Length; + int count = GetInt32ArrayLengthFromBitLength(Length); switch (count) { diff --git a/src/System.Collections/tests/BitArray/BitArray_OperatorsTests.cs b/src/System.Collections/tests/BitArray/BitArray_OperatorsTests.cs index 0ea86503fa39..cb80d57ea459 100644 --- a/src/System.Collections/tests/BitArray/BitArray_OperatorsTests.cs +++ b/src/System.Collections/tests/BitArray/BitArray_OperatorsTests.cs @@ -187,6 +187,60 @@ public static void Xor_Invalid() AssertExtensions.Throws("value", () => bitArray1.Xor(null)); } + + public static IEnumerable Resize_TestData() + { + yield return new object[] { new BitArray(32), new BitArray(64), 32, 32 }; + yield return new object[] { new BitArray(32), new BitArray(64), 64, 64 }; + yield return new object[] { new BitArray(64), new BitArray(32), 32, 32 }; + yield return new object[] { new BitArray(64), new BitArray(32), 64, 64 }; + yield return new object[] { new BitArray(288), new BitArray(32), 288, 288 }; + yield return new object[] { new BitArray(288), new BitArray(32), 32, 32 }; + yield return new object[] { new BitArray(32), new BitArray(288), 288, 288 }; + yield return new object[] { new BitArray(32), new BitArray(288), 32, 32 }; + yield return new object[] { new BitArray(1), new BitArray(9), 9, 9 }; + yield return new object[] { new BitArray(1), new BitArray(9), 1, 1 }; + yield return new object[] { new BitArray(9), new BitArray(1), 9, 9 }; + yield return new object[] { new BitArray(9), new BitArray(1), 1, 1 }; + yield return new object[] { new BitArray(287), new BitArray(32), 32, 32 }; + yield return new object[] { new BitArray(287), new BitArray(32), 287, 287 }; + yield return new object[] { new BitArray(32), new BitArray(287), 32, 32 }; + yield return new object[] { new BitArray(32), new BitArray(287), 287, 287 }; + yield return new object[] { new BitArray(289), new BitArray(32), 289, 289 }; + yield return new object[] { new BitArray(289), new BitArray(32), 32, 32 }; + yield return new object[] { new BitArray(32), new BitArray(289), 289, 289 }; + yield return new object[] { new BitArray(32), new BitArray(289), 32, 32 }; + } + + [Theory] + [MemberData(nameof(Resize_TestData))] + public static void And_With_Resize(BitArray left, BitArray right, int newLeftLength, int newRightLength) + { + left.Length = newLeftLength; + right.Length = newRightLength; + + left.And(right); + } + + [Theory] + [MemberData(nameof(Resize_TestData))] + public static void Or_With_Resize(BitArray left, BitArray right, int newLeftLength, int newRightLength) + { + left.Length = newLeftLength; + right.Length = newRightLength; + + left.Or(right); + } + + [Theory] + [MemberData(nameof(Resize_TestData))] + public static void Xor_With_Resize(BitArray left, BitArray right, int newLeftLength, int newRightLength) + { + left.Length = newLeftLength; + right.Length = newRightLength; + + left.Xor(right); + } } } From bf7dbd6d37285a147dd30f5dfca6582046dcabc7 Mon Sep 17 00:00:00 2001 From: Tarek Mahmoud Sayed Date: Fri, 24 May 2019 15:05:04 -0700 Subject: [PATCH 502/607] Use Thread instead of Task.Run in some Task tests (#37932) Stephen Toub pointed that it is possible when using Task.Run, there could be some ThreadLocal fields on the thread executing the task holding a reference to the object we are trying to GC collect and finalize. The fix here is use Thread objects instead of Task. --- .../AsyncTaskMethodBuilderTests.cs | 18 +++++++----------- .../tests/Task/ExecutionContextFlowTest.cs | 18 +++++++----------- 2 files changed, 14 insertions(+), 22 deletions(-) diff --git a/src/System.Threading.Tasks/tests/System.Runtime.CompilerServices/AsyncTaskMethodBuilderTests.cs b/src/System.Threading.Tasks/tests/System.Runtime.CompilerServices/AsyncTaskMethodBuilderTests.cs index 25f07fff5d07..495c359ae831 100644 --- a/src/System.Threading.Tasks/tests/System.Runtime.CompilerServices/AsyncTaskMethodBuilderTests.cs +++ b/src/System.Threading.Tasks/tests/System.Runtime.CompilerServices/AsyncTaskMethodBuilderTests.cs @@ -539,7 +539,8 @@ public static async Task AsyncMethodsDropsStateMachineAndExecutionContextUponCom var tcs = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); Task t = null; - await Task.Run(delegate // avoid any issues with the stack keeping the object alive, and escape xunit sync ctx + + Thread runner = new Thread(() => { async Task YieldOnceAsync(object s) { @@ -548,18 +549,13 @@ async Task YieldOnceAsync(object s) } var state = new InvokeActionOnFinalization { Action = () => tcs.SetResult(true) }; - var al = new AsyncLocal(args => { - // Temporary logging to get more info when the test timeout to look who hold a reference to the finalizer object. - string currentValue = args.CurrentValue == null ? "'null'" : "'Object'"; - string previousValue = args.PreviousValue == null ? "'null'" : "'Object'"; - Console.WriteLine($"AsyncMethodsDropsStateMachineAndExecutionContextUponCompletion: Thread Id: {Thread.CurrentThread.ManagedThreadId} Current Value: {currentValue} Previous Value: {previousValue} ThreadContextChanged: {args.ThreadContextChanged}"); - }) - { - Value = state - }; // ensure the object is stored in ExecutionContext + var al = new AsyncLocal() { Value = state }; // ensure the object is stored in ExecutionContext t = YieldOnceAsync(state); // ensure the object is stored in the state machine al.Value = null; - }); + }) { IsBackground = true }; + + runner.Start(); + runner.Join(); await t; // wait for the async method to complete and clear out its state await Task.Yield(); // ensure associated state is not still on the stack as part of the antecedent's execution diff --git a/src/System.Threading.Tasks/tests/Task/ExecutionContextFlowTest.cs b/src/System.Threading.Tasks/tests/Task/ExecutionContextFlowTest.cs index b4122dca74ff..b53d4f83a77a 100644 --- a/src/System.Threading.Tasks/tests/Task/ExecutionContextFlowTest.cs +++ b/src/System.Threading.Tasks/tests/Task/ExecutionContextFlowTest.cs @@ -42,21 +42,17 @@ public static async Task TaskDropsExecutionContextUponCompletion() var tcs = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); Task t = null; - await Task.Run(delegate // avoid any issues with the stack keeping the object alive + + Thread runner = new Thread(() => { var state = new InvokeActionOnFinalization { Action = () => tcs.SetResult(true) }; - var al = new AsyncLocal(args => { - // Temporary logging to get more info when the test timeout to look who hold a reference to the finalizer object. - string currentValue = args.CurrentValue == null ? "'null'" : "'Object'"; - string previousValue = args.PreviousValue == null ? "'null'" : "'Object'"; - Console.WriteLine($"TaskDropsExecutionContextUponCompletion: Thread Id: {Thread.CurrentThread.ManagedThreadId} Current Value: {currentValue} Previous Value: {previousValue} ThreadContextChanged: {args.ThreadContextChanged}"); - }) - { - Value = state - }; // ensure the object is stored in ExecutionContext + var al = new AsyncLocal(){ Value = state }; // ensure the object is stored in ExecutionContext t = Task.Run(() => { }); // run a task that'll capture EC al.Value = null; - }); + }) { IsBackground = true }; + + runner.Start(); + runner.Join(); await t; // wait for the task method to complete and clear out its state From 94171e0566b9b6073eccf760c47754ed049b8f46 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Fri, 24 May 2019 16:04:10 -0700 Subject: [PATCH 503/607] Update dependencies from https://github.com/dotnet/arcade build 20190524.3 (#37941) - Microsoft.DotNet.XUnitExtensions - 2.4.0-beta.19274.3 - Microsoft.DotNet.XUnitConsoleRunner - 2.5.1-beta.19274.3 - Microsoft.DotNet.VersionTools.Tasks - 1.0.0-beta.19274.3 - Microsoft.DotNet.ApiCompat - 1.0.0-beta.19274.3 - Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19274.3 - Microsoft.DotNet.Build.Tasks.Configuration - 1.0.0-beta.19274.3 - Microsoft.DotNet.Build.Tasks.Feed - 2.2.0-beta.19274.3 - Microsoft.DotNet.Build.Tasks.Packaging - 1.0.0-beta.19274.3 - Microsoft.DotNet.CodeAnalysis - 1.0.0-beta.19274.3 - Microsoft.DotNet.CoreFxTesting - 1.0.0-beta.19274.3 - Microsoft.DotNet.GenAPI - 1.0.0-beta.19274.3 - Microsoft.DotNet.GenFacades - 1.0.0-beta.19274.3 - Microsoft.DotNet.Helix.Sdk - 2.0.0-beta.19274.3 - Microsoft.DotNet.RemoteExecutor - 1.0.0-beta.19274.3 --- eng/Version.Details.xml | 56 ++++++++++++++-------------- eng/Versions.props | 24 ++++++------ eng/common/PublishToPackageFeed.proj | 1 + global.json | 4 +- 4 files changed, 43 insertions(+), 42 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index b402aabe8427..5171967f6e3a 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -34,65 +34,65 @@ https://github.com/dotnet/corefx c539d6c627b169d45f0b4cf1826b560cd0862abe - + https://github.com/dotnet/arcade - 02a90cc69d2d32bbde9e6e0e41186711c591de27 + cb9317c52c891fba6c6c43901ec8621fe2b9bb3b https://github.com/dotnet/standard dbf0273ad76a5279703ee5d6e9ae2788b0fe594a - + https://github.com/dotnet/arcade - 02a90cc69d2d32bbde9e6e0e41186711c591de27 + cb9317c52c891fba6c6c43901ec8621fe2b9bb3b - + https://github.com/dotnet/arcade - 02a90cc69d2d32bbde9e6e0e41186711c591de27 + cb9317c52c891fba6c6c43901ec8621fe2b9bb3b - + https://github.com/dotnet/arcade - 02a90cc69d2d32bbde9e6e0e41186711c591de27 + cb9317c52c891fba6c6c43901ec8621fe2b9bb3b - + https://github.com/dotnet/arcade - 02a90cc69d2d32bbde9e6e0e41186711c591de27 + cb9317c52c891fba6c6c43901ec8621fe2b9bb3b - + https://github.com/dotnet/arcade - 02a90cc69d2d32bbde9e6e0e41186711c591de27 + cb9317c52c891fba6c6c43901ec8621fe2b9bb3b - + https://github.com/dotnet/arcade - 02a90cc69d2d32bbde9e6e0e41186711c591de27 + cb9317c52c891fba6c6c43901ec8621fe2b9bb3b - + https://github.com/dotnet/arcade - 02a90cc69d2d32bbde9e6e0e41186711c591de27 + cb9317c52c891fba6c6c43901ec8621fe2b9bb3b - + https://github.com/dotnet/arcade - 02a90cc69d2d32bbde9e6e0e41186711c591de27 + cb9317c52c891fba6c6c43901ec8621fe2b9bb3b - + https://github.com/dotnet/arcade - 02a90cc69d2d32bbde9e6e0e41186711c591de27 + cb9317c52c891fba6c6c43901ec8621fe2b9bb3b - + https://github.com/dotnet/arcade - 02a90cc69d2d32bbde9e6e0e41186711c591de27 + cb9317c52c891fba6c6c43901ec8621fe2b9bb3b - + https://github.com/dotnet/arcade - 02a90cc69d2d32bbde9e6e0e41186711c591de27 + cb9317c52c891fba6c6c43901ec8621fe2b9bb3b - + https://github.com/dotnet/arcade - 02a90cc69d2d32bbde9e6e0e41186711c591de27 + cb9317c52c891fba6c6c43901ec8621fe2b9bb3b - + https://github.com/dotnet/arcade - 02a90cc69d2d32bbde9e6e0e41186711c591de27 + cb9317c52c891fba6c6c43901ec8621fe2b9bb3b https://dev.azure.com/dnceng/internal/_git/dotnet-optimization diff --git a/eng/Versions.props b/eng/Versions.props index 72b836c8418d..4498070493e2 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -23,18 +23,18 @@ - 1.0.0-beta.19273.11 - 1.0.0-beta.19273.11 - 1.0.0-beta.19273.11 - 1.0.0-beta.19273.11 - 2.4.0-beta.19273.11 - 2.5.1-beta.19273.11 - 1.0.0-beta.19273.11 - 1.0.0-beta.19273.11 - 1.0.0-beta.19273.11 - 1.0.0-beta.19273.11 - 2.2.0-beta.19273.11 - 1.0.0-beta.19273.11 + 1.0.0-beta.19274.3 + 1.0.0-beta.19274.3 + 1.0.0-beta.19274.3 + 1.0.0-beta.19274.3 + 2.4.0-beta.19274.3 + 2.5.1-beta.19274.3 + 1.0.0-beta.19274.3 + 1.0.0-beta.19274.3 + 1.0.0-beta.19274.3 + 1.0.0-beta.19274.3 + 2.2.0-beta.19274.3 + 1.0.0-beta.19274.3 3.0.0-preview6-27723-08 3.0.0-preview6-27723-08 diff --git a/eng/common/PublishToPackageFeed.proj b/eng/common/PublishToPackageFeed.proj index 9120b2d2129e..a1b1333723eb 100644 --- a/eng/common/PublishToPackageFeed.proj +++ b/eng/common/PublishToPackageFeed.proj @@ -54,6 +54,7 @@ https://dotnetfeed.blob.core.windows.net/dotnet-windowsdesktop/index.json https://dotnetfeed.blob.core.windows.net/nuget-nugetclient/index.json https://dotnetfeed.blob.core.windows.net/aspnet-entityframework6/index.json + https://dotnetfeed.blob.core.windows.net/aspnet-blazor/index.json Date: Fri, 24 May 2019 11:02:44 -0700 Subject: [PATCH 504/607] Fix nullable annotation in Array.SetValue Signed-off-by: dotnet-bot --- src/Common/src/CoreLib/System/Array.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Common/src/CoreLib/System/Array.cs b/src/Common/src/CoreLib/System/Array.cs index 0ce724a8e82c..049385bd3d63 100644 --- a/src/Common/src/CoreLib/System/Array.cs +++ b/src/Common/src/CoreLib/System/Array.cs @@ -189,7 +189,7 @@ public void SetValue(object? value, long index1, long index2) this.SetValue(value, iindex1, iindex2); } - public void SetValue(object value, long index1, long index2, long index3) + public void SetValue(object? value, long index1, long index2, long index3) { int iindex1 = (int)index1; int iindex2 = (int)index2; From 1262652a90431a6becfb4333d7955fe4b51d6855 Mon Sep 17 00:00:00 2001 From: Santiago Fernandez Madero Date: Fri, 24 May 2019 11:31:12 -0700 Subject: [PATCH 505/607] Fix Guid.TryParse nullabel annotation Signed-off-by: dotnet-bot --- src/Common/src/CoreLib/System/Guid.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Common/src/CoreLib/System/Guid.cs b/src/Common/src/CoreLib/System/Guid.cs index b27536c22549..3f5abbb5fbc7 100644 --- a/src/Common/src/CoreLib/System/Guid.cs +++ b/src/Common/src/CoreLib/System/Guid.cs @@ -196,7 +196,7 @@ public static Guid Parse(ReadOnlySpan input) return result._parsedGuid; } - public static bool TryParse(string input, out Guid result) + public static bool TryParse(string? input, out Guid result) { if (input == null) { From c7a75c34842286e445cbc57b866e4c0d7e38f38c Mon Sep 17 00:00:00 2001 From: Santiago Fernandez Madero Date: Fri, 24 May 2019 11:54:56 -0700 Subject: [PATCH 506/607] Fix nullable annotation in String.Join Signed-off-by: dotnet-bot --- src/Common/src/CoreLib/System/String.Manipulation.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Common/src/CoreLib/System/String.Manipulation.cs b/src/Common/src/CoreLib/System/String.Manipulation.cs index 75d72dc50b19..d5636410b7f2 100644 --- a/src/Common/src/CoreLib/System/String.Manipulation.cs +++ b/src/Common/src/CoreLib/System/String.Manipulation.cs @@ -626,7 +626,7 @@ public static unsafe string Join(string? separator, IEnumerable values) } } - public static string Join(string? separator, IEnumerable values) + public static string Join(string? separator, IEnumerable values) { if (values == null) { From ca535178383c526a0eb7a00f7ff6df36e0af1ea1 Mon Sep 17 00:00:00 2001 From: Jan Kotas Date: Fri, 24 May 2019 15:24:17 -0700 Subject: [PATCH 507/607] Fix nulable annotations build break (dotnet/coreclr#24768) Signed-off-by: dotnet-bot --- src/Common/src/CoreLib/System/String.Manipulation.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Common/src/CoreLib/System/String.Manipulation.cs b/src/Common/src/CoreLib/System/String.Manipulation.cs index d5636410b7f2..74fff875d69d 100644 --- a/src/Common/src/CoreLib/System/String.Manipulation.cs +++ b/src/Common/src/CoreLib/System/String.Manipulation.cs @@ -633,14 +633,14 @@ public static string Join(string? separator, IEnumerable values) throw new ArgumentNullException(nameof(values)); } - using (IEnumerator en = values.GetEnumerator()) + using (IEnumerator en = values.GetEnumerator()) { if (!en.MoveNext()) { return string.Empty; } - string firstValue = en.Current; + string? firstValue = en.Current; if (!en.MoveNext()) { From 3838e8d657f9201513a78d5e61b869dbd98f1aa5 Mon Sep 17 00:00:00 2001 From: dotnet-maestro <@dotnet-maestro> Date: Sat, 25 May 2019 12:05:13 +0000 Subject: [PATCH 508/607] Update dependencies from https://github.com/dotnet/arcade build 20190524.6 - Microsoft.DotNet.XUnitExtensions - 2.4.0-beta.19274.6 - Microsoft.DotNet.XUnitConsoleRunner - 2.5.1-beta.19274.6 - Microsoft.DotNet.VersionTools.Tasks - 1.0.0-beta.19274.6 - Microsoft.DotNet.ApiCompat - 1.0.0-beta.19274.6 - Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19274.6 - Microsoft.DotNet.Build.Tasks.Configuration - 1.0.0-beta.19274.6 - Microsoft.DotNet.Build.Tasks.Feed - 2.2.0-beta.19274.6 - Microsoft.DotNet.Build.Tasks.Packaging - 1.0.0-beta.19274.6 - Microsoft.DotNet.CodeAnalysis - 1.0.0-beta.19274.6 - Microsoft.DotNet.CoreFxTesting - 1.0.0-beta.19274.6 - Microsoft.DotNet.GenAPI - 1.0.0-beta.19274.6 - Microsoft.DotNet.GenFacades - 1.0.0-beta.19274.6 - Microsoft.DotNet.Helix.Sdk - 2.0.0-beta.19274.6 - Microsoft.DotNet.RemoteExecutor - 1.0.0-beta.19274.6 --- eng/Version.Details.xml | 56 ++++++++++++++++++++--------------------- eng/Versions.props | 24 +++++++++--------- global.json | 4 +-- 3 files changed, 42 insertions(+), 42 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 5171967f6e3a..e6755fa1a5f4 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -34,65 +34,65 @@ https://github.com/dotnet/corefx c539d6c627b169d45f0b4cf1826b560cd0862abe - + https://github.com/dotnet/arcade - cb9317c52c891fba6c6c43901ec8621fe2b9bb3b + b5016f5688dc8ca9f3e4811ee7e2e86ad8907a40 https://github.com/dotnet/standard dbf0273ad76a5279703ee5d6e9ae2788b0fe594a - + https://github.com/dotnet/arcade - cb9317c52c891fba6c6c43901ec8621fe2b9bb3b + b5016f5688dc8ca9f3e4811ee7e2e86ad8907a40 - + https://github.com/dotnet/arcade - cb9317c52c891fba6c6c43901ec8621fe2b9bb3b + b5016f5688dc8ca9f3e4811ee7e2e86ad8907a40 - + https://github.com/dotnet/arcade - cb9317c52c891fba6c6c43901ec8621fe2b9bb3b + b5016f5688dc8ca9f3e4811ee7e2e86ad8907a40 - + https://github.com/dotnet/arcade - cb9317c52c891fba6c6c43901ec8621fe2b9bb3b + b5016f5688dc8ca9f3e4811ee7e2e86ad8907a40 - + https://github.com/dotnet/arcade - cb9317c52c891fba6c6c43901ec8621fe2b9bb3b + b5016f5688dc8ca9f3e4811ee7e2e86ad8907a40 - + https://github.com/dotnet/arcade - cb9317c52c891fba6c6c43901ec8621fe2b9bb3b + b5016f5688dc8ca9f3e4811ee7e2e86ad8907a40 - + https://github.com/dotnet/arcade - cb9317c52c891fba6c6c43901ec8621fe2b9bb3b + b5016f5688dc8ca9f3e4811ee7e2e86ad8907a40 - + https://github.com/dotnet/arcade - cb9317c52c891fba6c6c43901ec8621fe2b9bb3b + b5016f5688dc8ca9f3e4811ee7e2e86ad8907a40 - + https://github.com/dotnet/arcade - cb9317c52c891fba6c6c43901ec8621fe2b9bb3b + b5016f5688dc8ca9f3e4811ee7e2e86ad8907a40 - + https://github.com/dotnet/arcade - cb9317c52c891fba6c6c43901ec8621fe2b9bb3b + b5016f5688dc8ca9f3e4811ee7e2e86ad8907a40 - + https://github.com/dotnet/arcade - cb9317c52c891fba6c6c43901ec8621fe2b9bb3b + b5016f5688dc8ca9f3e4811ee7e2e86ad8907a40 - + https://github.com/dotnet/arcade - cb9317c52c891fba6c6c43901ec8621fe2b9bb3b + b5016f5688dc8ca9f3e4811ee7e2e86ad8907a40 - + https://github.com/dotnet/arcade - cb9317c52c891fba6c6c43901ec8621fe2b9bb3b + b5016f5688dc8ca9f3e4811ee7e2e86ad8907a40 https://dev.azure.com/dnceng/internal/_git/dotnet-optimization diff --git a/eng/Versions.props b/eng/Versions.props index 4498070493e2..918c281eb5ce 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -23,18 +23,18 @@ - 1.0.0-beta.19274.3 - 1.0.0-beta.19274.3 - 1.0.0-beta.19274.3 - 1.0.0-beta.19274.3 - 2.4.0-beta.19274.3 - 2.5.1-beta.19274.3 - 1.0.0-beta.19274.3 - 1.0.0-beta.19274.3 - 1.0.0-beta.19274.3 - 1.0.0-beta.19274.3 - 2.2.0-beta.19274.3 - 1.0.0-beta.19274.3 + 1.0.0-beta.19274.6 + 1.0.0-beta.19274.6 + 1.0.0-beta.19274.6 + 1.0.0-beta.19274.6 + 2.4.0-beta.19274.6 + 2.5.1-beta.19274.6 + 1.0.0-beta.19274.6 + 1.0.0-beta.19274.6 + 1.0.0-beta.19274.6 + 1.0.0-beta.19274.6 + 2.2.0-beta.19274.6 + 1.0.0-beta.19274.6 3.0.0-preview6-27723-08 3.0.0-preview6-27723-08 diff --git a/global.json b/global.json index 002efcd91034..a9417a6ea57a 100644 --- a/global.json +++ b/global.json @@ -3,8 +3,8 @@ "dotnet": "3.0.100-preview6-011681" }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19274.3", - "Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19274.3", + "Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19274.6", + "Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19274.6", "FIX-85B6-MERGE-9C38-CONFLICT": "1.0.0", "Microsoft.NET.Sdk.IL": "3.0.0-preview6-27721-71" } From a59cb1a773af5bf651f461546ac1d89a92519278 Mon Sep 17 00:00:00 2001 From: Krzysztof Wicher Date: Sat, 25 May 2019 09:25:15 -0700 Subject: [PATCH 509/607] Update xml doc comment for JsonSerializerOptions.IgnoreReadOnlyProperties (#37910) * Update xml doc comment for JsonSerializerOptions.IgnoreReadOnlyProperties * 'Note:' -> '' * Update src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializerOptions.cs Co-Authored-By: Carlos Sanchez Lopez <1175054+carlossanlop@users.noreply.github.com> --- .../System/Text/Json/Serialization/JsonSerializerOptions.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializerOptions.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializerOptions.cs index e78e2d39ca7e..70a1cc9edec9 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializerOptions.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializerOptions.cs @@ -123,10 +123,13 @@ public bool IgnoreNullValues } /// - /// Determines whether read-only properties are ignored during serialization and deserialization. + /// Determines whether read-only properties are ignored during serialization. /// A property is read-only if it contains a public getter but not a public setter. /// The default value is false. /// + /// + /// Read-only properties are not deserialized regardless of this setting. + /// /// /// Thrown if this property is set after serialization or deserialization has occurred. /// From 51567c46b4bbb0480b83aeb53aa43d14b43addc3 Mon Sep 17 00:00:00 2001 From: Stephen Toub Date: Sat, 25 May 2019 22:13:05 -0400 Subject: [PATCH 510/607] Stop nulling out lock object in SemaphoreSlim (dotnet/coreclr#24776) SemaphoreSlim.Dispose nulls out its lock object, and that's then used as an indication in other methods whether they should throw ObjectDisposedException. But nulling out an object used for synchronization in other methods is a bad practice, and while SemaphoreSlim.Dispose is not thread-safe to be used concurrently with other usage of the instance, it's still confusing when such usage leads to NullReferenceExceptions due to trying to lock on a null lock object. This change just changes the lock to be readonly, always set, and then whether the instance has been disposed is just a value set on that object (such that it's no larger than it used to be). Signed-off-by: dotnet-bot --- .../CoreLib/System/Threading/SemaphoreSlim.cs | 47 ++++++++++--------- 1 file changed, 26 insertions(+), 21 deletions(-) diff --git a/src/Common/src/CoreLib/System/Threading/SemaphoreSlim.cs b/src/Common/src/CoreLib/System/Threading/SemaphoreSlim.cs index 0214456ca0ef..be0f9112c448 100644 --- a/src/Common/src/CoreLib/System/Threading/SemaphoreSlim.cs +++ b/src/Common/src/CoreLib/System/Threading/SemaphoreSlim.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System.Diagnostics; +using System.Runtime.CompilerServices; using System.Threading.Tasks; namespace System.Threading @@ -47,8 +48,9 @@ public class SemaphoreSlim : IDisposable /// private int m_countOfWaitersPulsedToWake; - // Dummy object used to in lock statements to protect the semaphore count, wait handle and cancelation - private object? m_lockObj; // initialized non-null, then set to null on Dispose // TODO-NULLABLE: Consider using a separate field to track disposal + // Object used to synchronize access to state on the instance. The contained + // Boolean value indicates whether the instance has been disposed. + private readonly StrongBox m_lockObjAndDisposed; // Act as the semaphore wait handle, it's lazily initialized if needed, the first WaitHandle call initialize it // and wait an release sets and resets it respectively as long as it is not null @@ -113,7 +115,7 @@ public WaitHandle AvailableWaitHandle return m_waitHandle; //lock the count to avoid multiple threads initializing the handle if it is null - lock (m_lockObj!) + lock (m_lockObjAndDisposed) { if (m_waitHandle == null) { @@ -169,8 +171,8 @@ public SemaphoreSlim(int initialCount, int maxCount) } m_maxCount = maxCount; - m_lockObj = new object(); m_currentCount = initialCount; + m_lockObjAndDisposed = new StrongBox(); } #endregion @@ -319,7 +321,7 @@ public bool Wait(int millisecondsTimeout, CancellationToken cancellationToken) //Register for cancellation outside of the main lock. //NOTE: Register/unregister inside the lock can deadlock as different lock acquisition orders could - // occur for (1)this.m_lockObj and (2)cts.internalLock + // occur for (1)this.m_lockObjAndDisposed and (2)cts.internalLock CancellationTokenRegistration cancellationTokenRegistration = cancellationToken.UnsafeRegister(s_cancellationTokenCanceledEventHandler, this); try { @@ -349,7 +351,7 @@ public bool Wait(int millisecondsTimeout, CancellationToken cancellationToken) try { } finally { - Monitor.Enter(m_lockObj!, ref lockTaken); + Monitor.Enter(m_lockObjAndDisposed, ref lockTaken); if (lockTaken) { m_waitCount++; @@ -418,7 +420,7 @@ public bool Wait(int millisecondsTimeout, CancellationToken cancellationToken) if (lockTaken) { m_waitCount--; - Monitor.Exit(m_lockObj!); + Monitor.Exit(m_lockObjAndDisposed); } // Unregister the cancellation callback. @@ -462,7 +464,7 @@ private bool WaitUntilCountOrTimeout(int millisecondsTimeout, uint startTime, Ca } } // ** the actual wait ** - bool waitSuccessful = Monitor.Wait(m_lockObj!, remainingWaitMilliseconds); + bool waitSuccessful = Monitor.Wait(m_lockObjAndDisposed, remainingWaitMilliseconds); // This waiter has woken up and this needs to be reflected in the count of waiters pulsed to wake. Since we // don't have thread-specific pulse state, there is not enough information to tell whether this thread woke up @@ -621,7 +623,7 @@ public Task WaitAsync(int millisecondsTimeout, CancellationToken cancellat if (cancellationToken.IsCancellationRequested) return Task.FromCanceled(cancellationToken); - lock (m_lockObj!) + lock (m_lockObjAndDisposed) { // If there are counts available, allow this waiter to succeed. if (m_currentCount > 0) @@ -653,7 +655,7 @@ public Task WaitAsync(int millisecondsTimeout, CancellationToken cancellat /// The created task. private TaskNode CreateAndAddAsyncWaiter() { - Debug.Assert(Monitor.IsEntered(m_lockObj!), "Requires the lock be held"); + Debug.Assert(Monitor.IsEntered(m_lockObjAndDisposed), "Requires the lock be held"); // Create the task var task = new TaskNode(); @@ -683,7 +685,7 @@ private TaskNode CreateAndAddAsyncWaiter() private bool RemoveAsyncWaiter(TaskNode task) { Debug.Assert(task != null, "Expected non-null task"); - Debug.Assert(Monitor.IsEntered(m_lockObj!), "Requires the lock be held"); + Debug.Assert(Monitor.IsEntered(m_lockObjAndDisposed), "Requires the lock be held"); // Is the task in the list? To be in the list, either it's the head or it has a predecessor that's in the list. bool wasInList = m_asyncHead == task || task.Prev != null; @@ -710,7 +712,7 @@ private bool RemoveAsyncWaiter(TaskNode task) private async Task WaitUntilCountOrTimeoutAsync(TaskNode asyncWaiter, int millisecondsTimeout, CancellationToken cancellationToken) { Debug.Assert(asyncWaiter != null, "Waiter should have been constructed"); - Debug.Assert(Monitor.IsEntered(m_lockObj!), "Requires the lock be held"); + Debug.Assert(Monitor.IsEntered(m_lockObjAndDisposed), "Requires the lock be held"); if (millisecondsTimeout != Timeout.Infinite) { @@ -744,7 +746,7 @@ private async Task WaitUntilCountOrTimeoutAsync(TaskNode asyncWaiter, int // If the await completed synchronously, we still hold the lock. If it didn't, // we no longer hold the lock. As such, acquire it. - lock (m_lockObj!) + lock (m_lockObjAndDisposed) { // Remove the task from the list. If we're successful in doing so, // we know that no one else has tried to complete this waiter yet, @@ -795,7 +797,7 @@ public int Release(int releaseCount) } int returnCount; - lock (m_lockObj!) + lock (m_lockObjAndDisposed) { // Read the m_currentCount into a local variable to avoid unnecessary volatile accesses inside the lock. int currentCount = m_currentCount; @@ -829,7 +831,7 @@ public int Release(int releaseCount) m_countOfWaitersPulsedToWake += waitersToNotify; for (int i = 0; i < waitersToNotify; i++) { - Monitor.Pulse(m_lockObj!); + Monitor.Pulse(m_lockObjAndDisposed); } } @@ -895,12 +897,15 @@ protected virtual void Dispose(bool disposing) { if (disposing) { - if (m_waitHandle != null) + WaitHandle? wh = m_waitHandle; + if (wh != null) { - m_waitHandle.Dispose(); + wh.Dispose(); m_waitHandle = null; } - m_lockObj = null!; + + m_lockObjAndDisposed.Value = true; + m_asyncHead = null; m_asyncTail = null; } @@ -914,9 +919,9 @@ private static void CancellationTokenCanceledEventHandler(object? obj) { Debug.Assert(obj is SemaphoreSlim, "Expected a SemaphoreSlim"); SemaphoreSlim semaphore = (SemaphoreSlim)obj; - lock (semaphore.m_lockObj!) + lock (semaphore.m_lockObjAndDisposed) { - Monitor.PulseAll(semaphore.m_lockObj!); //wake up all waiters. + Monitor.PulseAll(semaphore.m_lockObjAndDisposed); //wake up all waiters. } } @@ -926,7 +931,7 @@ private static void CancellationTokenCanceledEventHandler(object? obj) /// private void CheckDispose() { - if (m_lockObj == null) + if (m_lockObjAndDisposed.Value) { throw new ObjectDisposedException(null, SR.SemaphoreSlim_Disposed); } From 9bc507cc2477d3c79ff9d240161d6d9fda97dfbf Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Mon, 27 May 2019 08:41:01 +0200 Subject: [PATCH 511/607] Update dependencies from https://github.com/dotnet/corefx build 20190524.8 (#37952) - runtime.native.System.IO.Ports - 4.6.0-preview6.19274.8 - Microsoft.NETCore.Platforms - 3.0.0-preview6.19274.8 --- eng/Version.Details.xml | 8 ++++---- eng/Versions.props | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 5171967f6e3a..c6a8be6a0ff0 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -26,13 +26,13 @@ https://github.com/dotnet/core-setup 20426e8c486d8715337cb6438ec70bc3619a514d - + https://github.com/dotnet/corefx - c539d6c627b169d45f0b4cf1826b560cd0862abe + ca535178383c526a0eb7a00f7ff6df36e0af1ea1 - + https://github.com/dotnet/corefx - c539d6c627b169d45f0b4cf1826b560cd0862abe + ca535178383c526a0eb7a00f7ff6df36e0af1ea1 https://github.com/dotnet/arcade diff --git a/eng/Versions.props b/eng/Versions.props index 4498070493e2..872b20cc0101 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -43,8 +43,8 @@ 3.0.0-preview6-27721-71 3.0.0-preview6-27721-71 - 3.0.0-preview6.19273.8 - 4.6.0-preview6.19273.8 + 3.0.0-preview6.19274.8 + 4.6.0-preview6.19274.8 2.1.0-prerelease.19274.2 From 5ae791a8dcdf8b8b84ff352f4f0f9fd4957ec051 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Mon, 27 May 2019 08:41:52 +0200 Subject: [PATCH 512/607] Update dependencies from https://github.com/dotnet/core-setup build 20190524.03 (#37951) - Microsoft.NETCore.App - 3.0.0-preview6-27724-03 - Microsoft.NETCore.DotNetHost - 3.0.0-preview6-27724-03 - Microsoft.NETCore.DotNetHostPolicy - 3.0.0-preview6-27724-03 --- eng/Version.Details.xml | 12 ++++++------ eng/Versions.props | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index c6a8be6a0ff0..d22911cf10bf 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -14,17 +14,17 @@ - + https://github.com/dotnet/core-setup - 20426e8c486d8715337cb6438ec70bc3619a514d + 4122653611ecb6e7f964af762b4280ba0e1421c8 - + https://github.com/dotnet/core-setup - 20426e8c486d8715337cb6438ec70bc3619a514d + 4122653611ecb6e7f964af762b4280ba0e1421c8 - + https://github.com/dotnet/core-setup - 20426e8c486d8715337cb6438ec70bc3619a514d + 4122653611ecb6e7f964af762b4280ba0e1421c8 https://github.com/dotnet/corefx diff --git a/eng/Versions.props b/eng/Versions.props index 872b20cc0101..c77313bc8948 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -36,9 +36,9 @@ 2.2.0-beta.19274.3 1.0.0-beta.19274.3 - 3.0.0-preview6-27723-08 - 3.0.0-preview6-27723-08 - 3.0.0-preview6-27723-08 + 3.0.0-preview6-27724-03 + 3.0.0-preview6-27724-03 + 3.0.0-preview6-27724-03 3.0.0-preview6-27721-71 3.0.0-preview6-27721-71 From c31734ad51d054919d27fe83847ad656e095b974 Mon Sep 17 00:00:00 2001 From: Viktor Hofer Date: Mon, 27 May 2019 08:45:38 +0200 Subject: [PATCH 513/607] Remove custom restore for arcade --- build.proj | 8 -------- eng/Build.props | 3 --- 2 files changed, 11 deletions(-) diff --git a/build.proj b/build.proj index 21858a185576..d881d293f38a 100644 --- a/build.proj +++ b/build.proj @@ -26,14 +26,6 @@ - - - - <_ValidProjectsForRestore Include="$(MSBuildProjectFullPath)" /> - - - <_BuildNativeProjects Include="src\Native\build-native.proj" /> diff --git a/eng/Build.props b/eng/Build.props index 71feaecf8884..e44e41b604cb 100644 --- a/eng/Build.props +++ b/eng/Build.props @@ -1,7 +1,4 @@ - - false - From ba19505d72fdd39e9a4f5ca1be1fa2084f76bf0f Mon Sep 17 00:00:00 2001 From: dotnet-maestro-bot Date: Mon, 27 May 2019 00:06:48 -0700 Subject: [PATCH 514/607] Update ProjectNTfs to beta-27727-00 (#37961) --- eng/dependencies.props | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/dependencies.props b/eng/dependencies.props index 4dc8d2d6163a..985005b8dea1 100644 --- a/eng/dependencies.props +++ b/eng/dependencies.props @@ -9,12 +9,12 @@ These ref versions are pulled from https://github.com/dotnet/versions. --> - 082c015090aa667b372899f06a5af829807ee5b3 + 043a15e47721f945748d9c8c5fa394d80434e070 - beta-27724-00 + beta-27727-00 From d58a8ade31b4731759c92df00d0f6398c52f3d83 Mon Sep 17 00:00:00 2001 From: Tomas Weinfurt Date: Mon, 27 May 2019 14:48:04 -0700 Subject: [PATCH 515/607] Move tests with external servers to outerloop (#37934) * move tests with external servers to outerloop * fix Set_ValidValues_Success --- .../HttpClientHandlerTest.MaxConnectionsPerServer.cs | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.MaxConnectionsPerServer.cs b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.MaxConnectionsPerServer.cs index ee9dc8689005..8789884cc723 100644 --- a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.MaxConnectionsPerServer.cs +++ b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.MaxConnectionsPerServer.cs @@ -51,15 +51,7 @@ public void Set_ValidValues_Success(int validValue) { using (HttpClientHandler handler = CreateHttpClientHandler()) { - try - { - handler.MaxConnectionsPerServer = validValue; - } - catch (PlatformNotSupportedException) - { - // Some older libcurls used in some of our Linux CI systems don't support this - Assert.True(RuntimeInformation.IsOSPlatform(OSPlatform.Linux)); - } + handler.MaxConnectionsPerServer = validValue; } } @@ -71,6 +63,7 @@ public void Set_ValidValues_Success(int validValue) [InlineData(3, 2, false)] [InlineData(3, 2, true)] [InlineData(3, 5, false)] + [OuterLoop("Uses external servers")] public async Task GetAsync_MaxLimited_ConcurrentCallsStillSucceed(int maxConnections, int numRequests, bool secure) { using (HttpClientHandler handler = CreateHttpClientHandler()) From 248f09549518a3e83d1428a94a202ed3bc01fafb Mon Sep 17 00:00:00 2001 From: Viktor Hofer Date: Thu, 23 May 2019 19:41:11 +0200 Subject: [PATCH 516/607] Move dotnet-tools config --- {eng => .config}/dotnet-tools.json | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {eng => .config}/dotnet-tools.json (100%) diff --git a/eng/dotnet-tools.json b/.config/dotnet-tools.json similarity index 100% rename from eng/dotnet-tools.json rename to .config/dotnet-tools.json From 13ce38179241564b2146707621edb804c81977ae Mon Sep 17 00:00:00 2001 From: Viktor Hofer Date: Mon, 27 May 2019 17:51:04 +0200 Subject: [PATCH 517/607] Add restore source for repo tools --- eng/Tools.props | 1 + 1 file changed, 1 insertion(+) diff --git a/eng/Tools.props b/eng/Tools.props index 818be9fa30fa..30afcc52c89f 100644 --- a/eng/Tools.props +++ b/eng/Tools.props @@ -3,6 +3,7 @@ https://dotnet.myget.org/F/dotnet-buildtools/api/v3/index.json; https://dotnet.myget.org/F/sourcelink/api/v3/index.json; + https://api.nuget.org/v3/index.json; $(RestoreSources) false From 6033b11330ec30e378b17dc636cb667d103090ac Mon Sep 17 00:00:00 2001 From: dotnet-maestro-bot Date: Mon, 27 May 2019 22:44:43 -0700 Subject: [PATCH 518/607] Update ProjectNTfs to beta-27728-00 --- eng/dependencies.props | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/dependencies.props b/eng/dependencies.props index 985005b8dea1..4d1784c551fd 100644 --- a/eng/dependencies.props +++ b/eng/dependencies.props @@ -9,12 +9,12 @@ These ref versions are pulled from https://github.com/dotnet/versions. --> - 043a15e47721f945748d9c8c5fa394d80434e070 + 4f272caf46eecb273000410ad9d9d0323be49c7d - beta-27727-00 + beta-27728-00 From 09984f24009be8e72c213e6e5f7161ad0fec9003 Mon Sep 17 00:00:00 2001 From: Dan Moseley Date: Mon, 27 May 2019 19:34:19 -0700 Subject: [PATCH 519/607] Call derived ToString on inner exceptions (dotnet/coreclr#24793) * Remove special Appx path and METHOD__EXCEPTION__TO_STRING * Remove Exception.ToString(bool, bool) * Remove Exception.InternalToString and callers * Cache message Signed-off-by: dotnet-bot --- src/Common/src/CoreLib/System/Exception.cs | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/Common/src/CoreLib/System/Exception.cs b/src/Common/src/CoreLib/System/Exception.cs index 1148cdd2f331..521ade0e194a 100644 --- a/src/Common/src/CoreLib/System/Exception.cs +++ b/src/Common/src/CoreLib/System/Exception.cs @@ -140,15 +140,10 @@ public virtual void GetObjectData(SerializationInfo info, StreamingContext conte } public override string ToString() - { - return ToString(true, true); - } - - private string ToString(bool needFileLineInfo, bool needMessage) { string s = GetClassName(); - string? message = (needMessage ? Message : null); + string? message = Message; if (!string.IsNullOrEmpty(message)) { s += ": " + message; @@ -156,11 +151,11 @@ private string ToString(bool needFileLineInfo, bool needMessage) if (_innerException != null) { - s = s + " ---> " + _innerException.ToString(needFileLineInfo, needMessage) + Environment.NewLine + + s = s + " ---> " + _innerException.ToString() + Environment.NewLine + " " + SR.Exception_EndOfInnerExceptionStack; } - string? stackTrace = GetStackTrace(needFileLineInfo); + string? stackTrace = GetStackTrace(needFileInfo: true); if (stackTrace != null) { s += Environment.NewLine + stackTrace; From f90b73ebf00fbe3a4e97fa6445bb69a69985a800 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Tue, 28 May 2019 12:34:33 -0400 Subject: [PATCH 520/607] [master] Update dependencies from dotnet/coreclr (#37953) * Update dependencies from https://github.com/dotnet/coreclr build 20190524.71 - Microsoft.NET.Sdk.IL - 3.0.0-preview6.19274.71 - Microsoft.NETCore.ILAsm - 3.0.0-preview6.19274.71 - Microsoft.NETCore.Runtime.CoreCLR - 3.0.0-preview6.19274.71 * Fix Monitoring tests to reflect newly implemented support * Fix StringBuilder tests to reflect updated unsupported braces behavior * Update dependencies from https://github.com/dotnet/coreclr build 20190527.72 - Microsoft.NET.Sdk.IL - 3.0.0-preview6.19277.72 - Microsoft.NETCore.ILAsm - 3.0.0-preview6.19277.72 - Microsoft.NETCore.Runtime.CoreCLR - 3.0.0-preview6.19277.72 * Fix ordering of retrieving process time values in Monitoring test --- eng/Version.Details.xml | 12 ++-- eng/Versions.props | 4 +- global.json | 2 +- .../tests/System/AppDomainTests.cs | 56 +++++-------------- .../tests/System/Text/StringBuilderTests.cs | 18 +++++- 5 files changed, 41 insertions(+), 51 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index a3fdd64fef37..32d8b74096ee 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -1,16 +1,16 @@ - + https://github.com/dotnet/coreclr - 22288107a7acf7a3cf40f72c0464a722c80b7ba9 + 419b46fc7d0fe0659e7ab521c222b7c921b36e35 - + https://github.com/dotnet/coreclr - 22288107a7acf7a3cf40f72c0464a722c80b7ba9 + 419b46fc7d0fe0659e7ab521c222b7c921b36e35 - + https://github.com/dotnet/coreclr - 22288107a7acf7a3cf40f72c0464a722c80b7ba9 + 419b46fc7d0fe0659e7ab521c222b7c921b36e35 diff --git a/eng/Versions.props b/eng/Versions.props index 08ea7aa4cb88..e450ddc0c128 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -40,8 +40,8 @@ 3.0.0-preview6-27724-03 3.0.0-preview6-27724-03 - 3.0.0-preview6-27721-71 - 3.0.0-preview6-27721-71 + 3.0.0-preview6.19277.72 + 3.0.0-preview6.19277.72 3.0.0-preview6.19274.8 4.6.0-preview6.19274.8 diff --git a/global.json b/global.json index a9417a6ea57a..a822d123334a 100644 --- a/global.json +++ b/global.json @@ -6,6 +6,6 @@ "Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19274.6", "Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19274.6", "FIX-85B6-MERGE-9C38-CONFLICT": "1.0.0", - "Microsoft.NET.Sdk.IL": "3.0.0-preview6-27721-71" + "Microsoft.NET.Sdk.IL": "3.0.0-preview6.19277.72" } } diff --git a/src/System.Runtime.Extensions/tests/System/AppDomainTests.cs b/src/System.Runtime.Extensions/tests/System/AppDomainTests.cs index bc6074bbf484..6558764e9315 100644 --- a/src/System.Runtime.Extensions/tests/System/AppDomainTests.cs +++ b/src/System.Runtime.Extensions/tests/System/AppDomainTests.cs @@ -410,52 +410,26 @@ public void ReflectionOnlyGetAssemblies() Assert.Equal(0, AppDomain.CurrentDomain.ReflectionOnlyGetAssemblies().Length); } + [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] [Fact] public void MonitoringIsEnabled() { - RemoteExecutor.Invoke(() => { - Assert.False(AppDomain.MonitoringIsEnabled); - Assert.Throws(() => { AppDomain.MonitoringIsEnabled = false; }); - - if (PlatformDetection.IsFullFramework) - { - AppDomain.MonitoringIsEnabled = true; - Assert.True(AppDomain.MonitoringIsEnabled); - } - else - { - Assert.Throws(() => { AppDomain.MonitoringIsEnabled = true; }); - } - return RemoteExecutor.SuccessExitCode; - }).Dispose(); - } - - [Fact] - public void MonitoringSurvivedMemorySize() - { - Assert.Throws(() => { var t = AppDomain.CurrentDomain.MonitoringSurvivedMemorySize; }); - } + Assert.True(AppDomain.MonitoringIsEnabled); + Assert.Throws(() => { AppDomain.MonitoringIsEnabled = false; }); + AppDomain.MonitoringIsEnabled = true; - [Fact] - public void MonitoringSurvivedProcessMemorySize() - { - Assert.Throws(() => { var t = AppDomain.MonitoringSurvivedProcessMemorySize; }); - } + object o = new object(); + Assert.InRange(AppDomain.MonitoringSurvivedProcessMemorySize, 1, long.MaxValue); + Assert.InRange(AppDomain.CurrentDomain.MonitoringSurvivedMemorySize, 1, long.MaxValue); + Assert.InRange(AppDomain.CurrentDomain.MonitoringTotalAllocatedMemorySize, 1, long.MaxValue); + GC.KeepAlive(o); - [Fact] - public void MonitoringTotalAllocatedMemorySize() - { - Assert.Throws(() => { - var t = AppDomain.CurrentDomain.MonitoringTotalAllocatedMemorySize; - }); - } - - [Fact] - public void MonitoringTotalProcessorTime() - { - Assert.Throws(() => { - var t = AppDomain.CurrentDomain.MonitoringTotalProcessorTime; - }); + using (Process p = Process.GetCurrentProcess()) + { + TimeSpan processTime = p.UserProcessorTime; + TimeSpan monitoringTime = AppDomain.CurrentDomain.MonitoringTotalProcessorTime; + Assert.InRange(monitoringTime, processTime, TimeSpan.MaxValue); + } } #pragma warning disable 618 diff --git a/src/System.Runtime/tests/System/Text/StringBuilderTests.cs b/src/System.Runtime/tests/System/Text/StringBuilderTests.cs index eee6b89d9613..f981bfab2f25 100644 --- a/src/System.Runtime/tests/System/Text/StringBuilderTests.cs +++ b/src/System.Runtime/tests/System/Text/StringBuilderTests.cs @@ -764,7 +764,6 @@ public static IEnumerable AppendFormat_TestData() yield return new object[] { "Hello", null, ", Foo {0,9:D6}", new object[] { 1 }, "Hello, Foo 000001" }; // Positive minimum length and custom format yield return new object[] { "Hello", null, ", Foo {0,-9:D6}", new object[] { 1 }, "Hello, Foo 000001 " }; // Negative length and custom format - yield return new object[] { "Hello", null, ", Foo {0:{{X}}Y{{Z}}} {0:X{{Y}}Z}", new object[] { 1 }, "Hello, Foo {X}Y{Z} X{Y}Z" }; // Custom format (with escaped curly braces) yield return new object[] { "Hello", null, ", Foo {{{0}", new object[] { 1 }, "Hello, Foo {1" }; // Escaped open curly braces yield return new object[] { "Hello", null, ", Foo }}{0}", new object[] { 1 }, "Hello, Foo }1" }; // Escaped closed curly braces yield return new object[] { "Hello", null, ", Foo {0} {{0}}", new object[] { 1 }, "Hello, Foo 1 {0}" }; // Escaped placeholder @@ -894,6 +893,7 @@ public static void AppendFormat_Invalid() Assert.Throws(() => builder.AppendFormat("}", "")); // Format has unescaped } Assert.Throws(() => builder.AppendFormat("}a", "")); // Format has unescaped } + Assert.Throws(() => builder.AppendFormat("{0:}}", "")); // Format has unescaped } Assert.Throws(() => builder.AppendFormat("{\0", "")); // Format has invalid character after { Assert.Throws(() => builder.AppendFormat("{a", "")); // Format has invalid character after { @@ -917,6 +917,22 @@ public static void AppendFormat_Invalid() Assert.Throws(() => builder.AppendFormat("{0: ", new string[10])); // Format with colon and spaces is not closed Assert.Throws(() => builder.AppendFormat("{0:{", new string[10])); // Format with custom format contains unescaped { + Assert.Throws(() => builder.AppendFormat("{0:{}", new string[10])); // Format with custom format contains unescaped { + } + + [Fact] + [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] + public static void AppendFormat_NoEscapedBracesInCustomFormatSpecifier() + { + // Tests new rule which does not allow escaped braces in the custom format specifier + var builder = new StringBuilder(); + builder.AppendFormat("{0:}}}", 0); + + // Previous behavior: first two closing braces would be escaped and passed in as the custom format specifier, thus result = "}" + // New behavior: first closing brace closes the argument hole and next two are escaped as part of the format, thus result = "0}" + Assert.Equal("0}", builder.ToString()); + // Previously this would be allowed and escaped brace would be passed into the custom format, now this is unsupported + Assert.Throws(() => builder.AppendFormat("{0:{{}", 0)); // Format with custom format contains { } [Fact] From 1064d0352c007fd2d8fb32d7f6e286fbb6d41264 Mon Sep 17 00:00:00 2001 From: Marco Rossignoli Date: Tue, 28 May 2019 18:36:25 +0200 Subject: [PATCH 521/607] User-Agent header is ignored in "CONNECT" requests (#37785) * flow UserAgent on CONNECT * Apply Stephen feedback * address PR feedback * update test * fix style --- .../SocketsHttpHandler/HttpConnectionPool.cs | 10 +++- .../FunctionalTests/HttpClientHandlerTest.cs | 52 +++++++++++++++++++ 2 files changed, 60 insertions(+), 2 deletions(-) diff --git a/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionPool.cs b/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionPool.cs index c7473045efae..ba6050598202 100644 --- a/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionPool.cs +++ b/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionPool.cs @@ -5,6 +5,7 @@ using System.Collections.Generic; using System.Diagnostics; using System.IO; +using System.Net.Http.Headers; using System.Net.Http.HPack; using System.Net.Security; using System.Net.Sockets; @@ -617,7 +618,7 @@ public Task SendAsync(HttpRequestMessage request, bool doRe case HttpConnectionKind.ProxyTunnel: case HttpConnectionKind.SslProxyTunnel: HttpResponseMessage response; - (stream, response) = await EstablishProxyTunnel(cancellationToken).ConfigureAwait(false); + (stream, response) = await EstablishProxyTunnel(request.HasHeaders ? request.Headers : null, cancellationToken).ConfigureAwait(false); if (response != null) { // Return non-success response from proxy. @@ -666,12 +667,17 @@ private HttpConnection ConstructHttp11Connection(Socket socket, Stream stream, T } // Returns the established stream or an HttpResponseMessage from the proxy indicating failure. - private async ValueTask<(Stream, HttpResponseMessage)> EstablishProxyTunnel(CancellationToken cancellationToken) + private async ValueTask<(Stream, HttpResponseMessage)> EstablishProxyTunnel(HttpRequestHeaders headers, CancellationToken cancellationToken) { // Send a CONNECT request to the proxy server to establish a tunnel. HttpRequestMessage tunnelRequest = new HttpRequestMessage(HttpMethod.Connect, _proxyUri); tunnelRequest.Headers.Host = $"{_host}:{_port}"; // This specifies destination host/port to connect to + if (headers != null && headers.TryGetValues(HttpKnownHeaderNames.UserAgent, out IEnumerable values)) + { + tunnelRequest.Headers.TryAddWithoutValidation(HttpKnownHeaderNames.UserAgent, values); + } + HttpResponseMessage tunnelResponse = await _poolManager.SendProxyConnectAsync(tunnelRequest, _proxyUri, cancellationToken).ConfigureAwait(false); if (tunnelResponse.StatusCode != HttpStatusCode.OK) diff --git a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.cs b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.cs index 70ff0327f86b..7cb3dbe0bc2a 100644 --- a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.cs +++ b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.cs @@ -449,6 +449,58 @@ await LoopbackServer.CreateClientAndServerAsync(async proxyUri => Assert.True(connectionAccepted); } + [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "UAP HTTP stack doesn't support .Proxy property")] + [Theory] + [InlineData(true)] + [InlineData(false)] + [OuterLoop("Uses external server")] + public async Task ProxyTunnelRequest_UserAgentHeaderAdded(bool addUserAgentHeader) + { + if (!UseSocketsHttpHandler) + { + return; // Skip test since the fix is only in SocketsHttpHandler. + } + + string addressUri = $"https://{Configuration.Http.SecureHost}/"; + bool connectionAccepted = false; + + await LoopbackServer.CreateClientAndServerAsync(async proxyUri => + { + using (HttpClientHandler handler = CreateHttpClientHandler()) + using (var client = new HttpClient(handler)) + { + handler.Proxy = new WebProxy(proxyUri); + handler.ServerCertificateCustomValidationCallback = TestHelper.AllowAllCertificates; + if (addUserAgentHeader) + { + client.DefaultRequestHeaders.UserAgent.Add(new ProductInfoHeaderValue("Mozilla", "5.0")); + } + try + { + await client.GetAsync(addressUri); + } + catch + { + } + } + }, server => server.AcceptConnectionAsync(async connection => + { + connectionAccepted = true; + List headers = await connection.ReadRequestHeaderAndSendResponseAsync(); + Assert.Contains($"CONNECT {Configuration.Http.SecureHost}:443 HTTP/1.1", headers); + if (addUserAgentHeader) + { + Assert.Contains("User-Agent: Mozilla/5.0", headers); + } + else + { + Assert.DoesNotContain("User-Agent:", headers); + } + })); + + Assert.True(connectionAccepted); + } + public static IEnumerable SecureAndNonSecure_IPBasedUri_MemberData() => from address in new[] { IPAddress.Loopback, IPAddress.IPv6Loopback } from useSsl in new[] { true, false } From 2f2aca43ef9d24c794255c3ef5d0238dc479652b Mon Sep 17 00:00:00 2001 From: Ahson Khan Date: Tue, 28 May 2019 12:26:08 -0700 Subject: [PATCH 522/607] Add Skip and TrySkip APIs to Utf8JsonReader with tests. (#37793) * Add Skip and TrySkip APIs to Utf8JsonReader with tests. * Auto-generate the ref assembly. * Remove new lines and update bytes consumed to avoid adjusting OS specific offsets. * Add IsFinalBlock public property. * Break up the skip/try skip method into helpers. * Add more direct tests and update impl to avoid unnecessary struct copy. --- src/System.Text.Json/ref/System.Text.Json.cs | 3 + .../src/Resources/Strings.resx | 3 + .../System/Text/Json/Reader/Utf8JsonReader.cs | 103 ++ .../src/System/Text/Json/ThrowHelper.cs | 6 + src/System.Text.Json/tests/JsonTestHelper.cs | 84 ++ .../tests/Utf8JsonReaderTests.MultiSegment.cs | 103 ++ .../tests/Utf8JsonReaderTests.cs | 901 +++++++++++++++++- 7 files changed, 1202 insertions(+), 1 deletion(-) diff --git a/src/System.Text.Json/ref/System.Text.Json.cs b/src/System.Text.Json/ref/System.Text.Json.cs index fd42e29f0c4b..f7783720ef4f 100644 --- a/src/System.Text.Json/ref/System.Text.Json.cs +++ b/src/System.Text.Json/ref/System.Text.Json.cs @@ -189,6 +189,7 @@ public ref partial struct Utf8JsonReader public int CurrentDepth { get { throw null; } } public System.Text.Json.JsonReaderState CurrentState { get { throw null; } } public bool HasValueSequence { get { throw null; } } + public bool IsFinalBlock { get { throw null; } } public System.SequencePosition Position { get { throw null; } } public long TokenStartIndex { get { throw null; } } public System.Text.Json.JsonTokenType TokenType { get { throw null; } } @@ -210,6 +211,7 @@ public ref partial struct Utf8JsonReader [System.CLSCompliantAttribute(false)] public ulong GetUInt64() { throw null; } public bool Read() { throw null; } + public void Skip() { } public bool TextEquals(System.ReadOnlySpan otherUtf8Text) { throw null; } public bool TextEquals(System.ReadOnlySpan otherText) { throw null; } public bool TryGetDateTime(out System.DateTime value) { throw null; } @@ -224,6 +226,7 @@ public ref partial struct Utf8JsonReader public bool TryGetUInt32(out uint value) { throw null; } [System.CLSCompliantAttribute(false)] public bool TryGetUInt64(out ulong value) { throw null; } + public bool TrySkip() { throw null; } } public sealed partial class Utf8JsonWriter : System.IDisposable { diff --git a/src/System.Text.Json/src/Resources/Strings.resx b/src/System.Text.Json/src/Resources/Strings.resx index 33a2bde8eb80..5e254fe031ca 100644 --- a/src/System.Text.Json/src/Resources/Strings.resx +++ b/src/System.Text.Json/src/Resources/Strings.resx @@ -362,6 +362,9 @@ Unexpected end of data while reading a comment. + + Cannot skip tokens on partial JSON. Either get the whole payload and set _isFinalBlock to true or call TrySkip. + Comments cannot be stored when deserializing objects, only the Skip and Disallow comment handling modes are supported. diff --git a/src/System.Text.Json/src/System/Text/Json/Reader/Utf8JsonReader.cs b/src/System.Text.Json/src/System/Text/Json/Reader/Utf8JsonReader.cs index 35298877b74e..4c2d11d0e7f3 100644 --- a/src/System.Text.Json/src/System/Text/Json/Reader/Utf8JsonReader.cs +++ b/src/System.Text.Json/src/System/Text/Json/Reader/Utf8JsonReader.cs @@ -131,6 +131,13 @@ public int CurrentDepth /// public bool HasValueSequence { get; private set; } + /// + /// Returns the mode of this instance of the . + /// True when the reader was constructed with the input span containing the entire data to process. + /// False when the reader was constructed knowing that the input span may contain partial data with more data to follow. + /// + public bool IsFinalBlock => _isFinalBlock; + /// /// Gets the value of the last processed token as a ReadOnlySpan<byte> slice /// of the input payload. If the JSON is provided within a ReadOnlySequence<byte> @@ -260,6 +267,102 @@ public bool Read() return retVal; } + /// + /// Skips the children of the current JSON token. + /// + /// + /// Thrown when the reader was given partial data with more data to follow (i.e. _isFinalBlock is false). + /// + public void Skip() + { + if (!_isFinalBlock) + { + throw ThrowHelper.GetInvalidOperationException_CannotSkipOnPartial(); + } + + SkipHelper(); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private void SkipHelper() + { + Debug.Assert(_isFinalBlock); + + if (TokenType == JsonTokenType.PropertyName) + { + bool result = Read(); + // Since _isFinalBlock == true here, and the JSON token is not a primitive value or comment. + // Read() is guaranteed to return true OR throw for invalid/incomplete data. + Debug.Assert(result); + } + + if (TokenType == JsonTokenType.StartObject || TokenType == JsonTokenType.StartArray) + { + int depth = CurrentDepth; + do + { + bool result = Read(); + // Since _isFinalBlock == true here, and the JSON token is not a primitive value or comment. + // Read() is guaranteed to return true OR throw for invalid/incomplete data. + Debug.Assert(result); + } + while (depth < CurrentDepth); + } + } + + /// + /// Tries to skip the children of the current JSON token. + /// + /// True if there was enough data for the children to be skipped successfully, else false. + /// + /// If the reader did not have enough data to completely skip the children of the current token, + /// it will be reset to the state it was in before the method was called. + /// + public bool TrySkip() + { + if (_isFinalBlock) + { + SkipHelper(); + return true; + } + + return TrySkipHelper(); + } + + private bool TrySkipHelper() + { + Debug.Assert(!_isFinalBlock); + + Utf8JsonReader restore = this; + + if (TokenType == JsonTokenType.PropertyName) + { + if (!Read()) + { + goto Restore; + } + } + + if (TokenType == JsonTokenType.StartObject || TokenType == JsonTokenType.StartArray) + { + int depth = CurrentDepth; + do + { + if (!Read()) + { + goto Restore; + } + } + while (depth < CurrentDepth); + } + + return true; + + Restore: + this = restore; + return false; + } + /// /// Compares the UTF-8 encoded text to the unescaped JSON token value in the source and returns true if they match. /// diff --git a/src/System.Text.Json/src/System/Text/Json/ThrowHelper.cs b/src/System.Text.Json/src/System/Text/Json/ThrowHelper.cs index ae373390c6e1..afc8ba0ca0a7 100644 --- a/src/System.Text.Json/src/System/Text/Json/ThrowHelper.cs +++ b/src/System.Text.Json/src/System/Text/Json/ThrowHelper.cs @@ -192,6 +192,12 @@ public static InvalidOperationException GetInvalidOperationException_ExpectedCom return GetInvalidOperationException("comment", tokenType); } + [MethodImpl(MethodImplOptions.NoInlining)] + public static InvalidOperationException GetInvalidOperationException_CannotSkipOnPartial() + { + return new InvalidOperationException(SR.CannotSkip); + } + [MethodImpl(MethodImplOptions.NoInlining)] private static InvalidOperationException GetInvalidOperationException(string message, JsonTokenType tokenType) { diff --git a/src/System.Text.Json/tests/JsonTestHelper.cs b/src/System.Text.Json/tests/JsonTestHelper.cs index fa644da62dfa..490e377a6427 100644 --- a/src/System.Text.Json/tests/JsonTestHelper.cs +++ b/src/System.Text.Json/tests/JsonTestHelper.cs @@ -260,6 +260,90 @@ public static string ListToString(List list) return builder.ToString(); } + private static JsonTokenType MapTokenType(JsonToken token) + { + switch (token) + { + case JsonToken.None: + return JsonTokenType.None; + case JsonToken.StartObject: + return JsonTokenType.StartObject; + case JsonToken.StartArray: + return JsonTokenType.StartArray; + case JsonToken.PropertyName: + return JsonTokenType.PropertyName; + case JsonToken.Comment: + return JsonTokenType.Comment; + case JsonToken.Integer: + case JsonToken.Float: + return JsonTokenType.Number; + case JsonToken.String: + return JsonTokenType.String; + case JsonToken.Boolean: + return JsonTokenType.True; + case JsonToken.Null: + return JsonTokenType.Null; + case JsonToken.EndObject: + return JsonTokenType.EndObject; + case JsonToken.EndArray: + return JsonTokenType.EndArray; + case JsonToken.StartConstructor: + case JsonToken.EndConstructor: + case JsonToken.Date: + case JsonToken.Bytes: + case JsonToken.Undefined: + case JsonToken.Raw: + default: + throw new InvalidOperationException(); + } + } + + public static string InsertCommentsEverywhere(string jsonString) + { + StringBuilder sb = new StringBuilder(); + StringWriter sw = new StringWriter(sb); + + using (JsonWriter writer = new JsonTextWriter(sw)) + { + writer.Formatting = Formatting.Indented; + + var newtonsoft = new JsonTextReader(new StringReader(jsonString)); + writer.WriteComment("comment"); + while (newtonsoft.Read()) + { + writer.WriteToken(newtonsoft, writeChildren: false); + writer.WriteComment("comment"); + } + writer.WriteComment("comment"); + } + return sb.ToString(); + } + + public static List GetTokenTypes(string jsonString) + { + var newtonsoft = new JsonTextReader(new StringReader(jsonString)); + int totalReads = 0; + while (newtonsoft.Read()) + { + totalReads++; + } + + var expectedTokenTypes = new List(); + + for (int i = 0; i < totalReads; i++) + { + newtonsoft = new JsonTextReader(new StringReader(jsonString)); + for (int j = 0; j < i; j++) + { + Assert.True(newtonsoft.Read()); + } + newtonsoft.Skip(); + expectedTokenTypes.Add(MapTokenType(newtonsoft.TokenType)); + } + + return expectedTokenTypes; + } + public static byte[] ReaderLoop(int inpuDataLength, out int length, ref Utf8JsonReader json) { byte[] outputArray = new byte[inpuDataLength]; diff --git a/src/System.Text.Json/tests/Utf8JsonReaderTests.MultiSegment.cs b/src/System.Text.Json/tests/Utf8JsonReaderTests.MultiSegment.cs index 13b081a06dd2..81ffd23861a3 100644 --- a/src/System.Text.Json/tests/Utf8JsonReaderTests.MultiSegment.cs +++ b/src/System.Text.Json/tests/Utf8JsonReaderTests.MultiSegment.cs @@ -257,6 +257,109 @@ public static void TestPartialJsonReaderSlicesMultiSegment(bool compactData, Tes } } + [Theory] + [MemberData(nameof(TrySkipValues))] + public static void TestTrySkipMultiSegment(string jsonString, JsonTokenType lastToken) + { + List expectedTokenTypes = JsonTestHelper.GetTokenTypes(jsonString); + byte[] dataUtf8 = Encoding.UTF8.GetBytes(jsonString); + + ReadOnlySequence sequence = JsonTestHelper.CreateSegments(dataUtf8); + TrySkipHelper(sequence, lastToken, expectedTokenTypes, JsonCommentHandling.Disallow); + TrySkipHelper(sequence, lastToken, expectedTokenTypes, JsonCommentHandling.Skip); + TrySkipHelper(sequence, lastToken, expectedTokenTypes, JsonCommentHandling.Allow); + + sequence = JsonTestHelper.GetSequence(dataUtf8, 1); + TrySkipHelper(sequence, lastToken, expectedTokenTypes, JsonCommentHandling.Disallow); + TrySkipHelper(sequence, lastToken, expectedTokenTypes, JsonCommentHandling.Skip); + TrySkipHelper(sequence, lastToken, expectedTokenTypes, JsonCommentHandling.Allow); + } + + [Theory] + [MemberData(nameof(TrySkipValues))] + public static void TestTrySkipWithCommentsMultiSegment(string jsonString, JsonTokenType lastToken) + { + List expectedTokenTypesWithoutComments = JsonTestHelper.GetTokenTypes(jsonString); + + jsonString = JsonTestHelper.InsertCommentsEverywhere(jsonString); + + List expectedTokenTypes = JsonTestHelper.GetTokenTypes(jsonString); + + byte[] dataUtf8 = Encoding.UTF8.GetBytes(jsonString); + + ReadOnlySequence sequence = JsonTestHelper.CreateSegments(dataUtf8); + TrySkipHelper(sequence, JsonTokenType.Comment, expectedTokenTypes, JsonCommentHandling.Allow); + TrySkipHelper(sequence, lastToken, expectedTokenTypesWithoutComments, JsonCommentHandling.Skip); + + sequence = JsonTestHelper.GetSequence(dataUtf8, 1); + TrySkipHelper(sequence, JsonTokenType.Comment, expectedTokenTypes, JsonCommentHandling.Allow); + TrySkipHelper(sequence, lastToken, expectedTokenTypesWithoutComments, JsonCommentHandling.Skip); + } + + private static void TrySkipHelper(ReadOnlySequence dataUtf8, JsonTokenType lastToken, List expectedTokenTypes, JsonCommentHandling commentHandling) + { + var state = new JsonReaderState(new JsonReaderOptions { CommentHandling = commentHandling }); + var json = new Utf8JsonReader(dataUtf8, isFinalBlock: true, state); + + JsonReaderState previous = json.CurrentState; + Assert.Equal(JsonTokenType.None, json.TokenType); + Assert.Equal(0, json.CurrentDepth); + Assert.Equal(0, json.BytesConsumed); + Assert.Equal(false, json.HasValueSequence); + Assert.True(json.ValueSpan.SequenceEqual(default)); + Assert.True(json.ValueSequence.IsEmpty); + + Assert.True(json.TrySkip()); + + JsonReaderState current = json.CurrentState; + Assert.Equal(JsonTokenType.None, json.TokenType); + Assert.Equal(previous, current); + Assert.Equal(0, json.CurrentDepth); + Assert.Equal(0, json.BytesConsumed); + Assert.Equal(false, json.HasValueSequence); + Assert.True(json.ValueSpan.SequenceEqual(default)); + Assert.True(json.ValueSequence.IsEmpty); + + int totalReads = 0; + while (json.Read()) + { + totalReads++; + } + + Assert.Equal(expectedTokenTypes.Count, totalReads); + + previous = json.CurrentState; + Assert.Equal(lastToken, json.TokenType); + Assert.Equal(0, json.CurrentDepth); + Assert.Equal(dataUtf8.Length, json.BytesConsumed); + Assert.Equal(false, json.HasValueSequence); + Assert.True(json.ValueSpan.SequenceEqual(default)); + Assert.True(json.ValueSequence.IsEmpty); + + Assert.True(json.TrySkip()); + + current = json.CurrentState; + Assert.Equal(previous, current); + Assert.Equal(lastToken, json.TokenType); + Assert.Equal(0, json.CurrentDepth); + Assert.Equal(dataUtf8.Length, json.BytesConsumed); + Assert.Equal(false, json.HasValueSequence); + Assert.True(json.ValueSpan.SequenceEqual(default)); + Assert.True(json.ValueSequence.IsEmpty); + + for (int i = 0; i < totalReads; i++) + { + state = new JsonReaderState(new JsonReaderOptions { CommentHandling = commentHandling }); + json = new Utf8JsonReader(dataUtf8, isFinalBlock: true, state); + for (int j = 0; j < i; j++) + { + Assert.True(json.Read()); + } + Assert.True(json.TrySkip()); + Assert.True(expectedTokenTypes[i] == json.TokenType, $"Expected: {expectedTokenTypes[i]}, Actual: {json.TokenType}, , Index: {i}, BytesConsumed: {json.BytesConsumed}"); + } + } + [Theory] [MemberData(nameof(InvalidJsonStrings))] public static void InvalidJsonMultiSegmentWithEmptyFirst(string jsonString, int expectedlineNumber, int expectedBytePosition, int maxDepth = 64) diff --git a/src/System.Text.Json/tests/Utf8JsonReaderTests.cs b/src/System.Text.Json/tests/Utf8JsonReaderTests.cs index 7bb7a675df8a..36c8d3ae45b9 100644 --- a/src/System.Text.Json/tests/Utf8JsonReaderTests.cs +++ b/src/System.Text.Json/tests/Utf8JsonReaderTests.cs @@ -25,6 +25,7 @@ public static void DefaultUtf8JsonReader() Assert.Equal(JsonTokenType.None, json.TokenType); Assert.Equal(default, json.Position); Assert.False(json.HasValueSequence); + Assert.False(json.IsFinalBlock); Assert.True(json.ValueSpan.SequenceEqual(default)); Assert.True(json.ValueSequence.IsEmpty); @@ -100,6 +101,7 @@ public static void InitialState() Assert.Equal(JsonTokenType.None, json.TokenType); Assert.Equal(default, json.Position); Assert.False(json.HasValueSequence); + Assert.True(json.IsFinalBlock); Assert.True(json.ValueSpan.SequenceEqual(default)); Assert.True(json.ValueSequence.IsEmpty); @@ -125,6 +127,7 @@ public static void StateRecovery() Assert.Equal(JsonTokenType.None, json.TokenType); Assert.Equal(default, json.Position); Assert.False(json.HasValueSequence); + Assert.False(json.IsFinalBlock); Assert.True(json.ValueSpan.SequenceEqual(default)); Assert.True(json.ValueSequence.IsEmpty); @@ -143,7 +146,7 @@ public static void StateRecovery() Assert.Equal(JsonTokenType.Number, json.TokenType); Assert.Equal(default, json.Position); Assert.False(json.HasValueSequence); - Assert.True(json.ValueSpan.SequenceEqual(new byte[] { (byte)'1'})); + Assert.True(json.ValueSpan.SequenceEqual(new byte[] { (byte)'1' })); Assert.True(json.ValueSequence.IsEmpty); Assert.Equal(2, json.CurrentState.BytesConsumed); @@ -162,6 +165,7 @@ public static void StateRecovery() Assert.Equal(JsonTokenType.Number, json.TokenType); Assert.Equal(default, json.Position); Assert.False(json.HasValueSequence); + Assert.True(json.IsFinalBlock); Assert.True(json.ValueSpan.SequenceEqual(default)); Assert.True(json.ValueSequence.IsEmpty); @@ -485,6 +489,879 @@ public static void CurrentDepthObjectTest() Assert.Equal(0, json.CurrentDepth); } + [Theory] + [MemberData(nameof(TrySkipValues))] + public static void TestTrySkip(string jsonString, JsonTokenType lastToken) + { + List expectedTokenTypes = JsonTestHelper.GetTokenTypes(jsonString); + TrySkipHelper(jsonString, lastToken, expectedTokenTypes, JsonCommentHandling.Disallow); + TrySkipHelper(jsonString, lastToken, expectedTokenTypes, JsonCommentHandling.Skip); + TrySkipHelper(jsonString, lastToken, expectedTokenTypes, JsonCommentHandling.Allow); + } + + [Theory] + [MemberData(nameof(TrySkipValues))] + public static void TestTrySkipWithComments(string jsonString, JsonTokenType lastToken) + { + List expectedTokenTypesWithoutComments = JsonTestHelper.GetTokenTypes(jsonString); + + jsonString = JsonTestHelper.InsertCommentsEverywhere(jsonString); + + List expectedTokenTypes = JsonTestHelper.GetTokenTypes(jsonString); + TrySkipHelper(jsonString, JsonTokenType.Comment, expectedTokenTypes, JsonCommentHandling.Allow); + TrySkipHelper(jsonString, lastToken, expectedTokenTypesWithoutComments, JsonCommentHandling.Skip); + } + + private static void TrySkipHelper(string jsonString, JsonTokenType lastToken, List expectedTokenTypes, JsonCommentHandling commentHandling) + { + byte[] dataUtf8 = Encoding.UTF8.GetBytes(jsonString); + var state = new JsonReaderState(new JsonReaderOptions { CommentHandling = commentHandling }); + var json = new Utf8JsonReader(dataUtf8, isFinalBlock: true, state); + + JsonReaderState previous = json.CurrentState; + Assert.Equal(JsonTokenType.None, json.TokenType); + Assert.Equal(0, json.CurrentDepth); + Assert.Equal(0, json.BytesConsumed); + Assert.Equal(false, json.HasValueSequence); + Assert.True(json.IsFinalBlock); + Assert.True(json.ValueSpan.SequenceEqual(default)); + Assert.True(json.ValueSequence.IsEmpty); + + Assert.True(json.TrySkip()); + + JsonReaderState current = json.CurrentState; + Assert.Equal(JsonTokenType.None, json.TokenType); + Assert.Equal(previous, current); + Assert.Equal(0, json.CurrentDepth); + Assert.Equal(0, json.BytesConsumed); + Assert.Equal(false, json.HasValueSequence); + Assert.True(json.IsFinalBlock); + Assert.True(json.ValueSpan.SequenceEqual(default)); + Assert.True(json.ValueSequence.IsEmpty); + + json.Skip(); + + current = json.CurrentState; + Assert.Equal(JsonTokenType.None, json.TokenType); + Assert.Equal(previous, current); + Assert.Equal(0, json.CurrentDepth); + Assert.Equal(0, json.BytesConsumed); + Assert.Equal(false, json.HasValueSequence); + Assert.True(json.IsFinalBlock); + Assert.True(json.ValueSpan.SequenceEqual(default)); + Assert.True(json.ValueSequence.IsEmpty); + + int totalReads = 0; + while (json.Read()) + { + totalReads++; + } + + Assert.Equal(expectedTokenTypes.Count, totalReads); + + previous = json.CurrentState; + Assert.Equal(lastToken, json.TokenType); + Assert.Equal(0, json.CurrentDepth); + Assert.Equal(dataUtf8.Length, json.BytesConsumed); + Assert.Equal(false, json.HasValueSequence); + Assert.True(json.IsFinalBlock); + Assert.True(json.ValueSpan.SequenceEqual(default)); + Assert.True(json.ValueSequence.IsEmpty); + + Assert.True(json.TrySkip()); + + current = json.CurrentState; + Assert.Equal(previous, current); + Assert.Equal(lastToken, json.TokenType); + Assert.Equal(0, json.CurrentDepth); + Assert.Equal(dataUtf8.Length, json.BytesConsumed); + Assert.Equal(false, json.HasValueSequence); + Assert.True(json.IsFinalBlock); + Assert.True(json.ValueSpan.SequenceEqual(default)); + Assert.True(json.ValueSequence.IsEmpty); + + json.Skip(); + + current = json.CurrentState; + Assert.Equal(previous, current); + Assert.Equal(lastToken, json.TokenType); + Assert.Equal(0, json.CurrentDepth); + Assert.Equal(dataUtf8.Length, json.BytesConsumed); + Assert.Equal(false, json.HasValueSequence); + Assert.True(json.IsFinalBlock); + Assert.True(json.ValueSpan.SequenceEqual(default)); + Assert.True(json.ValueSequence.IsEmpty); + + for (int i = 0; i < totalReads; i++) + { + state = new JsonReaderState(new JsonReaderOptions { CommentHandling = commentHandling }); + json = new Utf8JsonReader(dataUtf8, isFinalBlock: true, state); + for (int j = 0; j < i; j++) + { + Assert.True(json.Read()); + } + Assert.True(json.TrySkip()); + Assert.True(expectedTokenTypes[i] == json.TokenType, $"Expected: {expectedTokenTypes[i]}, Actual: {json.TokenType}, Index: {i}, BytesConsumed: {json.BytesConsumed}"); + } + + for (int i = 0; i < totalReads; i++) + { + state = new JsonReaderState(new JsonReaderOptions { CommentHandling = commentHandling }); + json = new Utf8JsonReader(dataUtf8, isFinalBlock: true, state); + for (int j = 0; j < i; j++) + { + Assert.True(json.Read()); + } + json.Skip(); + Assert.True(expectedTokenTypes[i] == json.TokenType, $"Expected: {expectedTokenTypes[i]}, Actual: {json.TokenType}, Index: {i}, BytesConsumed: {json.BytesConsumed}"); + } + } + + [Theory] + [InlineData("[]", 1, 2)] + [InlineData("[1, 2, 3, 4, 5]", 1, 15)] + [InlineData("{\"foo\":1}", 2, 8)] + [InlineData("{\"foo\":[1, 2, 3]}", 2, 16)] + public static void BasicSkipTest(string jsonString, int readCount, int expectedConsumed) + { + { + var reader = new Utf8JsonReader(Encoding.UTF8.GetBytes(jsonString), isFinalBlock: true, state: default); + for (int i = 0; i < readCount; i++) + { + reader.Read(); + } + + reader.Skip(); + Assert.Equal(expectedConsumed, reader.BytesConsumed); + } + { + var reader = new Utf8JsonReader(Encoding.UTF8.GetBytes(jsonString), isFinalBlock: true, state: default); + for (int i = 0; i < readCount; i++) + { + reader.Read(); + } + + Assert.True(reader.TrySkip()); + Assert.Equal(expectedConsumed, reader.BytesConsumed); + } + { + var reader = new Utf8JsonReader(Encoding.UTF8.GetBytes(jsonString), isFinalBlock: false, state: default); + for (int i = 0; i < readCount; i++) + { + reader.Read(); + } + + Assert.True(reader.TrySkip()); + Assert.Equal(expectedConsumed, reader.BytesConsumed); + } + } + + [Theory] + [InlineData("[", 1, 1)] + [InlineData("[1, 2, 3, 4, 5", 1, 1)] + [InlineData("{\"foo\":1", 2, 7)] + [InlineData("{\"foo\":[1, 2, 3", 2, 7)] + public static void BasicTrySkipIncomplete(string jsonString, int readCount, int expectedConsumed) + { + { + var reader = new Utf8JsonReader(Encoding.UTF8.GetBytes(jsonString), isFinalBlock: true, state: default); + for (int i = 0; i < readCount; i++) + { + reader.Read(); + } + + try + { + reader.Skip(); + Assert.True(false, "Expected JsonException was not thrown for incomplete JSON payload when skipping."); + } + catch (JsonException) { } + } + { + var reader = new Utf8JsonReader(Encoding.UTF8.GetBytes(jsonString), isFinalBlock: true, state: default); + for (int i = 0; i < readCount; i++) + { + reader.Read(); + } + + try + { + reader.TrySkip(); + Assert.True(false, "Expected JsonException was not thrown for incomplete JSON payload when skipping."); + } + catch (JsonException) { } + } + { + var reader = new Utf8JsonReader(Encoding.UTF8.GetBytes(jsonString), isFinalBlock: false, state: default); + for (int i = 0; i < readCount; i++) + { + reader.Read(); + } + + Assert.False(reader.TrySkip()); + Assert.Equal(expectedConsumed, reader.BytesConsumed); + } + } + + [Fact] + public static void TrySkipOnValuePartialWithWhiteSpace() + { + string jsonString = "[ 1, "; + + { + var reader = new Utf8JsonReader(Encoding.UTF8.GetBytes(jsonString), isFinalBlock: true, state: default); + reader.Read(); + reader.Read(); + Assert.Equal(3, reader.BytesConsumed); + Assert.True(reader.TrySkip()); + Assert.Equal(3, reader.BytesConsumed); + + try + { + reader.Read(); + Assert.True(false, "Expected JsonException was not thrown for incomplete JSON payload when reading."); + } + catch (JsonException) { } + + Assert.Equal(5, reader.BytesConsumed); // After exception, state is not restored. + } + { + var reader = new Utf8JsonReader(Encoding.UTF8.GetBytes(jsonString), isFinalBlock: true, state: default); + reader.Read(); + Assert.Equal(1, reader.BytesConsumed); + + try + { + reader.TrySkip(); + Assert.True(false, "Expected JsonException was not thrown for incomplete JSON payload when skipping."); + } + catch (JsonException) { } + + Assert.Equal(5, reader.BytesConsumed); // After exception, state is not restored. + } + { + var reader = new Utf8JsonReader(Encoding.UTF8.GetBytes(jsonString), isFinalBlock: false, state: default); + reader.Read(); + Assert.Equal(1, reader.BytesConsumed); + Assert.False(reader.TrySkip()); + Assert.Equal(1, reader.BytesConsumed); + } + } + + [Fact] + public static void TrySkipPartialAndContinueWithWhiteSpace() + { + string jsonString = "[ 1, 2]"; + byte[] utf8Data = Encoding.UTF8.GetBytes(jsonString); + + // "[ 1, " + var reader = new Utf8JsonReader(utf8Data.AsSpan(0, 5), isFinalBlock: false, state: default); + reader.Read(); + Assert.Equal(1, reader.BytesConsumed); + Assert.False(reader.TrySkip()); + Assert.Equal(1, reader.BytesConsumed); + + // " 1, 2]" + int previousConsumed = (int)reader.BytesConsumed; + reader = new Utf8JsonReader(utf8Data.AsSpan(previousConsumed), isFinalBlock: true, reader.CurrentState); + Assert.True(reader.TrySkip()); + Assert.Equal(utf8Data.Length - previousConsumed, reader.BytesConsumed); + } + + [Theory] + [MemberData(nameof(TrySkipValues))] + public static void TestTrySkipPartial(string jsonString, JsonTokenType lastToken) + { + byte[] dataUtf8 = Encoding.UTF8.GetBytes(jsonString); + + // Skip, then skip some more + for (int i = 0; i < dataUtf8.Length; i++) + { + JsonReaderState state = default; + var json = new Utf8JsonReader(dataUtf8.AsSpan(0, i), isFinalBlock: false, state); + + long bytesConsumed = json.BytesConsumed; + while (json.TrySkip()) + { + Assert.True(json.TokenType != JsonTokenType.PropertyName && json.TokenType != JsonTokenType.StartObject && json.TokenType != JsonTokenType.StartArray); + if (bytesConsumed == json.BytesConsumed) + { + if (!json.Read()) + { + break; + } + } + else + { + bytesConsumed = json.BytesConsumed; + } + } + + ValidateNextTrySkip(ref json); + + long consumed = json.BytesConsumed; + Assert.Equal(consumed, json.CurrentState.BytesConsumed); + + json = new Utf8JsonReader(dataUtf8.AsSpan((int)consumed), isFinalBlock: true, json.CurrentState); + while (json.TrySkip()) + { + Assert.True(json.TokenType != JsonTokenType.PropertyName && json.TokenType != JsonTokenType.StartObject && json.TokenType != JsonTokenType.StartArray); + if (bytesConsumed == json.BytesConsumed) + { + if (!json.Read()) + { + break; + } + } + else + { + bytesConsumed = json.BytesConsumed; + } + } + Assert.Equal(dataUtf8.Length - consumed, json.BytesConsumed); + } + + // Read, then skip + for (int i = 0; i < dataUtf8.Length; i++) + { + JsonReaderState state = default; + var json = new Utf8JsonReader(dataUtf8.AsSpan(0, i), isFinalBlock: false, state); + while (json.Read()) + ; + + ValidateNextTrySkip(ref json); + + long consumed = json.BytesConsumed; + Assert.Equal(consumed, json.CurrentState.BytesConsumed); + + json = new Utf8JsonReader(dataUtf8.AsSpan((int)consumed), isFinalBlock: true, json.CurrentState); + long bytesConsumed = json.BytesConsumed; + while (json.TrySkip()) + { + Assert.True(json.TokenType != JsonTokenType.PropertyName && json.TokenType != JsonTokenType.StartObject && json.TokenType != JsonTokenType.StartArray); + if (bytesConsumed == json.BytesConsumed) + { + if (!json.Read()) + { + break; + } + } + else + { + bytesConsumed = json.BytesConsumed; + } + } + Assert.Equal(dataUtf8.Length - consumed, json.BytesConsumed); + } + + // Skip, then read + for (int i = 0; i < dataUtf8.Length; i++) + { + JsonReaderState state = default; + var json = new Utf8JsonReader(dataUtf8.AsSpan(0, i), isFinalBlock: false, state); + long bytesConsumed = json.BytesConsumed; + while (json.TrySkip()) + { + Assert.True(json.TokenType != JsonTokenType.PropertyName && json.TokenType != JsonTokenType.StartObject && json.TokenType != JsonTokenType.StartArray); + if (bytesConsumed == json.BytesConsumed) + { + if (!json.Read()) + { + break; + } + } + else + { + bytesConsumed = json.BytesConsumed; + } + } + + ValidateNextTrySkip(ref json); + + long consumed = json.BytesConsumed; + Assert.Equal(consumed, json.CurrentState.BytesConsumed); + + json = new Utf8JsonReader(dataUtf8.AsSpan((int)consumed), isFinalBlock: true, json.CurrentState); + while (json.Read()) + ; + Assert.Equal(dataUtf8.Length - consumed, json.BytesConsumed); + Assert.Equal(lastToken, json.TokenType); + } + } + + private static void ValidateNextTrySkip(ref Utf8JsonReader json) + { + JsonReaderState previous = json.CurrentState; + JsonTokenType prevTokenType = json.TokenType; + int prevDepth = json.CurrentDepth; + long prevConsumed = json.BytesConsumed; + Assert.Equal(false, json.HasValueSequence); + Assert.True(json.ValueSequence.IsEmpty); + ReadOnlySpan prevValue = json.ValueSpan; + + if (json.TokenType == JsonTokenType.PropertyName || json.TokenType == JsonTokenType.StartObject || json.TokenType == JsonTokenType.StartArray) + { + Assert.False(json.TrySkip()); + } + else + { + Assert.True(json.TrySkip()); + } + + JsonReaderState current = json.CurrentState; + Assert.Equal(previous, current); + Assert.Equal(prevTokenType, json.TokenType); + Assert.Equal(prevDepth, json.CurrentDepth); + Assert.Equal(prevConsumed, json.BytesConsumed); + Assert.Equal(false, json.HasValueSequence); + Assert.True(json.ValueSequence.IsEmpty); + Assert.True(json.ValueSpan.SequenceEqual(prevValue)); + } + + [Theory] + [MemberData(nameof(TrySkipValues))] + public static void TestSkipPartial(string jsonString, JsonTokenType lastToken) + { + byte[] dataUtf8 = Encoding.UTF8.GetBytes(jsonString); + + var json = new Utf8JsonReader(dataUtf8, isFinalBlock: false, default); + try + { + Assert.False(json.IsFinalBlock); + json.Skip(); + Assert.True(false, "Expected InvalidOperationException was not thrown when calling Skip with isFinalBlock = false, even if whole payload is available."); + } + catch (InvalidOperationException) { } + + // Skip, then skip some more + for (int i = 0; i < dataUtf8.Length; i++) + { + JsonReaderState state = default; + json = new Utf8JsonReader(dataUtf8.AsSpan(0, i), isFinalBlock: false, state); + + try + { + Assert.False(json.IsFinalBlock); + json.Skip(); + Assert.True(false, "Expected InvalidOperationException was not thrown when calling Skip with isFinalBlock = false"); + } + catch (InvalidOperationException) { } + + long bytesConsumed = json.BytesConsumed; + while (json.TrySkip()) + { + Assert.True(json.TokenType != JsonTokenType.PropertyName && json.TokenType != JsonTokenType.StartObject && json.TokenType != JsonTokenType.StartArray); + if (bytesConsumed == json.BytesConsumed) + { + if (!json.Read()) + { + break; + } + } + else + { + bytesConsumed = json.BytesConsumed; + } + } + + long consumed = json.BytesConsumed; + Assert.Equal(consumed, json.CurrentState.BytesConsumed); + + json = new Utf8JsonReader(dataUtf8.AsSpan((int)consumed), isFinalBlock: true, json.CurrentState); + while (true) + { + Assert.True(json.IsFinalBlock); + json.Skip(); + Assert.True(json.TokenType != JsonTokenType.PropertyName && json.TokenType != JsonTokenType.StartObject && json.TokenType != JsonTokenType.StartArray); + if (bytesConsumed == json.BytesConsumed) + { + if (!json.Read()) + { + break; + } + } + else + { + bytesConsumed = json.BytesConsumed; + } + } + Assert.Equal(dataUtf8.Length - consumed, json.BytesConsumed); + } + + // Read, then skip + for (int i = 0; i < dataUtf8.Length; i++) + { + JsonReaderState state = default; + json = new Utf8JsonReader(dataUtf8.AsSpan(0, i), isFinalBlock: false, state); + while (json.Read()) + ; + + long consumed = json.BytesConsumed; + Assert.Equal(consumed, json.CurrentState.BytesConsumed); + + json = new Utf8JsonReader(dataUtf8.AsSpan((int)consumed), isFinalBlock: true, json.CurrentState); + long bytesConsumed = json.BytesConsumed; + while (true) + { + Assert.True(json.IsFinalBlock); + json.Skip(); + Assert.True(json.TokenType != JsonTokenType.PropertyName && json.TokenType != JsonTokenType.StartObject && json.TokenType != JsonTokenType.StartArray); + if (bytesConsumed == json.BytesConsumed) + { + if (!json.Read()) + { + break; + } + } + else + { + bytesConsumed = json.BytesConsumed; + } + } + Assert.Equal(dataUtf8.Length - consumed, json.BytesConsumed); + } + } + + [Fact] + public static void SkipInvalid() + { + string jsonString = "[[[]], {\"a\":1, \"b\": 2}, 3, {\"a\":{}, {\"c\":[]} }, [{\"a\":1, \"b\": 2}, null]"; + byte[] dataUtf8 = Encoding.UTF8.GetBytes(jsonString); + + { + var json = new Utf8JsonReader(dataUtf8, isFinalBlock: true, default); + Assert.True(json.Read()); + Assert.Equal(JsonTokenType.StartArray, json.TokenType); + try + { + Assert.True(json.IsFinalBlock); + json.Skip(); + Assert.True(false, "Expected JsonException was not thrown for invalid JSON payload when skipping."); + } + catch (JsonException) { } + } + + { + var json = new Utf8JsonReader(dataUtf8, isFinalBlock: true, default); + Assert.True(json.Read()); + Assert.Equal(JsonTokenType.StartArray, json.TokenType); + try + { + Assert.True(json.IsFinalBlock); + json.TrySkip(); + Assert.True(false, "Expected JsonException was not thrown for invalid JSON payload when skipping."); + } + catch (JsonException) { } + } + + { + var json = new Utf8JsonReader(dataUtf8, isFinalBlock: false, default); + Assert.True(json.Read()); + Assert.Equal(JsonTokenType.StartArray, json.TokenType); + try + { + Assert.False(json.IsFinalBlock); + json.TrySkip(); + Assert.True(false, "Expected JsonException was not thrown for invalid JSON payload when skipping."); + } + catch (JsonException) { } + } + } + + [Theory] + [InlineData("[[", 1, JsonTokenType.StartArray)] + [InlineData("[[", 2, JsonTokenType.StartArray)] + [InlineData("[[//comm", 2, JsonTokenType.StartArray)] + [InlineData("[[[]], {\"a\":1, \"b\": 2}, 3, {\"a\":{}, \"b\":{\"c\":[]} }, [{\"a\":1, \"b\": 2}, null]", 1, JsonTokenType.StartArray)] + [InlineData("[[[]], {\"a\":", 7, JsonTokenType.PropertyName)] + public static void SkipIncomplete(string jsonString, int numReads, JsonTokenType skipTokenType) + { + byte[] dataUtf8 = Encoding.UTF8.GetBytes(jsonString); + + { + var state = new JsonReaderState(new JsonReaderOptions { CommentHandling = JsonCommentHandling.Allow }); + var json = new Utf8JsonReader(dataUtf8, isFinalBlock: true, state); + for (int i = 0; i < numReads; i++) + { + Assert.True(json.Read()); + } + Assert.Equal(skipTokenType, json.TokenType); + try + { + Assert.True(json.IsFinalBlock); + json.Skip(); + Assert.True(false, "Expected JsonException was not thrown for incomplete/invalid JSON payload when skipping."); + } + catch (JsonException) { } + } + + { + var state = new JsonReaderState(new JsonReaderOptions { CommentHandling = JsonCommentHandling.Allow }); + var json = new Utf8JsonReader(dataUtf8, isFinalBlock: true, state); + for (int i = 0; i < numReads; i++) + { + Assert.True(json.Read()); + } + Assert.Equal(skipTokenType, json.TokenType); + try + { + Assert.True(json.IsFinalBlock); + json.TrySkip(); + Assert.True(false, "Expected JsonException was not thrown for incomplete/invalid JSON payload when skipping."); + } + catch (JsonException) { } + } + + { + var state = new JsonReaderState(new JsonReaderOptions { CommentHandling = JsonCommentHandling.Allow }); + var json = new Utf8JsonReader(dataUtf8, isFinalBlock: false, state); + for (int i = 0; i < numReads; i++) + { + Assert.True(json.Read()); + } + Assert.Equal(skipTokenType, json.TokenType); + long before = json.BytesConsumed; + Assert.False(json.IsFinalBlock); + Assert.False(json.TrySkip()); + Assert.Equal(skipTokenType, json.TokenType); + Assert.Equal(before, json.BytesConsumed); + } + } + + [Fact] + public static void SkipAtCommentDoesNothing() + { + string jsonString = "[//some comment\n 1, 2, 3]"; + byte[] dataUtf8 = Encoding.UTF8.GetBytes(jsonString); + + var state = new JsonReaderState(new JsonReaderOptions { CommentHandling = JsonCommentHandling.Allow }); + var json = new Utf8JsonReader(dataUtf8, isFinalBlock: true, state); + Assert.True(json.Read()); + Assert.True(json.Read()); + Assert.Equal(JsonTokenType.Comment, json.TokenType); + + json.Skip(); + + Assert.Equal(JsonTokenType.Comment, json.TokenType); + //Assert.Equal("some comment", json.GetComment()); TODO: https://github.com/dotnet/corefx/issues/33347 + + Assert.True(json.Read()); + Assert.Equal(JsonTokenType.Number, json.TokenType); + Assert.Equal(1, json.GetInt32()); + + json = new Utf8JsonReader(dataUtf8, isFinalBlock: true, state); + Assert.True(json.Read()); + Assert.True(json.Read()); + Assert.Equal(JsonTokenType.Comment, json.TokenType); + + Assert.True(json.TrySkip()); + + Assert.Equal(JsonTokenType.Comment, json.TokenType); + //Assert.Equal("some comment", json.GetComment()); TODO: https://github.com/dotnet/corefx/issues/33347 + + Assert.True(json.Read()); + Assert.Equal(JsonTokenType.Number, json.TokenType); + Assert.Equal(1, json.GetInt32()); + } + + [Fact] + public static void SkipTest() + { + string jsonString = @"{""propertyName"": {""foo"": ""bar""},""nestedArray"": {""numbers"": [1,2,3]}}"; + + byte[] dataUtf8 = Encoding.UTF8.GetBytes(jsonString); + + { + var json = new Utf8JsonReader(dataUtf8, isFinalBlock: true, state: default); + json.Skip(); + Assert.Equal(0, json.CurrentDepth); + Assert.Equal(JsonTokenType.None, json.TokenType); + Assert.Equal(0, json.BytesConsumed); + } + + { + var json = new Utf8JsonReader(dataUtf8, isFinalBlock: true, state: default); + // start object + Assert.True(json.Read()); + Assert.Equal(JsonTokenType.StartObject, json.TokenType); + Assert.Equal(0, json.CurrentDepth); + json.Skip(); + Assert.Equal(0, json.CurrentDepth); + Assert.Equal(JsonTokenType.EndObject, json.TokenType); + Assert.Equal(dataUtf8.Length, json.BytesConsumed); + } + + { + var json = new Utf8JsonReader(dataUtf8, isFinalBlock: true, state: default); + // start object, property + Assert.True(json.Read()); + Assert.True(json.Read()); + Assert.Equal(JsonTokenType.PropertyName, json.TokenType); + Assert.Equal(1, json.CurrentDepth); + json.Skip(); + Assert.Equal(1, json.CurrentDepth); + Assert.Equal(JsonTokenType.EndObject, json.TokenType); + Assert.Equal(31, json.BytesConsumed); + } + + { + var json = new Utf8JsonReader(dataUtf8, isFinalBlock: true, state: default); + // start object, property, start object + Assert.True(json.Read()); + Assert.True(json.Read()); + Assert.True(json.Read()); + Assert.Equal(JsonTokenType.StartObject, json.TokenType); + Assert.Equal(1, json.CurrentDepth); + json.Skip(); + Assert.Equal(1, json.CurrentDepth); + Assert.Equal(JsonTokenType.EndObject, json.TokenType); + Assert.Equal(31, json.BytesConsumed); + } + + { + var json = new Utf8JsonReader(dataUtf8, isFinalBlock: true, state: default); + for (int i = 0; i < 4; i++) + { + // start object, property, start object, property + Assert.True(json.Read()); + } + Assert.Equal(JsonTokenType.PropertyName, json.TokenType); + Assert.Equal(2, json.CurrentDepth); + json.Skip(); + Assert.Equal(2, json.CurrentDepth); + Assert.Equal(JsonTokenType.String, json.TokenType); + Assert.Equal(30, json.BytesConsumed); + } + + { + var json = new Utf8JsonReader(dataUtf8, isFinalBlock: true, state: default); + for (int i = 0; i < 5; i++) + { + // start object, property, start object, property, string value + Assert.True(json.Read()); + } + Assert.Equal(JsonTokenType.String, json.TokenType); + Assert.Equal(2, json.CurrentDepth); + json.Skip(); + Assert.Equal(2, json.CurrentDepth); + Assert.Equal(JsonTokenType.String, json.TokenType); + Assert.Equal(30, json.BytesConsumed); + } + + { + var json = new Utf8JsonReader(dataUtf8, isFinalBlock: true, state: default); + for (int i = 0; i < 6; i++) + { + // start object, property, start object, property, string value, end object + Assert.True(json.Read()); + } + Assert.Equal(JsonTokenType.EndObject, json.TokenType); + Assert.Equal(1, json.CurrentDepth); + json.Skip(); + Assert.Equal(1, json.CurrentDepth); + Assert.Equal(JsonTokenType.EndObject, json.TokenType); + Assert.Equal(31, json.BytesConsumed); + } + + { + var json = new Utf8JsonReader(dataUtf8, isFinalBlock: true, state: default); + for (int i = 0; i < 9; i++) + { + // start object, property, start object, property, string value, property, start object, property + Assert.True(json.Read()); + } + Assert.Equal(JsonTokenType.PropertyName, json.TokenType); + Assert.Equal(2, json.CurrentDepth); + json.Skip(); + Assert.Equal(2, json.CurrentDepth); + Assert.Equal(JsonTokenType.EndArray, json.TokenType); + Assert.Equal(66, json.BytesConsumed); + } + + { + var json = new Utf8JsonReader(dataUtf8, isFinalBlock: true, state: default); + for (int i = 0; i < 10; i++) + { + // start object, property, start object, property, string value, property, start object, property, start array + Assert.True(json.Read()); + } + Assert.Equal(JsonTokenType.StartArray, json.TokenType); + Assert.Equal(2, json.CurrentDepth); + json.Skip(); + Assert.Equal(2, json.CurrentDepth); + Assert.Equal(JsonTokenType.EndArray, json.TokenType); + Assert.Equal(66, json.BytesConsumed); + } + + { + var json = new Utf8JsonReader(dataUtf8, isFinalBlock: true, state: default); + for (int i = 0; i < 11; i++) + { + // start object, property, start object, property, string value, property, start object, property, start array, number value + Assert.True(json.Read()); + } + Assert.Equal(JsonTokenType.Number, json.TokenType); + Assert.Equal(3, json.CurrentDepth); + json.Skip(); + Assert.Equal(3, json.CurrentDepth); + Assert.Equal(JsonTokenType.Number, json.TokenType); + Assert.Equal(61, json.BytesConsumed); + } + } + + [Fact] + public static void SkipTestEmpty() + { + string jsonString = @"{""nestedArray"": {""empty"": [],""empty"": [{}]}}"; + + byte[] dataUtf8 = Encoding.UTF8.GetBytes(jsonString); + + { + var json = new Utf8JsonReader(dataUtf8, isFinalBlock: true, state: default); + for (int i = 0; i < 4; i++) + { + // start object, property, start object, property + Assert.True(json.Read()); + } + Assert.Equal(JsonTokenType.PropertyName, json.TokenType); + Assert.Equal(2, json.CurrentDepth); + json.Skip(); + Assert.Equal(2, json.CurrentDepth); + Assert.Equal(JsonTokenType.EndArray, json.TokenType); + Assert.Equal(28, json.BytesConsumed); + } + + { + var json = new Utf8JsonReader(dataUtf8, isFinalBlock: true, state: default); + for (int i = 0; i < 5; i++) + { + // start object, property, start object, property, start array + Assert.True(json.Read()); + } + Assert.Equal(JsonTokenType.StartArray, json.TokenType); + Assert.Equal(2, json.CurrentDepth); + json.Skip(); + Assert.Equal(2, json.CurrentDepth); + Assert.Equal(JsonTokenType.EndArray, json.TokenType); + Assert.Equal(28, json.BytesConsumed); + } + + { + var json = new Utf8JsonReader(dataUtf8, isFinalBlock: true, state: default); + for (int i = 0; i < 7; i++) + { + // start object, property, start object, property, start array, end array, property name + Assert.True(json.Read()); + } + Assert.Equal(JsonTokenType.PropertyName, json.TokenType); + Assert.Equal(2, json.CurrentDepth); + json.Skip(); + Assert.Equal(2, json.CurrentDepth); + Assert.Equal(JsonTokenType.EndArray, json.TokenType); + Assert.Equal(42, json.BytesConsumed); + } + } + [Theory] // Pad depth by nested objects, but minimize the text [InlineData(1, true, true)] @@ -3334,6 +4211,28 @@ public static IEnumerable CommentTestLineSeparators } } + public static IEnumerable TrySkipValues + { + get + { + return new List + { + new object[] {"[[[]], {\"a\":1, \"b\": 2}, 3, {\"a\":{}, \"b\":{\"c\":[]} }, [{\"a\":1, \"b\": 2}, null]]", JsonTokenType.EndArray}, + new object[] {"[]", JsonTokenType.EndArray}, + new object[] {"[[],[],[],[]]", JsonTokenType.EndArray}, + new object[] {"[[[],[],[]]]", JsonTokenType.EndArray}, + new object[] {"[{},{},{},{}]", JsonTokenType.EndArray}, + new object[] {"[{\"a\":[], \"b\":[], \"c\":[]}]", JsonTokenType.EndArray}, + new object[] {"{\"a\":{\"b\":{}}, \"c\":[1, 2], \"d\": 3, \"e\":[[], [{}] ], \"f\":{\"g\":[1, 2], \"e\":null}}", JsonTokenType.EndObject}, + new object[] {"{}", JsonTokenType.EndObject}, + new object[] {"{\"a\":{}, \"b\":{}, \"c\":{}, \"d\":{}}", JsonTokenType.EndObject}, + new object[] {"{\"a\":{\"b\":{}, \"c\":{}, \"d\":{}}}", JsonTokenType.EndObject}, + new object[] {"{\"a\":[], \"b\":[], \"c\":[], \"d\":[]}", JsonTokenType.EndObject}, + new object[] {"{\"a\":[{}, {}, {}]}", JsonTokenType.EndObject}, + }; + } + } + public static IEnumerable GetCommentTestData { get From e8990ae04e4ef62f5ccb143352472c9b4d5d5968 Mon Sep 17 00:00:00 2001 From: Maryam Ariyan Date: Tue, 28 May 2019 12:27:20 -0700 Subject: [PATCH 523/607] Make JsonPropertyNameAttribute.Name readonly (#37829) Rename ctor arg to name Fixes: #37552 --- src/System.Text.Json/docs/SerializerProgrammingModel.md | 4 ++-- src/System.Text.Json/ref/System.Text.Json.cs | 4 ++-- .../Text/Json/Serialization/JsonPropertyNameAttribute.cs | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/System.Text.Json/docs/SerializerProgrammingModel.md b/src/System.Text.Json/docs/SerializerProgrammingModel.md index 73d4d7e4000e..6c5dc0845317 100644 --- a/src/System.Text.Json/docs/SerializerProgrammingModel.md +++ b/src/System.Text.Json/docs/SerializerProgrammingModel.md @@ -128,8 +128,8 @@ namespace System.Text.Json.Serialization [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property, AllowMultiple = false)] public sealed class JsonPropertyNameAttribute : System.Text.Json.Serialization.JsonAttribute { - public JsonPropertyNameAttribute(string propertyName) { } - public string Name { get; set; } + public JsonPropertyNameAttribute(string name) { } + public string Name { get; } } public abstract partial class JsonNamingPolicy diff --git a/src/System.Text.Json/ref/System.Text.Json.cs b/src/System.Text.Json/ref/System.Text.Json.cs index f7783720ef4f..fbf9ea8399b9 100644 --- a/src/System.Text.Json/ref/System.Text.Json.cs +++ b/src/System.Text.Json/ref/System.Text.Json.cs @@ -374,8 +374,8 @@ protected JsonNamingPolicy() { } [System.AttributeUsageAttribute(System.AttributeTargets.Property, AllowMultiple=false)] public sealed partial class JsonPropertyNameAttribute : System.Text.Json.Serialization.JsonAttribute { - public JsonPropertyNameAttribute(string propertyName) { } - public string Name { get { throw null; } set { } } + public JsonPropertyNameAttribute(string name) { } + public string Name { get { throw null; } } } public static partial class JsonSerializer { diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyNameAttribute.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyNameAttribute.cs index e3a5ecb16b07..563ed5d6fd39 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyNameAttribute.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyNameAttribute.cs @@ -14,15 +14,15 @@ public sealed class JsonPropertyNameAttribute : JsonAttribute /// /// Initializes a new instance of with the specified property name. /// - /// The name of the property. - public JsonPropertyNameAttribute(string propertyName) + /// The name of the property. + public JsonPropertyNameAttribute(string name) { - Name = propertyName; + Name = name; } /// /// The name of the property. /// - public string Name { get; set; } + public string Name { get; } } } From 3ca2657708840510873d8564c182ed06e92d87f6 Mon Sep 17 00:00:00 2001 From: Stephen Toub Date: Tue, 28 May 2019 16:42:32 -0400 Subject: [PATCH 524/607] Improve Debug.Assert in ConcurrentBag (#37986) To try to help track down a spurious assert failure. --- .../src/System/Collections/Concurrent/ConcurrentBag.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/System.Collections.Concurrent/src/System/Collections/Concurrent/ConcurrentBag.cs b/src/System.Collections.Concurrent/src/System/Collections/Concurrent/ConcurrentBag.cs index 7a18348770f4..60912dd63bb9 100644 --- a/src/System.Collections.Concurrent/src/System/Collections/Concurrent/ConcurrentBag.cs +++ b/src/System.Collections.Concurrent/src/System/Collections/Concurrent/ConcurrentBag.cs @@ -1052,8 +1052,10 @@ internal int DangerousCount get { Debug.Assert(Monitor.IsEntered(this)); - int count = _addTakeCount - _stealCount; - Debug.Assert(count >= 0); + int stealCount = _stealCount; + int addTakeCount = _addTakeCount; + int count = addTakeCount - stealCount; + Debug.Assert(count >= 0, $"Expected _addTakeCount ({addTakeCount}) >= _stealCount ({stealCount})."); return count; } } From 141151b668668fa12d6c9c60856fd392d74bde8a Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Tue, 28 May 2019 13:52:41 -0700 Subject: [PATCH 525/607] Update dependencies from https://github.com/dotnet/corefx build 20190527.2 (#37980) - runtime.native.System.IO.Ports - 4.6.0-preview6.19277.2 - Microsoft.NETCore.Platforms - 3.0.0-preview6.19277.2 --- eng/Version.Details.xml | 8 ++++---- eng/Versions.props | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 32d8b74096ee..ae1376b13b0a 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -26,13 +26,13 @@ https://github.com/dotnet/core-setup 4122653611ecb6e7f964af762b4280ba0e1421c8 - + https://github.com/dotnet/corefx - ca535178383c526a0eb7a00f7ff6df36e0af1ea1 + d58a8ade31b4731759c92df00d0f6398c52f3d83 - + https://github.com/dotnet/corefx - ca535178383c526a0eb7a00f7ff6df36e0af1ea1 + d58a8ade31b4731759c92df00d0f6398c52f3d83 https://github.com/dotnet/arcade diff --git a/eng/Versions.props b/eng/Versions.props index e450ddc0c128..f0958fe54a30 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -43,8 +43,8 @@ 3.0.0-preview6.19277.72 3.0.0-preview6.19277.72 - 3.0.0-preview6.19274.8 - 4.6.0-preview6.19274.8 + 3.0.0-preview6.19277.2 + 4.6.0-preview6.19277.2 2.1.0-prerelease.19274.2 From ac24849e0404b9a7caba56fd398dbe6c5dbede0a Mon Sep 17 00:00:00 2001 From: Stephen Toub Date: Tue, 28 May 2019 17:46:40 -0400 Subject: [PATCH 526/607] Remove socket cancellation workarounds on Unix from System.IO.Pipes (#37988) --- .../src/System/IO/Pipes/PipeStream.Unix.cs | 79 ++----------------- .../src/System/IO/Pipes/PipeStream.Windows.cs | 6 +- .../src/System/IO/Pipes/PipeStream.cs | 4 +- 3 files changed, 12 insertions(+), 77 deletions(-) diff --git a/src/System.IO.Pipes/src/System/IO/Pipes/PipeStream.Unix.cs b/src/System.IO.Pipes/src/System/IO/Pipes/PipeStream.Unix.cs index d516af88eb55..495990b0f8e4 100644 --- a/src/System.IO.Pipes/src/System/IO/Pipes/PipeStream.Unix.cs +++ b/src/System.IO.Pipes/src/System/IO/Pipes/PipeStream.Unix.cs @@ -175,54 +175,13 @@ private unsafe void WriteCore(ReadOnlySpan buffer) } } - private async Task ReadAsyncCore(Memory destination, CancellationToken cancellationToken) + private async ValueTask ReadAsyncCore(Memory destination, CancellationToken cancellationToken) { Debug.Assert(this is NamedPipeClientStream || this is NamedPipeServerStream, $"Expected a named pipe, got a {GetType()}"); - Socket socket = InternalHandle.NamedPipeSocket; - try { - // TODO #22608: - // Remove all of this cancellation workaround once Socket.ReceiveAsync - // that accepts a CancellationToken is available. - - // If a cancelable token is used and there's no data, issue a zero-length read so that - // we're asynchronously notified when data is available, and concurrently monitor the - // supplied cancellation token. If cancellation is requested, we will end up "leaking" - // the zero-length read until data becomes available, at which point it'll be satisfied. - // But it's very rare to reuse a stream after an operation has been canceled, so even if - // we do incur such a situation, it's likely to be very short lived. - if (cancellationToken.CanBeCanceled) - { - cancellationToken.ThrowIfCancellationRequested(); - if (socket.Available == 0) - { - Task t = socket.ReceiveAsync(Array.Empty(), SocketFlags.None); - if (!t.IsCompletedSuccessfully) - { - var cancelTcs = new TaskCompletionSource(); - using (cancellationToken.UnsafeRegister(s => ((TaskCompletionSource)s).TrySetResult(true), cancelTcs)) - { - if (t == await Task.WhenAny(t, cancelTcs.Task).ConfigureAwait(false)) - { - t.GetAwaiter().GetResult(); // propagate any failure - } - cancellationToken.ThrowIfCancellationRequested(); - - // At this point there was data available. In the rare case where multiple concurrent - // ReadAsyncs are issued against the PipeStream, worst case is the reads that lose - // the race condition for the data will end up in a non-cancelable state as part of - // the actual async receive operation. - } - } - } - } - - // Issue the asynchronous read. - return await (MemoryMarshal.TryGetArray(destination, out ArraySegment buffer) ? - socket.ReceiveAsync(buffer, SocketFlags.None) : - socket.ReceiveAsync(destination.ToArray(), SocketFlags.None)).ConfigureAwait(false); + return await InternalHandle.NamedPipeSocket.ReceiveAsync(destination, SocketFlags.None, cancellationToken).ConfigureAwait(false); } catch (SocketException e) { @@ -233,38 +192,14 @@ private async Task ReadAsyncCore(Memory destination, CancellationToke private async Task WriteAsyncCore(ReadOnlyMemory source, CancellationToken cancellationToken) { Debug.Assert(this is NamedPipeClientStream || this is NamedPipeServerStream, $"Expected a named pipe, got a {GetType()}"); + try { - // TODO #22608: Remove this terribly inefficient special-case once Socket.SendAsync - // accepts a Memory in the near future. - byte[] buffer; - int offset, count; - if (MemoryMarshal.TryGetArray(source, out ArraySegment segment)) + while (source.Length > 0) { - buffer = segment.Array; - offset = segment.Offset; - count = segment.Count; - } - else - { - buffer = source.ToArray(); - offset = 0; - count = buffer.Length; - } - - while (count > 0) - { - // cancellationToken is (mostly) ignored. We could institute a polling loop like we do for reads if - // cancellationToken.CanBeCanceled, but that adds costs regardless of whether the operation will be canceled, and - // most writes will complete immediately as they simply store data into the socket's buffer. The only time we end - // up using it in a meaningful way is if a write completes partially, we'll check it on each individual write operation. - cancellationToken.ThrowIfCancellationRequested(); - - int bytesWritten = await _handle.NamedPipeSocket.SendAsync(new ArraySegment(buffer, offset, count), SocketFlags.None).ConfigureAwait(false); - Debug.Assert(bytesWritten <= count); - - count -= bytesWritten; - offset += bytesWritten; + int bytesWritten = await _handle.NamedPipeSocket.SendAsync(source, SocketFlags.None, cancellationToken).ConfigureAwait(false); + Debug.Assert(bytesWritten > 0 && bytesWritten <= source.Length); + source = source.Slice(bytesWritten); } } catch (SocketException e) diff --git a/src/System.IO.Pipes/src/System/IO/Pipes/PipeStream.Windows.cs b/src/System.IO.Pipes/src/System/IO/Pipes/PipeStream.Windows.cs index 1a308116bb2c..3fc001116555 100644 --- a/src/System.IO.Pipes/src/System/IO/Pipes/PipeStream.Windows.cs +++ b/src/System.IO.Pipes/src/System/IO/Pipes/PipeStream.Windows.cs @@ -81,7 +81,7 @@ private unsafe int ReadCore(Span buffer) return r; } - private Task ReadAsyncCore(Memory buffer, CancellationToken cancellationToken) + private ValueTask ReadAsyncCore(Memory buffer, CancellationToken cancellationToken) { var completionSource = new ReadWriteCompletionSource(this, buffer, isWrite: false); @@ -121,7 +121,7 @@ private Task ReadAsyncCore(Memory buffer, CancellationToken cancellat completionSource.ReleaseResources(); UpdateMessageCompletion(true); - return s_zeroTask; + return new ValueTask(0); case Interop.Errors.ERROR_IO_PENDING: break; @@ -132,7 +132,7 @@ private Task ReadAsyncCore(Memory buffer, CancellationToken cancellat } completionSource.RegisterForCancellation(cancellationToken); - return completionSource.Task; + return new ValueTask(completionSource.Task); } private unsafe void WriteCore(ReadOnlySpan buffer) diff --git a/src/System.IO.Pipes/src/System/IO/Pipes/PipeStream.cs b/src/System.IO.Pipes/src/System/IO/Pipes/PipeStream.cs index 4095d56b0c75..1366e2e92b28 100644 --- a/src/System.IO.Pipes/src/System/IO/Pipes/PipeStream.cs +++ b/src/System.IO.Pipes/src/System/IO/Pipes/PipeStream.cs @@ -168,7 +168,7 @@ public override Task ReadAsync(byte[] buffer, int offset, int count, Cancel return s_zeroTask; } - return ReadAsyncCore(new Memory(buffer, offset, count), cancellationToken); + return ReadAsyncCore(new Memory(buffer, offset, count), cancellationToken).AsTask(); } public override ValueTask ReadAsync(Memory buffer, CancellationToken cancellationToken = default(CancellationToken)) @@ -196,7 +196,7 @@ public override Task ReadAsync(byte[] buffer, int offset, int count, Cancel return new ValueTask(0); } - return new ValueTask(ReadAsyncCore(buffer, cancellationToken)); + return ReadAsyncCore(buffer, cancellationToken); } public override IAsyncResult BeginRead(byte[] buffer, int offset, int count, AsyncCallback callback, object state) From c0629b395e8cfe632fcf1bd75e9de1a02cbb514c Mon Sep 17 00:00:00 2001 From: Barry Dorrans Date: Tue, 28 May 2019 15:21:46 -0700 Subject: [PATCH 527/607] Creating common security policy --- SECURITY.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 SECURITY.md diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 000000000000..92d052767fc0 --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,15 @@ +# Security Policy + +## Supported Versions + +The .NET Core and ASP.NET Core support policy, including supported versions can be found at the [.NET Core Support Policy Page](https://dotnet.microsoft.com/platform/support/policy/dotnet-core). + +## Reporting a Vulnerability + +Security issues and bugs should be reported privately, via email, to the Microsoft Security Response Center (MSRC) secure@microsoft.com. +You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your +original message. Further information, including the MSRC PGP key, can be found in the [Security TechCenter](https://technet.microsoft.com/en-us/security/ff852094.aspx). + +Reports via MSRC may qualify for the .NET Core Bug Bounty. Details of the .NET Core Bug Bounty including terms and conditions are at [https://aka.ms/corebounty](https://aka.ms/corebounty). + +Please do not open issues for anything you think might have a security implication. From 7508b75b843d89f6df5e5789c65a3cc23b94b757 Mon Sep 17 00:00:00 2001 From: Stephen Toub Date: Tue, 28 May 2019 20:40:11 -0400 Subject: [PATCH 528/607] Improve SocketAddress.ToString() performance (#37973) * Improve SocketAddress.ToString() performance * Disable test on Unix --- src/Common/src/System/Net/SocketAddress.cs | 40 +++++++++++++++-- .../src/System.Net.NetworkInformation.csproj | 1 + .../FunctionalTests/SocketAddressTest.cs | 43 ++++++++++--------- 3 files changed, 60 insertions(+), 24 deletions(-) diff --git a/src/Common/src/System/Net/SocketAddress.cs b/src/Common/src/System/Net/SocketAddress.cs index c551c6071cb5..e9f495ed75e8 100644 --- a/src/Common/src/System/Net/SocketAddress.cs +++ b/src/Common/src/System/Net/SocketAddress.cs @@ -229,18 +229,50 @@ public override int GetHashCode() public override string ToString() { - var sb = new StringBuilder().Append(Family.ToString()).Append(':').Append(Size).Append(":{"); + // Get the address family string. In almost all cases, this should be a cached string + // from the enum and won't actually allocate. + string familyString = Family.ToString(); + // Determine the maximum length needed to format. + int maxLength = + familyString.Length + // AddressFamily + 1 + // : + 10 + // Size (max length for a positive Int32) + 2 + // :{ + (Size - DataOffset) * 4 + // at most ','+3digits per byte + 1; // } + + Span result = maxLength <= 256 ? // arbitrary limit that should be large enough for the vast majority of cases + stackalloc char[256] : + new char[maxLength]; + + familyString.AsSpan().CopyTo(result); + int length = familyString.Length; + + result[length++] = ':'; + + bool formatted = Size.TryFormat(result.Slice(length), out int charsWritten); + Debug.Assert(formatted); + length += charsWritten; + + result[length++] = ':'; + result[length++] = '{'; + + byte[] buffer = Buffer; for (int i = DataOffset; i < Size; i++) { if (i > DataOffset) { - sb.Append(','); + result[length++] = ','; } - sb.Append(this[i]); + + formatted = buffer[i].TryFormat(result.Slice(length), out charsWritten); + Debug.Assert(formatted); + length += charsWritten; } - return sb.Append('}').ToString(); + result[length++] = '}'; + return result.Slice(0, length).ToString(); } } } diff --git a/src/System.Net.NetworkInformation/src/System.Net.NetworkInformation.csproj b/src/System.Net.NetworkInformation/src/System.Net.NetworkInformation.csproj index 27a0801c29d5..594a34b09861 100644 --- a/src/System.Net.NetworkInformation/src/System.Net.NetworkInformation.csproj +++ b/src/System.Net.NetworkInformation/src/System.Net.NetworkInformation.csproj @@ -286,6 +286,7 @@ + diff --git a/src/System.Net.Primitives/tests/FunctionalTests/SocketAddressTest.cs b/src/System.Net.Primitives/tests/FunctionalTests/SocketAddressTest.cs index 90c7644ea02d..e851b40e026f 100644 --- a/src/System.Net.Primitives/tests/FunctionalTests/SocketAddressTest.cs +++ b/src/System.Net.Primitives/tests/FunctionalTests/SocketAddressTest.cs @@ -53,29 +53,32 @@ public static void Equals_Compare_Success() Assert.NotEqual(sa1, sa4); } - [ActiveIssue(30523, TestPlatforms.AnyUnix)] - [Fact] - public static void ToString_Compare_Success() + [Theory] + [InlineData(AddressFamily.InterNetwork, 64, false, "InterNetwork:64:{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}")] + [InlineData(AddressFamily.InterNetwork, 48, false, "InterNetwork:48:{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}")] + [InlineData(AddressFamily.InterNetworkV6, 48, false, "InterNetworkV6:48:{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}")] + [InlineData(AddressFamily.InterNetworkV6, 48, true, "InterNetworkV6:48:{2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47}")] + [InlineData(AddressFamily.Unix, 255, true, "Unix:255:{2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254}")] + [InlineData(AddressFamily.Unix, 256, true, "Unix:256:{2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255}")] + [InlineData(AddressFamily.Unix, 257, true, "Unix:257:{2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,0}")] + [InlineData(AddressFamily.Unix, 258, true, "Unix:258:{2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,0,1}")] + public static void ToString_Expected_Success(AddressFamily family, int size, bool fillBytes, string expected) { - SocketAddress sa1 = new SocketAddress(AddressFamily.InterNetwork, 64); - SocketAddress sa2 = new SocketAddress(AddressFamily.InterNetwork, 64); - SocketAddress sa3 = new SocketAddress(AddressFamily.InterNetwork, 48); - - SocketAddress sa4 = new SocketAddress(AddressFamily.InterNetworkV6, 48); - - Assert.Equal(sa1.ToString(), sa2.ToString()); - Assert.NotEqual(sa1.ToString(), sa3.ToString()); - Assert.NotEqual(sa1.ToString(), sa4.ToString()); - - Assert.Equal("InterNetwork:64:{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}", sa1.ToString()); - Assert.Equal("InterNetworkV6:48:{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}", sa4.ToString()); - - SocketAddress sa5 = new SocketAddress(AddressFamily.InterNetworkV6, 48); - for (int i = 2; i < sa5.Size; i++) + var sa = size >= 0 ? new SocketAddress(family, size) : new SocketAddress(family); + if (fillBytes) { - sa5[i] = (byte)i; + for (int i = 2; i < sa.Size; i++) + { + sa[i] = (byte)i; + } } - Assert.EndsWith("2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47}", sa5.ToString()); + Assert.Equal(expected, sa.ToString()); } + + [ActiveIssue(37997, TestPlatforms.AnyUnix)] + [Theory] // recombine into ToString_Expected_Success when #37997 is fixed + [InlineData((AddressFamily)12345, -1, false, "12345:32:{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}")] + public static void ToString_UnknownFamily_Success(AddressFamily family, int size, bool fillBytes, string expected) => + ToString_Expected_Success(family, size, fillBytes, expected); } } From 2f28708788d67eb9943cd14a39df4bc87298418e Mon Sep 17 00:00:00 2001 From: Stephen Toub Date: Tue, 28 May 2019 20:44:47 -0400 Subject: [PATCH 529/607] Make AuthenticateAsClient/ServerAsync cancellation token optional (#37996) --- src/System.Net.Security/ref/System.Net.Security.cs | 4 ++-- src/System.Net.Security/src/System/Net/Security/SslStream.cs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/System.Net.Security/ref/System.Net.Security.cs b/src/System.Net.Security/ref/System.Net.Security.cs index 2a45d123a797..b9f86b418baa 100644 --- a/src/System.Net.Security/ref/System.Net.Security.cs +++ b/src/System.Net.Security/ref/System.Net.Security.cs @@ -176,14 +176,14 @@ public partial class SslStream : System.Net.Security.AuthenticatedStream public virtual void AuthenticateAsClient(string targetHost) { } public virtual void AuthenticateAsClient(string targetHost, System.Security.Cryptography.X509Certificates.X509CertificateCollection clientCertificates, bool checkCertificateRevocation) { } public virtual void AuthenticateAsClient(string targetHost, System.Security.Cryptography.X509Certificates.X509CertificateCollection clientCertificates, System.Security.Authentication.SslProtocols enabledSslProtocols, bool checkCertificateRevocation) { } - public System.Threading.Tasks.Task AuthenticateAsClientAsync(System.Net.Security.SslClientAuthenticationOptions sslClientAuthenticationOptions, System.Threading.CancellationToken cancellationToken) { throw null; } + public System.Threading.Tasks.Task AuthenticateAsClientAsync(System.Net.Security.SslClientAuthenticationOptions sslClientAuthenticationOptions, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task AuthenticateAsClientAsync(string targetHost) { throw null; } public virtual System.Threading.Tasks.Task AuthenticateAsClientAsync(string targetHost, System.Security.Cryptography.X509Certificates.X509CertificateCollection clientCertificates, bool checkCertificateRevocation) { throw null; } public virtual System.Threading.Tasks.Task AuthenticateAsClientAsync(string targetHost, System.Security.Cryptography.X509Certificates.X509CertificateCollection clientCertificates, System.Security.Authentication.SslProtocols enabledSslProtocols, bool checkCertificateRevocation) { throw null; } public virtual void AuthenticateAsServer(System.Security.Cryptography.X509Certificates.X509Certificate serverCertificate) { } public virtual void AuthenticateAsServer(System.Security.Cryptography.X509Certificates.X509Certificate serverCertificate, bool clientCertificateRequired, bool checkCertificateRevocation) { } public virtual void AuthenticateAsServer(System.Security.Cryptography.X509Certificates.X509Certificate serverCertificate, bool clientCertificateRequired, System.Security.Authentication.SslProtocols enabledSslProtocols, bool checkCertificateRevocation) { } - public System.Threading.Tasks.Task AuthenticateAsServerAsync(System.Net.Security.SslServerAuthenticationOptions sslServerAuthenticationOptions, System.Threading.CancellationToken cancellationToken) { throw null; } + public System.Threading.Tasks.Task AuthenticateAsServerAsync(System.Net.Security.SslServerAuthenticationOptions sslServerAuthenticationOptions, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task AuthenticateAsServerAsync(System.Security.Cryptography.X509Certificates.X509Certificate serverCertificate) { throw null; } public virtual System.Threading.Tasks.Task AuthenticateAsServerAsync(System.Security.Cryptography.X509Certificates.X509Certificate serverCertificate, bool clientCertificateRequired, bool checkCertificateRevocation) { throw null; } public virtual System.Threading.Tasks.Task AuthenticateAsServerAsync(System.Security.Cryptography.X509Certificates.X509Certificate serverCertificate, bool clientCertificateRequired, System.Security.Authentication.SslProtocols enabledSslProtocols, bool checkCertificateRevocation) { throw null; } diff --git a/src/System.Net.Security/src/System/Net/Security/SslStream.cs b/src/System.Net.Security/src/System/Net/Security/SslStream.cs index 29426e5ca38b..bc5aee8ea632 100644 --- a/src/System.Net.Security/src/System/Net/Security/SslStream.cs +++ b/src/System.Net.Security/src/System/Net/Security/SslStream.cs @@ -397,7 +397,7 @@ public virtual Task AuthenticateAsClientAsync(string targetHost, X509Certificate this); } - public Task AuthenticateAsClientAsync(SslClientAuthenticationOptions sslClientAuthenticationOptions, CancellationToken cancellationToken) + public Task AuthenticateAsClientAsync(SslClientAuthenticationOptions sslClientAuthenticationOptions, CancellationToken cancellationToken = default) { return Task.Factory.FromAsync( (arg1, arg2, callback, state) => ((SslStream)state).BeginAuthenticateAsClient(arg1, arg2, callback, state), @@ -432,7 +432,7 @@ public virtual Task AuthenticateAsServerAsync(X509Certificate serverCertificate, this); } - public Task AuthenticateAsServerAsync(SslServerAuthenticationOptions sslServerAuthenticationOptions, CancellationToken cancellationToken) + public Task AuthenticateAsServerAsync(SslServerAuthenticationOptions sslServerAuthenticationOptions, CancellationToken cancellationToken = default) { return Task.Factory.FromAsync( (arg1, arg2, callback, state) => ((SslStream)state).BeginAuthenticateAsServer(arg1, arg2, callback, state), From c7d48ca7732b7717e84d8375588d83866104ef58 Mon Sep 17 00:00:00 2001 From: Stephen Toub Date: Tue, 28 May 2019 20:46:45 -0400 Subject: [PATCH 530/607] Disable sporadically failing GetGCMemoryInfo test (#37995) --- src/System.Runtime/tests/System/GCTests.netcoreapp.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/System.Runtime/tests/System/GCTests.netcoreapp.cs b/src/System.Runtime/tests/System/GCTests.netcoreapp.cs index e6eea7fc2ce7..cfb773aed4ac 100644 --- a/src/System.Runtime/tests/System/GCTests.netcoreapp.cs +++ b/src/System.Runtime/tests/System/GCTests.netcoreapp.cs @@ -26,6 +26,7 @@ public static void GetAllocatedBytesForCurrentThread(int size) Assert.True((end - start) < 5 * size, $"Allocated too much: start: {start} end: {end} size: {size}"); } + [ActiveIssue(37378)] [Fact] public static void GetGCMemoryInfo() { From c524b4da0f5cf4181fb9f30ae75ad29ef05ff018 Mon Sep 17 00:00:00 2001 From: Liudmila Molkova Date: Wed, 29 May 2019 00:35:31 -0700 Subject: [PATCH 531/607] Fix wrong Activity.Id serialization - 00 flags are used --- .../src/System/Diagnostics/Activity.cs | 44 ++++++++++++++----- .../tests/ActivityTests.cs | 5 +++ 2 files changed, 38 insertions(+), 11 deletions(-) diff --git a/src/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/Activity.cs b/src/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/Activity.cs index 609744f6fdd7..a6551b83628f 100644 --- a/src/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/Activity.cs +++ b/src/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/Activity.cs @@ -281,7 +281,7 @@ public Activity SetParentId(in ActivityTraceId traceId, in ActivitySpanId spanId _traceIdSet = true; _parentSpanId = spanId; _parentSpanIdSet = true; - _w3CIdFlags = (byte) activityTraceFlags; + _w3CIdFlags = (byte)activityTraceFlags; _w3CIdFlagsSet = true; } return this; @@ -525,17 +525,9 @@ public ActivityTraceFlags ActivityTraceFlags { if (!_w3CIdFlagsSet) { - if (Parent != null) - { - ActivityTraceFlags = Parent.ActivityTraceFlags; - } - else if (_parentId != null && IsW3CId(_parentId)) - { - _w3CIdFlags = ActivityTraceId.HexByteFromChars(_parentId[53], _parentId[54]); - _w3CIdFlagsSet = true; - } + _w3CIdFlagsSet = TrySetTraceFlagsFromParent(); } - return (ActivityTraceFlags) _w3CIdFlags; + return (ActivityTraceFlags)_w3CIdFlags; } set { @@ -646,6 +638,12 @@ private void GenerateW3CId() _traceIdSet = true; } } + + if (!_w3CIdFlagsSet) + { + _w3CIdFlagsSet = TrySetTraceFlagsFromParent(); + } + // Create a new SpanID. _spanId = ActivitySpanId.CreateRandom(); _spanIdSet = true; @@ -793,6 +791,30 @@ private bool TrySetTraceIdFromParent() return _traceIdSet; } +#if ALLOW_PARTIALLY_TRUSTED_CALLERS + [System.Security.SecuritySafeCriticalAttribute] +#endif + private bool TrySetTraceFlagsFromParent() + { + Debug.Assert(!_w3CIdFlagsSet); + + if (!_w3CIdFlagsSet) + { + if (Parent != null) + { + ActivityTraceFlags = Parent.ActivityTraceFlags; + } + else if (_parentId != null && IsW3CId(_parentId)) + { + _w3CIdFlags = ActivityTraceId.HexByteFromChars(_parentId[53], _parentId[54]); + _w3CIdFlagsSet = true; + } + } + + return _w3CIdFlagsSet; + } + + private string _rootId; private int _currentChildId; // A unique number for all children of this activity. diff --git a/src/System.Diagnostics.DiagnosticSource/tests/ActivityTests.cs b/src/System.Diagnostics.DiagnosticSource/tests/ActivityTests.cs index 7604e1c05626..c7b2366a2664 100644 --- a/src/System.Diagnostics.DiagnosticSource/tests/ActivityTests.cs +++ b/src/System.Diagnostics.DiagnosticSource/tests/ActivityTests.cs @@ -687,6 +687,7 @@ public void ActivityTraceFlagsTests() Assert.Equal("0123456789abcdef0123456789abcdef", activity.TraceId.ToHexString()); Assert.Equal("0123456789abcdef", activity.ParentSpanId.ToHexString()); Assert.True(IdIsW3CFormat(activity.Id)); + Assert.Equal($"00-0123456789abcdef0123456789abcdef-{activity.SpanId.ToHexString()}-01", activity.Id); Assert.Equal(ActivityTraceFlags.Recorded, activity.ActivityTraceFlags); Assert.True(activity.Recorded); activity.Stop(); @@ -699,6 +700,7 @@ public void ActivityTraceFlagsTests() Assert.Equal(ActivityIdFormat.W3C, activity.IdFormat); Assert.Equal(activityTraceId.ToHexString(), activity.TraceId.ToHexString()); Assert.True(IdIsW3CFormat(activity.Id)); + Assert.Equal($"00-{activity.TraceId.ToHexString()}-{activity.SpanId.ToHexString()}-01", activity.Id); Assert.Equal(ActivityTraceFlags.Recorded, activity.ActivityTraceFlags); Assert.True(activity.Recorded); activity.Stop(); @@ -712,6 +714,7 @@ public void ActivityTraceFlagsTests() Assert.Equal("0123456789abcdef0123456789abcdef", activity.TraceId.ToHexString()); Assert.Equal("0123456789abcdef", activity.ParentSpanId.ToHexString()); Assert.True(IdIsW3CFormat(activity.Id)); + Assert.Equal($"00-{activity.TraceId.ToHexString()}-{activity.SpanId.ToHexString()}-00", activity.Id); Assert.Equal(ActivityTraceFlags.None, activity.ActivityTraceFlags); Assert.False(activity.Recorded); @@ -730,6 +733,7 @@ public void ActivityTraceFlagsTests() Assert.Equal("0123456789abcdef0123456789abcdef", activity.TraceId.ToHexString()); Assert.Equal("0123456789abcdef", activity.ParentSpanId.ToHexString()); Assert.True(IdIsW3CFormat(activity.Id)); + Assert.Equal($"00-{activity.TraceId.ToHexString()}-{activity.SpanId.ToHexString()}-01", activity.Id); Assert.Equal(ActivityTraceFlags.Recorded, activity.ActivityTraceFlags); Assert.True(activity.Recorded); @@ -741,6 +745,7 @@ public void ActivityTraceFlagsTests() Assert.Equal("0123456789abcdef0123456789abcdef", childActivity.TraceId.ToHexString()); Assert.NotEqual(activity.SpanId.ToHexString(), childActivity.SpanId.ToHexString()); Assert.True(IdIsW3CFormat(childActivity.Id)); + Assert.Equal($"00-{childActivity.TraceId.ToHexString()}-{childActivity.SpanId.ToHexString()}-01", childActivity.Id); Assert.Equal(ActivityTraceFlags.Recorded, childActivity.ActivityTraceFlags); Assert.True(childActivity.Recorded); From 5dc4a0875331970d9b7435f07f5c4eedf57d93a3 Mon Sep 17 00:00:00 2001 From: dotnet-maestro-bot Date: Tue, 28 May 2019 22:45:54 -0700 Subject: [PATCH 532/607] Update ProjectNTfs to beta-27729-00 --- eng/dependencies.props | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/dependencies.props b/eng/dependencies.props index 4d1784c551fd..0efc3e7b28c6 100644 --- a/eng/dependencies.props +++ b/eng/dependencies.props @@ -9,12 +9,12 @@ These ref versions are pulled from https://github.com/dotnet/versions. --> - 4f272caf46eecb273000410ad9d9d0323be49c7d + 5a7a120802218de7300ba74a722c2e0c3fd77cae - beta-27728-00 + beta-27729-00 From 7c9bfaf67d7ba0a999d23db10c40bdcfafb5e408 Mon Sep 17 00:00:00 2001 From: dotnet-maestro <@dotnet-maestro> Date: Tue, 28 May 2019 12:18:46 +0000 Subject: [PATCH 533/607] Update dependencies from https://github.com/dotnet/core-setup build 20190527.02 - Microsoft.NETCore.App - 3.0.0-preview6-27727-02 - Microsoft.NETCore.DotNetHost - 3.0.0-preview6-27727-02 - Microsoft.NETCore.DotNetHostPolicy - 3.0.0-preview6-27727-02 --- eng/Version.Details.xml | 12 ++++++------ eng/Versions.props | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index ae1376b13b0a..270d0dd2ffc8 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -14,17 +14,17 @@ - + https://github.com/dotnet/core-setup - 4122653611ecb6e7f964af762b4280ba0e1421c8 + 61f83f1f764a8a2840a21779e386c2ad11fca75d - + https://github.com/dotnet/core-setup - 4122653611ecb6e7f964af762b4280ba0e1421c8 + 61f83f1f764a8a2840a21779e386c2ad11fca75d - + https://github.com/dotnet/core-setup - 4122653611ecb6e7f964af762b4280ba0e1421c8 + 61f83f1f764a8a2840a21779e386c2ad11fca75d https://github.com/dotnet/corefx diff --git a/eng/Versions.props b/eng/Versions.props index f0958fe54a30..b2bf14e48035 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -36,9 +36,9 @@ 2.2.0-beta.19274.6 1.0.0-beta.19274.6 - 3.0.0-preview6-27724-03 - 3.0.0-preview6-27724-03 - 3.0.0-preview6-27724-03 + 3.0.0-preview6-27727-02 + 3.0.0-preview6-27727-02 + 3.0.0-preview6-27727-02 3.0.0-preview6.19277.72 3.0.0-preview6.19277.72 From fdfe98b8b3132f250d67ce6fd2bbef5b7abd7e42 Mon Sep 17 00:00:00 2001 From: dotnet-maestro <@dotnet-maestro> Date: Tue, 28 May 2019 20:03:07 +0000 Subject: [PATCH 534/607] Update dependencies from https://github.com/dotnet/standard build 20190528.1 - NETStandard.Library - 2.1.0-prerelease.19278.1 --- eng/Version.Details.xml | 4 ++-- eng/Versions.props | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 270d0dd2ffc8..0d07f96af7cc 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -38,9 +38,9 @@ https://github.com/dotnet/arcade b5016f5688dc8ca9f3e4811ee7e2e86ad8907a40 - + https://github.com/dotnet/standard - dbf0273ad76a5279703ee5d6e9ae2788b0fe594a + abc624a27f0e40e8c3817b3d410362dcc91cfb95 https://github.com/dotnet/arcade diff --git a/eng/Versions.props b/eng/Versions.props index b2bf14e48035..3d377b8688ac 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -46,7 +46,7 @@ 3.0.0-preview6.19277.2 4.6.0-preview6.19277.2 - 2.1.0-prerelease.19274.2 + 2.1.0-prerelease.19278.1 99.99.99-master-20190521.3 From 1e67bf524952958ac361fc525a6eebece16b15fa Mon Sep 17 00:00:00 2001 From: Viktor Hofer Date: Thu, 23 May 2019 19:41:11 +0200 Subject: [PATCH 535/607] Move dotnet-tools config --- {eng => .config}/dotnet-tools.json | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {eng => .config}/dotnet-tools.json (100%) diff --git a/eng/dotnet-tools.json b/.config/dotnet-tools.json similarity index 100% rename from eng/dotnet-tools.json rename to .config/dotnet-tools.json From 9956e29319e5d6569ba0ddd8196904bb36ada8dd Mon Sep 17 00:00:00 2001 From: Viktor Hofer Date: Tue, 28 May 2019 22:37:20 +0200 Subject: [PATCH 536/607] Manual darc update from build '20190528.1' --- eng/Version.Details.xml | 56 ++++++++++++++++++++--------------------- eng/Versions.props | 24 +++++++++--------- global.json | 4 +-- 3 files changed, 42 insertions(+), 42 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 0d07f96af7cc..a06afc62a665 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -34,65 +34,65 @@ https://github.com/dotnet/corefx d58a8ade31b4731759c92df00d0f6398c52f3d83 - + https://github.com/dotnet/arcade - b5016f5688dc8ca9f3e4811ee7e2e86ad8907a40 + 11f90a2a260422201895de58e57170131ab4efe7 https://github.com/dotnet/standard abc624a27f0e40e8c3817b3d410362dcc91cfb95 - + https://github.com/dotnet/arcade - b5016f5688dc8ca9f3e4811ee7e2e86ad8907a40 + 11f90a2a260422201895de58e57170131ab4efe7 - + https://github.com/dotnet/arcade - b5016f5688dc8ca9f3e4811ee7e2e86ad8907a40 + 11f90a2a260422201895de58e57170131ab4efe7 - + https://github.com/dotnet/arcade - b5016f5688dc8ca9f3e4811ee7e2e86ad8907a40 + 11f90a2a260422201895de58e57170131ab4efe7 - + https://github.com/dotnet/arcade - b5016f5688dc8ca9f3e4811ee7e2e86ad8907a40 + 11f90a2a260422201895de58e57170131ab4efe7 - + https://github.com/dotnet/arcade - b5016f5688dc8ca9f3e4811ee7e2e86ad8907a40 + 11f90a2a260422201895de58e57170131ab4efe7 - + https://github.com/dotnet/arcade - b5016f5688dc8ca9f3e4811ee7e2e86ad8907a40 + 11f90a2a260422201895de58e57170131ab4efe7 - + https://github.com/dotnet/arcade - b5016f5688dc8ca9f3e4811ee7e2e86ad8907a40 + 11f90a2a260422201895de58e57170131ab4efe7 - + https://github.com/dotnet/arcade - b5016f5688dc8ca9f3e4811ee7e2e86ad8907a40 + 11f90a2a260422201895de58e57170131ab4efe7 - + https://github.com/dotnet/arcade - b5016f5688dc8ca9f3e4811ee7e2e86ad8907a40 + 11f90a2a260422201895de58e57170131ab4efe7 - + https://github.com/dotnet/arcade - b5016f5688dc8ca9f3e4811ee7e2e86ad8907a40 + 11f90a2a260422201895de58e57170131ab4efe7 - + https://github.com/dotnet/arcade - b5016f5688dc8ca9f3e4811ee7e2e86ad8907a40 + 11f90a2a260422201895de58e57170131ab4efe7 - + https://github.com/dotnet/arcade - b5016f5688dc8ca9f3e4811ee7e2e86ad8907a40 + 11f90a2a260422201895de58e57170131ab4efe7 - + https://github.com/dotnet/arcade - b5016f5688dc8ca9f3e4811ee7e2e86ad8907a40 + 11f90a2a260422201895de58e57170131ab4efe7 https://dev.azure.com/dnceng/internal/_git/dotnet-optimization diff --git a/eng/Versions.props b/eng/Versions.props index 3d377b8688ac..116bb64c66d1 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -23,18 +23,18 @@ - 1.0.0-beta.19274.6 - 1.0.0-beta.19274.6 - 1.0.0-beta.19274.6 - 1.0.0-beta.19274.6 - 2.4.0-beta.19274.6 - 2.5.1-beta.19274.6 - 1.0.0-beta.19274.6 - 1.0.0-beta.19274.6 - 1.0.0-beta.19274.6 - 1.0.0-beta.19274.6 - 2.2.0-beta.19274.6 - 1.0.0-beta.19274.6 + 1.0.0-beta.19278.1 + 1.0.0-beta.19278.1 + 1.0.0-beta.19278.1 + 1.0.0-beta.19278.1 + 2.4.1-beta.19278.1 + 2.5.1-beta.19278.1 + 1.0.0-beta.19278.1 + 1.0.0-beta.19278.1 + 1.0.0-beta.19278.1 + 1.0.0-beta.19278.1 + 2.2.0-beta.19278.1 + 1.0.0-beta.19278.1 3.0.0-preview6-27727-02 3.0.0-preview6-27727-02 diff --git a/global.json b/global.json index a822d123334a..882e2f4bc683 100644 --- a/global.json +++ b/global.json @@ -3,8 +3,8 @@ "dotnet": "3.0.100-preview6-011681" }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19274.6", - "Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19274.6", + "Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19278.1", + "Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19278.1", "FIX-85B6-MERGE-9C38-CONFLICT": "1.0.0", "Microsoft.NET.Sdk.IL": "3.0.0-preview6.19277.72" } From 78aa3760d304388f0e66d1d4e87c0f638fec0c7f Mon Sep 17 00:00:00 2001 From: Viktor Hofer Date: Wed, 29 May 2019 14:09:24 +0200 Subject: [PATCH 537/607] React to xunit runner changes in arcade --- external/test-runtime/XUnit.Runtime.depproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/external/test-runtime/XUnit.Runtime.depproj b/external/test-runtime/XUnit.Runtime.depproj index 817daa2e8d18..83d2dae72a39 100644 --- a/external/test-runtime/XUnit.Runtime.depproj +++ b/external/test-runtime/XUnit.Runtime.depproj @@ -179,7 +179,7 @@ Condition="'$(TargetGroup)' == 'netcoreapp'" BeforeTargets="ResolveReferences"> - @@ -187,7 +187,7 @@ Text="Error: looks the package $(NuGetPackageRoot)$(TestPlatformHostPackageId)\$(MicrosoftNETTestSdkPackageVersion) not restored or missing $(TestPlatformHost).dll." /> - + false $(MicrosoftDotNetXUnitConsoleRunnerPackage) $(MicrosoftDotNetXUnitConsoleRunnerPackageVersion) From 4b27d5178dcfc04c61aadc2167dc9d488e5505ba Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Wed, 29 May 2019 13:45:49 +0000 Subject: [PATCH 538/607] Update dependencies from https://github.com/dotnet/core-setup build 20190528.04 (#38018) - Microsoft.NETCore.App - 3.0.0-preview6-27728-04 - Microsoft.NETCore.DotNetHost - 3.0.0-preview6-27728-04 - Microsoft.NETCore.DotNetHostPolicy - 3.0.0-preview6-27728-04 --- eng/Version.Details.xml | 12 ++++++------ eng/Versions.props | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 0d07f96af7cc..0130245d124c 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -14,17 +14,17 @@ - + https://github.com/dotnet/core-setup - 61f83f1f764a8a2840a21779e386c2ad11fca75d + b2f8fc281df93b0ecb148224369b938d753d1616 - + https://github.com/dotnet/core-setup - 61f83f1f764a8a2840a21779e386c2ad11fca75d + b2f8fc281df93b0ecb148224369b938d753d1616 - + https://github.com/dotnet/core-setup - 61f83f1f764a8a2840a21779e386c2ad11fca75d + b2f8fc281df93b0ecb148224369b938d753d1616 https://github.com/dotnet/corefx diff --git a/eng/Versions.props b/eng/Versions.props index 3d377b8688ac..43025104d8e8 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -36,9 +36,9 @@ 2.2.0-beta.19274.6 1.0.0-beta.19274.6 - 3.0.0-preview6-27727-02 - 3.0.0-preview6-27727-02 - 3.0.0-preview6-27727-02 + 3.0.0-preview6-27728-04 + 3.0.0-preview6-27728-04 + 3.0.0-preview6-27728-04 3.0.0-preview6.19277.72 3.0.0-preview6.19277.72 From 036e0a64bd190e80f1685c3b267e495b03bb2962 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=BCnther=20Foidl?= Date: Wed, 29 May 2019 17:29:31 +0200 Subject: [PATCH 539/607] Base64 encoding with simd-support (#34529) * Optimized scalar code-path * Fixed label names * Implemented vectorized versions * Added reference to source of algorithm * Added back missing namespace * Unsafe.Add instead of Unsafe.Subtract Fixed build-failure (https://ci3.dot.net/job/dotnet_corefx/job/master/job/linux-musl-TGroup_netcoreapp+CGroup_Debug+AGroup_x64+TestOuter_false_prtest/8247/console) Seems like the internal Unsafe doesn't have a Subtract method, so use Add instead. * Added THIRD-PARTY-NOTICES * PR Feedback * THIRD-PARTY-NOTICES in repo-base instead instead in folder Cf. https://github.com/dotnet/corefx/pull/34529#issuecomment-453510246 * PR Feedback * https://github.com/dotnet/corefx/pull/34529#discussion_r247200659 * https://github.com/dotnet/corefx/pull/34529#discussion_r247214904 * Rewritten to use raw-pointers instead of GC-tracked refs Cf. https://github.com/dotnet/corefx/pull/34529#discussion_r247197669 * Initialized the static fields directly (i.e. w/o cctor) Cf. https://github.com/dotnet/corefx/pull/34529#discussion_r247193419 * Added a test for decoding a (encoded) Guid The case with decoding encoded 16 bytes was not covered by tests, so a wrong code got commited before, resulting in DestinationTooSmall instead of the correct Done. * EncodingMap / DecodingMap as byref instead of pointer So got rid of the `rep stosd` in the prolog. Cf. https://github.com/dotnet/corefx/pull/34529#discussion_r248075157 * PR Feedback * https://github.com/dotnet/corefx/pull/34529#discussion_r262165689 * Debug.Fail instead throwing for the assertion Cf. https://github.com/dotnet/corefx/pull/34529#discussion_r263894301 * ROSpan for static data * ROS for lookup maps * In decode avoided stack spill and hoisted zero-vector outside the loops Cf. https://github.com/dotnet/corefx/pull/34529#discussion_r287613894 * Assert assumption about destLength Cf. https://github.com/dotnet/corefx/pull/34529#discussion_r287605561 * Added comments from original source and some changes to variable names Cf. https://github.com/dotnet/corefx/pull/34529#discussion_r287606634 and https://github.com/dotnet/corefx/pull/34529#discussion_r287606714 * Use TestZ instead of MoveMask in AVX2-path Cf. https://github.com/dotnet/corefx/pull/34529#discussion_r287825385 * Fixed too complicated mask2F creation Improved the version done in c8b6cb3387ca856f52d246ad260172c8fe1d9dcd, so the static data isn't needed and code is more compact and readable. --- THIRD-PARTY-NOTICES.TXT | 32 + src/System.Memory/src/System.Memory.csproj | 1 + .../src/System/Buffers/Text/Base64.cs | 48 ++ .../src/System/Buffers/Text/Base64Decoder.cs | 796 +++++++++++++----- .../src/System/Buffers/Text/Base64Encoder.cs | 559 +++++++++--- .../tests/Base64/Base64DecoderUnitTests.cs | 14 + 6 files changed, 1134 insertions(+), 316 deletions(-) create mode 100644 src/System.Memory/src/System/Buffers/Text/Base64.cs diff --git a/THIRD-PARTY-NOTICES.TXT b/THIRD-PARTY-NOTICES.TXT index b25636f506b8..de86db916f79 100644 --- a/THIRD-PARTY-NOTICES.TXT +++ b/THIRD-PARTY-NOTICES.TXT @@ -332,3 +332,35 @@ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +License notice for vectorized base64 encoding / decoding +-------------------------------------------------------- + +Copyright (c) 2005-2007, Nick Galbreath +Copyright (c) 2013-2017, Alfred Klomp +Copyright (c) 2015-2017, Wojciech Mula +Copyright (c) 2016-2017, Matthieu Darbois +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + +- Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + +- Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS +IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/src/System.Memory/src/System.Memory.csproj b/src/System.Memory/src/System.Memory.csproj index b63a96df0a13..97ba874bb2c4 100644 --- a/src/System.Memory/src/System.Memory.csproj +++ b/src/System.Memory/src/System.Memory.csproj @@ -27,6 +27,7 @@ + diff --git a/src/System.Memory/src/System/Buffers/Text/Base64.cs b/src/System.Memory/src/System/Buffers/Text/Base64.cs new file mode 100644 index 000000000000..34f3af433db3 --- /dev/null +++ b/src/System.Memory/src/System/Buffers/Text/Base64.cs @@ -0,0 +1,48 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Diagnostics; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Internal.Runtime.CompilerServices; + +namespace System.Buffers.Text +{ + public static partial class Base64 + { + private static TVector ReadVector(ReadOnlySpan data) + { + ref sbyte tmp = ref MemoryMarshal.GetReference(data); + return Unsafe.As(ref tmp); + } + + [Conditional("DEBUG")] + private static unsafe void AssertRead(byte* src, byte* srcStart, int srcLength) + { + int vectorElements = Unsafe.SizeOf(); + byte* readEnd = src + vectorElements; + byte* srcEnd = srcStart + srcLength; + + if (readEnd > srcEnd) + { + int srcIndex = (int)(src - srcStart); + Debug.Fail($"Read for {typeof(TVector)} is not within safe bounds. srcIndex: {srcIndex}, srcLength: {srcLength}"); + } + } + + [Conditional("DEBUG")] + private static unsafe void AssertWrite(byte* dest, byte* destStart, int destLength) + { + int vectorElements = Unsafe.SizeOf(); + byte* writeEnd = dest + vectorElements; + byte* destEnd = destStart + destLength; + + if (writeEnd > destEnd) + { + int destIndex = (int)(dest - destStart); + Debug.Fail($"Write for {typeof(TVector)} is not within safe bounds. destIndex: {destIndex}, destLength: {destLength}"); + } + } + } +} diff --git a/src/System.Memory/src/System/Buffers/Text/Base64Decoder.cs b/src/System.Memory/src/System/Buffers/Text/Base64Decoder.cs index d54a8d59ba57..ffb660aae7e8 100644 --- a/src/System.Memory/src/System/Buffers/Text/Base64Decoder.cs +++ b/src/System.Memory/src/System/Buffers/Text/Base64Decoder.cs @@ -2,12 +2,18 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System.Diagnostics; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; +using System.Runtime.Intrinsics; +using System.Runtime.Intrinsics.X86; using Internal.Runtime.CompilerServices; namespace System.Buffers.Text { + // AVX2 version based on https://github.com/aklomp/base64/tree/e516d769a2a432c08404f1981e73b431566057be/lib/arch/avx2 + // SSSE3 version based on https://github.com/aklomp/base64/tree/e516d769a2a432c08404f1981e73b431566057be/lib/arch/ssse3 + public static partial class Base64 { /// @@ -18,7 +24,7 @@ public static partial class Base64 /// The output span which contains the result of the operation, i.e. the decoded binary data. /// The number of input bytes consumed during the operation. This can be used to slice the input for subsequent calls, if necessary. /// The number of bytes written into the output span. This can be used to slice the output for subsequent calls, if necessary. - /// True (default) when the input span contains the entire data to decode. + /// True (default) when the input span contains the entire data to decode. /// Set to false only if it is known that the input span contains partial data with more data to follow. /// It returns the OperationStatus enum values: /// - Done - on successful processing of the entire input span @@ -27,144 +33,191 @@ public static partial class Base64 /// - InvalidData - if the input contains bytes outside of the expected base 64 range, or if it contains invalid/more than two padding characters, /// or if the input is incomplete (i.e. not a multiple of 4) and isFinalBlock is true. /// - public static OperationStatus DecodeFromUtf8(ReadOnlySpan utf8, Span bytes, out int bytesConsumed, out int bytesWritten, bool isFinalBlock = true) + public static unsafe OperationStatus DecodeFromUtf8(ReadOnlySpan utf8, Span bytes, out int bytesConsumed, out int bytesWritten, bool isFinalBlock = true) { - ref byte srcBytes = ref MemoryMarshal.GetReference(utf8); - ref byte destBytes = ref MemoryMarshal.GetReference(bytes); - - int srcLength = utf8.Length & ~0x3; // only decode input up to the closest multiple of 4. - int destLength = bytes.Length; - - int sourceIndex = 0; - int destIndex = 0; - - if (utf8.Length == 0) - goto DoneExit; - - ref sbyte decodingMap = ref s_decodingMap[0]; - - // Last bytes could have padding characters, so process them separately and treat them as valid only if isFinalBlock is true - // if isFinalBlock is false, padding characters are considered invalid - int skipLastChunk = isFinalBlock ? 4 : 0; - - int maxSrcLength = 0; - if (destLength >= GetMaxDecodedFromUtf8Length(srcLength)) - { - maxSrcLength = srcLength - skipLastChunk; - } - else - { - // This should never overflow since destLength here is less than int.MaxValue / 4 * 3 (i.e. 1610612733) - // Therefore, (destLength / 3) * 4 will always be less than 2147483641 - maxSrcLength = (destLength / 3) * 4; - } - - while (sourceIndex < maxSrcLength) + if (utf8.IsEmpty) { - int result = Decode(ref Unsafe.Add(ref srcBytes, sourceIndex), ref decodingMap); - if (result < 0) - goto InvalidExit; - WriteThreeLowOrderBytes(ref Unsafe.Add(ref destBytes, destIndex), result); - destIndex += 3; - sourceIndex += 4; + bytesConsumed = 0; + bytesWritten = 0; + return OperationStatus.Done; } - if (maxSrcLength != srcLength - skipLastChunk) - goto DestinationSmallExit; - - // If input is less than 4 bytes, srcLength == sourceIndex == 0 - // If input is not a multiple of 4, sourceIndex == srcLength != 0 - if (sourceIndex == srcLength) + fixed (byte* srcBytes = &MemoryMarshal.GetReference(utf8)) + fixed (byte* destBytes = &MemoryMarshal.GetReference(bytes)) { - if (isFinalBlock) - goto InvalidExit; - goto NeedMoreExit; - } - - // if isFinalBlock is false, we will never reach this point - - int i0 = Unsafe.Add(ref srcBytes, srcLength - 4); - int i1 = Unsafe.Add(ref srcBytes, srcLength - 3); - int i2 = Unsafe.Add(ref srcBytes, srcLength - 2); - int i3 = Unsafe.Add(ref srcBytes, srcLength - 1); - - i0 = Unsafe.Add(ref decodingMap, i0); - i1 = Unsafe.Add(ref decodingMap, i1); - - i0 <<= 18; - i1 <<= 12; - - i0 |= i1; - - if (i3 != EncodingPad) - { - i2 = Unsafe.Add(ref decodingMap, i2); - i3 = Unsafe.Add(ref decodingMap, i3); - - i2 <<= 6; - - i0 |= i3; - i0 |= i2; - - if (i0 < 0) - goto InvalidExit; - if (destIndex > destLength - 3) - goto DestinationSmallExit; - WriteThreeLowOrderBytes(ref Unsafe.Add(ref destBytes, destIndex), i0); - destIndex += 3; - } - else if (i2 != EncodingPad) - { - i2 = Unsafe.Add(ref decodingMap, i2); - - i2 <<= 6; - - i0 |= i2; - - if (i0 < 0) - goto InvalidExit; - if (destIndex > destLength - 2) - goto DestinationSmallExit; - Unsafe.Add(ref destBytes, destIndex) = (byte)(i0 >> 16); - Unsafe.Add(ref destBytes, destIndex + 1) = (byte)(i0 >> 8); - destIndex += 2; - } - else - { - if (i0 < 0) - goto InvalidExit; - if (destIndex > destLength - 1) - goto DestinationSmallExit; - Unsafe.Add(ref destBytes, destIndex) = (byte)(i0 >> 16); - destIndex += 1; - } - - sourceIndex += 4; - - if (srcLength != utf8.Length) - goto InvalidExit; + int srcLength = utf8.Length & ~0x3; // only decode input up to the closest multiple of 4. + int destLength = bytes.Length; + int maxSrcLength = srcLength; + int decodedLength = GetMaxDecodedFromUtf8Length(srcLength); + + // max. 2 padding chars + if (destLength < decodedLength - 2) + { + // For overflow see comment below + maxSrcLength = destLength / 3 * 4; + } + + byte* src = srcBytes; + byte* dest = destBytes; + byte* srcEnd = srcBytes + (uint)srcLength; + byte* srcMax = srcBytes + (uint)maxSrcLength; + + if (maxSrcLength >= 24) + { + byte* end = srcMax - 45; + if (Avx2.IsSupported && (end >= src)) + { + Avx2Decode(ref src, ref dest, end, maxSrcLength, destLength, srcBytes, destBytes); + + if (src == srcEnd) + goto DoneExit; + } + + end = srcMax - 24; + if (Ssse3.IsSupported && (end >= src)) + { + Ssse3Decode(ref src, ref dest, end, maxSrcLength, destLength, srcBytes, destBytes); + + if (src == srcEnd) + goto DoneExit; + } + } + + // Last bytes could have padding characters, so process them separately and treat them as valid only if isFinalBlock is true + // if isFinalBlock is false, padding characters are considered invalid + int skipLastChunk = isFinalBlock ? 4 : 0; + + if (destLength >= decodedLength) + { + maxSrcLength = srcLength - skipLastChunk; + } + else + { + // This should never overflow since destLength here is less than int.MaxValue / 4 * 3 (i.e. 1610612733) + // Therefore, (destLength / 3) * 4 will always be less than 2147483641 + Debug.Assert(destLength < (int.MaxValue / 4 * 3)); + maxSrcLength = (destLength / 3) * 4; + } + + ref sbyte decodingMap = ref MemoryMarshal.GetReference(s_decodingMap); + srcMax = srcBytes + (uint)maxSrcLength; + + while (src < srcMax) + { + int result = Decode(src, ref decodingMap); + + if (result < 0) + goto InvalidDataExit; + + WriteThreeLowOrderBytes(dest, result); + src += 4; + dest += 3; + } + + if (maxSrcLength != srcLength - skipLastChunk) + goto DestinationTooSmallExit; + + // If input is less than 4 bytes, srcLength == sourceIndex == 0 + // If input is not a multiple of 4, sourceIndex == srcLength != 0 + if (src == srcEnd) + { + if (isFinalBlock) + goto InvalidDataExit; + goto NeedMoreDataExit; + } + + // if isFinalBlock is false, we will never reach this point + + // Handle last four bytes. There are 0, 1, 2 padding chars. + uint t0 = srcEnd[-4]; + uint t1 = srcEnd[-3]; + uint t2 = srcEnd[-2]; + uint t3 = srcEnd[-1]; + + int i0 = Unsafe.Add(ref decodingMap, (IntPtr)t0); + int i1 = Unsafe.Add(ref decodingMap, (IntPtr)t1); + + i0 <<= 18; + i1 <<= 12; + + i0 |= i1; + + byte* destMax = destBytes + (uint)destLength; + + if (t3 != EncodingPad) + { + int i2 = Unsafe.Add(ref decodingMap, (IntPtr)t2); + int i3 = Unsafe.Add(ref decodingMap, (IntPtr)t3); + + i2 <<= 6; + + i0 |= i3; + i0 |= i2; + + if (i0 < 0) + goto InvalidDataExit; + if (dest + 3 > destMax) + goto DestinationTooSmallExit; + + WriteThreeLowOrderBytes(dest, i0); + dest += 3; + } + else if (t2 != EncodingPad) + { + int i2 = Unsafe.Add(ref decodingMap, (IntPtr)t2); + + i2 <<= 6; + + i0 |= i2; + + if (i0 < 0) + goto InvalidDataExit; + if (dest + 2 > destMax) + goto DestinationTooSmallExit; + + dest[0] = (byte)(i0 >> 16); + dest[1] = (byte)(i0 >> 8); + dest += 2; + } + else + { + if (i0 < 0) + goto InvalidDataExit; + if (dest + 1 > destMax) + goto DestinationTooSmallExit; + + dest[0] = (byte)(i0 >> 16); + dest += 1; + } + + src += 4; + + if (srcLength != utf8.Length) + goto InvalidDataExit; DoneExit: - bytesConsumed = sourceIndex; - bytesWritten = destIndex; - return OperationStatus.Done; - - DestinationSmallExit: - if (srcLength != utf8.Length && isFinalBlock) - goto InvalidExit; // if input is not a multiple of 4, and there is no more data, return invalid data instead - bytesConsumed = sourceIndex; - bytesWritten = destIndex; - return OperationStatus.DestinationTooSmall; - - NeedMoreExit: - bytesConsumed = sourceIndex; - bytesWritten = destIndex; - return OperationStatus.NeedMoreData; - - InvalidExit: - bytesConsumed = sourceIndex; - bytesWritten = destIndex; - return OperationStatus.InvalidData; + bytesConsumed = (int)(src - srcBytes); + bytesWritten = (int)(dest - destBytes); + return OperationStatus.Done; + + DestinationTooSmallExit: + if (srcLength != utf8.Length && isFinalBlock) + goto InvalidDataExit; // if input is not a multiple of 4, and there is no more data, return invalid data instead + + bytesConsumed = (int)(src - srcBytes); + bytesWritten = (int)(dest - destBytes); + return OperationStatus.DestinationTooSmall; + + NeedMoreDataExit: + bytesConsumed = (int)(src - srcBytes); + bytesWritten = (int)(dest - destBytes); + return OperationStatus.NeedMoreData; + + InvalidDataExit: + bytesConsumed = (int)(src - srcBytes); + bytesWritten = (int)(dest - destBytes); + return OperationStatus.InvalidData; + } } /// @@ -191,109 +244,349 @@ public static int GetMaxDecodedFromUtf8Length(int length) /// The number of bytes written into the buffer. /// It returns the OperationStatus enum values: /// - Done - on successful processing of the entire input span - /// - InvalidData - if the input contains bytes outside of the expected base 64 range, or if it contains invalid/more than two padding characters, + /// - InvalidData - if the input contains bytes outside of the expected base 64 range, or if it contains invalid/more than two padding characters, /// or if the input is incomplete (i.e. not a multiple of 4). /// It does not return DestinationTooSmall since that is not possible for base 64 decoding. - /// It does not return NeedMoreData since this method tramples the data in the buffer and + /// It does not return NeedMoreData since this method tramples the data in the buffer and /// hence can only be called once with all the data in the buffer. /// - public static OperationStatus DecodeFromUtf8InPlace(Span buffer, out int bytesWritten) + public static unsafe OperationStatus DecodeFromUtf8InPlace(Span buffer, out int bytesWritten) { - int bufferLength = buffer.Length; - int sourceIndex = 0; - int destIndex = 0; + if (buffer.IsEmpty) + { + bytesWritten = 0; + return OperationStatus.Done; + } + + fixed (byte* bufferBytes = &MemoryMarshal.GetReference(buffer)) + { + int bufferLength = buffer.Length; + uint sourceIndex = 0; + uint destIndex = 0; - // only decode input if it is a multiple of 4 - if (bufferLength != ((bufferLength >> 2) * 4)) - goto InvalidExit; - if (bufferLength == 0) - goto DoneExit; + // only decode input if it is a multiple of 4 + if (bufferLength != ((bufferLength >> 2) * 4)) + goto InvalidExit; + if (bufferLength == 0) + goto DoneExit; - ref byte bufferBytes = ref MemoryMarshal.GetReference(buffer); + ref sbyte decodingMap = ref MemoryMarshal.GetReference(s_decodingMap); - ref sbyte decodingMap = ref s_decodingMap[0]; + while (sourceIndex < bufferLength - 4) + { + int result = Decode(bufferBytes + sourceIndex, ref decodingMap); + if (result < 0) + goto InvalidExit; + WriteThreeLowOrderBytes(bufferBytes + destIndex, result); + destIndex += 3; + sourceIndex += 4; + } - while (sourceIndex < bufferLength - 4) - { - int result = Decode(ref Unsafe.Add(ref bufferBytes, sourceIndex), ref decodingMap); - if (result < 0) - goto InvalidExit; - WriteThreeLowOrderBytes(ref Unsafe.Add(ref bufferBytes, destIndex), result); - destIndex += 3; - sourceIndex += 4; - } + uint t0 = bufferBytes[bufferLength - 4]; + uint t1 = bufferBytes[bufferLength - 3]; + uint t2 = bufferBytes[bufferLength - 2]; + uint t3 = bufferBytes[bufferLength - 1]; - int i0 = Unsafe.Add(ref bufferBytes, bufferLength - 4); - int i1 = Unsafe.Add(ref bufferBytes, bufferLength - 3); - int i2 = Unsafe.Add(ref bufferBytes, bufferLength - 2); - int i3 = Unsafe.Add(ref bufferBytes, bufferLength - 1); + int i0 = Unsafe.Add(ref decodingMap, (IntPtr)t0); + int i1 = Unsafe.Add(ref decodingMap, (IntPtr)t1); - i0 = Unsafe.Add(ref decodingMap, i0); - i1 = Unsafe.Add(ref decodingMap, i1); + i0 <<= 18; + i1 <<= 12; - i0 <<= 18; - i1 <<= 12; + i0 |= i1; - i0 |= i1; + if (t3 != EncodingPad) + { + int i2 = Unsafe.Add(ref decodingMap, (IntPtr)t2); + int i3 = Unsafe.Add(ref decodingMap, (IntPtr)t3); - if (i3 != EncodingPad) - { - i2 = Unsafe.Add(ref decodingMap, i2); - i3 = Unsafe.Add(ref decodingMap, i3); + i2 <<= 6; - i2 <<= 6; + i0 |= i3; + i0 |= i2; - i0 |= i3; - i0 |= i2; + if (i0 < 0) + goto InvalidExit; - if (i0 < 0) - goto InvalidExit; - WriteThreeLowOrderBytes(ref Unsafe.Add(ref bufferBytes, destIndex), i0); - destIndex += 3; - } - else if (i2 != EncodingPad) - { - i2 = Unsafe.Add(ref decodingMap, i2); + WriteThreeLowOrderBytes(bufferBytes + destIndex, i0); + destIndex += 3; + } + else if (t2 != EncodingPad) + { + int i2 = Unsafe.Add(ref decodingMap, (IntPtr)t2); - i2 <<= 6; + i2 <<= 6; - i0 |= i2; + i0 |= i2; - if (i0 < 0) - goto InvalidExit; - Unsafe.Add(ref bufferBytes, destIndex) = (byte)(i0 >> 16); - Unsafe.Add(ref bufferBytes, destIndex + 1) = (byte)(i0 >> 8); - destIndex += 2; + if (i0 < 0) + goto InvalidExit; + + bufferBytes[destIndex] = (byte)(i0 >> 16); + bufferBytes[destIndex + 1] = (byte)(i0 >> 8); + destIndex += 2; + } + else + { + if (i0 < 0) + goto InvalidExit; + + bufferBytes[destIndex] = (byte)(i0 >> 16); + destIndex += 1; + } + + DoneExit: + bytesWritten = (int)destIndex; + return OperationStatus.Done; + + InvalidExit: + bytesWritten = (int)destIndex; + return OperationStatus.InvalidData; } - else + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private static unsafe void Avx2Decode(ref byte* srcBytes, ref byte* destBytes, byte* srcEnd, int sourceLength, int destLength, byte* srcStart, byte* destStart) + { + // If we have AVX2 support, pick off 32 bytes at a time for as long as we can, + // but make sure that we quit before seeing any == markers at the end of the + // string. Also, because we write 8 zeroes at the end of the output, ensure + // that there are at least 11 valid bytes of input data remaining to close the + // gap. 32 + 2 + 11 = 45 bytes. + + // See SSSE3-version below for an explanation of how the code works. + + // The JIT won't hoist these "constants", so help it + Vector256 lutHi = ReadVector>(s_avxDecodeLutHi); + Vector256 lutLo = ReadVector>(s_avxDecodeLutLo); + Vector256 lutShift = ReadVector>(s_avxDecodeLutShift); + Vector256 mask2F = Vector256.Create((sbyte)'/'); + Vector256 mergeConstant0 = Vector256.Create(0x01400140).AsSByte(); + Vector256 mergeConstant1 = Vector256.Create(0x00011000).AsInt16(); + Vector256 packBytesInLaneMask = ReadVector>(s_avxDecodePackBytesInLaneMask); + Vector256 packLanesControl = ReadVector>(s_avxDecodePackLanesControl).AsInt32(); + + byte* src = srcBytes; + byte* dest = destBytes; + + //while (remaining >= 45) + do { - if (i0 < 0) - goto InvalidExit; - Unsafe.Add(ref bufferBytes, destIndex) = (byte)(i0 >> 16); - destIndex += 1; + AssertRead>(src, srcStart, sourceLength); + Vector256 str = Avx.LoadVector256(src).AsSByte(); + + Vector256 hiNibbles = Avx2.And(Avx2.ShiftRightLogical(str.AsInt32(), 4).AsSByte(), mask2F); + Vector256 loNibbles = Avx2.And(str, mask2F); + Vector256 hi = Avx2.Shuffle(lutHi, hiNibbles); + Vector256 lo = Avx2.Shuffle(lutLo, loNibbles); + + if (!Avx.TestZ(lo, hi)) + break; + + Vector256 eq2F = Avx2.CompareEqual(str, mask2F); + Vector256 shift = Avx2.Shuffle(lutShift, Avx2.Add(eq2F, hiNibbles)); + str = Avx2.Add(str, shift); + + // in, lower lane, bits, upper case are most significant bits, lower case are least significant bits: + // 00llllll 00kkkkLL 00jjKKKK 00JJJJJJ + // 00iiiiii 00hhhhII 00ggHHHH 00GGGGGG + // 00ffffff 00eeeeFF 00ddEEEE 00DDDDDD + // 00cccccc 00bbbbCC 00aaBBBB 00AAAAAA + + Vector256 merge_ab_and_bc = Avx2.MultiplyAddAdjacent(str.AsByte(), mergeConstant0); + // 0000kkkk LLllllll 0000JJJJ JJjjKKKK + // 0000hhhh IIiiiiii 0000GGGG GGggHHHH + // 0000eeee FFffffff 0000DDDD DDddEEEE + // 0000bbbb CCcccccc 0000AAAA AAaaBBBB + + Vector256 output = Avx2.MultiplyAddAdjacent(merge_ab_and_bc, mergeConstant1); + // 00000000 JJJJJJjj KKKKkkkk LLllllll + // 00000000 GGGGGGgg HHHHhhhh IIiiiiii + // 00000000 DDDDDDdd EEEEeeee FFffffff + // 00000000 AAAAAAaa BBBBbbbb CCcccccc + + // Pack bytes together in each lane: + output = Avx2.Shuffle(output.AsSByte(), packBytesInLaneMask).AsInt32(); + // 00000000 00000000 00000000 00000000 + // LLllllll KKKKkkkk JJJJJJjj IIiiiiii + // HHHHhhhh GGGGGGgg FFffffff EEEEeeee + // DDDDDDdd CCcccccc BBBBbbbb AAAAAAaa + + // Pack lanes + str = Avx2.PermuteVar8x32(output, packLanesControl).AsSByte(); + + AssertWrite>(dest, destStart, destLength); + Avx.Store(dest, str.AsByte()); + + src += 32; + dest += 24; } + while (src <= srcEnd); - DoneExit: - bytesWritten = destIndex; - return OperationStatus.Done; + srcBytes = src; + destBytes = dest; + } - InvalidExit: - bytesWritten = destIndex; - return OperationStatus.InvalidData; + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private static unsafe void Ssse3Decode(ref byte* srcBytes, ref byte* destBytes, byte* srcEnd, int sourceLength, int destLength, byte* srcStart, byte* destStart) + { + // If we have SSSE3 support, pick off 16 bytes at a time for as long as we can, + // but make sure that we quit before seeing any == markers at the end of the + // string. Also, because we write four zeroes at the end of the output, ensure + // that there are at least 6 valid bytes of input data remaining to close the + // gap. 16 + 2 + 6 = 24 bytes. + + // The input consists of six character sets in the Base64 alphabet, + // which we need to map back to the 6-bit values they represent. + // There are three ranges, two singles, and then there's the rest. + // + // # From To Add Characters + // 1 [43] [62] +19 + + // 2 [47] [63] +16 / + // 3 [48..57] [52..61] +4 0..9 + // 4 [65..90] [0..25] -65 A..Z + // 5 [97..122] [26..51] -71 a..z + // (6) Everything else => invalid input + + // We will use LUTS for character validation & offset computation + // Remember that 0x2X and 0x0X are the same index for _mm_shuffle_epi8, + // this allows to mask with 0x2F instead of 0x0F and thus save one constant declaration (register and/or memory access) + + // For offsets: + // Perfect hash for lut = ((src>>4)&0x2F)+((src==0x2F)?0xFF:0x00) + // 0000 = garbage + // 0001 = / + // 0010 = + + // 0011 = 0-9 + // 0100 = A-Z + // 0101 = A-Z + // 0110 = a-z + // 0111 = a-z + // 1000 >= garbage + + // For validation, here's the table. + // A character is valid if and only if the AND of the 2 lookups equals 0: + + // hi \ lo 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 1110 1111 + // LUT 0x15 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x13 0x1A 0x1B 0x1B 0x1B 0x1A + + // 0000 0X10 char NUL SOH STX ETX EOT ENQ ACK BEL BS HT LF VT FF CR SO SI + // andlut 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 + + // 0001 0x10 char DLE DC1 DC2 DC3 DC4 NAK SYN ETB CAN EM SUB ESC FS GS RS US + // andlut 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 + + // 0010 0x01 char ! " # $ % & ' ( ) * + , - . / + // andlut 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x00 0x01 0x01 0x01 0x00 + + // 0011 0x02 char 0 1 2 3 4 5 6 7 8 9 : ; < = > ? + // andlut 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x02 0x02 0x02 0x02 0x02 0x02 + + // 0100 0x04 char @ A B C D E F G H I J K L M N 0 + // andlut 0x04 0x00 0x00 0x00 0X00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 + + // 0101 0x08 char P Q R S T U V W X Y Z [ \ ] ^ _ + // andlut 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x08 0x08 0x08 0x08 0x08 + + // 0110 0x04 char ` a b c d e f g h i j k l m n o + // andlut 0x04 0x00 0x00 0x00 0X00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 + // 0111 0X08 char p q r s t u v w x y z { | } ~ + // andlut 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x08 0x08 0x08 0x08 0x08 + + // 1000 0x10 andlut 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 + // 1001 0x10 andlut 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 + // 1010 0x10 andlut 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 + // 1011 0x10 andlut 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 + // 1100 0x10 andlut 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 + // 1101 0x10 andlut 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 + // 1110 0x10 andlut 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 + // 1111 0x10 andlut 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 + + // The JIT won't hoist these "constants", so help it + Vector128 lutHi = ReadVector>(s_sseDecodeLutHi); + Vector128 lutLo = ReadVector>(s_sseDecodeLutLo); + Vector128 lutShift = ReadVector>(s_sseDecodeLutShift); + Vector128 mask2F = Vector128.Create((sbyte)'/'); + Vector128 mergeConstant0 = Vector128.Create(0x01400140).AsSByte(); + Vector128 mergeConstant1 = Vector128.Create(0x00011000).AsInt16(); + Vector128 packBytesMask = ReadVector>(s_sseDecodePackBytesMask); + Vector128 zero = Vector128.Zero; + + byte* src = srcBytes; + byte* dest = destBytes; + + //while (remaining >= 24) + do + { + AssertRead>(src, srcStart, sourceLength); + Vector128 str = Sse2.LoadVector128(src).AsSByte(); + + // lookup + Vector128 hiNibbles = Sse2.And(Sse2.ShiftRightLogical(str.AsInt32(), 4).AsSByte(), mask2F); + Vector128 loNibbles = Sse2.And(str, mask2F); + Vector128 hi = Ssse3.Shuffle(lutHi, hiNibbles); + Vector128 lo = Ssse3.Shuffle(lutLo, loNibbles); + + // Check for invalid input: if any "and" values from lo and hi are not zero, + // fall back on bytewise code to do error checking and reporting: + if (Sse2.MoveMask(Sse2.CompareGreaterThan(Sse2.And(lo, hi), zero)) != 0) + break; + + Vector128 eq2F = Sse2.CompareEqual(str, mask2F); + Vector128 shift = Ssse3.Shuffle(lutShift, Sse2.Add(eq2F, hiNibbles)); + + // Now simply add the delta values to the input: + str = Sse2.Add(str, shift); + + // in, bits, upper case are most significant bits, lower case are least significant bits + // 00llllll 00kkkkLL 00jjKKKK 00JJJJJJ + // 00iiiiii 00hhhhII 00ggHHHH 00GGGGGG + // 00ffffff 00eeeeFF 00ddEEEE 00DDDDDD + // 00cccccc 00bbbbCC 00aaBBBB 00AAAAAA + + Vector128 merge_ab_and_bc = Ssse3.MultiplyAddAdjacent(str.AsByte(), mergeConstant0); + // 0000kkkk LLllllll 0000JJJJ JJjjKKKK + // 0000hhhh IIiiiiii 0000GGGG GGggHHHH + // 0000eeee FFffffff 0000DDDD DDddEEEE + // 0000bbbb CCcccccc 0000AAAA AAaaBBBB + + Vector128 output = Sse2.MultiplyAddAdjacent(merge_ab_and_bc, mergeConstant1); + // 00000000 JJJJJJjj KKKKkkkk LLllllll + // 00000000 GGGGGGgg HHHHhhhh IIiiiiii + // 00000000 DDDDDDdd EEEEeeee FFffffff + // 00000000 AAAAAAaa BBBBbbbb CCcccccc + + // Pack bytes together: + str = Ssse3.Shuffle(output.AsSByte(), packBytesMask); + // 00000000 00000000 00000000 00000000 + // LLllllll KKKKkkkk JJJJJJjj IIiiiiii + // HHHHhhhh GGGGGGgg FFffffff EEEEeeee + // DDDDDDdd CCcccccc BBBBbbbb AAAAAAaa + + AssertWrite>(dest, destStart, destLength); + Sse2.Store(dest, str.AsByte()); + + src += 16; + dest += 12; + } + while (src <= srcEnd); + + srcBytes = src; + destBytes = dest; } [MethodImpl(MethodImplOptions.AggressiveInlining)] - private static int Decode(ref byte encodedBytes, ref sbyte decodingMap) + private static unsafe int Decode(byte* encodedBytes, ref sbyte decodingMap) { - int i0 = encodedBytes; - int i1 = Unsafe.Add(ref encodedBytes, 1); - int i2 = Unsafe.Add(ref encodedBytes, 2); - int i3 = Unsafe.Add(ref encodedBytes, 3); + uint t0 = encodedBytes[0]; + uint t1 = encodedBytes[1]; + uint t2 = encodedBytes[2]; + uint t3 = encodedBytes[3]; - i0 = Unsafe.Add(ref decodingMap, i0); - i1 = Unsafe.Add(ref decodingMap, i1); - i2 = Unsafe.Add(ref decodingMap, i2); - i3 = Unsafe.Add(ref decodingMap, i3); + int i0 = Unsafe.Add(ref decodingMap, (IntPtr)t0); + int i1 = Unsafe.Add(ref decodingMap, (IntPtr)t1); + int i2 = Unsafe.Add(ref decodingMap, (IntPtr)t2); + int i3 = Unsafe.Add(ref decodingMap, (IntPtr)t3); i0 <<= 18; i1 <<= 12; @@ -307,15 +600,15 @@ private static int Decode(ref byte encodedBytes, ref sbyte decodingMap) } [MethodImpl(MethodImplOptions.AggressiveInlining)] - private static void WriteThreeLowOrderBytes(ref byte destination, int value) + private static unsafe void WriteThreeLowOrderBytes(byte* destination, int value) { - destination = (byte)(value >> 16); - Unsafe.Add(ref destination, 1) = (byte)(value >> 8); - Unsafe.Add(ref destination, 2) = (byte)value; + destination[0] = (byte)(value >> 16); + destination[1] = (byte)(value >> 8); + destination[2] = (byte)(value); } // Pre-computing this table using a custom string(s_characters) and GenerateDecodingMapAndVerify (found in tests) - private static readonly sbyte[] s_decodingMap = { + private static ReadOnlySpan s_decodingMap => new sbyte[] { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 62, -1, -1, -1, 63, //62 is placed at index 43 (for +), 63 at index 47 (for /) @@ -333,5 +626,88 @@ private static void WriteThreeLowOrderBytes(ref byte destination, int value) -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, }; + + private static ReadOnlySpan s_sseDecodePackBytesMask => new sbyte[] { + 2, 1, 0, 6, + 5, 4, 10, 9, + 8, 14, 13, 12, + -1, -1, -1, -1 + }; + + private static ReadOnlySpan s_sseDecodeLutLo => new sbyte[] { + 0x15, 0x11, 0x11, 0x11, + 0x11, 0x11, 0x11, 0x11, + 0x11, 0x11, 0x13, 0x1A, + 0x1B, 0x1B, 0x1B, 0x1A + }; + + private static ReadOnlySpan s_sseDecodeLutHi => new sbyte[] { + 0x10, 0x10, 0x01, 0x02, + 0x04, 0x08, 0x04, 0x08, + 0x10, 0x10, 0x10, 0x10, + 0x10, 0x10, 0x10, 0x10 + }; + + private static ReadOnlySpan s_sseDecodeLutShift => new sbyte[] { + 0, 16, 19, 4, + -65, -65, -71, -71, + 0, 0, 0, 0, + 0, 0, 0, 0 + }; + + private static ReadOnlySpan s_avxDecodePackBytesInLaneMask => new sbyte[] { + 2, 1, 0, 6, + 5, 4, 10, 9, + 8, 14, 13, 12, + -1, -1, -1, -1, + 2, 1, 0, 6, + 5, 4, 10, 9, + 8, 14, 13, 12, + -1, -1, -1, -1 + }; + + private static ReadOnlySpan s_avxDecodePackLanesControl => new sbyte[] { + 0, 0, 0, 0, + 1, 0, 0, 0, + 2, 0, 0, 0, + 4, 0, 0, 0, + 5, 0, 0, 0, + 6, 0, 0, 0, + -1, -1, -1, -1, + -1, -1, -1, -1 + }; + + private static ReadOnlySpan s_avxDecodeLutLo => new sbyte[] { + 0x15, 0x11, 0x11, 0x11, + 0x11, 0x11, 0x11, 0x11, + 0x11, 0x11, 0x13, 0x1A, + 0x1B, 0x1B, 0x1B, 0x1A, + 0x15, 0x11, 0x11, 0x11, + 0x11, 0x11, 0x11, 0x11, + 0x11, 0x11, 0x13, 0x1A, + 0x1B, 0x1B, 0x1B, 0x1A + }; + + private static ReadOnlySpan s_avxDecodeLutHi => new sbyte[] { + 0x10, 0x10, 0x01, 0x02, + 0x04, 0x08, 0x04, 0x08, + 0x10, 0x10, 0x10, 0x10, + 0x10, 0x10, 0x10, 0x10, + 0x10, 0x10, 0x01, 0x02, + 0x04, 0x08, 0x04, 0x08, + 0x10, 0x10, 0x10, 0x10, + 0x10, 0x10, 0x10, 0x10 + }; + + private static ReadOnlySpan s_avxDecodeLutShift => new sbyte[] { + 0, 16, 19, 4, + -65, -65, -71, -71, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 16, 19, 4, + -65, -65, -71, -71, + 0, 0, 0, 0, + 0, 0, 0, 0 + }; } } diff --git a/src/System.Memory/src/System/Buffers/Text/Base64Encoder.cs b/src/System.Memory/src/System/Buffers/Text/Base64Encoder.cs index 4bb7cabc40f7..033978c003fa 100644 --- a/src/System.Memory/src/System/Buffers/Text/Base64Encoder.cs +++ b/src/System.Memory/src/System/Buffers/Text/Base64Encoder.cs @@ -4,10 +4,15 @@ using System.Runtime.CompilerServices; using System.Runtime.InteropServices; +using System.Runtime.Intrinsics; +using System.Runtime.Intrinsics.X86; using Internal.Runtime.CompilerServices; namespace System.Buffers.Text { + // AVX2 version based on https://github.com/aklomp/base64/tree/e516d769a2a432c08404f1981e73b431566057be/lib/arch/avx2 + // SSSE3 version based on https://github.com/aklomp/base64/tree/e516d769a2a432c08404f1981e73b431566057be/lib/arch/ssse3 + /// /// Convert between binary data and UTF-8 encoded text that is represented in base 64. /// @@ -20,7 +25,7 @@ public static partial class Base64 /// The output span which contains the result of the operation, i.e. the UTF-8 encoded text in base 64. /// The number of input bytes consumed during the operation. This can be used to slice the input for subsequent calls, if necessary. /// The number of bytes written into the output span. This can be used to slice the output for subsequent calls, if necessary. - /// True (default) when the input span contains the entire data to encode. + /// True (default) when the input span contains the entire data to encode. /// Set to false only if it is known that the input span contains partial data with more data to follow. /// It returns the OperationStatus enum values: /// - Done - on successful processing of the entire input span @@ -28,72 +33,105 @@ public static partial class Base64 /// - NeedMoreData - only if isFinalBlock is false, otherwise the output is padded if the input is not a multiple of 3 /// It does not return InvalidData since that is not possible for base 64 encoding. /// - public static OperationStatus EncodeToUtf8(ReadOnlySpan bytes, Span utf8, out int bytesConsumed, out int bytesWritten, bool isFinalBlock = true) + public static unsafe OperationStatus EncodeToUtf8(ReadOnlySpan bytes, Span utf8, out int bytesConsumed, out int bytesWritten, bool isFinalBlock = true) { - ref byte srcBytes = ref MemoryMarshal.GetReference(bytes); - ref byte destBytes = ref MemoryMarshal.GetReference(utf8); - - int srcLength = bytes.Length; - int destLength = utf8.Length; - - int maxSrcLength = 0; - if (srcLength <= MaximumEncodeLength && destLength >= GetMaxEncodedToUtf8Length(srcLength)) + if (bytes.IsEmpty) { - maxSrcLength = srcLength - 2; + bytesConsumed = 0; + bytesWritten = 0; + return OperationStatus.Done; } - else + + fixed (byte* srcBytes = &MemoryMarshal.GetReference(bytes)) + fixed (byte* destBytes = &MemoryMarshal.GetReference(utf8)) { - maxSrcLength = (destLength >> 2) * 3 - 2; - } + int srcLength = bytes.Length; + int destLength = utf8.Length; + int maxSrcLength; - int sourceIndex = 0; - int destIndex = 0; - int result = 0; + if (srcLength <= MaximumEncodeLength && destLength >= GetMaxEncodedToUtf8Length(srcLength)) + { + maxSrcLength = srcLength; + } + else + { + maxSrcLength = (destLength >> 2) * 3; + } - ref byte encodingMap = ref s_encodingMap[0]; + byte* src = srcBytes; + byte* dest = destBytes; + byte* srcEnd = srcBytes + (uint)srcLength; + byte* srcMax = srcBytes + (uint)maxSrcLength; - while (sourceIndex < maxSrcLength) - { - result = Encode(ref Unsafe.Add(ref srcBytes, sourceIndex), ref encodingMap); - Unsafe.WriteUnaligned(ref Unsafe.Add(ref destBytes, destIndex), result); - destIndex += 4; - sourceIndex += 3; - } + if (maxSrcLength >= 16) + { + byte* end = srcMax - 32; + if (Avx2.IsSupported && (end >= src)) + { + Avx2Encode(ref src, ref dest, end, maxSrcLength, destLength, srcBytes, destBytes); + + if (src == srcEnd) + goto DoneExit; + } + + end = srcMax - 16; + if (Ssse3.IsSupported && (end >= src)) + { + Ssse3Encode(ref src, ref dest, end, maxSrcLength, destLength, srcBytes, destBytes); + + if (src == srcEnd) + goto DoneExit; + } + } - if (maxSrcLength != srcLength - 2) - goto DestinationSmallExit; + ref byte encodingMap = ref MemoryMarshal.GetReference(s_encodingMap); + uint result = 0; - if (!isFinalBlock) - goto NeedMoreDataExit; + srcMax -= 2; + while (src < srcMax) + { + result = Encode(src, ref encodingMap); + Unsafe.WriteUnaligned(dest, result); + src += 3; + dest += 4; + } - if (sourceIndex == srcLength - 1) - { - result = EncodeAndPadTwo(ref Unsafe.Add(ref srcBytes, sourceIndex), ref encodingMap); - Unsafe.WriteUnaligned(ref Unsafe.Add(ref destBytes, destIndex), result); - destIndex += 4; - sourceIndex += 1; - } - else if (sourceIndex == srcLength - 2) - { - result = EncodeAndPadOne(ref Unsafe.Add(ref srcBytes, sourceIndex), ref encodingMap); - Unsafe.WriteUnaligned(ref Unsafe.Add(ref destBytes, destIndex), result); - destIndex += 4; - sourceIndex += 2; - } + if (srcMax + 2 != srcEnd) + goto DestinationTooSmallExit; - bytesConsumed = sourceIndex; - bytesWritten = destIndex; - return OperationStatus.Done; + if (!isFinalBlock) + goto NeedMoreData; - NeedMoreDataExit: - bytesConsumed = sourceIndex; - bytesWritten = destIndex; - return OperationStatus.NeedMoreData; + if (src + 1 == srcEnd) + { + result = EncodeAndPadTwo(src, ref encodingMap); + Unsafe.WriteUnaligned(dest, result); + src += 1; + dest += 4; + } + else if (src + 2 == srcEnd) + { + result = EncodeAndPadOne(src, ref encodingMap); + Unsafe.WriteUnaligned(dest, result); + src += 2; + dest += 4; + } - DestinationSmallExit: - bytesConsumed = sourceIndex; - bytesWritten = destIndex; - return OperationStatus.DestinationTooSmall; + DoneExit: + bytesConsumed = (int)(src - srcBytes); + bytesWritten = (int)(dest - destBytes); + return OperationStatus.Done; + + DestinationTooSmallExit: + bytesConsumed = (int)(src - srcBytes); + bytesWritten = (int)(dest - destBytes); + return OperationStatus.DestinationTooSmall; + + NeedMoreData: + bytesConsumed = (int)(src - srcBytes); + bytesWritten = (int)(dest - destBytes); + return OperationStatus.NeedMoreData; + } } /// @@ -108,16 +146,16 @@ public static int GetMaxEncodedToUtf8Length(int length) if ((uint)length > MaximumEncodeLength) ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.length); - return (((length + 2) / 3) * 4); + return ((length + 2) / 3) * 4; } /// - /// Encode the span of binary data (in-place) into UTF-8 encoded text represented as base 64. + /// Encode the span of binary data (in-place) into UTF-8 encoded text represented as base 64. /// The encoded text output is larger than the binary data contained in the input (the operation inflates the data). /// - /// The input span which contains binary data that needs to be encoded. + /// The input span which contains binary data that needs to be encoded. /// It needs to be large enough to fit the result of the operation. - /// The amount of binary data contained within the buffer that needs to be encoded + /// The amount of binary data contained within the buffer that needs to be encoded /// (and needs to be smaller than the buffer length). /// The number of bytes written into the buffer. /// It returns the OperationStatus enum values: @@ -126,93 +164,359 @@ public static int GetMaxEncodedToUtf8Length(int length) /// It does not return NeedMoreData since this method tramples the data in the buffer and hence can only be called once with all the data in the buffer. /// It does not return InvalidData since that is not possible for base 64 encoding. /// - public static OperationStatus EncodeToUtf8InPlace(Span buffer, int dataLength, out int bytesWritten) + public static unsafe OperationStatus EncodeToUtf8InPlace(Span buffer, int dataLength, out int bytesWritten) { - int encodedLength = GetMaxEncodedToUtf8Length(dataLength); - if (buffer.Length < encodedLength) - goto FalseExit; + if (buffer.IsEmpty) + { + bytesWritten = 0; + return OperationStatus.Done; + } - int leftover = dataLength - (dataLength / 3) * 3; // how many bytes after packs of 3 + fixed (byte* bufferBytes = &MemoryMarshal.GetReference(buffer)) + { + int encodedLength = GetMaxEncodedToUtf8Length(dataLength); + if (buffer.Length < encodedLength) + goto FalseExit; - int destinationIndex = encodedLength - 4; - int sourceIndex = dataLength - leftover; - int result = 0; + int leftover = dataLength - (dataLength / 3) * 3; // how many bytes after packs of 3 - ref byte encodingMap = ref s_encodingMap[0]; - ref byte bufferBytes = ref MemoryMarshal.GetReference(buffer); + uint destinationIndex = (uint)(encodedLength - 4); + uint sourceIndex = (uint)(dataLength - leftover); + uint result = 0; + ref byte encodingMap = ref MemoryMarshal.GetReference(s_encodingMap); - // encode last pack to avoid conditional in the main loop - if (leftover != 0) - { - if (leftover == 1) + // encode last pack to avoid conditional in the main loop + if (leftover != 0) { - result = EncodeAndPadTwo(ref Unsafe.Add(ref bufferBytes, sourceIndex), ref encodingMap); - Unsafe.WriteUnaligned(ref Unsafe.Add(ref bufferBytes, destinationIndex), result); + if (leftover == 1) + { + result = EncodeAndPadTwo(bufferBytes + sourceIndex, ref encodingMap); + } + else + { + result = EncodeAndPadOne(bufferBytes + sourceIndex, ref encodingMap); + } + + Unsafe.WriteUnaligned(bufferBytes + destinationIndex, result); destinationIndex -= 4; } - else + + sourceIndex -= 3; + while ((int)sourceIndex >= 0) { - result = EncodeAndPadOne(ref Unsafe.Add(ref bufferBytes, sourceIndex), ref encodingMap); - Unsafe.WriteUnaligned(ref Unsafe.Add(ref bufferBytes, destinationIndex), result); + result = Encode(bufferBytes + sourceIndex, ref encodingMap); + Unsafe.WriteUnaligned(bufferBytes + destinationIndex, result); destinationIndex -= 4; + sourceIndex -= 3; } + + bytesWritten = encodedLength; + return OperationStatus.Done; + + FalseExit: + bytesWritten = 0; + return OperationStatus.DestinationTooSmall; } + } - sourceIndex -= 3; - while (sourceIndex >= 0) + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private static unsafe void Avx2Encode(ref byte* srcBytes, ref byte* destBytes, byte* srcEnd, int sourceLength, int destLength, byte* srcStart, byte* destStart) + { + // If we have AVX2 support, pick off 24 bytes at a time for as long as we can. + // But because we read 32 bytes at a time, ensure we have enough room to do a + // full 32-byte read without segfaulting. + + // translation from SSSE3 into AVX2 of procedure + // This one works with shifted (4 bytes) input in order to + // be able to work efficiently in the 2 128-bit lanes + + // srcBytes, bytes MSB to LSB: + // 0 0 0 0 x w v u t s r q p o n m + // l k j i h g f e d c b a 0 0 0 0 + + // The JIT won't hoist these "constants", so help it + Vector256 shuffleVec = ReadVector>(s_avxEncodeShuffleVec); + Vector256 maskAC = Vector256.Create(0x0fc0fc00).AsSByte(); + Vector256 maskBB = Vector256.Create(0x003f03f0).AsSByte(); + Vector256 shiftAC = Vector256.Create(0x04000040).AsUInt16(); + Vector256 shiftBB = Vector256.Create(0x01000010).AsInt16(); + Vector256 const51 = Vector256.Create((byte)51); + Vector256 const25 = Vector256.Create((sbyte)25); + Vector256 lut = ReadVector>(s_avxEncodeLut); + + byte* src = srcBytes; + byte* dest = destBytes; + + // first load is done at c-0 not to get a segfault + AssertRead>(src, srcStart, sourceLength); + Vector256 str = Avx.LoadVector256(src).AsSByte(); + + // shift by 4 bytes, as required by Reshuffle + str = Avx2.PermuteVar8x32(str.AsInt32(), ReadVector>(s_avxEncodePermuteVec).AsInt32()).AsSByte(); + + // Next loads are done at src-4, as required by Reshuffle, so shift it once + src -= 4; + + while (true) { - result = Encode(ref Unsafe.Add(ref bufferBytes, sourceIndex), ref encodingMap); - Unsafe.WriteUnaligned(ref Unsafe.Add(ref bufferBytes, destinationIndex), result); - destinationIndex -= 4; - sourceIndex -= 3; + // Reshuffle + str = Avx2.Shuffle(str, shuffleVec); + // str, bytes MSB to LSB: + // w x v w + // t u s t + // q r p q + // n o m n + // k l j k + // h i g h + // e f d e + // b c a b + + Vector256 t0 = Avx2.And(str, maskAC); + // bits, upper case are most significant bits, lower case are least significant bits. + // 0000wwww XX000000 VVVVVV00 00000000 + // 0000tttt UU000000 SSSSSS00 00000000 + // 0000qqqq RR000000 PPPPPP00 00000000 + // 0000nnnn OO000000 MMMMMM00 00000000 + // 0000kkkk LL000000 JJJJJJ00 00000000 + // 0000hhhh II000000 GGGGGG00 00000000 + // 0000eeee FF000000 DDDDDD00 00000000 + // 0000bbbb CC000000 AAAAAA00 00000000 + + Vector256 t2 = Avx2.And(str, maskBB); + // 00000000 00xxxxxx 000000vv WWWW0000 + // 00000000 00uuuuuu 000000ss TTTT0000 + // 00000000 00rrrrrr 000000pp QQQQ0000 + // 00000000 00oooooo 000000mm NNNN0000 + // 00000000 00llllll 000000jj KKKK0000 + // 00000000 00iiiiii 000000gg HHHH0000 + // 00000000 00ffffff 000000dd EEEE0000 + // 00000000 00cccccc 000000aa BBBB0000 + + Vector256 t1 = Avx2.MultiplyHigh(t0.AsUInt16(), shiftAC); + // 00000000 00wwwwXX 00000000 00VVVVVV + // 00000000 00ttttUU 00000000 00SSSSSS + // 00000000 00qqqqRR 00000000 00PPPPPP + // 00000000 00nnnnOO 00000000 00MMMMMM + // 00000000 00kkkkLL 00000000 00JJJJJJ + // 00000000 00hhhhII 00000000 00GGGGGG + // 00000000 00eeeeFF 00000000 00DDDDDD + // 00000000 00bbbbCC 00000000 00AAAAAA + + Vector256 t3 = Avx2.MultiplyLow(t2.AsInt16(), shiftBB); + // 00xxxxxx 00000000 00vvWWWW 00000000 + // 00uuuuuu 00000000 00ssTTTT 00000000 + // 00rrrrrr 00000000 00ppQQQQ 00000000 + // 00oooooo 00000000 00mmNNNN 00000000 + // 00llllll 00000000 00jjKKKK 00000000 + // 00iiiiii 00000000 00ggHHHH 00000000 + // 00ffffff 00000000 00ddEEEE 00000000 + // 00cccccc 00000000 00aaBBBB 00000000 + + str = Avx2.Or(t1.AsSByte(), t3.AsSByte()); + // 00xxxxxx 00wwwwXX 00vvWWWW 00VVVVVV + // 00uuuuuu 00ttttUU 00ssTTTT 00SSSSSS + // 00rrrrrr 00qqqqRR 00ppQQQQ 00PPPPPP + // 00oooooo 00nnnnOO 00mmNNNN 00MMMMMM + // 00llllll 00kkkkLL 00jjKKKK 00JJJJJJ + // 00iiiiii 00hhhhII 00ggHHHH 00GGGGGG + // 00ffffff 00eeeeFF 00ddEEEE 00DDDDDD + // 00cccccc 00bbbbCC 00aaBBBB 00AAAAAA + + // Translation + // LUT contains Absolute offset for all ranges: + // Translate values 0..63 to the Base64 alphabet. There are five sets: + // # From To Abs Index Characters + // 0 [0..25] [65..90] +65 0 ABCDEFGHIJKLMNOPQRSTUVWXYZ + // 1 [26..51] [97..122] +71 1 abcdefghijklmnopqrstuvwxyz + // 2 [52..61] [48..57] -4 [2..11] 0123456789 + // 3 [62] [43] -19 12 + + // 4 [63] [47] -16 13 / + + // Create LUT indices from input: + // the index for range #0 is right, others are 1 less than expected: + Vector256 indices = Avx2.SubtractSaturate(str.AsByte(), const51); + + // mask is 0xFF (-1) for range #[1..4] and 0x00 for range #0: + Vector256 mask = Avx2.CompareGreaterThan(str, const25); + + // substract -1, so add 1 to indices for range #[1..4], All indices are now correct: + Vector256 tmp = Avx2.Subtract(indices.AsSByte(), mask); + + // Add offsets to input values: + str = Avx2.Add(str, Avx2.Shuffle(lut, tmp)); + + AssertWrite>(dest, destStart, destLength); + Avx.Store(dest, str.AsByte()); + + src += 24; + dest += 32; + + if (src > srcEnd) + break; + + // Load at src-4, as required by Reshuffle (already shifted by -4) + AssertRead>(src, srcStart, sourceLength); + str = Avx.LoadVector256(src).AsSByte(); } - bytesWritten = encodedLength; - return OperationStatus.Done; + srcBytes = src + 4; + destBytes = dest; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private static unsafe void Ssse3Encode(ref byte* srcBytes, ref byte* destBytes, byte* srcEnd, int sourceLength, int destLength, byte* srcStart, byte* destStart) + { + // If we have SSSE3 support, pick off 12 bytes at a time for as long as we can. + // But because we read 16 bytes at a time, ensure we have enough room to do a + // full 16-byte read without segfaulting. + + // srcBytes, bytes MSB to LSB: + // 0 0 0 0 l k j i h g f e d c b a + + // The JIT won't hoist these "constants", so help it + Vector128 shuffleVec = ReadVector>(s_sseEncodeShuffleVec); + Vector128 maskAC = Vector128.Create(0x0fc0fc00).AsSByte(); + Vector128 maskBB = Vector128.Create(0x003f03f0).AsSByte(); + Vector128 shiftAC = Vector128.Create(0x04000040).AsUInt16(); + Vector128 shiftBB = Vector128.Create(0x01000010).AsInt16(); + Vector128 const51 = Vector128.Create((byte)51); + Vector128 const25 = Vector128.Create((sbyte)25); + Vector128 lut = ReadVector>(s_sseEncodeLut); + + byte* src = srcBytes; + byte* dest = destBytes; + + //while (remaining >= 16) + do + { + AssertRead>(src, srcStart, sourceLength); + Vector128 str = Sse2.LoadVector128(src).AsSByte(); + + // Reshuffle + str = Ssse3.Shuffle(str, shuffleVec); + // str, bytes MSB to LSB: + // k l j k + // h i g h + // e f d e + // b c a b + + Vector128 t0 = Sse2.And(str, maskAC); + // bits, upper case are most significant bits, lower case are least significant bits + // 0000kkkk LL000000 JJJJJJ00 00000000 + // 0000hhhh II000000 GGGGGG00 00000000 + // 0000eeee FF000000 DDDDDD00 00000000 + // 0000bbbb CC000000 AAAAAA00 00000000 + + Vector128 t2 = Sse2.And(str, maskBB); + // 00000000 00llllll 000000jj KKKK0000 + // 00000000 00iiiiii 000000gg HHHH0000 + // 00000000 00ffffff 000000dd EEEE0000 + // 00000000 00cccccc 000000aa BBBB0000 + + Vector128 t1 = Sse2.MultiplyHigh(t0.AsUInt16(), shiftAC); + // 00000000 00kkkkLL 00000000 00JJJJJJ + // 00000000 00hhhhII 00000000 00GGGGGG + // 00000000 00eeeeFF 00000000 00DDDDDD + // 00000000 00bbbbCC 00000000 00AAAAAA + + Vector128 t3 = Sse2.MultiplyLow(t2.AsInt16(), shiftBB); + // 00llllll 00000000 00jjKKKK 00000000 + // 00iiiiii 00000000 00ggHHHH 00000000 + // 00ffffff 00000000 00ddEEEE 00000000 + // 00cccccc 00000000 00aaBBBB 00000000 + + str = Sse2.Or(t1.AsSByte(), t3.AsSByte()); + // 00llllll 00kkkkLL 00jjKKKK 00JJJJJJ + // 00iiiiii 00hhhhII 00ggHHHH 00GGGGGG + // 00ffffff 00eeeeFF 00ddEEEE 00DDDDDD + // 00cccccc 00bbbbCC 00aaBBBB 00AAAAAA + + // Translation + // LUT contains Absolute offset for all ranges: + // Translate values 0..63 to the Base64 alphabet. There are five sets: + // # From To Abs Index Characters + // 0 [0..25] [65..90] +65 0 ABCDEFGHIJKLMNOPQRSTUVWXYZ + // 1 [26..51] [97..122] +71 1 abcdefghijklmnopqrstuvwxyz + // 2 [52..61] [48..57] -4 [2..11] 0123456789 + // 3 [62] [43] -19 12 + + // 4 [63] [47] -16 13 / + + // Create LUT indices from input: + // the index for range #0 is right, others are 1 less than expected: + Vector128 indices = Sse2.SubtractSaturate(str.AsByte(), const51); + + // mask is 0xFF (-1) for range #[1..4] and 0x00 for range #0: + Vector128 mask = Sse2.CompareGreaterThan(str, const25); + + // substract -1, so add 1 to indices for range #[1..4], All indices are now correct: + Vector128 tmp = Sse2.Subtract(indices.AsSByte(), mask); + + // Add offsets to input values: + str = Sse2.Add(str, Ssse3.Shuffle(lut, tmp)); + + AssertWrite>(dest, destStart, destLength); + Sse2.Store(dest, str.AsByte()); + + src += 12; + dest += 16; + } + while (src <= srcEnd); - FalseExit: - bytesWritten = 0; - return OperationStatus.DestinationTooSmall; + srcBytes = src; + destBytes = dest; } [MethodImpl(MethodImplOptions.AggressiveInlining)] - private static int Encode(ref byte threeBytes, ref byte encodingMap) + private static unsafe uint Encode(byte* threeBytes, ref byte encodingMap) { - int i = (threeBytes << 16) | (Unsafe.Add(ref threeBytes, 1) << 8) | Unsafe.Add(ref threeBytes, 2); + uint t0 = threeBytes[0]; + uint t1 = threeBytes[1]; + uint t2 = threeBytes[2]; - int i0 = Unsafe.Add(ref encodingMap, i >> 18); - int i1 = Unsafe.Add(ref encodingMap, (i >> 12) & 0x3F); - int i2 = Unsafe.Add(ref encodingMap, (i >> 6) & 0x3F); - int i3 = Unsafe.Add(ref encodingMap, i & 0x3F); + uint i = (t0 << 16) | (t1 << 8) | t2; + + uint i0 = Unsafe.Add(ref encodingMap, (IntPtr)(i >> 18)); + uint i1 = Unsafe.Add(ref encodingMap, (IntPtr)((i >> 12) & 0x3F)); + uint i2 = Unsafe.Add(ref encodingMap, (IntPtr)((i >> 6) & 0x3F)); + uint i3 = Unsafe.Add(ref encodingMap, (IntPtr)(i & 0x3F)); return i0 | (i1 << 8) | (i2 << 16) | (i3 << 24); } [MethodImpl(MethodImplOptions.AggressiveInlining)] - private static int EncodeAndPadOne(ref byte twoBytes, ref byte encodingMap) + private static unsafe uint EncodeAndPadOne(byte* twoBytes, ref byte encodingMap) { - int i = (twoBytes << 16) | (Unsafe.Add(ref twoBytes, 1) << 8); + uint t0 = twoBytes[0]; + uint t1 = twoBytes[1]; + + uint i = (t0 << 16) | (t1 << 8); - int i0 = Unsafe.Add(ref encodingMap, i >> 18); - int i1 = Unsafe.Add(ref encodingMap, (i >> 12) & 0x3F); - int i2 = Unsafe.Add(ref encodingMap, (i >> 6) & 0x3F); + uint i0 = Unsafe.Add(ref encodingMap, (IntPtr)(i >> 18)); + uint i1 = Unsafe.Add(ref encodingMap, (IntPtr)((i >> 12) & 0x3F)); + uint i2 = Unsafe.Add(ref encodingMap, (IntPtr)((i >> 6) & 0x3F)); return i0 | (i1 << 8) | (i2 << 16) | (EncodingPad << 24); } [MethodImpl(MethodImplOptions.AggressiveInlining)] - private static int EncodeAndPadTwo(ref byte oneByte, ref byte encodingMap) + private static unsafe uint EncodeAndPadTwo(byte* oneByte, ref byte encodingMap) { - int i = (oneByte << 8); + uint t0 = oneByte[0]; - int i0 = Unsafe.Add(ref encodingMap, i >> 10); - int i1 = Unsafe.Add(ref encodingMap, (i >> 4) & 0x3F); + uint i = t0 << 8; + + uint i0 = Unsafe.Add(ref encodingMap, (IntPtr)(i >> 10)); + uint i1 = Unsafe.Add(ref encodingMap, (IntPtr)((i >> 4) & 0x3F)); return i0 | (i1 << 8) | (EncodingPad << 16) | (EncodingPad << 24); } + private const uint EncodingPad = '='; // '=', for padding + + private const int MaximumEncodeLength = (int.MaxValue / 4) * 3; // 1610612733 + // Pre-computing this table using a custom string(s_characters) and GenerateEncodingMapAndVerify (found in tests) - private static readonly byte[] s_encodingMap = { + private static ReadOnlySpan s_encodingMap => new byte[] { 65, 66, 67, 68, 69, 70, 71, 72, //A..H 73, 74, 75, 76, 77, 78, 79, 80, //I..P 81, 82, 83, 84, 85, 86, 87, 88, //Q..X @@ -223,8 +527,51 @@ private static int EncodeAndPadTwo(ref byte oneByte, ref byte encodingMap) 52, 53, 54, 55, 56, 57, 43, 47 //4..9, +, / }; - private const byte EncodingPad = (byte)'='; // '=', for padding + private static ReadOnlySpan s_sseEncodeShuffleVec => new sbyte[] { + 1, 0, 2, 1, + 4, 3, 5, 4, + 7, 6, 8, 7, + 10, 9, 11, 10 + }; - private const int MaximumEncodeLength = (int.MaxValue / 4) * 3; // 1610612733 + private static ReadOnlySpan s_sseEncodeLut => new sbyte[] { + 65, 71, -4, -4, + -4, -4, -4, -4, + -4, -4, -4, -4, + -19, -16, 0, 0 + }; + + private static ReadOnlySpan s_avxEncodePermuteVec => new sbyte[] { + 0, 0, 0, 0, + 0, 0, 0, 0, + 1, 0, 0, 0, + 2, 0, 0, 0, + 3, 0, 0, 0, + 4, 0, 0, 0, + 5, 0, 0, 0, + 6, 0, 0, 0 + }; + + private static ReadOnlySpan s_avxEncodeShuffleVec => new sbyte[] { + 5, 4, 6, 5, + 8, 7, 9, 8, + 11, 10, 12, 11, + 14, 13, 15, 14, + 1, 0, 2, 1, + 4, 3, 5, 4, + 7, 6, 8, 7, + 10, 9, 11, 10 + }; + + private static ReadOnlySpan s_avxEncodeLut => new sbyte[] { + 65, 71, -4, -4, + -4, -4, -4, -4, + -4, -4, -4, -4, + -19, -16, 0, 0, + 65, 71, -4, -4, + -4, -4, -4, -4, + -4, -4, -4, -4, + -19, -16, 0, 0 + }; } } diff --git a/src/System.Memory/tests/Base64/Base64DecoderUnitTests.cs b/src/System.Memory/tests/Base64/Base64DecoderUnitTests.cs index 3c159ddee4cf..8d6de7a7a0a6 100644 --- a/src/System.Memory/tests/Base64/Base64DecoderUnitTests.cs +++ b/src/System.Memory/tests/Base64/Base64DecoderUnitTests.cs @@ -45,6 +45,20 @@ public void DecodeEmptySpan() Assert.True(Base64TestHelper.VerifyDecodingCorrectness(source.Length, decodedBytes.Length, source, decodedBytes)); } + [Fact] + public void DecodeGuid() + { + Span source = new byte[24]; + Span decodedBytes = Guid.NewGuid().ToByteArray(); + Base64.EncodeToUtf8(decodedBytes, source, out int _, out int _); + + Assert.Equal(OperationStatus.Done, + Base64.DecodeFromUtf8(source, decodedBytes, out int consumed, out int decodedByteCount)); + Assert.Equal(24, consumed); + Assert.Equal(16, decodedByteCount); + Assert.True(Base64TestHelper.VerifyDecodingCorrectness(source.Length, decodedBytes.Length, source, decodedBytes)); + } + [Fact] public void BasicDecodingWithFinalBlockFalse() { From 46800900077920534038be00d7bc73236e1a5fa7 Mon Sep 17 00:00:00 2001 From: Stephen Toub Date: Wed, 29 May 2019 11:30:52 -0400 Subject: [PATCH 540/607] Remove SSL cancellation workaround from SocketsHttpHandler (#37990) Both sockets cancellation and SslStream auth cancellation have been implemented. --- .../src/System/Net/Http/SocketsHttpHandler/ConnectHelper.cs | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/ConnectHelper.cs b/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/ConnectHelper.cs index 2f7d99e75cc7..a154cac3c804 100644 --- a/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/ConnectHelper.cs +++ b/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/ConnectHelper.cs @@ -158,8 +158,6 @@ private static async ValueTask EstablishSslConnectionAsyncCore(Stream { SslStream sslStream = new SslStream(stream); - // TODO #25206 and #24430: Register/IsCancellationRequested should be removable once SslStream auth and sockets respect cancellation. - CancellationTokenRegistration ctr = cancellationToken.Register(s => ((Stream)s).Dispose(), stream); try { await sslStream.AuthenticateAsClientAsync(sslOptions, cancellationToken).ConfigureAwait(false); @@ -175,10 +173,6 @@ private static async ValueTask EstablishSslConnectionAsyncCore(Stream throw new HttpRequestException(SR.net_http_ssl_connection_failed, e); } - finally - { - ctr.Dispose(); - } // Handle race condition if cancellation happens after SSL auth completes but before the registration is disposed if (cancellationToken.IsCancellationRequested) From 10afb2a58482a3ea33eb643bc19034a3c8911a03 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Wed, 29 May 2019 11:34:21 -0400 Subject: [PATCH 541/607] Update dependencies from https://github.com/dotnet/corefx build 20190528.7 (#38019) - runtime.native.System.IO.Ports - 4.6.0-preview6.19278.7 - Microsoft.NETCore.Platforms - 3.0.0-preview6.19278.7 --- eng/Version.Details.xml | 8 ++++---- eng/Versions.props | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 0130245d124c..3acd5bda4e4e 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -26,13 +26,13 @@ https://github.com/dotnet/core-setup b2f8fc281df93b0ecb148224369b938d753d1616 - + https://github.com/dotnet/corefx - d58a8ade31b4731759c92df00d0f6398c52f3d83 + c7d48ca7732b7717e84d8375588d83866104ef58 - + https://github.com/dotnet/corefx - d58a8ade31b4731759c92df00d0f6398c52f3d83 + c7d48ca7732b7717e84d8375588d83866104ef58 https://github.com/dotnet/arcade diff --git a/eng/Versions.props b/eng/Versions.props index 43025104d8e8..5cab253481eb 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -43,8 +43,8 @@ 3.0.0-preview6.19277.72 3.0.0-preview6.19277.72 - 3.0.0-preview6.19277.2 - 4.6.0-preview6.19277.2 + 3.0.0-preview6.19278.7 + 4.6.0-preview6.19278.7 2.1.0-prerelease.19278.1 From f5cf3f1093fa49e2e40ca4d32f9eb79d8b5983ab Mon Sep 17 00:00:00 2001 From: Viktor Hofer Date: Wed, 29 May 2019 18:13:52 +0200 Subject: [PATCH 542/607] Exclude xunit.core.dll --- external/test-runtime/XUnit.Runtime.depproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/external/test-runtime/XUnit.Runtime.depproj b/external/test-runtime/XUnit.Runtime.depproj index 83d2dae72a39..6ee6f97db9b8 100644 --- a/external/test-runtime/XUnit.Runtime.depproj +++ b/external/test-runtime/XUnit.Runtime.depproj @@ -187,7 +187,7 @@ Text="Error: looks the package $(NuGetPackageRoot)$(TestPlatformHostPackageId)\$(MicrosoftNETTestSdkPackageVersion) not restored or missing $(TestPlatformHost).dll." /> - + false $(MicrosoftDotNetXUnitConsoleRunnerPackage) $(MicrosoftDotNetXUnitConsoleRunnerPackageVersion) From 0970a99d5826615bfc6b9d948f174145e8ad03fd Mon Sep 17 00:00:00 2001 From: Viktor Hofer Date: Wed, 29 May 2019 18:47:19 +0200 Subject: [PATCH 543/607] Add package override to tools.props (#38023) --- eng/Tools.props | 1 + 1 file changed, 1 insertion(+) diff --git a/eng/Tools.props b/eng/Tools.props index 818be9fa30fa..d54f88896fd9 100644 --- a/eng/Tools.props +++ b/eng/Tools.props @@ -3,6 +3,7 @@ https://dotnet.myget.org/F/dotnet-buildtools/api/v3/index.json; https://dotnet.myget.org/F/sourcelink/api/v3/index.json; + $(OverridePackageSource); $(RestoreSources) false From e3a4edabd12b5f7dc9be20136cc867bbe67f1f7c Mon Sep 17 00:00:00 2001 From: Adam Sitnik Date: Wed, 29 May 2019 09:58:07 -0700 Subject: [PATCH 544/607] Avoid .ToArray() in JsonSerializer .NET Standard implementation (#37976) * PooledBufferWriter is always used as byte buffer, make it PooledByteBufferWriter to be able to call stream.Write(bytes) * avoid expensive .ToArray in .NET Standard implementation * rename --- .../src/System.Text.Json.csproj | 2 +- .../JsonSerializer.Write.Helpers.cs | 6 +-- .../JsonSerializer.Write.Stream.cs | 19 +++------ ...ferWriter.cs => PooledByteBufferWriter.cs} | 39 +++++++++++++------ 4 files changed, 36 insertions(+), 30 deletions(-) rename src/System.Text.Json/src/System/Text/Json/Serialization/{PooledBufferWriter.cs => PooledByteBufferWriter.cs} (73%) diff --git a/src/System.Text.Json/src/System.Text.Json.csproj b/src/System.Text.Json/src/System.Text.Json.csproj index 585c7e49cfcb..fc3df9ab8e19 100644 --- a/src/System.Text.Json/src/System.Text.Json.csproj +++ b/src/System.Text.Json/src/System.Text.Json.csproj @@ -106,7 +106,7 @@ - + diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.Helpers.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.Helpers.cs index 573f00852700..7fd8acad0e5b 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.Helpers.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.Helpers.cs @@ -63,7 +63,7 @@ private static byte[] WriteCoreBytes(object value, Type type, JsonSerializerOpti byte[] result; - using (var output = new PooledBufferWriter(options.DefaultBufferSize)) + using (var output = new PooledByteBufferWriter(options.DefaultBufferSize)) { WriteCore(output, value, type, options); result = output.WrittenMemory.ToArray(); @@ -81,7 +81,7 @@ private static string WriteCoreString(object value, Type type, JsonSerializerOpt string result; - using (var output = new PooledBufferWriter(options.DefaultBufferSize)) + using (var output = new PooledByteBufferWriter(options.DefaultBufferSize)) { WriteCore(output, value, type, options); result = JsonReaderHelper.TranscodeHelper(output.WrittenMemory.Span); @@ -90,7 +90,7 @@ private static string WriteCoreString(object value, Type type, JsonSerializerOpt return result; } - private static void WriteCore(PooledBufferWriter output, object value, Type type, JsonSerializerOptions options) + private static void WriteCore(PooledByteBufferWriter output, object value, Type type, JsonSerializerOptions options) { Debug.Assert(type != null || value == null); diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.Stream.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.Stream.cs index 9aa8ecefb6d6..c0015657c2a4 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.Stream.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.Stream.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System.Collections.Generic; using System.IO; using System.Threading; using System.Threading.Tasks; @@ -52,7 +51,7 @@ private static async Task WriteAsyncCore(object value, Type type, Stream utf8Jso JsonWriterOptions writerOptions = options.GetWriterOptions(); - using (var bufferWriter = new PooledBufferWriter(options.DefaultBufferSize)) + using (var bufferWriter = new PooledByteBufferWriter(options.DefaultBufferSize)) using (var writer = new Utf8JsonWriter(bufferWriter, writerOptions)) { if (value == null) @@ -60,12 +59,8 @@ private static async Task WriteAsyncCore(object value, Type type, Stream utf8Jso writer.WriteNullValue(); writer.Flush(); -#if BUILDING_INBOX_LIBRARY - await utf8Json.WriteAsync(bufferWriter.WrittenMemory, cancellationToken).ConfigureAwait(false); -#else - // todo: stackalloc or pool here? - await utf8Json.WriteAsync(bufferWriter.WrittenMemory.ToArray(), 0, bufferWriter.WrittenMemory.Length, cancellationToken).ConfigureAwait(false); -#endif + await bufferWriter.WriteToStreamAsync(utf8Json, cancellationToken).ConfigureAwait(false); + return; } @@ -88,12 +83,8 @@ private static async Task WriteAsyncCore(object value, Type type, Stream utf8Jso isFinalBlock = Write(writer, flushThreshold, options, ref state); writer.Flush(); -#if BUILDING_INBOX_LIBRARY - await utf8Json.WriteAsync(bufferWriter.WrittenMemory, cancellationToken).ConfigureAwait(false); -#else - // todo: use pool here to avod extra alloc? - await utf8Json.WriteAsync(bufferWriter.WrittenMemory.ToArray(), 0, bufferWriter.WrittenMemory.Length, cancellationToken).ConfigureAwait(false); -#endif + await bufferWriter.WriteToStreamAsync(utf8Json, cancellationToken).ConfigureAwait(false); + bufferWriter.Clear(); } while (!isFinalBlock); } diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/PooledBufferWriter.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/PooledByteBufferWriter.cs similarity index 73% rename from src/System.Text.Json/src/System/Text/Json/Serialization/PooledBufferWriter.cs rename to src/System.Text.Json/src/System/Text/Json/Serialization/PooledByteBufferWriter.cs index 125082399b04..37d6cfbb33c1 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/PooledBufferWriter.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/PooledByteBufferWriter.cs @@ -4,28 +4,31 @@ using System.Buffers; using System.Diagnostics; +using System.IO; +using System.Threading; +using System.Threading.Tasks; namespace System.Text.Json.Serialization { /// /// This is an implementation detail and MUST NOT be called by source-package consumers. /// - internal sealed class PooledBufferWriter : IBufferWriter, IDisposable + internal sealed class PooledByteBufferWriter : IBufferWriter, IDisposable { - private T[] _rentedBuffer; + private byte[] _rentedBuffer; private int _index; private const int MinimumBufferSize = 256; - public PooledBufferWriter(int initialCapacity) + public PooledByteBufferWriter(int initialCapacity) { Debug.Assert(initialCapacity > 0); - _rentedBuffer = ArrayPool.Shared.Rent(initialCapacity); + _rentedBuffer = ArrayPool.Shared.Rent(initialCapacity); _index = 0; } - public ReadOnlyMemory WrittenMemory + public ReadOnlyMemory WrittenMemory { get { @@ -85,7 +88,7 @@ public void Dispose() } ClearHelper(); - ArrayPool.Shared.Return(_rentedBuffer); + ArrayPool.Shared.Return(_rentedBuffer); _rentedBuffer = null; } @@ -98,18 +101,30 @@ public void Advance(int count) _index += count; } - public Memory GetMemory(int sizeHint = 0) + public Memory GetMemory(int sizeHint = 0) { CheckAndResizeBuffer(sizeHint); return _rentedBuffer.AsMemory(_index); } - public Span GetSpan(int sizeHint = 0) + public Span GetSpan(int sizeHint = 0) { CheckAndResizeBuffer(sizeHint); return _rentedBuffer.AsSpan(_index); } +#if BUILDING_INBOX_LIBRARY + internal ValueTask WriteToStreamAsync(Stream destination, CancellationToken cancellationToken) + { + return destination.WriteAsync(WrittenMemory, cancellationToken); + } +#else + internal Task WriteToStreamAsync(Stream destination, CancellationToken cancellationToken) + { + return destination.WriteAsync(_rentedBuffer, 0, _index, cancellationToken); + } +#endif + private void CheckAndResizeBuffer(int sizeHint) { Debug.Assert(_rentedBuffer != null); @@ -128,17 +143,17 @@ private void CheckAndResizeBuffer(int sizeHint) int newSize = checked(_rentedBuffer.Length + growBy); - T[] oldBuffer = _rentedBuffer; + byte[] oldBuffer = _rentedBuffer; - _rentedBuffer = ArrayPool.Shared.Rent(newSize); + _rentedBuffer = ArrayPool.Shared.Rent(newSize); Debug.Assert(oldBuffer.Length >= _index); Debug.Assert(_rentedBuffer.Length >= _index); - Span previousBuffer = oldBuffer.AsSpan(0, _index); + Span previousBuffer = oldBuffer.AsSpan(0, _index); previousBuffer.CopyTo(_rentedBuffer); previousBuffer.Clear(); - ArrayPool.Shared.Return(oldBuffer); + ArrayPool.Shared.Return(oldBuffer); } Debug.Assert(_rentedBuffer.Length - _index > 0); From 837efeb37d25146f73d22952d4bbf84c1b216bcd Mon Sep 17 00:00:00 2001 From: Santiago Fernandez Madero Date: Wed, 29 May 2019 13:54:26 -0700 Subject: [PATCH 545/607] Re-generate System.Collections ref assembly against implementation (#38005) --- .../ref/System.Collections.cs | 75 ++++++++++++------- 1 file changed, 46 insertions(+), 29 deletions(-) diff --git a/src/System.Collections/ref/System.Collections.cs b/src/System.Collections/ref/System.Collections.cs index 5df97d5f53cf..ab33d3504583 100644 --- a/src/System.Collections/ref/System.Collections.cs +++ b/src/System.Collections/ref/System.Collections.cs @@ -72,11 +72,11 @@ protected Dictionary(System.Runtime.Serialization.SerializationInfo info, System public int Count { get { throw null; } } public TValue this[TKey key] { get { throw null; } set { } } public System.Collections.Generic.Dictionary.KeyCollection Keys { get { throw null; } } - bool System.Collections.Generic.ICollection>.IsReadOnly { get { throw null; } } - System.Collections.Generic.ICollection System.Collections.Generic.IDictionary.Keys { get { throw null; } } - System.Collections.Generic.ICollection System.Collections.Generic.IDictionary.Values { get { throw null; } } - System.Collections.Generic.IEnumerable System.Collections.Generic.IReadOnlyDictionary.Keys { get { throw null; } } - System.Collections.Generic.IEnumerable System.Collections.Generic.IReadOnlyDictionary.Values { get { throw null; } } + bool System.Collections.Generic.ICollection>.IsReadOnly { get { throw null; } } + System.Collections.Generic.ICollection System.Collections.Generic.IDictionary.Keys { get { throw null; } } + System.Collections.Generic.ICollection System.Collections.Generic.IDictionary.Values { get { throw null; } } + System.Collections.Generic.IEnumerable System.Collections.Generic.IReadOnlyDictionary.Keys { get { throw null; } } + System.Collections.Generic.IEnumerable System.Collections.Generic.IReadOnlyDictionary.Values { get { throw null; } } bool System.Collections.ICollection.IsSynchronized { get { throw null; } } object System.Collections.ICollection.SyncRoot { get { throw null; } } bool System.Collections.IDictionary.IsFixedSize { get { throw null; } } @@ -95,11 +95,11 @@ public virtual void GetObjectData(System.Runtime.Serialization.SerializationInfo public virtual void OnDeserialization(object sender) { } public bool Remove(TKey key) { throw null; } public bool Remove(TKey key, out TValue value) { throw null; } - void System.Collections.Generic.ICollection>.Add(System.Collections.Generic.KeyValuePair keyValuePair) { } - bool System.Collections.Generic.ICollection>.Contains(System.Collections.Generic.KeyValuePair keyValuePair) { throw null; } - void System.Collections.Generic.ICollection>.CopyTo(System.Collections.Generic.KeyValuePair[] array, int index) { } - bool System.Collections.Generic.ICollection>.Remove(System.Collections.Generic.KeyValuePair keyValuePair) { throw null; } - System.Collections.Generic.IEnumerator> System.Collections.Generic.IEnumerable>.GetEnumerator() { throw null; } + void System.Collections.Generic.ICollection>.Add(System.Collections.Generic.KeyValuePair keyValuePair) { } + bool System.Collections.Generic.ICollection>.Contains(System.Collections.Generic.KeyValuePair keyValuePair) { throw null; } + void System.Collections.Generic.ICollection>.CopyTo(System.Collections.Generic.KeyValuePair[] array, int index) { } + bool System.Collections.Generic.ICollection>.Remove(System.Collections.Generic.KeyValuePair keyValuePair) { throw null; } + System.Collections.Generic.IEnumerator> System.Collections.Generic.IEnumerable>.GetEnumerator() { throw null; } void System.Collections.ICollection.CopyTo(System.Array array, int index) { } void System.Collections.IDictionary.Add(object key, object value) { } bool System.Collections.IDictionary.Contains(object key) { throw null; } @@ -113,6 +113,7 @@ public void TrimExcess(int capacity) { } public partial struct Enumerator : System.Collections.Generic.IEnumerator>, System.Collections.IDictionaryEnumerator, System.Collections.IEnumerator, System.IDisposable { private object _dummy; + private int _dummyPrimitive; public System.Collections.Generic.KeyValuePair Current { get { throw null; } } System.Collections.DictionaryEntry System.Collections.IDictionaryEnumerator.Entry { get { throw null; } } object System.Collections.IDictionaryEnumerator.Key { get { throw null; } } @@ -140,7 +141,9 @@ void System.Collections.ICollection.CopyTo(System.Array array, int index) { } System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } public partial struct Enumerator : System.Collections.Generic.IEnumerator, System.Collections.IEnumerator, System.IDisposable { + private TKey _currentKey; private object _dummy; + private int _dummyPrimitive; public TKey Current { get { throw null; } } object System.Collections.IEnumerator.Current { get { throw null; } } public void Dispose() { } @@ -166,7 +169,9 @@ void System.Collections.ICollection.CopyTo(System.Array array, int index) { } System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } public partial struct Enumerator : System.Collections.Generic.IEnumerator, System.Collections.IEnumerator, System.IDisposable { + private TValue _currentValue; private object _dummy; + private int _dummyPrimitive; public TValue Current { get { throw null; } } object System.Collections.IEnumerator.Current { get { throw null; } } public void Dispose() { } @@ -226,7 +231,9 @@ public void TrimExcess() { } public void UnionWith(System.Collections.Generic.IEnumerable other) { } public partial struct Enumerator : System.Collections.Generic.IEnumerator, System.Collections.IEnumerator, System.IDisposable { + private T _current; private object _dummy; + private int _dummyPrimitive; public T Current { get { throw null; } } object System.Collections.IEnumerator.Current { get { throw null; } } public void Dispose() { } @@ -279,7 +286,9 @@ void System.Collections.ICollection.CopyTo(System.Array array, int index) { } System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } public partial struct Enumerator : System.Collections.Generic.IEnumerator, System.Collections.IEnumerator, System.IDisposable, System.Runtime.Serialization.IDeserializationCallback, System.Runtime.Serialization.ISerializable { + private T _current; private object _dummy; + private int _dummyPrimitive; public T Current { get { throw null; } } object System.Collections.IEnumerator.Current { get { throw null; } } public void Dispose() { } @@ -359,7 +368,9 @@ public void TrimExcess() { } public bool TrueForAll(System.Predicate match) { throw null; } public partial struct Enumerator : System.Collections.Generic.IEnumerator, System.Collections.IEnumerator, System.IDisposable { + private T _current; private object _dummy; + private int _dummyPrimitive; public T Current { get { throw null; } } object System.Collections.IEnumerator.Current { get { throw null; } } public void Dispose() { } @@ -391,7 +402,9 @@ public void TrimExcess() { } public bool TryPeek(out T result) { throw null; } public partial struct Enumerator : System.Collections.Generic.IEnumerator, System.Collections.IEnumerator, System.IDisposable { + private T _currentElement; private object _dummy; + private int _dummyPrimitive; public T Current { get { throw null; } } object System.Collections.IEnumerator.Current { get { throw null; } } public void Dispose() { } @@ -409,11 +422,11 @@ public SortedDictionary(System.Collections.Generic.IDictionary dic public int Count { get { throw null; } } public TValue this[TKey key] { get { throw null; } set { } } public System.Collections.Generic.SortedDictionary.KeyCollection Keys { get { throw null; } } - bool System.Collections.Generic.ICollection>.IsReadOnly { get { throw null; } } - System.Collections.Generic.ICollection System.Collections.Generic.IDictionary.Keys { get { throw null; } } - System.Collections.Generic.ICollection System.Collections.Generic.IDictionary.Values { get { throw null; } } - System.Collections.Generic.IEnumerable System.Collections.Generic.IReadOnlyDictionary.Keys { get { throw null; } } - System.Collections.Generic.IEnumerable System.Collections.Generic.IReadOnlyDictionary.Values { get { throw null; } } + bool System.Collections.Generic.ICollection>.IsReadOnly { get { throw null; } } + System.Collections.Generic.ICollection System.Collections.Generic.IDictionary.Keys { get { throw null; } } + System.Collections.Generic.ICollection System.Collections.Generic.IDictionary.Values { get { throw null; } } + System.Collections.Generic.IEnumerable System.Collections.Generic.IReadOnlyDictionary.Keys { get { throw null; } } + System.Collections.Generic.IEnumerable System.Collections.Generic.IReadOnlyDictionary.Values { get { throw null; } } bool System.Collections.ICollection.IsSynchronized { get { throw null; } } object System.Collections.ICollection.SyncRoot { get { throw null; } } bool System.Collections.IDictionary.IsFixedSize { get { throw null; } } @@ -429,10 +442,10 @@ public void Clear() { } public void CopyTo(System.Collections.Generic.KeyValuePair[] array, int index) { } public System.Collections.Generic.SortedDictionary.Enumerator GetEnumerator() { throw null; } public bool Remove(TKey key) { throw null; } - void System.Collections.Generic.ICollection>.Add(System.Collections.Generic.KeyValuePair keyValuePair) { } - bool System.Collections.Generic.ICollection>.Contains(System.Collections.Generic.KeyValuePair keyValuePair) { throw null; } - bool System.Collections.Generic.ICollection>.Remove(System.Collections.Generic.KeyValuePair keyValuePair) { throw null; } - System.Collections.Generic.IEnumerator> System.Collections.Generic.IEnumerable>.GetEnumerator() { throw null; } + void System.Collections.Generic.ICollection>.Add(System.Collections.Generic.KeyValuePair keyValuePair) { } + bool System.Collections.Generic.ICollection>.Contains(System.Collections.Generic.KeyValuePair keyValuePair) { throw null; } + bool System.Collections.Generic.ICollection>.Remove(System.Collections.Generic.KeyValuePair keyValuePair) { throw null; } + System.Collections.Generic.IEnumerator> System.Collections.Generic.IEnumerable>.GetEnumerator() { throw null; } void System.Collections.ICollection.CopyTo(System.Array array, int index) { } void System.Collections.IDictionary.Add(object key, object value) { } bool System.Collections.IDictionary.Contains(object key) { throw null; } @@ -443,6 +456,7 @@ void System.Collections.IDictionary.Remove(object key) { } public partial struct Enumerator : System.Collections.Generic.IEnumerator>, System.Collections.IDictionaryEnumerator, System.Collections.IEnumerator, System.IDisposable { private object _dummy; + private int _dummyPrimitive; public System.Collections.Generic.KeyValuePair Current { get { throw null; } } System.Collections.DictionaryEntry System.Collections.IDictionaryEnumerator.Entry { get { throw null; } } object System.Collections.IDictionaryEnumerator.Key { get { throw null; } } @@ -518,11 +532,11 @@ public SortedList(int capacity, System.Collections.Generic.IComparer compa public int Count { get { throw null; } } public TValue this[TKey key] { get { throw null; } set { } } public System.Collections.Generic.IList Keys { get { throw null; } } - bool System.Collections.Generic.ICollection>.IsReadOnly { get { throw null; } } - System.Collections.Generic.ICollection System.Collections.Generic.IDictionary.Keys { get { throw null; } } - System.Collections.Generic.ICollection System.Collections.Generic.IDictionary.Values { get { throw null; } } - System.Collections.Generic.IEnumerable System.Collections.Generic.IReadOnlyDictionary.Keys { get { throw null; } } - System.Collections.Generic.IEnumerable System.Collections.Generic.IReadOnlyDictionary.Values { get { throw null; } } + bool System.Collections.Generic.ICollection>.IsReadOnly { get { throw null; } } + System.Collections.Generic.ICollection System.Collections.Generic.IDictionary.Keys { get { throw null; } } + System.Collections.Generic.ICollection System.Collections.Generic.IDictionary.Values { get { throw null; } } + System.Collections.Generic.IEnumerable System.Collections.Generic.IReadOnlyDictionary.Keys { get { throw null; } } + System.Collections.Generic.IEnumerable System.Collections.Generic.IReadOnlyDictionary.Values { get { throw null; } } bool System.Collections.ICollection.IsSynchronized { get { throw null; } } object System.Collections.ICollection.SyncRoot { get { throw null; } } bool System.Collections.IDictionary.IsFixedSize { get { throw null; } } @@ -540,11 +554,11 @@ public void Clear() { } public int IndexOfValue(TValue value) { throw null; } public bool Remove(TKey key) { throw null; } public void RemoveAt(int index) { } - void System.Collections.Generic.ICollection>.Add(System.Collections.Generic.KeyValuePair keyValuePair) { } - bool System.Collections.Generic.ICollection>.Contains(System.Collections.Generic.KeyValuePair keyValuePair) { throw null; } - void System.Collections.Generic.ICollection>.CopyTo(System.Collections.Generic.KeyValuePair[] array, int arrayIndex) { } - bool System.Collections.Generic.ICollection>.Remove(System.Collections.Generic.KeyValuePair keyValuePair) { throw null; } - System.Collections.Generic.IEnumerator> System.Collections.Generic.IEnumerable>.GetEnumerator() { throw null; } + void System.Collections.Generic.ICollection>.Add(System.Collections.Generic.KeyValuePair keyValuePair) { } + bool System.Collections.Generic.ICollection>.Contains(System.Collections.Generic.KeyValuePair keyValuePair) { throw null; } + void System.Collections.Generic.ICollection>.CopyTo(System.Collections.Generic.KeyValuePair[] array, int arrayIndex) { } + bool System.Collections.Generic.ICollection>.Remove(System.Collections.Generic.KeyValuePair keyValuePair) { throw null; } + System.Collections.Generic.IEnumerator> System.Collections.Generic.IEnumerable>.GetEnumerator() { throw null; } void System.Collections.ICollection.CopyTo(System.Array array, int arrayIndex) { } void System.Collections.IDictionary.Add(object key, object value) { } bool System.Collections.IDictionary.Contains(object key) { throw null; } @@ -603,6 +617,7 @@ public void UnionWith(System.Collections.Generic.IEnumerable other) { } public partial struct Enumerator : System.Collections.Generic.IEnumerator, System.Collections.IEnumerator, System.IDisposable, System.Runtime.Serialization.IDeserializationCallback, System.Runtime.Serialization.ISerializable { private object _dummy; + private int _dummyPrimitive; public T Current { get { throw null; } } object System.Collections.IEnumerator.Current { get { throw null; } } public void Dispose() { } @@ -636,7 +651,9 @@ public void TrimExcess() { } public bool TryPop(out T result) { throw null; } public partial struct Enumerator : System.Collections.Generic.IEnumerator, System.Collections.IEnumerator, System.IDisposable { + private T _currentElement; private object _dummy; + private int _dummyPrimitive; public T Current { get { throw null; } } object System.Collections.IEnumerator.Current { get { throw null; } } public void Dispose() { } From c04be1ef5bf77f370ff7282a7bd6bf0342ea54b8 Mon Sep 17 00:00:00 2001 From: Tomas Weinfurt Date: Wed, 29 May 2019 13:56:49 -0700 Subject: [PATCH 546/607] improve reliability of HttpListenerFactory by verifying that Connect works (#38009) --- .../tests/HttpListenerFactory.cs | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/src/System.Net.HttpListener/tests/HttpListenerFactory.cs b/src/System.Net.HttpListener/tests/HttpListenerFactory.cs index 289cd1b97abc..4686be3ffe0e 100644 --- a/src/System.Net.HttpListener/tests/HttpListenerFactory.cs +++ b/src/System.Net.HttpListener/tests/HttpListenerFactory.cs @@ -48,6 +48,11 @@ internal HttpListenerFactory(string hostname = "localhost", string path = null) _processPrefixListener = listener; _processPrefix = prefix; _port = port; + + _processPrefixException = null; + Socket socket = GetConnectedSocket(); + socket.Close(); + break; } catch (Exception e) @@ -141,18 +146,26 @@ public static bool SupportsWildcards public Socket GetConnectedSocket() { + + if (_processPrefixException != null) + { + throw new Exception("Could not create HttpListener", _processPrefixException); + } + + string hostname = _hostname == "*" || _hostname == "+" ? "localhost" : _hostname; + // Some platforms or distributions require IPv6 sockets if the OS supports IPv6. Others (e.g. Ubuntu) don't. try { AddressFamily addressFamily = Socket.OSSupportsIPv6 ? AddressFamily.InterNetworkV6 : AddressFamily.InterNetwork; Socket socket = new Socket(addressFamily, SocketType.Stream, ProtocolType.Tcp); - socket.Connect(Hostname, _port); + socket.Connect(hostname, Port); return socket; } catch { Socket socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); - socket.Connect(Hostname, _port); + socket.Connect(hostname, Port); return socket; } } From 0bae12c1967eaee2f1b20421df768e70d73da69c Mon Sep 17 00:00:00 2001 From: Jeremy Kuhne Date: Wed, 29 May 2019 14:09:09 -0700 Subject: [PATCH 547/607] Add readonly modifiers to SequenceReader. (#37718) * Add readonly modifiers to SequenceReader. Clearly marking where we don't mutate faciliates passing stack allocated spans and allows composing additional helpers that also want to describe that they don't mutate. * Address some feedback * Cache length again * Change to compare to < 0 * put back the private field stripped out by the tool * Add dummy primitive for SequenceReader --- src/System.Memory/ref/System.Memory.cs | 24 +++++++------- .../src/System/Buffers/SequenceReader.cs | 32 ++++++++++--------- .../tests/SequenceReader/Rewind.cs | 24 +++++++++++++- .../tests/System.Memory.Tests.csproj | 2 +- 4 files changed, 54 insertions(+), 28 deletions(-) diff --git a/src/System.Memory/ref/System.Memory.cs b/src/System.Memory/ref/System.Memory.cs index 111a53280da7..0f3285ad0bcd 100644 --- a/src/System.Memory/ref/System.Memory.cs +++ b/src/System.Memory/ref/System.Memory.cs @@ -246,16 +246,18 @@ public static partial class SequenceReaderExtensions } public ref partial struct SequenceReader where T : unmanaged, System.IEquatable { + private object _dummy; + private int _dummyPrimitive; public SequenceReader(System.Buffers.ReadOnlySequence sequence) { throw null; } - public long Consumed { get { throw null; } } - public System.ReadOnlySpan CurrentSpan { get { throw null; } } - public int CurrentSpanIndex { get { throw null; } } - public bool End { get { throw null; } } - public long Length { get { throw null; } } - public System.SequencePosition Position { get { throw null; } } - public long Remaining { get { throw null; } } - public System.Buffers.ReadOnlySequence Sequence { get { throw null; } } - public System.ReadOnlySpan UnreadSpan { get { throw null; } } + public readonly long Consumed { get { throw null; } } + public readonly System.ReadOnlySpan CurrentSpan { get { throw null; } } + public readonly int CurrentSpanIndex { get { throw null; } } + public readonly bool End { get { throw null; } } + public readonly long Length { get { throw null; } } + public readonly System.SequencePosition Position { get { throw null; } } + public readonly long Remaining { get { throw null; } } + public readonly System.Buffers.ReadOnlySequence Sequence { get { throw null; } } + public readonly System.ReadOnlySpan UnreadSpan { get { throw null; } } public void Advance(long count) { } public long AdvancePast(T value) { throw null; } public long AdvancePastAny(System.ReadOnlySpan values) { throw null; } @@ -267,8 +269,8 @@ public void Advance(long count) { } public void Rewind(long count) { } public bool TryAdvanceTo(T delimiter, bool advancePastDelimiter = true) { throw null; } public bool TryAdvanceToAny(System.ReadOnlySpan delimiters, bool advancePastDelimiter = true) { throw null; } - public bool TryCopyTo(System.Span destination) { throw null; } - public bool TryPeek(out T value) { throw null; } + public readonly bool TryCopyTo(System.Span destination) { throw null; } + public readonly bool TryPeek(out T value) { throw null; } public bool TryRead(out T value) { throw null; } public bool TryReadTo(out System.Buffers.ReadOnlySequence sequence, System.ReadOnlySpan delimiter, bool advancePastDelimiter = true) { throw null; } public bool TryReadTo(out System.Buffers.ReadOnlySequence sequence, T delimiter, bool advancePastDelimiter = true) { throw null; } diff --git a/src/System.Memory/src/System/Buffers/SequenceReader.cs b/src/System.Memory/src/System/Buffers/SequenceReader.cs index 824b67b90686..77a6ae6faa9d 100644 --- a/src/System.Memory/src/System/Buffers/SequenceReader.cs +++ b/src/System.Memory/src/System/Buffers/SequenceReader.cs @@ -4,6 +4,8 @@ using System.Diagnostics; using System.Runtime.CompilerServices; +using System.Threading; +using Internal.Runtime.CompilerServices; namespace System.Buffers { @@ -40,33 +42,33 @@ public SequenceReader(ReadOnlySequence sequence) /// /// True when there is no more data in the . /// - public bool End => !_moreData; + public readonly bool End => !_moreData; /// /// The underlying for the reader. /// - public ReadOnlySequence Sequence { get; } + public readonly ReadOnlySequence Sequence { get; } /// /// The current position in the . /// - public SequencePosition Position + public readonly SequencePosition Position => Sequence.GetPosition(CurrentSpanIndex, _currentPosition); /// /// The current segment in the as a span. /// - public ReadOnlySpan CurrentSpan { get; private set; } + public ReadOnlySpan CurrentSpan { readonly get; private set; } /// /// The index in the . /// - public int CurrentSpanIndex { get; private set; } + public int CurrentSpanIndex { readonly get; private set; } /// /// The unread portion of the . /// - public ReadOnlySpan UnreadSpan + public readonly ReadOnlySpan UnreadSpan { [MethodImpl(MethodImplOptions.AggressiveInlining)] get => CurrentSpan.Slice(CurrentSpanIndex); @@ -75,24 +77,24 @@ public ReadOnlySpan UnreadSpan /// /// The total number of 's processed by the reader. /// - public long Consumed { get; private set; } + public long Consumed { readonly get; private set; } /// /// Remaining 's in the reader's . /// - public long Remaining => Length - Consumed; + public readonly long Remaining => Length - Consumed; /// /// Count of in the reader's . /// - public long Length + public readonly long Length { get { if (_length < 0) { - // Cache the length - _length = Sequence.Length; + // Cast-away readonly to initialize lazy field + Volatile.Write(ref Unsafe.AsRef(_length), Sequence.Length); } return _length; } @@ -104,7 +106,7 @@ public long Length /// The next value or default if at the end. /// False if at the end of the reader. [MethodImpl(MethodImplOptions.AggressiveInlining)] - public bool TryPeek(out T value) + public readonly bool TryPeek(out T value) { if (_moreData) { @@ -153,7 +155,7 @@ public bool TryRead(out T value) [MethodImpl(MethodImplOptions.AggressiveInlining)] public void Rewind(long count) { - if (count < 0 || count > Consumed) + if ((ulong)count > (ulong)Consumed) { ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.count); } @@ -337,7 +339,7 @@ private void AdvanceToNextSpan(long count) /// Destination span to copy to. /// True if there is enough data to completely fill the span. [MethodImpl(MethodImplOptions.AggressiveInlining)] - public bool TryCopyTo(Span destination) + public readonly bool TryCopyTo(Span destination) { // This API doesn't advance to facilitate conditional advancement based on the data returned. // We don't provide an advance option to allow easier utilizing of stack allocated destination spans. @@ -354,7 +356,7 @@ public bool TryCopyTo(Span destination) return TryCopyMultisegment(destination); } - internal bool TryCopyMultisegment(Span destination) + internal readonly bool TryCopyMultisegment(Span destination) { // If we don't have enough to fill the requested buffer, return false if (Remaining < destination.Length) diff --git a/src/System.Memory/tests/SequenceReader/Rewind.cs b/src/System.Memory/tests/SequenceReader/Rewind.cs index 45d8da2dca45..f2db891239b0 100644 --- a/src/System.Memory/tests/SequenceReader/Rewind.cs +++ b/src/System.Memory/tests/SequenceReader/Rewind.cs @@ -80,7 +80,29 @@ public void Rewind_Exception() Assert.Throws(() => new SequenceReader(bytes).Rewind(-1)); // Can't pull more than we consumed - Assert.Throws(() => new SequenceReader(bytes).Rewind(1)); + SequenceReader reader = new SequenceReader(bytes); + try + { + reader.Rewind(1); + Assert.True(false, "no exception thrown"); + } + catch (ArgumentOutOfRangeException) + { + // Expected + } + Assert.Equal(0, reader.Consumed); + + reader.Advance(1); + try + { + reader.Rewind(2); + Assert.True(false, "no exception thrown"); + } + catch (ArgumentOutOfRangeException) + { + // Expected + } + Assert.Equal(1, reader.Consumed); } [Fact] diff --git a/src/System.Memory/tests/System.Memory.Tests.csproj b/src/System.Memory/tests/System.Memory.Tests.csproj index aaa804efd01e..70766c2a1343 100644 --- a/src/System.Memory/tests/System.Memory.Tests.csproj +++ b/src/System.Memory/tests/System.Memory.Tests.csproj @@ -27,6 +27,7 @@ + @@ -38,7 +39,6 @@ - From 1e642d1107f05268545e59533a4fe77ea2cdf303 Mon Sep 17 00:00:00 2001 From: Jeremy Kuhne Date: Wed, 29 May 2019 14:09:55 -0700 Subject: [PATCH 548/607] Add test to validate #36167 is fixed. (#38029) --- .../tests/Serialization/Array.ReadTests.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/System.Text.Json/tests/Serialization/Array.ReadTests.cs b/src/System.Text.Json/tests/Serialization/Array.ReadTests.cs index 05854c5e679c..d87f133989f9 100644 --- a/src/System.Text.Json/tests/Serialization/Array.ReadTests.cs +++ b/src/System.Text.Json/tests/Serialization/Array.ReadTests.cs @@ -25,6 +25,16 @@ public static void ReadObjectArray() i[1].Verify(); } + [Fact] + public static void DeserializeObjectArray_36167() + { + // https://github.com/dotnet/corefx/issues/36167 + object[] data = JsonSerializer.Parse("[1]"); + Assert.Equal(1, data.Length); + Assert.IsType(data[0]); + Assert.Equal(1, ((JsonElement)data[0]).GetInt32()); + } + [Fact] public static void ReadEmptyObjectArray() { From 8ab18539bf0591f0e726cd295c3e06d1434eec14 Mon Sep 17 00:00:00 2001 From: Jeremy Kuhne Date: Wed, 29 May 2019 14:13:53 -0700 Subject: [PATCH 549/607] Add test to validate #37567. (#38030) --- .../Serialization/PropertyVisibilityTests.cs | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/System.Text.Json/tests/Serialization/PropertyVisibilityTests.cs b/src/System.Text.Json/tests/Serialization/PropertyVisibilityTests.cs index f85cc1241329..d5f05eaf02a6 100644 --- a/src/System.Text.Json/tests/Serialization/PropertyVisibilityTests.cs +++ b/src/System.Text.Json/tests/Serialization/PropertyVisibilityTests.cs @@ -67,6 +67,26 @@ public static void PrivateSetter() Assert.Null(objCopy.GetMyString()); } + [Fact] + public static void PrivateSetterPublicGetter() + { + // https://github.com/dotnet/corefx/issues/37567 + ClassWithPublicGetterAndPrivateSetter obj + = JsonSerializer.Parse(@"{ ""Class"": {} }"); + + Assert.NotNull(obj); + Assert.Null(obj.Class); + } + + private class ClassWithPublicGetterAndPrivateSetter + { + public NestedClass Class { get; private set; } + } + + private class NestedClass + { + } + [Fact] public static void JsonIgnoreAttribute() { From a977a24310055828d789520377b555ffd5df2835 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Wed, 29 May 2019 17:28:48 -0400 Subject: [PATCH 550/607] [master] Update dependencies from dotnet/coreclr (#38020) * Update dependencies from https://github.com/dotnet/coreclr build 20190528.71 - Microsoft.NET.Sdk.IL - 3.0.0-preview6.19278.71 - Microsoft.NETCore.ILAsm - 3.0.0-preview6.19278.71 - Microsoft.NETCore.Runtime.CoreCLR - 3.0.0-preview6.19278.71 * Expose nullable attributes * Fix several nullable warnings due to nullable attribute changes * Adjust build for ProjectNtfs bits not being current --- eng/Version.Details.xml | 12 +++--- eng/Versions.props | 4 +- global.json | 2 +- .../CodeDom/Compiler/IndentedTextWriter.cs | 10 +++-- .../src/System/IO/BufferedStream.cs | 2 +- src/System.Runtime/ref/System.Runtime.cs | 37 +++++++++++++++++++ .../src/ApiCompatBaseline.uapaot.txt | 11 +++++- .../System/Threading/WaitHandleExtensions.cs | 6 +-- 8 files changed, 67 insertions(+), 17 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 3acd5bda4e4e..064f76546573 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -1,16 +1,16 @@ - + https://github.com/dotnet/coreclr - 419b46fc7d0fe0659e7ab521c222b7c921b36e35 + 7631331183266734342de351b25519a07743e13e - + https://github.com/dotnet/coreclr - 419b46fc7d0fe0659e7ab521c222b7c921b36e35 + 7631331183266734342de351b25519a07743e13e - + https://github.com/dotnet/coreclr - 419b46fc7d0fe0659e7ab521c222b7c921b36e35 + 7631331183266734342de351b25519a07743e13e diff --git a/eng/Versions.props b/eng/Versions.props index 5cab253481eb..16ec1e57bbea 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -40,8 +40,8 @@ 3.0.0-preview6-27728-04 3.0.0-preview6-27728-04 - 3.0.0-preview6.19277.72 - 3.0.0-preview6.19277.72 + 3.0.0-preview6.19278.71 + 3.0.0-preview6.19278.71 3.0.0-preview6.19278.7 4.6.0-preview6.19278.7 diff --git a/global.json b/global.json index a822d123334a..e1aaaf68fd50 100644 --- a/global.json +++ b/global.json @@ -6,6 +6,6 @@ "Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19274.6", "Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19274.6", "FIX-85B6-MERGE-9C38-CONFLICT": "1.0.0", - "Microsoft.NET.Sdk.IL": "3.0.0-preview6.19277.72" + "Microsoft.NET.Sdk.IL": "3.0.0-preview6.19278.71" } } diff --git a/src/System.Runtime.Extensions/src/System/CodeDom/Compiler/IndentedTextWriter.cs b/src/System.Runtime.Extensions/src/System/CodeDom/Compiler/IndentedTextWriter.cs index 160e059759a1..57c45c35f0dc 100644 --- a/src/System.Runtime.Extensions/src/System/CodeDom/Compiler/IndentedTextWriter.cs +++ b/src/System.Runtime.Extensions/src/System/CodeDom/Compiler/IndentedTextWriter.cs @@ -2,9 +2,10 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System.Diagnostics.CodeAnalysis; +using System.Globalization; using System.IO; using System.Text; -using System.Globalization; namespace System.CodeDom.Compiler { @@ -29,9 +30,12 @@ public IndentedTextWriter(TextWriter writer, string tabString) : base(CultureInf public override Encoding Encoding => _writer.Encoding; - public override string? NewLine // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/2384 +#if !uapaot // TODO-NULLABLE: Remove condition once ProjectNtfs Corelib is updated with nullable attributes + [AllowNull] +#endif + public override string NewLine { - get { return _writer.NewLine; } + get { return _writer.NewLine!; } // TODO-NULLABLE: Remove ! when nullable attributes are respected set { _writer.NewLine = value; } } diff --git a/src/System.Runtime.Extensions/src/System/IO/BufferedStream.cs b/src/System.Runtime.Extensions/src/System/IO/BufferedStream.cs index 259b3d1c71fb..35a8fe9a6239 100644 --- a/src/System.Runtime.Extensions/src/System/IO/BufferedStream.cs +++ b/src/System.Runtime.Extensions/src/System/IO/BufferedStream.cs @@ -65,7 +65,7 @@ internal SemaphoreSlim LazyEnsureAsyncActiveSemaphoreInitialized() { // Lazily-initialize _asyncActiveSemaphore. As we're never accessing the SemaphoreSlim's // WaitHandle, we don't need to worry about Disposing it. - return LazyInitializer.EnsureInitialized(ref _asyncActiveSemaphore, () => new SemaphoreSlim(1, 1))!; + return LazyInitializer.EnsureInitialized(ref _asyncActiveSemaphore!, () => new SemaphoreSlim(1, 1)); // TODO-NULLABLE: Remove ! when nullable attributes are respected } public BufferedStream(Stream stream) diff --git a/src/System.Runtime/ref/System.Runtime.cs b/src/System.Runtime/ref/System.Runtime.cs index 532875243950..ca4141cc1a44 100644 --- a/src/System.Runtime/ref/System.Runtime.cs +++ b/src/System.Runtime/ref/System.Runtime.cs @@ -4184,6 +4184,43 @@ public enum DebuggingModes } } } +namespace System.Diagnostics.CodeAnalysis +{ + [System.AttributeUsageAttribute(System.AttributeTargets.Field | System.AttributeTargets.Parameter | System.AttributeTargets.Property, Inherited = false)] + public sealed class AllowNullAttribute : System.Attribute { } + [System.AttributeUsageAttribute(System.AttributeTargets.Field | System.AttributeTargets.Parameter | System.AttributeTargets.Property, Inherited = false)] + public sealed class DisallowNullAttribute : System.Attribute { } + [System.AttributeUsageAttribute(System.AttributeTargets.Method, Inherited = false)] + public sealed class DoesNotReturnAttribute : System.Attribute { } + [System.AttributeUsageAttribute(System.AttributeTargets.Parameter, Inherited = false)] + public sealed class DoesNotReturnIfAttribute : System.Attribute + { + public DoesNotReturnIfAttribute(bool parameterValue) { } + public bool ParameterValue { get { throw null; } } + } + [System.AttributeUsageAttribute(System.AttributeTargets.Field | System.AttributeTargets.Parameter | System.AttributeTargets.Property | System.AttributeTargets.ReturnValue, Inherited = false)] + public sealed class MaybeNullAttribute : System.Attribute { } + [System.AttributeUsageAttribute(System.AttributeTargets.Parameter, Inherited = false)] + public sealed class MaybeNullWhenAttribute : System.Attribute + { + public MaybeNullWhenAttribute(bool returnValue) { } + public bool ReturnValue { get { throw null; } } + } + [System.AttributeUsageAttribute(System.AttributeTargets.Field | System.AttributeTargets.Parameter | System.AttributeTargets.Property | System.AttributeTargets.ReturnValue, Inherited = false)] + public sealed class NotNullAttribute : System.Attribute { } + [System.AttributeUsageAttribute(System.AttributeTargets.Parameter | System.AttributeTargets.Property | System.AttributeTargets.ReturnValue, AllowMultiple = true, Inherited = false)] + public sealed class NotNullIfNotNullAttribute : System.Attribute + { + public NotNullIfNotNullAttribute(string parameterName) { } + public string ParameterName { get { throw null; } } + } + [System.AttributeUsageAttribute(System.AttributeTargets.Parameter, Inherited = false)] + public sealed class NotNullWhenAttribute : System.Attribute + { + public NotNullWhenAttribute(bool returnValue) { } + public bool ReturnValue { get { throw null; } } + } +} namespace System.Globalization { public abstract partial class Calendar : System.ICloneable diff --git a/src/System.Runtime/src/ApiCompatBaseline.uapaot.txt b/src/System.Runtime/src/ApiCompatBaseline.uapaot.txt index 6f2a1e82da74..e96111c652fd 100644 --- a/src/System.Runtime/src/ApiCompatBaseline.uapaot.txt +++ b/src/System.Runtime/src/ApiCompatBaseline.uapaot.txt @@ -6,4 +6,13 @@ TypeCannotChangeClassification : Type 'System.Reflection.CustomAttributeNamedArg CannotRemoveAttribute : Attribute 'System.Runtime.CompilerServices.IsReadOnlyAttribute' exists on 'System.Reflection.CustomAttributeTypedArgument' in the contract but not the implementation. TypeCannotChangeClassification : Type 'System.Reflection.CustomAttributeTypedArgument' is marked as readonly in the contract so it must also be marked readonly in the implementation. MembersMustExist : Member 'System.String System.Runtime.CompilerServices.RuntimeFeature.DefaultImplementationsOfInterfaces' does not exist in the implementation but it does exist in the contract. -Total Issues: 7 +TypesMustExist : Type 'System.Diagnostics.CodeAnalysis.AllowNullAttribute' does not exist in the implementation but it does exist in the contract. +TypesMustExist : Type 'System.Diagnostics.CodeAnalysis.DisallowNullAttribute' does not exist in the implementation but it does exist in the contract. +TypesMustExist : Type 'System.Diagnostics.CodeAnalysis.DoesNotReturnAttribute' does not exist in the implementation but it does exist in the contract. +TypesMustExist : Type 'System.Diagnostics.CodeAnalysis.DoesNotReturnIfAttribute' does not exist in the implementation but it does exist in the contract. +TypesMustExist : Type 'System.Diagnostics.CodeAnalysis.MaybeNullAttribute' does not exist in the implementation but it does exist in the contract. +TypesMustExist : Type 'System.Diagnostics.CodeAnalysis.MaybeNullWhenAttribute' does not exist in the implementation but it does exist in the contract. +TypesMustExist : Type 'System.Diagnostics.CodeAnalysis.NotNullAttribute' does not exist in the implementation but it does exist in the contract. +TypesMustExist : Type 'System.Diagnostics.CodeAnalysis.NotNullIfNotNullAttribute' does not exist in the implementation but it does exist in the contract. +TypesMustExist : Type 'System.Diagnostics.CodeAnalysis.NotNullWhenAttribute' does not exist in the implementation but it does exist in the contract. +Total Issues: 16 diff --git a/src/System.Runtime/src/System/Threading/WaitHandleExtensions.cs b/src/System.Runtime/src/System/Threading/WaitHandleExtensions.cs index 1b5e78039a82..49ad710d81e9 100644 --- a/src/System.Runtime/src/System/Threading/WaitHandleExtensions.cs +++ b/src/System.Runtime/src/System/Threading/WaitHandleExtensions.cs @@ -13,14 +13,14 @@ public static class WaitHandleExtensions /// /// The to operate on. /// A representing the native operating system handle. - public static SafeWaitHandle? GetSafeWaitHandle(this WaitHandle waitHandle) + public static SafeWaitHandle GetSafeWaitHandle(this WaitHandle waitHandle) { if (waitHandle == null) { throw new ArgumentNullException(nameof(waitHandle)); } - return waitHandle.SafeWaitHandle; + return waitHandle.SafeWaitHandle!; // TODO-NULLABLE: Remove ! when nullable attributes are respected } /// @@ -35,7 +35,7 @@ public static void SetSafeWaitHandle(this WaitHandle waitHandle, SafeWaitHandle? throw new ArgumentNullException(nameof(waitHandle)); } - waitHandle.SafeWaitHandle = value; + waitHandle.SafeWaitHandle = value!; // TODO-NULLABLE: Remove ! when nullable attributes are respected } } } From ecfb60b67d09b992f24af0625305299710bc128f Mon Sep 17 00:00:00 2001 From: Eric StJohn Date: Wed, 29 May 2019 16:32:10 -0700 Subject: [PATCH 551/607] Remove some dependencies from source build (#37730) * Remove some dependencies from source build * Add back GenAPI for sourcebuild We cannot remove GenAPI as it is needed for generating platform-not-supported assemblies. We will need handle this differently. The tentative plan is that sourcebuild will have two phases. During the first phase we can use GenAPI and generate source for not-supported assemblies and save it off in some location. In the second phase of source build (OfflineBuild=true) we won't use GenAPI and instead will read the sources from this location. --- eng/Tools.props | 9 +++++---- eng/dir.traversal.targets | 2 +- src/dirs.proj | 4 ++-- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/eng/Tools.props b/eng/Tools.props index d54f88896fd9..2508e08626a5 100644 --- a/eng/Tools.props +++ b/eng/Tools.props @@ -18,14 +18,10 @@ - - - - @@ -34,6 +30,11 @@ + + + + + diff --git a/eng/dir.traversal.targets b/eng/dir.traversal.targets index 8d156b5ba682..e5f0f1b2cf2a 100644 --- a/eng/dir.traversal.targets +++ b/eng/dir.traversal.targets @@ -1,4 +1,4 @@ - + diff --git a/src/dirs.proj b/src/dirs.proj index 6930d3f5eff7..fbe8e15255f7 100644 --- a/src/dirs.proj +++ b/src/dirs.proj @@ -12,8 +12,8 @@ - - + + From c6fc43c6f2b92d8e13a444217f29368159e015eb Mon Sep 17 00:00:00 2001 From: Tomas Weinfurt Date: Wed, 29 May 2019 19:33:18 -0700 Subject: [PATCH 552/607] Enable MaxConnectionsPerServer_WaitingConnectionsAreCancelable again (#37933) * enable MaxConnectionsPerServer_WaitingConnectionsAreCancelable afain * skip with curl handler --- .../HttpClientHandlerTest.Cancellation.cs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Cancellation.cs b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Cancellation.cs index cd03b96434d9..ad834328b0de 100644 --- a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Cancellation.cs +++ b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Cancellation.cs @@ -9,6 +9,9 @@ using System.Net.Test.Common; using System.Threading; using System.Threading.Tasks; + +using Microsoft.DotNet.XUnitExtensions; + using Xunit; using Xunit.Abstractions; @@ -292,16 +295,16 @@ await connection.ReadRequestHeaderAndSendCustomResponseAsync( } } - [ActiveIssue(32000)] [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "WinRT stack can't set MaxConnectionsPerServer < 2")] - [Fact] + [ConditionalFact] public async Task MaxConnectionsPerServer_WaitingConnectionsAreCancelable() { - if (IsNetfxHandler) + if (IsNetfxHandler || IsCurlHandler) { // Throws HttpRequestException wrapping a WebException for the canceled request // instead of throwing an OperationCanceledException or a canceled WebException directly. - return; + // With CurlHandler, this test sometimes hangs. + throw new SkipTestException("Skipping on unstable platform handler"); } using (HttpClientHandler handler = CreateHttpClientHandler()) From aa9db0538e8407f94fd780652dca05e82256fa0c Mon Sep 17 00:00:00 2001 From: Viktor Hofer Date: Wed, 29 May 2019 19:08:27 +0200 Subject: [PATCH 553/607] Update to use alpine3.9 in PRs --- eng/pipelines/linux.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/pipelines/linux.yml b/eng/pipelines/linux.yml index 1444af9c1db1..49c1e60cf544 100644 --- a/eng/pipelines/linux.yml +++ b/eng/pipelines/linux.yml @@ -115,7 +115,7 @@ jobs: - ${{ if eq(parameters.fullMatrix, 'false') }}: - linuxDefaultQueues: Centos.7.Amd64.Open+RedHat.7.Amd64.Open+Debian.8.Amd64.Open+Ubuntu.1604.Amd64.Open+Ubuntu.1804.Amd64.Open+OpenSuse.42.Amd64.Open+\(Fedora.28.Amd64.Open\)ubuntu.1604.amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-28-helix-09ca40b-20190508143249 - - alpineQueues: \(Alpine.38.Amd64.Open\)ubuntu.1604.amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.8-helix-09ca40b-20190508143246 + - alpineQueues: \(Alpine.39.Amd64.Open\)ubuntu.1604.amd64.open@mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.9-helix-09ca40b-20190508143246 - ${{ if eq(parameters.fullMatrix, 'true') }}: - linuxDefaultQueues: Centos.7.Amd64.Open+RedHat.7.Amd64.Open+Debian.8.Amd64.Open+Debian.9.Amd64.Open+Ubuntu.1604.Amd64.Open+Ubuntu.1804.Amd64.Open+Ubuntu.1810.Amd64.Open+OpenSuse.42.Amd64.Open+SLES.12.Amd64.Open+SLES.15.Amd64.Open+\(Fedora.28.Amd64.Open\)ubuntu.1604.amd64.open@mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-28-helix-09ca40b-20190508143249+\(Fedora.29.Amd64.Open\)ubuntu.1604.amd64.open@mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-29-09ca40b-20190508143249+\(Ubuntu.1904.Amd64.Open\)ubuntu.1604.amd64.open@mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-19.04-helix-amd64-09ca40b-20190508143257 From 1a60edc784c89a8370d1f9539944f5c95261e7a8 Mon Sep 17 00:00:00 2001 From: Stephen Toub Date: Wed, 29 May 2019 21:41:03 -0400 Subject: [PATCH 554/607] Enable Microsoft.Diagnostics.Runtime to be used by tests --- external/test-runtime/XUnit.Runtime.depproj | 2 ++ 1 file changed, 2 insertions(+) diff --git a/external/test-runtime/XUnit.Runtime.depproj b/external/test-runtime/XUnit.Runtime.depproj index 6ee6f97db9b8..4c69191a8ab8 100644 --- a/external/test-runtime/XUnit.Runtime.depproj +++ b/external/test-runtime/XUnit.Runtime.depproj @@ -38,6 +38,7 @@ + @@ -58,6 +59,7 @@ + From a2afbfffc439b775086aeca71951312e15c8281e Mon Sep 17 00:00:00 2001 From: Ahson Khan Date: Wed, 29 May 2019 20:25:13 -0700 Subject: [PATCH 555/607] Disable warning suppressions related to missing XML comments within (#38037) S.T.Json. --- .../src/System.Text.Json.csproj | 4 ++ .../src/System/Text/Json/JsonException.cs | 8 +++ .../src/System/Text/Json/JsonTokenType.cs | 51 +++++++++++++++++++ .../Json/Serialization/JsonIgnoreAttribute.cs | 3 ++ .../Json/Serialization/JsonNamingPolicy.cs | 3 ++ 5 files changed, 69 insertions(+) diff --git a/src/System.Text.Json/src/System.Text.Json.csproj b/src/System.Text.Json/src/System.Text.Json.csproj index fc3df9ab8e19..759e04270890 100644 --- a/src/System.Text.Json/src/System.Text.Json.csproj +++ b/src/System.Text.Json/src/System.Text.Json.csproj @@ -9,6 +9,10 @@ $(DefineConstants);BUILDING_INBOX_LIBRARY + + + + diff --git a/src/System.Text.Json/src/System/Text/Json/JsonException.cs b/src/System.Text.Json/src/System/Text/Json/JsonException.cs index b7022d78b69d..60d62bdb9ce0 100644 --- a/src/System.Text.Json/src/System/Text/Json/JsonException.cs +++ b/src/System.Text.Json/src/System/Text/Json/JsonException.cs @@ -48,6 +48,14 @@ public JsonException(string message, string path, long? lineNumber, long? bytePo Path = path; } + /// + /// Creates a new exception object with serialized data. + /// + /// The that holds the serialized object data about the exception being thrown. + /// The that contains contextual information about the source or destination. + /// + /// Thrown when is . + /// protected JsonException(SerializationInfo info, StreamingContext context) : base(info, context) { LineNumber = (long?)info.GetValue("LineNumber", typeof(long?)); diff --git a/src/System.Text.Json/src/System/Text/Json/JsonTokenType.cs b/src/System.Text.Json/src/System/Text/Json/JsonTokenType.cs index f42be5f442c9..2fd1daafddeb 100644 --- a/src/System.Text.Json/src/System/Text/Json/JsonTokenType.cs +++ b/src/System.Text.Json/src/System/Text/Json/JsonTokenType.cs @@ -15,17 +15,68 @@ public enum JsonTokenType : byte { // Do not re-order. // We rely on the ordering to quickly check things like IsTokenTypePrimitive + + /// + /// Indicates that there is no value (as distinct from ). + /// + /// + /// This is the default token type if no data has been read by the . + /// None, + + /// + /// Indicates that the token type is the start of a JSON object. + /// StartObject, + + /// + /// Indicates that the token type is the end of a JSON object. + /// EndObject, + + /// + /// Indicates that the token type is the start of a JSON array. + /// StartArray, + + /// + /// Indicates that the token type is the end of a JSON array. + /// EndArray, + + /// + /// Indicates that the token type is a JSON property name. + /// PropertyName, + + /// + /// Indicates that the token type is a JSON string. + /// String, + + /// + /// Indicates that the token type is a JSON number. + /// Number, + + /// + /// Indicates that the token type is the JSON literal true. + /// True, + + /// + /// Indicates that the token type is the JSON literal false. + /// False, + + /// + /// Indicates that the token type is the JSON literal null. + /// Null, + + /// + /// Indicates that the token type is the comment string. + /// Comment, } } diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonIgnoreAttribute.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonIgnoreAttribute.cs index 8644189a1313..26fac42a90d5 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonIgnoreAttribute.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonIgnoreAttribute.cs @@ -10,6 +10,9 @@ namespace System.Text.Json.Serialization [AttributeUsage(AttributeTargets.Property, AllowMultiple = false)] public sealed class JsonIgnoreAttribute : JsonAttribute { + /// + /// Initializes a new instance of . + /// public JsonIgnoreAttribute() { } } } diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonNamingPolicy.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonNamingPolicy.cs index 32c4ffbc3de4..ef1b426d2b7e 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonNamingPolicy.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonNamingPolicy.cs @@ -9,6 +9,9 @@ namespace System.Text.Json.Serialization /// public abstract class JsonNamingPolicy { + /// + /// Initializes a new instance of . + /// protected JsonNamingPolicy() { } /// From 0110344cd384bcfaffed2385cd9df87d956bd68b Mon Sep 17 00:00:00 2001 From: Ahson Khan Date: Wed, 29 May 2019 20:28:27 -0700 Subject: [PATCH 556/607] Remove source package related comments on internal APIs and csproj/props file. (#38004) * Remove source package related xml comments on internal APIs. * Update comments in csproj and related files to remove source package. * Add some more json reader tests around different json numbers. --- .../src/System.Text.Json.csproj | 3 +- .../Text/Json/Document/JsonDocument.DbRow.cs | 3 - .../Document/JsonDocument.TryGetProperty.cs | 6 -- .../System/Text/Json/Document/JsonDocument.cs | 69 ------------------- .../Document/JsonElement.ArrayEnumerator.cs | 3 - .../Document/JsonElement.ObjectEnumerator.cs | 3 - .../System/Text/Json/Document/JsonElement.cs | 9 --- .../System/Text/Json/Document/JsonProperty.cs | 3 - .../Serialization/PooledByteBufferWriter.cs | 3 - .../tests/Configurations.props | 2 - .../tests/Utf8JsonReaderTests.cs | 15 ++++ 11 files changed, 16 insertions(+), 103 deletions(-) diff --git a/src/System.Text.Json/src/System.Text.Json.csproj b/src/System.Text.Json/src/System.Text.Json.csproj index 759e04270890..5bfb8e61a18e 100644 --- a/src/System.Text.Json/src/System.Text.Json.csproj +++ b/src/System.Text.Json/src/System.Text.Json.csproj @@ -6,8 +6,7 @@ $(OutputPath)$(MSBuildProjectName).xml netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release - - + $(DefineConstants);BUILDING_INBOX_LIBRARY diff --git a/src/System.Text.Json/src/System/Text/Json/Document/JsonDocument.DbRow.cs b/src/System.Text.Json/src/System/Text/Json/Document/JsonDocument.DbRow.cs index 9fe3b6d9ce4f..78fb28de15aa 100644 --- a/src/System.Text.Json/src/System/Text/Json/Document/JsonDocument.DbRow.cs +++ b/src/System.Text.Json/src/System/Text/Json/Document/JsonDocument.DbRow.cs @@ -9,9 +9,6 @@ namespace System.Text.Json { public sealed partial class JsonDocument { - /// - /// This is an implementation detail and MUST NOT be used by source-package consumers. - /// [StructLayout(LayoutKind.Sequential)] internal struct DbRow { diff --git a/src/System.Text.Json/src/System/Text/Json/Document/JsonDocument.TryGetProperty.cs b/src/System.Text.Json/src/System/Text/Json/Document/JsonDocument.TryGetProperty.cs index 8e63978a1f9f..54ebb1c6b62e 100644 --- a/src/System.Text.Json/src/System/Text/Json/Document/JsonDocument.TryGetProperty.cs +++ b/src/System.Text.Json/src/System/Text/Json/Document/JsonDocument.TryGetProperty.cs @@ -9,9 +9,6 @@ namespace System.Text.Json { public sealed partial class JsonDocument { - /// - /// This is an implementation detail and MUST NOT be called by source-package consumers. - /// internal bool TryGetNamedPropertyValue(int index, ReadOnlySpan propertyName, out JsonElement value) { CheckNotDisposed(); @@ -112,9 +109,6 @@ internal bool TryGetNamedPropertyValue(int index, ReadOnlySpan propertyNam return false; } - /// - /// This is an implementation detail and MUST NOT be called by source-package consumers. - /// internal bool TryGetNamedPropertyValue(int index, ReadOnlySpan propertyName, out JsonElement value) { CheckNotDisposed(); diff --git a/src/System.Text.Json/src/System/Text/Json/Document/JsonDocument.cs b/src/System.Text.Json/src/System/Text/Json/Document/JsonDocument.cs index 2cdef24444b7..1d4e447fb496 100644 --- a/src/System.Text.Json/src/System/Text/Json/Document/JsonDocument.cs +++ b/src/System.Text.Json/src/System/Text/Json/Document/JsonDocument.cs @@ -27,9 +27,6 @@ public sealed partial class JsonDocument : IDisposable private byte[] _extraRentedBytes; private (int, string) _lastIndexAndString = (-1, null); - /// - /// This is an implementation detail and MUST NOT be called by source-package consumers. - /// internal bool IsDisposable { get; } /// @@ -77,9 +74,6 @@ public void Dispose() } } - /// - /// This is an implementation detail and MUST NOT be called by source-package consumers. - /// internal JsonTokenType GetJsonTokenType(int index) { CheckNotDisposed(); @@ -87,9 +81,6 @@ internal JsonTokenType GetJsonTokenType(int index) return _parsedData.GetJsonTokenType(index); } - /// - /// This is an implementation detail and MUST NOT be called by source-package consumers. - /// internal int GetArrayLength(int index) { CheckNotDisposed(); @@ -101,9 +92,6 @@ internal int GetArrayLength(int index) return row.SizeOrLength; } - /// - /// This is an implementation detail and MUST NOT be called by source-package consumers. - /// internal JsonElement GetArrayIndexElement(int currentIndex, int arrayIndex) { CheckNotDisposed(); @@ -152,9 +140,6 @@ internal JsonElement GetArrayIndexElement(int currentIndex, int arrayIndex) throw new IndexOutOfRangeException(); } - /// - /// This is an implementation detail and MUST NOT be called by source-package consumers. - /// internal int GetEndIndex(int index, bool includeEndElement) { CheckNotDisposed(); @@ -233,9 +218,6 @@ private ReadOnlyMemory GetPropertyRawValue(int valueIndex) return _utf8Json.Slice(start, end - start); } - /// - /// This is an implementation detail and MUST NOT be called by source-package consumers. - /// internal string GetString(int index, JsonTokenType expectedType) { CheckNotDisposed(); @@ -275,18 +257,12 @@ internal string GetString(int index, JsonTokenType expectedType) return lastString; } - /// - /// This is an implementation detail and MUST NOT be called by source-package consumers. - /// internal string GetNameOfPropertyValue(int index) { // The property name is one row before the property value return GetString(index - DbRow.Size, JsonTokenType.PropertyName); } - /// - /// This is an implementation detail and MUST NOT be called by source-package consumers. - /// internal bool TryGetValue(int index, out int value) { CheckNotDisposed(); @@ -309,9 +285,6 @@ internal bool TryGetValue(int index, out int value) return false; } - /// - /// This is an implementation detail and MUST NOT be called by source-package consumers. - /// internal bool TryGetValue(int index, out uint value) { CheckNotDisposed(); @@ -334,9 +307,6 @@ internal bool TryGetValue(int index, out uint value) return false; } - /// - /// This is an implementation detail and MUST NOT be called by source-package consumers. - /// internal bool TryGetValue(int index, out long value) { CheckNotDisposed(); @@ -359,9 +329,6 @@ internal bool TryGetValue(int index, out long value) return false; } - /// - /// This is an implementation detail and MUST NOT be called by source-package consumers. - /// internal bool TryGetValue(int index, out ulong value) { CheckNotDisposed(); @@ -384,9 +351,6 @@ internal bool TryGetValue(int index, out ulong value) return false; } - /// - /// This is an implementation detail and MUST NOT be called by source-package consumers. - /// internal bool TryGetValue(int index, out double value) { CheckNotDisposed(); @@ -411,9 +375,6 @@ internal bool TryGetValue(int index, out double value) return false; } - /// - /// This is an implementation detail and MUST NOT be called by source-package consumers. - /// internal bool TryGetValue(int index, out float value) { CheckNotDisposed(); @@ -438,9 +399,6 @@ internal bool TryGetValue(int index, out float value) return false; } - /// - /// This is an implementation detail and MUST NOT be called by source-package consumers. - /// internal bool TryGetValue(int index, out decimal value) { CheckNotDisposed(); @@ -465,9 +423,6 @@ internal bool TryGetValue(int index, out decimal value) return false; } - /// - /// This is an implementation detail and MUST NOT be called by source-package consumers. - /// internal bool TryGetValue(int index, out DateTime value) { CheckNotDisposed(); @@ -499,9 +454,6 @@ internal bool TryGetValue(int index, out DateTime value) && segment.Length == bytesConsumed; } - /// - /// This is an implementation detail and MUST NOT be called by source-package consumers. - /// internal bool TryGetValue(int index, out DateTimeOffset value) { CheckNotDisposed(); @@ -533,9 +485,6 @@ internal bool TryGetValue(int index, out DateTimeOffset value) && segment.Length == bytesConsumed; } - /// - /// This is an implementation detail and MUST NOT be called by source-package consumers. - /// internal bool TryGetValue(int index, out Guid value) { CheckNotDisposed(); @@ -565,27 +514,18 @@ internal bool TryGetValue(int index, out Guid value) return (segment.Length == JsonConstants.MaximumFormatGuidLength) && Utf8Parser.TryParse(segment, out value, out _, 'D'); } - /// - /// This is an implementation detail and MUST NOT be called by source-package consumers. - /// internal string GetRawValueAsString(int index) { ReadOnlyMemory segment = GetRawValue(index, includeQuotes: true); return JsonReaderHelper.TranscodeHelper(segment.Span); } - /// - /// This is an implementation detail and MUST NOT be called by source-package consumers. - /// internal string GetPropertyRawValueAsString(int valueIndex) { ReadOnlyMemory segment = GetPropertyRawValue(valueIndex); return JsonReaderHelper.TranscodeHelper(segment.Span); } - /// - /// This is an implementation detail and MUST NOT be called by source-package consumers. - /// internal JsonElement CloneElement(int index) { int endIndex = GetEndIndex(index, true); @@ -598,9 +538,6 @@ internal JsonElement CloneElement(int index) return newDocument.RootElement; } - /// - /// This is an implementation detail and MUST NOT be called by source-package consumers. - /// internal void WriteElementTo( int index, Utf8JsonWriter writer, @@ -642,9 +579,6 @@ internal void WriteElementTo( Debug.Fail($"Unexpected encounter with JsonTokenType {row.TokenType}"); } - /// - /// This is an implementation detail and MUST NOT be called by source-package consumers. - /// internal void WriteElementTo( int index, Utf8JsonWriter writer, @@ -686,9 +620,6 @@ internal void WriteElementTo( Debug.Fail($"Unexpected encounter with JsonTokenType {row.TokenType}"); } - /// - /// This is an implementation detail and MUST NOT be called by source-package consumers. - /// internal void WriteElementTo( int index, Utf8JsonWriter writer) diff --git a/src/System.Text.Json/src/System/Text/Json/Document/JsonElement.ArrayEnumerator.cs b/src/System.Text.Json/src/System/Text/Json/Document/JsonElement.ArrayEnumerator.cs index 06845bd2d756..53dda7977290 100644 --- a/src/System.Text.Json/src/System/Text/Json/Document/JsonElement.ArrayEnumerator.cs +++ b/src/System.Text.Json/src/System/Text/Json/Document/JsonElement.ArrayEnumerator.cs @@ -19,9 +19,6 @@ public struct ArrayEnumerator : IEnumerable, IEnumerator - /// This is an implementation detail and MUST NOT be called by source-package consumers. - /// internal ArrayEnumerator(JsonElement target) { Debug.Assert(target.TokenType == JsonTokenType.StartArray); diff --git a/src/System.Text.Json/src/System/Text/Json/Document/JsonElement.ObjectEnumerator.cs b/src/System.Text.Json/src/System/Text/Json/Document/JsonElement.ObjectEnumerator.cs index 8cad26d29f7e..2b6bcbe519d7 100644 --- a/src/System.Text.Json/src/System/Text/Json/Document/JsonElement.ObjectEnumerator.cs +++ b/src/System.Text.Json/src/System/Text/Json/Document/JsonElement.ObjectEnumerator.cs @@ -19,9 +19,6 @@ public struct ObjectEnumerator : IEnumerable, IEnumerator - /// This is an implementation detail and MUST NOT be called by source-package consumers. - /// internal ObjectEnumerator(JsonElement target) { Debug.Assert(target.TokenType == JsonTokenType.StartObject); diff --git a/src/System.Text.Json/src/System/Text/Json/Document/JsonElement.cs b/src/System.Text.Json/src/System/Text/Json/Document/JsonElement.cs index 6dbebf852078..34be938ad06e 100644 --- a/src/System.Text.Json/src/System/Text/Json/Document/JsonElement.cs +++ b/src/System.Text.Json/src/System/Text/Json/Document/JsonElement.cs @@ -15,9 +15,6 @@ public readonly partial struct JsonElement private readonly JsonDocument _parent; private readonly int _idx; - /// - /// This is an implementation detail and MUST NOT be called by source-package consumers. - /// internal JsonElement(JsonDocument parent, int idx) { // parent is usually not null, but the Current property @@ -893,9 +890,6 @@ public Guid GetGuid() throw new FormatException(); } - /// - /// This is an implementation detail and MUST NOT be called by source-package consumers. - /// internal string GetPropertyName() { CheckValidInstance(); @@ -919,9 +913,6 @@ public string GetRawText() return _parent.GetRawValueAsString(_idx); } - /// - /// This is an implementation detail and MUST NOT be called by source-package consumers. - /// internal string GetPropertyRawText() { CheckValidInstance(); diff --git a/src/System.Text.Json/src/System/Text/Json/Document/JsonProperty.cs b/src/System.Text.Json/src/System/Text/Json/Document/JsonProperty.cs index f4d5bb200733..04ada6d5d20e 100644 --- a/src/System.Text.Json/src/System/Text/Json/Document/JsonProperty.cs +++ b/src/System.Text.Json/src/System/Text/Json/Document/JsonProperty.cs @@ -14,9 +14,6 @@ public readonly struct JsonProperty /// public JsonElement Value { get; } - /// - /// This is an implementation detail and MUST NOT be called by source-package consumers. - /// internal JsonProperty(JsonElement value) { Value = value; diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/PooledByteBufferWriter.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/PooledByteBufferWriter.cs index 37d6cfbb33c1..de96edbb3855 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/PooledByteBufferWriter.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/PooledByteBufferWriter.cs @@ -10,9 +10,6 @@ namespace System.Text.Json.Serialization { - /// - /// This is an implementation detail and MUST NOT be called by source-package consumers. - /// internal sealed class PooledByteBufferWriter : IBufferWriter, IDisposable { private byte[] _rentedBuffer; diff --git a/src/System.Text.Json/tests/Configurations.props b/src/System.Text.Json/tests/Configurations.props index 5085e7e5390f..4e89c411e22d 100644 --- a/src/System.Text.Json/tests/Configurations.props +++ b/src/System.Text.Json/tests/Configurations.props @@ -3,8 +3,6 @@ netcoreapp; uap-Windows_NT; - - netstandard; diff --git a/src/System.Text.Json/tests/Utf8JsonReaderTests.cs b/src/System.Text.Json/tests/Utf8JsonReaderTests.cs index 36c8d3ae45b9..2526085cf882 100644 --- a/src/System.Text.Json/tests/Utf8JsonReaderTests.cs +++ b/src/System.Text.Json/tests/Utf8JsonReaderTests.cs @@ -3876,6 +3876,9 @@ public static IEnumerable SingleJsonTokenStartIndex new object[] {"{}", 0}, new object[] {"12345", 0}, new object[] {"1", 0}, + new object[] {"-0", 0}, + new object[] {"0.0e-0", 0}, + new object[] {"0.0e+0", 0}, new object[] {"true", 0}, new object[] {"false", 0}, new object[] {"null", 0}, @@ -3886,6 +3889,9 @@ public static IEnumerable SingleJsonTokenStartIndex new object[] {" {}", 2}, new object[] {" 12345", 2}, new object[] {" 1", 2}, + new object[] {" -0", 2}, + new object[] {" 0.0e-0", 2}, + new object[] {" 0.0e+0", 2}, new object[] {" true", 2}, new object[] {" false", 2}, new object[] {" null", 2}, @@ -3896,6 +3902,9 @@ public static IEnumerable SingleJsonTokenStartIndex new object[] {" {} ", 2}, new object[] {" 12345 ", 2}, new object[] {" 1 ", 2}, + new object[] {" -0 ", 2}, + new object[] {" 0.0e-0 ", 2}, + new object[] {" 0.0e+0 ", 2}, new object[] {" true ", 2}, new object[] {" false ", 2}, new object[] {" null ", 2}, @@ -4138,11 +4147,17 @@ public static IEnumerable InvalidJsonStrings new object[] {"\"\\u12$3\"", 0, 5}, new object[] {"\"\\u12\"", 0, 5}, new object[] {"\"\\u120\"", 0, 6}, + new object[] {"+0", 0, 0}, + new object[] {"+1", 0, 0}, + new object[] {"0e", 0, 2}, + new object[] {"0.", 0, 2}, + new object[] {"0.1e", 0, 4}, new object[] {"01", 0, 1}, new object[] {"1a", 0, 1}, new object[] {"-01", 0, 2}, new object[] {"10.5e", 0, 5}, new object[] {"10.5e-", 0, 6}, + new object[] {"10.5e+", 0, 6}, new object[] {"10.5e-0.2", 0, 7}, new object[] {"{\"age\":30, \"ints\":[1, 2, 3, 4, 5.1e7.3]}", 0, 36}, new object[] {"{\"age\":30, \r\n \"num\":-0.e, \r\n \"ints\":[1, 2, 3, 4, 5]}", 1, 10}, From e23119d577e644d2c2a25419c88c1181681358e0 Mon Sep 17 00:00:00 2001 From: Liudmila Molkova Date: Wed, 29 May 2019 20:37:52 -0700 Subject: [PATCH 557/607] HttpCorrelationProtocol docs update: Add notice about W3C trace-context and deprecate flat-id spec (#38025) * Update HttpCorrelationProtocol.md --- .../src/FlatRequestId.md | 7 +++++++ .../src/HttpCorrelationProtocol.md | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/src/System.Diagnostics.DiagnosticSource/src/FlatRequestId.md b/src/System.Diagnostics.DiagnosticSource/src/FlatRequestId.md index 31683b679abe..1f8165a8f93b 100644 --- a/src/System.Diagnostics.DiagnosticSource/src/FlatRequestId.md +++ b/src/System.Diagnostics.DiagnosticSource/src/FlatRequestId.md @@ -1,3 +1,10 @@ +# Note +Starting with System.Diagnostics.DiagnosticSource 4.6.0 (that ships with .Net Core 3.0), we are moving towards [W3C Trace-Context](https://www.w3.org/TR/trace-context/) standard. We still support Request-Id ([hierarchical](HierarchicalRequestId.md) version) and it is still the default format for `System.Diagnostics.Activity`. + +This specification for `Flat Request-Id` is **deprecated**. + +There is no corresponding implementation in .NET and if you are looking into 'flat' correlation protocol - we recommend following [W3C Trace-Context](https://www.w3.org/TR/trace-context/). + # Flat Request-Ids This document provide guidance for implementations of [HTTP Correlation Protocol](HttpCorrelationProtocol.md) without [Hierarchical Request-Id](HierarchicalRequestId.md) support or interoperability with services that do not support it. diff --git a/src/System.Diagnostics.DiagnosticSource/src/HttpCorrelationProtocol.md b/src/System.Diagnostics.DiagnosticSource/src/HttpCorrelationProtocol.md index 498209b5e4d4..5c2898ef8f2f 100644 --- a/src/System.Diagnostics.DiagnosticSource/src/HttpCorrelationProtocol.md +++ b/src/System.Diagnostics.DiagnosticSource/src/HttpCorrelationProtocol.md @@ -1,4 +1,11 @@ + +# Note +Starting with System.Diagnostics.DiagnosticSource 4.6.0 (that ships with .Net Core 3.0), we are moving towards [W3C Trace-Context](https://www.w3.org/TR/trace-context/) standard. We still support Request-Id ([hierarchical](HierarchicalRequestId.md) version) and it is still the default format for `System.Diagnostics.Activity`. + +[Flat Request-Id](FlatRequestId.md) is **deprecated**. + # Overview + One of the common problems in microservices development is ability to trace request flow from client (application, browser) through all the services involved in processing. Typical scenarios include: From f121f062a25796292eaf4da8074e8b4c3dda55ee Mon Sep 17 00:00:00 2001 From: dotnet-maestro-bot Date: Thu, 30 May 2019 04:09:22 -0700 Subject: [PATCH 558/607] Update ProjectNTfs to beta-27730-00 (#38045) --- eng/dependencies.props | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/dependencies.props b/eng/dependencies.props index 0efc3e7b28c6..9b10f6fe115f 100644 --- a/eng/dependencies.props +++ b/eng/dependencies.props @@ -9,12 +9,12 @@ These ref versions are pulled from https://github.com/dotnet/versions. --> - 5a7a120802218de7300ba74a722c2e0c3fd77cae + b8dbc7ec61eb189d3da9dbb643b59572dd501604 - beta-27729-00 + beta-27730-00 From 23cd3cfb15908c21557cfa0a3f17e7c6a32d9f35 Mon Sep 17 00:00:00 2001 From: Stephen Toub Date: Tue, 28 May 2019 06:04:13 -0400 Subject: [PATCH 559/607] Add and apply nullable attributes (dotnet/coreclr#24679) * Add and apply nullable attributes * Adapt to API review decisions * Address PR feedback Signed-off-by: dotnet-bot --- .../src/CoreLib/Internal/Win32/RegistryKey.cs | 12 +- .../CoreLib/Interop/Unix/Interop.Errors.cs | 2 - .../Unix/System.Native/Interop.MountPoints.cs | 4 +- .../Windows/Kernel32/Interop.CreateFile.cs | 6 +- .../Windows/Kernel32/Interop.CreateFile2.cs | 5 +- .../Kernel32/Interop.FindFirstFileEx.cs | 5 +- .../Kernel32/Interop.GetFileAttributesEx.cs | 5 +- .../System.Private.CoreLib.Shared.projitems | 1 + src/Common/src/CoreLib/System/AppContext.cs | 2 +- src/Common/src/CoreLib/System/AppDomain.cs | 4 +- src/Common/src/CoreLib/System/Array.cs | 139 +++++++++--------- src/Common/src/CoreLib/System/ArraySegment.cs | 4 +- src/Common/src/CoreLib/System/BitConverter.cs | 16 +- .../src/CoreLib/System/CharEnumerator.cs | 2 +- .../CoreLib/System/Collections/ArrayList.cs | 8 +- .../Collections/Concurrent/ConcurrentQueue.cs | 21 +-- .../Concurrent/ConcurrentQueueSegment.cs | 15 +- .../Concurrent/IProducerConsumerCollection.cs | 3 +- .../Collections/Generic/ArraySortHelper.cs | 3 +- .../System/Collections/Generic/Comparer.cs | 7 +- .../System/Collections/Generic/Dictionary.cs | 105 ++++++------- .../Collections/Generic/EqualityComparer.cs | 15 +- .../System/Collections/Generic/IComparer.cs | 3 +- .../System/Collections/Generic/IDictionary.cs | 3 +- .../Collections/Generic/IEqualityComparer.cs | 6 +- .../Generic/IReadOnlyDictionary.cs | 4 +- .../System/Collections/Generic/List.cs | 41 +++--- .../NonRandomizedStringEqualityComparer.cs | 2 - .../HashHelpers.SerializationInfoTable.cs | 2 +- .../CoreLib/System/Collections/IDictionary.cs | 24 +-- .../Collections/ListDictionaryInternal.cs | 2 +- .../Collections/ObjectModel/Collection.cs | 22 +-- .../ObjectModel/ReadOnlyCollection.cs | 10 +- src/Common/src/CoreLib/System/Convert.cs | 21 ++- .../src/CoreLib/System/DateTimeOffset.cs | 4 +- .../src/CoreLib/System/DefaultBinder.cs | 6 +- src/Common/src/CoreLib/System/Delegate.cs | 7 +- .../CodeAnalysis/NullableAttributes.cs | 83 +++++++++++ .../System/Diagnostics/Contracts/Contracts.cs | 9 +- .../src/CoreLib/System/Diagnostics/Debug.cs | 12 +- .../System/Diagnostics/DebugProvider.cs | 2 +- .../CoreLib/System/Diagnostics/StackTrace.cs | 2 +- .../Diagnostics/Tracing/DiagnosticCounter.cs | 2 +- .../Diagnostics/Tracing/EventProvider.cs | 4 +- .../System/Diagnostics/Tracing/EventSource.cs | 46 +++--- .../Tracing/TraceLogging/ConcurrentSet.cs | 2 +- .../Tracing/TraceLogging/EventPayload.cs | 5 +- .../Tracing/TraceLogging/PropertyValue.cs | 40 ++--- .../Tracing/TraceLogging/Statics.cs | 17 ++- .../Tracing/TraceLogging/TypeAnalysis.cs | 2 +- src/Common/src/CoreLib/System/Enum.cs | 5 +- .../src/CoreLib/System/Environment.Unix.cs | 4 +- .../src/CoreLib/System/Environment.Win32.cs | 2 +- src/Common/src/CoreLib/System/Environment.cs | 6 +- .../System/Globalization/CalendarData.Unix.cs | 3 +- .../Globalization/CalendarData.Windows.cs | 8 +- .../System/Globalization/CalendarData.cs | 4 - .../System/Globalization/CompareInfo.cs | 4 +- .../Globalization/CultureData.Windows.cs | 6 +- .../System/Globalization/CultureData.cs | 4 +- .../System/Globalization/DateTimeParse.cs | 2 +- .../Globalization/IdnMapping.Windows.cs | 2 + .../Globalization/JapaneseCalendar.Win32.cs | 4 +- .../JapaneseLunisolarCalendar.cs | 2 +- .../System/Globalization/SortVersion.cs | 2 + .../Globalization/TextElementEnumerator.cs | 4 +- .../System/Globalization/TimeSpanParse.cs | 2 +- src/Common/src/CoreLib/System/IComparable.cs | 4 +- src/Common/src/CoreLib/System/IEquatable.cs | 4 +- .../src/CoreLib/System/IO/FileStream.Unix.cs | 8 +- .../CoreLib/System/IO/FileStream.Windows.cs | 2 +- .../src/CoreLib/System/IO/MemoryStream.cs | 4 +- src/Common/src/CoreLib/System/IO/Path.cs | 13 +- .../CoreLib/System/IO/PathInternal.Windows.cs | 2 + src/Common/src/CoreLib/System/IO/Stream.cs | 16 +- .../src/CoreLib/System/IO/StreamReader.cs | 1 + .../src/CoreLib/System/IO/StreamWriter.cs | 2 + .../src/CoreLib/System/IO/TextReader.cs | 12 +- .../src/CoreLib/System/IO/TextWriter.cs | 29 ++-- .../System/IO/UnmanagedMemoryStream.cs | 4 +- src/Common/src/CoreLib/System/Lazy.cs | 7 +- src/Common/src/CoreLib/System/Math.cs | 3 + src/Common/src/CoreLib/System/Memory.cs | 6 +- .../CoreLib/System/MemoryExtensions.Fast.cs | 10 +- .../src/CoreLib/System/Number.Parsing.cs | 3 + .../src/CoreLib/System/Numerics/Vector.cs | 2 + .../src/CoreLib/System/Numerics/Vector.tt | 1 + .../System/Reflection/SignatureType.cs | 6 +- .../System/Resources/FastResourceComparer.cs | 8 +- .../System/Resources/ResourceManager.cs | 4 +- .../System/Resources/ResourceReader.Core.cs | 2 + .../System/Resources/ResourceReader.cs | 24 +-- .../CoreLib/System/Resources/ResourceSet.cs | 6 +- .../System/Resources/RuntimeResourceSet.cs | 4 +- .../CompilerServices/AsyncMethodBuilder.cs | 35 ++--- .../CompilerServices/ConditionalWeakTable.cs | 13 +- .../DateTimeConstantAttribute.cs | 4 +- .../Runtime/CompilerServices/ICastable.cs | 4 +- .../CompilerServices/RuntimeHelpers.cs | 4 +- .../Runtime/CompilerServices/StrongBox.cs | 6 +- .../CompilerServices/YieldAwaitable.cs | 4 +- .../ExceptionDispatchInfo.cs | 3 + .../Runtime/InteropServices/Marshal.NoCom.cs | 16 +- .../Runtime/InteropServices/Marshal.Unix.cs | 2 - .../InteropServices/Marshal.Windows.cs | 2 - .../System/Runtime/InteropServices/Marshal.cs | 17 +-- .../Runtime/InteropServices/MemoryMarshal.cs | 11 +- .../Runtime/InteropServices/NativeLibrary.cs | 2 +- .../Runtime/Loader/AssemblyLoadContext.cs | 8 +- .../Serialization/SerializationInfo.cs | 56 +++---- .../SerializationInfoEnumerator.cs | 2 +- src/Common/src/CoreLib/System/Span.Fast.cs | 4 +- .../src/CoreLib/System/SpanHelpers.T.cs | 14 +- .../src/CoreLib/System/String.Comparison.cs | 4 + .../src/CoreLib/System/String.Searching.cs | 2 +- src/Common/src/CoreLib/System/String.cs | 8 +- .../src/CoreLib/System/StringComparer.cs | 20 +-- .../System/Text/DecoderBestFitFallback.cs | 2 +- .../System/Text/DecoderExceptionFallback.cs | 2 + .../CoreLib/System/Text/DecoderFallback.cs | 6 +- .../src/CoreLib/System/Text/DecoderNLS.cs | 1 - .../System/Text/DecoderReplacementFallback.cs | 1 - .../System/Text/EncoderBestFitFallback.cs | 2 +- .../CoreLib/System/Text/EncoderFallback.cs | 6 +- .../System/Text/EncoderReplacementFallback.cs | 1 - .../src/CoreLib/System/Text/Encoding.cs | 5 + .../src/CoreLib/System/Text/EncodingData.cs | 1 - .../src/CoreLib/System/Text/EncodingTable.cs | 2 +- .../src/CoreLib/System/Text/StringBuilder.cs | 10 +- .../System/Text/StringRuneEnumerator.cs | 2 +- .../src/CoreLib/System/Text/UTF32Encoding.cs | 2 +- .../src/CoreLib/System/Text/UTF8Encoding.cs | 20 +-- .../System/Text/Unicode/Utf8Utility.cs | 2 + .../CoreLib/System/Text/UnicodeEncoding.cs | 4 +- .../CoreLib/System/Text/ValueStringBuilder.cs | 2 - .../CoreLib/System/Threading/AsyncLocal.cs | 14 +- .../System/Threading/CancellationToken.cs | 2 + .../Threading/CancellationTokenSource.cs | 6 +- .../Threading/EventWaitHandle.Windows.cs | 4 +- .../System/Threading/EventWaitHandle.cs | 3 +- .../System/Threading/ExecutionContext.cs | 14 +- .../System/Threading/LazyInitializer.cs | 27 ++-- .../CoreLib/System/Threading/Mutex.Windows.cs | 2 +- .../src/CoreLib/System/Threading/Mutex.cs | 7 +- .../System/Threading/ReaderWriterLockSlim.cs | 27 ++-- .../src/CoreLib/System/Threading/Semaphore.cs | 3 +- .../Tasks/ConcurrentExclusiveSchedulerPair.cs | 10 +- .../CoreLib/System/Threading/Tasks/Future.cs | 50 ++++--- .../System/Threading/Tasks/FutureFactory.cs | 91 ++++++------ .../Threading/Tasks/ProducerConsumerQueues.cs | 15 +- .../Tasks/Sources/IValueTaskSource.cs | 4 +- .../Sources/ManualResetValueTaskSourceCore.cs | 11 +- .../CoreLib/System/Threading/Tasks/Task.cs | 96 ++++++------ .../Threading/Tasks/TaskCompletionSource.cs | 8 +- .../Threading/Tasks/TaskContinuation.cs | 2 +- .../System/Threading/Tasks/TaskFactory.cs | 16 +- .../System/Threading/Tasks/TaskScheduler.cs | 2 +- .../System/Threading/Tasks/ValueTask.cs | 7 +- .../src/CoreLib/System/Threading/Thread.cs | 8 +- .../CoreLib/System/Threading/ThreadLocal.cs | 16 +- .../src/CoreLib/System/Threading/Timer.cs | 2 +- .../src/CoreLib/System/Threading/Volatile.cs | 4 +- .../CoreLib/System/Threading/WaitHandle.cs | 6 +- src/Common/src/CoreLib/System/ThrowHelper.cs | 56 ++++++- src/Common/src/CoreLib/System/TimeZone.cs | 2 +- .../System/TimeZoneInfo.AdjustmentRule.cs | 4 +- .../src/CoreLib/System/TimeZoneInfo.Unix.cs | 14 +- .../src/CoreLib/System/TimeZoneInfo.Win32.cs | 10 +- src/Common/src/CoreLib/System/TimeZoneInfo.cs | 13 +- src/Common/src/CoreLib/System/Tuple.cs | 38 ++--- src/Common/src/CoreLib/System/Type.Helpers.cs | 14 +- src/Common/src/CoreLib/System/ValueTuple.cs | 32 ++-- src/Common/src/CoreLib/System/Version.cs | 9 +- .../src/CoreLib/System/WinRTFolderPaths.cs | 2 +- 174 files changed, 1121 insertions(+), 860 deletions(-) create mode 100644 src/Common/src/CoreLib/System/Diagnostics/CodeAnalysis/NullableAttributes.cs diff --git a/src/Common/src/CoreLib/Internal/Win32/RegistryKey.cs b/src/Common/src/CoreLib/Internal/Win32/RegistryKey.cs index 6ea8cf9554cb..912ddceef3e8 100644 --- a/src/Common/src/CoreLib/Internal/Win32/RegistryKey.cs +++ b/src/Common/src/CoreLib/Internal/Win32/RegistryKey.cs @@ -6,6 +6,7 @@ using System.Buffers; using System.Collections.Generic; using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.IO; using System.Security; @@ -219,7 +220,8 @@ public unsafe string[] GetValueNames() return GetValue(name, null); } - public object? GetValue(string name, object? defaultValue) // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + [return: NotNullIfNotNull("defaultValue")] + public object? GetValue(string name, object? defaultValue) { object? data = defaultValue; int type = 0; @@ -369,7 +371,7 @@ public unsafe string[] GetValueNames() // make sure the string is null terminated before processing the data if (blob.Length > 0 && blob[blob.Length - 1] != (char)0) { - Array.Resize(ref blob!, blob.Length + 1); // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + Array.Resize(ref blob!, blob.Length + 1); // TODO-NULLABLE: Remove ! when nullable attributes are respected } string[] strings = Array.Empty(); @@ -414,13 +416,13 @@ public unsafe string[] GetValueNames() { if (strings.Length == stringsCount) { - Array.Resize(ref strings!, stringsCount > 0 ? stringsCount * 2 : 4); // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + Array.Resize(ref strings!, stringsCount > 0 ? stringsCount * 2 : 4); // TODO-NULLABLE: Remove ! when nullable attributes are respected } - strings![stringsCount++] = toAdd; // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + strings![stringsCount++] = toAdd; // TODO-NULLABLE: Remove ! when nullable attributes are respected } } - Array.Resize(ref strings!, stringsCount); // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + Array.Resize(ref strings!, stringsCount); // TODO-NULLABLE: Remove ! when nullable attributes are respected data = strings; } break; diff --git a/src/Common/src/CoreLib/Interop/Unix/Interop.Errors.cs b/src/Common/src/CoreLib/Interop/Unix/Interop.Errors.cs index 30223299c171..2e597e7cae45 100644 --- a/src/Common/src/CoreLib/Interop/Unix/Interop.Errors.cs +++ b/src/Common/src/CoreLib/Interop/Unix/Interop.Errors.cs @@ -145,9 +145,7 @@ internal string GetErrorMessage() return Interop.Sys.StrError(RawErrno); } -#pragma warning disable CS8609 // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/23268 public override string ToString() -#pragma warning restore CS8609 { return $"RawErrno: {RawErrno} Error: {Error} GetErrorMessage: {GetErrorMessage()}"; // No localization required; text is member names used for debugging purposes } diff --git a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.MountPoints.cs b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.MountPoints.cs index 212d515e8369..a2fe2078b69b 100644 --- a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.MountPoints.cs +++ b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.MountPoints.cs @@ -27,13 +27,13 @@ internal static string[] GetAllMountPoints() { if (count == found.Length) { - Array.Resize(ref found!, count * 2); // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + Array.Resize(ref found!, count * 2); // TODO-NULLABLE: Remove ! when nullable attributes are respected } found[count++] = Marshal.PtrToStringAnsi((IntPtr)name)!; }); } - Array.Resize(ref found!, count); // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + Array.Resize(ref found!, count); // TODO-NULLABLE: Remove ! when nullable attributes are respected return found; } } diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.CreateFile.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.CreateFile.cs index d925be1c949a..de68a36cb997 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.CreateFile.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.CreateFile.cs @@ -4,7 +4,6 @@ using Microsoft.Win32.SafeHandles; using System; -using System.Diagnostics; using System.IO; using System.Runtime.InteropServices; @@ -34,9 +33,8 @@ internal static SafeFileHandle CreateFile( int dwFlagsAndAttributes, IntPtr hTemplateFile) { - string? lpFileNameWithPrefix = PathInternal.EnsureExtendedPrefixIfNeeded(lpFileName); - Debug.Assert(lpFileNameWithPrefix != null, "null not expected when non-null passed"); // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 - return CreateFilePrivate(lpFileNameWithPrefix, dwDesiredAccess, dwShareMode, ref securityAttrs, dwCreationDisposition, dwFlagsAndAttributes, hTemplateFile); + lpFileName = PathInternal.EnsureExtendedPrefixIfNeeded(lpFileName)!; // TODO-NULLABLE: Remove ! when nullable attributes are respected + return CreateFilePrivate(lpFileName, dwDesiredAccess, dwShareMode, ref securityAttrs, dwCreationDisposition, dwFlagsAndAttributes, hTemplateFile); } } } diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.CreateFile2.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.CreateFile2.cs index 886698255258..49e7485c00c8 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.CreateFile2.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.CreateFile2.cs @@ -26,9 +26,8 @@ internal static SafeFileHandle CreateFile2( FileMode dwCreationDisposition, ref Kernel32.CREATEFILE2_EXTENDED_PARAMETERS pCreateExParams) { - string? lpFileNameWithPrefix = PathInternal.EnsureExtendedPrefixIfNeeded(lpFileName); - Debug.Assert(lpFileNameWithPrefix != null, "null not expected when non-null passed"); // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 - return CreateFile2Private(lpFileNameWithPrefix, dwDesiredAccess, dwShareMode, dwCreationDisposition, ref pCreateExParams); + lpFileName = PathInternal.EnsureExtendedPrefixIfNeeded(lpFileName)!; // TODO-NULLABLE: Remove ! when nullable attributes are respected + return CreateFile2Private(lpFileName, dwDesiredAccess, dwShareMode, dwCreationDisposition, ref pCreateExParams); } } } diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.FindFirstFileEx.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.FindFirstFileEx.cs index 80fb2e7189fc..52dcd54c9e05 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.FindFirstFileEx.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.FindFirstFileEx.cs @@ -21,11 +21,10 @@ internal partial class Kernel32 internal static SafeFindHandle FindFirstFile(string fileName, ref WIN32_FIND_DATA data) { - string? fileNameWithPrefix = PathInternal.EnsureExtendedPrefixIfNeeded(fileName); - Debug.Assert(fileNameWithPrefix != null, "null not expected when non-null passed"); // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + fileName = PathInternal.EnsureExtendedPrefixIfNeeded(fileName)!; // TODO-NULLABLE: Remove ! when nullable attributes are respected // use FindExInfoBasic since we don't care about short name and it has better perf - return FindFirstFileExPrivate(fileNameWithPrefix, FINDEX_INFO_LEVELS.FindExInfoBasic, ref data, FINDEX_SEARCH_OPS.FindExSearchNameMatch, IntPtr.Zero, 0); + return FindFirstFileExPrivate(fileName, FINDEX_INFO_LEVELS.FindExInfoBasic, ref data, FINDEX_SEARCH_OPS.FindExSearchNameMatch, IntPtr.Zero, 0); } internal enum FINDEX_INFO_LEVELS : uint diff --git a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetFileAttributesEx.cs b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetFileAttributesEx.cs index b833e8b3a699..e3f18fe6c087 100644 --- a/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetFileAttributesEx.cs +++ b/src/Common/src/CoreLib/Interop/Windows/Kernel32/Interop.GetFileAttributesEx.cs @@ -21,9 +21,8 @@ internal partial class Kernel32 internal static bool GetFileAttributesEx(string name, GET_FILEEX_INFO_LEVELS fileInfoLevel, ref WIN32_FILE_ATTRIBUTE_DATA lpFileInformation) { - string? nameWithExtendedPrefix = PathInternal.EnsureExtendedPrefixIfNeeded(name); - Debug.Assert(nameWithExtendedPrefix != null, "null not expected when non-null is passed"); // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 - return GetFileAttributesExPrivate(nameWithExtendedPrefix, fileInfoLevel, ref lpFileInformation); + name = PathInternal.EnsureExtendedPrefixIfNeeded(name)!; // TODO-NULLABLE: Remove ! when nullable attributes are respected + return GetFileAttributesExPrivate(name, fileInfoLevel, ref lpFileInformation); } } } diff --git a/src/Common/src/CoreLib/System.Private.CoreLib.Shared.projitems b/src/Common/src/CoreLib/System.Private.CoreLib.Shared.projitems index 2edb4b357919..0b8bddea5f52 100644 --- a/src/Common/src/CoreLib/System.Private.CoreLib.Shared.projitems +++ b/src/Common/src/CoreLib/System.Private.CoreLib.Shared.projitems @@ -198,6 +198,7 @@ + diff --git a/src/Common/src/CoreLib/System/AppContext.cs b/src/Common/src/CoreLib/System/AppContext.cs index 15b735160c53..7f81a4346753 100644 --- a/src/Common/src/CoreLib/System/AppContext.cs +++ b/src/Common/src/CoreLib/System/AppContext.cs @@ -126,7 +126,7 @@ public static void SetSwitch(string switchName, bool isEnabled) Interlocked.CompareExchange(ref s_switches, new Dictionary(), null); } - lock (s_switches!) // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + lock (s_switches!) // TODO-NULLABLE: Remove ! when compiler specially-recognizes CompareExchange for nullability { s_switches[switchName] = isEnabled; } diff --git a/src/Common/src/CoreLib/System/AppDomain.cs b/src/Common/src/CoreLib/System/AppDomain.cs index 0884c61a40ee..2d8cd9c57680 100644 --- a/src/Common/src/CoreLib/System/AppDomain.cs +++ b/src/Common/src/CoreLib/System/AppDomain.cs @@ -409,7 +409,7 @@ public void SetThreadPrincipal(IPrincipal principal) (Func)mi.CreateDelegate(typeof(Func))); } - principal = s_getUnauthenticatedPrincipal!(); // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + principal = s_getUnauthenticatedPrincipal!(); // TODO-NULLABLE: Remove ! when nullable attributes are respected break; case PrincipalPolicy.WindowsPrincipal: @@ -425,7 +425,7 @@ public void SetThreadPrincipal(IPrincipal principal) (Func)mi.CreateDelegate(typeof(Func))); } - principal = s_getWindowsPrincipal!(); // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + principal = s_getWindowsPrincipal!(); // TODO-NULLABLE: Remove ! when nullable attributes are respected break; } } diff --git a/src/Common/src/CoreLib/System/Array.cs b/src/Common/src/CoreLib/System/Array.cs index 049385bd3d63..11479d88e28d 100644 --- a/src/Common/src/CoreLib/System/Array.cs +++ b/src/Common/src/CoreLib/System/Array.cs @@ -6,6 +6,7 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using Internal.Runtime.CompilerServices; @@ -36,10 +37,10 @@ public static ReadOnlyCollection AsReadOnly(T[] array) } // T[] implements IList. - return new ReadOnlyCollection(array!); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + return new ReadOnlyCollection(array!); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected } - public static void Resize(ref T[]? array, int newSize) // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + public static void Resize([NotNull] ref T[]? array, int newSize) { if (newSize < 0) ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.newSize, ExceptionResource.ArgumentOutOfRange_NeedNonNegNum); @@ -65,7 +66,7 @@ public static Array CreateInstance(Type elementType, params long[] lengths) { ThrowHelper.ThrowArgumentNullException(ExceptionArgument.lengths); } - if (lengths!.Length == 0) // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + if (lengths!.Length == 0) // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected ThrowHelper.ThrowArgumentException(ExceptionResource.Arg_NeedAtLeast1Rank); int[] intLengths = new int[lengths.Length]; @@ -149,7 +150,7 @@ public static void Copy(Array sourceArray, long sourceIndex, Array destinationAr { if (indices == null) ThrowHelper.ThrowArgumentNullException(ExceptionArgument.indices); - if (Rank != indices!.Length) // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + if (Rank != indices!.Length) // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected ThrowHelper.ThrowArgumentException(ExceptionResource.Arg_RankIndices); int[] intIndices = new int[indices.Length]; @@ -209,7 +210,7 @@ public void SetValue(object? value, params long[] indices) { if (indices == null) ThrowHelper.ThrowArgumentNullException(ExceptionArgument.indices); - if (Rank != indices!.Length) // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + if (Rank != indices!.Length) // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected ThrowHelper.ThrowArgumentException(ExceptionResource.Arg_RankIndices); int[] intIndices = new int[indices.Length]; @@ -324,7 +325,7 @@ int IStructuralComparable.CompareTo(object? other, IComparer comparer) int i = 0; int c = 0; - while (i < o!.Length && c == 0) // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + while (i < o!.Length && c == 0) // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected { object? left = GetValue(i); object? right = o.GetValue(i); @@ -383,7 +384,7 @@ int IStructuralEquatable.GetHashCode(IEqualityComparer comparer) for (int i = (this.Length >= 8 ? this.Length - 8 : 0); i < this.Length; i++) { - ret = CombineHashCodes(ret, comparer!.GetHashCode(GetValue(i)!)); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + ret = CombineHashCodes(ret, comparer!.GetHashCode(GetValue(i)!)); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected } return ret; @@ -406,7 +407,7 @@ public static int BinarySearch(Array array, object? value) { if (array == null) ThrowHelper.ThrowArgumentNullException(ExceptionArgument.array); - return BinarySearch(array!, array!.GetLowerBound(0), array.Length, value, null); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + return BinarySearch(array!, array!.GetLowerBound(0), array.Length, value, null); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected } // Searches a section of an array for a given element using a binary search @@ -445,7 +446,7 @@ public static int BinarySearch(Array array, object? value, IComparer? comparer) { if (array == null) ThrowHelper.ThrowArgumentNullException(ExceptionArgument.array); - return BinarySearch(array!, array!.GetLowerBound(0), array.Length, value, comparer); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + return BinarySearch(array!, array!.GetLowerBound(0), array.Length, value, comparer); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected } // Searches a section of an array for a given element using a binary search @@ -467,7 +468,7 @@ public static int BinarySearch(Array array, int index, int length, object? value { if (array == null) ThrowHelper.ThrowArgumentNullException(ExceptionArgument.array); - int lb = array!.GetLowerBound(0); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + int lb = array!.GetLowerBound(0); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected if (index < lb) ThrowHelper.ThrowIndexArgumentOutOfRange_NeedNonNegNumException(); if (length < 0) @@ -552,14 +553,14 @@ public static int BinarySearch(T[] array, T value) { if (array == null) ThrowHelper.ThrowArgumentNullException(ExceptionArgument.array); - return BinarySearch(array!, 0, array!.Length, value, null); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + return BinarySearch(array!, 0, array!.Length, value, null); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected } public static int BinarySearch(T[] array, T value, System.Collections.Generic.IComparer? comparer) { if (array == null) ThrowHelper.ThrowArgumentNullException(ExceptionArgument.array); - return BinarySearch(array!, 0, array!.Length, value, comparer); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + return BinarySearch(array!, 0, array!.Length, value, comparer); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected } public static int BinarySearch(T[] array, int index, int length, T value) @@ -576,7 +577,7 @@ public static int BinarySearch(T[] array, int index, int length, T value, Sys if (length < 0) ThrowHelper.ThrowLengthArgumentOutOfRange_ArgumentOutOfRange_NeedNonNegNum(); - if (array!.Length - index < length) // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + if (array!.Length - index < length) // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected ThrowHelper.ThrowArgumentException(ExceptionResource.Argument_InvalidOffLen); return ArraySortHelper.Default.BinarySearch(array, index, length, value, comparer); @@ -594,10 +595,10 @@ public static TOutput[] ConvertAll(TInput[] array, Converter(T[] array, T value) ThrowHelper.ThrowArgumentNullException(ExceptionArgument.array); } - for (int i = 0; i < array!.Length; i++) // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + for (int i = 0; i < array!.Length; i++) // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected { array[i] = value; } @@ -661,22 +662,23 @@ public static void Fill(T[] array, T value, int startIndex, int count) ThrowHelper.ThrowArgumentNullException(ExceptionArgument.array); } - if (startIndex < 0 || startIndex > array!.Length) // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + if (startIndex < 0 || startIndex > array!.Length) // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected { ThrowHelper.ThrowStartIndexArgumentOutOfRange_ArgumentOutOfRange_Index(); } - if (count < 0 || startIndex > array!.Length - count) // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + if (count < 0 || startIndex > array!.Length - count) // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected { ThrowHelper.ThrowCountArgumentOutOfRange_ArgumentOutOfRange_Count(); } for (int i = startIndex; i < startIndex + count; i++) { - array![i] = value; // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + array![i] = value; // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected } } + [return: MaybeNull] public static T Find(T[] array, Predicate match) { if (array == null) @@ -689,14 +691,14 @@ public static T Find(T[] array, Predicate match) ThrowHelper.ThrowArgumentNullException(ExceptionArgument.match); } - for (int i = 0; i < array!.Length; i++) // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + for (int i = 0; i < array!.Length; i++) // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected { - if (match!(array[i])) // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + if (match!(array[i])) // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected { return array[i]; } } - return default!; // TODO-NULLABLE-GENERIC + return default!; } public static T[] FindAll(T[] array, Predicate match) @@ -712,9 +714,9 @@ public static T[] FindAll(T[] array, Predicate match) } List list = new List(); - for (int i = 0; i < array!.Length; i++) // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + for (int i = 0; i < array!.Length; i++) // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected { - if (match!(array[i])) // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + if (match!(array[i])) // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected { list.Add(array[i]); } @@ -729,7 +731,7 @@ public static int FindIndex(T[] array, Predicate match) ThrowHelper.ThrowArgumentNullException(ExceptionArgument.array); } - return FindIndex(array!, 0, array!.Length, match); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + return FindIndex(array!, 0, array!.Length, match); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected } public static int FindIndex(T[] array, int startIndex, Predicate match) @@ -739,7 +741,7 @@ public static int FindIndex(T[] array, int startIndex, Predicate match) ThrowHelper.ThrowArgumentNullException(ExceptionArgument.array); } - return FindIndex(array!, startIndex, array!.Length - startIndex, match); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + return FindIndex(array!, startIndex, array!.Length - startIndex, match); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected } public static int FindIndex(T[] array, int startIndex, int count, Predicate match) @@ -749,12 +751,12 @@ public static int FindIndex(T[] array, int startIndex, int count, Predicate array!.Length) // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + if (startIndex < 0 || startIndex > array!.Length) // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected { ThrowHelper.ThrowStartIndexArgumentOutOfRange_ArgumentOutOfRange_Index(); } - if (count < 0 || startIndex > array!.Length - count) // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + if (count < 0 || startIndex > array!.Length - count) // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected { ThrowHelper.ThrowCountArgumentOutOfRange_ArgumentOutOfRange_Count(); } @@ -767,12 +769,13 @@ public static int FindIndex(T[] array, int startIndex, int count, Predicate(T[] array, Predicate match) { if (array == null) @@ -785,14 +788,14 @@ public static T FindLast(T[] array, Predicate match) ThrowHelper.ThrowArgumentNullException(ExceptionArgument.match); } - for (int i = array!.Length - 1; i >= 0; i--) // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + for (int i = array!.Length - 1; i >= 0; i--) // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected { - if (match!(array[i])) // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + if (match!(array[i])) // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected { return array[i]; } } - return default!; // TODO-NULLABLE-GENERIC + return default!; } public static int FindLastIndex(T[] array, Predicate match) @@ -802,7 +805,7 @@ public static int FindLastIndex(T[] array, Predicate match) ThrowHelper.ThrowArgumentNullException(ExceptionArgument.array); } - return FindLastIndex(array!, array!.Length - 1, array.Length, match); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + return FindLastIndex(array!, array!.Length - 1, array.Length, match); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected } public static int FindLastIndex(T[] array, int startIndex, Predicate match) @@ -812,7 +815,7 @@ public static int FindLastIndex(T[] array, int startIndex, Predicate match ThrowHelper.ThrowArgumentNullException(ExceptionArgument.array); } - return FindLastIndex(array!, startIndex, startIndex + 1, match); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + return FindLastIndex(array!, startIndex, startIndex + 1, match); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected } public static int FindLastIndex(T[] array, int startIndex, int count, Predicate match) @@ -827,7 +830,7 @@ public static int FindLastIndex(T[] array, int startIndex, int count, Predica ThrowHelper.ThrowArgumentNullException(ExceptionArgument.match); } - if (array!.Length == 0) // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + if (array!.Length == 0) // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected { // Special case for 0 length List if (startIndex != -1) @@ -853,7 +856,7 @@ public static int FindLastIndex(T[] array, int startIndex, int count, Predica int endIndex = startIndex - count; for (int i = startIndex; i > endIndex; i--) { - if (match!(array[i])) // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + if (match!(array[i])) // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected { return i; } @@ -873,9 +876,9 @@ public static void ForEach(T[] array, Action action) ThrowHelper.ThrowArgumentNullException(ExceptionArgument.action); } - for (int i = 0; i < array!.Length; i++) // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + for (int i = 0; i < array!.Length; i++) // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected { - action!(array[i]); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + action!(array[i]); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected } } @@ -887,7 +890,7 @@ public static int IndexOf(Array array, object? value) { if (array == null) ThrowHelper.ThrowArgumentNullException(ExceptionArgument.array); - return IndexOf(array!, value, array!.GetLowerBound(0), array.Length); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + return IndexOf(array!, value, array!.GetLowerBound(0), array.Length); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected } // Returns the index of the first occurrence of a given value in a range of @@ -900,7 +903,7 @@ public static int IndexOf(Array array, object? value, int startIndex) { if (array == null) ThrowHelper.ThrowArgumentNullException(ExceptionArgument.array); - int lb = array!.GetLowerBound(0); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + int lb = array!.GetLowerBound(0); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected return IndexOf(array, value, startIndex, array.Length - startIndex + lb); } @@ -914,7 +917,7 @@ public static int IndexOf(Array array, object? value, int startIndex, int count) { if (array == null) ThrowHelper.ThrowArgumentNullException(ExceptionArgument.array); - if (array!.Rank != 1) // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + if (array!.Rank != 1) // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected ThrowHelper.ThrowRankException(ExceptionResource.Rank_MultiDimNotSupported); int lb = array.GetLowerBound(0); @@ -984,7 +987,7 @@ public static int IndexOf(T[] array, T value) ThrowHelper.ThrowArgumentNullException(ExceptionArgument.array); } - return IndexOf(array!, value, 0, array!.Length); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + return IndexOf(array!, value, 0, array!.Length); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected } public static int IndexOf(T[] array, T value, int startIndex) @@ -994,7 +997,7 @@ public static int IndexOf(T[] array, T value, int startIndex) ThrowHelper.ThrowArgumentNullException(ExceptionArgument.array); } - return IndexOf(array!, value, startIndex, array!.Length - startIndex); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + return IndexOf(array!, value, startIndex, array!.Length - startIndex); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected } public static int IndexOf(T[] array, T value, int startIndex, int count) @@ -1004,7 +1007,7 @@ public static int IndexOf(T[] array, T value, int startIndex, int count) ThrowHelper.ThrowArgumentNullException(ExceptionArgument.array); } - if ((uint)startIndex > (uint)array!.Length) // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + if ((uint)startIndex > (uint)array!.Length) // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected { ThrowHelper.ThrowStartIndexArgumentOutOfRange_ArgumentOutOfRange_Index(); } @@ -1068,7 +1071,7 @@ public static int LastIndexOf(Array array, object? value) { if (array == null) ThrowHelper.ThrowArgumentNullException(ExceptionArgument.array); - int lb = array!.GetLowerBound(0); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + int lb = array!.GetLowerBound(0); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected return LastIndexOf(array, value, array.Length - 1 + lb, array.Length); } @@ -1081,7 +1084,7 @@ public static int LastIndexOf(Array array, object? value, int startIndex) { if (array == null) ThrowHelper.ThrowArgumentNullException(ExceptionArgument.array); - int lb = array!.GetLowerBound(0); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + int lb = array!.GetLowerBound(0); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected return LastIndexOf(array, value, startIndex, startIndex + 1 - lb); } @@ -1095,7 +1098,7 @@ public static int LastIndexOf(Array array, object? value, int startIndex, int co { if (array == null) ThrowHelper.ThrowArgumentNullException(ExceptionArgument.array); - int lb = array!.GetLowerBound(0); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + int lb = array!.GetLowerBound(0); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected if (array.Length == 0) { return lb - 1; @@ -1167,7 +1170,7 @@ public static int LastIndexOf(T[] array, T value) ThrowHelper.ThrowArgumentNullException(ExceptionArgument.array); } - return LastIndexOf(array!, value, array!.Length - 1, array.Length); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + return LastIndexOf(array!, value, array!.Length - 1, array.Length); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected } public static int LastIndexOf(T[] array, T value, int startIndex) @@ -1177,7 +1180,7 @@ public static int LastIndexOf(T[] array, T value, int startIndex) ThrowHelper.ThrowArgumentNullException(ExceptionArgument.array); } // if array is empty and startIndex is 0, we need to pass 0 as count - return LastIndexOf(array!, value, startIndex, (array!.Length == 0) ? 0 : (startIndex + 1)); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + return LastIndexOf(array!, value, startIndex, (array!.Length == 0) ? 0 : (startIndex + 1)); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected } public static int LastIndexOf(T[] array, T value, int startIndex, int count) @@ -1187,7 +1190,7 @@ public static int LastIndexOf(T[] array, T value, int startIndex, int count) ThrowHelper.ThrowArgumentNullException(ExceptionArgument.array); } - if (array!.Length == 0) // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + if (array!.Length == 0) // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected { // // Special case for 0 length List @@ -1282,7 +1285,7 @@ public static void Reverse(Array array) { if (array == null) ThrowHelper.ThrowArgumentNullException(ExceptionArgument.array); - Reverse(array!, array!.GetLowerBound(0), array.Length); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + Reverse(array!, array!.GetLowerBound(0), array.Length); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected } // Reverses the elements in a range of an array. Following a call to this @@ -1295,7 +1298,7 @@ public static void Reverse(Array array, int index, int length) { if (array == null) ThrowHelper.ThrowArgumentNullException(ExceptionArgument.array); - int lowerBound = array!.GetLowerBound(0); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + int lowerBound = array!.GetLowerBound(0); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected if (index < lowerBound) ThrowHelper.ThrowIndexArgumentOutOfRange_NeedNonNegNumException(); if (length < 0) @@ -1338,7 +1341,7 @@ public static void Reverse(T[] array) { if (array == null) ThrowHelper.ThrowArgumentNullException(ExceptionArgument.array); - Reverse(array!, 0, array!.Length); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + Reverse(array!, 0, array!.Length); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected } public static void Reverse(T[] array, int index, int length) @@ -1349,7 +1352,7 @@ public static void Reverse(T[] array, int index, int length) ThrowHelper.ThrowIndexArgumentOutOfRange_NeedNonNegNumException(); if (length < 0) ThrowHelper.ThrowLengthArgumentOutOfRange_ArgumentOutOfRange_NeedNonNegNum(); - if (array!.Length - index < length) // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + if (array!.Length - index < length) // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected ThrowHelper.ThrowArgumentException(ExceptionResource.Argument_InvalidOffLen); if (length <= 1) @@ -1375,7 +1378,7 @@ public static void Sort(Array array) { if (array == null) ThrowHelper.ThrowArgumentNullException(ExceptionArgument.array); - Sort(array!, null, array!.GetLowerBound(0), array.Length, null); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + Sort(array!, null, array!.GetLowerBound(0), array.Length, null); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected } // Sorts the elements of two arrays based on the keys in the first array. @@ -1388,7 +1391,7 @@ public static void Sort(Array keys, Array? items) { if (keys == null) ThrowHelper.ThrowArgumentNullException(ExceptionArgument.keys); - Sort(keys!, items, keys!.GetLowerBound(0), keys.Length, null); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + Sort(keys!, items, keys!.GetLowerBound(0), keys.Length, null); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected } // Sorts the elements in a section of an array. The sort compares the @@ -1436,7 +1439,7 @@ public static void Sort(Array keys, Array? items, IComparer? comparer) { if (keys == null) ThrowHelper.ThrowArgumentNullException(ExceptionArgument.keys); - Sort(keys!, items, keys!.GetLowerBound(0), keys.Length, comparer); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + Sort(keys!, items, keys!.GetLowerBound(0), keys.Length, comparer); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected } // Sorts the elements in a section of an array. The sort compares the @@ -1462,7 +1465,7 @@ public static void Sort(Array keys, Array? items, int index, int length, ICompar { if (keys == null) ThrowHelper.ThrowArgumentNullException(ExceptionArgument.keys); - if (keys!.Rank != 1 || (items != null && items.Rank != 1)) // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + if (keys!.Rank != 1 || (items != null && items.Rank != 1)) // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected ThrowHelper.ThrowRankException(ExceptionResource.Rank_MultiDimNotSupported); int keysLowerBound = keys.GetLowerBound(0); if (items != null && keysLowerBound != items.GetLowerBound(0)) @@ -1485,14 +1488,14 @@ public static void Sort(T[] array) { if (array == null) ThrowHelper.ThrowArgumentNullException(ExceptionArgument.array); - Sort(array!, 0, array!.Length, null); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + Sort(array!, 0, array!.Length, null); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected } public static void Sort(TKey[] keys, TValue[]? items) { if (keys == null) ThrowHelper.ThrowArgumentNullException(ExceptionArgument.keys); - Sort(keys!, items, 0, keys!.Length, null); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + Sort(keys!, items, 0, keys!.Length, null); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected } public static void Sort(T[] array, int index, int length) @@ -1509,14 +1512,14 @@ public static void Sort(T[] array, System.Collections.Generic.IComparer? c { if (array == null) ThrowHelper.ThrowArgumentNullException(ExceptionArgument.array); - Sort(array!, 0, array!.Length, comparer); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + Sort(array!, 0, array!.Length, comparer); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected } public static void Sort(TKey[] keys, TValue[]? items, System.Collections.Generic.IComparer? comparer) { if (keys == null) ThrowHelper.ThrowArgumentNullException(ExceptionArgument.keys); - Sort(keys!, items, 0, keys!.Length, comparer); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + Sort(keys!, items, 0, keys!.Length, comparer); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected } public static void Sort(T[] array, int index, int length, System.Collections.Generic.IComparer? comparer) @@ -1527,7 +1530,7 @@ public static void Sort(T[] array, int index, int length, System.Collections. ThrowHelper.ThrowIndexArgumentOutOfRange_NeedNonNegNumException(); if (length < 0) ThrowHelper.ThrowLengthArgumentOutOfRange_ArgumentOutOfRange_NeedNonNegNum(); - if (array!.Length - index < length) // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + if (array!.Length - index < length) // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected ThrowHelper.ThrowArgumentException(ExceptionResource.Argument_InvalidOffLen); if (length > 1) @@ -1554,7 +1557,7 @@ public static void Sort(TKey[] keys, TValue[]? items, int index, i ThrowHelper.ThrowIndexArgumentOutOfRange_NeedNonNegNumException(); if (length < 0) ThrowHelper.ThrowLengthArgumentOutOfRange_ArgumentOutOfRange_NeedNonNegNum(); - if (keys!.Length - index < length || (items != null && index > items.Length - length)) // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + if (keys!.Length - index < length || (items != null && index > items.Length - length)) // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected ThrowHelper.ThrowArgumentException(ExceptionResource.Argument_InvalidOffLen); if (length > 1) @@ -1591,7 +1594,7 @@ public static void Sort(T[] array, Comparison comparison) ThrowHelper.ThrowArgumentNullException(ExceptionArgument.comparison); } - ArraySortHelper.Sort(array!, 0, array!.Length, comparison!); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + ArraySortHelper.Sort(array!, 0, array!.Length, comparison!); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected } public static bool TrueForAll(T[] array, Predicate match) @@ -1606,9 +1609,9 @@ public static bool TrueForAll(T[] array, Predicate match) ThrowHelper.ThrowArgumentNullException(ExceptionArgument.match); } - for (int i = 0; i < array!.Length; i++) // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + for (int i = 0; i < array!.Length; i++) // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected { - if (!match!(array[i])) // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + if (!match!(array[i])) // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected { return false; } diff --git a/src/Common/src/CoreLib/System/ArraySegment.cs b/src/Common/src/CoreLib/System/ArraySegment.cs index 8098d220db73..0f6e05f892a2 100644 --- a/src/Common/src/CoreLib/System/ArraySegment.cs +++ b/src/Common/src/CoreLib/System/ArraySegment.cs @@ -43,7 +43,7 @@ public ArraySegment(T[] array) _array = array; _offset = 0; - _count = array!.Length; // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + _count = array!.Length; // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected } public ArraySegment(T[] array, int offset, int count) @@ -323,7 +323,7 @@ internal Enumerator(ArraySegment arraySegment) Debug.Assert(arraySegment.Array != null); Debug.Assert(arraySegment.Offset >= 0); Debug.Assert(arraySegment.Count >= 0); - Debug.Assert(arraySegment.Offset + arraySegment.Count <= arraySegment.Array!.Length); // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/34792 + Debug.Assert(arraySegment.Offset + arraySegment.Count <= arraySegment.Array!.Length); // TODO-NULLABLE: Manually-implemented property (https://github.com/dotnet/roslyn/issues/34792) _array = arraySegment.Array; _start = arraySegment.Offset; diff --git a/src/Common/src/CoreLib/System/BitConverter.cs b/src/Common/src/CoreLib/System/BitConverter.cs index 129c0099a36c..f6f6b983795c 100644 --- a/src/Common/src/CoreLib/System/BitConverter.cs +++ b/src/Common/src/CoreLib/System/BitConverter.cs @@ -236,7 +236,7 @@ public static short ToInt16(byte[] value, int startIndex) { if (value == null) ThrowHelper.ThrowArgumentNullException(ExceptionArgument.value); - if (unchecked((uint)startIndex) >= unchecked((uint)value!.Length)) // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + if (unchecked((uint)startIndex) >= unchecked((uint)value!.Length)) // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.startIndex, ExceptionResource.ArgumentOutOfRange_Index); if (startIndex > value.Length - sizeof(short)) ThrowHelper.ThrowArgumentException(ExceptionResource.Arg_ArrayPlusOffTooSmall, ExceptionArgument.value); @@ -257,7 +257,7 @@ public static int ToInt32(byte[] value, int startIndex) { if (value == null) ThrowHelper.ThrowArgumentNullException(ExceptionArgument.value); - if (unchecked((uint)startIndex) >= unchecked((uint)value!.Length)) // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + if (unchecked((uint)startIndex) >= unchecked((uint)value!.Length)) // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.startIndex, ExceptionResource.ArgumentOutOfRange_Index); if (startIndex > value.Length - sizeof(int)) ThrowHelper.ThrowArgumentException(ExceptionResource.Arg_ArrayPlusOffTooSmall, ExceptionArgument.value); @@ -278,7 +278,7 @@ public static long ToInt64(byte[] value, int startIndex) { if (value == null) ThrowHelper.ThrowArgumentNullException(ExceptionArgument.value); - if (unchecked((uint)startIndex) >= unchecked((uint)value!.Length)) // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + if (unchecked((uint)startIndex) >= unchecked((uint)value!.Length)) // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.startIndex, ExceptionResource.ArgumentOutOfRange_Index); if (startIndex > value.Length - sizeof(long)) ThrowHelper.ThrowArgumentException(ExceptionResource.Arg_ArrayPlusOffTooSmall, ExceptionArgument.value); @@ -363,11 +363,11 @@ public static string ToString(byte[] value, int startIndex, int length) { if (value == null) ThrowHelper.ThrowArgumentNullException(ExceptionArgument.value); - if (startIndex < 0 || startIndex >= value!.Length && startIndex > 0) // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + if (startIndex < 0 || startIndex >= value!.Length && startIndex > 0) // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.startIndex, ExceptionResource.ArgumentOutOfRange_Index); if (length < 0) throw new ArgumentOutOfRangeException(nameof(length), SR.ArgumentOutOfRange_GenericPositive); - if (startIndex > value!.Length - length) // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + if (startIndex > value!.Length - length) // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected ThrowHelper.ThrowArgumentException(ExceptionResource.Arg_ArrayPlusOffTooSmall, ExceptionArgument.value); if (length == 0) @@ -409,7 +409,7 @@ public static string ToString(byte[] value) { if (value == null) ThrowHelper.ThrowArgumentNullException(ExceptionArgument.value); - return ToString(value!, 0, value!.Length); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + return ToString(value!, 0, value!.Length); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected } // Converts an array of bytes into a String. @@ -417,7 +417,7 @@ public static string ToString(byte[] value, int startIndex) { if (value == null) ThrowHelper.ThrowArgumentNullException(ExceptionArgument.value); - return ToString(value!, startIndex, value!.Length - startIndex); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + return ToString(value!, startIndex, value!.Length - startIndex); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected } /*==================================ToBoolean=================================== @@ -435,7 +435,7 @@ public static bool ToBoolean(byte[] value, int startIndex) ThrowHelper.ThrowArgumentNullException(ExceptionArgument.value); if (startIndex < 0) ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.startIndex, ExceptionResource.ArgumentOutOfRange_Index); - if (startIndex > value!.Length - 1) // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + if (startIndex > value!.Length - 1) // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.startIndex, ExceptionResource.ArgumentOutOfRange_Index); // differs from other overloads, which throw base ArgumentException return value[startIndex] != 0; diff --git a/src/Common/src/CoreLib/System/CharEnumerator.cs b/src/Common/src/CoreLib/System/CharEnumerator.cs index 3adf3b0d3add..1e775380805d 100644 --- a/src/Common/src/CoreLib/System/CharEnumerator.cs +++ b/src/Common/src/CoreLib/System/CharEnumerator.cs @@ -54,7 +54,7 @@ public void Dispose() _str = null; } - object? IEnumerator.Current // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/23268 + object? IEnumerator.Current { get { return Current; } } diff --git a/src/Common/src/CoreLib/System/Collections/ArrayList.cs b/src/Common/src/CoreLib/System/Collections/ArrayList.cs index c5f3abd1d2d6..ba4a323c4eb9 100644 --- a/src/Common/src/CoreLib/System/Collections/ArrayList.cs +++ b/src/Common/src/CoreLib/System/Collections/ArrayList.cs @@ -295,7 +295,7 @@ public virtual bool Contains(object? item) else { for (int i = 0; i < _size; i++) - if ((_items[i] != null) && (_items[i]!.Equals(item))) // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/34644 + if ((_items[i] != null) && (_items[i]!.Equals(item))) // TODO-NULLABLE: Indexer nullability tracked (https://github.com/dotnet/roslyn/issues/34644) return true; return false; } @@ -969,7 +969,7 @@ public override int IndexOf(object? value, int startIndex, int count) else { for (int i = startIndex; i < endIndex; i++) - if (_list[i] != null && _list[i]!.Equals(value)) // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/34644 + if (_list[i] != null && _list[i]!.Equals(value)) // TODO-NULLABLE: Indexer nullability tracked (https://github.com/dotnet/roslyn/issues/34644) return i; return -1; } @@ -1040,7 +1040,7 @@ public override int LastIndexOf(object? value, int startIndex, int count) else { for (int i = startIndex; i >= endIndex; i--) - if (_list[i] != null && _list[i]!.Equals(value)) // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/34644 + if (_list[i] != null && _list[i]!.Equals(value)) // TODO-NULLABLE: Indexer nullability tracked (https://github.com/dotnet/roslyn/issues/34644) return i; return -1; } @@ -2521,7 +2521,7 @@ public override bool Contains(object? item) else { for (int i = 0; i < _baseSize; i++) - if (_baseList[_baseIndex + i] != null && _baseList[_baseIndex + i]!.Equals(item)) // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/34644 + if (_baseList[_baseIndex + i] != null && _baseList[_baseIndex + i]!.Equals(item)) // TODO-NULLABLE: Indexer nullability tracked (https://github.com/dotnet/roslyn/issues/34644) return true; return false; } diff --git a/src/Common/src/CoreLib/System/Collections/Concurrent/ConcurrentQueue.cs b/src/Common/src/CoreLib/System/Collections/Concurrent/ConcurrentQueue.cs index f80f4d139420..e62e37272a2e 100644 --- a/src/Common/src/CoreLib/System/Collections/Concurrent/ConcurrentQueue.cs +++ b/src/Common/src/CoreLib/System/Collections/Concurrent/ConcurrentQueue.cs @@ -4,6 +4,7 @@ using System.Collections.Generic; using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.Threading; namespace System.Collections.Concurrent @@ -99,7 +100,7 @@ public ConcurrentQueue(IEnumerable collection) // Initialize the segment and add all of the data to it. _tail = _head = new ConcurrentQueueSegment(length); - foreach (T item in collection!) // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + foreach (T item in collection!) // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected { Enqueue(item); } @@ -146,7 +147,7 @@ void ICollection.CopyTo(Array array, int index) // Otherwise, fall back to the slower path that first copies the contents // to an array, and then uses that array's non-generic CopyTo to do the copy. - ToArray().CopyTo(array!, index); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + ToArray().CopyTo(array!, index); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected } /// @@ -163,7 +164,7 @@ void ICollection.CopyTo(Array array, int index) /// cref="ICollection"/>. This property is not supported. /// /// The SyncRoot property is not supported. - object ICollection.SyncRoot { get { ThrowHelper.ThrowNotSupportedException(ExceptionResource.ConcurrentCollection_SyncRoot_NotSupported); return default!; } } // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + object ICollection.SyncRoot { get { ThrowHelper.ThrowNotSupportedException(ExceptionResource.ConcurrentCollection_SyncRoot_NotSupported); return default!; } } // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected /// Returns an enumerator that iterates through a collection. /// An that can be used to iterate through the collection. @@ -461,7 +462,7 @@ public void CopyTo(T[] array, int index) // Get the number of items to be enumerated long count = GetCount(head, headHead, tail, tailTail); - if (index > array!.Length - count) // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + if (index > array!.Length - count) // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected { ThrowHelper.ThrowArgumentException(ExceptionResource.Arg_ArrayPlusOffTooSmall); } @@ -678,12 +679,12 @@ private void EnqueueSlow(T item) /// true if an element was removed and returned from the beginning of the /// successfully; otherwise, false. /// - public bool TryDequeue(out T result) => // TODO-GENERIC-NULLABLE + public bool TryDequeue([MaybeNullWhen(false)] out T result) => _head.TryDequeue(out result) || // fast-path that operates just on the head segment TryDequeueSlow(out result); // slow path that needs to fix up segments /// Tries to dequeue an item, removing empty segments as needed. - private bool TryDequeueSlow(out T item) + private bool TryDequeueSlow([MaybeNullWhen(false)] out T item) { while (true) { @@ -701,7 +702,7 @@ private bool TryDequeueSlow(out T item) // check and this check, another item could have arrived). if (head._nextSegment == null) { - item = default!; // TODO-NULLABLE-GENERIC + item = default!; return false; } @@ -742,13 +743,13 @@ private bool TryDequeueSlow(out T item) /// For determining whether the collection contains any items, use of the /// property is recommended rather than peeking. /// - public bool TryPeek(out T result) => TryPeek(out result, resultUsed: true); // TODO-GENERIC-NULLABLE + public bool TryPeek([MaybeNullWhen(false)] out T result) => TryPeek(out result, resultUsed: true); /// Attempts to retrieve the value for the first element in the queue. /// The value of the first element, if found. /// true if the result is needed; otherwise false if only the true/false outcome is needed. /// true if an element was found; otherwise, false. - private bool TryPeek(out T result, bool resultUsed) + private bool TryPeek([MaybeNullWhen(false)] out T result, bool resultUsed) { // Starting with the head segment, look through all of the segments // for the first one we can find that's not empty. @@ -795,7 +796,7 @@ private bool TryPeek(out T result, bool resultUsed) // and we'll traverse to that segment. } - result = default!; // TODO-NULLABLE-GENERIC + result = default!; return false; } diff --git a/src/Common/src/CoreLib/System/Collections/Concurrent/ConcurrentQueueSegment.cs b/src/Common/src/CoreLib/System/Collections/Concurrent/ConcurrentQueueSegment.cs index c120d777621e..fcf0539df4ce 100644 --- a/src/Common/src/CoreLib/System/Collections/Concurrent/ConcurrentQueueSegment.cs +++ b/src/Common/src/CoreLib/System/Collections/Concurrent/ConcurrentQueueSegment.cs @@ -4,6 +4,7 @@ #nullable enable using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.Runtime.InteropServices; using System.Threading; @@ -127,7 +128,7 @@ internal static int RoundUpToPowerOf2(int i) } /// Tries to dequeue an element from the queue. - public bool TryDequeue(out T item) // TODO-NULLABLE-GENERIC + public bool TryDequeue([MaybeNullWhen(false)] out T item) { Slot[] slots = _slots; @@ -165,7 +166,7 @@ public bool TryDequeue(out T item) // TODO-NULLABLE-GENERIC // If we're preserving, though, we don't zero out the slot, as we need it for // enumerations, peeking, ToArray, etc. And we don't update the sequence number, // so that an enqueuer will see it as full and be forced to move to a new segment. - slots[slotsIndex].Item = default!; // TODO-NULLABLE-GENERIC + slots[slotsIndex].Item = default!; // TODO-NULLABLE: Remove ! when nullable attributes are respected Volatile.Write(ref slots[slotsIndex].SequenceNumber, currentHead + slots.Length); } return true; @@ -184,7 +185,7 @@ public bool TryDequeue(out T item) // TODO-NULLABLE-GENERIC int currentTail = Volatile.Read(ref _headAndTail.Tail); if (currentTail - currentHead <= 0 || (frozen && (currentTail - FreezeOffset - currentHead <= 0))) { - item = default!; // TODO-NULLABLE-GENERIC + item = default!; return false; } @@ -199,7 +200,7 @@ public bool TryDequeue(out T item) // TODO-NULLABLE-GENERIC } /// Tries to peek at an element from the queue, without removing it. - public bool TryPeek(out T result, bool resultUsed) // TODO-NULLABLE-GENERIC + public bool TryPeek([MaybeNullWhen(false)] out T result, bool resultUsed) { if (resultUsed) { @@ -229,7 +230,7 @@ public bool TryPeek(out T result, bool resultUsed) // TODO-NULLABLE-GENERIC int diff = sequenceNumber - (currentHead + 1); if (diff == 0) { - result = resultUsed ? slots[slotsIndex].Item : default!; // TODO-NULLABLE-GENERIC + result = resultUsed ? slots[slotsIndex].Item : default!; return true; } else if (diff < 0) @@ -245,7 +246,7 @@ public bool TryPeek(out T result, bool resultUsed) // TODO-NULLABLE-GENERIC int currentTail = Volatile.Read(ref _headAndTail.Tail); if (currentTail - currentHead <= 0 || (frozen && (currentTail - FreezeOffset - currentHead <= 0))) { - result = default!; // TODO-NULLABLE-GENERIC + result = default!; return false; } @@ -322,7 +323,7 @@ public bool TryEnqueue(T item) internal struct Slot { /// The item. - public T Item; // SOS's ThreadPool command depends on this being at the beginning of the struct when T is a reference type + [AllowNull, MaybeNull] public T Item; // SOS's ThreadPool command depends on this being at the beginning of the struct when T is a reference type /// The sequence number for this slot, used to synchronize between enqueuers and dequeuers. public int SequenceNumber; } diff --git a/src/Common/src/CoreLib/System/Collections/Concurrent/IProducerConsumerCollection.cs b/src/Common/src/CoreLib/System/Collections/Concurrent/IProducerConsumerCollection.cs index 3f7748388cfe..e33c840b4600 100644 --- a/src/Common/src/CoreLib/System/Collections/Concurrent/IProducerConsumerCollection.cs +++ b/src/Common/src/CoreLib/System/Collections/Concurrent/IProducerConsumerCollection.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; namespace System.Collections.Concurrent { @@ -58,7 +59,7 @@ public interface IProducerConsumerCollection : IEnumerable, ICollection /// unspecified. /// /// true if an object was removed and returned successfully; otherwise, false. - bool TryTake(out T item); // TODO-NULLABLE-GENERIC + bool TryTake([MaybeNullWhen(false)] out T item); /// /// Copies the elements contained in the to a new array. diff --git a/src/Common/src/CoreLib/System/Collections/Generic/ArraySortHelper.cs b/src/Common/src/CoreLib/System/Collections/Generic/ArraySortHelper.cs index 084ecdf458dc..2ec14db77823 100644 --- a/src/Common/src/CoreLib/System/Collections/Generic/ArraySortHelper.cs +++ b/src/Common/src/CoreLib/System/Collections/Generic/ArraySortHelper.cs @@ -14,7 +14,7 @@ ===========================================================*/ using System.Diagnostics; -using System.Runtime.CompilerServices; +using System.Diagnostics.CodeAnalysis; namespace System.Collections.Generic { @@ -38,6 +38,7 @@ internal static int FloorLog2PlusOne(int n) return result; } + [DoesNotReturn] internal static void ThrowOrIgnoreBadComparer(object? comparer) { throw new ArgumentException(SR.Format(SR.Arg_BogusIComparer, comparer)); diff --git a/src/Common/src/CoreLib/System/Collections/Generic/Comparer.cs b/src/Common/src/CoreLib/System/Collections/Generic/Comparer.cs index 28cb0af9e4ea..80187beedf88 100644 --- a/src/Common/src/CoreLib/System/Collections/Generic/Comparer.cs +++ b/src/Common/src/CoreLib/System/Collections/Generic/Comparer.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System.Diagnostics.CodeAnalysis; using System.Runtime.CompilerServices; using System.Runtime.Serialization; @@ -21,7 +22,7 @@ public static Comparer Create(Comparison comparison) return new ComparisonComparer(comparison); } - public abstract int Compare(T x, T y); // TODO-NULLABLE-GENERIC: x and y must be marked as nullable + public abstract int Compare([AllowNull] T x, [AllowNull] T y); int IComparer.Compare(object? x, object? y) { @@ -58,7 +59,7 @@ public override int Compare(T x, T y) // Needs to be public to support binary serialization compatibility public sealed partial class GenericComparer : Comparer where T : IComparable { - public override int Compare(T x, T y) // TODO-NULLABLE-GENERIC: x and y must be marked as nullable + public override int Compare([AllowNull] T x, [AllowNull] T y) { if (x != null) { @@ -106,7 +107,7 @@ public override int GetHashCode() => // Needs to be public to support binary serialization compatibility public sealed partial class ObjectComparer : Comparer { - public override int Compare(T x, T y) // TODO-NULLABLE-GENERIC: x and y must be marked as nullable + public override int Compare([AllowNull] T x, [AllowNull] T y) { return System.Collections.Comparer.Default.Compare(x, y); } diff --git a/src/Common/src/CoreLib/System/Collections/Generic/Dictionary.cs b/src/Common/src/CoreLib/System/Collections/Generic/Dictionary.cs index 296a607537e8..d79924cfdc9d 100644 --- a/src/Common/src/CoreLib/System/Collections/Generic/Dictionary.cs +++ b/src/Common/src/CoreLib/System/Collections/Generic/Dictionary.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.Runtime.CompilerServices; using System.Runtime.Serialization; @@ -99,7 +100,7 @@ public Dictionary(IDictionary dictionary, IEqualityComparer? // avoid the enumerator allocation and overhead by looping through the entries array directly. // We only do this when dictionary is Dictionary and not a subclass, to maintain // back-compat with subclasses that may have overridden the enumerator behavior. - if (dictionary!.GetType() == typeof(Dictionary)) // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + if (dictionary!.GetType() == typeof(Dictionary)) // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected { Dictionary d = (Dictionary)dictionary; int count = d._count; @@ -130,7 +131,7 @@ public Dictionary(IEnumerable> collection, IEqualityC ThrowHelper.ThrowArgumentNullException(ExceptionArgument.collection); } - foreach (KeyValuePair pair in collection!) // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + foreach (KeyValuePair pair in collection!) // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected { Add(pair.Key, pair.Value); } @@ -218,7 +219,7 @@ public TValue this[TKey key] int i = FindEntry(key); if (i >= 0) return _entries![i].value; ThrowHelper.ThrowKeyNotFoundException(key); - return default!; // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 (annotating ThrowHelper removes this return statement). + return default!; // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected } set { @@ -289,7 +290,7 @@ public bool ContainsValue(TValue value) } else { - if (default(TValue)! != null) // TODO-NULLABLE-GENERIC: https://github.com/dotnet/roslyn/issues/34757 + if (default(TValue)! != null) // TODO-NULLABLE: default(T) == null warning (https://github.com/dotnet/roslyn/issues/34757) { // ValueType: Devirtualize with EqualityComparer.Default intrinsic for (int i = 0; i < _count; i++) @@ -319,7 +320,7 @@ private void CopyTo(KeyValuePair[] array, int index) ThrowHelper.ThrowArgumentNullException(ExceptionArgument.array); } - if ((uint)index > (uint)array!.Length) // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + if ((uint)index > (uint)array!.Length) // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected { ThrowHelper.ThrowIndexArgumentOutOfRange_NeedNonNegNumException(); } @@ -353,7 +354,7 @@ public virtual void GetObjectData(SerializationInfo info, StreamingContext conte ThrowHelper.ThrowArgumentNullException(ExceptionArgument.info); } - info!.AddValue(VersionName, _version); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + info!.AddValue(VersionName, _version); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected info.AddValue(ComparerName, _comparer ?? EqualityComparer.Default, typeof(IEqualityComparer)); info.AddValue(HashSizeName, _buckets == null ? 0 : _buckets.Length); // This is the length of the bucket array @@ -382,10 +383,10 @@ private int FindEntry(TKey key) IEqualityComparer? comparer = _comparer; if (comparer == null) { - uint hashCode = (uint)key!.GetHashCode(); // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + uint hashCode = (uint)key!.GetHashCode(); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected // Value in _buckets is 1-based i = buckets[hashCode % (uint)buckets.Length] - 1; - if (default(TKey)! != null) // TODO-NULLABLE-GENERIC: https://github.com/dotnet/roslyn/issues/34757 + if (default(TKey)! != null) // TODO-NULLABLE: default(T) == null warning (https://github.com/dotnet/roslyn/issues/34757) { // ValueType: Devirtualize with EqualityComparer.Default intrinsic do @@ -485,21 +486,22 @@ private bool TryInsert(TKey key, TValue value, InsertionBehavior behavior) { Initialize(0); } + Debug.Assert(_buckets != null); Entry[]? entries = _entries; Debug.Assert(entries != null, "expected entries to be non-null"); IEqualityComparer? comparer = _comparer; - uint hashCode = (uint)((comparer == null) ? key!.GetHashCode() : comparer.GetHashCode(key)); // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + uint hashCode = (uint)((comparer == null) ? key!.GetHashCode() : comparer.GetHashCode(key)); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected int collisionCount = 0; - ref int bucket = ref _buckets![hashCode % (uint)_buckets.Length]; // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 (Initialize inits sets _buckets to non null) + ref int bucket = ref _buckets[hashCode % (uint)_buckets.Length]; // Value in _buckets is 1-based int i = bucket - 1; if (comparer == null) { - if (default(TKey)! != null) // TODO-NULLABLE-GENERIC: https://github.com/dotnet/roslyn/issues/34757 + if (default(TKey)! != null) // TODO-NULLABLE: default(T) == null warning (https://github.com/dotnet/roslyn/issues/34757) { // ValueType: Devirtualize with EqualityComparer.Default intrinsic do @@ -660,7 +662,7 @@ private bool TryInsert(TKey key, TValue value, InsertionBehavior behavior) _version++; // Value types never rehash - if (default(TKey)! == null && collisionCount > HashHelpers.HashCollisionThreshold && comparer is NonRandomizedStringEqualityComparer) // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/34757 + if (default(TKey)! == null && collisionCount > HashHelpers.HashCollisionThreshold && comparer is NonRandomizedStringEqualityComparer) // TODO-NULLABLE: default(T) == null warning (https://github.com/dotnet/roslyn/issues/34757) { // If we hit the collision threshold we'll need to switch to the comparer which is using randomized string hashing // i.e. EqualityComparer.Default. @@ -698,7 +700,7 @@ public virtual void OnDeserialization(object sender) ThrowHelper.ThrowSerializationException(ExceptionResource.Serialization_MissingKeys); } - for (int i = 0; i < array!.Length; i++) // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + for (int i = 0; i < array!.Length; i++) // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected { if (array[i].Key == null) { @@ -722,7 +724,7 @@ private void Resize() private void Resize(int newSize, bool forceNewHashCodes) { // Value types never rehash - Debug.Assert(!forceNewHashCodes || default(TKey)! == null); // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/34757 + Debug.Assert(!forceNewHashCodes || default(TKey)! == null); // TODO-NULLABLE: default(T) == null warning (https://github.com/dotnet/roslyn/issues/34757) Debug.Assert(_entries != null, "_entries should be non-null"); Debug.Assert(newSize >= _entries.Length); @@ -732,7 +734,7 @@ private void Resize(int newSize, bool forceNewHashCodes) int count = _count; Array.Copy(_entries, 0, entries, 0, count); - if (default(TKey)! == null && forceNewHashCodes) // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/34757 + if (default(TKey)! == null && forceNewHashCodes) // TODO-NULLABLE: default(T) == null warning (https://github.com/dotnet/roslyn/issues/34757) { for (int i = 0; i < count; i++) { @@ -776,7 +778,7 @@ public bool Remove(TKey key) if (buckets != null) { Debug.Assert(entries != null, "entries should be non-null"); - uint hashCode = (uint)(_comparer?.GetHashCode(key) ?? key!.GetHashCode()); // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + uint hashCode = (uint)(_comparer?.GetHashCode(key) ?? key!.GetHashCode()); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected uint bucket = hashCode % (uint)buckets.Length; int last = -1; // Value in buckets is 1-based @@ -803,11 +805,11 @@ public bool Remove(TKey key) if (RuntimeHelpers.IsReferenceOrContainsReferences()) { - entry.key = default!; // TODO-NULLABLE-GENERIC + entry.key = default!; } if (RuntimeHelpers.IsReferenceOrContainsReferences()) { - entry.value = default!; // TODO-NULLABLE-GENERIC + entry.value = default!; } _freeList = i; _freeCount++; @@ -831,7 +833,7 @@ public bool Remove(TKey key) // This overload is a copy of the overload Remove(TKey key) with one additional // statement to copy the value for entry being removed into the output parameter. // Code has been intentionally duplicated for performance reasons. - public bool Remove(TKey key, out TValue value) // TODO-NULLABLE-GENERIC: https://github.com/dotnet/roslyn/issues/26761 + public bool Remove(TKey key, [MaybeNullWhen(false)] out TValue value) { if (key == null) { @@ -844,7 +846,7 @@ public bool Remove(TKey key, out TValue value) // TODO-NULLABLE-GENERIC: https:/ if (buckets != null) { Debug.Assert(entries != null, "entries should be non-null"); - uint hashCode = (uint)(_comparer?.GetHashCode(key) ?? key!.GetHashCode()); // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + uint hashCode = (uint)(_comparer?.GetHashCode(key) ?? key!.GetHashCode()); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected uint bucket = hashCode % (uint)buckets.Length; int last = -1; // Value in buckets is 1-based @@ -873,11 +875,11 @@ public bool Remove(TKey key, out TValue value) // TODO-NULLABLE-GENERIC: https:/ if (RuntimeHelpers.IsReferenceOrContainsReferences()) { - entry.key = default!; // TODO-NULLABLE-GENERIC + entry.key = default!; } if (RuntimeHelpers.IsReferenceOrContainsReferences()) { - entry.value = default!; // TODO-NULLABLE-GENERIC + entry.value = default!; } _freeList = i; _freeCount++; @@ -895,11 +897,11 @@ public bool Remove(TKey key, out TValue value) // TODO-NULLABLE-GENERIC: https:/ collisionCount++; } } - value = default!; // TODO-NULLABLE-GENERIC + value = default!; return false; } - public bool TryGetValue(TKey key, out TValue value) // TODO-NULLABLE-GENERIC: https://github.com/dotnet/roslyn/issues/26761 + public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value) { int i = FindEntry(key); if (i >= 0) @@ -907,7 +909,7 @@ public bool TryGetValue(TKey key, out TValue value) // TODO-NULLABLE-GENERIC: ht value = _entries![i].value; return true; } - value = default!; // TODO-NULLABLE-GENERIC + value = default!; return false; } @@ -923,7 +925,7 @@ void ICollection.CopyTo(Array array, int index) { if (array == null) ThrowHelper.ThrowArgumentNullException(ExceptionArgument.array); - if (array!.Rank != 1) // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + if (array!.Rank != 1) // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected ThrowHelper.ThrowArgumentException(ExceptionResource.Arg_RankMultiDimNotSupported); if (array.GetLowerBound(0) != 0) ThrowHelper.ThrowArgumentException(ExceptionResource.Arg_NonZeroLowerBound); @@ -963,7 +965,7 @@ void ICollection.CopyTo(Array array, int index) { if (entries![i].next >= -1) { - objects![index++] = new KeyValuePair(entries[i].key, entries[i].value); // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + objects![index++] = new KeyValuePair(entries[i].key, entries[i].value); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected } } } @@ -1063,7 +1065,8 @@ public void TrimExcess(int capacity) ICollection IDictionary.Values => (ICollection)Values; - object? IDictionary.this[object key] // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/2384 + [DisallowNull] + object? IDictionary.this[object key] { get { @@ -1087,7 +1090,7 @@ public void TrimExcess(int capacity) try { - TKey tempKey = (TKey)key!; // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + TKey tempKey = (TKey)key!; // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected try { this[tempKey] = (TValue)value!; @@ -1123,7 +1126,7 @@ void IDictionary.Add(object key, object? value) try { - TKey tempKey = (TKey)key!; // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + TKey tempKey = (TKey)key!; // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected try { @@ -1213,7 +1216,7 @@ public void Dispose() { } - object? IEnumerator.Current // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/23268 + object? IEnumerator.Current { get { @@ -1296,7 +1299,7 @@ public KeyCollection(Dictionary dictionary) { ThrowHelper.ThrowArgumentNullException(ExceptionArgument.dictionary); } - _dictionary = dictionary!; // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + _dictionary = dictionary!; // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected } public Enumerator GetEnumerator() @@ -1309,12 +1312,12 @@ public void CopyTo(TKey[] array, int index) ThrowHelper.ThrowArgumentNullException(ExceptionArgument.array); } - if (index < 0 || index > array!.Length) // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + if (index < 0 || index > array!.Length) // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected { ThrowHelper.ThrowIndexArgumentOutOfRange_NeedNonNegNumException(); } - if (array!.Length - index < _dictionary.Count) // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + if (array!.Length - index < _dictionary.Count) // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected { ThrowHelper.ThrowArgumentException(ExceptionResource.Arg_ArrayPlusOffTooSmall); } @@ -1356,7 +1359,7 @@ void ICollection.CopyTo(Array array, int index) { if (array == null) ThrowHelper.ThrowArgumentNullException(ExceptionArgument.array); - if (array!.Rank != 1) // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + if (array!.Rank != 1) // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected ThrowHelper.ThrowArgumentException(ExceptionResource.Arg_RankMultiDimNotSupported); if (array.GetLowerBound(0) != 0) ThrowHelper.ThrowArgumentException(ExceptionResource.Arg_NonZeroLowerBound); @@ -1383,7 +1386,7 @@ void ICollection.CopyTo(Array array, int index) { for (int i = 0; i < count; i++) { - if (entries![i].next >= -1) objects![index++] = entries[i].key; // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 (objects) + if (entries![i].next >= -1) objects![index++] = entries[i].key; // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected } } catch (ArrayTypeMismatchException) @@ -1402,14 +1405,14 @@ public struct Enumerator : IEnumerator, IEnumerator private readonly Dictionary _dictionary; private int _index; private readonly int _version; - private TKey _currentKey; + [AllowNull, MaybeNull] private TKey _currentKey; internal Enumerator(Dictionary dictionary) { _dictionary = dictionary; _version = dictionary._version; _index = 0; - _currentKey = default!; // TODO-NULLABLE-GENERIC + _currentKey = default!; // TODO-NULLABLE: Remove ! when nullable attributes are respected } public void Dispose() @@ -1435,13 +1438,13 @@ public bool MoveNext() } _index = _dictionary._count + 1; - _currentKey = default!; // TODO-NULLABLE-GENERIC + _currentKey = default!; // TODO-NULLABLE: Remove ! when nullable attributes are respected return false; } - public TKey Current => _currentKey; + public TKey Current => _currentKey!; - object? IEnumerator.Current // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/23268 + object? IEnumerator.Current { get { @@ -1462,7 +1465,7 @@ void IEnumerator.Reset() } _index = 0; - _currentKey = default!; // TODO-NULLABLE-GENERIC + _currentKey = default!; // TODO-NULLABLE: Remove ! when nullable attributes are respected } } } @@ -1479,7 +1482,7 @@ public ValueCollection(Dictionary dictionary) { ThrowHelper.ThrowArgumentNullException(ExceptionArgument.dictionary); } - _dictionary = dictionary!; // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + _dictionary = dictionary!; // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected } public Enumerator GetEnumerator() @@ -1492,7 +1495,7 @@ public void CopyTo(TValue[] array, int index) ThrowHelper.ThrowArgumentNullException(ExceptionArgument.array); } - if ((uint)index > array!.Length) // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + if ((uint)index > array!.Length) // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected { ThrowHelper.ThrowIndexArgumentOutOfRange_NeedNonNegNumException(); } @@ -1539,7 +1542,7 @@ void ICollection.CopyTo(Array array, int index) { if (array == null) ThrowHelper.ThrowArgumentNullException(ExceptionArgument.array); - if (array!.Rank != 1) // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + if (array!.Rank != 1) // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected ThrowHelper.ThrowArgumentException(ExceptionResource.Arg_RankMultiDimNotSupported); if (array.GetLowerBound(0) != 0) ThrowHelper.ThrowArgumentException(ExceptionResource.Arg_NonZeroLowerBound); @@ -1566,7 +1569,7 @@ void ICollection.CopyTo(Array array, int index) { for (int i = 0; i < count; i++) { - if (entries![i].next >= -1) objects![index++] = entries[i].value!; // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + if (entries![i].next >= -1) objects![index++] = entries[i].value!; // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected } } catch (ArrayTypeMismatchException) @@ -1585,14 +1588,14 @@ public struct Enumerator : IEnumerator, IEnumerator private readonly Dictionary _dictionary; private int _index; private readonly int _version; - private TValue _currentValue; + [AllowNull, MaybeNull] private TValue _currentValue; internal Enumerator(Dictionary dictionary) { _dictionary = dictionary; _version = dictionary._version; _index = 0; - _currentValue = default!; // TODO-NULLABLE-GENERIC + _currentValue = default!; // TODO-NULLABLE: Remove ! when nullable attributes are respected } public void Dispose() @@ -1617,11 +1620,11 @@ public bool MoveNext() } } _index = _dictionary._count + 1; - _currentValue = default!; // TODO-NULLABLE-GENERIC + _currentValue = default!; // TODO-NULLABLE: Remove ! when nullable attributes are respected return false; } - public TValue Current => _currentValue; + public TValue Current => _currentValue!; object? IEnumerator.Current { @@ -1643,7 +1646,7 @@ void IEnumerator.Reset() ThrowHelper.ThrowInvalidOperationException_InvalidOperation_EnumFailedVersion(); } _index = 0; - _currentValue = default!; // TODO-NULLABLE-GENERIC + _currentValue = default!; // TODO-NULLABLE: Remove ! when nullable attributes are respected } } } diff --git a/src/Common/src/CoreLib/System/Collections/Generic/EqualityComparer.cs b/src/Common/src/CoreLib/System/Collections/Generic/EqualityComparer.cs index b6040adfccc0..86a4e2a3b5bf 100644 --- a/src/Common/src/CoreLib/System/Collections/Generic/EqualityComparer.cs +++ b/src/Common/src/CoreLib/System/Collections/Generic/EqualityComparer.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System.Diagnostics.CodeAnalysis; using System.Runtime.CompilerServices; using System.Runtime.Serialization; @@ -13,10 +14,10 @@ public abstract partial class EqualityComparer : IEqualityComparer, IEquality { // public static EqualityComparer Default is runtime-specific - public abstract bool Equals(T x, T y); - public abstract int GetHashCode(T obj); // TODO-NULLABLE-GENERIC: Shouldn't accept nulls. + public abstract bool Equals([AllowNull] T x, [AllowNull] T y); + public abstract int GetHashCode([DisallowNull] T obj); -#pragma warning disable CS8617 // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/30958 +#pragma warning disable CS8617 // TODO-NULLABLE: Covariant parameter types (https://github.com/dotnet/roslyn/issues/30958) int IEqualityComparer.GetHashCode(object? obj) #pragma warning restore CS8617 { @@ -44,7 +45,7 @@ bool IEqualityComparer.Equals(object? x, object? y) public sealed partial class GenericEqualityComparer : EqualityComparer where T : IEquatable { [MethodImpl(MethodImplOptions.AggressiveInlining)] - public override bool Equals(T x, T y) + public override bool Equals([AllowNull] T x, [AllowNull] T y) { if (x != null) { @@ -56,7 +57,7 @@ public override bool Equals(T x, T y) } [MethodImpl(MethodImplOptions.AggressiveInlining)] - public override int GetHashCode(T obj) => obj?.GetHashCode() ?? 0; + public override int GetHashCode([DisallowNull] T obj) => obj?.GetHashCode() ?? 0; // Equals method for the comparer itself. // If in the future this type is made sealed, change the is check to obj != null && GetType() == obj.GetType(). @@ -102,7 +103,7 @@ public override int GetHashCode() => public sealed partial class ObjectEqualityComparer : EqualityComparer { [MethodImpl(MethodImplOptions.AggressiveInlining)] - public override bool Equals(T x, T y) + public override bool Equals([AllowNull] T x, [AllowNull] T y) { if (x != null) { @@ -114,7 +115,7 @@ public override bool Equals(T x, T y) } [MethodImpl(MethodImplOptions.AggressiveInlining)] - public override int GetHashCode(T obj) => obj?.GetHashCode() ?? 0; + public override int GetHashCode([DisallowNull] T obj) => obj?.GetHashCode() ?? 0; // Equals method for the comparer itself. public override bool Equals(object? obj) => diff --git a/src/Common/src/CoreLib/System/Collections/Generic/IComparer.cs b/src/Common/src/CoreLib/System/Collections/Generic/IComparer.cs index 200ce17769cb..064aa31ecd11 100644 --- a/src/Common/src/CoreLib/System/Collections/Generic/IComparer.cs +++ b/src/Common/src/CoreLib/System/Collections/Generic/IComparer.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System; +using System.Diagnostics.CodeAnalysis; namespace System.Collections.Generic { @@ -15,6 +16,6 @@ public interface IComparer // value less than zero if x is less than y, zero if x is equal to y, or a // value greater than zero if x is greater than y. // - int Compare(T x, T y); // TODO-NULLABLE-GENERIC: must work with nulls + int Compare([AllowNull] T x, [AllowNull] T y); } } diff --git a/src/Common/src/CoreLib/System/Collections/Generic/IDictionary.cs b/src/Common/src/CoreLib/System/Collections/Generic/IDictionary.cs index 75bc1bc2a719..a93ec25d9d77 100644 --- a/src/Common/src/CoreLib/System/Collections/Generic/IDictionary.cs +++ b/src/Common/src/CoreLib/System/Collections/Generic/IDictionary.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System; +using System.Diagnostics.CodeAnalysis; namespace System.Collections.Generic { @@ -45,6 +46,6 @@ ICollection Values // bool Remove(TKey key); - bool TryGetValue(TKey key, out TValue value); // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value); } } diff --git a/src/Common/src/CoreLib/System/Collections/Generic/IEqualityComparer.cs b/src/Common/src/CoreLib/System/Collections/Generic/IEqualityComparer.cs index 54925e995333..025d693e99a0 100644 --- a/src/Common/src/CoreLib/System/Collections/Generic/IEqualityComparer.cs +++ b/src/Common/src/CoreLib/System/Collections/Generic/IEqualityComparer.cs @@ -2,6 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System.Diagnostics.CodeAnalysis; + namespace System.Collections.Generic { // The generic IEqualityComparer interface implements methods to if check two objects are equal @@ -9,8 +11,8 @@ namespace System.Collections.Generic // It is use in Dictionary class. public interface IEqualityComparer { - bool Equals(T x, T y); - int GetHashCode(T obj); // TODO-NULLABLE-GENERIC: This generally doesn't accept nulls. + bool Equals([AllowNull] T x, [AllowNull] T y); + int GetHashCode([DisallowNull] T obj); } } diff --git a/src/Common/src/CoreLib/System/Collections/Generic/IReadOnlyDictionary.cs b/src/Common/src/CoreLib/System/Collections/Generic/IReadOnlyDictionary.cs index 1d57383b15a6..48e9602eaad9 100644 --- a/src/Common/src/CoreLib/System/Collections/Generic/IReadOnlyDictionary.cs +++ b/src/Common/src/CoreLib/System/Collections/Generic/IReadOnlyDictionary.cs @@ -2,7 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; +using System.Diagnostics.CodeAnalysis; namespace System.Collections.Generic { @@ -10,7 +10,7 @@ namespace System.Collections.Generic public interface IReadOnlyDictionary : IReadOnlyCollection> where TKey : object { bool ContainsKey(TKey key); - bool TryGetValue(TKey key, out TValue value); // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value); TValue this[TKey key] { get; } IEnumerable Keys { get; } diff --git a/src/Common/src/CoreLib/System/Collections/Generic/List.cs b/src/Common/src/CoreLib/System/Collections/Generic/List.cs index 760220a99de1..4a272244f7ad 100644 --- a/src/Common/src/CoreLib/System/Collections/Generic/List.cs +++ b/src/Common/src/CoreLib/System/Collections/Generic/List.cs @@ -4,6 +4,7 @@ using System.Collections.ObjectModel; using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.Runtime.CompilerServices; using System.Threading; @@ -170,10 +171,10 @@ private static bool IsCompatibleObject(object? value) { // Non-null values are fine. Only accept nulls if T is a class or Nullable. // Note that default(T) is not equal to null for value types except when T is Nullable. - return ((value is T) || (value == null && default(T)! == null)); // https://github.com/dotnet/roslyn/issues/34757 + return ((value is T) || (value == null && default(T)! == null)); // default(T) == null warning (https://github.com/dotnet/roslyn/issues/34757) } - object? IList.this[int index] // TODO-NULLABLE-GENERIC: nullability is the same as of T + object? IList.this[int index] { get { @@ -225,7 +226,7 @@ private void AddWithResize(T item) _items[size] = item; } - int IList.Add(object? item) // TODO-NULLABLE-GENERIC: nullable if default(T) can be null + int IList.Add(object? item) { ThrowHelper.IfNullAndNullsAreIllegalThenThrow(item, ExceptionArgument.item); @@ -345,7 +346,7 @@ public List ConvertAll(Converter converter) List list = new List(_size); for (int i = 0; i < _size; i++) { - list._items[i] = converter!(_items[i]); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + list._items[i] = converter!(_items[i]); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected } list._size = _size; return list; @@ -418,6 +419,7 @@ private void EnsureCapacity(int min) public bool Exists(Predicate match) => FindIndex(match) != -1; + [return: MaybeNull] public T Find(Predicate match) { if (match == null) @@ -432,7 +434,7 @@ public T Find(Predicate match) return _items[i]; } } - return default!; // TODO-NULLABLE-GENERIC: return value is nullable when T can be nullable + return default!; } public List FindAll(Predicate match) @@ -445,7 +447,7 @@ public List FindAll(Predicate match) List list = new List(); for (int i = 0; i < _size; i++) { - if (match!(_items[i])) // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + if (match!(_items[i])) // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected { list.Add(_items[i]); } @@ -484,6 +486,7 @@ public int FindIndex(int startIndex, int count, Predicate match) return -1; } + [return: MaybeNull] public T FindLast(Predicate match) { if (match == null) @@ -498,7 +501,7 @@ public T FindLast(Predicate match) return _items[i]; } } - return default!; // TODO-NULLABLE-GENERIC: return value is nullable when T can be nullable + return default!; } public int FindLastIndex(Predicate match) @@ -540,7 +543,7 @@ public int FindLastIndex(int startIndex, int count, Predicate match) int endIndex = startIndex - count; for (int i = startIndex; i > endIndex; i--) { - if (match!(_items[i])) // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + if (match!(_items[i])) // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected { return i; } @@ -619,7 +622,7 @@ public List GetRange(int index, int count) public int IndexOf(T item) => Array.IndexOf(_items, item, 0, _size); - int IList.IndexOf(object? item) // TODO-NULLABLE-GENERIC: nullability == nullability(T) + int IList.IndexOf(object? item) { if (IsCompatibleObject(item)) { @@ -685,7 +688,7 @@ public void Insert(int index, T item) _version++; } - void IList.Insert(int index, object? item) // TODO-NULLABLE-GENERIC: nullable when T can be null + void IList.Insert(int index, object? item) { ThrowHelper.IfNullAndNullsAreIllegalThenThrow(item, ExceptionArgument.item); @@ -744,7 +747,7 @@ public void InsertRange(int index, IEnumerable collection) } else { - using (IEnumerator en = collection!.GetEnumerator()) // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + using (IEnumerator en = collection!.GetEnumerator()) // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected { while (en.MoveNext()) { @@ -844,7 +847,7 @@ public bool Remove(T item) return false; } - void IList.Remove(object? item) // TODO-NULLABLE-GENERIC: nullable when T can be null + void IList.Remove(object? item) { if (IsCompatibleObject(item)) { @@ -864,7 +867,7 @@ public int RemoveAll(Predicate match) int freeIndex = 0; // the first free slot in items array // Find the first item which needs to be removed. - while (freeIndex < _size && !match!(_items[freeIndex])) freeIndex++; // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + while (freeIndex < _size && !match!(_items[freeIndex])) freeIndex++; // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected if (freeIndex >= _size) return 0; int current = freeIndex + 1; @@ -1023,7 +1026,7 @@ public void Sort(Comparison comparison) if (_size > 1) { - ArraySortHelper.Sort(_items, 0, _size, comparison!); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + ArraySortHelper.Sort(_items, 0, _size, comparison!); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected } _version++; } @@ -1082,14 +1085,14 @@ public struct Enumerator : IEnumerator, IEnumerator private readonly List _list; private int _index; private readonly int _version; - private T _current; // TODO-NULLABLE-GENERIC: nullable when T can be null + [AllowNull, MaybeNull] private T _current; internal Enumerator(List list) { _list = list; _index = 0; _version = list._version; - _current = default!; + _current = default!; // TODO-NULLABLE: Remove ! when nullable attributes are respected } public void Dispose() @@ -1117,11 +1120,11 @@ private bool MoveNextRare() } _index = _list._size + 1; - _current = default!; + _current = default!; // TODO-NULLABLE: Remove ! when nullable attributes are respected return false; } - public T Current => _current; + public T Current => _current!; object? IEnumerator.Current { @@ -1143,7 +1146,7 @@ void IEnumerator.Reset() } _index = 0; - _current = default!; + _current = default!; // TODO-NULLABLE: Remove ! when nullable attributes are respected } } } diff --git a/src/Common/src/CoreLib/System/Collections/Generic/NonRandomizedStringEqualityComparer.cs b/src/Common/src/CoreLib/System/Collections/Generic/NonRandomizedStringEqualityComparer.cs index 26ffdf77f633..f042a6bb7b55 100644 --- a/src/Common/src/CoreLib/System/Collections/Generic/NonRandomizedStringEqualityComparer.cs +++ b/src/Common/src/CoreLib/System/Collections/Generic/NonRandomizedStringEqualityComparer.cs @@ -28,9 +28,7 @@ private NonRandomizedStringEqualityComparer(SerializationInfo information, Strea public void GetObjectData(SerializationInfo info, StreamingContext context) { // We are doing this to stay compatible with .NET Framework. -#pragma warning disable CS8631 // TODO-NULLABLE-GENERIC: https://github.com/dotnet/roslyn/issues/35406 info.SetType(typeof(GenericEqualityComparer)); -#pragma warning restore } } } diff --git a/src/Common/src/CoreLib/System/Collections/HashHelpers.SerializationInfoTable.cs b/src/Common/src/CoreLib/System/Collections/HashHelpers.SerializationInfoTable.cs index b3aa57cae910..64cf029d1c70 100644 --- a/src/Common/src/CoreLib/System/Collections/HashHelpers.SerializationInfoTable.cs +++ b/src/Common/src/CoreLib/System/Collections/HashHelpers.SerializationInfoTable.cs @@ -22,7 +22,7 @@ public static ConditionalWeakTable SerializationInfoT if (s_serializationInfoTable == null) Interlocked.CompareExchange(ref s_serializationInfoTable, new ConditionalWeakTable(), null); - return s_serializationInfoTable!; // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/34901 + return s_serializationInfoTable!; // TODO-NULLABLE: Remove ! when compiler specially-recognizes CompareExchange for nullability } } } diff --git a/src/Common/src/CoreLib/System/Collections/IDictionary.cs b/src/Common/src/CoreLib/System/Collections/IDictionary.cs index 0389563b990b..551250062726 100644 --- a/src/Common/src/CoreLib/System/Collections/IDictionary.cs +++ b/src/Common/src/CoreLib/System/Collections/IDictionary.cs @@ -2,6 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System.Diagnostics.CodeAnalysis; + namespace System.Collections { // An IDictionary is a possibly unordered set of key-value pairs. @@ -13,46 +15,36 @@ public interface IDictionary : ICollection // Interfaces are not serializable // The Item property provides methods to read and edit entries // in the Dictionary. - object? this[object key] // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/2384 + [DisallowNull] + object? this[object key] { get; set; } // Returns a collections of the keys in this dictionary. - ICollection Keys - { - get; - } + ICollection Keys {get; } // Returns a collections of the values in this dictionary. - ICollection Values - { - get; - } + ICollection Values { get; } // Returns whether this dictionary contains a particular key. - // bool Contains(object key); // Adds a key-value pair to the dictionary. - // void Add(object key, object? value); // Removes all pairs from the dictionary. void Clear(); - bool IsReadOnly - { get; } + bool IsReadOnly { get; } - bool IsFixedSize - { get; } + bool IsFixedSize { get; } // Returns an IDictionaryEnumerator for this dictionary. new IDictionaryEnumerator GetEnumerator(); // Removes a particular key from the dictionary. - // void Remove(object key); } } diff --git a/src/Common/src/CoreLib/System/Collections/ListDictionaryInternal.cs b/src/Common/src/CoreLib/System/Collections/ListDictionaryInternal.cs index 13daac564b7c..b6b546297f8d 100644 --- a/src/Common/src/CoreLib/System/Collections/ListDictionaryInternal.cs +++ b/src/Common/src/CoreLib/System/Collections/ListDictionaryInternal.cs @@ -283,7 +283,7 @@ public NodeEnumerator(ListDictionaryInternal list) current = null; } -#pragma warning disable CS8612 // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/30958 +#pragma warning disable CS8612 // TODO-NULLABLE: Covariant parameter types (https://github.com/dotnet/roslyn/issues/30958) public object Current #pragma warning restore CS8612 { diff --git a/src/Common/src/CoreLib/System/Collections/ObjectModel/Collection.cs b/src/Common/src/CoreLib/System/Collections/ObjectModel/Collection.cs index f8c9b87344f1..6cf843809e5c 100644 --- a/src/Common/src/CoreLib/System/Collections/ObjectModel/Collection.cs +++ b/src/Common/src/CoreLib/System/Collections/ObjectModel/Collection.cs @@ -26,7 +26,7 @@ public Collection(IList list) { ThrowHelper.ThrowArgumentNullException(ExceptionArgument.list); } - items = list!; // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + items = list!; // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected } public int Count @@ -133,7 +133,7 @@ public void InsertRange(int index, IEnumerable collection) ThrowHelper.ThrowArgumentOutOfRange_IndexException(); } - InsertItemsRange(index, collection!); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + InsertItemsRange(index, collection!); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected } public bool Remove(T item) @@ -201,7 +201,7 @@ public void ReplaceRange(int index, int count, IEnumerable collection) ThrowHelper.ThrowArgumentNullException(ExceptionArgument.collection); } - ReplaceItemsRange(index, count, collection!); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + ReplaceItemsRange(index, count, collection!); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected } public void RemoveAt(int index) @@ -308,7 +308,7 @@ void ICollection.CopyTo(Array array, int index) ThrowHelper.ThrowArgumentNullException(ExceptionArgument.array); } - if (array!.Rank != 1) // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + if (array!.Rank != 1) // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected { ThrowHelper.ThrowArgumentException(ExceptionResource.Arg_RankMultiDimNotSupported); } @@ -362,7 +362,7 @@ void ICollection.CopyTo(Array array, int index) { for (int i = 0; i < count; i++) { - objects![index++] = items[i]; // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + objects![index++] = items[i]; // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected } } catch (ArrayTypeMismatchException) @@ -381,7 +381,7 @@ void ICollection.CopyTo(Array array, int index) try { - this[index] = (T)value!; // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + this[index] = (T)value!; } catch (InvalidCastException) { @@ -424,7 +424,7 @@ int IList.Add(object? value) try { - Add((T)value!); // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + Add((T)value!); } catch (InvalidCastException) { @@ -438,7 +438,7 @@ bool IList.Contains(object? value) { if (IsCompatibleObject(value)) { - return Contains((T)value!); // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + return Contains((T)value!); } return false; } @@ -447,7 +447,7 @@ int IList.IndexOf(object? value) { if (IsCompatibleObject(value)) { - return IndexOf((T)value!); // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + return IndexOf((T)value!); } return -1; } @@ -462,7 +462,7 @@ void IList.Insert(int index, object? value) try { - Insert(index, (T)value!); // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + Insert(index, (T)value!); } catch (InvalidCastException) { @@ -479,7 +479,7 @@ void IList.Remove(object? value) if (IsCompatibleObject(value)) { - Remove((T)value!); // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + Remove((T)value!); } } diff --git a/src/Common/src/CoreLib/System/Collections/ObjectModel/ReadOnlyCollection.cs b/src/Common/src/CoreLib/System/Collections/ObjectModel/ReadOnlyCollection.cs index c29d44945e83..69b342416943 100644 --- a/src/Common/src/CoreLib/System/Collections/ObjectModel/ReadOnlyCollection.cs +++ b/src/Common/src/CoreLib/System/Collections/ObjectModel/ReadOnlyCollection.cs @@ -21,7 +21,7 @@ public ReadOnlyCollection(IList list) { ThrowHelper.ThrowArgumentNullException(ExceptionArgument.list); } - this.list = list!; // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + this.list = list!; // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected } public int Count @@ -127,7 +127,7 @@ void ICollection.CopyTo(Array array, int index) ThrowHelper.ThrowArgumentNullException(ExceptionArgument.array); } - if (array!.Rank != 1) // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + if (array!.Rank != 1) // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected { ThrowHelper.ThrowArgumentException(ExceptionResource.Arg_RankMultiDimNotSupported); } @@ -181,7 +181,7 @@ void ICollection.CopyTo(Array array, int index) { for (int i = 0; i < count; i++) { - objects![index++] = list[i]; // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + objects![index++] = list[i]; // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected } } catch (ArrayTypeMismatchException) @@ -232,7 +232,7 @@ bool IList.Contains(object? value) { if (IsCompatibleObject(value)) { - return Contains((T)value!); // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + return Contains((T)value!); } return false; } @@ -241,7 +241,7 @@ int IList.IndexOf(object? value) { if (IsCompatibleObject(value)) { - return IndexOf((T)value!); // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + return IndexOf((T)value!); } return -1; } diff --git a/src/Common/src/CoreLib/System/Convert.cs b/src/Common/src/CoreLib/System/Convert.cs index 46192a2c01a4..412528ce2617 100644 --- a/src/Common/src/CoreLib/System/Convert.cs +++ b/src/Common/src/CoreLib/System/Convert.cs @@ -11,6 +11,7 @@ using System.Runtime.Versioning; using System.Security; using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; namespace System { @@ -311,7 +312,8 @@ internal static object DefaultToType(IConvertible value, Type targetType, IForma return ChangeType(value, conversionType, CultureInfo.CurrentCulture); } - public static object? ChangeType(object? value, Type conversionType, IFormatProvider? provider) // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + [return: NotNullIfNotNull("value")] + public static object? ChangeType(object? value, Type conversionType, IFormatProvider? provider) { if (conversionType is null) { @@ -372,22 +374,31 @@ internal static object DefaultToType(IConvertible value, Type targetType, IForma return ic.ToType(conversionType, provider); } + [DoesNotReturn] private static void ThrowCharOverflowException() { throw new OverflowException(SR.Overflow_Char); } + [DoesNotReturn] private static void ThrowByteOverflowException() { throw new OverflowException(SR.Overflow_Byte); } + [DoesNotReturn] private static void ThrowSByteOverflowException() { throw new OverflowException(SR.Overflow_SByte); } + [DoesNotReturn] private static void ThrowInt16OverflowException() { throw new OverflowException(SR.Overflow_Int16); } + [DoesNotReturn] private static void ThrowUInt16OverflowException() { throw new OverflowException(SR.Overflow_UInt16); } + [DoesNotReturn] private static void ThrowInt32OverflowException() { throw new OverflowException(SR.Overflow_Int32); } + [DoesNotReturn] private static void ThrowUInt32OverflowException() { throw new OverflowException(SR.Overflow_UInt32); } + [DoesNotReturn] private static void ThrowInt64OverflowException() { throw new OverflowException(SR.Overflow_Int64); } + [DoesNotReturn] private static void ThrowUInt64OverflowException() { throw new OverflowException(SR.Overflow_UInt64); } // Conversions to Boolean @@ -2153,14 +2164,16 @@ public static string ToString(DateTime value, IFormatProvider? provider) return value.ToString(provider); } - public static string? ToString(string? value) // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + [return: NotNullIfNotNull("value")] + public static string? ToString(string? value) { return value; } - public static string? ToString(string? value, IFormatProvider? provider) // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + [return: NotNullIfNotNull("value")] + public static string? ToString(string? value, IFormatProvider? provider) { - return value; // avoid the null check + return value; } diff --git a/src/Common/src/CoreLib/System/DateTimeOffset.cs b/src/Common/src/CoreLib/System/DateTimeOffset.cs index d2cb079f801b..e328726a4075 100644 --- a/src/Common/src/CoreLib/System/DateTimeOffset.cs +++ b/src/Common/src/CoreLib/System/DateTimeOffset.cs @@ -658,7 +658,7 @@ public static DateTimeOffset Parse(string input) public static DateTimeOffset Parse(string input, IFormatProvider? formatProvider) { if (input == null) ThrowHelper.ThrowArgumentNullException(ExceptionArgument.input); - return Parse(input!, formatProvider, DateTimeStyles.None); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + return Parse(input!, formatProvider, DateTimeStyles.None); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected } public static DateTimeOffset Parse(string input, IFormatProvider? formatProvider, DateTimeStyles styles) @@ -689,7 +689,7 @@ public static DateTimeOffset ParseExact(string input, string format, IFormatProv { if (input == null) ThrowHelper.ThrowArgumentNullException(ExceptionArgument.input); if (format == null) ThrowHelper.ThrowArgumentNullException(ExceptionArgument.format); - return ParseExact(input!, format!, formatProvider, DateTimeStyles.None); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + return ParseExact(input!, format!, formatProvider, DateTimeStyles.None); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected } // Constructs a DateTimeOffset from a string. The string must specify a diff --git a/src/Common/src/CoreLib/System/DefaultBinder.cs b/src/Common/src/CoreLib/System/DefaultBinder.cs index f911619ae619..32fa9f625332 100644 --- a/src/Common/src/CoreLib/System/DefaultBinder.cs +++ b/src/Common/src/CoreLib/System/DefaultBinder.cs @@ -84,7 +84,7 @@ public sealed override MethodBase BindToMethod( { if (args[i] != null) { - argTypes[i] = args[i]!.GetType(); //TODO-NULLABLE https://github.com/dotnet/csharplang/issues/2388 + argTypes[i] = args[i]!.GetType(); } } #endregion @@ -106,7 +106,7 @@ public sealed override MethodBase BindToMethod( continue; // Validate the parameters. - ParameterInfo[] par = candidates[i]!.GetParametersNoCopy(); // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/34644 + ParameterInfo[] par = candidates[i]!.GetParametersNoCopy(); // TODO-NULLABLE: Indexer nullability tracked (https://github.com/dotnet/roslyn/issues/34644) #region Match method by parameter count if (par.Length == 0) @@ -114,7 +114,7 @@ public sealed override MethodBase BindToMethod( #region No formal parameters if (args.Length != 0) { - if ((candidates[i]!.CallingConvention & CallingConventions.VarArgs) == 0) // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/34644 + if ((candidates[i]!.CallingConvention & CallingConventions.VarArgs) == 0) // TODO-NULLABLE: Indexer nullability tracked (https://github.com/dotnet/roslyn/issues/34644) continue; } diff --git a/src/Common/src/CoreLib/System/Delegate.cs b/src/Common/src/CoreLib/System/Delegate.cs index 5c4def4b4301..62c3910f9b03 100644 --- a/src/Common/src/CoreLib/System/Delegate.cs +++ b/src/Common/src/CoreLib/System/Delegate.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System.Diagnostics.CodeAnalysis; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Serialization; @@ -12,7 +13,9 @@ public abstract partial class Delegate : ICloneable, ISerializable { public virtual object Clone() => MemberwiseClone(); - public static Delegate? Combine(Delegate? a, Delegate? b) // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + [return: NotNullIfNotNull("a")] + [return: NotNullIfNotNull("b")] + public static Delegate? Combine(Delegate? a, Delegate? b) { if (a is null) return b; @@ -20,7 +23,7 @@ public abstract partial class Delegate : ICloneable, ISerializable return a.CombineImpl(b); } - public static Delegate? Combine(params Delegate?[]? delegates) // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + public static Delegate? Combine(params Delegate?[]? delegates) { if (delegates == null || delegates.Length == 0) return null; diff --git a/src/Common/src/CoreLib/System/Diagnostics/CodeAnalysis/NullableAttributes.cs b/src/Common/src/CoreLib/System/Diagnostics/CodeAnalysis/NullableAttributes.cs new file mode 100644 index 000000000000..640ff8f35829 --- /dev/null +++ b/src/Common/src/CoreLib/System/Diagnostics/CodeAnalysis/NullableAttributes.cs @@ -0,0 +1,83 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +namespace System.Diagnostics.CodeAnalysis +{ + /// Specifies that null is allowed as an input even if the corresponding type disallows it. + [AttributeUsage(AttributeTargets.Field | AttributeTargets.Parameter | AttributeTargets.Property, Inherited = false)] + public sealed class AllowNullAttribute : Attribute { } + + /// Specifies that null is disallowed as an input even if the corresponding type allows it. + [AttributeUsage(AttributeTargets.Field | AttributeTargets.Parameter | AttributeTargets.Property, Inherited = false)] + public sealed class DisallowNullAttribute : Attribute { } + + /// Specifies that an output may be null even if the corresponding type disallows it. + [AttributeUsage(AttributeTargets.Field | AttributeTargets.Parameter | AttributeTargets.Property | AttributeTargets.ReturnValue, Inherited = false)] + public sealed class MaybeNullAttribute : Attribute { } + + /// Specifies that an output will not be null even if the corresponding type allows it. + [AttributeUsage(AttributeTargets.Field | AttributeTargets.Parameter | AttributeTargets.Property | AttributeTargets.ReturnValue, Inherited = false)] + public sealed class NotNullAttribute : Attribute { } + + /// Specifies that when a method returns , the parameter may be null even if the corresponding type disallows it. + [AttributeUsage(AttributeTargets.Parameter, Inherited = false)] + public sealed class MaybeNullWhenAttribute : Attribute + { + /// Initializes the attribute with the specified return value condition. + /// + /// The return value condition. If the method returns this value, the associated parameter may be null. + /// + public MaybeNullWhenAttribute(bool returnValue) => ReturnValue = returnValue; + + /// Gets the return value condition. + public bool ReturnValue { get; } + } + + /// Specifies that when a method returns , the parameter will not be null even if the corresponding type allows it. + [AttributeUsage(AttributeTargets.Parameter, Inherited = false)] + public sealed class NotNullWhenAttribute : Attribute + { + /// Initializes the attribute with the specified return value condition. + /// + /// The return value condition. If the method returns this value, the associated parameter will not be null. + /// + public NotNullWhenAttribute(bool returnValue) => ReturnValue = returnValue; + + /// Gets the return value condition. + public bool ReturnValue { get; } + } + + /// Specifies that the output will be non-null if the named parameter is non-null. + [AttributeUsage(AttributeTargets.Parameter | AttributeTargets.Property | AttributeTargets.ReturnValue, AllowMultiple = true, Inherited = false)] + public sealed class NotNullIfNotNullAttribute : Attribute + { + /// Initializes the attribute with the associated parameter name. + /// + /// The associated parameter name. The output will be non-null if the argument to the parameter specified is non-null. + /// + public NotNullIfNotNullAttribute(string parameterName) => ParameterName = parameterName; + + /// Gets the associated parameter name. + public string ParameterName { get; } + } + + /// Applied to a method that will never return under any circumstance. + [AttributeUsage(AttributeTargets.Method, Inherited = false)] + public sealed class DoesNotReturnAttribute : Attribute { } + + /// Specifies that the method will not return if the associated Boolean parameter is passed the specified value. + [AttributeUsage(AttributeTargets.Parameter, Inherited = false)] + public sealed class DoesNotReturnIfAttribute : Attribute + { + /// Initializes the attribute with the specified parameter value. + /// + /// The condition parameter value. Code after the method will be considered unreachable by diagnostics if the argument to + /// the associated parameter matches this value. + /// + public DoesNotReturnIfAttribute(bool parameterValue) => ParameterValue = parameterValue; + + /// Gets the condition parameter value. + public bool ParameterValue { get; } + } +} diff --git a/src/Common/src/CoreLib/System/Diagnostics/Contracts/Contracts.cs b/src/Common/src/CoreLib/System/Diagnostics/Contracts/Contracts.cs index 13d13f12fac6..af6c1a333fb9 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/Contracts/Contracts.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/Contracts/Contracts.cs @@ -18,6 +18,7 @@ #define DEBUG // The behavior of this contract library should be consistent regardless of build type. using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; using System.Reflection; namespace System.Diagnostics.Contracts @@ -245,7 +246,7 @@ public static partial class Contract [Pure] [Conditional("DEBUG")] [Conditional("CONTRACTS_FULL")] - public static void Assume(bool condition) + public static void Assume([DoesNotReturnIf(false)] bool condition) { if (!condition) { @@ -264,7 +265,7 @@ public static void Assume(bool condition) [Pure] [Conditional("DEBUG")] [Conditional("CONTRACTS_FULL")] - public static void Assume(bool condition, string? userMessage) + public static void Assume([DoesNotReturnIf(false)] bool condition, string? userMessage) { if (!condition) { @@ -283,7 +284,7 @@ public static void Assume(bool condition, string? userMessage) [Pure] [Conditional("DEBUG")] [Conditional("CONTRACTS_FULL")] - public static void Assert(bool condition) + public static void Assert([DoesNotReturnIf(false)] bool condition) { if (!condition) ReportFailure(ContractFailureKind.Assert, null, null, null); @@ -297,7 +298,7 @@ public static void Assert(bool condition) [Pure] [Conditional("DEBUG")] [Conditional("CONTRACTS_FULL")] - public static void Assert(bool condition, string? userMessage) + public static void Assert([DoesNotReturnIf(false)] bool condition, string? userMessage) { if (!condition) ReportFailure(ContractFailureKind.Assert, userMessage, null, null); diff --git a/src/Common/src/CoreLib/System/Diagnostics/Debug.cs b/src/Common/src/CoreLib/System/Diagnostics/Debug.cs index 8d77fc27acf5..251ac229ea8c 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/Debug.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/Debug.cs @@ -4,6 +4,8 @@ // Do not remove this, it is needed to retain calls to these conditional methods in release builds #define DEBUG + +using System.Diagnostics.CodeAnalysis; using System.Threading; namespace System.Diagnostics @@ -85,19 +87,19 @@ public static void Print(string format, params object?[] args) } [System.Diagnostics.Conditional("DEBUG")] - public static void Assert(bool condition) + public static void Assert([DoesNotReturnIf(false)] bool condition) { Assert(condition, string.Empty, string.Empty); } [System.Diagnostics.Conditional("DEBUG")] - public static void Assert(bool condition, string? message) + public static void Assert([DoesNotReturnIf(false)] bool condition, string? message) { Assert(condition, message, string.Empty); } [System.Diagnostics.Conditional("DEBUG")] - public static void Assert(bool condition, string? message, string? detailMessage) + public static void Assert([DoesNotReturnIf(false)] bool condition, string? message, string? detailMessage) { if (!condition) { @@ -121,19 +123,21 @@ internal static void ContractFailure(string message, string detailMessage, strin } [System.Diagnostics.Conditional("DEBUG")] + [DoesNotReturn] public static void Fail(string? message) { Fail(message, string.Empty); } [System.Diagnostics.Conditional("DEBUG")] + [DoesNotReturn] public static void Fail(string? message, string? detailMessage) { s_provider.Fail(message, detailMessage); } [System.Diagnostics.Conditional("DEBUG")] - public static void Assert(bool condition, string? message, string detailMessageFormat, params object?[] args) + public static void Assert([DoesNotReturnIf(false)] bool condition, string? message, string detailMessageFormat, params object?[] args) { Assert(condition, message, string.Format(detailMessageFormat, args)); } diff --git a/src/Common/src/CoreLib/System/Diagnostics/DebugProvider.cs b/src/Common/src/CoreLib/System/Diagnostics/DebugProvider.cs index 2e828102d488..939f37179ece 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/DebugProvider.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/DebugProvider.cs @@ -97,7 +97,7 @@ private string GetIndentString() int indentCount = Debug.IndentSize * Debug.IndentLevel; if (_indentString?.Length == indentCount) { - return _indentString!; // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/34942 + return _indentString!; // TODO-NULLABLE: Null conditional access (https://github.com/dotnet/roslyn/issues/34942) } return _indentString = new string(' ', indentCount); } diff --git a/src/Common/src/CoreLib/System/Diagnostics/StackTrace.cs b/src/Common/src/CoreLib/System/Diagnostics/StackTrace.cs index 1e3e9f6f579b..107d4eb79615 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/StackTrace.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/StackTrace.cs @@ -226,7 +226,7 @@ internal string ToString(TraceFormat traceFormat) isAsync = typeof(IAsyncStateMachine).IsAssignableFrom(declaringType); if (isAsync || typeof(IEnumerator).IsAssignableFrom(declaringType)) { - methodChanged = TryResolveStateMachineMethod(ref mb!, out declaringType); // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + methodChanged = TryResolveStateMachineMethod(ref mb!, out declaringType); // TODO-NULLABLE: Pass non-null string? to string ref (https://github.com/dotnet/roslyn/issues/34874) } } diff --git a/src/Common/src/CoreLib/System/Diagnostics/Tracing/DiagnosticCounter.cs b/src/Common/src/CoreLib/System/Diagnostics/Tracing/DiagnosticCounter.cs index 84450ab11cb8..af48288f9ae7 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/Tracing/DiagnosticCounter.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/Tracing/DiagnosticCounter.cs @@ -59,7 +59,7 @@ public void Dispose() if (_group != null) { _group.Remove(this); - _group = null!; // TODO-NULLABLE: should not be nulled out + _group = null!; // TODO-NULLABLE: Avoid nulling out in Dispose } } diff --git a/src/Common/src/CoreLib/System/Diagnostics/Tracing/EventProvider.cs b/src/Common/src/CoreLib/System/Diagnostics/Tracing/EventProvider.cs index caa7fae6e874..fde1b47d4449 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/Tracing/EventProvider.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/Tracing/EventProvider.cs @@ -322,7 +322,7 @@ unsafe void EtwEnableCallBack( GetDataFromController(etwSessionId, filterData, out command, out data, out keyIndex)) { args = new Dictionary(4); - Debug.Assert(data != null); // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + Debug.Assert(data != null); while (keyIndex < data.Length) { int keyEnd = FindNull(data, keyIndex); @@ -602,7 +602,7 @@ private static int IndexOfSessionInList(List? sessions, int etwSess /// starts, and the command being issued associated with that data. /// private unsafe bool GetDataFromController(int etwSessionId, - Interop.Advapi32.EVENT_FILTER_DESCRIPTOR* filterData, out ControllerCommand command, out byte[]? data, out int dataStart) + Interop.Advapi32.EVENT_FILTER_DESCRIPTOR* filterData, out ControllerCommand command, out byte[]? data, out int dataStart) { data = null; dataStart = 0; diff --git a/src/Common/src/CoreLib/System/Diagnostics/Tracing/EventSource.cs b/src/Common/src/CoreLib/System/Diagnostics/Tracing/EventSource.cs index 9f59da9dfb55..6412676f26ee 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/Tracing/EventSource.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/Tracing/EventSource.cs @@ -164,7 +164,6 @@ // opportunity to expose this format to EventListeners in the future. // using System; -using System.Runtime.CompilerServices; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Diagnostics; @@ -1365,14 +1364,14 @@ protected virtual void Dispose(bool disposing) if (m_etwProvider != null) { m_etwProvider.Dispose(); - m_etwProvider = null!; // TODO-NULLABLE: should not be nulled out on Dispose + m_etwProvider = null!; // TODO-NULLABLE: Avoid nulling out in Dispose } #endif #if FEATURE_PERFTRACING if (m_eventPipeProvider != null) { m_eventPipeProvider.Dispose(); - m_eventPipeProvider = null!; // TODO-NULLABLE: should not be nulled out on Dispose + m_eventPipeProvider = null!; // TODO-NULLABLE: Avoid nulling out in Dispose } #endif } @@ -1735,7 +1734,7 @@ private static Guid GenerateGuidFromName(string name) hash.Start(); hash.Append(namespaceBytes); hash.Append(bytes); - Array.Resize(ref bytes!, 16); // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + Array.Resize(ref bytes!, 16); // TODO-NULLABLE: Remove ! when nullable attributes are respected hash.Finish(bytes); bytes[7] = unchecked((byte)((bytes[7] & 0x0F) | 0x50)); // Set high 4 bits of octet 7 to 5, as per RFC 4122 @@ -3106,7 +3105,7 @@ internal static Attribute GetCustomAttributeHelper(Type type, Type attributeType foreach (CustomAttributeNamedArgument namedArgument in data.NamedArguments) { - PropertyInfo p = t.GetProperty(namedArgument.MemberInfo.Name, BindingFlags.Public | BindingFlags.Instance)!; // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + PropertyInfo p = t.GetProperty(namedArgument.MemberInfo.Name, BindingFlags.Public | BindingFlags.Instance)!; object value = namedArgument.TypedValue.Value!; if (p.PropertyType.IsEnum) @@ -3430,7 +3429,7 @@ private static bool AttributeTypeNamesMatch(Type attributeType, Type reflectedAt // overwrite inline message with the localized message if (msg != null) eventAttribute.Message = msg; - AddEventDescriptor(ref eventData!, eventName, eventAttribute, args, hasRelatedActivityID); // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/34874 + AddEventDescriptor(ref eventData!, eventName, eventAttribute, args, hasRelatedActivityID); // TODO-NULLABLE: Remove ! when nullable attributes are respected } } } @@ -3441,7 +3440,7 @@ private static bool AttributeTypeNamesMatch(Type attributeType, Type reflectedAt if (source != null) { Debug.Assert(eventData != null); - TrimEventDescriptors(ref eventData!); // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/34874 + TrimEventDescriptors(ref eventData!); // TODO-NULLABLE: Pass non-null string? to string ref (https://github.com/dotnet/roslyn/issues/34874) source.m_eventData = eventData; // officially initialize it. We do this at most once (it is racy otherwise). #if FEATURE_MANAGED_ETW_CHANNELS source.m_channelData = manifest.GetChannelData(); @@ -3473,12 +3472,11 @@ private static bool AttributeTypeNamesMatch(Type attributeType, Type reflectedAt exception = e; } - // TODO-NULLABLE: possible bug: if error is thrown before manifest is assigned in non-strict mode, this will NRE - if ((flags & EventManifestOptions.Strict) != 0 && (manifest!.Errors.Count > 0 || exception != null)) + if ((flags & EventManifestOptions.Strict) != 0 && (manifest?.Errors.Count > 0 || exception != null)) { string msg = string.Empty; - if (manifest.Errors.Count > 0) + if (manifest?.Errors.Count > 0) { bool firstError = true; foreach (string error in manifest.Errors) @@ -3554,13 +3552,15 @@ private static void AddProviderEnumKind(ManifestBuilder manifest, FieldInfo stat // Helper used by code:CreateManifestAndDescriptors to add a code:EventData descriptor for a method // with the code:EventAttribute 'eventAttribute'. resourceManger may be null in which case we populate it // it is populated if we need to look up message resources - private static void AddEventDescriptor(ref EventMetadata[] eventData, string eventName, - EventAttribute eventAttribute, ParameterInfo[] eventParameters, - bool hasRelatedActivityID) + private static void AddEventDescriptor( + [NotNull] ref EventMetadata[] eventData, + string eventName, + EventAttribute eventAttribute, + ParameterInfo[] eventParameters, + bool hasRelatedActivityID) { - if (eventData == null || eventData.Length <= eventAttribute.EventId) + if (eventData.Length <= eventAttribute.EventId) { - Debug.Assert(eventData != null); // TODO-NULLABLE: possible bug in the code: NRE when eventData == null EventMetadata[] newValues = new EventMetadata[Math.Max(eventData.Length + 16, eventAttribute.EventId + 1)]; Array.Copy(eventData, 0, newValues, 0, eventData.Length); eventData = newValues; @@ -4509,7 +4509,7 @@ internal static object EventListenersLock { if (s_EventSources == null) Interlocked.CompareExchange(ref s_EventSources, new List(2), null); - return s_EventSources!; // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/34901 + return s_EventSources!; // TODO-NULLABLE: Remove ! when compiler specially-recognizes CompareExchange for nullability } } @@ -6045,7 +6045,7 @@ private static string GetLevelName(EventLevel level) if (resources != null && eventMessage == null) eventMessage = resources.GetString("event_" + eventName, CultureInfo.InvariantCulture); - Debug.Assert(info.Attribs != null); // TODO-NULLABLE: Bug - Attribs is documented that it can be null in which case this code will NRE + Debug.Assert(info.Attribs != null); if (info.Attribs.EventChannelType == EventChannelType.Admin && eventMessage == null) ManifestError(SR.Format(SR.EventSource_EventWithAdminChannelMustHaveMessage, eventName, info.Name)); return info.Name; @@ -6187,7 +6187,7 @@ private string GetTypeName(Type type) } } - private static void UpdateStringBuilder(ref StringBuilder? stringBuilder, string eventMessage, int startIndex, int count) // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 nullable in, non-nullable out + private static void UpdateStringBuilder([NotNull] ref StringBuilder? stringBuilder, string eventMessage, int startIndex, int count) { if (stringBuilder == null) stringBuilder = new StringBuilder(); @@ -6209,14 +6209,14 @@ private string TranslateToManifestConvention(string eventMessage, string evtName if (stringBuilder == null) return eventMessage; UpdateStringBuilder(ref stringBuilder, eventMessage, writtenSoFar, i - writtenSoFar); - return stringBuilder!.ToString(); // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + return stringBuilder!.ToString(); // TODO-NULLABLE: Remove ! when nullable attributes are respected } if (eventMessage[i] == '%') { // handle format message escaping character '%' by escaping it UpdateStringBuilder(ref stringBuilder, eventMessage, writtenSoFar, i - writtenSoFar); - stringBuilder!.Append("%%"); // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + stringBuilder!.Append("%%"); // TODO-NULLABLE: Remove ! when nullable attributes are respected i++; writtenSoFar = i; } @@ -6225,7 +6225,7 @@ private string TranslateToManifestConvention(string eventMessage, string evtName { // handle C# escaped '{" and '}' UpdateStringBuilder(ref stringBuilder, eventMessage, writtenSoFar, i - writtenSoFar); - stringBuilder!.Append(eventMessage[i]); // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + stringBuilder!.Append(eventMessage[i]); // TODO-NULLABLE: Remove ! when nullable attributes are respected i++; i++; writtenSoFar = i; } @@ -6244,7 +6244,7 @@ private string TranslateToManifestConvention(string eventMessage, string evtName i++; UpdateStringBuilder(ref stringBuilder, eventMessage, writtenSoFar, leftBracket - writtenSoFar); int manIndex = TranslateIndexToManifestConvention(argNum, evtName); - stringBuilder!.Append('%').Append(manIndex); // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + stringBuilder!.Append('%').Append(manIndex); // TODO-NULLABLE: Remove ! when nullable attributes are respected // An '!' after the insert specifier {n} will be interpreted as a literal. // We'll escape it so that mc.exe does not attempt to consider it the // beginning of a format string. @@ -6264,7 +6264,7 @@ private string TranslateToManifestConvention(string eventMessage, string evtName { UpdateStringBuilder(ref stringBuilder, eventMessage, writtenSoFar, i - writtenSoFar); i++; - stringBuilder!.Append(s_escapes[chIdx]); // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + stringBuilder!.Append(s_escapes[chIdx]); // TODO-NULLABLE: Remove ! when nullable attributes are respected writtenSoFar = i; } else diff --git a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/ConcurrentSet.cs b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/ConcurrentSet.cs index a15dfaa79737..fca673de58d5 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/ConcurrentSet.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/ConcurrentSet.cs @@ -110,7 +110,7 @@ public ItemType GetOrAdd(ItemType newItem) Array.Copy(oldItems, lo, newItems, lo + 1, oldLength - lo); } - newItems = Interlocked.CompareExchange(ref this.items, newItems, oldItems)!; // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/34901 + newItems = Interlocked.CompareExchange(ref this.items, newItems, oldItems)!; if (oldItems != newItems) { oldItems = newItems; diff --git a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/EventPayload.cs b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/EventPayload.cs index 010d5127e598..3572352111ca 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/EventPayload.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/EventPayload.cs @@ -3,9 +3,10 @@ // See the LICENSE file in the project root for more information. using System; -using System.Collections.Generic; using System.Collections; +using System.Collections.Generic; using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; #if !ES_BUILD_AGAINST_DOTNET_V35 using Contract = System.Diagnostics.Contracts.Contract; @@ -128,7 +129,7 @@ public bool Remove(KeyValuePair entry) throw new System.NotSupportedException(); } - public bool TryGetValue(string key, out object? value) + public bool TryGetValue(string key, [MaybeNullWhen(false)] out object? value) { if (key == null) throw new System.ArgumentNullException(nameof(key)); diff --git a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/PropertyValue.cs b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/PropertyValue.cs index 61ed20422542..3d0afdd77433 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/PropertyValue.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/PropertyValue.cs @@ -241,32 +241,32 @@ public override Func GetPropertyGetter(PropertyInf if (!Statics.IsValueType(type)) { var getter = (Func)GetGetMethod(property, type); - return container => new PropertyValue(getter((TContainer)container.ReferenceValue!)); // TODO-NULLABLE-GENERIC: Re-review + return container => new PropertyValue(getter((TContainer)container.ReferenceValue!)); } else { if (type.GetTypeInfo().IsEnum) type = Enum.GetUnderlyingType(type); - if (type == typeof(bool)) { var f = (Func)GetGetMethod(property, type); return container => new PropertyValue(f((TContainer)container.ReferenceValue!)); } // TODO-NULLABLE-GENERIC: Re-review - if (type == typeof(byte)) { var f = (Func)GetGetMethod(property, type); return container => new PropertyValue(f((TContainer)container.ReferenceValue!)); } // TODO-NULLABLE-GENERIC: Re-review - if (type == typeof(sbyte)) { var f = (Func)GetGetMethod(property, type); return container => new PropertyValue(f((TContainer)container.ReferenceValue!)); } // TODO-NULLABLE-GENERIC: Re-review - if (type == typeof(char)) { var f = (Func)GetGetMethod(property, type); return container => new PropertyValue(f((TContainer)container.ReferenceValue!)); } // TODO-NULLABLE-GENERIC: Re-review - if (type == typeof(short)) { var f = (Func)GetGetMethod(property, type); return container => new PropertyValue(f((TContainer)container.ReferenceValue!)); } // TODO-NULLABLE-GENERIC: Re-review - if (type == typeof(ushort)) { var f = (Func)GetGetMethod(property, type); return container => new PropertyValue(f((TContainer)container.ReferenceValue!)); } // TODO-NULLABLE-GENERIC: Re-review - if (type == typeof(int)) { var f = (Func)GetGetMethod(property, type); return container => new PropertyValue(f((TContainer)container.ReferenceValue!)); } // TODO-NULLABLE-GENERIC: Re-review - if (type == typeof(uint)) { var f = (Func)GetGetMethod(property, type); return container => new PropertyValue(f((TContainer)container.ReferenceValue!)); } // TODO-NULLABLE-GENERIC: Re-review - if (type == typeof(long)) { var f = (Func)GetGetMethod(property, type); return container => new PropertyValue(f((TContainer)container.ReferenceValue!)); } // TODO-NULLABLE-GENERIC: Re-review - if (type == typeof(ulong)) { var f = (Func)GetGetMethod(property, type); return container => new PropertyValue(f((TContainer)container.ReferenceValue!)); } // TODO-NULLABLE-GENERIC: Re-review - if (type == typeof(IntPtr)) { var f = (Func)GetGetMethod(property, type); return container => new PropertyValue(f((TContainer)container.ReferenceValue!)); } // TODO-NULLABLE-GENERIC: Re-review - if (type == typeof(UIntPtr)) { var f = (Func)GetGetMethod(property, type); return container => new PropertyValue(f((TContainer)container.ReferenceValue!)); } // TODO-NULLABLE-GENERIC: Re-review - if (type == typeof(float)) { var f = (Func)GetGetMethod(property, type); return container => new PropertyValue(f((TContainer)container.ReferenceValue!)); } // TODO-NULLABLE-GENERIC: Re-review - if (type == typeof(double)) { var f = (Func)GetGetMethod(property, type); return container => new PropertyValue(f((TContainer)container.ReferenceValue!)); } // TODO-NULLABLE-GENERIC: Re-review - if (type == typeof(Guid)) { var f = (Func)GetGetMethod(property, type); return container => new PropertyValue(f((TContainer)container.ReferenceValue!)); } // TODO-NULLABLE-GENERIC: Re-review - if (type == typeof(DateTime)) { var f = (Func)GetGetMethod(property, type); return container => new PropertyValue(f((TContainer)container.ReferenceValue!)); } // TODO-NULLABLE-GENERIC: Re-review - if (type == typeof(DateTimeOffset)) { var f = (Func)GetGetMethod(property, type); return container => new PropertyValue(f((TContainer)container.ReferenceValue!)); } // TODO-NULLABLE-GENERIC: Re-review - if (type == typeof(TimeSpan)) { var f = (Func)GetGetMethod(property, type); return container => new PropertyValue(f((TContainer)container.ReferenceValue!)); } // TODO-NULLABLE-GENERIC: Re-review - if (type == typeof(decimal)) { var f = (Func)GetGetMethod(property, type); return container => new PropertyValue(f((TContainer)container.ReferenceValue!)); } // TODO-NULLABLE-GENERIC: Re-review + if (type == typeof(bool)) { var f = (Func)GetGetMethod(property, type); return container => new PropertyValue(f((TContainer)container.ReferenceValue!)); } + if (type == typeof(byte)) { var f = (Func)GetGetMethod(property, type); return container => new PropertyValue(f((TContainer)container.ReferenceValue!)); } + if (type == typeof(sbyte)) { var f = (Func)GetGetMethod(property, type); return container => new PropertyValue(f((TContainer)container.ReferenceValue!)); } + if (type == typeof(char)) { var f = (Func)GetGetMethod(property, type); return container => new PropertyValue(f((TContainer)container.ReferenceValue!)); } + if (type == typeof(short)) { var f = (Func)GetGetMethod(property, type); return container => new PropertyValue(f((TContainer)container.ReferenceValue!)); } + if (type == typeof(ushort)) { var f = (Func)GetGetMethod(property, type); return container => new PropertyValue(f((TContainer)container.ReferenceValue!)); } + if (type == typeof(int)) { var f = (Func)GetGetMethod(property, type); return container => new PropertyValue(f((TContainer)container.ReferenceValue!)); } + if (type == typeof(uint)) { var f = (Func)GetGetMethod(property, type); return container => new PropertyValue(f((TContainer)container.ReferenceValue!)); } + if (type == typeof(long)) { var f = (Func)GetGetMethod(property, type); return container => new PropertyValue(f((TContainer)container.ReferenceValue!)); } + if (type == typeof(ulong)) { var f = (Func)GetGetMethod(property, type); return container => new PropertyValue(f((TContainer)container.ReferenceValue!)); } + if (type == typeof(IntPtr)) { var f = (Func)GetGetMethod(property, type); return container => new PropertyValue(f((TContainer)container.ReferenceValue!)); } + if (type == typeof(UIntPtr)) { var f = (Func)GetGetMethod(property, type); return container => new PropertyValue(f((TContainer)container.ReferenceValue!)); } + if (type == typeof(float)) { var f = (Func)GetGetMethod(property, type); return container => new PropertyValue(f((TContainer)container.ReferenceValue!)); } + if (type == typeof(double)) { var f = (Func)GetGetMethod(property, type); return container => new PropertyValue(f((TContainer)container.ReferenceValue!)); } + if (type == typeof(Guid)) { var f = (Func)GetGetMethod(property, type); return container => new PropertyValue(f((TContainer)container.ReferenceValue!)); } + if (type == typeof(DateTime)) { var f = (Func)GetGetMethod(property, type); return container => new PropertyValue(f((TContainer)container.ReferenceValue!)); } + if (type == typeof(DateTimeOffset)) { var f = (Func)GetGetMethod(property, type); return container => new PropertyValue(f((TContainer)container.ReferenceValue!)); } + if (type == typeof(TimeSpan)) { var f = (Func)GetGetMethod(property, type); return container => new PropertyValue(f((TContainer)container.ReferenceValue!)); } + if (type == typeof(decimal)) { var f = (Func)GetGetMethod(property, type); return container => new PropertyValue(f((TContainer)container.ReferenceValue!)); } return container => new PropertyValue(property.GetValue(container.ReferenceValue)); } diff --git a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/Statics.cs b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/Statics.cs index 379a67ad1e11..0affe93dea7b 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/Statics.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/Statics.cs @@ -10,6 +10,7 @@ using Encoding = System.Text.Encoding; using Microsoft.Reflection; +using System.Diagnostics.CodeAnalysis; #if ES_BUILD_STANDALONE using Environment = Microsoft.Diagnostics.Tracing.Internal.Environment; @@ -421,10 +422,10 @@ public static bool HasCustomAttribute( return result; } - public static AttributeType GetCustomAttribute(PropertyInfo propInfo) - where AttributeType : Attribute? + public static AttributeType? GetCustomAttribute(PropertyInfo propInfo) + where AttributeType : Attribute { - AttributeType result = null!; // TODO-NULLABLE-GENERIC: re-review + AttributeType? result = null; #if (ES_BUILD_PCL || ES_BUILD_PN) foreach (var attrib in propInfo.GetCustomAttributes(false)) { @@ -441,10 +442,10 @@ public static AttributeType GetCustomAttribute(PropertyInfo propI return result; } - public static AttributeType GetCustomAttribute(Type type) - where AttributeType : Attribute? + public static AttributeType? GetCustomAttribute(Type type) + where AttributeType : Attribute { - AttributeType result = null!; // TODO-NULLABLE-GENERIC: re-review + AttributeType? result = null; #if (ES_BUILD_PCL || ES_BUILD_PN) foreach (var attrib in type.GetTypeInfo().GetCustomAttributes(false)) { @@ -537,9 +538,9 @@ public static TraceLoggingTypeInfo CreateDefaultTypeInfo( recursionCheck.Add(dataType); - var eventAttrib = Statics.GetCustomAttribute(dataType); + var eventAttrib = Statics.GetCustomAttribute(dataType); if (eventAttrib != null || - Statics.GetCustomAttribute(dataType) != null || + Statics.GetCustomAttribute(dataType) != null || IsGenericMatch(dataType, typeof(KeyValuePair<,>))) { var analysis = new TypeAnalysis(dataType, eventAttrib, recursionCheck); diff --git a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/TypeAnalysis.cs b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/TypeAnalysis.cs index 3ade2b299227..ff99f5ea5802 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/TypeAnalysis.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/Tracing/TraceLogging/TypeAnalysis.cs @@ -59,7 +59,7 @@ public TypeAnalysis( var propertyType = propertyInfo.PropertyType; var propertyTypeInfo = TraceLoggingTypeInfo.GetInstance(propertyType, recursionCheck); - var fieldAttribute = Statics.GetCustomAttribute(propertyInfo); + var fieldAttribute = Statics.GetCustomAttribute(propertyInfo); string propertyName = fieldAttribute != null && fieldAttribute.Name != null diff --git a/src/Common/src/CoreLib/System/Enum.cs b/src/Common/src/CoreLib/System/Enum.cs index 0f07c75bcf96..df7c1eeadd8d 100644 --- a/src/Common/src/CoreLib/System/Enum.cs +++ b/src/Common/src/CoreLib/System/Enum.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Reflection; using System.Runtime.CompilerServices; @@ -493,7 +494,7 @@ private static bool TryParse(string? value, bool ignoreCase, bool throwOn default: parsed = TryParseRareEnum(rt, value, valueSpan, ignoreCase, throwOnFailure, out object? objectResult); - result = parsed ? (TEnum)objectResult! : default; // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/34976 + result = parsed ? (TEnum)objectResult! : default; return parsed; } } @@ -645,7 +646,7 @@ private static bool TryParseUInt64Enum(RuntimeType enumType, string? originalVal } /// Tries to parse the value of an enum with an underlying type that can't be expressed in C# (e.g. char, bool, double, etc.) - private static bool TryParseRareEnum(RuntimeType enumType, string? originalValueString, ReadOnlySpan value, bool ignoreCase, bool throwOnFailure, out object? result) + private static bool TryParseRareEnum(RuntimeType enumType, string? originalValueString, ReadOnlySpan value, bool ignoreCase, bool throwOnFailure, [NotNullWhen(true)] out object? result) { Debug.Assert( enumType.GetEnumUnderlyingType() != typeof(sbyte) && diff --git a/src/Common/src/CoreLib/System/Environment.Unix.cs b/src/Common/src/CoreLib/System/Environment.Unix.cs index fa343aca75ee..0d802dcec909 100644 --- a/src/Common/src/CoreLib/System/Environment.Unix.cs +++ b/src/Common/src/CoreLib/System/Environment.Unix.cs @@ -75,14 +75,16 @@ private static string GetFolderPathCore(SpecialFolder folder, SpecialFolderOptio { Debug.Assert(option == SpecialFolderOption.Create); +#pragma warning disable CS8634 // TODO-NULLABLE: Remove warning disable when nullable attributes are respected // TODO #11151: Replace with Directory.CreateDirectory once we have access to System.IO.FileSystem here. Func createDirectory = LazyInitializer.EnsureInitialized(ref s_directoryCreateDirectory, () => { Type dirType = Type.GetType("System.IO.Directory, System.IO.FileSystem, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", throwOnError: true)!; MethodInfo mi = dirType.GetTypeInfo().GetDeclaredMethod("CreateDirectory")!; return (Func)mi.CreateDelegate(typeof(Func)); - })!; // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + })!; // TODO-NULLABLE: Remove ! when nullable attributes are respected createDirectory(path); +#pragma warning restore CS8634 return path; } diff --git a/src/Common/src/CoreLib/System/Environment.Win32.cs b/src/Common/src/CoreLib/System/Environment.Win32.cs index ca3b48c6078f..d536f5ccb44f 100644 --- a/src/Common/src/CoreLib/System/Environment.Win32.cs +++ b/src/Common/src/CoreLib/System/Environment.Win32.cs @@ -80,7 +80,7 @@ private static IDictionary GetEnvironmentVariablesFromRegistry(bool fromMachine) { foreach (string name in environmentKey.GetValueNames()) { - string? value = environmentKey.GetValue(name, "")!.ToString(); // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + string? value = environmentKey.GetValue(name, "")!.ToString(); // TODO-NULLABLE: Remove ! when nullable attributes are respected try { results.Add(name, value); diff --git a/src/Common/src/CoreLib/System/Environment.cs b/src/Common/src/CoreLib/System/Environment.cs index dd3fc7f1d08b..319ae9b1c61c 100644 --- a/src/Common/src/CoreLib/System/Environment.cs +++ b/src/Common/src/CoreLib/System/Environment.cs @@ -122,7 +122,7 @@ public static OperatingSystem OSVersion { Interlocked.CompareExchange(ref s_osVersion, GetOSVersion(), null); } - return s_osVersion!; // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + return s_osVersion!; // TODO-NULLABLE: Remove ! when compiler specially-recognizes CompareExchange for nullability } } @@ -149,7 +149,7 @@ public static Version Version versionSpan = versionSpan.Slice(0, separatorIndex); // Return zeros rather then failing if the version string fails to parse - return Version.TryParse(versionSpan, out Version? version) ? version! : new Version(); // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + return Version.TryParse(versionSpan, out Version? version) ? version! : new Version(); // TODO-NULLABLE: Remove ! when nullable attributes are respected } } @@ -167,7 +167,7 @@ public static long WorkingSet { using (currentProcess) { - object? result = processType!.GetMethod("get_WorkingSet64")?.Invoke(currentProcess, BindingFlags.DoNotWrapExceptions, null, null, null); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/2388 + object? result = processType!.GetMethod("get_WorkingSet64")?.Invoke(currentProcess, BindingFlags.DoNotWrapExceptions, null, null, null); if (result is long) return (long)result; } } diff --git a/src/Common/src/CoreLib/System/Globalization/CalendarData.Unix.cs b/src/Common/src/CoreLib/System/Globalization/CalendarData.Unix.cs index 61924a6a97b6..c1495706caef 100644 --- a/src/Common/src/CoreLib/System/Globalization/CalendarData.Unix.cs +++ b/src/Common/src/CoreLib/System/Globalization/CalendarData.Unix.cs @@ -35,7 +35,8 @@ internal partial class CalendarData private bool LoadCalendarDataFromSystem(string localeName, CalendarId calendarId) { bool result = true; - // TODO-NULLABLE: these can return null but are later replaced with String.Empty or other non-nullable value + + // these can return null but are later replaced with String.Empty or other non-nullable value result &= GetCalendarInfo(localeName, calendarId, CalendarDataType.NativeName, out this.sNativeName!); result &= GetCalendarInfo(localeName, calendarId, CalendarDataType.MonthDay, out this.sMonthDay!); diff --git a/src/Common/src/CoreLib/System/Globalization/CalendarData.Windows.cs b/src/Common/src/CoreLib/System/Globalization/CalendarData.Windows.cs index f8075d44700e..bee8ab8ce30a 100644 --- a/src/Common/src/CoreLib/System/Globalization/CalendarData.Windows.cs +++ b/src/Common/src/CoreLib/System/Globalization/CalendarData.Windows.cs @@ -100,10 +100,10 @@ private bool LoadCalendarDataFromSystem(string localeName, CalendarId calendarId // // Clean up the escaping of the formats - this.saShortDates = CultureData.ReescapeWin32Strings(this.saShortDates)!; // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 - this.saLongDates = CultureData.ReescapeWin32Strings(this.saLongDates)!; // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 - this.saYearMonths = CultureData.ReescapeWin32Strings(this.saYearMonths)!; // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 - this.sMonthDay = CultureData.ReescapeWin32String(this.sMonthDay)!; // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + this.saShortDates = CultureData.ReescapeWin32Strings(this.saShortDates)!; + this.saLongDates = CultureData.ReescapeWin32Strings(this.saLongDates)!; + this.saYearMonths = CultureData.ReescapeWin32Strings(this.saYearMonths)!; + this.sMonthDay = CultureData.ReescapeWin32String(this.sMonthDay)!; return ret; } diff --git a/src/Common/src/CoreLib/System/Globalization/CalendarData.cs b/src/Common/src/CoreLib/System/Globalization/CalendarData.cs index 6ca9e8d7f59a..aae2c00ffa91 100644 --- a/src/Common/src/CoreLib/System/Globalization/CalendarData.cs +++ b/src/Common/src/CoreLib/System/Globalization/CalendarData.cs @@ -13,10 +13,6 @@ namespace System.Globalization // NOTE: Calendars depend on the locale name that creates it. Only a few // properties are available without locales using CalendarData.GetCalendar(CalendarData) // - // TODO-NULLABLE: this class requires refactoring for proper annotations - // currently from user of this class all fields are non-nullable. - // To avoid potential breaking changes lots of workaround have - // been used to suppress errors internal partial class CalendarData { // Max calendars diff --git a/src/Common/src/CoreLib/System/Globalization/CompareInfo.cs b/src/Common/src/CoreLib/System/Globalization/CompareInfo.cs index 5cf1992bb37a..dd4da0de0676 100644 --- a/src/Common/src/CoreLib/System/Globalization/CompareInfo.cs +++ b/src/Common/src/CoreLib/System/Globalization/CompareInfo.cs @@ -170,8 +170,8 @@ public static unsafe bool IsSortable(string text) [OnDeserializing] private void OnDeserializing(StreamingContext ctx) { - // TODO-NULLABLE: this becomes null for a brief moment before deserialization - // after serialization is finished it is never null + // this becomes null for a brief moment before deserialization + // after serialization is finished it is never null. m_name = null!; } diff --git a/src/Common/src/CoreLib/System/Globalization/CultureData.Windows.cs b/src/Common/src/CoreLib/System/Globalization/CultureData.Windows.cs index 912fce6677a8..28315b91dbde 100644 --- a/src/Common/src/CoreLib/System/Globalization/CultureData.Windows.cs +++ b/src/Common/src/CoreLib/System/Globalization/CultureData.Windows.cs @@ -4,7 +4,7 @@ using System.Collections.Generic; using System.Diagnostics; -using System.Runtime.CompilerServices; +using System.Diagnostics.CodeAnalysis; using System.Runtime.InteropServices; using System.Text; using Internal.Runtime.CompilerServices; @@ -356,6 +356,7 @@ private static string GetLocaleInfoFromLCType(string localeName, uint lctype, bo /// /// We don't build the stringbuilder unless we find something to change /// + [return: NotNullIfNotNull("str")] internal static string? ReescapeWin32String(string? str) { // If we don't have data, then don't try anything @@ -424,13 +425,14 @@ private static string GetLocaleInfoFromLCType(string localeName, uint lctype, bo return result.ToString(); } + [return: NotNullIfNotNull("array")] internal static string[]? ReescapeWin32Strings(string[]? array) { if (array != null) { for (int i = 0; i < array.Length; i++) { - array[i] = ReescapeWin32String(array[i])!; // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + array[i] = ReescapeWin32String(array[i])!; // TODO-NULLABLE: Remove ! when nullable attributes are respected } } diff --git a/src/Common/src/CoreLib/System/Globalization/CultureData.cs b/src/Common/src/CoreLib/System/Globalization/CultureData.cs index a5d2ef699da1..d29668e17384 100644 --- a/src/Common/src/CoreLib/System/Globalization/CultureData.cs +++ b/src/Common/src/CoreLib/System/Globalization/CultureData.cs @@ -796,9 +796,9 @@ internal string CultureName { case "zh-CHS": case "zh-CHT": - return _sName!; // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/34273 + return _sName; } - return _sRealName!; + return _sRealName; } } diff --git a/src/Common/src/CoreLib/System/Globalization/DateTimeParse.cs b/src/Common/src/CoreLib/System/Globalization/DateTimeParse.cs index 3bc6288e9a02..511a440588c0 100644 --- a/src/Common/src/CoreLib/System/Globalization/DateTimeParse.cs +++ b/src/Common/src/CoreLib/System/Globalization/DateTimeParse.cs @@ -191,7 +191,7 @@ internal static bool TryParseExactMultiple(ReadOnlySpan s, string?[]? form // for (int i = 0; i < formats.Length; i++) { - if (formats[i] == null || formats[i]!.Length == 0) // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/34644 + if (formats[i] == null || formats[i]!.Length == 0) // TODO-NULLABLE: Indexer nullability tracked (https://github.com/dotnet/roslyn/issues/34644) { result.SetBadFormatSpecifierFailure(); return false; diff --git a/src/Common/src/CoreLib/System/Globalization/IdnMapping.Windows.cs b/src/Common/src/CoreLib/System/Globalization/IdnMapping.Windows.cs index 6622e643e0a4..6a97c04ebf66 100644 --- a/src/Common/src/CoreLib/System/Globalization/IdnMapping.Windows.cs +++ b/src/Common/src/CoreLib/System/Globalization/IdnMapping.Windows.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.Runtime.InteropServices; namespace System.Globalization @@ -114,6 +115,7 @@ private uint Flags } } + [DoesNotReturn] private static void ThrowForZeroLength(bool unicode) { int lastError = Marshal.GetLastWin32Error(); diff --git a/src/Common/src/CoreLib/System/Globalization/JapaneseCalendar.Win32.cs b/src/Common/src/CoreLib/System/Globalization/JapaneseCalendar.Win32.cs index 8e5941f3197d..ffea420e7c1f 100644 --- a/src/Common/src/CoreLib/System/Globalization/JapaneseCalendar.Win32.cs +++ b/src/Common/src/CoreLib/System/Globalization/JapaneseCalendar.Win32.cs @@ -92,10 +92,10 @@ public partial class JapaneseCalendar : Calendar Array.Resize(ref registryEraRanges, iFoundEras); // Sort them - Array.Sort(registryEraRanges!, CompareEraRanges); // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + Array.Sort(registryEraRanges!, CompareEraRanges); // TODO-NULLABLE: Remove ! when nullable attributes are respected // Clean up era information - for (int i = 0; i < registryEraRanges!.Length; i++) // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + for (int i = 0; i < registryEraRanges!.Length; i++) // TODO-NULLABLE: Remove ! when nullable attributes are respected { // eras count backwards from length to 1 (and are 1 based indexes into string arrays) registryEraRanges[i].era = registryEraRanges.Length - i; diff --git a/src/Common/src/CoreLib/System/Globalization/JapaneseLunisolarCalendar.cs b/src/Common/src/CoreLib/System/Globalization/JapaneseLunisolarCalendar.cs index 7190300116e0..cdaded6bc3e7 100644 --- a/src/Common/src/CoreLib/System/Globalization/JapaneseLunisolarCalendar.cs +++ b/src/Common/src/CoreLib/System/Globalization/JapaneseLunisolarCalendar.cs @@ -201,7 +201,7 @@ private static EraInfo[] TrimEras(EraInfo[] baseEras) // If we didn't copy any then something was wrong, just return base if (newIndex == 0) return baseEras; - Array.Resize(ref newEras!, newIndex); // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + Array.Resize(ref newEras!, newIndex); // TODO-NULLABLE: Remove ! when nullable attributes are respected return newEras; } diff --git a/src/Common/src/CoreLib/System/Globalization/SortVersion.cs b/src/Common/src/CoreLib/System/Globalization/SortVersion.cs index b76eeb1a4f82..89c3fa29fa09 100644 --- a/src/Common/src/CoreLib/System/Globalization/SortVersion.cs +++ b/src/Common/src/CoreLib/System/Globalization/SortVersion.cs @@ -44,7 +44,9 @@ public override bool Equals(object? obj) return obj is SortVersion otherVersion && Equals(otherVersion); } +#pragma warning disable CS8614 // TODO-NULLABLE: Covariant interface arguments (https://github.com/dotnet/roslyn/issues/35817) public bool Equals(SortVersion? other) +#pragma warning restore CS8614 { if (other == null) { diff --git a/src/Common/src/CoreLib/System/Globalization/TextElementEnumerator.cs b/src/Common/src/CoreLib/System/Globalization/TextElementEnumerator.cs index d896c7d99e93..5ff3d84520ad 100644 --- a/src/Common/src/CoreLib/System/Globalization/TextElementEnumerator.cs +++ b/src/Common/src/CoreLib/System/Globalization/TextElementEnumerator.cs @@ -50,7 +50,9 @@ public bool MoveNext() return true; } - public object? Current => GetTextElement(); // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/23268 +#pragma warning disable CS8612 // TODO-NULLABLE: Covariant return types (https://github.com/dotnet/roslyn/issues/23268) + public object Current => GetTextElement(); +#pragma warning restore CS8612 public string GetTextElement() { diff --git a/src/Common/src/CoreLib/System/Globalization/TimeSpanParse.cs b/src/Common/src/CoreLib/System/Globalization/TimeSpanParse.cs index 10665617223a..6b4ea6a7c936 100644 --- a/src/Common/src/CoreLib/System/Globalization/TimeSpanParse.cs +++ b/src/Common/src/CoreLib/System/Globalization/TimeSpanParse.cs @@ -1690,7 +1690,7 @@ private static bool TryParseExactMultipleTimeSpan(ReadOnlySpan input, stri // one of the formats. for (int i = 0; i < formats.Length; i++) { - // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/34644 + // TODO-NULLABLE: Indexer nullability tracked (https://github.com/dotnet/roslyn/issues/34644) if (formats[i] == null || formats[i]!.Length == 0) { return result.SetBadFormatSpecifierFailure(); diff --git a/src/Common/src/CoreLib/System/IComparable.cs b/src/Common/src/CoreLib/System/IComparable.cs index 8c4f38ed9987..c87f57253ea0 100644 --- a/src/Common/src/CoreLib/System/IComparable.cs +++ b/src/Common/src/CoreLib/System/IComparable.cs @@ -2,6 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System.Diagnostics.CodeAnalysis; + namespace System { // The IComparable interface is implemented by classes that support an @@ -32,6 +34,6 @@ public interface IComparable // if this is equal to object, or a value greater than zero // if this is greater than object. // - int CompareTo(T other); + int CompareTo([AllowNull] T other); } } diff --git a/src/Common/src/CoreLib/System/IEquatable.cs b/src/Common/src/CoreLib/System/IEquatable.cs index b2c96a9bb282..1182d028531c 100644 --- a/src/Common/src/CoreLib/System/IEquatable.cs +++ b/src/Common/src/CoreLib/System/IEquatable.cs @@ -2,11 +2,13 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System.Diagnostics.CodeAnalysis; + namespace System { public interface IEquatable { - bool Equals(T other); + bool Equals([AllowNull] T other); } } diff --git a/src/Common/src/CoreLib/System/IO/FileStream.Unix.cs b/src/Common/src/CoreLib/System/IO/FileStream.Unix.cs index e3fe604f94ff..59cb89030a7e 100644 --- a/src/Common/src/CoreLib/System/IO/FileStream.Unix.cs +++ b/src/Common/src/CoreLib/System/IO/FileStream.Unix.cs @@ -290,7 +290,7 @@ public override ValueTask DisposeAsync() // override may already exist on a derived type. if (_useAsyncIO && _writePos > 0) { - return new ValueTask(Task.Factory.StartNew(s => ((FileStream)s!).Dispose(), this, // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + return new ValueTask(Task.Factory.StartNew(s => ((FileStream)s!).Dispose(), this, CancellationToken.None, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default)); } @@ -364,7 +364,7 @@ private Task FlushAsyncInternal(CancellationToken cancellationToken) if (CanWrite) { return Task.Factory.StartNew( - state => ((FileStream)state!).FlushOSBuffer(), // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + state => ((FileStream)state!).FlushOSBuffer(), this, cancellationToken, TaskCreationOptions.DenyChildAttach, @@ -568,7 +568,7 @@ private unsafe int ReadNative(Span buffer) // whereas on Windows it may happen before the write has completed. Debug.Assert(t.Status == TaskStatus.RanToCompletion); - var thisRef = (FileStream)s!; // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + var thisRef = (FileStream)s!; Debug.Assert(thisRef._asyncState != null); try { @@ -727,7 +727,7 @@ private ValueTask WriteAsyncInternal(ReadOnlyMemory source, CancellationTo // whereas on Windows it may happen before the write has completed. Debug.Assert(t.Status == TaskStatus.RanToCompletion); - var thisRef = (FileStream)s!; // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + var thisRef = (FileStream)s!; Debug.Assert(thisRef._asyncState != null); try { diff --git a/src/Common/src/CoreLib/System/IO/FileStream.Windows.cs b/src/Common/src/CoreLib/System/IO/FileStream.Windows.cs index bfab0c1516a5..be48833ceb49 100644 --- a/src/Common/src/CoreLib/System/IO/FileStream.Windows.cs +++ b/src/Common/src/CoreLib/System/IO/FileStream.Windows.cs @@ -1587,7 +1587,7 @@ private Task FlushAsyncInternal(CancellationToken cancellationToken) if (CanWrite) { return Task.Factory.StartNew( - state => ((FileStream)state!).FlushOSBuffer(), // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + state => ((FileStream)state!).FlushOSBuffer(), this, cancellationToken, TaskCreationOptions.DenyChildAttach, diff --git a/src/Common/src/CoreLib/System/IO/MemoryStream.cs b/src/Common/src/CoreLib/System/IO/MemoryStream.cs index b8a11d98707b..11a41f78393d 100644 --- a/src/Common/src/CoreLib/System/IO/MemoryStream.cs +++ b/src/Common/src/CoreLib/System/IO/MemoryStream.cs @@ -451,7 +451,7 @@ public override ValueTask ReadAsync(Memory buffer, CancellationToken // it then fall back to doing the ArrayPool/copy behavior. return new ValueTask( MemoryMarshal.TryGetArray(buffer, out ArraySegment destinationArray) ? - Read(destinationArray.Array!, destinationArray.Offset, destinationArray.Count) : // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + Read(destinationArray.Array!, destinationArray.Offset, destinationArray.Count) : Read(buffer.Span)); } catch (OperationCanceledException oce) @@ -766,7 +766,7 @@ public override ValueTask WriteAsync(ReadOnlyMemory buffer, CancellationTo // Unlike ReadAsync, we could delegate to WriteAsync(byte[], ...) here, but we don't for consistency. if (MemoryMarshal.TryGetArray(buffer, out ArraySegment sourceArray)) { - Write(sourceArray.Array!, sourceArray.Offset, sourceArray.Count); // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + Write(sourceArray.Array!, sourceArray.Offset, sourceArray.Count); } else { diff --git a/src/Common/src/CoreLib/System/IO/Path.cs b/src/Common/src/CoreLib/System/IO/Path.cs index 674cc6e69ab9..b0c3df34160d 100644 --- a/src/Common/src/CoreLib/System/IO/Path.cs +++ b/src/Common/src/CoreLib/System/IO/Path.cs @@ -4,6 +4,7 @@ #nullable enable using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.Runtime.InteropServices; using System.Text; @@ -46,7 +47,8 @@ public static partial class Path // returns null. If path does not contain a file extension, // the new file extension is appended to the path. If extension // is null, any existing extension is removed from path. - public static string? ChangeExtension(string? path, string? extension) // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + [return: NotNullIfNotNull("path")] + public static string? ChangeExtension(string? path, string? extension) { if (path == null) return null; @@ -99,7 +101,7 @@ public static partial class Path /// /// Directory separators are normalized in the returned string. /// - public static string? GetDirectoryName(string? path) // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + public static string? GetDirectoryName(string? path) { if (path == null || PathInternal.IsEffectivelyEmpty(path.AsSpan())) return null; @@ -147,7 +149,8 @@ private static int GetDirectoryNameOffset(ReadOnlySpan path) /// The returned value is null if the given path is null or empty if the given path does not include an /// extension. /// - public static string? GetExtension(string? path) // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + [return: NotNullIfNotNull("path")] + public static string? GetExtension(string? path) { if (path == null) return null; @@ -186,6 +189,7 @@ public static ReadOnlySpan GetExtension(ReadOnlySpan path) /// the characters of path that follow the last separator in path. The resulting string is /// null if path is null. /// + [return: NotNullIfNotNull("path")] public static string? GetFileName(string? path) { if (path == null) @@ -217,7 +221,8 @@ public static ReadOnlySpan GetFileName(ReadOnlySpan path) return path; } - public static string? GetFileNameWithoutExtension(string? path) // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + [return: NotNullIfNotNull("path")] + public static string? GetFileNameWithoutExtension(string? path) { if (path == null) return null; diff --git a/src/Common/src/CoreLib/System/IO/PathInternal.Windows.cs b/src/Common/src/CoreLib/System/IO/PathInternal.Windows.cs index 40ed96f63c3a..82474656e4e5 100644 --- a/src/Common/src/CoreLib/System/IO/PathInternal.Windows.cs +++ b/src/Common/src/CoreLib/System/IO/PathInternal.Windows.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. #nullable enable +using System.Diagnostics.CodeAnalysis; using System.Runtime.CompilerServices; using System.Text; @@ -87,6 +88,7 @@ internal static bool EndsWithPeriodOrSpace(string? path) /// away from paths during normalization, but if we see such a path at this point it should be /// normalized and has retained the final characters. (Typically from one of the *Info classes) /// + [return: NotNullIfNotNull("path")] internal static string? EnsureExtendedPrefixIfNeeded(string? path) { if (path != null && (path.Length >= MaxShortPath || EndsWithPeriodOrSpace(path))) diff --git a/src/Common/src/CoreLib/System/IO/Stream.cs b/src/Common/src/CoreLib/System/IO/Stream.cs index e6288cbef10b..51cc816a8597 100644 --- a/src/Common/src/CoreLib/System/IO/Stream.cs +++ b/src/Common/src/CoreLib/System/IO/Stream.cs @@ -42,7 +42,11 @@ internal SemaphoreSlim EnsureAsyncActiveSemaphoreInitialized() { // Lazily-initialize _asyncActiveSemaphore. As we're never accessing the SemaphoreSlim's // WaitHandle, we don't need to worry about Disposing it. - return LazyInitializer.EnsureInitialized(ref _asyncActiveSemaphore!, () => new SemaphoreSlim(1, 1)); // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 +#pragma warning disable CS8634 // TODO-NULLABLE: Remove warning disable when nullable attributes are respected +#pragma warning disable CS8603 // TODO-NULLABLE: Remove warning disable when nullable attributes are respected + return LazyInitializer.EnsureInitialized(ref _asyncActiveSemaphore, () => new SemaphoreSlim(1, 1)); +#pragma warning restore CS8603 +#pragma warning restore CS8634 } public abstract bool CanRead @@ -255,7 +259,7 @@ public Task FlushAsync() public virtual Task FlushAsync(CancellationToken cancellationToken) { - return Task.Factory.StartNew(state => ((Stream)state!).Flush(), this, // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + return Task.Factory.StartNew(state => ((Stream)state!).Flush(), this, cancellationToken, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default); } @@ -380,7 +384,7 @@ public virtual ValueTask ReadAsync(Memory buffer, CancellationToken c { if (MemoryMarshal.TryGetArray(buffer, out ArraySegment array)) { - return new ValueTask(ReadAsync(array.Array!, array.Offset, array.Count, cancellationToken)); // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + return new ValueTask(ReadAsync(array.Array!, array.Offset, array.Count, cancellationToken)); } else { @@ -511,7 +515,7 @@ private void RunReadWriteTaskWhenReady(Task asyncWaiter, ReadWriteTask readWrite asyncWaiter.ContinueWith((t, state) => { Debug.Assert(t.IsCompletedSuccessfully, "The semaphore wait should always complete successfully."); - var rwt = (ReadWriteTask)state!; // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + var rwt = (ReadWriteTask)state!; Debug.Assert(rwt._stream != null); rwt._stream.RunReadWriteTask(rwt); // RunReadWriteTask(readWriteTask); }, readWriteTask, default, TaskContinuationOptions.ExecuteSynchronously, TaskScheduler.Default); @@ -691,7 +695,7 @@ public virtual ValueTask WriteAsync(ReadOnlyMemory buffer, CancellationTok { if (MemoryMarshal.TryGetArray(buffer, out ArraySegment array)) { - return new ValueTask(WriteAsync(array.Array!, array.Offset, array.Count, cancellationToken)); // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + return new ValueTask(WriteAsync(array.Array!, array.Offset, array.Count, cancellationToken)); } else { @@ -1061,7 +1065,7 @@ public WaitHandle AsyncWaitHandle { get { - return LazyInitializer.EnsureInitialized(ref _waitHandle!, () => new ManualResetEvent(true)); // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + return LazyInitializer.EnsureInitialized(ref _waitHandle!, () => new ManualResetEvent(true)); // Remove ! when nullable attributes are respected } } diff --git a/src/Common/src/CoreLib/System/IO/StreamReader.cs b/src/Common/src/CoreLib/System/IO/StreamReader.cs index a59ac58445ea..0ebcede1e026 100644 --- a/src/Common/src/CoreLib/System/IO/StreamReader.cs +++ b/src/Common/src/CoreLib/System/IO/StreamReader.cs @@ -84,6 +84,7 @@ private void CheckAsyncTaskInProgress() } } + [DoesNotReturn] private static void ThrowAsyncIOInProgress() => throw new InvalidOperationException(SR.InvalidOperation_AsyncIOInProgress); diff --git a/src/Common/src/CoreLib/System/IO/StreamWriter.cs b/src/Common/src/CoreLib/System/IO/StreamWriter.cs index 87557e89b6dd..9d143ed1786a 100644 --- a/src/Common/src/CoreLib/System/IO/StreamWriter.cs +++ b/src/Common/src/CoreLib/System/IO/StreamWriter.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Text; @@ -56,6 +57,7 @@ private void CheckAsyncTaskInProgress() } } + [DoesNotReturn] private static void ThrowAsyncIOInProgress() => throw new InvalidOperationException(SR.InvalidOperation_AsyncIOInProgress); diff --git a/src/Common/src/CoreLib/System/IO/TextReader.cs b/src/Common/src/CoreLib/System/IO/TextReader.cs index a49463f086d5..5afc919095d4 100644 --- a/src/Common/src/CoreLib/System/IO/TextReader.cs +++ b/src/Common/src/CoreLib/System/IO/TextReader.cs @@ -209,7 +209,7 @@ public virtual int ReadBlock(Span buffer) { return Task.Factory.StartNew(state => { - return ((TextReader)state!).ReadLine(); // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + return ((TextReader)state!).ReadLine(); }, this, CancellationToken.None, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default); } @@ -253,10 +253,10 @@ public virtual Task ReadAsync(char[] buffer, int index, int count) public virtual ValueTask ReadAsync(Memory buffer, CancellationToken cancellationToken = default) => new ValueTask(MemoryMarshal.TryGetArray(buffer, out ArraySegment array) ? - ReadAsync(array.Array!, array.Offset, array.Count) : // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + ReadAsync(array.Array!, array.Offset, array.Count) : Task.Factory.StartNew(state => { - var t = (Tuple>)state!; // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + var t = (Tuple>)state!; return t.Item1.Read(t.Item2.Span); }, Tuple.Create(this, buffer), cancellationToken, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default)); @@ -265,7 +265,7 @@ internal virtual ValueTask ReadAsyncInternal(Memory buffer, Cancellat var tuple = new Tuple>(this, buffer); return new ValueTask(Task.Factory.StartNew(state => { - var t = (Tuple>)state!; // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + var t = (Tuple>)state!; return t.Item1.Read(t.Item2.Span); }, tuple, cancellationToken, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default)); @@ -291,10 +291,10 @@ public virtual Task ReadBlockAsync(char[] buffer, int index, int count) public virtual ValueTask ReadBlockAsync(Memory buffer, CancellationToken cancellationToken = default) => new ValueTask(MemoryMarshal.TryGetArray(buffer, out ArraySegment array) ? - ReadBlockAsync(array.Array!, array.Offset, array.Count) : // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + ReadBlockAsync(array.Array!, array.Offset, array.Count) : Task.Factory.StartNew(state => { - var t = (Tuple>)state!; // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + var t = (Tuple>)state!; return t.Item1.ReadBlock(t.Item2.Span); }, Tuple.Create(this, buffer), cancellationToken, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default)); diff --git a/src/Common/src/CoreLib/System/IO/TextWriter.cs b/src/Common/src/CoreLib/System/IO/TextWriter.cs index 890c35e8a60e..9dfb1405a943 100644 --- a/src/Common/src/CoreLib/System/IO/TextWriter.cs +++ b/src/Common/src/CoreLib/System/IO/TextWriter.cs @@ -9,6 +9,7 @@ using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Buffers; +using System.Diagnostics.CodeAnalysis; namespace System.IO { @@ -117,7 +118,8 @@ public abstract Encoding Encoding /// the TextWriter to be readable by a TextReader, only one of the following line /// terminator strings should be used: "\r", "\n", or "\r\n". /// - public virtual string? NewLine // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/2384 + [AllowNull] + public virtual string NewLine { get { return CoreNewLineStr; } set @@ -545,7 +547,7 @@ public virtual Task WriteAsync(char value) var tuple = new Tuple(this, value); return Task.Factory.StartNew(state => { - var t = (Tuple)state!; // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + var t = (Tuple)state!; t.Item1.Write(t.Item2); }, tuple, CancellationToken.None, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default); @@ -556,7 +558,7 @@ public virtual Task WriteAsync(string? value) var tuple = new Tuple(this, value); return Task.Factory.StartNew(state => { - var t = (Tuple)state!; // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + var t = (Tuple)state!; t.Item1.Write(t.Item2); }, tuple, CancellationToken.None, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default); @@ -598,7 +600,7 @@ public virtual Task WriteAsync(char[] buffer, int index, int count) var tuple = new Tuple(this, buffer, index, count); return Task.Factory.StartNew(state => { - var t = (Tuple)state!; // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + var t = (Tuple)state!; t.Item1.Write(t.Item2, t.Item3, t.Item4); }, tuple, CancellationToken.None, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default); @@ -606,11 +608,11 @@ public virtual Task WriteAsync(char[] buffer, int index, int count) public virtual Task WriteAsync(ReadOnlyMemory buffer, CancellationToken cancellationToken = default) => cancellationToken.IsCancellationRequested ? Task.FromCanceled(cancellationToken) : - MemoryMarshal.TryGetArray(buffer, out ArraySegment array) ? // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + MemoryMarshal.TryGetArray(buffer, out ArraySegment array) ? WriteAsync(array.Array!, array.Offset, array.Count) : Task.Factory.StartNew(state => { - var t = (Tuple>)state!; // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + var t = (Tuple>)state!; t.Item1.Write(t.Item2.Span); }, Tuple.Create(this, buffer), cancellationToken, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default); @@ -619,7 +621,7 @@ public virtual Task WriteLineAsync(char value) var tuple = new Tuple(this, value); return Task.Factory.StartNew(state => { - var t = (Tuple)state!; // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + var t = (Tuple)state!; t.Item1.WriteLine(t.Item2); }, tuple, CancellationToken.None, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default); @@ -630,7 +632,7 @@ public virtual Task WriteLineAsync(string? value) var tuple = new Tuple(this, value); return Task.Factory.StartNew(state => { - var t = (Tuple)state!; // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + var t = (Tuple)state!; t.Item1.WriteLine(t.Item2); }, tuple, CancellationToken.None, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default); @@ -673,7 +675,7 @@ public virtual Task WriteLineAsync(char[] buffer, int index, int count) var tuple = new Tuple(this, buffer, index, count); return Task.Factory.StartNew(state => { - var t = (Tuple)state!; // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + var t = (Tuple)state!; t.Item1.WriteLine(t.Item2, t.Item3, t.Item4); }, tuple, CancellationToken.None, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default); @@ -681,11 +683,11 @@ public virtual Task WriteLineAsync(char[] buffer, int index, int count) public virtual Task WriteLineAsync(ReadOnlyMemory buffer, CancellationToken cancellationToken = default) => cancellationToken.IsCancellationRequested ? Task.FromCanceled(cancellationToken) : - MemoryMarshal.TryGetArray(buffer, out ArraySegment array) ? // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + MemoryMarshal.TryGetArray(buffer, out ArraySegment array) ? WriteLineAsync(array.Array!, array.Offset, array.Count) : Task.Factory.StartNew(state => { - var t = (Tuple>)state!; // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + var t = (Tuple>)state!; t.Item1.WriteLine(t.Item2.Span); }, Tuple.Create(this, buffer), cancellationToken, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default); @@ -698,7 +700,7 @@ public virtual Task FlushAsync() { return Task.Factory.StartNew(state => { - ((TextWriter)state!).Flush(); // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + ((TextWriter)state!).Flush(); }, this, CancellationToken.None, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default); } @@ -766,7 +768,8 @@ internal SyncTextWriter(TextWriter t) : base(t.FormatProvider) public override IFormatProvider FormatProvider => _out.FormatProvider; - public override string? NewLine + [AllowNull] + public override string NewLine { [MethodImpl(MethodImplOptions.Synchronized)] get { return _out.NewLine; } diff --git a/src/Common/src/CoreLib/System/IO/UnmanagedMemoryStream.cs b/src/Common/src/CoreLib/System/IO/UnmanagedMemoryStream.cs index eeaed0a3810b..e6f67bc0393e 100644 --- a/src/Common/src/CoreLib/System/IO/UnmanagedMemoryStream.cs +++ b/src/Common/src/CoreLib/System/IO/UnmanagedMemoryStream.cs @@ -511,7 +511,7 @@ public override ValueTask ReadAsync(Memory buffer, CancellationToken // it then fall back to doing the ArrayPool/copy behavior. return new ValueTask( MemoryMarshal.TryGetArray(buffer, out ArraySegment destinationArray) ? - Read(destinationArray.Array!, destinationArray.Offset, destinationArray.Count) : // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + Read(destinationArray.Array!, destinationArray.Offset, destinationArray.Count) : Read(buffer.Span)); } catch (Exception ex) @@ -796,7 +796,7 @@ public override ValueTask WriteAsync(ReadOnlyMemory buffer, CancellationTo // Unlike ReadAsync, we could delegate to WriteAsync(byte[], ...) here, but we don't for consistency. if (MemoryMarshal.TryGetArray(buffer, out ArraySegment sourceArray)) { - Write(sourceArray.Array!, sourceArray.Offset, sourceArray.Count); // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + Write(sourceArray.Array!, sourceArray.Offset, sourceArray.Count); } else { diff --git a/src/Common/src/CoreLib/System/Lazy.cs b/src/Common/src/CoreLib/System/Lazy.cs index 5bd3a9a56549..b341136e8af5 100644 --- a/src/Common/src/CoreLib/System/Lazy.cs +++ b/src/Common/src/CoreLib/System/Lazy.cs @@ -11,6 +11,7 @@ // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.Runtime.ExceptionServices; using System.Threading; @@ -87,6 +88,7 @@ internal LazyHelper(LazyThreadSafetyMode mode, Exception exception) _exceptionDispatch = ExceptionDispatchInfo.Capture(exception); } + [DoesNotReturn] internal void ThrowException() { Debug.Assert(_exceptionDispatch != null, "execution path is invalid"); @@ -192,7 +194,7 @@ public class Lazy private Func? _factory; // _value eventually stores the lazily created value. It is valid when _state = null. - private T _value = default!; // TODO-NULLABLE-GENERIC + private T _value = default!; /// /// Initializes a new instance of the class that @@ -444,13 +446,14 @@ private T CreateValue() } /// Gets the value of the Lazy<T> for debugging display purposes. + [MaybeNull] internal T ValueForDebugDisplay { get { if (!IsValueCreated) { - return default!; // TODO-NULLABLE-GENERIC + return default!; } return _value; } diff --git a/src/Common/src/CoreLib/System/Math.cs b/src/Common/src/CoreLib/System/Math.cs index ac9be486734c..014589c48b5c 100644 --- a/src/Common/src/CoreLib/System/Math.cs +++ b/src/Common/src/CoreLib/System/Math.cs @@ -14,6 +14,7 @@ //This class contains only static members and doesn't require serialization. using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.Runtime; using System.Runtime.CompilerServices; using System.Runtime.Versioning; @@ -99,6 +100,7 @@ public static decimal Abs(decimal value) return decimal.Abs(value); } + [DoesNotReturn] [StackTraceHidden] private static void ThrowAbsOverflow() { @@ -984,6 +986,7 @@ public static unsafe double Truncate(double d) return d; } + [DoesNotReturn] private static void ThrowMinMaxException(T min, T max) { throw new ArgumentException(SR.Format(SR.Argument_MinMaxValue, min, max)); diff --git a/src/Common/src/CoreLib/System/Memory.cs b/src/Common/src/CoreLib/System/Memory.cs index 54f0147c5e5a..6d63973a45b1 100644 --- a/src/Common/src/CoreLib/System/Memory.cs +++ b/src/Common/src/CoreLib/System/Memory.cs @@ -54,7 +54,7 @@ public Memory(T[]? array) this = default; return; // returns default } - if (default(T)! == null && array.GetType() != typeof(T[])) // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/34757 + if (default(T)! == null && array.GetType() != typeof(T[])) // TODO-NULLABLE: default(T) == null warning (https://github.com/dotnet/roslyn/issues/34757) ThrowHelper.ThrowArrayTypeMismatchException(); _object = array; @@ -72,7 +72,7 @@ internal Memory(T[]? array, int start) this = default; return; // returns default } - if (default(T)! == null && array.GetType() != typeof(T[])) // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/34757 + if (default(T)! == null && array.GetType() != typeof(T[])) // TODO-NULLABLE: default(T) == null warning (https://github.com/dotnet/roslyn/issues/34757) ThrowHelper.ThrowArrayTypeMismatchException(); if ((uint)start > (uint)array.Length) ThrowHelper.ThrowArgumentOutOfRangeException(); @@ -104,7 +104,7 @@ public Memory(T[]? array, int start, int length) this = default; return; // returns default } - if (default(T)! == null && array.GetType() != typeof(T[])) // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/34757 + if (default(T)! == null && array.GetType() != typeof(T[])) // TODO-NULLABLE: default(T) == null warning (https://github.com/dotnet/roslyn/issues/34757) ThrowHelper.ThrowArrayTypeMismatchException(); #if BIT64 // See comment in Span.Slice for how this works. diff --git a/src/Common/src/CoreLib/System/MemoryExtensions.Fast.cs b/src/Common/src/CoreLib/System/MemoryExtensions.Fast.cs index 4af49376fe0e..6de285d61c20 100644 --- a/src/Common/src/CoreLib/System/MemoryExtensions.Fast.cs +++ b/src/Common/src/CoreLib/System/MemoryExtensions.Fast.cs @@ -237,7 +237,7 @@ public static int ToLower(this ReadOnlySpan source, Span destination if (GlobalizationMode.Invariant) TextInfo.ToLowerAsciiInvariant(source, destination); else - culture!.TextInfo.ChangeCaseToLower(source, destination); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + culture!.TextInfo.ChangeCaseToLower(source, destination); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected return source.Length; } @@ -288,7 +288,7 @@ public static int ToUpper(this ReadOnlySpan source, Span destination if (GlobalizationMode.Invariant) TextInfo.ToUpperAsciiInvariant(source, destination); else - culture!.TextInfo.ChangeCaseToUpper(source, destination); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + culture!.TextInfo.ChangeCaseToUpper(source, destination); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected return source.Length; } @@ -392,7 +392,7 @@ public static Span AsSpan(this T[]? array, int start) ThrowHelper.ThrowArgumentOutOfRangeException(); return default; } - if (default(T)! == null && array.GetType() != typeof(T[])) // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/34757 + if (default(T)! == null && array.GetType() != typeof(T[])) // TODO-NULLABLE: default(T) == null warning (https://github.com/dotnet/roslyn/issues/34757) ThrowHelper.ThrowArrayTypeMismatchException(); if ((uint)start > (uint)array.Length) ThrowHelper.ThrowArgumentOutOfRangeException(); @@ -414,7 +414,7 @@ public static Span AsSpan(this T[]? array, Index startIndex) return default; } - if (default(T)! == null && array.GetType() != typeof(T[])) // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/34757 + if (default(T)! == null && array.GetType() != typeof(T[])) // TODO-NULLABLE: default(T) == null warning (https://github.com/dotnet/roslyn/issues/34757) ThrowHelper.ThrowArrayTypeMismatchException(); int actualIndex = startIndex.GetOffset(array.Length); @@ -441,7 +441,7 @@ public static Span AsSpan(this T[]? array, Range range) return default; } - if (default(T)! == null && array.GetType() != typeof(T[])) // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/34757 + if (default(T)! == null && array.GetType() != typeof(T[])) // TODO-NULLABLE: default(T) == null warning (https://github.com/dotnet/roslyn/issues/34757) ThrowHelper.ThrowArrayTypeMismatchException(); (int start, int length) = range.GetOffsetAndLength(array.Length); diff --git a/src/Common/src/CoreLib/System/Number.Parsing.cs b/src/Common/src/CoreLib/System/Number.Parsing.cs index e304e4d6b4de..c5369d1cb68c 100644 --- a/src/Common/src/CoreLib/System/Number.Parsing.cs +++ b/src/Common/src/CoreLib/System/Number.Parsing.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; @@ -1926,8 +1927,10 @@ internal enum ParsingStatus Overflow } + [DoesNotReturn] internal static void ThrowOverflowOrFormatException(ParsingStatus status, TypeCode type = 0) => throw GetException(status, type); + [DoesNotReturn] internal static void ThrowOverflowException(TypeCode type) => throw GetException(ParsingStatus.Overflow, type); private static Exception GetException(ParsingStatus status, TypeCode type) diff --git a/src/Common/src/CoreLib/System/Numerics/Vector.cs b/src/Common/src/CoreLib/System/Numerics/Vector.cs index 92b16a4e87e5..b49d8b172070 100644 --- a/src/Common/src/CoreLib/System/Numerics/Vector.cs +++ b/src/Common/src/CoreLib/System/Numerics/Vector.cs @@ -6,6 +6,7 @@ #if netcoreapp using Internal.Runtime.CompilerServices; #endif +using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Numerics.Hashing; using System.Runtime.CompilerServices; @@ -5351,6 +5352,7 @@ public static unsafe Vector ConvertToUInt64(Vector value) #endregion Same-Size Conversion #region Throw Helpers + [DoesNotReturn] internal static void ThrowInsufficientNumberOfElementsException(int requiredElementCount) { throw new IndexOutOfRangeException(SR.Format(SR.Arg_InsufficientNumberOfElements, requiredElementCount, "values")); diff --git a/src/Common/src/CoreLib/System/Numerics/Vector.tt b/src/Common/src/CoreLib/System/Numerics/Vector.tt index ac64bac40c17..ed2b606e556e 100644 --- a/src/Common/src/CoreLib/System/Numerics/Vector.tt +++ b/src/Common/src/CoreLib/System/Numerics/Vector.tt @@ -1890,6 +1890,7 @@ namespace System.Numerics #endregion Same-Size Conversion #region Throw Helpers + [DoesNotReturn] internal static void ThrowInsufficientNumberOfElementsException(int requiredElementCount) { throw new IndexOutOfRangeException(SR.Format(SR.Arg_InsufficientNumberOfElements, requiredElementCount, "values")); diff --git a/src/Common/src/CoreLib/System/Reflection/SignatureType.cs b/src/Common/src/CoreLib/System/Reflection/SignatureType.cs index 298ca51c2ab8..d5674bcb67b7 100644 --- a/src/Common/src/CoreLib/System/Reflection/SignatureType.cs +++ b/src/Common/src/CoreLib/System/Reflection/SignatureType.cs @@ -76,7 +76,7 @@ public sealed override Type MakeArrayType(int rank) public sealed override Assembly Assembly => throw new NotSupportedException(SR.NotSupported_SignatureType); public sealed override Module Module => throw new NotSupportedException(SR.NotSupported_SignatureType); -#pragma warning disable CS8608 // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/23268 +#pragma warning disable CS8608 // TODO-NULLABLE: Covariant return types (https://github.com/dotnet/roslyn/issues/23268) public sealed override Type ReflectedType => throw new NotSupportedException(SR.NotSupported_SignatureType); public sealed override Type BaseType => throw new NotSupportedException(SR.NotSupported_SignatureType); #pragma warning restore CS8608 @@ -86,7 +86,7 @@ public sealed override Type MakeArrayType(int rank) public sealed override int MetadataToken => throw new NotSupportedException(SR.NotSupported_SignatureType); public sealed override bool HasSameMetadataDefinitionAs(MemberInfo other) => throw new NotSupportedException(SR.NotSupported_SignatureType); -#pragma warning disable CS8608 // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/23268 +#pragma warning disable CS8608 // TODO-NULLABLE: Covariant return types (https://github.com/dotnet/roslyn/issues/23268) public sealed override Type DeclaringType => throw new NotSupportedException(SR.NotSupported_SignatureType); public sealed override MethodBase DeclaringMethod => throw new NotSupportedException(SR.NotSupported_SignatureType); #pragma warning restore CS8608 @@ -143,7 +143,7 @@ public sealed override Type MakeArrayType(int rank) public sealed override bool IsSubclassOf(Type c) => throw new NotSupportedException(SR.NotSupported_SignatureType); protected sealed override bool IsValueTypeImpl() => throw new NotSupportedException(SR.NotSupported_SignatureType); -#pragma warning disable CS8608 // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/23268 +#pragma warning disable CS8608 // TODO-NULLABLE: Covariant return types (https://github.com/dotnet/roslyn/issues/23268) public sealed override StructLayoutAttribute StructLayoutAttribute => throw new NotSupportedException(SR.NotSupported_SignatureType); #pragma warning restore CS8608 diff --git a/src/Common/src/CoreLib/System/Resources/FastResourceComparer.cs b/src/Common/src/CoreLib/System/Resources/FastResourceComparer.cs index 16c9fd0982ad..31a8fd6ff2ff 100644 --- a/src/Common/src/CoreLib/System/Resources/FastResourceComparer.cs +++ b/src/Common/src/CoreLib/System/Resources/FastResourceComparer.cs @@ -18,10 +18,11 @@ using System.Collections; using System.Collections.Generic; using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; namespace System.Resources { - internal sealed class FastResourceComparer : IComparer, IEqualityComparer, IComparer, IEqualityComparer // TODO-NULLABLE: IEqualityComparer.GetHashCode does not accept nulls but Equals does + internal sealed class FastResourceComparer : IComparer, IEqualityComparer, IComparer, IEqualityComparer { internal static readonly FastResourceComparer Default = new FastResourceComparer(); @@ -32,10 +33,9 @@ public int GetHashCode(object key) return FastResourceComparer.HashFunction(s); } - public int GetHashCode(string? key) // TODO-NULLABLE: argument should be non-nullable but IEqualityComparer.Equals accepts null + public int GetHashCode([DisallowNull] string? key) { - Debug.Assert(key != null, "TODO-NULLABLE"); - return FastResourceComparer.HashFunction(key); + return FastResourceComparer.HashFunction(key!); } // This hash function MUST be publically documented with the resource diff --git a/src/Common/src/CoreLib/System/Resources/ResourceManager.cs b/src/Common/src/CoreLib/System/Resources/ResourceManager.cs index 6dcb475f25f5..3de4b31dbcb9 100644 --- a/src/Common/src/CoreLib/System/Resources/ResourceManager.cs +++ b/src/Common/src/CoreLib/System/Resources/ResourceManager.cs @@ -303,7 +303,7 @@ public virtual void ReleaseAllResources() lock (localResourceSets) { -#pragma warning disable CS8619 // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/35131 +#pragma warning disable CS8619 // TODO-NULLABLE: Deconstruct KeyValuePair (https://github.com/dotnet/roslyn/issues/35131) foreach ((_, ResourceSet resourceSet) in localResourceSets) #pragma warning restore CS8619 { @@ -489,7 +489,7 @@ protected virtual string GetResourceFileName(CultureInfo culture) // that had resources. foreach (CultureInfo updateCultureInfo in mgr) { - AddResourceSet(localResourceSets, updateCultureInfo.Name, ref rs!); // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/34874 + AddResourceSet(localResourceSets, updateCultureInfo.Name, ref rs!); // TODO-NULLABLE: Pass non-null string? to string ref (https://github.com/dotnet/roslyn/issues/34874) // stop when we've added current or reached invariant (top of chain) if (updateCultureInfo == foundCulture) diff --git a/src/Common/src/CoreLib/System/Resources/ResourceReader.Core.cs b/src/Common/src/CoreLib/System/Resources/ResourceReader.Core.cs index 86e543b376e2..94f7f62c8d05 100644 --- a/src/Common/src/CoreLib/System/Resources/ResourceReader.Core.cs +++ b/src/Common/src/CoreLib/System/Resources/ResourceReader.Core.cs @@ -67,6 +67,7 @@ private object DeserializeObject(int typeIndex) private void InitializeBinaryFormatter() { +#pragma warning disable CS8634 // TODO-NULLABLE: Remove warning disable when nullable attributes are respected LazyInitializer.EnsureInitialized(ref s_binaryFormatterType, () => Type.GetType("System.Runtime.Serialization.Formatters.Binary.BinaryFormatter, System.Runtime.Serialization.Formatters, Version=0.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", throwOnError: true)); @@ -81,6 +82,7 @@ private void InitializeBinaryFormatter() .MakeGenericMethod(s_binaryFormatterType)! .Invoke(null, new object[] { binaryFormatterDeserialize })!; }); +#pragma warning restore CS8634 _binaryFormatter = Activator.CreateInstance(s_binaryFormatterType!)!; } diff --git a/src/Common/src/CoreLib/System/Resources/ResourceReader.cs b/src/Common/src/CoreLib/System/Resources/ResourceReader.cs index 4b280924ea61..e83f166fa71e 100644 --- a/src/Common/src/CoreLib/System/Resources/ResourceReader.cs +++ b/src/Common/src/CoreLib/System/Resources/ResourceReader.cs @@ -161,11 +161,11 @@ private unsafe void Dispose(bool disposing) // Close the stream in a thread-safe way. This fix means // that we may call Close n times, but that's safe. BinaryReader copyOfStore = _store; - _store = null!; // TODO-NULLABLE: dispose should not null this out + _store = null!; // TODO-NULLABLE: Avoid nulling out in Dispose if (copyOfStore != null) copyOfStore.Close(); } - _store = null!; // TODO-NULLABLE: dispose should not null this out + _store = null!; // TODO-NULLABLE: Avoid nulling out in Dispose _namePositions = null; _nameHashes = null; _ums = null; @@ -960,7 +960,7 @@ private Type FindType(int typeIndex) } } Debug.Assert(_typeTable[typeIndex] != null, "Should have found a type!"); - return _typeTable[typeIndex]!; // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/34644 + return _typeTable[typeIndex]!; // TODO-NULLABLE: Indexer nullability tracked (https://github.com/dotnet/roslyn/issues/34644) } private string TypeNameFromTypeCode(ResourceTypeCode typeCode) @@ -1030,22 +1030,12 @@ public object Key } } - public object? Current // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/23268 - { - get - { - return Entry; - } - } +#pragma warning disable CS8612 // TODO-NULLABLE: Covariant return types (https://github.com/dotnet/roslyn/issues/23268) + public object Current => Entry; +#pragma warning restore CS8612 // Warning: This requires that you call the Key or Entry property FIRST before calling it! - internal int DataPosition - { - get - { - return _dataPosition; - } - } + internal int DataPosition => _dataPosition; public DictionaryEntry Entry { diff --git a/src/Common/src/CoreLib/System/Resources/ResourceSet.cs b/src/Common/src/CoreLib/System/Resources/ResourceSet.cs index 936e43c4d750..4f5edf8426b0 100644 --- a/src/Common/src/CoreLib/System/Resources/ResourceSet.cs +++ b/src/Common/src/CoreLib/System/Resources/ResourceSet.cs @@ -29,7 +29,7 @@ namespace System.Resources public class ResourceSet : IDisposable, IEnumerable { protected IResourceReader Reader = null!; - internal Hashtable? Table; // TODO-NULLABLE: should not be nulled out in Dispose + internal Hashtable? Table; // TODO-NULLABLE: Avoid nulling out in Dispose private Hashtable? _caseInsensitiveTable; // For case-insensitive lookups. @@ -92,11 +92,11 @@ protected virtual void Dispose(bool disposing) { // Close the Reader in a thread-safe way. IResourceReader? copyOfReader = Reader; - Reader = null!; // TODO-NULLABLE: should not be nulled out in the Dispose + Reader = null!; // TODO-NULLABLE: Avoid nulling out in Dispose if (copyOfReader != null) copyOfReader.Close(); } - Reader = null!; // TODO-NULLABLE: should not be nulled out in the Dispose + Reader = null!; // TODO-NULLABLE: Avoid nulling out in Dispose _caseInsensitiveTable = null; Table = null; } diff --git a/src/Common/src/CoreLib/System/Resources/RuntimeResourceSet.cs b/src/Common/src/CoreLib/System/Resources/RuntimeResourceSet.cs index 0cb229d61a86..0d33f3a047da 100644 --- a/src/Common/src/CoreLib/System/Resources/RuntimeResourceSet.cs +++ b/src/Common/src/CoreLib/System/Resources/RuntimeResourceSet.cs @@ -176,12 +176,12 @@ sealed class RuntimeResourceSet : ResourceSet, IEnumerable // for arbitrarily long times, since the object is usually a string // literal that will live for the lifetime of the appdomain. The // value is a ResourceLocator instance, which might cache the object. - private Dictionary? _resCache; // TODO-NULLABLE: should not be nulled out in Dispose + private Dictionary? _resCache; // TODO-NULLABLE: Avoid nulling out in Dispose // For our special load-on-demand reader, cache the cast. The // RuntimeResourceSet's implementation knows how to treat this reader specially. - private ResourceReader? _defaultReader; // TODO-NULLABLE: should not be nulled out in Dispose + private ResourceReader? _defaultReader; // TODO-NULLABLE: Avoid nulling out in Dispose // This is a lookup table for case-insensitive lookups, and may be null. // Consider always using a case-insensitive resource cache, as we don't diff --git a/src/Common/src/CoreLib/System/Runtime/CompilerServices/AsyncMethodBuilder.cs b/src/Common/src/CoreLib/System/Runtime/CompilerServices/AsyncMethodBuilder.cs index f33f0c714837..9fcb418f8532 100644 --- a/src/Common/src/CoreLib/System/Runtime/CompilerServices/AsyncMethodBuilder.cs +++ b/src/Common/src/CoreLib/System/Runtime/CompilerServices/AsyncMethodBuilder.cs @@ -18,6 +18,7 @@ using System.Threading.Tasks; using System.Text; using Internal.Runtime.CompilerServices; +using System.Diagnostics.CodeAnalysis; namespace System.Runtime.CompilerServices { @@ -131,7 +132,7 @@ public void SetException(Exception exception) // and decrement its outstanding operation count. try { - System.Threading.Tasks.Task.ThrowAsync(exception!, targetContext: _synchronizationContext); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + System.Threading.Tasks.Task.ThrowAsync(exception!, targetContext: _synchronizationContext); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected } finally { @@ -143,7 +144,7 @@ public void SetException(Exception exception) // Otherwise, queue the exception to be thrown on the ThreadPool. This will // result in a crash unless legacy exception behavior is enabled by a config // file or a CLR host. - System.Threading.Tasks.Task.ThrowAsync(exception!, targetContext: null); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + System.Threading.Tasks.Task.ThrowAsync(exception!, targetContext: null); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected } // The exception was propagated already; we don't need or want to fault the builder, just mark it as completed. @@ -314,7 +315,7 @@ public struct AsyncTaskMethodBuilder { #if !PROJECTN /// A cached task for default(TResult). - internal readonly static Task s_defaultResultTask = AsyncTaskCache.CreateCacheableTask(default(TResult)!); // TODO-NULLABLE-GENERIC + internal readonly static Task s_defaultResultTask = AsyncTaskCache.CreateCacheableTask(default(TResult)!); // TODO-NULLABLE: Remove ! when nullable attributes are respected #endif /// The lazily-initialized built task. @@ -396,17 +397,17 @@ public void AwaitUnsafeOnCompleted( // The null tests here ensure that the jit can optimize away the interface // tests when TAwaiter is a ref type. - if ((null != (object)default(TAwaiter)!) && (awaiter is ITaskAwaiter)) // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/34757 + if ((null != (object)default(TAwaiter)!) && (awaiter is ITaskAwaiter)) // TODO-NULLABLE: default(T) == null warning (https://github.com/dotnet/roslyn/issues/34757) { ref TaskAwaiter ta = ref Unsafe.As(ref awaiter); // relies on TaskAwaiter/TaskAwaiter having the same layout TaskAwaiter.UnsafeOnCompletedInternal(ta.m_task, box, continueOnCapturedContext: true); } - else if ((null != (object)default(TAwaiter)!) && (awaiter is IConfiguredTaskAwaiter)) // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/34757 + else if ((null != (object)default(TAwaiter)!) && (awaiter is IConfiguredTaskAwaiter)) // TODO-NULLABLE: default(T) == null warning (https://github.com/dotnet/roslyn/issues/34757) { ref ConfiguredTaskAwaitable.ConfiguredTaskAwaiter ta = ref Unsafe.As(ref awaiter); TaskAwaiter.UnsafeOnCompletedInternal(ta.m_task, box, ta.m_continueOnCapturedContext); } - else if ((null != (object)default(TAwaiter)!) && (awaiter is IStateMachineBoxAwareAwaiter)) // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/34757 + else if ((null != (object)default(TAwaiter)!) && (awaiter is IStateMachineBoxAwareAwaiter)) // TODO-NULLABLE: default(T) == null warning (https://github.com/dotnet/roslyn/issues/34757) { try { @@ -568,7 +569,7 @@ private static void ExecutionContextCallback(object? s) /// A delegate to the method. private Action? _moveNextAction; /// The state machine itself. - public TStateMachine StateMachine = default!; // mutable struct; do not make this readonly. SOS DumpAsync command depends on this name. // TODO-NULLABLE-GENERIC + [AllowNull, MaybeNull] public TStateMachine StateMachine = default!; // mutable struct; do not make this readonly. SOS DumpAsync command depends on this name. // TODO-NULLABLE: Remove ! when nullable attributes are respected /// Captured ExecutionContext with which to invoke ; may be null. public ExecutionContext? Context; @@ -612,7 +613,7 @@ private void MoveNext(Thread? threadPoolThread) // Clear out state now that the async method has completed. // This avoids keeping arbitrary state referenced by lifted locals // if this Task / state machine box is held onto. - StateMachine = default!; // TODO-NULLABLE-GENERIC + StateMachine = default!; // TODO-NULLABLE: Remove ! when nullable attributes are respected Context = default; #if !CORERT @@ -703,7 +704,7 @@ public void SetResult(TResult result) /// Completes the already initialized task with the specified result. /// The result to use to complete the task. - private void SetExistingTaskResult(TResult result) + private void SetExistingTaskResult([AllowNull] TResult result) { Debug.Assert(m_task != null, "Expected non-null task"); @@ -755,7 +756,7 @@ internal void SetResult(Task completedTask) else { // Otherwise, complete the task that's there. - SetExistingTaskResult(default!); // TODO-NULLABLE-GENERIC + SetExistingTaskResult(default!); // Remove ! when nullable attributes are respected } } @@ -779,7 +780,7 @@ public void SetException(Exception exception) // If the exception represents cancellation, cancel the task. Otherwise, fault the task. bool successfullySet = exception is OperationCanceledException oce ? task.TrySetCanceled(oce.CancellationToken, oce) : - task.TrySetException(exception!); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + task.TrySetException(exception!); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected // Unlike with TaskCompletionSource, we do not need to spin here until _taskAndStateMachine is completed, // since AsyncTaskMethodBuilder.SetException should not be immediately followed by any code @@ -863,7 +864,7 @@ internal static Task GetTaskForResult(TResult result) // find a cached value, since static fields (even if readonly and integral types) // require special access helpers in this NGEN'd and domain-neutral. - if (null != (object)default(TResult)!) // help the JIT avoid the value type branches for ref types // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/34757 + if (null != (object)default(TResult)!) // help the JIT avoid the value type branches for ref types // TODO-NULLABLE: default(T) == null warning (https://github.com/dotnet/roslyn/issues/34757) { // Special case simple value types: // - Boolean @@ -879,7 +880,7 @@ internal static Task GetTaskForResult(TResult result) // For Boolean, we cache all possible values. if (typeof(TResult) == typeof(bool)) // only the relevant branches are kept for each value-type generic instantiation { - bool value = (bool)(object)result!; // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/34976 + bool value = (bool)(object)result!; Task task = value ? AsyncTaskCache.TrueTask : AsyncTaskCache.FalseTask; return Unsafe.As>(task); // UnsafeCast avoids type check we know will succeed } @@ -889,7 +890,7 @@ internal static Task GetTaskForResult(TResult result) // Compare to constants to avoid static field access if outside of cached range. // We compare to the upper bound first, as we're more likely to cache miss on the upper side than on the // lower side, due to positive values being more common than negative as return values. - int value = (int)(object)result!; // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/34976 + int value = (int)(object)result!; if (value < AsyncTaskCache.EXCLUSIVE_INT32_MAX && value >= AsyncTaskCache.INCLUSIVE_INT32_MIN) { @@ -908,7 +909,7 @@ internal static Task GetTaskForResult(TResult result) (typeof(TResult) == typeof(short) && default(short) == (short)(object)result!) || (typeof(TResult) == typeof(ushort) && default(ushort) == (ushort)(object)result!) || (typeof(TResult) == typeof(IntPtr) && default == (IntPtr)(object)result!) || - (typeof(TResult) == typeof(UIntPtr) && default == (UIntPtr)(object)result!)) // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/34976 + (typeof(TResult) == typeof(UIntPtr) && default == (UIntPtr)(object)result!)) { return s_defaultResultTask; } @@ -958,7 +959,7 @@ private static Task[] CreateInt32Tasks() /// Specifies the result type. /// The result for the task. /// The cacheable task. - internal static Task CreateCacheableTask(TResult result) => + internal static Task CreateCacheableTask([AllowNull] TResult result) => new Task(false, result, (TaskCreationOptions)InternalTaskOptions.DoNotDispose, default); } @@ -1008,7 +1009,7 @@ public static void Start(ref TStateMachine stateMachine) where TS try { - stateMachine!.MoveNext(); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + stateMachine!.MoveNext(); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected } finally { diff --git a/src/Common/src/CoreLib/System/Runtime/CompilerServices/ConditionalWeakTable.cs b/src/Common/src/CoreLib/System/Runtime/CompilerServices/ConditionalWeakTable.cs index bbbf58d54537..7322bbe9126a 100644 --- a/src/Common/src/CoreLib/System/Runtime/CompilerServices/ConditionalWeakTable.cs +++ b/src/Common/src/CoreLib/System/Runtime/CompilerServices/ConditionalWeakTable.cs @@ -5,6 +5,7 @@ using System.Collections; using System.Collections.Generic; using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.Threading; using Internal.Runtime.CompilerServices; @@ -51,7 +52,7 @@ public ConditionalWeakTable() /// The key may get garbaged collected during the TryGetValue operation. If so, TryGetValue /// may at its discretion, return "false" and set "value" to the default (as if the key was not present.) /// - public bool TryGetValue(TKey key, out TValue value) + public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value) { if (key is null) { @@ -362,7 +363,7 @@ public KeyValuePair Current } } - object? IEnumerator.Current => Current; // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/23268 + object? IEnumerator.Current => Current; public void Reset() { } } @@ -502,7 +503,7 @@ internal void CreateEntryNoResize(TKey key, TValue value) } /// Worker for finding a key/value pair. Must hold _lock. - internal bool TryGetValueWorker(TKey key, out TValue value) + internal bool TryGetValueWorker(TKey key, [MaybeNullWhen(false)] out TValue value) { Debug.Assert(key != null); // Key already validated as non-null @@ -536,7 +537,7 @@ internal int FindEntry(TKey key, out object? value) } /// Gets the entry at the specified entry index. - internal bool TryGetEntry(int index, out TKey key, out TValue value) + internal bool TryGetEntry(int index, [MaybeNullWhen(false)] out TKey key, [MaybeNullWhen(false)] out TValue value) { if (index < _entries.Length) { @@ -551,8 +552,8 @@ internal bool TryGetEntry(int index, out TKey key, out TValue value) } } - key = default!; // TODO-NULLABLE-GENERIC - value = default!; // TODO-NULLABLE-GENERIC + key = default!; + value = default!; return false; } diff --git a/src/Common/src/CoreLib/System/Runtime/CompilerServices/DateTimeConstantAttribute.cs b/src/Common/src/CoreLib/System/Runtime/CompilerServices/DateTimeConstantAttribute.cs index 1b5bc375cddf..ee9250b2d97c 100644 --- a/src/Common/src/CoreLib/System/Runtime/CompilerServices/DateTimeConstantAttribute.cs +++ b/src/Common/src/CoreLib/System/Runtime/CompilerServices/DateTimeConstantAttribute.cs @@ -14,6 +14,8 @@ public DateTimeConstantAttribute(long ticks) _date = new DateTime(ticks); } - public override object? Value => _date; // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/23268 +#pragma warning disable CS8608 + public override object Value => _date; +#pragma warning restore CS8608 } } diff --git a/src/Common/src/CoreLib/System/Runtime/CompilerServices/ICastable.cs b/src/Common/src/CoreLib/System/Runtime/CompilerServices/ICastable.cs index 95c514953a9f..7320c2d0840d 100644 --- a/src/Common/src/CoreLib/System/Runtime/CompilerServices/ICastable.cs +++ b/src/Common/src/CoreLib/System/Runtime/CompilerServices/ICastable.cs @@ -2,6 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System.Diagnostics.CodeAnalysis; + namespace System.Runtime.CompilerServices { /// @@ -31,7 +33,7 @@ public interface ICastable // because this is the only guard placed before an interface invocation at runtime. If a type decides // it no longer wants to implement a given interface it has no way to synchronize with callers that // have already cached this relationship and can invoke directly via the interface pointer. - bool IsInstanceOfInterface(RuntimeTypeHandle interfaceType, out Exception? castError); + bool IsInstanceOfInterface(RuntimeTypeHandle interfaceType, [NotNullWhen(true)] out Exception? castError); // This is called as part of the interface dispatch mechanism when the dispatcher logic cannot find // the given interface type in the interface map of this object. diff --git a/src/Common/src/CoreLib/System/Runtime/CompilerServices/RuntimeHelpers.cs b/src/Common/src/CoreLib/System/Runtime/CompilerServices/RuntimeHelpers.cs index ab7b1d56553a..b251c0b05d5c 100644 --- a/src/Common/src/CoreLib/System/Runtime/CompilerServices/RuntimeHelpers.cs +++ b/src/Common/src/CoreLib/System/Runtime/CompilerServices/RuntimeHelpers.cs @@ -23,9 +23,9 @@ public static T[] GetSubArray(T[] array, Range range) ThrowHelper.ThrowArgumentNullException(ExceptionArgument.array); } - (int offset, int length) = range.GetOffsetAndLength(array!.Length); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + (int offset, int length) = range.GetOffsetAndLength(array!.Length); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected - if (default(T)! != null || typeof(T[]) == array.GetType()) // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/34757 + if (default(T)! != null || typeof(T[]) == array.GetType()) // TODO-NULLABLE: default(T) == null warning (https://github.com/dotnet/roslyn/issues/34757) { // We know the type of the array to be exactly T[]. diff --git a/src/Common/src/CoreLib/System/Runtime/CompilerServices/StrongBox.cs b/src/Common/src/CoreLib/System/Runtime/CompilerServices/StrongBox.cs index c2f681e30c29..7b59222b6e22 100644 --- a/src/Common/src/CoreLib/System/Runtime/CompilerServices/StrongBox.cs +++ b/src/Common/src/CoreLib/System/Runtime/CompilerServices/StrongBox.cs @@ -2,6 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System.Diagnostics.CodeAnalysis; + namespace System.Runtime.CompilerServices { /// @@ -15,7 +17,7 @@ public class StrongBox : IStrongBox /// This is explicitly exposed as a field instead of a property to enable loading the address of the field. /// [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1051:DoNotDeclareVisibleInstanceFields")] - public T Value = default!; // TODO-NULLABLE-GENERIC + [MaybeNull] public T Value = default!; /// /// Initializes a new StrongBox which can receive a value when used in a reference call. @@ -41,7 +43,7 @@ public StrongBox(T value) } set { - Value = (T)value!; // TODO-NULLABLE-GENERIC + Value = (T)value!; } } } diff --git a/src/Common/src/CoreLib/System/Runtime/CompilerServices/YieldAwaitable.cs b/src/Common/src/CoreLib/System/Runtime/CompilerServices/YieldAwaitable.cs index c6b19d654e86..87c610f724d5 100644 --- a/src/Common/src/CoreLib/System/Runtime/CompilerServices/YieldAwaitable.cs +++ b/src/Common/src/CoreLib/System/Runtime/CompilerServices/YieldAwaitable.cs @@ -130,7 +130,7 @@ void IStateMachineBoxAwareAwaiter.AwaitUnsafeOnCompleted(IAsyncStateMachineBox b SynchronizationContext? syncCtx = SynchronizationContext.Current; if (syncCtx != null && syncCtx.GetType() != typeof(SynchronizationContext)) { - syncCtx.Post(s => ((IAsyncStateMachineBox)s!).MoveNext(), box); // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + syncCtx.Post(s => ((IAsyncStateMachineBox)s!).MoveNext(), box); } else { @@ -141,7 +141,7 @@ void IStateMachineBoxAwareAwaiter.AwaitUnsafeOnCompleted(IAsyncStateMachineBox b } else { - Task.Factory.StartNew(s => ((IAsyncStateMachineBox)s!).MoveNext(), box, default, TaskCreationOptions.PreferFairness, scheduler); // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + Task.Factory.StartNew(s => ((IAsyncStateMachineBox)s!).MoveNext(), box, default, TaskCreationOptions.PreferFairness, scheduler); } } } diff --git a/src/Common/src/CoreLib/System/Runtime/ExceptionServices/ExceptionDispatchInfo.cs b/src/Common/src/CoreLib/System/Runtime/ExceptionServices/ExceptionDispatchInfo.cs index 3578d43d9cfa..861097861deb 100644 --- a/src/Common/src/CoreLib/System/Runtime/ExceptionServices/ExceptionDispatchInfo.cs +++ b/src/Common/src/CoreLib/System/Runtime/ExceptionServices/ExceptionDispatchInfo.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; namespace System.Runtime.ExceptionServices { @@ -53,6 +54,7 @@ public Exception SourceException // This method will restore the original stack trace and bucketing details before throwing // the exception so that it is easy, from debugging standpoint, to understand what really went wrong on // the original thread. + [DoesNotReturn] [StackTraceHidden] public void Throw() { @@ -63,6 +65,7 @@ public void Throw() // Throws the source exception, maintaining the original bucketing details and augmenting // rather than replacing the original stack trace. + [DoesNotReturn] public static void Throw(Exception source) => Capture(source).Throw(); } } diff --git a/src/Common/src/CoreLib/System/Runtime/InteropServices/Marshal.NoCom.cs b/src/Common/src/CoreLib/System/Runtime/InteropServices/Marshal.NoCom.cs index 896312f95ad3..4ec8f58c3f20 100644 --- a/src/Common/src/CoreLib/System/Runtime/InteropServices/Marshal.NoCom.cs +++ b/src/Common/src/CoreLib/System/Runtime/InteropServices/Marshal.NoCom.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System.Diagnostics.CodeAnalysis; using System.Reflection; using System.Runtime.InteropServices.ComTypes; @@ -35,9 +36,8 @@ public static void CleanupUnusedObjectsInCurrentContext() { } - public static IntPtr CreateAggregatedObject(IntPtr pOuter, T o) + public static IntPtr CreateAggregatedObject(IntPtr pOuter, T o) where T : object { - // TODO-NULLABLE-GENERIC: T cannot be null throw new PlatformNotSupportedException(SR.PlatformNotSupported_ComInterop); } @@ -46,9 +46,8 @@ public static IntPtr CreateAggregatedObject(IntPtr pOuter, T o) throw new PlatformNotSupportedException(SR.PlatformNotSupported_ComInterop); } - public static TWrapper CreateWrapperOfType(T o) + public static TWrapper CreateWrapperOfType([AllowNull] T o) { - // TODO-NULLABLE-GENERIC: T can be null throw new PlatformNotSupportedException(SR.PlatformNotSupported_ComInterop); } @@ -72,9 +71,8 @@ public static IntPtr GetComInterfaceForObject(object o, Type T, CustomQueryInter throw new PlatformNotSupportedException(SR.PlatformNotSupported_ComInterop); } - public static IntPtr GetComInterfaceForObject(T o) + public static IntPtr GetComInterfaceForObject([DisallowNull] T o) { - // TODO-NULLABLE-GENERIC: T cannot be null throw new PlatformNotSupportedException(SR.PlatformNotSupported_ComInterop); } @@ -103,9 +101,8 @@ public static void GetNativeVariantForObject(object? obj, IntPtr pDstNativeVaria throw new PlatformNotSupportedException(SR.PlatformNotSupported_ComInterop); } - public static void GetNativeVariantForObject(T obj, IntPtr pDstNativeVariant) + public static void GetNativeVariantForObject([AllowNull] T obj, IntPtr pDstNativeVariant) { - // TODO-NULLABLE-GENERIC: T can be null throw new PlatformNotSupportedException(SR.PlatformNotSupported_ComInterop); } @@ -124,9 +121,9 @@ public static object GetObjectForIUnknown(IntPtr pUnk) throw new PlatformNotSupportedException(SR.PlatformNotSupported_ComInterop); } + [return: MaybeNull] public static T GetObjectForNativeVariant(IntPtr pSrcNativeVariant) { - // TODO-NULLABLE-GENERIC: T can be null throw new PlatformNotSupportedException(SR.PlatformNotSupported_ComInterop); } @@ -135,7 +132,6 @@ public static T GetObjectForNativeVariant(IntPtr pSrcNativeVariant) throw new PlatformNotSupportedException(SR.PlatformNotSupported_ComInterop); } - // TODO-NULLABLE-GENERIC: T[] contents can be null public static T[] GetObjectsForNativeVariants(IntPtr aSrcNativeVariant, int cVars) { throw new PlatformNotSupportedException(SR.PlatformNotSupported_ComInterop); diff --git a/src/Common/src/CoreLib/System/Runtime/InteropServices/Marshal.Unix.cs b/src/Common/src/CoreLib/System/Runtime/InteropServices/Marshal.Unix.cs index f4634fdab334..c0e9bd6d7797 100644 --- a/src/Common/src/CoreLib/System/Runtime/InteropServices/Marshal.Unix.cs +++ b/src/Common/src/CoreLib/System/Runtime/InteropServices/Marshal.Unix.cs @@ -9,8 +9,6 @@ namespace System.Runtime.InteropServices { public static partial class Marshal { - // TODO-NULLABLE: This has different behavior from the other PtrToString(IntPtr, int) functions - // This is due to PtrToStringUTF8 on Unix and is being resolved independently public static string? PtrToStringAuto(IntPtr ptr, int len) { return PtrToStringUTF8(ptr, len); diff --git a/src/Common/src/CoreLib/System/Runtime/InteropServices/Marshal.Windows.cs b/src/Common/src/CoreLib/System/Runtime/InteropServices/Marshal.Windows.cs index a7ee8b3548da..f4027d0f59f7 100644 --- a/src/Common/src/CoreLib/System/Runtime/InteropServices/Marshal.Windows.cs +++ b/src/Common/src/CoreLib/System/Runtime/InteropServices/Marshal.Windows.cs @@ -8,8 +8,6 @@ namespace System.Runtime.InteropServices { public static partial class Marshal { - // TODO-NULLABLE: This has different behavior from the other PtrToString(IntPtr, int) functions - // This is due to PtrToStringUTF8 on Unix and is being resolved independently public static string? PtrToStringAuto(IntPtr ptr, int len) { return PtrToStringUni(ptr, len); diff --git a/src/Common/src/CoreLib/System/Runtime/InteropServices/Marshal.cs b/src/Common/src/CoreLib/System/Runtime/InteropServices/Marshal.cs index 683468559fff..e9485bf42157 100644 --- a/src/Common/src/CoreLib/System/Runtime/InteropServices/Marshal.cs +++ b/src/Common/src/CoreLib/System/Runtime/InteropServices/Marshal.cs @@ -8,6 +8,7 @@ using System.Text; using Internal.Runtime.CompilerServices; +using System.Diagnostics.CodeAnalysis; #if BIT64 using nuint = System.UInt64; @@ -95,8 +96,7 @@ public static unsafe string PtrToStringUni(IntPtr ptr, int len) return string.CreateStringFromEncoding((byte*)ptr, nbBytes, Encoding.UTF8); } - // TODO-NULLABLE: This has different behavior from the other PtrToString(IntPtr, int) functions - public static unsafe string? PtrToStringUTF8(IntPtr ptr, int byteLen) + public static unsafe string PtrToStringUTF8(IntPtr ptr, int byteLen) { if (ptr == IntPtr.Zero) { @@ -530,9 +530,8 @@ public static void PrelinkAll(Type c) } } - public static void StructureToPtr(T structure, IntPtr ptr, bool fDeleteOld) + public static void StructureToPtr([DisallowNull] T structure, IntPtr ptr, bool fDeleteOld) { - // TODO-NULLABLE-GENERIC: T cannot be null StructureToPtr((object)structure!, ptr, fDeleteOld); } @@ -571,13 +570,12 @@ public static void PtrToStructure(IntPtr ptr, object structure) PtrToStructureHelper(ptr, structure, allowValueClasses: false); } - public static void PtrToStructure(IntPtr ptr, T structure) + public static void PtrToStructure(IntPtr ptr, [DisallowNull] T structure) { - // TODO-NULLABLE-GENERIC: T cannot be null PtrToStructure(ptr, (object)structure!); } - // TODO-NULLABLE-GENERIC: T can be null + [return: MaybeNull] public static T PtrToStructure(IntPtr ptr) => (T)PtrToStructure(ptr, typeof(T))!; public static void DestroyStructure(IntPtr ptr) => DestroyStructure(ptr, typeof(T)); @@ -898,10 +896,9 @@ public static IntPtr GetFunctionPointerForDelegate(Delegate d) return GetFunctionPointerForDelegateInternal(d); } - public static IntPtr GetFunctionPointerForDelegate(TDelegate d) + public static IntPtr GetFunctionPointerForDelegate(TDelegate d) where TDelegate : object { - // TODO-NULLABLE-GENERIC: T cannot be null - return GetFunctionPointerForDelegate((Delegate)(object)d!); + return GetFunctionPointerForDelegate((Delegate)(object)d); } public static int GetHRForLastWin32Error() diff --git a/src/Common/src/CoreLib/System/Runtime/InteropServices/MemoryMarshal.cs b/src/Common/src/CoreLib/System/Runtime/InteropServices/MemoryMarshal.cs index 6816d3c53183..314bc0287594 100644 --- a/src/Common/src/CoreLib/System/Runtime/InteropServices/MemoryMarshal.cs +++ b/src/Common/src/CoreLib/System/Runtime/InteropServices/MemoryMarshal.cs @@ -8,6 +8,7 @@ using System.Diagnostics; using Internal.Runtime.CompilerServices; +using System.Diagnostics.CodeAnalysis; namespace System.Runtime.InteropServices { @@ -55,7 +56,7 @@ public static bool TryGetArray(ReadOnlyMemory memory, out ArraySegment Debug.Assert(obj is MemoryManager); if (Unsafe.As>(obj).TryGetArray(out ArraySegment tempArraySegment)) { - segment = new ArraySegment(tempArraySegment.Array!, tempArraySegment.Offset + index, length); // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + segment = new ArraySegment(tempArraySegment.Array!, tempArraySegment.Offset + index, length); return true; } } @@ -86,7 +87,7 @@ public static bool TryGetArray(ReadOnlyMemory memory, out ArraySegment /// The memory to get the manager for. /// The returned manager of the . /// A indicating if it was successful. - public static bool TryGetMemoryManager(ReadOnlyMemory memory, out TManager? manager) // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + public static bool TryGetMemoryManager(ReadOnlyMemory memory, [NotNullWhen(true)] out TManager? manager) where TManager : MemoryManager { TManager? localManager; // Use register for null comparison rather than byref @@ -105,7 +106,7 @@ public static bool TryGetMemoryManager(ReadOnlyMemory memory, ou /// The offset from the start of the that the represents. /// The length of the that the represents. /// A indicating if it was successful. - public static bool TryGetMemoryManager(ReadOnlyMemory memory, out TManager? manager, out int start, out int length) // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + public static bool TryGetMemoryManager(ReadOnlyMemory memory, [NotNullWhen(true)] out TManager? manager, out int start, out int length) where TManager : MemoryManager { TManager? localManager; // Use register for null comparison rather than byref @@ -141,7 +142,7 @@ public static IEnumerable ToEnumerable(ReadOnlyMemory memory) /// The starting location in . /// The number of items in . /// - public static bool TryGetString(ReadOnlyMemory memory, out string? text, out int start, out int length) + public static bool TryGetString(ReadOnlyMemory memory, [NotNullWhen(true)] out string? text, out int start, out int length) { if (memory.GetObjectStartLength(out int offset, out int count) is string s) { @@ -306,7 +307,7 @@ public static Memory CreateFromPinnedArray(T[]? array, int start, int leng ThrowHelper.ThrowArgumentOutOfRangeException(); return default; } - if (default(T)! == null && array.GetType() != typeof(T[])) // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/34757 + if (default(T)! == null && array.GetType() != typeof(T[])) // TODO-NULLABLE: default(T) == null warning (https://github.com/dotnet/roslyn/issues/34757) ThrowHelper.ThrowArrayTypeMismatchException(); if ((uint)start > (uint)array.Length || (uint)length > (uint)(array.Length - start)) ThrowHelper.ThrowArgumentOutOfRangeException(); diff --git a/src/Common/src/CoreLib/System/Runtime/InteropServices/NativeLibrary.cs b/src/Common/src/CoreLib/System/Runtime/InteropServices/NativeLibrary.cs index b50a2e6918d7..30d50fea7c02 100644 --- a/src/Common/src/CoreLib/System/Runtime/InteropServices/NativeLibrary.cs +++ b/src/Common/src/CoreLib/System/Runtime/InteropServices/NativeLibrary.cs @@ -208,7 +208,7 @@ public static void SetDllImportResolver(Assembly assembly, DllImportResolver res try { - s_nativeDllResolveMap!.Add(assembly, resolver); // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + s_nativeDllResolveMap!.Add(assembly, resolver); // TODO-NULLABLE: Remove ! when compiler specially-recognizes CompareExchange for nullability } catch (ArgumentException) { diff --git a/src/Common/src/CoreLib/System/Runtime/Loader/AssemblyLoadContext.cs b/src/Common/src/CoreLib/System/Runtime/Loader/AssemblyLoadContext.cs index 7ee3dfac7628..cd11839bc877 100644 --- a/src/Common/src/CoreLib/System/Runtime/Loader/AssemblyLoadContext.cs +++ b/src/Common/src/CoreLib/System/Runtime/Loader/AssemblyLoadContext.cs @@ -118,7 +118,7 @@ private protected AssemblyLoadContext(bool representsTPALoadContext, bool isColl private void RaiseUnloadEvent() { // Ensure that we raise the Unload event only once - Interlocked.Exchange(ref _unloading, null!)?.Invoke(this); // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + Interlocked.Exchange(ref _unloading, null!)?.Invoke(this); } private void InitiateUnload() @@ -442,7 +442,7 @@ private void VerifyIsAlive() } } - private static AsyncLocal? s_asyncLocalCurrent; + private static AsyncLocal? s_asyncLocalCurrent; /// Nullable current AssemblyLoadContext used for context sensitive reflection APIs /// @@ -477,9 +477,9 @@ private static void SetCurrentContextualReflectionContext(AssemblyLoadContext? v { if (s_asyncLocalCurrent == null) { - Interlocked.CompareExchange?>(ref s_asyncLocalCurrent, new AsyncLocal(), null); + Interlocked.CompareExchange?>(ref s_asyncLocalCurrent, new AsyncLocal(), null); } - s_asyncLocalCurrent!.Value = value!; // TODO-NULLABLE-GENERIC + s_asyncLocalCurrent!.Value = value; // Remove ! when compiler specially-recognizes CompareExchange for nullability } /// Enter scope using this AssemblyLoadContext for ContextualReflection diff --git a/src/Common/src/CoreLib/System/Runtime/Serialization/SerializationInfo.cs b/src/Common/src/CoreLib/System/Runtime/Serialization/SerializationInfo.cs index 015fb0093b02..afcf0ed00c9a 100644 --- a/src/Common/src/CoreLib/System/Runtime/Serialization/SerializationInfo.cs +++ b/src/Common/src/CoreLib/System/Runtime/Serialization/SerializationInfo.cs @@ -539,104 +539,104 @@ private int FindElement(string name) public bool GetBoolean(string name) { Type foundType; - object value = GetElement(name, out foundType)!; // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/34976 - return ReferenceEquals(foundType, typeof(bool)) ? (bool)value : _converter.ToBoolean(value); // if value is null To* method will either deal with it or throw + object? value = GetElement(name, out foundType); + return ReferenceEquals(foundType, typeof(bool)) ? (bool)value! : _converter.ToBoolean(value!); // if value is null To* method will either deal with it or throw } public char GetChar(string name) { Type foundType; - object value = GetElement(name, out foundType)!; - return ReferenceEquals(foundType, typeof(char)) ? (char)value : _converter.ToChar(value); + object? value = GetElement(name, out foundType); + return ReferenceEquals(foundType, typeof(char)) ? (char)value! : _converter.ToChar(value!); } [CLSCompliant(false)] public sbyte GetSByte(string name) { Type foundType; - object value = GetElement(name, out foundType)!; - return ReferenceEquals(foundType, typeof(sbyte)) ? (sbyte)value : _converter.ToSByte(value); + object? value = GetElement(name, out foundType); + return ReferenceEquals(foundType, typeof(sbyte)) ? (sbyte)value! : _converter.ToSByte(value!); } public byte GetByte(string name) { Type foundType; - object value = GetElement(name, out foundType)!; - return ReferenceEquals(foundType, typeof(byte)) ? (byte)value : _converter.ToByte(value); + object? value = GetElement(name, out foundType); + return ReferenceEquals(foundType, typeof(byte)) ? (byte)value! : _converter.ToByte(value!); } public short GetInt16(string name) { Type foundType; - object value = GetElement(name, out foundType)!; - return ReferenceEquals(foundType, typeof(short)) ? (short)value : _converter.ToInt16(value); + object? value = GetElement(name, out foundType); + return ReferenceEquals(foundType, typeof(short)) ? (short)value! : _converter.ToInt16(value!); } [CLSCompliant(false)] public ushort GetUInt16(string name) { Type foundType; - object value = GetElement(name, out foundType)!; - return ReferenceEquals(foundType, typeof(ushort)) ? (ushort)value : _converter.ToUInt16(value); + object? value = GetElement(name, out foundType); + return ReferenceEquals(foundType, typeof(ushort)) ? (ushort)value! : _converter.ToUInt16(value!); } public int GetInt32(string name) { Type foundType; - object value = GetElement(name, out foundType)!; - return ReferenceEquals(foundType, typeof(int)) ? (int)value : _converter.ToInt32(value); + object? value = GetElement(name, out foundType); + return ReferenceEquals(foundType, typeof(int)) ? (int)value! : _converter.ToInt32(value!); } [CLSCompliant(false)] public uint GetUInt32(string name) { Type foundType; - object value = GetElement(name, out foundType)!; - return ReferenceEquals(foundType, typeof(uint)) ? (uint)value : _converter.ToUInt32(value); + object? value = GetElement(name, out foundType); + return ReferenceEquals(foundType, typeof(uint)) ? (uint)value! : _converter.ToUInt32(value!); } public long GetInt64(string name) { Type foundType; - object value = GetElement(name, out foundType)!; - return ReferenceEquals(foundType, typeof(long)) ? (long)value : _converter.ToInt64(value); + object? value = GetElement(name, out foundType); + return ReferenceEquals(foundType, typeof(long)) ? (long)value! : _converter.ToInt64(value!); } [CLSCompliant(false)] public ulong GetUInt64(string name) { Type foundType; - object value = GetElement(name, out foundType)!; - return ReferenceEquals(foundType, typeof(ulong)) ? (ulong)value : _converter.ToUInt64(value); + object? value = GetElement(name, out foundType); + return ReferenceEquals(foundType, typeof(ulong)) ? (ulong)value! : _converter.ToUInt64(value!); } public float GetSingle(string name) { Type foundType; - object value = GetElement(name, out foundType)!; - return ReferenceEquals(foundType, typeof(float)) ? (float)value : _converter.ToSingle(value); + object? value = GetElement(name, out foundType); + return ReferenceEquals(foundType, typeof(float)) ? (float)value! : _converter.ToSingle(value!); } public double GetDouble(string name) { Type foundType; - object value = GetElement(name, out foundType)!; - return ReferenceEquals(foundType, typeof(double)) ? (double)value : _converter.ToDouble(value); + object? value = GetElement(name, out foundType); + return ReferenceEquals(foundType, typeof(double)) ? (double)value! : _converter.ToDouble(value!); } public decimal GetDecimal(string name) { Type foundType; - object value = GetElement(name, out foundType)!; - return ReferenceEquals(foundType, typeof(decimal)) ? (decimal)value : _converter.ToDecimal(value); + object? value = GetElement(name, out foundType); + return ReferenceEquals(foundType, typeof(decimal)) ? (decimal)value! : _converter.ToDecimal(value!); } public DateTime GetDateTime(string name) { Type foundType; - object value = GetElement(name, out foundType)!; - return ReferenceEquals(foundType, typeof(DateTime)) ? (DateTime)value : _converter.ToDateTime(value); + object? value = GetElement(name, out foundType); + return ReferenceEquals(foundType, typeof(DateTime)) ? (DateTime)value! : _converter.ToDateTime(value!); } public string? GetString(string name) diff --git a/src/Common/src/CoreLib/System/Runtime/Serialization/SerializationInfoEnumerator.cs b/src/Common/src/CoreLib/System/Runtime/Serialization/SerializationInfoEnumerator.cs index 6712a3bc1f7d..65c34cb13dca 100644 --- a/src/Common/src/CoreLib/System/Runtime/Serialization/SerializationInfoEnumerator.cs +++ b/src/Common/src/CoreLib/System/Runtime/Serialization/SerializationInfoEnumerator.cs @@ -70,7 +70,7 @@ public bool MoveNext() return _current; } - object? IEnumerator.Current => Current; // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/23268 + object? IEnumerator.Current => Current; public SerializationEntry Current { diff --git a/src/Common/src/CoreLib/System/Span.Fast.cs b/src/Common/src/CoreLib/System/Span.Fast.cs index 456e1ec723ad..75faa0780d3e 100644 --- a/src/Common/src/CoreLib/System/Span.Fast.cs +++ b/src/Common/src/CoreLib/System/Span.Fast.cs @@ -49,7 +49,7 @@ public Span(T[]? array) this = default; return; // returns default } - if (default(T)! == null && array.GetType() != typeof(T[])) // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/34757 + if (default(T)! == null && array.GetType() != typeof(T[])) // TODO-NULLABLE: default(T) == null warning (https://github.com/dotnet/roslyn/issues/34757) ThrowHelper.ThrowArrayTypeMismatchException(); _pointer = new ByReference(ref Unsafe.As(ref array.GetRawSzArrayData())); @@ -78,7 +78,7 @@ public Span(T[]? array, int start, int length) this = default; return; // returns default } - if (default(T)! == null && array.GetType() != typeof(T[])) // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/34757 + if (default(T)! == null && array.GetType() != typeof(T[])) // TODO-NULLABLE: default(T) == null warning (https://github.com/dotnet/roslyn/issues/34757) ThrowHelper.ThrowArrayTypeMismatchException(); #if BIT64 // See comment in Span.Slice for how this works. diff --git a/src/Common/src/CoreLib/System/SpanHelpers.T.cs b/src/Common/src/CoreLib/System/SpanHelpers.T.cs index 37bc43fb43d2..035e31baa0ab 100644 --- a/src/Common/src/CoreLib/System/SpanHelpers.T.cs +++ b/src/Common/src/CoreLib/System/SpanHelpers.T.cs @@ -57,7 +57,7 @@ public unsafe static bool Contains(ref T searchSpace, T value, int length) IntPtr index = (IntPtr)0; // Use IntPtr for arithmetic to avoid unnecessary 64->32->64 truncations - if (default(T)! != null || (object)value != null) // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/34757 + if (default(T)! != null || (object)value != null) // TODO-NULLABLE: default(T) == null warning (https://github.com/dotnet/roslyn/issues/34757) { while (length >= 8) { @@ -127,7 +127,7 @@ public static unsafe int IndexOf(ref T searchSpace, T value, int length) Debug.Assert(length >= 0); IntPtr index = (IntPtr)0; // Use IntPtr for arithmetic to avoid unnecessary 64->32->64 truncations - if (default(T)! != null || (object)value != null) // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/34757 + if (default(T)! != null || (object)value != null) // TODO-NULLABLE: default(T) == null warning (https://github.com/dotnet/roslyn/issues/34757) { while (length >= 8) { @@ -216,7 +216,7 @@ public static int IndexOfAny(ref T searchSpace, T value0, T value1, int lengt T lookUp; int index = 0; - if (default(T)! != null || ((object)value0 != null && (object)value1 != null)) // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/34757 + if (default(T)! != null || ((object)value0 != null && (object)value1 != null)) // TODO-NULLABLE: default(T) == null warning (https://github.com/dotnet/roslyn/issues/34757) { while ((length - index) >= 8) { @@ -321,7 +321,7 @@ public static int IndexOfAny(ref T searchSpace, T value0, T value1, T value2, T lookUp; int index = 0; - if (default(T)! != null || ((object)value0 != null && (object)value1 != null && (object)value2 != null)) // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/34757 + if (default(T)! != null || ((object)value0 != null && (object)value1 != null && (object)value2 != null)) // TODO-NULLABLE: default(T) == null warning (https://github.com/dotnet/roslyn/issues/34757) { while ((length - index) >= 8) { @@ -484,7 +484,7 @@ public static int LastIndexOf(ref T searchSpace, T value, int length) { Debug.Assert(length >= 0); - if (default(T)! != null || (object)value != null) // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/34757 + if (default(T)! != null || (object)value != null) // TODO-NULLABLE: default(T) == null warning (https://github.com/dotnet/roslyn/issues/34757) { while (length >= 8) { @@ -567,7 +567,7 @@ public static int LastIndexOfAny(ref T searchSpace, T value0, T value1, int l Debug.Assert(length >= 0); T lookUp; - if (default(T)! != null || ((object)value0 != null && (object)value1 != null)) // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/34757 + if (default(T)! != null || ((object)value0 != null && (object)value1 != null)) // TODO-NULLABLE: default(T) == null warning (https://github.com/dotnet/roslyn/issues/34757) { while (length >= 8) { @@ -671,7 +671,7 @@ public static int LastIndexOfAny(ref T searchSpace, T value0, T value1, T val Debug.Assert(length >= 0); T lookUp; - if (default(T)! != null || ((object)value0 != null && (object)value1 != null)) // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/34757 + if (default(T)! != null || ((object)value0 != null && (object)value1 != null)) // TODO-NULLABLE: default(T) == null warning (https://github.com/dotnet/roslyn/issues/34757) { while (length >= 8) { diff --git a/src/Common/src/CoreLib/System/String.Comparison.cs b/src/Common/src/CoreLib/System/String.Comparison.cs index a420fc814160..6bf3de78fe40 100644 --- a/src/Common/src/CoreLib/System/String.Comparison.cs +++ b/src/Common/src/CoreLib/System/String.Comparison.cs @@ -522,7 +522,9 @@ public int CompareTo(object? value) // Determines the sorting relation of StrB to the current instance. // +#pragma warning disable CS8614 // TODO-NULLABLE: Covariant interface arguments (https://github.com/dotnet/roslyn/issues/35817) public int CompareTo(string? strB) +#pragma warning restore CS8614 { return string.Compare(this, strB, StringComparison.CurrentCulture); } @@ -616,7 +618,9 @@ public override bool Equals(object? obj) } // Determines whether two strings match. +#pragma warning disable CS8614 // TODO-NULLABLE: Covariant interface arguments (https://github.com/dotnet/roslyn/issues/35817) public bool Equals(string? value) +#pragma warning restore CS8614 { if (object.ReferenceEquals(this, value)) return true; diff --git a/src/Common/src/CoreLib/System/String.Searching.cs b/src/Common/src/CoreLib/System/String.Searching.cs index 3d386b743205..ab98daf75d5b 100644 --- a/src/Common/src/CoreLib/System/String.Searching.cs +++ b/src/Common/src/CoreLib/System/String.Searching.cs @@ -18,7 +18,7 @@ public bool Contains(string value) return SpanHelpers.IndexOf( ref _firstChar, Length, - ref value!._firstChar, // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + ref value!._firstChar, // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected value.Length) >= 0; } diff --git a/src/Common/src/CoreLib/System/String.cs b/src/Common/src/CoreLib/System/String.cs index 60a82de5159e..160ce4b3304c 100644 --- a/src/Common/src/CoreLib/System/String.cs +++ b/src/Common/src/CoreLib/System/String.cs @@ -6,6 +6,7 @@ using System.Collections; using System.Collections.Generic; using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; @@ -22,7 +23,7 @@ namespace System [Serializable] [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")] - public sealed partial class String : IComparable, IEnumerable, IConvertible, IEnumerable, IComparable, IEquatable, ICloneable + public sealed partial class String : IComparable, IEnumerable, IConvertible, IEnumerable, IComparable, IEquatable, ICloneable { /* * CONSTRUCTORS @@ -436,7 +437,7 @@ public unsafe char[] ToCharArray(int startIndex, int length) } [NonVersionable] - public static bool IsNullOrEmpty(string? value) + public static bool IsNullOrEmpty([NotNullWhen(false)] string? value) { // Using 0u >= (uint)value.Length rather than // value.Length == 0 as it will elide the bounds check to @@ -447,7 +448,7 @@ public static bool IsNullOrEmpty(string? value) return (value == null || 0u >= (uint)value.Length) ? true : false; } - public static bool IsNullOrWhiteSpace(string? value) + public static bool IsNullOrWhiteSpace([NotNullWhen(false)] string? value) { if (value == null) return true; @@ -675,6 +676,7 @@ internal static unsafe int strlen(byte* ptr) return length; } + [DoesNotReturn] private static void ThrowMustBeNullTerminatedString() { throw new ArgumentException(SR.Arg_MustBeNullTerminatedString); diff --git a/src/Common/src/CoreLib/System/StringComparer.cs b/src/Common/src/CoreLib/System/StringComparer.cs index 83c81aee96eb..ef7281f061d8 100644 --- a/src/Common/src/CoreLib/System/StringComparer.cs +++ b/src/Common/src/CoreLib/System/StringComparer.cs @@ -161,7 +161,9 @@ public int GetHashCode(object obj) public abstract int Compare(string? x, string? y); public abstract bool Equals(string? x, string? y); - public abstract int GetHashCode(string? obj); // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/23268 +#pragma warning disable CS8614 // Remove warning disable when nullable attributes are respected + public abstract int GetHashCode(string obj); +#pragma warning restore CS8614 } [Serializable] @@ -214,7 +216,7 @@ public override bool Equals(string? x, string? y) return _compareInfo.Compare(x, y, _options) == 0; } - public override int GetHashCode(string? obj) // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/23268 + public override int GetHashCode(string obj) { if (obj == null) { @@ -291,7 +293,7 @@ public override bool Equals(string? x, string? y) return x.Equals(y); } - public override int GetHashCode(string? obj) // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/23268 + public override int GetHashCode(string obj) { if (obj == null) { @@ -300,10 +302,10 @@ public override int GetHashCode(string? obj) // TODO-NULLABLE: https://github.co if (_ignoreCase) { - return obj!.GetHashCodeOrdinalIgnoreCase(); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + return obj!.GetHashCodeOrdinalIgnoreCase(); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected } - return obj!.GetHashCode(); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + return obj!.GetHashCode(); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected } // Equals method for the comparer itself. @@ -334,13 +336,13 @@ public OrdinalCaseSensitiveComparer() : base(false) public override bool Equals(string? x, string? y) => string.Equals(x, y); - public override int GetHashCode(string? obj) // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/23268 + public override int GetHashCode(string obj) { if (obj == null) { ThrowHelper.ThrowArgumentNullException(ExceptionArgument.obj); } - return obj!.GetHashCode(); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + return obj!.GetHashCode(); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected } public void GetObjectData(SerializationInfo info, StreamingContext context) @@ -379,13 +381,13 @@ public override bool Equals(string? x, string? y) return CompareInfo.EqualsOrdinalIgnoreCase(ref x.GetRawStringData(), ref y.GetRawStringData(), x.Length); } - public override int GetHashCode(string? obj) // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/23268 + public override int GetHashCode(string obj) { if (obj == null) { ThrowHelper.ThrowArgumentNullException(ExceptionArgument.obj); } - return obj!.GetHashCodeOrdinalIgnoreCase(); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + return obj!.GetHashCodeOrdinalIgnoreCase(); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected } public void GetObjectData(SerializationInfo info, StreamingContext context) diff --git a/src/Common/src/CoreLib/System/Text/DecoderBestFitFallback.cs b/src/Common/src/CoreLib/System/Text/DecoderBestFitFallback.cs index 98f3061fee11..91226416ab38 100644 --- a/src/Common/src/CoreLib/System/Text/DecoderBestFitFallback.cs +++ b/src/Common/src/CoreLib/System/Text/DecoderBestFitFallback.cs @@ -72,7 +72,7 @@ private static object InternalSyncObject object o = new object(); Interlocked.CompareExchange(ref s_InternalSyncObject, o, null); } - return s_InternalSyncObject!; // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + return s_InternalSyncObject!; // TODO-NULLABLE: Remove ! when compiler specially-recognizes CompareExchange for nullability } } diff --git a/src/Common/src/CoreLib/System/Text/DecoderExceptionFallback.cs b/src/Common/src/CoreLib/System/Text/DecoderExceptionFallback.cs index 338724c61a9c..3c1b360534f6 100644 --- a/src/Common/src/CoreLib/System/Text/DecoderExceptionFallback.cs +++ b/src/Common/src/CoreLib/System/Text/DecoderExceptionFallback.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System; +using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Runtime.Serialization; @@ -73,6 +74,7 @@ public override int Remaining } } + [DoesNotReturn] private void Throw(byte[] bytesUnknown, int index) { bytesUnknown = bytesUnknown ?? Array.Empty(); diff --git a/src/Common/src/CoreLib/System/Text/DecoderFallback.cs b/src/Common/src/CoreLib/System/Text/DecoderFallback.cs index 4b4bcb635e4d..aa3f65bfa9b4 100644 --- a/src/Common/src/CoreLib/System/Text/DecoderFallback.cs +++ b/src/Common/src/CoreLib/System/Text/DecoderFallback.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Threading; @@ -14,11 +15,11 @@ public abstract class DecoderFallback private static DecoderFallback? s_exceptionFallback; public static DecoderFallback ReplacementFallback => - s_replacementFallback ?? Interlocked.CompareExchange(ref s_replacementFallback, new DecoderReplacementFallback(), null) ?? s_replacementFallback!; // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + s_replacementFallback ?? Interlocked.CompareExchange(ref s_replacementFallback, new DecoderReplacementFallback(), null) ?? s_replacementFallback!; // TODO-NULLABLE: Remove ! when compiler specially-recognizes CompareExchange for nullability public static DecoderFallback ExceptionFallback => - s_exceptionFallback ?? Interlocked.CompareExchange(ref s_exceptionFallback, new DecoderExceptionFallback(), null) ?? s_exceptionFallback!; // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + s_exceptionFallback ?? Interlocked.CompareExchange(ref s_exceptionFallback, new DecoderExceptionFallback(), null) ?? s_exceptionFallback!; // TODO-NULLABLE: Remove ! when compiler specially-recognizes CompareExchange for nullability // Fallback // @@ -296,6 +297,7 @@ internal bool TryDrainRemainingDataForGetChars(Span chars, out int charsWr } // private helper methods + [DoesNotReturn] internal void ThrowLastBytesRecursive(byte[] bytesUnknown) { bytesUnknown = bytesUnknown ?? Array.Empty(); diff --git a/src/Common/src/CoreLib/System/Text/DecoderNLS.cs b/src/Common/src/CoreLib/System/Text/DecoderNLS.cs index 7e627fd0aa1e..5b0247a42fe4 100644 --- a/src/Common/src/CoreLib/System/Text/DecoderNLS.cs +++ b/src/Common/src/CoreLib/System/Text/DecoderNLS.cs @@ -398,7 +398,6 @@ internal int DrainLeftoverDataForGetChars(ReadOnlySpan bytes, Span c // opportunity for any code before us to make forward progress, so we must fail immediately. _encoding.ThrowCharsOverflow(this, nothingDecoded: true); - // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 throw null!; // will never reach this point } diff --git a/src/Common/src/CoreLib/System/Text/DecoderReplacementFallback.cs b/src/Common/src/CoreLib/System/Text/DecoderReplacementFallback.cs index 57413ec69a2d..beb58e097854 100644 --- a/src/Common/src/CoreLib/System/Text/DecoderReplacementFallback.cs +++ b/src/Common/src/CoreLib/System/Text/DecoderReplacementFallback.cs @@ -109,7 +109,6 @@ public sealed class DecoderReplacementFallbackBuffer : DecoderFallbackBuffer // Construction public DecoderReplacementFallbackBuffer(DecoderReplacementFallback fallback) { - // TODO-NULLABLE: NullReferenceException (fallback) _strDefault = fallback.DefaultString; } diff --git a/src/Common/src/CoreLib/System/Text/EncoderBestFitFallback.cs b/src/Common/src/CoreLib/System/Text/EncoderBestFitFallback.cs index dddb1d5a880e..518ceb7056c7 100644 --- a/src/Common/src/CoreLib/System/Text/EncoderBestFitFallback.cs +++ b/src/Common/src/CoreLib/System/Text/EncoderBestFitFallback.cs @@ -72,7 +72,7 @@ private static object InternalSyncObject object o = new object(); Interlocked.CompareExchange(ref s_InternalSyncObject, o, null); } - return s_InternalSyncObject!; // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + return s_InternalSyncObject!; // TODO-NULLABLE: Remove ! when compiler specially-recognizes CompareExchange for nullability } } diff --git a/src/Common/src/CoreLib/System/Text/EncoderFallback.cs b/src/Common/src/CoreLib/System/Text/EncoderFallback.cs index c3a03ab16c2a..8fa9e6d27a00 100644 --- a/src/Common/src/CoreLib/System/Text/EncoderFallback.cs +++ b/src/Common/src/CoreLib/System/Text/EncoderFallback.cs @@ -4,6 +4,7 @@ using System.Buffers; using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.Threading; namespace System.Text @@ -22,7 +23,7 @@ public static EncoderFallback ReplacementFallback if (s_replacementFallback == null) Interlocked.CompareExchange(ref s_replacementFallback, new EncoderReplacementFallback(), null); - return s_replacementFallback!; // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + return s_replacementFallback!; // TODO-NULLABLE: Remove ! when compiler specially-recognizes CompareExchange for nullability } } @@ -34,7 +35,7 @@ public static EncoderFallback ExceptionFallback if (s_exceptionFallback == null) Interlocked.CompareExchange(ref s_exceptionFallback, new EncoderExceptionFallback(), null); - return s_exceptionFallback!; // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + return s_exceptionFallback!; // TODO-NULLABLE: Remove ! when compiler specially-recognizes CompareExchange for nullability } } @@ -376,6 +377,7 @@ internal unsafe virtual bool InternalFallback(char ch, ref char* chars) } // private helper methods + [DoesNotReturn] internal void ThrowLastCharRecursive(int charRecursive) { // Throw it, using our complete character diff --git a/src/Common/src/CoreLib/System/Text/EncoderReplacementFallback.cs b/src/Common/src/CoreLib/System/Text/EncoderReplacementFallback.cs index e124e41fd006..99f0fe9f2bc7 100644 --- a/src/Common/src/CoreLib/System/Text/EncoderReplacementFallback.cs +++ b/src/Common/src/CoreLib/System/Text/EncoderReplacementFallback.cs @@ -110,7 +110,6 @@ public sealed class EncoderReplacementFallbackBuffer : EncoderFallbackBuffer // Construction public EncoderReplacementFallbackBuffer(EncoderReplacementFallback fallback) { - // TODO-NULLABLE: NullReferenceException // 2X in case we're a surrogate pair _strDefault = fallback.DefaultString + fallback.DefaultString; } diff --git a/src/Common/src/CoreLib/System/Text/Encoding.cs b/src/Common/src/CoreLib/System/Text/Encoding.cs index ef7ba7832ab7..a1180a189bb0 100644 --- a/src/Common/src/CoreLib/System/Text/Encoding.cs +++ b/src/Common/src/CoreLib/System/Text/Encoding.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.Runtime.InteropServices; using System.Runtime.Serialization; @@ -1181,6 +1182,7 @@ internal virtual char[] GetBestFitBytesToUnicodeData() return Array.Empty(); } + [DoesNotReturn] internal void ThrowBytesOverflow() { // Special message to include fallback type in case fallback's GetMaxCharCount is broken @@ -1204,12 +1206,15 @@ internal void ThrowBytesOverflow(EncoderNLS? encoder, bool nothingEncoded) encoder!.ClearMustFlush(); } + [DoesNotReturn] [StackTraceHidden] internal static void ThrowConversionOverflow() { throw new ArgumentException(SR.Argument_ConversionOverflow); } + [DoesNotReturn] + [StackTraceHidden] internal void ThrowCharsOverflow() { // Special message to include fallback type in case fallback's GetMaxCharCount is broken diff --git a/src/Common/src/CoreLib/System/Text/EncodingData.cs b/src/Common/src/CoreLib/System/Text/EncodingData.cs index 8a9d2a559f51..01837fc5314b 100644 --- a/src/Common/src/CoreLib/System/Text/EncodingData.cs +++ b/src/Common/src/CoreLib/System/Text/EncodingData.cs @@ -6,7 +6,6 @@ // https://github.com/dotnet/buildtools/blob/6736870b84e06b75e7df32bb84d442db1b2afa10/src/Microsoft.DotNet.Build.Tasks/PackageFiles/encoding.targets // -// TODO-NULLABLE: We should edit original source instead: https://github.com/dotnet/buildtools/blob/master/src/Microsoft.DotNet.Build.Tasks/GenerateEncodingTable.cs#L235 namespace System.Text { internal static partial class EncodingTable diff --git a/src/Common/src/CoreLib/System/Text/EncodingTable.cs b/src/Common/src/CoreLib/System/Text/EncodingTable.cs index 661622707cc7..4c0bd4a87cdf 100644 --- a/src/Common/src/CoreLib/System/Text/EncodingTable.cs +++ b/src/Common/src/CoreLib/System/Text/EncodingTable.cs @@ -159,7 +159,7 @@ internal static EncodingInfo[] GetEncodings() return null; } - CodePageDataItem? data = s_codePageToCodePageData![index]; // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + CodePageDataItem? data = s_codePageToCodePageData![index]; // TODO-NULLABLE: Remove ! when compiler specially-recognizes CompareExchange for nullability if (data == null) { Interlocked.CompareExchange(ref s_codePageToCodePageData[index], InternalGetCodePageDataItem(codePage, index), null); diff --git a/src/Common/src/CoreLib/System/Text/StringBuilder.cs b/src/Common/src/CoreLib/System/Text/StringBuilder.cs index ec9d2c4b355f..e55e4a5222b2 100644 --- a/src/Common/src/CoreLib/System/Text/StringBuilder.cs +++ b/src/Common/src/CoreLib/System/Text/StringBuilder.cs @@ -637,7 +637,7 @@ public ReadOnlyMemory Current ThrowHelper.ThrowInvalidOperationException_InvalidOperation_EnumOpCantHappen(); } - return new ReadOnlyMemory(_currentChunk!.m_ChunkChars, 0, _currentChunk.m_ChunkLength); // TODO-NULLABLE: https://github.com/dotnet/csharplang#538 + return new ReadOnlyMemory(_currentChunk!.m_ChunkChars, 0, _currentChunk.m_ChunkLength); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected } } @@ -1335,7 +1335,7 @@ private unsafe StringBuilder AppendJoinCore(char* separator, int separatorLen if (values[0] != null) { - Append(values[0]!.ToString()); // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/34644 + Append(values[0]!.ToString()); // TODO-NULLABLE: Indexer nullability tracked (https://github.com/dotnet/roslyn/issues/34644) } for (int i = 1; i < values.Length; i++) @@ -1343,7 +1343,7 @@ private unsafe StringBuilder AppendJoinCore(char* separator, int separatorLen Append(separator, separatorLength); if (values[i] != null) { - Append(values[i]!.ToString()); // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/34644 + Append(values[i]!.ToString()); // TODO-NULLABLE: Indexer nullability tracked (https://github.com/dotnet/roslyn/issues/34644) } } return this; @@ -1905,9 +1905,9 @@ public StringBuilder Replace(string oldValue, string? newValue, int startIndex, } else if (replacementsCount >= replacements.Length) { - Array.Resize(ref replacements!, replacements.Length * 3 / 2 + 4); // Grow by ~1.5x, but more in the begining // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + Array.Resize(ref replacements!, replacements.Length * 3 / 2 + 4); // Grow by ~1.5x, but more in the begining // TODO-NULLABLE: Remove ! when nullable attributes are respected } - replacements![replacementsCount++] = indexInChunk; // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + replacements![replacementsCount++] = indexInChunk; // TODO-NULLABLE: Remove ! when nullable attributes are respected indexInChunk += oldValue.Length; count -= oldValue.Length; } diff --git a/src/Common/src/CoreLib/System/Text/StringRuneEnumerator.cs b/src/Common/src/CoreLib/System/Text/StringRuneEnumerator.cs index 99001f75bddc..37c45db26545 100644 --- a/src/Common/src/CoreLib/System/Text/StringRuneEnumerator.cs +++ b/src/Common/src/CoreLib/System/Text/StringRuneEnumerator.cs @@ -50,7 +50,7 @@ public bool MoveNext() return true; } - object? IEnumerator.Current => _current; // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/23268 + object? IEnumerator.Current => _current; void IDisposable.Dispose() { diff --git a/src/Common/src/CoreLib/System/Text/UTF32Encoding.cs b/src/Common/src/CoreLib/System/Text/UTF32Encoding.cs index 1fc50d24d07a..cc733ef8ee30 100644 --- a/src/Common/src/CoreLib/System/Text/UTF32Encoding.cs +++ b/src/Common/src/CoreLib/System/Text/UTF32Encoding.cs @@ -519,7 +519,7 @@ internal override unsafe int GetBytes(char* chars, int charCount, // We mustn't have left over fallback data when not converting if (encoder._throwOnOverflow && fallbackBuffer.Remaining > 0) - throw new ArgumentException(SR.Format(SR.Argument_EncoderFallbackNotEmpty, this.EncodingName, encoder.Fallback!.GetType())); // TODO-NULLABLE: NullReferenceException + throw new ArgumentException(SR.Format(SR.Argument_EncoderFallbackNotEmpty, this.EncodingName, encoder.Fallback?.GetType())); } else { diff --git a/src/Common/src/CoreLib/System/Text/UTF8Encoding.cs b/src/Common/src/CoreLib/System/Text/UTF8Encoding.cs index 5a33c6d4e095..89bd8c58b4ba 100644 --- a/src/Common/src/CoreLib/System/Text/UTF8Encoding.cs +++ b/src/Common/src/CoreLib/System/Text/UTF8Encoding.cs @@ -138,7 +138,7 @@ public override unsafe int GetByteCount(char[] chars, int index, int count) ThrowHelper.ThrowArgumentOutOfRangeException((index < 0) ? ExceptionArgument.index : ExceptionArgument.count, ExceptionResource.ArgumentOutOfRange_NeedNonNegNum); } - if (chars!.Length - index < count) // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + if (chars!.Length - index < count) // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected { ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.chars, ExceptionResource.ArgumentOutOfRange_IndexCountBuffer); } @@ -165,7 +165,7 @@ public override unsafe int GetByteCount(string chars) fixed (char* pChars = chars) { - return GetByteCountCommon(pChars, chars!.Length); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + return GetByteCountCommon(pChars, chars!.Length); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected } } @@ -275,12 +275,12 @@ public override unsafe int GetBytes(string s, int charIndex, int charCount, resource: ExceptionResource.ArgumentOutOfRange_NeedNonNegNum); } - if (s!.Length - charIndex < charCount) // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + if (s!.Length - charIndex < charCount) // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected { ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.s, ExceptionResource.ArgumentOutOfRange_IndexCount); } - if ((uint)byteIndex > bytes!.Length) // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + if ((uint)byteIndex > bytes!.Length) // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected { ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.byteIndex, ExceptionResource.ArgumentOutOfRange_Index); } @@ -325,12 +325,12 @@ public override unsafe int GetBytes(char[] chars, int charIndex, int charCount, resource: ExceptionResource.ArgumentOutOfRange_NeedNonNegNum); } - if (chars!.Length - charIndex < charCount) // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + if (chars!.Length - charIndex < charCount) // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected { ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.chars, ExceptionResource.ArgumentOutOfRange_IndexCount); } - if ((uint)byteIndex > bytes!.Length) // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + if ((uint)byteIndex > bytes!.Length) // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected { ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.byteIndex, ExceptionResource.ArgumentOutOfRange_Index); } @@ -443,7 +443,7 @@ public override unsafe int GetCharCount(byte[] bytes, int index, int count) ThrowHelper.ThrowArgumentOutOfRangeException((index < 0) ? ExceptionArgument.index : ExceptionArgument.count, ExceptionResource.ArgumentOutOfRange_NeedNonNegNum); } - if (bytes!.Length - index < count) // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + if (bytes!.Length - index < count) // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected { ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.bytes, ExceptionResource.ArgumentOutOfRange_IndexCountBuffer); } @@ -510,12 +510,12 @@ public override unsafe int GetChars(byte[] bytes, int byteIndex, int byteCount, resource: ExceptionResource.ArgumentOutOfRange_NeedNonNegNum); } - if (bytes!.Length - byteIndex < byteCount) // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + if (bytes!.Length - byteIndex < byteCount) // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected { ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.bytes, ExceptionResource.ArgumentOutOfRange_IndexCountBuffer); } - if ((uint)charIndex > (uint)chars!.Length) // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + if ((uint)charIndex > (uint)chars!.Length) // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected { ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.charIndex, ExceptionResource.ArgumentOutOfRange_Index); } @@ -672,7 +672,7 @@ public override unsafe string GetString(byte[] bytes, int index, int count) resource: ExceptionResource.ArgumentOutOfRange_NeedNonNegNum); } - if (bytes!.Length - index < count) // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + if (bytes!.Length - index < count) // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected { ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.bytes, ExceptionResource.ArgumentOutOfRange_IndexCountBuffer); } diff --git a/src/Common/src/CoreLib/System/Text/Unicode/Utf8Utility.cs b/src/Common/src/CoreLib/System/Text/Unicode/Utf8Utility.cs index 7daf0cf80075..5c8a40906bd8 100644 --- a/src/Common/src/CoreLib/System/Text/Unicode/Utf8Utility.cs +++ b/src/Common/src/CoreLib/System/Text/Unicode/Utf8Utility.cs @@ -4,6 +4,7 @@ using System.Buffers; using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.IO; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; @@ -50,6 +51,7 @@ public unsafe static int GetIndexOfFirstInvalidUtf8Sequence(ReadOnlySpan u /// but where all invalid UTF-8 sequences have been replaced /// with U+FFD. /// + [return: NotNullIfNotNull("value")] public static Utf8String? ValidateAndFixupUtf8String(Utf8String? value) { if (Utf8String.IsNullOrEmpty(value)) diff --git a/src/Common/src/CoreLib/System/Text/UnicodeEncoding.cs b/src/Common/src/CoreLib/System/Text/UnicodeEncoding.cs index d541f65c9779..f153f035e2bc 100644 --- a/src/Common/src/CoreLib/System/Text/UnicodeEncoding.cs +++ b/src/Common/src/CoreLib/System/Text/UnicodeEncoding.cs @@ -390,7 +390,7 @@ internal sealed override unsafe int GetByteCount(char* chars, int count, Encoder { fallbackBuffer = encoder.FallbackBuffer; if (fallbackBuffer.Remaining > 0) - throw new ArgumentException(SR.Format(SR.Argument_EncoderFallbackNotEmpty, this.EncodingName, encoder.Fallback!.GetType())); // TODO-NULLABLE: NullReferenceException + throw new ArgumentException(SR.Format(SR.Argument_EncoderFallbackNotEmpty, this.EncodingName, encoder.Fallback?.GetType())); // Set our internal fallback interesting things. fallbackBuffer.InternalInitialize(charStart, charEnd, encoder, false); @@ -679,7 +679,7 @@ internal sealed override unsafe int GetBytes( // We always need the fallback buffer in get bytes so we can flush any remaining ones if necessary fallbackBuffer = encoder.FallbackBuffer; if (fallbackBuffer.Remaining > 0 && encoder._throwOnOverflow) - throw new ArgumentException(SR.Format(SR.Argument_EncoderFallbackNotEmpty, this.EncodingName, encoder.Fallback!.GetType())); // TODO-NULLABLE: NullReferenceException + throw new ArgumentException(SR.Format(SR.Argument_EncoderFallbackNotEmpty, this.EncodingName, encoder.Fallback?.GetType())); // Set our internal fallback interesting things. fallbackBuffer.InternalInitialize(charStart, charEnd, encoder, false); diff --git a/src/Common/src/CoreLib/System/Text/ValueStringBuilder.cs b/src/Common/src/CoreLib/System/Text/ValueStringBuilder.cs index 5c95e29f12cd..de7fc500b659 100644 --- a/src/Common/src/CoreLib/System/Text/ValueStringBuilder.cs +++ b/src/Common/src/CoreLib/System/Text/ValueStringBuilder.cs @@ -83,9 +83,7 @@ public ref char this[int index] } } -#pragma warning disable CS8609 // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/23268 public override string ToString() -#pragma warning restore CS8609 { var s = _chars.Slice(0, _pos).ToString(); Dispose(); diff --git a/src/Common/src/CoreLib/System/Threading/AsyncLocal.cs b/src/Common/src/CoreLib/System/Threading/AsyncLocal.cs index a61af6d66891..cf279ac29c1b 100644 --- a/src/Common/src/CoreLib/System/Threading/AsyncLocal.cs +++ b/src/Common/src/CoreLib/System/Threading/AsyncLocal.cs @@ -4,6 +4,7 @@ using System.Collections.Generic; using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; namespace System.Threading { @@ -56,12 +57,13 @@ public AsyncLocal(Action>? valueChangedHandler) m_valueChangedHandler = valueChangedHandler; } + [MaybeNull] public T Value { get { object? obj = ExecutionContext.GetLocalValue(this); - return (obj == null) ? default! : (T)obj; // TODO-NULLABLE-GENERIC + return (obj == null) ? default! : (T)obj; // TODO-NULLABLE: Remove ! when nullable attributes are respected } set { @@ -72,8 +74,8 @@ public T Value void IAsyncLocal.OnValueChanged(object? previousValueObj, object? currentValueObj, bool contextChanged) { Debug.Assert(m_valueChangedHandler != null); - T previousValue = previousValueObj == null ? default! : (T)previousValueObj; // TODO-NULLABLE-GENERIC - T currentValue = currentValueObj == null ? default! : (T)currentValueObj; // TODO-NULLABLE-GENERIC + T previousValue = previousValueObj == null ? default! : (T)previousValueObj; + T currentValue = currentValueObj == null ? default! : (T)currentValueObj; m_valueChangedHandler(new AsyncLocalValueChangedArgs(previousValue, currentValue, contextChanged)); } } @@ -88,8 +90,8 @@ internal interface IAsyncLocal public readonly struct AsyncLocalValueChangedArgs { - public T PreviousValue { get; } - public T CurrentValue { get; } + [MaybeNull] public T PreviousValue { get; } + [MaybeNull] public T CurrentValue { get; } // // If the value changed because we changed to a different ExecutionContext, this is true. If it changed @@ -97,7 +99,7 @@ public readonly struct AsyncLocalValueChangedArgs // public bool ThreadContextChanged { get; } - internal AsyncLocalValueChangedArgs(T previousValue, T currentValue, bool contextChanged) + internal AsyncLocalValueChangedArgs([AllowNull] T previousValue, [AllowNull] T currentValue, bool contextChanged) { PreviousValue = previousValue; CurrentValue = currentValue; diff --git a/src/Common/src/CoreLib/System/Threading/CancellationToken.cs b/src/Common/src/CoreLib/System/Threading/CancellationToken.cs index 769b4e0d8bc5..42d54f61ab7e 100644 --- a/src/Common/src/CoreLib/System/Threading/CancellationToken.cs +++ b/src/Common/src/CoreLib/System/Threading/CancellationToken.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; namespace System.Threading { @@ -348,6 +349,7 @@ public void ThrowIfCancellationRequested() } // Throws an OCE; separated out to enable better inlining of ThrowIfCancellationRequested + [DoesNotReturn] private void ThrowOperationCanceledException() => throw new OperationCanceledException(SR.OperationCanceled, this); } diff --git a/src/Common/src/CoreLib/System/Threading/CancellationTokenSource.cs b/src/Common/src/CoreLib/System/Threading/CancellationTokenSource.cs index 02ab1c423d82..4c1705641dae 100644 --- a/src/Common/src/CoreLib/System/Threading/CancellationTokenSource.cs +++ b/src/Common/src/CoreLib/System/Threading/CancellationTokenSource.cs @@ -4,6 +4,7 @@ using System.Collections.Generic; using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.Threading.Tasks; namespace System.Threading @@ -132,10 +133,10 @@ internal WaitHandle WaitHandle // 2. if IsCancellationRequested = false, then NotifyCancellation will see that the event exists, and will call Set(). if (IsCancellationRequested) { - _kernelEvent!.Set(); // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + _kernelEvent!.Set(); // TODO-NULLABLE: Remove ! when compiler specially-recognizes CompareExchange for nullability } - return _kernelEvent!; // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + return _kernelEvent!; // TODO-NULLABLE: Remove ! when compiler specially-recognizes CompareExchange for nullability } } @@ -466,6 +467,7 @@ private void ThrowIfDisposed() } /// Throws an . Separated out from ThrowIfDisposed to help with inlining. + [DoesNotReturn] private static void ThrowObjectDisposedException() => throw new ObjectDisposedException(null, SR.CancellationTokenSource_Disposed); diff --git a/src/Common/src/CoreLib/System/Threading/EventWaitHandle.Windows.cs b/src/Common/src/CoreLib/System/Threading/EventWaitHandle.Windows.cs index 7241d61b8802..87971dfb2d61 100644 --- a/src/Common/src/CoreLib/System/Threading/EventWaitHandle.Windows.cs +++ b/src/Common/src/CoreLib/System/Threading/EventWaitHandle.Windows.cs @@ -76,7 +76,7 @@ private static OpenExistingResult OpenExistingWorker(string name, out EventWaitH public bool Reset() { - bool res = Interop.Kernel32.ResetEvent(SafeWaitHandle!); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/2384 + bool res = Interop.Kernel32.ResetEvent(SafeWaitHandle); if (!res) throw Win32Marshal.GetExceptionForLastWin32Error(); return res; @@ -84,7 +84,7 @@ public bool Reset() public bool Set() { - bool res = Interop.Kernel32.SetEvent(SafeWaitHandle!); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/2384 + bool res = Interop.Kernel32.SetEvent(SafeWaitHandle); if (!res) throw Win32Marshal.GetExceptionForLastWin32Error(); return res; diff --git a/src/Common/src/CoreLib/System/Threading/EventWaitHandle.cs b/src/Common/src/CoreLib/System/Threading/EventWaitHandle.cs index bafa7360f789..96c2ef89c65c 100644 --- a/src/Common/src/CoreLib/System/Threading/EventWaitHandle.cs +++ b/src/Common/src/CoreLib/System/Threading/EventWaitHandle.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.IO; namespace System.Threading @@ -44,7 +45,7 @@ public static EventWaitHandle OpenExisting(string name) } } - public static bool TryOpenExisting(string name, out EventWaitHandle? result) // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + public static bool TryOpenExisting(string name, [NotNullWhen(true)] out EventWaitHandle? result) { return OpenExistingWorker(name, out result) == OpenExistingResult.Success; } diff --git a/src/Common/src/CoreLib/System/Threading/ExecutionContext.cs b/src/Common/src/CoreLib/System/Threading/ExecutionContext.cs index 64f2f1820eda..c1cae5659441 100644 --- a/src/Common/src/CoreLib/System/Threading/ExecutionContext.cs +++ b/src/Common/src/CoreLib/System/Threading/ExecutionContext.cs @@ -12,6 +12,7 @@ ===========================================================*/ using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.Runtime.CompilerServices; using System.Runtime.ExceptionServices; using System.Runtime.Serialization; @@ -393,8 +394,8 @@ internal static void OnValuesChanged(ExecutionContext? previousExecutionCtx, Exe if (previousChangeNotifications != null && nextChangeNotifications != null) { // Notifications can't exist without values - Debug.Assert(previousExecutionCtx!.m_localValues != null); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/2388 - Debug.Assert(nextExecutionCtx!.m_localValues != null); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/2388 + Debug.Assert(previousExecutionCtx!.m_localValues != null); + Debug.Assert(nextExecutionCtx!.m_localValues != null); // Both contexts have change notifications, check previousExecutionCtx first foreach (IAsyncLocal local in previousChangeNotifications) { @@ -428,7 +429,7 @@ internal static void OnValuesChanged(ExecutionContext? previousExecutionCtx, Exe else if (previousChangeNotifications != null) { // Notifications can't exist without values - Debug.Assert(previousExecutionCtx!.m_localValues != null); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/2388 + Debug.Assert(previousExecutionCtx!.m_localValues != null); // No current values, so just check previous against null foreach (IAsyncLocal local in previousChangeNotifications) { @@ -442,9 +443,9 @@ internal static void OnValuesChanged(ExecutionContext? previousExecutionCtx, Exe else // Implied: nextChangeNotifications != null { // Notifications can't exist without values - Debug.Assert(nextExecutionCtx!.m_localValues != null); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/2388 + Debug.Assert(nextExecutionCtx!.m_localValues != null); // No previous values, so just check current against null - foreach (IAsyncLocal local in nextChangeNotifications!) // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/2388 + foreach (IAsyncLocal local in nextChangeNotifications!) { nextExecutionCtx.m_localValues.TryGetValue(local, out object? currentValue); if (currentValue != null) @@ -462,6 +463,7 @@ internal static void OnValuesChanged(ExecutionContext? previousExecutionCtx, Exe } } + [DoesNotReturn] [StackTraceHidden] private static void ThrowNullContext() { @@ -544,7 +546,7 @@ internal static void SetLocalValue(IAsyncLocal local, object? newValue, bool nee { int newNotificationIndex = newChangeNotifications.Length; Array.Resize(ref newChangeNotifications, newNotificationIndex + 1); - newChangeNotifications![newNotificationIndex] = local; // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + newChangeNotifications![newNotificationIndex] = local; // TODO-NULLABLE: Remove ! when nullable attributes are respected } } diff --git a/src/Common/src/CoreLib/System/Threading/LazyInitializer.cs b/src/Common/src/CoreLib/System/Threading/LazyInitializer.cs index 5ae8415722c8..51e45c1d2dac 100644 --- a/src/Common/src/CoreLib/System/Threading/LazyInitializer.cs +++ b/src/Common/src/CoreLib/System/Threading/LazyInitializer.cs @@ -9,6 +9,7 @@ // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; namespace System.Threading { @@ -47,7 +48,7 @@ public static class LazyInitializer /// if an object was not used and to then dispose of the object appropriately. /// /// - public static T EnsureInitialized(ref T target) where T : class? => + public static T EnsureInitialized([AllowNull] ref T target) where T : class => Volatile.Read(ref target) ?? EnsureInitializedCore(ref target); /// @@ -56,11 +57,11 @@ public static T EnsureInitialized(ref T target) where T : class? => /// The reference type of the reference to be initialized. /// The variable that need to be initialized /// The initialized variable - private static T EnsureInitializedCore(ref T target) where T : class? + private static T EnsureInitializedCore([AllowNull] ref T target) where T : class { try { - Interlocked.CompareExchange(ref target, Activator.CreateInstance(), null!); // TODO-NULLABLE-GENERIC + Interlocked.CompareExchange(ref target, Activator.CreateInstance(), null!); } catch (MissingMethodException) { @@ -99,7 +100,7 @@ private static T EnsureInitializedCore(ref T target) where T : class? /// if an object was not used and to then dispose of the object appropriately. /// /// - public static T EnsureInitialized(ref T target, Func valueFactory) where T : class? => + public static T EnsureInitialized([AllowNull] ref T target, Func valueFactory) where T : class => Volatile.Read(ref target) ?? EnsureInitializedCore(ref target, valueFactory); /// @@ -109,7 +110,7 @@ public static T EnsureInitialized(ref T target, Func valueFactory) where T /// The variable that need to be initialized /// The delegate that will be executed to initialize the target /// The initialized variable - private static T EnsureInitializedCore(ref T target, Func valueFactory) where T : class? + private static T EnsureInitializedCore([AllowNull] ref T target, Func valueFactory) where T : class { T value = valueFactory(); if (value == null) @@ -117,7 +118,7 @@ private static T EnsureInitializedCore(ref T target, Func valueFactory) wh throw new InvalidOperationException(SR.Lazy_StaticInit_InvalidOperation); } - Interlocked.CompareExchange(ref target, value, null!); // TODO-NULLABLE-GENERIC + Interlocked.CompareExchange(ref target, value, null!); Debug.Assert(target != null); return target; } @@ -134,7 +135,7 @@ private static T EnsureInitializedCore(ref T target, Func valueFactory) wh /// A reference to an object used as the mutually exclusive lock for initializing /// . If is null, a new object will be instantiated. /// The initialized value of type . - public static T EnsureInitialized(ref T target, ref bool initialized, ref object? syncLock) + public static T EnsureInitialized([AllowNull] ref T target, ref bool initialized, ref object? syncLock) { // Fast path. if (Volatile.Read(ref initialized)) @@ -156,7 +157,7 @@ public static T EnsureInitialized(ref T target, ref bool initialized, ref obj /// a new object will be instantiated. /// /// The initialized object. - private static T EnsureInitializedCore(ref T target, ref bool initialized, ref object? syncLock) + private static T EnsureInitializedCore([AllowNull] ref T target, ref bool initialized, ref object? syncLock) { // Lazily initialize the lock if necessary and then double check if initialization is still required. lock (EnsureLockInitialized(ref syncLock)) @@ -193,7 +194,7 @@ private static T EnsureInitializedCore(ref T target, ref bool initialized, re /// The invoked to initialize the /// reference or value. /// The initialized value of type . - public static T EnsureInitialized(ref T target, ref bool initialized, ref object? syncLock, Func valueFactory) + public static T EnsureInitialized([AllowNull] ref T target, ref bool initialized, ref object? syncLock, Func valueFactory) { // Fast path. if (Volatile.Read(ref initialized)) @@ -217,7 +218,7 @@ public static T EnsureInitialized(ref T target, ref bool initialized, ref obj /// The to invoke in order to produce the lazily-initialized value. /// /// The initialized object. - private static T EnsureInitializedCore(ref T target, ref bool initialized, ref object? syncLock, Func valueFactory) + private static T EnsureInitializedCore([AllowNull] ref T target, ref bool initialized, ref object? syncLock, Func valueFactory) { // Lazily initialize the lock if necessary and then double check if initialization is still required. lock (EnsureLockInitialized(ref syncLock)) @@ -241,7 +242,7 @@ private static T EnsureInitializedCore(ref T target, ref bool initialized, re /// . If is null, a new object will be instantiated. /// The invoked to initialize the reference. /// The initialized value of type . - public static T EnsureInitialized(ref T target, ref object? syncLock, Func valueFactory) where T : class? => + public static T EnsureInitialized([AllowNull] ref T target, ref object? syncLock, Func valueFactory) where T : class => Volatile.Read(ref target) ?? EnsureInitializedCore(ref target, ref syncLock, valueFactory); /// @@ -256,7 +257,7 @@ public static T EnsureInitialized(ref T target, ref object? syncLock, Func /// The to invoke in order to produce the lazily-initialized value. /// /// The initialized object. - private static T EnsureInitializedCore(ref T target, ref object? syncLock, Func valueFactory) where T : class? + private static T EnsureInitializedCore([AllowNull] ref T target, ref object? syncLock, Func valueFactory) where T : class { // Lazily initialize the lock if necessary and then double check if initialization is still required. lock (EnsureLockInitialized(ref syncLock)) @@ -283,6 +284,6 @@ private static T EnsureInitializedCore(ref T target, ref object? syncLock, Fu private static object EnsureLockInitialized(ref object? syncLock) => syncLock ?? Interlocked.CompareExchange(ref syncLock, new object(), null) ?? - syncLock!; // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + syncLock!; // TODO-NULLABLE: Remove ! when compiler specially-recognizes CompareExchange for nullability } } diff --git a/src/Common/src/CoreLib/System/Threading/Mutex.Windows.cs b/src/Common/src/CoreLib/System/Threading/Mutex.Windows.cs index 6d89a5e54600..7226538f7e73 100644 --- a/src/Common/src/CoreLib/System/Threading/Mutex.Windows.cs +++ b/src/Common/src/CoreLib/System/Threading/Mutex.Windows.cs @@ -88,7 +88,7 @@ private static OpenExistingResult OpenExistingWorker(string name, out Mutex? res // in a Mutex's ACL is MUTEX_ALL_ACCESS (0x1F0001). public void ReleaseMutex() { - if (!Interop.Kernel32.ReleaseMutex(SafeWaitHandle!)) // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/2384 + if (!Interop.Kernel32.ReleaseMutex(SafeWaitHandle)) { throw new ApplicationException(SR.Arg_SynchronizationLockException); } diff --git a/src/Common/src/CoreLib/System/Threading/Mutex.cs b/src/Common/src/CoreLib/System/Threading/Mutex.cs index 50cd42a07e26..2d8313ccae27 100644 --- a/src/Common/src/CoreLib/System/Threading/Mutex.cs +++ b/src/Common/src/CoreLib/System/Threading/Mutex.cs @@ -2,11 +2,12 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System.IO; using Microsoft.Win32; using Microsoft.Win32.SafeHandles; -using System.Runtime.InteropServices; using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; +using System.IO; +using System.Runtime.InteropServices; namespace System.Threading { @@ -57,7 +58,7 @@ public static Mutex OpenExisting(string name) } } - public static bool TryOpenExisting(string name, out Mutex? result) => // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + public static bool TryOpenExisting(string name, [NotNullWhen(true)] out Mutex? result) => OpenExistingWorker(name, out result) == OpenExistingResult.Success; } } diff --git a/src/Common/src/CoreLib/System/Threading/ReaderWriterLockSlim.cs b/src/Common/src/CoreLib/System/Threading/ReaderWriterLockSlim.cs index f05ef52a7fc3..47f26ef527a4 100644 --- a/src/Common/src/CoreLib/System/Threading/ReaderWriterLockSlim.cs +++ b/src/Common/src/CoreLib/System/Threading/ReaderWriterLockSlim.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System.Diagnostics; // for TraceInformation +using System.Diagnostics.CodeAnalysis; using System.Runtime.CompilerServices; namespace System.Threading @@ -195,7 +196,7 @@ private bool IsRwHashEntryChanged(ReaderWriterCount lrwc) /// could not be found. /// [MethodImpl(MethodImplOptions.AggressiveInlining)] - private ReaderWriterCount? GetThreadRWCount(bool dontAllocate) // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + private ReaderWriterCount? GetThreadRWCount(bool dontAllocate) { ReaderWriterCount? rwc = t_rwc; ReaderWriterCount? empty = null; @@ -318,7 +319,7 @@ private bool TryEnterReadLockCore(TimeoutTracker timeout) _spinLock.Enter(EnterSpinLockReason.EnterAnyRead); - lrwc = GetThreadRWCount(dontAllocate: false)!; // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + lrwc = GetThreadRWCount(dontAllocate: false)!; //Check if the reader lock is already acquired. Note, we could //check the presence of a reader by not allocating rwc (But that @@ -343,7 +344,7 @@ private bool TryEnterReadLockCore(TimeoutTracker timeout) else { _spinLock.Enter(EnterSpinLockReason.EnterAnyRead); - lrwc = GetThreadRWCount(dontAllocate: false)!; // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + lrwc = GetThreadRWCount(dontAllocate: false)!; if (lrwc.readercount > 0) { lrwc.readercount++; @@ -401,7 +402,7 @@ private bool TryEnterReadLockCore(TimeoutTracker timeout) _spinLock.Enter(EnterSpinLockReason.EnterAnyRead); //The per-thread structure may have been recycled as the lock is acquired (due to message pumping), load again. if (IsRwHashEntryChanged(lrwc)) - lrwc = GetThreadRWCount(dontAllocate: false)!; // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + lrwc = GetThreadRWCount(dontAllocate: false)!; continue; } @@ -410,7 +411,7 @@ private bool TryEnterReadLockCore(TimeoutTracker timeout) { LazyCreateEvent(ref _readEvent, EnterLockType.Read); if (IsRwHashEntryChanged(lrwc)) - lrwc = GetThreadRWCount(dontAllocate: false)!; // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + lrwc = GetThreadRWCount(dontAllocate: false)!; continue; // since we left the lock, start over. } @@ -420,7 +421,7 @@ private bool TryEnterReadLockCore(TimeoutTracker timeout) return false; } if (IsRwHashEntryChanged(lrwc)) - lrwc = GetThreadRWCount(dontAllocate: false)!; // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + lrwc = GetThreadRWCount(dontAllocate: false)!; } _spinLock.Exit(); @@ -502,7 +503,7 @@ private bool TryEnterWriteLockCore(TimeoutTracker timeout) } _spinLock.Enter(enterMyLockReason); - lrwc = GetThreadRWCount(dontAllocate: false)!; // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + lrwc = GetThreadRWCount(dontAllocate: false)!; if (id == _writeLockOwnerId) { @@ -555,7 +556,7 @@ private bool TryEnterWriteLockCore(TimeoutTracker timeout) if (lrwc != null) { if (IsRwHashEntryChanged(lrwc)) - lrwc = GetThreadRWCount(dontAllocate: false)!; // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + lrwc = GetThreadRWCount(dontAllocate: false)!; if (lrwc.readercount > 0) { @@ -624,7 +625,7 @@ private bool TryEnterWriteLockCore(TimeoutTracker timeout) { Debug.Assert(lrwc != null, "Initialized based on _fIsReentrant earlier in the method"); if (IsRwHashEntryChanged(lrwc)) - lrwc = GetThreadRWCount(dontAllocate: false)!; // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + lrwc = GetThreadRWCount(dontAllocate: false)!; lrwc.writercount++; } @@ -688,7 +689,7 @@ private bool TryEnterUpgradeableReadLockCore(TimeoutTracker timeout) else { _spinLock.Enter(EnterSpinLockReason.EnterAnyRead); - lrwc = GetThreadRWCount(dontAllocate: false)!; // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + lrwc = GetThreadRWCount(dontAllocate: false)!; if (id == _upgradeLockOwnerId) { @@ -767,7 +768,7 @@ private bool TryEnterUpgradeableReadLockCore(TimeoutTracker timeout) //thread did not grab the entry. Debug.Assert(lrwc != null, "Initialized based on _fIsReentrant earlier in the method"); if (IsRwHashEntryChanged(lrwc)) - lrwc = GetThreadRWCount(dontAllocate: false)!; // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + lrwc = GetThreadRWCount(dontAllocate: false)!; lrwc.upgradecount++; } @@ -829,7 +830,7 @@ public void ExitWriteLock() else { _spinLock.Enter(EnterSpinLockReason.ExitAnyWrite); - lrwc = GetThreadRWCount(dontAllocate: false)!; // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + lrwc = GetThreadRWCount(dontAllocate: false)!; if (lrwc == null) { @@ -913,7 +914,7 @@ public void ExitUpgradeableReadLock() /// while holding a spin lock). If all goes well, reenter the lock and /// set 'waitEvent' /// - private void LazyCreateEvent(ref EventWaitHandle? waitEvent, EnterLockType enterLockType) // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + private void LazyCreateEvent([NotNull] ref EventWaitHandle? waitEvent, EnterLockType enterLockType) { #if DEBUG Debug.Assert(_spinLock.IsHeld); diff --git a/src/Common/src/CoreLib/System/Threading/Semaphore.cs b/src/Common/src/CoreLib/System/Threading/Semaphore.cs index a87405f4f43c..f012274760b6 100644 --- a/src/Common/src/CoreLib/System/Threading/Semaphore.cs +++ b/src/Common/src/CoreLib/System/Threading/Semaphore.cs @@ -5,6 +5,7 @@ using Microsoft.Win32; using Microsoft.Win32.SafeHandles; using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.IO; using System.Runtime.InteropServices; @@ -52,7 +53,7 @@ public static Semaphore OpenExisting(string name) } } - public static bool TryOpenExisting(string name, out Semaphore? result) => // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + public static bool TryOpenExisting(string name, [NotNullWhen(true)] out Semaphore? result) => OpenExistingWorker(name, out result) == OpenExistingResult.Success; public int Release() => ReleaseCore(1); diff --git a/src/Common/src/CoreLib/System/Threading/Tasks/ConcurrentExclusiveSchedulerPair.cs b/src/Common/src/CoreLib/System/Threading/Tasks/ConcurrentExclusiveSchedulerPair.cs index 9065ae166688..50014bf59770 100644 --- a/src/Common/src/CoreLib/System/Threading/Tasks/ConcurrentExclusiveSchedulerPair.cs +++ b/src/Common/src/CoreLib/System/Threading/Tasks/ConcurrentExclusiveSchedulerPair.cs @@ -152,7 +152,11 @@ public Task Completion private CompletionState EnsureCompletionStateInitialized() { // ValueLock not needed, but it's ok if it's held - return LazyInitializer.EnsureInitialized(ref m_completionState!, () => new CompletionState()); // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 +#pragma warning disable CS8634 // TODO-NULLABLE: Remove warning disable when nullable attributes are respected +#pragma warning disable CS8603 // TODO-NULLABLE: Remove warning disable when nullable attributes are respected + return LazyInitializer.EnsureInitialized(ref m_completionState!, () => new CompletionState()); +#pragma warning restore CS8603 +#pragma warning restore CS8634 } /// Gets whether completion has been requested. @@ -297,7 +301,7 @@ private void ProcessAsyncIfNecessary(bool fairly = false) { try { - processingTask = new Task(thisPair => ((ConcurrentExclusiveSchedulerPair)thisPair!).ProcessExclusiveTasks(), this, // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + processingTask = new Task(thisPair => ((ConcurrentExclusiveSchedulerPair)thisPair!).ProcessExclusiveTasks(), this, default, GetCreationOptionsForTask(fairly)); processingTask.Start(m_underlyingTaskScheduler); // When we call Start, if the underlying scheduler throws in QueueTask, TPL will fault the task and rethrow @@ -327,7 +331,7 @@ private void ProcessAsyncIfNecessary(bool fairly = false) { try { - processingTask = new Task(thisPair => ((ConcurrentExclusiveSchedulerPair)thisPair!).ProcessConcurrentTasks(), this, // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + processingTask = new Task(thisPair => ((ConcurrentExclusiveSchedulerPair)thisPair!).ProcessConcurrentTasks(), this, default, GetCreationOptionsForTask(fairly)); processingTask.Start(m_underlyingTaskScheduler); // See above logic for why we use new + Start rather than StartNew } diff --git a/src/Common/src/CoreLib/System/Threading/Tasks/Future.cs b/src/Common/src/CoreLib/System/Threading/Tasks/Future.cs index c82372c00017..1a7899d97c32 100644 --- a/src/Common/src/CoreLib/System/Threading/Tasks/Future.cs +++ b/src/Common/src/CoreLib/System/Threading/Tasks/Future.cs @@ -12,6 +12,7 @@ using System.Collections.Generic; using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.Runtime.CompilerServices; using System.Runtime.ExceptionServices; @@ -60,7 +61,8 @@ namespace System.Threading.Tasks [DebuggerDisplay("Id = {Id}, Status = {Status}, Method = {DebuggerDisplayMethodDescription}, Result = {DebuggerDisplayResultDescription}")] public class Task : Task { - internal TResult m_result = default!; // The value itself, if set. // TODO-NULLABLE-GENERIC + // The value itself, if set. + [MaybeNull] internal TResult m_result = default!; // TODO-NULLABLE: Remove ! when nullable attributes are respected private static readonly TaskFactory s_Factory = new TaskFactory(); @@ -95,7 +97,7 @@ internal Task(TResult result) : m_result = result; } - internal Task(bool canceled, TResult result, TaskCreationOptions creationOptions, CancellationToken ct) + internal Task(bool canceled, [AllowNull] TResult result, TaskCreationOptions creationOptions, CancellationToken ct) : base(canceled, creationOptions, ct) { if (!canceled) @@ -209,7 +211,7 @@ public Task(Func function, CancellationToken cancellationToken, TaskCre /// /// The argument is null. /// - public Task(Func function, object? state) // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + public Task(Func function, object? state) : this(function, state, null, default, TaskCreationOptions.None, InternalTaskOptions.None, null) { @@ -230,7 +232,7 @@ public Task(Func function, object? state) // TODO-NULLABLE: ht /// The provided CancellationToken /// has already been disposed. /// - public Task(Func function, object? state, CancellationToken cancellationToken) // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + public Task(Func function, object? state, CancellationToken cancellationToken) : this(function, state, null, cancellationToken, TaskCreationOptions.None, InternalTaskOptions.None, null) { @@ -255,7 +257,7 @@ public Task(Func function, object? state, CancellationToken ca /// The argument specifies an invalid value for . /// - public Task(Func function, object? state, TaskCreationOptions creationOptions) // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + public Task(Func function, object? state, TaskCreationOptions creationOptions) : this(function, state, Task.InternalCurrentIfAttached(creationOptions), default, creationOptions, InternalTaskOptions.None, null) { @@ -285,7 +287,7 @@ public Task(Func function, object? state, TaskCreationOptions /// The provided CancellationToken /// has already been disposed. /// - public Task(Func function, object? state, CancellationToken cancellationToken, TaskCreationOptions creationOptions) // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + public Task(Func function, object? state, CancellationToken cancellationToken, TaskCreationOptions creationOptions) : this(function, state, Task.InternalCurrentIfAttached(creationOptions), cancellationToken, creationOptions, InternalTaskOptions.None, null) { @@ -337,7 +339,7 @@ internal static Task StartNew(Task? parent, Func function, Can } // Create and schedule the future. - Task f = new Task(function!, parent, cancellationToken, creationOptions, internalOptions | InternalTaskOptions.QueuedByRuntime, scheduler); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + Task f = new Task(function!, parent, cancellationToken, creationOptions, internalOptions | InternalTaskOptions.QueuedByRuntime, scheduler); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected f.ScheduleAndStart(false); return f; @@ -357,7 +359,7 @@ internal static Task StartNew(Task? parent, Func func } // Create and schedule the future. - Task f = new Task(function!, state, parent, cancellationToken, creationOptions, internalOptions | InternalTaskOptions.QueuedByRuntime, scheduler); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + Task f = new Task(function!, state, parent, cancellationToken, creationOptions, internalOptions | InternalTaskOptions.QueuedByRuntime, scheduler); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected f.ScheduleAndStart(false); return f; @@ -383,7 +385,7 @@ private string DebuggerDisplayMethodDescription // internal helper function breaks out logic used by TaskCompletionSource - internal bool TrySetResult(TResult result) + internal bool TrySetResult([AllowNull] TResult result) { Debug.Assert(m_action == null, "Task.TrySetResult(): non-null m_action"); @@ -725,13 +727,13 @@ internal Task ContinueWith(Action> continuationAction, TaskSchedul out internalOptions); Task continuationTask = new ContinuationTaskFromResultTask( - this, continuationAction!, null, // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + this, continuationAction!, null, // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected creationOptions, internalOptions ); // Register the continuation. If synchronous execution is requested, this may // actually invoke the continuation before returning. - ContinueWithCore(continuationTask, scheduler!, cancellationToken, continuationOptions); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + ContinueWithCore(continuationTask, scheduler!, cancellationToken, continuationOptions); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected return continuationTask; } @@ -756,7 +758,7 @@ internal Task ContinueWith(Action> continuationAction, TaskSchedul /// /// The argument is null. /// - public Task ContinueWith(Action, object?> continuationAction, object? state) // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + public Task ContinueWith(Action, object?> continuationAction, object? state) { return ContinueWith(continuationAction, state, TaskScheduler.Current, default, TaskContinuationOptions.None); } @@ -783,7 +785,7 @@ public Task ContinueWith(Action, object?> continuationAction, obje /// The provided CancellationToken /// has already been disposed. /// - public Task ContinueWith(Action, object?> continuationAction, object? state, CancellationToken cancellationToken) // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + public Task ContinueWith(Action, object?> continuationAction, object? state, CancellationToken cancellationToken) { return ContinueWith(continuationAction, state, TaskScheduler.Current, cancellationToken, TaskContinuationOptions.None); } @@ -812,7 +814,7 @@ public Task ContinueWith(Action, object?> continuationAction, obje /// /// The argument is null. /// - public Task ContinueWith(Action, object?> continuationAction, object? state, TaskScheduler scheduler) // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + public Task ContinueWith(Action, object?> continuationAction, object? state, TaskScheduler scheduler) { return ContinueWith(continuationAction, state, scheduler, default, TaskContinuationOptions.None); } @@ -846,7 +848,7 @@ public Task ContinueWith(Action, object?> continuationAction, obje /// The argument specifies an invalid value for TaskContinuationOptions. /// - public Task ContinueWith(Action, object?> continuationAction, object? state, TaskContinuationOptions continuationOptions) // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + public Task ContinueWith(Action, object?> continuationAction, object? state, TaskContinuationOptions continuationOptions) { return ContinueWith(continuationAction, state, TaskScheduler.Current, default, continuationOptions); } @@ -890,14 +892,14 @@ public Task ContinueWith(Action, object?> continuationAction, obje /// The provided CancellationToken /// has already been disposed. /// - public Task ContinueWith(Action, object?> continuationAction, object? state, CancellationToken cancellationToken, // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + public Task ContinueWith(Action, object?> continuationAction, object? state, CancellationToken cancellationToken, TaskContinuationOptions continuationOptions, TaskScheduler scheduler) { return ContinueWith(continuationAction, state, scheduler, cancellationToken, continuationOptions); } // Same as the above overload, only with a stack mark. - internal Task ContinueWith(Action, object?> continuationAction, object? state, TaskScheduler scheduler, CancellationToken cancellationToken, // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + internal Task ContinueWith(Action, object?> continuationAction, object? state, TaskScheduler scheduler, CancellationToken cancellationToken, TaskContinuationOptions continuationOptions) { if (continuationAction == null) @@ -918,13 +920,13 @@ internal Task ContinueWith(Action, object?> continuationAction, ob out internalOptions); Task continuationTask = new ContinuationTaskFromResultTask( - this, continuationAction!, state, // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + this, continuationAction!, state, // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected creationOptions, internalOptions ); // Register the continuation. If synchronous execution is requested, this may // actually invoke the continuation before returning. - ContinueWithCore(continuationTask, scheduler!, cancellationToken, continuationOptions); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + ContinueWithCore(continuationTask, scheduler!, cancellationToken, continuationOptions); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected return continuationTask; } @@ -1134,13 +1136,13 @@ internal Task ContinueWith(Func, TNewResul out internalOptions); Task continuationFuture = new ContinuationResultTaskFromResultTask( - this, continuationFunction!, null, // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + this, continuationFunction!, null, // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected creationOptions, internalOptions ); // Register the continuation. If synchronous execution is requested, this may // actually invoke the continuation before returning. - ContinueWithCore(continuationFuture, scheduler!, cancellationToken, continuationOptions); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + ContinueWithCore(continuationFuture, scheduler!, cancellationToken, continuationOptions); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected return continuationFuture; } @@ -1357,13 +1359,13 @@ internal Task ContinueWith(Func, object?, out internalOptions); Task continuationFuture = new ContinuationResultTaskFromResultTask( - this, continuationFunction!, state, // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + this, continuationFunction!, state, // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected creationOptions, internalOptions ); // Register the continuation. If synchronous execution is requested, this may // actually invoke the continuation before returning. - ContinueWithCore(continuationFuture, scheduler!, cancellationToken, continuationOptions); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + ContinueWithCore(continuationFuture, scheduler!, cancellationToken, continuationOptions); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected return continuationFuture; } @@ -1384,7 +1386,7 @@ public SystemThreadingTasks_FutureDebugView(Task task) m_task = task; } - public TResult Result { get { return m_task.Status == TaskStatus.RanToCompletion ? m_task.Result : default!; } } // TODO-NULLABLE-GENERIC + [MaybeNull] public TResult Result { get { return m_task.Status == TaskStatus.RanToCompletion ? m_task.Result : default!; } } public object? AsyncState { get { return m_task.AsyncState; } } public TaskCreationOptions CreationOptions { get { return m_task.CreationOptions; } } public Exception? Exception { get { return m_task.Exception; } } diff --git a/src/Common/src/CoreLib/System/Threading/Tasks/FutureFactory.cs b/src/Common/src/CoreLib/System/Threading/Tasks/FutureFactory.cs index e8be5bd09121..139e32fda33f 100644 --- a/src/Common/src/CoreLib/System/Threading/Tasks/FutureFactory.cs +++ b/src/Common/src/CoreLib/System/Threading/Tasks/FutureFactory.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; namespace System.Threading.Tasks { @@ -376,7 +377,7 @@ public Task StartNew(Func function, CancellationToken cancella /// However, unless creation and scheduling must be separated, StartNew is the recommended approach /// for both simplicity and performance. /// - public Task StartNew(Func function, object? state) // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + public Task StartNew(Func function, object? state) { Task? currTask = Task.InternalCurrent; return Task.StartNew(currTask, function, state, m_defaultCancellationToken, @@ -405,7 +406,7 @@ public Task StartNew(Func function, object? state) // /// However, unless creation and scheduling must be separated, StartNew is the recommended approach /// for both simplicity and performance. /// - public Task StartNew(Func function, object? state, CancellationToken cancellationToken) // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + public Task StartNew(Func function, object? state, CancellationToken cancellationToken) { Task? currTask = Task.InternalCurrent; return Task.StartNew(currTask, function, state, cancellationToken, @@ -436,7 +437,7 @@ public Task StartNew(Func function, object? state, Ca /// However, unless creation and scheduling must be separated, StartNew is the recommended approach /// for both simplicity and performance. /// - public Task StartNew(Func function, object? state, TaskCreationOptions creationOptions) // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + public Task StartNew(Func function, object? state, TaskCreationOptions creationOptions) { Task? currTask = Task.InternalCurrent; return Task.StartNew(currTask, function, state, m_defaultCancellationToken, @@ -478,7 +479,7 @@ public Task StartNew(Func function, object? state, Ta /// However, unless creation and scheduling must be separated, StartNew is the recommended approach /// for both simplicity and performance. /// - public Task StartNew(Func function, object? state, CancellationToken cancellationToken, TaskCreationOptions creationOptions, TaskScheduler scheduler) // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + public Task StartNew(Func function, object? state, CancellationToken cancellationToken, TaskCreationOptions creationOptions, TaskScheduler scheduler) { return Task.StartNew(Task.InternalCurrentIfAttached(creationOptions), function, state, cancellationToken, creationOptions, InternalTaskOptions.None, scheduler); @@ -500,7 +501,7 @@ private static void FromAsyncCoreLogic( Exception? ex = null; OperationCanceledException? oce = null; - TResult result = default!; // TODO-NULLABLE-GENERIC + TResult result = default!; try { @@ -671,9 +672,9 @@ internal static Task FromAsyncImpl( if (Task.s_asyncDebuggingEnabled) Task.AddToActiveTasks(t); - if (asyncResult!.IsCompleted) // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + if (asyncResult!.IsCompleted) // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected { - try { t.InternalRunSynchronously(scheduler!, waitForCompletion: false); } // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + try { t.InternalRunSynchronously(scheduler!, waitForCompletion: false); } // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected catch (Exception e) { promise.TrySetException(e); } // catch and log any scheduler exceptions } else @@ -682,7 +683,7 @@ internal static Task FromAsyncImpl( asyncResult.AsyncWaitHandle, delegate { - try { t.InternalRunSynchronously(scheduler!, waitForCompletion: false); } // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + try { t.InternalRunSynchronously(scheduler!, waitForCompletion: false); } // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected catch (Exception e) { promise.TrySetException(e); } // catch and log any scheduler exceptions }, null, @@ -712,7 +713,7 @@ internal static Task FromAsyncImpl( /// public Task FromAsync( Func beginMethod, - Func endMethod, object? state) // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + Func endMethod, object? state) { return FromAsyncImpl(beginMethod, endMethod, null, state, m_defaultCreationOptions); } @@ -741,7 +742,7 @@ public Task FromAsync( /// public Task FromAsync( Func beginMethod, - Func endMethod, object? state, TaskCreationOptions creationOptions) // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + Func endMethod, object? state, TaskCreationOptions creationOptions) { return FromAsyncImpl(beginMethod, endMethod, null, state, creationOptions); } @@ -765,7 +766,7 @@ internal static Task FromAsyncImpl(Func promise = new Task(state, creationOptions); if (AsyncCausalityTracer.LoggingOn) - AsyncCausalityTracer.TraceOperationCreation(promise, "TaskFactory.FromAsync: " + beginMethod!.Method.Name); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + AsyncCausalityTracer.TraceOperationCreation(promise, "TaskFactory.FromAsync: " + beginMethod!.Method.Name); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected if (Task.s_asyncDebuggingEnabled) Task.AddToActiveTasks(promise); @@ -773,7 +774,7 @@ internal static Task FromAsyncImpl(Func // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + var asyncResult = beginMethod!(iar => // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected { if (!iar.CompletedSynchronously) FromAsyncCoreLogic(iar, endFunction, endAction, promise, requiresSynchronization: true); @@ -824,7 +825,7 @@ internal static Task FromAsyncImpl(Func FromAsync( Func beginMethod, Func endMethod, - TArg1 arg1, object? state) // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + TArg1 arg1, object? state) { return FromAsyncImpl(beginMethod, endMethod, null, arg1, state, m_defaultCreationOptions); } @@ -858,7 +859,7 @@ public Task FromAsync( public Task FromAsync( Func beginMethod, Func endMethod, - TArg1 arg1, object? state, TaskCreationOptions creationOptions) // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + TArg1 arg1, object? state, TaskCreationOptions creationOptions) { return FromAsyncImpl(beginMethod, endMethod, null, arg1, state, creationOptions); } @@ -882,7 +883,7 @@ internal static Task FromAsyncImpl(Func promise = new Task(state, creationOptions); if (AsyncCausalityTracer.LoggingOn) - AsyncCausalityTracer.TraceOperationCreation(promise, "TaskFactory.FromAsync: " + beginMethod!.Method.Name); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + AsyncCausalityTracer.TraceOperationCreation(promise, "TaskFactory.FromAsync: " + beginMethod!.Method.Name); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected if (Task.s_asyncDebuggingEnabled) Task.AddToActiveTasks(promise); @@ -890,7 +891,7 @@ internal static Task FromAsyncImpl(Func // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + var asyncResult = beginMethod!(arg1, iar => // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected { if (!iar.CompletedSynchronously) FromAsyncCoreLogic(iar, endFunction, endAction, promise, requiresSynchronization: true); @@ -945,7 +946,7 @@ internal static Task FromAsyncImpl(Func FromAsync( Func beginMethod, Func endMethod, - TArg1 arg1, TArg2 arg2, object? state) // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + TArg1 arg1, TArg2 arg2, object? state) { return FromAsyncImpl(beginMethod, endMethod, null, arg1, arg2, state, m_defaultCreationOptions); } @@ -983,7 +984,7 @@ public Task FromAsync( public Task FromAsync( Func beginMethod, Func endMethod, - TArg1 arg1, TArg2 arg2, object? state, TaskCreationOptions creationOptions) // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + TArg1 arg1, TArg2 arg2, object? state, TaskCreationOptions creationOptions) { return FromAsyncImpl(beginMethod, endMethod, null, arg1, arg2, state, creationOptions); } @@ -992,7 +993,7 @@ public Task FromAsync( // method can access the logic w/o declaring a TaskFactory instance. internal static Task FromAsyncImpl(Func beginMethod, Func? endFunction, Action? endAction, - TArg1 arg1, TArg2 arg2, object? state, TaskCreationOptions creationOptions) // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + TArg1 arg1, TArg2 arg2, object? state, TaskCreationOptions creationOptions) { if (beginMethod == null) ThrowHelper.ThrowArgumentNullException(ExceptionArgument.beginMethod); @@ -1007,7 +1008,7 @@ internal static Task FromAsyncImpl(Func promise = new Task(state, creationOptions); if (AsyncCausalityTracer.LoggingOn) - AsyncCausalityTracer.TraceOperationCreation(promise, "TaskFactory.FromAsync: " + beginMethod!.Method.Name); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + AsyncCausalityTracer.TraceOperationCreation(promise, "TaskFactory.FromAsync: " + beginMethod!.Method.Name); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected if (Task.s_asyncDebuggingEnabled) Task.AddToActiveTasks(promise); @@ -1015,7 +1016,7 @@ internal static Task FromAsyncImpl(Func // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + var asyncResult = beginMethod!(arg1, arg2, iar => // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected { if (!iar.CompletedSynchronously) FromAsyncCoreLogic(iar, endFunction, endAction, promise, requiresSynchronization: true); @@ -1140,7 +1141,7 @@ internal static Task FromAsyncImpl(Func promise = new Task(state, creationOptions); if (AsyncCausalityTracer.LoggingOn) - AsyncCausalityTracer.TraceOperationCreation(promise, "TaskFactory.FromAsync: " + beginMethod!.Method.Name); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + AsyncCausalityTracer.TraceOperationCreation(promise, "TaskFactory.FromAsync: " + beginMethod!.Method.Name); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected if (Task.s_asyncDebuggingEnabled) Task.AddToActiveTasks(promise); @@ -1148,7 +1149,7 @@ internal static Task FromAsyncImpl(Func // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + var asyncResult = beginMethod!(arg1, arg2, arg3, iar => // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected { if (!iar.CompletedSynchronously) FromAsyncCoreLogic(iar, endFunction, endAction, promise, requiresSynchronization: true); @@ -1228,7 +1229,7 @@ private sealed class FromAsyncTrimPromise : Task where TInst internal static readonly AsyncCallback s_completeFromAsyncResult = CompleteFromAsyncResult; /// A reference to the object on which the begin/end methods are invoked. - private TInstance m_thisRef; + [AllowNull, MaybeNull] private TInstance m_thisRef; /// The end method. private Func? m_endMethod; @@ -1253,13 +1254,13 @@ internal static void CompleteFromAsyncResult(IAsyncResult asyncResult) // Validate argument if (asyncResult == null) ThrowHelper.ThrowArgumentNullException(ExceptionArgument.asyncResult); - var promise = asyncResult!.AsyncState as FromAsyncTrimPromise; // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + var promise = asyncResult!.AsyncState as FromAsyncTrimPromise; // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected if (promise == null) ThrowHelper.ThrowArgumentException(ExceptionResource.InvalidOperation_WrongAsyncResultOrEndCalledMultiple, ExceptionArgument.asyncResult); // Grab the relevant state and then null it out so that the task doesn't hold onto the state unnecessarily - var thisRef = promise!.m_thisRef; // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + var thisRef = promise!.m_thisRef; // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected var endMethod = promise.m_endMethod; - promise.m_thisRef = default!; // TODO-NULLABLE-GENERIC + promise.m_thisRef = default!; // TODO-NULLABLE: Remove ! when nullable attributes are respected promise.m_endMethod = null; if (endMethod == null) ThrowHelper.ThrowArgumentException(ExceptionResource.InvalidOperation_WrongAsyncResultOrEndCalledMultiple, ExceptionArgument.asyncResult); @@ -1267,7 +1268,7 @@ internal static void CompleteFromAsyncResult(IAsyncResult asyncResult) // we'll instead complete the promise at the call site. if (!asyncResult.CompletedSynchronously) { - promise.Complete(thisRef, endMethod!, asyncResult, requiresSynchronization: true); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + promise.Complete(thisRef, endMethod!, asyncResult, requiresSynchronization: true); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected } } @@ -1322,7 +1323,7 @@ private static Task CreateCanceledTask(TaskContinuationOptions continua { TaskCreationOptions tco; Task.CreationOptionsFromContinuationOptions(continuationOptions, out tco, out _); - return new Task(true, default!, tco, ct); // TODO-NULLABLE-GENERIC + return new Task(true, default!, tco, ct); // TODO-NULLABLE: Remove ! when nullable attributes are respected } // @@ -1610,7 +1611,7 @@ internal static Task ContinueWhenAllImpl(Task[] tasksCopy = TaskFactory.CheckMultiContinuationTasksAndCopy(tasks!); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + Task[] tasksCopy = TaskFactory.CheckMultiContinuationTasksAndCopy(tasks!); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected // Bail early if cancellation has been requested. if (cancellationToken.IsCancellationRequested @@ -1629,7 +1630,7 @@ internal static Task ContinueWhenAllImpl(Task( // use a cached delegate GenericDelegateCache.CWAllFuncDelegate, - continuationFunction, scheduler!, cancellationToken, continuationOptions); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + continuationFunction, scheduler!, cancellationToken, continuationOptions); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected } else { @@ -1638,7 +1639,7 @@ internal static Task ContinueWhenAllImpl(Task( // use a cached delegate GenericDelegateCache.CWAllActionDelegate, - continuationAction, scheduler!, cancellationToken, continuationOptions); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + continuationAction, scheduler!, cancellationToken, continuationOptions); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected } } @@ -1656,7 +1657,7 @@ internal static Task ContinueWhenAllImpl(Task[] tasks, if (scheduler == null) ThrowHelper.ThrowArgumentNullException(ExceptionArgument.scheduler); // Check tasks array and make defensive copy - Task[] tasksCopy = TaskFactory.CheckMultiContinuationTasksAndCopy(tasks!); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + Task[] tasksCopy = TaskFactory.CheckMultiContinuationTasksAndCopy(tasks!); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected // Bail early if cancellation has been requested. if (cancellationToken.IsCancellationRequested @@ -1682,7 +1683,7 @@ internal static Task ContinueWhenAllImpl(Task[] tasks, Debug.Assert(state is Func); return ((Func)state)(completedTasks.Result); }, - continuationFunction, scheduler!, cancellationToken, continuationOptions); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + continuationFunction, scheduler!, cancellationToken, continuationOptions); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected } else { @@ -1695,9 +1696,9 @@ internal static Task ContinueWhenAllImpl(Task[] tasks, { completedTasks.NotifyDebuggerOfWaitCompletionIfNecessary(); Debug.Assert(state is Action); - ((Action)state)(completedTasks.Result); return default!; // TODO-NULLABLE-GENERIC + ((Action)state)(completedTasks.Result); return default!; }, - continuationAction, scheduler!, cancellationToken, continuationOptions); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + continuationAction, scheduler!, cancellationToken, continuationOptions); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected } } @@ -1980,7 +1981,7 @@ internal static Task ContinueWhenAnyImpl(Task[] tasks, // check arguments TaskFactory.CheckMultiTaskContinuationOptions(continuationOptions); if (tasks == null) ThrowHelper.ThrowArgumentNullException(ExceptionArgument.tasks); - if (tasks!.Length == 0) ThrowHelper.ThrowArgumentException(ExceptionResource.Task_MultiTaskContinuation_EmptyTaskList, ExceptionArgument.tasks); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + if (tasks!.Length == 0) ThrowHelper.ThrowArgumentException(ExceptionResource.Task_MultiTaskContinuation_EmptyTaskList, ExceptionArgument.tasks); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected //ArgumentNullException of continuationFunction or continuationAction is checked by the caller Debug.Assert((continuationFunction != null) != (continuationAction != null), "Expected exactly one of endFunction/endAction to be non-null"); @@ -2008,7 +2009,7 @@ internal static Task ContinueWhenAnyImpl(Task[] tasks, Debug.Assert(state is Func); return ((Func)state)(completedTask.Result); }, - continuationFunction, scheduler!, cancellationToken, continuationOptions); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + continuationFunction, scheduler!, cancellationToken, continuationOptions); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected } else { @@ -2020,9 +2021,9 @@ internal static Task ContinueWhenAnyImpl(Task[] tasks, { Debug.Assert(state is Action); ((Action)state)(completedTask.Result); - return default!; // TODO-NULLABLE-GENERIC + return default!; }, - continuationAction, scheduler!, cancellationToken, continuationOptions); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + continuationAction, scheduler!, cancellationToken, continuationOptions); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected } } @@ -2036,7 +2037,7 @@ internal static Task ContinueWhenAnyImpl(Task ContinueWhenAnyImpl(Task( // Use a cached delegate GenericDelegateCache.CWAnyFuncDelegate, - continuationFunction, scheduler!, cancellationToken, continuationOptions); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + continuationFunction, scheduler!, cancellationToken, continuationOptions); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected } else { @@ -2066,7 +2067,7 @@ internal static Task ContinueWhenAnyImpl(Task( // Use a cached delegate GenericDelegateCache.CWAnyActionDelegate, - continuationAction, scheduler!, cancellationToken, continuationOptions); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + continuationAction, scheduler!, cancellationToken, continuationOptions); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected } } } @@ -2094,7 +2095,7 @@ internal static class GenericDelegateCache var action = (Action>)state; var arg = (Task)wrappedWinner.Result; action(arg); - return default!; // TODO-NULLABLE-GENERIC + return default!; }; // ContinueWith delegate for TaskFactory.ContinueWhenAllImpl(non-null continuationFunction) @@ -2115,7 +2116,7 @@ internal static class GenericDelegateCache Debug.Assert(state is Action[]>); var action = (Action[]>)state; action(wrappedAntecedents.Result); - return default!; // TODO-NULLABLE-GENERIC + return default!; }; } } diff --git a/src/Common/src/CoreLib/System/Threading/Tasks/ProducerConsumerQueues.cs b/src/Common/src/CoreLib/System/Threading/Tasks/ProducerConsumerQueues.cs index 157ad5d666a5..9fa82edb6e1f 100644 --- a/src/Common/src/CoreLib/System/Threading/Tasks/ProducerConsumerQueues.cs +++ b/src/Common/src/CoreLib/System/Threading/Tasks/ProducerConsumerQueues.cs @@ -25,6 +25,7 @@ using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.Runtime.InteropServices; namespace System.Threading.Tasks @@ -42,7 +43,7 @@ internal interface IProducerConsumerQueue : IEnumerable /// The dequeued item. /// true if an item could be dequeued; otherwise, false. /// This method is meant to be thread-safe subject to the particular nature of the implementation. - bool TryDequeue(out T result); + bool TryDequeue([MaybeNullWhen(false)] out T result); /// Gets whether the collection is currently empty. /// This method may or may not be thread-safe. @@ -67,7 +68,7 @@ internal sealed class MultiProducerMultiConsumerQueue : ConcurrentQueue, I /// Attempts to dequeue an item from the queue. /// The dequeued item. /// true if an item could be dequeued; otherwise, false. - bool IProducerConsumerQueue.TryDequeue(out T result) { return base.TryDequeue(out result); } + bool IProducerConsumerQueue.TryDequeue([MaybeNullWhen(false)] out T result) { return base.TryDequeue(out result); } /// Gets whether the collection is currently empty. bool IProducerConsumerQueue.IsEmpty { get { return base.IsEmpty; } } @@ -194,7 +195,7 @@ private void EnqueueSlow(T item, ref Segment segment) /// Attempts to dequeue an item from the queue. /// The dequeued item. /// true if an item could be dequeued; otherwise, false. - public bool TryDequeue(out T result) + public bool TryDequeue([MaybeNullWhen(false)] out T result) { Segment segment = m_head; var array = segment.m_array; @@ -204,7 +205,7 @@ public bool TryDequeue(out T result) if (first != segment.m_state.m_lastCopy) { result = array[first]; - array[first] = default!; // Clear the slot to release the element // TODO-NULLABLE-GENERIC + array[first] = default!; // Clear the slot to release the element segment.m_state.m_first = (first + 1) & (array.Length - 1); return true; } @@ -217,7 +218,7 @@ public bool TryDequeue(out T result) /// The segment from which the item was dequeued. /// The dequeued item. /// true if an item could be dequeued; otherwise, false. - private bool TryDequeueSlow(ref Segment segment, ref T[] array, out T result) + private bool TryDequeueSlow(ref Segment segment, ref T[] array, [MaybeNullWhen(false)] out T result) { Debug.Assert(segment != null, "Expected a non-null segment."); Debug.Assert(array != null, "Expected a non-null item array."); @@ -239,12 +240,12 @@ private bool TryDequeueSlow(ref Segment segment, ref T[] array, out T result) if (first == segment.m_state.m_last) { - result = default!; // TODO-NULLABLE-GENERIC + result = default!; return false; } result = array[first]; - array[first] = default!; // Clear the slot to release the element // TODO-NULLABLE-GENERIC + array[first] = default!; // Clear the slot to release the element segment.m_state.m_first = (first + 1) & (segment.m_array.Length - 1); segment.m_state.m_lastCopy = segment.m_state.m_last; // Refresh m_lastCopy to ensure that m_first has not passed m_lastCopy diff --git a/src/Common/src/CoreLib/System/Threading/Tasks/Sources/IValueTaskSource.cs b/src/Common/src/CoreLib/System/Threading/Tasks/Sources/IValueTaskSource.cs index 8f460370c0a1..5f071b2749b4 100644 --- a/src/Common/src/CoreLib/System/Threading/Tasks/Sources/IValueTaskSource.cs +++ b/src/Common/src/CoreLib/System/Threading/Tasks/Sources/IValueTaskSource.cs @@ -53,7 +53,7 @@ public interface IValueTaskSource /// The state object to pass to when it's invoked. /// Opaque value that was provided to the 's constructor. /// The flags describing the behavior of the continuation. - void OnCompleted(Action continuation, object? state, short token, ValueTaskSourceOnCompletedFlags flags); // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + void OnCompleted(Action continuation, object? state, short token, ValueTaskSourceOnCompletedFlags flags); /// Gets the result of the . /// Opaque value that was provided to the 's constructor. @@ -73,7 +73,7 @@ public interface IValueTaskSource /// The state object to pass to when it's invoked. /// Opaque value that was provided to the 's constructor. /// The flags describing the behavior of the continuation. - void OnCompleted(Action continuation, object? state, short token, ValueTaskSourceOnCompletedFlags flags); // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + void OnCompleted(Action continuation, object? state, short token, ValueTaskSourceOnCompletedFlags flags); /// Gets the result of the . /// Opaque value that was provided to the 's constructor. diff --git a/src/Common/src/CoreLib/System/Threading/Tasks/Sources/ManualResetValueTaskSourceCore.cs b/src/Common/src/CoreLib/System/Threading/Tasks/Sources/ManualResetValueTaskSourceCore.cs index fd68a4985a7b..e72328ac5494 100644 --- a/src/Common/src/CoreLib/System/Threading/Tasks/Sources/ManualResetValueTaskSourceCore.cs +++ b/src/Common/src/CoreLib/System/Threading/Tasks/Sources/ManualResetValueTaskSourceCore.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.Runtime.ExceptionServices; using System.Runtime.InteropServices; @@ -31,7 +32,7 @@ public struct ManualResetValueTaskSourceCore /// Whether the current operation has completed. private bool _completed; /// The result with which the operation succeeded, or the default value if it hasn't yet completed or failed. - private TResult _result; + [AllowNull, MaybeNull] private TResult _result; /// The exception with which the operation failed, or null if it hasn't yet completed or completed successfully. private ExceptionDispatchInfo? _error; /// The current version of this value, used to help prevent misuse. @@ -47,7 +48,7 @@ public void Reset() // Reset/update state for the next use/await of this instance. _version++; _completed = false; - _result = default!; // TODO-NULLABLE-GENERIC + _result = default!; // TODO-NULLABLE: Remove ! when nullable attributes are respected _error = null; _executionContext = null; _capturedContext = null; @@ -106,7 +107,7 @@ public TResult GetResult(short token) /// The state object to pass to when it's invoked. /// Opaque value that was provided to the 's constructor. /// The flags describing the behavior of the continuation. - public void OnCompleted(Action continuation, object? state, short token, ValueTaskSourceOnCompletedFlags flags) // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + public void OnCompleted(Action continuation, object? state, short token, ValueTaskSourceOnCompletedFlags flags) { if (continuation == null) { @@ -175,7 +176,7 @@ public void OnCompleted(Action continuation, object? state, short token case SynchronizationContext sc: sc.Post(s => { - var tuple = (Tuple, object?>)s!; // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + var tuple = (Tuple, object?>)s!; tuple.Item1(tuple.Item2); }, Tuple.Create(continuation, state)); break; @@ -254,7 +255,7 @@ private void InvokeContinuation() case SynchronizationContext sc: sc.Post(s => { - var state = (Tuple, object?>)s!; // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + var state = (Tuple, object?>)s!; state.Item1(state.Item2); }, Tuple.Create(_continuation, _continuationState)); break; diff --git a/src/Common/src/CoreLib/System/Threading/Tasks/Task.cs b/src/Common/src/CoreLib/System/Threading/Tasks/Task.cs index a4a65922ccde..4fb8d9aff90a 100644 --- a/src/Common/src/CoreLib/System/Threading/Tasks/Task.cs +++ b/src/Common/src/CoreLib/System/Threading/Tasks/Task.cs @@ -207,12 +207,14 @@ internal static bool AddToActiveTasks(Task task) { Debug.Assert(task != null, "Null Task objects can't be added to the ActiveTasks collection"); +#pragma warning disable CS8634 // TODO-NULLABLE: Remove warning disable when nullable attributes are respected LazyInitializer.EnsureInitialized(ref s_currentActiveTasks, () => new Dictionary()); +#pragma warning restore CS8634 int taskId = task.Id; - lock (s_currentActiveTasks!) // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + lock (s_currentActiveTasks!) // TODO-NULLABLE: Remove ! when nullable attributes are respected { - s_currentActiveTasks![taskId] = task; // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + s_currentActiveTasks[taskId] = task; } //always return true to keep signature as bool for backwards compatibility return true; @@ -427,7 +429,7 @@ public Task(Action action, CancellationToken cancellationToken, TaskCreationOpti /// /// The argument is null. /// - public Task(Action action, object? state) // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + public Task(Action action, object? state) : this(action, state, null, default, TaskCreationOptions.None, InternalTaskOptions.None, null) { } @@ -444,7 +446,7 @@ public Task(Action action, object? state) // TODO-NULLABLE: https://git /// The provided CancellationToken /// has already been disposed. /// - public Task(Action action, object? state, CancellationToken cancellationToken) // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + public Task(Action action, object? state, CancellationToken cancellationToken) : this(action, state, null, cancellationToken, TaskCreationOptions.None, InternalTaskOptions.None, null) { } @@ -465,7 +467,7 @@ public Task(Action action, object? state, CancellationToken cancellatio /// The argument specifies an invalid value for . /// - public Task(Action action, object? state, TaskCreationOptions creationOptions) // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + public Task(Action action, object? state, TaskCreationOptions creationOptions) : this(action, state, Task.InternalCurrentIfAttached(creationOptions), default, creationOptions, InternalTaskOptions.None, null) { } @@ -490,7 +492,7 @@ public Task(Action action, object? state, TaskCreationOptions creationO /// The provided CancellationToken /// has already been disposed. /// - public Task(Action action, object? state, CancellationToken cancellationToken, TaskCreationOptions creationOptions) // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + public Task(Action action, object? state, CancellationToken cancellationToken, TaskCreationOptions creationOptions) : this(action, state, Task.InternalCurrentIfAttached(creationOptions), cancellationToken, creationOptions, InternalTaskOptions.None, null) { } @@ -634,7 +636,7 @@ private void AssignCancellationToken(CancellationToken cancellationToken, Task? if (antecedent == null) { // if no antecedent was specified, use this task's reference as the cancellation state object - ctr = cancellationToken.UnsafeRegister(t => ((Task)t!).InternalCancel(false), this); // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + ctr = cancellationToken.UnsafeRegister(t => ((Task)t!).InternalCancel(false), this); } else { @@ -1050,7 +1052,7 @@ public void RunSynchronously(TaskScheduler scheduler) ThrowHelper.ThrowArgumentNullException(ExceptionArgument.scheduler); } - InternalRunSynchronously(scheduler!, waitForCompletion: true); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + InternalRunSynchronously(scheduler!, waitForCompletion: true); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected } // @@ -1356,7 +1358,9 @@ internal bool IsCancellationRequested /// The initialized contingent properties object. internal ContingentProperties EnsureContingentPropertiesInitialized() { - return LazyInitializer.EnsureInitialized(ref m_contingentProperties, () => new ContingentProperties())!; // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 +#pragma warning disable CS8634 // TODO-NULLABLE: Remove warning disable when nullable attributes are respected + return LazyInitializer.EnsureInitialized(ref m_contingentProperties, () => new ContingentProperties())!; +#pragma warning restore CS8634 } /// @@ -1525,7 +1529,7 @@ internal ManualResetEventSlim CompletedEvent } } - return contingentProps.m_completionEvent!; // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + return contingentProps.m_completionEvent!; // TODO-NULLABLE: Remove ! when compiler specially-recognizes CompareExchange for nullability } } @@ -1815,7 +1819,7 @@ internal void AddException(object exceptionObject, bool representsCancellation) lock (props) { - props.m_exceptionsHolder!.Add(exceptionObject, representsCancellation); // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + props.m_exceptionsHolder!.Add(exceptionObject, representsCancellation); // TODO-NULLABLE: Remove ! when compiler specially-recognizes CompareExchange for nullability } } @@ -3613,13 +3617,13 @@ private Task ContinueWith(Action continuationAction, TaskScheduler schedul CreationOptionsFromContinuationOptions(continuationOptions, out creationOptions, out internalOptions); Task continuationTask = new ContinuationTaskFromTask( - this, continuationAction!, null, // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + this, continuationAction!, null, // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected creationOptions, internalOptions ); // Register the continuation. If synchronous execution is requested, this may // actually invoke the continuation before returning. - ContinueWithCore(continuationTask, scheduler!, cancellationToken, continuationOptions); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + ContinueWithCore(continuationTask, scheduler!, cancellationToken, continuationOptions); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected return continuationTask; } @@ -3803,13 +3807,13 @@ private Task ContinueWith(Action continuationAction, object? stat CreationOptionsFromContinuationOptions(continuationOptions, out creationOptions, out internalOptions); Task continuationTask = new ContinuationTaskFromTask( - this, continuationAction!, state, // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + this, continuationAction!, state, // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected creationOptions, internalOptions ); // Register the continuation. If synchronous execution is requested, this may // actually invoke the continuation before returning. - ContinueWithCore(continuationTask, scheduler!, cancellationToken, continuationOptions); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + ContinueWithCore(continuationTask, scheduler!, cancellationToken, continuationOptions); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected return continuationTask; } @@ -4006,13 +4010,13 @@ private Task ContinueWith(Func continuationFunc CreationOptionsFromContinuationOptions(continuationOptions, out creationOptions, out internalOptions); Task continuationTask = new ContinuationResultTaskFromTask( - this, continuationFunction!, null, // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + this, continuationFunction!, null, // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected creationOptions, internalOptions ); // Register the continuation. If synchronous execution is requested, this may // actually invoke the continuation before returning. - ContinueWithCore(continuationTask, scheduler!, cancellationToken, continuationOptions); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + ContinueWithCore(continuationTask, scheduler!, cancellationToken, continuationOptions); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected return continuationTask; } @@ -4213,13 +4217,13 @@ private Task ContinueWith(Func continu CreationOptionsFromContinuationOptions(continuationOptions, out creationOptions, out internalOptions); Task continuationTask = new ContinuationResultTaskFromTask( - this, continuationFunction!, state, // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + this, continuationFunction!, state, // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected creationOptions, internalOptions ); // Register the continuation. If synchronous execution is requested, this may // actually invoke the continuation before returning. - ContinueWithCore(continuationTask, scheduler!, cancellationToken, continuationOptions); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + ContinueWithCore(continuationTask, scheduler!, cancellationToken, continuationOptions); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected return continuationTask; } @@ -4724,7 +4728,7 @@ private static bool WaitAllCore(Task[] tasks, int millisecondsTimeout, Cancellat bool returnValue = true; // Collects incomplete tasks in "waitedOnTaskList" - for (int i = tasks!.Length - 1; i >= 0; i--) // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + for (int i = tasks!.Length - 1; i >= 0; i--) // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected { Task task = tasks[i]; @@ -4733,7 +4737,7 @@ private static bool WaitAllCore(Task[] tasks, int millisecondsTimeout, Cancellat ThrowHelper.ThrowArgumentException(ExceptionResource.Task_WaitMulti_NullTask, ExceptionArgument.tasks); } - bool taskIsCompleted = task!.IsCompleted; // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + bool taskIsCompleted = task!.IsCompleted; // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected if (!taskIsCompleted) { // try inlining the task only if we have an infinite timeout and an empty cancellation token @@ -5089,7 +5093,7 @@ private static int WaitAnyCore(Task[] tasks, int millisecondsTimeout, Cancellati // Make a pass through the loop to check for any tasks that may have // already been completed, and to verify that no tasks are null. - for (int taskIndex = 0; taskIndex < tasks!.Length; taskIndex++) // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + for (int taskIndex = 0; taskIndex < tasks!.Length; taskIndex++) // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected { Task task = tasks[taskIndex]; @@ -5098,7 +5102,7 @@ private static int WaitAnyCore(Task[] tasks, int millisecondsTimeout, Cancellati ThrowHelper.ThrowArgumentException(ExceptionResource.Task_WaitMulti_NullTask, ExceptionArgument.tasks); } - if (signaledTaskIndex == -1 && task!.IsCompleted) // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + if (signaledTaskIndex == -1 && task!.IsCompleted) // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected { // We found our first completed task. Store it, but we can't just return here, // as we still need to validate the whole array for nulls. @@ -5150,7 +5154,7 @@ public static Task FromException(Exception exception) if (exception == null) ThrowHelper.ThrowArgumentNullException(ExceptionArgument.exception); var task = new Task(); - bool succeeded = task.TrySetException(exception!); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + bool succeeded = task.TrySetException(exception!); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected Debug.Assert(succeeded, "This should always succeed on a new task."); return task; } @@ -5164,7 +5168,7 @@ public static Task FromException(Exception exception) if (exception == null) ThrowHelper.ThrowArgumentNullException(ExceptionArgument.exception); var task = new Task(); - bool succeeded = task.TrySetException(exception!); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + bool succeeded = task.TrySetException(exception!); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected Debug.Assert(succeeded, "This should always succeed on a new task."); return task; } @@ -5187,7 +5191,7 @@ public static Task FromCanceled(CancellationToken cancellation { if (!cancellationToken.IsCancellationRequested) ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.cancellationToken); - return new Task(true, default!, TaskCreationOptions.None, cancellationToken); // TODO-NULLABLE-GENERIC + return new Task(true, default!, TaskCreationOptions.None, cancellationToken); // TODO-NULLABLE: Remove ! when nullable attributes are respected } /// Creates a that's completed due to cancellation with the specified exception. @@ -5324,7 +5328,7 @@ public static Task Run(Func function, CancellationToken cancellationToken return Task.FromCanceled(cancellationToken); // Kick off initial Task, which will call the user-supplied function and yield a Task. - Task task1 = Task.Factory.StartNew(function!, cancellationToken, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + Task task1 = Task.Factory.StartNew(function!, cancellationToken, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected // Create a promise-style Task to be used as a proxy for the operation // Set lookForOce == true so that unwrap logic can be on the lookout for OCEs thrown as faults from task1, to support in-delegate cancellation. @@ -5369,7 +5373,7 @@ public static Task Run(Func?> function, Cancella return Task.FromCanceled(cancellationToken); // Kick off initial Task, which will call the user-supplied function and yield a Task. - Task?> task1 = Task?>.Factory.StartNew(function!, cancellationToken, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + Task?> task1 = Task?>.Factory.StartNew(function!, cancellationToken, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected // Create a promise-style Task to be used as a proxy for the operation // Set lookForOce == true so that unwrap logic can be on the lookout for OCEs thrown as faults from task1, to support in-delegate cancellation. @@ -5492,7 +5496,7 @@ internal DelayPromise(int millisecondsDelay) if (millisecondsDelay != Timeout.Infinite) // no need to create the timer if it's an infinite timeout { - _timer = new TimerQueueTimer(state => ((DelayPromise)state!).CompleteTimedOut(), this, (uint)millisecondsDelay, Timeout.UnsignedInfinite, flowExecutionContext: false); // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + _timer = new TimerQueueTimer(state => ((DelayPromise)state!).CompleteTimedOut(), this, (uint)millisecondsDelay, Timeout.UnsignedInfinite, flowExecutionContext: false); if (IsCanceled) { // Handle rare race condition where cancellation occurs prior to our having created and stored the timer, in which case @@ -5531,7 +5535,7 @@ internal DelayPromiseWithCancellation(int millisecondsDelay, CancellationToken t Debug.Assert(token.CanBeCanceled); _token = token; - _registration = token.UnsafeRegister(state => ((DelayPromiseWithCancellation)state!).CompleteCanceled(), this); // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + _registration = token.UnsafeRegister(state => ((DelayPromiseWithCancellation)state!).CompleteCanceled(), this); } private void CompleteCanceled() @@ -5596,7 +5600,7 @@ public static Task WhenAll(IEnumerable tasks) foreach (var task in tasks) { if (task == null) ThrowHelper.ThrowArgumentException(ExceptionResource.Task_MultiTaskContinuation_NullTask, ExceptionArgument.tasks); - taskArray[index++] = task!; // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + taskArray[index++] = task!; // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected } return InternalWhenAll(taskArray); } @@ -5604,10 +5608,10 @@ public static Task WhenAll(IEnumerable tasks) // Do some argument checking and convert tasks to a List (and later an array). if (tasks == null) ThrowHelper.ThrowArgumentNullException(ExceptionArgument.tasks); List taskList = new List(); - foreach (Task task in tasks!) // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + foreach (Task task in tasks!) // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected { if (task == null) ThrowHelper.ThrowArgumentException(ExceptionResource.Task_MultiTaskContinuation_NullTask, ExceptionArgument.tasks); - taskList.Add(task!); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + taskList.Add(task!); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected } // Delegate the rest to InternalWhenAll() @@ -5646,7 +5650,7 @@ public static Task WhenAll(params Task[] tasks) // Do some argument checking and make a defensive copy of the tasks array if (tasks == null) ThrowHelper.ThrowArgumentNullException(ExceptionArgument.tasks); - int taskCount = tasks!.Length; // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + int taskCount = tasks!.Length; // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected if (taskCount == 0) return InternalWhenAll(tasks); // Small optimization in the case of an empty array. Task[] tasksCopy = new Task[taskCount]; @@ -5654,7 +5658,7 @@ public static Task WhenAll(params Task[] tasks) { Task task = tasks[i]; if (task == null) ThrowHelper.ThrowArgumentException(ExceptionResource.Task_MultiTaskContinuation_NullTask, ExceptionArgument.tasks); - tasksCopy[i] = task!; // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + tasksCopy[i] = task!; // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected } // The rest can be delegated to InternalWhenAll() @@ -5840,7 +5844,7 @@ public static Task WhenAll(IEnumerable> tasks) foreach (var task in tasks) { if (task == null) ThrowHelper.ThrowArgumentException(ExceptionResource.Task_MultiTaskContinuation_NullTask, ExceptionArgument.tasks); - taskArray[index++] = task!; // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + taskArray[index++] = task!; // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected } return InternalWhenAll(taskArray); } @@ -5848,10 +5852,10 @@ public static Task WhenAll(IEnumerable> tasks) // Do some argument checking and convert tasks into a List (later an array) if (tasks == null) ThrowHelper.ThrowArgumentNullException(ExceptionArgument.tasks); List> taskList = new List>(); - foreach (Task task in tasks!) // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + foreach (Task task in tasks!) // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected { if (task == null) ThrowHelper.ThrowArgumentException(ExceptionResource.Task_MultiTaskContinuation_NullTask, ExceptionArgument.tasks); - taskList.Add(task!); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + taskList.Add(task!); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected } // Delegate the rest to InternalWhenAll(). @@ -5893,7 +5897,7 @@ public static Task WhenAll(params Task[] tasks) // Do some argument checking and make a defensive copy of the tasks array if (tasks == null) ThrowHelper.ThrowArgumentNullException(ExceptionArgument.tasks); - int taskCount = tasks!.Length; // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + int taskCount = tasks!.Length; // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected if (taskCount == 0) return InternalWhenAll(tasks); // small optimization in the case of an empty task array Task[] tasksCopy = new Task[taskCount]; @@ -5901,7 +5905,7 @@ public static Task WhenAll(params Task[] tasks) { Task task = tasks[i]; if (task == null) ThrowHelper.ThrowArgumentException(ExceptionResource.Task_MultiTaskContinuation_NullTask, ExceptionArgument.tasks); - tasksCopy[i] = task!; // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + tasksCopy[i] = task!; // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected } // Delegate the rest to InternalWhenAll() @@ -6060,7 +6064,7 @@ internal override bool ShouldNotifyDebuggerOfWaitCompletion public static Task WhenAny(params Task[] tasks) { if (tasks == null) ThrowHelper.ThrowArgumentNullException(ExceptionArgument.tasks); - if (tasks!.Length == 0) // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + if (tasks!.Length == 0) // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected { ThrowHelper.ThrowArgumentException(ExceptionResource.Task_MultiTaskContinuation_EmptyTaskList, ExceptionArgument.tasks); } @@ -6073,7 +6077,7 @@ public static Task WhenAny(params Task[] tasks) { Task task = tasks[i]; if (task == null) ThrowHelper.ThrowArgumentException(ExceptionResource.Task_MultiTaskContinuation_NullTask, ExceptionArgument.tasks); - tasksCopy[i] = task!; // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + tasksCopy[i] = task!; // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected } // Previously implemented CommonCWAnyLogic() can handle the rest @@ -6102,10 +6106,10 @@ public static Task WhenAny(IEnumerable tasks) // Make a defensive copy, as the user may manipulate the tasks collection // after we return but before the WhenAny asynchronously completes. List taskList = new List(); - foreach (Task task in tasks!) // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + foreach (Task task in tasks!) // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected { if (task == null) ThrowHelper.ThrowArgumentException(ExceptionResource.Task_MultiTaskContinuation_NullTask, ExceptionArgument.tasks); - taskList.Add(task!); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + taskList.Add(task!); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected } if (taskList.Count == 0) @@ -6597,7 +6601,7 @@ private void InvokeCoreAsync(Task completingTask) ThreadPool.UnsafeQueueUserWorkItem(state => { // InvokeCore(completingTask); - var tuple = (Tuple, Task>)state!; // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + var tuple = (Tuple, Task>)state!; tuple.Item1.InvokeCore(tuple.Item2); }, Tuple.Create, Task>(this, completingTask)); } @@ -6673,7 +6677,7 @@ private bool TrySetFromTask(Task task, bool lookForOce) if (Task.s_asyncDebuggingEnabled) RemoveFromActiveTasks(this); - result = TrySetResult(taskTResult != null ? taskTResult.Result : default!); // TODO-NULLABLE-GENERIC + result = TrySetResult(taskTResult != null ? taskTResult.Result : default!); // TODO-NULLABLE: Remove ! when nullable attributes are respected break; } return result; diff --git a/src/Common/src/CoreLib/System/Threading/Tasks/TaskCompletionSource.cs b/src/Common/src/CoreLib/System/Threading/Tasks/TaskCompletionSource.cs index 8773eb415943..b0c79e61ba47 100644 --- a/src/Common/src/CoreLib/System/Threading/Tasks/TaskCompletionSource.cs +++ b/src/Common/src/CoreLib/System/Threading/Tasks/TaskCompletionSource.cs @@ -150,7 +150,7 @@ public bool TrySetException(Exception exception) { if (exception == null) ThrowHelper.ThrowArgumentNullException(ExceptionArgument.exception); - bool rval = _task.TrySetException(exception!); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + bool rval = _task.TrySetException(exception!); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected if (!rval && !_task.IsCompleted) SpinUntilCompleted(); return rval; } @@ -180,11 +180,11 @@ public bool TrySetException(IEnumerable exceptions) if (exceptions == null) ThrowHelper.ThrowArgumentNullException(ExceptionArgument.exceptions); List defensiveCopy = new List(); - foreach (Exception e in exceptions!) // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + foreach (Exception e in exceptions!) // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected { if (e == null) ThrowHelper.ThrowArgumentException(ExceptionResource.TaskCompletionSourceT_TrySetException_NullException, ExceptionArgument.exceptions); - defensiveCopy.Add(e!); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + defensiveCopy.Add(e!); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected } if (defensiveCopy.Count == 0) @@ -216,7 +216,7 @@ public void SetException(Exception exception) { if (exception == null) ThrowHelper.ThrowArgumentNullException(ExceptionArgument.exception); - if (!TrySetException(exception!)) // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538 + if (!TrySetException(exception!)) // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected { ThrowHelper.ThrowInvalidOperationException(ExceptionResource.TaskT_TransitionToFinal_AlreadyCompleted); } diff --git a/src/Common/src/CoreLib/System/Threading/Tasks/TaskContinuation.cs b/src/Common/src/CoreLib/System/Threading/Tasks/TaskContinuation.cs index 65547fb45247..fbe77339ccaf 100644 --- a/src/Common/src/CoreLib/System/Threading/Tasks/TaskContinuation.cs +++ b/src/Common/src/CoreLib/System/Threading/Tasks/TaskContinuation.cs @@ -492,7 +492,7 @@ internal sealed override void Run(Task ignored, bool canInlineContinuationTask) { try { - ((Action)state!)(); // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + ((Action)state!)(); } catch (Exception exception) { diff --git a/src/Common/src/CoreLib/System/Threading/Tasks/TaskFactory.cs b/src/Common/src/CoreLib/System/Threading/Tasks/TaskFactory.cs index 3929a08589a5..786e132e7bb9 100644 --- a/src/Common/src/CoreLib/System/Threading/Tasks/TaskFactory.cs +++ b/src/Common/src/CoreLib/System/Threading/Tasks/TaskFactory.cs @@ -396,7 +396,7 @@ public Task StartNew(Action action, CancellationToken cancellationToken, TaskCre /// However, unless creation and scheduling must be separated, StartNew is the recommended approach /// for both simplicity and performance. /// - public Task StartNew(Action action, object? state) // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + public Task StartNew(Action action, object? state) { Task? currTask = Task.InternalCurrent; return Task.InternalStartNew(currTask, action, state, m_defaultCancellationToken, GetDefaultScheduler(currTask), @@ -425,7 +425,7 @@ public Task StartNew(Action action, object? state) // TODO-NULLABLE: ht /// However, unless creation and scheduling must be separated, StartNew is the recommended approach /// for both simplicity and performance. /// - public Task StartNew(Action action, object? state, CancellationToken cancellationToken) // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + public Task StartNew(Action action, object? state, CancellationToken cancellationToken) { Task? currTask = Task.InternalCurrent; return Task.InternalStartNew(currTask, action, state, cancellationToken, GetDefaultScheduler(currTask), @@ -455,7 +455,7 @@ public Task StartNew(Action action, object? state, CancellationToken ca /// However, unless creation and scheduling must be separated, StartNew is the recommended approach /// for both simplicity and performance. /// - public Task StartNew(Action action, object? state, TaskCreationOptions creationOptions) // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + public Task StartNew(Action action, object? state, TaskCreationOptions creationOptions) { Task? currTask = Task.InternalCurrent; return Task.InternalStartNew(currTask, action, state, m_defaultCancellationToken, GetDefaultScheduler(currTask), @@ -496,7 +496,7 @@ public Task StartNew(Action action, object? state, TaskCreationOptions /// However, unless creation and scheduling must be separated, StartNew is the recommended approach /// for both simplicity and performance. /// - public Task StartNew(Action action, object? state, CancellationToken cancellationToken, // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + public Task StartNew(Action action, object? state, CancellationToken cancellationToken, TaskCreationOptions creationOptions, TaskScheduler scheduler) { return Task.InternalStartNew( @@ -657,7 +657,7 @@ public Task StartNew(Func function, CancellationToken /// However, unless creation and scheduling must be separated, StartNew is the recommended approach /// for both simplicity and performance. /// - public Task StartNew(Func function, object? state) // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + public Task StartNew(Func function, object? state) { Task? currTask = Task.InternalCurrent; return Task.StartNew(currTask, function, state, m_defaultCancellationToken, @@ -690,7 +690,7 @@ public Task StartNew(Func function, object? /// However, unless creation and scheduling must be separated, StartNew is the recommended approach /// for both simplicity and performance. /// - public Task StartNew(Func function, object? state, CancellationToken cancellationToken) // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + public Task StartNew(Func function, object? state, CancellationToken cancellationToken) { Task? currTask = Task.InternalCurrent; return Task.StartNew(currTask, function, state, cancellationToken, @@ -724,7 +724,7 @@ public Task StartNew(Func function, object? /// However, unless creation and scheduling must be separated, StartNew is the recommended approach /// for both simplicity and performance. /// - public Task StartNew(Func function, object? state, TaskCreationOptions creationOptions) // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + public Task StartNew(Func function, object? state, TaskCreationOptions creationOptions) { Task? currTask = Task.InternalCurrent; return Task.StartNew(currTask, function, state, m_defaultCancellationToken, @@ -769,7 +769,7 @@ public Task StartNew(Func function, object? /// However, unless creation and scheduling must be separated, StartNew is the recommended approach /// for both simplicity and performance. /// - public Task StartNew(Func function, object? state, CancellationToken cancellationToken, // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + public Task StartNew(Func function, object? state, CancellationToken cancellationToken, TaskCreationOptions creationOptions, TaskScheduler scheduler) { return Task.StartNew( diff --git a/src/Common/src/CoreLib/System/Threading/Tasks/TaskScheduler.cs b/src/Common/src/CoreLib/System/Threading/Tasks/TaskScheduler.cs index b6afade5a553..f79a87ac0608 100644 --- a/src/Common/src/CoreLib/System/Threading/Tasks/TaskScheduler.cs +++ b/src/Common/src/CoreLib/System/Threading/Tasks/TaskScheduler.cs @@ -298,7 +298,7 @@ private void AddToActiveTaskSchedulers() Interlocked.CompareExchange(ref s_activeTaskSchedulers, new ConditionalWeakTable(), null); activeTaskSchedulers = s_activeTaskSchedulers; } - activeTaskSchedulers!.Add(this, null); // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + activeTaskSchedulers!.Add(this, null); // TODO-NULLABLE: Remove ! when compiler specially-recognizes CompareExchange for nullability } /// diff --git a/src/Common/src/CoreLib/System/Threading/Tasks/ValueTask.cs b/src/Common/src/CoreLib/System/Threading/Tasks/ValueTask.cs index 884ae0b009e1..75c6fd9a325c 100644 --- a/src/Common/src/CoreLib/System/Threading/Tasks/ValueTask.cs +++ b/src/Common/src/CoreLib/System/Threading/Tasks/ValueTask.cs @@ -4,6 +4,7 @@ using System.Collections.Generic; using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Threading.Tasks.Sources; @@ -415,7 +416,7 @@ public ConfiguredValueTaskAwaitable ConfigureAwait(bool continueOnCapturedContex /// null if has the result, otherwise a or a . internal readonly object? _obj; /// The result to be used if the operation completed successfully synchronously. - internal readonly TResult _result; + [AllowNull] internal readonly TResult _result; /// Opaque value passed through to the . internal readonly short _token; /// true to continue on the captured context; otherwise, false. @@ -449,7 +450,7 @@ public ValueTask(Task task) _obj = task; - _result = default!; // TODO-NULLABLE-GENERIC + _result = default!; // TODO-NULLABLE: Remove ! when nullable attributes are respected _continueOnCapturedContext = true; _token = 0; } @@ -468,7 +469,7 @@ public ValueTask(IValueTaskSource source, short token) _obj = source; _token = token; - _result = default!; // TODO-NULLABLE-GENERIC + _result = default!; // TODO-NULLABLE: Remove ! when nullable attributes are respected _continueOnCapturedContext = true; } diff --git a/src/Common/src/CoreLib/System/Threading/Thread.cs b/src/Common/src/CoreLib/System/Threading/Thread.cs index 39f0f63db8a6..9707b0349926 100644 --- a/src/Common/src/CoreLib/System/Threading/Thread.cs +++ b/src/Common/src/CoreLib/System/Threading/Thread.cs @@ -4,6 +4,7 @@ using System.Collections.Generic; using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Runtime.ConstrainedExecution; using System.Security.Principal; @@ -151,7 +152,7 @@ public static IPrincipal? CurrentPrincipal } Interlocked.CompareExchange(ref s_asyncLocalPrincipal, new AsyncLocal(), null); } - s_asyncLocalPrincipal!.Value = value; // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + s_asyncLocalPrincipal!.Value = value; // TODO-NULLABLE: Remove ! when compiler specially-recognizes CompareExchange for nullability } } @@ -282,7 +283,8 @@ public void SetCompressedStack(CompressedStack stack) public static int VolatileRead(ref int address) => Volatile.Read(ref address); public static long VolatileRead(ref long address) => Volatile.Read(ref address); public static IntPtr VolatileRead(ref IntPtr address) => Volatile.Read(ref address); - public static object? VolatileRead(ref object? address) => Volatile.Read(ref address); // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + [return: NotNullIfNotNull("address")] + public static object? VolatileRead(ref object? address) => Volatile.Read(ref address); [CLSCompliant(false)] public static sbyte VolatileRead(ref sbyte address) => Volatile.Read(ref address); public static float VolatileRead(ref float address) => Volatile.Read(ref address); @@ -300,7 +302,7 @@ public void SetCompressedStack(CompressedStack stack) public static void VolatileWrite(ref int address, int value) => Volatile.Write(ref address, value); public static void VolatileWrite(ref long address, long value) => Volatile.Write(ref address, value); public static void VolatileWrite(ref IntPtr address, IntPtr value) => Volatile.Write(ref address, value); - public static void VolatileWrite(ref object? address, object? value) => Volatile.Write(ref address, value); + public static void VolatileWrite([NotNullIfNotNull("value")] ref object? address, object? value) => Volatile.Write(ref address, value); [CLSCompliant(false)] public static void VolatileWrite(ref sbyte address, sbyte value) => Volatile.Write(ref address, value); public static void VolatileWrite(ref float address, float value) => Volatile.Write(ref address, value); diff --git a/src/Common/src/CoreLib/System/Threading/ThreadLocal.cs b/src/Common/src/CoreLib/System/Threading/ThreadLocal.cs index f57afb9d77e1..1126ea3bf1fa 100644 --- a/src/Common/src/CoreLib/System/Threading/ThreadLocal.cs +++ b/src/Common/src/CoreLib/System/Threading/ThreadLocal.cs @@ -4,6 +4,7 @@ using System.Collections.Generic; using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; // A class that provides a simple, lightweight implementation of thread-local lazy-initialization, where a value is initialized once per accessing // thread; this provides an alternative to using a ThreadStatic static variable and having @@ -201,7 +202,7 @@ protected virtual void Dispose(bool disposing) // And clear the references from the slot table to the linked slot and the value so that // both can get garbage collected. - slotArray[id].Value!._value = default!; // TODO-NULLABLE-GENERIC + slotArray[id].Value!._value = default!; // TODO-NULLABLE: Remove ! when nullable attributes are respected slotArray[id].Value = null; } } @@ -248,6 +249,7 @@ protected virtual void Dispose(bool disposing) /// will be used. /// [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [MaybeNull] public T Value { get @@ -304,6 +306,7 @@ public T Value } } + [return: MaybeNull] private T GetValueSlow() { // If the object has been disposed, the id will be -1. @@ -319,7 +322,7 @@ private T GetValueSlow() T value; if (_valueFactory == null) { - value = default!; // TODO-NULLABLE-GENERIC + value = default!; } else { @@ -466,7 +469,7 @@ public IList Values { // We can safely read linkedSlot.Value. Even if this ThreadLocal has been disposed in the meantime, the LinkedSlot // objects will never be assigned to another ThreadLocal instance. - valueList.Add(linkedSlot._value); + valueList.Add(linkedSlot._value!); } return valueList; @@ -493,7 +496,7 @@ internal IEnumerable ValuesAsEnumerable { // We can safely read linkedSlot.Value. Even if this ThreadLocal has been disposed in the meantime, the LinkedSlot // objects will never be assigned to another ThreadLocal instance. - yield return linkedSlot._value; + yield return linkedSlot._value!; } } } @@ -536,6 +539,7 @@ public bool IsValueCreated /// Gets the value of the ThreadLocal<T> for debugging display purposes. It takes care of getting /// the value for the current thread in the ThreadLocal mode. + [MaybeNull] internal T ValueForDebugDisplay { get @@ -545,7 +549,7 @@ internal T ValueForDebugDisplay LinkedSlot? slot; if (slotArray == null || id >= slotArray.Length || (slot = slotArray[id].Value) == null || !_initialized) - return default!; // TODO-NULLABLE-GENERIC + return default!; return slot._value; } } @@ -671,7 +675,7 @@ internal LinkedSlot(LinkedSlotVolatile[]? slotArray) internal volatile LinkedSlotVolatile[]? _slotArray; // The value for this slot. - internal T _value = default!; // TODO-NULLABLE-GENERIC + [AllowNull, MaybeNull] internal T _value = default!; // TODO-NULLABLE: Remove ! when nullable attributes are respected } /// diff --git a/src/Common/src/CoreLib/System/Threading/Timer.cs b/src/Common/src/CoreLib/System/Threading/Timer.cs index 8789065390a6..be94ccbb997e 100644 --- a/src/Common/src/CoreLib/System/Threading/Timer.cs +++ b/src/Common/src/CoreLib/System/Threading/Timer.cs @@ -612,7 +612,7 @@ internal void SignalNoCallbacksRunning() if (toSignal is WaitHandle wh) { - EventWaitHandle.Set(wh.SafeWaitHandle!); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/2384 + EventWaitHandle.Set(wh.SafeWaitHandle); } else { diff --git a/src/Common/src/CoreLib/System/Threading/Volatile.cs b/src/Common/src/CoreLib/System/Threading/Volatile.cs index 26d33a40a747..5c1df6374c80 100644 --- a/src/Common/src/CoreLib/System/Threading/Volatile.cs +++ b/src/Common/src/CoreLib/System/Threading/Volatile.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System.Diagnostics.CodeAnalysis; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using Internal.Runtime.CompilerServices; @@ -218,12 +219,13 @@ private struct VolatileObject { public volatile object? Value; } [Intrinsic] [NonVersionable] + [return: NotNullIfNotNull("location")] public static T Read(ref T location) where T : class? => Unsafe.As(Unsafe.As(ref location).Value); [Intrinsic] [NonVersionable] - public static void Write(ref T location, T value) where T : class? => + public static void Write([NotNullIfNotNull("value")] ref T location, T value) where T : class? => Unsafe.As(ref location).Value = value; #endregion } diff --git a/src/Common/src/CoreLib/System/Threading/WaitHandle.cs b/src/Common/src/CoreLib/System/Threading/WaitHandle.cs index 20aa3f76c20b..75965a3f0a7b 100644 --- a/src/Common/src/CoreLib/System/Threading/WaitHandle.cs +++ b/src/Common/src/CoreLib/System/Threading/WaitHandle.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using Microsoft.Win32.SafeHandles; namespace System.Threading @@ -78,7 +79,8 @@ public virtual IntPtr Handle } } - public SafeWaitHandle? SafeWaitHandle // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/2384 + [AllowNull] + public SafeWaitHandle SafeWaitHandle { get { @@ -334,7 +336,7 @@ private static int WaitMultiple(ReadOnlySpan waitHandles, bool waitA { if (safeWaitHandles[i] != null) { - safeWaitHandles[i]!.DangerousRelease(); // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/34644 + safeWaitHandles[i]!.DangerousRelease(); // TODO-NULLABLE: Indexer nullability tracked (https://github.com/dotnet/roslyn/issues/34644) safeWaitHandles[i] = null; } } diff --git a/src/Common/src/CoreLib/System/ThrowHelper.cs b/src/Common/src/CoreLib/System/ThrowHelper.cs index f6805d8a3aaa..e79b785e66e3 100644 --- a/src/Common/src/CoreLib/System/ThrowHelper.cs +++ b/src/Common/src/CoreLib/System/ThrowHelper.cs @@ -38,6 +38,7 @@ using System.Buffers; using System.Collections.Generic; using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.Runtime.CompilerServices; using System.Runtime.Serialization; @@ -46,83 +47,98 @@ namespace System [StackTraceHidden] internal static class ThrowHelper { + [DoesNotReturn] internal static void ThrowArrayTypeMismatchException() { throw new ArrayTypeMismatchException(); } + [DoesNotReturn] internal static void ThrowInvalidTypeWithPointersNotSupported(Type targetType) { throw new ArgumentException(SR.Format(SR.Argument_InvalidTypeWithPointersNotSupported, targetType)); } + [DoesNotReturn] internal static void ThrowIndexOutOfRangeException() { throw new IndexOutOfRangeException(); } + [DoesNotReturn] internal static void ThrowArgumentOutOfRangeException() { throw new ArgumentOutOfRangeException(); } + [DoesNotReturn] internal static void ThrowArgumentException_DestinationTooShort() { throw new ArgumentException(SR.Argument_DestinationTooShort, "destination"); } + [DoesNotReturn] internal static void ThrowArgumentException_OverlapAlignmentMismatch() { throw new ArgumentException(SR.Argument_OverlapAlignmentMismatch); } + [DoesNotReturn] internal static void ThrowArgumentException_CannotExtractScalar(ExceptionArgument argument) { throw GetArgumentException(ExceptionResource.Argument_CannotExtractScalar, argument); } + [DoesNotReturn] internal static void ThrowArgumentOutOfRange_IndexException() { throw GetArgumentOutOfRangeException(ExceptionArgument.index, ExceptionResource.ArgumentOutOfRange_Index); } + [DoesNotReturn] internal static void ThrowIndexArgumentOutOfRange_NeedNonNegNumException() { throw GetArgumentOutOfRangeException(ExceptionArgument.index, ExceptionResource.ArgumentOutOfRange_NeedNonNegNum); } + [DoesNotReturn] internal static void ThrowValueArgumentOutOfRange_NeedNonNegNumException() { throw GetArgumentOutOfRangeException(ExceptionArgument.value, ExceptionResource.ArgumentOutOfRange_NeedNonNegNum); } + [DoesNotReturn] internal static void ThrowLengthArgumentOutOfRange_ArgumentOutOfRange_NeedNonNegNum() { throw GetArgumentOutOfRangeException(ExceptionArgument.length, ExceptionResource.ArgumentOutOfRange_NeedNonNegNum); } + [DoesNotReturn] internal static void ThrowStartIndexArgumentOutOfRange_ArgumentOutOfRange_Index() { throw GetArgumentOutOfRangeException(ExceptionArgument.startIndex, ExceptionResource.ArgumentOutOfRange_Index); } + [DoesNotReturn] internal static void ThrowCountArgumentOutOfRange_ArgumentOutOfRange_Count() { throw GetArgumentOutOfRangeException(ExceptionArgument.count, ExceptionResource.ArgumentOutOfRange_Count); } + [DoesNotReturn] internal static void ThrowWrongKeyTypeArgumentException(T key, Type targetType) { // Generic key to move the boxing to the right hand side of throw throw GetWrongKeyTypeArgumentException((object?)key, targetType); } + [DoesNotReturn] internal static void ThrowWrongValueTypeArgumentException(T value, Type targetType) { // Generic key to move the boxing to the right hand side of throw @@ -134,23 +150,27 @@ private static ArgumentException GetAddingDuplicateWithKeyArgumentException(obje return new ArgumentException(SR.Format(SR.Argument_AddingDuplicateWithKey, key)); } + [DoesNotReturn] internal static void ThrowAddingDuplicateWithKeyArgumentException(T key) { // Generic key to move the boxing to the right hand side of throw throw GetAddingDuplicateWithKeyArgumentException((object?)key); } + [DoesNotReturn] internal static void ThrowKeyNotFoundException(T key) { // Generic key to move the boxing to the right hand side of throw throw GetKeyNotFoundException((object?)key); } + [DoesNotReturn] internal static void ThrowArgumentException(ExceptionResource resource) { throw GetArgumentException(resource); } + [DoesNotReturn] internal static void ThrowArgumentException(ExceptionResource resource, ExceptionArgument argument) { throw GetArgumentException(resource, argument); @@ -161,171 +181,205 @@ private static ArgumentNullException GetArgumentNullException(ExceptionArgument return new ArgumentNullException(GetArgumentName(argument)); } + [DoesNotReturn] internal static void ThrowArgumentNullException(ExceptionArgument argument) { throw GetArgumentNullException(argument); } + [DoesNotReturn] internal static void ThrowArgumentNullException(ExceptionResource resource) { throw new ArgumentNullException(GetResourceString(resource)); } + [DoesNotReturn] internal static void ThrowArgumentNullException(ExceptionArgument argument, ExceptionResource resource) { throw new ArgumentNullException(GetArgumentName(argument), GetResourceString(resource)); } + [DoesNotReturn] internal static void ThrowArgumentOutOfRangeException(ExceptionArgument argument) { throw new ArgumentOutOfRangeException(GetArgumentName(argument)); } + [DoesNotReturn] internal static void ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource) { throw GetArgumentOutOfRangeException(argument, resource); } + [DoesNotReturn] internal static void ThrowArgumentOutOfRangeException(ExceptionArgument argument, int paramNumber, ExceptionResource resource) { throw GetArgumentOutOfRangeException(argument, paramNumber, resource); } + [DoesNotReturn] internal static void ThrowInvalidOperationException() { throw new InvalidOperationException(); } + [DoesNotReturn] internal static void ThrowInvalidOperationException(ExceptionResource resource) { throw GetInvalidOperationException(resource); } + [DoesNotReturn] internal static void ThrowInvalidOperationException_OutstandingReferences() { throw new InvalidOperationException(SR.Memory_OutstandingReferences); } + [DoesNotReturn] internal static void ThrowInvalidOperationException(ExceptionResource resource, Exception e) { throw new InvalidOperationException(GetResourceString(resource), e); } + [DoesNotReturn] internal static void ThrowSerializationException(ExceptionResource resource) { throw new SerializationException(GetResourceString(resource)); } + [DoesNotReturn] internal static void ThrowSecurityException(ExceptionResource resource) { throw new System.Security.SecurityException(GetResourceString(resource)); } + [DoesNotReturn] internal static void ThrowRankException(ExceptionResource resource) { throw new RankException(GetResourceString(resource)); } + [DoesNotReturn] internal static void ThrowNotSupportedException(ExceptionResource resource) { throw new NotSupportedException(GetResourceString(resource)); } + [DoesNotReturn] internal static void ThrowUnauthorizedAccessException(ExceptionResource resource) { throw new UnauthorizedAccessException(GetResourceString(resource)); } + [DoesNotReturn] internal static void ThrowObjectDisposedException(string objectName, ExceptionResource resource) { throw new ObjectDisposedException(objectName, GetResourceString(resource)); } + [DoesNotReturn] internal static void ThrowObjectDisposedException(ExceptionResource resource) { throw new ObjectDisposedException(null, GetResourceString(resource)); } + [DoesNotReturn] internal static void ThrowNotSupportedException() { throw new NotSupportedException(); } + [DoesNotReturn] internal static void ThrowAggregateException(List exceptions) { throw new AggregateException(exceptions); } + [DoesNotReturn] internal static void ThrowOutOfMemoryException() { throw new OutOfMemoryException(); } + [DoesNotReturn] internal static void ThrowArgumentException_Argument_InvalidArrayType() { throw new ArgumentException(SR.Argument_InvalidArrayType); } + [DoesNotReturn] internal static void ThrowInvalidOperationException_InvalidOperation_EnumNotStarted() { throw new InvalidOperationException(SR.InvalidOperation_EnumNotStarted); } + [DoesNotReturn] internal static void ThrowInvalidOperationException_InvalidOperation_EnumEnded() { throw new InvalidOperationException(SR.InvalidOperation_EnumEnded); } + [DoesNotReturn] internal static void ThrowInvalidOperationException_EnumCurrent(int index) { throw GetInvalidOperationException_EnumCurrent(index); } + [DoesNotReturn] internal static void ThrowInvalidOperationException_InvalidOperation_EnumFailedVersion() { throw new InvalidOperationException(SR.InvalidOperation_EnumFailedVersion); } + [DoesNotReturn] internal static void ThrowInvalidOperationException_InvalidOperation_EnumOpCantHappen() { throw new InvalidOperationException(SR.InvalidOperation_EnumOpCantHappen); } + [DoesNotReturn] internal static void ThrowInvalidOperationException_InvalidOperation_NoValue() { throw new InvalidOperationException(SR.InvalidOperation_NoValue); } + [DoesNotReturn] internal static void ThrowInvalidOperationException_ConcurrentOperationsNotSupported() { throw new InvalidOperationException(SR.InvalidOperation_ConcurrentOperationsNotSupported); } + [DoesNotReturn] internal static void ThrowInvalidOperationException_HandleIsNotInitialized() { throw new InvalidOperationException(SR.InvalidOperation_HandleIsNotInitialized); } + [DoesNotReturn] internal static void ThrowInvalidOperationException_HandleIsNotPinned() { throw new InvalidOperationException(SR.InvalidOperation_HandleIsNotPinned); } + [DoesNotReturn] internal static void ThrowArraySegmentCtorValidationFailedExceptions(Array? array, int offset, int count) { throw GetArraySegmentCtorValidationFailedException(array, offset, count); } + [DoesNotReturn] internal static void ThrowFormatException_BadFormatSpecifier() { throw new FormatException(SR.Argument_BadFormatSpecifier); } + [DoesNotReturn] internal static void ThrowArgumentOutOfRangeException_PrecisionTooLarge() { throw new ArgumentOutOfRangeException("precision", SR.Format(SR.Argument_PrecisionTooLarge, StandardFormat.MaxPrecision)); } + [DoesNotReturn] internal static void ThrowArgumentOutOfRangeException_SymbolDoesNotFit() { throw new ArgumentOutOfRangeException("symbol", SR.Argument_BadFormatSpecifier); @@ -399,7 +453,7 @@ private static InvalidOperationException GetInvalidOperationException_EnumCurren internal static void IfNullAndNullsAreIllegalThenThrow(object? value, ExceptionArgument argName) { // Note that default(T) is not equal to null for value types except when T is Nullable. - if (!(default(T)! == null) && value == null) // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/34757 + if (!(default(T)! == null) && value == null) // TODO-NULLABLE: default(T) == null warning (https://github.com/dotnet/roslyn/issues/34757) ThrowHelper.ThrowArgumentNullException(argName); } diff --git a/src/Common/src/CoreLib/System/TimeZone.cs b/src/Common/src/CoreLib/System/TimeZone.cs index b9dc233a62cb..0775e5b1fa04 100644 --- a/src/Common/src/CoreLib/System/TimeZone.cs +++ b/src/Common/src/CoreLib/System/TimeZone.cs @@ -42,7 +42,7 @@ private static object InternalSyncObject object o = new object(); Interlocked.CompareExchange(ref s_InternalSyncObject, o, null); } - return s_InternalSyncObject!; // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + return s_InternalSyncObject!; // TODO-NULLABLE: Remove ! when compiler specially-recognizes CompareExchange for nullability } } diff --git a/src/Common/src/CoreLib/System/TimeZoneInfo.AdjustmentRule.cs b/src/Common/src/CoreLib/System/TimeZoneInfo.AdjustmentRule.cs index 4ba7f28d91a9..a3ffb1c6a396 100644 --- a/src/Common/src/CoreLib/System/TimeZoneInfo.AdjustmentRule.cs +++ b/src/Common/src/CoreLib/System/TimeZoneInfo.AdjustmentRule.cs @@ -9,7 +9,7 @@ namespace System public sealed partial class TimeZoneInfo { [Serializable] - public sealed class AdjustmentRule : IEquatable, ISerializable, IDeserializationCallback + public sealed class AdjustmentRule : IEquatable, ISerializable, IDeserializationCallback { private static readonly TimeSpan DaylightDeltaAdjustment = TimeSpan.FromHours(24.0); private static readonly TimeSpan MaxDaylightDelta = TimeSpan.FromHours(12.0); @@ -44,7 +44,9 @@ public sealed class AdjustmentRule : IEquatable, ISerializable, (DaylightTransitionStart != default && DaylightTransitionStart.TimeOfDay != DateTime.MinValue) || (DaylightTransitionEnd != default && DaylightTransitionEnd.TimeOfDay != DateTime.MinValue.AddMilliseconds(1)); +#pragma warning disable CS8614 // TODO-NULLABLE: Covariant interface arguments (https://github.com/dotnet/roslyn/issues/35817) public bool Equals(AdjustmentRule? other) => +#pragma warning restore CS8614 other != null && _dateStart == other._dateStart && _dateEnd == other._dateEnd && diff --git a/src/Common/src/CoreLib/System/TimeZoneInfo.Unix.cs b/src/Common/src/CoreLib/System/TimeZoneInfo.Unix.cs index bc6ac4107b63..1187eb59efd2 100644 --- a/src/Common/src/CoreLib/System/TimeZoneInfo.Unix.cs +++ b/src/Common/src/CoreLib/System/TimeZoneInfo.Unix.cs @@ -5,11 +5,13 @@ using System.Buffers; using System.Collections.Generic; using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.IO; using System.Text; using System.Threading; using System.Security; +using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using Internal.IO; @@ -307,7 +309,7 @@ private static List GetTimeZoneIds(string timeZoneDirectory) /// 3. Look for the data in GetTimeZoneDirectory()/localtime. /// 4. Use UTC if all else fails. /// - private static bool TryGetLocalTzFile(out byte[]? rawData, out string? id) // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + private static bool TryGetLocalTzFile([NotNullWhen(true)] out byte[]? rawData, [NotNullWhen(true)] out string? id) { rawData = null; id = null; @@ -357,7 +359,7 @@ private static bool TryGetLocalTzFile(out byte[]? rawData, out string? id) // TO return result; } - private static bool TryLoadTzFile(string tzFilePath, ref byte[]? rawData, ref string? id) // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + private static bool TryLoadTzFile(string tzFilePath, [NotNullWhen(true)] ref byte[]? rawData, [NotNullWhen(true)] ref string? id) { if (File.Exists(tzFilePath)) { @@ -394,7 +396,7 @@ private static bool TryLoadTzFile(string tzFilePath, ref byte[]? rawData, ref st if (symlinkPath != null) { // symlinkPath can be relative path, use Path to get the full absolute path. - symlinkPath = Path.GetFullPath(symlinkPath, Path.GetDirectoryName(tzFilePath)!); // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + symlinkPath = Path.GetFullPath(symlinkPath, Path.GetDirectoryName(tzFilePath)!); // TODO-NULLABLE: Remove ! when nullable attributes are respected string timeZoneDirectory = GetTimeZoneDirectory(); if (symlinkPath.StartsWith(timeZoneDirectory, StringComparison.Ordinal)) @@ -614,9 +616,9 @@ private static TimeZoneInfo GetLocalTimeZoneFromTzFile() { byte[]? rawData; string? id; - if (TryGetLocalTzFile(out rawData, out id)) // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + if (TryGetLocalTzFile(out rawData, out id)) { - TimeZoneInfo? result = GetTimeZoneFromTzData(rawData!, id!); + TimeZoneInfo? result = GetTimeZoneFromTzData(rawData!, id!); // TODO-NULLABLE: Remove ! when nullable attributes are respected if (result != null) { return result; @@ -991,7 +993,7 @@ private static void TZif_GenerateAdjustmentRule(ref int index, TimeSpan timeZone { if (!IsValidAdjustmentRuleOffest(timeZoneBaseUtcOffset, r)) { - NormalizeAdjustmentRuleOffset(timeZoneBaseUtcOffset, ref r!); // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + NormalizeAdjustmentRuleOffset(timeZoneBaseUtcOffset, ref r!); // TODO-NULLABLE: Remove ! when nullable attributes are respected } rulesList.Add(r); diff --git a/src/Common/src/CoreLib/System/TimeZoneInfo.Win32.cs b/src/Common/src/CoreLib/System/TimeZoneInfo.Win32.cs index a261b75bd13b..e1cfe4e7ea1a 100644 --- a/src/Common/src/CoreLib/System/TimeZoneInfo.Win32.cs +++ b/src/Common/src/CoreLib/System/TimeZoneInfo.Win32.cs @@ -260,7 +260,7 @@ private static TimeZoneInfo GetLocalTimeZone(CachedData cachedData) if (TryGetTimeZone(dynamicTimeZoneKeyName, dynamicTimeZoneInformation.DynamicDaylightTimeDisabled != 0, out TimeZoneInfo? zone, out _, cachedData) == TimeZoneInfoResult.Success) { // successfully loaded the time zone from the registry - return zone!; // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + return zone!; } } @@ -274,7 +274,7 @@ private static TimeZoneInfo GetLocalTimeZone(CachedData cachedData) if (TryGetTimeZone(id, dstDisabled, out TimeZoneInfo? zone, out _, cachedData) == TimeZoneInfoResult.Success) { // successfully loaded the time zone from the registry - return zone!; // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + return zone!; } } @@ -352,7 +352,7 @@ public static TimeZoneInfo FindSystemTimeZoneById(string id) if (result == TimeZoneInfoResult.Success) { - return value!; // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + return value!; } else if (result == TimeZoneInfoResult.InvalidTimeZoneException) { @@ -563,8 +563,8 @@ private static bool TryCreateAdjustmentRules(string id, in REG_TZI_FORMAT defaul // read LastEntry {(yearN, 1, 1) - MaxValue } // read the FirstEntry and LastEntry key values (ex: "1980", "2038") - int first = (int)dynamicKey.GetValue(FirstEntryValue, -1)!; // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/34976 - int last = (int)dynamicKey.GetValue(LastEntryValue, -1)!; // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/34976 + int first = (int)dynamicKey.GetValue(FirstEntryValue, -1)!; // TODO-NULLABLE: Remove ! when nullable attributes are respected + int last = (int)dynamicKey.GetValue(LastEntryValue, -1)!; // TODO-NULLABLE: Remove ! when nullable attributes are respected if (first == -1 || last == -1 || first > last) { diff --git a/src/Common/src/CoreLib/System/TimeZoneInfo.cs b/src/Common/src/CoreLib/System/TimeZoneInfo.cs index cef843fef29a..768385cfb27e 100644 --- a/src/Common/src/CoreLib/System/TimeZoneInfo.cs +++ b/src/Common/src/CoreLib/System/TimeZoneInfo.cs @@ -5,6 +5,7 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Runtime.Serialization; using System.Threading; @@ -29,7 +30,7 @@ internal enum TimeZoneInfoOptions [Serializable] [System.Runtime.CompilerServices.TypeForwardedFrom("System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")] - public sealed partial class TimeZoneInfo : IEquatable, ISerializable, IDeserializationCallback + public sealed partial class TimeZoneInfo : IEquatable, ISerializable, IDeserializationCallback { private enum TimeZoneInfoResult { @@ -764,7 +765,9 @@ public static DateTime ConvertTimeToUtc(DateTime dateTime, TimeZoneInfo sourceTi /// Returns value equality. Equals does not compare any localizable /// String objects (DisplayName, StandardName, DaylightName). /// +#pragma warning disable CS8614 // TODO-NULLABLE: Covariant interface arguments (https://github.com/dotnet/roslyn/issues/35817) public bool Equals(TimeZoneInfo? other) => +#pragma warning restore CS8614 other != null && string.Equals(_id, other._id, StringComparison.OrdinalIgnoreCase) && HasSameRules(other); @@ -1902,17 +1905,17 @@ private static TimeZoneInfoResult TryGetTimeZoneFromLocalMachine(string id, bool // uses reference equality with the Utc object. if (!id.Equals(UtcId, StringComparison.OrdinalIgnoreCase)) { - cachedData._systemTimeZones.Add(id, match!); // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + cachedData._systemTimeZones.Add(id, match!); } - if (dstDisabled && match!._supportsDaylightSavingTime) // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + if (dstDisabled && match!._supportsDaylightSavingTime) { // we found a cache hit but we want a time zone without DST and this one has DST data value = CreateCustomTimeZone(match._id, match._baseUtcOffset, match._displayName, match._standardDisplayName); } else { - value = new TimeZoneInfo(match!._id, match._baseUtcOffset, match._displayName, match._standardDisplayName, // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + value = new TimeZoneInfo(match!._id, match._baseUtcOffset, match._displayName, match._standardDisplayName, match._daylightDisplayName, match._adjustmentRules, disableDaylightSavingTime: false); } } @@ -2017,7 +2020,7 @@ private static bool IsValidAdjustmentRuleOffest(TimeSpan baseUtcOffset, Adjustme /// This method should not be called at all but is here in case something changes in the future /// or if really old time zones are present on the OS (no combination is known at the moment) /// - private static void NormalizeAdjustmentRuleOffset(TimeSpan baseUtcOffset, ref AdjustmentRule adjustmentRule) + private static void NormalizeAdjustmentRuleOffset(TimeSpan baseUtcOffset, [NotNull] ref AdjustmentRule adjustmentRule) { // Certain time zones such as: // Time Zone start date end date offset diff --git a/src/Common/src/CoreLib/System/Tuple.cs b/src/Common/src/CoreLib/System/Tuple.cs index 6439720da756..034264df21af 100644 --- a/src/Common/src/CoreLib/System/Tuple.cs +++ b/src/Common/src/CoreLib/System/Tuple.cs @@ -156,7 +156,7 @@ public override int GetHashCode() int IStructuralEquatable.GetHashCode(IEqualityComparer comparer) { - return comparer.GetHashCode(m_Item1!); // TODO-NULLABLE-GENERIC + return comparer.GetHashCode(m_Item1!); } int ITupleInternal.GetHashCode(IEqualityComparer comparer) @@ -261,7 +261,7 @@ public override int GetHashCode() int IStructuralEquatable.GetHashCode(IEqualityComparer comparer) { - return Tuple.CombineHashCodes(comparer.GetHashCode(m_Item1!), comparer.GetHashCode(m_Item2!)); // TODO-NULLABLE-GENERIC + return Tuple.CombineHashCodes(comparer.GetHashCode(m_Item1!), comparer.GetHashCode(m_Item2!)); } int ITupleInternal.GetHashCode(IEqualityComparer comparer) @@ -379,7 +379,7 @@ public override int GetHashCode() int IStructuralEquatable.GetHashCode(IEqualityComparer comparer) { - return Tuple.CombineHashCodes(comparer.GetHashCode(m_Item1!), comparer.GetHashCode(m_Item2!), comparer.GetHashCode(m_Item3!)); // TODO-NULLABLE-GENERIC + return Tuple.CombineHashCodes(comparer.GetHashCode(m_Item1!), comparer.GetHashCode(m_Item2!), comparer.GetHashCode(m_Item3!)); } int ITupleInternal.GetHashCode(IEqualityComparer comparer) @@ -508,7 +508,7 @@ public override int GetHashCode() int IStructuralEquatable.GetHashCode(IEqualityComparer comparer) { - return Tuple.CombineHashCodes(comparer.GetHashCode(m_Item1!), comparer.GetHashCode(m_Item2!), comparer.GetHashCode(m_Item3!), comparer.GetHashCode(m_Item4!)); // TODO-NULLABLE-GENERIC + return Tuple.CombineHashCodes(comparer.GetHashCode(m_Item1!), comparer.GetHashCode(m_Item2!), comparer.GetHashCode(m_Item3!), comparer.GetHashCode(m_Item4!)); } int ITupleInternal.GetHashCode(IEqualityComparer comparer) @@ -648,7 +648,7 @@ public override int GetHashCode() int IStructuralEquatable.GetHashCode(IEqualityComparer comparer) { - return Tuple.CombineHashCodes(comparer.GetHashCode(m_Item1!), comparer.GetHashCode(m_Item2!), comparer.GetHashCode(m_Item3!), comparer.GetHashCode(m_Item4!), comparer.GetHashCode(m_Item5!)); // TODO-NULLABLE-GENERIC + return Tuple.CombineHashCodes(comparer.GetHashCode(m_Item1!), comparer.GetHashCode(m_Item2!), comparer.GetHashCode(m_Item3!), comparer.GetHashCode(m_Item4!), comparer.GetHashCode(m_Item5!)); } int ITupleInternal.GetHashCode(IEqualityComparer comparer) @@ -799,7 +799,7 @@ public override int GetHashCode() int IStructuralEquatable.GetHashCode(IEqualityComparer comparer) { - return Tuple.CombineHashCodes(comparer.GetHashCode(m_Item1!), comparer.GetHashCode(m_Item2!), comparer.GetHashCode(m_Item3!), comparer.GetHashCode(m_Item4!), comparer.GetHashCode(m_Item5!), comparer.GetHashCode(m_Item6!)); // TODO-NULLABLE-GENERIC + return Tuple.CombineHashCodes(comparer.GetHashCode(m_Item1!), comparer.GetHashCode(m_Item2!), comparer.GetHashCode(m_Item3!), comparer.GetHashCode(m_Item4!), comparer.GetHashCode(m_Item5!), comparer.GetHashCode(m_Item6!)); } int ITupleInternal.GetHashCode(IEqualityComparer comparer) @@ -961,7 +961,7 @@ public override int GetHashCode() int IStructuralEquatable.GetHashCode(IEqualityComparer comparer) { - return Tuple.CombineHashCodes(comparer.GetHashCode(m_Item1!), comparer.GetHashCode(m_Item2!), comparer.GetHashCode(m_Item3!), comparer.GetHashCode(m_Item4!), comparer.GetHashCode(m_Item5!), comparer.GetHashCode(m_Item6!), comparer.GetHashCode(m_Item7!)); // TODO-NULLABLE-GENERIC + return Tuple.CombineHashCodes(comparer.GetHashCode(m_Item1!), comparer.GetHashCode(m_Item2!), comparer.GetHashCode(m_Item3!), comparer.GetHashCode(m_Item4!), comparer.GetHashCode(m_Item5!), comparer.GetHashCode(m_Item6!), comparer.GetHashCode(m_Item7!)); } int ITupleInternal.GetHashCode(IEqualityComparer comparer) @@ -1031,7 +1031,7 @@ string ITupleInternal.ToString(StringBuilder sb) [Serializable] [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")] - public class Tuple : IStructuralEquatable, IStructuralComparable, IComparable, ITupleInternal, ITuple + public class Tuple : IStructuralEquatable, IStructuralComparable, IComparable, ITupleInternal, ITuple where TRest : object { private readonly T1 m_Item1; // Do not rename (binary serialization) private readonly T2 m_Item2; // Do not rename (binary serialization) @@ -1140,7 +1140,7 @@ public override int GetHashCode() int IStructuralEquatable.GetHashCode(IEqualityComparer comparer) { // We want to have a limited hash in this case. We'll use the last 8 elements of the tuple - ITupleInternal t = (ITupleInternal)m_Rest!; // TODO-NULLABLE-GENERIC + ITupleInternal t = (ITupleInternal)m_Rest; if (t.Length >= 8) { return t.GetHashCode(comparer); } // In this case, the rest memeber has less than 8 elements so we need to combine some our elements with the elements in rest @@ -1148,19 +1148,19 @@ int IStructuralEquatable.GetHashCode(IEqualityComparer comparer) switch (k) { case 1: - return Tuple.CombineHashCodes(comparer.GetHashCode(m_Item7!), t.GetHashCode(comparer)); // TODO-NULLABLE-GENERIC + return Tuple.CombineHashCodes(comparer.GetHashCode(m_Item7!), t.GetHashCode(comparer)); case 2: - return Tuple.CombineHashCodes(comparer.GetHashCode(m_Item6!), comparer.GetHashCode(m_Item7!), t.GetHashCode(comparer)); // TODO-NULLABLE-GENERIC + return Tuple.CombineHashCodes(comparer.GetHashCode(m_Item6!), comparer.GetHashCode(m_Item7!), t.GetHashCode(comparer)); case 3: - return Tuple.CombineHashCodes(comparer.GetHashCode(m_Item5!), comparer.GetHashCode(m_Item6!), comparer.GetHashCode(m_Item7!), t.GetHashCode(comparer)); // TODO-NULLABLE-GENERIC + return Tuple.CombineHashCodes(comparer.GetHashCode(m_Item5!), comparer.GetHashCode(m_Item6!), comparer.GetHashCode(m_Item7!), t.GetHashCode(comparer)); case 4: - return Tuple.CombineHashCodes(comparer.GetHashCode(m_Item4!), comparer.GetHashCode(m_Item5!), comparer.GetHashCode(m_Item6!), comparer.GetHashCode(m_Item7!), t.GetHashCode(comparer)); // TODO-NULLABLE-GENERIC + return Tuple.CombineHashCodes(comparer.GetHashCode(m_Item4!), comparer.GetHashCode(m_Item5!), comparer.GetHashCode(m_Item6!), comparer.GetHashCode(m_Item7!), t.GetHashCode(comparer)); case 5: - return Tuple.CombineHashCodes(comparer.GetHashCode(m_Item3!), comparer.GetHashCode(m_Item4!), comparer.GetHashCode(m_Item5!), comparer.GetHashCode(m_Item6!), comparer.GetHashCode(m_Item7!), t.GetHashCode(comparer)); // TODO-NULLABLE-GENERIC + return Tuple.CombineHashCodes(comparer.GetHashCode(m_Item3!), comparer.GetHashCode(m_Item4!), comparer.GetHashCode(m_Item5!), comparer.GetHashCode(m_Item6!), comparer.GetHashCode(m_Item7!), t.GetHashCode(comparer)); case 6: - return Tuple.CombineHashCodes(comparer.GetHashCode(m_Item2!), comparer.GetHashCode(m_Item3!), comparer.GetHashCode(m_Item4!), comparer.GetHashCode(m_Item5!), comparer.GetHashCode(m_Item6!), comparer.GetHashCode(m_Item7!), t.GetHashCode(comparer)); // TODO-NULLABLE-GENERIC + return Tuple.CombineHashCodes(comparer.GetHashCode(m_Item2!), comparer.GetHashCode(m_Item3!), comparer.GetHashCode(m_Item4!), comparer.GetHashCode(m_Item5!), comparer.GetHashCode(m_Item6!), comparer.GetHashCode(m_Item7!), t.GetHashCode(comparer)); case 7: - return Tuple.CombineHashCodes(comparer.GetHashCode(m_Item1!), comparer.GetHashCode(m_Item2!), comparer.GetHashCode(m_Item3!), comparer.GetHashCode(m_Item4!), comparer.GetHashCode(m_Item5!), comparer.GetHashCode(m_Item6!), comparer.GetHashCode(m_Item7!), t.GetHashCode(comparer)); // TODO-NULLABLE-GENERIC + return Tuple.CombineHashCodes(comparer.GetHashCode(m_Item1!), comparer.GetHashCode(m_Item2!), comparer.GetHashCode(m_Item3!), comparer.GetHashCode(m_Item4!), comparer.GetHashCode(m_Item5!), comparer.GetHashCode(m_Item6!), comparer.GetHashCode(m_Item7!), t.GetHashCode(comparer)); } Debug.Fail("Missed all cases for computing Tuple hash code"); return -1; @@ -1193,7 +1193,7 @@ string ITupleInternal.ToString(StringBuilder sb) sb.Append(", "); sb.Append(m_Item7); sb.Append(", "); - return ((ITupleInternal)m_Rest!).ToString(sb); // TODO-NULLABLE-GENERIC + return ((ITupleInternal)m_Rest).ToString(sb); } /// @@ -1203,7 +1203,7 @@ int ITuple.Length { get { - return 7 + ((ITupleInternal)Rest!).Length; // TODO-NULLABLE-GENERIC + return 7 + ((ITupleInternal)Rest).Length; } } @@ -1232,7 +1232,7 @@ int ITuple.Length return Item7; } - return ((ITupleInternal)Rest!)[index - 7]; // TODO-NULLABLE-GENERIC + return ((ITupleInternal)Rest)[index - 7]; } } } diff --git a/src/Common/src/CoreLib/System/Type.Helpers.cs b/src/Common/src/CoreLib/System/Type.Helpers.cs index 0e871c675517..0f171eca2556 100644 --- a/src/Common/src/CoreLib/System/Type.Helpers.cs +++ b/src/Common/src/CoreLib/System/Type.Helpers.cs @@ -135,7 +135,7 @@ public virtual Type[] FindInterfaces(TypeFilter filter, object filterCriteria) for (int i = 0; i < c.Length; i++) { if (c[i] != null) - ret[cnt++] = c[i]!; // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/34644 + ret[cnt++] = c[i]!; // TODO-NULLABLE: Indexer nullability tracked (https://github.com/dotnet/roslyn/issues/34644) } return ret; } @@ -270,7 +270,7 @@ public virtual MemberInfo[] FindMembers(MemberTypes memberType, BindingFlags bin { for (i = 0; i < m.Length; i++) if (m[i] != null) - ret[cnt++] = m[i]!; // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/34644 + ret[cnt++] = m[i]!; // TODO-NULLABLE: Indexer nullability tracked (https://github.com/dotnet/roslyn/issues/34644) } // Copy the Constructors @@ -278,7 +278,7 @@ public virtual MemberInfo[] FindMembers(MemberTypes memberType, BindingFlags bin { for (i = 0; i < c.Length; i++) if (c[i] != null) - ret[cnt++] = c[i]!; // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/34644 + ret[cnt++] = c[i]!; // TODO-NULLABLE: Indexer nullability tracked (https://github.com/dotnet/roslyn/issues/34644) } // Copy the Fields @@ -286,7 +286,7 @@ public virtual MemberInfo[] FindMembers(MemberTypes memberType, BindingFlags bin { for (i = 0; i < f.Length; i++) if (f[i] != null) - ret[cnt++] = f[i]!; // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/34644 + ret[cnt++] = f[i]!; // TODO-NULLABLE: Indexer nullability tracked (https://github.com/dotnet/roslyn/issues/34644) } // Copy the Properties @@ -294,7 +294,7 @@ public virtual MemberInfo[] FindMembers(MemberTypes memberType, BindingFlags bin { for (i = 0; i < p.Length; i++) if (p[i] != null) - ret[cnt++] = p[i]!; // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/34644 + ret[cnt++] = p[i]!; // TODO-NULLABLE: Indexer nullability tracked (https://github.com/dotnet/roslyn/issues/34644) } // Copy the Events @@ -302,7 +302,7 @@ public virtual MemberInfo[] FindMembers(MemberTypes memberType, BindingFlags bin { for (i = 0; i < e.Length; i++) if (e[i] != null) - ret[cnt++] = e[i]!; // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/34644 + ret[cnt++] = e[i]!; // TODO-NULLABLE: Indexer nullability tracked (https://github.com/dotnet/roslyn/issues/34644) } // Copy the Types @@ -310,7 +310,7 @@ public virtual MemberInfo[] FindMembers(MemberTypes memberType, BindingFlags bin { for (i = 0; i < t.Length; i++) if (t[i] != null) - ret[cnt++] = t[i]!; // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/34644 + ret[cnt++] = t[i]!; // TODO-NULLABLE: Indexer nullability tracked (https://github.com/dotnet/roslyn/issues/34644) } return ret; diff --git a/src/Common/src/CoreLib/System/ValueTuple.cs b/src/Common/src/CoreLib/System/ValueTuple.cs index 72c13b530749..774f3e3d2ccd 100644 --- a/src/Common/src/CoreLib/System/ValueTuple.cs +++ b/src/Common/src/CoreLib/System/ValueTuple.cs @@ -411,12 +411,12 @@ public override int GetHashCode() int IStructuralEquatable.GetHashCode(IEqualityComparer comparer) { - return comparer.GetHashCode(Item1!); // TODO-NULLABLE-GENERIC + return comparer.GetHashCode(Item1!); } int IValueTupleInternal.GetHashCode(IEqualityComparer comparer) { - return comparer.GetHashCode(Item1!); // TODO-NULLABLE-GENERIC + return comparer.GetHashCode(Item1!); } /// @@ -616,7 +616,7 @@ int IStructuralEquatable.GetHashCode(IEqualityComparer comparer) private int GetHashCodeCore(IEqualityComparer comparer) { return ValueTuple.CombineHashCodes(comparer.GetHashCode(Item1!), - comparer.GetHashCode(Item2!)); // TODO-NULLABLE-GENERIC + comparer.GetHashCode(Item2!)); } int IValueTupleInternal.GetHashCode(IEqualityComparer comparer) @@ -824,7 +824,7 @@ private int GetHashCodeCore(IEqualityComparer comparer) { return ValueTuple.CombineHashCodes(comparer.GetHashCode(Item1!), comparer.GetHashCode(Item2!), - comparer.GetHashCode(Item3!)); // TODO-NULLABLE-GENERIC + comparer.GetHashCode(Item3!)); } int IValueTupleInternal.GetHashCode(IEqualityComparer comparer) @@ -1049,7 +1049,7 @@ private int GetHashCodeCore(IEqualityComparer comparer) return ValueTuple.CombineHashCodes(comparer.GetHashCode(Item1!), comparer.GetHashCode(Item2!), comparer.GetHashCode(Item3!), - comparer.GetHashCode(Item4!)); // TODO-NULLABLE-GENERIC + comparer.GetHashCode(Item4!)); } int IValueTupleInternal.GetHashCode(IEqualityComparer comparer) @@ -1293,7 +1293,7 @@ private int GetHashCodeCore(IEqualityComparer comparer) comparer.GetHashCode(Item2!), comparer.GetHashCode(Item3!), comparer.GetHashCode(Item4!), - comparer.GetHashCode(Item5!)); // TODO-NULLABLE-GENERIC + comparer.GetHashCode(Item5!)); } int IValueTupleInternal.GetHashCode(IEqualityComparer comparer) @@ -1556,7 +1556,7 @@ private int GetHashCodeCore(IEqualityComparer comparer) comparer.GetHashCode(Item3!), comparer.GetHashCode(Item4!), comparer.GetHashCode(Item5!), - comparer.GetHashCode(Item6!)); // TODO-NULLABLE-GENERIC + comparer.GetHashCode(Item6!)); } int IValueTupleInternal.GetHashCode(IEqualityComparer comparer) @@ -1838,7 +1838,7 @@ private int GetHashCodeCore(IEqualityComparer comparer) comparer.GetHashCode(Item4!), comparer.GetHashCode(Item5!), comparer.GetHashCode(Item6!), - comparer.GetHashCode(Item7!)); // TODO-NULLABLE-GENERIC + comparer.GetHashCode(Item7!)); } int IValueTupleInternal.GetHashCode(IEqualityComparer comparer) @@ -2203,7 +2203,7 @@ private int GetHashCodeCore(IEqualityComparer comparer) { return ValueTuple.CombineHashCodes(comparer.GetHashCode(Item1!), comparer.GetHashCode(Item2!), comparer.GetHashCode(Item3!), comparer.GetHashCode(Item4!), comparer.GetHashCode(Item5!), comparer.GetHashCode(Item6!), - comparer.GetHashCode(Item7!)); // TODO-NULLABLE-GENERIC + comparer.GetHashCode(Item7!)); } int size = rest.Length; @@ -2214,27 +2214,27 @@ private int GetHashCodeCore(IEqualityComparer comparer) switch (k) { case 1: - return ValueTuple.CombineHashCodes(comparer.GetHashCode(Item7!), rest.GetHashCode(comparer)); // TODO-NULLABLE-GENERIC + return ValueTuple.CombineHashCodes(comparer.GetHashCode(Item7!), rest.GetHashCode(comparer)); case 2: - return ValueTuple.CombineHashCodes(comparer.GetHashCode(Item6!), comparer.GetHashCode(Item7!), rest.GetHashCode(comparer)); // TODO-NULLABLE-GENERIC + return ValueTuple.CombineHashCodes(comparer.GetHashCode(Item6!), comparer.GetHashCode(Item7!), rest.GetHashCode(comparer)); case 3: return ValueTuple.CombineHashCodes(comparer.GetHashCode(Item5!), comparer.GetHashCode(Item6!), comparer.GetHashCode(Item7!), - rest.GetHashCode(comparer)); // TODO-NULLABLE-GENERIC + rest.GetHashCode(comparer)); case 4: return ValueTuple.CombineHashCodes(comparer.GetHashCode(Item4!), comparer.GetHashCode(Item5!), comparer.GetHashCode(Item6!), - comparer.GetHashCode(Item7!), rest.GetHashCode(comparer)); // TODO-NULLABLE-GENERIC + comparer.GetHashCode(Item7!), rest.GetHashCode(comparer)); case 5: return ValueTuple.CombineHashCodes(comparer.GetHashCode(Item3!), comparer.GetHashCode(Item4!), comparer.GetHashCode(Item5!), - comparer.GetHashCode(Item6!), comparer.GetHashCode(Item7!), rest.GetHashCode(comparer)); // TODO-NULLABLE-GENERIC + comparer.GetHashCode(Item6!), comparer.GetHashCode(Item7!), rest.GetHashCode(comparer)); case 6: return ValueTuple.CombineHashCodes(comparer.GetHashCode(Item2!), comparer.GetHashCode(Item3!), comparer.GetHashCode(Item4!), comparer.GetHashCode(Item5!), comparer.GetHashCode(Item6!), comparer.GetHashCode(Item7!), - rest.GetHashCode(comparer)); // TODO-NULLABLE-GENERIC + rest.GetHashCode(comparer)); case 7: case 8: return ValueTuple.CombineHashCodes(comparer.GetHashCode(Item1!), comparer.GetHashCode(Item2!), comparer.GetHashCode(Item3!), comparer.GetHashCode(Item4!), comparer.GetHashCode(Item5!), comparer.GetHashCode(Item6!), - comparer.GetHashCode(Item7!), rest.GetHashCode(comparer)); // TODO-NULLABLE-GENERIC + comparer.GetHashCode(Item7!), rest.GetHashCode(comparer)); } Debug.Fail("Missed all cases for computing ValueTuple hash code"); diff --git a/src/Common/src/CoreLib/System/Version.cs b/src/Common/src/CoreLib/System/Version.cs index 3b8d1cbae01c..b3e770c1dcdc 100644 --- a/src/Common/src/CoreLib/System/Version.cs +++ b/src/Common/src/CoreLib/System/Version.cs @@ -6,6 +6,7 @@ using System.Diagnostics; using System.Text; using System.Runtime.CompilerServices; +using System.Diagnostics.CodeAnalysis; namespace System { @@ -17,7 +18,7 @@ namespace System [Serializable] [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")] - public sealed class Version : ICloneable, IComparable, IComparable, IEquatable, ISpanFormattable + public sealed class Version : ICloneable, IComparable, IComparable, IEquatable, ISpanFormattable { // AssemblyName depends on the order staying the same private readonly int _Major; // Do not rename (binary serialization) @@ -167,7 +168,9 @@ public override bool Equals(object? obj) return Equals(obj as Version); } +#pragma warning disable CS8614 // TODO-NULLABLE: Covariant interface arguments (https://github.com/dotnet/roslyn/issues/35817) public bool Equals(Version? obj) +#pragma warning restore CS8614 { return object.ReferenceEquals(obj, this) || (!(obj is null) && @@ -306,7 +309,7 @@ public static Version Parse(string input) public static Version Parse(ReadOnlySpan input) => ParseVersion(input, throwOnFailure: true)!; - public static bool TryParse(string? input, out Version? result) // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + public static bool TryParse(string? input, [NotNullWhen(true)] out Version? result) { if (input == null) { @@ -317,7 +320,7 @@ public static bool TryParse(string? input, out Version? result) // TODO-NULLABLE return (result = ParseVersion(input.AsSpan(), throwOnFailure: false)) != null; } - public static bool TryParse(ReadOnlySpan input, out Version? result) => + public static bool TryParse(ReadOnlySpan input, [NotNullWhen(true)] out Version? result) => (result = ParseVersion(input, throwOnFailure: false)) != null; private static Version? ParseVersion(ReadOnlySpan input, bool throwOnFailure) diff --git a/src/Common/src/CoreLib/System/WinRTFolderPaths.cs b/src/Common/src/CoreLib/System/WinRTFolderPaths.cs index a833f55f79ff..b0986dab0909 100644 --- a/src/Common/src/CoreLib/System/WinRTFolderPaths.cs +++ b/src/Common/src/CoreLib/System/WinRTFolderPaths.cs @@ -130,7 +130,7 @@ private static string GetFolderPathCoreFallBack(SpecialFolder folder) case SpecialFolder.System: return SystemDirectory; case SpecialFolder.Windows: - return Path.GetDirectoryName(SystemDirectory)!; // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761 + return Path.GetDirectoryName(SystemDirectory)!; // TODO-NULLABLE: Remove ! when nullable attributes are respected default: return string.Empty; } From b2097cbdcb26f7f317252334ddcce101a20b7f3d Mon Sep 17 00:00:00 2001 From: Stephen Toub Date: Thu, 30 May 2019 01:05:11 -0400 Subject: [PATCH 560/607] Handle nullable attributes on platforms that lack them --- .../CodeAnalysis/NullableAttributes.cs | 63 ++++++++++++++++--- ...gnostics.Tracing.EventSource.Redist.csproj | 3 +- .../src/Microsoft.IO.Redist.csproj | 5 +- .../src/System.Data.SqlClient.csproj | 6 ++ .../src/System.Resources.Extensions.csproj | 5 +- .../src/System.Runtime.Extensions.csproj | 6 ++ 6 files changed, 75 insertions(+), 13 deletions(-) diff --git a/src/Common/src/CoreLib/System/Diagnostics/CodeAnalysis/NullableAttributes.cs b/src/Common/src/CoreLib/System/Diagnostics/CodeAnalysis/NullableAttributes.cs index 640ff8f35829..3770a5ff0ba2 100644 --- a/src/Common/src/CoreLib/System/Diagnostics/CodeAnalysis/NullableAttributes.cs +++ b/src/Common/src/CoreLib/System/Diagnostics/CodeAnalysis/NullableAttributes.cs @@ -6,23 +6,48 @@ namespace System.Diagnostics.CodeAnalysis { /// Specifies that null is allowed as an input even if the corresponding type disallows it. [AttributeUsage(AttributeTargets.Field | AttributeTargets.Parameter | AttributeTargets.Property, Inherited = false)] - public sealed class AllowNullAttribute : Attribute { } +#if INTERNAL_NULLABLE_ATTRIBUTES + internal +#else + public +#endif + sealed class AllowNullAttribute : Attribute { } /// Specifies that null is disallowed as an input even if the corresponding type allows it. [AttributeUsage(AttributeTargets.Field | AttributeTargets.Parameter | AttributeTargets.Property, Inherited = false)] - public sealed class DisallowNullAttribute : Attribute { } +#if INTERNAL_NULLABLE_ATTRIBUTES + internal +#else + public +#endif + sealed class DisallowNullAttribute : Attribute { } /// Specifies that an output may be null even if the corresponding type disallows it. [AttributeUsage(AttributeTargets.Field | AttributeTargets.Parameter | AttributeTargets.Property | AttributeTargets.ReturnValue, Inherited = false)] - public sealed class MaybeNullAttribute : Attribute { } +#if INTERNAL_NULLABLE_ATTRIBUTES + internal +#else + public +#endif + sealed class MaybeNullAttribute : Attribute { } /// Specifies that an output will not be null even if the corresponding type allows it. [AttributeUsage(AttributeTargets.Field | AttributeTargets.Parameter | AttributeTargets.Property | AttributeTargets.ReturnValue, Inherited = false)] - public sealed class NotNullAttribute : Attribute { } +#if INTERNAL_NULLABLE_ATTRIBUTES + internal +#else + public +#endif + sealed class NotNullAttribute : Attribute { } /// Specifies that when a method returns , the parameter may be null even if the corresponding type disallows it. [AttributeUsage(AttributeTargets.Parameter, Inherited = false)] - public sealed class MaybeNullWhenAttribute : Attribute +#if INTERNAL_NULLABLE_ATTRIBUTES + internal +#else + public +#endif + sealed class MaybeNullWhenAttribute : Attribute { /// Initializes the attribute with the specified return value condition. /// @@ -36,7 +61,12 @@ public sealed class MaybeNullWhenAttribute : Attribute /// Specifies that when a method returns , the parameter will not be null even if the corresponding type allows it. [AttributeUsage(AttributeTargets.Parameter, Inherited = false)] - public sealed class NotNullWhenAttribute : Attribute +#if INTERNAL_NULLABLE_ATTRIBUTES + internal +#else + public +#endif + sealed class NotNullWhenAttribute : Attribute { /// Initializes the attribute with the specified return value condition. /// @@ -50,7 +80,12 @@ public sealed class NotNullWhenAttribute : Attribute /// Specifies that the output will be non-null if the named parameter is non-null. [AttributeUsage(AttributeTargets.Parameter | AttributeTargets.Property | AttributeTargets.ReturnValue, AllowMultiple = true, Inherited = false)] - public sealed class NotNullIfNotNullAttribute : Attribute +#if INTERNAL_NULLABLE_ATTRIBUTES + internal +#else + public +#endif + sealed class NotNullIfNotNullAttribute : Attribute { /// Initializes the attribute with the associated parameter name. /// @@ -64,11 +99,21 @@ public sealed class NotNullIfNotNullAttribute : Attribute /// Applied to a method that will never return under any circumstance. [AttributeUsage(AttributeTargets.Method, Inherited = false)] - public sealed class DoesNotReturnAttribute : Attribute { } +#if INTERNAL_NULLABLE_ATTRIBUTES + internal +#else + public +#endif + sealed class DoesNotReturnAttribute : Attribute { } /// Specifies that the method will not return if the associated Boolean parameter is passed the specified value. [AttributeUsage(AttributeTargets.Parameter, Inherited = false)] - public sealed class DoesNotReturnIfAttribute : Attribute +#if INTERNAL_NULLABLE_ATTRIBUTES + internal +#else + public +#endif + sealed class DoesNotReturnIfAttribute : Attribute { /// Initializes the attribute with the specified parameter value. /// diff --git a/src/Microsoft.Diagnostics.Tracing.EventSource.Redist/src/Microsoft.Diagnostics.Tracing.EventSource.Redist.csproj b/src/Microsoft.Diagnostics.Tracing.EventSource.Redist/src/Microsoft.Diagnostics.Tracing.EventSource.Redist.csproj index dff57bcfb34f..91dae1bd04eb 100644 --- a/src/Microsoft.Diagnostics.Tracing.EventSource.Redist/src/Microsoft.Diagnostics.Tracing.EventSource.Redist.csproj +++ b/src/Microsoft.Diagnostics.Tracing.EventSource.Redist/src/Microsoft.Diagnostics.Tracing.EventSource.Redist.csproj @@ -3,7 +3,7 @@ Microsoft.Diagnostics.Tracing.EventSource {0CAF38F5-C7E7-46F2-8F39-C5D57492FF7F} $(NoWarn);CS1573 - $(DefineConstants);NO_EVENTCOMMANDEXECUTED_SUPPORT;ES_BUILD_STANDALONE;FEATURE_MANAGED_ETW;PLATFORM_WINDOWS + $(DefineConstants);NO_EVENTCOMMANDEXECUTED_SUPPORT;ES_BUILD_STANDALONE;FEATURE_MANAGED_ETW;PLATFORM_WINDOWS;INTERNAL_NULLABLE_ATTRIBUTES net461-Windows_NT-Debug;net461-Windows_NT-Release;netfx-Windows_NT-Debug;netfx-Windows_NT-Release enable @@ -25,6 +25,7 @@ + diff --git a/src/Microsoft.IO.Redist/src/Microsoft.IO.Redist.csproj b/src/Microsoft.IO.Redist/src/Microsoft.IO.Redist.csproj index 3de37e64d32c..3d4a0eaf9b9a 100644 --- a/src/Microsoft.IO.Redist/src/Microsoft.IO.Redist.csproj +++ b/src/Microsoft.IO.Redist/src/Microsoft.IO.Redist.csproj @@ -3,7 +3,7 @@ Microsoft.IO.Redist {FEF5811F-ED50-4407-A6B9-885EBD3206FB} netfx-Debug;netfx-Release - $(DefineConstants);MS_IO_REDIST + $(DefineConstants);MS_IO_REDIST;INTERNAL_NULLABLE_ATTRIBUTES true $(NoWarn);CS1573 false @@ -34,6 +34,9 @@ + + Common\System\Diagnostics\CodeAnalysis\NullableAttributes.cs + Common\System\IO\DriveInfoInternal.Windows.cs diff --git a/src/System.Data.SqlClient/src/System.Data.SqlClient.csproj b/src/System.Data.SqlClient/src/System.Data.SqlClient.csproj index a730f2e82f2a..44c8cb23c4ee 100644 --- a/src/System.Data.SqlClient/src/System.Data.SqlClient.csproj +++ b/src/System.Data.SqlClient/src/System.Data.SqlClient.csproj @@ -12,8 +12,14 @@ $(DefineConstants);netstandard $(DefineConstants);netcoreapp $(DefineConstants);FEATURE_TCPKEEPALIVE + $(DefineConstants);INTERNAL_NULLABLE_ATTRIBUTES net461-Windows_NT-Debug;net461-Windows_NT-Release;netcoreapp-Debug;netcoreapp-Release;netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netcoreapp2.1-Debug;netcoreapp2.1-Release;netcoreapp2.1-Unix-Debug;netcoreapp2.1-Unix-Release;netcoreapp2.1-Windows_NT-Debug;netcoreapp2.1-Windows_NT-Release;netfx-Windows_NT-Debug;netfx-Windows_NT-Release;netstandard-Debug;netstandard-Release;netstandard-Unix-Debug;netstandard-Unix-Release;netstandard-Windows_NT-Debug;netstandard-Windows_NT-Release;netstandard1.2-Debug;netstandard1.2-Release;netstandard1.3-Debug;netstandard1.3-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release;uap10.0.16299-Windows_NT-Debug;uap10.0.16299-Windows_NT-Release + + + Common\CoreLib\System\Diagnostics\CodeAnalysis\NullableAttributes.cs + + diff --git a/src/System.Resources.Extensions/src/System.Resources.Extensions.csproj b/src/System.Resources.Extensions/src/System.Resources.Extensions.csproj index aaece98adfc4..4903acb0fb15 100644 --- a/src/System.Resources.Extensions/src/System.Resources.Extensions.csproj +++ b/src/System.Resources.Extensions/src/System.Resources.Extensions.csproj @@ -2,7 +2,7 @@ true netstandard-Debug;netstandard-Release - $(DefineConstants);RESOURCES_EXTENSIONS + $(DefineConstants);RESOURCES_EXTENSIONS;INTERNAL_NULLABLE_ATTRIBUTES {6773D354-A573-4D9C-9A67-C7FAE579DA50} @@ -14,6 +14,7 @@ + @@ -22,4 +23,4 @@ - \ No newline at end of file + diff --git a/src/System.Runtime.Extensions/src/System.Runtime.Extensions.csproj b/src/System.Runtime.Extensions/src/System.Runtime.Extensions.csproj index edcc68b6bac8..0ae167b70588 100644 --- a/src/System.Runtime.Extensions/src/System.Runtime.Extensions.csproj +++ b/src/System.Runtime.Extensions/src/System.Runtime.Extensions.csproj @@ -9,6 +9,7 @@ true netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release;uapaot-Windows_NT-Debug;uapaot-Windows_NT-Release enable + $(DefineConstants);INTERNAL_NULLABLE_ATTRIBUTES @@ -179,6 +180,11 @@ Common\System\IO\PersistedFiles.Unix.cs + + + Common\System\Diagnostics\CodeAnalysis\NullableAttributes.cs + + From 75329f4886ca235119014c8724e1e8af94b8e37a Mon Sep 17 00:00:00 2001 From: Egor Bogatov Date: Thu, 30 May 2019 14:12:54 +0300 Subject: [PATCH 561/607] Ignore some System.Runtime tests on Mono (#37358) * Add SkipOnTargetFramework(Mono) here and there --- .../ref/CoreFx.Private.TestUtilities.cs | 2 ++ .../src/System/PlatformDetection.cs | 5 ++++- .../tests/ArrayPool/CollectionTests.cs | 6 +++--- .../tests/FunctionalTests/UdpClientTest.cs | 2 +- src/System.Runtime/tests/System/EnumTests.cs | 15 +++++++++------ src/System.Runtime/tests/System/GCTests.cs | 10 +++++----- .../CompilerServices/ConditionalWeakTableTests.cs | 6 +++--- 7 files changed, 27 insertions(+), 19 deletions(-) diff --git a/src/CoreFx.Private.TestUtilities/ref/CoreFx.Private.TestUtilities.cs b/src/CoreFx.Private.TestUtilities/ref/CoreFx.Private.TestUtilities.cs index cf5b3ec4030d..8d979a2cd780 100644 --- a/src/CoreFx.Private.TestUtilities/ref/CoreFx.Private.TestUtilities.cs +++ b/src/CoreFx.Private.TestUtilities/ref/CoreFx.Private.TestUtilities.cs @@ -63,6 +63,7 @@ public static partial class PlatformDetection public static bool IsInvokingStaticConstructorsSupported { get { throw null; } } public static bool IsMacOsHighSierraOrHigher { get { throw null; } } public static bool IsMacOsMojaveOrHigher { get { throw null; } } + public static bool IsMonoRuntime { get { throw null; } } public static bool IsNetBSD { get { throw null; } } public static bool IsNetCore { get { throw null; } } public static bool IsNetfx462OrNewer { get { throw null; } } @@ -93,6 +94,7 @@ public static partial class PlatformDetection public static bool IsNotWinRTSupported { get { throw null; } } public static bool IsOpenSUSE { get { throw null; } } public static bool IsOSX { get { throw null; } } + public static bool IsPreciseGcSupported { get { throw null; } } public static bool IsRedHatFamily { get { throw null; } } public static bool IsRedHatFamily6 { get { throw null; } } public static bool IsRedHatFamily7 { get { throw null; } } diff --git a/src/CoreFx.Private.TestUtilities/src/System/PlatformDetection.cs b/src/CoreFx.Private.TestUtilities/src/System/PlatformDetection.cs index 98b6b2e33a54..f6f2e1047b11 100644 --- a/src/CoreFx.Private.TestUtilities/src/System/PlatformDetection.cs +++ b/src/CoreFx.Private.TestUtilities/src/System/PlatformDetection.cs @@ -24,6 +24,7 @@ public static partial class PlatformDetection public static bool IsFullFramework => RuntimeInformation.FrameworkDescription.StartsWith(".NET Framework", StringComparison.OrdinalIgnoreCase); public static bool IsNetNative => RuntimeInformation.FrameworkDescription.StartsWith(".NET Native", StringComparison.OrdinalIgnoreCase); public static bool IsNetCore => RuntimeInformation.FrameworkDescription.StartsWith(".NET Core", StringComparison.OrdinalIgnoreCase); + public static bool IsMonoRuntime => Type.GetType("Mono.RuntimeStructs") != null; public static bool IsOSX => RuntimeInformation.IsOSPlatform(OSPlatform.OSX); public static bool IsNotOSX => !IsOSX; public static bool IsFreeBSD => RuntimeInformation.IsOSPlatform(OSPlatform.Create("FREEBSD")); @@ -39,7 +40,7 @@ public static partial class PlatformDetection public static bool IsNotArm64Process => !IsArm64Process; public static bool IsArmOrArm64Process => IsArmProcess || IsArm64Process; public static bool IsNotArmNorArm64Process => !IsArmOrArm64Process; - public static bool IsArgIteratorSupported => IsWindows && IsNotArmProcess; + public static bool IsArgIteratorSupported => IsMonoRuntime || (IsWindows && IsNotArmProcess); public static bool IsArgIteratorNotSupported => !IsArgIteratorSupported; public static bool Is32BitProcess => IntPtr.Size == 4; @@ -143,5 +144,7 @@ public static bool IsNonZeroLowerBoundArraySupported // System.Security.Cryptography.Xml.XmlDsigXsltTransform.GetOutput() relies on XslCompiledTransform which relies // heavily on Reflection.Emit public static bool IsXmlDsigXsltTransformSupported => !PlatformDetection.IsUap; + + public static bool IsPreciseGcSupported => !IsMonoRuntime; } } diff --git a/src/System.Buffers/tests/ArrayPool/CollectionTests.cs b/src/System.Buffers/tests/ArrayPool/CollectionTests.cs index 2427dc7d03dd..967f5aabee80 100644 --- a/src/System.Buffers/tests/ArrayPool/CollectionTests.cs +++ b/src/System.Buffers/tests/ArrayPool/CollectionTests.cs @@ -145,9 +145,9 @@ private static bool ValidateTrimState(object pool, string trimString) return parsedTrim; } - [Theory, - InlineData(true), - InlineData(false)] + [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsPreciseGcSupported))] + [InlineData(true)] + [InlineData(false)] [ActiveIssue(29866, TargetFrameworkMonikers.UapNotUapAot)] public void PollingEventFires(bool trim) { diff --git a/src/System.Net.Sockets/tests/FunctionalTests/UdpClientTest.cs b/src/System.Net.Sockets/tests/FunctionalTests/UdpClientTest.cs index b29a38587d0f..09170c4d96f0 100644 --- a/src/System.Net.Sockets/tests/FunctionalTests/UdpClientTest.cs +++ b/src/System.Net.Sockets/tests/FunctionalTests/UdpClientTest.cs @@ -194,7 +194,7 @@ public void DisposeClose_OperationsThrow(bool close) Assert.Throws(() => udpClient.Send(null, 0, "localhost", 0)); } - [Fact] + [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsPreciseGcSupported))] public void Finalize_NoExceptionsThrown() { WeakReference udpClientWeakRef = CreateAndDiscardUdpClient(); diff --git a/src/System.Runtime/tests/System/EnumTests.cs b/src/System.Runtime/tests/System/EnumTests.cs index 2325efcc165f..7dff6c732600 100644 --- a/src/System.Runtime/tests/System/EnumTests.cs +++ b/src/System.Runtime/tests/System/EnumTests.cs @@ -87,13 +87,16 @@ public static IEnumerable Parse_TestData() yield return new object[] { "Value1", false, Enum.ToObject(s_boolEnumType, true) }; yield return new object[] { "vaLue2", true, Enum.ToObject(s_boolEnumType, false) }; - // Single - parses successfully, but doesn't properly represent the underlying value - yield return new object[] { "Value1", false, Enum.GetValues(s_floatEnumType).GetValue(0) }; - yield return new object[] { "vaLue2", true, Enum.GetValues(s_floatEnumType).GetValue(0) }; + if (!PlatformDetection.IsMonoRuntime) // tracked in issue #36887 + { + // Single - parses successfully, but doesn't properly represent the underlying value + yield return new object[] { "Value1", false, Enum.GetValues(s_floatEnumType).GetValue(0) }; + yield return new object[] { "vaLue2", true, Enum.GetValues(s_floatEnumType).GetValue(0) }; - // Double - parses successfully, but doesn't properly represent the underlying value - yield return new object[] { "Value1", false, Enum.GetValues(s_doubleEnumType).GetValue(0) }; - yield return new object[] { "vaLue2", true, Enum.GetValues(s_doubleEnumType).GetValue(0) }; + // Double - parses successfully, but doesn't properly represent the underlying value + yield return new object[] { "Value1", false, Enum.GetValues(s_doubleEnumType).GetValue(0) }; + yield return new object[] { "vaLue2", true, Enum.GetValues(s_doubleEnumType).GetValue(0) }; + } #endif // netcoreapp // SimpleEnum diff --git a/src/System.Runtime/tests/System/GCTests.cs b/src/System.Runtime/tests/System/GCTests.cs index ca9286488249..bf8c6f2b2d61 100644 --- a/src/System.Runtime/tests/System/GCTests.cs +++ b/src/System.Runtime/tests/System/GCTests.cs @@ -74,7 +74,7 @@ public static void Collection_InvalidCollectionMode_ThrowsArgumentOutOfRangeExce AssertExtensions.Throws("mode", null, () => GC.Collect(2, mode, false)); } - [Fact] + [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsPreciseGcSupported))] public static void Collect_CallsFinalizer() { FinalizerTest.Run(); @@ -111,7 +111,7 @@ private class TestObject } } - [Fact] + [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsPreciseGcSupported))] public static void KeepAlive() { KeepAliveTest.Run(); @@ -161,7 +161,7 @@ private class DoNotKeepAliveObject } } - [Fact] + [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsPreciseGcSupported))] public static void KeepAlive_Null() { KeepAliveNullTest.Run(); @@ -339,7 +339,7 @@ public static void RemoveMemoryPressure_InvalidBytesAllocated_ThrowsArgumentOutO } } - [Fact] + [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsPreciseGcSupported))] public static void GetTotalMemoryTest_ForceCollection() { // We don't test GetTotalMemory(false) at all because a collection @@ -378,7 +378,7 @@ public static void GetGeneration() } } - [Theory] + [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsPreciseGcSupported))] [InlineData(GCLargeObjectHeapCompactionMode.CompactOnce)] [InlineData(GCLargeObjectHeapCompactionMode.Default)] public static void LargeObjectHeapCompactionModeRoundTrips(GCLargeObjectHeapCompactionMode value) diff --git a/src/System.Runtime/tests/System/Runtime/CompilerServices/ConditionalWeakTableTests.cs b/src/System.Runtime/tests/System/Runtime/CompilerServices/ConditionalWeakTableTests.cs index 030e0f9706e0..2e09d73f0f02 100644 --- a/src/System.Runtime/tests/System/Runtime/CompilerServices/ConditionalWeakTableTests.cs +++ b/src/System.Runtime/tests/System/Runtime/CompilerServices/ConditionalWeakTableTests.cs @@ -27,7 +27,7 @@ public static void InvalidArgs_Throws() AssertExtensions.Throws(null, () => cwt.Add(key, key)); // duplicate key } - [Theory] + [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsPreciseGcSupported))] [InlineData(1)] [InlineData(100)] public static void Add(int numObjects) @@ -231,7 +231,7 @@ static void GetWeakRefPair(out WeakReference key_out, out WeakReference< key_out = new WeakReference(key, false); } - [Fact] + [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsPreciseGcSupported))] public static void GetOrCreateValue() { WeakReference wrValue; @@ -262,7 +262,7 @@ static void GetWeakRefValPair(out WeakReference key_out, out WeakReferen key_out = new WeakReference(key, false); } - [Fact] + [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsPreciseGcSupported))] public static void GetValue() { WeakReference wrValue; From 22dd87ec3c17dfdc09469dfc222b384ac8c553a2 Mon Sep 17 00:00:00 2001 From: Shay Rojansky Date: Thu, 30 May 2019 11:13:53 +0200 Subject: [PATCH 562/607] Add async methods in System.Data.Common, implement IAsyncDisposable Closes #35012 --- .../ref/System.Data.Common.cs | 13 ++++ .../src/System/Data/Common/DbCommand.cs | 24 +++++++ .../src/System/Data/Common/DbConnection.cs | 65 +++++++++++++++++++ .../src/System/Data/Common/DbDataReader.cs | 24 +++++++ .../src/System/Data/Common/DbTransaction.cs | 45 +++++++++++++ 5 files changed, 171 insertions(+) diff --git a/src/System.Data.Common/ref/System.Data.Common.cs b/src/System.Data.Common/ref/System.Data.Common.cs index e5b687944da4..c9c2083513db 100644 --- a/src/System.Data.Common/ref/System.Data.Common.cs +++ b/src/System.Data.Common/ref/System.Data.Common.cs @@ -1848,9 +1848,11 @@ protected DbCommand() { } public System.Threading.Tasks.Task ExecuteScalarAsync() { throw null; } public virtual System.Threading.Tasks.Task ExecuteScalarAsync(System.Threading.CancellationToken cancellationToken) { throw null; } public abstract void Prepare(); + public virtual System.Threading.Tasks.Task PrepareAsync(System.Threading.CancellationToken cancellationToken = default) { throw null; } System.Data.IDbDataParameter System.Data.IDbCommand.CreateParameter() { throw null; } System.Data.IDataReader System.Data.IDbCommand.ExecuteReader() { throw null; } System.Data.IDataReader System.Data.IDbCommand.ExecuteReader(System.Data.CommandBehavior behavior) { throw null; } + public virtual System.Threading.Tasks.ValueTask DisposeAsync() { throw null; } } public abstract partial class DbCommandBuilder : System.ComponentModel.Component { @@ -1912,7 +1914,9 @@ public virtual event System.Data.StateChangeEventHandler StateChange { add { } r public System.Data.Common.DbTransaction BeginTransaction() { throw null; } public System.Data.Common.DbTransaction BeginTransaction(System.Data.IsolationLevel isolationLevel) { throw null; } public abstract void ChangeDatabase(string databaseName); + public virtual System.Threading.Tasks.Task ChangeDatabaseAsync(string databaseName, System.Threading.CancellationToken cancellationToken = default) { throw null; } public abstract void Close(); + public virtual System.Threading.Tasks.Task CloseAsync(System.Threading.CancellationToken cancellationToken = default) { throw null; } public System.Data.Common.DbCommand CreateCommand() { throw null; } protected abstract System.Data.Common.DbCommand CreateDbCommand(); public virtual void EnlistTransaction(System.Transactions.Transaction transaction) { } @@ -1925,7 +1929,11 @@ protected virtual void OnStateChange(System.Data.StateChangeEventArgs stateChang public virtual System.Threading.Tasks.Task OpenAsync(System.Threading.CancellationToken cancellationToken) { throw null; } System.Data.IDbTransaction System.Data.IDbConnection.BeginTransaction() { throw null; } System.Data.IDbTransaction System.Data.IDbConnection.BeginTransaction(System.Data.IsolationLevel isolationLevel) { throw null; } + protected virtual System.Threading.Tasks.ValueTask BeginDbTransactionAsync(IsolationLevel isolationLevel, System.Threading.CancellationToken cancellationToken) { throw null; } + public System.Threading.Tasks.ValueTask BeginTransactionAsync(System.Threading.CancellationToken cancellationToken = default) { throw null; } + public System.Threading.Tasks.ValueTask BeginTransactionAsync(IsolationLevel isolationLevel, System.Threading.CancellationToken cancellationToken = default) { throw null; } System.Data.IDbCommand System.Data.IDbConnection.CreateCommand() { throw null; } + public virtual System.Threading.Tasks.ValueTask DisposeAsync() { throw null; } } public partial class DbConnectionStringBuilder : System.Collections.ICollection, System.Collections.IDictionary, System.Collections.IEnumerable, System.ComponentModel.ICustomTypeDescriptor { @@ -2054,8 +2062,10 @@ protected DbDataReader() { } public abstract int RecordsAffected { get; } public virtual int VisibleFieldCount { get { throw null; } } public virtual void Close() { } + public virtual System.Threading.Tasks.Task CloseAsync(System.Threading.CancellationToken cancellationToken = default) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public void Dispose() { } + public virtual System.Threading.Tasks.ValueTask DisposeAsync() { throw null; } protected virtual void Dispose(bool disposing) { } public abstract bool GetBoolean(int ordinal); public abstract byte GetByte(int ordinal); @@ -2349,9 +2359,12 @@ protected DbTransaction() { } public abstract System.Data.IsolationLevel IsolationLevel { get; } System.Data.IDbConnection System.Data.IDbTransaction.Connection { get { throw null; } } public abstract void Commit(); + public virtual System.Threading.Tasks.Task CommitAsync(System.Threading.CancellationToken cancellationToken = default) { throw null; } public void Dispose() { } + public virtual System.Threading.Tasks.ValueTask DisposeAsync() { throw null; } protected virtual void Dispose(bool disposing) { } public abstract void Rollback(); + public virtual System.Threading.Tasks.Task RollbackAsync(System.Threading.CancellationToken cancellationToken = default) { throw null; } } public enum GroupByBehavior { diff --git a/src/System.Data.Common/src/System/Data/Common/DbCommand.cs b/src/System.Data.Common/src/System/Data/Common/DbCommand.cs index fc47aecb567d..d2e5db1a46fa 100644 --- a/src/System.Data.Common/src/System/Data/Common/DbCommand.cs +++ b/src/System.Data.Common/src/System/Data/Common/DbCommand.cs @@ -222,5 +222,29 @@ public virtual Task ExecuteScalarAsync(CancellationToken cancellationTok public abstract object ExecuteScalar(); public abstract void Prepare(); + + public virtual Task PrepareAsync(CancellationToken cancellationToken = default) + { + if (cancellationToken.IsCancellationRequested) + { + return Task.FromCanceled(cancellationToken); + } + + try + { + Prepare(); + return Task.CompletedTask; + } + catch (Exception e) + { + return Task.FromException(e); + } + } + + public virtual ValueTask DisposeAsync() + { + Dispose(); + return default; + } } } diff --git a/src/System.Data.Common/src/System/Data/Common/DbConnection.cs b/src/System.Data.Common/src/System/Data/Common/DbConnection.cs index 766bb516e7b9..531926c473a1 100644 --- a/src/System.Data.Common/src/System/Data/Common/DbConnection.cs +++ b/src/System.Data.Common/src/System/Data/Common/DbConnection.cs @@ -63,10 +63,75 @@ IDbTransaction IDbConnection.BeginTransaction() => IDbTransaction IDbConnection.BeginTransaction(IsolationLevel isolationLevel) => BeginDbTransaction(isolationLevel); + protected virtual ValueTask BeginDbTransactionAsync(IsolationLevel isolationLevel, CancellationToken cancellationToken) + { + if (cancellationToken.IsCancellationRequested) + { + return new ValueTask(Task.FromCanceled(cancellationToken)); + } + + try + { + return new ValueTask(BeginDbTransaction(isolationLevel)); + } + catch (Exception e) + { + return new ValueTask(Task.FromException(e)); + } + } + + public ValueTask BeginTransactionAsync(CancellationToken cancellationToken = default) + => BeginDbTransactionAsync(IsolationLevel.Unspecified, cancellationToken); + + public ValueTask BeginTransactionAsync(IsolationLevel isolationLevel, CancellationToken cancellationToken = default) + => BeginDbTransactionAsync(isolationLevel, cancellationToken); + public abstract void Close(); + public virtual Task CloseAsync(CancellationToken cancellationToken = default) + { + if (cancellationToken.IsCancellationRequested) + { + return Task.FromCanceled(cancellationToken); + } + + try + { + Close(); + return Task.CompletedTask; + } + catch (Exception e) + { + return Task.FromException(e); + } + } + + public virtual ValueTask DisposeAsync() + { + Dispose(); + return default; + } + public abstract void ChangeDatabase(string databaseName); + public virtual Task ChangeDatabaseAsync(string databaseName, CancellationToken cancellationToken = default) + { + if (cancellationToken.IsCancellationRequested) + { + return Task.FromCanceled(cancellationToken); + } + + try + { + ChangeDatabase(databaseName); + return Task.CompletedTask; + } + catch (Exception e) + { + return Task.FromException(e); + } + } + public DbCommand CreateCommand() => CreateDbCommand(); IDbCommand IDbConnection.CreateCommand() => CreateDbCommand(); diff --git a/src/System.Data.Common/src/System/Data/Common/DbDataReader.cs b/src/System.Data.Common/src/System/Data/Common/DbDataReader.cs index ff30a418e563..80d16f781a9c 100644 --- a/src/System.Data.Common/src/System/Data/Common/DbDataReader.cs +++ b/src/System.Data.Common/src/System/Data/Common/DbDataReader.cs @@ -32,6 +32,24 @@ protected DbDataReader() : base() { } public virtual void Close() { } + public virtual Task CloseAsync(CancellationToken cancellationToken = default) + { + if (cancellationToken.IsCancellationRequested) + { + return Task.FromCanceled(cancellationToken); + } + + try + { + Close(); + return Task.CompletedTask; + } + catch (Exception e) + { + return Task.FromException(e); + } + } + [EditorBrowsable(EditorBrowsableState.Never)] public void Dispose() => Dispose(true); @@ -43,6 +61,12 @@ protected virtual void Dispose(bool disposing) } } + public virtual ValueTask DisposeAsync() + { + Dispose(); + return default; + } + public abstract string GetDataTypeName(int ordinal); [EditorBrowsable(EditorBrowsableState.Never)] diff --git a/src/System.Data.Common/src/System/Data/Common/DbTransaction.cs b/src/System.Data.Common/src/System/Data/Common/DbTransaction.cs index 97edf2c60374..c1342b456ee3 100644 --- a/src/System.Data.Common/src/System/Data/Common/DbTransaction.cs +++ b/src/System.Data.Common/src/System/Data/Common/DbTransaction.cs @@ -2,6 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System.Threading; +using System.Threading.Tasks; + namespace System.Data.Common { public abstract class DbTransaction : MarshalByRefObject, IDbTransaction @@ -18,10 +21,52 @@ protected DbTransaction() : base() { } public abstract void Commit(); + public virtual Task CommitAsync(CancellationToken cancellationToken = default) + { + if (cancellationToken.IsCancellationRequested) + { + return Task.FromCanceled(cancellationToken); + } + + try + { + Commit(); + return Task.CompletedTask; + } + catch (Exception e) + { + return Task.FromException(e); + } + } + public void Dispose() => Dispose(true); protected virtual void Dispose(bool disposing) { } + public virtual ValueTask DisposeAsync() + { + Dispose(); + return default; + } + public abstract void Rollback(); + + public virtual Task RollbackAsync(CancellationToken cancellationToken = default) + { + if (cancellationToken.IsCancellationRequested) + { + return Task.FromCanceled(cancellationToken); + } + + try + { + Rollback(); + return Task.CompletedTask; + } + catch (Exception e) + { + return Task.FromException(e); + } + } } } From 60d65afa0160a0b27e8df6b8f450ead8ab7f4214 Mon Sep 17 00:00:00 2001 From: Shay Rojansky Date: Thu, 30 May 2019 12:50:02 +0200 Subject: [PATCH 563/607] Add feature detection properties to DbProviderFactory CanCreateDataAdapter, CanCreateCommandBuilder Closes #35564 --- .../ref/System.Data.Common.cs | 2 + .../System/Data/Common/DbProviderFactory.cs | 47 +++++++++++++++++ .../tests/System.Data.Common.Tests.csproj | 3 +- .../DbProviderFactoryTest.netcoreapp.cs | 51 +++++++++++++++++++ 4 files changed, 102 insertions(+), 1 deletion(-) create mode 100644 src/System.Data.Common/tests/System/Data/Common/DbProviderFactoryTest.netcoreapp.cs diff --git a/src/System.Data.Common/ref/System.Data.Common.cs b/src/System.Data.Common/ref/System.Data.Common.cs index c9c2083513db..617af05fdafe 100644 --- a/src/System.Data.Common/ref/System.Data.Common.cs +++ b/src/System.Data.Common/ref/System.Data.Common.cs @@ -2337,6 +2337,8 @@ public abstract partial class DbProviderFactory { protected DbProviderFactory() { } public virtual bool CanCreateDataSourceEnumerator { get { throw null; } } + public virtual bool CanCreateDataAdapter { get { throw null; } } + public virtual bool CanCreateCommandBuilder { get { throw null; } } public virtual System.Data.Common.DbCommand CreateCommand() { throw null; } public virtual System.Data.Common.DbCommandBuilder CreateCommandBuilder() { throw null; } public virtual System.Data.Common.DbConnection CreateConnection() { throw null; } diff --git a/src/System.Data.Common/src/System/Data/Common/DbProviderFactory.cs b/src/System.Data.Common/src/System/Data/Common/DbProviderFactory.cs index 0e568d7eb6e1..61f7e5cda003 100644 --- a/src/System.Data.Common/src/System/Data/Common/DbProviderFactory.cs +++ b/src/System.Data.Common/src/System/Data/Common/DbProviderFactory.cs @@ -6,10 +6,57 @@ namespace System.Data.Common { public abstract partial class DbProviderFactory { + private bool? _canCreateDataAdapter; + private bool? _canCreateCommandBuilder; + protected DbProviderFactory() { } public virtual bool CanCreateDataSourceEnumerator => false; + public virtual bool CanCreateDataAdapter + { + get + { + if (!_canCreateDataAdapter.HasValue) + { + var adapter = CreateDataAdapter(); + if (adapter == null) + { + _canCreateDataAdapter = false; + } + else + { + _canCreateDataAdapter = true; + adapter.Dispose(); + } + } + + return _canCreateDataAdapter.Value; + } + } + + public virtual bool CanCreateCommandBuilder + { + get + { + if (!_canCreateCommandBuilder.HasValue) + { + var builder = CreateCommandBuilder(); + if (builder == null) + { + _canCreateCommandBuilder = false; + } + else + { + _canCreateCommandBuilder = true; + builder.Dispose(); + } + } + + return _canCreateCommandBuilder.Value; + } + } + public virtual DbCommand CreateCommand() => null; public virtual DbCommandBuilder CreateCommandBuilder() => null; diff --git a/src/System.Data.Common/tests/System.Data.Common.Tests.csproj b/src/System.Data.Common/tests/System.Data.Common.Tests.csproj index 7642909de3db..2448deab0212 100644 --- a/src/System.Data.Common/tests/System.Data.Common.Tests.csproj +++ b/src/System.Data.Common/tests/System.Data.Common.Tests.csproj @@ -21,6 +21,7 @@ + @@ -124,4 +125,4 @@ - \ No newline at end of file + diff --git a/src/System.Data.Common/tests/System/Data/Common/DbProviderFactoryTest.netcoreapp.cs b/src/System.Data.Common/tests/System/Data/Common/DbProviderFactoryTest.netcoreapp.cs new file mode 100644 index 000000000000..9a2b138f0f3f --- /dev/null +++ b/src/System.Data.Common/tests/System/Data/Common/DbProviderFactoryTest.netcoreapp.cs @@ -0,0 +1,51 @@ +// Licensed to the .NET Foundation under one or more agreements. +// See the LICENSE file in the project root for more information. + +using Xunit; +using System.Data.Common; + +namespace System.Data.Tests.Common +{ + public class DbProviderFactoryTest + { + [Fact] + public void CanCreateDataAdapter() + { + Assert.True(ProviderFactoryWithExtras.Instance.CanCreateDataAdapter); + Assert.False(ProviderFactoryWithoutExtras.Instance.CanCreateDataAdapter); + } + + [Fact] + public void CanCreateCommandBuilder() + { + Assert.True(ProviderFactoryWithExtras.Instance.CanCreateCommandBuilder); + Assert.False(ProviderFactoryWithoutExtras.Instance.CanCreateCommandBuilder); + } + + public sealed class ProviderFactoryWithExtras : DbProviderFactory + { + public static readonly ProviderFactoryWithExtras Instance = new ProviderFactoryWithExtras(); + private ProviderFactoryWithExtras() { } + + public override DbDataAdapter CreateDataAdapter() => new MyAdapter(); + public override DbCommandBuilder CreateCommandBuilder() => new MyCommandBuilder(); + } + + public sealed class ProviderFactoryWithoutExtras : DbProviderFactory + { + public static readonly ProviderFactoryWithoutExtras Instance = new ProviderFactoryWithoutExtras(); + private ProviderFactoryWithoutExtras() { } + } + + private class MyAdapter : DbDataAdapter {} + + private class MyCommandBuilder : DbCommandBuilder + { + protected override string GetParameterPlaceholder(int parameterOrdinal) => null; + protected override string GetParameterName(string parameterName) => null; + protected override string GetParameterName(int parameterOrdinal) => null; + protected override void ApplyParameterInfo(DbParameter parameter, DataRow row, StatementType statementType, bool whereClause) {} + protected override void SetRowUpdatingHandler(DbDataAdapter adapter) {} + } + } +} From fadf62794b43df7d6d9d81df00f71d87b999add5 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Thu, 30 May 2019 14:44:05 +0200 Subject: [PATCH 564/607] [master] Update dependencies from dotnet/standard (#38021) * Update dependencies from https://github.com/dotnet/standard build 20190529.1 - NETStandard.Library - 2.1.0-prerelease.19279.1 * Update dependencies from https://github.com/dotnet/standard build 20190529.2 - NETStandard.Library - 2.1.0-prerelease.19279.2 --- eng/Version.Details.xml | 4 ++-- eng/Versions.props | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index dc54a61ef024..bc1337b85025 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -38,9 +38,9 @@ https://github.com/dotnet/arcade 11f90a2a260422201895de58e57170131ab4efe7 - + https://github.com/dotnet/standard - abc624a27f0e40e8c3817b3d410362dcc91cfb95 + 3b980275962d561f608ccea96143a6a0e4d15869 https://github.com/dotnet/arcade diff --git a/eng/Versions.props b/eng/Versions.props index e92550df1543..5d5489a6f243 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -46,7 +46,7 @@ 3.0.0-preview6.19278.7 4.6.0-preview6.19278.7 - 2.1.0-prerelease.19278.1 + 2.1.0-prerelease.19279.2 99.99.99-master-20190521.3 From 7a76510746112df1d4d4b97609df2fc9bd47d30a Mon Sep 17 00:00:00 2001 From: Steve Harter Date: Thu, 30 May 2019 06:41:20 -0700 Subject: [PATCH 565/607] Cache the escaped property names (#37909) * Cache the escaped property names * don't pass JsonEncodedText by reference --- .../Converters/JsonValueConverterBoolean.cs | 4 +-- .../Converters/JsonValueConverterByte.cs | 4 +-- .../Converters/JsonValueConverterChar.cs | 4 +-- .../Converters/JsonValueConverterDateTime.cs | 4 +-- .../JsonValueConverterDateTimeOffset.cs | 4 +-- .../Converters/JsonValueConverterDecimal.cs | 4 +-- .../Converters/JsonValueConverterDouble.cs | 4 +-- .../Converters/JsonValueConverterEnum.cs | 8 ++--- .../Converters/JsonValueConverterGuid.cs | 4 +-- .../Converters/JsonValueConverterInt16.cs | 4 +-- .../Converters/JsonValueConverterInt32.cs | 4 +-- .../Converters/JsonValueConverterInt64.cs | 4 +-- .../JsonValueConverterJsonElement.cs | 4 +-- .../Converters/JsonValueConverterObject.cs | 2 +- .../Converters/JsonValueConverterSByte.cs | 4 +-- .../Converters/JsonValueConverterSingle.cs | 4 +-- .../Converters/JsonValueConverterString.cs | 4 +-- .../Converters/JsonValueConverterUInt16.cs | 4 +-- .../Converters/JsonValueConverterUInt32.cs | 4 +-- .../Converters/JsonValueConverterUInt64.cs | 4 +-- .../Json/Serialization/JsonPropertyInfo.cs | 33 ++---------------- .../JsonPropertyInfoNotNullable.cs | 8 ++--- .../Serialization/JsonPropertyInfoNullable.cs | 8 ++--- .../JsonSerializer.Write.HandleDictionary.cs | 34 ++----------------- .../JsonSerializer.Write.HandleObject.cs | 2 +- .../Policies/JsonValueConverter.cs | 2 +- .../Json/Serialization/WriteStackFrame.cs | 23 +++---------- 27 files changed, 60 insertions(+), 132 deletions(-) diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/JsonValueConverterBoolean.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/JsonValueConverterBoolean.cs index 9526f67f1d6c..a0e816ecc4ac 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/JsonValueConverterBoolean.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/JsonValueConverterBoolean.cs @@ -25,9 +25,9 @@ public override void Write(bool value, Utf8JsonWriter writer) writer.WriteBooleanValue(value); } - public override void Write(Span escapedPropertyName, bool value, Utf8JsonWriter writer) + public override void Write(JsonEncodedText propertyName, bool value, Utf8JsonWriter writer) { - writer.WriteBoolean(escapedPropertyName, value); + writer.WriteBoolean(propertyName, value); } } } diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/JsonValueConverterByte.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/JsonValueConverterByte.cs index 174a87be114a..6ea185089891 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/JsonValueConverterByte.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/JsonValueConverterByte.cs @@ -27,9 +27,9 @@ public override void Write(byte value, Utf8JsonWriter writer) writer.WriteNumberValue(value); } - public override void Write(Span escapedPropertyName, byte value, Utf8JsonWriter writer) + public override void Write(JsonEncodedText propertyName, byte value, Utf8JsonWriter writer) { - writer.WriteNumber(escapedPropertyName, value); + writer.WriteNumber(propertyName, value); } } } diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/JsonValueConverterChar.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/JsonValueConverterChar.cs index 475a6bd71c94..787253ad32b9 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/JsonValueConverterChar.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/JsonValueConverterChar.cs @@ -32,9 +32,9 @@ public override void Write(char value, Utf8JsonWriter writer) ); } - public override void Write(Span escapedPropertyName, char value, Utf8JsonWriter writer) + public override void Write(JsonEncodedText propertyName, char value, Utf8JsonWriter writer) { - writer.WriteString(escapedPropertyName, + writer.WriteString(propertyName, #if BUILDING_INBOX_LIBRARY MemoryMarshal.CreateSpan(ref value, 1) #else diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/JsonValueConverterDateTime.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/JsonValueConverterDateTime.cs index 9abbfa72486e..904c298c693d 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/JsonValueConverterDateTime.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/JsonValueConverterDateTime.cs @@ -24,9 +24,9 @@ public override void Write(DateTime value, Utf8JsonWriter writer) writer.WriteStringValue(value); } - public override void Write(Span escapedPropertyName, DateTime value, Utf8JsonWriter writer) + public override void Write(JsonEncodedText propertyName, DateTime value, Utf8JsonWriter writer) { - writer.WriteString(escapedPropertyName, value); + writer.WriteString(propertyName, value); } } } diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/JsonValueConverterDateTimeOffset.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/JsonValueConverterDateTimeOffset.cs index 0567bfb1b1c4..eb31e551fc99 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/JsonValueConverterDateTimeOffset.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/JsonValueConverterDateTimeOffset.cs @@ -24,9 +24,9 @@ public override void Write(DateTimeOffset value, Utf8JsonWriter writer) writer.WriteStringValue(value); } - public override void Write(Span escapedPropertyName, DateTimeOffset value, Utf8JsonWriter writer) + public override void Write(JsonEncodedText propertyName, DateTimeOffset value, Utf8JsonWriter writer) { - writer.WriteString(escapedPropertyName, value); + writer.WriteString(propertyName, value); } } } diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/JsonValueConverterDecimal.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/JsonValueConverterDecimal.cs index ed90587c06e9..d4993d15203b 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/JsonValueConverterDecimal.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/JsonValueConverterDecimal.cs @@ -24,9 +24,9 @@ public override void Write(decimal value, Utf8JsonWriter writer) writer.WriteNumberValue(value); } - public override void Write(Span escapedPropertyName, decimal value, Utf8JsonWriter writer) + public override void Write(JsonEncodedText propertyName, decimal value, Utf8JsonWriter writer) { - writer.WriteNumber(escapedPropertyName, value); + writer.WriteNumber(propertyName, value); } } } diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/JsonValueConverterDouble.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/JsonValueConverterDouble.cs index 5d236966d135..b69ae07bc1f4 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/JsonValueConverterDouble.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/JsonValueConverterDouble.cs @@ -24,9 +24,9 @@ public override void Write(double value, Utf8JsonWriter writer) writer.WriteNumberValue(value); } - public override void Write(Span escapedPropertyName, double value, Utf8JsonWriter writer) + public override void Write(JsonEncodedText propertyName, double value, Utf8JsonWriter writer) { - writer.WriteNumber(escapedPropertyName, value); + writer.WriteNumber(propertyName, value); } } } diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/JsonValueConverterEnum.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/JsonValueConverterEnum.cs index 3778957f252e..653ff7beeb3d 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/JsonValueConverterEnum.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/JsonValueConverterEnum.cs @@ -77,23 +77,23 @@ public override void Write(TValue value, Utf8JsonWriter writer) } } - public override void Write(Span escapedPropertyName, TValue value, Utf8JsonWriter writer) + public override void Write(JsonEncodedText propertyName, TValue value, Utf8JsonWriter writer) { if (TreatAsString) { - writer.WriteString(escapedPropertyName, value.ToString()); + writer.WriteString(propertyName, value.ToString()); } else if (s_isUint64) { // Use the ulong converter to prevent conversion into a signed\long value. ulong ulongValue = Convert.ToUInt64(value); - writer.WriteNumber(escapedPropertyName, ulongValue); + writer.WriteNumber(propertyName, ulongValue); } else { // long can hold the signed\unsigned values of other integer types. long longValue = Convert.ToInt64(value); - writer.WriteNumber(escapedPropertyName, longValue); + writer.WriteNumber(propertyName, longValue); } } } diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/JsonValueConverterGuid.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/JsonValueConverterGuid.cs index c249e366d51e..5479ced8f2d7 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/JsonValueConverterGuid.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/JsonValueConverterGuid.cs @@ -24,9 +24,9 @@ public override void Write(Guid value, Utf8JsonWriter writer) writer.WriteStringValue(value); } - public override void Write(Span escapedPropertyName, Guid value, Utf8JsonWriter writer) + public override void Write(JsonEncodedText propertyName, Guid value, Utf8JsonWriter writer) { - writer.WriteString(escapedPropertyName, value); + writer.WriteString(propertyName, value); } } } diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/JsonValueConverterInt16.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/JsonValueConverterInt16.cs index 16fe1d51340c..acd965d26985 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/JsonValueConverterInt16.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/JsonValueConverterInt16.cs @@ -27,9 +27,9 @@ public override void Write(short value, Utf8JsonWriter writer) writer.WriteNumberValue(value); } - public override void Write(Span escapedPropertyName, short value, Utf8JsonWriter writer) + public override void Write(JsonEncodedText propertyName, short value, Utf8JsonWriter writer) { - writer.WriteNumber(escapedPropertyName, value); + writer.WriteNumber(propertyName, value); } } } diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/JsonValueConverterInt32.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/JsonValueConverterInt32.cs index de2181824693..aa9932f949cf 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/JsonValueConverterInt32.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/JsonValueConverterInt32.cs @@ -24,9 +24,9 @@ public override void Write(int value, Utf8JsonWriter writer) writer.WriteNumberValue(value); } - public override void Write(Span escapedPropertyName, int value, Utf8JsonWriter writer) + public override void Write(JsonEncodedText propertyName, int value, Utf8JsonWriter writer) { - writer.WriteNumber(escapedPropertyName, value); + writer.WriteNumber(propertyName, value); } } } diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/JsonValueConverterInt64.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/JsonValueConverterInt64.cs index b9d18dd7275e..5b5d621f2558 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/JsonValueConverterInt64.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/JsonValueConverterInt64.cs @@ -24,9 +24,9 @@ public override void Write(long value, Utf8JsonWriter writer) writer.WriteNumberValue(value); } - public override void Write(Span escapedPropertyName, long value, Utf8JsonWriter writer) + public override void Write(JsonEncodedText propertyName, long value, Utf8JsonWriter writer) { - writer.WriteNumber(escapedPropertyName, value); + writer.WriteNumber(propertyName, value); } } } diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/JsonValueConverterJsonElement.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/JsonValueConverterJsonElement.cs index ca750ae70d67..423f4634714a 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/JsonValueConverterJsonElement.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/JsonValueConverterJsonElement.cs @@ -28,9 +28,9 @@ public override void Write(JsonElement value, Utf8JsonWriter writer) value.WriteAsValue(writer); } - public override void Write(Span escapedPropertyName, JsonElement value, Utf8JsonWriter writer) + public override void Write(JsonEncodedText propertyName, JsonElement value, Utf8JsonWriter writer) { - value.WriteAsProperty(escapedPropertyName, writer); + value.WriteAsProperty(propertyName.ToString(), writer); } } } diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/JsonValueConverterObject.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/JsonValueConverterObject.cs index 3a099d7db666..ccd81252e924 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/JsonValueConverterObject.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/JsonValueConverterObject.cs @@ -28,7 +28,7 @@ public override void Write(object value, Utf8JsonWriter writer) throw new InvalidOperationException(); } - public override void Write(Span escapedPropertyName, object value, Utf8JsonWriter writer) + public override void Write(JsonEncodedText propertyName, object value, Utf8JsonWriter writer) { throw new InvalidOperationException(); } diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/JsonValueConverterSByte.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/JsonValueConverterSByte.cs index 786a7408c3ba..25a7cfeffbb0 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/JsonValueConverterSByte.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/JsonValueConverterSByte.cs @@ -27,9 +27,9 @@ public override void Write(sbyte value, Utf8JsonWriter writer) writer.WriteNumberValue(value); } - public override void Write(Span escapedPropertyName, sbyte value, Utf8JsonWriter writer) + public override void Write(JsonEncodedText propertyName, sbyte value, Utf8JsonWriter writer) { - writer.WriteNumber(escapedPropertyName, value); + writer.WriteNumber(propertyName, value); } } } diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/JsonValueConverterSingle.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/JsonValueConverterSingle.cs index 32093e3bffa4..a2fefee12859 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/JsonValueConverterSingle.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/JsonValueConverterSingle.cs @@ -27,9 +27,9 @@ public override void Write(float value, Utf8JsonWriter writer) writer.WriteNumberValue(value); } - public override void Write(Span escapedPropertyName, float value, Utf8JsonWriter writer) + public override void Write(JsonEncodedText propertyName, float value, Utf8JsonWriter writer) { - writer.WriteNumber(escapedPropertyName, value); + writer.WriteNumber(propertyName, value); } } } diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/JsonValueConverterString.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/JsonValueConverterString.cs index f5120cfe3bf8..0c84b918897c 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/JsonValueConverterString.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/JsonValueConverterString.cs @@ -25,9 +25,9 @@ public override void Write(string value, Utf8JsonWriter writer) writer.WriteStringValue(value); } - public override void Write(Span escapedPropertyName, string value, Utf8JsonWriter writer) + public override void Write(JsonEncodedText propertyName, string value, Utf8JsonWriter writer) { - writer.WriteString(escapedPropertyName, value); + writer.WriteString(propertyName, value); } } } diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/JsonValueConverterUInt16.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/JsonValueConverterUInt16.cs index cb232e630a5f..54799f965fcd 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/JsonValueConverterUInt16.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/JsonValueConverterUInt16.cs @@ -27,9 +27,9 @@ public override void Write(ushort value, Utf8JsonWriter writer) writer.WriteNumberValue(value); } - public override void Write(Span escapedPropertyName, ushort value, Utf8JsonWriter writer) + public override void Write(JsonEncodedText propertyName, ushort value, Utf8JsonWriter writer) { - writer.WriteNumber(escapedPropertyName, value); + writer.WriteNumber(propertyName, value); } } } diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/JsonValueConverterUInt32.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/JsonValueConverterUInt32.cs index 94e7dfccf4d6..ee5553c53763 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/JsonValueConverterUInt32.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/JsonValueConverterUInt32.cs @@ -24,9 +24,9 @@ public override void Write(uint value, Utf8JsonWriter writer) writer.WriteNumberValue(value); } - public override void Write(Span escapedPropertyName, uint value, Utf8JsonWriter writer) + public override void Write(JsonEncodedText propertyName, uint value, Utf8JsonWriter writer) { - writer.WriteNumber(escapedPropertyName, value); + writer.WriteNumber(propertyName, value); } } } diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/JsonValueConverterUInt64.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/JsonValueConverterUInt64.cs index 7a52f4b6252c..d5f8174e7423 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/JsonValueConverterUInt64.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/JsonValueConverterUInt64.cs @@ -24,9 +24,9 @@ public override void Write(ulong value, Utf8JsonWriter writer) writer.WriteNumberValue(value); } - public override void Write(Span escapedPropertyName, ulong value, Utf8JsonWriter writer) + public override void Write(JsonEncodedText propertyName, ulong value, Utf8JsonWriter writer) { - writer.WriteNumber(escapedPropertyName, value); + writer.WriteNumber(propertyName, value); } } } diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfo.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfo.cs index 07936ee7d9e9..bf778fe24a78 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfo.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfo.cs @@ -38,7 +38,7 @@ internal abstract class JsonPropertyInfo public string NameUsedToCompareAsString { get; private set; } // The escaped name passed to the writer. - public byte[] EscapedName { get; private set; } + public JsonEncodedText? EscapedName { get; private set; } public bool HasGetter { get; set; } public bool HasSetter { get; set; } @@ -171,36 +171,7 @@ private void DeterminePropertyName() } // Cache the escaped name. -#if true - // temporary behavior until the writer can accept escaped string. - EscapedName = Name; -#else - int valueIdx = JsonWriterHelper.NeedsEscaping(_name); - if (valueIdx == -1) - { - _escapedName = _name; - } - else - { - byte[] pooledName = null; - int length = JsonWriterHelper.GetMaxEscapedLength(_name.Length, valueIdx); - - Span escapedName = length <= JsonConstants.StackallocThreshold ? - stackalloc byte[length] : - (pooledName = ArrayPool.Shared.Rent(length)); - - JsonWriterHelper.EscapeString(_name, escapedName, 0, out int written); - - _escapedName = escapedName.Slice(0, written).ToArray(); - - if (pooledName != null) - { - // We clear the array because it is "user data" (although a property name). - new Span(pooledName, 0, written).Clear(); - ArrayPool.Shared.Return(pooledName); - } - } -#endif + EscapedName = JsonEncodedText.Encode(Name); } private void DetermineSerializationCapabilities() diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfoNotNullable.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfoNotNullable.cs index 6fdeb2d5f28d..da90283df6f9 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfoNotNullable.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfoNotNullable.cs @@ -78,18 +78,18 @@ public override void Write(ref WriteStackFrame current, Utf8JsonWriter writer) if (value == null) { - Debug.Assert(EscapedName != null); + Debug.Assert(EscapedName.HasValue); if (!IgnoreNullValues) { - writer.WriteNull(EscapedName); + writer.WriteNull(EscapedName.Value); } } else if (ValueConverter != null) { - if (EscapedName != null) + if (EscapedName.HasValue) { - ValueConverter.Write(EscapedName, value, writer); + ValueConverter.Write(EscapedName.Value, value, writer); } else { diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfoNullable.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfoNullable.cs index b52a828f6a3b..f3a65e781f74 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfoNullable.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfoNullable.cs @@ -77,18 +77,18 @@ public override void Write(ref WriteStackFrame current, Utf8JsonWriter writer) if (value == null) { - Debug.Assert(EscapedName != null); + Debug.Assert(EscapedName.HasValue); if (!IgnoreNullValues) { - writer.WriteNull(EscapedName); + writer.WriteNull(EscapedName.Value); } } else if (ValueConverter != null) { - if (EscapedName != null) + if (EscapedName.HasValue) { - ValueConverter.Write(EscapedName, value.GetValueOrDefault(), writer); + ValueConverter.Write(EscapedName.Value, value.GetValueOrDefault(), writer); } else { diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.HandleDictionary.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.HandleDictionary.cs index ccbccd531924..468aee8bf0b5 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.HandleDictionary.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.HandleDictionary.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; @@ -124,37 +125,8 @@ internal static void WriteDictionary( } else { - byte[] utf8Key = Encoding.UTF8.GetBytes(key); -#if true - // temporary behavior until the writer can accept escaped string. - converter.Write(utf8Key, value, writer); -#else - int valueIdx = JsonWriterHelper.NeedsEscaping(utf8Key); - if (valueIdx == -1) - { - converter.Write(utf8Key, value, writer); - } - else - { - byte[] pooledKey = null; - int length = JsonWriterHelper.GetMaxEscapedLength(utf8Key.Length, valueIdx); - - Span escapedKey = length <= JsonConstants.StackallocThreshold ? - stackalloc byte[length] : - (pooledKey = ArrayPool.Shared.Rent(length)); - - JsonWriterHelper.EscapeString(utf8Key, escapedKey, valueIdx, out int written); - - converter.Write(escapedKey.Slice(0, written), value, writer); - - if (pooledKey != null) - { - // We clear the array because it is "user data" (although a property name). - new Span(pooledKey, 0, written).Clear(); - ArrayPool.Shared.Return(pooledKey); - } - } -#endif + JsonEncodedText escapedKey = JsonEncodedText.Encode(key); + converter.Write(escapedKey, value, writer); } } diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.HandleObject.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.HandleObject.cs index 80275ee6fd67..3dc24aab0990 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.HandleObject.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.HandleObject.cs @@ -126,7 +126,7 @@ private static bool HandleObject( { if (!jsonPropertyInfo.IgnoreNullValues) { - writer.WriteNull(jsonPropertyInfo.EscapedName); + writer.WriteNull(jsonPropertyInfo.EscapedName.Value); } state.Current.NextProperty(); diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/Policies/JsonValueConverter.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/Policies/JsonValueConverter.cs index 3598e344281d..6a0cf5d535da 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/Policies/JsonValueConverter.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/Policies/JsonValueConverter.cs @@ -8,6 +8,6 @@ internal abstract class JsonValueConverter { public abstract bool TryRead(Type valueType, ref Utf8JsonReader reader, out TValue value); public abstract void Write(TValue value, Utf8JsonWriter writer); - public abstract void Write(Span escapedPropertyName, TValue value, Utf8JsonWriter writer); + public abstract void Write(JsonEncodedText propertyName, TValue value, Utf8JsonWriter writer); } } diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/WriteStackFrame.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/WriteStackFrame.cs index 660bb44056e9..f77bf4cca922 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/WriteStackFrame.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/WriteStackFrame.cs @@ -46,29 +46,14 @@ public void Initialize(Type type, JsonSerializerOptions options) public void WriteObjectOrArrayStart(ClassType classType, Utf8JsonWriter writer, bool writeNull = false) { - if (JsonPropertyInfo?.EscapedName != null) + if (JsonPropertyInfo?.EscapedName.HasValue == true) { - WriteObjectOrArrayStart(classType, JsonPropertyInfo?.EscapedName, writer, writeNull); + WriteObjectOrArrayStart(classType, JsonPropertyInfo.EscapedName.Value, writer, writeNull); } else if (KeyName != null) { - byte[] pooledKey = null; - byte[] utf8Key = Encoding.UTF8.GetBytes(KeyName); - int length = JsonWriterHelper.GetMaxEscapedLength(utf8Key.Length, 0); - - Span escapedKey = length <= JsonConstants.StackallocThreshold ? - stackalloc byte[length] : - (pooledKey = ArrayPool.Shared.Rent(length)); - - JsonWriterHelper.EscapeString(utf8Key, escapedKey, 0, out int written); - Span propertyName = escapedKey.Slice(0, written); - + JsonEncodedText propertyName = JsonEncodedText.Encode(KeyName); WriteObjectOrArrayStart(classType, propertyName, writer, writeNull); - - if (pooledKey != null) - { - ArrayPool.Shared.Return(pooledKey); - } } else { @@ -88,7 +73,7 @@ public void WriteObjectOrArrayStart(ClassType classType, Utf8JsonWriter writer, } } - private void WriteObjectOrArrayStart(ClassType classType, ReadOnlySpan propertyName, Utf8JsonWriter writer, bool writeNull) + private void WriteObjectOrArrayStart(ClassType classType, JsonEncodedText propertyName, Utf8JsonWriter writer, bool writeNull) { if (writeNull) { From 99c04b17dad34888148c50a488ab458aaf11d27f Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Thu, 30 May 2019 13:54:58 +0000 Subject: [PATCH 566/607] Update dependencies from https://github.com/dotnet/core-setup build 20190529.07 (#38055) - Microsoft.NETCore.App - 3.0.0-preview6-27729-07 - Microsoft.NETCore.DotNetHost - 3.0.0-preview6-27729-07 - Microsoft.NETCore.DotNetHostPolicy - 3.0.0-preview6-27729-07 --- eng/Version.Details.xml | 12 ++++++------ eng/Versions.props | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index bc1337b85025..e00b3a22bbf9 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -14,17 +14,17 @@ - + https://github.com/dotnet/core-setup - b2f8fc281df93b0ecb148224369b938d753d1616 + 798280671320c7613d34fadc88ec1b0e853d3d37 - + https://github.com/dotnet/core-setup - b2f8fc281df93b0ecb148224369b938d753d1616 + 798280671320c7613d34fadc88ec1b0e853d3d37 - + https://github.com/dotnet/core-setup - b2f8fc281df93b0ecb148224369b938d753d1616 + 798280671320c7613d34fadc88ec1b0e853d3d37 https://github.com/dotnet/corefx diff --git a/eng/Versions.props b/eng/Versions.props index 5d5489a6f243..a4252100bf6a 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -36,9 +36,9 @@ 2.2.0-beta.19278.1 1.0.0-beta.19278.1 - 3.0.0-preview6-27728-04 - 3.0.0-preview6-27728-04 - 3.0.0-preview6-27728-04 + 3.0.0-preview6-27729-07 + 3.0.0-preview6-27729-07 + 3.0.0-preview6-27729-07 3.0.0-preview6.19278.71 3.0.0-preview6.19278.71 From d29c16c99c6045ee67444a7a693dd4476861c463 Mon Sep 17 00:00:00 2001 From: Viktor Hofer Date: Tue, 28 May 2019 01:01:17 +0200 Subject: [PATCH 567/607] Replace netstandard test projects with tfms Netstandard test projects are broken by design and don't support the Microsoft.Net.Test.SDK. Replacing the netstandard tfm with the concrete implementation tfms. --- src/Common/tests/Common.Tests.csproj | 3 - .../System/Collections/DebugView.Tests.cs | 2 - .../System/Xml/XmlCoreTest/XmlCoreTest.csproj | 3 - .../tests/System/Xml/XmlDiff/XmlDiff.csproj | 3 - .../System/SpanExtensions.netstandard.cs | 17 - src/Common/tests/Tests/System/StringTests.cs | 35 +- .../tests/Configurations.props | 3 +- .../CoreFx.Private.TestUtilities.Tests.csproj | 2 +- .../tests/Configurations.props | 4 +- ...Microsoft.Bcl.AsyncInterfaces.Tests.csproj | 2 +- src/Microsoft.CSharp/tests/ArrayHandling.cs | 63 +-- .../tests/Configurations.props | 3 +- .../tests/Microsoft.CSharp.Tests.csproj | 2 +- .../FileIO/SpecialDirectoriesTests.cs | 2 - .../tests/OperatorsTests.cs | 1 - .../tests/Configurations.props | 3 +- .../Microsoft.Win32.Primitives.Tests.csproj | 2 +- .../tests/Configurations.props | 3 +- ...osoft.XmlSerializer.Generator.Tests.csproj | 4 +- .../tests/Configurations.props | 3 +- .../tests/System.AppContext.Tests.csproj | 2 +- .../tests/ArrayPool/CollectionTests.cs | 5 +- src/System.Buffers/tests/Configurations.props | 3 +- .../tests/System.Buffers.Tests.csproj | 2 +- src/System.CodeDom/tests/Configurations.props | 4 +- .../tests/System.CodeDom.Tests.csproj | 2 +- .../CodeDom/Compiler/CodeDomProviderTests.cs | 5 +- .../tests/BlockingCollectionTests.cs | 2 - .../ConcurrentDictionaryTests.cs | 26 - .../tests/Configurations.props | 2 +- .../tests/ProducerConsumerCollectionTests.cs | 2 - ...System.Collections.Concurrent.Tests.csproj | 16 +- .../tests/Configurations.props | 4 +- .../tests/ImmutableArrayBuilderTest.cs | 2 - .../tests/ImmutableArrayTest.cs | 3 - .../tests/ImmutableDictionaryBuilderTest.cs | 2 - .../tests/ImmutableDictionaryTest.cs | 8 +- .../tests/ImmutableHashSetBuilderTest.cs | 1 - .../tests/ImmutableHashSetTest.cs | 2 - .../tests/ImmutableListBuilderTest.cs | 2 - .../tests/ImmutableListTest.cs | 2 - .../tests/ImmutableQueueTest.cs | 2 - .../ImmutableSortedDictionaryBuilderTest.cs | 2 - .../tests/ImmutableSortedDictionaryTest.cs | 7 +- .../tests/ImmutableSortedSetBuilderTest.cs | 2 - .../tests/ImmutableSortedSetTest.cs | 2 - .../tests/ImmutableStackTest.cs | 2 - .../System.Collections.Immutable.Tests.csproj | 6 +- .../tests/TestExtensionsMethods.cs | 5 +- .../tests/ArrayListTests.cs | 2 - .../tests/Configurations.props | 3 +- .../tests/HashtableTests.cs | 2 - .../tests/QueueTests.cs | 3 - .../tests/ReadOnlyCollectionBaseTests.cs | 1 - .../tests/SortedListTests.cs | 6 - .../tests/StackTests.cs | 3 - ...System.Collections.NonGeneric.Tests.csproj | 2 +- .../tests/Configurations.props | 3 +- .../tests/StringCollectionTests.cs | 1 - .../StringDictionary.SyncRootTests.cs | 1 - ...ystem.Collections.Specialized.Tests.csproj | 2 +- .../tests/BitArray/BitArray_CtorTests.cs | 1 - .../tests/BitArray/BitArray_GetSetTests.cs | 37 -- .../tests/Configurations.props | 2 +- .../Comparers/Comparer.Generic.Tests.cs | 1 - .../EqualityComparer.Generic.Tests.cs | 1 - .../Dictionary/Dictionary.Generic.Tests.cs | 4 +- .../Generic/SortedList/SortedList.Tests.cs | 1 - .../SortedSet/SortedSet.Generic.Tests.cs | 12 - .../tests/System.Collections.Tests.csproj | 5 +- .../tests/Configurations.props | 3 +- ...em.ComponentModel.Annotations.Tests.csproj | 4 +- .../src/Configurations.props | 1 - .../tests/Configurations.props | 1 - .../Registration/ExportBuilderTests.cs | 1 - .../Registration/ExportBuilderUnitTests.cs | 4 - .../Registration/ImportBuilderTests.cs | 1 - .../PartBuilderInheritanceTests.cs | 1 - .../Registration/PartBuilderInterfaceTests.cs | 2 - .../PartBuilderOfTInheritanceTests.cs | 1 - .../Registration/PartBuilderOfTTests.cs | 13 - .../Registration/PartBuilderTests.cs | 15 - .../Registration/PartBuilderUnitTests.cs | 6 - .../RegistrationBuilderExportFuncTests.cs | 1 - .../Registration/RegistrationBuilderTests.cs | 6 - .../tests/Configurations.props | 1 - .../Configurations.props | 1 - ...nentModel.Composition.Noop.Assembly.csproj | 2 +- ...em.ComponentModel.Composition.Tests.csproj | 3 - .../Composition/CompositionErrorIdTests.cs | 1 - .../Composition/CompositionExceptionTests.cs | 8 - .../FilteredCatalogTransitiveClosureTests.cs | 1 - .../Composition/Hosting/ImportEngineTests.cs | 1 - .../Composition/MetadataViewProviderTests.cs | 1 - .../Integration/AdaptingCollectionTests.cs | 1 - .../Integration/CatalogFilteringTests.cs | 1 - .../tests/Configurations.props | 3 +- ...omponentModel.EventBasedAsync.Tests.csproj | 5 +- .../tests/Configurations.props | 3 +- ...tem.ComponentModel.Primitives.Tests.csproj | 2 +- .../ComponentModel/CategoryAttributeTests.cs | 3 - .../tests/ArrayConverterTests.cs | 1 - .../tests/CollectionConverterTests.cs | 1 - .../tests/ComponentResourceManagerTests.cs | 1 - .../tests/Configurations.props | 3 +- .../tests/ContainerTests.cs | 61 +-- .../tests/ContextStackTests.cs | 36 +- .../tests/CultureInfoConverterTests.cs | 33 +- .../tests/Design/DesignerCollectionTests.cs | 2 - .../Design/DesignerOptionServiceTests.cs | 1 - .../tests/Design/ServiceContainerTests.cs | 1 - .../tests/Drawing/SizeFConverterTests.cs | 30 -- .../tests/EnumConverterTest.cs | 6 - .../tests/MemberDescriptorTests.cs | 1 - ....ComponentModel.TypeConverter.Tests.csproj | 4 +- .../tests/TypeConverterTestBase.cs | 1 - .../tests/Configurations.props | 3 +- .../tests/System.ComponentModel.Tests.csproj | 2 +- .../tests/Configurations.props | 4 +- ...em.Composition.AttributeModel.Tests.csproj | 2 +- .../tests/Configurations.props | 4 +- ...System.Composition.Convention.Tests.csproj | 2 +- .../tests/Configurations.props | 4 +- .../System.Composition.Hosting.Tests.csproj | 2 +- .../tests/Configurations.props | 4 +- .../System.Composition.Runtime.Tests.csproj | 2 +- .../tests/Configurations.props | 4 +- .../tests/ContainerConfigurationTests.cs | 1 - ...System.Composition.TypedParts.Tests.csproj | 2 +- .../tests/Configurations.props | 4 +- src/System.Composition/tests/ContractTests.cs | 2 - .../tests/DiscoveryTests.cs | 3 - .../tests/ErrorMessageQualityTests.cs | 2 - .../tests/ExportFactoryTests.cs | 1 - .../tests/MetadataViewGenerationTests.cs | 2 - .../tests/OpenGenericsTests.cs | 2 - src/System.Composition/tests/SharingTests.cs | 3 - .../tests/System.Composition.Tests.csproj | 2 +- .../tests/TestLibrary/Configurations.props | 2 - .../tests/TestLibrary/TestLibrary.csproj | 2 +- .../tests/Configurations.props | 4 +- ...guration.ConfigurationManager.Tests.csproj | 2 +- .../TimeSpanValidatorAttributeTests.cs | 2 - src/System.Console/tests/Configurations.props | 6 +- src/System.Console/tests/ConsoleEncoding.cs | 4 - .../tests/ConsoleKeyInfoTests.cs | 1 - src/System.Console/tests/ReadAndWrite.cs | 2 - src/System.Console/tests/SyncTextReader.cs | 1 - .../tests/System.Console.Tests.csproj | 2 +- .../tests/WindowAndCursorProps.cs | 11 - .../tests/Configurations.props | 2 +- .../tests/System.Data.Common.Tests.csproj | 6 +- .../tests/Configurations.props | 3 +- ...System.Data.DataSetExtensions.Tests.csproj | 4 +- .../FunctionalTests/Configurations.props | 4 +- .../tests/FunctionalTests/DiagnosticTest.cs | 42 +- .../System.Data.SqlClient.Tests.csproj | 4 +- .../tests/ManualTests/Configurations.props | 2 +- .../DataCommon/AssemblyResourceManager.cs | 26 +- ....Data.SqlClient.ManualTesting.Tests.csproj | 2 +- .../Configurations.props | 6 +- .../System.Data.SqlClient.Stress.Tests.csproj | 4 +- .../tests/Configurations.props | 3 +- .../System.Diagnostics.Contracts.Tests.csproj | 2 +- .../tests/Utilities.cs | 5 +- .../tests/Configurations.props | 2 +- .../System.Diagnostics.Debug.Tests.csproj | 5 +- .../tests/Configurations.props | 5 +- .../DiagnosticSourceEventSourceBridgeTests.cs | 3 +- ....Diagnostics.DiagnosticSource.Tests.csproj | 4 +- .../Configurations.props | 5 +- ...m.Diagnostics.FileVersionInfo.Tests.csproj | 2 +- .../tests/Configurations.props | 3 - .../tests/ProcessModuleTests.cs | 2 +- .../tests/ProcessStandardConsoleTests.cs | 2 +- .../tests/ProcessStartInfoTests.cs | 32 +- .../tests/ProcessStreamReadTests.cs | 3 - .../tests/ProcessTests.cs | 27 +- .../tests/ProcessWaitingTests.cs | 4 +- .../System.Diagnostics.Process.Tests.csproj | 2 +- .../tests/Configurations.props | 3 +- .../tests/StackFrameExtensionsTests.cs | 1 - .../tests/StackFrameTests.cs | 5 - .../tests/StackTraceTests.cs | 26 - ...System.Diagnostics.StackTrace.Tests.csproj | 2 +- .../tests/Configurations.props | 3 +- ...stics.TextWriterTraceListener.Tests.csproj | 4 +- .../tests/XmlWriterTraceListenerTests.cs | 17 +- .../tests/Configurations.props | 3 +- .../System.Diagnostics.Tools.Tests.csproj | 2 +- .../tests/Configurations.props | 3 +- ...ystem.Diagnostics.TraceSource.Tests.csproj | 2 +- .../tests/TraceClassTests.cs | 3 +- .../tests/TraceEventCacheClassTests.cs | 1 - .../BasicEventSourceTest/TestEventCounter.cs | 1 - .../TestsEventSourceLifetime.cs | 1 - .../TestsManifestNegative.cs | 20 +- .../TestsUserErrors.Etw.cs | 1 - .../BasicEventSourceTest/TestsUserErrors.cs | 11 +- .../tests/SortRequestControlTests.cs | 1 - .../tests/Configurations.props | 4 +- .../ActiveDirectoryInterSiteTransportTests.cs | 2 - .../ActiveDirectory/DomainControllerTests.cs | 1 - .../ActiveDirectory/ForestTests.cs | 1 - .../ActiveDirectorySecurityTests.cs | 2 +- .../DirectoryServices/DirectoryEntryTests.cs | 2 - .../tests/ColorTests.cs | 2 - .../tests/Configurations.props | 3 +- .../System.Drawing.Primitives.Tests.csproj | 2 +- .../tests/Configurations.props | 3 +- .../tests/System.Dynamic.Runtime.Tests.csproj | 2 +- .../tests/Configurations.props | 2 +- ...ystem.Globalization.Calendars.Tests.csproj | 2 +- .../System/Globalization/CalendarTestBase.cs | 16 +- .../KoreanLunisolarCalendarTests.cs | 2 +- .../tests/Configurations.props | 3 +- .../Normalization/StringNormalizationTests.cs | 2 - ...stem.Globalization.Extensions.Tests.csproj | 2 +- .../tests/CompareInfo/CompareInfoTests.cs | 33 +- .../CompareInfoTests.netcoreapp.cs | 42 -- .../tests/Configurations.props | 1 - .../tests/CultureInfo/CultureInfoAsync.cs | 6 - .../CultureInfo/CultureInfoCurrentCulture.cs | 6 - ...FormatInfoAbbreviatedMonthGenitiveNames.cs | 1 - .../tests/System.Globalization.Tests.csproj | 5 +- .../System/Globalization/TextInfoTests.cs | 3 - .../tests/Configurations.props | 2 +- ...System.IO.Compression.ZipFile.Tests.csproj | 5 +- .../tests/ZipFile.Create.cs | 2 +- .../tests/ZipFile.Extract.cs | 1 - .../tests/ZipArchive/zip_CreateTests.cs | 2 - .../zip_ManualAndCompatibilityTests.cs | 2 - .../tests/Configurations.props | 4 +- ...m.IO.FileSystem.AccessControl.Tests.csproj | 2 +- .../tests/Configurations.props | 5 +- ...ystem.IO.FileSystem.DriveInfo.Tests.csproj | 2 +- .../tests/Configurations.props | 3 +- ...stem.IO.FileSystem.Primitives.Tests.csproj | 2 +- .../tests/Args.RenamedEventArgs.cs | 2 - .../tests/Configurations.props | 3 - .../FileSystemWatcher.Directory.Changed.cs | 1 - .../FileSystemWatcher.MultipleWatchers.cs | 2 - .../tests/FileSystemWatcher.WaitForChanged.cs | 1 - .../tests/FileSystemWatcher.unit.cs | 504 +++++++++++++++++- .../FileSystemWatcher.unit.netcoreapp.cs | 503 ----------------- .../System.IO.FileSystem.Watcher.Tests.csproj | 9 +- .../tests/Utility/FileSystemWatcherTest.cs | 18 + .../FileSystemWatcherTest.netcoreapp.cs | 30 -- .../FileSystemWatcherTest.netstandard.cs | 23 - .../tests/Base/FileGetSetAttributes.cs | 1 - .../tests/Configurations.props | 2 - .../tests/Directory/CreateDirectory.cs | 125 +---- .../tests/Directory/Delete.cs | 1 - .../tests/Directory/EnumerableTests.cs | 1 - .../tests/Directory/Exists.cs | 13 - .../Directory/GetFileSystemEntries_str.cs | 40 -- .../Directory/GetFileSystemEntries_str_str.cs | 241 +-------- .../tests/Directory/GetFiles.cs | 2 - .../tests/Directory/Move.cs | 12 - .../tests/DirectoryInfo/CreateSubdirectory.cs | 24 - .../tests/DirectoryInfo/ToString.cs | 1 - src/System.IO.FileSystem/tests/File/Copy.cs | 19 - src/System.IO.FileSystem/tests/File/Create.cs | 42 +- src/System.IO.FileSystem/tests/File/Delete.cs | 1 - .../tests/File/EncryptDecrypt.cs | 1 - src/System.IO.FileSystem/tests/File/Exists.cs | 15 - .../tests/File/GetSetAttributes.cs | 1 - src/System.IO.FileSystem/tests/File/Move.cs | 57 -- .../tests/FileInfo/Open.cs | 2 - .../tests/FileStream/CopyToAsync.cs | 30 +- .../tests/FileStream/Dispose.cs | 1 - .../tests/FileStream/IsAsync.cs | 1 - .../tests/FileStream/ReadAsync.cs | 1 - .../tests/FileStream/SafeFileHandle.cs | 1 - .../tests/FileStream/WriteAsync.cs | 1 - .../tests/FileStream/ctor_sfh_fa.cs | 2 - .../tests/FileStream/ctor_sfh_fa_buffer.cs | 1 - .../FileStream/ctor_sfh_fa_buffer_async.cs | 1 - .../tests/System.IO.FileSystem.Tests.csproj | 4 +- .../tests/Configurations.props | 2 - .../System.IO.IsolatedStorage.Tests.csproj | 2 +- .../ContainsUnknownFilesTests.cs | 5 - .../IO/IsolatedStorage/CopyFileTests.cs | 15 - .../IsolatedStorage/CreateDirectoryTests.cs | 13 - .../IO/IsolatedStorage/CreateFileTests.cs | 13 - .../IsolatedStorage/DeleteDirectoryTests.cs | 3 - .../IO/IsolatedStorage/DeleteFileTests.cs | 2 - .../IsolatedStorage/DirectoryExistsTests.cs | 13 - .../IO/IsolatedStorage/FileExistsTests.cs | 13 - .../IsolatedStorage/GetCreationTimeTests.cs | 2 - .../IO/IsolatedStorage/GetFileNamesTests.cs | 14 - .../IsolatedStorage/GetLastAccessTimeTests.cs | 2 - .../IsolatedStorage/GetLastWriteTimeTests.cs | 2 - .../IO/IsolatedStorage/GetStoreTests.cs | 8 - .../System/IO/IsolatedStorage/HelperTests.cs | 2 - .../IO/IsolatedStorage/IdentityTests.cs | 1 - .../IO/IsolatedStorage/IsoStorageTest.cs | 1 - .../IsolatedStorageBaseClassTests.cs | 1 - ...olatedStorageFileStreamTests.netcoreapp.cs | 1 - .../IO/IsolatedStorage/MoveDirectoryTests.cs | 15 - .../IO/IsolatedStorage/MoveFileTests.cs | 15 - .../IO/IsolatedStorage/OpenFileTests.cs | 18 - .../System/IO/IsolatedStorage/RemoveTests.cs | 5 - .../tests/Configurations.props | 5 +- .../MemoryMappedFile.CreateFromFile.Tests.cs | 10 - .../System.IO.MemoryMappedFiles.Tests.csproj | 2 +- .../tests/Configurations.props | 4 +- .../tests/System.IO.Packaging.Tests.csproj | 2 +- .../tests/Configurations.props | 3 +- .../Infrastructure/CancelledReadsStream.cs | 2 +- .../Infrastructure/CancelledWritesStream.cs | 2 +- .../Infrastructure/ThrowAfterNWritesStream.cs | 2 +- .../tests/StreamPipeReaderTests.cs | 2 +- .../tests/System.IO.Pipelines.Tests.csproj | 6 +- .../NamedPipeTest.AclExtensions.cs | 12 +- .../tests/PipeTest.AclExtensions.cs | 10 +- .../AnonymousPipeTest.Specific.cs | 1 - .../tests/Configurations.props | 3 +- .../NamedPipeTest.CreateServer.cs | 18 - .../NamedPipeTest.CrossProcess.cs | 2 +- .../NamedPipeTests/NamedPipeTest.Read.cs | 8 +- .../NamedPipeTest.RunAsClient.Windows.cs | 2 +- .../NamedPipeTests/NamedPipeTest.Simple.cs | 14 +- .../NamedPipeTests/NamedPipeTest.Specific.cs | 4 +- .../NamedPipeTests/NamedPipeTest.Write.cs | 6 +- src/System.IO.Pipes/tests/PipeTest.Read.cs | 1 - .../tests/PipeTest.Read.netcoreapp.cs | 1 - src/System.IO.Pipes/tests/PipeTest.Write.cs | 1 - .../tests/System.IO.Pipes.Tests.csproj | 2 +- .../tests/Configurations.props | 7 +- .../tests/System.IO.Ports.Tests.csproj | 2 +- .../tests/Configurations.props | 2 +- ...stem.IO.UnmanagedMemoryStream.Tests.csproj | 2 +- .../tests/UmsSecurityTest.cs | 1 - .../tests/BinaryReader/BinaryReaderTests.cs | 1 - src/System.IO/tests/Configurations.props | 2 +- .../MemoryStream.GetBufferTests.cs | 1 - .../StreamWriter/StreamWriter.CtorTests.cs | 11 - .../StreamWriter/StreamWriter.WriteTests.cs | 1 - .../tests/StringWriter/StringWriterTests.cs | 1 - src/System.IO/tests/System.IO.Tests.csproj | 2 +- .../tests/TextReader/TextReaderTests.cs | 1 - src/System.Json/tests/Configurations.props | 4 +- .../tests/System.Json.Tests.csproj | 2 +- .../tests/Array/NewArrayBoundsTests.cs | 8 +- .../tests/Block/BlockFactoryTests.cs | 5 +- .../tests/Call/CallFactoryTests.cs | 24 +- .../tests/Call/CallTests.cs | 5 +- .../tests/Configurations.props | 1 - .../ExpressionDebuggerTypeProxyTests.cs | 5 +- .../Dynamic/BindingRestrictionsProxyTests.cs | 5 +- .../tests/Dynamic/ExpandoObjectProxyTests.cs | 5 +- .../DynamicExpressionTests.cs | 2 - .../tests/Invoke/InvokeFactoryTests.cs | 5 +- .../tests/SequenceTests/SequenceTests.cs | 1 - .../tests/StackSpillerTests.cs | 50 -- .../System.Linq.Expressions.Tests.csproj | 9 +- ...ncellationParallelQueryCombinationTests.cs | 1 - .../ParallelQueryCombinationTests.cs | 4 - .../tests/Configurations.props | 1 - .../tests/QueryOperators/CastTests.cs | 1 - .../tests/QueryOperators/GroupJoinTests.cs | 8 - .../tests/QueryOperators/JoinTests.cs | 12 - .../QueryOperators/OrderByThenByTests.cs | 7 - .../tests/QueryOperators/SumTests.cs | 2 - .../tests/QueryOperators/ToArrayTests.cs | 1 - .../tests/System.Linq.Parallel.Tests.csproj | 4 +- .../tests/Configurations.props | 2 +- .../tests/EnumerableQueryTests.cs | 1 - .../tests/QueryFromExpressionTests.cs | 18 +- .../tests/System.Linq.Queryable.Tests.csproj | 2 +- src/System.Linq/tests/ConcatTests.cs | 16 +- src/System.Linq/tests/Configurations.props | 2 - src/System.Linq/tests/ConsistencyTests.cs | 9 - src/System.Linq/tests/EmptyPartitionTests.cs | 3 +- .../tests/GroupByTests.DebuggerAttributes.cs | 1 - src/System.Linq/tests/MinTests.cs | 20 +- .../tests/OrderByDescendingTests.cs | 9 +- src/System.Linq/tests/SelectManyTests.cs | 2 +- src/System.Linq/tests/SelectTests.cs | 9 +- src/System.Linq/tests/ShortCircuitingTests.cs | 26 +- .../tests/System.Linq.Tests.csproj | 10 +- src/System.Linq/tests/ToArrayTests.cs | 7 +- .../tests/ToLookupTests.DebuggerAttributes.cs | 1 - src/System.Linq/tests/WhereTests.cs | 9 +- .../tests/Configurations.props | 4 +- .../tests/Memory/MemoryManager.cs | 1 - .../MemoryMarshal/CreateFromPinnedArray.cs | 2 - .../tests/ReadOnlySpan/ToString.cs | 15 - .../tests/System.Memory.Tests.csproj | 5 - .../FunctionalTests/Configurations.props | 4 +- ...ttp.WinHttpHandler.Functional.Tests.csproj | 2 +- .../FunctionalTests/Configurations.props | 2 - .../tests/FunctionalTests/DiagnosticsTests.cs | 2 - .../HttpClientHandlerTest.AutoRedirect.cs | 19 +- .../HttpClientHandlerTest.Cancellation.cs | 8 +- ...ttpClientHandlerTest.ClientCertificates.cs | 1 - .../HttpClientHandlerTest.Cookies.cs | 10 +- ...ientHandlerTest.DefaultProxyCredentials.cs | 1 - ...ientHandlerTest.MaxConnectionsPerServer.cs | 2 - .../HttpClientHandlerTest.Proxy.cs | 8 - ...ttpClientHandlerTest.ServerCertificates.cs | 1 - .../HttpClientHandlerTest.SslProtocols.cs | 5 - .../FunctionalTests/HttpClientHandlerTest.cs | 57 +- .../HttpClientHandlerTestBase.cs | 6 +- .../tests/FunctionalTests/HttpClientTest.cs | 13 +- .../tests/FunctionalTests/HttpContentTest.cs | 1 - .../FunctionalTests/HttpProtocolTests.cs | 22 +- .../HttpResponseMessageTest.cs | 1 - .../FunctionalTests/HttpRetryProtocolTests.cs | 1 - .../FunctionalTests/MultipartContentTest.cs | 20 +- .../FunctionalTests/PlatformHandlerTest.cs | 2 +- .../tests/FunctionalTests/PostScenarioTest.cs | 2 - .../System.Net.Http.Functional.Tests.csproj | 7 +- .../tests/Configurations.props | 7 +- .../tests/HttpListenerAuthenticationTests.cs | 2 - .../HttpListenerPrefixCollectionTests.cs | 12 - .../tests/HttpListenerRequestTests.cs | 39 +- .../HttpListenerResponseTests.Cookies.cs | 15 +- .../tests/HttpListenerTimeoutManagerTests.cs | 2 +- .../tests/HttpListenerWebSocketTests.cs | 4 +- .../System.Net.HttpListener.Tests.csproj | 2 +- .../tests/Functional/Configurations.props | 3 +- .../tests/Functional/HeaderCollectionTest.cs | 4 - .../tests/Functional/LoggingTest.cs | 4 - .../tests/Functional/MailMessageTest.cs | 1 - .../tests/Functional/SmtpClientTest.cs | 14 - .../System.Net.Mail.Functional.Tests.csproj | 2 +- .../tests/Unit/NTAuthenticationStubTests.cs | 1 - .../FunctionalTests/Configurations.props | 5 +- .../tests/FunctionalTests/LoggingTest.cs | 2 - ...Net.NameResolution.Functional.Tests.csproj | 2 +- .../FunctionalTests/Configurations.props | 3 +- .../tests/FunctionalTests/LoggingTest.cs | 2 - .../FunctionalTests/PhysicalAddressTest.cs | 1 - ...NetworkInformation.Functional.Tests.csproj | 2 +- .../FunctionalTests/Configurations.props | 5 +- .../tests/FunctionalTests/LoggingTest.cs | 2 - .../System.Net.Ping.Functional.Tests.csproj | 2 +- .../FunctionalTests/Configurations.props | 3 +- .../FunctionalTests/CookieContainerTest.cs | 1 - .../tests/FunctionalTests/CookieTest.cs | 10 - .../tests/FunctionalTests/IPAddressTest.cs | 1 - .../tests/FunctionalTests/LoggingTest.cs | 4 - ...tem.Net.Primitives.Functional.Tests.csproj | 2 +- .../tests/UnitTests/CookieContainerTest.cs | 1 - .../tests/AuthenticationManagerTest.cs | 3 +- .../tests/Configurations.props | 3 +- .../tests/FileWebRequestTest.cs | 1 - .../tests/GlobalProxySelectionTest.cs | 11 +- .../tests/HttpWebRequestTest.cs | 24 +- .../tests/HttpWebResponseHeaderTest.cs | 29 +- .../tests/HttpWebResponseTest.cs | 4 - src/System.Net.Requests/tests/LoggingTest.cs | 2 - .../tests/RequestStreamTest.cs | 1 - .../tests/System.Net.Requests.Tests.csproj | 2 +- .../ClientAsyncAuthenticateTest.cs | 1 - .../FunctionalTests/Configurations.props | 4 +- .../tests/FunctionalTests/LoggingTest.cs | 4 - .../NegotiateStreamStreamToStreamTest.cs | 2 - .../SslStreamStreamToStreamTest.cs | 3 - .../System.Net.Security.Tests.csproj | 3 +- .../tests/Configurations.props | 2 +- .../tests/ServicePointManagerTest.cs | 3 - .../System.Net.ServicePoint.Tests.csproj | 2 +- .../tests/FunctionalTests/Accept.cs | 1 - .../ArgumentValidationTests.cs | 10 - .../FunctionalTests/Configurations.props | 3 +- .../FunctionalTests/CreateSocketTests.cs | 1 - .../IPPacketInformationTest.cs | 2 - .../tests/FunctionalTests/LoggingTest.cs | 4 - .../FunctionalTests/NetworkStreamTest.cs | 1 - .../tests/FunctionalTests/OSSupport.cs | 2 - .../tests/FunctionalTests/SendPacketsAsync.cs | 3 - .../SocketAsyncEventArgsTest.cs | 1 - .../FunctionalTests/SocketInformationTest.cs | 1 - .../System.Net.Sockets.Tests.csproj | 22 +- .../tests/FunctionalTests/TcpClientTest.cs | 3 - .../tests/FunctionalTests/UdpClientTest.cs | 1 - .../Configurations.props | 5 +- ...stem.Net.Sockets.Async.Stress.Tests.csproj | 2 +- .../tests/Configurations.props | 3 +- .../tests/System.Net.WebClient.Tests.csproj | 2 +- .../tests/Configurations.props | 3 +- .../tests/LoggingTest.cs | 2 - ...ystem.Net.WebHeaderCollection.Tests.csproj | 2 +- .../tests/WebHeaderCollectionTest.cs | 5 - .../tests/Configurations.props | 3 +- .../tests/System.Net.WebProxy.Tests.csproj | 2 +- src/System.Net.WebProxy/tests/WebProxyTest.cs | 2 - .../tests/CancelTest.cs | 2 - .../tests/ClientWebSocketOptionsTests.cs | 6 +- .../tests/ClientWebSocketUnitTest.cs | 41 +- .../tests/Configurations.props | 3 +- .../tests/ConnectTest.cs | 3 +- .../tests/LoggingTest.cs | 2 - .../tests/SendReceiveTest.cs | 1 - .../System.Net.WebSockets.Client.Tests.csproj | 2 +- .../tests/Configurations.props | 3 +- ....WebSockets.WebSocketProtocol.Tests.csproj | 2 +- .../tests/Configurations.props | 2 +- .../tests/System.Net.WebSockets.Tests.csproj | 2 +- .../tests/WebSocketExceptionTests.cs | 7 - .../tests/WebSocketTests.cs | 1 - .../tests/Matrix4x4Tests.cs | 3 - .../tests/Vector2Tests.cs | 69 +-- .../tests/Vector3Tests.cs | 59 -- .../tests/Vector4Tests.cs | 59 -- .../tests/Configurations.props | 2 - ...eCollection_ConstructorAndPropertyTests.cs | 4 - .../ObservableCollection_Serialization.cs | 1 - .../ReadOnlyDictionaryTests.cs | 3 - .../ReadOnlyObservableCollectionTests.cs | 4 - .../tests/System.ObjectModel.Tests.csproj | 2 +- .../TypeConverterAttributeTests.cs | 16 - .../Configurations.props | 3 +- ...rivate.Uri.ExtendedFunctional.Tests.csproj | 2 +- .../FunctionalTests/Configurations.props | 3 +- .../IriEncodingDecodingTests.cs | 9 - .../tests/FunctionalTests/IriTest.cs | 7 - ...System.Private.Uri.Functional.Tests.csproj | 2 +- .../tests/FunctionalTests/UriBuilderTests.cs | 2 - .../tests/FunctionalTests/UriEscapingTest.cs | 2 - .../UriIsWellFormedUriStringTest.cs | 3 - .../UriRelativeResolutionTest.cs | 1 - .../tests/FunctionalTests/UriTests.cs | 3 - .../tests/SDMSample/Configurations.props | 7 + .../tests/SDMSample/SDMAttribute.cs | 24 - .../tests/SDMSample/SDMElement.cs | 24 - .../System.Xml.Linq.SDMSample.Tests.csproj | 2 +- .../tests/events/Configurations.props | 3 +- .../System.Xml.Linq.Events.Tests.csproj | 2 +- .../tests/misc/Configurations.props | 2 +- .../misc/System.Xml.Linq.Misc.Tests.csproj | 4 +- .../tests/xNodeBuilder/CommonTests.cs | 47 +- .../tests/xNodeBuilder/Configurations.props | 2 +- .../tests/xNodeBuilder/ErrorConditions.cs | 3 - .../System.Xml.Linq.xNodeBuilder.Tests.csproj | 2 +- .../tests/Misc/Configurations.props | 3 +- .../tests/Misc/RandomizedHashing.cs | 4 - .../tests/Misc/System.Xml.Misc.Tests.csproj | 2 +- .../CharCheckingReader/Configurations.props | 3 +- ...tem.Xml.RW.CharCheckingReader.Tests.csproj | 2 +- .../Readers/CustomReader/Configurations.props | 3 +- .../System.Xml.RW.CustomReader.Tests.csproj | 2 +- .../FactoryReader/Configurations.props | 3 +- .../System.Xml.RW.FactoryReader.Tests.csproj | 2 +- .../Readers/NameTable/Configurations.props | 3 +- .../System.Xml.RW.NameTable.Tests.csproj | 2 +- .../ReaderSettings/Configurations.props | 3 +- .../System.Xml.RW.ReaderSettings.Tests.csproj | 2 +- .../SubtreeReader/Configurations.props | 3 +- .../System.Xml.RW.SubtreeReader.Tests.csproj | 2 +- .../WrappedReader/Configurations.props | 3 +- .../System.Xml.RW.WrappedReader.Tests.csproj | 2 +- .../Writers/RwFactory/Configurations.props | 3 +- .../System.Xml.RW.RwFactory.Tests.csproj | 2 +- .../Writers/XmlWriterApi/Configurations.props | 3 +- .../System.Xml.RW.XmlWriterApi.Tests.csproj | 2 +- .../Writers/XmlWriterApi/TCFullEndElement.cs | 39 -- .../XPath/XPathDocument/Configurations.props | 3 +- .../System.Xml.XPath.Tests.csproj | 2 +- .../XPath/XmlDocument/Configurations.props | 3 +- .../System.Xml.XPath.XmlDocument.Tests.csproj | 2 +- .../tests/XmlConvert/Configurations.props | 3 +- .../System.Xml.RW.XmlConvert.Tests.csproj | 2 +- .../tests/XmlDocument/Configurations.props | 3 +- .../System.Xml.XmlDocument.Tests.csproj | 2 +- .../InsertAfterTests.cs | 47 -- .../SetNamedItemTests.cs | 1 - .../XmlNamedNodeMapTests/SetNamedItemTests.cs | 1 - .../Configurations.props | 3 +- .../System.Xml.XmlNodeReader.Tests.csproj | 2 +- .../ReadContentAs/Configurations.props | 3 +- ...ml.RW.XmlReader.ReadContentAs.Tests.csproj | 2 +- .../Tests/AsyncReaderLateInitTests.cs | 2 +- .../XmlReader/Tests/Configurations.props | 3 +- .../XmlReader/Tests/ReaderEncodingTests.cs | 2 - .../System.Xml.RW.XmlReader.Tests.csproj | 2 +- .../XmlResolver/Configurations.props | 3 +- ....Xml.RW.XmlSystemPathResolver.Tests.csproj | 2 +- .../tests/XmlReaderLib/Configurations.props | 3 +- .../Configurations.props | 3 +- .../System.Xml.XmlResolver.Tests.csproj | 2 +- .../XmlSchemaSet/Configurations.props | 3 +- .../System.Xml.XmlSchemaSet.Tests.csproj | 2 +- .../XmlSchemaSet/TC_SchemaSet_Misc.cs | 5 +- .../XmlSchemaSet/TC_SchemaSet_XmlResolver.cs | 1 - .../Configurations.props | 3 +- .../ExceptionVerifier.cs | 22 +- ...lSchema.XmlSchemaValidatorApi.Tests.csproj | 2 +- .../XmlSchemaValidatorApi/ValidateElement.cs | 1 - .../tests/XmlSerializer/Configurations.props | 4 +- .../ReflectionOnly/Configurations.props | 4 +- ....XmlSerializer.ReflectionOnly.Tests.csproj | 2 +- .../System.Xml.XmlSerializer.Tests.csproj | 2 +- .../XmlSerializerTests.Internal.cs | 2 - .../XmlSerializerTests.RuntimeOnly.cs | 46 -- .../tests/XmlSerializer/XmlSerializerTests.cs | 16 +- .../tests/XmlWriter/Configurations.props | 3 +- .../System.Xml.RW.XmlWriter.Tests.csproj | 2 +- .../XmlWriter/WriteWithInvalidSurrogate.cs | 1 - .../Configurations.props | 1 - ...l.Xsl.XslCompiledTransformApi.Tests.csproj | 6 +- .../XsltArgumentList.cs | 47 -- .../XslCompiledTransformApi/XsltSettings.cs | 32 -- .../Xslt/XslTransformApi/CXslTArgumentList.cs | 2 +- .../Xslt/XslTransformApi/CXslTransform.cs | 29 +- .../Xslt/XslTransformApi/Configurations.props | 3 +- .../Xslt/XslTransformApi/ExceptionVerifier.cs | 21 +- ...ystem.Xml.Xsl.XslTransformApi.Tests.csproj | 2 +- .../tests/Configurations.props | 3 +- .../tests/DispatchProxyTests.cs | 7 - ...stem.Reflection.DispatchProxy.Tests.csproj | 2 +- .../tests/Configurations.props | 3 +- .../System.Reflection.Extensions.Tests.csproj | 2 +- .../tests/Configurations.props | 2 +- .../Decoding/SignatureDecoderTests.cs | 14 +- .../System.Reflection.Metadata.Tests.csproj | 2 +- .../tests/Configurations.props | 3 +- ...eflection.MetadataLoadContext.Tests.csproj | 2 +- .../tests/src/TestUtils/NetStandardBridge.cs | 2 +- .../tests/Configurations.props | 3 +- .../tests/CoreCLR/MemberInfoTests.CoreCLR.cs | 12 +- ...tem.Reflection.TypeExtensions.Tests.csproj | 2 +- .../tests/AssemblyNameTests.cs | 10 - src/System.Reflection/tests/AssemblyTests.cs | 101 +--- .../tests/AssemblyTests.netcoreapp.cs | 10 - .../tests/Configurations.props | 2 +- .../tests/ConstructorInfoTests.cs | 1 - .../tests/ManifestResourceInfoTests.cs | 3 - src/System.Reflection/tests/ModuleTests.cs | 1 - .../tests/ParameterInfoTests.cs | 7 +- .../tests/System.Reflection.Tests.csproj | 4 +- .../tests/Configurations.props | 4 +- .../System.Resources.Extensions.Tests.csproj | 2 +- .../tests/Configurations.props | 3 +- .../System.Resources.Reader.Tests.csproj | 2 +- .../tests/Configurations.props | 2 +- .../tests/ResourceManagerTests.cs | 7 +- ...tem.Resources.ResourceManager.Tests.csproj | 2 +- .../tests/Configurations.props | 3 +- .../System.Resources.Writer.Tests.csproj | 3 +- .../tests/Configurations.props | 4 +- ...ntime.CompilerServices.Unsafe.Tests.csproj | 2 +- .../tests/Configurations.props | 3 +- ...time.CompilerServices.VisualC.Tests.csproj | 2 +- .../tests/Configurations.props | 2 - .../System.Runtime.Extensions.Tests.csproj | 34 +- .../tests/System/AppDomainTests.cs | 41 +- .../tests/System/Convert.FromBase64.cs | 13 - .../tests/System/Convert.ToDouble.cs | 9 - .../tests/System/Convert.ToSingle.cs | 9 - .../tests/System/Convert.ToString.cs | 31 -- .../tests/System/Environment.Exit.cs | 15 +- .../Environment.GetEnvironmentVariable.cs | 8 +- .../Environment.SetEnvironmentVariable.cs | 4 - .../tests/System/Environment.StackTrace.cs | 3 - .../tests/System/EnvironmentTests.cs | 5 +- .../tests/System/IO/PathTests_Combine.cs | 43 -- .../System/IO/PathTests_Windows_NetFX.cs | 106 ---- .../tests/System/MarshalByRefObjectTest.cs | 1 - .../tests/System/Math.cs | 85 --- .../tests/System/MathF.netcoreapp.cs | 25 - .../Reflection/AssemblyNameProxyTests.cs | 1 - .../Versioning/VersioningHelperTests.cs | 5 - .../tests/System/StringComparer.cs | 1 - .../tests/Configurations.props | 3 +- .../tests/System.Runtime.Handles.Tests.csproj | 2 +- .../tests/Configurations.props | 4 +- .../tests/DescriptionNameTests.cs | 18 +- ...opServices.RuntimeInformation.Tests.csproj | 4 +- .../tests/Configurations.props | 1 - ...nteropServices.WindowsRuntime.Tests.csproj | 2 +- .../WindowsRuntimeMarshalTests.cs | 1 - .../tests/Configurations.props | 3 +- ...ystem.Runtime.InteropServices.Tests.csproj | 4 +- .../InteropServices/ArrayWithOffsetTests.cs | 1 - .../InteropServices/ComEventsHelperTests.cs | 19 +- .../InteropServices/DispatchWrapperTests.cs | 1 - .../InteropServices/HandleCollectorTests.cs | 1 - .../IDispatchImplAttributeTests.cs | 1 - .../CreateWrapperOfTypeTests.Windows.cs | 76 +-- .../Marshal/DestroyStructureTests.cs | 2 - .../Marshal/GenerateGuidForTypeTests.cs | 15 +- .../Marshal/GenerateProgIdForTypeTests.cs | 20 - .../Marshal/GetComInterfaceForObjectTests.cs | 2 - .../GetDelegateForFunctionPointerTests.cs | 2 - .../Marshal/GetEndComSlotTests.cs | 20 +- .../Marshal/GetHINSTANCETests.cs | 8 - .../GetIDispatchForObjectTests.Windows.cs | 8 - .../Marshal/GetIDispatchForObjectTests.cs | 44 -- .../Marshal/GetNativeVariantForObjectTests.cs | 27 +- .../Marshal/GetObjectForNativeVariantTests.cs | 2 - .../Marshal/GetStartComSlotTests.cs | 18 +- .../Marshal/GetTypedObjectForIUnknownTests.cs | 4 - .../Marshal/IsComObjectTests.cs | 2 - .../Marshal/PtrToStringUTF8Tests.cs | 14 - .../Marshal/PtrToStructureTests.cs | 2 - .../Marshal/QueryInterfaceTests.cs | 5 - .../Marshal/ReadWrite/ByteTests.cs | 6 - .../Marshal/ReadWrite/Int16Tests.cs | 6 - .../Marshal/ReadWrite/Int32Tests.cs | 6 - .../Marshal/ReadWrite/Int64Tests.cs | 6 - .../Marshal/ReadWrite/IntPtrTests.cs | 6 - .../InteropServices/Marshal/SizeOfTests.cs | 2 - .../Marshal/StructureToPtrTests.cs | 3 - .../RuntimeEnvironmentTests.cs | 4 - .../InteropServices/SafeBufferTests.cs | 10 - ...etWin32ContextInIDispatchAttributeTests.cs | 1 - .../tests/AssemblyLoadContextTest.cs | 1 - .../DefaultContext/DefaultLoadContextTest.cs | 1 - .../RefEmitLoadContextTest.cs | 1 - .../tests/BigInteger/Comparison.cs | 8 - .../tests/BigInteger/IsEven.cs | 1 - .../tests/BigInteger/cast_from.cs | 1 - .../tests/BigInteger/log.cs | 1 - .../tests/BigInteger/modpow.cs | 3 - .../tests/BigInteger/multiply.cs | 1 - .../tests/BigInteger/pow.cs | 1 - .../tests/ComplexTests.cs | 162 ------ .../tests/Configurations.props | 2 +- .../System.Runtime.Numerics.Tests.csproj | 2 +- .../tests/BinaryFormatterTestData.cs | 133 ++--- .../tests/BinaryFormatterTests.cs | 1 - .../tests/Configurations.props | 2 +- .../tests/EqualityExtensions.cs | 11 +- ...time.Serialization.Formatters.Tests.csproj | 2 +- .../tests/Configurations.props | 4 +- .../tests/DataContractJsonSerializer.cs | 19 +- .../tests/ReflectionOnly/Configurations.props | 4 +- ...alization.Json.ReflectionOnly.Tests.csproj | 8 +- ...em.Runtime.Serialization.Json.Tests.csproj | 10 +- .../tests/Configurations.props | 3 +- ...time.Serialization.Primitives.Tests.csproj | 2 +- .../Canonicalization/Configurations.props | 2 +- ....Serialization.Xml.Canonicalization.csproj | 2 +- .../tests/Configurations.props | 4 +- .../tests/DataContractSerializer.cs | 40 +- .../tests/ReflectionOnly/Configurations.props | 4 +- ...ialization.Xml.ReflectionOnly.Tests.csproj | 10 +- ...tem.Runtime.Serialization.Xml.Tests.csproj | 10 +- .../tests/XmlDictionaryWriterTest.cs | 5 - .../System/IO/CreateSafeFileHandleTests.cs | 1 - .../tests/Windows/Foundation/RectTests.cs | 4 - .../tests/Windows/Foundation/SizeTests.cs | 4 - src/System.Runtime/tests/Configurations.props | 3 - .../tests/System.Runtime.Tests.csproj | 14 +- .../tests/System/ActivatorTests.cs | 26 +- .../tests/System/ActivatorTests.netcoreapp.cs | 24 - .../System/ArgIteratorTests.netcoreapp.cs | 1 - src/System.Runtime/tests/System/ArrayTests.cs | 10 +- .../tests/System/AttributeTests.cs | 41 +- src/System.Runtime/tests/System/Attributes.cs | 3 - .../System/BadImageFormatExceptionTests.cs | 1 - .../DefaultValueAttributeTests.cs | 2 - .../tests/System/DateTimeOffsetTests.cs | 21 - .../tests/System/DateTimeTests.cs | 33 +- .../tests/System/DecimalTests.cs | 3 - .../tests/System/DelegateTests.cs | 1 - .../tests/System/DoubleTests.cs | 34 -- .../tests/System/ExceptionTests.cs | 32 +- src/System.Runtime/tests/System/GCTests.cs | 2 - src/System.Runtime/tests/System/GuidTests.cs | 19 +- .../tests/System/IO/FileLoadExceptionTests.cs | 1 - .../System/IO/FileNotFoundExceptionTests.cs | 1 - .../tests/System/IntPtrTests.cs | 1 - .../tests/System/LazyOfTMetadataTests.cs | 10 - .../System/Reflection/IsCollectibleTests.cs | 1 - .../System/Reflection/MethodBaseTests.cs | 1 - .../System/Reflection/MethodBodyTests.cs | 1 - .../tests/System/Reflection/ModuleTests.cs | 16 - .../Reflection/StrongNameKeyPairTests.cs | 5 - .../CompilerServices/RuntimeHelpersTests.cs | 1 - .../HandleProcessCorruptedStateExceptions.cs | 5 +- .../System/Security/SecurityExceptionTests.cs | 1 - .../tests/System/SingleTests.cs | 34 -- .../tests/System/Text/StringBuilderTests.cs | 56 +- .../tests/System/Threading/WaitHandleTests.cs | 4 - .../tests/System/TimeSpanTests.cs | 34 -- .../tests/System/TimeZoneInfoTests.cs | 2 - .../tests/System/Type/TypeTests.Get.cs | 1 - .../tests/System/Type/TypeTests.cs | 6 - .../tests/System/Type/TypeTests.netcoreapp.cs | 1 - .../tests/System/TypedReferenceTests.cs | 4 - .../tests/System/UIntPtrTests.cs | 1 - .../System/UnitySerializationHolderTests.cs | 4 +- .../tests/System/ValueTypeTests.cs | 13 - .../tests/System/VersionTests.cs | 1 - .../tests/Configurations.props | 4 +- ...System.Security.AccessControl.Tests.csproj | 3 +- .../tests/ClaimTests.cs | 1 - .../tests/Configurations.props | 3 +- .../tests/System.Security.Claims.Tests.csproj | 2 +- .../tests/AesTests.cs | 1 - .../tests/Configurations.props | 3 +- .../tests/DefaultRSAProvider.cs | 12 +- .../tests/HashAlgorithmTest.cs | 14 - .../tests/HmacSha384Tests.cs | 1 - .../tests/HmacSha512Tests.cs | 1 - .../tests/InvalidUsageTests.cs | 1 - .../tests/RSACreateTests.cs | 6 +- ...urity.Cryptography.Algorithms.Tests.csproj | 2 +- .../tests/TripleDesTests.cs | 1 - .../tests/Configurations.props | 2 +- ...tem.Security.Cryptography.Cng.Tests.csproj | 4 +- .../tests/Configurations.props | 3 +- ...tem.Security.Cryptography.Csp.Tests.csproj | 2 +- .../tests/Configurations.props | 5 +- ...ecurity.Cryptography.Encoding.Tests.csproj | 2 +- .../tests/Configurations.props | 1 - ...Security.Cryptography.OpenSsl.Tests.csproj | 4 +- .../tests/Configurations.props | 2 +- ...em.Security.Cryptography.Pkcs.Tests.csproj | 7 +- .../tests/AsymmetricAlgorithm/Trivial.cs | 1 - .../tests/Configurations.props | 2 +- .../tests/CryptoConfigTests.cs | 1 - .../tests/CryptographicException.cs | 9 +- .../tests/HmacAlgorithmTest.cs | 21 +- .../tests/KeyedHashAlgorithmTests.cs | 2 - .../tests/SymmetricAlgorithm/Trivial.cs | 11 +- ...urity.Cryptography.Primitives.Tests.csproj | 2 +- .../tests/Configurations.props | 4 +- ...ty.Cryptography.ProtectedData.Tests.csproj | 2 +- .../tests/CollectionTests.cs | 10 +- .../tests/Configurations.props | 1 - .../tests/FindTests.cs | 3 - .../tests/ImportTests.cs | 24 +- .../tests/PfxTests.cs | 12 +- .../tests/PropsTests.cs | 8 - .../tests/PublicKeyTests.cs | 3 - ...Cryptography.X509Certificates.Tests.csproj | 2 +- .../tests/Configurations.props | 3 +- ...tem.Security.Cryptography.Xml.Tests.csproj | 2 +- .../tests/Configurations.props | 4 +- .../tests/SecurityElementTests.cs | 127 ++--- .../System.Security.Permissions.Tests.csproj | 5 +- .../tests/Configurations.props | 4 +- ...em.Security.Principal.Windows.Tests.csproj | 2 +- .../tests/WellKnownSidTypeTests.cs | 3 +- .../tests/Configurations.props | 3 +- .../System.Security.SecureString.Tests.csproj | 2 +- .../tests/Configurations.props | 3 +- ...stem.ServiceModel.Syndication.Tests.csproj | 2 +- .../tests/Configurations.props | 4 +- ...ystem.Text.Encoding.CodePages.Tests.csproj | 2 +- .../tests/Configurations.props | 3 +- ...stem.Text.Encoding.Extensions.Tests.csproj | 2 +- .../tests/Configurations.props | 2 +- .../DecoderFallback/DecoderFallbackTests.cs | 1 - .../tests/Encoder/EncoderConvert2.cs | 3 - .../tests/Encoding/Encoding.cs | 1 - .../Fallback/EncoderExceptionFallbackTests.cs | 11 - .../EncoderReplacementFallbackTests.cs | 11 - .../tests/System.Text.Encoding.Tests.csproj | 2 +- .../tests/Configurations.props | 2 +- .../System.Text.Encodings.Web.Tests.csproj | 2 +- .../tests/Configurations.props | 2 +- .../tests/JsonElementWriteTests.cs | 2 +- .../tests/System.Text.Json.Tests.csproj | 4 +- .../tests/Utf8JsonWriterTests.cs | 8 +- .../tests/CaptureCollectionTests2.cs | 2 - .../tests/Configurations.props | 1 - .../tests/GroupCollectionTests2.cs | 2 - .../tests/MatchCollectionTests2.cs | 2 - .../tests/Regex.Cache.Tests.cs | 17 - .../tests/Regex.Groups.Tests.cs | 7 +- .../tests/Regex.Match.Tests.cs | 4 +- .../tests/RegexParserTests.cs | 17 +- ...ystem.Text.RegularExpressions.Tests.csproj | 4 +- .../tests/Configurations.props | 4 +- ...ystem.Threading.AccessControl.Tests.csproj | 2 +- .../tests/ChannelTestBase.cs | 1 - .../tests/Configurations.props | 3 +- .../tests/DebugAttributeTests.cs | 2 - .../System.Threading.Channels.Tests.csproj | 2 +- .../tests/UnboundedChannelTests.cs | 1 - .../tests/Configurations.props | 1 - .../System.Threading.Overlapped.Tests.csproj | 4 +- .../ThreadPoolBoundHandle_IntegrationTests.cs | 1 - .../tests/Configurations.props | 4 +- .../tests/Dataflow/DebugAttributeTests.cs | 1 - ...stem.Threading.Tasks.Dataflow.Tests.csproj | 2 +- .../tests/AsyncValueTaskMethodBuilderTests.cs | 2 - .../tests/ValueTaskTests.cs | 2 - .../tests/Configurations.props | 3 +- .../tests/EtwTests.cs | 2 +- ...stem.Threading.Tasks.Parallel.Tests.csproj | 2 +- .../tests/CancellationTokenTests.cs | 1 - .../tests/Configurations.props | 2 +- .../AsyncTaskMethodBuilderTests.cs | 6 - .../tests/System.Threading.Tasks.Tests.csproj | 2 +- .../tests/Task/ExecutionContextFlowTest.cs | 1 - .../RunContinuationsAsynchronouslyTests.cs | 4 - .../tests/Task/TaskContinueWithTests.cs | 1 - .../tests/Task/TaskRtTests.cs | 1 - .../tests/TaskScheduler/TaskSchedulerTests.cs | 3 - .../tests/UnwrapTests.cs | 2 - .../tests/CompressedStackTests.cs | 1 - .../tests/Configurations.props | 1 - .../System.Threading.Thread.Tests.csproj | 4 +- .../tests/ThreadTests.cs | 53 +- .../tests/Configurations.props | 1 - .../System.Threading.ThreadPool.Tests.csproj | 4 +- .../tests/ThreadPoolTests.cs | 11 +- .../tests/Configurations.props | 1 - .../tests/System.Threading.Timer.Tests.csproj | 4 +- .../tests/Configurations.props | 1 - .../tests/EventWaitHandleTests.cs | 11 +- .../tests/ExecutionContextTests.cs | 1 - src/System.Threading/tests/MutexTests.cs | 12 +- .../tests/ReaderWriterLockSlimTests.cs | 1 - .../tests/ReaderWriterLockTests.cs | 2 - src/System.Threading/tests/SemaphoreTests.cs | 13 +- .../tests/SynchronizationContextTests.cs | 1 - .../tests/System.Threading.Tests.csproj | 8 +- .../tests/ThreadLocalTests.cs | 1 - .../tests/Configurations.props | 3 +- .../tests/LTMEnlistmentTests.cs | 1 - .../tests/NonMsdtcPromoterTests.cs | 1 - .../System.Transactions.Local.Tests.csproj | 2 +- .../tests/Configurations.props | 3 +- .../tests/Configurations.props | 2 +- .../tests/System.ValueTuple.Tests.csproj | 2 +- .../tests/Configurations.props | 3 +- .../tests/System.Web.HttpUtility.Tests.csproj | 2 +- 926 files changed, 1687 insertions(+), 6154 deletions(-) delete mode 100644 src/Common/tests/Tests/System/SpanExtensions.netstandard.cs delete mode 100644 src/System.Globalization/tests/CompareInfo/CompareInfoTests.netcoreapp.cs delete mode 100644 src/System.IO.FileSystem.Watcher/tests/FileSystemWatcher.unit.netcoreapp.cs delete mode 100644 src/System.IO.FileSystem.Watcher/tests/Utility/FileSystemWatcherTest.netcoreapp.cs delete mode 100644 src/System.IO.FileSystem.Watcher/tests/Utility/FileSystemWatcherTest.netstandard.cs create mode 100644 src/System.Private.Xml.Linq/tests/SDMSample/Configurations.props delete mode 100644 src/System.Runtime.Extensions/tests/System/IO/PathTests_Windows_NetFX.cs diff --git a/src/Common/tests/Common.Tests.csproj b/src/Common/tests/Common.Tests.csproj index 3a69e0ce5675..3ce8da436801 100644 --- a/src/Common/tests/Common.Tests.csproj +++ b/src/Common/tests/Common.Tests.csproj @@ -6,9 +6,6 @@ true netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release - - - Common\System\Collections\DictionaryExtensions.cs diff --git a/src/Common/tests/System/Collections/DebugView.Tests.cs b/src/Common/tests/System/Collections/DebugView.Tests.cs index d6abd27cd9d2..d5f29be2420f 100644 --- a/src/Common/tests/System/Collections/DebugView.Tests.cs +++ b/src/Common/tests/System/Collections/DebugView.Tests.cs @@ -63,7 +63,6 @@ public static IEnumerable TestDebuggerAttributes_Inputs() [Theory] [MemberData(nameof(TestDebuggerAttributes_Inputs))] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Cannot do DebuggerAttribute testing on UapAot: requires internal Reflection on framework types.")] public static void TestDebuggerAttributes(object obj) { DebuggerAttributes.ValidateDebuggerDisplayReferences(obj); @@ -75,7 +74,6 @@ public static void TestDebuggerAttributes(object obj) [Theory] [MemberData(nameof(TestDebuggerAttributes_Inputs))] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Cannot do DebuggerAttribute testing on UapAot: requires internal Reflection on framework types.")] public static void TestDebuggerAttributes_Null(object obj) { Type proxyType = DebuggerAttributes.GetProxyType(obj); diff --git a/src/Common/tests/System/Xml/XmlCoreTest/XmlCoreTest.csproj b/src/Common/tests/System/Xml/XmlCoreTest/XmlCoreTest.csproj index 4dba97c2c04b..f631cc236216 100644 --- a/src/Common/tests/System/Xml/XmlCoreTest/XmlCoreTest.csproj +++ b/src/Common/tests/System/Xml/XmlCoreTest/XmlCoreTest.csproj @@ -21,9 +21,6 @@ Common\System\Diagnostics\CodeAnalysis\ExcludeFromCodeCoverageAssemblyAttribute.cs - - - diff --git a/src/Common/tests/System/Xml/XmlDiff/XmlDiff.csproj b/src/Common/tests/System/Xml/XmlDiff/XmlDiff.csproj index 9055e335ec14..794b968759e5 100644 --- a/src/Common/tests/System/Xml/XmlDiff/XmlDiff.csproj +++ b/src/Common/tests/System/Xml/XmlDiff/XmlDiff.csproj @@ -13,9 +13,6 @@ Common\System\Diagnostics\CodeAnalysis\ExcludeFromCodeCoverageAssemblyAttribute.cs - - - diff --git a/src/Common/tests/Tests/System/SpanExtensions.netstandard.cs b/src/Common/tests/Tests/System/SpanExtensions.netstandard.cs deleted file mode 100644 index 7fce33310fd8..000000000000 --- a/src/Common/tests/Tests/System/SpanExtensions.netstandard.cs +++ /dev/null @@ -1,17 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -namespace System.Tests -{ - /// - /// Helper methods that exist in the platform but not in the portable Span. - /// - public static class SpanExtensions - { - public static int LastIndexOf(this ReadOnlySpan span, ReadOnlySpan value, StringComparison comparisonType) - { - return span.ToString().LastIndexOf(value.ToString(), comparisonType); - } - } -} diff --git a/src/Common/tests/Tests/System/StringTests.cs b/src/Common/tests/Tests/System/StringTests.cs index 64b1fb5962f5..72b2fa42299b 100644 --- a/src/Common/tests/Tests/System/StringTests.cs +++ b/src/Common/tests/Tests/System/StringTests.cs @@ -291,16 +291,7 @@ public static void Concat_String(string[] values, string expected) Assert.Equal(expected, result); if (result.Length == 0) { - // We return string.Empty by reference as an optimization - // in .NET core if there is no work to do. - if (PlatformDetection.IsFullFramework || PlatformDetection.IsNetNative) - { - Assert.Equal(string.Empty, result); - } - else - { - Assert.Same(string.Empty, result); - } + Assert.Same(string.Empty, result); } }; @@ -398,11 +389,7 @@ public static IEnumerable Concat_Objects_TestData() // Concat should ignore objects that have a null ToString() value yield return new object[] { new object[] { new ObjectWithNullToString(), "Foo", new ObjectWithNullToString(), "Bar", new ObjectWithNullToString() }, "FooBar" }; - - if (!PlatformDetection.IsFullFramework) - { - yield return new object[] { new object[] { new ObjectWithNullToString() }, "" }; - } + yield return new object[] { new object[] { new ObjectWithNullToString() }, "" }; } [Theory] @@ -2419,7 +2406,6 @@ public static void GetEnumerator_Generic_Invalid() } [Fact] - [ActiveIssue(27098, TargetFrameworkMonikers.NetFramework)] public static void GetHashCode_EmbeddedNull_ReturnsDifferentHashCodes() { Assert.NotEqual("\0AAAAAAAAA".GetHashCode(), "\0BBBBBBBBBBBB".GetHashCode()); @@ -3834,25 +3820,13 @@ public static IEnumerable Join_ObjectArray_TestData() [Theory] [MemberData(nameof(Join_ObjectArray_TestData))] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework | TargetFrameworkMonikers.Uap)] + [SkipOnTargetFramework(TargetFrameworkMonikers.Uap)] public static void Join_ObjectArray(string separator, object[] values, string expected) { Assert.Equal(expected, string.Join(separator, values)); Assert.Equal(expected, string.Join(separator, (IEnumerable)values)); } - [Theory] - [MemberData(nameof(Join_ObjectArray_TestData))] - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)] - public static void Join_ObjectArray_WithNullIssue(string separator, object[] values, string expected) - { - string enumerableExpected = expected; - if (values.Length > 0 && values[0] == null) // Join return nothing when first value is null - expected = ""; - Assert.Equal(expected, string.Join(separator, values)); - Assert.Equal(enumerableExpected, string.Join(separator, (IEnumerable)values)); - } - [Fact] public static void Join_ObjectArray_Null_ThrowsArgumentNullException() { @@ -7267,7 +7241,6 @@ public static unsafe void Ctor_SByte_InvalidUTF8() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public static unsafe void Ctor_SByte_InvalidArguments() { AssertExtensions.Throws("value", () => new string ((sbyte*) null, 0, 1, Encoding.Default)); @@ -7285,7 +7258,6 @@ public static unsafe void Ctor_SByte_InvalidArguments() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public static unsafe void Ctor_SByte_NullPointer_ReturnsEmptyString() { Assert.Equal(string.Empty, new string((sbyte*) null)); @@ -7336,7 +7308,6 @@ public static unsafe void CopyTest() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, ".NetNative limits interning of literals to the empty string.")] public static unsafe void InternTest() { AssertExtensions.Throws("str", () => string.Intern(null)); diff --git a/src/CoreFx.Private.TestUtilities/tests/Configurations.props b/src/CoreFx.Private.TestUtilities/tests/Configurations.props index ff0d415e4593..acf56fa2750e 100644 --- a/src/CoreFx.Private.TestUtilities/tests/Configurations.props +++ b/src/CoreFx.Private.TestUtilities/tests/Configurations.props @@ -1,7 +1,8 @@  - netstandard; + netcoreapp; + uap; \ No newline at end of file diff --git a/src/CoreFx.Private.TestUtilities/tests/CoreFx.Private.TestUtilities.Tests.csproj b/src/CoreFx.Private.TestUtilities/tests/CoreFx.Private.TestUtilities.Tests.csproj index 0f2ccecfd682..19a0a1a66de4 100644 --- a/src/CoreFx.Private.TestUtilities/tests/CoreFx.Private.TestUtilities.Tests.csproj +++ b/src/CoreFx.Private.TestUtilities/tests/CoreFx.Private.TestUtilities.Tests.csproj @@ -1,7 +1,7 @@ {5E0DB390-A45E-41BE-8304-B840327FE597} - netstandard-Debug;netstandard-Release + netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release CoreFx.Private.TestUtilities.Tests diff --git a/src/Microsoft.Bcl.AsyncInterfaces/tests/Configurations.props b/src/Microsoft.Bcl.AsyncInterfaces/tests/Configurations.props index 581054d46db4..c3d0d53eb793 100644 --- a/src/Microsoft.Bcl.AsyncInterfaces/tests/Configurations.props +++ b/src/Microsoft.Bcl.AsyncInterfaces/tests/Configurations.props @@ -1,7 +1,9 @@  - netstandard; + netcoreapp; + netfx; + uap; \ No newline at end of file diff --git a/src/Microsoft.Bcl.AsyncInterfaces/tests/Microsoft.Bcl.AsyncInterfaces.Tests.csproj b/src/Microsoft.Bcl.AsyncInterfaces/tests/Microsoft.Bcl.AsyncInterfaces.Tests.csproj index 371802d7ba75..f06312e30475 100644 --- a/src/Microsoft.Bcl.AsyncInterfaces/tests/Microsoft.Bcl.AsyncInterfaces.Tests.csproj +++ b/src/Microsoft.Bcl.AsyncInterfaces/tests/Microsoft.Bcl.AsyncInterfaces.Tests.csproj @@ -1,7 +1,7 @@ {72E21903-0FBA-444E-9855-3B4F05DFC1F9} - netstandard-Debug;netstandard-Release + netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release;uap-Debug;uap-Release diff --git a/src/Microsoft.CSharp/tests/ArrayHandling.cs b/src/Microsoft.CSharp/tests/ArrayHandling.cs index 0e2b229755ed..2e7481476042 100644 --- a/src/Microsoft.CSharp/tests/ArrayHandling.cs +++ b/src/Microsoft.CSharp/tests/ArrayHandling.cs @@ -33,18 +33,12 @@ public void ArrayTypeNames() { d = Array.CreateInstance(typeof(int), new[] { 8 }, new[] { -2 }); ex = Assert.Throws(() => { string s = d; }); - if (!PlatformDetection.IsNetNative) // .NET Native toolchain optimizes away Exception messages. - { - Assert.Contains("int[*]", ex.Message); - } + Assert.Contains("int[*]", ex.Message); } d = new int[3]; ex = Assert.Throws(() => { string s = d; }); - if (!PlatformDetection.IsNetNative) // .NET Native toolchain optimizes away Exception messages. - { - Assert.Contains("int[]", ex.Message); - } + Assert.Contains("int[]", ex.Message); } [Fact] @@ -53,19 +47,13 @@ public void MultiDimArrayTypeNames() { dynamic d = new int[3, 2, 1]; RuntimeBinderException ex = Assert.Throws(() => { string s = d; }); - if (!PlatformDetection.IsNetNative) // .NET Native toolchain optimizes away Exception messages. - { - Assert.Contains("int[,,]", ex.Message); - } + Assert.Contains("int[,,]", ex.Message); if (PlatformDetection.IsNonZeroLowerBoundArraySupported) { d = Array.CreateInstance(typeof(int), new[] { 3, 2, 1 }, new[] { -2, 2, -0 }); ex = Assert.Throws(() => { string s = d; }); - if (!PlatformDetection.IsNetNative) // .NET Native toolchain optimizes away Exception messages. - { - Assert.Contains("int[,,]", ex.Message); - } + Assert.Contains("int[,,]", ex.Message); } } @@ -75,48 +63,29 @@ public void IncorrectNumberOfIndices() { dynamic d = new int[2, 2, 2]; RuntimeBinderException ex = Assert.Throws(() => d[1] = 0); - if (!PlatformDetection.IsNetNative) // .NET Native toolchain optimizes away Exception messages. - { - Assert.Contains("[]", ex.Message); - Assert.Contains("'3'", ex.Message); - } - + Assert.Contains("[]", ex.Message); + Assert.Contains("'3'", ex.Message); ex = Assert.Throws(() => d[1, 2, 3, 4] = 0); - if (!PlatformDetection.IsNetNative) // .NET Native toolchain optimizes away Exception messages. - { - Assert.Contains("[]", ex.Message); - Assert.Contains("'3'", ex.Message); - } + Assert.Contains("[]", ex.Message); + Assert.Contains("'3'", ex.Message); ex = Assert.Throws(() => d[1]); - if (!PlatformDetection.IsNetNative) // .NET Native toolchain optimizes away Exception messages. - { - Assert.Contains("[]", ex.Message); - Assert.Contains("'3'", ex.Message); - } + Assert.Contains("[]", ex.Message); + Assert.Contains("'3'", ex.Message); ex = Assert.Throws(() => d[1, 2, 3, 4]); - if (!PlatformDetection.IsNetNative) // .NET Native toolchain optimizes away Exception messages. - { - Assert.Contains("[]", ex.Message); - Assert.Contains("'3'", ex.Message); - } + Assert.Contains("[]", ex.Message); + Assert.Contains("'3'", ex.Message); d = new int[2]; ex = Assert.Throws(() => d[1, 2, 3, 4] = 0); - if (!PlatformDetection.IsNetNative) // .NET Native toolchain optimizes away Exception messages. - { - Assert.Contains("[]", ex.Message); - Assert.Contains("'1'", ex.Message); - } + Assert.Contains("[]", ex.Message); + Assert.Contains("'1'", ex.Message); ex = Assert.Throws(() => d[1, 2, 3, 4]); - if (!PlatformDetection.IsNetNative) // .NET Native toolchain optimizes away Exception messages. - { - Assert.Contains("[]", ex.Message); - Assert.Contains("'1'", ex.Message); - } + Assert.Contains("[]", ex.Message); + Assert.Contains("'1'", ex.Message); } [Fact] diff --git a/src/Microsoft.CSharp/tests/Configurations.props b/src/Microsoft.CSharp/tests/Configurations.props index 38a2a87a19e0..ca416265e0d6 100644 --- a/src/Microsoft.CSharp/tests/Configurations.props +++ b/src/Microsoft.CSharp/tests/Configurations.props @@ -1,8 +1,9 @@  - netstandard; netcoreapp; + netfx; + uap; diff --git a/src/Microsoft.CSharp/tests/Microsoft.CSharp.Tests.csproj b/src/Microsoft.CSharp/tests/Microsoft.CSharp.Tests.csproj index 280410ffd11b..d5c8a2d6ce22 100644 --- a/src/Microsoft.CSharp/tests/Microsoft.CSharp.Tests.csproj +++ b/src/Microsoft.CSharp/tests/Microsoft.CSharp.Tests.csproj @@ -2,7 +2,7 @@ {82B54697-0251-47A1-8546-FC507D0F3B08} true - netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release + netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release;uap-Debug;uap-Release diff --git a/src/System.Collections.Immutable/tests/TestExtensionsMethods.cs b/src/System.Collections.Immutable/tests/TestExtensionsMethods.cs index cb63050024fe..e78267faf45c 100644 --- a/src/System.Collections.Immutable/tests/TestExtensionsMethods.cs +++ b/src/System.Collections.Immutable/tests/TestExtensionsMethods.cs @@ -13,10 +13,7 @@ internal static partial class TestExtensionsMethods internal static void ValidateDefaultThisBehavior(Action a) { - if (!PlatformDetection.IsNetNative) // ActiveIssue UapAot: TFS 428550, https://github.com/dotnet/corefx/issues/19016 - ImmutableArray's null-guard check (ThrowNullRefIfNotInitialized) can get optimized away by certain compilers. - { - Assert.Throws(a); - } + Assert.Throws(a); } } } diff --git a/src/System.Collections.NonGeneric/tests/ArrayListTests.cs b/src/System.Collections.NonGeneric/tests/ArrayListTests.cs index 1887295435a7..490def1da046 100644 --- a/src/System.Collections.NonGeneric/tests/ArrayListTests.cs +++ b/src/System.Collections.NonGeneric/tests/ArrayListTests.cs @@ -80,7 +80,6 @@ public static void Ctor_ICollection_NullCollection_ThrowsArgumentNullException() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Cannot do DebuggerAttribute testing on UapAot: requires internal Reflection on framework types.")] public static void DebuggerAttribute() { DebuggerAttributes.ValidateDebuggerDisplayReferences(new ArrayList()); @@ -2548,7 +2547,6 @@ public DerivedArrayList(ICollection c) : base(c) { } } } - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] // Changed behavior public class ArrayList_SyncRootTests { private ArrayList _arrDaughter; diff --git a/src/System.Collections.NonGeneric/tests/Configurations.props b/src/System.Collections.NonGeneric/tests/Configurations.props index ff0d415e4593..acf56fa2750e 100644 --- a/src/System.Collections.NonGeneric/tests/Configurations.props +++ b/src/System.Collections.NonGeneric/tests/Configurations.props @@ -1,7 +1,8 @@  - netstandard; + netcoreapp; + uap; \ No newline at end of file diff --git a/src/System.Collections.NonGeneric/tests/HashtableTests.cs b/src/System.Collections.NonGeneric/tests/HashtableTests.cs index 9d164ae8ec1b..6fb4c9e0aa41 100644 --- a/src/System.Collections.NonGeneric/tests/HashtableTests.cs +++ b/src/System.Collections.NonGeneric/tests/HashtableTests.cs @@ -378,7 +378,6 @@ public void Ctor_Capacity_LoadFactor_IEqualityComparer_Invalid() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Cannot do DebuggerAttribute testing on UapAot: requires internal Reflection on framework types.")] public void DebuggerAttribute() { DebuggerAttributes.ValidateDebuggerDisplayReferences(new Hashtable()); @@ -1195,7 +1194,6 @@ private void RemoveElements(string strName) } } - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] // Changed behavior public class Hashtable_SyncRootTests { private Hashtable _hashDaughter; diff --git a/src/System.Collections.NonGeneric/tests/QueueTests.cs b/src/System.Collections.NonGeneric/tests/QueueTests.cs index f49b20df525b..25552712c7b9 100644 --- a/src/System.Collections.NonGeneric/tests/QueueTests.cs +++ b/src/System.Collections.NonGeneric/tests/QueueTests.cs @@ -93,7 +93,6 @@ public static void Ctor_ICollection_NullCollection_ThrowsArgumentNullException() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Cannot do DebuggerAttribute testing on UapAot: requires internal Reflection on framework types.")] public static void DebuggerAttribute() { DebuggerAttributes.ValidateDebuggerDisplayReferences(new Queue()); @@ -112,7 +111,6 @@ public static void DebuggerAttribute() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Cannot do DebuggerAttribute testing on UapAot: requires internal Reflection on framework types.")] public static void DebuggerAttribute_NullQueue_ThrowsArgumentNullException() { bool threwNull = false; @@ -834,7 +832,6 @@ public Foo(int intValue) } } - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] // Changed behavior public class Queue_SyncRootTests { private const int NumberOfElements = 1000; diff --git a/src/System.Collections.NonGeneric/tests/ReadOnlyCollectionBaseTests.cs b/src/System.Collections.NonGeneric/tests/ReadOnlyCollectionBaseTests.cs index 55c34e2ea5d7..a822d9b16520 100644 --- a/src/System.Collections.NonGeneric/tests/ReadOnlyCollectionBaseTests.cs +++ b/src/System.Collections.NonGeneric/tests/ReadOnlyCollectionBaseTests.cs @@ -20,7 +20,6 @@ private static MyReadOnlyCollectionBase CreateCollection() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] // Changed behavior public static void SyncRoot() { MyReadOnlyCollectionBase collection = CreateCollection(); diff --git a/src/System.Collections.NonGeneric/tests/SortedListTests.cs b/src/System.Collections.NonGeneric/tests/SortedListTests.cs index b5c725b3d1b5..0c90e22b7699 100644 --- a/src/System.Collections.NonGeneric/tests/SortedListTests.cs +++ b/src/System.Collections.NonGeneric/tests/SortedListTests.cs @@ -213,14 +213,12 @@ public void Ctor_IDictionary_IComparer_NullDictionary_ThrowsArgumentNullExceptio } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Cannot do DebuggerAttribute testing on UapAot: requires internal Reflection on framework types.")] public void DebuggerAttribute_Empty() { Assert.Equal("Count = 0", DebuggerAttributes.ValidateDebuggerDisplayReferences(new SortedList())); } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Cannot do DebuggerAttribute testing on UapAot: requires internal Reflection on framework types.")] public void DebuggerAttribute_NormalList() { var list = new SortedList() { { "a", 1 }, { "b", 2 } }; @@ -231,7 +229,6 @@ public void DebuggerAttribute_NormalList() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Cannot do DebuggerAttribute testing on UapAot: requires internal Reflection on framework types.")] public void DebuggerAttribute_SynchronizedList() { var list = SortedList.Synchronized(new SortedList() { { "a", 1 }, { "b", 2 } }); @@ -242,7 +239,6 @@ public void DebuggerAttribute_SynchronizedList() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Cannot do DebuggerAttribute testing on UapAot: requires internal Reflection on framework types.")] public void DebuggerAttribute_NullSortedList_ThrowsArgumentNullException() { bool threwNull = false; @@ -259,7 +255,6 @@ public void DebuggerAttribute_NullSortedList_ThrowsArgumentNullException() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "This test intentionally reflects on an internal member of SortedList. Cannot do that on UaoAot.")] public void EnsureCapacity_NewCapacityLessThanMin_CapsToMaxArrayLength() { // A situation like this occurs for very large lengths of SortedList. @@ -1555,7 +1550,6 @@ public class SortedList_SyncRootTests [Fact] [OuterLoop] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "https://github.com/dotnet/corefx/pull/34339")] // Changed behavior public void GetSyncRootBasic() { // Testing SyncRoot is not as simple as its implementation looks like. This is the working diff --git a/src/System.Collections.NonGeneric/tests/StackTests.cs b/src/System.Collections.NonGeneric/tests/StackTests.cs index ec8c621d910f..bc9ef003e65d 100644 --- a/src/System.Collections.NonGeneric/tests/StackTests.cs +++ b/src/System.Collections.NonGeneric/tests/StackTests.cs @@ -71,7 +71,6 @@ public static void Ctor_ICollection_NullCollection_ThrowsArgumentNullException() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Cannot do DebuggerAttribute testing on UapAot: requires internal Reflection on framework types.")] public static void DebuggerAttribute() { DebuggerAttributes.ValidateDebuggerDisplayReferences(new Stack()); @@ -90,7 +89,6 @@ public static void DebuggerAttribute() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Cannot do DebuggerAttribute testing on UapAot: requires internal Reflection on framework types.")] public static void DebuggerAttribute_NullStack_ThrowsArgumentNullException() { bool threwNull = false; @@ -540,7 +538,6 @@ public Foo(int intValue) } } - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] // Changed behavior public class Stack_SyncRootTests { private Stack _stackDaughter; diff --git a/src/System.Collections.NonGeneric/tests/System.Collections.NonGeneric.Tests.csproj b/src/System.Collections.NonGeneric/tests/System.Collections.NonGeneric.Tests.csproj index 5c5765883883..9b341a38170e 100644 --- a/src/System.Collections.NonGeneric/tests/System.Collections.NonGeneric.Tests.csproj +++ b/src/System.Collections.NonGeneric/tests/System.Collections.NonGeneric.Tests.csproj @@ -2,7 +2,7 @@ {EE95AE39-845A-42D3-86D0-8065DBE56612} true - netstandard-Debug;netstandard-Release + netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release diff --git a/src/System.Collections.Specialized/tests/Configurations.props b/src/System.Collections.Specialized/tests/Configurations.props index ff0d415e4593..acf56fa2750e 100644 --- a/src/System.Collections.Specialized/tests/Configurations.props +++ b/src/System.Collections.Specialized/tests/Configurations.props @@ -1,7 +1,8 @@  - netstandard; + netcoreapp; + uap; \ No newline at end of file diff --git a/src/System.Collections.Specialized/tests/StringCollectionTests.cs b/src/System.Collections.Specialized/tests/StringCollectionTests.cs index 1a8606bd9478..379b6a3c4339 100644 --- a/src/System.Collections.Specialized/tests/StringCollectionTests.cs +++ b/src/System.Collections.Specialized/tests/StringCollectionTests.cs @@ -635,7 +635,6 @@ public static void Remove_Duplicate_IListTest(StringCollection collection, strin [Theory] [MemberData(nameof(StringCollection_Data))] [MemberData(nameof(StringCollection_Duplicates_Data))] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] // Changed behavior public static void SyncRootTest(StringCollection collection, string[] data) { object syncRoot = collection.SyncRoot; diff --git a/src/System.Collections.Specialized/tests/StringDictionary/StringDictionary.SyncRootTests.cs b/src/System.Collections.Specialized/tests/StringDictionary/StringDictionary.SyncRootTests.cs index 2d5a8aec4c1d..5294be883a02 100644 --- a/src/System.Collections.Specialized/tests/StringDictionary/StringDictionary.SyncRootTests.cs +++ b/src/System.Collections.Specialized/tests/StringDictionary/StringDictionary.SyncRootTests.cs @@ -11,7 +11,6 @@ public class StringDictionarySyncRootTests [Theory] [InlineData(0)] [InlineData(5)] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] // Different implementation public void SyncRoot(int count) { StringDictionary stringDictionary1 = Helpers.CreateStringDictionary(count); diff --git a/src/System.Collections.Specialized/tests/System.Collections.Specialized.Tests.csproj b/src/System.Collections.Specialized/tests/System.Collections.Specialized.Tests.csproj index eb0ce3fe3de3..f61a4c5c143e 100644 --- a/src/System.Collections.Specialized/tests/System.Collections.Specialized.Tests.csproj +++ b/src/System.Collections.Specialized/tests/System.Collections.Specialized.Tests.csproj @@ -1,7 +1,7 @@ {7F5F5134-00FE-4DE8-B20C-3DA8BA2EBA68} - netstandard-Debug;netstandard-Release + netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release diff --git a/src/System.Collections/tests/BitArray/BitArray_CtorTests.cs b/src/System.Collections/tests/BitArray/BitArray_CtorTests.cs index 43527706bce0..97a465a2256d 100644 --- a/src/System.Collections/tests/BitArray/BitArray_CtorTests.cs +++ b/src/System.Collections/tests/BitArray/BitArray_CtorTests.cs @@ -248,7 +248,6 @@ public static void Ctor_Simple_Method_Tests() Assert.Equal(bitArray, bitArray.Clone()); } - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "A bug in BitArray.Clone() caused an ArgumentExeption to be thrown in this case.")] [Fact] public static void Clone_LongLength_Works() { diff --git a/src/System.Collections/tests/BitArray/BitArray_GetSetTests.cs b/src/System.Collections/tests/BitArray/BitArray_GetSetTests.cs index 92b00972e9e7..1354d50004e4 100644 --- a/src/System.Collections/tests/BitArray/BitArray_GetSetTests.cs +++ b/src/System.Collections/tests/BitArray/BitArray_GetSetTests.cs @@ -393,7 +393,6 @@ public static IEnumerable CopyTo_Hidden_Data() } [Theory] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Desktop Framework hasn't received the fix for #9838 yet.")] [MemberData(nameof(CopyTo_Hidden_Data))] public static void CopyTo_Int_Hidden(string label, BitArray bits) { @@ -414,24 +413,6 @@ public static void CopyTo_Int_Hidden(string label, BitArray bits) } [Theory] - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework, "Desktop Framework hasn't received the fix for #9838 yet.")] - [MemberData(nameof(CopyTo_Hidden_Data))] - public static void CopyTo_Int_Hidden_Desktop(string label, BitArray bits) - { - int allBitsSet = unchecked((int)0xffffffff); // 32 bits set to 1 = -1 - int fullInts = bits.Length / BitsPerInt32; - int remainder = bits.Length % BitsPerInt32; - int arrayLength = fullInts + (remainder > 0 ? 1 : 0); - - int[] data = new int[arrayLength]; - ((ICollection)bits).CopyTo(data, 0); - - Assert.All(data, d => Assert.Equal(allBitsSet, d)); - - } - - [Theory] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Desktop Framework hasn't received the fix for #9838 yet.")] [MemberData(nameof(CopyTo_Hidden_Data))] public static void CopyTo_Byte_Hidden(string label, BitArray bits) { @@ -451,23 +432,5 @@ public static void CopyTo_Byte_Hidden(string label, BitArray bits) Assert.Equal((byte)((1 << remainder) - 1), data[fullBytes]); } } - - [Theory] - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework, "Desktop Framework hasn't received the fix for #9838 yet.")] - [MemberData(nameof(CopyTo_Hidden_Data))] - public static void CopyTo_Byte_Hidden_Desktop(string label, BitArray bits) - { - byte allBitsSet = (1 << BitsPerByte) - 1; // 8 bits set to 1 = 255 - - int fullBytes = bits.Length / BitsPerByte; - int remainder = bits.Length % BitsPerByte; - int arrayLength = fullBytes + (remainder > 0 ? 1 : 0); - - byte[] data = new byte[arrayLength]; - ((ICollection)bits).CopyTo(data, 0); - - Assert.All(data, d => Assert.Equal(allBitsSet, d)); - - } } } diff --git a/src/System.Collections/tests/Configurations.props b/src/System.Collections/tests/Configurations.props index e43964ecf9e7..acf56fa2750e 100644 --- a/src/System.Collections/tests/Configurations.props +++ b/src/System.Collections/tests/Configurations.props @@ -2,7 +2,7 @@ netcoreapp; - netstandard; + uap; \ No newline at end of file diff --git a/src/System.Collections/tests/Generic/Comparers/Comparer.Generic.Tests.cs b/src/System.Collections/tests/Generic/Comparers/Comparer.Generic.Tests.cs index b56090f5f867..91f0965e8e52 100644 --- a/src/System.Collections/tests/Generic/Comparers/Comparer.Generic.Tests.cs +++ b/src/System.Collections/tests/Generic/Comparers/Comparer.Generic.Tests.cs @@ -13,7 +13,6 @@ namespace System.Collections.Generic.Tests { public abstract partial class ComparersGenericTests { - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Missing https://github.com/dotnet/coreclr/pull/4340")] [Fact] public void Comparer_ComparerDefault() { diff --git a/src/System.Collections/tests/Generic/Comparers/EqualityComparer.Generic.Tests.cs b/src/System.Collections/tests/Generic/Comparers/EqualityComparer.Generic.Tests.cs index 4969bb2c52a7..4c4c519df242 100644 --- a/src/System.Collections/tests/Generic/Comparers/EqualityComparer.Generic.Tests.cs +++ b/src/System.Collections/tests/Generic/Comparers/EqualityComparer.Generic.Tests.cs @@ -9,7 +9,6 @@ namespace System.Collections.Generic.Tests { public abstract partial class ComparersGenericTests { - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Missing https://github.com/dotnet/coreclr/pull/4340")] [Fact] public void EqualityComparer_EqualityComparerDefault() { diff --git a/src/System.Collections/tests/Generic/Dictionary/Dictionary.Generic.Tests.cs b/src/System.Collections/tests/Generic/Dictionary/Dictionary.Generic.Tests.cs index 27831d947770..6c48203a1128 100644 --- a/src/System.Collections/tests/Generic/Dictionary/Dictionary.Generic.Tests.cs +++ b/src/System.Collections/tests/Generic/Dictionary/Dictionary.Generic.Tests.cs @@ -13,9 +13,9 @@ namespace System.Collections.Tests /// public abstract partial class Dictionary_Generic_Tests : IDictionary_Generic_Tests { - protected override ModifyOperation ModifyEnumeratorThrows => PlatformDetection.IsFullFramework ? base.ModifyEnumeratorThrows : ModifyOperation.Add | ModifyOperation.Insert; + protected override ModifyOperation ModifyEnumeratorThrows => ModifyOperation.Add | ModifyOperation.Insert; - protected override ModifyOperation ModifyEnumeratorAllowed => PlatformDetection.IsFullFramework ? base.ModifyEnumeratorAllowed : ModifyOperation.Remove | ModifyOperation.Clear; + protected override ModifyOperation ModifyEnumeratorAllowed => ModifyOperation.Remove | ModifyOperation.Clear; #region IDictionary source = new Dictionary { { "a", 1 }, { "A", 1 } }; diff --git a/src/System.Collections/tests/Generic/SortedSet/SortedSet.Generic.Tests.cs b/src/System.Collections/tests/Generic/SortedSet/SortedSet.Generic.Tests.cs index a2ea7ab92e97..44816971fcfc 100644 --- a/src/System.Collections/tests/Generic/SortedSet/SortedSet.Generic.Tests.cs +++ b/src/System.Collections/tests/Generic/SortedSet/SortedSet.Generic.Tests.cs @@ -57,7 +57,6 @@ public void SortedSet_Generic_Constructor_IEnumerable_Null() [Theory] [MemberData(nameof(EnumerableTestData))] - [ActiveIssue("dotnet/corefx #16790", TargetFrameworkMonikers.NetFramework)] public void SortedSet_Generic_Constructor_IEnumerable_IComparer_Netcoreapp(EnumerableType enumerableType, int setLength, int enumerableLength, int numberOfMatchingElements, int numberOfDuplicateElements) { IEnumerable enumerable = CreateEnumerable(enumerableType, null, enumerableLength, 0, 0); @@ -67,17 +66,6 @@ public void SortedSet_Generic_Constructor_IEnumerable_IComparer_Netcoreapp(Enume [Theory] [MemberData(nameof(EnumerableTestData))] - [ActiveIssue("dotnet/corefx #16790", ~TargetFrameworkMonikers.NetFramework)] - public void SortedSet_Generic_Constructor_IEnumerable_IComparer_Netfx(EnumerableType enumerableType, int setLength, int enumerableLength, int numberOfMatchingElements, int numberOfDuplicateElements) - { - IEnumerable enumerable = CreateEnumerable(enumerableType, null, enumerableLength, 0, 0); - SortedSet set = new SortedSet(enumerable, GetIComparer() ?? Comparer.Default); - Assert.True(set.SetEquals(enumerable)); - } - - [Theory] - [MemberData(nameof(EnumerableTestData))] - [ActiveIssue("dotnet/corefx #16790", TargetFrameworkMonikers.NetFramework)] public void SortedSet_Generic_Constructor_IEnumerable_IComparer_NullComparer_Netcoreapp(EnumerableType enumerableType, int setLength, int enumerableLength, int numberOfMatchingElements, int numberOfDuplicateElements) { IEnumerable enumerable = CreateEnumerable(enumerableType, null, enumerableLength, 0, 0); diff --git a/src/System.Collections/tests/System.Collections.Tests.csproj b/src/System.Collections/tests/System.Collections.Tests.csproj index 0a8ceda9c622..dacccf0ee171 100644 --- a/src/System.Collections/tests/System.Collections.Tests.csproj +++ b/src/System.Collections/tests/System.Collections.Tests.csproj @@ -1,7 +1,7 @@ {F5EB9630-AD29-4880-963F-F2D39C684D8A} - netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release + netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release true @@ -60,9 +60,6 @@ Common\System\RandomExtensions.cs - - Common\System\Collections\DictionaryExtensions.cs - Common\System\Runtime\Serialization\Formatters\BinaryFormatterHelpers.cs diff --git a/src/System.ComponentModel.Annotations/tests/Configurations.props b/src/System.ComponentModel.Annotations/tests/Configurations.props index 2bc19ff4170e..b0ad9a4c0cfe 100644 --- a/src/System.ComponentModel.Annotations/tests/Configurations.props +++ b/src/System.ComponentModel.Annotations/tests/Configurations.props @@ -1,8 +1,9 @@  - netstandard; netcoreapp; + netfx; + uap; \ No newline at end of file diff --git a/src/System.ComponentModel.Annotations/tests/System.ComponentModel.Annotations.Tests.csproj b/src/System.ComponentModel.Annotations/tests/System.ComponentModel.Annotations.Tests.csproj index 6114fdbd1b59..03320a195a3e 100644 --- a/src/System.ComponentModel.Annotations/tests/System.ComponentModel.Annotations.Tests.csproj +++ b/src/System.ComponentModel.Annotations/tests/System.ComponentModel.Annotations.Tests.csproj @@ -2,7 +2,7 @@ {6E48765E-D6AC-4A79-9C2E-B5EE67EEDECF} true - netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release + netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release;uap-Debug;uap-Release @@ -26,7 +26,7 @@ - + diff --git a/src/System.ComponentModel.Composition.Registration/src/Configurations.props b/src/System.ComponentModel.Composition.Registration/src/Configurations.props index ac2aa337a9d7..4bc0dacc0128 100644 --- a/src/System.ComponentModel.Composition.Registration/src/Configurations.props +++ b/src/System.ComponentModel.Composition.Registration/src/Configurations.props @@ -5,7 +5,6 @@ $(PackageConfigurations); - _netfx; netcoreapp; uap; diff --git a/src/System.ComponentModel.Composition.Registration/tests/Configurations.props b/src/System.ComponentModel.Composition.Registration/tests/Configurations.props index 992904366b4f..2b2323d47917 100644 --- a/src/System.ComponentModel.Composition.Registration/tests/Configurations.props +++ b/src/System.ComponentModel.Composition.Registration/tests/Configurations.props @@ -3,7 +3,6 @@ netcoreapp; uap; - _netfx; diff --git a/src/System.ComponentModel.Composition.Registration/tests/System/ComponentModel/Composition/Registration/ExportBuilderTests.cs b/src/System.ComponentModel.Composition.Registration/tests/System/ComponentModel/Composition/Registration/ExportBuilderTests.cs index a36f85230e28..37a098c4b41e 100644 --- a/src/System.ComponentModel.Composition.Registration/tests/System/ComponentModel/Composition/Registration/ExportBuilderTests.cs +++ b/src/System.ComponentModel.Composition.Registration/tests/System/ComponentModel/Composition/Registration/ExportBuilderTests.cs @@ -7,7 +7,6 @@ namespace System.ComponentModel.Composition.Registration.Tests { - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Reflection based tests")] public class ExportBuilderTests { interface IFoo { } diff --git a/src/System.ComponentModel.Composition.Registration/tests/System/ComponentModel/Composition/Registration/ExportBuilderUnitTests.cs b/src/System.ComponentModel.Composition.Registration/tests/System/ComponentModel/Composition/Registration/ExportBuilderUnitTests.cs index a0451d3cdf2b..1b7ac8dac91a 100644 --- a/src/System.ComponentModel.Composition.Registration/tests/System/ComponentModel/Composition/Registration/ExportBuilderUnitTests.cs +++ b/src/System.ComponentModel.Composition.Registration/tests/System/ComponentModel/Composition/Registration/ExportBuilderUnitTests.cs @@ -68,7 +68,6 @@ public FooImporter4(IFoo fooImporter) } [Fact] - [ActiveIssue(35144, TargetFrameworkMonikers.UapAot)] public void ExportInterfaceWithTypeOf1() { var ctx = new RegistrationBuilder(); @@ -84,7 +83,6 @@ public void ExportInterfaceWithTypeOf1() } [Fact] - [ActiveIssue(35144, TargetFrameworkMonikers.UapAot)] public void ExportInterfaceWithTypeOf2() { var ctx = new RegistrationBuilder(); @@ -100,7 +98,6 @@ public void ExportInterfaceWithTypeOf2() } [Fact] - [ActiveIssue(35144, TargetFrameworkMonikers.UapAot)] public void ExportInheritedInterfaceWithImplements1() { var ctx = new RegistrationBuilder(); @@ -116,7 +113,6 @@ public void ExportInheritedInterfaceWithImplements1() } [Fact] - [ActiveIssue(35144, TargetFrameworkMonikers.UapAot)] public void ExportInheritedInterfaceWithImplements2() { var ctx = new RegistrationBuilder(); diff --git a/src/System.ComponentModel.Composition.Registration/tests/System/ComponentModel/Composition/Registration/ImportBuilderTests.cs b/src/System.ComponentModel.Composition.Registration/tests/System/ComponentModel/Composition/Registration/ImportBuilderTests.cs index d005b62b2e41..41290bd651d4 100644 --- a/src/System.ComponentModel.Composition.Registration/tests/System/ComponentModel/Composition/Registration/ImportBuilderTests.cs +++ b/src/System.ComponentModel.Composition.Registration/tests/System/ComponentModel/Composition/Registration/ImportBuilderTests.cs @@ -7,7 +7,6 @@ namespace System.ComponentModel.Composition.Registration.Tests { - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Reflection based tests")] public class ImportBuilderTests { interface IFoo { } diff --git a/src/System.ComponentModel.Composition.Registration/tests/System/ComponentModel/Composition/Registration/PartBuilderInheritanceTests.cs b/src/System.ComponentModel.Composition.Registration/tests/System/ComponentModel/Composition/Registration/PartBuilderInheritanceTests.cs index a1cccc23cd0c..2913b9ecbf33 100644 --- a/src/System.ComponentModel.Composition.Registration/tests/System/ComponentModel/Composition/Registration/PartBuilderInheritanceTests.cs +++ b/src/System.ComponentModel.Composition.Registration/tests/System/ComponentModel/Composition/Registration/PartBuilderInheritanceTests.cs @@ -8,7 +8,6 @@ namespace System.ComponentModel.Composition.Registration.Tests { - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Reflection based tests")] public class PartBuilderInheritanceTests { private abstract class BaseClass diff --git a/src/System.ComponentModel.Composition.Registration/tests/System/ComponentModel/Composition/Registration/PartBuilderInterfaceTests.cs b/src/System.ComponentModel.Composition.Registration/tests/System/ComponentModel/Composition/Registration/PartBuilderInterfaceTests.cs index 62014e8a10d3..4992206576f4 100644 --- a/src/System.ComponentModel.Composition.Registration/tests/System/ComponentModel/Composition/Registration/PartBuilderInterfaceTests.cs +++ b/src/System.ComponentModel.Composition.Registration/tests/System/ComponentModel/Composition/Registration/PartBuilderInterfaceTests.cs @@ -48,7 +48,6 @@ public class Importer } [Fact] - [ActiveIssue(35144, TargetFrameworkMonikers.UapAot)] public void StandardExportInterfacesShouldWork() { var builder = new RegistrationBuilder(); @@ -83,7 +82,6 @@ public void StandardExportInterfacesShouldWork() } [Fact] - [ActiveIssue(35144, TargetFrameworkMonikers.UapAot)] public void StandardExportInterfacesDefaultContractShouldWork() { //Same test as above only using default export builder var builder = new RegistrationBuilder(); diff --git a/src/System.ComponentModel.Composition.Registration/tests/System/ComponentModel/Composition/Registration/PartBuilderOfTInheritanceTests.cs b/src/System.ComponentModel.Composition.Registration/tests/System/ComponentModel/Composition/Registration/PartBuilderOfTInheritanceTests.cs index c64e4bc9fc58..14cf5e7946fb 100644 --- a/src/System.ComponentModel.Composition.Registration/tests/System/ComponentModel/Composition/Registration/PartBuilderOfTInheritanceTests.cs +++ b/src/System.ComponentModel.Composition.Registration/tests/System/ComponentModel/Composition/Registration/PartBuilderOfTInheritanceTests.cs @@ -8,7 +8,6 @@ namespace System.ComponentModel.Composition.Registration.Tests { - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Reflection based tests")] public class PartBuilderOfTInheritanceTests { private abstract class BaseClass diff --git a/src/System.ComponentModel.Composition.Registration/tests/System/ComponentModel/Composition/Registration/PartBuilderOfTTests.cs b/src/System.ComponentModel.Composition.Registration/tests/System/ComponentModel/Composition/Registration/PartBuilderOfTTests.cs index b0af90f866c9..c5621ba4d99b 100644 --- a/src/System.ComponentModel.Composition.Registration/tests/System/ComponentModel/Composition/Registration/PartBuilderOfTTests.cs +++ b/src/System.ComponentModel.Composition.Registration/tests/System/ComponentModel/Composition/Registration/PartBuilderOfTTests.cs @@ -30,7 +30,6 @@ public FooImplWithConstructors(int id, string name) { } } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Reflection based tests")] public void NoOperations_ShouldGenerateNoAttributes() { var builder = InternalCalls.PartBuilder(t => true); @@ -44,7 +43,6 @@ public void NoOperations_ShouldGenerateNoAttributes() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Reflection based tests")] public void ExportSelf_ShouldGenerateSingleExportAttribute() { var builder = InternalCalls.PartBuilder(t => true); @@ -62,7 +60,6 @@ public void ExportSelf_ShouldGenerateSingleExportAttribute() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Reflection based tests")] public void ExportOfT_ShouldGenerateSingleExportAttributeWithContractType() { var builder = InternalCalls.PartBuilder(t => true); @@ -80,7 +77,6 @@ public void ExportOfT_ShouldGenerateSingleExportAttributeWithContractType() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Reflection based tests")] public void AddMetadata_ShouldGeneratePartMetadataAttribute() { var builder = InternalCalls.PartBuilder(t => true); @@ -102,7 +98,6 @@ public void AddMetadata_ShouldGeneratePartMetadataAttribute() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Reflection based tests")] public void AddMetadataWithFunc_ShouldGeneratePartMetadataAttribute() { var builder = InternalCalls.PartBuilder(t => true); @@ -124,7 +119,6 @@ public void AddMetadataWithFunc_ShouldGeneratePartMetadataAttribute() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Reflection based tests")] public void ExportProperty_ShouldGenerateExportForPropertySelected() { var builder = InternalCalls.PartBuilder(t => true); @@ -149,7 +143,6 @@ public void ExportProperty_ShouldGenerateExportForPropertySelected() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Reflection based tests")] public void ImportProperty_ShouldGenerateImportForPropertySelected() { var builder = InternalCalls.PartBuilder(t => true); @@ -175,7 +168,6 @@ public void ImportProperty_ShouldGenerateImportForPropertySelected() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Reflection based tests")] public void ImportProperty_ShouldGenerateImportForPropertySelected_And_ApplyImportMany() { var builder = InternalCalls.PartBuilder(t => true); @@ -201,7 +193,6 @@ public void ImportProperty_ShouldGenerateImportForPropertySelected_And_ApplyImpo } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Reflection based tests")] public void ExportPropertyWithConfiguration_ShouldGenerateExportForPropertySelected() { var builder = InternalCalls.PartBuilder(t => true); @@ -227,7 +218,6 @@ public void ExportPropertyWithConfiguration_ShouldGenerateExportForPropertySelec } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Reflection based tests")] public void ExportPropertyOfT_ShouldGenerateExportForPropertySelectedWithTAsContractType() { var builder = InternalCalls.PartBuilder(t => true); @@ -254,7 +244,6 @@ public void ExportPropertyOfT_ShouldGenerateExportForPropertySelectedWithTAsCont } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Reflection based tests")] public void ConventionSelectsConstructor_SelectsTheOneWithMostParameters() { var builder = InternalCalls.PartBuilder(t => true); @@ -288,7 +277,6 @@ public void ConventionSelectsConstructor_SelectsTheOneWithMostParameters() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Reflection based tests")] public void ManuallySelectingConstructor_SelectsTheExplicitOne() { var builder = InternalCalls.PartBuilder(t => true); @@ -317,7 +305,6 @@ public void ManuallySelectingConstructor_SelectsTheExplicitOne() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Reflection based tests")] public void ManuallySelectingConstructor_SelectsTheExplicitOne_IEnumerableParameterBecomesImportMany() { var builder = InternalCalls.PartBuilder(t => true); diff --git a/src/System.ComponentModel.Composition.Registration/tests/System/ComponentModel/Composition/Registration/PartBuilderTests.cs b/src/System.ComponentModel.Composition.Registration/tests/System/ComponentModel/Composition/Registration/PartBuilderTests.cs index e464e3fe6379..23c112c60cbf 100644 --- a/src/System.ComponentModel.Composition.Registration/tests/System/ComponentModel/Composition/Registration/PartBuilderTests.cs +++ b/src/System.ComponentModel.Composition.Registration/tests/System/ComponentModel/Composition/Registration/PartBuilderTests.cs @@ -53,7 +53,6 @@ public FooImplWithConstructorsAmbiguous(int id, string name) { } } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Reflection based tests")] public void NoOperations_ShouldGenerateNoAttributes() { var builder = InternalCalls.PartBuilder(t => true); @@ -67,7 +66,6 @@ public void NoOperations_ShouldGenerateNoAttributes() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Reflection based tests")] public void ExportSelf_ShouldGenerateSingleExportAttribute() { var builder = InternalCalls.PartBuilder(t => true); @@ -85,7 +83,6 @@ public void ExportSelf_ShouldGenerateSingleExportAttribute() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Reflection based tests")] public void ExportOfT_ShouldGenerateSingleExportAttributeWithContractType() { var builder = InternalCalls.PartBuilder(t => true); @@ -103,7 +100,6 @@ public void ExportOfT_ShouldGenerateSingleExportAttributeWithContractType() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Reflection based tests")] public void AddMetadata_ShouldGeneratePartMetadataAttribute() { var builder = InternalCalls.PartBuilder(t => true); @@ -125,7 +121,6 @@ public void AddMetadata_ShouldGeneratePartMetadataAttribute() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Reflection based tests")] public void AddMetadataWithFunc_ShouldGeneratePartMetadataAttribute() { var builder = InternalCalls.PartBuilder(t => true); @@ -147,7 +142,6 @@ public void AddMetadataWithFunc_ShouldGeneratePartMetadataAttribute() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Reflection based tests")] public void ExportProperty_ShouldGenerateExportForPropertySelected() { var builder = InternalCalls.PartBuilder(t => true); @@ -173,7 +167,6 @@ public void ExportProperty_ShouldGenerateExportForPropertySelected() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Reflection based tests")] public void ImportProperty_ShouldGenerateImportForPropertySelected() { var builder = InternalCalls.PartBuilder(t => true); @@ -200,7 +193,6 @@ public void ImportProperty_ShouldGenerateImportForPropertySelected() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Reflection based tests")] public void ImportProperties_ShouldGenerateImportForPropertySelected_And_ApplyImportMany() { var builder = InternalCalls.PartBuilder(t => true); @@ -227,7 +219,6 @@ public void ImportProperties_ShouldGenerateImportForPropertySelected_And_ApplyIm } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Reflection based tests")] public void ExportPropertyWithConfiguration_ShouldGenerateExportForPropertySelected() { var builder = InternalCalls.PartBuilder(t => true); @@ -253,7 +244,6 @@ public void ExportPropertyWithConfiguration_ShouldGenerateExportForPropertySelec } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Reflection based tests")] public void ExportPropertyOfT_ShouldGenerateExportForPropertySelectedWithTAsContractType() { var builder = InternalCalls.PartBuilder(t => true); @@ -279,7 +269,6 @@ public void ExportPropertyOfT_ShouldGenerateExportForPropertySelectedWithTAsCont } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Reflection based tests")] public void SetCreationPolicy_ShouldGeneratePartCreationPolicyAttributeForType() { var builder = InternalCalls.PartBuilder(t => true); @@ -297,7 +286,6 @@ public void SetCreationPolicy_ShouldGeneratePartCreationPolicyAttributeForType() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Reflection based tests")] public void ConventionSelectsConstructor_SelectsTheOneWithMostParameters() { var builder = InternalCalls.PartBuilder(t => true); @@ -331,7 +319,6 @@ public void ConventionSelectsConstructor_SelectsTheOneWithMostParameters() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Reflection based tests")] public void ManuallySelectingConstructor_SelectsTheExplicitOne() { var builder = InternalCalls.PartBuilder(t => true); @@ -358,7 +345,6 @@ public void ManuallySelectingConstructor_SelectsTheExplicitOne() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Reflection based tests")] public void ManuallySelectingConstructor_SelectsTheExplicitOne_IEnumerableParameterBecomesImportMany() { var builder = InternalCalls.PartBuilder(t => true); @@ -430,7 +416,6 @@ public void ExportSelectorNull_ShouldThrowArgumentNull() } [Fact] - [ActiveIssue(35144, TargetFrameworkMonikers.UapAot)] public void InsideTheLambdaCallGetCustomAttributesShouldSucceed() { //Same test as above only using default export builder diff --git a/src/System.ComponentModel.Composition.Registration/tests/System/ComponentModel/Composition/Registration/PartBuilderUnitTests.cs b/src/System.ComponentModel.Composition.Registration/tests/System/ComponentModel/Composition/Registration/PartBuilderUnitTests.cs index 61bf17ada5f2..849f7119e62c 100644 --- a/src/System.ComponentModel.Composition.Registration/tests/System/ComponentModel/Composition/Registration/PartBuilderUnitTests.cs +++ b/src/System.ComponentModel.Composition.Registration/tests/System/ComponentModel/Composition/Registration/PartBuilderUnitTests.cs @@ -126,7 +126,6 @@ public ManyConstructorsController( public class PartBuilderUnitTests { [Fact] - [ActiveIssue(35144, TargetFrameworkMonikers.UapAot)] public void ManyConstructorsControllerFindLongestConstructor_ShouldSucceed() { var ctx = new RegistrationBuilder(); @@ -155,7 +154,6 @@ public void ManyConstructorsControllerFindLongestConstructor_ShouldSucceed() } [Fact] - [ActiveIssue(35144, TargetFrameworkMonikers.UapAot)] public void ManyConstructorsControllerFindLongestConstructorAndImportByName_ShouldSucceed() { var ctx = new RegistrationBuilder(); @@ -193,7 +191,6 @@ public void ManyConstructorsControllerFindLongestConstructorAndImportByName_Shou } [Fact] - [ActiveIssue(35144, TargetFrameworkMonikers.UapAot)] public void LongestConstructorWithAttribute_ShouldSucceed() { var ctx = new RegistrationBuilder(); @@ -213,7 +210,6 @@ public void LongestConstructorWithAttribute_ShouldSucceed() } [Fact] - [ActiveIssue(35144, TargetFrameworkMonikers.UapAot)] public void LongestConstructorShortestWithAttribute_ShouldSucceed() { var ctx = new RegistrationBuilder(); @@ -233,7 +229,6 @@ public void LongestConstructorShortestWithAttribute_ShouldSucceed() } [Fact] - [ActiveIssue(35144, TargetFrameworkMonikers.UapAot)] public void AmbiguousConstructorWithAttributeAppliedToOne_ShouldSucceed() { var ctx = new RegistrationBuilder(); @@ -255,7 +250,6 @@ public void AmbiguousConstructorWithAttributeAppliedToOne_ShouldSucceed() [Fact] - [ActiveIssue(35144, TargetFrameworkMonikers.UapAot)] public void AmbiguousConstructor_ShouldFail() { var ctx = new RegistrationBuilder(); diff --git a/src/System.ComponentModel.Composition.Registration/tests/System/ComponentModel/Composition/Registration/RegistrationBuilderExportFuncTests.cs b/src/System.ComponentModel.Composition.Registration/tests/System/ComponentModel/Composition/Registration/RegistrationBuilderExportFuncTests.cs index 552bc6ed9be9..fdc84d0a461c 100644 --- a/src/System.ComponentModel.Composition.Registration/tests/System/ComponentModel/Composition/Registration/RegistrationBuilderExportFuncTests.cs +++ b/src/System.ComponentModel.Composition.Registration/tests/System/ComponentModel/Composition/Registration/RegistrationBuilderExportFuncTests.cs @@ -22,7 +22,6 @@ public class Factory } [Fact] - [ActiveIssue(35144, TargetFrameworkMonikers.UapAot)] public void RegistrationBuilder_WithExportDelegatesShouldNotThrow() { var rb = new RegistrationBuilder(); diff --git a/src/System.ComponentModel.Composition.Registration/tests/System/ComponentModel/Composition/Registration/RegistrationBuilderTests.cs b/src/System.ComponentModel.Composition.Registration/tests/System/ComponentModel/Composition/Registration/RegistrationBuilderTests.cs index ac83f092b025..09a6d2f92d96 100644 --- a/src/System.ComponentModel.Composition.Registration/tests/System/ComponentModel/Composition/Registration/RegistrationBuilderTests.cs +++ b/src/System.ComponentModel.Composition.Registration/tests/System/ComponentModel/Composition/Registration/RegistrationBuilderTests.cs @@ -46,7 +46,6 @@ public DiscoveredCatalog() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "MakeGenericType can only accept Type objects created by the runtime.")] public void ShouldSucceed() { var rb = new RegistrationBuilder(); @@ -176,7 +175,6 @@ private interface IGenericInterface { } private class ClassExportingInterface : IGenericInterface { } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "MakeGenericType can only accept Type objects created by the runtime.")] public void GenericInterfaceExportInRegistrationBuilder() { CompositionContainer container = CreateRegistrationBuilderContainer(typeof(ClassExportingInterface<>)); @@ -190,7 +188,6 @@ private class GenericBaseClass { } private class ClassExportingBaseClass : GenericBaseClass { } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "MakeGenericType can only accept Type objects created by the runtime.")] public void GenericBaseClassExportInRegistrationBuilder() { CompositionContainer container = CreateRegistrationBuilderContainer(typeof(ClassExportingBaseClass<>)); @@ -202,7 +199,6 @@ public void GenericBaseClassExportInRegistrationBuilder() private class GenericClass { } [Fact] - [ActiveIssue(35144, TargetFrameworkMonikers.UapAot)] public void GenericExportInRegistrationBuilder() { CompositionContainer container = CreateRegistrationBuilderContainer(typeof(GenericClass<>)); @@ -214,7 +210,6 @@ public void GenericExportInRegistrationBuilder() private class ExplicitGenericClass { } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "MakeGenericType can only accept Type objects created by the runtime.")] public void ExplicitGenericExportInRegistrationBuilder() { CompositionContainer container = CreateRegistrationBuilderContainer(typeof(ExplicitGenericClass<>)); @@ -226,7 +221,6 @@ public void ExplicitGenericExportInRegistrationBuilder() private class ExplicitGenericClass { } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "MakeGenericType can only accept Type objects created by the runtime.")] public void ExplicitGenericArity2ExportInRegistrationBuilder() { CompositionContainer container = CreateRegistrationBuilderContainer(typeof(ExplicitGenericClass<,>)); diff --git a/src/System.ComponentModel.Composition/tests/Configurations.props b/src/System.ComponentModel.Composition/tests/Configurations.props index 992904366b4f..2b2323d47917 100644 --- a/src/System.ComponentModel.Composition/tests/Configurations.props +++ b/src/System.ComponentModel.Composition/tests/Configurations.props @@ -3,7 +3,6 @@ netcoreapp; uap; - _netfx; diff --git a/src/System.ComponentModel.Composition/tests/System.ComponentModel.Composition.Noop.Assembly/Configurations.props b/src/System.ComponentModel.Composition/tests/System.ComponentModel.Composition.Noop.Assembly/Configurations.props index febffb03ac69..581054d46db4 100644 --- a/src/System.ComponentModel.Composition/tests/System.ComponentModel.Composition.Noop.Assembly/Configurations.props +++ b/src/System.ComponentModel.Composition/tests/System.ComponentModel.Composition.Noop.Assembly/Configurations.props @@ -2,7 +2,6 @@ netstandard; - netcoreapp; \ No newline at end of file diff --git a/src/System.ComponentModel.Composition/tests/System.ComponentModel.Composition.Noop.Assembly/System.ComponentModel.Composition.Noop.Assembly.csproj b/src/System.ComponentModel.Composition/tests/System.ComponentModel.Composition.Noop.Assembly/System.ComponentModel.Composition.Noop.Assembly.csproj index 3e3228d2c455..9e0303d0c51b 100644 --- a/src/System.ComponentModel.Composition/tests/System.ComponentModel.Composition.Noop.Assembly/System.ComponentModel.Composition.Noop.Assembly.csproj +++ b/src/System.ComponentModel.Composition/tests/System.ComponentModel.Composition.Noop.Assembly/System.ComponentModel.Composition.Noop.Assembly.csproj @@ -1,7 +1,7 @@ {396D6EBF-60BD-4DAF-8783-FB403E070A56} - netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release + netstandard-Debug;netstandard-Release diff --git a/src/System.ComponentModel.Composition/tests/System.ComponentModel.Composition.Tests.csproj b/src/System.ComponentModel.Composition/tests/System.ComponentModel.Composition.Tests.csproj index 0092ef9b003b..948b2ee25e89 100644 --- a/src/System.ComponentModel.Composition/tests/System.ComponentModel.Composition.Tests.csproj +++ b/src/System.ComponentModel.Composition/tests/System.ComponentModel.Composition.Tests.csproj @@ -175,9 +175,6 @@ Common\System\ThreadCultureChange.cs - - - false diff --git a/src/System.ComponentModel.Composition/tests/System/ComponentModel/Composition/CompositionErrorIdTests.cs b/src/System.ComponentModel.Composition/tests/System/ComponentModel/Composition/CompositionErrorIdTests.cs index 119e82a65ee5..b8b430ae5310 100644 --- a/src/System.ComponentModel.Composition/tests/System/ComponentModel/Composition/CompositionErrorIdTests.cs +++ b/src/System.ComponentModel.Composition/tests/System/ComponentModel/Composition/CompositionErrorIdTests.cs @@ -10,7 +10,6 @@ namespace System.ComponentModel.Composition public class CompositionErrorIdTests { [Fact] - [ActiveIssue(25498, TargetFrameworkMonikers.UapAot)] public void CompositionErrorIdsAreInSyncWithErrorIds() { ExtendedAssert.EnumsContainSameValues(); diff --git a/src/System.ComponentModel.Composition/tests/System/ComponentModel/Composition/CompositionExceptionTests.cs b/src/System.ComponentModel.Composition/tests/System/ComponentModel/Composition/CompositionExceptionTests.cs index 08ba948f9c85..fed5980b6bf1 100644 --- a/src/System.ComponentModel.Composition/tests/System/ComponentModel/Composition/CompositionExceptionTests.cs +++ b/src/System.ComponentModel.Composition/tests/System/ComponentModel/Composition/CompositionExceptionTests.cs @@ -407,10 +407,6 @@ private string GetElementGraphString(CompositionError error) private void AssertMessage(CompositionException exception, int rootCauseCount, CultureInfo culture) { - if (PlatformDetection.IsNetNative) - { - return; - } using (StringReader reader = new StringReader(exception.Message)) { string line = reader.ReadLine(); @@ -431,10 +427,6 @@ private void AssertMessage(CompositionException exception, int rootCauseCount, C private void AssertMessage(CompositionException exception, string[] expected) { - if (PlatformDetection.IsNetNative) - { - return; - } using (StringReader reader = new StringReader(exception.Message)) { // Skip header diff --git a/src/System.ComponentModel.Composition/tests/System/ComponentModel/Composition/Hosting/FilteredCatalogTransitiveClosureTests.cs b/src/System.ComponentModel.Composition/tests/System/ComponentModel/Composition/Hosting/FilteredCatalogTransitiveClosureTests.cs index ccf27708e527..3b8a5534a54e 100644 --- a/src/System.ComponentModel.Composition/tests/System/ComponentModel/Composition/Hosting/FilteredCatalogTransitiveClosureTests.cs +++ b/src/System.ComponentModel.Composition/tests/System/ComponentModel/Composition/Hosting/FilteredCatalogTransitiveClosureTests.cs @@ -222,7 +222,6 @@ public void IncludeDependenciesExportFactory() } [Fact] - [ActiveIssue(25498, TargetFrameworkMonikers.UapAot)] public void IncludeDependenciesChainWithCycles() { var catalog = CreateCatalog( diff --git a/src/System.ComponentModel.Composition/tests/System/ComponentModel/Composition/Hosting/ImportEngineTests.cs b/src/System.ComponentModel.Composition/tests/System/ComponentModel/Composition/Hosting/ImportEngineTests.cs index 669417a7d71f..f3c9adfac33f 100644 --- a/src/System.ComponentModel.Composition/tests/System/ComponentModel/Composition/Hosting/ImportEngineTests.cs +++ b/src/System.ComponentModel.Composition/tests/System/ComponentModel/Composition/Hosting/ImportEngineTests.cs @@ -125,7 +125,6 @@ public void PreviewImports_Unsuccessful_AtomicComposition_ShouldNotBlockChanges( } [Fact] - [ActiveIssue(25498, TargetFrameworkMonikers.UapAot)] public void PreviewImports_ReleaseImports_ShouldNotBlockChanges() { var exportProvider = ExportProviderFactory.CreateRecomposable(); diff --git a/src/System.ComponentModel.Composition/tests/System/ComponentModel/Composition/MetadataViewProviderTests.cs b/src/System.ComponentModel.Composition/tests/System/ComponentModel/Composition/MetadataViewProviderTests.cs index 237ad605f8b4..d2ac1e5d99a0 100644 --- a/src/System.ComponentModel.Composition/tests/System/ComponentModel/Composition/MetadataViewProviderTests.cs +++ b/src/System.ComponentModel.Composition/tests/System/ComponentModel/Composition/MetadataViewProviderTests.cs @@ -117,7 +117,6 @@ public void GetMetadataView_AbstractClass_ShouldThrowMissingMethodException() } [Fact] - [ActiveIssue(25498, TargetFrameworkMonikers.UapAot)] public void GetMetadataView_AbstractClassWithConstructor_ShouldThrowMemberAccessException() { var metadata = new Dictionary(); diff --git a/src/System.ComponentModel.Composition/tests/System/Integration/AdaptingCollectionTests.cs b/src/System.ComponentModel.Composition/tests/System/Integration/AdaptingCollectionTests.cs index f587bb562ac0..6cd24c4e13ab 100644 --- a/src/System.ComponentModel.Composition/tests/System/Integration/AdaptingCollectionTests.cs +++ b/src/System.ComponentModel.Composition/tests/System/Integration/AdaptingCollectionTests.cs @@ -343,7 +343,6 @@ public class DynamicExports } [Fact] - [ActiveIssue(25498, TargetFrameworkMonikers.UapAot)] public void TestDyamicallyFilteringImports() { var container = ContainerFactory.CreateWithAttributedCatalog(typeof(Dynamic1), typeof(Dynamic2), typeof(NonDynamic1)); diff --git a/src/System.ComponentModel.Composition/tests/System/Integration/CatalogFilteringTests.cs b/src/System.ComponentModel.Composition/tests/System/Integration/CatalogFilteringTests.cs index 6e252930e7d9..7861c8c3f1f2 100644 --- a/src/System.ComponentModel.Composition/tests/System/Integration/CatalogFilteringTests.cs +++ b/src/System.ComponentModel.Composition/tests/System/Integration/CatalogFilteringTests.cs @@ -24,7 +24,6 @@ public void FilteredCatalog_ScopeA() } [Fact] - [ActiveIssue(25498, TargetFrameworkMonikers.UapAot)] public void FilteredCatalog_ScopeB() { var cat = GetCatalog(); diff --git a/src/System.ComponentModel.EventBasedAsync/tests/Configurations.props b/src/System.ComponentModel.EventBasedAsync/tests/Configurations.props index ff0d415e4593..acf56fa2750e 100644 --- a/src/System.ComponentModel.EventBasedAsync/tests/Configurations.props +++ b/src/System.ComponentModel.EventBasedAsync/tests/Configurations.props @@ -1,7 +1,8 @@  - netstandard; + netcoreapp; + uap; \ No newline at end of file diff --git a/src/System.ComponentModel.EventBasedAsync/tests/System.ComponentModel.EventBasedAsync.Tests.csproj b/src/System.ComponentModel.EventBasedAsync/tests/System.ComponentModel.EventBasedAsync.Tests.csproj index 9dcb29d86a02..fd0d9cbcc1f4 100644 --- a/src/System.ComponentModel.EventBasedAsync/tests/System.ComponentModel.EventBasedAsync.Tests.csproj +++ b/src/System.ComponentModel.EventBasedAsync/tests/System.ComponentModel.EventBasedAsync.Tests.csproj @@ -1,11 +1,8 @@ - - true {59E9B218-81D0-4A80-A4B7-66C716136D82} true - netstandard-Debug;netstandard-Release + netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release diff --git a/src/System.ComponentModel.Primitives/tests/Configurations.props b/src/System.ComponentModel.Primitives/tests/Configurations.props index ff0d415e4593..acf56fa2750e 100644 --- a/src/System.ComponentModel.Primitives/tests/Configurations.props +++ b/src/System.ComponentModel.Primitives/tests/Configurations.props @@ -1,7 +1,8 @@  - netstandard; + netcoreapp; + uap; \ No newline at end of file diff --git a/src/System.ComponentModel.Primitives/tests/System.ComponentModel.Primitives.Tests.csproj b/src/System.ComponentModel.Primitives/tests/System.ComponentModel.Primitives.Tests.csproj index 896ccf9e5443..723dbe22ba08 100644 --- a/src/System.ComponentModel.Primitives/tests/System.ComponentModel.Primitives.Tests.csproj +++ b/src/System.ComponentModel.Primitives/tests/System.ComponentModel.Primitives.Tests.csproj @@ -1,7 +1,7 @@ {C9534425-93FB-494F-8DD8-1E4E3E626FDE} - netstandard-Debug;netstandard-Release + netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release diff --git a/src/System.ComponentModel.Primitives/tests/System/ComponentModel/CategoryAttributeTests.cs b/src/System.ComponentModel.Primitives/tests/System/ComponentModel/CategoryAttributeTests.cs index b95502c6c28a..b45d61619864 100644 --- a/src/System.ComponentModel.Primitives/tests/System/ComponentModel/CategoryAttributeTests.cs +++ b/src/System.ComponentModel.Primitives/tests/System/ComponentModel/CategoryAttributeTests.cs @@ -10,7 +10,6 @@ namespace System.ComponentModel.Tests public class CategoryAttributeTests { [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] // NetFX does not have fix for #21369 public void Ctor_Default() { var attribute = new CategoryAttribute(); @@ -28,7 +27,6 @@ public static IEnumerable Ctor_Category_TestData() [Theory] [MemberData(nameof(Ctor_Category_TestData))] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Does not have the fix for https://github.com/dotnet/corefx/issues/21356")] public void Ctor_Category(string category, bool expectedIsDefaultAttribute) { var attribute = new CategoryAttribute(category); @@ -102,7 +100,6 @@ public static IEnumerable DefaultProperties_TestData() [Theory] [MemberData(nameof(DefaultProperties_TestData))] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] // NetFX does not have fix for #21369 public void CategoryProperties_GetCategory_ReturnsExpected(Func attributeThunk, string expectedCategory) { CategoryAttribute attribute = attributeThunk(); diff --git a/src/System.ComponentModel.TypeConverter/tests/ArrayConverterTests.cs b/src/System.ComponentModel.TypeConverter/tests/ArrayConverterTests.cs index 48dcea8c0e76..a5316e305933 100644 --- a/src/System.ComponentModel.TypeConverter/tests/ArrayConverterTests.cs +++ b/src/System.ComponentModel.TypeConverter/tests/ArrayConverterTests.cs @@ -25,7 +25,6 @@ public override IEnumerable ConvertToTestData() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Throws NullReferenceException in .NET Framework.")] public void GetProperties_NullValue_ReturnsNull() { Assert.Null(Converter.GetProperties(null)); diff --git a/src/System.ComponentModel.TypeConverter/tests/CollectionConverterTests.cs b/src/System.ComponentModel.TypeConverter/tests/CollectionConverterTests.cs index fb0d70c55dc7..b630bbd594ba 100644 --- a/src/System.ComponentModel.TypeConverter/tests/CollectionConverterTests.cs +++ b/src/System.ComponentModel.TypeConverter/tests/CollectionConverterTests.cs @@ -36,7 +36,6 @@ public static IEnumerable GetProperties_TestData() [Theory] [MemberData(nameof(GetProperties_TestData))] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Returns null in .NET Framework")] public void GetProperties_Invoke_ReturnsEmpty(object value) { PropertyDescriptorCollection properties = Converter.GetProperties(value); diff --git a/src/System.ComponentModel.TypeConverter/tests/ComponentResourceManagerTests.cs b/src/System.ComponentModel.TypeConverter/tests/ComponentResourceManagerTests.cs index 1e0aef618f8b..090259c6984e 100644 --- a/src/System.ComponentModel.TypeConverter/tests/ComponentResourceManagerTests.cs +++ b/src/System.ComponentModel.TypeConverter/tests/ComponentResourceManagerTests.cs @@ -162,7 +162,6 @@ public void ApplyResources_IComponentWithNonDesignModeSite_Success() } [Fact] - [ActiveIssue(22145, TargetFrameworkMonikers.NetFramework)] public void ApplyResources_IComponentWithDesignModeSite_Success() { var resourceManager = new ComponentResourceManager(typeof(global::Resources.TestResx)) diff --git a/src/System.ComponentModel.TypeConverter/tests/Configurations.props b/src/System.ComponentModel.TypeConverter/tests/Configurations.props index caa171561192..acf56fa2750e 100644 --- a/src/System.ComponentModel.TypeConverter/tests/Configurations.props +++ b/src/System.ComponentModel.TypeConverter/tests/Configurations.props @@ -1,9 +1,8 @@  - netstandard; netcoreapp; - netfx; + uap; \ No newline at end of file diff --git a/src/System.ComponentModel.TypeConverter/tests/ContainerTests.cs b/src/System.ComponentModel.TypeConverter/tests/ContainerTests.cs index 29b2f41535b8..c127dd3cf660 100644 --- a/src/System.ComponentModel.TypeConverter/tests/ContainerTests.cs +++ b/src/System.ComponentModel.TypeConverter/tests/ContainerTests.cs @@ -321,12 +321,9 @@ public void Add2_Name_Duplicate() ex = AssertExtensions.Throws(null, () => container.Add(c2, "dup")); Assert.Equal(typeof(ArgumentException), ex.GetType()); Assert.Null(ex.InnerException); - if (!PlatformDetection.IsNetNative) // .NET Native toolchain optimizes away exception messages and paramnames. - { - Assert.NotNull(ex.Message); - Assert.True(ex.Message.IndexOf("'dup'") != -1); - Assert.Null(ex.ParamName); - } + Assert.NotNull(ex.Message); + Assert.True(ex.Message.IndexOf("'dup'") != -1); + Assert.Null(ex.ParamName); Assert.Equal(1, container.Components.Count); // new component, different case @@ -336,12 +333,9 @@ public void Add2_Name_Duplicate() // unique and case-insensitive Assert.Equal(typeof(ArgumentException), ex.GetType()); Assert.Null(ex.InnerException); - if (!PlatformDetection.IsNetNative) // .NET Native toolchain optimizes away exception messages and paramnames. - { - Assert.NotNull(ex.Message); - Assert.True(ex.Message.IndexOf("'duP'") != -1); - Assert.Null(ex.ParamName); - } + Assert.NotNull(ex.Message); + Assert.True(ex.Message.IndexOf("'duP'") != -1); + Assert.Null(ex.ParamName); Assert.Equal(1, container.Components.Count); // existing component, same case @@ -361,12 +355,9 @@ public void Add2_Name_Duplicate() // unique and case-insensitive Assert.Equal(typeof(ArgumentException), ex.GetType()); Assert.Null(ex.InnerException); - if (!PlatformDetection.IsNetNative) // .NET Native toolchain optimizes away exception messages and paramnames. - { - Assert.NotNull(ex.Message); - Assert.True(ex.Message.IndexOf("'dup'") != -1); - Assert.Null(ex.ParamName); - } + Assert.NotNull(ex.Message); + Assert.True(ex.Message.IndexOf("'dup'") != -1); + Assert.Null(ex.ParamName); Assert.Equal(2, container.Components.Count); Assert.Equal(1, container2.Components.Count); Assert.Same(c5, container2.Components[0]); @@ -705,11 +696,8 @@ public void ValidateName_Component_Null() ArgumentNullException ex = Assert.Throws(() => _container.InvokeValidateName((IComponent)null, "A")); Assert.Equal(typeof(ArgumentNullException), ex.GetType()); Assert.Null(ex.InnerException); - if (!PlatformDetection.IsNetNative) // .NET Native toolchain optimizes away exception messages and paramnames. - { - Assert.NotNull(ex.Message); - Assert.Equal("component", ex.ParamName); - } + Assert.NotNull(ex.Message); + Assert.Equal("component", ex.ParamName); } [Fact] @@ -740,12 +728,9 @@ public void ValidateName_Name_Duplicate() // unique and case-insensitive Assert.Equal(typeof(ArgumentException), ex.GetType()); Assert.Null(ex.InnerException); - if (!PlatformDetection.IsNetNative) // .NET Native toolchain optimizes away exception messages and paramnames. - { - Assert.NotNull(ex.Message); - Assert.True(ex.Message.IndexOf("'dup'") != -1); - Assert.Null(ex.ParamName); - } + Assert.NotNull(ex.Message); + Assert.True(ex.Message.IndexOf("'dup'") != -1); + Assert.Null(ex.ParamName); Assert.Equal(2, _container.Components.Count); _container.InvokeValidateName(compB, "whatever"); @@ -756,12 +741,9 @@ public void ValidateName_Name_Duplicate() // unique and case-insensitive Assert.Equal(typeof(ArgumentException), ex.GetType()); Assert.Null(ex.InnerException); - if (!PlatformDetection.IsNetNative) // .NET Native toolchain optimizes away exception messages and paramnames. - { - Assert.NotNull(ex.Message); - Assert.True(ex.Message.IndexOf("'dup'") != -1); - Assert.Null(ex.ParamName); - } + Assert.NotNull(ex.Message); + Assert.True(ex.Message.IndexOf("'dup'") != -1); + Assert.Null(ex.ParamName); Assert.Equal(2, _container.Components.Count); _container.InvokeValidateName(compC, "whatever"); @@ -774,12 +756,9 @@ public void ValidateName_Name_Duplicate() // unique and case-insensitive Assert.Equal(typeof(ArgumentException), ex.GetType()); Assert.Null(ex.InnerException); - if (!PlatformDetection.IsNetNative) // .NET Native toolchain optimizes away exception messages and paramnames. - { - Assert.NotNull(ex.Message); - Assert.True(ex.Message.IndexOf("'dup'") != -1); - Assert.Null(ex.ParamName); - } + Assert.NotNull(ex.Message); + Assert.True(ex.Message.IndexOf("'dup'") != -1); + Assert.Null(ex.ParamName); Assert.Equal(2, _container.Components.Count); _container.InvokeValidateName(compD, "whatever"); Assert.Equal(1, container2.Components.Count); diff --git a/src/System.ComponentModel.TypeConverter/tests/ContextStackTests.cs b/src/System.ComponentModel.TypeConverter/tests/ContextStackTests.cs index d2c24465fc7a..4c16e148dd74 100644 --- a/src/System.ComponentModel.TypeConverter/tests/ContextStackTests.cs +++ b/src/System.ComponentModel.TypeConverter/tests/ContextStackTests.cs @@ -81,11 +81,8 @@ public void Append_Context_Null() ArgumentNullException ex = Assert.Throws(() => stack.Append(null)); Assert.Equal(typeof(ArgumentNullException), ex.GetType()); Assert.Null(ex.InnerException); - if (!PlatformDetection.IsNetNative) // .NET Native toolchain optimizes away exception messages and paramnames. - { - Assert.NotNull(ex.Message); - Assert.Equal("context", ex.ParamName); - } + Assert.NotNull(ex.Message); + Assert.Equal("context", ex.ParamName); } [Fact] // Item (Int32) @@ -119,21 +116,14 @@ public void Indexer1_Level_Negative() ex = Assert.Throws(() => stack[-1]); Assert.Equal(typeof(ArgumentOutOfRangeException), ex.GetType()); Assert.Null(ex.InnerException); - if (!PlatformDetection.IsNetNative) // .NET Native toolchain optimizes away exception messages and paramnames. - { - Assert.Equal(new ArgumentOutOfRangeException("level").Message, ex.Message); - Assert.Equal("level", ex.ParamName); - } - + Assert.Equal(new ArgumentOutOfRangeException("level").Message, ex.Message); + Assert.Equal("level", ex.ParamName); ex = Assert.Throws(() => stack[-5]); Assert.Equal(typeof(ArgumentOutOfRangeException), ex.GetType()); Assert.Null(ex.InnerException); - if (!PlatformDetection.IsNetNative) // .NET Native toolchain optimizes away exception messages and paramnames. - { - Assert.Equal(new ArgumentOutOfRangeException("level").Message, ex.Message); - Assert.Equal("level", ex.ParamName); - } + Assert.Equal(new ArgumentOutOfRangeException("level").Message, ex.Message); + Assert.Equal("level", ex.ParamName); } [Fact] // Item (Type) @@ -163,11 +153,8 @@ public void Indexer2_Type_Null() ArgumentNullException ex = Assert.Throws(() => stack[(Type)null]); Assert.Equal(typeof(ArgumentNullException), ex.GetType()); Assert.Null(ex.InnerException); - if (!PlatformDetection.IsNetNative) // .NET Native toolchain optimizes away exception messages and paramnames. - { - Assert.NotNull(ex.Message); - Assert.Equal("type", ex.ParamName); - } + Assert.NotNull(ex.Message); + Assert.Equal("type", ex.ParamName); } [Fact] @@ -177,11 +164,8 @@ public void Push_Context_Null() ArgumentNullException ex= Assert.Throws(()=> stack.Push(null)); Assert.Equal(typeof(ArgumentNullException), ex.GetType()); Assert.Null(ex.InnerException); - if (!PlatformDetection.IsNetNative) // .NET Native toolchain optimizes away exception messages and paramnames. - { - Assert.NotNull(ex.Message); - Assert.Equal("context", ex.ParamName); - } + Assert.NotNull(ex.Message); + Assert.Equal("context", ex.ParamName); } [Fact] diff --git a/src/System.ComponentModel.TypeConverter/tests/CultureInfoConverterTests.cs b/src/System.ComponentModel.TypeConverter/tests/CultureInfoConverterTests.cs index 1c61e2ac5f18..2f0fce1a9949 100644 --- a/src/System.ComponentModel.TypeConverter/tests/CultureInfoConverterTests.cs +++ b/src/System.ComponentModel.TypeConverter/tests/CultureInfoConverterTests.cs @@ -96,13 +96,10 @@ public void ConvertFrom_String_InvalidCulture() // a CultureInfo object on this computer Assert.Equal(typeof(ArgumentException), ex.GetType()); Assert.Null(ex.InnerException); - if (!PlatformDetection.IsNetNative) // .NET Native toolchain optimizes away exception messages and paramnames. - { - Assert.NotNull(ex.Message); - Assert.True(ex.Message.IndexOf(typeof(CultureInfo).Name) != -1); - Assert.True(ex.Message.IndexOf("(default)") != -1); - Assert.Null(ex.ParamName); - } + Assert.NotNull(ex.Message); + Assert.True(ex.Message.IndexOf(typeof(CultureInfo).Name) != -1); + Assert.True(ex.Message.IndexOf("(default)") != -1); + Assert.Null(ex.ParamName); } try @@ -117,13 +114,10 @@ public void ConvertFrom_String_InvalidCulture() // a CultureInfo object on this computer Assert.Equal(typeof(ArgumentException), ex.GetType()); Assert.Null(ex.InnerException); - if (!PlatformDetection.IsNetNative) // .NET Native toolchain optimizes away exception messages and paramnames. - { - Assert.NotNull(ex.Message); - Assert.True(ex.Message.IndexOf(typeof(CultureInfo).Name) != -1); - Assert.True(ex.Message.IndexOf(" ") != -1); - Assert.Null(ex.ParamName); - } + Assert.NotNull(ex.Message); + Assert.True(ex.Message.IndexOf(typeof(CultureInfo).Name) != -1); + Assert.True(ex.Message.IndexOf(" ") != -1); + Assert.Null(ex.ParamName); } try @@ -138,13 +132,10 @@ public void ConvertFrom_String_InvalidCulture() // a CultureInfo object on this computer Assert.Equal(typeof(ArgumentException), ex.GetType()); Assert.Null(ex.InnerException); - if (!PlatformDetection.IsNetNative) // .NET Native toolchain optimizes away exception messages and paramnames. - { - Assert.NotNull(ex.Message); - Assert.True(ex.Message.IndexOf(typeof(CultureInfo).Name) != -1); - Assert.True(ex.Message.IndexOf("\r\n") != -1); - Assert.Null(ex.ParamName); - } + Assert.NotNull(ex.Message); + Assert.True(ex.Message.IndexOf(typeof(CultureInfo).Name) != -1); + Assert.True(ex.Message.IndexOf("\r\n") != -1); + Assert.Null(ex.ParamName); } } diff --git a/src/System.ComponentModel.TypeConverter/tests/Design/DesignerCollectionTests.cs b/src/System.ComponentModel.TypeConverter/tests/Design/DesignerCollectionTests.cs index 5659e71c7c1d..01bc941e4d53 100644 --- a/src/System.ComponentModel.TypeConverter/tests/Design/DesignerCollectionTests.cs +++ b/src/System.ComponentModel.TypeConverter/tests/Design/DesignerCollectionTests.cs @@ -13,7 +13,6 @@ public class DesignerCollectionTests { public static IEnumerable Ctor_TestData() { - // [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, ".NET Core fixed a NRE bug.")] if (!PlatformDetection.IsFullFramework) { yield return new object[] { null }; @@ -72,7 +71,6 @@ public void CopyTo_Invoke_Success() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, ".NET Core fixed a NRE bug.")] public void CopyTo_NullIList_Nop() { ICollection collection = new DesignerCollection((IList)null); diff --git a/src/System.ComponentModel.TypeConverter/tests/Design/DesignerOptionServiceTests.cs b/src/System.ComponentModel.TypeConverter/tests/Design/DesignerOptionServiceTests.cs index 38f317521a09..bff0ba6d9fe8 100644 --- a/src/System.ComponentModel.TypeConverter/tests/Design/DesignerOptionServiceTests.cs +++ b/src/System.ComponentModel.TypeConverter/tests/Design/DesignerOptionServiceTests.cs @@ -182,7 +182,6 @@ public void Indexer_InvalidIndex_ThrowsIndexOutOfRangeException(int index) } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public void Properties_GetBeforeAddingChild_ReturnsNonEmpty() { var service = new TestDesignerOptionService(); diff --git a/src/System.ComponentModel.TypeConverter/tests/Design/ServiceContainerTests.cs b/src/System.ComponentModel.TypeConverter/tests/Design/ServiceContainerTests.cs index 63bd9950607c..d46fae98db6a 100644 --- a/src/System.ComponentModel.TypeConverter/tests/Design/ServiceContainerTests.cs +++ b/src/System.ComponentModel.TypeConverter/tests/Design/ServiceContainerTests.cs @@ -544,7 +544,6 @@ public void GetService_DefaultService_ReturnsExpected(Type serviceType) [Theory] [InlineData(null)] [InlineData(typeof(int))] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, ".NET Core fixes a NRE bug.")] public void GetService_NoSuchService_ReturnsNull(Type serviceType) { var container = new ServiceContainer(); diff --git a/src/System.ComponentModel.TypeConverter/tests/Drawing/SizeFConverterTests.cs b/src/System.ComponentModel.TypeConverter/tests/Drawing/SizeFConverterTests.cs index a98388f9eefa..077014e7ec56 100644 --- a/src/System.ComponentModel.TypeConverter/tests/Drawing/SizeFConverterTests.cs +++ b/src/System.ComponentModel.TypeConverter/tests/Drawing/SizeFConverterTests.cs @@ -134,16 +134,6 @@ public void ConvertFrom_NotSupported(object value) [Theory] [MemberData(nameof(SizeFData))] - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)] - public void ConvertTo_NetFramework(float width, float height) - { - TestConvertToString(new SizeF(width, height), FormattableString.Invariant($"{width:G9}, {height:G9}")); - } - - - [Theory] - [MemberData(nameof(SizeFData))] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public void ConvertTo_NotNetFramework(float width, float height) { TestConvertToString(new SizeF(width, height), FormattableString.Invariant($"{width}, {height}")); @@ -262,16 +252,6 @@ public void ConvertFromString_FormatException() [Theory] [MemberData(nameof(SizeFData))] - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)] - public void ConvertToInvariantString_NetFramework(float width, float height) - { - var str = Converter.ConvertToInvariantString(new SizeF(width, height)); - Assert.Equal(FormattableString.Invariant($"{width:G9}, {height:G9}"), str); - } - - [Theory] - [MemberData(nameof(SizeFData))] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public void ConvertToInvariantString_NotNetFramework(float width, float height) { var str = Converter.ConvertToInvariantString(new SizeF(width, height)); @@ -280,16 +260,6 @@ public void ConvertToInvariantString_NotNetFramework(float width, float height) [Theory] [MemberData(nameof(SizeFData))] - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)] - public void ConvertToString_NetFramework(float width, float height) - { - var str = Converter.ConvertToString(new SizeF(width, height)); - Assert.Equal(string.Format(CultureInfo.CurrentCulture, "{0:G9}{2} {1:G9}", width, height, CultureInfo.CurrentCulture.TextInfo.ListSeparator), str); - } - - [Theory] - [MemberData(nameof(SizeFData))] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public void ConvertToString_NotNetFramework(float width, float height) { var str = Converter.ConvertToString(new SizeF(width, height)); diff --git a/src/System.ComponentModel.TypeConverter/tests/EnumConverterTest.cs b/src/System.ComponentModel.TypeConverter/tests/EnumConverterTest.cs index eca7aae09918..13692046ddc5 100644 --- a/src/System.ComponentModel.TypeConverter/tests/EnumConverterTest.cs +++ b/src/System.ComponentModel.TypeConverter/tests/EnumConverterTest.cs @@ -121,7 +121,6 @@ public static void GetStandardValues_Succeeds() Assert.All(Enum.GetValues(typeof(SomeEnum)).Cast(), value => Assert.Contains(value, standardValues)); } - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Does not have fix for #31095")] [Fact] public static void ConvertFrom_ULongFlagsEnum_String() { @@ -131,7 +130,6 @@ public static void ConvertFrom_ULongFlagsEnum_String() Assert.Equal(ULongFlagsEnum.Bit62 | ULongFlagsEnum.Bit63, result); } - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Does not have fix for #31095")] [Fact] public static void ConvertFrom_ULongFlagsEnum_EnumArray() { @@ -141,7 +139,6 @@ public static void ConvertFrom_ULongFlagsEnum_EnumArray() Assert.Equal(ULongFlagsEnum.Bit62 | ULongFlagsEnum.Bit63, result); } - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Does not have fix for #31095")] [Fact] public static void ConvertTo_ULongFlagsEnum_EnumArray() { @@ -151,7 +148,6 @@ public static void ConvertTo_ULongFlagsEnum_EnumArray() Assert.Equal(new Enum[] { ULongFlagsEnum.Bit62, ULongFlagsEnum.Bit63 }, result); } - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Does not have fix for #31095")] [Fact] public static void ConvertFrom_LongFlagsEnum_String() { @@ -161,7 +157,6 @@ public static void ConvertFrom_LongFlagsEnum_String() Assert.Equal(LongFlagsEnum.Bit62 | LongFlagsEnum.Bit63, result); } - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Does not have fix for #31095")] [Fact] public static void ConvertFrom_LongFlagsEnum_EnumArray() { @@ -171,7 +166,6 @@ public static void ConvertFrom_LongFlagsEnum_EnumArray() Assert.Equal(LongFlagsEnum.Bit62 | LongFlagsEnum.Bit63, result); } - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Does not have fix for #31095")] [Fact] public static void ConvertTo_LongFlagsEnum_EnumArray() { diff --git a/src/System.ComponentModel.TypeConverter/tests/MemberDescriptorTests.cs b/src/System.ComponentModel.TypeConverter/tests/MemberDescriptorTests.cs index 42c932649516..87b3c766afcc 100644 --- a/src/System.ComponentModel.TypeConverter/tests/MemberDescriptorTests.cs +++ b/src/System.ComponentModel.TypeConverter/tests/MemberDescriptorTests.cs @@ -10,7 +10,6 @@ namespace System.ComponentModel.Tests public class MemberDescriptorTests { [Fact] - [ActiveIssue("dotnet/corefx #18201", TargetFrameworkMonikers.NetFramework)] public void CopiedMemberDescriptorEqualsItsSource() { string description = "MockCategory"; diff --git a/src/System.ComponentModel.TypeConverter/tests/System.ComponentModel.TypeConverter.Tests.csproj b/src/System.ComponentModel.TypeConverter/tests/System.ComponentModel.TypeConverter.Tests.csproj index 8c4a02704f9c..2b5c5118c5fa 100644 --- a/src/System.ComponentModel.TypeConverter/tests/System.ComponentModel.TypeConverter.Tests.csproj +++ b/src/System.ComponentModel.TypeConverter/tests/System.ComponentModel.TypeConverter.Tests.csproj @@ -5,9 +5,9 @@ true 9.9.9.9 - netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release;netstandard-Debug;netstandard-Release + netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release - + diff --git a/src/System.ComponentModel.TypeConverter/tests/TypeConverterTestBase.cs b/src/System.ComponentModel.TypeConverter/tests/TypeConverterTestBase.cs index f2082ea4df68..d194816c7d22 100644 --- a/src/System.ComponentModel.TypeConverter/tests/TypeConverterTestBase.cs +++ b/src/System.ComponentModel.TypeConverter/tests/TypeConverterTestBase.cs @@ -80,7 +80,6 @@ public void ConvertTo_NullDestinationType_ThrowsArgumentNullException() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, ".NET Core fixes some NullReferenceExceptions in CanConvertTo")] public void CanConvertTo_NullDestinationType_ReturnsFalse() { Assert.False(Converter.CanConvertTo(null)); diff --git a/src/System.ComponentModel/tests/Configurations.props b/src/System.ComponentModel/tests/Configurations.props index ff0d415e4593..acf56fa2750e 100644 --- a/src/System.ComponentModel/tests/Configurations.props +++ b/src/System.ComponentModel/tests/Configurations.props @@ -1,7 +1,8 @@  - netstandard; + netcoreapp; + uap; \ No newline at end of file diff --git a/src/System.ComponentModel/tests/System.ComponentModel.Tests.csproj b/src/System.ComponentModel/tests/System.ComponentModel.Tests.csproj index 2389dad3fbce..403517084190 100644 --- a/src/System.ComponentModel/tests/System.ComponentModel.Tests.csproj +++ b/src/System.ComponentModel/tests/System.ComponentModel.Tests.csproj @@ -1,7 +1,7 @@ {40C01084-DAB1-4F24-8729-85523BC9F04E} - netstandard-Debug;netstandard-Release + netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release diff --git a/src/System.Composition.AttributedModel/tests/Configurations.props b/src/System.Composition.AttributedModel/tests/Configurations.props index ff0d415e4593..b0ad9a4c0cfe 100644 --- a/src/System.Composition.AttributedModel/tests/Configurations.props +++ b/src/System.Composition.AttributedModel/tests/Configurations.props @@ -1,7 +1,9 @@  - netstandard; + netcoreapp; + netfx; + uap; \ No newline at end of file diff --git a/src/System.Composition.AttributedModel/tests/System.Composition.AttributeModel.Tests.csproj b/src/System.Composition.AttributedModel/tests/System.Composition.AttributeModel.Tests.csproj index 5e90d98976d9..10d68c816ebe 100644 --- a/src/System.Composition.AttributedModel/tests/System.Composition.AttributeModel.Tests.csproj +++ b/src/System.Composition.AttributedModel/tests/System.Composition.AttributeModel.Tests.csproj @@ -1,7 +1,7 @@ {853BB14F-8A5B-42B4-A053-21DE1AEBB335} - netstandard-Debug;netstandard-Release + netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release;uap-Debug;uap-Release diff --git a/src/System.Composition.Convention/tests/Configurations.props b/src/System.Composition.Convention/tests/Configurations.props index ff0d415e4593..b0ad9a4c0cfe 100644 --- a/src/System.Composition.Convention/tests/Configurations.props +++ b/src/System.Composition.Convention/tests/Configurations.props @@ -1,7 +1,9 @@  - netstandard; + netcoreapp; + netfx; + uap; \ No newline at end of file diff --git a/src/System.Composition.Convention/tests/System.Composition.Convention.Tests.csproj b/src/System.Composition.Convention/tests/System.Composition.Convention.Tests.csproj index 02a29d927d30..b317d820a28e 100644 --- a/src/System.Composition.Convention/tests/System.Composition.Convention.Tests.csproj +++ b/src/System.Composition.Convention/tests/System.Composition.Convention.Tests.csproj @@ -2,7 +2,7 @@ {17DBE1D4-FCB5-4D55-805C-C4A22EE8C032} System.Composition.Convention.Tests - netstandard-Debug;netstandard-Release + netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release;uap-Debug;uap-Release diff --git a/src/System.Composition.Hosting/tests/Configurations.props b/src/System.Composition.Hosting/tests/Configurations.props index ff0d415e4593..b0ad9a4c0cfe 100644 --- a/src/System.Composition.Hosting/tests/Configurations.props +++ b/src/System.Composition.Hosting/tests/Configurations.props @@ -1,7 +1,9 @@  - netstandard; + netcoreapp; + netfx; + uap; \ No newline at end of file diff --git a/src/System.Composition.Hosting/tests/System.Composition.Hosting.Tests.csproj b/src/System.Composition.Hosting/tests/System.Composition.Hosting.Tests.csproj index 8a0f82741c06..27b5a07de3da 100644 --- a/src/System.Composition.Hosting/tests/System.Composition.Hosting.Tests.csproj +++ b/src/System.Composition.Hosting/tests/System.Composition.Hosting.Tests.csproj @@ -1,7 +1,7 @@ {52BE9F68-69EC-44AA-806E-11EFB57D9B4B} - netstandard-Debug;netstandard-Release + netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release;uap-Debug;uap-Release diff --git a/src/System.Composition.Runtime/tests/Configurations.props b/src/System.Composition.Runtime/tests/Configurations.props index ff0d415e4593..b0ad9a4c0cfe 100644 --- a/src/System.Composition.Runtime/tests/Configurations.props +++ b/src/System.Composition.Runtime/tests/Configurations.props @@ -1,7 +1,9 @@  - netstandard; + netcoreapp; + netfx; + uap; \ No newline at end of file diff --git a/src/System.Composition.Runtime/tests/System.Composition.Runtime.Tests.csproj b/src/System.Composition.Runtime/tests/System.Composition.Runtime.Tests.csproj index 2af1d2c01a07..94c2a14b1564 100644 --- a/src/System.Composition.Runtime/tests/System.Composition.Runtime.Tests.csproj +++ b/src/System.Composition.Runtime/tests/System.Composition.Runtime.Tests.csproj @@ -1,7 +1,7 @@ {3B6042E6-9765-4A03-9089-92050100C85E} - netstandard-Debug;netstandard-Release + netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release;uap-Debug;uap-Release diff --git a/src/System.Composition.TypedParts/tests/Configurations.props b/src/System.Composition.TypedParts/tests/Configurations.props index ff0d415e4593..b0ad9a4c0cfe 100644 --- a/src/System.Composition.TypedParts/tests/Configurations.props +++ b/src/System.Composition.TypedParts/tests/Configurations.props @@ -1,7 +1,9 @@  - netstandard; + netcoreapp; + netfx; + uap; \ No newline at end of file diff --git a/src/System.Composition.TypedParts/tests/ContainerConfigurationTests.cs b/src/System.Composition.TypedParts/tests/ContainerConfigurationTests.cs index cf54bc7d032f..d1581d02aefd 100644 --- a/src/System.Composition.TypedParts/tests/ContainerConfigurationTests.cs +++ b/src/System.Composition.TypedParts/tests/ContainerConfigurationTests.cs @@ -604,7 +604,6 @@ public static IEnumerable DebuggerAttributes_TestData() [Theory] [MemberData(nameof(DebuggerAttributes_TestData))] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Cannot do DebuggerAttribute testing on UapAot: requires internal Reflection on framework types.")] public void DebuggerAttributes_GetViaReflection_Success(ContainerConfiguration configuration) { DebuggerAttributeInfo debuggerAttributeInfo = DebuggerAttributes.ValidateDebuggerTypeProxyProperties(configuration); diff --git a/src/System.Composition.TypedParts/tests/System.Composition.TypedParts.Tests.csproj b/src/System.Composition.TypedParts/tests/System.Composition.TypedParts.Tests.csproj index 6ab6f9a8fd00..7711af474f62 100644 --- a/src/System.Composition.TypedParts/tests/System.Composition.TypedParts.Tests.csproj +++ b/src/System.Composition.TypedParts/tests/System.Composition.TypedParts.Tests.csproj @@ -1,7 +1,7 @@ {8D1CB149-B52E-472B-A91F-DF1C77D8BA46} - netstandard-Debug;netstandard-Release + netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release;uap-Debug;uap-Release diff --git a/src/System.Composition/tests/Configurations.props b/src/System.Composition/tests/Configurations.props index ff0d415e4593..b0ad9a4c0cfe 100644 --- a/src/System.Composition/tests/Configurations.props +++ b/src/System.Composition/tests/Configurations.props @@ -1,7 +1,9 @@  - netstandard; + netcoreapp; + netfx; + uap; \ No newline at end of file diff --git a/src/System.Composition/tests/ContractTests.cs b/src/System.Composition/tests/ContractTests.cs index f9e0867c0463..d6d1465da37c 100644 --- a/src/System.Composition/tests/ContractTests.cs +++ b/src/System.Composition/tests/ContractTests.cs @@ -68,7 +68,6 @@ public void ConstraintsWithEquivalentKeysAndValuesHaveTheSameHashCode() } [Fact] - [ActiveIssue("https://github.com/dotnet/corefx/issues/20656", TargetFrameworkMonikers.UapAot)] public void FormattingTheContractPrintsConstraintKeysAndValues() { var mcd = new CompositionContract(typeof(AType), null, new Dictionary { { "A", 1 }, { "B", "C" } }); @@ -77,7 +76,6 @@ public void FormattingTheContractPrintsConstraintKeysAndValues() } [Fact] - [ActiveIssue("https://github.com/dotnet/corefx/issues/20656", TargetFrameworkMonikers.UapAot)] public void FormattingTheContractPrintsNameAndDiscriminator() { var mcd = new CompositionContract(typeof(AType), "inner", new Dictionary { { "A", 1 } }); diff --git a/src/System.Composition/tests/DiscoveryTests.cs b/src/System.Composition/tests/DiscoveryTests.cs index 01add732788b..05be7f53ed4e 100644 --- a/src/System.Composition/tests/DiscoveryTests.cs +++ b/src/System.Composition/tests/DiscoveryTests.cs @@ -59,7 +59,6 @@ public void DiscoversCustomExportAttributesUnderConventions() } [Fact] - [ActiveIssue("https://github.com/dotnet/corefx/issues/20656", TargetFrameworkMonikers.UapAot)] [ActiveIssue(24903, TargetFrameworkMonikers.NetFramework)] public void InstanceExportsOfIncompatibleContractsAreDetected() { @@ -68,7 +67,6 @@ public void InstanceExportsOfIncompatibleContractsAreDetected() } [Fact] - [ActiveIssue("https://github.com/dotnet/corefx/issues/20656", TargetFrameworkMonikers.UapAot)] [ActiveIssue(24903, TargetFrameworkMonikers.NetFramework)] public void PropertyExportsOfIncompatibleContractsAreDetected() { @@ -132,7 +130,6 @@ public class MultipleImportsOnProperty } [Fact] - [ActiveIssue("https://github.com/dotnet/corefx/issues/20656", TargetFrameworkMonikers.UapAot)] [ActiveIssue(24903, TargetFrameworkMonikers.NetFramework)] public void MultipleImportAttributesAreDetected() { diff --git a/src/System.Composition/tests/ErrorMessageQualityTests.cs b/src/System.Composition/tests/ErrorMessageQualityTests.cs index adcb87d84509..4288593c81d8 100644 --- a/src/System.Composition/tests/ErrorMessageQualityTests.cs +++ b/src/System.Composition/tests/ErrorMessageQualityTests.cs @@ -64,7 +64,6 @@ public class RequiresOnlyOne } [Fact] - [ActiveIssue("https://github.com/dotnet/corefx/issues/20656", TargetFrameworkMonikers.UapAot)] [ActiveIssue(24903, TargetFrameworkMonikers.NetFramework)] public void MissingTopLevelExportMessageIsInformative() { @@ -74,7 +73,6 @@ public void MissingTopLevelExportMessageIsInformative() } [Fact] - [ActiveIssue("https://github.com/dotnet/corefx/issues/20656", TargetFrameworkMonikers.UapAot)] [ActiveIssue(24903, TargetFrameworkMonikers.NetFramework)] public void MissingTopLevelNamedExportMessageIsInformative() { diff --git a/src/System.Composition/tests/ExportFactoryTests.cs b/src/System.Composition/tests/ExportFactoryTests.cs index 2e384d211caa..d8cf01c243dd 100644 --- a/src/System.Composition/tests/ExportFactoryTests.cs +++ b/src/System.Composition/tests/ExportFactoryTests.cs @@ -117,7 +117,6 @@ public void SharedPartsAreSharedBetweenAllScopes() } [Fact] - [ActiveIssue("https://github.com/dotnet/corefx/issues/20656", TargetFrameworkMonikers.UapAot)] [ActiveIssue(24903, TargetFrameworkMonikers.NetFramework)] public void TheSameSharedInstanceIsReusedWithinItsSharingBoundary() { diff --git a/src/System.Composition/tests/MetadataViewGenerationTests.cs b/src/System.Composition/tests/MetadataViewGenerationTests.cs index 9887fd4fe639..e79ea8106d4f 100644 --- a/src/System.Composition/tests/MetadataViewGenerationTests.cs +++ b/src/System.Composition/tests/MetadataViewGenerationTests.cs @@ -81,7 +81,6 @@ public InvalidConcreteView(string unsupported) { } } [Fact] - [ActiveIssue("https://github.com/dotnet/corefx/issues/20656", TargetFrameworkMonikers.UapAot)] [ActiveIssue(24903, TargetFrameworkMonikers.NetFramework)] public void AConcreteTypeWithUnsupportedConstructorsCannotBeUsedAsAMetadataView() { @@ -107,7 +106,6 @@ public class ImportsWithMetadataInterface } [Fact] - [ActiveIssue("https://github.com/dotnet/corefx/issues/20656", TargetFrameworkMonikers.UapAot)] [ActiveIssue(24903, TargetFrameworkMonikers.NetFramework)] public void UnsupportedMetadataViewMessageIsInformative() { diff --git a/src/System.Composition/tests/OpenGenericsTests.cs b/src/System.Composition/tests/OpenGenericsTests.cs index 6457793f2cca..27babe51173e 100644 --- a/src/System.Composition/tests/OpenGenericsTests.cs +++ b/src/System.Composition/tests/OpenGenericsTests.cs @@ -130,7 +130,6 @@ public void MultipleGenericExportsCanBeSpecifiedAtTheClassLevel() // In future, the set of allowable generic type mappings will be expanded (see // ignored tests above). [Fact] - [ActiveIssue("https://github.com/dotnet/corefx/issues/20656", TargetFrameworkMonikers.UapAot)] [ActiveIssue(24903, TargetFrameworkMonikers.NetFramework)] public void TypesWithMismatchedGenericParameterListsAreDetectedDuringDiscovery() { @@ -139,7 +138,6 @@ public void TypesWithMismatchedGenericParameterListsAreDetectedDuringDiscovery() } [Fact] - [ActiveIssue("https://github.com/dotnet/corefx/issues/20656", TargetFrameworkMonikers.UapAot)] [ActiveIssue(24903, TargetFrameworkMonikers.NetFramework)] public void TypesWithNonGenericExportsAreDetectedDuringDiscovery() { diff --git a/src/System.Composition/tests/SharingTests.cs b/src/System.Composition/tests/SharingTests.cs index 9d9d9c46022e..db23695cabd3 100644 --- a/src/System.Composition/tests/SharingTests.cs +++ b/src/System.Composition/tests/SharingTests.cs @@ -339,7 +339,6 @@ public void BoundaryExposedBoundaryButNoneImported() /// Needs to be fixed so that specifying boundary would automatically create the shared /// [Fact] - [ActiveIssue("https://github.com/dotnet/corefx/issues/20656", TargetFrameworkMonikers.UapAot)] [ActiveIssue(24903, TargetFrameworkMonikers.NetFramework)] public void BoundarySharingTest() { @@ -362,7 +361,6 @@ public void BoundarySharingTest() /// CirA root of the composition has to be shared explicitly. /// [Fact] - [ActiveIssue("https://github.com/dotnet/corefx/issues/20656", TargetFrameworkMonikers.UapAot)] [ActiveIssue(24903, TargetFrameworkMonikers.NetFramework)] public void CircularBoundarySharingTest() { @@ -380,7 +378,6 @@ public void CircularBoundarySharingTest() /// Something is badly busted here.. I am getting a null ref exception /// [Fact] - [ActiveIssue("https://github.com/dotnet/corefx/issues/20656", TargetFrameworkMonikers.UapAot)] [ActiveIssue(24903, TargetFrameworkMonikers.NetFramework)] public void MultipleBoundarySpecified() { diff --git a/src/System.Composition/tests/System.Composition.Tests.csproj b/src/System.Composition/tests/System.Composition.Tests.csproj index 82e54a39b939..c099f476f03e 100644 --- a/src/System.Composition/tests/System.Composition.Tests.csproj +++ b/src/System.Composition/tests/System.Composition.Tests.csproj @@ -3,7 +3,7 @@ {4852A19F-C05C-478D-BFA0-59FD03DE0E3F} System.Composition.Lightweight.UnitTests System.Composition.Tests - netstandard-Debug;netstandard-Release + netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release;uap-Debug;uap-Release diff --git a/src/System.Composition/tests/TestLibrary/Configurations.props b/src/System.Composition/tests/TestLibrary/Configurations.props index 016bde99d64f..581054d46db4 100644 --- a/src/System.Composition/tests/TestLibrary/Configurations.props +++ b/src/System.Composition/tests/TestLibrary/Configurations.props @@ -1,9 +1,7 @@  - netstandard1.3; netstandard; - netcoreapp; \ No newline at end of file diff --git a/src/System.Composition/tests/TestLibrary/TestLibrary.csproj b/src/System.Composition/tests/TestLibrary/TestLibrary.csproj index 63683e18ebd1..591093d1de15 100644 --- a/src/System.Composition/tests/TestLibrary/TestLibrary.csproj +++ b/src/System.Composition/tests/TestLibrary/TestLibrary.csproj @@ -1,7 +1,7 @@ {DA6841A5-0344-4CC7-98B0-89CBEE18DEE3} - netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release;netstandard1.3-Debug;netstandard1.3-Release + netstandard-Debug;netstandard-Release diff --git a/src/System.Configuration.ConfigurationManager/tests/Configurations.props b/src/System.Configuration.ConfigurationManager/tests/Configurations.props index a0590ba3b109..8a923cf73f83 100644 --- a/src/System.Configuration.ConfigurationManager/tests/Configurations.props +++ b/src/System.Configuration.ConfigurationManager/tests/Configurations.props @@ -1,7 +1,9 @@ - netstandard; + netcoreapp; + netfx; + uap; diff --git a/src/System.Configuration.ConfigurationManager/tests/System.Configuration.ConfigurationManager.Tests.csproj b/src/System.Configuration.ConfigurationManager/tests/System.Configuration.ConfigurationManager.Tests.csproj index 9d92d9fd4207..5ea867a0464f 100644 --- a/src/System.Configuration.ConfigurationManager/tests/System.Configuration.ConfigurationManager.Tests.csproj +++ b/src/System.Configuration.ConfigurationManager/tests/System.Configuration.ConfigurationManager.Tests.csproj @@ -5,7 +5,7 @@ true 1 true - netstandard-Debug;netstandard-Release + netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release;uap-Debug;uap-Release diff --git a/src/System.Configuration.ConfigurationManager/tests/System/Configuration/TimeSpanValidatorAttributeTests.cs b/src/System.Configuration.ConfigurationManager/tests/System/Configuration/TimeSpanValidatorAttributeTests.cs index acbf45009adc..4a40b028a654 100644 --- a/src/System.Configuration.ConfigurationManager/tests/System/Configuration/TimeSpanValidatorAttributeTests.cs +++ b/src/System.Configuration.ConfigurationManager/tests/System/Configuration/TimeSpanValidatorAttributeTests.cs @@ -114,7 +114,6 @@ public void MinValue_Get() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Exception messages are different")] public void MinValueString_TooSmall() { RemoteExecutor.Invoke(() => @@ -133,7 +132,6 @@ public void MinValueString_TooSmall() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Exception messages are different")] public void MaxValueString_TooBig() { RemoteExecutor.Invoke(() => diff --git a/src/System.Console/tests/Configurations.props b/src/System.Console/tests/Configurations.props index 04de91de0325..6f8bf129ae69 100644 --- a/src/System.Console/tests/Configurations.props +++ b/src/System.Console/tests/Configurations.props @@ -1,8 +1,10 @@  - netstandard; - netstandard-Windows_NT; + netcoreapp; + netcoreapp-Windows_NT; + uap; + uap-Windows_NT; \ No newline at end of file diff --git a/src/System.Console/tests/ConsoleEncoding.cs b/src/System.Console/tests/ConsoleEncoding.cs index b4bacd9fa4fd..7cd86a1a90e3 100644 --- a/src/System.Console/tests/ConsoleEncoding.cs +++ b/src/System.Console/tests/ConsoleEncoding.cs @@ -22,7 +22,6 @@ public static IEnumerable InputData() } [Theory] - [ActiveIssue("https://github.com/dotnet/corefx/issues/18220", TargetFrameworkMonikers.UapAot)] [MemberData(nameof(InputData))] public void TestEncoding(string inputString) { @@ -117,7 +116,6 @@ public class NonexistentCodePageEncoding : Encoding } [Fact] - [ActiveIssue("https://github.com/dotnet/corefx/issues/18220", TargetFrameworkMonikers.UapAot)] public void InputEncoding_SetWithInInitialized_ResetsIn() { RemoteExecutor.Invoke(() => @@ -160,7 +158,6 @@ public void InputEncoding_SetEncodingWithInvalidCodePage_ThrowsIOException() } [Fact] - [ActiveIssue("https://github.com/dotnet/corefx/issues/18220", TargetFrameworkMonikers.UapAot)] public void OutputEncoding_SetWithErrorAndOutputInitialized_ResetsErrorAndOutput() { RemoteExecutor.Invoke(() => @@ -193,7 +190,6 @@ public void OutputEncoding_SetNull_ThrowsArgumentNullException() } [Fact] - [ActiveIssue("https://github.com/dotnet/corefx/issues/18220", TargetFrameworkMonikers.UapAot)] [PlatformSpecific(TestPlatforms.Windows)] public void OutputEncoding_SetEncodingWithInvalidCodePage_ThrowsIOException() { diff --git a/src/System.Console/tests/ConsoleKeyInfoTests.cs b/src/System.Console/tests/ConsoleKeyInfoTests.cs index 8cef9f7b8f66..0f23cd1be11d 100644 --- a/src/System.Console/tests/ConsoleKeyInfoTests.cs +++ b/src/System.Console/tests/ConsoleKeyInfoTests.cs @@ -56,7 +56,6 @@ public void NotEquals_DifferentData(ConsoleKeyInfo left, ConsoleKeyInfo right) Assert.True(left != right); } - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] // .NET Framework's hashing algorithm doesn't factor in CKI.Key [Theory] [MemberData(nameof(NotEqualConsoleKeyInfos))] public void HashCodeNotEquals_DifferentData(ConsoleKeyInfo left, ConsoleKeyInfo right) diff --git a/src/System.Console/tests/ReadAndWrite.cs b/src/System.Console/tests/ReadAndWrite.cs index 9d19c8db64ed..2a22e9adfe2e 100644 --- a/src/System.Console/tests/ReadAndWrite.cs +++ b/src/System.Console/tests/ReadAndWrite.cs @@ -259,8 +259,6 @@ public static unsafe void ValidateConsoleEncoding(Encoding encoding) } [Fact] - // On the full framework it is not guaranteed to eat the preamble bytes - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public static unsafe void OutputEncodingPreamble() { Encoding curEncoding = Console.OutputEncoding; diff --git a/src/System.Console/tests/SyncTextReader.cs b/src/System.Console/tests/SyncTextReader.cs index 7e90aa11e065..c442a6da53f2 100644 --- a/src/System.Console/tests/SyncTextReader.cs +++ b/src/System.Console/tests/SyncTextReader.cs @@ -8,7 +8,6 @@ using Xunit; -[SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Issue https://github.com/dotnet/corefx/issues/18220")] public class SyncTextReader { // NOTE: These tests test the underlying SyncTextReader by diff --git a/src/System.Console/tests/System.Console.Tests.csproj b/src/System.Console/tests/System.Console.Tests.csproj index a661cacff324..8f0a9e424ae3 100644 --- a/src/System.Console/tests/System.Console.Tests.csproj +++ b/src/System.Console/tests/System.Console.Tests.csproj @@ -3,7 +3,7 @@ {3ED7BCF1-34B9-49B7-9C25-0BC3304C0858} true true - netstandard-Debug;netstandard-Release;netstandard-Windows_NT-Debug;netstandard-Windows_NT-Release + netcoreapp-Debug;netcoreapp-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Debug;uap-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release diff --git a/src/System.Console/tests/WindowAndCursorProps.cs b/src/System.Console/tests/WindowAndCursorProps.cs index c467893e9239..44a71ab274c6 100644 --- a/src/System.Console/tests/WindowAndCursorProps.cs +++ b/src/System.Console/tests/WindowAndCursorProps.cs @@ -223,7 +223,6 @@ public static void Title_SetUnix_Success() [Fact] [PlatformSpecific(TestPlatforms.Windows)] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "// NETFX does not have the fix https://github.com/dotnet/corefx/pull/28905")] public static void Title_GetWindows_ReturnsNonNull() { Assert.NotNull(Console.Title); @@ -231,7 +230,6 @@ public static void Title_GetWindows_ReturnsNonNull() [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindowsNanoServer))] [PlatformSpecific(TestPlatforms.Windows)] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "// NETFX does not have the fix https://github.com/dotnet/corefx/pull/28905")] public static void Title_Get_Windows_NoNulls() { string title = Console.Title; @@ -288,15 +286,6 @@ public static void Title_SetNull_ThrowsArgumentNullException() AssertExtensions.Throws("value", () => Console.Title = null); } - [Fact] - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)] - public static void Title_SetGreaterThan24500Chars_ThrowsArgumentOutOfRangeException() - { - // We don't explicitly throw on Core as this isn't technically correct - string newTitle = new string('a', 24501); - AssertExtensions.Throws("value", () => Console.Title = newTitle); - } - [Fact] [OuterLoop] // makes noise, not very inner-loop friendly public static void Beep_Invoke_Success() diff --git a/src/System.Data.Common/tests/Configurations.props b/src/System.Data.Common/tests/Configurations.props index e43964ecf9e7..acf56fa2750e 100644 --- a/src/System.Data.Common/tests/Configurations.props +++ b/src/System.Data.Common/tests/Configurations.props @@ -2,7 +2,7 @@ netcoreapp; - netstandard; + uap; \ No newline at end of file diff --git a/src/System.Data.Common/tests/System.Data.Common.Tests.csproj b/src/System.Data.Common/tests/System.Data.Common.Tests.csproj index 7642909de3db..fdeeb6dc9115 100644 --- a/src/System.Data.Common/tests/System.Data.Common.Tests.csproj +++ b/src/System.Data.Common/tests/System.Data.Common.Tests.csproj @@ -3,7 +3,7 @@ {B473F77D-4168-4123-932A-E88020B768FA} 0168,0169,0414,0219,0649 true - netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release + netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release @@ -115,10 +115,8 @@ Common\System\Runtime\Serialization\Formatters\BinaryFormatterHelpers.cs - + - - diff --git a/src/System.Data.DataSetExtensions/tests/Configurations.props b/src/System.Data.DataSetExtensions/tests/Configurations.props index ff0d415e4593..acf56fa2750e 100644 --- a/src/System.Data.DataSetExtensions/tests/Configurations.props +++ b/src/System.Data.DataSetExtensions/tests/Configurations.props @@ -1,7 +1,8 @@  - netstandard; + netcoreapp; + uap; \ No newline at end of file diff --git a/src/System.Data.DataSetExtensions/tests/System.Data.DataSetExtensions.Tests.csproj b/src/System.Data.DataSetExtensions/tests/System.Data.DataSetExtensions.Tests.csproj index 7fe4fdbd477c..ab600f070d71 100644 --- a/src/System.Data.DataSetExtensions/tests/System.Data.DataSetExtensions.Tests.csproj +++ b/src/System.Data.DataSetExtensions/tests/System.Data.DataSetExtensions.Tests.csproj @@ -1,9 +1,7 @@ - - chk {2B38992F-9979-485F-B104-38C476D0B706} - netstandard-Debug;netstandard-Release + netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release diff --git a/src/System.Data.SqlClient/tests/FunctionalTests/Configurations.props b/src/System.Data.SqlClient/tests/FunctionalTests/Configurations.props index 7639596dc4d7..729176f90575 100644 --- a/src/System.Data.SqlClient/tests/FunctionalTests/Configurations.props +++ b/src/System.Data.SqlClient/tests/FunctionalTests/Configurations.props @@ -1,8 +1,8 @@ - netstandard-Unix; - netstandard-Windows_NT; + uap-Windows_NT; + netfx-Windows_NT; netcoreapp-Unix; netcoreapp-Windows_NT; diff --git a/src/System.Data.SqlClient/tests/FunctionalTests/DiagnosticTest.cs b/src/System.Data.SqlClient/tests/FunctionalTests/DiagnosticTest.cs index ae68d28a1309..96430816c7bd 100644 --- a/src/System.Data.SqlClient/tests/FunctionalTests/DiagnosticTest.cs +++ b/src/System.Data.SqlClient/tests/FunctionalTests/DiagnosticTest.cs @@ -27,7 +27,7 @@ public class DiagnosticTest public static bool IsConnectionStringConfigured() => s_tcpConnStr != string.Empty; [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot | TargetFrameworkMonikers.NetFramework, "Internals reflection not supported on UapAot | Feature not available on Framework")] + [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Feature not available on Framework")] public void ExecuteScalarTest() { RemoteExecutor.Invoke(() => @@ -49,7 +49,7 @@ public void ExecuteScalarTest() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot | TargetFrameworkMonikers.NetFramework, "Internals reflection not supported on UapAot | Feature not available on Framework")] + [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Feature not available on Framework")] public void ExecuteScalarErrorTest() { RemoteExecutor.Invoke(() => @@ -73,7 +73,7 @@ public void ExecuteScalarErrorTest() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot | TargetFrameworkMonikers.NetFramework, "Internals reflection not supported on UapAot | Feature not available on Framework")] + [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Feature not available on Framework")] public void ExecuteNonQueryTest() { RemoteExecutor.Invoke(() => @@ -95,7 +95,7 @@ public void ExecuteNonQueryTest() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot | TargetFrameworkMonikers.NetFramework, "Internals reflection not supported on UapAot | Feature not available on Framework")] + [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Feature not available on Framework")] public void ExecuteNonQueryErrorTest() { RemoteExecutor.Invoke(() => @@ -133,7 +133,7 @@ public void ExecuteNonQueryErrorTest() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot | TargetFrameworkMonikers.NetFramework, "Internals reflection not supported on UapAot | Feature not available on Framework")] + [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Feature not available on Framework")] public void ExecuteReaderTest() { RemoteExecutor.Invoke(() => @@ -156,7 +156,7 @@ public void ExecuteReaderTest() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot | TargetFrameworkMonikers.NetFramework, "Internals reflection not supported on UapAot | Feature not available on Framework")] + [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Feature not available on Framework")] public void ExecuteReaderErrorTest() { RemoteExecutor.Invoke(() => @@ -182,7 +182,7 @@ public void ExecuteReaderErrorTest() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot | TargetFrameworkMonikers.NetFramework, "Internals reflection not supported on UapAot | Feature not available on Framework")] + [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Feature not available on Framework")] public void ExecuteReaderWithCommandBehaviorTest() { RemoteExecutor.Invoke(() => @@ -205,7 +205,7 @@ public void ExecuteReaderWithCommandBehaviorTest() } [ConditionalFact(nameof(IsConnectionStringConfigured))] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot | TargetFrameworkMonikers.NetFramework, "Internals reflection not supported on UapAot | Feature not available on Framework")] + [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Feature not available on Framework")] public void ExecuteXmlReaderTest() { RemoteExecutor.Invoke(cs => @@ -228,7 +228,7 @@ public void ExecuteXmlReaderTest() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot | TargetFrameworkMonikers.NetFramework, "Internals reflection not supported on UapAot | Feature not available on Framework")] + [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Feature not available on Framework")] public void ExecuteXmlReaderErrorTest() { RemoteExecutor.Invoke(() => @@ -254,7 +254,7 @@ public void ExecuteXmlReaderErrorTest() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot | TargetFrameworkMonikers.NetFramework, "Internals reflection not supported on UapAot | Feature not available on Framework")] + [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Feature not available on Framework")] public void ExecuteScalarAsyncTest() { RemoteExecutor.Invoke(() => @@ -276,7 +276,7 @@ public void ExecuteScalarAsyncTest() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot | TargetFrameworkMonikers.NetFramework, "Internals reflection not supported on UapAot | Feature not available on Framework")] + [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Feature not available on Framework")] public void ExecuteScalarAsyncErrorTest() { RemoteExecutor.Invoke(() => @@ -300,7 +300,7 @@ public void ExecuteScalarAsyncErrorTest() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot | TargetFrameworkMonikers.NetFramework, "Internals reflection not supported on UapAot | Feature not available on Framework")] + [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Feature not available on Framework")] public void ExecuteNonQueryAsyncTest() { RemoteExecutor.Invoke(() => @@ -322,7 +322,7 @@ public void ExecuteNonQueryAsyncTest() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot | TargetFrameworkMonikers.NetFramework, "Internals reflection not supported on UapAot | Feature not available on Framework")] + [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Feature not available on Framework")] public void ExecuteNonQueryAsyncErrorTest() { RemoteExecutor.Invoke(() => @@ -345,7 +345,7 @@ public void ExecuteNonQueryAsyncErrorTest() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot | TargetFrameworkMonikers.NetFramework, "Internals reflection not supported on UapAot | Feature not available on Framework")] + [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Feature not available on Framework")] public void ExecuteReaderAsyncTest() { RemoteExecutor.Invoke(() => @@ -368,7 +368,7 @@ public void ExecuteReaderAsyncTest() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot | TargetFrameworkMonikers.NetFramework, "Internals reflection not supported on UapAot | Feature not available on Framework")] + [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Feature not available on Framework")] public void ExecuteReaderAsyncErrorTest() { RemoteExecutor.Invoke(() => @@ -394,7 +394,7 @@ public void ExecuteReaderAsyncErrorTest() } [ConditionalFact(nameof(IsConnectionStringConfigured))] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot | TargetFrameworkMonikers.NetFramework, "Internals reflection not supported on UapAot | Feature not available on Framework")] + [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Feature not available on Framework")] public void ExecuteXmlReaderAsyncTest() { RemoteExecutor.Invoke(cs => @@ -417,7 +417,7 @@ public void ExecuteXmlReaderAsyncTest() } [ConditionalFact(nameof(IsConnectionStringConfigured))] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot | TargetFrameworkMonikers.NetFramework, "Internals reflection not supported on UapAot | Feature not available on Framework")] + [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Feature not available on Framework")] public void ExecuteXmlReaderAsyncErrorTest() { RemoteExecutor.Invoke(cs => @@ -443,7 +443,7 @@ public void ExecuteXmlReaderAsyncErrorTest() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot | TargetFrameworkMonikers.NetFramework, "Internals reflection not supported on UapAot | Feature not available on Framework")] + [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Feature not available on Framework")] public void ConnectionOpenTest() { RemoteExecutor.Invoke(() => @@ -464,7 +464,7 @@ public void ConnectionOpenTest() } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindowsSubsystemForLinux))] // [ActiveIssue(11057)] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot | TargetFrameworkMonikers.NetFramework, "Internals reflection not supported on UapAot | Feature not available on Framework")] + [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Feature not available on Framework")] public void ConnectionOpenErrorTest() { RemoteExecutor.Invoke(() => @@ -481,7 +481,7 @@ public void ConnectionOpenErrorTest() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot | TargetFrameworkMonikers.NetFramework, "Internals reflection not supported on UapAot | Feature not available on Framework")] + [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Feature not available on Framework")] public void ConnectionOpenAsyncTest() { RemoteExecutor.Invoke(() => @@ -498,7 +498,7 @@ public void ConnectionOpenAsyncTest() } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindowsSubsystemForLinux))] // [ActiveIssue(11057)] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot | TargetFrameworkMonikers.NetFramework, "Internals reflection not supported on UapAot | Feature not available on Framework")] + [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Feature not available on Framework")] public void ConnectionOpenAsyncErrorTest() { RemoteExecutor.Invoke(() => diff --git a/src/System.Data.SqlClient/tests/FunctionalTests/System.Data.SqlClient.Tests.csproj b/src/System.Data.SqlClient/tests/FunctionalTests/System.Data.SqlClient.Tests.csproj index 1b7013dbcb06..f69086dcc15b 100644 --- a/src/System.Data.SqlClient/tests/FunctionalTests/System.Data.SqlClient.Tests.csproj +++ b/src/System.Data.SqlClient/tests/FunctionalTests/System.Data.SqlClient.Tests.csproj @@ -2,7 +2,7 @@ {F3E72F35-0351-4D67-9388-725BCAD807BA} true - netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netstandard-Unix-Debug;netstandard-Unix-Release;netstandard-Windows_NT-Debug;netstandard-Windows_NT-Release + netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netfx-Windows_NT-Debug;netfx-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release @@ -28,7 +28,7 @@ - + diff --git a/src/System.Data.SqlClient/tests/ManualTests/Configurations.props b/src/System.Data.SqlClient/tests/ManualTests/Configurations.props index febffb03ac69..f97cd5ea7a97 100644 --- a/src/System.Data.SqlClient/tests/ManualTests/Configurations.props +++ b/src/System.Data.SqlClient/tests/ManualTests/Configurations.props @@ -1,8 +1,8 @@  - netstandard; netcoreapp; + uap; \ No newline at end of file diff --git a/src/System.Data.SqlClient/tests/ManualTests/DataCommon/AssemblyResourceManager.cs b/src/System.Data.SqlClient/tests/ManualTests/DataCommon/AssemblyResourceManager.cs index 40b0961f6155..88e5afff57cb 100644 --- a/src/System.Data.SqlClient/tests/ManualTests/DataCommon/AssemblyResourceManager.cs +++ b/src/System.Data.SqlClient/tests/ManualTests/DataCommon/AssemblyResourceManager.cs @@ -55,27 +55,19 @@ public override bool TryInvokeMember(InvokeMemberBinder binder, object[] args, o private bool TryGetResourceValue(string resourceName, object[] args, out object result) { - if (PlatformDetection.IsNetNative) - { - result = string.Empty; - return true; - } - else - { - var type = _resourceAssembly.GetType("System.SR"); - var info = type.GetProperty(resourceName, BindingFlags.NonPublic | BindingFlags.Static); + var type = _resourceAssembly.GetType("System.SR"); + var info = type.GetProperty(resourceName, BindingFlags.NonPublic | BindingFlags.Static); - result = null; - if (info != null) + result = null; + if (info != null) + { + result = info.GetValue(null); + if (args != null) { - result = info.GetValue(null); - if (args != null) - { - result = string.Format((string)result, args); - } + result = string.Format((string)result, args); } - return result != null; } + return result != null; } } } diff --git a/src/System.Data.SqlClient/tests/ManualTests/System.Data.SqlClient.ManualTesting.Tests.csproj b/src/System.Data.SqlClient/tests/ManualTests/System.Data.SqlClient.ManualTesting.Tests.csproj index a041436e2a84..05faf44fc55c 100644 --- a/src/System.Data.SqlClient/tests/ManualTests/System.Data.SqlClient.ManualTesting.Tests.csproj +++ b/src/System.Data.SqlClient/tests/ManualTests/System.Data.SqlClient.ManualTesting.Tests.csproj @@ -1,7 +1,7 @@ {45DB5F86-7AE3-45C6-870D-F9357B66BDB5} - netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release + netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release diff --git a/src/System.Data.SqlClient/tests/StressTests/System.Data.SqlClient.Stress.Tests/Configurations.props b/src/System.Data.SqlClient/tests/StressTests/System.Data.SqlClient.Stress.Tests/Configurations.props index 24168e5ec571..6c4bab1070cd 100644 --- a/src/System.Data.SqlClient/tests/StressTests/System.Data.SqlClient.Stress.Tests/Configurations.props +++ b/src/System.Data.SqlClient/tests/StressTests/System.Data.SqlClient.Stress.Tests/Configurations.props @@ -1,8 +1,10 @@ - netstandard-Unix; - netstandard-Windows_NT; + netcoreapp-Unix; + netcoreapp-Windows_NT; + netfx-Windows_NT; + uap-Windows_NT; \ No newline at end of file diff --git a/src/System.Data.SqlClient/tests/StressTests/System.Data.SqlClient.Stress.Tests/System.Data.SqlClient.Stress.Tests.csproj b/src/System.Data.SqlClient/tests/StressTests/System.Data.SqlClient.Stress.Tests/System.Data.SqlClient.Stress.Tests.csproj index 3ab9e5d7f1f5..67167d92e7e4 100644 --- a/src/System.Data.SqlClient/tests/StressTests/System.Data.SqlClient.Stress.Tests/System.Data.SqlClient.Stress.Tests.csproj +++ b/src/System.Data.SqlClient/tests/StressTests/System.Data.SqlClient.Stress.Tests/System.Data.SqlClient.Stress.Tests.csproj @@ -4,8 +4,8 @@ Stress.Data.SqlClient System.Data.SqlClient.Stress.Tests - false - netstandard-Unix-Debug;netstandard-Unix-Release;netstandard-Windows_NT-Debug;netstandard-Windows_NT-Release + false + netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release;netfx-Windows_NT-Debug;netfx-Windows_NT-Release diff --git a/src/System.Diagnostics.Contracts/tests/Configurations.props b/src/System.Diagnostics.Contracts/tests/Configurations.props index ff0d415e4593..acf56fa2750e 100644 --- a/src/System.Diagnostics.Contracts/tests/Configurations.props +++ b/src/System.Diagnostics.Contracts/tests/Configurations.props @@ -1,7 +1,8 @@  - netstandard; + netcoreapp; + uap; \ No newline at end of file diff --git a/src/System.Diagnostics.Contracts/tests/System.Diagnostics.Contracts.Tests.csproj b/src/System.Diagnostics.Contracts/tests/System.Diagnostics.Contracts.Tests.csproj index cf29adc8bae1..691d4f4d422b 100644 --- a/src/System.Diagnostics.Contracts/tests/System.Diagnostics.Contracts.Tests.csproj +++ b/src/System.Diagnostics.Contracts/tests/System.Diagnostics.Contracts.Tests.csproj @@ -1,7 +1,7 @@ {0C4E7FF1-54C6-49B7-9700-18F5F3EB8E65} - netstandard-Debug;netstandard-Release + netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release true diff --git a/src/System.Diagnostics.Contracts/tests/Utilities.cs b/src/System.Diagnostics.Contracts/tests/Utilities.cs index bb4371a5a15b..ef97c9208af9 100644 --- a/src/System.Diagnostics.Contracts/tests/Utilities.cs +++ b/src/System.Diagnostics.Contracts/tests/Utilities.cs @@ -14,10 +14,7 @@ internal static class Utilities internal static void AssertThrowsContractException(Action action) { Exception exc = Assert.ThrowsAny(action); - if (!PlatformDetection.IsNetNative) // Cannot do internal framework Reflection on .NET Native - { - Assert.Equal("ContractException", exc.GetType().Name); - } + Assert.Equal("ContractException", exc.GetType().Name); } internal static IDisposable WithContractFailed(EventHandler handler) diff --git a/src/System.Diagnostics.Debug/tests/Configurations.props b/src/System.Diagnostics.Debug/tests/Configurations.props index 2bc19ff4170e..acf56fa2750e 100644 --- a/src/System.Diagnostics.Debug/tests/Configurations.props +++ b/src/System.Diagnostics.Debug/tests/Configurations.props @@ -1,8 +1,8 @@  - netstandard; netcoreapp; + uap; \ No newline at end of file diff --git a/src/System.Diagnostics.Debug/tests/System.Diagnostics.Debug.Tests.csproj b/src/System.Diagnostics.Debug/tests/System.Diagnostics.Debug.Tests.csproj index ef4c5196dc6e..303ecc46a1b7 100644 --- a/src/System.Diagnostics.Debug/tests/System.Diagnostics.Debug.Tests.csproj +++ b/src/System.Diagnostics.Debug/tests/System.Diagnostics.Debug.Tests.csproj @@ -5,7 +5,7 @@ System.Diagnostics.Tests true None - netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release + netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release true @@ -29,7 +29,4 @@ - - - \ No newline at end of file diff --git a/src/System.Diagnostics.DiagnosticSource/tests/Configurations.props b/src/System.Diagnostics.DiagnosticSource/tests/Configurations.props index 7795d73e2860..fad8568f3e27 100644 --- a/src/System.Diagnostics.DiagnosticSource/tests/Configurations.props +++ b/src/System.Diagnostics.DiagnosticSource/tests/Configurations.props @@ -1,8 +1,9 @@  - netstandard; - netfx-Windows_NT; + netcoreapp; + netfx-Windows_NT; + uap; diff --git a/src/System.Diagnostics.DiagnosticSource/tests/DiagnosticSourceEventSourceBridgeTests.cs b/src/System.Diagnostics.DiagnosticSource/tests/DiagnosticSourceEventSourceBridgeTests.cs index f9d1eb141d88..6b3a5c2c83a0 100644 --- a/src/System.Diagnostics.DiagnosticSource/tests/DiagnosticSourceEventSourceBridgeTests.cs +++ b/src/System.Diagnostics.DiagnosticSource/tests/DiagnosticSourceEventSourceBridgeTests.cs @@ -120,7 +120,6 @@ public void TestSpecificEvents() /// Test that things work properly for Linux newline conventions. /// [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "This is linux specific test")] public void LinuxNewLineConventions() { RemoteExecutor.Invoke(() => @@ -858,7 +857,7 @@ public DiagnosticSourceEventListener() { } /// /// Will be called when a DiagnosticSource event is fired. /// - public event Action EventWritten; + public new event Action EventWritten; /// /// It is possible that there are other events besides those that are being forwarded from diff --git a/src/System.Diagnostics.DiagnosticSource/tests/System.Diagnostics.DiagnosticSource.Tests.csproj b/src/System.Diagnostics.DiagnosticSource/tests/System.Diagnostics.DiagnosticSource.Tests.csproj index 48ed19db3d22..37c4222d043d 100644 --- a/src/System.Diagnostics.DiagnosticSource/tests/System.Diagnostics.DiagnosticSource.Tests.csproj +++ b/src/System.Diagnostics.DiagnosticSource/tests/System.Diagnostics.DiagnosticSource.Tests.csproj @@ -2,15 +2,13 @@ {A7922FA3-306A-41B9-B8DC-CC4DBE685A85} true - netfx-Windows_NT-Debug;netfx-Windows_NT-Release;netstandard-Debug;netstandard-Release + netfx-Windows_NT-Debug;netfx-Windows_NT-Release;netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release - - diff --git a/src/System.Diagnostics.FileVersionInfo/tests/System.Diagnostics.FileVersionInfo.Tests/Configurations.props b/src/System.Diagnostics.FileVersionInfo/tests/System.Diagnostics.FileVersionInfo.Tests/Configurations.props index b37136c85ac8..0cb5162ef2c6 100644 --- a/src/System.Diagnostics.FileVersionInfo/tests/System.Diagnostics.FileVersionInfo.Tests/Configurations.props +++ b/src/System.Diagnostics.FileVersionInfo/tests/System.Diagnostics.FileVersionInfo.Tests/Configurations.props @@ -1,8 +1,9 @@ - netstandard-Windows_NT; - netstandard-Unix; + uap-Windows_NT; + netcoreapp-Windows_NT; + netcoreapp-Unix; diff --git a/src/System.Diagnostics.FileVersionInfo/tests/System.Diagnostics.FileVersionInfo.Tests/System.Diagnostics.FileVersionInfo.Tests.csproj b/src/System.Diagnostics.FileVersionInfo/tests/System.Diagnostics.FileVersionInfo.Tests/System.Diagnostics.FileVersionInfo.Tests.csproj index fc788ad79c46..16ed05f1f128 100644 --- a/src/System.Diagnostics.FileVersionInfo/tests/System.Diagnostics.FileVersionInfo.Tests/System.Diagnostics.FileVersionInfo.Tests.csproj +++ b/src/System.Diagnostics.FileVersionInfo/tests/System.Diagnostics.FileVersionInfo.Tests/System.Diagnostics.FileVersionInfo.Tests.csproj @@ -2,7 +2,7 @@ System.Diagnostics.FileVersionInfo.Tests {6DFDB760-CC88-48AE-BD81-C64844EA3CBC} - netstandard-Unix-Debug;netstandard-Unix-Release;netstandard-Windows_NT-Debug;netstandard-Windows_NT-Release + netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release true diff --git a/src/System.Diagnostics.Process/tests/Configurations.props b/src/System.Diagnostics.Process/tests/Configurations.props index 72b33f4b9404..095c4309fecc 100644 --- a/src/System.Diagnostics.Process/tests/Configurations.props +++ b/src/System.Diagnostics.Process/tests/Configurations.props @@ -1,10 +1,7 @@  - netstandard-Windows_NT; - netstandard-Unix; uap-Windows_NT; - uapaot-Windows_NT; netcoreapp-Windows_NT; netcoreapp-Unix; diff --git a/src/System.Diagnostics.Process/tests/ProcessModuleTests.cs b/src/System.Diagnostics.Process/tests/ProcessModuleTests.cs index b11d5b0eaf17..8e1dbe95a1f3 100644 --- a/src/System.Diagnostics.Process/tests/ProcessModuleTests.cs +++ b/src/System.Diagnostics.Process/tests/ProcessModuleTests.cs @@ -30,7 +30,7 @@ public void TestModuleProperties() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapNotUapAot, "Process.Modules is not supported on uap")] + [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Process.Modules is not supported on uap")] public void Modules_Get_ContainsHostFileName() { ProcessModuleCollection modules = Process.GetCurrentProcess().Modules; diff --git a/src/System.Diagnostics.Process/tests/ProcessStandardConsoleTests.cs b/src/System.Diagnostics.Process/tests/ProcessStandardConsoleTests.cs index e82245e90cf3..9950a2c14232 100644 --- a/src/System.Diagnostics.Process/tests/ProcessStandardConsoleTests.cs +++ b/src/System.Diagnostics.Process/tests/ProcessStandardConsoleTests.cs @@ -14,7 +14,7 @@ public class ProcessStandardConsoleTests : ProcessTestBase private const int s_ConsoleEncoding = 437; [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapNotUapAot, "Get/SetConsoleOutputCP not supported yet https://github.com/dotnet/corefx/issues/21483")] + [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Get/SetConsoleOutputCP not supported yet https://github.com/dotnet/corefx/issues/21483")] public void TestChangesInConsoleEncoding() { Action run = expectedCodePage => diff --git a/src/System.Diagnostics.Process/tests/ProcessStartInfoTests.cs b/src/System.Diagnostics.Process/tests/ProcessStartInfoTests.cs index 13ff80ed680a..b85f778045ec 100644 --- a/src/System.Diagnostics.Process/tests/ProcessStartInfoTests.cs +++ b/src/System.Diagnostics.Process/tests/ProcessStartInfoTests.cs @@ -198,7 +198,7 @@ public void TestEnvironmentProperty() } [Fact] - [ActiveIssue(29865, TargetFrameworkMonikers.UapNotUapAot)] + [ActiveIssue(29865, TargetFrameworkMonikers.Uap)] public void TestSetEnvironmentOnChildProcess() { const string name = "b5a715d3-d74f-465d-abb7-2abe844750c9"; @@ -219,7 +219,7 @@ public void TestSetEnvironmentOnChildProcess() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapNotUapAot, "Retrieving information about local processes is not supported on uap")] + [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Retrieving information about local processes is not supported on uap")] public void TestEnvironmentOfChildProcess() { const string ItemSeparator = "CAFF9451396B4EEF8A5155A15BDC2080"; // random string that shouldn't be in any env vars; used instead of newline to separate env var strings @@ -283,23 +283,8 @@ public void UseShellExecute_GetSetWindows_Success_Uap() Assert.False(psi.UseShellExecute, "UseShellExecute=true is not supported on onecore."); } - [PlatformSpecific(TestPlatforms.Windows)] - [Fact] - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework, "Desktop UseShellExecute is set to true by default")] - public void UseShellExecute_GetSetWindows_Success_Netfx() - { - ProcessStartInfo psi = new ProcessStartInfo(); - Assert.True(psi.UseShellExecute); - - psi.UseShellExecute = false; - Assert.False(psi.UseShellExecute); - - psi.UseShellExecute = true; - Assert.True(psi.UseShellExecute); - } - [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.Uap | TargetFrameworkMonikers.NetFramework)] + [SkipOnTargetFramework(TargetFrameworkMonikers.Uap)] public void TestUseShellExecuteProperty_SetAndGet_NotUapOrNetFX() { ProcessStartInfo psi = new ProcessStartInfo(); @@ -526,13 +511,6 @@ public void Verbs_GetWithExeExtension_ReturnsExpected() { var psi = new ProcessStartInfo { FileName = $"{Process.GetCurrentProcess().ProcessName}.exe" }; - if (PlatformDetection.IsNetNative) - { - // UapAot doesn't have RegistryKey apis available so ProcessStartInfo.Verbs returns Array.Empty(). - Assert.Equal(0, psi.Verbs.Length); - return; - } - Assert.Contains("open", psi.Verbs, StringComparer.OrdinalIgnoreCase); Assert.Contains("runas", psi.Verbs, StringComparer.OrdinalIgnoreCase); Assert.Contains("runasuser", psi.Verbs, StringComparer.OrdinalIgnoreCase); @@ -603,7 +581,6 @@ public void Verbs_GetWithEmptyStringValue_ReturnsEmpty() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "The full .NET Framework throws an InvalidCastException for non-string keys. See https://github.com/dotnet/corefx/issues/18187.")] [PlatformSpecific(TestPlatforms.Windows)] public void Verbs_GetWithNonStringValue_ReturnsEmpty() { @@ -1006,9 +983,8 @@ public void StartInfo_NotepadWithContent(bool useShellExecute) nameof(PlatformDetection.IsNotWindows8x))] // https://github.com/dotnet/corefx/issues/20388 [OuterLoop("Launches notepad")] [PlatformSpecific(TestPlatforms.Windows)] - [ActiveIssue("https://github.com/dotnet/corefx/issues/20388", TargetFrameworkMonikers.NetFramework)] // We don't have the ability yet for UseShellExecute in UAP - [ActiveIssue("https://github.com/dotnet/corefx/issues/20204", TargetFrameworkMonikers.Uap | TargetFrameworkMonikers.UapAot)] + [ActiveIssue("https://github.com/dotnet/corefx/issues/20204", TargetFrameworkMonikers.Uap)] public void StartInfo_TextFile_ShellExecute() { if (Thread.CurrentThread.CurrentCulture.ToString() != "en-US") diff --git a/src/System.Diagnostics.Process/tests/ProcessStreamReadTests.cs b/src/System.Diagnostics.Process/tests/ProcessStreamReadTests.cs index 933616ebab64..47e8049d700e 100644 --- a/src/System.Diagnostics.Process/tests/ProcessStreamReadTests.cs +++ b/src/System.Diagnostics.Process/tests/ProcessStreamReadTests.cs @@ -383,7 +383,6 @@ public void TestEOFReceivedWhenStdInClosed() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "There is 2 bugs in Desktop in this codepath, see: dotnet/corefx #18437 and #18436")] [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "No simple way to perform this on uap using cmd.exe")] public void TestAsyncHalfCharacterAtATime() { @@ -462,8 +461,6 @@ public void TestClosingStreamsAsyncDoesNotThrow() // On netfx, the handler is called once with the Data as null, even if the process writes nothing to the pipe. // That behavior is documented here https://docs.microsoft.com/en-us/dotnet/api/system.diagnostics.datareceivedeventhandler - p.OutputDataReceived += (s, e) => { Assert.True(PlatformDetection.IsFullFramework && e.Data == null, "OutputDataReceived called after closing the process"); }; - p.ErrorDataReceived += (s, e) => { Assert.True(PlatformDetection.IsFullFramework && e.Data == null, "ErrorDataReceived called after closing the process"); }; p.Start(); p.BeginOutputReadLine(); diff --git a/src/System.Diagnostics.Process/tests/ProcessTests.cs b/src/System.Diagnostics.Process/tests/ProcessTests.cs index f68bdf9dad79..525c5b295571 100644 --- a/src/System.Diagnostics.Process/tests/ProcessTests.cs +++ b/src/System.Diagnostics.Process/tests/ProcessTests.cs @@ -1221,7 +1221,7 @@ public void GetProcessesByName_EmptyMachineName_ThrowsArgumentException() [Fact] [PlatformSpecific(TestPlatforms.Windows)] // Behavior differs on Windows and Unix - [SkipOnTargetFramework(TargetFrameworkMonikers.UapNotUapAot, "Retrieving information about local processes is not supported on uap")] + [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Retrieving information about local processes is not supported on uap")] public void TestProcessOnRemoteMachineWindows() { Process currentProccess = Process.GetCurrentProcess(); @@ -1255,9 +1255,7 @@ public void StartInfo_GetFileName_ReturnsExpected() Process process = CreateProcessLong(); process.Start(); - // Processes are not hosted by dotnet in the full .NET Framework. - string expectedFileName = (PlatformDetection.IsFullFramework || PlatformDetection.IsNetNative) ? RemoteExecutor.HostRunner : RemoteExecutor.HostRunner; - Assert.Equal(expectedFileName, process.StartInfo.FileName); + Assert.Equal(RemoteExecutor.HostRunner, process.StartInfo.FileName); process.Kill(); Assert.True(process.WaitForExit(WaitInMS)); @@ -1273,16 +1271,7 @@ public void StartInfo_SetOnRunningProcess_ThrowsInvalidOperationException() // .NET Core fixes a bug where Process.StartInfo for a unrelated process would // return information about the current process, not the unrelated process. // See https://github.com/dotnet/corefx/issues/1100. - if (PlatformDetection.IsFullFramework) - { - var startInfo = new ProcessStartInfo(); - process.StartInfo = startInfo; - Assert.Equal(startInfo, process.StartInfo); - } - else - { - Assert.Throws(() => process.StartInfo = new ProcessStartInfo()); - } + Assert.Throws(() => process.StartInfo = new ProcessStartInfo()); process.Kill(); Assert.True(process.WaitForExit(WaitInMS)); @@ -1310,14 +1299,7 @@ public void StartInfo_GetOnRunningProcess_ThrowsInvalidOperationException() // .NET Core fixes a bug where Process.StartInfo for an unrelated process would // return information about the current process, not the unrelated process. // See https://github.com/dotnet/corefx/issues/1100. - if (PlatformDetection.IsFullFramework) - { - Assert.NotNull(process.StartInfo); - } - else - { - Assert.Throws(() => process.StartInfo); - } + Assert.Throws(() => process.StartInfo); } [Theory] @@ -1498,7 +1480,6 @@ public void TestHandleCount_OSX() [OuterLoop] [Fact] [PlatformSpecific(TestPlatforms.Linux | TestPlatforms.Windows)] // Expected process HandleCounts differs on OSX - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Handle count change is not reliable, but seems less robust on NETFX")] [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Retrieving information about local processes is not supported on uap")] public void HandleCountChanges() { diff --git a/src/System.Diagnostics.Process/tests/ProcessWaitingTests.cs b/src/System.Diagnostics.Process/tests/ProcessWaitingTests.cs index 89c9843e0371..fe3f25b9a634 100644 --- a/src/System.Diagnostics.Process/tests/ProcessWaitingTests.cs +++ b/src/System.Diagnostics.Process/tests/ProcessWaitingTests.cs @@ -150,7 +150,7 @@ public void SingleProcess_CopiesShareExitInformation() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapNotUapAot, "Getting handle of child process running on UAP is not possible")] + [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Getting handle of child process running on UAP is not possible")] public void WaitForPeerProcess() { Process child1 = CreateProcessLong(); @@ -222,7 +222,7 @@ public void WaitForSignal() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapNotUapAot, "Not applicable on uap - RemoteInvoke does not give back process handle")] + [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Not applicable on uap - RemoteInvoke does not give back process handle")] [ActiveIssue(15844, TestPlatforms.AnyUnix)] public void WaitChain() { diff --git a/src/System.Diagnostics.Process/tests/System.Diagnostics.Process.Tests.csproj b/src/System.Diagnostics.Process/tests/System.Diagnostics.Process.Tests.csproj index 3b44ab5c5f52..029a6f13aeb8 100644 --- a/src/System.Diagnostics.Process/tests/System.Diagnostics.Process.Tests.csproj +++ b/src/System.Diagnostics.Process/tests/System.Diagnostics.Process.Tests.csproj @@ -4,7 +4,7 @@ true $(DefineConstants);TargetsWindows true - netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netstandard-Unix-Debug;netstandard-Unix-Release;netstandard-Windows_NT-Debug;netstandard-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release;uapaot-Windows_NT-Debug;uapaot-Windows_NT-Release + netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release diff --git a/src/System.Diagnostics.StackTrace/tests/Configurations.props b/src/System.Diagnostics.StackTrace/tests/Configurations.props index 2870dced4592..2b2323d47917 100644 --- a/src/System.Diagnostics.StackTrace/tests/Configurations.props +++ b/src/System.Diagnostics.StackTrace/tests/Configurations.props @@ -1,7 +1,8 @@  - netstandard; + netcoreapp; + uap; diff --git a/src/System.Diagnostics.StackTrace/tests/StackFrameExtensionsTests.cs b/src/System.Diagnostics.StackTrace/tests/StackFrameExtensionsTests.cs index 8b712141d095..2c51703f5971 100644 --- a/src/System.Diagnostics.StackTrace/tests/StackFrameExtensionsTests.cs +++ b/src/System.Diagnostics.StackTrace/tests/StackFrameExtensionsTests.cs @@ -7,7 +7,6 @@ namespace System.Diagnostics.Tests { - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "StackFrame is not supported in uapaot.")] public class StackFrameExtensionsTests { public static IEnumerable StackFrame_TestData() diff --git a/src/System.Diagnostics.StackTrace/tests/StackFrameTests.cs b/src/System.Diagnostics.StackTrace/tests/StackFrameTests.cs index 68d02d2e6f0b..2fb5fe982632 100644 --- a/src/System.Diagnostics.StackTrace/tests/StackFrameTests.cs +++ b/src/System.Diagnostics.StackTrace/tests/StackFrameTests.cs @@ -9,7 +9,6 @@ namespace System.Diagnostics.Tests { - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "StackFrame is not supported in uapaot.")] public class StackFrameTests { [Fact] @@ -25,7 +24,6 @@ public void Ctor_Default() VerifyStackFrame(stackFrame, false, 0, typeof(StackFrameTests).GetMethod(nameof(Ctor_Default)), isCurrentFrame: true); } - [ActiveIssue(23796, TargetFrameworkMonikers.NetFramework)] [Theory] [InlineData(true)] [InlineData(false)] @@ -45,7 +43,6 @@ public void Ctor_SkipFrames(int skipFrames) VerifyStackFrame(stackFrame, true, skipFrames, typeof(StackFrameTests).GetMethod(nameof(Ctor_SkipFrames)), isCurrentFrame: skipFrames == 0); } - [ActiveIssue(23796, TargetFrameworkMonikers.NetFramework)] [Theory] [InlineData(StackFrame.OFFSET_UNKNOWN, true)] [InlineData(0, true)] @@ -83,7 +80,6 @@ public void SkipFrames_ManyFrames_HasNoMethod(int skipFrames) [InlineData(null, StackFrame.OFFSET_UNKNOWN)] [InlineData("", 0)] [InlineData("FileName", 1)] - [ActiveIssue(28853, TargetFrameworkMonikers.NetFramework)] public void Ctor_Filename_LineNumber(string fileName, int lineNumber) { var stackFrame = new StackFrame(fileName, lineNumber); @@ -98,7 +94,6 @@ public void Ctor_Filename_LineNumber(string fileName, int lineNumber) [InlineData(null, StackFrame.OFFSET_UNKNOWN, 0)] [InlineData("", 0, StackFrame.OFFSET_UNKNOWN)] [InlineData("FileName", 1, 2)] - [ActiveIssue(28853, TargetFrameworkMonikers.NetFramework)] public void Ctor_Filename_LineNumber_ColNumber(string fileName, int lineNumber, int columnNumber) { var stackFrame = new StackFrame(fileName, lineNumber, columnNumber); diff --git a/src/System.Diagnostics.StackTrace/tests/StackTraceTests.cs b/src/System.Diagnostics.StackTrace/tests/StackTraceTests.cs index 2057cf1a175a..af0f63fe8d8f 100644 --- a/src/System.Diagnostics.StackTrace/tests/StackTraceTests.cs +++ b/src/System.Diagnostics.StackTrace/tests/StackTraceTests.cs @@ -29,7 +29,6 @@ public static StackTrace MethodWithException() namespace System.Diagnostics.Tests { - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "StackTrace is not supported in uapaot.")] public class StackTraceTests { [Fact] @@ -142,7 +141,6 @@ public void Ctor_EmptyException_FNeedFileInfo(bool fNeedFileInfo) Assert.Null(stackTrace.GetFrame(0)); } - [ActiveIssue(23796, TargetFrameworkMonikers.NetFramework)] [Theory] [InlineData(0)] [InlineData(1)] @@ -157,18 +155,7 @@ public void Ctor_Exception_SkipFrames(int skipFrames) // Netfx has null Frames if skipping frames in Release mode. StackFrame[] frames = stackTrace.GetFrames(); -#if DEBUG Assert.Equal(expectedMethods, frames.Select(f => f.GetMethod())); -#else - if (PlatformDetection.IsFullFramework && skipFrames > 0) - { - Assert.Null(frames); - } - else - { - Assert.Equal(expectedMethods, frames.Select(f => f.GetMethod())); - } -#endif if (frames != null) { VerifyFrames(stackTrace, false); @@ -192,7 +179,6 @@ public void Ctor_EmptyException_SkipFrames() Assert.Null(stackTrace.GetFrame(0)); } - [ActiveIssue(23796, TargetFrameworkMonikers.NetFramework)] [Theory] [InlineData(0, true)] [InlineData(1, true)] @@ -208,18 +194,7 @@ public void Ctor_Exception_SkipFrames_FNeedFileInfo(int skipFrames, bool fNeedFi // Netfx has null Frames if skipping frames in Release mode. StackFrame[] frames = stackTrace.GetFrames(); -#if DEBUG Assert.Equal(expectedMethods, frames.Select(f => f.GetMethod())); -#else - if (PlatformDetection.IsFullFramework && skipFrames > 0) - { - Assert.Null(frames); - } - else - { - Assert.Equal(expectedMethods, frames.Select(f => f.GetMethod())); - } -#endif if (frames != null) { VerifyFrames(stackTrace, fNeedFileInfo); @@ -318,7 +293,6 @@ public void ToString_Invoke_ReturnsExpected(StackTrace stackTrace, string expect } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public void ToString_NullFrame_ThrowsNullReferenceException() { var stackTrace = new StackTrace((StackFrame)null); diff --git a/src/System.Diagnostics.StackTrace/tests/System.Diagnostics.StackTrace.Tests.csproj b/src/System.Diagnostics.StackTrace/tests/System.Diagnostics.StackTrace.Tests.csproj index 9482aa8114f3..b94e87daece4 100644 --- a/src/System.Diagnostics.StackTrace/tests/System.Diagnostics.StackTrace.Tests.csproj +++ b/src/System.Diagnostics.StackTrace/tests/System.Diagnostics.StackTrace.Tests.csproj @@ -1,7 +1,7 @@ {297A9116-1005-499D-A895-2063D03E4C94} - netstandard-Debug;netstandard-Release + netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release true diff --git a/src/System.Diagnostics.TextWriterTraceListener/tests/Configurations.props b/src/System.Diagnostics.TextWriterTraceListener/tests/Configurations.props index caa171561192..acf56fa2750e 100644 --- a/src/System.Diagnostics.TextWriterTraceListener/tests/Configurations.props +++ b/src/System.Diagnostics.TextWriterTraceListener/tests/Configurations.props @@ -1,9 +1,8 @@  - netstandard; netcoreapp; - netfx; + uap; \ No newline at end of file diff --git a/src/System.Diagnostics.TextWriterTraceListener/tests/System.Diagnostics.TextWriterTraceListener.Tests.csproj b/src/System.Diagnostics.TextWriterTraceListener/tests/System.Diagnostics.TextWriterTraceListener.Tests.csproj index 05f802c6645c..bd464e595fab 100644 --- a/src/System.Diagnostics.TextWriterTraceListener/tests/System.Diagnostics.TextWriterTraceListener.Tests.csproj +++ b/src/System.Diagnostics.TextWriterTraceListener/tests/System.Diagnostics.TextWriterTraceListener.Tests.csproj @@ -2,7 +2,7 @@ {92A9467A-9F7E-4294-A7D5-7B59F2E54ABE} true - netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release;netstandard-Debug;netstandard-Release + netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release @@ -12,7 +12,7 @@ - + diff --git a/src/System.Diagnostics.TextWriterTraceListener/tests/XmlWriterTraceListenerTests.cs b/src/System.Diagnostics.TextWriterTraceListener/tests/XmlWriterTraceListenerTests.cs index b88356802a09..c17cf75dd100 100644 --- a/src/System.Diagnostics.TextWriterTraceListener/tests/XmlWriterTraceListenerTests.cs +++ b/src/System.Diagnostics.TextWriterTraceListener/tests/XmlWriterTraceListenerTests.cs @@ -52,7 +52,6 @@ public void ConstructorThrows_ArgumentNullException() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "In full framework despite closing it, it still writes the traces, we're fixing that behavior in .NET Core")] public void Close_NoWriteSuccess() { string file = GetTestFilePath(); @@ -66,7 +65,6 @@ public void Close_NoWriteSuccess() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "In full framework despite closing it, it still writes the traces, we're fixing that behavior in .NET Core")] public void Close_WriteBeforeAndAfter() { string file = GetTestFilePath(); @@ -145,15 +143,12 @@ public void ListenerWithFilter() Assert.DoesNotContain("here", text); Assert.Contains("existent.netcode", text); - if (!PlatformDetection.IsFullFramework) - { - // Desktop has a boolean to turn on filtering in TraceTransfer due to a bug. - // https://referencesource.microsoft.com/#System/compmod/system/diagnostics/XmlWriterTraceListener.cs,26 - Assert.DoesNotContain('"' + traceTransferId.ToString(CultureInfo.InvariantCulture) + '"', text); - Assert.DoesNotContain("this is a transfer", text); - Assert.DoesNotContain("Transfer", text); - Assert.DoesNotContain(guid.ToString("B"), text); - } + // Desktop has a boolean to turn on filtering in TraceTransfer due to a bug. + // https://referencesource.microsoft.com/#System/compmod/system/diagnostics/XmlWriterTraceListener.cs,26 + Assert.DoesNotContain('"' + traceTransferId.ToString(CultureInfo.InvariantCulture) + '"', text); + Assert.DoesNotContain("this is a transfer", text); + Assert.DoesNotContain("Transfer", text); + Assert.DoesNotContain(guid.ToString("B"), text); } [Theory] diff --git a/src/System.Diagnostics.Tools/tests/Configurations.props b/src/System.Diagnostics.Tools/tests/Configurations.props index ff0d415e4593..acf56fa2750e 100644 --- a/src/System.Diagnostics.Tools/tests/Configurations.props +++ b/src/System.Diagnostics.Tools/tests/Configurations.props @@ -1,7 +1,8 @@  - netstandard; + netcoreapp; + uap; \ No newline at end of file diff --git a/src/System.Diagnostics.Tools/tests/System.Diagnostics.Tools.Tests.csproj b/src/System.Diagnostics.Tools/tests/System.Diagnostics.Tools.Tests.csproj index 612935a2f167..079dc7595208 100644 --- a/src/System.Diagnostics.Tools/tests/System.Diagnostics.Tools.Tests.csproj +++ b/src/System.Diagnostics.Tools/tests/System.Diagnostics.Tools.Tests.csproj @@ -3,7 +3,7 @@ {41BF89E4-8C67-45A6-8044-13009E363220} System System.Diagnostics.Tools.Tests - netstandard-Debug;netstandard-Release + netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release true diff --git a/src/System.Diagnostics.TraceSource/tests/Configurations.props b/src/System.Diagnostics.TraceSource/tests/Configurations.props index 9665ecd73ad1..af6c54471386 100644 --- a/src/System.Diagnostics.TraceSource/tests/Configurations.props +++ b/src/System.Diagnostics.TraceSource/tests/Configurations.props @@ -3,8 +3,7 @@ netcoreapp-Windows_NT; netcoreapp-Unix; - netstandard-Unix; - netstandard-Windows_NT; + uap-Windows_NT; diff --git a/src/System.Diagnostics.TraceSource/tests/System.Diagnostics.TraceSource.Tests.csproj b/src/System.Diagnostics.TraceSource/tests/System.Diagnostics.TraceSource.Tests.csproj index 799ca215e265..8199e926edff 100644 --- a/src/System.Diagnostics.TraceSource/tests/System.Diagnostics.TraceSource.Tests.csproj +++ b/src/System.Diagnostics.TraceSource/tests/System.Diagnostics.TraceSource.Tests.csproj @@ -2,7 +2,7 @@ {7B32D24D-969A-4F7F-8461-B43E15E5D553} true - netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netstandard-Unix-Debug;netstandard-Unix-Release;netstandard-Windows_NT-Debug;netstandard-Windows_NT-Release + netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release diff --git a/src/System.Diagnostics.TraceSource/tests/TraceClassTests.cs b/src/System.Diagnostics.TraceSource/tests/TraceClassTests.cs index 636b4e4213ca..9f35efbdb7fc 100644 --- a/src/System.Diagnostics.TraceSource/tests/TraceClassTests.cs +++ b/src/System.Diagnostics.TraceSource/tests/TraceClassTests.cs @@ -12,8 +12,7 @@ namespace System.Diagnostics.TraceSourceTests public class TraceClassTests : IDisposable { - private readonly string TestRunnerAssemblyName = PlatformDetection.IsFullFramework ? - Path.GetFileName(Environment.GetCommandLineArgs()[0]) : Assembly.GetEntryAssembly().GetName().Name; + private readonly string TestRunnerAssemblyName = Assembly.GetEntryAssembly().GetName().Name; void IDisposable.Dispose() { diff --git a/src/System.Diagnostics.TraceSource/tests/TraceEventCacheClassTests.cs b/src/System.Diagnostics.TraceSource/tests/TraceEventCacheClassTests.cs index 832ba7208c92..5d7c12af1b6a 100644 --- a/src/System.Diagnostics.TraceSource/tests/TraceEventCacheClassTests.cs +++ b/src/System.Diagnostics.TraceSource/tests/TraceEventCacheClassTests.cs @@ -56,7 +56,6 @@ public void CallstackTest_NotEmpty() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Stack Traces are not so rich on AoT.")] public void CallstackTest_ContainsExpectedFrames() { var cache = new TraceEventCache(); diff --git a/src/System.Diagnostics.Tracing/tests/BasicEventSourceTest/TestEventCounter.cs b/src/System.Diagnostics.Tracing/tests/BasicEventSourceTest/TestEventCounter.cs index e52209bb34f8..4562dea03a6d 100644 --- a/src/System.Diagnostics.Tracing/tests/BasicEventSourceTest/TestEventCounter.cs +++ b/src/System.Diagnostics.Tracing/tests/BasicEventSourceTest/TestEventCounter.cs @@ -42,7 +42,6 @@ public void Error() #if !USE_MDT_EVENTSOURCE [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, reason: "https://github.com/dotnet/corefx/issues/23661")] #endif - [ActiveIssue("https://github.com/dotnet/corefx/issues/22791", TargetFrameworkMonikers.UapAot)] [ActiveIssue("https://github.com/dotnet/corefx/issues/25029")] public void Test_Write_Metric_EventListener() { diff --git a/src/System.Diagnostics.Tracing/tests/BasicEventSourceTest/TestsEventSourceLifetime.cs b/src/System.Diagnostics.Tracing/tests/BasicEventSourceTest/TestsEventSourceLifetime.cs index d65ca2513845..09c24aa9aa7a 100644 --- a/src/System.Diagnostics.Tracing/tests/BasicEventSourceTest/TestsEventSourceLifetime.cs +++ b/src/System.Diagnostics.Tracing/tests/BasicEventSourceTest/TestsEventSourceLifetime.cs @@ -25,7 +25,6 @@ public class TestsEventSourceLifetime /// [Fact] [PlatformSpecific(TestPlatforms.Windows)] // non-Windows EventSources don't have lifetime - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Test requires private reflection.")] public void Test_EventSource_Lifetime() { TestUtilities.CheckNoEventSourcesRunning("Start"); diff --git a/src/System.Diagnostics.Tracing/tests/BasicEventSourceTest/TestsManifestNegative.cs b/src/System.Diagnostics.Tracing/tests/BasicEventSourceTest/TestsManifestNegative.cs index 103ccb41146d..8d65559c3426 100644 --- a/src/System.Diagnostics.Tracing/tests/BasicEventSourceTest/TestsManifestNegative.cs +++ b/src/System.Diagnostics.Tracing/tests/BasicEventSourceTest/TestsManifestNegative.cs @@ -24,11 +24,8 @@ public class TestsManifestNegative { private static void AsserExceptionStringsEqual(Func expectedStrFunc, Exception ex) { - if (!PlatformDetection.IsNetNative) - { - string expectedStr = expectedStrFunc(); - Assert.Equal(ex.Message, expectedStr); - } + string expectedStr = expectedStrFunc(); + Assert.Equal(ex.Message, expectedStr); } #region Message string building @@ -61,8 +58,8 @@ private static string GetResourceStringFromReflection(string key) /// These tests use the NuGet EventSource to validate *both* NuGet and BCL user-defined EventSources /// For NuGet EventSources we validate both "runtime" and "validation" behavior /// - [ActiveIssue("dotnet/corefx #19091", TargetFrameworkMonikers.NetFramework)] [Fact] + [ActiveIssue("dotnet/corefx #19091", TargetFrameworkMonikers.NetFramework)] public void Test_GenerateManifest_InvalidEventSources() { TestUtilities.CheckNoEventSourcesRunning("Start"); @@ -137,14 +134,11 @@ public void Test_GenerateManifest_InvalidEventSources() Assert.NotNull(EventSource.GenerateManifest(typeof(Sdt.MismatchIdEventSource), string.Empty)); // These tests require the IL to be present for inspection. - if (!PlatformDetection.IsNetNative) - { - e = AssertExtensions.Throws(null, () => EventSource.GenerateManifest(typeof(Sdt.MismatchIdEventSource), string.Empty, strictOptions)); - AsserExceptionStringsEqual(() => GetResourceString("EventSource_MismatchIdToWriteEvent", "WriteInteger", 10, 1), e); + e = AssertExtensions.Throws(null, () => EventSource.GenerateManifest(typeof(Sdt.MismatchIdEventSource), string.Empty, strictOptions)); + AsserExceptionStringsEqual(() => GetResourceString("EventSource_MismatchIdToWriteEvent", "WriteInteger", 10, 1), e); - e = AssertExtensions.Throws(null, () => EventSource.GenerateManifest(typeof(Sdt.MismatchIdEventSource), string.Empty, strictOptions)); - AsserExceptionStringsEqual(() => GetResourceString("EventSource_MismatchIdToWriteEvent", "WriteInteger", 10, 1), e); - } + e = AssertExtensions.Throws(null, () => EventSource.GenerateManifest(typeof(Sdt.MismatchIdEventSource), string.Empty, strictOptions)); + AsserExceptionStringsEqual(() => GetResourceString("EventSource_MismatchIdToWriteEvent", "WriteInteger", 10, 1), e); Assert.NotNull(EventSource.GenerateManifest(typeof(Sdt.EventIdReusedEventSource), string.Empty)); diff --git a/src/System.Diagnostics.Tracing/tests/BasicEventSourceTest/TestsUserErrors.Etw.cs b/src/System.Diagnostics.Tracing/tests/BasicEventSourceTest/TestsUserErrors.Etw.cs index 5ae8da27ad7f..d8484a3970ad 100644 --- a/src/System.Diagnostics.Tracing/tests/BasicEventSourceTest/TestsUserErrors.Etw.cs +++ b/src/System.Diagnostics.Tracing/tests/BasicEventSourceTest/TestsUserErrors.Etw.cs @@ -18,7 +18,6 @@ public partial class TestsUserErrors /// Test the /// [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindowsNanoServer))] // ActiveIssue: https://github.com/dotnet/corefx/issues/29754 - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Depends on inspecting IL at runtime.")] public void Test_BadEventSource_MismatchedIds_WithEtwListener() { // We expect only one session to be on when running the test but if a ETW session was left diff --git a/src/System.Diagnostics.Tracing/tests/BasicEventSourceTest/TestsUserErrors.cs b/src/System.Diagnostics.Tracing/tests/BasicEventSourceTest/TestsUserErrors.cs index 4db26ba8d479..51ef8f5c7dd6 100644 --- a/src/System.Diagnostics.Tracing/tests/BasicEventSourceTest/TestsUserErrors.cs +++ b/src/System.Diagnostics.Tracing/tests/BasicEventSourceTest/TestsUserErrors.cs @@ -50,13 +50,9 @@ private void Test_BadTypes_Manifest(EventSource source) Event _event = events[0]; Assert.Equal("EventSourceMessage", _event.EventName); - // Check the exception text if not ProjectN. - if (!PlatformDetection.IsNetNative) - { - string message = _event.PayloadString(0, "message"); - // expected message: "ERROR: Exception in Command Processing for EventSource BadEventSource_Bad_Type_ByteArray: Unsupported type Byte[] in event source. " - Assert.True(Regex.IsMatch(message, "Unsupported type")); - } + string message = _event.PayloadString(0, "message"); + // expected message: "ERROR: Exception in Command Processing for EventSource BadEventSource_Bad_Type_ByteArray: Unsupported type Byte[] in event source. " + Assert.True(Regex.IsMatch(message, "Unsupported type")); } } finally @@ -69,7 +65,6 @@ private void Test_BadTypes_Manifest(EventSource source) /// Test the /// [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindowsNanoServer))] // ActiveIssue: https://github.com/dotnet/corefx/issues/29754 - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Depends on inspecting IL at runtime.")] public void Test_BadEventSource_MismatchedIds() { TestUtilities.CheckNoEventSourcesRunning("Start"); diff --git a/src/System.DirectoryServices.Protocols/tests/SortRequestControlTests.cs b/src/System.DirectoryServices.Protocols/tests/SortRequestControlTests.cs index 52407eef5205..7136ffbd59cf 100644 --- a/src/System.DirectoryServices.Protocols/tests/SortRequestControlTests.cs +++ b/src/System.DirectoryServices.Protocols/tests/SortRequestControlTests.cs @@ -12,7 +12,6 @@ public class SortRequestControlTests [Theory] [InlineData(true)] [InlineData(false)] - [ActiveIssue("https://github.com/dotnet/corefx/issues/21217", TargetFrameworkMonikers.UapAot)] public void Ctor_SortKeys(bool critical) { SortKey[] sortKeys = new SortKey[] { new SortKey("name1", "rule1", true), new SortKey("name2", "rule2", false) }; diff --git a/src/System.DirectoryServices/tests/Configurations.props b/src/System.DirectoryServices/tests/Configurations.props index 9b3928d692a3..c03a496a43b8 100644 --- a/src/System.DirectoryServices/tests/Configurations.props +++ b/src/System.DirectoryServices/tests/Configurations.props @@ -1,8 +1,8 @@  - netcoreapp-Windows_NT; - netfx; + netcoreapp-Windows_NT; + netfx; diff --git a/src/System.DirectoryServices/tests/System/DirectoryServices/ActiveDirectory/ActiveDirectoryInterSiteTransportTests.cs b/src/System.DirectoryServices/tests/System/DirectoryServices/ActiveDirectory/ActiveDirectoryInterSiteTransportTests.cs index ab8b0a4ed332..f7544cd33a82 100644 --- a/src/System.DirectoryServices/tests/System/DirectoryServices/ActiveDirectory/ActiveDirectoryInterSiteTransportTests.cs +++ b/src/System.DirectoryServices/tests/System/DirectoryServices/ActiveDirectory/ActiveDirectoryInterSiteTransportTests.cs @@ -19,7 +19,6 @@ public void FindByTransportType_NullContext_ThrowsArgumentNullException() [Fact] [OuterLoop] [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Getting information about domain is denied inside App")] - [ActiveIssue("https://github.com/dotnet/corefx/issues/21553", TargetFrameworkMonikers.UapAot)] public void FindByTransportType_ForestNoDomainAssociatedWithoutName_ThrowsActiveDirectoryOperationException() { var context = new DirectoryContext(DirectoryContextType.Forest); @@ -74,7 +73,6 @@ public void FindByTransportType_InvalidContextTypeWithName(DirectoryContextType [Fact] [OuterLoop] [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Getting information about domain is denied inside App")] - [ActiveIssue("https://github.com/dotnet/corefx/issues/21553", TargetFrameworkMonikers.UapAot)] public void FindByTransportType_ConfigurationSetTypeWithName_Throws() { var context = new DirectoryContext(DirectoryContextType.ConfigurationSet, "Name"); diff --git a/src/System.DirectoryServices/tests/System/DirectoryServices/ActiveDirectory/DomainControllerTests.cs b/src/System.DirectoryServices/tests/System/DirectoryServices/ActiveDirectory/DomainControllerTests.cs index aafbcd8e38d0..007b7c230c0b 100644 --- a/src/System.DirectoryServices/tests/System/DirectoryServices/ActiveDirectory/DomainControllerTests.cs +++ b/src/System.DirectoryServices/tests/System/DirectoryServices/ActiveDirectory/DomainControllerTests.cs @@ -129,7 +129,6 @@ public void FindAll_NoSuchName_ReturnsEmpty() [Fact] [OuterLoop] [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Getting information about domain is denied inside App")] - [ActiveIssue("https://github.com/dotnet/corefx/issues/21553", TargetFrameworkMonikers.UapAot)] public void FindAll_NullName_ThrowsActiveDirectoryOperationException() { var context = new DirectoryContext(DirectoryContextType.Domain); diff --git a/src/System.DirectoryServices/tests/System/DirectoryServices/ActiveDirectory/ForestTests.cs b/src/System.DirectoryServices/tests/System/DirectoryServices/ActiveDirectory/ForestTests.cs index 5e74537e9397..adca9512a663 100644 --- a/src/System.DirectoryServices/tests/System/DirectoryServices/ActiveDirectory/ForestTests.cs +++ b/src/System.DirectoryServices/tests/System/DirectoryServices/ActiveDirectory/ForestTests.cs @@ -39,7 +39,6 @@ public void GetForest_NullNameAndNotRootedDomain_ThrowsActiveDirectoryOperationE [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindowsNanoServer))] [InlineData(DirectoryContextType.DirectoryServer, "\0")] [InlineData(DirectoryContextType.Forest, "server:port")] - [ActiveIssue("https://github.com/dotnet/corefx/issues/21553", TargetFrameworkMonikers.UapAot)] public void GetForest_NonNullNameAndNotRootedDomain_ThrowsActiveDirectoryObjectNotFoundException(DirectoryContextType type, string name) { var context = new DirectoryContext(type, name); diff --git a/src/System.DirectoryServices/tests/System/DirectoryServices/ActiveDirectorySecurityTests.cs b/src/System.DirectoryServices/tests/System/DirectoryServices/ActiveDirectorySecurityTests.cs index 3895c7aef21f..afe9c3ead6ce 100644 --- a/src/System.DirectoryServices/tests/System/DirectoryServices/ActiveDirectorySecurityTests.cs +++ b/src/System.DirectoryServices/tests/System/DirectoryServices/ActiveDirectorySecurityTests.cs @@ -6,7 +6,7 @@ namespace System.DirectoryServices.Tests { - [SkipOnTargetFramework(TargetFrameworkMonikers.Uap | TargetFrameworkMonikers.UapAot, "DirectoryObjectSecurity is not supported.")] + [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "DirectoryObjectSecurity is not supported.")] public class ActiveDirectorySecurityTests { [Fact] diff --git a/src/System.DirectoryServices/tests/System/DirectoryServices/DirectoryEntryTests.cs b/src/System.DirectoryServices/tests/System/DirectoryServices/DirectoryEntryTests.cs index 5cc732f70337..83ff10f4afd0 100644 --- a/src/System.DirectoryServices/tests/System/DirectoryServices/DirectoryEntryTests.cs +++ b/src/System.DirectoryServices/tests/System/DirectoryServices/DirectoryEntryTests.cs @@ -141,7 +141,6 @@ public void CopyTo_DisposedEntry_ThrowsObjectDisposedException() } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindowsNanoServer))] - [ActiveIssue(21346, TargetFrameworkMonikers.UapAot)] public void DeleteTree_NoObject_ThrowsCOMException() { var entry = new DirectoryEntry("path"); @@ -149,7 +148,6 @@ public void DeleteTree_NoObject_ThrowsCOMException() } [Fact] - [ActiveIssue(21346, TargetFrameworkMonikers.UapAot)] public void DeleteTree_DisposedObject_ObjectDisposedException() { var entry = new DirectoryEntry("path"); diff --git a/src/System.Drawing.Primitives/tests/ColorTests.cs b/src/System.Drawing.Primitives/tests/ColorTests.cs index 760b09decfd9..6be4470f0fb7 100644 --- a/src/System.Drawing.Primitives/tests/ColorTests.cs +++ b/src/System.Drawing.Primitives/tests/ColorTests.cs @@ -460,7 +460,6 @@ public static IEnumerable Equality_MemberData() yield return new object[] {Color.FromName("SomeName"), Color.FromName(someNameConstructed), true}; } - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] // desktop incorrectly does "name.Equals(name)" in Equals [Theory] [MemberData(nameof(Equality_MemberData))] public void Equality(Color left, Color right, bool expected) @@ -485,7 +484,6 @@ public void Equality(Color left, Color right, bool expected) } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Cannot do DebuggerAttribute testing on UapAot: requires internal Reflection on framework types.")] public void DebuggerAttributesAreValid() { DebuggerAttributes.ValidateDebuggerDisplayReferences(Color.Aquamarine); diff --git a/src/System.Drawing.Primitives/tests/Configurations.props b/src/System.Drawing.Primitives/tests/Configurations.props index e03f69fa7b7f..2b2323d47917 100644 --- a/src/System.Drawing.Primitives/tests/Configurations.props +++ b/src/System.Drawing.Primitives/tests/Configurations.props @@ -1,9 +1,8 @@  - netstandard; - uap; netcoreapp; + uap; diff --git a/src/System.Drawing.Primitives/tests/System.Drawing.Primitives.Tests.csproj b/src/System.Drawing.Primitives/tests/System.Drawing.Primitives.Tests.csproj index 6370fdd73afb..45a2f229f21c 100644 --- a/src/System.Drawing.Primitives/tests/System.Drawing.Primitives.Tests.csproj +++ b/src/System.Drawing.Primitives/tests/System.Drawing.Primitives.Tests.csproj @@ -1,7 +1,7 @@ {CF54638C-A382-4A78-9AD6-2304CEEFEB01} - netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release;uap-Debug;uap-Release + netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release diff --git a/src/System.Dynamic.Runtime/tests/Configurations.props b/src/System.Dynamic.Runtime/tests/Configurations.props index ff0d415e4593..acf56fa2750e 100644 --- a/src/System.Dynamic.Runtime/tests/Configurations.props +++ b/src/System.Dynamic.Runtime/tests/Configurations.props @@ -1,7 +1,8 @@  - netstandard; + netcoreapp; + uap; \ No newline at end of file diff --git a/src/System.Dynamic.Runtime/tests/System.Dynamic.Runtime.Tests.csproj b/src/System.Dynamic.Runtime/tests/System.Dynamic.Runtime.Tests.csproj index 17efcd50a257..22455cb727e5 100644 --- a/src/System.Dynamic.Runtime/tests/System.Dynamic.Runtime.Tests.csproj +++ b/src/System.Dynamic.Runtime/tests/System.Dynamic.Runtime.Tests.csproj @@ -3,7 +3,7 @@ {0BFD6D9F-DF9E-4B17-8ED4-29437AE5B04A} true 67,168,219,414,162,184,458,464,78,169,114,693,108,1981,649,109,1066,3021,3026,3002,3014,3022,660,661,429 - netstandard-Debug;netstandard-Release + netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release diff --git a/src/System.Globalization.Calendars/tests/Configurations.props b/src/System.Globalization.Calendars/tests/Configurations.props index 8c1230328e1b..54fa8c3dc73f 100644 --- a/src/System.Globalization.Calendars/tests/Configurations.props +++ b/src/System.Globalization.Calendars/tests/Configurations.props @@ -1,8 +1,8 @@ - netstandard; netcoreapp; + uap; \ No newline at end of file diff --git a/src/System.Globalization.Calendars/tests/System.Globalization.Calendars.Tests.csproj b/src/System.Globalization.Calendars/tests/System.Globalization.Calendars.Tests.csproj index 62ccf47f2cf6..a6d4f435c194 100644 --- a/src/System.Globalization.Calendars/tests/System.Globalization.Calendars.Tests.csproj +++ b/src/System.Globalization.Calendars/tests/System.Globalization.Calendars.Tests.csproj @@ -1,7 +1,7 @@ {66BE33BB-790D-4D0C-9336-E073001CBD15} - netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release + netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release true diff --git a/src/System.Globalization.Calendars/tests/System/Globalization/CalendarTestBase.cs b/src/System.Globalization.Calendars/tests/System/Globalization/CalendarTestBase.cs index 8d03e2dce83b..62c6166a8973 100644 --- a/src/System.Globalization.Calendars/tests/System/Globalization/CalendarTestBase.cs +++ b/src/System.Globalization.Calendars/tests/System/Globalization/CalendarTestBase.cs @@ -142,16 +142,7 @@ private static int MinCalendarYearInEra(Calendar calendar, int era) { int month = 1; int day = 1; - if (calendar is JapaneseLunisolarCalendar && PlatformDetection.IsFullFramework) - { - // desktop has a bug in JapaneseLunisolarCalendar which is fixed in .NET Core. - // in case of a new era starts in the middle of a month which means part of the month will belong to one - // era and the rest will belong to the new era. When calculating the calendar year number for dates which - // in the rest of the month and exist in the new started era, we should still use the old era info instead - // of the new era info because the rest of the month still belong to the year of last era. - // https://github.com/dotnet/coreclr/pull/3662 - yield break; - } + foreach (int era in calendar.Eras) { int year = MaxCalendarYearInEra(calendar, era) - 2; @@ -346,10 +337,6 @@ public void GetWeekOfYear_Invalid_ThrowsArgumentOutOfRangeException() public void ToDateTime_Invalid_ThrowsArgumentOutOfRangeException() { Calendar calendar = Calendar; - if (PlatformDetection.IsFullFramework && calendar is JapaneseLunisolarCalendar) - { - return; - } int month = 1; int day = 1; @@ -509,7 +496,6 @@ public void GetDayOfWeek_Invalid_ThrowsArgumentOutOfRangeException() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public void TestJapaneseCalendarDateParsing() { CultureInfo ciJapanese = new CultureInfo("ja-JP") { DateTimeFormat = { Calendar = new JapaneseCalendar() } }; diff --git a/src/System.Globalization.Calendars/tests/System/Globalization/KoreanLunisolarCalendarTests.cs b/src/System.Globalization.Calendars/tests/System/Globalization/KoreanLunisolarCalendarTests.cs index 03c1587673cd..8490a60ab541 100644 --- a/src/System.Globalization.Calendars/tests/System/Globalization/KoreanLunisolarCalendarTests.cs +++ b/src/System.Globalization.Calendars/tests/System/Globalization/KoreanLunisolarCalendarTests.cs @@ -10,7 +10,7 @@ public class KoreanLunisolarCalendarTests : EastAsianLunisolarCalendarTestBase { public override Calendar Calendar => new KoreanLunisolarCalendar(); - public override DateTime MinSupportedDateTime => new DateTime(0918, 02, !PlatformDetection.IsFullFramework ? 19 : 14); + public override DateTime MinSupportedDateTime => new DateTime(0918, 02, 19); public override DateTime MaxSupportedDateTime => new DateTime(2051, 02, 10, 23, 59, 59).AddTicks(9999999); } diff --git a/src/System.Globalization.Extensions/tests/Configurations.props b/src/System.Globalization.Extensions/tests/Configurations.props index ff0d415e4593..acf56fa2750e 100644 --- a/src/System.Globalization.Extensions/tests/Configurations.props +++ b/src/System.Globalization.Extensions/tests/Configurations.props @@ -1,7 +1,8 @@  - netstandard; + netcoreapp; + uap; \ No newline at end of file diff --git a/src/System.Globalization.Extensions/tests/Normalization/StringNormalizationTests.cs b/src/System.Globalization.Extensions/tests/Normalization/StringNormalizationTests.cs index 284bb690bc26..932ea2ba189d 100644 --- a/src/System.Globalization.Extensions/tests/Normalization/StringNormalizationTests.cs +++ b/src/System.Globalization.Extensions/tests/Normalization/StringNormalizationTests.cs @@ -33,7 +33,6 @@ public void IsNormalized_Invalid() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Regular method on full framework: no point invoking on a null reference")] public void IsNormalized_Null() { AssertExtensions.Throws("strInput", () => StringNormalizationExtensions.IsNormalized(null)); @@ -70,7 +69,6 @@ public void Normalize_Invalid() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Regular method on full framework: no point invoking on a null reference")] public void Normalize_Null() { AssertExtensions.Throws("strInput", () => StringNormalizationExtensions.Normalize(null)); diff --git a/src/System.Globalization.Extensions/tests/System.Globalization.Extensions.Tests.csproj b/src/System.Globalization.Extensions/tests/System.Globalization.Extensions.Tests.csproj index 1d025e1eea13..9b5fb1856ef0 100644 --- a/src/System.Globalization.Extensions/tests/System.Globalization.Extensions.Tests.csproj +++ b/src/System.Globalization.Extensions/tests/System.Globalization.Extensions.Tests.csproj @@ -1,7 +1,7 @@ {BC439554-4AB4-4C94-8E28-C00EDE4FD1C7} - netstandard-Debug;netstandard-Release + netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release true diff --git a/src/System.Globalization/tests/CompareInfo/CompareInfoTests.cs b/src/System.Globalization/tests/CompareInfo/CompareInfoTests.cs index cc8b8df39ee1..23ffe57ab81a 100644 --- a/src/System.Globalization/tests/CompareInfo/CompareInfoTests.cs +++ b/src/System.Globalization/tests/CompareInfo/CompareInfoTests.cs @@ -419,6 +419,37 @@ public void VersionTest() Assert.Equal(sv1.FullVersion, sv3.FullVersion); Assert.NotEqual(sv1.SortId, sv2.SortId); - } + } + + [Theory] + [MemberData(nameof(GetHashCodeTestData))] + public void GetHashCode_Span(string source1, CompareOptions options1, string source2, CompareOptions options2, bool expectSameHashCode) + { + CompareInfo invariantCompare = CultureInfo.InvariantCulture.CompareInfo; + + int hashOfSource1AsString = invariantCompare.GetHashCode(source1, options1); + int hashOfSource1AsSpan = invariantCompare.GetHashCode(source1.AsSpan(), options1); + Assert.Equal(hashOfSource1AsString, hashOfSource1AsSpan); + + int hashOfSource2AsString = invariantCompare.GetHashCode(source2, options2); + int hashOfSource2AsSpan = invariantCompare.GetHashCode(source2.AsSpan(), options2); + Assert.Equal(hashOfSource2AsString, hashOfSource2AsSpan); + + Assert.Equal(expectSameHashCode, hashOfSource1AsSpan == hashOfSource2AsSpan); + } + + [Fact] + public void GetHashCode_EmptySpan() + { + Assert.Equal(0, CultureInfo.InvariantCulture.CompareInfo.GetHashCode(ReadOnlySpan.Empty, CompareOptions.None)); + } + + [Fact] + public void GetHashCode_Span_Invalid() + { + AssertExtensions.Throws("options", () => CultureInfo.InvariantCulture.CompareInfo.GetHashCode("Test".AsSpan(), CompareOptions.StringSort)); + AssertExtensions.Throws("options", () => CultureInfo.InvariantCulture.CompareInfo.GetHashCode("Test".AsSpan(), CompareOptions.Ordinal | CompareOptions.IgnoreSymbols)); + AssertExtensions.Throws("options", () => CultureInfo.InvariantCulture.CompareInfo.GetHashCode("Test".AsSpan(), (CompareOptions)(-1))); + } } } diff --git a/src/System.Globalization/tests/CompareInfo/CompareInfoTests.netcoreapp.cs b/src/System.Globalization/tests/CompareInfo/CompareInfoTests.netcoreapp.cs deleted file mode 100644 index a762c0a76d55..000000000000 --- a/src/System.Globalization/tests/CompareInfo/CompareInfoTests.netcoreapp.cs +++ /dev/null @@ -1,42 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using Xunit; - -namespace System.Globalization.Tests -{ - public partial class CompareInfoTests - { - [Theory] - [MemberData(nameof(GetHashCodeTestData))] - public void GetHashCode_Span(string source1, CompareOptions options1, string source2, CompareOptions options2, bool expectSameHashCode) - { - CompareInfo invariantCompare = CultureInfo.InvariantCulture.CompareInfo; - - int hashOfSource1AsString = invariantCompare.GetHashCode(source1, options1); - int hashOfSource1AsSpan = invariantCompare.GetHashCode(source1.AsSpan(), options1); - Assert.Equal(hashOfSource1AsString, hashOfSource1AsSpan); - - int hashOfSource2AsString = invariantCompare.GetHashCode(source2, options2); - int hashOfSource2AsSpan = invariantCompare.GetHashCode(source2.AsSpan(), options2); - Assert.Equal(hashOfSource2AsString, hashOfSource2AsSpan); - - Assert.Equal(expectSameHashCode, hashOfSource1AsSpan == hashOfSource2AsSpan); - } - - [Fact] - public void GetHashCode_EmptySpan() - { - Assert.Equal(0, CultureInfo.InvariantCulture.CompareInfo.GetHashCode(ReadOnlySpan.Empty, CompareOptions.None)); - } - - [Fact] - public void GetHashCode_Span_Invalid() - { - AssertExtensions.Throws("options", () => CultureInfo.InvariantCulture.CompareInfo.GetHashCode("Test".AsSpan(), CompareOptions.StringSort)); - AssertExtensions.Throws("options", () => CultureInfo.InvariantCulture.CompareInfo.GetHashCode("Test".AsSpan(), CompareOptions.Ordinal | CompareOptions.IgnoreSymbols)); - AssertExtensions.Throws("options", () => CultureInfo.InvariantCulture.CompareInfo.GetHashCode("Test".AsSpan(), (CompareOptions)(-1))); - } - } -} diff --git a/src/System.Globalization/tests/Configurations.props b/src/System.Globalization/tests/Configurations.props index b8c4e127e896..aa1d34875976 100644 --- a/src/System.Globalization/tests/Configurations.props +++ b/src/System.Globalization/tests/Configurations.props @@ -1,7 +1,6 @@  - netstandard; netcoreapp; uap-Windows_NT; diff --git a/src/System.Globalization/tests/CultureInfo/CultureInfoAsync.cs b/src/System.Globalization/tests/CultureInfo/CultureInfoAsync.cs index b582ae581a29..0026728f59ff 100644 --- a/src/System.Globalization/tests/CultureInfo/CultureInfoAsync.cs +++ b/src/System.Globalization/tests/CultureInfo/CultureInfoAsync.cs @@ -10,9 +10,6 @@ namespace System.Globalization.Tests public class CultureInfoAsync { [Fact] - // async current cultures feature is supported on 4.6.1 and up on Windows desktop framework - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] - [ActiveIssue("https://github.com/dotnet/corert/issues/3747 - Port async-aware CultureInfo property from CoreCLR", TargetFrameworkMonikers.UapAot)] public void TestCurrentCulturesAsync() { CultureInfo currentCulture = CultureInfo.CurrentCulture; @@ -42,9 +39,6 @@ public void TestCurrentCulturesAsync() } [Fact] - // async current cultures feature is supported on 4.6.1 and up on Windows desktop framework - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] - [ActiveIssue("https://github.com/dotnet/corert/issues/3747 - Port async-aware CultureInfo property from CoreCLR", TargetFrameworkMonikers.UapAot)] public void TestCurrentCulturesWithAwait() { CultureInfo currentCulture = CultureInfo.CurrentCulture; diff --git a/src/System.Globalization/tests/CultureInfo/CultureInfoCurrentCulture.cs b/src/System.Globalization/tests/CultureInfo/CultureInfoCurrentCulture.cs index 86856ef944c9..5cf1b2263a3a 100644 --- a/src/System.Globalization/tests/CultureInfo/CultureInfoCurrentCulture.cs +++ b/src/System.Globalization/tests/CultureInfo/CultureInfoCurrentCulture.cs @@ -15,9 +15,6 @@ public class CurrentCultureTests [Fact] public void CurrentCulture() { - if (PlatformDetection.IsNetNative && !PlatformDetection.IsInAppContainer) // Tide us over until .NET Native ILC tests run are run inside an appcontainer. - return; - RemoteExecutor.Invoke(() => { CultureInfo newCulture = new CultureInfo(CultureInfo.CurrentCulture.Name.Equals("ja-JP", StringComparison.OrdinalIgnoreCase) ? "ar-SA" : "ja-JP"); @@ -44,9 +41,6 @@ public void CurrentCulture_Set_Null_ThrowsArgumentNullException() [Fact] public void CurrentUICulture() { - if (PlatformDetection.IsNetNative && !PlatformDetection.IsInAppContainer) // Tide us over until .NET Native ILC tests run are run inside an appcontainer. - return; - RemoteExecutor.Invoke(() => { CultureInfo newUICulture = new CultureInfo(CultureInfo.CurrentUICulture.Name.Equals("ja-JP", StringComparison.OrdinalIgnoreCase) ? "ar-SA" : "ja-JP"); diff --git a/src/System.Globalization/tests/DateTimeFormatInfo/DateTimeFormatInfoAbbreviatedMonthGenitiveNames.cs b/src/System.Globalization/tests/DateTimeFormatInfo/DateTimeFormatInfoAbbreviatedMonthGenitiveNames.cs index 7c40d5341b7f..751e314e9d26 100644 --- a/src/System.Globalization/tests/DateTimeFormatInfo/DateTimeFormatInfoAbbreviatedMonthGenitiveNames.cs +++ b/src/System.Globalization/tests/DateTimeFormatInfo/DateTimeFormatInfoAbbreviatedMonthGenitiveNames.cs @@ -78,7 +78,6 @@ public void AbbreviatedMonthGenitiveNames_SetReadOnly_ThrowsInvalidOperationExce } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public void AbbreviatedMonthGenitiveNames_Format_ReturnsExpected() { var format = new DateTimeFormatInfo(); diff --git a/src/System.Globalization/tests/System.Globalization.Tests.csproj b/src/System.Globalization/tests/System.Globalization.Tests.csproj index dbf50eb52ed9..c286ac574352 100644 --- a/src/System.Globalization/tests/System.Globalization.Tests.csproj +++ b/src/System.Globalization/tests/System.Globalization.Tests.csproj @@ -4,7 +4,7 @@ true true true - netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release + netcoreapp-Debug;netcoreapp-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release @@ -113,9 +113,6 @@ Common\System\RandomDataGenerator.cs - - - CharUnicodeInfo\UnicodeData.11.0.txt diff --git a/src/System.Globalization/tests/System/Globalization/TextInfoTests.cs b/src/System.Globalization/tests/System/Globalization/TextInfoTests.cs index 72306db20815..4c311ab39e2f 100644 --- a/src/System.Globalization/tests/System/Globalization/TextInfoTests.cs +++ b/src/System.Globalization/tests/System/Globalization/TextInfoTests.cs @@ -74,7 +74,6 @@ public static IEnumerable DutchTitleCaseInfo_TestData() [Theory] [MemberData(nameof(DutchTitleCaseInfo_TestData))] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Desktop Framework hasn't received the fix for dotnet/corefx#16770 yet.")] public void ToTitleCaseDutchTest(string cultureName, string expected, string actual) { TextInfo ti = CultureInfo.GetCultureInfo(cultureName).TextInfo; @@ -265,7 +264,6 @@ public void ToLower(string name, string str, string expected) [Theory] [MemberData(nameof(ToLower_TestData_netcore))] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public void ToLower_Netcore(string name, string str, string expected) { TestToLower(name, str, expected); @@ -389,7 +387,6 @@ public void ToUpper(string name, string str, string expected) [Theory] [MemberData(nameof(ToUpper_TestData_netcore))] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public void ToUpper_netcore(string name, string str, string expected) { TestToUpper(name, str, expected); diff --git a/src/System.IO.Compression.ZipFile/tests/Configurations.props b/src/System.IO.Compression.ZipFile/tests/Configurations.props index e43964ecf9e7..acf56fa2750e 100644 --- a/src/System.IO.Compression.ZipFile/tests/Configurations.props +++ b/src/System.IO.Compression.ZipFile/tests/Configurations.props @@ -2,7 +2,7 @@ netcoreapp; - netstandard; + uap; \ No newline at end of file diff --git a/src/System.IO.Compression.ZipFile/tests/System.IO.Compression.ZipFile.Tests.csproj b/src/System.IO.Compression.ZipFile/tests/System.IO.Compression.ZipFile.Tests.csproj index 24454ebfcf77..7615b2016d72 100644 --- a/src/System.IO.Compression.ZipFile/tests/System.IO.Compression.ZipFile.Tests.csproj +++ b/src/System.IO.Compression.ZipFile/tests/System.IO.Compression.ZipFile.Tests.csproj @@ -1,7 +1,7 @@ {775727A6-DF41-4160-A7FD-180279A653C7} - netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release + netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release @@ -15,9 +15,6 @@ Common\System\IO\TempDirectory.cs - - Common\System\IO\StreamSpanExtensions.netstandard.cs - Common\System\IO\Compression\CRC.cs diff --git a/src/System.IO.Compression.ZipFile/tests/ZipFile.Create.cs b/src/System.IO.Compression.ZipFile/tests/ZipFile.Create.cs index adb49b05f838..c3ab567ba2f1 100644 --- a/src/System.IO.Compression.ZipFile/tests/ZipFile.Create.cs +++ b/src/System.IO.Compression.ZipFile/tests/ZipFile.Create.cs @@ -402,7 +402,7 @@ public async Task UpdateAddFile() [PlatformSpecific(TestPlatforms.Windows)] // Checks Windows-specific invalid file path public void Windows_ZipWithInvalidFileNames_ThrowsException(string zipName, string paramName) { - if (paramName == null && !PlatformDetection.IsFullFramework) + if (paramName == null) Assert.Throws(() => ZipFile.ExtractToDirectory(compat(zipName) + ".zip", GetTestFilePath())); else AssertExtensions.Throws(paramName, null, () => ZipFile.ExtractToDirectory(compat(zipName) + ".zip", GetTestFilePath())); diff --git a/src/System.IO.Compression.ZipFile/tests/ZipFile.Extract.cs b/src/System.IO.Compression.ZipFile/tests/ZipFile.Extract.cs index 9850711868ac..740b8ea4ddec 100644 --- a/src/System.IO.Compression.ZipFile/tests/ZipFile.Extract.cs +++ b/src/System.IO.Compression.ZipFile/tests/ZipFile.Extract.cs @@ -49,7 +49,6 @@ public void ExtractToDirectoryUnicode() [Theory] [InlineData("../Foo")] [InlineData("../Barbell")] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Second case fails.")] public void ExtractOutOfRoot(string entryName) { string archivePath = GetTestFilePath(); diff --git a/src/System.IO.Compression/tests/ZipArchive/zip_CreateTests.cs b/src/System.IO.Compression/tests/ZipArchive/zip_CreateTests.cs index dcfbe23f0c6f..96f2200aac6c 100644 --- a/src/System.IO.Compression/tests/ZipArchive/zip_CreateTests.cs +++ b/src/System.IO.Compression/tests/ZipArchive/zip_CreateTests.cs @@ -77,7 +77,6 @@ public static async Task CreateNormal_Seekable(string folder, bool useSpansForWr [InlineData("normal")] [InlineData("empty")] [InlineData("emptydir")] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Full Framework does not allow unseekable streams.")] public static async Task CreateNormal_Unseekable(string folder) { using (var s = new MemoryStream()) @@ -104,7 +103,6 @@ public static async Task CreateNormal_Unicode_Seekable() [Fact] [Trait(XunitConstants.Category, XunitConstants.IgnoreForCI)] // Jenkins fails with unicode characters [JENKINS-12610] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Full Framework does not allow unseekable streams.")] public static async Task CreateNormal_Unicode_Unseekable() { using (var s = new MemoryStream()) diff --git a/src/System.IO.Compression/tests/ZipArchive/zip_ManualAndCompatibilityTests.cs b/src/System.IO.Compression/tests/ZipArchive/zip_ManualAndCompatibilityTests.cs index bcfc287877af..5a89e2974ec1 100644 --- a/src/System.IO.Compression/tests/ZipArchive/zip_ManualAndCompatibilityTests.cs +++ b/src/System.IO.Compression/tests/ZipArchive/zip_ManualAndCompatibilityTests.cs @@ -23,7 +23,6 @@ public static async Task CompatibilityTests(string zipFile, string zipFolder, bo } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Deflate64 zip support is a netcore feature not available on full framework.")] public static async Task Deflate64Zip() { IsZipSameAsDir(await StreamHelpers.CreateTempCopyStream(compat("deflate64.zip")), zfolder("normal"), ZipArchiveMode.Update, requireExplicit: true, checkTimes: true); @@ -54,7 +53,6 @@ public static async Task CompatibilityTestsMsFiles(string withTrailing, string w [InlineData("WindowsInvalid_FromWindows.zip", "aad")] [InlineData("NullCharFileName_FromWindows.zip", "a\06b6d")] [InlineData("NullCharFileName_FromUnix.zip", "a\06b6d")] - [ActiveIssue(32167, TargetFrameworkMonikers.NetFramework)] public static async Task ZipWithInvalidFileNames_ParsedBasedOnSourceOS(string zipName, string fileName) { using (Stream stream = await StreamHelpers.CreateTempCopyStream(compat(zipName))) diff --git a/src/System.IO.FileSystem.AccessControl/tests/Configurations.props b/src/System.IO.FileSystem.AccessControl/tests/Configurations.props index 34d2b9ff315f..b1c92d647835 100644 --- a/src/System.IO.FileSystem.AccessControl/tests/Configurations.props +++ b/src/System.IO.FileSystem.AccessControl/tests/Configurations.props @@ -1,7 +1,9 @@  - netstandard-Windows_NT; + netcoreapp-Windows_NT; + netfx-Windows_NT; + uap-Windows_NT \ No newline at end of file diff --git a/src/System.IO.FileSystem.AccessControl/tests/System.IO.FileSystem.AccessControl.Tests.csproj b/src/System.IO.FileSystem.AccessControl/tests/System.IO.FileSystem.AccessControl.Tests.csproj index 47266fbe80c2..c57cc7d2968d 100644 --- a/src/System.IO.FileSystem.AccessControl/tests/System.IO.FileSystem.AccessControl.Tests.csproj +++ b/src/System.IO.FileSystem.AccessControl/tests/System.IO.FileSystem.AccessControl.Tests.csproj @@ -1,7 +1,7 @@ {5915DD11-5D57-45A9-BFB0-56FEB7741E1F} - netstandard-Windows_NT-Debug;netstandard-Windows_NT-Release + netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netfx-Windows_NT-Debug;netfx-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release diff --git a/src/System.IO.FileSystem.DriveInfo/tests/Configurations.props b/src/System.IO.FileSystem.DriveInfo/tests/Configurations.props index c393c2898e2a..2578657e632b 100644 --- a/src/System.IO.FileSystem.DriveInfo/tests/Configurations.props +++ b/src/System.IO.FileSystem.DriveInfo/tests/Configurations.props @@ -1,8 +1,9 @@  - netstandard-Unix; - netstandard-Windows_NT; + netcoreapp-Unix; + netcoreapp-Windows_NT; + uap-Windows_NT; diff --git a/src/System.IO.FileSystem.DriveInfo/tests/System.IO.FileSystem.DriveInfo.Tests.csproj b/src/System.IO.FileSystem.DriveInfo/tests/System.IO.FileSystem.DriveInfo.Tests.csproj index 3c81c25328fd..9907e52c1020 100644 --- a/src/System.IO.FileSystem.DriveInfo/tests/System.IO.FileSystem.DriveInfo.Tests.csproj +++ b/src/System.IO.FileSystem.DriveInfo/tests/System.IO.FileSystem.DriveInfo.Tests.csproj @@ -1,7 +1,7 @@ {7D9E5F2F-5677-40FC-AD04-FA7D603E4806} - netstandard-Unix-Debug;netstandard-Unix-Release;netstandard-Windows_NT-Debug;netstandard-Windows_NT-Release + netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release diff --git a/src/System.IO.FileSystem.Primitives/tests/Configurations.props b/src/System.IO.FileSystem.Primitives/tests/Configurations.props index ff0d415e4593..acf56fa2750e 100644 --- a/src/System.IO.FileSystem.Primitives/tests/Configurations.props +++ b/src/System.IO.FileSystem.Primitives/tests/Configurations.props @@ -1,7 +1,8 @@  - netstandard; + netcoreapp; + uap; \ No newline at end of file diff --git a/src/System.IO.FileSystem.Primitives/tests/System.IO.FileSystem.Primitives.Tests.csproj b/src/System.IO.FileSystem.Primitives/tests/System.IO.FileSystem.Primitives.Tests.csproj index 1a91434d2c61..ba85fad8d12e 100644 --- a/src/System.IO.FileSystem.Primitives/tests/System.IO.FileSystem.Primitives.Tests.csproj +++ b/src/System.IO.FileSystem.Primitives/tests/System.IO.FileSystem.Primitives.Tests.csproj @@ -1,7 +1,7 @@ {2EF7EFA5-F171-4CAB-8A29-32833949FD87} - netstandard-Debug;netstandard-Release + netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release true diff --git a/src/System.IO.FileSystem.Watcher/tests/Args.RenamedEventArgs.cs b/src/System.IO.FileSystem.Watcher/tests/Args.RenamedEventArgs.cs index fd5b358a8ad4..a4e5737418a4 100644 --- a/src/System.IO.FileSystem.Watcher/tests/Args.RenamedEventArgs.cs +++ b/src/System.IO.FileSystem.Watcher/tests/Args.RenamedEventArgs.cs @@ -9,7 +9,6 @@ namespace System.IO.Tests public class RenamedEventArgsTests { [Theory] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "OldFullPath on Desktop demands FileIOPermissions which causes failures for invalid paths.")] [InlineData(WatcherChangeTypes.Changed, "C:", "foo.txt", "bar.txt")] [InlineData(WatcherChangeTypes.All, "C:", "foo.txt", "bar.txt")] [InlineData(0, "", "", "")] @@ -24,7 +23,6 @@ public static void RenamedEventArgs_ctor(WatcherChangeTypes changeType, string d } [Theory] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "OldFullPath on Desktop demands FileIOPermissions which causes failures for invalid paths.")] [InlineData(WatcherChangeTypes.Changed, "C:", "foo.txt", "bar.txt")] [InlineData(WatcherChangeTypes.All, "C:", "foo.txt", "bar.txt")] [InlineData(0, "", "", "")] diff --git a/src/System.IO.FileSystem.Watcher/tests/Configurations.props b/src/System.IO.FileSystem.Watcher/tests/Configurations.props index 9841d8bef49a..03e67cafab57 100644 --- a/src/System.IO.FileSystem.Watcher/tests/Configurations.props +++ b/src/System.IO.FileSystem.Watcher/tests/Configurations.props @@ -1,9 +1,6 @@  - netstandard-Linux; - netstandard-OSX; - netstandard-Windows_NT; netcoreapp-Linux; netcoreapp-OSX; netcoreapp-Windows_NT; diff --git a/src/System.IO.FileSystem.Watcher/tests/FileSystemWatcher.Directory.Changed.cs b/src/System.IO.FileSystem.Watcher/tests/FileSystemWatcher.Directory.Changed.cs index 892b71da9a1e..960af3a0fc18 100644 --- a/src/System.IO.FileSystem.Watcher/tests/FileSystemWatcher.Directory.Changed.cs +++ b/src/System.IO.FileSystem.Watcher/tests/FileSystemWatcher.Directory.Changed.cs @@ -24,7 +24,6 @@ public void FileSystemWatcher_Directory_Changed_LastWrite() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Desktop FSW disallows modification of the watched folder.")] public void FileSystemWatcher_Directory_Changed_WatchedFolder() { using (var testDirectory = new TempDirectory(GetTestFilePath())) diff --git a/src/System.IO.FileSystem.Watcher/tests/FileSystemWatcher.MultipleWatchers.cs b/src/System.IO.FileSystem.Watcher/tests/FileSystemWatcher.MultipleWatchers.cs index 56342a8d0002..4bde60c3bda7 100644 --- a/src/System.IO.FileSystem.Watcher/tests/FileSystemWatcher.MultipleWatchers.cs +++ b/src/System.IO.FileSystem.Watcher/tests/FileSystemWatcher.MultipleWatchers.cs @@ -11,7 +11,6 @@ namespace System.IO.Tests { public class FileSystemWatcher_Multiple_Test : FileSystemWatcherTest { - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "#34017")] [OuterLoop] [Fact] public void FileSystemWatcher_File_Create_ExecutionContextFlowed() @@ -47,7 +46,6 @@ public void FileSystemWatcher_File_Create_ExecutionContextFlowed() }); } - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "#34017")] [OuterLoop] [Fact] public void FileSystemWatcher_File_Create_SuppressedExecutionContextHandled() diff --git a/src/System.IO.FileSystem.Watcher/tests/FileSystemWatcher.WaitForChanged.cs b/src/System.IO.FileSystem.Watcher/tests/FileSystemWatcher.WaitForChanged.cs index 9eecec4563a3..7383545d91db 100644 --- a/src/System.IO.FileSystem.Watcher/tests/FileSystemWatcher.WaitForChanged.cs +++ b/src/System.IO.FileSystem.Watcher/tests/FileSystemWatcher.WaitForChanged.cs @@ -128,7 +128,6 @@ public void NonZeroTimeout_NoActivity_TimesOut(WatcherChangeTypes changeType, bo [OuterLoop("This test has a longer than average timeout and may fail intermittently")] [InlineData(WatcherChangeTypes.Created)] [InlineData(WatcherChangeTypes.Deleted)] - [ActiveIssue("dotnet/corefx #18308", TargetFrameworkMonikers.NetFramework)] public void CreatedDeleted_Success(WatcherChangeTypes changeType) { using (var testDirectory = new TempDirectory(GetTestFilePath())) diff --git a/src/System.IO.FileSystem.Watcher/tests/FileSystemWatcher.unit.cs b/src/System.IO.FileSystem.Watcher/tests/FileSystemWatcher.unit.cs index d046e78eae72..bd99677a03b6 100644 --- a/src/System.IO.FileSystem.Watcher/tests/FileSystemWatcher.unit.cs +++ b/src/System.IO.FileSystem.Watcher/tests/FileSystemWatcher.unit.cs @@ -2,9 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System.Collections.ObjectModel; using System.Linq; using System.Runtime.InteropServices; using System.Threading; +using System.Threading.Tasks; using Xunit; namespace System.IO.Tests @@ -65,7 +67,7 @@ public void FileSystemWatcher_EmptyAction_TriggersNothing() public void FileSystemWatcher_ctor() { string path = string.Empty; - string pattern = PlatformDetection.IsFullFramework ? "*.*" : "*"; + string pattern = "*"; using (FileSystemWatcher watcher = new FileSystemWatcher()) ValidateDefaults(watcher, path, pattern); } @@ -74,7 +76,7 @@ public void FileSystemWatcher_ctor() public void FileSystemWatcher_ctor_path() { string path = @"."; - string pattern = PlatformDetection.IsFullFramework ? "*.*" : "*"; + string pattern = "*"; using (FileSystemWatcher watcher = new FileSystemWatcher(path)) ValidateDefaults(watcher, path, pattern); } @@ -104,7 +106,6 @@ public void FileSystemWatcher_ctor_NullStrings() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "On Desktop, these exceptions don't have a parameter")] public void FileSystemWatcher_ctor_InvalidStrings() { using (var testDirectory = new TempDirectory(GetTestFilePath())) @@ -214,14 +215,14 @@ public void FileSystemWatcher_Filter() { FileSystemWatcher watcher = new FileSystemWatcher(); - Assert.Equal(PlatformDetection.IsFullFramework ? "*.*" : "*", watcher.Filter); + Assert.Equal("*", watcher.Filter); // Null and empty should be mapped to "*" watcher.Filter = null; - Assert.Equal(PlatformDetection.IsFullFramework ? "*.*" : "*", watcher.Filter); + Assert.Equal("*", watcher.Filter); watcher.Filter = string.Empty; - Assert.Equal(PlatformDetection.IsFullFramework ? "*.*" : "*", watcher.Filter); + Assert.Equal("*", watcher.Filter); watcher.Filter = " "; Assert.Equal(" ", watcher.Filter); @@ -235,7 +236,7 @@ public void FileSystemWatcher_Filter() watcher.Filter = "abc.dll"; Assert.Equal("abc.dll", watcher.Filter); - if (!(PlatformDetection.IsFullFramework || PlatformDetection.IsOSX)) + if (!(PlatformDetection.IsOSX)) { watcher.Filter = "ABC.DLL"; Assert.Equal("ABC.DLL", watcher.Filter); @@ -626,5 +627,494 @@ public void FileSystemWatcher_WatchingAliasedFolderResolvesToRealPathWhenWatchin } } } + + [Fact] + public void DefaultFiltersValue() + { + var watcher = new FileSystemWatcher(); + Assert.Equal(0, watcher.Filters.Count); + Assert.Empty(watcher.Filters); + Assert.NotNull(watcher.Filters); + Assert.Equal(new string[] { }, watcher.Filters); + } + + [Fact] + public void AddFilterToFilters() + { + var watcher = new FileSystemWatcher(); + watcher.Filters.Add("*.pdb"); + watcher.Filters.Add("*.dll"); + Assert.Equal(2, watcher.Filters.Count); + Assert.Equal(new string[] { "*.pdb", "*.dll" }, watcher.Filters); + + string[] copied = new string[2]; + watcher.Filters.CopyTo(copied, 0); + Assert.Equal(new string[] { "*.pdb", "*.dll" }, copied); + } + + [Fact] + public void FiltersCaseSensitive() + { + var watcher = new FileSystemWatcher(); + watcher.Filters.Add("foo"); + Assert.Equal("foo", watcher.Filters[0]); + watcher.Filters[0] = "Foo"; + Assert.Equal("Foo", watcher.Filters[0]); + } + + [Fact] + public void RemoveFilterFromFilters() + { + var watcher = new FileSystemWatcher(); + watcher.Filters.Add("*.pdb"); + watcher.Filters.Add("*.dll"); + + watcher.Filters.Remove("*.pdb"); + Assert.DoesNotContain(watcher.Filters, t => t == "*.pdb"); + Assert.Equal(new string[] { "*.dll" }, watcher.Filters); + + // No Exception is thrown while removing an item which is not present in the list. + watcher.Filters.Remove("*.pdb"); + } + + [Fact] + public void AddEmptyStringToFilters() + { + var watcher = new FileSystemWatcher(); + watcher.Filters.Add("*.pdb"); + watcher.Filters.Add("*.dll"); + + watcher.Filters.Add(string.Empty); + Assert.Equal(3, watcher.Filters.Count); + Assert.Equal(new string[] { "*.pdb", "*.dll", "*" }, watcher.Filters); + } + + [Fact] + public void AddNullToFilters() + { + var watcher = new FileSystemWatcher(); + + watcher.Filters.Add("*.pdb"); + watcher.Filters.Add("*.dll"); + + watcher.Filters.Add(null); + Assert.Equal(3, watcher.Filters.Count); + Assert.Equal(new string[] { "*.pdb", "*.dll", "*" }, watcher.Filters); + } + + [Fact] + public void SetEmptyStringToFilters() + { + var watcher = new FileSystemWatcher(); + watcher.Filters.Add("*.pdb"); + watcher.Filters.Add("*.dll"); + + watcher.Filters[0] = string.Empty; + Assert.Equal(2, watcher.Filters.Count); + Assert.Equal("*", watcher.Filters[0]); + Assert.Equal(new string[] { "*", "*.dll"}, watcher.Filters); + } + + [Fact] + public void RemoveEmptyStringToFilters() + { + var watcher = new FileSystemWatcher(); + watcher.Filters.Add("*.pdb"); + watcher.Filters.Add("*.dll"); + watcher.Filters.Add(string.Empty); + + Assert.Equal(3, watcher.Filters.Count); + watcher.Filters.Remove(string.Empty); + Assert.Equal(3, watcher.Filters.Count); + Assert.Equal(new string[] { "*.pdb", "*.dll", "*" }, watcher.Filters); + } + + [Fact] + public void RemoveAtFilters() + { + var watcher = new FileSystemWatcher(); + watcher.Filters.Add("*.pdb"); + watcher.Filters.Add("*.dll"); + + watcher.Filters.RemoveAt(0); + Assert.Equal(1, watcher.Filters.Count); + Assert.Equal("*.dll", watcher.Filter); + Assert.Equal(new string[] {"*.dll" }, watcher.Filters); + } + + [Fact] + public void RemoveAtEmptyFilters() + { + var watcher = new FileSystemWatcher(); + watcher.Filters.Add("*.pdb"); + + watcher.Filters.RemoveAt(0); + Assert.Equal(0, watcher.Filters.Count); + Assert.Equal("*", watcher.Filter); + Assert.Equal(new string[] { }, watcher.Filters); + } + + [Fact] + public void SetNullToFilters() + { + var watcher = new FileSystemWatcher(); + watcher.Filters.Add("*.pdb"); + watcher.Filters.Add("*.dll"); + + watcher.Filters[0] = null; + Assert.Equal(2, watcher.Filters.Count); + Assert.Equal("*", watcher.Filters[0]); + Assert.Equal(new string[] { "*", "*.dll" }, watcher.Filters); + } + + [Fact] + public void ContainsEmptyStringFilters() + { + var watcher = new FileSystemWatcher(); + watcher.Filters.Add("*.pdb"); + watcher.Filters.Add("*.dll"); + watcher.Filters.Add(string.Empty); + + Assert.False(watcher.Filters.Contains(string.Empty)); + Assert.True(watcher.Filters.Contains("*")); + } + + [Fact] + public void ContainsNullFilters() + { + var watcher = new FileSystemWatcher(); + watcher.Filters.Add("*.pdb"); + watcher.Filters.Add("*.dll"); + watcher.Filters.Add(null); + + Assert.False(watcher.Filters.Contains(null)); + Assert.True(watcher.Filters.Contains("*")); + } + + [Fact] + public void ContainsFilters() + { + var watcher = new FileSystemWatcher(); + watcher.Filters.Add("*.pdb"); + watcher.Filters.Add("*.dll"); + + Assert.True(watcher.Filters.Contains("*.pdb")); + } + + [Fact] + public void InsertEmptyStringFilters() + { + var watcher = new FileSystemWatcher(); + watcher.Filters.Add("*.pdb"); + watcher.Filters.Add("*.dll"); + watcher.Filters.Insert(1, string.Empty); + + Assert.Equal("*", watcher.Filters[1]); + Assert.Equal(3, watcher.Filters.Count); + Assert.Equal(new string[] { "*.pdb", "*", "*.dll" }, watcher.Filters); + } + + [Fact] + public void InsertNullFilters() + { + var watcher = new FileSystemWatcher(); + watcher.Filters.Add("*.pdb"); + watcher.Filters.Add("*.dll"); + watcher.Filters.Insert(1, null); + + Assert.Equal("*", watcher.Filters[1]); + Assert.Equal(3, watcher.Filters.Count); + Assert.Equal(new string[] { "*.pdb", "*", "*.dll" }, watcher.Filters); + } + + [Fact] + public void InsertFilters() + { + var watcher = new FileSystemWatcher(); + watcher.Filters.Add("*.pdb"); + watcher.Filters.Add("*.dll"); + watcher.Filters.Insert(1, "foo"); + + Assert.Equal("foo", watcher.Filters[1]); + Assert.Equal(3, watcher.Filters.Count); + Assert.Equal(new string[] { "*.pdb", "foo", "*.dll" }, watcher.Filters); + } + + [Fact] + public void InsertAtZero() + { + var watcher = new FileSystemWatcher(); + watcher.Filters.Add("*.pdb"); + watcher.Filters.Add("*.dll"); + watcher.Filters.Insert(0, "foo"); + + Assert.Equal("foo", watcher.Filters[0]); + Assert.Equal("foo", watcher.Filter); + Assert.Equal(3, watcher.Filters.Count); + Assert.Equal(new string[] { "foo", "*.pdb", "*.dll" }, watcher.Filters); + } + [Fact] + public void IndexOfEmptyStringFilters() + { + var watcher = new FileSystemWatcher(); + watcher.Filters.Add("*.pdb"); + watcher.Filters.Add("*.dll"); + watcher.Filters.Add(string.Empty); + + Assert.Equal(-1, watcher.Filters.IndexOf(string.Empty)); + } + + [Fact] + public void IndexOfNullFilters() + { + var watcher = new FileSystemWatcher(); + watcher.Filters.Add("*.pdb"); + watcher.Filters.Add("*.dll"); + watcher.Filters.Add(null); + + Assert.Equal(-1, watcher.Filters.IndexOf(null)); + } + + [Fact] + public void IndexOfFilters() + { + var watcher = new FileSystemWatcher(); + watcher.Filters.Add("*.pdb"); + watcher.Filters.Add("*.dll"); + + Assert.Equal(-1, watcher.Filters.IndexOf("foo")); + Assert.Equal(0, watcher.Filters.IndexOf("*.pdb")); + } + + [Fact] + public void GetTypeFilters() + { + var watcher = new FileSystemWatcher(); + Assert.IsAssignableFrom>(watcher.Filters); + } + + [Fact] + public void ClearFilters() + { + var watcher = new FileSystemWatcher(); + watcher.Filters.Add("*.pdb"); + watcher.Filters.Add("*.dll"); + + watcher.Filters.Clear(); + Assert.Equal(0, watcher.Filters.Count); + Assert.Equal(new string[] { }, watcher.Filters) ; + } + + [Fact] + public void GetFilterAfterFiltersClear() + { + using (var testDirectory = new TempDirectory(GetTestFilePath())) + { + var watcher = new FileSystemWatcher(testDirectory.Path); + watcher.Filters.Add("*.pdb"); + watcher.Filters.Add("*.dll"); + + watcher.Filters.Clear(); + Assert.Equal("*", watcher.Filter); + Assert.Equal(new string[] { }, watcher.Filters); + } + } + + [Fact] + public void GetFiltersAfterFiltersClear() + { + using (var testDirectory = new TempDirectory(GetTestFilePath())) + { + var watcher = new FileSystemWatcher(testDirectory.Path); + watcher.Filters.Add("*.pdb"); + watcher.Filters.Add("*.dll"); + + watcher.Filters.Clear(); + Assert.Throws(() => watcher.Filters[0]); + Assert.Equal(0, watcher.Filters.Count); + Assert.Empty(watcher.Filters); + Assert.NotNull(watcher.Filters); + } + } + + [Fact] + public void InvalidOperationsOnFilters() + { + var watcher = new FileSystemWatcher(); + watcher.Filters.Add("*.pdb"); + watcher.Filters.Add("*.dll"); + + Assert.Throws(() => watcher.Filters.Insert(4, "*")); + watcher.Filters.Clear(); + Assert.Throws(() => watcher.Filters[0]); + } + + [Fact] + public void SetAndGetFilterProperty() + { + using (var testDirectory = new TempDirectory(GetTestFilePath())) + { + var watcher = new FileSystemWatcher(testDirectory.Path, "*.pdb"); + watcher.Filters.Add("foo"); + Assert.Equal(2, watcher.Filters.Count); + Assert.Equal(new string[] { "*.pdb", "foo" }, watcher.Filters); + + watcher.Filter = "*.doc"; + Assert.Equal(1, watcher.Filters.Count); + Assert.Equal("*.doc", watcher.Filter); + Assert.Equal("*.doc", watcher.Filters[0]); + Assert.Equal(new string[] { "*.doc" }, watcher.Filters); + + watcher.Filters.Clear(); + Assert.Equal("*", watcher.Filter); + } + } + + [Fact] + public void SetAndGetFiltersProperty() + { + using (var testDirectory = new TempDirectory(GetTestFilePath())) + { + var watcher = new FileSystemWatcher(testDirectory.Path, "*.pdb"); + watcher.Filters.Add("foo"); + Assert.Equal(new string[] { "*.pdb", "foo" }, watcher.Filters); + } + } + + [Fact] + public void FileSystemWatcher_File_Delete_MultipleFilters() + { + // Check delete events against multiple filters + + DirectoryInfo directory = Directory.CreateDirectory(GetTestFilePath()); + FileInfo fileOne = new FileInfo(Path.Combine(directory.FullName, GetTestFileName())); + FileInfo fileTwo = new FileInfo(Path.Combine(directory.FullName, GetTestFileName())); + FileInfo fileThree = new FileInfo(Path.Combine(directory.FullName, GetTestFileName())); + fileOne.Create().Dispose(); + fileTwo.Create().Dispose(); + fileThree.Create().Dispose(); + + using (var watcher = new FileSystemWatcher(directory.FullName)) + { + watcher.Filters.Add(fileOne.Name); + watcher.Filters.Add(fileTwo.Name); + + ExpectEvent(watcher, WatcherChangeTypes.Deleted, () => fileOne.Delete(), cleanup: null, expectedPath : fileOne.FullName); + ExpectEvent(watcher, WatcherChangeTypes.Deleted, () => fileTwo.Delete(), cleanup: null, expectedPath: fileTwo.FullName ); + ExpectNoEvent(watcher, WatcherChangeTypes.Deleted, () => fileThree.Delete(), cleanup: null, expectedPath: fileThree.FullName); + } + } + + [Fact] + public void FileSystemWatcher_Directory_Create_MultipleFilters() + { + // Check create events against multiple filters + + DirectoryInfo directory = Directory.CreateDirectory(GetTestFilePath()); + string directoryOne = Path.Combine(directory.FullName, GetTestFileName()); + string directoryTwo = Path.Combine(directory.FullName, GetTestFileName()); + string directoryThree = Path.Combine(directory.FullName, GetTestFileName()); + + using (var watcher = new FileSystemWatcher(directory.FullName)) + { + watcher.Filters.Add(Path.GetFileName(directoryOne)); + watcher.Filters.Add(Path.GetFileName(directoryTwo)); + + ExpectEvent(watcher, WatcherChangeTypes.Created, () => Directory.CreateDirectory(directoryOne), cleanup: null, expectedPath: directoryOne); + ExpectEvent(watcher, WatcherChangeTypes.Created, () => Directory.CreateDirectory(directoryTwo), cleanup: null, expectedPath: directoryTwo); + ExpectNoEvent(watcher, WatcherChangeTypes.Created, () => Directory.CreateDirectory(directoryThree), cleanup: null, expectedPath: directoryThree); + } + } + + [Fact] + public void FileSystemWatcher_Directory_Create_Filter_Ctor() + { + // Check create events against multiple filters + + DirectoryInfo directory = Directory.CreateDirectory(GetTestFilePath()); + string directoryOne = Path.Combine(directory.FullName, GetTestFileName()); + string directoryTwo = Path.Combine(directory.FullName, GetTestFileName()); + string directoryThree = Path.Combine(directory.FullName, GetTestFileName()); + + using (var watcher = new FileSystemWatcher(directory.FullName, Path.GetFileName(directoryOne))) + { + watcher.Filters.Add(Path.GetFileName(directoryTwo)); + + ExpectEvent(watcher, WatcherChangeTypes.Created, () => Directory.CreateDirectory(directoryOne), cleanup: null, expectedPath: directoryOne); + ExpectEvent(watcher, WatcherChangeTypes.Created, () => Directory.CreateDirectory(directoryTwo), cleanup: null, expectedPath: directoryTwo); + ExpectNoEvent(watcher, WatcherChangeTypes.Created, () => Directory.CreateDirectory(directoryThree), cleanup: null, expectedPath: directoryThree); + } + } + + [Fact] + public void FileSystemWatcher_Directory_Delete_MultipleFilters() + { + DirectoryInfo directory = Directory.CreateDirectory(GetTestFilePath()); + DirectoryInfo directoryOne = Directory.CreateDirectory(Path.Combine(directory.FullName, GetTestFileName())); + DirectoryInfo directoryTwo = Directory.CreateDirectory(Path.Combine(directory.FullName, GetTestFileName())); + DirectoryInfo directoryThree = Directory.CreateDirectory(Path.Combine(directory.FullName, GetTestFileName())); + + using (var watcher = new FileSystemWatcher(directory.FullName)) + { + watcher.Filters.Add(Path.GetFileName(directoryOne.FullName)); + watcher.Filters.Add(Path.GetFileName(directoryTwo.FullName)); + + ExpectEvent(watcher, WatcherChangeTypes.Deleted, () => directoryOne.Delete(), cleanup: null, expectedPath: directoryOne.FullName); + ExpectEvent(watcher, WatcherChangeTypes.Deleted, () => directoryTwo.Delete(), cleanup: null, expectedPath: directoryTwo.FullName); + ExpectNoEvent(watcher, WatcherChangeTypes.Deleted, () => directoryThree.Delete(), cleanup: null, expectedPath: directoryThree.FullName); + } + } + + [Fact] + public void FileSystemWatcher_File_Create_MultipleFilters() + { + DirectoryInfo directory = Directory.CreateDirectory(GetTestFilePath()); + FileInfo fileOne = new FileInfo(Path.Combine(directory.FullName, GetTestFileName())); + FileInfo fileTwo = new FileInfo(Path.Combine(directory.FullName, GetTestFileName())); + FileInfo fileThree = new FileInfo(Path.Combine(directory.FullName, GetTestFileName())); + + using (var watcher = new FileSystemWatcher(directory.FullName)) + { + watcher.Filters.Add(fileOne.Name); + watcher.Filters.Add(fileTwo.Name); + + ExpectEvent(watcher, WatcherChangeTypes.Created, () => fileOne.Create().Dispose(), cleanup: null, expectedPath: fileOne.FullName); + ExpectEvent(watcher, WatcherChangeTypes.Created, () => fileTwo.Create().Dispose(), cleanup: null, expectedPath: fileTwo.FullName); + ExpectNoEvent(watcher, WatcherChangeTypes.Created, () => fileThree.Create().Dispose(), cleanup: null, expectedPath: fileThree.FullName); + } + } + + [Fact] + public void FileSystemWatcher_ModifyFiltersConcurrentWithEvents() + { + DirectoryInfo directory = Directory.CreateDirectory(GetTestFilePath()); + FileInfo fileOne = new FileInfo(Path.Combine(directory.FullName, GetTestFileName())); + FileInfo fileTwo = new FileInfo(Path.Combine(directory.FullName, GetTestFileName())); + FileInfo fileThree = new FileInfo(Path.Combine(directory.FullName, GetTestFileName())); + + using (var watcher = new FileSystemWatcher(directory.FullName)) + { + watcher.Filters.Add(fileOne.Name); + watcher.Filters.Add(fileTwo.Name); + + var cts = new CancellationTokenSource(); + Task modifier = Task.Run(() => + { + string otherFilter = Guid.NewGuid().ToString("N"); + while (!cts.IsCancellationRequested) + { + watcher.Filters.Add(otherFilter); + watcher.Filters.RemoveAt(2); + } + }); + + ExpectEvent(watcher, WatcherChangeTypes.Created, () => fileOne.Create().Dispose(), cleanup: null, expectedPath: fileOne.FullName); + ExpectEvent(watcher, WatcherChangeTypes.Created, () => fileTwo.Create().Dispose(), cleanup: null, expectedPath: fileTwo.FullName); + ExpectNoEvent(watcher, WatcherChangeTypes.Created, () => fileThree.Create().Dispose(), cleanup: null, expectedPath: fileThree.FullName); + + cts.Cancel(); + modifier.Wait(); + } + } } } diff --git a/src/System.IO.FileSystem.Watcher/tests/FileSystemWatcher.unit.netcoreapp.cs b/src/System.IO.FileSystem.Watcher/tests/FileSystemWatcher.unit.netcoreapp.cs deleted file mode 100644 index 733a556bbd2d..000000000000 --- a/src/System.IO.FileSystem.Watcher/tests/FileSystemWatcher.unit.netcoreapp.cs +++ /dev/null @@ -1,503 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System.Collections.ObjectModel; -using System.Threading; -using System.Threading.Tasks; -using Xunit; - -namespace System.IO.Tests -{ - public class FileSystemWatcherFilterListTests : FileSystemWatcherTest - { - [Fact] - public void DefaultFiltersValue() - { - var watcher = new FileSystemWatcher(); - Assert.Equal(0, watcher.Filters.Count); - Assert.Empty(watcher.Filters); - Assert.NotNull(watcher.Filters); - Assert.Equal(new string[] { }, watcher.Filters); - } - - [Fact] - public void AddFilterToFilters() - { - var watcher = new FileSystemWatcher(); - watcher.Filters.Add("*.pdb"); - watcher.Filters.Add("*.dll"); - Assert.Equal(2, watcher.Filters.Count); - Assert.Equal(new string[] { "*.pdb", "*.dll" }, watcher.Filters); - - string[] copied = new string[2]; - watcher.Filters.CopyTo(copied, 0); - Assert.Equal(new string[] { "*.pdb", "*.dll" }, copied); - } - - [Fact] - public void FiltersCaseSensitive() - { - var watcher = new FileSystemWatcher(); - watcher.Filters.Add("foo"); - Assert.Equal("foo", watcher.Filters[0]); - watcher.Filters[0] = "Foo"; - Assert.Equal("Foo", watcher.Filters[0]); - } - - [Fact] - public void RemoveFilterFromFilters() - { - var watcher = new FileSystemWatcher(); - watcher.Filters.Add("*.pdb"); - watcher.Filters.Add("*.dll"); - - watcher.Filters.Remove("*.pdb"); - Assert.DoesNotContain(watcher.Filters, t => t == "*.pdb"); - Assert.Equal(new string[] { "*.dll" }, watcher.Filters); - - // No Exception is thrown while removing an item which is not present in the list. - watcher.Filters.Remove("*.pdb"); - } - - [Fact] - public void AddEmptyStringToFilters() - { - var watcher = new FileSystemWatcher(); - watcher.Filters.Add("*.pdb"); - watcher.Filters.Add("*.dll"); - - watcher.Filters.Add(string.Empty); - Assert.Equal(3, watcher.Filters.Count); - Assert.Equal(new string[] { "*.pdb", "*.dll", "*" }, watcher.Filters); - } - - [Fact] - public void AddNullToFilters() - { - var watcher = new FileSystemWatcher(); - - watcher.Filters.Add("*.pdb"); - watcher.Filters.Add("*.dll"); - - watcher.Filters.Add(null); - Assert.Equal(3, watcher.Filters.Count); - Assert.Equal(new string[] { "*.pdb", "*.dll", "*" }, watcher.Filters); - } - - [Fact] - public void SetEmptyStringToFilters() - { - var watcher = new FileSystemWatcher(); - watcher.Filters.Add("*.pdb"); - watcher.Filters.Add("*.dll"); - - watcher.Filters[0] = string.Empty; - Assert.Equal(2, watcher.Filters.Count); - Assert.Equal("*", watcher.Filters[0]); - Assert.Equal(new string[] { "*", "*.dll"}, watcher.Filters); - } - - [Fact] - public void RemoveEmptyStringToFilters() - { - var watcher = new FileSystemWatcher(); - watcher.Filters.Add("*.pdb"); - watcher.Filters.Add("*.dll"); - watcher.Filters.Add(string.Empty); - - Assert.Equal(3, watcher.Filters.Count); - watcher.Filters.Remove(string.Empty); - Assert.Equal(3, watcher.Filters.Count); - Assert.Equal(new string[] { "*.pdb", "*.dll", "*" }, watcher.Filters); - } - - [Fact] - public void RemoveAtFilters() - { - var watcher = new FileSystemWatcher(); - watcher.Filters.Add("*.pdb"); - watcher.Filters.Add("*.dll"); - - watcher.Filters.RemoveAt(0); - Assert.Equal(1, watcher.Filters.Count); - Assert.Equal("*.dll", watcher.Filter); - Assert.Equal(new string[] {"*.dll" }, watcher.Filters); - } - - [Fact] - public void RemoveAtEmptyFilters() - { - var watcher = new FileSystemWatcher(); - watcher.Filters.Add("*.pdb"); - - watcher.Filters.RemoveAt(0); - Assert.Equal(0, watcher.Filters.Count); - Assert.Equal("*", watcher.Filter); - Assert.Equal(new string[] { }, watcher.Filters); - } - - [Fact] - public void SetNullToFilters() - { - var watcher = new FileSystemWatcher(); - watcher.Filters.Add("*.pdb"); - watcher.Filters.Add("*.dll"); - - watcher.Filters[0] = null; - Assert.Equal(2, watcher.Filters.Count); - Assert.Equal("*", watcher.Filters[0]); - Assert.Equal(new string[] { "*", "*.dll" }, watcher.Filters); - } - - [Fact] - public void ContainsEmptyStringFilters() - { - var watcher = new FileSystemWatcher(); - watcher.Filters.Add("*.pdb"); - watcher.Filters.Add("*.dll"); - watcher.Filters.Add(string.Empty); - - Assert.False(watcher.Filters.Contains(string.Empty)); - Assert.True(watcher.Filters.Contains("*")); - } - - [Fact] - public void ContainsNullFilters() - { - var watcher = new FileSystemWatcher(); - watcher.Filters.Add("*.pdb"); - watcher.Filters.Add("*.dll"); - watcher.Filters.Add(null); - - Assert.False(watcher.Filters.Contains(null)); - Assert.True(watcher.Filters.Contains("*")); - } - - [Fact] - public void ContainsFilters() - { - var watcher = new FileSystemWatcher(); - watcher.Filters.Add("*.pdb"); - watcher.Filters.Add("*.dll"); - - Assert.True(watcher.Filters.Contains("*.pdb")); - } - - [Fact] - public void InsertEmptyStringFilters() - { - var watcher = new FileSystemWatcher(); - watcher.Filters.Add("*.pdb"); - watcher.Filters.Add("*.dll"); - watcher.Filters.Insert(1, string.Empty); - - Assert.Equal("*", watcher.Filters[1]); - Assert.Equal(3, watcher.Filters.Count); - Assert.Equal(new string[] { "*.pdb", "*", "*.dll" }, watcher.Filters); - } - - [Fact] - public void InsertNullFilters() - { - var watcher = new FileSystemWatcher(); - watcher.Filters.Add("*.pdb"); - watcher.Filters.Add("*.dll"); - watcher.Filters.Insert(1, null); - - Assert.Equal("*", watcher.Filters[1]); - Assert.Equal(3, watcher.Filters.Count); - Assert.Equal(new string[] { "*.pdb", "*", "*.dll" }, watcher.Filters); - } - - [Fact] - public void InsertFilters() - { - var watcher = new FileSystemWatcher(); - watcher.Filters.Add("*.pdb"); - watcher.Filters.Add("*.dll"); - watcher.Filters.Insert(1, "foo"); - - Assert.Equal("foo", watcher.Filters[1]); - Assert.Equal(3, watcher.Filters.Count); - Assert.Equal(new string[] { "*.pdb", "foo", "*.dll" }, watcher.Filters); - } - - [Fact] - public void InsertAtZero() - { - var watcher = new FileSystemWatcher(); - watcher.Filters.Add("*.pdb"); - watcher.Filters.Add("*.dll"); - watcher.Filters.Insert(0, "foo"); - - Assert.Equal("foo", watcher.Filters[0]); - Assert.Equal("foo", watcher.Filter); - Assert.Equal(3, watcher.Filters.Count); - Assert.Equal(new string[] { "foo", "*.pdb", "*.dll" }, watcher.Filters); - } - [Fact] - public void IndexOfEmptyStringFilters() - { - var watcher = new FileSystemWatcher(); - watcher.Filters.Add("*.pdb"); - watcher.Filters.Add("*.dll"); - watcher.Filters.Add(string.Empty); - - Assert.Equal(-1, watcher.Filters.IndexOf(string.Empty)); - } - - [Fact] - public void IndexOfNullFilters() - { - var watcher = new FileSystemWatcher(); - watcher.Filters.Add("*.pdb"); - watcher.Filters.Add("*.dll"); - watcher.Filters.Add(null); - - Assert.Equal(-1, watcher.Filters.IndexOf(null)); - } - - [Fact] - public void IndexOfFilters() - { - var watcher = new FileSystemWatcher(); - watcher.Filters.Add("*.pdb"); - watcher.Filters.Add("*.dll"); - - Assert.Equal(-1, watcher.Filters.IndexOf("foo")); - Assert.Equal(0, watcher.Filters.IndexOf("*.pdb")); - } - - [Fact] - public void GetTypeFilters() - { - var watcher = new FileSystemWatcher(); - Assert.IsAssignableFrom>(watcher.Filters); - } - - [Fact] - public void ClearFilters() - { - var watcher = new FileSystemWatcher(); - watcher.Filters.Add("*.pdb"); - watcher.Filters.Add("*.dll"); - - watcher.Filters.Clear(); - Assert.Equal(0, watcher.Filters.Count); - Assert.Equal(new string[] { }, watcher.Filters) ; - } - - [Fact] - public void GetFilterAfterFiltersClear() - { - using (var testDirectory = new TempDirectory(GetTestFilePath())) - { - var watcher = new FileSystemWatcher(testDirectory.Path); - watcher.Filters.Add("*.pdb"); - watcher.Filters.Add("*.dll"); - - watcher.Filters.Clear(); - Assert.Equal("*", watcher.Filter); - Assert.Equal(new string[] { }, watcher.Filters); - } - } - - [Fact] - public void GetFiltersAfterFiltersClear() - { - using (var testDirectory = new TempDirectory(GetTestFilePath())) - { - var watcher = new FileSystemWatcher(testDirectory.Path); - watcher.Filters.Add("*.pdb"); - watcher.Filters.Add("*.dll"); - - watcher.Filters.Clear(); - Assert.Throws(() => watcher.Filters[0]); - Assert.Equal(0, watcher.Filters.Count); - Assert.Empty(watcher.Filters); - Assert.NotNull(watcher.Filters); - } - } - - [Fact] - public void InvalidOperationsOnFilters() - { - var watcher = new FileSystemWatcher(); - watcher.Filters.Add("*.pdb"); - watcher.Filters.Add("*.dll"); - - Assert.Throws(() => watcher.Filters.Insert(4, "*")); - watcher.Filters.Clear(); - Assert.Throws(() => watcher.Filters[0]); - } - - [Fact] - public void SetAndGetFilterProperty() - { - using (var testDirectory = new TempDirectory(GetTestFilePath())) - { - var watcher = new FileSystemWatcher(testDirectory.Path, "*.pdb"); - watcher.Filters.Add("foo"); - Assert.Equal(2, watcher.Filters.Count); - Assert.Equal(new string[] { "*.pdb", "foo" }, watcher.Filters); - - watcher.Filter = "*.doc"; - Assert.Equal(1, watcher.Filters.Count); - Assert.Equal("*.doc", watcher.Filter); - Assert.Equal("*.doc", watcher.Filters[0]); - Assert.Equal(new string[] { "*.doc" }, watcher.Filters); - - watcher.Filters.Clear(); - Assert.Equal("*", watcher.Filter); - } - } - - [Fact] - public void SetAndGetFiltersProperty() - { - using (var testDirectory = new TempDirectory(GetTestFilePath())) - { - var watcher = new FileSystemWatcher(testDirectory.Path, "*.pdb"); - watcher.Filters.Add("foo"); - Assert.Equal(new string[] { "*.pdb", "foo" }, watcher.Filters); - } - } - - [Fact] - public void FileSystemWatcher_File_Delete_MultipleFilters() - { - // Check delete events against multiple filters - - DirectoryInfo directory = Directory.CreateDirectory(GetTestFilePath()); - FileInfo fileOne = new FileInfo(Path.Combine(directory.FullName, GetTestFileName())); - FileInfo fileTwo = new FileInfo(Path.Combine(directory.FullName, GetTestFileName())); - FileInfo fileThree = new FileInfo(Path.Combine(directory.FullName, GetTestFileName())); - fileOne.Create().Dispose(); - fileTwo.Create().Dispose(); - fileThree.Create().Dispose(); - - using (var watcher = new FileSystemWatcher(directory.FullName)) - { - watcher.Filters.Add(fileOne.Name); - watcher.Filters.Add(fileTwo.Name); - - ExpectEvent(watcher, WatcherChangeTypes.Deleted, () => fileOne.Delete(), cleanup: null, expectedPath : fileOne.FullName); - ExpectEvent(watcher, WatcherChangeTypes.Deleted, () => fileTwo.Delete(), cleanup: null, expectedPath: fileTwo.FullName ); - ExpectNoEvent(watcher, WatcherChangeTypes.Deleted, () => fileThree.Delete(), cleanup: null, expectedPath: fileThree.FullName); - } - } - - [Fact] - public void FileSystemWatcher_Directory_Create_MultipleFilters() - { - // Check create events against multiple filters - - DirectoryInfo directory = Directory.CreateDirectory(GetTestFilePath()); - string directoryOne = Path.Combine(directory.FullName, GetTestFileName()); - string directoryTwo = Path.Combine(directory.FullName, GetTestFileName()); - string directoryThree = Path.Combine(directory.FullName, GetTestFileName()); - - using (var watcher = new FileSystemWatcher(directory.FullName)) - { - watcher.Filters.Add(Path.GetFileName(directoryOne)); - watcher.Filters.Add(Path.GetFileName(directoryTwo)); - - ExpectEvent(watcher, WatcherChangeTypes.Created, () => Directory.CreateDirectory(directoryOne), cleanup: null, expectedPath: directoryOne); - ExpectEvent(watcher, WatcherChangeTypes.Created, () => Directory.CreateDirectory(directoryTwo), cleanup: null, expectedPath: directoryTwo); - ExpectNoEvent(watcher, WatcherChangeTypes.Created, () => Directory.CreateDirectory(directoryThree), cleanup: null, expectedPath: directoryThree); - } - } - - [Fact] - public void FileSystemWatcher_Directory_Create_Filter_Ctor() - { - // Check create events against multiple filters - - DirectoryInfo directory = Directory.CreateDirectory(GetTestFilePath()); - string directoryOne = Path.Combine(directory.FullName, GetTestFileName()); - string directoryTwo = Path.Combine(directory.FullName, GetTestFileName()); - string directoryThree = Path.Combine(directory.FullName, GetTestFileName()); - - using (var watcher = new FileSystemWatcher(directory.FullName, Path.GetFileName(directoryOne))) - { - watcher.Filters.Add(Path.GetFileName(directoryTwo)); - - ExpectEvent(watcher, WatcherChangeTypes.Created, () => Directory.CreateDirectory(directoryOne), cleanup: null, expectedPath: directoryOne); - ExpectEvent(watcher, WatcherChangeTypes.Created, () => Directory.CreateDirectory(directoryTwo), cleanup: null, expectedPath: directoryTwo); - ExpectNoEvent(watcher, WatcherChangeTypes.Created, () => Directory.CreateDirectory(directoryThree), cleanup: null, expectedPath: directoryThree); - } - } - - [Fact] - public void FileSystemWatcher_Directory_Delete_MultipleFilters() - { - DirectoryInfo directory = Directory.CreateDirectory(GetTestFilePath()); - DirectoryInfo directoryOne = Directory.CreateDirectory(Path.Combine(directory.FullName, GetTestFileName())); - DirectoryInfo directoryTwo = Directory.CreateDirectory(Path.Combine(directory.FullName, GetTestFileName())); - DirectoryInfo directoryThree = Directory.CreateDirectory(Path.Combine(directory.FullName, GetTestFileName())); - - using (var watcher = new FileSystemWatcher(directory.FullName)) - { - watcher.Filters.Add(Path.GetFileName(directoryOne.FullName)); - watcher.Filters.Add(Path.GetFileName(directoryTwo.FullName)); - - ExpectEvent(watcher, WatcherChangeTypes.Deleted, () => directoryOne.Delete(), cleanup: null, expectedPath: directoryOne.FullName); - ExpectEvent(watcher, WatcherChangeTypes.Deleted, () => directoryTwo.Delete(), cleanup: null, expectedPath: directoryTwo.FullName); - ExpectNoEvent(watcher, WatcherChangeTypes.Deleted, () => directoryThree.Delete(), cleanup: null, expectedPath: directoryThree.FullName); - } - } - - [Fact] - public void FileSystemWatcher_File_Create_MultipleFilters() - { - DirectoryInfo directory = Directory.CreateDirectory(GetTestFilePath()); - FileInfo fileOne = new FileInfo(Path.Combine(directory.FullName, GetTestFileName())); - FileInfo fileTwo = new FileInfo(Path.Combine(directory.FullName, GetTestFileName())); - FileInfo fileThree = new FileInfo(Path.Combine(directory.FullName, GetTestFileName())); - - using (var watcher = new FileSystemWatcher(directory.FullName)) - { - watcher.Filters.Add(fileOne.Name); - watcher.Filters.Add(fileTwo.Name); - - ExpectEvent(watcher, WatcherChangeTypes.Created, () => fileOne.Create().Dispose(), cleanup: null, expectedPath: fileOne.FullName); - ExpectEvent(watcher, WatcherChangeTypes.Created, () => fileTwo.Create().Dispose(), cleanup: null, expectedPath: fileTwo.FullName); - ExpectNoEvent(watcher, WatcherChangeTypes.Created, () => fileThree.Create().Dispose(), cleanup: null, expectedPath: fileThree.FullName); - } - } - - [Fact] - public void FileSystemWatcher_ModifyFiltersConcurrentWithEvents() - { - DirectoryInfo directory = Directory.CreateDirectory(GetTestFilePath()); - FileInfo fileOne = new FileInfo(Path.Combine(directory.FullName, GetTestFileName())); - FileInfo fileTwo = new FileInfo(Path.Combine(directory.FullName, GetTestFileName())); - FileInfo fileThree = new FileInfo(Path.Combine(directory.FullName, GetTestFileName())); - - using (var watcher = new FileSystemWatcher(directory.FullName)) - { - watcher.Filters.Add(fileOne.Name); - watcher.Filters.Add(fileTwo.Name); - - var cts = new CancellationTokenSource(); - Task modifier = Task.Run(() => - { - string otherFilter = Guid.NewGuid().ToString("N"); - while (!cts.IsCancellationRequested) - { - watcher.Filters.Add(otherFilter); - watcher.Filters.RemoveAt(2); - } - }); - - ExpectEvent(watcher, WatcherChangeTypes.Created, () => fileOne.Create().Dispose(), cleanup: null, expectedPath: fileOne.FullName); - ExpectEvent(watcher, WatcherChangeTypes.Created, () => fileTwo.Create().Dispose(), cleanup: null, expectedPath: fileTwo.FullName); - ExpectNoEvent(watcher, WatcherChangeTypes.Created, () => fileThree.Create().Dispose(), cleanup: null, expectedPath: fileThree.FullName); - - cts.Cancel(); - modifier.Wait(); - } - } - } -} diff --git a/src/System.IO.FileSystem.Watcher/tests/System.IO.FileSystem.Watcher.Tests.csproj b/src/System.IO.FileSystem.Watcher/tests/System.IO.FileSystem.Watcher.Tests.csproj index f672f27cdc96..a61efefc6139 100644 --- a/src/System.IO.FileSystem.Watcher/tests/System.IO.FileSystem.Watcher.Tests.csproj +++ b/src/System.IO.FileSystem.Watcher/tests/System.IO.FileSystem.Watcher.Tests.csproj @@ -1,7 +1,7 @@ {20411A66-C7A4-4941-8FA2-66308365FD22} - netcoreapp-Linux-Debug;netcoreapp-Linux-Release;netcoreapp-OSX-Debug;netcoreapp-OSX-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netstandard-Linux-Debug;netstandard-Linux-Release;netstandard-OSX-Debug;netstandard-OSX-Release;netstandard-Windows_NT-Debug;netstandard-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release + netcoreapp-Linux-Debug;netcoreapp-Linux-Release;netcoreapp-OSX-Debug;netcoreapp-OSX-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release @@ -23,13 +23,8 @@ - - - Component - - - + Common\System\IO\TempFile.cs diff --git a/src/System.IO.FileSystem.Watcher/tests/Utility/FileSystemWatcherTest.cs b/src/System.IO.FileSystem.Watcher/tests/Utility/FileSystemWatcherTest.cs index 930010929ed1..a80179149ff0 100644 --- a/src/System.IO.FileSystem.Watcher/tests/Utility/FileSystemWatcherTest.cs +++ b/src/System.IO.FileSystem.Watcher/tests/Utility/FileSystemWatcherTest.cs @@ -470,5 +470,23 @@ public static IEnumerable FilterTypes() NotifyFilters.LastAccess | NotifyFilters.LastWrite | NotifyFilters.Size; + + private static FileSystemWatcher RecreateWatcher(FileSystemWatcher watcher) + { + FileSystemWatcher newWatcher = new FileSystemWatcher() + { + IncludeSubdirectories = watcher.IncludeSubdirectories, + NotifyFilter = watcher.NotifyFilter, + Path = watcher.Path, + InternalBufferSize = watcher.InternalBufferSize + }; + + foreach (string filter in watcher.Filters) + { + newWatcher.Filters.Add(filter); + } + + return newWatcher; + } } } diff --git a/src/System.IO.FileSystem.Watcher/tests/Utility/FileSystemWatcherTest.netcoreapp.cs b/src/System.IO.FileSystem.Watcher/tests/Utility/FileSystemWatcherTest.netcoreapp.cs deleted file mode 100644 index 02166779df3e..000000000000 --- a/src/System.IO.FileSystem.Watcher/tests/Utility/FileSystemWatcherTest.netcoreapp.cs +++ /dev/null @@ -1,30 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System.Collections.Generic; -using Xunit; - -namespace System.IO.Tests -{ - public abstract partial class FileSystemWatcherTest : FileCleanupTestBase - { - private static FileSystemWatcher RecreateWatcher(FileSystemWatcher watcher) - { - FileSystemWatcher newWatcher = new FileSystemWatcher() - { - IncludeSubdirectories = watcher.IncludeSubdirectories, - NotifyFilter = watcher.NotifyFilter, - Path = watcher.Path, - InternalBufferSize = watcher.InternalBufferSize - }; - - foreach (string filter in watcher.Filters) - { - newWatcher.Filters.Add(filter); - } - - return newWatcher; - } - } -} diff --git a/src/System.IO.FileSystem.Watcher/tests/Utility/FileSystemWatcherTest.netstandard.cs b/src/System.IO.FileSystem.Watcher/tests/Utility/FileSystemWatcherTest.netstandard.cs deleted file mode 100644 index f30b2373d669..000000000000 --- a/src/System.IO.FileSystem.Watcher/tests/Utility/FileSystemWatcherTest.netstandard.cs +++ /dev/null @@ -1,23 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -namespace System.IO.Tests -{ - public abstract partial class FileSystemWatcherTest : FileCleanupTestBase - { - private static FileSystemWatcher RecreateWatcher(FileSystemWatcher watcher) - { - var newWatcher = new FileSystemWatcher() - { - IncludeSubdirectories = watcher.IncludeSubdirectories, - NotifyFilter = watcher.NotifyFilter, - Filter = watcher.Filter, - Path = watcher.Path, - InternalBufferSize = watcher.InternalBufferSize - }; - - return newWatcher; - } - } -} diff --git a/src/System.IO.FileSystem/tests/Base/FileGetSetAttributes.cs b/src/System.IO.FileSystem/tests/Base/FileGetSetAttributes.cs index eb8d2635034d..c49aec2b9360 100644 --- a/src/System.IO.FileSystem/tests/Base/FileGetSetAttributes.cs +++ b/src/System.IO.FileSystem/tests/Base/FileGetSetAttributes.cs @@ -95,7 +95,6 @@ private void AssertSettingInvalidAttributes(string path, FileAttributes attribut InlineData(":bar"), InlineData(":bar:$DATA")] [PlatformSpecific(TestPlatforms.Windows)] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public void GettingAndSettingAttributes_AlternateDataStream_Windows(string streamName) { string path = CreateItem(); diff --git a/src/System.IO.FileSystem/tests/Configurations.props b/src/System.IO.FileSystem/tests/Configurations.props index 625a160ed7fd..421f137c2465 100644 --- a/src/System.IO.FileSystem/tests/Configurations.props +++ b/src/System.IO.FileSystem/tests/Configurations.props @@ -1,8 +1,6 @@  - netstandard-Unix; - netstandard-Windows_NT; netcoreapp-Unix; netcoreapp-Windows_NT; uap-Windows_NT; diff --git a/src/System.IO.FileSystem/tests/Directory/CreateDirectory.cs b/src/System.IO.FileSystem/tests/Directory/CreateDirectory.cs index 080df4e1229f..4d27fd70e213 100644 --- a/src/System.IO.FileSystem/tests/Directory/CreateDirectory.cs +++ b/src/System.IO.FileSystem/tests/Directory/CreateDirectory.cs @@ -43,16 +43,7 @@ public void FileNameIsToString_FullPath() string subdir = Path.GetRandomFileName(); string fullPath = Path.Combine(TestDirectory, subdir); DirectoryInfo info = Create(fullPath); - if (PlatformDetection.IsFullFramework && IsDirectoryCreate) - { - // I think this was accidental. In Core we want to be consistent with constructing - // an Info manually then calling Create on it. - Assert.Equal(subdir, info.ToString()); - } - else - { - Assert.Equal(fullPath, info.ToString()); - } + Assert.Equal(fullPath, info.ToString()); } [Fact] @@ -68,14 +59,6 @@ public void EmptyAsPath_ThrowsArgumentException() } [Theory, MemberData(nameof(PathsWithInvalidCharacters))] - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)] - public void PathWithInvalidCharactersAsPath_Desktop(string invalidPath) - { - Assert.Throws(() => Create(invalidPath)); - } - - [Theory, MemberData(nameof(PathsWithInvalidCharacters))] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public void PathWithInvalidCharactersAsPath_Core(string invalidPath) { if (invalidPath.Contains('\0')) @@ -233,16 +216,7 @@ public void DirectoryEqualToMaxDirectory_CanBeCreatedAllAtOnce() MemberData(nameof(PathsWithComponentLongerThanMaxComponent))] public void DirectoryWithComponentLongerThanMaxComponentAsPath_ThrowsException(string path) { - // While paths themselves can be up to 260 characters including trailing null, file systems - // limit each components of the path to a total of 255 characters on Desktop. - if (PlatformDetection.IsFullFramework) - { - Assert.Throws(() => Create(path)); - } - else - { - AssertExtensions.ThrowsAny(() => Create(path)); - } + AssertExtensions.ThrowsAny(() => Create(path)); } #endregion @@ -251,25 +225,6 @@ public void DirectoryWithComponentLongerThanMaxComponentAsPath_ThrowsException(s [Theory, MemberData(nameof(PathsWithInvalidColons))] [PlatformSpecific(TestPlatforms.Windows)] - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)] - public void PathWithInvalidColons_Throws_Desktop(string invalidPath) - { - if (PathFeatures.IsUsingLegacyPathNormalization()) - { - Assert.Throws(() => Create(invalidPath)); - } - else - { - if (invalidPath.Contains('|')) - Assert.Throws(() => Create(invalidPath)); - else - Assert.Throws(() => Create(invalidPath)); - } - } - - [Theory, MemberData(nameof(PathsWithInvalidColons))] - [PlatformSpecific(TestPlatforms.Windows)] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public void PathsWithInvalidColons_ThrowIOException_Core(string invalidPath) { // You can't actually create a directory with a colon in it. It was a preemptive @@ -279,7 +234,6 @@ public void PathsWithInvalidColons_ThrowIOException_Core(string invalidPath) [ConditionalFact(nameof(AreAllLongPathsAvailable))] [ActiveIssue(20117, TargetFrameworkMonikers.Uap)] - [ActiveIssue(32167, TargetFrameworkMonikers.NetFramework)] [PlatformSpecific(TestPlatforms.Windows)] // long directory path succeeds public void DirectoryLongerThanMaxPath_Succeeds() { @@ -309,22 +263,8 @@ public void DirectoryLongerThanMaxLongPathWithExtendedSyntax_ThrowsException() { var paths = IOInputs.GetPathsLongerThanMaxLongPath(GetTestFilePath(), useExtendedSyntax: true); - // Long directory path with extended syntax throws PathTooLongException on Desktop. - // Everywhere else, it may be either PathTooLongException or DirectoryNotFoundException - if (PlatformDetection.IsFullFramework) - { - Assert.All(paths, path => { Assert.Throws(() => Create(path)); }); - } - else - { - Assert.All(paths, - path => - { - AssertExtensions - .ThrowsAny( - () => Create(path)); - }); - } + Assert.All(paths, path => + AssertExtensions.ThrowsAny(() => Create(path))); } [ConditionalFact(nameof(LongPathsAreNotBlocked), nameof(UsingNewNormalization))] @@ -341,7 +281,6 @@ public void ExtendedDirectoryLongerThanLegacyMaxPath_Succeeds() [ConditionalFact(nameof(AreAllLongPathsAvailable))] [ActiveIssue(20117, TargetFrameworkMonikers.Uap)] - [ActiveIssue(32167, TargetFrameworkMonikers.NetFramework)] [PlatformSpecific(TestPlatforms.Windows)] // long directory path succeeds public void DirectoryLongerThanMaxDirectoryAsPath_Succeeds() { @@ -387,16 +326,6 @@ public void WindowsSimpleWhiteSpaceAsPath_ThrowsArgumentException(string path) [Theory, MemberData(nameof(ControlWhiteSpace))] [PlatformSpecific(TestPlatforms.Windows)] - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)] - public void WindowsControlWhiteSpaceAsPath_ThrowsArgumentException_Desktop(string path) - { - Assert.Throws(() => Create(path)); - } - - [Theory, - MemberData(nameof(ControlWhiteSpace))] - [PlatformSpecific(TestPlatforms.Windows)] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public void WindowsWhiteSpaceAsPath_ThrowsIOException_Core(string path) { Assert.Throws(() => Create(path)); @@ -413,25 +342,9 @@ public void UnixWhiteSpaceAsPath_Allowed(string path) } - [Theory, - MemberData(nameof(ControlWhiteSpace))] - [PlatformSpecific(TestPlatforms.Windows)] // trailing whitespace in path is removed on Windows - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)] // e.g. NetFX only - public void TrailingWhiteSpace_Trimmed(string component) - { - // On desktop, we trim a number of whitespace characters - DirectoryInfo testDir = Create(GetTestFilePath()); - string path = IOServices.RemoveTrailingSlash(testDir.FullName) + component; - DirectoryInfo result = Create(path); - - Assert.True(Directory.Exists(result.FullName)); - Assert.Equal(testDir.FullName, IOServices.RemoveTrailingSlash(result.FullName)); - } - [Theory, MemberData(nameof(NonControlWhiteSpace))] [PlatformSpecific(TestPlatforms.Windows)] // trailing whitespace in path is removed on Windows - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] // Not NetFX public void TrailingWhiteSpace_NotTrimmed(string component) { // In CoreFX we don't trim anything other than space (' ') @@ -446,7 +359,6 @@ public void TrailingWhiteSpace_NotTrimmed(string component) [Theory, MemberData(nameof(SimpleWhiteSpace))] //*Just Spaces* [PlatformSpecific(TestPlatforms.Windows)] // trailing whitespace in path is removed on Windows - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] // Not NetFX public void TrailingSpace_NotTrimmed(string component) { DirectoryInfo testDir = Create(GetTestFilePath()); @@ -487,16 +399,6 @@ public void UnixNonSignificantTrailingWhiteSpace(string component) [Theory, MemberData(nameof(PathsWithColons))] [PlatformSpecific(TestPlatforms.Windows)] // alternate data streams - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)] - public void PathWithColons_ThrowsNotSupportedException_Desktop(string path) - { - Assert.Throws(() => Create(path)); - } - - [Theory, - MemberData(nameof(PathsWithColons))] - [PlatformSpecific(TestPlatforms.Windows)] // alternate data streams - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public void PathWithColons_ThrowsIOException_Core(string path) { if (PlatformDetection.IsInAppContainer) @@ -530,16 +432,6 @@ public void PathWithReservedDeviceNameAsExtendedPath(string path) [Theory, MemberData(nameof(UncPathsWithoutShareName))] [PlatformSpecific(TestPlatforms.Windows)] - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)] - public void UncPathWithoutShareNameAsPath_ThrowsArgumentException_Desktop(string path) - { - Assert.Throws(() => Create(path)); - } - - [Theory, - MemberData(nameof(UncPathsWithoutShareName))] - [PlatformSpecific(TestPlatforms.Windows)] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public void UncPathWithoutShareNameAsPath_ThrowsIOException_Core(string path) { Assert.ThrowsAny(() => Create(path)); @@ -547,15 +439,6 @@ public void UncPathWithoutShareNameAsPath_ThrowsIOException_Core(string path) [Fact] [PlatformSpecific(TestPlatforms.Windows)] - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)] - public void UNCPathWithOnlySlashes_Desktop() - { - Assert.Throws(() => Create("//")); - } - - [Fact] - [PlatformSpecific(TestPlatforms.Windows)] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public void UNCPathWithOnlySlashes_Core() { Assert.ThrowsAny(() => Create("//")); diff --git a/src/System.IO.FileSystem/tests/Directory/Delete.cs b/src/System.IO.FileSystem/tests/Directory/Delete.cs index b9b82bb3dfdb..d655369e143c 100644 --- a/src/System.IO.FileSystem/tests/Directory/Delete.cs +++ b/src/System.IO.FileSystem/tests/Directory/Delete.cs @@ -257,7 +257,6 @@ public void RecursiveDeleteWithTrailingSlash() [ActiveIssue(24242)] [PlatformSpecific(TestPlatforms.Windows)] [OuterLoop("This test is very slow.")] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Desktop does not have the fix for #22596")] public void RecursiveDelete_DeepNesting() { // Create a 2000 level deep directory and recursively delete from the root. diff --git a/src/System.IO.FileSystem/tests/Directory/EnumerableTests.cs b/src/System.IO.FileSystem/tests/Directory/EnumerableTests.cs index 7d604b6f1f12..5d5081ed35af 100644 --- a/src/System.IO.FileSystem/tests/Directory/EnumerableTests.cs +++ b/src/System.IO.FileSystem/tests/Directory/EnumerableTests.cs @@ -33,7 +33,6 @@ public void FileEnumeratorIsThreadSafe() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public void EnumerateDirectories_NonBreakingSpace() { DirectoryInfo rootDirectory = Directory.CreateDirectory(GetTestFilePath()); diff --git a/src/System.IO.FileSystem/tests/Directory/Exists.cs b/src/System.IO.FileSystem/tests/Directory/Exists.cs index 686f06e8cbe4..19312336d449 100644 --- a/src/System.IO.FileSystem/tests/Directory/Exists.cs +++ b/src/System.IO.FileSystem/tests/Directory/Exists.cs @@ -261,22 +261,9 @@ public void TrailingWhitespaceExistence_SimpleWhiteSpace(string component) Assert.True(Exists(testDir.FullName)); } - [Theory, - MemberData(nameof(ControlWhiteSpace))] - [PlatformSpecific(TestPlatforms.Windows)] - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)] // e.g. NetFX only - public void ControlWhiteSpaceExists(string component) - { - DirectoryInfo testDir = Directory.CreateDirectory(GetTestFilePath()); - - string path = testDir.FullName + component; - Assert.True(Exists(path), "directory with control whitespace should exist"); - } - [Theory, MemberData(nameof(NonControlWhiteSpace))] [PlatformSpecific(TestPlatforms.Windows)] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] // not NetFX public void NonControlWhiteSpaceExists(string component) { DirectoryInfo testDir = Directory.CreateDirectory(GetTestFilePath() + component); diff --git a/src/System.IO.FileSystem/tests/Directory/GetFileSystemEntries_str.cs b/src/System.IO.FileSystem/tests/Directory/GetFileSystemEntries_str.cs index d9b5b8ed664c..5e2c17c4c8b6 100644 --- a/src/System.IO.FileSystem/tests/Directory/GetFileSystemEntries_str.cs +++ b/src/System.IO.FileSystem/tests/Directory/GetFileSystemEntries_str.cs @@ -206,33 +206,6 @@ public void HiddenFilesAreReturned() #region PlatformSpecific [Fact] - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)] - public void InvalidPath_Desktop() - { - foreach (char invalid in Path.GetInvalidFileNameChars()) - { - string badPath = string.Format($"{TestDirectory}{Path.DirectorySeparatorChar}te{invalid}st"); - switch (invalid) - { - case '/': - case '\\': - Assert.Throws(() => GetEntries(badPath)); - break; - case ':': - Assert.Throws(() => GetEntries(badPath)); - break; - case '\0': - Assert.Throws(() => GetEntries(badPath)); - break; - default: - Assert.Throws(() => GetEntries(badPath)); - break; - } - } - } - - [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public void InvalidPath_Core() { foreach (char invalid in Path.GetInvalidFileNameChars()) @@ -270,19 +243,6 @@ public void WindowsWhitespaceOnlyPath(string invalid) InlineData("<"), InlineData("\t")] [PlatformSpecific(TestPlatforms.Windows)] - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)] - public void WindowsInvalidCharsPath_Desktop(string invalid) - { - Assert.Throws(() => GetEntries(invalid)); - } - - [Theory, - InlineData("\n"), - InlineData(">"), - InlineData("<"), - InlineData("\t")] - [PlatformSpecific(TestPlatforms.Windows)] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public void WindowsInvalidCharsPath_Core(string invalid) { Assert.Throws(() => GetEntries(invalid)); diff --git a/src/System.IO.FileSystem/tests/Directory/GetFileSystemEntries_str_str.cs b/src/System.IO.FileSystem/tests/Directory/GetFileSystemEntries_str_str.cs index 83e21beda9e2..21ae5bbd5e6f 100644 --- a/src/System.IO.FileSystem/tests/Directory/GetFileSystemEntries_str_str.cs +++ b/src/System.IO.FileSystem/tests/Directory/GetFileSystemEntries_str_str.cs @@ -409,170 +409,7 @@ public void PatternTests_DosStarSpace(string pattern, string[] sourceFiles, stri ValidatePatternMatch(expected, GetEntries(testDir, pattern)); } - [OuterLoop("These are pretty corner, don't need to run all the time.")] - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)] - // Can't do these without extended path support on Windows, UsingNewNormalization filters appropriately - [ConditionalTheory(nameof(UsingNewNormalization)), - // "foo*." actually becomes "foo<" when passed to NT. It matches all characters up to, and including, the final period. - // - // There is a "bug" somewhere in the Windows stack where *some* files with trailing spaces after the final period will be returned when - // using "*." at the end of a string (which becomes "<"). According to the rules (and the actual pattern matcher used FsRtlIsNameInExpression) - // *nothing* should match after the final period. - // - // The results as passed to RtlIsNameInExpression (after changing *. to <) are in comments. - InlineData( - "foo*.", - new string[] { @"foo", @"foo.", @"foo.t", @"foo.tx", @"foo.txt", @"bar.txt", @"foo..", @"foo...", @"foo. ", @"foo. ", @"foo .", @"foo. . .", @"foo. t" }, - // Really should be: new string[] { @"foo", @"foo.", @"foo..", @"foo...", @"foo .", @"foo. . ." }), but is - new string[] { @"foo", @"foo .", @"foo.", @"foo..", @"foo...", @"foo. ", @"foo. . ." }), - InlineData( - "*.", - new string[] { @"foo. ", @"foo. ", @"foo..", @"foo. t" }, - // Really should be: new string[] { @"foo.." }), but is - new string[] { @"foo. ", @"foo. ", @"foo.." }), - InlineData( - "f*.", - new string[] { @"foo. ", @"foo. ", @"foo..", @"foo. t" }, - // Really should be: new string[] { @"foo.." }), but is - new string[] { @"foo. ", @"foo. ", @"foo.." }), - InlineData( - "fo*.", - new string[] { @"foo. ", @"foo. ", @"foo..", @"foo. t" }, - // Really should be: new string[] { @"foo.." }), but is - new string[] { @"foo. ", @"foo. ", @"foo.." }), - InlineData( - "foo*.", - new string[] { @"foo. ", @"foo. ", @"foo. ", @"foo. " }, - // Really should be: new string[] { }), but is - new string[] { @"foo. ", @"foo. ", @"foo. ", @"foo. " }), - InlineData( - "foo*.", - new string[] { @"foo. ", @"foo. ", @"foo. ", @"foo. ", @"foo." }, - // Really should be: new string[] { @"foo." }), but is - new string[] { @"foo. ", @"foo. ", @"foo. ", @"foo. ", @"foo." }), - InlineData( - "foo*.", - new string[] { @"foo.", @"foo. ", @"foo. ", @"foo. ", @"foo. " }, - // Really should be: new string[] { @"foo." }), but is - new string[] { @"foo. ", @"foo. ", @"foo. ", @"foo." }), - InlineData( - "foo*.", - new string[] { @"foo.", @"foo", @"foo. ", @"foo. ", @"foo. ", @"foo. " }, - // Really should be: new string[] { @"foo.", @"foo" }), but is - new string[] { @"foo.", @"foo", @"foo. ", @"foo. ", @"foo. " }), - InlineData( - "foo*.", - new string[] { @"foo.", @"foo. ", @"foo. ", @"foo. ", @"foo. ", @"foo" }, - // Really should be: new string[] { @"foo.", @"foo" }), but is - new string[] { @"foo.", @"foo", @"foo. ", @"foo. ", @"foo. " }), - InlineData( - "foo*.", - new string[] { @"foo. ", @"foo", @"foo.", @"foo. ", @"foo. ", @"foo. " }, - // Really should be: new string[] { @"foo.", @"foo" }), but is - new string[] { @"foo.", @"foo", @"foo. ", @"foo. ", @"foo. " }), - InlineData( - "foo*.", - new string[] { @"foo. ", @"foo", @"food", @"foo.", @"foo. ", @"foo. ", @"foo. " }, - // Really should be: new string[] { @"foo.", @"foo", @"food" }), but is - new string[] { @"foo.", @"foo", @"foo. ", @"foo. ", @"foo. ", @"food" }), - InlineData( - "fo*.", - new string[] { @"foo.", @"foo. ", @"foo. ", @"foo. ", @"foo. " }, - // Really should be: new string[] { @"foo." }), but is - new string[] { @"foo. ", @"foo. ", @"foo. ", @"foo.", @"foo. " }), - InlineData( - "foo*.", - new string[] { @"foo. ", @"foo. ", @"foo. ", @"foo. ", @"foo. " }, - // Really should be: new string[] { }), but is - new string[] { @"foo. ", @"foo. ", @"foo. ", @"foo. " }), - InlineData( - "foo*.", - new string[] { @"foo. ", @"foo. .", @"foo. . ", @"foo. . .", @"foo. . . " }, - // Really should be: new string[] { @"foo. .", @"foo. . ." }), but is - new string[] { @"foo. ", @"foo. .", @"foo. . ", @"foo. . ." }), - InlineData( - "foo*.", - new string[] { @"foo. ", @"foo. .", @"foo.. .", @"foo.... .", @"foo..... ." }, - // Really should be: new string[] { @"foo. .", @"foo.. .", @"foo.... .", @"foo..... ." }), but is - new string[] { @"foo. ", @"foo. .", @"foo.. .", @"foo.... .", @"foo..... ." }), - InlineData( - "fo*.", - new string[] { @"foo. ", @"foo. .", @"foo. . ", @"foo. . .", @"foo. . . " }, - // Really should be: new string[] { @"foo. .", @"foo. . ."}), but is - new string[] { @"foo. ", @"foo. .", @"foo. . ", @"foo. . .", @"foo. . . " }), - InlineData( - "foo*.", - new string[] { @"foo.", @"foo. ", @"foo. ", @"foo. ", @"foo. ", @"foo. " }, - // Really should be: new string[] { @"foo." }), but is - new string[] { @"foo.", @"foo. ", @"foo. ", @"foo. " }), - InlineData( - "food*.", - new string[] { @"food.", @"food. ", @"food. ", @"food. ", @"food. ", @"food. " }, - // Really should be: new string[] { @"food." }), but is - new string[] { @"food.", @"food. ", @"food. ", @"food. " }), - InlineData( - "food*.", - new string[] { @"food.", @"food. ", @"food. ", @"food. ", @"food. ", @"food. ", @"foodi." }, - // Really should be: new string[] { @"food.", @"foodi." }), but is - new string[] { @"food.", @"food. ", @"food. ", @"food. ", @"foodi." }), - InlineData( - "foodi*.", - new string[] { @"foodi.", @"foodi. ", @"foodi. ", @"foodi. ", @"foodi. ", @"foodi. " }, - // Really should be: new string[] { @"foodi." }), but is - new string[] { @"foodi.", @"foodi. ", @"foodi. ", @"foodi. " }), - InlineData( - "foodie*.", - new string[] { @"foodie.", @"foodie. ", @"foodie. ", @"foodie. ", @"foodie. ", @"foodie. " }, - // Really should be: new string[] { @"foodie." }), but is - new string[] { @"foodie.", @"foodie. ", @"foodie. ", @"foodie. " }), - InlineData( - "fooooo*.", - new string[] { @"foooooo.", @"foooooo. ", @"foooooo. " }, - // Really should be: new string[] { @"foooooo." }), but is - new string[] { @"foooooo.", @"foooooo. ", @"foooooo. " }), - InlineData( - "fooooo*.", - new string[] { @"foooooo. ", @"foooooo. ", @"foooooo. " }, - // Really should be: new string[] { }), but is - new string[] { @"foooooo. ", @"foooooo. ", @"foooooo. " }), - InlineData( - "fo*.", - new string[] { @"foo. ", @"foo. ", @"foo. ", @"foo. ", @"foo. " }, - // Really should be: new string[] { }), but is - new string[] { @"foo. ", @"foo. ", @"foo. ", @"foo. ", @"foo. " }), - InlineData( - "fo*.", - new string[] { @"foo. ", @"foo. ", @"foo. ", @"foo. ", @"foo. ", @"foo. ", @"foo. " }, - // Really should be: new string[] { }), but is - new string[] { @"foo. ", @"foo. ", @"foo. ", @"foo. ", @"foo. ", @"foo. ", @"foo. " }), - InlineData( - "fo*.", - new string[] { @"fo. ", @"fo. ", @"fo. ", @"fo. ", @"foo. ", @"foo. ", @"foo. ", @"foo. ", @"foo. ", @"foo. " }, - // Really should be: new string[] { }), but is - new string[] { @"fo. ", @"fo. ", @"fo. ", @"fo. ", @"foo. ", @"foo. ", @"foo. ", @"foo. ", @"foo. ", @"foo. " }), - InlineData( - "fo*.", - new string[] { @"fo. ", @"fo. ", @"fo. ", @"fo. ", @"fo. ", @"fo. ", @"foo. ", @"foo. ", @"foo. ", @"foo. ", @"foo. ", @"foo. " }, - // Really should be: new string[] { }), but is - new string[] { @"fo. ", @"fo. ", @"fo. ", @"fo. ", @"fo. ", @"fo. ", @"foo. ", @"foo. ", @"foo. ", @"foo. ", @"foo. ", @"foo. " }), - InlineData( - "foo*.", - new string[] { @"foo. ", @"foo. ", @"foo..", @"foo. t", @"foo. ", @"foo. " }, - // Really should be: new string[] { @"foo.." }), but is - new string[] { @"foo. ", @"foo. ", @"foo. ", @"foo.." }), - ] - public void PatternTests_DosStarOddSpace_Desktop(string pattern, string[] sourceFiles, string[] expected) - { - // Tests for DOS_STAR, which only occurs when the source pattern ends in *. - // These cases don't match documented behavior on Windows- matching *should* end at the final period. - - // We don't want to eat trailing space/periods in this test - string testDir = PrepareDirectory(sourceFiles, useExtendedPaths: true); - ValidatePatternMatch(expected, GetEntries(testDir, pattern)); - } - [ActiveIssue(20781, TestPlatforms.AnyUnix)] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] [OuterLoop("These are pretty corner, don't need to run all the time.")] [Theory, // "foo*." actually becomes "foo<" when passed to NT. It matches all characters up to, and including, the final period. @@ -749,19 +586,10 @@ public void WindowsSearchPatternLongSegment() DirectoryInfo testDir = Directory.CreateDirectory(GetTestFilePath()); string longName = new string('k', 257); - // Long path segment in search pattern throws PathTooLongException on Desktop - if (PlatformDetection.IsFullFramework) - { - Assert.Throws(() => GetEntries(testDir.FullName, longName)); - } - else - { - GetEntries(testDir.FullName, longName); - } + GetEntries(testDir.FullName, longName); } [ConditionalFact(nameof(AreAllLongPathsAvailable))] - [ActiveIssue(32167, TargetFrameworkMonikers.NetFramework)] public void SearchPatternLongPath() { // Create a destination path longer than the traditional Windows limit of 256 characters @@ -784,17 +612,6 @@ public void SearchPatternLongPath() } [Fact] - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)] - public void WindowsSearchPatternWithDoubleDots_Desktop() - { - // Search pattern with double dots throws ArgumentException - Assert.Throws(() => GetEntries(TestDirectory, Path.Combine("..ab ab.. .. abc..d", "abc.."))); - Assert.Throws(() => GetEntries(TestDirectory, "..")); - Assert.Throws(() => GetEntries(TestDirectory, @".." + Path.DirectorySeparatorChar)); - } - - [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public void SearchPatternWithDoubleDots_Core() { // Search pattern with double dots no longer throws ArgumentException @@ -812,48 +629,8 @@ public void SearchPatternWithDoubleDots_Core() private static char[] OldWildcards = new char[] { '*', '?' }; private static char[] NewWildcards = new char[] { '<', '>', '\"' }; - [Fact] - [PlatformSpecific(TestPlatforms.Windows)] // Windows-invalid search patterns throw - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)] - public void WindowsSearchPatternInvalid_Desktop() - { - Assert.Throws(() => GetEntries(TestDirectory, "\0")); - Assert.Throws(() => GetEntries(TestDirectory, "|")); - - Assert.All(Path.GetInvalidFileNameChars().Except(OldWildcards).Except(NewWildcards), invalidChar => - { - switch (invalidChar) - { - case '\\': - case '/': - Assert.Throws(() => GetEntries(Directory.GetCurrentDirectory(), string.Format("te{0}st", invalidChar.ToString()))); - break; - //We don't throw in V1 too - case ':': - //History: - // 1) we assumed that this will work in all non-9x machine - // 2) Then only in XP - // 3) NTFS? - if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows) && - FileSystemDebugInfo.IsCurrentDriveNTFS()) // testing NTFS - { - Assert.Throws(() => GetEntries(Directory.GetCurrentDirectory(), string.Format("te{0}st", invalidChar.ToString()))); - } - else - { - GetEntries(Directory.GetCurrentDirectory(), string.Format("te{0}st", invalidChar.ToString())); - } - break; - default: - Assert.Throws(() => GetEntries(Directory.GetCurrentDirectory(), string.Format("te{0}st", invalidChar.ToString()))); - break; - } - }); - } - [Fact] [PlatformSpecific(TestPlatforms.Windows)] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public void WindowsSearchPatternInvalid_Core() { GetEntries(TestDirectory, "\0"); @@ -876,7 +653,6 @@ public void WindowsSearchPatternInvalid_Core() [Fact] [PlatformSpecific(TestPlatforms.Windows)] // Windows-invalid search patterns throw - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "In netcoreapp we made three new characters be treated as valid wildcards instead of invalid characters. NetFX still treats them as InvalidChars.")] public void WindowsSearchPatternInvalid_Wildcards_netcoreapp() { Assert.All(OldWildcards, invalidChar => @@ -889,21 +665,6 @@ public void WindowsSearchPatternInvalid_Wildcards_netcoreapp() }); } - [Fact] - [PlatformSpecific(TestPlatforms.Windows)] // Windows-invalid search patterns throw - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework, "In netcoreapp we made three new characters be treated as valid wildcards instead of invalid characters. NetFX still treats them as InvalidChars.")] - public void WindowsSearchPatternInvalid_Wildcards_netfx() - { - Assert.All(OldWildcards, invalidChar => - { - GetEntries(Directory.GetCurrentDirectory(), string.Format("te{0}st", invalidChar.ToString())); - }); - Assert.All(NewWildcards, invalidChar => - { - Assert.Throws(() => GetEntries(Directory.GetCurrentDirectory(), string.Format("te{0}st", invalidChar.ToString()))); - }); - } - [Fact] [PlatformSpecific(TestPlatforms.AnyUnix)] // Unix-invalid search patterns throws no exception public void UnixSearchPatternInvalid() diff --git a/src/System.IO.FileSystem/tests/Directory/GetFiles.cs b/src/System.IO.FileSystem/tests/Directory/GetFiles.cs index e2e8eeeeff9b..7a8a36bde6d4 100644 --- a/src/System.IO.FileSystem/tests/Directory/GetFiles.cs +++ b/src/System.IO.FileSystem/tests/Directory/GetFiles.cs @@ -43,7 +43,6 @@ public void EnumerateWithSymLinkToFile() } [ConditionalFact(nameof(AreAllLongPathsAvailable))] - [ActiveIssue(32167, TargetFrameworkMonikers.NetFramework)] public void EnumerateFilesOverLegacyMaxPath() { // We want to test that directories under the legacy MAX_PATH (260 characters, including the null) can iterate files @@ -64,7 +63,6 @@ public void EnumerateFilesOverLegacyMaxPath() } [ConditionalFact(nameof(AreAllLongPathsAvailable))] - [ActiveIssue(32167, TargetFrameworkMonikers.NetFramework)] public void EnumerateFilesDirectoryOverLegacyMaxPath() { // Check enumerating when the entire path is over MAX_PATH diff --git a/src/System.IO.FileSystem/tests/Directory/Move.cs b/src/System.IO.FileSystem/tests/Directory/Move.cs index 4a0834744ece..7b513d9e4cb9 100644 --- a/src/System.IO.FileSystem/tests/Directory/Move.cs +++ b/src/System.IO.FileSystem/tests/Directory/Move.cs @@ -243,18 +243,6 @@ public void Path_With_Longer_Than_MaxDirectory_Succeeds() [Fact] [PlatformSpecific(TestPlatforms.Windows)] - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)] - public void WindowsWildCharacterPath_Desktop() - { - Assert.Throws(() => Move("*", GetTestFilePath())); - Assert.Throws(() => Move(TestDirectory, "*")); - Assert.Throws(() => Move(TestDirectory, "Test*t")); - Assert.Throws(() => Move(TestDirectory, "*Test")); - } - - [Fact] - [PlatformSpecific(TestPlatforms.Windows)] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public void WindowsWildCharacterPath_Core() { Assert.ThrowsAny(() => Move(Path.Combine(TestDirectory, "*"), GetTestFilePath())); diff --git a/src/System.IO.FileSystem/tests/DirectoryInfo/CreateSubdirectory.cs b/src/System.IO.FileSystem/tests/DirectoryInfo/CreateSubdirectory.cs index 7ed2e27e4a25..0a241dba57b9 100644 --- a/src/System.IO.FileSystem/tests/DirectoryInfo/CreateSubdirectory.cs +++ b/src/System.IO.FileSystem/tests/DirectoryInfo/CreateSubdirectory.cs @@ -90,7 +90,6 @@ public void SubDirectoryIsParentDirectory_ThrowsArgumentException() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public void SubdirectoryOverlappingName_ThrowsArgumentException() { // What we're looking for here is trying to create C:\FooBar under C:\Foo by passing "..\FooBar" @@ -172,16 +171,6 @@ public void AllowedSymbols() [Theory, MemberData(nameof(ControlWhiteSpace))] [PlatformSpecific(TestPlatforms.Windows)] - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)] - public void WindowsControlWhiteSpace_Desktop(string component) - { - Assert.Throws(() => new DirectoryInfo(TestDirectory).CreateSubdirectory(component)); - } - - [Theory, - MemberData(nameof(ControlWhiteSpace))] - [PlatformSpecific(TestPlatforms.Windows)] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public void WindowsControlWhiteSpace_Core(string component) { Assert.Throws(() => new DirectoryInfo(TestDirectory).CreateSubdirectory(component)); @@ -189,24 +178,12 @@ public void WindowsControlWhiteSpace_Core(string component) [Theory, MemberData(nameof(SimpleWhiteSpace))] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] [PlatformSpecific(TestPlatforms.Windows)] public void WindowsSimpleWhiteSpaceThrowsException(string component) { Assert.Throws(() => new DirectoryInfo(TestDirectory).CreateSubdirectory(component)); } - [Theory, - MemberData(nameof(SimpleWhiteSpace))] - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)] // Simple whitespace is trimmed in path - public void WindowsSimpleWhiteSpace(string component) - { - DirectoryInfo result = new DirectoryInfo(TestDirectory).CreateSubdirectory(component); - - Assert.True(Directory.Exists(result.FullName)); - Assert.Equal(TestDirectory, IOServices.RemoveTrailingSlash(result.FullName)); - } - [Theory, MemberData(nameof(WhiteSpace))] [PlatformSpecific(TestPlatforms.AnyUnix)] // Whitespace as path allowed @@ -251,7 +228,6 @@ public void UNCPathWithOnlySlashes() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public void ParentDirectoryNameAsPrefixShouldThrow() { string randomName = GetTestFileName(); diff --git a/src/System.IO.FileSystem/tests/DirectoryInfo/ToString.cs b/src/System.IO.FileSystem/tests/DirectoryInfo/ToString.cs index 0a85ab857823..454f58bc91af 100644 --- a/src/System.IO.FileSystem/tests/DirectoryInfo/ToString.cs +++ b/src/System.IO.FileSystem/tests/DirectoryInfo/ToString.cs @@ -38,7 +38,6 @@ public void KeepsOriginalPath(string path) } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotInAppContainer))] // Can't read root in appcontainer - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] // Different behavior on Desktop [PlatformSpecific(TestPlatforms.Windows)] // Drive letter only public void DriveOnlyReturnsDrive_Windows() { diff --git a/src/System.IO.FileSystem/tests/File/Copy.cs b/src/System.IO.FileSystem/tests/File/Copy.cs index b677a6e654c9..2e52930061cc 100644 --- a/src/System.IO.FileSystem/tests/File/Copy.cs +++ b/src/System.IO.FileSystem/tests/File/Copy.cs @@ -174,23 +174,6 @@ public void WindowsAllSpacePath(string invalid) InlineData("<"), InlineData("\t")] [PlatformSpecific(TestPlatforms.Windows)] - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)] - public void WindowsInvalidCharsPath_Desktop(string invalid) - { - string testFile = GetTestFilePath(); - File.Create(testFile).Dispose(); - - Assert.Throws(() => Copy(testFile, invalid)); - Assert.Throws(() => Copy(invalid, testFile)); - } - - [Theory, - InlineData("\n"), - InlineData(">"), - InlineData("<"), - InlineData("\t")] - [PlatformSpecific(TestPlatforms.Windows)] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public void WindowsInvalidCharsPath_Core(string invalid) { string testFile = GetTestFilePath(); @@ -225,7 +208,6 @@ public void UnixInvalidWindowsPaths(string valid) InlineData("::$DATA", ":bar"), InlineData("::$DATA", ":bar:$DATA")] [PlatformSpecific(TestPlatforms.Windows)] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public void WindowsAlternateDataStream(string defaultStream, string alternateStream) { DirectoryInfo testDirectory = Directory.CreateDirectory(GetTestFilePath()); @@ -323,7 +305,6 @@ public void OverwriteFalse() InlineData("::$DATA", ":bar"), InlineData("::$DATA", ":bar:$DATA")] [PlatformSpecific(TestPlatforms.Windows)] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public void WindowsAlternateDataStreamOverwrite(string defaultStream, string alternateStream) { DirectoryInfo testDirectory = Directory.CreateDirectory(GetTestFilePath()); diff --git a/src/System.IO.FileSystem/tests/File/Create.cs b/src/System.IO.FileSystem/tests/File/Create.cs index be16528e76c8..eba0fbdfea04 100644 --- a/src/System.IO.FileSystem/tests/File/Create.cs +++ b/src/System.IO.FileSystem/tests/File/Create.cs @@ -150,18 +150,8 @@ public void LongPathSegment() { DirectoryInfo testDir = Directory.CreateDirectory(GetTestFilePath()); - // Long path should throw PathTooLongException on Desktop and IOException - // elsewhere. - if (PlatformDetection.IsFullFramework) - { - Assert.Throws( - () => Create(Path.Combine(testDir.FullName, new string('a', 300)))); - } - else - { - AssertExtensions.ThrowsAny( - () => Create(Path.Combine(testDir.FullName, new string('a', 300)))); - } + AssertExtensions.ThrowsAny(() => + Create(Path.Combine(testDir.FullName, new string('a', 300)))); } #endregion @@ -225,19 +215,6 @@ public void CaseInsensitive() [Fact] [PlatformSpecific(TestPlatforms.Windows)] - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)] - public void WindowsWildCharacterPath_Desktop() - { - DirectoryInfo testDir = Directory.CreateDirectory(GetTestFilePath()); - Assert.Throws(() => Create(Path.Combine(testDir.FullName, "dls;d", "442349-0", "v443094(*)(+*$#$*", new string(Path.DirectorySeparatorChar, 3)))); - Assert.Throws(() => Create(Path.Combine(testDir.FullName, "*"))); - Assert.Throws(() => Create(Path.Combine(testDir.FullName, "Test*t"))); - Assert.Throws(() => Create(Path.Combine(testDir.FullName, "*Tes*t"))); - } - - [Fact] - [PlatformSpecific(TestPlatforms.Windows)] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public void WindowsWildCharacterPath_Core() { DirectoryInfo testDir = Directory.CreateDirectory(GetTestFilePath()); @@ -264,19 +241,6 @@ public void WindowsEmptyPath(string path) InlineData("<"), InlineData("\t")] [PlatformSpecific(TestPlatforms.Windows)] - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)] - public void WindowsInvalidPath_Desktop(string path) - { - Assert.Throws(() => Create(path)); - } - - [Theory, - InlineData("\n"), - InlineData(">"), - InlineData("<"), - InlineData("\t")] - [PlatformSpecific(TestPlatforms.Windows)] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public void WindowsInvalidPath_Core(string path) { Assert.ThrowsAny(() => Create(Path.Combine(TestDirectory, path))); @@ -311,7 +275,6 @@ public void UnixWhitespacePath(string path) InlineData(":bar:$DATA"), InlineData("::$DATA")] [PlatformSpecific(TestPlatforms.Windows)] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public void WindowsAlternateDataStream(string streamName) { DirectoryInfo testDirectory = Directory.CreateDirectory(GetTestFilePath()); @@ -326,7 +289,6 @@ public void WindowsAlternateDataStream(string streamName) InlineData(":bar"), InlineData(":bar:$DATA")] [PlatformSpecific(TestPlatforms.Windows)] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public void WindowsAlternateDataStream_OnExisting(string streamName) { DirectoryInfo testDirectory = Directory.CreateDirectory(GetTestFilePath()); diff --git a/src/System.IO.FileSystem/tests/File/Delete.cs b/src/System.IO.FileSystem/tests/File/Delete.cs index ab09b24fa016..4a82eb1fc766 100644 --- a/src/System.IO.FileSystem/tests/File/Delete.cs +++ b/src/System.IO.FileSystem/tests/File/Delete.cs @@ -190,7 +190,6 @@ public void UnixDeleteReadOnlyFile() InlineData(":bar"), InlineData(":bar:$DATA")] [PlatformSpecific(TestPlatforms.Windows)] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public void WindowsDeleteAlternateDataStream(string streamName) { FileInfo testFile = Create(GetTestFilePath()); diff --git a/src/System.IO.FileSystem/tests/File/EncryptDecrypt.cs b/src/System.IO.FileSystem/tests/File/EncryptDecrypt.cs index 149a62a799ac..9e70a1ff948a 100644 --- a/src/System.IO.FileSystem/tests/File/EncryptDecrypt.cs +++ b/src/System.IO.FileSystem/tests/File/EncryptDecrypt.cs @@ -18,7 +18,6 @@ public static void NullArg_ThrowsException() AssertExtensions.Throws("path", () => File.Decrypt(null)); } - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] [SkipOnTargetFramework(TargetFrameworkMonikers.Netcoreapp)] [Fact] public static void EncryptDecrypt_NotSupported() diff --git a/src/System.IO.FileSystem/tests/File/Exists.cs b/src/System.IO.FileSystem/tests/File/Exists.cs index 24eec6c5cb40..6eb45ad2db3b 100644 --- a/src/System.IO.FileSystem/tests/File/Exists.cs +++ b/src/System.IO.FileSystem/tests/File/Exists.cs @@ -189,24 +189,9 @@ public void DoesCaseSensitiveComparions() Assert.False(Exists(testFile.FullName.ToLowerInvariant())); } - [Theory, - MemberData(nameof(ControlWhiteSpace))] - [PlatformSpecific(TestPlatforms.Windows)] // In Windows, trailing whitespace in a path is trimmed - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)] // e.g. NetFX only - public void TrailingWhiteSpace_Trimmed(string component) - { - // On desktop, we trim a number of whitespace characters - FileInfo testFile = new FileInfo(GetTestFilePath()); - testFile.Create().Dispose(); - - // Exists calls GetFullPath() which trims trailing white space - Assert.True(Exists(testFile.FullName + component)); - } - [Theory, MemberData(nameof(NonControlWhiteSpace))] [PlatformSpecific(TestPlatforms.Windows)] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] // Not NetFX public void TrailingWhiteSpace_NotTrimmed(string component) { // In CoreFX we don't trim anything other than space (' ') diff --git a/src/System.IO.FileSystem/tests/File/GetSetAttributes.cs b/src/System.IO.FileSystem/tests/File/GetSetAttributes.cs index 7a115ad80bfd..b58ea7c4c721 100644 --- a/src/System.IO.FileSystem/tests/File/GetSetAttributes.cs +++ b/src/System.IO.FileSystem/tests/File/GetSetAttributes.cs @@ -23,7 +23,6 @@ public void GetAttributes_MissingFile(char trailingChar) InlineData(":bar"), InlineData(":bar:$DATA")] [PlatformSpecific(TestPlatforms.Windows)] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public void GetAttributes_MissingAlternateDataStream_Windows(string streamName) { string path = CreateItem(); diff --git a/src/System.IO.FileSystem/tests/File/Move.cs b/src/System.IO.FileSystem/tests/File/Move.cs index 725cc8912af8..16f4f9c81345 100644 --- a/src/System.IO.FileSystem/tests/File/Move.cs +++ b/src/System.IO.FileSystem/tests/File/Move.cs @@ -45,17 +45,6 @@ public virtual void NonExistentPath() } [Theory, MemberData(nameof(PathsWithInvalidCharacters))] - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)] - public void PathWithIllegalCharacters_Desktop(string invalidPath) - { - FileInfo testFile = new FileInfo(GetTestFilePath()); - testFile.Create().Dispose(); - - Assert.Throws(() => Move(testFile.FullName, invalidPath)); - } - - [Theory, MemberData(nameof(PathsWithInvalidCharacters))] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public void PathWithIllegalCharacters_Core(string invalidPath) { FileInfo testFile = new FileInfo(GetTestFilePath()); @@ -197,7 +186,6 @@ public void FileNameWithSignificantWhitespace() } [ConditionalFact(nameof(AreAllLongPathsAvailable))] - [ActiveIssue(32167, TargetFrameworkMonikers.NetFramework)] [PlatformSpecific(TestPlatforms.Windows)] // Path longer than max path limit public void OverMaxPathWorks_Windows() { @@ -247,27 +235,6 @@ public void LongPath() [Theory, MemberData(nameof(PathsWithInvalidColons))] [PlatformSpecific(TestPlatforms.Windows)] - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)] - public void WindowsPathWithIllegalColons_Desktop(string invalidPath) - { - FileInfo testFile = new FileInfo(GetTestFilePath()); - testFile.Create().Dispose(); - if (PathFeatures.IsUsingLegacyPathNormalization()) - { - Assert.Throws(() => Move(testFile.FullName, invalidPath)); - } - else - { - if (invalidPath.Contains('|')) - Assert.Throws(() => Move(testFile.FullName, invalidPath)); - else - Assert.Throws(() => Move(testFile.FullName, invalidPath)); - } - } - - [Theory, MemberData(nameof(PathsWithInvalidColons))] - [PlatformSpecific(TestPlatforms.Windows)] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public void WindowsPathWithIllegalColons_Core(string invalidPath) { FileInfo testFile = new FileInfo(GetTestFilePath()); @@ -277,18 +244,6 @@ public void WindowsPathWithIllegalColons_Core(string invalidPath) [Fact] [PlatformSpecific(TestPlatforms.Windows)] - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)] - public void WindowsWildCharacterPath_Desktop() - { - Assert.Throws(() => Move("*", GetTestFilePath())); - Assert.Throws(() => Move(GetTestFilePath(), "*")); - Assert.Throws(() => Move(GetTestFilePath(), "Test*t")); - Assert.Throws(() => Move(GetTestFilePath(), "*Test")); - } - - [Fact] - [PlatformSpecific(TestPlatforms.Windows)] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public void WindowsWildCharacterPath_Core() { Assert.Throws(() => Move(Path.Combine(TestDirectory, "*"), GetTestFilePath())); @@ -325,17 +280,6 @@ public void UnixWildCharacterPath() [Theory, MemberData(nameof(ControlWhiteSpace))] [PlatformSpecific(TestPlatforms.Windows)] - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)] - public void WindowsControlPath_Desktop(string whitespace) - { - FileInfo testFile = new FileInfo(GetTestFilePath()); - Assert.Throws(() => Move(testFile.FullName, whitespace)); - } - - [Theory, - MemberData(nameof(ControlWhiteSpace))] - [PlatformSpecific(TestPlatforms.Windows)] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public void WindowsControlPath_Core(string whitespace) { FileInfo testFile = new FileInfo(GetTestFilePath()); @@ -370,7 +314,6 @@ public void UnixWhitespacePath(string whitespace) InlineData("::$DATA", ":bar"), InlineData("::$DATA", ":bar:$DATA")] [PlatformSpecific(TestPlatforms.Windows)] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public void WindowsAlternateDataStreamMove(string defaultStream, string alternateStream) { DirectoryInfo testDirectory = Directory.CreateDirectory(GetTestFilePath()); diff --git a/src/System.IO.FileSystem/tests/FileInfo/Open.cs b/src/System.IO.FileSystem/tests/FileInfo/Open.cs index b9b35f51c21e..c0956eeb2903 100644 --- a/src/System.IO.FileSystem/tests/FileInfo/Open.cs +++ b/src/System.IO.FileSystem/tests/FileInfo/Open.cs @@ -14,7 +14,6 @@ protected override FileStream CreateFileStream(string path, FileMode mode) } [Theory, MemberData(nameof(StreamSpecifiers))] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "FileInfo.Open(string, filemode) on netfx always uses FileAccess.ReadWrite instead of choosing a FileAccess based on the FileMode. This bug was fixed in netcoreapp.")] public override void FileModeAppend(string streamSpecifier) { using (FileStream fs = CreateFileStream(GetTestFilePath() + streamSpecifier, FileMode.Append)) @@ -25,7 +24,6 @@ public override void FileModeAppend(string streamSpecifier) } [Theory, MemberData(nameof(StreamSpecifiers))] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "FileInfo.Open(string, filemode) on netfx always uses FileAccess.ReadWrite instead of choosing a FileAccess based on the FileMode. This bug was fixed in netcoreapp.")] public override void FileModeAppendExisting(string streamSpecifier) { string fileName = GetTestFilePath() + streamSpecifier; diff --git a/src/System.IO.FileSystem/tests/FileStream/CopyToAsync.cs b/src/System.IO.FileSystem/tests/FileStream/CopyToAsync.cs index 79917502a0f2..9bccf98cb76b 100644 --- a/src/System.IO.FileSystem/tests/FileStream/CopyToAsync.cs +++ b/src/System.IO.FileSystem/tests/FileStream/CopyToAsync.cs @@ -42,7 +42,6 @@ public void InvalidArgs_Throws(bool useAsync) [Theory] [InlineData(false)] [InlineData(true)] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "The Stream CopyToAsync fails on netcoreapp because it calls Length which checks the validity of the underlying handle. On NetFX the operation no-ops for no input or delays failure to execution for input. See /dotnet/coreclr/pull/4540.")] public void DisposeHandleThenUseFileStream_CopyToAsync(bool useAsync) { using (FileStream fs = new FileStream(GetTestFilePath(), FileMode.Create, FileAccess.ReadWrite, FileShare.None, 0x100, useAsync)) @@ -59,33 +58,6 @@ public void DisposeHandleThenUseFileStream_CopyToAsync(bool useAsync) } } - [Theory] - [InlineData(false)] - [InlineData(true)] - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework, "The Stream CopyToAsync fails on netcoreapp because it calls Length which checks the validity of the underlying handle. On NetFX the operation no-ops for no input or delays failure to execution for input. See /dotnet/coreclr/pull/4540.")] - public void DisposeHandleThenUseFileStream_CopyToAsync_netfx(bool useAsync) - { - using (FileStream fs = new FileStream(GetTestFilePath(), FileMode.Create, FileAccess.ReadWrite, FileShare.None, 0x100, useAsync)) - { - fs.SafeFileHandle.Dispose(); - fs.CopyToAsync(new MemoryStream()); - } - - using (FileStream fs = new FileStream(GetTestFilePath(), FileMode.Create, FileAccess.ReadWrite, FileShare.None, 0x100, useAsync)) - { - fs.Write(TestBuffer, 0, TestBuffer.Length); - fs.SafeFileHandle.Dispose(); - try - { - fs.CopyToAsync(new MemoryStream()).Wait(); - } - catch (AggregateException e) - { - Assert.Equal(typeof(ObjectDisposedException), e.InnerException.GetType()); - } - } - } - [Theory] [InlineData(false)] [InlineData(true)] @@ -242,7 +214,7 @@ public async Task AnonymousPipeViaFileStream_AllDataCopied(int writeSize, int nu [Theory] [InlineData(false, 10, 1024)] [InlineData(true, 10, 1024)] - [ActiveIssue(22271, TargetFrameworkMonikers.UapNotUapAot)] + [ActiveIssue(22271, TargetFrameworkMonikers.Uap)] public async Task NamedPipeViaFileStream_AllDataCopied(bool useAsync, int writeSize, int numWrites) { long totalLength = writeSize * numWrites; diff --git a/src/System.IO.FileSystem/tests/FileStream/Dispose.cs b/src/System.IO.FileSystem/tests/FileStream/Dispose.cs index ba8832439d57..47278305dd1b 100644 --- a/src/System.IO.FileSystem/tests/FileStream/Dispose.cs +++ b/src/System.IO.FileSystem/tests/FileStream/Dispose.cs @@ -113,7 +113,6 @@ public void Dispose_CallsVirtualDisposeTrueArg_ThrowsDuringFlushWriteBuffer_Disp } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Missing fix for https://github.com/dotnet/coreclr/pull/16250")] public void NoDispose_CallsVirtualDisposeFalseArg_ThrowsDuringFlushWriteBuffer_FinalizerWontThrow() { RemoteExecutor.Invoke(() => diff --git a/src/System.IO.FileSystem/tests/FileStream/IsAsync.cs b/src/System.IO.FileSystem/tests/FileStream/IsAsync.cs index 06c6b5d3763f..bbdf4fef4843 100644 --- a/src/System.IO.FileSystem/tests/FileStream/IsAsync.cs +++ b/src/System.IO.FileSystem/tests/FileStream/IsAsync.cs @@ -40,7 +40,6 @@ public void FileOptionsAsynchronousConstructorArg() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "NetFX defaults useAsync to false for the SafeFileHandle/FileAccess constructor which leads to an ArgumentException for an async handle. In netcoreapp this constructor was fixed to check the async status of the handle and use that for the useAsync value.")] public void AsyncDiscoveredFromHandle() { using (FileStream fs = new FileStream(GetTestFilePath(), FileMode.Create, FileAccess.ReadWrite, FileShare.Read, 4096, true)) diff --git a/src/System.IO.FileSystem/tests/FileStream/ReadAsync.cs b/src/System.IO.FileSystem/tests/FileStream/ReadAsync.cs index dd72d2a984ae..9d31fff66044 100644 --- a/src/System.IO.FileSystem/tests/FileStream/ReadAsync.cs +++ b/src/System.IO.FileSystem/tests/FileStream/ReadAsync.cs @@ -192,7 +192,6 @@ public async Task EmptyFileReadAsyncSucceedSynchronously() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "In netcoreapp we modified ReadAsync/WriteAsync to complete synchronously here, but that change was not backported to netfx.")] public async Task ReadAsyncBufferedCompletesSynchronously() { string fileName = GetTestFilePath(); diff --git a/src/System.IO.FileSystem/tests/FileStream/SafeFileHandle.cs b/src/System.IO.FileSystem/tests/FileStream/SafeFileHandle.cs index e95e56138903..ae5f318c0936 100644 --- a/src/System.IO.FileSystem/tests/FileStream/SafeFileHandle.cs +++ b/src/System.IO.FileSystem/tests/FileStream/SafeFileHandle.cs @@ -66,7 +66,6 @@ public async Task ThrowWhenHandlePositionIsChanged_sync() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "NetFX doesn't allow concurrent FileStream access when using overlapped IO.")] public async Task ThrowWhenHandlePositionIsChanged_async() { await ThrowWhenHandlePositionIsChanged(useAsync: true); diff --git a/src/System.IO.FileSystem/tests/FileStream/WriteAsync.cs b/src/System.IO.FileSystem/tests/FileStream/WriteAsync.cs index a80eb79fbbac..46e9a54faf86 100644 --- a/src/System.IO.FileSystem/tests/FileStream/WriteAsync.cs +++ b/src/System.IO.FileSystem/tests/FileStream/WriteAsync.cs @@ -174,7 +174,6 @@ public async Task NoopWriteAsyncsSucceed() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "In netcoreapp we modified ReadAsync/WriteAsync to complete synchronously here, but that change was not backported to netfx.")] public void WriteAsyncBufferedCompletesSynchronously() { using (FileStream fs = new FileStream( diff --git a/src/System.IO.FileSystem/tests/FileStream/ctor_sfh_fa.cs b/src/System.IO.FileSystem/tests/FileStream/ctor_sfh_fa.cs index 5a7a21d63e10..aa4c76d500da 100644 --- a/src/System.IO.FileSystem/tests/FileStream/ctor_sfh_fa.cs +++ b/src/System.IO.FileSystem/tests/FileStream/ctor_sfh_fa.cs @@ -34,7 +34,6 @@ public void InvalidAccess_Throws() } [Fact] - [ActiveIssue(20797, TargetFrameworkMonikers.NetFramework)] [ActiveIssue(31909, TargetFrameworkMonikers.Uap)] public void InvalidAccess_DoesNotCloseHandle() { @@ -149,7 +148,6 @@ public void InconsistentFileAccessThrows() public class DerivedFileStream_ctor_sfh_fa : FileSystemTest { [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "The NetFX FileStream Handle constructor calls the virtual Can*. This has been fixed in netcoreapp to instead directly check for write/read FileAccess.")] public void VirtualCanReadWrite_ShouldNotBeCalledDuringCtor() { using (var fs = File.Create(GetTestFilePath())) diff --git a/src/System.IO.FileSystem/tests/FileStream/ctor_sfh_fa_buffer.cs b/src/System.IO.FileSystem/tests/FileStream/ctor_sfh_fa_buffer.cs index 1663f0171b34..3a45478a506e 100644 --- a/src/System.IO.FileSystem/tests/FileStream/ctor_sfh_fa_buffer.cs +++ b/src/System.IO.FileSystem/tests/FileStream/ctor_sfh_fa_buffer.cs @@ -33,7 +33,6 @@ public void InvalidBufferSize_Throws(int size) } [Fact] - [ActiveIssue(20797, TargetFrameworkMonikers.NetFramework)] // This fails on desktop [ActiveIssue(31909, TargetFrameworkMonikers.Uap)] public void InvalidBufferSize_DoesNotCloseHandle() { diff --git a/src/System.IO.FileSystem/tests/FileStream/ctor_sfh_fa_buffer_async.cs b/src/System.IO.FileSystem/tests/FileStream/ctor_sfh_fa_buffer_async.cs index 8529d1e76457..f139a1dea8e9 100644 --- a/src/System.IO.FileSystem/tests/FileStream/ctor_sfh_fa_buffer_async.cs +++ b/src/System.IO.FileSystem/tests/FileStream/ctor_sfh_fa_buffer_async.cs @@ -20,7 +20,6 @@ protected virtual FileStream CreateFileStream(SafeFileHandle handle, FileAccess } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "NetFX doesn't allow concurrent FileStream access when using overlapped IO.")] public void MatchedAsync() { using (FileStream fs = new FileStream(GetTestFilePath(), FileMode.Create, FileAccess.ReadWrite, FileShare.ReadWrite | FileShare.Delete, 4096, true)) diff --git a/src/System.IO.FileSystem/tests/System.IO.FileSystem.Tests.csproj b/src/System.IO.FileSystem/tests/System.IO.FileSystem.Tests.csproj index 6ee7fdce40e7..52051709be6c 100644 --- a/src/System.IO.FileSystem/tests/System.IO.FileSystem.Tests.csproj +++ b/src/System.IO.FileSystem/tests/System.IO.FileSystem.Tests.csproj @@ -3,7 +3,7 @@ {F0D49126-6A1C-42D5-9428-4374C868BAF8} true true - netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netstandard-Unix-Debug;netstandard-Unix-Release;netstandard-Windows_NT-Debug;netstandard-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release + netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release @@ -176,7 +176,7 @@ Common\System\IO\PathFeatures.cs - + diff --git a/src/System.IO.IsolatedStorage/tests/Configurations.props b/src/System.IO.IsolatedStorage/tests/Configurations.props index 625a160ed7fd..421f137c2465 100644 --- a/src/System.IO.IsolatedStorage/tests/Configurations.props +++ b/src/System.IO.IsolatedStorage/tests/Configurations.props @@ -1,8 +1,6 @@  - netstandard-Unix; - netstandard-Windows_NT; netcoreapp-Unix; netcoreapp-Windows_NT; uap-Windows_NT; diff --git a/src/System.IO.IsolatedStorage/tests/System.IO.IsolatedStorage.Tests.csproj b/src/System.IO.IsolatedStorage/tests/System.IO.IsolatedStorage.Tests.csproj index 47f9789f98da..8867df8b3fac 100644 --- a/src/System.IO.IsolatedStorage/tests/System.IO.IsolatedStorage.Tests.csproj +++ b/src/System.IO.IsolatedStorage/tests/System.IO.IsolatedStorage.Tests.csproj @@ -1,7 +1,7 @@ {BF4F9507-8FBD-45EA-81C9-3ED89C052C91} - netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netstandard-Unix-Debug;netstandard-Unix-Release;netstandard-Windows_NT-Debug;netstandard-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release + netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release diff --git a/src/System.IO.IsolatedStorage/tests/System/IO/IsolatedStorage/ContainsUnknownFilesTests.cs b/src/System.IO.IsolatedStorage/tests/System/IO/IsolatedStorage/ContainsUnknownFilesTests.cs index 35d48996ce28..f0d3530c9ceb 100644 --- a/src/System.IO.IsolatedStorage/tests/System/IO/IsolatedStorage/ContainsUnknownFilesTests.cs +++ b/src/System.IO.IsolatedStorage/tests/System/IO/IsolatedStorage/ContainsUnknownFilesTests.cs @@ -7,14 +7,12 @@ namespace System.IO.IsolatedStorage { - [ActiveIssue(18940, TargetFrameworkMonikers.UapAot)] public class ContainsUnknownFilesTests : IsoStorageTest { private static MethodInfo s_containsUnknownFilesMethod = typeof(IsolatedStorageFile).GetMethod("ContainsUnknownFiles", BindingFlags.NonPublic | BindingFlags.Instance); [Theory, MemberData(nameof(ValidStores))] - [ActiveIssue("dotnet/corefx #18265", TargetFrameworkMonikers.NetFramework)] public void ContainsUnknownFiles_CleanStore(PresetScopes scope) { TestHelper.WipeStores(); @@ -26,7 +24,6 @@ public void ContainsUnknownFiles_CleanStore(PresetScopes scope) } [Theory, MemberData(nameof(ValidStores))] - [ActiveIssue("dotnet/corefx #18265", TargetFrameworkMonikers.NetFramework)] public void ContainsUnknownFiles_OkFiles(PresetScopes scope) { TestHelper.WipeStores(); @@ -46,7 +43,6 @@ public void ContainsUnknownFiles_OkFiles(PresetScopes scope) } [Theory, MemberData(nameof(ValidStores))] - [ActiveIssue("dotnet/corefx #18265", TargetFrameworkMonikers.NetFramework)] public void ContainsUnknownFiles_NotOkFiles(PresetScopes scope) { TestHelper.WipeStores(); @@ -69,7 +65,6 @@ public void ContainsUnknownFiles_NotOkFiles(PresetScopes scope) } [Theory, MemberData(nameof(ValidStores))] - [ActiveIssue("dotnet/corefx #18265", TargetFrameworkMonikers.NetFramework)] public void ContainsUnknownFiles_NotOkDirectory(PresetScopes scope) { TestHelper.WipeStores(); diff --git a/src/System.IO.IsolatedStorage/tests/System/IO/IsolatedStorage/CopyFileTests.cs b/src/System.IO.IsolatedStorage/tests/System/IO/IsolatedStorage/CopyFileTests.cs index d36760289c48..af771c5af158 100644 --- a/src/System.IO.IsolatedStorage/tests/System/IO/IsolatedStorage/CopyFileTests.cs +++ b/src/System.IO.IsolatedStorage/tests/System/IO/IsolatedStorage/CopyFileTests.cs @@ -6,7 +6,6 @@ namespace System.IO.IsolatedStorage { - [ActiveIssue(18940, TargetFrameworkMonikers.UapAot)] public class CopyFileTests : IsoStorageTest { [Fact] @@ -65,18 +64,6 @@ public void CopyClosedFile_ThrowsInvalidOperationException() } [Fact] - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)] - public void CopyFile_RaisesInvalidPath() - { - using (IsolatedStorageFile isf = IsolatedStorageFile.GetUserStoreForAssembly()) - { - AssertExtensions.Throws("path", null, () => isf.CopyFile("\0bad", "bar")); - AssertExtensions.Throws("path", null, () => isf.CopyFile("foo", "\0bad")); - } - } - - [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public void CopyFile_RaisesIsolatedStorageException() { using (IsolatedStorageFile isf = IsolatedStorageFile.GetUserStoreForAssembly()) @@ -96,7 +83,6 @@ public void CopyFile_DoesNotExist() } [Theory, MemberData(nameof(ValidStores))] - [ActiveIssue("dotnet/corefx #18265", TargetFrameworkMonikers.NetFramework)] public void CopyFile_CopyOver(PresetScopes scope) { TestHelper.WipeStores(); @@ -113,7 +99,6 @@ public void CopyFile_CopyOver(PresetScopes scope) } [Theory, MemberData(nameof(ValidStores))] - [ActiveIssue("dotnet/corefx #18265", TargetFrameworkMonikers.NetFramework)] public void CopyFile_CopiesFile(PresetScopes scope) { TestHelper.WipeStores(); diff --git a/src/System.IO.IsolatedStorage/tests/System/IO/IsolatedStorage/CreateDirectoryTests.cs b/src/System.IO.IsolatedStorage/tests/System/IO/IsolatedStorage/CreateDirectoryTests.cs index f8af1fe0049f..395070923af5 100644 --- a/src/System.IO.IsolatedStorage/tests/System/IO/IsolatedStorage/CreateDirectoryTests.cs +++ b/src/System.IO.IsolatedStorage/tests/System/IO/IsolatedStorage/CreateDirectoryTests.cs @@ -6,7 +6,6 @@ namespace System.IO.IsolatedStorage { - [ActiveIssue(18940, TargetFrameworkMonikers.UapAot)] public class CreateDirectoryTests : IsoStorageTest { [Fact] @@ -50,17 +49,6 @@ public void CreateClosedDirectory_ThrowsInvalidOperationException() } [Fact] - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)] - public void CreateDirectory_RaisesArgumentException() - { - using (IsolatedStorageFile isf = IsolatedStorageFile.GetUserStoreForAssembly()) - { - AssertExtensions.Throws("path", null, () => isf.CreateDirectory("\0bad")); - } - } - - [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public void CreateDirectory_IsolatedStorageException() { using (IsolatedStorageFile isf = IsolatedStorageFile.GetUserStoreForAssembly()) @@ -70,7 +58,6 @@ public void CreateDirectory_IsolatedStorageException() } [Theory, MemberData(nameof(ValidStores))] - [ActiveIssue("dotnet/corefx #18268", TargetFrameworkMonikers.NetFramework)] public void CreateDirectory_Existance(PresetScopes scope) { using (var isf = GetPresetScope(scope)) diff --git a/src/System.IO.IsolatedStorage/tests/System/IO/IsolatedStorage/CreateFileTests.cs b/src/System.IO.IsolatedStorage/tests/System/IO/IsolatedStorage/CreateFileTests.cs index e6ce4a73fc48..6e8eb9d66fcd 100644 --- a/src/System.IO.IsolatedStorage/tests/System/IO/IsolatedStorage/CreateFileTests.cs +++ b/src/System.IO.IsolatedStorage/tests/System/IO/IsolatedStorage/CreateFileTests.cs @@ -6,7 +6,6 @@ namespace System.IO.IsolatedStorage { - [ActiveIssue(18940, TargetFrameworkMonikers.UapAot)] public class CreateFileTests : IsoStorageTest { [Fact] @@ -50,17 +49,6 @@ public void CreateClosedFile_ThrowsInvalidOperationException() } [Fact] - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)] - public void CreateFile_RaisesArgumentException() - { - using (IsolatedStorageFile isf = IsolatedStorageFile.GetUserStoreForAssembly()) - { - AssertExtensions.Throws("path", null, () => isf.CreateFile("\0bad")); - } - } - - [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public void CreateFile_IsolatedStorageException() { using (IsolatedStorageFile isf = IsolatedStorageFile.GetUserStoreForAssembly()) @@ -70,7 +58,6 @@ public void CreateFile_IsolatedStorageException() } [Theory, MemberData(nameof(ValidStores))] - [ActiveIssue("dotnet/corefx #18268", TargetFrameworkMonikers.NetFramework)] public void CreateFile_Existence(PresetScopes scope) { using (var isf = GetPresetScope(scope)) diff --git a/src/System.IO.IsolatedStorage/tests/System/IO/IsolatedStorage/DeleteDirectoryTests.cs b/src/System.IO.IsolatedStorage/tests/System/IO/IsolatedStorage/DeleteDirectoryTests.cs index 9f2481aa594d..029a0d6b134d 100644 --- a/src/System.IO.IsolatedStorage/tests/System/IO/IsolatedStorage/DeleteDirectoryTests.cs +++ b/src/System.IO.IsolatedStorage/tests/System/IO/IsolatedStorage/DeleteDirectoryTests.cs @@ -6,7 +6,6 @@ namespace System.IO.IsolatedStorage { - [ActiveIssue(18940, TargetFrameworkMonikers.UapAot)] public class DeleteDirectoryTests : IsoStorageTest { [Fact] @@ -78,7 +77,6 @@ public void DeleteDirectory_DeleteNested() } [Theory, MemberData(nameof(ValidStores))] - [ActiveIssue("dotnet/corefx #18265", TargetFrameworkMonikers.NetFramework)] public void DeleteDirectory_DeletesDirectory(PresetScopes scope) { TestHelper.WipeStores(); @@ -106,7 +104,6 @@ public void DeleteDirectory_DeletesDirectory(PresetScopes scope) } [Theory, MemberData(nameof(ValidStores))] - [ActiveIssue("dotnet/corefx #18265", TargetFrameworkMonikers.NetFramework)] public void DeleteDirectory_CannotDeleteWithContent(PresetScopes scope) { TestHelper.WipeStores(); diff --git a/src/System.IO.IsolatedStorage/tests/System/IO/IsolatedStorage/DeleteFileTests.cs b/src/System.IO.IsolatedStorage/tests/System/IO/IsolatedStorage/DeleteFileTests.cs index 2bdd937ddfc3..68de8eff52be 100644 --- a/src/System.IO.IsolatedStorage/tests/System/IO/IsolatedStorage/DeleteFileTests.cs +++ b/src/System.IO.IsolatedStorage/tests/System/IO/IsolatedStorage/DeleteFileTests.cs @@ -6,7 +6,6 @@ namespace System.IO.IsolatedStorage { - [ActiveIssue(18940, TargetFrameworkMonikers.UapAot)] public class DeleteFileTests : IsoStorageTest { [Fact] @@ -59,7 +58,6 @@ public void DeleteFile_RaisesInvalidPath() } [Theory, MemberData(nameof(ValidStores))] - [ActiveIssue("dotnet/corefx #18265", TargetFrameworkMonikers.NetFramework)] public void DeleteFile_DeletesFile(PresetScopes scope) { TestHelper.WipeStores(); diff --git a/src/System.IO.IsolatedStorage/tests/System/IO/IsolatedStorage/DirectoryExistsTests.cs b/src/System.IO.IsolatedStorage/tests/System/IO/IsolatedStorage/DirectoryExistsTests.cs index 924ba8c1e563..fdfa0e439bd2 100644 --- a/src/System.IO.IsolatedStorage/tests/System/IO/IsolatedStorage/DirectoryExistsTests.cs +++ b/src/System.IO.IsolatedStorage/tests/System/IO/IsolatedStorage/DirectoryExistsTests.cs @@ -6,7 +6,6 @@ namespace System.IO.IsolatedStorage { - [ActiveIssue(18940, TargetFrameworkMonikers.UapAot)] public class DirectoryExistsTests : IsoStorageTest { [Fact] @@ -50,17 +49,6 @@ public void DirectoryExists_Closed_ThrowsInvalidOperationException() } [Fact] - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)] - public void DirectoryExists_RaisesArgumentException() - { - using (IsolatedStorageFile isf = IsolatedStorageFile.GetUserStoreForAssembly()) - { - AssertExtensions.Throws("path", null, () => isf.DirectoryExists("\0bad")); - } - } - - [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public void DirectoryExists_False() { using (IsolatedStorageFile isf = IsolatedStorageFile.GetUserStoreForAssembly()) @@ -84,7 +72,6 @@ public void DirectoryExists_Existance() [Theory] [MemberData(nameof(ValidStores))] - [ActiveIssue("dotnet/corefx #18268", TargetFrameworkMonikers.NetFramework)] public void DirectoryExists_Existance(PresetScopes scope) { using (var isf = GetPresetScope(scope)) diff --git a/src/System.IO.IsolatedStorage/tests/System/IO/IsolatedStorage/FileExistsTests.cs b/src/System.IO.IsolatedStorage/tests/System/IO/IsolatedStorage/FileExistsTests.cs index 48024520352c..f704cb6c8434 100644 --- a/src/System.IO.IsolatedStorage/tests/System/IO/IsolatedStorage/FileExistsTests.cs +++ b/src/System.IO.IsolatedStorage/tests/System/IO/IsolatedStorage/FileExistsTests.cs @@ -6,7 +6,6 @@ namespace System.IO.IsolatedStorage { - [ActiveIssue(18940, TargetFrameworkMonikers.UapAot)] public class FileExistsTests : IsoStorageTest { [Fact] @@ -50,17 +49,6 @@ public void FileExists_Closed_ThrowsInvalidOperationException() } [Fact] - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)] - public void FileExists_RaisesArgumentException() - { - using (IsolatedStorageFile isf = IsolatedStorageFile.GetUserStoreForAssembly()) - { - AssertExtensions.Throws("path", null, () => isf.FileExists("\0bad")); - } - } - - [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public void FileExists_False() { using (IsolatedStorageFile isf = IsolatedStorageFile.GetUserStoreForAssembly()) @@ -71,7 +59,6 @@ public void FileExists_False() [Theory] [MemberData(nameof(ValidStores))] - [ActiveIssue("dotnet/corefx #18268", TargetFrameworkMonikers.NetFramework)] public void FileExists_Existance(PresetScopes scope) { using (var isf = GetPresetScope(scope)) diff --git a/src/System.IO.IsolatedStorage/tests/System/IO/IsolatedStorage/GetCreationTimeTests.cs b/src/System.IO.IsolatedStorage/tests/System/IO/IsolatedStorage/GetCreationTimeTests.cs index 9e463854fd37..cb97dd6fdfc8 100644 --- a/src/System.IO.IsolatedStorage/tests/System/IO/IsolatedStorage/GetCreationTimeTests.cs +++ b/src/System.IO.IsolatedStorage/tests/System/IO/IsolatedStorage/GetCreationTimeTests.cs @@ -6,7 +6,6 @@ namespace System.IO.IsolatedStorage { - [ActiveIssue(18940, TargetFrameworkMonikers.UapAot)] public class GetCreationTimeTests : IsoStorageTest { [Fact] @@ -80,7 +79,6 @@ public void GetCreationTime_GetsTime_Unix() [Fact] [PlatformSpecific(TestPlatforms.Windows | TestPlatforms.OSX)] // Filesystem timestamps vary in granularity - [ActiveIssue("dotnet/corefx #18265", TargetFrameworkMonikers.NetFramework)] public void GetCreationTime_GetsTime_Windows_OSX() { using (IsolatedStorageFile isf = IsolatedStorageFile.GetUserStoreForAssembly()) diff --git a/src/System.IO.IsolatedStorage/tests/System/IO/IsolatedStorage/GetFileNamesTests.cs b/src/System.IO.IsolatedStorage/tests/System/IO/IsolatedStorage/GetFileNamesTests.cs index 1a7cab8d56b1..6c7030869062 100644 --- a/src/System.IO.IsolatedStorage/tests/System/IO/IsolatedStorage/GetFileNamesTests.cs +++ b/src/System.IO.IsolatedStorage/tests/System/IO/IsolatedStorage/GetFileNamesTests.cs @@ -8,11 +8,9 @@ namespace System.IO.IsolatedStorage { - [ActiveIssue(18940, TargetFrameworkMonikers.UapAot)] public class GetFileNamesTests : IsoStorageTest { [Fact] - [ActiveIssue("dotnet/corefx #18268", TargetFrameworkMonikers.NetFramework)] public void GetFileNames_ThrowsArgumentNull() { using (var isf = IsolatedStorageFile.GetUserStoreForApplication()) @@ -54,7 +52,6 @@ public void GetFileNames_Closed_ThrowsInvalidOperationException() [Fact] [ActiveIssue(25428, TestPlatforms.AnyUnix)] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public void GetFileNames_RaisesInvalidPath_Core() { // We are no longer as aggressive with filters for enumerating files @@ -64,18 +61,7 @@ public void GetFileNames_RaisesInvalidPath_Core() } } - [Fact] - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)] - public void GetFileNames_RaisesInvalidPath_Desktop() - { - using (IsolatedStorageFile isf = IsolatedStorageFile.GetUserStoreForAssembly()) - { - AssertExtensions.Throws("path", null, () => isf.GetFileNames("\0bad")); - } - } - [Theory, MemberData(nameof(ValidStores))] - [ActiveIssue("dotnet/corefx #18265", TargetFrameworkMonikers.NetFramework)] public void GetFileNames_GetsFileNames(PresetScopes scope) { TestHelper.WipeStores(); diff --git a/src/System.IO.IsolatedStorage/tests/System/IO/IsolatedStorage/GetLastAccessTimeTests.cs b/src/System.IO.IsolatedStorage/tests/System/IO/IsolatedStorage/GetLastAccessTimeTests.cs index 11adaef2bab0..db2732b7026f 100644 --- a/src/System.IO.IsolatedStorage/tests/System/IO/IsolatedStorage/GetLastAccessTimeTests.cs +++ b/src/System.IO.IsolatedStorage/tests/System/IO/IsolatedStorage/GetLastAccessTimeTests.cs @@ -6,7 +6,6 @@ namespace System.IO.IsolatedStorage { - [ActiveIssue(18940, TargetFrameworkMonikers.UapAot)] public class GetLastAccessTimeTests : IsoStorageTest { [Fact] @@ -59,7 +58,6 @@ public void GetLastAccessTime_RaisesArgumentException() } [Fact] - [ActiveIssue("dotnet/corefx #18265", TargetFrameworkMonikers.NetFramework)] public void GetLastAccessTime_GetsTime() { using (IsolatedStorageFile isf = IsolatedStorageFile.GetUserStoreForAssembly()) diff --git a/src/System.IO.IsolatedStorage/tests/System/IO/IsolatedStorage/GetLastWriteTimeTests.cs b/src/System.IO.IsolatedStorage/tests/System/IO/IsolatedStorage/GetLastWriteTimeTests.cs index 1e355d30c4a2..fb0f9b567f98 100644 --- a/src/System.IO.IsolatedStorage/tests/System/IO/IsolatedStorage/GetLastWriteTimeTests.cs +++ b/src/System.IO.IsolatedStorage/tests/System/IO/IsolatedStorage/GetLastWriteTimeTests.cs @@ -6,7 +6,6 @@ namespace System.IO.IsolatedStorage { - [ActiveIssue(18940, TargetFrameworkMonikers.UapAot)] public class GetLastWriteTimeTests : IsoStorageTest { [Fact] @@ -59,7 +58,6 @@ public void GetLastWriteTime_RaisesArgumentException() } [Fact] - [ActiveIssue("dotnet/corefx #18265", TargetFrameworkMonikers.NetFramework)] public void GetLastWriteTime_GetsTime() { using (IsolatedStorageFile isf = IsolatedStorageFile.GetUserStoreForAssembly()) diff --git a/src/System.IO.IsolatedStorage/tests/System/IO/IsolatedStorage/GetStoreTests.cs b/src/System.IO.IsolatedStorage/tests/System/IO/IsolatedStorage/GetStoreTests.cs index b9bbb621c9b1..eec343f65053 100644 --- a/src/System.IO.IsolatedStorage/tests/System/IO/IsolatedStorage/GetStoreTests.cs +++ b/src/System.IO.IsolatedStorage/tests/System/IO/IsolatedStorage/GetStoreTests.cs @@ -8,7 +8,6 @@ namespace System.IO.IsolatedStorage { - [ActiveIssue(18940, TargetFrameworkMonikers.UapAot)] public class GetStoreTests : IsoStorageTest { private static MethodInfo s_verifyScopeMethod; @@ -50,7 +49,6 @@ public void GetUserStoreForSite_ThrowsNotSupported() } [Fact] - [ActiveIssue("dotnet/corefx #18268", TargetFrameworkMonikers.NetFramework)] public void GetUserStoreForApplication() { var isf = IsolatedStorageFile.GetUserStoreForApplication(); @@ -65,7 +63,6 @@ private void VerifyApplicationStore(IsolatedStorageFile isf) } [Fact] - [ActiveIssue("dotnet/corefx #18265", TargetFrameworkMonikers.NetFramework)] public void GetUserStoreForAssembly() { var isf = IsolatedStorageFile.GetUserStoreForAssembly(); @@ -75,7 +72,6 @@ public void GetUserStoreForAssembly() } [Fact] - [ActiveIssue("dotnet/corefx #18265", TargetFrameworkMonikers.NetFramework)] public void GetUserStoreForDomain() { var isf = IsolatedStorageFile.GetUserStoreForDomain(); @@ -85,7 +81,6 @@ public void GetUserStoreForDomain() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public void GetStore_ThrowsPlatformNotSupported() { Assert.Throws(() => IsolatedStorageFile.GetStore(IsolatedStorageScope.User, typeof(object))); @@ -95,7 +90,6 @@ public void GetStore_ThrowsPlatformNotSupported() } [Fact] - [ActiveIssue("dotnet/corefx #18268", TargetFrameworkMonikers.NetFramework)] public void GetStore_NullParamsAllowed() { VerifyApplicationStore(IsolatedStorageFile.GetStore(IsolatedStorageScope.User | IsolatedStorageScope.Application, (Type)null)); @@ -105,7 +99,6 @@ public void GetStore_NullParamsAllowed() } [Fact] - [ActiveIssue("dotnet/corefx #18269", TargetFrameworkMonikers.NetFramework)] public void GetEnumerator_NoOp() { IEnumerator e = IsolatedStorageFile.GetEnumerator(IsolatedStorageScope.Assembly); @@ -116,7 +109,6 @@ public void GetEnumerator_NoOp() } [Fact] - [ActiveIssue("dotnet/corefx #18269", TargetFrameworkMonikers.NetFramework)] public void GetEnumerator_ThrowsForCurrent() { IEnumerator e = IsolatedStorageFile.GetEnumerator(IsolatedStorageScope.Assembly); diff --git a/src/System.IO.IsolatedStorage/tests/System/IO/IsolatedStorage/HelperTests.cs b/src/System.IO.IsolatedStorage/tests/System/IO/IsolatedStorage/HelperTests.cs index 1709c51a9195..ca480eb9d5fe 100644 --- a/src/System.IO.IsolatedStorage/tests/System/IO/IsolatedStorage/HelperTests.cs +++ b/src/System.IO.IsolatedStorage/tests/System/IO/IsolatedStorage/HelperTests.cs @@ -7,8 +7,6 @@ namespace System.IO.IsolatedStorage.Tests { - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, - "These are unit tests for the CoreFX implementation and don't apply to NetFX.")] public partial class HelperTests { [Fact] diff --git a/src/System.IO.IsolatedStorage/tests/System/IO/IsolatedStorage/IdentityTests.cs b/src/System.IO.IsolatedStorage/tests/System/IO/IsolatedStorage/IdentityTests.cs index 02513cf4e7e5..725ebf568a73 100644 --- a/src/System.IO.IsolatedStorage/tests/System/IO/IsolatedStorage/IdentityTests.cs +++ b/src/System.IO.IsolatedStorage/tests/System/IO/IsolatedStorage/IdentityTests.cs @@ -6,7 +6,6 @@ namespace System.IO.IsolatedStorage { - [ActiveIssue(18940, TargetFrameworkMonikers.UapAot)] public class IdentityTests : IsoStorageTest { private class TestStorage : IsolatedStorage diff --git a/src/System.IO.IsolatedStorage/tests/System/IO/IsolatedStorage/IsoStorageTest.cs b/src/System.IO.IsolatedStorage/tests/System/IO/IsolatedStorage/IsoStorageTest.cs index 7c401c00d6dc..856092e90d6d 100644 --- a/src/System.IO.IsolatedStorage/tests/System/IO/IsolatedStorage/IsoStorageTest.cs +++ b/src/System.IO.IsolatedStorage/tests/System/IO/IsolatedStorage/IsoStorageTest.cs @@ -11,7 +11,6 @@ namespace System.IO.IsolatedStorage // We put the tests in the "Store collection" to get them to pick up the StoreTestsFixture. This will run the fixture // at the start and end of the collection, cleaning the test environment. [Collection("Store collection")] - [ActiveIssue(18940, TargetFrameworkMonikers.UapAot)] public class IsoStorageTest { public static IEnumerable ValidScopes diff --git a/src/System.IO.IsolatedStorage/tests/System/IO/IsolatedStorage/IsolatedStorageBaseClassTests.cs b/src/System.IO.IsolatedStorage/tests/System/IO/IsolatedStorage/IsolatedStorageBaseClassTests.cs index 8bc6ff73e544..6b442054153b 100644 --- a/src/System.IO.IsolatedStorage/tests/System/IO/IsolatedStorage/IsolatedStorageBaseClassTests.cs +++ b/src/System.IO.IsolatedStorage/tests/System/IO/IsolatedStorage/IsolatedStorageBaseClassTests.cs @@ -7,7 +7,6 @@ namespace System.IO.IsolatedStorage { // Test default IsolatedStorage base class behaviors - [ActiveIssue(18940, TargetFrameworkMonikers.UapAot)] public class IsolatedStorageBaseClassTests : IsoStorageTest { private class TestStorage : IsolatedStorage diff --git a/src/System.IO.IsolatedStorage/tests/System/IO/IsolatedStorage/IsolatedStorageFileStreamTests.netcoreapp.cs b/src/System.IO.IsolatedStorage/tests/System/IO/IsolatedStorage/IsolatedStorageFileStreamTests.netcoreapp.cs index 02b61785f477..66b2d789d67e 100644 --- a/src/System.IO.IsolatedStorage/tests/System/IO/IsolatedStorage/IsolatedStorageFileStreamTests.netcoreapp.cs +++ b/src/System.IO.IsolatedStorage/tests/System/IO/IsolatedStorage/IsolatedStorageFileStreamTests.netcoreapp.cs @@ -7,7 +7,6 @@ namespace System.IO.IsolatedStorage { - [ActiveIssue(18940, TargetFrameworkMonikers.UapAot)] public partial class IsolatedStorageFileStreamTests : IsoStorageTest { [Theory, MemberData(nameof(ValidStores))] diff --git a/src/System.IO.IsolatedStorage/tests/System/IO/IsolatedStorage/MoveDirectoryTests.cs b/src/System.IO.IsolatedStorage/tests/System/IO/IsolatedStorage/MoveDirectoryTests.cs index 762fe2be1da7..2d375a34ed90 100644 --- a/src/System.IO.IsolatedStorage/tests/System/IO/IsolatedStorage/MoveDirectoryTests.cs +++ b/src/System.IO.IsolatedStorage/tests/System/IO/IsolatedStorage/MoveDirectoryTests.cs @@ -6,7 +6,6 @@ namespace System.IO.IsolatedStorage { - [ActiveIssue(18940, TargetFrameworkMonikers.UapAot)] public class MoveDirectoryTests : IsoStorageTest { [Fact] @@ -61,18 +60,6 @@ public void MoveDirectory_Closed_ThrowsInvalidOperationException() } [Fact] - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)] - public void MoveDirectory_RaisesInvalidPath() - { - using (IsolatedStorageFile isf = IsolatedStorageFile.GetUserStoreForAssembly()) - { - AssertExtensions.Throws("path", null, () => isf.MoveDirectory("\0bad", "bar")); - AssertExtensions.Throws("path", null, () => isf.MoveDirectory("foo", "\0bad")); - } - } - - [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public void MoveDirectory_IsolatedStorageException() { using (IsolatedStorageFile isf = IsolatedStorageFile.GetUserStoreForAssembly()) @@ -92,7 +79,6 @@ public void MoveDirectory_DoesNotExist() } [Theory, MemberData(nameof(ValidStores))] - [ActiveIssue("dotnet/corefx #18265", TargetFrameworkMonikers.NetFramework)] public void MoveDirectory_MoveOver(PresetScopes scope) { TestHelper.WipeStores(); @@ -106,7 +92,6 @@ public void MoveDirectory_MoveOver(PresetScopes scope) } [Theory, MemberData(nameof(ValidStores))] - [ActiveIssue("dotnet/corefx #18265", TargetFrameworkMonikers.NetFramework)] public void MoveDirectory_MovesDirectory(PresetScopes scope) { TestHelper.WipeStores(); diff --git a/src/System.IO.IsolatedStorage/tests/System/IO/IsolatedStorage/MoveFileTests.cs b/src/System.IO.IsolatedStorage/tests/System/IO/IsolatedStorage/MoveFileTests.cs index 13854f72ed61..c3b730020473 100644 --- a/src/System.IO.IsolatedStorage/tests/System/IO/IsolatedStorage/MoveFileTests.cs +++ b/src/System.IO.IsolatedStorage/tests/System/IO/IsolatedStorage/MoveFileTests.cs @@ -7,7 +7,6 @@ namespace System.IO.IsolatedStorage { - [ActiveIssue(18940, TargetFrameworkMonikers.UapAot)] public class MoveFileTests : IsoStorageTest { [Fact] @@ -62,18 +61,6 @@ public void MoveFile_Closed_ThrowsInvalidOperationException() } [Fact] - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)] - public void MoveFile_RaisesInvalidPath() - { - using (IsolatedStorageFile isf = IsolatedStorageFile.GetUserStoreForAssembly()) - { - AssertExtensions.Throws("path", null, () => isf.MoveFile("\0bad", "bar")); - AssertExtensions.Throws("path", null, () => isf.MoveFile("foo", "\0bad")); - } - } - - [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public void MoveFile_RaisesIsolatedStorageException() { using (IsolatedStorageFile isf = IsolatedStorageFile.GetUserStoreForAssembly()) @@ -93,7 +80,6 @@ public void MoveFile_DoesNotExist() } [Theory, MemberData(nameof(ValidStores))] - [ActiveIssue("dotnet/corefx #18265", TargetFrameworkMonikers.NetFramework)] public void MoveFile_MoveOver(PresetScopes scope) { TestHelper.WipeStores(); @@ -107,7 +93,6 @@ public void MoveFile_MoveOver(PresetScopes scope) } [Theory, MemberData(nameof(ValidStores))] - [ActiveIssue("dotnet/corefx #18265", TargetFrameworkMonikers.NetFramework)] public void MoveFile_MovesFile(PresetScopes scope) { TestHelper.WipeStores(); diff --git a/src/System.IO.IsolatedStorage/tests/System/IO/IsolatedStorage/OpenFileTests.cs b/src/System.IO.IsolatedStorage/tests/System/IO/IsolatedStorage/OpenFileTests.cs index 9514d17d28d2..04aa0c97e440 100644 --- a/src/System.IO.IsolatedStorage/tests/System/IO/IsolatedStorage/OpenFileTests.cs +++ b/src/System.IO.IsolatedStorage/tests/System/IO/IsolatedStorage/OpenFileTests.cs @@ -6,7 +6,6 @@ namespace System.IO.IsolatedStorage { - [ActiveIssue(18940, TargetFrameworkMonikers.UapAot)] public class OpenFileTests : IsoStorageTest { [Fact] @@ -58,19 +57,6 @@ public void OpenFile_Closed_ThrowsInvalidOperationException() } [Fact] - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)] - public void OpenFile_RaisesArgumentException() - { - using (IsolatedStorageFile isf = IsolatedStorageFile.GetUserStoreForAssembly()) - { - AssertExtensions.Throws("path", null, () => isf.OpenFile("\0bad", FileMode.Create)); - AssertExtensions.Throws("path", null, () => isf.OpenFile("\0bad", FileMode.Create, FileAccess.ReadWrite)); - AssertExtensions.Throws("path", null, () => isf.OpenFile("\0bad", FileMode.Create, FileAccess.ReadWrite, FileShare.ReadWrite)); - } - } - - [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public void OpenFile_RaisesIsolatedStorageException() { using (IsolatedStorageFile isf = IsolatedStorageFile.GetUserStoreForAssembly()) @@ -82,7 +68,6 @@ public void OpenFile_RaisesIsolatedStorageException() } [Fact] - [ActiveIssue("dotnet/corefx #18265", TargetFrameworkMonikers.NetFramework)] public void OpenFile_PassesFileShare() { TestHelper.WipeStores(); @@ -105,7 +90,6 @@ public void OpenFile_PassesFileShare() } [Fact] - [ActiveIssue("dotnet/corefx #18265", TargetFrameworkMonikers.NetFramework)] public void OpenFile_PassesFileAccess() { TestHelper.WipeStores(); @@ -128,7 +112,6 @@ public void OpenFile_PassesFileAccess() } [Fact] - [ActiveIssue("dotnet/corefx #18265", TargetFrameworkMonikers.NetFramework)] public void OpenFile_PassesFileMode() { TestHelper.WipeStores(); @@ -145,7 +128,6 @@ public void OpenFile_PassesFileMode() } [Theory, MemberData(nameof(ValidStores))] - [ActiveIssue("dotnet/corefx #18265", TargetFrameworkMonikers.NetFramework)] public void OpenFile_Existence(PresetScopes scope) { TestHelper.WipeStores(); diff --git a/src/System.IO.IsolatedStorage/tests/System/IO/IsolatedStorage/RemoveTests.cs b/src/System.IO.IsolatedStorage/tests/System/IO/IsolatedStorage/RemoveTests.cs index dae0afb8e89c..2a7f9131d9b2 100644 --- a/src/System.IO.IsolatedStorage/tests/System/IO/IsolatedStorage/RemoveTests.cs +++ b/src/System.IO.IsolatedStorage/tests/System/IO/IsolatedStorage/RemoveTests.cs @@ -6,11 +6,9 @@ namespace System.IO.IsolatedStorage { - [ActiveIssue(18940, TargetFrameworkMonikers.UapAot)] public class RemoveTests : IsoStorageTest { [Fact] - [ActiveIssue("dotnet/corefx #18265", TargetFrameworkMonikers.NetFramework)] public void RemoveUserStoreForApplication() { TestHelper.WipeStores(); @@ -26,7 +24,6 @@ public void RemoveUserStoreForApplication() } [Fact] - [ActiveIssue("dotnet/corefx #18265", TargetFrameworkMonikers.NetFramework)] public void RemoveUserStoreForAssembly() { TestHelper.WipeStores(); @@ -42,7 +39,6 @@ public void RemoveUserStoreForAssembly() } [Fact] - [ActiveIssue("dotnet/corefx #18265", TargetFrameworkMonikers.NetFramework)] public void RemoveUserStoreForDomain() { TestHelper.WipeStores(); @@ -60,7 +56,6 @@ public void RemoveUserStoreForDomain() } [Theory, MemberData(nameof(ValidStores))] - [ActiveIssue("dotnet/corefx #18265", TargetFrameworkMonikers.NetFramework)] public void RemoveStoreWithContent(PresetScopes scope) { TestHelper.WipeStores(); diff --git a/src/System.IO.MemoryMappedFiles/tests/Configurations.props b/src/System.IO.MemoryMappedFiles/tests/Configurations.props index 247bd2149786..421f137c2465 100644 --- a/src/System.IO.MemoryMappedFiles/tests/Configurations.props +++ b/src/System.IO.MemoryMappedFiles/tests/Configurations.props @@ -1,8 +1,9 @@  - netstandard-Unix; - netstandard-Windows_NT; + netcoreapp-Unix; + netcoreapp-Windows_NT; + uap-Windows_NT; \ No newline at end of file diff --git a/src/System.IO.MemoryMappedFiles/tests/MemoryMappedFile.CreateFromFile.Tests.cs b/src/System.IO.MemoryMappedFiles/tests/MemoryMappedFile.CreateFromFile.Tests.cs index c14ce8750bcb..7c699d331468 100644 --- a/src/System.IO.MemoryMappedFiles/tests/MemoryMappedFile.CreateFromFile.Tests.cs +++ b/src/System.IO.MemoryMappedFiles/tests/MemoryMappedFile.CreateFromFile.Tests.cs @@ -626,7 +626,6 @@ public void FileInUse_CreateFromFile_FailsWithExistingNoShareFile() /// Test to validate we can create multiple concurrent read-only maps from the same file path. /// [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "On netfx, the MMF.CreateFromFile default FileShare is None. We intentionally changed it in netcoreapp in #6092.")] public void FileInUse_CreateFromFile_SucceedsWithReadOnly() { const int Capacity = 4096; @@ -647,7 +646,6 @@ public void FileInUse_CreateFromFile_SucceedsWithReadOnly() [Theory] [InlineData(MemoryMappedFileAccess.ReadExecute)] [InlineData(MemoryMappedFileAccess.ReadWriteExecute)] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "CreateFromFile in desktop uses FileStream's ctor that takes a FileSystemRights in order to specify execute privileges.")] public void FileNotOpenedForExecute(MemoryMappedFileAccess access) { using (TempFile file = new TempFile(GetTestFilePath(), 4096)) @@ -700,19 +698,11 @@ public void WriteToReadOnlyFile_ReadWrite(MemoryMappedFileAccess access) } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "CreateFromFile in desktop uses FileStream's ctor that takes a FileSystemRights in order to specify execute privileges.")] public void WriteToReadOnlyFile_CopyOnWrite() { WriteToReadOnlyFile(MemoryMappedFileAccess.CopyOnWrite, (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows) && geteuid() == 0)); } - [Fact] - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework, "CreateFromFile in desktop uses FileStream's ctor that takes a FileSystemRights in order to specify execute privileges.")] - public void WriteToReadOnlyFile_CopyOnWrite_netfx() - { - WriteToReadOnlyFile(MemoryMappedFileAccess.CopyOnWrite, succeeds: true); - } - /// /// Test to ensure that leaveOpen is appropriately respected, either leaving the FileStream open /// or closing it on disposal. diff --git a/src/System.IO.MemoryMappedFiles/tests/System.IO.MemoryMappedFiles.Tests.csproj b/src/System.IO.MemoryMappedFiles/tests/System.IO.MemoryMappedFiles.Tests.csproj index 9f2872679efe..1890677e1e4e 100644 --- a/src/System.IO.MemoryMappedFiles/tests/System.IO.MemoryMappedFiles.Tests.csproj +++ b/src/System.IO.MemoryMappedFiles/tests/System.IO.MemoryMappedFiles.Tests.csproj @@ -3,7 +3,7 @@ {9D6F6254-B5A3-40FF-8925-68AA8D1CE933} true true - netstandard-Unix-Debug;netstandard-Unix-Release;netstandard-Windows_NT-Debug;netstandard-Windows_NT-Release + netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release diff --git a/src/System.IO.Packaging/tests/Configurations.props b/src/System.IO.Packaging/tests/Configurations.props index ff0d415e4593..b0ad9a4c0cfe 100644 --- a/src/System.IO.Packaging/tests/Configurations.props +++ b/src/System.IO.Packaging/tests/Configurations.props @@ -1,7 +1,9 @@  - netstandard; + netcoreapp; + netfx; + uap; \ No newline at end of file diff --git a/src/System.IO.Packaging/tests/System.IO.Packaging.Tests.csproj b/src/System.IO.Packaging/tests/System.IO.Packaging.Tests.csproj index bb45daedae73..f65cc6a7f731 100644 --- a/src/System.IO.Packaging/tests/System.IO.Packaging.Tests.csproj +++ b/src/System.IO.Packaging/tests/System.IO.Packaging.Tests.csproj @@ -1,7 +1,7 @@ {C92FF1A4-DEA1-4F0F-9AEB-94C9B2561B57} - netstandard-Debug;netstandard-Release + netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release;uap-Debug;uap-Release diff --git a/src/System.IO.Pipelines/tests/Configurations.props b/src/System.IO.Pipelines/tests/Configurations.props index 04ae535c9867..ca416265e0d6 100644 --- a/src/System.IO.Pipelines/tests/Configurations.props +++ b/src/System.IO.Pipelines/tests/Configurations.props @@ -2,7 +2,8 @@ netcoreapp; - netstandard; + netfx; + uap; diff --git a/src/System.IO.Pipelines/tests/Infrastructure/CancelledReadsStream.cs b/src/System.IO.Pipelines/tests/Infrastructure/CancelledReadsStream.cs index 0cb05479f7be..b4e703f01ec6 100644 --- a/src/System.IO.Pipelines/tests/Infrastructure/CancelledReadsStream.cs +++ b/src/System.IO.Pipelines/tests/Infrastructure/CancelledReadsStream.cs @@ -25,7 +25,7 @@ public override async Task ReadAsync(byte[] buffer, int offset, int count, return 0; } -#if !netstandard +#if netcoreapp public override async ValueTask ReadAsync(Memory buffer, CancellationToken cancellationToken = default) { await WaitForReadTask.Task; diff --git a/src/System.IO.Pipelines/tests/Infrastructure/CancelledWritesStream.cs b/src/System.IO.Pipelines/tests/Infrastructure/CancelledWritesStream.cs index c54933e8ad6b..551452cf4e54 100644 --- a/src/System.IO.Pipelines/tests/Infrastructure/CancelledWritesStream.cs +++ b/src/System.IO.Pipelines/tests/Infrastructure/CancelledWritesStream.cs @@ -25,7 +25,7 @@ public override async Task WriteAsync(byte[] buffer, int offset, int count, Canc cancellationToken.ThrowIfCancellationRequested(); } -#if !netstandard +#if netcoreapp public override async ValueTask WriteAsync(ReadOnlyMemory buffer, CancellationToken cancellationToken = default) { await WaitForWriteTask.Task; diff --git a/src/System.IO.Pipelines/tests/Infrastructure/ThrowAfterNWritesStream.cs b/src/System.IO.Pipelines/tests/Infrastructure/ThrowAfterNWritesStream.cs index 09ffe1018048..fab150bfb3c4 100644 --- a/src/System.IO.Pipelines/tests/Infrastructure/ThrowAfterNWritesStream.cs +++ b/src/System.IO.Pipelines/tests/Infrastructure/ThrowAfterNWritesStream.cs @@ -34,7 +34,7 @@ public override Task WriteAsync(byte[] buffer, int offset, int count, Cancellati return Task.CompletedTask; } -#if !netstandard +#if netcoreapp public override ValueTask WriteAsync(ReadOnlyMemory buffer, CancellationToken cancellationToken = default) { if (_writes >= _maxWrites) diff --git a/src/System.IO.Pipelines/tests/StreamPipeReaderTests.cs b/src/System.IO.Pipelines/tests/StreamPipeReaderTests.cs index 1bc60321eba2..fd0d658d872a 100644 --- a/src/System.IO.Pipelines/tests/StreamPipeReaderTests.cs +++ b/src/System.IO.Pipelines/tests/StreamPipeReaderTests.cs @@ -583,7 +583,7 @@ public override async Task ReadAsync(byte[] buffer, int offset, int count, return bytes; } -#if !netstandard +#if netcoreapp public override async ValueTask ReadAsync(Memory destination, CancellationToken cancellationToken = default) { if (_throwOnNextCallToRead) diff --git a/src/System.IO.Pipelines/tests/System.IO.Pipelines.Tests.csproj b/src/System.IO.Pipelines/tests/System.IO.Pipelines.Tests.csproj index 64f22a5d44d7..2c2b9405f98c 100644 --- a/src/System.IO.Pipelines/tests/System.IO.Pipelines.Tests.csproj +++ b/src/System.IO.Pipelines/tests/System.IO.Pipelines.Tests.csproj @@ -2,9 +2,9 @@ {9E984EB2-827E-4029-9647-FB5F8B67C553} true - netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release + netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release;uap-Debug;uap-Release - + @@ -40,7 +40,7 @@ - + diff --git a/src/System.IO.Pipes.AccessControl/tests/NamedPipeTests/NamedPipeTest.AclExtensions.cs b/src/System.IO.Pipes.AccessControl/tests/NamedPipeTests/NamedPipeTest.AclExtensions.cs index aedc5d3a23bb..26ff70b353f3 100644 --- a/src/System.IO.Pipes.AccessControl/tests/NamedPipeTests/NamedPipeTest.AclExtensions.cs +++ b/src/System.IO.Pipes.AccessControl/tests/NamedPipeTests/NamedPipeTest.AclExtensions.cs @@ -28,7 +28,7 @@ protected override ServerClientPair CreateServerClientPair() } [Fact] - [ActiveIssue(22271, TargetFrameworkMonikers.UapNotUapAot)] + [ActiveIssue(22271, TargetFrameworkMonikers.Uap)] public void SetAccessControl_NamedPipeStream() { string pipeName = GetUniquePipeName(); @@ -60,7 +60,7 @@ public void SetAccessControl_NamedPipeStream_BeforeWaitingToConnect() } [Fact] - [ActiveIssue(22271, TargetFrameworkMonikers.UapNotUapAot)] + [ActiveIssue(22271, TargetFrameworkMonikers.Uap)] public void SetAccessControl_NamedPipeStream_ClientDisposed() { string pipeName = GetUniquePipeName(); @@ -81,7 +81,7 @@ public void SetAccessControl_NamedPipeStream_ClientDisposed() } [Fact] - [ActiveIssue(22271, TargetFrameworkMonikers.UapNotUapAot)] + [ActiveIssue(22271, TargetFrameworkMonikers.Uap)] public void SetAccessControl_NamedPipeStream_ClientHandleClosed() { string pipeName = GetUniquePipeName(); @@ -102,7 +102,7 @@ public void SetAccessControl_NamedPipeStream_ClientHandleClosed() } [Fact] - [ActiveIssue(22271, TargetFrameworkMonikers.UapNotUapAot)] + [ActiveIssue(22271, TargetFrameworkMonikers.Uap)] public void SetAccessControl_NamedPipeStream_ServerDisconnected() { string pipeName = GetUniquePipeName(); @@ -123,7 +123,7 @@ public void SetAccessControl_NamedPipeStream_ServerDisconnected() } [Fact] - [ActiveIssue(22271, TargetFrameworkMonikers.UapNotUapAot)] + [ActiveIssue(22271, TargetFrameworkMonikers.Uap)] public void SetAccessControl_NamedPipeStream_ServerDisposed() { string pipeName = GetUniquePipeName(); @@ -144,7 +144,7 @@ public void SetAccessControl_NamedPipeStream_ServerDisposed() } [Fact] - [ActiveIssue(22271, TargetFrameworkMonikers.UapNotUapAot)] + [ActiveIssue(22271, TargetFrameworkMonikers.Uap)] public void SetAccessControl_NamedPipeStream_ServerHandleClosed() { string pipeName = GetUniquePipeName(); diff --git a/src/System.IO.Pipes.AccessControl/tests/PipeTest.AclExtensions.cs b/src/System.IO.Pipes.AccessControl/tests/PipeTest.AclExtensions.cs index 8ea103aae3f9..33bb997b2a56 100644 --- a/src/System.IO.Pipes.AccessControl/tests/PipeTest.AclExtensions.cs +++ b/src/System.IO.Pipes.AccessControl/tests/PipeTest.AclExtensions.cs @@ -15,7 +15,7 @@ public void GetAccessControl_NullPipeStream() } [Fact] - [ActiveIssue(22271, TargetFrameworkMonikers.UapNotUapAot)] + [ActiveIssue(22271, TargetFrameworkMonikers.Uap)] public void GetAccessControl_DisposedStream() { using (var pair = CreateServerClientPair()) @@ -29,7 +29,7 @@ public void GetAccessControl_DisposedStream() } [Fact] - [ActiveIssue(22271, TargetFrameworkMonikers.UapNotUapAot)] + [ActiveIssue(22271, TargetFrameworkMonikers.Uap)] public void GetAccessControl_ConnectedStream() { using (var pair = CreateServerClientPair()) @@ -46,7 +46,7 @@ public void SetAccessControl_NullPipeStream() } [Fact] - [ActiveIssue(22271, TargetFrameworkMonikers.UapNotUapAot)] + [ActiveIssue(22271, TargetFrameworkMonikers.Uap)] public void SetAccessControl_NullPipeSecurity() { using (var pair = CreateServerClientPair()) @@ -62,7 +62,7 @@ public void SetAccessControl_NullPipeSecurity() } [Fact] - [ActiveIssue(22271, TargetFrameworkMonikers.UapNotUapAot)] + [ActiveIssue(22271, TargetFrameworkMonikers.Uap)] public void SetAccessControl_DisposedStream() { using (var pair = CreateServerClientPair()) @@ -76,7 +76,7 @@ public void SetAccessControl_DisposedStream() } [Fact] - [ActiveIssue(22271, TargetFrameworkMonikers.UapNotUapAot)] + [ActiveIssue(22271, TargetFrameworkMonikers.Uap)] public void SetAccessControl_ConnectedStream() { using (var pair = CreateServerClientPair()) diff --git a/src/System.IO.Pipes/tests/AnonymousPipeTests/AnonymousPipeTest.Specific.cs b/src/System.IO.Pipes/tests/AnonymousPipeTests/AnonymousPipeTest.Specific.cs index 00d0478a325f..a14a59d45839 100644 --- a/src/System.IO.Pipes/tests/AnonymousPipeTests/AnonymousPipeTest.Specific.cs +++ b/src/System.IO.Pipes/tests/AnonymousPipeTests/AnonymousPipeTest.Specific.cs @@ -159,7 +159,6 @@ public void PipeTransmissionMode_Returns_Byte() [Theory] [InlineData(PipeDirection.Out, PipeDirection.In)] [InlineData(PipeDirection.In, PipeDirection.Out)] - [ActiveIssue("dotnet/corefx #18546", TargetFrameworkMonikers.NetFramework)] public void ReadModeToByte_Accepted(PipeDirection serverDirection, PipeDirection clientDirection) { using (AnonymousPipeServerStream server = new AnonymousPipeServerStream(serverDirection)) diff --git a/src/System.IO.Pipes/tests/Configurations.props b/src/System.IO.Pipes/tests/Configurations.props index e883ef75a889..421f137c2465 100644 --- a/src/System.IO.Pipes/tests/Configurations.props +++ b/src/System.IO.Pipes/tests/Configurations.props @@ -1,10 +1,9 @@  - netstandard-Unix; - netstandard-Windows_NT; netcoreapp-Unix; netcoreapp-Windows_NT; + uap-Windows_NT; \ No newline at end of file diff --git a/src/System.IO.Pipes/tests/NamedPipeTests/NamedPipeTest.CreateServer.cs b/src/System.IO.Pipes/tests/NamedPipeTests/NamedPipeTest.CreateServer.cs index 3c777eb14519..0de4ed5cba37 100644 --- a/src/System.IO.Pipes/tests/NamedPipeTests/NamedPipeTest.CreateServer.cs +++ b/src/System.IO.Pipes/tests/NamedPipeTests/NamedPipeTest.CreateServer.cs @@ -194,7 +194,6 @@ public static void BadHandleKind_Throws_IOException(PipeDirection direction) [InlineData(PipeDirection.In)] [InlineData(PipeDirection.InOut)] [InlineData(PipeDirection.Out)] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "This scenario is not handled with System.ArgumentException on Full Framework")] [PlatformSpecific(TestPlatforms.Windows)] // accessing SafePipeHandle on Unix fails for a non-connected stream public static void Windows_CreateFromDisposedServerHandle_Throws_ObjectDisposedException(PipeDirection direction) { @@ -205,22 +204,6 @@ public static void Windows_CreateFromDisposedServerHandle_Throws_ObjectDisposedE Assert.Throws(() => new NamedPipeServerStream(direction, true, true, pipe.SafePipeHandle).Dispose()); } - [Theory] - [InlineData(PipeDirection.In)] - [InlineData(PipeDirection.InOut)] - [InlineData(PipeDirection.Out)] - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework, ".NET Core handles this scenario by throwing ArgumentException instead")] - [PlatformSpecific(TestPlatforms.Windows)] // accessing SafePipeHandle on Unix fails for a non-connected stream - public static void Windows_CreateFromAlreadyBoundHandle_Throws_ApplicationException(PipeDirection direction) - { - // The pipe is already bound - using (var pipe = new NamedPipeServerStream(GetUniquePipeName(), direction, 1, PipeTransmissionMode.Byte, PipeOptions.Asynchronous)) - { - SafePipeHandle handle = pipe.SafePipeHandle; - Assert.Throws(() => new NamedPipeServerStream(direction, true, true, handle)); - } - } - [Fact] [PlatformSpecific(TestPlatforms.AnyUnix)] // accessing SafePipeHandle on Unix fails for a non-connected stream public static void Unix_GetHandleOfNewServerStream_Throws_InvalidOperationException() @@ -235,7 +218,6 @@ public static void Unix_GetHandleOfNewServerStream_Throws_InvalidOperationExcept [InlineData(PipeDirection.In)] [InlineData(PipeDirection.InOut)] [InlineData(PipeDirection.Out)] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, ".NET framework handles this scenario by throwing ApplicationException instead")] [PlatformSpecific(TestPlatforms.Windows)] // accessing SafePipeHandle on Unix fails for a non-connected stream public static void Windows_CreateFromAlreadyBoundHandle_Throws_ArgumentException(PipeDirection direction) { diff --git a/src/System.IO.Pipes/tests/NamedPipeTests/NamedPipeTest.CrossProcess.cs b/src/System.IO.Pipes/tests/NamedPipeTests/NamedPipeTest.CrossProcess.cs index acb736a0cae1..6787faeffe15 100644 --- a/src/System.IO.Pipes/tests/NamedPipeTests/NamedPipeTest.CrossProcess.cs +++ b/src/System.IO.Pipes/tests/NamedPipeTests/NamedPipeTest.CrossProcess.cs @@ -12,7 +12,7 @@ namespace System.IO.Pipes.Tests { - [ActiveIssue(22271, TargetFrameworkMonikers.UapNotUapAot)] + [ActiveIssue(22271, TargetFrameworkMonikers.Uap)] public sealed class NamedPipeTest_CrossProcess { [Fact] diff --git a/src/System.IO.Pipes/tests/NamedPipeTests/NamedPipeTest.Read.cs b/src/System.IO.Pipes/tests/NamedPipeTests/NamedPipeTest.Read.cs index c55abab90922..6df4f0055587 100644 --- a/src/System.IO.Pipes/tests/NamedPipeTests/NamedPipeTest.Read.cs +++ b/src/System.IO.Pipes/tests/NamedPipeTests/NamedPipeTest.Read.cs @@ -8,7 +8,7 @@ namespace System.IO.Pipes.Tests { - [ActiveIssue(22271, TargetFrameworkMonikers.UapNotUapAot)] + [ActiveIssue(22271, TargetFrameworkMonikers.Uap)] public class NamedPipeTest_Read_ServerOut_ClientIn : PipeTest_Read { protected override ServerClientPair CreateServerClientPair() @@ -28,7 +28,7 @@ protected override ServerClientPair CreateServerClientPair() } } - [ActiveIssue(22271, TargetFrameworkMonikers.UapNotUapAot)] + [ActiveIssue(22271, TargetFrameworkMonikers.Uap)] public class NamedPipeTest_Read_ServerIn_ClientOut : PipeTest_Read { protected override ServerClientPair CreateServerClientPair() @@ -48,7 +48,7 @@ protected override ServerClientPair CreateServerClientPair() } } - [ActiveIssue(22271, TargetFrameworkMonikers.UapNotUapAot)] + [ActiveIssue(22271, TargetFrameworkMonikers.Uap)] public class NamedPipeTest_Read_ServerInOut_ClientInOut : PipeTest_Read { protected override ServerClientPair CreateServerClientPair() @@ -70,7 +70,7 @@ protected override ServerClientPair CreateServerClientPair() public override bool SupportsBidirectionalReadingWriting => true; } - [ActiveIssue(22271, TargetFrameworkMonikers.UapNotUapAot)] + [ActiveIssue(22271, TargetFrameworkMonikers.Uap)] public class NamedPipeTest_Read_ServerInOut_ClientInOut_APMWaitForConnection : PipeTest_Read { protected override ServerClientPair CreateServerClientPair() diff --git a/src/System.IO.Pipes/tests/NamedPipeTests/NamedPipeTest.RunAsClient.Windows.cs b/src/System.IO.Pipes/tests/NamedPipeTests/NamedPipeTest.RunAsClient.Windows.cs index 4bf966cbb477..548eb67bfa04 100644 --- a/src/System.IO.Pipes/tests/NamedPipeTests/NamedPipeTest.RunAsClient.Windows.cs +++ b/src/System.IO.Pipes/tests/NamedPipeTests/NamedPipeTest.RunAsClient.Windows.cs @@ -20,7 +20,7 @@ public partial class NamedPipeTest_RunAsClient [InlineData(TokenImpersonationLevel.Impersonation)] [InlineData(TokenImpersonationLevel.Delegation)] [PlatformSpecific(TestPlatforms.Windows)] // Uses P/Invokes - [ActiveIssue(22271, TargetFrameworkMonikers.UapNotUapAot)] + [ActiveIssue(22271, TargetFrameworkMonikers.Uap)] public async Task RunAsClient_Windows(TokenImpersonationLevel tokenImpersonationLevel) { string pipeName = GetUniquePipeName(); diff --git a/src/System.IO.Pipes/tests/NamedPipeTests/NamedPipeTest.Simple.cs b/src/System.IO.Pipes/tests/NamedPipeTests/NamedPipeTest.Simple.cs index 2caac447d405..49fea7ba76d5 100644 --- a/src/System.IO.Pipes/tests/NamedPipeTests/NamedPipeTest.Simple.cs +++ b/src/System.IO.Pipes/tests/NamedPipeTests/NamedPipeTest.Simple.cs @@ -523,7 +523,6 @@ public async Task WriteAsync_DisconnectDuringWrite_Throws() } [Fact] - [ActiveIssue("dotnet/corefx #16934", TargetFrameworkMonikers.NetFramework)] //Hangs forever in desktop as it doesn't have cancellation support public async Task Server_ReadWriteCancelledToken_Throws_OperationCanceledException() { using (NamedPipePair pair = CreateNamedPipePair()) @@ -622,7 +621,6 @@ public async Task CancelTokenOn_Server_ReadWriteCancelledToken_Throws_OperationC } [Fact] - [ActiveIssue("dotnet/corefx #16934", TargetFrameworkMonikers.NetFramework)] //Hangs forever in desktop as it doesn't have cancellation support public async Task Client_ReadWriteCancelledToken_Throws_OperationCanceledException() { using (NamedPipePair pair = CreateNamedPipePair()) @@ -754,7 +752,7 @@ public async Task ManyConcurrentOperations(bool cancelable) } } - [ActiveIssue(22271, TargetFrameworkMonikers.UapNotUapAot)] + [ActiveIssue(22271, TargetFrameworkMonikers.Uap)] public class NamedPipeTest_Simple_ServerInOutRead_ClientInOutWrite : NamedPipeTest_Simple { protected override NamedPipePair CreateNamedPipePair(PipeOptions serverOptions, PipeOptions clientOptions) @@ -768,7 +766,7 @@ protected override NamedPipePair CreateNamedPipePair(PipeOptions serverOptions, } } - [ActiveIssue(22271, TargetFrameworkMonikers.UapNotUapAot)] + [ActiveIssue(22271, TargetFrameworkMonikers.Uap)] public class NamedPipeTest_Simple_ServerInOutWrite_ClientInOutRead : NamedPipeTest_Simple { protected override NamedPipePair CreateNamedPipePair(PipeOptions serverOptions, PipeOptions clientOptions) @@ -782,7 +780,7 @@ protected override NamedPipePair CreateNamedPipePair(PipeOptions serverOptions, } } - [ActiveIssue(22271, TargetFrameworkMonikers.UapNotUapAot)] + [ActiveIssue(22271, TargetFrameworkMonikers.Uap)] public class NamedPipeTest_Simple_ServerInOut_ClientIn : NamedPipeTest_Simple { protected override NamedPipePair CreateNamedPipePair(PipeOptions serverOptions, PipeOptions clientOptions) @@ -796,7 +794,7 @@ protected override NamedPipePair CreateNamedPipePair(PipeOptions serverOptions, } } - [ActiveIssue(22271, TargetFrameworkMonikers.UapNotUapAot)] + [ActiveIssue(22271, TargetFrameworkMonikers.Uap)] public class NamedPipeTest_Simple_ServerInOut_ClientOut : NamedPipeTest_Simple { protected override NamedPipePair CreateNamedPipePair(PipeOptions serverOptions, PipeOptions clientOptions) @@ -810,7 +808,7 @@ protected override NamedPipePair CreateNamedPipePair(PipeOptions serverOptions, } } - [ActiveIssue(22271, TargetFrameworkMonikers.UapNotUapAot)] + [ActiveIssue(22271, TargetFrameworkMonikers.Uap)] public class NamedPipeTest_Simple_ServerOut_ClientIn : NamedPipeTest_Simple { protected override NamedPipePair CreateNamedPipePair(PipeOptions serverOptions, PipeOptions clientOptions) @@ -824,7 +822,7 @@ protected override NamedPipePair CreateNamedPipePair(PipeOptions serverOptions, } } - [ActiveIssue(22271, TargetFrameworkMonikers.UapNotUapAot)] + [ActiveIssue(22271, TargetFrameworkMonikers.Uap)] public class NamedPipeTest_Simple_ServerIn_ClientOut : NamedPipeTest_Simple { protected override NamedPipePair CreateNamedPipePair(PipeOptions serverOptions, PipeOptions clientOptions) diff --git a/src/System.IO.Pipes/tests/NamedPipeTests/NamedPipeTest.Specific.cs b/src/System.IO.Pipes/tests/NamedPipeTests/NamedPipeTest.Specific.cs index eef4cddd5b56..757d86806e02 100644 --- a/src/System.IO.Pipes/tests/NamedPipeTests/NamedPipeTest.Specific.cs +++ b/src/System.IO.Pipes/tests/NamedPipeTests/NamedPipeTest.Specific.cs @@ -16,7 +16,7 @@ namespace System.IO.Pipes.Tests /// The Specific NamedPipe tests cover edge cases or otherwise narrow cases that /// show up within particular server/client directional combinations. /// - [ActiveIssue(22271, TargetFrameworkMonikers.UapNotUapAot)] + [ActiveIssue(22271, TargetFrameworkMonikers.Uap)] public class NamedPipeTest_Specific : NamedPipeTestBase { [Fact] @@ -601,7 +601,6 @@ public async void ClientConnectAsync_Throws_Timeout_When_Pipe_Not_Found(Cancella } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "https://github.com/dotnet/corefx/pull/25877 yet to be ported to netfx")] [PlatformSpecific(TestPlatforms.Windows)] // Unix ignores MaxNumberOfServerInstances and second client also connects. public void ClientConnect_Throws_Timeout_When_Pipe_Busy() { @@ -626,7 +625,6 @@ public void ClientConnect_Throws_Timeout_When_Pipe_Busy() [Theory] [MemberData(nameof(GetCancellationTokens))] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "https://github.com/dotnet/corefx/pull/25877 yet to be ported to netfx")] [PlatformSpecific(TestPlatforms.Windows)] // Unix ignores MaxNumberOfServerInstances and second client also connects. public async void ClientConnectAsync_With_Cancellation_Throws_Timeout_When_Pipe_Busy(CancellationToken cancellationToken) { diff --git a/src/System.IO.Pipes/tests/NamedPipeTests/NamedPipeTest.Write.cs b/src/System.IO.Pipes/tests/NamedPipeTests/NamedPipeTest.Write.cs index 6ec57c07c30d..645f19f5f58e 100644 --- a/src/System.IO.Pipes/tests/NamedPipeTests/NamedPipeTest.Write.cs +++ b/src/System.IO.Pipes/tests/NamedPipeTests/NamedPipeTest.Write.cs @@ -8,7 +8,7 @@ namespace System.IO.Pipes.Tests { - [ActiveIssue(22271, TargetFrameworkMonikers.UapNotUapAot)] + [ActiveIssue(22271, TargetFrameworkMonikers.Uap)] public class NamedPipeTest_Write_ServerOut_ClientIn : PipeTest_Write { protected override ServerClientPair CreateServerClientPair() @@ -28,7 +28,7 @@ protected override ServerClientPair CreateServerClientPair() } } - [ActiveIssue(22271, TargetFrameworkMonikers.UapNotUapAot)] + [ActiveIssue(22271, TargetFrameworkMonikers.Uap)] public class NamedPipeTest_Write_ServerIn_ClientOut : PipeTest_Write { protected override ServerClientPair CreateServerClientPair() @@ -48,7 +48,7 @@ protected override ServerClientPair CreateServerClientPair() } } - [ActiveIssue(22271, TargetFrameworkMonikers.UapNotUapAot)] + [ActiveIssue(22271, TargetFrameworkMonikers.Uap)] public class NamedPipeTest_Write_ServerInOut_ClientInOut : PipeTest_Write { protected override ServerClientPair CreateServerClientPair() diff --git a/src/System.IO.Pipes/tests/PipeTest.Read.cs b/src/System.IO.Pipes/tests/PipeTest.Read.cs index 86ad3222413d..5fa1b8a43222 100644 --- a/src/System.IO.Pipes/tests/PipeTest.Read.cs +++ b/src/System.IO.Pipes/tests/PipeTest.Read.cs @@ -215,7 +215,6 @@ public void CopyToAsync_InvalidArgs_Throws() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "There is a bug in netfx around async read on a broken PipeStream. See #2601 and #2899. This bug is fixed in netcore.")] public virtual async Task ReadFromPipeWithClosedPartner_ReadNoBytes() { using (ServerClientPair pair = CreateServerClientPair()) diff --git a/src/System.IO.Pipes/tests/PipeTest.Read.netcoreapp.cs b/src/System.IO.Pipes/tests/PipeTest.Read.netcoreapp.cs index 0b1bf32e1b47..239516fa3e0f 100644 --- a/src/System.IO.Pipes/tests/PipeTest.Read.netcoreapp.cs +++ b/src/System.IO.Pipes/tests/PipeTest.Read.netcoreapp.cs @@ -59,7 +59,6 @@ public void ReadOnDisposedReadablePipe_Span_Throws_ObjectDisposedException() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "There is a bug in netfx around async read on a broken PipeStream. See #2601 and #2899. This bug is fixed in netcore.")] public virtual async Task ReadFromPipeWithClosedPartner_Span_ReadNoBytes() { using (ServerClientPair pair = CreateServerClientPair()) diff --git a/src/System.IO.Pipes/tests/PipeTest.Write.cs b/src/System.IO.Pipes/tests/PipeTest.Write.cs index 9d7d4dc9fc2b..591936789dee 100644 --- a/src/System.IO.Pipes/tests/PipeTest.Write.cs +++ b/src/System.IO.Pipes/tests/PipeTest.Write.cs @@ -219,7 +219,6 @@ public virtual void WriteToPipeWithClosedPartner_Throws_IOException() } [Fact] - [ActiveIssue("dotnet/corefx #19287", TargetFrameworkMonikers.NetFramework)] public async Task ValidFlush_DoesntThrow() { using (ServerClientPair pair = CreateServerClientPair()) diff --git a/src/System.IO.Pipes/tests/System.IO.Pipes.Tests.csproj b/src/System.IO.Pipes/tests/System.IO.Pipes.Tests.csproj index ab1ee92ac7c8..1ead09fc10ac 100644 --- a/src/System.IO.Pipes/tests/System.IO.Pipes.Tests.csproj +++ b/src/System.IO.Pipes/tests/System.IO.Pipes.Tests.csproj @@ -3,7 +3,7 @@ {142469EC-D665-4FE2-845A-FDA69F9CC557} true true - netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netstandard-Unix-Debug;netstandard-Unix-Release;netstandard-Windows_NT-Debug;netstandard-Windows_NT-Release + netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release diff --git a/src/System.IO.Ports/tests/Configurations.props b/src/System.IO.Ports/tests/Configurations.props index a1be31b3c316..abbc781cbeb4 100644 --- a/src/System.IO.Ports/tests/Configurations.props +++ b/src/System.IO.Ports/tests/Configurations.props @@ -1,10 +1,11 @@  - netstandard-Windows_NT; - netstandard-Linux; - netstandard-OSX; + netcoreapp-Windows_NT; + netcoreapp-Linux; + netcoreapp-OSX; netfx; + uap-Windows_NT diff --git a/src/System.IO.Ports/tests/System.IO.Ports.Tests.csproj b/src/System.IO.Ports/tests/System.IO.Ports.Tests.csproj index d724f5c7b451..05c717c1c5fd 100644 --- a/src/System.IO.Ports/tests/System.IO.Ports.Tests.csproj +++ b/src/System.IO.Ports/tests/System.IO.Ports.Tests.csproj @@ -1,7 +1,7 @@ {4259DCE9-3480-40BB-B08A-64A2D446264B} - netfx-Debug;netfx-Release;netstandard-Linux-Debug;netstandard-Linux-Release;netstandard-OSX-Debug;netstandard-OSX-Release;netstandard-Windows_NT-Debug;netstandard-Windows_NT-Release + netfx-Debug;netfx-Release;netcoreapp-Linux-Debug;netcoreapp-Linux-Release;netcoreapp-OSX-Debug;netcoreapp-OSX-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release diff --git a/src/System.IO.UnmanagedMemoryStream/tests/Configurations.props b/src/System.IO.UnmanagedMemoryStream/tests/Configurations.props index 2bc19ff4170e..acf56fa2750e 100644 --- a/src/System.IO.UnmanagedMemoryStream/tests/Configurations.props +++ b/src/System.IO.UnmanagedMemoryStream/tests/Configurations.props @@ -1,8 +1,8 @@  - netstandard; netcoreapp; + uap; \ No newline at end of file diff --git a/src/System.IO.UnmanagedMemoryStream/tests/System.IO.UnmanagedMemoryStream.Tests.csproj b/src/System.IO.UnmanagedMemoryStream/tests/System.IO.UnmanagedMemoryStream.Tests.csproj index a152200c3040..97292e9029f1 100644 --- a/src/System.IO.UnmanagedMemoryStream/tests/System.IO.UnmanagedMemoryStream.Tests.csproj +++ b/src/System.IO.UnmanagedMemoryStream/tests/System.IO.UnmanagedMemoryStream.Tests.csproj @@ -2,7 +2,7 @@ {55F26FB1-D4AF-48CA-A470-83113AE7BFDB} true - netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release + netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release true diff --git a/src/System.IO.UnmanagedMemoryStream/tests/UmsSecurityTest.cs b/src/System.IO.UnmanagedMemoryStream/tests/UmsSecurityTest.cs index 06ac911c9663..1368fc3ffd30 100644 --- a/src/System.IO.UnmanagedMemoryStream/tests/UmsSecurityTest.cs +++ b/src/System.IO.UnmanagedMemoryStream/tests/UmsSecurityTest.cs @@ -39,7 +39,6 @@ public static void ChangePositionViaPointer() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "NetFX allows a negative Position following some PositionPointer overflowing inputs. See dotnet/coreclr#11376.")] public static void OverflowPositionPointer() { unsafe diff --git a/src/System.IO/tests/BinaryReader/BinaryReaderTests.cs b/src/System.IO/tests/BinaryReader/BinaryReaderTests.cs index b07f3df5f56a..7cc20340d3fa 100644 --- a/src/System.IO/tests/BinaryReader/BinaryReaderTests.cs +++ b/src/System.IO/tests/BinaryReader/BinaryReaderTests.cs @@ -115,7 +115,6 @@ public override int GetChars(byte[] bytes, int byteIndex, int byteCount, char[] } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Difference in behavior that added extra checks to BinaryReader/Writer buffers on .NET Core")] public void Read_InvalidEncoding() { using (var str = CreateStream()) diff --git a/src/System.IO/tests/Configurations.props b/src/System.IO/tests/Configurations.props index e43964ecf9e7..acf56fa2750e 100644 --- a/src/System.IO/tests/Configurations.props +++ b/src/System.IO/tests/Configurations.props @@ -2,7 +2,7 @@ netcoreapp; - netstandard; + uap; \ No newline at end of file diff --git a/src/System.IO/tests/MemoryStream/MemoryStream.GetBufferTests.cs b/src/System.IO/tests/MemoryStream/MemoryStream.GetBufferTests.cs index f9e67fddf7c7..390a4a19435f 100644 --- a/src/System.IO/tests/MemoryStream/MemoryStream.GetBufferTests.cs +++ b/src/System.IO/tests/MemoryStream/MemoryStream.GetBufferTests.cs @@ -31,7 +31,6 @@ public void MemoryStream_GetBuffer_Exposable() Assert.Equal(500, buffer.Length); } - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "https://github.com/dotnet/coreclr/pull/23700")] [Fact] public void MemoryStream_GetBuffer_AfterCapacityReset() { diff --git a/src/System.IO/tests/StreamWriter/StreamWriter.CtorTests.cs b/src/System.IO/tests/StreamWriter/StreamWriter.CtorTests.cs index 5f21cb4235fd..14895663997b 100644 --- a/src/System.IO/tests/StreamWriter/StreamWriter.CtorTests.cs +++ b/src/System.IO/tests/StreamWriter/StreamWriter.CtorTests.cs @@ -31,17 +31,6 @@ public static void CreateStreamWriter() Assert.Equal("HelloWorld", str2); } - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)] - [Fact] - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)] - public static void NullEncodingThrows() - { - // [] Check for ArgumentNullException on null encoding - //----------------------------------------------------------------- - - Assert.Throws(() => new StreamWriter(new MemoryStream(), null)); - } - [Fact] public static void UTF8Encoding() { diff --git a/src/System.IO/tests/StreamWriter/StreamWriter.WriteTests.cs b/src/System.IO/tests/StreamWriter/StreamWriter.WriteTests.cs index b36033d11833..22d6b595ca32 100644 --- a/src/System.IO/tests/StreamWriter/StreamWriter.WriteTests.cs +++ b/src/System.IO/tests/StreamWriter/StreamWriter.WriteTests.cs @@ -171,7 +171,6 @@ public void NullStreamThrows() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Full framework throws NullReferenceException")] public async Task NullNewLineAsync() { using (MemoryStream ms = new MemoryStream()) diff --git a/src/System.IO/tests/StringWriter/StringWriterTests.cs b/src/System.IO/tests/StringWriter/StringWriterTests.cs index 0d7daa98ba45..3e23a6608c06 100644 --- a/src/System.IO/tests/StringWriter/StringWriterTests.cs +++ b/src/System.IO/tests/StringWriter/StringWriterTests.cs @@ -360,7 +360,6 @@ public static void TestWriteLineAsyncCharArray() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Full framework throws NullReferenceException")] public async Task NullNewLineAsync() { using (MemoryStream ms = new MemoryStream()) diff --git a/src/System.IO/tests/System.IO.Tests.csproj b/src/System.IO/tests/System.IO.Tests.csproj index af89d8e8756b..ffd74d69222e 100644 --- a/src/System.IO/tests/System.IO.Tests.csproj +++ b/src/System.IO/tests/System.IO.Tests.csproj @@ -5,7 +5,7 @@ true true true - netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release + netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release diff --git a/src/System.IO/tests/TextReader/TextReaderTests.cs b/src/System.IO/tests/TextReader/TextReaderTests.cs index 9872c82add6e..0a192670c70e 100644 --- a/src/System.IO/tests/TextReader/TextReaderTests.cs +++ b/src/System.IO/tests/TextReader/TextReaderTests.cs @@ -71,7 +71,6 @@ public void TestRead() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "#23810 not fixed on .NET Framework")] public void ReadZeroCharacters() { using (CharArrayTextReader tr = GetCharArray().textReader) diff --git a/src/System.Json/tests/Configurations.props b/src/System.Json/tests/Configurations.props index ff0d415e4593..b0ad9a4c0cfe 100644 --- a/src/System.Json/tests/Configurations.props +++ b/src/System.Json/tests/Configurations.props @@ -1,7 +1,9 @@  - netstandard; + netcoreapp; + netfx; + uap; \ No newline at end of file diff --git a/src/System.Json/tests/System.Json.Tests.csproj b/src/System.Json/tests/System.Json.Tests.csproj index 3fec442da164..4e70d9e421f7 100644 --- a/src/System.Json/tests/System.Json.Tests.csproj +++ b/src/System.Json/tests/System.Json.Tests.csproj @@ -3,7 +3,7 @@ {DC683D60-34EC-4D85-B6E0-E97FDB37A583} true true - netstandard-Debug;netstandard-Release + netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release;uap-Debug;uap-Release diff --git a/src/System.Linq.Expressions/tests/Array/NewArrayBoundsTests.cs b/src/System.Linq.Expressions/tests/Array/NewArrayBoundsTests.cs index 50d61b632d72..0e970f0a4f1c 100644 --- a/src/System.Linq.Expressions/tests/Array/NewArrayBoundsTests.cs +++ b/src/System.Linq.Expressions/tests/Array/NewArrayBoundsTests.cs @@ -303,9 +303,7 @@ public static void SingleNegativeBoundErrorMessage(bool useInterpreter) Expression.Lambda>(Expression.NewArrayBounds(typeof(int), Expression.Constant(-2))); var func = lambda.Compile(useInterpreter); OverflowException ex = Assert.Throws(() => func()); - - if (!PlatformDetection.IsNetNative) // Exceptions do not always have messages - Assert.Equal(localizedMessage, ex.Message); + Assert.Equal(localizedMessage, ex.Message); } [Theory, ClassData(typeof(CompilationTypes))] @@ -326,9 +324,7 @@ public static void MultipleNegativeBoundErrorMessage(bool useInterpreter) typeof(int), Expression.Constant(0), Expression.Constant(0), Expression.Constant(-2))); var func = lambda.Compile(useInterpreter); OverflowException ex = Assert.Throws(() => func()); - - if (!PlatformDetection.IsNetNative) // Exceptions do not always have messages - Assert.Equal(localizedMessage, ex.Message); + Assert.Equal(localizedMessage, ex.Message); } } } diff --git a/src/System.Linq.Expressions/tests/Block/BlockFactoryTests.cs b/src/System.Linq.Expressions/tests/Block/BlockFactoryTests.cs index 54cfa7fcb637..916865c1025f 100644 --- a/src/System.Linq.Expressions/tests/Block/BlockFactoryTests.cs +++ b/src/System.Linq.Expressions/tests/Block/BlockFactoryTests.cs @@ -129,10 +129,7 @@ private static void AssertBlockIsOptimized(BlockExpression expr, IReadOnlyList Expression.Constant(i)).ToArray(); MethodCallExpression expr = Expression.Call(obj, typeof(MS).GetMethod("I" + N), args); - - if (!PlatformDetection.IsNetNative) // .NET Native blocks internal framework reflection. - { - Assert.Equal("InstanceMethodCallExpressionN", expr.GetType().Name); - } - + + Assert.Equal("InstanceMethodCallExpressionN", expr.GetType().Name); Assert.Same(obj, expr.Object); Assert.Equal(N, expr.ArgumentCount); @@ -162,11 +158,7 @@ public static void CheckCallFactoryStaticN() MethodCallExpression expr = Expression.Call(typeof(MS).GetMethod("S" + N), args); - if (!PlatformDetection.IsNetNative) // .NET Native blocks internal framework reflection. - { - Assert.Equal("MethodCallExpressionN", expr.GetType().Name); - } - + Assert.Equal("MethodCallExpressionN", expr.GetType().Name); Assert.Equal(N, expr.ArgumentCount); for (var i = 0; i < N; i++) { @@ -315,18 +307,12 @@ private static void AssertCallIsOptimized(MethodCallExpression expr, Expression private static void AssertStaticMethodCall(int n, object obj) { - if (!PlatformDetection.IsNetNative) // .NET Native blocks internal framework reflection. - { - AssertTypeName("MethodCallExpression" + n, obj); - } + AssertTypeName("MethodCallExpression" + n, obj); } private static void AssertInstanceMethodCall(int n, object obj) { - if (!PlatformDetection.IsNetNative) // .NET Native blocks internal framework reflection. - { - AssertTypeName("InstanceMethodCallExpression" + n, obj); - } + AssertTypeName("InstanceMethodCallExpression" + n, obj); } private static void AssertTypeName(string expected, object obj) diff --git a/src/System.Linq.Expressions/tests/Call/CallTests.cs b/src/System.Linq.Expressions/tests/Call/CallTests.cs index 6d843d9cd661..60bc6acfb0d2 100644 --- a/src/System.Linq.Expressions/tests/Call/CallTests.cs +++ b/src/System.Linq.Expressions/tests/Call/CallTests.cs @@ -459,10 +459,7 @@ public static void Arg4_Invalid(Expression arg, Type exceptionType) private static void AssertArgumentException(Action action, Type exceptionType, string paramName) { ArgumentException ex = (ArgumentException)Assert.Throws(exceptionType, action); - if (!PlatformDetection.IsNetNative) // The .NET Native toolchain optimizes away exception ParamNames - { - Assert.Equal(paramName, ex.ParamName); - } + Assert.Equal(paramName, ex.ParamName); } [Theory] diff --git a/src/System.Linq.Expressions/tests/Configurations.props b/src/System.Linq.Expressions/tests/Configurations.props index 15db1c4872ce..421f137c2465 100644 --- a/src/System.Linq.Expressions/tests/Configurations.props +++ b/src/System.Linq.Expressions/tests/Configurations.props @@ -3,7 +3,6 @@ netcoreapp-Unix; netcoreapp-Windows_NT; - uapaot-Windows_NT; uap-Windows_NT; diff --git a/src/System.Linq.Expressions/tests/DebuggerTypeProxy/ExpressionDebuggerTypeProxyTests.cs b/src/System.Linq.Expressions/tests/DebuggerTypeProxy/ExpressionDebuggerTypeProxyTests.cs index 153e9e12f53e..d96a343e981b 100644 --- a/src/System.Linq.Expressions/tests/DebuggerTypeProxy/ExpressionDebuggerTypeProxyTests.cs +++ b/src/System.Linq.Expressions/tests/DebuggerTypeProxy/ExpressionDebuggerTypeProxyTests.cs @@ -176,10 +176,7 @@ public void ThrowOnNullToCtor(object sourceObject) ConstructorInfo ctor = viewType.GetConstructors().Single(); TargetInvocationException tie = Assert.Throws(() => ctor.Invoke(new object[] { null })); ArgumentNullException ane = (ArgumentNullException)tie.InnerException; - if (!PlatformDetection.IsNetNative) // The .NET Native toolchain optimizes away exception ParamNames - { - Assert.Equal(ctor.GetParameters()[0].Name, ane.ParamName); - } + Assert.Equal(ctor.GetParameters()[0].Name, ane.ParamName); } public static IEnumerable OnePerType() diff --git a/src/System.Linq.Expressions/tests/Dynamic/BindingRestrictionsProxyTests.cs b/src/System.Linq.Expressions/tests/Dynamic/BindingRestrictionsProxyTests.cs index 267c0ef1ce9d..44df241ce15c 100644 --- a/src/System.Linq.Expressions/tests/Dynamic/BindingRestrictionsProxyTests.cs +++ b/src/System.Linq.Expressions/tests/Dynamic/BindingRestrictionsProxyTests.cs @@ -204,10 +204,7 @@ public void ThrowOnNullToCtor() } TargetInvocationException tie = Assert.Throws(() => BindingRestrictionsProxyCtor.Invoke(new object[] {null})); ArgumentNullException ane = (ArgumentNullException)tie.InnerException; - if (!PlatformDetection.IsNetNative) // The .NET Native toolchain optimizes away exception ParamNames - { - Assert.Equal("node", ane.ParamName); - } + Assert.Equal("node", ane.ParamName); } } } diff --git a/src/System.Linq.Expressions/tests/Dynamic/ExpandoObjectProxyTests.cs b/src/System.Linq.Expressions/tests/Dynamic/ExpandoObjectProxyTests.cs index 7d759a1c75f3..4ae9ff6c4920 100644 --- a/src/System.Linq.Expressions/tests/Dynamic/ExpandoObjectProxyTests.cs +++ b/src/System.Linq.Expressions/tests/Dynamic/ExpandoObjectProxyTests.cs @@ -133,10 +133,7 @@ public void ViewTypeThrowsOnNull(object collection) ConstructorInfo constructor = debugViewType.GetConstructors().Single(); TargetInvocationException tie = Assert.Throws(() => constructor.Invoke(new object[] {null})); var ane = (ArgumentNullException)tie.InnerException; - if (!PlatformDetection.IsNetNative) // The .NET Native toolchain optimizes away exception ParamNames - { - Assert.Equal("collection", ane.ParamName); - } + Assert.Equal("collection", ane.ParamName); } } } diff --git a/src/System.Linq.Expressions/tests/DynamicExpression/DynamicExpressionTests.cs b/src/System.Linq.Expressions/tests/DynamicExpression/DynamicExpressionTests.cs index 95c62ffc527f..dfe6a2c37d61 100644 --- a/src/System.Linq.Expressions/tests/DynamicExpression/DynamicExpressionTests.cs +++ b/src/System.Linq.Expressions/tests/DynamicExpression/DynamicExpressionTests.cs @@ -20,7 +20,6 @@ public static IEnumerable SizesAndTypes => Enumerable.Range(1, 6).SelectMany(i => Types, (i, t) => new object[] { i, t }); [Theory, MemberData(nameof(SizesAndSuffixes))] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Internal framework reflection not supported on UapAot.")] public void AritySpecialisedUsedWhenPossible(int size, string nameSuffix) { CallSiteBinder binder = Binder.GetMember( @@ -43,7 +42,6 @@ public void AritySpecialisedUsedWhenPossible(int size, string nameSuffix) } [Theory, MemberData(nameof(SizesAndSuffixes))] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Internal framework reflection not supported on UapAot.")] public void TypedAritySpecialisedUsedWhenPossible(int size, string nameSuffix) { CallSiteBinder binder = Binder.GetMember( diff --git a/src/System.Linq.Expressions/tests/Invoke/InvokeFactoryTests.cs b/src/System.Linq.Expressions/tests/Invoke/InvokeFactoryTests.cs index bbdd0b2a26ac..d6ce976e733d 100644 --- a/src/System.Linq.Expressions/tests/Invoke/InvokeFactoryTests.cs +++ b/src/System.Linq.Expressions/tests/Invoke/InvokeFactoryTests.cs @@ -100,10 +100,7 @@ private static void AssertInvokeIsOptimized(InvocationExpression expr, Expressio private static void AssertInvocation(int n, object obj) { - if (!PlatformDetection.IsNetNative) // .NET Native blocks internal framework reflection. - { - AssertTypeName("InvocationExpression" + n, obj); - } + AssertTypeName("InvocationExpression" + n, obj); } private static void AssertTypeName(string expected, object obj) diff --git a/src/System.Linq.Expressions/tests/SequenceTests/SequenceTests.cs b/src/System.Linq.Expressions/tests/SequenceTests/SequenceTests.cs index 2d12669de683..193d5e18b744 100644 --- a/src/System.Linq.Expressions/tests/SequenceTests/SequenceTests.cs +++ b/src/System.Linq.Expressions/tests/SequenceTests/SequenceTests.cs @@ -841,7 +841,6 @@ public static void Writeback(bool useInterpreter) [Theory] [ClassData(typeof(CompilationTypes))] - [ActiveIssue("https://github.com/dotnet/corefx/issues/20717 - fails on x64", TargetFrameworkMonikers.UapAot)] public static void UnaryPlus(bool useInterpreter) { ConstantExpression ce = Expression.Constant((ushort)10); diff --git a/src/System.Linq.Expressions/tests/StackSpillerTests.cs b/src/System.Linq.Expressions/tests/StackSpillerTests.cs index 1f7249dccb44..61069a521ba4 100644 --- a/src/System.Linq.Expressions/tests/StackSpillerTests.cs +++ b/src/System.Linq.Expressions/tests/StackSpillerTests.cs @@ -1795,56 +1795,6 @@ [2] int32 } [Fact] - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)] - public static void Spill_Optimizations_LiteralField_NetFramework() - { - Expression> e = - Expression.Lambda>( - Expression.Add( - Expression.Field(null, typeof(Math).GetField(nameof(Math.PI))), - Spill(Expression.Constant(0.0)) - ) - ); - - e.VerifyIL(@" - .method float64 ::lambda_method(class [System.Linq.Expressions]System.Runtime.CompilerServices.Closure) - { - .maxstack 3 - .locals init ( - [0] float64, - [1] float64 - ) - - // Save rhs (`try { 0.0 } finally {}`) into V_0 - .try - { - IL_0000: ldc.r8 0 - IL_0009: stloc.1 - IL_000a: leave IL_0010 - } - finally - { - IL_000f: endfinally - } - IL_0010: ldloc.1 - IL_0011: stloc.0 - - // Evaluate lhs (`Math.PI` gets inlined) - IL_0012: ldc.r8 3.14159265358979 - - // Load rhs from V_0 - IL_001b: ldloc.0 - - // Evaluate `lhs + rhs` - IL_001c: add - - IL_001d: ret - }" - ); - } - - [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public static void Spill_Optimizations_LiteralField_NotNetFramework() { Expression> e = diff --git a/src/System.Linq.Expressions/tests/System.Linq.Expressions.Tests.csproj b/src/System.Linq.Expressions/tests/System.Linq.Expressions.Tests.csproj index e54845679c3d..1d171e7ad601 100644 --- a/src/System.Linq.Expressions/tests/System.Linq.Expressions.Tests.csproj +++ b/src/System.Linq.Expressions/tests/System.Linq.Expressions.Tests.csproj @@ -2,11 +2,11 @@ true - netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release;uapaot-Windows_NT-Debug;uapaot-Windows_NT-Release + netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release {4B4AA59B-89F9-4A34-B3C3-C97EF531EE00} - true + false $(DefineConstants);FEATURE_COMPILE $(DefineConstants);FEATURE_INTERPRET false @@ -35,7 +35,6 @@ - @@ -267,10 +266,6 @@ - - - diff --git a/src/System.Linq.Parallel/tests/Combinatorial/CancellationParallelQueryCombinationTests.cs b/src/System.Linq.Parallel/tests/Combinatorial/CancellationParallelQueryCombinationTests.cs index 0e13b31ef4bd..6d34035a947d 100644 --- a/src/System.Linq.Parallel/tests/Combinatorial/CancellationParallelQueryCombinationTests.cs +++ b/src/System.Linq.Parallel/tests/Combinatorial/CancellationParallelQueryCombinationTests.cs @@ -777,7 +777,6 @@ public static void ToArray_AggregateException_Wraps_OperationCanceledException(L [MemberData(nameof(UnaryCancelingOperators))] [MemberData(nameof(BinaryCancelingOperators))] [MemberData(nameof(OrderCancelingOperators))] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, ".NET Core bug fix https://github.com/dotnet/corefx/pull/2307")] public static void ToArray_OperationCanceledException_PreCanceled(Labeled, Action, ParallelQuery>> operation) { AssertThrows.AlreadyCanceled(source => operation.Item(source, () => { }).ToArray()); diff --git a/src/System.Linq.Parallel/tests/Combinatorial/ParallelQueryCombinationTests.cs b/src/System.Linq.Parallel/tests/Combinatorial/ParallelQueryCombinationTests.cs index 1dc6a06e769a..f4afa3917286 100644 --- a/src/System.Linq.Parallel/tests/Combinatorial/ParallelQueryCombinationTests.cs +++ b/src/System.Linq.Parallel/tests/Combinatorial/ParallelQueryCombinationTests.cs @@ -467,7 +467,6 @@ public static void GroupBy_ElementSelector_NotPipelined(Labeled sourc [Theory] [MemberData(nameof(UnaryOperators))] [MemberData(nameof(BinaryOperators))] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Full framework doesn't preserve the right collection order (.NET core bug fix https://github.com/dotnet/corefx/pull/27930)")] public static void GroupJoin(Labeled source, Labeled operation) { Action groupJoin = (left, right) => @@ -490,7 +489,6 @@ public static void GroupJoin(Labeled source, Labeled opera [Theory] [MemberData(nameof(UnaryOperators))] [MemberData(nameof(BinaryOperators))] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Full framework doesn't preserve the right collection order (.NET core bug fix https://github.com/dotnet/corefx/pull/27930)")] public static void GroupJoin_NotPipelined(Labeled source, Labeled operation) { Action groupJoin = (left, right) => @@ -550,7 +548,6 @@ public static void Intersect_NotPipelined(Labeled source, Labeled source, Labeled operation) { Action join = (left, right) => @@ -572,7 +569,6 @@ public static void Join(Labeled source, Labeled operation) [Theory] [MemberData(nameof(UnaryOperators))] [MemberData(nameof(BinaryOperators))] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Full framework doesn't preserve the right collection order (.NET core bug fix https://github.com/dotnet/corefx/pull/27930)")] public static void Join_NotPipelined(Labeled source, Labeled operation) { Action join = (left, right) => diff --git a/src/System.Linq.Parallel/tests/Configurations.props b/src/System.Linq.Parallel/tests/Configurations.props index a83bb569e75c..62d260bdab75 100644 --- a/src/System.Linq.Parallel/tests/Configurations.props +++ b/src/System.Linq.Parallel/tests/Configurations.props @@ -1,7 +1,6 @@  - netstandard; uap; netcoreapp; diff --git a/src/System.Linq.Parallel/tests/QueryOperators/CastTests.cs b/src/System.Linq.Parallel/tests/QueryOperators/CastTests.cs index 25c5262febe9..57d26c25679c 100644 --- a/src/System.Linq.Parallel/tests/QueryOperators/CastTests.cs +++ b/src/System.Linq.Parallel/tests/QueryOperators/CastTests.cs @@ -144,7 +144,6 @@ public static void Cast_Assignable_InvalidCastException(Labeled("source", () => ((ParallelQuery)null).Cast()); diff --git a/src/System.Linq.Parallel/tests/QueryOperators/GroupJoinTests.cs b/src/System.Linq.Parallel/tests/QueryOperators/GroupJoinTests.cs index 2b2c46cd2b3b..4d91798bd318 100644 --- a/src/System.Linq.Parallel/tests/QueryOperators/GroupJoinTests.cs +++ b/src/System.Linq.Parallel/tests/QueryOperators/GroupJoinTests.cs @@ -198,7 +198,6 @@ public static void GroupJoin_Unordered_Multiple_Longrunning() [Theory] [MemberData(nameof(GroupJoinMultipleData), new[] { 0, 1, 2, KeyFactor * 2 - 1, KeyFactor * 2 })] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Full framework doesn't preserve the right collection order (.NET core bug fix https://github.com/dotnet/corefx/pull/27930)")] public static void GroupJoin_Multiple(Labeled> left, int leftCount, Labeled> right, int rightCount) { ParallelQuery leftQuery = left.Item; @@ -229,7 +228,6 @@ public static void GroupJoin_Multiple(Labeled> left, int left [Theory] [OuterLoop] [MemberData(nameof(GroupJoinMultipleData), new int[] { /* Sources.OuterLoopCount */ })] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Full framework doesn't preserve the right collection order (.NET core bug fix https://github.com/dotnet/corefx/pull/27930)")] public static void GroupJoin_Multiple_Longrunning(Labeled> left, int leftCount, Labeled> right, int rightCount) { GroupJoin_Multiple(left, leftCount, right, rightCount); @@ -237,7 +235,6 @@ public static void GroupJoin_Multiple_Longrunning(Labeled> le [Theory] [MemberData(nameof(GroupJoinMultipleData), new[] { 0, 1, 2, KeyFactor * 2 - 1, KeyFactor * 2 })] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Full framework doesn't preserve the right collection order (.NET core bug fix https://github.com/dotnet/corefx/pull/27930)")] public static void GroupJoin_Multiple_LeftWithOrderingColisions(Labeled> left, int leftCount, Labeled> right, int rightCount) { ParallelQuery leftQuery = left.Item.AsUnordered().OrderBy(x => 0); @@ -274,7 +271,6 @@ public static void GroupJoin_Multiple_LeftWithOrderingColisions(Labeled> left, int leftCount, Labeled> right, int rightCount) { GroupJoin_Multiple_LeftWithOrderingColisions(left, leftCount, right, rightCount); @@ -314,7 +310,6 @@ public static void GroupJoin_Unordered_CustomComparator_Longrunning() [Theory] [MemberData(nameof(GroupJoinMultipleData), new[] { 0, 1, 2, KeyFactor * 2 })] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Full framework doesn't preserve the right collection order (.NET core bug fix https://github.com/dotnet/corefx/pull/27930)")] public static void GroupJoin_CustomComparator(Labeled> left, int leftCount, Labeled> right, int rightCount) { ParallelQuery leftQuery = left.Item; @@ -345,7 +340,6 @@ public static void GroupJoin_CustomComparator(Labeled> left, [Theory] [OuterLoop] [MemberData(nameof(GroupJoinMultipleData), new int[] { /* Sources.OuterLoopCount */ })] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Full framework doesn't preserve the right collection order (.NET core bug fix https://github.com/dotnet/corefx/pull/27930)")] public static void GroupJoin_CustomComparator_Longrunning(Labeled> left, int leftCount, Labeled> right, int rightCount) { GroupJoin_CustomComparator(left, leftCount, right, rightCount); @@ -354,7 +348,6 @@ public static void GroupJoin_CustomComparator_Longrunning(Labeled> left, int leftCount, Labeled> right, int rightCount) { ParallelQuery leftQuery = left.Item.AsUnordered().OrderBy(x => x / KeyFactor); @@ -427,7 +420,6 @@ public static void GroupJoin_CustomComparator_LeftWithOrderingColisions(Labeled< [Theory] [OuterLoop] [MemberData(nameof(GroupJoinMultipleData), new int[] { /* Sources.OuterLoopCount */ })] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Full framework doesn't preserve the right collection order (.NET core bug fix https://github.com/dotnet/corefx/pull/27930)")] public static void GroupJoin_CustomComparator_LeftWithOrderingColisions_Longrunning(Labeled> left, int leftCount, Labeled> right, int rightCount) { GroupJoin_CustomComparator_LeftWithOrderingColisions(left, leftCount, right, rightCount); diff --git a/src/System.Linq.Parallel/tests/QueryOperators/JoinTests.cs b/src/System.Linq.Parallel/tests/QueryOperators/JoinTests.cs index 716ec626bc47..375b4799ef53 100644 --- a/src/System.Linq.Parallel/tests/QueryOperators/JoinTests.cs +++ b/src/System.Linq.Parallel/tests/QueryOperators/JoinTests.cs @@ -163,7 +163,6 @@ public static void Join_Unordered_Multiple_Longrunning() [Theory] [MemberData(nameof(JoinMultipleData), new[] { 0, 1, 2, KeyFactor * 2 })] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Full framework doesn't preserve the right collection order (.NET core bug fix https://github.com/dotnet/corefx/pull/27930)")] public static void Join_Multiple(Labeled> left, int leftCount, Labeled> right, int rightCount) { ParallelQuery leftQuery = left.Item; @@ -181,7 +180,6 @@ public static void Join_Multiple(Labeled> left, int leftCount [Theory] [OuterLoop] [MemberData(nameof(JoinMultipleData), new[] { 512, 1024 })] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Full framework doesn't preserve the right collection order (.NET core bug fix https://github.com/dotnet/corefx/pull/27930)")] public static void Join_Multiple_Longrunning(Labeled> left, int leftCount, Labeled> right, int rightCount) { Join_Multiple(left, leftCount, right, rightCount); @@ -208,7 +206,6 @@ protected override int GetExpectedSeenLeftCount(int leftCount, int rightCount) [Theory] [MemberData(nameof(JoinMultipleData), new[] { 2, KeyFactor - 1, KeyFactor, KeyFactor + 1, KeyFactor * 2 - 1, KeyFactor * 2, KeyFactor * 2 + 1 })] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Full framework doesn't preserve the right collection order (.NET core bug fix https://github.com/dotnet/corefx/pull/27930)")] public static void Join_Multiple_LeftWithOrderingColisions(Labeled> left, int leftCount, Labeled> right, int rightCount) { LeftOrderingCollisionTestWithOrderedRight validator = new LeftOrderingCollisionTestWithOrderedRight(); @@ -219,7 +216,6 @@ public static void Join_Multiple_LeftWithOrderingColisions(Labeled> left, int leftCount, Labeled> right, int rightCount) { Join_Multiple_LeftWithOrderingColisions(left, leftCount, right, rightCount); @@ -245,7 +241,6 @@ protected override int GetExpectedSeenLeftCount(int leftCount, int rightCount) [Theory] [MemberData(nameof(JoinOrderedLeftUnorderedRightData), new[] { 2, KeyFactor - 1, KeyFactor, KeyFactor + 1, KeyFactor * 2 - 1, KeyFactor * 2, KeyFactor * 2 + 1 })] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Full framework doesn't preserve grouping of order-identical left keys through repartitioning (see https://github.com/dotnet/corefx/pull/27930#issuecomment-372084741)")] public static void Join_Multiple_LeftWithOrderingColisions_UnorderedRight(Labeled> left, int leftCount, Labeled> right, int rightCount) { LeftOrderingCollisionTestWithUnorderedRight validator = new LeftOrderingCollisionTestWithUnorderedRight(); @@ -256,7 +251,6 @@ public static void Join_Multiple_LeftWithOrderingColisions_UnorderedRight(Labele [Theory] [OuterLoop] [MemberData(nameof(JoinOrderedLeftUnorderedRightData), new[] { 256, 512 })] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Full framework doesn't preserve grouping of order-identical left keys through repartitioning (see https://github.com/dotnet/corefx/pull/27930#issuecomment-372084741)")] public static void Join_Multiple_LeftWithOrderingColisions_UnorderedRight_Longrunning(Labeled> left, int leftCount, Labeled> right, int rightCount) { Join_Multiple_LeftWithOrderingColisions_UnorderedRight(left, leftCount, right, rightCount); @@ -300,7 +294,6 @@ public static void Join_Unordered_CustomComparator_Longrunning() [Theory] [MemberData(nameof(JoinMultipleData), new[] { 0, 1, 2, KeyFactor * 2 })] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Full framework doesn't preserve the right collection order (.NET core bug fix https://github.com/dotnet/corefx/pull/27930)")] public static void Join_CustomComparator(Labeled> left, int leftCount, Labeled> right, int rightCount) { ParallelQuery leftQuery = left.Item; @@ -333,7 +326,6 @@ public static void Join_CustomComparator(Labeled> left, int l [Theory] [OuterLoop] [MemberData(nameof(JoinMultipleData), new[] { 512, 1024 })] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Full framework doesn't preserve the right collection order (.NET core bug fix https://github.com/dotnet/corefx/pull/27930)")] public static void Join_CustomComparator_Longrunning(Labeled> left, int leftCount, Labeled> right, int rightCount) { Join_CustomComparator(left, leftCount, right, rightCount); @@ -366,7 +358,6 @@ protected override int GetExpectedSeenLeftCount(int leftCount, int rightCount) [Theory] [MemberData(nameof(JoinMultipleData), new[] { 2, KeyFactor - 1, KeyFactor, KeyFactor + 1, KeyFactor * 2 - 1, KeyFactor * 2, KeyFactor * 2 + 1 })] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Full framework doesn't preserve the right collection order (.NET core bug fix https://github.com/dotnet/corefx/pull/27930)")] public static void Join_CustomComparator_LeftWithOrderingColisions(Labeled> left, int leftCount, Labeled> right, int rightCount) { LeftOrderingCollisionTestWithOrderedRightAndCustomComparator validator = new LeftOrderingCollisionTestWithOrderedRightAndCustomComparator(); @@ -377,7 +368,6 @@ public static void Join_CustomComparator_LeftWithOrderingColisions(Labeled> left, int leftCount, Labeled> right, int rightCount) { Join_CustomComparator_LeftWithOrderingColisions(left, leftCount, right, rightCount); @@ -410,7 +400,6 @@ protected override int GetExpectedSeenLeftCount(int leftCount, int rightCount) [Theory] [MemberData(nameof(JoinOrderedLeftUnorderedRightData), new[] { 2, KeyFactor - 1, KeyFactor, KeyFactor + 1, KeyFactor * 2 - 1, KeyFactor * 2, KeyFactor * 2 + 1 })] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Full framework doesn't preserve grouping of order-identical left keys through repartitioning (see https://github.com/dotnet/corefx/pull/27930#issuecomment-372084741)")] public static void Join_CustomComparator_LeftWithOrderingColisions_UnorderedRight(Labeled> left, int leftCount, Labeled> right, int rightCount) { LeftOrderingCollisionTestWithUnorderedRightAndCustomComparator validator = new LeftOrderingCollisionTestWithUnorderedRightAndCustomComparator(); @@ -421,7 +410,6 @@ public static void Join_CustomComparator_LeftWithOrderingColisions_UnorderedRigh [Theory] [OuterLoop] [MemberData(nameof(JoinOrderedLeftUnorderedRightData), new[] { 256 })] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Full framework doesn't preserve grouping of order-identical left keys through repartitioning (see https://github.com/dotnet/corefx/pull/27930#issuecomment-372084741)")] public static void Join_CustomComparator_LeftWithOrderingColisions_UnorderedRight_Longrunning(Labeled> left, int leftCount, Labeled> right, int rightCount) { Join_CustomComparator_LeftWithOrderingColisions_UnorderedRight(left, leftCount, right, rightCount); diff --git a/src/System.Linq.Parallel/tests/QueryOperators/OrderByThenByTests.cs b/src/System.Linq.Parallel/tests/QueryOperators/OrderByThenByTests.cs index 50a731e0426d..796d6581f4bf 100644 --- a/src/System.Linq.Parallel/tests/QueryOperators/OrderByThenByTests.cs +++ b/src/System.Linq.Parallel/tests/QueryOperators/OrderByThenByTests.cs @@ -375,7 +375,6 @@ public static void OrderBy_ExtremeComparer(Labeled> labeled, [MemberData(nameof(Sources.Ranges), new[] { 0, 1, 2, 16 }, MemberType = typeof(Sources))] [MemberData(nameof(OrderByRandomData), new[] { 0, 1, 2, 16 })] [MemberData(nameof(UnorderedSources.Ranges), new[] { 0, 1, 2, 16 }, MemberType = typeof(UnorderedSources))] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "https://github.com/dotnet/corefx/issues/18141")] // Regression test for the PLINQ version of #2239 - comparer returning max/min value. public static void OrderByDescending_ExtremeComparer(Labeled> labeled, int count) { @@ -391,7 +390,6 @@ public static void OrderByDescending_ExtremeComparer(Labeled> [MemberData(nameof(Sources.Ranges), new[] { 0, 1, 2, 16 }, MemberType = typeof(Sources))] [MemberData(nameof(OrderByRandomData), new[] { 0, 1, 2, 16 })] [MemberData(nameof(UnorderedSources.Ranges), new[] { 0, 1, 2, 16 }, MemberType = typeof(UnorderedSources))] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Validates .NET Core bug fix https://github.com/dotnet/corefx/pull/2305")] public static void OrderBy_NotPipelined_ExtremeComparer(Labeled> labeled, int count) { int prev = 0; @@ -402,7 +400,6 @@ public static void OrderBy_NotPipelined_ExtremeComparer(Labeled> labeled, int count) { int prev = count - 1; @@ -950,7 +947,6 @@ public static void ThenByDescending_NotPipelined_CustomComparator_Longrunning(La [MemberData(nameof(Sources.Ranges), new[] { 0, 1, 2, 16 }, MemberType = typeof(Sources))] [MemberData(nameof(OrderByRandomData), new[] { 0, 1, 2, 16 })] [MemberData(nameof(UnorderedSources.Ranges), new[] { 0, 1, 2, 16 }, MemberType = typeof(UnorderedSources))] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Validates .NET Core bug fix https://github.com/dotnet/corefx/pull/2305")] // Regression test for the PLINQ version of #2239 - comparer returning max/min value. public static void ThenBy_ExtremeComparer(Labeled> labeled, int count) { @@ -966,7 +962,6 @@ public static void ThenBy_ExtremeComparer(Labeled> labeled, i [MemberData(nameof(Sources.Ranges), new[] { 0, 1, 2, 16 }, MemberType = typeof(Sources))] [MemberData(nameof(OrderByRandomData), new[] { 0, 1, 2, 16 })] [MemberData(nameof(UnorderedSources.Ranges), new[] { 0, 1, 2, 16 }, MemberType = typeof(UnorderedSources))] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Validates .NET Core bug fix https://github.com/dotnet/corefx/pull/2305")] // Regression test for the PLINQ version of #2239 - comparer returning max/min value. public static void ThenByDescending_ExtremeComparer(Labeled> labeled, int count) { @@ -981,7 +976,6 @@ public static void ThenByDescending_ExtremeComparer(Labeled> [Theory] [MemberData(nameof(Sources.Ranges), new[] { 0, 1, 2, 16 }, MemberType = typeof(Sources))] [MemberData(nameof(UnorderedSources.Ranges), new[] { 0, 1, 2, 16 }, MemberType = typeof(UnorderedSources))] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Validates .NET Core bug fix https://github.com/dotnet/corefx/pull/2305")] public static void ThenBy_NotPipelined_ExtremeComparer(Labeled> labeled, int count) { int prev = 0; @@ -992,7 +986,6 @@ public static void ThenBy_NotPipelined_ExtremeComparer(Labeled> labeled, int count) { int prev = count - 1; diff --git a/src/System.Linq.Parallel/tests/QueryOperators/SumTests.cs b/src/System.Linq.Parallel/tests/QueryOperators/SumTests.cs index 9409c9d9b011..ce75e075305a 100644 --- a/src/System.Linq.Parallel/tests/QueryOperators/SumTests.cs +++ b/src/System.Linq.Parallel/tests/QueryOperators/SumTests.cs @@ -126,7 +126,6 @@ public static void Sum_Long_Overflow() [InlineData(1)] [InlineData(2)] [InlineData(16)] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, ".NET Core bug fix https://github.com/dotnet/corefx/pull/1215")] public static void Sum_Float(int count) { Assert.Equal(Functions.SumRange(0, count), ParallelEnumerable.Range(0, count).Select(x => (float)x).Sum()); @@ -139,7 +138,6 @@ public static void Sum_Float(int count) [OuterLoop] [InlineData(1024 * 4)] [InlineData(1024 * 64)] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, ".NET Core bug fix https://github.com/dotnet/corefx/pull/1215")] public static void Sum_Float_Longrunning(int count) { Sum_Float(count); diff --git a/src/System.Linq.Parallel/tests/QueryOperators/ToArrayTests.cs b/src/System.Linq.Parallel/tests/QueryOperators/ToArrayTests.cs index 3f866a2babfc..c7f1b49cb0ac 100644 --- a/src/System.Linq.Parallel/tests/QueryOperators/ToArrayTests.cs +++ b/src/System.Linq.Parallel/tests/QueryOperators/ToArrayTests.cs @@ -46,7 +46,6 @@ public static void ToArray_Longrunning(Labeled> labeled, int } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, ".NET Core bug fix https://github.com/dotnet/corefx/pull/2307")] public static void ToArray_OperationCanceledException_PreCanceled() { AssertThrows.AlreadyCanceled(source => source.ToArray()); diff --git a/src/System.Linq.Parallel/tests/System.Linq.Parallel.Tests.csproj b/src/System.Linq.Parallel/tests/System.Linq.Parallel.Tests.csproj index b4f438fda701..39c89e643607 100644 --- a/src/System.Linq.Parallel/tests/System.Linq.Parallel.Tests.csproj +++ b/src/System.Linq.Parallel/tests/System.Linq.Parallel.Tests.csproj @@ -1,10 +1,8 @@ {A7074928-82C3-4739-88FE-9B528977950C} - - true true - netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release;uap-Debug;uap-Release + netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release diff --git a/src/System.Linq.Queryable/tests/Configurations.props b/src/System.Linq.Queryable/tests/Configurations.props index 2bc19ff4170e..acf56fa2750e 100644 --- a/src/System.Linq.Queryable/tests/Configurations.props +++ b/src/System.Linq.Queryable/tests/Configurations.props @@ -1,8 +1,8 @@  - netstandard; netcoreapp; + uap; \ No newline at end of file diff --git a/src/System.Linq.Queryable/tests/EnumerableQueryTests.cs b/src/System.Linq.Queryable/tests/EnumerableQueryTests.cs index d450acc6820a..919f6649f325 100644 --- a/src/System.Linq.Queryable/tests/EnumerableQueryTests.cs +++ b/src/System.Linq.Queryable/tests/EnumerableQueryTests.cs @@ -20,7 +20,6 @@ public void NullExpressionAllowed() } [Fact] - [ActiveIssue("dotnet/corefx #16916", TargetFrameworkMonikers.NetFramework)] //This test hangs forever in query.GetEnumerator() public void NullEnumerableConstantNullExpression() { IQueryable query = new EnumerableQuery((IEnumerable)null); diff --git a/src/System.Linq.Queryable/tests/QueryFromExpressionTests.cs b/src/System.Linq.Queryable/tests/QueryFromExpressionTests.cs index c125de3fe15d..42931d1bdd5a 100644 --- a/src/System.Linq.Queryable/tests/QueryFromExpressionTests.cs +++ b/src/System.Linq.Queryable/tests/QueryFromExpressionTests.cs @@ -521,7 +521,7 @@ public void NonGeneric() Assert.Equal(new[] { 1, 2, 3 }, q.Cast()); } - [Fact, SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Desktop Framework doesn't support ConditionalExpression in EnumerableQuery")] + [Fact] public void ExplicitlyTypedConditional() { Expression call = Expression.Call( @@ -539,7 +539,7 @@ public void ExplicitlyTypedConditional() Assert.Equal(new long[] { 2, 3, 1 }, q); } - [Fact, SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Desktop Framework doesn't support BlockExpression in EnumerableQuery")] + [Fact] public void Block() { Expression block = Expression.Block( @@ -550,7 +550,7 @@ public void Block() Assert.Equal(Enumerable.Range(0, 2), q); } - [Fact, SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Desktop Framework doesn't support BlockExpression in EnumerableQuery")] + [Fact] public void ExplicitlyTypedBlock() { Expression block = Expression.Block( @@ -562,7 +562,7 @@ public void ExplicitlyTypedBlock() Assert.Equal(Enumerable.Range(0, 2), q); } - [Fact, SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Desktop Framework doesn't support BlockExpression in EnumerableQuery")] + [Fact] public void Return() { LabelTarget target = Expression.Label(typeof(IQueryable)); @@ -574,7 +574,7 @@ public void Return() Assert.Equal(Enumerable.Range(0, 2), q); } - [Fact, SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Desktop Framework doesn't support BlockExpression in EnumerableQuery")] + [Fact] public void ReturnArray() { LabelTarget target = Expression.Label(typeof(IQueryable)); @@ -586,7 +586,7 @@ public void ReturnArray() Assert.Equal(new[] { 1, 1, 2, 3, 5, 8 }, q); } - [Fact, SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Desktop Framework doesn't support BlockExpression in EnumerableQuery")] + [Fact] public void ReturnOrdered() { LabelTarget target = Expression.Label(typeof(IQueryable)); @@ -598,7 +598,7 @@ public void ReturnOrdered() Assert.Equal(new[] { 2, 1, 0 }, q); } - [Fact, SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Desktop Framework doesn't support BlockExpression in EnumerableQuery")] + [Fact] public void ReturnOrderedAfterAsQueryable() { LabelTarget target = Expression.Label(typeof(IQueryable)); @@ -610,7 +610,7 @@ public void ReturnOrderedAfterAsQueryable() Assert.Equal(new[] { 2, 1, 0 }, q); } - [Fact, SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Desktop Framework doesn't support BlockExpression in EnumerableQuery")] + [Fact] public void ReturnNonQueryable() { LabelTarget target = Expression.Label(typeof(int)); @@ -626,7 +626,7 @@ public void ReturnNonQueryable() Assert.Equal(3, _prov.Execute(block)); } - [Fact, SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Desktop Framework doesn't support BlockExpression in EnumerableQuery")] + [Fact] public void ReturnNonQueryableUntyped() { LabelTarget target = Expression.Label(typeof(int)); diff --git a/src/System.Linq.Queryable/tests/System.Linq.Queryable.Tests.csproj b/src/System.Linq.Queryable/tests/System.Linq.Queryable.Tests.csproj index 9044074e9b46..0167bac5c06c 100644 --- a/src/System.Linq.Queryable/tests/System.Linq.Queryable.Tests.csproj +++ b/src/System.Linq.Queryable/tests/System.Linq.Queryable.Tests.csproj @@ -1,7 +1,7 @@  {7B88D79B-B799-4116-A7D0-AED572540CD4} - netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release + netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release diff --git a/src/System.Linq/tests/ConcatTests.cs b/src/System.Linq/tests/ConcatTests.cs index eddd8ff9499a..8624dee6d76d 100644 --- a/src/System.Linq/tests/ConcatTests.cs +++ b/src/System.Linq/tests/ConcatTests.cs @@ -223,7 +223,6 @@ public void ManyConcats(IEnumerable> sources, IEnumerable [Theory] [MemberData(nameof(ManyConcatsData))] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Stack overflows on desktop due to inefficient Concat implementation")] public void ManyConcatsRunOnce(IEnumerable> sources, IEnumerable expected) { foreach (var transform in IdentityTransforms()) @@ -254,16 +253,7 @@ public void CountOfConcatIteratorShouldThrowExceptionOnIntegerOverflow() Action assertThrows = (testCode) => { - // The full .NET Framework uses unsigned arithmetic summing up collection counts. - // See https://github.com/dotnet/corefx/pull/11492. - if (PlatformDetection.IsFullFramework || PlatformDetection.IsUap) - { - testCode(); - } - else - { - Assert.Throws(testCode); - } + Assert.Throws(testCode); }; // We need to use checked arithmetic summing up the collections' counts. @@ -284,7 +274,6 @@ public void CountOfConcatIteratorShouldThrowExceptionOnIntegerOverflow() [Fact] [OuterLoop("This test tries to catch stack overflows and can take a long time.")] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Stack overflows on desktop due to inefficient Concat implementation")] public void CountOfConcatCollectionChainShouldBeResilientToStackOverflow() { // Currently, .Concat chains of 3+ ICollections are represented as a @@ -319,7 +308,6 @@ public void CountOfConcatCollectionChainShouldBeResilientToStackOverflow() [Fact] [OuterLoop("This test tries to catch stack overflows and can take a long time.")] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Stack overflows on desktop due to inefficient Concat implementation")] public void CountOfConcatEnumerableChainShouldBeResilientToStackOverflow() { // Concat chains where one or more of the inputs is not an ICollection @@ -355,7 +343,6 @@ public void CountOfConcatEnumerableChainShouldBeResilientToStackOverflow() [Fact] [OuterLoop("This test tries to catch stack overflows and can take a long time.")] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Stack overflows on desktop due to inefficient Concat implementation")] public void GettingFirstEnumerableShouldBeResilientToStackOverflow() { // When MoveNext() is first called on a chain of 3+ Concats, we have to @@ -384,7 +371,6 @@ public void GettingFirstEnumerableShouldBeResilientToStackOverflow() [Fact] [OuterLoop("This test tries to catch stack overflows and can take a long time.")] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Stack overflows on desktop due to inefficient Concat implementation")] public void GetEnumerableOfConcatCollectionChainFollowedByEnumerableNodeShouldBeResilientToStackOverflow() { // Since concatenating even 1 lazy enumerable ruins the ability for ToArray/ToList diff --git a/src/System.Linq/tests/Configurations.props b/src/System.Linq/tests/Configurations.props index 5ef94261c515..19236e72c58f 100644 --- a/src/System.Linq/tests/Configurations.props +++ b/src/System.Linq/tests/Configurations.props @@ -2,8 +2,6 @@ netcoreapp; - netstandard; - uapaot; diff --git a/src/System.Linq/tests/ConsistencyTests.cs b/src/System.Linq/tests/ConsistencyTests.cs index ea02f4f0feab..57b89b3736fc 100644 --- a/src/System.Linq/tests/ConsistencyTests.cs +++ b/src/System.Linq/tests/ConsistencyTests.cs @@ -47,15 +47,6 @@ private static IEnumerable GetExcludedMethods() "ToHashSet" }; - if (PlatformDetection.IsFullFramework) - { - result = result.Concat(new[] - { - nameof(Enumerable.Append), - nameof(Enumerable.Prepend) - }); - } - return result; } diff --git a/src/System.Linq/tests/EmptyPartitionTests.cs b/src/System.Linq/tests/EmptyPartitionTests.cs index 2596bb8cdced..a605b8ab7cdd 100644 --- a/src/System.Linq/tests/EmptyPartitionTests.cs +++ b/src/System.Linq/tests/EmptyPartitionTests.cs @@ -27,7 +27,7 @@ public void SingleInstance() { // .NET Core returns the instance as an optimization. // see https://github.com/dotnet/corefx/pull/2401. - Assert.Equal(!PlatformDetection.IsFullFramework, ReferenceEquals(GetEmptyPartition(), GetEmptyPartition())); + Assert.Equal(true, ReferenceEquals(GetEmptyPartition(), GetEmptyPartition())); } [Fact] @@ -97,7 +97,6 @@ public void ToListEmpty() Assert.Empty(GetEmptyPartition().ToList()); } - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "netfx's Take returns a compiler-generated iterator whose Reset throws.")] [Fact] public void ResetIsNop() { diff --git a/src/System.Linq/tests/GroupByTests.DebuggerAttributes.cs b/src/System.Linq/tests/GroupByTests.DebuggerAttributes.cs index 39dff0f3131b..d8b62048db80 100644 --- a/src/System.Linq/tests/GroupByTests.DebuggerAttributes.cs +++ b/src/System.Linq/tests/GroupByTests.DebuggerAttributes.cs @@ -13,7 +13,6 @@ public partial class GroupByTests : EnumerableTests { [Theory] [MemberData(nameof(DebuggerAttributesValid_Data))] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Grouping doesn't have a Debugger proxy in the full .NET Framework. See https://github.com/dotnet/corefx/issues/14790.")] public void DebuggerAttributesValid(IGrouping grouping, string keyString) { Assert.Equal($"Key = {keyString}", DebuggerAttributes.ValidateDebuggerDisplayReferences(grouping)); diff --git a/src/System.Linq/tests/MinTests.cs b/src/System.Linq/tests/MinTests.cs index d583aa8dde9b..1aac897b1ab3 100644 --- a/src/System.Linq/tests/MinTests.cs +++ b/src/System.Linq/tests/MinTests.cs @@ -127,10 +127,7 @@ public static IEnumerable Min_Float_TestData() // as nothing can be less than float.NaN. See https://github.com/dotnet/corefx/pull/2426. // Without this optimization, we would iterate through int.MaxValue elements, which takes // a long time. - if (!PlatformDetection.IsFullFramework) - { - yield return new object[] { Enumerable.Repeat(float.NaN, int.MaxValue), float.NaN }; - } + yield return new object[] { Enumerable.Repeat(float.NaN, int.MaxValue), float.NaN }; yield return new object[] { Enumerable.Repeat(float.NaN, 3), float.NaN }; // Normally NaN < anything is false, as is anything < NaN @@ -183,10 +180,7 @@ public static IEnumerable Min_Double_TestData() // as nothing can be less than double.NaN. See https://github.com/dotnet/corefx/pull/2426. // Without this optimization, we would iterate through int.MaxValue elements, which takes // a long time. - if (!PlatformDetection.IsFullFramework) - { - yield return new object[] { Enumerable.Repeat(double.NaN, int.MaxValue), double.NaN }; - } + yield return new object[] { Enumerable.Repeat(double.NaN, int.MaxValue), double.NaN }; yield return new object[] { Enumerable.Repeat(double.NaN, 3), double.NaN }; yield return new object[] { new double[] { double.NaN, 6.8, 9.4, 10, 0, -5.6 }, double.NaN }; @@ -360,10 +354,7 @@ public static IEnumerable Min_NullableFloat_TestData() // as nothing can be less than float.NaN. See https://github.com/dotnet/corefx/pull/2426. // Without this optimization, we would iterate through int.MaxValue elements, which takes // a long time. - if (!PlatformDetection.IsFullFramework) - { - yield return new object[] { Enumerable.Repeat((float?)float.NaN, int.MaxValue), float.NaN }; - } + yield return new object[] { Enumerable.Repeat((float?)float.NaN, int.MaxValue), float.NaN }; yield return new object[] { Enumerable.Repeat((float?)float.NaN, 3), float.NaN }; } @@ -410,10 +401,7 @@ public static IEnumerable Min_NullableDouble_TestData() // as nothing can be less than double.NaN. See https://github.com/dotnet/corefx/pull/2426. // Without this optimization, we would iterate through int.MaxValue elements, which takes // a long time. - if (!PlatformDetection.IsFullFramework) - { - yield return new object[] { Enumerable.Repeat((double?)double.NaN, int.MaxValue), double.NaN }; - } + yield return new object[] { Enumerable.Repeat((double?)double.NaN, int.MaxValue), double.NaN }; yield return new object[] { Enumerable.Repeat((double?)double.NaN, 3), double.NaN }; } diff --git a/src/System.Linq/tests/OrderByDescendingTests.cs b/src/System.Linq/tests/OrderByDescendingTests.cs index 5d333be122ee..36234373b67d 100644 --- a/src/System.Linq/tests/OrderByDescendingTests.cs +++ b/src/System.Linq/tests/OrderByDescendingTests.cs @@ -161,14 +161,7 @@ public void OrderByExtremeComparer() // The full .NET Framework has a bug where the input is incorrectly ordered if the comparer // returns int.MaxValue or int.MinValue. See https://github.com/dotnet/corefx/pull/2240. IEnumerable ordered = outOfOrder.OrderByDescending(i => i, new ExtremeComparer()).ToArray(); - if (PlatformDetection.IsFullFramework) - { - Assert.Equal(new[] { 3, 5, 1, 4, 9, 2, 0, 8, 7, 6 }, ordered); - } - else - { - Assert.Equal(Enumerable.Range(0, 10).Reverse(), ordered); - } + Assert.Equal(Enumerable.Range(0, 10).Reverse(), ordered); } [Fact] diff --git a/src/System.Linq/tests/SelectManyTests.cs b/src/System.Linq/tests/SelectManyTests.cs index 1aac9fca57ac..af732faa5404 100644 --- a/src/System.Linq/tests/SelectManyTests.cs +++ b/src/System.Linq/tests/SelectManyTests.cs @@ -454,7 +454,7 @@ public void DisposeAfterEnumeration(int sourceLength, int subLength) // .NET Core fixes an oversight where we wouldn't properly dispose // the SelectMany iterator. See https://github.com/dotnet/corefx/pull/13942. - int expectedCurrent = PlatformDetection.IsFullFramework ? subLength : 0; + int expectedCurrent = 0; Assert.Equal(expectedCurrent, e.Current); Assert.False(e.MoveNext()); Assert.Equal(expectedCurrent, e.Current); diff --git a/src/System.Linq/tests/SelectTests.cs b/src/System.Linq/tests/SelectTests.cs index ca84c7e92811..b74c842beb6e 100644 --- a/src/System.Linq/tests/SelectTests.cs +++ b/src/System.Linq/tests/SelectTests.cs @@ -741,14 +741,7 @@ public void Select_ResetCalledOnEnumerator_ThrowsException() // The.NET full framework throws a NotImplementedException. // See https://github.com/dotnet/corefx/pull/2959. - if (PlatformDetection.IsFullFramework) - { - Assert.Throws(() => enumerator.Reset()); - } - else - { - Assert.Throws(() => enumerator.Reset()); - } + Assert.Throws(() => enumerator.Reset()); } [Fact] diff --git a/src/System.Linq/tests/ShortCircuitingTests.cs b/src/System.Linq/tests/ShortCircuitingTests.cs index b3b24bed5f5b..c76a941b13b5 100644 --- a/src/System.Linq/tests/ShortCircuitingTests.cs +++ b/src/System.Linq/tests/ShortCircuitingTests.cs @@ -60,7 +60,7 @@ public void ListLastDoesntCheckAll() // .NET Core shortcircuits as an optimization. // See https://github.com/dotnet/corefx/pull/2350. - Assert.Equal(PlatformDetection.IsFullFramework ? 10 : 4, pred.Calls); + Assert.Equal(4, pred.Calls); } [Fact] @@ -72,7 +72,7 @@ public void MinDoubleDoesntCheckAll() // .NET Core shortcircuits as an optimization. // See https://github.com/dotnet/corefx/pull/2350. - Assert.Equal(PlatformDetection.IsFullFramework ? 10 : 5, tracker.Moves); + Assert.Equal(5, tracker.Moves); } [Fact] @@ -84,7 +84,7 @@ public void MinNullableDoubleDoesntCheckAll() // .NET Core shortcircuits as an optimization. // See https://github.com/dotnet/corefx/pull/2350. - Assert.Equal(PlatformDetection.IsFullFramework ? 10 : 5, tracker.Moves); + Assert.Equal(5, tracker.Moves); } [Fact] @@ -96,7 +96,7 @@ public void MinSingleDoesntCheckAll() // .NET Core shortcircuits as an optimization. // See https://github.com/dotnet/corefx/pull/2350. - Assert.Equal(PlatformDetection.IsFullFramework ? 10 : 5, tracker.Moves); + Assert.Equal(5, tracker.Moves); } [Fact] @@ -108,7 +108,7 @@ public void MinNullableSingleDoesntCheckAll() // .NET Core shortcircuits as an optimization. // See https://github.com/dotnet/corefx/pull/2350. - Assert.Equal(PlatformDetection.IsFullFramework ? 10 : 5, tracker.Moves); + Assert.Equal(5, tracker.Moves); } [Fact] @@ -120,8 +120,8 @@ public void SingleWithPredicateDoesntCheckAll() // .NET Core shortcircuits as an optimization. // See https://github.com/dotnet/corefx/pull/2350. - Assert.Equal(PlatformDetection.IsFullFramework ? 10 : 4, tracker.Moves); - Assert.Equal(PlatformDetection.IsFullFramework ? 10 : 4, pred.Calls); + Assert.Equal(4, tracker.Moves); + Assert.Equal(4, pred.Calls); } [Fact] @@ -133,8 +133,8 @@ public void SingleOrDefaultWithPredicateDoesntCheckAll() // .NET Core shortcircuits as an optimization. // See https://github.com/dotnet/corefx/pull/2350. - Assert.Equal(PlatformDetection.IsFullFramework ? 10 : 4, tracker.Moves); - Assert.Equal(PlatformDetection.IsFullFramework ? 10 : 4, pred.Calls); + Assert.Equal(4, tracker.Moves); + Assert.Equal(4, pred.Calls); } [Fact] @@ -149,8 +149,8 @@ public void SingleWithPredicateWorksLikeWhereFollowedBySingle() // .NET Core shortcircuits as an optimization. // See https://github.com/dotnet/corefx/pull/2350. - Assert.Equal(PlatformDetection.IsFullFramework ? 4 : tracker0.Moves, tracker1.Moves); - Assert.Equal(PlatformDetection.IsFullFramework ? 4 : pred0.Calls, pred1.Calls); + Assert.Equal(tracker0.Moves, tracker1.Moves); + Assert.Equal(pred0.Calls, pred1.Calls); } [Fact] @@ -165,8 +165,8 @@ public void SingleOrDefaultWithPredicateWorksLikeWhereFollowedBySingleOrDefault( // .NET Core shortcircuits as an optimization. // See https://github.com/dotnet/corefx/pull/2350. - Assert.Equal(PlatformDetection.IsFullFramework ? 4 : tracker0.Moves, tracker1.Moves); - Assert.Equal(PlatformDetection.IsFullFramework ? 4 : pred0.Calls, pred1.Calls); + Assert.Equal(tracker0.Moves, tracker1.Moves); + Assert.Equal(pred0.Calls, pred1.Calls); } } } diff --git a/src/System.Linq/tests/System.Linq.Tests.csproj b/src/System.Linq/tests/System.Linq.Tests.csproj index cc88ba94854c..f6110313484f 100644 --- a/src/System.Linq/tests/System.Linq.Tests.csproj +++ b/src/System.Linq/tests/System.Linq.Tests.csproj @@ -1,9 +1,9 @@  {7C70BB15-870B-4946-8098-625DACD645A6} - netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release;uapaot-Debug;uapaot-Release + netcoreapp-Debug;netcoreapp-Release - + @@ -11,8 +11,6 @@ - - @@ -73,10 +71,6 @@ Common\System\Linq\SkipTakeData.cs - - - Common\System\Diagnostics\DebuggerAttributes.cs diff --git a/src/System.Linq/tests/ToArrayTests.cs b/src/System.Linq/tests/ToArrayTests.cs index 11361cbdf169..bef453688061 100644 --- a/src/System.Linq/tests/ToArrayTests.cs +++ b/src/System.Linq/tests/ToArrayTests.cs @@ -33,8 +33,7 @@ public void ToArray_UseArrayEmptyWhenEmpty() // .NET Core returns the instance as an optimization. // see https://github.com/dotnet/corefx/pull/2401. - Action assertSame = (objA, objB) => - Assert.Equal(!PlatformDetection.IsFullFramework, ReferenceEquals(objA, objB)); + Action assertSame = (objA, objB) => Assert.Equal(true, ReferenceEquals(objA, objB)); assertSame(emptySourceArray.ToArray(), emptySourceArray.ToArray()); @@ -220,7 +219,7 @@ public void EmptyArraysSameObject() { // .NET Core returns the instance as an optimization. // see https://github.com/dotnet/corefx/pull/2401. - Assert.Equal(!PlatformDetection.IsFullFramework, ReferenceEquals(Enumerable.Empty().ToArray(), Enumerable.Empty().ToArray())); + Assert.Equal(true, ReferenceEquals(Enumerable.Empty().ToArray(), Enumerable.Empty().ToArray())); var array = new int[0]; Assert.NotSame(array, array.ToArray()); @@ -366,7 +365,7 @@ private enum Enum1 Third } - [Fact, SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "The full .NET framework disallows copying assignable value types. See corefx#13816")] + [Fact] public void ToArray_Cast() { Enum0[] source = { Enum0.First, Enum0.Second, Enum0.Third }; diff --git a/src/System.Linq/tests/ToLookupTests.DebuggerAttributes.cs b/src/System.Linq/tests/ToLookupTests.DebuggerAttributes.cs index 09d839030e15..30f521f47b45 100644 --- a/src/System.Linq/tests/ToLookupTests.DebuggerAttributes.cs +++ b/src/System.Linq/tests/ToLookupTests.DebuggerAttributes.cs @@ -14,7 +14,6 @@ public partial class ToLookupTests : EnumerableTests { [Theory] [MemberData(nameof(DebuggerAttributesValid_Data))] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Lookup doesn't have a Debugger proxy in the full .NET framework. See https://github.com/dotnet/corefx/issues/14790.")] public void DebuggerAttributesValid(ILookup lookup) { Assert.Equal($"Count = {lookup.Count}", DebuggerAttributes.ValidateDebuggerDisplayReferences(lookup)); diff --git a/src/System.Linq/tests/WhereTests.cs b/src/System.Linq/tests/WhereTests.cs index 465c9a5fcd7d..ecdc672afccb 100644 --- a/src/System.Linq/tests/WhereTests.cs +++ b/src/System.Linq/tests/WhereTests.cs @@ -821,14 +821,7 @@ public void Select_ResetEnumerator_ThrowsException() // The full .NET Framework throws a NotImplementedException. // See https://github.com/dotnet/corefx/pull/2959. - if (PlatformDetection.IsFullFramework) - { - Assert.Throws(() => enumerator.Reset()); - } - else - { - Assert.Throws(() => enumerator.Reset()); - } + Assert.Throws(() => enumerator.Reset()); } [Fact] diff --git a/src/System.Management/tests/Configurations.props b/src/System.Management/tests/Configurations.props index 9b3928d692a3..c03a496a43b8 100644 --- a/src/System.Management/tests/Configurations.props +++ b/src/System.Management/tests/Configurations.props @@ -1,8 +1,8 @@  - netcoreapp-Windows_NT; - netfx; + netcoreapp-Windows_NT; + netfx; diff --git a/src/System.Memory/tests/Memory/MemoryManager.cs b/src/System.Memory/tests/Memory/MemoryManager.cs index aa007bd8fa81..f0710656ff3c 100644 --- a/src/System.Memory/tests/Memory/MemoryManager.cs +++ b/src/System.Memory/tests/Memory/MemoryManager.cs @@ -141,7 +141,6 @@ public static void MemoryManagerPinArray() [Fact] [OuterLoop] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Desktop framework doesn't support large arrays by default.")] public static void MemoryManagerPinLargeArray() { // Early-out: we can only run this test on 64-bit platforms. diff --git a/src/System.Memory/tests/MemoryMarshal/CreateFromPinnedArray.cs b/src/System.Memory/tests/MemoryMarshal/CreateFromPinnedArray.cs index 47c7c933b4d9..5e2609a87365 100644 --- a/src/System.Memory/tests/MemoryMarshal/CreateFromPinnedArray.cs +++ b/src/System.Memory/tests/MemoryMarshal/CreateFromPinnedArray.cs @@ -36,7 +36,6 @@ public static void CreateFromPinnedArrayString() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "This unit test relies on internal implementation details of Memory on netcoreapp.")] public static void CreateFromPinnedArrayIntSliceRemainsPinned() { int[] a = { 90, 91, 92, 93, 94, 95, 96, 97, 98 }; @@ -65,7 +64,6 @@ public static void CreateFromPinnedArrayIntSliceRemainsPinned() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "This unit test relies on internal implementation details of Memory on netcoreapp.")] public static void CreateFromPinnedArrayIntReadOnlyMemorySliceRemainsPinned() { int[] a = { 90, 91, 92, 93, 94, 95, 96, 97, 98 }; diff --git a/src/System.Memory/tests/ReadOnlySpan/ToString.cs b/src/System.Memory/tests/ReadOnlySpan/ToString.cs index 90428084b54d..2e6a27a6d6e0 100644 --- a/src/System.Memory/tests/ReadOnlySpan/ToString.cs +++ b/src/System.Memory/tests/ReadOnlySpan/ToString.cs @@ -88,20 +88,5 @@ public static void ToStringSpanOverSubstringDoesNotReturnOriginal() Assert.NotSame(subString1, subString3); Assert.NotSame(subString2, subString3); } - - // This test is only relevant for portable span - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework, "Optimization only applies to portable span.")] - [Fact] - public static void ToStringSpanOverFullStringReturnsOriginal() - { - string original = TestHelpers.BuildString(10, 42); - ReadOnlySpan span = original.AsSpan(); - - string returnedString = span.ToString(); - string returnedStringUsingSlice = span.Slice(0, original.Length).ToString(); - - Assert.Same(original, returnedString); - Assert.Same(original, returnedStringUsingSlice); - } } } diff --git a/src/System.Memory/tests/System.Memory.Tests.csproj b/src/System.Memory/tests/System.Memory.Tests.csproj index 70766c2a1343..a42220e3199d 100644 --- a/src/System.Memory/tests/System.Memory.Tests.csproj +++ b/src/System.Memory/tests/System.Memory.Tests.csproj @@ -267,11 +267,6 @@ Common\System\MutableDecimal.cs - - - System\SpanExtensions.netstandard.cs - - diff --git a/src/System.Net.Http.WinHttpHandler/tests/FunctionalTests/Configurations.props b/src/System.Net.Http.WinHttpHandler/tests/FunctionalTests/Configurations.props index 611acec17f5f..dd6fb5e9c632 100644 --- a/src/System.Net.Http.WinHttpHandler/tests/FunctionalTests/Configurations.props +++ b/src/System.Net.Http.WinHttpHandler/tests/FunctionalTests/Configurations.props @@ -1,7 +1,9 @@  - netstandard-Windows_NT; + netcoreapp-Windows_NT; + netfx-Windows_NT; + uap-Windows_NT; \ No newline at end of file diff --git a/src/System.Net.Http.WinHttpHandler/tests/FunctionalTests/System.Net.Http.WinHttpHandler.Functional.Tests.csproj b/src/System.Net.Http.WinHttpHandler/tests/FunctionalTests/System.Net.Http.WinHttpHandler.Functional.Tests.csproj index f80508104fd2..3611574af979 100644 --- a/src/System.Net.Http.WinHttpHandler/tests/FunctionalTests/System.Net.Http.WinHttpHandler.Functional.Tests.csproj +++ b/src/System.Net.Http.WinHttpHandler/tests/FunctionalTests/System.Net.Http.WinHttpHandler.Functional.Tests.csproj @@ -1,7 +1,7 @@ {17D5CC82-F72C-4DD2-B6DB-DE7FB2F19C34} - netstandard-Windows_NT-Debug;netstandard-Windows_NT-Release + netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release diff --git a/src/System.Net.Http/tests/FunctionalTests/Configurations.props b/src/System.Net.Http/tests/FunctionalTests/Configurations.props index 0743953b2ee3..3f19907aa644 100644 --- a/src/System.Net.Http/tests/FunctionalTests/Configurations.props +++ b/src/System.Net.Http/tests/FunctionalTests/Configurations.props @@ -3,8 +3,6 @@ netcoreapp-Windows_NT; netcoreapp-Unix; - netstandard-Windows_NT; - netstandard-Unix; uap-Windows_NT; diff --git a/src/System.Net.Http/tests/FunctionalTests/DiagnosticsTests.cs b/src/System.Net.Http/tests/FunctionalTests/DiagnosticsTests.cs index e87f16130682..10b0626fb494 100644 --- a/src/System.Net.Http/tests/FunctionalTests/DiagnosticsTests.cs +++ b/src/System.Net.Http/tests/FunctionalTests/DiagnosticsTests.cs @@ -20,8 +20,6 @@ namespace System.Net.Http.Functional.Tests { using Configuration = System.Net.Test.Common.Configuration; - [ActiveIssue(20470, TargetFrameworkMonikers.UapAot)] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "NetEventSource is only part of .NET Core.")] public abstract class DiagnosticsTest : HttpClientHandlerTestBase { public DiagnosticsTest(ITestOutputHelper output) : base(output) { } diff --git a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.AutoRedirect.cs b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.AutoRedirect.cs index a390e479af65..67ee77e34a56 100644 --- a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.AutoRedirect.cs +++ b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.AutoRedirect.cs @@ -66,7 +66,7 @@ public HttpClientHandlerTest_AutoRedirect(ITestOutputHelper output) : base(outpu [Theory, MemberData(nameof(RedirectStatusCodes))] public async Task GetAsync_AllowAutoRedirectFalse_RedirectFromHttpToHttp_StatusCodeRedirect(int statusCode) { - if (statusCode == 308 && (PlatformDetection.IsFullFramework || IsWinHttpHandler && PlatformDetection.WindowsVersion < 10)) + if (statusCode == 308 && (IsWinHttpHandler && PlatformDetection.WindowsVersion < 10)) { // 308 redirects are not supported on old versions of WinHttp, or on .NET Framework. return; @@ -101,7 +101,7 @@ public async Task AllowAutoRedirect_True_ValidateNewMethodUsedOnRedirection( newMethod = "POST"; } - if (statusCode == 308 && (PlatformDetection.IsFullFramework || IsWinHttpHandler && PlatformDetection.WindowsVersion < 10)) + if (statusCode == 308 && (IsWinHttpHandler && PlatformDetection.WindowsVersion < 10)) { // 308 redirects are not supported on old versions of WinHttp, or on .NET Framework. return; @@ -226,7 +226,7 @@ await LoopbackServer.CreateServerAsync(async (redirServer, redirUrl) => [Theory, MemberData(nameof(RedirectStatusCodes))] public async Task GetAsync_AllowAutoRedirectTrue_RedirectFromHttpToHttp_StatusCodeOK(int statusCode) { - if (statusCode == 308 && (PlatformDetection.IsFullFramework || IsWinHttpHandler && PlatformDetection.WindowsVersion < 10)) + if (statusCode == 308 && (IsWinHttpHandler && PlatformDetection.WindowsVersion < 10)) { // 308 redirects are not supported on old versions of WinHttp, or on .NET Framework. return; @@ -272,7 +272,6 @@ public async Task GetAsync_AllowAutoRedirectTrue_RedirectFromHttpToHttps_StatusC } } - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, ".NET Framework allows HTTPS to HTTP redirection")] [OuterLoop("Uses external server")] [Fact] public async Task GetAsync_AllowAutoRedirectTrue_RedirectFromHttpsToHttp_StatusCodeRedirect() @@ -361,13 +360,6 @@ public async Task GetAsync_MaxAutomaticRedirectionsNServerHops_ThrowsIfTooMany(i _output.WriteLine("Skipping test due to Windows 10 version prior to Version 1703."); return; } - else if (PlatformDetection.IsFullFramework) - { - // Skip this test if running on .NET Framework. Exceeding max redirections will not throw - // exception. Instead, it simply returns the 3xx response. - _output.WriteLine("Skipping test on .NET Framework due to behavior difference."); - return; - } HttpClientHandler handler = CreateHttpClientHandler(); handler.MaxAutomaticRedirections = maxHops; @@ -461,7 +453,6 @@ await TestHelper.WhenAllCompletedOrAnyFailed( } } - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Doesn't handle fragments according to https://tools.ietf.org/html/rfc7231#section-7.1.2")] [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Doesn't handle fragments according to https://tools.ietf.org/html/rfc7231#section-7.1.2")] [Theory] [InlineData("#origFragment", "", "#origFragment", false)] @@ -585,7 +576,7 @@ public async Task HttpClientHandler_CredentialIsNotCredentialCacheAfterRedirect_ [Theory, MemberData(nameof(RedirectStatusCodes))] public async Task GetAsync_CredentialIsCredentialCacheUriRedirect_StatusCodeOK(int statusCode) { - if (statusCode == 308 && (PlatformDetection.IsFullFramework || IsWinHttpHandler && PlatformDetection.WindowsVersion < 10)) + if (statusCode == 308 && (IsWinHttpHandler && PlatformDetection.WindowsVersion < 10)) { // 308 redirects are not supported on old versions of WinHttp, or on .NET Framework. return; @@ -627,7 +618,7 @@ public async Task GetAsync_CredentialIsCredentialCacheUriRedirect_StatusCodeOK(i [Theory, MemberData(nameof(RedirectStatusCodes))] public async Task DefaultHeaders_SetCredentials_ClearedOnRedirect(int statusCode) { - if (statusCode == 308 && (PlatformDetection.IsFullFramework || IsWinHttpHandler && PlatformDetection.WindowsVersion < 10)) + if (statusCode == 308 && (IsWinHttpHandler && PlatformDetection.WindowsVersion < 10)) { // 308 redirects are not supported on old versions of WinHttp, or on .NET Framework. return; diff --git a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Cancellation.cs b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Cancellation.cs index ad834328b0de..ca0fc284df75 100644 --- a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Cancellation.cs +++ b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Cancellation.cs @@ -375,11 +375,9 @@ await LoopbackServerFactory.CreateClientAndServerAsync( Assert.True(cts.Token.IsCancellationRequested, "cts token IsCancellationRequested"); - if (!PlatformDetection.IsFullFramework) - { - // .NET Framework has bug where it doesn't propagate token information. - Assert.True(ex.CancellationToken.IsCancellationRequested, "exception token IsCancellationRequested"); - } + // .NET Framework has bug where it doesn't propagate token information. + Assert.True(ex.CancellationToken.IsCancellationRequested, "exception token IsCancellationRequested"); + clientCanceled.SetResult(true); } }, diff --git a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.ClientCertificates.cs b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.ClientCertificates.cs index be8e265258c5..ed71e1f81987 100644 --- a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.ClientCertificates.cs +++ b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.ClientCertificates.cs @@ -260,7 +260,6 @@ await LoopbackServer.CreateServerAsync(async (server, url) => [Theory] [InlineData(ClientCertificateOption.Manual)] [InlineData(ClientCertificateOption.Automatic)] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Fails with \"Authentication failed\" error.")] public async Task AutomaticOrManual_DoesntFailRegardlessOfWhetherClientCertsAreAvailable(ClientCertificateOption mode) { if (!BackendSupportsCustomCertificateHandling) // can't use [Conditional*] right now as it's evaluated at the wrong time for SocketsHttpHandler diff --git a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Cookies.cs b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Cookies.cs index 9fffe0043f15..569ff2c62962 100644 --- a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Cookies.cs +++ b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Cookies.cs @@ -122,7 +122,6 @@ await LoopbackServerFactory.CreateClientAndServerAsync( }); } - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Netfx handler does not support custom cookie header")] [Fact] public async Task GetAsync_AddCookieHeader_CookieHeaderSent() { @@ -145,7 +144,6 @@ await LoopbackServerFactory.CreateClientAndServerAsync( } [ActiveIssue(30051, TargetFrameworkMonikers.Uap)] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Netfx handler does not support custom cookie header")] [Fact] public async Task GetAsync_AddMultipleCookieHeaders_CookiesSent() { @@ -206,7 +204,6 @@ private string GetCookieValue(HttpRequestData request) return cookieHeaderValue; } - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Netfx handler does not support custom cookie header")] [ConditionalFact] public async Task GetAsync_SetCookieContainerAndCookieHeader_BothCookiesSent() { @@ -242,7 +239,6 @@ await LoopbackServerFactory.CreateServerAsync(async (server, url) => } [ActiveIssue(30051, TargetFrameworkMonikers.Uap)] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Netfx handler does not support custom cookie header")] [ConditionalFact] public async Task GetAsync_SetCookieContainerAndMultipleCookieHeaders_BothCookiesSent() { @@ -628,11 +624,7 @@ public static IEnumerable CookieNamesValuesAndUseCookies() yield return new object[] { "ABC", "123", useCookies }; yield return new object[] { "Hello", "World", useCookies }; yield return new object[] { "foo", "bar", useCookies }; - - if (!PlatformDetection.IsFullFramework) { - yield return new object[] { "Hello World", "value", useCookies }; - } - + yield return new object[] { "Hello World", "value", useCookies }; yield return new object[] { ".AspNetCore.Session", "RAExEmXpoCbueP_QYM", useCookies }; yield return new object[] diff --git a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.DefaultProxyCredentials.cs b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.DefaultProxyCredentials.cs index b568eaea574a..fc26b23aa32c 100644 --- a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.DefaultProxyCredentials.cs +++ b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.DefaultProxyCredentials.cs @@ -47,7 +47,6 @@ public void SetGet_Roundtrips() } } - [ActiveIssue(23702, TargetFrameworkMonikers.NetFramework)] [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "UAP HTTP stack doesn't support .Proxy property")] [Fact] public async Task ProxyExplicitlyProvided_DefaultCredentials_Ignored() diff --git a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.MaxConnectionsPerServer.cs b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.MaxConnectionsPerServer.cs index 8789884cc723..f37e9090cf89 100644 --- a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.MaxConnectionsPerServer.cs +++ b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.MaxConnectionsPerServer.cs @@ -21,7 +21,6 @@ public abstract class HttpClientHandler_MaxConnectionsPerServer_Test : HttpClien public HttpClientHandler_MaxConnectionsPerServer_Test(ITestOutputHelper output) : base(output) { } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "MaxConnectionsPerServer either returns two or int.MaxValue depending if ctor of HttpClientHandlerTest executed first. Disabling cause of random xunit execution order.")] public void Default_ExpectedValue() { using (HttpClientHandler handler = CreateHttpClientHandler()) @@ -33,7 +32,6 @@ public void Default_ExpectedValue() [Theory] [InlineData(0)] [InlineData(-1)] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "NETFX doesn't throw on invalid values")] public void Set_InvalidValues_Throws(int invalidValue) { using (HttpClientHandler handler = CreateHttpClientHandler()) diff --git a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Proxy.cs b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Proxy.cs index 1ae5d55f468f..c1e4e1fd9a91 100644 --- a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Proxy.cs +++ b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Proxy.cs @@ -55,13 +55,6 @@ public async Task AuthProxy__ValidCreds_ProxySendsRequestToServer( return; } - if (PlatformDetection.IsFullFramework && - (proxyAuthScheme == AuthenticationSchemes.Negotiate || proxyAuthScheme == AuthenticationSchemes.Ntlm)) - { - // Skip due to bug in .NET Framework with Windows auth and proxy tunneling. - return; - } - if (!PlatformDetection.IsWindows && (proxyAuthScheme == AuthenticationSchemes.Negotiate || proxyAuthScheme == AuthenticationSchemes.Ntlm)) { @@ -266,7 +259,6 @@ public async Task Proxy_SendSecureRequestThruProxy_ConnectTunnelUsed() } } - [ActiveIssue(23702, TargetFrameworkMonikers.NetFramework)] [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindowsNanoServer))] public async Task ProxyAuth_Digest_Succeeds() { diff --git a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.ServerCertificates.cs b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.ServerCertificates.cs index 9f264ec9d7a3..487098b55705 100644 --- a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.ServerCertificates.cs +++ b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.ServerCertificates.cs @@ -18,7 +18,6 @@ namespace System.Net.Http.Functional.Tests { using Configuration = System.Net.Test.Common.Configuration; - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, ".NET Framework throws PNSE for ServerCertificateCustomValidationCallback")] public abstract partial class HttpClientHandler_ServerCertificates_Test : HttpClientHandlerTestBase { private static bool ClientSupportsDHECipherSuites => (!PlatformDetection.IsWindows || PlatformDetection.IsWindows10Version1607OrGreater); diff --git a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.SslProtocols.cs b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.SslProtocols.cs index 0619592fc9ca..e21eed6b2d76 100644 --- a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.SslProtocols.cs +++ b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.SslProtocols.cs @@ -18,7 +18,6 @@ namespace System.Net.Http.Functional.Tests using Configuration = System.Net.Test.Common.Configuration; [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "SslProtocols not supported on UAP")] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "SslProtocols property requires .NET 4.7.2")] public abstract partial class HttpClientHandler_SslProtocols_Test : HttpClientHandlerTestBase { public HttpClientHandler_SslProtocols_Test(ITestOutputHelper output) : base(output) { } @@ -41,13 +40,11 @@ public void DefaultProtocols_MatchesExpected() [InlineData(SslProtocols.Tls11 | SslProtocols.Tls12)] [InlineData(SslProtocols.Tls | SslProtocols.Tls12)] [InlineData(SslProtocols.Tls | SslProtocols.Tls11 | SslProtocols.Tls12)] -#if !netstandard [InlineData(SslProtocols.Tls13)] [InlineData(SslProtocols.Tls11 | SslProtocols.Tls13)] [InlineData(SslProtocols.Tls12 | SslProtocols.Tls13)] [InlineData(SslProtocols.Tls | SslProtocols.Tls13)] [InlineData(SslProtocols.Tls | SslProtocols.Tls11 | SslProtocols.Tls12 | SslProtocols.Tls13)] -#endif public void SetGetProtocols_Roundtrips(SslProtocols protocols) { using (HttpClientHandler handler = CreateHttpClientHandler()) @@ -102,14 +99,12 @@ public static IEnumerable GetAsync_AllowedSSLVersion_Succeeds_MemberDa yield return new object[] { SslProtocols.Ssl2, true }; } #pragma warning restore 0618 -#if !netstandard // These protocols are new, and might not be enabled everywhere yet if (PlatformDetection.IsUbuntu1810OrHigher) { yield return new object[] { SslProtocols.Tls13, false }; yield return new object[] { SslProtocols.Tls13, true }; } -#endif } [ConditionalTheory] diff --git a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.cs b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.cs index 7cb3dbe0bc2a..34dd0ce034c6 100644 --- a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.cs +++ b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.cs @@ -65,13 +65,6 @@ private static IEnumerable GetMethods(params string[] methods) public HttpClientHandlerTest(ITestOutputHelper output) : base(output) { - if (PlatformDetection.IsFullFramework) - { - // On .NET Framework, the default limit for connections/server is very low (2). - // On .NET Core, the default limit is higher. Since these tests run in parallel, - // the limit needs to be increased to avoid timeouts when running the tests. - System.Net.ServicePointManager.DefaultConnectionLimit = int.MaxValue; - } } [Fact] @@ -119,12 +112,9 @@ public void Ctor_ExpectedDefaultPropertyValues_NotUapPlatform() Assert.True(handler.SupportsRedirectConfiguration); // Changes from .NET Framework (Desktop). - if (!PlatformDetection.IsFullFramework) - { - Assert.False(handler.CheckCertificateRevocationList); - Assert.Equal(0, handler.MaxRequestContentBufferSize); - Assert.Equal(SslProtocols.None, handler.SslProtocols); - } + Assert.False(handler.CheckCertificateRevocationList); + Assert.Equal(0, handler.MaxRequestContentBufferSize); + Assert.Equal(SslProtocols.None, handler.SslProtocols); } } @@ -1208,7 +1198,6 @@ await LoopbackServer.CreateServerAsync(async (server, url) => }); } - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "No exception thrown")] [Fact] public async Task SendAsync_TransferEncodingSetButNoRequestContent_Throws() { @@ -1266,7 +1255,6 @@ public async Task SendAsync_HttpRequestMsgResponseHeadersRead_StatusCodeOK() } } - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "netfx's ConnectStream.ReadAsync tries to read beyond data already buffered, causing hangs #18864")] [OuterLoop("Slow response")] [Fact] public async Task SendAsync_ReadFromSlowStreamingServer_PartialDataReturned() @@ -1542,18 +1530,6 @@ public async Task Dispose_DisposingHandlerCancelsActiveOperationsWithoutResponse return; } - if (PlatformDetection.IsFullFramework) - { - // Skip test on .NET Framework. It will sometimes not throw TaskCanceledException. - // Instead it might throw the following top-level and inner exceptions depending - // on race conditions. - // - // System.Net.Http.HttpRequestException : Error while copying content to a stream. - // ---- System.IO.IOException : The read operation failed, see inner exception. - //-------- System.Net.WebException : The request was aborted: The request was canceled. - return; - } - await LoopbackServer.CreateServerAsync(async (server1, url1) => { await LoopbackServer.CreateServerAsync(async (server2, url2) => @@ -1638,7 +1614,6 @@ await server.AcceptConnectionSendCustomResponseAndCloseAsync( } [ActiveIssue(37352)] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, ".NET Framework currently does not allow unicode in DNS names")] [OuterLoop("Uses external server")] [Fact] public async Task GetAsync_UnicodeHostName_SuccessStatusCodeInResponse() @@ -1921,7 +1896,6 @@ public async Task PostAsync_ExpectContinue_Success(bool? expectContinue, string } } - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Doesn't send content for get requests")] [ActiveIssue(29802, TargetFrameworkMonikers.Uap)] [Fact] public async Task GetAsync_ExpectContinueTrue_NoContent_StillSendsHeader() @@ -1965,9 +1939,6 @@ public static IEnumerable Interim1xxStatusCode() [MemberData(nameof(Interim1xxStatusCode))] public async Task SendAsync_1xxResponsesWithHeaders_InterimResponsesHeadersIgnored(HttpStatusCode responseStatusCode) { - // Skip test on .NET Framework since it doesn't have the fix. - if (PlatformDetection.IsFullFramework && (int)responseStatusCode >= 102) return; - var clientFinished = new TaskCompletionSource(); const string TestString = "test"; const string CookieHeaderExpected = "yummy_cookie=choco"; @@ -2030,9 +2001,6 @@ await connection.SendResponseAsync(HttpStatusCode.OK, additionalHeaders: [MemberData(nameof(Interim1xxStatusCode))] public async Task SendAsync_Unexpected1xxResponses_DropAllInterimResponses(HttpStatusCode responseStatusCode) { - // Skip test on .NET Framework since it doesn't have the fix. - if (PlatformDetection.IsFullFramework && (int)responseStatusCode >= 102) return; - var clientFinished = new TaskCompletionSource(); const string TestString = "test"; @@ -2309,7 +2277,6 @@ public async Task PostAsync_Redirect_LargePayload_Helper(int statusCode, bool ex [OuterLoop("Uses external server")] [Theory, MemberData(nameof(EchoServers))] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, ".NET Framework disposes request content after send")] [ActiveIssue(31104, TestPlatforms.AnyUnix)] public async Task PostAsync_ReuseRequestContent_Success(Uri remoteServer) { @@ -2383,13 +2350,6 @@ public async Task SendAsync_SendRequestUsingMethodToEchoServerWithContent_Succes string method, bool secureServer) { - if (PlatformDetection.IsFullFramework && method == "GET") - { - // .NET Framework doesn't allow a content body with this HTTP verb. - // It will throw a System.Net.ProtocolViolation exception. - return; - } - using (HttpClient client = CreateHttpClient()) { var request = new HttpRequestMessage( @@ -2454,13 +2414,6 @@ public async Task SendAsync_SendRequestUsingNoBodyMethodToEchoServerWithContent_ string method, bool secureServer) { - if (PlatformDetection.IsFullFramework && method == "HEAD") - { - // .NET Framework doesn't allow a content body with this HTTP verb. - // It will throw a System.Net.ProtocolViolation exception. - return; - } - if (PlatformDetection.IsUap && method == "TRACE") { // UAP platform doesn't allow a content body with this HTTP verb. @@ -2518,7 +2471,6 @@ public async Task SendAsync_RequestVersion11_ServerReceivesVersion11Request() Assert.Equal(new Version(1, 1), receivedRequestVersion); } - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Throws exception sending request using Version(0,0)")] [OuterLoop("Uses external server")] [Fact] public async Task SendAsync_RequestVersionNotSpecified_ServerReceivesVersion11Request() @@ -2535,7 +2487,6 @@ public async Task SendAsync_RequestVersionNotSpecified_ServerReceivesVersion11Re Assert.Equal(new Version(1, 1), receivedRequestVersion); } - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Specifying Version(2,0) throws exception on netfx")] [OuterLoop("Uses external server")] [ConditionalTheory] [MemberData(nameof(Http2Servers))] @@ -2567,7 +2518,6 @@ public async Task SendAsync_RequestVersion20_ResponseVersion20IfHttp2Supported(U } } - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Specifying Version(2,0) throws exception on netfx")] [Fact] public async Task SendAsync_RequestVersion20_HttpNotHttps_NoUpgradeRequest() { @@ -2584,7 +2534,6 @@ await LoopbackServer.CreateClientAndServerAsync(async uri => }); } - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Specifying Version(2,0) throws exception on netfx")] [OuterLoop("Uses external server")] [ConditionalTheory(nameof(IsWindows10Version1607OrGreater)), MemberData(nameof(Http2NoPushServers))] public async Task SendAsync_RequestVersion20_ResponseVersion20(Uri server) diff --git a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTestBase.cs b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTestBase.cs index b04ffb41ae03..5613edfdb490 100644 --- a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTestBase.cs +++ b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTestBase.cs @@ -20,9 +20,9 @@ public abstract class HttpClientHandlerTestBase : FileCleanupTestBase protected virtual bool UseSocketsHttpHandler => true; protected virtual bool UseHttp2 => false; - protected bool IsWinHttpHandler => !UseSocketsHttpHandler && PlatformDetection.IsWindows && !PlatformDetection.IsUap && !PlatformDetection.IsFullFramework; + protected bool IsWinHttpHandler => !UseSocketsHttpHandler && PlatformDetection.IsWindows && !PlatformDetection.IsUap; protected bool IsCurlHandler => !UseSocketsHttpHandler && !PlatformDetection.IsWindows; - protected bool IsNetfxHandler => PlatformDetection.IsWindows && PlatformDetection.IsFullFramework; + protected bool IsNetfxHandler => false; protected bool IsUapHandler => PlatformDetection.IsWindows && PlatformDetection.IsUap; public HttpClientHandlerTestBase(ITestOutputHelper output) @@ -69,7 +69,7 @@ protected static HttpClientHandler CreateHttpClientHandler(bool useSocketsHttpHa { HttpClientHandler handler; - if (PlatformDetection.IsUap || PlatformDetection.IsFullFramework || useSocketsHttpHandler) + if (PlatformDetection.IsUap || useSocketsHttpHandler) { handler = new HttpClientHandler(); } diff --git a/src/System.Net.Http/tests/FunctionalTests/HttpClientTest.cs b/src/System.Net.Http/tests/FunctionalTests/HttpClientTest.cs index aa0ebe18f739..c3bc0a798bf9 100644 --- a/src/System.Net.Http/tests/FunctionalTests/HttpClientTest.cs +++ b/src/System.Net.Http/tests/FunctionalTests/HttpClientTest.cs @@ -105,7 +105,6 @@ public void MaxResponseContentBufferSize_OutOfRange_Throws() } } - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "no exception throw on netfx")] [Theory] [InlineData(1, 2, true)] [InlineData(1, 127, true)] @@ -209,16 +208,7 @@ public async Task GetContentAsync_NullResponseContent_ReturnsDefaultValue() using (var client = new HttpClient(new CustomResponseHandler((r,c) => Task.FromResult(new HttpResponseMessage() { Content = null })))) { Assert.Same(string.Empty, await client.GetStringAsync(CreateFakeUri())); - - if (PlatformDetection.IsFullFramework) - { - Assert.Equal(Array.Empty(), await client.GetByteArrayAsync(CreateFakeUri())); - } - else - { - Assert.Same(Array.Empty(), await client.GetByteArrayAsync(CreateFakeUri())); - } - + Assert.Same(Array.Empty(), await client.GetByteArrayAsync(CreateFakeUri())); Assert.Same(Stream.Null, await client.GetStreamAsync(CreateFakeUri())); } } @@ -338,7 +328,6 @@ public async Task SendAsync_DuplicateRequest_ThrowsException() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, ".NET Framework disposes request content after send")] public async Task SendAsync_RequestContentNotDisposed() { var content = new ByteArrayContent(new byte[1]); diff --git a/src/System.Net.Http/tests/FunctionalTests/HttpContentTest.cs b/src/System.Net.Http/tests/FunctionalTests/HttpContentTest.cs index fe200c738b86..7f0391b6ebed 100644 --- a/src/System.Net.Http/tests/FunctionalTests/HttpContentTest.cs +++ b/src/System.Net.Http/tests/FunctionalTests/HttpContentTest.cs @@ -435,7 +435,6 @@ public async Task ReadAsStringAsync_SetNoCharset_DefaultCharsetUsed() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public async Task ReadAsStringAsync_SetQuotedCharset_ParsesContent() { string sourceString = "some string"; diff --git a/src/System.Net.Http/tests/FunctionalTests/HttpProtocolTests.cs b/src/System.Net.Http/tests/FunctionalTests/HttpProtocolTests.cs index f483f4b3366f..0873d9125d8f 100644 --- a/src/System.Net.Http/tests/FunctionalTests/HttpProtocolTests.cs +++ b/src/System.Net.Http/tests/FunctionalTests/HttpProtocolTests.cs @@ -69,11 +69,7 @@ await LoopbackServer.CreateServerAsync(async (server, url) => public async Task GetAsync_RequestVersion0X_ThrowsOr11(int minorVersion) { Type exceptionType = null; - if (PlatformDetection.IsFullFramework) - { - exceptionType = typeof(ArgumentException); - } - else if (UseSocketsHttpHandler) + if (UseSocketsHttpHandler) { exceptionType = typeof(NotSupportedException); } @@ -113,10 +109,6 @@ await LoopbackServer.CreateServerAsync(async (server, url) => public async Task GetAsync_UnknownRequestVersion_ThrowsOrDegradesTo11(int majorVersion, int minorVersion) { Type exceptionType = null; - if (PlatformDetection.IsFullFramework) - { - exceptionType = typeof(ArgumentException); - } await LoopbackServer.CreateServerAsync(async (server, url) => { @@ -175,7 +167,7 @@ await LoopbackServer.CreateServerAsync(async (server, url) => [InlineData(7)] public async Task GetAsync_ResponseUnknownVersion1X_Success(int responseMinorVersion) { - bool reportAs11 = PlatformDetection.IsFullFramework; + bool reportAs11 = false; bool reportAs00 = !UseSocketsHttpHandler; await LoopbackServer.CreateServerAsync(async (server, url) => @@ -221,7 +213,7 @@ await LoopbackServer.CreateServerAsync(async (server, url) => [InlineData(9)] public async Task GetAsync_ResponseVersion0X_ThrowsOr10(int responseMinorVersion) { - bool reportAs10 = PlatformDetection.IsFullFramework; + bool reportAs10 = false; await LoopbackServer.CreateServerAsync(async (server, url) => { @@ -262,7 +254,7 @@ await LoopbackServer.CreateServerAsync(async (server, url) => public async Task GetAsyncVersion11_BadResponseVersion_ThrowsOr00(int responseMajorVersion, int responseMinorVersion) { // Full framework reports 1.0 or 1.1, depending on minor version, instead of throwing - bool reportAs1X = PlatformDetection.IsFullFramework; + bool reportAs1X = false; // CurlHandler reports these as 0.0, except for 2.0 which is reported as 2.0, instead of throwing. bool reportAs00 = false; @@ -358,7 +350,7 @@ public async Task GetAsync_ExpectedStatusCodeAndReason_Success(string statusLine public async Task GetAsync_ExpectedStatusCodeAndReason_PlatformBehaviorTest(string statusLine, int expectedStatusCode, string reasonWithSpace, string reasonNoSpace) { - if (UseSocketsHttpHandler || PlatformDetection.IsFullFramework) + if (UseSocketsHttpHandler) { // SocketsHttpHandler and .NET Framework will keep the space characters. await GetAsyncSuccessHelper(statusLine, expectedStatusCode, reasonWithSpace); @@ -371,7 +363,6 @@ public async Task GetAsync_ExpectedStatusCodeAndReason_PlatformBehaviorTest(stri } [Theory] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "The following pass on .NET Core but fail on .NET Framework.")] [InlineData("HTTP/1.1 200", 200, "")] // This test data requires the fix in .NET Framework 4.7.3 [InlineData("HTTP/1.1 200 O\tK", 200, "O\tK")] [InlineData("HTTP/1.1 200 O \t\t \t\t\t\t \t K", 200, "O \t\t \t\t\t\t \t K")] @@ -489,7 +480,7 @@ public async Task GetAsync_ReasonPhraseHasLF_BehaviorDifference() [InlineData("HTTP/1.1 200\t")] public async Task GetAsync_InvalidStatusLine_ThrowsExceptionOnSocketsHttpHandler(string responseString) { - if (UseSocketsHttpHandler || PlatformDetection.IsFullFramework) + if (UseSocketsHttpHandler) { // SocketsHttpHandler and .NET Framework will throw HttpRequestException. await GetAsyncThrowsExceptionHelper(responseString); @@ -511,7 +502,6 @@ await LoopbackServer.CreateServerAsync(async (server, url) => }, new LoopbackServer.Options { StreamWrapper = GetStream }); } - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] // Does not support LF-only [Theory] [InlineData("\r\n")] [InlineData("\n")] diff --git a/src/System.Net.Http/tests/FunctionalTests/HttpResponseMessageTest.cs b/src/System.Net.Http/tests/FunctionalTests/HttpResponseMessageTest.cs index 37df13c3b6a0..0b905194fdae 100644 --- a/src/System.Net.Http/tests/FunctionalTests/HttpResponseMessageTest.cs +++ b/src/System.Net.Http/tests/FunctionalTests/HttpResponseMessageTest.cs @@ -130,7 +130,6 @@ public void EnsureSuccessStatusCode_SuccessStatusCode_ContentIsNotDisposed() } } - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "netfx disposes content when method throws.")] [Fact] public void EnsureSuccessStatusCode_NonSuccessStatusCode_ContentIsNotDisposed() { diff --git a/src/System.Net.Http/tests/FunctionalTests/HttpRetryProtocolTests.cs b/src/System.Net.Http/tests/FunctionalTests/HttpRetryProtocolTests.cs index e069963d9f10..1d8edc4c1081 100644 --- a/src/System.Net.Http/tests/FunctionalTests/HttpRetryProtocolTests.cs +++ b/src/System.Net.Http/tests/FunctionalTests/HttpRetryProtocolTests.cs @@ -23,7 +23,6 @@ public abstract class HttpRetryProtocolTests : HttpClientHandlerTestBase public HttpRetryProtocolTests(ITestOutputHelper output) : base(output) { } [Fact] - [ActiveIssue(26770, TargetFrameworkMonikers.NetFramework)] public async Task GetAsync_RetryOnConnectionClosed_Success() { if (!IsRetrySupported) diff --git a/src/System.Net.Http/tests/FunctionalTests/MultipartContentTest.cs b/src/System.Net.Http/tests/FunctionalTests/MultipartContentTest.cs index 9a6850a3dbcb..c3b670cc9835 100644 --- a/src/System.Net.Http/tests/FunctionalTests/MultipartContentTest.cs +++ b/src/System.Net.Http/tests/FunctionalTests/MultipartContentTest.cs @@ -186,7 +186,6 @@ public async Task ReadAsStringAsync_TwoSubContents_MatchesExpected(MultipartCont } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "NETFX has smaller size limits")] public async Task ReadAsStreamAsync_LargeContent_AllBytesRead() { var form = new MultipartFormDataContent(); @@ -309,7 +308,7 @@ public async Task ReadAsStreamAsync_InvalidArgs_Throw() using (Stream s = await mc.ReadAsStreamAsync()) { Assert.True(s.CanRead); - Assert.Equal(PlatformDetection.IsFullFramework, s.CanWrite); + Assert.Equal(false, s.CanWrite); Assert.True(s.CanSeek); AssertExtensions.Throws("buffer", null, () => s.Read(null, 0, 0)); @@ -323,17 +322,12 @@ public async Task ReadAsStreamAsync_InvalidArgs_Throw() AssertExtensions.Throws("buffer", null, () => { s.ReadAsync(new byte[1], 1, 1); }); AssertExtensions.Throws("value", () => s.Position = -1); - - // NETFX is not throwing exceptions but probably should since the stream should be considered read-only. - if (!PlatformDetection.IsFullFramework) - { - AssertExtensions.Throws("value", () => s.Seek(-1, SeekOrigin.Begin)); - AssertExtensions.Throws("origin", () => s.Seek(0, (SeekOrigin)42)); - Assert.Throws(() => s.Write(new byte[1], 0, 0)); - Assert.Throws(() => s.Write(new Span(new byte[1], 0, 0))); - Assert.Throws(() => { s.WriteAsync(new byte[1], 0, 0); }); - Assert.Throws(() => s.SetLength(1)); - } + AssertExtensions.Throws("value", () => s.Seek(-1, SeekOrigin.Begin)); + AssertExtensions.Throws("origin", () => s.Seek(0, (SeekOrigin)42)); + Assert.Throws(() => s.Write(new byte[1], 0, 0)); + Assert.Throws(() => s.Write(new Span(new byte[1], 0, 0))); + Assert.Throws(() => { s.WriteAsync(new byte[1], 0, 0); }); + Assert.Throws(() => s.SetLength(1)); } } diff --git a/src/System.Net.Http/tests/FunctionalTests/PlatformHandlerTest.cs b/src/System.Net.Http/tests/FunctionalTests/PlatformHandlerTest.cs index 16d48a127505..3904e9017f81 100644 --- a/src/System.Net.Http/tests/FunctionalTests/PlatformHandlerTest.cs +++ b/src/System.Net.Http/tests/FunctionalTests/PlatformHandlerTest.cs @@ -194,7 +194,7 @@ public sealed class PlatformHandler_IdnaProtocolTests : IdnaProtocolTests public PlatformHandler_IdnaProtocolTests(ITestOutputHelper output) : base(output) { } protected override bool UseSocketsHttpHandler => false; // WinHttp on Win7 does not support IDNA - protected override bool SupportsIdna => !PlatformDetection.IsWindows7 && !PlatformDetection.IsFullFramework; + protected override bool SupportsIdna => !PlatformDetection.IsWindows7; } public sealed class PlatformHandler_HttpRetryProtocolTests : HttpRetryProtocolTests diff --git a/src/System.Net.Http/tests/FunctionalTests/PostScenarioTest.cs b/src/System.Net.Http/tests/FunctionalTests/PostScenarioTest.cs index 861fa7448310..d721446da6e9 100644 --- a/src/System.Net.Http/tests/FunctionalTests/PostScenarioTest.cs +++ b/src/System.Net.Http/tests/FunctionalTests/PostScenarioTest.cs @@ -38,7 +38,6 @@ public abstract class PostScenarioTest : HttpClientHandlerTestBase public PostScenarioTest(ITestOutputHelper output) : base(output) { } [ActiveIssue(30057, TargetFrameworkMonikers.Uap)] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, ".NET Framework disposes request content after send")] [OuterLoop("Uses external servers")] [Theory, MemberData(nameof(EchoServers))] public async Task PostRewindableStreamContentMultipleTimes_StreamContentFullySent(Uri serverUri) @@ -142,7 +141,6 @@ public async Task PostUsingUsingConflictingSemantics_UsesChunkedSemantics(Uri se [OuterLoop("Uses external servers")] [Theory, MemberData(nameof(VerifyUploadServers))] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "netfx behaves differently and will buffer content and use 'Content-Length' semantics")] [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "WinRT behaves differently and will use 'Content-Length' semantics")] public async Task PostUsingNoSpecifiedSemantics_UsesChunkedSemantics(Uri serverUri) { diff --git a/src/System.Net.Http/tests/FunctionalTests/System.Net.Http.Functional.Tests.csproj b/src/System.Net.Http/tests/FunctionalTests/System.Net.Http.Functional.Tests.csproj index 80be7529491d..810152209b2d 100644 --- a/src/System.Net.Http/tests/FunctionalTests/System.Net.Http.Functional.Tests.csproj +++ b/src/System.Net.Http/tests/FunctionalTests/System.Net.Http.Functional.Tests.csproj @@ -5,7 +5,7 @@ $(DefineConstants);SYSNETHTTP_NO_OPENSSL true true - netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netstandard-Unix-Debug;netstandard-Unix-Release;netstandard-Windows_NT-Debug;netstandard-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release + netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release @@ -158,11 +158,6 @@ Common\System\Net\Http\HuffmanDecoder.cs - - - Common\System\IO\StreamSpanExtensions.netstandard.cs - - diff --git a/src/System.Net.HttpListener/tests/Configurations.props b/src/System.Net.HttpListener/tests/Configurations.props index 5f1c80530c6e..de5d432ffa5e 100644 --- a/src/System.Net.HttpListener/tests/Configurations.props +++ b/src/System.Net.HttpListener/tests/Configurations.props @@ -1,9 +1,10 @@  - netstandard-Windows_NT; - netstandard-OSX; - netstandard-Unix; + netcoreapp-Windows_NT; + netcoreapp-OSX; + netcoreapp-Unix; + uap-Windows_NT; diff --git a/src/System.Net.HttpListener/tests/HttpListenerAuthenticationTests.cs b/src/System.Net.HttpListener/tests/HttpListenerAuthenticationTests.cs index a86a372913c0..5c2d5cc0238e 100644 --- a/src/System.Net.HttpListener/tests/HttpListenerAuthenticationTests.cs +++ b/src/System.Net.HttpListener/tests/HttpListenerAuthenticationTests.cs @@ -75,7 +75,6 @@ public async Task BasicAuthentication_ValidUsernameAndPassword_Success(Authentic await ValidateValidUser(); } - [ActiveIssue(19967, TargetFrameworkMonikers.NetFramework)] [Theory] [MemberData(nameof(BasicAuthenticationHeader_TestData))] public async Task BasicAuthentication_InvalidRequest_SendsStatusCodeClient(string header, HttpStatusCode statusCode) @@ -107,7 +106,6 @@ public static IEnumerable BasicAuthenticationHeader_TestData() yield return new object[] { "abc", HttpStatusCode.InternalServerError }; } - [ActiveIssue(19967, TargetFrameworkMonikers.NetFramework)] [ConditionalTheory(nameof(Helpers) + "." + nameof(Helpers.IsWindowsImplementation))] // [ActiveIssue(20098, TestPlatforms.Unix)] [InlineData("ExampleRealm")] [InlineData(" ExampleRealm ")] diff --git a/src/System.Net.HttpListener/tests/HttpListenerPrefixCollectionTests.cs b/src/System.Net.HttpListener/tests/HttpListenerPrefixCollectionTests.cs index 4571227696c2..f37f10ff3127 100644 --- a/src/System.Net.HttpListener/tests/HttpListenerPrefixCollectionTests.cs +++ b/src/System.Net.HttpListener/tests/HttpListenerPrefixCollectionTests.cs @@ -79,7 +79,6 @@ public void CopyTo_DisposedListener_ThrowsObjectDisposedException() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, ".NET Core fixes a bug where HttpListenerPrefixCollection.CopyTo(null) throws an NRE.")] public void CopyTo_NullArray_ThrowsArgumentNullExceptionOnNetCore() { var listener = new HttpListener(); @@ -87,15 +86,6 @@ public void CopyTo_NullArray_ThrowsArgumentNullExceptionOnNetCore() Assert.Throws(() => listener.Prefixes.CopyTo(null, 0)); } - [Fact] - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework, ".NET Core fixes a bug where HttpListenerPrefixCollection.CopyTo(null) throws an NRE.")] - public void CopyTo_NullArray_ThrowsNullReferenceExceptionOnNetFx() - { - var listener = new HttpListener(); - Assert.Throws(() => listener.Prefixes.CopyTo((Array)null, 0)); - Assert.Throws(() => listener.Prefixes.CopyTo(null, 0)); - } - [Fact] public void CopyTo_MultidimensionalArray_ThrowsIndexOutOfRangeException() { @@ -368,7 +358,6 @@ public static IEnumerable InvalidPrefix_TestData() yield return new object[] { "http://\\/" }; } - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] // Issue #19619 [Theory] [MemberData(nameof(InvalidPrefix_TestData))] public void Add_InvalidPrefixNotStarted_ThrowsHttpListenerExceptionOnStart(string uriPrefix) @@ -381,7 +370,6 @@ public void Add_InvalidPrefixNotStarted_ThrowsHttpListenerExceptionOnStart(strin Assert.Throws(() => listener.Start()); } - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] // Issue #19619 [Theory] [MemberData(nameof(InvalidPrefix_TestData))] public void Add_InvalidPrefixAlreadyStarted_ThrowsHttpListenerExceptionOnAdd(string uriPrefix) diff --git a/src/System.Net.HttpListener/tests/HttpListenerRequestTests.cs b/src/System.Net.HttpListener/tests/HttpListenerRequestTests.cs index a13e95134cf3..4ddd9d137ea7 100644 --- a/src/System.Net.HttpListener/tests/HttpListenerRequestTests.cs +++ b/src/System.Net.HttpListener/tests/HttpListenerRequestTests.cs @@ -101,16 +101,13 @@ public static IEnumerable ContentEncoding_TestData() yield return new object[] { "Unknown-Header: Test", Encoding.Default }; - if (!PlatformDetection.IsFullFramework) - { - // .NET Framework wrongly uses ' ' and ',' as delimiter for parsing Content-Type header. - // "charset=unicode;" will be parsed as "unicode;" for charSet parameter. Then the following GetEncoding(charSet) - // will fail with ArgumentException. In this case, Encoding.Default will be chosen for ContentEncoding, - // even if client explicitly specifies the Unicode encoding in the header. - yield return new object[] { "Content-Type:application/json;charset=unicode; boundary=something", Encoding.Unicode }; - yield return new object[] { "Content-Type:application/json;boundary=something; charset=unicode;", Encoding.Unicode }; - yield return new object[] { "Content-Type:application/json;boundary=something; charset=unicode; ", Encoding.Unicode }; - } + // .NET Framework wrongly uses ' ' and ',' as delimiter for parsing Content-Type header. + // "charset=unicode;" will be parsed as "unicode;" for charSet parameter. Then the following GetEncoding(charSet) + // will fail with ArgumentException. In this case, Encoding.Default will be chosen for ContentEncoding, + // even if client explicitly specifies the Unicode encoding in the header. + yield return new object[] { "Content-Type:application/json;charset=unicode; boundary=something", Encoding.Unicode }; + yield return new object[] { "Content-Type:application/json;boundary=something; charset=unicode;", Encoding.Unicode }; + yield return new object[] { "Content-Type:application/json;boundary=something; charset=unicode; ", Encoding.Unicode }; } [Theory] @@ -403,22 +400,16 @@ public static IEnumerable QueryString_TestData() } }; - // Unicode queries are destroyed by HttpListener. - // [ActiveIssue(19967, TargetFrameworkMonikers.NetFramework)] - // - if (!PlatformDetection.IsFullFramework) + yield return new object[] { - yield return new object[] + "?name1=+&name2=\u1234&\u0100=value&name3=\u00FF", new NameValueCollection { - "?name1=+&name2=\u1234&\u0100=value&name3=\u00FF", new NameValueCollection - { - { "name1", " " }, - { "name2", "á\u0088´" }, - { "Ä\u0080", "value" }, - { "name3", "ÿ" } - } - }; - } + { "name1", " " }, + { "name2", "á\u0088´" }, + { "Ä\u0080", "value" }, + { "name3", "ÿ" } + } + }; yield return new object[] { "", new NameValueCollection() }; yield return new object[] { "?", new NameValueCollection() }; diff --git a/src/System.Net.HttpListener/tests/HttpListenerResponseTests.Cookies.cs b/src/System.Net.HttpListener/tests/HttpListenerResponseTests.Cookies.cs index 0eec1399e6fd..7f5ed20653e7 100644 --- a/src/System.Net.HttpListener/tests/HttpListenerResponseTests.Cookies.cs +++ b/src/System.Net.HttpListener/tests/HttpListenerResponseTests.Cookies.cs @@ -57,17 +57,14 @@ public static IEnumerable Cookies_TestData() 144, "Set-Cookie: name=value", null }; - if (!PlatformDetection.IsFullFramework) + yield return new object[] { - yield return new object[] + new CookieCollection() { - new CookieCollection() - { - new Cookie("foo bar", "value") - }, - 147, "Set-Cookie: foo bar=value", null - }; - } + new Cookie("foo bar", "value") + }, + 147, "Set-Cookie: foo bar=value", null + }; yield return new object[] { diff --git a/src/System.Net.HttpListener/tests/HttpListenerTimeoutManagerTests.cs b/src/System.Net.HttpListener/tests/HttpListenerTimeoutManagerTests.cs index 0ccf08148bc4..863aaa893f91 100644 --- a/src/System.Net.HttpListener/tests/HttpListenerTimeoutManagerTests.cs +++ b/src/System.Net.HttpListener/tests/HttpListenerTimeoutManagerTests.cs @@ -338,7 +338,7 @@ private unsafe uint GetServerTimeout(HttpListener _listener, HTTP_TIMEOUT_TYPE t uint[] timeouts = new uint[6]; // We need url group id which is private so we get it using reflection. - string urlGroupIdName = PlatformDetection.IsFullFramework ? "m_UrlGroupId" : "_urlGroupId"; + string urlGroupIdName = "_urlGroupId"; FieldInfo info = typeof(HttpListener).GetField(urlGroupIdName, BindingFlags.Instance | BindingFlags.NonPublic); ulong urlGroupId = (ulong)info.GetValue(_listener); diff --git a/src/System.Net.HttpListener/tests/HttpListenerWebSocketTests.cs b/src/System.Net.HttpListener/tests/HttpListenerWebSocketTests.cs index 456bac5d2625..3efa3b0effe1 100644 --- a/src/System.Net.HttpListener/tests/HttpListenerWebSocketTests.cs +++ b/src/System.Net.HttpListener/tests/HttpListenerWebSocketTests.cs @@ -178,7 +178,7 @@ public async Task CloseOutputAsync_HandshakeStartedFromClient_Success(WebSocketC { // [ActiveIssue(20392, TargetFrameworkMonikers.Netcoreapp)] string expectedStatusDescription = statusDescription; - if (!PlatformDetection.IsFullFramework && statusDescription == null) + if (statusDescription == null) { expectedStatusDescription = string.Empty; } @@ -241,7 +241,7 @@ public async Task CloseAsync_HandshakeStartedFromClient_Success(WebSocketCloseSt { // [ActiveIssue(20392, TargetFrameworkMonikers.Netcoreapp)] string expectedStatusDescription = statusDescription; - if (!PlatformDetection.IsFullFramework && statusDescription == null) + if (statusDescription == null) { expectedStatusDescription = string.Empty; } diff --git a/src/System.Net.HttpListener/tests/System.Net.HttpListener.Tests.csproj b/src/System.Net.HttpListener/tests/System.Net.HttpListener.Tests.csproj index 88facbfd3dd4..c13926e59c04 100644 --- a/src/System.Net.HttpListener/tests/System.Net.HttpListener.Tests.csproj +++ b/src/System.Net.HttpListener/tests/System.Net.HttpListener.Tests.csproj @@ -3,7 +3,7 @@ {851A40FE-7F07-415D-8592-5FE2096E84D3} true ../src/Resources/Strings.resx - netstandard-OSX-Debug;netstandard-OSX-Release;netstandard-Unix-Debug;netstandard-Unix-Release;netstandard-Windows_NT-Debug;netstandard-Windows_NT-Release + netcoreapp-OSX-Debug;netcoreapp-OSX-Release;netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release diff --git a/src/System.Net.Mail/tests/Functional/Configurations.props b/src/System.Net.Mail/tests/Functional/Configurations.props index 581054d46db4..f97cd5ea7a97 100644 --- a/src/System.Net.Mail/tests/Functional/Configurations.props +++ b/src/System.Net.Mail/tests/Functional/Configurations.props @@ -1,7 +1,8 @@  - netstandard; + netcoreapp; + uap; \ No newline at end of file diff --git a/src/System.Net.Mail/tests/Functional/HeaderCollectionTest.cs b/src/System.Net.Mail/tests/Functional/HeaderCollectionTest.cs index f828ec70f920..42a23a50a3cf 100644 --- a/src/System.Net.Mail/tests/Functional/HeaderCollectionTest.cs +++ b/src/System.Net.Mail/tests/Functional/HeaderCollectionTest.cs @@ -23,14 +23,12 @@ public void Set_ValidNameAndValue_Success() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Requires fix shipping in .NET 4.7.2")] public void Set_EmptyName_Throws() { AssertExtensions.Throws("name", () => mail.Headers.Set(string.Empty, "value")); } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Requires fix shipping in .NET 4.7.2")] public void Set_EmptyValue_Throws() { AssertExtensions.Throws("value", () => mail.Headers.Set("name", string.Empty)); @@ -47,14 +45,12 @@ public void Add_ValidNameAndValue_Success() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Requires fix shipping in .NET 4.7.2")] public void Add_EmptyName_Throws() { AssertExtensions.Throws("name", () => mail.Headers.Add(string.Empty, "value")); } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Requires fix shipping in .NET 4.7.2")] public void Add_EmptyValue_Throws() { AssertExtensions.Throws("value", () => mail.Headers.Add("name", string.Empty)); diff --git a/src/System.Net.Mail/tests/Functional/LoggingTest.cs b/src/System.Net.Mail/tests/Functional/LoggingTest.cs index cb015d2c763e..6d159f637f8e 100644 --- a/src/System.Net.Mail/tests/Functional/LoggingTest.cs +++ b/src/System.Net.Mail/tests/Functional/LoggingTest.cs @@ -13,8 +13,6 @@ namespace System.Net.Mail.Tests public class LoggingTest { [Fact] - [ActiveIssue(20470, TargetFrameworkMonikers.UapAot)] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "NetEventSource is only part of .NET Core.")] public void EventSource_ExistsWithCorrectId() { Type esType = typeof(SmtpClient).Assembly.GetType("System.Net.NetEventSource", throwOnError: true, ignoreCase: false); @@ -27,8 +25,6 @@ public void EventSource_ExistsWithCorrectId() } [Fact] - [ActiveIssue(20470, TargetFrameworkMonikers.UapAot)] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "NetEventSource is only part of .NET Core.")] public void EventSource_EventsRaisedAsExpected() { RemoteExecutor.Invoke(() => diff --git a/src/System.Net.Mail/tests/Functional/MailMessageTest.cs b/src/System.Net.Mail/tests/Functional/MailMessageTest.cs index 6362bc8112f4..9b1dfd819665 100644 --- a/src/System.Net.Mail/tests/Functional/MailMessageTest.cs +++ b/src/System.Net.Mail/tests/Functional/MailMessageTest.cs @@ -146,7 +146,6 @@ public void SubjectAndEncodingTest() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "MailWriter is reflection blocked.")] public void SentSpecialLengthMailAttachment_Base64Decode_Success() { // The special length follows pattern: (3N - 1) * 0x4400 + 1 diff --git a/src/System.Net.Mail/tests/Functional/SmtpClientTest.cs b/src/System.Net.Mail/tests/Functional/SmtpClientTest.cs index 3bbbc666a243..ceb2aabf41ce 100644 --- a/src/System.Net.Mail/tests/Functional/SmtpClientTest.cs +++ b/src/System.Net.Mail/tests/Functional/SmtpClientTest.cs @@ -106,7 +106,6 @@ public void ServicePoint_GetsCachedInstanceSpecificToHostPort() } } - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] [Fact] public void ServicePoint_NetCoreApp_AddressIsAccessible() { @@ -118,17 +117,6 @@ public void ServicePoint_NetCoreApp_AddressIsAccessible() } } - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)] - [Fact] - public void ServicePoint_NetFramework_AddressIsInaccessible() - { - using (var smtp = new SmtpClient("localhost", 25)) - { - ServicePoint sp = smtp.ServicePoint; - Assert.Throws(() => sp.Address); - } - } - [Fact] public void ServicePoint_ReflectsHostAndPortChange() { @@ -305,7 +293,6 @@ public void TestMailDelivery() } } - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, ".NET Framework has a bug and could hang in case of null or empty body")] [Theory] [InlineData("howdydoo")] [InlineData("")] @@ -369,7 +356,6 @@ public async Task TestCredentialsCopyInAsyncContext() } - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "NETFX doesn't have the fix for encoding")] [Theory] [InlineData(false, false, false)] [InlineData(false, false, true)] // Received subjectText. diff --git a/src/System.Net.Mail/tests/Functional/System.Net.Mail.Functional.Tests.csproj b/src/System.Net.Mail/tests/Functional/System.Net.Mail.Functional.Tests.csproj index be74e4afcc6a..45b4c17d2ce6 100644 --- a/src/System.Net.Mail/tests/Functional/System.Net.Mail.Functional.Tests.csproj +++ b/src/System.Net.Mail/tests/Functional/System.Net.Mail.Functional.Tests.csproj @@ -2,7 +2,7 @@ {A26D88B7-6EF6-4C8C-828B-7B57732CCE38} true - netstandard-Debug;netstandard-Release + netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release diff --git a/src/System.Net.Mail/tests/Unit/NTAuthenticationStubTests.cs b/src/System.Net.Mail/tests/Unit/NTAuthenticationStubTests.cs index d06f6d033ed9..756d1e6cfede 100644 --- a/src/System.Net.Mail/tests/Unit/NTAuthenticationStubTests.cs +++ b/src/System.Net.Mail/tests/Unit/NTAuthenticationStubTests.cs @@ -9,7 +9,6 @@ namespace System.Net.Mail.Tests public class NTAuthenticationStubTests { [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Requires internal Reflection (NTAuthentication)")] public void TestReflectedTypes() { Assert.NotNull(NTAuthentication.s_type); diff --git a/src/System.Net.NameResolution/tests/FunctionalTests/Configurations.props b/src/System.Net.NameResolution/tests/FunctionalTests/Configurations.props index 1b6509ccdf10..3c373cd12fa3 100644 --- a/src/System.Net.NameResolution/tests/FunctionalTests/Configurations.props +++ b/src/System.Net.NameResolution/tests/FunctionalTests/Configurations.props @@ -1,8 +1,9 @@  - netstandard-Windows_NT; - netstandard-Unix; + uap-Windows_NT; + netcoreapp-Windows_NT; + netcoreapp-Unix; \ No newline at end of file diff --git a/src/System.Net.NameResolution/tests/FunctionalTests/LoggingTest.cs b/src/System.Net.NameResolution/tests/FunctionalTests/LoggingTest.cs index 66b230b87f1d..5b637086dfdc 100644 --- a/src/System.Net.NameResolution/tests/FunctionalTests/LoggingTest.cs +++ b/src/System.Net.NameResolution/tests/FunctionalTests/LoggingTest.cs @@ -11,8 +11,6 @@ namespace System.Net.NameResolution.Tests public static class LoggingTest { [Fact] - [ActiveIssue(20470, TargetFrameworkMonikers.UapAot)] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "NetEventSource is only part of .NET Core.")] public static void EventSource_ExistsWithCorrectId() { Type esType = typeof(Dns).GetTypeInfo().Assembly.GetType("System.Net.NetEventSource", throwOnError: true, ignoreCase: false); diff --git a/src/System.Net.NameResolution/tests/FunctionalTests/System.Net.NameResolution.Functional.Tests.csproj b/src/System.Net.NameResolution/tests/FunctionalTests/System.Net.NameResolution.Functional.Tests.csproj index 14433a1d77f9..d55c1a2702fc 100644 --- a/src/System.Net.NameResolution/tests/FunctionalTests/System.Net.NameResolution.Functional.Tests.csproj +++ b/src/System.Net.NameResolution/tests/FunctionalTests/System.Net.NameResolution.Functional.Tests.csproj @@ -1,7 +1,7 @@ {4FE5ECEE-ACC5-4558-A946-573426599B73} - netstandard-Unix-Debug;netstandard-Unix-Release;netstandard-Windows_NT-Debug;netstandard-Windows_NT-Release + netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netcoreapp-Unix-Debug;netcoreapp-Unix-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release diff --git a/src/System.Net.NetworkInformation/tests/FunctionalTests/Configurations.props b/src/System.Net.NetworkInformation/tests/FunctionalTests/Configurations.props index 581054d46db4..f97cd5ea7a97 100644 --- a/src/System.Net.NetworkInformation/tests/FunctionalTests/Configurations.props +++ b/src/System.Net.NetworkInformation/tests/FunctionalTests/Configurations.props @@ -1,7 +1,8 @@  - netstandard; + netcoreapp; + uap; \ No newline at end of file diff --git a/src/System.Net.NetworkInformation/tests/FunctionalTests/LoggingTest.cs b/src/System.Net.NetworkInformation/tests/FunctionalTests/LoggingTest.cs index 01412faf5dbb..fb95d4b0f658 100644 --- a/src/System.Net.NetworkInformation/tests/FunctionalTests/LoggingTest.cs +++ b/src/System.Net.NetworkInformation/tests/FunctionalTests/LoggingTest.cs @@ -10,8 +10,6 @@ namespace System.Net.NetworkInformation.Tests public class LoggingTest { [Fact] - [ActiveIssue(20470, TargetFrameworkMonikers.UapAot)] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "NetEventSource is only part of .NET Core.")] public void EventSource_ExistsWithCorrectId() { Type esType = typeof(NetworkChange).Assembly.GetType("System.Net.NetEventSource", throwOnError: true, ignoreCase: false); diff --git a/src/System.Net.NetworkInformation/tests/FunctionalTests/PhysicalAddressTest.cs b/src/System.Net.NetworkInformation/tests/FunctionalTests/PhysicalAddressTest.cs index 9d8d0ea163e4..56da5d9f34c0 100644 --- a/src/System.Net.NetworkInformation/tests/FunctionalTests/PhysicalAddressTest.cs +++ b/src/System.Net.NetworkInformation/tests/FunctionalTests/PhysicalAddressTest.cs @@ -121,7 +121,6 @@ public void Parse_Valid_Success(string address, byte[] expectedBytes) Assert.Equal(addressBytes, expectedBytes); } - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "netfx doesn't have fix #32724")] [Theory] [InlineData("F")] [InlineData("M0")] diff --git a/src/System.Net.NetworkInformation/tests/FunctionalTests/System.Net.NetworkInformation.Functional.Tests.csproj b/src/System.Net.NetworkInformation/tests/FunctionalTests/System.Net.NetworkInformation.Functional.Tests.csproj index d300904df2b1..7bbebaaaa12d 100644 --- a/src/System.Net.NetworkInformation/tests/FunctionalTests/System.Net.NetworkInformation.Functional.Tests.csproj +++ b/src/System.Net.NetworkInformation/tests/FunctionalTests/System.Net.NetworkInformation.Functional.Tests.csproj @@ -3,7 +3,7 @@ {DCBB8805-4658-44BF-B5E8-B6714EC8936B} true ../../src/Resources/Strings.resx - netstandard-Debug;netstandard-Release + netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release diff --git a/src/System.Net.Ping/tests/FunctionalTests/Configurations.props b/src/System.Net.Ping/tests/FunctionalTests/Configurations.props index 2b7db4cef13b..f329ed58bff7 100644 --- a/src/System.Net.Ping/tests/FunctionalTests/Configurations.props +++ b/src/System.Net.Ping/tests/FunctionalTests/Configurations.props @@ -1,8 +1,9 @@  - netstandard-Unix; - netstandard-Windows_NT; + netcoreapp-Unix; + netcoreapp-Windows_NT; + uap-Windows_NT; \ No newline at end of file diff --git a/src/System.Net.Ping/tests/FunctionalTests/LoggingTest.cs b/src/System.Net.Ping/tests/FunctionalTests/LoggingTest.cs index 8a504d7a0ebb..f82fec727e2d 100644 --- a/src/System.Net.Ping/tests/FunctionalTests/LoggingTest.cs +++ b/src/System.Net.Ping/tests/FunctionalTests/LoggingTest.cs @@ -10,8 +10,6 @@ namespace System.Net.NetworkInformation.Tests public class LoggingTest { [Fact] - [ActiveIssue(20470, TargetFrameworkMonikers.UapAot)] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "NetEventSource is only part of .NET Core.")] public void EventSource_ExistsWithCorrectId() { Type esType = typeof(Ping).Assembly.GetType("System.Net.NetEventSource", throwOnError: true, ignoreCase: false); diff --git a/src/System.Net.Ping/tests/FunctionalTests/System.Net.Ping.Functional.Tests.csproj b/src/System.Net.Ping/tests/FunctionalTests/System.Net.Ping.Functional.Tests.csproj index a60c4ebc58bb..de881a921de9 100644 --- a/src/System.Net.Ping/tests/FunctionalTests/System.Net.Ping.Functional.Tests.csproj +++ b/src/System.Net.Ping/tests/FunctionalTests/System.Net.Ping.Functional.Tests.csproj @@ -1,7 +1,7 @@ {43CE20B7-389B-41BB-8390-447521DF3BD4} - netstandard-Unix-Debug;netstandard-Unix-Release;netstandard-Windows_NT-Debug;netstandard-Windows_NT-Release + netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netcoreapp-Unix-Debug;netcoreapp-Unix-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release true diff --git a/src/System.Net.Primitives/tests/FunctionalTests/Configurations.props b/src/System.Net.Primitives/tests/FunctionalTests/Configurations.props index dc4208c4b81b..0a221e3e4710 100644 --- a/src/System.Net.Primitives/tests/FunctionalTests/Configurations.props +++ b/src/System.Net.Primitives/tests/FunctionalTests/Configurations.props @@ -1,8 +1,7 @@  - netstandard-Unix; - netstandard-Windows_NT; + uap-Windows_NT; netcoreapp-Windows_NT; netcoreapp-Unix; diff --git a/src/System.Net.Primitives/tests/FunctionalTests/CookieContainerTest.cs b/src/System.Net.Primitives/tests/FunctionalTests/CookieContainerTest.cs index 39adb636ddba..c6780eace09e 100644 --- a/src/System.Net.Primitives/tests/FunctionalTests/CookieContainerTest.cs +++ b/src/System.Net.Primitives/tests/FunctionalTests/CookieContainerTest.cs @@ -170,7 +170,6 @@ public static void SetCookies_InvalidInput_Throws() [Theory] [InlineData(true)] [InlineData(false)] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] // .NET Framework will not perform domainTable clean up. public static void AddCookies_CapacityReached_OldCookiesRemoved(bool isFromSameDomain) { const int Capacity = 10; diff --git a/src/System.Net.Primitives/tests/FunctionalTests/CookieTest.cs b/src/System.Net.Primitives/tests/FunctionalTests/CookieTest.cs index 3d8b06d73e37..027228d1523d 100644 --- a/src/System.Net.Primitives/tests/FunctionalTests/CookieTest.cs +++ b/src/System.Net.Primitives/tests/FunctionalTests/CookieTest.cs @@ -247,18 +247,8 @@ public static void Value_GetSet_Success() c.Value = null; Assert.Equal(string.Empty, c.Value); } - - [Fact] - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)] // Cookie.Value returns null on full framework, empty string on .NETCore - public static void Value_PassNullToCtor_GetReturnsEmptyString_net46() - { - var cookie = new Cookie("SomeName", null); - // Cookie.Value returns null on full framework. - Assert.Null(cookie.Value); - } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] // Cookie.Value returns null on full framework, empty string on .NETCore public static void Value_PassNullToCtor_GetReturnsEmptyString() { var cookie = new Cookie("SomeName", null); diff --git a/src/System.Net.Primitives/tests/FunctionalTests/IPAddressTest.cs b/src/System.Net.Primitives/tests/FunctionalTests/IPAddressTest.cs index e7a7a459dbb6..63a4352f388f 100644 --- a/src/System.Net.Primitives/tests/FunctionalTests/IPAddressTest.cs +++ b/src/System.Net.Primitives/tests/FunctionalTests/IPAddressTest.cs @@ -316,7 +316,6 @@ public static void Address_Property_Success() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] // IPAddress.Value can be set on full framework public static void Address_ReadOnlyStatics_Set_Failure() { Assert.Throws(() => IPAddress.Any.Address = MaxAddress - 1); diff --git a/src/System.Net.Primitives/tests/FunctionalTests/LoggingTest.cs b/src/System.Net.Primitives/tests/FunctionalTests/LoggingTest.cs index 0305e4bfb0f4..1c0ebbdcbd45 100644 --- a/src/System.Net.Primitives/tests/FunctionalTests/LoggingTest.cs +++ b/src/System.Net.Primitives/tests/FunctionalTests/LoggingTest.cs @@ -13,8 +13,6 @@ namespace System.Net.Primitives.Functional.Tests public class LoggingTest { [Fact] - [ActiveIssue(20470, TargetFrameworkMonikers.UapAot)] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "NetEventSource is only part of .NET Core.")] public void EventSource_ExistsWithCorrectId() { Type esType = typeof(IPAddress).Assembly.GetType("System.Net.NetEventSource", throwOnError: true, ignoreCase: false); @@ -27,8 +25,6 @@ public void EventSource_ExistsWithCorrectId() } [Fact] - [ActiveIssue(20470, TargetFrameworkMonikers.UapAot)] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "NetEventSource is only part of .NET Core.")] public void EventSource_EventsRaisedAsExpected() { RemoteExecutor.Invoke(() => diff --git a/src/System.Net.Primitives/tests/FunctionalTests/System.Net.Primitives.Functional.Tests.csproj b/src/System.Net.Primitives/tests/FunctionalTests/System.Net.Primitives.Functional.Tests.csproj index 2566817b4195..9686224ea784 100644 --- a/src/System.Net.Primitives/tests/FunctionalTests/System.Net.Primitives.Functional.Tests.csproj +++ b/src/System.Net.Primitives/tests/FunctionalTests/System.Net.Primitives.Functional.Tests.csproj @@ -2,7 +2,7 @@ {E671BC9F-A64C-4504-8B00-7A3215B99AF9} true - netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netstandard-Unix-Debug;netstandard-Unix-Release;netstandard-Windows_NT-Debug;netstandard-Windows_NT-Release + netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netcoreapp-Unix-Debug;netcoreapp-Unix-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release diff --git a/src/System.Net.Primitives/tests/UnitTests/CookieContainerTest.cs b/src/System.Net.Primitives/tests/UnitTests/CookieContainerTest.cs index 389b634b3336..d4681327dacb 100644 --- a/src/System.Net.Primitives/tests/UnitTests/CookieContainerTest.cs +++ b/src/System.Net.Primitives/tests/UnitTests/CookieContainerTest.cs @@ -356,7 +356,6 @@ public void GetCookieHeader_Success(Uri uri, string expected) [Theory] [MemberData(nameof(SetCookiesData))] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Requires fix shipping in .NET 4.7.2")] public void SetCookies_Success(Uri uri, string cookieHeader, Cookie[] expected) { CookieContainer cc = CreateCount11Container(); diff --git a/src/System.Net.Requests/tests/AuthenticationManagerTest.cs b/src/System.Net.Requests/tests/AuthenticationManagerTest.cs index b669737c761c..689290765051 100644 --- a/src/System.Net.Requests/tests/AuthenticationManagerTest.cs +++ b/src/System.Net.Requests/tests/AuthenticationManagerTest.cs @@ -13,7 +13,6 @@ namespace System.Net.Tests { public class AuthenticationManagerTest { - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "AuthenticationManager supported on NETFX")] [Fact] public void Authenticate_NotSupported() { @@ -62,7 +61,7 @@ public void RegisteredModules_DefaultCount_ExpectedValue() int count = 0; IEnumerator modules = AuthenticationManager.RegisteredModules; while (modules.MoveNext()) count++; - Assert.Equal(PlatformDetection.IsFullFramework ? 5 : 0, count); + Assert.Equal(0, count); } [Fact] diff --git a/src/System.Net.Requests/tests/Configurations.props b/src/System.Net.Requests/tests/Configurations.props index ff0d415e4593..acf56fa2750e 100644 --- a/src/System.Net.Requests/tests/Configurations.props +++ b/src/System.Net.Requests/tests/Configurations.props @@ -1,7 +1,8 @@  - netstandard; + netcoreapp; + uap; \ No newline at end of file diff --git a/src/System.Net.Requests/tests/FileWebRequestTest.cs b/src/System.Net.Requests/tests/FileWebRequestTest.cs index d9e882cdc4f6..d55182f83392 100644 --- a/src/System.Net.Requests/tests/FileWebRequestTest.cs +++ b/src/System.Net.Requests/tests/FileWebRequestTest.cs @@ -229,7 +229,6 @@ public async Task BeginGetResponse_OnNonexistentFile_ShouldNotCrashApplication(b public abstract class AsyncFileWebRequestTestBase : FileWebRequestTestBase { - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Concurrent read/write only supported on .NET Core via PR 12231")] [Fact] public async Task ConcurrentReadWrite_ResponseBlocksThenGetsNullStream() { diff --git a/src/System.Net.Requests/tests/GlobalProxySelectionTest.cs b/src/System.Net.Requests/tests/GlobalProxySelectionTest.cs index fd7bf4c9ff45..c699ba3411fd 100644 --- a/src/System.Net.Requests/tests/GlobalProxySelectionTest.cs +++ b/src/System.Net.Requests/tests/GlobalProxySelectionTest.cs @@ -47,13 +47,10 @@ public void Select_Success() #pragma warning disable 0618 //GlobalProxySelection is Deprecated. Assert.NotNull(GlobalProxySelection.Select); - if (!PlatformDetection.IsFullFramework) - { - // On .NET Framework, the default value for Select property - // is an internal WebRequest.WebProxyWrapper object which - // works similarly to DefaultWebProxy but is not the same object. - Assert.Equal(GlobalProxySelection.Select, WebRequest.DefaultWebProxy); - } + // On .NET Framework, the default value for Select property + // is an internal WebRequest.WebProxyWrapper object which + // works similarly to DefaultWebProxy but is not the same object. + Assert.Equal(GlobalProxySelection.Select, WebRequest.DefaultWebProxy); #pragma warning restore 0618 WebRequest.DefaultWebProxy = myProxy; diff --git a/src/System.Net.Requests/tests/HttpWebRequestTest.cs b/src/System.Net.Requests/tests/HttpWebRequestTest.cs index 44e2e950866d..28b9c6c06f20 100644 --- a/src/System.Net.Requests/tests/HttpWebRequestTest.cs +++ b/src/System.Net.Requests/tests/HttpWebRequestTest.cs @@ -158,7 +158,7 @@ public void Ctor_VerifyDefaults_Success(Uri remoteServer) Assert.Equal(HttpWebRequest.DefaultMaximumResponseHeadersLength, 64); Assert.NotNull(HttpWebRequest.DefaultCachePolicy); Assert.Equal(HttpWebRequest.DefaultCachePolicy.Level, RequestCacheLevel.BypassCache); - Assert.Equal(PlatformDetection.IsFullFramework ? 64 : 0, HttpWebRequest.DefaultMaximumErrorResponseLength); + Assert.Equal(0, HttpWebRequest.DefaultMaximumErrorResponseLength); Assert.NotNull(request.Proxy); Assert.Equal(remoteServer, request.RequestUri); Assert.True(request.SupportsCookieContainer); @@ -214,7 +214,6 @@ public void AllowReadStreamBuffering_SetFalseThenGet_ExpectFalse(Uri remoteServe Assert.False(request.AllowReadStreamBuffering); } - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "not supported on .NET Framework")] [Theory, MemberData(nameof(EchoServers))] public void AllowReadStreamBuffering_SetTrueThenGet_ExpectTrue(Uri remoteServer) { @@ -639,7 +638,6 @@ public void PreAuthenticate_SetAndGetBoolean_ValuesMatch(Uri remoteServer) Assert.False(request.PreAuthenticate); } - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "dotnet/corefx #19225")] [Theory, MemberData(nameof(EchoServers))] public void PreAuthenticate_SetAndGetBooleanResponse_ValuesMatch(Uri remoteServer) { @@ -770,8 +768,6 @@ public void IfModifiedSince_SetMinDateAfterValidDate_ValuesMatch(Uri remoteServe [Theory] [MemberData(nameof(Dates_ReadValue_Data))] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, - "Net Framework currently retains the custom date parsing that retains some bugs (mostly related to offset), and also prevents setting the raw header value")] public void IfModifiedSince_ReadValue(string raw, DateTime expected) { HttpWebRequest request = WebRequest.CreateHttp("http://localhost"); @@ -782,8 +778,6 @@ public void IfModifiedSince_ReadValue(string raw, DateTime expected) [Theory] [MemberData(nameof(Dates_Invalid_Data))] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, - "Net Framework currently retains the custom date parsing that accepts a wider range of values, and also prevents setting the raw header value")] public void IfModifiedSince_InvalidValue(string invalid) { HttpWebRequest request = WebRequest.CreateHttp("http://localhost"); @@ -816,8 +810,6 @@ public void Date_SetMinDateAfterValidDate_ValuesMatch(Uri remoteServer) [Theory] [MemberData(nameof(Dates_ReadValue_Data))] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, - "Net Framework currently retains the custom date parsing that retains some bugs (mostly related to offset), and also prevents setting the raw header value")] public void Date_ReadValue(string raw, DateTime expected) { HttpWebRequest request = WebRequest.CreateHttp("http://localhost"); @@ -828,8 +820,6 @@ public void Date_ReadValue(string raw, DateTime expected) [Theory] [MemberData(nameof(Dates_Invalid_Data))] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, - "Net Framework currently retains the custom date parsing that accepts a wider range of values, and also prevents setting the raw header value")] public void Date_InvalidValue(string invalid) { HttpWebRequest request = WebRequest.CreateHttp("http://localhost"); @@ -1085,7 +1075,6 @@ public void BeginGetRequestStream_CreatePostRequestThenAbort_ThrowsWebException( [Theory, MemberData(nameof(EchoServers))] [SkipOnTargetFramework(TargetFrameworkMonikers.Mono, "no exception thrown on mono")] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "no exception thrown on netfx")] public void BeginGetRequestStream_CreatePostRequestThenCallTwice_ThrowsInvalidOperationException(Uri remoteServer) { HttpWebRequest request = HttpWebRequest.CreateHttp(remoteServer); @@ -1448,14 +1437,7 @@ await LoopbackServer.CreateServerAsync((server, url) => using (request.EndGetRequestStream(request.BeginGetRequestStream(null, null), out context)) { - if (PlatformDetection.IsFullFramework) - { - Assert.NotNull(context); - } - else - { - Assert.Null(context); - } + Assert.Null(context); } return Task.FromResult(null); @@ -1464,7 +1446,6 @@ await LoopbackServer.CreateServerAsync((server, url) => [ActiveIssue(19083)] [SkipOnTargetFramework(TargetFrameworkMonikers.Mono, "dotnet/corefx #19083")] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "dotnet/corefx #19083")] [Fact] public async Task Abort_BeginGetRequestStreamThenAbort_EndGetRequestStreamThrowsWebException() { @@ -1487,7 +1468,6 @@ await LoopbackServer.CreateServerAsync((server, url) => } [SkipOnTargetFramework(TargetFrameworkMonikers.Mono, "ResponseCallback not called after Abort on mono")] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "ResponseCallback not called after Abort on netfx")] [Fact] public async Task Abort_BeginGetResponseThenAbort_ResponseCallbackCalledBeforeAbortReturns() { diff --git a/src/System.Net.Requests/tests/HttpWebResponseHeaderTest.cs b/src/System.Net.Requests/tests/HttpWebResponseHeaderTest.cs index db93c619aeef..5c953782d8fb 100644 --- a/src/System.Net.Requests/tests/HttpWebResponseHeaderTest.cs +++ b/src/System.Net.Requests/tests/HttpWebResponseHeaderTest.cs @@ -78,19 +78,13 @@ await LoopbackServer.CreateServerAsync(async (server, url) => WebResponse response = await getResponse; HttpWebResponse httpResponse = (HttpWebResponse)response; httpResponse.Close(); - if (PlatformDetection.IsFullFramework) + + // TODO: Issue #18851. Investigate .NET Core to see if it can + // match .NET Framework. + Assert.Throws(() => { - Stream stream = httpResponse.GetResponseStream(); - } - else - { - // TODO: Issue #18851. Investigate .NET Core to see if it can - // match .NET Framework. - Assert.Throws(() => - { - httpResponse.GetResponseStream(); - }); - } + httpResponse.GetResponseStream(); + }); }); } @@ -147,15 +141,8 @@ await LoopbackServer.CreateServerAsync(async (server, url) => BinaryFormatter formatter = new BinaryFormatter(); HttpWebResponse hwr = (HttpWebResponse)response; - if (PlatformDetection.IsFullFramework) - { - formatter.Serialize(fs, hwr); - } - else - { - // HttpWebResponse is not serializable on .NET Core. - Assert.Throws(() => formatter.Serialize(fs, hwr)); - } + // HttpWebResponse is not serializable on .NET Core. + Assert.Throws(() => formatter.Serialize(fs, hwr)); } } }); diff --git a/src/System.Net.Requests/tests/HttpWebResponseTest.cs b/src/System.Net.Requests/tests/HttpWebResponseTest.cs index 5c33bc7f6922..90a282fc48d8 100644 --- a/src/System.Net.Requests/tests/HttpWebResponseTest.cs +++ b/src/System.Net.Requests/tests/HttpWebResponseTest.cs @@ -123,8 +123,6 @@ public static IEnumerable Dates_Now_Invalid_Data() [Theory] [MemberData(nameof(Dates_ReadValue_Data))] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, - "Net Framework currently retains the custom date parsing that retains some bugs (mostly related to offset)")] public async Task LastModified_ReadValue(string raw, DateTime expected) { await LoopbackServer.CreateServerAsync(async (server, url) => @@ -152,8 +150,6 @@ public async Task Date_AlwaysInvalidValue(string invalid) [Theory] [MemberData(nameof(Dates_Now_Invalid_Data))] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, - "Net Framework currently retains the custom date parsing that accepts a wider range of values")] public async Task LastModified_InvalidValue(string invalid) { await LoopbackServer.CreateServerAsync(async (server, url) => diff --git a/src/System.Net.Requests/tests/LoggingTest.cs b/src/System.Net.Requests/tests/LoggingTest.cs index 818fd1fffa39..f0b52db6f8ce 100644 --- a/src/System.Net.Requests/tests/LoggingTest.cs +++ b/src/System.Net.Requests/tests/LoggingTest.cs @@ -10,9 +10,7 @@ namespace System.Net.Tests public class LoggingTest { [Fact] - [ActiveIssue(20470, TargetFrameworkMonikers.UapAot)] [SkipOnTargetFramework(TargetFrameworkMonikers.Mono, "NetEventSource is only part of .NET Core.")] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "NetEventSource is only part of .NET Core.")] public void EventSource_ExistsWithCorrectId() { Type esType = typeof(WebRequest).Assembly.GetType("System.Net.NetEventSource", throwOnError: true, ignoreCase: false); diff --git a/src/System.Net.Requests/tests/RequestStreamTest.cs b/src/System.Net.Requests/tests/RequestStreamTest.cs index 963dc8822e5d..638608f39247 100644 --- a/src/System.Net.Requests/tests/RequestStreamTest.cs +++ b/src/System.Net.Requests/tests/RequestStreamTest.cs @@ -206,7 +206,6 @@ await GetRequestStream((stream) => }); } - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "cancellation token ignored on netfx")] [Fact] public async Task FlushAsync_TokenIsCanceled_TaskIsCanceled() { diff --git a/src/System.Net.Requests/tests/System.Net.Requests.Tests.csproj b/src/System.Net.Requests/tests/System.Net.Requests.Tests.csproj index 376dec39bf9e..638ce05f04ad 100644 --- a/src/System.Net.Requests/tests/System.Net.Requests.Tests.csproj +++ b/src/System.Net.Requests/tests/System.Net.Requests.Tests.csproj @@ -3,7 +3,7 @@ {E520B5FD-C6FF-46CF-8079-6C8098013EA3} ../src/Resources/Strings.resx true - netstandard-Debug;netstandard-Release + netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release $(DefineConstants);NETSTANDARD diff --git a/src/System.Net.Security/tests/FunctionalTests/ClientAsyncAuthenticateTest.cs b/src/System.Net.Security/tests/FunctionalTests/ClientAsyncAuthenticateTest.cs index 359b536106e1..d3a9f20904f8 100644 --- a/src/System.Net.Security/tests/FunctionalTests/ClientAsyncAuthenticateTest.cs +++ b/src/System.Net.Security/tests/FunctionalTests/ClientAsyncAuthenticateTest.cs @@ -25,7 +25,6 @@ public ClientAsyncAuthenticateTest() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "CI uses old Framework version, which doesn't support using SslProtocols.None for default system behavior")] public async Task ClientAsyncAuthenticate_SslStreamClientServerNone_UseStrongCryptoSet() { SslProtocols protocol = SslProtocols.None; diff --git a/src/System.Net.Security/tests/FunctionalTests/Configurations.props b/src/System.Net.Security/tests/FunctionalTests/Configurations.props index ef90f11e9ae0..585a03b405f8 100644 --- a/src/System.Net.Security/tests/FunctionalTests/Configurations.props +++ b/src/System.Net.Security/tests/FunctionalTests/Configurations.props @@ -1,9 +1,7 @@  - netstandard-Unix; - netstandard-Windows_NT; - netstandard-OSX; + uap-Windows_NT; netcoreapp-Windows_NT; netcoreapp-Unix; netcoreapp-OSX; diff --git a/src/System.Net.Security/tests/FunctionalTests/LoggingTest.cs b/src/System.Net.Security/tests/FunctionalTests/LoggingTest.cs index 0f216afc1cb8..31b5cb806823 100644 --- a/src/System.Net.Security/tests/FunctionalTests/LoggingTest.cs +++ b/src/System.Net.Security/tests/FunctionalTests/LoggingTest.cs @@ -13,8 +13,6 @@ namespace System.Net.Security.Tests public class LoggingTest { [Fact] - [ActiveIssue(20470, TargetFrameworkMonikers.UapAot)] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "NetEventSource is only part of .NET Core.")] public void EventSource_ExistsWithCorrectId() { Type esType = typeof(SslStream).Assembly.GetType("System.Net.NetEventSource", throwOnError: true, ignoreCase: false); @@ -27,8 +25,6 @@ public void EventSource_ExistsWithCorrectId() } [Fact] - [ActiveIssue(20470, TargetFrameworkMonikers.UapAot)] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "NetEventSource is only part of .NET Core.")] public void EventSource_EventsRaisedAsExpected() { RemoteExecutor.Invoke(() => diff --git a/src/System.Net.Security/tests/FunctionalTests/NegotiateStreamStreamToStreamTest.cs b/src/System.Net.Security/tests/FunctionalTests/NegotiateStreamStreamToStreamTest.cs index 05ad57572dae..f6f39a1bd55e 100644 --- a/src/System.Net.Security/tests/FunctionalTests/NegotiateStreamStreamToStreamTest.cs +++ b/src/System.Net.Security/tests/FunctionalTests/NegotiateStreamStreamToStreamTest.cs @@ -135,7 +135,6 @@ public async Task NegotiateStream_StreamToStream_Authentication_TargetName_Succe } [ConditionalFact(nameof(IsNtlmInstalled))] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, ".NET Core difference in behavior: https://github.com/dotnet/corefx/issues/5241")] public async Task NegotiateStream_StreamToStream_Authentication_EmptyCredentials_Fails() { string targetName = "testTargetName"; @@ -344,7 +343,6 @@ public void NegotiateStream_StreamToStream_Flush_Propagated() } [ConditionalFact(nameof(IsNtlmInstalled))] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Relies on FlushAsync override not available in desktop")] public void NegotiateStream_StreamToStream_FlushAsync_Propagated() { VirtualNetwork network = new VirtualNetwork(); diff --git a/src/System.Net.Security/tests/FunctionalTests/SslStreamStreamToStreamTest.cs b/src/System.Net.Security/tests/FunctionalTests/SslStreamStreamToStreamTest.cs index 87c38bf66822..76fd9adb1762 100644 --- a/src/System.Net.Security/tests/FunctionalTests/SslStreamStreamToStreamTest.cs +++ b/src/System.Net.Security/tests/FunctionalTests/SslStreamStreamToStreamTest.cs @@ -85,7 +85,6 @@ await TestConfiguration.WhenAllOrAnyFailedWithTimeout(client.AuthenticateAsClien } } - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, ".NET Framework does not recover well from underlying stream failures")] [Fact] public async Task Read_CorrectlyUnlocksAfterFailure() { @@ -519,7 +518,6 @@ public void SslStream_StreamToStream_Flush_Propagated() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Relies on FlushAsync override not available in desktop")] public void SslStream_StreamToStream_FlushAsync_Propagated() { VirtualNetwork network = new VirtualNetwork(); @@ -719,7 +717,6 @@ public async Task ReadAsync_WriteAsync_Precanceled_ThrowsOperationCanceledExcept } } - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "ReadAsyncs on netfx aren't cancelable after they start.")] [Fact] public async Task ReadAsync_CanceledAfterStart_ThrowsOperationCanceledException() { diff --git a/src/System.Net.Security/tests/FunctionalTests/System.Net.Security.Tests.csproj b/src/System.Net.Security/tests/FunctionalTests/System.Net.Security.Tests.csproj index fed636ecd10d..48384738d7b7 100644 --- a/src/System.Net.Security/tests/FunctionalTests/System.Net.Security.Tests.csproj +++ b/src/System.Net.Security/tests/FunctionalTests/System.Net.Security.Tests.csproj @@ -2,7 +2,7 @@ {A55A2B9A-830F-4330-A0E7-02A9FB30ABD2} true - netcoreapp-OSX-Debug;netcoreapp-OSX-Release;netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netstandard-OSX-Debug;netstandard-OSX-Release;netstandard-Unix-Debug;netstandard-Unix-Release;netstandard-Windows_NT-Debug;netstandard-Windows_NT-Release + netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-OSX-Debug;netcoreapp-OSX-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release true @@ -83,7 +83,6 @@ - src\SniHelper.cs diff --git a/src/System.Net.ServicePoint/tests/Configurations.props b/src/System.Net.ServicePoint/tests/Configurations.props index 2bc19ff4170e..acf56fa2750e 100644 --- a/src/System.Net.ServicePoint/tests/Configurations.props +++ b/src/System.Net.ServicePoint/tests/Configurations.props @@ -1,8 +1,8 @@  - netstandard; netcoreapp; + uap; \ No newline at end of file diff --git a/src/System.Net.ServicePoint/tests/ServicePointManagerTest.cs b/src/System.Net.ServicePoint/tests/ServicePointManagerTest.cs index df9bdae1681f..90299691716c 100644 --- a/src/System.Net.ServicePoint/tests/ServicePointManagerTest.cs +++ b/src/System.Net.ServicePoint/tests/ServicePointManagerTest.cs @@ -140,7 +140,6 @@ public static void ReusePort_Roundtrips() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Desktop default SecurityProtocol to Ssl3; explicitly changed to SystemDefault for core.")] public static void SecurityProtocol_Roundtrips() { RemoteExecutor.Invoke(() => @@ -218,7 +217,6 @@ public static void InvalidArguments_Throw() }).Dispose(); } - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Ssl3 is supported by desktop but explicitly not by core")] [Fact] public static void SecurityProtocol_Ssl3_NotSupported() { @@ -272,7 +270,6 @@ public static void FindServicePoint_ReturnsCachedServicePoint() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Desktop ServicePoint lifetime is slightly longer due to implementation details of real implementation")] public static void FindServicePoint_Collectible() { RemoteExecutor.Invoke(() => diff --git a/src/System.Net.ServicePoint/tests/System.Net.ServicePoint.Tests.csproj b/src/System.Net.ServicePoint/tests/System.Net.ServicePoint.Tests.csproj index 43d9e76f7737..7d072a743c3c 100644 --- a/src/System.Net.ServicePoint/tests/System.Net.ServicePoint.Tests.csproj +++ b/src/System.Net.ServicePoint/tests/System.Net.ServicePoint.Tests.csproj @@ -2,7 +2,7 @@ {DC3BBD1F-37C8-40B2-B248-E12E8D0D146B} true - netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release + netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release diff --git a/src/System.Net.Sockets/tests/FunctionalTests/Accept.cs b/src/System.Net.Sockets/tests/FunctionalTests/Accept.cs index f4811c7ea8fd..ec9fd67fd44c 100644 --- a/src/System.Net.Sockets/tests/FunctionalTests/Accept.cs +++ b/src/System.Net.Sockets/tests/FunctionalTests/Accept.cs @@ -165,7 +165,6 @@ public async Task Accept_WithTargetSocket_Success() } } - [ActiveIssue(22808, TargetFrameworkMonikers.NetFramework)] [ActiveIssue(17209, TestPlatforms.AnyUnix)] [OuterLoop] // TODO: Issue #11345 [Theory] diff --git a/src/System.Net.Sockets/tests/FunctionalTests/ArgumentValidationTests.cs b/src/System.Net.Sockets/tests/FunctionalTests/ArgumentValidationTests.cs index 6cf726d404aa..6d78a3b89bd8 100644 --- a/src/System.Net.Sockets/tests/FunctionalTests/ArgumentValidationTests.cs +++ b/src/System.Net.Sockets/tests/FunctionalTests/ArgumentValidationTests.cs @@ -503,7 +503,6 @@ public void Select_LargeList_Throws_ArgumentOutOfRange() Assert.Throws(() => Socket.Select(null, null, largeList, -1)); } - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Bug in AcceptAsync that dereferences null SAEA argument")] [Fact] public void AcceptAsync_NullAsyncEventArgs_Throws_ArgumentNull() { @@ -536,7 +535,6 @@ public void AcceptAsync_NotListening_Throws_InvalidOperation() } } - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Bug in ReceiveAsync that dereferences null SAEA argument")] [Fact] public void ConnectAsync_NullAsyncEventArgs_Throws_ArgumentNull() { @@ -587,7 +585,6 @@ public void ConnectAsync_AddressFamily_Throws_NotSupported() Assert.Throws(() => GetSocket(AddressFamily.InterNetwork).ConnectAsync(eventArgs)); } - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Bug in ConnectAsync that dereferences null SAEA argument")] [Fact] public void ConnectAsync_Static_NullAsyncEventArgs_Throws_ArgumentNull() { @@ -610,14 +607,12 @@ public void ConnectAsync_Static_NullRemoteEndPoint_Throws_ArgumentNull() Assert.Throws(() => Socket.ConnectAsync(SocketType.Stream, ProtocolType.Tcp, s_eventArgs)); } - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Bug in ReceiveAsync that dereferences null SAEA argument")] [Fact] public void ReceiveAsync_NullAsyncEventArgs_Throws_ArgumentNull() { Assert.Throws(() => GetSocket().ReceiveAsync(null)); } - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Bug in ReceiveFromAsync that dereferences null SAEA argument")] [Fact] public void ReceiveFromAsync_NullAsyncEventArgs_Throws_ArgumentNull() { @@ -640,7 +635,6 @@ public void ReceiveFromAsync_AddressFamily_Throws_Argument() AssertExtensions.Throws("RemoteEndPoint", () => GetSocket(AddressFamily.InterNetwork).ReceiveFromAsync(eventArgs)); } - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Bug in ReceiveMessageFromAsync that dereferences null SAEA argument")] [Fact] public void ReceiveMessageFromAsync_NullAsyncEventArgs_Throws_ArgumentNull() { @@ -663,21 +657,18 @@ public void ReceiveMessageFromAsync_AddressFamily_Throws_Argument() AssertExtensions.Throws("RemoteEndPoint", () => GetSocket(AddressFamily.InterNetwork).ReceiveMessageFromAsync(eventArgs)); } - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Bug in SendAsync that dereferences null SAEA argument")] [Fact] public void SendAsync_NullAsyncEventArgs_Throws_ArgumentNull() { Assert.Throws(() => GetSocket().SendAsync(null)); } - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Bug in SendPacketsAsync that dereferences null SAEA argument")] [Fact] public void SendPacketsAsync_NullAsyncEventArgs_Throws_ArgumentNull() { Assert.Throws(() => GetSocket().SendPacketsAsync(null)); } - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Bug in SendPacketsAsync that dereferences null SAEA.SendPacketsElements")] [Fact] public void SendPacketsAsync_NullSendPacketsElements_Throws_ArgumentNull() { @@ -694,7 +685,6 @@ public void SendPacketsAsync_NotConnected_Throws_NotSupported() Assert.Throws(() => GetSocket().SendPacketsAsync(eventArgs)); } - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Bug in SendToAsync that dereferences null SAEA argument")] [Fact] public void SendToAsync_NullAsyncEventArgs_Throws_ArgumentNull() { diff --git a/src/System.Net.Sockets/tests/FunctionalTests/Configurations.props b/src/System.Net.Sockets/tests/FunctionalTests/Configurations.props index 54fc664df86c..3c373cd12fa3 100644 --- a/src/System.Net.Sockets/tests/FunctionalTests/Configurations.props +++ b/src/System.Net.Sockets/tests/FunctionalTests/Configurations.props @@ -1,8 +1,7 @@  - netstandard-Windows_NT; - netstandard-Unix; + uap-Windows_NT; netcoreapp-Windows_NT; netcoreapp-Unix; diff --git a/src/System.Net.Sockets/tests/FunctionalTests/CreateSocketTests.cs b/src/System.Net.Sockets/tests/FunctionalTests/CreateSocketTests.cs index a4aa95b2e16b..72597191b4bc 100644 --- a/src/System.Net.Sockets/tests/FunctionalTests/CreateSocketTests.cs +++ b/src/System.Net.Sockets/tests/FunctionalTests/CreateSocketTests.cs @@ -114,7 +114,6 @@ public void Ctor_Raw_NotSupported_ExpectedError(AddressFamily addressFamily, Pro Assert.Contains(e.SocketErrorCode, new[] { SocketError.AccessDenied, SocketError.ProtocolNotSupported }); } - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Sockets are still inheritable on netfx: https://github.com/dotnet/corefx/pull/32903")] [Theory] [InlineData(true, 0)] // Accept [InlineData(false, 0)] diff --git a/src/System.Net.Sockets/tests/FunctionalTests/IPPacketInformationTest.cs b/src/System.Net.Sockets/tests/FunctionalTests/IPPacketInformationTest.cs index f20ba015feb6..86b01a96649c 100644 --- a/src/System.Net.Sockets/tests/FunctionalTests/IPPacketInformationTest.cs +++ b/src/System.Net.Sockets/tests/FunctionalTests/IPPacketInformationTest.cs @@ -10,7 +10,6 @@ namespace System.Net.Sockets.Tests { public class IPPacketInformationTest { - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Bug in IPPacketInformation.Equals that dereferences null address")] [Fact] public void Equals_DefaultValues_Success() { @@ -19,7 +18,6 @@ public void Equals_DefaultValues_Success() Assert.False(default(IPPacketInformation) != default(IPPacketInformation)); } - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Bug in IPPacketInformation.GetHashCode that dereferences null address")] [Fact] public void GetHashCode_DefaultValues_Success() { diff --git a/src/System.Net.Sockets/tests/FunctionalTests/LoggingTest.cs b/src/System.Net.Sockets/tests/FunctionalTests/LoggingTest.cs index e0069336420a..794f5bb5995c 100644 --- a/src/System.Net.Sockets/tests/FunctionalTests/LoggingTest.cs +++ b/src/System.Net.Sockets/tests/FunctionalTests/LoggingTest.cs @@ -21,8 +21,6 @@ public LoggingTest(ITestOutputHelper output) } [Fact] - [ActiveIssue(20470, TargetFrameworkMonikers.UapAot)] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "NetEventSource is only part of .NET Core.")] public static void EventSource_ExistsWithCorrectId() { Type esType = typeof(Socket).Assembly.GetType("System.Net.NetEventSource", throwOnError: true, ignoreCase: false); @@ -36,8 +34,6 @@ public static void EventSource_ExistsWithCorrectId() [OuterLoop] [Fact] - [ActiveIssue(20470, TargetFrameworkMonikers.UapAot)] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "NetEventSource is only part of .NET Core.")] public void EventSource_EventsRaisedAsExpected() { RemoteExecutor.Invoke(() => diff --git a/src/System.Net.Sockets/tests/FunctionalTests/NetworkStreamTest.cs b/src/System.Net.Sockets/tests/FunctionalTests/NetworkStreamTest.cs index af10c538d730..8730a507d3ae 100644 --- a/src/System.Net.Sockets/tests/FunctionalTests/NetworkStreamTest.cs +++ b/src/System.Net.Sockets/tests/FunctionalTests/NetworkStreamTest.cs @@ -685,7 +685,6 @@ await RunWithConnectedNetworkStreamsAsync((stream, _) => }); } - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Optimized .NET Core CopyToAsync doesn't use Begin/EndRead, skipping code that throws ObjectDisposedException on netfx")] [Fact] public async Task CopyToAsync_DisposedSourceStream_ThrowsOnWindows_NoThrowOnUnix() { diff --git a/src/System.Net.Sockets/tests/FunctionalTests/OSSupport.cs b/src/System.Net.Sockets/tests/FunctionalTests/OSSupport.cs index 2dbf25019e06..3666424cfa8e 100644 --- a/src/System.Net.Sockets/tests/FunctionalTests/OSSupport.cs +++ b/src/System.Net.Sockets/tests/FunctionalTests/OSSupport.cs @@ -18,7 +18,6 @@ public void SupportsIPv4_MatchesOSSupportsIPv4() #pragma warning restore } - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "SupportsIPv6 factors in config data")] [Fact] public void SupportsIPv6_MatchesOSSupportsIPv6() { @@ -27,7 +26,6 @@ public void SupportsIPv6_MatchesOSSupportsIPv6() #pragma warning restore } - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] [Fact] public void UseOnlyOverlappedIO_AlwaysFalse() { diff --git a/src/System.Net.Sockets/tests/FunctionalTests/SendPacketsAsync.cs b/src/System.Net.Sockets/tests/FunctionalTests/SendPacketsAsync.cs index 0fd60491175d..6f1bae59338a 100644 --- a/src/System.Net.Sockets/tests/FunctionalTests/SendPacketsAsync.cs +++ b/src/System.Net.Sockets/tests/FunctionalTests/SendPacketsAsync.cs @@ -76,7 +76,6 @@ public void Disposed_Throw(SocketImplementationType type) } } - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Bug in SendPacketsAsync that dereferences null SAEA argument")] [OuterLoop] // TODO: Issue #11345 [Theory] [InlineData(SocketImplementationType.APM)] @@ -107,7 +106,6 @@ public void NotConnected_Throw() }); } - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Bug in SendPacketsAsync that dereferences null m_SendPacketsElementsInternal array")] [OuterLoop] // TODO: Issue #11345 [Theory] [InlineData(SocketImplementationType.APM)] @@ -387,7 +385,6 @@ public void SendPacketsElement_FileLargeCount_Throws(SocketImplementationType ty [Theory] [InlineData(SocketImplementationType.APM)] [InlineData(SocketImplementationType.Async)] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "The fix was made in corefx that is not in netfx. See https://github.com/dotnet/corefx/pull/34331")] public void SendPacketsElement_FileStreamIsReleasedOnError(SocketImplementationType type) { // this test checks that FileStreams opened by the implementation of SendPacketsAsync diff --git a/src/System.Net.Sockets/tests/FunctionalTests/SocketAsyncEventArgsTest.cs b/src/System.Net.Sockets/tests/FunctionalTests/SocketAsyncEventArgsTest.cs index 2a3feb8f09a4..7b15dd2c1127 100644 --- a/src/System.Net.Sockets/tests/FunctionalTests/SocketAsyncEventArgsTest.cs +++ b/src/System.Net.Sockets/tests/FunctionalTests/SocketAsyncEventArgsTest.cs @@ -581,7 +581,6 @@ public void AcceptAsync_WithReceiveBuffer_Failure() } } - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "SAEA left in unusable state after failed BeginGetHostAddresses on netfx")] [Fact] public async Task SocketConnectAsync_IPAddressAny_SocketAsyncEventArgsReusableAfterFailure() { diff --git a/src/System.Net.Sockets/tests/FunctionalTests/SocketInformationTest.cs b/src/System.Net.Sockets/tests/FunctionalTests/SocketInformationTest.cs index 787ee535fb86..3adc5f253b89 100644 --- a/src/System.Net.Sockets/tests/FunctionalTests/SocketInformationTest.cs +++ b/src/System.Net.Sockets/tests/FunctionalTests/SocketInformationTest.cs @@ -9,7 +9,6 @@ namespace System.Net.Sockets.Tests { public class SocketInformationTest { - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] [Fact] public void Socket_Ctor_DuplicateAndClose_Throw() { diff --git a/src/System.Net.Sockets/tests/FunctionalTests/System.Net.Sockets.Tests.csproj b/src/System.Net.Sockets/tests/FunctionalTests/System.Net.Sockets.Tests.csproj index dcb4cf8bf17f..018f950f2e49 100644 --- a/src/System.Net.Sockets/tests/FunctionalTests/System.Net.Sockets.Tests.csproj +++ b/src/System.Net.Sockets/tests/FunctionalTests/System.Net.Sockets.Tests.csproj @@ -3,7 +3,7 @@ {8CBA022C-635F-4C8D-9D29-CD8AAC68C8E6} true true - netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netstandard-Unix-Debug;netstandard-Unix-Release;netstandard-Windows_NT-Debug;netstandard-Windows_NT-Release + netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netcoreapp-Unix-Debug;netcoreapp-Unix-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release @@ -14,31 +14,31 @@ - + - + - + - + - + - + - + - + @@ -46,13 +46,13 @@ - + - + SocketCommon\Configuration.cs diff --git a/src/System.Net.Sockets/tests/FunctionalTests/TcpClientTest.cs b/src/System.Net.Sockets/tests/FunctionalTests/TcpClientTest.cs index cc4e13584f52..44273ae160ea 100644 --- a/src/System.Net.Sockets/tests/FunctionalTests/TcpClientTest.cs +++ b/src/System.Net.Sockets/tests/FunctionalTests/TcpClientTest.cs @@ -233,7 +233,6 @@ public void ConnectedAvailable_InitialValues_Default() } } - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Bug in Connected that dereferences null Client socket")] [OuterLoop] // TODO: Issue #11345 [Fact] public void ConnectedAvailable_NullClient() @@ -247,7 +246,6 @@ public void ConnectedAvailable_NullClient() } } - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Bug in ExclusiveAddressUse that dereferences null Client socket")] [OuterLoop] // TODO: Issue #11345 [Fact] public void ExclusiveAddressUse_NullClient() @@ -406,7 +404,6 @@ public async Task Properties_PersistAfterConnect() } } - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Bug in TcpClient.Dispose/EndConnect: the former nulls out Client, which the latter tries to use")] [OuterLoop] // TODO: Issue #11345 [Theory] [InlineData(false)] diff --git a/src/System.Net.Sockets/tests/FunctionalTests/UdpClientTest.cs b/src/System.Net.Sockets/tests/FunctionalTests/UdpClientTest.cs index 09170c4d96f0..b500ee4364a1 100644 --- a/src/System.Net.Sockets/tests/FunctionalTests/UdpClientTest.cs +++ b/src/System.Net.Sockets/tests/FunctionalTests/UdpClientTest.cs @@ -691,7 +691,6 @@ public void UdpReceiveResult_Equality() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public void BeginSend_IPv6Socket_IPv4Dns_Success() { using (var receiver = new UdpClient("127.0.0.1", DiscardPort)) diff --git a/src/System.Net.Sockets/tests/ManualPerformanceTests/Configurations.props b/src/System.Net.Sockets/tests/ManualPerformanceTests/Configurations.props index 1b6509ccdf10..20cb04040c9a 100644 --- a/src/System.Net.Sockets/tests/ManualPerformanceTests/Configurations.props +++ b/src/System.Net.Sockets/tests/ManualPerformanceTests/Configurations.props @@ -1,8 +1,9 @@  - netstandard-Windows_NT; - netstandard-Unix; + netcoreapp-Windows_NT; + netcoreapp-Unix; + uap-Windows_NT \ No newline at end of file diff --git a/src/System.Net.Sockets/tests/ManualPerformanceTests/System.Net.Sockets.Async.Stress.Tests.csproj b/src/System.Net.Sockets/tests/ManualPerformanceTests/System.Net.Sockets.Async.Stress.Tests.csproj index 078e91a69cf0..3b88e718b23f 100644 --- a/src/System.Net.Sockets/tests/ManualPerformanceTests/System.Net.Sockets.Async.Stress.Tests.csproj +++ b/src/System.Net.Sockets/tests/ManualPerformanceTests/System.Net.Sockets.Async.Stress.Tests.csproj @@ -1,7 +1,7 @@ {BB5C85AD-C51A-4903-80E9-6F6E1AC1AD34} - netstandard-Unix-Debug;netstandard-Unix-Release;netstandard-Windows_NT-Debug;netstandard-Windows_NT-Release + netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netcoreapp-Unix-Debug;netcoreapp-Unix-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release diff --git a/src/System.Net.WebClient/tests/Configurations.props b/src/System.Net.WebClient/tests/Configurations.props index ff0d415e4593..acf56fa2750e 100644 --- a/src/System.Net.WebClient/tests/Configurations.props +++ b/src/System.Net.WebClient/tests/Configurations.props @@ -1,7 +1,8 @@  - netstandard; + netcoreapp; + uap; \ No newline at end of file diff --git a/src/System.Net.WebClient/tests/System.Net.WebClient.Tests.csproj b/src/System.Net.WebClient/tests/System.Net.WebClient.Tests.csproj index 184198dd53be..f3285cca8587 100644 --- a/src/System.Net.WebClient/tests/System.Net.WebClient.Tests.csproj +++ b/src/System.Net.WebClient/tests/System.Net.WebClient.Tests.csproj @@ -1,7 +1,7 @@ {D2348221-084D-4076-91BF-C24D28E7D386} - netstandard-Debug;netstandard-Release + netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release $(DefineConstants);NETSTANDARD diff --git a/src/System.Net.WebHeaderCollection/tests/Configurations.props b/src/System.Net.WebHeaderCollection/tests/Configurations.props index ff0d415e4593..acf56fa2750e 100644 --- a/src/System.Net.WebHeaderCollection/tests/Configurations.props +++ b/src/System.Net.WebHeaderCollection/tests/Configurations.props @@ -1,7 +1,8 @@  - netstandard; + netcoreapp; + uap; \ No newline at end of file diff --git a/src/System.Net.WebHeaderCollection/tests/LoggingTest.cs b/src/System.Net.WebHeaderCollection/tests/LoggingTest.cs index b0b40d49f3bf..e71f4223b1c0 100644 --- a/src/System.Net.WebHeaderCollection/tests/LoggingTest.cs +++ b/src/System.Net.WebHeaderCollection/tests/LoggingTest.cs @@ -9,10 +9,8 @@ namespace System.Net.Tests { public class WebHeaderCollectionLoggingTest { - [ActiveIssue(20470, TargetFrameworkMonikers.UapAot)] [Fact] [SkipOnTargetFramework(TargetFrameworkMonikers.Mono, "NetEventSource is only part of .NET Core")] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "NetEventSource is only part of .NET Core")] public void EventSource_ExistsWithCorrectId() { Type esType = typeof(WebHeaderCollection).Assembly.GetType("System.Net.NetEventSource", throwOnError: true, ignoreCase: false); diff --git a/src/System.Net.WebHeaderCollection/tests/System.Net.WebHeaderCollection.Tests.csproj b/src/System.Net.WebHeaderCollection/tests/System.Net.WebHeaderCollection.Tests.csproj index c2bfdcedf467..868f59df891f 100644 --- a/src/System.Net.WebHeaderCollection/tests/System.Net.WebHeaderCollection.Tests.csproj +++ b/src/System.Net.WebHeaderCollection/tests/System.Net.WebHeaderCollection.Tests.csproj @@ -1,7 +1,7 @@ {F8C21EE8-B271-4014-B9D9-B2C31520AF3F} - netstandard-Debug;netstandard-Release + netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release diff --git a/src/System.Net.WebHeaderCollection/tests/WebHeaderCollectionTest.cs b/src/System.Net.WebHeaderCollection/tests/WebHeaderCollectionTest.cs index 952662618afd..ce6d055e3abf 100644 --- a/src/System.Net.WebHeaderCollection/tests/WebHeaderCollectionTest.cs +++ b/src/System.Net.WebHeaderCollection/tests/WebHeaderCollectionTest.cs @@ -542,7 +542,6 @@ public void Add_InvalidHeader_ThrowsArgumentException(string header, string para [Fact] [SkipOnTargetFramework(TargetFrameworkMonikers.Mono, "Does not work in Mono")] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Requires fix shipping in .NET 4.7.2")] public void GetValues_MultipleSetCookieHeadersWithExpiresAttribute_Success() { WebHeaderCollection w = new WebHeaderCollection(); @@ -561,7 +560,6 @@ public void GetValues_MultipleSetCookieHeadersWithExpiresAttribute_Success() [Fact] [SkipOnTargetFramework(TargetFrameworkMonikers.Mono, "Does not work in Mono")] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Requires fix shipping in .NET 4.7.2")] public void GetValues_SingleSetCookieHeaderWithMultipleCookiesWithExpiresAttribute_Success() { WebHeaderCollection w = new WebHeaderCollection(); @@ -576,7 +574,6 @@ public void GetValues_SingleSetCookieHeaderWithMultipleCookiesWithExpiresAttribu } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Requires fix shipping in .NET 4.7.2")] public void GetValues_MultipleSetCookieHeadersWithNoAttribute_Success() { WebHeaderCollection w = new WebHeaderCollection(); @@ -594,7 +591,6 @@ public void GetValues_MultipleSetCookieHeadersWithNoAttribute_Success() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Requires fix shipping in .NET 4.7.2")] public void GetValues_SingleSetCookieHeaderWithMultipleCookiesWithNoAttribute_Success() { WebHeaderCollection w = new WebHeaderCollection(); @@ -610,7 +606,6 @@ public void GetValues_SingleSetCookieHeaderWithMultipleCookiesWithNoAttribute_Su [Fact] [SkipOnTargetFramework(TargetFrameworkMonikers.Mono, "Does not work in Mono")] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Requires fix shipping in .NET 4.7.2")] public void GetValues_InvalidSetCookieHeader_Success() { WebHeaderCollection w = new WebHeaderCollection(); diff --git a/src/System.Net.WebProxy/tests/Configurations.props b/src/System.Net.WebProxy/tests/Configurations.props index ff0d415e4593..acf56fa2750e 100644 --- a/src/System.Net.WebProxy/tests/Configurations.props +++ b/src/System.Net.WebProxy/tests/Configurations.props @@ -1,7 +1,8 @@  - netstandard; + netcoreapp; + uap; \ No newline at end of file diff --git a/src/System.Net.WebProxy/tests/System.Net.WebProxy.Tests.csproj b/src/System.Net.WebProxy/tests/System.Net.WebProxy.Tests.csproj index eb985e5eef99..9bce7f8dc7b3 100644 --- a/src/System.Net.WebProxy/tests/System.Net.WebProxy.Tests.csproj +++ b/src/System.Net.WebProxy/tests/System.Net.WebProxy.Tests.csproj @@ -1,7 +1,7 @@ {0DB204CE-1CB8-4CC2-A2E3-43DA93DC898B} - netstandard-Debug;netstandard-Release + netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release diff --git a/src/System.Net.WebProxy/tests/WebProxyTest.cs b/src/System.Net.WebProxy/tests/WebProxyTest.cs index 70f3757e1925..7c3633810c10 100644 --- a/src/System.Net.WebProxy/tests/WebProxyTest.cs +++ b/src/System.Net.WebProxy/tests/WebProxyTest.cs @@ -211,14 +211,12 @@ public static void WebProxy_BypassOnLocal_SpecialCases() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Not yet fixed in the .NET framework")] public static void WebProxy_BypassOnLocal_ConfiguredToNotBypassLocal() { Assert.False(new WebProxy("microsoft", BypassOnLocal: false).IsBypassed(new Uri($"http://{IPAddress.Loopback}"))); } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public static void WebProxy_GetDefaultProxy_NotSupported() { #pragma warning disable 0618 // obsolete method diff --git a/src/System.Net.WebSockets.Client/tests/CancelTest.cs b/src/System.Net.WebSockets.Client/tests/CancelTest.cs index 177a095f2da3..9b33a1139e9e 100644 --- a/src/System.Net.WebSockets.Client/tests/CancelTest.cs +++ b/src/System.Net.WebSockets.Client/tests/CancelTest.cs @@ -76,7 +76,6 @@ await cws.SendAsync( }, server); } - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Cancellation sometimes throw wrong exceptions, dotnet/corefx #28777")] [OuterLoop("Uses external servers")] [ConditionalTheory(nameof(WebSocketsSupported)), MemberData(nameof(EchoServers))] public async Task CloseAsync_Cancel_Success(Uri server) @@ -138,7 +137,6 @@ public async Task ReceiveAsync_CancelThenReceive_ThrowsOperationCanceledExceptio } } - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Cancellation sometimes throw wrong exceptions, dotnet/corefx #26635")] [OuterLoop("Uses external servers")] [ConditionalTheory(nameof(WebSocketsSupported)), MemberData(nameof(EchoServers))] public async Task ReceiveAsync_ReceiveThenCancel_ThrowsOperationCanceledException(Uri server) diff --git a/src/System.Net.WebSockets.Client/tests/ClientWebSocketOptionsTests.cs b/src/System.Net.WebSockets.Client/tests/ClientWebSocketOptionsTests.cs index c94f55483204..4d41b9e20419 100644 --- a/src/System.Net.WebSockets.Client/tests/ClientWebSocketOptionsTests.cs +++ b/src/System.Net.WebSockets.Client/tests/ClientWebSocketOptionsTests.cs @@ -109,9 +109,9 @@ public static void SetBuffer_InvalidArgs_Throws() { // Recreate the minimum WebSocket buffer size values from the .NET Framework version of WebSocket, // and pick the correct name of the buffer used when throwing an ArgumentOutOfRangeException. - int minSendBufferSize = PlatformDetection.IsFullFramework ? 16 : 1; - int minReceiveBufferSize = PlatformDetection.IsFullFramework ? 256 : 1; - string bufferName = PlatformDetection.IsFullFramework ? "internalBuffer" : "buffer"; + int minSendBufferSize = 1; + int minReceiveBufferSize = 1; + string bufferName = "buffer"; var cws = new ClientWebSocket(); diff --git a/src/System.Net.WebSockets.Client/tests/ClientWebSocketUnitTest.cs b/src/System.Net.WebSockets.Client/tests/ClientWebSocketUnitTest.cs index 3ccb22755f6c..ba3fd748a28f 100644 --- a/src/System.Net.WebSockets.Client/tests/ClientWebSocketUnitTest.cs +++ b/src/System.Net.WebSockets.Client/tests/ClientWebSocketUnitTest.cs @@ -56,21 +56,14 @@ public async Task CloseAsync_CreateAndCloseOutput_ThrowsInvalidOperationExceptio InvalidOperationException exception; using (var tcc = new ThreadCultureChange()) { - // The .NET Native toolchain optimizes away exception messages. - if (!PlatformDetection.IsNetNative) - tcc.ChangeCultureInfo(CultureInfo.InvariantCulture); + tcc.ChangeCultureInfo(CultureInfo.InvariantCulture); exception = await Assert.ThrowsAsync( () => cws.CloseOutputAsync(WebSocketCloseStatus.Empty, "", new CancellationToken())); } - // The .NET Native toolchain optimizes away exception messages. - if (!PlatformDetection.IsNetNative) - { - string expectedMessage = ResourceHelper.GetExceptionMessage("net_WebSockets_NotConnected"); - Assert.Equal(expectedMessage, exception.Message); - } - + string expectedMessage = ResourceHelper.GetExceptionMessage("net_WebSockets_NotConnected"); + Assert.Equal(expectedMessage, exception.Message); Assert.Equal(WebSocketState.None, cws.State); } } @@ -104,21 +97,13 @@ public async Task CloseAsync_CreateAndReceive_ThrowsInvalidOperationExceptionWit using (var tcc = new ThreadCultureChange()) { - // The .NET Native toolchain optimizes away exception messages. - if (!PlatformDetection.IsNetNative) - tcc.ChangeCultureInfo(CultureInfo.InvariantCulture); - + tcc.ChangeCultureInfo(CultureInfo.InvariantCulture); exception = await Assert.ThrowsAsync( () => cws.ReceiveAsync(segment, ct)); } - // The .NET Native toolchain optimizes away exception messages. - if (!PlatformDetection.IsNetNative) - { - string expectedMessage = ResourceHelper.GetExceptionMessage("net_WebSockets_NotConnected"); - Assert.Equal(expectedMessage, exception.Message); - } - + string expectedMessage = ResourceHelper.GetExceptionMessage("net_WebSockets_NotConnected"); + Assert.Equal(expectedMessage, exception.Message); Assert.Equal(WebSocketState.None, cws.State); } } @@ -151,21 +136,13 @@ public async Task CloseAsync_CreateAndSend_ThrowsInvalidOperationExceptionWithMe InvalidOperationException exception; using (var tcc = new ThreadCultureChange()) { - // The .NET Native toolchain optimizes away exception messages. - if (!PlatformDetection.IsNetNative) - tcc.ChangeCultureInfo(CultureInfo.InvariantCulture); - + tcc.ChangeCultureInfo(CultureInfo.InvariantCulture); exception = await Assert.ThrowsAsync( () => cws.SendAsync(segment, WebSocketMessageType.Text, false, ct)); } - // The .NET Native toolchain optimizes away exception messages. - if (!PlatformDetection.IsNetNative) - { - string expectedMessage = ResourceHelper.GetExceptionMessage("net_WebSockets_NotConnected"); - Assert.Equal(expectedMessage, exception.Message); - } - + string expectedMessage = ResourceHelper.GetExceptionMessage("net_WebSockets_NotConnected"); + Assert.Equal(expectedMessage, exception.Message); Assert.Equal(WebSocketState.None, cws.State); } } diff --git a/src/System.Net.WebSockets.Client/tests/Configurations.props b/src/System.Net.WebSockets.Client/tests/Configurations.props index 66667bf08c32..8c2114d33b27 100644 --- a/src/System.Net.WebSockets.Client/tests/Configurations.props +++ b/src/System.Net.WebSockets.Client/tests/Configurations.props @@ -1,10 +1,9 @@  - netstandard-Windows_NT; - netstandard-Unix; netcoreapp-Windows_NT; netcoreapp-Unix; + uap-Windows_NT; \ No newline at end of file diff --git a/src/System.Net.WebSockets.Client/tests/ConnectTest.cs b/src/System.Net.WebSockets.Client/tests/ConnectTest.cs index 37d7e4655e51..8741e18b41de 100644 --- a/src/System.Net.WebSockets.Client/tests/ConnectTest.cs +++ b/src/System.Net.WebSockets.Client/tests/ConnectTest.cs @@ -33,7 +33,7 @@ public async Task ConnectAsync_NotWebSocketServer_ThrowsWebSocketExceptionWithMe Assert.Equal(WebSocketState.Closed, cws.State); // .NET Framework and UAP implmentations have different exception message from .NET Core. - if (!PlatformDetection.IsFullFramework && !PlatformDetection.IsUap) + if (!PlatformDetection.IsUap) { Assert.Equal(exceptionMessage, ex.Message); } @@ -91,7 +91,6 @@ public async Task ConnectAsync_AddCustomHeaders_Success(Uri server) } } - [ActiveIssue(18784, TargetFrameworkMonikers.NetFramework)] [OuterLoop("Uses external servers")] [ConditionalTheory(nameof(WebSocketsSupported))] public async Task ConnectAsync_AddHostHeader_Success() diff --git a/src/System.Net.WebSockets.Client/tests/LoggingTest.cs b/src/System.Net.WebSockets.Client/tests/LoggingTest.cs index 2b4fb6d5d133..3943550eb345 100644 --- a/src/System.Net.WebSockets.Client/tests/LoggingTest.cs +++ b/src/System.Net.WebSockets.Client/tests/LoggingTest.cs @@ -11,8 +11,6 @@ namespace System.Net.WebSockets.Tests public class LoggingTest { [Fact] - [ActiveIssue(20470, TargetFrameworkMonikers.UapAot)] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "NetEventSource is only part of .NET Core.")] public void EventSource_ExistsWithCorrectId() { Type esType = typeof(ClientWebSocket).GetTypeInfo().Assembly.GetType("System.Net.NetEventSource", throwOnError: true, ignoreCase: false); diff --git a/src/System.Net.WebSockets.Client/tests/SendReceiveTest.cs b/src/System.Net.WebSockets.Client/tests/SendReceiveTest.cs index d6ef7a7a4e90..e11e31323c7a 100644 --- a/src/System.Net.WebSockets.Client/tests/SendReceiveTest.cs +++ b/src/System.Net.WebSockets.Client/tests/SendReceiveTest.cs @@ -139,7 +139,6 @@ public async Task SendAsync_SendCloseMessageType_ThrowsArgumentExceptionWithMess } } - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Skip due to bugs in NETFX WebSocket, dotnet/corefx #33401")] [OuterLoop("Uses external servers")] [ConditionalTheory(nameof(WebSocketsSupported)), MemberData(nameof(EchoServers))] public async Task SendAsync_MultipleOutstandingSendOperations_Throws(Uri server) diff --git a/src/System.Net.WebSockets.Client/tests/System.Net.WebSockets.Client.Tests.csproj b/src/System.Net.WebSockets.Client/tests/System.Net.WebSockets.Client.Tests.csproj index 1717d2753e40..8f7f3dbf64b3 100644 --- a/src/System.Net.WebSockets.Client/tests/System.Net.WebSockets.Client.Tests.csproj +++ b/src/System.Net.WebSockets.Client/tests/System.Net.WebSockets.Client.Tests.csproj @@ -2,7 +2,7 @@ {7C395A91-D955-444C-98BF-D3F809A56CE1} ../src/Resources/Strings.resx - netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netstandard-Unix-Debug;netstandard-Unix-Release;netstandard-Windows_NT-Debug;netstandard-Windows_NT-Release + netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release $(DefineConstants);NETSTANDARD diff --git a/src/System.Net.WebSockets.WebSocketProtocol/tests/Configurations.props b/src/System.Net.WebSockets.WebSocketProtocol/tests/Configurations.props index 2bc19ff4170e..b0ad9a4c0cfe 100644 --- a/src/System.Net.WebSockets.WebSocketProtocol/tests/Configurations.props +++ b/src/System.Net.WebSockets.WebSocketProtocol/tests/Configurations.props @@ -1,8 +1,9 @@  - netstandard; netcoreapp; + netfx; + uap; \ No newline at end of file diff --git a/src/System.Net.WebSockets.WebSocketProtocol/tests/System.Net.WebSockets.WebSocketProtocol.Tests.csproj b/src/System.Net.WebSockets.WebSocketProtocol/tests/System.Net.WebSockets.WebSocketProtocol.Tests.csproj index 105fc2384b1a..22cf5cf87bd6 100644 --- a/src/System.Net.WebSockets.WebSocketProtocol/tests/System.Net.WebSockets.WebSocketProtocol.Tests.csproj +++ b/src/System.Net.WebSockets.WebSocketProtocol/tests/System.Net.WebSockets.WebSocketProtocol.Tests.csproj @@ -1,7 +1,7 @@ {CF73547B-07D2-4290-A14A-CA2A354F4D21} - netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release + netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release;uap-Debug;uap-Release diff --git a/src/System.Net.WebSockets/tests/Configurations.props b/src/System.Net.WebSockets/tests/Configurations.props index 2bc19ff4170e..acf56fa2750e 100644 --- a/src/System.Net.WebSockets/tests/Configurations.props +++ b/src/System.Net.WebSockets/tests/Configurations.props @@ -1,8 +1,8 @@  - netstandard; netcoreapp; + uap; \ No newline at end of file diff --git a/src/System.Net.WebSockets/tests/System.Net.WebSockets.Tests.csproj b/src/System.Net.WebSockets/tests/System.Net.WebSockets.Tests.csproj index b724dddb703c..a1b36fe25bdf 100644 --- a/src/System.Net.WebSockets/tests/System.Net.WebSockets.Tests.csproj +++ b/src/System.Net.WebSockets/tests/System.Net.WebSockets.Tests.csproj @@ -1,7 +1,7 @@ {0887C5AD-1BE1-4898-94CD-FE2104E04A4A} - netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release + netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release diff --git a/src/System.Net.WebSockets/tests/WebSocketExceptionTests.cs b/src/System.Net.WebSockets/tests/WebSocketExceptionTests.cs index bb4bd13a8a71..5d7b96c87932 100644 --- a/src/System.Net.WebSockets/tests/WebSocketExceptionTests.cs +++ b/src/System.Net.WebSockets/tests/WebSocketExceptionTests.cs @@ -179,12 +179,5 @@ public void ConstructorTests_Message_Exception_Success() Assert.Equal(Message, wse.Message); Assert.Same(inner, wse.InnerException); } - - [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsFullFramework))] - public void GetObjectData_Success() - { - var wse = new WebSocketException(); - wse.GetObjectData(new SerializationInfo(typeof(WebSocketException), new FormatterConverter()), new StreamingContext()); - } } } diff --git a/src/System.Net.WebSockets/tests/WebSocketTests.cs b/src/System.Net.WebSockets/tests/WebSocketTests.cs index 827982955032..919d894335b6 100644 --- a/src/System.Net.WebSockets/tests/WebSocketTests.cs +++ b/src/System.Net.WebSockets/tests/WebSocketTests.cs @@ -85,7 +85,6 @@ public static void CreateClientWebSocket_InvalidArguments_Throws() new MemoryStream(), "subProtocol", 16480, 9856, TimeSpan.FromSeconds(-2), false, WebSocket.CreateClientBuffer(16480, 9856))); } - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] [Fact] public static void RegisterPrefixes_Unsupported() { diff --git a/src/System.Numerics.Vectors/tests/Matrix4x4Tests.cs b/src/System.Numerics.Vectors/tests/Matrix4x4Tests.cs index 1787d2c86bce..3a46284a5007 100644 --- a/src/System.Numerics.Vectors/tests/Matrix4x4Tests.cs +++ b/src/System.Numerics.Vectors/tests/Matrix4x4Tests.cs @@ -2518,7 +2518,6 @@ public unsafe void Matrix4x4FieldOffsetTest() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public void PerspectiveFarPlaneAtInfinityTest() { var nearPlaneDistance = 0.125f; @@ -2528,7 +2527,6 @@ public void PerspectiveFarPlaneAtInfinityTest() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public void PerspectiveFieldOfViewFarPlaneAtInfinityTest() { var nearPlaneDistance = 0.125f; @@ -2538,7 +2536,6 @@ public void PerspectiveFieldOfViewFarPlaneAtInfinityTest() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public void PerspectiveOffCenterFarPlaneAtInfinityTest() { var nearPlaneDistance = 0.125f; diff --git a/src/System.Numerics.Vectors/tests/Vector2Tests.cs b/src/System.Numerics.Vectors/tests/Vector2Tests.cs index 987de8b3c2d9..fa979aa7a839 100644 --- a/src/System.Numerics.Vectors/tests/Vector2Tests.cs +++ b/src/System.Numerics.Vectors/tests/Vector2Tests.cs @@ -27,18 +27,8 @@ public void Vector2CopyToTest() Assert.Throws(() => v1.CopyTo(null, 0)); Assert.Throws(() => v1.CopyTo(a, -1)); - Assert.Throws(() => v1.CopyTo(a, a.Length)); - - if (!PlatformDetection.IsNetNative) - { - AssertExtensions.Throws(null, () => v1.CopyTo(a, 2)); - } - else - { - // The .NET Native code generation optimizer does aggressive optimizations to range checks - // which result in an ArgumentOutOfRangeException exception being thrown at runtime. - Assert.ThrowsAny(() => v1.CopyTo(a, 2)); - } + Assert.Throws(() => v1.CopyTo(a, a.Length)); + AssertExtensions.Throws(null, () => v1.CopyTo(a, 2)); v1.CopyTo(a, 1); v1.CopyTo(b); @@ -294,7 +284,6 @@ public void Vector2MaxTest() // A test for Clamp (Vector2f, Vector2f, Vector2f) [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public void Vector2ClampTest() { Vector2 a = new Vector2(0.5f, 0.3f); @@ -346,60 +335,6 @@ public void Vector2ClampTest() Assert.True(MathHelper.Equal(expected, actual), "Vector2f.Clamp did not return the expected value."); } - // A test for Clamp (Vector2f, Vector2f, Vector2f) for netfx only - [Fact] - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)] - public void Vector2ClampTestFX() - { - Vector2 a = new Vector2(0.5f, 0.3f); - Vector2 min = new Vector2(0.0f, 0.1f); - Vector2 max = new Vector2(1.0f, 1.1f); - - // Normal case. - // Case N1: specified value is in the range. - Vector2 expected = new Vector2(0.5f, 0.3f); - Vector2 actual = Vector2.Clamp(a, min, max); - Assert.True(MathHelper.Equal(expected, actual), "Vector2f.Clamp did not return the expected value."); - // Normal case. - // Case N2: specified value is bigger than max value. - a = new Vector2(2.0f, 3.0f); - expected = max; - actual = Vector2.Clamp(a, min, max); - Assert.True(MathHelper.Equal(expected, actual), "Vector2f.Clamp did not return the expected value."); - // Case N3: specified value is smaller than max value. - a = new Vector2(-1.0f, -2.0f); - expected = min; - actual = Vector2.Clamp(a, min, max); - Assert.True(MathHelper.Equal(expected, actual), "Vector2f.Clamp did not return the expected value."); - // Case N4: combination case. - a = new Vector2(-2.0f, 4.0f); - expected = new Vector2(min.X, max.Y); - actual = Vector2.Clamp(a, min, max); - Assert.True(MathHelper.Equal(expected, actual), "Vector2f.Clamp did not return the expected value."); - // User specified min value is bigger than max value. - max = new Vector2(0.0f, 0.1f); - min = new Vector2(1.0f, 1.1f); - - // Case W1: specified value is in the range. - a = new Vector2(0.5f, 0.3f); - expected = min; - actual = Vector2.Clamp(a, min, max); - Assert.True(MathHelper.Equal(expected, actual), "Vector2f.Clamp did not return the expected value."); - - // Normal case. - // Case W2: specified value is bigger than max and min value. - a = new Vector2(2.0f, 3.0f); - expected = min; - actual = Vector2.Clamp(a, min, max); - Assert.True(MathHelper.Equal(expected, actual), "Vector2f.Clamp did not return the expected value."); - - // Case W3: specified value is smaller than min and max value. - a = new Vector2(-1.0f, -2.0f); - expected = min; - actual = Vector2.Clamp(a, min, max); - Assert.True(MathHelper.Equal(expected, actual), "Vector2f.Clamp did not return the expected value."); - } - // A test for Lerp (Vector2f, Vector2f, float) [Fact] public void Vector2LerpTest() diff --git a/src/System.Numerics.Vectors/tests/Vector3Tests.cs b/src/System.Numerics.Vectors/tests/Vector3Tests.cs index 7064efe85f34..7e7eb8e6815a 100644 --- a/src/System.Numerics.Vectors/tests/Vector3Tests.cs +++ b/src/System.Numerics.Vectors/tests/Vector3Tests.cs @@ -467,7 +467,6 @@ public void Vector3TransformTest() // A test for Clamp (Vector3f, Vector3f, Vector3f) [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public void Vector3ClampTest() { Vector3 a = new Vector3(0.5f, 0.3f, 0.33f); @@ -523,64 +522,6 @@ public void Vector3ClampTest() Assert.True(MathHelper.Equal(expected, actual), "Vector3f.Clamp did not return the expected value."); } - // A test for Clamp (Vector3f, Vector3f, Vector3f) for netfx only - [Fact] - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)] - public void Vector3ClampTestFX() - { - Vector3 a = new Vector3(0.5f, 0.3f, 0.33f); - Vector3 min = new Vector3(0.0f, 0.1f, 0.13f); - Vector3 max = new Vector3(1.0f, 1.1f, 1.13f); - - // Normal case. - // Case N1: specified value is in the range. - Vector3 expected = new Vector3(0.5f, 0.3f, 0.33f); - Vector3 actual = Vector3.Clamp(a, min, max); - Assert.True(MathHelper.Equal(expected, actual), "Vector3f.Clamp did not return the expected value."); - - // Normal case. - // Case N2: specified value is bigger than max value. - a = new Vector3(2.0f, 3.0f, 4.0f); - expected = max; - actual = Vector3.Clamp(a, min, max); - Assert.True(MathHelper.Equal(expected, actual), "Vector3f.Clamp did not return the expected value."); - - // Case N3: specified value is smaller than max value. - a = new Vector3(-2.0f, -3.0f, -4.0f); - expected = min; - actual = Vector3.Clamp(a, min, max); - Assert.True(MathHelper.Equal(expected, actual), "Vector3f.Clamp did not return the expected value."); - - // Case N4: combination case. - a = new Vector3(-2.0f, 0.5f, 4.0f); - expected = new Vector3(min.X, a.Y, max.Z); - actual = Vector3.Clamp(a, min, max); - Assert.True(MathHelper.Equal(expected, actual), "Vector3f.Clamp did not return the expected value."); - - // User specified min value is bigger than max value. - max = new Vector3(0.0f, 0.1f, 0.13f); - min = new Vector3(1.0f, 1.1f, 1.13f); - - // Case W1: specified value is in the range. - a = new Vector3(0.5f, 0.3f, 0.33f); - expected = min; - actual = Vector3.Clamp(a, min, max); - Assert.True(MathHelper.Equal(expected, actual), "Vector3f.Clamp did not return the expected value."); - - // Normal case. - // Case W2: specified value is bigger than max and min value. - a = new Vector3(2.0f, 3.0f, 4.0f); - expected = min; - actual = Vector3.Clamp(a, min, max); - Assert.True(MathHelper.Equal(expected, actual), "Vector3f.Clamp did not return the expected value."); - - // Case W3: specified value is smaller than min and max value. - a = new Vector3(-2.0f, -3.0f, -4.0f); - expected = min; - actual = Vector3.Clamp(a, min, max); - Assert.True(MathHelper.Equal(expected, actual), "Vector3f.Clamp did not return the expected value."); - } - // A test for TransformNormal (Vector3f, Matrix4x4) [Fact] public void Vector3TransformNormalTest() diff --git a/src/System.Numerics.Vectors/tests/Vector4Tests.cs b/src/System.Numerics.Vectors/tests/Vector4Tests.cs index 5aa8088944bd..df690b495e54 100644 --- a/src/System.Numerics.Vectors/tests/Vector4Tests.cs +++ b/src/System.Numerics.Vectors/tests/Vector4Tests.cs @@ -269,7 +269,6 @@ public void Vector4MinMaxCodeCoverageTest() // A test for Clamp (Vector4f, Vector4f, Vector4f) [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public void Vector4ClampTest() { Vector4 a = new Vector4(0.5f, 0.3f, 0.33f, 0.44f); @@ -325,64 +324,6 @@ public void Vector4ClampTest() Assert.True(MathHelper.Equal(expected, actual), "Vector4f.Clamp did not return the expected value."); } - // A test for Clamp (Vector4f, Vector4f, Vector4f) for netfx only - [Fact] - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)] - public void Vector4ClampTestFX() - { - Vector4 a = new Vector4(0.5f, 0.3f, 0.33f, 0.44f); - Vector4 min = new Vector4(0.0f, 0.1f, 0.13f, 0.14f); - Vector4 max = new Vector4(1.0f, 1.1f, 1.13f, 1.14f); - - // Normal case. - // Case N1: specified value is in the range. - Vector4 expected = new Vector4(0.5f, 0.3f, 0.33f, 0.44f); - Vector4 actual = Vector4.Clamp(a, min, max); - Assert.True(MathHelper.Equal(expected, actual), "Vector4f.Clamp did not return the expected value."); - - // Normal case. - // Case N2: specified value is bigger than max value. - a = new Vector4(2.0f, 3.0f, 4.0f, 5.0f); - expected = max; - actual = Vector4.Clamp(a, min, max); - Assert.True(MathHelper.Equal(expected, actual), "Vector4f.Clamp did not return the expected value."); - - // Case N3: specified value is smaller than max value. - a = new Vector4(-2.0f, -3.0f, -4.0f, -5.0f); - expected = min; - actual = Vector4.Clamp(a, min, max); - Assert.True(MathHelper.Equal(expected, actual), "Vector4f.Clamp did not return the expected value."); - - // Case N4: combination case. - a = new Vector4(-2.0f, 0.5f, 4.0f, -5.0f); - expected = new Vector4(min.X, a.Y, max.Z, min.W); - actual = Vector4.Clamp(a, min, max); - Assert.True(MathHelper.Equal(expected, actual), "Vector4f.Clamp did not return the expected value."); - - // User specified min value is bigger than max value. - max = new Vector4(0.0f, 0.1f, 0.13f, 0.14f); - min = new Vector4(1.0f, 1.1f, 1.13f, 1.14f); - - // Case W1: specified value is in the range. - a = new Vector4(0.5f, 0.3f, 0.33f, 0.44f); - expected = min; - actual = Vector4.Clamp(a, min, max); - Assert.True(MathHelper.Equal(expected, actual), "Vector4f.Clamp did not return the expected value."); - - // Normal case. - // Case W2: specified value is bigger than max and min value. - a = new Vector4(2.0f, 3.0f, 4.0f, 5.0f); - expected = min; - actual = Vector4.Clamp(a, min, max); - Assert.True(MathHelper.Equal(expected, actual), "Vector4f.Clamp did not return the expected value."); - - // Case W3: specified value is smaller than min and max value. - a = new Vector4(-2.0f, -3.0f, -4.0f, -5.0f); - expected = min; - actual = Vector4.Clamp(a, min, max); - Assert.True(MathHelper.Equal(expected, actual), "Vector4f.Clamp did not return the expected value."); - } - // A test for Lerp (Vector4f, Vector4f, float) [Fact] public void Vector4LerpTest() diff --git a/src/System.ObjectModel/tests/Configurations.props b/src/System.ObjectModel/tests/Configurations.props index 63b0f12fe5de..acf56fa2750e 100644 --- a/src/System.ObjectModel/tests/Configurations.props +++ b/src/System.ObjectModel/tests/Configurations.props @@ -1,10 +1,8 @@  - netstandard; netcoreapp; uap; - uapaot; \ No newline at end of file diff --git a/src/System.ObjectModel/tests/ObservableCollection/ObservableCollection_ConstructorAndPropertyTests.cs b/src/System.ObjectModel/tests/ObservableCollection/ObservableCollection_ConstructorAndPropertyTests.cs index d01c244f6101..8dcf69f63a5b 100644 --- a/src/System.ObjectModel/tests/ObservableCollection/ObservableCollection_ConstructorAndPropertyTests.cs +++ b/src/System.ObjectModel/tests/ObservableCollection/ObservableCollection_ConstructorAndPropertyTests.cs @@ -119,9 +119,6 @@ public static void IsReadOnlyTest() } [Fact] - // skip the test on desktop as "new ObservableCollection()" returns 0 length collection - // skip the test on UapAot as the requires Reflection on internal framework types. - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework | TargetFrameworkMonikers.UapAot)] public static void DebuggerAttributeTests() { ObservableCollection col = new ObservableCollection(new[] {1, 2, 3, 4}); @@ -133,7 +130,6 @@ public static void DebuggerAttributeTests() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework | TargetFrameworkMonikers.UapAot, "Cannot do DebuggerAttribute testing on UapAot: requires internal Reflection on framework types.")] public static void DebuggerAttribute_NullCollection_ThrowsArgumentNullException() { TargetInvocationException ex = Assert.Throws(() => DebuggerAttributes.ValidateDebuggerTypeProxyProperties(typeof(ObservableCollection), null)); diff --git a/src/System.ObjectModel/tests/ObservableCollection/ObservableCollection_Serialization.cs b/src/System.ObjectModel/tests/ObservableCollection/ObservableCollection_Serialization.cs index f823536519f9..c9ae3e02aaf1 100644 --- a/src/System.ObjectModel/tests/ObservableCollection/ObservableCollection_Serialization.cs +++ b/src/System.ObjectModel/tests/ObservableCollection/ObservableCollection_Serialization.cs @@ -28,7 +28,6 @@ public void SerializeDeserialize_Roundtrips(ObservableCollection c) } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public void OnDeserialized_MonitorNotInitialized_ExpectSuccess() { var observableCollection = new ObservableCollection(); diff --git a/src/System.ObjectModel/tests/ReadOnlyDictionary/ReadOnlyDictionaryTests.cs b/src/System.ObjectModel/tests/ReadOnlyDictionary/ReadOnlyDictionaryTests.cs index 2ea3d901a136..71c01b6e8d95 100644 --- a/src/System.ObjectModel/tests/ReadOnlyDictionary/ReadOnlyDictionaryTests.cs +++ b/src/System.ObjectModel/tests/ReadOnlyDictionary/ReadOnlyDictionaryTests.cs @@ -211,7 +211,6 @@ public static void CannotModifyDictionaryTests_Negative() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Cannot do DebuggerAttribute testing on UapAot: requires internal Reflection on framework types.")] public static void DebuggerAttributeTests() { ReadOnlyDictionary dict = new ReadOnlyDictionary(new Dictionary{{1, 2}, {2, 4}, {3, 6}}); @@ -235,7 +234,6 @@ public static void DebuggerAttributeTests() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Cannot do DebuggerAttribute testing on UapAot: requires internal Reflection on framework types.")] public static void DebuggerAttribute_NullDictionary_ThrowsArgumentNullException() { TargetInvocationException ex = Assert.Throws(() => DebuggerAttributes.ValidateDebuggerTypeProxyProperties(typeof(ReadOnlyDictionary), null)); @@ -244,7 +242,6 @@ public static void DebuggerAttribute_NullDictionary_ThrowsArgumentNullException( } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Cannot do DebuggerAttribute testing on UapAot: requires internal Reflection on framework types.")] public static void DebuggerAttribute_NullDictionaryKeys_ThrowsArgumentNullException() { TargetInvocationException ex = Assert.Throws(() => DebuggerAttributes.ValidateDebuggerTypeProxyProperties(typeof(ReadOnlyDictionary.KeyCollection), new Type[] { typeof(int) }, null)); diff --git a/src/System.ObjectModel/tests/ReadOnlyObservableCollection/ReadOnlyObservableCollectionTests.cs b/src/System.ObjectModel/tests/ReadOnlyObservableCollection/ReadOnlyObservableCollectionTests.cs index cd32715f10db..5b8ac7bf5b82 100644 --- a/src/System.ObjectModel/tests/ReadOnlyObservableCollection/ReadOnlyObservableCollectionTests.cs +++ b/src/System.ObjectModel/tests/ReadOnlyObservableCollection/ReadOnlyObservableCollectionTests.cs @@ -198,9 +198,6 @@ public static void CannotModifyDictionaryTests_Negative() } [Fact] - // skip the test on desktop as "new ObservableCollection()" returns 0 length collection - // skip the test on UapAot as the requires Reflection on internal framework types. - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework | TargetFrameworkMonikers.UapAot)] public static void DebuggerAttribute_Tests() { ReadOnlyObservableCollection col = new ReadOnlyObservableCollection(new ObservableCollection(new[] {1, 2, 3, 4})); @@ -212,7 +209,6 @@ public static void DebuggerAttribute_Tests() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework | TargetFrameworkMonikers.UapAot, "Cannot do DebuggerAttribute testing on UapAot: requires internal Reflection on framework types.")] public static void DebuggerAttribute_NullCollection_ThrowsArgumentNullException() { TargetInvocationException ex = Assert.Throws(() => DebuggerAttributes.ValidateDebuggerTypeProxyProperties(typeof(ReadOnlyObservableCollection), null)); diff --git a/src/System.ObjectModel/tests/System.ObjectModel.Tests.csproj b/src/System.ObjectModel/tests/System.ObjectModel.Tests.csproj index 358949109576..931f85a0fe81 100644 --- a/src/System.ObjectModel/tests/System.ObjectModel.Tests.csproj +++ b/src/System.ObjectModel/tests/System.ObjectModel.Tests.csproj @@ -1,7 +1,7 @@ {43841228-2A2B-4215-B97F-33006995E486} - netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release;uap-Debug;uap-Release;uapaot-Debug;uapaot-Release + netcoreapp-Debug;netcoreapp-Releaseuap-Debug;uap-Release diff --git a/src/System.ObjectModel/tests/System/ComponentModel/TypeConverterAttributeTests.cs b/src/System.ObjectModel/tests/System/ComponentModel/TypeConverterAttributeTests.cs index a16f92e060c9..edafe5c92ae4 100644 --- a/src/System.ObjectModel/tests/System/ComponentModel/TypeConverterAttributeTests.cs +++ b/src/System.ObjectModel/tests/System/ComponentModel/TypeConverterAttributeTests.cs @@ -26,19 +26,11 @@ public void Ctor_String(string typeName) } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, ".NET Framework has a bug and throws NRE because it uses the typeName in a Debug.Assert")] public void Ctor_NullStringNetCore_ThrowsArgumentNullException() { AssertExtensions.Throws("typeName", () => new TypeConverterAttribute((string)null)); } - [Fact] - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework, ".NET Framework has a bug and throws NRE because it uses the typeName in a Debug.Assert")] - public void Ctor_NullStringNetFramework_ThrowsNullReferenceException() - { - Assert.Throws(() => new TypeConverterAttribute((string)null)); - } - [Theory] [InlineData(typeof(int))] public void Ctor_Type(Type type) @@ -48,19 +40,11 @@ public void Ctor_Type(Type type) } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, ".NET Framework has a bug and throws NRE")] public void Ctor_NullTypeNetCore_ThrowsArgumentNullException() { AssertExtensions.Throws("type", () => new TypeConverterAttribute((Type)null)); } - [Fact] - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework, ".NET Framework has a bug and throws NRE")] - public void Ctor_NullTypeNetFramework_ThrowsNullReferenceException() - { - Assert.Throws(() => new TypeConverterAttribute((Type)null)); - } - [Fact] public void Default_Get_ReturnsExpected() { diff --git a/src/System.Private.Uri/tests/ExtendedFunctionalTests/Configurations.props b/src/System.Private.Uri/tests/ExtendedFunctionalTests/Configurations.props index d6385a202011..63e96ebf2824 100644 --- a/src/System.Private.Uri/tests/ExtendedFunctionalTests/Configurations.props +++ b/src/System.Private.Uri/tests/ExtendedFunctionalTests/Configurations.props @@ -1,7 +1,8 @@  - netstandard; + netcoreapp; + uap diff --git a/src/System.Private.Uri/tests/ExtendedFunctionalTests/System.Private.Uri.ExtendedFunctional.Tests.csproj b/src/System.Private.Uri/tests/ExtendedFunctionalTests/System.Private.Uri.ExtendedFunctional.Tests.csproj index 1dd6f667bcc6..63b9aa3b8393 100644 --- a/src/System.Private.Uri/tests/ExtendedFunctionalTests/System.Private.Uri.ExtendedFunctional.Tests.csproj +++ b/src/System.Private.Uri/tests/ExtendedFunctionalTests/System.Private.Uri.ExtendedFunctional.Tests.csproj @@ -1,7 +1,7 @@ {0febe054-68ac-446f-b999-9068736d3cec} - netstandard-Debug;netstandard-Release + netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release diff --git a/src/System.Private.Uri/tests/FunctionalTests/Configurations.props b/src/System.Private.Uri/tests/FunctionalTests/Configurations.props index d6385a202011..63e96ebf2824 100644 --- a/src/System.Private.Uri/tests/FunctionalTests/Configurations.props +++ b/src/System.Private.Uri/tests/FunctionalTests/Configurations.props @@ -1,7 +1,8 @@  - netstandard; + netcoreapp; + uap diff --git a/src/System.Private.Uri/tests/FunctionalTests/IriEncodingDecodingTests.cs b/src/System.Private.Uri/tests/FunctionalTests/IriEncodingDecodingTests.cs index 288be2708cf0..a45e67b41ed9 100644 --- a/src/System.Private.Uri/tests/FunctionalTests/IriEncodingDecodingTests.cs +++ b/src/System.Private.Uri/tests/FunctionalTests/IriEncodingDecodingTests.cs @@ -27,7 +27,6 @@ public class IriEncodingDecodingTest }; [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Requires fix shipping in .NET 4.7.2")] public void AbsoluteUri_DangerousPathSymbols_RFC3986CompliantAbsoluteUri() { Uri uri; @@ -41,7 +40,6 @@ public void AbsoluteUri_DangerousPathSymbols_RFC3986CompliantAbsoluteUri() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Requires fix shipping in .NET 4.7.2")] public void AbsolutePath_DangerousPathSymbols_RFC3986CompliantAbsolutePath() { Uri uri; @@ -56,7 +54,6 @@ public void AbsolutePath_DangerousPathSymbols_RFC3986CompliantAbsolutePath() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Requires fix shipping in .NET 4.7.2")] public void Segments_DangerousPathSymbols_RFC3986CompliantPathSegments() { Uri uri; @@ -71,7 +68,6 @@ public void Segments_DangerousPathSymbols_RFC3986CompliantPathSegments() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Requires fix shipping in .NET 4.7.2")] public void Equality_DangerousPathSymbols_RFC3986CompliantEquality() { string baseUri = "http://a/%C3%88/"; @@ -84,7 +80,6 @@ public void Equality_DangerousPathSymbols_RFC3986CompliantEquality() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Requires fix shipping in .NET 4.7.2")] public void PathAndQuery_DangerousQuerySymbols_RFC3986CompliantPathAndQuery() { Uri uri; @@ -99,7 +94,6 @@ public void PathAndQuery_DangerousQuerySymbols_RFC3986CompliantPathAndQuery() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Requires fix shipping in .NET 4.7.2")] public void Query_DangerousQuerySymbols_RFC3986CompliantQuery() { Uri uri; @@ -113,7 +107,6 @@ public void Query_DangerousQuerySymbols_RFC3986CompliantQuery() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Requires fix shipping in .NET 4.7.2")] public void Equality_DangerousQuerySymbols_RFC3986CompliantEquality() { string baseUri = "http://a/%C3%88/"; @@ -126,7 +119,6 @@ public void Equality_DangerousQuerySymbols_RFC3986CompliantEquality() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Requires fix shipping in .NET 4.7.2")] public void Fragment_DangerousFragmentSymbols_RFC3986CompliantFragment() { Uri uri; @@ -140,7 +132,6 @@ public void Fragment_DangerousFragmentSymbols_RFC3986CompliantFragment() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Requires fix shipping in .NET 4.7.2")] public void UserInfo_DangerousUserInfoSymbols_RFC3986CompliantUserInfo() { Uri uri; diff --git a/src/System.Private.Uri/tests/FunctionalTests/IriTest.cs b/src/System.Private.Uri/tests/FunctionalTests/IriTest.cs index 5876419c27d9..d0b6196dcc93 100644 --- a/src/System.Private.Uri/tests/FunctionalTests/IriTest.cs +++ b/src/System.Private.Uri/tests/FunctionalTests/IriTest.cs @@ -85,7 +85,6 @@ public void Iri_ReservedCharacters_NotNormalized() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Requires fix shipping in .NET 4.7.2")] public void Iri_UnknownSchemeWithoutAuthority_DoesNormalize() { string[] paths = { "\u00E8", "%C3%A8" }; @@ -457,7 +456,6 @@ private string EscapeUnescapeTestComponent(string uriInput, UriComponents compon /// CheckIsReserved(). /// [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Requires fix shipping in .NET 4.7.2")] public void Iri_CheckIsReserved_EscapingBehavior() { for (int i = 0; i < s_checkIsReservedEscapingStrings.GetLength(0); i++) @@ -533,7 +531,6 @@ public void Iri_ValidateVeryLongInputString_EscapeUriString() [InlineData("\u00E8")] [InlineData("_\u00E8")] [InlineData("_")] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Requires fix shipping in .NET 4.7.2")] public void Iri_FileUriUncFallback_DoesSupportUnicodeHost(string authority) { Uri fileTwoSlashes = new Uri("file://" + authority); @@ -546,7 +543,6 @@ public void Iri_FileUriUncFallback_DoesSupportUnicodeHost(string authority) [Theory] [InlineData(@"c:/path/with/unicode/ö/test.xml")] [InlineData(@"file://c:/path/with/unicode/ö/test.xml")] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Requires fix shipping in .NET 4.7.2")] public void Iri_WindowsPathWithUnicode_DoesRemoveScheme(string uriString) { var uri = new Uri(uriString); @@ -558,7 +554,6 @@ public void Iri_WindowsPathWithUnicode_DoesRemoveScheme(string uriString) [InlineData("http:\u00E8")] [InlineData("%C3%A8")] [InlineData("\u00E8")] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Requires fix shipping in .NET 4.7.2")] public void Iri_RelativeUriCreation_ShouldNotNormalize(string uriString) { Uri href; @@ -581,7 +576,6 @@ public static IEnumerable AllForbiddenDecompositions() => [Theory] [MemberData(nameof(AllForbiddenDecompositions))] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Disable until the .NET FX CI machines get the latest patches.")] public void Iri_AllForbiddenDecompositions_IdnHostThrows(string scheme, string host) { Uri uri = new Uri(scheme + "://" + host); @@ -590,7 +584,6 @@ public void Iri_AllForbiddenDecompositions_IdnHostThrows(string scheme, string h [Theory] [MemberData(nameof(AllForbiddenDecompositions))] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Disable until the .NET FX CI machines get the latest patches.")] public void Iri_AllForbiddenDecompositions_NonIdnPropertiesOk(string scheme, string host) { Uri uri = new Uri(scheme + "://" + host); diff --git a/src/System.Private.Uri/tests/FunctionalTests/System.Private.Uri.Functional.Tests.csproj b/src/System.Private.Uri/tests/FunctionalTests/System.Private.Uri.Functional.Tests.csproj index 2387155a4f94..b1fdfa2ff5fe 100644 --- a/src/System.Private.Uri/tests/FunctionalTests/System.Private.Uri.Functional.Tests.csproj +++ b/src/System.Private.Uri/tests/FunctionalTests/System.Private.Uri.Functional.Tests.csproj @@ -1,7 +1,7 @@ {B0FFC4A8-BAC3-4A7F-8FD5-5B680209371C} - netstandard-Debug;netstandard-Release + netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release diff --git a/src/System.Private.Uri/tests/FunctionalTests/UriBuilderTests.cs b/src/System.Private.Uri/tests/FunctionalTests/UriBuilderTests.cs index 31835a660234..14e434932a83 100644 --- a/src/System.Private.Uri/tests/FunctionalTests/UriBuilderTests.cs +++ b/src/System.Private.Uri/tests/FunctionalTests/UriBuilderTests.cs @@ -14,7 +14,6 @@ public class UriBuilderTests //This test tests a case where the Core implementation of UriBuilder differs from Desktop Framework UriBuilder. //The Query property will not longer prepend a ? character if the string being assigned is already prepended. [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Difference in behavior")] public static void TestQuery() { var uriBuilder = new UriBuilder(@"http://foo/bar/baz?date=today"); @@ -293,7 +292,6 @@ public void Query_Get_Set(string value, string expected) [Theory] [InlineData("#fragment", "#fragment")] [InlineData("#", "#")] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "In NET Core if the value starts with # then no other # is prepended, in Desktop we always prepend #")] public void Fragment_Get_Set_StartsWithPound(string value, string expected) { var uriBuilder = new UriBuilder(); diff --git a/src/System.Private.Uri/tests/FunctionalTests/UriEscapingTest.cs b/src/System.Private.Uri/tests/FunctionalTests/UriEscapingTest.cs index af5fdad67785..53e524d817f1 100644 --- a/src/System.Private.Uri/tests/FunctionalTests/UriEscapingTest.cs +++ b/src/System.Private.Uri/tests/FunctionalTests/UriEscapingTest.cs @@ -321,7 +321,6 @@ public void UriAbsoluteEscaping_RFC2396Unreserved_NoEscaping() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Requires fix shipping in .NET 4.7.2")] public void UriAbsoluteUnEscaping_RFC3986UnreservedEscaped_AllUnescaped() { string escaped = Escape(RFC3986Unreserved); @@ -399,7 +398,6 @@ public void UriAbsoluteEscaping_FullIPv6Uri_NothingEscaped() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Requires fix shipping in .NET 4.7.2")] public void UriAbsoluteEscaping_SurrogatePair_LocaleIndependent() { string uriString = "http://contosotest.conto.soco.ntosoco.com/surrgtest()?$filter="; diff --git a/src/System.Private.Uri/tests/FunctionalTests/UriIsWellFormedUriStringTest.cs b/src/System.Private.Uri/tests/FunctionalTests/UriIsWellFormedUriStringTest.cs index 8238436e754a..0179e2ad7e2a 100644 --- a/src/System.Private.Uri/tests/FunctionalTests/UriIsWellFormedUriStringTest.cs +++ b/src/System.Private.Uri/tests/FunctionalTests/UriIsWellFormedUriStringTest.cs @@ -462,8 +462,6 @@ public void UriIsWellFormed_IPv6HostIriOn_True() [Theory] [MemberData(nameof(TestIsWellFormedUriStringData))] - // Bug hasn't been fixed yet on NetFramework - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public static void TestIsWellFormedUriString(string uriString, bool expected) { Assert.Equal(expected, Uri.IsWellFormedUriString(uriString, UriKind.RelativeOrAbsolute)); @@ -504,7 +502,6 @@ public static void TestIsWellFormedUriString(string uriString, bool expected) [Theory] [MemberData(nameof(UriIsWellFormedUnwiseStringData))] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public void UriIsWellFormed_AbsoluteUnicodeWithUnwise_Success(string uriString, bool expected) { Assert.Equal(expected, Uri.IsWellFormedUriString(uriString, UriKind.Absolute)); diff --git a/src/System.Private.Uri/tests/FunctionalTests/UriRelativeResolutionTest.cs b/src/System.Private.Uri/tests/FunctionalTests/UriRelativeResolutionTest.cs index 9e3b864f6e18..3573446b9042 100644 --- a/src/System.Private.Uri/tests/FunctionalTests/UriRelativeResolutionTest.cs +++ b/src/System.Private.Uri/tests/FunctionalTests/UriRelativeResolutionTest.cs @@ -230,7 +230,6 @@ public void Uri_Unicode_IriUnreserved_Character_Combinations_Scheme() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "See: dotnet/corefx #15145")] public void Uri_Unicode_SurrogatePairs_Scheme() { var combinations = CartesianProductAll(char.IsHighSurrogate, char.IsLowSurrogate, false); diff --git a/src/System.Private.Uri/tests/FunctionalTests/UriTests.cs b/src/System.Private.Uri/tests/FunctionalTests/UriTests.cs index 33ab71677664..69a0588dd101 100644 --- a/src/System.Private.Uri/tests/FunctionalTests/UriTests.cs +++ b/src/System.Private.Uri/tests/FunctionalTests/UriTests.cs @@ -877,7 +877,6 @@ public static void TestCasingWhenCombiningAbsoluteAndRelativeUris() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "This test depends on a fix that has not yet made it to .NET Framework.")] public static void Uri_ColonInLongRelativeUri_SchemeSuccessfullyParsed() { Uri absolutePart = new Uri("http://www.contoso.com"); @@ -914,7 +913,6 @@ public static void Uri_HostTrailingSpaces_SpacesTrimmed() [InlineData("0")] [InlineData("000")] [InlineData("65535")] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public static void Uri_PortTrailingSpaces_SpacesTrimmed(string portString) { Uri u = new Uri($"http://www.contoso.com:{portString} "); @@ -925,7 +923,6 @@ public static void Uri_PortTrailingSpaces_SpacesTrimmed(string portString) } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public static void Uri_EmptyPortTrailingSpaces_UsesDefaultPortSpacesTrimmed() { Uri u = new Uri($"http://www.contoso.com: "); diff --git a/src/System.Private.Xml.Linq/tests/SDMSample/Configurations.props b/src/System.Private.Xml.Linq/tests/SDMSample/Configurations.props new file mode 100644 index 000000000000..beb53a974e68 --- /dev/null +++ b/src/System.Private.Xml.Linq/tests/SDMSample/Configurations.props @@ -0,0 +1,7 @@ + + + + netcoreapp; + + + \ No newline at end of file diff --git a/src/System.Private.Xml.Linq/tests/SDMSample/SDMAttribute.cs b/src/System.Private.Xml.Linq/tests/SDMSample/SDMAttribute.cs index dcf404fbeefc..88e3159c185c 100644 --- a/src/System.Private.Xml.Linq/tests/SDMSample/SDMAttribute.cs +++ b/src/System.Private.Xml.Linq/tests/SDMSample/SDMAttribute.cs @@ -276,18 +276,6 @@ public void AttributeExplicitToFloat() /// Validates the explicit float conversion operator on XAttribute. /// [Fact] - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)] - public void AttributeExplicitToFloat_NetFramework() - { - XAttribute e3 = new XAttribute("x", "5e+500"); - Assert.Throws(() => (float)e3); - } - - /// - /// Validates the explicit float conversion operator on XAttribute. - /// - [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public void AttributeExplicitToFloat_NotNetFramework() { XAttribute e3 = new XAttribute("x", "5e+500"); @@ -318,18 +306,6 @@ public void AttributeExplicitToDouble() /// Validates the explicit double conversion operator on XAttribute. /// [Fact] - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)] - public void AttributeExplicitToDouble_NetFramework() - { - XAttribute e3 = new XAttribute("x", "5e+5000"); - Assert.Throws(() => (double)e3); - } - - /// - /// Validates the explicit double conversion operator on XAttribute. - /// - [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public void AttributeExplicitToDouble_NotNetFramework() { XAttribute e3 = new XAttribute("x", "5e+5000"); diff --git a/src/System.Private.Xml.Linq/tests/SDMSample/SDMElement.cs b/src/System.Private.Xml.Linq/tests/SDMSample/SDMElement.cs index 94bdbea81b9e..fdc8855f1ecc 100644 --- a/src/System.Private.Xml.Linq/tests/SDMSample/SDMElement.cs +++ b/src/System.Private.Xml.Linq/tests/SDMSample/SDMElement.cs @@ -405,18 +405,6 @@ public void ElementExplicitToFloat() /// Validates the explicit float conversion operator on XElement. /// [Fact] - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)] - public void ElementExplicitToFloat_NetFramework() - { - XElement e3 = new XElement("x", "5e+500"); - Assert.Throws(() => (float)e3); - } - - /// - /// Validates the explicit float conversion operator on XElement. - /// - [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public void ElementExplicitToFloat_NotNetFramework() { XElement e3 = new XElement("x", "5e+500"); @@ -447,18 +435,6 @@ public void ElementExplicitToDouble() /// Validates the explicit double conversion operator on XElement. /// [Fact] - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)] - public void ElementExplicitToDouble_NetFramework() - { - XElement e3 = new XElement("x", "5e+5000"); - Assert.Throws(() => (double)e3); - } - - /// - /// Validates the explicit double conversion operator on XElement. - /// - [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public void ElementExplicitToDouble_NotNetFramework() { XElement e3 = new XElement("x", "5e+5000"); diff --git a/src/System.Private.Xml.Linq/tests/SDMSample/System.Xml.Linq.SDMSample.Tests.csproj b/src/System.Private.Xml.Linq/tests/SDMSample/System.Xml.Linq.SDMSample.Tests.csproj index edba639d682e..45e015a9bec5 100644 --- a/src/System.Private.Xml.Linq/tests/SDMSample/System.Xml.Linq.SDMSample.Tests.csproj +++ b/src/System.Private.Xml.Linq/tests/SDMSample/System.Xml.Linq.SDMSample.Tests.csproj @@ -1,7 +1,7 @@ {F6C73170-9333-4B52-B3FA-A536C5EA6A48} - Debug;Release + netcoreapp-Debug;netcoreapp-Release diff --git a/src/System.Private.Xml.Linq/tests/events/Configurations.props b/src/System.Private.Xml.Linq/tests/events/Configurations.props index 581054d46db4..26abe8e9c67d 100644 --- a/src/System.Private.Xml.Linq/tests/events/Configurations.props +++ b/src/System.Private.Xml.Linq/tests/events/Configurations.props @@ -1,7 +1,8 @@  - netstandard; + netcoreapp; + uap \ No newline at end of file diff --git a/src/System.Private.Xml.Linq/tests/events/System.Xml.Linq.Events.Tests.csproj b/src/System.Private.Xml.Linq/tests/events/System.Xml.Linq.Events.Tests.csproj index b2235f70aa1f..b29d324f0bf1 100644 --- a/src/System.Private.Xml.Linq/tests/events/System.Xml.Linq.Events.Tests.csproj +++ b/src/System.Private.Xml.Linq/tests/events/System.Xml.Linq.Events.Tests.csproj @@ -1,7 +1,7 @@ {C560E194-5B14-4112-ABC6-3208491E53E6} - netstandard-Debug;netstandard-Release + netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release diff --git a/src/System.Private.Xml.Linq/tests/misc/Configurations.props b/src/System.Private.Xml.Linq/tests/misc/Configurations.props index 29dd700cc3ae..a167db2b1ec3 100644 --- a/src/System.Private.Xml.Linq/tests/misc/Configurations.props +++ b/src/System.Private.Xml.Linq/tests/misc/Configurations.props @@ -1,8 +1,8 @@ - netstandard; netcoreapp; + uap \ No newline at end of file diff --git a/src/System.Private.Xml.Linq/tests/misc/System.Xml.Linq.Misc.Tests.csproj b/src/System.Private.Xml.Linq/tests/misc/System.Xml.Linq.Misc.Tests.csproj index d72ba24c0fe7..24ba6cce03f3 100644 --- a/src/System.Private.Xml.Linq/tests/misc/System.Xml.Linq.Misc.Tests.csproj +++ b/src/System.Private.Xml.Linq/tests/misc/System.Xml.Linq.Misc.Tests.csproj @@ -1,7 +1,7 @@ {35FA1FA9-A504-4B9E-93F0-E5D03C21BECA} - netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release + netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release @@ -12,7 +12,7 @@ - + diff --git a/src/System.Private.Xml.Linq/tests/xNodeBuilder/CommonTests.cs b/src/System.Private.Xml.Linq/tests/xNodeBuilder/CommonTests.cs index e9285b011785..bb6699680160 100644 --- a/src/System.Private.Xml.Linq/tests/xNodeBuilder/CommonTests.cs +++ b/src/System.Private.Xml.Linq/tests/xNodeBuilder/CommonTests.cs @@ -3417,15 +3417,12 @@ public void WriteCDataWithTwoClosingBrackets_5() using (XmlReader reader = doc.CreateReader()) { Exception exception = AssertExtensions.Throws(null, () => MoveToFirstElement(reader).ReadOuterXml()); - if (!PlatformDetection.IsNetNative) // .NET Native toolchain optimizes away Exception messages - { - // \p{Pi} any kind of opening quote https://www.compart.com/en/unicode/category/Pi - // \p{Pf} any kind of closing quote https://www.compart.com/en/unicode/category/Pf - // \p{Po} any kind of punctuation character that is not a dash, bracket, quote or connector https://www.compart.com/en/unicode/category/Po - Assert.True(Regex.IsMatch(exception.Message, @"[\p{Pi}\p{Po}]" + Regex.Escape("]]>") + @"[\p{Pf}\p{Po}]")); - Assert.True(Regex.IsMatch(exception.Message, @"\b" + "XML" + @"\b")); - Assert.True(Regex.IsMatch(exception.Message, @"\b" + "CDATA" + @"\b")); - } + // \p{Pi} any kind of opening quote https://www.compart.com/en/unicode/category/Pi + // \p{Pf} any kind of closing quote https://www.compart.com/en/unicode/category/Pf + // \p{Po} any kind of punctuation character that is not a dash, bracket, quote or connector https://www.compart.com/en/unicode/category/Po + Assert.True(Regex.IsMatch(exception.Message, @"[\p{Pi}\p{Po}]" + Regex.Escape("]]>") + @"[\p{Pf}\p{Po}]")); + Assert.True(Regex.IsMatch(exception.Message, @"\b" + "XML" + @"\b")); + Assert.True(Regex.IsMatch(exception.Message, @"\b" + "CDATA" + @"\b")); } } @@ -3615,16 +3612,13 @@ public void WriteCommentWithDoubleHyphensInValue() using (XmlReader reader = doc.CreateReader()) { Exception exception = AssertExtensions.Throws(null, () => MoveToFirstElement(reader).ReadOuterXml()); - if (!PlatformDetection.IsNetNative) // .NET Native toolchain optimizes away Exception messages - { - // \b word boundary - // \p{Pi} any kind of opening quote https://www.compart.com/en/unicode/category/Pi - // \p{Pf} any kind of closing quote https://www.compart.com/en/unicode/category/Pf - // \p{Po} any kind of punctuation character that is not a dash, bracket, quote or connector https://www.compart.com/en/unicode/category/Po - Assert.True(Regex.IsMatch(exception.Message, @"\b" + "XML" + @"\b")); - Assert.True(Regex.IsMatch(exception.Message, @"[\p{Pi}\p{Po}]" + Regex.Escape("--") + @"[\p{Pf}\p{Po}]")); - Assert.True(Regex.IsMatch(exception.Message, @"[\p{Pi}\p{Po}]" + Regex.Escape("-") + @"[\p{Pf}\p{Po}]")); - } + // \b word boundary + // \p{Pi} any kind of opening quote https://www.compart.com/en/unicode/category/Pi + // \p{Pf} any kind of closing quote https://www.compart.com/en/unicode/category/Pf + // \p{Po} any kind of punctuation character that is not a dash, bracket, quote or connector https://www.compart.com/en/unicode/category/Po + Assert.True(Regex.IsMatch(exception.Message, @"\b" + "XML" + @"\b")); + Assert.True(Regex.IsMatch(exception.Message, @"[\p{Pi}\p{Po}]" + Regex.Escape("--") + @"[\p{Pf}\p{Po}]")); + Assert.True(Regex.IsMatch(exception.Message, @"[\p{Pi}\p{Po}]" + Regex.Escape("-") + @"[\p{Pf}\p{Po}]")); } } } @@ -4223,15 +4217,12 @@ public void IncludePIEndTagAsPartOfTextValue() using (XmlReader reader = doc.CreateReader()) { Exception exception = AssertExtensions.Throws(null, () => MoveToFirstElement(reader).ReadOuterXml()); - if (!PlatformDetection.IsNetNative) // .NET Native toolchain optimizes away Exception messages - { - // \b word boundary - // \p{Pi} any kind of opening quote https://www.compart.com/en/unicode/category/Pi - // \p{Pf} any kind of closing quote https://www.compart.com/en/unicode/category/Pf - // \p{Po} any kind of punctuation character that is not a dash, bracket, quote or connector https://www.compart.com/en/unicode/category/Po - Assert.True(Regex.IsMatch(exception.Message, @"[\p{Pi}\p{Po}]" + Regex.Escape("?>") + @"[\p{Pf}\p{Po}]")); - Assert.True(Regex.IsMatch(exception.Message, @"\b" + "XML" + @"\b")); - } + // \b word boundary + // \p{Pi} any kind of opening quote https://www.compart.com/en/unicode/category/Pi + // \p{Pf} any kind of closing quote https://www.compart.com/en/unicode/category/Pf + // \p{Po} any kind of punctuation character that is not a dash, bracket, quote or connector https://www.compart.com/en/unicode/category/Po + Assert.True(Regex.IsMatch(exception.Message, @"[\p{Pi}\p{Po}]" + Regex.Escape("?>") + @"[\p{Pf}\p{Po}]")); + Assert.True(Regex.IsMatch(exception.Message, @"\b" + "XML" + @"\b")); } } diff --git a/src/System.Private.Xml.Linq/tests/xNodeBuilder/Configurations.props b/src/System.Private.Xml.Linq/tests/xNodeBuilder/Configurations.props index 29dd700cc3ae..a167db2b1ec3 100644 --- a/src/System.Private.Xml.Linq/tests/xNodeBuilder/Configurations.props +++ b/src/System.Private.Xml.Linq/tests/xNodeBuilder/Configurations.props @@ -1,8 +1,8 @@ - netstandard; netcoreapp; + uap \ No newline at end of file diff --git a/src/System.Private.Xml.Linq/tests/xNodeBuilder/ErrorConditions.cs b/src/System.Private.Xml.Linq/tests/xNodeBuilder/ErrorConditions.cs index 6801bc1a1022..5f51aa7e8f3e 100644 --- a/src/System.Private.Xml.Linq/tests/xNodeBuilder/ErrorConditions.cs +++ b/src/System.Private.Xml.Linq/tests/xNodeBuilder/ErrorConditions.cs @@ -1184,9 +1184,6 @@ public void Variation42() private void CompareParamName(string actual, string expected, string message) { - if (PlatformDetection.IsNetNative) // ILC optimization sets ParamName always to null. - return; - TestLog.Compare(actual, expected, message); } } diff --git a/src/System.Private.Xml.Linq/tests/xNodeBuilder/System.Xml.Linq.xNodeBuilder.Tests.csproj b/src/System.Private.Xml.Linq/tests/xNodeBuilder/System.Xml.Linq.xNodeBuilder.Tests.csproj index bb677e8e6b61..57061566066a 100644 --- a/src/System.Private.Xml.Linq/tests/xNodeBuilder/System.Xml.Linq.xNodeBuilder.Tests.csproj +++ b/src/System.Private.Xml.Linq/tests/xNodeBuilder/System.Xml.Linq.xNodeBuilder.Tests.csproj @@ -1,7 +1,7 @@ {5D4FB9ED-C3AC-4EFA-9FEE-619ED4B4B92D} - netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release + netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release diff --git a/src/System.Private.Xml/tests/Misc/Configurations.props b/src/System.Private.Xml/tests/Misc/Configurations.props index 581054d46db4..26abe8e9c67d 100644 --- a/src/System.Private.Xml/tests/Misc/Configurations.props +++ b/src/System.Private.Xml/tests/Misc/Configurations.props @@ -1,7 +1,8 @@  - netstandard; + netcoreapp; + uap \ No newline at end of file diff --git a/src/System.Private.Xml/tests/Misc/RandomizedHashing.cs b/src/System.Private.Xml/tests/Misc/RandomizedHashing.cs index ba14df0b0d2b..f0b25720d1c9 100644 --- a/src/System.Private.Xml/tests/Misc/RandomizedHashing.cs +++ b/src/System.Private.Xml/tests/Misc/RandomizedHashing.cs @@ -47,7 +47,6 @@ public class XmlMiscTests }; [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public void StringsDontHashToAnyKnownNonRandomizedSets() { var setOfHashes = new Tuple(_strings[0].GetHashCode(), _strings[1].GetHashCode(), _strings[2].GetHashCode()); @@ -55,7 +54,6 @@ public void StringsDontHashToAnyKnownNonRandomizedSets() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public void StringsDoNotUseAlgorithmSimilarToCoreClrWhenRandomizedHashingIsDisabled() { // Even though GetHashCode gives different results on .NET 4.6 and CoreCLR with disabled @@ -76,7 +74,6 @@ public void StringsDoNotUseAlgorithmSimilarToCoreClrWhenRandomizedHashingIsDisab } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public void XmlQualifiedNameUsesStringGetHashCode() { Assert.Equal("foo".GetHashCode(), new XmlQualifiedName("foo").GetHashCode()); @@ -85,7 +82,6 @@ public void XmlQualifiedNameUsesStringGetHashCode() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public void SecureStringHasherUsesStringGetHashCode() { Assert.Equal("foo".GetHashCode(), new SecureStringHasher().GetHashCode("foo")); diff --git a/src/System.Private.Xml/tests/Misc/System.Xml.Misc.Tests.csproj b/src/System.Private.Xml/tests/Misc/System.Xml.Misc.Tests.csproj index 626f2d458a7b..a4ae59e96176 100644 --- a/src/System.Private.Xml/tests/Misc/System.Xml.Misc.Tests.csproj +++ b/src/System.Private.Xml/tests/Misc/System.Xml.Misc.Tests.csproj @@ -2,7 +2,7 @@ {A30BBA60-647C-4565-A42F-BE60B2CA2E8E} XmlMiscTests - netstandard-Debug;netstandard-Release + netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release diff --git a/src/System.Private.Xml/tests/Readers/CharCheckingReader/Configurations.props b/src/System.Private.Xml/tests/Readers/CharCheckingReader/Configurations.props index 581054d46db4..26abe8e9c67d 100644 --- a/src/System.Private.Xml/tests/Readers/CharCheckingReader/Configurations.props +++ b/src/System.Private.Xml/tests/Readers/CharCheckingReader/Configurations.props @@ -1,7 +1,8 @@  - netstandard; + netcoreapp; + uap \ No newline at end of file diff --git a/src/System.Private.Xml/tests/Readers/CharCheckingReader/System.Xml.RW.CharCheckingReader.Tests.csproj b/src/System.Private.Xml/tests/Readers/CharCheckingReader/System.Xml.RW.CharCheckingReader.Tests.csproj index 416269aaebee..72850cc11981 100644 --- a/src/System.Private.Xml/tests/Readers/CharCheckingReader/System.Xml.RW.CharCheckingReader.Tests.csproj +++ b/src/System.Private.Xml/tests/Readers/CharCheckingReader/System.Xml.RW.CharCheckingReader.Tests.csproj @@ -1,7 +1,7 @@ {6DC15D23-8213-4700-9815-AD8DEED1CE5F} - netstandard-Debug;netstandard-Release + netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release diff --git a/src/System.Private.Xml/tests/Readers/CustomReader/Configurations.props b/src/System.Private.Xml/tests/Readers/CustomReader/Configurations.props index 581054d46db4..26abe8e9c67d 100644 --- a/src/System.Private.Xml/tests/Readers/CustomReader/Configurations.props +++ b/src/System.Private.Xml/tests/Readers/CustomReader/Configurations.props @@ -1,7 +1,8 @@  - netstandard; + netcoreapp; + uap \ No newline at end of file diff --git a/src/System.Private.Xml/tests/Readers/CustomReader/System.Xml.RW.CustomReader.Tests.csproj b/src/System.Private.Xml/tests/Readers/CustomReader/System.Xml.RW.CustomReader.Tests.csproj index b2b9ddfb759f..2f5384718d69 100644 --- a/src/System.Private.Xml/tests/Readers/CustomReader/System.Xml.RW.CustomReader.Tests.csproj +++ b/src/System.Private.Xml/tests/Readers/CustomReader/System.Xml.RW.CustomReader.Tests.csproj @@ -1,7 +1,7 @@ {B51913C2-478E-46AA-A523-521BD4593651} - netstandard-Debug;netstandard-Release + netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release diff --git a/src/System.Private.Xml/tests/Readers/FactoryReader/Configurations.props b/src/System.Private.Xml/tests/Readers/FactoryReader/Configurations.props index 581054d46db4..26abe8e9c67d 100644 --- a/src/System.Private.Xml/tests/Readers/FactoryReader/Configurations.props +++ b/src/System.Private.Xml/tests/Readers/FactoryReader/Configurations.props @@ -1,7 +1,8 @@  - netstandard; + netcoreapp; + uap \ No newline at end of file diff --git a/src/System.Private.Xml/tests/Readers/FactoryReader/System.Xml.RW.FactoryReader.Tests.csproj b/src/System.Private.Xml/tests/Readers/FactoryReader/System.Xml.RW.FactoryReader.Tests.csproj index 0e10e8e99dc6..3d4da05a2737 100644 --- a/src/System.Private.Xml/tests/Readers/FactoryReader/System.Xml.RW.FactoryReader.Tests.csproj +++ b/src/System.Private.Xml/tests/Readers/FactoryReader/System.Xml.RW.FactoryReader.Tests.csproj @@ -1,7 +1,7 @@ {04C5492C-FA54-4F93-8698-44B8BB7C72E0} - netstandard-Debug;netstandard-Release + netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release diff --git a/src/System.Private.Xml/tests/Readers/NameTable/Configurations.props b/src/System.Private.Xml/tests/Readers/NameTable/Configurations.props index 581054d46db4..26abe8e9c67d 100644 --- a/src/System.Private.Xml/tests/Readers/NameTable/Configurations.props +++ b/src/System.Private.Xml/tests/Readers/NameTable/Configurations.props @@ -1,7 +1,8 @@  - netstandard; + netcoreapp; + uap \ No newline at end of file diff --git a/src/System.Private.Xml/tests/Readers/NameTable/System.Xml.RW.NameTable.Tests.csproj b/src/System.Private.Xml/tests/Readers/NameTable/System.Xml.RW.NameTable.Tests.csproj index 341da92473ea..5599f5036d56 100644 --- a/src/System.Private.Xml/tests/Readers/NameTable/System.Xml.RW.NameTable.Tests.csproj +++ b/src/System.Private.Xml/tests/Readers/NameTable/System.Xml.RW.NameTable.Tests.csproj @@ -1,7 +1,7 @@ {2CA30CA9-FADA-4AB6-81E3-EAE61EF44463} - netstandard-Debug;netstandard-Release + netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release diff --git a/src/System.Private.Xml/tests/Readers/ReaderSettings/Configurations.props b/src/System.Private.Xml/tests/Readers/ReaderSettings/Configurations.props index 581054d46db4..26abe8e9c67d 100644 --- a/src/System.Private.Xml/tests/Readers/ReaderSettings/Configurations.props +++ b/src/System.Private.Xml/tests/Readers/ReaderSettings/Configurations.props @@ -1,7 +1,8 @@  - netstandard; + netcoreapp; + uap \ No newline at end of file diff --git a/src/System.Private.Xml/tests/Readers/ReaderSettings/System.Xml.RW.ReaderSettings.Tests.csproj b/src/System.Private.Xml/tests/Readers/ReaderSettings/System.Xml.RW.ReaderSettings.Tests.csproj index 4dead1053ed4..6c004d98d5fb 100644 --- a/src/System.Private.Xml/tests/Readers/ReaderSettings/System.Xml.RW.ReaderSettings.Tests.csproj +++ b/src/System.Private.Xml/tests/Readers/ReaderSettings/System.Xml.RW.ReaderSettings.Tests.csproj @@ -1,7 +1,7 @@ {54B5F207-CC11-4AC3-B0D7-1E7A7E2F08DE} - netstandard-Debug;netstandard-Release + netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release diff --git a/src/System.Private.Xml/tests/Readers/SubtreeReader/Configurations.props b/src/System.Private.Xml/tests/Readers/SubtreeReader/Configurations.props index 581054d46db4..26abe8e9c67d 100644 --- a/src/System.Private.Xml/tests/Readers/SubtreeReader/Configurations.props +++ b/src/System.Private.Xml/tests/Readers/SubtreeReader/Configurations.props @@ -1,7 +1,8 @@  - netstandard; + netcoreapp; + uap \ No newline at end of file diff --git a/src/System.Private.Xml/tests/Readers/SubtreeReader/System.Xml.RW.SubtreeReader.Tests.csproj b/src/System.Private.Xml/tests/Readers/SubtreeReader/System.Xml.RW.SubtreeReader.Tests.csproj index 3cb404e7fc2a..1eebcd758c17 100644 --- a/src/System.Private.Xml/tests/Readers/SubtreeReader/System.Xml.RW.SubtreeReader.Tests.csproj +++ b/src/System.Private.Xml/tests/Readers/SubtreeReader/System.Xml.RW.SubtreeReader.Tests.csproj @@ -1,7 +1,7 @@ {6DC919A7-CF8F-4CCD-A7E3-1AD9389FEC86} - netstandard-Debug;netstandard-Release + netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release diff --git a/src/System.Private.Xml/tests/Readers/WrappedReader/Configurations.props b/src/System.Private.Xml/tests/Readers/WrappedReader/Configurations.props index 581054d46db4..26abe8e9c67d 100644 --- a/src/System.Private.Xml/tests/Readers/WrappedReader/Configurations.props +++ b/src/System.Private.Xml/tests/Readers/WrappedReader/Configurations.props @@ -1,7 +1,8 @@  - netstandard; + netcoreapp; + uap \ No newline at end of file diff --git a/src/System.Private.Xml/tests/Readers/WrappedReader/System.Xml.RW.WrappedReader.Tests.csproj b/src/System.Private.Xml/tests/Readers/WrappedReader/System.Xml.RW.WrappedReader.Tests.csproj index 8fa45b99d546..bed7bbea7d17 100644 --- a/src/System.Private.Xml/tests/Readers/WrappedReader/System.Xml.RW.WrappedReader.Tests.csproj +++ b/src/System.Private.Xml/tests/Readers/WrappedReader/System.Xml.RW.WrappedReader.Tests.csproj @@ -1,7 +1,7 @@ {1C8F67D6-1953-49D3-B716-F298883A79C6} - netstandard-Debug;netstandard-Release + netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release diff --git a/src/System.Private.Xml/tests/Writers/RwFactory/Configurations.props b/src/System.Private.Xml/tests/Writers/RwFactory/Configurations.props index 581054d46db4..26abe8e9c67d 100644 --- a/src/System.Private.Xml/tests/Writers/RwFactory/Configurations.props +++ b/src/System.Private.Xml/tests/Writers/RwFactory/Configurations.props @@ -1,7 +1,8 @@  - netstandard; + netcoreapp; + uap \ No newline at end of file diff --git a/src/System.Private.Xml/tests/Writers/RwFactory/System.Xml.RW.RwFactory.Tests.csproj b/src/System.Private.Xml/tests/Writers/RwFactory/System.Xml.RW.RwFactory.Tests.csproj index 0cc725636496..0788b4f8dd6b 100644 --- a/src/System.Private.Xml/tests/Writers/RwFactory/System.Xml.RW.RwFactory.Tests.csproj +++ b/src/System.Private.Xml/tests/Writers/RwFactory/System.Xml.RW.RwFactory.Tests.csproj @@ -1,7 +1,7 @@ {95C95878-A9CD-43D4-B1BB-D0DCAA54C3D7} - netstandard-Debug;netstandard-Release + netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release diff --git a/src/System.Private.Xml/tests/Writers/XmlWriterApi/Configurations.props b/src/System.Private.Xml/tests/Writers/XmlWriterApi/Configurations.props index 581054d46db4..26abe8e9c67d 100644 --- a/src/System.Private.Xml/tests/Writers/XmlWriterApi/Configurations.props +++ b/src/System.Private.Xml/tests/Writers/XmlWriterApi/Configurations.props @@ -1,7 +1,8 @@  - netstandard; + netcoreapp; + uap \ No newline at end of file diff --git a/src/System.Private.Xml/tests/Writers/XmlWriterApi/System.Xml.RW.XmlWriterApi.Tests.csproj b/src/System.Private.Xml/tests/Writers/XmlWriterApi/System.Xml.RW.XmlWriterApi.Tests.csproj index 1a69b32aaa51..a8b186e30ae9 100644 --- a/src/System.Private.Xml/tests/Writers/XmlWriterApi/System.Xml.RW.XmlWriterApi.Tests.csproj +++ b/src/System.Private.Xml/tests/Writers/XmlWriterApi/System.Xml.RW.XmlWriterApi.Tests.csproj @@ -1,7 +1,7 @@ {E6DAD59F-7CB7-4E70-B4C5-FCCBC3376EDE} - netstandard-Debug;netstandard-Release + netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release diff --git a/src/System.Private.Xml/tests/Writers/XmlWriterApi/TCFullEndElement.cs b/src/System.Private.Xml/tests/Writers/XmlWriterApi/TCFullEndElement.cs index 3cdfe991e57e..d7e5821530b1 100644 --- a/src/System.Private.Xml/tests/Writers/XmlWriterApi/TCFullEndElement.cs +++ b/src/System.Private.Xml/tests/Writers/XmlWriterApi/TCFullEndElement.cs @@ -4290,44 +4290,6 @@ public void writeValue_27(XmlWriterUtils utils, int param, string sourceStr, str Assert.True((isValid)); } - [Theory] - [XmlWriterInlineData(1, "Double", "float", false, null)] - [XmlWriterInlineData(1, "Double", "Single", false, null)] - [XmlWriterInlineData(2, "Double", "Double", false, null)] - - [XmlWriterInlineData(1, "UInt64", "float", true, 1.844674E+19F)] - [XmlWriterInlineData(1, "UInt32", "float", true, 4.294967E+09F)] - [XmlWriterInlineData(1, "Int32", "float", true, 2.147484E+09F)] - [XmlWriterInlineData(1, "Decimal", "float", true, 7.922816E+28F)] - - [XmlWriterInlineData(1, "UInt64", "Double", true, 1.84467440737096E+19D)] - [XmlWriterInlineData(1, "Int64", "Double", true, 9.22337203685478E+18D)] - [XmlWriterInlineData(1, "Decimal", "Double", true, 7.92281625142643E+28D)] - - [XmlWriterInlineData(1, "UInt64", "Single", true, 1.844674E+19F)] - [XmlWriterInlineData(1, "UInt32", "Single", true, 4.294967E+09F)] - [XmlWriterInlineData(1, "Int32", "Single", true, 2.147484E+09F)] - [XmlWriterInlineData(1, "Decimal", "Single", true, 7.922816E+28F)] - - [XmlWriterInlineData(2, "UInt64", "float", true, 1.844674E+19F)] - [XmlWriterInlineData(2, "UInt32", "float", true, 4.294967E+09F)] - [XmlWriterInlineData(2, "Int32", "float", true, 2.147484E+09F)] - [XmlWriterInlineData(2, "Decimal", "float", true, 7.922816E+28F)] - - [XmlWriterInlineData(2, "UInt64", "Double", true, 1.84467440737096E+19D)] - [XmlWriterInlineData(2, "Int64", "Double", true, 9.22337203685478E+18D)] - [XmlWriterInlineData(2, "Decimal", "Double", true, 7.92281625142643E+28D)] - - [XmlWriterInlineData(2, "UInt64", "Single", true, 1.844674E+19F)] - [XmlWriterInlineData(2, "UInt32", "Single", true, 4.294967E+09F)] - [XmlWriterInlineData(2, "Int32", "Single", true, 2.147484E+09F)] - [XmlWriterInlineData(2, "Decimal", "Single", true, 7.922816E+28F)] - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)] - public void writeValue_27_NetFramework(XmlWriterUtils utils, int param, string sourceStr, string destStr, bool isValid, object expVal) - { - writeValue_27(utils, param, sourceStr, destStr, isValid, expVal); - } - [Theory] [XmlWriterInlineData(1, "Double", "float", true, float.PositiveInfinity)] [XmlWriterInlineData(1, "Double", "Single", true, float.PositiveInfinity)] @@ -4359,7 +4321,6 @@ public void writeValue_27_NetFramework(XmlWriterUtils utils, int param, string s [XmlWriterInlineData(2, "UInt32", "Single", true, 4.2949673E+09F)] [XmlWriterInlineData(2, "Int32", "Single", true, 2.1474836E+09F)] [XmlWriterInlineData(2, "Decimal", "Single", true, 7.9228163E+28F)] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public void writeValue_27_NotNetFramework(XmlWriterUtils utils, int param, string sourceStr, string destStr, bool isValid, object expVal) { writeValue_27(utils, param, sourceStr, destStr, isValid, expVal); diff --git a/src/System.Private.Xml/tests/XPath/XPathDocument/Configurations.props b/src/System.Private.Xml/tests/XPath/XPathDocument/Configurations.props index 581054d46db4..f97cd5ea7a97 100644 --- a/src/System.Private.Xml/tests/XPath/XPathDocument/Configurations.props +++ b/src/System.Private.Xml/tests/XPath/XPathDocument/Configurations.props @@ -1,7 +1,8 @@  - netstandard; + netcoreapp; + uap; \ No newline at end of file diff --git a/src/System.Private.Xml/tests/XPath/XPathDocument/System.Xml.XPath.Tests.csproj b/src/System.Private.Xml/tests/XPath/XPathDocument/System.Xml.XPath.Tests.csproj index 29318802768a..bed3425df24e 100644 --- a/src/System.Private.Xml/tests/XPath/XPathDocument/System.Xml.XPath.Tests.csproj +++ b/src/System.Private.Xml/tests/XPath/XPathDocument/System.Xml.XPath.Tests.csproj @@ -4,7 +4,7 @@ {D0DF902A-2486-4A38-B7A7-232B9B6590E1} $(DefineConstants);FEATURE_XML_XPATH_ID System.Xml.XPath.Tests - netstandard-Debug;netstandard-Release + netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release $(CommonPath)\System\Xml\XPath diff --git a/src/System.Private.Xml/tests/XPath/XmlDocument/Configurations.props b/src/System.Private.Xml/tests/XPath/XmlDocument/Configurations.props index 581054d46db4..f97cd5ea7a97 100644 --- a/src/System.Private.Xml/tests/XPath/XmlDocument/Configurations.props +++ b/src/System.Private.Xml/tests/XPath/XmlDocument/Configurations.props @@ -1,7 +1,8 @@  - netstandard; + netcoreapp; + uap; \ No newline at end of file diff --git a/src/System.Private.Xml/tests/XPath/XmlDocument/System.Xml.XPath.XmlDocument.Tests.csproj b/src/System.Private.Xml/tests/XPath/XmlDocument/System.Xml.XPath.XmlDocument.Tests.csproj index f502110c986f..1ee5b72485f4 100644 --- a/src/System.Private.Xml/tests/XPath/XmlDocument/System.Xml.XPath.XmlDocument.Tests.csproj +++ b/src/System.Private.Xml/tests/XPath/XmlDocument/System.Xml.XPath.XmlDocument.Tests.csproj @@ -4,7 +4,7 @@ {7B57D5F1-4E6C-4280-AD5B-C71C73B66B11} $(DefineConstants);FEATURE_XML_XPATH_ID System.Xml.XPath.XmlDocument.Tests - netstandard-Debug;netstandard-Release + netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release $(CommonPath)\System\Xml\XPath diff --git a/src/System.Private.Xml/tests/XmlConvert/Configurations.props b/src/System.Private.Xml/tests/XmlConvert/Configurations.props index 581054d46db4..26abe8e9c67d 100644 --- a/src/System.Private.Xml/tests/XmlConvert/Configurations.props +++ b/src/System.Private.Xml/tests/XmlConvert/Configurations.props @@ -1,7 +1,8 @@  - netstandard; + netcoreapp; + uap \ No newline at end of file diff --git a/src/System.Private.Xml/tests/XmlConvert/System.Xml.RW.XmlConvert.Tests.csproj b/src/System.Private.Xml/tests/XmlConvert/System.Xml.RW.XmlConvert.Tests.csproj index d7a20950c700..54fc44ef996e 100644 --- a/src/System.Private.Xml/tests/XmlConvert/System.Xml.RW.XmlConvert.Tests.csproj +++ b/src/System.Private.Xml/tests/XmlConvert/System.Xml.RW.XmlConvert.Tests.csproj @@ -1,7 +1,7 @@ {3F18D20D-0267-4381-857B-EEDB7B3FC549} - netstandard-Debug;netstandard-Release + netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release diff --git a/src/System.Private.Xml/tests/XmlDocument/Configurations.props b/src/System.Private.Xml/tests/XmlDocument/Configurations.props index 581054d46db4..26abe8e9c67d 100644 --- a/src/System.Private.Xml/tests/XmlDocument/Configurations.props +++ b/src/System.Private.Xml/tests/XmlDocument/Configurations.props @@ -1,7 +1,8 @@  - netstandard; + netcoreapp; + uap \ No newline at end of file diff --git a/src/System.Private.Xml/tests/XmlDocument/System.Xml.XmlDocument.Tests.csproj b/src/System.Private.Xml/tests/XmlDocument/System.Xml.XmlDocument.Tests.csproj index 7e8405929ada..4db95e542d71 100644 --- a/src/System.Private.Xml/tests/XmlDocument/System.Xml.XmlDocument.Tests.csproj +++ b/src/System.Private.Xml/tests/XmlDocument/System.Xml.XmlDocument.Tests.csproj @@ -2,7 +2,7 @@ {7EAFC2D8-48D2-4A56-A9C6-6BADF2053499} - netstandard-Debug;netstandard-Release + netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release diff --git a/src/System.Private.Xml/tests/XmlDocument/XmlAttributeCollectionTests/InsertAfterTests.cs b/src/System.Private.Xml/tests/XmlDocument/XmlAttributeCollectionTests/InsertAfterTests.cs index 3ca84f6334e9..b635bcb73fa9 100644 --- a/src/System.Private.Xml/tests/XmlDocument/XmlAttributeCollectionTests/InsertAfterTests.cs +++ b/src/System.Private.Xml/tests/XmlDocument/XmlAttributeCollectionTests/InsertAfterTests.cs @@ -209,7 +209,6 @@ public void InsertAfterReturnsInsertedAttr() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] //Fix for this edge case was only made in NetCore public void InsertAfterRemovesDupRefAttrAtTheEnd() { const string attributeName = "existingAttr"; @@ -231,28 +230,6 @@ public void InsertAfterRemovesDupRefAttrAtTheEnd() } [Fact] - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)] //Fix for this edge case was only made in NetCore - public void InsertAfterThrowsArgumentOutOfRangeExceptionForDupRefAttrAtTheEnd_OldBehavior() - { - const string attributeName = "existingAttr"; - const string attributeUri = "some:existingUri"; - XmlDocument doc = CreateDocumentWithElement(); - XmlElement element = doc.DocumentElement; - XmlAttribute anotherAttr1 = element.Attributes.Append(doc.CreateAttribute("attr1", "some:uri1")); - XmlAttribute anotherAttr2 = element.Attributes.Append(doc.CreateAttribute("attr2", "some:uri2")); - XmlAttribute refAttr = element.Attributes.Append(doc.CreateAttribute(attributeName, attributeUri)); //dup - XmlAttribute newAttr = doc.CreateAttribute(attributeName, attributeUri); - - XmlAttributeCollection target = element.Attributes; - Assert.Throws (() => target.InsertAfter(newAttr, refAttr)); - - Assert.Equal(2, target.Count); - Assert.Same(anotherAttr1, target[0]); - Assert.Same(anotherAttr2, target[1]); - } - - [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] //Fix for this edge case was only made in NetCore public void InsertAfterReplacesDupRefAttr() { const string attributeName = "existingAttr"; @@ -275,30 +252,6 @@ public void InsertAfterReplacesDupRefAttr() Assert.Same(anotherAttr3, target[3]); } - [Fact] - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)] //Fix for this edge case was only made in NetCore - public void InsertAfterDoesNotReplaceDupRefAttr_OldBehavior() - { - const string attributeName = "existingAttr"; - const string attributeUri = "some:existingUri"; - XmlDocument doc = CreateDocumentWithElement(); - XmlElement element = doc.DocumentElement; - XmlAttribute anotherAttr1 = element.Attributes.Append(doc.CreateAttribute("attr1", "some:uri1")); - XmlAttribute anotherAttr2 = element.Attributes.Append(doc.CreateAttribute("attr2", "some:uri2")); - XmlAttribute refAttr = element.Attributes.Append(doc.CreateAttribute(attributeName, attributeUri)); //dup - XmlAttribute anotherAttr3 = element.Attributes.Append(doc.CreateAttribute("attr3", "some:uri3")); - XmlAttribute newAttr = doc.CreateAttribute(attributeName, attributeUri); - - XmlAttributeCollection target = element.Attributes; - target.InsertAfter(newAttr, refAttr); - - Assert.Equal(4, target.Count); - Assert.Same(anotherAttr1, target[0]); - Assert.Same(anotherAttr2, target[1]); - Assert.Same(anotherAttr3, target[2]); - Assert.Same(newAttr, target[3]); - } - [Fact] public void InsertAfterRemovesDupRefAttrAfterAttrAndTheRef() { diff --git a/src/System.Private.Xml/tests/XmlDocument/XmlAttributeCollectionTests/SetNamedItemTests.cs b/src/System.Private.Xml/tests/XmlDocument/XmlAttributeCollectionTests/SetNamedItemTests.cs index d13775ff13ea..7f10a228782a 100644 --- a/src/System.Private.Xml/tests/XmlDocument/XmlAttributeCollectionTests/SetNamedItemTests.cs +++ b/src/System.Private.Xml/tests/XmlDocument/XmlAttributeCollectionTests/SetNamedItemTests.cs @@ -16,7 +16,6 @@ private XmlDocument CreateDocumentWithElement() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Full Framework does not check for null argument in XmlAttributeCollection.SetNamedItem")] public void SetNamedItemWithNullReturnsNull() { XmlDocument doc = CreateDocumentWithElement(); diff --git a/src/System.Private.Xml/tests/XmlDocument/XmlNamedNodeMapTests/SetNamedItemTests.cs b/src/System.Private.Xml/tests/XmlDocument/XmlNamedNodeMapTests/SetNamedItemTests.cs index 53609df3ea81..2eefddf81aed 100644 --- a/src/System.Private.Xml/tests/XmlDocument/XmlNamedNodeMapTests/SetNamedItemTests.cs +++ b/src/System.Private.Xml/tests/XmlDocument/XmlNamedNodeMapTests/SetNamedItemTests.cs @@ -26,7 +26,6 @@ public static void NamedItemDoesNotExist() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Full Framework does not check for null argument in XmlAttributeCollection.SetNamedItem")] public static void NamedItemIsNull() { var xmlDocument = new XmlDocument(); diff --git a/src/System.Private.Xml/tests/XmlNodeReader/System.Xml.XmlNodeReader.Tests/Configurations.props b/src/System.Private.Xml/tests/XmlNodeReader/System.Xml.XmlNodeReader.Tests/Configurations.props index 581054d46db4..26abe8e9c67d 100644 --- a/src/System.Private.Xml/tests/XmlNodeReader/System.Xml.XmlNodeReader.Tests/Configurations.props +++ b/src/System.Private.Xml/tests/XmlNodeReader/System.Xml.XmlNodeReader.Tests/Configurations.props @@ -1,7 +1,8 @@  - netstandard; + netcoreapp; + uap \ No newline at end of file diff --git a/src/System.Private.Xml/tests/XmlNodeReader/System.Xml.XmlNodeReader.Tests/System.Xml.XmlNodeReader.Tests.csproj b/src/System.Private.Xml/tests/XmlNodeReader/System.Xml.XmlNodeReader.Tests/System.Xml.XmlNodeReader.Tests.csproj index 46217ffee7d7..5499ba11c796 100644 --- a/src/System.Private.Xml/tests/XmlNodeReader/System.Xml.XmlNodeReader.Tests/System.Xml.XmlNodeReader.Tests.csproj +++ b/src/System.Private.Xml/tests/XmlNodeReader/System.Xml.XmlNodeReader.Tests/System.Xml.XmlNodeReader.Tests.csproj @@ -2,7 +2,7 @@ {6C6F323D-054E-4723-9DEA-1C5E1E45DF88} - netstandard-Debug;netstandard-Release + netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release diff --git a/src/System.Private.Xml/tests/XmlReader/ReadContentAs/Configurations.props b/src/System.Private.Xml/tests/XmlReader/ReadContentAs/Configurations.props index 581054d46db4..26abe8e9c67d 100644 --- a/src/System.Private.Xml/tests/XmlReader/ReadContentAs/Configurations.props +++ b/src/System.Private.Xml/tests/XmlReader/ReadContentAs/Configurations.props @@ -1,7 +1,8 @@  - netstandard; + netcoreapp; + uap \ No newline at end of file diff --git a/src/System.Private.Xml/tests/XmlReader/ReadContentAs/System.Xml.RW.XmlReader.ReadContentAs.Tests.csproj b/src/System.Private.Xml/tests/XmlReader/ReadContentAs/System.Xml.RW.XmlReader.ReadContentAs.Tests.csproj index 5c5b4dde6d62..7c0b2c6eb93e 100644 --- a/src/System.Private.Xml/tests/XmlReader/ReadContentAs/System.Xml.RW.XmlReader.ReadContentAs.Tests.csproj +++ b/src/System.Private.Xml/tests/XmlReader/ReadContentAs/System.Xml.RW.XmlReader.ReadContentAs.Tests.csproj @@ -1,7 +1,7 @@ {DA6A9B7F-F311-49A4-8BBE-42EF3152C37B} - netstandard-Debug;netstandard-Release + netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release diff --git a/src/System.Private.Xml/tests/XmlReader/Tests/AsyncReaderLateInitTests.cs b/src/System.Private.Xml/tests/XmlReader/Tests/AsyncReaderLateInitTests.cs index 46fada4395c2..e8bce59a2311 100644 --- a/src/System.Private.Xml/tests/XmlReader/Tests/AsyncReaderLateInitTests.cs +++ b/src/System.Private.Xml/tests/XmlReader/Tests/AsyncReaderLateInitTests.cs @@ -78,7 +78,7 @@ public static void ReadAsyncAfterInitializationWithUriThrows() } } - [Fact, SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, ".NET Framework throws AggregateException")] + [Fact] public static void ReadAfterInitializationWithUriOnAsyncReaderTrows() { using (XmlReader reader = XmlReader.Create("http://test.test/test.html", new XmlReaderSettings() { Async = true })) diff --git a/src/System.Private.Xml/tests/XmlReader/Tests/Configurations.props b/src/System.Private.Xml/tests/XmlReader/Tests/Configurations.props index 581054d46db4..26abe8e9c67d 100644 --- a/src/System.Private.Xml/tests/XmlReader/Tests/Configurations.props +++ b/src/System.Private.Xml/tests/XmlReader/Tests/Configurations.props @@ -1,7 +1,8 @@  - netstandard; + netcoreapp; + uap \ No newline at end of file diff --git a/src/System.Private.Xml/tests/XmlReader/Tests/ReaderEncodingTests.cs b/src/System.Private.Xml/tests/XmlReader/Tests/ReaderEncodingTests.cs index 7b92f8964cbd..9ca44d841c71 100644 --- a/src/System.Private.Xml/tests/XmlReader/Tests/ReaderEncodingTests.cs +++ b/src/System.Private.Xml/tests/XmlReader/Tests/ReaderEncodingTests.cs @@ -18,7 +18,6 @@ public class ReaderEncodingTests private static string _invalidCharInThisEncoding = "Invalid character in the given encoding"; [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "The fix is not shipped to .Net Framework, so will fail")] public static void ReadWithSurrogateCharAndInvalidChar() { // {60, 0, 0, 0} is a normal char, {0, 34, 1, 0} is a surrogate char {62, 100, 60, 47} is an invalid char @@ -43,7 +42,6 @@ public static void ReadWithNormalCharAndInvalidChar() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "The fix is not shipped to .Net Framework, so will fail")] public static void ReadWithSurrogateCharAndInvalidChar_ValidXmlStructure() { var bytes = new byte[] { 60, 0, 0, 0, 97, 0, 0, 0, 62, 0, 0, 0, 0, 34, 1, 0, 62, 100, 60, 47, 60, 0, 0, 0, 47, 0, 0, 0, 97, 0, 0, 0, 62, 0, 0, 0 }; diff --git a/src/System.Private.Xml/tests/XmlReader/Tests/System.Xml.RW.XmlReader.Tests.csproj b/src/System.Private.Xml/tests/XmlReader/Tests/System.Xml.RW.XmlReader.Tests.csproj index 5ec16f0368d2..b7c3d19f2914 100644 --- a/src/System.Private.Xml/tests/XmlReader/Tests/System.Xml.RW.XmlReader.Tests.csproj +++ b/src/System.Private.Xml/tests/XmlReader/Tests/System.Xml.RW.XmlReader.Tests.csproj @@ -1,7 +1,7 @@  {507DB29F-74F5-4B34-A240-ABE7BD168DF6} - netstandard-Debug;netstandard-Release + netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release diff --git a/src/System.Private.Xml/tests/XmlReader/XmlResolver/Configurations.props b/src/System.Private.Xml/tests/XmlReader/XmlResolver/Configurations.props index 581054d46db4..f97cd5ea7a97 100644 --- a/src/System.Private.Xml/tests/XmlReader/XmlResolver/Configurations.props +++ b/src/System.Private.Xml/tests/XmlReader/XmlResolver/Configurations.props @@ -1,7 +1,8 @@  - netstandard; + netcoreapp; + uap; \ No newline at end of file diff --git a/src/System.Private.Xml/tests/XmlReader/XmlResolver/System.Xml.RW.XmlSystemPathResolver.Tests.csproj b/src/System.Private.Xml/tests/XmlReader/XmlResolver/System.Xml.RW.XmlSystemPathResolver.Tests.csproj index cbdc36311c4e..c3be4f239e6a 100644 --- a/src/System.Private.Xml/tests/XmlReader/XmlResolver/System.Xml.RW.XmlSystemPathResolver.Tests.csproj +++ b/src/System.Private.Xml/tests/XmlReader/XmlResolver/System.Xml.RW.XmlSystemPathResolver.Tests.csproj @@ -1,7 +1,7 @@ {E4BC1A16-AD0A-4F70-BD2E-3346A4D9BC2B} - netstandard-Debug;netstandard-Release + netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release diff --git a/src/System.Private.Xml/tests/XmlReaderLib/Configurations.props b/src/System.Private.Xml/tests/XmlReaderLib/Configurations.props index 581054d46db4..26abe8e9c67d 100644 --- a/src/System.Private.Xml/tests/XmlReaderLib/Configurations.props +++ b/src/System.Private.Xml/tests/XmlReaderLib/Configurations.props @@ -1,7 +1,8 @@  - netstandard; + netcoreapp; + uap \ No newline at end of file diff --git a/src/System.Private.Xml/tests/XmlResolver/System.Xml.XmlResolver.Tests/Configurations.props b/src/System.Private.Xml/tests/XmlResolver/System.Xml.XmlResolver.Tests/Configurations.props index 581054d46db4..26abe8e9c67d 100644 --- a/src/System.Private.Xml/tests/XmlResolver/System.Xml.XmlResolver.Tests/Configurations.props +++ b/src/System.Private.Xml/tests/XmlResolver/System.Xml.XmlResolver.Tests/Configurations.props @@ -1,7 +1,8 @@  - netstandard; + netcoreapp; + uap \ No newline at end of file diff --git a/src/System.Private.Xml/tests/XmlResolver/System.Xml.XmlResolver.Tests/System.Xml.XmlResolver.Tests.csproj b/src/System.Private.Xml/tests/XmlResolver/System.Xml.XmlResolver.Tests/System.Xml.XmlResolver.Tests.csproj index fca8da5f85ab..8fb10855dfcb 100644 --- a/src/System.Private.Xml/tests/XmlResolver/System.Xml.XmlResolver.Tests/System.Xml.XmlResolver.Tests.csproj +++ b/src/System.Private.Xml/tests/XmlResolver/System.Xml.XmlResolver.Tests/System.Xml.XmlResolver.Tests.csproj @@ -2,7 +2,7 @@ {F011A6F5-BA48-4F8D-A20F-79CCE01CDE0E} - netstandard-Debug;netstandard-Release + netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release diff --git a/src/System.Private.Xml/tests/XmlSchema/XmlSchemaSet/Configurations.props b/src/System.Private.Xml/tests/XmlSchema/XmlSchemaSet/Configurations.props index 581054d46db4..f97cd5ea7a97 100644 --- a/src/System.Private.Xml/tests/XmlSchema/XmlSchemaSet/Configurations.props +++ b/src/System.Private.Xml/tests/XmlSchema/XmlSchemaSet/Configurations.props @@ -1,7 +1,8 @@  - netstandard; + netcoreapp; + uap; \ No newline at end of file diff --git a/src/System.Private.Xml/tests/XmlSchema/XmlSchemaSet/System.Xml.XmlSchemaSet.Tests.csproj b/src/System.Private.Xml/tests/XmlSchema/XmlSchemaSet/System.Xml.XmlSchemaSet.Tests.csproj index df070cc0492b..fec1b16c7624 100644 --- a/src/System.Private.Xml/tests/XmlSchema/XmlSchemaSet/System.Xml.XmlSchemaSet.Tests.csproj +++ b/src/System.Private.Xml/tests/XmlSchema/XmlSchemaSet/System.Xml.XmlSchemaSet.Tests.csproj @@ -1,7 +1,7 @@ {9EDAADA8-B658-430F-97EE-CCA494883D86} - netstandard-Debug;netstandard-Release + netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release diff --git a/src/System.Private.Xml/tests/XmlSchema/XmlSchemaSet/TC_SchemaSet_Misc.cs b/src/System.Private.Xml/tests/XmlSchema/XmlSchemaSet/TC_SchemaSet_Misc.cs index dcf2b6f96636..dabbe97eadef 100644 --- a/src/System.Private.Xml/tests/XmlSchema/XmlSchemaSet/TC_SchemaSet_Misc.cs +++ b/src/System.Private.Xml/tests/XmlSchema/XmlSchemaSet/TC_SchemaSet_Misc.cs @@ -1259,10 +1259,7 @@ private void OnValidationEvent(object sender, ValidationEventArgs e) CError.Compare(exception.SourceObject != null, "SourceObject == null"); return; } - if (!PlatformDetection.IsNetNative) // Cannot get names of internal framework types - { - CError.Compare(exception.SourceObject.GetType().ToString(), "MS.Internal.Xml.Cache.XPathDocumentNavigator", "SourceObject.GetType"); - } + CError.Compare(exception.SourceObject.GetType().ToString(), "MS.Internal.Xml.Cache.XPathDocumentNavigator", "SourceObject.GetType"); _output.WriteLine("Exc: " + exception); } diff --git a/src/System.Private.Xml/tests/XmlSchema/XmlSchemaSet/TC_SchemaSet_XmlResolver.cs b/src/System.Private.Xml/tests/XmlSchema/XmlSchemaSet/TC_SchemaSet_XmlResolver.cs index 9e5af3bb14d7..b49f5e8c9524 100644 --- a/src/System.Private.Xml/tests/XmlSchema/XmlSchemaSet/TC_SchemaSet_XmlResolver.cs +++ b/src/System.Private.Xml/tests/XmlSchema/XmlSchemaSet/TC_SchemaSet_XmlResolver.cs @@ -122,7 +122,6 @@ public void v5() } //[Variation(Desc = "v6 - schema(Local)->schema(Local), but resolving external URI is not allowed", Priority = 1)] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Desktop Framework doesn't have the switch AllowDefaultResolver and false is not default behavior")] [Fact] public void v6() { diff --git a/src/System.Private.Xml/tests/XmlSchema/XmlSchemaValidatorApi/Configurations.props b/src/System.Private.Xml/tests/XmlSchema/XmlSchemaValidatorApi/Configurations.props index 581054d46db4..f97cd5ea7a97 100644 --- a/src/System.Private.Xml/tests/XmlSchema/XmlSchemaValidatorApi/Configurations.props +++ b/src/System.Private.Xml/tests/XmlSchema/XmlSchemaValidatorApi/Configurations.props @@ -1,7 +1,8 @@  - netstandard; + netcoreapp; + uap; \ No newline at end of file diff --git a/src/System.Private.Xml/tests/XmlSchema/XmlSchemaValidatorApi/ExceptionVerifier.cs b/src/System.Private.Xml/tests/XmlSchema/XmlSchemaValidatorApi/ExceptionVerifier.cs index a3fef20ee90c..86e4a1647ff5 100644 --- a/src/System.Private.Xml/tests/XmlSchema/XmlSchemaValidatorApi/ExceptionVerifier.cs +++ b/src/System.Private.Xml/tests/XmlSchema/XmlSchemaValidatorApi/ExceptionVerifier.cs @@ -261,20 +261,16 @@ private void CompareMessages() _expectedMessage = _expectedMessage.ToLowerInvariant(); _actualMessage = _actualMessage.ToLowerInvariant(); - - if (!PlatformDetection.IsNetNative) // .NET Native toolchain optimizes away Exception messages + if (Regex.Match(_actualMessage, _expectedMessage, RegexOptions.Singleline).ToString() != _actualMessage) { - if (Regex.Match(_actualMessage, _expectedMessage, RegexOptions.Singleline).ToString() != _actualMessage) - { - // Unescape before printing the expected message string - _expectedMessage = Regex.Unescape(_expectedMessage); - _output.WriteLine("Mismatch in error message"); - _output.WriteLine("===== Expected Message =====\n" + _expectedMessage); - _output.WriteLine("===== Expected Message Length =====\n" + _expectedMessage.Length); - _output.WriteLine("===== Actual Message =====\n" + _actualMessage); - _output.WriteLine("===== Actual Message Length =====\n" + _actualMessage.Length); - throw new VerifyException("Mismatch in error message"); - } + // Unescape before printing the expected message string + _expectedMessage = Regex.Unescape(_expectedMessage); + _output.WriteLine("Mismatch in error message"); + _output.WriteLine("===== Expected Message =====\n" + _expectedMessage); + _output.WriteLine("===== Expected Message Length =====\n" + _expectedMessage.Length); + _output.WriteLine("===== Actual Message =====\n" + _actualMessage); + _output.WriteLine("===== Actual Message Length =====\n" + _actualMessage.Length); + throw new VerifyException("Mismatch in error message"); } } diff --git a/src/System.Private.Xml/tests/XmlSchema/XmlSchemaValidatorApi/System.Xml.XmlSchema.XmlSchemaValidatorApi.Tests.csproj b/src/System.Private.Xml/tests/XmlSchema/XmlSchemaValidatorApi/System.Xml.XmlSchema.XmlSchemaValidatorApi.Tests.csproj index 447e14c4915e..b7a52e9117b9 100644 --- a/src/System.Private.Xml/tests/XmlSchema/XmlSchemaValidatorApi/System.Xml.XmlSchema.XmlSchemaValidatorApi.Tests.csproj +++ b/src/System.Private.Xml/tests/XmlSchema/XmlSchemaValidatorApi/System.Xml.XmlSchema.XmlSchemaValidatorApi.Tests.csproj @@ -1,7 +1,7 @@ {B0F53AAA-4ABC-44B2-9331-D3802340DD20} - netstandard-Debug;netstandard-Release + netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release diff --git a/src/System.Private.Xml/tests/XmlSchema/XmlSchemaValidatorApi/ValidateElement.cs b/src/System.Private.Xml/tests/XmlSchema/XmlSchemaValidatorApi/ValidateElement.cs index 9ec9f896c142..35b70914ef61 100644 --- a/src/System.Private.Xml/tests/XmlSchema/XmlSchemaValidatorApi/ValidateElement.cs +++ b/src/System.Private.Xml/tests/XmlSchema/XmlSchemaValidatorApi/ValidateElement.cs @@ -457,7 +457,6 @@ public void VerifyThatSubstitutionGroupMembersAreResolvedAndAddedToTheList() return; } - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "This checks a quirked behavior and Full Framework always gets old behavior as Xunit runner always targets 4.5.2 TFM ")] [Fact] public void StringPassedToValidateEndElementDoesNotSatisfyIdentityConstraints() { diff --git a/src/System.Private.Xml/tests/XmlSerializer/Configurations.props b/src/System.Private.Xml/tests/XmlSerializer/Configurations.props index 2260378844bc..f97cd5ea7a97 100644 --- a/src/System.Private.Xml/tests/XmlSerializer/Configurations.props +++ b/src/System.Private.Xml/tests/XmlSerializer/Configurations.props @@ -1,8 +1,8 @@  - netstandard; - uapaot; + netcoreapp; + uap; \ No newline at end of file diff --git a/src/System.Private.Xml/tests/XmlSerializer/ReflectionOnly/Configurations.props b/src/System.Private.Xml/tests/XmlSerializer/ReflectionOnly/Configurations.props index 6f4a060d826f..c19a54882c71 100644 --- a/src/System.Private.Xml/tests/XmlSerializer/ReflectionOnly/Configurations.props +++ b/src/System.Private.Xml/tests/XmlSerializer/ReflectionOnly/Configurations.props @@ -1,8 +1,8 @@ - netstandard; - uapaot; + netcoreapp; + uap; diff --git a/src/System.Private.Xml/tests/XmlSerializer/ReflectionOnly/System.Xml.XmlSerializer.ReflectionOnly.Tests.csproj b/src/System.Private.Xml/tests/XmlSerializer/ReflectionOnly/System.Xml.XmlSerializer.ReflectionOnly.Tests.csproj index a3122876c522..7e56496eb6af 100644 --- a/src/System.Private.Xml/tests/XmlSerializer/ReflectionOnly/System.Xml.XmlSerializer.ReflectionOnly.Tests.csproj +++ b/src/System.Private.Xml/tests/XmlSerializer/ReflectionOnly/System.Xml.XmlSerializer.ReflectionOnly.Tests.csproj @@ -2,7 +2,7 @@ $(DefineConstants);ReflectionOnly {4050F1D1-1DD2-4B48-A17B-E3F955518C4B} - netstandard-Debug;netstandard-Release;uapaot-Debug;uapaot-Release + netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release diff --git a/src/System.Private.Xml/tests/XmlSerializer/System.Xml.XmlSerializer.Tests.csproj b/src/System.Private.Xml/tests/XmlSerializer/System.Xml.XmlSerializer.Tests.csproj index ec799d4c909b..fcec6f51607b 100644 --- a/src/System.Private.Xml/tests/XmlSerializer/System.Xml.XmlSerializer.Tests.csproj +++ b/src/System.Private.Xml/tests/XmlSerializer/System.Xml.XmlSerializer.Tests.csproj @@ -1,7 +1,7 @@ {4050F1D1-1DD2-4B48-A17B-E3F90DD18C4B} - netstandard-Debug;netstandard-Release;uapaot-Debug;uapaot-Release + netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release diff --git a/src/System.Private.Xml/tests/XmlSerializer/XmlSerializerTests.Internal.cs b/src/System.Private.Xml/tests/XmlSerializer/XmlSerializerTests.Internal.cs index ccbe8f2493dc..406ee9740977 100644 --- a/src/System.Private.Xml/tests/XmlSerializer/XmlSerializerTests.Internal.cs +++ b/src/System.Private.Xml/tests/XmlSerializer/XmlSerializerTests.Internal.cs @@ -11,7 +11,6 @@ public static partial class XmlSerializerTests { [Fact] // XmlTypeMapping is not included in System.Xml.XmlSerializer 4.0.0.0 facade in GAC - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public static void Xml_FromMappings() { var types = new[] { typeof(Guid), typeof(List) }; @@ -28,7 +27,6 @@ public static void Xml_FromMappings() [Fact] // XmlTypeMapping is not included in System.Xml.XmlSerializer 4.0.0.0 facade in GAC - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public static void Xml_ConstructorWithTypeMapping() { XmlTypeMapping mapping = null; diff --git a/src/System.Private.Xml/tests/XmlSerializer/XmlSerializerTests.RuntimeOnly.cs b/src/System.Private.Xml/tests/XmlSerializer/XmlSerializerTests.RuntimeOnly.cs index e6e5f740ed51..5c289241461b 100644 --- a/src/System.Private.Xml/tests/XmlSerializer/XmlSerializerTests.RuntimeOnly.cs +++ b/src/System.Private.Xml/tests/XmlSerializer/XmlSerializerTests.RuntimeOnly.cs @@ -148,19 +148,6 @@ public static void Xml_FloatAsRoot() } [Fact] - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)] - public static void Xml_FloatAsRoot_NetFramework() - { - Assert.StrictEqual(SerializeAndDeserialize(float.MinValue, -@" --3.40282347E+38"), float.MinValue); - Assert.StrictEqual(SerializeAndDeserialize(float.MaxValue, -@" -3.40282347E+38"), float.MaxValue); - } - - [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public static void Xml_FloatAsRoot_NotNetFramework() { Assert.StrictEqual(SerializeAndDeserialize(float.MinValue, @@ -1364,7 +1351,6 @@ public static void XmlSchemaTest() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "dotnet/corefx #18964")] public static void SoapAttributeTests() { SoapAttributes soapAttrs = new SoapAttributes(); @@ -1375,7 +1361,6 @@ public static void SoapAttributeTests() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "dotnet/corefx #18964")] public static void Xml_Soap_ComplexField() { XmlTypeMapping typeMapping = new SoapReflectionImporter().ImportTypeMapping(typeof(SoapEncodedTestType2)); @@ -1391,7 +1376,6 @@ public static void Xml_Soap_ComplexField() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "dotnet/corefx #18964")] public static void Xml_Soap_Basic() { XmlTypeMapping myTypeMapping = new SoapReflectionImporter().ImportTypeMapping(typeof(SoapEncodedTestType1)); @@ -1417,7 +1401,6 @@ public static void Xml_Soap_Basic() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "dotnet/corefx #18964")] public static void Xml_Soap_TypeWithNullableFields() { XmlTypeMapping myTypeMapping = new SoapReflectionImporter().ImportTypeMapping(typeof(SoapEncodedTestType4)); @@ -1454,7 +1437,6 @@ public static void Xml_Soap_TypeWithNullableFields() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "dotnet/corefx #18964")] public static void Xml_Soap_Nullable() { XmlTypeMapping intMapping = new SoapReflectionImporter().ImportTypeMapping(typeof(int?)); @@ -1487,7 +1469,6 @@ public static void Xml_Soap_Nullable() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "dotnet/corefx #18964")] public static void Xml_Soap_Basic_FromMappings() { XmlTypeMapping myTypeMapping = new SoapReflectionImporter().ImportTypeMapping(typeof(SoapEncodedTestType1)); @@ -1513,7 +1494,6 @@ public static void Xml_Soap_Basic_FromMappings() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "dotnet/corefx #18964")] public static void Xml_Soap_With_SoapIgnore() { var soapAttributes = new SoapAttributes(); @@ -1545,7 +1525,6 @@ public static void Xml_Soap_With_SoapIgnore() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "dotnet/corefx #18964")] public static void Xml_Soap_With_SoapElement() { var soapAttributes = new SoapAttributes(); @@ -1578,7 +1557,6 @@ public static void Xml_Soap_With_SoapElement() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "dotnet/corefx #18964")] public static void Xml_Soap_With_SoapType() { var soapAttributes = new SoapAttributes(); @@ -1612,7 +1590,6 @@ public static void Xml_Soap_With_SoapType() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "dotnet/corefx #18964")] public static void Xml_Soap_Enum() { XmlTypeMapping myTypeMapping = new SoapReflectionImporter().ImportTypeMapping(typeof(SoapEncodedTestEnum)); @@ -1628,7 +1605,6 @@ public static void Xml_Soap_Enum() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "dotnet/corefx #18964")] public static void Xml_Soap_Enum_With_SoapEnumOverrides() { var soapAtts = new SoapAttributes(); @@ -1653,7 +1629,6 @@ public static void Xml_Soap_Enum_With_SoapEnumOverrides() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "dotnet/corefx #18964")] public static void SoapEncodedSerialization_SoapAttribute() { var soapAtts1 = new SoapAttributes(); @@ -1688,7 +1663,6 @@ public static void SoapEncodedSerialization_SoapAttribute() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "dotnet/corefx #18964")] public static void SoapEncodedSerialization_IncludeType() { var soapImporter = new SoapReflectionImporter(); @@ -1715,7 +1689,6 @@ public static void SoapEncodedSerialization_IncludeType() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "dotnet/corefx #18964")] public static void SoapEncodedSerialization_CircularLink() { XmlTypeMapping myTypeMapping = new SoapReflectionImporter().ImportTypeMapping(typeof(MyCircularLink)); @@ -1731,7 +1704,6 @@ public static void SoapEncodedSerialization_CircularLink() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "dotnet/corefx #18964")] public static void Xml_Soap_Array() { XmlTypeMapping myTypeMapping = new SoapReflectionImporter().ImportTypeMapping(typeof(MyGroup)); @@ -1754,7 +1726,6 @@ public static void Xml_Soap_Array() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "dotnet/corefx #18964")] public static void Xml_Soap_List() { XmlTypeMapping myTypeMapping = new SoapReflectionImporter().ImportTypeMapping(typeof(MyGroup2)); @@ -1778,7 +1749,6 @@ public static void Xml_Soap_List() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "dotnet/corefx #18964")] public static void Xml_Soap_MyCollection() { XmlTypeMapping myTypeMapping = new SoapReflectionImporter().ImportTypeMapping(typeof(MyCollection)); @@ -1813,7 +1783,6 @@ public static void Xml_Soap_MyCollection() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "dotnet/corefx #18964")] public static void Xml_Soap_WithNullables() { var mapping = new SoapReflectionImporter().ImportTypeMapping(typeof(WithNullables)); @@ -1833,7 +1802,6 @@ public static void Xml_Soap_WithNullables() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "dotnet/corefx #18964")] public static void Xml_Soap_Enums() { var mapping = new SoapReflectionImporter().ImportTypeMapping(typeof(WithEnums)); @@ -1848,14 +1816,12 @@ public static void Xml_Soap_Enums() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "dotnet/corefx #18964")] public static void Xml_Soap_Dictionary() { Assert.Throws(() => { new SoapReflectionImporter().ImportTypeMapping(typeof(MyGroup3)); }); } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "dotnet/corefx #18964")] public static void Xml_Soap_NestedPublicType() { XmlTypeMapping myTypeMapping = new SoapReflectionImporter().ImportTypeMapping(typeof(TypeWithNestedPublicType.LevelData)); @@ -1870,7 +1836,6 @@ public static void Xml_Soap_NestedPublicType() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "dotnet/corefx #18964")] public static void Xml_Soap_ObjectAsRoot() { XmlTypeMapping myTypeMapping = new SoapReflectionImporter().ImportTypeMapping(typeof(object)); @@ -1905,7 +1870,6 @@ public static void Xml_Soap_ObjectAsRoot() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "dotnet/corefx #18964")] public static void Xml_Soap_ObjectAsRoot_Nullable() { XmlTypeMapping nullableTypeMapping = new SoapReflectionImporter().ImportTypeMapping(typeof(TypeWithNullableObject)); @@ -1999,7 +1963,6 @@ public static void IXmlTextParserTest() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "dotnet/corefx #18964")] public static void SoapSchemaMemberTest() { string ns = "http://www.w3.org/2001/XMLSchema"; @@ -2476,7 +2439,6 @@ public static void XmlMembersMapping_Soap_PrimitiveValue() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "dotnet/corefx #18964")] public static void XmlMembersMapping_Soap_SimpleType() { string memberName = "GetData"; @@ -2489,7 +2451,6 @@ public static void XmlMembersMapping_Soap_SimpleType() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "dotnet/corefx #18964")] public static void XmlMembersMapping_Soap_CompositeType() { string memberName = "GetDataUsingDataContract"; @@ -2684,7 +2645,6 @@ public static void Xml_TypeWithReadOnlyMyCollectionProperty() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "dotnet/corefx #18964")] public static void Xml_Soap_TypeWithReadOnlyMyCollectionProperty() { XmlTypeMapping myTypeMapping = new SoapReflectionImporter().ImportTypeMapping(typeof(TypeWithReadOnlyMyCollectionProperty)); @@ -2699,7 +2659,6 @@ public static void Xml_Soap_TypeWithReadOnlyMyCollectionProperty() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "dotnet/corefx #18964")] public static void XmlMembersMapping_Soap_SoapComplexType() { string memberName = "EchoComositeTypeXmlSerializerFormatSoapResult"; @@ -2729,7 +2688,6 @@ public static void XmlMembersMapping_Soap_SoapComplexType() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "dotnet/corefx #18964")] public static void XmlMembersMapping_Soap_SoapComplexTypeWithArray() { string memberName = "EchoComositeTypeXmlSerializerFormatSoapResult"; @@ -2844,7 +2802,6 @@ public static void Xml_NookTypes() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "dotnet/corefx #21724")] public static void DerivedTypeWithDifferentOverrides() { DerivedTypeWithDifferentOverrides value = new DerivedTypeWithDifferentOverrides() { Name1 = "Name1", Name2 = "Name2", Name3 = "Name3", Name4 = "Name4", Name5 = "Name5" }; @@ -2857,7 +2814,6 @@ public static void DerivedTypeWithDifferentOverrides() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "dotnet/corefx #21724")] public static void DerivedTypeWithDifferentOverrides2() { DerivedTypeWithDifferentOverrides2 value = new DerivedTypeWithDifferentOverrides2() { Name1 = "Name1", Name2 = "Name2", Name3 = "Name3", Name4 = "Name4", Name5 = "Name5", Name6 = "Name6" }; @@ -2972,7 +2928,6 @@ public static void VerifyRestrictionElementForTimeSpanTest() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "dotnet/corefx #31427")] public static void SerializeXmlTextAttributeOnDerivedClass() { var value = new EnumTestDerived() { Test = TestEnum.On }; @@ -2981,7 +2936,6 @@ public static void SerializeXmlTextAttributeOnDerivedClass() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "dotnet/corefx #31427")] public static void SerializePrimitiveXmlTextAttributeOnDerivedClass() { var value = new PrimiveAttributeTestDerived() { Number = 5 }; diff --git a/src/System.Private.Xml/tests/XmlSerializer/XmlSerializerTests.cs b/src/System.Private.Xml/tests/XmlSerializer/XmlSerializerTests.cs index aa44cfa8ffee..dd6c9fc1f5b2 100644 --- a/src/System.Private.Xml/tests/XmlSerializer/XmlSerializerTests.cs +++ b/src/System.Private.Xml/tests/XmlSerializer/XmlSerializerTests.cs @@ -24,21 +24,18 @@ public static partial class XmlSerializerTests static XmlSerializerTests() { - if (!PlatformDetection.IsFullFramework) - { - MethodInfo method = typeof(XmlSerializer).GetMethod(SerializationModeSetterName, BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static); - Assert.True(method != null, $"No method named {SerializationModeSetterName}"); + MethodInfo method = typeof(XmlSerializer).GetMethod(SerializationModeSetterName, BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static); + Assert.True(method != null, $"No method named {SerializationModeSetterName}"); #if ReflectionOnly - method.Invoke(null, new object[] { 1 }); + method.Invoke(null, new object[] { 1 }); #endif #if XMLSERIALIZERGENERATORTESTS - method.Invoke(null, new object[] { 3 }); + method.Invoke(null, new object[] { 3 }); #endif - } } #endif - private static bool IsTimeSpanSerializationAvailable => !PlatformDetection.IsFullFramework || (AppContext.TryGetSwitch("Switch.System.Xml.EnableTimeSpanSerialization", out bool result) && result); + private static bool IsTimeSpanSerializationAvailable => true; [Fact] public static void Xml_TypeWithDateTimePropertyAsXmlTime() @@ -939,7 +936,6 @@ public static void Xml_TypeWithEnumFlagPropertyHavingDefaultValue() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "dotnet/corefx #18964")] public static void Xml_Soap_TypeWithEnumFlagPropertyHavingDefaultValue() { var mapping = new SoapReflectionImporter().ImportTypeMapping(typeof(TypeWithEnumFlagPropertyHavingDefaultValue)); @@ -980,7 +976,6 @@ public static void Xml_TypeWithXmlQualifiedName() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "dotnet/corefx #18964")] public static void Xml_Soap_TypeWithXmlQualifiedName() { var mapping = new SoapReflectionImporter().ImportTypeMapping(typeof(TypeWithXmlQualifiedName)); @@ -1618,7 +1613,6 @@ public static void Xml_TypeWithMyCollectionField() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "dotnet/corefx #18964")] public static void Xml_Soap_TypeWithMyCollectionField() { XmlTypeMapping myTypeMapping = new SoapReflectionImporter().ImportTypeMapping(typeof(TypeWithMyCollectionField)); diff --git a/src/System.Private.Xml/tests/XmlWriter/Configurations.props b/src/System.Private.Xml/tests/XmlWriter/Configurations.props index 581054d46db4..f97cd5ea7a97 100644 --- a/src/System.Private.Xml/tests/XmlWriter/Configurations.props +++ b/src/System.Private.Xml/tests/XmlWriter/Configurations.props @@ -1,7 +1,8 @@  - netstandard; + netcoreapp; + uap; \ No newline at end of file diff --git a/src/System.Private.Xml/tests/XmlWriter/System.Xml.RW.XmlWriter.Tests.csproj b/src/System.Private.Xml/tests/XmlWriter/System.Xml.RW.XmlWriter.Tests.csproj index b24a3f513c96..1f08308f9c5f 100644 --- a/src/System.Private.Xml/tests/XmlWriter/System.Xml.RW.XmlWriter.Tests.csproj +++ b/src/System.Private.Xml/tests/XmlWriter/System.Xml.RW.XmlWriter.Tests.csproj @@ -1,7 +1,7 @@ {8CDE71C2-4DA4-4AF6-9897-CD953AE653C2} - netstandard-Debug;netstandard-Release + netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release diff --git a/src/System.Private.Xml/tests/XmlWriter/WriteWithInvalidSurrogate.cs b/src/System.Private.Xml/tests/XmlWriter/WriteWithInvalidSurrogate.cs index 97eb11ddd213..ddd7ade52e77 100644 --- a/src/System.Private.Xml/tests/XmlWriter/WriteWithInvalidSurrogate.cs +++ b/src/System.Private.Xml/tests/XmlWriter/WriteWithInvalidSurrogate.cs @@ -37,7 +37,6 @@ public static void XmlWriterChecksLowerBoundOfLowerSurrogate() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] // Switch to throw exception was introduced in NetStandard1.7 public static void XmlWriterChecksUpperBoundOfLowerSurrogate_newBehavior() { // Turn the switch off to get the new behavior in case the platform has it on by default diff --git a/src/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/Configurations.props b/src/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/Configurations.props index d8630445849f..89d6ac0f025b 100644 --- a/src/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/Configurations.props +++ b/src/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/Configurations.props @@ -1,7 +1,6 @@  - netfx; netcoreapp; diff --git a/src/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/System.Xml.Xsl.XslCompiledTransformApi.Tests.csproj b/src/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/System.Xml.Xsl.XslCompiledTransformApi.Tests.csproj index a6ec18ef334e..b1e1684af340 100644 --- a/src/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/System.Xml.Xsl.XslCompiledTransformApi.Tests.csproj +++ b/src/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/System.Xml.Xsl.XslCompiledTransformApi.Tests.csproj @@ -1,11 +1,8 @@ {B01E2AE1-1B52-4518-B32E-016070356A7F} - netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release + netcoreapp-Debug;netcoreapp-Release - - - @@ -17,6 +14,7 @@ + TestFiles\%(RecursiveDir)%(Filename)%(Extension) TestFiles\%(RecursiveDir) diff --git a/src/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/XsltArgumentList.cs b/src/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/XsltArgumentList.cs index 5b25d70be37c..4adcfc5efe17 100644 --- a/src/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/XsltArgumentList.cs +++ b/src/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/XsltArgumentList.cs @@ -4645,7 +4645,6 @@ public XPathNodeIteratorTests(ITestOutputHelper output) : base(output) _output = output; } - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Full framework does support Compiling JScript/CSharp scripts")] //[Variation(id = 1, Desc = "Call Current without MoveNext")] [InlineData()] [Theory] @@ -4666,31 +4665,6 @@ public void NodeIter1() Assert.Equal("Compiling JScript/CSharp scripts is not supported", e.InnerException.Message); } - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework, "Only full framework supports Compiling JScript/CSharp scripts")] - //[Variation(id = 1, Desc = "Call Current without MoveNext")] - [Fact] - public void NodeIter1_FullFramework() - { - XslCompiledTransform xslt = new XslCompiledTransform(); - - XsltArgumentList xslArg = new XsltArgumentList(); - XmlUrlResolver ur = new XmlUrlResolver(); - Uri uriSource = ur.ResolveUri(null, FullFilePath("sample.xsd")); - xslArg.AddParam("sourceUri", string.Empty, uriSource.ToString()); - - xslt.Load(FullFilePath("xsd2cs1.xsl"), new XsltSettings(true, true), new XmlUrlResolver()); - - Assert.Throws(() => - { - XPathDocument doc = new XPathDocument(FullFilePath("sample.xsd")); - using (StringWriter sw = new StringWriter()) - { - xslt.Transform(doc, xslArg, sw); - } - }); - } - - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Full framework does support Compiling JScript/CSharp scripts")] //[Variation(id = 2, Desc = "Call Current after MoveNext")] [InlineData()] [Theory] @@ -4710,26 +4684,5 @@ public void NodeIter2() Assert.Equal("Compiling JScript/CSharp scripts is not supported", e.InnerException.Message); } - - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework, "Only full framework supports Compiling JScript/CSharp scripts")] - //[Variation(id = 2, Desc = "Call Current after MoveNext")] - [Fact] - public void NodeIter2_FullFramework() - { - XslCompiledTransform xslt = new XslCompiledTransform(); - - XsltArgumentList xslArg = new XsltArgumentList(); - XmlUrlResolver ur = new XmlUrlResolver(); - Uri uriSource = ur.ResolveUri(null, FullFilePath("sample.xsd")); - xslArg.AddParam("sourceUri", string.Empty, uriSource.ToString()); - - xslt.Load(FullFilePath("xsd2cs2.xsl"), new XsltSettings(true, true), new XmlUrlResolver()); - - XPathDocument doc = new XPathDocument(FullFilePath("sample.xsd")); - using (StringWriter sw = new StringWriter()) - { - xslt.Transform(doc, xslArg, sw); - } - } } } diff --git a/src/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/XsltSettings.cs b/src/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/XsltSettings.cs index 7bfb96f3cc75..e123a5c95de8 100644 --- a/src/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/XsltSettings.cs +++ b/src/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/XsltSettings.cs @@ -48,7 +48,6 @@ private void VerifyResult(object actual, object expected, string message) Assert.Equal(actual, expected); } - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Full framework does support Compiling JScript/CSharp scripts")] //[Variation(id = 1, Desc = "Test the script block with EnableScript, should work", Pri = 0, Params = new object[] { "XsltSettings.xml", "XsltSettings1.xsl", false, true })] [InlineData(1, "XsltSettings.xml", "XsltSettings1.xsl", false, true)] //[Variation(id = 4, Desc = "Test the script block with TrustedXslt, should work", Pri = 1, Params = new object[] { "XsltSettings.xml", "XsltSettings1.xsl", true, true })] @@ -64,22 +63,6 @@ public void XsltSettings1_1_ContainsScript(object param0, object param1, object Assert.Equal("Compiling JScript/CSharp scripts is not supported", e.InnerException.Message); } - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework, "Only full framework supports Compiling JScript/CSharp scripts")] - //[Variation(id = 1, Desc = "Test the script block with EnableScript, should work", Pri = 0, Params = new object[] { "XsltSettings.xml", "XsltSettings1.xsl", false, true })] - [InlineData(1, "XsltSettings.xml", "XsltSettings1.xsl", false, true)] - //[Variation(id = 4, Desc = "Test the script block with TrustedXslt, should work", Pri = 1, Params = new object[] { "XsltSettings.xml", "XsltSettings1.xsl", true, true })] - [InlineData(4, "XsltSettings.xml", "XsltSettings1.xsl", true, true)] - //[Variation(id = 9, Desc = "Test the combination of script and document function with TrustedXslt, should work", Pri = 0, Params = new object[] { "XsltSettings.xml", "XsltSettings3.xsl", true, true })] - [InlineData(9, "XsltSettings.xml", "XsltSettings3.xsl", true, true)] - //[Variation(id = 11, Desc = "Test the combination of script and document function with EnableScript, only script should work", Pri = 2, Params = new object[] { "XsltSettings.xml", "XsltSettings3.xsl", false, true })] - [InlineData(11, "XsltSettings.xml", "XsltSettings3.xsl", false, true)] - [Theory] - public void XsltSettings1_1_ContainsScript_FullFramework(object param0, object param1, object param2, object param3, object param4) - { - XsltSettings1_1(param0, param1, param2, param3, param4); - } - - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Full framework does support Compiling JScript/CSharp scripts")] //[Variation(id = 15, Desc = "Test 1 with Default settings, should fail", Pri = 1, Params = new object[] { "XsltSettings.xml", "XsltSettings1.xsl", false, true, false, false })] [InlineData(15, "XsltSettings.xml", "XsltSettings1.xsl", false, true, false, false)] //[Variation(id = 16, Desc = "Test 2 with EnableScript override, should work", Pri = 1, Params = new object[] { "XsltSettings.xml", "XsltSettings1.xsl", false, false, false, true })] @@ -95,21 +78,6 @@ public void XsltSettings1_2_ContainsScript(object param0, object param1, object Assert.Equal("Compiling JScript/CSharp scripts is not supported", e.InnerException.Message); } - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework, "Only full framework supports Compiling JScript/CSharp scripts")] - //[Variation(id = 15, Desc = "Test 1 with Default settings, should fail", Pri = 1, Params = new object[] { "XsltSettings.xml", "XsltSettings1.xsl", false, true, false, false })] - [InlineData(15, "XsltSettings.xml", "XsltSettings1.xsl", false, true, false, false)] - //[Variation(id = 16, Desc = "Test 2 with EnableScript override, should work", Pri = 1, Params = new object[] { "XsltSettings.xml", "XsltSettings1.xsl", false, false, false, true })] - [InlineData(16, "XsltSettings.xml", "XsltSettings1.xsl", false, false, false, true)] - //[Variation(id = 19, Desc = "Test 9 with Default settings override, should fail", Pri = 1, Params = new object[] { "XsltSettings.xml", "XsltSettings3.xsl", true, true, false, false })] - [InlineData(19, "XsltSettings.xml", "XsltSettings3.xsl", true, true, false, false)] - //[Variation(id = 20, Desc = "Test 10 with TrustedXslt override, should work", Pri = 1, Params = new object[] { "XsltSettings.xml", "XsltSettings3.xsl", false, false, true, true })] - [InlineData(20, "XsltSettings.xml", "XsltSettings3.xsl", false, false, true, true)] - [Theory] - public void XsltSettings1_2_ContainsScript_FullFramework(object param0, object param1, object param2, object param3, object param4, object param5, object param6) - { - XsltSettings1_2(param0, param1, param2, param3, param4, param5, param6); - } - //[Variation(id = 5, Desc = "Test the document function with EnableDocumentFunction, should work", Pri = 0, Params = new object[] { "XsltSettings.xml", "XsltSettings2.xsl", true, false })] [InlineData(5, "XsltSettings.xml", "XsltSettings2.xsl", true, false)] //[Variation(id = 8, Desc = "Test the document function with TrustedXslt, should work", Pri = 1, Params = new object[] { "XsltSettings.xml", "XsltSettings2.xsl", true, true })] diff --git a/src/System.Private.Xml/tests/Xslt/XslTransformApi/CXslTArgumentList.cs b/src/System.Private.Xml/tests/Xslt/XslTransformApi/CXslTArgumentList.cs index 7d144d9b9e20..b4ac5a5e15f1 100644 --- a/src/System.Private.Xml/tests/Xslt/XslTransformApi/CXslTArgumentList.cs +++ b/src/System.Private.Xml/tests/Xslt/XslTransformApi/CXslTArgumentList.cs @@ -2997,7 +2997,7 @@ public void TC_ExtensionObj_Function_Mismatch_IncorrectCasing(InputType xslInput m_xsltArg.AddExtensionObject(szDefaultNS, obj); LoadXSL("MyObject_CaseSensitive.xsl", xslInputType, readerType); var e = Assert.Throws(() => Transform_ArgList("fruits.xml", outputType, navType)); - var exceptionSourceAssembly = PlatformDetection.IsFullFramework ? "System.Data.SqlXml" : "System.Xml"; + var exceptionSourceAssembly = "System.Xml"; CheckExpectedError(e, exceptionSourceAssembly, "Xslt_UnknownXsltFunction", new[] { "FN3" }); } diff --git a/src/System.Private.Xml/tests/Xslt/XslTransformApi/CXslTransform.cs b/src/System.Private.Xml/tests/Xslt/XslTransformApi/CXslTransform.cs index 0c259bf338ae..0d2b22dcd216 100644 --- a/src/System.Private.Xml/tests/Xslt/XslTransformApi/CXslTransform.cs +++ b/src/System.Private.Xml/tests/Xslt/XslTransformApi/CXslTransform.cs @@ -1072,7 +1072,7 @@ public void TC_CustomNullResover_Then_XmlUrlResolver(InputType inputType, Reader var e = Assert.Throws(() => LoadXSL_Resolver("XmlResolver_Main.xsl", myResolver, inputType, readerType)); var xsltException = Assert.IsType(e.InnerException); var absoluteUri = new Uri(Path.Combine(Environment.CurrentDirectory, FullFilePath("XmlResolver_Include.xsl"))).AbsoluteUri; - var exceptionSourceAssembly = PlatformDetection.IsFullFramework ? "System.Data.SqlXml" : "System.Xml"; + var exceptionSourceAssembly = "System.Xml"; CheckExpectedError(xsltException, exceptionSourceAssembly, "Xslt_CantResolve", new[] { absoluteUri }); } @@ -1095,7 +1095,6 @@ public void TC_CustomNullResover_Then_XmlUrlResolver(InputType inputType, Reader [InlineData(InputType.Navigator, ReaderType.XmlValidatingReader, TransformType.Writer, DocType.XPathDocument)] [InlineData(InputType.Navigator, ReaderType.XmlValidatingReader, TransformType.Stream, DocType.XPathDocument)] [InlineData(InputType.Navigator, ReaderType.XmlValidatingReader, TransformType.TextWriter, DocType.XPathDocument)] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Only full framework implicit resolver works")] [Theory] public void TC_No_Explicit_Resolver_Prohibits_External_Url(InputType inputType, ReaderType readerType, TransformType transformType, DocType docType) { @@ -1531,21 +1530,6 @@ public void LoadNavigator3(TransformType transformType, DocType docType) Assert.True(false); } - - //[Variation("Regression case for bug 80768")] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Full framework supports ")] - [Fact] - public void TC_Ensure_Script_Not_Allowed() - { -#pragma warning disable 0618 - xslt = new XslTransform(); - - var xrLoad = new XmlValidatingReader(new XmlTextReader(FullFilePath("Bug80768.xsl"))); -#pragma warning restore 0618 - var xd = new XPathDocument(xrLoad, XmlSpace.Preserve); - var e = Assert.Throws(() => xslt.Load(xd, new XmlUrlResolver())); - Assert.IsType(e.InnerException); - } } /***********************************************************/ @@ -1625,10 +1609,7 @@ public void LoadXmlReader2() } catch (System.Xml.Xsl.XsltCompileException e) { - if (PlatformDetection.IsFullFramework) - CheckExpectedError(e.InnerException, "system.data.sqlxml", "Xslt_WrongStylesheetElement", new string[] { "" }); - else - CheckExpectedError(e.InnerException, "system.xml", "Xslt_WrongStylesheetElement", new string[] { "" }); + CheckExpectedError(e.InnerException, "system.xml", "Xslt_WrongStylesheetElement", new string[] { "" }); return; } _output.WriteLine("No exception thrown for a loading a closed reader!"); @@ -1728,11 +1709,7 @@ public void LoadXmlReader5() } catch (System.Xml.Xsl.XsltCompileException e) { - - if (PlatformDetection.IsFullFramework) - CheckExpectedError(e.InnerException, "system.data.sqlxml", "Xslt_WrongStylesheetElement", new string[] { "" }); - else - CheckExpectedError(e.InnerException, "system.xml", "Xslt_WrongStylesheetElement", new string[] { "" }); + CheckExpectedError(e.InnerException, "system.xml", "Xslt_WrongStylesheetElement", new string[] { "" }); } finally { diff --git a/src/System.Private.Xml/tests/Xslt/XslTransformApi/Configurations.props b/src/System.Private.Xml/tests/Xslt/XslTransformApi/Configurations.props index 581054d46db4..f97cd5ea7a97 100644 --- a/src/System.Private.Xml/tests/Xslt/XslTransformApi/Configurations.props +++ b/src/System.Private.Xml/tests/Xslt/XslTransformApi/Configurations.props @@ -1,7 +1,8 @@  - netstandard; + netcoreapp; + uap; \ No newline at end of file diff --git a/src/System.Private.Xml/tests/Xslt/XslTransformApi/ExceptionVerifier.cs b/src/System.Private.Xml/tests/Xslt/XslTransformApi/ExceptionVerifier.cs index fc67625946d3..8d6b5363537f 100644 --- a/src/System.Private.Xml/tests/Xslt/XslTransformApi/ExceptionVerifier.cs +++ b/src/System.Private.Xml/tests/Xslt/XslTransformApi/ExceptionVerifier.cs @@ -259,19 +259,16 @@ private void CompareMessages() _expectedMessage = _expectedMessage.ToLowerInvariant(); _actualMessage = _actualMessage.ToLowerInvariant(); - if (!PlatformDetection.IsNetNative) // .NET Native toolchain optimizes away exception messages. + if (Regex.Match(_actualMessage, _expectedMessage, RegexOptions.Singleline).ToString() != _actualMessage) { - if (Regex.Match(_actualMessage, _expectedMessage, RegexOptions.Singleline).ToString() != _actualMessage) - { - // Unescape before printing the expected message string - _expectedMessage = Regex.Unescape(_expectedMessage); - _output.WriteLine("Mismatch in error message"); - _output.WriteLine("===== Expected Message =====\n" + _expectedMessage); - _output.WriteLine("===== Expected Message Length =====\n" + _expectedMessage.Length); - _output.WriteLine("===== Actual Message =====\n" + _actualMessage); - _output.WriteLine("===== Actual Message Length =====\n" + _actualMessage.Length); - throw new VerifyException("Mismatch in error message"); - } + // Unescape before printing the expected message string + _expectedMessage = Regex.Unescape(_expectedMessage); + _output.WriteLine("Mismatch in error message"); + _output.WriteLine("===== Expected Message =====\n" + _expectedMessage); + _output.WriteLine("===== Expected Message Length =====\n" + _expectedMessage.Length); + _output.WriteLine("===== Actual Message =====\n" + _actualMessage); + _output.WriteLine("===== Actual Message Length =====\n" + _actualMessage.Length); + throw new VerifyException("Mismatch in error message"); } } diff --git a/src/System.Private.Xml/tests/Xslt/XslTransformApi/System.Xml.Xsl.XslTransformApi.Tests.csproj b/src/System.Private.Xml/tests/Xslt/XslTransformApi/System.Xml.Xsl.XslTransformApi.Tests.csproj index 500e3525c276..79e694cdc74b 100644 --- a/src/System.Private.Xml/tests/Xslt/XslTransformApi/System.Xml.Xsl.XslTransformApi.Tests.csproj +++ b/src/System.Private.Xml/tests/Xslt/XslTransformApi/System.Xml.Xsl.XslTransformApi.Tests.csproj @@ -1,7 +1,7 @@ {ACF79A18-2655-452C-B4AC-10125F0AD7A8} - netstandard-Debug;netstandard-Release + netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release diff --git a/src/System.Reflection.DispatchProxy/tests/Configurations.props b/src/System.Reflection.DispatchProxy/tests/Configurations.props index 2bc19ff4170e..b0ad9a4c0cfe 100644 --- a/src/System.Reflection.DispatchProxy/tests/Configurations.props +++ b/src/System.Reflection.DispatchProxy/tests/Configurations.props @@ -1,8 +1,9 @@  - netstandard; netcoreapp; + netfx; + uap; \ No newline at end of file diff --git a/src/System.Reflection.DispatchProxy/tests/DispatchProxyTests.cs b/src/System.Reflection.DispatchProxy/tests/DispatchProxyTests.cs index 4ab6d770290c..9856dc0040bf 100644 --- a/src/System.Reflection.DispatchProxy/tests/DispatchProxyTests.cs +++ b/src/System.Reflection.DispatchProxy/tests/DispatchProxyTests.cs @@ -99,28 +99,24 @@ public static void Created_Proxy_With_Different_Proxy_Type_Use_Different_Generat } [Fact] - [ActiveIssue("https://github.com/dotnet/corert/issues/3637 - wrong exception thrown from DispatchProxy.Create()", TargetFrameworkMonikers.UapAot)] public static void Create_Using_Concrete_Proxy_Type_Throws_ArgumentException() { AssertExtensions.Throws("T", () => DispatchProxy.Create()); } [Fact] - [ActiveIssue("https://github.com/dotnet/corert/issues/3637 - wrong exception thrown from DispatchProxy.Create()", TargetFrameworkMonikers.UapAot)] public static void Create_Using_Sealed_BaseType_Throws_ArgumentException() { AssertExtensions.Throws("TProxy", () => DispatchProxy.Create()); } [Fact] - [ActiveIssue("https://github.com/dotnet/corert/issues/3637 - wrong exception thrown from DispatchProxy.Create()", TargetFrameworkMonikers.UapAot)] public static void Create_Using_Abstract_BaseType_Throws_ArgumentException() { AssertExtensions.Throws("TProxy", () => DispatchProxy.Create()); } [Fact] - [ActiveIssue("https://github.com/dotnet/corert/issues/3637 - wrong exception thrown from DispatchProxy.Create()", TargetFrameworkMonikers.UapAot)] public static void Create_Using_BaseType_Without_Default_Ctor_Throws_ArgumentException() { AssertExtensions.Throws("TProxy", () => DispatchProxy.Create()); @@ -394,7 +390,6 @@ public static void Invoke_Property_Setter_And_Getter_Invokes_Correct_Methods() [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Reflection on generated dispatch proxy types not allowed.")] public static void Proxy_Declares_Interface_Properties() { TestType_IPropertyService proxy = DispatchProxy.Create(); @@ -453,7 +448,6 @@ public static void Invoke_Event_Add_And_Remove_And_Raise_Invokes_Correct_Methods #endif // netcoreapp [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Reflection on generated dispatch proxy types not allowed.")] public static void Proxy_Declares_Interface_Events() { TestType_IEventService proxy = DispatchProxy.Create(); @@ -495,7 +489,6 @@ public static void Invoke_Indexer_Setter_And_Getter_Invokes_Correct_Methods() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Reflection on generated dispatch proxy types not allowed.")] public static void Proxy_Declares_Interface_Indexers() { TestType_IIndexerService proxy = DispatchProxy.Create(); diff --git a/src/System.Reflection.DispatchProxy/tests/System.Reflection.DispatchProxy.Tests.csproj b/src/System.Reflection.DispatchProxy/tests/System.Reflection.DispatchProxy.Tests.csproj index f3225f0fdc75..3d941620b952 100644 --- a/src/System.Reflection.DispatchProxy/tests/System.Reflection.DispatchProxy.Tests.csproj +++ b/src/System.Reflection.DispatchProxy/tests/System.Reflection.DispatchProxy.Tests.csproj @@ -1,7 +1,7 @@ {089444FE-8FF5-4D8F-A51B-32D026425F6B} - netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release + netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release;uap-Debug;uap-Release diff --git a/src/System.Reflection.Extensions/tests/Configurations.props b/src/System.Reflection.Extensions/tests/Configurations.props index ff0d415e4593..acf56fa2750e 100644 --- a/src/System.Reflection.Extensions/tests/Configurations.props +++ b/src/System.Reflection.Extensions/tests/Configurations.props @@ -1,7 +1,8 @@  - netstandard; + netcoreapp; + uap; \ No newline at end of file diff --git a/src/System.Reflection.Extensions/tests/System.Reflection.Extensions.Tests.csproj b/src/System.Reflection.Extensions/tests/System.Reflection.Extensions.Tests.csproj index 22f7613c5eaa..e026679a6704 100644 --- a/src/System.Reflection.Extensions/tests/System.Reflection.Extensions.Tests.csproj +++ b/src/System.Reflection.Extensions/tests/System.Reflection.Extensions.Tests.csproj @@ -1,7 +1,7 @@ {A5E6F8C2-8E71-4148-8806-12FFBDBE2974} - netstandard-Debug;netstandard-Release + netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release true diff --git a/src/System.Reflection.Metadata/tests/Configurations.props b/src/System.Reflection.Metadata/tests/Configurations.props index 7c754dfedf26..d2afc7af6488 100644 --- a/src/System.Reflection.Metadata/tests/Configurations.props +++ b/src/System.Reflection.Metadata/tests/Configurations.props @@ -4,7 +4,7 @@ netcoreapp; netfx; - + \ No newline at end of file diff --git a/src/System.Reflection.Metadata/tests/Metadata/Decoding/SignatureDecoderTests.cs b/src/System.Reflection.Metadata/tests/Metadata/Decoding/SignatureDecoderTests.cs index 62602fb1f021..66a12fcc7d07 100644 --- a/src/System.Reflection.Metadata/tests/Metadata/Decoding/SignatureDecoderTests.cs +++ b/src/System.Reflection.Metadata/tests/Metadata/Decoding/SignatureDecoderTests.cs @@ -15,18 +15,8 @@ namespace System.Reflection.Metadata.Decoding.Tests { public partial class SignatureDecoderTests { - private static readonly string RuntimeAssemblyName = -#if netstandard - "netstandard"; -#else - PlatformDetection.IsFullFramework ? "mscorlib" : "System.Runtime"; -#endif - private static readonly string CollectionsAssemblyName = -#if netstandard - "netstandard"; -#else - PlatformDetection.IsFullFramework ? "mscorlib" : "System.Collections"; -#endif + private static readonly string RuntimeAssemblyName = PlatformDetection.IsFullFramework ? "mscorlib" : "System.Runtime"; + private static readonly string CollectionsAssemblyName = PlatformDetection.IsFullFramework ? "mscorlib" : "System.Collections"; [Fact] public unsafe void VerifyMultipleOptionalModifiers() diff --git a/src/System.Reflection.Metadata/tests/System.Reflection.Metadata.Tests.csproj b/src/System.Reflection.Metadata/tests/System.Reflection.Metadata.Tests.csproj index 29fbda36973e..5f1df613fec9 100644 --- a/src/System.Reflection.Metadata/tests/System.Reflection.Metadata.Tests.csproj +++ b/src/System.Reflection.Metadata/tests/System.Reflection.Metadata.Tests.csproj @@ -4,7 +4,7 @@ true false - netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release + netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release diff --git a/src/System.Reflection.MetadataLoadContext/tests/Configurations.props b/src/System.Reflection.MetadataLoadContext/tests/Configurations.props index 2bc19ff4170e..b0ad9a4c0cfe 100644 --- a/src/System.Reflection.MetadataLoadContext/tests/Configurations.props +++ b/src/System.Reflection.MetadataLoadContext/tests/Configurations.props @@ -1,8 +1,9 @@  - netstandard; netcoreapp; + netfx; + uap; \ No newline at end of file diff --git a/src/System.Reflection.MetadataLoadContext/tests/System.Reflection.MetadataLoadContext.Tests.csproj b/src/System.Reflection.MetadataLoadContext/tests/System.Reflection.MetadataLoadContext.Tests.csproj index d7eb7d7c4ac9..20b7262490cf 100644 --- a/src/System.Reflection.MetadataLoadContext/tests/System.Reflection.MetadataLoadContext.Tests.csproj +++ b/src/System.Reflection.MetadataLoadContext/tests/System.Reflection.MetadataLoadContext.Tests.csproj @@ -2,7 +2,7 @@ {443B7659-B3FA-4B32-88BA-3A0517E21018} true - netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release + netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release;uap-Debug;uap-Release diff --git a/src/System.Reflection.MetadataLoadContext/tests/src/TestUtils/NetStandardBridge.cs b/src/System.Reflection.MetadataLoadContext/tests/src/TestUtils/NetStandardBridge.cs index 3e189d53320a..19e9c98e1d2c 100644 --- a/src/System.Reflection.MetadataLoadContext/tests/src/TestUtils/NetStandardBridge.cs +++ b/src/System.Reflection.MetadataLoadContext/tests/src/TestUtils/NetStandardBridge.cs @@ -9,7 +9,7 @@ namespace System.Reflection.Tests { internal static class NetCoreApiEmulators { -#if !netstandard +#if netcoreapp public static bool IsSZArray(this Type t) => t.IsSZArray; public static bool IsVariableBoundArray(this Type t) => t.IsVariableBoundArray; public static bool IsTypeDefinition(this Type t) => t.IsTypeDefinition; diff --git a/src/System.Reflection.TypeExtensions/tests/Configurations.props b/src/System.Reflection.TypeExtensions/tests/Configurations.props index 2bc19ff4170e..b0ad9a4c0cfe 100644 --- a/src/System.Reflection.TypeExtensions/tests/Configurations.props +++ b/src/System.Reflection.TypeExtensions/tests/Configurations.props @@ -1,8 +1,9 @@  - netstandard; netcoreapp; + netfx; + uap; \ No newline at end of file diff --git a/src/System.Reflection.TypeExtensions/tests/CoreCLR/MemberInfoTests.CoreCLR.cs b/src/System.Reflection.TypeExtensions/tests/CoreCLR/MemberInfoTests.CoreCLR.cs index 55a9b0041431..5a1d8e0ee5db 100644 --- a/src/System.Reflection.TypeExtensions/tests/CoreCLR/MemberInfoTests.CoreCLR.cs +++ b/src/System.Reflection.TypeExtensions/tests/CoreCLR/MemberInfoTests.CoreCLR.cs @@ -48,17 +48,7 @@ public static void UnbakedReflectionEmitType_HasNoMetadataToken() Assert.Throws(() => method.GetMetadataToken()); } - public static bool GetMetadataTokenSupported - { - get - { - if (!PlatformDetection.IsNetNative) - return true; - - // Expected false but in case .NET Native ever changes its mind... - return typeof(MetadataTokenTests).HasMetadataToken(); - } - } + public static bool GetMetadataTokenSupported => true; public static bool IsReflectionEmitSupported => PlatformDetection.IsReflectionEmitSupported; diff --git a/src/System.Reflection.TypeExtensions/tests/System.Reflection.TypeExtensions.Tests.csproj b/src/System.Reflection.TypeExtensions/tests/System.Reflection.TypeExtensions.Tests.csproj index 56f3a82299a8..f465bbae7df8 100644 --- a/src/System.Reflection.TypeExtensions/tests/System.Reflection.TypeExtensions.Tests.csproj +++ b/src/System.Reflection.TypeExtensions/tests/System.Reflection.TypeExtensions.Tests.csproj @@ -1,7 +1,7 @@ {EC8FFAA7-CA1E-4631-A375-D54B1FC764F6} - netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release + netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release;uap-Debug;uap-Release true diff --git a/src/System.Reflection/tests/AssemblyNameTests.cs b/src/System.Reflection/tests/AssemblyNameTests.cs index 1d6c0655e308..d0085a14ea0a 100644 --- a/src/System.Reflection/tests/AssemblyNameTests.cs +++ b/src/System.Reflection/tests/AssemblyNameTests.cs @@ -179,7 +179,6 @@ public void Verify_CodeBase() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "AssemblyName.CodeBase and EscapedCodeBase not supported on UapAot")] public static void Verify_EscapedCodeBase() { AssemblyName n = new AssemblyName("MyAssemblyName"); @@ -460,9 +459,6 @@ public static IEnumerable Constructor_String_InvalidVersionTest_Member [Theory] [MemberData(nameof(Constructor_String_InvalidVersionTest_MemberData))] - [SkipOnTargetFramework( - TargetFrameworkMonikers.NetFramework, - ".NET Core behavior differs from .NET Framework since it does not want to replicate some bugs")] public static void Constructor_String_InvalidVersionTest(string versionStr) { Assert.Throws(() => new AssemblyName("a, Version=" + versionStr)); @@ -503,9 +499,6 @@ public static IEnumerable Constructor_String_VersionTest_MemberData() [Theory] [MemberData(nameof(Constructor_String_VersionTest_MemberData))] - [SkipOnTargetFramework( - TargetFrameworkMonikers.NetFramework, - ".NET Core behavior differs from .NET Framework since it does not want to replicate some bugs")] public static void Constructor_String_VersionTest(Version expectedVersion, string versionStr) { Assert.NotNull(expectedVersion); @@ -546,9 +539,6 @@ public static void Constructor_String_VersionTest(Version expectedVersion, strin [Fact] [ActiveIssue(33249)] - [SkipOnTargetFramework( - TargetFrameworkMonikers.NetFramework, - ".NET Core behavior differs from .NET Framework since it does not want to replicate some bugs")] public static void Constructor_String_LoadVersionTest() { string assemblyNamePrefix = "System.Reflection.Tests.Assembly_"; diff --git a/src/System.Reflection/tests/AssemblyTests.cs b/src/System.Reflection/tests/AssemblyTests.cs index f06eea974cc1..3cfb18525ed1 100644 --- a/src/System.Reflection/tests/AssemblyTests.cs +++ b/src/System.Reflection/tests/AssemblyTests.cs @@ -37,14 +37,9 @@ public AssemblyTests() // Assembly.Location not supported (properly) on uapaot. DestTestAssemblyPath = Path.Combine(base.TestDirectory, "TestAssembly.dll"); LoadFromTestPath = Path.Combine(base.TestDirectory, "System.Reflection.Tests.dll"); - - // There is no dll to copy in ILC runs - if (!PlatformDetection.IsNetNative) - { - File.Copy(SourceTestAssemblyPath, DestTestAssemblyPath); - string currAssemblyPath = Path.Combine(Environment.CurrentDirectory, "System.Reflection.Tests.dll"); - File.Copy(currAssemblyPath, LoadFromTestPath, true); - } + File.Copy(SourceTestAssemblyPath, DestTestAssemblyPath); + string currAssemblyPath = Path.Combine(Environment.CurrentDirectory, "System.Reflection.Tests.dll"); + File.Copy(currAssemblyPath, LoadFromTestPath, true); } [Theory] @@ -145,7 +140,6 @@ public void ExportedTypes(Type type, bool expected) } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "On desktop, XUnit hosts in an appdomain in such a way that GetEntryAssembly() returns null")] public void GetEntryAssembly() { Assert.NotNull(Assembly.GetEntryAssembly()); @@ -156,7 +150,6 @@ public void GetEntryAssembly() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Assembly.GetFile() not supported on UapAot")] public void GetFile() { Assert.Throws(() => typeof(AssemblyTests).Assembly.GetFile(null)); @@ -167,7 +160,6 @@ public void GetFile() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Assembly.GetFiles() not supported on UapAot")] public void GetFiles() { Assert.NotNull(typeof(AssemblyTests).Assembly.GetFiles()); @@ -275,18 +267,10 @@ public void IsFullyTrusted() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "The full .NET Framework supports SecurityRuleSet")] public void SecurityRuleSet_Netcore() { Assert.Equal(SecurityRuleSet.None, typeof(AssemblyTests).Assembly.SecurityRuleSet); - } - - [Fact] - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework, "SecurityRuleSet is ignored in .NET Core")] - public void SecurityRuleSet_Netfx() - { - Assert.Equal(SecurityRuleSet.Level2, typeof(AssemblyTests).Assembly.SecurityRuleSet); - } + } [Theory] [MemberData(nameof(Load_TestData))] @@ -311,40 +295,26 @@ public void LoadFile() string fullRuntimeTestsPath = Path.GetFullPath(RuntimeTestsDll); var loadedAssembly1 = Assembly.LoadFile(fullRuntimeTestsPath); - if (PlatformDetection.IsFullFramework) - { - Assert.Equal(currentAssembly, loadedAssembly1); - } - else - { - Assert.NotEqual(currentAssembly, loadedAssembly1); + Assert.NotEqual(currentAssembly, loadedAssembly1); #if netcoreapp - System.Runtime.Loader.AssemblyLoadContext alc = System.Runtime.Loader.AssemblyLoadContext.GetLoadContext(loadedAssembly1); - string expectedName = string.Format("Assembly.LoadFile({0})", fullRuntimeTestsPath); - Assert.Equal(expectedName, alc.Name); - Assert.Contains(fullRuntimeTestsPath, alc.Name); - Assert.Contains(expectedName, alc.ToString()); - Assert.Contains("System.Runtime.Loader.IndividualAssemblyLoadContext", alc.ToString()); + System.Runtime.Loader.AssemblyLoadContext alc = System.Runtime.Loader.AssemblyLoadContext.GetLoadContext(loadedAssembly1); + string expectedName = string.Format("Assembly.LoadFile({0})", fullRuntimeTestsPath); + Assert.Equal(expectedName, alc.Name); + Assert.Contains(fullRuntimeTestsPath, alc.Name); + Assert.Contains(expectedName, alc.ToString()); + Assert.Contains("System.Runtime.Loader.IndividualAssemblyLoadContext", alc.ToString()); #endif - } string dir = Path.GetDirectoryName(fullRuntimeTestsPath); fullRuntimeTestsPath = Path.Combine(dir, ".", RuntimeTestsDll); Assembly loadedAssembly2 = Assembly.LoadFile(fullRuntimeTestsPath); - if (PlatformDetection.IsFullFramework) - { - Assert.NotEqual(loadedAssembly1, loadedAssembly2); - } - else - { - Assert.Equal(loadedAssembly1, loadedAssembly2); - } + Assert.Equal(loadedAssembly1, loadedAssembly2); } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework | TargetFrameworkMonikers.Uap, "The full .NET Framework has a bug and throws a NullReferenceException")] + [SkipOnTargetFramework(TargetFrameworkMonikers.Uap)] public void LoadFile_NullPath_Netcore_ThrowsArgumentNullException() { AssertExtensions.Throws("path", () => Assembly.LoadFile(null)); @@ -358,21 +328,12 @@ public void LoadFile_NoSuchPath_ThrowsArgumentException() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework | TargetFrameworkMonikers.UapAot, "The full .NET Framework supports Assembly.LoadFrom")] public void LoadFromUsingHashValue_Netcore() { Assert.Throws(() => Assembly.LoadFrom("abc", null, System.Configuration.Assemblies.AssemblyHashAlgorithm.SHA1)); } [Fact] - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework, "The implementation of Assembly.LoadFrom is stubbed out in .NET Core")] - public void LoadFromUsingHashValue_Netfx() - { - Assert.Throws(() => Assembly.LoadFrom("abc", null, System.Configuration.Assemblies.AssemblyHashAlgorithm.SHA1)); - } - - [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Assembly.LoadFrom() not supported on UapAot")] public void LoadFrom_SamePath_ReturnsEqualAssemblies() { Assembly assembly1 = Assembly.LoadFrom(DestTestAssemblyPath); @@ -381,7 +342,6 @@ public void LoadFrom_SamePath_ReturnsEqualAssemblies() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Assembly.LoadFrom() not supported on UapAot")] public void LoadFrom_SameIdentityAsAssemblyWithDifferentPath_ReturnsEqualAssemblies() { Assembly assembly1 = Assembly.LoadFrom(typeof(AssemblyTests).Assembly.Location); @@ -389,18 +349,10 @@ public void LoadFrom_SameIdentityAsAssemblyWithDifferentPath_ReturnsEqualAssembl Assembly assembly2 = Assembly.LoadFrom(LoadFromTestPath); - if (PlatformDetection.IsFullFramework) - { - Assert.NotEqual(assembly1, assembly2); - } - else - { - Assert.Equal(assembly1, assembly2); - } + Assert.Equal(assembly1, assembly2); } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Assembly.LoadFrom() not supported on UapAot")] public void LoadFrom_NullAssemblyFile_ThrowsArgumentNullException() { AssertExtensions.Throws("assemblyFile", () => Assembly.LoadFrom(null)); @@ -408,7 +360,6 @@ public void LoadFrom_NullAssemblyFile_ThrowsArgumentNullException() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Assembly.LoadFrom() not supported on UapAot")] public void LoadFrom_EmptyAssemblyFile_ThrowsArgumentException() { AssertExtensions.Throws("path", null, (() => Assembly.LoadFrom(""))); @@ -416,7 +367,6 @@ public void LoadFrom_EmptyAssemblyFile_ThrowsArgumentException() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Assembly.LoadFrom() not supported on UapAot")] public void LoadFrom_NoSuchFile_ThrowsFileNotFoundException() { Assert.Throws(() => Assembly.LoadFrom("NoSuchPath")); @@ -424,7 +374,6 @@ public void LoadFrom_NoSuchFile_ThrowsFileNotFoundException() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Assembly.UnsafeLoadFrom() not supported on UapAot")] public void UnsafeLoadFrom_SamePath_ReturnsEqualAssemblies() { Assembly assembly1 = Assembly.UnsafeLoadFrom(DestTestAssemblyPath); @@ -433,14 +382,12 @@ public void UnsafeLoadFrom_SamePath_ReturnsEqualAssemblies() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework | TargetFrameworkMonikers.UapAot, "The implementation of LoadFrom(string, byte[], AssemblyHashAlgorithm is not supported in .NET Core.")] public void LoadFrom_WithHashValue_NetCoreCore_ThrowsNotSupportedException() { Assert.Throws(() => Assembly.LoadFrom(DestTestAssemblyPath, new byte[0], Configuration.Assemblies.AssemblyHashAlgorithm.None)); } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework | TargetFrameworkMonikers.UapAot, "The full .NET Framework supports more than one module per assembly")] public void LoadModule_Netcore() { Assembly assembly = typeof(AssemblyTests).Assembly; @@ -448,18 +395,8 @@ public void LoadModule_Netcore() Assert.Throws(() => assembly.LoadModule("abc", null, null)); } - [Fact] - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework, "The coreclr doesn't support more than one module per assembly")] - public void LoadModule_Netfx() - { - Assembly assembly = typeof(AssemblyTests).Assembly; - AssertExtensions.Throws(null, () => assembly.LoadModule("abc", null)); - AssertExtensions.Throws(null, () => assembly.LoadModule("abc", null, null)); - } - #pragma warning disable 618 [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Assembly.LoadFromWithPartialName() not supported on UapAot")] public void LoadWithPartialName() { string simpleName = typeof(AssemblyTests).Assembly.GetName().Name; @@ -468,8 +405,6 @@ public void LoadWithPartialName() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Assembly.LoadFromWithPartialName() not supported on UapAot")] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public void LoadWithPartialName_Neg() { AssertExtensions.Throws("partialName", () => Assembly.LoadWithPartialName(null)); @@ -487,14 +422,12 @@ public void Location_ExecutingAssembly_IsNotNull() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "CodeBase is not supported on UapAot")] public void CodeBase() { Assert.NotEmpty(Helpers.ExecutingAssembly.CodeBase); } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "ImageRuntimeVersion is not supported on UapAot.")] public void ImageRuntimeVersion() { Assert.NotEmpty(Helpers.ExecutingAssembly.ImageRuntimeVersion); @@ -564,7 +497,6 @@ public void CreateQualifiedName() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "GetReferencedAssemblies is not supported on UapAot.")] public void GetReferencedAssemblies() { // It is too brittle to depend on the assembly references so we just call the method and check that it does not throw. @@ -645,7 +577,6 @@ public static IEnumerable GetCallingAssembly_TestData() [Theory] [MemberData(nameof(GetCallingAssembly_TestData))] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "GetCallingAssembly() is not supported on UapAot")] public void GetCallingAssembly(Assembly assembly1, Assembly assembly2, bool expected) { Assert.Equal(expected, assembly1.Equals(assembly2)); @@ -658,7 +589,6 @@ public void GetExecutingAssembly() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Assembly.GetSatelliteAssembly() not supported on UapAot")] public void GetSatelliteAssemblyNeg() { Assert.Throws(() => (typeof(AssemblyTests).Assembly.GetSatelliteAssembly(null))); @@ -666,7 +596,6 @@ public void GetSatelliteAssemblyNeg() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Assembly.Load(String) not supported on UapAot")] public void AssemblyLoadFromString() { AssemblyName an = typeof(AssemblyTests).Assembly.GetName(); @@ -759,7 +688,6 @@ public static IEnumerable GetModules_TestData() [Theory] [MemberData(nameof(GetModules_TestData))] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Assembly.GetModules() is not supported on UapAot.")] public void GetModules_GetModule(Assembly assembly) { Assert.NotEmpty(assembly.GetModules()); @@ -770,7 +698,6 @@ public void GetModules_GetModule(Assembly assembly) } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Assembly.GetLoadedModules() is not supported on UapAot.")] public void GetLoadedModules() { Assembly assembly = typeof(AssemblyTests).Assembly; diff --git a/src/System.Reflection/tests/AssemblyTests.netcoreapp.cs b/src/System.Reflection/tests/AssemblyTests.netcoreapp.cs index f6e34e35f37a..4fdb9096ef19 100644 --- a/src/System.Reflection/tests/AssemblyTests.netcoreapp.cs +++ b/src/System.Reflection/tests/AssemblyTests.netcoreapp.cs @@ -23,15 +23,6 @@ public static void AssemblyGetForwardedTypes() Assembly a = typeof(AssemblyNetCoreAppTests).Assembly; Type[] forwardedTypes = a.GetForwardedTypes(); - // ActiveIssue: https://github.com/dotnet/corefx/issues/22773 - UapAot - TypeForwards to System.Runtime types not getting emitted when ILC runs in shared assembly mode. - if (PlatformDetection.IsNetNative) - { - if (!forwardedTypes.Contains(typeof(string))) - { - forwardedTypes = forwardedTypes.Concat(new Type[] { typeof(string) }).ToArray(); - } - } - forwardedTypes = forwardedTypes.OrderBy(t => t.FullName).ToArray(); Type[] expected = { typeof(string), typeof(TypeInForwardedAssembly), typeof(TypeInForwardedAssembly.PublicInner), typeof(TypeInForwardedAssembly.PublicInner.PublicInnerInner) }; @@ -41,7 +32,6 @@ public static void AssemblyGetForwardedTypes() } [Fact] - [ActiveIssue("https://github.com/dotnet/corert/issues/4230 - UapAot does not honor the ReferenceAssembly attribute", TargetFrameworkMonikers.UapAot)] public static void AssemblyGetForwardedTypesLoadFailure() { Assembly a = typeof(TypeInForwardedAssembly).Assembly; diff --git a/src/System.Reflection/tests/Configurations.props b/src/System.Reflection/tests/Configurations.props index e43964ecf9e7..acf56fa2750e 100644 --- a/src/System.Reflection/tests/Configurations.props +++ b/src/System.Reflection/tests/Configurations.props @@ -2,7 +2,7 @@ netcoreapp; - netstandard; + uap; \ No newline at end of file diff --git a/src/System.Reflection/tests/ConstructorInfoTests.cs b/src/System.Reflection/tests/ConstructorInfoTests.cs index 007838665535..7ebe6754b3ec 100644 --- a/src/System.Reflection/tests/ConstructorInfoTests.cs +++ b/src/System.Reflection/tests/ConstructorInfoTests.cs @@ -61,7 +61,6 @@ public void Invoke() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Invoking static constructors are not supported on UapAot.")] public void Invoke_StaticConstructor_NullObject_NullParameters() { ConstructorInfo[] constructors = GetConstructors(typeof(ClassWithStaticConstructor)); diff --git a/src/System.Reflection/tests/ManifestResourceInfoTests.cs b/src/System.Reflection/tests/ManifestResourceInfoTests.cs index 4e5bf32809a1..1c7c84653111 100644 --- a/src/System.Reflection/tests/ManifestResourceInfoTests.cs +++ b/src/System.Reflection/tests/ManifestResourceInfoTests.cs @@ -9,7 +9,6 @@ namespace System.Reflection.Tests public class ManifestResourceInfoTests { [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Assembly.GetManifestResourceInfo() not supported on UapAot")] public void FileName() { Assembly assembly = typeof(ManifestResourceInfoTests).GetTypeInfo().Assembly; @@ -18,7 +17,6 @@ public void FileName() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Assembly.GetManifestResourceInfo() not supported on UapAot")] public void ReferencedAssembly() { Assembly assembly = typeof(ManifestResourceInfoTests).GetTypeInfo().Assembly; @@ -27,7 +25,6 @@ public void ReferencedAssembly() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Assembly.GetManifestResourceInfo() not supported on UapAot")] public void ResourceLocation() { Assembly assembly = typeof(ManifestResourceInfoTests).GetTypeInfo().Assembly; diff --git a/src/System.Reflection/tests/ModuleTests.cs b/src/System.Reflection/tests/ModuleTests.cs index 71180238a112..4d754a0f816b 100644 --- a/src/System.Reflection/tests/ModuleTests.cs +++ b/src/System.Reflection/tests/ModuleTests.cs @@ -34,7 +34,6 @@ public void Assembly(TypeInfo typeInfo) [InlineData(typeof(Int64Attr), (long)77, "Int64AttrSimple")] [InlineData(typeof(StringAttr), "hello", "StringAttrSimple")] [InlineData(typeof(EnumAttr), PublicEnum.Case1, "EnumAttrSimple")] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Custom Attributes on Modules not supported on UapAot.")] public void CustomAttributes(Type attrType, CtorArg expectedCtorValue, NamedArg expectedNamedValue) { Module module = typeof(ModuleTest).GetTypeInfo().Module; diff --git a/src/System.Reflection/tests/ParameterInfoTests.cs b/src/System.Reflection/tests/ParameterInfoTests.cs index 6eb731574d4b..c5af59bbd0dc 100644 --- a/src/System.Reflection/tests/ParameterInfoTests.cs +++ b/src/System.Reflection/tests/ParameterInfoTests.cs @@ -73,7 +73,6 @@ public void HasDefaultValue(Type type, string name, int index, bool expected) } [Theory] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Querying HasDefaultValue of optional DateTime parameter may throw exception on NETFX")] [InlineData(typeof(ParameterInfoMetadata), "MethodWithDefaultDateTime", 0, true)] public void HasDefaultValue_broken_on_NETFX(Type type, string name, int index, bool expected) { @@ -160,7 +159,6 @@ public void DefaultValue(Type type, string name, int index, object expected) } [Theory] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Querying DefaultValue of optional DateTime parameter may throw exception on NETFX")] [InlineData(typeof(ParameterInfoMetadata), "MethodWithDefaultDateTime", 0, null)] public void DefaultValue_broken_on_NETFX(Type type, string name, int index, object expected) { @@ -250,10 +248,7 @@ public static IEnumerable s_CustomAttributesTestData yield return new object[] { typeof(OptionalAttribute) }; yield return new object[] { typeof(OutAttribute) }; yield return new object[] { typeof(InAttribute) }; - if (!PlatformDetection.IsNetNative) // Native Metadata format does not expose FieldMarshal info: https://github.com/dotnet/corert/issues/3366 - { - yield return new object[] { typeof(MarshalAsAttribute) }; - } + yield return new object[] { typeof(MarshalAsAttribute) }; } } diff --git a/src/System.Reflection/tests/System.Reflection.Tests.csproj b/src/System.Reflection/tests/System.Reflection.Tests.csproj index 388332969d5d..6529077a4745 100644 --- a/src/System.Reflection/tests/System.Reflection.Tests.csproj +++ b/src/System.Reflection/tests/System.Reflection.Tests.csproj @@ -1,7 +1,7 @@ {B027C72E-F04E-42E0-A7F7-993AEF8400D2} - netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release + netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release true @@ -46,7 +46,7 @@ ResourceTextFile.txt - + diff --git a/src/System.Resources.Extensions/tests/Configurations.props b/src/System.Resources.Extensions/tests/Configurations.props index ff0d415e4593..b0ad9a4c0cfe 100644 --- a/src/System.Resources.Extensions/tests/Configurations.props +++ b/src/System.Resources.Extensions/tests/Configurations.props @@ -1,7 +1,9 @@  - netstandard; + netcoreapp; + netfx; + uap; \ No newline at end of file diff --git a/src/System.Resources.Extensions/tests/System.Resources.Extensions.Tests.csproj b/src/System.Resources.Extensions/tests/System.Resources.Extensions.Tests.csproj index 922f23bb458c..428684c31f8c 100644 --- a/src/System.Resources.Extensions/tests/System.Resources.Extensions.Tests.csproj +++ b/src/System.Resources.Extensions/tests/System.Resources.Extensions.Tests.csproj @@ -1,6 +1,6 @@  - netstandard-Debug;netstandard-Release + netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release;uap-Debug;uap-Release 1.0.9 true diff --git a/src/System.Resources.Reader/tests/Configurations.props b/src/System.Resources.Reader/tests/Configurations.props index ff0d415e4593..acf56fa2750e 100644 --- a/src/System.Resources.Reader/tests/Configurations.props +++ b/src/System.Resources.Reader/tests/Configurations.props @@ -1,7 +1,8 @@  - netstandard; + netcoreapp; + uap; \ No newline at end of file diff --git a/src/System.Resources.Reader/tests/System.Resources.Reader.Tests.csproj b/src/System.Resources.Reader/tests/System.Resources.Reader.Tests.csproj index 462735693748..2a33c9a22d08 100644 --- a/src/System.Resources.Reader/tests/System.Resources.Reader.Tests.csproj +++ b/src/System.Resources.Reader/tests/System.Resources.Reader.Tests.csproj @@ -2,7 +2,7 @@ {8D7202E8-084A-4C20-AB93-3BF70D2E0651} - netstandard-Debug;netstandard-Release + netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release true diff --git a/src/System.Resources.ResourceManager/tests/Configurations.props b/src/System.Resources.ResourceManager/tests/Configurations.props index 04ae535c9867..2b2323d47917 100644 --- a/src/System.Resources.ResourceManager/tests/Configurations.props +++ b/src/System.Resources.ResourceManager/tests/Configurations.props @@ -2,7 +2,7 @@ netcoreapp; - netstandard; + uap; diff --git a/src/System.Resources.ResourceManager/tests/ResourceManagerTests.cs b/src/System.Resources.ResourceManager/tests/ResourceManagerTests.cs index 3172544a5218..8cf246ddf693 100644 --- a/src/System.Resources.ResourceManager/tests/ResourceManagerTests.cs +++ b/src/System.Resources.ResourceManager/tests/ResourceManagerTests.cs @@ -207,7 +207,7 @@ public static void BaseName() [Theory] [MemberData(nameof(EnglishResourceData))] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapNotUapAot, "When getting resources from PRI file the casing doesn't matter, if it is there it will always find and return the resource")] + [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "When getting resources from PRI file the casing doesn't matter, if it is there it will always find and return the resource")] public static void IgnoreCase(string key, string expectedValue) { var manager = new ResourceManager("System.Resources.Tests.Resources.TestResx", typeof(ResourceManagerTests).GetTypeInfo().Assembly); @@ -327,7 +327,7 @@ public static void GetResourceSet_Images(string key, object expectedValue) public static void File_GetObject(string key, object expectedValue, bool requiresBinaryFormatter = false) { var manager = ResourceManager.CreateFileBasedResourceManager("TestResx.netstandard17", Directory.GetCurrentDirectory(), null); - if (requiresBinaryFormatter && !PlatformDetection.IsFullFramework) + if (requiresBinaryFormatter) { Assert.Throws(() => manager.GetObject(key)); Assert.Throws(() => manager.GetObject(key, new CultureInfo("en-US"))); @@ -346,7 +346,7 @@ public static void File_GetResourceSet_NonStrings(string key, object expectedVal var manager = ResourceManager.CreateFileBasedResourceManager("TestResx.netstandard17", Directory.GetCurrentDirectory(), null); var culture = new CultureInfo("en-US"); ResourceSet set = manager.GetResourceSet(culture, true, true); - if (requiresBinaryFormatter && !PlatformDetection.IsFullFramework) + if (requiresBinaryFormatter) { Assert.Throws(() => set.GetObject(key)); } @@ -379,7 +379,6 @@ public static void GetStream() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "UwpAot currently allows custom assembly in ResourceManager constructor")] public static void ConstructorNonRuntimeAssembly() { MockAssembly assembly = new MockAssembly(); diff --git a/src/System.Resources.ResourceManager/tests/System.Resources.ResourceManager.Tests.csproj b/src/System.Resources.ResourceManager/tests/System.Resources.ResourceManager.Tests.csproj index 22ccb671ba8b..3bb3208b0815 100644 --- a/src/System.Resources.ResourceManager/tests/System.Resources.ResourceManager.Tests.csproj +++ b/src/System.Resources.ResourceManager/tests/System.Resources.ResourceManager.Tests.csproj @@ -5,7 +5,7 @@ true true true - netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release + netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release diff --git a/src/System.Resources.Writer/tests/Configurations.props b/src/System.Resources.Writer/tests/Configurations.props index ff0d415e4593..acf56fa2750e 100644 --- a/src/System.Resources.Writer/tests/Configurations.props +++ b/src/System.Resources.Writer/tests/Configurations.props @@ -1,7 +1,8 @@  - netstandard; + netcoreapp; + uap; \ No newline at end of file diff --git a/src/System.Resources.Writer/tests/System.Resources.Writer.Tests.csproj b/src/System.Resources.Writer/tests/System.Resources.Writer.Tests.csproj index a300d43cd11f..07d287c94543 100644 --- a/src/System.Resources.Writer/tests/System.Resources.Writer.Tests.csproj +++ b/src/System.Resources.Writer/tests/System.Resources.Writer.Tests.csproj @@ -1,9 +1,8 @@ {EFA745C2-3741-4D54-B2A1-1979E43354E4} - netstandard-Debug;netstandard-Release + netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release - diff --git a/src/System.Runtime.CompilerServices.Unsafe/tests/Configurations.props b/src/System.Runtime.CompilerServices.Unsafe/tests/Configurations.props index d6385a202011..188fa1889898 100644 --- a/src/System.Runtime.CompilerServices.Unsafe/tests/Configurations.props +++ b/src/System.Runtime.CompilerServices.Unsafe/tests/Configurations.props @@ -1,7 +1,9 @@  - netstandard; + netcoreapp; + netfx; + uap; diff --git a/src/System.Runtime.CompilerServices.Unsafe/tests/System.Runtime.CompilerServices.Unsafe.Tests.csproj b/src/System.Runtime.CompilerServices.Unsafe/tests/System.Runtime.CompilerServices.Unsafe.Tests.csproj index fefbb9613f8f..8381dd935995 100644 --- a/src/System.Runtime.CompilerServices.Unsafe/tests/System.Runtime.CompilerServices.Unsafe.Tests.csproj +++ b/src/System.Runtime.CompilerServices.Unsafe/tests/System.Runtime.CompilerServices.Unsafe.Tests.csproj @@ -2,7 +2,7 @@ true {8012DD70-A6D7-45C0-BC8E-DFFB48D86E08} - netstandard-Debug;netstandard-Release + netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release;uap-Debug;uap-Release diff --git a/src/System.Runtime.CompilerServices.VisualC/tests/Configurations.props b/src/System.Runtime.CompilerServices.VisualC/tests/Configurations.props index 581054d46db4..f97cd5ea7a97 100644 --- a/src/System.Runtime.CompilerServices.VisualC/tests/Configurations.props +++ b/src/System.Runtime.CompilerServices.VisualC/tests/Configurations.props @@ -1,7 +1,8 @@  - netstandard; + netcoreapp; + uap; \ No newline at end of file diff --git a/src/System.Runtime.CompilerServices.VisualC/tests/System.Runtime.CompilerServices.VisualC.Tests.csproj b/src/System.Runtime.CompilerServices.VisualC/tests/System.Runtime.CompilerServices.VisualC.Tests.csproj index 1746fe4fbab2..664b0b24793e 100644 --- a/src/System.Runtime.CompilerServices.VisualC/tests/System.Runtime.CompilerServices.VisualC.Tests.csproj +++ b/src/System.Runtime.CompilerServices.VisualC/tests/System.Runtime.CompilerServices.VisualC.Tests.csproj @@ -2,7 +2,7 @@ true {057BF9A0-199B-4EB5-85D5-84982259C7BC} - netstandard-Debug;netstandard-Release + netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release diff --git a/src/System.Runtime.Extensions/tests/Configurations.props b/src/System.Runtime.Extensions/tests/Configurations.props index 231484cfa97c..b66a3623c610 100644 --- a/src/System.Runtime.Extensions/tests/Configurations.props +++ b/src/System.Runtime.Extensions/tests/Configurations.props @@ -3,8 +3,6 @@ netcoreapp-Windows_NT; netcoreapp-Unix; - netstandard-Windows_NT; - netstandard-Unix; uap-Windows_NT; diff --git a/src/System.Runtime.Extensions/tests/System.Runtime.Extensions.Tests.csproj b/src/System.Runtime.Extensions/tests/System.Runtime.Extensions.Tests.csproj index 3319c05a9298..38f5cf5a7052 100644 --- a/src/System.Runtime.Extensions/tests/System.Runtime.Extensions.Tests.csproj +++ b/src/System.Runtime.Extensions/tests/System.Runtime.Extensions.Tests.csproj @@ -5,14 +5,25 @@ $(DefineConstants);Unix true true - netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netstandard-Unix-Debug;netstandard-Unix-Release;netstandard-Windows_NT-Debug;netstandard-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release + netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release + + + + + + + + + + + + - @@ -20,20 +31,6 @@ - - - - - - - - - - - - - - @@ -44,8 +41,6 @@ - - @@ -124,7 +119,4 @@ TestApp - - - \ No newline at end of file diff --git a/src/System.Runtime.Extensions/tests/System/AppDomainTests.cs b/src/System.Runtime.Extensions/tests/System/AppDomainTests.cs index 6558764e9315..2898638a32da 100644 --- a/src/System.Runtime.Extensions/tests/System/AppDomainTests.cs +++ b/src/System.Runtime.Extensions/tests/System/AppDomainTests.cs @@ -44,18 +44,10 @@ public void RelativeSearchPath_Is_Null() public void TargetFrameworkTest() { string targetFrameworkName = ".NETCoreApp,Version=v2.1"; - if (PlatformDetection.IsFullFramework) - { - targetFrameworkName = ".NETFramework,Version=v4.7.2"; - } - else if (PlatformDetection.IsInAppContainer) + if (PlatformDetection.IsInAppContainer) { targetFrameworkName = ".NETCore,Version=v5.0"; } - else if (PlatformDetection.IsNetNative) - { - targetFrameworkName = ".NETCoreApp,Version=v2.0"; - } RemoteExecutor.Invoke((_targetFrameworkName) => { Assert.Contains(_targetFrameworkName, AppContext.TargetFrameworkName); @@ -133,7 +125,7 @@ public void FriendlyName() string expected = Assembly.GetEntryAssembly()?.GetName()?.Name; // GetEntryAssembly may be null (i.e. desktop) - if (expected == null || PlatformDetection.IsFullFramework) + if (expected == null) expected = Assembly.GetExecutingAssembly().GetName().Name; Assert.Equal(expected, s); @@ -249,7 +241,6 @@ public void ApplyPolicy() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public void CreateDomainNonNetfx() { AssertExtensions.Throws("friendlyName", () => { AppDomain.CreateDomain(null); }); @@ -257,15 +248,6 @@ public void CreateDomainNonNetfx() } [Fact] - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)] - public void CreateDomainNetfx() - { - Assert.Throws(() => { AppDomain.CreateDomain(null); }); - AppDomain.CreateDomain("test"); - } - - [Fact] - [ActiveIssue(21680, TargetFrameworkMonikers.UapAot)] public void ExecuteAssemblyByName() { RemoteExecutor.Invoke(() => { @@ -292,11 +274,7 @@ public void ExecuteAssembly() Assert.Throws(() => AppDomain.CurrentDomain.ExecuteAssembly("NonExistentFile.exe")); Func executeAssembly = () => AppDomain.CurrentDomain.ExecuteAssembly(name, new string[2] { "2", "3" }, null, Configuration.Assemblies.AssemblyHashAlgorithm.SHA1); - - if (PlatformDetection.IsFullFramework) - Assert.Equal(10, executeAssembly()); - else - Assert.Throws(() => executeAssembly()); + Assert.Throws(() => executeAssembly()); Assert.Equal(5, AppDomain.CurrentDomain.ExecuteAssembly(name)); Assert.Equal(10, AppDomain.CurrentDomain.ExecuteAssembly(name, new string[2] { "2", "3" })); @@ -331,7 +309,6 @@ public void SetData_SameKeyMultipleTimes_ReplacesOldValue() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Netfx is more permissive and does not throw")] public void IsCompatibilitySwitchSet() { Assert.Throws(() => { AppDomain.CurrentDomain.IsCompatibilitySwitchSet(null); }); @@ -366,10 +343,6 @@ public void toString() string actual = AppDomain.CurrentDomain.ToString(); - // NetFx has additional line endings - if (PlatformDetection.IsFullFramework) - actual = actual.Trim(); - string expected = "Name:" + AppDomain.CurrentDomain.FriendlyName + Environment.NewLine + "There are no context policies."; Assert.Equal(expected, actual); @@ -410,7 +383,6 @@ public void ReflectionOnlyGetAssemblies() Assert.Equal(0, AppDomain.CurrentDomain.ReflectionOnlyGetAssemblies().Length); } - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] [Fact] public void MonitoringIsEnabled() { @@ -434,7 +406,6 @@ public void MonitoringIsEnabled() #pragma warning disable 618 [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public void GetCurrentThreadId() { Assert.Equal(AppDomain.GetCurrentThreadId(), Environment.CurrentManagedThreadId); @@ -503,7 +474,6 @@ public void SetShadowCopyPath() #pragma warning restore 618 [Fact] [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Does not support Assembly.LoadFile")] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public void GetAssemblies() { RemoteExecutor.Invoke(() => { @@ -543,7 +513,6 @@ public void GetAssemblies() [Fact] [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Does not support Assembly.LoadFile")] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public void AssemblyLoad() { RemoteExecutor.Invoke(() => { @@ -650,7 +619,6 @@ public void AssemblyResolve_IsNotCalledForCoreLibResources() } [Fact] - [ActiveIssue(21680, TargetFrameworkMonikers.UapAot)] public void TypeResolve() { RemoteExecutor.Invoke(() => { @@ -678,8 +646,7 @@ public void TypeResolve() } [Fact] - [ActiveIssue(21680, TargetFrameworkMonikers.UapAot)] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapNotUapAot, "In UWP the resources always exist in the resources.pri file even if the assembly is not loaded")] + [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "In UWP the resources always exist in the resources.pri file even if the assembly is not loaded")] public void ResourceResolve() { RemoteExecutor.Invoke(() => { diff --git a/src/System.Runtime.Extensions/tests/System/Convert.FromBase64.cs b/src/System.Runtime.Extensions/tests/System/Convert.FromBase64.cs index ad91fd1e462b..82b56c6ab5ff 100644 --- a/src/System.Runtime.Extensions/tests/System/Convert.FromBase64.cs +++ b/src/System.Runtime.Extensions/tests/System/Convert.FromBase64.cs @@ -215,24 +215,11 @@ public static void InvalidInput() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public static void ExtraPaddingCharacter() { VerifyInvalidInput("abcdxyz=" + "="); } - [Fact] - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)] - public static void ExtraPaddingCharacterOnNetFx() - { - // This should throw a FormatException because of the extra "=". But due to a bug in NetFx, this - // gets "successfully" decoded as if it were "abcdyz==". - - byte[] actual = Convert.FromBase64String("abcdxyz=" + "="); - byte[] expected = { 0x69, 0xb7, 0x1d, 0xcb }; - Assert.Equal(expected, actual); - } - [Fact] public static void InvalidCharactersInInput() { diff --git a/src/System.Runtime.Extensions/tests/System/Convert.ToDouble.cs b/src/System.Runtime.Extensions/tests/System/Convert.ToDouble.cs index 9fc9fb656a4e..4004e642def1 100644 --- a/src/System.Runtime.Extensions/tests/System/Convert.ToDouble.cs +++ b/src/System.Runtime.Extensions/tests/System/Convert.ToDouble.cs @@ -103,15 +103,6 @@ public void FromString() } [Fact] - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)] - public void FromString_NetFramework() - { - string[] overflowValues = { Double.MaxValue.ToString(), Double.MinValue.ToString() }; - VerifyFromStringThrows(Convert.ToDouble, Convert.ToDouble, overflowValues); - } - - [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public void FromString_NotNetFramework() { string[] overflowValues = { Double.MaxValue.ToString(), Double.MinValue.ToString() }; diff --git a/src/System.Runtime.Extensions/tests/System/Convert.ToSingle.cs b/src/System.Runtime.Extensions/tests/System/Convert.ToSingle.cs index 76be149b4271..236f5131d385 100644 --- a/src/System.Runtime.Extensions/tests/System/Convert.ToSingle.cs +++ b/src/System.Runtime.Extensions/tests/System/Convert.ToSingle.cs @@ -103,15 +103,6 @@ public void FromString() } [Fact] - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)] - public void FromString_NetFramework() - { - string[] overflowValues = { Double.MinValue.ToString(), Double.MaxValue.ToString() }; - VerifyFromStringThrows(Convert.ToSingle, Convert.ToSingle, overflowValues); - } - - [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public void FromString_NotNetFramework() { string[] overflowValues = { Double.MinValue.ToString(), Double.MaxValue.ToString() }; diff --git a/src/System.Runtime.Extensions/tests/System/Convert.ToString.cs b/src/System.Runtime.Extensions/tests/System/Convert.ToString.cs index b3a9c531bc37..ef525b93d6ea 100644 --- a/src/System.Runtime.Extensions/tests/System/Convert.ToString.cs +++ b/src/System.Runtime.Extensions/tests/System/Convert.ToString.cs @@ -181,7 +181,6 @@ public static void FromBoxedObject() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public static void FromBoxedObject_NotNetFramework() { object[] testValues = @@ -210,36 +209,6 @@ public static void FromBoxedObject_NotNetFramework() } } - [Fact] - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)] - public static void FromBoxedObject_NetFramework() - { - object[] testValues = - { - // Double - -12.236465923406483, - - // Single - -1.7753e-83f, - -12.2364659234064826243f, - }; - - string[] expectedValues = - { - // Double - "-12.2364659234065", - - // Single - "0", - "-12.23647", - }; - - for (int i = 0; i < testValues.Length; i++) - { - Assert.Equal(expectedValues[i], Convert.ToString(testValues[i], NumberFormatInfo.InvariantInfo)); - } - } - [Fact] public static void FromObject() { diff --git a/src/System.Runtime.Extensions/tests/System/Environment.Exit.cs b/src/System.Runtime.Extensions/tests/System/Environment.Exit.cs index 1779846e337d..87b6fe6537b0 100644 --- a/src/System.Runtime.Extensions/tests/System/Environment.Exit.cs +++ b/src/System.Runtime.Extensions/tests/System/Environment.Exit.cs @@ -42,23 +42,14 @@ public static void ExitCode_Roundtrips(int exitCode) [InlineData(1)] // setting ExitCode and exiting Main [InlineData(2)] // setting ExitCode both from Main and from an Unloading event handler. [InlineData(3)] // using Exit(exitCode) - [ActiveIssue("https://github.com/dotnet/corefx/issues/21415", TargetFrameworkMonikers.UapNotUapAot)] - [ActiveIssue("https://github.com/dotnet/corefx/issues/20387 - ILC test pipeline does not accommodate tests in child processes built into custom assemblies.", TargetFrameworkMonikers.UapAot)] + [ActiveIssue("https://github.com/dotnet/corefx/issues/21415", TargetFrameworkMonikers.Uap)] public static void ExitCode_VoidMainAppReturnsSetValue(int mode) { int expectedExitCode = 123; const string AppName = "VoidMainWithExitCodeApp.exe"; var psi = new ProcessStartInfo(); - if (PlatformDetection.IsFullFramework || PlatformDetection.IsNetNative) - { - psi.FileName = AppName; - psi.Arguments = $"{expectedExitCode} {mode}"; - } - else - { - psi.FileName = RemoteExecutor.HostRunner; - psi.Arguments = $"{AppName} {expectedExitCode} {mode}"; - } + psi.FileName = RemoteExecutor.HostRunner; + psi.Arguments = $"{AppName} {expectedExitCode} {mode}"; using (Process p = Process.Start(psi)) { diff --git a/src/System.Runtime.Extensions/tests/System/Environment.GetEnvironmentVariable.cs b/src/System.Runtime.Extensions/tests/System/Environment.GetEnvironmentVariable.cs index d594d115d782..b758a6077a1e 100644 --- a/src/System.Runtime.Extensions/tests/System/Environment.GetEnvironmentVariable.cs +++ b/src/System.Runtime.Extensions/tests/System/Environment.GetEnvironmentVariable.cs @@ -169,7 +169,6 @@ public void GetEnumerator_IDictionaryEnumerator_YieldsDictionaryEntries() [Theory] [InlineData(null)] [MemberData(nameof(EnvironmentTests.EnvironmentVariableTargets), MemberType = typeof(EnvironmentTests))] - [ActiveIssue("https://github.com/dotnet/corefx/issues/23003", TargetFrameworkMonikers.NetFramework)] public void GetEnumerator_LinqOverDictionaryEntries_Success(EnvironmentVariableTarget? target) { IDictionary envVars = target != null ? @@ -219,12 +218,7 @@ public void EnumerateYieldsDictionaryEntryFromIEnumerable(EnvironmentVariableTar [MemberData(nameof(EnvironmentTests.EnvironmentVariableTargets), MemberType = typeof(EnvironmentTests))] public void EnumerateEnvironmentVariables(EnvironmentVariableTarget target) { - bool lookForSetValue = (target == EnvironmentVariableTarget.Process) || - // On the Project N corelib, it doesn't attempt to set machine/user environment variables; - // it just returns silently. So don't try. - (PlatformDetection.IsWindowsAndElevated && !PlatformDetection.IsNetNative); - - + bool lookForSetValue = (target == EnvironmentVariableTarget.Process) || PlatformDetection.IsWindowsAndElevated; string key = $"EnumerateEnvironmentVariables ({target})"; string value = Path.GetRandomFileName(); diff --git a/src/System.Runtime.Extensions/tests/System/Environment.SetEnvironmentVariable.cs b/src/System.Runtime.Extensions/tests/System/Environment.SetEnvironmentVariable.cs index 0fa3f766ed4a..6b41d2106017 100644 --- a/src/System.Runtime.Extensions/tests/System/Environment.SetEnvironmentVariable.cs +++ b/src/System.Runtime.Extensions/tests/System/Environment.SetEnvironmentVariable.cs @@ -35,7 +35,6 @@ public void IncorrectVariableThrowsArgument() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, ".NET Framework does not have the fix to allow arbitrary length environment variables.")] public void AllowAnyVariableLengths() { // longer than 32767 @@ -54,7 +53,6 @@ public void AllowAnyVariableLengths() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, ".NET Framework does not have the fix to allow arbitrary length environment variables.")] public void AllowAnyVariableValueLengths() { string var = "Test_SetEnvironmentVariable_AllowAnyVariableValueLengths"; @@ -74,7 +72,6 @@ public void AllowAnyVariableValueLengths() [Fact] [PlatformSpecific(TestPlatforms.Windows)] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, ".NET Framework does not have the fix to allow arbitrary length environment variables.")] public void EnvironmentVariableTooLarge_Throws() { RemoteExecutor.Invoke(() => @@ -110,7 +107,6 @@ public void EnvironmentVariableTooLarge_Throws() [Fact] [PlatformSpecific(TestPlatforms.Windows)] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, ".NET Framework does not have the fix to allow arbitrary length environment variables.")] public void EnvironmentVariableValueTooLarge_Throws() { RemoteExecutor.Invoke(() => diff --git a/src/System.Runtime.Extensions/tests/System/Environment.StackTrace.cs b/src/System.Runtime.Extensions/tests/System/Environment.StackTrace.cs index d33208977502..c74c33c2fd4f 100644 --- a/src/System.Runtime.Extensions/tests/System/Environment.StackTrace.cs +++ b/src/System.Runtime.Extensions/tests/System/Environment.StackTrace.cs @@ -16,7 +16,6 @@ public class EnvironmentStackTrace static string s_stackTrace; [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "UapAot does not support nice stack traces. It's for people who like performance.")] public void StackTraceTest() { //arrange @@ -69,8 +68,6 @@ public TestClass() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "On Desktop, Environment.StackTrace contains internal frames")] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "UapAot does not support nice stack traces. It's for people who like performance.")] public void StackTraceDoesNotStartWithInternalFrame() { string stackTrace = Environment.StackTrace; diff --git a/src/System.Runtime.Extensions/tests/System/EnvironmentTests.cs b/src/System.Runtime.Extensions/tests/System/EnvironmentTests.cs index d561ea444fa2..e331f78ba117 100644 --- a/src/System.Runtime.Extensions/tests/System/EnvironmentTests.cs +++ b/src/System.Runtime.Extensions/tests/System/EnvironmentTests.cs @@ -216,7 +216,6 @@ public void FailFast_ExpectFailureExitCode() } [Trait(XunitConstants.Category, XunitConstants.IgnoreForCI)] // fail fast crashes the process - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Full framework does not have dotnet/coreclr#16622")] [ActiveIssue("29869", TargetFrameworkMonikers.Uap)] [Fact] public void FailFast_ExceptionStackTrace_ArgumentException() @@ -240,7 +239,6 @@ public void FailFast_ExceptionStackTrace_ArgumentException() } [Trait(XunitConstants.Category, XunitConstants.IgnoreForCI)] // fail fast crashes the process - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Full framework does not have dotnet/coreclr#16622")] [ActiveIssue("29869", TargetFrameworkMonikers.Uap)] [Fact] public void FailFast_ExceptionStackTrace_StackOverflowException() @@ -265,7 +263,6 @@ public void FailFast_ExceptionStackTrace_StackOverflowException() } [Trait(XunitConstants.Category, XunitConstants.IgnoreForCI)] // fail fast crashes the process - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Full framework does not have dotnet/coreclr#16622")] [ActiveIssue("29869", TargetFrameworkMonikers.Uap)] [Fact] public void FailFast_ExceptionStackTrace_InnerException() @@ -487,7 +484,7 @@ private void AssertDirectoryExists(string path) [InlineData(Environment.SpecialFolder.SystemX86)] [InlineData(Environment.SpecialFolder.Windows)] [PlatformSpecific(TestPlatforms.Windows)] // Tests OS-specific environment - [SkipOnTargetFramework(TargetFrameworkMonikers.Uap | TargetFrameworkMonikers.UapAot)] // Don't run on UAP + [SkipOnTargetFramework(TargetFrameworkMonikers.Uap)] // Don't run on UAP public unsafe void GetFolderPath_Windows(Environment.SpecialFolder folder) { string knownFolder = Environment.GetFolderPath(folder); diff --git a/src/System.Runtime.Extensions/tests/System/IO/PathTests_Combine.cs b/src/System.Runtime.Extensions/tests/System/IO/PathTests_Combine.cs index 382732253fc6..4a4874bb8197 100644 --- a/src/System.Runtime.Extensions/tests/System/IO/PathTests_Combine.cs +++ b/src/System.Runtime.Extensions/tests/System/IO/PathTests_Combine.cs @@ -88,7 +88,6 @@ public static IEnumerable Combine_CommonCases_TestData() [Theory] [MemberData(nameof(Combine_Basic_TestData))] [MemberData(nameof(Combine_CommonCases_TestData))] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "New Wildcards support added on Core hasn't ported to NETFX. https://github.com/dotnet/corefx/pull/8669")] public static void Combine(string[] paths) { string expected = string.Empty; @@ -135,14 +134,6 @@ public static void PathIsNullWihtoutRooted() } [Fact] - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)] - public static void ContainsInvalidCharWithoutRooted() - { - CommonCasesException("ab\0cd"); - } - - [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public static void ContainsInvalidCharWithoutRooted_Core() { Assert.Equal("ab\0cd", Path.Combine("ab\0cd")); @@ -150,19 +141,6 @@ public static void ContainsInvalidCharWithoutRooted_Core() [Fact] [PlatformSpecific(TestPlatforms.Windows)] // Tests Windows-specific invalid paths - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)] - public static void ContainsInvalidCharWithoutRooted_Windows() - { - //any path contains invalid character without rooted after (AE) - CommonCasesException("ab|cd"); - CommonCasesException("ab\bcd"); - CommonCasesException("ab\0cd"); - CommonCasesException("ab\tcd"); - } - - [Fact] - [PlatformSpecific(TestPlatforms.Windows)] // Tests Windows-specific invalid paths - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public static void ContainsInvalidCharWithoutRooted_Windows_Core() { Assert.Equal("ab|cd", Path.Combine("ab|cd")); @@ -172,15 +150,6 @@ public static void ContainsInvalidCharWithoutRooted_Windows_Core() } [Fact] - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)] - public static void ContainsInvalidCharWithRooted() - { - //any path contains invalid character with rooted after (AE) - CommonCasesException("ab\0cd", s_separator + "abc"); - } - - [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public static void ContainsInvalidCharWithRooted_Core() { Assert.Equal(s_separator + "abc", Path.Combine("ab\0cd", s_separator + "abc")); @@ -188,18 +157,6 @@ public static void ContainsInvalidCharWithRooted_Core() [Fact] [PlatformSpecific(TestPlatforms.Windows)] // Tests Windows-specific invalid paths - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)] - public static void ContainsInvalidCharWithRooted_Windows() - { - //any path contains invalid character with rooted after (AE) - CommonCasesException("ab|cd", s_separator + "abc"); - CommonCasesException("ab\bcd", s_separator + "abc"); - CommonCasesException("ab\tcd", s_separator + "abc"); - } - - [Fact] - [PlatformSpecific(TestPlatforms.Windows)] // Tests Windows-specific invalid paths - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public static void ContainsInvalidCharWithRooted_Windows_core() { Assert.Equal(s_separator + "abc", Path.Combine("ab|cd", s_separator + "abc")); diff --git a/src/System.Runtime.Extensions/tests/System/IO/PathTests_Windows_NetFX.cs b/src/System.Runtime.Extensions/tests/System/IO/PathTests_Windows_NetFX.cs deleted file mode 100644 index 56dee5db9db3..000000000000 --- a/src/System.Runtime.Extensions/tests/System/IO/PathTests_Windows_NetFX.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using Xunit; - -namespace System.IO.Tests -{ - [PlatformSpecific(TestPlatforms.Windows)] - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)] - public class PathTests_Windows_NetFX : PathTestsBase - { - [Theory, - MemberData(nameof(TestData_EmbeddedNull)), - MemberData(nameof(TestData_EmptyString)), - MemberData(nameof(TestData_ControlChars))] - public void GetDirectoryName_ArgumentExceptions(string path) - { - // In NetFX we normalize and check invalid path chars - AssertExtensions.Throws("path", null, () => Path.GetDirectoryName(path)); - } - - [Theory, - MemberData(nameof(TestData_ControlChars)), - MemberData(nameof(TestData_EmbeddedNull))] - public void IsPathRooted_ArgumentExceptions(string path) - { - // In NetFX we check invalid path chars - AssertExtensions.Throws("path", null, () => Path.IsPathRooted(path)); - } - - [Theory, - MemberData(nameof(TestData_Spaces)), - MemberData(nameof(TestData_UnicodeWhiteSpace)), - MemberData(nameof(TestData_EmptyString))] - public void IsPathRooted_NegativeCases(string path) - { - Assert.False(Path.IsPathRooted(path)); - } - - [Theory, - MemberData(nameof(TestData_InvalidDriveLetters)), - MemberData(nameof(TestData_ValidDriveLetters))] - public void IsPathRooted(string path) - { - Assert.True(Path.IsPathRooted(path)); - } - - [Theory, - InlineData(@" C:\dir\baz", @"C:\dir"), - InlineData(@" C:\dir\baz", @"C:\dir")] - public void GetDirectoryName_SkipSpaces(string path, string expected) - { - // In very specific cases we would trim leading spaces - Assert.Equal(expected, Path.GetDirectoryName(path)); - } - - [Fact] - public void GetPathRoot_EmptyThrows_Desktop() - { - AssertExtensions.Throws("path", null, () => Path.GetPathRoot(string.Empty)); - } - - [Fact] - public void GetInvalidPathChars() - { - Assert.All(Path.GetInvalidPathChars(), c => - { - string bad = c.ToString(); - AssertExtensions.Throws("path", null, () => Path.ChangeExtension(bad, "ok")); - AssertExtensions.Throws("path", null, () => Path.Combine(bad, "ok")); - AssertExtensions.Throws("path", null, () => Path.Combine("ok", "ok", bad)); - AssertExtensions.Throws("path", null, () => Path.Combine("ok", "ok", bad, "ok")); - AssertExtensions.Throws("path", null, () => Path.Combine(bad, bad, bad, bad, bad)); - AssertExtensions.Throws("path", null, () => Path.GetDirectoryName(bad)); - AssertExtensions.Throws("path", null, () => Path.GetExtension(bad)); - AssertExtensions.Throws("path", null, () => Path.GetFileName(bad)); - AssertExtensions.Throws("path", null, () => Path.GetFileNameWithoutExtension(bad)); - AssertExtensions.Throws(c == 124 ? null : "path", null, () => Path.GetFullPath(bad)); - AssertExtensions.Throws("path", null, () => Path.GetPathRoot(bad)); - AssertExtensions.Throws("path", null, () => Path.IsPathRooted(bad)); - }); - } - - [Theory, MemberData(nameof(TestData_NonDriveColonPaths))] - public void GetFullPath_NotSupportedColons(string path) - { - // Throws via our invalid colon filtering (as part of FileIOPermissions) - AssertExtensions.ThrowsAny(() => Path.GetFullPath(path)); - } - - [Theory, - MemberData(nameof(TestData_Wildcards)), - MemberData(nameof(TestData_ExtendedWildcards))] - public void GetFullPath_Wildcards(char wildcard) - { - AssertExtensions.Throws("path", null, () => Path.GetFullPath("test" + wildcard + "ing")); - } - - [Theory, MemberData(nameof(TestData_InvalidUnc))] - public void GetFullPath_UNC_Invalid(string invalidPath) - { - AssertExtensions.Throws(null, () => Path.GetFullPath(invalidPath)); - } - } -} diff --git a/src/System.Runtime.Extensions/tests/System/MarshalByRefObjectTest.cs b/src/System.Runtime.Extensions/tests/System/MarshalByRefObjectTest.cs index 6d7b7ecbbbd2..adb3bea629e1 100644 --- a/src/System.Runtime.Extensions/tests/System/MarshalByRefObjectTest.cs +++ b/src/System.Runtime.Extensions/tests/System/MarshalByRefObjectTest.cs @@ -12,7 +12,6 @@ namespace System.Tests public class MarshalByRefObjectTest : MarshalByRefObject { [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public static void MarshalByRefObjectTests() { var obj = new MarshalByRefObjectTest(); diff --git a/src/System.Runtime.Extensions/tests/System/Math.cs b/src/System.Runtime.Extensions/tests/System/Math.cs index c7ff12f1d066..d6ab5f342229 100644 --- a/src/System.Runtime.Extensions/tests/System/Math.cs +++ b/src/System.Runtime.Extensions/tests/System/Math.cs @@ -687,23 +687,11 @@ public static void Atan2(double y, double x, double expectedResult, double allow [InlineData( double.NegativeInfinity, double.PositiveInfinity, -0.78539816339744831, CrossPlatformMachineEpsilon)] // expected: -(pi / 4) [InlineData( double.PositiveInfinity, double.NegativeInfinity, 2.3561944901923449, CrossPlatformMachineEpsilon * 10)] // expected: (3 * pi / 4) [InlineData( double.PositiveInfinity, double.PositiveInfinity, 0.78539816339744831, CrossPlatformMachineEpsilon)] // expected: (pi / 4) - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public static void Atan2_IEEE(double y, double x, double expectedResult, double allowedVariance) { AssertEqual(expectedResult, Math.Atan2(y, x), allowedVariance); } - [Theory] - [InlineData( double.NegativeInfinity, double.NegativeInfinity, double.NaN, 0.0)] - [InlineData( double.NegativeInfinity, double.PositiveInfinity, double.NaN, 0.0)] - [InlineData( double.PositiveInfinity, double.NegativeInfinity, double.NaN, 0.0)] - [InlineData( double.PositiveInfinity, double.PositiveInfinity, double.NaN, 0.0)] - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)] - public static void Atan2_IEEE_Legacy(double y, double x, double expectedResult, double allowedVariance) - { - AssertEqual(expectedResult, Math.Atan2(y, x), allowedVariance); - } - [Fact] public static void Ceiling_Decimal() { @@ -752,7 +740,6 @@ public static void Ceiling_Double(double value, double expectedResult, double al [InlineData(-0.63661977236758134, -0.0, 0.0)] // value: -(2 / pi) [InlineData(-0.43429448190325183, -0.0, 0.0)] // value: -(log10(e)) [InlineData(-0.31830988618379067, -0.0, 0.0)] // value: -(1 / pi) - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public static void Ceiling_Double_IEEE(double value, double expectedResult, double allowedVariance) { AssertEqual(expectedResult, Math.Ceiling(value), allowedVariance); @@ -923,7 +910,6 @@ public static void Floor_Double(double value, double expectedResult, double allo [Theory] [InlineData(-0.0, -0.0, 0.0)] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public static void Floor_Double_IEEE(double value, double expectedResult, double allowedVariance) { AssertEqual(expectedResult, Math.Floor(value), allowedVariance); @@ -1062,17 +1048,6 @@ public static void Max_Decimal() Assert.Equal(decimal.MaxValue, Math.Max(decimal.MinValue, decimal.MaxValue)); } - [Fact] - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)] - public static void Max_Double_NetFramework() - { - Assert.Equal(3.0, Math.Max(3.0, -2.0)); - Assert.Equal(double.MaxValue, Math.Max(double.MinValue, double.MaxValue)); - Assert.Equal(double.PositiveInfinity, Math.Max(double.NegativeInfinity, double.PositiveInfinity)); - Assert.Equal(double.NaN, Math.Max(double.PositiveInfinity, double.NaN)); - Assert.Equal(double.NaN, Math.Max(double.NaN, double.NaN)); - } - [Theory] [InlineData(double.NegativeInfinity, double.PositiveInfinity, double.PositiveInfinity)] [InlineData(double.MinValue, double.MaxValue, double.MaxValue)] @@ -1081,7 +1056,6 @@ public static void Max_Double_NetFramework() [InlineData(2.0, -3.0, 2.0)] [InlineData(3.0, -2.0, 3.0)] [InlineData(double.PositiveInfinity, double.NaN, double.NaN)] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public static void Max_Double_NotNetFramework(double x, double y, double expectedResult) { AssertEqual(expectedResult, Math.Max(x, y), 0.0); @@ -1115,17 +1089,6 @@ public static void Max_SByte() Assert.Equal(sbyte.MaxValue, Math.Max(sbyte.MinValue, sbyte.MaxValue)); } - [Fact] - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)] - public static void Max_Single_NetFramework() - { - Assert.Equal(3.0f, Math.Max(3.0f, -2.0f)); - Assert.Equal(float.MaxValue, Math.Max(float.MinValue, float.MaxValue)); - Assert.Equal(float.PositiveInfinity, Math.Max(float.NegativeInfinity, float.PositiveInfinity)); - Assert.Equal(float.NaN, Math.Max(float.PositiveInfinity, float.NaN)); - Assert.Equal(float.NaN, Math.Max(float.NaN, float.NaN)); - } - [Theory] [InlineData(float.NegativeInfinity, float.PositiveInfinity, float.PositiveInfinity)] [InlineData(float.MinValue, float.MaxValue, float.MaxValue)] @@ -1134,7 +1097,6 @@ public static void Max_Single_NetFramework() [InlineData(2.0f, -3.0f, 2.0f)] [InlineData(3.0f, -2.0f, 3.0f)] [InlineData(float.PositiveInfinity, float.NaN, float.NaN)] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public static void Max_Single_NotNetFramework(float x, float y, float expectedResult) { AssertEqual(expectedResult, Math.Max(x, y), 0.0f); @@ -1175,17 +1137,6 @@ public static void Min_Decimal() Assert.Equal(decimal.MinValue, Math.Min(decimal.MinValue, decimal.MaxValue)); } - [Fact] - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)] - public static void Min_Double_NetFramework() - { - Assert.Equal(-2.0, Math.Min(3.0, -2.0)); - Assert.Equal(double.MinValue, Math.Min(double.MinValue, double.MaxValue)); - Assert.Equal(double.NegativeInfinity, Math.Min(double.NegativeInfinity, double.PositiveInfinity)); - Assert.Equal(double.NaN, Math.Min(double.NegativeInfinity, double.NaN)); - Assert.Equal(double.NaN, Math.Min(double.NaN, double.NaN)); - } - [Theory] [InlineData(double.NegativeInfinity, double.PositiveInfinity, double.NegativeInfinity)] [InlineData(double.MinValue, double.MaxValue, double.MinValue)] @@ -1194,7 +1145,6 @@ public static void Min_Double_NetFramework() [InlineData(2.0, -3.0, -3.0)] [InlineData(3.0, -2.0, -2.0)] [InlineData(double.PositiveInfinity, double.NaN, double.NaN)] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public static void Min_Double_NotNetFramework(double x, double y, double expectedResult) { AssertEqual(expectedResult, Math.Min(x, y), 0.0); @@ -1228,17 +1178,6 @@ public static void Min_SByte() Assert.Equal(sbyte.MinValue, Math.Min(sbyte.MinValue, sbyte.MaxValue)); } - [Fact] - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)] - public static void Min_Single_NetFramework() - { - Assert.Equal(-2.0f, Math.Min(3.0f, -2.0f)); - Assert.Equal(float.MinValue, Math.Min(float.MinValue, float.MaxValue)); - Assert.Equal(float.NegativeInfinity, Math.Min(float.NegativeInfinity, float.PositiveInfinity)); - Assert.Equal(float.NaN, Math.Min(float.NegativeInfinity, float.NaN)); - Assert.Equal(float.NaN, Math.Min(float.NaN, float.NaN)); - } - [Theory] [InlineData(float.NegativeInfinity, float.PositiveInfinity, float.NegativeInfinity)] [InlineData(float.MinValue, float.MaxValue, float.MinValue)] @@ -1247,7 +1186,6 @@ public static void Min_Single_NetFramework() [InlineData(2.0f, -3.0f, -3.0f)] [InlineData(3.0f, -2.0f, -2.0f)] [InlineData(float.PositiveInfinity, float.NaN, float.NaN)] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public static void Min_Single_NotNetFramework(float x, float y, float expectedResult) { AssertEqual(expectedResult, Math.Min(x, y), 0.0f); @@ -1438,24 +1376,11 @@ public static void Pow(double x, double y, double expectedResult, double allowed [InlineData( double.NaN, -0.0, 1.0, CrossPlatformMachineEpsilon * 10)] [InlineData( double.NaN, 0.0, 1.0, CrossPlatformMachineEpsilon * 10)] [InlineData( 1.0, double.NaN, 1.0, CrossPlatformMachineEpsilon * 10)] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public static void Pow_IEEE(float x, float y, float expectedResult, float allowedVariance) { AssertEqual(expectedResult, Math.Pow(x, y), allowedVariance); } - [Theory] - [InlineData(-1.0, double.NegativeInfinity, double.NaN, 0.0)] - [InlineData(-1.0, double.PositiveInfinity, double.NaN, 0.0)] - [InlineData( double.NaN, -0.0, double.NaN, 0.0)] - [InlineData( double.NaN, 0.0, double.NaN, 0.0)] - [InlineData( 1.0, double.NaN, double.NaN, 0.0)] - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)] - public static void Pow_IEEE_Legacy(float x, float y, float expectedResult, float allowedVariance) - { - AssertEqual(expectedResult, Math.Pow(x, y), allowedVariance); - } - [Fact] public static void Round_Decimal() { @@ -1723,21 +1648,11 @@ public static void Tan(double value, double expectedResult, double allowedVarian [Theory] [InlineData(-1.5707963267948966, -16331239353195370.0, 0.0)] // value: -(pi / 2) [InlineData( 1.5707963267948966, 16331239353195370.0, 0.0)] // value: (pi / 2) - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public static void Tan_PiOver2(double value, double expectedResult, double allowedVariance) { AssertEqual(expectedResult, Math.Tan(value), allowedVariance); } - [Theory] - [InlineData(-1.5707963267948966, -16331778728383844.0, 0.0)] // value: -(pi / 2) - [InlineData( 1.5707963267948966, 16331778728383844.0, 0.0)] // value: (pi / 2) - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)] - public static void Tan_PiOver2_Legacy(double value, double expectedResult, double allowedVariance) - { - AssertEqual(expectedResult, Math.Tan(value), allowedVariance); - } - [Theory] [InlineData( double.NegativeInfinity, -1.0, CrossPlatformMachineEpsilon * 10)] [InlineData(-3.1415926535897932, -0.99627207622074994, CrossPlatformMachineEpsilon)] // value: -(pi) diff --git a/src/System.Runtime.Extensions/tests/System/MathF.netcoreapp.cs b/src/System.Runtime.Extensions/tests/System/MathF.netcoreapp.cs index 89836e9c3a05..fe79fb879691 100644 --- a/src/System.Runtime.Extensions/tests/System/MathF.netcoreapp.cs +++ b/src/System.Runtime.Extensions/tests/System/MathF.netcoreapp.cs @@ -498,23 +498,11 @@ public static void Atan2(float y, float x, float expectedResult, float allowedVa [InlineData( float.NegativeInfinity, float.PositiveInfinity, -0.785398163f, CrossPlatformMachineEpsilon)] // expected: -(pi / 4) [InlineData( float.PositiveInfinity, float.NegativeInfinity, 2.35619449f, CrossPlatformMachineEpsilon * 10)] // expected: (3 * pi / 4 [InlineData( float.PositiveInfinity, float.PositiveInfinity, 0.785398163f, CrossPlatformMachineEpsilon)] // expected: (pi / 4) - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public static void Atan2_IEEE(float y, float x, float expectedResult, float allowedVariance) { AssertEqual(expectedResult, MathF.Atan2(y, x), allowedVariance); } - [Theory] - [InlineData( float.NegativeInfinity, float.NegativeInfinity, float.NaN, 0.0f)] - [InlineData( float.NegativeInfinity, float.PositiveInfinity, float.NaN, 0.0f)] - [InlineData( float.PositiveInfinity, float.NegativeInfinity, float.NaN, 0.0f)] - [InlineData( float.PositiveInfinity, float.PositiveInfinity, float.NaN, 0.0f)] - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)] - public static void Atan2_IEEE_Legacy(float y, float x, float expectedResult, float allowedVariance) - { - AssertEqual(expectedResult, MathF.Atan2(y, x), allowedVariance); - } - [Theory] [InlineData( float.NegativeInfinity, float.NaN, 0.0f)] [InlineData(-3.14159265f, float.NaN, 0.0f)] // value: -(pi) @@ -1409,24 +1397,11 @@ public static void Pow(float x, float y, float expectedResult, float allowedVari [InlineData( float.NaN, -0.0f, 1.0f, CrossPlatformMachineEpsilon * 10)] [InlineData( float.NaN, 0.0f, 1.0f, CrossPlatformMachineEpsilon * 10)] [InlineData( 1.0f, float.NaN, 1.0f, CrossPlatformMachineEpsilon * 10)] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public static void Pow_IEEE(float x, float y, float expectedResult, float allowedVariance) { AssertEqual(expectedResult, MathF.Pow(x, y), allowedVariance); } - [Theory] - [InlineData(-1.0f, float.NegativeInfinity, float.NaN, 0.0f)] - [InlineData(-1.0f, float.PositiveInfinity, float.NaN, 0.0f)] - [InlineData( float.NaN,-0.0f, float.NaN, 0.0f)] - [InlineData( float.NaN, 0.0f, float.NaN, 0.0f)] - [InlineData( 1.0f, float.NaN, float.NaN, 0.0f)] - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)] - public static void Pow_IEEE_Legacy(float x, float y, float expectedResult, float allowedVariance) - { - AssertEqual(expectedResult, MathF.Pow(x, y), allowedVariance); - } - public static IEnumerable Round_Digits_TestData { get diff --git a/src/System.Runtime.Extensions/tests/System/Reflection/AssemblyNameProxyTests.cs b/src/System.Runtime.Extensions/tests/System/Reflection/AssemblyNameProxyTests.cs index 150fe30352a5..be4eac32c26c 100644 --- a/src/System.Runtime.Extensions/tests/System/Reflection/AssemblyNameProxyTests.cs +++ b/src/System.Runtime.Extensions/tests/System/Reflection/AssemblyNameProxyTests.cs @@ -14,7 +14,6 @@ namespace System.Reflection.Tests public static class AssemblyNameProxyTests { [Fact] - [ActiveIssue("https://github.com/dotnet/corert/issues/3253 - AssemblyName.GetAssemblyName(string file) not supported on UapAot", TargetFrameworkMonikers.UapAot)] public static void GetAssemblyName_AssemblyNameProxy() { AssemblyNameProxy anp = new AssemblyNameProxy(); diff --git a/src/System.Runtime.Extensions/tests/System/Runtime/Versioning/VersioningHelperTests.cs b/src/System.Runtime.Extensions/tests/System/Runtime/Versioning/VersioningHelperTests.cs index 0554c9026a42..18d7ae778b5e 100644 --- a/src/System.Runtime.Extensions/tests/System/Runtime/Versioning/VersioningHelperTests.cs +++ b/src/System.Runtime.Extensions/tests/System/Runtime/Versioning/VersioningHelperTests.cs @@ -10,15 +10,10 @@ namespace System.Runtime.Versioning.Tests public static class VersioningHelperTests { [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "r3 suffix is hardcoded in .NET Core and return code is not documented")] public static void MakeVersionSafeNameTest() { string str1 = VersioningHelper.MakeVersionSafeName("TestFile", ResourceScope.Process, ResourceScope.AppDomain); -#if uapaot - Assert.NotNull(str1); -#else Assert.Equal($"TestFile_r3_ad{AppDomain.CurrentDomain.Id}", str1); -#endif } } } diff --git a/src/System.Runtime.Extensions/tests/System/StringComparer.cs b/src/System.Runtime.Extensions/tests/System/StringComparer.cs index a7da501da169..284440ba253c 100644 --- a/src/System.Runtime.Extensions/tests/System/StringComparer.cs +++ b/src/System.Runtime.Extensions/tests/System/StringComparer.cs @@ -27,7 +27,6 @@ public static void TestOrdinal() } [Fact] - [ActiveIssue(27098, TargetFrameworkMonikers.NetFramework)] public static void TestOrdinal_EmbeddedNull_ReturnsDifferentHashCodes() { StringComparer sc = StringComparer.Ordinal; diff --git a/src/System.Runtime.Handles/tests/Configurations.props b/src/System.Runtime.Handles/tests/Configurations.props index 581054d46db4..f97cd5ea7a97 100644 --- a/src/System.Runtime.Handles/tests/Configurations.props +++ b/src/System.Runtime.Handles/tests/Configurations.props @@ -1,7 +1,8 @@  - netstandard; + netcoreapp; + uap; \ No newline at end of file diff --git a/src/System.Runtime.Handles/tests/System.Runtime.Handles.Tests.csproj b/src/System.Runtime.Handles/tests/System.Runtime.Handles.Tests.csproj index 4b3caab721b5..1ed2894f479f 100644 --- a/src/System.Runtime.Handles/tests/System.Runtime.Handles.Tests.csproj +++ b/src/System.Runtime.Handles/tests/System.Runtime.Handles.Tests.csproj @@ -1,7 +1,7 @@ {9C77C3CA-7067-4D45-BDFE-CC62AB5C1ED5} - netstandard-Debug;netstandard-Release + netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release true diff --git a/src/System.Runtime.InteropServices.RuntimeInformation/tests/Configurations.props b/src/System.Runtime.InteropServices.RuntimeInformation/tests/Configurations.props index 07ecbe269b53..3f19907aa644 100644 --- a/src/System.Runtime.InteropServices.RuntimeInformation/tests/Configurations.props +++ b/src/System.Runtime.InteropServices.RuntimeInformation/tests/Configurations.props @@ -1,9 +1,9 @@  - netstandard-Unix; - netstandard-Windows_NT; + netcoreapp-Windows_NT; netcoreapp-Unix; + uap-Windows_NT; diff --git a/src/System.Runtime.InteropServices.RuntimeInformation/tests/DescriptionNameTests.cs b/src/System.Runtime.InteropServices.RuntimeInformation/tests/DescriptionNameTests.cs index 8c2acaf8e5ad..660719dae3c4 100644 --- a/src/System.Runtime.InteropServices.RuntimeInformation/tests/DescriptionNameTests.cs +++ b/src/System.Runtime.InteropServices.RuntimeInformation/tests/DescriptionNameTests.cs @@ -30,12 +30,9 @@ public void DumpRuntimeInformationToConsole() Console.WriteLine($"### FRAMEWORK: Version={Environment.Version} Description={RuntimeInformation.FrameworkDescription.Trim()}"); - if (!PlatformDetection.IsNetNative) - { - string binariesLocation = Path.GetDirectoryName(typeof(object).Assembly.Location); - string binariesLocationFormat = PlatformDetection.IsInAppContainer ? "Unknown" : new DriveInfo(binariesLocation).DriveFormat; - Console.WriteLine($"### BINARIES: {binariesLocation} (drive format {binariesLocationFormat})"); - } + string binariesLocation = Path.GetDirectoryName(typeof(object).Assembly.Location); + string binariesLocationFormat = PlatformDetection.IsInAppContainer ? "Unknown" : new DriveInfo(binariesLocation).DriveFormat; + Console.WriteLine($"### BINARIES: {binariesLocation} (drive format {binariesLocationFormat})"); string tempPathLocation = Path.GetTempPath(); string tempPathLocationFormat = PlatformDetection.IsInAppContainer ? "Unknown" : new DriveInfo(tempPathLocation).DriveFormat; @@ -146,14 +143,6 @@ public void VerifyRuntimeNameOnNetCoreApp() Assert.Same(RuntimeInformation.FrameworkDescription, RuntimeInformation.FrameworkDescription); } - [Fact] - [SkipOnTargetFramework(~TargetFrameworkMonikers.UapAot)] - public void VerifyRuntimeNameOnNetNative() - { - Assert.True(RuntimeInformation.FrameworkDescription.StartsWith(".NET Native"), RuntimeInformation.FrameworkDescription); - Assert.Same(RuntimeInformation.FrameworkDescription, RuntimeInformation.FrameworkDescription); - } - [Fact] public void VerifyOSDescription() { @@ -162,7 +151,6 @@ public void VerifyOSDescription() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] [PlatformSpecific(TestPlatforms.Windows)] public void VerifyWindowsDescriptionDoesNotContainTrailingWhitespace() { diff --git a/src/System.Runtime.InteropServices.RuntimeInformation/tests/System.Runtime.InteropServices.RuntimeInformation.Tests.csproj b/src/System.Runtime.InteropServices.RuntimeInformation/tests/System.Runtime.InteropServices.RuntimeInformation.Tests.csproj index 8736afdb3778..ba1b71caa4a4 100644 --- a/src/System.Runtime.InteropServices.RuntimeInformation/tests/System.Runtime.InteropServices.RuntimeInformation.Tests.csproj +++ b/src/System.Runtime.InteropServices.RuntimeInformation/tests/System.Runtime.InteropServices.RuntimeInformation.Tests.csproj @@ -1,12 +1,12 @@ {9B4D1DA9-AA4C-428F-9F66-D45C924025A5} - netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netstandard-Unix-Debug;netstandard-Unix-Release;netstandard-Windows_NT-Debug;netstandard-Windows_NT-Release + netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release - + Common\Interop\Linux\Interop.cgroups.cs diff --git a/src/System.Runtime.InteropServices.WindowsRuntime/tests/Configurations.props b/src/System.Runtime.InteropServices.WindowsRuntime/tests/Configurations.props index 5fba4d1a181e..274ba6b7eef2 100644 --- a/src/System.Runtime.InteropServices.WindowsRuntime/tests/Configurations.props +++ b/src/System.Runtime.InteropServices.WindowsRuntime/tests/Configurations.props @@ -1,7 +1,6 @@  - uapaot-Windows_NT; netcoreapp-Windows_NT; netcoreapp; uap-Windows_NT; diff --git a/src/System.Runtime.InteropServices.WindowsRuntime/tests/System.Runtime.InteropServices.WindowsRuntime.Tests.csproj b/src/System.Runtime.InteropServices.WindowsRuntime/tests/System.Runtime.InteropServices.WindowsRuntime.Tests.csproj index 7f962be03db2..262162556880 100644 --- a/src/System.Runtime.InteropServices.WindowsRuntime/tests/System.Runtime.InteropServices.WindowsRuntime.Tests.csproj +++ b/src/System.Runtime.InteropServices.WindowsRuntime/tests/System.Runtime.InteropServices.WindowsRuntime.Tests.csproj @@ -1,7 +1,7 @@ {27F624C8-06E3-455D-B5D1-C0FEB343EFAA} - netcoreapp-Debug;netcoreapp-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release;uapaot-Windows_NT-Debug;uapaot-Windows_NT-Release + netcoreapp-Debug;netcoreapp-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release true diff --git a/src/System.Runtime.InteropServices.WindowsRuntime/tests/System/Runtime/InteropServices/WindowsRuntime/WindowsRuntimeMarshalTests.cs b/src/System.Runtime.InteropServices.WindowsRuntime/tests/System/Runtime/InteropServices/WindowsRuntime/WindowsRuntimeMarshalTests.cs index 0fef0d71e7b0..fb6311f6c4c3 100644 --- a/src/System.Runtime.InteropServices.WindowsRuntime/tests/System/Runtime/InteropServices/WindowsRuntime/WindowsRuntimeMarshalTests.cs +++ b/src/System.Runtime.InteropServices.WindowsRuntime/tests/System/Runtime/InteropServices/WindowsRuntime/WindowsRuntimeMarshalTests.cs @@ -312,7 +312,6 @@ public void GetActivationFactory_NullType_ThrowsArgumentNullException() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "No reliable way to check if a type is WinRT in AOT")] public void GetActivationFactory_NotExportedType_ThrowsArgumentException() { AssertExtensions.Throws("type", () => WindowsRuntimeMarshal.GetActivationFactory(typeof(int))); diff --git a/src/System.Runtime.InteropServices/tests/Configurations.props b/src/System.Runtime.InteropServices/tests/Configurations.props index 6820973243aa..033798d1210a 100644 --- a/src/System.Runtime.InteropServices/tests/Configurations.props +++ b/src/System.Runtime.InteropServices/tests/Configurations.props @@ -1,10 +1,9 @@  - netstandard; + netcoreapp; netcoreapp-Windows_NT; netcoreapp-Unix; - netfx-Windows_NT; uap-Windows_NT; diff --git a/src/System.Runtime.InteropServices/tests/System.Runtime.InteropServices.Tests.csproj b/src/System.Runtime.InteropServices/tests/System.Runtime.InteropServices.Tests.csproj index 0de8c8b83637..5f134d8bf763 100644 --- a/src/System.Runtime.InteropServices/tests/System.Runtime.InteropServices.Tests.csproj +++ b/src/System.Runtime.InteropServices/tests/System.Runtime.InteropServices.Tests.csproj @@ -2,7 +2,7 @@ {A824F4CD-935B-4496-A1B2-C3664936DA7B} true - netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netfx-Windows_NT-Debug;netfx-Windows_NT-Release;netstandard-Debug;netstandard-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release + netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netcoreapp-Debug;netcoreapp-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release true @@ -151,8 +151,6 @@ - - diff --git a/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/ArrayWithOffsetTests.cs b/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/ArrayWithOffsetTests.cs index c6d584489d14..779dbe36b301 100644 --- a/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/ArrayWithOffsetTests.cs +++ b/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/ArrayWithOffsetTests.cs @@ -44,7 +44,6 @@ public void Ctor_MultidimensionalArray_ThrowsArgumentException() [InlineData(null, 1)] [InlineData(new int[] { 1 }, 5)] [InlineData(new int[] { 2 }, -1)] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "The fix was made in coreclr that is not in netfx. See https://github.com/dotnet/corefx/issues/34699")] public void Ctor_InvalidOffset_ThrowsIndexOutOfRangeException(object array, int offset) { Assert.Throws(() => new ArrayWithOffset(array, offset)); diff --git a/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/ComEventsHelperTests.cs b/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/ComEventsHelperTests.cs index 9ce363e14b2f..39cfc43cb5d6 100644 --- a/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/ComEventsHelperTests.cs +++ b/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/ComEventsHelperTests.cs @@ -8,14 +8,7 @@ namespace System.Runtime.InteropServices.Tests { #pragma warning disable 0618 // ComEventsHelper is marked as Obsolete. public class ComEventsHelperTests - { - [Fact] - [SkipOnTargetFramework(~TargetFrameworkMonikers.UapAot, "Throws PlatformNotSupportedException in UapAot")] - public void Combine_UapAot_PlatformNotSupportedException() - { - Assert.Throws(() => ComEventsHelper.Combine(null, Guid.Empty, 1, null)); - } - + { [Fact] [PlatformSpecific(TestPlatforms.AnyUnix)] public void Combine_Unix_ThrowsPlatformNotSupportedException() @@ -25,7 +18,6 @@ public void Combine_Unix_ThrowsPlatformNotSupportedException() [Fact] [PlatformSpecific(TestPlatforms.Windows)] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Throws PlatformNotSupportedException in UapAot")] public void Combine_NullRcw_ThrowsArgumentNullException() { AssertExtensions.Throws(null, () => ComEventsHelper.Combine(null, Guid.Empty, 1, null)); @@ -33,18 +25,11 @@ public void Combine_NullRcw_ThrowsArgumentNullException() [Fact] [PlatformSpecific(TestPlatforms.Windows)] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Throws PlatformNotSupportedException in UapAot")] public void Combine_NotComObject_ThrowsArgumentException() { AssertExtensions.Throws("obj", () => ComEventsHelper.Combine(1, Guid.Empty, 1, null)); } - [SkipOnTargetFramework(~TargetFrameworkMonikers.UapAot, "Throws PlatformNotSupportedException in UapAot")] - public void Remove_UapAot_ThrowsPlatformNotSupportedException() - { - Assert.Throws(() => ComEventsHelper.Remove(null, Guid.Empty, 1, null)); - } - [Fact] [PlatformSpecific(TestPlatforms.AnyUnix)] public void Remove_Unix_ThrowPlatformNotSupportedException() @@ -54,7 +39,6 @@ public void Remove_Unix_ThrowPlatformNotSupportedException() [Fact] [PlatformSpecific(TestPlatforms.Windows)] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Throws PlatformNotSupportedException in UapAot")] public void Remove_NullRcw_ThrowsArgumentNullException() { AssertExtensions.Throws(null, () => ComEventsHelper.Remove(null, Guid.Empty, 1, null)); @@ -62,7 +46,6 @@ public void Remove_NullRcw_ThrowsArgumentNullException() [Fact] [PlatformSpecific(TestPlatforms.Windows)] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "ComEventsHelper.Combine is not supported in .NET Core.")] public void Remove_NotComObject_ThrowsArgumentException() { AssertExtensions.Throws("obj", () => ComEventsHelper.Remove(1, Guid.Empty, 1, null)); diff --git a/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/DispatchWrapperTests.cs b/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/DispatchWrapperTests.cs index 4cae0750b6aa..9781110adac3 100644 --- a/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/DispatchWrapperTests.cs +++ b/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/DispatchWrapperTests.cs @@ -19,7 +19,6 @@ public void Ctor_Null_Success() [Theory] [InlineData("")] [InlineData(0)] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Marshal.GetIDispatchForObject is not supported in .NET Core.")] public void Ctor_NonNull_ThrowsPlatformNotSupportedException(object value) { Assert.Throws(() => new DispatchWrapper(value)); diff --git a/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/HandleCollectorTests.cs b/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/HandleCollectorTests.cs index 8ff50ccfee81..40c639fd77c4 100644 --- a/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/HandleCollectorTests.cs +++ b/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/HandleCollectorTests.cs @@ -88,7 +88,6 @@ public static void Remove_EmptyCollection_ThrowsInvalidOperationException() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot,"Reflects on private member handleCount")] public static void Add_Overflows_ThrowsInvalidOperationException() { HandleCollector collector = new HandleCollector("CountOverflow", int.MaxValue); diff --git a/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/IDispatchImplAttributeTests.cs b/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/IDispatchImplAttributeTests.cs index 826c1bed1078..d2fcfa8c9d43 100644 --- a/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/IDispatchImplAttributeTests.cs +++ b/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/IDispatchImplAttributeTests.cs @@ -16,7 +16,6 @@ public class IDispatchImplAttributeTests [InlineData(-1)] [InlineData(0)] [InlineData(2)] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot | TargetFrameworkMonikers.NetFramework, "This has been removed from the ref in .NET Core and from the source in the .NET Framework.")] public void Ctor_ImplTypeShort(short implType) { Type type = typeof(HandleCollector).Assembly.GetType(TypeName); diff --git a/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/CreateWrapperOfTypeTests.Windows.cs b/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/CreateWrapperOfTypeTests.Windows.cs index 75a6f28cd466..d2cdeb52b456 100644 --- a/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/CreateWrapperOfTypeTests.Windows.cs +++ b/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/CreateWrapperOfTypeTests.Windows.cs @@ -8,61 +8,7 @@ namespace System.Runtime.InteropServices.Tests { public partial class CreateWrapperOfTypeTests - { - [Fact] - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework, "Marshal.CreateWrapperOfType is not supported on .NET Core.")] - public void CreateWrapperOfType_NonGenericHasNoWrapper_ReturnsExpected() - { - var comObject = new ComImportObject(); - object wrapper = Marshal.CreateWrapperOfType(comObject, typeof(WrapperComImportObject)); - Assert.Same(wrapper, Marshal.GetComObjectData(comObject, typeof(WrapperComImportObject))); - } - - [Fact] - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework, "Marshal.CreateWrapperOfType is not supported on .NET Core.")] - public void CreateWrapperOfType_NonGenericHasNoWrapperWithInterfaces_ReturnsExpected() - { - var comObject = new ComImportObject(); - object wrapper = Marshal.CreateWrapperOfType(comObject, typeof(HasNonCOMInterfaces)); - Assert.Same(wrapper, Marshal.GetComObjectData(comObject, typeof(HasNonCOMInterfaces))); - } - - [ComImport] - [Guid("927971f5-0939-11d1-8be1-00c04fd8d503")] - public class HasNonCOMInterfaces : NonGenericInterface, GenericInterface { } - - [Fact] - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework, "Marshal.CreateWrapperOfType is not supported on .NET Core.")] - public void CreateWrapperOfType_GenericHasNoWrapper_ReturnsExpected() - { - var comObject = new ComImportObject(); - object wrapper = Marshal.CreateWrapperOfType(comObject); - Assert.Same(wrapper, Marshal.GetComObjectData(comObject, typeof(HasNonCOMInterfaces))); - } - - [Fact] - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework, "Marshal.CreateWrapperOfType is not supported on .NET Core.")] - public void CreateWrapperOfType_GenericHasNoWrapperWithInterfaces_ReturnsExpected() - { - var comObject = new ComImportObject(); - object wrapper = Marshal.CreateWrapperOfType(comObject); - Assert.Same(wrapper, Marshal.GetComObjectData(comObject, typeof(HasNonCOMInterfaces))); - } - - [Fact] - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework, "Marshal.CreateWrapperOfType is not supported on .NET Core.")] - public void CreateWrapperOfType_AlreadyHasWrapper_ReturnsExpected() - { - var comObject = new ComImportObject(); - Marshal.SetComObjectData(comObject, typeof(WrapperComImportObject), "data"); - - Assert.Same("data", Marshal.CreateWrapperOfType(comObject, typeof(WrapperComImportObject))); - } - - [ComImport] - [Guid("927971f5-0939-11d1-8be1-00c04fd8d503")] - public class WrapperComImportObject { } - + { [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindowsNanoServer))] [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Not approved COM object for app")] public void CreateWrapperOfType_SameType_ReturnsSameInstance() @@ -95,25 +41,5 @@ public void CreateWrappedOfType_ObjectNotComObject_ThrowsArgumentException() AssertExtensions.Throws("o", () => Marshal.CreateWrapperOfType(10, typeof(ComImportObject))); AssertExtensions.Throws("o", () => Marshal.CreateWrapperOfType(10)); } - - [Fact] - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework, "Marshal.CreateWrapperOfType is not supported on .NET Core.")] - public void CreateWrapperOfType_AlreadyHasWrapperOfBadType_ThrowsInvalidCastException() - { - var comObject = new ComImportObject(); - Marshal.SetComObjectData(comObject, typeof(WrapperComImportObject), "data"); - - Assert.Throws(() => Marshal.CreateWrapperOfType(comObject)); - } - - [Fact] - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework, "Marshal.CreateWrapperOfType is not supported on .NET Core.")] - public void CreateWrapperOfType_CantAssignInterfaces_ThrowsInvalidCastException() - { - var comObject = new ComImportObject(); - Assert.Throws(() => Marshal.CreateWrapperOfType(comObject, typeof(HasCOMInterfaces))); - } - - public class HasCOMInterfaces : ComImportObject, IComImportObject { } } } diff --git a/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/DestroyStructureTests.cs b/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/DestroyStructureTests.cs index f3c225c16bab..f547d54ae36a 100644 --- a/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/DestroyStructureTests.cs +++ b/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/DestroyStructureTests.cs @@ -85,12 +85,10 @@ public static IEnumerable DestroyStructure_InvalidType_TestData() yield return new object[] { typeof(GenericClass<>).GetTypeInfo().GenericTypeParameters[0] }; -#if !netstandard // TODO: Enable for netstandard2.1 AssemblyBuilder assemblyBuilder = AssemblyBuilder.DefineDynamicAssembly(new AssemblyName("Assembly"), AssemblyBuilderAccess.Run); ModuleBuilder moduleBuilder = assemblyBuilder.DefineDynamicModule("Module"); TypeBuilder typeBuilder = moduleBuilder.DefineType("Type"); yield return new object[] { typeBuilder }; -#endif } [Theory] diff --git a/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/GenerateGuidForTypeTests.cs b/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/GenerateGuidForTypeTests.cs index 009e86fb8333..6ea875b94a89 100644 --- a/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/GenerateGuidForTypeTests.cs +++ b/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/GenerateGuidForTypeTests.cs @@ -16,11 +16,7 @@ public static IEnumerable GenerateGuidForType_Valid_TestData() { yield return new object[] { typeof(int) }; yield return new object[] { typeof(int).MakePointerType() }; - // Crashes with .NET Framework. - if (!PlatformDetection.IsFullFramework) - { - yield return new object[] { typeof(int).MakeByRefType() }; - } + yield return new object[] { typeof(int).MakeByRefType() }; yield return new object[] { typeof(string) }; yield return new object[] { typeof(string[]) }; @@ -35,21 +31,15 @@ public static IEnumerable GenerateGuidForType_Valid_TestData() yield return new object[] { typeof(GenericInterface) }; yield return new object[] { typeof(GenericClass<>) }; - // Crashes with .NET Framework. - if (!PlatformDetection.IsFullFramework) - { - yield return new object[] { typeof(GenericClass<>).GetTypeInfo().GenericTypeParameters[0] }; - } + yield return new object[] { typeof(GenericClass<>).GetTypeInfo().GenericTypeParameters[0] }; yield return new object[] { typeof(ClassWithGuidAttribute) }; -#if !netstandard // TODO: Enable for netstandard2.1 AssemblyBuilder assemblyBuilder = AssemblyBuilder.DefineDynamicAssembly(new AssemblyName("Assembly"), AssemblyBuilderAccess.RunAndCollect); ModuleBuilder moduleBuilder = assemblyBuilder.DefineDynamicModule("Module"); TypeBuilder typeBuilder = moduleBuilder.DefineType("Type"); Type collectibleType = typeBuilder.CreateType(); yield return new object[] { collectibleType }; -#endif } [Theory] @@ -58,7 +48,6 @@ public void GenerateGuidForType_ValidType_ReturnsExpected(Type type) { if (type.HasElementType) { - // [ActiveIssue(30940, ~TargetFrameworkMonikers.NetFramework)] if (PlatformDetection.IsNetCore) { Assert.Equal(Guid.Empty, type.GUID); diff --git a/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/GenerateProgIdForTypeTests.cs b/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/GenerateProgIdForTypeTests.cs index 0b0cbc173b32..b453d1a4dd18 100644 --- a/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/GenerateProgIdForTypeTests.cs +++ b/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/GenerateProgIdForTypeTests.cs @@ -61,31 +61,11 @@ public static IEnumerable GenerateProgIdForType_Invalid_TestData() yield return new object[] { typeof(GenericClass<>) }; yield return new object[] { typeof(GenericClass<>).GetTypeInfo().GenericTypeParameters[0] }; -#if !netstandard // TODO: Enable for netstandard2.1 AssemblyBuilder assemblyBuilder = AssemblyBuilder.DefineDynamicAssembly(new AssemblyName("Assembly"), AssemblyBuilderAccess.RunAndCollect); ModuleBuilder moduleBuilder = assemblyBuilder.DefineDynamicModule("Module"); TypeBuilder typeBuilder = moduleBuilder.DefineType("Type"); Type collectibleType = typeBuilder.CreateType(); yield return new object[] { collectibleType }; -#endif - } - - [Theory] - [ActiveIssue(30927, ~TargetFrameworkMonikers.NetFramework)] - [MemberData(nameof(GenerateProgIdForType_Invalid_TestData))] - public void GenerateProgIdForType_InvalidType_ThrowsArgumentException(Type type) - { - AssertExtensions.Throws("type", () => Marshal.GenerateProgIdForType(type)); - } - - [Fact] - [ActiveIssue(30927, ~TargetFrameworkMonikers.NetFramework)] - public void GenerateProgIdForType_NotRuntimeType_ThrowsNotSupportedException() - { - AssemblyBuilder assemblyBuilder = AssemblyBuilder.DefineDynamicAssembly(new AssemblyName("Assembly"), AssemblyBuilderAccess.Run); - ModuleBuilder moduleBuilder = assemblyBuilder.DefineDynamicModule("Module"); - TypeBuilder typeBuilder = moduleBuilder.DefineType("Type"); - Assert.Throws(() => Marshal.GenerateProgIdForType(typeBuilder)); } } } diff --git a/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/GetComInterfaceForObjectTests.cs b/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/GetComInterfaceForObjectTests.cs index 2d999315bf23..2ab0f6e6f1d3 100644 --- a/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/GetComInterfaceForObjectTests.cs +++ b/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/GetComInterfaceForObjectTests.cs @@ -172,13 +172,11 @@ public static IEnumerable GetComInterfaceForObject_InvalidType_TestDat yield return new object[] { typeof(NonComVisibleStruct) }; yield return new object[] { typeof(NonComVisibleInterface) }; -#if !netstandard // TODO: Enable for netstandard2.1 AssemblyBuilder collectibleAssemblyBuilder = AssemblyBuilder.DefineDynamicAssembly(new AssemblyName("Assembly"), AssemblyBuilderAccess.RunAndCollect); ModuleBuilder collectibleModuleBuilder = collectibleAssemblyBuilder.DefineDynamicModule("Module"); TypeBuilder collectibleTypeBuilder = collectibleModuleBuilder.DefineType("Type", TypeAttributes.Interface | TypeAttributes.Abstract); Type collectibleType = collectibleTypeBuilder.CreateType(); yield return new object[] { collectibleType }; -#endif } [Theory] diff --git a/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/GetDelegateForFunctionPointerTests.cs b/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/GetDelegateForFunctionPointerTests.cs index c9adefca30ed..ee895a132fe4 100644 --- a/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/GetDelegateForFunctionPointerTests.cs +++ b/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/GetDelegateForFunctionPointerTests.cs @@ -28,7 +28,6 @@ public void GetDelegateForFunctionPointer_NonGeneric_ReturnsExpected(Type t) VerifyDelegate(functionDelegate, targetMethod); } -#if !netstandard // TODO: Enable for netstandard2.1 [Fact] public void GetDelegateForFunctionPointer_CollectibleType_ReturnsExpected() { @@ -51,7 +50,6 @@ public void GetDelegateForFunctionPointer_CollectibleType_ReturnsExpected() GC.KeepAlive(d); VerifyDelegate(functionDelegate, targetMethod); } -#endif [Fact] public void GetDelegateForFunctionPointer_Generic_ReturnsExpected() diff --git a/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/GetEndComSlotTests.cs b/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/GetEndComSlotTests.cs index e009c2abb2d0..dc466e2bcb40 100644 --- a/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/GetEndComSlotTests.cs +++ b/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/GetEndComSlotTests.cs @@ -11,21 +11,7 @@ namespace System.Runtime.InteropServices.Tests { public partial class GetEndComSlotTests - { - [Theory] - [InlineData(typeof(int), -1)] - [InlineData(typeof(string), -1)] - [InlineData(typeof(NonGenericClass), -1)] - [InlineData(typeof(NonGenericStruct), -1)] - [InlineData(typeof(NonGenericInterface), 6)] - [InlineData(typeof(int*), -1)] - [PlatformSpecific(TestPlatforms.Windows)] - [ActiveIssue(31068, ~TargetFrameworkMonikers.NetFramework)] - public void GetEndComSlot_ValidType_ReturnsExpected(Type type, int expected) - { - Assert.Equal(expected, Marshal.GetEndComSlot(type)); - } - + { [Fact] [PlatformSpecific(TestPlatforms.AnyUnix)] public void GetEndComSlot_Unix_ThrowsPlatformNotSupportedException() @@ -78,13 +64,11 @@ public static IEnumerable GetStartComSlot_NotComVisibleType_TestData() yield return new object[] { typeof(int[][]) }; yield return new object[] { typeof(int[,]) }; -#if !netstandard // TODO: Enable for netstandard2.1 - AssemblyBuilder assemblyBuilder = AssemblyBuilder.DefineDynamicAssembly(new AssemblyName("Assembly"), AssemblyBuilderAccess.RunAndCollect); + AssemblyBuilder assemblyBuilder = AssemblyBuilder.DefineDynamicAssembly(new AssemblyName("Assembly"), AssemblyBuilderAccess.RunAndCollect); ModuleBuilder moduleBuilder = assemblyBuilder.DefineDynamicModule("Module"); TypeBuilder typeBuilder = moduleBuilder.DefineType("Type"); Type collectibleType = typeBuilder.CreateType(); yield return new object[] { collectibleType }; -#endif } [Theory] diff --git a/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/GetHINSTANCETests.cs b/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/GetHINSTANCETests.cs index 77649aae1b02..1872c5aee1da 100644 --- a/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/GetHINSTANCETests.cs +++ b/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/GetHINSTANCETests.cs @@ -36,19 +36,11 @@ public void GetHINSTANCE_NullModule_ThrowsArgumentNullException() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public void GetHINSTANCE_NonRuntimeModule_Returns_IntPtrMinusOne() { Assert.Equal((IntPtr)(-1), Marshal.GetHINSTANCE(new NonRuntimeModule())); } - [Fact] - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)] - public void GetHINSTANCE_NonRuntimeModule_ThrowsArgumentNullException_NetFramework() - { - Assert.Throws(() => Marshal.GetHINSTANCE(new NonRuntimeModule())); - } - private class NonRuntimeModule : Module { public NonRuntimeModule() diff --git a/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/GetIDispatchForObjectTests.Windows.cs b/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/GetIDispatchForObjectTests.Windows.cs index 22fddb560d08..5109f037bdfe 100644 --- a/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/GetIDispatchForObjectTests.Windows.cs +++ b/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/GetIDispatchForObjectTests.Windows.cs @@ -27,13 +27,5 @@ public static IEnumerable GetIUnknownForObject_ComObject_TestData() yield return new object[] { new AutoDispatchComObjectEmpty() }; yield return new object[] { new AutoDualComObjectEmpty() }; } - - [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindowsNanoServer))] - [MemberData(nameof(GetIUnknownForObject_ComObject_TestData))] - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework, "Marshal.GetIDispatchForObject is not implemented in .NET Core.")] - public void GetIDispatchForObject_ComObject_ReturnsExpected(object o) - { - GetIDispatchForObject_ValidObject_Roundtrips(o); - } } } diff --git a/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/GetIDispatchForObjectTests.cs b/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/GetIDispatchForObjectTests.cs index cc0b04e8eb4b..792ea5b78c14 100644 --- a/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/GetIDispatchForObjectTests.cs +++ b/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/GetIDispatchForObjectTests.cs @@ -12,54 +12,10 @@ namespace System.Runtime.InteropServices.Tests { public partial class GetIDispatchForObjectTests { - public static IEnumerable GetIDispatchForObject_Valid_TestData() - { - yield return new object[] { new NonGenericClass() }; - yield return new object[] { new NonGenericStruct() }; - } - - [Theory] - [MemberData(nameof(GetIDispatchForObject_Valid_TestData))] - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework, "Marshal.GetIDispatchForObject is not implemented in .NET Core.")] - public void GetIDispatchForObject_ValidObject_Roundtrips(object o) - { - IntPtr ptr = Marshal.GetIDispatchForObject(o); - try - { - Assert.NotEqual(IntPtr.Zero, ptr); - } - finally - { - Marshal.Release(ptr); - } - } - [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Marshal.GetIDispatchForObject is not implemented in .NET Core.")] public void GetIDispatchForObject_NetCore_ThrowsPlatformNotSupportedException() { Assert.Throws(() => Marshal.GetIDispatchForObject(null)); } - - public static IEnumerable GetIDispatchForObject_Invalid_TestData() - { - yield return new object[] { new GenericClass() }; - yield return new object[] { new GenericStruct() }; - } - - [Fact] - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework, "Marshal.GetIDispatchForObject is not implemented in .NET Core.")] - public void GetIDispatchForObject_NullObject_ThrowsArgumentNullException() - { - AssertExtensions.Throws("o", () => Marshal.GetIDispatchForObject(null)); - } - - [Theory] - [MemberData(nameof(GetIDispatchForObject_Invalid_TestData))] - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework, "Marshal.GetIDispatchForObject is not implemented in .NET Core.")] - public void GetIDispatchForObject_InvalidObject_ThrowsInvalidCastException(object o) - { - Assert.Throws(() => Marshal.GetIDispatchForObject(o)); - } } } diff --git a/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/GetNativeVariantForObjectTests.cs b/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/GetNativeVariantForObjectTests.cs index 330397f6d092..14cf3e2edd72 100644 --- a/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/GetNativeVariantForObjectTests.cs +++ b/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/GetNativeVariantForObjectTests.cs @@ -81,11 +81,7 @@ public static IEnumerable GetNativeVariantForObject_RoundtrippingPrimi yield return new object[] { d, VarEnum.VT_DISPATCH, (IntPtr)(-1) }; } - [Theory] - [MemberData(nameof(GetNativeVariantForObject_RoundtrippingPrimitives_TestData))] - [PlatformSpecific(TestPlatforms.Windows)] - [ActiveIssue(31077, ~TargetFrameworkMonikers.NetFramework)] - public void GetNativeVariantForObject_RoundtrippingPrimitives_Success(object primitive, VarEnum expectedVarType, IntPtr expectedValue) + private void GetNativeVariantForObject_RoundtrippingPrimitives_Success(object primitive, VarEnum expectedVarType, IntPtr expectedValue) { GetNativeVariantForObject_ValidObject_Success(primitive, expectedVarType, expectedValue, primitive); } @@ -188,7 +184,7 @@ public static IEnumerable GetNativeVariantForObject_NonRoundtrippingPr [Theory] [MemberData(nameof(GetNativeVariantForObject_NonRoundtrippingPrimitives_TestData))] [PlatformSpecific(TestPlatforms.Windows)] - [ActiveIssue(31077, ~TargetFrameworkMonikers.NetFramework)] + [ActiveIssue(31077)] public void GetNativeVariantForObject_ValidObject_Success(object primitive, VarEnum expectedVarType, IntPtr expectedValue, object expectedRoundtripValue) { var v = new Variant(); @@ -342,25 +338,6 @@ public static IEnumerable GetNativeVariant_NotInteropCompatible_TestDa yield return new object[] { new Color[] { Color.FromArgb(10) } }; } - [Theory] - [MemberData(nameof(GetNativeVariant_NotInteropCompatible_TestData))] - [PlatformSpecific(TestPlatforms.Windows)] - [ActiveIssue(31077, ~TargetFrameworkMonikers.NetFramework)] - public void GetNativeVariant_NotInteropCompatible_ThrowsArgumentException(object obj) - { - var v = new Variant(); - IntPtr pNative = Marshal.AllocHGlobal(Marshal.SizeOf(v)); - try - { - AssertExtensions.Throws(null, () => Marshal.GetNativeVariantForObject(obj, pNative)); - AssertExtensions.Throws(null, () => Marshal.GetNativeVariantForObject(obj, pNative)); - } - finally - { - Marshal.FreeHGlobal(pNative); - } - } - [Fact] [PlatformSpecific(TestPlatforms.Windows)] public void GetNativeVariant_InvalidArray_ThrowsSafeArrayTypeMismatchException() diff --git a/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/GetObjectForNativeVariantTests.cs b/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/GetObjectForNativeVariantTests.cs index 1a1dfcf0ae6a..9852400ec95a 100644 --- a/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/GetObjectForNativeVariantTests.cs +++ b/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/GetObjectForNativeVariantTests.cs @@ -355,7 +355,6 @@ public static IEnumerable GetObjectForNativeVariant_PrimitivesByRef_Te }; var obj = new object(); -#if !netstandard // Marshal.GetIDispatchForObject is not in netstandard2.0 if (!PlatformDetection.IsNetCore) { IntPtr dispatch = Marshal.GetIDispatchForObject(obj); @@ -369,7 +368,6 @@ public static IEnumerable GetObjectForNativeVariant_PrimitivesByRef_Te { Assert.Throws(() => Marshal.GetIDispatchForObject(obj)); } -#endif // VT_ERROR => int. yield return new object[] diff --git a/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/GetStartComSlotTests.cs b/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/GetStartComSlotTests.cs index ea10a351e50e..41e7e318246b 100644 --- a/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/GetStartComSlotTests.cs +++ b/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/GetStartComSlotTests.cs @@ -11,21 +11,7 @@ namespace System.Runtime.InteropServices.Tests { public partial class GetStartComSlotTests - { - [Theory] - [InlineData(typeof(int), -1)] - [InlineData(typeof(string), -1)] - [InlineData(typeof(NonGenericClass), -1)] - [InlineData(typeof(NonGenericStruct), -1)] - [InlineData(typeof(NonGenericInterface), 7)] - [InlineData(typeof(int*), -1)] - [PlatformSpecific(TestPlatforms.Windows)] - [ActiveIssue(31068, ~TargetFrameworkMonikers.NetFramework)] - public void GetStartComSlot_ValidType_ReturnsExpected(Type type, int expected) - { - Assert.Equal(expected, Marshal.GetStartComSlot(type)); - } - + { [Fact] [PlatformSpecific(TestPlatforms.AnyUnix)] public void GetStartComSlot_Unix_ThrowsPlatformNotSupportedException() @@ -78,13 +64,11 @@ public static IEnumerable GetStartComSlot_NotComVisibleType_TestData() yield return new object[] { typeof(int[][]) }; yield return new object[] { typeof(int[,]) }; -#if !netstandard // TODO: Enable for netstandard2.1 AssemblyBuilder assemblyBuilder = AssemblyBuilder.DefineDynamicAssembly(new AssemblyName("Assembly"), AssemblyBuilderAccess.RunAndCollect); ModuleBuilder moduleBuilder = assemblyBuilder.DefineDynamicModule("Module"); TypeBuilder typeBuilder = moduleBuilder.DefineType("Type"); Type collectibleType = typeBuilder.CreateType(); yield return new object[] { collectibleType }; -#endif } [Theory] diff --git a/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/GetTypedObjectForIUnknownTests.cs b/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/GetTypedObjectForIUnknownTests.cs index 08e158998f15..82eedbcc230e 100644 --- a/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/GetTypedObjectForIUnknownTests.cs +++ b/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/GetTypedObjectForIUnknownTests.cs @@ -117,12 +117,10 @@ public static IEnumerable GetTypedObjectForIUnknown_Invalid_TestData() yield return new object[] { typeof(GenericClass<>) }; -#if !netstandard // TODO: Enable for netstandard2.1 AssemblyBuilder assemblyBuilder = AssemblyBuilder.DefineDynamicAssembly(new AssemblyName("Assembly"), AssemblyBuilderAccess.Run); ModuleBuilder moduleBuilder = assemblyBuilder.DefineDynamicModule("Module"); TypeBuilder typeBuilder = moduleBuilder.DefineType("Type"); yield return new object[] { typeBuilder }; -#endif } [Theory] @@ -154,13 +152,11 @@ public static IEnumerable GetTypedObjectForIUnknownType_UncastableObje yield return new object[] { new object(), typeof(int).MakePointerType() }; -#if !netstandard // TODO: Enable for netstandard2.1 AssemblyBuilder assemblyBuilder = AssemblyBuilder.DefineDynamicAssembly(new AssemblyName("Assembly"), AssemblyBuilderAccess.RunAndCollect); ModuleBuilder moduleBuilder = assemblyBuilder.DefineDynamicModule("Module"); TypeBuilder typeBuilder = moduleBuilder.DefineType("Type"); Type collectibleType = typeBuilder.CreateType(); yield return new object[] { new object(), collectibleType }; -#endif } [Theory] diff --git a/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/IsComObjectTests.cs b/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/IsComObjectTests.cs index 6e90af9ea823..fe15dbdf3435 100644 --- a/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/IsComObjectTests.cs +++ b/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/IsComObjectTests.cs @@ -35,7 +35,6 @@ public static IEnumerable IsComObject_TestData() yield return new object[] { new KeyValuePair("key", 10) }; -#if !netstandard // TODO: Enable for netstandard2.1 AssemblyBuilder assemblyBuilder = AssemblyBuilder.DefineDynamicAssembly(new AssemblyName("Assembly"), AssemblyBuilderAccess.RunAndCollect); ModuleBuilder moduleBuilder = assemblyBuilder.DefineDynamicModule("Module"); TypeBuilder typeBuilder = moduleBuilder.DefineType("Type"); @@ -53,7 +52,6 @@ public static IEnumerable IsComObject_TestData() Type collectibleComImportObject = comImportTypeBuilder.CreateType(); yield return new object[] { collectibleComImportObject }; -#endif } [Theory] diff --git a/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/PtrToStringUTF8Tests.cs b/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/PtrToStringUTF8Tests.cs index 6b2461a154cb..6f6c8a7c57c7 100644 --- a/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/PtrToStringUTF8Tests.cs +++ b/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/PtrToStringUTF8Tests.cs @@ -41,19 +41,5 @@ public void PtrToStringUTF8_Win32AtomPointer_ReturnsNull() // anything if the ptr is less than 64K. Assert.Null(Marshal.PtrToStringUTF8((IntPtr)1)); } - - [Fact] - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)] - public void PtrToStringUTF8_ZeroPointer_ThrowsArgumentNullException() - { - AssertExtensions.Throws("ptr", () => Marshal.PtrToStringUTF8(IntPtr.Zero, 123)); - } - - [Fact] - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)] - public void PtrToStringUTF8_NegativeLength_ThrowsArgumentExeption() - { - AssertExtensions.Throws("byteLen", null, () => Marshal.PtrToStringUTF8(new IntPtr(123), -77)); - } } } diff --git a/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/PtrToStructureTests.cs b/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/PtrToStructureTests.cs index dc5f9be315d6..5d902c57e63f 100644 --- a/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/PtrToStructureTests.cs +++ b/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/PtrToStructureTests.cs @@ -203,7 +203,6 @@ public void PtrToStructure_GenericType_ThrowsArgumentException(Type structureTyp AssertExtensions.Throws("structureType", () => Marshal.PtrToStructure((IntPtr)1, structureType)); } -#if !netstandard // TODO: Enable for netstandard2.1 [Fact] public void PtrToStructure_NonRuntimeType_ThrowsArgumentException() { @@ -212,7 +211,6 @@ public void PtrToStructure_NonRuntimeType_ThrowsArgumentException() TypeBuilder typeBuilder = moduleBuilder.DefineType("Type"); AssertExtensions.Throws("structureType", "type", () => Marshal.PtrToStructure((IntPtr)1, (Type)typeBuilder)); } -#endif public static IEnumerable PtrToStructure_NonBlittableType_TestData() { diff --git a/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/QueryInterfaceTests.cs b/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/QueryInterfaceTests.cs index ce2b865cd8b6..6e77d0bcc398 100644 --- a/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/QueryInterfaceTests.cs +++ b/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/QueryInterfaceTests.cs @@ -24,7 +24,6 @@ public static IEnumerable QueryInterface_ValidInterface_TestData() yield return new object[] { new object(), IID_IINSPECTABLE }; yield return new object[] { 10, IID_IUNKNOWN }; - // [ActiveIssue(31079, ~TargetFrameworkMonikers.NetFramework)] if (!PlatformDetection.IsNetCore) { yield return new object[] { 10, IID_IDISPATCH }; @@ -32,7 +31,6 @@ public static IEnumerable QueryInterface_ValidInterface_TestData() yield return new object[] { 10, IID_IINSPECTABLE }; yield return new object[] { "string", IID_IUNKNOWN }; - // [ActiveIssue(31079, ~TargetFrameworkMonikers.NetFramework)] if (!PlatformDetection.IsNetCore) { yield return new object[] { "string", IID_IDISPATCH }; @@ -40,7 +38,6 @@ public static IEnumerable QueryInterface_ValidInterface_TestData() yield return new object[] { "string", IID_IINSPECTABLE }; yield return new object[] { new NonGenericClass(), IID_IUNKNOWN }; - // [ActiveIssue(31079, ~TargetFrameworkMonikers.NetFramework)] if (!PlatformDetection.IsNetCore) { yield return new object[] { new NonGenericClass(), IID_IDISPATCH }; @@ -50,7 +47,6 @@ public static IEnumerable QueryInterface_ValidInterface_TestData() yield return new object[] { new GenericClass(), IID_IINSPECTABLE }; yield return new object[] { new NonGenericStruct(), IID_IUNKNOWN }; - // [ActiveIssue(31079, ~TargetFrameworkMonikers.NetFramework)] if (!PlatformDetection.IsNetCore) { yield return new object[] { new NonGenericStruct(), IID_IDISPATCH }; @@ -60,7 +56,6 @@ public static IEnumerable QueryInterface_ValidInterface_TestData() yield return new object[] { new GenericStruct(), IID_IINSPECTABLE }; yield return new object[] { Int32Enum.Value1, IID_IUNKNOWN }; - // [ActiveIssue(31079, ~TargetFrameworkMonikers.NetFramework)] if (!PlatformDetection.IsNetCore) { yield return new object[] { Int32Enum.Value1, IID_IDISPATCH }; diff --git a/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/ReadWrite/ByteTests.cs b/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/ReadWrite/ByteTests.cs index ea6edd035d5a..5877afdcadd6 100644 --- a/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/ReadWrite/ByteTests.cs +++ b/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/ReadWrite/ByteTests.cs @@ -135,13 +135,11 @@ public void ReadByte_ZeroPointer_ThrowsException() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Exception is wrapped in a TargetInvocationException in the .NET Framework.")] public void ReadByte_NullObject_ThrowsAccessViolationException() { Assert.Throws(() => Marshal.ReadByte(null, 2)); } -#if !netstandard // TODO: Enable for netstandard2.1 [Fact] public void ReadByte_NotReadable_ThrowsArgumentException() { @@ -153,7 +151,6 @@ public void ReadByte_NotReadable_ThrowsArgumentException() AssertExtensions.Throws(null, () => Marshal.ReadByte(collectibleObject, 0)); } -#endif [Fact] public void WriteByte_ZeroPointer_ThrowsException() @@ -163,13 +160,11 @@ public void WriteByte_ZeroPointer_ThrowsException() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Exception is wrapped in a TargetInvocationException in the .NET Framework.")] public void WriteByte_NullObject_ThrowsAccessViolationException() { Assert.Throws(() => Marshal.WriteByte(null, 2, 0)); } -#if !netstandard // TODO: Enable for netstandard2.1 [Fact] public void WriteByte_NotReadable_ThrowsArgumentException() { @@ -181,7 +176,6 @@ public void WriteByte_NotReadable_ThrowsArgumentException() AssertExtensions.Throws(null, () => Marshal.WriteByte(collectibleObject, 0, 0)); } -#endif public struct BlittableStruct { diff --git a/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/ReadWrite/Int16Tests.cs b/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/ReadWrite/Int16Tests.cs index 7b3b865239a1..13b949182afc 100644 --- a/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/ReadWrite/Int16Tests.cs +++ b/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/ReadWrite/Int16Tests.cs @@ -145,13 +145,11 @@ public void ReadInt16_ZeroPointer_ThrowsException() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Exception is wrapped in a TargetInvocationException in the .NET Framework.")] public void ReadInt16_NullObject_ThrowsAccessViolationException() { Assert.Throws(() => Marshal.ReadInt16(null, 2)); } -#if !netstandard // TODO: Enable for netstandard2.1 [Fact] public void ReadInt16_NotReadable_ThrowsArgumentException() { @@ -163,7 +161,6 @@ public void ReadInt16_NotReadable_ThrowsArgumentException() AssertExtensions.Throws(null, () => Marshal.ReadInt16(collectibleObject, 0)); } -#endif [Fact] public void WriteInt16_ZeroPointer_ThrowsException() @@ -173,13 +170,11 @@ public void WriteInt16_ZeroPointer_ThrowsException() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Exception is wrapped in a TargetInvocationException in the .NET Framework.")] public void WriteInt16_NullObject_ThrowsAccessViolationException() { Assert.Throws(() => Marshal.WriteInt16(null, 2, 0)); } -#if !netstandard // TODO: Enable for netstandard2.1 [Fact] public void WriteInt16_NotReadable_ThrowsArgumentException() { @@ -191,7 +186,6 @@ public void WriteInt16_NotReadable_ThrowsArgumentException() AssertExtensions.Throws(null, () => Marshal.WriteInt16(collectibleObject, 0, 0)); } -#endif public struct BlittableStruct { diff --git a/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/ReadWrite/Int32Tests.cs b/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/ReadWrite/Int32Tests.cs index 57fb4cbe20b2..f1006e93e7bf 100644 --- a/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/ReadWrite/Int32Tests.cs +++ b/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/ReadWrite/Int32Tests.cs @@ -132,13 +132,11 @@ public void ReadInt32_ZeroPoint_ThrowsException() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Exception is wrapped in a TargetInvocationException in the .NET Framework.")] public void ReadInt32_NullObject_ThrowsAccessViolationException() { Assert.Throws(() => Marshal.ReadInt32(null, 2)); } -#if !netstandard // TODO: Enable for netstandard2.1 [Fact] public void ReadInt32_NotReadable_ThrowsArgumentException() { @@ -150,7 +148,6 @@ public void ReadInt32_NotReadable_ThrowsArgumentException() AssertExtensions.Throws(null, () => Marshal.ReadInt32(collectibleObject, 0)); } -#endif [Fact] public void WriteInt32_ZeroPointer_ThrowsException() @@ -160,13 +157,11 @@ public void WriteInt32_ZeroPointer_ThrowsException() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Exception is wrapped in a TargetInvocationException in the .NET Framework.")] public void WriteInt32_NullObject_ThrowsAccessViolationException() { Assert.Throws(() => Marshal.WriteInt32(null, 2, 0)); } -#if !netstandard // TODO: Enable for netstandard2.1 [Fact] public void WriteInt32_NotReadable_ThrowsArgumentException() { @@ -178,7 +173,6 @@ public void WriteInt32_NotReadable_ThrowsArgumentException() AssertExtensions.Throws(null, () => Marshal.WriteInt32(collectibleObject, 0, 0)); } -#endif public struct BlittableStruct { diff --git a/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/ReadWrite/Int64Tests.cs b/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/ReadWrite/Int64Tests.cs index 7b28d5e79108..aa2869eb31c5 100644 --- a/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/ReadWrite/Int64Tests.cs +++ b/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/ReadWrite/Int64Tests.cs @@ -144,13 +144,11 @@ public void ReadInt64_ZeroPointer_ThrowsException() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Exception is wrapped in a TargetInvocationException in the .NET Framework.")] public void ReadInt64_NullObject_ThrowsAccessViolationException() { Assert.Throws(() => Marshal.ReadInt64(null, 2)); } -#if !netstandard // TODO: Enable for netstandard2.1 [Fact] public void ReadInt64_NotReadable_ThrowsArgumentException() { @@ -162,7 +160,6 @@ public void ReadInt64_NotReadable_ThrowsArgumentException() AssertExtensions.Throws(null, () => Marshal.ReadInt64(collectibleObject, 0)); } -#endif [Fact] public void WriteInt64_ZeroPointer_ThrowsException() @@ -172,13 +169,11 @@ public void WriteInt64_ZeroPointer_ThrowsException() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Exception is wrapped in a TargetInvocationException in the .NET Framework.")] public void WriteInt64_NullObject_ThrowsAccessViolationException() { Assert.Throws(() => Marshal.WriteInt64(null, 2, 0)); } -#if !netstandard // TODO: Enable for netstandard2.1 [Fact] public void WriteInt64_NotReadable_ThrowsArgumentException() { @@ -190,7 +185,6 @@ public void WriteInt64_NotReadable_ThrowsArgumentException() AssertExtensions.Throws(null, () => Marshal.WriteInt64(collectibleObject, 0, 0)); } -#endif public struct BlittableStruct { diff --git a/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/ReadWrite/IntPtrTests.cs b/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/ReadWrite/IntPtrTests.cs index 3fe95412daf6..0ede4ea14c6c 100644 --- a/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/ReadWrite/IntPtrTests.cs +++ b/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/ReadWrite/IntPtrTests.cs @@ -139,13 +139,11 @@ public void ReadIntPtr_ZeroPointer_ThrowsException() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Exception is wrapped in a TargetInvocationException in the .NET Framework.")] public void ReadIntPtr_NullObject_ThrowsAccessViolationException() { Assert.Throws(() => Marshal.ReadIntPtr(null, 2)); } -#if !netstandard // TODO: Enable for netstandard2.1 [Fact] public void ReadIntPtr_NotReadable_ThrowsArgumentException() { @@ -157,7 +155,6 @@ public void ReadIntPtr_NotReadable_ThrowsArgumentException() AssertExtensions.Throws(null, () => Marshal.ReadIntPtr(collectibleObject, 0)); } -#endif [Fact] public void WriteIntPtr_ZeroPointer_ThrowsException() @@ -167,13 +164,11 @@ public void WriteIntPtr_ZeroPointer_ThrowsException() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Exception is wrapped in a TargetInvocationException in the .NET Framework.")] public void WriteIntPtr_NullObject_ThrowsAccessViolationException() { Assert.Throws(() => Marshal.WriteIntPtr(null, 2, (IntPtr)0)); } -#if !netstandard // TODO: Enable for netstandard2.1 [Fact] public void WriteIntPtr_NotReadable_ThrowsArgumentException() { @@ -185,7 +180,6 @@ public void WriteIntPtr_NotReadable_ThrowsArgumentException() AssertExtensions.Throws(null, () => Marshal.WriteIntPtr(collectibleObject, 0, IntPtr.Zero)); } -#endif public struct BlittableStruct { diff --git a/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/SizeOfTests.cs b/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/SizeOfTests.cs index 1f2e5e0854b1..39c55561de34 100644 --- a/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/SizeOfTests.cs +++ b/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/SizeOfTests.cs @@ -65,12 +65,10 @@ public static IEnumerable SizeOf_InvalidType_TestData() yield return new object[] { typeof(GenericClass<>).GetTypeInfo().GenericTypeParameters[0], null }; -#if !netstandard // TODO: Enable for netstandard2.1 AssemblyBuilder assemblyBuilder = AssemblyBuilder.DefineDynamicAssembly(new AssemblyName("Assembly"), AssemblyBuilderAccess.Run); ModuleBuilder moduleBuilder = assemblyBuilder.DefineDynamicModule("Module"); TypeBuilder typeBuilder = moduleBuilder.DefineType("Type"); yield return new object[] { typeBuilder, "t" }; -#endif yield return new object[] { typeof(TestStructWithFxdLPSTRSAFld), null }; } diff --git a/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/StructureToPtrTests.cs b/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/StructureToPtrTests.cs index c492b1456404..82ec079325f8 100644 --- a/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/StructureToPtrTests.cs +++ b/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/StructureToPtrTests.cs @@ -191,7 +191,6 @@ public void StructureToPtr_InvalidLengthByValArrayInStruct_ThrowsArgumentExcepti } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public unsafe void StructureToPtr_StructWithBlittableFixedBuffer_In_NonBlittable_Success() { var str = default(NonBlittableContainingBuffer); @@ -220,7 +219,6 @@ public unsafe void StructureToPtr_StructWithBlittableFixedBuffer_In_NonBlittable } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public unsafe void StructureToPtr_NonBlittableStruct_WithBlittableFixedBuffer_Success() { NonBlittableWithBlittableBuffer x = new NonBlittableWithBlittableBuffer(); @@ -240,7 +238,6 @@ public unsafe void StructureToPtr_NonBlittableStruct_WithBlittableFixedBuffer_Su } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public unsafe void StructureToPtr_OpaqueStruct_In_NonBlittableStructure_Success() { NonBlittableWithOpaque x = new NonBlittableWithOpaque(); diff --git a/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/RuntimeEnvironmentTests.cs b/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/RuntimeEnvironmentTests.cs index 6824f26389cf..1a25749fbcba 100644 --- a/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/RuntimeEnvironmentTests.cs +++ b/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/RuntimeEnvironmentTests.cs @@ -22,28 +22,24 @@ public void RuntimeEnvironmentSysVersion() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "SystemConfigurationFile is not supported on .NET Core.")] public void SystemConfigurationFile_Get_ThrowsPlatformNotSupportedException() { Assert.Throws(() => RuntimeEnvironment.SystemConfigurationFile); } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "GetRuntimeInterfaceAsObject is not supported on .NET Core.")] public void GetRuntimeInterfaceAsObject_Invoke_ThrowsPlatformNotSupportedException() { Assert.Throws(() => RuntimeEnvironment.GetRuntimeInterfaceAsObject(Guid.Empty, Guid.Empty)); } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "GetRuntimeInterfaceAsIntPtr is not supported on .NET Core.")] public void GetRuntimeInterfaceAsIntPtr_Invoke_ThrowsPlatformNotSupportedException() { Assert.Throws(() => RuntimeEnvironment.GetRuntimeInterfaceAsIntPtr(Guid.Empty, Guid.Empty)); } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "FromGlobalAccessCache always returns true on .NET Core.")] public void FromGlobalAccessCache_nNvoke_ReturnsFalse() { Assert.False(RuntimeEnvironment.FromGlobalAccessCache(typeof(RuntimeEnvironmentTests).Assembly)); diff --git a/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/SafeBufferTests.cs b/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/SafeBufferTests.cs index 4b338bff1bf0..81dadc8b017c 100644 --- a/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/SafeBufferTests.cs +++ b/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/SafeBufferTests.cs @@ -25,16 +25,6 @@ public void Initialize_InvalidNumBytes_ThrowsArgumentOutOfRangeException() } [Fact] - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)] - public void Initialize_NumBytesTimesSizeOfEachElement_NetFramework_ThrowsOverflowException() - { - var buffer = new SubBuffer(true); - Assert.Throws(() => buffer.Initialize(uint.MaxValue, uint.MaxValue)); - Assert.Throws(() => buffer.Initialize(uint.MaxValue)); - } - - [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public void Initialize_NumBytesTimesSizeOfEachElement_ThrowsArgumentOutOfRangeExceptionIfNot64Bit() { var buffer = new SubBuffer(true); diff --git a/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/SetWin32ContextInIDispatchAttributeTests.cs b/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/SetWin32ContextInIDispatchAttributeTests.cs index 32f37b4f95da..80e32b41ebf3 100644 --- a/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/SetWin32ContextInIDispatchAttributeTests.cs +++ b/src/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/SetWin32ContextInIDispatchAttributeTests.cs @@ -12,7 +12,6 @@ public class SetWin32ContextInIDispatchAttributeTests private const string TypeName = "System.Runtime.InteropServices.SetWin32ContextInIDispatchAttribute"; [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot | TargetFrameworkMonikers.NetFramework, "This has been removed from the ref in .NET Core and from the source in the .NET Framework.")] public void Ctor_Default_ExistsInSrc() { Type type = typeof(HandleCollector).Assembly.GetType(TypeName); diff --git a/src/System.Runtime.Loader/tests/AssemblyLoadContextTest.cs b/src/System.Runtime.Loader/tests/AssemblyLoadContextTest.cs index 330c0e98af25..c925ac6be578 100644 --- a/src/System.Runtime.Loader/tests/AssemblyLoadContextTest.cs +++ b/src/System.Runtime.Loader/tests/AssemblyLoadContextTest.cs @@ -12,7 +12,6 @@ namespace System.Runtime.Loader.Tests { - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "AssemblyLoadContext not supported on .NET Native")] public partial class AssemblyLoadContextTest { private const string TestAssembly = "System.Runtime.Loader.Test.Assembly"; diff --git a/src/System.Runtime.Loader/tests/DefaultContext/DefaultLoadContextTest.cs b/src/System.Runtime.Loader/tests/DefaultContext/DefaultLoadContextTest.cs index e391b211dffa..b544279a119b 100644 --- a/src/System.Runtime.Loader/tests/DefaultContext/DefaultLoadContextTest.cs +++ b/src/System.Runtime.Loader/tests/DefaultContext/DefaultLoadContextTest.cs @@ -44,7 +44,6 @@ protected override Assembly Load(AssemblyName assemblyName) } } - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "AssemblyLoadContext not supported on .NET Native")] public class DefaultLoadContextTests { private const string TestAssemblyName = "System.Runtime.Loader.Noop.Assembly"; diff --git a/src/System.Runtime.Loader/tests/RefEmitLoadContext/RefEmitLoadContextTest.cs b/src/System.Runtime.Loader/tests/RefEmitLoadContext/RefEmitLoadContextTest.cs index 077183617e42..6cf1d05c49ed 100644 --- a/src/System.Runtime.Loader/tests/RefEmitLoadContext/RefEmitLoadContextTest.cs +++ b/src/System.Runtime.Loader/tests/RefEmitLoadContext/RefEmitLoadContextTest.cs @@ -30,7 +30,6 @@ protected override Assembly Load(AssemblyName assemblyName) } } - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "AssemblyLoadContext not supported on .NET Native")] public class RefEmitLoadContextTests { public static string s_loadFromPath = null; diff --git a/src/System.Runtime.Numerics/tests/BigInteger/Comparison.cs b/src/System.Runtime.Numerics/tests/BigInteger/Comparison.cs index 4df2308816b0..f06231a74f17 100644 --- a/src/System.Runtime.Numerics/tests/BigInteger/Comparison.cs +++ b/src/System.Runtime.Numerics/tests/BigInteger/Comparison.cs @@ -367,14 +367,6 @@ public static void IComparable_Invalid(string paramName) } [Fact] - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)] // Desktop misses Exception.ParamName fixed in .NETCore - public static void IComparable_Invalid_net46() - { - IComparable_Invalid(null); - } - - [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public static void IComparable_Invalid_netcore() { IComparable_Invalid("obj"); diff --git a/src/System.Runtime.Numerics/tests/BigInteger/IsEven.cs b/src/System.Runtime.Numerics/tests/BigInteger/IsEven.cs index 7c49e8494b14..6594d3fad821 100644 --- a/src/System.Runtime.Numerics/tests/BigInteger/IsEven.cs +++ b/src/System.Runtime.Numerics/tests/BigInteger/IsEven.cs @@ -13,7 +13,6 @@ public class IsEvenTest private static int s_seed = 0; [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public static void RunIsEvenTests() { Random random = new Random(s_seed); diff --git a/src/System.Runtime.Numerics/tests/BigInteger/cast_from.cs b/src/System.Runtime.Numerics/tests/BigInteger/cast_from.cs index 921e00a060b5..d59625afccfd 100644 --- a/src/System.Runtime.Numerics/tests/BigInteger/cast_from.cs +++ b/src/System.Runtime.Numerics/tests/BigInteger/cast_from.cs @@ -577,7 +577,6 @@ public static void RunDoubleExplicitCastFromBigIntegerTests() [Fact] [OuterLoop] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public static void RunDoubleExplicitCastFromLargeBigIntegerTests() { DoubleExplicitCastFromLargeBigIntegerTests(0, 4, 32, 3); diff --git a/src/System.Runtime.Numerics/tests/BigInteger/log.cs b/src/System.Runtime.Numerics/tests/BigInteger/log.cs index a8cea3989b8f..adeef46023b9 100644 --- a/src/System.Runtime.Numerics/tests/BigInteger/log.cs +++ b/src/System.Runtime.Numerics/tests/BigInteger/log.cs @@ -134,7 +134,6 @@ public static void RunLogTests() [Fact] [OuterLoop] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public static void RunLargeValueLogTests() { LargeValueLogTests(0, 4, 64, 3); diff --git a/src/System.Runtime.Numerics/tests/BigInteger/modpow.cs b/src/System.Runtime.Numerics/tests/BigInteger/modpow.cs index d65b85c5746b..40e557771050 100644 --- a/src/System.Runtime.Numerics/tests/BigInteger/modpow.cs +++ b/src/System.Runtime.Numerics/tests/BigInteger/modpow.cs @@ -140,7 +140,6 @@ public static void ModPow1Large2SmallInt() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public static void ModPow1Large2SmallInt_Threshold() { // Again, with lower threshold @@ -165,7 +164,6 @@ public static void ModPow2Large1SmallInt() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public static void ModPow2Large1SmallInt_Threshold() { // Again, with lower threshold @@ -186,7 +184,6 @@ public static void ModPow2Large1SmallInt_Threshold() [InlineData("736513799451968530811005754031332418210960966881742655756522735504778110620671049112529346250333710388060811959329786494662578020803", "2461175085563866950903873687720858523536520498137697316698237108626602445202960480677695918813575265778826908481129155012799", "-4722693720735888562993277045098354134891725536023070176847814685098361292027040929352405620815883795027263132404351040", "4351573186631261607388198896754285562669240685903971199359912143458682154189588696264319780329366022294935204028039787")] [InlineData("1596188639947986471148999794547338", "685242191738212089917782567856594513073397739443", "41848166029740752457613562518205823134173790454761036532025758411484449588176128053901271638836032557551179866133091058357374964041641117585422447497779410336188602585660372002644517668041207657383104649333118253", "39246949850380693159338034407642149926180988060650630387722725303281343126585456713282439764667310808891687831648451269002447916277601468727040185218264602698691553232132525542650964722093335105211816394635493987")] [InlineData("-1506852741293695463963822334869441845197951776565891060639754936248401744065969556756496718308248025911048010080232290368562210204958094544173209793990218122", "64905085725614938357105826012272472070910693443851911667721848542473785070747281964799379996923261457185847459711", "2740467233603031668807697475486217767705051", "-1905434239471820365929630558127219204166613")] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public static void ModPow3LargeInt(string value, string exponent, string modulus, string expected) { BigInteger valueInt = BigInteger.Parse(value); diff --git a/src/System.Runtime.Numerics/tests/BigInteger/multiply.cs b/src/System.Runtime.Numerics/tests/BigInteger/multiply.cs index 03538d9258fd..0be9b8f3aa79 100644 --- a/src/System.Runtime.Numerics/tests/BigInteger/multiply.cs +++ b/src/System.Runtime.Numerics/tests/BigInteger/multiply.cs @@ -35,7 +35,6 @@ public static void RunMultiply_TwoLargeBigIntegers() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public static void RunMultiply_TwoLargeBigIntegers_Threshold() { // Again, with lower threshold diff --git a/src/System.Runtime.Numerics/tests/BigInteger/pow.cs b/src/System.Runtime.Numerics/tests/BigInteger/pow.cs index 5804d996e81b..9457a9d394ea 100644 --- a/src/System.Runtime.Numerics/tests/BigInteger/pow.cs +++ b/src/System.Runtime.Numerics/tests/BigInteger/pow.cs @@ -169,7 +169,6 @@ public static void RunPowNegative() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public static void RunOverflow() { var bytes = new byte[1000]; diff --git a/src/System.Runtime.Numerics/tests/ComplexTests.cs b/src/System.Runtime.Numerics/tests/ComplexTests.cs index f99626b9490e..1af105471df9 100644 --- a/src/System.Runtime.Numerics/tests/ComplexTests.cs +++ b/src/System.Runtime.Numerics/tests/ComplexTests.cs @@ -65,7 +65,6 @@ public static void ImaginaryOne() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public static void SqrtMinusOne() { Assert.Equal(Complex.Sqrt(-1.0), Complex.ImaginaryOne); @@ -256,7 +255,6 @@ public static IEnumerable Abs_Advanced_TestData() [Theory] [MemberData(nameof(Abs_Advanced_TestData))] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public static void Abs_Advanced(double real, double imaginary, double expected) { var complex = new Complex(real, imaginary); @@ -325,7 +323,6 @@ public static IEnumerable ACos_Advanced_TestData() } [Theory, MemberData(nameof(ACos_Advanced_TestData))] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public static void ACos_Advanced(double real, double imaginary, double expectedReal, double expectedImaginary) { var complex = new Complex(real, imaginary); @@ -353,15 +350,6 @@ public static IEnumerable ACos_Legacy_TestData() } } - [Theory, MemberData(nameof(ACos_Legacy_TestData))] - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)] - public static void ACos_Legacy(double real, double imaginary, double expectedReal, double expectedImaginary) - { - var complex = new Complex(real, imaginary); - Complex result = Complex.Acos(complex); - VerifyRealImaginaryProperties(result, expectedReal, expectedImaginary); - } - public static IEnumerable Add_TestData() { yield return new object[] { 0, 0, RandomPositiveDouble(), RandomPositiveDouble() }; // 0 + x = x @@ -470,7 +458,6 @@ public static IEnumerable ASin_Advanced_TestData() } [Theory, MemberData(nameof(ASin_Advanced_TestData))] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public static void ASin_Advanced(double real, double imaginary, double expectedReal, double expectedImaginary) { var complex = new Complex(real, imaginary); @@ -498,15 +485,6 @@ public static IEnumerable ASin_Legacy_TestData() } } - [Theory, MemberData(nameof(ASin_Legacy_TestData))] - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)] - public static void ASin_Legacy(double real, double imaginary, double expectedReal, double expectedImaginary) - { - var complex = new Complex(real, imaginary); - Complex result = Complex.Asin(complex); - VerifyRealImaginaryProperties(result, expectedReal, expectedImaginary); - } - [Theory] [MemberData(nameof(Primitives_2_TestData))] [MemberData(nameof(SmallRandom_2_TestData))] @@ -620,7 +598,6 @@ public static IEnumerable Cos_Advanced_TestData() [Theory] [MemberData(nameof(Cos_Advanced_TestData_Shared))] [MemberData(nameof(Cos_Advanced_TestData))] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public static void Cos_Advanced(double real, double imaginary, double expectedReal, double expectedImaginary) { var complex = new Complex(real, imaginary); @@ -636,18 +613,6 @@ public static IEnumerable Cos_Legacy_TestData() yield return new object[] { double.MinValue, double.MinValue, double.NegativeInfinity, double.NegativeInfinity }; } - [Theory] - [MemberData(nameof(Cos_Advanced_TestData_Shared))] - [MemberData(nameof(Cos_Legacy_TestData))] - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)] - public static void Cos_Legacy(double real, double imaginary, double expectedReal, double expectedImaginary) - { - var complex = new Complex(real, imaginary); - Complex result = Complex.Cos(complex); - VerifyRealImaginaryProperties(result, expectedReal, expectedImaginary); - } - - [Theory] [MemberData(nameof(Primitives_2_TestData))] [MemberData(nameof(SmallRandom_2_TestData))] @@ -698,7 +663,6 @@ public static IEnumerable Cosh_Advanced_TestData() [Theory] [MemberData(nameof(Cosh_Advanced_TestData_Shared))] [MemberData(nameof(Cosh_Advanced_TestData))] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public static void Cosh_Advanced(double real, double imaginary, double expectedReal, double expectedImaginary) { var complex = new Complex(real, imaginary); @@ -714,17 +678,6 @@ public static IEnumerable Cosh_Legacy_TestData() yield return new object[] { double.MinValue, double.MinValue, double.NegativeInfinity, double.PositiveInfinity }; } - [Theory] - [MemberData(nameof(Cosh_Advanced_TestData_Shared))] - [MemberData(nameof(Cosh_Legacy_TestData))] - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)] - public static void Cosh_Legacy(double real, double imaginary, double expectedReal, double expectedImaginary) - { - var complex = new Complex(real, imaginary); - Complex result = Complex.Cosh(complex); - VerifyRealImaginaryProperties(result, expectedReal, expectedImaginary); - } - public static IEnumerable Divide_TestData() { yield return new object[] { 0, 0, 10, 50 }; // 0 / x = 0 @@ -819,7 +772,6 @@ public static void DivideByComplex(double realLeft, double imaginaryLeft, double } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public static void Equals_netcore() { // Invalid values @@ -961,7 +913,6 @@ public static IEnumerable Exp_TestData() [MemberData(nameof(Exp_TestData))] [MemberData(nameof(Primitives_2_TestData))] [MemberData(nameof(SmallRandom_2_TestData))] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public static void Exp(double real, double imaginary) { Complex expected; @@ -993,45 +944,6 @@ public static void Exp(double real, double imaginary) VerifyRealImaginaryProperties(result, expected.Real, expected.Imaginary); } - [Theory] - [MemberData(nameof(Exp_TestData))] - [MemberData(nameof(Primitives_2_TestData))] - [MemberData(nameof(SmallRandom_2_TestData))] - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)] - public static void Exp_Legacy(double real, double imaginary) - { - // This test validates legacy .NET Framework behavior. - // The behavior of Math.Cos(double.MaxValue) is different and thus affects the expected results here. - - Complex expected; - // Special case the complex {double.MaxValue, double.MaxValue) - if (real == double.MaxValue && imaginary == double.MaxValue) - { - expected = new Complex(Math.Cos(double.MaxValue) * double.PositiveInfinity, double.PositiveInfinity); - } - else - { - // Verify with e(x+y) = e(x)*e(y) if xy == yx - var realComplex = new Complex(real, 0); - var imaginaryComplex = new Complex(0, imaginary); - - Complex ri = realComplex * imaginaryComplex; - Complex ir = imaginaryComplex * realComplex; - if (!ri.Equals(ir)) - { - return; - } - - Complex realExponential = Complex.Exp(realComplex); - Complex imaginaryExpontential = Complex.Exp(imaginaryComplex); - expected = realExponential * imaginaryExpontential; - } - - var complex = new Complex(real, imaginary); - Complex result = Complex.Exp(complex); - VerifyRealImaginaryProperties(result, expected.Real, expected.Imaginary); - } - [Fact] public static void Exp_MaxReal() { @@ -1062,7 +974,6 @@ public static IEnumerable FromPolarCoordinates_TestData() [Theory] [MemberData(nameof(FromPolarCoordinates_TestData))] [MemberData(nameof(Invalid_2_TestData))] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public static void FromPolarCoordinates(double magnitude, double phase) { Complex complex = Complex.FromPolarCoordinates(magnitude, phase); @@ -1109,33 +1020,6 @@ public static void FromPolarCoordinates(double magnitude, double phase) VerifyMagnitudePhaseProperties(complex, magnitude, phase); } - [Theory] - [MemberData(nameof(FromPolarCoordinates_TestData))] - [MemberData(nameof(Invalid_2_TestData))] - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)] - public static void FromPolarCoordinates_Legacy(double magnitude, double phase) - { - Complex complex = Complex.FromPolarCoordinates(magnitude, phase); - - // double.IsNaN(magnitude) is checked in the verification method. - if (double.IsNaN(phase) || double.IsInfinity(phase)) - { - magnitude = double.NaN; - phase = double.NaN; - } - // Special check in Complex.Abs method - else if (double.IsInfinity(magnitude)) - { - magnitude = double.PositiveInfinity; - phase = double.NaN; - } - - VerifyMagnitudePhaseProperties(complex, magnitude, phase); - - complex = new Complex(complex.Real, complex.Imaginary); - VerifyMagnitudePhaseProperties(complex, magnitude, phase); - } - [Fact] public static IEnumerable Log_TestData() { @@ -1489,7 +1373,6 @@ public static IEnumerable Sin_Advanced_TestData_Shared() [Theory] [MemberData(nameof(Sin_Advanced_TestData_Shared))] [MemberData(nameof(Sin_Advanced_TestData))] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public static void Sin_Advanced(double real, double imaginary, double expectedReal, double expectedImaginary) { var complex = new Complex(real, imaginary); @@ -1505,17 +1388,6 @@ public static IEnumerable Sin_Legacy_TestData() yield return new object[] { double.MinValue, double.MinValue, double.NegativeInfinity, double.PositiveInfinity }; } - [Theory] - [MemberData(nameof(Sin_Advanced_TestData_Shared))] - [MemberData(nameof(Sin_Legacy_TestData))] - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)] - public static void Sin_Legacy(double real, double imaginary, double expectedReal, double expectedImaginary) - { - var complex = new Complex(real, imaginary); - Complex result = Complex.Sin(complex); - VerifyRealImaginaryProperties(result, expectedReal, expectedImaginary); - } - [Theory] [MemberData(nameof(Primitives_2_TestData))] [MemberData(nameof(SmallRandom_2_TestData))] @@ -1566,7 +1438,6 @@ public static IEnumerable Sinh_Advanced_TestData() [Theory] [MemberData(nameof(Sinh_Advanced_TestData_Shared))] [MemberData(nameof(Sinh_Advanced_TestData))] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public static void Sinh_Advanced(double real, double imaginary, double expectedReal, double expectedImaginary) { var complex = new Complex(real, imaginary); @@ -1582,18 +1453,6 @@ public static IEnumerable Sinh_Legacy_TestData() yield return new object[] { double.MinValue, double.MinValue, double.PositiveInfinity, double.NegativeInfinity }; } - [Theory] - [MemberData(nameof(Sinh_Advanced_TestData_Shared))] - [MemberData(nameof(Sinh_Legacy_TestData))] - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)] - public static void Sinh_Legacy(double real, double imaginary, double expectedReal, double expectedImaginary) - { - var complex = new Complex(real, imaginary); - Complex result = Complex.Sinh(complex); - VerifyRealImaginaryProperties(result, expectedReal, expectedImaginary); - } - - public static IEnumerable Subtract_TestData() { yield return new object[] { RandomPositiveDouble(), RandomPositiveDouble(), 0, 0 }; // x - 0 = x @@ -1718,7 +1577,6 @@ public static void Sqrt(double real, double imaginary, double expectedReal, doub [Theory] [MemberData(nameof(Sqrt_AdvancedTestData))] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public static void Sqrt_Advanced(double real, double imaginary, double expectedReal, double expectedImaginary) { var complex = new Complex(real, imaginary); @@ -1789,7 +1647,6 @@ public static IEnumerable Tan_Legacy_TestData() } [Theory, MemberData(nameof(Tan_Advanced_TestData))] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public static void Tan_Advanced(double real, double imaginary, double expectedReal, double expectedImaginary) { var complex = new Complex(real, imaginary); @@ -1797,15 +1654,6 @@ public static void Tan_Advanced(double real, double imaginary, double expectedRe VerifyRealImaginaryProperties(result, expectedReal, expectedImaginary); } - [Theory, MemberData(nameof(Tan_Legacy_TestData))] - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)] - public static void Tan_Legacy(double real, double imaginary, double expectedReal, double expectedImaginary) - { - var complex = new Complex(real, imaginary); - Complex result = Complex.Tan(complex); - VerifyRealImaginaryProperties(result, expectedReal, expectedImaginary); - } - [Theory] [MemberData(nameof(Primitives_2_TestData))] [MemberData(nameof(SmallRandom_2_TestData))] @@ -1862,7 +1710,6 @@ public static IEnumerable Tanh_Legacy_TestData() } [Theory, MemberData(nameof(Tanh_Advanced_TestData))] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public static void Tanh_Advanced(double real, double imaginary, double expectedReal, double expectedImaginary) { var complex = new Complex(real, imaginary); @@ -1870,15 +1717,6 @@ public static void Tanh_Advanced(double real, double imaginary, double expectedR VerifyRealImaginaryProperties(result, expectedReal, expectedImaginary); } - [Theory, MemberData(nameof(Tanh_Legacy_TestData))] - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)] - public static void Tanh_Legacy(double real, double imaginary, double expectedReal, double expectedImaginary) - { - var complex = new Complex(real, imaginary); - Complex result = Complex.Tanh(complex); - VerifyRealImaginaryProperties(result, expectedReal, expectedImaginary); - } - [Theory] [MemberData(nameof(Boundaries_2_TestData))] [MemberData(nameof(Primitives_2_TestData))] diff --git a/src/System.Runtime.Numerics/tests/Configurations.props b/src/System.Runtime.Numerics/tests/Configurations.props index 68ac7b9c023b..f74685e4dea7 100644 --- a/src/System.Runtime.Numerics/tests/Configurations.props +++ b/src/System.Runtime.Numerics/tests/Configurations.props @@ -1,8 +1,8 @@  - netstandard; netcoreapp; + uap; diff --git a/src/System.Runtime.Numerics/tests/System.Runtime.Numerics.Tests.csproj b/src/System.Runtime.Numerics/tests/System.Runtime.Numerics.Tests.csproj index 49bbb84f6d48..bbad239a8bb8 100644 --- a/src/System.Runtime.Numerics/tests/System.Runtime.Numerics.Tests.csproj +++ b/src/System.Runtime.Numerics/tests/System.Runtime.Numerics.Tests.csproj @@ -2,7 +2,7 @@ {28AE24F8-BEF4-4358-B612-ADD9D587C8E1} true - netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release + netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release diff --git a/src/System.Runtime.Serialization.Formatters/tests/BinaryFormatterTestData.cs b/src/System.Runtime.Serialization.Formatters/tests/BinaryFormatterTestData.cs index 7e6febf06c30..f852cc27cfc7 100644 --- a/src/System.Runtime.Serialization.Formatters/tests/BinaryFormatterTestData.cs +++ b/src/System.Runtime.Serialization.Formatters/tests/BinaryFormatterTestData.cs @@ -204,66 +204,62 @@ public static IEnumerable SerializableObjects() var checkoutException2 = new CheckoutException("message", 0); yield return new object[] { PopulateException(checkoutException2), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAElTeXN0ZW0sIFZlcnNpb249NC4wLjAuMCwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1iNzdhNWM1NjE5MzRlMDg5BQEAAAAuU3lzdGVtLkNvbXBvbmVudE1vZGVsLkRlc2lnbi5DaGVja291dEV4Y2VwdGlvbgwAAAAJQ2xhc3NOYW1lB01lc3NhZ2UERGF0YQ5Jbm5lckV4Y2VwdGlvbgdIZWxwVVJMEFN0YWNrVHJhY2VTdHJpbmcWUmVtb3RlU3RhY2tUcmFjZVN0cmluZxBSZW1vdGVTdGFja0luZGV4D0V4Y2VwdGlvbk1ldGhvZAdIUmVzdWx0BlNvdXJjZQ1XYXRzb25CdWNrZXRzAQEDAwEBAQABAAEHKVN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsEFN5c3RlbS5FeGNlcHRpb24ICAICAAAABgMAAAAuU3lzdGVtLkNvbXBvbmVudE1vZGVsLkRlc2lnbi5DaGVja291dEV4Y2VwdGlvbgYEAAAAB21lc3NhZ2UJBQAAAAoGBgAAABlodHRwOi8vbXNkbi5taWNyb3NvZnQuY29tBgcAAAAUU3RhY2tUcmFjZSBzdHJpbmcuLi4GCAAAABtSZW1vdGUgU3RhY2tUcmFjZSBzdHJpbmcuLi4AAAAACugDAAAGCQAAABdFeGNlcHRpb25fQ2xhc3NfU2FtcGxlcwoEBQAAAClTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbAMAAAAEaGVhZAd2ZXJzaW9uBWNvdW50AwAAOFN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsK0RpY3Rpb25hcnlOb2RlCAgJCgAAAAIAAAACAAAABAoAAAA4U3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwrRGljdGlvbmFyeU5vZGUDAAAAA2tleQV2YWx1ZQRuZXh0AgIDOFN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsK0RpY3Rpb25hcnlOb2RlBgsAAAAGc2VjcmV0CAEBCQwAAAABDAAAAAoAAAAICAEAAAAGDQAAAANvbmUKCw==", TargetFrameworkMoniker.netcoreapp20), new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAElTeXN0ZW0sIFZlcnNpb249NC4wLjAuMCwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1iNzdhNWM1NjE5MzRlMDg5BQEAAAAuU3lzdGVtLkNvbXBvbmVudE1vZGVsLkRlc2lnbi5DaGVja291dEV4Y2VwdGlvbgwAAAAJQ2xhc3NOYW1lB01lc3NhZ2UERGF0YQ5Jbm5lckV4Y2VwdGlvbgdIZWxwVVJMEFN0YWNrVHJhY2VTdHJpbmcWUmVtb3RlU3RhY2tUcmFjZVN0cmluZxBSZW1vdGVTdGFja0luZGV4D0V4Y2VwdGlvbk1ldGhvZAdIUmVzdWx0BlNvdXJjZQ1XYXRzb25CdWNrZXRzAQEDAwEBAQABAAEHKVN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsEFN5c3RlbS5FeGNlcHRpb24ICAICAAAABgMAAAAuU3lzdGVtLkNvbXBvbmVudE1vZGVsLkRlc2lnbi5DaGVja291dEV4Y2VwdGlvbgYEAAAAB21lc3NhZ2UJBQAAAAoGBgAAABlodHRwOi8vbXNkbi5taWNyb3NvZnQuY29tBgcAAAAUU3RhY2tUcmFjZSBzdHJpbmcuLi4GCAAAABtSZW1vdGUgU3RhY2tUcmFjZSBzdHJpbmcuLi4AAAAACugDAAAGCQAAABdFeGNlcHRpb25fQ2xhc3NfU2FtcGxlcwoEBQAAAClTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbAMAAAAEaGVhZAd2ZXJzaW9uBWNvdW50AwAAOFN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsK0RpY3Rpb25hcnlOb2RlCAgJCgAAAAIAAAACAAAABAoAAAA4U3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwrRGljdGlvbmFyeU5vZGUDAAAAA2tleQV2YWx1ZQRuZXh0AgIDOFN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsK0RpY3Rpb25hcnlOb2RlBgsAAAAGc2VjcmV0CAEBCQwAAAABDAAAAAoAAAAICAEAAAAGDQAAAANvbmUKCw==", TargetFrameworkMoniker.netfx461) } }; - // Assembly load errors with shims in uapaot configuration. Issue #24916 - if (!PlatformDetection.IsNetNative) - { - // System.Configuration + // System.Configuration - var configurationErrorsException = new ConfigurationErrorsException("message", exception, "path.md", 1); - // ConfigurationErrorsException sets its HResult itself therefore we pass setHResult as false. - yield return new object[] { PopulateException(configurationErrorsException, setHResult: false), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uQ29uZmlndXJhdGlvbiwgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWIwM2Y1ZjdmMTFkNTBhM2EFAQAAADFTeXN0ZW0uQ29uZmlndXJhdGlvbi5Db25maWd1cmF0aW9uRXJyb3JzRXhjZXB0aW9uEQAAAAlDbGFzc05hbWUHTWVzc2FnZQREYXRhDklubmVyRXhjZXB0aW9uB0hlbHBVUkwQU3RhY2tUcmFjZVN0cmluZxZSZW1vdGVTdGFja1RyYWNlU3RyaW5nEFJlbW90ZVN0YWNrSW5kZXgPRXhjZXB0aW9uTWV0aG9kB0hSZXN1bHQGU291cmNlDVdhdHNvbkJ1Y2tldHMIZmlsZW5hbWUEbGluZQ1maXJzdEZpbGVuYW1lCWZpcnN0TGluZQVjb3VudAEBAwMBAQEAAQABBwIAAQAAKVN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsEFN5c3RlbS5FeGNlcHRpb24ICAIICAgCAAAABgMAAAAxU3lzdGVtLkNvbmZpZ3VyYXRpb24uQ29uZmlndXJhdGlvbkVycm9yc0V4Y2VwdGlvbgYEAAAAB21lc3NhZ2UJBQAAAAkGAAAABgcAAAAZaHR0cDovL21zZG4ubWljcm9zb2Z0LmNvbQYIAAAAFFN0YWNrVHJhY2Ugc3RyaW5nLi4uBgkAAAAbUmVtb3RlIFN0YWNrVHJhY2Ugc3RyaW5nLi4uAAAAAAoCGROABgoAAAAXRXhjZXB0aW9uX0NsYXNzX1NhbXBsZXMKCgAAAAAGCwAAAAdwYXRoLm1kAQAAAAAAAAAEBQAAAClTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbAMAAAAEaGVhZAd2ZXJzaW9uBWNvdW50AwAAOFN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsK0RpY3Rpb25hcnlOb2RlCAgJDAAAAAIAAAACAAAABAYAAAAQU3lzdGVtLkV4Y2VwdGlvbgwAAAAJQ2xhc3NOYW1lB01lc3NhZ2UERGF0YQ5Jbm5lckV4Y2VwdGlvbgdIZWxwVVJMEFN0YWNrVHJhY2VTdHJpbmcWUmVtb3RlU3RhY2tUcmFjZVN0cmluZxBSZW1vdGVTdGFja0luZGV4D0V4Y2VwdGlvbk1ldGhvZAdIUmVzdWx0BlNvdXJjZQ1XYXRzb25CdWNrZXRzAQEDAwEBAQABAAEHKVN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsEFN5c3RlbS5FeGNlcHRpb24ICAIGDQAAABBTeXN0ZW0uRXhjZXB0aW9uCQQAAAAJDwAAAAkQAAAACQcAAAAJCAAAAAkJAAAAAAAAAAroAwAACQoAAAAKBAwAAAA4U3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwrRGljdGlvbmFyeU5vZGUDAAAAA2tleQV2YWx1ZQRuZXh0AgIDOFN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsK0RpY3Rpb25hcnlOb2RlBhUAAAAGc2VjcmV0CAEBCRYAAAABDwAAAAUAAAAJFwAAAAIAAAACAAAAARAAAAAGAAAACQ0AAAAGGQAAABdJbm5lciBleGNlcHRpb24gbWVzc2FnZQoKCgoKAAAAAAoAFROACgoBFgAAAAwAAAAICAEAAAAGGgAAAANvbmUKARcAAAAMAAAACRUAAAAIAQEJHAAAAAEcAAAADAAAAAgIAQAAAAkaAAAACgs=", TargetFrameworkMoniker.netcoreapp20), new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uQ29uZmlndXJhdGlvbiwgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWIwM2Y1ZjdmMTFkNTBhM2EFAQAAADFTeXN0ZW0uQ29uZmlndXJhdGlvbi5Db25maWd1cmF0aW9uRXJyb3JzRXhjZXB0aW9uEQAAAAlDbGFzc05hbWUHTWVzc2FnZQREYXRhDklubmVyRXhjZXB0aW9uB0hlbHBVUkwQU3RhY2tUcmFjZVN0cmluZxZSZW1vdGVTdGFja1RyYWNlU3RyaW5nEFJlbW90ZVN0YWNrSW5kZXgPRXhjZXB0aW9uTWV0aG9kB0hSZXN1bHQGU291cmNlDVdhdHNvbkJ1Y2tldHMIZmlsZW5hbWUEbGluZQ1maXJzdEZpbGVuYW1lCWZpcnN0TGluZQVjb3VudAEBAwMBAQEAAQABBwIAAQAAKVN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsEFN5c3RlbS5FeGNlcHRpb24ICAIICAgCAAAABgMAAAAxU3lzdGVtLkNvbmZpZ3VyYXRpb24uQ29uZmlndXJhdGlvbkVycm9yc0V4Y2VwdGlvbgYEAAAAB21lc3NhZ2UJBQAAAAkGAAAABgcAAAAZaHR0cDovL21zZG4ubWljcm9zb2Z0LmNvbQYIAAAAFFN0YWNrVHJhY2Ugc3RyaW5nLi4uBgkAAAAbUmVtb3RlIFN0YWNrVHJhY2Ugc3RyaW5nLi4uAAAAAAoCGROABgoAAAAXRXhjZXB0aW9uX0NsYXNzX1NhbXBsZXMKCgAAAAAGCwAAAAdwYXRoLm1kAQAAAAAAAAAEBQAAAClTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbAMAAAAEaGVhZAd2ZXJzaW9uBWNvdW50AwAAOFN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsK0RpY3Rpb25hcnlOb2RlCAgJDAAAAAIAAAACAAAABAYAAAAQU3lzdGVtLkV4Y2VwdGlvbgwAAAAJQ2xhc3NOYW1lB01lc3NhZ2UERGF0YQ5Jbm5lckV4Y2VwdGlvbgdIZWxwVVJMEFN0YWNrVHJhY2VTdHJpbmcWUmVtb3RlU3RhY2tUcmFjZVN0cmluZxBSZW1vdGVTdGFja0luZGV4D0V4Y2VwdGlvbk1ldGhvZAdIUmVzdWx0BlNvdXJjZQ1XYXRzb25CdWNrZXRzAQEDAwEBAQABAAEHKVN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsEFN5c3RlbS5FeGNlcHRpb24ICAIGDQAAABBTeXN0ZW0uRXhjZXB0aW9uCQQAAAAJDwAAAAkQAAAACQcAAAAJCAAAAAkJAAAAAAAAAAroAwAACQoAAAAKBAwAAAA4U3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwrRGljdGlvbmFyeU5vZGUDAAAAA2tleQV2YWx1ZQRuZXh0AgIDOFN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsK0RpY3Rpb25hcnlOb2RlBhUAAAAGc2VjcmV0CAEBCRYAAAABDwAAAAUAAAAJFwAAAAIAAAACAAAAARAAAAAGAAAACQ0AAAAGGQAAABdJbm5lciBleGNlcHRpb24gbWVzc2FnZQoKCgoKAAAAAAoAFROACgoBFgAAAAwAAAAICAEAAAAGGgAAAANvbmUKARcAAAAMAAAACRUAAAAIAQEJHAAAAAEcAAAADAAAAAgIAQAAAAkaAAAACgs=", TargetFrameworkMoniker.netfx461) } }; + var configurationErrorsException = new ConfigurationErrorsException("message", exception, "path.md", 1); + // ConfigurationErrorsException sets its HResult itself therefore we pass setHResult as false. + yield return new object[] { PopulateException(configurationErrorsException, setHResult: false), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uQ29uZmlndXJhdGlvbiwgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWIwM2Y1ZjdmMTFkNTBhM2EFAQAAADFTeXN0ZW0uQ29uZmlndXJhdGlvbi5Db25maWd1cmF0aW9uRXJyb3JzRXhjZXB0aW9uEQAAAAlDbGFzc05hbWUHTWVzc2FnZQREYXRhDklubmVyRXhjZXB0aW9uB0hlbHBVUkwQU3RhY2tUcmFjZVN0cmluZxZSZW1vdGVTdGFja1RyYWNlU3RyaW5nEFJlbW90ZVN0YWNrSW5kZXgPRXhjZXB0aW9uTWV0aG9kB0hSZXN1bHQGU291cmNlDVdhdHNvbkJ1Y2tldHMIZmlsZW5hbWUEbGluZQ1maXJzdEZpbGVuYW1lCWZpcnN0TGluZQVjb3VudAEBAwMBAQEAAQABBwIAAQAAKVN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsEFN5c3RlbS5FeGNlcHRpb24ICAIICAgCAAAABgMAAAAxU3lzdGVtLkNvbmZpZ3VyYXRpb24uQ29uZmlndXJhdGlvbkVycm9yc0V4Y2VwdGlvbgYEAAAAB21lc3NhZ2UJBQAAAAkGAAAABgcAAAAZaHR0cDovL21zZG4ubWljcm9zb2Z0LmNvbQYIAAAAFFN0YWNrVHJhY2Ugc3RyaW5nLi4uBgkAAAAbUmVtb3RlIFN0YWNrVHJhY2Ugc3RyaW5nLi4uAAAAAAoCGROABgoAAAAXRXhjZXB0aW9uX0NsYXNzX1NhbXBsZXMKCgAAAAAGCwAAAAdwYXRoLm1kAQAAAAAAAAAEBQAAAClTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbAMAAAAEaGVhZAd2ZXJzaW9uBWNvdW50AwAAOFN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsK0RpY3Rpb25hcnlOb2RlCAgJDAAAAAIAAAACAAAABAYAAAAQU3lzdGVtLkV4Y2VwdGlvbgwAAAAJQ2xhc3NOYW1lB01lc3NhZ2UERGF0YQ5Jbm5lckV4Y2VwdGlvbgdIZWxwVVJMEFN0YWNrVHJhY2VTdHJpbmcWUmVtb3RlU3RhY2tUcmFjZVN0cmluZxBSZW1vdGVTdGFja0luZGV4D0V4Y2VwdGlvbk1ldGhvZAdIUmVzdWx0BlNvdXJjZQ1XYXRzb25CdWNrZXRzAQEDAwEBAQABAAEHKVN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsEFN5c3RlbS5FeGNlcHRpb24ICAIGDQAAABBTeXN0ZW0uRXhjZXB0aW9uCQQAAAAJDwAAAAkQAAAACQcAAAAJCAAAAAkJAAAAAAAAAAroAwAACQoAAAAKBAwAAAA4U3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwrRGljdGlvbmFyeU5vZGUDAAAAA2tleQV2YWx1ZQRuZXh0AgIDOFN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsK0RpY3Rpb25hcnlOb2RlBhUAAAAGc2VjcmV0CAEBCRYAAAABDwAAAAUAAAAJFwAAAAIAAAACAAAAARAAAAAGAAAACQ0AAAAGGQAAABdJbm5lciBleGNlcHRpb24gbWVzc2FnZQoKCgoKAAAAAAoAFROACgoBFgAAAAwAAAAICAEAAAAGGgAAAANvbmUKARcAAAAMAAAACRUAAAAIAQEJHAAAAAEcAAAADAAAAAgIAQAAAAkaAAAACgs=", TargetFrameworkMoniker.netcoreapp20), new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uQ29uZmlndXJhdGlvbiwgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWIwM2Y1ZjdmMTFkNTBhM2EFAQAAADFTeXN0ZW0uQ29uZmlndXJhdGlvbi5Db25maWd1cmF0aW9uRXJyb3JzRXhjZXB0aW9uEQAAAAlDbGFzc05hbWUHTWVzc2FnZQREYXRhDklubmVyRXhjZXB0aW9uB0hlbHBVUkwQU3RhY2tUcmFjZVN0cmluZxZSZW1vdGVTdGFja1RyYWNlU3RyaW5nEFJlbW90ZVN0YWNrSW5kZXgPRXhjZXB0aW9uTWV0aG9kB0hSZXN1bHQGU291cmNlDVdhdHNvbkJ1Y2tldHMIZmlsZW5hbWUEbGluZQ1maXJzdEZpbGVuYW1lCWZpcnN0TGluZQVjb3VudAEBAwMBAQEAAQABBwIAAQAAKVN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsEFN5c3RlbS5FeGNlcHRpb24ICAIICAgCAAAABgMAAAAxU3lzdGVtLkNvbmZpZ3VyYXRpb24uQ29uZmlndXJhdGlvbkVycm9yc0V4Y2VwdGlvbgYEAAAAB21lc3NhZ2UJBQAAAAkGAAAABgcAAAAZaHR0cDovL21zZG4ubWljcm9zb2Z0LmNvbQYIAAAAFFN0YWNrVHJhY2Ugc3RyaW5nLi4uBgkAAAAbUmVtb3RlIFN0YWNrVHJhY2Ugc3RyaW5nLi4uAAAAAAoCGROABgoAAAAXRXhjZXB0aW9uX0NsYXNzX1NhbXBsZXMKCgAAAAAGCwAAAAdwYXRoLm1kAQAAAAAAAAAEBQAAAClTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbAMAAAAEaGVhZAd2ZXJzaW9uBWNvdW50AwAAOFN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsK0RpY3Rpb25hcnlOb2RlCAgJDAAAAAIAAAACAAAABAYAAAAQU3lzdGVtLkV4Y2VwdGlvbgwAAAAJQ2xhc3NOYW1lB01lc3NhZ2UERGF0YQ5Jbm5lckV4Y2VwdGlvbgdIZWxwVVJMEFN0YWNrVHJhY2VTdHJpbmcWUmVtb3RlU3RhY2tUcmFjZVN0cmluZxBSZW1vdGVTdGFja0luZGV4D0V4Y2VwdGlvbk1ldGhvZAdIUmVzdWx0BlNvdXJjZQ1XYXRzb25CdWNrZXRzAQEDAwEBAQABAAEHKVN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsEFN5c3RlbS5FeGNlcHRpb24ICAIGDQAAABBTeXN0ZW0uRXhjZXB0aW9uCQQAAAAJDwAAAAkQAAAACQcAAAAJCAAAAAkJAAAAAAAAAAroAwAACQoAAAAKBAwAAAA4U3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwrRGljdGlvbmFyeU5vZGUDAAAAA2tleQV2YWx1ZQRuZXh0AgIDOFN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsK0RpY3Rpb25hcnlOb2RlBhUAAAAGc2VjcmV0CAEBCRYAAAABDwAAAAUAAAAJFwAAAAIAAAACAAAAARAAAAAGAAAACQ0AAAAGGQAAABdJbm5lciBleGNlcHRpb24gbWVzc2FnZQoKCgoKAAAAAAoAFROACgoBFgAAAAwAAAAICAEAAAAGGgAAAANvbmUKARcAAAAMAAAACRUAAAAIAQEJHAAAAAEcAAAADAAAAAgIAQAAAAkaAAAACgs=", TargetFrameworkMoniker.netfx461) } }; #pragma warning disable CS0618 // Type or member is obsolete - var configurationException = new ConfigurationException("message", exception, "path.md", 1); + var configurationException = new ConfigurationException("message", exception, "path.md", 1); #pragma warning restore CS0618 // Type or member is obsolete - // ConfigurationException sets its HResult itself therefore we pass setHResult as false. - yield return new object[] { PopulateException(configurationException, setHResult: false), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAElTeXN0ZW0sIFZlcnNpb249NC4wLjAuMCwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1iNzdhNWM1NjE5MzRlMDg5BQEAAAArU3lzdGVtLkNvbmZpZ3VyYXRpb24uQ29uZmlndXJhdGlvbkV4Y2VwdGlvbg4AAAAJQ2xhc3NOYW1lB01lc3NhZ2UERGF0YQ5Jbm5lckV4Y2VwdGlvbgdIZWxwVVJMEFN0YWNrVHJhY2VTdHJpbmcWUmVtb3RlU3RhY2tUcmFjZVN0cmluZxBSZW1vdGVTdGFja0luZGV4D0V4Y2VwdGlvbk1ldGhvZAdIUmVzdWx0BlNvdXJjZQ1XYXRzb25CdWNrZXRzCGZpbGVuYW1lBGxpbmUBAQMDAQEBAAEAAQcBAClTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbBBTeXN0ZW0uRXhjZXB0aW9uCAgCCAIAAAAGAwAAACtTeXN0ZW0uQ29uZmlndXJhdGlvbi5Db25maWd1cmF0aW9uRXhjZXB0aW9uBgQAAAAHbWVzc2FnZQkFAAAACQYAAAAGBwAAABlodHRwOi8vbXNkbi5taWNyb3NvZnQuY29tBggAAAAUU3RhY2tUcmFjZSBzdHJpbmcuLi4GCQAAABtSZW1vdGUgU3RhY2tUcmFjZSBzdHJpbmcuLi4AAAAACgIZE4AGCgAAABdFeGNlcHRpb25fQ2xhc3NfU2FtcGxlcwoGCwAAAAdwYXRoLm1kAQAAAAQFAAAAKVN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsAwAAAARoZWFkB3ZlcnNpb24FY291bnQDAAA4U3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwrRGljdGlvbmFyeU5vZGUICAkMAAAAAgAAAAIAAAAEBgAAABBTeXN0ZW0uRXhjZXB0aW9uDAAAAAlDbGFzc05hbWUHTWVzc2FnZQREYXRhDklubmVyRXhjZXB0aW9uB0hlbHBVUkwQU3RhY2tUcmFjZVN0cmluZxZSZW1vdGVTdGFja1RyYWNlU3RyaW5nEFJlbW90ZVN0YWNrSW5kZXgPRXhjZXB0aW9uTWV0aG9kB0hSZXN1bHQGU291cmNlDVdhdHNvbkJ1Y2tldHMBAQMDAQEBAAEAAQcpU3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwQU3lzdGVtLkV4Y2VwdGlvbggIAgYNAAAAEFN5c3RlbS5FeGNlcHRpb24JBAAAAAkPAAAACRAAAAAJBwAAAAkIAAAACQkAAAAAAAAACugDAAAJCgAAAAoEDAAAADhTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbCtEaWN0aW9uYXJ5Tm9kZQMAAAADa2V5BXZhbHVlBG5leHQCAgM4U3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwrRGljdGlvbmFyeU5vZGUGFQAAAAZzZWNyZXQIAQEJFgAAAAEPAAAABQAAAAkXAAAAAgAAAAIAAAABEAAAAAYAAAAJDQAAAAYZAAAAF0lubmVyIGV4Y2VwdGlvbiBtZXNzYWdlCgoKCgoAAAAACgAVE4AKCgEWAAAADAAAAAgIAQAAAAYaAAAAA29uZQoBFwAAAAwAAAAJFQAAAAgBAQkcAAAAARwAAAAMAAAACAgBAAAACRoAAAAKCw==", TargetFrameworkMoniker.netcoreapp20), new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAElTeXN0ZW0sIFZlcnNpb249NC4wLjAuMCwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1iNzdhNWM1NjE5MzRlMDg5BQEAAAArU3lzdGVtLkNvbmZpZ3VyYXRpb24uQ29uZmlndXJhdGlvbkV4Y2VwdGlvbg4AAAAJQ2xhc3NOYW1lB01lc3NhZ2UERGF0YQ5Jbm5lckV4Y2VwdGlvbgdIZWxwVVJMEFN0YWNrVHJhY2VTdHJpbmcWUmVtb3RlU3RhY2tUcmFjZVN0cmluZxBSZW1vdGVTdGFja0luZGV4D0V4Y2VwdGlvbk1ldGhvZAdIUmVzdWx0BlNvdXJjZQ1XYXRzb25CdWNrZXRzCGZpbGVuYW1lBGxpbmUBAQMDAQEBAAEAAQcBAClTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbBBTeXN0ZW0uRXhjZXB0aW9uCAgCCAIAAAAGAwAAACtTeXN0ZW0uQ29uZmlndXJhdGlvbi5Db25maWd1cmF0aW9uRXhjZXB0aW9uBgQAAAAHbWVzc2FnZQkFAAAACQYAAAAGBwAAABlodHRwOi8vbXNkbi5taWNyb3NvZnQuY29tBggAAAAUU3RhY2tUcmFjZSBzdHJpbmcuLi4GCQAAABtSZW1vdGUgU3RhY2tUcmFjZSBzdHJpbmcuLi4AAAAACgIZE4AGCgAAABdFeGNlcHRpb25fQ2xhc3NfU2FtcGxlcwoGCwAAAAdwYXRoLm1kAQAAAAQFAAAAKVN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsAwAAAARoZWFkB3ZlcnNpb24FY291bnQDAAA4U3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwrRGljdGlvbmFyeU5vZGUICAkMAAAAAgAAAAIAAAAEBgAAABBTeXN0ZW0uRXhjZXB0aW9uDAAAAAlDbGFzc05hbWUHTWVzc2FnZQREYXRhDklubmVyRXhjZXB0aW9uB0hlbHBVUkwQU3RhY2tUcmFjZVN0cmluZxZSZW1vdGVTdGFja1RyYWNlU3RyaW5nEFJlbW90ZVN0YWNrSW5kZXgPRXhjZXB0aW9uTWV0aG9kB0hSZXN1bHQGU291cmNlDVdhdHNvbkJ1Y2tldHMBAQMDAQEBAAEAAQcpU3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwQU3lzdGVtLkV4Y2VwdGlvbggIAgYNAAAAEFN5c3RlbS5FeGNlcHRpb24JBAAAAAkPAAAACRAAAAAJBwAAAAkIAAAACQkAAAAAAAAACugDAAAJCgAAAAoEDAAAADhTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbCtEaWN0aW9uYXJ5Tm9kZQMAAAADa2V5BXZhbHVlBG5leHQCAgM4U3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwrRGljdGlvbmFyeU5vZGUGFQAAAAZzZWNyZXQIAQEJFgAAAAEPAAAABQAAAAkXAAAAAgAAAAIAAAABEAAAAAYAAAAJDQAAAAYZAAAAF0lubmVyIGV4Y2VwdGlvbiBtZXNzYWdlCgoKCgoAAAAACgAVE4AKCgEWAAAADAAAAAgIAQAAAAYaAAAAA29uZQoBFwAAAAwAAAAJFQAAAAgBAQkcAAAAARwAAAAMAAAACAgBAAAACRoAAAAKCw==", TargetFrameworkMoniker.netfx461) } }; + // ConfigurationException sets its HResult itself therefore we pass setHResult as false. + yield return new object[] { PopulateException(configurationException, setHResult: false), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAElTeXN0ZW0sIFZlcnNpb249NC4wLjAuMCwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1iNzdhNWM1NjE5MzRlMDg5BQEAAAArU3lzdGVtLkNvbmZpZ3VyYXRpb24uQ29uZmlndXJhdGlvbkV4Y2VwdGlvbg4AAAAJQ2xhc3NOYW1lB01lc3NhZ2UERGF0YQ5Jbm5lckV4Y2VwdGlvbgdIZWxwVVJMEFN0YWNrVHJhY2VTdHJpbmcWUmVtb3RlU3RhY2tUcmFjZVN0cmluZxBSZW1vdGVTdGFja0luZGV4D0V4Y2VwdGlvbk1ldGhvZAdIUmVzdWx0BlNvdXJjZQ1XYXRzb25CdWNrZXRzCGZpbGVuYW1lBGxpbmUBAQMDAQEBAAEAAQcBAClTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbBBTeXN0ZW0uRXhjZXB0aW9uCAgCCAIAAAAGAwAAACtTeXN0ZW0uQ29uZmlndXJhdGlvbi5Db25maWd1cmF0aW9uRXhjZXB0aW9uBgQAAAAHbWVzc2FnZQkFAAAACQYAAAAGBwAAABlodHRwOi8vbXNkbi5taWNyb3NvZnQuY29tBggAAAAUU3RhY2tUcmFjZSBzdHJpbmcuLi4GCQAAABtSZW1vdGUgU3RhY2tUcmFjZSBzdHJpbmcuLi4AAAAACgIZE4AGCgAAABdFeGNlcHRpb25fQ2xhc3NfU2FtcGxlcwoGCwAAAAdwYXRoLm1kAQAAAAQFAAAAKVN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsAwAAAARoZWFkB3ZlcnNpb24FY291bnQDAAA4U3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwrRGljdGlvbmFyeU5vZGUICAkMAAAAAgAAAAIAAAAEBgAAABBTeXN0ZW0uRXhjZXB0aW9uDAAAAAlDbGFzc05hbWUHTWVzc2FnZQREYXRhDklubmVyRXhjZXB0aW9uB0hlbHBVUkwQU3RhY2tUcmFjZVN0cmluZxZSZW1vdGVTdGFja1RyYWNlU3RyaW5nEFJlbW90ZVN0YWNrSW5kZXgPRXhjZXB0aW9uTWV0aG9kB0hSZXN1bHQGU291cmNlDVdhdHNvbkJ1Y2tldHMBAQMDAQEBAAEAAQcpU3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwQU3lzdGVtLkV4Y2VwdGlvbggIAgYNAAAAEFN5c3RlbS5FeGNlcHRpb24JBAAAAAkPAAAACRAAAAAJBwAAAAkIAAAACQkAAAAAAAAACugDAAAJCgAAAAoEDAAAADhTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbCtEaWN0aW9uYXJ5Tm9kZQMAAAADa2V5BXZhbHVlBG5leHQCAgM4U3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwrRGljdGlvbmFyeU5vZGUGFQAAAAZzZWNyZXQIAQEJFgAAAAEPAAAABQAAAAkXAAAAAgAAAAIAAAABEAAAAAYAAAAJDQAAAAYZAAAAF0lubmVyIGV4Y2VwdGlvbiBtZXNzYWdlCgoKCgoAAAAACgAVE4AKCgEWAAAADAAAAAgIAQAAAAYaAAAAA29uZQoBFwAAAAwAAAAJFQAAAAgBAQkcAAAAARwAAAAMAAAACAgBAAAACRoAAAAKCw==", TargetFrameworkMoniker.netcoreapp20), new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAElTeXN0ZW0sIFZlcnNpb249NC4wLjAuMCwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1iNzdhNWM1NjE5MzRlMDg5BQEAAAArU3lzdGVtLkNvbmZpZ3VyYXRpb24uQ29uZmlndXJhdGlvbkV4Y2VwdGlvbg4AAAAJQ2xhc3NOYW1lB01lc3NhZ2UERGF0YQ5Jbm5lckV4Y2VwdGlvbgdIZWxwVVJMEFN0YWNrVHJhY2VTdHJpbmcWUmVtb3RlU3RhY2tUcmFjZVN0cmluZxBSZW1vdGVTdGFja0luZGV4D0V4Y2VwdGlvbk1ldGhvZAdIUmVzdWx0BlNvdXJjZQ1XYXRzb25CdWNrZXRzCGZpbGVuYW1lBGxpbmUBAQMDAQEBAAEAAQcBAClTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbBBTeXN0ZW0uRXhjZXB0aW9uCAgCCAIAAAAGAwAAACtTeXN0ZW0uQ29uZmlndXJhdGlvbi5Db25maWd1cmF0aW9uRXhjZXB0aW9uBgQAAAAHbWVzc2FnZQkFAAAACQYAAAAGBwAAABlodHRwOi8vbXNkbi5taWNyb3NvZnQuY29tBggAAAAUU3RhY2tUcmFjZSBzdHJpbmcuLi4GCQAAABtSZW1vdGUgU3RhY2tUcmFjZSBzdHJpbmcuLi4AAAAACgIZE4AGCgAAABdFeGNlcHRpb25fQ2xhc3NfU2FtcGxlcwoGCwAAAAdwYXRoLm1kAQAAAAQFAAAAKVN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsAwAAAARoZWFkB3ZlcnNpb24FY291bnQDAAA4U3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwrRGljdGlvbmFyeU5vZGUICAkMAAAAAgAAAAIAAAAEBgAAABBTeXN0ZW0uRXhjZXB0aW9uDAAAAAlDbGFzc05hbWUHTWVzc2FnZQREYXRhDklubmVyRXhjZXB0aW9uB0hlbHBVUkwQU3RhY2tUcmFjZVN0cmluZxZSZW1vdGVTdGFja1RyYWNlU3RyaW5nEFJlbW90ZVN0YWNrSW5kZXgPRXhjZXB0aW9uTWV0aG9kB0hSZXN1bHQGU291cmNlDVdhdHNvbkJ1Y2tldHMBAQMDAQEBAAEAAQcpU3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwQU3lzdGVtLkV4Y2VwdGlvbggIAgYNAAAAEFN5c3RlbS5FeGNlcHRpb24JBAAAAAkPAAAACRAAAAAJBwAAAAkIAAAACQkAAAAAAAAACugDAAAJCgAAAAoEDAAAADhTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbCtEaWN0aW9uYXJ5Tm9kZQMAAAADa2V5BXZhbHVlBG5leHQCAgM4U3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwrRGljdGlvbmFyeU5vZGUGFQAAAAZzZWNyZXQIAQEJFgAAAAEPAAAABQAAAAkXAAAAAgAAAAIAAAABEAAAAAYAAAAJDQAAAAYZAAAAF0lubmVyIGV4Y2VwdGlvbiBtZXNzYWdlCgoKCgoAAAAACgAVE4AKCgEWAAAADAAAAAgIAQAAAAYaAAAAA29uZQoBFwAAAAwAAAAJFQAAAAgBAQkcAAAAARwAAAAMAAAACAgBAAAACRoAAAAKCw==", TargetFrameworkMoniker.netfx461) } }; - var providerException = new ProviderException("message", exception); - yield return new object[] { PopulateException(providerException), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uQ29uZmlndXJhdGlvbiwgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWIwM2Y1ZjdmMTFkNTBhM2EFAQAAAC9TeXN0ZW0uQ29uZmlndXJhdGlvbi5Qcm92aWRlci5Qcm92aWRlckV4Y2VwdGlvbgwAAAAJQ2xhc3NOYW1lB01lc3NhZ2UERGF0YQ5Jbm5lckV4Y2VwdGlvbgdIZWxwVVJMEFN0YWNrVHJhY2VTdHJpbmcWUmVtb3RlU3RhY2tUcmFjZVN0cmluZxBSZW1vdGVTdGFja0luZGV4D0V4Y2VwdGlvbk1ldGhvZAdIUmVzdWx0BlNvdXJjZQ1XYXRzb25CdWNrZXRzAQEDAwEBAQABAAEHKVN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsEFN5c3RlbS5FeGNlcHRpb24ICAICAAAABgMAAAAvU3lzdGVtLkNvbmZpZ3VyYXRpb24uUHJvdmlkZXIuUHJvdmlkZXJFeGNlcHRpb24GBAAAAAdtZXNzYWdlCQUAAAAJBgAAAAYHAAAAGWh0dHA6Ly9tc2RuLm1pY3Jvc29mdC5jb20GCAAAABRTdGFja1RyYWNlIHN0cmluZy4uLgYJAAAAG1JlbW90ZSBTdGFja1RyYWNlIHN0cmluZy4uLgAAAAAK6AMAAAYKAAAAF0V4Y2VwdGlvbl9DbGFzc19TYW1wbGVzCgQFAAAAKVN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsAwAAAARoZWFkB3ZlcnNpb24FY291bnQDAAA4U3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwrRGljdGlvbmFyeU5vZGUICAkLAAAAAgAAAAIAAAAEBgAAABBTeXN0ZW0uRXhjZXB0aW9uDAAAAAlDbGFzc05hbWUHTWVzc2FnZQREYXRhDklubmVyRXhjZXB0aW9uB0hlbHBVUkwQU3RhY2tUcmFjZVN0cmluZxZSZW1vdGVTdGFja1RyYWNlU3RyaW5nEFJlbW90ZVN0YWNrSW5kZXgPRXhjZXB0aW9uTWV0aG9kB0hSZXN1bHQGU291cmNlDVdhdHNvbkJ1Y2tldHMBAQMDAQEBAAEAAQcpU3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwQU3lzdGVtLkV4Y2VwdGlvbggIAgYMAAAAEFN5c3RlbS5FeGNlcHRpb24JBAAAAAkOAAAACQ8AAAAJBwAAAAkIAAAACQkAAAAAAAAACugDAAAJCgAAAAoECwAAADhTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbCtEaWN0aW9uYXJ5Tm9kZQMAAAADa2V5BXZhbHVlBG5leHQCAgM4U3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwrRGljdGlvbmFyeU5vZGUGFAAAAAZzZWNyZXQIAQEJFQAAAAEOAAAABQAAAAkWAAAAAgAAAAIAAAABDwAAAAYAAAAJDAAAAAYYAAAAF0lubmVyIGV4Y2VwdGlvbiBtZXNzYWdlCgoKCgoAAAAACgAVE4AKCgEVAAAACwAAAAgIAQAAAAYZAAAAA29uZQoBFgAAAAsAAAAJFAAAAAgBAQkbAAAAARsAAAALAAAACAgBAAAACRkAAAAKCw==", TargetFrameworkMoniker.netcoreapp20), new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uQ29uZmlndXJhdGlvbiwgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWIwM2Y1ZjdmMTFkNTBhM2EFAQAAAC9TeXN0ZW0uQ29uZmlndXJhdGlvbi5Qcm92aWRlci5Qcm92aWRlckV4Y2VwdGlvbgwAAAAJQ2xhc3NOYW1lB01lc3NhZ2UERGF0YQ5Jbm5lckV4Y2VwdGlvbgdIZWxwVVJMEFN0YWNrVHJhY2VTdHJpbmcWUmVtb3RlU3RhY2tUcmFjZVN0cmluZxBSZW1vdGVTdGFja0luZGV4D0V4Y2VwdGlvbk1ldGhvZAdIUmVzdWx0BlNvdXJjZQ1XYXRzb25CdWNrZXRzAQEDAwEBAQABAAEHKVN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsEFN5c3RlbS5FeGNlcHRpb24ICAICAAAABgMAAAAvU3lzdGVtLkNvbmZpZ3VyYXRpb24uUHJvdmlkZXIuUHJvdmlkZXJFeGNlcHRpb24GBAAAAAdtZXNzYWdlCQUAAAAJBgAAAAYHAAAAGWh0dHA6Ly9tc2RuLm1pY3Jvc29mdC5jb20GCAAAABRTdGFja1RyYWNlIHN0cmluZy4uLgYJAAAAG1JlbW90ZSBTdGFja1RyYWNlIHN0cmluZy4uLgAAAAAK6AMAAAYKAAAAF0V4Y2VwdGlvbl9DbGFzc19TYW1wbGVzCgQFAAAAKVN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsAwAAAARoZWFkB3ZlcnNpb24FY291bnQDAAA4U3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwrRGljdGlvbmFyeU5vZGUICAkLAAAAAgAAAAIAAAAEBgAAABBTeXN0ZW0uRXhjZXB0aW9uDAAAAAlDbGFzc05hbWUHTWVzc2FnZQREYXRhDklubmVyRXhjZXB0aW9uB0hlbHBVUkwQU3RhY2tUcmFjZVN0cmluZxZSZW1vdGVTdGFja1RyYWNlU3RyaW5nEFJlbW90ZVN0YWNrSW5kZXgPRXhjZXB0aW9uTWV0aG9kB0hSZXN1bHQGU291cmNlDVdhdHNvbkJ1Y2tldHMBAQMDAQEBAAEAAQcpU3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwQU3lzdGVtLkV4Y2VwdGlvbggIAgYMAAAAEFN5c3RlbS5FeGNlcHRpb24JBAAAAAkOAAAACQ8AAAAJBwAAAAkIAAAACQkAAAAAAAAACugDAAAJCgAAAAoECwAAADhTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbCtEaWN0aW9uYXJ5Tm9kZQMAAAADa2V5BXZhbHVlBG5leHQCAgM4U3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwrRGljdGlvbmFyeU5vZGUGFAAAAAZzZWNyZXQIAQEJFQAAAAEOAAAABQAAAAkWAAAAAgAAAAIAAAABDwAAAAYAAAAJDAAAAAYYAAAAF0lubmVyIGV4Y2VwdGlvbiBtZXNzYWdlCgoKCgoAAAAACgAVE4AKCgEVAAAACwAAAAgIAQAAAAYZAAAAA29uZQoBFgAAAAsAAAAJFAAAAAgBAQkbAAAAARsAAAALAAAACAgBAAAACRkAAAAKCw==", TargetFrameworkMoniker.netfx461) } }; + var providerException = new ProviderException("message", exception); + yield return new object[] { PopulateException(providerException), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uQ29uZmlndXJhdGlvbiwgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWIwM2Y1ZjdmMTFkNTBhM2EFAQAAAC9TeXN0ZW0uQ29uZmlndXJhdGlvbi5Qcm92aWRlci5Qcm92aWRlckV4Y2VwdGlvbgwAAAAJQ2xhc3NOYW1lB01lc3NhZ2UERGF0YQ5Jbm5lckV4Y2VwdGlvbgdIZWxwVVJMEFN0YWNrVHJhY2VTdHJpbmcWUmVtb3RlU3RhY2tUcmFjZVN0cmluZxBSZW1vdGVTdGFja0luZGV4D0V4Y2VwdGlvbk1ldGhvZAdIUmVzdWx0BlNvdXJjZQ1XYXRzb25CdWNrZXRzAQEDAwEBAQABAAEHKVN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsEFN5c3RlbS5FeGNlcHRpb24ICAICAAAABgMAAAAvU3lzdGVtLkNvbmZpZ3VyYXRpb24uUHJvdmlkZXIuUHJvdmlkZXJFeGNlcHRpb24GBAAAAAdtZXNzYWdlCQUAAAAJBgAAAAYHAAAAGWh0dHA6Ly9tc2RuLm1pY3Jvc29mdC5jb20GCAAAABRTdGFja1RyYWNlIHN0cmluZy4uLgYJAAAAG1JlbW90ZSBTdGFja1RyYWNlIHN0cmluZy4uLgAAAAAK6AMAAAYKAAAAF0V4Y2VwdGlvbl9DbGFzc19TYW1wbGVzCgQFAAAAKVN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsAwAAAARoZWFkB3ZlcnNpb24FY291bnQDAAA4U3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwrRGljdGlvbmFyeU5vZGUICAkLAAAAAgAAAAIAAAAEBgAAABBTeXN0ZW0uRXhjZXB0aW9uDAAAAAlDbGFzc05hbWUHTWVzc2FnZQREYXRhDklubmVyRXhjZXB0aW9uB0hlbHBVUkwQU3RhY2tUcmFjZVN0cmluZxZSZW1vdGVTdGFja1RyYWNlU3RyaW5nEFJlbW90ZVN0YWNrSW5kZXgPRXhjZXB0aW9uTWV0aG9kB0hSZXN1bHQGU291cmNlDVdhdHNvbkJ1Y2tldHMBAQMDAQEBAAEAAQcpU3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwQU3lzdGVtLkV4Y2VwdGlvbggIAgYMAAAAEFN5c3RlbS5FeGNlcHRpb24JBAAAAAkOAAAACQ8AAAAJBwAAAAkIAAAACQkAAAAAAAAACugDAAAJCgAAAAoECwAAADhTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbCtEaWN0aW9uYXJ5Tm9kZQMAAAADa2V5BXZhbHVlBG5leHQCAgM4U3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwrRGljdGlvbmFyeU5vZGUGFAAAAAZzZWNyZXQIAQEJFQAAAAEOAAAABQAAAAkWAAAAAgAAAAIAAAABDwAAAAYAAAAJDAAAAAYYAAAAF0lubmVyIGV4Y2VwdGlvbiBtZXNzYWdlCgoKCgoAAAAACgAVE4AKCgEVAAAACwAAAAgIAQAAAAYZAAAAA29uZQoBFgAAAAsAAAAJFAAAAAgBAQkbAAAAARsAAAALAAAACAgBAAAACRkAAAAKCw==", TargetFrameworkMoniker.netcoreapp20), new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uQ29uZmlndXJhdGlvbiwgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWIwM2Y1ZjdmMTFkNTBhM2EFAQAAAC9TeXN0ZW0uQ29uZmlndXJhdGlvbi5Qcm92aWRlci5Qcm92aWRlckV4Y2VwdGlvbgwAAAAJQ2xhc3NOYW1lB01lc3NhZ2UERGF0YQ5Jbm5lckV4Y2VwdGlvbgdIZWxwVVJMEFN0YWNrVHJhY2VTdHJpbmcWUmVtb3RlU3RhY2tUcmFjZVN0cmluZxBSZW1vdGVTdGFja0luZGV4D0V4Y2VwdGlvbk1ldGhvZAdIUmVzdWx0BlNvdXJjZQ1XYXRzb25CdWNrZXRzAQEDAwEBAQABAAEHKVN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsEFN5c3RlbS5FeGNlcHRpb24ICAICAAAABgMAAAAvU3lzdGVtLkNvbmZpZ3VyYXRpb24uUHJvdmlkZXIuUHJvdmlkZXJFeGNlcHRpb24GBAAAAAdtZXNzYWdlCQUAAAAJBgAAAAYHAAAAGWh0dHA6Ly9tc2RuLm1pY3Jvc29mdC5jb20GCAAAABRTdGFja1RyYWNlIHN0cmluZy4uLgYJAAAAG1JlbW90ZSBTdGFja1RyYWNlIHN0cmluZy4uLgAAAAAK6AMAAAYKAAAAF0V4Y2VwdGlvbl9DbGFzc19TYW1wbGVzCgQFAAAAKVN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsAwAAAARoZWFkB3ZlcnNpb24FY291bnQDAAA4U3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwrRGljdGlvbmFyeU5vZGUICAkLAAAAAgAAAAIAAAAEBgAAABBTeXN0ZW0uRXhjZXB0aW9uDAAAAAlDbGFzc05hbWUHTWVzc2FnZQREYXRhDklubmVyRXhjZXB0aW9uB0hlbHBVUkwQU3RhY2tUcmFjZVN0cmluZxZSZW1vdGVTdGFja1RyYWNlU3RyaW5nEFJlbW90ZVN0YWNrSW5kZXgPRXhjZXB0aW9uTWV0aG9kB0hSZXN1bHQGU291cmNlDVdhdHNvbkJ1Y2tldHMBAQMDAQEBAAEAAQcpU3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwQU3lzdGVtLkV4Y2VwdGlvbggIAgYMAAAAEFN5c3RlbS5FeGNlcHRpb24JBAAAAAkOAAAACQ8AAAAJBwAAAAkIAAAACQkAAAAAAAAACugDAAAJCgAAAAoECwAAADhTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbCtEaWN0aW9uYXJ5Tm9kZQMAAAADa2V5BXZhbHVlBG5leHQCAgM4U3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwrRGljdGlvbmFyeU5vZGUGFAAAAAZzZWNyZXQIAQEJFQAAAAEOAAAABQAAAAkWAAAAAgAAAAIAAAABDwAAAAYAAAAJDAAAAAYYAAAAF0lubmVyIGV4Y2VwdGlvbiBtZXNzYWdlCgoKCgoAAAAACgAVE4AKCgEVAAAACwAAAAgIAQAAAAYZAAAAA29uZQoBFgAAAAsAAAAJFAAAAAgBAQkbAAAAARsAAAALAAAACAgBAAAACRkAAAAKCw==", TargetFrameworkMoniker.netfx461) } }; - // System.Runtime.Serialization - var invalidDataContractException = new InvalidDataContractException("message", exception); - yield return new object[] { PopulateException(invalidDataContractException), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAF9TeXN0ZW0uUnVudGltZS5TZXJpYWxpemF0aW9uLCBWZXJzaW9uPTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OQUBAAAAOVN5c3RlbS5SdW50aW1lLlNlcmlhbGl6YXRpb24uSW52YWxpZERhdGFDb250cmFjdEV4Y2VwdGlvbgwAAAAJQ2xhc3NOYW1lB01lc3NhZ2UERGF0YQ5Jbm5lckV4Y2VwdGlvbgdIZWxwVVJMEFN0YWNrVHJhY2VTdHJpbmcWUmVtb3RlU3RhY2tUcmFjZVN0cmluZxBSZW1vdGVTdGFja0luZGV4D0V4Y2VwdGlvbk1ldGhvZAdIUmVzdWx0BlNvdXJjZQ1XYXRzb25CdWNrZXRzAQEDAwEBAQABAAEHKVN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsEFN5c3RlbS5FeGNlcHRpb24ICAICAAAABgMAAAA5U3lzdGVtLlJ1bnRpbWUuU2VyaWFsaXphdGlvbi5JbnZhbGlkRGF0YUNvbnRyYWN0RXhjZXB0aW9uBgQAAAAHbWVzc2FnZQkFAAAACQYAAAAGBwAAABlodHRwOi8vbXNkbi5taWNyb3NvZnQuY29tBggAAAAUU3RhY2tUcmFjZSBzdHJpbmcuLi4GCQAAABtSZW1vdGUgU3RhY2tUcmFjZSBzdHJpbmcuLi4AAAAACugDAAAGCgAAABdFeGNlcHRpb25fQ2xhc3NfU2FtcGxlcwoEBQAAAClTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbAMAAAAEaGVhZAd2ZXJzaW9uBWNvdW50AwAAOFN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsK0RpY3Rpb25hcnlOb2RlCAgJCwAAAAIAAAACAAAABAYAAAAQU3lzdGVtLkV4Y2VwdGlvbgwAAAAJQ2xhc3NOYW1lB01lc3NhZ2UERGF0YQ5Jbm5lckV4Y2VwdGlvbgdIZWxwVVJMEFN0YWNrVHJhY2VTdHJpbmcWUmVtb3RlU3RhY2tUcmFjZVN0cmluZxBSZW1vdGVTdGFja0luZGV4D0V4Y2VwdGlvbk1ldGhvZAdIUmVzdWx0BlNvdXJjZQ1XYXRzb25CdWNrZXRzAQEDAwEBAQABAAEHKVN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsEFN5c3RlbS5FeGNlcHRpb24ICAIGDAAAABBTeXN0ZW0uRXhjZXB0aW9uCQQAAAAJDgAAAAkPAAAACQcAAAAJCAAAAAkJAAAAAAAAAAroAwAACQoAAAAKBAsAAAA4U3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwrRGljdGlvbmFyeU5vZGUDAAAAA2tleQV2YWx1ZQRuZXh0AgIDOFN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsK0RpY3Rpb25hcnlOb2RlBhQAAAAGc2VjcmV0CAEBCRUAAAABDgAAAAUAAAAJFgAAAAIAAAACAAAAAQ8AAAAGAAAACQwAAAAGGAAAABdJbm5lciBleGNlcHRpb24gbWVzc2FnZQoKCgoKAAAAAAoAFROACgoBFQAAAAsAAAAICAEAAAAGGQAAAANvbmUKARYAAAALAAAACRQAAAAIAQEJGwAAAAEbAAAACwAAAAgIAQAAAAkZAAAACgs=", TargetFrameworkMoniker.netcoreapp20), new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAF9TeXN0ZW0uUnVudGltZS5TZXJpYWxpemF0aW9uLCBWZXJzaW9uPTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OQUBAAAAOVN5c3RlbS5SdW50aW1lLlNlcmlhbGl6YXRpb24uSW52YWxpZERhdGFDb250cmFjdEV4Y2VwdGlvbgwAAAAJQ2xhc3NOYW1lB01lc3NhZ2UERGF0YQ5Jbm5lckV4Y2VwdGlvbgdIZWxwVVJMEFN0YWNrVHJhY2VTdHJpbmcWUmVtb3RlU3RhY2tUcmFjZVN0cmluZxBSZW1vdGVTdGFja0luZGV4D0V4Y2VwdGlvbk1ldGhvZAdIUmVzdWx0BlNvdXJjZQ1XYXRzb25CdWNrZXRzAQEDAwEBAQABAAEHKVN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsEFN5c3RlbS5FeGNlcHRpb24ICAICAAAABgMAAAA5U3lzdGVtLlJ1bnRpbWUuU2VyaWFsaXphdGlvbi5JbnZhbGlkRGF0YUNvbnRyYWN0RXhjZXB0aW9uBgQAAAAHbWVzc2FnZQkFAAAACQYAAAAGBwAAABlodHRwOi8vbXNkbi5taWNyb3NvZnQuY29tBggAAAAUU3RhY2tUcmFjZSBzdHJpbmcuLi4GCQAAABtSZW1vdGUgU3RhY2tUcmFjZSBzdHJpbmcuLi4AAAAACugDAAAGCgAAABdFeGNlcHRpb25fQ2xhc3NfU2FtcGxlcwoEBQAAAClTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbAMAAAAEaGVhZAd2ZXJzaW9uBWNvdW50AwAAOFN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsK0RpY3Rpb25hcnlOb2RlCAgJCwAAAAIAAAACAAAABAYAAAAQU3lzdGVtLkV4Y2VwdGlvbgwAAAAJQ2xhc3NOYW1lB01lc3NhZ2UERGF0YQ5Jbm5lckV4Y2VwdGlvbgdIZWxwVVJMEFN0YWNrVHJhY2VTdHJpbmcWUmVtb3RlU3RhY2tUcmFjZVN0cmluZxBSZW1vdGVTdGFja0luZGV4D0V4Y2VwdGlvbk1ldGhvZAdIUmVzdWx0BlNvdXJjZQ1XYXRzb25CdWNrZXRzAQEDAwEBAQABAAEHKVN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsEFN5c3RlbS5FeGNlcHRpb24ICAIGDAAAABBTeXN0ZW0uRXhjZXB0aW9uCQQAAAAJDgAAAAkPAAAACQcAAAAJCAAAAAkJAAAAAAAAAAroAwAACQoAAAAKBAsAAAA4U3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwrRGljdGlvbmFyeU5vZGUDAAAAA2tleQV2YWx1ZQRuZXh0AgIDOFN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsK0RpY3Rpb25hcnlOb2RlBhQAAAAGc2VjcmV0CAEBCRUAAAABDgAAAAUAAAAJFgAAAAIAAAACAAAAAQ8AAAAGAAAACQwAAAAGGAAAABdJbm5lciBleGNlcHRpb24gbWVzc2FnZQoKCgoKAAAAAAoAFROACgoBFQAAAAsAAAAICAEAAAAGGQAAAANvbmUKARYAAAALAAAACRQAAAAIAQEJGwAAAAEbAAAACwAAAAgIAQAAAAkZAAAACgs=", TargetFrameworkMoniker.netfx461) } }; + // System.Runtime.Serialization + var invalidDataContractException = new InvalidDataContractException("message", exception); + yield return new object[] { PopulateException(invalidDataContractException), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAF9TeXN0ZW0uUnVudGltZS5TZXJpYWxpemF0aW9uLCBWZXJzaW9uPTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OQUBAAAAOVN5c3RlbS5SdW50aW1lLlNlcmlhbGl6YXRpb24uSW52YWxpZERhdGFDb250cmFjdEV4Y2VwdGlvbgwAAAAJQ2xhc3NOYW1lB01lc3NhZ2UERGF0YQ5Jbm5lckV4Y2VwdGlvbgdIZWxwVVJMEFN0YWNrVHJhY2VTdHJpbmcWUmVtb3RlU3RhY2tUcmFjZVN0cmluZxBSZW1vdGVTdGFja0luZGV4D0V4Y2VwdGlvbk1ldGhvZAdIUmVzdWx0BlNvdXJjZQ1XYXRzb25CdWNrZXRzAQEDAwEBAQABAAEHKVN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsEFN5c3RlbS5FeGNlcHRpb24ICAICAAAABgMAAAA5U3lzdGVtLlJ1bnRpbWUuU2VyaWFsaXphdGlvbi5JbnZhbGlkRGF0YUNvbnRyYWN0RXhjZXB0aW9uBgQAAAAHbWVzc2FnZQkFAAAACQYAAAAGBwAAABlodHRwOi8vbXNkbi5taWNyb3NvZnQuY29tBggAAAAUU3RhY2tUcmFjZSBzdHJpbmcuLi4GCQAAABtSZW1vdGUgU3RhY2tUcmFjZSBzdHJpbmcuLi4AAAAACugDAAAGCgAAABdFeGNlcHRpb25fQ2xhc3NfU2FtcGxlcwoEBQAAAClTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbAMAAAAEaGVhZAd2ZXJzaW9uBWNvdW50AwAAOFN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsK0RpY3Rpb25hcnlOb2RlCAgJCwAAAAIAAAACAAAABAYAAAAQU3lzdGVtLkV4Y2VwdGlvbgwAAAAJQ2xhc3NOYW1lB01lc3NhZ2UERGF0YQ5Jbm5lckV4Y2VwdGlvbgdIZWxwVVJMEFN0YWNrVHJhY2VTdHJpbmcWUmVtb3RlU3RhY2tUcmFjZVN0cmluZxBSZW1vdGVTdGFja0luZGV4D0V4Y2VwdGlvbk1ldGhvZAdIUmVzdWx0BlNvdXJjZQ1XYXRzb25CdWNrZXRzAQEDAwEBAQABAAEHKVN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsEFN5c3RlbS5FeGNlcHRpb24ICAIGDAAAABBTeXN0ZW0uRXhjZXB0aW9uCQQAAAAJDgAAAAkPAAAACQcAAAAJCAAAAAkJAAAAAAAAAAroAwAACQoAAAAKBAsAAAA4U3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwrRGljdGlvbmFyeU5vZGUDAAAAA2tleQV2YWx1ZQRuZXh0AgIDOFN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsK0RpY3Rpb25hcnlOb2RlBhQAAAAGc2VjcmV0CAEBCRUAAAABDgAAAAUAAAAJFgAAAAIAAAACAAAAAQ8AAAAGAAAACQwAAAAGGAAAABdJbm5lciBleGNlcHRpb24gbWVzc2FnZQoKCgoKAAAAAAoAFROACgoBFQAAAAsAAAAICAEAAAAGGQAAAANvbmUKARYAAAALAAAACRQAAAAIAQEJGwAAAAEbAAAACwAAAAgIAQAAAAkZAAAACgs=", TargetFrameworkMoniker.netcoreapp20), new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAF9TeXN0ZW0uUnVudGltZS5TZXJpYWxpemF0aW9uLCBWZXJzaW9uPTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OQUBAAAAOVN5c3RlbS5SdW50aW1lLlNlcmlhbGl6YXRpb24uSW52YWxpZERhdGFDb250cmFjdEV4Y2VwdGlvbgwAAAAJQ2xhc3NOYW1lB01lc3NhZ2UERGF0YQ5Jbm5lckV4Y2VwdGlvbgdIZWxwVVJMEFN0YWNrVHJhY2VTdHJpbmcWUmVtb3RlU3RhY2tUcmFjZVN0cmluZxBSZW1vdGVTdGFja0luZGV4D0V4Y2VwdGlvbk1ldGhvZAdIUmVzdWx0BlNvdXJjZQ1XYXRzb25CdWNrZXRzAQEDAwEBAQABAAEHKVN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsEFN5c3RlbS5FeGNlcHRpb24ICAICAAAABgMAAAA5U3lzdGVtLlJ1bnRpbWUuU2VyaWFsaXphdGlvbi5JbnZhbGlkRGF0YUNvbnRyYWN0RXhjZXB0aW9uBgQAAAAHbWVzc2FnZQkFAAAACQYAAAAGBwAAABlodHRwOi8vbXNkbi5taWNyb3NvZnQuY29tBggAAAAUU3RhY2tUcmFjZSBzdHJpbmcuLi4GCQAAABtSZW1vdGUgU3RhY2tUcmFjZSBzdHJpbmcuLi4AAAAACugDAAAGCgAAABdFeGNlcHRpb25fQ2xhc3NfU2FtcGxlcwoEBQAAAClTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbAMAAAAEaGVhZAd2ZXJzaW9uBWNvdW50AwAAOFN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsK0RpY3Rpb25hcnlOb2RlCAgJCwAAAAIAAAACAAAABAYAAAAQU3lzdGVtLkV4Y2VwdGlvbgwAAAAJQ2xhc3NOYW1lB01lc3NhZ2UERGF0YQ5Jbm5lckV4Y2VwdGlvbgdIZWxwVVJMEFN0YWNrVHJhY2VTdHJpbmcWUmVtb3RlU3RhY2tUcmFjZVN0cmluZxBSZW1vdGVTdGFja0luZGV4D0V4Y2VwdGlvbk1ldGhvZAdIUmVzdWx0BlNvdXJjZQ1XYXRzb25CdWNrZXRzAQEDAwEBAQABAAEHKVN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsEFN5c3RlbS5FeGNlcHRpb24ICAIGDAAAABBTeXN0ZW0uRXhjZXB0aW9uCQQAAAAJDgAAAAkPAAAACQcAAAAJCAAAAAkJAAAAAAAAAAroAwAACQoAAAAKBAsAAAA4U3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwrRGljdGlvbmFyeU5vZGUDAAAAA2tleQV2YWx1ZQRuZXh0AgIDOFN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsK0RpY3Rpb25hcnlOb2RlBhQAAAAGc2VjcmV0CAEBCRUAAAABDgAAAAUAAAAJFgAAAAIAAAACAAAAAQ8AAAAGAAAACQwAAAAGGAAAABdJbm5lciBleGNlcHRpb24gbWVzc2FnZQoKCgoKAAAAAAoAFROACgoBFQAAAAsAAAAICAEAAAAGGQAAAANvbmUKARYAAAALAAAACRQAAAAIAQEJGwAAAAEbAAAACwAAAAgIAQAAAAkZAAAACgs=", TargetFrameworkMoniker.netfx461) } }; - // System.Transactions - var transactionAbortedException = new TransactionAbortedException("message", exception); - yield return new object[] { PopulateException(transactionAbortedException), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAFZTeXN0ZW0uVHJhbnNhY3Rpb25zLCBWZXJzaW9uPTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OQUBAAAAL1N5c3RlbS5UcmFuc2FjdGlvbnMuVHJhbnNhY3Rpb25BYm9ydGVkRXhjZXB0aW9uDAAAAAlDbGFzc05hbWUHTWVzc2FnZQREYXRhDklubmVyRXhjZXB0aW9uB0hlbHBVUkwQU3RhY2tUcmFjZVN0cmluZxZSZW1vdGVTdGFja1RyYWNlU3RyaW5nEFJlbW90ZVN0YWNrSW5kZXgPRXhjZXB0aW9uTWV0aG9kB0hSZXN1bHQGU291cmNlDVdhdHNvbkJ1Y2tldHMBAQMDAQEBAAEAAQcpU3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwQU3lzdGVtLkV4Y2VwdGlvbggIAgIAAAAGAwAAAC9TeXN0ZW0uVHJhbnNhY3Rpb25zLlRyYW5zYWN0aW9uQWJvcnRlZEV4Y2VwdGlvbgYEAAAAB21lc3NhZ2UJBQAAAAkGAAAABgcAAAAZaHR0cDovL21zZG4ubWljcm9zb2Z0LmNvbQYIAAAAFFN0YWNrVHJhY2Ugc3RyaW5nLi4uBgkAAAAbUmVtb3RlIFN0YWNrVHJhY2Ugc3RyaW5nLi4uAAAAAAroAwAABgoAAAAXRXhjZXB0aW9uX0NsYXNzX1NhbXBsZXMKBAUAAAApU3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwDAAAABGhlYWQHdmVyc2lvbgVjb3VudAMAADhTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbCtEaWN0aW9uYXJ5Tm9kZQgICQsAAAACAAAAAgAAAAQGAAAAEFN5c3RlbS5FeGNlcHRpb24MAAAACUNsYXNzTmFtZQdNZXNzYWdlBERhdGEOSW5uZXJFeGNlcHRpb24HSGVscFVSTBBTdGFja1RyYWNlU3RyaW5nFlJlbW90ZVN0YWNrVHJhY2VTdHJpbmcQUmVtb3RlU3RhY2tJbmRleA9FeGNlcHRpb25NZXRob2QHSFJlc3VsdAZTb3VyY2UNV2F0c29uQnVja2V0cwEBAwMBAQEAAQABBylTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbBBTeXN0ZW0uRXhjZXB0aW9uCAgCBgwAAAAQU3lzdGVtLkV4Y2VwdGlvbgkEAAAACQ4AAAAJDwAAAAkHAAAACQgAAAAJCQAAAAAAAAAK6AMAAAkKAAAACgQLAAAAOFN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsK0RpY3Rpb25hcnlOb2RlAwAAAANrZXkFdmFsdWUEbmV4dAICAzhTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbCtEaWN0aW9uYXJ5Tm9kZQYUAAAABnNlY3JldAgBAQkVAAAAAQ4AAAAFAAAACRYAAAACAAAAAgAAAAEPAAAABgAAAAkMAAAABhgAAAAXSW5uZXIgZXhjZXB0aW9uIG1lc3NhZ2UKCgoKCgAAAAAKABUTgAoKARUAAAALAAAACAgBAAAABhkAAAADb25lCgEWAAAACwAAAAkUAAAACAEBCRsAAAABGwAAAAsAAAAICAEAAAAJGQAAAAoL", TargetFrameworkMoniker.netcoreapp20), new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAFZTeXN0ZW0uVHJhbnNhY3Rpb25zLCBWZXJzaW9uPTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OQUBAAAAL1N5c3RlbS5UcmFuc2FjdGlvbnMuVHJhbnNhY3Rpb25BYm9ydGVkRXhjZXB0aW9uDAAAAAlDbGFzc05hbWUHTWVzc2FnZQREYXRhDklubmVyRXhjZXB0aW9uB0hlbHBVUkwQU3RhY2tUcmFjZVN0cmluZxZSZW1vdGVTdGFja1RyYWNlU3RyaW5nEFJlbW90ZVN0YWNrSW5kZXgPRXhjZXB0aW9uTWV0aG9kB0hSZXN1bHQGU291cmNlDVdhdHNvbkJ1Y2tldHMBAQMDAQEBAAEAAQcpU3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwQU3lzdGVtLkV4Y2VwdGlvbggIAgIAAAAGAwAAAC9TeXN0ZW0uVHJhbnNhY3Rpb25zLlRyYW5zYWN0aW9uQWJvcnRlZEV4Y2VwdGlvbgYEAAAAB21lc3NhZ2UJBQAAAAkGAAAABgcAAAAZaHR0cDovL21zZG4ubWljcm9zb2Z0LmNvbQYIAAAAFFN0YWNrVHJhY2Ugc3RyaW5nLi4uBgkAAAAbUmVtb3RlIFN0YWNrVHJhY2Ugc3RyaW5nLi4uAAAAAAroAwAABgoAAAAXRXhjZXB0aW9uX0NsYXNzX1NhbXBsZXMKBAUAAAApU3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwDAAAABGhlYWQHdmVyc2lvbgVjb3VudAMAADhTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbCtEaWN0aW9uYXJ5Tm9kZQgICQsAAAACAAAAAgAAAAQGAAAAEFN5c3RlbS5FeGNlcHRpb24MAAAACUNsYXNzTmFtZQdNZXNzYWdlBERhdGEOSW5uZXJFeGNlcHRpb24HSGVscFVSTBBTdGFja1RyYWNlU3RyaW5nFlJlbW90ZVN0YWNrVHJhY2VTdHJpbmcQUmVtb3RlU3RhY2tJbmRleA9FeGNlcHRpb25NZXRob2QHSFJlc3VsdAZTb3VyY2UNV2F0c29uQnVja2V0cwEBAwMBAQEAAQABBylTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbBBTeXN0ZW0uRXhjZXB0aW9uCAgCBgwAAAAQU3lzdGVtLkV4Y2VwdGlvbgkEAAAACQ4AAAAJDwAAAAkHAAAACQgAAAAJCQAAAAAAAAAK6AMAAAkKAAAACgQLAAAAOFN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsK0RpY3Rpb25hcnlOb2RlAwAAAANrZXkFdmFsdWUEbmV4dAICAzhTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbCtEaWN0aW9uYXJ5Tm9kZQYUAAAABnNlY3JldAgBAQkVAAAAAQ4AAAAFAAAACRYAAAACAAAAAgAAAAEPAAAABgAAAAkMAAAABhgAAAAXSW5uZXIgZXhjZXB0aW9uIG1lc3NhZ2UKCgoKCgAAAAAKABUTgAoKARUAAAALAAAACAgBAAAABhkAAAADb25lCgEWAAAACwAAAAkUAAAACAEBCRsAAAABGwAAAAsAAAAICAEAAAAJGQAAAAoL", TargetFrameworkMoniker.netfx461) } }; + // System.Transactions + var transactionAbortedException = new TransactionAbortedException("message", exception); + yield return new object[] { PopulateException(transactionAbortedException), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAFZTeXN0ZW0uVHJhbnNhY3Rpb25zLCBWZXJzaW9uPTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OQUBAAAAL1N5c3RlbS5UcmFuc2FjdGlvbnMuVHJhbnNhY3Rpb25BYm9ydGVkRXhjZXB0aW9uDAAAAAlDbGFzc05hbWUHTWVzc2FnZQREYXRhDklubmVyRXhjZXB0aW9uB0hlbHBVUkwQU3RhY2tUcmFjZVN0cmluZxZSZW1vdGVTdGFja1RyYWNlU3RyaW5nEFJlbW90ZVN0YWNrSW5kZXgPRXhjZXB0aW9uTWV0aG9kB0hSZXN1bHQGU291cmNlDVdhdHNvbkJ1Y2tldHMBAQMDAQEBAAEAAQcpU3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwQU3lzdGVtLkV4Y2VwdGlvbggIAgIAAAAGAwAAAC9TeXN0ZW0uVHJhbnNhY3Rpb25zLlRyYW5zYWN0aW9uQWJvcnRlZEV4Y2VwdGlvbgYEAAAAB21lc3NhZ2UJBQAAAAkGAAAABgcAAAAZaHR0cDovL21zZG4ubWljcm9zb2Z0LmNvbQYIAAAAFFN0YWNrVHJhY2Ugc3RyaW5nLi4uBgkAAAAbUmVtb3RlIFN0YWNrVHJhY2Ugc3RyaW5nLi4uAAAAAAroAwAABgoAAAAXRXhjZXB0aW9uX0NsYXNzX1NhbXBsZXMKBAUAAAApU3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwDAAAABGhlYWQHdmVyc2lvbgVjb3VudAMAADhTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbCtEaWN0aW9uYXJ5Tm9kZQgICQsAAAACAAAAAgAAAAQGAAAAEFN5c3RlbS5FeGNlcHRpb24MAAAACUNsYXNzTmFtZQdNZXNzYWdlBERhdGEOSW5uZXJFeGNlcHRpb24HSGVscFVSTBBTdGFja1RyYWNlU3RyaW5nFlJlbW90ZVN0YWNrVHJhY2VTdHJpbmcQUmVtb3RlU3RhY2tJbmRleA9FeGNlcHRpb25NZXRob2QHSFJlc3VsdAZTb3VyY2UNV2F0c29uQnVja2V0cwEBAwMBAQEAAQABBylTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbBBTeXN0ZW0uRXhjZXB0aW9uCAgCBgwAAAAQU3lzdGVtLkV4Y2VwdGlvbgkEAAAACQ4AAAAJDwAAAAkHAAAACQgAAAAJCQAAAAAAAAAK6AMAAAkKAAAACgQLAAAAOFN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsK0RpY3Rpb25hcnlOb2RlAwAAAANrZXkFdmFsdWUEbmV4dAICAzhTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbCtEaWN0aW9uYXJ5Tm9kZQYUAAAABnNlY3JldAgBAQkVAAAAAQ4AAAAFAAAACRYAAAACAAAAAgAAAAEPAAAABgAAAAkMAAAABhgAAAAXSW5uZXIgZXhjZXB0aW9uIG1lc3NhZ2UKCgoKCgAAAAAKABUTgAoKARUAAAALAAAACAgBAAAABhkAAAADb25lCgEWAAAACwAAAAkUAAAACAEBCRsAAAABGwAAAAsAAAAICAEAAAAJGQAAAAoL", TargetFrameworkMoniker.netcoreapp20), new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAFZTeXN0ZW0uVHJhbnNhY3Rpb25zLCBWZXJzaW9uPTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OQUBAAAAL1N5c3RlbS5UcmFuc2FjdGlvbnMuVHJhbnNhY3Rpb25BYm9ydGVkRXhjZXB0aW9uDAAAAAlDbGFzc05hbWUHTWVzc2FnZQREYXRhDklubmVyRXhjZXB0aW9uB0hlbHBVUkwQU3RhY2tUcmFjZVN0cmluZxZSZW1vdGVTdGFja1RyYWNlU3RyaW5nEFJlbW90ZVN0YWNrSW5kZXgPRXhjZXB0aW9uTWV0aG9kB0hSZXN1bHQGU291cmNlDVdhdHNvbkJ1Y2tldHMBAQMDAQEBAAEAAQcpU3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwQU3lzdGVtLkV4Y2VwdGlvbggIAgIAAAAGAwAAAC9TeXN0ZW0uVHJhbnNhY3Rpb25zLlRyYW5zYWN0aW9uQWJvcnRlZEV4Y2VwdGlvbgYEAAAAB21lc3NhZ2UJBQAAAAkGAAAABgcAAAAZaHR0cDovL21zZG4ubWljcm9zb2Z0LmNvbQYIAAAAFFN0YWNrVHJhY2Ugc3RyaW5nLi4uBgkAAAAbUmVtb3RlIFN0YWNrVHJhY2Ugc3RyaW5nLi4uAAAAAAroAwAABgoAAAAXRXhjZXB0aW9uX0NsYXNzX1NhbXBsZXMKBAUAAAApU3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwDAAAABGhlYWQHdmVyc2lvbgVjb3VudAMAADhTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbCtEaWN0aW9uYXJ5Tm9kZQgICQsAAAACAAAAAgAAAAQGAAAAEFN5c3RlbS5FeGNlcHRpb24MAAAACUNsYXNzTmFtZQdNZXNzYWdlBERhdGEOSW5uZXJFeGNlcHRpb24HSGVscFVSTBBTdGFja1RyYWNlU3RyaW5nFlJlbW90ZVN0YWNrVHJhY2VTdHJpbmcQUmVtb3RlU3RhY2tJbmRleA9FeGNlcHRpb25NZXRob2QHSFJlc3VsdAZTb3VyY2UNV2F0c29uQnVja2V0cwEBAwMBAQEAAQABBylTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbBBTeXN0ZW0uRXhjZXB0aW9uCAgCBgwAAAAQU3lzdGVtLkV4Y2VwdGlvbgkEAAAACQ4AAAAJDwAAAAkHAAAACQgAAAAJCQAAAAAAAAAK6AMAAAkKAAAACgQLAAAAOFN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsK0RpY3Rpb25hcnlOb2RlAwAAAANrZXkFdmFsdWUEbmV4dAICAzhTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbCtEaWN0aW9uYXJ5Tm9kZQYUAAAABnNlY3JldAgBAQkVAAAAAQ4AAAAFAAAACRYAAAACAAAAAgAAAAEPAAAABgAAAAkMAAAABhgAAAAXSW5uZXIgZXhjZXB0aW9uIG1lc3NhZ2UKCgoKCgAAAAAKABUTgAoKARUAAAALAAAACAgBAAAABhkAAAADb25lCgEWAAAACwAAAAkUAAAACAEBCRsAAAABGwAAAAsAAAAICAEAAAAJGQAAAAoL", TargetFrameworkMoniker.netfx461) } }; - var transactionException = new TransactionException("message", exception); - yield return new object[] { PopulateException(transactionException), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAFZTeXN0ZW0uVHJhbnNhY3Rpb25zLCBWZXJzaW9uPTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OQUBAAAAKFN5c3RlbS5UcmFuc2FjdGlvbnMuVHJhbnNhY3Rpb25FeGNlcHRpb24MAAAACUNsYXNzTmFtZQdNZXNzYWdlBERhdGEOSW5uZXJFeGNlcHRpb24HSGVscFVSTBBTdGFja1RyYWNlU3RyaW5nFlJlbW90ZVN0YWNrVHJhY2VTdHJpbmcQUmVtb3RlU3RhY2tJbmRleA9FeGNlcHRpb25NZXRob2QHSFJlc3VsdAZTb3VyY2UNV2F0c29uQnVja2V0cwEBAwMBAQEAAQABBylTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbBBTeXN0ZW0uRXhjZXB0aW9uCAgCAgAAAAYDAAAAKFN5c3RlbS5UcmFuc2FjdGlvbnMuVHJhbnNhY3Rpb25FeGNlcHRpb24GBAAAAAdtZXNzYWdlCQUAAAAJBgAAAAYHAAAAGWh0dHA6Ly9tc2RuLm1pY3Jvc29mdC5jb20GCAAAABRTdGFja1RyYWNlIHN0cmluZy4uLgYJAAAAG1JlbW90ZSBTdGFja1RyYWNlIHN0cmluZy4uLgAAAAAK6AMAAAYKAAAAF0V4Y2VwdGlvbl9DbGFzc19TYW1wbGVzCgQFAAAAKVN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsAwAAAARoZWFkB3ZlcnNpb24FY291bnQDAAA4U3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwrRGljdGlvbmFyeU5vZGUICAkLAAAAAgAAAAIAAAAEBgAAABBTeXN0ZW0uRXhjZXB0aW9uDAAAAAlDbGFzc05hbWUHTWVzc2FnZQREYXRhDklubmVyRXhjZXB0aW9uB0hlbHBVUkwQU3RhY2tUcmFjZVN0cmluZxZSZW1vdGVTdGFja1RyYWNlU3RyaW5nEFJlbW90ZVN0YWNrSW5kZXgPRXhjZXB0aW9uTWV0aG9kB0hSZXN1bHQGU291cmNlDVdhdHNvbkJ1Y2tldHMBAQMDAQEBAAEAAQcpU3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwQU3lzdGVtLkV4Y2VwdGlvbggIAgYMAAAAEFN5c3RlbS5FeGNlcHRpb24JBAAAAAkOAAAACQ8AAAAJBwAAAAkIAAAACQkAAAAAAAAACugDAAAJCgAAAAoECwAAADhTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbCtEaWN0aW9uYXJ5Tm9kZQMAAAADa2V5BXZhbHVlBG5leHQCAgM4U3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwrRGljdGlvbmFyeU5vZGUGFAAAAAZzZWNyZXQIAQEJFQAAAAEOAAAABQAAAAkWAAAAAgAAAAIAAAABDwAAAAYAAAAJDAAAAAYYAAAAF0lubmVyIGV4Y2VwdGlvbiBtZXNzYWdlCgoKCgoAAAAACgAVE4AKCgEVAAAACwAAAAgIAQAAAAYZAAAAA29uZQoBFgAAAAsAAAAJFAAAAAgBAQkbAAAAARsAAAALAAAACAgBAAAACRkAAAAKCw==", TargetFrameworkMoniker.netcoreapp20), new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAFZTeXN0ZW0uVHJhbnNhY3Rpb25zLCBWZXJzaW9uPTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OQUBAAAAKFN5c3RlbS5UcmFuc2FjdGlvbnMuVHJhbnNhY3Rpb25FeGNlcHRpb24MAAAACUNsYXNzTmFtZQdNZXNzYWdlBERhdGEOSW5uZXJFeGNlcHRpb24HSGVscFVSTBBTdGFja1RyYWNlU3RyaW5nFlJlbW90ZVN0YWNrVHJhY2VTdHJpbmcQUmVtb3RlU3RhY2tJbmRleA9FeGNlcHRpb25NZXRob2QHSFJlc3VsdAZTb3VyY2UNV2F0c29uQnVja2V0cwEBAwMBAQEAAQABBylTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbBBTeXN0ZW0uRXhjZXB0aW9uCAgCAgAAAAYDAAAAKFN5c3RlbS5UcmFuc2FjdGlvbnMuVHJhbnNhY3Rpb25FeGNlcHRpb24GBAAAAAdtZXNzYWdlCQUAAAAJBgAAAAYHAAAAGWh0dHA6Ly9tc2RuLm1pY3Jvc29mdC5jb20GCAAAABRTdGFja1RyYWNlIHN0cmluZy4uLgYJAAAAG1JlbW90ZSBTdGFja1RyYWNlIHN0cmluZy4uLgAAAAAK6AMAAAYKAAAAF0V4Y2VwdGlvbl9DbGFzc19TYW1wbGVzCgQFAAAAKVN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsAwAAAARoZWFkB3ZlcnNpb24FY291bnQDAAA4U3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwrRGljdGlvbmFyeU5vZGUICAkLAAAAAgAAAAIAAAAEBgAAABBTeXN0ZW0uRXhjZXB0aW9uDAAAAAlDbGFzc05hbWUHTWVzc2FnZQREYXRhDklubmVyRXhjZXB0aW9uB0hlbHBVUkwQU3RhY2tUcmFjZVN0cmluZxZSZW1vdGVTdGFja1RyYWNlU3RyaW5nEFJlbW90ZVN0YWNrSW5kZXgPRXhjZXB0aW9uTWV0aG9kB0hSZXN1bHQGU291cmNlDVdhdHNvbkJ1Y2tldHMBAQMDAQEBAAEAAQcpU3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwQU3lzdGVtLkV4Y2VwdGlvbggIAgYMAAAAEFN5c3RlbS5FeGNlcHRpb24JBAAAAAkOAAAACQ8AAAAJBwAAAAkIAAAACQkAAAAAAAAACugDAAAJCgAAAAoECwAAADhTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbCtEaWN0aW9uYXJ5Tm9kZQMAAAADa2V5BXZhbHVlBG5leHQCAgM4U3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwrRGljdGlvbmFyeU5vZGUGFAAAAAZzZWNyZXQIAQEJFQAAAAEOAAAABQAAAAkWAAAAAgAAAAIAAAABDwAAAAYAAAAJDAAAAAYYAAAAF0lubmVyIGV4Y2VwdGlvbiBtZXNzYWdlCgoKCgoAAAAACgAVE4AKCgEVAAAACwAAAAgIAQAAAAYZAAAAA29uZQoBFgAAAAsAAAAJFAAAAAgBAQkbAAAAARsAAAALAAAACAgBAAAACRkAAAAKCw==", TargetFrameworkMoniker.netfx461) } }; + var transactionException = new TransactionException("message", exception); + yield return new object[] { PopulateException(transactionException), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAFZTeXN0ZW0uVHJhbnNhY3Rpb25zLCBWZXJzaW9uPTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OQUBAAAAKFN5c3RlbS5UcmFuc2FjdGlvbnMuVHJhbnNhY3Rpb25FeGNlcHRpb24MAAAACUNsYXNzTmFtZQdNZXNzYWdlBERhdGEOSW5uZXJFeGNlcHRpb24HSGVscFVSTBBTdGFja1RyYWNlU3RyaW5nFlJlbW90ZVN0YWNrVHJhY2VTdHJpbmcQUmVtb3RlU3RhY2tJbmRleA9FeGNlcHRpb25NZXRob2QHSFJlc3VsdAZTb3VyY2UNV2F0c29uQnVja2V0cwEBAwMBAQEAAQABBylTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbBBTeXN0ZW0uRXhjZXB0aW9uCAgCAgAAAAYDAAAAKFN5c3RlbS5UcmFuc2FjdGlvbnMuVHJhbnNhY3Rpb25FeGNlcHRpb24GBAAAAAdtZXNzYWdlCQUAAAAJBgAAAAYHAAAAGWh0dHA6Ly9tc2RuLm1pY3Jvc29mdC5jb20GCAAAABRTdGFja1RyYWNlIHN0cmluZy4uLgYJAAAAG1JlbW90ZSBTdGFja1RyYWNlIHN0cmluZy4uLgAAAAAK6AMAAAYKAAAAF0V4Y2VwdGlvbl9DbGFzc19TYW1wbGVzCgQFAAAAKVN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsAwAAAARoZWFkB3ZlcnNpb24FY291bnQDAAA4U3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwrRGljdGlvbmFyeU5vZGUICAkLAAAAAgAAAAIAAAAEBgAAABBTeXN0ZW0uRXhjZXB0aW9uDAAAAAlDbGFzc05hbWUHTWVzc2FnZQREYXRhDklubmVyRXhjZXB0aW9uB0hlbHBVUkwQU3RhY2tUcmFjZVN0cmluZxZSZW1vdGVTdGFja1RyYWNlU3RyaW5nEFJlbW90ZVN0YWNrSW5kZXgPRXhjZXB0aW9uTWV0aG9kB0hSZXN1bHQGU291cmNlDVdhdHNvbkJ1Y2tldHMBAQMDAQEBAAEAAQcpU3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwQU3lzdGVtLkV4Y2VwdGlvbggIAgYMAAAAEFN5c3RlbS5FeGNlcHRpb24JBAAAAAkOAAAACQ8AAAAJBwAAAAkIAAAACQkAAAAAAAAACugDAAAJCgAAAAoECwAAADhTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbCtEaWN0aW9uYXJ5Tm9kZQMAAAADa2V5BXZhbHVlBG5leHQCAgM4U3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwrRGljdGlvbmFyeU5vZGUGFAAAAAZzZWNyZXQIAQEJFQAAAAEOAAAABQAAAAkWAAAAAgAAAAIAAAABDwAAAAYAAAAJDAAAAAYYAAAAF0lubmVyIGV4Y2VwdGlvbiBtZXNzYWdlCgoKCgoAAAAACgAVE4AKCgEVAAAACwAAAAgIAQAAAAYZAAAAA29uZQoBFgAAAAsAAAAJFAAAAAgBAQkbAAAAARsAAAALAAAACAgBAAAACRkAAAAKCw==", TargetFrameworkMoniker.netcoreapp20), new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAFZTeXN0ZW0uVHJhbnNhY3Rpb25zLCBWZXJzaW9uPTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OQUBAAAAKFN5c3RlbS5UcmFuc2FjdGlvbnMuVHJhbnNhY3Rpb25FeGNlcHRpb24MAAAACUNsYXNzTmFtZQdNZXNzYWdlBERhdGEOSW5uZXJFeGNlcHRpb24HSGVscFVSTBBTdGFja1RyYWNlU3RyaW5nFlJlbW90ZVN0YWNrVHJhY2VTdHJpbmcQUmVtb3RlU3RhY2tJbmRleA9FeGNlcHRpb25NZXRob2QHSFJlc3VsdAZTb3VyY2UNV2F0c29uQnVja2V0cwEBAwMBAQEAAQABBylTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbBBTeXN0ZW0uRXhjZXB0aW9uCAgCAgAAAAYDAAAAKFN5c3RlbS5UcmFuc2FjdGlvbnMuVHJhbnNhY3Rpb25FeGNlcHRpb24GBAAAAAdtZXNzYWdlCQUAAAAJBgAAAAYHAAAAGWh0dHA6Ly9tc2RuLm1pY3Jvc29mdC5jb20GCAAAABRTdGFja1RyYWNlIHN0cmluZy4uLgYJAAAAG1JlbW90ZSBTdGFja1RyYWNlIHN0cmluZy4uLgAAAAAK6AMAAAYKAAAAF0V4Y2VwdGlvbl9DbGFzc19TYW1wbGVzCgQFAAAAKVN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsAwAAAARoZWFkB3ZlcnNpb24FY291bnQDAAA4U3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwrRGljdGlvbmFyeU5vZGUICAkLAAAAAgAAAAIAAAAEBgAAABBTeXN0ZW0uRXhjZXB0aW9uDAAAAAlDbGFzc05hbWUHTWVzc2FnZQREYXRhDklubmVyRXhjZXB0aW9uB0hlbHBVUkwQU3RhY2tUcmFjZVN0cmluZxZSZW1vdGVTdGFja1RyYWNlU3RyaW5nEFJlbW90ZVN0YWNrSW5kZXgPRXhjZXB0aW9uTWV0aG9kB0hSZXN1bHQGU291cmNlDVdhdHNvbkJ1Y2tldHMBAQMDAQEBAAEAAQcpU3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwQU3lzdGVtLkV4Y2VwdGlvbggIAgYMAAAAEFN5c3RlbS5FeGNlcHRpb24JBAAAAAkOAAAACQ8AAAAJBwAAAAkIAAAACQkAAAAAAAAACugDAAAJCgAAAAoECwAAADhTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbCtEaWN0aW9uYXJ5Tm9kZQMAAAADa2V5BXZhbHVlBG5leHQCAgM4U3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwrRGljdGlvbmFyeU5vZGUGFAAAAAZzZWNyZXQIAQEJFQAAAAEOAAAABQAAAAkWAAAAAgAAAAIAAAABDwAAAAYAAAAJDAAAAAYYAAAAF0lubmVyIGV4Y2VwdGlvbiBtZXNzYWdlCgoKCgoAAAAACgAVE4AKCgEVAAAACwAAAAgIAQAAAAYZAAAAA29uZQoBFgAAAAsAAAAJFAAAAAgBAQkbAAAAARsAAAALAAAACAgBAAAACRkAAAAKCw==", TargetFrameworkMoniker.netfx461) } }; - var transactionInDoubtException = new TransactionInDoubtException("message", exception); - yield return new object[] { PopulateException(transactionInDoubtException), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAFZTeXN0ZW0uVHJhbnNhY3Rpb25zLCBWZXJzaW9uPTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OQUBAAAAL1N5c3RlbS5UcmFuc2FjdGlvbnMuVHJhbnNhY3Rpb25JbkRvdWJ0RXhjZXB0aW9uDAAAAAlDbGFzc05hbWUHTWVzc2FnZQREYXRhDklubmVyRXhjZXB0aW9uB0hlbHBVUkwQU3RhY2tUcmFjZVN0cmluZxZSZW1vdGVTdGFja1RyYWNlU3RyaW5nEFJlbW90ZVN0YWNrSW5kZXgPRXhjZXB0aW9uTWV0aG9kB0hSZXN1bHQGU291cmNlDVdhdHNvbkJ1Y2tldHMBAQMDAQEBAAEAAQcpU3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwQU3lzdGVtLkV4Y2VwdGlvbggIAgIAAAAGAwAAAC9TeXN0ZW0uVHJhbnNhY3Rpb25zLlRyYW5zYWN0aW9uSW5Eb3VidEV4Y2VwdGlvbgYEAAAAB21lc3NhZ2UJBQAAAAkGAAAABgcAAAAZaHR0cDovL21zZG4ubWljcm9zb2Z0LmNvbQYIAAAAFFN0YWNrVHJhY2Ugc3RyaW5nLi4uBgkAAAAbUmVtb3RlIFN0YWNrVHJhY2Ugc3RyaW5nLi4uAAAAAAroAwAABgoAAAAXRXhjZXB0aW9uX0NsYXNzX1NhbXBsZXMKBAUAAAApU3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwDAAAABGhlYWQHdmVyc2lvbgVjb3VudAMAADhTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbCtEaWN0aW9uYXJ5Tm9kZQgICQsAAAACAAAAAgAAAAQGAAAAEFN5c3RlbS5FeGNlcHRpb24MAAAACUNsYXNzTmFtZQdNZXNzYWdlBERhdGEOSW5uZXJFeGNlcHRpb24HSGVscFVSTBBTdGFja1RyYWNlU3RyaW5nFlJlbW90ZVN0YWNrVHJhY2VTdHJpbmcQUmVtb3RlU3RhY2tJbmRleA9FeGNlcHRpb25NZXRob2QHSFJlc3VsdAZTb3VyY2UNV2F0c29uQnVja2V0cwEBAwMBAQEAAQABBylTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbBBTeXN0ZW0uRXhjZXB0aW9uCAgCBgwAAAAQU3lzdGVtLkV4Y2VwdGlvbgkEAAAACQ4AAAAJDwAAAAkHAAAACQgAAAAJCQAAAAAAAAAK6AMAAAkKAAAACgQLAAAAOFN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsK0RpY3Rpb25hcnlOb2RlAwAAAANrZXkFdmFsdWUEbmV4dAICAzhTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbCtEaWN0aW9uYXJ5Tm9kZQYUAAAABnNlY3JldAgBAQkVAAAAAQ4AAAAFAAAACRYAAAACAAAAAgAAAAEPAAAABgAAAAkMAAAABhgAAAAXSW5uZXIgZXhjZXB0aW9uIG1lc3NhZ2UKCgoKCgAAAAAKABUTgAoKARUAAAALAAAACAgBAAAABhkAAAADb25lCgEWAAAACwAAAAkUAAAACAEBCRsAAAABGwAAAAsAAAAICAEAAAAJGQAAAAoL", TargetFrameworkMoniker.netcoreapp20), new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAFZTeXN0ZW0uVHJhbnNhY3Rpb25zLCBWZXJzaW9uPTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OQUBAAAAL1N5c3RlbS5UcmFuc2FjdGlvbnMuVHJhbnNhY3Rpb25JbkRvdWJ0RXhjZXB0aW9uDAAAAAlDbGFzc05hbWUHTWVzc2FnZQREYXRhDklubmVyRXhjZXB0aW9uB0hlbHBVUkwQU3RhY2tUcmFjZVN0cmluZxZSZW1vdGVTdGFja1RyYWNlU3RyaW5nEFJlbW90ZVN0YWNrSW5kZXgPRXhjZXB0aW9uTWV0aG9kB0hSZXN1bHQGU291cmNlDVdhdHNvbkJ1Y2tldHMBAQMDAQEBAAEAAQcpU3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwQU3lzdGVtLkV4Y2VwdGlvbggIAgIAAAAGAwAAAC9TeXN0ZW0uVHJhbnNhY3Rpb25zLlRyYW5zYWN0aW9uSW5Eb3VidEV4Y2VwdGlvbgYEAAAAB21lc3NhZ2UJBQAAAAkGAAAABgcAAAAZaHR0cDovL21zZG4ubWljcm9zb2Z0LmNvbQYIAAAAFFN0YWNrVHJhY2Ugc3RyaW5nLi4uBgkAAAAbUmVtb3RlIFN0YWNrVHJhY2Ugc3RyaW5nLi4uAAAAAAroAwAABgoAAAAXRXhjZXB0aW9uX0NsYXNzX1NhbXBsZXMKBAUAAAApU3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwDAAAABGhlYWQHdmVyc2lvbgVjb3VudAMAADhTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbCtEaWN0aW9uYXJ5Tm9kZQgICQsAAAACAAAAAgAAAAQGAAAAEFN5c3RlbS5FeGNlcHRpb24MAAAACUNsYXNzTmFtZQdNZXNzYWdlBERhdGEOSW5uZXJFeGNlcHRpb24HSGVscFVSTBBTdGFja1RyYWNlU3RyaW5nFlJlbW90ZVN0YWNrVHJhY2VTdHJpbmcQUmVtb3RlU3RhY2tJbmRleA9FeGNlcHRpb25NZXRob2QHSFJlc3VsdAZTb3VyY2UNV2F0c29uQnVja2V0cwEBAwMBAQEAAQABBylTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbBBTeXN0ZW0uRXhjZXB0aW9uCAgCBgwAAAAQU3lzdGVtLkV4Y2VwdGlvbgkEAAAACQ4AAAAJDwAAAAkHAAAACQgAAAAJCQAAAAAAAAAK6AMAAAkKAAAACgQLAAAAOFN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsK0RpY3Rpb25hcnlOb2RlAwAAAANrZXkFdmFsdWUEbmV4dAICAzhTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbCtEaWN0aW9uYXJ5Tm9kZQYUAAAABnNlY3JldAgBAQkVAAAAAQ4AAAAFAAAACRYAAAACAAAAAgAAAAEPAAAABgAAAAkMAAAABhgAAAAXSW5uZXIgZXhjZXB0aW9uIG1lc3NhZ2UKCgoKCgAAAAAKABUTgAoKARUAAAALAAAACAgBAAAABhkAAAADb25lCgEWAAAACwAAAAkUAAAACAEBCRsAAAABGwAAAAsAAAAICAEAAAAJGQAAAAoL", TargetFrameworkMoniker.netfx461) } }; + var transactionInDoubtException = new TransactionInDoubtException("message", exception); + yield return new object[] { PopulateException(transactionInDoubtException), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAFZTeXN0ZW0uVHJhbnNhY3Rpb25zLCBWZXJzaW9uPTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OQUBAAAAL1N5c3RlbS5UcmFuc2FjdGlvbnMuVHJhbnNhY3Rpb25JbkRvdWJ0RXhjZXB0aW9uDAAAAAlDbGFzc05hbWUHTWVzc2FnZQREYXRhDklubmVyRXhjZXB0aW9uB0hlbHBVUkwQU3RhY2tUcmFjZVN0cmluZxZSZW1vdGVTdGFja1RyYWNlU3RyaW5nEFJlbW90ZVN0YWNrSW5kZXgPRXhjZXB0aW9uTWV0aG9kB0hSZXN1bHQGU291cmNlDVdhdHNvbkJ1Y2tldHMBAQMDAQEBAAEAAQcpU3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwQU3lzdGVtLkV4Y2VwdGlvbggIAgIAAAAGAwAAAC9TeXN0ZW0uVHJhbnNhY3Rpb25zLlRyYW5zYWN0aW9uSW5Eb3VidEV4Y2VwdGlvbgYEAAAAB21lc3NhZ2UJBQAAAAkGAAAABgcAAAAZaHR0cDovL21zZG4ubWljcm9zb2Z0LmNvbQYIAAAAFFN0YWNrVHJhY2Ugc3RyaW5nLi4uBgkAAAAbUmVtb3RlIFN0YWNrVHJhY2Ugc3RyaW5nLi4uAAAAAAroAwAABgoAAAAXRXhjZXB0aW9uX0NsYXNzX1NhbXBsZXMKBAUAAAApU3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwDAAAABGhlYWQHdmVyc2lvbgVjb3VudAMAADhTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbCtEaWN0aW9uYXJ5Tm9kZQgICQsAAAACAAAAAgAAAAQGAAAAEFN5c3RlbS5FeGNlcHRpb24MAAAACUNsYXNzTmFtZQdNZXNzYWdlBERhdGEOSW5uZXJFeGNlcHRpb24HSGVscFVSTBBTdGFja1RyYWNlU3RyaW5nFlJlbW90ZVN0YWNrVHJhY2VTdHJpbmcQUmVtb3RlU3RhY2tJbmRleA9FeGNlcHRpb25NZXRob2QHSFJlc3VsdAZTb3VyY2UNV2F0c29uQnVja2V0cwEBAwMBAQEAAQABBylTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbBBTeXN0ZW0uRXhjZXB0aW9uCAgCBgwAAAAQU3lzdGVtLkV4Y2VwdGlvbgkEAAAACQ4AAAAJDwAAAAkHAAAACQgAAAAJCQAAAAAAAAAK6AMAAAkKAAAACgQLAAAAOFN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsK0RpY3Rpb25hcnlOb2RlAwAAAANrZXkFdmFsdWUEbmV4dAICAzhTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbCtEaWN0aW9uYXJ5Tm9kZQYUAAAABnNlY3JldAgBAQkVAAAAAQ4AAAAFAAAACRYAAAACAAAAAgAAAAEPAAAABgAAAAkMAAAABhgAAAAXSW5uZXIgZXhjZXB0aW9uIG1lc3NhZ2UKCgoKCgAAAAAKABUTgAoKARUAAAALAAAACAgBAAAABhkAAAADb25lCgEWAAAACwAAAAkUAAAACAEBCRsAAAABGwAAAAsAAAAICAEAAAAJGQAAAAoL", TargetFrameworkMoniker.netcoreapp20), new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAFZTeXN0ZW0uVHJhbnNhY3Rpb25zLCBWZXJzaW9uPTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OQUBAAAAL1N5c3RlbS5UcmFuc2FjdGlvbnMuVHJhbnNhY3Rpb25JbkRvdWJ0RXhjZXB0aW9uDAAAAAlDbGFzc05hbWUHTWVzc2FnZQREYXRhDklubmVyRXhjZXB0aW9uB0hlbHBVUkwQU3RhY2tUcmFjZVN0cmluZxZSZW1vdGVTdGFja1RyYWNlU3RyaW5nEFJlbW90ZVN0YWNrSW5kZXgPRXhjZXB0aW9uTWV0aG9kB0hSZXN1bHQGU291cmNlDVdhdHNvbkJ1Y2tldHMBAQMDAQEBAAEAAQcpU3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwQU3lzdGVtLkV4Y2VwdGlvbggIAgIAAAAGAwAAAC9TeXN0ZW0uVHJhbnNhY3Rpb25zLlRyYW5zYWN0aW9uSW5Eb3VidEV4Y2VwdGlvbgYEAAAAB21lc3NhZ2UJBQAAAAkGAAAABgcAAAAZaHR0cDovL21zZG4ubWljcm9zb2Z0LmNvbQYIAAAAFFN0YWNrVHJhY2Ugc3RyaW5nLi4uBgkAAAAbUmVtb3RlIFN0YWNrVHJhY2Ugc3RyaW5nLi4uAAAAAAroAwAABgoAAAAXRXhjZXB0aW9uX0NsYXNzX1NhbXBsZXMKBAUAAAApU3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwDAAAABGhlYWQHdmVyc2lvbgVjb3VudAMAADhTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbCtEaWN0aW9uYXJ5Tm9kZQgICQsAAAACAAAAAgAAAAQGAAAAEFN5c3RlbS5FeGNlcHRpb24MAAAACUNsYXNzTmFtZQdNZXNzYWdlBERhdGEOSW5uZXJFeGNlcHRpb24HSGVscFVSTBBTdGFja1RyYWNlU3RyaW5nFlJlbW90ZVN0YWNrVHJhY2VTdHJpbmcQUmVtb3RlU3RhY2tJbmRleA9FeGNlcHRpb25NZXRob2QHSFJlc3VsdAZTb3VyY2UNV2F0c29uQnVja2V0cwEBAwMBAQEAAQABBylTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbBBTeXN0ZW0uRXhjZXB0aW9uCAgCBgwAAAAQU3lzdGVtLkV4Y2VwdGlvbgkEAAAACQ4AAAAJDwAAAAkHAAAACQgAAAAJCQAAAAAAAAAK6AMAAAkKAAAACgQLAAAAOFN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsK0RpY3Rpb25hcnlOb2RlAwAAAANrZXkFdmFsdWUEbmV4dAICAzhTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbCtEaWN0aW9uYXJ5Tm9kZQYUAAAABnNlY3JldAgBAQkVAAAAAQ4AAAAFAAAACRYAAAACAAAAAgAAAAEPAAAABgAAAAkMAAAABhgAAAAXSW5uZXIgZXhjZXB0aW9uIG1lc3NhZ2UKCgoKCgAAAAAKABUTgAoKARUAAAALAAAACAgBAAAABhkAAAADb25lCgEWAAAACwAAAAkUAAAACAEBCRsAAAABGwAAAAsAAAAICAEAAAAJGQAAAAoL", TargetFrameworkMoniker.netfx461) } }; - var transactionManagerCommunicationException = new TransactionManagerCommunicationException("message", exception); - yield return new object[] { PopulateException(transactionManagerCommunicationException), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAFZTeXN0ZW0uVHJhbnNhY3Rpb25zLCBWZXJzaW9uPTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OQUBAAAAPFN5c3RlbS5UcmFuc2FjdGlvbnMuVHJhbnNhY3Rpb25NYW5hZ2VyQ29tbXVuaWNhdGlvbkV4Y2VwdGlvbgwAAAAJQ2xhc3NOYW1lB01lc3NhZ2UERGF0YQ5Jbm5lckV4Y2VwdGlvbgdIZWxwVVJMEFN0YWNrVHJhY2VTdHJpbmcWUmVtb3RlU3RhY2tUcmFjZVN0cmluZxBSZW1vdGVTdGFja0luZGV4D0V4Y2VwdGlvbk1ldGhvZAdIUmVzdWx0BlNvdXJjZQ1XYXRzb25CdWNrZXRzAQEDAwEBAQABAAEHKVN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsEFN5c3RlbS5FeGNlcHRpb24ICAICAAAABgMAAAA8U3lzdGVtLlRyYW5zYWN0aW9ucy5UcmFuc2FjdGlvbk1hbmFnZXJDb21tdW5pY2F0aW9uRXhjZXB0aW9uBgQAAAAHbWVzc2FnZQkFAAAACQYAAAAGBwAAABlodHRwOi8vbXNkbi5taWNyb3NvZnQuY29tBggAAAAUU3RhY2tUcmFjZSBzdHJpbmcuLi4GCQAAABtSZW1vdGUgU3RhY2tUcmFjZSBzdHJpbmcuLi4AAAAACugDAAAGCgAAABdFeGNlcHRpb25fQ2xhc3NfU2FtcGxlcwoEBQAAAClTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbAMAAAAEaGVhZAd2ZXJzaW9uBWNvdW50AwAAOFN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsK0RpY3Rpb25hcnlOb2RlCAgJCwAAAAIAAAACAAAABAYAAAAQU3lzdGVtLkV4Y2VwdGlvbgwAAAAJQ2xhc3NOYW1lB01lc3NhZ2UERGF0YQ5Jbm5lckV4Y2VwdGlvbgdIZWxwVVJMEFN0YWNrVHJhY2VTdHJpbmcWUmVtb3RlU3RhY2tUcmFjZVN0cmluZxBSZW1vdGVTdGFja0luZGV4D0V4Y2VwdGlvbk1ldGhvZAdIUmVzdWx0BlNvdXJjZQ1XYXRzb25CdWNrZXRzAQEDAwEBAQABAAEHKVN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsEFN5c3RlbS5FeGNlcHRpb24ICAIGDAAAABBTeXN0ZW0uRXhjZXB0aW9uCQQAAAAJDgAAAAkPAAAACQcAAAAJCAAAAAkJAAAAAAAAAAroAwAACQoAAAAKBAsAAAA4U3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwrRGljdGlvbmFyeU5vZGUDAAAAA2tleQV2YWx1ZQRuZXh0AgIDOFN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsK0RpY3Rpb25hcnlOb2RlBhQAAAAGc2VjcmV0CAEBCRUAAAABDgAAAAUAAAAJFgAAAAIAAAACAAAAAQ8AAAAGAAAACQwAAAAGGAAAABdJbm5lciBleGNlcHRpb24gbWVzc2FnZQoKCgoKAAAAAAoAFROACgoBFQAAAAsAAAAICAEAAAAGGQAAAANvbmUKARYAAAALAAAACRQAAAAIAQEJGwAAAAEbAAAACwAAAAgIAQAAAAkZAAAACgs=", TargetFrameworkMoniker.netcoreapp20), new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAFZTeXN0ZW0uVHJhbnNhY3Rpb25zLCBWZXJzaW9uPTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OQUBAAAAPFN5c3RlbS5UcmFuc2FjdGlvbnMuVHJhbnNhY3Rpb25NYW5hZ2VyQ29tbXVuaWNhdGlvbkV4Y2VwdGlvbgwAAAAJQ2xhc3NOYW1lB01lc3NhZ2UERGF0YQ5Jbm5lckV4Y2VwdGlvbgdIZWxwVVJMEFN0YWNrVHJhY2VTdHJpbmcWUmVtb3RlU3RhY2tUcmFjZVN0cmluZxBSZW1vdGVTdGFja0luZGV4D0V4Y2VwdGlvbk1ldGhvZAdIUmVzdWx0BlNvdXJjZQ1XYXRzb25CdWNrZXRzAQEDAwEBAQABAAEHKVN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsEFN5c3RlbS5FeGNlcHRpb24ICAICAAAABgMAAAA8U3lzdGVtLlRyYW5zYWN0aW9ucy5UcmFuc2FjdGlvbk1hbmFnZXJDb21tdW5pY2F0aW9uRXhjZXB0aW9uBgQAAAAHbWVzc2FnZQkFAAAACQYAAAAGBwAAABlodHRwOi8vbXNkbi5taWNyb3NvZnQuY29tBggAAAAUU3RhY2tUcmFjZSBzdHJpbmcuLi4GCQAAABtSZW1vdGUgU3RhY2tUcmFjZSBzdHJpbmcuLi4AAAAACugDAAAGCgAAABdFeGNlcHRpb25fQ2xhc3NfU2FtcGxlcwoEBQAAAClTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbAMAAAAEaGVhZAd2ZXJzaW9uBWNvdW50AwAAOFN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsK0RpY3Rpb25hcnlOb2RlCAgJCwAAAAIAAAACAAAABAYAAAAQU3lzdGVtLkV4Y2VwdGlvbgwAAAAJQ2xhc3NOYW1lB01lc3NhZ2UERGF0YQ5Jbm5lckV4Y2VwdGlvbgdIZWxwVVJMEFN0YWNrVHJhY2VTdHJpbmcWUmVtb3RlU3RhY2tUcmFjZVN0cmluZxBSZW1vdGVTdGFja0luZGV4D0V4Y2VwdGlvbk1ldGhvZAdIUmVzdWx0BlNvdXJjZQ1XYXRzb25CdWNrZXRzAQEDAwEBAQABAAEHKVN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsEFN5c3RlbS5FeGNlcHRpb24ICAIGDAAAABBTeXN0ZW0uRXhjZXB0aW9uCQQAAAAJDgAAAAkPAAAACQcAAAAJCAAAAAkJAAAAAAAAAAroAwAACQoAAAAKBAsAAAA4U3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwrRGljdGlvbmFyeU5vZGUDAAAAA2tleQV2YWx1ZQRuZXh0AgIDOFN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsK0RpY3Rpb25hcnlOb2RlBhQAAAAGc2VjcmV0CAEBCRUAAAABDgAAAAUAAAAJFgAAAAIAAAACAAAAAQ8AAAAGAAAACQwAAAAGGAAAABdJbm5lciBleGNlcHRpb24gbWVzc2FnZQoKCgoKAAAAAAoAFROACgoBFQAAAAsAAAAICAEAAAAGGQAAAANvbmUKARYAAAALAAAACRQAAAAIAQEJGwAAAAEbAAAACwAAAAgIAQAAAAkZAAAACgs=", TargetFrameworkMoniker.netfx461) } }; + var transactionManagerCommunicationException = new TransactionManagerCommunicationException("message", exception); + yield return new object[] { PopulateException(transactionManagerCommunicationException), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAFZTeXN0ZW0uVHJhbnNhY3Rpb25zLCBWZXJzaW9uPTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OQUBAAAAPFN5c3RlbS5UcmFuc2FjdGlvbnMuVHJhbnNhY3Rpb25NYW5hZ2VyQ29tbXVuaWNhdGlvbkV4Y2VwdGlvbgwAAAAJQ2xhc3NOYW1lB01lc3NhZ2UERGF0YQ5Jbm5lckV4Y2VwdGlvbgdIZWxwVVJMEFN0YWNrVHJhY2VTdHJpbmcWUmVtb3RlU3RhY2tUcmFjZVN0cmluZxBSZW1vdGVTdGFja0luZGV4D0V4Y2VwdGlvbk1ldGhvZAdIUmVzdWx0BlNvdXJjZQ1XYXRzb25CdWNrZXRzAQEDAwEBAQABAAEHKVN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsEFN5c3RlbS5FeGNlcHRpb24ICAICAAAABgMAAAA8U3lzdGVtLlRyYW5zYWN0aW9ucy5UcmFuc2FjdGlvbk1hbmFnZXJDb21tdW5pY2F0aW9uRXhjZXB0aW9uBgQAAAAHbWVzc2FnZQkFAAAACQYAAAAGBwAAABlodHRwOi8vbXNkbi5taWNyb3NvZnQuY29tBggAAAAUU3RhY2tUcmFjZSBzdHJpbmcuLi4GCQAAABtSZW1vdGUgU3RhY2tUcmFjZSBzdHJpbmcuLi4AAAAACugDAAAGCgAAABdFeGNlcHRpb25fQ2xhc3NfU2FtcGxlcwoEBQAAAClTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbAMAAAAEaGVhZAd2ZXJzaW9uBWNvdW50AwAAOFN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsK0RpY3Rpb25hcnlOb2RlCAgJCwAAAAIAAAACAAAABAYAAAAQU3lzdGVtLkV4Y2VwdGlvbgwAAAAJQ2xhc3NOYW1lB01lc3NhZ2UERGF0YQ5Jbm5lckV4Y2VwdGlvbgdIZWxwVVJMEFN0YWNrVHJhY2VTdHJpbmcWUmVtb3RlU3RhY2tUcmFjZVN0cmluZxBSZW1vdGVTdGFja0luZGV4D0V4Y2VwdGlvbk1ldGhvZAdIUmVzdWx0BlNvdXJjZQ1XYXRzb25CdWNrZXRzAQEDAwEBAQABAAEHKVN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsEFN5c3RlbS5FeGNlcHRpb24ICAIGDAAAABBTeXN0ZW0uRXhjZXB0aW9uCQQAAAAJDgAAAAkPAAAACQcAAAAJCAAAAAkJAAAAAAAAAAroAwAACQoAAAAKBAsAAAA4U3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwrRGljdGlvbmFyeU5vZGUDAAAAA2tleQV2YWx1ZQRuZXh0AgIDOFN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsK0RpY3Rpb25hcnlOb2RlBhQAAAAGc2VjcmV0CAEBCRUAAAABDgAAAAUAAAAJFgAAAAIAAAACAAAAAQ8AAAAGAAAACQwAAAAGGAAAABdJbm5lciBleGNlcHRpb24gbWVzc2FnZQoKCgoKAAAAAAoAFROACgoBFQAAAAsAAAAICAEAAAAGGQAAAANvbmUKARYAAAALAAAACRQAAAAIAQEJGwAAAAEbAAAACwAAAAgIAQAAAAkZAAAACgs=", TargetFrameworkMoniker.netcoreapp20), new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAFZTeXN0ZW0uVHJhbnNhY3Rpb25zLCBWZXJzaW9uPTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OQUBAAAAPFN5c3RlbS5UcmFuc2FjdGlvbnMuVHJhbnNhY3Rpb25NYW5hZ2VyQ29tbXVuaWNhdGlvbkV4Y2VwdGlvbgwAAAAJQ2xhc3NOYW1lB01lc3NhZ2UERGF0YQ5Jbm5lckV4Y2VwdGlvbgdIZWxwVVJMEFN0YWNrVHJhY2VTdHJpbmcWUmVtb3RlU3RhY2tUcmFjZVN0cmluZxBSZW1vdGVTdGFja0luZGV4D0V4Y2VwdGlvbk1ldGhvZAdIUmVzdWx0BlNvdXJjZQ1XYXRzb25CdWNrZXRzAQEDAwEBAQABAAEHKVN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsEFN5c3RlbS5FeGNlcHRpb24ICAICAAAABgMAAAA8U3lzdGVtLlRyYW5zYWN0aW9ucy5UcmFuc2FjdGlvbk1hbmFnZXJDb21tdW5pY2F0aW9uRXhjZXB0aW9uBgQAAAAHbWVzc2FnZQkFAAAACQYAAAAGBwAAABlodHRwOi8vbXNkbi5taWNyb3NvZnQuY29tBggAAAAUU3RhY2tUcmFjZSBzdHJpbmcuLi4GCQAAABtSZW1vdGUgU3RhY2tUcmFjZSBzdHJpbmcuLi4AAAAACugDAAAGCgAAABdFeGNlcHRpb25fQ2xhc3NfU2FtcGxlcwoEBQAAAClTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbAMAAAAEaGVhZAd2ZXJzaW9uBWNvdW50AwAAOFN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsK0RpY3Rpb25hcnlOb2RlCAgJCwAAAAIAAAACAAAABAYAAAAQU3lzdGVtLkV4Y2VwdGlvbgwAAAAJQ2xhc3NOYW1lB01lc3NhZ2UERGF0YQ5Jbm5lckV4Y2VwdGlvbgdIZWxwVVJMEFN0YWNrVHJhY2VTdHJpbmcWUmVtb3RlU3RhY2tUcmFjZVN0cmluZxBSZW1vdGVTdGFja0luZGV4D0V4Y2VwdGlvbk1ldGhvZAdIUmVzdWx0BlNvdXJjZQ1XYXRzb25CdWNrZXRzAQEDAwEBAQABAAEHKVN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsEFN5c3RlbS5FeGNlcHRpb24ICAIGDAAAABBTeXN0ZW0uRXhjZXB0aW9uCQQAAAAJDgAAAAkPAAAACQcAAAAJCAAAAAkJAAAAAAAAAAroAwAACQoAAAAKBAsAAAA4U3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwrRGljdGlvbmFyeU5vZGUDAAAAA2tleQV2YWx1ZQRuZXh0AgIDOFN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsK0RpY3Rpb25hcnlOb2RlBhQAAAAGc2VjcmV0CAEBCRUAAAABDgAAAAUAAAAJFgAAAAIAAAACAAAAAQ8AAAAGAAAACQwAAAAGGAAAABdJbm5lciBleGNlcHRpb24gbWVzc2FnZQoKCgoKAAAAAAoAFROACgoBFQAAAAsAAAAICAEAAAAGGQAAAANvbmUKARYAAAALAAAACRQAAAAIAQEJGwAAAAEbAAAACwAAAAgIAQAAAAkZAAAACgs=", TargetFrameworkMoniker.netfx461) } }; - var transactionPromotionException = new TransactionPromotionException("message", exception); - yield return new object[] { PopulateException(transactionPromotionException), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAFZTeXN0ZW0uVHJhbnNhY3Rpb25zLCBWZXJzaW9uPTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OQUBAAAAMVN5c3RlbS5UcmFuc2FjdGlvbnMuVHJhbnNhY3Rpb25Qcm9tb3Rpb25FeGNlcHRpb24MAAAACUNsYXNzTmFtZQdNZXNzYWdlBERhdGEOSW5uZXJFeGNlcHRpb24HSGVscFVSTBBTdGFja1RyYWNlU3RyaW5nFlJlbW90ZVN0YWNrVHJhY2VTdHJpbmcQUmVtb3RlU3RhY2tJbmRleA9FeGNlcHRpb25NZXRob2QHSFJlc3VsdAZTb3VyY2UNV2F0c29uQnVja2V0cwEBAwMBAQEAAQABBylTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbBBTeXN0ZW0uRXhjZXB0aW9uCAgCAgAAAAYDAAAAMVN5c3RlbS5UcmFuc2FjdGlvbnMuVHJhbnNhY3Rpb25Qcm9tb3Rpb25FeGNlcHRpb24GBAAAAAdtZXNzYWdlCQUAAAAJBgAAAAYHAAAAGWh0dHA6Ly9tc2RuLm1pY3Jvc29mdC5jb20GCAAAABRTdGFja1RyYWNlIHN0cmluZy4uLgYJAAAAG1JlbW90ZSBTdGFja1RyYWNlIHN0cmluZy4uLgAAAAAK6AMAAAYKAAAAF0V4Y2VwdGlvbl9DbGFzc19TYW1wbGVzCgQFAAAAKVN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsAwAAAARoZWFkB3ZlcnNpb24FY291bnQDAAA4U3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwrRGljdGlvbmFyeU5vZGUICAkLAAAAAgAAAAIAAAAEBgAAABBTeXN0ZW0uRXhjZXB0aW9uDAAAAAlDbGFzc05hbWUHTWVzc2FnZQREYXRhDklubmVyRXhjZXB0aW9uB0hlbHBVUkwQU3RhY2tUcmFjZVN0cmluZxZSZW1vdGVTdGFja1RyYWNlU3RyaW5nEFJlbW90ZVN0YWNrSW5kZXgPRXhjZXB0aW9uTWV0aG9kB0hSZXN1bHQGU291cmNlDVdhdHNvbkJ1Y2tldHMBAQMDAQEBAAEAAQcpU3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwQU3lzdGVtLkV4Y2VwdGlvbggIAgYMAAAAEFN5c3RlbS5FeGNlcHRpb24JBAAAAAkOAAAACQ8AAAAJBwAAAAkIAAAACQkAAAAAAAAACugDAAAJCgAAAAoECwAAADhTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbCtEaWN0aW9uYXJ5Tm9kZQMAAAADa2V5BXZhbHVlBG5leHQCAgM4U3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwrRGljdGlvbmFyeU5vZGUGFAAAAAZzZWNyZXQIAQEJFQAAAAEOAAAABQAAAAkWAAAAAgAAAAIAAAABDwAAAAYAAAAJDAAAAAYYAAAAF0lubmVyIGV4Y2VwdGlvbiBtZXNzYWdlCgoKCgoAAAAACgAVE4AKCgEVAAAACwAAAAgIAQAAAAYZAAAAA29uZQoBFgAAAAsAAAAJFAAAAAgBAQkbAAAAARsAAAALAAAACAgBAAAACRkAAAAKCw==", TargetFrameworkMoniker.netcoreapp20), new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAFZTeXN0ZW0uVHJhbnNhY3Rpb25zLCBWZXJzaW9uPTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OQUBAAAAMVN5c3RlbS5UcmFuc2FjdGlvbnMuVHJhbnNhY3Rpb25Qcm9tb3Rpb25FeGNlcHRpb24MAAAACUNsYXNzTmFtZQdNZXNzYWdlBERhdGEOSW5uZXJFeGNlcHRpb24HSGVscFVSTBBTdGFja1RyYWNlU3RyaW5nFlJlbW90ZVN0YWNrVHJhY2VTdHJpbmcQUmVtb3RlU3RhY2tJbmRleA9FeGNlcHRpb25NZXRob2QHSFJlc3VsdAZTb3VyY2UNV2F0c29uQnVja2V0cwEBAwMBAQEAAQABBylTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbBBTeXN0ZW0uRXhjZXB0aW9uCAgCAgAAAAYDAAAAMVN5c3RlbS5UcmFuc2FjdGlvbnMuVHJhbnNhY3Rpb25Qcm9tb3Rpb25FeGNlcHRpb24GBAAAAAdtZXNzYWdlCQUAAAAJBgAAAAYHAAAAGWh0dHA6Ly9tc2RuLm1pY3Jvc29mdC5jb20GCAAAABRTdGFja1RyYWNlIHN0cmluZy4uLgYJAAAAG1JlbW90ZSBTdGFja1RyYWNlIHN0cmluZy4uLgAAAAAK6AMAAAYKAAAAF0V4Y2VwdGlvbl9DbGFzc19TYW1wbGVzCgQFAAAAKVN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsAwAAAARoZWFkB3ZlcnNpb24FY291bnQDAAA4U3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwrRGljdGlvbmFyeU5vZGUICAkLAAAAAgAAAAIAAAAEBgAAABBTeXN0ZW0uRXhjZXB0aW9uDAAAAAlDbGFzc05hbWUHTWVzc2FnZQREYXRhDklubmVyRXhjZXB0aW9uB0hlbHBVUkwQU3RhY2tUcmFjZVN0cmluZxZSZW1vdGVTdGFja1RyYWNlU3RyaW5nEFJlbW90ZVN0YWNrSW5kZXgPRXhjZXB0aW9uTWV0aG9kB0hSZXN1bHQGU291cmNlDVdhdHNvbkJ1Y2tldHMBAQMDAQEBAAEAAQcpU3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwQU3lzdGVtLkV4Y2VwdGlvbggIAgYMAAAAEFN5c3RlbS5FeGNlcHRpb24JBAAAAAkOAAAACQ8AAAAJBwAAAAkIAAAACQkAAAAAAAAACugDAAAJCgAAAAoECwAAADhTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbCtEaWN0aW9uYXJ5Tm9kZQMAAAADa2V5BXZhbHVlBG5leHQCAgM4U3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwrRGljdGlvbmFyeU5vZGUGFAAAAAZzZWNyZXQIAQEJFQAAAAEOAAAABQAAAAkWAAAAAgAAAAIAAAABDwAAAAYAAAAJDAAAAAYYAAAAF0lubmVyIGV4Y2VwdGlvbiBtZXNzYWdlCgoKCgoAAAAACgAVE4AKCgEVAAAACwAAAAgIAQAAAAYZAAAAA29uZQoBFgAAAAsAAAAJFAAAAAgBAQkbAAAAARsAAAALAAAACAgBAAAACRkAAAAKCw==", TargetFrameworkMoniker.netfx461) } }; + var transactionPromotionException = new TransactionPromotionException("message", exception); + yield return new object[] { PopulateException(transactionPromotionException), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAFZTeXN0ZW0uVHJhbnNhY3Rpb25zLCBWZXJzaW9uPTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OQUBAAAAMVN5c3RlbS5UcmFuc2FjdGlvbnMuVHJhbnNhY3Rpb25Qcm9tb3Rpb25FeGNlcHRpb24MAAAACUNsYXNzTmFtZQdNZXNzYWdlBERhdGEOSW5uZXJFeGNlcHRpb24HSGVscFVSTBBTdGFja1RyYWNlU3RyaW5nFlJlbW90ZVN0YWNrVHJhY2VTdHJpbmcQUmVtb3RlU3RhY2tJbmRleA9FeGNlcHRpb25NZXRob2QHSFJlc3VsdAZTb3VyY2UNV2F0c29uQnVja2V0cwEBAwMBAQEAAQABBylTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbBBTeXN0ZW0uRXhjZXB0aW9uCAgCAgAAAAYDAAAAMVN5c3RlbS5UcmFuc2FjdGlvbnMuVHJhbnNhY3Rpb25Qcm9tb3Rpb25FeGNlcHRpb24GBAAAAAdtZXNzYWdlCQUAAAAJBgAAAAYHAAAAGWh0dHA6Ly9tc2RuLm1pY3Jvc29mdC5jb20GCAAAABRTdGFja1RyYWNlIHN0cmluZy4uLgYJAAAAG1JlbW90ZSBTdGFja1RyYWNlIHN0cmluZy4uLgAAAAAK6AMAAAYKAAAAF0V4Y2VwdGlvbl9DbGFzc19TYW1wbGVzCgQFAAAAKVN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsAwAAAARoZWFkB3ZlcnNpb24FY291bnQDAAA4U3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwrRGljdGlvbmFyeU5vZGUICAkLAAAAAgAAAAIAAAAEBgAAABBTeXN0ZW0uRXhjZXB0aW9uDAAAAAlDbGFzc05hbWUHTWVzc2FnZQREYXRhDklubmVyRXhjZXB0aW9uB0hlbHBVUkwQU3RhY2tUcmFjZVN0cmluZxZSZW1vdGVTdGFja1RyYWNlU3RyaW5nEFJlbW90ZVN0YWNrSW5kZXgPRXhjZXB0aW9uTWV0aG9kB0hSZXN1bHQGU291cmNlDVdhdHNvbkJ1Y2tldHMBAQMDAQEBAAEAAQcpU3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwQU3lzdGVtLkV4Y2VwdGlvbggIAgYMAAAAEFN5c3RlbS5FeGNlcHRpb24JBAAAAAkOAAAACQ8AAAAJBwAAAAkIAAAACQkAAAAAAAAACugDAAAJCgAAAAoECwAAADhTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbCtEaWN0aW9uYXJ5Tm9kZQMAAAADa2V5BXZhbHVlBG5leHQCAgM4U3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwrRGljdGlvbmFyeU5vZGUGFAAAAAZzZWNyZXQIAQEJFQAAAAEOAAAABQAAAAkWAAAAAgAAAAIAAAABDwAAAAYAAAAJDAAAAAYYAAAAF0lubmVyIGV4Y2VwdGlvbiBtZXNzYWdlCgoKCgoAAAAACgAVE4AKCgEVAAAACwAAAAgIAQAAAAYZAAAAA29uZQoBFgAAAAsAAAAJFAAAAAgBAQkbAAAAARsAAAALAAAACAgBAAAACRkAAAAKCw==", TargetFrameworkMoniker.netcoreapp20), new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAFZTeXN0ZW0uVHJhbnNhY3Rpb25zLCBWZXJzaW9uPTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OQUBAAAAMVN5c3RlbS5UcmFuc2FjdGlvbnMuVHJhbnNhY3Rpb25Qcm9tb3Rpb25FeGNlcHRpb24MAAAACUNsYXNzTmFtZQdNZXNzYWdlBERhdGEOSW5uZXJFeGNlcHRpb24HSGVscFVSTBBTdGFja1RyYWNlU3RyaW5nFlJlbW90ZVN0YWNrVHJhY2VTdHJpbmcQUmVtb3RlU3RhY2tJbmRleA9FeGNlcHRpb25NZXRob2QHSFJlc3VsdAZTb3VyY2UNV2F0c29uQnVja2V0cwEBAwMBAQEAAQABBylTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbBBTeXN0ZW0uRXhjZXB0aW9uCAgCAgAAAAYDAAAAMVN5c3RlbS5UcmFuc2FjdGlvbnMuVHJhbnNhY3Rpb25Qcm9tb3Rpb25FeGNlcHRpb24GBAAAAAdtZXNzYWdlCQUAAAAJBgAAAAYHAAAAGWh0dHA6Ly9tc2RuLm1pY3Jvc29mdC5jb20GCAAAABRTdGFja1RyYWNlIHN0cmluZy4uLgYJAAAAG1JlbW90ZSBTdGFja1RyYWNlIHN0cmluZy4uLgAAAAAK6AMAAAYKAAAAF0V4Y2VwdGlvbl9DbGFzc19TYW1wbGVzCgQFAAAAKVN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsAwAAAARoZWFkB3ZlcnNpb24FY291bnQDAAA4U3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwrRGljdGlvbmFyeU5vZGUICAkLAAAAAgAAAAIAAAAEBgAAABBTeXN0ZW0uRXhjZXB0aW9uDAAAAAlDbGFzc05hbWUHTWVzc2FnZQREYXRhDklubmVyRXhjZXB0aW9uB0hlbHBVUkwQU3RhY2tUcmFjZVN0cmluZxZSZW1vdGVTdGFja1RyYWNlU3RyaW5nEFJlbW90ZVN0YWNrSW5kZXgPRXhjZXB0aW9uTWV0aG9kB0hSZXN1bHQGU291cmNlDVdhdHNvbkJ1Y2tldHMBAQMDAQEBAAEAAQcpU3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwQU3lzdGVtLkV4Y2VwdGlvbggIAgYMAAAAEFN5c3RlbS5FeGNlcHRpb24JBAAAAAkOAAAACQ8AAAAJBwAAAAkIAAAACQkAAAAAAAAACugDAAAJCgAAAAoECwAAADhTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbCtEaWN0aW9uYXJ5Tm9kZQMAAAADa2V5BXZhbHVlBG5leHQCAgM4U3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwrRGljdGlvbmFyeU5vZGUGFAAAAAZzZWNyZXQIAQEJFQAAAAEOAAAABQAAAAkWAAAAAgAAAAIAAAABDwAAAAYAAAAJDAAAAAYYAAAAF0lubmVyIGV4Y2VwdGlvbiBtZXNzYWdlCgoKCgoAAAAACgAVE4AKCgEVAAAACwAAAAgIAQAAAAYZAAAAA29uZQoBFgAAAAsAAAAJFAAAAAgBAQkbAAAAARsAAAALAAAACAgBAAAACRkAAAAKCw==", TargetFrameworkMoniker.netfx461) } }; - // System.Xml - var xPathException = new XPathException("message", exception); - yield return new object[] { PopulateException(xPathException), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAE1TeXN0ZW0uWG1sLCBWZXJzaW9uPTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OQUBAAAAH1N5c3RlbS5YbWwuWFBhdGguWFBhdGhFeGNlcHRpb24PAAAACUNsYXNzTmFtZQdNZXNzYWdlBERhdGEOSW5uZXJFeGNlcHRpb24HSGVscFVSTBBTdGFja1RyYWNlU3RyaW5nFlJlbW90ZVN0YWNrVHJhY2VTdHJpbmcQUmVtb3RlU3RhY2tJbmRleA9FeGNlcHRpb25NZXRob2QHSFJlc3VsdAZTb3VyY2UNV2F0c29uQnVja2V0cwNyZXMEYXJncwd2ZXJzaW9uAQEDAwEBAQABAAEHAQYBKVN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsEFN5c3RlbS5FeGNlcHRpb24ICAICAAAABgMAAAAfU3lzdGVtLlhtbC5YUGF0aC5YUGF0aEV4Y2VwdGlvbgYEAAAAB21lc3NhZ2UJBQAAAAkGAAAABgcAAAAZaHR0cDovL21zZG4ubWljcm9zb2Z0LmNvbQYIAAAAFFN0YWNrVHJhY2Ugc3RyaW5nLi4uBgkAAAAbUmVtb3RlIFN0YWNrVHJhY2Ugc3RyaW5nLi4uAAAAAAroAwAABgoAAAAXRXhjZXB0aW9uX0NsYXNzX1NhbXBsZXMKBgsAAAADezB9CQwAAAAGDQAAAAMyLjAEBQAAAClTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbAMAAAAEaGVhZAd2ZXJzaW9uBWNvdW50AwAAOFN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsK0RpY3Rpb25hcnlOb2RlCAgJDgAAAAIAAAACAAAABAYAAAAQU3lzdGVtLkV4Y2VwdGlvbgwAAAAJQ2xhc3NOYW1lB01lc3NhZ2UERGF0YQ5Jbm5lckV4Y2VwdGlvbgdIZWxwVVJMEFN0YWNrVHJhY2VTdHJpbmcWUmVtb3RlU3RhY2tUcmFjZVN0cmluZxBSZW1vdGVTdGFja0luZGV4D0V4Y2VwdGlvbk1ldGhvZAdIUmVzdWx0BlNvdXJjZQ1XYXRzb25CdWNrZXRzAQEDAwEBAQABAAEHKVN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsEFN5c3RlbS5FeGNlcHRpb24ICAIGDwAAABBTeXN0ZW0uRXhjZXB0aW9uBhAAAAAHbWVzc2FnZQkRAAAACRIAAAAJBwAAAAkIAAAACQkAAAAAAAAACugDAAAJCgAAAAoRDAAAAAEAAAAJEAAAAAQOAAAAOFN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsK0RpY3Rpb25hcnlOb2RlAwAAAANrZXkFdmFsdWUEbmV4dAICAzhTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbCtEaWN0aW9uYXJ5Tm9kZQYYAAAABnNlY3JldAgBAQkZAAAAAREAAAAFAAAACRoAAAACAAAAAgAAAAESAAAABgAAAAkPAAAABhwAAAAXSW5uZXIgZXhjZXB0aW9uIG1lc3NhZ2UKCgoKCgAAAAAKABUTgAoKARkAAAAOAAAACAgBAAAABh0AAAADb25lCgEaAAAADgAAAAkYAAAACAEBCR8AAAABHwAAAA4AAAAICAEAAAAJHQAAAAoL", TargetFrameworkMoniker.netcoreapp20), new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAE1TeXN0ZW0uWG1sLCBWZXJzaW9uPTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OQUBAAAAH1N5c3RlbS5YbWwuWFBhdGguWFBhdGhFeGNlcHRpb24PAAAACUNsYXNzTmFtZQdNZXNzYWdlBERhdGEOSW5uZXJFeGNlcHRpb24HSGVscFVSTBBTdGFja1RyYWNlU3RyaW5nFlJlbW90ZVN0YWNrVHJhY2VTdHJpbmcQUmVtb3RlU3RhY2tJbmRleA9FeGNlcHRpb25NZXRob2QHSFJlc3VsdAZTb3VyY2UNV2F0c29uQnVja2V0cwNyZXMEYXJncwd2ZXJzaW9uAQEDAwEBAQABAAEHAQYBKVN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsEFN5c3RlbS5FeGNlcHRpb24ICAICAAAABgMAAAAfU3lzdGVtLlhtbC5YUGF0aC5YUGF0aEV4Y2VwdGlvbgYEAAAAB21lc3NhZ2UJBQAAAAkGAAAABgcAAAAZaHR0cDovL21zZG4ubWljcm9zb2Z0LmNvbQYIAAAAFFN0YWNrVHJhY2Ugc3RyaW5nLi4uBgkAAAAbUmVtb3RlIFN0YWNrVHJhY2Ugc3RyaW5nLi4uAAAAAAroAwAABgoAAAAXRXhjZXB0aW9uX0NsYXNzX1NhbXBsZXMKBgsAAAARWG1sX1VzZXJFeGNlcHRpb24JDAAAAAYNAAAAAzIuMAQFAAAAKVN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsAwAAAARoZWFkB3ZlcnNpb24FY291bnQDAAA4U3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwrRGljdGlvbmFyeU5vZGUICAkOAAAAAgAAAAIAAAAEBgAAABBTeXN0ZW0uRXhjZXB0aW9uDAAAAAlDbGFzc05hbWUHTWVzc2FnZQREYXRhDklubmVyRXhjZXB0aW9uB0hlbHBVUkwQU3RhY2tUcmFjZVN0cmluZxZSZW1vdGVTdGFja1RyYWNlU3RyaW5nEFJlbW90ZVN0YWNrSW5kZXgPRXhjZXB0aW9uTWV0aG9kB0hSZXN1bHQGU291cmNlDVdhdHNvbkJ1Y2tldHMBAQMDAQEBAAEAAQcpU3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwQU3lzdGVtLkV4Y2VwdGlvbggIAgYPAAAAEFN5c3RlbS5FeGNlcHRpb24GEAAAAAdtZXNzYWdlCREAAAAJEgAAAAkHAAAACQgAAAAJCQAAAAAAAAAK6AMAAAkKAAAAChEMAAAAAQAAAAkQAAAABA4AAAA4U3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwrRGljdGlvbmFyeU5vZGUDAAAAA2tleQV2YWx1ZQRuZXh0AgIDOFN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsK0RpY3Rpb25hcnlOb2RlBhgAAAAGc2VjcmV0CAEBCRkAAAABEQAAAAUAAAAJGgAAAAIAAAACAAAAARIAAAAGAAAACQ8AAAAGHAAAABdJbm5lciBleGNlcHRpb24gbWVzc2FnZQoKCgoKAAAAAAoAFROACgoBGQAAAA4AAAAICAEAAAAGHQAAAANvbmUKARoAAAAOAAAACRgAAAAIAQEJHwAAAAEfAAAADgAAAAgIAQAAAAkdAAAACgs=", TargetFrameworkMoniker.netfx461) } }; + // System.Xml + var xPathException = new XPathException("message", exception); + yield return new object[] { PopulateException(xPathException), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAE1TeXN0ZW0uWG1sLCBWZXJzaW9uPTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OQUBAAAAH1N5c3RlbS5YbWwuWFBhdGguWFBhdGhFeGNlcHRpb24PAAAACUNsYXNzTmFtZQdNZXNzYWdlBERhdGEOSW5uZXJFeGNlcHRpb24HSGVscFVSTBBTdGFja1RyYWNlU3RyaW5nFlJlbW90ZVN0YWNrVHJhY2VTdHJpbmcQUmVtb3RlU3RhY2tJbmRleA9FeGNlcHRpb25NZXRob2QHSFJlc3VsdAZTb3VyY2UNV2F0c29uQnVja2V0cwNyZXMEYXJncwd2ZXJzaW9uAQEDAwEBAQABAAEHAQYBKVN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsEFN5c3RlbS5FeGNlcHRpb24ICAICAAAABgMAAAAfU3lzdGVtLlhtbC5YUGF0aC5YUGF0aEV4Y2VwdGlvbgYEAAAAB21lc3NhZ2UJBQAAAAkGAAAABgcAAAAZaHR0cDovL21zZG4ubWljcm9zb2Z0LmNvbQYIAAAAFFN0YWNrVHJhY2Ugc3RyaW5nLi4uBgkAAAAbUmVtb3RlIFN0YWNrVHJhY2Ugc3RyaW5nLi4uAAAAAAroAwAABgoAAAAXRXhjZXB0aW9uX0NsYXNzX1NhbXBsZXMKBgsAAAADezB9CQwAAAAGDQAAAAMyLjAEBQAAAClTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbAMAAAAEaGVhZAd2ZXJzaW9uBWNvdW50AwAAOFN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsK0RpY3Rpb25hcnlOb2RlCAgJDgAAAAIAAAACAAAABAYAAAAQU3lzdGVtLkV4Y2VwdGlvbgwAAAAJQ2xhc3NOYW1lB01lc3NhZ2UERGF0YQ5Jbm5lckV4Y2VwdGlvbgdIZWxwVVJMEFN0YWNrVHJhY2VTdHJpbmcWUmVtb3RlU3RhY2tUcmFjZVN0cmluZxBSZW1vdGVTdGFja0luZGV4D0V4Y2VwdGlvbk1ldGhvZAdIUmVzdWx0BlNvdXJjZQ1XYXRzb25CdWNrZXRzAQEDAwEBAQABAAEHKVN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsEFN5c3RlbS5FeGNlcHRpb24ICAIGDwAAABBTeXN0ZW0uRXhjZXB0aW9uBhAAAAAHbWVzc2FnZQkRAAAACRIAAAAJBwAAAAkIAAAACQkAAAAAAAAACugDAAAJCgAAAAoRDAAAAAEAAAAJEAAAAAQOAAAAOFN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsK0RpY3Rpb25hcnlOb2RlAwAAAANrZXkFdmFsdWUEbmV4dAICAzhTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbCtEaWN0aW9uYXJ5Tm9kZQYYAAAABnNlY3JldAgBAQkZAAAAAREAAAAFAAAACRoAAAACAAAAAgAAAAESAAAABgAAAAkPAAAABhwAAAAXSW5uZXIgZXhjZXB0aW9uIG1lc3NhZ2UKCgoKCgAAAAAKABUTgAoKARkAAAAOAAAACAgBAAAABh0AAAADb25lCgEaAAAADgAAAAkYAAAACAEBCR8AAAABHwAAAA4AAAAICAEAAAAJHQAAAAoL", TargetFrameworkMoniker.netcoreapp20), new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAE1TeXN0ZW0uWG1sLCBWZXJzaW9uPTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OQUBAAAAH1N5c3RlbS5YbWwuWFBhdGguWFBhdGhFeGNlcHRpb24PAAAACUNsYXNzTmFtZQdNZXNzYWdlBERhdGEOSW5uZXJFeGNlcHRpb24HSGVscFVSTBBTdGFja1RyYWNlU3RyaW5nFlJlbW90ZVN0YWNrVHJhY2VTdHJpbmcQUmVtb3RlU3RhY2tJbmRleA9FeGNlcHRpb25NZXRob2QHSFJlc3VsdAZTb3VyY2UNV2F0c29uQnVja2V0cwNyZXMEYXJncwd2ZXJzaW9uAQEDAwEBAQABAAEHAQYBKVN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsEFN5c3RlbS5FeGNlcHRpb24ICAICAAAABgMAAAAfU3lzdGVtLlhtbC5YUGF0aC5YUGF0aEV4Y2VwdGlvbgYEAAAAB21lc3NhZ2UJBQAAAAkGAAAABgcAAAAZaHR0cDovL21zZG4ubWljcm9zb2Z0LmNvbQYIAAAAFFN0YWNrVHJhY2Ugc3RyaW5nLi4uBgkAAAAbUmVtb3RlIFN0YWNrVHJhY2Ugc3RyaW5nLi4uAAAAAAroAwAABgoAAAAXRXhjZXB0aW9uX0NsYXNzX1NhbXBsZXMKBgsAAAARWG1sX1VzZXJFeGNlcHRpb24JDAAAAAYNAAAAAzIuMAQFAAAAKVN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsAwAAAARoZWFkB3ZlcnNpb24FY291bnQDAAA4U3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwrRGljdGlvbmFyeU5vZGUICAkOAAAAAgAAAAIAAAAEBgAAABBTeXN0ZW0uRXhjZXB0aW9uDAAAAAlDbGFzc05hbWUHTWVzc2FnZQREYXRhDklubmVyRXhjZXB0aW9uB0hlbHBVUkwQU3RhY2tUcmFjZVN0cmluZxZSZW1vdGVTdGFja1RyYWNlU3RyaW5nEFJlbW90ZVN0YWNrSW5kZXgPRXhjZXB0aW9uTWV0aG9kB0hSZXN1bHQGU291cmNlDVdhdHNvbkJ1Y2tldHMBAQMDAQEBAAEAAQcpU3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwQU3lzdGVtLkV4Y2VwdGlvbggIAgYPAAAAEFN5c3RlbS5FeGNlcHRpb24GEAAAAAdtZXNzYWdlCREAAAAJEgAAAAkHAAAACQgAAAAJCQAAAAAAAAAK6AMAAAkKAAAAChEMAAAAAQAAAAkQAAAABA4AAAA4U3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwrRGljdGlvbmFyeU5vZGUDAAAAA2tleQV2YWx1ZQRuZXh0AgIDOFN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsK0RpY3Rpb25hcnlOb2RlBhgAAAAGc2VjcmV0CAEBCRkAAAABEQAAAAUAAAAJGgAAAAIAAAACAAAAARIAAAAGAAAACQ8AAAAGHAAAABdJbm5lciBleGNlcHRpb24gbWVzc2FnZQoKCgoKAAAAAAoAFROACgoBGQAAAA4AAAAICAEAAAAGHQAAAANvbmUKARoAAAAOAAAACRgAAAAIAQEJHwAAAAEfAAAADgAAAAgIAQAAAAkdAAAACgs=", TargetFrameworkMoniker.netfx461) } }; - var xmlException = new XmlException("message", exception, 1, 1); - yield return new object[] { PopulateException(xmlException), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAE1TeXN0ZW0uWG1sLCBWZXJzaW9uPTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OQUBAAAAF1N5c3RlbS5YbWwuWG1sRXhjZXB0aW9uEgAAAAlDbGFzc05hbWUHTWVzc2FnZQREYXRhDklubmVyRXhjZXB0aW9uB0hlbHBVUkwQU3RhY2tUcmFjZVN0cmluZxZSZW1vdGVTdGFja1RyYWNlU3RyaW5nEFJlbW90ZVN0YWNrSW5kZXgPRXhjZXB0aW9uTWV0aG9kB0hSZXN1bHQGU291cmNlDVdhdHNvbkJ1Y2tldHMDcmVzBGFyZ3MKbGluZU51bWJlcgxsaW5lUG9zaXRpb24Jc291cmNlVXJpB3ZlcnNpb24BAQMDAQEBAAEAAQcBBgAAAgEpU3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwQU3lzdGVtLkV4Y2VwdGlvbggIAggIAgAAAAYDAAAAF1N5c3RlbS5YbWwuWG1sRXhjZXB0aW9uBgQAAAAbbWVzc2FnZSBMaW5lIDEsIHBvc2l0aW9uIDEuCQUAAAAJBgAAAAYHAAAAGWh0dHA6Ly9tc2RuLm1pY3Jvc29mdC5jb20GCAAAABRTdGFja1RyYWNlIHN0cmluZy4uLgYJAAAAG1JlbW90ZSBTdGFja1RyYWNlIHN0cmluZy4uLgAAAAAK6AMAAAYKAAAAF0V4Y2VwdGlvbl9DbGFzc19TYW1wbGVzCgYLAAAAA3swfQkMAAAAAQAAAAEAAAAKBg0AAAADMi4wBAUAAAApU3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwDAAAABGhlYWQHdmVyc2lvbgVjb3VudAMAADhTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbCtEaWN0aW9uYXJ5Tm9kZQgICQ4AAAACAAAAAgAAAAQGAAAAEFN5c3RlbS5FeGNlcHRpb24MAAAACUNsYXNzTmFtZQdNZXNzYWdlBERhdGEOSW5uZXJFeGNlcHRpb24HSGVscFVSTBBTdGFja1RyYWNlU3RyaW5nFlJlbW90ZVN0YWNrVHJhY2VTdHJpbmcQUmVtb3RlU3RhY2tJbmRleA9FeGNlcHRpb25NZXRob2QHSFJlc3VsdAZTb3VyY2UNV2F0c29uQnVja2V0cwEBAwMBAQEAAQABBylTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbBBTeXN0ZW0uRXhjZXB0aW9uCAgCBg8AAAAQU3lzdGVtLkV4Y2VwdGlvbgYQAAAAB21lc3NhZ2UJEQAAAAkSAAAACQcAAAAJCAAAAAkJAAAAAAAAAAroAwAACQoAAAAKEQwAAAABAAAACRAAAAAEDgAAADhTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbCtEaWN0aW9uYXJ5Tm9kZQMAAAADa2V5BXZhbHVlBG5leHQCAgM4U3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwrRGljdGlvbmFyeU5vZGUGGAAAAAZzZWNyZXQIAQEJGQAAAAERAAAABQAAAAkaAAAAAgAAAAIAAAABEgAAAAYAAAAJDwAAAAYcAAAAF0lubmVyIGV4Y2VwdGlvbiBtZXNzYWdlCgoKCgoAAAAACgAVE4AKCgEZAAAADgAAAAgIAQAAAAYdAAAAA29uZQoBGgAAAA4AAAAJGAAAAAgBAQkfAAAAAR8AAAAOAAAACAgBAAAACR0AAAAKCw==", TargetFrameworkMoniker.netcoreapp20), new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAE1TeXN0ZW0uWG1sLCBWZXJzaW9uPTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OQUBAAAAF1N5c3RlbS5YbWwuWG1sRXhjZXB0aW9uEgAAAAlDbGFzc05hbWUHTWVzc2FnZQREYXRhDklubmVyRXhjZXB0aW9uB0hlbHBVUkwQU3RhY2tUcmFjZVN0cmluZxZSZW1vdGVTdGFja1RyYWNlU3RyaW5nEFJlbW90ZVN0YWNrSW5kZXgPRXhjZXB0aW9uTWV0aG9kB0hSZXN1bHQGU291cmNlDVdhdHNvbkJ1Y2tldHMDcmVzBGFyZ3MKbGluZU51bWJlcgxsaW5lUG9zaXRpb24Jc291cmNlVXJpB3ZlcnNpb24BAQMDAQEBAAEAAQcBBgAAAgEpU3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwQU3lzdGVtLkV4Y2VwdGlvbggIAggIAgAAAAYDAAAAF1N5c3RlbS5YbWwuWG1sRXhjZXB0aW9uBgQAAAAbbWVzc2FnZSBMaW5lIDEsIHBvc2l0aW9uIDEuCQUAAAAJBgAAAAYHAAAAGWh0dHA6Ly9tc2RuLm1pY3Jvc29mdC5jb20GCAAAABRTdGFja1RyYWNlIHN0cmluZy4uLgYJAAAAG1JlbW90ZSBTdGFja1RyYWNlIHN0cmluZy4uLgAAAAAK6AMAAAYKAAAAF0V4Y2VwdGlvbl9DbGFzc19TYW1wbGVzCgYLAAAAEVhtbF9Vc2VyRXhjZXB0aW9uCQwAAAABAAAAAQAAAAoGDQAAAAMyLjAEBQAAAClTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbAMAAAAEaGVhZAd2ZXJzaW9uBWNvdW50AwAAOFN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsK0RpY3Rpb25hcnlOb2RlCAgJDgAAAAIAAAACAAAABAYAAAAQU3lzdGVtLkV4Y2VwdGlvbgwAAAAJQ2xhc3NOYW1lB01lc3NhZ2UERGF0YQ5Jbm5lckV4Y2VwdGlvbgdIZWxwVVJMEFN0YWNrVHJhY2VTdHJpbmcWUmVtb3RlU3RhY2tUcmFjZVN0cmluZxBSZW1vdGVTdGFja0luZGV4D0V4Y2VwdGlvbk1ldGhvZAdIUmVzdWx0BlNvdXJjZQ1XYXRzb25CdWNrZXRzAQEDAwEBAQABAAEHKVN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsEFN5c3RlbS5FeGNlcHRpb24ICAIGDwAAABBTeXN0ZW0uRXhjZXB0aW9uBhAAAAAHbWVzc2FnZQkRAAAACRIAAAAJBwAAAAkIAAAACQkAAAAAAAAACugDAAAJCgAAAAoRDAAAAAEAAAAJEAAAAAQOAAAAOFN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsK0RpY3Rpb25hcnlOb2RlAwAAAANrZXkFdmFsdWUEbmV4dAICAzhTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbCtEaWN0aW9uYXJ5Tm9kZQYYAAAABnNlY3JldAgBAQkZAAAAAREAAAAFAAAACRoAAAACAAAAAgAAAAESAAAABgAAAAkPAAAABhwAAAAXSW5uZXIgZXhjZXB0aW9uIG1lc3NhZ2UKCgoKCgAAAAAKABUTgAoKARkAAAAOAAAACAgBAAAABh0AAAADb25lCgEaAAAADgAAAAkYAAAACAEBCR8AAAABHwAAAA4AAAAICAEAAAAJHQAAAAoL", TargetFrameworkMoniker.netfx461) } }; + var xmlException = new XmlException("message", exception, 1, 1); + yield return new object[] { PopulateException(xmlException), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAE1TeXN0ZW0uWG1sLCBWZXJzaW9uPTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OQUBAAAAF1N5c3RlbS5YbWwuWG1sRXhjZXB0aW9uEgAAAAlDbGFzc05hbWUHTWVzc2FnZQREYXRhDklubmVyRXhjZXB0aW9uB0hlbHBVUkwQU3RhY2tUcmFjZVN0cmluZxZSZW1vdGVTdGFja1RyYWNlU3RyaW5nEFJlbW90ZVN0YWNrSW5kZXgPRXhjZXB0aW9uTWV0aG9kB0hSZXN1bHQGU291cmNlDVdhdHNvbkJ1Y2tldHMDcmVzBGFyZ3MKbGluZU51bWJlcgxsaW5lUG9zaXRpb24Jc291cmNlVXJpB3ZlcnNpb24BAQMDAQEBAAEAAQcBBgAAAgEpU3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwQU3lzdGVtLkV4Y2VwdGlvbggIAggIAgAAAAYDAAAAF1N5c3RlbS5YbWwuWG1sRXhjZXB0aW9uBgQAAAAbbWVzc2FnZSBMaW5lIDEsIHBvc2l0aW9uIDEuCQUAAAAJBgAAAAYHAAAAGWh0dHA6Ly9tc2RuLm1pY3Jvc29mdC5jb20GCAAAABRTdGFja1RyYWNlIHN0cmluZy4uLgYJAAAAG1JlbW90ZSBTdGFja1RyYWNlIHN0cmluZy4uLgAAAAAK6AMAAAYKAAAAF0V4Y2VwdGlvbl9DbGFzc19TYW1wbGVzCgYLAAAAA3swfQkMAAAAAQAAAAEAAAAKBg0AAAADMi4wBAUAAAApU3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwDAAAABGhlYWQHdmVyc2lvbgVjb3VudAMAADhTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbCtEaWN0aW9uYXJ5Tm9kZQgICQ4AAAACAAAAAgAAAAQGAAAAEFN5c3RlbS5FeGNlcHRpb24MAAAACUNsYXNzTmFtZQdNZXNzYWdlBERhdGEOSW5uZXJFeGNlcHRpb24HSGVscFVSTBBTdGFja1RyYWNlU3RyaW5nFlJlbW90ZVN0YWNrVHJhY2VTdHJpbmcQUmVtb3RlU3RhY2tJbmRleA9FeGNlcHRpb25NZXRob2QHSFJlc3VsdAZTb3VyY2UNV2F0c29uQnVja2V0cwEBAwMBAQEAAQABBylTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbBBTeXN0ZW0uRXhjZXB0aW9uCAgCBg8AAAAQU3lzdGVtLkV4Y2VwdGlvbgYQAAAAB21lc3NhZ2UJEQAAAAkSAAAACQcAAAAJCAAAAAkJAAAAAAAAAAroAwAACQoAAAAKEQwAAAABAAAACRAAAAAEDgAAADhTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbCtEaWN0aW9uYXJ5Tm9kZQMAAAADa2V5BXZhbHVlBG5leHQCAgM4U3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwrRGljdGlvbmFyeU5vZGUGGAAAAAZzZWNyZXQIAQEJGQAAAAERAAAABQAAAAkaAAAAAgAAAAIAAAABEgAAAAYAAAAJDwAAAAYcAAAAF0lubmVyIGV4Y2VwdGlvbiBtZXNzYWdlCgoKCgoAAAAACgAVE4AKCgEZAAAADgAAAAgIAQAAAAYdAAAAA29uZQoBGgAAAA4AAAAJGAAAAAgBAQkfAAAAAR8AAAAOAAAACAgBAAAACR0AAAAKCw==", TargetFrameworkMoniker.netcoreapp20), new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAE1TeXN0ZW0uWG1sLCBWZXJzaW9uPTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OQUBAAAAF1N5c3RlbS5YbWwuWG1sRXhjZXB0aW9uEgAAAAlDbGFzc05hbWUHTWVzc2FnZQREYXRhDklubmVyRXhjZXB0aW9uB0hlbHBVUkwQU3RhY2tUcmFjZVN0cmluZxZSZW1vdGVTdGFja1RyYWNlU3RyaW5nEFJlbW90ZVN0YWNrSW5kZXgPRXhjZXB0aW9uTWV0aG9kB0hSZXN1bHQGU291cmNlDVdhdHNvbkJ1Y2tldHMDcmVzBGFyZ3MKbGluZU51bWJlcgxsaW5lUG9zaXRpb24Jc291cmNlVXJpB3ZlcnNpb24BAQMDAQEBAAEAAQcBBgAAAgEpU3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwQU3lzdGVtLkV4Y2VwdGlvbggIAggIAgAAAAYDAAAAF1N5c3RlbS5YbWwuWG1sRXhjZXB0aW9uBgQAAAAbbWVzc2FnZSBMaW5lIDEsIHBvc2l0aW9uIDEuCQUAAAAJBgAAAAYHAAAAGWh0dHA6Ly9tc2RuLm1pY3Jvc29mdC5jb20GCAAAABRTdGFja1RyYWNlIHN0cmluZy4uLgYJAAAAG1JlbW90ZSBTdGFja1RyYWNlIHN0cmluZy4uLgAAAAAK6AMAAAYKAAAAF0V4Y2VwdGlvbl9DbGFzc19TYW1wbGVzCgYLAAAAEVhtbF9Vc2VyRXhjZXB0aW9uCQwAAAABAAAAAQAAAAoGDQAAAAMyLjAEBQAAAClTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbAMAAAAEaGVhZAd2ZXJzaW9uBWNvdW50AwAAOFN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsK0RpY3Rpb25hcnlOb2RlCAgJDgAAAAIAAAACAAAABAYAAAAQU3lzdGVtLkV4Y2VwdGlvbgwAAAAJQ2xhc3NOYW1lB01lc3NhZ2UERGF0YQ5Jbm5lckV4Y2VwdGlvbgdIZWxwVVJMEFN0YWNrVHJhY2VTdHJpbmcWUmVtb3RlU3RhY2tUcmFjZVN0cmluZxBSZW1vdGVTdGFja0luZGV4D0V4Y2VwdGlvbk1ldGhvZAdIUmVzdWx0BlNvdXJjZQ1XYXRzb25CdWNrZXRzAQEDAwEBAQABAAEHKVN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsEFN5c3RlbS5FeGNlcHRpb24ICAIGDwAAABBTeXN0ZW0uRXhjZXB0aW9uBhAAAAAHbWVzc2FnZQkRAAAACRIAAAAJBwAAAAkIAAAACQkAAAAAAAAACugDAAAJCgAAAAoRDAAAAAEAAAAJEAAAAAQOAAAAOFN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsK0RpY3Rpb25hcnlOb2RlAwAAAANrZXkFdmFsdWUEbmV4dAICAzhTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbCtEaWN0aW9uYXJ5Tm9kZQYYAAAABnNlY3JldAgBAQkZAAAAAREAAAAFAAAACRoAAAACAAAAAgAAAAESAAAABgAAAAkPAAAABhwAAAAXSW5uZXIgZXhjZXB0aW9uIG1lc3NhZ2UKCgoKCgAAAAAKABUTgAoKARkAAAAOAAAACAgBAAAABh0AAAADb25lCgEaAAAADgAAAAkYAAAACAEBCR8AAAABHwAAAA4AAAAICAEAAAAJHQAAAAoL", TargetFrameworkMoniker.netfx461) } }; - var xmlSchemaException = new XmlSchemaException("message", exception, 1, 1); - yield return new object[] { PopulateException(xmlSchemaException), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAE1TeXN0ZW0uWG1sLCBWZXJzaW9uPTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OQUBAAAAJFN5c3RlbS5YbWwuU2NoZW1hLlhtbFNjaGVtYUV4Y2VwdGlvbhIAAAAJQ2xhc3NOYW1lB01lc3NhZ2UERGF0YQ5Jbm5lckV4Y2VwdGlvbgdIZWxwVVJMEFN0YWNrVHJhY2VTdHJpbmcWUmVtb3RlU3RhY2tUcmFjZVN0cmluZxBSZW1vdGVTdGFja0luZGV4D0V4Y2VwdGlvbk1ldGhvZAdIUmVzdWx0BlNvdXJjZQ1XYXRzb25CdWNrZXRzA3JlcwRhcmdzCXNvdXJjZVVyaQpsaW5lTnVtYmVyDGxpbmVQb3NpdGlvbgd2ZXJzaW9uAQEDAwEBAQABAAEHAQYCAAABKVN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsEFN5c3RlbS5FeGNlcHRpb24ICAIICAIAAAAGAwAAACRTeXN0ZW0uWG1sLlNjaGVtYS5YbWxTY2hlbWFFeGNlcHRpb24GBAAAAAdtZXNzYWdlCQUAAAAJBgAAAAYHAAAAGWh0dHA6Ly9tc2RuLm1pY3Jvc29mdC5jb20GCAAAABRTdGFja1RyYWNlIHN0cmluZy4uLgYJAAAAG1JlbW90ZSBTdGFja1RyYWNlIHN0cmluZy4uLgAAAAAK6AMAAAYKAAAAF0V4Y2VwdGlvbl9DbGFzc19TYW1wbGVzCgYLAAAAA3swfQkMAAAACgEAAAABAAAABg0AAAADMi4wBAUAAAApU3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwDAAAABGhlYWQHdmVyc2lvbgVjb3VudAMAADhTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbCtEaWN0aW9uYXJ5Tm9kZQgICQ4AAAACAAAAAgAAAAQGAAAAEFN5c3RlbS5FeGNlcHRpb24MAAAACUNsYXNzTmFtZQdNZXNzYWdlBERhdGEOSW5uZXJFeGNlcHRpb24HSGVscFVSTBBTdGFja1RyYWNlU3RyaW5nFlJlbW90ZVN0YWNrVHJhY2VTdHJpbmcQUmVtb3RlU3RhY2tJbmRleA9FeGNlcHRpb25NZXRob2QHSFJlc3VsdAZTb3VyY2UNV2F0c29uQnVja2V0cwEBAwMBAQEAAQABBylTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbBBTeXN0ZW0uRXhjZXB0aW9uCAgCBg8AAAAQU3lzdGVtLkV4Y2VwdGlvbgYQAAAAB21lc3NhZ2UJEQAAAAkSAAAACQcAAAAJCAAAAAkJAAAAAAAAAAroAwAACQoAAAAKEQwAAAABAAAACRAAAAAEDgAAADhTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbCtEaWN0aW9uYXJ5Tm9kZQMAAAADa2V5BXZhbHVlBG5leHQCAgM4U3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwrRGljdGlvbmFyeU5vZGUGGAAAAAZzZWNyZXQIAQEJGQAAAAERAAAABQAAAAkaAAAAAgAAAAIAAAABEgAAAAYAAAAJDwAAAAYcAAAAF0lubmVyIGV4Y2VwdGlvbiBtZXNzYWdlCgoKCgoAAAAACgAVE4AKCgEZAAAADgAAAAgIAQAAAAYdAAAAA29uZQoBGgAAAA4AAAAJGAAAAAgBAQkfAAAAAR8AAAAOAAAACAgBAAAACR0AAAAKCw==", TargetFrameworkMoniker.netcoreapp20), new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAE1TeXN0ZW0uWG1sLCBWZXJzaW9uPTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OQUBAAAAJFN5c3RlbS5YbWwuU2NoZW1hLlhtbFNjaGVtYUV4Y2VwdGlvbhIAAAAJQ2xhc3NOYW1lB01lc3NhZ2UERGF0YQ5Jbm5lckV4Y2VwdGlvbgdIZWxwVVJMEFN0YWNrVHJhY2VTdHJpbmcWUmVtb3RlU3RhY2tUcmFjZVN0cmluZxBSZW1vdGVTdGFja0luZGV4D0V4Y2VwdGlvbk1ldGhvZAdIUmVzdWx0BlNvdXJjZQ1XYXRzb25CdWNrZXRzA3JlcwRhcmdzCXNvdXJjZVVyaQpsaW5lTnVtYmVyDGxpbmVQb3NpdGlvbgd2ZXJzaW9uAQEDAwEBAQABAAEHAQYCAAABKVN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsEFN5c3RlbS5FeGNlcHRpb24ICAIICAIAAAAGAwAAACRTeXN0ZW0uWG1sLlNjaGVtYS5YbWxTY2hlbWFFeGNlcHRpb24GBAAAAAdtZXNzYWdlCQUAAAAJBgAAAAYHAAAAGWh0dHA6Ly9tc2RuLm1pY3Jvc29mdC5jb20GCAAAABRTdGFja1RyYWNlIHN0cmluZy4uLgYJAAAAG1JlbW90ZSBTdGFja1RyYWNlIHN0cmluZy4uLgAAAAAK6AMAAAYKAAAAF0V4Y2VwdGlvbl9DbGFzc19TYW1wbGVzCgYLAAAAEVhtbF9Vc2VyRXhjZXB0aW9uCQwAAAAKAQAAAAEAAAAGDQAAAAMyLjAEBQAAAClTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbAMAAAAEaGVhZAd2ZXJzaW9uBWNvdW50AwAAOFN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsK0RpY3Rpb25hcnlOb2RlCAgJDgAAAAIAAAACAAAABAYAAAAQU3lzdGVtLkV4Y2VwdGlvbgwAAAAJQ2xhc3NOYW1lB01lc3NhZ2UERGF0YQ5Jbm5lckV4Y2VwdGlvbgdIZWxwVVJMEFN0YWNrVHJhY2VTdHJpbmcWUmVtb3RlU3RhY2tUcmFjZVN0cmluZxBSZW1vdGVTdGFja0luZGV4D0V4Y2VwdGlvbk1ldGhvZAdIUmVzdWx0BlNvdXJjZQ1XYXRzb25CdWNrZXRzAQEDAwEBAQABAAEHKVN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsEFN5c3RlbS5FeGNlcHRpb24ICAIGDwAAABBTeXN0ZW0uRXhjZXB0aW9uBhAAAAAHbWVzc2FnZQkRAAAACRIAAAAJBwAAAAkIAAAACQkAAAAAAAAACugDAAAJCgAAAAoRDAAAAAEAAAAJEAAAAAQOAAAAOFN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsK0RpY3Rpb25hcnlOb2RlAwAAAANrZXkFdmFsdWUEbmV4dAICAzhTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbCtEaWN0aW9uYXJ5Tm9kZQYYAAAABnNlY3JldAgBAQkZAAAAAREAAAAFAAAACRoAAAACAAAAAgAAAAESAAAABgAAAAkPAAAABhwAAAAXSW5uZXIgZXhjZXB0aW9uIG1lc3NhZ2UKCgoKCgAAAAAKABUTgAoKARkAAAAOAAAACAgBAAAABh0AAAADb25lCgEaAAAADgAAAAkYAAAACAEBCR8AAAABHwAAAA4AAAAICAEAAAAJHQAAAAoL", TargetFrameworkMoniker.netfx461) } }; + var xmlSchemaException = new XmlSchemaException("message", exception, 1, 1); + yield return new object[] { PopulateException(xmlSchemaException), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAE1TeXN0ZW0uWG1sLCBWZXJzaW9uPTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OQUBAAAAJFN5c3RlbS5YbWwuU2NoZW1hLlhtbFNjaGVtYUV4Y2VwdGlvbhIAAAAJQ2xhc3NOYW1lB01lc3NhZ2UERGF0YQ5Jbm5lckV4Y2VwdGlvbgdIZWxwVVJMEFN0YWNrVHJhY2VTdHJpbmcWUmVtb3RlU3RhY2tUcmFjZVN0cmluZxBSZW1vdGVTdGFja0luZGV4D0V4Y2VwdGlvbk1ldGhvZAdIUmVzdWx0BlNvdXJjZQ1XYXRzb25CdWNrZXRzA3JlcwRhcmdzCXNvdXJjZVVyaQpsaW5lTnVtYmVyDGxpbmVQb3NpdGlvbgd2ZXJzaW9uAQEDAwEBAQABAAEHAQYCAAABKVN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsEFN5c3RlbS5FeGNlcHRpb24ICAIICAIAAAAGAwAAACRTeXN0ZW0uWG1sLlNjaGVtYS5YbWxTY2hlbWFFeGNlcHRpb24GBAAAAAdtZXNzYWdlCQUAAAAJBgAAAAYHAAAAGWh0dHA6Ly9tc2RuLm1pY3Jvc29mdC5jb20GCAAAABRTdGFja1RyYWNlIHN0cmluZy4uLgYJAAAAG1JlbW90ZSBTdGFja1RyYWNlIHN0cmluZy4uLgAAAAAK6AMAAAYKAAAAF0V4Y2VwdGlvbl9DbGFzc19TYW1wbGVzCgYLAAAAA3swfQkMAAAACgEAAAABAAAABg0AAAADMi4wBAUAAAApU3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwDAAAABGhlYWQHdmVyc2lvbgVjb3VudAMAADhTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbCtEaWN0aW9uYXJ5Tm9kZQgICQ4AAAACAAAAAgAAAAQGAAAAEFN5c3RlbS5FeGNlcHRpb24MAAAACUNsYXNzTmFtZQdNZXNzYWdlBERhdGEOSW5uZXJFeGNlcHRpb24HSGVscFVSTBBTdGFja1RyYWNlU3RyaW5nFlJlbW90ZVN0YWNrVHJhY2VTdHJpbmcQUmVtb3RlU3RhY2tJbmRleA9FeGNlcHRpb25NZXRob2QHSFJlc3VsdAZTb3VyY2UNV2F0c29uQnVja2V0cwEBAwMBAQEAAQABBylTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbBBTeXN0ZW0uRXhjZXB0aW9uCAgCBg8AAAAQU3lzdGVtLkV4Y2VwdGlvbgYQAAAAB21lc3NhZ2UJEQAAAAkSAAAACQcAAAAJCAAAAAkJAAAAAAAAAAroAwAACQoAAAAKEQwAAAABAAAACRAAAAAEDgAAADhTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbCtEaWN0aW9uYXJ5Tm9kZQMAAAADa2V5BXZhbHVlBG5leHQCAgM4U3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwrRGljdGlvbmFyeU5vZGUGGAAAAAZzZWNyZXQIAQEJGQAAAAERAAAABQAAAAkaAAAAAgAAAAIAAAABEgAAAAYAAAAJDwAAAAYcAAAAF0lubmVyIGV4Y2VwdGlvbiBtZXNzYWdlCgoKCgoAAAAACgAVE4AKCgEZAAAADgAAAAgIAQAAAAYdAAAAA29uZQoBGgAAAA4AAAAJGAAAAAgBAQkfAAAAAR8AAAAOAAAACAgBAAAACR0AAAAKCw==", TargetFrameworkMoniker.netcoreapp20), new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAE1TeXN0ZW0uWG1sLCBWZXJzaW9uPTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OQUBAAAAJFN5c3RlbS5YbWwuU2NoZW1hLlhtbFNjaGVtYUV4Y2VwdGlvbhIAAAAJQ2xhc3NOYW1lB01lc3NhZ2UERGF0YQ5Jbm5lckV4Y2VwdGlvbgdIZWxwVVJMEFN0YWNrVHJhY2VTdHJpbmcWUmVtb3RlU3RhY2tUcmFjZVN0cmluZxBSZW1vdGVTdGFja0luZGV4D0V4Y2VwdGlvbk1ldGhvZAdIUmVzdWx0BlNvdXJjZQ1XYXRzb25CdWNrZXRzA3JlcwRhcmdzCXNvdXJjZVVyaQpsaW5lTnVtYmVyDGxpbmVQb3NpdGlvbgd2ZXJzaW9uAQEDAwEBAQABAAEHAQYCAAABKVN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsEFN5c3RlbS5FeGNlcHRpb24ICAIICAIAAAAGAwAAACRTeXN0ZW0uWG1sLlNjaGVtYS5YbWxTY2hlbWFFeGNlcHRpb24GBAAAAAdtZXNzYWdlCQUAAAAJBgAAAAYHAAAAGWh0dHA6Ly9tc2RuLm1pY3Jvc29mdC5jb20GCAAAABRTdGFja1RyYWNlIHN0cmluZy4uLgYJAAAAG1JlbW90ZSBTdGFja1RyYWNlIHN0cmluZy4uLgAAAAAK6AMAAAYKAAAAF0V4Y2VwdGlvbl9DbGFzc19TYW1wbGVzCgYLAAAAEVhtbF9Vc2VyRXhjZXB0aW9uCQwAAAAKAQAAAAEAAAAGDQAAAAMyLjAEBQAAAClTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbAMAAAAEaGVhZAd2ZXJzaW9uBWNvdW50AwAAOFN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsK0RpY3Rpb25hcnlOb2RlCAgJDgAAAAIAAAACAAAABAYAAAAQU3lzdGVtLkV4Y2VwdGlvbgwAAAAJQ2xhc3NOYW1lB01lc3NhZ2UERGF0YQ5Jbm5lckV4Y2VwdGlvbgdIZWxwVVJMEFN0YWNrVHJhY2VTdHJpbmcWUmVtb3RlU3RhY2tUcmFjZVN0cmluZxBSZW1vdGVTdGFja0luZGV4D0V4Y2VwdGlvbk1ldGhvZAdIUmVzdWx0BlNvdXJjZQ1XYXRzb25CdWNrZXRzAQEDAwEBAQABAAEHKVN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsEFN5c3RlbS5FeGNlcHRpb24ICAIGDwAAABBTeXN0ZW0uRXhjZXB0aW9uBhAAAAAHbWVzc2FnZQkRAAAACRIAAAAJBwAAAAkIAAAACQkAAAAAAAAACugDAAAJCgAAAAoRDAAAAAEAAAAJEAAAAAQOAAAAOFN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsK0RpY3Rpb25hcnlOb2RlAwAAAANrZXkFdmFsdWUEbmV4dAICAzhTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbCtEaWN0aW9uYXJ5Tm9kZQYYAAAABnNlY3JldAgBAQkZAAAAAREAAAAFAAAACRoAAAACAAAAAgAAAAESAAAABgAAAAkPAAAABhwAAAAXSW5uZXIgZXhjZXB0aW9uIG1lc3NhZ2UKCgoKCgAAAAAKABUTgAoKARkAAAAOAAAACAgBAAAABh0AAAADb25lCgEaAAAADgAAAAkYAAAACAEBCR8AAAABHwAAAA4AAAAICAEAAAAJHQAAAAoL", TargetFrameworkMoniker.netfx461) } }; - var xmlSchemaInferenceException = new XmlSchemaInferenceException("message", exception, 1, 1); - yield return new object[] { PopulateException(xmlSchemaInferenceException), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAE1TeXN0ZW0uWG1sLCBWZXJzaW9uPTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OQUBAAAALVN5c3RlbS5YbWwuU2NoZW1hLlhtbFNjaGVtYUluZmVyZW5jZUV4Y2VwdGlvbhIAAAAJQ2xhc3NOYW1lB01lc3NhZ2UERGF0YQ5Jbm5lckV4Y2VwdGlvbgdIZWxwVVJMEFN0YWNrVHJhY2VTdHJpbmcWUmVtb3RlU3RhY2tUcmFjZVN0cmluZxBSZW1vdGVTdGFja0luZGV4D0V4Y2VwdGlvbk1ldGhvZAdIUmVzdWx0BlNvdXJjZQ1XYXRzb25CdWNrZXRzA3JlcwRhcmdzCXNvdXJjZVVyaQpsaW5lTnVtYmVyDGxpbmVQb3NpdGlvbgd2ZXJzaW9uAQEDAwEBAQABAAEHAQYCAAABKVN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsEFN5c3RlbS5FeGNlcHRpb24ICAIICAIAAAAGAwAAAC1TeXN0ZW0uWG1sLlNjaGVtYS5YbWxTY2hlbWFJbmZlcmVuY2VFeGNlcHRpb24GBAAAAAdtZXNzYWdlCQUAAAAJBgAAAAYHAAAAGWh0dHA6Ly9tc2RuLm1pY3Jvc29mdC5jb20GCAAAABRTdGFja1RyYWNlIHN0cmluZy4uLgYJAAAAG1JlbW90ZSBTdGFja1RyYWNlIHN0cmluZy4uLgAAAAAK6AMAAAYKAAAAF0V4Y2VwdGlvbl9DbGFzc19TYW1wbGVzCgYLAAAAA3swfQkMAAAACgEAAAABAAAABg0AAAADMi4wBAUAAAApU3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwDAAAABGhlYWQHdmVyc2lvbgVjb3VudAMAADhTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbCtEaWN0aW9uYXJ5Tm9kZQgICQ4AAAACAAAAAgAAAAQGAAAAEFN5c3RlbS5FeGNlcHRpb24MAAAACUNsYXNzTmFtZQdNZXNzYWdlBERhdGEOSW5uZXJFeGNlcHRpb24HSGVscFVSTBBTdGFja1RyYWNlU3RyaW5nFlJlbW90ZVN0YWNrVHJhY2VTdHJpbmcQUmVtb3RlU3RhY2tJbmRleA9FeGNlcHRpb25NZXRob2QHSFJlc3VsdAZTb3VyY2UNV2F0c29uQnVja2V0cwEBAwMBAQEAAQABBylTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbBBTeXN0ZW0uRXhjZXB0aW9uCAgCBg8AAAAQU3lzdGVtLkV4Y2VwdGlvbgYQAAAAB21lc3NhZ2UJEQAAAAkSAAAACQcAAAAJCAAAAAkJAAAAAAAAAAroAwAACQoAAAAKEQwAAAABAAAACRAAAAAEDgAAADhTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbCtEaWN0aW9uYXJ5Tm9kZQMAAAADa2V5BXZhbHVlBG5leHQCAgM4U3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwrRGljdGlvbmFyeU5vZGUGGAAAAAZzZWNyZXQIAQEJGQAAAAERAAAABQAAAAkaAAAAAgAAAAIAAAABEgAAAAYAAAAJDwAAAAYcAAAAF0lubmVyIGV4Y2VwdGlvbiBtZXNzYWdlCgoKCgoAAAAACgAVE4AKCgEZAAAADgAAAAgIAQAAAAYdAAAAA29uZQoBGgAAAA4AAAAJGAAAAAgBAQkfAAAAAR8AAAAOAAAACAgBAAAACR0AAAAKCw==", TargetFrameworkMoniker.netcoreapp20), new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAE1TeXN0ZW0uWG1sLCBWZXJzaW9uPTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OQUBAAAALVN5c3RlbS5YbWwuU2NoZW1hLlhtbFNjaGVtYUluZmVyZW5jZUV4Y2VwdGlvbhIAAAAJQ2xhc3NOYW1lB01lc3NhZ2UERGF0YQ5Jbm5lckV4Y2VwdGlvbgdIZWxwVVJMEFN0YWNrVHJhY2VTdHJpbmcWUmVtb3RlU3RhY2tUcmFjZVN0cmluZxBSZW1vdGVTdGFja0luZGV4D0V4Y2VwdGlvbk1ldGhvZAdIUmVzdWx0BlNvdXJjZQ1XYXRzb25CdWNrZXRzA3JlcwRhcmdzCXNvdXJjZVVyaQpsaW5lTnVtYmVyDGxpbmVQb3NpdGlvbgd2ZXJzaW9uAQEDAwEBAQABAAEHAQYCAAABKVN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsEFN5c3RlbS5FeGNlcHRpb24ICAIICAIAAAAGAwAAAC1TeXN0ZW0uWG1sLlNjaGVtYS5YbWxTY2hlbWFJbmZlcmVuY2VFeGNlcHRpb24GBAAAAAdtZXNzYWdlCQUAAAAJBgAAAAYHAAAAGWh0dHA6Ly9tc2RuLm1pY3Jvc29mdC5jb20GCAAAABRTdGFja1RyYWNlIHN0cmluZy4uLgYJAAAAG1JlbW90ZSBTdGFja1RyYWNlIHN0cmluZy4uLgAAAAAK6AMAAAYKAAAAF0V4Y2VwdGlvbl9DbGFzc19TYW1wbGVzCgYLAAAAEVhtbF9Vc2VyRXhjZXB0aW9uCQwAAAAKAQAAAAEAAAAGDQAAAAMyLjAEBQAAAClTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbAMAAAAEaGVhZAd2ZXJzaW9uBWNvdW50AwAAOFN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsK0RpY3Rpb25hcnlOb2RlCAgJDgAAAAIAAAACAAAABAYAAAAQU3lzdGVtLkV4Y2VwdGlvbgwAAAAJQ2xhc3NOYW1lB01lc3NhZ2UERGF0YQ5Jbm5lckV4Y2VwdGlvbgdIZWxwVVJMEFN0YWNrVHJhY2VTdHJpbmcWUmVtb3RlU3RhY2tUcmFjZVN0cmluZxBSZW1vdGVTdGFja0luZGV4D0V4Y2VwdGlvbk1ldGhvZAdIUmVzdWx0BlNvdXJjZQ1XYXRzb25CdWNrZXRzAQEDAwEBAQABAAEHKVN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsEFN5c3RlbS5FeGNlcHRpb24ICAIGDwAAABBTeXN0ZW0uRXhjZXB0aW9uBhAAAAAHbWVzc2FnZQkRAAAACRIAAAAJBwAAAAkIAAAACQkAAAAAAAAACugDAAAJCgAAAAoRDAAAAAEAAAAJEAAAAAQOAAAAOFN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsK0RpY3Rpb25hcnlOb2RlAwAAAANrZXkFdmFsdWUEbmV4dAICAzhTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbCtEaWN0aW9uYXJ5Tm9kZQYYAAAABnNlY3JldAgBAQkZAAAAAREAAAAFAAAACRoAAAACAAAAAgAAAAESAAAABgAAAAkPAAAABhwAAAAXSW5uZXIgZXhjZXB0aW9uIG1lc3NhZ2UKCgoKCgAAAAAKABUTgAoKARkAAAAOAAAACAgBAAAABh0AAAADb25lCgEaAAAADgAAAAkYAAAACAEBCR8AAAABHwAAAA4AAAAICAEAAAAJHQAAAAoL", TargetFrameworkMoniker.netfx461) } }; + var xmlSchemaInferenceException = new XmlSchemaInferenceException("message", exception, 1, 1); + yield return new object[] { PopulateException(xmlSchemaInferenceException), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAE1TeXN0ZW0uWG1sLCBWZXJzaW9uPTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OQUBAAAALVN5c3RlbS5YbWwuU2NoZW1hLlhtbFNjaGVtYUluZmVyZW5jZUV4Y2VwdGlvbhIAAAAJQ2xhc3NOYW1lB01lc3NhZ2UERGF0YQ5Jbm5lckV4Y2VwdGlvbgdIZWxwVVJMEFN0YWNrVHJhY2VTdHJpbmcWUmVtb3RlU3RhY2tUcmFjZVN0cmluZxBSZW1vdGVTdGFja0luZGV4D0V4Y2VwdGlvbk1ldGhvZAdIUmVzdWx0BlNvdXJjZQ1XYXRzb25CdWNrZXRzA3JlcwRhcmdzCXNvdXJjZVVyaQpsaW5lTnVtYmVyDGxpbmVQb3NpdGlvbgd2ZXJzaW9uAQEDAwEBAQABAAEHAQYCAAABKVN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsEFN5c3RlbS5FeGNlcHRpb24ICAIICAIAAAAGAwAAAC1TeXN0ZW0uWG1sLlNjaGVtYS5YbWxTY2hlbWFJbmZlcmVuY2VFeGNlcHRpb24GBAAAAAdtZXNzYWdlCQUAAAAJBgAAAAYHAAAAGWh0dHA6Ly9tc2RuLm1pY3Jvc29mdC5jb20GCAAAABRTdGFja1RyYWNlIHN0cmluZy4uLgYJAAAAG1JlbW90ZSBTdGFja1RyYWNlIHN0cmluZy4uLgAAAAAK6AMAAAYKAAAAF0V4Y2VwdGlvbl9DbGFzc19TYW1wbGVzCgYLAAAAA3swfQkMAAAACgEAAAABAAAABg0AAAADMi4wBAUAAAApU3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwDAAAABGhlYWQHdmVyc2lvbgVjb3VudAMAADhTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbCtEaWN0aW9uYXJ5Tm9kZQgICQ4AAAACAAAAAgAAAAQGAAAAEFN5c3RlbS5FeGNlcHRpb24MAAAACUNsYXNzTmFtZQdNZXNzYWdlBERhdGEOSW5uZXJFeGNlcHRpb24HSGVscFVSTBBTdGFja1RyYWNlU3RyaW5nFlJlbW90ZVN0YWNrVHJhY2VTdHJpbmcQUmVtb3RlU3RhY2tJbmRleA9FeGNlcHRpb25NZXRob2QHSFJlc3VsdAZTb3VyY2UNV2F0c29uQnVja2V0cwEBAwMBAQEAAQABBylTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbBBTeXN0ZW0uRXhjZXB0aW9uCAgCBg8AAAAQU3lzdGVtLkV4Y2VwdGlvbgYQAAAAB21lc3NhZ2UJEQAAAAkSAAAACQcAAAAJCAAAAAkJAAAAAAAAAAroAwAACQoAAAAKEQwAAAABAAAACRAAAAAEDgAAADhTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbCtEaWN0aW9uYXJ5Tm9kZQMAAAADa2V5BXZhbHVlBG5leHQCAgM4U3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwrRGljdGlvbmFyeU5vZGUGGAAAAAZzZWNyZXQIAQEJGQAAAAERAAAABQAAAAkaAAAAAgAAAAIAAAABEgAAAAYAAAAJDwAAAAYcAAAAF0lubmVyIGV4Y2VwdGlvbiBtZXNzYWdlCgoKCgoAAAAACgAVE4AKCgEZAAAADgAAAAgIAQAAAAYdAAAAA29uZQoBGgAAAA4AAAAJGAAAAAgBAQkfAAAAAR8AAAAOAAAACAgBAAAACR0AAAAKCw==", TargetFrameworkMoniker.netcoreapp20), new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAE1TeXN0ZW0uWG1sLCBWZXJzaW9uPTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OQUBAAAALVN5c3RlbS5YbWwuU2NoZW1hLlhtbFNjaGVtYUluZmVyZW5jZUV4Y2VwdGlvbhIAAAAJQ2xhc3NOYW1lB01lc3NhZ2UERGF0YQ5Jbm5lckV4Y2VwdGlvbgdIZWxwVVJMEFN0YWNrVHJhY2VTdHJpbmcWUmVtb3RlU3RhY2tUcmFjZVN0cmluZxBSZW1vdGVTdGFja0luZGV4D0V4Y2VwdGlvbk1ldGhvZAdIUmVzdWx0BlNvdXJjZQ1XYXRzb25CdWNrZXRzA3JlcwRhcmdzCXNvdXJjZVVyaQpsaW5lTnVtYmVyDGxpbmVQb3NpdGlvbgd2ZXJzaW9uAQEDAwEBAQABAAEHAQYCAAABKVN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsEFN5c3RlbS5FeGNlcHRpb24ICAIICAIAAAAGAwAAAC1TeXN0ZW0uWG1sLlNjaGVtYS5YbWxTY2hlbWFJbmZlcmVuY2VFeGNlcHRpb24GBAAAAAdtZXNzYWdlCQUAAAAJBgAAAAYHAAAAGWh0dHA6Ly9tc2RuLm1pY3Jvc29mdC5jb20GCAAAABRTdGFja1RyYWNlIHN0cmluZy4uLgYJAAAAG1JlbW90ZSBTdGFja1RyYWNlIHN0cmluZy4uLgAAAAAK6AMAAAYKAAAAF0V4Y2VwdGlvbl9DbGFzc19TYW1wbGVzCgYLAAAAEVhtbF9Vc2VyRXhjZXB0aW9uCQwAAAAKAQAAAAEAAAAGDQAAAAMyLjAEBQAAAClTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbAMAAAAEaGVhZAd2ZXJzaW9uBWNvdW50AwAAOFN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsK0RpY3Rpb25hcnlOb2RlCAgJDgAAAAIAAAACAAAABAYAAAAQU3lzdGVtLkV4Y2VwdGlvbgwAAAAJQ2xhc3NOYW1lB01lc3NhZ2UERGF0YQ5Jbm5lckV4Y2VwdGlvbgdIZWxwVVJMEFN0YWNrVHJhY2VTdHJpbmcWUmVtb3RlU3RhY2tUcmFjZVN0cmluZxBSZW1vdGVTdGFja0luZGV4D0V4Y2VwdGlvbk1ldGhvZAdIUmVzdWx0BlNvdXJjZQ1XYXRzb25CdWNrZXRzAQEDAwEBAQABAAEHKVN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsEFN5c3RlbS5FeGNlcHRpb24ICAIGDwAAABBTeXN0ZW0uRXhjZXB0aW9uBhAAAAAHbWVzc2FnZQkRAAAACRIAAAAJBwAAAAkIAAAACQkAAAAAAAAACugDAAAJCgAAAAoRDAAAAAEAAAAJEAAAAAQOAAAAOFN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsK0RpY3Rpb25hcnlOb2RlAwAAAANrZXkFdmFsdWUEbmV4dAICAzhTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbCtEaWN0aW9uYXJ5Tm9kZQYYAAAABnNlY3JldAgBAQkZAAAAAREAAAAFAAAACRoAAAACAAAAAgAAAAESAAAABgAAAAkPAAAABhwAAAAXSW5uZXIgZXhjZXB0aW9uIG1lc3NhZ2UKCgoKCgAAAAAKABUTgAoKARkAAAAOAAAACAgBAAAABh0AAAADb25lCgEaAAAADgAAAAkYAAAACAEBCR8AAAABHwAAAA4AAAAICAEAAAAJHQAAAAoL", TargetFrameworkMoniker.netfx461) } }; - var xmlSchemaValidationException = new XmlSchemaValidationException("message", exception, 1, 1); - yield return new object[] { PopulateException(xmlSchemaValidationException), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAE1TeXN0ZW0uWG1sLCBWZXJzaW9uPTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OQUBAAAALlN5c3RlbS5YbWwuU2NoZW1hLlhtbFNjaGVtYVZhbGlkYXRpb25FeGNlcHRpb24SAAAACUNsYXNzTmFtZQdNZXNzYWdlBERhdGEOSW5uZXJFeGNlcHRpb24HSGVscFVSTBBTdGFja1RyYWNlU3RyaW5nFlJlbW90ZVN0YWNrVHJhY2VTdHJpbmcQUmVtb3RlU3RhY2tJbmRleA9FeGNlcHRpb25NZXRob2QHSFJlc3VsdAZTb3VyY2UNV2F0c29uQnVja2V0cwNyZXMEYXJncwlzb3VyY2VVcmkKbGluZU51bWJlcgxsaW5lUG9zaXRpb24HdmVyc2lvbgEBAwMBAQEAAQABBwEGAgAAASlTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbBBTeXN0ZW0uRXhjZXB0aW9uCAgCCAgCAAAABgMAAAAuU3lzdGVtLlhtbC5TY2hlbWEuWG1sU2NoZW1hVmFsaWRhdGlvbkV4Y2VwdGlvbgYEAAAAB21lc3NhZ2UJBQAAAAkGAAAABgcAAAAZaHR0cDovL21zZG4ubWljcm9zb2Z0LmNvbQYIAAAAFFN0YWNrVHJhY2Ugc3RyaW5nLi4uBgkAAAAbUmVtb3RlIFN0YWNrVHJhY2Ugc3RyaW5nLi4uAAAAAAroAwAABgoAAAAXRXhjZXB0aW9uX0NsYXNzX1NhbXBsZXMKBgsAAAADezB9CQwAAAAKAQAAAAEAAAAGDQAAAAMyLjAEBQAAAClTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbAMAAAAEaGVhZAd2ZXJzaW9uBWNvdW50AwAAOFN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsK0RpY3Rpb25hcnlOb2RlCAgJDgAAAAIAAAACAAAABAYAAAAQU3lzdGVtLkV4Y2VwdGlvbgwAAAAJQ2xhc3NOYW1lB01lc3NhZ2UERGF0YQ5Jbm5lckV4Y2VwdGlvbgdIZWxwVVJMEFN0YWNrVHJhY2VTdHJpbmcWUmVtb3RlU3RhY2tUcmFjZVN0cmluZxBSZW1vdGVTdGFja0luZGV4D0V4Y2VwdGlvbk1ldGhvZAdIUmVzdWx0BlNvdXJjZQ1XYXRzb25CdWNrZXRzAQEDAwEBAQABAAEHKVN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsEFN5c3RlbS5FeGNlcHRpb24ICAIGDwAAABBTeXN0ZW0uRXhjZXB0aW9uBhAAAAAHbWVzc2FnZQkRAAAACRIAAAAJBwAAAAkIAAAACQkAAAAAAAAACugDAAAJCgAAAAoRDAAAAAEAAAAJEAAAAAQOAAAAOFN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsK0RpY3Rpb25hcnlOb2RlAwAAAANrZXkFdmFsdWUEbmV4dAICAzhTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbCtEaWN0aW9uYXJ5Tm9kZQYYAAAABnNlY3JldAgBAQkZAAAAAREAAAAFAAAACRoAAAACAAAAAgAAAAESAAAABgAAAAkPAAAABhwAAAAXSW5uZXIgZXhjZXB0aW9uIG1lc3NhZ2UKCgoKCgAAAAAKABUTgAoKARkAAAAOAAAACAgBAAAABh0AAAADb25lCgEaAAAADgAAAAkYAAAACAEBCR8AAAABHwAAAA4AAAAICAEAAAAJHQAAAAoL", TargetFrameworkMoniker.netcoreapp20), new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAE1TeXN0ZW0uWG1sLCBWZXJzaW9uPTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OQUBAAAALlN5c3RlbS5YbWwuU2NoZW1hLlhtbFNjaGVtYVZhbGlkYXRpb25FeGNlcHRpb24SAAAACUNsYXNzTmFtZQdNZXNzYWdlBERhdGEOSW5uZXJFeGNlcHRpb24HSGVscFVSTBBTdGFja1RyYWNlU3RyaW5nFlJlbW90ZVN0YWNrVHJhY2VTdHJpbmcQUmVtb3RlU3RhY2tJbmRleA9FeGNlcHRpb25NZXRob2QHSFJlc3VsdAZTb3VyY2UNV2F0c29uQnVja2V0cwNyZXMEYXJncwlzb3VyY2VVcmkKbGluZU51bWJlcgxsaW5lUG9zaXRpb24HdmVyc2lvbgEBAwMBAQEAAQABBwEGAgAAASlTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbBBTeXN0ZW0uRXhjZXB0aW9uCAgCCAgCAAAABgMAAAAuU3lzdGVtLlhtbC5TY2hlbWEuWG1sU2NoZW1hVmFsaWRhdGlvbkV4Y2VwdGlvbgYEAAAAB21lc3NhZ2UJBQAAAAkGAAAABgcAAAAZaHR0cDovL21zZG4ubWljcm9zb2Z0LmNvbQYIAAAAFFN0YWNrVHJhY2Ugc3RyaW5nLi4uBgkAAAAbUmVtb3RlIFN0YWNrVHJhY2Ugc3RyaW5nLi4uAAAAAAroAwAABgoAAAAXRXhjZXB0aW9uX0NsYXNzX1NhbXBsZXMKBgsAAAARWG1sX1VzZXJFeGNlcHRpb24JDAAAAAoBAAAAAQAAAAYNAAAAAzIuMAQFAAAAKVN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsAwAAAARoZWFkB3ZlcnNpb24FY291bnQDAAA4U3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwrRGljdGlvbmFyeU5vZGUICAkOAAAAAgAAAAIAAAAEBgAAABBTeXN0ZW0uRXhjZXB0aW9uDAAAAAlDbGFzc05hbWUHTWVzc2FnZQREYXRhDklubmVyRXhjZXB0aW9uB0hlbHBVUkwQU3RhY2tUcmFjZVN0cmluZxZSZW1vdGVTdGFja1RyYWNlU3RyaW5nEFJlbW90ZVN0YWNrSW5kZXgPRXhjZXB0aW9uTWV0aG9kB0hSZXN1bHQGU291cmNlDVdhdHNvbkJ1Y2tldHMBAQMDAQEBAAEAAQcpU3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwQU3lzdGVtLkV4Y2VwdGlvbggIAgYPAAAAEFN5c3RlbS5FeGNlcHRpb24GEAAAAAdtZXNzYWdlCREAAAAJEgAAAAkHAAAACQgAAAAJCQAAAAAAAAAK6AMAAAkKAAAAChEMAAAAAQAAAAkQAAAABA4AAAA4U3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwrRGljdGlvbmFyeU5vZGUDAAAAA2tleQV2YWx1ZQRuZXh0AgIDOFN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsK0RpY3Rpb25hcnlOb2RlBhgAAAAGc2VjcmV0CAEBCRkAAAABEQAAAAUAAAAJGgAAAAIAAAACAAAAARIAAAAGAAAACQ8AAAAGHAAAABdJbm5lciBleGNlcHRpb24gbWVzc2FnZQoKCgoKAAAAAAoAFROACgoBGQAAAA4AAAAICAEAAAAGHQAAAANvbmUKARoAAAAOAAAACRgAAAAIAQEJHwAAAAEfAAAADgAAAAgIAQAAAAkdAAAACgs=", TargetFrameworkMoniker.netfx461) } }; + var xmlSchemaValidationException = new XmlSchemaValidationException("message", exception, 1, 1); + yield return new object[] { PopulateException(xmlSchemaValidationException), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAE1TeXN0ZW0uWG1sLCBWZXJzaW9uPTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OQUBAAAALlN5c3RlbS5YbWwuU2NoZW1hLlhtbFNjaGVtYVZhbGlkYXRpb25FeGNlcHRpb24SAAAACUNsYXNzTmFtZQdNZXNzYWdlBERhdGEOSW5uZXJFeGNlcHRpb24HSGVscFVSTBBTdGFja1RyYWNlU3RyaW5nFlJlbW90ZVN0YWNrVHJhY2VTdHJpbmcQUmVtb3RlU3RhY2tJbmRleA9FeGNlcHRpb25NZXRob2QHSFJlc3VsdAZTb3VyY2UNV2F0c29uQnVja2V0cwNyZXMEYXJncwlzb3VyY2VVcmkKbGluZU51bWJlcgxsaW5lUG9zaXRpb24HdmVyc2lvbgEBAwMBAQEAAQABBwEGAgAAASlTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbBBTeXN0ZW0uRXhjZXB0aW9uCAgCCAgCAAAABgMAAAAuU3lzdGVtLlhtbC5TY2hlbWEuWG1sU2NoZW1hVmFsaWRhdGlvbkV4Y2VwdGlvbgYEAAAAB21lc3NhZ2UJBQAAAAkGAAAABgcAAAAZaHR0cDovL21zZG4ubWljcm9zb2Z0LmNvbQYIAAAAFFN0YWNrVHJhY2Ugc3RyaW5nLi4uBgkAAAAbUmVtb3RlIFN0YWNrVHJhY2Ugc3RyaW5nLi4uAAAAAAroAwAABgoAAAAXRXhjZXB0aW9uX0NsYXNzX1NhbXBsZXMKBgsAAAADezB9CQwAAAAKAQAAAAEAAAAGDQAAAAMyLjAEBQAAAClTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbAMAAAAEaGVhZAd2ZXJzaW9uBWNvdW50AwAAOFN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsK0RpY3Rpb25hcnlOb2RlCAgJDgAAAAIAAAACAAAABAYAAAAQU3lzdGVtLkV4Y2VwdGlvbgwAAAAJQ2xhc3NOYW1lB01lc3NhZ2UERGF0YQ5Jbm5lckV4Y2VwdGlvbgdIZWxwVVJMEFN0YWNrVHJhY2VTdHJpbmcWUmVtb3RlU3RhY2tUcmFjZVN0cmluZxBSZW1vdGVTdGFja0luZGV4D0V4Y2VwdGlvbk1ldGhvZAdIUmVzdWx0BlNvdXJjZQ1XYXRzb25CdWNrZXRzAQEDAwEBAQABAAEHKVN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsEFN5c3RlbS5FeGNlcHRpb24ICAIGDwAAABBTeXN0ZW0uRXhjZXB0aW9uBhAAAAAHbWVzc2FnZQkRAAAACRIAAAAJBwAAAAkIAAAACQkAAAAAAAAACugDAAAJCgAAAAoRDAAAAAEAAAAJEAAAAAQOAAAAOFN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsK0RpY3Rpb25hcnlOb2RlAwAAAANrZXkFdmFsdWUEbmV4dAICAzhTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbCtEaWN0aW9uYXJ5Tm9kZQYYAAAABnNlY3JldAgBAQkZAAAAAREAAAAFAAAACRoAAAACAAAAAgAAAAESAAAABgAAAAkPAAAABhwAAAAXSW5uZXIgZXhjZXB0aW9uIG1lc3NhZ2UKCgoKCgAAAAAKABUTgAoKARkAAAAOAAAACAgBAAAABh0AAAADb25lCgEaAAAADgAAAAkYAAAACAEBCR8AAAABHwAAAA4AAAAICAEAAAAJHQAAAAoL", TargetFrameworkMoniker.netcoreapp20), new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAE1TeXN0ZW0uWG1sLCBWZXJzaW9uPTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OQUBAAAALlN5c3RlbS5YbWwuU2NoZW1hLlhtbFNjaGVtYVZhbGlkYXRpb25FeGNlcHRpb24SAAAACUNsYXNzTmFtZQdNZXNzYWdlBERhdGEOSW5uZXJFeGNlcHRpb24HSGVscFVSTBBTdGFja1RyYWNlU3RyaW5nFlJlbW90ZVN0YWNrVHJhY2VTdHJpbmcQUmVtb3RlU3RhY2tJbmRleA9FeGNlcHRpb25NZXRob2QHSFJlc3VsdAZTb3VyY2UNV2F0c29uQnVja2V0cwNyZXMEYXJncwlzb3VyY2VVcmkKbGluZU51bWJlcgxsaW5lUG9zaXRpb24HdmVyc2lvbgEBAwMBAQEAAQABBwEGAgAAASlTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbBBTeXN0ZW0uRXhjZXB0aW9uCAgCCAgCAAAABgMAAAAuU3lzdGVtLlhtbC5TY2hlbWEuWG1sU2NoZW1hVmFsaWRhdGlvbkV4Y2VwdGlvbgYEAAAAB21lc3NhZ2UJBQAAAAkGAAAABgcAAAAZaHR0cDovL21zZG4ubWljcm9zb2Z0LmNvbQYIAAAAFFN0YWNrVHJhY2Ugc3RyaW5nLi4uBgkAAAAbUmVtb3RlIFN0YWNrVHJhY2Ugc3RyaW5nLi4uAAAAAAroAwAABgoAAAAXRXhjZXB0aW9uX0NsYXNzX1NhbXBsZXMKBgsAAAARWG1sX1VzZXJFeGNlcHRpb24JDAAAAAoBAAAAAQAAAAYNAAAAAzIuMAQFAAAAKVN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsAwAAAARoZWFkB3ZlcnNpb24FY291bnQDAAA4U3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwrRGljdGlvbmFyeU5vZGUICAkOAAAAAgAAAAIAAAAEBgAAABBTeXN0ZW0uRXhjZXB0aW9uDAAAAAlDbGFzc05hbWUHTWVzc2FnZQREYXRhDklubmVyRXhjZXB0aW9uB0hlbHBVUkwQU3RhY2tUcmFjZVN0cmluZxZSZW1vdGVTdGFja1RyYWNlU3RyaW5nEFJlbW90ZVN0YWNrSW5kZXgPRXhjZXB0aW9uTWV0aG9kB0hSZXN1bHQGU291cmNlDVdhdHNvbkJ1Y2tldHMBAQMDAQEBAAEAAQcpU3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwQU3lzdGVtLkV4Y2VwdGlvbggIAgYPAAAAEFN5c3RlbS5FeGNlcHRpb24GEAAAAAdtZXNzYWdlCREAAAAJEgAAAAkHAAAACQgAAAAJCQAAAAAAAAAK6AMAAAkKAAAAChEMAAAAAQAAAAkQAAAABA4AAAA4U3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwrRGljdGlvbmFyeU5vZGUDAAAAA2tleQV2YWx1ZQRuZXh0AgIDOFN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsK0RpY3Rpb25hcnlOb2RlBhgAAAAGc2VjcmV0CAEBCRkAAAABEQAAAAUAAAAJGgAAAAIAAAACAAAAARIAAAAGAAAACQ8AAAAGHAAAABdJbm5lciBleGNlcHRpb24gbWVzc2FnZQoKCgoKAAAAAAoAFROACgoBGQAAAA4AAAAICAEAAAAGHQAAAANvbmUKARoAAAAOAAAACRgAAAAIAQEJHwAAAAEfAAAADgAAAAgIAQAAAAkdAAAACgs=", TargetFrameworkMoniker.netfx461) } }; - var xsltCompileException = new XsltCompileException(exception, "///file", 1, 1); - yield return new object[] { PopulateException(xsltCompileException), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAE1TeXN0ZW0uWG1sLCBWZXJzaW9uPTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OQUBAAAAI1N5c3RlbS5YbWwuWHNsLlhzbHRDb21waWxlRXhjZXB0aW9uEgAAAAlDbGFzc05hbWUHTWVzc2FnZQREYXRhDklubmVyRXhjZXB0aW9uB0hlbHBVUkwQU3RhY2tUcmFjZVN0cmluZxZSZW1vdGVTdGFja1RyYWNlU3RyaW5nEFJlbW90ZVN0YWNrSW5kZXgPRXhjZXB0aW9uTWV0aG9kB0hSZXN1bHQGU291cmNlDVdhdHNvbkJ1Y2tldHMDcmVzBGFyZ3MJc291cmNlVXJpCmxpbmVOdW1iZXIMbGluZVBvc2l0aW9uB3ZlcnNpb24BAQMDAQEBAAEAAQcBAgEAAAEpU3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwQU3lzdGVtLkV4Y2VwdGlvbggIAggIAgAAAAYDAAAAI1N5c3RlbS5YbWwuWHNsLlhzbHRDb21waWxlRXhjZXB0aW9uBgQAAABDWFNMVCBjb21waWxlIGVycm9yIGF0IC8vL2ZpbGUoMSwxKS4gU2VlIElubmVyRXhjZXB0aW9uIGZvciBkZXRhaWxzLgkFAAAACQYAAAAGBwAAABlodHRwOi8vbXNkbi5taWNyb3NvZnQuY29tBggAAAAUU3RhY2tUcmFjZSBzdHJpbmcuLi4GCQAAABtSZW1vdGUgU3RhY2tUcmFjZSBzdHJpbmcuLi4AAAAACugDAAAGCgAAABdFeGNlcHRpb25fQ2xhc3NfU2FtcGxlcwoGCwAAAENYU0xUIGNvbXBpbGUgZXJyb3IgYXQgezB9KHsxfSx7Mn0pLiBTZWUgSW5uZXJFeGNlcHRpb24gZm9yIGRldGFpbHMuCgYMAAAABy8vL2ZpbGUBAAAAAQAAAAYNAAAAAzIuMAQFAAAAKVN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsAwAAAARoZWFkB3ZlcnNpb24FY291bnQDAAA4U3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwrRGljdGlvbmFyeU5vZGUICAkOAAAAAgAAAAIAAAAEBgAAABBTeXN0ZW0uRXhjZXB0aW9uDAAAAAlDbGFzc05hbWUHTWVzc2FnZQREYXRhDklubmVyRXhjZXB0aW9uB0hlbHBVUkwQU3RhY2tUcmFjZVN0cmluZxZSZW1vdGVTdGFja1RyYWNlU3RyaW5nEFJlbW90ZVN0YWNrSW5kZXgPRXhjZXB0aW9uTWV0aG9kB0hSZXN1bHQGU291cmNlDVdhdHNvbkJ1Y2tldHMBAQMDAQEBAAEAAQcpU3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwQU3lzdGVtLkV4Y2VwdGlvbggIAgYPAAAAEFN5c3RlbS5FeGNlcHRpb24GEAAAAAdtZXNzYWdlCREAAAAJEgAAAAkHAAAACQgAAAAJCQAAAAAAAAAK6AMAAAkKAAAACgQOAAAAOFN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsK0RpY3Rpb25hcnlOb2RlAwAAAANrZXkFdmFsdWUEbmV4dAICAzhTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbCtEaWN0aW9uYXJ5Tm9kZQYXAAAABnNlY3JldAgBAQkYAAAAAREAAAAFAAAACRkAAAACAAAAAgAAAAESAAAABgAAAAkPAAAABhsAAAAXSW5uZXIgZXhjZXB0aW9uIG1lc3NhZ2UKCgoKCgAAAAAKABUTgAoKARgAAAAOAAAACAgBAAAABhwAAAADb25lCgEZAAAADgAAAAkXAAAACAEBCR4AAAABHgAAAA4AAAAICAEAAAAJHAAAAAoL", TargetFrameworkMoniker.netcoreapp20), new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAE1TeXN0ZW0uWG1sLCBWZXJzaW9uPTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OQUBAAAAI1N5c3RlbS5YbWwuWHNsLlhzbHRDb21waWxlRXhjZXB0aW9uEgAAAAlDbGFzc05hbWUHTWVzc2FnZQREYXRhDklubmVyRXhjZXB0aW9uB0hlbHBVUkwQU3RhY2tUcmFjZVN0cmluZxZSZW1vdGVTdGFja1RyYWNlU3RyaW5nEFJlbW90ZVN0YWNrSW5kZXgPRXhjZXB0aW9uTWV0aG9kB0hSZXN1bHQGU291cmNlDVdhdHNvbkJ1Y2tldHMDcmVzBGFyZ3MJc291cmNlVXJpCmxpbmVOdW1iZXIMbGluZVBvc2l0aW9uB3ZlcnNpb24BAQMDAQEBAAEAAQcBAgEAAAEpU3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwQU3lzdGVtLkV4Y2VwdGlvbggIAggIAgAAAAYDAAAAI1N5c3RlbS5YbWwuWHNsLlhzbHRDb21waWxlRXhjZXB0aW9uBgQAAABDWFNMVCBjb21waWxlIGVycm9yIGF0IC8vL2ZpbGUoMSwxKS4gU2VlIElubmVyRXhjZXB0aW9uIGZvciBkZXRhaWxzLgkFAAAACQYAAAAGBwAAABlodHRwOi8vbXNkbi5taWNyb3NvZnQuY29tBggAAAAUU3RhY2tUcmFjZSBzdHJpbmcuLi4GCQAAABtSZW1vdGUgU3RhY2tUcmFjZSBzdHJpbmcuLi4AAAAACugDAAAGCgAAABdFeGNlcHRpb25fQ2xhc3NfU2FtcGxlcwoGCwAAABFYc2x0X0NvbXBpbGVFcnJvcgoGDAAAAAcvLy9maWxlAQAAAAEAAAAGDQAAAAMyLjAEBQAAAClTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbAMAAAAEaGVhZAd2ZXJzaW9uBWNvdW50AwAAOFN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsK0RpY3Rpb25hcnlOb2RlCAgJDgAAAAIAAAACAAAABAYAAAAQU3lzdGVtLkV4Y2VwdGlvbgwAAAAJQ2xhc3NOYW1lB01lc3NhZ2UERGF0YQ5Jbm5lckV4Y2VwdGlvbgdIZWxwVVJMEFN0YWNrVHJhY2VTdHJpbmcWUmVtb3RlU3RhY2tUcmFjZVN0cmluZxBSZW1vdGVTdGFja0luZGV4D0V4Y2VwdGlvbk1ldGhvZAdIUmVzdWx0BlNvdXJjZQ1XYXRzb25CdWNrZXRzAQEDAwEBAQABAAEHKVN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsEFN5c3RlbS5FeGNlcHRpb24ICAIGDwAAABBTeXN0ZW0uRXhjZXB0aW9uBhAAAAAHbWVzc2FnZQkRAAAACRIAAAAJBwAAAAkIAAAACQkAAAAAAAAACugDAAAJCgAAAAoEDgAAADhTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbCtEaWN0aW9uYXJ5Tm9kZQMAAAADa2V5BXZhbHVlBG5leHQCAgM4U3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwrRGljdGlvbmFyeU5vZGUGFwAAAAZzZWNyZXQIAQEJGAAAAAERAAAABQAAAAkZAAAAAgAAAAIAAAABEgAAAAYAAAAJDwAAAAYbAAAAF0lubmVyIGV4Y2VwdGlvbiBtZXNzYWdlCgoKCgoAAAAACgAVE4AKCgEYAAAADgAAAAgIAQAAAAYcAAAAA29uZQoBGQAAAA4AAAAJFwAAAAgBAQkeAAAAAR4AAAAOAAAACAgBAAAACRwAAAAKCw==", TargetFrameworkMoniker.netfx461) } }; + var xsltCompileException = new XsltCompileException(exception, "///file", 1, 1); + yield return new object[] { PopulateException(xsltCompileException), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAE1TeXN0ZW0uWG1sLCBWZXJzaW9uPTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OQUBAAAAI1N5c3RlbS5YbWwuWHNsLlhzbHRDb21waWxlRXhjZXB0aW9uEgAAAAlDbGFzc05hbWUHTWVzc2FnZQREYXRhDklubmVyRXhjZXB0aW9uB0hlbHBVUkwQU3RhY2tUcmFjZVN0cmluZxZSZW1vdGVTdGFja1RyYWNlU3RyaW5nEFJlbW90ZVN0YWNrSW5kZXgPRXhjZXB0aW9uTWV0aG9kB0hSZXN1bHQGU291cmNlDVdhdHNvbkJ1Y2tldHMDcmVzBGFyZ3MJc291cmNlVXJpCmxpbmVOdW1iZXIMbGluZVBvc2l0aW9uB3ZlcnNpb24BAQMDAQEBAAEAAQcBAgEAAAEpU3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwQU3lzdGVtLkV4Y2VwdGlvbggIAggIAgAAAAYDAAAAI1N5c3RlbS5YbWwuWHNsLlhzbHRDb21waWxlRXhjZXB0aW9uBgQAAABDWFNMVCBjb21waWxlIGVycm9yIGF0IC8vL2ZpbGUoMSwxKS4gU2VlIElubmVyRXhjZXB0aW9uIGZvciBkZXRhaWxzLgkFAAAACQYAAAAGBwAAABlodHRwOi8vbXNkbi5taWNyb3NvZnQuY29tBggAAAAUU3RhY2tUcmFjZSBzdHJpbmcuLi4GCQAAABtSZW1vdGUgU3RhY2tUcmFjZSBzdHJpbmcuLi4AAAAACugDAAAGCgAAABdFeGNlcHRpb25fQ2xhc3NfU2FtcGxlcwoGCwAAAENYU0xUIGNvbXBpbGUgZXJyb3IgYXQgezB9KHsxfSx7Mn0pLiBTZWUgSW5uZXJFeGNlcHRpb24gZm9yIGRldGFpbHMuCgYMAAAABy8vL2ZpbGUBAAAAAQAAAAYNAAAAAzIuMAQFAAAAKVN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsAwAAAARoZWFkB3ZlcnNpb24FY291bnQDAAA4U3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwrRGljdGlvbmFyeU5vZGUICAkOAAAAAgAAAAIAAAAEBgAAABBTeXN0ZW0uRXhjZXB0aW9uDAAAAAlDbGFzc05hbWUHTWVzc2FnZQREYXRhDklubmVyRXhjZXB0aW9uB0hlbHBVUkwQU3RhY2tUcmFjZVN0cmluZxZSZW1vdGVTdGFja1RyYWNlU3RyaW5nEFJlbW90ZVN0YWNrSW5kZXgPRXhjZXB0aW9uTWV0aG9kB0hSZXN1bHQGU291cmNlDVdhdHNvbkJ1Y2tldHMBAQMDAQEBAAEAAQcpU3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwQU3lzdGVtLkV4Y2VwdGlvbggIAgYPAAAAEFN5c3RlbS5FeGNlcHRpb24GEAAAAAdtZXNzYWdlCREAAAAJEgAAAAkHAAAACQgAAAAJCQAAAAAAAAAK6AMAAAkKAAAACgQOAAAAOFN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsK0RpY3Rpb25hcnlOb2RlAwAAAANrZXkFdmFsdWUEbmV4dAICAzhTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbCtEaWN0aW9uYXJ5Tm9kZQYXAAAABnNlY3JldAgBAQkYAAAAAREAAAAFAAAACRkAAAACAAAAAgAAAAESAAAABgAAAAkPAAAABhsAAAAXSW5uZXIgZXhjZXB0aW9uIG1lc3NhZ2UKCgoKCgAAAAAKABUTgAoKARgAAAAOAAAACAgBAAAABhwAAAADb25lCgEZAAAADgAAAAkXAAAACAEBCR4AAAABHgAAAA4AAAAICAEAAAAJHAAAAAoL", TargetFrameworkMoniker.netcoreapp20), new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAE1TeXN0ZW0uWG1sLCBWZXJzaW9uPTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OQUBAAAAI1N5c3RlbS5YbWwuWHNsLlhzbHRDb21waWxlRXhjZXB0aW9uEgAAAAlDbGFzc05hbWUHTWVzc2FnZQREYXRhDklubmVyRXhjZXB0aW9uB0hlbHBVUkwQU3RhY2tUcmFjZVN0cmluZxZSZW1vdGVTdGFja1RyYWNlU3RyaW5nEFJlbW90ZVN0YWNrSW5kZXgPRXhjZXB0aW9uTWV0aG9kB0hSZXN1bHQGU291cmNlDVdhdHNvbkJ1Y2tldHMDcmVzBGFyZ3MJc291cmNlVXJpCmxpbmVOdW1iZXIMbGluZVBvc2l0aW9uB3ZlcnNpb24BAQMDAQEBAAEAAQcBAgEAAAEpU3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwQU3lzdGVtLkV4Y2VwdGlvbggIAggIAgAAAAYDAAAAI1N5c3RlbS5YbWwuWHNsLlhzbHRDb21waWxlRXhjZXB0aW9uBgQAAABDWFNMVCBjb21waWxlIGVycm9yIGF0IC8vL2ZpbGUoMSwxKS4gU2VlIElubmVyRXhjZXB0aW9uIGZvciBkZXRhaWxzLgkFAAAACQYAAAAGBwAAABlodHRwOi8vbXNkbi5taWNyb3NvZnQuY29tBggAAAAUU3RhY2tUcmFjZSBzdHJpbmcuLi4GCQAAABtSZW1vdGUgU3RhY2tUcmFjZSBzdHJpbmcuLi4AAAAACugDAAAGCgAAABdFeGNlcHRpb25fQ2xhc3NfU2FtcGxlcwoGCwAAABFYc2x0X0NvbXBpbGVFcnJvcgoGDAAAAAcvLy9maWxlAQAAAAEAAAAGDQAAAAMyLjAEBQAAAClTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbAMAAAAEaGVhZAd2ZXJzaW9uBWNvdW50AwAAOFN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsK0RpY3Rpb25hcnlOb2RlCAgJDgAAAAIAAAACAAAABAYAAAAQU3lzdGVtLkV4Y2VwdGlvbgwAAAAJQ2xhc3NOYW1lB01lc3NhZ2UERGF0YQ5Jbm5lckV4Y2VwdGlvbgdIZWxwVVJMEFN0YWNrVHJhY2VTdHJpbmcWUmVtb3RlU3RhY2tUcmFjZVN0cmluZxBSZW1vdGVTdGFja0luZGV4D0V4Y2VwdGlvbk1ldGhvZAdIUmVzdWx0BlNvdXJjZQ1XYXRzb25CdWNrZXRzAQEDAwEBAQABAAEHKVN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsEFN5c3RlbS5FeGNlcHRpb24ICAIGDwAAABBTeXN0ZW0uRXhjZXB0aW9uBhAAAAAHbWVzc2FnZQkRAAAACRIAAAAJBwAAAAkIAAAACQkAAAAAAAAACugDAAAJCgAAAAoEDgAAADhTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbCtEaWN0aW9uYXJ5Tm9kZQMAAAADa2V5BXZhbHVlBG5leHQCAgM4U3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwrRGljdGlvbmFyeU5vZGUGFwAAAAZzZWNyZXQIAQEJGAAAAAERAAAABQAAAAkZAAAAAgAAAAIAAAABEgAAAAYAAAAJDwAAAAYbAAAAF0lubmVyIGV4Y2VwdGlvbiBtZXNzYWdlCgoKCgoAAAAACgAVE4AKCgEYAAAADgAAAAgIAQAAAAYcAAAAA29uZQoBGQAAAA4AAAAJFwAAAAgBAQkeAAAAAR4AAAAOAAAACAgBAAAACRwAAAAKCw==", TargetFrameworkMoniker.netfx461) } }; - var xsltException = new XsltException("message", exception); - yield return new object[] { PopulateException(xsltException), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAE1TeXN0ZW0uWG1sLCBWZXJzaW9uPTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OQUBAAAAHFN5c3RlbS5YbWwuWHNsLlhzbHRFeGNlcHRpb24SAAAACUNsYXNzTmFtZQdNZXNzYWdlBERhdGEOSW5uZXJFeGNlcHRpb24HSGVscFVSTBBTdGFja1RyYWNlU3RyaW5nFlJlbW90ZVN0YWNrVHJhY2VTdHJpbmcQUmVtb3RlU3RhY2tJbmRleA9FeGNlcHRpb25NZXRob2QHSFJlc3VsdAZTb3VyY2UNV2F0c29uQnVja2V0cwNyZXMEYXJncwlzb3VyY2VVcmkKbGluZU51bWJlcgxsaW5lUG9zaXRpb24HdmVyc2lvbgEBAwMBAQEAAQABBwECAgAAASlTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbBBTeXN0ZW0uRXhjZXB0aW9uCAgCCAgCAAAABgMAAAAcU3lzdGVtLlhtbC5Yc2wuWHNsdEV4Y2VwdGlvbgYEAAAAB21lc3NhZ2UJBQAAAAkGAAAABgcAAAAZaHR0cDovL21zZG4ubWljcm9zb2Z0LmNvbQYIAAAAFFN0YWNrVHJhY2Ugc3RyaW5nLi4uBgkAAAAbUmVtb3RlIFN0YWNrVHJhY2Ugc3RyaW5nLi4uAAAAAAroAwAABgoAAAAXRXhjZXB0aW9uX0NsYXNzX1NhbXBsZXMKBgsAAAADezB9CgoAAAAAAAAAAAYMAAAAAzIuMAQFAAAAKVN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsAwAAAARoZWFkB3ZlcnNpb24FY291bnQDAAA4U3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwrRGljdGlvbmFyeU5vZGUICAkNAAAAAgAAAAIAAAAEBgAAABBTeXN0ZW0uRXhjZXB0aW9uDAAAAAlDbGFzc05hbWUHTWVzc2FnZQREYXRhDklubmVyRXhjZXB0aW9uB0hlbHBVUkwQU3RhY2tUcmFjZVN0cmluZxZSZW1vdGVTdGFja1RyYWNlU3RyaW5nEFJlbW90ZVN0YWNrSW5kZXgPRXhjZXB0aW9uTWV0aG9kB0hSZXN1bHQGU291cmNlDVdhdHNvbkJ1Y2tldHMBAQMDAQEBAAEAAQcpU3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwQU3lzdGVtLkV4Y2VwdGlvbggIAgYOAAAAEFN5c3RlbS5FeGNlcHRpb24GDwAAAAdtZXNzYWdlCRAAAAAJEQAAAAkHAAAACQgAAAAJCQAAAAAAAAAK6AMAAAkKAAAACgQNAAAAOFN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsK0RpY3Rpb25hcnlOb2RlAwAAAANrZXkFdmFsdWUEbmV4dAICAzhTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbCtEaWN0aW9uYXJ5Tm9kZQYWAAAABnNlY3JldAgBAQkXAAAAARAAAAAFAAAACRgAAAACAAAAAgAAAAERAAAABgAAAAkOAAAABhoAAAAXSW5uZXIgZXhjZXB0aW9uIG1lc3NhZ2UKCgoKCgAAAAAKABUTgAoKARcAAAANAAAACAgBAAAABhsAAAADb25lCgEYAAAADQAAAAkWAAAACAEBCR0AAAABHQAAAA0AAAAICAEAAAAJGwAAAAoL", TargetFrameworkMoniker.netcoreapp20), new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAE1TeXN0ZW0uWG1sLCBWZXJzaW9uPTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OQUBAAAAHFN5c3RlbS5YbWwuWHNsLlhzbHRFeGNlcHRpb24SAAAACUNsYXNzTmFtZQdNZXNzYWdlBERhdGEOSW5uZXJFeGNlcHRpb24HSGVscFVSTBBTdGFja1RyYWNlU3RyaW5nFlJlbW90ZVN0YWNrVHJhY2VTdHJpbmcQUmVtb3RlU3RhY2tJbmRleA9FeGNlcHRpb25NZXRob2QHSFJlc3VsdAZTb3VyY2UNV2F0c29uQnVja2V0cwNyZXMEYXJncwlzb3VyY2VVcmkKbGluZU51bWJlcgxsaW5lUG9zaXRpb24HdmVyc2lvbgEBAwMBAQEAAQABBwECAgAAASlTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbBBTeXN0ZW0uRXhjZXB0aW9uCAgCCAgCAAAABgMAAAAcU3lzdGVtLlhtbC5Yc2wuWHNsdEV4Y2VwdGlvbgYEAAAAB21lc3NhZ2UJBQAAAAkGAAAABgcAAAAZaHR0cDovL21zZG4ubWljcm9zb2Z0LmNvbQYIAAAAFFN0YWNrVHJhY2Ugc3RyaW5nLi4uBgkAAAAbUmVtb3RlIFN0YWNrVHJhY2Ugc3RyaW5nLi4uAAAAAAroAwAABgoAAAAXRXhjZXB0aW9uX0NsYXNzX1NhbXBsZXMKBgsAAAARWG1sX1VzZXJFeGNlcHRpb24KCgAAAAAAAAAABgwAAAADMi4wBAUAAAApU3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwDAAAABGhlYWQHdmVyc2lvbgVjb3VudAMAADhTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbCtEaWN0aW9uYXJ5Tm9kZQgICQ0AAAACAAAAAgAAAAQGAAAAEFN5c3RlbS5FeGNlcHRpb24MAAAACUNsYXNzTmFtZQdNZXNzYWdlBERhdGEOSW5uZXJFeGNlcHRpb24HSGVscFVSTBBTdGFja1RyYWNlU3RyaW5nFlJlbW90ZVN0YWNrVHJhY2VTdHJpbmcQUmVtb3RlU3RhY2tJbmRleA9FeGNlcHRpb25NZXRob2QHSFJlc3VsdAZTb3VyY2UNV2F0c29uQnVja2V0cwEBAwMBAQEAAQABBylTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbBBTeXN0ZW0uRXhjZXB0aW9uCAgCBg4AAAAQU3lzdGVtLkV4Y2VwdGlvbgYPAAAAB21lc3NhZ2UJEAAAAAkRAAAACQcAAAAJCAAAAAkJAAAAAAAAAAroAwAACQoAAAAKBA0AAAA4U3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwrRGljdGlvbmFyeU5vZGUDAAAAA2tleQV2YWx1ZQRuZXh0AgIDOFN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsK0RpY3Rpb25hcnlOb2RlBhYAAAAGc2VjcmV0CAEBCRcAAAABEAAAAAUAAAAJGAAAAAIAAAACAAAAAREAAAAGAAAACQ4AAAAGGgAAABdJbm5lciBleGNlcHRpb24gbWVzc2FnZQoKCgoKAAAAAAoAFROACgoBFwAAAA0AAAAICAEAAAAGGwAAAANvbmUKARgAAAANAAAACRYAAAAIAQEJHQAAAAEdAAAADQAAAAgIAQAAAAkbAAAACgs=", TargetFrameworkMoniker.netfx461) } }; - } + var xsltException = new XsltException("message", exception); + yield return new object[] { PopulateException(xsltException), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAE1TeXN0ZW0uWG1sLCBWZXJzaW9uPTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OQUBAAAAHFN5c3RlbS5YbWwuWHNsLlhzbHRFeGNlcHRpb24SAAAACUNsYXNzTmFtZQdNZXNzYWdlBERhdGEOSW5uZXJFeGNlcHRpb24HSGVscFVSTBBTdGFja1RyYWNlU3RyaW5nFlJlbW90ZVN0YWNrVHJhY2VTdHJpbmcQUmVtb3RlU3RhY2tJbmRleA9FeGNlcHRpb25NZXRob2QHSFJlc3VsdAZTb3VyY2UNV2F0c29uQnVja2V0cwNyZXMEYXJncwlzb3VyY2VVcmkKbGluZU51bWJlcgxsaW5lUG9zaXRpb24HdmVyc2lvbgEBAwMBAQEAAQABBwECAgAAASlTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbBBTeXN0ZW0uRXhjZXB0aW9uCAgCCAgCAAAABgMAAAAcU3lzdGVtLlhtbC5Yc2wuWHNsdEV4Y2VwdGlvbgYEAAAAB21lc3NhZ2UJBQAAAAkGAAAABgcAAAAZaHR0cDovL21zZG4ubWljcm9zb2Z0LmNvbQYIAAAAFFN0YWNrVHJhY2Ugc3RyaW5nLi4uBgkAAAAbUmVtb3RlIFN0YWNrVHJhY2Ugc3RyaW5nLi4uAAAAAAroAwAABgoAAAAXRXhjZXB0aW9uX0NsYXNzX1NhbXBsZXMKBgsAAAADezB9CgoAAAAAAAAAAAYMAAAAAzIuMAQFAAAAKVN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsAwAAAARoZWFkB3ZlcnNpb24FY291bnQDAAA4U3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwrRGljdGlvbmFyeU5vZGUICAkNAAAAAgAAAAIAAAAEBgAAABBTeXN0ZW0uRXhjZXB0aW9uDAAAAAlDbGFzc05hbWUHTWVzc2FnZQREYXRhDklubmVyRXhjZXB0aW9uB0hlbHBVUkwQU3RhY2tUcmFjZVN0cmluZxZSZW1vdGVTdGFja1RyYWNlU3RyaW5nEFJlbW90ZVN0YWNrSW5kZXgPRXhjZXB0aW9uTWV0aG9kB0hSZXN1bHQGU291cmNlDVdhdHNvbkJ1Y2tldHMBAQMDAQEBAAEAAQcpU3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwQU3lzdGVtLkV4Y2VwdGlvbggIAgYOAAAAEFN5c3RlbS5FeGNlcHRpb24GDwAAAAdtZXNzYWdlCRAAAAAJEQAAAAkHAAAACQgAAAAJCQAAAAAAAAAK6AMAAAkKAAAACgQNAAAAOFN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsK0RpY3Rpb25hcnlOb2RlAwAAAANrZXkFdmFsdWUEbmV4dAICAzhTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbCtEaWN0aW9uYXJ5Tm9kZQYWAAAABnNlY3JldAgBAQkXAAAAARAAAAAFAAAACRgAAAACAAAAAgAAAAERAAAABgAAAAkOAAAABhoAAAAXSW5uZXIgZXhjZXB0aW9uIG1lc3NhZ2UKCgoKCgAAAAAKABUTgAoKARcAAAANAAAACAgBAAAABhsAAAADb25lCgEYAAAADQAAAAkWAAAACAEBCR0AAAABHQAAAA0AAAAICAEAAAAJGwAAAAoL", TargetFrameworkMoniker.netcoreapp20), new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAE1TeXN0ZW0uWG1sLCBWZXJzaW9uPTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OQUBAAAAHFN5c3RlbS5YbWwuWHNsLlhzbHRFeGNlcHRpb24SAAAACUNsYXNzTmFtZQdNZXNzYWdlBERhdGEOSW5uZXJFeGNlcHRpb24HSGVscFVSTBBTdGFja1RyYWNlU3RyaW5nFlJlbW90ZVN0YWNrVHJhY2VTdHJpbmcQUmVtb3RlU3RhY2tJbmRleA9FeGNlcHRpb25NZXRob2QHSFJlc3VsdAZTb3VyY2UNV2F0c29uQnVja2V0cwNyZXMEYXJncwlzb3VyY2VVcmkKbGluZU51bWJlcgxsaW5lUG9zaXRpb24HdmVyc2lvbgEBAwMBAQEAAQABBwECAgAAASlTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbBBTeXN0ZW0uRXhjZXB0aW9uCAgCCAgCAAAABgMAAAAcU3lzdGVtLlhtbC5Yc2wuWHNsdEV4Y2VwdGlvbgYEAAAAB21lc3NhZ2UJBQAAAAkGAAAABgcAAAAZaHR0cDovL21zZG4ubWljcm9zb2Z0LmNvbQYIAAAAFFN0YWNrVHJhY2Ugc3RyaW5nLi4uBgkAAAAbUmVtb3RlIFN0YWNrVHJhY2Ugc3RyaW5nLi4uAAAAAAroAwAABgoAAAAXRXhjZXB0aW9uX0NsYXNzX1NhbXBsZXMKBgsAAAARWG1sX1VzZXJFeGNlcHRpb24KCgAAAAAAAAAABgwAAAADMi4wBAUAAAApU3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwDAAAABGhlYWQHdmVyc2lvbgVjb3VudAMAADhTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbCtEaWN0aW9uYXJ5Tm9kZQgICQ0AAAACAAAAAgAAAAQGAAAAEFN5c3RlbS5FeGNlcHRpb24MAAAACUNsYXNzTmFtZQdNZXNzYWdlBERhdGEOSW5uZXJFeGNlcHRpb24HSGVscFVSTBBTdGFja1RyYWNlU3RyaW5nFlJlbW90ZVN0YWNrVHJhY2VTdHJpbmcQUmVtb3RlU3RhY2tJbmRleA9FeGNlcHRpb25NZXRob2QHSFJlc3VsdAZTb3VyY2UNV2F0c29uQnVja2V0cwEBAwMBAQEAAQABBylTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbBBTeXN0ZW0uRXhjZXB0aW9uCAgCBg4AAAAQU3lzdGVtLkV4Y2VwdGlvbgYPAAAAB21lc3NhZ2UJEAAAAAkRAAAACQcAAAAJCAAAAAkJAAAAAAAAAAroAwAACQoAAAAKBA0AAAA4U3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwrRGljdGlvbmFyeU5vZGUDAAAAA2tleQV2YWx1ZQRuZXh0AgIDOFN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsK0RpY3Rpb25hcnlOb2RlBhYAAAAGc2VjcmV0CAEBCRcAAAABEAAAAAUAAAAJGAAAAAIAAAACAAAAAREAAAAGAAAACQ4AAAAGGgAAABdJbm5lciBleGNlcHRpb24gbWVzc2FnZQoKCgoKAAAAAAoAFROACgoBFwAAAA0AAAAICAEAAAAGGwAAAANvbmUKARgAAAANAAAACRYAAAAIAQEJHQAAAAEdAAAADQAAAAgIAQAAAAkbAAAACgs=", TargetFrameworkMoniker.netfx461) } }; // Assembly load error with shims in uap/uapaot configuration. Issue #24916 if (!PlatformDetection.IsUap) @@ -847,20 +843,7 @@ public static IEnumerable SerializableObjects() yield return new object[] { EqualityComparer.Default, new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAEAQAAAJMBU3lzdGVtLkNvbGxlY3Rpb25zLkdlbmVyaWMuTnVsbGFibGVFcXVhbGl0eUNvbXBhcmVyYDFbW1N5c3RlbS5Eb3VibGUsIG1zY29ybGliLCBWZXJzaW9uPTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OV1dAAAAAAs=", TargetFrameworkMoniker.netcoreapp20), new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAEAQAAAJMBU3lzdGVtLkNvbGxlY3Rpb25zLkdlbmVyaWMuTnVsbGFibGVFcXVhbGl0eUNvbXBhcmVyYDFbW1N5c3RlbS5Eb3VibGUsIG1zY29ybGliLCBWZXJzaW9uPTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OV1dAAAAAAs=", TargetFrameworkMoniker.netfx461) } }; // Equality comparers which can roundtrip - object byteEqualityComparer; - - // NET Native doesn't create ByteEqualityComparer with EqualityComparer.Default, so create it through reflection - if (PlatformDetection.IsNetNative) - { - Type byteEqualityComparerType = Type.GetType("System.Collections.Generic.ByteEqualityComparer", true); - byteEqualityComparer = Activator.CreateInstance(byteEqualityComparerType); - } - else - { - byteEqualityComparer = EqualityComparer.Default; - } - - yield return new object[] { byteEqualityComparer, new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAEAQAAAC9TeXN0ZW0uQ29sbGVjdGlvbnMuR2VuZXJpYy5CeXRlRXF1YWxpdHlDb21wYXJlcgAAAAAL", TargetFrameworkMoniker.netcoreapp20), new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAEAQAAAC9TeXN0ZW0uQ29sbGVjdGlvbnMuR2VuZXJpYy5CeXRlRXF1YWxpdHlDb21wYXJlcgAAAAAL", TargetFrameworkMoniker.netfx461) } }; + yield return new object[] { EqualityComparer.Default, new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAEAQAAAC9TeXN0ZW0uQ29sbGVjdGlvbnMuR2VuZXJpYy5CeXRlRXF1YWxpdHlDb21wYXJlcgAAAAAL", TargetFrameworkMoniker.netcoreapp20), new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAEAQAAAC9TeXN0ZW0uQ29sbGVjdGlvbnMuR2VuZXJpYy5CeXRlRXF1YWxpdHlDb21wYXJlcgAAAAAL", TargetFrameworkMoniker.netfx461) } }; yield return new object[] { EqualityComparer.Default, new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAEAQAAAN4BU3lzdGVtLkNvbGxlY3Rpb25zLkdlbmVyaWMuRW51bUVxdWFsaXR5Q29tcGFyZXJgMVtbU3lzdGVtLlJ1bnRpbWUuU2VyaWFsaXphdGlvbi5Gb3JtYXR0ZXJzLlRlc3RzLkludDMyRW51bSwgU3lzdGVtLlJ1bnRpbWUuU2VyaWFsaXphdGlvbi5Gb3JtYXR0ZXJzLlRlc3RzLCBWZXJzaW9uPTQuMC4zLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49OWQ3N2NjN2FkMzliNjhlYl1dAAAAAAs=", TargetFrameworkMoniker.netcoreapp20), new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAEAQAAAN4BU3lzdGVtLkNvbGxlY3Rpb25zLkdlbmVyaWMuRW51bUVxdWFsaXR5Q29tcGFyZXJgMVtbU3lzdGVtLlJ1bnRpbWUuU2VyaWFsaXphdGlvbi5Gb3JtYXR0ZXJzLlRlc3RzLkludDMyRW51bSwgU3lzdGVtLlJ1bnRpbWUuU2VyaWFsaXphdGlvbi5Gb3JtYXR0ZXJzLlRlc3RzLCBWZXJzaW9uPTQuMC4zLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49OWQ3N2NjN2FkMzliNjhlYl1dAAAAAAs=", TargetFrameworkMoniker.netfx461) } }; // Other core serializable types @@ -1169,13 +1152,9 @@ public static IEnumerable SerializableObjects() yield return new object[] { new Collection>>(), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAEAQAAAO4DU3lzdGVtLkNvbGxlY3Rpb25zLk9iamVjdE1vZGVsLkNvbGxlY3Rpb25gMVtbU3lzdGVtLlR1cGxlYDJbW1N5c3RlbS5JbnQzMiwgbXNjb3JsaWIsIFZlcnNpb249NC4wLjAuMCwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1iNzdhNWM1NjE5MzRlMDg5XSxbU3lzdGVtLlJ1bnRpbWUuU2VyaWFsaXphdGlvbi5Gb3JtYXR0ZXJzLlRlc3RzLkdyYXBoYDFbW1N5c3RlbS5JbnQzMiwgbXNjb3JsaWIsIFZlcnNpb249NC4wLjAuMCwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1iNzdhNWM1NjE5MzRlMDg5XV0sIFN5c3RlbS5SdW50aW1lLlNlcmlhbGl6YXRpb24uRm9ybWF0dGVycy5UZXN0cywgVmVyc2lvbj00LjAuMy4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPTlkNzdjYzdhZDM5YjY4ZWJdXSwgbXNjb3JsaWIsIFZlcnNpb249NC4wLjAuMCwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1iNzdhNWM1NjE5MzRlMDg5XV0BAAAABWl0ZW1zA+QDU3lzdGVtLkNvbGxlY3Rpb25zLkdlbmVyaWMuTGlzdGAxW1tTeXN0ZW0uVHVwbGVgMltbU3lzdGVtLkludDMyLCBtc2NvcmxpYiwgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODldLFtTeXN0ZW0uUnVudGltZS5TZXJpYWxpemF0aW9uLkZvcm1hdHRlcnMuVGVzdHMuR3JhcGhgMVtbU3lzdGVtLkludDMyLCBtc2NvcmxpYiwgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODldXSwgU3lzdGVtLlJ1bnRpbWUuU2VyaWFsaXphdGlvbi5Gb3JtYXR0ZXJzLlRlc3RzLCBWZXJzaW9uPTQuMC4zLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49OWQ3N2NjN2FkMzliNjhlYl1dLCBtc2NvcmxpYiwgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODldXQkCAAAABAIAAADkA1N5c3RlbS5Db2xsZWN0aW9ucy5HZW5lcmljLkxpc3RgMVtbU3lzdGVtLlR1cGxlYDJbW1N5c3RlbS5JbnQzMiwgbXNjb3JsaWIsIFZlcnNpb249NC4wLjAuMCwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1iNzdhNWM1NjE5MzRlMDg5XSxbU3lzdGVtLlJ1bnRpbWUuU2VyaWFsaXphdGlvbi5Gb3JtYXR0ZXJzLlRlc3RzLkdyYXBoYDFbW1N5c3RlbS5JbnQzMiwgbXNjb3JsaWIsIFZlcnNpb249NC4wLjAuMCwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1iNzdhNWM1NjE5MzRlMDg5XV0sIFN5c3RlbS5SdW50aW1lLlNlcmlhbGl6YXRpb24uRm9ybWF0dGVycy5UZXN0cywgVmVyc2lvbj00LjAuMy4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPTlkNzdjYzdhZDM5YjY4ZWJdXSwgbXNjb3JsaWIsIFZlcnNpb249NC4wLjAuMCwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1iNzdhNWM1NjE5MzRlMDg5XV0DAAAABl9pdGVtcwVfc2l6ZQhfdmVyc2lvbgMAAPQCU3lzdGVtLlR1cGxlYDJbW1N5c3RlbS5JbnQzMiwgbXNjb3JsaWIsIFZlcnNpb249NC4wLjAuMCwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1iNzdhNWM1NjE5MzRlMDg5XSxbU3lzdGVtLlJ1bnRpbWUuU2VyaWFsaXphdGlvbi5Gb3JtYXR0ZXJzLlRlc3RzLkdyYXBoYDFbW1N5c3RlbS5JbnQzMiwgbXNjb3JsaWIsIFZlcnNpb249NC4wLjAuMCwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1iNzdhNWM1NjE5MzRlMDg5XV0sIFN5c3RlbS5SdW50aW1lLlNlcmlhbGl6YXRpb24uRm9ybWF0dGVycy5UZXN0cywgVmVyc2lvbj00LjAuMy4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPTlkNzdjYzdhZDM5YjY4ZWJdXVtdCAgJAwAAAAAAAAAAAAAABwMAAAAAAQAAAAAAAAAD8gJTeXN0ZW0uVHVwbGVgMltbU3lzdGVtLkludDMyLCBtc2NvcmxpYiwgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODldLFtTeXN0ZW0uUnVudGltZS5TZXJpYWxpemF0aW9uLkZvcm1hdHRlcnMuVGVzdHMuR3JhcGhgMVtbU3lzdGVtLkludDMyLCBtc2NvcmxpYiwgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODldXSwgU3lzdGVtLlJ1bnRpbWUuU2VyaWFsaXphdGlvbi5Gb3JtYXR0ZXJzLlRlc3RzLCBWZXJzaW9uPTQuMC4zLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49OWQ3N2NjN2FkMzliNjhlYl1dCw==", TargetFrameworkMoniker.netcoreapp20), new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAEAQAAAO4DU3lzdGVtLkNvbGxlY3Rpb25zLk9iamVjdE1vZGVsLkNvbGxlY3Rpb25gMVtbU3lzdGVtLlR1cGxlYDJbW1N5c3RlbS5JbnQzMiwgbXNjb3JsaWIsIFZlcnNpb249NC4wLjAuMCwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1iNzdhNWM1NjE5MzRlMDg5XSxbU3lzdGVtLlJ1bnRpbWUuU2VyaWFsaXphdGlvbi5Gb3JtYXR0ZXJzLlRlc3RzLkdyYXBoYDFbW1N5c3RlbS5JbnQzMiwgbXNjb3JsaWIsIFZlcnNpb249NC4wLjAuMCwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1iNzdhNWM1NjE5MzRlMDg5XV0sIFN5c3RlbS5SdW50aW1lLlNlcmlhbGl6YXRpb24uRm9ybWF0dGVycy5UZXN0cywgVmVyc2lvbj00LjAuMy4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPTlkNzdjYzdhZDM5YjY4ZWJdXSwgbXNjb3JsaWIsIFZlcnNpb249NC4wLjAuMCwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1iNzdhNWM1NjE5MzRlMDg5XV0BAAAABWl0ZW1zA+QDU3lzdGVtLkNvbGxlY3Rpb25zLkdlbmVyaWMuTGlzdGAxW1tTeXN0ZW0uVHVwbGVgMltbU3lzdGVtLkludDMyLCBtc2NvcmxpYiwgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODldLFtTeXN0ZW0uUnVudGltZS5TZXJpYWxpemF0aW9uLkZvcm1hdHRlcnMuVGVzdHMuR3JhcGhgMVtbU3lzdGVtLkludDMyLCBtc2NvcmxpYiwgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODldXSwgU3lzdGVtLlJ1bnRpbWUuU2VyaWFsaXphdGlvbi5Gb3JtYXR0ZXJzLlRlc3RzLCBWZXJzaW9uPTQuMC4zLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49OWQ3N2NjN2FkMzliNjhlYl1dLCBtc2NvcmxpYiwgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODldXQkCAAAABAIAAADkA1N5c3RlbS5Db2xsZWN0aW9ucy5HZW5lcmljLkxpc3RgMVtbU3lzdGVtLlR1cGxlYDJbW1N5c3RlbS5JbnQzMiwgbXNjb3JsaWIsIFZlcnNpb249NC4wLjAuMCwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1iNzdhNWM1NjE5MzRlMDg5XSxbU3lzdGVtLlJ1bnRpbWUuU2VyaWFsaXphdGlvbi5Gb3JtYXR0ZXJzLlRlc3RzLkdyYXBoYDFbW1N5c3RlbS5JbnQzMiwgbXNjb3JsaWIsIFZlcnNpb249NC4wLjAuMCwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1iNzdhNWM1NjE5MzRlMDg5XV0sIFN5c3RlbS5SdW50aW1lLlNlcmlhbGl6YXRpb24uRm9ybWF0dGVycy5UZXN0cywgVmVyc2lvbj00LjAuMy4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPTlkNzdjYzdhZDM5YjY4ZWJdXSwgbXNjb3JsaWIsIFZlcnNpb249NC4wLjAuMCwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1iNzdhNWM1NjE5MzRlMDg5XV0DAAAABl9pdGVtcwVfc2l6ZQhfdmVyc2lvbgMAAPQCU3lzdGVtLlR1cGxlYDJbW1N5c3RlbS5JbnQzMiwgbXNjb3JsaWIsIFZlcnNpb249NC4wLjAuMCwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1iNzdhNWM1NjE5MzRlMDg5XSxbU3lzdGVtLlJ1bnRpbWUuU2VyaWFsaXphdGlvbi5Gb3JtYXR0ZXJzLlRlc3RzLkdyYXBoYDFbW1N5c3RlbS5JbnQzMiwgbXNjb3JsaWIsIFZlcnNpb249NC4wLjAuMCwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1iNzdhNWM1NjE5MzRlMDg5XV0sIFN5c3RlbS5SdW50aW1lLlNlcmlhbGl6YXRpb24uRm9ybWF0dGVycy5UZXN0cywgVmVyc2lvbj00LjAuMy4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPTlkNzdjYzdhZDM5YjY4ZWJdXVtdCAgJAwAAAAAAAAAAAAAABwMAAAAAAQAAAAAAAAAD8gJTeXN0ZW0uVHVwbGVgMltbU3lzdGVtLkludDMyLCBtc2NvcmxpYiwgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODldLFtTeXN0ZW0uUnVudGltZS5TZXJpYWxpemF0aW9uLkZvcm1hdHRlcnMuVGVzdHMuR3JhcGhgMVtbU3lzdGVtLkludDMyLCBtc2NvcmxpYiwgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODldXSwgU3lzdGVtLlJ1bnRpbWUuU2VyaWFsaXphdGlvbi5Gb3JtYXR0ZXJzLlRlc3RzLCBWZXJzaW9uPTQuMC4zLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49OWQ3N2NjN2FkMzliNjhlYl1dCw==", TargetFrameworkMoniker.netfx461) } }; yield return new object[] { new Collection>>(new Tuple>[] { Tuple.Create(1, new Graph()), Tuple.Create(5, new Graph()) }), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAEAQAAAO4DU3lzdGVtLkNvbGxlY3Rpb25zLk9iamVjdE1vZGVsLkNvbGxlY3Rpb25gMVtbU3lzdGVtLlR1cGxlYDJbW1N5c3RlbS5JbnQzMiwgbXNjb3JsaWIsIFZlcnNpb249NC4wLjAuMCwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1iNzdhNWM1NjE5MzRlMDg5XSxbU3lzdGVtLlJ1bnRpbWUuU2VyaWFsaXphdGlvbi5Gb3JtYXR0ZXJzLlRlc3RzLkdyYXBoYDFbW1N5c3RlbS5JbnQzMiwgbXNjb3JsaWIsIFZlcnNpb249NC4wLjAuMCwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1iNzdhNWM1NjE5MzRlMDg5XV0sIFN5c3RlbS5SdW50aW1lLlNlcmlhbGl6YXRpb24uRm9ybWF0dGVycy5UZXN0cywgVmVyc2lvbj00LjAuMy4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPTlkNzdjYzdhZDM5YjY4ZWJdXSwgbXNjb3JsaWIsIFZlcnNpb249NC4wLjAuMCwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1iNzdhNWM1NjE5MzRlMDg5XV0BAAAABWl0ZW1zA/QCU3lzdGVtLlR1cGxlYDJbW1N5c3RlbS5JbnQzMiwgbXNjb3JsaWIsIFZlcnNpb249NC4wLjAuMCwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1iNzdhNWM1NjE5MzRlMDg5XSxbU3lzdGVtLlJ1bnRpbWUuU2VyaWFsaXphdGlvbi5Gb3JtYXR0ZXJzLlRlc3RzLkdyYXBoYDFbW1N5c3RlbS5JbnQzMiwgbXNjb3JsaWIsIFZlcnNpb249NC4wLjAuMCwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1iNzdhNWM1NjE5MzRlMDg5XV0sIFN5c3RlbS5SdW50aW1lLlNlcmlhbGl6YXRpb24uRm9ybWF0dGVycy5UZXN0cywgVmVyc2lvbj00LjAuMy4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPTlkNzdjYzdhZDM5YjY4ZWJdXVtdCQIAAAAHAgAAAAABAAAAAgAAAAPyAlN5c3RlbS5UdXBsZWAyW1tTeXN0ZW0uSW50MzIsIG1zY29ybGliLCBWZXJzaW9uPTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OV0sW1N5c3RlbS5SdW50aW1lLlNlcmlhbGl6YXRpb24uRm9ybWF0dGVycy5UZXN0cy5HcmFwaGAxW1tTeXN0ZW0uSW50MzIsIG1zY29ybGliLCBWZXJzaW9uPTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OV1dLCBTeXN0ZW0uUnVudGltZS5TZXJpYWxpemF0aW9uLkZvcm1hdHRlcnMuVGVzdHMsIFZlcnNpb249NC4wLjMuMCwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj05ZDc3Y2M3YWQzOWI2OGViXV0JAwAAAAkEAAAADAUAAABwU3lzdGVtLlJ1bnRpbWUuU2VyaWFsaXphdGlvbi5Gb3JtYXR0ZXJzLlRlc3RzLCBWZXJzaW9uPTQuMC4zLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49OWQ3N2NjN2FkMzliNjhlYgQDAAAA8gJTeXN0ZW0uVHVwbGVgMltbU3lzdGVtLkludDMyLCBtc2NvcmxpYiwgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODldLFtTeXN0ZW0uUnVudGltZS5TZXJpYWxpemF0aW9uLkZvcm1hdHRlcnMuVGVzdHMuR3JhcGhgMVtbU3lzdGVtLkludDMyLCBtc2NvcmxpYiwgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODldXSwgU3lzdGVtLlJ1bnRpbWUuU2VyaWFsaXphdGlvbi5Gb3JtYXR0ZXJzLlRlc3RzLCBWZXJzaW9uPTQuMC4zLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49OWQ3N2NjN2FkMzliNjhlYl1dAgAAAAdtX0l0ZW0xB21fSXRlbTIABAiSAVN5c3RlbS5SdW50aW1lLlNlcmlhbGl6YXRpb24uRm9ybWF0dGVycy5UZXN0cy5HcmFwaGAxW1tTeXN0ZW0uSW50MzIsIG1zY29ybGliLCBWZXJzaW9uPTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OV1dBQAAAAEAAAAJBgAAAAEEAAAAAwAAAAUAAAAJBwAAAAUGAAAAkgFTeXN0ZW0uUnVudGltZS5TZXJpYWxpemF0aW9uLkZvcm1hdHRlcnMuVGVzdHMuR3JhcGhgMVtbU3lzdGVtLkludDMyLCBtc2NvcmxpYiwgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODldXQIAAAAFVmFsdWUFTGlua3MABAiUAVN5c3RlbS5SdW50aW1lLlNlcmlhbGl6YXRpb24uRm9ybWF0dGVycy5UZXN0cy5HcmFwaGAxW1tTeXN0ZW0uSW50MzIsIG1zY29ybGliLCBWZXJzaW9uPTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OV1dW10FAAAABQAAAAAAAAAKAQcAAAAGAAAAAAAAAAoL", TargetFrameworkMoniker.netcoreapp20), new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAEAQAAAO4DU3lzdGVtLkNvbGxlY3Rpb25zLk9iamVjdE1vZGVsLkNvbGxlY3Rpb25gMVtbU3lzdGVtLlR1cGxlYDJbW1N5c3RlbS5JbnQzMiwgbXNjb3JsaWIsIFZlcnNpb249NC4wLjAuMCwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1iNzdhNWM1NjE5MzRlMDg5XSxbU3lzdGVtLlJ1bnRpbWUuU2VyaWFsaXphdGlvbi5Gb3JtYXR0ZXJzLlRlc3RzLkdyYXBoYDFbW1N5c3RlbS5JbnQzMiwgbXNjb3JsaWIsIFZlcnNpb249NC4wLjAuMCwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1iNzdhNWM1NjE5MzRlMDg5XV0sIFN5c3RlbS5SdW50aW1lLlNlcmlhbGl6YXRpb24uRm9ybWF0dGVycy5UZXN0cywgVmVyc2lvbj00LjAuMy4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPTlkNzdjYzdhZDM5YjY4ZWJdXSwgbXNjb3JsaWIsIFZlcnNpb249NC4wLjAuMCwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1iNzdhNWM1NjE5MzRlMDg5XV0BAAAABWl0ZW1zA/QCU3lzdGVtLlR1cGxlYDJbW1N5c3RlbS5JbnQzMiwgbXNjb3JsaWIsIFZlcnNpb249NC4wLjAuMCwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1iNzdhNWM1NjE5MzRlMDg5XSxbU3lzdGVtLlJ1bnRpbWUuU2VyaWFsaXphdGlvbi5Gb3JtYXR0ZXJzLlRlc3RzLkdyYXBoYDFbW1N5c3RlbS5JbnQzMiwgbXNjb3JsaWIsIFZlcnNpb249NC4wLjAuMCwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1iNzdhNWM1NjE5MzRlMDg5XV0sIFN5c3RlbS5SdW50aW1lLlNlcmlhbGl6YXRpb24uRm9ybWF0dGVycy5UZXN0cywgVmVyc2lvbj00LjAuMy4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPTlkNzdjYzdhZDM5YjY4ZWJdXVtdCQIAAAAHAgAAAAABAAAAAgAAAAPyAlN5c3RlbS5UdXBsZWAyW1tTeXN0ZW0uSW50MzIsIG1zY29ybGliLCBWZXJzaW9uPTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OV0sW1N5c3RlbS5SdW50aW1lLlNlcmlhbGl6YXRpb24uRm9ybWF0dGVycy5UZXN0cy5HcmFwaGAxW1tTeXN0ZW0uSW50MzIsIG1zY29ybGliLCBWZXJzaW9uPTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OV1dLCBTeXN0ZW0uUnVudGltZS5TZXJpYWxpemF0aW9uLkZvcm1hdHRlcnMuVGVzdHMsIFZlcnNpb249NC4wLjMuMCwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj05ZDc3Y2M3YWQzOWI2OGViXV0JAwAAAAkEAAAADAUAAABwU3lzdGVtLlJ1bnRpbWUuU2VyaWFsaXphdGlvbi5Gb3JtYXR0ZXJzLlRlc3RzLCBWZXJzaW9uPTQuMC4zLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49OWQ3N2NjN2FkMzliNjhlYgQDAAAA8gJTeXN0ZW0uVHVwbGVgMltbU3lzdGVtLkludDMyLCBtc2NvcmxpYiwgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODldLFtTeXN0ZW0uUnVudGltZS5TZXJpYWxpemF0aW9uLkZvcm1hdHRlcnMuVGVzdHMuR3JhcGhgMVtbU3lzdGVtLkludDMyLCBtc2NvcmxpYiwgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODldXSwgU3lzdGVtLlJ1bnRpbWUuU2VyaWFsaXphdGlvbi5Gb3JtYXR0ZXJzLlRlc3RzLCBWZXJzaW9uPTQuMC4zLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49OWQ3N2NjN2FkMzliNjhlYl1dAgAAAAdtX0l0ZW0xB21fSXRlbTIABAiSAVN5c3RlbS5SdW50aW1lLlNlcmlhbGl6YXRpb24uRm9ybWF0dGVycy5UZXN0cy5HcmFwaGAxW1tTeXN0ZW0uSW50MzIsIG1zY29ybGliLCBWZXJzaW9uPTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OV1dBQAAAAEAAAAJBgAAAAEEAAAAAwAAAAUAAAAJBwAAAAUGAAAAkgFTeXN0ZW0uUnVudGltZS5TZXJpYWxpemF0aW9uLkZvcm1hdHRlcnMuVGVzdHMuR3JhcGhgMVtbU3lzdGVtLkludDMyLCBtc2NvcmxpYiwgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODldXQIAAAAFVmFsdWUFTGlua3MABAiUAVN5c3RlbS5SdW50aW1lLlNlcmlhbGl6YXRpb24uRm9ybWF0dGVycy5UZXN0cy5HcmFwaGAxW1tTeXN0ZW0uSW50MzIsIG1zY29ybGliLCBWZXJzaW9uPTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OV1dW10FAAAABQAAAAAAAAAKAQcAAAAGAAAAAAAAAAoL", TargetFrameworkMoniker.netfx461) } }; - // NET Native bug 445667 causes a crash in reflecting over multidimensional arrays - if (!PlatformDetection.IsNetNative) - { - yield return new object[] { new object[] { new int[,] { { 1, 2, 3, 4, 5 }, { 6, 7, 8, 9, 10 }, { 11, 12, 13, 14, 15 } } }, new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAQAQAAAAEAAAAJAgAAAAcCAAAAAgIAAAADAAAABQAAAAAIAQAAAAIAAAADAAAABAAAAAUAAAAGAAAABwAAAAgAAAAJAAAACgAAAAsAAAAMAAAADQAAAA4AAAAPAAAACw==", TargetFrameworkMoniker.netcoreapp20), new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAQAQAAAAEAAAAJAgAAAAcCAAAAAgIAAAADAAAABQAAAAAIAQAAAAIAAAADAAAABAAAAAUAAAAGAAAABwAAAAgAAAAJAAAACgAAAAsAAAAMAAAADQAAAA4AAAAPAAAACw==", TargetFrameworkMoniker.netfx461) } }; - yield return new object[] { new object[] { new int[,,] { { { 1, 2, 3, 4, 5 }, { 6, 7, 8, 9, 10 }, { 11, 12, 13, 14, 15 } } } }, new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAQAQAAAAEAAAAJAgAAAAcCAAAAAgMAAAABAAAAAwAAAAUAAAAACAEAAAACAAAAAwAAAAQAAAAFAAAABgAAAAcAAAAIAAAACQAAAAoAAAALAAAADAAAAA0AAAAOAAAADwAAAAs=", TargetFrameworkMoniker.netcoreapp20), new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAQAQAAAAEAAAAJAgAAAAcCAAAAAgMAAAABAAAAAwAAAAUAAAAACAEAAAACAAAAAwAAAAQAAAAFAAAABgAAAAcAAAAIAAAACQAAAAoAAAALAAAADAAAAA0AAAAOAAAADwAAAAs=", TargetFrameworkMoniker.netfx461) } }; - yield return new object[] { new object[] { new int[,,,] { { { { 1 } } } } }, new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAQAQAAAAEAAAAJAgAAAAcCAAAAAgQAAAABAAAAAQAAAAEAAAABAAAAAAgBAAAACw==", TargetFrameworkMoniker.netcoreapp20), new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAQAQAAAAEAAAAJAgAAAAcCAAAAAgQAAAABAAAAAQAAAAEAAAABAAAAAAgBAAAACw==", TargetFrameworkMoniker.netfx461) } }; - } + yield return new object[] { new object[] { new int[,] { { 1, 2, 3, 4, 5 }, { 6, 7, 8, 9, 10 }, { 11, 12, 13, 14, 15 } } }, new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAQAQAAAAEAAAAJAgAAAAcCAAAAAgIAAAADAAAABQAAAAAIAQAAAAIAAAADAAAABAAAAAUAAAAGAAAABwAAAAgAAAAJAAAACgAAAAsAAAAMAAAADQAAAA4AAAAPAAAACw==", TargetFrameworkMoniker.netcoreapp20), new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAQAQAAAAEAAAAJAgAAAAcCAAAAAgIAAAADAAAABQAAAAAIAQAAAAIAAAADAAAABAAAAAUAAAAGAAAABwAAAAgAAAAJAAAACgAAAAsAAAAMAAAADQAAAA4AAAAPAAAACw==", TargetFrameworkMoniker.netfx461) } }; + yield return new object[] { new object[] { new int[,,] { { { 1, 2, 3, 4, 5 }, { 6, 7, 8, 9, 10 }, { 11, 12, 13, 14, 15 } } } }, new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAQAQAAAAEAAAAJAgAAAAcCAAAAAgMAAAABAAAAAwAAAAUAAAAACAEAAAACAAAAAwAAAAQAAAAFAAAABgAAAAcAAAAIAAAACQAAAAoAAAALAAAADAAAAA0AAAAOAAAADwAAAAs=", TargetFrameworkMoniker.netcoreapp20), new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAQAQAAAAEAAAAJAgAAAAcCAAAAAgMAAAABAAAAAwAAAAUAAAAACAEAAAACAAAAAwAAAAQAAAAFAAAABgAAAAcAAAAIAAAACQAAAAoAAAALAAAADAAAAA0AAAAOAAAADwAAAAs=", TargetFrameworkMoniker.netfx461) } }; + yield return new object[] { new object[] { new int[,,,] { { { { 1 } } } } }, new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAQAQAAAAEAAAAJAgAAAAcCAAAAAgQAAAABAAAAAQAAAAEAAAABAAAAAAgBAAAACw==", TargetFrameworkMoniker.netcoreapp20), new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAQAQAAAAEAAAAJAgAAAAcCAAAAAgQAAAABAAAAAQAAAAEAAAABAAAAAAgBAAAACw==", TargetFrameworkMoniker.netfx461) } }; yield return new object[] { new ArraySegment(new int[] { 1, 2, 3, 4, 5 }), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAEAQAAAHJTeXN0ZW0uQXJyYXlTZWdtZW50YDFbW1N5c3RlbS5JbnQzMiwgbXNjb3JsaWIsIFZlcnNpb249NC4wLjAuMCwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1iNzdhNWM1NjE5MzRlMDg5XV0DAAAABl9hcnJheQdfb2Zmc2V0Bl9jb3VudAcAAAgICAkCAAAAAAAAAAUAAAAPAgAAAAUAAAAIAQAAAAIAAAADAAAABAAAAAUAAAAL", TargetFrameworkMoniker.netcoreapp20), new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAEAQAAAHJTeXN0ZW0uQXJyYXlTZWdtZW50YDFbW1N5c3RlbS5JbnQzMiwgbXNjb3JsaWIsIFZlcnNpb249NC4wLjAuMCwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1iNzdhNWM1NjE5MzRlMDg5XV0DAAAABl9hcnJheQdfb2Zmc2V0Bl9jb3VudAcAAAgICAkCAAAAAAAAAAUAAAAPAgAAAAUAAAAIAQAAAAIAAAADAAAABAAAAAUAAAAL", TargetFrameworkMoniker.netfx461) } }; yield return new object[] { new ArraySegment(new int[] { 1, 2, 3, 4, 5 }, 1, 2), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAEAQAAAHJTeXN0ZW0uQXJyYXlTZWdtZW50YDFbW1N5c3RlbS5JbnQzMiwgbXNjb3JsaWIsIFZlcnNpb249NC4wLjAuMCwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1iNzdhNWM1NjE5MzRlMDg5XV0DAAAABl9hcnJheQdfb2Zmc2V0Bl9jb3VudAcAAAgICAkCAAAAAQAAAAIAAAAPAgAAAAUAAAAIAQAAAAIAAAADAAAABAAAAAUAAAAL", TargetFrameworkMoniker.netcoreapp20), new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAEAQAAAHJTeXN0ZW0uQXJyYXlTZWdtZW50YDFbW1N5c3RlbS5JbnQzMiwgbXNjb3JsaWIsIFZlcnNpb249NC4wLjAuMCwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1iNzdhNWM1NjE5MzRlMDg5XV0DAAAABl9hcnJheQdfb2Zmc2V0Bl9jb3VudAcAAAgICAkCAAAAAQAAAAIAAAAPAgAAAAUAAAAIAQAAAAIAAAADAAAABAAAAAUAAAAL", TargetFrameworkMoniker.netfx461) } }; @@ -1191,11 +1170,7 @@ public static IEnumerable SerializableObjects() yield return new object[] { Array.CreateInstance(typeof(uint), new[] { 5 }, new[] { 1 }), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAHAQAAAAMBAAAABQAAAAEAAAAADwAAAAAAAAAAAAAAAAAAAAAAAAAACw==", TargetFrameworkMoniker.netcoreapp20), new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAHAQAAAAMBAAAABQAAAAEAAAAADwAAAAAAAAAAAAAAAAAAAAAAAAAACw==", TargetFrameworkMoniker.netfx461) } }; } - // NET Native bug 445667 causes a crash in reflecting over multidimensional arrays - if (!PlatformDetection.IsNetNative) - { - yield return new object[] { Array.CreateInstance(typeof(int), new[] { 0, 0, 0 }, new[] { 0, 0, 0 }), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAHAQAAAAIDAAAAAAAAAAAAAAAAAAAAAAgL", TargetFrameworkMoniker.netcoreapp20), new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAHAQAAAAIDAAAAAAAAAAAAAAAAAAAAAAgL", TargetFrameworkMoniker.netfx461) } }; - } + yield return new object[] { Array.CreateInstance(typeof(int), new[] { 0, 0, 0 }, new[] { 0, 0, 0 }), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAHAQAAAAIDAAAAAAAAAAAAAAAAAAAAAAgL", TargetFrameworkMoniker.netcoreapp20), new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAHAQAAAAIDAAAAAAAAAAAAAAAAAAAAAAgL", TargetFrameworkMoniker.netfx461) } }; if (PlatformDetection.IsNonZeroLowerBoundArraySupported) { var arr = Array.CreateInstance(typeof(string), new[] { 1, 2 }, new[] { 3, 4 }); @@ -1540,22 +1515,18 @@ private static T PopulateException(T exception, bool setHResult = true) exception.Data.Add("secret", true); exception.Data.Add(1, "one"); - // Exceptions are reflection blocked in uapaot - if (!PlatformDetection.IsNetNative) + typeof(Exception) + .GetField("_stackTraceString", BindingFlags.Instance | BindingFlags.NonPublic) + .SetValue(exception, "StackTrace string..."); + if (setHResult) { typeof(Exception) - .GetField("_stackTraceString", BindingFlags.Instance | BindingFlags.NonPublic) - .SetValue(exception, "StackTrace string..."); - if (setHResult) - { - typeof(Exception) - .GetField("_HResult", BindingFlags.Instance | BindingFlags.NonPublic) - .SetValue(exception, 1000); - } - typeof(Exception) - .GetField("_remoteStackTraceString", BindingFlags.Instance | BindingFlags.NonPublic) - .SetValue(exception, "Remote StackTrace string..."); + .GetField("_HResult", BindingFlags.Instance | BindingFlags.NonPublic) + .SetValue(exception, 1000); } + typeof(Exception) + .GetField("_remoteStackTraceString", BindingFlags.Instance | BindingFlags.NonPublic) + .SetValue(exception, "Remote StackTrace string..."); return exception; } diff --git a/src/System.Runtime.Serialization.Formatters/tests/BinaryFormatterTests.cs b/src/System.Runtime.Serialization.Formatters/tests/BinaryFormatterTests.cs index 777d31a3cc95..01cd406b25b3 100644 --- a/src/System.Runtime.Serialization.Formatters/tests/BinaryFormatterTests.cs +++ b/src/System.Runtime.Serialization.Formatters/tests/BinaryFormatterTests.cs @@ -527,7 +527,6 @@ public void Roundtrip_CrossProcess(object obj) [Fact] [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, ".NET Framework fails when serializing arrays with non-zero lower bounds")] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "UAPAOT does not support non-zero lower bounds")] public void Roundtrip_ArrayContainingArrayAtNonZeroLowerBound() { BinaryFormatterHelpers.Clone(Array.CreateInstance(typeof(uint[]), new[] { 5 }, new[] { 1 })); diff --git a/src/System.Runtime.Serialization.Formatters/tests/Configurations.props b/src/System.Runtime.Serialization.Formatters/tests/Configurations.props index 1ca7677506d4..1b68da63e5c8 100644 --- a/src/System.Runtime.Serialization.Formatters/tests/Configurations.props +++ b/src/System.Runtime.Serialization.Formatters/tests/Configurations.props @@ -2,7 +2,7 @@ - netstandard; + uap; netfx; netcoreapp; diff --git a/src/System.Runtime.Serialization.Formatters/tests/EqualityExtensions.cs b/src/System.Runtime.Serialization.Formatters/tests/EqualityExtensions.cs index 6da0dafa1a0f..cd6ef43857e7 100644 --- a/src/System.Runtime.Serialization.Formatters/tests/EqualityExtensions.cs +++ b/src/System.Runtime.Serialization.Formatters/tests/EqualityExtensions.cs @@ -1162,7 +1162,7 @@ @this is SocketException || CheckEquals(@this.InnerException, other.InnerException, isSamePlatform); } - if (!PlatformDetection.IsFullFramework && !PlatformDetection.IsNetNative) + if (!PlatformDetection.IsFullFramework) { // Different by design for those exceptions if (!((@this is NetworkInformationException || @this is SocketException) && !isSamePlatform)) @@ -1186,13 +1186,10 @@ @this is NetworkInformationException || } } - if (!PlatformDetection.IsNetNative) + // Different by design for those exceptions + if (!((@this is NetworkInformationException || @this is SocketException) && !isSamePlatform)) { - // Different by design for those exceptions - if (!((@this is NetworkInformationException || @this is SocketException) && !isSamePlatform)) - { - Assert.Equal(@this.HResult, other.HResult); - } + Assert.Equal(@this.HResult, other.HResult); } } diff --git a/src/System.Runtime.Serialization.Formatters/tests/System.Runtime.Serialization.Formatters.Tests.csproj b/src/System.Runtime.Serialization.Formatters/tests/System.Runtime.Serialization.Formatters.Tests.csproj index 1f248fe4db78..e3e16816b01e 100644 --- a/src/System.Runtime.Serialization.Formatters/tests/System.Runtime.Serialization.Formatters.Tests.csproj +++ b/src/System.Runtime.Serialization.Formatters/tests/System.Runtime.Serialization.Formatters.Tests.csproj @@ -4,7 +4,7 @@ true true true - netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release;netstandard-Debug;netstandard-Release + netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release;uap-Debug;uap-Release diff --git a/src/System.Runtime.Serialization.Json/tests/Configurations.props b/src/System.Runtime.Serialization.Json/tests/Configurations.props index 2260378844bc..26abe8e9c67d 100644 --- a/src/System.Runtime.Serialization.Json/tests/Configurations.props +++ b/src/System.Runtime.Serialization.Json/tests/Configurations.props @@ -1,8 +1,8 @@  - netstandard; - uapaot; + netcoreapp; + uap \ No newline at end of file diff --git a/src/System.Runtime.Serialization.Json/tests/DataContractJsonSerializer.cs b/src/System.Runtime.Serialization.Json/tests/DataContractJsonSerializer.cs index f515f81a76e4..2f6a4912d205 100644 --- a/src/System.Runtime.Serialization.Json/tests/DataContractJsonSerializer.cs +++ b/src/System.Runtime.Serialization.Json/tests/DataContractJsonSerializer.cs @@ -26,12 +26,9 @@ public static partial class DataContractJsonSerializerTests static DataContractJsonSerializerTests() { - if (!PlatformDetection.IsFullFramework) - { - MethodInfo method = typeof(DataContractSerializer).GetMethod(SerializationOptionSetterName, BindingFlags.NonPublic | BindingFlags.Static); - Assert.True(method != null, $"No method named {SerializationOptionSetterName}"); - method.Invoke(null, new object[] { 1 }); - } + MethodInfo method = typeof(DataContractSerializer).GetMethod(SerializationOptionSetterName, BindingFlags.NonPublic | BindingFlags.Static); + Assert.True(method != null, $"No method named {SerializationOptionSetterName}"); + method.Invoke(null, new object[] { 1 }); } #endif [Fact] @@ -159,15 +156,6 @@ public static void DCJS_FloatAsRoot() } [Fact] - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)] - public static void DCJS_FloatAsRoot_NetFramework() - { - Assert.StrictEqual(SerializeAndDeserialize(float.MinValue, "-3.40282347E+38"), float.MinValue); - Assert.StrictEqual(SerializeAndDeserialize(float.MaxValue, "3.40282347E+38"), float.MaxValue); - } - - [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public static void DCJS_FloatAsRoot_NotNetFramework() { Assert.StrictEqual(SerializeAndDeserialize(float.MinValue, "-3.4028235E+38"), float.MinValue); @@ -236,7 +224,6 @@ public static void DCJS_SbyteAsRoot() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Implemented in 4.7. and Xunit runner currently targets 4.6.1.")] public static void DCJS_StringAsRoot() { foreach (string value in new string[] { "abc", " a b ", null, "", " ", "Hello World! 漢 ñ" }) diff --git a/src/System.Runtime.Serialization.Json/tests/ReflectionOnly/Configurations.props b/src/System.Runtime.Serialization.Json/tests/ReflectionOnly/Configurations.props index 2260378844bc..f97cd5ea7a97 100644 --- a/src/System.Runtime.Serialization.Json/tests/ReflectionOnly/Configurations.props +++ b/src/System.Runtime.Serialization.Json/tests/ReflectionOnly/Configurations.props @@ -1,8 +1,8 @@  - netstandard; - uapaot; + netcoreapp; + uap; \ No newline at end of file diff --git a/src/System.Runtime.Serialization.Json/tests/ReflectionOnly/System.Runtime.Serialization.Json.ReflectionOnly.Tests.csproj b/src/System.Runtime.Serialization.Json/tests/ReflectionOnly/System.Runtime.Serialization.Json.ReflectionOnly.Tests.csproj index fd2feed78daa..23736042b379 100644 --- a/src/System.Runtime.Serialization.Json/tests/ReflectionOnly/System.Runtime.Serialization.Json.ReflectionOnly.Tests.csproj +++ b/src/System.Runtime.Serialization.Json/tests/ReflectionOnly/System.Runtime.Serialization.Json.ReflectionOnly.Tests.csproj @@ -2,19 +2,17 @@ $(DefineConstants);ReflectionOnly {C99A835E-46F3-4C05-AD34-7DD84FB7466B} - netstandard-Debug;netstandard-Release;uapaot-Debug;uapaot-Release + netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release - - - + - + \ No newline at end of file diff --git a/src/System.Runtime.Serialization.Json/tests/System.Runtime.Serialization.Json.Tests.csproj b/src/System.Runtime.Serialization.Json/tests/System.Runtime.Serialization.Json.Tests.csproj index feee3b94403f..26aebd3db93f 100644 --- a/src/System.Runtime.Serialization.Json/tests/System.Runtime.Serialization.Json.Tests.csproj +++ b/src/System.Runtime.Serialization.Json/tests/System.Runtime.Serialization.Json.Tests.csproj @@ -1,16 +1,14 @@ {173F6978-B961-4D1C-84E4-06468772D019} - netstandard-Debug;netstandard-Release;uapaot-Debug;uapaot-Release + netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release - + + - - - - + \ No newline at end of file diff --git a/src/System.Runtime.Serialization.Primitives/tests/Configurations.props b/src/System.Runtime.Serialization.Primitives/tests/Configurations.props index 581054d46db4..f97cd5ea7a97 100644 --- a/src/System.Runtime.Serialization.Primitives/tests/Configurations.props +++ b/src/System.Runtime.Serialization.Primitives/tests/Configurations.props @@ -1,7 +1,8 @@  - netstandard; + netcoreapp; + uap; \ No newline at end of file diff --git a/src/System.Runtime.Serialization.Primitives/tests/System.Runtime.Serialization.Primitives.Tests.csproj b/src/System.Runtime.Serialization.Primitives/tests/System.Runtime.Serialization.Primitives.Tests.csproj index 3936e902c196..f6ab086482a0 100644 --- a/src/System.Runtime.Serialization.Primitives/tests/System.Runtime.Serialization.Primitives.Tests.csproj +++ b/src/System.Runtime.Serialization.Primitives/tests/System.Runtime.Serialization.Primitives.Tests.csproj @@ -1,7 +1,7 @@ {43341081-27A8-4CFB-8B89-C63CE457EAC2} - netstandard-Debug;netstandard-Release + netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release diff --git a/src/System.Runtime.Serialization.Xml/tests/Canonicalization/Configurations.props b/src/System.Runtime.Serialization.Xml/tests/Canonicalization/Configurations.props index 5866d421df58..e267827cfa9c 100644 --- a/src/System.Runtime.Serialization.Xml/tests/Canonicalization/Configurations.props +++ b/src/System.Runtime.Serialization.Xml/tests/Canonicalization/Configurations.props @@ -1,7 +1,7 @@  - netstandard; + netcoreapp; uap; diff --git a/src/System.Runtime.Serialization.Xml/tests/Canonicalization/System.Runtime.Serialization.Xml.Canonicalization.csproj b/src/System.Runtime.Serialization.Xml/tests/Canonicalization/System.Runtime.Serialization.Xml.Canonicalization.csproj index 3f0fec6b19ea..721ffd412bf4 100644 --- a/src/System.Runtime.Serialization.Xml/tests/Canonicalization/System.Runtime.Serialization.Xml.Canonicalization.csproj +++ b/src/System.Runtime.Serialization.Xml/tests/Canonicalization/System.Runtime.Serialization.Xml.Canonicalization.csproj @@ -2,7 +2,7 @@ {D3AD82FC-051D-4121-8E48-B13CE8024776} true - netstandard-Debug;netstandard-Release;uap-Debug;uap-Release + netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release diff --git a/src/System.Runtime.Serialization.Xml/tests/Configurations.props b/src/System.Runtime.Serialization.Xml/tests/Configurations.props index 2260378844bc..f97cd5ea7a97 100644 --- a/src/System.Runtime.Serialization.Xml/tests/Configurations.props +++ b/src/System.Runtime.Serialization.Xml/tests/Configurations.props @@ -1,8 +1,8 @@  - netstandard; - uapaot; + netcoreapp; + uap; \ No newline at end of file diff --git a/src/System.Runtime.Serialization.Xml/tests/DataContractSerializer.cs b/src/System.Runtime.Serialization.Xml/tests/DataContractSerializer.cs index d802178fd4b4..aa7e0721ec33 100644 --- a/src/System.Runtime.Serialization.Xml/tests/DataContractSerializer.cs +++ b/src/System.Runtime.Serialization.Xml/tests/DataContractSerializer.cs @@ -29,12 +29,9 @@ public static partial class DataContractSerializerTests static DataContractSerializerTests() { - if (!PlatformDetection.IsFullFramework) - { - MethodInfo method = typeof(DataContractSerializer).GetMethod(SerializationOptionSetterName, BindingFlags.NonPublic | BindingFlags.Static); - Assert.True(method != null, $"No method named {SerializationOptionSetterName}"); - method.Invoke(null, new object[] { 1 }); - } + MethodInfo method = typeof(DataContractSerializer).GetMethod(SerializationOptionSetterName, BindingFlags.NonPublic | BindingFlags.Static); + Assert.True(method != null, $"No method named {SerializationOptionSetterName}"); + method.Invoke(null, new object[] { 1 }); } #endif [Fact] @@ -143,15 +140,6 @@ public static void DCS_FloatAsRoot() } [Fact] - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)] - public static void DCS_FloatAsRoot_NetFramework() - { - Assert.StrictEqual(DataContractSerializerHelper.SerializeAndDeserialize(float.MinValue, @"-3.40282347E+38"), float.MinValue); - Assert.StrictEqual(DataContractSerializerHelper.SerializeAndDeserialize(float.MaxValue, @"3.40282347E+38"), float.MaxValue); - } - - [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public static void DCS_FloatAsRoot_NotNetFramework() { Assert.StrictEqual(DataContractSerializerHelper.SerializeAndDeserialize(float.MinValue, @"-3.4028235E+38"), float.MinValue); @@ -2691,7 +2679,6 @@ static string GenerateaAndGetXPath(Type t, MemberInfo[] mi) } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Full framework has an implementation and does not throw InvalidOperationException")] public static void XsdDataContractExporterTest() { XsdDataContractExporter exporter = new XsdDataContractExporter(); @@ -2843,20 +2830,11 @@ private static void DCS_BasicRoundTripResolvePrimitiveTypes(string baseline) SerializationTestTypes.ComparisonHelper.CompareRecursively(value, actual); } - [Fact] - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)] - public static void DCS_BasicRoundTripResolvePrimitiveTypes_NetFramework() - { - string baseline = @"<_data i:type=""a:PrimitiveContainer_foo"" xmlns:a=""http://www.default.com"">false25506553579228162514264337593543950335-19999-12-31T23:59:59.9999999-792281625142643375935439503354bc848b1-a541-40bf-8aa9-dd6ccb6d0e5610004.94065645841247E-3241.7976931348623157E+308-1.7976931348623157E+3089999-12-31T23:59:59.9999999Z0NaN

-INF

INF01.401298E-45-3.40282347E+38P10675199DT2H48M5.4775807S3.40282347E+38http://www.microsoft.com/NaN-INFINFb:WCF02147483647-214748364809223372036854775807-92233720368547758080127-128032767-32768abc06553500429496729500184467440737095516150AQIDBA==<_data2 i:type=""a:PrimitiveContainer_foo"" xmlns:a=""http://www.default.com"">false25506553579228162514264337593543950335-19999-12-31T23:59:59.9999999-792281625142643375935439503354bc848b1-a541-40bf-8aa9-dd6ccb6d0e5610004.94065645841247E-3241.7976931348623157E+308-1.7976931348623157E+3089999-12-31T23:59:59.9999999Z0NaN

-INF

INF01.401298E-45-3.40282347E+38P10675199DT2H48M5.4775807S3.40282347E+38http://www.microsoft.com/NaN-INFINFb:WCF02147483647-214748364809223372036854775807-92233720368547758080127-128032767-32768abc06553500429496729500184467440737095516150AQIDBA==
"; - DCS_BasicRoundTripResolvePrimitiveTypes(baseline); - } - /// /// Roundtrips a Datacontract type which contains Primitive types assigned to member of type object. /// Resolver is plugged in and resolves the primitive types. Verify resolver called during ser and deser /// [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public static void DCS_BasicRoundTripResolvePrimitiveTypes_NotNetFramework() { string baseline = @"<_data i:type=""a:PrimitiveContainer_foo"" xmlns:a=""http://www.default.com"">false25506553579228162514264337593543950335-19999-12-31T23:59:59.9999999-792281625142643375935439503354bc848b1-a541-40bf-8aa9-dd6ccb6d0e5610005E-3241.7976931348623157E+308-1.7976931348623157E+3089999-12-31T23:59:59.9999999Z0NaN

-INF

INF01E-45-3.4028235E+38P10675199DT2H48M5.4775807S3.4028235E+38http://www.microsoft.com/NaN-INFINFb:WCF02147483647-214748364809223372036854775807-92233720368547758080127-128032767-32768abc06553500429496729500184467440737095516150AQIDBA==<_data2 i:type=""a:PrimitiveContainer_foo"" xmlns:a=""http://www.default.com"">false25506553579228162514264337593543950335-19999-12-31T23:59:59.9999999-792281625142643375935439503354bc848b1-a541-40bf-8aa9-dd6ccb6d0e5610005E-3241.7976931348623157E+308-1.7976931348623157E+3089999-12-31T23:59:59.9999999Z0NaN

-INF

INF01E-45-3.4028235E+38P10675199DT2H48M5.4775807S3.4028235E+38http://www.microsoft.com/NaN-INFINFb:WCF02147483647-214748364809223372036854775807-92233720368547758080127-128032767-32768abc06553500429496729500184467440737095516150AQIDBA==
"; @@ -3851,16 +3829,6 @@ public static void DCS_BasicPerSerializerRoundTripAndCompare_EnumStruct() } [Fact] - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)] - public static void DCS_BasicPerSerializerRoundTripAndCompare_EnumStruct_NetFramework() - { - TestObjectInObjectContainerWithSimpleResolver(new SerializationTestTypes.AllTypes(), "<_data i:type=\"a:SerializationTestTypes.AllTypes***\" xmlns:a=\"http://schemas.datacontract.org/2004/07/SerializationTestTypes.AllTypes***\">false25506553579228162514264337593543950335redred-10001-01-01T00:00:00-792281625142643375935439503355642b5d2-87c3-a724-2390-997062f3f7a210004.94065645841247E-3241.7976931348623157E+308-1.7976931348623157E+3089999-12-31T23:59:59.9999999Z0NaN

-INF

INF01.401298E-45-3.40282347E+38P10675199DT2H48M5.4775807S3.40282347E+38http://www.microsoft.com/NaNData-INFINFb:WCF02147483647-214748364809223372036854775807-92233720368547758080127-128032767-32768abc06553500429496729500184467440737095516150<_data2 i:type=\"a:SerializationTestTypes.AllTypes***\" xmlns:a=\"http://schemas.datacontract.org/2004/07/SerializationTestTypes.AllTypes***\">false25506553579228162514264337593543950335redred-10001-01-01T00:00:00-792281625142643375935439503355642b5d2-87c3-a724-2390-997062f3f7a210004.94065645841247E-3241.7976931348623157E+308-1.7976931348623157E+3089999-12-31T23:59:59.9999999Z0NaN

-INF

INF01.401298E-45-3.40282347E+38P10675199DT2H48M5.4775807S3.40282347E+38http://www.microsoft.com/NaNData-INFINFb:WCF02147483647-214748364809223372036854775807-92233720368547758080127-128032767-32768abc06553500429496729500184467440737095516150
"); - - TestObjectInObjectContainerWithSimpleResolver(new SerializationTestTypes.AllTypes2(), "<_data i:type=\"a:SerializationTestTypes.AllTypes2***\" xmlns:a=\"http://schemas.datacontract.org/2004/07/SerializationTestTypes.AllTypes2***\">false25506553579228162514264337593543950335redred-10001-01-01T00:00:00-79228162514264337593543950335cac76333-577f-7e1f-0389-789b0d97f39510004.94065645841247E-3241.7976931348623157E+308-1.7976931348623157E+3089999-12-31T23:59:59.9999999Z0NaN

-INF

INF01.401298E-45-3.40282347E+38P10675199DT2H48M5.4775807S3.40282347E+38http://www.microsoft.com/NaNData-INFINFb:WCF02147483647-214748364809223372036854775807-92233720368547758080127-128032767-32768abc06553500429496729500184467440737095516150<_data2 i:type=\"a:SerializationTestTypes.AllTypes2***\" xmlns:a=\"http://schemas.datacontract.org/2004/07/SerializationTestTypes.AllTypes2***\">false25506553579228162514264337593543950335redred-10001-01-01T00:00:00-79228162514264337593543950335cac76333-577f-7e1f-0389-789b0d97f39510004.94065645841247E-3241.7976931348623157E+308-1.7976931348623157E+3089999-12-31T23:59:59.9999999Z0NaN

-INF

INF01.401298E-45-3.40282347E+38P10675199DT2H48M5.4775807S3.40282347E+38http://www.microsoft.com/NaNData-INFINFb:WCF02147483647-214748364809223372036854775807-92233720368547758080127-128032767-32768abc06553500429496729500184467440737095516150
"); - } - - [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public static void DCS_BasicPerSerializerRoundTripAndCompare_EnumStruct_NotNetFramework() { TestObjectInObjectContainerWithSimpleResolver(new SerializationTestTypes.AllTypes(), "<_data i:type=\"a:SerializationTestTypes.AllTypes***\" xmlns:a=\"http://schemas.datacontract.org/2004/07/SerializationTestTypes.AllTypes***\">false25506553579228162514264337593543950335redred-10001-01-01T00:00:00-792281625142643375935439503355642b5d2-87c3-a724-2390-997062f3f7a210005E-3241.7976931348623157E+308-1.7976931348623157E+3089999-12-31T23:59:59.9999999Z0NaN

-INF

INF01E-45-3.4028235E+38P10675199DT2H48M5.4775807S3.4028235E+38http://www.microsoft.com/NaNData-INFINFb:WCF02147483647-214748364809223372036854775807-92233720368547758080127-128032767-32768abc06553500429496729500184467440737095516150<_data2 i:type=\"a:SerializationTestTypes.AllTypes***\" xmlns:a=\"http://schemas.datacontract.org/2004/07/SerializationTestTypes.AllTypes***\">false25506553579228162514264337593543950335redred-10001-01-01T00:00:00-792281625142643375935439503355642b5d2-87c3-a724-2390-997062f3f7a210005E-3241.7976931348623157E+308-1.7976931348623157E+3089999-12-31T23:59:59.9999999Z0NaN

-INF

INF01E-45-3.4028235E+38P10675199DT2H48M5.4775807S3.4028235E+38http://www.microsoft.com/NaNData-INFINFb:WCF02147483647-214748364809223372036854775807-92233720368547758080127-128032767-32768abc06553500429496729500184467440737095516150
"); @@ -4046,8 +4014,6 @@ public static void DCS_TypeWithCollectionAndDateTimeOffset() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Full framework throws InvalidDataContractException.")] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "dotnet-corefx #22974")] public static void DCS_TypeWithCollectionAndDateTimeOffset_ListIsNull() { // Adding offsetMinutes so the DateTime component in serialized strings are time-zone independent diff --git a/src/System.Runtime.Serialization.Xml/tests/ReflectionOnly/Configurations.props b/src/System.Runtime.Serialization.Xml/tests/ReflectionOnly/Configurations.props index 2260378844bc..f97cd5ea7a97 100644 --- a/src/System.Runtime.Serialization.Xml/tests/ReflectionOnly/Configurations.props +++ b/src/System.Runtime.Serialization.Xml/tests/ReflectionOnly/Configurations.props @@ -1,8 +1,8 @@  - netstandard; - uapaot; + netcoreapp; + uap; \ No newline at end of file diff --git a/src/System.Runtime.Serialization.Xml/tests/ReflectionOnly/System.Runtime.Serialization.Xml.ReflectionOnly.Tests.csproj b/src/System.Runtime.Serialization.Xml/tests/ReflectionOnly/System.Runtime.Serialization.Xml.ReflectionOnly.Tests.csproj index 265eea817244..7480d8110ee5 100644 --- a/src/System.Runtime.Serialization.Xml/tests/ReflectionOnly/System.Runtime.Serialization.Xml.ReflectionOnly.Tests.csproj +++ b/src/System.Runtime.Serialization.Xml/tests/ReflectionOnly/System.Runtime.Serialization.Xml.ReflectionOnly.Tests.csproj @@ -2,7 +2,7 @@ $(DefineConstants);ReflectionOnly {38889701-0af4-48b3-999c-e99d639c61b6} - netstandard-Debug;netstandard-Release;uapaot-Debug;uapaot-Release + netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release @@ -13,6 +13,8 @@ + + Common\System\IO\TempFile.cs @@ -62,11 +64,7 @@ SerializationTestTypes\SelfRefAndCycles.cs - - - - - +
\ No newline at end of file diff --git a/src/System.Runtime.Serialization.Xml/tests/System.Runtime.Serialization.Xml.Tests.csproj b/src/System.Runtime.Serialization.Xml/tests/System.Runtime.Serialization.Xml.Tests.csproj index f85cadc42755..f3797584a279 100644 --- a/src/System.Runtime.Serialization.Xml/tests/System.Runtime.Serialization.Xml.Tests.csproj +++ b/src/System.Runtime.Serialization.Xml/tests/System.Runtime.Serialization.Xml.Tests.csproj @@ -1,7 +1,7 @@ {30CAB353-089E-4294-B23B-F2DD1D945654} - netstandard-Debug;netstandard-Release;uapaot-Debug;uapaot-Release + netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release @@ -16,6 +16,8 @@ + + Common\System\IO\TempFile.cs @@ -33,11 +35,7 @@ - - - - - + \ No newline at end of file diff --git a/src/System.Runtime.Serialization.Xml/tests/XmlDictionaryWriterTest.cs b/src/System.Runtime.Serialization.Xml/tests/XmlDictionaryWriterTest.cs index d27f931d9c5c..cf86659a7ce2 100644 --- a/src/System.Runtime.Serialization.Xml/tests/XmlDictionaryWriterTest.cs +++ b/src/System.Runtime.Serialization.Xml/tests/XmlDictionaryWriterTest.cs @@ -63,7 +63,6 @@ public static void XmlBaseWriter_WriteBinHex() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Async APIs are available on NetCore only")] public static void XmlBaseWriter_FlushAsync() { string actual = null; @@ -117,7 +116,6 @@ public static void XmlBaseWriter_FlushAsync() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Async APIs are available on NetCore only")] public static void XmlBaseWriter_WriteStartEndElementAsync() { string actual; @@ -145,7 +143,6 @@ public static void XmlBaseWriter_WriteStartEndElementAsync() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Async APIs are available on NetCore only")] public static void XmlBaseWriter_CheckAsync_ThrowInvalidOperationException() { int byteSize = 1024; @@ -191,7 +188,6 @@ public static void XmlDictionaryWriter_InvalidUnicodeChar() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "is implemented on full framework")] public static void CreateMtomReaderWriter_Throw_PNSE() { using (var stream = new MemoryStream()) @@ -314,7 +310,6 @@ public static void IXmlTextReaderInitializerTest() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "is implemented on full framework")] public static void FragmentTest() { string rwTypeStr = "Text"; diff --git a/src/System.Runtime.WindowsRuntime/tests/System/IO/CreateSafeFileHandleTests.cs b/src/System.Runtime.WindowsRuntime/tests/System/IO/CreateSafeFileHandleTests.cs index 6f54105e5f98..7d6876cfdbb8 100644 --- a/src/System.Runtime.WindowsRuntime/tests/System/IO/CreateSafeFileHandleTests.cs +++ b/src/System.Runtime.WindowsRuntime/tests/System/IO/CreateSafeFileHandleTests.cs @@ -8,7 +8,6 @@ namespace System.IO { - [ActiveIssue("https://github.com/dotnet/corefx/issues/18940", TargetFrameworkMonikers.UapAot)] public class CreateSafeFileHandleTests { [Fact] diff --git a/src/System.Runtime.WindowsRuntime/tests/Windows/Foundation/RectTests.cs b/src/System.Runtime.WindowsRuntime/tests/Windows/Foundation/RectTests.cs index e16d63199786..1bcd465e503d 100644 --- a/src/System.Runtime.WindowsRuntime/tests/Windows/Foundation/RectTests.cs +++ b/src/System.Runtime.WindowsRuntime/tests/Windows/Foundation/RectTests.cs @@ -53,7 +53,6 @@ public void Ctor_X_Y_Width_Height(double x, double y, double width, double heigh [Theory] [InlineData(-1)] [InlineData(double.NegativeInfinity)] - [ActiveIssue(21704, TargetFrameworkMonikers.UapAot)] public void Ctor_NegativeWidth_ThrowsArgumentOutOfRangeException(double width) { AssertExtensions.Throws("width", () => new Rect(1, 1, width, 1)); @@ -62,7 +61,6 @@ public void Ctor_NegativeWidth_ThrowsArgumentOutOfRangeException(double width) [Theory] [InlineData(-1)] [InlineData(double.NegativeInfinity)] - [ActiveIssue(21704, TargetFrameworkMonikers.UapAot)] public void Ctor_NegativeHeight_ThrowsArgumentOutOfRangeException(double height) { AssertExtensions.Throws("height", () => new Rect(1, 1, 1, height)); @@ -167,7 +165,6 @@ public void Width_SetValid_GetReturnsExpected(double width, double expectedWidth [Theory] [InlineData(-1)] [InlineData(double.NegativeInfinity)] - [ActiveIssue(21704, TargetFrameworkMonikers.UapAot)] public void Width_SetNegative_ThrowsArgumentOutOfRangeException(double width) { var rect = new Rect(); @@ -185,7 +182,6 @@ public void Height_SetValid_GetReturnsExpected(double height, double expectedHei [Theory] [InlineData(-1)] [InlineData(double.NegativeInfinity)] - [ActiveIssue(21704, TargetFrameworkMonikers.UapAot)] public void Height_SetNegative_ThrowsArgumentOutOfRangeException(double height) { var rect = new Rect(); diff --git a/src/System.Runtime.WindowsRuntime/tests/Windows/Foundation/SizeTests.cs b/src/System.Runtime.WindowsRuntime/tests/Windows/Foundation/SizeTests.cs index 7c65578cf47c..de4f040f6036 100644 --- a/src/System.Runtime.WindowsRuntime/tests/Windows/Foundation/SizeTests.cs +++ b/src/System.Runtime.WindowsRuntime/tests/Windows/Foundation/SizeTests.cs @@ -38,7 +38,6 @@ public void Ctor_Width_Height(double width, double height, double expectedWidth, [Theory] [InlineData(-1)] [InlineData(double.NegativeInfinity)] - [ActiveIssue(21704, TargetFrameworkMonikers.UapAot)] public void Ctor_NegativeWidth_ThrowsArgumentOutOfRangeException(double width) { AssertExtensions.Throws("width", () => new Size(width, 1)); @@ -47,7 +46,6 @@ public void Ctor_NegativeWidth_ThrowsArgumentOutOfRangeException(double width) [Theory] [InlineData(-1)] [InlineData(double.NegativeInfinity)] - [ActiveIssue(21704, TargetFrameworkMonikers.UapAot)] public void Ctor_NegativeHeight_ThrowsArgumentOutOfRangeException(double height) { AssertExtensions.Throws("height", () => new Size(1, height)); @@ -67,7 +65,6 @@ public void Width_SetValid_GetReturnsExpected(double width) [Theory] [InlineData(-1)] [InlineData(double.NegativeInfinity)] - [ActiveIssue(21704, TargetFrameworkMonikers.UapAot)] public void Width_SetNegative_ThrowsArgumentOutOfRangeException(double width) { var size = new Size(); @@ -88,7 +85,6 @@ public void Height_SetValid_GetReturnsExpected(double height) [Theory] [InlineData(-1)] [InlineData(double.NegativeInfinity)] - [ActiveIssue(21704, TargetFrameworkMonikers.UapAot)] public void Height_SetNegative_ThrowsArgumentOutOfRangeException(double height) { var size = new Size(); diff --git a/src/System.Runtime/tests/Configurations.props b/src/System.Runtime/tests/Configurations.props index af7d10ae81d9..08c38c280c2b 100644 --- a/src/System.Runtime/tests/Configurations.props +++ b/src/System.Runtime/tests/Configurations.props @@ -3,10 +3,7 @@ netcoreapp-Windows_NT; netcoreapp-Unix; - netstandard; - netfx; uap; - uapaot;
\ No newline at end of file diff --git a/src/System.Runtime/tests/System.Runtime.Tests.csproj b/src/System.Runtime/tests/System.Runtime.Tests.csproj index b6bac3673ed2..bc3b39a3f250 100644 --- a/src/System.Runtime/tests/System.Runtime.Tests.csproj +++ b/src/System.Runtime/tests/System.Runtime.Tests.csproj @@ -5,7 +5,7 @@ 1718 true true - netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netfx-Debug;netfx-Release;netstandard-Debug;netstandard-Release;uap-Debug;uap-Release;uapaot-Debug;uapaot-Release + netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Debug;uap-Release @@ -233,7 +233,7 @@ - + @@ -272,7 +272,7 @@ - + @@ -307,11 +307,6 @@ - - - System\SpanExtensions.netstandard.cs - - Common\System\Collections\IEnumerable.Generic.Serialization.Tests.cs @@ -339,7 +334,4 @@ - - - \ No newline at end of file diff --git a/src/System.Runtime/tests/System/ActivatorTests.cs b/src/System.Runtime/tests/System/ActivatorTests.cs index b3e97c42ef4c..5ee7803271d4 100644 --- a/src/System.Runtime/tests/System/ActivatorTests.cs +++ b/src/System.Runtime/tests/System/ActivatorTests.cs @@ -119,7 +119,7 @@ public static void CreateInstance_MultipleMatchingConstructors_ThrowsAmbiguousMa Assert.Throws(() => Activator.CreateInstance(typeof(Choice1), new object[] { null })); } -#if netcoreapp || uapaot +#if netcoreapp [Fact] public void CreateInstance_NotRuntimeType_ThrowsArgumentException() { @@ -130,7 +130,7 @@ public void CreateInstance_NotRuntimeType_ThrowsArgumentException() AssertExtensions.Throws("type", () => Activator.CreateInstance(nonRuntimeType, new object[0])); } } -#endif // netcoreapp || uapaot +#endif // netcoreapp public static IEnumerable CreateInstance_ContainsGenericParameters_TestData() { @@ -227,16 +227,7 @@ public void CreateInstance_BoxedByRefType_ThrowsNotSupportedException(Type type) [Fact] public void CreateInstance_Span_ThrowsNotSupportedException() { - // Move to test data for CreateInstance_BoxedByRefType_ThrowsNotSupportedException - // if .NET Framework recognizes Span as an intrinsic. - if (PlatformDetection.IsFullFramework) - { - Assert.NotNull(Activator.CreateInstance(typeof(Span))); - } - else - { - CreateInstance_BoxedByRefType_ThrowsNotSupportedException(typeof(Span)); - } + CreateInstance_BoxedByRefType_ThrowsNotSupportedException(typeof(Span)); } [Fact] @@ -245,16 +236,6 @@ public void CreateInstance_InterfaceType_ThrowsMissingMemberException() Assert.ThrowsAny(() => Activator.CreateInstance(typeof(IInterfaceType))); } - [Theory] - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework, "Activation Attributes are not supported in .NET Core.")] - [InlineData(typeof(MarshalByRefObject))] - [InlineData(typeof(SubMarshalByRefObject))] - public void CreateInstance_MarshalByRefObjectNetFramework_ThrowsNotSupportedException(Type type) - { - Assert.Throws(() => Activator.CreateInstance(type, null, new object[] { 1 } )); - Assert.Throws(() => Activator.CreateInstance(type, null, new object[] { 1, 2 } )); - } - public class SubMarshalByRefObject : MarshalByRefObject { } @@ -585,7 +566,6 @@ public static void TestingBindingFlags1() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public static void TestingActivationAttributes() { Assert.Throws(() => Activator.CreateInstance(typeof(ClassWithIsTestedAttribute), null, new object[] { new object() })); diff --git a/src/System.Runtime/tests/System/ActivatorTests.netcoreapp.cs b/src/System.Runtime/tests/System/ActivatorTests.netcoreapp.cs index 9c724fb22da7..3b74e6468380 100644 --- a/src/System.Runtime/tests/System/ActivatorTests.netcoreapp.cs +++ b/src/System.Runtime/tests/System/ActivatorTests.netcoreapp.cs @@ -276,29 +276,5 @@ public void CreateInstance_TypeBuilder_ThrowsNotSupportedException() Assert.Throws("type", () => Activator.CreateInstance(typeBuilder)); Assert.Throws(() => Activator.CreateInstance(typeBuilder, new object[0])); } - - [Fact] - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework, "AssemblyBuilderAccess.ReflectionOnly is not supported in .NET Core")] - public void CreateInstance_ReflectionOnlyType_ThrowsInvalidOperationException() - { - AssemblyName assemblyName = new AssemblyName("Assembly"); - AssemblyBuilder assemblyBuilder = AssemblyBuilder.DefineDynamicAssembly(assemblyName, (AssemblyBuilderAccess)6); - ModuleBuilder moduleBuilder = assemblyBuilder.DefineDynamicModule("Module"); - TypeBuilder typeBuilder = moduleBuilder.DefineType("Type", TypeAttributes.Public); - - Assert.Throws(() => Activator.CreateInstance(typeBuilder.CreateType())); - } - - [Fact] - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework, "AssemblyBuilderAccess.Save is not supported in .NET Core")] - public void CreateInstance_DynamicTypeWithoutRunAccess_ThrowsNotSupportedException() - { - AssemblyName assemblyName = new AssemblyName("Assembly"); - AssemblyBuilder assemblyBuilder = AssemblyBuilder.DefineDynamicAssembly(assemblyName, (AssemblyBuilderAccess)2); - ModuleBuilder moduleBuilder = assemblyBuilder.DefineDynamicModule("Module"); - TypeBuilder typeBuilder = moduleBuilder.DefineType("Type", TypeAttributes.Public); - - Assert.Throws(() => Activator.CreateInstance(typeBuilder.CreateType())); - } } } diff --git a/src/System.Runtime/tests/System/ArgIteratorTests.netcoreapp.cs b/src/System.Runtime/tests/System/ArgIteratorTests.netcoreapp.cs index 6c9fc13e9f0b..2c15e2fdf871 100644 --- a/src/System.Runtime/tests/System/ArgIteratorTests.netcoreapp.cs +++ b/src/System.Runtime/tests/System/ArgIteratorTests.netcoreapp.cs @@ -8,7 +8,6 @@ namespace System.Tests { - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "varargs calling convention not supported on .NET Native")] public static class ArgIteratorTests { [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsArgIteratorSupported))] diff --git a/src/System.Runtime/tests/System/ArrayTests.cs b/src/System.Runtime/tests/System/ArrayTests.cs index e3a3f7c4be3b..7ea3c94703e9 100644 --- a/src/System.Runtime/tests/System/ArrayTests.cs +++ b/src/System.Runtime/tests/System/ArrayTests.cs @@ -1053,12 +1053,7 @@ public static IEnumerable Copy_SZArray_Reliable_TestData() yield return new object[] { new Int32Enum[] { (Int32Enum)1, (Int32Enum)2, (Int32Enum)3 }, 1, new Int32Enum[] { (Int32Enum)1, (Int32Enum)2, (Int32Enum)3, (Int32Enum)4, (Int32Enum)5 }, 2, 2, new Int32Enum[] { (Int32Enum)1, (Int32Enum)2, (Int32Enum)2, (Int32Enum)3, (Int32Enum)5 } }; yield return new object[] { new Int32Enum[] { (Int32Enum)1 }, 0, new int[1], 0, 1, new int[] { 1 } }; - // The full .NET Framework disallows int -> enum conversions - // See https://github.com/dotnet/corefx/issues/13816. - if (!PlatformDetection.IsFullFramework) - { - yield return new object[] { new int[1] { 2 }, 0, new Int32Enum[1], 0, 1, new Int32Enum[] { (Int32Enum)2 } }; - } + yield return new object[] { new int[1] { 2 }, 0, new Int32Enum[1], 0, 1, new Int32Enum[] { (Int32Enum)2 } }; // Misc yield return new object[] { new int[] { 0x12345678, 0x22334455, 0x778899aa }, 0, new int[3], 0, 3, new int[] { 0x12345678, 0x22334455, 0x778899aa } }; @@ -1544,7 +1539,6 @@ public static void Copy_SourceAndDestinationNeverConvertible_ThrowsArrayTypeMism } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "The full .NET framework has a bug and incorrectly allows copying between void* and object")] public static void Copy_SourceAndDestinationPointers_ThrowsArrayTypeMismatchException() { unsafe @@ -3172,14 +3166,12 @@ public static void Reverse_MultidimensionalArray_ThrowsRankException() [Theory] [InlineData(0)] [InlineData(-1)] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Non-zero lower-bounded arrays not supported on UapAot")] public static void Reverse_IndexLessThanLowerBound_ThrowsArgumentOutOfRangeException(int lowerBound) { AssertExtensions.Throws("index", () => Array.Reverse(NonZeroLowerBoundArray(new int[0], lowerBound), lowerBound - 1, 0)); } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Non-zero lower-bounded arrays not supported on UapAot")] public static void Reverse_IndexLessThanPositiveLowerBound_ThrowsArgumentOutOfRangeException() { AssertExtensions.Throws("index", "length", () => Array.Reverse(NonZeroLowerBoundArray(new int[0], 1), 0, 0)); diff --git a/src/System.Runtime/tests/System/AttributeTests.cs b/src/System.Runtime/tests/System/AttributeTests.cs index 2c166d1cb005..02f53df1926e 100644 --- a/src/System.Runtime/tests/System/AttributeTests.cs +++ b/src/System.Runtime/tests/System/AttributeTests.cs @@ -40,16 +40,16 @@ public static void DefaultEquality() // to fix a bug where an instance of a subclass of an attribute can // be equal to an instance of the parent class. // See https://github.com/dotnet/coreclr/pull/6240 - Assert.Equal(PlatformDetection.IsFullFramework, d1.Equals(d2)); - Assert.Equal(PlatformDetection.IsFullFramework, d2.Equals(d3)); + Assert.Equal(false, d1.Equals(d2)); + Assert.Equal(false, d2.Equals(d3)); Assert.Equal(d1, d3); - Assert.Equal(PlatformDetection.IsFullFramework, s1.Equals(s2)); - Assert.Equal(PlatformDetection.IsFullFramework, s2.Equals(s3)); + Assert.Equal(false, s1.Equals(s2)); + Assert.Equal(false, s2.Equals(s3)); Assert.Equal(s1, s3); - Assert.Equal(PlatformDetection.IsFullFramework, f1.Equals(f2)); - Assert.Equal(PlatformDetection.IsFullFramework, f2.Equals(f3)); + Assert.Equal(false, f1.Equals(f2)); + Assert.Equal(false, f2.Equals(f3)); Assert.Equal(f1, f3); Assert.NotEqual(d1, a1); @@ -112,29 +112,29 @@ public static void DefaultHashCode() // to fix a bug where the hash code of a subclass of an attribute can // be equal to an instance of the parent class. // See https://github.com/dotnet/coreclr/pull/6240 - Assert.Equal(PlatformDetection.IsFullFramework, s1.GetHashCode().Equals(s2.GetHashCode())); - Assert.Equal(PlatformDetection.IsFullFramework, s2.GetHashCode().Equals(s3.GetHashCode())); + Assert.Equal(false, s1.GetHashCode().Equals(s2.GetHashCode())); + Assert.Equal(false, s2.GetHashCode().Equals(s3.GetHashCode())); Assert.Equal(s1.GetHashCode(), s3.GetHashCode()); - Assert.Equal(PlatformDetection.IsFullFramework, d1.GetHashCode().Equals(d2.GetHashCode())); - Assert.Equal(PlatformDetection.IsFullFramework, d2.GetHashCode().Equals(d3.GetHashCode())); + Assert.Equal(false, d1.GetHashCode().Equals(d2.GetHashCode())); + Assert.Equal(false, d2.GetHashCode().Equals(d3.GetHashCode())); Assert.Equal(d1.GetHashCode(), d3.GetHashCode()); Assert.Equal(f1.GetHashCode(), f2.GetHashCode()); Assert.Equal(f2.GetHashCode(), f3.GetHashCode()); Assert.Equal(f1.GetHashCode(), f3.GetHashCode()); - Assert.Equal(!PlatformDetection.IsFullFramework, d1.GetHashCode().Equals(a1.GetHashCode())); - Assert.Equal(!PlatformDetection.IsFullFramework, d2.GetHashCode().Equals(a2.GetHashCode())); - Assert.Equal(!PlatformDetection.IsFullFramework, d3.GetHashCode().Equals(a3.GetHashCode())); - Assert.Equal(!PlatformDetection.IsFullFramework, d1.GetHashCode().Equals(a3.GetHashCode())); - Assert.Equal(!PlatformDetection.IsFullFramework, d3.GetHashCode().Equals(a1.GetHashCode())); + Assert.Equal(true, d1.GetHashCode().Equals(a1.GetHashCode())); + Assert.Equal(true, d2.GetHashCode().Equals(a2.GetHashCode())); + Assert.Equal(true, d3.GetHashCode().Equals(a3.GetHashCode())); + Assert.Equal(true, d1.GetHashCode().Equals(a3.GetHashCode())); + Assert.Equal(true, d3.GetHashCode().Equals(a1.GetHashCode())); - Assert.Equal(!PlatformDetection.IsFullFramework, d1.GetHashCode().Equals(s1.GetHashCode())); - Assert.Equal(!PlatformDetection.IsFullFramework, d2.GetHashCode().Equals(s2.GetHashCode())); - Assert.Equal(!PlatformDetection.IsFullFramework, d3.GetHashCode().Equals(s3.GetHashCode())); - Assert.Equal(!PlatformDetection.IsFullFramework, d1.GetHashCode().Equals(s3.GetHashCode())); - Assert.Equal(!PlatformDetection.IsFullFramework, d3.GetHashCode().Equals(s1.GetHashCode())); + Assert.Equal(true, d1.GetHashCode().Equals(s1.GetHashCode())); + Assert.Equal(true, d2.GetHashCode().Equals(s2.GetHashCode())); + Assert.Equal(true, d3.GetHashCode().Equals(s3.GetHashCode())); + Assert.Equal(true, d1.GetHashCode().Equals(s3.GetHashCode())); + Assert.Equal(true, d3.GetHashCode().Equals(s1.GetHashCode())); Assert.NotEqual(f1.GetHashCode(), a1.GetHashCode()); Assert.NotEqual(f2.GetHashCode(), a2.GetHashCode()); @@ -157,7 +157,6 @@ class ChildAttributeWithField : ParentAttribute [Fact] [StringValue("\uDFFF")] - [ActiveIssue("TFS 437293 - Invalid Utf8 string in custom attribute argument falls back to wrong value.", TargetFrameworkMonikers.UapAot)] public static void StringArgument_InvalidCodeUnits_FallbackUsed() { MethodInfo thisMethod = typeof(AttributeTests).GetTypeInfo().GetDeclaredMethod("StringArgument_InvalidCodeUnits_FallbackUsed"); diff --git a/src/System.Runtime/tests/System/Attributes.cs b/src/System.Runtime/tests/System/Attributes.cs index 4fb34d9c333c..484d05da7f3d 100644 --- a/src/System.Runtime/tests/System/Attributes.cs +++ b/src/System.Runtime/tests/System/Attributes.cs @@ -211,7 +211,6 @@ public static class GetCustomAttribute { [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "CustomAttributes on Modules not supported in UapAot")] public static void customAttributeCount() { List customAttributes = typeof(GetCustomAttribute).Module.CustomAttributes.ToList(); @@ -381,7 +380,6 @@ public static void NegTest4() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "CustomAttributes on Modules not supported in UapAot")] public static void PositiveTest5() { Type clsType = typeof(GetCustomAttribute); @@ -414,7 +412,6 @@ public static void NegTest5() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "CustomAttributes on Modules not supported in UapAot")] public static void PositiveTest6() { Type clsType = typeof(GetCustomAttribute); diff --git a/src/System.Runtime/tests/System/BadImageFormatExceptionTests.cs b/src/System.Runtime/tests/System/BadImageFormatExceptionTests.cs index d9a923e06a3d..497f515f6e1c 100644 --- a/src/System.Runtime/tests/System/BadImageFormatExceptionTests.cs +++ b/src/System.Runtime/tests/System/BadImageFormatExceptionTests.cs @@ -59,7 +59,6 @@ public static void Ctor_String_String_Exception() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Exception strings not guaranteed on UapAot.")] public static void ToStringTest() { string message = "this is not the file you're looking for"; diff --git a/src/System.Runtime/tests/System/ComponentModel/DefaultValueAttributeTests.cs b/src/System.Runtime/tests/System/ComponentModel/DefaultValueAttributeTests.cs index a7e82d0877e6..3ad2a9b67141 100644 --- a/src/System.Runtime/tests/System/ComponentModel/DefaultValueAttributeTests.cs +++ b/src/System.Runtime/tests/System/ComponentModel/DefaultValueAttributeTests.cs @@ -68,8 +68,6 @@ public static void Ctor_CustomTypeConverter() [Theory] [InlineData(typeof(CustomType), true, "", 0)] [InlineData(typeof(int), false, "42", 42)] - // On NetFramework will fail because there isn't fallback code, only call to TypeDescriptor.GetConverter - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public void Ctor_TypeDescriptorNotFound_ExceptionFallback(Type type, bool returnNull, string stringToConvert, int expectedValue) { RemoteExecutor.Invoke((innerType, innerReturnNull, innerStringToConvert, innerExpectedValue) => diff --git a/src/System.Runtime/tests/System/DateTimeOffsetTests.cs b/src/System.Runtime/tests/System/DateTimeOffsetTests.cs index 6cd02951da6c..cd6e29a7a1f9 100644 --- a/src/System.Runtime/tests/System/DateTimeOffsetTests.cs +++ b/src/System.Runtime/tests/System/DateTimeOffsetTests.cs @@ -817,7 +817,6 @@ public static void TryParse_String_FormatProvider_DateTimeStyles_G() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "The full .NET framework has a bug and incorrectly parses this date")] public static void TryParse_TimeDesignators_NetCore() { DateTimeOffset result; @@ -836,26 +835,6 @@ public static void TryParse_TimeDesignators_NetCore() Assert.Equal(0, result.Second); } - [Fact] - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework, "The coreclr fixed a bug where the .NET framework incorrectly parses this date")] - public static void TryParse_TimeDesignators_Netfx() - { - DateTimeOffset result; - Assert.True(DateTimeOffset.TryParse("4/21 5am", new CultureInfo("en-US"), DateTimeStyles.None, out result)); - Assert.Equal(DateTimeOffset.Now.Month, result.Month); - Assert.Equal(DateTimeOffset.Now.Day, result.Day); - Assert.Equal(4, result.Hour); - Assert.Equal(0, result.Minute); - Assert.Equal(0, result.Second); - - Assert.True(DateTimeOffset.TryParse("4/21 5pm", new CultureInfo("en-US"), DateTimeStyles.None, out result)); - Assert.Equal(DateTimeOffset.Now.Month, result.Month); - Assert.Equal(DateTimeOffset.Now.Day, result.Day); - Assert.Equal(16, result.Hour); - Assert.Equal(0, result.Minute); - Assert.Equal(0, result.Second); - } - public static IEnumerable StandardFormatSpecifiers() => DateTimeTests.StandardFormatSpecifiers() .Where(a => !a[0].Equals("U")); // "U" isn't supported by DateTimeOffset diff --git a/src/System.Runtime/tests/System/DateTimeTests.cs b/src/System.Runtime/tests/System/DateTimeTests.cs index 1212c80139cc..4b2aa5991da7 100644 --- a/src/System.Runtime/tests/System/DateTimeTests.cs +++ b/src/System.Runtime/tests/System/DateTimeTests.cs @@ -1130,7 +1130,6 @@ public static void TryParse_String_FormatProvider_DateTimeStyles_G() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "The full .NET framework has a bug and incorrectly parses this date")] public static void TryParse_TimeDesignators_NetCore() { DateTime result; @@ -1145,26 +1144,6 @@ public static void TryParse_TimeDesignators_NetCore() Assert.Equal(17, result.Hour); } - [Fact] - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework, "The coreclr fixed a bug where the .NET framework incorrectly parses this date")] - public static void TryParse_TimeDesignators_Netfx() - { - DateTime result; - Assert.True(DateTime.TryParse("4/21 5am", new CultureInfo("en-US"), DateTimeStyles.None, out result)); - Assert.Equal(DateTime.Now.Month, result.Month); - Assert.Equal(DateTime.Now.Day, result.Day); - Assert.Equal(4, result.Hour); - Assert.Equal(0, result.Minute); - Assert.Equal(0, result.Second); - - Assert.True(DateTime.TryParse("4/21 5pm", new CultureInfo("en-US"), DateTimeStyles.None, out result)); - Assert.Equal(DateTime.Now.Month, result.Month); - Assert.Equal(DateTime.Now.Day, result.Day); - Assert.Equal(16, result.Hour); - Assert.Equal(0, result.Minute); - Assert.Equal(0, result.Second); - } - public static IEnumerable StandardFormatSpecifiers() { yield return new object[] { "d" }; @@ -1551,7 +1530,6 @@ public static void TryParseExact_String_StringArray_FormatProvider_DateTimeStyle } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Needs desktop port: https://github.com/dotnet/coreclr/issues/15896")] // Regression test for https://github.com/dotnet/coreclr/issues/15896 public static void TryParseExact_EmptyAMPMDesignator() { @@ -1720,15 +1698,8 @@ public static void TestTryParseAtBoundaries() "DateTime parsing expected to succeed at the boundary DateTime.MaxValue"); Assert.Equal(DateTime.MaxValue, maxDateTime); - if (PlatformDetection.IsFullFramework) - { - AssertExtensions.Throws("value", () => DateTime.TryParse("9999-12-31T23:59:59.999999999Z", out var dateTime)); // exceeded DateTime.MaxValue - } - else - { - Assert.False(DateTime.TryParse("9999-12-31T23:59:59.999999999Z", out var dateTime), - "DateTime parsing expected to throw with any dates greater than DateTime.MaxValue"); - } + Assert.False(DateTime.TryParse("9999-12-31T23:59:59.999999999Z", out var dateTime), + "DateTime parsing expected to throw with any dates greater than DateTime.MaxValue"); } public static IEnumerable Parse_ValidInput_Succeeds_MemberData() diff --git a/src/System.Runtime/tests/System/DecimalTests.cs b/src/System.Runtime/tests/System/DecimalTests.cs index 3ac21fcee111..62162e9647ec 100644 --- a/src/System.Runtime/tests/System/DecimalTests.cs +++ b/src/System.Runtime/tests/System/DecimalTests.cs @@ -936,7 +936,6 @@ public static IEnumerable Remainder_Valid_TestDataV2() [Theory] [MemberData(nameof(Remainder_Valid_TestDataV2))] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Full framework does not have fixes for https://github.com/dotnet/coreclr/issues/12605")] public static void RemainderV2(decimal d1, decimal d2, decimal expected) { Assert.Equal(expected, d1 % d2); @@ -1627,7 +1626,6 @@ public static void Test() public static class BigIntegerMod { [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Full framework does not have fixes for https://github.com/dotnet/coreclr/issues/12605")] public static void Test() { decimal[] decimalValues = GetRandomData(out BigDecimal[] bigDecimals); @@ -1807,7 +1805,6 @@ public static void BigInteger_RoundAwayFromZero() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Full framework does not have the fix for this bug")] public static new void GetHashCode() { var dict = new Dictionary(); diff --git a/src/System.Runtime/tests/System/DelegateTests.cs b/src/System.Runtime/tests/System/DelegateTests.cs index f0a0058ef652..7f2e462f5bd6 100644 --- a/src/System.Runtime/tests/System/DelegateTests.cs +++ b/src/System.Runtime/tests/System/DelegateTests.cs @@ -682,7 +682,6 @@ public static void CreateDelegate2_Target_Null() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "dotnet/coreclr#15196")] public static void CreateDelegate2_Target_GenericTypeParameter() { diff --git a/src/System.Runtime/tests/System/DoubleTests.cs b/src/System.Runtime/tests/System/DoubleTests.cs index 6f9a41042501..3c33a2ea3043 100644 --- a/src/System.Runtime/tests/System/DoubleTests.cs +++ b/src/System.Runtime/tests/System/DoubleTests.cs @@ -112,7 +112,6 @@ public static void Epsilon() [InlineData(double.NaN, -double.NaN, true)] [InlineData(789.0, 789.0f, false)] [InlineData(789.0, "789", false)] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "The fix was made in coreclr that is not in netfx. See https://github.com/dotnet/coreclr/issues/6237")] public static void Equals(double d1, object value, bool expected) { if (value is double d2) @@ -435,22 +434,6 @@ public static IEnumerable ToString_TestData() yield return new object[] { double.NegativeInfinity, "G", invariantFormat, "-Infinity" }; } - public static IEnumerable ToString_TestData_NetFramework() - { - foreach (var testData in ToString_TestData()) - { - yield return testData; - } - - yield return new object[] { double.MinValue, "G", null, "-1.79769313486232E+308" }; - yield return new object[] { double.MaxValue, "G", null, "1.79769313486232E+308" }; - - yield return new object[] { double.Epsilon, "G", null, "4.94065645841247E-324" }; - - NumberFormatInfo invariantFormat = NumberFormatInfo.InvariantInfo; - yield return new object[] { double.Epsilon, "G", invariantFormat, "4.94065645841247E-324" }; - } - public static IEnumerable ToString_TestData_NotNetFramework() { foreach (var testData in ToString_TestData()) @@ -468,23 +451,6 @@ public static IEnumerable ToString_TestData_NotNetFramework() } [Fact] - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)] - public static void Test_ToString_NetFramework() - { - RemoteExecutor.Invoke(() => - { - CultureInfo.CurrentCulture = CultureInfo.InvariantCulture; - - foreach (var testdata in ToString_TestData_NetFramework()) - { - ToString((double)testdata[0], (string)testdata[1], (IFormatProvider)testdata[2], (string)testdata[3]); - } - return RemoteExecutor.SuccessExitCode; - }).Dispose(); - } - - [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public static void Test_ToString_NotNetFramework() { RemoteExecutor.Invoke(() => diff --git a/src/System.Runtime/tests/System/ExceptionTests.cs b/src/System.Runtime/tests/System/ExceptionTests.cs index cfce3654f4ea..bf761ba0f546 100644 --- a/src/System.Runtime/tests/System/ExceptionTests.cs +++ b/src/System.Runtime/tests/System/ExceptionTests.cs @@ -62,7 +62,6 @@ public static void Exception_GetBaseException() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Exception.TargetSite always returns null on UapAot.")] public static void Exception_TargetSite_Jit() { bool caught = false; @@ -81,26 +80,6 @@ public static void Exception_TargetSite_Jit() Assert.True(caught); } - [Fact] - [SkipOnTargetFramework(~TargetFrameworkMonikers.UapAot, "Exception.TargetSite always returns null on UapAot.")] - public static void Exception_TargetSite_Aot() - { - bool caught = false; - - try - { - throw new Exception(); - } - catch (Exception ex) - { - caught = true; - - Assert.Null(ex.TargetSite); - } - - Assert.True(caught); - } - [Fact] public static void ThrowStatementDoesNotResetExceptionStackLineSameMethod() { @@ -120,14 +99,11 @@ private static (string, string, int) ThrowAndRethrowSameMethod(out (string, stri { try { - if (!PlatformDetection.IsFullFramework) - rethrownExceptionStackFrame = GetSourceInformation(1); + rethrownExceptionStackFrame = GetSourceInformation(1); throw new Exception("Boom!"); } catch { - if (PlatformDetection.IsFullFramework) - rethrownExceptionStackFrame = GetSourceInformation(1); throw; } } @@ -151,14 +127,11 @@ private static void ThrowAndRethrowOtherMethod(out (string, string, int) rethrow { try { - if (!PlatformDetection.IsFullFramework) - rethrownExceptionStackFrame = GetSourceInformation(1); + rethrownExceptionStackFrame = GetSourceInformation(1); ThrowException(); Assert.True(false, "Workaround for Linux Release builds (https://github.com/dotnet/corefx/pull/28059#issuecomment-378335456)"); } catch { - if (PlatformDetection.IsFullFramework) - rethrownExceptionStackFrame = GetSourceInformation(1); throw; } rethrownExceptionStackFrame = (null, null, 0); @@ -211,7 +184,6 @@ private static (string, string, int) GetSourceInformation( public class ExceptionDerivedTests : Exception { [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public static void Exception_SerializeObjectState() { var excp = new ExceptionDerivedTests(); diff --git a/src/System.Runtime/tests/System/GCTests.cs b/src/System.Runtime/tests/System/GCTests.cs index bf8c6f2b2d61..6550d20adce7 100644 --- a/src/System.Runtime/tests/System/GCTests.cs +++ b/src/System.Runtime/tests/System/GCTests.cs @@ -714,7 +714,6 @@ public static void TryStartNoGCRegion_SOHSize_LOHSize_BlockingCollection() [OuterLoop] [InlineData(0)] [InlineData(-1)] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Difference in behavior, full framework doesn't throw, fixed in .NET Core")] public static void TryStartNoGCRegion_TotalSizeOutOfRange(long size) { RemoteInvokeOptions options = new RemoteInvokeOptions(); @@ -731,7 +730,6 @@ public static void TryStartNoGCRegion_TotalSizeOutOfRange(long size) [InlineData(0)] // invalid because lohSize == [InlineData(-1)] // invalid because lohSize < 0 [InlineData(1152921504606846976)] // invalid because lohSize > totalSize - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Difference in behavior, full framework doesn't throw, fixed in .NET Core")] public static void TryStartNoGCRegion_LOHSizeInvalid(long size) { RemoteInvokeOptions options = new RemoteInvokeOptions(); diff --git a/src/System.Runtime/tests/System/GuidTests.cs b/src/System.Runtime/tests/System/GuidTests.cs index 537b044424ad..b86e7713e394 100644 --- a/src/System.Runtime/tests/System/GuidTests.cs +++ b/src/System.Runtime/tests/System/GuidTests.cs @@ -161,19 +161,6 @@ public static void Parse(string input, string format, Guid expected) } [Theory] - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework, "The coreclr fixed a bug where Guid.TryParse throws a format or overflow exception (https://github.com/dotnet/corefx/issues/6316)")] - [MemberData(nameof(GuidStrings_TryParseThrows_TestData))] - public static void Parse_Invalid_Netfx(string input, Type exceptionType) - { - Guid result = default(Guid); - Assert.Throws(exceptionType, () => Guid.TryParse(input, out result)); - Assert.Equal(default(Guid), result); - - Assert.Throws(exceptionType, () => Guid.Parse(input)); - } - - [Theory] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "The full .NET framework has a bug where Guid.TryParse throws a format or overflow exception")] public static void Parse_Invalid_NetcoreApp(string input, Type exceptionType) { Parse_Invalid(input, exceptionType); @@ -336,11 +323,7 @@ public static void Equals(Guid guid1, object obj, bool expected) Assert.Equal(expected, guid1.Equals(guid2)); Assert.Equal(expected, guid1 == guid2); Assert.Equal(!expected, guid1 != guid2); - - if (!PlatformDetection.IsFullFramework) // https://github.com/dotnet/coreclr/pull/5191 - { - Assert.Equal(expected, guid1.GetHashCode().Equals(guid2.GetHashCode())); - } + Assert.Equal(expected, guid1.GetHashCode().Equals(guid2.GetHashCode())); } Assert.Equal(expected, guid1.Equals(obj)); } diff --git a/src/System.Runtime/tests/System/IO/FileLoadExceptionTests.cs b/src/System.Runtime/tests/System/IO/FileLoadExceptionTests.cs index 1e1b96ddf039..9d4549742e8a 100644 --- a/src/System.Runtime/tests/System/IO/FileLoadExceptionTests.cs +++ b/src/System.Runtime/tests/System/IO/FileLoadExceptionTests.cs @@ -58,7 +58,6 @@ public static void Ctor_String_String_Exception() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Exception strings not guaranteed on UapAot.")] public static void ToStringTest() { string message = "this is not the file you're looking for"; diff --git a/src/System.Runtime/tests/System/IO/FileNotFoundExceptionTests.cs b/src/System.Runtime/tests/System/IO/FileNotFoundExceptionTests.cs index 7ef7ae37a905..c9e8ae9368f9 100644 --- a/src/System.Runtime/tests/System/IO/FileNotFoundExceptionTests.cs +++ b/src/System.Runtime/tests/System/IO/FileNotFoundExceptionTests.cs @@ -58,7 +58,6 @@ public static void Ctor_String_String_Exception() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Exception strings not guaranteed on UapAot.")] public static void ToStringTest() { string message = "this is not the file you're looking for"; diff --git a/src/System.Runtime/tests/System/IntPtrTests.cs b/src/System.Runtime/tests/System/IntPtrTests.cs index efdc1406945a..31828f1462e3 100644 --- a/src/System.Runtime/tests/System/IntPtrTests.cs +++ b/src/System.Runtime/tests/System/IntPtrTests.cs @@ -141,7 +141,6 @@ public static unsafe void ImplicitCast() Assert.Throws(() => (int)ptr); } - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "This was a bug fix in .NET Core where the hash code should be different")] [ConditionalFact(nameof(Is64Bit))] public static void GetHashCodeRespectAllBits() { diff --git a/src/System.Runtime/tests/System/LazyOfTMetadataTests.cs b/src/System.Runtime/tests/System/LazyOfTMetadataTests.cs index cd3de9a7f793..d72425c896e5 100644 --- a/src/System.Runtime/tests/System/LazyOfTMetadataTests.cs +++ b/src/System.Runtime/tests/System/LazyOfTMetadataTests.cs @@ -10,7 +10,6 @@ namespace System.Tests public static class LazyOfTMetadataTests { [Fact] - [ActiveIssue(24903, TargetFrameworkMonikers.NetFramework)] public static void Ctor_TMetadata() { var lazy = new Lazy("metadata1"); @@ -21,7 +20,6 @@ public static void Ctor_TMetadata() } [Fact] - [ActiveIssue(24903, TargetFrameworkMonikers.NetFramework)] public static void Ctor_TMetadata_Bool() { var lazy = new Lazy("metadata2", false); @@ -29,7 +27,6 @@ public static void Ctor_TMetadata_Bool() } [Fact] - [ActiveIssue(24903, TargetFrameworkMonikers.NetFramework)] public static void Ctor_TMetadata_LazyThreadSaftetyMode() { var lazy = new Lazy("metadata3", LazyThreadSafetyMode.PublicationOnly); @@ -37,7 +34,6 @@ public static void Ctor_TMetadata_LazyThreadSaftetyMode() } [Fact] - [ActiveIssue(24903, TargetFrameworkMonikers.NetFramework)] public static void Ctor_TMetadata_LazyThreadSaftetyMode_InvalidMode_ThrowsArgumentOutOfRangeException() { AssertExtensions.Throws("mode", () => new Lazy("test", LazyThreadSafetyMode.None - 1)); // Invalid mode @@ -45,7 +41,6 @@ public static void Ctor_TMetadata_LazyThreadSaftetyMode_InvalidMode_ThrowsArgume } [Fact] - [ActiveIssue(24903, TargetFrameworkMonikers.NetFramework)] public static void Ctor_ValueFactory_TMetadata() { var lazy = new Lazy(() => "foo", 4); @@ -53,14 +48,12 @@ public static void Ctor_ValueFactory_TMetadata() } [Fact] - [ActiveIssue(24903, TargetFrameworkMonikers.NetFramework)] public static void Ctor_ValueFactory_TMetadata_NullValueFactory_ThrowsArgumentNullException() { AssertExtensions.Throws("valueFactory", () => new Lazy(null, "test")); // Value factory is null } [Fact] - [ActiveIssue(24903, TargetFrameworkMonikers.NetFramework)] public static void Ctor_ValueFactory_TMetadata_Bool() { var lazy = new Lazy(() => "foo", 5, false); @@ -68,14 +61,12 @@ public static void Ctor_ValueFactory_TMetadata_Bool() } [Fact] - [ActiveIssue(24903, TargetFrameworkMonikers.NetFramework)] public static void Ctor_ValueFactory_TMetadata_Bool_NullValueFactory_ThrowsArgumentNullException() { AssertExtensions.Throws("valueFactory", () => new Lazy(null, "test", false)); // Value factory is null } [Fact] - [ActiveIssue(24903, TargetFrameworkMonikers.NetFramework)] public static void Ctor_ValueFactory_TMetadata_LazyThreadSaftetyMode() { var lazy = new Lazy(() => "foo", 6, LazyThreadSafetyMode.None); @@ -83,7 +74,6 @@ public static void Ctor_ValueFactory_TMetadata_LazyThreadSaftetyMode() } [Fact] - [ActiveIssue(24903, TargetFrameworkMonikers.NetFramework)] public static void Ctor_ValueFactory_TMetadata_LazyThreadSaftetyMode_Invalid() { AssertExtensions.Throws("valueFactory", () => new Lazy(null, "test", LazyThreadSafetyMode.PublicationOnly)); // Value factory is null diff --git a/src/System.Runtime/tests/System/Reflection/IsCollectibleTests.cs b/src/System.Runtime/tests/System/Reflection/IsCollectibleTests.cs index 25033169a153..8129365014a2 100644 --- a/src/System.Runtime/tests/System/Reflection/IsCollectibleTests.cs +++ b/src/System.Runtime/tests/System/Reflection/IsCollectibleTests.cs @@ -18,7 +18,6 @@ public TestAssemblyLoadContext() : base(true) {} protected override Assembly Load(AssemblyName assemblyName) => null; } - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "AssemblyLoadContext not available in NetFx")] public class IsCollectibleTests { static public string asmNameString = "TestCollectibleAssembly"; diff --git a/src/System.Runtime/tests/System/Reflection/MethodBaseTests.cs b/src/System.Runtime/tests/System/Reflection/MethodBaseTests.cs index e18a72c6c0f4..7e6c35534383 100644 --- a/src/System.Runtime/tests/System/Reflection/MethodBaseTests.cs +++ b/src/System.Runtime/tests/System/Reflection/MethodBaseTests.cs @@ -64,7 +64,6 @@ public static void TestEqualityMethods(string methodName1, BindingFlags bindingF } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "MethodBase.GetMethodBody() not supported on UapAot")] public static void TestMethodBody() { MethodBase mbase = typeof(MethodBaseTests).GetMethod("MyOtherMethod", BindingFlags.Static | BindingFlags.Public); diff --git a/src/System.Runtime/tests/System/Reflection/MethodBodyTests.cs b/src/System.Runtime/tests/System/Reflection/MethodBodyTests.cs index c2d37908994a..fcfdcd9de1aa 100644 --- a/src/System.Runtime/tests/System/Reflection/MethodBodyTests.cs +++ b/src/System.Runtime/tests/System/Reflection/MethodBodyTests.cs @@ -13,7 +13,6 @@ namespace System.Reflection.Tests public static class MethodBodyTests { [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Method.GetMethodBody() not supported on UapAot")] public static void Test_MethodBody_ExceptionHandlingClause() { MethodInfo mi = typeof(MethodBodyTests).GetMethod("MethodBodyExample"); diff --git a/src/System.Runtime/tests/System/Reflection/ModuleTests.cs b/src/System.Runtime/tests/System/Reflection/ModuleTests.cs index 1f850d0c5117..efa03f67e793 100644 --- a/src/System.Runtime/tests/System/Reflection/ModuleTests.cs +++ b/src/System.Runtime/tests/System/Reflection/ModuleTests.cs @@ -58,7 +58,6 @@ public void ModuleHandle() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Module CustomAttributes not supported on UapAot.")] public void CustomAttributes() { List customAttributes = Module.CustomAttributes.ToList(); @@ -81,14 +80,12 @@ public void CustomAttributes() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Module.FullyQualifiedName does not indicate file location on UwpAot")] public void FullyQualifiedName() { Assert.Equal(Assembly.GetExecutingAssembly().Location, Module.FullyQualifiedName); } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Module.Name does not indicate file location on UwpAot")] public void Name() { Assert.Equal("system.runtime.tests.dll", Module.Name, ignoreCase: true); @@ -116,7 +113,6 @@ public void TestGetType(Type type) } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Module.ToString() does not indicate file location on UwpAot")] public void TestToString() { Assert.Equal("System.Runtime.Tests.dll", Module.ToString()); @@ -134,7 +130,6 @@ public void IsDefined_NullType() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Module.GetField apis not supported on UapAot.")] public void GetField_NullName() { ArgumentNullException ex = AssertExtensions.Throws("name", () => @@ -153,7 +148,6 @@ public void GetField_NullName() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Module.GetField apis not supported on UapAot.")] public void GetField() { FieldInfo testInt = TestModule.GetField("TestInt", BindingFlags.Public | BindingFlags.Static); @@ -167,7 +161,6 @@ public void GetField() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Module.GetField apis not supported on UapAot.")] public void GetFields() { List fields = TestModule.GetFields(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static).OrderBy(f => f.Name).ToList(); @@ -181,7 +174,6 @@ public void GetFields() [Theory] [MemberData(nameof(Types))] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Module.Resolve apis not supported on UapAot.")] public void ResolveType(Type t) { Assert.Equal(t, Module.ResolveType(t.MetadataToken)); @@ -196,7 +188,6 @@ public void ResolveType(Type t) [Theory] [MemberData(nameof(BadResolveTypes))] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Module.Resolve apis not supported on UapAot.")] public void ResolveTypeFail(int token) { Assert.ThrowsAny(() => @@ -210,7 +201,6 @@ public void ResolveTypeFail(int token) [Theory] [MemberData(nameof(Methods))] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Module.Resolve apis not supported on UapAot.")] public void ResolveMethod(MethodInfo t) { Assert.Equal(t, Module.ResolveMethod(t.MetadataToken)); @@ -226,7 +216,6 @@ public void ResolveMethod(MethodInfo t) [Theory] [MemberData(nameof(BadResolveMethods))] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Module.Resolve apis not supported on UapAot.")] public void ResolveMethodFail(int token) { Assert.ThrowsAny(() => @@ -240,7 +229,6 @@ public void ResolveMethodFail(int token) [Theory] [MemberData(nameof(Fields))] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Module.Resolve apis not supported on UapAot.")] public void ResolveField(FieldInfo t) { Assert.Equal(t, Module.ResolveField(t.MetadataToken)); @@ -256,7 +244,6 @@ public void ResolveField(FieldInfo t) [Theory] [MemberData(nameof(BadResolveFields))] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Module.Resolve apis not supported on UapAot.")] public void ResolveFieldFail(int token) { Assert.ThrowsAny(() => @@ -275,7 +262,6 @@ public void ResolveFieldFail(int token) [Theory] [MemberData(nameof(BadResolveStrings))] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Module.Resolve apis not supported on UapAot.")] public void ResolveStringFail(int token) { Assert.ThrowsAny(() => @@ -288,14 +274,12 @@ public void ResolveStringFail(int token) [MemberData(nameof(Types))] [MemberData(nameof(Methods))] [MemberData(nameof(Fields))] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Module.Resolve apis not supported on UapAot.")] public void ResolveMember(MemberInfo member) { Assert.Equal(member, Module.ResolveMember(member.MetadataToken)); } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Module.Resolve apis not supported on UapAot.")] public void ResolveMethodOfGenericClass() { Type t = typeof(Foo<>); diff --git a/src/System.Runtime/tests/System/Reflection/StrongNameKeyPairTests.cs b/src/System.Runtime/tests/System/Reflection/StrongNameKeyPairTests.cs index d448e66da4da..9f317dd52873 100644 --- a/src/System.Runtime/tests/System/Reflection/StrongNameKeyPairTests.cs +++ b/src/System.Runtime/tests/System/Reflection/StrongNameKeyPairTests.cs @@ -56,21 +56,18 @@ public void Ctor_NullKeyPairFile_ThrowsArgumentNullException() [InlineData(null)] [InlineData("")] [InlineData("keyPairContainer")] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Constructor is not supported in .NET Core")] public void Ctor_String_ThrowsPlatformNotSupportedException(string keyPairContainer) { Assert.Throws(() => new StrongNameKeyPair(keyPairContainer)); } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Constructor is not supported in .NET Core")] public void Ctor_SerializationInfo_StreamingContext_ThrowsPlatformNotSupportedException() { Assert.Throws(() => new SubStrongNameKeyPair(null, new StreamingContext())); } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "PublicKey is not supported in .NET Core")] public void PublicKey_Get_ThrowsPlatformNotSupportedException() { var keyPair = new StrongNameKeyPair(new byte[0]); @@ -78,7 +75,6 @@ public void PublicKey_Get_ThrowsPlatformNotSupportedException() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "OnDeserialization is not supported in .NET Core")] public void GetObjectData_Invoke_ThrowsPlatformNotSupportedException() { ISerializable keyPair = new StrongNameKeyPair(new byte[0]); @@ -86,7 +82,6 @@ public void GetObjectData_Invoke_ThrowsPlatformNotSupportedException() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "OnDeserialization is not supported in .NET Core")] public void OnDeserialization_Invoke_ThrowsPlatformNotSupportedException() { IDeserializationCallback keyPair = new StrongNameKeyPair(new byte[0]); diff --git a/src/System.Runtime/tests/System/Runtime/CompilerServices/RuntimeHelpersTests.cs b/src/System.Runtime/tests/System/Runtime/CompilerServices/RuntimeHelpersTests.cs index 7c6d90127e0f..48bf9f38f573 100644 --- a/src/System.Runtime/tests/System/Runtime/CompilerServices/RuntimeHelpersTests.cs +++ b/src/System.Runtime/tests/System/Runtime/CompilerServices/RuntimeHelpersTests.cs @@ -115,7 +115,6 @@ internal class HasCctorReceiver } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public static void PrepareMethod() { foreach (MethodInfo m in typeof(RuntimeHelpersTests).GetMethods()) diff --git a/src/System.Runtime/tests/System/Runtime/ExceptionServices/HandleProcessCorruptedStateExceptions.cs b/src/System.Runtime/tests/System/Runtime/ExceptionServices/HandleProcessCorruptedStateExceptions.cs index 249b53ac7aed..90c08d5839d8 100644 --- a/src/System.Runtime/tests/System/Runtime/ExceptionServices/HandleProcessCorruptedStateExceptions.cs +++ b/src/System.Runtime/tests/System/Runtime/ExceptionServices/HandleProcessCorruptedStateExceptions.cs @@ -48,10 +48,7 @@ public static void ProcessExit_Called() { Process p = handle.Process; p.WaitForExit(); - if (PlatformDetection.IsFullFramework) - Assert.Equal(RemoteExecutor.SuccessExitCode, p.ExitCode); - else - Assert.NotEqual(RemoteExecutor.SuccessExitCode, p.ExitCode); + Assert.NotEqual(RemoteExecutor.SuccessExitCode, p.ExitCode); } } } diff --git a/src/System.Runtime/tests/System/Security/SecurityExceptionTests.cs b/src/System.Runtime/tests/System/Security/SecurityExceptionTests.cs index a0decf8dd762..57596cb863b8 100644 --- a/src/System.Runtime/tests/System/Security/SecurityExceptionTests.cs +++ b/src/System.Runtime/tests/System/Security/SecurityExceptionTests.cs @@ -57,7 +57,6 @@ public static void Ctor_String_Type_String() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Full framework does extra validation for SecurityException properties")] public static void Properties() { var exception = new SecurityException(); diff --git a/src/System.Runtime/tests/System/SingleTests.cs b/src/System.Runtime/tests/System/SingleTests.cs index 0977604e7c0d..ae813f29aec7 100644 --- a/src/System.Runtime/tests/System/SingleTests.cs +++ b/src/System.Runtime/tests/System/SingleTests.cs @@ -112,7 +112,6 @@ public static void Epsilon() [InlineData(float.NaN, -float.NaN, true)] [InlineData(789.0f, 789.0, false)] [InlineData(789.0f, "789", false)] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "The fix was made in coreclr that is not in netfx. See https://github.com/dotnet/coreclr/issues/6237")] public static void Equals(float f1, object value, bool expected) { if (value is float f2) @@ -433,22 +432,6 @@ public static IEnumerable ToString_TestData() yield return new object[] { float.NegativeInfinity, "G", invariantFormat, "-Infinity" }; } - public static IEnumerable ToString_TestData_NetFramework() - { - foreach (var testData in ToString_TestData()) - { - yield return testData; - } - - yield return new object[] { float.MinValue, "G", null, "-3.402823E+38" }; - yield return new object[] { float.MaxValue, "G", null, "3.402823E+38" }; - - yield return new object[] { float.Epsilon, "G", null, "1.401298E-45" }; - - NumberFormatInfo invariantFormat = NumberFormatInfo.InvariantInfo; - yield return new object[] { float.Epsilon, "G", invariantFormat, "1.401298E-45" }; - } - public static IEnumerable ToString_TestData_NotNetFramework() { foreach (var testData in ToString_TestData()) @@ -466,23 +449,6 @@ public static IEnumerable ToString_TestData_NotNetFramework() } [Fact] - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)] - public static void Test_ToString_NetFramework() - { - RemoteExecutor.Invoke(() => - { - CultureInfo.CurrentCulture = CultureInfo.InvariantCulture; - - foreach (var testdata in ToString_TestData_NetFramework()) - { - ToString((float)testdata[0], (string)testdata[1], (IFormatProvider)testdata[2], (string)testdata[3]); - } - return RemoteExecutor.SuccessExitCode; - }).Dispose(); - } - - [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public static void Test_ToString_NotNetFramework() { RemoteExecutor.Invoke(() => diff --git a/src/System.Runtime/tests/System/Text/StringBuilderTests.cs b/src/System.Runtime/tests/System/Text/StringBuilderTests.cs index f981bfab2f25..289af15ff5a4 100644 --- a/src/System.Runtime/tests/System/Text/StringBuilderTests.cs +++ b/src/System.Runtime/tests/System/Text/StringBuilderTests.cs @@ -14,7 +14,7 @@ namespace System.Text.Tests public partial class StringBuilderTests { private static readonly string s_chunkSplitSource = new string('a', 30); - private static readonly string s_noCapacityParamName = PlatformDetection.IsFullFramework ? "requiredLength" : "valueCount"; + private static readonly string s_noCapacityParamName = "valueCount"; private static StringBuilder StringBuilderWithMultipleChunks() => new StringBuilder(20).Append(s_chunkSplitSource); @@ -696,7 +696,6 @@ public static void Append_CharArray(string original, char[] value, int startInde } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public static void Append_CharArray_Invalid() { var builder = new StringBuilder(0, 5); @@ -714,25 +713,6 @@ public static void Append_CharArray_Invalid() AssertExtensions.Throws("valueCount", () => builder.Append(new char[] { 'a' }, 0, 1)); // New length > builder.MaxCapacity } - [Fact] - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)] - public static void Append_CharArray_InvalidDesktop() - { - var builder = new StringBuilder(0, 5); - builder.Append("Hello"); - - AssertExtensions.Throws("value", () => builder.Append((char[])null, 1, 1)); // Value is null, startIndex > 0 and count > 0 - - AssertExtensions.Throws("startIndex", () => builder.Append(new char[0], -1, 0)); // Start index < 0 - AssertExtensions.Throws("count", () => builder.Append(new char[0], 0, -1)); // Count < 0 - - AssertExtensions.Throws("count", () => builder.Append(new char[5], 6, 0)); // Start index + count > value.Length - AssertExtensions.Throws("count", () => builder.Append(new char[5], 5, 1)); // Start index + count > value.Length - - AssertExtensions.Throws("requiredLength", () => builder.Append(new char[] { 'a' })); - AssertExtensions.Throws("requiredLength", () => builder.Append(new char[] { 'a' }, 0, 1)); - } - public static IEnumerable AppendFormat_TestData() { yield return new object[] { "", null, "", new object[0], "" }; @@ -921,7 +901,6 @@ public static void AppendFormat_Invalid() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public static void AppendFormat_NoEscapedBracesInCustomFormatSpecifier() { // Tests new rule which does not allow escaped braces in the custom format specifier @@ -1592,7 +1571,6 @@ public static void Insert_CharArray_Invalid() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public static void Insert_CharArray_InvalidCount() { var builder = new StringBuilder(0, 5); @@ -1601,16 +1579,6 @@ public static void Insert_CharArray_InvalidCount() } [Fact] - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)] - public static void Insert_CharArray_InvalidCount_Desktop() - { - var builder = new StringBuilder(0, 5); - builder.Append("Hello"); - AssertExtensions.Throws("count", () => builder.Insert(0, new char[0], 0, -1)); // Char count < 0 - } - - [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public static void Insert_CharArray_InvalidCharCount() { var builder = new StringBuilder(0, 5); @@ -1618,15 +1586,6 @@ public static void Insert_CharArray_InvalidCharCount() AssertExtensions.Throws("charCount", () => builder.Insert(0, new char[0], 0, -1)); // Char count < 0 } - [Fact] - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)] - public static void Insert_CharArray_InvalidCharCount_Desktop() - { - var builder = new StringBuilder(0, 5); - builder.Append("Hello"); - AssertExtensions.Throws("count", () => builder.Insert(0, new char[0], 0, -1)); // Char count < 0 - } - [Theory] [InlineData("", 0, 0, "")] [InlineData("Hello", 0, 5, "")] @@ -1654,7 +1613,6 @@ public static void Remove_StringBuilderWithMultipleChunks(int startIndex, int co } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public static void Remove_Invalid() { var builder = new StringBuilder("Hello"); @@ -1665,18 +1623,6 @@ public static void Remove_Invalid() AssertExtensions.Throws("length", () => builder.Remove(4, 2)); // Start index + length > 0 } - [Fact] - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)] - public static void Remove_Invalid_Desktop() - { - var builder = new StringBuilder("Hello"); - AssertExtensions.Throws("startIndex", () => builder.Remove(-1, 0)); // Start index < 0 - AssertExtensions.Throws("length", () => builder.Remove(0, -1)); // Length < 0 - AssertExtensions.Throws("index", () => builder.Remove(6, 0)); // Start index + length > 0 - AssertExtensions.Throws("index", () => builder.Remove(5, 1)); // Start index + length > 0 - AssertExtensions.Throws("index", () => builder.Remove(4, 2)); // Start index + length > 0 - } - [Theory] [InlineData("", 'a', '!', 0, 0, "")] [InlineData("aaaabbbbccccdddd", 'a', '!', 0, 16, "!!!!bbbbccccdddd")] diff --git a/src/System.Runtime/tests/System/Threading/WaitHandleTests.cs b/src/System.Runtime/tests/System/Threading/WaitHandleTests.cs index 1204c458a5f9..8bcb6a41833f 100644 --- a/src/System.Runtime/tests/System/Threading/WaitHandleTests.cs +++ b/src/System.Runtime/tests/System/Threading/WaitHandleTests.cs @@ -44,7 +44,6 @@ public static void WaitAny() Assert.Equal(WaitHandle.WaitTimeout, WaitHandle.WaitAny(handles, TimeSpan.FromMilliseconds(1))); } - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Message is used as parameter name on netfx")] [Fact] public static void WaitAny_NullArray_Throws() { @@ -57,7 +56,6 @@ public static void WaitAny_NullArray_Throws() Assert.Throws("waitHandles", () => WaitHandle.WaitAny(handles, TimeSpan.Zero, exitContext: false)); } - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Message is used as parameter name on netfx")] [Fact] public static void WaitAny_NullHandle_Throws() { @@ -99,7 +97,6 @@ public static void WaitAll() Assert.False(WaitHandle.WaitAll(handles, TimeSpan.FromMilliseconds(1))); } - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Message is used as parameter name on netfx")] [Fact] public static void WaitAll_NullArray_Throws() { @@ -112,7 +109,6 @@ public static void WaitAll_NullArray_Throws() Assert.Throws("waitHandles", () => WaitHandle.WaitAll(handles, TimeSpan.Zero, exitContext: false)); } - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Message is used as parameter name on netfx")] [Fact] public static void WaitAll_NullHandle_Throws() { diff --git a/src/System.Runtime/tests/System/TimeSpanTests.cs b/src/System.Runtime/tests/System/TimeSpanTests.cs index 083f88d1f6e1..e03fdd731f21 100644 --- a/src/System.Runtime/tests/System/TimeSpanTests.cs +++ b/src/System.Runtime/tests/System/TimeSpanTests.cs @@ -438,7 +438,6 @@ public static IEnumerable FromMilliseconds_TestData_NetCore() } [Theory] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] [MemberData(nameof(FromMilliseconds_TestData_NetCore))] public static void FromMilliseconds_Netcore(double value, TimeSpan expected) { @@ -456,14 +455,6 @@ public static IEnumerable FromMilliseconds_TestData_Desktop() yield return new object[] { -1500.5, new TimeSpan(-15010000) }; } - [Theory] - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)] - [MemberData(nameof(FromMilliseconds_TestData_Desktop))] - public static void FromMilliseconds_Desktop(double value, TimeSpan expected) - { - Assert.Equal(expected, TimeSpan.FromMilliseconds(value)); - } - [Fact] public static void FromMilliseconds_Invalid() { @@ -559,14 +550,6 @@ public static IEnumerable Parse_Valid_TestData() yield return new object[] { "1:1:1.000001", CultureInfo.InvariantCulture, new TimeSpan(36610000010) }; yield return new object[] { "1:1:1.0000001", CultureInfo.InvariantCulture, new TimeSpan(36610000001) }; - if (PlatformDetection.IsFullFramework) - { - // Full framework can produce some incorrect results in some cases involving leading zeros when - // parsing fraction more than 7 digits. we test the expected full framework results here and we have - // have more net core tests to validate the correct the results. - yield return new object[] { "1:1:1.00000001", CultureInfo.InvariantCulture, new TimeSpan(36610000001) }; - } - // DD.HH:MM:SS yield return new object[] { "1.12:24:02", null, new TimeSpan(1, 12, 24, 2, 0) }; @@ -588,14 +571,6 @@ public static IEnumerable Parse_Valid_TestData() yield return new object[] { "1:1:.000001", CultureInfo.InvariantCulture, new TimeSpan(36600000010) }; yield return new object[] { "1:1:.0000001", CultureInfo.InvariantCulture, new TimeSpan(36600000001) }; - if (PlatformDetection.IsFullFramework) - { - // Full framework can produce some incorrect results in some cases involving leading zeros when - // parsing fraction more than 7 digits. we test the expected full framework results here and we have - // have more net core tests to validate the correct the results. - yield return new object[] { "1:1:.00000001", CultureInfo.InvariantCulture, new TimeSpan(36600000001) }; - } - // Just below overflow on various components yield return new object[] { "10675199", null, new TimeSpan(9223371936000000000) }; yield return new object[] { "10675199:00:00", null, new TimeSpan(9223371936000000000) }; @@ -660,15 +635,6 @@ public static IEnumerable Parse_Invalid_TestData() // OverflowExceptions yield return new object[] { "1:1:1.99999999", null, typeof(OverflowException) }; // overflowing fraction - if (PlatformDetection.IsFullFramework) - { - // on non full framework we now succeed parsing the fraction .000000001 - // Full framework can produce some incorrect results in some cases involving leading zeros when - // parsing fraction more than 7 digits. we test the expected full framework results here and we have - // have more net core tests to validate the correct the results. - yield return new object[] { "1:1:1.000000001", null, typeof(OverflowException) }; // too many leading zeroes in fraction - } - yield return new object[] { "2147483647", null, typeof(OverflowException) }; // overflowing value == int.MaxValue yield return new object[] { "2147483648", null, typeof(OverflowException) }; // overflowing value == int.MaxValue + 1 yield return new object[] { "10675200", null, typeof(OverflowException) }; // overflowing number of days diff --git a/src/System.Runtime/tests/System/TimeZoneInfoTests.cs b/src/System.Runtime/tests/System/TimeZoneInfoTests.cs index 8dc6f65181a8..a43f0ac5efc3 100644 --- a/src/System.Runtime/tests/System/TimeZoneInfoTests.cs +++ b/src/System.Runtime/tests/System/TimeZoneInfoTests.cs @@ -136,7 +136,6 @@ public static void RussianTimeZone() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "The full .NET Framework has a bug. See https://github.com/dotnet/corefx/issues/26479")] public static void CaseInsensitiveLookup() { Assert.Equal(TimeZoneInfo.FindSystemTimeZoneById(s_strBrasilia), TimeZoneInfo.FindSystemTimeZoneById(s_strBrasilia.ToLowerInvariant())); @@ -2245,7 +2244,6 @@ public static void TimeZoneInfo_DisplayNameStartsWithOffset() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public static void EnsureUtcObjectSingleton() { TimeZoneInfo utcObject = TimeZoneInfo.GetSystemTimeZones().Single(x => x.Id.Equals("UTC", StringComparison.OrdinalIgnoreCase)); diff --git a/src/System.Runtime/tests/System/Type/TypeTests.Get.cs b/src/System.Runtime/tests/System/Type/TypeTests.Get.cs index 7bbd548fd113..b379d46408a8 100644 --- a/src/System.Runtime/tests/System/Type/TypeTests.Get.cs +++ b/src/System.Runtime/tests/System/Type/TypeTests.Get.cs @@ -81,7 +81,6 @@ public void GetInterface_SameNameInterfaces_ThrowsAmbiguousMatchException() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "netfx doesn't have the fix in https://github.com/dotnet/coreclr/pull/21071")] public void GetInterface_SameNameInterfaces_FullySpecified_Succeeds() { Assert.NotNull(typeof(ClassWithTwoSameNameInterfaces).GetInterface("System.Tests.Inner.Interface1", ignoreCase: true)); diff --git a/src/System.Runtime/tests/System/Type/TypeTests.cs b/src/System.Runtime/tests/System/Type/TypeTests.cs index bb3c4c700f75..ee5e1c674172 100644 --- a/src/System.Runtime/tests/System/Type/TypeTests.cs +++ b/src/System.Runtime/tests/System/Type/TypeTests.cs @@ -238,7 +238,6 @@ public void GetTypeByName_Invalid(string typeName, Type expectedException, bool } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Stackwalking is not supported on UaoAot")] public void GetTypeByName_InvokeViaReflection_Success() { MethodInfo method = typeof(Type).GetMethod("GetType", new[] { typeof(string) }); @@ -303,7 +302,6 @@ public class ContextBoundClass : ContextBoundObject Type.GetType(name, false, ignore) : assem.GetType(name, false, ignore); [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Assembly.LoadFrom() is not supported on UapAot")] public void GetTypeByName() { RemoteInvokeOptions options = new RemoteInvokeOptions(); @@ -330,7 +328,6 @@ public void GetTypeByName() } [Theory] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Assembly.LoadFrom() is not supported on UapAot")] [InlineData("System.Collections.Generic.Dictionary`2[[Program, TestLoadAssembly], [Program2, TestLoadAssembly]]")] [InlineData("")] public void GetTypeByName_NoSuchType_ThrowsTypeLoadException(string typeName) @@ -345,7 +342,6 @@ public void GetTypeByName_NoSuchType_ThrowsTypeLoadException(string typeName) } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Assembly.LoadFrom() is not supported on UapAot")] public void GetTypeByNameCaseSensitiveTypeloadFailure() { RemoteInvokeOptions options = new RemoteInvokeOptions(); @@ -376,7 +372,6 @@ public void GetTypeByNameCaseSensitiveTypeloadFailure() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public void IsContextful() { Assert.True(!typeof(TypeTestsExtended).IsContextful); @@ -418,7 +413,6 @@ public static IEnumerable GetInterfaceMap_TestData() [Theory] [MemberData(nameof(GetInterfaceMap_TestData))] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Type.GetInterfaceMap() is not supported on UapAot")] public void GetInterfaceMap(Type interfaceType, Type classType, Tuple[] expectedMap) { InterfaceMapping actualMapping = classType.GetInterfaceMap(interfaceType); diff --git a/src/System.Runtime/tests/System/Type/TypeTests.netcoreapp.cs b/src/System.Runtime/tests/System/Type/TypeTests.netcoreapp.cs index 94c52c0422e7..b06ad84dbdf2 100644 --- a/src/System.Runtime/tests/System/Type/TypeTests.netcoreapp.cs +++ b/src/System.Runtime/tests/System/Type/TypeTests.netcoreapp.cs @@ -158,7 +158,6 @@ public void IsTypeDefinition_False(Type type) // - The .NET Native implementation of IsTypeDefinition is not the one that works by enumerating selected values off CorElementType. // It has much less need of a test like this. [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot)] public void IsTypeDefinition_AllDefinedTypesInCoreAssembly() { foreach (Type type in typeof(object).Assembly.DefinedTypes) diff --git a/src/System.Runtime/tests/System/TypedReferenceTests.cs b/src/System.Runtime/tests/System/TypedReferenceTests.cs index 5be1b46fed3d..13249cd98b95 100644 --- a/src/System.Runtime/tests/System/TypedReferenceTests.cs +++ b/src/System.Runtime/tests/System/TypedReferenceTests.cs @@ -91,7 +91,6 @@ public static void MakeTypedReference_ReadOnlyField_Succeeds() Assert.Equal(os, TypedReference.ToObject(tr)); } -#if !uapaot // ActiveIssue UapAot TFS 430781 - __makeref causes ILC fatal error. [Fact] public static void GetTargetTypeTests() { @@ -127,9 +126,7 @@ public static void GetTargetTypeTests() reference = __makeref(boolValue); Assert.Equal(boolValue.GetType(), TypedReference.GetTargetType(reference)); } -#endif // !uapaot -#if !uapaot // ActiveIssue UapAot TFS 430781 - __makeref causes ILC fatal error. [Fact] public static unsafe void PointerTypeTests() { @@ -142,6 +139,5 @@ public static unsafe void PointerTypeTests() Assert.Equal(typeof(UIntPtr), obj.GetType()); Assert.Equal((UIntPtr)pointerValue, (UIntPtr)obj); } -#endif // !uapaot } } diff --git a/src/System.Runtime/tests/System/UIntPtrTests.cs b/src/System.Runtime/tests/System/UIntPtrTests.cs index 7bab5617671a..f4c922e09f62 100644 --- a/src/System.Runtime/tests/System/UIntPtrTests.cs +++ b/src/System.Runtime/tests/System/UIntPtrTests.cs @@ -138,7 +138,6 @@ public static unsafe void TestImplicitCast() Assert.Throws(() => (uint)ptr); } - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "This was a bug fix in .NET Core where the hash code should be different")] [ConditionalFact(nameof(Is64Bit))] public static void GetHashCodeRespectAllBits() { diff --git a/src/System.Runtime/tests/System/UnitySerializationHolderTests.cs b/src/System.Runtime/tests/System/UnitySerializationHolderTests.cs index ab28b42bad17..d62d13b29a11 100644 --- a/src/System.Runtime/tests/System/UnitySerializationHolderTests.cs +++ b/src/System.Runtime/tests/System/UnitySerializationHolderTests.cs @@ -13,8 +13,8 @@ public class UnitySerializationHolderTests public void UnitySerializationHolderWithAssemblySingleton() { const string UnitySerializationHolderAssemblyBase64String = "AAEAAAD/////AQAAAAAAAAAEAQAAAB9TeXN0ZW0uVW5pdHlTZXJpYWxpemF0aW9uSG9sZGVyAwAAAAREYXRhCVVuaXR5VHlwZQxBc3NlbWJseU5hbWUBAAEIBgIAAABLbXNjb3JsaWIsIFZlcnNpb249NC4wLjAuMCwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1iNzdhNWM1NjE5MzRlMDg5BgAAAAkCAAAACw=="; - AssertExtensions.ThrowsIf(!PlatformDetection.IsFullFramework, - () => BinaryFormatterHelpers.FromBase64String(UnitySerializationHolderAssemblyBase64String)); + AssertExtensions.Throws(() => + BinaryFormatterHelpers.FromBase64String(UnitySerializationHolderAssemblyBase64String)); } } } diff --git a/src/System.Runtime/tests/System/ValueTypeTests.cs b/src/System.Runtime/tests/System/ValueTypeTests.cs index f9aec19b29fd..a15237c51f19 100644 --- a/src/System.Runtime/tests/System/ValueTypeTests.cs +++ b/src/System.Runtime/tests/System/ValueTypeTests.cs @@ -32,7 +32,6 @@ public static void StructWithDoubleFieldNotTightlyPackedZeroCompareTest() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "The fix was made in coreclr that is not in netfx. See https://github.com/dotnet/coreclr/issues/11452")] public static void StructWithDoubleFieldTightlyPackedZeroCompareTest() { StructWithDoubleFieldTightlyPacked obj1 = new StructWithDoubleFieldTightlyPacked(); @@ -63,7 +62,6 @@ public static void StructWithDoubleFieldNotTightlyPackedNaNCompareTest() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "The fix was made in coreclr that is not in netfx. See https://github.com/dotnet/coreclr/issues/11452")] public static void StructWithDoubleFieldTightlyPackedNaNCompareTest() { StructWithDoubleFieldTightlyPacked obj1 = new StructWithDoubleFieldTightlyPacked(); @@ -94,7 +92,6 @@ public static void StructWithNestedDoubleFieldNotTightlyPackedZeroCompareTest() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "The fix was made in coreclr that is not in netfx. See https://github.com/dotnet/coreclr/issues/11452")] public static void StructWithNestedDoubleFieldTightlyPackedZeroCompareTest() { StructWithDoubleFieldNestedTightlyPacked obj1 = new StructWithDoubleFieldNestedTightlyPacked(); @@ -125,7 +122,6 @@ public static void StructWithNestedDoubleFieldNotTightlyPackedNaNCompareTest() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "The fix was made in coreclr that is not in netfx. See https://github.com/dotnet/coreclr/issues/11452")] public static void StructWithNestedDoubleFieldTightlyPackedNaNCompareTest() { StructWithDoubleFieldNestedTightlyPacked obj1 = new StructWithDoubleFieldNestedTightlyPacked(); @@ -141,7 +137,6 @@ public static void StructWithNestedDoubleFieldTightlyPackedNaNCompareTest() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "The fix was made in coreclr that is not in netfx. See https://github.com/dotnet/coreclr/issues/6237")] public static void StructWithFloatFieldNotTightlyPackedZeroCompareTest() { StructWithFloatFieldNotTightlyPacked obj1 = new StructWithFloatFieldNotTightlyPacked(); @@ -157,7 +152,6 @@ public static void StructWithFloatFieldNotTightlyPackedZeroCompareTest() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "The fix was made in coreclr that is not in netfx. See https://github.com/dotnet/coreclr/issues/11452")] public static void StructWithFloatFieldTightlyPackedZeroCompareTest() { StructWithFloatFieldTightlyPacked obj1 = new StructWithFloatFieldTightlyPacked(); @@ -173,7 +167,6 @@ public static void StructWithFloatFieldTightlyPackedZeroCompareTest() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "The fix was made in coreclr that is not in netfx. See https://github.com/dotnet/coreclr/issues/6237")] public static void StructWithFloatFieldNotTightlyPackedNaNCompareTest() { StructWithFloatFieldNotTightlyPacked obj1 = new StructWithFloatFieldNotTightlyPacked(); @@ -189,7 +182,6 @@ public static void StructWithFloatFieldNotTightlyPackedNaNCompareTest() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "The fix was made in coreclr that is not in netfx. See https://github.com/dotnet/coreclr/issues/11452")] public static void StructWithFloatFieldTightlyPackedNaNCompareTest() { StructWithFloatFieldTightlyPacked obj1 = new StructWithFloatFieldTightlyPacked(); @@ -205,7 +197,6 @@ public static void StructWithFloatFieldTightlyPackedNaNCompareTest() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "The fix was made in coreclr that is not in netfx. See https://github.com/dotnet/coreclr/issues/6237")] public static void StructWithNestedFloatFieldNotTightlyPackedZeroCompareTest() { StructWithFloatFieldNestedNotTightlyPacked obj1 = new StructWithFloatFieldNestedNotTightlyPacked(); @@ -221,7 +212,6 @@ public static void StructWithNestedFloatFieldNotTightlyPackedZeroCompareTest() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "The fix was made in coreclr that is not in netfx. See https://github.com/dotnet/coreclr/issues/11452")] public static void StructWithNestedFloatFieldTightlyPackedZeroCompareTest() { StructWithFloatFieldNestedTightlyPacked obj1 = new StructWithFloatFieldNestedTightlyPacked(); @@ -237,7 +227,6 @@ public static void StructWithNestedFloatFieldTightlyPackedZeroCompareTest() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "The fix was made in coreclr that is not in netfx. See https://github.com/dotnet/coreclr/issues/6237")] public static void StructWithNestedFloatFieldNotTightlyPackedNaNCompareTest() { StructWithFloatFieldNestedNotTightlyPacked obj1 = new StructWithFloatFieldNestedNotTightlyPacked(); @@ -253,7 +242,6 @@ public static void StructWithNestedFloatFieldNotTightlyPackedNaNCompareTest() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "The fix was made in coreclr that is not in netfx. See https://github.com/dotnet/coreclr/issues/11452")] public static void StructWithNestedFloatFieldTightlyPackedNaNCompareTest() { StructWithFloatFieldNestedTightlyPacked obj1 = new StructWithFloatFieldNestedTightlyPacked(); @@ -284,7 +272,6 @@ public static void StructWithoutNestedOverriddenEqualsCompareTest() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "The fix was made in coreclr that is not in netfx. See https://github.com/dotnet/coreclr/issues/11452")] public static void StructWithNestedOverriddenEqualsCompareTest() { StructWithNestedOverriddenEqualsAndGetHashCode obj1 = new StructWithNestedOverriddenEqualsAndGetHashCode(); diff --git a/src/System.Runtime/tests/System/VersionTests.cs b/src/System.Runtime/tests/System/VersionTests.cs index 45ded98a9b24..423652fb1110 100644 --- a/src/System.Runtime/tests/System/VersionTests.cs +++ b/src/System.Runtime/tests/System/VersionTests.cs @@ -139,7 +139,6 @@ public void CompareTo_ReturnsExpected(Version version1, Version version2, int ex } [ActiveIssue("https://github.com/dotnet/coreclr/pull/23898")] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "https://github.com/dotnet/coreclr/pull/23898")] [Theory] [MemberData(nameof(Comparison_TestData))] public void ComparisonOperators_ReturnExpected(Version version1, Version version2, int expectedSign) diff --git a/src/System.Security.AccessControl/tests/Configurations.props b/src/System.Security.AccessControl/tests/Configurations.props index edd91d331c88..dd6fb5e9c632 100644 --- a/src/System.Security.AccessControl/tests/Configurations.props +++ b/src/System.Security.AccessControl/tests/Configurations.props @@ -1,7 +1,9 @@  - netstandard-Windows_NT; + netcoreapp-Windows_NT; + netfx-Windows_NT; + uap-Windows_NT; \ No newline at end of file diff --git a/src/System.Security.AccessControl/tests/System.Security.AccessControl.Tests.csproj b/src/System.Security.AccessControl/tests/System.Security.AccessControl.Tests.csproj index b7bbdd7eb6e5..b0804d116cf4 100644 --- a/src/System.Security.AccessControl/tests/System.Security.AccessControl.Tests.csproj +++ b/src/System.Security.AccessControl/tests/System.Security.AccessControl.Tests.csproj @@ -2,8 +2,7 @@ {70FAC855-CAC6-4523-8477-880548D58A1B} Linux;NetBSD;OSX - netstandard-Windows_NT-Debug;netstandard-Windows_NT-Release - + netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netfx-Windows_NT-Debug;netfx-Windows_NT-Release;uap-Windows_NT-Debug;nuap-Windows_NT-Release diff --git a/src/System.Security.Claims/tests/ClaimTests.cs b/src/System.Security.Claims/tests/ClaimTests.cs index 332577c00bf9..c6dc1ed025f7 100644 --- a/src/System.Security.Claims/tests/ClaimTests.cs +++ b/src/System.Security.Claims/tests/ClaimTests.cs @@ -19,7 +19,6 @@ public void Ctor_ArgumentValidation() } [Fact] - [ActiveIssue(22858, framework: TargetFrameworkMonikers.NetFramework)] // Roundtripping claim fails in full framework with EndOfStream exception public void BinaryWriteReadTest_Success() { var claim = new Claim(ClaimTypes.Actor, "value", ClaimValueTypes.String, "issuer", "originalIssuer"); diff --git a/src/System.Security.Claims/tests/Configurations.props b/src/System.Security.Claims/tests/Configurations.props index 581054d46db4..f97cd5ea7a97 100644 --- a/src/System.Security.Claims/tests/Configurations.props +++ b/src/System.Security.Claims/tests/Configurations.props @@ -1,7 +1,8 @@  - netstandard; + netcoreapp; + uap; \ No newline at end of file diff --git a/src/System.Security.Claims/tests/System.Security.Claims.Tests.csproj b/src/System.Security.Claims/tests/System.Security.Claims.Tests.csproj index dd51f5ab1882..58dff701a2b5 100644 --- a/src/System.Security.Claims/tests/System.Security.Claims.Tests.csproj +++ b/src/System.Security.Claims/tests/System.Security.Claims.Tests.csproj @@ -1,7 +1,7 @@ {BE8B728D-86C1-406F-8F5F-6656EC486B01} - netstandard-Debug;netstandard-Release + netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release diff --git a/src/System.Security.Cryptography.Algorithms/tests/AesTests.cs b/src/System.Security.Cryptography.Algorithms/tests/AesTests.cs index 4c32fce60d72..b459ee4b5855 100644 --- a/src/System.Security.Cryptography.Algorithms/tests/AesTests.cs +++ b/src/System.Security.Cryptography.Algorithms/tests/AesTests.cs @@ -21,7 +21,6 @@ public static void AesDefaultCtor() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Causing other tests to intermittently fail on netfx (https://github.com/dotnet/corefx/issues/18690)")] public static void EnsureLegalSizesValuesIsolated() { new AesLegalSizesBreaker().Dispose(); diff --git a/src/System.Security.Cryptography.Algorithms/tests/Configurations.props b/src/System.Security.Cryptography.Algorithms/tests/Configurations.props index 4278253296aa..b66a3623c610 100644 --- a/src/System.Security.Cryptography.Algorithms/tests/Configurations.props +++ b/src/System.Security.Cryptography.Algorithms/tests/Configurations.props @@ -1,10 +1,9 @@  - netstandard-Unix; - netstandard-Windows_NT; netcoreapp-Windows_NT; netcoreapp-Unix; + uap-Windows_NT; \ No newline at end of file diff --git a/src/System.Security.Cryptography.Algorithms/tests/DefaultRSAProvider.cs b/src/System.Security.Cryptography.Algorithms/tests/DefaultRSAProvider.cs index 3fab2dc60c4c..4c3e49b901d7 100644 --- a/src/System.Security.Cryptography.Algorithms/tests/DefaultRSAProvider.cs +++ b/src/System.Security.Cryptography.Algorithms/tests/DefaultRSAProvider.cs @@ -18,12 +18,6 @@ public RSA Create(int keySize) return RSA.Create(keySize); #else RSA rsa = Create(); - - if (PlatformDetection.IsFullFramework && rsa is RSACryptoServiceProvider) - { - rsa.Dispose(); - return new RSACryptoServiceProvider(keySize); - } rsa.KeySize = keySize; return rsa; @@ -47,11 +41,9 @@ public bool Supports384PrivateKey public bool SupportsLargeExponent => true; - public bool SupportsSha2Oaep { get; } = - !PlatformDetection.IsFullFramework || !(RSA.Create() is RSACryptoServiceProvider); + public bool SupportsSha2Oaep { get; } = true; - public bool SupportsPss { get; } = - !PlatformDetection.IsFullFramework || !(RSA.Create() is RSACryptoServiceProvider); + public bool SupportsPss { get; } = true; } public partial class RSAFactory diff --git a/src/System.Security.Cryptography.Algorithms/tests/HashAlgorithmTest.cs b/src/System.Security.Cryptography.Algorithms/tests/HashAlgorithmTest.cs index 249e6b6c56f7..97c6b9fb6e3b 100644 --- a/src/System.Security.Cryptography.Algorithms/tests/HashAlgorithmTest.cs +++ b/src/System.Security.Cryptography.Algorithms/tests/HashAlgorithmTest.cs @@ -79,15 +79,6 @@ private void VerifyTransformBlockOutput(byte[] block1, byte[] block2) } } - // https://github.com/dotnet/corefx/issues/18863 - private void ReinitilizeHashIfNetfx(HashAlgorithm hash) - { - if (PlatformDetection.IsFullFramework) - { - hash.Initialize(); - } - } - private void VerifyTransformBlockHash(byte[] block1, byte[] block2, byte[] expected, byte[] expectedEmpty) { using (HashAlgorithm hash = Create()) @@ -97,19 +88,16 @@ private void VerifyTransformBlockHash(byte[] block1, byte[] block2, byte[] expec hash.TransformFinalBlock(Array.Empty(), 0, 0); Assert.Equal(hash.Hash, expectedEmpty); - ReinitilizeHashIfNetfx(hash); hash.TransformFinalBlock(Array.Empty(), 0, 0); Assert.Equal(hash.Hash, expectedEmpty); // Verify Hash - ReinitilizeHashIfNetfx(hash); hash.TransformBlock(block1, 0, block1.Length, null, 0); hash.TransformFinalBlock(block2, 0, block2.Length); Assert.Equal(expected, hash.Hash); Assert.Equal(expected, hash.Hash); // .Hash doesn't clear hash // Verify bad State - ReinitilizeHashIfNetfx(hash); hash.TransformBlock(block1, 0, block1.Length, null, 0); // Can't access hash until TransformFinalBlock is called Assert.Throws(() => hash.Hash); @@ -117,7 +105,6 @@ private void VerifyTransformBlockHash(byte[] block1, byte[] block2, byte[] expec Assert.Equal(expected, hash.Hash); // Verify clean State - ReinitilizeHashIfNetfx(hash); hash.TransformFinalBlock(Array.Empty(), 0, 0); Assert.Equal(hash.Hash, expectedEmpty); } @@ -136,7 +123,6 @@ private void VerifyTransformBlockComputeHashInteraction(byte[] block1, byte[] bl Assert.Throws(() => hash.Hash); hash.TransformFinalBlock(Array.Empty(), 0, 0); Assert.Equal(expectedEmpty, hash.Hash); - ReinitilizeHashIfNetfx(hash); actual = hash.ComputeHash(Array.Empty(), 0, 0); Assert.Equal(expectedEmpty, actual); diff --git a/src/System.Security.Cryptography.Algorithms/tests/HmacSha384Tests.cs b/src/System.Security.Cryptography.Algorithms/tests/HmacSha384Tests.cs index 522b4b3a8766..59b349cdb817 100644 --- a/src/System.Security.Cryptography.Algorithms/tests/HmacSha384Tests.cs +++ b/src/System.Security.Cryptography.Algorithms/tests/HmacSha384Tests.cs @@ -21,7 +21,6 @@ protected override HashAlgorithm CreateHashAlgorithm() protected override int BlockSize { get { return 128; } } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, ".NET Framework implements this, Core does not")] public void ProduceLegacyHmacValues() { using (var h = new HMACSHA384()) diff --git a/src/System.Security.Cryptography.Algorithms/tests/HmacSha512Tests.cs b/src/System.Security.Cryptography.Algorithms/tests/HmacSha512Tests.cs index 5ad91e8dbbea..bae0e2e9a0d7 100644 --- a/src/System.Security.Cryptography.Algorithms/tests/HmacSha512Tests.cs +++ b/src/System.Security.Cryptography.Algorithms/tests/HmacSha512Tests.cs @@ -21,7 +21,6 @@ protected override HashAlgorithm CreateHashAlgorithm() protected override int BlockSize { get { return 128; } } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, ".NET Framework implements this, Core does not")] public void ProduceLegacyHmacValues() { using (var h = new HMACSHA512()) diff --git a/src/System.Security.Cryptography.Algorithms/tests/InvalidUsageTests.cs b/src/System.Security.Cryptography.Algorithms/tests/InvalidUsageTests.cs index 057ffd04f8c7..3c6b1b1ed289 100644 --- a/src/System.Security.Cryptography.Algorithms/tests/InvalidUsageTests.cs +++ b/src/System.Security.Cryptography.Algorithms/tests/InvalidUsageTests.cs @@ -24,7 +24,6 @@ public void InvalidHashCoreArgumentsFromDerivedType() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "NetFX throws a CryptoException because it lacks boundary checking in the Stream overload. See #19092.")] public void InvalidHashCoreArgumentsFromStream() { using (SHA1 sha1 = SHA1.Create()) diff --git a/src/System.Security.Cryptography.Algorithms/tests/RSACreateTests.cs b/src/System.Security.Cryptography.Algorithms/tests/RSACreateTests.cs index d28c096d121e..baf30e77ad5c 100644 --- a/src/System.Security.Cryptography.Algorithms/tests/RSACreateTests.cs +++ b/src/System.Security.Cryptography.Algorithms/tests/RSACreateTests.cs @@ -74,11 +74,7 @@ public static void CreateWithInvalidParameters() { RSAParameters parameters = TestData.RSA1032Parameters; parameters.Exponent = null; - - if (RSA.Create() is RSACng && PlatformDetection.IsFullFramework) - AssertExtensions.Throws(null, () => RSA.Create(parameters)); - else - Assert.Throws(() => RSA.Create(parameters)); + Assert.Throws(() => RSA.Create(parameters)); } } } diff --git a/src/System.Security.Cryptography.Algorithms/tests/System.Security.Cryptography.Algorithms.Tests.csproj b/src/System.Security.Cryptography.Algorithms/tests/System.Security.Cryptography.Algorithms.Tests.csproj index 9518b44c5e8d..5b07d2e1840b 100644 --- a/src/System.Security.Cryptography.Algorithms/tests/System.Security.Cryptography.Algorithms.Tests.csproj +++ b/src/System.Security.Cryptography.Algorithms/tests/System.Security.Cryptography.Algorithms.Tests.csproj @@ -1,7 +1,7 @@  {508A7D81-6462-459C-9F8F-B58FCCCFC8E7} - netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netstandard-Unix-Debug;netstandard-Unix-Release;netstandard-Windows_NT-Debug;netstandard-Windows_NT-Release + netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release diff --git a/src/System.Security.Cryptography.Algorithms/tests/TripleDesTests.cs b/src/System.Security.Cryptography.Algorithms/tests/TripleDesTests.cs index 3e29c445264c..3f674fd91be2 100644 --- a/src/System.Security.Cryptography.Algorithms/tests/TripleDesTests.cs +++ b/src/System.Security.Cryptography.Algorithms/tests/TripleDesTests.cs @@ -77,7 +77,6 @@ public static void TripleDesCreate() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Causing other tests to intermittently fail on netfx (https://github.com/dotnet/corefx/issues/18690)")] public static void EnsureLegalSizesValuesIsolated() { new TripleDESLegalSizesBreaker().Dispose(); diff --git a/src/System.Security.Cryptography.Cng/tests/Configurations.props b/src/System.Security.Cryptography.Cng/tests/Configurations.props index 869153f7b722..34adfc1fa63c 100644 --- a/src/System.Security.Cryptography.Cng/tests/Configurations.props +++ b/src/System.Security.Cryptography.Cng/tests/Configurations.props @@ -1,11 +1,11 @@  - netstandard-Windows_NT; netcoreapp-Windows_NT; net462-Windows_NT; net47-Windows_NT; netfx-Windows_NT; + uap-Windows_NT; \ No newline at end of file diff --git a/src/System.Security.Cryptography.Cng/tests/System.Security.Cryptography.Cng.Tests.csproj b/src/System.Security.Cryptography.Cng/tests/System.Security.Cryptography.Cng.Tests.csproj index 137a46d6485f..5edec2eb4ada 100644 --- a/src/System.Security.Cryptography.Cng/tests/System.Security.Cryptography.Cng.Tests.csproj +++ b/src/System.Security.Cryptography.Cng/tests/System.Security.Cryptography.Cng.Tests.csproj @@ -2,7 +2,7 @@ {FF53459F-66F7-4F00-8D36-DF440CE18419} $(DefineConstants);TESTING_CNG_IMPLEMENTATION - net462-Windows_NT-Debug;net462-Windows_NT-Release;net47-Windows_NT-Debug;net47-Windows_NT-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netfx-Windows_NT-Debug;netfx-Windows_NT-Release;netstandard-Windows_NT-Debug;netstandard-Windows_NT-Release + netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netfx-Windows_NT-Debug;netfx-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release @@ -160,8 +160,6 @@ CommonTest\System\Security\Cryptography\AlgorithmImplementations\RSA\SignVerify.netcoreapp.cs - - diff --git a/src/System.Security.Cryptography.Csp/tests/Configurations.props b/src/System.Security.Cryptography.Csp/tests/Configurations.props index 9f7fa7ad185b..20cb04040c9a 100644 --- a/src/System.Security.Cryptography.Csp/tests/Configurations.props +++ b/src/System.Security.Cryptography.Csp/tests/Configurations.props @@ -1,10 +1,9 @@  - netstandard-Windows_NT; netcoreapp-Windows_NT; - netstandard-Unix; netcoreapp-Unix; + uap-Windows_NT \ No newline at end of file diff --git a/src/System.Security.Cryptography.Csp/tests/System.Security.Cryptography.Csp.Tests.csproj b/src/System.Security.Cryptography.Csp/tests/System.Security.Cryptography.Csp.Tests.csproj index 021533f32133..3471016f0ed1 100644 --- a/src/System.Security.Cryptography.Csp/tests/System.Security.Cryptography.Csp.Tests.csproj +++ b/src/System.Security.Cryptography.Csp/tests/System.Security.Cryptography.Csp.Tests.csproj @@ -1,7 +1,7 @@ {A05C2EF2-A986-448C-9C63-735CC17409AA} - netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netstandard-Unix-Debug;netstandard-Unix-Release;netstandard-Windows_NT-Debug;netstandard-Windows_NT-Release + netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release diff --git a/src/System.Security.Cryptography.Encoding/tests/Configurations.props b/src/System.Security.Cryptography.Encoding/tests/Configurations.props index 2b7db4cef13b..f329ed58bff7 100644 --- a/src/System.Security.Cryptography.Encoding/tests/Configurations.props +++ b/src/System.Security.Cryptography.Encoding/tests/Configurations.props @@ -1,8 +1,9 @@  - netstandard-Unix; - netstandard-Windows_NT; + netcoreapp-Unix; + netcoreapp-Windows_NT; + uap-Windows_NT; \ No newline at end of file diff --git a/src/System.Security.Cryptography.Encoding/tests/System.Security.Cryptography.Encoding.Tests.csproj b/src/System.Security.Cryptography.Encoding/tests/System.Security.Cryptography.Encoding.Tests.csproj index ba32fda535c0..d3c75bd9cd32 100644 --- a/src/System.Security.Cryptography.Encoding/tests/System.Security.Cryptography.Encoding.Tests.csproj +++ b/src/System.Security.Cryptography.Encoding/tests/System.Security.Cryptography.Encoding.Tests.csproj @@ -2,7 +2,7 @@ {0581E9FA-D639-4B88-96D8-D092760F90B0} true - netstandard-Unix-Debug;netstandard-Unix-Release;netstandard-Windows_NT-Debug;netstandard-Windows_NT-Release + netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release diff --git a/src/System.Security.Cryptography.OpenSsl/tests/Configurations.props b/src/System.Security.Cryptography.OpenSsl/tests/Configurations.props index 03ab26ca4adb..6eee71ad3676 100644 --- a/src/System.Security.Cryptography.OpenSsl/tests/Configurations.props +++ b/src/System.Security.Cryptography.OpenSsl/tests/Configurations.props @@ -1,7 +1,6 @@  - netstandard-Unix; netcoreapp-Unix; diff --git a/src/System.Security.Cryptography.OpenSsl/tests/System.Security.Cryptography.OpenSsl.Tests.csproj b/src/System.Security.Cryptography.OpenSsl/tests/System.Security.Cryptography.OpenSsl.Tests.csproj index 6bbed61c970d..33f5416891e4 100644 --- a/src/System.Security.Cryptography.OpenSsl/tests/System.Security.Cryptography.OpenSsl.Tests.csproj +++ b/src/System.Security.Cryptography.OpenSsl/tests/System.Security.Cryptography.OpenSsl.Tests.csproj @@ -2,7 +2,7 @@ {E1DAF7B9-BECB-4D25-AABB-C9E0BC73C690} Windows_NT - netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netstandard-Unix-Debug;netstandard-Unix-Release + netcoreapp-Unix-Debug;netcoreapp-Unix-Release @@ -128,7 +128,7 @@ CommonTest\System\Security\Cryptography\AlgorithmImplementations\RSA\RSAXml.cs - + CommonTest\System\Security\Cryptography\AlgorithmImplementations\DSA\DSAKeyFileTests.cs diff --git a/src/System.Security.Cryptography.Pkcs/tests/Configurations.props b/src/System.Security.Cryptography.Pkcs/tests/Configurations.props index eb25881ac2c2..0d087997e600 100644 --- a/src/System.Security.Cryptography.Pkcs/tests/Configurations.props +++ b/src/System.Security.Cryptography.Pkcs/tests/Configurations.props @@ -4,7 +4,7 @@ netcoreapp-Windows_NT; netcoreapp; netfx-Windows_NT; - netstandard; + diff --git a/src/System.Security.Cryptography.Pkcs/tests/System.Security.Cryptography.Pkcs.Tests.csproj b/src/System.Security.Cryptography.Pkcs/tests/System.Security.Cryptography.Pkcs.Tests.csproj index 395e860a27ed..720838dc4f08 100644 --- a/src/System.Security.Cryptography.Pkcs/tests/System.Security.Cryptography.Pkcs.Tests.csproj +++ b/src/System.Security.Cryptography.Pkcs/tests/System.Security.Cryptography.Pkcs.Tests.csproj @@ -2,7 +2,12 @@ {2DD8DFFA-09FF-46C6-8313-4A9CC1849A44} true - netcoreapp-Debug;netcoreapp-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netfx-Windows_NT-Debug;netfx-Windows_NT-Release;netstandard-Debug;netstandard-Release + + netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netcoreapp-Debug;netcoreapp-Release;netfx-Windows_NT-Debug;netfx-Windows_NT-Release;uap-Debug;uap-Release--> diff --git a/src/System.Security.Cryptography.Primitives/tests/AsymmetricAlgorithm/Trivial.cs b/src/System.Security.Cryptography.Primitives/tests/AsymmetricAlgorithm/Trivial.cs index 929a1fae8210..fa7b01541049 100644 --- a/src/System.Security.Cryptography.Primitives/tests/AsymmetricAlgorithm/Trivial.cs +++ b/src/System.Security.Cryptography.Primitives/tests/AsymmetricAlgorithm/Trivial.cs @@ -42,7 +42,6 @@ public static void TestKeySize() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Throws NRE on netfx (https://github.com/dotnet/corefx/issues/18690)")] public static void ValidKeySizeUsesProperty() { using (AsymmetricAlgorithm aa = new DoesNotSetLegalKeySizesField()) diff --git a/src/System.Security.Cryptography.Primitives/tests/Configurations.props b/src/System.Security.Cryptography.Primitives/tests/Configurations.props index f5d3d45ffbf4..f97cd5ea7a97 100644 --- a/src/System.Security.Cryptography.Primitives/tests/Configurations.props +++ b/src/System.Security.Cryptography.Primitives/tests/Configurations.props @@ -2,7 +2,7 @@ netcoreapp; - netstandard; + uap; \ No newline at end of file diff --git a/src/System.Security.Cryptography.Primitives/tests/CryptoConfigTests.cs b/src/System.Security.Cryptography.Primitives/tests/CryptoConfigTests.cs index 9fbfe2a7d5c3..3a0c659a0cea 100644 --- a/src/System.Security.Cryptography.Primitives/tests/CryptoConfigTests.cs +++ b/src/System.Security.Cryptography.Primitives/tests/CryptoConfigTests.cs @@ -9,7 +9,6 @@ namespace System.Security.Cryptography.CryptoConfigTests public static class CryptoConfigTests { [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public static void DefaultStaticCreateMethods() { // .NET Core does not allow the base classes to pick an algorithm. diff --git a/src/System.Security.Cryptography.Primitives/tests/CryptographicException.cs b/src/System.Security.Cryptography.Primitives/tests/CryptographicException.cs index 0dac949320db..31422f5f94f3 100644 --- a/src/System.Security.Cryptography.Primitives/tests/CryptographicException.cs +++ b/src/System.Security.Cryptography.Primitives/tests/CryptographicException.cs @@ -17,14 +17,7 @@ public static void Ctor() Assert.NotNull(new CryptographicException().Message); Assert.Equal(message, new CryptographicException(message).Message); Assert.Equal(message + " 12345", new CryptographicException(message + " {0}", "12345").Message); - if (PlatformDetection.IsFullFramework) - { - Assert.Equal(unchecked((int)0x80070005), new CryptographicException(5).HResult); - } - else - { - Assert.Equal(5, new CryptographicException(5).HResult); - } + Assert.Equal(5, new CryptographicException(5).HResult); Assert.Same(inner, new CryptographicException(message, inner).InnerException); Assert.Equal(message, new CryptographicException(message, inner).Message); diff --git a/src/System.Security.Cryptography.Primitives/tests/HmacAlgorithmTest.cs b/src/System.Security.Cryptography.Primitives/tests/HmacAlgorithmTest.cs index 7818a6c6a55a..7af08badc5df 100644 --- a/src/System.Security.Cryptography.Primitives/tests/HmacAlgorithmTest.cs +++ b/src/System.Security.Cryptography.Primitives/tests/HmacAlgorithmTest.cs @@ -41,16 +41,8 @@ public void ResetAlgorithmName() // On desktop builds this next line will succeed (modulo FIPS prohibitions on MD5). // On CoreFX it throws. - if (PlatformDetection.IsFullFramework) - { - hmac.HashName = "MD5"; - Assert.Equal("MD5", hmac.HashName); - } - else - { - Assert.Throws(() => hmac.HashName = "MD5"); - Assert.Equal("SHA1", hmac.HashName); - } + Assert.Throws(() => hmac.HashName = "MD5"); + Assert.Equal("SHA1", hmac.HashName); } } @@ -80,14 +72,7 @@ public void TrivialDerivationThrows() hmac.Key = Array.Empty(); byte[] ignored; - if (PlatformDetection.IsFullFramework) - { - ignored = hmac.ComputeHash(Array.Empty()); - } - else - { - Assert.Throws(() => ignored = hmac.ComputeHash(Array.Empty())); - } + Assert.Throws(() => ignored = hmac.ComputeHash(Array.Empty())); } } diff --git a/src/System.Security.Cryptography.Primitives/tests/KeyedHashAlgorithmTests.cs b/src/System.Security.Cryptography.Primitives/tests/KeyedHashAlgorithmTests.cs index f3c5a589c635..ebe2960ada17 100644 --- a/src/System.Security.Cryptography.Primitives/tests/KeyedHashAlgorithmTests.cs +++ b/src/System.Security.Cryptography.Primitives/tests/KeyedHashAlgorithmTests.cs @@ -49,7 +49,6 @@ public void EnsureGetKeyCopies() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Throws NRE on netfx (https://github.com/dotnet/corefx/issues/18690)")] public void EnsureDisposeFreesKey() { byte[] key = new[] { (byte)0x00, (byte)0x01, (byte)0x02, (byte)0x03, (byte)0x04, (byte)0x05, }; @@ -65,7 +64,6 @@ public void EnsureDisposeFreesKey() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Throws NRE on netfx (https://github.com/dotnet/corefx/issues/18690)")] public void SetKeyNull() { using (var keyedHash = new TestKeyedHashAlgorithm()) diff --git a/src/System.Security.Cryptography.Primitives/tests/SymmetricAlgorithm/Trivial.cs b/src/System.Security.Cryptography.Primitives/tests/SymmetricAlgorithm/Trivial.cs index e96afa9b7a8d..c42d12a13719 100644 --- a/src/System.Security.Cryptography.Primitives/tests/SymmetricAlgorithm/Trivial.cs +++ b/src/System.Security.Cryptography.Primitives/tests/SymmetricAlgorithm/Trivial.cs @@ -117,15 +117,7 @@ public static void TestKey() try { byte[] hugeKey = new byte[536870917]; // value chosen so that when multiplied by 8 (bits) it overflows to the value 40 - if (PlatformDetection.IsFullFramework) - { - // This change should be ported to netfx - s.Key = hugeKey; - } - else - { - Assert.Throws(() => s.Key = hugeKey); - } + Assert.Throws(() => s.Key = hugeKey); } catch (OutOfMemoryException) { } // in case there isn't enough memory at test-time to allocate the large array } @@ -289,7 +281,6 @@ public static void SetKeySize_Uses_LegalKeySizesProperty() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Throws NRE on netfx (https://github.com/dotnet/corefx/issues/18690)")] public static void SetBlockSize_Uses_LegalBlockSizesProperty() { using (SymmetricAlgorithm s = new DoesNotSetKeySizesFields()) diff --git a/src/System.Security.Cryptography.Primitives/tests/System.Security.Cryptography.Primitives.Tests.csproj b/src/System.Security.Cryptography.Primitives/tests/System.Security.Cryptography.Primitives.Tests.csproj index 78778b2747d1..4418d2d87b2d 100644 --- a/src/System.Security.Cryptography.Primitives/tests/System.Security.Cryptography.Primitives.Tests.csproj +++ b/src/System.Security.Cryptography.Primitives/tests/System.Security.Cryptography.Primitives.Tests.csproj @@ -2,7 +2,7 @@ {101EB757-55A4-4F48-841C-C088640B8F57} - netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release + netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release diff --git a/src/System.Security.Cryptography.ProtectedData/tests/Configurations.props b/src/System.Security.Cryptography.ProtectedData/tests/Configurations.props index 611acec17f5f..dd6fb5e9c632 100644 --- a/src/System.Security.Cryptography.ProtectedData/tests/Configurations.props +++ b/src/System.Security.Cryptography.ProtectedData/tests/Configurations.props @@ -1,7 +1,9 @@  - netstandard-Windows_NT; + netcoreapp-Windows_NT; + netfx-Windows_NT; + uap-Windows_NT; \ No newline at end of file diff --git a/src/System.Security.Cryptography.ProtectedData/tests/System.Security.Cryptography.ProtectedData.Tests.csproj b/src/System.Security.Cryptography.ProtectedData/tests/System.Security.Cryptography.ProtectedData.Tests.csproj index 3c2e2e50fb48..e02a1be5fd18 100644 --- a/src/System.Security.Cryptography.ProtectedData/tests/System.Security.Cryptography.ProtectedData.Tests.csproj +++ b/src/System.Security.Cryptography.ProtectedData/tests/System.Security.Cryptography.ProtectedData.Tests.csproj @@ -2,7 +2,7 @@ {749ED7AD-E3C1-4611-99BD-C5D4B3934B3A} true - netstandard-Windows_NT-Debug;netstandard-Windows_NT-Release + netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netfx-Windows_NT-Debug;netfx-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release diff --git a/src/System.Security.Cryptography.X509Certificates/tests/CollectionTests.cs b/src/System.Security.Cryptography.X509Certificates/tests/CollectionTests.cs index f1d4fecb2ca7..e922cb332692 100644 --- a/src/System.Security.Cryptography.X509Certificates/tests/CollectionTests.cs +++ b/src/System.Security.Cryptography.X509Certificates/tests/CollectionTests.cs @@ -365,14 +365,7 @@ public static void X509Certificate2CollectionContains() // has been deliberately changed to no longer throw to match the behavior of // X509CertificateCollection.Contains and the IList.Contains implementation, which do not // throw. - if (PlatformDetection.IsFullFramework) - { - Assert.Throws(() => collection.Contains(null)); - } - else - { - Assert.False(collection.Contains(null)); - } + Assert.False(collection.Contains(null)); IList ilist = (IList)collection; Assert.True(ilist.Contains(c1)); @@ -466,7 +459,6 @@ public static void X509CertificateCollectionAsIList() [Fact] // On Desktop, list is untyped so it allows arbitrary types in it - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public static void X509CertificateCollectionAsIListBogusEntry() { using (X509Certificate2 c = new X509Certificate2()) diff --git a/src/System.Security.Cryptography.X509Certificates/tests/Configurations.props b/src/System.Security.Cryptography.X509Certificates/tests/Configurations.props index b098a67f398a..d90958480798 100644 --- a/src/System.Security.Cryptography.X509Certificates/tests/Configurations.props +++ b/src/System.Security.Cryptography.X509Certificates/tests/Configurations.props @@ -4,7 +4,6 @@ netcoreapp-OSX; netcoreapp-Unix; netcoreapp-Windows_NT; - netstandard; uap-Windows_NT; diff --git a/src/System.Security.Cryptography.X509Certificates/tests/FindTests.cs b/src/System.Security.Cryptography.X509Certificates/tests/FindTests.cs index 9c20dbf8c041..732cfdd0bef2 100644 --- a/src/System.Security.Cryptography.X509Certificates/tests/FindTests.cs +++ b/src/System.Security.Cryptography.X509Certificates/tests/FindTests.cs @@ -180,7 +180,6 @@ public static void FindByValidThumbprint() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "31463 is not fixed in NetFX")] public static void FindByThumbprint_WithLrm() { RunTest( @@ -683,7 +682,6 @@ public static void TestBySerialNumber_WithSpaces() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "31463 is not fixed in NetFX")] public static void TestBySerialNumber_WithLRM() { // Hex string is also an allowed input format and case-blind @@ -773,7 +771,6 @@ public static void TestBySubjectKeyIdentifier_ExtensionPresent(string subjectKey // Should ignore Left-to-right mark \u200E [Theory] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "31463 is not fixed in NetFX")] [InlineData(LeftToRightMark + "59 71 A6 5A 33 4D DA 98 07 80 FF 84 1E BE 87 F9 72 32 41 F2")] // Compat: Lone trailing nybbles are ignored [InlineData(LeftToRightMark + "59 71 A6 5A 33 4D DA 98 07 80 FF 84 1E BE 87 F9 72 32 41 F2 3")] diff --git a/src/System.Security.Cryptography.X509Certificates/tests/ImportTests.cs b/src/System.Security.Cryptography.X509Certificates/tests/ImportTests.cs index 05ec5a950074..4f93181657f3 100644 --- a/src/System.Security.Cryptography.X509Certificates/tests/ImportTests.cs +++ b/src/System.Security.Cryptography.X509Certificates/tests/ImportTests.cs @@ -29,24 +29,12 @@ public static void TestImportNotSupported_X509Certificate2() private static void VerifyImportNotSupported(X509Certificate c) { - if (PlatformDetection.IsFullFramework) - { - Assert.Throws(() => c.Import(Array.Empty())); - Assert.Throws(() => c.Import(string.Empty)); - Assert.Throws(() => c.Import(Array.Empty(), string.Empty, X509KeyStorageFlags.DefaultKeySet)); - Assert.Throws(() => c.Import(Array.Empty(), new SecureString(), X509KeyStorageFlags.DefaultKeySet)); - Assert.Throws(() => c.Import(string.Empty, string.Empty, X509KeyStorageFlags.DefaultKeySet)); - Assert.Throws(() => c.Import(string.Empty, new SecureString(), X509KeyStorageFlags.DefaultKeySet)); - } - else - { - Assert.Throws(() => c.Import(Array.Empty())); - Assert.Throws(() => c.Import(string.Empty)); - Assert.Throws(() => c.Import(Array.Empty(), string.Empty, X509KeyStorageFlags.DefaultKeySet)); - Assert.Throws(() => c.Import(Array.Empty(), new SecureString(), X509KeyStorageFlags.DefaultKeySet)); - Assert.Throws(() => c.Import(string.Empty, string.Empty, X509KeyStorageFlags.DefaultKeySet)); - Assert.Throws(() => c.Import(string.Empty, new SecureString(), X509KeyStorageFlags.DefaultKeySet)); - } + Assert.Throws(() => c.Import(Array.Empty())); + Assert.Throws(() => c.Import(string.Empty)); + Assert.Throws(() => c.Import(Array.Empty(), string.Empty, X509KeyStorageFlags.DefaultKeySet)); + Assert.Throws(() => c.Import(Array.Empty(), new SecureString(), X509KeyStorageFlags.DefaultKeySet)); + Assert.Throws(() => c.Import(string.Empty, string.Empty, X509KeyStorageFlags.DefaultKeySet)); + Assert.Throws(() => c.Import(string.Empty, new SecureString(), X509KeyStorageFlags.DefaultKeySet)); } } } diff --git a/src/System.Security.Cryptography.X509Certificates/tests/PfxTests.cs b/src/System.Security.Cryptography.X509Certificates/tests/PfxTests.cs index 556d25068613..782f78e780f5 100644 --- a/src/System.Security.Cryptography.X509Certificates/tests/PfxTests.cs +++ b/src/System.Security.Cryptography.X509Certificates/tests/PfxTests.cs @@ -129,11 +129,8 @@ public static void TestPrivateKeyProperty() VerifyPrivateKey((RSA)alg); // Currently unable to set PrivateKey - if (!PlatformDetection.IsFullFramework) - { - Assert.Throws(() => c.PrivateKey = null); - Assert.Throws(() => c.PrivateKey = alg); - } + Assert.Throws(() => c.PrivateKey = null); + Assert.Throws(() => c.PrivateKey = alg); } } @@ -188,10 +185,7 @@ public static void ECDsaPrivateKeyProperty_WindowsPfx() Assert.Null(pubOnly.PrivateKey); // Currently unable to set PrivateKey - if (!PlatformDetection.IsFullFramework) - { - Assert.Throws(() => cert.PrivateKey = null); - } + Assert.Throws(() => cert.PrivateKey = null); using (var privKey = cert.GetECDsaPrivateKey()) { diff --git a/src/System.Security.Cryptography.X509Certificates/tests/PropsTests.cs b/src/System.Security.Cryptography.X509Certificates/tests/PropsTests.cs index 73d71ce3261a..e767991fbee2 100644 --- a/src/System.Security.Cryptography.X509Certificates/tests/PropsTests.cs +++ b/src/System.Security.Cryptography.X509Certificates/tests/PropsTests.cs @@ -415,56 +415,48 @@ public static void ComplexGetNameInfo_EmailName_Issuer() } [Fact] - [ActiveIssue(30561, TargetFrameworkMonikers.NetFramework)] public static void ComplexGetNameInfo_UpnName_Cert() { TestComplexGetNameInfo("subjectupn1@example.org", X509NameType.UpnName, false); } [Fact] - [ActiveIssue(30561, TargetFrameworkMonikers.NetFramework)] public static void ComplexGetNameInfo_UpnName_Issuer() { TestComplexGetNameInfo("issuerupn1@example.org", X509NameType.UpnName, true); } [Fact] - [ActiveIssue(30561, TargetFrameworkMonikers.NetFramework)] public static void ComplexGetNameInfo_DnsName_Cert() { TestComplexGetNameInfo("dns1.subject.example.org", X509NameType.DnsName, false); } [Fact] - [ActiveIssue(30561, TargetFrameworkMonikers.NetFramework)] public static void ComplexGetNameInfo_DnsName_Issuer() { TestComplexGetNameInfo("dns1.issuer.example.org", X509NameType.DnsName, true); } [Fact] - [ActiveIssue(30561, TargetFrameworkMonikers.NetFramework)] public static void ComplexGetNameInfo_DnsFromAlternativeName_Cert() { TestComplexGetNameInfo("dns1.subject.example.org", X509NameType.DnsFromAlternativeName, false); } [Fact] - [ActiveIssue(30561, TargetFrameworkMonikers.NetFramework)] public static void ComplexGetNameInfo_DnsFromAlternativeName_Issuer() { TestComplexGetNameInfo("dns1.issuer.example.org", X509NameType.DnsFromAlternativeName, true); } [Fact] - [ActiveIssue(30561, TargetFrameworkMonikers.NetFramework)] public static void ComplexGetNameInfo_UrlName_Cert() { TestComplexGetNameInfo("http://uri1.subject.example.org/", X509NameType.UrlName, false); } [Fact] - [ActiveIssue(30561, TargetFrameworkMonikers.NetFramework)] public static void ComplexGetNameInfo_UrlName_Issuer() { TestComplexGetNameInfo("http://uri1.issuer.example.org/", X509NameType.UrlName, true); diff --git a/src/System.Security.Cryptography.X509Certificates/tests/PublicKeyTests.cs b/src/System.Security.Cryptography.X509Certificates/tests/PublicKeyTests.cs index b93f842f70df..3db6d14125de 100644 --- a/src/System.Security.Cryptography.X509Certificates/tests/PublicKeyTests.cs +++ b/src/System.Security.Cryptography.X509Certificates/tests/PublicKeyTests.cs @@ -310,7 +310,6 @@ public static void TestKey_RSA384_ValidatesSignature() } [Theory, MemberData(nameof(BrainpoolCurves))] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "brainpool GetECDsaPublicKey fails on current netfx")] public static void TestKey_ECDsabrainpool_PublicKey(byte[] curveData, byte[] notUsed) { byte[] helloBytes = Encoding.ASCII.GetBytes("Hello"); @@ -391,7 +390,6 @@ public static void TestECDsaPublicKey_ValidatesSignature() } [Theory, MemberData(nameof(BrainpoolCurves))] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "brainpool GetECDsaPublicKey fails on current netfx")] public static void TestECDsaPublicKey_BrainpoolP160r1_ValidatesSignature(byte[] curveData, byte[] existingSignature) { byte[] helloBytes = Encoding.ASCII.GetBytes("Hello"); @@ -552,7 +550,6 @@ public static void TestKey_ECDsaCng521() [Fact] [PlatformSpecific(TestPlatforms.Windows)] // Uses P/Invokes - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "brainpool GetECDsaPublicKey fails on current netfx")] public static void TestKey_BrainpoolP160r1() { if (PlatformDetection.WindowsVersion >= 10) diff --git a/src/System.Security.Cryptography.X509Certificates/tests/System.Security.Cryptography.X509Certificates.Tests.csproj b/src/System.Security.Cryptography.X509Certificates/tests/System.Security.Cryptography.X509Certificates.Tests.csproj index a673997eb722..3232de0a0bd8 100644 --- a/src/System.Security.Cryptography.X509Certificates/tests/System.Security.Cryptography.X509Certificates.Tests.csproj +++ b/src/System.Security.Cryptography.X509Certificates/tests/System.Security.Cryptography.X509Certificates.Tests.csproj @@ -9,7 +9,7 @@ $(DefineConstants);HAVE_THUMBPRINT_OVERLOADS $(DefineConstants);Unix true - netcoreapp-OSX-Debug;netcoreapp-OSX-Release;netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netstandard-Debug;netstandard-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release + netcoreapp-OSX-Debug;netcoreapp-OSX-Release;netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release diff --git a/src/System.Security.Cryptography.Xml/tests/Configurations.props b/src/System.Security.Cryptography.Xml/tests/Configurations.props index 37db7ab791da..b526f4599ca3 100644 --- a/src/System.Security.Cryptography.Xml/tests/Configurations.props +++ b/src/System.Security.Cryptography.Xml/tests/Configurations.props @@ -2,7 +2,8 @@ netcoreapp; - netstandard; + netfx; + uap; diff --git a/src/System.Security.Cryptography.Xml/tests/System.Security.Cryptography.Xml.Tests.csproj b/src/System.Security.Cryptography.Xml/tests/System.Security.Cryptography.Xml.Tests.csproj index aadd91b3b9bf..1a128f8c4ae9 100644 --- a/src/System.Security.Cryptography.Xml/tests/System.Security.Cryptography.Xml.Tests.csproj +++ b/src/System.Security.Cryptography.Xml/tests/System.Security.Cryptography.Xml.Tests.csproj @@ -2,7 +2,7 @@ Library {4A85232C-E914-4E06-8542-26DAF4B22D60} - netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release + netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release;uap-Debug;uap-Release System.Security.Cryptography.Xml.Tests diff --git a/src/System.Security.Permissions/tests/Configurations.props b/src/System.Security.Permissions/tests/Configurations.props index 9521391d6cbc..f97cd5ea7a97 100644 --- a/src/System.Security.Permissions/tests/Configurations.props +++ b/src/System.Security.Permissions/tests/Configurations.props @@ -1,8 +1,8 @@  - netstandard; - netfx; + netcoreapp; + uap; \ No newline at end of file diff --git a/src/System.Security.Permissions/tests/SecurityElementTests.cs b/src/System.Security.Permissions/tests/SecurityElementTests.cs index bc0847235483..2f5a2496e05c 100644 --- a/src/System.Security.Permissions/tests/SecurityElementTests.cs +++ b/src/System.Security.Permissions/tests/SecurityElementTests.cs @@ -94,12 +94,9 @@ public void Constructor1_Tag_Invalid(string tagName) { Assert.Equal(typeof(ArgumentException), ex.GetType()); Assert.Null(ex.InnerException); - if (!PlatformDetection.IsNetNative) // .NET Native toolchain optimizes away exception messages and paramnames. - { - Assert.NotNull(ex.Message); - Assert.True(ex.Message.IndexOf(tagName) != -1); - Assert.Null(ex.ParamName); - } + Assert.NotNull(ex.Message); + Assert.True(ex.Message.IndexOf(tagName) != -1); + Assert.Null(ex.ParamName); } } @@ -115,13 +112,9 @@ public void Constructor1_Tag_Null() { Assert.Equal(typeof(ArgumentNullException), ex.GetType()); Assert.Null(ex.InnerException); - if (!PlatformDetection.IsNetNative) // .NET Native toolchain optimizes away exception messages and paramnames. - { - - Assert.NotNull(ex.Message); - Assert.NotNull(ex.ParamName); - Assert.Equal("tag", ex.ParamName); - } + Assert.NotNull(ex.Message); + Assert.NotNull(ex.ParamName); + Assert.Equal("tag", ex.ParamName); } } @@ -149,12 +142,9 @@ public void Constructor2_Tag_Invalid(string invalid) { Assert.Equal(typeof(ArgumentException), ex.GetType()); Assert.Null(ex.InnerException); - if (!PlatformDetection.IsNetNative) // .NET Native toolchain optimizes away exception messages and paramnames. - { - Assert.NotNull(ex.Message); - Assert.True(ex.Message.IndexOf(invalid) != -1); - Assert.Null(ex.ParamName); - } + Assert.NotNull(ex.Message); + Assert.True(ex.Message.IndexOf(invalid) != -1); + Assert.Null(ex.ParamName); } } @@ -170,12 +160,9 @@ public void Constructor2_Tag_Null() { Assert.Equal(typeof(ArgumentNullException), ex.GetType()); Assert.Null(ex.InnerException); - if (!PlatformDetection.IsNetNative) // .NET Native toolchain optimizes away exception messages and paramnames. - { - Assert.NotNull(ex.Message); - Assert.NotNull(ex.ParamName); - Assert.Equal("tag", ex.ParamName); - } + Assert.NotNull(ex.Message); + Assert.NotNull(ex.ParamName); + Assert.Equal("tag", ex.ParamName); } } @@ -202,12 +189,9 @@ public void AddAttribute_Name_Null() { Assert.Equal(typeof(ArgumentNullException), ex.GetType()); Assert.Null(ex.InnerException); - if (!PlatformDetection.IsNetNative) // .NET Native toolchain optimizes away exception messages and paramnames. - { - Assert.NotNull(ex.Message); - Assert.NotNull(ex.ParamName); - Assert.Equal("name", ex.ParamName); - } + Assert.NotNull(ex.Message); + Assert.NotNull(ex.ParamName); + Assert.Equal("name", ex.ParamName); } } @@ -224,12 +208,9 @@ public void AddAttribute_Value_Null() { Assert.Equal(typeof(ArgumentNullException), ex.GetType()); Assert.Null(ex.InnerException); - if (!PlatformDetection.IsNetNative) // .NET Native toolchain optimizes away exception messages and paramnames. - { - Assert.NotNull(ex.Message); - Assert.NotNull(ex.ParamName); - Assert.Equal("value", ex.ParamName); - } + Assert.NotNull(ex.Message); + Assert.NotNull(ex.ParamName); + Assert.Equal("value", ex.ParamName); } } @@ -291,12 +272,9 @@ public void AddChild_Null() { Assert.Equal(typeof(ArgumentNullException), ex.GetType()); Assert.Null(ex.InnerException); - if (!PlatformDetection.IsNetNative) // .NET Native toolchain optimizes away exception messages and paramnames. - { - Assert.NotNull(ex.Message); - Assert.NotNull(ex.ParamName); - Assert.Equal("child", ex.ParamName); - } + Assert.NotNull(ex.Message); + Assert.NotNull(ex.ParamName); + Assert.Equal("child", ex.ParamName); } } @@ -334,12 +312,9 @@ public void Attributes_Value_Invalid() { Assert.Equal(typeof(ArgumentException), ex.GetType()); Assert.Null(ex.InnerException); - if (!PlatformDetection.IsNetNative) // .NET Native toolchain optimizes away exception messages and paramnames. - { - Assert.NotNull(ex.Message); - Assert.True(ex.Message.IndexOf("\"invalid\"") != -1); - Assert.Null(ex.ParamName); - } + Assert.NotNull(ex.Message); + Assert.True(ex.Message.IndexOf("\"invalid\"") != -1); + Assert.Null(ex.ParamName); } } @@ -442,12 +417,9 @@ public void SearchForChildByTag_Null() { Assert.Equal(typeof(ArgumentNullException), ex.GetType()); Assert.Null(ex.InnerException); - if (!PlatformDetection.IsNetNative) // .NET Native toolchain optimizes away exception messages and paramnames. - { - Assert.NotNull(ex.Message); - Assert.NotNull(ex.ParamName); - Assert.Equal("tag", ex.ParamName); - } + Assert.NotNull(ex.Message); + Assert.NotNull(ex.ParamName); + Assert.Equal("tag", ex.ParamName); } } @@ -479,12 +451,9 @@ public void SearchForTextOfTag_Tag_Null() { Assert.Equal(typeof(ArgumentNullException), ex.GetType()); Assert.Null(ex.InnerException); - if (!PlatformDetection.IsNetNative) // .NET Native toolchain optimizes away exception messages and paramnames. - { - Assert.NotNull(ex.Message); - Assert.NotNull(ex.ParamName); - Assert.Equal("tag", ex.ParamName); - } + Assert.NotNull(ex.Message); + Assert.NotNull(ex.ParamName); + Assert.Equal("tag", ex.ParamName); } } @@ -536,12 +505,9 @@ public void Tag_Invalid(string invalid) { Assert.Equal(typeof(ArgumentException), ex.GetType()); Assert.Null(ex.InnerException); - if (!PlatformDetection.IsNetNative) // .NET Native toolchain optimizes away exception messages and paramnames. - { - Assert.NotNull(ex.Message); - Assert.True(ex.Message.IndexOf(invalid) != -1); - Assert.Null(ex.ParamName); - } + Assert.NotNull(ex.Message); + Assert.True(ex.Message.IndexOf(invalid) != -1); + Assert.Null(ex.ParamName); } } @@ -558,12 +524,9 @@ public void Tag_Null() { Assert.Equal(typeof(ArgumentNullException), ex.GetType()); Assert.Null(ex.InnerException); - if (!PlatformDetection.IsNetNative) // .NET Native toolchain optimizes away exception messages and paramnames. - { - Assert.NotNull(ex.Message); - Assert.NotNull(ex.ParamName); - Assert.Equal("Tag", ex.ParamName); - } + Assert.NotNull(ex.Message); + Assert.NotNull(ex.ParamName); + Assert.Equal("Tag", ex.ParamName); } } @@ -596,12 +559,9 @@ public void Text_Invalid(string invalid) { Assert.Equal(typeof(ArgumentException), ex.GetType()); Assert.Null(ex.InnerException); - if (!PlatformDetection.IsNetNative) // .NET Native toolchain optimizes away exception messages and paramnames. - { - Assert.NotNull(ex.Message); - Assert.True(ex.Message.IndexOf(invalid) != -1); - Assert.Null(ex.ParamName); - } + Assert.NotNull(ex.Message); + Assert.True(ex.Message.IndexOf(invalid) != -1); + Assert.Null(ex.ParamName); } } @@ -628,12 +588,9 @@ public void FromString_Null() { Assert.Equal(typeof(ArgumentNullException), ex.GetType()); Assert.Null(ex.InnerException); - if (!PlatformDetection.IsNetNative) // .NET Native toolchain optimizes away exception messages and paramnames. - { - Assert.NotNull(ex.Message); - Assert.NotNull(ex.ParamName); - Assert.Equal("xml", ex.ParamName); - } + Assert.NotNull(ex.Message); + Assert.NotNull(ex.ParamName); + Assert.Equal("xml", ex.ParamName); } } } diff --git a/src/System.Security.Permissions/tests/System.Security.Permissions.Tests.csproj b/src/System.Security.Permissions/tests/System.Security.Permissions.Tests.csproj index 4578a486260b..aea1da11fc73 100644 --- a/src/System.Security.Permissions/tests/System.Security.Permissions.Tests.csproj +++ b/src/System.Security.Permissions/tests/System.Security.Permissions.Tests.csproj @@ -1,10 +1,9 @@ {7517F1E9-EEB4-4676-A054-CE4A44A66B66} - netfx-Debug;netfx-Release;netstandard-Debug;netstandard-Release + netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release - - + diff --git a/src/System.Security.Principal.Windows/tests/Configurations.props b/src/System.Security.Principal.Windows/tests/Configurations.props index 611acec17f5f..dd6fb5e9c632 100644 --- a/src/System.Security.Principal.Windows/tests/Configurations.props +++ b/src/System.Security.Principal.Windows/tests/Configurations.props @@ -1,7 +1,9 @@  - netstandard-Windows_NT; + netcoreapp-Windows_NT; + netfx-Windows_NT; + uap-Windows_NT; \ No newline at end of file diff --git a/src/System.Security.Principal.Windows/tests/System.Security.Principal.Windows.Tests.csproj b/src/System.Security.Principal.Windows/tests/System.Security.Principal.Windows.Tests.csproj index 19a7236a2106..f7ac5cd9c8f4 100644 --- a/src/System.Security.Principal.Windows/tests/System.Security.Principal.Windows.Tests.csproj +++ b/src/System.Security.Principal.Windows/tests/System.Security.Principal.Windows.Tests.csproj @@ -2,7 +2,7 @@ {6C36F3AC-54A1-4021-9F5D-CDEFF7347277} true - netstandard-Windows_NT-Debug;netstandard-Windows_NT-Release + netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netfx-Windows_NT-Debug;netfx-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release diff --git a/src/System.Security.Principal.Windows/tests/WellKnownSidTypeTests.cs b/src/System.Security.Principal.Windows/tests/WellKnownSidTypeTests.cs index daf2cc267935..cb103b7695a7 100644 --- a/src/System.Security.Principal.Windows/tests/WellKnownSidTypeTests.cs +++ b/src/System.Security.Principal.Windows/tests/WellKnownSidTypeTests.cs @@ -86,7 +86,7 @@ public void CanCreateSecurityIdentifierFromWellKnownSidType(WellKnownSidType sid } } - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "This SidTypes are only available in .NET Core")] +#if netcoreapp [ConditionalTheory(nameof(AccountIsDomainJoined))] [InlineData(WellKnownSidType.WinBuiltinDCOMUsersSid)] [InlineData(WellKnownSidType.WinBuiltinIUsersSid)] @@ -145,6 +145,7 @@ public void CreatingSecurityIdentifierOutsideWellKnownSidTypeDefinedRangeThrowsE var currentDomainSid = WindowsIdentity.GetCurrent().Owner.AccountDomainSid; AssertExtensions.Throws("sidType", () => new SecurityIdentifier(sidType, currentDomainSid)); } + #endif [Fact] public void MaxDefinedHasLegacyValue() diff --git a/src/System.Security.SecureString/tests/Configurations.props b/src/System.Security.SecureString/tests/Configurations.props index 581054d46db4..f97cd5ea7a97 100644 --- a/src/System.Security.SecureString/tests/Configurations.props +++ b/src/System.Security.SecureString/tests/Configurations.props @@ -1,7 +1,8 @@  - netstandard; + netcoreapp; + uap; \ No newline at end of file diff --git a/src/System.Security.SecureString/tests/System.Security.SecureString.Tests.csproj b/src/System.Security.SecureString/tests/System.Security.SecureString.Tests.csproj index 68377ffecdc4..a4ff66b53dbf 100644 --- a/src/System.Security.SecureString/tests/System.Security.SecureString.Tests.csproj +++ b/src/System.Security.SecureString/tests/System.Security.SecureString.Tests.csproj @@ -2,7 +2,7 @@ {69609238-62C7-479D-A8CE-709F41101D3C} true - netstandard-Debug;netstandard-Release + netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release true diff --git a/src/System.ServiceModel.Syndication/tests/Configurations.props b/src/System.ServiceModel.Syndication/tests/Configurations.props index f5d3d45ffbf4..c3d0d53eb793 100644 --- a/src/System.ServiceModel.Syndication/tests/Configurations.props +++ b/src/System.ServiceModel.Syndication/tests/Configurations.props @@ -2,7 +2,8 @@ netcoreapp; - netstandard; + netfx; + uap; \ No newline at end of file diff --git a/src/System.ServiceModel.Syndication/tests/System.ServiceModel.Syndication.Tests.csproj b/src/System.ServiceModel.Syndication/tests/System.ServiceModel.Syndication.Tests.csproj index d7021a0d5695..30f3e66bd2e2 100644 --- a/src/System.ServiceModel.Syndication/tests/System.ServiceModel.Syndication.Tests.csproj +++ b/src/System.ServiceModel.Syndication/tests/System.ServiceModel.Syndication.Tests.csproj @@ -1,7 +1,7 @@ {A622B2C0-DD74-4218-9CF0-F9B2E52F4E91} - netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release + netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release;uap-Debug;uap-Release diff --git a/src/System.Text.Encoding.CodePages/tests/Configurations.props b/src/System.Text.Encoding.CodePages/tests/Configurations.props index 581054d46db4..c3d0d53eb793 100644 --- a/src/System.Text.Encoding.CodePages/tests/Configurations.props +++ b/src/System.Text.Encoding.CodePages/tests/Configurations.props @@ -1,7 +1,9 @@  - netstandard; + netcoreapp; + netfx; + uap; \ No newline at end of file diff --git a/src/System.Text.Encoding.CodePages/tests/System.Text.Encoding.CodePages.Tests.csproj b/src/System.Text.Encoding.CodePages/tests/System.Text.Encoding.CodePages.Tests.csproj index 05c0f7162ced..59a0f76ab6f3 100644 --- a/src/System.Text.Encoding.CodePages/tests/System.Text.Encoding.CodePages.Tests.csproj +++ b/src/System.Text.Encoding.CodePages/tests/System.Text.Encoding.CodePages.Tests.csproj @@ -2,7 +2,7 @@ {835AD07B-7C9A-406F-B16F-59B3B0D017A4} true - netstandard-Debug;netstandard-Release + netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release;uap-Debug;uap-Release diff --git a/src/System.Text.Encoding.Extensions/tests/Configurations.props b/src/System.Text.Encoding.Extensions/tests/Configurations.props index 581054d46db4..f97cd5ea7a97 100644 --- a/src/System.Text.Encoding.Extensions/tests/Configurations.props +++ b/src/System.Text.Encoding.Extensions/tests/Configurations.props @@ -1,7 +1,8 @@  - netstandard; + netcoreapp; + uap; \ No newline at end of file diff --git a/src/System.Text.Encoding.Extensions/tests/System.Text.Encoding.Extensions.Tests.csproj b/src/System.Text.Encoding.Extensions/tests/System.Text.Encoding.Extensions.Tests.csproj index b7fc315313bb..66c3b58ee42b 100644 --- a/src/System.Text.Encoding.Extensions/tests/System.Text.Encoding.Extensions.Tests.csproj +++ b/src/System.Text.Encoding.Extensions/tests/System.Text.Encoding.Extensions.Tests.csproj @@ -2,7 +2,7 @@ {037D5B14-EEE1-43C4-8AA8-9F276C0C10CF} true - netstandard-Debug;netstandard-Release + netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release true diff --git a/src/System.Text.Encoding/tests/Configurations.props b/src/System.Text.Encoding/tests/Configurations.props index f5d3d45ffbf4..f97cd5ea7a97 100644 --- a/src/System.Text.Encoding/tests/Configurations.props +++ b/src/System.Text.Encoding/tests/Configurations.props @@ -2,7 +2,7 @@ netcoreapp; - netstandard; + uap; \ No newline at end of file diff --git a/src/System.Text.Encoding/tests/DecoderFallback/DecoderFallbackTests.cs b/src/System.Text.Encoding/tests/DecoderFallback/DecoderFallbackTests.cs index b2ee4caaacc2..dd785a97450b 100644 --- a/src/System.Text.Encoding/tests/DecoderFallback/DecoderFallbackTests.cs +++ b/src/System.Text.Encoding/tests/DecoderFallback/DecoderFallbackTests.cs @@ -34,7 +34,6 @@ public override bool Fallback(byte[] bytesUnknown, int index) } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Issue #29898 is not fixed in the full framework yet")] public static void TestDecoderFallbackIndex() { // This test case ensuring when we fallback, we'll never encounter a negative index in diff --git a/src/System.Text.Encoding/tests/Encoder/EncoderConvert2.cs b/src/System.Text.Encoding/tests/Encoder/EncoderConvert2.cs index 9db06bdf0529..6a97c676d914 100644 --- a/src/System.Text.Encoding/tests/Encoder/EncoderConvert2.cs +++ b/src/System.Text.Encoding/tests/Encoder/EncoderConvert2.cs @@ -210,7 +210,6 @@ public void EncoderASCIIConvertUnicodeCharArrayPartial() // Call Convert to convert partial of a Unicode character array with UTF8 encoder [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindowsSubsystemForLinux))] // [ActiveIssue(11057)] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "coreclr #23020 is not fixed in netfx.")] public void EncoderUTF8ConvertUnicodeCharArrayPartial() { char[] chars = "\uD83D\uDE01Test".ToCharArray(); @@ -231,7 +230,6 @@ public void EncoderUTF8ConvertUnicodeCharArrayPartial() // Call Convert to convert partial of a ASCII+Unicode character array with ASCII encoder [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindowsSubsystemForLinux))] // [ActiveIssue(11057)] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "coreclr #23020 is not fixed in netfx.")] public void EncoderASCIIConvertMixedASCIIUnicodeCharArrayPartial() { char[] chars = "T\uD83D\uDE01est".ToCharArray(); @@ -254,7 +252,6 @@ public void EncoderASCIIConvertMixedASCIIUnicodeCharArrayPartial() // Call Convert to convert partial of a ASCII+Unicode character array with UTF8 encoder [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindowsSubsystemForLinux))] // [ActiveIssue(11057)] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "coreclr #23020 is not fixed in netfx.")] public void EncoderUTF8ConvertMixedASCIIUnicodeCharArrayPartial() { char[] chars = "T\uD83D\uDE01est".ToCharArray(); diff --git a/src/System.Text.Encoding/tests/Encoding/Encoding.cs b/src/System.Text.Encoding/tests/Encoding/Encoding.cs index c29aea6bede4..6da821e40373 100644 --- a/src/System.Text.Encoding/tests/Encoding/Encoding.cs +++ b/src/System.Text.Encoding/tests/Encoding/Encoding.cs @@ -45,7 +45,6 @@ public static void DefaultEncodingTest() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Full framework uses system ACP and not UTF8")] public static void DefaultEncodingBOMTest() { UTF8Encoding defaultEncoding = Encoding.Default as UTF8Encoding; diff --git a/src/System.Text.Encoding/tests/Fallback/EncoderExceptionFallbackTests.cs b/src/System.Text.Encoding/tests/Fallback/EncoderExceptionFallbackTests.cs index 8096a76c1698..7bc56687322f 100644 --- a/src/System.Text.Encoding/tests/Fallback/EncoderExceptionFallbackTests.cs +++ b/src/System.Text.Encoding/tests/Fallback/EncoderExceptionFallbackTests.cs @@ -49,7 +49,6 @@ public void CreateFallbackBuffer() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public void CreateFallbackBuffer_Fallback_InvalidSurrogateChars_ThrowsArgumentOutOfRangeException() { EncoderFallbackBuffer buffer = new EncoderExceptionFallback().CreateFallbackBuffer(); @@ -57,15 +56,5 @@ public void CreateFallbackBuffer_Fallback_InvalidSurrogateChars_ThrowsArgumentOu AssertExtensions.Throws("charUnknownHigh", () => buffer.Fallback('a', '\uDC00', 0)); AssertExtensions.Throws("charUnknownLow", () => buffer.Fallback('\uD800', 'a', 0)); } - - [Fact] - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)] - public void CreateFallbackBuffer_Fallback_InvalidSurrogateChars_ThrowsArgumentOutOfRangeException_Desktop() - { - EncoderFallbackBuffer buffer = new EncoderExceptionFallback().CreateFallbackBuffer(); - - AssertExtensions.Throws("charUnknownHigh", () => buffer.Fallback('a', '\uDC00', 0)); - AssertExtensions.Throws("CharUnknownLow", () => buffer.Fallback('\uD800', 'a', 0)); - } } } diff --git a/src/System.Text.Encoding/tests/Fallback/EncoderReplacementFallbackTests.cs b/src/System.Text.Encoding/tests/Fallback/EncoderReplacementFallbackTests.cs index f95529302cef..37bb87285290 100644 --- a/src/System.Text.Encoding/tests/Fallback/EncoderReplacementFallbackTests.cs +++ b/src/System.Text.Encoding/tests/Fallback/EncoderReplacementFallbackTests.cs @@ -104,7 +104,6 @@ public void CreateFallbackBuffer_Fallback_Char_Char(string replacement, bool exp } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public void CreateFallbackBuffer_Fallback_InvalidSurrogateChars_ThrowsArgumentOutOfRangeException() { EncoderFallbackBuffer buffer = new EncoderReplacementFallback().CreateFallbackBuffer(); @@ -112,15 +111,5 @@ public void CreateFallbackBuffer_Fallback_InvalidSurrogateChars_ThrowsArgumentOu AssertExtensions.Throws("charUnknownHigh", () => buffer.Fallback('a', '\uDC00', 0)); AssertExtensions.Throws("charUnknownLow", () => buffer.Fallback('\uD800', 'a', 0)); } - - [Fact] - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)] - public void CreateFallbackBuffer_Fallback_InvalidSurrogateChars_ThrowsArgumentOutOfRangeException_Desktop() - { - EncoderFallbackBuffer buffer = new EncoderReplacementFallback().CreateFallbackBuffer(); - - AssertExtensions.Throws("charUnknownHigh", () => buffer.Fallback('a', '\uDC00', 0)); - AssertExtensions.Throws("CharUnknownLow", () => buffer.Fallback('\uD800', 'a', 0)); - } } } diff --git a/src/System.Text.Encoding/tests/System.Text.Encoding.Tests.csproj b/src/System.Text.Encoding/tests/System.Text.Encoding.Tests.csproj index d8461ac3e71b..223a27e4b9f9 100644 --- a/src/System.Text.Encoding/tests/System.Text.Encoding.Tests.csproj +++ b/src/System.Text.Encoding/tests/System.Text.Encoding.Tests.csproj @@ -4,7 +4,7 @@ true true true - netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release + netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release diff --git a/src/System.Text.Encodings.Web/tests/Configurations.props b/src/System.Text.Encodings.Web/tests/Configurations.props index 4e89c411e22d..dbc985922d3b 100644 --- a/src/System.Text.Encodings.Web/tests/Configurations.props +++ b/src/System.Text.Encodings.Web/tests/Configurations.props @@ -2,8 +2,8 @@ netcoreapp; + netfx; uap-Windows_NT; - netstandard; diff --git a/src/System.Text.Encodings.Web/tests/System.Text.Encodings.Web.Tests.csproj b/src/System.Text.Encodings.Web/tests/System.Text.Encodings.Web.Tests.csproj index f770f5d23362..31e5916d98fd 100644 --- a/src/System.Text.Encodings.Web/tests/System.Text.Encodings.Web.Tests.csproj +++ b/src/System.Text.Encodings.Web/tests/System.Text.Encodings.Web.Tests.csproj @@ -6,7 +6,7 @@ $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages ..\..\ true - netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release + netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release diff --git a/src/System.Text.Json/tests/Configurations.props b/src/System.Text.Json/tests/Configurations.props index 4e89c411e22d..dbc985922d3b 100644 --- a/src/System.Text.Json/tests/Configurations.props +++ b/src/System.Text.Json/tests/Configurations.props @@ -2,8 +2,8 @@ netcoreapp; + netfx; uap-Windows_NT; - netstandard; diff --git a/src/System.Text.Json/tests/JsonElementWriteTests.cs b/src/System.Text.Json/tests/JsonElementWriteTests.cs index f7b88d6037db..43d07e2fa050 100644 --- a/src/System.Text.Json/tests/JsonElementWriteTests.cs +++ b/src/System.Text.Json/tests/JsonElementWriteTests.cs @@ -1162,7 +1162,7 @@ private static void AssertContents(string expectedValue, ArrayBufferWriter expectedValue, Encoding.UTF8.GetString( buffer.WrittenSpan -#if netstandard +#if netfx .ToArray() #endif )); diff --git a/src/System.Text.Json/tests/System.Text.Json.Tests.csproj b/src/System.Text.Json/tests/System.Text.Json.Tests.csproj index f9490f39efbd..d43111d92ba6 100644 --- a/src/System.Text.Json/tests/System.Text.Json.Tests.csproj +++ b/src/System.Text.Json/tests/System.Text.Json.Tests.csproj @@ -1,7 +1,7 @@  {5F553243-042C-45C0-8E49-C739131E11C3} - netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release + netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release @@ -69,7 +69,7 @@ - + CommonTest\System\Buffers\ArrayBufferWriter.cs diff --git a/src/System.Text.Json/tests/Utf8JsonWriterTests.cs b/src/System.Text.Json/tests/Utf8JsonWriterTests.cs index 7eb66b6b9ba1..2d1e30f7afb5 100644 --- a/src/System.Text.Json/tests/Utf8JsonWriterTests.cs +++ b/src/System.Text.Json/tests/Utf8JsonWriterTests.cs @@ -439,7 +439,7 @@ public void DisposeAutoFlushes(bool formatted, bool skipValidation) Assert.Equal(2, stream.Position); } -#if !netstandard +#if !netfx [Theory] [InlineData(true, true)] [InlineData(true, false)] @@ -517,7 +517,7 @@ public void UseAfterDisposeInvalid(bool formatted, bool skipValidation) Assert.Throws(() => jsonUtf8.Reset(output)); } -#if !netstandard +#if !netfx [Theory] [InlineData(true, true)] [InlineData(true, false)] @@ -602,7 +602,7 @@ private static async Task WriteLargeToStreamHelper(Stream stream, JsonWriterOpti { const int SyncWriteThreshold = 25_000; -#if !netstandard +#if !netfx await #endif using var jsonUtf8 = new Utf8JsonWriter(stream, options); @@ -4422,7 +4422,7 @@ private static void AssertContents(string expectedValue, ArrayBufferWriter expectedValue, Encoding.UTF8.GetString( buffer.WrittenSpan -#if netstandard +#if netfx .ToArray() #endif )); diff --git a/src/System.Text.RegularExpressions/tests/CaptureCollectionTests2.cs b/src/System.Text.RegularExpressions/tests/CaptureCollectionTests2.cs index 5348e1af1245..cc842597f7b9 100644 --- a/src/System.Text.RegularExpressions/tests/CaptureCollectionTests2.cs +++ b/src/System.Text.RegularExpressions/tests/CaptureCollectionTests2.cs @@ -164,7 +164,6 @@ public static void IList_IsReadOnly() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot)] public static void DebuggerAttributeTests() { CaptureCollection col = CreateCollection(); @@ -176,7 +175,6 @@ public static void DebuggerAttributeTests() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot)] public static void DebuggerAttributeTests_Null() { TargetInvocationException ex = Assert.Throws(() => DebuggerAttributes.ValidateDebuggerTypeProxyProperties(typeof(CaptureCollection), null)); diff --git a/src/System.Text.RegularExpressions/tests/Configurations.props b/src/System.Text.RegularExpressions/tests/Configurations.props index 2ae79c79febf..f97cd5ea7a97 100644 --- a/src/System.Text.RegularExpressions/tests/Configurations.props +++ b/src/System.Text.RegularExpressions/tests/Configurations.props @@ -2,7 +2,6 @@ netcoreapp; - netstandard; uap; diff --git a/src/System.Text.RegularExpressions/tests/GroupCollectionTests2.cs b/src/System.Text.RegularExpressions/tests/GroupCollectionTests2.cs index 0f5d46cb1745..8442cb81f669 100644 --- a/src/System.Text.RegularExpressions/tests/GroupCollectionTests2.cs +++ b/src/System.Text.RegularExpressions/tests/GroupCollectionTests2.cs @@ -161,7 +161,6 @@ public static void IList_IsReadOnly() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot)] public static void DebuggerAttributeTests() { GroupCollection col = CreateCollection(); @@ -173,7 +172,6 @@ public static void DebuggerAttributeTests() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot)] public static void DebuggerAttributeTests_Null() { TargetInvocationException ex = Assert.Throws(() => DebuggerAttributes.ValidateDebuggerTypeProxyProperties(typeof(GroupCollection), null)); diff --git a/src/System.Text.RegularExpressions/tests/MatchCollectionTests2.cs b/src/System.Text.RegularExpressions/tests/MatchCollectionTests2.cs index 02f118f57520..945a5b680ac3 100644 --- a/src/System.Text.RegularExpressions/tests/MatchCollectionTests2.cs +++ b/src/System.Text.RegularExpressions/tests/MatchCollectionTests2.cs @@ -158,7 +158,6 @@ public static void IList_IsReadOnly() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot)] public static void DebuggerAttributeTests() { MatchCollection col = CreateCollection(); @@ -170,7 +169,6 @@ public static void DebuggerAttributeTests() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot)] public static void DebuggerAttributeTests_Null() { TargetInvocationException ex = Assert.Throws(() => DebuggerAttributes.ValidateDebuggerTypeProxyProperties(typeof(MatchCollection), null)); diff --git a/src/System.Text.RegularExpressions/tests/Regex.Cache.Tests.cs b/src/System.Text.RegularExpressions/tests/Regex.Cache.Tests.cs index f124ad5fd30d..649961453613 100644 --- a/src/System.Text.RegularExpressions/tests/Regex.Cache.Tests.cs +++ b/src/System.Text.RegularExpressions/tests/Regex.Cache.Tests.cs @@ -38,7 +38,6 @@ public void CacheSize_Set_NegativeValue_ThrowsArgumentOutOfRangeException() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "reflection blocked")] public void Ctor_Cache_Second_drops_first() { RemoteExecutor.Invoke(() => @@ -52,7 +51,6 @@ public void Ctor_Cache_Second_drops_first() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "reflection blocked")] public void Ctor_Cache_Shrink_cache() { RemoteExecutor.Invoke(() => @@ -70,7 +68,6 @@ public void Ctor_Cache_Shrink_cache() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "reflection blocked")] public void Ctor_Cache_Promote_entries() { RemoteExecutor.Invoke(() => @@ -89,7 +86,6 @@ public void Ctor_Cache_Promote_entries() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "reflection blocked")] public void Ctor_Cache_Uses_culture_and_options() { RemoteExecutor.Invoke(() => @@ -108,8 +104,6 @@ public void Ctor_Cache_Uses_culture_and_options() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework | TargetFrameworkMonikers.UapAot, - "different cache structure, reflection blocked")] public void Ctor_Cache_Uses_dictionary_linked_list_switch_does_not_throw() { // assume the limit is less than the cache size so we cross it two times: @@ -147,17 +141,6 @@ void Remove(int n) private int GetCachedItemsNum() { - // On .NET Framework we have a different cache structure. - if (PlatformDetection.IsFullFramework) - { - object linkedList = typeof(Regex) - .GetField("livecode", BindingFlags.NonPublic | BindingFlags.Static) - .GetValue(null); - return (int)linkedList.GetType() - .GetProperty("Count", BindingFlags.Public | BindingFlags.Instance) - .GetValue(linkedList); - } - return (int)typeof(Regex) .GetField("s_cacheCount", BindingFlags.NonPublic | BindingFlags.Static) .GetValue(null); diff --git a/src/System.Text.RegularExpressions/tests/Regex.Groups.Tests.cs b/src/System.Text.RegularExpressions/tests/Regex.Groups.Tests.cs index 2293f76df479..40247a2f4988 100644 --- a/src/System.Text.RegularExpressions/tests/Regex.Groups.Tests.cs +++ b/src/System.Text.RegularExpressions/tests/Regex.Groups.Tests.cs @@ -396,11 +396,8 @@ public static IEnumerable Groups_Basic_TestData() yield return new object[] { @"(cat)(\cZ*)(dog)", "asdlkcat\u001adogiwod", RegexOptions.None, new string[] { "cat\u001adog", "cat", "\u001a", "dog" } }; yield return new object[] { @"(cat)(\cz*)(dog)", "asdlkcat\u001adogiwod", RegexOptions.None, new string[] { "cat\u001adog", "cat", "\u001a", "dog" } }; - if (!PlatformDetection.IsFullFramework) // missing fix for #26501 - { - yield return new object[] { @"(cat)(\c[*)(dog)", "asdlkcat\u001bdogiwod", RegexOptions.None, new string[] { "cat\u001bdog", "cat", "\u001b", "dog" } }; - yield return new object[] { @"(cat)(\c[*)(dog)", "asdlkcat\u001Bdogiwod", RegexOptions.None, new string[] { "cat\u001Bdog", "cat", "\u001B", "dog" } }; - } + yield return new object[] { @"(cat)(\c[*)(dog)", "asdlkcat\u001bdogiwod", RegexOptions.None, new string[] { "cat\u001bdog", "cat", "\u001b", "dog" } }; + yield return new object[] { @"(cat)(\c[*)(dog)", "asdlkcat\u001Bdogiwod", RegexOptions.None, new string[] { "cat\u001Bdog", "cat", "\u001B", "dog" } }; // Atomic Zero-Width Assertions \A \Z \z \G \b \B //\A diff --git a/src/System.Text.RegularExpressions/tests/Regex.Match.Tests.cs b/src/System.Text.RegularExpressions/tests/Regex.Match.Tests.cs index 93c28e482f2c..1571757ca5db 100644 --- a/src/System.Text.RegularExpressions/tests/Regex.Match.Tests.cs +++ b/src/System.Text.RegularExpressions/tests/Regex.Match.Tests.cs @@ -294,8 +294,7 @@ public static IEnumerable Match_Basic_TestData() yield return new object[] { @"[a-[a-f]]", "abcdefghijklmnopqrstuvwxyz", RegexOptions.None, 0, 26, false, string.Empty }; // \c - if (!PlatformDetection.IsFullFramework) // missing fix for #26501 - yield return new object[] { @"(cat)(\c[*)(dog)", "asdlkcat\u00FFdogiwod", RegexOptions.None, 0, 15, false, string.Empty }; + yield return new object[] { @"(cat)(\c[*)(dog)", "asdlkcat\u00FFdogiwod", RegexOptions.None, 0, 15, false, string.Empty }; // Surrogate pairs splitted up into UTF-16 code units. yield return new object[] { @"(\uD82F[\uDCA0-\uDCA3])", "\uD82F\uDCA2", RegexOptions.CultureInvariant, 0, 2, true, "\uD82F\uDCA2" }; @@ -790,7 +789,6 @@ public void Match_SpecialUnicodeCharacters_Invariant() } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotArmProcess))] // times out on ARM - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Full framework needs fix for #26484")] public void Match_ExcessPrefix() { RemoteExecutor.Invoke(() => diff --git a/src/System.Text.RegularExpressions/tests/RegexParserTests.cs b/src/System.Text.RegularExpressions/tests/RegexParserTests.cs index 15ee898d399b..f8096817174f 100644 --- a/src/System.Text.RegularExpressions/tests/RegexParserTests.cs +++ b/src/System.Text.RegularExpressions/tests/RegexParserTests.cs @@ -15,12 +15,8 @@ public class RegexParserTests static RegexParserTests() { - // On Full Framework RegexParseException doesn't exist and on uapaot reflection is blocked. - if (!PlatformDetection.IsNetNative && !PlatformDetection.IsFullFramework) - { - s_parseExceptionType = typeof(Regex).Assembly.GetType("System.Text.RegularExpressions.RegexParseException", true); - s_parseErrorField = s_parseExceptionType.GetField("_error", BindingFlags.NonPublic | BindingFlags.Instance); - } + s_parseExceptionType = typeof(Regex).Assembly.GetType("System.Text.RegularExpressions.RegexParseException", true); + s_parseErrorField = s_parseExceptionType.GetField("_error", BindingFlags.NonPublic | BindingFlags.Instance); } [Theory] @@ -789,7 +785,6 @@ public void Parse(string pattern, RegexOptions options, object errorObj) } [Theory] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "fixes not ported to netfx RegexParser")] // OutOfMemoryException [InlineData("a{2147483647}", RegexOptions.None, null)] [InlineData("a{2147483647,}", RegexOptions.None, null)] @@ -922,14 +917,6 @@ private static void ParseSubTree(string pattern, RegexOptions options) /// The action to invoke. private static void Throws(RegexParseError error, Action action) { - // If no specific error is supplied, or we are running on full framework where RegexParseException - // doesn't exist or we are running on uapaot where reflection is blocked we expect an ArgumentException. - if (PlatformDetection.IsNetNative || PlatformDetection.IsFullFramework) - { - Assert.ThrowsAny(action); - return; - } - try { action(); diff --git a/src/System.Text.RegularExpressions/tests/System.Text.RegularExpressions.Tests.csproj b/src/System.Text.RegularExpressions/tests/System.Text.RegularExpressions.Tests.csproj index 8e3d1a2e579a..46a68e3e84ad 100644 --- a/src/System.Text.RegularExpressions/tests/System.Text.RegularExpressions.Tests.csproj +++ b/src/System.Text.RegularExpressions/tests/System.Text.RegularExpressions.Tests.csproj @@ -2,7 +2,7 @@ {94B106C2-D574-4392-80AB-3EE308A078DF} true - netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release;uap-Debug;uap-Release + netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release @@ -28,7 +28,7 @@ System\Text\RegularExpressions\RegexParseError.cs - + diff --git a/src/System.Threading.AccessControl/tests/Configurations.props b/src/System.Threading.AccessControl/tests/Configurations.props index 611acec17f5f..dd6fb5e9c632 100644 --- a/src/System.Threading.AccessControl/tests/Configurations.props +++ b/src/System.Threading.AccessControl/tests/Configurations.props @@ -1,7 +1,9 @@  - netstandard-Windows_NT; + netcoreapp-Windows_NT; + netfx-Windows_NT; + uap-Windows_NT; \ No newline at end of file diff --git a/src/System.Threading.AccessControl/tests/System.Threading.AccessControl.Tests.csproj b/src/System.Threading.AccessControl/tests/System.Threading.AccessControl.Tests.csproj index e99a2fd7d099..db38d0147e7f 100644 --- a/src/System.Threading.AccessControl/tests/System.Threading.AccessControl.Tests.csproj +++ b/src/System.Threading.AccessControl/tests/System.Threading.AccessControl.Tests.csproj @@ -1,7 +1,7 @@ {458E445C-DF3C-4E4D-8E1D-F2FAC365BB40} - netstandard-Windows_NT-Debug;netstandard-Windows_NT-Release + netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netfx-Windows_NT-Debug;netfx-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release diff --git a/src/System.Threading.Channels/tests/ChannelTestBase.cs b/src/System.Threading.Channels/tests/ChannelTestBase.cs index 3122220a12af..0ac7e62d10e6 100644 --- a/src/System.Threading.Channels/tests/ChannelTestBase.cs +++ b/src/System.Threading.Channels/tests/ChannelTestBase.cs @@ -24,7 +24,6 @@ public abstract partial class ChannelTestBase : TestBase protected virtual bool RequiresSingleWriter => false; protected virtual bool BuffersItems => true; - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Requires internal reflection on framework types.")] [Fact] public void ValidateDebuggerAttributes() { diff --git a/src/System.Threading.Channels/tests/Configurations.props b/src/System.Threading.Channels/tests/Configurations.props index 68ac7b9c023b..188fa1889898 100644 --- a/src/System.Threading.Channels/tests/Configurations.props +++ b/src/System.Threading.Channels/tests/Configurations.props @@ -1,8 +1,9 @@  - netstandard; netcoreapp; + netfx; + uap; diff --git a/src/System.Threading.Channels/tests/DebugAttributeTests.cs b/src/System.Threading.Channels/tests/DebugAttributeTests.cs index 34197aa1e3f3..eca5fff8d49c 100644 --- a/src/System.Threading.Channels/tests/DebugAttributeTests.cs +++ b/src/System.Threading.Channels/tests/DebugAttributeTests.cs @@ -31,7 +31,6 @@ public static IEnumerable TestData() [Theory] [MemberData(nameof(TestData))] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Cannot do DebuggerAttribute testing on UapAot: requires internal Reflection on framework types.")] public void TestDebuggerDisplaysAndTypeProxies(object obj) { DebuggerAttributes.ValidateDebuggerDisplayReferences(obj); @@ -39,7 +38,6 @@ public void TestDebuggerDisplaysAndTypeProxies(object obj) } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Cannot do DebuggerAttribute testing on UapAot: requires internal Reflection on framework types.")] public void TestDequeueClass() { var c = Channel.CreateBounded(10); diff --git a/src/System.Threading.Channels/tests/System.Threading.Channels.Tests.csproj b/src/System.Threading.Channels/tests/System.Threading.Channels.Tests.csproj index 7e7c283717e9..861866d8b332 100644 --- a/src/System.Threading.Channels/tests/System.Threading.Channels.Tests.csproj +++ b/src/System.Threading.Channels/tests/System.Threading.Channels.Tests.csproj @@ -1,7 +1,7 @@ {1AF01469-DBFC-4BA1-9331-8E39AA639FEE} - netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release + netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release;uap-Debug;uap-Release diff --git a/src/System.Threading.Channels/tests/UnboundedChannelTests.cs b/src/System.Threading.Channels/tests/UnboundedChannelTests.cs index dec1e50f3ee1..46889613133b 100644 --- a/src/System.Threading.Channels/tests/UnboundedChannelTests.cs +++ b/src/System.Threading.Channels/tests/UnboundedChannelTests.cs @@ -137,7 +137,6 @@ public abstract class SingleReaderUnboundedChannelTests : UnboundedChannelTests { protected override bool RequiresSingleReader => true; - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Requires internal reflection on framework types.")] [Fact] public void ValidateInternalDebuggerAttributes() { diff --git a/src/System.Threading.Overlapped/tests/Configurations.props b/src/System.Threading.Overlapped/tests/Configurations.props index ba03084f3192..109210faad27 100644 --- a/src/System.Threading.Overlapped/tests/Configurations.props +++ b/src/System.Threading.Overlapped/tests/Configurations.props @@ -2,7 +2,6 @@ netcoreapp; - netstandard; uap-Windows_NT; diff --git a/src/System.Threading.Overlapped/tests/System.Threading.Overlapped.Tests.csproj b/src/System.Threading.Overlapped/tests/System.Threading.Overlapped.Tests.csproj index f2cef71d179a..606f129e37c4 100644 --- a/src/System.Threading.Overlapped/tests/System.Threading.Overlapped.Tests.csproj +++ b/src/System.Threading.Overlapped/tests/System.Threading.Overlapped.Tests.csproj @@ -3,14 +3,14 @@ {861A3318-35AD-46ac-8257-8D5D2479BAD9} true true - netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release + netcoreapp-Debug;netcoreapp-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release true - + diff --git a/src/System.Threading.Overlapped/tests/ThreadPoolBoundHandle_IntegrationTests.cs b/src/System.Threading.Overlapped/tests/ThreadPoolBoundHandle_IntegrationTests.cs index 8c006501b3cb..5b9d449fc5de 100644 --- a/src/System.Threading.Overlapped/tests/ThreadPoolBoundHandle_IntegrationTests.cs +++ b/src/System.Threading.Overlapped/tests/ThreadPoolBoundHandle_IntegrationTests.cs @@ -180,7 +180,6 @@ public unsafe void MultipleOperationsOverMultipleHandles() [Fact] [PlatformSpecific(TestPlatforms.Windows)] // ThreadPoolBoundHandle.BindHandle is not supported on Unix - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Active Issue dotnet/corefx#13343")] public unsafe void FlowsAsyncLocalsToCallback() { // Makes sure that we flow async locals to callback diff --git a/src/System.Threading.Tasks.Dataflow/tests/Configurations.props b/src/System.Threading.Tasks.Dataflow/tests/Configurations.props index 581054d46db4..c3d0d53eb793 100644 --- a/src/System.Threading.Tasks.Dataflow/tests/Configurations.props +++ b/src/System.Threading.Tasks.Dataflow/tests/Configurations.props @@ -1,7 +1,9 @@  - netstandard; + netcoreapp; + netfx; + uap; \ No newline at end of file diff --git a/src/System.Threading.Tasks.Dataflow/tests/Dataflow/DebugAttributeTests.cs b/src/System.Threading.Tasks.Dataflow/tests/Dataflow/DebugAttributeTests.cs index 766bcfcac32a..1306db2dee4c 100644 --- a/src/System.Threading.Tasks.Dataflow/tests/Dataflow/DebugAttributeTests.cs +++ b/src/System.Threading.Tasks.Dataflow/tests/Dataflow/DebugAttributeTests.cs @@ -10,7 +10,6 @@ namespace System.Threading.Tasks.Dataflow.Tests public class DebugAttributeTests { [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Cannot do DebuggerAttribute testing on UapAot: requires internal Reflection on framework types.")] public void TestDebuggerDisplaysAndTypeProxies() { // Test both canceled and non-canceled diff --git a/src/System.Threading.Tasks.Dataflow/tests/System.Threading.Tasks.Dataflow.Tests.csproj b/src/System.Threading.Tasks.Dataflow/tests/System.Threading.Tasks.Dataflow.Tests.csproj index d8b9cbdfe9d8..1bd0a3869340 100644 --- a/src/System.Threading.Tasks.Dataflow/tests/System.Threading.Tasks.Dataflow.Tests.csproj +++ b/src/System.Threading.Tasks.Dataflow/tests/System.Threading.Tasks.Dataflow.Tests.csproj @@ -2,7 +2,7 @@ {A7AA2FC3-855F-44BA-8735-AB2F43D118A5} true - netstandard-Debug;netstandard-Release + netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release;uap-Debug;uap-Release diff --git a/src/System.Threading.Tasks.Extensions/tests/AsyncValueTaskMethodBuilderTests.cs b/src/System.Threading.Tasks.Extensions/tests/AsyncValueTaskMethodBuilderTests.cs index 0deeeb40c50d..37202389f28f 100644 --- a/src/System.Threading.Tasks.Extensions/tests/AsyncValueTaskMethodBuilderTests.cs +++ b/src/System.Threading.Tasks.Extensions/tests/AsyncValueTaskMethodBuilderTests.cs @@ -215,7 +215,6 @@ public void Generic_AwaitOnCompleted_ForcesTaskCreation(int numAwaits, bool awai } [Fact] - [ActiveIssue("https://github.com/dotnet/corefx/issues/22506", TargetFrameworkMonikers.UapAot)] public void NonGeneric_SetStateMachine_InvalidArgument_ThrowsException() { AsyncValueTaskMethodBuilder b = default; @@ -223,7 +222,6 @@ public void NonGeneric_SetStateMachine_InvalidArgument_ThrowsException() } [Fact] - [ActiveIssue("https://github.com/dotnet/corefx/issues/22506", TargetFrameworkMonikers.UapAot)] public void Generic_SetStateMachine_InvalidArgument_ThrowsException() { AsyncValueTaskMethodBuilder b = default; diff --git a/src/System.Threading.Tasks.Extensions/tests/ValueTaskTests.cs b/src/System.Threading.Tasks.Extensions/tests/ValueTaskTests.cs index 56ce021be5e4..b3583d713fbb 100644 --- a/src/System.Threading.Tasks.Extensions/tests/ValueTaskTests.cs +++ b/src/System.Threading.Tasks.Extensions/tests/ValueTaskTests.cs @@ -1247,7 +1247,6 @@ void Validate(IValueTaskSource vts) } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "ValueTask _obj is reflection blocked.")] public void NonGeneric_TornRead_DoesNotCrashOrHang() { // Validate that if we incur a torn read, we may get an exception, but we won't crash or hang. @@ -1283,7 +1282,6 @@ public void NonGeneric_TornRead_DoesNotCrashOrHang() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "ValueTask _obj is reflection blocked.")] public void Generic_TornRead_DoesNotCrashOrHang() { // Validate that if we incur a torn read, we may get an exception, but we won't crash or hang. diff --git a/src/System.Threading.Tasks.Parallel/tests/Configurations.props b/src/System.Threading.Tasks.Parallel/tests/Configurations.props index 581054d46db4..f97cd5ea7a97 100644 --- a/src/System.Threading.Tasks.Parallel/tests/Configurations.props +++ b/src/System.Threading.Tasks.Parallel/tests/Configurations.props @@ -1,7 +1,8 @@  - netstandard; + netcoreapp; + uap; \ No newline at end of file diff --git a/src/System.Threading.Tasks.Parallel/tests/EtwTests.cs b/src/System.Threading.Tasks.Parallel/tests/EtwTests.cs index 789cf6ffb44a..82313c7b7ee7 100644 --- a/src/System.Threading.Tasks.Parallel/tests/EtwTests.cs +++ b/src/System.Threading.Tasks.Parallel/tests/EtwTests.cs @@ -18,7 +18,7 @@ public static void TestEtw() { RemoteExecutor.Invoke(() => { - var eventSourceName = PlatformDetection.IsFullFramework ? "System.Threading.Tasks.TplEventSource" : "System.Threading.Tasks.Parallel.EventSource"; + var eventSourceName = "System.Threading.Tasks.Parallel.EventSource"; using (var listener = new TestEventListener(eventSourceName, EventLevel.Verbose)) { var events = new ConcurrentQueue(); diff --git a/src/System.Threading.Tasks.Parallel/tests/System.Threading.Tasks.Parallel.Tests.csproj b/src/System.Threading.Tasks.Parallel/tests/System.Threading.Tasks.Parallel.Tests.csproj index 4aa3d9e3c841..c5f799bead58 100644 --- a/src/System.Threading.Tasks.Parallel/tests/System.Threading.Tasks.Parallel.Tests.csproj +++ b/src/System.Threading.Tasks.Parallel/tests/System.Threading.Tasks.Parallel.Tests.csproj @@ -2,7 +2,7 @@ {DE29C320-2ECA-43FD-9F41-6F4F6C6BACD5} true - netstandard-Debug;netstandard-Release + netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release diff --git a/src/System.Threading.Tasks/tests/CancellationTokenTests.cs b/src/System.Threading.Tasks/tests/CancellationTokenTests.cs index 5de3697a0803..9a1f61efeb2a 100644 --- a/src/System.Threading.Tasks/tests/CancellationTokenTests.cs +++ b/src/System.Threading.Tasks/tests/CancellationTokenTests.cs @@ -180,7 +180,6 @@ public static void TokenSourceDispose() tokenSource.Dispose(); //Repeat calls to Dispose should be ok. } - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Relies on quirked behavior to not throw in token.Register when already disposed")] [Fact] public static void TokenSourceDispose_Negative() { diff --git a/src/System.Threading.Tasks/tests/Configurations.props b/src/System.Threading.Tasks/tests/Configurations.props index f5d3d45ffbf4..f97cd5ea7a97 100644 --- a/src/System.Threading.Tasks/tests/Configurations.props +++ b/src/System.Threading.Tasks/tests/Configurations.props @@ -2,7 +2,7 @@ netcoreapp; - netstandard; + uap; \ No newline at end of file diff --git a/src/System.Threading.Tasks/tests/System.Runtime.CompilerServices/AsyncTaskMethodBuilderTests.cs b/src/System.Threading.Tasks/tests/System.Runtime.CompilerServices/AsyncTaskMethodBuilderTests.cs index 495c359ae831..7e5b2dd39113 100644 --- a/src/System.Threading.Tasks/tests/System.Runtime.CompilerServices/AsyncTaskMethodBuilderTests.cs +++ b/src/System.Threading.Tasks/tests/System.Runtime.CompilerServices/AsyncTaskMethodBuilderTests.cs @@ -345,7 +345,6 @@ public static void TaskMethodBuilderT_TaskIsCached() } [Fact] - [ActiveIssue("TFS 450361 - Codegen optimization issue", TargetFrameworkMonikers.UapAot)] public static void TaskMethodBuilder_UsesCompletedCache() { var atmb1 = new AsyncTaskMethodBuilder(); @@ -358,7 +357,6 @@ public static void TaskMethodBuilder_UsesCompletedCache() [Theory] [InlineData(true)] [InlineData(false)] - [ActiveIssue("TFS 450361 - Codegen optimization issue", TargetFrameworkMonikers.UapAot)] public static void TaskMethodBuilderBoolean_UsesCompletedCache(bool result) { TaskMethodBuilderT_UsesCompletedCache(result, true); @@ -369,15 +367,12 @@ public static void TaskMethodBuilderBoolean_UsesCompletedCache(bool result) [InlineData(5, true)] [InlineData(-5, false)] [InlineData(42, false)] - [ActiveIssue("TFS 450361 - Codegen optimization issue", TargetFrameworkMonikers.UapAot)] public static void TaskMethodBuilderInt32_UsesCompletedCache(int result, bool shouldBeCached) { TaskMethodBuilderT_UsesCompletedCache(result, shouldBeCached); } - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "https://github.com/dotnet/coreclr/pull/16588")] [Fact] - [ActiveIssue("TFS 450361 - Codegen optimization issue", TargetFrameworkMonikers.UapAot)] public static void TaskMethodBuilderDecimal_DoesntUseCompletedCache() { TaskMethodBuilderT_UsesCompletedCache(0m, shouldBeCached: false); @@ -388,7 +383,6 @@ public static void TaskMethodBuilderDecimal_DoesntUseCompletedCache() [Theory] [InlineData((string)null, true)] [InlineData("test", false)] - [ActiveIssue("TFS 450361 - Codegen optimization issue", TargetFrameworkMonikers.UapAot)] public static void TaskMethodBuilderRef_UsesCompletedCache(string result, bool shouldBeCached) { TaskMethodBuilderT_UsesCompletedCache(result, shouldBeCached); diff --git a/src/System.Threading.Tasks/tests/System.Threading.Tasks.Tests.csproj b/src/System.Threading.Tasks/tests/System.Threading.Tasks.Tests.csproj index 1369d8c2ff6a..166cb5a1be03 100644 --- a/src/System.Threading.Tasks/tests/System.Threading.Tasks.Tests.csproj +++ b/src/System.Threading.Tasks/tests/System.Threading.Tasks.Tests.csproj @@ -3,7 +3,7 @@ {B6C09633-D161-499A-8FE1-46B2D53A16E7} true true - netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release + netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release diff --git a/src/System.Threading.Tasks/tests/Task/ExecutionContextFlowTest.cs b/src/System.Threading.Tasks/tests/Task/ExecutionContextFlowTest.cs index b53d4f83a77a..6977f6c27681 100644 --- a/src/System.Threading.Tasks/tests/Task/ExecutionContextFlowTest.cs +++ b/src/System.Threading.Tasks/tests/Task/ExecutionContextFlowTest.cs @@ -30,7 +30,6 @@ public void SuppressFlow_TaskCapturesContextAccordingly(bool suppressFlow) } } - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, reason: "netfx doesn't have https://github.com/dotnet/coreclr/pull/20294")] [Fact] public static async Task TaskDropsExecutionContextUponCompletion() { diff --git a/src/System.Threading.Tasks/tests/Task/RunContinuationsAsynchronouslyTests.cs b/src/System.Threading.Tasks/tests/Task/RunContinuationsAsynchronouslyTests.cs index 9f4e27c00663..0d30711d5602 100644 --- a/src/System.Threading.Tasks/tests/Task/RunContinuationsAsynchronouslyTests.cs +++ b/src/System.Threading.Tasks/tests/Task/RunContinuationsAsynchronouslyTests.cs @@ -11,7 +11,6 @@ public class RunContinuationsAsynchronouslyTests [Theory] [InlineData(false)] [InlineData(true)] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Requires fix in .NET 4.7.")] public void Direct(bool useRunContinuationsAsynchronously) { Run(useRunContinuationsAsynchronously, t => t); @@ -20,7 +19,6 @@ public void Direct(bool useRunContinuationsAsynchronously) [Theory] [InlineData(false)] [InlineData(true)] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Requires fix in .NET 4.7.")] public void ViaUnwrap(bool useRunContinuationsAsynchronously) { Run(useRunContinuationsAsynchronously, t => ((Task)t).Unwrap()); @@ -29,7 +27,6 @@ public void ViaUnwrap(bool useRunContinuationsAsynchronously) [Theory] [InlineData(false)] [InlineData(true)] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Requires fix in .NET 4.7.")] public void ViaWhenAll(bool useRunContinuationsAsynchronously) { Run(useRunContinuationsAsynchronously, t => Task.WhenAll(t)); @@ -38,7 +35,6 @@ public void ViaWhenAll(bool useRunContinuationsAsynchronously) [Theory] [InlineData(false)] [InlineData(true)] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Requires fix in .NET 4.7.")] public void ViaWhenAny(bool useRunContinuationsAsynchronously) { Run(useRunContinuationsAsynchronously, t => Task.WhenAny(t)); diff --git a/src/System.Threading.Tasks/tests/Task/TaskContinueWithTests.cs b/src/System.Threading.Tasks/tests/Task/TaskContinueWithTests.cs index 1522d986e2a5..e29b1ea8b479 100644 --- a/src/System.Threading.Tasks/tests/Task/TaskContinueWithTests.cs +++ b/src/System.Threading.Tasks/tests/Task/TaskContinueWithTests.cs @@ -1242,7 +1242,6 @@ public static void LongContinuationChain_Unwrap_DoesNotStackOverflow() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "https://github.com/dotnet/coreclr/pull/23152")] public static void LongContinuationChain_Await_DoesNotStackOverflow() { const int DiveDepth = 12_000; diff --git a/src/System.Threading.Tasks/tests/Task/TaskRtTests.cs b/src/System.Threading.Tasks/tests/Task/TaskRtTests.cs index 1cb08c0f0ac1..6be75ac3be82 100644 --- a/src/System.Threading.Tasks/tests/Task/TaskRtTests.cs +++ b/src/System.Threading.Tasks/tests/Task/TaskRtTests.cs @@ -463,7 +463,6 @@ public static void RunFromResult() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Uses reflection to access internal fields of the Task class.")] public static void RunFromResult_FaultedTask() { // Make sure faulted tasks are actually faulted. We have little choice for this test but to use reflection, diff --git a/src/System.Threading.Tasks/tests/TaskScheduler/TaskSchedulerTests.cs b/src/System.Threading.Tasks/tests/TaskScheduler/TaskSchedulerTests.cs index aebd9305f2c3..c7ec34e8559a 100644 --- a/src/System.Threading.Tasks/tests/TaskScheduler/TaskSchedulerTests.cs +++ b/src/System.Threading.Tasks/tests/TaskScheduler/TaskSchedulerTests.cs @@ -291,7 +291,6 @@ public static void RunSynchronizationContextTaskSchedulerTests_Negative() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Uses reflection to access an internal method of the TaskScheduler class.")] public static void GetTaskSchedulersForDebugger_ReturnsDefaultScheduler() { MethodInfo getTaskSchedulersForDebuggerMethod = typeof(TaskScheduler).GetTypeInfo().GetDeclaredMethod("GetTaskSchedulersForDebugger"); @@ -301,7 +300,6 @@ public static void GetTaskSchedulersForDebugger_ReturnsDefaultScheduler() } [ConditionalFact(nameof(DebuggerIsAttached))] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Uses reflection to access an internal method of the TaskScheduler class.")] public static void GetTaskSchedulersForDebugger_DebuggerAttached_ReturnsAllSchedulers() { MethodInfo getTaskSchedulersForDebuggerMethod = typeof(TaskScheduler).GetTypeInfo().GetDeclaredMethod("GetTaskSchedulersForDebugger"); @@ -317,7 +315,6 @@ public static void GetTaskSchedulersForDebugger_DebuggerAttached_ReturnsAllSched } [ConditionalFact(nameof(DebuggerIsAttached))] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "Uses reflection to access an internal method of the TaskScheduler class.")] public static void GetScheduledTasksForDebugger_DebuggerAttached_ReturnsTasksFromCustomSchedulers() { var nonExecutingScheduler = new BuggyTaskScheduler(faultQueues: false); diff --git a/src/System.Threading.Tasks/tests/UnwrapTests.cs b/src/System.Threading.Tasks/tests/UnwrapTests.cs index 20823a523f52..e73919db98f9 100644 --- a/src/System.Threading.Tasks/tests/UnwrapTests.cs +++ b/src/System.Threading.Tasks/tests/UnwrapTests.cs @@ -37,7 +37,6 @@ public void NonGeneric_Completed_Completed(Task inner) /// Tests Unwrap when both the outer task and non-generic inner task have completed by the time Unwrap is called. /// /// Will be run with a RanToCompletion, Faulted, and Canceled task. - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, ".NET Core optimization to return the exact same object")] [Theory] [MemberData(nameof(CompletedNonGenericTasks))] public void NonGeneric_Completed_Completed_OptimizeToUseSameInner(Task inner) @@ -66,7 +65,6 @@ public void Generic_Completed_Completed(Task inner) /// Tests Unwrap when both the outer task and generic inner task have completed by the time Unwrap is called. /// /// The inner task. - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, ".NET Core optimization to return the exact same object")] [Theory] [MemberData(nameof(CompletedStringTasks))] public void Generic_Completed_Completed_OptimizeToUseSameInner(Task inner) diff --git a/src/System.Threading.Thread/tests/CompressedStackTests.cs b/src/System.Threading.Thread/tests/CompressedStackTests.cs index 3a972eae7201..326eef184e40 100644 --- a/src/System.Threading.Thread/tests/CompressedStackTests.cs +++ b/src/System.Threading.Thread/tests/CompressedStackTests.cs @@ -22,7 +22,6 @@ public static void Capture_GetCompressedStack_CreateCopy_Test() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] // desktop framework throws ArgumentException public static void RunTest_SkipOnDesktopFramework() { Assert.Throws(() => CompressedStack.Run(null, state => { }, null)); diff --git a/src/System.Threading.Thread/tests/Configurations.props b/src/System.Threading.Thread/tests/Configurations.props index 90185507ad77..f97cd5ea7a97 100644 --- a/src/System.Threading.Thread/tests/Configurations.props +++ b/src/System.Threading.Thread/tests/Configurations.props @@ -1,7 +1,6 @@  - netstandard; netcoreapp; uap; diff --git a/src/System.Threading.Thread/tests/System.Threading.Thread.Tests.csproj b/src/System.Threading.Thread/tests/System.Threading.Thread.Tests.csproj index 4cbbd6a58611..f7af6c021983 100644 --- a/src/System.Threading.Thread/tests/System.Threading.Thread.Tests.csproj +++ b/src/System.Threading.Thread/tests/System.Threading.Thread.Tests.csproj @@ -4,15 +4,13 @@ true true true - netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release;uap-Debug;uap-Release + netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release - - diff --git a/src/System.Threading.Thread/tests/ThreadTests.cs b/src/System.Threading.Thread/tests/ThreadTests.cs index 111afe89fb6e..8c35d1c11109 100644 --- a/src/System.Threading.Thread/tests/ThreadTests.cs +++ b/src/System.Threading.Thread/tests/ThreadTests.cs @@ -172,16 +172,9 @@ public static IEnumerable ApartmentStateTest_MemberData() public static void ApartmentState_AttributePresent(string appName, string testName) { var psi = new ProcessStartInfo(); - if (PlatformDetection.IsFullFramework || PlatformDetection.IsNetNative) - { - psi.FileName = appName; - psi.Arguments = $"{testName}"; - } - else - { - psi.FileName = DummyClass.HostRunnerTest; - psi.Arguments = $"{appName} {testName}"; - } + psi.FileName = DummyClass.HostRunnerTest; + psi.Arguments = $"{appName} {testName}"; + using (Process p = Process.Start(psi)) { p.WaitForExit(); @@ -190,8 +183,7 @@ public static void ApartmentState_AttributePresent(string appName, string testNa } [Fact] - [ActiveIssue(20766,TargetFrameworkMonikers.UapAot)] - [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "RemoteExecutor is STA on UAP and UAPAOT.")] + [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "RemoteExecutor is STA on UAP.")] [PlatformSpecific(TestPlatforms.Windows)] public static void ApartmentState_NoAttributePresent_DefaultState_Windows() { @@ -203,20 +195,6 @@ public static void ApartmentState_NoAttributePresent_DefaultState_Windows() }).Dispose(); } - // The Thread Apartment State is set to MTA if attribute is not specified on main function - [Fact] - [PlatformSpecific(TestPlatforms.Windows)] - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework)] - public static void ApartmentState_NoAttributePresent_STA_Windows_Desktop() - { - RemoteExecutor.Invoke(() => - { - Assert.Throws(() => Thread.CurrentThread.SetApartmentState(ApartmentState.STA)); - Thread.CurrentThread.SetApartmentState(ApartmentState.MTA); - Assert.Equal(ApartmentState.MTA, Thread.CurrentThread.GetApartmentState()); - }).Dispose(); - } - [Fact] [PlatformSpecific(TestPlatforms.AnyUnix)] public static void ApartmentState_NoAttributePresent_DefaultState_Unix() @@ -252,7 +230,6 @@ public static void ApartmentState_NoAttributePresent_STA_Unix() [Theory] [MemberData(nameof(ApartmentStateTest_MemberData))] [PlatformSpecific(TestPlatforms.Windows)] // Expected behavior differs on Unix and Windows - [ActiveIssue(20766,TargetFrameworkMonikers.UapAot)] public static void GetSetApartmentStateTest_ChangeAfterThreadStarted_Windows( Func getApartmentState, Func setApartmentState, @@ -275,7 +252,6 @@ public static void GetSetApartmentStateTest_ChangeAfterThreadStarted_Windows( [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindowsNanoServer))] [MemberData(nameof(ApartmentStateTest_MemberData))] [PlatformSpecific(TestPlatforms.Windows)] // Expected behavior differs on Unix and Windows - [ActiveIssue(20766,TargetFrameworkMonikers.UapAot)] public static void ApartmentStateTest_ChangeBeforeThreadStarted_Windows( Func getApartmentState, Func setApartmentState, @@ -347,7 +323,6 @@ public static void ApartmentStateTest_Unix( } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] [SkipOnTargetFramework(TargetFrameworkMonikers.Mono)] [SkipOnTargetFramework(TargetFrameworkMonikers.Uap)] public static void CurrentCultureTest_DifferentThread() @@ -432,7 +407,6 @@ public static void CurrentCultureTest() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] [SkipOnTargetFramework(TargetFrameworkMonikers.Mono)] public static void CurrentPrincipalTest_SkipOnDesktopFramework() { @@ -489,7 +463,6 @@ await Task.Run(() => } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] [SkipOnTargetFramework(TargetFrameworkMonikers.Mono)] public static void CurrentPrincipalContextFlowTest_NotFlow() { @@ -557,7 +530,6 @@ public static void CurrentThreadTest() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] [SkipOnTargetFramework(TargetFrameworkMonikers.Mono)] public static void ExecutionContextTest() { @@ -699,7 +671,6 @@ public static void PriorityTest() } [Fact] - [ActiveIssue(20766, TargetFrameworkMonikers.UapAot)] public static void ThreadStateTest() { var e0 = new ManualResetEvent(false); @@ -737,7 +708,6 @@ public static void ThreadStateTest() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] [SkipOnTargetFramework(TargetFrameworkMonikers.Mono)] public static void AbortSuspendTest() { @@ -929,7 +899,6 @@ public static void LocalDataSlotTest() } [Fact] - [ActiveIssue(20766, TargetFrameworkMonikers.UapAot)] public static void InterruptTest() { // Interrupting a thread that is not blocked does not do anything, but once the thread starts blocking, it gets @@ -979,8 +948,6 @@ public static void InterruptTest() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] - [ActiveIssue(20766,TargetFrameworkMonikers.UapAot)] public static void InterruptInFinallyBlockTest_SkipOnDesktopFramework() { // A wait in a finally block can be interrupted. The desktop framework applies the same rules as thread abort, and @@ -1115,7 +1082,6 @@ public static void StartTest() } [Fact] - [ActiveIssue(20766,TargetFrameworkMonikers.UapAot)] [SkipOnTargetFramework(TargetFrameworkMonikers.Mono)] public static void MiscellaneousTest() { @@ -1184,7 +1150,6 @@ public static void UnauthenticatedPrincipalTest() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Default principal policy on .NET Framework is Unauthenticated Principal")] public static void DefaultPrincipalPolicyTest() { RemoteExecutor.Invoke(() => @@ -1192,15 +1157,5 @@ public static void DefaultPrincipalPolicyTest() Assert.Null(Thread.CurrentPrincipal); }).Dispose(); } - - [Fact] - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework, "Default principal policy on .NET Core is No Principal")] - public static void DefaultPrincipalPolicyTest_Desktop() - { - RemoteExecutor.Invoke(() => - { - Assert.Equal(string.Empty, Thread.CurrentPrincipal.Identity.Name); - }).Dispose(); - } } } diff --git a/src/System.Threading.ThreadPool/tests/Configurations.props b/src/System.Threading.ThreadPool/tests/Configurations.props index 2ae79c79febf..f97cd5ea7a97 100644 --- a/src/System.Threading.ThreadPool/tests/Configurations.props +++ b/src/System.Threading.ThreadPool/tests/Configurations.props @@ -2,7 +2,6 @@ netcoreapp; - netstandard; uap; diff --git a/src/System.Threading.ThreadPool/tests/System.Threading.ThreadPool.Tests.csproj b/src/System.Threading.ThreadPool/tests/System.Threading.ThreadPool.Tests.csproj index 1762ff82ddc8..69816fae4841 100644 --- a/src/System.Threading.ThreadPool/tests/System.Threading.ThreadPool.Tests.csproj +++ b/src/System.Threading.ThreadPool/tests/System.Threading.ThreadPool.Tests.csproj @@ -2,12 +2,12 @@ {403AD1B8-6F95-4A2E-92A2-727606ABD866} true - netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release;uap-Debug;uap-Release + netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release true - + diff --git a/src/System.Threading.ThreadPool/tests/ThreadPoolTests.cs b/src/System.Threading.ThreadPool/tests/ThreadPoolTests.cs index 02fbf948da19..970dc82b4cf8 100644 --- a/src/System.Threading.ThreadPool/tests/ThreadPoolTests.cs +++ b/src/System.Threading.ThreadPool/tests/ThreadPoolTests.cs @@ -17,15 +17,11 @@ public partial class ThreadPoolTests static ThreadPoolTests() { // Run the following tests before any others - if (!PlatformDetection.IsNetNative) - { - ConcurrentInitializeTest(); - } + ConcurrentInitializeTest(); } // Tests concurrent calls to ThreadPool.SetMinThreads [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "ThreadPool.SetMinThreads is not supported on UapAot.")] public static void ConcurrentInitializeTest() { int processorCount = Environment.ProcessorCount; @@ -81,7 +77,6 @@ public static void GetAvailableThreadsTest() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "ThreadPool.SetMinThreads and SetMaxThreads are not supported on UapAot.")] public static void SetMinMaxThreadsTest() { int minw, minc, maxw, maxc; @@ -143,9 +138,7 @@ public static void SetMinMaxThreadsTest() [Fact] // Desktop framework doesn't check for this and instead, hits an assertion failure - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] [SkipOnTargetFramework(TargetFrameworkMonikers.Mono)] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "ThreadPool.SetMinThreads and SetMaxThreads are not supported on UapAot.")] public static void SetMinMaxThreadsTest_ChangedInDotNetCore() { int minw, minc, maxw, maxc; @@ -186,8 +179,6 @@ private static void VerifyMaxThreads(int expectedMaxw, int expectedMaxc) } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Triggers an assertion failure.")] - [SkipOnTargetFramework(TargetFrameworkMonikers.UapAot, "ThreadPool.SetMinThreads and SetMaxThreads are not supported on UapAot.")] public static void SetMinThreadsTo0Test() { int minw, minc, maxw, maxc; diff --git a/src/System.Threading.Timer/tests/Configurations.props b/src/System.Threading.Timer/tests/Configurations.props index 2ae79c79febf..f97cd5ea7a97 100644 --- a/src/System.Threading.Timer/tests/Configurations.props +++ b/src/System.Threading.Timer/tests/Configurations.props @@ -2,7 +2,6 @@ netcoreapp; - netstandard; uap; diff --git a/src/System.Threading.Timer/tests/System.Threading.Timer.Tests.csproj b/src/System.Threading.Timer/tests/System.Threading.Timer.Tests.csproj index 6575f1bfa4a0..5c8fae3b1217 100644 --- a/src/System.Threading.Timer/tests/System.Threading.Timer.Tests.csproj +++ b/src/System.Threading.Timer/tests/System.Threading.Timer.Tests.csproj @@ -1,7 +1,7 @@ {ac20a28f-fda8-45e8-8728-058ead16e44c} - netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release;uap-Debug;uap-Release + netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release true true @@ -9,8 +9,6 @@ - - \ No newline at end of file diff --git a/src/System.Threading/tests/Configurations.props b/src/System.Threading/tests/Configurations.props index 90185507ad77..f97cd5ea7a97 100644 --- a/src/System.Threading/tests/Configurations.props +++ b/src/System.Threading/tests/Configurations.props @@ -1,7 +1,6 @@  - netstandard; netcoreapp; uap; diff --git a/src/System.Threading/tests/EventWaitHandleTests.cs b/src/System.Threading/tests/EventWaitHandleTests.cs index 60869c7a9edc..870bf4ee4c91 100644 --- a/src/System.Threading/tests/EventWaitHandleTests.cs +++ b/src/System.Threading/tests/EventWaitHandleTests.cs @@ -27,13 +27,6 @@ public void Ctor_InvalidMode() AssertExtensions.Throws("mode", null, () => new EventWaitHandle(true, (EventResetMode)12345)); } - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework, "Full framework throws argument exception on long names")] - [Fact] - public void Ctor_InvalidNames() - { - AssertExtensions.Throws("name", null, () => new EventWaitHandle(true, EventResetMode.AutoReset, new string('a', 1000))); - } - [PlatformSpecific(TestPlatforms.Windows)] // names aren't supported on Unix [Theory] [MemberData(nameof(GetValidNames))] @@ -237,9 +230,7 @@ private static int PingPong_OtherProcess(string modeName, string inboundName, st public static TheoryData GetValidNames() { var names = new TheoryData() { Guid.NewGuid().ToString("N") }; - - if (!PlatformDetection.IsFullFramework) - names.Add(Guid.NewGuid().ToString("N") + new string('a', 1000)); + names.Add(Guid.NewGuid().ToString("N") + new string('a', 1000)); return names; } diff --git a/src/System.Threading/tests/ExecutionContextTests.cs b/src/System.Threading/tests/ExecutionContextTests.cs index b339c56e3ef9..d7bcad8ef038 100644 --- a/src/System.Threading/tests/ExecutionContextTests.cs +++ b/src/System.Threading/tests/ExecutionContextTests.cs @@ -147,7 +147,6 @@ public static void FlowTest() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] // desktop framework has a bug [SkipOnTargetFramework(TargetFrameworkMonikers.Mono)] public static void CaptureThenSuppressThenRunFlowTest() { diff --git a/src/System.Threading/tests/MutexTests.cs b/src/System.Threading/tests/MutexTests.cs index 22bb79ac0d56..05bfbfd3d121 100644 --- a/src/System.Threading/tests/MutexTests.cs +++ b/src/System.Threading/tests/MutexTests.cs @@ -37,13 +37,6 @@ public void Ctor_ConstructWaitRelease() } } - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework, "Full framework throws argument exception on long names")] - [Fact] - public void Ctor_InvalidNames_Windows() - { - AssertExtensions.Throws("name", null, () => new Mutex(false, new string('a', 1000), out bool createdNew)); - } - [Fact] [PlatformSpecific(TestPlatforms.AnyUnix)] public void Ctor_InvalidNames_Unix() @@ -79,9 +72,6 @@ public void Ctor_NameUsedByOtherSynchronizationPrimitive_Windows() [PlatformSpecific(TestPlatforms.Windows)] [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotInAppContainer))] // Can't create global objects in appcontainer - [SkipOnTargetFramework( - TargetFrameworkMonikers.NetFramework, - "The fix necessary for this test (PR https://github.com/dotnet/coreclr/pull/12381) is not in the .NET Framework.")] public void Ctor_ImpersonateAnonymousAndTryCreateGlobalMutexTest() { ThreadTestHelpers.RunTestInBackgroundThread(() => @@ -281,7 +271,7 @@ public static TheoryData GetValidNames() { var names = new TheoryData() { Guid.NewGuid().ToString("N") }; - if (PlatformDetection.IsWindows && !PlatformDetection.IsFullFramework) + if (PlatformDetection.IsWindows) names.Add(Guid.NewGuid().ToString("N") + new string('a', 1000)); return names; diff --git a/src/System.Threading/tests/ReaderWriterLockSlimTests.cs b/src/System.Threading/tests/ReaderWriterLockSlimTests.cs index 793b451f0362..bb5d6cac28ea 100644 --- a/src/System.Threading/tests/ReaderWriterLockSlimTests.cs +++ b/src/System.Threading/tests/ReaderWriterLockSlimTests.cs @@ -383,7 +383,6 @@ public static void WriterToUpgradeableReaderChain() [Fact] [OuterLoop] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Hangs in desktop, issue dotnet/corefx#3364 is not fixed there")] public static void ReleaseReadersWhenWaitingWriterTimesOut() { using (var rwls = new ReaderWriterLockSlim()) diff --git a/src/System.Threading/tests/ReaderWriterLockTests.cs b/src/System.Threading/tests/ReaderWriterLockTests.cs index 5cf9c2a639fa..c69bb74bf43d 100644 --- a/src/System.Threading/tests/ReaderWriterLockTests.cs +++ b/src/System.Threading/tests/ReaderWriterLockTests.cs @@ -16,7 +16,6 @@ public static class ReaderWriterLockTests private const int InvalidLockCookieExceptionHResult = unchecked((int)0x80070057); // E_INVALIDARG [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] // desktop framework treats the timeout as an unsigned value public static void InvalidTimeoutTest_ChangedInDotNetCore() { var rwl = new ReaderWriterLock(); @@ -436,7 +435,6 @@ public static void SingleThreadLockOwnerMiscellaneousTest() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public static void DowngradeQuirks_ChangedInDotNetCore() { var trwl = new TestReaderWriterLock(); diff --git a/src/System.Threading/tests/SemaphoreTests.cs b/src/System.Threading/tests/SemaphoreTests.cs index 27774e2577b7..c6d441413bda 100644 --- a/src/System.Threading/tests/SemaphoreTests.cs +++ b/src/System.Threading/tests/SemaphoreTests.cs @@ -74,15 +74,6 @@ public void Ctor_InvalidArguments() AssertExtensions.Throws(null, () => new Semaphore(2, 1, "CtorSemaphoreTest", out createdNew)); } - [SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework, "Full framework throws argument exception on long names")] - [Fact] - public void Ctor_InvalidNames() - { - AssertExtensions.Throws("name", null, () => new Semaphore(0, 1, new string('a', 10000))); - bool createdNew; - AssertExtensions.Throws("name", null, () => new Semaphore(0, 1, new string('a', 10000), out createdNew)); - } - [Fact] public void CanWaitWithoutBlockingUntilNoCount() { @@ -319,9 +310,7 @@ private static int PingPong_OtherProcess(string inboundName, string outboundName public static TheoryData GetValidNames() { var names = new TheoryData() { Guid.NewGuid().ToString("N") }; - - if (!PlatformDetection.IsFullFramework) - names.Add(Guid.NewGuid().ToString("N") + new string('a', 1000)); + names.Add(Guid.NewGuid().ToString("N") + new string('a', 1000)); return names; } diff --git a/src/System.Threading/tests/SynchronizationContextTests.cs b/src/System.Threading/tests/SynchronizationContextTests.cs index 36f1ceb9812d..4d2420fc7c64 100644 --- a/src/System.Threading/tests/SynchronizationContextTests.cs +++ b/src/System.Threading/tests/SynchronizationContextTests.cs @@ -37,7 +37,6 @@ public static void WaitTest() } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] // desktop framework does not check for null and crashes [SkipOnTargetFramework(TargetFrameworkMonikers.Mono)] public static void WaitTest_ChangedInDotNetCore() { diff --git a/src/System.Threading/tests/System.Threading.Tests.csproj b/src/System.Threading/tests/System.Threading.Tests.csproj index d95b7b7599dc..fa3bf60ded47 100644 --- a/src/System.Threading/tests/System.Threading.Tests.csproj +++ b/src/System.Threading/tests/System.Threading.Tests.csproj @@ -3,7 +3,7 @@ {18EF66B3-51EE-46D8-B283-1CB6A1197813} true true - netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release;uap-Debug;uap-Release + netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release @@ -15,14 +15,14 @@ - + - + @@ -31,7 +31,7 @@ - + diff --git a/src/System.Threading/tests/ThreadLocalTests.cs b/src/System.Threading/tests/ThreadLocalTests.cs index f703ed341895..60d673b36fdd 100644 --- a/src/System.Threading/tests/ThreadLocalTests.cs +++ b/src/System.Threading/tests/ThreadLocalTests.cs @@ -370,7 +370,6 @@ public static void RunThreadLocalTest9_Uninitialized() [Fact] [OuterLoop] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] public static void ValuesGetterDoesNotThrowUnexpectedExceptionWhenDisposed() { var startTest = new ManualResetEvent(false); diff --git a/src/System.Transactions.Local/tests/Configurations.props b/src/System.Transactions.Local/tests/Configurations.props index 581054d46db4..f97cd5ea7a97 100644 --- a/src/System.Transactions.Local/tests/Configurations.props +++ b/src/System.Transactions.Local/tests/Configurations.props @@ -1,7 +1,8 @@  - netstandard; + netcoreapp; + uap; \ No newline at end of file diff --git a/src/System.Transactions.Local/tests/LTMEnlistmentTests.cs b/src/System.Transactions.Local/tests/LTMEnlistmentTests.cs index 947d4e36f715..3c298dacac77 100644 --- a/src/System.Transactions.Local/tests/LTMEnlistmentTests.cs +++ b/src/System.Transactions.Local/tests/LTMEnlistmentTests.cs @@ -83,7 +83,6 @@ public void SinglePhaseDurable(int volatileCount, EnlistmentOptions volatileEnli [InlineData(0, EnlistmentOptions.None, EnlistmentOptions.None, Phase1Vote.Prepared, Phase1Vote.Prepared, true, EnlistmentOutcome.Aborted, EnlistmentOutcome.Aborted, TransactionStatus.Aborted)] [InlineData(1, EnlistmentOptions.None, EnlistmentOptions.None, Phase1Vote.Prepared, Phase1Vote.Prepared, true, EnlistmentOutcome.Aborted, EnlistmentOutcome.Aborted, TransactionStatus.Aborted)] [InlineData(2, EnlistmentOptions.None, EnlistmentOptions.None, Phase1Vote.Prepared, Phase1Vote.Prepared, true, EnlistmentOutcome.Aborted, EnlistmentOutcome.Aborted, TransactionStatus.Aborted)] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Expects PNSE due to not being supported on core")] public void TwoPhaseDurable(int volatileCount, EnlistmentOptions volatileEnlistmentOption, EnlistmentOptions durableEnlistmentOption, Phase1Vote volatilePhase1Vote, Phase1Vote durablePhase1Vote, bool commit, EnlistmentOutcome expectedVolatileOutcome, EnlistmentOutcome expectedDurableOutcome, TransactionStatus expectedTxStatus) { Transaction tx = null; diff --git a/src/System.Transactions.Local/tests/NonMsdtcPromoterTests.cs b/src/System.Transactions.Local/tests/NonMsdtcPromoterTests.cs index 20e15f180ef2..b78ef4a30464 100644 --- a/src/System.Transactions.Local/tests/NonMsdtcPromoterTests.cs +++ b/src/System.Transactions.Local/tests/NonMsdtcPromoterTests.cs @@ -2295,7 +2295,6 @@ public void PSPENonMsdtcSetDistributedTransactionIdentifierCallWithWrongNotifica } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Expects PNSE due to not being supported on core")] public void SimpleTransactionSuperior() { MySimpleTransactionSuperior superior = new MySimpleTransactionSuperior(); diff --git a/src/System.Transactions.Local/tests/System.Transactions.Local.Tests.csproj b/src/System.Transactions.Local/tests/System.Transactions.Local.Tests.csproj index 066f5ac2d12b..2241333d6045 100644 --- a/src/System.Transactions.Local/tests/System.Transactions.Local.Tests.csproj +++ b/src/System.Transactions.Local/tests/System.Transactions.Local.Tests.csproj @@ -3,7 +3,7 @@ {1C397868-9644-48CB-94BF-35805C4AE024} false true - netstandard-Debug;netstandard-Release + netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release diff --git a/src/System.Utf8String.Experimental/tests/Configurations.props b/src/System.Utf8String.Experimental/tests/Configurations.props index d3ac8a63c74a..a1eadd7648d8 100644 --- a/src/System.Utf8String.Experimental/tests/Configurations.props +++ b/src/System.Utf8String.Experimental/tests/Configurations.props @@ -1,5 +1,4 @@ - - + netcoreapp; diff --git a/src/System.ValueTuple/tests/Configurations.props b/src/System.ValueTuple/tests/Configurations.props index f5d3d45ffbf4..f97cd5ea7a97 100644 --- a/src/System.ValueTuple/tests/Configurations.props +++ b/src/System.ValueTuple/tests/Configurations.props @@ -2,7 +2,7 @@ netcoreapp; - netstandard; + uap; \ No newline at end of file diff --git a/src/System.ValueTuple/tests/System.ValueTuple.Tests.csproj b/src/System.ValueTuple/tests/System.ValueTuple.Tests.csproj index e8f86b3b4a91..56b70dbccd2e 100644 --- a/src/System.ValueTuple/tests/System.ValueTuple.Tests.csproj +++ b/src/System.ValueTuple/tests/System.ValueTuple.Tests.csproj @@ -1,7 +1,7 @@ {CBD5AE8D-8595-48E2-848F-1A3492A28FDB} - netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release + netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release true diff --git a/src/System.Web.HttpUtility/tests/Configurations.props b/src/System.Web.HttpUtility/tests/Configurations.props index 581054d46db4..f97cd5ea7a97 100644 --- a/src/System.Web.HttpUtility/tests/Configurations.props +++ b/src/System.Web.HttpUtility/tests/Configurations.props @@ -1,7 +1,8 @@  - netstandard; + netcoreapp; + uap; \ No newline at end of file diff --git a/src/System.Web.HttpUtility/tests/System.Web.HttpUtility.Tests.csproj b/src/System.Web.HttpUtility/tests/System.Web.HttpUtility.Tests.csproj index b9ad33aca23f..265219c4bcc1 100644 --- a/src/System.Web.HttpUtility/tests/System.Web.HttpUtility.Tests.csproj +++ b/src/System.Web.HttpUtility/tests/System.Web.HttpUtility.Tests.csproj @@ -1,7 +1,7 @@ {914279EE-58B1-4B27-BA18-66D988C8DFFA} - netstandard-Debug;netstandard-Release + netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release From 7c51e15fab50e8b3492d80dbc6b8a15db744dfa1 Mon Sep 17 00:00:00 2001 From: Viktor Hofer Date: Thu, 30 May 2019 05:02:40 +0200 Subject: [PATCH 568/607] Add validation target for netstandard --- src/Directory.Build.targets | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/Directory.Build.targets b/src/Directory.Build.targets index 86930b55959a..77b9bae36675 100644 --- a/src/Directory.Build.targets +++ b/src/Directory.Build.targets @@ -28,6 +28,14 @@ Condition="'$(IsTestProject)' == 'true' and '$(IsTestSupportProject)' != 'true'" DependsOnTargets="BuildAndTest" /> + + + + + + + From 97d29c9a1a4a23607b328925fbd5b2cfca7eb0b4 Mon Sep 17 00:00:00 2001 From: Viktor Hofer Date: Thu, 30 May 2019 15:14:44 +0200 Subject: [PATCH 570/607] Harden failing EventLog.Clear test --- .../tests/EventLogTests/EventLogTests.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/System.Diagnostics.EventLog/tests/EventLogTests/EventLogTests.cs b/src/System.Diagnostics.EventLog/tests/EventLogTests/EventLogTests.cs index e2edd30ffb62..4cd4217b5b92 100644 --- a/src/System.Diagnostics.EventLog/tests/EventLogTests/EventLogTests.cs +++ b/src/System.Diagnostics.EventLog/tests/EventLogTests/EventLogTests.cs @@ -33,7 +33,7 @@ public void ClearLog() using (EventLog eventLog = new EventLog()) { eventLog.Source = source; - eventLog.Clear(); + Helpers.RetryOnWin7(() => eventLog.Clear()); Assert.Equal(0, Helpers.RetryOnWin7((() => eventLog.Entries.Count))); Helpers.RetryOnWin7(() => eventLog.WriteEntry("Writing to event log.")); Helpers.WaitForEventLog(eventLog, 1); From 2f3d654846dd64abde51635f218dfd83f4c33b6c Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Thu, 30 May 2019 10:27:29 -0400 Subject: [PATCH 571/607] Update dependencies from https://github.com/dotnet/arcade build 20190529.5 (#38054) - Microsoft.DotNet.XUnitExtensions - 2.4.1-beta.19279.5 - Microsoft.DotNet.XUnitConsoleRunner - 2.5.1-beta.19279.5 - Microsoft.DotNet.VersionTools.Tasks - 1.0.0-beta.19279.5 - Microsoft.DotNet.ApiCompat - 1.0.0-beta.19279.5 - Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19279.5 - Microsoft.DotNet.Build.Tasks.Configuration - 1.0.0-beta.19279.5 - Microsoft.DotNet.Build.Tasks.Feed - 2.2.0-beta.19279.5 - Microsoft.DotNet.Build.Tasks.Packaging - 1.0.0-beta.19279.5 - Microsoft.DotNet.CodeAnalysis - 1.0.0-beta.19279.5 - Microsoft.DotNet.CoreFxTesting - 1.0.0-beta.19279.5 - Microsoft.DotNet.GenAPI - 1.0.0-beta.19279.5 - Microsoft.DotNet.Helix.Sdk - 2.0.0-beta.19279.5 - Microsoft.DotNet.RemoteExecutor - 1.0.0-beta.19279.5 - Microsoft.DotNet.GenFacades - 1.0.0-beta.19279.5 --- eng/Version.Details.xml | 56 ++++++++++++++++++++--------------------- eng/Versions.props | 24 +++++++++--------- global.json | 4 +-- 3 files changed, 42 insertions(+), 42 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index e00b3a22bbf9..501afce15b35 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -34,65 +34,65 @@ https://github.com/dotnet/corefx c7d48ca7732b7717e84d8375588d83866104ef58 - + https://github.com/dotnet/arcade - 11f90a2a260422201895de58e57170131ab4efe7 + fb62c6377a6bd163af2a7516260f064498942585 https://github.com/dotnet/standard 3b980275962d561f608ccea96143a6a0e4d15869 - + https://github.com/dotnet/arcade - 11f90a2a260422201895de58e57170131ab4efe7 + fb62c6377a6bd163af2a7516260f064498942585 - + https://github.com/dotnet/arcade - 11f90a2a260422201895de58e57170131ab4efe7 + fb62c6377a6bd163af2a7516260f064498942585 - + https://github.com/dotnet/arcade - 11f90a2a260422201895de58e57170131ab4efe7 + fb62c6377a6bd163af2a7516260f064498942585 - + https://github.com/dotnet/arcade - 11f90a2a260422201895de58e57170131ab4efe7 + fb62c6377a6bd163af2a7516260f064498942585 - + https://github.com/dotnet/arcade - 11f90a2a260422201895de58e57170131ab4efe7 + fb62c6377a6bd163af2a7516260f064498942585 - + https://github.com/dotnet/arcade - 11f90a2a260422201895de58e57170131ab4efe7 + fb62c6377a6bd163af2a7516260f064498942585 - + https://github.com/dotnet/arcade - 11f90a2a260422201895de58e57170131ab4efe7 + fb62c6377a6bd163af2a7516260f064498942585 - + https://github.com/dotnet/arcade - 11f90a2a260422201895de58e57170131ab4efe7 + fb62c6377a6bd163af2a7516260f064498942585 - + https://github.com/dotnet/arcade - 11f90a2a260422201895de58e57170131ab4efe7 + fb62c6377a6bd163af2a7516260f064498942585 - + https://github.com/dotnet/arcade - 11f90a2a260422201895de58e57170131ab4efe7 + fb62c6377a6bd163af2a7516260f064498942585 - + https://github.com/dotnet/arcade - 11f90a2a260422201895de58e57170131ab4efe7 + fb62c6377a6bd163af2a7516260f064498942585 - + https://github.com/dotnet/arcade - 11f90a2a260422201895de58e57170131ab4efe7 + fb62c6377a6bd163af2a7516260f064498942585 - + https://github.com/dotnet/arcade - 11f90a2a260422201895de58e57170131ab4efe7 + fb62c6377a6bd163af2a7516260f064498942585 https://dev.azure.com/dnceng/internal/_git/dotnet-optimization diff --git a/eng/Versions.props b/eng/Versions.props index a4252100bf6a..866d05c73660 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -23,18 +23,18 @@ - 1.0.0-beta.19278.1 - 1.0.0-beta.19278.1 - 1.0.0-beta.19278.1 - 1.0.0-beta.19278.1 - 2.4.1-beta.19278.1 - 2.5.1-beta.19278.1 - 1.0.0-beta.19278.1 - 1.0.0-beta.19278.1 - 1.0.0-beta.19278.1 - 1.0.0-beta.19278.1 - 2.2.0-beta.19278.1 - 1.0.0-beta.19278.1 + 1.0.0-beta.19279.5 + 1.0.0-beta.19279.5 + 1.0.0-beta.19279.5 + 1.0.0-beta.19279.5 + 2.4.1-beta.19279.5 + 2.5.1-beta.19279.5 + 1.0.0-beta.19279.5 + 1.0.0-beta.19279.5 + 1.0.0-beta.19279.5 + 1.0.0-beta.19279.5 + 2.2.0-beta.19279.5 + 1.0.0-beta.19279.5 3.0.0-preview6-27729-07 3.0.0-preview6-27729-07 diff --git a/global.json b/global.json index 0fa8a5645a92..f3c9b4de79b1 100644 --- a/global.json +++ b/global.json @@ -3,8 +3,8 @@ "dotnet": "3.0.100-preview6-011681" }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19278.1", - "Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19278.1", + "Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19279.5", + "Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19279.5", "FIX-85B6-MERGE-9C38-CONFLICT": "1.0.0", "Microsoft.NET.Sdk.IL": "3.0.0-preview6.19278.71" } From ed305545d082fa18785780037392608540ea629b Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Thu, 30 May 2019 10:30:13 -0400 Subject: [PATCH 572/607] Update dependencies from https://github.com/dotnet/corefx build 20190529.8 (#38056) - runtime.native.System.IO.Ports - 4.6.0-preview6.19279.8 - Microsoft.NETCore.Platforms - 3.0.0-preview6.19279.8 --- eng/Version.Details.xml | 8 ++++---- eng/Versions.props | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 501afce15b35..073a40fe4f75 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -26,13 +26,13 @@ https://github.com/dotnet/core-setup 798280671320c7613d34fadc88ec1b0e853d3d37 - + https://github.com/dotnet/corefx - c7d48ca7732b7717e84d8375588d83866104ef58 + e23119d577e644d2c2a25419c88c1181681358e0 - + https://github.com/dotnet/corefx - c7d48ca7732b7717e84d8375588d83866104ef58 + e23119d577e644d2c2a25419c88c1181681358e0 https://github.com/dotnet/arcade diff --git a/eng/Versions.props b/eng/Versions.props index 866d05c73660..2438f7bba4be 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -43,8 +43,8 @@ 3.0.0-preview6.19278.71 3.0.0-preview6.19278.71 - 3.0.0-preview6.19278.7 - 4.6.0-preview6.19278.7 + 3.0.0-preview6.19279.8 + 4.6.0-preview6.19279.8 2.1.0-prerelease.19279.2 From adc16f3d53b18467d5ed92fd1b988b0c21901ab9 Mon Sep 17 00:00:00 2001 From: Steve Harter Date: Thu, 30 May 2019 07:35:25 -0700 Subject: [PATCH 573/607] Update float converter and related tests (#37894) --- .../src/System/Text/Json/JsonHelpers.cs | 9 --- .../Converters/JsonValueConverterSingle.cs | 7 +-- .../tests/Serialization/Value.ReadTests.cs | 61 ++++++++++++------- .../tests/System.Text.Json.Tests.csproj | 1 + 4 files changed, 43 insertions(+), 35 deletions(-) diff --git a/src/System.Text.Json/src/System/Text/Json/JsonHelpers.cs b/src/System.Text.Json/src/System/Text/Json/JsonHelpers.cs index 4485067ac04b..a96e32c85086 100644 --- a/src/System.Text.Json/src/System/Text/Json/JsonHelpers.cs +++ b/src/System.Text.Json/src/System/Text/Json/JsonHelpers.cs @@ -55,15 +55,6 @@ public static bool IsInRangeInclusive(int value, int lowerBound, int upperBound) public static bool IsInRangeInclusive(long value, long lowerBound, long upperBound) => (ulong)(value - lowerBound) <= (ulong)(upperBound - lowerBound); - /// - /// Returns if is between - /// and , inclusive. - /// - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static bool IsInRangeInclusive(double value, double lowerBound, double upperBound) - // For floating-point, do a direct comparison as it is more accurate than subtracting. - => (value >= lowerBound) && (value <= upperBound); - /// /// Returns if is between /// and , inclusive. diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/JsonValueConverterSingle.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/JsonValueConverterSingle.cs index a2fefee12859..967fe1850cb7 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/JsonValueConverterSingle.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/JsonValueConverterSingle.cs @@ -10,16 +10,13 @@ internal sealed class JsonValueConverterSingle : JsonValueConverter { public override bool TryRead(Type valueType, ref Utf8JsonReader reader, out float value) { - if (reader.TokenType != JsonTokenType.Number || - !reader.TryGetDouble(out double rawValue) || - !JsonHelpers.IsInRangeInclusive(rawValue, float.MinValue, float.MaxValue)) + if (reader.TokenType != JsonTokenType.Number) { value = default; return false; } - value = (float)rawValue; - return true; + return reader.TryGetSingle(out value); } public override void Write(float value, Utf8JsonWriter writer) diff --git a/src/System.Text.Json/tests/Serialization/Value.ReadTests.cs b/src/System.Text.Json/tests/Serialization/Value.ReadTests.cs index 5adca84f6c79..e27e6a10c879 100644 --- a/src/System.Text.Json/tests/Serialization/Value.ReadTests.cs +++ b/src/System.Text.Json/tests/Serialization/Value.ReadTests.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System.Globalization; using Xunit; namespace System.Text.Json.Serialization.Tests @@ -139,12 +140,6 @@ public static void RangeFail() Assert.Throws(() => JsonSerializer.Parse((ushort.MinValue - 1).ToString())); Assert.Throws(() => JsonSerializer.Parse((ushort.MaxValue + 1).ToString())); - // To ensure range failure, just use double's MinValue and MaxValue (instead of float.MinValue\MaxValue +-1) - Assert.Throws(() => JsonSerializer.Parse(double.MinValue.ToString())); - Assert.Throws(() => JsonSerializer.Parse(double.MaxValue.ToString())); - Assert.Throws(() => JsonSerializer.Parse(double.MinValue.ToString())); - Assert.Throws(() => JsonSerializer.Parse(double.MaxValue.ToString())); - // These are natively supported by the reader: Assert.Throws(() => JsonSerializer.Parse(((long)int.MinValue - 1).ToString())); Assert.Throws(() => JsonSerializer.Parse(((long)int.MaxValue + 1).ToString())); @@ -170,12 +165,6 @@ public static void RangeFail() Assert.Throws(() => JsonSerializer.Parse(decimal.MaxValue.ToString() + "0")); Assert.Throws(() => JsonSerializer.Parse(decimal.MinValue.ToString() + "0")); Assert.Throws(() => JsonSerializer.Parse(decimal.MaxValue.ToString() + "0")); - - // todo: determine why these don't throw (issue with reader?) - //Assert.Throws(() => JsonSerializer.Parse(double.MinValue.ToString() + "0")); - //Assert.Throws(() => JsonSerializer.Parse(double.MaxValue.ToString() + "0")); - //Assert.Throws(() => JsonSerializer.Parse(double.MinValue.ToString() + "0")); - //Assert.Throws(() => JsonSerializer.Parse(double.MaxValue.ToString() + "0")); } [Fact] @@ -193,10 +182,6 @@ public static void RangePass() Assert.Equal(ushort.MaxValue, JsonSerializer.Parse(ushort.MaxValue.ToString())); Assert.Equal(ushort.MaxValue, JsonSerializer.Parse(ushort.MaxValue.ToString())); - // todo: these fail due to double->float conversion - //Assert.Equal(float.MaxValue, JsonSerializer.Parse(float.MaxValue.ToString())); - //Assert.Equal(float.MaxValue, JsonSerializer.Parse(float.MaxValue.ToString())); - Assert.Equal(int.MaxValue, JsonSerializer.Parse(int.MaxValue.ToString())); Assert.Equal(int.MaxValue, JsonSerializer.Parse(int.MaxValue.ToString())); @@ -209,12 +194,46 @@ public static void RangePass() Assert.Equal(ulong.MaxValue, JsonSerializer.Parse(ulong.MaxValue.ToString())); Assert.Equal(ulong.MaxValue, JsonSerializer.Parse(ulong.MaxValue.ToString())); - Assert.Equal(decimal.MaxValue, JsonSerializer.Parse(decimal.MaxValue.ToString())); - Assert.Equal(decimal.MaxValue, JsonSerializer.Parse(decimal.MaxValue.ToString())); + Assert.Equal(decimal.MaxValue, JsonSerializer.Parse(decimal.MaxValue.ToString(CultureInfo.InvariantCulture))); + Assert.Equal(decimal.MaxValue, JsonSerializer.Parse(decimal.MaxValue.ToString(CultureInfo.InvariantCulture))); + } - // todo: these are failing; do we need round-trip format "R"? - //Assert.Equal(double.MaxValue, JsonSerializer.Parse(double.MaxValue.ToString())); - //Assert.Equal(double.MaxValue, JsonSerializer.Parse(double.MaxValue.ToString())); + [Fact] + [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Skipped since NETFX has different semantics and bugs with floating point.")] + public static void RangePassFloatingPoint() + { + // Verify overflow\underflow. + // On NETFX these throw. + Assert.True(float.IsNegativeInfinity(JsonSerializer.Parse(double.MinValue.ToString(CultureInfo.InvariantCulture)))); + Assert.True(float.IsPositiveInfinity(JsonSerializer.Parse(double.MaxValue.ToString(CultureInfo.InvariantCulture)))); + Assert.True(float.IsNegativeInfinity(JsonSerializer.Parse(double.MinValue.ToString(CultureInfo.InvariantCulture)).Value)); + Assert.True(float.IsPositiveInfinity(JsonSerializer.Parse(double.MaxValue.ToString(CultureInfo.InvariantCulture)).Value)); + + Assert.True(double.IsNegativeInfinity(JsonSerializer.Parse(double.MinValue.ToString(CultureInfo.InvariantCulture) + "0"))); + Assert.True(double.IsPositiveInfinity(JsonSerializer.Parse(double.MaxValue.ToString(CultureInfo.InvariantCulture) + "0"))); + Assert.True(double.IsNegativeInfinity(JsonSerializer.Parse(double.MinValue.ToString(CultureInfo.InvariantCulture) + "0").Value)); + Assert.True(double.IsPositiveInfinity(JsonSerializer.Parse(double.MaxValue.ToString(CultureInfo.InvariantCulture) + "0").Value)); + + // Verify sign is correct. + // On NETFX a value of -0 does not keep the sign. + Assert.Equal(0x0000000000000000ul, (ulong)BitConverter.DoubleToInt64Bits(JsonSerializer.Parse("0"))); + Assert.Equal(0x8000000000000000ul, (ulong)BitConverter.DoubleToInt64Bits(JsonSerializer.Parse("-0"))); + Assert.Equal(0x8000000000000000ul, (ulong)BitConverter.DoubleToInt64Bits(JsonSerializer.Parse("-0.0"))); + +#if BUILDING_INBOX_LIBRARY + // Verify sign is correct; SingleToInt32Bits not available on netfx. + Assert.Equal(0x00000000u, (uint)BitConverter.SingleToInt32Bits(JsonSerializer.Parse("0"))); + Assert.Equal(0x80000000u, (uint)BitConverter.SingleToInt32Bits(JsonSerializer.Parse("-0"))); + Assert.Equal(0x80000000u, (uint)BitConverter.SingleToInt32Bits(JsonSerializer.Parse("-0.0"))); +#endif + + // Verify Round-tripping. + // On NETFX round tripping is not supported. + Assert.Equal(float.MaxValue, JsonSerializer.Parse(float.MaxValue.ToString(CultureInfo.InvariantCulture))); + Assert.Equal(float.MaxValue, JsonSerializer.Parse(float.MaxValue.ToString(CultureInfo.InvariantCulture))); + + Assert.Equal(double.MaxValue, JsonSerializer.Parse(double.MaxValue.ToString(CultureInfo.InvariantCulture))); + Assert.Equal(double.MaxValue, JsonSerializer.Parse(double.MaxValue.ToString(CultureInfo.InvariantCulture))); } [Fact] diff --git a/src/System.Text.Json/tests/System.Text.Json.Tests.csproj b/src/System.Text.Json/tests/System.Text.Json.Tests.csproj index f9490f39efbd..12e65fd8a361 100644 --- a/src/System.Text.Json/tests/System.Text.Json.Tests.csproj +++ b/src/System.Text.Json/tests/System.Text.Json.Tests.csproj @@ -2,6 +2,7 @@ {5F553243-042C-45C0-8E49-C739131E11C3} netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release + $(DefineConstants);BUILDING_INBOX_LIBRARY From 73066ea252de240b0c3bcb79a0d9a1cfbbe56952 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Thu, 30 May 2019 08:14:19 -0700 Subject: [PATCH 574/607] Update dependencies from https://github.com/dotnet/standard build 20190530.1 (#38058) - NETStandard.Library - 2.1.0-prerelease.19280.1 --- eng/Version.Details.xml | 4 ++-- eng/Versions.props | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 073a40fe4f75..442db3f9dc32 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -38,9 +38,9 @@ https://github.com/dotnet/arcade fb62c6377a6bd163af2a7516260f064498942585 - + https://github.com/dotnet/standard - 3b980275962d561f608ccea96143a6a0e4d15869 + 2c94a70248b2c4379ceffbade085f8d7eca4fee0 https://github.com/dotnet/arcade diff --git a/eng/Versions.props b/eng/Versions.props index 2438f7bba4be..9d3858ae4423 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -46,7 +46,7 @@ 3.0.0-preview6.19279.8 4.6.0-preview6.19279.8 - 2.1.0-prerelease.19279.2 + 2.1.0-prerelease.19280.1 99.99.99-master-20190521.3 From 0aad50252f0f6e3e62fc050f2c4e6225005b6b63 Mon Sep 17 00:00:00 2001 From: Ahson Khan Date: Thu, 30 May 2019 12:14:53 -0700 Subject: [PATCH 575/607] Address leftover feedback related to Skip/TrySkip APIs. (#38044) * Address leftover feedback related to Skip/TrySkip APIs. * Add some more commas. * Fix comment nit. --- .../src/Resources/Strings.resx | 2 +- .../System/Text/Json/Reader/Utf8JsonReader.cs | 28 ++++++++++++++++++- 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/src/System.Text.Json/src/Resources/Strings.resx b/src/System.Text.Json/src/Resources/Strings.resx index 5e254fe031ca..f0d121a10ca6 100644 --- a/src/System.Text.Json/src/Resources/Strings.resx +++ b/src/System.Text.Json/src/Resources/Strings.resx @@ -363,7 +363,7 @@ Unexpected end of data while reading a comment. - Cannot skip tokens on partial JSON. Either get the whole payload and set _isFinalBlock to true or call TrySkip. + Cannot skip tokens on partial JSON. Either get the whole payload and create a Utf8JsonReader instance where isFinalBlock is true or call TrySkip. Comments cannot be stored when deserializing objects, only the Skip and Disallow comment handling modes are supported. diff --git a/src/System.Text.Json/src/System/Text/Json/Reader/Utf8JsonReader.cs b/src/System.Text.Json/src/System/Text/Json/Reader/Utf8JsonReader.cs index 4c2d11d0e7f3..e88c980f7751 100644 --- a/src/System.Text.Json/src/System/Text/Json/Reader/Utf8JsonReader.cs +++ b/src/System.Text.Json/src/System/Text/Json/Reader/Utf8JsonReader.cs @@ -271,8 +271,21 @@ public bool Read() /// Skips the children of the current JSON token. /// /// - /// Thrown when the reader was given partial data with more data to follow (i.e. _isFinalBlock is false). + /// Thrown when the reader was given partial data with more data to follow (i.e. is false). /// + /// + /// Thrown when an invalid JSON token is encountered while skipping, according to the JSON RFC, + /// or if the current depth exceeds the recursive limit set by the max depth. + /// + /// + /// When is , the reader first moves to the property value. + /// When (originally, or after advancing) is or + /// , the reader advances to the matching + /// or . + /// + /// For all other token types, the reader does not move. After the next call to , the reader will be at + /// the next value (when in an array), the next property name (when in an object), or the end array/object token. + /// public void Skip() { if (!_isFinalBlock) @@ -314,10 +327,23 @@ private void SkipHelper() /// Tries to skip the children of the current JSON token. /// /// True if there was enough data for the children to be skipped successfully, else false. + /// + /// Thrown when an invalid JSON token is encountered while skipping, according to the JSON RFC, + /// or if the current depth exceeds the recursive limit set by the max depth. + /// /// /// If the reader did not have enough data to completely skip the children of the current token, /// it will be reset to the state it was in before the method was called. /// + /// + /// When is , the reader first moves to the property value. + /// When (originally, or after advancing) is or + /// , the reader advances to the matching + /// or . + /// + /// For all other token types, the reader does not move. After the next call to , the reader will be at + /// the next value (when in an array), the next property name (when in an object), or the end array/object token. + /// public bool TrySkip() { if (_isFinalBlock) From 88f4967b84d20f6ea6da037cef6fd82119e76900 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Thu, 30 May 2019 15:15:38 -0400 Subject: [PATCH 576/607] [master] Update dependencies from dotnet/coreclr (#38057) * Update dependencies from https://github.com/dotnet/coreclr build 20190529.4 - Microsoft.NET.Sdk.IL - 3.0.0-preview6.19279.4 - Microsoft.NETCore.ILAsm - 3.0.0-preview6.19279.4 - Microsoft.NETCore.Runtime.CoreCLR - 3.0.0-preview6.19279.4 * Expose TrimEndingDirectorySeparator * Disable new tests on Unix --- eng/Version.Details.xml | 12 +++--- eng/Versions.props | 4 +- global.json | 2 +- .../ref/System.Runtime.Extensions.cs | 4 ++ .../src/ApiCompatBaseline.uapaot.txt | 6 ++- .../tests/System/IO/PathTests.netcoreapp.cs | 38 +++++++++++++++- .../tests/System/IO/PathTestsBase.cs | 43 +++++++++++++++++++ 7 files changed, 98 insertions(+), 11 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 442db3f9dc32..781ab610399e 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -1,16 +1,16 @@ - + https://github.com/dotnet/coreclr - 7631331183266734342de351b25519a07743e13e + 42d8e40e469cf00128e0cfa48f24297afa13c36f - + https://github.com/dotnet/coreclr - 7631331183266734342de351b25519a07743e13e + 42d8e40e469cf00128e0cfa48f24297afa13c36f - + https://github.com/dotnet/coreclr - 7631331183266734342de351b25519a07743e13e + 42d8e40e469cf00128e0cfa48f24297afa13c36f diff --git a/eng/Versions.props b/eng/Versions.props index 9d3858ae4423..72ee1ed3b4be 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -40,8 +40,8 @@ 3.0.0-preview6-27729-07 3.0.0-preview6-27729-07 - 3.0.0-preview6.19278.71 - 3.0.0-preview6.19278.71 + 3.0.0-preview6.19279.4 + 3.0.0-preview6.19279.4 3.0.0-preview6.19279.8 4.6.0-preview6.19279.8 diff --git a/global.json b/global.json index f3c9b4de79b1..a30fe7ce1126 100644 --- a/global.json +++ b/global.json @@ -6,6 +6,6 @@ "Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19279.5", "Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19279.5", "FIX-85B6-MERGE-9C38-CONFLICT": "1.0.0", - "Microsoft.NET.Sdk.IL": "3.0.0-preview6.19278.71" + "Microsoft.NET.Sdk.IL": "3.0.0-preview6.19279.4" } } diff --git a/src/System.Runtime.Extensions/ref/System.Runtime.Extensions.cs b/src/System.Runtime.Extensions/ref/System.Runtime.Extensions.cs index 45b884b3b75a..ca2b6f40e46e 100644 --- a/src/System.Runtime.Extensions/ref/System.Runtime.Extensions.cs +++ b/src/System.Runtime.Extensions/ref/System.Runtime.Extensions.cs @@ -1402,6 +1402,8 @@ public static partial class Path public static string Combine(string path1, string path2, string path3) { throw null; } public static string Combine(string path1, string path2, string path3, string path4) { throw null; } public static string Combine(params string[] paths) { throw null; } + public static bool EndsInDirectorySeparator(System.ReadOnlySpan path) { throw null; } + public static bool EndsInDirectorySeparator(string path) { throw null; } public static System.ReadOnlySpan GetDirectoryName(System.ReadOnlySpan path) { throw null; } public static string GetDirectoryName(string path) { throw null; } public static System.ReadOnlySpan GetExtension(System.ReadOnlySpan path) { throw null; } @@ -1435,6 +1437,8 @@ public static partial class Path public static string Join(params string[] paths) { throw null; } public static bool TryJoin(System.ReadOnlySpan path1, System.ReadOnlySpan path2, System.ReadOnlySpan path3, System.Span destination, out int charsWritten) { throw null; } public static bool TryJoin(System.ReadOnlySpan path1, System.ReadOnlySpan path2, System.Span destination, out int charsWritten) { throw null; } + public static System.ReadOnlySpan TrimEndingDirectorySeparator(System.ReadOnlySpan path) { throw null; } + public static string TrimEndingDirectorySeparator(string path) { throw null; } } public partial class StreamReader : System.IO.TextReader { diff --git a/src/System.Runtime.Extensions/src/ApiCompatBaseline.uapaot.txt b/src/System.Runtime.Extensions/src/ApiCompatBaseline.uapaot.txt index 1f13535d2b8d..c97156a24845 100644 --- a/src/System.Runtime.Extensions/src/ApiCompatBaseline.uapaot.txt +++ b/src/System.Runtime.Extensions/src/ApiCompatBaseline.uapaot.txt @@ -1,4 +1,8 @@ MembersMustExist : Member 'System.MidpointRounding System.MidpointRounding.ToNegativeInfinity' does not exist in the implementation but it does exist in the contract. MembersMustExist : Member 'System.MidpointRounding System.MidpointRounding.ToPositiveInfinity' does not exist in the implementation but it does exist in the contract. MembersMustExist : Member 'System.MidpointRounding System.MidpointRounding.ToZero' does not exist in the implementation but it does exist in the contract. -TypesMustExist : Type 'System.Numerics.BitOperations' does not exist in the implementation but it does exist in the contract. \ No newline at end of file +TypesMustExist : Type 'System.Numerics.BitOperations' does not exist in the implementation but it does exist in the contract. +MembersMustExist : Member 'System.IO.Path.EndsInDirectorySeparator(System.ReadOnlySpan)' does not exist in the implementation but it does exist in the contract. +MembersMustExist : Member 'System.IO.Path.EndsInDirectorySeparator(System.String)' does not exist in the implementation but it does exist in the contract. +MembersMustExist : Member 'System.IO.Path.TrimEndingDirectorySeparator(System.ReadOnlySpan)' does not exist in the implementation but it does exist in the contract. +MembersMustExist : Member 'System.IO.Path.TrimEndingDirectorySeparator(System.String)' does not exist in the implementation but it does exist in the contract. \ No newline at end of file diff --git a/src/System.Runtime.Extensions/tests/System/IO/PathTests.netcoreapp.cs b/src/System.Runtime.Extensions/tests/System/IO/PathTests.netcoreapp.cs index b1926f9a333b..2241b9ec569d 100644 --- a/src/System.Runtime.Extensions/tests/System/IO/PathTests.netcoreapp.cs +++ b/src/System.Runtime.Extensions/tests/System/IO/PathTests.netcoreapp.cs @@ -237,10 +237,46 @@ public static void GetFullPath_BasePath_NullInput(string path, string basePath, }; [Theory, - MemberData(nameof(GetFullPathBasePath_ArgumentException))] + MemberData(nameof(GetFullPathBasePath_ArgumentException))] public static void GetFullPath_BasePath_Input(string path, string basePath, string paramName) { Assert.Throws(paramName, () => Path.GetFullPath(path, basePath)); } + + [ActiveIssue(38066, TestPlatforms.AnyUnix)] + [Theory, + MemberData(nameof(TestData_TrimEndingDirectorySeparator))] + public void TrimEndingDirectorySeparator_String_CoreTests(string path, string expected) + { + string trimmed = Path.TrimEndingDirectorySeparator(path); + Assert.Equal(expected, trimmed); + Assert.Same(trimmed, Path.TrimEndingDirectorySeparator(trimmed)); + } + + [ActiveIssue(38066, TestPlatforms.AnyUnix)] + [Theory, + MemberData(nameof(TestData_TrimEndingDirectorySeparator))] + public void TrimEndingDirectorySeparator_ReadOnlySpan_CoreTests(string path, string expected) + { + ReadOnlySpan trimmed = Path.TrimEndingDirectorySeparator(path.AsSpan()); + PathAssert.Equal(expected, trimmed); + PathAssert.Equal(trimmed, Path.TrimEndingDirectorySeparator(trimmed)); + } + + [ActiveIssue(38066, TestPlatforms.AnyUnix)] + [Theory, + MemberData(nameof(TestData_EndsInDirectorySeparator))] + public void EndsInDirectorySeparator_String_CoreTests(string path, bool expected) + { + Assert.Equal(expected, Path.EndsInDirectorySeparator(path)); + } + + [ActiveIssue(38066, TestPlatforms.AnyUnix)] + [Theory, + MemberData(nameof(TestData_EndsInDirectorySeparator))] + public void EndsInDirectorySeparator_ReadOnlySpan_CoreTests(string path, bool expected) + { + Assert.Equal(expected, Path.EndsInDirectorySeparator(path.AsSpan())); + } } } diff --git a/src/System.Runtime.Extensions/tests/System/IO/PathTestsBase.cs b/src/System.Runtime.Extensions/tests/System/IO/PathTestsBase.cs index ad4d067c180a..47527a359f22 100644 --- a/src/System.Runtime.Extensions/tests/System/IO/PathTestsBase.cs +++ b/src/System.Runtime.Extensions/tests/System/IO/PathTestsBase.cs @@ -205,6 +205,49 @@ public partial class PathTestsBase { @"C:\\foo2", @"C:\" }, }; + public static TheoryData TestData_TrimEndingDirectorySeparator => new TheoryData + { + { @"C:\folder\", @"C:\folder" }, + { @"C:/folder/", @"C:/folder" }, + { @"/folder/", @"/folder" }, + { @"\folder\", @"\folder" }, + { @"folder\", @"folder" }, + { @"folder/", @"folder" }, + { @"C:\", @"C:\" }, + { @"C:/", @"C:/" }, + { @"", @"" }, + { @"/", @"/" }, + { @"\", @"\" }, + { @"\\server\share\", @"\\server\share" }, + { @"\\server\share\folder\", @"\\server\share\folder" }, + { @"\\?\C:\", @"\\?\C:\" }, + { @"\\?\C:\folder\", @"\\?\C:\folder" }, + { @"\\?\UNC\", @"\\?\UNC\" }, + { @"\\?\UNC\a\", @"\\?\UNC\a\" }, + { @"\\?\UNC\a\folder\", @"\\?\UNC\a\folder" }, + { null, null } + }; + + public static TheoryData TestData_EndsInDirectorySeparator => new TheoryData + { + { @"\", true }, + { @"/", true }, + { @"C:\folder\", true }, + { @"C:/folder/", true }, + { @"C:\", true }, + { @"C:/", true }, + { @"\\", true }, + { @"//", true }, + { @"\\server\share\", true }, + { @"\\?\UNC\a\", true }, + { @"\\?\C:\", true }, + { @"\\?\UNC\", true }, + { @"folder\", true }, + { @"folder", false }, + { @"", false }, + { null, false } + }; + protected static void GetTempPath_SetEnvVar(string envVar, string expected, string newTempPath) { string original = Path.GetTempPath(); From d24b3e33e66bfd0733f9c01fa810336d76a8872f Mon Sep 17 00:00:00 2001 From: Anirudh Agnihotry Date: Thu, 30 May 2019 13:15:16 -0700 Subject: [PATCH 577/607] Using reflection to add handler for user preference events (#37853) * using reflection to add handler for user preference events * adding comments, correcting typo and using GetType * adding debug.asserts * pushing down color translator * using open unbound delegate pointing directly to getter method of the eventargs category property * No longer using colorTable on netcoreapp 2.1 in system.Drawing.Common * reverting the use of extension method. * doing s_color check first and adding null check for category getter * missing semicolon * improving comments and adding tests * removing extra using * using already defined known color * skipping the test on nano and non-windows platform * introducing a custom property --- .../src/System/Drawing/ColorTranslator.cs | 0 .../src/System/Drawing/KnownColorTable.cs | 69 +++++++++++++++---- .../ref/System.Drawing.Common.Forwards.cs | 3 +- .../ref/System.Drawing.Common.cs | 9 --- .../ref/System.Drawing.Common.netstandard.cs | 11 ++- .../src/System.Drawing.Common.csproj | 10 +-- .../ref/System.Drawing.Primitives.cs | 9 +++ .../src/Resources/Strings.resx | 6 ++ .../src/System.Drawing.Primitives.csproj | 6 ++ .../tests/ColorTests.cs | 43 ++++++++++++ 10 files changed, 139 insertions(+), 27 deletions(-) rename src/{System.Drawing.Common => Common}/src/System/Drawing/ColorTranslator.cs (100%) diff --git a/src/System.Drawing.Common/src/System/Drawing/ColorTranslator.cs b/src/Common/src/System/Drawing/ColorTranslator.cs similarity index 100% rename from src/System.Drawing.Common/src/System/Drawing/ColorTranslator.cs rename to src/Common/src/System/Drawing/ColorTranslator.cs diff --git a/src/Common/src/System/Drawing/KnownColorTable.cs b/src/Common/src/System/Drawing/KnownColorTable.cs index f4b6dfabbafc..b5a37547901c 100644 --- a/src/Common/src/System/Drawing/KnownColorTable.cs +++ b/src/Common/src/System/Drawing/KnownColorTable.cs @@ -3,16 +3,13 @@ // See the LICENSE file in the project root for more information. using System.Diagnostics; +using System.Reflection; namespace System.Drawing { -#if FEATURE_SYSTEM_EVENTS - using Microsoft.Win32; - using System.Drawing.Internal; -#endif - static internal class KnownColorTable { + private static Func s_categoryGetter; private static int[] s_colorTable; private static string[] s_colorNameTable; @@ -59,9 +56,48 @@ private static void InitColorTable() { int[] values = new int[(unchecked((int)KnownColor.MenuHighlight)) + 1]; -#if FEATURE_SYSTEM_EVENTS - SystemEvents.UserPreferenceChanging += new UserPreferenceChangingEventHandler(OnUserPreferenceChanging); -#endif + // When Microsoft.Win32.SystemEvents is available, we can react to the UserPreferenceChanging events by updating + // SystemColors. In order to avoid a static dependency on SystemEvents since it is not available on all platforms + // and as such we don't want to bring it into the shared framework. We use the desktop identity for SystemEvents + // since it is stable and will remain stable for compatibility whereas the core identity could change. + Type systemEventsType = Type.GetType("Microsoft.Win32.SystemEvents, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089", throwOnError: false); + EventInfo upEventInfo = systemEventsType?.GetEvent("UserPreferenceChanging", BindingFlags.Public | BindingFlags.Static); + + if (upEventInfo != null) + { + // Delegate TargetType + Type userPrefChangingDelegateType = Type.GetType("Microsoft.Win32.UserPreferenceChangingEventHandler, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089", throwOnError: false); + Debug.Assert(userPrefChangingDelegateType != null); + + if (userPrefChangingDelegateType != null) + { + // we are using MethodInfo overload because it allows relaxed signature binding i.e. the types dont need to be exact match. It allows base classes as well. + MethodInfo mi = typeof(KnownColorTable).GetMethod(nameof(OnUserPreferenceChanging), BindingFlags.NonPublic | BindingFlags.Static); + Debug.Assert(mi != null); + + if (mi != null) + { + // Creating a delegate to use it as event handler. + Delegate handler = Delegate.CreateDelegate(userPrefChangingDelegateType, mi); + upEventInfo.AddEventHandler(null, handler); + } + + // Retrieving getter of the category property of the UserPreferenceChangingEventArgs. + Type argsType = Type.GetType("Microsoft.Win32.UserPreferenceChangingEventArgs, System, Version = 4.0.0.0, Culture = neutral, PublicKeyToken = b77a5c561934e089", throwOnError: false); + PropertyInfo categoryProperty = argsType?.GetProperty("Category", BindingFlags.Instance | BindingFlags.Public); + MethodInfo categoryGetter = categoryProperty?.GetGetMethod(); + + Debug.Assert(categoryGetter != null); + if (categoryGetter != null) + { + // Creating a Delegate pointing to the getter method. + s_categoryGetter = (Func)typeof(KnownColorTable).GetMethod(nameof(CreateGetter), BindingFlags.NonPublic | BindingFlags.Static) + .MakeGenericMethod(argsType, categoryGetter.ReturnType) + .Invoke(null, new object[] { categoryGetter }); + } + } + } + UpdateSystemColors(values); // just consts... @@ -210,6 +246,15 @@ private static void InitColorTable() s_colorTable = values; } + // Generic method that we specialize at runtime once we've loaded the UserPreferenceChangingEventArgs type. + // It permits creating an unbound delegate so that we can avoid reflection after the initial + // lightup code completes. + private static Func CreateGetter(MethodInfo method) where TInstance : EventArgs where TProperty : Enum + { + Func typedDelegate = (Func)Delegate.CreateDelegate(typeof(Func), null, method); + return (EventArgs instance) => (int)(object)typedDelegate((TInstance)instance); + } + private static void EnsureColorNameTable() { // no need to lock... worse case is a double create of the table... @@ -438,15 +483,15 @@ private static int FromWin32Value(int value) } #endif -#if FEATURE_SYSTEM_EVENTS - private static void OnUserPreferenceChanging(object sender, UserPreferenceChangingEventArgs e) + private static void OnUserPreferenceChanging(object sender, EventArgs args) { - if (e.Category == UserPreferenceCategory.Color && s_colorTable != null) + Debug.Assert(s_categoryGetter != null); + // Access UserPreferenceChangingEventArgs.Category value through cached delegate. + if (s_colorTable != null && s_categoryGetter != null && s_categoryGetter(args) == 2) // UserPreferenceCategory.Color = 2 { UpdateSystemColors(s_colorTable); } } -#endif private static void UpdateSystemColors(int[] colorTable) { diff --git a/src/System.Drawing.Common/ref/System.Drawing.Common.Forwards.cs b/src/System.Drawing.Common/ref/System.Drawing.Common.Forwards.cs index dd1679c41ca6..064939ed517e 100644 --- a/src/System.Drawing.Common/ref/System.Drawing.Common.Forwards.cs +++ b/src/System.Drawing.Common/ref/System.Drawing.Common.Forwards.cs @@ -2,4 +2,5 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Drawing.SystemColors))] \ No newline at end of file +[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Drawing.SystemColors))] +[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Drawing.ColorTranslator))] \ No newline at end of file diff --git a/src/System.Drawing.Common/ref/System.Drawing.Common.cs b/src/System.Drawing.Common/ref/System.Drawing.Common.cs index 0714a5501b60..1d20e747d194 100644 --- a/src/System.Drawing.Common/ref/System.Drawing.Common.cs +++ b/src/System.Drawing.Common/ref/System.Drawing.Common.cs @@ -238,15 +238,6 @@ public partial struct CharacterRange public static bool operator ==(System.Drawing.CharacterRange cr1, System.Drawing.CharacterRange cr2) { throw null; } public static bool operator !=(System.Drawing.CharacterRange cr1, System.Drawing.CharacterRange cr2) { throw null; } } - public static partial class ColorTranslator - { - public static System.Drawing.Color FromHtml(string htmlColor) { throw null; } - public static System.Drawing.Color FromOle(int oleColor) { throw null; } - public static System.Drawing.Color FromWin32(int win32Color) { throw null; } - public static string ToHtml(System.Drawing.Color c) { throw null; } - public static int ToOle(System.Drawing.Color c) { throw null; } - public static int ToWin32(System.Drawing.Color c) { throw null; } - } public enum ContentAlignment { TopLeft = 1, diff --git a/src/System.Drawing.Common/ref/System.Drawing.Common.netstandard.cs b/src/System.Drawing.Common/ref/System.Drawing.Common.netstandard.cs index b38d2148bd42..26781d251ad0 100644 --- a/src/System.Drawing.Common/ref/System.Drawing.Common.netstandard.cs +++ b/src/System.Drawing.Common/ref/System.Drawing.Common.netstandard.cs @@ -3,7 +3,16 @@ // See the LICENSE file in the project root for more information. namespace System.Drawing -{ +{ + public static partial class ColorTranslator + { + public static System.Drawing.Color FromHtml(string htmlColor) { throw null; } + public static System.Drawing.Color FromOle(int oleColor) { throw null; } + public static System.Drawing.Color FromWin32(int win32Color) { throw null; } + public static string ToHtml(System.Drawing.Color c) { throw null; } + public static int ToOle(System.Drawing.Color c) { throw null; } + public static int ToWin32(System.Drawing.Color c) { throw null; } + } public static partial class SystemColors { public static System.Drawing.Color ActiveBorder { get { throw null; } } diff --git a/src/System.Drawing.Common/src/System.Drawing.Common.csproj b/src/System.Drawing.Common/src/System.Drawing.Common.csproj index ad577ba9fc5d..bf6b0581f317 100644 --- a/src/System.Drawing.Common/src/System.Drawing.Common.csproj +++ b/src/System.Drawing.Common/src/System.Drawing.Common.csproj @@ -20,7 +20,6 @@ - @@ -154,19 +153,22 @@ - + System\Drawing\ColorConverterCommon.cs - + System\Drawing\ColorTable.cs + + System\Drawing\ColorTranslator.cs + System\Drawing\ColorUtil.netcoreapp20.cs System\Drawing\ColorUtil.netcoreapp21.cs - + System\Drawing\KnownColorTable.cs diff --git a/src/System.Drawing.Primitives/ref/System.Drawing.Primitives.cs b/src/System.Drawing.Primitives/ref/System.Drawing.Primitives.cs index 5629c273b856..17aaa71a6a6e 100644 --- a/src/System.Drawing.Primitives/ref/System.Drawing.Primitives.cs +++ b/src/System.Drawing.Primitives/ref/System.Drawing.Primitives.cs @@ -180,6 +180,15 @@ namespace System.Drawing public System.Drawing.KnownColor ToKnownColor() { throw null; } public override string ToString() { throw null; } } + public static partial class ColorTranslator + { + public static System.Drawing.Color FromHtml(string htmlColor) { throw null; } + public static System.Drawing.Color FromOle(int oleColor) { throw null; } + public static System.Drawing.Color FromWin32(int win32Color) { throw null; } + public static string ToHtml(System.Drawing.Color c) { throw null; } + public static int ToOle(System.Drawing.Color c) { throw null; } + public static int ToWin32(System.Drawing.Color c) { throw null; } + } public enum KnownColor { ActiveBorder = 1, diff --git a/src/System.Drawing.Primitives/src/Resources/Strings.resx b/src/System.Drawing.Primitives/src/Resources/Strings.resx index a931c14fa429..753ff28b39b4 100644 --- a/src/System.Drawing.Primitives/src/Resources/Strings.resx +++ b/src/System.Drawing.Primitives/src/Resources/Strings.resx @@ -57,6 +57,12 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + {0} is not a valid value for {1}. + + + Color '{0}' is not valid. + Value of '{1}' is not valid for '{0}'. '{0}' should be greater than or equal to {2} and less than or equal to {3}. diff --git a/src/System.Drawing.Primitives/src/System.Drawing.Primitives.csproj b/src/System.Drawing.Primitives/src/System.Drawing.Primitives.csproj index 641731a94ca6..a2fd51ec37f9 100644 --- a/src/System.Drawing.Primitives/src/System.Drawing.Primitives.csproj +++ b/src/System.Drawing.Primitives/src/System.Drawing.Primitives.csproj @@ -25,9 +25,15 @@ + + System\Drawing\ColorConverterCommon.cs + System\Drawing\ColorTable.cs + + System\Drawing\ColorTranslator.cs + System\Drawing\ColorUtil.netcoreapp21.cs diff --git a/src/System.Drawing.Primitives/tests/ColorTests.cs b/src/System.Drawing.Primitives/tests/ColorTests.cs index 760b09decfd9..195d533069ee 100644 --- a/src/System.Drawing.Primitives/tests/ColorTests.cs +++ b/src/System.Drawing.Primitives/tests/ColorTests.cs @@ -5,12 +5,15 @@ using System.Collections.Generic; using System.Diagnostics; using System.Linq; +using System.Runtime.InteropServices; using Xunit; namespace System.Drawing.Primitives.Tests { public partial class ColorTests { + public static bool SupportsSystemEvents => PlatformDetection.IsWindows && !PlatformDetection.IsUap && PlatformDetection.IsNotWindowsNanoServer; + public static readonly IEnumerable NamedArgbValues = new[] { @@ -491,5 +494,45 @@ public void DebuggerAttributesAreValid() DebuggerAttributes.ValidateDebuggerDisplayReferences(Color.Aquamarine); DebuggerAttributes.ValidateDebuggerDisplayReferences(Color.FromArgb(4, 3, 2, 1)); } + + [ConditionalFact(nameof(SupportsSystemEvents))] + public void UserPreferenceChangingEventTest() + { + int element = 12; // Win32SystemColors.AppWorkSpace. + Color oldColor = System.Drawing.SystemColors.AppWorkspace; + + // A call to ToArgb is necessary before changing the system colors because it initializes the knownColorTable. + int oldColorArgb = oldColor.ToArgb(); + int oldColorAbgr = GetColorRefValue(oldColor); + + Color newColor = oldColor != Color.Gold ? Color.Gold : Color.Silver; + int newColorArgb = newColor.ToArgb(); + int newColorAbgr = GetColorRefValue(newColor); + + Assert.NotEqual(newColorArgb, oldColorArgb); + + try + { + Assert.Equal(1, SetSysColors(1, new int[] { element }, new int[] { newColorAbgr })); + + RetryHelper.Execute(() => + { + Assert.Equal(newColorArgb, oldColor.ToArgb()); + }); + } + finally + { + Assert.Equal(1, SetSysColors(1, new int[] { element }, new int[] { oldColorAbgr })); + } + } + + [DllImport("user32.dll", SetLastError = true)] + private static extern int SetSysColors(int cElements, int[] lpaElements, int[] lpaRgbValues); + + private static int GetColorRefValue(Color color) + { + // The COLORREF value has the following hexadecimal form: 0x00bbggrr. + return color.B << 16 | color.G << 8 | color.R; + } } } From 8ce7c476a07f4f9d753906927beac93981aff301 Mon Sep 17 00:00:00 2001 From: Jose Perez Rodriguez Date: Thu, 30 May 2019 14:30:02 -0700 Subject: [PATCH 578/607] Fixing issue where assemblies would build againsta lower version of a contract than what their package depends on. (#37993) --- external/binplacePackages/binplacePackages.depproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/external/binplacePackages/binplacePackages.depproj b/external/binplacePackages/binplacePackages.depproj index 8977622f9ec8..6106e7dca40c 100644 --- a/external/binplacePackages/binplacePackages.depproj +++ b/external/binplacePackages/binplacePackages.depproj @@ -29,7 +29,7 @@ - 4.5.1 + 4.5.3 @@ -37,7 +37,7 @@ - 4.5.1 + 4.5.2 From 02f649e60f3a8ea0b947ea0eaf64f2fa3c287816 Mon Sep 17 00:00:00 2001 From: Steve Harter Date: Thu, 30 May 2019 14:44:37 -0700 Subject: [PATCH 579/607] Change JsonException.Path to be a json-based path (#37938) --- .../src/System/Text/Json/JsonException.cs | 6 +- .../Json/Serialization/JsonPropertyInfo.cs | 3 + .../JsonPropertyInfoNotNullable.cs | 4 +- .../Serialization/JsonPropertyInfoNullable.cs | 4 +- .../JsonSerializer.Read.HandleArray.cs | 6 +- .../JsonSerializer.Read.HandleDictionary.cs | 5 +- .../JsonSerializer.Read.HandleNull.cs | 2 +- .../JsonSerializer.Read.HandlePropertyName.cs | 25 ++ .../Json/Serialization/JsonSerializer.Read.cs | 2 +- .../Text/Json/Serialization/ReadStack.cs | 95 ++++-- .../Text/Json/Serialization/ReadStackFrame.cs | 6 +- .../Text/Json/Serialization/WriteStack.cs | 37 --- .../tests/Serialization/ExceptionTests.cs | 291 +++++++++++++++++- .../tests/Serialization/Object.ReadTests.cs | 4 +- .../tests/Serialization/Value.ReadTests.cs | 2 +- 15 files changed, 407 insertions(+), 85 deletions(-) diff --git a/src/System.Text.Json/src/System/Text/Json/JsonException.cs b/src/System.Text.Json/src/System/Text/Json/JsonException.cs index 60d62bdb9ce0..ec55a31f493d 100644 --- a/src/System.Text.Json/src/System/Text/Json/JsonException.cs +++ b/src/System.Text.Json/src/System/Text/Json/JsonException.cs @@ -19,7 +19,7 @@ public class JsonException : Exception /// The context specific error message. /// The line number at which the invalid JSON was encountered (starting at 0) when deserializing. /// The byte count within the current line where the invalid JSON was encountered (starting at 0). - /// The object's property path where the invalid JSON was encountered. + /// The path where the invalid JSON was encountered. /// The exception that caused the current exception. /// /// Note that the counts the number of bytes (i.e. UTF-8 code units) and not characters or scalars. @@ -35,7 +35,7 @@ public JsonException(string message, string path, long? lineNumber, long? bytePo /// Creates a new exception object to relay error information to the user. /// /// The context specific error message. - /// The object's property path where the invalid JSON was encountered. + /// The path where the invalid JSON was encountered. /// The line number at which the invalid JSON was encountered (starting at 0) when deserializing. /// The byte count within the current line where the invalid JSON was encountered (starting at 0). /// @@ -87,7 +87,7 @@ public override void GetObjectData(SerializationInfo info, StreamingContext cont public long? BytePositionInLine { get; private set; } /// - /// The property path within the JSON where the exception was encountered. + /// The path within the JSON where the exception was encountered. /// public string Path { get; private set; } } diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfo.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfo.cs index bf778fe24a78..df4b80f14e9e 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfo.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfo.cs @@ -33,6 +33,9 @@ internal abstract class JsonPropertyInfo public byte[] Name { get; private set; } public string NameAsString { get; private set; } + // The name from a Json value. This is cached for performance on first deserialize. + public byte[] JsonPropertyName { get; set; } + // Used to support case-insensitive comparison public byte[] NameUsedToCompare { get; private set; } public string NameUsedToCompareAsString { get; private set; } diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfoNotNullable.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfoNotNullable.cs index da90283df6f9..097a7fb783d4 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfoNotNullable.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfoNotNullable.cs @@ -43,7 +43,7 @@ public override void Read(JsonTokenType tokenType, ref ReadStack state, ref Utf8 return; } - ThrowHelper.ThrowJsonException_DeserializeUnableToConvertValue(RuntimePropertyType, reader, state.PropertyPath); + ThrowHelper.ThrowJsonException_DeserializeUnableToConvertValue(RuntimePropertyType, reader, state.JsonPath); } } @@ -54,7 +54,7 @@ public override void ReadEnumerable(JsonTokenType tokenType, ref ReadStack state if (ValueConverter == null || !ValueConverter.TryRead(RuntimePropertyType, ref reader, out TRuntimeProperty value)) { - ThrowHelper.ThrowJsonException_DeserializeUnableToConvertValue(RuntimePropertyType, reader, state.PropertyPath); + ThrowHelper.ThrowJsonException_DeserializeUnableToConvertValue(RuntimePropertyType, reader, state.JsonPath); return; } diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfoNullable.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfoNullable.cs index f3a65e781f74..9f06863b11a1 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfoNullable.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfoNullable.cs @@ -36,7 +36,7 @@ public override void Read(JsonTokenType tokenType, ref ReadStack state, ref Utf8 return; } - ThrowHelper.ThrowJsonException_DeserializeUnableToConvertValue(RuntimePropertyType, reader, state.PropertyPath); + ThrowHelper.ThrowJsonException_DeserializeUnableToConvertValue(RuntimePropertyType, reader, state.JsonPath); } public override void ReadEnumerable(JsonTokenType tokenType, ref ReadStack state, ref Utf8JsonReader reader) @@ -45,7 +45,7 @@ public override void ReadEnumerable(JsonTokenType tokenType, ref ReadStack state if (ValueConverter == null || !ValueConverter.TryRead(typeof(TProperty), ref reader, out TProperty value)) { - ThrowHelper.ThrowJsonException_DeserializeUnableToConvertValue(RuntimePropertyType, reader, state.PropertyPath); + ThrowHelper.ThrowJsonException_DeserializeUnableToConvertValue(RuntimePropertyType, reader, state.JsonPath); return; } diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleArray.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleArray.cs index 9d6281260a0e..20163bff4f50 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleArray.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleArray.cs @@ -39,7 +39,7 @@ private static void HandleStartArray( Type arrayType = jsonPropertyInfo.RuntimePropertyType; if (!typeof(IEnumerable).IsAssignableFrom(arrayType) || (arrayType.IsArray && arrayType.GetArrayRank() > 1)) { - ThrowHelper.ThrowJsonException_DeserializeUnableToConvertValue(arrayType, reader, state.PropertyPath); + ThrowHelper.ThrowJsonException_DeserializeUnableToConvertValue(arrayType, reader, state.JsonPath); } Debug.Assert(state.Current.IsProcessingEnumerableOrDictionary); @@ -199,7 +199,7 @@ internal static void ApplyObjectToEnumerable( } else { - ThrowHelper.ThrowJsonException_DeserializeDuplicateKey(key, reader, state.PropertyPath); + ThrowHelper.ThrowJsonException_DeserializeDuplicateKey(key, reader, state.JsonPath); } } else @@ -262,7 +262,7 @@ internal static void ApplyValueToEnumerable( } else { - ThrowHelper.ThrowJsonException_DeserializeDuplicateKey(key, reader, state.PropertyPath); + ThrowHelper.ThrowJsonException_DeserializeDuplicateKey(key, reader, state.JsonPath); } } else diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleDictionary.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleDictionary.cs index 17b955571b28..ef9f66a0e91b 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleDictionary.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleDictionary.cs @@ -24,8 +24,7 @@ private static void HandleStartDictionary(JsonSerializerOptions options, ref Utf // A nested object or dictionary so push new frame. if (state.Current.PropertyInitialized) { - Debug.Assert(state.Current.IsDictionary); - + JsonClassInfo classInfoTemp = jsonPropertyInfo.RuntimeClassInfo; state.Push(); state.Current.JsonClassInfo = jsonPropertyInfo.ElementClassInfo; state.Current.InitializeJsonPropertyInfo(); @@ -36,7 +35,7 @@ private static void HandleStartDictionary(JsonSerializerOptions options, ref Utf jsonPropertyInfo.ElementClassInfo.Type != typeof(object) && jsonPropertyInfo.ElementClassInfo.Type != typeof(JsonElement)) { - ThrowHelper.ThrowJsonException_DeserializeUnableToConvertValue(state.Current.JsonClassInfo.Type, reader, state.PropertyPath); + ThrowHelper.ThrowJsonException_DeserializeUnableToConvertValue(state.Current.JsonClassInfo.Type, reader, state.JsonPath); } JsonClassInfo classInfo = state.Current.JsonClassInfo; diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleNull.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleNull.cs index b5b9e5f9c503..4faefed6e9ba 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleNull.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleNull.cs @@ -26,7 +26,7 @@ private static bool HandleNull(ref Utf8JsonReader reader, ref ReadStack state, J JsonPropertyInfo propertyInfo = state.Current.JsonPropertyInfo; if (!propertyInfo.CanBeNull) { - ThrowHelper.ThrowJsonException_DeserializeCannotBeNull(reader, state.PropertyPath); + ThrowHelper.ThrowJsonException_DeserializeCannotBeNull(reader, state.JsonPath); } if (state.Current.IsEnumerable || state.Current.IsDictionary) diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandlePropertyName.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandlePropertyName.cs index f32d08e6c432..044ef3048d55 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandlePropertyName.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandlePropertyName.cs @@ -84,6 +84,28 @@ private static void HandlePropertyName( } else { + // Support JsonException.Path. + Debug.Assert( + state.Current.JsonPropertyInfo.JsonPropertyName == null || + options.PropertyNameCaseInsensitive || + propertyName.SequenceEqual(state.Current.JsonPropertyInfo.JsonPropertyName)); + + if (state.Current.JsonPropertyInfo.JsonPropertyName == null) + { + byte[] propertyNameArray = propertyName.ToArray(); + if (options.PropertyNameCaseInsensitive) + { + // Each payload can have a different name here; remember the value on the temporary stack. + state.Current.JsonPropertyName = propertyNameArray; + } + else + { + // Prevent future allocs by caching globally on the JsonPropertyInfo which is specific to a Type+PropertyName + // so it will match the incoming payload except when case insensitivity is enabled (which is handled above). + state.Current.JsonPropertyInfo.JsonPropertyName = propertyNameArray; + } + } + state.Current.PropertyIndex++; } } @@ -95,6 +117,9 @@ private static void ProcessMissingProperty( ref Utf8JsonReader reader, ref ReadStack state) { + // Remember the property name to support Path. + state.Current.JsonPropertyName = unescapedPropertyName.ToArray(); + JsonPropertyInfo jsonPropertyInfo = state.Current.JsonClassInfo.DataExtensionProperty; Debug.Assert(jsonPropertyInfo != null); diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.cs index f95f24b0f653..d31d4e2290f8 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.cs @@ -106,7 +106,7 @@ private static void ReadCore( catch (JsonReaderException e) { // Re-throw with Path information. - ThrowHelper.ReThrowWithPath(e, state.PropertyPath); + ThrowHelper.ReThrowWithPath(e, state.JsonPath); } return; diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/ReadStack.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/ReadStack.cs index 73c735ed048f..c394bacb0a70 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/ReadStack.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/ReadStack.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System.Collections; using System.Collections.Generic; using System.Diagnostics; @@ -10,7 +11,9 @@ namespace System.Text.Json.Serialization [DebuggerDisplay("Current: ClassType.{Current.JsonClassInfo.ClassType}, {Current.JsonClassInfo.Type.Name}")] internal struct ReadStack { - // A fields is used instead of a property to avoid value semantics. + private static readonly char[] SpecialCharacters = { '.', ' ', '\'', '/', '"', '[', ']', '(', ')', '\t', '\n', '\r', '\f', '\b', '\\', '\u0085', '\u2028', '\u2029' }; + + // A field is used instead of a property to avoid value semantics. public ReadStackFrame Current; private List _previous; @@ -48,47 +51,99 @@ public void Pop() public bool IsLastFrame => _index == 0; - // Return a property path in the form of: [FullNameOfType].FirstProperty.SecondProperty.LastProperty - public string PropertyPath + // Return a JSONPath using simple dot-notation when possible. When special characters are present, bracket-notation is used: + // $.x.y[0].z + // $['PropertyName.With.Special.Chars'] + public string JsonPath { get { - StringBuilder path; + StringBuilder sb = new StringBuilder("$"); - if (_previous == null || _index == 0) + for (int i = 0; i < _index; i++) { - // No path if we've walked beyond the end of our JSON document - if (Current.JsonClassInfo == null) - { - return ""; - } + AppendStackFrame(sb, _previous[i]); + } - path = new StringBuilder($"[{Current.JsonClassInfo.Type.FullName}]"); + AppendStackFrame(sb, Current); + return sb.ToString(); + } + } + + private void AppendStackFrame(StringBuilder sb, in ReadStackFrame frame) + { + // Append the property name. + string propertyName = GetPropertyName(frame); + AppendPropertyName(sb, propertyName); + + if (frame.JsonClassInfo != null) + { + if (frame.IsProcessingDictionary) + { + // For dictionaries add the key. + AppendPropertyName(sb, frame.KeyName); } - else + else if (frame.IsProcessingEnumerable) { - path = new StringBuilder($"[{_previous[0].JsonClassInfo.Type.FullName}]"); + // For enumerables add the index. + IList list = frame.TempEnumerableValues; + if (list == null && frame.ReturnValue != null) + { + list = (IList)frame.JsonPropertyInfo?.GetValueAsObject(frame.ReturnValue); + } - for (int i = 0; i < _index; i++) + if (list != null) { - path.Append(GetPropertyName(_previous[i])); + sb.Append(@"["); + sb.Append(list.Count); + sb.Append(@"]"); } } + } + } - path.Append(GetPropertyName(Current)); + private void AppendPropertyName(StringBuilder sb, string propertyName) + { + if (propertyName != null) + { + JsonEncodedText encodedPropertyName = JsonEncodedText.Encode(propertyName); - return path.ToString(); + if (propertyName.IndexOfAny(SpecialCharacters) != -1) + { + sb.Append(@"['"); + sb.Append(encodedPropertyName); + sb.Append(@"']"); + } + else + { + sb.Append('.'); + sb.Append(encodedPropertyName); + } } } private string GetPropertyName(in ReadStackFrame frame) { - if (frame.JsonPropertyInfo?.PropertyInfo != null && frame.JsonClassInfo.ClassType == ClassType.Object) + // Attempt to get the JSON property name from the frame. + byte[] utf8PropertyName = frame.JsonPropertyName; + if (utf8PropertyName == null) + { + // Attempt to get the JSON property name from the JsonPropertyInfo. + utf8PropertyName = frame.JsonPropertyInfo?.JsonPropertyName; + } + + string propertyName; + if (utf8PropertyName != null) + { + // Attempt to get the JSON property name from the dictionary key. + propertyName = JsonHelpers.Utf8GetString(utf8PropertyName); + } + else { - return $".{frame.JsonPropertyInfo.PropertyInfo.Name}"; + propertyName = null; } - return string.Empty; + return propertyName; } } } diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/ReadStackFrame.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/ReadStackFrame.cs index f35bc44d4754..999cae10cde6 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/ReadStackFrame.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/ReadStackFrame.cs @@ -19,6 +19,9 @@ internal struct ReadStackFrame // Support Dictionary keys. public string KeyName; + // Support JSON Path on exceptions. + public byte[] JsonPropertyName; + // Current property values. public JsonPropertyInfo JsonPropertyInfo; @@ -102,6 +105,7 @@ public void ResetProperty() PropertyInitialized = false; JsonPropertyInfo = null; TempEnumerableValues = null; + JsonPropertyName = null; KeyName = null; } @@ -143,7 +147,7 @@ public static object CreateEnumerableValue(ref Utf8JsonReader reader, ref ReadSt } else { - ThrowHelper.ThrowJsonException_DeserializeUnableToConvertValue(propType, reader, state.PropertyPath); + ThrowHelper.ThrowJsonException_DeserializeUnableToConvertValue(propType, reader, state.JsonPath); return null; } } diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/WriteStack.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/WriteStack.cs index 9f29f9700e59..5cc3453eeec0 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/WriteStack.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/WriteStack.cs @@ -63,42 +63,5 @@ public void Pop() Debug.Assert(_index > 0); Current = _previous[--_index]; } - - // Return a property path in the form of: [FullNameOfType].FirstProperty.SecondProperty.LastProperty - public string PropertyPath - { - get - { - StringBuilder path = new StringBuilder(); - - if (_previous == null || _index == 0) - { - path.Append($"[{Current.JsonClassInfo.Type.FullName}]"); - } - else - { - path.Append($"[{_previous[0].JsonClassInfo.Type.FullName}]"); - - for (int i = 0; i < _index; i++) - { - path.Append(GetPropertyName(_previous[i])); - } - } - - path.Append(GetPropertyName(Current)); - - return path.ToString(); - } - } - - private string GetPropertyName(in WriteStackFrame frame) - { - if (frame.JsonPropertyInfo != null && frame.JsonClassInfo.ClassType == ClassType.Object) - { - return $".{frame.JsonPropertyInfo.PropertyInfo.Name}"; - } - - return string.Empty; - } } } diff --git a/src/System.Text.Json/tests/Serialization/ExceptionTests.cs b/src/System.Text.Json/tests/Serialization/ExceptionTests.cs index ccb8fda44cff..c909971c2cb2 100644 --- a/src/System.Text.Json/tests/Serialization/ExceptionTests.cs +++ b/src/System.Text.Json/tests/Serialization/ExceptionTests.cs @@ -3,7 +3,6 @@ // See the LICENSE file in the project root for more information. using System.Collections.Generic; -using System.Reflection; using Xunit; namespace System.Text.Json.Serialization.Tests @@ -11,7 +10,7 @@ namespace System.Text.Json.Serialization.Tests public static partial class ExceptionTests { [Fact] - public static void RootThrownFromReader() + public static void RootThrownFromReaderFails() { try { @@ -22,8 +21,8 @@ public static void RootThrownFromReader() { Assert.Equal(0, e.LineNumber); Assert.Equal(2, e.BytePositionInLine); - Assert.Equal("[System.Int32]", e.Path); - Assert.Contains("Path: [System.Int32] | LineNumber: 0 | BytePositionInLine: 2.", e.Message); + Assert.Equal("$", e.Path); + Assert.Contains("Path: $ | LineNumber: 0 | BytePositionInLine: 2.", e.Message); // Verify Path is not repeated. Assert.True(e.Message.IndexOf("Path:") == e.Message.LastIndexOf("Path:")); @@ -31,7 +30,7 @@ public static void RootThrownFromReader() } [Fact] - public static void ThrownFromSerializer() + public static void ThrownFromSerializerFails() { try { @@ -43,7 +42,7 @@ public static void ThrownFromSerializer() Assert.Equal(0, e.LineNumber); Assert.Equal(17, e.BytePositionInLine); Assert.Contains("LineNumber: 0 | BytePositionInLine: 17.", e.Message); - Assert.Contains("[System.Collections.Generic.IDictionary`2", e.Path); + Assert.Contains("$.Key", e.Path); // Verify Path is not repeated. Assert.True(e.Message.IndexOf("Path:") == e.Message.LastIndexOf("Path:")); @@ -51,7 +50,7 @@ public static void ThrownFromSerializer() } [Fact] - public static void ThrownFromReader() + public static void ThrownFromReaderFails() { string json = Encoding.UTF8.GetString(BasicCompany.s_data); @@ -66,8 +65,8 @@ public static void ThrownFromReader() { Assert.Equal(18, e.LineNumber); Assert.Equal(8, e.BytePositionInLine); - Assert.Equal("[System.Text.Json.Serialization.Tests.BasicCompany].mainSite.zip", e.Path); - Assert.Contains("Path: [System.Text.Json.Serialization.Tests.BasicCompany].mainSite.zip | LineNumber: 18 | BytePositionInLine: 8.", + Assert.Equal("$.mainSite.zip", e.Path); + Assert.Contains("Path: $.mainSite.zip | LineNumber: 18 | BytePositionInLine: 8.", e.Message); // Verify Path is not repeated. @@ -79,5 +78,279 @@ public static void ThrownFromReader() Assert.Equal(8, inner.BytePositionInLine); } } + + [Fact] + public static void PathForDictionaryFails() + { + try + { + JsonSerializer.Parse>(@"{""Key1"":1, ""Key2"":bad}"); + Assert.True(false, "Expected JsonException was not thrown."); + } + catch (JsonException e) + { + Assert.Equal("$.Key2", e.Path); + } + + try + { + JsonSerializer.Parse>(@"{""Key1"":1, ""Key2"":"); + Assert.True(false, "Expected JsonException was not thrown."); + } + catch (JsonException e) + { + Assert.Equal("$.Key2", e.Path); + } + + try + { + JsonSerializer.Parse>(@"{""Key1"":1, ""Key2"""); + Assert.True(false, "Expected JsonException was not thrown."); + } + catch (JsonException e) + { + // Key2 is not yet a valid key name since there is no : delimiter. + Assert.Equal("$.Key1", e.Path); + } + } + + [Fact] + public static void PathForArrayFails() + { + try + { + JsonSerializer.Parse(@"[1, bad]"); + Assert.True(false, "Expected JsonException was not thrown."); + } + catch (JsonException e) + { + Assert.Equal("$[1]", e.Path); + } + + try + { + JsonSerializer.Parse(@"[1,"); + Assert.True(false, "Expected JsonException was not thrown."); + } + catch (JsonException e) + { + Assert.Equal("$[1]", e.Path); + } + + try + { + JsonSerializer.Parse(@"[1"); + Assert.True(false, "Expected JsonException was not thrown."); + } + catch (JsonException e) + { + // No delimiter. + Assert.Equal("$[0]", e.Path); + } + + try + { + JsonSerializer.Parse(@"[1 /* comment starts but doesn't end"); + Assert.True(false, "Expected JsonException was not thrown."); + } + catch (JsonException e) + { + // The reader treats the space as a delimiter. + Assert.Equal("$[1]", e.Path); + } + } + + [Fact] + public static void PathForListFails() + { + try + { + JsonSerializer.Parse>(@"[1, bad]"); + Assert.True(false, "Expected JsonException was not thrown."); + } + catch (JsonException e) + { + Assert.Equal("$[1]", e.Path); + } + } + + [Fact] + public static void PathFor2dArrayFails() + { + try + { + JsonSerializer.Parse(@"[[1, 2],[3,bad]]"); + Assert.True(false, "Expected JsonException was not thrown."); + } + catch (JsonException e) + { + Assert.Equal("$[1][1]", e.Path); + } + } + + [Fact] + public static void PathFor2dListFails() + { + try + { + JsonSerializer.Parse>>(@"[[1, 2],[3,bad]]"); + Assert.True(false, "Expected JsonException was not thrown."); + } + catch (JsonException e) + { + Assert.Equal("$[1][1]", e.Path); + } + } + + [Fact] + public static void PathForChildPropertyFails() + { + try + { + JsonSerializer.Parse(@"{""Child"":{""MyInt"":bad]}"); + Assert.True(false, "Expected JsonException was not thrown."); + } + catch (JsonException e) + { + Assert.Equal("$.Child.MyInt", e.Path); + } + } + + [Fact] + public static void PathForChildListFails() + { + try + { + JsonSerializer.Parse(@"{""Child"":{""MyIntArray"":[1, bad]}"); + Assert.True(false, "Expected JsonException was not thrown."); + } + catch (JsonException e) + { + Assert.Equal("$.Child.MyIntArray[1]", e.Path); + } + } + + [Fact] + public static void PathForChildDictionaryFails() + { + try + { + JsonSerializer.Parse(@"{""Child"":{""MyDictionary"":{""Key"": bad]"); + Assert.True(false, "Expected JsonException was not thrown."); + } + catch (JsonException e) + { + Assert.Equal("$.Child.MyDictionary.Key", e.Path); + } + } + + [Fact] + public static void PathForSpecialCharacterFails() + { + try + { + JsonSerializer.Parse(@"{""Child"":{""MyDictionary"":{""Key1"":{""Children"":[{""MyDictionary"":{""K.e.y"":"""); + Assert.True(false, "Expected JsonException was not thrown."); + } + catch (JsonException e) + { + Assert.Equal("$.Child.MyDictionary.Key1.Children[0].MyDictionary['K.e.y']", e.Path); + } + } + + [Fact] + public static void PathForSpecialCharacterNestedFails() + { + try + { + JsonSerializer.Parse(@"{""Child"":{""Children"":[{}, {""MyDictionary"":{""K.e.y"": {""MyInt"":bad"); + Assert.True(false, "Expected JsonException was not thrown."); + } + catch (JsonException e) + { + Assert.Equal("$.Child.Children[1].MyDictionary['K.e.y'].MyInt", e.Path); + } + } + + [Fact] + public static void EscapingFails() + { + try + { + ClassWithUnicodeProperty obj = JsonSerializer.Parse(@"{""Aѧ"":bad}"); + Assert.True(false, "Expected JsonException was not thrown."); + } + catch (JsonException e) + { + Assert.Equal(@"$.A\u0467", e.Path); + } + } + + [Fact] + [ActiveIssue("JsonElement needs to support Path")] + public static void ExtensionPropertyRoundTripFails() + { + try + { + JsonSerializer.Parse(@"{""MyNestedClass"":{""UnknownProperty"":bad}}"); + Assert.True(false, "Expected JsonException was not thrown."); + } + catch (JsonException e) + { + // Until JsonElement supports populating Path ("UnknownProperty"), which will be prepended by the serializer ("MyNestedClass"), this will fail. + Assert.Equal("$.MyNestedClass.UnknownProperty", e.Path); + } + } + + [Fact] + public static void CaseInsensitiveFails() + { + var options = new JsonSerializerOptions(); + options.PropertyNameCaseInsensitive = true; + + // Baseline (no exception) + { + SimpleTestClass obj = JsonSerializer.Parse(@"{""myint32"":1}", options); + Assert.Equal(1, obj.MyInt32); + } + + { + SimpleTestClass obj = JsonSerializer.Parse(@"{""MYINT32"":1}", options); + Assert.Equal(1, obj.MyInt32); + } + + try + { + JsonSerializer.Parse(@"{""myint32"":bad}", options); + } + catch (JsonException e) + { + // The Path should reflect the case even though it is different from the property. + Assert.Equal("$.myint32", e.Path); + } + + try + { + JsonSerializer.Parse(@"{""MYINT32"":bad}", options); + } + catch (JsonException e) + { + // Verify the previous json property name was not cached. + Assert.Equal("$.MYINT32", e.Path); + } + } + + public class RootClass + { + public ChildClass Child { get; set; } + } + + public class ChildClass + { + public int MyInt { get; set; } + public int[] MyIntArray { get; set; } + public Dictionary MyDictionary { get; set; } + public ChildClass[] Children { get; set; } + } } } diff --git a/src/System.Text.Json/tests/Serialization/Object.ReadTests.cs b/src/System.Text.Json/tests/Serialization/Object.ReadTests.cs index 7f7ed024c5f9..3e2ca2cac254 100644 --- a/src/System.Text.Json/tests/Serialization/Object.ReadTests.cs +++ b/src/System.Text.Json/tests/Serialization/Object.ReadTests.cs @@ -205,8 +205,8 @@ public static void ReadConversionFails() { exceptionThrown = true; - // Exception should contain property path. - Assert.True(exception.ToString().Contains("[System.Text.Json.Serialization.Tests.ObjectTests+TestClassWithBadData].Children.MyProperty")); + // Exception should contain path. + Assert.True(exception.ToString().Contains("Path: $.Children[0].MyProperty")); } Assert.True(exceptionThrown); diff --git a/src/System.Text.Json/tests/Serialization/Value.ReadTests.cs b/src/System.Text.Json/tests/Serialization/Value.ReadTests.cs index e27e6a10c879..5d2393ab117c 100644 --- a/src/System.Text.Json/tests/Serialization/Value.ReadTests.cs +++ b/src/System.Text.Json/tests/Serialization/Value.ReadTests.cs @@ -287,5 +287,5 @@ public static void ValueFail() Assert.Throws(() => JsonSerializer.Parse(unexpectedString)); } - } + } } From 13ad3d0b841a611e775f51bd66375c9587584a72 Mon Sep 17 00:00:00 2001 From: Viktor Hofer Date: Fri, 31 May 2019 00:19:45 +0200 Subject: [PATCH 580/607] PR feedback nits --- src/System.IO.Ports/tests/System.IO.Ports.Tests.csproj | 2 +- src/System.Reflection.Metadata/tests/Configurations.props | 2 -- .../tests/System.Reflection.Metadata.Tests.csproj | 3 +-- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/System.IO.Ports/tests/System.IO.Ports.Tests.csproj b/src/System.IO.Ports/tests/System.IO.Ports.Tests.csproj index 05c717c1c5fd..1be36a09d2e8 100644 --- a/src/System.IO.Ports/tests/System.IO.Ports.Tests.csproj +++ b/src/System.IO.Ports/tests/System.IO.Ports.Tests.csproj @@ -110,7 +110,7 @@ - + diff --git a/src/System.Reflection.Metadata/tests/Configurations.props b/src/System.Reflection.Metadata/tests/Configurations.props index d2afc7af6488..1a037adc3e7c 100644 --- a/src/System.Reflection.Metadata/tests/Configurations.props +++ b/src/System.Reflection.Metadata/tests/Configurations.props @@ -1,10 +1,8 @@  - netcoreapp; netfx; - \ No newline at end of file diff --git a/src/System.Reflection.Metadata/tests/System.Reflection.Metadata.Tests.csproj b/src/System.Reflection.Metadata/tests/System.Reflection.Metadata.Tests.csproj index 5f1df613fec9..3b8c014233d7 100644 --- a/src/System.Reflection.Metadata/tests/System.Reflection.Metadata.Tests.csproj +++ b/src/System.Reflection.Metadata/tests/System.Reflection.Metadata.Tests.csproj @@ -3,8 +3,7 @@ {7061832A-E8CF-4AB6-A8DC-44D2F5A43A13} true false - - netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release + netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release From 40983e222a2fe12156360550275f89155a3cfc9c Mon Sep 17 00:00:00 2001 From: William Godbe Date: Thu, 30 May 2019 17:50:28 -0700 Subject: [PATCH 581/607] System.Text.Json is not inbox on netfx (#38077) --- src/System.Text.Json/tests/System.Text.Json.Tests.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/System.Text.Json/tests/System.Text.Json.Tests.csproj b/src/System.Text.Json/tests/System.Text.Json.Tests.csproj index b00594b04bdb..5207830b29dc 100644 --- a/src/System.Text.Json/tests/System.Text.Json.Tests.csproj +++ b/src/System.Text.Json/tests/System.Text.Json.Tests.csproj @@ -2,7 +2,7 @@ {5F553243-042C-45C0-8E49-C739131E11C3} netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release - $(DefineConstants);BUILDING_INBOX_LIBRARY + $(DefineConstants);BUILDING_INBOX_LIBRARY From 5a611ecf50891df3201a94372a4f622a9d4cfa30 Mon Sep 17 00:00:00 2001 From: Bradley Grainger Date: Thu, 30 May 2019 19:43:33 -0700 Subject: [PATCH 582/607] Simplify DbProviderFactory feature detection code. (#38070) --- .../System/Data/Common/DbProviderFactory.cs | 20 ++++--------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/src/System.Data.Common/src/System/Data/Common/DbProviderFactory.cs b/src/System.Data.Common/src/System/Data/Common/DbProviderFactory.cs index 61f7e5cda003..a57c2e894e21 100644 --- a/src/System.Data.Common/src/System/Data/Common/DbProviderFactory.cs +++ b/src/System.Data.Common/src/System/Data/Common/DbProviderFactory.cs @@ -19,15 +19,9 @@ public virtual bool CanCreateDataAdapter { if (!_canCreateDataAdapter.HasValue) { - var adapter = CreateDataAdapter(); - if (adapter == null) + using (DbDataAdapter adapter = CreateDataAdapter()) { - _canCreateDataAdapter = false; - } - else - { - _canCreateDataAdapter = true; - adapter.Dispose(); + _canCreateDataAdapter = adapter != null; } } @@ -41,15 +35,9 @@ public virtual bool CanCreateCommandBuilder { if (!_canCreateCommandBuilder.HasValue) { - var builder = CreateCommandBuilder(); - if (builder == null) - { - _canCreateCommandBuilder = false; - } - else + using (DbCommandBuilder builder = CreateCommandBuilder()) { - _canCreateCommandBuilder = true; - builder.Dispose(); + _canCreateCommandBuilder = builder != null; } } From f6b010d2a0bdab94953d519a60d882ff805eea36 Mon Sep 17 00:00:00 2001 From: Jeremy Kuhne Date: Thu, 30 May 2019 22:00:36 -0700 Subject: [PATCH 583/607] Add read ahead logic for streams. (#38039) * Add read ahead logic for streams. When reading a jaon object or array from a stream into an object we need to TrySkip to ensure that we have all the needed data for the JsonDocument to create a JsonElement. This is only necessary if we haven't already drained the stream. * Track state correctly We need to track consumed separately so we can requeue the reader properly after skipping. Add more stream tests. * Clarify comments and other feedback. * Fix comment --- .../JsonSerializer.Read.Stream.cs | 24 ++-- .../Json/Serialization/JsonSerializer.Read.cs | 119 ++++++++++++------ .../Serialization/JsonSerializerOptions.cs | 5 + .../Text/Json/Serialization/ReadStack.cs | 5 + .../tests/Serialization/JsonElementTests.cs | 28 +++++ .../tests/Serialization/SpanTests.cs | 24 ++++ 6 files changed, 162 insertions(+), 43 deletions(-) diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.Stream.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.Stream.cs index 19fdc98562a0..61dc05e5856f 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.Stream.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.Stream.cs @@ -83,8 +83,8 @@ private static async ValueTask ReadAsync( options = JsonSerializerOptions.s_defaultOptions; } - ReadStack state = default; - state.Current.Initialize(returnType, options); + ReadStack readStack = default; + readStack.Current.Initialize(returnType, options); var readerState = new JsonReaderState(options.GetReaderOptions()); @@ -138,10 +138,11 @@ private static async ValueTask ReadAsync( isFinalBlock, new Span(buffer, 0, bytesInBuffer), options, - ref state); + ref readStack); + + Debug.Assert(readStack.BytesConsumed <= bytesInBuffer); + int bytesConsumed = checked((int)readStack.BytesConsumed); - Debug.Assert(readerState.BytesConsumed <= bytesInBuffer); - int bytesConsumed = (int)readerState.BytesConsumed; bytesInBuffer -= bytesConsumed; if (isFinalBlock) @@ -183,7 +184,7 @@ private static async ValueTask ReadAsync( ThrowHelper.ThrowJsonException_DeserializeDataRemaining(totalBytesRead, bytesInBuffer); } - return (TValue)state.Current.ReturnValue; + return (TValue)readStack.Current.ReturnValue; } private static void ReadCore( @@ -191,14 +192,21 @@ private static void ReadCore( bool isFinalBlock, Span buffer, JsonSerializerOptions options, - ref ReadStack state) + ref ReadStack readStack) { var reader = new Utf8JsonReader(buffer, isFinalBlock, readerState); + // If we haven't read in the entire stream's payload we'll need to signify that we want + // to enable read ahead behaviors to ensure we have complete json objects and arrays + // ({}, []) when needed. (Notably to successfully parse JsonElement via JsonDocument + // to assign to object and JsonElement properties in the constructed .NET object.) + options.ReadAhead = !isFinalBlock; + readStack.BytesConsumed = 0; + ReadCore( options, ref reader, - ref state); + ref readStack); readerState = reader.CurrentState; } diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.cs index d31d4e2290f8..4d96348b0394 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.cs @@ -3,8 +3,8 @@ // See the LICENSE file in the project root for more information. using System.Buffers; -using System.Collections; using System.Diagnostics; +using System.Runtime.CompilerServices; namespace System.Text.Json.Serialization { @@ -17,101 +17,150 @@ public static partial class JsonSerializer private static void ReadCore( JsonSerializerOptions options, ref Utf8JsonReader reader, - ref ReadStack state) + ref ReadStack readStack) { try { - while (reader.Read()) + JsonReaderState initialState = default; + + while (true) { + if (options.ReadAhead) + { + // When we're reading ahead we always have to save the state + // as we don't know if the next token is an opening object or + // array brace. + initialState = reader.CurrentState; + } + + if (!reader.Read()) + { + // Need more data + break; + } + JsonTokenType tokenType = reader.TokenType; if (JsonHelpers.IsInRangeInclusive(tokenType, JsonTokenType.String, JsonTokenType.False)) { Debug.Assert(tokenType == JsonTokenType.String || tokenType == JsonTokenType.Number || tokenType == JsonTokenType.True || tokenType == JsonTokenType.False); - if (HandleValue(tokenType, options, ref reader, ref state)) - { - continue; - } + HandleValue(tokenType, options, ref reader, ref readStack); } else if (tokenType == JsonTokenType.PropertyName) { - HandlePropertyName(options, ref reader, ref state); + HandlePropertyName(options, ref reader, ref readStack); } else if (tokenType == JsonTokenType.StartObject) { - if (state.Current.SkipProperty) + if (readStack.Current.SkipProperty) { - state.Push(); - state.Current.Drain = true; + readStack.Push(); + readStack.Current.Drain = true; } - else if (state.Current.IsProcessingValue) + else if (readStack.Current.IsProcessingValue) { - if (HandleValue(tokenType, options, ref reader, ref state)) + if (!HandleObjectAsValue(tokenType, options, ref reader, ref readStack, ref initialState)) { - continue; + // Need more data + break; } } - else if (state.Current.IsProcessingDictionary) + else if (readStack.Current.IsProcessingDictionary) { - HandleStartDictionary(options, ref reader, ref state); + HandleStartDictionary(options, ref reader, ref readStack); } else { - HandleStartObject(options, ref reader, ref state); + HandleStartObject(options, ref reader, ref readStack); } } else if (tokenType == JsonTokenType.EndObject) { - if (state.Current.Drain) + if (readStack.Current.Drain) { - state.Pop(); + readStack.Pop(); } - else if (state.Current.IsProcessingDictionary) + else if (readStack.Current.IsProcessingDictionary) { - HandleEndDictionary(options, ref reader, ref state); + HandleEndDictionary(options, ref reader, ref readStack); } else { - HandleEndObject(options, ref reader, ref state); + HandleEndObject(options, ref reader, ref readStack); } } else if (tokenType == JsonTokenType.StartArray) { - if (!state.Current.IsProcessingValue) + if (!readStack.Current.IsProcessingValue) { - HandleStartArray(options, ref reader, ref state); + HandleStartArray(options, ref reader, ref readStack); } - else if (HandleValue(tokenType, options, ref reader, ref state)) + else if (!HandleObjectAsValue(tokenType, options, ref reader, ref readStack, ref initialState)) { - continue; + // Need more data + break; } } else if (tokenType == JsonTokenType.EndArray) { - if (HandleEndArray(options, ref reader, ref state)) - { - continue; - } + HandleEndArray(options, ref reader, ref readStack); } else if (tokenType == JsonTokenType.Null) { - if (HandleNull(ref reader, ref state, options)) - { - continue; - } + HandleNull(ref reader, ref readStack, options); } } } catch (JsonReaderException e) { // Re-throw with Path information. - ThrowHelper.ReThrowWithPath(e, state.JsonPath); + ThrowHelper.ReThrowWithPath(e, readStack.JsonPath); } + readStack.BytesConsumed += reader.BytesConsumed; return; } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private static bool HandleObjectAsValue( + JsonTokenType tokenType, + JsonSerializerOptions options, + ref Utf8JsonReader reader, + ref ReadStack readStack, + ref JsonReaderState initialState) + { + if (options.ReadAhead) + { + // Attempt to skip to make sure we have all the data we need. + bool complete = reader.TrySkip(); + + // We need to restore the state in all cases as we need to be positioned back before + // the current token to either attempt to skip again or to actually read the value in + // HandleValue below. + + reader = new Utf8JsonReader( + reader.OriginalSpan.Slice(checked((int)initialState.BytesConsumed)), + isFinalBlock: reader.IsFinalBlock, + state: initialState); + Debug.Assert(reader.BytesConsumed == 0); + readStack.BytesConsumed += initialState.BytesConsumed; + + if (!complete) + { + // Couldn't read to the end of the object, exit out to get more data in the buffer. + return false; + } + + // Success, requeue the reader to the token for HandleValue. + reader.Read(); + Debug.Assert(tokenType == reader.TokenType); + } + + HandleValue(tokenType, options, ref reader, ref readStack); + return true; + } + private static ReadOnlySpan GetUnescapedString(ReadOnlySpan utf8Source, int idx) { // The escaped name is always longer than the unescaped, so it is safe to use escaped name for the buffer length. diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializerOptions.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializerOptions.cs index 70a1cc9edec9..00e21f572a08 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializerOptions.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializerOptions.cs @@ -314,5 +314,10 @@ private void VerifyMutable() ThrowHelper.ThrowInvalidOperationException_SerializerOptionsImmutable(); } } + + /// + /// Internal flag to let us know that we need to read ahead in the inner read loop. + /// + internal bool ReadAhead { get; set; } } } diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/ReadStack.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/ReadStack.cs index c394bacb0a70..be6d645b600f 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/ReadStack.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/ReadStack.cs @@ -145,5 +145,10 @@ private string GetPropertyName(in ReadStackFrame frame) return propertyName; } + + /// + /// Bytes consumed in the current loop + /// + public long BytesConsumed; } } diff --git a/src/System.Text.Json/tests/Serialization/JsonElementTests.cs b/src/System.Text.Json/tests/Serialization/JsonElementTests.cs index f146734d52f7..544c02146048 100644 --- a/src/System.Text.Json/tests/Serialization/JsonElementTests.cs +++ b/src/System.Text.Json/tests/Serialization/JsonElementTests.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System.IO; using System.Linq; using Xunit; @@ -145,5 +146,32 @@ public void Verify() Assert.Equal("Hello", Array[3].ToString()); } } + + [Theory, + InlineData(5), + InlineData(10), + InlineData(20), + InlineData(1024)] + public void ReadJsonElementFromStream(int defaultBufferSize) + { + // Streams need to read ahead when they hit objects or arrays that are assigned to JsonElement or object. + + byte[] data = Encoding.UTF8.GetBytes(@"{""Data"":[1,true,{""City"":""MyCity""},null,""foo""]}"); + MemoryStream stream = new MemoryStream(data); + JsonElement obj = JsonSerializer.ReadAsync(stream, new JsonSerializerOptions { DefaultBufferSize = defaultBufferSize }).Result; + + data = Encoding.UTF8.GetBytes(@"[1,true,{""City"":""MyCity""},null,""foo""]"); + stream = new MemoryStream(data); + obj = JsonSerializer.ReadAsync(stream, new JsonSerializerOptions { DefaultBufferSize = defaultBufferSize }).Result; + + // Ensure we fail with incomplete data + data = Encoding.UTF8.GetBytes(@"{""Data"":[1,true,{""City"":""MyCity""},null,""foo""]"); + stream = new MemoryStream(data); + Assert.Throws(() => JsonSerializer.ReadAsync(stream, new JsonSerializerOptions { DefaultBufferSize = defaultBufferSize }).Result); + + data = Encoding.UTF8.GetBytes(@"[1,true,{""City"":""MyCity""},null,""foo"""); + stream = new MemoryStream(data); + Assert.Throws(() => JsonSerializer.ReadAsync(stream, new JsonSerializerOptions { DefaultBufferSize = defaultBufferSize }).Result); + } } } diff --git a/src/System.Text.Json/tests/Serialization/SpanTests.cs b/src/System.Text.Json/tests/Serialization/SpanTests.cs index 2dd50b7ed05b..c54dced58ee1 100644 --- a/src/System.Text.Json/tests/Serialization/SpanTests.cs +++ b/src/System.Text.Json/tests/Serialization/SpanTests.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System.Collections.Generic; +using System.IO; using Xunit; namespace System.Text.Json.Serialization.Tests @@ -24,6 +25,29 @@ public static void Read(Type classType, byte[] data) ((ITestClass)obj).Verify(); } + [Theory] + [MemberData(nameof(ReadSuccessCases))] + public static void ReadFromStream(Type classType, byte[] data) + { + MemoryStream stream = new MemoryStream(data); + object obj = JsonSerializer.ReadAsync( + stream, + classType).Result; + + Assert.IsAssignableFrom(typeof(ITestClass), obj); + ((ITestClass)obj).Verify(); + + // Try again with a smaller initial buffer size to ensure we handle incomplete data + stream = new MemoryStream(data); + obj = JsonSerializer.ReadAsync( + stream, + classType, + new JsonSerializerOptions { DefaultBufferSize = 5 }).Result; + + Assert.IsAssignableFrom(typeof(ITestClass), obj); + ((ITestClass)obj).Verify(); + } + [Fact] public static void ReadGenericApi() { From 82408cd90f4d4573d502e8df2ca437b35e6a37f7 Mon Sep 17 00:00:00 2001 From: Ahson Khan Date: Thu, 30 May 2019 22:13:31 -0700 Subject: [PATCH 584/607] Add Base64 APIs to Utf8JsonReader, Utf8JsonWriter, and JsonElement (#38048) * Add Utf8JsonWriter Base64 APIs. * Add Utf8JsonReader Base64 APIs. * Add JsonElement Base64 APIs. * Update API shape based on review. * Auto-generate the ref assembly. * Address PR feedback so far. * Add escaping step and update length counters accordingly. * Add JsonWriter API tests. * Add JsonReader and JsonElement tests. --- src/System.Text.Json/ref/System.Text.Json.cs | 15 +- .../src/Resources/Strings.resx | 3 + .../src/System.Text.Json.csproj | 4 +- .../System/Text/Json/Document/JsonDocument.cs | 23 ++ .../System/Text/Json/Document/JsonElement.cs | 52 +++ .../src/System/Text/Json/JsonConstants.cs | 5 +- .../Reader/JsonReaderHelper.Unescaping.cs | 72 ++++ .../Text/Json/Reader/Utf8JsonReader.TryGet.cs | 89 ++++- .../src/System/Text/Json/ThrowHelper.cs | 6 +- .../Json/Writer/JsonWriterHelper.Escaping.cs | 2 +- .../Text/Json/Writer/JsonWriterHelper.cs | 21 + .../Utf8JsonWriter.WriteProperties.Bytes.cs | 376 ++++++++++++++++++ .../Utf8JsonWriter.WriteValues.Bytes.cs | 119 ++++++ .../Utf8JsonWriter.WriteValues.Helpers.cs | 39 ++ .../tests/JsonDocumentTests.cs | 162 ++++++-- .../tests/Utf8JsonReaderTests.TryGet.cs | 180 +++++++++ .../tests/Utf8JsonWriterTests.cs | 339 +++++++++++++++- 17 files changed, 1455 insertions(+), 52 deletions(-) create mode 100644 src/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.WriteProperties.Bytes.cs create mode 100644 src/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.WriteValues.Bytes.cs diff --git a/src/System.Text.Json/ref/System.Text.Json.cs b/src/System.Text.Json/ref/System.Text.Json.cs index fbf9ea8399b9..664f72ace281 100644 --- a/src/System.Text.Json/ref/System.Text.Json.cs +++ b/src/System.Text.Json/ref/System.Text.Json.cs @@ -38,6 +38,7 @@ public readonly partial struct JsonElement public System.Text.Json.JsonElement.ObjectEnumerator EnumerateObject() { throw null; } public int GetArrayLength() { throw null; } public bool GetBoolean() { throw null; } + public byte[] GetBytesFromBase64() { throw null; } public System.DateTime GetDateTime() { throw null; } public System.DateTimeOffset GetDateTimeOffset() { throw null; } public decimal GetDecimal() { throw null; } @@ -56,6 +57,7 @@ public readonly partial struct JsonElement [System.CLSCompliantAttribute(false)] public ulong GetUInt64() { throw null; } public override string ToString() { throw null; } + public bool TryGetBytesFromBase64(out byte[] value) { throw null; } public bool TryGetDateTime(out System.DateTime value) { throw null; } public bool TryGetDateTimeOffset(out System.DateTimeOffset value) { throw null; } public bool TryGetDecimal(out decimal value) { throw null; } @@ -196,9 +198,10 @@ public ref partial struct Utf8JsonReader public System.Buffers.ReadOnlySequence ValueSequence { get { throw null; } } public System.ReadOnlySpan ValueSpan { get { throw null; } } public bool GetBoolean() { throw null; } + public byte[] GetBytesFromBase64() { throw null; } + public string GetComment() { throw null; } public System.DateTime GetDateTime() { throw null; } public System.DateTimeOffset GetDateTimeOffset() { throw null; } - public string GetComment() { throw null; } public decimal GetDecimal() { throw null; } public double GetDouble() { throw null; } public System.Guid GetGuid() { throw null; } @@ -214,6 +217,7 @@ public ref partial struct Utf8JsonReader public void Skip() { } public bool TextEquals(System.ReadOnlySpan otherUtf8Text) { throw null; } public bool TextEquals(System.ReadOnlySpan otherText) { throw null; } + public bool TryGetBytesFromBase64(out byte[] value) { throw null; } public bool TryGetDateTime(out System.DateTime value) { throw null; } public bool TryGetDateTimeOffset(out System.DateTimeOffset value) { throw null; } public bool TryGetDecimal(out decimal value) { throw null; } @@ -242,6 +246,11 @@ public void Flush() { } public void Reset() { } public void Reset(System.Buffers.IBufferWriter bufferWriter) { } public void Reset(System.IO.Stream utf8Json) { } + public void WriteBase64String(System.ReadOnlySpan utf8PropertyName, System.ReadOnlySpan bytes) { } + public void WriteBase64String(System.ReadOnlySpan propertyName, System.ReadOnlySpan bytes) { } + public void WriteBase64String(string propertyName, System.ReadOnlySpan bytes) { } + public void WriteBase64String(System.Text.Json.JsonEncodedText propertyName, System.ReadOnlySpan bytes) { } + public void WriteBase64StringValue(System.ReadOnlySpan bytes) { } public void WriteBoolean(System.ReadOnlySpan utf8PropertyName, bool value) { } public void WriteBoolean(System.ReadOnlySpan propertyName, bool value) { } public void WriteBoolean(string propertyName, bool value) { } @@ -385,10 +394,10 @@ public static partial class JsonSerializer public static TValue Parse(string json, System.Text.Json.Serialization.JsonSerializerOptions options = null) { throw null; } public static System.Threading.Tasks.ValueTask ReadAsync(System.IO.Stream utf8Json, System.Type returnType, System.Text.Json.Serialization.JsonSerializerOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static System.Threading.Tasks.ValueTask ReadAsync(System.IO.Stream utf8Json, System.Text.Json.Serialization.JsonSerializerOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static byte[] ToUtf8Bytes(object value, System.Type type, System.Text.Json.Serialization.JsonSerializerOptions options = null) { throw null; } - public static byte[] ToUtf8Bytes(TValue value, System.Text.Json.Serialization.JsonSerializerOptions options = null) { throw null; } public static string ToString(object value, System.Type type, System.Text.Json.Serialization.JsonSerializerOptions options = null) { throw null; } public static string ToString(TValue value, System.Text.Json.Serialization.JsonSerializerOptions options = null) { throw null; } + public static byte[] ToUtf8Bytes(object value, System.Type type, System.Text.Json.Serialization.JsonSerializerOptions options = null) { throw null; } + public static byte[] ToUtf8Bytes(TValue value, System.Text.Json.Serialization.JsonSerializerOptions options = null) { throw null; } public static System.Threading.Tasks.Task WriteAsync(object value, System.Type type, System.IO.Stream utf8Json, System.Text.Json.Serialization.JsonSerializerOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static System.Threading.Tasks.Task WriteAsync(TValue value, System.IO.Stream utf8Json, System.Text.Json.Serialization.JsonSerializerOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } diff --git a/src/System.Text.Json/src/Resources/Strings.resx b/src/System.Text.Json/src/Resources/Strings.resx index f0d121a10ca6..6f8b9bc5ef64 100644 --- a/src/System.Text.Json/src/Resources/Strings.resx +++ b/src/System.Text.Json/src/Resources/Strings.resx @@ -137,6 +137,9 @@ Cannot transcode invalid UTF-8 JSON text to UTF-16 string. + + Cannot decode JSON text that is not encoded as valid Base64 to bytes. + Cannot transcode invalid UTF-16 string to UTF-8 JSON text. diff --git a/src/System.Text.Json/src/System.Text.Json.csproj b/src/System.Text.Json/src/System.Text.Json.csproj index 5bfb8e61a18e..941b0baf1a72 100644 --- a/src/System.Text.Json/src/System.Text.Json.csproj +++ b/src/System.Text.Json/src/System.Text.Json.csproj @@ -11,7 +11,7 @@ - + @@ -124,6 +124,7 @@ + @@ -136,6 +137,7 @@ + diff --git a/src/System.Text.Json/src/System/Text/Json/Document/JsonDocument.cs b/src/System.Text.Json/src/System/Text/Json/Document/JsonDocument.cs index 1d4e447fb496..b5ffa48dd456 100644 --- a/src/System.Text.Json/src/System/Text/Json/Document/JsonDocument.cs +++ b/src/System.Text.Json/src/System/Text/Json/Document/JsonDocument.cs @@ -263,6 +263,29 @@ internal string GetNameOfPropertyValue(int index) return GetString(index - DbRow.Size, JsonTokenType.PropertyName); } + internal bool TryGetValue(int index, out byte[] value) + { + CheckNotDisposed(); + + DbRow row = _parsedData.Get(index); + + CheckExpectedType(JsonTokenType.String, row.TokenType); + + ReadOnlySpan data = _utf8Json.Span; + ReadOnlySpan segment = data.Slice(row.Location, row.SizeOrLength); + + // Segment needs to be unescaped + if (row.HasComplexChildren) + { + int idx = segment.IndexOf(JsonConstants.BackSlash); + Debug.Assert(idx != -1); + return JsonReaderHelper.TryGetUnescapedBase64Bytes(segment, idx, out value); + } + + Debug.Assert(segment.IndexOf(JsonConstants.BackSlash) == -1); + return JsonReaderHelper.TryDecodeBase64(segment, out value); + } + internal bool TryGetValue(int index, out int value) { CheckNotDisposed(); diff --git a/src/System.Text.Json/src/System/Text/Json/Document/JsonElement.cs b/src/System.Text.Json/src/System/Text/Json/Document/JsonElement.cs index 34be938ad06e..e9d12eba9d96 100644 --- a/src/System.Text.Json/src/System/Text/Json/Document/JsonElement.cs +++ b/src/System.Text.Json/src/System/Text/Json/Document/JsonElement.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System.Buffers.Text; using System.Collections.Generic; using System.Diagnostics; @@ -350,6 +351,57 @@ public string GetString() return _parent.GetString(_idx, JsonTokenType.String); } + /// + /// Attempts to represent the current JSON string as bytes assuming it is base 64 encoded. + /// + /// Receives the value. + /// + /// This method does not create a byte[] representation of values other than bsae 64 encoded JSON strings. + /// + /// + /// if the entire token value is encoded as valid base 64 text and can be successfully decoded to bytes. + /// otherwise. + /// + /// + /// This value's is not . + /// + /// + /// The parent has been disposed. + /// + public bool TryGetBytesFromBase64(out byte[] value) + { + CheckValidInstance(); + + return _parent.TryGetValue(_idx, out value); + } + + /// + /// Gets the value of the element as bytes. + /// + /// + /// This method does not create a byte[] representation of values other than base 64 encoded JSON strings. + /// + /// The value decode to bytes. + /// + /// This value's is not . + /// + /// + /// The value is not encoded as base 64 text and hence cannot be decoded to bytes. + /// + /// + /// The parent has been disposed. + /// + /// + public byte[] GetBytesFromBase64() + { + if (TryGetBytesFromBase64(out byte[] value)) + { + return value; + } + + throw new FormatException(); + } + /// /// Attempts to represent the current JSON number as an . /// diff --git a/src/System.Text.Json/src/System/Text/Json/JsonConstants.cs b/src/System.Text.Json/src/System/Text/Json/JsonConstants.cs index ec6599915047..bede53502589 100644 --- a/src/System.Text.Json/src/System/Text/Json/JsonConstants.cs +++ b/src/System.Text.Json/src/System/Text/Json/JsonConstants.cs @@ -57,8 +57,9 @@ internal static class JsonConstants // All other UTF-16 characters can be represented by either 1 or 2 UTF-8 bytes. public const int MaxExpansionFactorWhileTranscoding = 3; - public const int MaxTokenSize = 2_000_000_000 / MaxExpansionFactorWhileEscaping; // 357_913_941 bytes - public const int MaxCharacterTokenSize = 2_000_000_000 / MaxExpansionFactorWhileEscaping; // 357_913_941 characters + public const int MaxTokenSize = 1_000_000_000 / MaxExpansionFactorWhileEscaping; // 166_666_666 bytes + public const int MaxBase46ValueTokenSize = (1_000_000_000 >> 2 * 3) / MaxExpansionFactorWhileEscaping; // 125_000_000 bytes + public const int MaxCharacterTokenSize = 1_000_000_000 / MaxExpansionFactorWhileEscaping; // 166_666_666 characters public const int MaximumFormatInt64Length = 20; // 19 + sign (i.e. -9223372036854775808) public const int MaximumFormatUInt64Length = 20; // i.e. 18446744073709551615 diff --git a/src/System.Text.Json/src/System/Text/Json/Reader/JsonReaderHelper.Unescaping.cs b/src/System.Text.Json/src/System/Text/Json/Reader/JsonReaderHelper.Unescaping.cs index e7025e796157..fa4502b62329 100644 --- a/src/System.Text.Json/src/System/Text/Json/Reader/JsonReaderHelper.Unescaping.cs +++ b/src/System.Text.Json/src/System/Text/Json/Reader/JsonReaderHelper.Unescaping.cs @@ -10,6 +10,31 @@ namespace System.Text.Json { internal static partial class JsonReaderHelper { + public static bool TryGetUnescapedBase64Bytes(ReadOnlySpan utf8Source, int idx, out byte[] bytes) + { + byte[] unescapedArray = null; + + Span utf8Unescaped = utf8Source.Length <= JsonConstants.StackallocThreshold ? + stackalloc byte[utf8Source.Length] : + (unescapedArray = ArrayPool.Shared.Rent(utf8Source.Length)); + + Unescape(utf8Source, utf8Unescaped, idx, out int written); + Debug.Assert(written > 0); + + utf8Unescaped = utf8Unescaped.Slice(0, written); + Debug.Assert(!utf8Unescaped.IsEmpty); + + bool result = TryDecodeBase64InPlace(utf8Unescaped, out bytes); + + if (unescapedArray != null) + { + utf8Unescaped.Clear(); + ArrayPool.Shared.Return(unescapedArray); + } + + return result; + } + // Reject any invalid UTF-8 data rather than silently replacing. public static readonly UTF8Encoding s_utf8Encoding = new UTF8Encoding(encoderShouldEmitUTF8Identifier: false, throwOnInvalidBytes: true); @@ -107,6 +132,53 @@ public static bool UnescapeAndCompare(ReadOnlySequence utf8Source, ReadOnl return result; } + public static bool TryDecodeBase64InPlace(Span utf8Unescaped, out byte[] bytes) + { + OperationStatus status = Base64.DecodeFromUtf8InPlace(utf8Unescaped, out int bytesWritten); + if (status != OperationStatus.Done) + { + bytes = null; + return false; + } + bytes = utf8Unescaped.Slice(0, bytesWritten).ToArray(); + return true; + } + + public static bool TryDecodeBase64(ReadOnlySpan utf8Unescaped, out byte[] bytes) + { + byte[] pooledArray = null; + + Span byteSpan = utf8Unescaped.Length <= JsonConstants.StackallocThreshold ? + stackalloc byte[utf8Unescaped.Length] : + (pooledArray = ArrayPool.Shared.Rent(utf8Unescaped.Length)); + + OperationStatus status = Base64.DecodeFromUtf8(utf8Unescaped, byteSpan, out int bytesConsumed, out int bytesWritten); + + if (status != OperationStatus.Done) + { + bytes = null; + + if (pooledArray != null) + { + byteSpan.Clear(); + ArrayPool.Shared.Return(pooledArray); + } + + return false; + } + Debug.Assert(bytesConsumed == utf8Unescaped.Length); + + bytes = byteSpan.Slice(0, bytesWritten).ToArray(); + + if (pooledArray != null) + { + byteSpan.Clear(); + ArrayPool.Shared.Return(pooledArray); + } + + return true; + } + public static string TranscodeHelper(ReadOnlySpan utf8Unescaped) { try diff --git a/src/System.Text.Json/src/System/Text/Json/Reader/Utf8JsonReader.TryGet.cs b/src/System.Text.Json/src/System/Text/Json/Reader/Utf8JsonReader.TryGet.cs index d4e25a702841..2151d4076283 100644 --- a/src/System.Text.Json/src/System/Text/Json/Reader/Utf8JsonReader.TryGet.cs +++ b/src/System.Text.Json/src/System/Text/Json/Reader/Utf8JsonReader.TryGet.cs @@ -58,7 +58,7 @@ public string GetComment() /// /// Parses the current JSON token value from the source as a . - /// Returns true if the TokenType is JsonTokenType.True and false if the TokenType is JsonTokenType.False. + /// Returns if the TokenType is JsonTokenType.True and if the TokenType is JsonTokenType.False. /// /// /// Thrown if trying to get the value of a JSON token that is not a boolean (i.e. or ). @@ -84,6 +84,27 @@ public bool GetBoolean() } } + /// + /// Parses the current JSON token value from the source and decodes the base 64 encoded JSON string as bytes. + /// + /// + /// Thrown if trying to get the value of a JSON token that is not a . + /// + /// + /// + /// Thrown when the JSON string contains data outside of the expected base 64 range, or if it contains invalid/more than two padding characters, + /// or is incomplete (i.e. the JSON string length is not a multiple of 4). + /// + public byte[] GetBytesFromBase64() + { + if (!TryGetBytesFromBase64(out byte[] value)) + { + throw ThrowHelper.GetFormatException(DateType.Base64String); + } + + return value; + } + /// /// Parses the current JSON token value from the source as an . /// Returns the value if the entire UTF-8 encoded token value can be successfully parsed to an @@ -320,11 +341,41 @@ public Guid GetGuid() return value; } + /// + /// Parses the current JSON token value from the source and decodes the base 64 encoded JSON string as bytes. + /// Returns if the entire token value is encoded as valid base 64 text and can be successfully + /// decoded to bytes. + /// Returns otherwise. + /// + /// + /// Thrown if trying to get the value of a JSON token that is not a . + /// + /// + public bool TryGetBytesFromBase64(out byte[] value) + { + if (TokenType != JsonTokenType.String) + { + throw ThrowHelper.GetInvalidOperationException_ExpectedString(TokenType); + } + + ReadOnlySpan span = HasValueSequence ? ValueSequence.ToArray() : ValueSpan; + + if (_stringHasEscaping) + { + int idx = span.IndexOf(JsonConstants.BackSlash); + Debug.Assert(idx != -1); + return JsonReaderHelper.TryGetUnescapedBase64Bytes(span, idx, out value); + } + + Debug.Assert(span.IndexOf(JsonConstants.BackSlash) == -1); + return JsonReaderHelper.TryDecodeBase64(span, out value); + } + /// /// Parses the current JSON token value from the source as an . - /// Returns true if the entire UTF-8 encoded token value can be successfully + /// Returns if the entire UTF-8 encoded token value can be successfully /// parsed to an value. - /// Returns false otherwise. + /// Returns otherwise. /// /// /// Thrown if trying to get the value of a JSON token that is not a . @@ -343,9 +394,9 @@ public bool TryGetInt32(out int value) /// /// Parses the current JSON token value from the source as a . - /// Returns true if the entire UTF-8 encoded token value can be successfully + /// Returns if the entire UTF-8 encoded token value can be successfully /// parsed to a value. - /// Returns false otherwise. + /// Returns otherwise. /// /// /// Thrown if trying to get the value of a JSON token that is not a . @@ -364,9 +415,9 @@ public bool TryGetInt64(out long value) /// /// Parses the current JSON token value from the source as a . - /// Returns true if the entire UTF-8 encoded token value can be successfully + /// Returns if the entire UTF-8 encoded token value can be successfully /// parsed to a value. - /// Returns false otherwise. + /// Returns otherwise. /// /// /// Thrown if trying to get the value of a JSON token that is not a . @@ -386,9 +437,9 @@ public bool TryGetUInt32(out uint value) /// /// Parses the current JSON token value from the source as a . - /// Returns true if the entire UTF-8 encoded token value can be successfully + /// Returns if the entire UTF-8 encoded token value can be successfully /// parsed to a value. - /// Returns false otherwise. + /// Returns otherwise. /// /// /// Thrown if trying to get the value of a JSON token that is not a . @@ -408,9 +459,9 @@ public bool TryGetUInt64(out ulong value) /// /// Parses the current JSON token value from the source as a . - /// Returns true if the entire UTF-8 encoded token value can be successfully + /// Returns if the entire UTF-8 encoded token value can be successfully /// parsed to a value. - /// Returns false otherwise. + /// Returns otherwise. /// /// /// Thrown if trying to get the value of a JSON token that is not a . @@ -429,9 +480,9 @@ public bool TryGetSingle(out float value) /// /// Parses the current JSON token value from the source as a . - /// Returns true if the entire UTF-8 encoded token value can be successfully + /// Returns if the entire UTF-8 encoded token value can be successfully /// parsed to a value. - /// Returns false otherwise. + /// Returns otherwise. /// /// /// Thrown if trying to get the value of a JSON token that is not a . @@ -450,9 +501,9 @@ public bool TryGetDouble(out double value) /// /// Parses the current JSON token value from the source as a . - /// Returns true if the entire UTF-8 encoded token value can be successfully + /// Returns if the entire UTF-8 encoded token value can be successfully /// parsed to a value. - /// Returns false otherwise. + /// Returns otherwise. /// /// /// Thrown if trying to get the value of a JSON token that is not a . @@ -471,9 +522,9 @@ public bool TryGetDecimal(out decimal value) /// /// Parses the current JSON token value from the source as a . - /// Returns true if the entire UTF-8 encoded token value can be successfully + /// Returns if the entire UTF-8 encoded token value can be successfully /// parsed to a value. - /// Returns false otherwise. + /// Returns otherwise. /// /// /// Thrown if trying to get the value of a JSON token that is not a . @@ -530,9 +581,9 @@ public bool TryGetDateTime(out DateTime value) /// /// Parses the current JSON token value from the source as a . - /// Returns true if the entire UTF-8 encoded token value can be successfully + /// Returns if the entire UTF-8 encoded token value can be successfully /// parsed to a value. - /// Returns false otherwise. + /// Returns otherwise. /// /// /// Thrown if trying to get the value of a JSON token that is not a . diff --git a/src/System.Text.Json/src/System/Text/Json/ThrowHelper.cs b/src/System.Text.Json/src/System/Text/Json/ThrowHelper.cs index afc8ba0ca0a7..efed281f3157 100644 --- a/src/System.Text.Json/src/System/Text/Json/ThrowHelper.cs +++ b/src/System.Text.Json/src/System/Text/Json/ThrowHelper.cs @@ -517,6 +517,9 @@ public static FormatException GetFormatException(DateType dateType) case DateType.DateTimeOffset: message = SR.FormatDateTimeOffset; break; + case DateType.Base64String: + message = SR.CannotDecodeInvalidBase64; + break; default: Debug.Fail($"The DateType enum value: {dateType} is not part of the switch. Add the appropriate case and exception message."); break; @@ -580,6 +583,7 @@ internal enum NumericType internal enum DateType { DateTime, - DateTimeOffset + DateTimeOffset, + Base64String } } diff --git a/src/System.Text.Json/src/System/Text/Json/Writer/JsonWriterHelper.Escaping.cs b/src/System.Text.Json/src/System/Text/Json/Writer/JsonWriterHelper.Escaping.cs index 891bd7e4062a..fceb5f0d1dac 100644 --- a/src/System.Text.Json/src/System/Text/Json/Writer/JsonWriterHelper.Escaping.cs +++ b/src/System.Text.Json/src/System/Text/Json/Writer/JsonWriterHelper.Escaping.cs @@ -20,7 +20,7 @@ internal static partial class JsonWriterHelper private static ReadOnlySpan AllowList => new byte[byte.MaxValue + 1] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 1, 1, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 1, 1, 1, 1, + 1, 1, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, diff --git a/src/System.Text.Json/src/System/Text/Json/Writer/JsonWriterHelper.cs b/src/System.Text.Json/src/System/Text/Json/Writer/JsonWriterHelper.cs index 82b67a43678c..b9e64ca855d1 100644 --- a/src/System.Text.Json/src/System/Text/Json/Writer/JsonWriterHelper.cs +++ b/src/System.Text.Json/src/System/Text/Json/Writer/JsonWriterHelper.cs @@ -45,6 +45,13 @@ public static void ValidateValue(ReadOnlySpan value) ThrowHelper.ThrowArgumentException_ValueTooLarge(value.Length); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void ValidateBytes(ReadOnlySpan bytes) + { + if (bytes.Length > JsonConstants.MaxBase46ValueTokenSize) + ThrowHelper.ThrowArgumentException_ValueTooLarge(bytes.Length); + } + [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void ValidateDouble(double value) { @@ -113,6 +120,20 @@ public static void ValidatePropertyAndValue(ReadOnlySpan propertyName, Rea ThrowHelper.ThrowArgumentException(propertyName, value); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void ValidatePropertyAndBytes(ReadOnlySpan propertyName, ReadOnlySpan bytes) + { + if (propertyName.Length > JsonConstants.MaxCharacterTokenSize || bytes.Length > JsonConstants.MaxBase46ValueTokenSize) + ThrowHelper.ThrowArgumentException(propertyName, bytes); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void ValidatePropertyAndBytes(ReadOnlySpan propertyName, ReadOnlySpan bytes) + { + if (propertyName.Length > JsonConstants.MaxTokenSize || bytes.Length > JsonConstants.MaxBase46ValueTokenSize) + ThrowHelper.ThrowArgumentException(propertyName, bytes); + } + internal static void ValidateNumber(ReadOnlySpan utf8FormattedNumber) { // This is a simplified version of the number reader from Utf8JsonReader.TryGetNumber, diff --git a/src/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.WriteProperties.Bytes.cs b/src/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.WriteProperties.Bytes.cs new file mode 100644 index 000000000000..dd4cf735d2a0 --- /dev/null +++ b/src/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.WriteProperties.Bytes.cs @@ -0,0 +1,376 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Buffers; +using System.Buffers.Text; +using System.Diagnostics; + +namespace System.Text.Json +{ + public sealed partial class Utf8JsonWriter + { + /// + /// Writes the pre-encoded property name and raw bytes value (as a base 64 encoded JSON string) as part of a name/value pair of a JSON object. + /// + /// The JSON encoded property name of the JSON object to be transcoded and written as UTF-8. + /// The binary data to be written as a base 64 encoded JSON string as part of the name/value pair. + /// + /// The property name should already be escaped when the instance of was created. + /// + /// + /// Thrown if this would result in an invalid JSON to be written (while validation is enabled). + /// + public void WriteBase64String(JsonEncodedText propertyName, ReadOnlySpan bytes) + => WriteBase64StringHelper(propertyName.EncodedUtf8Bytes, bytes); + + private void WriteBase64StringHelper(ReadOnlySpan utf8PropertyName, ReadOnlySpan bytes) + { + Debug.Assert(utf8PropertyName.Length <= JsonConstants.MaxTokenSize); + + JsonWriterHelper.ValidateBytes(bytes); + + WriteBase64ByOptions(utf8PropertyName, bytes); + + SetFlagToAddListSeparatorBeforeNextItem(); + _tokenType = JsonTokenType.String; + } + + /// + /// Writes the property name and raw bytes value (as a Base64 encoded JSON string) as part of a name/value pair of a JSON object. + /// + /// The property name of the JSON object to be transcoded and written as UTF-8. + /// The binary data to be written as a base 64 encoded JSON string as part of the name/value pair. + /// + /// The property name is escaped before writing. + /// + /// + /// Thrown when the specified property name is too large. + /// + /// + /// Thrown if this would result in an invalid JSON to be written (while validation is enabled). + /// + public void WriteBase64String(string propertyName, ReadOnlySpan bytes) + => WriteBase64String(propertyName.AsSpan(), bytes); + + /// + /// Writes the property name and raw bytes value (as a base 64 encoded JSON string) as part of a name/value pair of a JSON object. + /// + /// The property name of the JSON object to be transcoded and written as UTF-8. + /// The binary data to be written as a base 64 encoded JSON string as part of the name/value pair. + /// + /// The property name is escaped before writing. + /// + /// + /// Thrown when the specified property name is too large. + /// + /// + /// Thrown if this would result in an invalid JSON to be written (while validation is enabled). + /// + public void WriteBase64String(ReadOnlySpan propertyName, ReadOnlySpan bytes) + { + JsonWriterHelper.ValidatePropertyAndBytes(propertyName, bytes); + + WriteBase64Escape(propertyName, bytes); + + SetFlagToAddListSeparatorBeforeNextItem(); + _tokenType = JsonTokenType.String; + } + + /// + /// Writes the property name and raw bytes value (as a base 64 encoded JSON string) as part of a name/value pair of a JSON object. + /// + /// The UTF-8 encoded property name of the JSON object to be written. + /// The binary data to be written as a base 64 encoded JSON string as part of the name/value pair. + /// + /// The property name is escaped before writing. + /// + /// + /// Thrown when the specified property name is too large. + /// + /// + /// Thrown if this would result in an invalid JSON to be written (while validation is enabled). + /// + public void WriteBase64String(ReadOnlySpan utf8PropertyName, ReadOnlySpan bytes) + { + JsonWriterHelper.ValidatePropertyAndBytes(utf8PropertyName, bytes); + + WriteBase64Escape(utf8PropertyName, bytes); + + SetFlagToAddListSeparatorBeforeNextItem(); + _tokenType = JsonTokenType.String; + } + + private void WriteBase64Escape(ReadOnlySpan propertyName, ReadOnlySpan bytes) + { + int propertyIdx = JsonWriterHelper.NeedsEscaping(propertyName); + + Debug.Assert(propertyIdx >= -1 && propertyIdx < propertyName.Length); + + if (propertyIdx != -1) + { + WriteBase64EscapeProperty(propertyName, bytes, propertyIdx); + } + else + { + WriteBase64ByOptions(propertyName, bytes); + } + } + + private void WriteBase64Escape(ReadOnlySpan utf8PropertyName, ReadOnlySpan bytes) + { + int propertyIdx = JsonWriterHelper.NeedsEscaping(utf8PropertyName); + + Debug.Assert(propertyIdx >= -1 && propertyIdx < utf8PropertyName.Length); + + if (propertyIdx != -1) + { + WriteBase64EscapeProperty(utf8PropertyName, bytes, propertyIdx); + } + else + { + WriteBase64ByOptions(utf8PropertyName, bytes); + } + } + + private void WriteBase64EscapeProperty(ReadOnlySpan propertyName, ReadOnlySpan bytes, int firstEscapeIndexProp) + { + Debug.Assert(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= propertyName.Length); + Debug.Assert(firstEscapeIndexProp >= 0 && firstEscapeIndexProp < propertyName.Length); + + char[] propertyArray = null; + + int length = JsonWriterHelper.GetMaxEscapedLength(propertyName.Length, firstEscapeIndexProp); + + Span escapedPropertyName = length <= JsonConstants.StackallocThreshold ? + stackalloc char[length] : + (propertyArray = ArrayPool.Shared.Rent(length)); + + JsonWriterHelper.EscapeString(propertyName, escapedPropertyName, firstEscapeIndexProp, out int written); + + WriteBase64ByOptions(escapedPropertyName.Slice(0, written), bytes); + + if (propertyArray != null) + { + ArrayPool.Shared.Return(propertyArray); + } + } + + private void WriteBase64EscapeProperty(ReadOnlySpan utf8PropertyName, ReadOnlySpan bytes, int firstEscapeIndexProp) + { + Debug.Assert(int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping >= utf8PropertyName.Length); + Debug.Assert(firstEscapeIndexProp >= 0 && firstEscapeIndexProp < utf8PropertyName.Length); + + byte[] propertyArray = null; + + int length = JsonWriterHelper.GetMaxEscapedLength(utf8PropertyName.Length, firstEscapeIndexProp); + + Span escapedPropertyName = length <= JsonConstants.StackallocThreshold ? + stackalloc byte[length] : + (propertyArray = ArrayPool.Shared.Rent(length)); + + JsonWriterHelper.EscapeString(utf8PropertyName, escapedPropertyName, firstEscapeIndexProp, out int written); + + WriteBase64ByOptions(escapedPropertyName.Slice(0, written), bytes); + + if (propertyArray != null) + { + ArrayPool.Shared.Return(propertyArray); + } + } + + private void WriteBase64ByOptions(ReadOnlySpan propertyName, ReadOnlySpan bytes) + { + ValidateWritingProperty(); + if (Options.Indented) + { + WriteBase64Indented(propertyName, bytes); + } + else + { + WriteBase64Minimized(propertyName, bytes); + } + } + + private void WriteBase64ByOptions(ReadOnlySpan utf8PropertyName, ReadOnlySpan bytes) + { + ValidateWritingProperty(); + if (Options.Indented) + { + WriteBase64Indented(utf8PropertyName, bytes); + } + else + { + WriteBase64Minimized(utf8PropertyName, bytes); + } + } + + private void WriteBase64Minimized(ReadOnlySpan escapedPropertyName, ReadOnlySpan bytes) + { + int encodedLength = Base64.GetMaxEncodedToUtf8Length(bytes.Length); + + Debug.Assert(escapedPropertyName.Length * JsonConstants.MaxExpansionFactorWhileTranscoding < int.MaxValue - (encodedLength * JsonConstants.MaxExpansionFactorWhileEscaping) - 6); + + // All ASCII, 2 quotes for property name, 2 quotes to surround the base-64 encoded string value, and 1 colon => escapedPropertyName.Length + encodedLength + 5 + // Optionally, 1 list separator, and up to 3x growth when transcoding, with escaping which can by up to 6x. + int maxRequired = (escapedPropertyName.Length * JsonConstants.MaxExpansionFactorWhileTranscoding) + (encodedLength * JsonConstants.MaxExpansionFactorWhileEscaping) + 6; + + if (_memory.Length - BytesPending < maxRequired) + { + Grow(maxRequired); + } + + Span output = _memory.Span; + + if (_currentDepth < 0) + { + output[BytesPending++] = JsonConstants.ListSeparator; + } + output[BytesPending++] = JsonConstants.Quote; + + TranscodeAndWrite(escapedPropertyName, output); + + output[BytesPending++] = JsonConstants.Quote; + output[BytesPending++] = JsonConstants.KeyValueSeperator; + + output[BytesPending++] = JsonConstants.Quote; + + Base64EncodeAndWrite(bytes, output, encodedLength); + + output[BytesPending++] = JsonConstants.Quote; + } + + private void WriteBase64Minimized(ReadOnlySpan escapedPropertyName, ReadOnlySpan bytes) + { + int encodedLength = Base64.GetMaxEncodedToUtf8Length(bytes.Length); + + Debug.Assert(escapedPropertyName.Length < int.MaxValue - (encodedLength * JsonConstants.MaxExpansionFactorWhileEscaping) - 6); + + // 2 quotes for property name, 2 quotes to surround the base-64 encoded string value, and 1 colon => escapedPropertyName.Length + encodedLength + 5 + // Optionally, 1 list separator, with escaping which can by up to 6x. + int maxRequired = escapedPropertyName.Length + (encodedLength * JsonConstants.MaxExpansionFactorWhileEscaping) + 6; + + if (_memory.Length - BytesPending < maxRequired) + { + Grow(maxRequired); + } + + Span output = _memory.Span; + + if (_currentDepth < 0) + { + output[BytesPending++] = JsonConstants.ListSeparator; + } + output[BytesPending++] = JsonConstants.Quote; + + escapedPropertyName.CopyTo(output.Slice(BytesPending)); + BytesPending += escapedPropertyName.Length; + + output[BytesPending++] = JsonConstants.Quote; + output[BytesPending++] = JsonConstants.KeyValueSeperator; + + output[BytesPending++] = JsonConstants.Quote; + + Base64EncodeAndWrite(bytes, output, encodedLength); + + output[BytesPending++] = JsonConstants.Quote; + } + + private void WriteBase64Indented(ReadOnlySpan escapedPropertyName, ReadOnlySpan bytes) + { + int indent = Indentation; + Debug.Assert(indent <= 2 * JsonConstants.MaxWriterDepth); + + int encodedLength = Base64.GetMaxEncodedToUtf8Length(bytes.Length); + + Debug.Assert(escapedPropertyName.Length * JsonConstants.MaxExpansionFactorWhileTranscoding < int.MaxValue - indent - (encodedLength * JsonConstants.MaxExpansionFactorWhileEscaping) - 7 - s_newLineLength); + + // All ASCII, 2 quotes for property name, 2 quotes to surround the base-64 encoded string value, 1 colon, and 1 space => indent + escapedPropertyName.Length + encodedLength + 6 + // Optionally, 1 list separator, 1-2 bytes for new line, and up to 3x growth when transcoding, with escaping which can by up to 6x. + int maxRequired = indent + (escapedPropertyName.Length * JsonConstants.MaxExpansionFactorWhileTranscoding) + (encodedLength * JsonConstants.MaxExpansionFactorWhileEscaping) + 7 + s_newLineLength; + + if (_memory.Length - BytesPending < maxRequired) + { + Grow(maxRequired); + } + + Span output = _memory.Span; + + if (_currentDepth < 0) + { + output[BytesPending++] = JsonConstants.ListSeparator; + } + + if (_tokenType != JsonTokenType.None) + { + WriteNewLine(output); + } + + JsonWriterHelper.WriteIndentation(output.Slice(BytesPending), indent); + BytesPending += indent; + + output[BytesPending++] = JsonConstants.Quote; + + TranscodeAndWrite(escapedPropertyName, output); + + output[BytesPending++] = JsonConstants.Quote; + output[BytesPending++] = JsonConstants.KeyValueSeperator; + output[BytesPending++] = JsonConstants.Space; + + output[BytesPending++] = JsonConstants.Quote; + + Base64EncodeAndWrite(bytes, output, encodedLength); + + output[BytesPending++] = JsonConstants.Quote; + } + + private void WriteBase64Indented(ReadOnlySpan escapedPropertyName, ReadOnlySpan bytes) + { + int indent = Indentation; + Debug.Assert(indent <= 2 * JsonConstants.MaxWriterDepth); + + int encodedLength = Base64.GetMaxEncodedToUtf8Length(bytes.Length); + + Debug.Assert(escapedPropertyName.Length < int.MaxValue - indent - (encodedLength * JsonConstants.MaxExpansionFactorWhileEscaping) - 7 - s_newLineLength); + + // 2 quotes for property name, 2 quotes to surround the base-64 encoded string value, 1 colon, and 1 space => indent + escapedPropertyName.Length + encodedLength + 6 + // Optionally, 1 list separator, and 1-2 bytes for new line, with escaping which can by up to 6x. + int maxRequired = indent + escapedPropertyName.Length + (encodedLength * JsonConstants.MaxExpansionFactorWhileEscaping) + 7 + s_newLineLength; + + if (_memory.Length - BytesPending < maxRequired) + { + Grow(maxRequired); + } + + Span output = _memory.Span; + + if (_currentDepth < 0) + { + output[BytesPending++] = JsonConstants.ListSeparator; + } + + if (_tokenType != JsonTokenType.None) + { + WriteNewLine(output); + } + + JsonWriterHelper.WriteIndentation(output.Slice(BytesPending), indent); + BytesPending += indent; + + output[BytesPending++] = JsonConstants.Quote; + + escapedPropertyName.CopyTo(output.Slice(BytesPending)); + BytesPending += escapedPropertyName.Length; + + output[BytesPending++] = JsonConstants.Quote; + output[BytesPending++] = JsonConstants.KeyValueSeperator; + output[BytesPending++] = JsonConstants.Space; + + output[BytesPending++] = JsonConstants.Quote; + + Base64EncodeAndWrite(bytes, output, encodedLength); + + output[BytesPending++] = JsonConstants.Quote; + } + } +} diff --git a/src/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.WriteValues.Bytes.cs b/src/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.WriteValues.Bytes.cs new file mode 100644 index 000000000000..ef1fdb895ef4 --- /dev/null +++ b/src/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.WriteValues.Bytes.cs @@ -0,0 +1,119 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Buffers.Text; +using System.Diagnostics; + +namespace System.Text.Json +{ + public sealed partial class Utf8JsonWriter + { + /// + /// Writes the raw bytes value as base 64 encoded JSON string as an element of a JSON array. + /// + /// The binary data to be written as a base 64 encoded JSON string element of a JSON array. + /// + /// The bytes are encoded before writing. + /// + /// + /// Thrown when the specified value is too large. + /// + /// + /// Thrown if this would result in an invalid JSON to be written (while validation is enabled). + /// + public void WriteBase64StringValue(ReadOnlySpan bytes) + { + JsonWriterHelper.ValidateBytes(bytes); + + WriteBase64ByOptions(bytes); + + SetFlagToAddListSeparatorBeforeNextItem(); + _tokenType = JsonTokenType.String; + } + + private void WriteBase64ByOptions(ReadOnlySpan bytes) + { + ValidateWritingValue(); + + if (Options.Indented) + { + WriteBase64Indented(bytes); + } + else + { + WriteBase64Minimized(bytes); + } + } + + // TODO: https://github.com/dotnet/corefx/issues/36958 + private void WriteBase64Minimized(ReadOnlySpan bytes) + { + int encodingLength = Base64.GetMaxEncodedToUtf8Length(bytes.Length); + + Debug.Assert(encodingLength < (int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping) - 3); + + // 2 quotes to surround the base-64 encoded string value, with escaping which can by up to 6x. + // Optionally, 1 list separator + int maxRequired = (encodingLength * JsonConstants.MaxExpansionFactorWhileEscaping) + 3; + + if (_memory.Length - BytesPending < maxRequired) + { + Grow(maxRequired); + } + + Span output = _memory.Span; + + if (_currentDepth < 0) + { + output[BytesPending++] = JsonConstants.ListSeparator; + } + output[BytesPending++] = JsonConstants.Quote; + + Base64EncodeAndWrite(bytes, output, encodingLength); + + output[BytesPending++] = JsonConstants.Quote; + } + + // TODO: https://github.com/dotnet/corefx/issues/36958 + private void WriteBase64Indented(ReadOnlySpan bytes) + { + int indent = Indentation; + Debug.Assert(indent <= 2 * JsonConstants.MaxWriterDepth); + + int encodingLength = Base64.GetMaxEncodedToUtf8Length(bytes.Length); + + Debug.Assert(encodingLength < (int.MaxValue / JsonConstants.MaxExpansionFactorWhileEscaping) - indent - 3 - s_newLineLength); + + // indentation + 2 quotes to surround the base-64 encoded string value, with escaping which can by up to 6x. + // Optionally, 1 list separator, and 1-2 bytes for new line + int maxRequired = indent + (encodingLength * JsonConstants.MaxExpansionFactorWhileEscaping) + 3 + s_newLineLength; + + if (_memory.Length - BytesPending < maxRequired) + { + Grow(maxRequired); + } + + Span output = _memory.Span; + + if (_currentDepth < 0) + { + output[BytesPending++] = JsonConstants.ListSeparator; + } + + if (_tokenType != JsonTokenType.None) + { + WriteNewLine(output); + } + + JsonWriterHelper.WriteIndentation(output.Slice(BytesPending), indent); + BytesPending += indent; + + output[BytesPending++] = JsonConstants.Quote; + + Base64EncodeAndWrite(bytes, output, encodingLength); + + output[BytesPending++] = JsonConstants.Quote; + } + } +} diff --git a/src/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.WriteValues.Helpers.cs b/src/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.WriteValues.Helpers.cs index cc4986eab577..9c26cb3e8364 100644 --- a/src/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.WriteValues.Helpers.cs +++ b/src/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.WriteValues.Helpers.cs @@ -2,7 +2,10 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System.Buffers; +using System.Buffers.Text; using System.Diagnostics; +using System.Runtime.CompilerServices; namespace System.Text.Json { @@ -26,5 +29,41 @@ private void ValidateWritingValue() } } } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private void Base64EncodeAndWrite(ReadOnlySpan bytes, Span output, int encodingLength) + { + byte[] outputText = null; + + Span encodedBytes = encodingLength <= JsonConstants.StackallocThreshold ? + stackalloc byte[encodingLength] : + (outputText = ArrayPool.Shared.Rent(encodingLength)); + + OperationStatus status = Base64.EncodeToUtf8(bytes, encodedBytes, out int consumed, out int written); + Debug.Assert(status == OperationStatus.Done); + Debug.Assert(consumed == bytes.Length); + + encodedBytes = encodedBytes.Slice(0, written); + Span destination = output.Slice(BytesPending); + + int firstEscapeIndexVal = encodedBytes.IndexOfAny(JsonConstants.Plus, JsonConstants.Slash); + if (firstEscapeIndexVal == -1) + { + Debug.Assert(destination.Length >= written); + encodedBytes.Slice(0, written).CopyTo(destination); + BytesPending += written; + } + else + { + Debug.Assert(destination.Length >= written * JsonConstants.MaxExpansionFactorWhileEscaping); + JsonWriterHelper.EscapeString(encodedBytes, destination, firstEscapeIndexVal, out written); + BytesPending += written; + } + + if (outputText != null) + { + ArrayPool.Shared.Return(outputText); + } + } } } diff --git a/src/System.Text.Json/tests/JsonDocumentTests.cs b/src/System.Text.Json/tests/JsonDocumentTests.cs index 36abf6bf0d70..c8d74f3f9028 100644 --- a/src/System.Text.Json/tests/JsonDocumentTests.cs +++ b/src/System.Text.Json/tests/JsonDocumentTests.cs @@ -371,7 +371,7 @@ public static void ParseJson_SeekableStream_WithBOM(bool compactData, TestCaseTy null, bytes => JsonDocument.Parse(new MemoryStream(Utf8Bom.Concat(bytes).ToArray()))); } - + [Theory] [MemberData(nameof(ReducedTestCases))] public static void ParseJson_SeekableStream_Async_WithBOM(bool compactData, TestCaseType type, string jsonString) @@ -540,12 +540,12 @@ private static void ParseJson( } } - private static string PrintJson(this JsonDocument document, int sizeHint=0) + private static string PrintJson(this JsonDocument document, int sizeHint = 0) { return PrintJson(document.RootElement, sizeHint); } - private static string PrintJson(this JsonElement element, int sizeHint=0) + private static string PrintJson(this JsonElement element, int sizeHint = 0) { StringBuilder sb = new StringBuilder(sizeHint); DepthFirstAppend(sb, element); @@ -562,31 +562,31 @@ private static void DepthFirstAppend(StringBuilder buf, JsonElement element) case JsonValueType.True: case JsonValueType.String: case JsonValueType.Number: - { - buf.Append(element.ToString()); - buf.Append(", "); - break; - } - case JsonValueType.Object: - { - foreach (JsonProperty prop in element.EnumerateObject()) { - buf.Append(prop.Name); + buf.Append(element.ToString()); buf.Append(", "); - DepthFirstAppend(buf, prop.Value); + break; } + case JsonValueType.Object: + { + foreach (JsonProperty prop in element.EnumerateObject()) + { + buf.Append(prop.Name); + buf.Append(", "); + DepthFirstAppend(buf, prop.Value); + } - break; - } + break; + } case JsonValueType.Array: - { - foreach (JsonElement child in element.EnumerateArray()) { - DepthFirstAppend(buf, child); - } + foreach (JsonElement child in element.EnumerateArray()) + { + DepthFirstAppend(buf, child); + } - break; - } + break; + } } } @@ -834,6 +834,8 @@ public static void ReadSmallInteger(int value) } Assert.Throws(() => root.GetString()); + Assert.Throws(() => root.GetBytesFromBase64()); + Assert.Throws(() => root.TryGetBytesFromBase64(out byte[] bytes)); Assert.Throws(() => root.GetDateTime()); Assert.Throws(() => root.GetDateTimeOffset()); Assert.Throws(() => root.GetGuid()); @@ -920,6 +922,7 @@ public static void ReadMediumInteger(long value) } Assert.Throws(() => root.GetString()); + Assert.Throws(() => root.GetBytesFromBase64()); Assert.Throws(() => root.GetDateTime()); Assert.Throws(() => root.GetDateTimeOffset()); Assert.Throws(() => root.GetGuid()); @@ -976,6 +979,7 @@ public static void ReadLargeInteger(ulong value) Assert.Equal(value, root.GetUInt64()); Assert.Throws(() => root.GetString()); + Assert.Throws(() => root.GetBytesFromBase64()); Assert.Throws(() => root.GetDateTime()); Assert.Throws(() => root.GetDateTimeOffset()); Assert.Throws(() => root.GetGuid()); @@ -1032,6 +1036,7 @@ public static void ReadTooLargeInteger() Assert.Throws(() => root.GetUInt64()); Assert.Throws(() => root.GetString()); + Assert.Throws(() => root.GetBytesFromBase64()); Assert.Throws(() => root.GetDateTime()); Assert.Throws(() => root.GetDateTimeOffset()); Assert.Throws(() => root.GetGuid()); @@ -1220,6 +1225,7 @@ public static void ReadNonInteger(string str, double expectedDouble, float expec Assert.Throws(() => root.GetUInt64()); Assert.Throws(() => root.GetString()); + Assert.Throws(() => root.GetBytesFromBase64()); Assert.Throws(() => root.GetDateTime()); Assert.Throws(() => root.GetDateTimeOffset()); Assert.Throws(() => root.GetGuid()); @@ -1287,6 +1293,7 @@ public static void ReadTooPreciseDouble() Assert.Throws(() => root.GetUInt64()); Assert.Throws(() => root.GetString()); + Assert.Throws(() => root.GetBytesFromBase64()); Assert.Throws(() => root.GetDateTime()); Assert.Throws(() => root.GetDateTimeOffset()); Assert.Throws(() => root.GetGuid()); @@ -1338,6 +1345,8 @@ public static void ReadArrayWithComments() Assert.Throws(() => root.GetUInt64()); Assert.Throws(() => root.TryGetUInt64(out ulong _)); Assert.Throws(() => root.GetString()); + Assert.Throws(() => root.GetBytesFromBase64()); + Assert.Throws(() => root.TryGetBytesFromBase64(out byte[] _)); Assert.Throws(() => root.GetDateTime()); Assert.Throws(() => root.GetDateTimeOffset()); Assert.Throws(() => root.GetGuid()); @@ -1367,6 +1376,8 @@ public static void CheckUseAfterDispose() Assert.Throws(() => root.GetUInt64()); Assert.Throws(() => root.TryGetUInt64(out ulong _)); Assert.Throws(() => root.GetString()); + Assert.Throws(() => root.GetBytesFromBase64()); + Assert.Throws(() => root.TryGetBytesFromBase64(out byte[] _)); Assert.Throws(() => root.GetBoolean()); Assert.Throws(() => root.GetRawText()); @@ -1409,6 +1420,8 @@ public static void CheckUseDefault() Assert.Throws(() => root.GetUInt64()); Assert.Throws(() => root.TryGetUInt64(out ulong _)); Assert.Throws(() => root.GetString()); + Assert.Throws(() => root.GetBytesFromBase64()); + Assert.Throws(() => root.TryGetBytesFromBase64(out byte[] _)); Assert.Throws(() => root.GetDateTime()); Assert.Throws(() => root.GetDateTimeOffset()); Assert.Throws(() => root.GetGuid()); @@ -1467,6 +1480,107 @@ public static void GetString_BadUtf8() } } + [Fact] + public static void GetBase64String_BadUtf8() + { + // The Arabic ligature Lam-Alef (U+FEFB) (which happens to, as a standalone, mean "no" in English) + // is UTF-8 EF BB BB. So let's leave out a BB and put it in quotes. + using (JsonDocument doc = JsonDocument.Parse(new byte[] { 0x22, 0xEF, 0xBB, 0x22 })) + { + JsonElement root = doc.RootElement; + + Assert.Equal(JsonValueType.String, root.Type); + Assert.Throws(() => root.GetBytesFromBase64()); + Assert.False(root.TryGetBytesFromBase64(out byte[] value)); + Assert.Null(value); + } + } + + [Fact] + public static void GetBase64Unescapes() + { + string jsonString = "\"\\u0031234\""; // equivalent to "\"1234\"" + + byte[] dataUtf8 = Encoding.UTF8.GetBytes(jsonString); + + using (JsonDocument doc = JsonDocument.Parse(dataUtf8)) + { + byte[] expected = Convert.FromBase64String("1234"); // new byte[3] { 215, 109, 248 } + + Assert.Equal(expected, doc.RootElement.GetBytesFromBase64()); + + Assert.True(doc.RootElement.TryGetBytesFromBase64(out byte[] value)); + Assert.Equal(expected, value); + } + } + + [Theory] + [InlineData("\"ABC=\"")] + [InlineData("\"AB+D\"")] + [InlineData("\"ABCD\"")] + [InlineData("\"ABC/\"")] + [InlineData("\"++++\"")] + [InlineData(null)] // Large randomly generated string + public static void ReadBase64String(string jsonString) + { + if (jsonString == null) + { + var random = new Random(42); + var charArray = new char[502]; + charArray[0] = '"'; + for (int i = 1; i < charArray.Length; i++) + { + charArray[i] = (char)random.Next('A', 'Z'); // ASCII values (between 65 and 90) that constitute valid base 64 string. + } + charArray[charArray.Length - 1] = '"'; + jsonString = new string(charArray); + } + + byte[] expected = Convert.FromBase64String(jsonString.AsSpan(1, jsonString.Length - 2).ToString()); + + using (JsonDocument doc = JsonDocument.Parse(jsonString)) + { + Assert.Equal(expected, doc.RootElement.GetBytesFromBase64()); + + Assert.True(doc.RootElement.TryGetBytesFromBase64(out byte[] value)); + Assert.Equal(expected, value); + } + } + + [Theory] + [InlineData("\"ABC===\"")] + [InlineData("\"ABC\"")] + [InlineData("\"ABC!\"")] + [InlineData(null)] // Large randomly generated string + public static void InvalidBase64(string jsonString) + { + if (jsonString == null) + { + var random = new Random(42); + var charArray = new char[500]; + charArray[0] = '"'; + for (int i = 1; i < charArray.Length; i++) + { + charArray[i] = (char)random.Next('?', '\\'); // ASCII values (between 63 and 91) that don't need to be escaped. + } + + charArray[256] = '\\'; + charArray[257] = '"'; + charArray[charArray.Length - 1] = '"'; + jsonString = new string(charArray); + } + + byte[] dataUtf8 = Encoding.UTF8.GetBytes(jsonString); + + using (JsonDocument doc = JsonDocument.Parse(dataUtf8)) + { + Assert.False(doc.RootElement.TryGetBytesFromBase64(out byte[] value)); + Assert.Null(value); + + Assert.Throws(() => doc.RootElement.GetBytesFromBase64()); + } + } + [Theory] [InlineData(" { \"hi\": \"there\" }")] [InlineData(" { \n\n\n\n } ")] @@ -1878,8 +1992,8 @@ public static void GetPropertyFindsLast_WithEscaping(string propertyName) public static void GetRawText() { const string json = - // Don't let there be a newline before the first embedded quote, - // because the index would change across CRLF vs LF compile environments. +// Don't let there be a newline before the first embedded quote, +// because the index would change across CRLF vs LF compile environments. @"{ "" weird property name"" : { @@ -2925,7 +3039,7 @@ private static void BuildSegmentedReader( ReadOnlyMemory data, int segmentCount, in JsonReaderState state, - bool isFinalBlock=false) + bool isFinalBlock = false) { if (segmentCount == 0) { diff --git a/src/System.Text.Json/tests/Utf8JsonReaderTests.TryGet.cs b/src/System.Text.Json/tests/Utf8JsonReaderTests.TryGet.cs index 642cb87e3604..64688727f79d 100644 --- a/src/System.Text.Json/tests/Utf8JsonReaderTests.TryGet.cs +++ b/src/System.Text.Json/tests/Utf8JsonReaderTests.TryGet.cs @@ -493,6 +493,22 @@ public static void InvalidConversion() catch (InvalidOperationException) { } + try + { + byte[] value = json.GetBytesFromBase64(); + Assert.True(false, "Expected GetBytesFromBase64 to throw InvalidOperationException due to mismatch token type."); + } + catch (InvalidOperationException) + { } + + try + { + json.TryGetBytesFromBase64(out byte[] value); + Assert.True(false, "Expected TryGetBytesFromBase64 to throw InvalidOperationException due to mismatch token type."); + } + catch (InvalidOperationException) + { } + try { DateTime value = json.GetDateTime(); @@ -813,6 +829,170 @@ public static void TestingGetStringInvalidUTF8(byte[] dataUtf8) } } + [Fact] + public static void GetBase64Unescapes() + { + string jsonString = "\"\\u0031234\""; // equivalent to "\"1234\"" + + byte[] dataUtf8 = Encoding.UTF8.GetBytes(jsonString); + + var json = new Utf8JsonReader(dataUtf8, isFinalBlock: true, state: default); + Assert.True(json.Read()); + + byte[] expected = Convert.FromBase64String("1234"); // new byte[3] { 215, 109, 248 } + + byte[] value = json.GetBytesFromBase64(); + Assert.Equal(expected, value); + Assert.True(json.TryGetBytesFromBase64(out value)); + Assert.Equal(expected, value); + } + + [Theory] + [InlineData("\"ABC=\"")] + [InlineData("\"AB+D\"")] + [InlineData("\"ABCD\"")] + [InlineData("\"ABC/\"")] + [InlineData("\"++++\"")] + [InlineData(null)] // Large randomly generated string + public static void ValidBase64(string jsonString) + { + if (jsonString == null) + { + var random = new Random(42); + var charArray = new char[502]; + charArray[0] = '"'; + for (int i = 1; i < charArray.Length; i++) + { + charArray[i] = (char)random.Next('A', 'Z'); // ASCII values (between 65 and 90) that constitute valid base 64 string. + } + charArray[charArray.Length - 1] = '"'; + jsonString = new string(charArray); + } + + byte[] dataUtf8 = Encoding.UTF8.GetBytes(jsonString); + + var json = new Utf8JsonReader(dataUtf8, isFinalBlock: true, state: default); + Assert.True(json.Read()); + + byte[] expected = Convert.FromBase64String(jsonString.AsSpan(1, jsonString.Length - 2).ToString()); + + byte[] value = json.GetBytesFromBase64(); + Assert.Equal(expected, value); + Assert.True(json.TryGetBytesFromBase64(out value)); + Assert.Equal(expected, value); + } + + [Theory] + [InlineData("\"ABC===\"")] + [InlineData("\"ABC\"")] + [InlineData("\"ABC!\"")] + [InlineData(null)] // Large randomly generated string + public static void InvalidBase64(string jsonString) + { + if (jsonString == null) + { + var random = new Random(42); + var charArray = new char[500]; + charArray[0] = '"'; + for (int i = 1; i < charArray.Length; i++) + { + charArray[i] = (char)random.Next('?', '\\'); // ASCII values (between 63 and 91) that don't need to be escaped. + } + + charArray[256] = '\\'; + charArray[257] = '"'; + charArray[charArray.Length - 1] = '"'; + jsonString = new string(charArray); + } + + byte[] dataUtf8 = Encoding.UTF8.GetBytes(jsonString); + + var json = new Utf8JsonReader(dataUtf8, isFinalBlock: true, state: default); + Assert.True(json.Read()); + Assert.False(json.TryGetBytesFromBase64(out byte[] value)); + Assert.Null(value); + + try + { + byte[] val = json.GetBytesFromBase64(); + Assert.True(false, "Expected InvalidOperationException when trying to decode base 64 string for invalid UTF-16 JSON text."); + } + catch (FormatException) { } + } + + [Theory] + [InlineData("\"a\\uDD1E\"")] + [InlineData("\"a\\uDD1Eb\"")] + [InlineData("\"a\\uD834\"")] + [InlineData("\"a\\uD834\\u0030\"")] + [InlineData("\"a\\uD834\\uD834\"")] + [InlineData("\"a\\uD834b\"")] + [InlineData("\"a\\uDD1E\\uD834b\"")] + [InlineData("\"a\\\\uD834\\uDD1Eb\"")] + [InlineData("\"a\\uDD1E\\\\uD834b\"")] + public static void TestingGetBase64InvalidUTF16(string jsonString) + { + byte[] dataUtf8 = Encoding.UTF8.GetBytes(jsonString); + + foreach (JsonCommentHandling commentHandling in Enum.GetValues(typeof(JsonCommentHandling))) + { + var state = new JsonReaderState(options: new JsonReaderOptions { CommentHandling = commentHandling }); + var json = new Utf8JsonReader(dataUtf8, isFinalBlock: true, state); + + Assert.True(json.Read()); + Assert.Equal(JsonTokenType.String, json.TokenType); + try + { + byte[] val = json.GetBytesFromBase64(); + Assert.True(false, "Expected InvalidOperationException when trying to decode base 64 string for invalid UTF-16 JSON text."); + } + catch (InvalidOperationException) { } + + try + { + json.TryGetBytesFromBase64(out byte[] val); + Assert.True(false, "Expected InvalidOperationException when trying to decode base 64 string for invalid UTF-16 JSON text."); + } + catch (InvalidOperationException) { } + } + } + + [Theory] + [MemberData(nameof(InvalidUTF8Strings))] + public static void TestingGetBase64InvalidUTF8(byte[] dataUtf8) + { + foreach (JsonCommentHandling commentHandling in Enum.GetValues(typeof(JsonCommentHandling))) + { + var state = new JsonReaderState(options: new JsonReaderOptions { CommentHandling = commentHandling }); + var json = new Utf8JsonReader(dataUtf8, isFinalBlock: true, state); + + // It is expected that the Utf8JsonReader won't throw an exception here + Assert.True(json.Read()); + Assert.Equal(JsonTokenType.String, json.TokenType); + + while (json.Read()) + ; + + json = new Utf8JsonReader(dataUtf8, isFinalBlock: true, state); + + while (json.Read()) + { + if (json.TokenType == JsonTokenType.String) + { + try + { + byte[] val = json.GetBytesFromBase64(); + Assert.True(false, "Expected InvalidOperationException when trying to decode base 64 string for invalid UTF-8 JSON text."); + } + catch (FormatException) { } + + Assert.False(json.TryGetBytesFromBase64(out byte[] value)); + Assert.Null(value); + } + } + } + } + [Theory] [MemberData(nameof(GetCommentTestData))] public static void TestingGetComment(string jsonData, string expected) diff --git a/src/System.Text.Json/tests/Utf8JsonWriterTests.cs b/src/System.Text.Json/tests/Utf8JsonWriterTests.cs index 2d1e30f7afb5..9a046b3c6af5 100644 --- a/src/System.Text.Json/tests/Utf8JsonWriterTests.cs +++ b/src/System.Text.Json/tests/Utf8JsonWriterTests.cs @@ -1408,6 +1408,50 @@ public void WritingTooLargeProperty(bool formatted, bool skipValidation) Assert.Throws(() => jsonUtf8.WriteStartArray(key)); } + [ConditionalTheory(nameof(IsX64))] + [OuterLoop] + [InlineData(true, true)] + [InlineData(true, false)] + [InlineData(false, true)] + [InlineData(false, false)] + public void WritingTooLargeBase64Bytes(bool formatted, bool skipValidation) + { + byte[] value; + + try + { + value = new byte[200_000_000]; + } + catch (OutOfMemoryException) + { + return; + } + + value.AsSpan().Fill(255); + + var options = new JsonWriterOptions { Indented = formatted, SkipValidation = skipValidation }; + var output = new ArrayBufferWriter(1024); + + var jsonUtf8 = new Utf8JsonWriter(output, options); + Assert.Throws(() => jsonUtf8.WriteBase64StringValue(value)); + + jsonUtf8 = new Utf8JsonWriter(output, options); + jsonUtf8.WriteStartObject(); + Assert.Throws(() => jsonUtf8.WriteBase64String("foo", value)); + + jsonUtf8 = new Utf8JsonWriter(output, options); + jsonUtf8.WriteStartObject(); + Assert.Throws(() => jsonUtf8.WriteBase64String(Encoding.UTF8.GetBytes("foo"), value)); + + jsonUtf8 = new Utf8JsonWriter(output, options); + jsonUtf8.WriteStartObject(); + Assert.Throws(() => jsonUtf8.WriteBase64String("foo".AsSpan(), value)); + + jsonUtf8 = new Utf8JsonWriter(output, options); + jsonUtf8.WriteStartObject(); + Assert.Throws(() => jsonUtf8.WriteBase64String(JsonEncodedText.Encode("foo"), value)); + } + [Theory] [InlineData(true, true)] [InlineData(true, false)] @@ -1698,6 +1742,171 @@ public void WritePartialHelloWorld(bool formatted, bool skipValidation) Assert.Equal(0, jsonUtf8.BytesPending); } + [Theory] + [InlineData(true, true)] + [InlineData(true, false)] + [InlineData(false, true)] + [InlineData(false, false)] + public void WriteBase64String(bool formatted, bool skipValidation) + { + string propertyName = "message"; + byte[] value = { 1, 2, 3, 4, 5 }; + string expectedStr = GetBase64ExpectedString(prettyPrint: formatted, propertyName, value); + + JsonEncodedText encodedPropertyName = JsonEncodedText.Encode(propertyName); + + byte[] utf8PropertyName = Encoding.UTF8.GetBytes("message"); + + var options = new JsonWriterOptions { Indented = formatted, SkipValidation = skipValidation }; + + for (int i = 0; i < 4; i++) + { + var output = new ArrayBufferWriter(32); + var jsonUtf8 = new Utf8JsonWriter(output, options); + + jsonUtf8.WriteStartObject(); + + switch (i) + { + case 0: + jsonUtf8.WriteBase64String(propertyName, value); + jsonUtf8.WriteBase64String(propertyName, value); + break; + case 1: + jsonUtf8.WriteBase64String(propertyName.AsSpan(), value); + jsonUtf8.WriteBase64String(propertyName.AsSpan(), value); + break; + case 2: + jsonUtf8.WriteBase64String(utf8PropertyName, value); + jsonUtf8.WriteBase64String(utf8PropertyName, value); + break; + case 3: + jsonUtf8.WriteBase64String(encodedPropertyName, value); + jsonUtf8.WriteBase64String(encodedPropertyName, value); + break; + } + + jsonUtf8.WriteEndObject(); + jsonUtf8.Flush(); + + AssertContents(expectedStr, output); + } + } + + [Theory] + [InlineData(true, true)] + [InlineData(true, false)] + [InlineData(false, true)] + [InlineData(false, false)] + public void WriteBase64StringEscaped(bool formatted, bool skipValidation) + { + string propertyName = "mess> propertyNameSpan = propertyName.AsSpan(); + ReadOnlySpan propertyNameSpanUtf8 = Encoding.UTF8.GetBytes(propertyName); + JsonEncodedText encodedPropertyName = JsonEncodedText.Encode(propertyName); + + for (int i = 0; i < 4; i++) + { + var output = new ArrayBufferWriter(32); + var jsonUtf8 = new Utf8JsonWriter(output, options); + + jsonUtf8.WriteStartObject(); + + switch (i) + { + case 0: + jsonUtf8.WriteBase64String(propertyName, value); + jsonUtf8.WriteBase64String(propertyName, value); + break; + case 1: + jsonUtf8.WriteBase64String(propertyNameSpan, value); + jsonUtf8.WriteBase64String(propertyNameSpan, value); + break; + case 2: + jsonUtf8.WriteBase64String(propertyNameSpanUtf8, value); + jsonUtf8.WriteBase64String(propertyNameSpanUtf8, value); + break; + case 3: + jsonUtf8.WriteBase64String(encodedPropertyName, value); + jsonUtf8.WriteBase64String(encodedPropertyName, value); + break; + } + + jsonUtf8.WriteEndObject(); + jsonUtf8.Flush(); + + AssertContents(expectedStr, output); + } + + // Verify that escaping does not change the input strings/spans. + Assert.Equal("mess>(10); + var jsonUtf8 = new Utf8JsonWriter(output, options); + + jsonUtf8.WriteStartObject(); + + Assert.Equal(0, jsonUtf8.BytesCommitted); + Assert.Equal(1, jsonUtf8.BytesPending); + + jsonUtf8.WriteBase64String("message", new byte[] { 201, 153, 199 }); + + Assert.Equal(0, jsonUtf8.BytesCommitted); + if (formatted) + Assert.Equal(17 + 2 + Environment.NewLine.Length + 1, jsonUtf8.BytesPending); // new lines, indentation, white space + else + Assert.Equal(17, jsonUtf8.BytesPending); + + jsonUtf8.Flush(); + + if (formatted) + Assert.Equal(17 + 2 + Environment.NewLine.Length + 1, jsonUtf8.BytesCommitted); // new lines, indentation, white space + else + Assert.Equal(17, jsonUtf8.BytesCommitted); + + Assert.Equal(0, jsonUtf8.BytesPending); + + jsonUtf8.WriteBase64String("message", new byte[] { 201, 153, 199 }); + jsonUtf8.WriteEndObject(); + + if (formatted) + Assert.Equal(17 + 2 + Environment.NewLine.Length + 1, jsonUtf8.BytesCommitted); + else + Assert.Equal(17, jsonUtf8.BytesCommitted); + + if (formatted) + Assert.Equal(18 + 2 + (2 * Environment.NewLine.Length) + 1, jsonUtf8.BytesPending); // new lines, indentation, white space + else + Assert.Equal(18, jsonUtf8.BytesPending); + + jsonUtf8.Flush(); + + if (formatted) + Assert.Equal(35 + (2 * 2) + (3 * Environment.NewLine.Length) + (1 * 2), jsonUtf8.BytesCommitted); // new lines, indentation, white space + else + Assert.Equal(35, jsonUtf8.BytesCommitted); + + Assert.Equal(0, jsonUtf8.BytesPending); + } + [Theory] [InlineData(true, true)] [InlineData(true, false)] @@ -1731,6 +1940,111 @@ public void WriteInvalidPartialJson(bool formatted, bool skipValidation) } } + [Theory] + [InlineData(true, true)] + [InlineData(true, false)] + [InlineData(false, true)] + [InlineData(false, false)] + public void WriteInvalidBase64(bool formatted, bool skipValidation) + { + { + var options = new JsonWriterOptions { Indented = formatted, SkipValidation = skipValidation }; + var output = new ArrayBufferWriter(10); + using var jsonUtf8 = new Utf8JsonWriter(output, options); + + jsonUtf8.WriteStartObject(); + + Assert.Equal(0, jsonUtf8.BytesCommitted); + Assert.Equal(1, jsonUtf8.BytesPending); + + jsonUtf8.Flush(); + + Assert.Equal(1, jsonUtf8.BytesCommitted); + Assert.Equal(0, jsonUtf8.BytesPending); + + if (skipValidation) + { + jsonUtf8.WriteBase64StringValue(new byte[] { 1, 2 }); + jsonUtf8.WriteEndArray(); + } + else + { + Assert.Throws(() => jsonUtf8.WriteBase64StringValue(new byte[] { 1, 2 })); + Assert.Throws(() => jsonUtf8.WriteEndArray()); + } + } + { + var options = new JsonWriterOptions { Indented = formatted, SkipValidation = skipValidation }; + var output = new ArrayBufferWriter(10); + using var jsonUtf8 = new Utf8JsonWriter(output, options); + + jsonUtf8.WriteStartArray(); + + Assert.Equal(0, jsonUtf8.BytesCommitted); + Assert.Equal(1, jsonUtf8.BytesPending); + + jsonUtf8.Flush(); + + Assert.Equal(1, jsonUtf8.BytesCommitted); + Assert.Equal(0, jsonUtf8.BytesPending); + + if (skipValidation) + { + jsonUtf8.WriteBase64String("foo", new byte[] { 1, 2 }); + jsonUtf8.WriteEndObject(); + } + else + { + Assert.Throws(() => jsonUtf8.WriteBase64String("foo", new byte[] { 1, 2 })); + Assert.Throws(() => jsonUtf8.WriteEndObject()); + } + } + } + + [Fact] + public void WriteBase64Escapes() + { + var output = new ArrayBufferWriter(10); + using var jsonUtf8 = new Utf8JsonWriter(output); + + var bytes = new byte[3] { 0xFB, 0xEF, 0xBE }; + jsonUtf8.WriteBase64StringValue(bytes); + + jsonUtf8.Flush(); + + AssertContents("\"\\u002b\\u002b\\u002b\\u002b\"", output); + } + + [Fact] + public void WriteBase64EscapesLarge() + { + var output = new ArrayBufferWriter(10); + using var jsonUtf8 = new Utf8JsonWriter(output); + + var bytes = new byte[200]; + + bytes.AsSpan().Fill(100); + bytes[4] = 0xFB; + bytes[5] = 0xEF; + bytes[6] = 0xBE; + bytes[15] = 0; + bytes[16] = 0x10; + bytes[17] = 0xBF; + + jsonUtf8.WriteBase64StringValue(bytes); + + jsonUtf8.Flush(); + + var builder = new StringBuilder(); + builder.Append("\"ZGRkZPvvvmRkZGRkZGRkABC\\u002f"); + for (int i = 0; i < 60; i++) + { + builder.Append("ZGRk"); + } + builder.Append("ZGQ=\""); + AssertContents(builder.ToString(), output); + } + [Theory] [InlineData(true, true)] [InlineData(true, false)] @@ -2083,7 +2397,7 @@ public void EscapeAsciiCharacters(bool formatted, bool skipValidation) { var propertyArray = new char[128]; - char[] specialCases = { '+', '`', (char)0x7F }; + char[] specialCases = { '+', '`', (char)0x7F, '/' }; for (int i = 0; i < propertyArray.Length; i++) { if (Array.IndexOf(specialCases, (char)i) != -1) @@ -3939,6 +4253,29 @@ private static string GetHelloWorldExpectedString(bool prettyPrint, string prope return Encoding.UTF8.GetString(ms.ToArray()); } + private static string GetBase64ExpectedString(bool prettyPrint, string propertyName, byte[] value) + { + var ms = new MemoryStream(); + TextWriter streamWriter = new StreamWriter(ms, new UTF8Encoding(false), 1024, true); + + var json = new JsonTextWriter(streamWriter) + { + Formatting = prettyPrint ? Formatting.Indented : Formatting.None, + StringEscapeHandling = StringEscapeHandling.EscapeHtml + }; + + json.WriteStartObject(); + json.WritePropertyName(propertyName); + json.WriteValue(value); + json.WritePropertyName(propertyName); + json.WriteValue(value); + json.WriteEnd(); + + json.Flush(); + + return Encoding.UTF8.GetString(ms.ToArray()); + } + private static string GetCommentExpectedString(bool prettyPrint, string comment) { var ms = new MemoryStream(); From 0d09364875814e037304dc783516600498ca553b Mon Sep 17 00:00:00 2001 From: dotnet-maestro-bot Date: Fri, 31 May 2019 06:13:21 -0700 Subject: [PATCH 585/607] Update ProjectNTfs to beta-27731-00 (#38089) --- eng/dependencies.props | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/dependencies.props b/eng/dependencies.props index 9b10f6fe115f..f75204a0a99f 100644 --- a/eng/dependencies.props +++ b/eng/dependencies.props @@ -9,12 +9,12 @@ These ref versions are pulled from https://github.com/dotnet/versions. --> - b8dbc7ec61eb189d3da9dbb643b59572dd501604 + 9fc9c2df2bf2681e69651664461887c759d0e1e5 - beta-27730-00 + beta-27731-00 From 655be420da4094ffed95ffa661a37225a3d7c6c9 Mon Sep 17 00:00:00 2001 From: Anirudh Agnihotry Date: Fri, 31 May 2019 08:17:45 -0700 Subject: [PATCH 586/607] using double to avoild multplication overflow (#38079) --- src/Native/Unix/System.Native/pal_time.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Native/Unix/System.Native/pal_time.c b/src/Native/Unix/System.Native/pal_time.c index 1b126678fe7c..1a7c862749d1 100644 --- a/src/Native/Unix/System.Native/pal_time.c +++ b/src/Native/Unix/System.Native/pal_time.c @@ -169,7 +169,7 @@ int32_t SystemNative_GetCpuUtilization(ProcessCpuInformation* previousCpuInfo) uint64_t resolution = SystemNative_GetTimestampResolution(); uint64_t timestamp = SystemNative_GetTimestamp(); - uint64_t currentTime = timestamp * SecondsToNanoSeconds / resolution; + uint64_t currentTime = (uint64_t)(timestamp * ((double)SecondsToNanoSeconds / resolution)); uint64_t lastRecordedCurrentTime = previousCpuInfo->lastRecordedCurrentTime; uint64_t lastRecordedKernelTime = previousCpuInfo->lastRecordedKernelTime; From 24e256f364e4a2133b03dbe9b0a3ee0069eb77b9 Mon Sep 17 00:00:00 2001 From: Stephen Toub Date: Fri, 31 May 2019 11:27:03 -0400 Subject: [PATCH 587/607] Disable ObjectTests.Write test (#38101) --- src/System.Text.Json/tests/Serialization/Object.WriteTests.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/System.Text.Json/tests/Serialization/Object.WriteTests.cs b/src/System.Text.Json/tests/Serialization/Object.WriteTests.cs index 1306d895a5ed..eccdf894e50b 100644 --- a/src/System.Text.Json/tests/Serialization/Object.WriteTests.cs +++ b/src/System.Text.Json/tests/Serialization/Object.WriteTests.cs @@ -15,6 +15,7 @@ public static void VerifyTypeFail() Assert.Throws(() => JsonSerializer.ToString(1, typeof(string))); } + [ActiveIssue(38092)] [Theory] [MemberData(nameof(WriteSuccessCases))] public static void Write(ITestClass testObj) From b07bb37245e66c9e350f2afe4b32a4a8f0c24589 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Fri, 31 May 2019 11:34:43 -0400 Subject: [PATCH 588/607] Update dependencies from https://github.com/dotnet/arcade build 20190530.2 (#38095) - Microsoft.DotNet.XUnitExtensions - 2.4.1-beta.19280.2 - Microsoft.DotNet.XUnitConsoleRunner - 2.5.1-beta.19280.2 - Microsoft.DotNet.VersionTools.Tasks - 1.0.0-beta.19280.2 - Microsoft.DotNet.ApiCompat - 1.0.0-beta.19280.2 - Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19280.2 - Microsoft.DotNet.Build.Tasks.Configuration - 1.0.0-beta.19280.2 - Microsoft.DotNet.Build.Tasks.Feed - 2.2.0-beta.19280.2 - Microsoft.DotNet.Build.Tasks.Packaging - 1.0.0-beta.19280.2 - Microsoft.DotNet.CodeAnalysis - 1.0.0-beta.19280.2 - Microsoft.DotNet.CoreFxTesting - 1.0.0-beta.19280.2 - Microsoft.DotNet.GenAPI - 1.0.0-beta.19280.2 - Microsoft.DotNet.Helix.Sdk - 2.0.0-beta.19280.2 - Microsoft.DotNet.RemoteExecutor - 1.0.0-beta.19280.2 - Microsoft.DotNet.GenFacades - 1.0.0-beta.19280.2 --- eng/Version.Details.xml | 56 +++++----- eng/Versions.props | 24 ++-- eng/common/LoggingCommandFunctions.ps1 | 146 +++++++++++++++++++++++++ eng/common/build.ps1 | 3 +- eng/common/tools.ps1 | 103 +++++++++++++---- global.json | 4 +- 6 files changed, 270 insertions(+), 66 deletions(-) create mode 100644 eng/common/LoggingCommandFunctions.ps1 diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 781ab610399e..a8e742702cc2 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -34,65 +34,65 @@ https://github.com/dotnet/corefx e23119d577e644d2c2a25419c88c1181681358e0 - + https://github.com/dotnet/arcade - fb62c6377a6bd163af2a7516260f064498942585 + 7c50d548001a83a18449ad4dda370122ede5fbf6 https://github.com/dotnet/standard 2c94a70248b2c4379ceffbade085f8d7eca4fee0 - + https://github.com/dotnet/arcade - fb62c6377a6bd163af2a7516260f064498942585 + 7c50d548001a83a18449ad4dda370122ede5fbf6 - + https://github.com/dotnet/arcade - fb62c6377a6bd163af2a7516260f064498942585 + 7c50d548001a83a18449ad4dda370122ede5fbf6 - + https://github.com/dotnet/arcade - fb62c6377a6bd163af2a7516260f064498942585 + 7c50d548001a83a18449ad4dda370122ede5fbf6 - + https://github.com/dotnet/arcade - fb62c6377a6bd163af2a7516260f064498942585 + 7c50d548001a83a18449ad4dda370122ede5fbf6 - + https://github.com/dotnet/arcade - fb62c6377a6bd163af2a7516260f064498942585 + 7c50d548001a83a18449ad4dda370122ede5fbf6 - + https://github.com/dotnet/arcade - fb62c6377a6bd163af2a7516260f064498942585 + 7c50d548001a83a18449ad4dda370122ede5fbf6 - + https://github.com/dotnet/arcade - fb62c6377a6bd163af2a7516260f064498942585 + 7c50d548001a83a18449ad4dda370122ede5fbf6 - + https://github.com/dotnet/arcade - fb62c6377a6bd163af2a7516260f064498942585 + 7c50d548001a83a18449ad4dda370122ede5fbf6 - + https://github.com/dotnet/arcade - fb62c6377a6bd163af2a7516260f064498942585 + 7c50d548001a83a18449ad4dda370122ede5fbf6 - + https://github.com/dotnet/arcade - fb62c6377a6bd163af2a7516260f064498942585 + 7c50d548001a83a18449ad4dda370122ede5fbf6 - + https://github.com/dotnet/arcade - fb62c6377a6bd163af2a7516260f064498942585 + 7c50d548001a83a18449ad4dda370122ede5fbf6 - + https://github.com/dotnet/arcade - fb62c6377a6bd163af2a7516260f064498942585 + 7c50d548001a83a18449ad4dda370122ede5fbf6 - + https://github.com/dotnet/arcade - fb62c6377a6bd163af2a7516260f064498942585 + 7c50d548001a83a18449ad4dda370122ede5fbf6 https://dev.azure.com/dnceng/internal/_git/dotnet-optimization diff --git a/eng/Versions.props b/eng/Versions.props index 72ee1ed3b4be..65a8062db8e1 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -23,18 +23,18 @@ - 1.0.0-beta.19279.5 - 1.0.0-beta.19279.5 - 1.0.0-beta.19279.5 - 1.0.0-beta.19279.5 - 2.4.1-beta.19279.5 - 2.5.1-beta.19279.5 - 1.0.0-beta.19279.5 - 1.0.0-beta.19279.5 - 1.0.0-beta.19279.5 - 1.0.0-beta.19279.5 - 2.2.0-beta.19279.5 - 1.0.0-beta.19279.5 + 1.0.0-beta.19280.2 + 1.0.0-beta.19280.2 + 1.0.0-beta.19280.2 + 1.0.0-beta.19280.2 + 2.4.1-beta.19280.2 + 2.5.1-beta.19280.2 + 1.0.0-beta.19280.2 + 1.0.0-beta.19280.2 + 1.0.0-beta.19280.2 + 1.0.0-beta.19280.2 + 2.2.0-beta.19280.2 + 1.0.0-beta.19280.2 3.0.0-preview6-27729-07 3.0.0-preview6-27729-07 diff --git a/eng/common/LoggingCommandFunctions.ps1 b/eng/common/LoggingCommandFunctions.ps1 new file mode 100644 index 000000000000..c225eaecbf25 --- /dev/null +++ b/eng/common/LoggingCommandFunctions.ps1 @@ -0,0 +1,146 @@ +# Source for this file was taken from https://github.com/microsoft/azure-pipelines-task-lib/blob/11c9439d4af17e6475d9fe058e6b2e03914d17e6/powershell/VstsTaskSdk/LoggingCommandFunctions.ps1 + +# NOTE: You should not be calling these method directly as they are likely to change. Instead you should be calling the Write-Pipeline* functions defined in tools.ps1 + +$script:loggingCommandPrefix = '##vso[' +$script:loggingCommandEscapeMappings = @( # TODO: WHAT ABOUT "="? WHAT ABOUT "%"? + New-Object psobject -Property @{ Token = ';' ; Replacement = '%3B' } + New-Object psobject -Property @{ Token = "`r" ; Replacement = '%0D' } + New-Object psobject -Property @{ Token = "`n" ; Replacement = '%0A' } + New-Object psobject -Property @{ Token = "]" ; Replacement = '%5D' } +) +# TODO: BUG: Escape % ??? +# TODO: Add test to verify don't need to escape "=". + +<######################################## +# Private functions. +########################################> +function Format-LoggingCommandData { + [CmdletBinding()] + param([string]$Value, [switch]$Reverse) + + if (!$Value) { + return '' + } + + if (!$Reverse) { + foreach ($mapping in $script:loggingCommandEscapeMappings) { + $Value = $Value.Replace($mapping.Token, $mapping.Replacement) + } + } else { + for ($i = $script:loggingCommandEscapeMappings.Length - 1 ; $i -ge 0 ; $i--) { + $mapping = $script:loggingCommandEscapeMappings[$i] + $Value = $Value.Replace($mapping.Replacement, $mapping.Token) + } + } + + return $Value +} + +function Format-LoggingCommand { + [CmdletBinding()] + param( + [Parameter(Mandatory = $true)] + [string]$Area, + [Parameter(Mandatory = $true)] + [string]$Event, + [string]$Data, + [hashtable]$Properties) + + # Append the preamble. + [System.Text.StringBuilder]$sb = New-Object -TypeName System.Text.StringBuilder + $null = $sb.Append($script:loggingCommandPrefix).Append($Area).Append('.').Append($Event) + + # Append the properties. + if ($Properties) { + $first = $true + foreach ($key in $Properties.Keys) { + [string]$value = Format-LoggingCommandData $Properties[$key] + if ($value) { + if ($first) { + $null = $sb.Append(' ') + $first = $false + } else { + $null = $sb.Append(';') + } + + $null = $sb.Append("$key=$value") + } + } + } + + # Append the tail and output the value. + $Data = Format-LoggingCommandData $Data + $sb.Append(']').Append($Data).ToString() +} + +function Write-LoggingCommand { + [CmdletBinding(DefaultParameterSetName = 'Parameters')] + param( + [Parameter(Mandatory = $true, ParameterSetName = 'Parameters')] + [string]$Area, + [Parameter(Mandatory = $true, ParameterSetName = 'Parameters')] + [string]$Event, + [Parameter(ParameterSetName = 'Parameters')] + [string]$Data, + [Parameter(ParameterSetName = 'Parameters')] + [hashtable]$Properties, + [Parameter(Mandatory = $true, ParameterSetName = 'Object')] + $Command, + [switch]$AsOutput) + + if ($PSCmdlet.ParameterSetName -eq 'Object') { + Write-LoggingCommand -Area $Command.Area -Event $Command.Event -Data $Command.Data -Properties $Command.Properties -AsOutput:$AsOutput + return + } + + $command = Format-LoggingCommand -Area $Area -Event $Event -Data $Data -Properties $Properties + if ($AsOutput) { + $command + } else { + Write-Host $command + } +} + +function Write-LogIssue { + [CmdletBinding()] + param( + [ValidateSet('warning', 'error')] + [Parameter(Mandatory = $true)] + [string]$Type, + [string]$Message, + [string]$ErrCode, + [string]$SourcePath, + [string]$LineNumber, + [string]$ColumnNumber, + [switch]$AsOutput) + + $command = Format-LoggingCommand -Area 'task' -Event 'logissue' -Data $Message -Properties @{ + 'type' = $Type + 'code' = $ErrCode + 'sourcepath' = $SourcePath + 'linenumber' = $LineNumber + 'columnnumber' = $ColumnNumber + } + if ($AsOutput) { + return $command + } + + if ($Type -eq 'error') { + $foregroundColor = $host.PrivateData.ErrorForegroundColor + $backgroundColor = $host.PrivateData.ErrorBackgroundColor + if ($foregroundColor -isnot [System.ConsoleColor] -or $backgroundColor -isnot [System.ConsoleColor]) { + $foregroundColor = [System.ConsoleColor]::Red + $backgroundColor = [System.ConsoleColor]::Black + } + } else { + $foregroundColor = $host.PrivateData.WarningForegroundColor + $backgroundColor = $host.PrivateData.WarningBackgroundColor + if ($foregroundColor -isnot [System.ConsoleColor] -or $backgroundColor -isnot [System.ConsoleColor]) { + $foregroundColor = [System.ConsoleColor]::Yellow + $backgroundColor = [System.ConsoleColor]::Black + } + } + + Write-Host $command -ForegroundColor $foregroundColor -BackgroundColor $backgroundColor +} \ No newline at end of file diff --git a/eng/common/build.ps1 b/eng/common/build.ps1 index 67046a43f8c4..4cb2ce489b6c 100644 --- a/eng/common/build.ps1 +++ b/eng/common/build.ps1 @@ -133,9 +133,8 @@ try { Build } catch { - Write-Host $_ - Write-Host $_.Exception Write-Host $_.ScriptStackTrace + Write-PipelineTaskError -Message $_ ExitWithExitCode 1 } diff --git a/eng/common/tools.ps1 b/eng/common/tools.ps1 index 9cea610a27f5..3983d719be3f 100644 --- a/eng/common/tools.ps1 +++ b/eng/common/tools.ps1 @@ -92,6 +92,68 @@ function Exec-Process([string]$command, [string]$commandArgs) { } } +function Write-PipelineTaskError { + [CmdletBinding()] + param( + [Parameter(Mandatory = $true)] + [string]$Message, + [Parameter(Mandatory = $false)] + [string]$Type = 'error', + [string]$ErrCode, + [string]$SourcePath, + [string]$LineNumber, + [string]$ColumnNumber, + [switch]$AsOutput) + + if(!$ci) { + if($Type -eq 'error') { + Write-Error $Message + return + } + elseif ($Type -eq 'warning') { + Write-Warning $Message + return + } + } + + if(($Type -ne 'error') -and ($Type -ne 'warning')) { + Write-Host $Message + return + } + if(-not $PSBoundParameters.ContainsKey('Type')) { + $PSBoundParameters.Add('Type', 'error') + } + Write-LogIssue @PSBoundParameters +} + +function Write-PipelineSetVariable { + [CmdletBinding()] + param( + [Parameter(Mandatory = $true)] + [string]$Name, + [string]$Value, + [switch]$Secret, + [switch]$AsOutput) + + if($ci) { + Write-LoggingCommand -Area 'task' -Event 'setvariable' -Data $Value -Properties @{ + 'variable' = $Name + 'issecret' = $Secret + } -AsOutput:$AsOutput + } +} + +function Write-PipelinePrependPath { + [CmdletBinding()] + param( + [Parameter(Mandatory=$true)] + [string]$Path, + [switch]$AsOutput) + if($ci) { + Write-LoggingCommand -Area 'task' -Event 'prependpath' -Data $Path -AsOutput:$AsOutput + } +} + function InitializeDotNetCli([bool]$install) { if (Test-Path variable:global:_DotNetInstallDir) { return $global:_DotNetInstallDir @@ -134,7 +196,7 @@ function InitializeDotNetCli([bool]$install) { if ($install) { InstallDotNetSdk $dotnetRoot $dotnetSdkVersion } else { - Write-Host "Unable to find dotnet with SDK version '$dotnetSdkVersion'" -ForegroundColor Red + Write-PipelineTaskError "Unable to find dotnet with SDK version '$dotnetSdkVersion'" ExitWithExitCode 1 } } @@ -147,12 +209,10 @@ function InitializeDotNetCli([bool]$install) { # It also ensures that VS msbuild will use the downloaded sdk targets. $env:PATH = "$dotnetRoot;$env:PATH" - if ($ci) { - # Make Sure that our bootstrapped dotnet cli is avaliable in future steps of the Azure Pipelines build - Write-Host "##vso[task.prependpath]$dotnetRoot" - Write-Host "##vso[task.setvariable variable=DOTNET_MULTILEVEL_LOOKUP]0" - Write-Host "##vso[task.setvariable variable=DOTNET_SKIP_FIRST_TIME_EXPERIENCE]1" - } + # Make Sure that our bootstrapped dotnet cli is avaliable in future steps of the Azure Pipelines build + Write-PipelinePrependPath -Path $dotnetRoot + Write-PipelineSetVariable -Name 'DOTNET_MULTILEVEL_LOOKUP' -Value '0' + Write-PipelineSetVariable -Name 'DOTNET_SKIP_FIRST_TIME_EXPERIENCE' -Value '1' return $global:_DotNetInstallDir = $dotnetRoot } @@ -184,7 +244,7 @@ function InstallDotNet([string] $dotnetRoot, [string] $version, [string] $archit & $installScript @installParameters if ($lastExitCode -ne 0) { - Write-Host "Failed to install dotnet cli (exit code '$lastExitCode')." -ForegroundColor Red + Write-PipelineTaskError -Message "Failed to install dotnet cli (exit code '$lastExitCode')." ExitWithExitCode $lastExitCode } } @@ -358,7 +418,7 @@ function InitializeBuildTool() { if ($msbuildEngine -eq "dotnet") { if (!$dotnetRoot) { - Write-Host "/global.json must specify 'tools.dotnet'." -ForegroundColor Red + Write-PipelineTaskError "/global.json must specify 'tools.dotnet'." ExitWithExitCode 1 } @@ -367,13 +427,13 @@ function InitializeBuildTool() { try { $msbuildPath = InitializeVisualStudioMSBuild -install:$restore } catch { - Write-Host $_ -ForegroundColor Red + Write-PipelineTaskError $_ ExitWithExitCode 1 } $buildTool = @{ Path = $msbuildPath; Command = ""; Tool = "vs"; Framework = "net472" } } else { - Write-Host "Unexpected value of -msbuildEngine: '$msbuildEngine'." -ForegroundColor Red + Write-PipelineTaskError "Unexpected value of -msbuildEngine: '$msbuildEngine'." ExitWithExitCode 1 } @@ -390,7 +450,7 @@ function GetDefaultMSBuildEngine() { return "dotnet" } - Write-Host "-msbuildEngine must be specified, or /global.json must specify 'tools.dotnet' or 'tools.vs'." -ForegroundColor Red + Write-PipelineTaskError "-msbuildEngine must be specified, or /global.json must specify 'tools.dotnet' or 'tools.vs'." ExitWithExitCode 1 } @@ -441,7 +501,7 @@ function InitializeToolset() { } if (-not $restore) { - Write-Host "Toolset version $toolsetVersion has not been restored." -ForegroundColor Red + Write-PipelineTaskError "Toolset version $toolsetVersion has not been restored." ExitWithExitCode 1 } @@ -526,7 +586,7 @@ function MSBuild-Core() { $exitCode = Exec-Process $buildTool.Path $cmdArgs if ($exitCode -ne 0) { - Write-Host "Build failed." -ForegroundColor Red + Write-PipelineTaskError "Build failed." $buildLog = GetMSBuildBinaryLogCommandLineArgument $args if ($buildLog -ne $null) { @@ -554,6 +614,8 @@ function GetMSBuildBinaryLogCommandLineArgument($arguments) { return $null } +. $PSScriptRoot\LoggingCommandFunctions.ps1 + $RepoRoot = Resolve-Path (Join-Path $PSScriptRoot "..\..") $EngRoot = Resolve-Path (Join-Path $PSScriptRoot "..") $ArtifactsDir = Join-Path $RepoRoot "artifacts" @@ -569,11 +631,8 @@ Create-Directory $ToolsetDir Create-Directory $TempDir Create-Directory $LogDir -if ($ci) { - Write-Host "##vso[task.setvariable variable=Artifacts]$ArtifactsDir" - Write-Host "##vso[task.setvariable variable=Artifacts.Toolset]$ToolsetDir" - Write-Host "##vso[task.setvariable variable=Artifacts.Log]$LogDir" - - $env:TEMP = $TempDir - $env:TMP = $TempDir -} +Write-PipelineSetVariable -Name 'Artifacts' -Value $ArtifactsDir +Write-PipelineSetVariable -Name 'Artifacts.Toolset' -Value $ToolsetDir +Write-PipelineSetVariable -Name 'Artifacts.Log' -Value $LogDir +Write-PipelineSetVariable -Name 'TEMP' -Value $TempDir +Write-PipelineSetVariable -Name 'TMP' -Value $TempDir diff --git a/global.json b/global.json index a30fe7ce1126..c1bad46a19a3 100644 --- a/global.json +++ b/global.json @@ -3,8 +3,8 @@ "dotnet": "3.0.100-preview6-011681" }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19279.5", - "Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19279.5", + "Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19280.2", + "Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19280.2", "FIX-85B6-MERGE-9C38-CONFLICT": "1.0.0", "Microsoft.NET.Sdk.IL": "3.0.0-preview6.19279.4" } From 8b590bc41ebbb7f51f733f40e04e03e8619ca23a Mon Sep 17 00:00:00 2001 From: Maryam Ariyan Date: Fri, 31 May 2019 08:36:59 -0700 Subject: [PATCH 589/607] skip oledb for outerloop failures (#38090) --- src/System.Data.OleDb/tests/Helpers.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/System.Data.OleDb/tests/Helpers.cs b/src/System.Data.OleDb/tests/Helpers.cs index 2443967426e9..087f92abf5c5 100644 --- a/src/System.Data.OleDb/tests/Helpers.cs +++ b/src/System.Data.OleDb/tests/Helpers.cs @@ -34,7 +34,7 @@ static Nested() string providerName = PlatformDetection.Is32BitProcess ? @"Microsoft.Jet.OLEDB.4.0" : @"Microsoft.ACE.OLEDB.12.0"; - IsAvailable = providerNames.Contains(providerName); + IsAvailable = false; // ActiveIssue #37823 // providerNames.Contains(providerName); ProviderName = IsAvailable ? providerName : null; } } From 0f2fa63930a26fbb70fbb6601c6d23c9c263d08b Mon Sep 17 00:00:00 2001 From: William Godbe Date: Fri, 31 May 2019 09:33:19 -0700 Subject: [PATCH 590/607] Fix Loop in System.Private.Uri (#38076) * Fix Loop in System.Private.Uri * Mark variables in test project as private * Disable test on NetFx --- src/System.Private.Uri/src/System/Uri.cs | 28 +++++- src/System.Private.Uri/src/System/UriExt.cs | 27 +++++- .../tests/FunctionalTests/IriTest.cs | 86 +++++++++++++++++++ 3 files changed, 136 insertions(+), 5 deletions(-) diff --git a/src/System.Private.Uri/src/System/Uri.cs b/src/System.Private.Uri/src/System/Uri.cs index 5a470b0dca4b..9de08571d8e0 100644 --- a/src/System.Private.Uri/src/System/Uri.cs +++ b/src/System.Private.Uri/src/System/Uri.cs @@ -2538,7 +2538,7 @@ private unsafe void CreateHostString() } else { - for (ushort i = 0; i < host.Length; ++i) + for (int i = 0; i < host.Length; ++i) { if ((_info.Offset.Host + i) >= _info.Offset.End || host[i] != _string[_info.Offset.Host + i]) @@ -2655,7 +2655,7 @@ private unsafe void GetHostViaCustomSyntax() else { host = CreateHostStringHelper(host, 0, (ushort)host.Length, ref flags, ref _info.ScopeId); - for (ushort i = 0; i < host.Length; ++i) + for (int i = 0; i < host.Length; ++i) { if ((_info.Offset.Host + i) >= _info.Offset.End || host[i] != _string[_info.Offset.Host + i]) { @@ -3404,6 +3404,12 @@ private unsafe void ParseRemaining() throw e; } + if (_string.Length > ushort.MaxValue) + { + UriFormatException e = GetException(ParsingError.SizeLimit); + throw e; + } + length = (ushort)_string.Length; // We need to be sure that there isn't a '?' separated from the path by spaces. if (_string == _originalUnicodeString) @@ -3536,6 +3542,12 @@ private unsafe void ParseRemaining() throw e; } + if (_string.Length > ushort.MaxValue) + { + UriFormatException e = GetException(ParsingError.SizeLimit); + throw e; + } + length = (ushort)_string.Length; // We need to be sure that there isn't a '#' separated from the query by spaces. if (_string == _originalUnicodeString) @@ -3598,6 +3610,12 @@ private unsafe void ParseRemaining() throw e; } + if (_string.Length > ushort.MaxValue) + { + UriFormatException e = GetException(ParsingError.SizeLimit); + throw e; + } + length = (ushort)_string.Length; // we don't need to check _originalUnicodeString == _string because # is last part GetLengthWithoutTrailingSpaces(_string, ref length, idx); @@ -4093,6 +4111,12 @@ private unsafe ushort CheckAuthorityHelper(char* pString, ushort idx, ushort len // Normalize user info userInfoString = IriHelper.EscapeUnescapeIri(pString, startInput, start + 1, UriComponents.UserInfo); newHost += userInfoString; + + if (newHost.Length > ushort.MaxValue) + { + err = ParsingError.SizeLimit; + return idx; + } } else { diff --git a/src/System.Private.Uri/src/System/UriExt.cs b/src/System.Private.Uri/src/System/UriExt.cs index 6718b5726908..06c5b18fc2b8 100644 --- a/src/System.Private.Uri/src/System/UriExt.cs +++ b/src/System.Private.Uri/src/System/UriExt.cs @@ -120,8 +120,16 @@ private void InitializeUri(ParsingError err, UriKind uriKind, out UriFormatExcep if (_iriParsing && hasUnicode) { - // In this scenario we need to parse the whole string - EnsureParseRemaining(); + // In this scenario we need to parse the whole string + try + { + EnsureParseRemaining(); + } + catch (UriFormatException ex) + { + e = ex; + return; + } } } else @@ -163,7 +171,15 @@ private void InitializeUri(ParsingError err, UriKind uriKind, out UriFormatExcep if (_iriParsing && hasUnicode) { // In this scenario we need to parse the whole string - EnsureParseRemaining(); + try + { + EnsureParseRemaining(); + } + catch (UriFormatException ex) + { + e = ex; + return; + } } } // will return from here @@ -181,6 +197,11 @@ private void InitializeUri(ParsingError err, UriKind uriKind, out UriFormatExcep // Iri'ze and then normalize relative uris _string = EscapeUnescapeIri(_originalUnicodeString, 0, _originalUnicodeString.Length, (UriComponents)0); + if (_string.Length > ushort.MaxValue) + { + err = ParsingError.SizeLimit; + return; + } } } else diff --git a/src/System.Private.Uri/tests/FunctionalTests/IriTest.cs b/src/System.Private.Uri/tests/FunctionalTests/IriTest.cs index d0b6196dcc93..b4aeddf0ae65 100644 --- a/src/System.Private.Uri/tests/FunctionalTests/IriTest.cs +++ b/src/System.Private.Uri/tests/FunctionalTests/IriTest.cs @@ -592,5 +592,91 @@ public void Iri_AllForbiddenDecompositions_NonIdnPropertiesOk(string scheme, str Assert.Equal(host, uri.Authority); Assert.Equal(scheme + "://" + host + "/", uri.AbsoluteUri); } + + // The behavior here is slightly complicated in order to preserve compat in as many + // cases as possible. There are two limits imposed on the length of URI strings. + // The first, 65519, is specified in the documentation and is one of the first checks + // enforced on a URI. This limit is not enforced after expansion. + private static int InitialLengthLimit = 65519; + + // The second, 65535 (ushort.MaxValue) is only reachable via expansion as a result of + // percent encoding. Exceeding this value used to result in a hang, but now results in + // an exception. + private static int ExpandedLengthLimit = 65535; + + // In order to maximize compat, we have to allow a gap between the two maximum + // values. A URI that starts below 65519 but expands to be in the range [65519,65535) + // would have worked before this change, and so should continue to work despite + // exceeding limit (1). + public static IEnumerable Iri_ExpandingContents_TooLong + { + get + { + // Validate a URI with an initial length less than InitialLengthLimit, and an expanded + // length that is greater than ExpandedLengthLimit. + // The total of len + const parts (15) + expanded unicode (2 * 9) after expansion should be + // just larger than ExpandedLengthLimit. + int len = ExpandedLengthLimit - 15 - (2 * 9) + 1; + yield return new object[] { @"test://" + new string('a', len) + new string('\uD800', 2) + "@8.8.8.8" }; // Userinfo + yield return new object[] { @"test://8.8.8.8?" + new string('a', len) + new string('\uD800', 2) }; // Query + yield return new object[] { @"test://8.8.8.8#" + new string('a', len) + new string('\uD800', 2) }; // Fragment + yield return new object[] { @"test://8.8.8.8/" + new string('a', len) + new string('\uD800', 2) }; // Path + + // Generate a string whose total length is just less than InitialLengthLimit + // but whose content expands to be dramatically larger than ExpandedLengthLimit. + len = InitialLengthLimit - 15; + yield return new object[] { @"test://" + new string('\uD800', len) + "@8.8.8.8" }; // Userinfo + yield return new object[] { @"test://8.8.8.8?" + new string('\uD800', len) }; // Fragment + yield return new object[] { @"test://8.8.8.8#" + new string('\uD800', len) }; // Query + yield return new object[] { @"test://8.8.8.8/" + new string('\uD800', len) }; // Path + + // Test the minimum length URI that will cause an expansion beyond ExpandedLengthLimit. + len = (ExpandedLengthLimit - 15) / 9 + 1; + yield return new object[] { @"test://" + new string('\uD800', len) + "@8.8.8.8" }; // Userinfo + yield return new object[] { @"test://8.8.8.8?" + new string('\uD800', len) }; // Fragment + yield return new object[] { @"test://8.8.8.8#" + new string('\uD800', len) }; // Query + yield return new object[] { @"test://8.8.8.8/" + new string('\uD800', len) }; // Path + } + } + + [Theory] + [MemberData(nameof(Iri_ExpandingContents_TooLong))] + [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Disable until the .NET FX CI machines get the latest patches.")] + public static void Iri_ExpandingContents_ThrowsIfTooLong(string input) + { + Assert.Throws(() => { Uri itemUri = new Uri(input); }); + Assert.False(Uri.TryCreate(input, UriKind.Absolute, out Uri itemUri2)); + } + + public static IEnumerable Iri_ExpandingContents_AllowedSize + { + get + { + // Validate a URI with an initial length less than InitialLengthLimit, and an expanded + // length that is greater than InitialLengthLimit but less than ExpandedLengthLimit. + // The total of len + const parts (15) + expanded unicode (2 * 9) after expansion should be + // exactly the ExpandedLengthLimit. + int len = ExpandedLengthLimit - 15 - (2 * 9); + yield return new object[] { @"test://" + new string('a', len) + new string('\uD800', 2) + "@8.8.8.8" }; // Userinfo + yield return new object[] { @"test://8.8.8.8?" + new string('a', len) + new string('\uD800', 2) }; // Query + yield return new object[] { @"test://8.8.8.8#" + new string('a', len) + new string('\uD800', 2) }; // Fragment + yield return new object[] { @"test://8.8.8.8/" + new string('a', len) + new string('\uD800', 2) }; // Path + + // Validate the same behavior, but maximize the amount of expansion. + len = (ExpandedLengthLimit - 15) / 9; + yield return new object[] { @"test://" + new string('\uD800', len) + "@8.8.8.8" }; // Userinfo + yield return new object[] { @"test://8.8.8.8?" + new string('\uD800', len) }; // Fragment + yield return new object[] { @"test://8.8.8.8#" + new string('\uD800', len) }; // Query + yield return new object[] { @"test://8.8.8.8/" + new string('\uD800', len) }; // Path + } + } + + [Theory] + [MemberData(nameof(Iri_ExpandingContents_AllowedSize))] + public static void Iri_ExpandingContents_DoesNotThrowIfSizeAllowed(string input) + { + Uri itemUri = new Uri(input); + Assert.True(Uri.TryCreate(input, UriKind.Absolute, out Uri itemUri2)); + } } } From f8c382f76955e8da9f0cf314d5945a5af34d72b7 Mon Sep 17 00:00:00 2001 From: William Godbe Date: Fri, 31 May 2019 09:34:10 -0700 Subject: [PATCH 591/607] Fix IPv6Address parsing (#37734) * Fix IPv6Address parsing * Update src/System.Net.Primitives/src/System/Net/IPAddressParser.cs Co-Authored-By: Karel Zikmund * Use System.Diagnostics, Remove duplicate function, fix method header in Fake * Fix deletion of call to Parse() * Fix call to Parse() * Fix tests to account for NetFx runs * Fix Syntax --- .../System/Net/IPv6AddressHelper.Common.cs | 15 ++++++- .../src/System/Net/IPAddress.cs | 4 +- .../src/System/Net/IPAddressParser.cs | 10 ++--- .../tests/FunctionalTests/IPAddressParsing.cs | 22 ++++++++++ .../UnitTests/Fakes/IPv6AddressHelper.cs | 4 +- .../src/System/IPv6AddressHelper.cs | 42 ++++--------------- .../tests/FunctionalTests/UriIpHostTest.cs | 29 ++++++++++++- 7 files changed, 82 insertions(+), 44 deletions(-) diff --git a/src/Common/src/System/Net/IPv6AddressHelper.Common.cs b/src/Common/src/System/Net/IPv6AddressHelper.Common.cs index beb5e867eae5..03a90f805634 100644 --- a/src/Common/src/System/Net/IPv6AddressHelper.Common.cs +++ b/src/Common/src/System/Net/IPv6AddressHelper.Common.cs @@ -2,6 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System.Diagnostics; + namespace System { internal static partial class IPv6AddressHelper @@ -107,6 +109,17 @@ internal unsafe static bool IsValidStrict(char* name, int start, ref int end) { start++; needsClosingBracket = true; + + // IsValidStrict() is only called if there is a ':' in the name string, i.e. + // it is a possible IPv6 address. So, if the string starts with a '[' and + // the pointer is advanced here there are still more characters to parse. + Debug.Assert(start < end); + } + + // Starting with a colon character is only valid if another colon follows. + if (name[start] == ':' && (start + 1 >= end || name[start + 1] != ':')) + { + return false; } int i; @@ -278,7 +291,7 @@ internal unsafe static bool IsValidStrict(char* name, int start, ref int end) // Nothing // - internal static unsafe void Parse(ReadOnlySpan address, ushort* numbers, int start, ref string scopeId) + internal static void Parse(ReadOnlySpan address, Span numbers, int start, ref string scopeId) { int number = 0; int index = 0; diff --git a/src/System.Net.Primitives/src/System/Net/IPAddress.cs b/src/System.Net.Primitives/src/System/Net/IPAddress.cs index faa856f09697..083128ada8a1 100644 --- a/src/System.Net.Primitives/src/System/Net/IPAddress.cs +++ b/src/System.Net.Primitives/src/System/Net/IPAddress.cs @@ -146,10 +146,10 @@ public IPAddress(ReadOnlySpan address, long scopeid) PrivateScopeId = (uint)scopeid; } - internal unsafe IPAddress(ushort* numbers, int numbersLength, uint scopeid) + internal IPAddress(ReadOnlySpan numbers, uint scopeid) { Debug.Assert(numbers != null); - Debug.Assert(numbersLength == NumberOfLabels); + Debug.Assert(numbers.Length == NumberOfLabels); var arr = new ushort[NumberOfLabels]; for (int i = 0; i < arr.Length; i++) diff --git a/src/System.Net.Primitives/src/System/Net/IPAddressParser.cs b/src/System.Net.Primitives/src/System/Net/IPAddressParser.cs index fc8207856f32..eb94c3843833 100644 --- a/src/System.Net.Primitives/src/System/Net/IPAddressParser.cs +++ b/src/System.Net.Primitives/src/System/Net/IPAddressParser.cs @@ -14,17 +14,17 @@ internal class IPAddressParser { private const int MaxIPv4StringLength = 15; // 4 numbers separated by 3 periods, with up to 3 digits per number - internal static unsafe IPAddress Parse(ReadOnlySpan ipSpan, bool tryParse) + internal static IPAddress Parse(ReadOnlySpan ipSpan, bool tryParse) { if (ipSpan.Contains(':')) { // The address is parsed as IPv6 if and only if it contains a colon. This is valid because // we don't support/parse a port specification at the end of an IPv4 address. - ushort* numbers = stackalloc ushort[IPAddressParserStatics.IPv6AddressShorts]; - new Span(numbers, IPAddressParserStatics.IPv6AddressShorts).Clear(); + Span numbers = stackalloc ushort[IPAddressParserStatics.IPv6AddressShorts]; + numbers.Clear(); if (Ipv6StringToAddress(ipSpan, numbers, IPAddressParserStatics.IPv6AddressShorts, out uint scope)) { - return new IPAddress(numbers, IPAddressParserStatics.IPv6AddressShorts, scope); + return new IPAddress(numbers, scope); } } else if (Ipv4StringToAddress(ipSpan, out long address)) @@ -193,7 +193,7 @@ public static unsafe bool Ipv4StringToAddress(ReadOnlySpan ipSpan, out lon } } - public static unsafe bool Ipv6StringToAddress(ReadOnlySpan ipSpan, ushort* numbers, int numbersLength, out uint scope) + public static unsafe bool Ipv6StringToAddress(ReadOnlySpan ipSpan, Span numbers, int numbersLength, out uint scope) { Debug.Assert(numbers != null); Debug.Assert(numbersLength >= IPAddressParserStatics.IPv6AddressShorts); diff --git a/src/System.Net.Primitives/tests/FunctionalTests/IPAddressParsing.cs b/src/System.Net.Primitives/tests/FunctionalTests/IPAddressParsing.cs index a57aac898d89..4baf57e0e3c6 100644 --- a/src/System.Net.Primitives/tests/FunctionalTests/IPAddressParsing.cs +++ b/src/System.Net.Primitives/tests/FunctionalTests/IPAddressParsing.cs @@ -346,6 +346,7 @@ public void TryParseIPv6_ValidAddress_RoundtripMatchesExpected(string address, s public static IEnumerable InvalidIpv6Addresses() { + yield return new object[] { "[:]" }; // malformed yield return new object[] { ":::4df" }; yield return new object[] { "4df:::" }; yield return new object[] { "0:::4df" }; @@ -368,6 +369,24 @@ public static IEnumerable InvalidIpv6Addresses() yield return new object[] { "Fe08::1]]" }; // two trailing brackets yield return new object[] { "[Fe08::1]]" }; // one leading and two trailing brackets yield return new object[] { ":1" }; // leading single colon + yield return new object[] { ":1:2" }; // leading single colon + yield return new object[] { ":1:2:3" }; // leading single colon + yield return new object[] { ":1:2:3:4" }; // leading single colon + yield return new object[] { ":1:2:3:4:5" }; // leading single colon + yield return new object[] { ":1:2:3:4:5:6" }; // leading single colon + yield return new object[] { ":1:2:3:4:5:6:7" }; // leading single colon + yield return new object[] { ":1:2:3:4:5:6:7:8" }; // leading single colon + yield return new object[] { ":1:2:3:4:5:6:7:8:9" }; // leading single colon + yield return new object[] { "::1:2:3:4:5:6:7:8" }; // compressor with too many number groups + yield return new object[] { "1::2:3:4:5:6:7:8" }; // compressor with too many number groups + yield return new object[] { "1:2::3:4:5:6:7:8" }; // compressor with too many number groups + yield return new object[] { "1:2:3::4:5:6:7:8" }; // compressor with too many number groups + yield return new object[] { "1:2:3:4::5:6:7:8" }; // compressor with too many number groups + yield return new object[] { "1:2:3:4:5::6:7:8" }; // compressor with too many number groups + yield return new object[] { "1:2:3:4:5:6::7:8" }; // compressor with too many number groups + yield return new object[] { "1:2:3:4:5:6:7::8" }; // compressor with too many number groups + yield return new object[] { "1:2:3:4:5:6:7:8::" }; // compressor with too many number groups + yield return new object[] { "::1:2:3:4:5:6:7:8:9" }; // compressor with too many number groups yield return new object[] { "1:" }; // trailing single colon yield return new object[] { " ::1" }; // leading whitespace yield return new object[] { "::1 " }; // trailing whitespace @@ -420,6 +439,9 @@ public void ParseIPv6_InvalidAddress_ThrowsFormatException(string invalidAddress new object[] { "%12" }, // just scope new object[] { "[192.168.0.1]" }, // raw v4 new object[] { "[1]" }, // incomplete + new object[] { "" }, // malformed + new object[] { "[" }, // malformed + new object[] { "[]" }, // malformed }; [Theory] diff --git a/src/System.Net.Primitives/tests/UnitTests/Fakes/IPv6AddressHelper.cs b/src/System.Net.Primitives/tests/UnitTests/Fakes/IPv6AddressHelper.cs index c46e30e4be30..079a5d13c165 100644 --- a/src/System.Net.Primitives/tests/UnitTests/Fakes/IPv6AddressHelper.cs +++ b/src/System.Net.Primitives/tests/UnitTests/Fakes/IPv6AddressHelper.cs @@ -10,8 +10,8 @@ internal static class IPv6AddressHelper { internal unsafe static (int longestSequenceStart, int longestSequenceLength) FindCompressionRange( ReadOnlySpan numbers) => (-1, -1); - internal unsafe static bool ShouldHaveIpv4Embedded(ushort[] numbers) => false; + internal unsafe static bool ShouldHaveIpv4Embedded(ReadOnlySpan numbers) => false; internal unsafe static bool IsValidStrict(char* name, int start, ref int end) => false; - internal static unsafe bool Parse(ReadOnlySpan ipSpan, ushort* numbers, int start, ref string scopeId) => false; + internal static unsafe bool Parse(ReadOnlySpan ipSpan, Span numbers, int start, ref string scopeId) => false; } } diff --git a/src/System.Private.Uri/src/System/IPv6AddressHelper.cs b/src/System.Private.Uri/src/System/IPv6AddressHelper.cs index f0f275097828..c35dacaa59f2 100644 --- a/src/System.Private.Uri/src/System/IPv6AddressHelper.cs +++ b/src/System.Private.Uri/src/System/IPv6AddressHelper.cs @@ -15,12 +15,9 @@ internal static partial class IPv6AddressHelper internal static unsafe string ParseCanonicalName(string str, int start, ref bool isLoopback, ref string scopeId) { - ushort* numbersPtr = stackalloc ushort[NumberOfLabels]; - // optimized zeroing of 8 shorts = 2 longs - ((long*)numbersPtr)[0] = 0L; - ((long*)numbersPtr)[1] = 0L; - Span numbers = new Span(numbersPtr, NumberOfLabels); - Parse(str, numbersPtr, start, ref scopeId); + Span numbers = stackalloc ushort[NumberOfLabels]; + numbers.Clear(); + Parse(str, numbers, start, ref scopeId); isLoopback = IsLoopback(numbers); // RFC 5952 Sections 4 & 5 - Compressed, lower case, with possible embedded IPv4 addresses. @@ -118,33 +115,6 @@ private static unsafe bool IsLoopback(ReadOnlySpan numbers) || (numbers[5] == 0xFFFF)))); } - // Returns true if the IPv6 address should be formated with an embedded IPv4 address: - // ::192.168.1.1 - private static unsafe bool ShouldHaveIpv4Embedded(ushort* numbers) - { - // 0:0 : 0:0 : x:x : x.x.x.x - if (numbers[0] == 0 && numbers[1] == 0 && numbers[2] == 0 && numbers[3] == 0 && numbers[6] != 0) - { - // RFC 5952 Section 5 - 0:0 : 0:0 : 0:[0 | FFFF] : x.x.x.x - if (numbers[4] == 0 && (numbers[5] == 0 || numbers[5] == 0xFFFF)) - { - return true; - } - // SIIT - 0:0 : 0:0 : FFFF:0 : x.x.x.x - else if (numbers[4] == 0xFFFF && numbers[5] == 0) - { - return true; - } - } - // ISATAP - if (numbers[4] == 0 && numbers[5] == 0x5EFE) - { - return true; - } - - return false; - } - // // InternalIsValid // @@ -188,6 +158,12 @@ private static unsafe bool InternalIsValid(char* name, int start, ref int end, b bool expectingNumber = true; int lastSequence = 1; + // Starting with a colon character is only valid if another colon follows. + if (name[start] == ':' && (start + 1 >= end || name[start + 1] != ':')) + { + return false; + } + int i; for (i = start; i < end; ++i) { diff --git a/src/System.Private.Uri/tests/FunctionalTests/UriIpHostTest.cs b/src/System.Private.Uri/tests/FunctionalTests/UriIpHostTest.cs index 42a8711714f3..35d22583d0b1 100644 --- a/src/System.Private.Uri/tests/FunctionalTests/UriIpHostTest.cs +++ b/src/System.Private.Uri/tests/FunctionalTests/UriIpHostTest.cs @@ -313,7 +313,25 @@ public void UriIPv6Host_EmbeddedIPv4_Success(string address, string expected) [InlineData("")] [InlineData(" ")] [InlineData("1")] - [InlineData(":1")] + [InlineData(":")] // leading single colon + [InlineData(":1")] // leading single colon + [InlineData(":1:2")] // leading single colon + [InlineData(":1:2:3")] // leading single colon + [InlineData(":1:2:3:4")] // leading single colon + [InlineData(":1:2:3:4:5")] // leading single colon + [InlineData(":1:2:3:4:5:6")] // leading single colon + [InlineData(":1:2:3:4:5:6:7")] // leading single colon + [InlineData(":1:2:3:4:5:6:7:8:9")] // leading single colon + [InlineData("::1:2:3:4:5:6:7:8")] // compressor with too many number groups + [InlineData("1::2:3:4:5:6:7:8")] // compressor with too many number groups + [InlineData("1:2::3:4:5:6:7:8")] // compressor with too many number groups + [InlineData("1:2:3::4:5:6:7:8")] // compressor with too many number groups + [InlineData("1:2:3:4::5:6:7:8")] // compressor with too many number groups + [InlineData("1:2:3:4:5::6:7:8")] // compressor with too many number groups + [InlineData("1:2:3:4:5:6::7:8")] // compressor with too many number groups + [InlineData("1:2:3:4:5:6:7::8")] // compressor with too many number groups + [InlineData("1:2:3:4:5:6:7:8::")] // compressor with too many number groups + [InlineData("::1:2:3:4:5:6:7:8:9")] // compressor with too many number groups [InlineData("1:")] [InlineData("::1 ")] [InlineData(" ::1")] @@ -333,6 +351,15 @@ public void UriIPv6Host_BadAddress(string address) ParseBadIPv6Address(address); } + [Theory] + [InlineData(":1:2:3:4:5:6:7:8")] // leading single colon + [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Full framework machines are not yet patched with the fix for this")] + public void UriIPv6Host_BadAddress_SkipOnFramework(string address) + { + ParseBadIPv6Address(address); + } + + #region Helpers private void ParseIPv6Address(string ipv6String) From 6352388e9ada43b40bbd1132899f88c6a841512b Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Fri, 31 May 2019 10:21:46 -0700 Subject: [PATCH 592/607] Update dependencies from https://github.com/dotnet/corefx build 20190531.1 (#38098) - runtime.native.System.IO.Ports - 4.6.0-preview6.19281.1 - Microsoft.NETCore.Platforms - 3.0.0-preview6.19281.1 --- eng/Version.Details.xml | 8 ++++---- eng/Versions.props | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index a8e742702cc2..95c2b2ac2462 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -26,13 +26,13 @@ https://github.com/dotnet/core-setup 798280671320c7613d34fadc88ec1b0e853d3d37 - + https://github.com/dotnet/corefx - e23119d577e644d2c2a25419c88c1181681358e0 + 82408cd90f4d4573d502e8df2ca437b35e6a37f7 - + https://github.com/dotnet/corefx - e23119d577e644d2c2a25419c88c1181681358e0 + 82408cd90f4d4573d502e8df2ca437b35e6a37f7 https://github.com/dotnet/arcade diff --git a/eng/Versions.props b/eng/Versions.props index 65a8062db8e1..3a6e2f71b506 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -43,8 +43,8 @@ 3.0.0-preview6.19279.4 3.0.0-preview6.19279.4 - 3.0.0-preview6.19279.8 - 4.6.0-preview6.19279.8 + 3.0.0-preview6.19281.1 + 4.6.0-preview6.19281.1 2.1.0-prerelease.19280.1 From 792eb85f70a7060777b7cc0c0ef860a3e6f69090 Mon Sep 17 00:00:00 2001 From: Marco Rossignoli Date: Fri, 31 May 2019 20:33:00 +0200 Subject: [PATCH 593/607] [System.Text.Json]Improve error output for unsupported scenarios in System.Text.Json.Serialization (#38061) * custom exception for parameterless constructors * add polymorphic interface exception * fix ReflectionMaterializer * address PR feedback --- .../src/Resources/Strings.resx | 6 +++++ .../JsonSerializer.Read.HandleObject.cs | 13 ++++++++++ .../Serialization/ReflectionMaterializer.cs | 8 +++++++ .../Text/Json/ThrowHelper.Serialization.cs | 12 ++++++++++ .../tests/Serialization/Object.ReadTests.cs | 19 +++++++++++++++ .../tests/Serialization/PolymorphicTests.cs | 24 ++++++++++++++++++- 6 files changed, 81 insertions(+), 1 deletion(-) diff --git a/src/System.Text.Json/src/Resources/Strings.resx b/src/System.Text.Json/src/Resources/Strings.resx index 6f8b9bc5ef64..6d3f7981d09a 100644 --- a/src/System.Text.Json/src/Resources/Strings.resx +++ b/src/System.Text.Json/src/Resources/Strings.resx @@ -371,4 +371,10 @@ Comments cannot be stored when deserializing objects, only the Skip and Disallow comment handling modes are supported. + + Deserialization of reference types without parameterless constructor is not supported. Type '{0}' + + + Deserialization of interface types is not supported. Type '{0}' + diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleObject.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleObject.cs index b561568a2290..0672a311b8aa 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleObject.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleObject.cs @@ -28,6 +28,19 @@ private static void HandleStartObject(JsonSerializerOptions options, ref Utf8Jso } JsonClassInfo classInfo = state.Current.JsonClassInfo; + + if (classInfo.CreateObject is null && classInfo.ClassType == ClassType.Object) + { + if (classInfo.Type.IsInterface) + { + ThrowHelper.ThrowInvalidOperationException_DeserializePolymorphicInterface(classInfo.Type); + } + else + { + ThrowHelper.ThrowInvalidOperationException_DeserializeMissingParameterlessConstructor(classInfo.Type); + } + } + state.Current.ReturnValue = classInfo.CreateObject(); } diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/ReflectionMaterializer.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/ReflectionMaterializer.cs index 5c5c43173af0..c22f951084d6 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/ReflectionMaterializer.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/ReflectionMaterializer.cs @@ -12,6 +12,14 @@ internal sealed class ReflectionMaterializer : ClassMaterializer { public override JsonClassInfo.ConstructorDelegate CreateConstructor(Type type) { + Debug.Assert(type != null); + ConstructorInfo realMethod = type.GetConstructor(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance, binder: null, Type.EmptyTypes, modifiers: null); + + if (realMethod == null && !type.IsValueType) + { + return null; + } + return () => Activator.CreateInstance(type); } diff --git a/src/System.Text.Json/src/System/Text/Json/ThrowHelper.Serialization.cs b/src/System.Text.Json/src/System/Text/Json/ThrowHelper.Serialization.cs index 2f6973661185..c4f7f697602a 100644 --- a/src/System.Text.Json/src/System/Text/Json/ThrowHelper.Serialization.cs +++ b/src/System.Text.Json/src/System/Text/Json/ThrowHelper.Serialization.cs @@ -122,5 +122,17 @@ public static void ThrowInvalidOperationException_SerializationDataExtensionProp { throw new InvalidOperationException(SR.Format(SR.SerializationDataExtensionPropertyInvalidElement, jsonClassInfo.Type, jsonClassInfo.DataExtensionProperty.PropertyInfo.Name, invalidType)); } + + [MethodImpl(MethodImplOptions.NoInlining)] + public static void ThrowInvalidOperationException_DeserializeMissingParameterlessConstructor(Type invalidType) + { + throw new NotSupportedException(SR.Format(SR.DeserializeMissingParameterlessConstructor, invalidType)); + } + + [MethodImpl(MethodImplOptions.NoInlining)] + public static void ThrowInvalidOperationException_DeserializePolymorphicInterface(Type invalidType) + { + throw new NotSupportedException(SR.Format(SR.DeserializePolymorphicInterface, invalidType)); + } } } diff --git a/src/System.Text.Json/tests/Serialization/Object.ReadTests.cs b/src/System.Text.Json/tests/Serialization/Object.ReadTests.cs index 3e2ca2cac254..e484a852d589 100644 --- a/src/System.Text.Json/tests/Serialization/Object.ReadTests.cs +++ b/src/System.Text.Json/tests/Serialization/Object.ReadTests.cs @@ -160,6 +160,25 @@ public static void ReadObjectFail() Assert.Throws(() => JsonSerializer.Parse("null.")); } + [Fact] + public static void ReadObjectFail_ReferenceTypeMissingParameterlessConstructor() + { + Assert.Throws(() => JsonSerializer.Parse(@"{""Name"":""Name!""}")); + } + + class PublicParameterizedConstructorTestClass + { + private readonly string _name; + public PublicParameterizedConstructorTestClass(string name) + { + _name = name; + } + public string Name + { + get { return _name; } + } + } + [Fact] public static void ParseUntyped() { diff --git a/src/System.Text.Json/tests/Serialization/PolymorphicTests.cs b/src/System.Text.Json/tests/Serialization/PolymorphicTests.cs index 238d4053b386..086e7cf82372 100644 --- a/src/System.Text.Json/tests/Serialization/PolymorphicTests.cs +++ b/src/System.Text.Json/tests/Serialization/PolymorphicTests.cs @@ -386,6 +386,28 @@ public static void StaticAnalysisWithRelationship() Assert.Equal(typeof(UsaCustomer), deserializedCustomer.GetType()); Assert.Equal(typeof(Address), deserializedCustomer.Address.GetType()); ((Customer)deserializedCustomer).VerifyNonVirtual(); - } + } + + [Fact] + public static void PolymorphicInterface_NotSupported() + { + Assert.Throws(() => JsonSerializer.Parse(@"{ ""Value"": ""A value"", ""Thing"": { ""Number"": 123 } }")); + } + + class MyClass + { + public string Value { get; set; } + public IThing Thing { get; set; } + } + + interface IThing + { + int Number { get; set; } + } + + class MyThing : IThing + { + public int Number { get; set; } + } } } From 39c1f79962039f605cf00700df003e26788757c2 Mon Sep 17 00:00:00 2001 From: Tanner Gooding Date: Fri, 31 May 2019 11:40:07 -0700 Subject: [PATCH 594/607] Removing the TestAllOnes, TestAllZeros, and TestMixOnesZeros methods from the Sse41 class (#38102) * Removing the TestAllOnes, TestAllZeros, and TestMixOnesZeros methods from the Sse41 class * Adding a MatchingRefApiCompatBaseline for System.Runtime.Intrinsics --- .../ref/System.Runtime.Intrinsics.cs | 24 ----------------- .../src/MatchingRefApiCompatBaseline.txt | 26 +++++++++++++++++++ 2 files changed, 26 insertions(+), 24 deletions(-) create mode 100644 src/System.Runtime.Intrinsics/src/MatchingRefApiCompatBaseline.txt diff --git a/src/System.Runtime.Intrinsics/ref/System.Runtime.Intrinsics.cs b/src/System.Runtime.Intrinsics/ref/System.Runtime.Intrinsics.cs index 7a1f7d718eaa..d15538ccc42b 100644 --- a/src/System.Runtime.Intrinsics/ref/System.Runtime.Intrinsics.cs +++ b/src/System.Runtime.Intrinsics/ref/System.Runtime.Intrinsics.cs @@ -1656,22 +1656,6 @@ internal Sse41() { } public static System.Runtime.Intrinsics.Vector128 RoundToZeroScalar(System.Runtime.Intrinsics.Vector128 upper, System.Runtime.Intrinsics.Vector128 value) { throw null; } public static System.Runtime.Intrinsics.Vector128 RoundToZeroScalar(System.Runtime.Intrinsics.Vector128 value) { throw null; } public static System.Runtime.Intrinsics.Vector128 RoundToZeroScalar(System.Runtime.Intrinsics.Vector128 upper, System.Runtime.Intrinsics.Vector128 value) { throw null; } - public static bool TestAllOnes(System.Runtime.Intrinsics.Vector128 value) { throw null; } - public static bool TestAllOnes(System.Runtime.Intrinsics.Vector128 value) { throw null; } - public static bool TestAllOnes(System.Runtime.Intrinsics.Vector128 value) { throw null; } - public static bool TestAllOnes(System.Runtime.Intrinsics.Vector128 value) { throw null; } - public static bool TestAllOnes(System.Runtime.Intrinsics.Vector128 value) { throw null; } - public static bool TestAllOnes(System.Runtime.Intrinsics.Vector128 value) { throw null; } - public static bool TestAllOnes(System.Runtime.Intrinsics.Vector128 value) { throw null; } - public static bool TestAllOnes(System.Runtime.Intrinsics.Vector128 value) { throw null; } - public static bool TestAllZeros(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) { throw null; } - public static bool TestAllZeros(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) { throw null; } - public static bool TestAllZeros(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) { throw null; } - public static bool TestAllZeros(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) { throw null; } - public static bool TestAllZeros(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) { throw null; } - public static bool TestAllZeros(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) { throw null; } - public static bool TestAllZeros(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) { throw null; } - public static bool TestAllZeros(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) { throw null; } public static bool TestC(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) { throw null; } public static bool TestC(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) { throw null; } public static bool TestC(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) { throw null; } @@ -1680,14 +1664,6 @@ internal Sse41() { } public static bool TestC(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) { throw null; } public static bool TestC(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) { throw null; } public static bool TestC(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) { throw null; } - public static bool TestMixOnesZeros(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) { throw null; } - public static bool TestMixOnesZeros(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) { throw null; } - public static bool TestMixOnesZeros(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) { throw null; } - public static bool TestMixOnesZeros(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) { throw null; } - public static bool TestMixOnesZeros(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) { throw null; } - public static bool TestMixOnesZeros(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) { throw null; } - public static bool TestMixOnesZeros(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) { throw null; } - public static bool TestMixOnesZeros(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) { throw null; } public static bool TestNotZAndNotC(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) { throw null; } public static bool TestNotZAndNotC(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) { throw null; } public static bool TestNotZAndNotC(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) { throw null; } diff --git a/src/System.Runtime.Intrinsics/src/MatchingRefApiCompatBaseline.txt b/src/System.Runtime.Intrinsics/src/MatchingRefApiCompatBaseline.txt new file mode 100644 index 000000000000..e737f351a357 --- /dev/null +++ b/src/System.Runtime.Intrinsics/src/MatchingRefApiCompatBaseline.txt @@ -0,0 +1,26 @@ +Compat issues with assembly System.Runtime.Intrinsics: +MembersMustExist : Member 'System.Runtime.Intrinsics.X86.Sse41.TestAllOnes(System.Runtime.Intrinsics.Vector128)' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Runtime.Intrinsics.X86.Sse41.TestAllOnes(System.Runtime.Intrinsics.Vector128)' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Runtime.Intrinsics.X86.Sse41.TestAllOnes(System.Runtime.Intrinsics.Vector128)' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Runtime.Intrinsics.X86.Sse41.TestAllOnes(System.Runtime.Intrinsics.Vector128)' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Runtime.Intrinsics.X86.Sse41.TestAllOnes(System.Runtime.Intrinsics.Vector128)' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Runtime.Intrinsics.X86.Sse41.TestAllOnes(System.Runtime.Intrinsics.Vector128)' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Runtime.Intrinsics.X86.Sse41.TestAllOnes(System.Runtime.Intrinsics.Vector128)' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Runtime.Intrinsics.X86.Sse41.TestAllOnes(System.Runtime.Intrinsics.Vector128)' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Runtime.Intrinsics.X86.Sse41.TestAllZeros(System.Runtime.Intrinsics.Vector128, System.Runtime.Intrinsics.Vector128)' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Runtime.Intrinsics.X86.Sse41.TestAllZeros(System.Runtime.Intrinsics.Vector128, System.Runtime.Intrinsics.Vector128)' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Runtime.Intrinsics.X86.Sse41.TestAllZeros(System.Runtime.Intrinsics.Vector128, System.Runtime.Intrinsics.Vector128)' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Runtime.Intrinsics.X86.Sse41.TestAllZeros(System.Runtime.Intrinsics.Vector128, System.Runtime.Intrinsics.Vector128)' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Runtime.Intrinsics.X86.Sse41.TestAllZeros(System.Runtime.Intrinsics.Vector128, System.Runtime.Intrinsics.Vector128)' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Runtime.Intrinsics.X86.Sse41.TestAllZeros(System.Runtime.Intrinsics.Vector128, System.Runtime.Intrinsics.Vector128)' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Runtime.Intrinsics.X86.Sse41.TestAllZeros(System.Runtime.Intrinsics.Vector128, System.Runtime.Intrinsics.Vector128)' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Runtime.Intrinsics.X86.Sse41.TestAllZeros(System.Runtime.Intrinsics.Vector128, System.Runtime.Intrinsics.Vector128)' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Runtime.Intrinsics.X86.Sse41.TestMixOnesZeros(System.Runtime.Intrinsics.Vector128, System.Runtime.Intrinsics.Vector128)' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Runtime.Intrinsics.X86.Sse41.TestMixOnesZeros(System.Runtime.Intrinsics.Vector128, System.Runtime.Intrinsics.Vector128)' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Runtime.Intrinsics.X86.Sse41.TestMixOnesZeros(System.Runtime.Intrinsics.Vector128, System.Runtime.Intrinsics.Vector128)' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Runtime.Intrinsics.X86.Sse41.TestMixOnesZeros(System.Runtime.Intrinsics.Vector128, System.Runtime.Intrinsics.Vector128)' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Runtime.Intrinsics.X86.Sse41.TestMixOnesZeros(System.Runtime.Intrinsics.Vector128, System.Runtime.Intrinsics.Vector128)' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Runtime.Intrinsics.X86.Sse41.TestMixOnesZeros(System.Runtime.Intrinsics.Vector128, System.Runtime.Intrinsics.Vector128)' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Runtime.Intrinsics.X86.Sse41.TestMixOnesZeros(System.Runtime.Intrinsics.Vector128, System.Runtime.Intrinsics.Vector128)' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Runtime.Intrinsics.X86.Sse41.TestMixOnesZeros(System.Runtime.Intrinsics.Vector128, System.Runtime.Intrinsics.Vector128)' does not exist in the reference but it does exist in the implementation. +Total Issues: 24 From fdab38c206fe545b53d043f81be574cdbe9b5b8c Mon Sep 17 00:00:00 2001 From: Jose Perez Rodriguez Date: Fri, 31 May 2019 11:43:52 -0700 Subject: [PATCH 595/607] Adding net461 target to Microsoft.Bcl.* packages (#38104) * Adding net461 target to Microsoft.Bcl.* packages * Adding System.Text.Json net461 target as well --- eng/depProj.targets | 7 +++++++ .../binplacePackages/binplacePackages.depproj | 3 ++- external/netfx/netfx.depproj | 3 +++ .../ref/Configurations.props | 7 ++++++- .../ref/Microsoft.Bcl.AsyncInterfaces.csproj | 12 ++++++++---- .../src/Configurations.props | 7 ++++++- .../src/Microsoft.Bcl.AsyncInterfaces.csproj | 8 +++++--- .../ref/Configurations.props | 2 ++ .../ref/Microsoft.Bcl.HashCode.csproj | 7 ++++--- .../src/Configurations.props | 2 ++ .../src/Microsoft.Bcl.HashCode.csproj | 6 ++++-- .../pkg/System.Text.Json.pkgproj | 9 ++++++++- src/System.Text.Json/ref/Configurations.props | 2 ++ src/System.Text.Json/ref/System.Text.Json.csproj | 8 +++++--- src/System.Text.Json/src/Configurations.props | 7 ++++++- src/System.Text.Json/src/System.Text.Json.csproj | 16 +++++++++++----- 16 files changed, 81 insertions(+), 25 deletions(-) diff --git a/eng/depProj.targets b/eng/depProj.targets index 11b70d940762..ce8fcd6b06f3 100644 --- a/eng/depProj.targets +++ b/eng/depProj.targets @@ -111,6 +111,13 @@ See the LICENSE file in the project root for more information. + + + + + + true $(TargetFramework.SubString(11)) Reference + true @@ -32,7 +33,7 @@ 4.5.3 - + 4.5.0 diff --git a/external/netfx/netfx.depproj b/external/netfx/netfx.depproj index cba92087c3de..8acf4c30625e 100644 --- a/external/netfx/netfx.depproj +++ b/external/netfx/netfx.depproj @@ -40,6 +40,9 @@ 4.5.2 + + 4.5.0 + $(NETStandardSupportPackageVersion) diff --git a/src/Microsoft.Bcl.AsyncInterfaces/ref/Configurations.props b/src/Microsoft.Bcl.AsyncInterfaces/ref/Configurations.props index 20d2e63c9e23..4de3eef79ff6 100644 --- a/src/Microsoft.Bcl.AsyncInterfaces/ref/Configurations.props +++ b/src/Microsoft.Bcl.AsyncInterfaces/ref/Configurations.props @@ -1,8 +1,13 @@ - + netstandard; netstandard2.1; + net461; + + + $(PackageConfigurations); + netfx; diff --git a/src/Microsoft.Bcl.AsyncInterfaces/ref/Microsoft.Bcl.AsyncInterfaces.csproj b/src/Microsoft.Bcl.AsyncInterfaces/ref/Microsoft.Bcl.AsyncInterfaces.csproj index e61b49621314..1c646cdb5675 100644 --- a/src/Microsoft.Bcl.AsyncInterfaces/ref/Microsoft.Bcl.AsyncInterfaces.csproj +++ b/src/Microsoft.Bcl.AsyncInterfaces/ref/Microsoft.Bcl.AsyncInterfaces.csproj @@ -1,13 +1,12 @@ {6371299B-8F39-4A0A-A9CD-70F80FF205F6} - netstandard-Debug;netstandard-Release;netstandard2.1-Debug;netstandard2.1-Release + net461-Debug;net461-Release;netfx-Debug;netfx-Release;netstandard-Debug;netstandard-Release;netstandard2.1-Debug;netstandard2.1-Release - + - - + @@ -15,4 +14,9 @@ + + + + + \ No newline at end of file diff --git a/src/Microsoft.Bcl.AsyncInterfaces/src/Configurations.props b/src/Microsoft.Bcl.AsyncInterfaces/src/Configurations.props index 20d2e63c9e23..4de3eef79ff6 100644 --- a/src/Microsoft.Bcl.AsyncInterfaces/src/Configurations.props +++ b/src/Microsoft.Bcl.AsyncInterfaces/src/Configurations.props @@ -1,8 +1,13 @@ - + netstandard; netstandard2.1; + net461; + + + $(PackageConfigurations); + netfx; diff --git a/src/Microsoft.Bcl.AsyncInterfaces/src/Microsoft.Bcl.AsyncInterfaces.csproj b/src/Microsoft.Bcl.AsyncInterfaces/src/Microsoft.Bcl.AsyncInterfaces.csproj index 2a076b61760d..3b30c3f66571 100644 --- a/src/Microsoft.Bcl.AsyncInterfaces/src/Microsoft.Bcl.AsyncInterfaces.csproj +++ b/src/Microsoft.Bcl.AsyncInterfaces/src/Microsoft.Bcl.AsyncInterfaces.csproj @@ -1,8 +1,8 @@  {96A7CE75-B5E8-421B-BDF0-C4651D97D8CA} - netstandard-Debug;netstandard-Release;netstandard2.1-Debug;netstandard2.1-Release - true + net461-Debug;net461-Release;netfx-Debug;netfx-Release;netstandard-Debug;netstandard-Release;netstandard2.1-Debug;netstandard2.1-Release + true @@ -32,7 +32,9 @@ ProductionCode\System.Runtime\src\System\Runtime\CompilerServices\EnumeratorCancellationAttribute.cs - + + + diff --git a/src/Microsoft.Bcl.HashCode/ref/Configurations.props b/src/Microsoft.Bcl.HashCode/ref/Configurations.props index 1264571929b0..0a07627c29c4 100644 --- a/src/Microsoft.Bcl.HashCode/ref/Configurations.props +++ b/src/Microsoft.Bcl.HashCode/ref/Configurations.props @@ -4,10 +4,12 @@ netstandard; netstandard2.1; netcoreapp2.1; + net461; $(PackageConfigurations); netcoreapp; + netfx; diff --git a/src/Microsoft.Bcl.HashCode/ref/Microsoft.Bcl.HashCode.csproj b/src/Microsoft.Bcl.HashCode/ref/Microsoft.Bcl.HashCode.csproj index 409ce4dfd777..b8b17e7f5afb 100644 --- a/src/Microsoft.Bcl.HashCode/ref/Microsoft.Bcl.HashCode.csproj +++ b/src/Microsoft.Bcl.HashCode/ref/Microsoft.Bcl.HashCode.csproj @@ -1,12 +1,13 @@  {96AA2060-C846-4E56-9509-E8CB9C114C8F} - netcoreapp-Debug;netcoreapp-Release;netcoreapp2.1-Debug;netcoreapp2.1-Release;netstandard-Debug;netstandard-Release;netstandard2.1-Debug;netstandard2.1-Release + net461-Debug;net461-Release;netcoreapp-Debug;netcoreapp-Release;netcoreapp2.1-Debug;netcoreapp2.1-Release;netfx-Debug;netfx-Release;netstandard-Debug;netstandard-Release;netstandard2.1-Debug;netstandard2.1-Release - + + - + diff --git a/src/Microsoft.Bcl.HashCode/src/Configurations.props b/src/Microsoft.Bcl.HashCode/src/Configurations.props index 1264571929b0..0a07627c29c4 100644 --- a/src/Microsoft.Bcl.HashCode/src/Configurations.props +++ b/src/Microsoft.Bcl.HashCode/src/Configurations.props @@ -4,10 +4,12 @@ netstandard; netstandard2.1; netcoreapp2.1; + net461; $(PackageConfigurations); netcoreapp; + netfx; diff --git a/src/Microsoft.Bcl.HashCode/src/Microsoft.Bcl.HashCode.csproj b/src/Microsoft.Bcl.HashCode/src/Microsoft.Bcl.HashCode.csproj index 9a817ede4865..e99b1ecb3f6e 100644 --- a/src/Microsoft.Bcl.HashCode/src/Microsoft.Bcl.HashCode.csproj +++ b/src/Microsoft.Bcl.HashCode/src/Microsoft.Bcl.HashCode.csproj @@ -2,9 +2,9 @@ {B77D0212-D53C-4F7F-8CEC-2E067AC6FCAB} true - true + true $(IsPartialFacadeAssembly) - netcoreapp-Debug;netcoreapp-Release;netcoreapp2.1-Debug;netcoreapp2.1-Release;netstandard-Debug;netstandard-Release;netstandard2.1-Debug;netstandard2.1-Release + net461-Debug;net461-Release;netcoreapp-Debug;netcoreapp-Release;netcoreapp2.1-Debug;netcoreapp2.1-Release;netfx-Debug;netfx-Release;netstandard-Debug;netstandard-Release;netstandard2.1-Debug;netstandard2.1-Release enable @@ -13,6 +13,8 @@ + + diff --git a/src/System.Text.Json/pkg/System.Text.Json.pkgproj b/src/System.Text.Json/pkg/System.Text.Json.pkgproj index 4e75b526b0a6..7aa54c2a96f0 100644 --- a/src/System.Text.Json/pkg/System.Text.Json.pkgproj +++ b/src/System.Text.Json/pkg/System.Text.Json.pkgproj @@ -4,7 +4,9 @@ net461;netcoreapp2.0;uap10.0.16299;$(AllXamarinFrameworks) - + + net461;netcoreapp2.0;uap10.0.16299;$(AllXamarinFrameworks) + + true + \ No newline at end of file diff --git a/src/System.Text.Json/ref/Configurations.props b/src/System.Text.Json/ref/Configurations.props index e0948db73ae7..cf9d7fae88bb 100644 --- a/src/System.Text.Json/ref/Configurations.props +++ b/src/System.Text.Json/ref/Configurations.props @@ -2,11 +2,13 @@ netstandard; + net461; $(PackageConfigurations) netcoreapp; uap; + netfx; \ No newline at end of file diff --git a/src/System.Text.Json/ref/System.Text.Json.csproj b/src/System.Text.Json/ref/System.Text.Json.csproj index 8049bab3a71a..85b6a4fdb53a 100644 --- a/src/System.Text.Json/ref/System.Text.Json.csproj +++ b/src/System.Text.Json/ref/System.Text.Json.csproj @@ -1,17 +1,19 @@  {9F155052-2DDE-4DBD-9F31-ADB45C9FE628} - netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release;uap-Debug;uap-Release + net461-Debug;net461-Release;netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release;netstandard-Debug;netstandard-Release;uap-Debug;uap-Release - + - + + + diff --git a/src/System.Text.Json/src/Configurations.props b/src/System.Text.Json/src/Configurations.props index 45f47966c3a9..d1c0ca9a755f 100644 --- a/src/System.Text.Json/src/Configurations.props +++ b/src/System.Text.Json/src/Configurations.props @@ -1,9 +1,14 @@  - + netstandard; netcoreapp; uap-Windows_NT; + net461; + + + $(PackageConfigurations); + netfx; diff --git a/src/System.Text.Json/src/System.Text.Json.csproj b/src/System.Text.Json/src/System.Text.Json.csproj index 941b0baf1a72..3fde4c3bec84 100644 --- a/src/System.Text.Json/src/System.Text.Json.csproj +++ b/src/System.Text.Json/src/System.Text.Json.csproj @@ -4,10 +4,11 @@ System.Text.Json true $(OutputPath)$(MSBuildProjectName).xml - netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release + net461-Debug;net461-Release;netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release;netstandard-Debug;netstandard-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release - $(DefineConstants);BUILDING_INBOX_LIBRARY + $(DefineConstants);BUILDING_INBOX_LIBRARY + $(DefineConstants);netstandard @@ -152,13 +153,18 @@ - + Common\System\Buffers\ArrayBufferWriter.cs + + + + + - + @@ -179,4 +185,4 @@ - + \ No newline at end of file From b2fd315c40330e09d34d269792884f6544ab3fe6 Mon Sep 17 00:00:00 2001 From: William Godbe Date: Fri, 31 May 2019 11:48:31 -0700 Subject: [PATCH 596/607] Add tests for double-encoded URLs to both UrlDecode() methods (#37881) * Add tests for double-encoded URLs to both UrlDecode() methods * Make test cases more clear --- .../tests/System/Net/WebUtility.cs | 5 +++++ .../tests/HttpUtility/HttpUtilityTest.cs | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/System.Runtime.Extensions/tests/System/Net/WebUtility.cs b/src/System.Runtime.Extensions/tests/System/Net/WebUtility.cs index ba821255cc1f..2f992e61387f 100644 --- a/src/System.Runtime.Extensions/tests/System/Net/WebUtility.cs +++ b/src/System.Runtime.Extensions/tests/System/Net/WebUtility.cs @@ -155,6 +155,11 @@ public static IEnumerable> UrlDecode_SharedTestData() yield return Tuple.Create("%1g", "%1g"); yield return Tuple.Create("%G1", "%G1"); yield return Tuple.Create("%1G", "%1G"); + + // The "Baz" portion of "http://example.net/Baz" has been double-encoded - one iteration of UrlDecode() should produce a once-encoded string. + yield return Tuple.Create("http://example.net/%2542%2561%257A", "http://example.net/%42%61%7A"); + // The second iteration should return the original string + yield return Tuple.Create("http://example.net/%42%61%7A", "http://example.net/Baz"); } public static IEnumerable> UrlEncode_SharedTestData() diff --git a/src/System.Web.HttpUtility/tests/HttpUtility/HttpUtilityTest.cs b/src/System.Web.HttpUtility/tests/HttpUtility/HttpUtilityTest.cs index 42f5b1e63e85..c1eca07104ac 100644 --- a/src/System.Web.HttpUtility/tests/HttpUtility/HttpUtilityTest.cs +++ b/src/System.Web.HttpUtility/tests/HttpUtility/HttpUtilityTest.cs @@ -462,7 +462,11 @@ public void ParseQueryString_ToString() new object[] { "http://example.net/\uFFFD", "http://example.net/\uD800" }, new object[] { "http://example.net/\uFFFDa", "http://example.net/\uD800a" }, new object[] { "http://example.net/\uFFFD", "http://example.net/\uDC00" }, - new object[] { "http://example.net/\uFFFDa", "http://example.net/\uDC00a" } + new object[] { "http://example.net/\uFFFDa", "http://example.net/\uDC00a" }, + // The "Baz" portion of "http://example.net/Baz" has been double-encoded - one iteration of UrlDecode() should produce a once-encoded string. + new object[] { "http://example.net/%42%61%7A", "http://example.net/%2542%2561%257A"}, + // The second iteration should return the original string + new object[] { "http://example.net/Baz", "http://example.net/%42%61%7A"} }; public static IEnumerable UrlDecodeDataToBytes => From e7987803c5b9b5d57d3f98b242839a826a19a00d Mon Sep 17 00:00:00 2001 From: Santiago Fernandez Madero Date: Fri, 31 May 2019 11:50:12 -0700 Subject: [PATCH 597/607] Update package index and harvest props to reflect WinHttpHandler update (#38083) * Update package index and harvest props to reflect WinHttpHandler updte * Fix packageIndex * Update Package index for missing stable package 4.3.3 entry --- external/harvestPackages/harvestPackages.props | 2 +- .../packageIndex.json | 13 ++++++++----- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/external/harvestPackages/harvestPackages.props b/external/harvestPackages/harvestPackages.props index 4458f9dd6c83..38fa48fdd21a 100644 --- a/external/harvestPackages/harvestPackages.props +++ b/external/harvestPackages/harvestPackages.props @@ -101,7 +101,7 @@ 4.5.0 - 4.5.3 + 4.5.4 4.5.3 diff --git a/pkg/Microsoft.Private.PackageBaseline/packageIndex.json b/pkg/Microsoft.Private.PackageBaseline/packageIndex.json index dbf89400d9d7..18f5f8a3eb15 100644 --- a/pkg/Microsoft.Private.PackageBaseline/packageIndex.json +++ b/pkg/Microsoft.Private.PackageBaseline/packageIndex.json @@ -2742,17 +2742,20 @@ "4.0.0", "4.0.1", "4.3.0", + "4.3.3", "4.4.0", "4.5.0", "4.5.1", "4.5.2", - "4.5.3" + "4.5.3", + "4.5.4" ], "BaselineVersion": "4.6.0", "InboxOn": {}, "AssemblyVersionInPackageVersion": { "4.0.0.0": "4.0.0", "4.0.1.0": "4.3.0", + "4.0.1.3": "4.3.3", "4.0.2.0": "4.4.0", "4.0.3.0": "4.5.0", "4.0.3.1": "4.5.1", @@ -3413,8 +3416,8 @@ "InboxOn": { "netcoreapp2.0": "4.1.0.0", "netcoreapp2.1": "4.1.1.0", - "netstandard2.1": "4.0.0.0", "net45": "4.0.0.0", + "netstandard2.1": "4.0.0.0", "monoandroid10": "Any", "xamarinmac20": "Any" }, @@ -3435,9 +3438,9 @@ "BaselineVersion": "4.3.0", "InboxOn": { "netcoreapp2.0": "4.0.3.0", - "netstandard2.1": "4.0.0.0", "net45": "4.0.0.0", "portable45-net45+wp8": "4.0.0.0", + "netstandard2.1": "4.0.0.0", "monoandroid10": "Any", "monotouch10": "Any", "wp8": "4.0.0.0", @@ -3462,9 +3465,9 @@ "BaselineVersion": "4.3.0", "InboxOn": { "netcoreapp2.0": "4.0.3.0", - "netstandard2.1": "4.0.0.0", "net45": "4.0.0.0", "portable45-net45+wp8": "4.0.0.0", + "netstandard2.1": "4.0.0.0", "monoandroid10": "Any", "monotouch10": "Any", "wp8": "4.0.0.0", @@ -6024,4 +6027,4 @@ "System.Xml.XDocument" ] } -} +} \ No newline at end of file From 40f031a7c7a8241f92a9f6d7f269dc99228d2893 Mon Sep 17 00:00:00 2001 From: Viktor Hofer Date: Fri, 31 May 2019 20:51:09 +0200 Subject: [PATCH 598/607] Check regex timeout in loops and repetitions (#38091) * Check regex timeout in loops and repetitions Check the regex timeout in SetLoop and SetRepetition opcodes to avoid the timeout not being handled. * PR feedback and fix OOM --- .../Text/RegularExpressions/RegexCompiler.cs | 44 +++++++++++++++++++ .../RegularExpressions/RegexInterpreter.cs | 19 ++++++++ .../tests/Regex.Match.Tests.cs | 25 +++++++++++ 3 files changed, 88 insertions(+) diff --git a/src/System.Text.RegularExpressions/src/System/Text/RegularExpressions/RegexCompiler.cs b/src/System.Text.RegularExpressions/src/System/Text/RegularExpressions/RegexCompiler.cs index 3da864922acd..84cd50fb9621 100644 --- a/src/System.Text.RegularExpressions/src/System/Text/RegularExpressions/RegexCompiler.cs +++ b/src/System.Text.RegularExpressions/src/System/Text/RegularExpressions/RegexCompiler.cs @@ -73,6 +73,7 @@ internal abstract class RegexCompiler private LocalBuilder _temp2V; private LocalBuilder _temp3V; private LocalBuilder _cultureV; // current culture is cached in local variable to prevent many thread local storage accesses for CultureInfo.CurrentCulture + private LocalBuilder _loopV; // counter for setrep and setloop protected RegexCode _code; // the RegexCode object (used for debugging only) protected int[] _codes; // the RegexCodes being translated @@ -111,6 +112,7 @@ internal abstract class RegexCompiler private const int Lazybranchcountback2 = 8; // back2 part of lazybranchcount private const int Forejumpback = 9; // back part of forejump private const int Uniquecount = 10; + private const int LoopTimeoutCheckCount = 2048; // A conservative value to guarantee the correct timeout handling. static RegexCompiler() { @@ -368,6 +370,22 @@ private void Ret() _ilg.Emit(OpCodes.Ret); } + /* + * A macro for _ilg.Emit(OpCodes.Rem) + */ + private void Rem() + { + _ilg.Emit(OpCodes.Rem); + } + + /* + * A macro for _ilg.Emit(OpCodes.Ceq) + */ + private void Ceq() + { + _ilg.Emit(OpCodes.Ceq); + } + /* * A macro for _ilg.Emit(OpCodes.Pop) */ @@ -1602,6 +1620,7 @@ protected void GenerateGo() _tempV = DeclareInt(); _temp2V = DeclareInt(); _temp3V = DeclareInt(); + _loopV = DeclareInt(); _textbegV = DeclareInt(); _textendV = DeclareInt(); _textstartV = DeclareInt(); @@ -2787,6 +2806,7 @@ private void GenerateOneCode() if (Code() == RegexCode.Setrep) { + EmitTimeoutCheck(); Ldstr(_strings[Operand(0)]); Call(s_charInSetM); @@ -2896,6 +2916,7 @@ private void GenerateOneCode() if (Code() == RegexCode.Setloop) { + EmitTimeoutCheck(); Ldstr(_strings[Operand(0)]); Call(s_charInSetM); @@ -3105,5 +3126,28 @@ private void GenerateOneCode() throw new NotImplementedException(SR.UnimplementedState); } } + + private void EmitTimeoutCheck() + { + Label label = DefineLabel(); + + // Increment counter for each loop iteration. + Ldloc(_loopV); + Ldc(1); + Add(); + Stloc(_loopV); + + // Emit code to check the timeout every 2000th-iteration. + Ldloc(_loopV); + Ldc(LoopTimeoutCheckCount); + Rem(); + Ldc(0); + Ceq(); + Brfalse(label); + Ldthis(); + Callvirt(s_checkTimeoutM); + + MarkLabel(label); + } } } diff --git a/src/System.Text.RegularExpressions/src/System/Text/RegularExpressions/RegexInterpreter.cs b/src/System.Text.RegularExpressions/src/System/Text/RegularExpressions/RegexInterpreter.cs index 917075739218..f006522dfa59 100644 --- a/src/System.Text.RegularExpressions/src/System/Text/RegularExpressions/RegexInterpreter.cs +++ b/src/System.Text.RegularExpressions/src/System/Text/RegularExpressions/RegexInterpreter.cs @@ -18,6 +18,7 @@ internal sealed class RegexInterpreter : RegexRunner private int _codepos; private bool _rightToLeft; private bool _caseInsensitive; + private const int LoopTimeoutCheckCount = 2048; // A conservative value to guarantee the correct timeout handling. public RegexInterpreter(RegexCode code, CultureInfo culture) { @@ -964,8 +965,18 @@ protected override void Go() string set = _code.Strings[Operand(0)]; while (c-- > 0) + { + // Check the timeout every 2000th iteration. The additional if check + // in every iteration can be neglected as the cost of the CharInClass + // check is many times higher. + if ((uint)c % LoopTimeoutCheckCount == 0) + { + CheckTimeout(); + } + if (!RegexCharClass.CharInClass(Forwardcharnext(), set)) goto BreakBackward; + } advance = 2; continue; @@ -1035,6 +1046,14 @@ protected override void Go() for (i = c; i > 0; i--) { + // Check the timeout every 2000th iteration. The additional if check + // in every iteration can be neglected as the cost of the CharInClass + // check is many times higher. + if ((uint)i % LoopTimeoutCheckCount == 0) + { + CheckTimeout(); + } + if (!RegexCharClass.CharInClass(Forwardcharnext(), set)) { Backwardnext(); diff --git a/src/System.Text.RegularExpressions/tests/Regex.Match.Tests.cs b/src/System.Text.RegularExpressions/tests/Regex.Match.Tests.cs index 1571757ca5db..9ca5c39f740a 100644 --- a/src/System.Text.RegularExpressions/tests/Regex.Match.Tests.cs +++ b/src/System.Text.RegularExpressions/tests/Regex.Match.Tests.cs @@ -380,6 +380,31 @@ public void Match_Timeout_Throws() }).Dispose(); } + // On 32-bit we can't test these high inputs as they cause OutOfMemoryExceptions. + [ConditionalTheory(typeof(Environment), nameof(Environment.Is64BitProcess))] + [InlineData(RegexOptions.Compiled)] + [InlineData(RegexOptions.None)] + public void Match_Timeout_Loop_Throws(RegexOptions options) + { + var regex = new Regex(@"a\s+", options, TimeSpan.FromSeconds(1)); + string input = @"a" + new string(' ', 800_000_000) + @"b"; + + Assert.Throws(() => regex.Match(input)); + } + + // On 32-bit we can't test these high inputs as they cause OutOfMemoryExceptions. + [ConditionalTheory(typeof(Environment), nameof(Environment.Is64BitProcess))] + [InlineData(RegexOptions.Compiled)] + [InlineData(RegexOptions.None)] + public void Match_Timeout_Repetition_Throws(RegexOptions options) + { + int repetitionCount = 800_000_000; + var regex = new Regex(@"a\s{" + repetitionCount+ "}", options, TimeSpan.FromSeconds(1)); + string input = @"a" + new string(' ', repetitionCount) + @"b"; + + Assert.Throws(() => regex.Match(input)); + } + public static IEnumerable Match_Advanced_TestData() { // \B special character escape: ".*\\B(SUCCESS)\\B.*" From a7ad25c7749cbd8ede10119a2e0ab43276192d8e Mon Sep 17 00:00:00 2001 From: Steve Harter Date: Fri, 31 May 2019 11:55:12 -0700 Subject: [PATCH 599/607] Add (de)serialization support for Base64 string as Byte array (#38106) * Add (de)serialization for Base64 string as Byte array * Review feedback --- .../src/System.Text.Json.csproj | 1 + .../Converters/DefaultConverters.cs | 4 +- .../Converters/JsonValueConverterByteArray.cs | 32 +++++++++ .../Serialization/JsonPropertyInfoCommon.cs | 1 - .../tests/Serialization/Array.ReadTests.cs | 72 +++++++++++++++++++ .../tests/Serialization/Array.WriteTests.cs | 33 +++++++++ .../TestClasses.SimpleTestClass.cs | 2 +- .../TestClasses.SimpleTestStruct.cs | 2 +- 8 files changed, 143 insertions(+), 4 deletions(-) create mode 100644 src/System.Text.Json/src/System/Text/Json/Serialization/Converters/JsonValueConverterByteArray.cs diff --git a/src/System.Text.Json/src/System.Text.Json.csproj b/src/System.Text.Json/src/System.Text.Json.csproj index 3fde4c3bec84..3fc23f52df5e 100644 --- a/src/System.Text.Json/src/System.Text.Json.csproj +++ b/src/System.Text.Json/src/System.Text.Json.csproj @@ -57,6 +57,7 @@ + diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/DefaultConverters.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/DefaultConverters.cs index bc33704e3976..8bc855bd7220 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/DefaultConverters.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/DefaultConverters.cs @@ -11,9 +11,10 @@ internal static class DefaultConverters { private static readonly Dictionary s_valueConverters = new Dictionary() { + { typeof(byte[]), new JsonValueConverterByteArray() }, { typeof(DateTimeOffset), new JsonValueConverterDateTimeOffset() }, { typeof(Guid), new JsonValueConverterGuid() }, - { typeof(JsonElement), new JsonValueConverterJsonElement() } + { typeof(JsonElement), new JsonValueConverterJsonElement() }, }; internal static bool IsValueConvertable(Type type) @@ -32,6 +33,7 @@ internal static object Create(Type type) new object[] { false }, culture: null); } + TypeCode typeCode = Type.GetTypeCode(type); switch (typeCode) { diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/JsonValueConverterByteArray.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/JsonValueConverterByteArray.cs new file mode 100644 index 000000000000..b232293b4d80 --- /dev/null +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/JsonValueConverterByteArray.cs @@ -0,0 +1,32 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Text.Json.Serialization.Policies; + +namespace System.Text.Json.Serialization.Converters +{ + internal sealed class JsonValueConverterByteArray : JsonValueConverter + { + public override bool TryRead(Type valueType, ref Utf8JsonReader reader, out byte[] value) + { + if (reader.TokenType != JsonTokenType.String) + { + value = default; + return false; + } + + return reader.TryGetBytesFromBase64(out value); + } + + public override void Write(byte[] value, Utf8JsonWriter writer) + { + writer.WriteBase64StringValue(value); + } + + public override void Write(JsonEncodedText propertyName, byte[] value, Utf8JsonWriter writer) + { + writer.WriteBase64String(propertyName, value); + } + } +} diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfoCommon.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfoCommon.cs index 22be588e0fa0..222d1cb63af3 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfoCommon.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfoCommon.cs @@ -50,7 +50,6 @@ public override void Initialize( IsPropertyPolicy = true; HasGetter = true; HasSetter = true; - ValueConverter = DefaultConverters.s_converter; } GetPolicies(); diff --git a/src/System.Text.Json/tests/Serialization/Array.ReadTests.cs b/src/System.Text.Json/tests/Serialization/Array.ReadTests.cs index d87f133989f9..aeddfbb51486 100644 --- a/src/System.Text.Json/tests/Serialization/Array.ReadTests.cs +++ b/src/System.Text.Json/tests/Serialization/Array.ReadTests.cs @@ -25,6 +25,78 @@ public static void ReadObjectArray() i[1].Verify(); } + [Fact] + public static void ReadNullByteArray() + { + string json = @"null"; + byte[] arr = JsonSerializer.Parse(json); + Assert.Null(arr); + } + + [Fact] + public static void ReadEmptyByteArray() + { + string json = @""""""; + byte[] arr = JsonSerializer.Parse(json); + Assert.Equal(0, arr.Length); + } + + [Fact] + public static void ReadByteArray() + { + string json = $"\"{Convert.ToBase64String(new byte[] { 1, 2 })}\""; + byte[] arr = JsonSerializer.Parse(json); + + Assert.Equal(2, arr.Length); + Assert.Equal(1, arr[0]); + Assert.Equal(2, arr[1]); + } + + [Fact] + public static void Read2dByteArray() + { + // Baseline for comparison. + Assert.Equal("AQI=", Convert.ToBase64String(new byte[] { 1, 2 })); + + string json = "[\"AQI=\",\"AQI=\"]"; + byte[][] arr = JsonSerializer.Parse(json); + Assert.Equal(2, arr.Length); + + Assert.Equal(2, arr[0].Length); + Assert.Equal(1, arr[0][0]); + Assert.Equal(2, arr[0][1]); + + Assert.Equal(2, arr[1].Length); + Assert.Equal(1, arr[1][0]); + Assert.Equal(2, arr[1][1]); + } + + [Fact] + public static void ReadByteArrayFail() + { + Assert.Throws(() => JsonSerializer.Parse(@"""1""")); + Assert.Throws(() => JsonSerializer.Parse(@"""A===""")); + } + + [Fact] + public static void ReadByteArrayAsJsonArrayFail() + { + string json = $"[1, 2]"; + // Currently no support deserializing JSON arrays as byte[] - only Base64 string. + Assert.Throws(() => JsonSerializer.Parse(json)); + } + + [Fact] + public static void ReadByteListAsJsonArray() + { + string json = $"[1, 2]"; + List list = JsonSerializer.Parse>(json); + + Assert.Equal(2, list.Count); + Assert.Equal(1, list[0]); + Assert.Equal(2, list[1]); + } + [Fact] public static void DeserializeObjectArray_36167() { diff --git a/src/System.Text.Json/tests/Serialization/Array.WriteTests.cs b/src/System.Text.Json/tests/Serialization/Array.WriteTests.cs index 65ef8bbe0e57..7af9123da9e9 100644 --- a/src/System.Text.Json/tests/Serialization/Array.WriteTests.cs +++ b/src/System.Text.Json/tests/Serialization/Array.WriteTests.cs @@ -25,6 +25,39 @@ public static void WriteArrayWithEnums() Assert.Equal("[1,2]", json); } + [Fact] + public static void WriteNullByteArray() + { + byte[] input = null; + string json = JsonSerializer.ToString(input); + Assert.Equal($"null", json); + } + + [Fact] + public static void WriteEmptyByteArray() + { + var input = new byte[] {}; + string json = JsonSerializer.ToString(input); + Assert.Equal(@"""""", json); + } + + [Fact] + public static void WriteByteArray() + { + var input = new byte[] { 1, 2 }; + string json = JsonSerializer.ToString(input); + Assert.Equal($"\"{Convert.ToBase64String(input)}\"", json); + } + + [Fact] + public static void WriteTwo2dByteArray() + { + var inner = new byte[] { 1, 2 }; + var outer = new byte[2][] { inner, inner }; + string json = JsonSerializer.ToString(outer); + Assert.Equal($"[\"{Convert.ToBase64String(inner)}\",\"{Convert.ToBase64String(inner)}\"]", json); + } + [Fact] public static void WriteObjectArray() { diff --git a/src/System.Text.Json/tests/Serialization/TestClasses.SimpleTestClass.cs b/src/System.Text.Json/tests/Serialization/TestClasses.SimpleTestClass.cs index ba69ea656bdf..31a28a5412b6 100644 --- a/src/System.Text.Json/tests/Serialization/TestClasses.SimpleTestClass.cs +++ b/src/System.Text.Json/tests/Serialization/TestClasses.SimpleTestClass.cs @@ -111,7 +111,7 @@ public class SimpleTestClass : ITestClass @"""MyUInt16Array"" : [4]," + @"""MyUInt32Array"" : [5]," + @"""MyUInt64Array"" : [6]," + - @"""MyByteArray"" : [7]," + + @"""MyByteArray"" : ""Bw==""," + // Base64 encoded value of 7 @"""MySByteArray"" : [8]," + @"""MyCharArray"" : [""a""]," + @"""MyStringArray"" : [""Hello""]," + diff --git a/src/System.Text.Json/tests/Serialization/TestClasses.SimpleTestStruct.cs b/src/System.Text.Json/tests/Serialization/TestClasses.SimpleTestStruct.cs index a5fac97a6219..3a40d7f9a0c6 100644 --- a/src/System.Text.Json/tests/Serialization/TestClasses.SimpleTestStruct.cs +++ b/src/System.Text.Json/tests/Serialization/TestClasses.SimpleTestStruct.cs @@ -83,7 +83,7 @@ public class SimpleTestStruct : ITestClass @"""MyUInt16Array"" : [4]," + @"""MyUInt32Array"" : [5]," + @"""MyUInt64Array"" : [6]," + - @"""MyByteArray"" : [7]," + + @"""MyByteArray"" : ""Bw==""," + // Base64 encoded value of 7 @"""MySByteArray"" : [8]," + @"""MyCharArray"" : [""a""]," + @"""MyStringArray"" : [""Hello""]," + From 1c1b78f7ec1d04aeac059d3d4e4c975d3a3ad23e Mon Sep 17 00:00:00 2001 From: Ahson Khan Date: Fri, 31 May 2019 11:57:15 -0700 Subject: [PATCH 600/607] Add JsonSerializer overload that takes Utf8JsonReader. (#38088) * Initial commit of serializer overload that takes reader. * Move utf8jsonreader api to a new file. * Add more reader tests and update some exception cases. * Add start of WriteValue API. * Add the new files that were missed in previous commit. * Remove writer related changes. --- src/System.Text.Json/ref/System.Text.Json.cs | 2 + .../src/Resources/Strings.resx | 6 + .../src/System.Text.Json.csproj | 1 + .../Serialization/JsonSerializer.Read.Span.cs | 1 - .../JsonSerializer.Read.Utf8JsonReader.cs | 323 ++++++++++++ .../Serialization/JsonSerializer.Write.cs | 1 - .../src/System/Text/Json/ThrowHelper.cs | 10 +- .../tests/Serialization/ReadValueTests.cs | 497 ++++++++++++++++++ .../tests/System.Text.Json.Tests.csproj | 1 + 9 files changed, 839 insertions(+), 3 deletions(-) create mode 100644 src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.Utf8JsonReader.cs create mode 100644 src/System.Text.Json/tests/Serialization/ReadValueTests.cs diff --git a/src/System.Text.Json/ref/System.Text.Json.cs b/src/System.Text.Json/ref/System.Text.Json.cs index 664f72ace281..ebda0cbd00a5 100644 --- a/src/System.Text.Json/ref/System.Text.Json.cs +++ b/src/System.Text.Json/ref/System.Text.Json.cs @@ -388,6 +388,8 @@ public JsonPropertyNameAttribute(string name) { } } public static partial class JsonSerializer { + public static object ReadValue(ref Utf8JsonReader reader, Type returnType, JsonSerializerOptions options = null) { throw null; } + public static TValue ReadValue(ref Utf8JsonReader reader, JsonSerializerOptions options = null) { throw null; } public static object Parse(System.ReadOnlySpan utf8Json, System.Type returnType, System.Text.Json.Serialization.JsonSerializerOptions options = null) { throw null; } public static object Parse(string json, System.Type returnType, System.Text.Json.Serialization.JsonSerializerOptions options = null) { throw null; } public static TValue Parse(System.ReadOnlySpan utf8Json, System.Text.Json.Serialization.JsonSerializerOptions options = null) { throw null; } diff --git a/src/System.Text.Json/src/Resources/Strings.resx b/src/System.Text.Json/src/Resources/Strings.resx index 6d3f7981d09a..ab7ec9443b31 100644 --- a/src/System.Text.Json/src/Resources/Strings.resx +++ b/src/System.Text.Json/src/Resources/Strings.resx @@ -182,6 +182,9 @@ The input does not contain any JSON tokens. Expected the input to start with a valid JSON token, when isFinalBlock is true. + + The input does not contain any complete JSON tokens. Expected the input to have at least one valid, complete, JSON token. + '{0}' is an invalid end of a number. Expected 'E' or 'e'. @@ -368,6 +371,9 @@ Cannot skip tokens on partial JSON. Either get the whole payload and create a Utf8JsonReader instance where isFinalBlock is true or call TrySkip. + + There is not enough data to read through the entire JSON array or object. + Comments cannot be stored when deserializing objects, only the Skip and Disallow comment handling modes are supported. diff --git a/src/System.Text.Json/src/System.Text.Json.csproj b/src/System.Text.Json/src/System.Text.Json.csproj index 3fc23f52df5e..6010ed1827a7 100644 --- a/src/System.Text.Json/src/System.Text.Json.csproj +++ b/src/System.Text.Json/src/System.Text.Json.csproj @@ -100,6 +100,7 @@ + diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.Span.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.Span.cs index 3d2ebb6de47f..d3a9801feed4 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.Span.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.Span.cs @@ -37,7 +37,6 @@ public static TValue Parse(ReadOnlySpan utf8Json, JsonSerializerOp /// is not compatible with the JSON, /// or when there is remaining data in the Stream. /// - public static object Parse(ReadOnlySpan utf8Json, Type returnType, JsonSerializerOptions options = null) { if (returnType == null) diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.Utf8JsonReader.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.Utf8JsonReader.cs new file mode 100644 index 000000000000..b444bc1d55a2 --- /dev/null +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.Utf8JsonReader.cs @@ -0,0 +1,323 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Buffers; +using System.Diagnostics; + +namespace System.Text.Json.Serialization +{ + public static partial class JsonSerializer + { + /// + /// Reads one JSON value (including objects or arrays) from the provided reader into a . + /// + /// A representation of the JSON value. + /// The reader to read. + /// Options to control the serializer behavior during reading. + /// + /// Thrown when the JSON is invalid, + /// is not compatible with the JSON, + /// or a value could not be read from the reader. + /// + /// + /// is using unsupported options. + /// + /// + /// + /// If the property of + /// is or , the + /// reader will be advanced by one call to to determine + /// the start of the value. + /// + /// + /// + /// Upon completion of this method will be positioned at the + /// final token in the JSON value. If an exception is thrown the reader is reset to + /// the state it was in when the method was called. + /// + /// + /// + /// This method makes a copy of the data the reader acted on, so there is no caller + /// requirement to maintain data integrity beyond the return of this method. + /// + /// + /// + /// The used to create the instance of the take precedence over the when they conflict. + /// Hence, , , are used while reading. + /// + public static TValue ReadValue(ref Utf8JsonReader reader, JsonSerializerOptions options = null) + { + return (TValue)ReadValueCore(ref reader, typeof(TValue), options); + } + + /// + /// Reads one JSON value (including objects or arrays) from the provided reader into a . + /// + /// A representation of the JSON value. + /// The reader to read. + /// The type of the object to convert to and return. + /// Options to control the serializer behavior during reading. + /// + /// Thrown if is null. + /// + /// + /// Thrown when the JSON is invalid, + /// is not compatible with the JSON, + /// or a value could not be read from the reader. + /// + /// + /// is using unsupported options. + /// + /// + /// + /// If the property of + /// is or , the + /// reader will be advanced by one call to to determine + /// the start of the value. + /// + /// + /// + /// Upon completion of this method will be positioned at the + /// final token in the JSON value. If an exception is thrown the reader is reset to + /// the state it was in when the method was called. + /// + /// + /// + /// This method makes a copy of the data the reader acted on, so there is no caller + /// requirement to maintain data integrity beyond the return of this method. + /// + /// + /// + /// The used to create the instance of the take precedence over the when they conflict. + /// Hence, , , are used while reading. + /// + public static object ReadValue(ref Utf8JsonReader reader, Type returnType, JsonSerializerOptions options = null) + { + if (returnType == null) + throw new ArgumentNullException(nameof(returnType)); + + return ReadValueCore(ref reader, returnType, options); + } + + private static object ReadValueCore(ref Utf8JsonReader reader, Type returnType, JsonSerializerOptions options) + { + if (options == null) + { + options = JsonSerializerOptions.s_defaultOptions; + } + + ReadStack readStack = default; + readStack.Current.Initialize(returnType, options); + + ReadValueCore(options, ref reader, ref readStack); + + return readStack.Current.ReturnValue; + } + + private static void CheckSupportedOptions(JsonReaderOptions readerOptions, string paramName) + { + if (readerOptions.CommentHandling == JsonCommentHandling.Allow) + { + throw new ArgumentException(SR.JsonSerializerDoesNotSupportComments, paramName); + } + } + + private static void ReadValueCore(JsonSerializerOptions options, ref Utf8JsonReader reader, ref ReadStack readStack) + { + JsonReaderState state = reader.CurrentState; + CheckSupportedOptions(state.Options, nameof(reader)); + + // Value copy to overwrite the ref on an exception and undo the destructive reads. + Utf8JsonReader restore = reader; + + ReadOnlySpan valueSpan = default; + ReadOnlySequence valueSequence = default; + + try + { + switch (reader.TokenType) + { + // A new reader was created and has never been read, + // so we need to move to the first token. + // (or a reader has terminated and we're about to throw) + case JsonTokenType.None: + // Using a reader loop the caller has identified a property they wish to + // hydrate into a JsonDocument. Move to the value first. + case JsonTokenType.PropertyName: + { + if (!reader.Read()) + { + ThrowHelper.ThrowJsonReaderException(ref reader, ExceptionResource.ExpectedOneCompleteToken); + } + break; + } + } + + switch (reader.TokenType) + { + // Any of the "value start" states are acceptable. + case JsonTokenType.StartObject: + case JsonTokenType.StartArray: + { + long startingOffset = reader.TokenStartIndex; + + if (!reader.TrySkip()) + { + ThrowHelper.ThrowJsonReaderException(ref reader, ExceptionResource.NotEnoughData); + } + + long totalLength = reader.BytesConsumed - startingOffset; + ReadOnlySequence sequence = reader.OriginalSequence; + + if (sequence.IsEmpty) + { + valueSpan = reader.OriginalSpan.Slice( + checked((int)startingOffset), + checked((int)totalLength)); + } + else + { + valueSequence = sequence.Slice(startingOffset, totalLength); + } + + Debug.Assert( + reader.TokenType == JsonTokenType.EndObject || + reader.TokenType == JsonTokenType.EndArray); + + break; + } + + // Single-token values + case JsonTokenType.Number: + case JsonTokenType.True: + case JsonTokenType.False: + case JsonTokenType.Null: + { + if (reader.HasValueSequence) + { + valueSequence = reader.ValueSequence; + } + else + { + valueSpan = reader.ValueSpan; + } + + break; + } + // String's ValueSequence/ValueSpan omits the quotes, we need them back. + case JsonTokenType.String: + { + ReadOnlySequence sequence = reader.OriginalSequence; + + if (sequence.IsEmpty) + { + // Since the quoted string fit in a ReadOnlySpan originally + // the contents length plus the two quotes can't overflow. + int payloadLength = reader.ValueSpan.Length + 2; + Debug.Assert(payloadLength > 1); + + ReadOnlySpan readerSpan = reader.OriginalSpan; + + Debug.Assert( + readerSpan[(int)reader.TokenStartIndex] == (byte)'"', + $"Calculated span starts with {readerSpan[(int)reader.TokenStartIndex]}"); + + Debug.Assert( + readerSpan[(int)reader.TokenStartIndex + payloadLength - 1] == (byte)'"', + $"Calculated span ends with {readerSpan[(int)reader.TokenStartIndex + payloadLength - 1]}"); + + valueSpan = readerSpan.Slice((int)reader.TokenStartIndex, payloadLength); + } + else + { + long payloadLength = 2; + + if (reader.HasValueSequence) + { + payloadLength += reader.ValueSequence.Length; + } + else + { + payloadLength += reader.ValueSpan.Length; + } + + valueSequence = sequence.Slice(reader.TokenStartIndex, payloadLength); + Debug.Assert( + valueSequence.First.Span[0] == (byte)'"', + $"Calculated sequence starts with {valueSequence.First.Span[0]}"); + + Debug.Assert( + valueSequence.ToArray()[payloadLength - 1] == (byte)'"', + $"Calculated sequence ends with {valueSequence.ToArray()[payloadLength - 1]}"); + } + + break; + } + default: + { + byte displayByte; + + if (reader.HasValueSequence) + { + displayByte = reader.ValueSequence.First.Span[0]; + } + else + { + displayByte = reader.ValueSpan[0]; + } + + ThrowHelper.ThrowJsonReaderException( + ref reader, + ExceptionResource.ExpectedStartOfValueNotFound, + displayByte); + + break; + } + } + } + catch (JsonReaderException e) + { + reader = restore; + // Re-throw with Path information. + ThrowHelper.ReThrowWithPath(e, readStack.JsonPath); + } + + int length = valueSpan.IsEmpty ? checked((int)valueSequence.Length) : valueSpan.Length; + byte[] rented = ArrayPool.Shared.Rent(length); + Span rentedSpan = rented.AsSpan(0, length); + + try + { + if (valueSpan.IsEmpty) + { + valueSequence.CopyTo(rentedSpan); + } + else + { + valueSpan.CopyTo(rentedSpan); + } + + var newReader = new Utf8JsonReader(rentedSpan, isFinalBlock: true, state: default); + + ReadCore(options, ref newReader, ref readStack); + + if (newReader.BytesConsumed != length) + { + state = newReader.CurrentState; + ThrowHelper.ThrowJsonException_DeserializeDataRemaining(length, length - state.BytesConsumed); + } + } + catch (JsonException) + { + reader = restore; + throw; + } + finally + { + rentedSpan.Clear(); + ArrayPool.Shared.Return(rented); + } + } + } +} diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.cs index c9a9e4a762bb..d66a77799b2d 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System.Buffers; using System.Diagnostics; namespace System.Text.Json.Serialization diff --git a/src/System.Text.Json/src/System/Text/Json/ThrowHelper.cs b/src/System.Text.Json/src/System/Text/Json/ThrowHelper.cs index efed281f3157..a7c15785dee9 100644 --- a/src/System.Text.Json/src/System/Text/Json/ThrowHelper.cs +++ b/src/System.Text.Json/src/System/Text/Json/ThrowHelper.cs @@ -349,6 +349,12 @@ private static string GetResourceString(ref Utf8JsonReader json, ExceptionResour case ExceptionResource.ExpectedJsonTokens: message = SR.ExpectedJsonTokens; break; + case ExceptionResource.NotEnoughData: + message = SR.NotEnoughData; + break; + case ExceptionResource.ExpectedOneCompleteToken: + message = SR.ExpectedOneCompleteToken; + break; case ExceptionResource.InvalidCharacterAtStartOfComment: message = SR.Format(SR.InvalidCharacterAtStartOfComment, character); break; @@ -566,7 +572,9 @@ internal enum ExceptionResource TrailingCommaNotAllowedBeforeArrayEnd, TrailingCommaNotAllowedBeforeObjectEnd, InvalidCharacterAtStartOfComment, - UnexpectedEndOfDataWhileReadingComment + UnexpectedEndOfDataWhileReadingComment, + ExpectedOneCompleteToken, + NotEnoughData } internal enum NumericType diff --git a/src/System.Text.Json/tests/Serialization/ReadValueTests.cs b/src/System.Text.Json/tests/Serialization/ReadValueTests.cs new file mode 100644 index 000000000000..9bfc05716607 --- /dev/null +++ b/src/System.Text.Json/tests/Serialization/ReadValueTests.cs @@ -0,0 +1,497 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Buffers; +using Xunit; + +namespace System.Text.Json.Serialization.Tests +{ + public static partial class ReadValueTests + { + [Fact] + public static void NullTypeThrows() + { + Assert.ThrowsAny(() => + { + Utf8JsonReader reader = default; + JsonSerializer.ReadValue(ref reader, null); + }); + } + + [Fact] + public static void SerializerOptionsStillApply() + { + var options = new JsonSerializerOptions(); + options.PropertyNameCaseInsensitive = true; + + byte[] utf8 = Encoding.UTF8.GetBytes(@"{""myint16"":1}"); + var reader = new Utf8JsonReader(utf8, isFinalBlock: true, state: default); + + SimpleTestClass obj = JsonSerializer.ReadValue(ref reader, options); + Assert.Equal(1, obj.MyInt16); + + Assert.Equal(JsonTokenType.EndObject, reader.TokenType); + } + + [Fact] + public static void ReaderOptionsWinMaxDepth() + { + byte[] utf8 = Encoding.UTF8.GetBytes("[[]]"); + + var readerOptions = new JsonReaderOptions + { + MaxDepth = 1, + }; + + var serializerOptions = new JsonSerializerOptions + { + MaxDepth = 5, + }; + + var state = new JsonReaderState(readerOptions); + + Assert.Throws(() => + { + var reader = new Utf8JsonReader(utf8, isFinalBlock: false, state); + JsonSerializer.ReadValue(ref reader, typeof(int), serializerOptions); + }); + } + + [Fact] + public static void ReaderOptionsWinTrailingCommas() + { + byte[] utf8 = Encoding.UTF8.GetBytes("[1, 2, 3,]"); + + var serializerOptions = new JsonSerializerOptions + { + AllowTrailingCommas = true, + }; + + Assert.Throws(() => + { + var reader = new Utf8JsonReader(utf8, isFinalBlock: false, state: default); + JsonSerializer.ReadValue(ref reader, typeof(int), serializerOptions); + }); + } + + [Fact] + public static void ReaderOptionsWinComments() + { + byte[] utf8 = Encoding.UTF8.GetBytes("[1, 2, 3]/* some comment */"); + + var serializerOptions = new JsonSerializerOptions + { + ReadCommentHandling = JsonCommentHandling.Skip, + }; + + Assert.Throws(() => + { + var reader = new Utf8JsonReader(utf8, isFinalBlock: false, state: default); + JsonSerializer.ReadValue(ref reader, typeof(int), serializerOptions); + }); + } + + [Fact] + public static void OnInvalidReaderIsRestored() + { + byte[] utf8 = Encoding.UTF8.GetBytes("[1, 2, 3}"); + + var reader = new Utf8JsonReader(utf8, isFinalBlock: true, state: default); + reader.Read(); + long previous = reader.BytesConsumed; + + try + { + JsonSerializer.ReadValue(ref reader, typeof(int[])); + Assert.True(false, "Expected ReadValue to throw JsonException for invalid JSON."); + } + catch (JsonException) { } + + Assert.Equal(previous, reader.BytesConsumed); + Assert.Equal(JsonTokenType.StartArray, reader.TokenType); + } + + [Fact] + public static void DataRemaining() + { + byte[] utf8 = Encoding.UTF8.GetBytes("{\"Foo\":\"abc\", \"Bar\":123}"); + + var reader = new Utf8JsonReader(utf8, isFinalBlock: true, state: default); + reader.Read(); + + SimpleType instance = JsonSerializer.ReadValue(ref reader); + Assert.Equal("abc", instance.Foo); + + Assert.Equal(utf8.Length, reader.BytesConsumed); + Assert.Equal(JsonTokenType.EndObject, reader.TokenType); + } + + public class SimpleType + { + public string Foo { get; set; } + } + + [Fact] + public static void ReadPropertyName() + { + byte[] utf8 = Encoding.UTF8.GetBytes("{\"Foo\":[1, 2, 3]}"); + + var reader = new Utf8JsonReader(utf8, isFinalBlock: true, state: default); + reader.Read(); + reader.Read(); + Assert.Equal(JsonTokenType.PropertyName, reader.TokenType); + + try + { + JsonSerializer.ReadValue(ref reader); + Assert.True(false, "Expected ReadValue to throw JsonException for type mismatch."); + } + catch (JsonException) { } + + Assert.Equal(JsonTokenType.PropertyName, reader.TokenType); + + int[] instance = JsonSerializer.ReadValue(ref reader); + Assert.Equal(new int[] { 1, 2, 3 }, instance); + + Assert.Equal(utf8.Length - 1, reader.BytesConsumed); + Assert.Equal(JsonTokenType.EndArray, reader.TokenType); + + Assert.True(reader.Read()); + Assert.Equal(JsonTokenType.EndObject, reader.TokenType); + Assert.False(reader.Read()); + } + + [Theory] + [InlineData(true)] + [InlineData(false)] + public static void ReadObjectMultiSegment(bool isFinalBlock) + { + byte[] utf8 = Encoding.UTF8.GetBytes("[1, 2, {\"Foo\":[1, 2, 3]}]"); + ReadOnlySequence sequence = JsonTestHelper.CreateSegments(utf8); + + var reader = new Utf8JsonReader(sequence, isFinalBlock, state: default); + reader.Read(); + reader.Read(); + reader.Read(); + reader.Read(); + Assert.Equal(JsonTokenType.StartObject, reader.TokenType); + + SimpleTypeWithArray instance = JsonSerializer.ReadValue(ref reader); + + Assert.Equal(JsonTokenType.EndObject, reader.TokenType); + Assert.Equal(new int[] { 1, 2, 3 }, instance.Foo); + Assert.Equal(utf8.Length - 1, reader.BytesConsumed); + + Assert.True(reader.Read()); + Assert.Equal(JsonTokenType.EndArray, reader.TokenType); + Assert.False(reader.Read()); + } + + [Theory] + [InlineData(true)] + [InlineData(false)] + public static void NotEnoughData(bool isFinalBlock) + { + { + byte[] utf8 = Encoding.UTF8.GetBytes("\"start of string"); + + var reader = new Utf8JsonReader(utf8, isFinalBlock, state: default); + Assert.Equal(0, reader.BytesConsumed); + Assert.Equal(JsonTokenType.None, reader.TokenType); + + try + { + JsonSerializer.ReadValue(ref reader); + Assert.True(false, "Expected ReadValue to throw JsonException for not enough data."); + } + catch (JsonException) { } + + Assert.Equal(0, reader.BytesConsumed); + Assert.Equal(JsonTokenType.None, reader.TokenType); + } + + { + byte[] utf8 = Encoding.UTF8.GetBytes("{"); + + var reader = new Utf8JsonReader(utf8, isFinalBlock, state: default); + reader.Read(); + + Assert.Equal(1, reader.BytesConsumed); + Assert.Equal(JsonTokenType.StartObject, reader.TokenType); + + try + { + JsonSerializer.ReadValue(ref reader); + Assert.True(false, "Expected ReadValue to throw JsonException for not enough data."); + } + catch (JsonException) { } + + Assert.Equal(1, reader.BytesConsumed); + Assert.Equal(JsonTokenType.StartObject, reader.TokenType); + } + } + + [Fact] + public static void EndObjectOrArrayIsInvalid() + { + byte[] utf8 = Encoding.UTF8.GetBytes("[{}]"); + + var reader = new Utf8JsonReader(utf8, isFinalBlock: true, state: default); + reader.Read(); + reader.Read(); + reader.Read(); + Assert.Equal(JsonTokenType.EndObject, reader.TokenType); + + try + { + JsonSerializer.ReadValue(ref reader); + Assert.True(false, "Expected ReadValue to throw JsonException for invalid token."); + } + catch (JsonException ex) + { + Assert.Equal(0, ex.LineNumber); + Assert.Equal(3, ex.BytePositionInLine); + Assert.Equal("$", ex.Path); + } + + Assert.Equal(JsonTokenType.EndObject, reader.TokenType); + + reader.Read(); + Assert.Equal(JsonTokenType.EndArray, reader.TokenType); + + try + { + JsonSerializer.ReadValue(ref reader); + Assert.True(false, "Expected ReadValue to throw JsonException for invalid token."); + } + catch (JsonException ex) + { + Assert.Equal(0, ex.LineNumber); + Assert.Equal(4, ex.BytePositionInLine); + Assert.Equal("$", ex.Path); + } + + Assert.Equal(JsonTokenType.EndArray, reader.TokenType); + } + + public class SimpleTypeWithArray + { + public int[] Foo { get; set; } + } + + [Theory] + [InlineData("1234", typeof(int), 1234)] + [InlineData("null", typeof(string), null)] + [InlineData("true", typeof(bool), true)] + [InlineData("false", typeof(bool), false)] + [InlineData("\"my string\"", typeof(string), "my string")] + public static void Primitives(string jsonString, Type type, object expected) + { + byte[] utf8 = Encoding.UTF8.GetBytes(jsonString); + + var reader = new Utf8JsonReader(utf8, isFinalBlock: true, state: default); + Assert.Equal(JsonTokenType.None, reader.TokenType); + + object obj = JsonSerializer.ReadValue(ref reader, type); + Assert.False(reader.HasValueSequence); + Assert.Equal(utf8.Length, reader.BytesConsumed); + Assert.Equal(expected, obj); + + Assert.False(reader.Read()); + } + + [Theory] + [InlineData("1234", typeof(int), 1234)] + [InlineData("null", typeof(string), null)] + [InlineData("true", typeof(bool), true)] + [InlineData("false", typeof(bool), false)] + [InlineData("\"my string\"", typeof(string), "my string")] + public static void PrimitivesMultiSegment(string jsonString, Type type, object expected) + { + byte[] utf8 = Encoding.UTF8.GetBytes(jsonString); + ReadOnlySequence sequence = JsonTestHelper.CreateSegments(utf8); + + var reader = new Utf8JsonReader(sequence, isFinalBlock: true, state: default); + Assert.Equal(JsonTokenType.None, reader.TokenType); + + object obj = JsonSerializer.ReadValue(ref reader, type); + Assert.True(reader.HasValueSequence); + Assert.Equal(utf8.Length, reader.BytesConsumed); + Assert.Equal(expected, obj); + + Assert.False(reader.Read()); + } + + [Fact] + public static void EnableComments() + { + string json = "3"; + + var options = new JsonReaderOptions + { + CommentHandling = JsonCommentHandling.Allow, + }; + + byte[] utf8 = Encoding.UTF8.GetBytes(json); + + AssertExtensions.Throws( + "reader", + () => + { + var state = new JsonReaderState(options); + var reader = new Utf8JsonReader(utf8, isFinalBlock: false, state); + JsonSerializer.ReadValue(ref reader, typeof(int)); + }); + + AssertExtensions.Throws( + "reader", + () => + { + var state = new JsonReaderState(options); + var reader = new Utf8JsonReader(utf8, isFinalBlock: true, state); + JsonSerializer.ReadValue(ref reader, typeof(int)); + }); + + AssertExtensions.Throws( + "reader", + () => + { + var state = new JsonReaderState(options); + var reader = new Utf8JsonReader(utf8, isFinalBlock: false, state); + JsonSerializer.ReadValue(ref reader); + }); + + AssertExtensions.Throws( + "reader", + () => + { + var state = new JsonReaderState(options); + var reader = new Utf8JsonReader(utf8, isFinalBlock: true, state); + JsonSerializer.ReadValue(ref reader); + }); + } + + [Fact] + public static void ReadDefaultReader() + { + Assert.ThrowsAny(() => + { + Utf8JsonReader reader = default; + JsonSerializer.ReadValue(ref reader, typeof(int)); + }); + + Assert.ThrowsAny(() => + { + Utf8JsonReader reader = default; + JsonSerializer.ReadValue(ref reader); + }); + } + + [Fact] + public static void ReadSimpleStruct() + { + byte[] utf8 = Encoding.UTF8.GetBytes(SimpleTestStruct.s_json); + var reader = new Utf8JsonReader(utf8, isFinalBlock: true, state: default); + SimpleTestStruct testStruct = JsonSerializer.ReadValue(ref reader); + testStruct.Verify(); + + reader = new Utf8JsonReader(utf8, isFinalBlock: true, state: default); + object obj = JsonSerializer.ReadValue(ref reader, typeof(SimpleTestStruct)); + ((SimpleTestStruct)obj).Verify(); + } + + [Fact] + public static void ReadClasses() + { + { + byte[] utf8 = Encoding.UTF8.GetBytes(TestClassWithNestedObjectInner.s_json); + var reader = new Utf8JsonReader(utf8, isFinalBlock: true, state: default); + TestClassWithNestedObjectInner testStruct = JsonSerializer.ReadValue(ref reader); + testStruct.Verify(); + + reader = new Utf8JsonReader(utf8, isFinalBlock: true, state: default); + object obj = JsonSerializer.ReadValue(ref reader, typeof(TestClassWithNestedObjectInner)); + ((TestClassWithNestedObjectInner)obj).Verify(); + } + + { + var reader = new Utf8JsonReader(TestClassWithNestedObjectOuter.s_data, isFinalBlock: true, state: default); + TestClassWithNestedObjectOuter testStruct = JsonSerializer.ReadValue(ref reader); + testStruct.Verify(); + + reader = new Utf8JsonReader(TestClassWithNestedObjectOuter.s_data, isFinalBlock: true, state: default); + object obj = JsonSerializer.ReadValue(ref reader, typeof(TestClassWithNestedObjectOuter)); + ((TestClassWithNestedObjectOuter)obj).Verify(); + } + + { + var reader = new Utf8JsonReader(TestClassWithObjectList.s_data, isFinalBlock: true, state: default); + TestClassWithObjectList testStruct = JsonSerializer.ReadValue(ref reader); + testStruct.Verify(); + + reader = new Utf8JsonReader(TestClassWithObjectList.s_data, isFinalBlock: true, state: default); + object obj = JsonSerializer.ReadValue(ref reader, typeof(TestClassWithObjectList)); + ((TestClassWithObjectList)obj).Verify(); + } + + { + var reader = new Utf8JsonReader(TestClassWithObjectArray.s_data, isFinalBlock: true, state: default); + TestClassWithObjectArray testStruct = JsonSerializer.ReadValue(ref reader); + testStruct.Verify(); + + reader = new Utf8JsonReader(TestClassWithObjectArray.s_data, isFinalBlock: true, state: default); + object obj = JsonSerializer.ReadValue(ref reader, typeof(TestClassWithObjectArray)); + ((TestClassWithObjectArray)obj).Verify(); + } + + { + var reader = new Utf8JsonReader(TestClassWithObjectIEnumerableT.s_data, isFinalBlock: true, state: default); + TestClassWithObjectIEnumerableT testStruct = JsonSerializer.ReadValue(ref reader); + testStruct.Verify(); + + reader = new Utf8JsonReader(TestClassWithObjectIEnumerableT.s_data, isFinalBlock: true, state: default); + object obj = JsonSerializer.ReadValue(ref reader, typeof(TestClassWithObjectIEnumerableT)); + ((TestClassWithObjectIEnumerableT)obj).Verify(); + } + + { + var reader = new Utf8JsonReader(TestClassWithStringToPrimitiveDictionary.s_data, isFinalBlock: true, state: default); + TestClassWithStringToPrimitiveDictionary testStruct = JsonSerializer.ReadValue(ref reader); + testStruct.Verify(); + + reader = new Utf8JsonReader(TestClassWithStringToPrimitiveDictionary.s_data, isFinalBlock: true, state: default); + object obj = JsonSerializer.ReadValue(ref reader, typeof(TestClassWithStringToPrimitiveDictionary)); + ((TestClassWithStringToPrimitiveDictionary)obj).Verify(); + } + } + + [Fact] + public static void ReadPartial() + { + byte[] utf8 = Encoding.UTF8.GetBytes("[1, 2, 3]"); + var reader = new Utf8JsonReader(utf8, isFinalBlock: true, state: default); + reader.Read(); + int[] array = JsonSerializer.ReadValue(ref reader); + var expected = new int[3] { 1, 2, 3 }; + Assert.Equal(expected, array); + + reader = new Utf8JsonReader(utf8, isFinalBlock: true, state: default); + reader.Read(); + object obj = JsonSerializer.ReadValue(ref reader, typeof(int[])); + Assert.Equal(expected, obj); + + reader = new Utf8JsonReader(utf8, isFinalBlock: true, state: default); + reader.Read(); + reader.Read(); + int number = JsonSerializer.ReadValue(ref reader); + Assert.Equal(1, number); + + reader = new Utf8JsonReader(utf8, isFinalBlock: true, state: default); + reader.Read(); + reader.Read(); + obj = JsonSerializer.ReadValue(ref reader, typeof(int)); + Assert.Equal(1, obj); + } + } +} diff --git a/src/System.Text.Json/tests/System.Text.Json.Tests.csproj b/src/System.Text.Json/tests/System.Text.Json.Tests.csproj index 5207830b29dc..ef1fcf280f4a 100644 --- a/src/System.Text.Json/tests/System.Text.Json.Tests.csproj +++ b/src/System.Text.Json/tests/System.Text.Json.Tests.csproj @@ -41,6 +41,7 @@ + From 8b8e1e00f541eea3e5178f8a1941f348c7afcdec Mon Sep 17 00:00:00 2001 From: Jeremy Kuhne Date: Fri, 31 May 2019 14:00:21 -0700 Subject: [PATCH 601/607] Fix mutating static issue The default options static was getting mutated. Moving to ReadStack which doesn't have this issue. --- .../Text/Json/Serialization/JsonSerializer.Read.Stream.cs | 2 +- .../System/Text/Json/Serialization/JsonSerializer.Read.cs | 4 ++-- .../System/Text/Json/Serialization/JsonSerializerOptions.cs | 5 ----- .../src/System/Text/Json/Serialization/ReadStack.cs | 5 +++++ .../tests/Serialization/Object.WriteTests.cs | 1 - 5 files changed, 8 insertions(+), 9 deletions(-) diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.Stream.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.Stream.cs index 61dc05e5856f..13e8e047ba2c 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.Stream.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.Stream.cs @@ -200,7 +200,7 @@ private static void ReadCore( // to enable read ahead behaviors to ensure we have complete json objects and arrays // ({}, []) when needed. (Notably to successfully parse JsonElement via JsonDocument // to assign to object and JsonElement properties in the constructed .NET object.) - options.ReadAhead = !isFinalBlock; + readStack.ReadAhead = !isFinalBlock; readStack.BytesConsumed = 0; ReadCore( diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.cs index 4d96348b0394..bdf6cd3c94a6 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.cs @@ -25,7 +25,7 @@ private static void ReadCore( while (true) { - if (options.ReadAhead) + if (readStack.ReadAhead) { // When we're reading ahead we always have to save the state // as we don't know if the next token is an opening object or @@ -130,7 +130,7 @@ private static bool HandleObjectAsValue( ref ReadStack readStack, ref JsonReaderState initialState) { - if (options.ReadAhead) + if (readStack.ReadAhead) { // Attempt to skip to make sure we have all the data we need. bool complete = reader.TrySkip(); diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializerOptions.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializerOptions.cs index 00e21f572a08..70a1cc9edec9 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializerOptions.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializerOptions.cs @@ -314,10 +314,5 @@ private void VerifyMutable() ThrowHelper.ThrowInvalidOperationException_SerializerOptionsImmutable(); } } - - /// - /// Internal flag to let us know that we need to read ahead in the inner read loop. - /// - internal bool ReadAhead { get; set; } } } diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/ReadStack.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/ReadStack.cs index be6d645b600f..ba044b4e077d 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/ReadStack.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/ReadStack.cs @@ -150,5 +150,10 @@ private string GetPropertyName(in ReadStackFrame frame) /// Bytes consumed in the current loop /// public long BytesConsumed; + + /// + /// Internal flag to let us know that we need to read ahead in the inner read loop. + /// + internal bool ReadAhead; } } diff --git a/src/System.Text.Json/tests/Serialization/Object.WriteTests.cs b/src/System.Text.Json/tests/Serialization/Object.WriteTests.cs index eccdf894e50b..1306d895a5ed 100644 --- a/src/System.Text.Json/tests/Serialization/Object.WriteTests.cs +++ b/src/System.Text.Json/tests/Serialization/Object.WriteTests.cs @@ -15,7 +15,6 @@ public static void VerifyTypeFail() Assert.Throws(() => JsonSerializer.ToString(1, typeof(string))); } - [ActiveIssue(38092)] [Theory] [MemberData(nameof(WriteSuccessCases))] public static void Write(ITestClass testObj) From 319233fe2192034b48ce7931783db8ccdba0ae47 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Fri, 31 May 2019 12:05:40 -0700 Subject: [PATCH 602/607] Update dependencies from https://github.com/dotnet/core-setup build 20190530.01 (#38097) - Microsoft.NETCore.App - 3.0.0-preview6-27730-01 - Microsoft.NETCore.DotNetHost - 3.0.0-preview6-27730-01 - Microsoft.NETCore.DotNetHostPolicy - 3.0.0-preview6-27730-01 --- eng/Version.Details.xml | 12 ++++++------ eng/Versions.props | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 95c2b2ac2462..68d4aa64cf6f 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -14,17 +14,17 @@ - + https://github.com/dotnet/core-setup - 798280671320c7613d34fadc88ec1b0e853d3d37 + 63abc77da6d99470caa5bfa0465afe244105e595 - + https://github.com/dotnet/core-setup - 798280671320c7613d34fadc88ec1b0e853d3d37 + 63abc77da6d99470caa5bfa0465afe244105e595 - + https://github.com/dotnet/core-setup - 798280671320c7613d34fadc88ec1b0e853d3d37 + 63abc77da6d99470caa5bfa0465afe244105e595 https://github.com/dotnet/corefx diff --git a/eng/Versions.props b/eng/Versions.props index 3a6e2f71b506..7d17ac9f6087 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -36,9 +36,9 @@ 2.2.0-beta.19280.2 1.0.0-beta.19280.2 - 3.0.0-preview6-27729-07 - 3.0.0-preview6-27729-07 - 3.0.0-preview6-27729-07 + 3.0.0-preview6-27730-01 + 3.0.0-preview6-27730-01 + 3.0.0-preview6-27730-01 3.0.0-preview6.19279.4 3.0.0-preview6.19279.4 From e1c0b0e612ee5c94ca282c7e81382b0f7a3f88c8 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Fri, 31 May 2019 12:26:49 -0700 Subject: [PATCH 603/607] [master] Update dependencies from dotnet/standard (#38100) * Update dependencies from https://github.com/dotnet/standard build 20190531.1 - NETStandard.Library - 2.1.0-prerelease.19281.1 * Update dependencies from https://github.com/dotnet/standard build 20190531.2 - NETStandard.Library - 2.1.0-prerelease.19281.2 --- eng/Version.Details.xml | 4 ++-- eng/Versions.props | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 68d4aa64cf6f..9caa16f3d1b9 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -38,9 +38,9 @@ https://github.com/dotnet/arcade 7c50d548001a83a18449ad4dda370122ede5fbf6 - + https://github.com/dotnet/standard - 2c94a70248b2c4379ceffbade085f8d7eca4fee0 + 4d364ea4ecaf4d5da8d6f969f70db753dcc614b0 https://github.com/dotnet/arcade diff --git a/eng/Versions.props b/eng/Versions.props index 7d17ac9f6087..40820694d419 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -46,7 +46,7 @@ 3.0.0-preview6.19281.1 4.6.0-preview6.19281.1 - 2.1.0-prerelease.19280.1 + 2.1.0-prerelease.19281.2 99.99.99-master-20190521.3 From 309017337b01dcbc91cfe11cc9117750805dc789 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Fri, 31 May 2019 13:25:15 -0700 Subject: [PATCH 604/607] [master] Update dependencies from dotnet/coreclr (#38099) * Update dependencies from https://github.com/dotnet/coreclr build 20190530.2 - Microsoft.NET.Sdk.IL - 3.0.0-preview6.19280.2 - Microsoft.NETCore.ILAsm - 3.0.0-preview6.19280.2 - Microsoft.NETCore.Runtime.CoreCLR - 3.0.0-preview6.19280.2 * Expose, test, and use Environment.TickCount64 * Back out change to WinInetProxyHelper.cs --- eng/Version.Details.xml | 12 ++++++------ eng/Versions.props | 4 ++-- global.json | 2 +- .../src/System/Net/Http/WinInetProxyHelper.cs | 2 +- .../Http/SocketsHttpHandler/Http2Connection.cs | 12 ++++++------ .../SocketsHttpHandler/HttpConnectionBase.cs | 8 ++++---- .../SocketsHttpHandler/HttpConnectionPool.cs | 18 +++++++++--------- .../HttpConnectionSettings.cs | 15 ++------------- .../ref/System.Runtime.Extensions.cs | 1 + .../tests/System/Environment.TickCount.cs | 18 +++++++++++++++++- 10 files changed, 49 insertions(+), 43 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 9caa16f3d1b9..5fda7b436343 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -1,16 +1,16 @@ - + https://github.com/dotnet/coreclr - 42d8e40e469cf00128e0cfa48f24297afa13c36f + fa8383fb28be945cae900a5579afd5920f274fd4 - + https://github.com/dotnet/coreclr - 42d8e40e469cf00128e0cfa48f24297afa13c36f + fa8383fb28be945cae900a5579afd5920f274fd4 - + https://github.com/dotnet/coreclr - 42d8e40e469cf00128e0cfa48f24297afa13c36f + fa8383fb28be945cae900a5579afd5920f274fd4 diff --git a/eng/Versions.props b/eng/Versions.props index 40820694d419..7d74ab0a8658 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -40,8 +40,8 @@ 3.0.0-preview6-27730-01 3.0.0-preview6-27730-01 - 3.0.0-preview6.19279.4 - 3.0.0-preview6.19279.4 + 3.0.0-preview6.19280.2 + 3.0.0-preview6.19280.2 3.0.0-preview6.19281.1 4.6.0-preview6.19281.1 diff --git a/global.json b/global.json index c1bad46a19a3..d71693b10a45 100644 --- a/global.json +++ b/global.json @@ -6,6 +6,6 @@ "Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19280.2", "Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19280.2", "FIX-85B6-MERGE-9C38-CONFLICT": "1.0.0", - "Microsoft.NET.Sdk.IL": "3.0.0-preview6.19279.4" + "Microsoft.NET.Sdk.IL": "3.0.0-preview6.19280.2" } } diff --git a/src/System.Net.Http.WinHttpHandler/src/System/Net/Http/WinInetProxyHelper.cs b/src/System.Net.Http.WinHttpHandler/src/System/Net/Http/WinInetProxyHelper.cs index a56bea19c77d..4a26aa83a69d 100644 --- a/src/System.Net.Http.WinHttpHandler/src/System/Net/Http/WinInetProxyHelper.cs +++ b/src/System.Net.Http.WinHttpHandler/src/System/Net/Http/WinInetProxyHelper.cs @@ -179,4 +179,4 @@ public bool GetProxyForUrl( return useProxy; } } -} +} \ No newline at end of file diff --git a/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http2Connection.cs b/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http2Connection.cs index b85233f76308..8b7b95bba16e 100644 --- a/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http2Connection.cs +++ b/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http2Connection.cs @@ -41,7 +41,7 @@ internal sealed partial class Http2Connection : HttpConnectionBase, IDisposable private int _initialWindowSize; private int _maxConcurrentStreams; private int _pendingWindowUpdate; - private int _idleSinceTickCount; + private long _idleSinceTickCount; private int _pendingWriters; private bool _disposed; @@ -1138,7 +1138,7 @@ private void Abort(Exception abortException) } /// Gets whether the connection exceeded any of the connection limits. - /// The current tick count. Passed in to amortize the cost of calling Environment.TickCount. + /// The current tick count. Passed in to amortize the cost of calling Environment.TickCount64. /// How long a connection can be open to be considered reusable. /// How long a connection can have been idle in the pool to be considered reusable. /// @@ -1149,7 +1149,7 @@ private void Abort(Exception abortException) /// the nature of connection pooling. /// - public bool IsExpired(int nowTicks, + public bool IsExpired(long nowTicks, TimeSpan connectionLifetime, TimeSpan connectionIdleTimeout) @@ -1162,9 +1162,9 @@ public bool IsExpired(int nowTicks, // Check idle timeout when there are not pending requests for a while. if ((connectionIdleTimeout != Timeout.InfiniteTimeSpan) && (_httpStreams.Count == 0) && - ((uint)(nowTicks - _idleSinceTickCount) > connectionIdleTimeout.TotalMilliseconds)) + ((nowTicks - _idleSinceTickCount) > connectionIdleTimeout.TotalMilliseconds)) { - if (NetEventSource.IsEnabled) Trace($"Connection no longer usable. Idle {TimeSpan.FromMilliseconds((uint)(nowTicks - _idleSinceTickCount))} > {connectionIdleTimeout}."); + if (NetEventSource.IsEnabled) Trace($"Connection no longer usable. Idle {TimeSpan.FromMilliseconds((nowTicks - _idleSinceTickCount))} > {connectionIdleTimeout}."); return true; } @@ -1448,7 +1448,7 @@ private void RemoveStream(Http2Stream http2Stream) if (_httpStreams.Count == 0) { // If this was last pending request, get timestamp so we can monitor idle time. - _idleSinceTickCount = Environment.TickCount; + _idleSinceTickCount = Environment.TickCount64; } if (_disposed) diff --git a/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionBase.cs b/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionBase.cs index 2e6d4320d1f8..24deb84eb07d 100644 --- a/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionBase.cs +++ b/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionBase.cs @@ -12,16 +12,16 @@ internal abstract class HttpConnectionBase public abstract Task SendAsync(HttpRequestMessage request, CancellationToken cancellationToken); internal abstract void Trace(string message, string memberName = null); - private int CreationTickCount { get; } = Environment.TickCount; + private long CreationTickCount { get; } = Environment.TickCount64; // Check if lifetime expired on connection. - public bool LifetimeExpired(int nowTicks, TimeSpan lifetime) + public bool LifetimeExpired(long nowTicks, TimeSpan lifetime) { bool expired = lifetime != Timeout.InfiniteTimeSpan && - (lifetime == TimeSpan.Zero || (uint)(nowTicks - CreationTickCount) > lifetime.TotalMilliseconds); + (lifetime == TimeSpan.Zero || (nowTicks - CreationTickCount) > lifetime.TotalMilliseconds); - if (expired && NetEventSource.IsEnabled) Trace($"Connection no longer usable. Alive {TimeSpan.FromMilliseconds((uint)(nowTicks - CreationTickCount))} > {lifetime}."); + if (expired && NetEventSource.IsEnabled) Trace($"Connection no longer usable. Alive {TimeSpan.FromMilliseconds((nowTicks - CreationTickCount))} > {lifetime}."); return expired; } } diff --git a/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionPool.cs b/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionPool.cs index ba6050598202..624de5c3e2ec 100644 --- a/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionPool.cs +++ b/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionPool.cs @@ -229,7 +229,7 @@ private ValueTask GetOrReserveHttp11ConnectionAsync(Cancellation TimeSpan pooledConnectionLifetime = _poolManager.Settings._pooledConnectionLifetime; TimeSpan pooledConnectionIdleTimeout = _poolManager.Settings._pooledConnectionIdleTimeout; - int nowTicks = Environment.TickCount; + long nowTicks = Environment.TickCount64; List list = _idleConnections; // Try to find a usable cached connection. @@ -340,7 +340,7 @@ private ValueTask GetOrReserveHttp11ConnectionAsync(Cancellation if (http2Connection != null) { TimeSpan pooledConnectionLifetime = _poolManager.Settings._pooledConnectionLifetime; - if (http2Connection.LifetimeExpired(Environment.TickCount, pooledConnectionLifetime)) + if (http2Connection.LifetimeExpired(Environment.TickCount64, pooledConnectionLifetime)) { // Connection expired. http2Connection.Dispose(); @@ -797,7 +797,7 @@ public void DecrementConnectionCount() /// The connection to return. public void ReturnConnection(HttpConnection connection) { - bool lifetimeExpired = connection.LifetimeExpired(Environment.TickCount, _poolManager.Settings._pooledConnectionLifetime); + bool lifetimeExpired = connection.LifetimeExpired(Environment.TickCount64, _poolManager.Settings._pooledConnectionLifetime); if (!lifetimeExpired) { @@ -915,7 +915,7 @@ public bool CleanCacheAndDisposeIfUnused() // Get the current time. This is compared against each connection's last returned // time to determine whether a connection is too old and should be closed. - int nowTicks = Environment.TickCount; + long nowTicks = Environment.TickCount64; Http2Connection http2Connection = _http2Connection; if (http2Connection != null) @@ -1039,7 +1039,7 @@ private void Trace(string message, [CallerMemberName] string memberName = null) /// The cached connection. internal readonly HttpConnection _connection; /// The last tick count at which the connection was used. - internal readonly int _returnedTickCount; + internal readonly long _returnedTickCount; /// Initializes the cached connection and its associated metadata. /// The connection. @@ -1047,7 +1047,7 @@ public CachedConnection(HttpConnection connection) { Debug.Assert(connection != null); _connection = connection; - _returnedTickCount = Environment.TickCount; + _returnedTickCount = Environment.TickCount64; } /// Gets whether the connection is currently usable. @@ -1062,16 +1062,16 @@ public CachedConnection(HttpConnection connection) /// the nature of connection pooling. /// public bool IsUsable( - int nowTicks, + long nowTicks, TimeSpan pooledConnectionLifetime, TimeSpan pooledConnectionIdleTimeout, bool poll = false) { // Validate that the connection hasn't been idle in the pool for longer than is allowed. if ((pooledConnectionIdleTimeout != Timeout.InfiniteTimeSpan) && - ((uint)(nowTicks - _returnedTickCount) > pooledConnectionIdleTimeout.TotalMilliseconds)) + ((nowTicks - _returnedTickCount) > pooledConnectionIdleTimeout.TotalMilliseconds)) { - if (NetEventSource.IsEnabled) _connection.Trace($"Connection no longer usable. Idle {TimeSpan.FromMilliseconds((uint)(nowTicks - _returnedTickCount))} > {pooledConnectionIdleTimeout}."); + if (NetEventSource.IsEnabled) _connection.Trace($"Connection no longer usable. Idle {TimeSpan.FromMilliseconds((nowTicks - _returnedTickCount))} > {pooledConnectionIdleTimeout}."); return false; } diff --git a/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionSettings.cs b/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionSettings.cs index 3fe40764bce8..f6788731ce8c 100644 --- a/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionSettings.cs +++ b/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionSettings.cs @@ -64,17 +64,6 @@ public HttpConnectionSettings CloneAndNormalize() _cookieContainer = new CookieContainer(); } - // The implementation uses Environment.TickCount to track connection lifetimes, as Environment.TickCount - // is measurable faster than DateTime.UtcNow / Stopwatch.GetTimestamp, and we do it at least once per request. - // However, besides its lower resolution (which is fine for SocketHttpHandler's needs), due to being based on - // an Int32 rather than Int64, the difference between two tick counts is at most ~49 days. This means that - // specifying a connection idle or lifetime of greater than 49 days would cause it to never be reached. The - // chances of a connection being open anywhere near that long is close to zero, as is the chance that someone - // would choose to specify such a long timeout, but regardless, we avoid issues by capping the timeouts. - TimeSpan timeLimit = TimeSpan.FromDays(40); // something super long but significantly less than the 49 day limit - TimeSpan pooledConnectionLifetime = _pooledConnectionLifetime < timeLimit ? _pooledConnectionLifetime : timeLimit; - TimeSpan pooledConnectionIdleTimeout = _pooledConnectionIdleTimeout < timeLimit ? _pooledConnectionIdleTimeout : timeLimit; - return new HttpConnectionSettings() { _allowAutoRedirect = _allowAutoRedirect, @@ -90,8 +79,8 @@ public HttpConnectionSettings CloneAndNormalize() _maxResponseDrainSize = _maxResponseDrainSize, _maxResponseDrainTime = _maxResponseDrainTime, _maxResponseHeadersLength = _maxResponseHeadersLength, - _pooledConnectionLifetime = pooledConnectionLifetime, - _pooledConnectionIdleTimeout = pooledConnectionIdleTimeout, + _pooledConnectionLifetime = _pooledConnectionLifetime, + _pooledConnectionIdleTimeout = _pooledConnectionIdleTimeout, _preAuthenticate = _preAuthenticate, _properties = _properties, _proxy = _proxy, diff --git a/src/System.Runtime.Extensions/ref/System.Runtime.Extensions.cs b/src/System.Runtime.Extensions/ref/System.Runtime.Extensions.cs index ca2b6f40e46e..7688ffebe9b0 100644 --- a/src/System.Runtime.Extensions/ref/System.Runtime.Extensions.cs +++ b/src/System.Runtime.Extensions/ref/System.Runtime.Extensions.cs @@ -670,6 +670,7 @@ public static partial class Environment public static string SystemDirectory { get { throw null; } } public static int SystemPageSize { get { throw null; } } public static int TickCount { get { throw null; } } + public static long TickCount64 { get { throw null; } } public static string UserDomainName { get { throw null; } } public static bool UserInteractive { get { throw null; } } public static string UserName { get { throw null; } } diff --git a/src/System.Runtime.Extensions/tests/System/Environment.TickCount.cs b/src/System.Runtime.Extensions/tests/System/Environment.TickCount.cs index ccd28e9999fc..b2e8f3794f5c 100644 --- a/src/System.Runtime.Extensions/tests/System/Environment.TickCount.cs +++ b/src/System.Runtime.Extensions/tests/System/Environment.TickCount.cs @@ -15,7 +15,7 @@ public class EnvironmentTickCount public void TickCountTest() { int start = Environment.TickCount; - HashSet times = new HashSet(); + var times = new HashSet(); Func test = () => { int time = Environment.TickCount; @@ -26,5 +26,21 @@ public void TickCountTest() SpinWait.SpinUntil(test, TimeSpan.FromSeconds(1)) || test(), $"TickCount did not increase after one second. start: {start}, values tested: {string.Join(", ", times.ToArray())}."); } + + [Fact] + public void TickCount64Test() + { + long start = Environment.TickCount64; + var times = new HashSet(); + Func test = () => + { + long time = Environment.TickCount64; + times.Add(time); + return time - start > 0; + }; + Assert.True( + SpinWait.SpinUntil(test, TimeSpan.FromSeconds(1)) || test(), + $"TickCount did not increase after one second. start: {start}, values tested: {string.Join(", ", times.ToArray())}."); + } } } From 6c69205c3e4d01a107fd2d5e19c57b62712f23e9 Mon Sep 17 00:00:00 2001 From: Layomi Akinrinade Date: Fri, 31 May 2019 16:59:08 -0400 Subject: [PATCH 605/607] Add support for immutable dictionaries (#37710) * Add support for immutable dictionaries * Some clean up * Address review comments * Address review comments * Remove commented out code * Move object property infos to JsonSerializerOptions * Re-add immutable test * Cache IsImmutableDict bool * More immutable support * Modify processing enumerable or dictionary check * Correct handle end dictionary checks * Re-add dict tests * React to changes from master --- .../Json/Serialization/ClassMaterializer.cs | 44 +- .../Text/Json/Serialization/ClassType.cs | 1 + ...efaultIEnumerableConstructibleConverter.cs | 24 +- .../Converters/DefaultImmutableConverter.cs | 119 ++++-- .../JsonClassInfo.AddProperty.cs | 5 +- .../Text/Json/Serialization/JsonClassInfo.cs | 42 +- .../Json/Serialization/JsonPropertyInfo.cs | 16 +- .../Serialization/JsonPropertyInfoCommon.cs | 35 +- .../JsonSerializer.Read.HandleArray.cs | 34 +- .../JsonSerializer.Read.HandleDictionary.cs | 48 ++- .../JsonSerializer.Read.HandleNull.cs | 4 +- .../JsonSerializer.Read.HandleObject.cs | 14 +- .../JsonSerializer.Read.HandlePropertyName.cs | 13 +- .../Json/Serialization/JsonSerializer.Read.cs | 4 +- .../JsonSerializer.Write.HandleDictionary.cs | 7 +- .../JsonSerializer.Write.HandleObject.cs | 15 + .../Serialization/JsonSerializer.Write.cs | 1 + .../Serialization/JsonSerializerOptions.cs | 19 + .../Text/Json/Serialization/ReadStackFrame.cs | 24 +- .../ReflectionEmitMaterializer.cs | 22 +- .../Serialization/ReflectionMaterializer.cs | 22 +- .../Text/Json/Serialization/WriteStack.cs | 8 + .../Json/Serialization/WriteStackFrame.cs | 18 +- .../tests/Serialization/DictionaryTests.cs | 388 ++++++++++++++---- .../TestClasses.SimpleTestClass.cs | 16 +- .../TestClasses.SimpleTestClassWithObject.cs | 16 +- .../Value.ReadTests.ImmutableCollections.cs | 6 + 27 files changed, 775 insertions(+), 190 deletions(-) diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/ClassMaterializer.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/ClassMaterializer.cs index 5f786400051e..70fa56c8684b 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/ClassMaterializer.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/ClassMaterializer.cs @@ -2,11 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System.Collections; -using System.Collections.Generic; using System.Diagnostics; using System.Reflection; -using System.Text.Json.Serialization.Converters; namespace System.Text.Json.Serialization { @@ -14,25 +11,50 @@ internal abstract class ClassMaterializer { public abstract JsonClassInfo.ConstructorDelegate CreateConstructor(Type classType); - public abstract object ImmutableCreateRange(Type constructingType, Type elementType); + public abstract object ImmutableCollectionCreateRange(Type constructingType, Type elementType); + public abstract object ImmutableDictionaryCreateRange(Type constructingType, Type elementType); - protected MethodInfo ImmutableCreateRangeMethod(Type constructingType, Type elementType) + protected MethodInfo ImmutableCollectionCreateRangeMethod(Type constructingType, Type elementType) + { + MethodInfo createRangeMethod = FindImmutableCreateRangeMethod(constructingType); + + if (createRangeMethod == null) + { + return null; + } + + return createRangeMethod.MakeGenericMethod(elementType); + } + + protected MethodInfo ImmutableDictionaryCreateRangeMethod(Type constructingType, Type elementType) + { + MethodInfo createRangeMethod = FindImmutableCreateRangeMethod(constructingType); + + if (createRangeMethod == null) + { + return null; + } + + return createRangeMethod.MakeGenericMethod(typeof(string), elementType); + } + + private MethodInfo FindImmutableCreateRangeMethod(Type constructingType) { MethodInfo[] constructingTypeMethods = constructingType.GetMethods(); - MethodInfo createRange = null; foreach (MethodInfo method in constructingTypeMethods) { if (method.Name == "CreateRange" && method.GetParameters().Length == 1) { - createRange = method; - break; + return method; } } - Debug.Assert(createRange != null); - - return createRange.MakeGenericMethod(elementType); + // This shouldn't happen because constructingType should be an immutable type with + // a CreateRange method. `null` being returned here will cause a JsonException to be + // thrown when the desired CreateRange delegate is about to be invoked. + Debug.Fail("Could not create the appropriate CreateRange method."); + return null; } } } diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/ClassType.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/ClassType.cs index f5fe6ce2c730..9ce97683ede6 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/ClassType.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/ClassType.cs @@ -14,5 +14,6 @@ internal enum ClassType Value = 2, // Data type with single value Enumerable = 3, // IEnumerable Dictionary = 4, // IDictionary + ImmutableDictionary = 5, // Immutable Dictionary } } diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/DefaultIEnumerableConstructibleConverter.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/DefaultIEnumerableConstructibleConverter.cs index 8aa82ed1b6f7..31066a1eb8e3 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/DefaultIEnumerableConstructibleConverter.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/DefaultIEnumerableConstructibleConverter.cs @@ -10,33 +10,11 @@ namespace System.Text.Json.Serialization.Converters { internal sealed class DefaultIEnumerableConstructibleConverter : JsonEnumerableConverter { - public static ConcurrentDictionary s_objectJsonProperties = new ConcurrentDictionary(); - public override IEnumerable CreateFromList(ref ReadStack state, IList sourceList, JsonSerializerOptions options) { Type enumerableType = state.Current.JsonPropertyInfo.RuntimePropertyType; JsonClassInfo elementClassInfo = state.Current.JsonPropertyInfo.ElementClassInfo; - - JsonPropertyInfo propertyInfo; - if (elementClassInfo.ClassType == ClassType.Object) - { - Type objectType = elementClassInfo.Type; - - if (s_objectJsonProperties.ContainsKey(objectType)) - { - propertyInfo = s_objectJsonProperties[objectType]; - } - else - { - propertyInfo = JsonClassInfo.CreateProperty(objectType, objectType, null, typeof(object), options); - s_objectJsonProperties[objectType] = propertyInfo; - } - } - else - { - propertyInfo = elementClassInfo.GetPolicyProperty(); - } - + JsonPropertyInfo propertyInfo = options.GetJsonPropertyInfoFromClassInfo(elementClassInfo, options); return propertyInfo.CreateIEnumerableConstructibleType(enumerableType, sourceList); } } diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/DefaultImmutableConverter.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/DefaultImmutableConverter.cs index 00b77ba795b2..d4a06b6bc5e0 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/DefaultImmutableConverter.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/Converters/DefaultImmutableConverter.cs @@ -34,11 +34,19 @@ internal sealed class DefaultImmutableConverter : JsonEnumerableConverter private const string ImmutableHashSetGenericTypeName = "System.Collections.Immutable.ImmutableHashSet`1"; private const string ImmutableSetGenericInterfaceTypeName = "System.Collections.Immutable.IImmutableSet`1"; + private const string ImmutableDictionaryTypeName = "System.Collections.Immutable.ImmutableDictionary"; + private const string ImmutableDictionaryGenericTypeName = "System.Collections.Immutable.ImmutableDictionary`2"; + private const string ImmutableDictionaryGenericInterfaceTypeName = "System.Collections.Immutable.IImmutableDictionary`2"; + + private const string ImmutableSortedDictionaryTypeName = "System.Collections.Immutable.ImmutableSortedDictionary"; + private const string ImmutableSortedDictionaryGenericTypeName = "System.Collections.Immutable.ImmutableSortedDictionary`2"; + internal delegate object ImmutableCreateRangeDelegate(IEnumerable items); + internal delegate object ImmutableDictCreateRangeDelegate(IEnumerable> items); - public static ConcurrentDictionary CreateRangeDelegates = new ConcurrentDictionary(); + private static ConcurrentDictionary s_createRangeDelegates = new ConcurrentDictionary(); - private string GetConstructingTypeName(string immutableCollectionTypeName) + private static string GetConstructingTypeName(string immutableCollectionTypeName) { switch (immutableCollectionTypeName) { @@ -47,22 +55,27 @@ private string GetConstructingTypeName(string immutableCollectionTypeName) return ImmutableListTypeName; case ImmutableStackGenericTypeName: case ImmutableStackGenericInterfaceTypeName: - return ImmutableStackTypeName; + return ImmutableStackTypeName; case ImmutableQueueGenericTypeName: case ImmutableQueueGenericInterfaceTypeName: - return ImmutableQueueTypeName; + return ImmutableQueueTypeName; case ImmutableSortedSetGenericTypeName: - return ImmutableSortedSetTypeName; + return ImmutableSortedSetTypeName; case ImmutableHashSetGenericTypeName: case ImmutableSetGenericInterfaceTypeName: - return ImmutableHashSetTypeName; + return ImmutableHashSetTypeName; + case ImmutableDictionaryGenericTypeName: + case ImmutableDictionaryGenericInterfaceTypeName: + return ImmutableDictionaryTypeName; + case ImmutableSortedDictionaryGenericTypeName: + return ImmutableSortedDictionaryTypeName; default: - // TODO: Refactor exception throw following serialization exception changes. + // TODO: Refactor exception throw following serialization exception changes. throw new NotSupportedException(SR.Format(SR.DeserializeTypeNotSupported, immutableCollectionTypeName)); } } - private string GetDelegateKey( + private static string GetDelegateKey( Type immutableCollectionType, Type elementType, out Type underlyingType, @@ -76,13 +89,58 @@ private string GetDelegateKey( return $"{constructingTypeName}:{elementType.FullName}"; } - public void RegisterImmutableCollectionType(Type immutableCollectionType, Type elementType, JsonSerializerOptions options) + internal static bool TypeIsImmutableDictionary(Type type) + { + if (!type.IsGenericType) + { + return false; + } + + switch (type.GetGenericTypeDefinition().FullName) + { + case ImmutableDictionaryGenericTypeName: + case ImmutableDictionaryGenericInterfaceTypeName: + case ImmutableSortedDictionaryGenericTypeName: + return true; + default: + return false; + } + } + + internal static bool TryGetCreateRangeDelegate(string delegateKey, out object createRangeDelegate) + { + return s_createRangeDelegates.TryGetValue(delegateKey, out createRangeDelegate) && createRangeDelegate != null; + } + + internal static void RegisterImmutableCollection(Type immutableCollectionType, Type elementType, JsonSerializerOptions options) + { + // Get a unique identifier for a delegate which will point to the appropiate CreateRange method. + string delegateKey = GetDelegateKey(immutableCollectionType, elementType, out Type underlyingType, out string constructingTypeName); + + // Exit if we have registered this immutable collection type. + if (s_createRangeDelegates.ContainsKey(delegateKey)) + { + return; + } + + // Get the constructing type. + Type constructingType = underlyingType.Assembly.GetType(constructingTypeName); + + // Create a delegate which will point to the CreateRange method. + object createRangeDelegate; + createRangeDelegate = options.ClassMaterializerStrategy.ImmutableCollectionCreateRange(constructingType, elementType); + + // Cache the delegate + s_createRangeDelegates.TryAdd(delegateKey, createRangeDelegate); + } + + internal static void RegisterImmutableDictionary(Type immutableCollectionType, Type elementType, JsonSerializerOptions options) { // Get a unique identifier for a delegate which will point to the appropiate CreateRange method. string delegateKey = GetDelegateKey(immutableCollectionType, elementType, out Type underlyingType, out string constructingTypeName); // Exit if we have registered this immutable collection type. - if (CreateRangeDelegates.ContainsKey(delegateKey)) + if (s_createRangeDelegates.ContainsKey(delegateKey)) { return; } @@ -91,11 +149,11 @@ public void RegisterImmutableCollectionType(Type immutableCollectionType, Type e Type constructingType = underlyingType.Assembly.GetType(constructingTypeName); // Create a delegate which will point to the CreateRange method. - object createRangeDelegate = options.ClassMaterializerStrategy.ImmutableCreateRange(constructingType, elementType); - Debug.Assert(createRangeDelegate != null); + object createRangeDelegate; + createRangeDelegate = options.ClassMaterializerStrategy.ImmutableDictionaryCreateRange(constructingType, elementType); // Cache the delegate - CreateRangeDelegates.TryAdd(delegateKey, createRangeDelegate); + s_createRangeDelegates.TryAdd(delegateKey, createRangeDelegate); } public override IEnumerable CreateFromList(ref ReadStack state, IList sourceList, JsonSerializerOptions options) @@ -104,31 +162,24 @@ public override IEnumerable CreateFromList(ref ReadStack state, IList sourceList Type elementType = state.Current.GetElementType(); string delegateKey = GetDelegateKey(immutableCollectionType, elementType, out _, out _); - Debug.Assert(CreateRangeDelegates.ContainsKey(delegateKey)); + Debug.Assert(s_createRangeDelegates.ContainsKey(delegateKey)); JsonClassInfo elementClassInfo = state.Current.JsonPropertyInfo.ElementClassInfo; + JsonPropertyInfo propertyInfo = options.GetJsonPropertyInfoFromClassInfo(elementClassInfo, options); + return propertyInfo.CreateImmutableCollectionFromList(immutableCollectionType, delegateKey, sourceList, state.JsonPath); + } - JsonPropertyInfo propertyInfo; - if (elementClassInfo.ClassType == ClassType.Object) - { - Type objectType = elementClassInfo.Type; - - if (DefaultIEnumerableConstructibleConverter.s_objectJsonProperties.ContainsKey(objectType)) - { - propertyInfo = DefaultIEnumerableConstructibleConverter.s_objectJsonProperties[objectType]; - } - else - { - propertyInfo = JsonClassInfo.CreateProperty(objectType, objectType, null, typeof(object), options); - DefaultIEnumerableConstructibleConverter.s_objectJsonProperties[objectType] = propertyInfo; - } - } - else - { - propertyInfo = elementClassInfo.GetPolicyProperty(); - } + internal IDictionary CreateFromDictionary(ref ReadStack state, IDictionary sourceDictionary, JsonSerializerOptions options) + { + Type immutableCollectionType = state.Current.JsonPropertyInfo.RuntimePropertyType; + Type elementType = state.Current.GetElementType(); - return propertyInfo.CreateImmutableCollectionFromList(delegateKey, sourceList); + string delegateKey = GetDelegateKey(immutableCollectionType, elementType, out _, out _); + Debug.Assert(s_createRangeDelegates.ContainsKey(delegateKey)); + + JsonClassInfo elementClassInfo = state.Current.JsonPropertyInfo.ElementClassInfo; + JsonPropertyInfo propertyInfo = options.GetJsonPropertyInfoFromClassInfo(elementClassInfo, options); + return propertyInfo.CreateImmutableCollectionFromDictionary(immutableCollectionType, delegateKey, sourceDictionary, state.JsonPath); } } } diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonClassInfo.AddProperty.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonClassInfo.AddProperty.cs index c7578485d6c6..82316f5bcad4 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonClassInfo.AddProperty.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonClassInfo.AddProperty.cs @@ -2,8 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System.Diagnostics; using System.Reflection; +using System.Text.Json.Serialization.Converters; namespace System.Text.Json.Serialization { @@ -25,7 +25,7 @@ private JsonPropertyInfo AddProperty(Type propertyType, PropertyInfo propertyInf { JsonPropertyInfo jsonInfo = CreateProperty(propertyType, propertyType, propertyInfo, classType, options); - // Convert interfaces to concrete types. + // Convert non-immutable dictionary interfaces to concrete types. if (propertyType.IsInterface && jsonInfo.ClassType == ClassType.Dictionary) { // If a polymorphic case, we have to wait until run-time values are processed. @@ -65,6 +65,7 @@ internal static JsonPropertyInfo CreateProperty(Type declaredPropertyType, Type { case ClassType.Enumerable: case ClassType.Dictionary: + case ClassType.ImmutableDictionary: case ClassType.Unknown: collectionElementType = GetElementType(runtimePropertyType, parentClassType, propertyInfo); break; diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonClassInfo.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonClassInfo.cs index d993307846e6..3962c81a3c84 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonClassInfo.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonClassInfo.cs @@ -117,18 +117,33 @@ internal JsonClassInfo(Type type, JsonSerializerOptions options) DetermineExtensionDataProperty(); break; - case ClassType.Enumerable: case ClassType.Dictionary: - // Add a single property that maps to the class type so we can have policies applied. - JsonPropertyInfo policyProperty = AddPolicyProperty(type, options); + { + // Add a single property that maps to the class type so we can have policies applied. + JsonPropertyInfo policyProperty = AddPolicyProperty(type, options); - // Use the type from the property policy to get any late-bound concrete types (from an interface like IDictionary). - CreateObject = options.ClassMaterializerStrategy.CreateConstructor(policyProperty.RuntimePropertyType); + // Use the type from the property policy to get any late-bound concrete types (from an interface like IDictionary). + CreateObject = options.ClassMaterializerStrategy.CreateConstructor(policyProperty.RuntimePropertyType); - // Create a ClassInfo that maps to the element type which is used for (de)serialization and policies. - Type elementType = GetElementType(type, parentType : null, memberInfo: null); - ElementClassInfo = options.GetOrAddClass(elementType); + // Create a ClassInfo that maps to the element type which is used for (de)serialization and policies. + Type elementType = GetElementType(type, parentType: null, memberInfo: null); + ElementClassInfo = options.GetOrAddClass(elementType); + } + break; + case ClassType.ImmutableDictionary: + { + // Add a single property that maps to the class type so we can have policies applied. + AddPolicyProperty(type, options); + + Type elementType = GetElementType(type, parentType: null, memberInfo: null); + + CreateObject = options.ClassMaterializerStrategy.CreateConstructor( + typeof(Dictionary<,>).MakeGenericType(typeof(string), elementType)); + + // Create a ClassInfo that maps to the element type which is used for (de)serialization and policies. + ElementClassInfo = options.GetOrAddClass(elementType); + } break; case ClassType.Value: case ClassType.Unknown: @@ -373,7 +388,7 @@ public static Type GetElementType(Type propertyType, Type parentType, MemberInfo Type[] args = propertyType.GetGenericArguments(); ClassType classType = GetClassType(propertyType); - if (classType == ClassType.Dictionary && + if ((classType == ClassType.Dictionary || classType == ClassType.ImmutableDictionary) && args.Length >= 2 && // It is >= 2 in case there is a IDictionary. args[0].UnderlyingSystemType == typeof(string)) { @@ -403,9 +418,14 @@ internal static ClassType GetClassType(Type type) return ClassType.Value; } + if (DefaultImmutableConverter.TypeIsImmutableDictionary(type)) + { + return ClassType.ImmutableDictionary; + } + if (typeof(IDictionary).IsAssignableFrom(type) || - (type.IsGenericType && (type.GetGenericTypeDefinition() == typeof(IDictionary<,>) - || type.GetGenericTypeDefinition() == typeof(IReadOnlyDictionary<,>)))) + (type.IsGenericType && (type.GetGenericTypeDefinition() == typeof(IDictionary<,>) || + type.GetGenericTypeDefinition() == typeof(IReadOnlyDictionary<,>)))) { return ClassType.Dictionary; } diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfo.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfo.cs index df4b80f14e9e..9016ba959670 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfo.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfo.cs @@ -76,7 +76,7 @@ public JsonClassInfo ElementClassInfo { if (_elementClassInfo == null && _elementType != null) { - Debug.Assert(ClassType == ClassType.Enumerable || ClassType == ClassType.Dictionary); + Debug.Assert(ClassType == ClassType.Enumerable || ClassType == ClassType.Dictionary || ClassType == ClassType.ImmutableDictionary); _elementClassInfo = Options.GetOrAddClass(_elementType); } @@ -179,7 +179,7 @@ private void DeterminePropertyName() private void DetermineSerializationCapabilities() { - if (ClassType != ClassType.Enumerable && ClassType != ClassType.Dictionary) + if (ClassType != ClassType.Enumerable && ClassType != ClassType.Dictionary && ClassType != ClassType.ImmutableDictionary) { // We serialize if there is a getter + not ignoring readonly properties. ShouldSerialize = HasGetter && (HasSetter || !Options.IgnoreReadOnlyProperties); @@ -214,6 +214,12 @@ private void DetermineSerializationCapabilities() { EnumerableConverter = s_jsonArrayConverter; } + else if (ClassType == ClassType.ImmutableDictionary) + { + DefaultImmutableConverter.RegisterImmutableDictionary( + RuntimePropertyType, JsonClassInfo.GetElementType(RuntimePropertyType, parentType: null, memberInfo: null), Options); + EnumerableConverter = s_jsonImmutableConverter; + } else if (typeof(IEnumerable).IsAssignableFrom(RuntimePropertyType)) { Type elementType = JsonClassInfo.GetElementType(RuntimePropertyType, ParentClassType, PropertyInfo); @@ -236,8 +242,8 @@ private void DetermineSerializationCapabilities() RuntimePropertyType.FullName.StartsWith(DefaultImmutableConverter.ImmutableNamespace) && RuntimePropertyType.GetGenericArguments().Length == 1) { + DefaultImmutableConverter.RegisterImmutableCollection(RuntimePropertyType, elementType, Options); EnumerableConverter = s_jsonImmutableConverter; - ((DefaultImmutableConverter)EnumerableConverter).RegisterImmutableCollectionType(RuntimePropertyType, elementType, Options); } } } @@ -285,7 +291,9 @@ public static TAttribute GetAttribute(PropertyInfo propertyInfo) whe return (TAttribute)propertyInfo?.GetCustomAttribute(typeof(TAttribute), inherit: false); } - public abstract IEnumerable CreateImmutableCollectionFromList(string delegateKey, IList sourceList); + public abstract IEnumerable CreateImmutableCollectionFromList(Type collectionType, string delegateKey, IList sourceList, string propertyPath); + + public abstract IDictionary CreateImmutableCollectionFromDictionary(Type collectionType, string delegateKey, IDictionary sourceDictionary, string propertyPath); public abstract IEnumerable CreateIEnumerableConstructibleType(Type enumerableType, IList sourceList); diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfoCommon.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfoCommon.cs index 222d1cb63af3..5bc29c6e3625 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfoCommon.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfoCommon.cs @@ -93,19 +93,38 @@ public override Type GetDictionaryConcreteType() return typeof(Dictionary); } - // Creates an IEnumerable and populates it with the items in the, + // Creates an IEnumerable and populates it with the items in the // sourceList argument then uses the delegateKey argument to identify the appropriate cached // CreateRange method to create and return the desired immutable collection type. - public override IEnumerable CreateImmutableCollectionFromList(string delegateKey, IList sourceList) + public override IEnumerable CreateImmutableCollectionFromList(Type collectionType, string delegateKey, IList sourceList, string propertyPath) { - Debug.Assert(DefaultImmutableConverter.CreateRangeDelegates.ContainsKey(delegateKey)); + if (!DefaultImmutableConverter.TryGetCreateRangeDelegate(delegateKey, out object createRangeDelegateObj)) + { + ThrowHelper.ThrowJsonException_DeserializeUnableToConvertValue(collectionType, propertyPath); + } DefaultImmutableConverter.ImmutableCreateRangeDelegate createRangeDelegate = ( - (DefaultImmutableConverter.ImmutableCreateRangeDelegate)DefaultImmutableConverter.CreateRangeDelegates[delegateKey]); + (DefaultImmutableConverter.ImmutableCreateRangeDelegate)createRangeDelegateObj); return (IEnumerable)createRangeDelegate.Invoke(CreateGenericIEnumerableFromList(sourceList)); } + // Creates an IEnumerable and populates it with the items in the + // sourceList argument then uses the delegateKey argument to identify the appropriate cached + // CreateRange method to create and return the desired immutable collection type. + public override IDictionary CreateImmutableCollectionFromDictionary(Type collectionType, string delegateKey, IDictionary sourceDictionary, string propertyPath) + { + if (!DefaultImmutableConverter.TryGetCreateRangeDelegate(delegateKey, out object createRangeDelegateObj)) + { + ThrowHelper.ThrowJsonException_DeserializeUnableToConvertValue(collectionType, propertyPath); + } + + DefaultImmutableConverter.ImmutableDictCreateRangeDelegate createRangeDelegate = ( + (DefaultImmutableConverter.ImmutableDictCreateRangeDelegate)createRangeDelegateObj); + + return (IDictionary)createRangeDelegate.Invoke(CreateGenericIEnumerableFromDictionary(sourceDictionary)); + } + public override IEnumerable CreateIEnumerableConstructibleType(Type enumerableType, IList sourceList) { return (IEnumerable)Activator.CreateInstance(enumerableType, CreateGenericIEnumerableFromList(sourceList)); @@ -118,5 +137,13 @@ private IEnumerable CreateGenericIEnumerableFromList(IList sou yield return (TRuntimeProperty)item; } } + + private IEnumerable> CreateGenericIEnumerableFromDictionary(IDictionary sourceDictionary) + { + foreach (DictionaryEntry item in sourceDictionary) + { + yield return new KeyValuePair((string)item.Key, (TRuntimeProperty)item.Value); + } + } } } diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleArray.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleArray.cs index 20163bff4f50..cd5668e47c08 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleArray.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleArray.cs @@ -128,7 +128,7 @@ private static bool HandleEndArray( state.Current.ReturnValue = value; return true; } - else if (state.Current.IsEnumerable || state.Current.IsDictionary) + else if (state.Current.IsEnumerable || state.Current.IsDictionary || state.Current.IsImmutableDictionary) { // Returning a non-converted list. return true; @@ -202,6 +202,22 @@ internal static void ApplyObjectToEnumerable( ThrowHelper.ThrowJsonException_DeserializeDuplicateKey(key, reader, state.JsonPath); } } + else if (state.Current.IsImmutableDictionary || (state.Current.IsImmutableDictionaryProperty && !setPropertyDirectly)) + { + Debug.Assert(state.Current.TempDictionaryValues != null); + IDictionary dictionary = (IDictionary)state.Current.JsonPropertyInfo.GetValueAsObject(state.Current.TempDictionaryValues); + + string key = state.Current.KeyName; + Debug.Assert(!string.IsNullOrEmpty(key)); + if (!dictionary.Contains(key)) + { + dictionary.Add(key, value); + } + else + { + ThrowHelper.ThrowJsonException_DeserializeDuplicateKey(key, reader, state.JsonPath); + } + } else { Debug.Assert(state.Current.JsonPropertyInfo != null); @@ -265,6 +281,22 @@ internal static void ApplyValueToEnumerable( ThrowHelper.ThrowJsonException_DeserializeDuplicateKey(key, reader, state.JsonPath); } } + else if (state.Current.IsProcessingImmutableDictionary) + { + Debug.Assert(state.Current.TempDictionaryValues != null); + IDictionary dictionary = (IDictionary)state.Current.TempDictionaryValues; + + string key = state.Current.KeyName; + Debug.Assert(!string.IsNullOrEmpty(key)); + if (!dictionary.ContainsKey(key)) // The IDictionary.TryAdd extension method is not available in netstandard. + { + dictionary.Add(key, value); + } + else + { + ThrowHelper.ThrowJsonException_DeserializeDuplicateKey(key, reader, state.JsonPath); + } + } else { Debug.Assert(state.Current.JsonPropertyInfo != null); diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleDictionary.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleDictionary.cs index ef9f66a0e91b..2871933f024c 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleDictionary.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleDictionary.cs @@ -4,6 +4,7 @@ using System.Collections; using System.Diagnostics; +using System.Text.Json.Serialization.Converters; namespace System.Text.Json.Serialization { @@ -24,7 +25,6 @@ private static void HandleStartDictionary(JsonSerializerOptions options, ref Utf // A nested object or dictionary so push new frame. if (state.Current.PropertyInitialized) { - JsonClassInfo classInfoTemp = jsonPropertyInfo.RuntimeClassInfo; state.Push(); state.Current.JsonClassInfo = jsonPropertyInfo.ElementClassInfo; state.Current.InitializeJsonPropertyInfo(); @@ -39,18 +39,32 @@ private static void HandleStartDictionary(JsonSerializerOptions options, ref Utf } JsonClassInfo classInfo = state.Current.JsonClassInfo; - state.Current.ReturnValue = classInfo.CreateObject(); + + if (state.Current.IsProcessingImmutableDictionary) + { + state.Current.TempDictionaryValues = (IDictionary)classInfo.CreateObject(); + } + else + { + state.Current.ReturnValue = classInfo.CreateObject(); + } return; } state.Current.PropertyInitialized = true; - // If current property is already set (from a constructor, for example) leave as-is. - if (jsonPropertyInfo.GetValueAsObject(state.Current.ReturnValue) == null) + if (state.Current.IsProcessingImmutableDictionary) + { + JsonClassInfo dictionaryClassInfo = options.GetOrAddClass(jsonPropertyInfo.RuntimePropertyType); + state.Current.TempDictionaryValues = (IDictionary)dictionaryClassInfo.CreateObject(); + } + // Else if current property is already set (from a constructor, for example), leave as-is. + else if (jsonPropertyInfo.GetValueAsObject(state.Current.ReturnValue) == null) { // Create the dictionary. JsonClassInfo dictionaryClassInfo = jsonPropertyInfo.RuntimeClassInfo; IDictionary value = (IDictionary)dictionaryClassInfo.CreateObject(); + if (value != null) { if (state.Current.ReturnValue != null) @@ -73,9 +87,23 @@ private static void HandleEndDictionary(JsonSerializerOptions options, ref Utf8J // We added the items to the dictionary already. state.Current.ResetProperty(); } + else if (state.Current.IsImmutableDictionaryProperty) + { + Debug.Assert(state.Current.TempDictionaryValues != null); + state.Current.JsonPropertyInfo.SetValueAsObject(state.Current.ReturnValue, CreateImmutableDictionaryFromTempValues(ref state, options)); + state.Current.ResetProperty(); + } else { - object value = state.Current.ReturnValue; + object value; + if (state.Current.TempDictionaryValues != null) + { + value = CreateImmutableDictionaryFromTempValues(ref state, options); + } + else + { + value = state.Current.ReturnValue; + } if (state.IsLastFrame) { @@ -90,5 +118,15 @@ private static void HandleEndDictionary(JsonSerializerOptions options, ref Utf8J } } } + + private static IDictionary CreateImmutableDictionaryFromTempValues(ref ReadStack state, JsonSerializerOptions options) + { + Debug.Assert(state.Current.IsProcessingImmutableDictionary); + + DefaultImmutableConverter converter = (DefaultImmutableConverter)state.Current.JsonPropertyInfo.EnumerableConverter; + Debug.Assert(converter != null); + + return converter.CreateFromDictionary(ref state, state.Current.TempDictionaryValues, options); + } } } diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleNull.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleNull.cs index 4faefed6e9ba..32a16de8d871 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleNull.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleNull.cs @@ -29,13 +29,13 @@ private static bool HandleNull(ref Utf8JsonReader reader, ref ReadStack state, J ThrowHelper.ThrowJsonException_DeserializeCannotBeNull(reader, state.JsonPath); } - if (state.Current.IsEnumerable || state.Current.IsDictionary) + if (state.Current.IsEnumerable || state.Current.IsDictionary || state.Current.IsImmutableDictionary) { ApplyObjectToEnumerable(null, ref state, ref reader); return false; } - if (state.Current.IsEnumerableProperty || state.Current.IsDictionaryProperty) + if (state.Current.IsEnumerableProperty || state.Current.IsDictionaryProperty || state.Current.IsImmutableDictionaryProperty) { bool setPropertyToNull = !state.Current.PropertyInitialized; ApplyObjectToEnumerable(null, ref state, ref reader, setPropertyDirectly: setPropertyToNull); diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleObject.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleObject.cs index 0672a311b8aa..b81e957deee6 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleObject.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandleObject.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System.Collections; using System.Diagnostics; namespace System.Text.Json.Serialization @@ -10,7 +11,7 @@ public static partial class JsonSerializer { private static void HandleStartObject(JsonSerializerOptions options, ref Utf8JsonReader reader, ref ReadStack state) { - Debug.Assert(!state.Current.IsProcessingDictionary); + Debug.Assert(!state.Current.IsProcessingDictionary && !state.Current.IsProcessingImmutableDictionary); if (state.Current.IsProcessingEnumerable) { @@ -41,12 +42,19 @@ private static void HandleStartObject(JsonSerializerOptions options, ref Utf8Jso } } - state.Current.ReturnValue = classInfo.CreateObject(); + if (state.Current.IsProcessingImmutableDictionary) + { + state.Current.TempDictionaryValues = (IDictionary)classInfo.CreateObject(); + } + else + { + state.Current.ReturnValue = classInfo.CreateObject(); + } } private static void HandleEndObject(JsonSerializerOptions options, ref Utf8JsonReader reader, ref ReadStack state) { - Debug.Assert(!state.Current.IsProcessingDictionary); + Debug.Assert(!state.Current.IsProcessingDictionary && !state.Current.IsProcessingImmutableDictionary); state.Current.JsonClassInfo.UpdateSortedPropertyCache(ref state.Current); diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandlePropertyName.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandlePropertyName.cs index 044ef3048d55..8e8b4fa67bba 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandlePropertyName.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.HandlePropertyName.cs @@ -20,10 +20,10 @@ private static void HandlePropertyName( return; } - Debug.Assert(state.Current.ReturnValue != default); + Debug.Assert(state.Current.ReturnValue != default || state.Current.TempDictionaryValues != default); Debug.Assert(state.Current.JsonClassInfo != default); - if (state.Current.IsProcessingDictionary) + if (state.Current.IsProcessingDictionary || state.Current.IsProcessingImmutableDictionary) { if (ReferenceEquals(state.Current.JsonClassInfo.DataExtensionProperty, state.Current.JsonPropertyInfo)) { @@ -47,13 +47,16 @@ private static void HandlePropertyName( keyName = options.DictionaryKeyPolicy.ConvertName(keyName); } - if (state.Current.IsDictionary) + if (state.Current.IsDictionary || state.Current.IsImmutableDictionary) { state.Current.JsonPropertyInfo = state.Current.JsonClassInfo.GetPolicyProperty(); } - Debug.Assert(state.Current.IsDictionary || - (state.Current.IsDictionaryProperty && state.Current.JsonPropertyInfo != null)); + Debug.Assert( + state.Current.IsDictionary || + (state.Current.IsDictionaryProperty && state.Current.JsonPropertyInfo != null) || + state.Current.IsImmutableDictionary || + (state.Current.IsImmutableDictionaryProperty && state.Current.JsonPropertyInfo != null)); state.Current.KeyName = keyName; } diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.cs index bdf6cd3c94a6..5f7e2ae6cda0 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Read.cs @@ -66,7 +66,7 @@ private static void ReadCore( break; } } - else if (readStack.Current.IsProcessingDictionary) + else if (readStack.Current.IsProcessingDictionary || readStack.Current.IsProcessingImmutableDictionary) { HandleStartDictionary(options, ref reader, ref readStack); } @@ -81,7 +81,7 @@ private static void ReadCore( { readStack.Pop(); } - else if (readStack.Current.IsProcessingDictionary) + else if (readStack.Current.IsProcessingDictionary || readStack.Current.IsProcessingImmutableDictionary) { HandleEndDictionary(options, ref reader, ref readStack); } diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.HandleDictionary.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.HandleDictionary.cs index 468aee8bf0b5..5d7196a36929 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.HandleDictionary.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.HandleDictionary.cs @@ -31,7 +31,7 @@ private static bool HandleDictionary( return true; } - state.Current.Enumerator = enumerable.GetEnumerator(); + state.Current.Enumerator = ((IDictionary)enumerable).GetEnumerator(); state.Current.WriteObjectOrArrayStart(ClassType.Dictionary, writer); } @@ -113,6 +113,11 @@ internal static void WriteDictionary( value = (TProperty)polymorphicEnumerator.Current.Value; key = polymorphicEnumerator.Current.Key; } + else if (current.IsImmutableDictionary || current.IsImmutableDictionaryProperty) + { + value = (TProperty)((DictionaryEntry)current.Enumerator.Current).Value; + key = (string)((DictionaryEntry)current.Enumerator.Current).Key; + } else { // Todo: support non-generic Dictionary here (IDictionaryEnumerator) diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.HandleObject.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.HandleObject.cs index 3dc24aab0990..e0fb37189b88 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.HandleObject.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.HandleObject.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System.Diagnostics; +using System.Text.Json.Serialization.Converters; namespace System.Text.Json.Serialization { @@ -103,6 +104,20 @@ private static bool HandleObject( return endOfEnumerable; } + // A property that returns an immutable dictionary keeps the same stack frame. + if (jsonPropertyInfo.ClassType == ClassType.ImmutableDictionary) + { + state.Current.IsImmutableDictionaryProperty = true; + + bool endOfEnumerable = HandleDictionary(jsonPropertyInfo.ElementClassInfo, options, writer, ref state); + if (endOfEnumerable) + { + state.Current.NextProperty(); + } + + return endOfEnumerable; + } + // A property that returns an object. if (!obtainedValue) { diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.cs index d66a77799b2d..da37ba317cb4 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Write.cs @@ -37,6 +37,7 @@ private static bool Write( finishedSerializing = WriteObject(options, writer, ref state); break; case ClassType.Dictionary: + case ClassType.ImmutableDictionary: finishedSerializing = HandleDictionary(current.JsonClassInfo.ElementClassInfo, options, writer, ref state); break; default: diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializerOptions.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializerOptions.cs index 70a1cc9edec9..53adf0b69881 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializerOptions.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializerOptions.cs @@ -17,6 +17,7 @@ public sealed class JsonSerializerOptions internal static readonly JsonSerializerOptions s_defaultOptions = new JsonSerializerOptions(); private readonly ConcurrentDictionary _classes = new ConcurrentDictionary(); + private readonly ConcurrentDictionary _objectJsonProperties = new ConcurrentDictionary(); private ClassMaterializer _classMaterializerStrategy; private JsonNamingPolicy _dictionayKeyPolicy; private JsonNamingPolicy _jsonPropertyNamingPolicy; @@ -304,6 +305,24 @@ internal JsonWriterOptions GetWriterOptions() }; } + internal JsonPropertyInfo GetJsonPropertyInfoFromClassInfo(JsonClassInfo classInfo, JsonSerializerOptions options) + { + if (classInfo.ClassType != ClassType.Object) + { + return classInfo.GetPolicyProperty(); + } + + Type objectType = classInfo.Type; + + if (!_objectJsonProperties.TryGetValue(objectType, out JsonPropertyInfo propertyInfo)) + { + propertyInfo = JsonClassInfo.CreateProperty(objectType, objectType, null, typeof(object), options); + _objectJsonProperties[objectType] = propertyInfo; + } + + return propertyInfo; + } + private void VerifyMutable() { // The default options are hidden and thus should be immutable. diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/ReadStackFrame.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/ReadStackFrame.cs index 999cae10cde6..6380a0c879e2 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/ReadStackFrame.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/ReadStackFrame.cs @@ -6,6 +6,7 @@ using System.Collections.Generic; using System.Diagnostics; using System.Runtime.CompilerServices; +using System.Text.Json.Serialization.Converters; namespace System.Text.Json.Serialization { @@ -31,6 +32,9 @@ internal struct ReadStackFrame // Has an array or dictionary property been initialized. public bool PropertyInitialized; + // Support Immutable dictionary types. + public IDictionary TempDictionaryValues; + // For performance, we order the properties by the first deserialize and PropertyIndex helps find the right slot quicker. public int PropertyIndex; public List PropertyRefCache; @@ -38,11 +42,14 @@ internal struct ReadStackFrame // The current JSON data for a property does not match a given POCO, so ignore the property (recursively). public bool Drain; + public bool IsImmutableDictionary => JsonClassInfo.ClassType == ClassType.ImmutableDictionary; public bool IsDictionary => JsonClassInfo.ClassType == ClassType.Dictionary; public bool IsDictionaryProperty => JsonPropertyInfo != null && !JsonPropertyInfo.IsPropertyPolicy && JsonPropertyInfo.ClassType == ClassType.Dictionary; + public bool IsImmutableDictionaryProperty => JsonPropertyInfo != null && + !JsonPropertyInfo.IsPropertyPolicy && (JsonPropertyInfo.ClassType == ClassType.ImmutableDictionary); public bool IsEnumerable => JsonClassInfo.ClassType == ClassType.Enumerable; @@ -51,8 +58,9 @@ internal struct ReadStackFrame !JsonPropertyInfo.IsPropertyPolicy && JsonPropertyInfo.ClassType == ClassType.Enumerable; - public bool IsProcessingEnumerableOrDictionary => IsProcessingEnumerable || IsProcessingDictionary; + public bool IsProcessingEnumerableOrDictionary => IsProcessingEnumerable || IsProcessingDictionary || IsProcessingImmutableDictionary; public bool IsProcessingDictionary => IsDictionary || IsDictionaryProperty; + public bool IsProcessingImmutableDictionary => IsImmutableDictionary || IsImmutableDictionaryProperty; public bool IsProcessingEnumerable => IsEnumerable || IsEnumerableProperty; public bool IsProcessingValue @@ -71,7 +79,9 @@ public bool IsProcessingValue return type == ClassType.Value || type == ClassType.Unknown || KeyName != null && ( (IsDictionary && JsonClassInfo.ElementClassInfo.ClassType == ClassType.Unknown) || - (IsDictionaryProperty && JsonPropertyInfo.ElementClassInfo.ClassType == ClassType.Unknown) + (IsDictionaryProperty && JsonPropertyInfo.ElementClassInfo.ClassType == ClassType.Unknown) || + (IsImmutableDictionary && JsonClassInfo.ElementClassInfo.ClassType == ClassType.Unknown) || + (IsImmutableDictionaryProperty && JsonPropertyInfo.ElementClassInfo.ClassType == ClassType.Unknown) ); } } @@ -84,7 +94,10 @@ public void Initialize(Type type, JsonSerializerOptions options) public void InitializeJsonPropertyInfo() { - if (JsonClassInfo.ClassType == ClassType.Value || JsonClassInfo.ClassType == ClassType.Enumerable || JsonClassInfo.ClassType == ClassType.Dictionary) + if (JsonClassInfo.ClassType == ClassType.Value || + JsonClassInfo.ClassType == ClassType.Enumerable || + JsonClassInfo.ClassType == ClassType.Dictionary || + JsonClassInfo.ClassType == ClassType.ImmutableDictionary) { JsonPropertyInfo = JsonClassInfo.GetPolicyProperty(); } @@ -105,6 +118,7 @@ public void ResetProperty() PropertyInitialized = false; JsonPropertyInfo = null; TempEnumerableValues = null; + TempDictionaryValues = null; JsonPropertyName = null; KeyName = null; } @@ -154,12 +168,12 @@ public static object CreateEnumerableValue(ref Utf8JsonReader reader, ref ReadSt public Type GetElementType() { - if (IsEnumerableProperty || IsDictionaryProperty) + if (IsEnumerableProperty || IsDictionaryProperty || IsImmutableDictionaryProperty) { return JsonPropertyInfo.ElementClassInfo.Type; } - if (IsEnumerable || IsDictionary) + if (IsEnumerable || IsDictionary || IsImmutableDictionary) { return JsonClassInfo.ElementClassInfo.Type; } diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/ReflectionEmitMaterializer.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/ReflectionEmitMaterializer.cs index 7af144a96aac..f7fbd48c8920 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/ReflectionEmitMaterializer.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/ReflectionEmitMaterializer.cs @@ -50,13 +50,31 @@ public override JsonClassInfo.ConstructorDelegate CreateConstructor(Type type) return (JsonClassInfo.ConstructorDelegate)dynamicMethod.CreateDelegate(typeof(JsonClassInfo.ConstructorDelegate)); } - public override object ImmutableCreateRange(Type constructingType, Type elementType) + public override object ImmutableCollectionCreateRange(Type constructingType, Type elementType) { - MethodInfo createRange = ImmutableCreateRangeMethod(constructingType, elementType); + MethodInfo createRange = ImmutableCollectionCreateRangeMethod(constructingType, elementType); + + if (createRange == null) + { + return null; + } return createRange.CreateDelegate( typeof(DefaultImmutableConverter.ImmutableCreateRangeDelegate<>).MakeGenericType(elementType), null); } + + public override object ImmutableDictionaryCreateRange(Type constructingType, Type elementType) + { + MethodInfo createRange = ImmutableDictionaryCreateRangeMethod(constructingType, elementType); + + if (createRange == null) + { + return null; + } + + return createRange.CreateDelegate( + typeof(DefaultImmutableConverter.ImmutableDictCreateRangeDelegate<,>).MakeGenericType(typeof(string), elementType), null); + } } } #endif diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/ReflectionMaterializer.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/ReflectionMaterializer.cs index c22f951084d6..c7c98952680c 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/ReflectionMaterializer.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/ReflectionMaterializer.cs @@ -23,12 +23,30 @@ public override JsonClassInfo.ConstructorDelegate CreateConstructor(Type type) return () => Activator.CreateInstance(type); } - public override object ImmutableCreateRange(Type constructingType, Type elementType) + public override object ImmutableCollectionCreateRange(Type constructingType, Type elementType) { - MethodInfo createRange = ImmutableCreateRangeMethod(constructingType, elementType); + MethodInfo createRange = ImmutableCollectionCreateRangeMethod(constructingType, elementType); + + if (createRange == null) + { + return null; + } return createRange.CreateDelegate( typeof(DefaultImmutableConverter.ImmutableCreateRangeDelegate<>).MakeGenericType(elementType), null); } + + public override object ImmutableDictionaryCreateRange(Type constructingType, Type elementType) + { + MethodInfo createRange = ImmutableDictionaryCreateRangeMethod(constructingType, elementType); + + if (createRange == null) + { + return null; + } + + return createRange.CreateDelegate( + typeof(DefaultImmutableConverter.ImmutableDictCreateRangeDelegate<,>).MakeGenericType(typeof(string), elementType), null); + } } } diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/WriteStack.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/WriteStack.cs index 5cc3453eeec0..a97da5b517a0 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/WriteStack.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/WriteStack.cs @@ -4,6 +4,7 @@ using System.Collections.Generic; using System.Diagnostics; +using System.Text.Json.Serialization.Converters; namespace System.Text.Json.Serialization { @@ -51,6 +52,13 @@ public void Push(JsonClassInfo nextClassInfo, object nextValue) Current.PopStackOnEnd = true; Current.JsonPropertyInfo = Current.JsonClassInfo.GetPolicyProperty(); } + else if (classType == ClassType.ImmutableDictionary) + { + Current.PopStackOnEnd = true; + Current.JsonPropertyInfo = Current.JsonClassInfo.GetPolicyProperty(); + + Current.IsImmutableDictionary = true; + } else { Debug.Assert(nextClassInfo.ClassType == ClassType.Object || nextClassInfo.ClassType == ClassType.Unknown); diff --git a/src/System.Text.Json/src/System/Text/Json/Serialization/WriteStackFrame.cs b/src/System.Text.Json/src/System/Text/Json/Serialization/WriteStackFrame.cs index f77bf4cca922..42bd1122acc1 100644 --- a/src/System.Text.Json/src/System/Text/Json/Serialization/WriteStackFrame.cs +++ b/src/System.Text.Json/src/System/Text/Json/Serialization/WriteStackFrame.cs @@ -5,6 +5,7 @@ using System.Buffers; using System.Collections; using System.Diagnostics; +using System.Text.Json.Serialization.Converters; namespace System.Text.Json.Serialization { @@ -17,6 +18,10 @@ internal struct WriteStackFrame // Support Dictionary keys. public string KeyName; + // Whether the current object is an immutable dictionary. + public bool IsImmutableDictionary; + public bool IsImmutableDictionaryProperty; + // The current enumerator for the IEnumerable or IDictionary. public IEnumerator Enumerator; @@ -42,6 +47,11 @@ public void Initialize(Type type, JsonSerializerOptions options) { JsonPropertyInfo = JsonClassInfo.GetPolicyProperty(); } + else if (JsonClassInfo.ClassType == ClassType.ImmutableDictionary) + { + JsonPropertyInfo = JsonClassInfo.GetPolicyProperty(); + IsImmutableDictionary = true; + } } public void WriteObjectOrArrayStart(ClassType classType, Utf8JsonWriter writer, bool writeNull = false) @@ -60,7 +70,7 @@ public void WriteObjectOrArrayStart(ClassType classType, Utf8JsonWriter writer, Debug.Assert(writeNull == false); // Write start without a property name. - if (classType == ClassType.Object || classType == ClassType.Dictionary) + if (classType == ClassType.Object || classType == ClassType.Dictionary || classType == ClassType.ImmutableDictionary) { writer.WriteStartObject(); StartObjectWritten = true; @@ -79,7 +89,9 @@ private void WriteObjectOrArrayStart(ClassType classType, JsonEncodedText proper { writer.WriteNull(propertyName); } - else if (classType == ClassType.Object || classType == ClassType.Dictionary) + else if (classType == ClassType.Object || + classType == ClassType.Dictionary || + classType == ClassType.ImmutableDictionary) { writer.WriteStartObject(propertyName); StartObjectWritten = true; @@ -99,6 +111,7 @@ public void Reset() JsonClassInfo = null; JsonPropertyInfo = null; PropertyIndex = 0; + IsImmutableDictionary = false; PopStackOnEndObject = false; PopStackOnEnd = false; StartObjectWritten = false; @@ -108,6 +121,7 @@ public void EndObject() { PropertyIndex = 0; PopStackOnEndObject = false; + IsImmutableDictionaryProperty = false; JsonPropertyInfo = null; } diff --git a/src/System.Text.Json/tests/Serialization/DictionaryTests.cs b/src/System.Text.Json/tests/Serialization/DictionaryTests.cs index 5d6d11428ad1..4bd3612c2d8d 100644 --- a/src/System.Text.Json/tests/Serialization/DictionaryTests.cs +++ b/src/System.Text.Json/tests/Serialization/DictionaryTests.cs @@ -4,6 +4,7 @@ using System.Collections; using System.Collections.Generic; +using System.Collections.Immutable; using Xunit; namespace System.Text.Json.Serialization.Tests @@ -14,6 +15,7 @@ public static partial class DictionaryTests public static void DictionaryOfString() { const string JsonString = @"{""Hello"":""World"",""Hello2"":""World2""}"; + const string ReorderedJsonString = @"{""Hello2"":""World2"",""Hello"":""World""}"; { Dictionary obj = JsonSerializer.Parse>(JsonString); @@ -50,6 +52,42 @@ public static void DictionaryOfString() json = JsonSerializer.ToString(obj); Assert.Equal(JsonString, json); } + + { + ImmutableDictionary obj = JsonSerializer.Parse>(JsonString); + Assert.Equal("World", obj["Hello"]); + Assert.Equal("World2", obj["Hello2"]); + + string json = JsonSerializer.ToString(obj); + Assert.True(JsonString == json || ReorderedJsonString == json); + + json = JsonSerializer.ToString(obj); + Assert.True(JsonString == json || ReorderedJsonString == json); + } + + { + IImmutableDictionary obj = JsonSerializer.Parse>(JsonString); + Assert.Equal("World", obj["Hello"]); + Assert.Equal("World2", obj["Hello2"]); + + string json = JsonSerializer.ToString(obj); + Assert.True(JsonString == json || ReorderedJsonString == json); + + json = JsonSerializer.ToString(obj); + Assert.True(JsonString == json || ReorderedJsonString == json); + } + + { + ImmutableSortedDictionary obj = JsonSerializer.Parse>(JsonString); + Assert.Equal("World", obj["Hello"]); + Assert.Equal("World2", obj["Hello2"]); + + string json = JsonSerializer.ToString(obj); + Assert.True(JsonString == json); + + json = JsonSerializer.ToString(obj); + Assert.True(JsonString == json); + } } [Fact] @@ -103,7 +141,8 @@ class Poco [Fact] public static void FirstGenericArgNotStringFail() { - Assert.Throws(() => JsonSerializer.Parse>(@"{""Key1"":1}")); + Assert.Throws(() => JsonSerializer.Parse>(@"{1:1}")); + Assert.Throws(() => JsonSerializer.Parse>(@"{1:1}")); } [Fact] @@ -111,19 +150,53 @@ public static void DictionaryOfList() { const string JsonString = @"{""Key1"":[1,2],""Key2"":[3,4]}"; - IDictionary> obj = JsonSerializer.Parse>>(JsonString); + { + IDictionary> obj = JsonSerializer.Parse>>(JsonString); - Assert.Equal(2, obj.Count); - Assert.Equal(2, obj["Key1"].Count); - Assert.Equal(1, obj["Key1"][0]); - Assert.Equal(2, obj["Key1"][1]); - Assert.Equal(2, obj["Key2"].Count); - Assert.Equal(3, obj["Key2"][0]); - Assert.Equal(4, obj["Key2"][1]); + Assert.Equal(2, obj.Count); + Assert.Equal(2, obj["Key1"].Count); + Assert.Equal(1, obj["Key1"][0]); + Assert.Equal(2, obj["Key1"][1]); + Assert.Equal(2, obj["Key2"].Count); + Assert.Equal(3, obj["Key2"][0]); + Assert.Equal(4, obj["Key2"][1]); + string json = JsonSerializer.ToString(obj); + Assert.Equal(JsonString, json); + } - string json = JsonSerializer.ToString(obj); - Assert.Equal(JsonString, json); + { + ImmutableDictionary> obj = JsonSerializer.Parse>>(JsonString); + + Assert.Equal(2, obj.Count); + Assert.Equal(2, obj["Key1"].Count); + Assert.Equal(1, obj["Key1"][0]); + Assert.Equal(2, obj["Key1"][1]); + Assert.Equal(2, obj["Key2"].Count); + Assert.Equal(3, obj["Key2"][0]); + Assert.Equal(4, obj["Key2"][1]); + + string json = JsonSerializer.ToString(obj); + const string ReorderedJsonString = @"{""Key2"":[3,4],""Key1"":[1,2]}"; + Assert.True(JsonString == json || ReorderedJsonString == json); + } + + { + IImmutableDictionary> obj = JsonSerializer.Parse>>(JsonString); + + Assert.Equal(2, obj.Count); + Assert.Equal(2, obj["Key1"].Count); + Assert.Equal(1, obj["Key1"][0]); + Assert.Equal(2, obj["Key1"][1]); + Assert.Equal(2, obj["Key2"].Count); + Assert.Equal(3, obj["Key2"][0]); + Assert.Equal(4, obj["Key2"][1]); + + + string json = JsonSerializer.ToString(obj); + const string ReorderedJsonString = @"{""Key2"":[3,4],""Key1"":[1,2]}"; + Assert.True(JsonString == json || ReorderedJsonString == json); + } } [Fact] @@ -148,63 +221,125 @@ public static void DictionaryOfArray() public static void ListOfDictionary() { const string JsonString = @"[{""Key1"":1,""Key2"":2},{""Key1"":3,""Key2"":4}]"; - List> obj = JsonSerializer.Parse>>(JsonString); - Assert.Equal(2, obj.Count); - Assert.Equal(2, obj[0].Count); - Assert.Equal(1, obj[0]["Key1"]); - Assert.Equal(2, obj[0]["Key2"]); - Assert.Equal(2, obj[1].Count); - Assert.Equal(3, obj[1]["Key1"]); - Assert.Equal(4, obj[1]["Key2"]); + { + List> obj = JsonSerializer.Parse>>(JsonString); - string json = JsonSerializer.ToString(obj); - Assert.Equal(JsonString, json); + Assert.Equal(2, obj.Count); + Assert.Equal(2, obj[0].Count); + Assert.Equal(1, obj[0]["Key1"]); + Assert.Equal(2, obj[0]["Key2"]); + Assert.Equal(2, obj[1].Count); + Assert.Equal(3, obj[1]["Key1"]); + Assert.Equal(4, obj[1]["Key2"]); - json = JsonSerializer.ToString(obj); - Assert.Equal(JsonString, json); + string json = JsonSerializer.ToString(obj); + Assert.Equal(JsonString, json); + + json = JsonSerializer.ToString(obj); + Assert.Equal(JsonString, json); + } + { + List> obj = JsonSerializer.Parse>>(JsonString); + + Assert.Equal(2, obj.Count); + Assert.Equal(2, obj[0].Count); + Assert.Equal(1, obj[0]["Key1"]); + Assert.Equal(2, obj[0]["Key2"]); + Assert.Equal(2, obj[1].Count); + Assert.Equal(3, obj[1]["Key1"]); + Assert.Equal(4, obj[1]["Key2"]); + + string json = JsonSerializer.ToString(obj); + Assert.Equal(JsonString, json); + + json = JsonSerializer.ToString(obj); + Assert.Equal(JsonString, json); + } } [Fact] public static void ArrayOfDictionary() { const string JsonString = @"[{""Key1"":1,""Key2"":2},{""Key1"":3,""Key2"":4}]"; - Dictionary[] obj = JsonSerializer.Parse[]>(JsonString); - Assert.Equal(2, obj.Length); - Assert.Equal(2, obj[0].Count); - Assert.Equal(1, obj[0]["Key1"]); - Assert.Equal(2, obj[0]["Key2"]); - Assert.Equal(2, obj[1].Count); - Assert.Equal(3, obj[1]["Key1"]); - Assert.Equal(4, obj[1]["Key2"]); + { + Dictionary[] obj = JsonSerializer.Parse[]>(JsonString); - string json = JsonSerializer.ToString(obj); - Assert.Equal(JsonString, json); + Assert.Equal(2, obj.Length); + Assert.Equal(2, obj[0].Count); + Assert.Equal(1, obj[0]["Key1"]); + Assert.Equal(2, obj[0]["Key2"]); + Assert.Equal(2, obj[1].Count); + Assert.Equal(3, obj[1]["Key1"]); + Assert.Equal(4, obj[1]["Key2"]); - json = JsonSerializer.ToString(obj); - Assert.Equal(JsonString, json); + string json = JsonSerializer.ToString(obj); + Assert.Equal(JsonString, json); + + json = JsonSerializer.ToString(obj); + Assert.Equal(JsonString, json); + } + + { + ImmutableSortedDictionary[] obj = JsonSerializer.Parse[]>(JsonString); + + Assert.Equal(2, obj.Length); + Assert.Equal(2, obj[0].Count); + Assert.Equal(1, obj[0]["Key1"]); + Assert.Equal(2, obj[0]["Key2"]); + Assert.Equal(2, obj[1].Count); + Assert.Equal(3, obj[1]["Key1"]); + Assert.Equal(4, obj[1]["Key2"]); + + string json = JsonSerializer.ToString(obj); + Assert.Equal(JsonString, json); + + json = JsonSerializer.ToString(obj); + Assert.Equal(JsonString, json); + } } [Fact] public static void DictionaryOfDictionary() { const string JsonString = @"{""Key1"":{""Key1a"":1,""Key1b"":2},""Key2"":{""Key2a"":3,""Key2b"":4}}"; - Dictionary> obj = JsonSerializer.Parse>>(JsonString); - Assert.Equal(2, obj.Count); - Assert.Equal(2, obj["Key1"].Count); - Assert.Equal(1, obj["Key1"]["Key1a"]); - Assert.Equal(2, obj["Key1"]["Key1b"]); - Assert.Equal(2, obj["Key2"].Count); - Assert.Equal(3, obj["Key2"]["Key2a"]); - Assert.Equal(4, obj["Key2"]["Key2b"]); + { + Dictionary> obj = JsonSerializer.Parse>>(JsonString); - string json = JsonSerializer.ToString(obj); - Assert.Equal(JsonString, json); + Assert.Equal(2, obj.Count); + Assert.Equal(2, obj["Key1"].Count); + Assert.Equal(1, obj["Key1"]["Key1a"]); + Assert.Equal(2, obj["Key1"]["Key1b"]); + Assert.Equal(2, obj["Key2"].Count); + Assert.Equal(3, obj["Key2"]["Key2a"]); + Assert.Equal(4, obj["Key2"]["Key2b"]); - json = JsonSerializer.ToString(obj); - Assert.Equal(JsonString, json); + string json = JsonSerializer.ToString(obj); + Assert.Equal(JsonString, json); + + json = JsonSerializer.ToString(obj); + Assert.Equal(JsonString, json); + } + + { + ImmutableSortedDictionary> obj = JsonSerializer.Parse>>(JsonString); + + Assert.Equal(2, obj.Count); + Assert.Equal(2, obj["Key1"].Count); + Assert.Equal(1, obj["Key1"]["Key1a"]); + Assert.Equal(2, obj["Key1"]["Key1b"]); + Assert.Equal(2, obj["Key2"].Count); + Assert.Equal(3, obj["Key2"]["Key2a"]); + Assert.Equal(4, obj["Key2"]["Key2b"]); + + string json = JsonSerializer.ToString(obj); + Assert.Equal(JsonString, json); + + json = JsonSerializer.ToString(obj); + Assert.Equal(JsonString, json); + } } [Fact] @@ -276,32 +411,64 @@ public static void DictionaryOfArrayOfDictionary() [Fact] public static void DictionaryOfClasses() { - Dictionary obj; - { - string json = @"{""Key1"":" + SimpleTestClass.s_json + @",""Key2"":" + SimpleTestClass.s_json + "}"; - obj = JsonSerializer.Parse>(json); - Assert.Equal(2, obj.Count); - obj["Key1"].Verify(); - obj["Key2"].Verify(); + Dictionary obj; + + { + string json = @"{""Key1"":" + SimpleTestClass.s_json + @",""Key2"":" + SimpleTestClass.s_json + "}"; + obj = JsonSerializer.Parse>(json); + Assert.Equal(2, obj.Count); + obj["Key1"].Verify(); + obj["Key2"].Verify(); + } + + { + // We can't compare against the json string above because property ordering is not deterministic (based on reflection order) + // so just round-trip the json and compare. + string json = JsonSerializer.ToString(obj); + obj = JsonSerializer.Parse>(json); + Assert.Equal(2, obj.Count); + obj["Key1"].Verify(); + obj["Key2"].Verify(); + } + + { + string json = JsonSerializer.ToString(obj); + obj = JsonSerializer.Parse>(json); + Assert.Equal(2, obj.Count); + obj["Key1"].Verify(); + obj["Key2"].Verify(); + } } { - // We can't compare against the json string above because property ordering is not deterministic (based on reflection order) - // so just round-trip the json and compare. - string json = JsonSerializer.ToString(obj); - obj = JsonSerializer.Parse>(json); - Assert.Equal(2, obj.Count); - obj["Key1"].Verify(); - obj["Key2"].Verify(); - } - - { - string json = JsonSerializer.ToString(obj); - obj = JsonSerializer.Parse>(json); - Assert.Equal(2, obj.Count); - obj["Key1"].Verify(); - obj["Key2"].Verify(); + ImmutableSortedDictionary obj; + + { + string json = @"{""Key1"":" + SimpleTestClass.s_json + @",""Key2"":" + SimpleTestClass.s_json + "}"; + obj = JsonSerializer.Parse>(json); + Assert.Equal(2, obj.Count); + obj["Key1"].Verify(); + obj["Key2"].Verify(); + } + + { + // We can't compare against the json string above because property ordering is not deterministic (based on reflection order) + // so just round-trip the json and compare. + string json = JsonSerializer.ToString(obj); + obj = JsonSerializer.Parse>(json); + Assert.Equal(2, obj.Count); + obj["Key1"].Verify(); + obj["Key2"].Verify(); + } + + { + string json = JsonSerializer.ToString(obj); + obj = JsonSerializer.Parse>(json); + Assert.Equal(2, obj.Count); + obj["Key1"].Verify(); + obj["Key2"].Verify(); + } } } @@ -449,6 +616,13 @@ public static void DictionaryNotSupportedButIgnored() Assert.Null(obj.MyDictionary); } + [Fact] + public static void DeserializeUserDefinedDictionaryThrows() + { + string json = @"{""Hello"":1,""Hello2"":2}"; + Assert.Throws(() => JsonSerializer.Parse(json)); + } + public class ClassWithDictionaryButNoSetter { public Dictionary MyDictionary { get; } = new Dictionary(); @@ -463,5 +637,81 @@ public class ClassWithNotSupportedDictionaryButIgnored { [JsonIgnore] public Dictionary MyDictionary { get; set; } } + + public class UserDefinedImmutableDictionary : IImmutableDictionary + { + public int this[string key] => throw new NotImplementedException(); + + public IEnumerable Keys => throw new NotImplementedException(); + + public IEnumerable Values => throw new NotImplementedException(); + + public int Count => throw new NotImplementedException(); + + public IImmutableDictionary Add(string key, int value) + { + throw new NotImplementedException(); + } + + public IImmutableDictionary AddRange(IEnumerable> pairs) + { + throw new NotImplementedException(); + } + + public IImmutableDictionary Clear() + { + throw new NotImplementedException(); + } + + public bool Contains(KeyValuePair pair) + { + throw new NotImplementedException(); + } + + public bool ContainsKey(string key) + { + throw new NotImplementedException(); + } + + public IEnumerator> GetEnumerator() + { + throw new NotImplementedException(); + } + + public IImmutableDictionary Remove(string key) + { + throw new NotImplementedException(); + } + + public IImmutableDictionary RemoveRange(IEnumerable keys) + { + throw new NotImplementedException(); + } + + public IImmutableDictionary SetItem(string key, int value) + { + throw new NotImplementedException(); + } + + public IImmutableDictionary SetItems(IEnumerable> items) + { + throw new NotImplementedException(); + } + + public bool TryGetKey(string equalKey, out string actualKey) + { + throw new NotImplementedException(); + } + + public bool TryGetValue(string key, out int value) + { + throw new NotImplementedException(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + throw new NotImplementedException(); + } + } } } diff --git a/src/System.Text.Json/tests/Serialization/TestClasses.SimpleTestClass.cs b/src/System.Text.Json/tests/Serialization/TestClasses.SimpleTestClass.cs index 31a28a5412b6..a79f244cdd4d 100644 --- a/src/System.Text.Json/tests/Serialization/TestClasses.SimpleTestClass.cs +++ b/src/System.Text.Json/tests/Serialization/TestClasses.SimpleTestClass.cs @@ -62,6 +62,9 @@ public class SimpleTestClass : ITestClass public Dictionary MyStringToStringDict { get; set; } public IDictionary MyStringToStringIDict { get; set; } public IReadOnlyDictionary MyStringToStringIReadOnlyDict { get; set; } + public ImmutableDictionary MyStringToStringImmutableDict { get; set; } + public IImmutableDictionary MyStringToStringIImmutableDict { get; set; } + public ImmutableSortedDictionary MyStringToStringImmutableSortedDict { get; set; } public Stack MyStringStackT { get; set; } public Queue MyStringQueueT { get; set; } public HashSet MyStringHashSetT { get; set; } @@ -102,7 +105,10 @@ public class SimpleTestClass : ITestClass @"""MyEnum"" : 2," + // int by default @"""MyStringToStringDict"" : {""key"" : ""value""}," + @"""MyStringToStringIDict"" : {""key"" : ""value""}," + - @"""MyStringToStringIReadOnlyDict"" : {""key"" : ""value""}"; + @"""MyStringToStringIReadOnlyDict"" : {""key"" : ""value""}," + + @"""MyStringToStringImmutableDict"" : {""key"" : ""value""}," + + @"""MyStringToStringIImmutableDict"" : {""key"" : ""value""}," + + @"""MyStringToStringImmutableSortedDict"" : {""key"" : ""value""}"; private const string s_partialJsonArrays = @"""MyInt16Array"" : [1]," + @@ -228,6 +234,10 @@ public void Initialize() MyStringToStringIDict = new Dictionary { { "key", "value" } }; MyStringToStringIReadOnlyDict = new Dictionary { { "key", "value" } }; + MyStringToStringImmutableDict = ImmutableDictionary.CreateRange(MyStringToStringDict); + MyStringToStringIImmutableDict = ImmutableDictionary.CreateRange(MyStringToStringDict); + MyStringToStringImmutableSortedDict = ImmutableSortedDictionary.CreateRange(MyStringToStringDict); + MyStringStackT = new Stack(new List() { "Hello", "World" } ); MyStringQueueT = new Queue(new List() { "Hello", "World" }); MyStringHashSetT = new HashSet(new List() { "Hello" }); @@ -326,6 +336,10 @@ public void Verify() Assert.Equal("value", MyStringToStringIDict["key"]); Assert.Equal("value", MyStringToStringIReadOnlyDict["key"]); + Assert.Equal("value", MyStringToStringImmutableDict["key"]); + Assert.Equal("value", MyStringToStringIImmutableDict["key"]); + Assert.Equal("value", MyStringToStringImmutableSortedDict["key"]); + Assert.Equal(2, MyStringStackT.Count); Assert.True(MyStringStackT.Contains("Hello")); Assert.True(MyStringStackT.Contains("World")); diff --git a/src/System.Text.Json/tests/Serialization/TestClasses.SimpleTestClassWithObject.cs b/src/System.Text.Json/tests/Serialization/TestClasses.SimpleTestClassWithObject.cs index 6ae05115e843..1417945e5de5 100644 --- a/src/System.Text.Json/tests/Serialization/TestClasses.SimpleTestClassWithObject.cs +++ b/src/System.Text.Json/tests/Serialization/TestClasses.SimpleTestClassWithObject.cs @@ -37,6 +37,9 @@ public class SimpleTestClassWithObject : SimpleTestClassWithSimpleObject public object MyStringToStringDict { get; set; } public object MyStringToStringIDict { get; set; } public object MyStringToStringIReadOnlyDict { get; set; } + public object MyStringToStringImmutableDict { get; set; } + public object MyStringToStringIImmutableDict { get; set; } + public object MyStringToStringImmutableSortedDict { get; set; } public object MyStringStackT { get; set; } public object MyStringQueueT { get; set; } public object MyStringHashSetT { get; set; } @@ -96,7 +99,10 @@ public class SimpleTestClassWithObject : SimpleTestClassWithSimpleObject @"""MyStringIReadOnlyListT"" : [""Hello""]," + @"""MyStringToStringDict"" : {""key"" : ""value""}," + @"""MyStringToStringIDict"" : {""key"" : ""value""}," + - @"""MyStringToStringIReadOnlyDict"" : {""key"" : ""value""}" + + @"""MyStringToStringIReadOnlyDict"" : {""key"" : ""value""}," + + @"""MyStringToStringImmutableDict"" : {""key"" : ""value""}," + + @"""MyStringToStringIImmutableDict"" : {""key"" : ""value""}," + + @"""MyStringToStringImmutableSortedDict"" : {""key"" : ""value""}," + @"""MyStringStackT"" : [""Hello"", ""World""]," + @"""MyStringQueueT"" : [""Hello"", ""World""]," + @"""MyStringHashSetT"" : [""Hello""]," + @@ -148,6 +154,10 @@ public override void Initialize() MyStringToStringIDict = new Dictionary { { "key", "value" } }; MyStringToStringIReadOnlyDict = new Dictionary { { "key", "value" } }; + MyStringToStringImmutableDict = ImmutableDictionary.CreateRange((Dictionary)MyStringToStringDict); + MyStringToStringIImmutableDict = ImmutableDictionary.CreateRange((Dictionary)MyStringToStringDict); + MyStringToStringImmutableSortedDict = ImmutableSortedDictionary.CreateRange((Dictionary)MyStringToStringDict); + MyStringStackT = new Stack(new List() { "Hello", "World" }); MyStringQueueT = new Queue(new List() { "Hello", "World" }); MyStringHashSetT = new HashSet(new List() { "Hello" }); @@ -198,6 +208,10 @@ public override void Verify() Assert.Equal("value", ((IDictionary)MyStringToStringIDict)["key"]); Assert.Equal("value", ((IReadOnlyDictionary)MyStringToStringIReadOnlyDict)["key"]); + Assert.Equal("value", ((ImmutableDictionary)MyStringToStringImmutableDict)["key"]); + Assert.Equal("value", ((IImmutableDictionary)MyStringToStringIImmutableDict)["key"]); + Assert.Equal("value", ((ImmutableSortedDictionary)MyStringToStringImmutableSortedDict)["key"]); + Assert.Equal(2, ((Stack)MyStringStackT).Count); Assert.True(((Stack)MyStringStackT).Contains("Hello")); Assert.True(((Stack)MyStringStackT).Contains("World")); diff --git a/src/System.Text.Json/tests/Serialization/Value.ReadTests.ImmutableCollections.cs b/src/System.Text.Json/tests/Serialization/Value.ReadTests.ImmutableCollections.cs index c1b923b01282..2cd3313efb81 100644 --- a/src/System.Text.Json/tests/Serialization/Value.ReadTests.ImmutableCollections.cs +++ b/src/System.Text.Json/tests/Serialization/Value.ReadTests.ImmutableCollections.cs @@ -544,5 +544,11 @@ public static void ReadPrimitiveImmutableSortedSetT() result = JsonSerializer.Parse>(Encoding.UTF8.GetBytes(@"[]")); Assert.Equal(0, result.Count()); } + + [Fact] + public static void ReadPrimitiveImmutableArrayThrows() + { + Assert.Throws(() => JsonSerializer.Parse>(Encoding.UTF8.GetBytes(@"[1,2]"))); + } } } From e5577f9fa4c1dc2bb745d5c264aad3feb0f4468a Mon Sep 17 00:00:00 2001 From: Santiago Fernandez Madero Date: Fri, 31 May 2019 14:31:55 -0700 Subject: [PATCH 606/607] Revert "Added Range Manipulation APIs to Collection and ObservableCollection (#35772)" (#38115) * Revert "Added Range Manipulation APIs to Collection and ObservableCollection (#35772)" This reverts commit b705522753f09d501762cca6c45d6bd031c112d7. * Baseline API Compat errors * Fix baseline vs netstandard --- .../ObjectModel/ObservableCollection.cs | 159 +------ ...rvableCollection_MethodTests.netcoreapp.cs | 269 ----------- .../ObservableCollection_MethodsTest.cs | 2 +- ...n_SkipCollectionChangedTests.netcoreapp.cs | 126 ------ .../tests/System.ObjectModel.Tests.csproj | 2 - src/System.Runtime/ref/System.Runtime.cs | 7 - .../src/MatchingRefApiCompatBaseline.txt | 7 + .../tests/System.Runtime.Tests.csproj | 3 +- .../ObjectModel/CollectionTests.cs | 13 +- .../ObjectModel/CollectionTests.netcoreapp.cs | 424 ------------------ ...patBaseline.netcoreapp.netstandardOnly.txt | 79 +--- 11 files changed, 34 insertions(+), 1057 deletions(-) delete mode 100644 src/System.ObjectModel/tests/ObservableCollection/ObservableCollection_MethodTests.netcoreapp.cs delete mode 100644 src/System.ObjectModel/tests/ObservableCollection/ObservableCollection_SkipCollectionChangedTests.netcoreapp.cs delete mode 100644 src/System.Runtime/tests/System/Collections/ObjectModel/CollectionTests.netcoreapp.cs diff --git a/src/System.ObjectModel/src/System/Collections/ObjectModel/ObservableCollection.cs b/src/System.ObjectModel/src/System/Collections/ObjectModel/ObservableCollection.cs index 7dac6ec2f3f7..f74a2c8c7bef 100644 --- a/src/System.ObjectModel/src/System/Collections/ObjectModel/ObservableCollection.cs +++ b/src/System.ObjectModel/src/System/Collections/ObjectModel/ObservableCollection.cs @@ -27,9 +27,6 @@ public class ObservableCollection : Collection, INotifyCollectionChanged, [NonSerialized] private int _blockReentrancyCount; - [NonSerialized] - private bool _skipRaisingEvents; - /// /// Initializes a new instance of ObservableCollection that is empty and has default initial capacity. /// @@ -124,95 +121,9 @@ protected override void RemoveItem(int index) base.RemoveItem(index); - if (!_skipRaisingEvents) - { - OnCountPropertyChanged(); - OnIndexerPropertyChanged(); - OnCollectionChanged(NotifyCollectionChangedAction.Remove, removedItem, index); - } - } - - /// - /// Called by base class Collection<T> when a count of items is removed from the list; - /// raises a CollectionChanged event to any listeners. - /// - protected override void RemoveItemsRange(int index, int count) - { - CheckReentrancy(); - - T[] removedItems = null; - - bool ignore = _skipRaisingEvents; - if (!ignore) - { - _skipRaisingEvents = true; - - if (count > 0) - { - removedItems = new T[count]; - for (int i = 0; i < count; i++) - { - removedItems[i] = this[index + i]; - } - } - } - - try - { - base.RemoveItemsRange(index, count); - } - finally - { - if (!ignore) - { - _skipRaisingEvents = false; - } - } - - if (count > 0 && !_skipRaisingEvents) - { - OnCountPropertyChanged(); - OnIndexerPropertyChanged(); - OnCollectionChanged(NotifyCollectionChangedAction.Remove, removedItems, index); - } - } - - /// - /// Called by base class Collection<T> when a collection of items is added to list; - /// raises a CollectionChanged event to any listeners. - /// - protected override void ReplaceItemsRange(int index, int count, IEnumerable collection) - { - CheckReentrancy(); - - _skipRaisingEvents = true; - - T[] itemsToReplace = new T[count - index]; - for (int i = index; i < count; i++) - { - itemsToReplace[i] = this[i]; - } - - try - { - base.ReplaceItemsRange(index, count, collection); - } - finally - { - _skipRaisingEvents = false; - } - - if (!_skipRaisingEvents) - { - IList newItems = collection is IList list ? list : new List(collection); - - if (newItems.Count > 0) - { - OnCountPropertyChanged(); - OnIndexerPropertyChanged(); - OnCollectionChanged(NotifyCollectionChangedAction.Replace, itemsToReplace, newItems, index); - } - } + OnCountPropertyChanged(); + OnIndexerPropertyChanged(); + OnCollectionChanged(NotifyCollectionChangedAction.Remove, removedItem, index); } /// @@ -224,51 +135,9 @@ protected override void InsertItem(int index, T item) CheckReentrancy(); base.InsertItem(index, item); - if (!_skipRaisingEvents) - { - OnCountPropertyChanged(); - OnIndexerPropertyChanged(); - OnCollectionChanged(NotifyCollectionChangedAction.Add, item, index); - } - } - - /// - /// Called by base class Collection<T> when a collection of items is added to list; - /// raises a CollectionChanged event to any listeners. - /// - protected override void InsertItemsRange(int index, IEnumerable collection) - { - CheckReentrancy(); - - bool ignore = _skipRaisingEvents; - if (!ignore) - { - _skipRaisingEvents = true; - } - - try - { - base.InsertItemsRange(index, collection); - } - finally - { - if (!ignore) - { - _skipRaisingEvents = false; - } - } - - if (!_skipRaisingEvents) - { - IList newItems = collection is IList list ? list : new List(collection); - - if (newItems.Count > 0) - { - OnCountPropertyChanged(); - OnIndexerPropertyChanged(); - OnCollectionChanged(NotifyCollectionChangedAction.Add, newItems, index); - } - } + OnCountPropertyChanged(); + OnIndexerPropertyChanged(); + OnCollectionChanged(NotifyCollectionChangedAction.Add, item, index); } /// @@ -396,14 +265,6 @@ private void OnCollectionChanged(NotifyCollectionChangedAction action, object it OnCollectionChanged(new NotifyCollectionChangedEventArgs(action, item, index)); } - /// - /// Helper to raise CollectionChanged event to any listeners - /// - private void OnCollectionChanged(NotifyCollectionChangedAction action, IList items, int index) - { - OnCollectionChanged(new NotifyCollectionChangedEventArgs(action, items, index)); - } - /// /// Helper to raise CollectionChanged event to any listeners /// @@ -420,14 +281,6 @@ private void OnCollectionChanged(NotifyCollectionChangedAction action, object ol OnCollectionChanged(new NotifyCollectionChangedEventArgs(action, newItem, oldItem, index)); } - /// - /// Helper to raise CollectionChanged event to any listeners - /// - private void OnCollectionChanged(NotifyCollectionChangedAction action, IList oldItems, IList newItems, int index) - { - OnCollectionChanged(new NotifyCollectionChangedEventArgs(action, newItems, oldItems, index)); - } - /// /// Helper to raise CollectionChanged event with action == Reset to any listeners /// diff --git a/src/System.ObjectModel/tests/ObservableCollection/ObservableCollection_MethodTests.netcoreapp.cs b/src/System.ObjectModel/tests/ObservableCollection/ObservableCollection_MethodTests.netcoreapp.cs deleted file mode 100644 index f15d3c3c463f..000000000000 --- a/src/System.ObjectModel/tests/ObservableCollection/ObservableCollection_MethodTests.netcoreapp.cs +++ /dev/null @@ -1,269 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System.Linq; -using Xunit; - -namespace System.Collections.ObjectModel.Tests -{ - public partial class ObservableCollection_MethodTests - { - [Fact] - public static void InsertRange_NotifyCollectionChanged_Beginning_Test() - { - int[] dataToInsert = new int[] { 1, 2, 3, 4, 5 }; - int[] initialData = new int[] { 10, 11, 12, 13 }; - int eventCounter = 0; - ObservableCollection collection = new ObservableCollection(initialData); - collection.CollectionChanged += (o, e) => eventCounter++; - - collection.InsertRange(0, dataToInsert); - - Assert.Equal(dataToInsert.Length + initialData.Length, collection.Count); - Assert.Equal(1, eventCounter); - - int[] collectionAssertion = collection.ToArray(); - Assert.Equal(dataToInsert, collectionAssertion.AsSpan(0, 5).ToArray()); - Assert.Equal(initialData, collectionAssertion.AsSpan(5).ToArray()); - } - - [Fact] - public static void InsertRange_NotifyCollectionChanged_Middle_Test() - { - int[] dataToInsert = new int[] { 1, 2, 3, 4, 5 }; - int[] initialData = new int[] { 10, 11, 12, 13 }; - int eventCounter = 0; - ObservableCollection collection = new ObservableCollection(initialData); - collection.CollectionChanged += (o, e) => eventCounter++; - - collection.InsertRange(2, dataToInsert); - - Assert.Equal(dataToInsert.Length + initialData.Length, collection.Count); - Assert.Equal(1, eventCounter); - - int[] collectionAssertion = collection.ToArray(); - Assert.Equal(initialData.AsSpan(0, 2).ToArray(), collectionAssertion.AsSpan(0, 2).ToArray()); - Assert.Equal(dataToInsert, collectionAssertion.AsSpan(2, 5).ToArray()); - Assert.Equal(initialData.AsSpan(2, 2).ToArray(), collectionAssertion.AsSpan(7, 2).ToArray()); - } - - [Fact] - public static void InsertRange_NotifyCollectionChanged_End_Test() - { - int[] dataToInsert = new int[] { 1, 2, 3, 4, 5 }; - int[] initialData = new int[] { 10, 11, 12, 13 }; - int eventCounter = 0; - ObservableCollection collection = new ObservableCollection(initialData); - collection.CollectionChanged += (o, e) => eventCounter++; - - collection.InsertRange(4, dataToInsert); - - Assert.Equal(dataToInsert.Length + initialData.Length, collection.Count); - Assert.Equal(1, eventCounter); - - int[] collectionAssertion = collection.ToArray(); - Assert.Equal(initialData, collectionAssertion.AsSpan(0, 4).ToArray()); - Assert.Equal(dataToInsert, collectionAssertion.AsSpan(4).ToArray()); - } - - [Fact] - public static void AddRange_NotifyCollectionChanged_Test() - { - int[] dataToInsert = new int[] { 1, 2, 3, 4, 5 }; - int[] initialData = new int[] { 10, 11, 12, 13 }; - int eventCounter = 0; - ObservableCollection collection = new ObservableCollection(initialData); - collection.CollectionChanged += (o, e) => eventCounter++; - - collection.AddRange(dataToInsert); - - Assert.Equal(dataToInsert.Length + initialData.Length, collection.Count); - Assert.Equal(1, eventCounter); - - int[] collectionAssertion = collection.ToArray(); - Assert.Equal(initialData, collectionAssertion.AsSpan(0, 4).ToArray()); - Assert.Equal(dataToInsert, collectionAssertion.AsSpan(4).ToArray()); - } - - [Fact] - public static void AddRange_NotifyCollectionChanged_EventArgs_Test() - { - int[] dataToAdd = new int[] { 1, 2, 3, 4, 5, 6, 7, 8 }; - int[] actualDataAdded = new int[0]; - ObservableCollection collection = new ObservableCollection(); - collection.CollectionChanged += (o, e) => actualDataAdded = e.NewItems.Cast().ToArray(); - - collection.AddRange(dataToAdd); - - Assert.Equal(dataToAdd, actualDataAdded); - } - - [Fact] - public static void InsertRange_NotifyCollectionChanged_EventArgs_Test() - { - int[] dataToAdd = new int[] { 1, 2, 3, 4, 5, 6, 7, 8 }; - int[] actualDataAdded = new int[0]; - ObservableCollection collection = new ObservableCollection(); - collection.CollectionChanged += (o, e) => actualDataAdded = e.NewItems.Cast().ToArray(); - - collection.InsertRange(0, dataToAdd); - - Assert.Equal(dataToAdd, actualDataAdded); - } - - [Fact] - public static void InsertRange_NotifyCollectionChanged_EventArgs_Middle_Test() - { - int[] dataToAdd = new int[] { 1, 2, 3, 4, 5, 6, 7, 8 }; - int[] actualDataAdded = new int[0]; - ObservableCollection collection = new ObservableCollection(); - for (int i = 0; i < 4; i++) - { - collection.Add(i); - } - - collection.CollectionChanged += (o, e) => actualDataAdded = e.NewItems.Cast().ToArray(); - collection.InsertRange(2, dataToAdd); - - Assert.Equal(dataToAdd, actualDataAdded); - } - - [Fact] - public static void InsertRange_NotifyCollectionChanged_EventArgs_End_Test() - { - int[] dataToAdd = new int[] { 1, 2, 3, 4, 5, 6, 7, 8 }; - int[] actualDataAdded = new int[0]; - ObservableCollection collection = new ObservableCollection(); - for (int i = 0; i < 4; i++) - { - collection.Add(i); - } - - collection.CollectionChanged += (o, e) => actualDataAdded = e.NewItems.Cast().ToArray(); - collection.InsertRange(4, dataToAdd); - - Assert.Equal(dataToAdd, actualDataAdded); - } - - [Fact] - public static void RemoveRange_NotifyCollectionChanged_FirstTwo_Test() - { - int[] initialData = new int[] { 10, 11, 12, 13 }; - int itemsToRemove = 2; - int eventCounter = 0; - ObservableCollection collection = new ObservableCollection(initialData); - collection.CollectionChanged += (o, e) => eventCounter++; - - collection.RemoveRange(0, itemsToRemove); - - Assert.Equal(initialData.Length - itemsToRemove, collection.Count); - Assert.Equal(1, eventCounter); - Assert.Equal(initialData.AsSpan(2).ToArray(), collection.ToArray()); - } - - [Fact] - public static void RemoveRange_NotifyCollectionChanged_MiddleTwo_Test() - { - int[] initialData = new int[] { 10, 11, 12, 13 }; - int itemsToRemove = 2; - int eventCounter = 0; - ObservableCollection collection = new ObservableCollection(initialData); - collection.CollectionChanged += (o, e) => eventCounter++; - - collection.RemoveRange(1, itemsToRemove); - - Assert.Equal(initialData.Length - itemsToRemove, collection.Count); - Assert.Equal(1, eventCounter); - Assert.Equal(initialData[0], collection[0]); - Assert.Equal(initialData[3], collection[1]); - } - - [Fact] - public static void RemoveRange_NotifyCollectionChanged_LastTwo_Test() - { - int[] initialData = new int[] { 10, 11, 12, 13 }; - int itemsToRemove = 2; - int eventCounter = 0; - ObservableCollection collection = new ObservableCollection(initialData); - collection.CollectionChanged += (o, e) => eventCounter++; - - collection.RemoveRange(2, itemsToRemove); - - Assert.Equal(initialData.Length - itemsToRemove, collection.Count); - Assert.Equal(1, eventCounter); - Assert.Equal(initialData.AsSpan(0, 2).ToArray(), collection.ToArray()); - } - - [Fact] - public static void RemoveRange_NotifyCollectionChanged_IntMaxValueOverflow_Test() - { - int count = 500; - ObservableCollection collection = new ObservableCollection(); - for (int i = 0; i < count; i++) - { - collection.Add(i); - } - - Assert.Throws(() => collection.RemoveRange(collection.Count - 2, int.MaxValue)); - } - - [Fact] - public static void RemoveRange_NotifyCollectionChanged_EventArgs_IndexOfZero_Test() - { - int[] initialData = new int[] { 1, 2, 3, 4, 5, 6, 7, 8 }; - int[] actualDataRemoved = new int[0]; - int numberOfItemsToRemove = 4; - ObservableCollection collection = new ObservableCollection(); - foreach (int item in initialData) - { - collection.Add(item); - } - - collection.CollectionChanged += (o, e) => actualDataRemoved = e.OldItems.Cast().ToArray(); - collection.RemoveRange(0, numberOfItemsToRemove); - - Assert.Equal(initialData.Length - numberOfItemsToRemove, collection.Count); - Assert.Equal(initialData.AsSpan(0, numberOfItemsToRemove).ToArray(), actualDataRemoved); - } - - [Fact] - public static void RemoveRange_NotifyCollectionChanged_EventArgs_IndexMiddle_Test() - { - int[] initialData = new int[] { 1, 2, 3, 4, 5, 6, 7, 8 }; - int[] actualDataRemoved = new int[0]; - int numberOfItemsToRemove = 4; - int startIndex = 3; - ObservableCollection collection = new ObservableCollection(); - foreach (int item in initialData) - { - collection.Add(item); - } - - collection.CollectionChanged += (o, e) => actualDataRemoved = e.OldItems.Cast().ToArray(); - collection.RemoveRange(startIndex, numberOfItemsToRemove); - - Assert.Equal(initialData.Length - numberOfItemsToRemove, collection.Count); - Assert.Equal(initialData.AsSpan(startIndex, numberOfItemsToRemove).ToArray(), actualDataRemoved); - } - - [Fact] - public static void ReplaceRange_NotifyCollectionChanged_Test() - { - int[] initialData = new int[] { 10, 11, 12, 13 }; - int[] dataToReplace = new int[] { 3, 8 }; - int eventCounter = 0; - ObservableCollection collection = new ObservableCollection(initialData); - collection.CollectionChanged += (o, e) => eventCounter++; - - collection.ReplaceRange(0, 2, dataToReplace); - - Assert.Equal(initialData.Length, collection.Count); - Assert.Equal(1, eventCounter); - - int[] collectionAssertion = collection.ToArray(); - Assert.Equal(dataToReplace, collectionAssertion.AsSpan(0, 2).ToArray()); - Assert.Equal(initialData.AsSpan(2, 2).ToArray(), collectionAssertion.AsSpan(2, 2).ToArray()); - } - } -} diff --git a/src/System.ObjectModel/tests/ObservableCollection/ObservableCollection_MethodsTest.cs b/src/System.ObjectModel/tests/ObservableCollection/ObservableCollection_MethodsTest.cs index bb291a98a3e4..6f03a97cc190 100644 --- a/src/System.ObjectModel/tests/ObservableCollection/ObservableCollection_MethodsTest.cs +++ b/src/System.ObjectModel/tests/ObservableCollection/ObservableCollection_MethodsTest.cs @@ -14,7 +14,7 @@ namespace System.Collections.ObjectModel.Tests /// that the CollectionChanged events and eventargs are fired and populated /// properly. /// - public partial class PublicMethodsTest + public static class PublicMethodsTest { /// /// Tests that is possible to Add an item to the collection. diff --git a/src/System.ObjectModel/tests/ObservableCollection/ObservableCollection_SkipCollectionChangedTests.netcoreapp.cs b/src/System.ObjectModel/tests/ObservableCollection/ObservableCollection_SkipCollectionChangedTests.netcoreapp.cs deleted file mode 100644 index 9a9b1c6f2120..000000000000 --- a/src/System.ObjectModel/tests/ObservableCollection/ObservableCollection_SkipCollectionChangedTests.netcoreapp.cs +++ /dev/null @@ -1,126 +0,0 @@ -using System.Collections.Generic; -using System.Collections.ObjectModel; -using Xunit; - -namespace System.ObjectModel.Tests.ObservableCollection -{ - public class ObservableCollection_SkipCollectionChangedTests - { - [Fact] - public void SkipCollectionChanged_AddRange_Test() - { - int collectionChangedCounter = 0; - NonNullObservableCollection collection = new NonNullObservableCollection(); - collection.Add("1"); - collection.Add("2"); - collection.Add("3"); - collection.CollectionChanged += (s, e) => collectionChangedCounter++; - - Assert.Throws(() => collection.AddRange(new string[1])); - Assert.Equal(0, collectionChangedCounter); - - collection.Add("4"); - Assert.Equal(1, collectionChangedCounter); - } - - [Fact] - public void SkipCollectionChanged_InsertRange_Test() - { - int collectionChangedCounter = 0; - NonNullObservableCollection collection = new NonNullObservableCollection(); - collection.Add("1"); - collection.Add("2"); - collection.Add("3"); - collection.CollectionChanged += (s, e) => collectionChangedCounter++; - - Assert.Throws(() => collection.InsertRange(0, new string[1])); - Assert.Equal(0, collectionChangedCounter); - - collection.Add("4"); - Assert.Equal(1, collectionChangedCounter); - } - - [Fact] - public void SkipCollectionChanged_RemoveRange_Test() - { - int collectionChangedCounter = 0; - NonNullObservableCollection collection = new NonNullObservableCollection(); - collection.Add("1"); - collection.Add("2"); - collection.Add("3"); - collection.CollectionChanged += (s, e) => collectionChangedCounter++; - - collection.RemoveRange(0, 2); - Assert.Equal(1, collectionChangedCounter); - - collection.Add("1"); - Assert.Equal(2, collectionChangedCounter); - } - - [Fact] - public void SkipCollectionChanged_RemoveRange_NoEventsRaised_Test() - { - int collectionChangedCounter = 0; - NonNullObservableCollection collection = new NonNullObservableCollection(); - collection.Add("1"); - collection.Add("2"); - collection.Add("3"); - collection.CollectionChanged += (s, e) => collectionChangedCounter++; - - collection.RemoveRange(0, 0); - - Assert.Equal(0, collectionChangedCounter); - } - - [Fact] - public void SkipCollectionChanged_ReplaceRange_Test() - { - int collectionChangedCounter = 0; - NonNullObservableCollection collection = new NonNullObservableCollection(); - collection.Add("1"); - collection.Add("2"); - collection.Add("3"); - collection.CollectionChanged += (s, e) => collectionChangedCounter++; - - Assert.Throws(() => collection.ReplaceRange(0, 2, new string[1])); - Assert.Equal(0, collectionChangedCounter); - - collection.Add("1"); - Assert.Equal(1, collectionChangedCounter); - } - - [Fact] - public void SkipCollectionChanged_ReplaceRange_Empty_Test() - { - int collectionChangedCounter = 0; - NonNullObservableCollection collection = new NonNullObservableCollection(); - collection.Add("1"); - collection.Add("2"); - collection.Add("3"); - collection.CollectionChanged += (s, e) => collectionChangedCounter++; - - collection.ReplaceRange(0, 0, new string[0]); - Assert.Equal(0, collectionChangedCounter); - - collection.Add("1"); - Assert.Equal(1, collectionChangedCounter); - } - - public class NonNullObservableCollection : ObservableCollection - { - - public NonNullObservableCollection() : base() { } - public NonNullObservableCollection(List list) : base(list) { } - - protected override void InsertItem(int index, T item) - { - if (item == null) - { - throw new ArgumentNullException(); - } - - base.InsertItem(index, item); - } - } - } -} diff --git a/src/System.ObjectModel/tests/System.ObjectModel.Tests.csproj b/src/System.ObjectModel/tests/System.ObjectModel.Tests.csproj index 931f85a0fe81..1bde73923e5a 100644 --- a/src/System.ObjectModel/tests/System.ObjectModel.Tests.csproj +++ b/src/System.ObjectModel/tests/System.ObjectModel.Tests.csproj @@ -44,8 +44,6 @@ - - diff --git a/src/System.Runtime/ref/System.Runtime.cs b/src/System.Runtime/ref/System.Runtime.cs index ca4141cc1a44..cda44ff604ce 100644 --- a/src/System.Runtime/ref/System.Runtime.cs +++ b/src/System.Runtime/ref/System.Runtime.cs @@ -4034,7 +4034,6 @@ public Collection(System.Collections.Generic.IList list) { } bool System.Collections.IList.IsReadOnly { get { throw null; } } object System.Collections.IList.this[int index] { get { throw null; } set { } } public void Add(T item) { } - public void AddRange(System.Collections.Generic.IEnumerable collection) { } public void Clear() { } protected virtual void ClearItems() { } public bool Contains(T item) { throw null; } @@ -4043,15 +4042,9 @@ public void CopyTo(T[] array, int index) { } public int IndexOf(T item) { throw null; } public void Insert(int index, T item) { } protected virtual void InsertItem(int index, T item) { } - protected virtual void InsertItemsRange(int index, System.Collections.Generic.IEnumerable collection) { } - public void InsertRange(int index, System.Collections.Generic.IEnumerable collection) { } public bool Remove(T item) { throw null; } public void RemoveAt(int index) { } protected virtual void RemoveItem(int index) { } - protected virtual void RemoveItemsRange(int index, int count) { } - public void RemoveRange(int index, int count) { } - protected virtual void ReplaceItemsRange(int index, int count, System.Collections.Generic.IEnumerable collection) { } - public void ReplaceRange(int index, int count, System.Collections.Generic.IEnumerable collection) { } protected virtual void SetItem(int index, T item) { } void System.Collections.ICollection.CopyTo(System.Array array, int index) { } System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } diff --git a/src/System.Runtime/src/MatchingRefApiCompatBaseline.txt b/src/System.Runtime/src/MatchingRefApiCompatBaseline.txt index aa7c74c7f725..1781594c71d3 100644 --- a/src/System.Runtime/src/MatchingRefApiCompatBaseline.txt +++ b/src/System.Runtime/src/MatchingRefApiCompatBaseline.txt @@ -7,6 +7,13 @@ MembersMustExist : Member 'System.AppContext.remove_ProcessExit(System.EventHand MembersMustExist : Member 'System.AppContext.remove_UnhandledException(System.UnhandledExceptionEventHandler)' does not exist in the reference but it does exist in the implementation. MembersMustExist : Member 'System.AppContext.SetData(System.String, System.Object)' does not exist in the reference but it does exist in the implementation. MembersMustExist : Member 'System.WeakReference..ctor()' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Collections.ObjectModel.Collection.AddRange(System.Collections.Generic.IEnumerable)' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Collections.ObjectModel.Collection.InsertItemsRange(System.Int32, System.Collections.Generic.IEnumerable)' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Collections.ObjectModel.Collection.InsertRange(System.Int32, System.Collections.Generic.IEnumerable)' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Collections.ObjectModel.Collection.RemoveItemsRange(System.Int32, System.Int32)' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Collections.ObjectModel.Collection.RemoveRange(System.Int32, System.Int32)' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Collections.ObjectModel.Collection.ReplaceItemsRange(System.Int32, System.Int32, System.Collections.Generic.IEnumerable)' does not exist in the reference but it does exist in the implementation. +MembersMustExist : Member 'System.Collections.ObjectModel.Collection.ReplaceRange(System.Int32, System.Int32, System.Collections.Generic.IEnumerable)' does not exist in the reference but it does exist in the implementation. MembersMustExist : Member 'System.Reflection.Module.GetModuleHandleImpl()' does not exist in the reference but it does exist in the implementation. CannotRemoveBaseTypeOrInterface : Type 'System.Runtime.Serialization.DeserializationBlockedException' does not inherit from base type 'System.Runtime.Serialization.SerializationException' in the reference but it does in the implementation. MembersMustExist : Member 'System.Runtime.Serialization.SerializationInfo.DeserializationInProgress.get()' does not exist in the reference but it does exist in the implementation. diff --git a/src/System.Runtime/tests/System.Runtime.Tests.csproj b/src/System.Runtime/tests/System.Runtime.Tests.csproj index bc3b39a3f250..40937ac18fb8 100644 --- a/src/System.Runtime/tests/System.Runtime.Tests.csproj +++ b/src/System.Runtime/tests/System.Runtime.Tests.csproj @@ -72,7 +72,6 @@ - @@ -156,6 +155,7 @@ + @@ -234,7 +234,6 @@ - diff --git a/src/System.Runtime/tests/System/Collections/ObjectModel/CollectionTests.cs b/src/System.Runtime/tests/System/Collections/ObjectModel/CollectionTests.cs index 0961f2b8812f..4e1fb2f82eb0 100644 --- a/src/System.Runtime/tests/System/Collections/ObjectModel/CollectionTests.cs +++ b/src/System.Runtime/tests/System/Collections/ObjectModel/CollectionTests.cs @@ -1,13 +1,22 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System; +using System.Collections; using System.Collections.Generic; +using System.Collections.ObjectModel; using Xunit; namespace System.Collections.ObjectModel.Tests { - public partial class CollectionTests : CollectionTestBase + /// + /// Since is just a wrapper base class around an , + /// we just verify that the underlying list is what we expect, validate that the calls which + /// we expect are forwarded to the underlying list, and verify that the exceptions we expect + /// are thrown. + /// + public class CollectionTests : CollectionTestBase { private static readonly Collection s_empty = new Collection(); diff --git a/src/System.Runtime/tests/System/Collections/ObjectModel/CollectionTests.netcoreapp.cs b/src/System.Runtime/tests/System/Collections/ObjectModel/CollectionTests.netcoreapp.cs deleted file mode 100644 index 940af6773626..000000000000 --- a/src/System.Runtime/tests/System/Collections/ObjectModel/CollectionTests.netcoreapp.cs +++ /dev/null @@ -1,424 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Collections.Generic; -using System.Linq; -using Xunit; - -namespace System.Collections.ObjectModel.Tests -{ - /// - /// Since is just a wrapper base class around an , - /// we just verify that the underlying list is what we expect, validate that the calls which - /// we expect are forwarded to the underlying list, and verify that the exceptions we expect - /// are thrown. - /// - public partial class CollectionTests : CollectionTestBase - { - [Fact] - public void Collection_AddRange_ToEmpty_Test() - { - int[] expected = new[] { 1, 2, 3, 4 }; - Collection collection = new Collection(); - - collection.AddRange(expected); - - Assert.NotNull(collection); - Assert.Equal(expected.Length, collection.Count); - Assert.Equal(expected, collection.ToArray()); - } - - [Fact] - public void Collection_AddRange_ToExisting_Test() - { - int[] initial = new int[] { 1, 2, 3, 4 }; - int[] dataToInsert = new int[] { 5, 6, 7, 8 }; - Collection collection = new Collection(); - for (int i = 0; i < initial.Length; i++) - collection.Add(initial[i]); - - collection.AddRange(dataToInsert); - - Assert.NotNull(collection); - Assert.Equal(initial.Length + dataToInsert.Length, collection.Count); - - int[] collectionAssertion = collection.ToArray(); - Assert.Equal(initial, collectionAssertion.AsSpan(0, 4).ToArray()); - Assert.Equal(dataToInsert, collectionAssertion.AsSpan(4, 4).ToArray()); - } - - [Fact] - public void Collection_AddRange_Empty_Test() - { - int[] expected = new int[0]; - Collection collection = new Collection(); - - collection.AddRange(expected); - - Assert.NotNull(collection); - Assert.Equal(expected.Length, collection.Count); - } - - [Fact] - public void Collection_AddRange_Null_Test() - { - Collection collection = new Collection(); - Exception ex = Assert.Throws(() => collection.AddRange(null)); - } - - [Fact] - public void Collection_AddRange_ReadOnly_Test() - { - int[] expected = new int[] { 1, 2, 3, 4 }; - int[] baseCollection = new int[] { 5, 6, 7, 8 }; - Collection collection = new Collection(baseCollection); - - Exception ex = Assert.Throws(() => collection.AddRange(expected)); - } - - [Fact] - public void Collection_InsertRange_Beginning_Test() - { - int[] expected = new int[] { 1, 2, 3, 4, 5 }; - int[] originalCollection = new int[] { 10, 11, 12, 13 }; - List baseCollection = new List(originalCollection); - - int expectedLength = expected.Length + originalCollection.Length; - Collection collection = new Collection(baseCollection); - - collection.InsertRange(0, expected); - - Assert.NotNull(collection); - Assert.Equal(expectedLength, collection.Count); - - int[] collectionAssertion = collection.ToArray(); - Assert.Equal(expected, collectionAssertion.AsSpan(0, 5).ToArray()); - Assert.Equal(originalCollection, collectionAssertion.AsSpan(5, 4).ToArray()); - } - - [Fact] - public void Collection_InsertRange_End_Test() - { - int[] expected = new int[] { 1, 2, 3, 4, 5 }; - int[] originalCollection = new int[] { 10, 11, 12, 13 }; - List baseCollection = new List(originalCollection); - - int expectedLength = expected.Length + originalCollection.Length; - Collection collection = new Collection(baseCollection); - - collection.InsertRange(expected.Length - 1, expected); - - Assert.NotNull(collection); - Assert.Equal(expectedLength, collection.Count); - - int[] collectionAssertion = collection.ToArray(); - Assert.Equal(originalCollection, collectionAssertion.AsSpan(0, 4).ToArray()); - Assert.Equal(expected, collectionAssertion.AsSpan(4, 5).ToArray()); - } - - [Fact] - public void Collection_InsertRange_Middle_Test() - { - int[] expected = new int[] { 1, 2, 3, 4, 5 }; - int[] originalCollection = new int[] { 10, 11, 12, 13 }; - List baseCollection = new List(originalCollection); - - int expectedLength = expected.Length + originalCollection.Length; - Collection collection = new Collection(baseCollection); - - collection.InsertRange(2, expected); - - Assert.NotNull(collection); - Assert.Equal(expectedLength, collection.Count); - - int[] collectionAssertion = collection.ToArray(); - Assert.Equal(originalCollection.AsSpan(0, 2).ToArray(), collectionAssertion.AsSpan(0, 2).ToArray()); - Assert.Equal(expected, collectionAssertion.AsSpan(2, 5).ToArray()); - Assert.Equal(originalCollection.AsSpan(2, 2).ToArray(), collectionAssertion.AsSpan(7, 2).ToArray()); - } - - [Fact] - public void Collection_InsertRange_Empty_Test() - { - List baseCollection = new List(new[] { 10, 11, 12, 13 }); - Collection collection = new Collection(baseCollection); - - collection.InsertRange(0, new int[0]); - - Assert.NotNull(collection); - Assert.Equal(baseCollection.Count, collection.Count); - Assert.Equal(baseCollection, collection.ToArray()); - } - - [Fact] - public void Collection_InsertRange_Null_Test() - { - Collection collection = new Collection(); - Exception ex = Assert.Throws(() => collection.InsertRange(0, null)); - } - - [Fact] - public void Collection_InsertRange_ReadOnly_Test() - { - int[] expected = new int[] { 1, 2, 3, 4 }; - int[] baseCollection = new int[] { 5, 6, 7, 8 }; - Collection collection = new Collection(baseCollection); - - Exception ex = Assert.Throws(() => collection.InsertRange(0, expected)); - } - - [Fact] - public void Collection_InsertRange_IndexLessThan0_Test() - { - int[] expected = new int[] { 1, 2, 3, 4 }; - Collection collection = new Collection(); - Exception ex = Assert.Throws(() => collection.InsertRange(-1, expected)); - } - - [Fact] - public void Collection_InsertRange_IndexGreaterThanCount_Test() - { - int[] expected = new int[] { 1, 2, 3, 4 }; - Collection collection = new Collection(); - Exception ex = Assert.Throws(() => collection.InsertRange(10, expected)); - } - - [Fact] - public void Collection_RemoveRange_Overflow_Test() - { - Collection collection = new Collection(); - collection.Add(1); - collection.Add(2); - collection.Add(3); - - Assert.Throws(() => collection.RemoveRange(0, 4)); - } - - [Fact] - public void Collection_RemoveRange_IntMaxValueOverflow_Test() - { - var count = 500; - Collection collection = new Collection(); - for (int i = 0; i < count; i++) - { - collection.Add(i); - } - - Assert.Throws(() => collection.RemoveRange(collection.Count - 2, int.MaxValue)); - } - - [Fact] - public void Collection_RemoveRange_CountIsZero_Test() - { - int[] expected = new int[] { 1, 2, 3, 4, 5 }; - Collection collection = new Collection(); - for (int i = 0; i < expected.Length; i++) - { - collection.Add(expected[i]); - } - - collection.RemoveRange(0, 0); - - Assert.NotNull(collection); - Assert.Equal(expected.Length, collection.Count); - Assert.Equal(expected, collection.ToArray()); - } - - [Fact] - public void Collection_RemoveRange_CountIsLessThanZero_Test() - { - Collection collection = new Collection(); - collection.Add(1); - collection.Add(2); - - Assert.Throws(() => collection.RemoveRange(0, -1)); - } - - [Fact] - public void Collection_RemoveRange_All_Test() - { - Collection collection = new Collection(); - collection.Add(1); - collection.Add(2); - collection.Add(3); - - collection.RemoveRange(0, 3); - - Assert.NotNull(collection); - Assert.Equal(0, collection.Count); - } - - [Fact] - public void Collection_RemoveRange_FirstTwoItems_Test() - { - Collection collection = new Collection(); - collection.Add(1); - collection.Add(2); - collection.Add(3); - - collection.RemoveRange(0, 2); - - Assert.NotNull(collection); - Assert.Equal(1, collection.Count); - Assert.Equal(3, collection[0]); - } - - [Fact] - public void Collection_RemoveRange_LastTwoItems_Test() - { - Collection collection = new Collection(); - collection.Add(1); - collection.Add(2); - collection.Add(3); - - collection.RemoveRange(1, 2); - - Assert.NotNull(collection); - Assert.Equal(1, collection.Count); - Assert.Equal(1, collection[0]); - } - - [Fact] - public void Collection_RemoveRange_ZeroItems_Test() - { - Collection collection = new Collection(); - collection.Add(1); - collection.Add(2); - collection.Add(3); - - collection.RemoveRange(0, 0); - - Assert.NotNull(collection); - Assert.Equal(3, collection.Count); - Assert.Equal(1, collection[0]); - Assert.Equal(2, collection[1]); - Assert.Equal(3, collection[2]); - } - - [Fact] - public void Collection_RemoveRange_IndexLessThanZero_Test() - { - Collection collection = new Collection(); - collection.Add(1); - collection.Add(2); - collection.Add(3); - - AssertExtensions.Throws("index", () => collection.RemoveRange(-1, 3)); - } - - [Fact] - public void Collection_RemoveRange_IndexGreaterThanCollection_Test() - { - Collection collection = new Collection(); - collection.Add(1); - collection.Add(2); - collection.Add(3); - - AssertExtensions.Throws("index", () => collection.RemoveRange(4, 3)); - } - - [Fact] - public void Collection_RemoveRange_ReadOnly_Test() - { - Collection collection = new Collection(new int[] { 1, 2, 3 }); - - Assert.Throws(() => collection.RemoveRange(0, 2)); - } - - [Fact] - public void Collection_ReplaceRange_FirstTwo_Test() - { - int[] initial = new int[] { 1, 2, 3, 4 }; - int[] replace = new int[] { 5, 6, 7, 8 }; - Collection collection = new Collection(); - foreach (var item in initial) - collection.Add(item); - - collection.ReplaceRange(0, 2, replace); - - Assert.NotNull(collection); - Assert.Equal(initial.Length + 2, collection.Count); - - int[] collectionAssertion = collection.ToArray(); - Assert.Equal(replace, collectionAssertion.AsSpan(0, 4).ToArray()); - Assert.Equal(initial.AsSpan(2, 2).ToArray(), collectionAssertion.AsSpan(4, 2).ToArray()); - } - - [Fact] - public void Collection_ReplaceRange_LastTwo_Test() - { - int[] initial = new int[] { 1, 2, 3, 4 }; - int[] replace = new int[] { 5, 6, 7, 8 }; - Collection collection = new Collection(); - foreach (var item in initial) - collection.Add(item); - - collection.ReplaceRange(2, 2, replace); - - Assert.NotNull(collection); - Assert.Equal(initial.Length + 2, collection.Count); - - int[] collectionAssertion = collection.ToArray(); - Assert.Equal(initial.AsSpan(0, 2).ToArray(), collectionAssertion.AsSpan(0, 2).ToArray()); - Assert.Equal(replace.AsSpan(0, 4).ToArray(), collectionAssertion.AsSpan(2, 4).ToArray()); - } - - [Fact] - public void Collection_ReplaceRange_MiddleTwo_Test() - { - int[] initial = new int[] { 1, 2, 3, 4 }; - int[] replace = new int[] { 5, 6, 7, 8 }; - Collection collection = new Collection(); - foreach (var item in initial) - collection.Add(item); - - collection.ReplaceRange(1, 2, replace); - - Assert.NotNull(collection); - Assert.Equal(initial.Length + 2, collection.Count); - - Assert.Equal(initial[0], collection[0]); - Assert.Equal(replace, collection.ToArray().AsSpan(1, 4).ToArray()); - Assert.Equal(initial[3], collection[5]); - } - - [Fact] - public void Collection_ReplaceRange_NullCollection_Test() - { - Collection collection = new Collection(); - collection.Add(1); - collection.Add(2); - - Assert.Throws(() => collection.ReplaceRange(0, 2, null)); - } - - [Fact] - public void Collection_ReplaceRange_ReadOnly_Test() - { - Collection collection = new Collection(new int[] { 1, 2, 3 }); - Assert.Throws(() => collection.ReplaceRange(0, 2, new int[] { 4, 5 })); - } - - [Fact] - public void Collection_ReplaceRange_IndexLessThanZero_Test() - { - Collection collection = new Collection(); - collection.Add(1); - collection.Add(2); - - AssertExtensions.Throws("index", () => collection.ReplaceRange(-2, 2, new int[] { 1, 2 })); - } - - [Fact] - public void Collection_ReplaceRange_IndexGreaterThanCount_Test() - { - Collection collection = new Collection(); - collection.Add(1); - collection.Add(2); - - AssertExtensions.Throws("index", () => collection.ReplaceRange(4, 2, new int[] { 1, 2 })); - } - } -} diff --git a/src/shims/ApiCompatBaseline.netcoreapp.netstandardOnly.txt b/src/shims/ApiCompatBaseline.netcoreapp.netstandardOnly.txt index e9bfcd79b73f..49cbbe47e173 100644 --- a/src/shims/ApiCompatBaseline.netcoreapp.netstandardOnly.txt +++ b/src/shims/ApiCompatBaseline.netcoreapp.netstandardOnly.txt @@ -1,9 +1,14 @@ Compat issues with assembly netstandard: +MembersMustExist : Member 'System.Collections.ObjectModel.Collection.AddRange(System.Collections.Generic.IEnumerable)' does not exist in the implementation but it does exist in the contract. +MembersMustExist : Member 'System.Collections.ObjectModel.Collection.InsertItemsRange(System.Int32, System.Collections.Generic.IEnumerable)' does not exist in the implementation but it does exist in the contract. +MembersMustExist : Member 'System.Collections.ObjectModel.Collection.InsertRange(System.Int32, System.Collections.Generic.IEnumerable)' does not exist in the implementation but it does exist in the contract. +MembersMustExist : Member 'System.Collections.ObjectModel.Collection.RemoveItemsRange(System.Int32, System.Int32)' does not exist in the implementation but it does exist in the contract. +MembersMustExist : Member 'System.Collections.ObjectModel.Collection.RemoveRange(System.Int32, System.Int32)' does not exist in the implementation but it does exist in the contract. +MembersMustExist : Member 'System.Collections.ObjectModel.Collection.ReplaceItemsRange(System.Int32, System.Int32, System.Collections.Generic.IEnumerable)' does not exist in the implementation but it does exist in the contract. +MembersMustExist : Member 'System.Collections.ObjectModel.Collection.ReplaceRange(System.Int32, System.Int32, System.Collections.Generic.IEnumerable)' does not exist in the implementation but it does exist in the contract. CannotRemoveAttribute : Attribute 'System.ComponentModel.DefaultEventAttribute' exists on 'System.ComponentModel.BackgroundWorker' in the contract but not the implementation. -CannotRemoveAttribute : Attribute 'System.Diagnostics.SwitchLevelAttribute' exists on 'System.Diagnostics.BooleanSwitch' in the contract but not the implementation. CannotRemoveAttribute : Attribute 'System.ComponentModel.DefaultEventAttribute' exists on 'System.Diagnostics.Process' in the contract but not the implementation. CannotRemoveAttribute : Attribute 'System.ComponentModel.DefaultPropertyAttribute' exists on 'System.Diagnostics.Process' in the contract but not the implementation. -CannotRemoveAttribute : Attribute 'System.Diagnostics.SwitchLevelAttribute' exists on 'System.Diagnostics.TraceSwitch' in the contract but not the implementation. CannotRemoveAttribute : Attribute 'System.ComponentModel.DefaultEventAttribute' exists on 'System.IO.FileSystemWatcher' in the contract but not the implementation. MembersMustExist : Member 'System.Reflection.Emit.AssemblyBuilder.SetEntryPoint(System.Reflection.MethodInfo)' does not exist in the implementation but it does exist in the contract. MembersMustExist : Member 'System.Reflection.Emit.ConstructorBuilder.GetModule()' does not exist in the implementation but it does exist in the contract. @@ -19,9 +24,6 @@ TypesMustExist : Type 'System.Reflection.Emit.ExceptionHandler' does not exist i MembersMustExist : Member 'System.Reflection.Emit.FieldBuilder.GetToken()' does not exist in the implementation but it does exist in the contract. TypesMustExist : Type 'System.Reflection.Emit.FieldToken' does not exist in the implementation but it does exist in the contract. CannotRemoveBaseTypeOrInterface : Type 'System.Reflection.Emit.GenericTypeParameterBuilder' does not inherit from base type 'System.Reflection.TypeInfo' in the implementation but it does in the contract. -CannotRemoveAttribute : Attribute 'System.Runtime.CompilerServices.IsReadOnlyAttribute' exists on 'System.Reflection.Emit.Label' in the contract but not the implementation. -CannotRemoveBaseTypeOrInterface : Type 'System.Reflection.Emit.Label' does not implement interface 'System.IEquatable' in the implementation but it does in the contract. -TypeCannotChangeClassification : Type 'System.Reflection.Emit.Label' is marked as readonly in the contract so it must also be marked readonly in the implementation. MembersMustExist : Member 'System.Reflection.Emit.MethodBuilder.CreateMethodBody(System.Byte[], System.Int32)' does not exist in the implementation but it does exist in the contract. MembersMustExist : Member 'System.Reflection.Emit.MethodBuilder.GetModule()' does not exist in the implementation but it does exist in the contract. MembersMustExist : Member 'System.Reflection.Emit.MethodBuilder.GetToken()' does not exist in the implementation but it does exist in the contract. @@ -41,9 +43,6 @@ MembersMustExist : Member 'System.Reflection.Emit.ModuleBuilder.GetTypeToken(Sys MembersMustExist : Member 'System.Reflection.Emit.ModuleBuilder.GetTypeToken(System.Type)' does not exist in the implementation but it does exist in the contract. MembersMustExist : Member 'System.Reflection.Emit.ModuleBuilder.IsTransient()' does not exist in the implementation but it does exist in the contract. MembersMustExist : Member 'System.Reflection.Emit.ModuleBuilder.SetUserEntryPoint(System.Reflection.MethodInfo)' does not exist in the implementation but it does exist in the contract. -CannotRemoveAttribute : Attribute 'System.Runtime.CompilerServices.IsReadOnlyAttribute' exists on 'System.Reflection.Emit.OpCode' in the contract but not the implementation. -CannotRemoveBaseTypeOrInterface : Type 'System.Reflection.Emit.OpCode' does not implement interface 'System.IEquatable' in the implementation but it does in the contract. -TypeCannotChangeClassification : Type 'System.Reflection.Emit.OpCode' is marked as readonly in the contract so it must also be marked readonly in the implementation. MembersMustExist : Member 'System.Reflection.Emit.ParameterBuilder.GetToken()' does not exist in the implementation but it does exist in the contract. TypesMustExist : Type 'System.Reflection.Emit.ParameterToken' does not exist in the implementation but it does exist in the contract. MembersMustExist : Member 'System.Reflection.Emit.PropertyBuilder.PropertyToken.get()' does not exist in the implementation but it does exist in the contract. @@ -58,66 +57,4 @@ TypesMustExist : Type 'System.Reflection.Emit.TypeToken' does not exist in the i CannotChangeAttribute : Attribute 'System.AttributeUsageAttribute' on 'System.Runtime.InteropServices.ManagedToNativeComInteropStubAttribute' changed from '[AttributeUsageAttribute(AttributeTargets.Method, Inherited=false)]' in the contract to '[AttributeUsageAttribute(AttributeTargets.Method, Inherited=false, AllowMultiple=false)]' in the implementation. CannotChangeAttribute : Attribute 'System.AttributeUsageAttribute' on 'System.Xml.Serialization.XmlAnyAttributeAttribute' changed from '[AttributeUsageAttribute(AttributeTargets.Field | AttributeTargets.Parameter | AttributeTargets.Property | AttributeTargets.ReturnValue)]' in the contract to '[AttributeUsageAttribute(AttributeTargets.Field | AttributeTargets.Parameter | AttributeTargets.Property | AttributeTargets.ReturnValue, AllowMultiple=false)]' in the implementation. CannotChangeAttribute : Attribute 'System.AttributeUsageAttribute' on 'System.Xml.Serialization.XmlNamespaceDeclarationsAttribute' changed from '[AttributeUsageAttribute(AttributeTargets.Field | AttributeTargets.Parameter | AttributeTargets.Property | AttributeTargets.ReturnValue)]' in the contract to '[AttributeUsageAttribute(AttributeTargets.Field | AttributeTargets.Parameter | AttributeTargets.Property | AttributeTargets.ReturnValue, AllowMultiple=false)]' in the implementation. -MembersMustExist : Member 'System.Range.GetOffsetAndLength(System.Int32)' does not exist in the implementation but it does exist in the contract. -TypesMustExist : Type 'System.Range.OffsetAndLength' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.Memory.Item.get(System.Range)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.Memory.Slice(System.Index)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.Memory.Slice(System.Range)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.ReadOnlyMemory.Item.get(System.Range)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.ReadOnlyMemory.Slice(System.Index)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.ReadOnlyMemory.Slice(System.Range)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.ReadOnlySpan.Item.get(System.Index)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.ReadOnlySpan.Item.get(System.Range)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.ReadOnlySpan.Slice(System.Index)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.ReadOnlySpan.Slice(System.Range)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.Span.Item.get(System.Index)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.Span.Item.get(System.Range)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.Span.Slice(System.Index)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.Span.Slice(System.Range)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.String.Chars.get(System.Index)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.String.Chars.get(System.Range)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.String.Substring(System.Index)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.String.Substring(System.Range)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.Utf8String.Slice(System.Int32, System.Int32)' does not exist in the implementation but it does exist in the contract. -CannotSealType : Type 'System.ComponentModel.BaseNumberConverter' is effectively (has a private constructor) sealed in the implementation but not sealed in the contract. -MembersMustExist : Member 'System.ComponentModel.BaseNumberConverter..ctor()' does not exist in the implementation but it does exist in the contract. -CannotMakeMemberNonVirtual : Member 'System.ComponentModel.BaseNumberConverter.CanConvertFrom(System.ComponentModel.ITypeDescriptorContext, System.Type)' is non-virtual in the implementation but is virtual in the contract. -CannotMakeMemberNonVirtual : Member 'System.ComponentModel.BaseNumberConverter.CanConvertTo(System.ComponentModel.ITypeDescriptorContext, System.Type)' is non-virtual in the implementation but is virtual in the contract. -CannotMakeMemberNonVirtual : Member 'System.ComponentModel.BaseNumberConverter.ConvertFrom(System.ComponentModel.ITypeDescriptorContext, System.Globalization.CultureInfo, System.Object)' is non-virtual in the implementation but is virtual in the contract. -CannotMakeMemberNonVirtual : Member 'System.ComponentModel.BaseNumberConverter.ConvertTo(System.ComponentModel.ITypeDescriptorContext, System.Globalization.CultureInfo, System.Object, System.Type)' is non-virtual in the implementation but is virtual in the contract. -MembersMustExist : Member 'System.Threading.Tasks.TaskExtensions.ConfigureAwait(System.IAsyncDisposable, System.Boolean)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.Threading.Tasks.TaskExtensions.ConfigureAwait(System.Collections.Generic.IAsyncEnumerable, System.Boolean)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.Threading.Tasks.TaskExtensions.WithCancellation(System.Collections.Generic.IAsyncEnumerable, System.Threading.CancellationToken)' does not exist in the implementation but it does exist in the contract. -CannotSealType : Type 'System.Xml.Schema.XmlSchemaDatatype' is effectively (has a private constructor) sealed in the implementation but not sealed in the contract. -MembersMustExist : Member 'System.Xml.Schema.XmlSchemaDatatype..ctor()' does not exist in the implementation but it does exist in the contract. -CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.TokenizedType' is non-virtual in the implementation but is virtual in the contract. -CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.TypeCode' is non-virtual in the implementation but is virtual in the contract. -CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.ValueType' is non-virtual in the implementation but is virtual in the contract. -CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.Variety' is non-virtual in the implementation but is virtual in the contract. -CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.ChangeType(System.Object, System.Type)' is non-virtual in the implementation but is virtual in the contract. -CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.ChangeType(System.Object, System.Type, System.Xml.IXmlNamespaceResolver)' is non-virtual in the implementation but is virtual in the contract. -CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.IsDerivedFrom(System.Xml.Schema.XmlSchemaDatatype)' is non-virtual in the implementation but is virtual in the contract. -CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.ParseValue(System.String, System.Xml.XmlNameTable, System.Xml.IXmlNamespaceResolver)' is non-virtual in the implementation but is virtual in the contract. -CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.TokenizedType.get()' is non-virtual in the implementation but is virtual in the contract. -CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.TypeCode.get()' is non-virtual in the implementation but is virtual in the contract. -CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.ValueType.get()' is non-virtual in the implementation but is virtual in the contract. -CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.Variety.get()' is non-virtual in the implementation but is virtual in the contract. -CannotSealType : Type 'System.Xml.Schema.XmlSchemaGroupBase' is effectively (has a private constructor) sealed in the implementation but not sealed in the contract. -MembersMustExist : Member 'System.Xml.Schema.XmlSchemaGroupBase..ctor()' does not exist in the implementation but it does exist in the contract. -CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaGroupBase.Items' is non-virtual in the implementation but is virtual in the contract. -CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaGroupBase.Items.get()' is non-virtual in the implementation but is virtual in the contract. -CannotSealType : Type 'System.Data.Constraint' is effectively (has a private constructor) sealed in the implementation but not sealed in the contract. -MembersMustExist : Member 'System.Data.Constraint..ctor()' does not exist in the implementation but it does exist in the contract. -CannotMakeMemberNonVirtual : Member 'System.Data.Constraint.ConstraintName' is non-virtual in the implementation but is virtual in the contract. -CannotMakeMemberNonVirtual : Member 'System.Data.Constraint.Table' is non-virtual in the implementation but is virtual in the contract. -CannotMakeMemberNonVirtual : Member 'System.Data.Constraint._DataSet' is non-virtual in the implementation but is virtual in the contract. -CannotMakeMemberNonVirtual : Member 'System.Data.Constraint.ConstraintName.get()' is non-virtual in the implementation but is virtual in the contract. -CannotMakeMemberNonVirtual : Member 'System.Data.Constraint.ConstraintName.set(System.String)' is non-virtual in the implementation but is virtual in the contract. -CannotMakeMemberNonVirtual : Member 'System.Data.Constraint.Table.get()' is non-virtual in the implementation but is virtual in the contract. -CannotMakeMemberNonVirtual : Member 'System.Data.Constraint.ToString()' is non-virtual in the implementation but is virtual in the contract. -CannotMakeMemberNonVirtual : Member 'System.Data.Constraint._DataSet.get()' is non-virtual in the implementation but is virtual in the contract. -CannotSealType : Type 'System.Linq.EnumerableExecutor' is effectively (has a private constructor) sealed in the implementation but not sealed in the contract. -MembersMustExist : Member 'System.Linq.EnumerableExecutor..ctor()' does not exist in the implementation but it does exist in the contract. -CannotSealType : Type 'System.Linq.EnumerableQuery' is effectively (has a private constructor) sealed in the implementation but not sealed in the contract. -MembersMustExist : Member 'System.Linq.EnumerableQuery..ctor()' does not exist in the implementation but it does exist in the contract. -Total Issues: 121 +Total Issues: 58 \ No newline at end of file From de9f3685b2012fba5a5301dab991e281d50392cb Mon Sep 17 00:00:00 2001 From: Tomas Weinfurt Date: Fri, 31 May 2019 14:39:12 -0700 Subject: [PATCH 607/607] add support for 100-continue for H/2 (#36884) * expect100 * updates * remove dead code * fix tests * use configured value for allowExpect100ToContinue timer * feedback from review * dispose expect100Timer * feedback from review * feedback from review * feedback from review * small updates to sync up with master changes * add concurent send/recive and more tests * fix netfx * feedback from review * feedback from review * feedback from review * feedback from review * feedback from review * kick ci --- .../System/Net/Http/Http2LoopbackServer.cs | 79 ++++--- .../src/Resources/Strings.resx | 6 + .../SocketsHttpHandler/Http2Connection.cs | 72 ++++++- .../Http2ProtocolException.cs | 6 + .../Http/SocketsHttpHandler/Http2Stream.cs | 192 ++++++++++++++---- .../tests/FunctionalTests/CustomContent.cs | 6 +- .../FunctionalTests/CustomContent.netcore.cs | 54 +++++ .../HttpClientHandlerTest.Http2.cs | 146 +++++++++++++ .../FunctionalTests/HttpClientHandlerTest.cs | 8 +- .../System.Net.Http.Functional.Tests.csproj | 1 + 10 files changed, 491 insertions(+), 79 deletions(-) create mode 100644 src/System.Net.Http/tests/FunctionalTests/CustomContent.netcore.cs diff --git a/src/Common/tests/System/Net/Http/Http2LoopbackServer.cs b/src/Common/tests/System/Net/Http/Http2LoopbackServer.cs index c0363042ccea..869c55e2cb11 100644 --- a/src/Common/tests/System/Net/Http/Http2LoopbackServer.cs +++ b/src/Common/tests/System/Net/Http/Http2LoopbackServer.cs @@ -517,7 +517,45 @@ private static int EncodeHeader(HttpHeaderData headerData, Span headerBloc return bytesGenerated; } - public async Task<(int streamId, HttpRequestData requestData)> ReadAndParseRequestHeaderAsync() + public async Task ReadBodyAsync() + { + byte[] body = null; + Frame frame; + + do + { + frame = await ReadFrameAsync(Timeout).ConfigureAwait(false); + if (frame == null || frame.Type == FrameType.RstStream) + { + throw new IOException( frame == null ? "End of stream" : "Got RST"); + } + + Assert.Equal(FrameType.Data, frame.Type); + + if (frame.Length > 1) + { + DataFrame dataFrame = (DataFrame)frame; + + if (body == null) + { + body = dataFrame.Data.ToArray(); + } + else + { + byte[] newBuffer = new byte[body.Length + dataFrame.Data.Length]; + + body.CopyTo(newBuffer, 0); + dataFrame.Data.Span.CopyTo(newBuffer.AsSpan().Slice(body.Length)); + body= newBuffer; + } + } + } + while ((frame.Flags & FrameFlags.EndStream) == 0); + + return body; + } + + public async Task<(int streamId, HttpRequestData requestData)> ReadAndParseRequestHeaderAsync(bool readBody = true) { HttpRequestData requestData = new HttpRequestData(); @@ -549,32 +587,10 @@ private static int EncodeHeader(HttpHeaderData headerData, Span headerBloc requestData.Method = requestData.GetSingleHeaderValue(":method"); requestData.Path = requestData.GetSingleHeaderValue(":path"); - byte[] body = null; - while ((frame.Flags & FrameFlags.EndStream) == 0) - { - frame = await ReadFrameAsync(Timeout).ConfigureAwait(false); - Assert.Equal(FrameType.Data, frame.Type); - if (frame.Length > 1) - { - DataFrame dataFrame = (DataFrame)frame; - - if (body == null) - { - body = dataFrame.Data.ToArray(); - } - else - { - byte[] newBuffer = new byte[body.Length + dataFrame.Data.Length]; - - body.CopyTo(newBuffer, 0); - dataFrame.Data.Span.CopyTo(newBuffer.AsSpan().Slice(body.Length)); - body= newBuffer; - } - } - } - if (body != null) + if (readBody && (frame.Flags & FrameFlags.EndStream) == 0) { - requestData.Body = body; + // Read body until end of stream if needed. + requestData.Body = await ReadBodyAsync(); } return (streamId, requestData); @@ -688,6 +704,17 @@ public override async Task HandleRequestAsync(HttpStatusCode st return requestData; } + + public async static Task CreateClientAndServerAsync(Func clientFunc, Func serverFunc, int timeout = 60_000) + { + using (var server = Http2LoopbackServer.CreateServer()) + { + Task clientTask = clientFunc(server.Address); + Task serverTask = serverFunc(server); + + await new Task[] { clientTask, serverTask }.WhenAllOrAnyFailed(timeout); + } + } } public class Http2Options diff --git a/src/System.Net.Http/src/Resources/Strings.resx b/src/System.Net.Http/src/Resources/Strings.resx index 93cdd56ed5d6..683647ec0bb0 100644 --- a/src/System.Net.Http/src/Resources/Strings.resx +++ b/src/System.Net.Http/src/Resources/Strings.resx @@ -446,6 +446,12 @@ The HTTP/2 request failed with protocol error '{0}' (0x{1}). + + The HTTP/2 request failed with protocol error '{0}' ({1}). + + + The HTTP/2 request encountered a protocol error, receiving '{0}' while in the state '{1}'. + This method is not implemented by this class. diff --git a/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http2Connection.cs b/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http2Connection.cs index 8b7b95bba16e..769a0bf05be3 100644 --- a/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http2Connection.cs +++ b/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http2Connection.cs @@ -964,7 +964,7 @@ private void WriteHeaders(HttpRequestMessage request) } } - private async ValueTask SendHeadersAsync(HttpRequestMessage request, CancellationToken cancellationToken) + private async ValueTask SendHeadersAsync(HttpRequestMessage request, CancellationToken cancellationToken, bool mustFlush = false) { // Ensure we don't exceed the max concurrent streams setting. await _concurrentStreams.RequestCreditAsync(1, cancellationToken).ConfigureAwait(false); @@ -1018,7 +1018,7 @@ private async ValueTask SendHeadersAsync(HttpRequestMessage request // If this is not the end of the stream, we can put off flushing the buffer // since we know that there are going to be data frames following. - FinishWrite(mustFlush: (flags & FrameFlags.EndStream) != 0); + FinishWrite(mustFlush: mustFlush || (flags & FrameFlags.EndStream) != 0); } catch { @@ -1027,6 +1027,7 @@ private async ValueTask SendHeadersAsync(HttpRequestMessage request RemoveStream(http2Stream); http2Stream.Dispose(); } + throw; } finally @@ -1174,12 +1175,12 @@ public bool IsExpired(long nowTicks, private void AbortStreams(int lastValidStream, Exception abortException) { + bool shouldInvalidate = false; lock (SyncObject) { if (!_disposed) { - _pool.InvalidateHttp2Connection(this); - + shouldInvalidate = true; _disposed = true; } @@ -1198,6 +1199,14 @@ private void AbortStreams(int lastValidStream, Exception abortException) CheckForShutdown(); } + + if (shouldInvalidate) + { + // Invalidate outside of lock to avoid race with HttpPool Dispose() + // We should not try to grab pool lock while holding connection lock as on disposing pool, + // we could hold pool lock while trying to grab connection lock in Dispose(). + _pool.InvalidateHttp2Connection(this); + } } private void CheckForShutdown() @@ -1354,13 +1363,52 @@ public sealed override async Task SendAsync(HttpRequestMess try { // Send headers - http2Stream = await SendHeadersAsync(request, cancellationToken).ConfigureAwait(false); + bool shouldExpectContinue = request.Content != null && request.HasHeaders && request.Headers.ExpectContinue == true; + + http2Stream = await SendHeadersAsync(request, cancellationToken, mustFlush: shouldExpectContinue).ConfigureAwait(false); + if (shouldExpectContinue) + { + // Send header and wait a little bit to see if server sends 100, reject code or nothing. + if (NetEventSource.IsEnabled) Trace($"Request content is not null, start processing 100-Continue."); + await http2Stream.SendRequestBodyWithExpect100ContinueAsync(cancellationToken).ConfigureAwait(false); + } + else + { + // Send request body, if any + Task bodyTask = http2Stream.SendRequestBodyAsync(cancellationToken); + // read response headers. + Task responseHeadersTask = http2Stream.ReadResponseHeadersAsync(); - // Send request body, if any - await http2Stream.SendRequestBodyAsync(cancellationToken).ConfigureAwait(false); + if (bodyTask == await Task.WhenAny(bodyTask, responseHeadersTask).ConfigureAwait(false) || + bodyTask.IsCompleted) + { + // The sending of the request body completed before receiving all of the request headers. + Task t = bodyTask; + bodyTask = null; + try + { + await t.ConfigureAwait(false); + } + catch (Exception e) + { + if (NetEventSource.IsEnabled) Trace($"SendRequestBody Task failed. {e}"); + throw; + } - // Wait for response headers to be read. - await http2Stream.ReadResponseHeadersAsync().ConfigureAwait(false); + await responseHeadersTask.ConfigureAwait(false); + } + else + { + // We received the response headers but the request body hasn't yet finished. + // If the connection is aborted or if we get RST or GOAWAY from server, exception will be + // stored in stream._abortException and propagated to up to caller if possible while processing response. + _ = bodyTask.ContinueWith((t, state) => { + Http2Connection c = (Http2Connection)state; + if (NetEventSource.IsEnabled) c.Trace($"SendRequestBody Task failed. {t.Exception}"); + }, this, CancellationToken.None, TaskContinuationOptions.OnlyOnFaulted, TaskScheduler.Default); + bodyTask = null; + } + } } catch (Exception e) { @@ -1386,7 +1434,11 @@ e is ObjectDisposedException || } } - http2Stream?.Dispose(); + if (http2Stream != null) + { + RemoveStream(http2Stream); + http2Stream.Dispose(); + } if (replacementException != null) { diff --git a/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http2ProtocolException.cs b/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http2ProtocolException.cs index f2b135ca8b7e..7e51f6961e09 100644 --- a/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http2ProtocolException.cs +++ b/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http2ProtocolException.cs @@ -16,6 +16,12 @@ public Http2ProtocolException(Http2ProtocolErrorCode protocolError) ProtocolError = protocolError; } + public Http2ProtocolException(string message) + : base(SR.Format(SR.net_http_http2_protocol_error_text, GetName(Http2ProtocolErrorCode.ProtocolError), message)) + { + ProtocolError = Http2ProtocolErrorCode.ProtocolError; + } + private Http2ProtocolException(SerializationInfo info, StreamingContext context) : base(info, context) { ProtocolError = (Http2ProtocolErrorCode)info.GetInt32(nameof(ProtocolError)); diff --git a/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http2Stream.cs b/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http2Stream.cs index 5eb0a1f63852..df5d23293459 100644 --- a/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http2Stream.cs +++ b/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http2Stream.cs @@ -5,6 +5,7 @@ using System.Diagnostics; using System.IO; using System.Net.Http.Headers; +using System.Runtime.ExceptionServices; using System.Text; using System.Threading; using System.Threading.Tasks; @@ -18,6 +19,8 @@ private sealed class Http2Stream : IValueTaskSource, IDisposable { private enum StreamState : byte { + ExpectingStatus, + ExpectingIgnoredHeaders, ExpectingHeaders, ExpectingData, ExpectingTrailingHeaders, @@ -53,6 +56,9 @@ private enum StreamState : byte /// private bool _hasWaiter; + private TaskCompletionSource _shouldSendRequestBodyWaiter; + private bool _shouldSendRequestBody; + private const int StreamWindowSize = DefaultInitialWindowSize; // See comment on ConnectionWindowThreshold. @@ -63,9 +69,10 @@ public Http2Stream(HttpRequestMessage request, Http2Connection connection, int s _connection = connection; _streamId = streamId; - _state = StreamState.ExpectingHeaders; + _state = StreamState.ExpectingStatus; _request = request; + _shouldSendRequestBody = true; _disposed = false; @@ -84,22 +91,68 @@ public Http2Stream(HttpRequestMessage request, Http2Connection connection, int s public async Task SendRequestBodyAsync(CancellationToken cancellationToken) { - // TODO: ISSUE 31312: Expect: 100-continue and early response handling - // Note that in an "early response" scenario, where we get a response before we've finished sending the request body - // (either with a 100-continue that timed out, or without 100-continue), - // we can stop send a RST_STREAM on the request stream and stop sending the request without tearing down the entire connection. - // Send request body, if any if (_request.Content != null) { - using (Http2WriteStream writeStream = new Http2WriteStream(this)) + try + { + using (Http2WriteStream writeStream = new Http2WriteStream(this)) + { + await _request.Content.CopyToAsync(writeStream, null, cancellationToken).ConfigureAwait(false); + } + + // Don't wait for completion, which could happen asynchronously. + _ = _connection.SendEndStreamAsync(_streamId); + } + catch (Exception e) { - await _request.Content.CopyToAsync(writeStream, null, cancellationToken).ConfigureAwait(false); + // We did not finish sending body so notify server. + _ = _connection.SendRstStreamAsync(_streamId, Http2ProtocolErrorCode.Cancel); + + // if we decided abandon sending request and we get ObjectDisposed as result of it, just eat exception. + if (_shouldSendRequestBody || (!(e is ObjectDisposedException) && !(e.InnerException is ObjectDisposedException))) + { + throw; + } } + } + } + + // Process request body if we sent 100Continue. We can either get 100 response from server and send body + // or we may exceed timeout and send request body anyway. + // If we get response > 300, we will try to stop sending and we will send RST_STREAM. + public async Task SendRequestBodyWithExpect100ContinueAsync(CancellationToken cancellationToken) + { + // Start timer and try to read response headers. + TaskCompletionSource allowExpect100ToContinue = new TaskCompletionSource(); + bool sendRequestContent; - // Don't wait for completion, which could happen asynchronously. - Task ignored = _connection.SendEndStreamAsync(_streamId); + _shouldSendRequestBodyWaiter = allowExpect100ToContinue; + Task response = ReadResponseHeadersAsync(); + + using (var expect100Timer = new Timer( + s => ((TaskCompletionSource)s).TrySetResult(true), + allowExpect100ToContinue, _connection._pool.Settings._expect100ContinueTimeout, Timeout.InfiniteTimeSpan)) + { + // By now, either we got response from server or timer expired. + sendRequestContent = await allowExpect100ToContinue.Task.ConfigureAwait(false); + } + + // We either received response from server or we timed out waiting. + if (sendRequestContent) + { + await SendRequestBodyAsync(cancellationToken).ConfigureAwait(false); + } + else + { + // We received negative response from server so we will not send body and we will reset stream. + _shouldSendRequestBody = false; + _shouldSendRequestBodyWaiter = null; + _ = _connection.SendRstStreamAsync(_streamId, Http2ProtocolErrorCode.Cancel); } + + // Finish reading response. + await response.ConfigureAwait(false); } public void OnWindowUpdate(int amount) @@ -120,26 +173,21 @@ public void OnResponseHeader(ReadOnlySpan name, ReadOnlySpan value) lock (SyncObject) { - if (_state != StreamState.ExpectingHeaders && _state != StreamState.ExpectingTrailingHeaders) - { - throw new Http2ProtocolException(Http2ProtocolErrorCode.ProtocolError); - } - if (name[0] == (byte)':') { - if (_state == StreamState.ExpectingTrailingHeaders) + if (_state != StreamState.ExpectingHeaders && _state != StreamState.ExpectingStatus) { - // Pseudo-headers not allowed in trailers. - if (NetEventSource.IsEnabled) _connection.Trace("Pseudo-header in trailer headers."); - throw new HttpRequestException(SR.net_http_invalid_response_pseudo_header_in_trailer); + // Pseudo-headers are allowed only in header block + if (NetEventSource.IsEnabled) _connection.Trace($"Pseudo-header in {_state} state."); + throw new Http2ProtocolException(SR.net_http_invalid_response_pseudo_header_in_trailer); } if (name.SequenceEqual(s_statusHeaderName)) { - if (_response != null) + if (_state != StreamState.ExpectingStatus) { if (NetEventSource.IsEnabled) _connection.Trace("Received duplicate status headers."); - throw new Http2ProtocolException(Http2ProtocolErrorCode.ProtocolError); + throw new Http2ProtocolException(SR.Format(SR.net_http_invalid_response_status_code, "duplicate status")); } byte status1, status2, status3; @@ -148,7 +196,7 @@ public void OnResponseHeader(ReadOnlySpan name, ReadOnlySpan value) !IsDigit(status2 = value[1]) || !IsDigit(status3 = value[2])) { - throw new HttpRequestException(SR.Format(SR.net_http_invalid_response_status_code, Encoding.ASCII.GetString(value))); + throw new Http2ProtocolException(SR.Format(SR.net_http_invalid_response_status_code, Encoding.ASCII.GetString(value))); } int statusValue = (100 * (status1 - '0') + 10 * (status2 - '0') + (status3 - '0')); @@ -159,25 +207,51 @@ public void OnResponseHeader(ReadOnlySpan name, ReadOnlySpan value) Content = new HttpConnectionResponseContent(), StatusCode = (HttpStatusCode)statusValue }; + + TaskCompletionSource shouldSendRequestBodyWaiter = _shouldSendRequestBodyWaiter; + if (statusValue < 200) + { + if (_response.StatusCode == HttpStatusCode.Continue && shouldSendRequestBodyWaiter != null) + { + if (NetEventSource.IsEnabled) _connection.Trace("Received 100Continue status."); + shouldSendRequestBodyWaiter.TrySetResult(true); + _shouldSendRequestBodyWaiter = null; + } + // We do not process headers from 1xx responses. + _state = StreamState.ExpectingIgnoredHeaders; + } + else + { + _state = StreamState.ExpectingHeaders; + // If we tried 100-Continue and got rejected signal that we should not send request body. + _shouldSendRequestBody = (int)Response.StatusCode < 300; + shouldSendRequestBodyWaiter?.TrySetResult(_shouldSendRequestBody); + } } else { if (NetEventSource.IsEnabled) _connection.Trace("Invalid response pseudo-header '{System.Text.Encoding.ASCII.GetString(name)}'."); - throw new HttpRequestException(SR.net_http_invalid_response); + throw new Http2ProtocolException(SR.net_http_invalid_response); } } else { - if (_response == null) + if (_state == StreamState.ExpectingIgnoredHeaders) { - if (NetEventSource.IsEnabled) _connection.Trace($"Received header before status pseudo-header."); - throw new HttpRequestException(SR.net_http_invalid_response); + // for 1xx response we ignore all headers. + return; + } + + if (_state != StreamState.ExpectingHeaders && _state != StreamState.ExpectingTrailingHeaders) + { + if (NetEventSource.IsEnabled) _connection.Trace($"Received header before status."); + throw new Http2ProtocolException(SR.net_http_invalid_response); } if (!HeaderDescriptor.TryGet(name, out HeaderDescriptor descriptor)) { // Invalid header name - throw new HttpRequestException(SR.Format(SR.net_http_invalid_response_header_name, Encoding.ASCII.GetString(name))); + throw new Http2ProtocolException(SR.Format(SR.net_http_invalid_response_header_name, Encoding.ASCII.GetString(name))); } string headerValue = descriptor.GetHeaderValue(value); @@ -204,9 +278,9 @@ public void OnResponseHeadersStart() { lock (SyncObject) { - if (_state != StreamState.ExpectingHeaders && _state != StreamState.ExpectingData) + if (_state != StreamState.ExpectingStatus && _state != StreamState.ExpectingData) { - throw new Http2ProtocolException(Http2ProtocolErrorCode.ProtocolError); + throw new Http2ProtocolException(SR.Format(SR.net_http_http2_protocol_state, "headers", _state)); } if (_state == StreamState.ExpectingData) @@ -221,15 +295,37 @@ public void OnResponseHeadersComplete(bool endStream) bool signalWaiter; lock (SyncObject) { - if (_state != StreamState.ExpectingHeaders && _state != StreamState.ExpectingTrailingHeaders) + if (_state != StreamState.ExpectingHeaders && _state != StreamState.ExpectingTrailingHeaders && _state != StreamState.ExpectingIgnoredHeaders) { - throw new Http2ProtocolException(Http2ProtocolErrorCode.ProtocolError); + throw new Http2ProtocolException(SR.Format(SR.net_http_http2_protocol_state, "headers", _state)); } - if (_state == StreamState.ExpectingTrailingHeaders || endStream) + if (_state == StreamState.ExpectingHeaders) + { + _state = endStream ? StreamState.Complete : StreamState.ExpectingData; + } + else if (_state == StreamState.ExpectingTrailingHeaders) { + if (!endStream) + { + if (NetEventSource.IsEnabled) _connection.Trace("TrailingHeaders received without endStream"); + throw new Http2ProtocolException(SR.net_http_invalid_response); + } + _state = StreamState.Complete; } + else if (_state == StreamState.ExpectingIgnoredHeaders) + { + if (endStream) + { + // we should not get endStream while processing 1xx response. + throw new Http2ProtocolException(SR.net_http_invalid_response); + } + + _state = StreamState.ExpectingStatus; + // We should wait for final response before signaling to waiter. + return; + } else { _state = StreamState.ExpectingData; @@ -257,7 +353,7 @@ public void OnResponseData(ReadOnlySpan buffer, bool endStream) if (_state != StreamState.ExpectingData) { - throw new Http2ProtocolException(Http2ProtocolErrorCode.ProtocolError); + throw new Http2ProtocolException(SR.Format(SR.net_http_http2_protocol_state, "data", _state)); } if (_responseBuffer.ActiveSpan.Length + buffer.Length > StreamWindowSize) @@ -313,6 +409,7 @@ public void OnResponseAbort(Exception abortException) } } + // Determine if we have enough data to process up to complete final response headers. private (bool wait, bool isEmptyResponse) TryEnsureHeaders() { lock (SyncObject) @@ -326,7 +423,7 @@ public void OnResponseAbort(Exception abortException) { throw new IOException(SR.net_http_request_aborted, _abortException); } - else if (_state == StreamState.ExpectingHeaders) + else if (_state == StreamState.ExpectingHeaders || _state == StreamState.ExpectingIgnoredHeaders || _state == StreamState.ExpectingStatus) { Debug.Assert(!_hasWaiter); _hasWaiter = true; @@ -348,7 +445,11 @@ public void OnResponseAbort(Exception abortException) public async Task ReadResponseHeadersAsync() { // Wait for response headers to be read. - (bool wait, bool emptyResponse) = TryEnsureHeaders(); + bool emptyResponse; + bool wait; + + // Process all informational responses if any and wait for final status. + (wait, emptyResponse) = TryEnsureHeaders(); if (wait) { await GetWaiterTask().ConfigureAwait(false); @@ -571,6 +672,11 @@ protected override void Dispose(bool disposing) public override int Read(Span destination) { Http2Stream http2Stream = _http2Stream ?? throw new ObjectDisposedException(nameof(Http2ReadStream)); + if (http2Stream._abortException != null) + { + ExceptionDispatchInfo.Throw(new IOException(SR.net_http_client_execution_error, http2Stream._abortException)); + } + return http2Stream.ReadData(destination); } @@ -582,6 +688,11 @@ public override ValueTask ReadAsync(Memory destination, CancellationT return new ValueTask(Task.FromException(new ObjectDisposedException(nameof(Http2ReadStream)))); } + if (http2Stream._abortException != null) + { + return new ValueTask(Task.FromException(new IOException(SR.net_http_client_execution_error, http2Stream._abortException))); + } + return http2Stream.ReadDataAsync(destination, cancellationToken); } @@ -621,10 +732,13 @@ protected override void Dispose(bool disposing) public override ValueTask WriteAsync(ReadOnlyMemory buffer, CancellationToken cancellationToken) { Http2Stream http2Stream = _http2Stream; - Task t = http2Stream != null ? - http2Stream.SendDataAsync(buffer, cancellationToken) : - Task.FromException(new ObjectDisposedException(nameof(Http2WriteStream))); - return new ValueTask(t); + + if (http2Stream == null || !http2Stream._shouldSendRequestBody) + { + return new ValueTask(Task.FromException(new ObjectDisposedException(nameof(Http2WriteStream)))); + } + + return new ValueTask(http2Stream.SendDataAsync(buffer, cancellationToken)); } } } diff --git a/src/System.Net.Http/tests/FunctionalTests/CustomContent.cs b/src/System.Net.Http/tests/FunctionalTests/CustomContent.cs index 115c9a3cd0a1..a3a7b02a8c5b 100644 --- a/src/System.Net.Http/tests/FunctionalTests/CustomContent.cs +++ b/src/System.Net.Http/tests/FunctionalTests/CustomContent.cs @@ -5,10 +5,12 @@ using System; using System.IO; using System.Text; +using System.Threading; +using System.Threading.Tasks; namespace System.Net.Http.Functional.Tests { - public sealed class CustomContent : StreamContent + internal partial class CustomContent : StreamContent { private long _length; @@ -33,7 +35,7 @@ public long Length } } - private class CustomStream : Stream + internal class CustomStream : Stream { private byte[] _buffer; private long _position; diff --git a/src/System.Net.Http/tests/FunctionalTests/CustomContent.netcore.cs b/src/System.Net.Http/tests/FunctionalTests/CustomContent.netcore.cs new file mode 100644 index 000000000000..9615fcaf5e6a --- /dev/null +++ b/src/System.Net.Http/tests/FunctionalTests/CustomContent.netcore.cs @@ -0,0 +1,54 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; +using System.IO; +using System.Text; +using System.Threading; +using System.Threading.Tasks; + +namespace System.Net.Http.Functional.Tests +{ + internal partial class CustomContent : StreamContent + { + internal class SlowTestStream : CustomStream + { + private int _delay = 1000; + private int _count; + private int _trigger; + private byte[] _content; + private readonly TaskCompletionSource _sendingDone; + private int _iteration; + + internal SlowTestStream(byte[] content, TaskCompletionSource tsc, int count=10, int trigger=1) : base(content, false) + { + _sendingDone = tsc; + _trigger = trigger; + _count = count; + _content = content; + } + + public async override ValueTask ReadAsync(Memory destination, CancellationToken cancellationToken) + { + if (_delay > 0) + { + await Task.Delay(_delay); + } + + _iteration++; + if (_iteration == _trigger) + { + _sendingDone.TrySetResult(true); + } + + if (_count == _iteration) + { + return 0; + } + + return _content.Length; + } + } + } +} diff --git a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Http2.cs b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Http2.cs index c4b903ce5f94..e951d657a538 100644 --- a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Http2.cs +++ b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Http2.cs @@ -4,6 +4,7 @@ using System.Collections.Generic; using System.Diagnostics; +using System.IO; using System.Net.Security; using System.Linq; using System.Net.Test.Common; @@ -1309,6 +1310,151 @@ public async Task Http2_PendingSend_Cancellation() } } + [Theory] + [InlineData(true)] + [InlineData(false)] + public async Task PostAsyncExpect100Continue_SendRequest_Ok(bool send100Continue) + { + await Http2LoopbackServer.CreateClientAndServerAsync(async url => + { + using (HttpClient client = CreateHttpClient()) + { + var request = new HttpRequestMessage(HttpMethod.Post, url); + request.Version = new Version(2,0); + request.Content = new StringContent(new string('*', 3000)); + request.Headers.ExpectContinue = true; + request.Headers.Add("x-test", $"PostAsyncExpect100Continue_SendRequest_Ok({send100Continue}"); + + HttpResponseMessage response = await client.SendAsync(request); + Assert.Equal(HttpStatusCode.OK, response.StatusCode); + } + }, + async server => + { + await server.EstablishConnectionAsync(); + + (int streamId, HttpRequestData requestData) = await server.ReadAndParseRequestHeaderAsync(readBody : false); + Assert.Equal("100-continue", requestData.GetSingleHeaderValue("Expect")); + + if (send100Continue) + { + await server.SendResponseHeadersAsync(streamId, endStream: false, HttpStatusCode.Continue); + } + await server.ReadBodyAsync(); + await server.SendResponseHeadersAsync(streamId, endStream: false, HttpStatusCode.OK); + await server.SendResponseBodyAsync(streamId, Encoding.ASCII.GetBytes("OK")); + await server.SendGoAway(streamId); + await server.WaitForConnectionShutdownAsync(); + }); + } + + [Fact] + public async Task PostAsyncExpect100Continue_LateForbiddenResponse_Ok() + { + TaskCompletionSource tsc = new TaskCompletionSource(); + string content = new string('*', 300); + + var stream = new CustomContent.SlowTestStream(Encoding.UTF8.GetBytes(content), tsc, trigger:3, count: 30); + + await Http2LoopbackServer.CreateClientAndServerAsync(async url => + { + using (HttpClient client = CreateHttpClient()) + { + var request = new HttpRequestMessage(HttpMethod.Post, url); + request.Version = new Version(2,0); + request.Content = new StreamContent(stream); + request.Headers.ExpectContinue = true; + request.Headers.Add("x-test", "PostAsyncExpect100Continue_LateForbiddenResponse_Ok"); + + HttpResponseMessage response = await client.SendAsync(request); + Assert.Equal(HttpStatusCode.Forbidden, response.StatusCode); + } + }, + async server => + { + await server.EstablishConnectionAsync(); + + (int streamId, HttpRequestData requestData) = await server.ReadAndParseRequestHeaderAsync(readBody : false); + Assert.Equal("100-continue", requestData.GetSingleHeaderValue("Expect")); + + // Wait for client so start sending body. + await tsc.Task.ConfigureAwait(false); + // And reject content with 403. + await server.SendResponseHeadersAsync(streamId, endStream: false, HttpStatusCode.Forbidden); + await server.SendResponseBodyAsync(streamId, Encoding.ASCII.GetBytes("no no!")); + try + { + // Client should send reset. + await server.ReadBodyAsync(); + Assert.True(false, "Should not be here"); + } + catch (IOException) { }; + await server.SendGoAway(streamId); + await server.WaitForConnectionShutdownAsync(); + }); + } + + [Theory] + [InlineData(true, HttpStatusCode.Forbidden)] + [InlineData(false, HttpStatusCode.Forbidden)] + [InlineData(true, HttpStatusCode.OK)] + [InlineData(false, HttpStatusCode.OK)] + public async Task sendAsync_ConcurentSendReceive_Ok(bool shouldWait, HttpStatusCode responseCode) + { + TaskCompletionSource tsc = new TaskCompletionSource(); + string requestContent = new string('*', 300); + const string responseContent = "sendAsync_ConcurentSendReceive_Ok"; + var stream = new CustomContent.SlowTestStream(Encoding.UTF8.GetBytes(requestContent), tsc, trigger:1, count: 10); + + await Http2LoopbackServer.CreateClientAndServerAsync(async url => + { + using (HttpClient client = CreateHttpClient()) + { + var request = new HttpRequestMessage(HttpMethod.Post, url); + request.Version = new Version(2,0); + request.Content = new StreamContent(stream); + + HttpResponseMessage response = await client.SendAsync(request, HttpCompletionOption.ResponseHeadersRead); + Assert.Equal(responseCode, response.StatusCode); + + string responseBody = await response.Content.ReadAsStringAsync(); + Assert.Equal(responseContent, responseBody); + } + }, + async server => + { + await server.EstablishConnectionAsync(); + + (int streamId, HttpRequestData requestData) = await server.ReadAndParseRequestHeaderAsync(readBody : false); + + // Wait for client so start sending body. + await tsc.Task.ConfigureAwait(false); + + if (shouldWait) + { + // Read body first before sending back response + await server.ReadBodyAsync(); + } + + await server.SendResponseHeadersAsync(streamId, endStream: false, responseCode); + await server.SendResponseDataAsync(streamId, Encoding.ASCII.GetBytes(responseContent), endStream: false); + if (!shouldWait) + { + try + { + // Client should send reset. + await server.ReadBodyAsync(); + if (responseCode != HttpStatusCode.OK) Assert.True(false, "Should not be here"); + } + catch (IOException) when (responseCode != HttpStatusCode.OK) { }; + } + var headers = new HttpHeaderData[] { new HttpHeaderData("x-last", "done") }; + await server.SendResponseHeadersAsync(streamId, endStream: true, isTrailingHeader : true, headers: headers); + await server.SendGoAway(streamId); + await server.WaitForConnectionShutdownAsync(); + }); + } + [ConditionalFact(nameof(SupportsAlpn))] public async Task Http2_ProtocolMismatch_Throws() { diff --git a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.cs b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.cs index 34dd0ce034c6..35eb57601985 100644 --- a/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.cs +++ b/src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.cs @@ -178,6 +178,7 @@ public void MaxRequestContentBufferSize_SetInvalidValue_ThrowsArgumentOutOfRange [Theory] [InlineData(false)] [InlineData(true)] + [OuterLoop("Uses external servers")] public async Task UseDefaultCredentials_SetToFalseAndServerNeedsAuth_StatusCodeUnauthorized(bool useProxy) { HttpClientHandler handler = CreateHttpClientHandler(); @@ -1866,11 +1867,14 @@ public async Task PostAsync_CallMethod_EmptyContent(Uri remoteServer) [InlineData(false, "1.1")] [InlineData(true, "1.1")] [InlineData(null, "1.1")] + [InlineData(false, "2.0")] + [InlineData(true, "2.0")] + [InlineData(null, "2.0")] public async Task PostAsync_ExpectContinue_Success(bool? expectContinue, string version) { using (HttpClient client = CreateHttpClient()) { - var req = new HttpRequestMessage(HttpMethod.Post, Configuration.Http.RemoteEchoServer) + var req = new HttpRequestMessage(HttpMethod.Post, version == "2.0" ? Configuration.Http.Http2RemoteEchoServer : Configuration.Http.RemoteEchoServer) { Content = new StringContent("Test String", Encoding.UTF8), Version = new Version(version) @@ -1883,7 +1887,7 @@ public async Task PostAsync_ExpectContinue_Success(bool? expectContinue, string if (UseSocketsHttpHandler) { const string ExpectedReqHeader = "\"Expect\": \"100-continue\""; - if (expectContinue == true && version == "1.1") + if (expectContinue == true && (version == "1.1" || version == "2.0")) { Assert.Contains(ExpectedReqHeader, await response.Content.ReadAsStringAsync()); } diff --git a/src/System.Net.Http/tests/FunctionalTests/System.Net.Http.Functional.Tests.csproj b/src/System.Net.Http/tests/FunctionalTests/System.Net.Http.Functional.Tests.csproj index 810152209b2d..be3b84d94bd7 100644 --- a/src/System.Net.Http/tests/FunctionalTests/System.Net.Http.Functional.Tests.csproj +++ b/src/System.Net.Http/tests/FunctionalTests/System.Net.Http.Functional.Tests.csproj @@ -148,6 +148,7 @@ + Common\System\Net\Http\Http2Frames.cs